From 7028cbe09c688437910a25623098762bf0fa592d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Mar 2016 22:28:34 +1000 Subject: Move Irrlicht to src/others. --- src/extantz/build.lua | 4 +- src/others/irrlicht-1.8.1/bin/Linux/readme.txt | 4 + src/others/irrlicht-1.8.1/bin/MacOSX/readme.txt | 5 + .../bin/Win32-VisualStudio/irrlicht.ico | Bin 0 -> 2238 bytes .../irrlicht-1.8.1/bin/Win32-gcc/irrlicht.ico | Bin 0 -> 2238 bytes .../bin/Win64-VisualStudio/irrlicht.ico | Bin 0 -> 2238 bytes .../bin/Win64-VisualStudio/readme.txt | 3 + src/others/irrlicht-1.8.1/changes.txt | 5097 +++++ src/others/irrlicht-1.8.1/doc/aesGladman.txt | 34 + src/others/irrlicht-1.8.1/doc/bzip2-license.txt | 42 + src/others/irrlicht-1.8.1/doc/html/001shot.jpg | Bin 0 -> 6126 bytes src/others/irrlicht-1.8.1/doc/html/002shot.jpg | Bin 0 -> 19218 bytes src/others/irrlicht-1.8.1/doc/html/003shot.jpg | Bin 0 -> 5925 bytes src/others/irrlicht-1.8.1/doc/html/004shot.jpg | Bin 0 -> 8132 bytes src/others/irrlicht-1.8.1/doc/html/005shot.jpg | Bin 0 -> 11356 bytes src/others/irrlicht-1.8.1/doc/html/006shot.jpg | Bin 0 -> 10657 bytes src/others/irrlicht-1.8.1/doc/html/007shot.jpg | Bin 0 -> 24825 bytes src/others/irrlicht-1.8.1/doc/html/008shot.jpg | Bin 0 -> 26977 bytes src/others/irrlicht-1.8.1/doc/html/009shot.jpg | Bin 0 -> 20331 bytes src/others/irrlicht-1.8.1/doc/html/010shot.jpg | Bin 0 -> 18563 bytes src/others/irrlicht-1.8.1/doc/html/011shot.jpg | Bin 0 -> 19423 bytes src/others/irrlicht-1.8.1/doc/html/012shot.jpg | Bin 0 -> 20291 bytes src/others/irrlicht-1.8.1/doc/html/013shot.jpg | Bin 0 -> 8782 bytes src/others/irrlicht-1.8.1/doc/html/014shot.jpg | Bin 0 -> 19953 bytes src/others/irrlicht-1.8.1/doc/html/015shot.jpg | Bin 0 -> 21671 bytes src/others/irrlicht-1.8.1/doc/html/016shot.jpg | Bin 0 -> 12038 bytes src/others/irrlicht-1.8.1/doc/html/017shot.jpg | Bin 0 -> 9051 bytes src/others/irrlicht-1.8.1/doc/html/018shot.jpg | Bin 0 -> 26137 bytes src/others/irrlicht-1.8.1/doc/html/019shot.jpg | Bin 0 -> 4554 bytes src/others/irrlicht-1.8.1/doc/html/020shot.jpg | Bin 0 -> 11126 bytes src/others/irrlicht-1.8.1/doc/html/021shot.jpg | Bin 0 -> 25032 bytes src/others/irrlicht-1.8.1/doc/html/022shot.jpg | Bin 0 -> 15370 bytes src/others/irrlicht-1.8.1/doc/html/023shot.jpg | Bin 0 -> 12668 bytes src/others/irrlicht-1.8.1/doc/html/024shot.jpg | Bin 0 -> 15988 bytes src/others/irrlicht-1.8.1/doc/html/025shot.jpg | Bin 0 -> 9279 bytes src/others/irrlicht-1.8.1/doc/html/026shot.jpg | Bin 0 -> 11142 bytes .../doc/html/_c_dynamic_mesh_buffer_8h.html | 141 + .../doc/html/_c_dynamic_mesh_buffer_8h_source.html | 229 + .../doc/html/_c_index_buffer_8h.html | 141 + .../doc/html/_c_index_buffer_8h_source.html | 342 + .../irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h.html | 151 + .../doc/html/_c_mesh_buffer_8h_source.html | 377 + .../doc/html/_c_vertex_buffer_8h.html | 141 + .../doc/html/_c_vertex_buffer_8h_source.html | 326 + .../irrlicht-1.8.1/doc/html/_e_attributes_8h.html | 173 + .../doc/html/_e_attributes_8h_source.html | 220 + .../doc/html/_e_culling_types_8h.html | 153 + .../doc/html/_e_culling_types_8h_source.html | 159 + .../doc/html/_e_debug_scene_types_8h.html | 151 + .../doc/html/_e_debug_scene_types_8h_source.html | 160 + .../doc/html/_e_device_types_8h.html | 147 + .../doc/html/_e_device_types_8h_source.html | 162 + .../doc/html/_e_driver_features_8h.html | 186 + .../doc/html/_e_driver_features_8h_source.html | 215 + .../doc/html/_e_driver_types_8h.html | 148 + .../doc/html/_e_driver_types_8h_source.html | 161 + .../doc/html/_e_g_u_i_alignment_8h.html | 148 + .../doc/html/_e_g_u_i_alignment_8h_source.html | 153 + .../doc/html/_e_g_u_i_element_types_8h.html | 180 + .../doc/html/_e_g_u_i_element_types_8h_source.html | 231 + .../doc/html/_e_hardware_buffer_flags_8h.html | 147 + .../html/_e_hardware_buffer_flags_8h_source.html | 156 + .../doc/html/_e_material_flags_8h.html | 164 + .../doc/html/_e_material_flags_8h_source.html | 186 + .../doc/html/_e_material_types_8h.html | 177 + .../doc/html/_e_material_types_8h_source.html | 240 + .../doc/html/_e_mesh_writer_enums_8h.html | 152 + .../doc/html/_e_mesh_writer_enums_8h_source.html | 166 + .../doc/html/_e_message_box_flags_8h.html | 146 + .../doc/html/_e_message_box_flags_8h_source.html | 150 + .../doc/html/_e_primitive_types_8h.html | 153 + .../doc/html/_e_primitive_types_8h_source.html | 162 + .../doc/html/_e_scene_node_animator_types_8h.html | 154 + .../_e_scene_node_animator_types_8h_source.html | 165 + .../doc/html/_e_scene_node_types_8h.html | 172 + .../doc/html/_e_scene_node_types_8h_source.html | 198 + .../doc/html/_e_shader_types_8h.html | 178 + .../doc/html/_e_shader_types_8h_source.html | 201 + .../doc/html/_e_terrain_elements_8h.html | 146 + .../doc/html/_e_terrain_elements_8h_source.html | 150 + .../doc/html/_i_animated_mesh_8h.html | 162 + .../doc/html/_i_animated_mesh_8h_source.html | 191 + .../doc/html/_i_animated_mesh_m_d2_8h.html | 174 + .../doc/html/_i_animated_mesh_m_d2_8h_source.html | 184 + .../doc/html/_i_animated_mesh_m_d3_8h.html | 208 + .../doc/html/_i_animated_mesh_m_d3_8h_source.html | 405 + .../doc/html/_i_animated_mesh_scene_node_8h.html | 152 + .../_i_animated_mesh_scene_node_8h_source.html | 248 + .../html/_i_attribute_exchanging_object_8h.html | 149 + .../_i_attribute_exchanging_object_8h_source.html | 178 + .../irrlicht-1.8.1/doc/html/_i_attributes_8h.html | 158 + .../doc/html/_i_attributes_8h_source.html | 600 + .../doc/html/_i_billboard_scene_node_8h.html | 139 + .../html/_i_billboard_scene_node_8h_source.html | 172 + .../doc/html/_i_billboard_text_scene_node_8h.html | 139 + .../_i_billboard_text_scene_node_8h_source.html | 167 + .../doc/html/_i_bone_scene_node_8h.html | 159 + .../doc/html/_i_bone_scene_node_8h_source.html | 208 + .../doc/html/_i_camera_scene_node_8h.html | 140 + .../doc/html/_i_camera_scene_node_8h_source.html | 258 + .../doc/html/_i_collada_mesh_writer_8h.html | 182 + .../doc/html/_i_collada_mesh_writer_8h_source.html | 416 + .../doc/html/_i_cursor_control_8h.html | 176 + .../doc/html/_i_cursor_control_8h_source.html | 262 + .../_i_dummy_transformation_scene_node_8h.html | 139 + ..._dummy_transformation_scene_node_8h_source.html | 152 + .../doc/html/_i_dynamic_mesh_buffer_8h.html | 141 + .../doc/html/_i_dynamic_mesh_buffer_8h_source.html | 297 + .../doc/html/_i_event_receiver_8h.html | 240 + .../doc/html/_i_event_receiver_8h_source.html | 435 + .../doc/html/_i_file_archive_8h.html | 161 + .../doc/html/_i_file_archive_8h_source.html | 206 + .../irrlicht-1.8.1/doc/html/_i_file_list_8h.html | 140 + .../doc/html/_i_file_list_8h_source.html | 177 + .../irrlicht-1.8.1/doc/html/_i_file_system_8h.html | 143 + .../doc/html/_i_file_system_8h_source.html | 286 + .../doc/html/_i_g_p_u_programming_services_8h.html | 152 + .../_i_g_p_u_programming_services_8h_source.html | 383 + .../doc/html/_i_g_u_i_button_8h.html | 163 + .../doc/html/_i_g_u_i_button_8h_source.html | 228 + .../doc/html/_i_g_u_i_check_box_8h.html | 139 + .../doc/html/_i_g_u_i_check_box_8h_source.html | 152 + .../doc/html/_i_g_u_i_color_select_dialog_8h.html | 139 + .../_i_g_u_i_color_select_dialog_8h_source.html | 148 + .../doc/html/_i_g_u_i_combo_box_8h.html | 139 + .../doc/html/_i_g_u_i_combo_box_8h_source.html | 175 + .../doc/html/_i_g_u_i_context_menu_8h.html | 148 + .../doc/html/_i_g_u_i_context_menu_8h_source.html | 218 + .../doc/html/_i_g_u_i_edit_box_8h.html | 140 + .../doc/html/_i_g_u_i_edit_box_8h_source.html | 210 + .../doc/html/_i_g_u_i_element_8h.html | 146 + .../doc/html/_i_g_u_i_element_8h_source.html | 1030 + .../doc/html/_i_g_u_i_element_factory_8h.html | 140 + .../html/_i_g_u_i_element_factory_8h_source.html | 166 + .../doc/html/_i_g_u_i_environment_8h.html | 149 + .../doc/html/_i_g_u_i_environment_8h_source.html | 394 + .../doc/html/_i_g_u_i_file_open_dialog_8h.html | 140 + .../html/_i_g_u_i_file_open_dialog_8h_source.html | 154 + .../irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h.html | 152 + .../doc/html/_i_g_u_i_font_8h_source.html | 185 + .../doc/html/_i_g_u_i_font_bitmap_8h.html | 139 + .../doc/html/_i_g_u_i_font_bitmap_8h_source.html | 154 + .../irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h.html | 141 + .../doc/html/_i_g_u_i_image_8h_source.html | 168 + .../doc/html/_i_g_u_i_image_list_8h.html | 141 + .../doc/html/_i_g_u_i_image_list_8h_source.html | 154 + .../doc/html/_i_g_u_i_in_out_fader_8h.html | 140 + .../doc/html/_i_g_u_i_in_out_fader_8h_source.html | 164 + .../doc/html/_i_g_u_i_list_box_8h.html | 154 + .../doc/html/_i_g_u_i_list_box_8h_source.html | 216 + .../doc/html/_i_g_u_i_mesh_viewer_8h.html | 143 + .../doc/html/_i_g_u_i_mesh_viewer_8h_source.html | 167 + .../doc/html/_i_g_u_i_scroll_bar_8h.html | 139 + .../doc/html/_i_g_u_i_scroll_bar_8h_source.html | 169 + .../irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h.html | 288 + .../doc/html/_i_g_u_i_skin_8h_source.html | 477 + .../doc/html/_i_g_u_i_spin_box_8h.html | 139 + .../doc/html/_i_g_u_i_spin_box_8h_source.html | 173 + .../doc/html/_i_g_u_i_sprite_bank_8h.html | 146 + .../doc/html/_i_g_u_i_sprite_bank_8h_source.html | 198 + .../doc/html/_i_g_u_i_static_text_8h.html | 140 + .../doc/html/_i_g_u_i_static_text_8h_source.html | 210 + .../doc/html/_i_g_u_i_tab_control_8h.html | 142 + .../doc/html/_i_g_u_i_tab_control_8h_source.html | 219 + .../irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h.html | 174 + .../doc/html/_i_g_u_i_table_8h_source.html | 264 + .../doc/html/_i_g_u_i_toolbar_8h.html | 141 + .../doc/html/_i_g_u_i_toolbar_8h_source.html | 157 + .../doc/html/_i_g_u_i_tree_view_8h.html | 142 + .../doc/html/_i_g_u_i_tree_view_8h_source.html | 296 + .../doc/html/_i_g_u_i_window_8h.html | 140 + .../doc/html/_i_g_u_i_window_8h_source.html | 175 + .../doc/html/_i_geometry_creator_8h.html | 143 + .../doc/html/_i_geometry_creator_8h_source.html | 215 + .../irrlicht-1.8.1/doc/html/_i_image_8h.html | 142 + .../doc/html/_i_image_8h_source.html | 241 + .../doc/html/_i_image_loader_8h.html | 143 + .../doc/html/_i_image_loader_8h_source.html | 161 + .../doc/html/_i_image_writer_8h.html | 143 + .../doc/html/_i_image_writer_8h_source.html | 158 + .../doc/html/_i_index_buffer_8h.html | 143 + .../doc/html/_i_index_buffer_8h_source.html | 181 + .../doc/html/_i_light_manager_8h.html | 140 + .../doc/html/_i_light_manager_8h_source.html | 163 + .../doc/html/_i_light_scene_node_8h.html | 140 + .../doc/html/_i_light_scene_node_8h_source.html | 181 + .../irrlicht-1.8.1/doc/html/_i_logger_8h.html | 151 + .../doc/html/_i_logger_8h_source.html | 175 + .../doc/html/_i_material_renderer_8h.html | 141 + .../doc/html/_i_material_renderer_8h_source.html | 167 + .../doc/html/_i_material_renderer_services_8h.html | 140 + .../_i_material_renderer_services_8h_source.html | 178 + src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h.html | 141 + .../irrlicht-1.8.1/doc/html/_i_mesh_8h_source.html | 172 + .../irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h.html | 145 + .../doc/html/_i_mesh_buffer_8h_source.html | 221 + .../irrlicht-1.8.1/doc/html/_i_mesh_cache_8h.html | 140 + .../doc/html/_i_mesh_cache_8h_source.html | 223 + .../irrlicht-1.8.1/doc/html/_i_mesh_loader_8h.html | 142 + .../doc/html/_i_mesh_loader_8h_source.html | 160 + .../doc/html/_i_mesh_manipulator_8h.html | 145 + .../doc/html/_i_mesh_manipulator_8h_source.html | 366 + .../doc/html/_i_mesh_scene_node_8h.html | 139 + .../doc/html/_i_mesh_scene_node_8h_source.html | 172 + .../irrlicht-1.8.1/doc/html/_i_mesh_writer_8h.html | 142 + .../doc/html/_i_mesh_writer_8h_source.html | 168 + .../doc/html/_i_meta_triangle_selector_8h.html | 139 + .../html/_i_meta_triangle_selector_8h_source.html | 154 + .../doc/html/_i_o_s_operator_8h.html | 138 + .../doc/html/_i_o_s_operator_8h_source.html | 160 + .../doc/html/_i_particle_affector_8h.html | 162 + .../doc/html/_i_particle_affector_8h_source.html | 182 + ...rticle_animated_mesh_scene_node_emitter_8h.html | 140 + ...animated_mesh_scene_node_emitter_8h_source.html | 164 + .../html/_i_particle_attraction_affector_8h.html | 139 + .../_i_particle_attraction_affector_8h_source.html | 167 + .../doc/html/_i_particle_box_emitter_8h.html | 140 + .../html/_i_particle_box_emitter_8h_source.html | 152 + .../doc/html/_i_particle_cylinder_emitter_8h.html | 139 + .../_i_particle_cylinder_emitter_8h_source.html | 167 + .../doc/html/_i_particle_emitter_8h.html | 169 + .../doc/html/_i_particle_emitter_8h_source.html | 219 + .../doc/html/_i_particle_fade_out_affector_8h.html | 139 + .../_i_particle_fade_out_affector_8h_source.html | 155 + .../doc/html/_i_particle_gravity_affector_8h.html | 139 + .../_i_particle_gravity_affector_8h_source.html | 156 + .../doc/html/_i_particle_mesh_emitter_8h.html | 140 + .../html/_i_particle_mesh_emitter_8h_source.html | 164 + .../doc/html/_i_particle_ring_emitter_8h.html | 139 + .../html/_i_particle_ring_emitter_8h_source.html | 159 + .../doc/html/_i_particle_rotation_affector_8h.html | 139 + .../_i_particle_rotation_affector_8h_source.html | 155 + .../doc/html/_i_particle_sphere_emitter_8h.html | 139 + .../html/_i_particle_sphere_emitter_8h_source.html | 155 + .../doc/html/_i_particle_system_scene_node_8h.html | 150 + .../_i_particle_system_scene_node_8h_source.html | 303 + .../doc/html/_i_q3_level_mesh_8h.html | 140 + .../doc/html/_i_q3_level_mesh_8h_source.html | 157 + .../irrlicht-1.8.1/doc/html/_i_q3_shader_8h.html | 244 + .../doc/html/_i_q3_shader_8h_source.html | 982 + .../irrlicht-1.8.1/doc/html/_i_randomizer_8h.html | 137 + .../doc/html/_i_randomizer_8h_source.html | 148 + .../irrlicht-1.8.1/doc/html/_i_read_file_8h.html | 148 + .../doc/html/_i_read_file_8h_source.html | 163 + .../doc/html/_i_reference_counted_8h.html | 137 + .../doc/html/_i_reference_counted_8h_source.html | 196 + .../doc/html/_i_scene_collision_manager_8h.html | 143 + .../html/_i_scene_collision_manager_8h_source.html | 201 + .../doc/html/_i_scene_loader_8h.html | 142 + .../doc/html/_i_scene_loader_8h_source.html | 164 + .../doc/html/_i_scene_manager_8h.html | 178 + .../doc/html/_i_scene_manager_8h_source.html | 659 + .../irrlicht-1.8.1/doc/html/_i_scene_node_8h.html | 158 + .../doc/html/_i_scene_node_8h_source.html | 777 + .../doc/html/_i_scene_node_animator_8h.html | 145 + .../doc/html/_i_scene_node_animator_8h_source.html | 184 + .../_i_scene_node_animator_camera_f_p_s_8h.html | 141 + ...scene_node_animator_camera_f_p_s_8h_source.html | 170 + .../_i_scene_node_animator_camera_maya_8h.html | 139 + ..._scene_node_animator_camera_maya_8h_source.html | 162 + ..._scene_node_animator_collision_response_8h.html | 140 + ...node_animator_collision_response_8h_source.html | 211 + .../html/_i_scene_node_animator_factory_8h.html | 140 + .../_i_scene_node_animator_factory_8h_source.html | 166 + .../doc/html/_i_scene_node_factory_8h.html | 140 + .../doc/html/_i_scene_node_factory_8h_source.html | 165 + .../doc/html/_i_scene_user_data_serializer_8h.html | 141 + .../_i_scene_user_data_serializer_8h_source.html | 160 + .../html/_i_shader_constant_set_call_back_8h.html | 139 + ..._i_shader_constant_set_call_back_8h_source.html | 154 + .../doc/html/_i_shadow_volume_scene_node_8h.html | 139 + .../_i_shadow_volume_scene_node_8h_source.html | 153 + .../doc/html/_i_skinned_mesh_8h.html | 156 + .../doc/html/_i_skinned_mesh_8h_source.html | 288 + .../doc/html/_i_terrain_scene_node_8h.html | 144 + .../doc/html/_i_terrain_scene_node_8h_source.html | 223 + .../doc/html/_i_text_scene_node_8h.html | 139 + .../doc/html/_i_text_scene_node_8h_source.html | 153 + .../irrlicht-1.8.1/doc/html/_i_texture_8h.html | 165 + .../doc/html/_i_texture_8h_source.html | 241 + .../irrlicht-1.8.1/doc/html/_i_timer_8h.html | 138 + .../doc/html/_i_timer_8h_source.html | 199 + .../doc/html/_i_triangle_selector_8h.html | 143 + .../doc/html/_i_triangle_selector_8h_source.html | 178 + .../doc/html/_i_vertex_buffer_8h.html | 141 + .../doc/html/_i_vertex_buffer_8h_source.html | 168 + .../doc/html/_i_video_driver_8h.html | 206 + .../doc/html/_i_video_driver_8h_source.html | 790 + .../doc/html/_i_video_mode_list_8h.html | 140 + .../doc/html/_i_video_mode_list_8h_source.html | 165 + .../doc/html/_i_volume_light_scene_node_8h.html | 139 + .../html/_i_volume_light_scene_node_8h_source.html | 170 + .../irrlicht-1.8.1/doc/html/_i_write_file_8h.html | 146 + .../doc/html/_i_write_file_8h_source.html | 158 + .../doc/html/_i_x_m_l_reader_8h.html | 143 + .../doc/html/_i_x_m_l_reader_8h_source.html | 145 + .../doc/html/_i_x_m_l_writer_8h.html | 141 + .../doc/html/_i_x_m_l_writer_8h_source.html | 169 + .../doc/html/_irr_compile_config_8h.html | 1639 ++ .../doc/html/_irr_compile_config_8h_source.html | 816 + .../doc/html/_irrlicht_device_8h.html | 152 + .../doc/html/_irrlicht_device_8h_source.html | 313 + .../irrlicht-1.8.1/doc/html/_keycodes_8h.html | 330 + .../doc/html/_keycodes_8h_source.html | 293 + .../irrlicht-1.8.1/doc/html/_s3_d_vertex_8h.html | 164 + .../doc/html/_s3_d_vertex_8h_source.html | 360 + .../doc/html/_s_animated_mesh_8h.html | 142 + .../doc/html/_s_animated_mesh_8h_source.html | 278 + .../irrlicht-1.8.1/doc/html/_s_color_8h.html | 183 + .../doc/html/_s_color_8h_source.html | 667 + .../doc/html/_s_exposed_video_data_8h.html | 138 + .../doc/html/_s_exposed_video_data_8h_source.html | 196 + .../doc/html/_s_irr_creation_parameters_8h.html | 140 + .../html/_s_irr_creation_parameters_8h_source.html | 267 + .../irrlicht-1.8.1/doc/html/_s_key_map_8h.html | 154 + .../doc/html/_s_key_map_8h_source.html | 158 + .../irrlicht-1.8.1/doc/html/_s_light_8h.html | 155 + .../doc/html/_s_light_8h_source.html | 196 + .../irrlicht-1.8.1/doc/html/_s_material_8h.html | 252 + .../doc/html/_s_material_8h_source.html | 648 + .../doc/html/_s_material_layer_8h.html | 157 + .../doc/html/_s_material_layer_8h_source.html | 309 + src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h.html | 142 + .../irrlicht-1.8.1/doc/html/_s_mesh_8h_source.html | 244 + .../irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h.html | 123 + .../doc/html/_s_mesh_buffer_8h_source.html | 127 + .../doc/html/_s_mesh_buffer_light_map_8h.html | 123 + .../html/_s_mesh_buffer_light_map_8h_source.html | 127 + .../doc/html/_s_mesh_buffer_tangents_8h.html | 123 + .../html/_s_mesh_buffer_tangents_8h_source.html | 127 + .../irrlicht-1.8.1/doc/html/_s_particle_8h.html | 141 + .../doc/html/_s_particle_8h_source.html | 166 + .../doc/html/_s_shared_mesh_buffer_8h.html | 140 + .../doc/html/_s_shared_mesh_buffer_8h_source.html | 325 + .../doc/html/_s_skin_mesh_buffer_8h.html | 140 + .../doc/html/_s_skin_mesh_buffer_8h_source.html | 493 + .../doc/html/_s_vertex_index_8h.html | 141 + .../doc/html/_s_vertex_index_8h_source.html | 196 + .../doc/html/_s_vertex_manipulator_8h.html | 158 + .../doc/html/_s_vertex_manipulator_8h_source.html | 389 + .../doc/html/_s_view_frustum_8h.html | 144 + .../doc/html/_s_view_frustum_8h_source.html | 444 + .../doc/html/_scene_parameters_8h.html | 162 + .../doc/html/_scene_parameters_8h_source.html | 191 + .../irrlicht-1.8.1/doc/html/aabbox3d_8h.html | 148 + .../doc/html/aabbox3d_8h_source.html | 390 + src/others/irrlicht-1.8.1/doc/html/annotated.html | 347 + src/others/irrlicht-1.8.1/doc/html/bc_s.png | Bin 0 -> 707 bytes src/others/irrlicht-1.8.1/doc/html/classes.html | 192 + .../classirr_1_1_i_event_receiver-members.html | 122 + .../doc/html/classirr_1_1_i_event_receiver.html | 225 + .../doc/html/classirr_1_1_i_event_receiver.png | Bin 0 -> 10113 bytes .../doc/html/classirr_1_1_i_logger-members.html | 135 + .../doc/html/classirr_1_1_i_logger.html | 417 + .../doc/html/classirr_1_1_i_logger.png | Bin 0 -> 598 bytes .../html/classirr_1_1_i_o_s_operator-members.html | 133 + .../doc/html/classirr_1_1_i_o_s_operator.html | 303 + .../doc/html/classirr_1_1_i_o_s_operator.png | Bin 0 -> 624 bytes .../html/classirr_1_1_i_randomizer-members.html | 131 + .../doc/html/classirr_1_1_i_randomizer.html | 236 + .../doc/html/classirr_1_1_i_randomizer.png | Bin 0 -> 625 bytes .../classirr_1_1_i_reference_counted-members.html | 127 + .../doc/html/classirr_1_1_i_reference_counted.html | 391 + .../doc/html/classirr_1_1_i_reference_counted.png | Bin 0 -> 16111 bytes .../doc/html/classirr_1_1_i_timer-members.html | 145 + .../doc/html/classirr_1_1_i_timer.html | 406 + .../doc/html/classirr_1_1_i_timer.png | Bin 0 -> 580 bytes .../html/classirr_1_1_irrlicht_device-members.html | 164 + .../doc/html/classirr_1_1_irrlicht_device.html | 1043 + .../doc/html/classirr_1_1_irrlicht_device.png | Bin 0 -> 629 bytes .../classirr_1_1core_1_1_c_matrix4-members.html | 210 + .../doc/html/classirr_1_1core_1_1_c_matrix4.html | 2908 +++ .../html/classirr_1_1core_1_1aabbox3d-members.html | 149 + .../doc/html/classirr_1_1core_1_1aabbox3d.html | 1087 + .../html/classirr_1_1core_1_1array-members.html | 156 + .../doc/html/classirr_1_1core_1_1array.html | 1252 ++ .../classirr_1_1core_1_1dimension2d-members.html | 143 + .../doc/html/classirr_1_1core_1_1dimension2d.html | 769 + .../classirr_1_1core_1_1irr_allocator-members.html | 127 + .../html/classirr_1_1core_1_1irr_allocator.html | 337 + ...sirr_1_1core_1_1irr_allocator_fast-members.html | 124 + .../classirr_1_1core_1_1irr_allocator_fast.html | 253 + .../html/classirr_1_1core_1_1line2d-members.html | 147 + .../doc/html/classirr_1_1core_1_1line2d.html | 955 + .../html/classirr_1_1core_1_1line3d-members.html | 141 + .../doc/html/classirr_1_1core_1_1line3d.html | 807 + .../doc/html/classirr_1_1core_1_1list-members.html | 140 + .../doc/html/classirr_1_1core_1_1list.html | 706 + ...1_1core_1_1list_1_1_const_iterator-members.html | 139 + ...lassirr_1_1core_1_1list_1_1_const_iterator.html | 559 + ...ssirr_1_1core_1_1list_1_1_iterator-members.html | 137 + .../classirr_1_1core_1_1list_1_1_iterator.html | 515 + .../doc/html/classirr_1_1core_1_1map-members.html | 140 + .../doc/html/classirr_1_1core_1_1map.html | 720 + ...rr_1_1core_1_1map_1_1_access_class-members.html | 123 + .../classirr_1_1core_1_1map_1_1_access_class.html | 214 + ..._1_1core_1_1map_1_1_const_iterator-members.html | 133 + ...classirr_1_1core_1_1map_1_1_const_iterator.html | 445 + ...assirr_1_1core_1_1map_1_1_iterator-members.html | 132 + .../html/classirr_1_1core_1_1map_1_1_iterator.html | 423 + ...e_1_1map_1_1_parent_first_iterator-members.html | 129 + ...r_1_1core_1_1map_1_1_parent_first_iterator.html | 355 + ...re_1_1map_1_1_parent_last_iterator-members.html | 129 + ...rr_1_1core_1_1map_1_1_parent_last_iterator.html | 355 + .../html/classirr_1_1core_1_1plane3d-members.html | 143 + .../doc/html/classirr_1_1core_1_1plane3d.html | 927 + .../classirr_1_1core_1_1quaternion-members.html | 158 + .../doc/html/classirr_1_1core_1_1quaternion.html | 1240 ++ .../doc/html/classirr_1_1core_1_1rect-members.html | 146 + .../doc/html/classirr_1_1core_1_1rect.html | 874 + .../html/classirr_1_1core_1_1string-members.html | 187 + .../doc/html/classirr_1_1core_1_1string.html | 2237 ++ .../classirr_1_1core_1_1triangle3d-members.html | 140 + .../doc/html/classirr_1_1core_1_1triangle3d.html | 794 + .../html/classirr_1_1core_1_1vector2d-members.html | 173 + .../doc/html/classirr_1_1core_1_1vector2d.html | 1544 ++ .../html/classirr_1_1core_1_1vector3d-members.html | 178 + .../doc/html/classirr_1_1core_1_1vector3d.html | 1716 ++ ...assirr_1_1gui_1_1_i_cursor_control-members.html | 143 + .../html/classirr_1_1gui_1_1_i_cursor_control.html | 567 + .../html/classirr_1_1gui_1_1_i_cursor_control.png | Bin 0 -> 653 bytes ...classirr_1_1gui_1_1_i_g_u_i_button-members.html | 234 + .../html/classirr_1_1gui_1_1_i_g_u_i_button.html | 669 + .../html/classirr_1_1gui_1_1_i_g_u_i_button.png | Bin 0 -> 1791 bytes ...ssirr_1_1gui_1_1_i_g_u_i_check_box-members.html | 217 + .../classirr_1_1gui_1_1_i_g_u_i_check_box.html | 245 + .../html/classirr_1_1gui_1_1_i_g_u_i_check_box.png | Bin 0 -> 1822 bytes ...ui_1_1_i_g_u_i_color_select_dialog-members.html | 215 + ...irr_1_1gui_1_1_i_g_u_i_color_select_dialog.html | 201 + ...sirr_1_1gui_1_1_i_g_u_i_color_select_dialog.png | Bin 0 -> 1865 bytes ...ssirr_1_1gui_1_1_i_g_u_i_combo_box-members.html | 227 + .../classirr_1_1gui_1_1_i_g_u_i_combo_box.html | 470 + .../html/classirr_1_1gui_1_1_i_g_u_i_combo_box.png | Bin 0 -> 1817 bytes ...rr_1_1gui_1_1_i_g_u_i_context_menu-members.html | 237 + .../classirr_1_1gui_1_1_i_g_u_i_context_menu.html | 876 + .../classirr_1_1gui_1_1_i_g_u_i_context_menu.png | Bin 0 -> 1837 bytes ...assirr_1_1gui_1_1_i_g_u_i_edit_box-members.html | 236 + .../html/classirr_1_1gui_1_1_i_g_u_i_edit_box.html | 711 + .../html/classirr_1_1gui_1_1_i_g_u_i_edit_box.png | Bin 0 -> 1803 bytes ...lassirr_1_1gui_1_1_i_g_u_i_element-members.html | 214 + .../html/classirr_1_1gui_1_1_i_g_u_i_element.html | 2371 +++ .../html/classirr_1_1gui_1_1_i_g_u_i_element.png | Bin 0 -> 7714 bytes ...1_1gui_1_1_i_g_u_i_element_factory-members.html | 133 + ...lassirr_1_1gui_1_1_i_g_u_i_element_factory.html | 329 + ...classirr_1_1gui_1_1_i_g_u_i_element_factory.png | Bin 0 -> 730 bytes ...irr_1_1gui_1_1_i_g_u_i_environment-members.html | 187 + .../classirr_1_1gui_1_1_i_g_u_i_environment.html | 2458 +++ .../classirr_1_1gui_1_1_i_g_u_i_environment.png | Bin 0 -> 678 bytes ..._1gui_1_1_i_g_u_i_file_open_dialog-members.html | 217 + ...assirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html | 247 + ...lassirr_1_1gui_1_1_i_g_u_i_file_open_dialog.png | Bin 0 -> 1860 bytes .../classirr_1_1gui_1_1_i_g_u_i_font-members.html | 136 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_font.html | 430 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_font.png | Bin 0 -> 846 bytes ...irr_1_1gui_1_1_i_g_u_i_font_bitmap-members.html | 138 + .../classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html | 259 + .../classirr_1_1gui_1_1_i_g_u_i_font_bitmap.png | Bin 0 -> 843 bytes .../classirr_1_1gui_1_1_i_g_u_i_image-members.html | 223 + .../html/classirr_1_1gui_1_1_i_g_u_i_image.html | 358 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_image.png | Bin 0 -> 1791 bytes ...sirr_1_1gui_1_1_i_g_u_i_image_list-members.html | 131 + .../classirr_1_1gui_1_1_i_g_u_i_image_list.html | 257 + .../classirr_1_1gui_1_1_i_g_u_i_image_list.png | Bin 0 -> 666 bytes ...rr_1_1gui_1_1_i_g_u_i_in_out_fader-members.html | 221 + .../classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html | 352 + .../classirr_1_1gui_1_1_i_g_u_i_in_out_fader.png | Bin 0 -> 1834 bytes ...assirr_1_1gui_1_1_i_g_u_i_list_box-members.html | 241 + .../html/classirr_1_1gui_1_1_i_g_u_i_list_box.html | 852 + .../html/classirr_1_1gui_1_1_i_g_u_i_list_box.png | Bin 0 -> 1802 bytes ...irr_1_1gui_1_1_i_g_u_i_mesh_viewer-members.html | 219 + .../classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html | 280 + .../classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.png | Bin 0 -> 1849 bytes ...sirr_1_1gui_1_1_i_g_u_i_scroll_bar-members.html | 225 + .../classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html | 403 + .../classirr_1_1gui_1_1_i_g_u_i_scroll_bar.png | Bin 0 -> 1816 bytes .../classirr_1_1gui_1_1_i_g_u_i_skin-members.html | 152 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.html | 1045 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.png | Bin 0 -> 1177 bytes ...assirr_1_1gui_1_1_i_g_u_i_spin_box-members.html | 224 + .../html/classirr_1_1gui_1_1_i_g_u_i_spin_box.html | 416 + .../html/classirr_1_1gui_1_1_i_g_u_i_spin_box.png | Bin 0 -> 1817 bytes ...irr_1_1gui_1_1_i_g_u_i_sprite_bank-members.html | 137 + .../classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html | 453 + .../classirr_1_1gui_1_1_i_g_u_i_sprite_bank.png | Bin 0 -> 688 bytes ...irr_1_1gui_1_1_i_g_u_i_static_text-members.html | 237 + .../classirr_1_1gui_1_1_i_g_u_i_static_text.html | 691 + .../classirr_1_1gui_1_1_i_g_u_i_static_text.png | Bin 0 -> 1824 bytes .../classirr_1_1gui_1_1_i_g_u_i_tab-members.html | 222 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.html | 340 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.png | Bin 0 -> 1784 bytes ...irr_1_1gui_1_1_i_g_u_i_tab_control-members.html | 233 + .../classirr_1_1gui_1_1_i_g_u_i_tab_control.html | 622 + .../classirr_1_1gui_1_1_i_g_u_i_tab_control.png | Bin 0 -> 1816 bytes .../classirr_1_1gui_1_1_i_g_u_i_table-members.html | 243 + .../html/classirr_1_1gui_1_1_i_g_u_i_table.html | 940 + .../doc/html/classirr_1_1gui_1_1_i_g_u_i_table.png | Bin 0 -> 1798 bytes ...assirr_1_1gui_1_1_i_g_u_i_tool_bar-members.html | 216 + .../html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.html | 262 + .../html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.png | Bin 0 -> 1802 bytes ...ssirr_1_1gui_1_1_i_g_u_i_tree_view-members.html | 225 + .../classirr_1_1gui_1_1_i_g_u_i_tree_view.html | 406 + .../html/classirr_1_1gui_1_1_i_g_u_i_tree_view.png | Bin 0 -> 1822 bytes ..._1_1gui_1_1_i_g_u_i_tree_view_node-members.html | 165 + ...classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html | 1122 + .../classirr_1_1gui_1_1_i_g_u_i_tree_view_node.png | Bin 0 -> 580 bytes ...classirr_1_1gui_1_1_i_g_u_i_window-members.html | 225 + .../html/classirr_1_1gui_1_1_i_g_u_i_window.html | 404 + .../html/classirr_1_1gui_1_1_i_g_u_i_window.png | Bin 0 -> 1803 bytes ...lassirr_1_1io_1_1_i_archive_loader-members.html | 132 + .../html/classirr_1_1io_1_1_i_archive_loader.html | 329 + .../html/classirr_1_1io_1_1_i_archive_loader.png | Bin 0 -> 649 bytes ..._1_1_i_attribute_exchanging_object-members.html | 129 + ...rr_1_1io_1_1_i_attribute_exchanging_object.html | 275 + ...irr_1_1io_1_1_i_attribute_exchanging_object.png | Bin 0 -> 24255 bytes .../classirr_1_1io_1_1_i_attributes-members.html | 265 + .../doc/html/classirr_1_1io_1_1_i_attributes.html | 4236 ++++ .../doc/html/classirr_1_1io_1_1_i_attributes.png | Bin 0 -> 626 bytes .../classirr_1_1io_1_1_i_file_archive-members.html | 132 + .../html/classirr_1_1io_1_1_i_file_archive.html | 278 + .../doc/html/classirr_1_1io_1_1_i_file_archive.png | Bin 0 -> 641 bytes .../classirr_1_1io_1_1_i_file_list-members.html | 138 + .../doc/html/classirr_1_1io_1_1_i_file_list.html | 474 + .../doc/html/classirr_1_1io_1_1_i_file_list.png | Bin 0 -> 607 bytes ...rr_1_1io_1_1_i_file_read_call_back-members.html | 123 + .../classirr_1_1io_1_1_i_file_read_call_back.html | 223 + .../classirr_1_1io_1_1_i_file_system-members.html | 165 + .../doc/html/classirr_1_1io_1_1_i_file_system.html | 1381 ++ .../doc/html/classirr_1_1io_1_1_i_file_system.png | Bin 0 -> 646 bytes ...ssirr_1_1io_1_1_i_irr_x_m_l_reader-members.html | 137 + .../classirr_1_1io_1_1_i_irr_x_m_l_reader.html | 603 + .../classirr_1_1io_1_1_i_read_file-members.html | 132 + .../doc/html/classirr_1_1io_1_1_i_read_file.html | 290 + .../doc/html/classirr_1_1io_1_1_i_read_file.png | Bin 0 -> 620 bytes .../classirr_1_1io_1_1_i_write_file-members.html | 131 + .../doc/html/classirr_1_1io_1_1_i_write_file.html | 270 + .../doc/html/classirr_1_1io_1_1_i_write_file.png | Bin 0 -> 613 bytes .../doc/html/classirr_1_1io_1_1_i_x_m_l_base.html | 135 + .../classirr_1_1io_1_1_i_x_m_l_writer-members.html | 134 + .../html/classirr_1_1io_1_1_i_x_m_l_writer.html | 403 + .../doc/html/classirr_1_1io_1_1_i_x_m_l_writer.png | Bin 0 -> 636 bytes ...1_1scene_1_1_c_dynamic_mesh_buffer-members.html | 162 + ...lassirr_1_1scene_1_1_c_dynamic_mesh_buffer.html | 469 + ...classirr_1_1scene_1_1_c_dynamic_mesh_buffer.png | Bin 0 -> 1333 bytes ...assirr_1_1scene_1_1_c_index_buffer-members.html | 150 + .../html/classirr_1_1scene_1_1_c_index_buffer.html | 707 + .../html/classirr_1_1scene_1_1_c_index_buffer.png | Bin 0 -> 916 bytes ...lassirr_1_1scene_1_1_c_mesh_buffer-members.html | 163 + .../html/classirr_1_1scene_1_1_c_mesh_buffer.html | 1163 ++ .../html/classirr_1_1scene_1_1_c_mesh_buffer.png | Bin 0 -> 969 bytes ...ssirr_1_1scene_1_1_c_vertex_buffer-members.html | 149 + .../classirr_1_1scene_1_1_c_vertex_buffer.html | 673 + .../html/classirr_1_1scene_1_1_c_vertex_buffer.png | Bin 0 -> 937 bytes ...ssirr_1_1scene_1_1_i_animated_mesh-members.html | 140 + .../classirr_1_1scene_1_1_i_animated_mesh.html | 314 + .../html/classirr_1_1scene_1_1_i_animated_mesh.png | Bin 0 -> 2140 bytes ..._1_1scene_1_1_i_animated_mesh_m_d2-members.html | 144 + ...classirr_1_1scene_1_1_i_animated_mesh_m_d2.html | 305 + .../classirr_1_1scene_1_1_i_animated_mesh_m_d2.png | Bin 0 -> 1205 bytes ..._1_1scene_1_1_i_animated_mesh_m_d3-members.html | 143 + ...classirr_1_1scene_1_1_i_animated_mesh_m_d3.html | 247 + .../classirr_1_1scene_1_1_i_animated_mesh_m_d3.png | Bin 0 -> 1205 bytes ...ene_1_1_i_animated_mesh_scene_node-members.html | 225 + ...rr_1_1scene_1_1_i_animated_mesh_scene_node.html | 870 + ...irr_1_1scene_1_1_i_animated_mesh_scene_node.png | Bin 0 -> 1545 bytes ...cene_1_1_i_animation_end_call_back-members.html | 128 + ...irr_1_1scene_1_1_i_animation_end_call_back.html | 182 + ...sirr_1_1scene_1_1_i_animation_end_call_back.png | Bin 0 -> 779 bytes ..._1scene_1_1_i_billboard_scene_node-members.html | 206 + ...assirr_1_1scene_1_1_i_billboard_scene_node.html | 443 + ...lassirr_1_1scene_1_1_i_billboard_scene_node.png | Bin 0 -> 1794 bytes ...ne_1_1_i_billboard_text_scene_node-members.html | 209 + ...r_1_1scene_1_1_i_billboard_text_scene_node.html | 393 + ...rr_1_1scene_1_1_i_billboard_text_scene_node.png | Bin 0 -> 1792 bytes ...irr_1_1scene_1_1_i_bone_scene_node-members.html | 209 + .../classirr_1_1scene_1_1_i_bone_scene_node.html | 458 + .../classirr_1_1scene_1_1_i_bone_scene_node.png | Bin 0 -> 1454 bytes ...r_1_1scene_1_1_i_camera_scene_node-members.html | 226 + .../classirr_1_1scene_1_1_i_camera_scene_node.html | 927 + .../classirr_1_1scene_1_1_i_camera_scene_node.png | Bin 0 -> 1856 bytes ...1_1scene_1_1_i_collada_mesh_writer-members.html | 152 + ...lassirr_1_1scene_1_1_i_collada_mesh_writer.html | 666 + ...classirr_1_1scene_1_1_i_collada_mesh_writer.png | Bin 0 -> 972 bytes ...ne_1_1_i_collada_mesh_writer_names-members.html | 131 + ...r_1_1scene_1_1_i_collada_mesh_writer_names.html | 277 + ...rr_1_1scene_1_1_i_collada_mesh_writer_names.png | Bin 0 -> 798 bytes ...1_i_collada_mesh_writer_properties-members.html | 139 + ...scene_1_1_i_collada_mesh_writer_properties.html | 434 + ...1scene_1_1_i_collada_mesh_writer_properties.png | Bin 0 -> 837 bytes ..._1_1scene_1_1_i_collision_callback-members.html | 128 + ...classirr_1_1scene_1_1_i_collision_callback.html | 189 + .../classirr_1_1scene_1_1_i_collision_callback.png | Bin 0 -> 708 bytes ..._i_dummy_transformation_scene_node-members.html | 200 + ...cene_1_1_i_dummy_transformation_scene_node.html | 216 + ...scene_1_1_i_dummy_transformation_scene_node.png | Bin 0 -> 1670 bytes ...1_1scene_1_1_i_dynamic_mesh_buffer-members.html | 158 + ...lassirr_1_1scene_1_1_i_dynamic_mesh_buffer.html | 977 + ...classirr_1_1scene_1_1_i_dynamic_mesh_buffer.png | Bin 0 -> 1335 bytes ...rr_1_1scene_1_1_i_geometry_creator-members.html | 136 + .../classirr_1_1scene_1_1_i_geometry_creator.html | 702 + .../classirr_1_1scene_1_1_i_geometry_creator.png | Bin 0 -> 602 bytes ...assirr_1_1scene_1_1_i_index_buffer-members.html | 144 + .../html/classirr_1_1scene_1_1_i_index_buffer.html | 514 + .../html/classirr_1_1scene_1_1_i_index_buffer.png | Bin 0 -> 919 bytes ...ssirr_1_1scene_1_1_i_light_manager-members.html | 133 + .../classirr_1_1scene_1_1_i_light_manager.html | 307 + .../html/classirr_1_1scene_1_1_i_light_manager.png | Bin 0 -> 571 bytes ...rr_1_1scene_1_1_i_light_scene_node-members.html | 208 + .../classirr_1_1scene_1_1_i_light_scene_node.html | 437 + .../classirr_1_1scene_1_1_i_light_scene_node.png | Bin 0 -> 1474 bytes .../html/classirr_1_1scene_1_1_i_mesh-members.html | 135 + .../doc/html/classirr_1_1scene_1_1_i_mesh.html | 394 + .../doc/html/classirr_1_1scene_1_1_i_mesh.png | Bin 0 -> 2268 bytes ...lassirr_1_1scene_1_1_i_mesh_buffer-members.html | 154 + .../html/classirr_1_1scene_1_1_i_mesh_buffer.html | 821 + .../html/classirr_1_1scene_1_1_i_mesh_buffer.png | Bin 0 -> 2180 bytes ...classirr_1_1scene_1_1_i_mesh_cache-members.html | 146 + .../html/classirr_1_1scene_1_1_i_mesh_cache.html | 694 + .../html/classirr_1_1scene_1_1_i_mesh_cache.png | Bin 0 -> 672 bytes ...lassirr_1_1scene_1_1_i_mesh_loader-members.html | 130 + .../html/classirr_1_1scene_1_1_i_mesh_loader.html | 232 + .../html/classirr_1_1scene_1_1_i_mesh_loader.png | Bin 0 -> 675 bytes ...rr_1_1scene_1_1_i_mesh_manipulator-members.html | 161 + .../classirr_1_1scene_1_1_i_mesh_manipulator.html | 1573 ++ .../classirr_1_1scene_1_1_i_mesh_manipulator.png | Bin 0 -> 723 bytes ...irr_1_1scene_1_1_i_mesh_scene_node-members.html | 204 + .../classirr_1_1scene_1_1_i_mesh_scene_node.html | 362 + .../classirr_1_1scene_1_1_i_mesh_scene_node.png | Bin 0 -> 1465 bytes ...lassirr_1_1scene_1_1_i_mesh_writer-members.html | 130 + .../html/classirr_1_1scene_1_1_i_mesh_writer.html | 243 + .../html/classirr_1_1scene_1_1_i_mesh_writer.png | Bin 0 -> 977 bytes ...scene_1_1_i_meta_triangle_selector-members.html | 138 + ...sirr_1_1scene_1_1_i_meta_triangle_selector.html | 228 + ...ssirr_1_1scene_1_1_i_meta_triangle_selector.png | Bin 0 -> 1057 bytes ...r_1_1scene_1_1_i_particle_affector-members.html | 135 + .../classirr_1_1scene_1_1_i_particle_affector.html | 317 + .../classirr_1_1scene_1_1_i_particle_affector.png | Bin 0 -> 2462 bytes ...e_animated_mesh_scene_node_emitter-members.html | 159 + ..._particle_animated_mesh_scene_node_emitter.html | 338 + ...i_particle_animated_mesh_scene_node_emitter.png | Bin 0 -> 1793 bytes ...1_1_i_particle_attraction_affector-members.html | 145 + ..._1scene_1_1_i_particle_attraction_affector.html | 376 + ...1_1scene_1_1_i_particle_attraction_affector.png | Bin 0 -> 1564 bytes ..._1scene_1_1_i_particle_box_emitter-members.html | 153 + ...assirr_1_1scene_1_1_i_particle_box_emitter.html | 220 + ...lassirr_1_1scene_1_1_i_particle_box_emitter.png | Bin 0 -> 1520 bytes ...ne_1_1_i_particle_cylinder_emitter-members.html | 161 + ...r_1_1scene_1_1_i_particle_cylinder_emitter.html | 376 + ...rr_1_1scene_1_1_i_particle_cylinder_emitter.png | Bin 0 -> 1550 bytes ...rr_1_1scene_1_1_i_particle_emitter-members.html | 151 + .../classirr_1_1scene_1_1_i_particle_emitter.html | 622 + .../classirr_1_1scene_1_1_i_particle_emitter.png | Bin 0 -> 3200 bytes ...e_1_1_i_particle_fade_out_affector-members.html | 139 + ..._1_1scene_1_1_i_particle_fade_out_affector.html | 259 + ...r_1_1scene_1_1_i_particle_fade_out_affector.png | Bin 0 -> 1535 bytes ...ne_1_1_i_particle_gravity_affector-members.html | 139 + ...r_1_1scene_1_1_i_particle_gravity_affector.html | 260 + ...rr_1_1scene_1_1_i_particle_gravity_affector.png | Bin 0 -> 1544 bytes ...1scene_1_1_i_particle_mesh_emitter-members.html | 159 + ...ssirr_1_1scene_1_1_i_particle_mesh_emitter.html | 337 + ...assirr_1_1scene_1_1_i_particle_mesh_emitter.png | Bin 0 -> 1531 bytes ...1scene_1_1_i_particle_ring_emitter-members.html | 157 + ...ssirr_1_1scene_1_1_i_particle_ring_emitter.html | 298 + ...assirr_1_1scene_1_1_i_particle_ring_emitter.png | Bin 0 -> 1537 bytes ...e_1_1_i_particle_rotation_affector-members.html | 139 + ..._1_1scene_1_1_i_particle_rotation_affector.html | 259 + ...r_1_1scene_1_1_i_particle_rotation_affector.png | Bin 0 -> 1539 bytes ...cene_1_1_i_particle_sphere_emitter-members.html | 155 + ...irr_1_1scene_1_1_i_particle_sphere_emitter.html | 259 + ...sirr_1_1scene_1_1_i_particle_sphere_emitter.png | Bin 0 -> 1546 bytes ...e_1_1_i_particle_system_scene_node-members.html | 220 + ..._1_1scene_1_1_i_particle_system_scene_node.html | 1441 ++ ...r_1_1scene_1_1_i_particle_system_scene_node.png | Bin 0 -> 1558 bytes ...ssirr_1_1scene_1_1_i_q3_level_mesh-members.html | 145 + .../classirr_1_1scene_1_1_i_q3_level_mesh.html | 280 + .../html/classirr_1_1scene_1_1_i_q3_level_mesh.png | Bin 0 -> 1125 bytes ...cene_1_1_i_scene_collision_manager-members.html | 135 + ...irr_1_1scene_1_1_i_scene_collision_manager.html | 612 + ...sirr_1_1scene_1_1_i_scene_collision_manager.png | Bin 0 -> 782 bytes ...assirr_1_1scene_1_1_i_scene_loader-members.html | 130 + .../html/classirr_1_1scene_1_1_i_scene_loader.html | 256 + .../html/classirr_1_1scene_1_1_i_scene_loader.png | Bin 0 -> 670 bytes ...ssirr_1_1scene_1_1_i_scene_manager-members.html | 226 + .../classirr_1_1scene_1_1_i_scene_manager.html | 4324 ++++ .../html/classirr_1_1scene_1_1_i_scene_manager.png | Bin 0 -> 708 bytes ...classirr_1_1scene_1_1_i_scene_node-members.html | 198 + .../html/classirr_1_1scene_1_1_i_scene_node.html | 2157 ++ .../html/classirr_1_1scene_1_1_i_scene_node.png | Bin 0 -> 6080 bytes ...1_1scene_1_1_i_scene_node_animator-members.html | 136 + ...lassirr_1_1scene_1_1_i_scene_node_animator.html | 325 + ...classirr_1_1scene_1_1_i_scene_node_animator.png | Bin 0 -> 2393 bytes ...i_scene_node_animator_camera_f_p_s-members.html | 145 + ...ene_1_1_i_scene_node_animator_camera_f_p_s.html | 361 + ...cene_1_1_i_scene_node_animator_camera_f_p_s.png | Bin 0 -> 1926 bytes ..._i_scene_node_animator_camera_maya-members.html | 144 + ...cene_1_1_i_scene_node_animator_camera_maya.html | 314 + ...scene_1_1_i_scene_node_animator_camera_maya.png | Bin 0 -> 1959 bytes ...e_node_animator_collision_response-members.html | 157 + ...1_i_scene_node_animator_collision_response.html | 624 + ..._1_i_scene_node_animator_collision_response.png | Bin 0 -> 1997 bytes ..._1_1_i_scene_node_animator_factory-members.html | 133 + ...1_1scene_1_1_i_scene_node_animator_factory.html | 329 + ..._1_1scene_1_1_i_scene_node_animator_factory.png | Bin 0 -> 821 bytes ..._1_1scene_1_1_i_scene_node_factory-members.html | 133 + ...classirr_1_1scene_1_1_i_scene_node_factory.html | 329 + .../classirr_1_1scene_1_1_i_scene_node_factory.png | Bin 0 -> 739 bytes ...e_1_1_i_scene_user_data_serializer-members.html | 124 + ..._1_1scene_1_1_i_scene_user_data_serializer.html | 236 + ...ene_1_1_i_shadow_volume_scene_node-members.html | 201 + ...rr_1_1scene_1_1_i_shadow_volume_scene_node.html | 235 + ...irr_1_1scene_1_1_i_shadow_volume_scene_node.png | Bin 0 -> 1531 bytes ...assirr_1_1scene_1_1_i_skinned_mesh-members.html | 161 + .../html/classirr_1_1scene_1_1_i_skinned_mesh.html | 613 + .../html/classirr_1_1scene_1_1_i_skinned_mesh.png | Bin 0 -> 1121 bytes ..._1_1scene_1_1_i_terrain_scene_node-members.html | 216 + ...classirr_1_1scene_1_1_i_terrain_scene_node.html | 793 + .../classirr_1_1scene_1_1_i_terrain_scene_node.png | Bin 0 -> 1472 bytes ...irr_1_1scene_1_1_i_text_scene_node-members.html | 201 + .../classirr_1_1scene_1_1_i_text_scene_node.html | 241 + .../classirr_1_1scene_1_1_i_text_scene_node.png | Bin 0 -> 1463 bytes ...r_1_1scene_1_1_i_triangle_selector-members.html | 135 + .../classirr_1_1scene_1_1_i_triangle_selector.html | 437 + .../classirr_1_1scene_1_1_i_triangle_selector.png | Bin 0 -> 1062 bytes ...ssirr_1_1scene_1_1_i_vertex_buffer-members.html | 143 + .../classirr_1_1scene_1_1_i_vertex_buffer.html | 484 + .../html/classirr_1_1scene_1_1_i_vertex_buffer.png | Bin 0 -> 939 bytes ...cene_1_1_i_volume_light_scene_node-members.html | 207 + ...irr_1_1scene_1_1_i_volume_light_scene_node.html | 390 + ...sirr_1_1scene_1_1_i_volume_light_scene_node.png | Bin 0 -> 1520 bytes ...ertex_color_brightness_manipulator-members.html | 122 + ..._1_1_s_vertex_color_brightness_manipulator.html | 198 + ...e_1_1_s_vertex_color_brightness_manipulator.png | Bin 0 -> 796 bytes ...or_contrast_brightness_manipulator-members.html | 122 + ...rtex_color_contrast_brightness_manipulator.html | 208 + ...ertex_color_contrast_brightness_manipulator.png | Bin 0 -> 857 bytes ..._vertex_color_contrast_manipulator-members.html | 122 + ...ne_1_1_s_vertex_color_contrast_manipulator.html | 198 + ...ene_1_1_s_vertex_color_contrast_manipulator.png | Bin 0 -> 769 bytes ..._desaturate_to_average_manipulator-members.html | 121 + ...ex_color_desaturate_to_average_manipulator.html | 177 + ...tex_color_desaturate_to_average_manipulator.png | Bin 0 -> 881 bytes ...esaturate_to_lightness_manipulator-members.html | 121 + ..._color_desaturate_to_lightness_manipulator.html | 177 + ...x_color_desaturate_to_lightness_manipulator.png | Bin 0 -> 898 bytes ...esaturate_to_luminance_manipulator-members.html | 121 + ..._color_desaturate_to_luminance_manipulator.html | 177 + ...x_color_desaturate_to_luminance_manipulator.png | Bin 0 -> 879 bytes ...1_s_vertex_color_gamma_manipulator-members.html | 122 + ...scene_1_1_s_vertex_color_gamma_manipulator.html | 198 + ...1scene_1_1_s_vertex_color_gamma_manipulator.png | Bin 0 -> 756 bytes ...lor_interpolate_linear_manipulator-members.html | 122 + ...ertex_color_interpolate_linear_manipulator.html | 208 + ...vertex_color_interpolate_linear_manipulator.png | Bin 0 -> 823 bytes ..._interpolate_quadratic_manipulator-members.html | 122 + ...ex_color_interpolate_quadratic_manipulator.html | 214 + ...tex_color_interpolate_quadratic_manipulator.png | Bin 0 -> 857 bytes ..._s_vertex_color_invert_manipulator-members.html | 121 + ...cene_1_1_s_vertex_color_invert_manipulator.html | 176 + ...scene_1_1_s_vertex_color_invert_manipulator.png | Bin 0 -> 727 bytes ...1_s_vertex_color_scale_manipulator-members.html | 122 + ...scene_1_1_s_vertex_color_scale_manipulator.html | 198 + ...1scene_1_1_s_vertex_color_scale_manipulator.png | Bin 0 -> 740 bytes ...vertex_color_set_alpha_manipulator-members.html | 122 + ...e_1_1_s_vertex_color_set_alpha_manipulator.html | 197 + ...ne_1_1_s_vertex_color_set_alpha_manipulator.png | Bin 0 -> 786 bytes ...1_1_s_vertex_color_set_manipulator-members.html | 122 + ..._1scene_1_1_s_vertex_color_set_manipulator.html | 197 + ...1_1scene_1_1_s_vertex_color_set_manipulator.png | Bin 0 -> 721 bytes ...vertex_color_threshold_manipulator-members.html | 122 + ...e_1_1_s_vertex_color_threshold_manipulator.html | 214 + ...ne_1_1_s_vertex_color_threshold_manipulator.png | Bin 0 -> 777 bytes ...on_scale_along_normals_manipulator-members.html | 122 + ...x_position_scale_along_normals_manipulator.html | 198 + ...ex_position_scale_along_normals_manipulator.png | Bin 0 -> 876 bytes ..._vertex_position_scale_manipulator-members.html | 122 + ...ne_1_1_s_vertex_position_scale_manipulator.html | 197 + ...ene_1_1_s_vertex_position_scale_manipulator.png | Bin 0 -> 772 bytes ...tex_position_transform_manipulator-members.html | 122 + ..._1_s_vertex_position_transform_manipulator.html | 199 + ...1_1_s_vertex_position_transform_manipulator.png | Bin 0 -> 805 bytes ..._vertex_t_coords_scale_manipulator-members.html | 123 + ...ne_1_1_s_vertex_t_coords_scale_manipulator.html | 229 + ...ene_1_1_s_vertex_t_coords_scale_manipulator.png | Bin 0 -> 781 bytes ...ene_1_1quake3_1_1_i_shader_manager-members.html | 127 + ...rr_1_1scene_1_1quake3_1_1_i_shader_manager.html | 148 + ...irr_1_1scene_1_1quake3_1_1_i_shader_manager.png | Bin 0 -> 653 bytes ...o_1_1_i_g_p_u_programming_services-members.html | 134 + ..._1_1video_1_1_i_g_p_u_programming_services.html | 1270 ++ .../classirr_1_1video_1_1_i_image-members.html | 151 + .../doc/html/classirr_1_1video_1_1_i_image.html | 776 + .../doc/html/classirr_1_1video_1_1_i_image.png | Bin 0 -> 633 bytes ...assirr_1_1video_1_1_i_image_loader-members.html | 130 + .../html/classirr_1_1video_1_1_i_image_loader.html | 238 + .../html/classirr_1_1video_1_1_i_image_loader.png | Bin 0 -> 680 bytes ...assirr_1_1video_1_1_i_image_writer-members.html | 129 + .../html/classirr_1_1video_1_1_i_image_writer.html | 226 + .../html/classirr_1_1video_1_1_i_image_writer.png | Bin 0 -> 553 bytes ...r_1_1video_1_1_i_material_renderer-members.html | 132 + .../classirr_1_1video_1_1_i_material_renderer.html | 317 + .../classirr_1_1video_1_1_i_material_renderer.png | Bin 0 -> 731 bytes ...o_1_1_i_material_renderer_services-members.html | 131 + ..._1_1video_1_1_i_material_renderer_services.html | 568 + ..._1_i_shader_constant_set_call_back-members.html | 129 + ...1video_1_1_i_shader_constant_set_call_back.html | 247 + ..._1video_1_1_i_shader_constant_set_call_back.png | Bin 0 -> 827 bytes .../classirr_1_1video_1_1_i_texture-members.html | 142 + .../doc/html/classirr_1_1video_1_1_i_texture.html | 516 + .../doc/html/classirr_1_1video_1_1_i_texture.png | Bin 0 -> 641 bytes ...assirr_1_1video_1_1_i_video_driver-members.html | 248 + .../html/classirr_1_1video_1_1_i_video_driver.html | 4478 ++++ .../html/classirr_1_1video_1_1_i_video_driver.png | Bin 0 -> 657 bytes ...irr_1_1video_1_1_i_video_mode_list-members.html | 133 + .../classirr_1_1video_1_1_i_video_mode_list.html | 308 + .../classirr_1_1video_1_1_i_video_mode_list.png | Bin 0 -> 689 bytes .../classirr_1_1video_1_1_s_color-members.html | 147 + .../doc/html/classirr_1_1video_1_1_s_color.html | 970 + ...lassirr_1_1video_1_1_s_color_h_s_l-members.html | 126 + .../html/classirr_1_1video_1_1_s_color_h_s_l.html | 285 + .../classirr_1_1video_1_1_s_colorf-members.html | 137 + .../doc/html/classirr_1_1video_1_1_s_colorf.html | 688 + .../classirr_1_1video_1_1_s_material-members.html | 160 + .../doc/html/classirr_1_1video_1_1_s_material.html | 1138 + ...sirr_1_1video_1_1_s_material_layer-members.html | 137 + .../classirr_1_1video_1_1_s_material_layer.html | 559 + src/others/irrlicht-1.8.1/doc/html/closed.png | Bin 0 -> 125 bytes .../irrlicht-1.8.1/doc/html/coreutil_8h.html | 156 + .../doc/html/coreutil_8h_source.html | 295 + src/others/irrlicht-1.8.1/doc/html/deprecated.html | 173 + .../irrlicht-1.8.1/doc/html/dimension2d_8h.html | 148 + .../doc/html/dimension2d_8h_source.html | 305 + src/others/irrlicht-1.8.1/doc/html/doxygen.css | 946 + src/others/irrlicht-1.8.1/doc/html/doxygen.png | Bin 0 -> 3948 bytes .../irrlicht-1.8.1/doc/html/driver_choice_8h.html | 135 + .../doc/html/driver_choice_8h_source.html | 164 + src/others/irrlicht-1.8.1/doc/html/dynsections.js | 42 + src/others/irrlicht-1.8.1/doc/html/example001.html | 232 + src/others/irrlicht-1.8.1/doc/html/example002.html | 218 + src/others/irrlicht-1.8.1/doc/html/example003.html | 264 + src/others/irrlicht-1.8.1/doc/html/example004.html | 302 + src/others/irrlicht-1.8.1/doc/html/example005.html | 329 + src/others/irrlicht-1.8.1/doc/html/example006.html | 219 + src/others/irrlicht-1.8.1/doc/html/example007.html | 384 + src/others/irrlicht-1.8.1/doc/html/example008.html | 320 + src/others/irrlicht-1.8.1/doc/html/example009.html | 1043 + src/others/irrlicht-1.8.1/doc/html/example010.html | 455 + src/others/irrlicht-1.8.1/doc/html/example011.html | 483 + src/others/irrlicht-1.8.1/doc/html/example012.html | 339 + src/others/irrlicht-1.8.1/doc/html/example013.html | 279 + src/others/irrlicht-1.8.1/doc/html/example014.html | 317 + src/others/irrlicht-1.8.1/doc/html/example015.html | 253 + src/others/irrlicht-1.8.1/doc/html/example016.html | 401 + src/others/irrlicht-1.8.1/doc/html/example017.html | 544 + src/others/irrlicht-1.8.1/doc/html/example018.html | 316 + src/others/irrlicht-1.8.1/doc/html/example019.html | 378 + src/others/irrlicht-1.8.1/doc/html/example020.html | 464 + src/others/irrlicht-1.8.1/doc/html/example021.html | 2190 ++ src/others/irrlicht-1.8.1/doc/html/example022.html | 1136 + src/others/irrlicht-1.8.1/doc/html/example023.html | 502 + src/others/irrlicht-1.8.1/doc/html/example024.html | 630 + src/others/irrlicht-1.8.1/doc/html/example025.html | 588 + src/others/irrlicht-1.8.1/doc/html/example026.html | 251 + .../irrlicht-1.8.1/doc/html/fast__atof_8h.html | 155 + .../doc/html/fast__atof_8h_source.html | 418 + src/others/irrlicht-1.8.1/doc/html/files.html | 303 + src/others/irrlicht-1.8.1/doc/html/ftv2blank.png | Bin 0 -> 82 bytes src/others/irrlicht-1.8.1/doc/html/ftv2doc.png | Bin 0 -> 761 bytes .../irrlicht-1.8.1/doc/html/ftv2folderclosed.png | Bin 0 -> 601 bytes .../irrlicht-1.8.1/doc/html/ftv2folderopen.png | Bin 0 -> 604 bytes .../irrlicht-1.8.1/doc/html/ftv2lastnode.png | Bin 0 -> 82 bytes src/others/irrlicht-1.8.1/doc/html/ftv2link.png | Bin 0 -> 761 bytes .../irrlicht-1.8.1/doc/html/ftv2mlastnode.png | Bin 0 -> 220 bytes src/others/irrlicht-1.8.1/doc/html/ftv2mnode.png | Bin 0 -> 220 bytes src/others/irrlicht-1.8.1/doc/html/ftv2node.png | Bin 0 -> 82 bytes .../irrlicht-1.8.1/doc/html/ftv2plastnode.png | Bin 0 -> 213 bytes src/others/irrlicht-1.8.1/doc/html/ftv2pnode.png | Bin 0 -> 213 bytes .../irrlicht-1.8.1/doc/html/ftv2splitbar.png | Bin 0 -> 246 bytes .../irrlicht-1.8.1/doc/html/ftv2vertline.png | Bin 0 -> 82 bytes src/others/irrlicht-1.8.1/doc/html/functions.html | 683 + .../irrlicht-1.8.1/doc/html/functions_0x62.html | 292 + .../irrlicht-1.8.1/doc/html/functions_0x63.html | 580 + .../irrlicht-1.8.1/doc/html/functions_0x64.html | 357 + .../irrlicht-1.8.1/doc/html/functions_0x65.html | 301 + .../irrlicht-1.8.1/doc/html/functions_0x66.html | 288 + .../irrlicht-1.8.1/doc/html/functions_0x67.html | 2017 ++ .../irrlicht-1.8.1/doc/html/functions_0x68.html | 218 + .../irrlicht-1.8.1/doc/html/functions_0x69.html | 643 + .../irrlicht-1.8.1/doc/html/functions_0x6a.html | 171 + .../irrlicht-1.8.1/doc/html/functions_0x6b.html | 170 + .../irrlicht-1.8.1/doc/html/functions_0x6c.html | 252 + .../irrlicht-1.8.1/doc/html/functions_0x6d.html | 296 + .../irrlicht-1.8.1/doc/html/functions_0x6e.html | 239 + .../irrlicht-1.8.1/doc/html/functions_0x6f.html | 508 + .../irrlicht-1.8.1/doc/html/functions_0x70.html | 274 + .../irrlicht-1.8.1/doc/html/functions_0x71.html | 170 + .../irrlicht-1.8.1/doc/html/functions_0x72.html | 401 + .../irrlicht-1.8.1/doc/html/functions_0x73.html | 1420 ++ .../irrlicht-1.8.1/doc/html/functions_0x74.html | 291 + .../irrlicht-1.8.1/doc/html/functions_0x75.html | 212 + .../irrlicht-1.8.1/doc/html/functions_0x76.html | 242 + .../irrlicht-1.8.1/doc/html/functions_0x77.html | 228 + .../irrlicht-1.8.1/doc/html/functions_0x78.html | 182 + .../irrlicht-1.8.1/doc/html/functions_0x79.html | 181 + .../irrlicht-1.8.1/doc/html/functions_0x7a.html | 177 + .../irrlicht-1.8.1/doc/html/functions_0x7e.html | 272 + .../irrlicht-1.8.1/doc/html/functions_enum.html | 137 + .../irrlicht-1.8.1/doc/html/functions_eval.html | 248 + .../irrlicht-1.8.1/doc/html/functions_func.html | 589 + .../doc/html/functions_func_0x62.html | 222 + .../doc/html/functions_func_0x63.html | 508 + .../doc/html/functions_func_0x64.html | 297 + .../doc/html/functions_func_0x65.html | 219 + .../doc/html/functions_func_0x66.html | 229 + .../doc/html/functions_func_0x67.html | 1997 ++ .../doc/html/functions_func_0x68.html | 186 + .../doc/html/functions_func_0x69.html | 590 + .../doc/html/functions_func_0x6a.html | 162 + .../doc/html/functions_func_0x6c.html | 206 + .../doc/html/functions_func_0x6d.html | 206 + .../doc/html/functions_func_0x6e.html | 173 + .../doc/html/functions_func_0x6f.html | 481 + .../doc/html/functions_func_0x70.html | 197 + .../doc/html/functions_func_0x71.html | 168 + .../doc/html/functions_func_0x72.html | 363 + .../doc/html/functions_func_0x73.html | 1337 ++ .../doc/html/functions_func_0x74.html | 217 + .../doc/html/functions_func_0x75.html | 188 + .../doc/html/functions_func_0x76.html | 168 + .../doc/html/functions_func_0x77.html | 196 + .../doc/html/functions_func_0x78.html | 162 + .../doc/html/functions_func_0x79.html | 162 + .../doc/html/functions_func_0x7e.html | 270 + .../irrlicht-1.8.1/doc/html/functions_rela.html | 150 + .../irrlicht-1.8.1/doc/html/functions_type.html | 134 + .../irrlicht-1.8.1/doc/html/functions_vars.html | 235 + .../doc/html/functions_vars_0x62.html | 227 + .../doc/html/functions_vars_0x63.html | 220 + .../doc/html/functions_vars_0x64.html | 217 + .../doc/html/functions_vars_0x65.html | 196 + .../doc/html/functions_vars_0x66.html | 216 + .../doc/html/functions_vars_0x67.html | 177 + .../doc/html/functions_vars_0x68.html | 189 + .../doc/html/functions_vars_0x69.html | 211 + .../doc/html/functions_vars_0x6a.html | 166 + .../doc/html/functions_vars_0x6b.html | 168 + .../doc/html/functions_vars_0x6c.html | 198 + .../doc/html/functions_vars_0x6d.html | 244 + .../doc/html/functions_vars_0x6e.html | 212 + .../doc/html/functions_vars_0x6f.html | 180 + .../doc/html/functions_vars_0x70.html | 225 + .../doc/html/functions_vars_0x72.html | 196 + .../doc/html/functions_vars_0x73.html | 244 + .../doc/html/functions_vars_0x74.html | 233 + .../doc/html/functions_vars_0x75.html | 181 + .../doc/html/functions_vars_0x76.html | 207 + .../doc/html/functions_vars_0x77.html | 189 + .../doc/html/functions_vars_0x78.html | 177 + .../doc/html/functions_vars_0x79.html | 176 + .../doc/html/functions_vars_0x7a.html | 175 + src/others/irrlicht-1.8.1/doc/html/globals.html | 495 + .../irrlicht-1.8.1/doc/html/globals_defs.html | 495 + .../irrlicht-1.8.1/doc/html/heapsort_8h.html | 140 + .../doc/html/heapsort_8h_source.html | 188 + src/others/irrlicht-1.8.1/doc/html/hierarchy.html | 445 + src/others/irrlicht-1.8.1/doc/html/index.html | 189 + src/others/irrlicht-1.8.1/doc/html/installdox | 112 + .../irrlicht-1.8.1/doc/html/irr_allocator_8h.html | 151 + .../doc/html/irr_allocator_8h_source.html | 231 + .../irrlicht-1.8.1/doc/html/irr_array_8h.html | 142 + .../doc/html/irr_array_8h_source.html | 643 + .../irrlicht-1.8.1/doc/html/irr_list_8h.html | 144 + .../doc/html/irr_list_8h_source.html | 503 + src/others/irrlicht-1.8.1/doc/html/irr_map_8h.html | 146 + .../irrlicht-1.8.1/doc/html/irr_map_8h_source.html | 1188 ++ .../irrlicht-1.8.1/doc/html/irr_math_8h.html | 614 + .../doc/html/irr_math_8h_source.html | 802 + .../irrlicht-1.8.1/doc/html/irr_string_8h.html | 159 + .../doc/html/irr_string_8h_source.html | 1340 ++ .../irrlicht-1.8.1/doc/html/irr_types_8h.html | 286 + .../doc/html/irr_types_8h_source.html | 334 + .../irrlicht-1.8.1/doc/html/irr_x_m_l_8h.html | 218 + .../doc/html/irr_x_m_l_8h_source.html | 318 + src/others/irrlicht-1.8.1/doc/html/irrlicht.png | Bin 0 -> 2433 bytes .../irrlicht-1.8.1/doc/html/irrlicht_8h.html | 322 + .../doc/html/irrlicht_8h_source.html | 367 + .../irrlicht-1.8.1/doc/html/irrlichtlogo.png | Bin 0 -> 12792 bytes src/others/irrlicht-1.8.1/doc/html/irrpack_8h.html | 122 + .../irrlicht-1.8.1/doc/html/irrpack_8h_source.html | 159 + .../irrlicht-1.8.1/doc/html/irrunpack_8h.html | 122 + .../doc/html/irrunpack_8h_source.html | 140 + src/others/irrlicht-1.8.1/doc/html/jquery.js | 54 + src/others/irrlicht-1.8.1/doc/html/line2d_8h.html | 147 + .../irrlicht-1.8.1/doc/html/line2d_8h_source.html | 363 + src/others/irrlicht-1.8.1/doc/html/line3d_8h.html | 147 + .../irrlicht-1.8.1/doc/html/line3d_8h_source.html | 237 + src/others/irrlicht-1.8.1/doc/html/logobig.png | Bin 0 -> 7186 bytes src/others/irrlicht-1.8.1/doc/html/matrix4_8h.html | 163 + .../irrlicht-1.8.1/doc/html/matrix4_8h_source.html | 2179 ++ .../irrlicht-1.8.1/doc/html/namespaceirr.html | 1419 ++ .../doc/html/namespaceirr_1_1core.html | 3476 ++++ .../doc/html/namespaceirr_1_1gui.html | 1889 ++ .../doc/html/namespaceirr_1_1io.html | 1082 + .../doc/html/namespaceirr_1_1scene.html | 2210 ++ .../doc/html/namespaceirr_1_1scene_1_1quake3.html | 810 + .../doc/html/namespaceirr_1_1video.html | 2635 +++ .../irrlicht-1.8.1/doc/html/namespacemembers.html | 200 + .../doc/html/namespacemembers_0x62.html | 167 + .../doc/html/namespacemembers_0x63.html | 218 + .../doc/html/namespacemembers_0x64.html | 209 + .../doc/html/namespacemembers_0x65.html | 2707 +++ .../doc/html/namespacemembers_0x66.html | 206 + .../doc/html/namespacemembers_0x67.html | 239 + .../doc/html/namespacemembers_0x68.html | 167 + .../doc/html/namespacemembers_0x69.html | 251 + .../doc/html/namespacemembers_0x6b.html | 617 + .../doc/html/namespacemembers_0x6c.html | 185 + .../doc/html/namespacemembers_0x6d.html | 176 + .../doc/html/namespacemembers_0x6e.html | 161 + .../doc/html/namespacemembers_0x6f.html | 167 + .../doc/html/namespacemembers_0x70.html | 194 + .../doc/html/namespacemembers_0x72.html | 224 + .../doc/html/namespacemembers_0x73.html | 245 + .../doc/html/namespacemembers_0x74.html | 191 + .../doc/html/namespacemembers_0x75.html | 173 + .../doc/html/namespacemembers_0x76.html | 173 + .../doc/html/namespacemembers_0x77.html | 161 + .../doc/html/namespacemembers_0x78.html | 158 + .../doc/html/namespacemembers_enum.html | 407 + .../doc/html/namespacemembers_eval.html | 168 + .../doc/html/namespacemembers_eval_0x62.html | 153 + .../doc/html/namespacemembers_eval_0x63.html | 156 + .../doc/html/namespacemembers_eval_0x64.html | 156 + .../doc/html/namespacemembers_eval_0x65.html | 2423 +++ .../doc/html/namespacemembers_eval_0x66.html | 159 + .../doc/html/namespacemembers_eval_0x69.html | 177 + .../doc/html/namespacemembers_eval_0x6b.html | 612 + .../doc/html/namespacemembers_eval_0x6c.html | 156 + .../doc/html/namespacemembers_eval_0x6d.html | 156 + .../doc/html/namespacemembers_eval_0x6e.html | 156 + .../doc/html/namespacemembers_eval_0x72.html | 156 + .../doc/html/namespacemembers_eval_0x73.html | 171 + .../doc/html/namespacemembers_eval_0x74.html | 168 + .../doc/html/namespacemembers_eval_0x75.html | 153 + .../doc/html/namespacemembers_eval_0x76.html | 153 + .../doc/html/namespacemembers_eval_0x77.html | 156 + .../doc/html/namespacemembers_func.html | 493 + .../doc/html/namespacemembers_type.html | 362 + .../doc/html/namespacemembers_vars.html | 384 + src/others/irrlicht-1.8.1/doc/html/namespaces.html | 128 + src/others/irrlicht-1.8.1/doc/html/nav_f.png | Bin 0 -> 156 bytes src/others/irrlicht-1.8.1/doc/html/nav_h.png | Bin 0 -> 96 bytes src/others/irrlicht-1.8.1/doc/html/navtree.css | 123 + src/others/irrlicht-1.8.1/doc/html/navtree.js | 957 + src/others/irrlicht-1.8.1/doc/html/open.png | Bin 0 -> 117 bytes src/others/irrlicht-1.8.1/doc/html/pages.html | 175 + src/others/irrlicht-1.8.1/doc/html/path_8h.html | 145 + .../irrlicht-1.8.1/doc/html/path_8h_source.html | 195 + src/others/irrlicht-1.8.1/doc/html/plane3d_8h.html | 161 + .../irrlicht-1.8.1/doc/html/plane3d_8h_source.html | 318 + .../irrlicht-1.8.1/doc/html/position2d_8h.html | 162 + .../doc/html/position2d_8h_source.html | 148 + .../irrlicht-1.8.1/doc/html/quaternion_8h.html | 164 + .../doc/html/quaternion_8h_source.html | 730 + src/others/irrlicht-1.8.1/doc/html/rect_8h.html | 148 + .../irrlicht-1.8.1/doc/html/rect_8h_source.html | 356 + src/others/irrlicht-1.8.1/doc/html/resize.js | 81 + .../irrlicht-1.8.1/doc/html/search/all_5f.html | 500 + .../irrlicht-1.8.1/doc/html/search/all_61.html | 1364 ++ .../irrlicht-1.8.1/doc/html/search/all_62.html | 310 + .../irrlicht-1.8.1/doc/html/search/all_63.html | 1097 + .../irrlicht-1.8.1/doc/html/search/all_64.html | 570 + .../irrlicht-1.8.1/doc/html/search/all_65.html | 5499 +++++ .../irrlicht-1.8.1/doc/html/search/all_66.html | 485 + .../irrlicht-1.8.1/doc/html/search/all_67.html | 3961 ++++ .../irrlicht-1.8.1/doc/html/search/all_68.html | 163 + .../irrlicht-1.8.1/doc/html/search/all_69.html | 2783 +++ .../irrlicht-1.8.1/doc/html/search/all_6a.html | 41 + .../irrlicht-1.8.1/doc/html/search/all_6b.html | 967 + .../irrlicht-1.8.1/doc/html/search/all_6c.html | 328 + .../irrlicht-1.8.1/doc/html/search/all_6d.html | 360 + .../irrlicht-1.8.1/doc/html/search/all_6e.html | 173 + .../irrlicht-1.8.1/doc/html/search/all_6f.html | 632 + .../irrlicht-1.8.1/doc/html/search/all_70.html | 369 + .../irrlicht-1.8.1/doc/html/search/all_71.html | 61 + .../irrlicht-1.8.1/doc/html/search/all_72.html | 693 + .../irrlicht-1.8.1/doc/html/search/all_73.html | 3423 +++ .../irrlicht-1.8.1/doc/html/search/all_74.html | 365 + .../irrlicht-1.8.1/doc/html/search/all_75.html | 161 + .../irrlicht-1.8.1/doc/html/search/all_76.html | 262 + .../irrlicht-1.8.1/doc/html/search/all_77.html | 170 + .../irrlicht-1.8.1/doc/html/search/all_78.html | 76 + .../irrlicht-1.8.1/doc/html/search/all_79.html | 50 + .../irrlicht-1.8.1/doc/html/search/all_7a.html | 48 + .../irrlicht-1.8.1/doc/html/search/all_7e.html | 242 + .../irrlicht-1.8.1/doc/html/search/classes_61.html | 170 + .../irrlicht-1.8.1/doc/html/search/classes_63.html | 62 + .../irrlicht-1.8.1/doc/html/search/classes_64.html | 32 + .../irrlicht-1.8.1/doc/html/search/classes_66.html | 26 + .../irrlicht-1.8.1/doc/html/search/classes_69.html | 920 + .../irrlicht-1.8.1/doc/html/search/classes_6c.html | 56 + .../irrlicht-1.8.1/doc/html/search/classes_6d.html | 26 + .../irrlicht-1.8.1/doc/html/search/classes_6e.html | 26 + .../irrlicht-1.8.1/doc/html/search/classes_70.html | 44 + .../irrlicht-1.8.1/doc/html/search/classes_71.html | 32 + .../irrlicht-1.8.1/doc/html/search/classes_72.html | 44 + .../irrlicht-1.8.1/doc/html/search/classes_73.html | 452 + .../irrlicht-1.8.1/doc/html/search/classes_74.html | 26 + .../irrlicht-1.8.1/doc/html/search/classes_76.html | 44 + .../irrlicht-1.8.1/doc/html/search/classes_78.html | 26 + .../irrlicht-1.8.1/doc/html/search/close.png | Bin 0 -> 273 bytes .../irrlicht-1.8.1/doc/html/search/defines_5f.html | 500 + .../irrlicht-1.8.1/doc/html/search/defines_61.html | 26 + .../irrlicht-1.8.1/doc/html/search/defines_62.html | 26 + .../irrlicht-1.8.1/doc/html/search/defines_66.html | 116 + .../irrlicht-1.8.1/doc/html/search/defines_69.html | 74 + .../irrlicht-1.8.1/doc/html/search/defines_6d.html | 26 + .../irrlicht-1.8.1/doc/html/search/defines_70.html | 26 + .../irrlicht-1.8.1/doc/html/search/defines_72.html | 26 + .../irrlicht-1.8.1/doc/html/search/enums_65.html | 578 + .../irrlicht-1.8.1/doc/html/search/enums_76.html | 26 + .../doc/html/search/enumvalues_61.html | 92 + .../doc/html/search/enumvalues_62.html | 26 + .../doc/html/search/enumvalues_63.html | 32 + .../doc/html/search/enumvalues_64.html | 32 + .../doc/html/search/enumvalues_65.html | 4646 +++++ .../doc/html/search/enumvalues_66.html | 38 + .../doc/html/search/enumvalues_69.html | 74 + .../doc/html/search/enumvalues_6b.html | 944 + .../doc/html/search/enumvalues_6c.html | 32 + .../doc/html/search/enumvalues_6d.html | 32 + .../doc/html/search/enumvalues_6e.html | 44 + .../doc/html/search/enumvalues_70.html | 38 + .../doc/html/search/enumvalues_72.html | 32 + .../doc/html/search/enumvalues_73.html | 62 + .../doc/html/search/enumvalues_74.html | 56 + .../doc/html/search/enumvalues_75.html | 26 + .../doc/html/search/enumvalues_76.html | 68 + .../doc/html/search/enumvalues_77.html | 32 + .../irrlicht-1.8.1/doc/html/search/files_61.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_63.html | 45 + .../irrlicht-1.8.1/doc/html/search/files_64.html | 30 + .../irrlicht-1.8.1/doc/html/search/files_65.html | 110 + .../irrlicht-1.8.1/doc/html/search/files_66.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_68.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_69.html | 630 + .../irrlicht-1.8.1/doc/html/search/files_6b.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_6c.html | 30 + .../irrlicht-1.8.1/doc/html/search/files_6d.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_70.html | 35 + .../irrlicht-1.8.1/doc/html/search/files_71.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_72.html | 25 + .../irrlicht-1.8.1/doc/html/search/files_73.html | 120 + .../irrlicht-1.8.1/doc/html/search/files_74.html | 30 + .../irrlicht-1.8.1/doc/html/search/files_76.html | 30 + .../doc/html/search/functions_61.html | 957 + .../doc/html/search/functions_62.html | 153 + .../doc/html/search/functions_63.html | 850 + .../doc/html/search/functions_64.html | 352 + .../doc/html/search/functions_65.html | 157 + .../doc/html/search/functions_66.html | 206 + .../doc/html/search/functions_67.html | 3847 ++++ .../doc/html/search/functions_68.html | 92 + .../doc/html/search/functions_69.html | 979 + .../doc/html/search/functions_6a.html | 26 + .../doc/html/search/functions_6c.html | 141 + .../doc/html/search/functions_6d.html | 142 + .../doc/html/search/functions_6e.html | 48 + .../doc/html/search/functions_6f.html | 572 + .../doc/html/search/functions_70.html | 109 + .../doc/html/search/functions_71.html | 44 + .../doc/html/search/functions_72.html | 519 + .../doc/html/search/functions_73.html | 2628 +++ .../doc/html/search/functions_74.html | 154 + .../doc/html/search/functions_75.html | 86 + .../doc/html/search/functions_76.html | 49 + .../doc/html/search/functions_77.html | 101 + .../doc/html/search/functions_78.html | 40 + .../doc/html/search/functions_79.html | 26 + .../doc/html/search/functions_7e.html | 242 + .../irrlicht-1.8.1/doc/html/search/mag_sel.png | Bin 0 -> 563 bytes .../doc/html/search/namespaces_69.html | 61 + .../irrlicht-1.8.1/doc/html/search/nomatches.html | 12 + .../irrlicht-1.8.1/doc/html/search/related_63.html | 38 + .../irrlicht-1.8.1/doc/html/search/related_69.html | 29 + .../irrlicht-1.8.1/doc/html/search/related_6c.html | 29 + .../irrlicht-1.8.1/doc/html/search/related_6d.html | 26 + .../irrlicht-1.8.1/doc/html/search/related_73.html | 26 + .../irrlicht-1.8.1/doc/html/search/search.css | 233 + .../irrlicht-1.8.1/doc/html/search/search.js | 746 + .../irrlicht-1.8.1/doc/html/search/search_l.png | Bin 0 -> 604 bytes .../irrlicht-1.8.1/doc/html/search/search_m.png | Bin 0 -> 158 bytes .../irrlicht-1.8.1/doc/html/search/search_r.png | Bin 0 -> 612 bytes .../doc/html/search/typedefs_61.html | 32 + .../doc/html/search/typedefs_63.html | 44 + .../doc/html/search/typedefs_64.html | 38 + .../doc/html/search/typedefs_66.html | 50 + .../doc/html/search/typedefs_69.html | 74 + .../doc/html/search/typedefs_6c.html | 44 + .../doc/html/search/typedefs_6d.html | 26 + .../doc/html/search/typedefs_6e.html | 26 + .../doc/html/search/typedefs_70.html | 50 + .../doc/html/search/typedefs_72.html | 32 + .../doc/html/search/typedefs_73.html | 74 + .../doc/html/search/typedefs_74.html | 50 + .../doc/html/search/typedefs_75.html | 44 + .../doc/html/search/typedefs_76.html | 44 + .../doc/html/search/variables_61.html | 185 + .../doc/html/search/variables_62.html | 168 + .../doc/html/search/variables_63.html | 153 + .../doc/html/search/variables_64.html | 191 + .../doc/html/search/variables_65.html | 98 + .../doc/html/search/variables_66.html | 144 + .../doc/html/search/variables_67.html | 134 + .../doc/html/search/variables_68.html | 86 + .../doc/html/search/variables_69.html | 141 + .../doc/html/search/variables_6a.html | 35 + .../doc/html/search/variables_6b.html | 38 + .../doc/html/search/variables_6c.html | 116 + .../doc/html/search/variables_6d.html | 203 + .../doc/html/search/variables_6e.html | 114 + .../doc/html/search/variables_6f.html | 80 + .../doc/html/search/variables_70.html | 187 + .../doc/html/search/variables_72.html | 143 + .../doc/html/search/variables_73.html | 206 + .../doc/html/search/variables_74.html | 160 + .../doc/html/search/variables_75.html | 65 + .../doc/html/search/variables_76.html | 121 + .../doc/html/search/variables_77.html | 80 + .../doc/html/search/variables_78.html | 50 + .../doc/html/search/variables_79.html | 44 + .../doc/html/search/variables_7a.html | 48 + ...irr_1_1_i_timer_1_1_real_time_date-members.html | 129 + .../structirr_1_1_i_timer_1_1_real_time_date.html | 283 + .../doc/html/structirr_1_1_s_event-members.html | 127 + .../doc/html/structirr_1_1_s_event.html | 282 + ...tirr_1_1_s_event_1_1_s_g_u_i_event-members.html | 123 + .../structirr_1_1_s_event_1_1_s_g_u_i_event.html | 197 + ...r_1_1_s_event_1_1_s_joystick_event-members.html | 133 + ...structirr_1_1_s_event_1_1_s_joystick_event.html | 299 + ...uctirr_1_1_s_event_1_1_s_key_input-members.html | 125 + .../structirr_1_1_s_event_1_1_s_key_input.html | 233 + ...uctirr_1_1_s_event_1_1_s_log_event-members.html | 122 + .../structirr_1_1_s_event_1_1_s_log_event.html | 179 + ...tirr_1_1_s_event_1_1_s_mouse_input-members.html | 130 + .../structirr_1_1_s_event_1_1_s_mouse_input.html | 346 + ...ctirr_1_1_s_event_1_1_s_user_event-members.html | 122 + .../structirr_1_1_s_event_1_1_s_user_event.html | 179 + ...1_1_s_irrlicht_creation_parameters-members.html | 145 + ...ructirr_1_1_s_irrlicht_creation_parameters.html | 700 + .../structirr_1_1_s_joystick_info-members.html | 128 + .../doc/html/structirr_1_1_s_joystick_info.html | 274 + .../doc/html/structirr_1_1_s_key_map-members.html | 124 + .../doc/html/structirr_1_1_s_key_map.html | 229 + ...ructirr_1_1gui_1_1_s_cursor_sprite-members.html | 125 + .../html/structirr_1_1gui_1_1_s_cursor_sprite.html | 252 + ...tructirr_1_1gui_1_1_s_g_u_i_sprite-members.html | 123 + .../html/structirr_1_1gui_1_1_s_g_u_i_sprite.html | 200 + ...rr_1_1gui_1_1_s_g_u_i_sprite_frame-members.html | 122 + .../structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html | 175 + ...1_1_s_attribute_read_write_options-members.html | 123 + ...r_1_1io_1_1_s_attribute_read_write_options.html | 206 + .../structirr_1_1io_1_1_s_named_path-members.html | 129 + .../doc/html/structirr_1_1io_1_1_s_named_path.html | 354 + .../html/structirr_1_1io_1_1xml_char-members.html | 130 + .../doc/html/structirr_1_1io_1_1xml_char.html | 369 + ...ene_1_1_i_skinned_mesh_1_1_s_joint-members.html | 137 + ...rr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html | 451 + ..._i_skinned_mesh_1_1_s_position_key-members.html | 122 + ...cene_1_1_i_skinned_mesh_1_1_s_position_key.html | 176 + ..._i_skinned_mesh_1_1_s_rotation_key-members.html | 122 + ...cene_1_1_i_skinned_mesh_1_1_s_rotation_key.html | 176 + ...1_1_i_skinned_mesh_1_1_s_scale_key-members.html | 122 + ..._1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html | 176 + ...ne_1_1_i_skinned_mesh_1_1_s_weight-members.html | 124 + ...r_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html | 222 + ...tructirr_1_1scene_1_1_i_vertex_manipulator.html | 163 + ...structirr_1_1scene_1_1_i_vertex_manipulator.png | Bin 0 -> 9514 bytes ...ctirr_1_1scene_1_1_s_animated_mesh-members.html | 148 + .../structirr_1_1scene_1_1_s_animated_mesh.html | 753 + .../structirr_1_1scene_1_1_s_animated_mesh.png | Bin 0 -> 1152 bytes ...1_1scene_1_1_s_m_d3_animation_info-members.html | 124 + ...ructirr_1_1scene_1_1_s_m_d3_animation_info.html | 211 + ...structirr_1_1scene_1_1_s_m_d3_face-members.html | 121 + .../html/structirr_1_1scene_1_1_s_m_d3_face.html | 159 + ...ructirr_1_1scene_1_1_s_m_d3_header-members.html | 131 + .../html/structirr_1_1scene_1_1_s_m_d3_header.html | 321 + ...structirr_1_1scene_1_1_s_m_d3_mesh-members.html | 133 + .../html/structirr_1_1scene_1_1_s_m_d3_mesh.html | 270 + .../html/structirr_1_1scene_1_1_s_m_d3_mesh.png | Bin 0 -> 545 bytes ...rr_1_1scene_1_1_s_m_d3_mesh_buffer-members.html | 132 + .../structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html | 234 + .../structirr_1_1scene_1_1_s_m_d3_mesh_buffer.png | Bin 0 -> 605 bytes ...rr_1_1scene_1_1_s_m_d3_mesh_header-members.html | 131 + .../structirr_1_1scene_1_1_s_m_d3_mesh_header.html | 319 + ...1_1scene_1_1_s_m_d3_quaternion_tag-members.html | 130 + ...ructirr_1_1scene_1_1_s_m_d3_quaternion_tag.html | 362 + ...ene_1_1_s_m_d3_quaternion_tag_list-members.html | 130 + ...rr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html | 351 + ...tirr_1_1scene_1_1_s_m_d3_tex_coord-members.html | 122 + .../structirr_1_1scene_1_1_s_m_d3_tex_coord.html | 175 + ...ructirr_1_1scene_1_1_s_m_d3_vertex-members.html | 122 + .../html/structirr_1_1scene_1_1_s_m_d3_vertex.html | 175 + .../structirr_1_1scene_1_1_s_mesh-members.html | 142 + .../doc/html/structirr_1_1scene_1_1_s_mesh.html | 547 + .../doc/html/structirr_1_1scene_1_1_s_mesh.png | Bin 0 -> 818 bytes .../structirr_1_1scene_1_1_s_particle-members.html | 129 + .../html/structirr_1_1scene_1_1_s_particle.html | 309 + ..._1_1scene_1_1_s_shared_mesh_buffer-members.html | 164 + ...tructirr_1_1scene_1_1_s_shared_mesh_buffer.html | 1084 + ...structirr_1_1scene_1_1_s_shared_mesh_buffer.png | Bin 0 -> 1001 bytes ...rr_1_1scene_1_1_s_skin_mesh_buffer-members.html | 172 + .../structirr_1_1scene_1_1_s_skin_mesh_buffer.html | 1232 ++ .../structirr_1_1scene_1_1_s_skin_mesh_buffer.png | Bin 0 -> 969 bytes ...uctirr_1_1scene_1_1_s_view_frustum-members.html | 149 + .../structirr_1_1scene_1_1_s_view_frustum.html | 710 + ...rr_1_1scene_1_1quake3_1_1_i_shader-members.html | 130 + .../structirr_1_1scene_1_1quake3_1_1_i_shader.html | 352 + ...tirr_1_1scene_1_1quake3_1_1_noiser-members.html | 121 + .../structirr_1_1scene_1_1quake3_1_1_noiser.html | 161 + ...quake3_1_1_q3_level_load_parameter-members.html | 136 + ...cene_1_1quake3_1_1_q3_level_load_parameter.html | 410 + ..._1scene_1_1quake3_1_1_s_blend_func-members.html | 125 + ...uctirr_1_1scene_1_1quake3_1_1_s_blend_func.html | 234 + ..._1_1quake3_1_1_s_modifier_function-members.html | 141 + ...1_1scene_1_1quake3_1_1_s_modifier_function.html | 574 + ...1_1scene_1_1quake3_1_1_s_var_group-members.html | 126 + ...ructirr_1_1scene_1_1quake3_1_1_s_var_group.html | 293 + ...ene_1_1quake3_1_1_s_var_group_list-members.html | 130 + ...rr_1_1scene_1_1quake3_1_1_s_var_group_list.html | 219 + ...irr_1_1scene_1_1quake3_1_1_s_var_group_list.png | Bin 0 -> 654 bytes ..._1_1scene_1_1quake3_1_1_s_variable-members.html | 128 + ...tructirr_1_1scene_1_1quake3_1_1_s_variable.html | 318 + ...ctirr_1_1video_1_1_i_render_target-members.html | 129 + .../structirr_1_1video_1_1_i_render_target.html | 372 + ...structirr_1_1video_1_1_s3_d_vertex-members.html | 132 + .../html/structirr_1_1video_1_1_s3_d_vertex.html | 504 + .../html/structirr_1_1video_1_1_s3_d_vertex.png | Bin 0 -> 825 bytes ...1_1video_1_1_s3_d_vertex2_t_coords-members.html | 145 + ...ructirr_1_1video_1_1_s3_d_vertex2_t_coords.html | 718 + ...tructirr_1_1video_1_1_s3_d_vertex2_t_coords.png | Bin 0 -> 593 bytes ..._1_1video_1_1_s3_d_vertex_tangents-members.html | 142 + ...tructirr_1_1video_1_1_s3_d_vertex_tangents.html | 550 + ...structirr_1_1video_1_1_s3_d_vertex_tangents.png | Bin 0 -> 605 bytes ..._1_1video_1_1_s_exposed_video_data-members.html | 136 + ...tructirr_1_1video_1_1_s_exposed_video_data.html | 461 + .../structirr_1_1video_1_1_s_light-members.html | 133 + .../doc/html/structirr_1_1video_1_1_s_light.html | 390 + ...r_1_1video_1_1_s_override_material-members.html | 126 + ...structirr_1_1video_1_1_s_override_material.html | 272 + src/others/irrlicht-1.8.1/doc/html/tab_a.png | Bin 0 -> 139 bytes src/others/irrlicht-1.8.1/doc/html/tab_b.png | Bin 0 -> 177 bytes src/others/irrlicht-1.8.1/doc/html/tab_h.png | Bin 0 -> 190 bytes src/others/irrlicht-1.8.1/doc/html/tab_s.png | Bin 0 -> 195 bytes src/others/irrlicht-1.8.1/doc/html/tabs.css | 59 + .../irrlicht-1.8.1/doc/html/triangle3d_8h.html | 149 + .../doc/html/triangle3d_8h_source.html | 353 + src/others/irrlicht-1.8.1/doc/html/tut_8txt.html | 120 + ...nirr_1_1core_1_1_float_int_union32-members.html | 124 + .../unionirr_1_1core_1_1_float_int_union32.html | 223 + .../unionirr_1_1core_1_1inttofloat-members.html | 123 + .../doc/html/unionirr_1_1core_1_1inttofloat.html | 193 + src/others/irrlicht-1.8.1/doc/html/vc6include.jpg | Bin 0 -> 10722 bytes .../irrlicht-1.8.1/doc/html/vc6optionsdir.jpg | Bin 0 -> 12147 bytes .../irrlicht-1.8.1/doc/html/vcnetinclude.jpg | Bin 0 -> 12479 bytes .../irrlicht-1.8.1/doc/html/vector2d_8h.html | 153 + .../doc/html/vector2d_8h_source.html | 404 + .../irrlicht-1.8.1/doc/html/vector3d_8h.html | 152 + .../doc/html/vector3d_8h_source.html | 492 + src/others/irrlicht-1.8.1/doc/irrlicht-license.txt | 26 + src/others/irrlicht-1.8.1/doc/jpglib-license.txt | 351 + src/others/irrlicht-1.8.1/doc/libpng-license.txt | 111 + src/others/irrlicht-1.8.1/doc/readme.txt | 2 + src/others/irrlicht-1.8.1/doc/upgrade-guide.txt | 2891 +++ .../examples/01.HelloWorld/HelloWorld.cbp | 55 + .../examples/01.HelloWorld/HelloWorld.dev | 59 + .../examples/01.HelloWorld/HelloWorld.vcproj | 163 + .../examples/01.HelloWorld/HelloWorld_vc10.vcxproj | 231 + .../examples/01.HelloWorld/HelloWorld_vc11.vcxproj | 235 + .../examples/01.HelloWorld/HelloWorld_vc8.vcproj | 231 + .../examples/01.HelloWorld/HelloWorld_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/01.HelloWorld/Makefile | 66 + .../irrlicht-1.8.1/examples/01.HelloWorld/main.cpp | 236 + .../examples/01.HelloWorld/tutorial.html | 394 + .../irrlicht-1.8.1/examples/02.Quake3Map/Makefile | 40 + .../examples/02.Quake3Map/Quake3Map.cbp | 55 + .../examples/02.Quake3Map/Quake3Map.dev | 59 + .../examples/02.Quake3Map/Quake3Map.vcproj | 162 + .../examples/02.Quake3Map/Quake3Map_vc10.vcxproj | 231 + .../examples/02.Quake3Map/Quake3Map_vc11.vcxproj | 235 + .../examples/02.Quake3Map/Quake3Map_vc8.vcproj | 231 + .../examples/02.Quake3Map/Quake3Map_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/02.Quake3Map/main.cpp | 206 + .../examples/02.Quake3Map/tutorial.html | 181 + .../03.CustomSceneNode/CustomSceneNode.cbp | 58 + .../03.CustomSceneNode/CustomSceneNode.dev | 59 + .../03.CustomSceneNode/CustomSceneNode.vcproj | 163 + .../CustomSceneNode_vc10.vcxproj | 243 + .../CustomSceneNode_vc11.vcxproj | 247 + .../03.CustomSceneNode/CustomSceneNode_vc8.vcproj | 231 + .../03.CustomSceneNode/CustomSceneNode_vc9.vcproj | 230 + .../examples/03.CustomSceneNode/Makefile | 38 + .../examples/03.CustomSceneNode/main.cpp | 267 + .../examples/03.CustomSceneNode/tutorial.html | 222 + .../irrlicht-1.8.1/examples/04.Movement/Makefile | 39 + .../examples/04.Movement/Movement.cbp | 55 + .../examples/04.Movement/Movement.dev | 59 + .../examples/04.Movement/Movement.vcproj | 163 + .../examples/04.Movement/Movement_vc10.vcxproj | 231 + .../examples/04.Movement/Movement_vc11.vcxproj | 235 + .../examples/04.Movement/Movement_vc8.vcproj | 231 + .../examples/04.Movement/Movement_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/04.Movement/main.cpp | 258 + .../examples/04.Movement/tutorial.html | 188 + .../examples/05.UserInterface/Makefile | 38 + .../examples/05.UserInterface/UserInterface.cbp | 55 + .../examples/05.UserInterface/UserInterface.dev | 59 + .../examples/05.UserInterface/UserInterface.vcproj | 163 + .../05.UserInterface/UserInterface_vc10.vcxproj | 231 + .../05.UserInterface/UserInterface_vc11.vcxproj | 235 + .../05.UserInterface/UserInterface_vc8.vcproj | 231 + .../05.UserInterface/UserInterface_vc9.vcproj | 230 + .../examples/05.UserInterface/main.cpp | 291 + .../examples/05.UserInterface/tutorial.html | 225 + .../examples/06.2DGraphics/2DGraphics.cbp | 55 + .../examples/06.2DGraphics/2DGraphics.dev | 59 + .../examples/06.2DGraphics/2DGraphics.vcproj | 163 + .../examples/06.2DGraphics/2DGraphics_vc10.vcxproj | 231 + .../examples/06.2DGraphics/2DGraphics_vc11.vcxproj | 235 + .../examples/06.2DGraphics/2DGraphics_vc8.vcproj | 231 + .../examples/06.2DGraphics/2DGraphics_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/06.2DGraphics/Makefile | 38 + .../irrlicht-1.8.1/examples/06.2DGraphics/main.cpp | 166 + .../examples/06.2DGraphics/tutorial.html | 163 + .../examples/07.Collision/Collision.cbp | 55 + .../examples/07.Collision/Collision.dev | 59 + .../examples/07.Collision/Collision.vcproj | 163 + .../examples/07.Collision/Collision_vc10.vcxproj | 231 + .../examples/07.Collision/Collision_vc11.vcxproj | 235 + .../examples/07.Collision/Collision_vc8.vcproj | 231 + .../examples/07.Collision/Collision_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/07.Collision/Makefile | 38 + .../irrlicht-1.8.1/examples/07.Collision/main.cpp | 330 + .../examples/07.Collision/tutorial.html | 308 + .../irrlicht-1.8.1/examples/08.SpecialFX/Makefile | 38 + .../examples/08.SpecialFX/SpecialFX.cbp | 54 + .../examples/08.SpecialFX/SpecialFX.dev | 59 + .../examples/08.SpecialFX/SpecialFX.vcproj | 163 + .../examples/08.SpecialFX/SpecialFX_vc10.vcxproj | 231 + .../examples/08.SpecialFX/SpecialFX_vc11.vcxproj | 235 + .../examples/08.SpecialFX/SpecialFX_vc8.vcproj | 231 + .../examples/08.SpecialFX/SpecialFX_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/08.SpecialFX/main.cpp | 308 + .../examples/08.SpecialFX/tutorial.html | 278 + .../examples/09.Meshviewer/9.Meshviewer.rc | 84 + .../irrlicht-1.8.1/examples/09.Meshviewer/Makefile | 38 + .../examples/09.Meshviewer/MeshViewer.dev | 59 + .../examples/09.Meshviewer/Meshviewer.cbp | 55 + .../examples/09.Meshviewer/Meshviewer.vcproj | 163 + .../examples/09.Meshviewer/Meshviewer_vc10.vcxproj | 231 + .../examples/09.Meshviewer/Meshviewer_vc11.vcxproj | 235 + .../examples/09.Meshviewer/Meshviewer_vc8.vcproj | 231 + .../examples/09.Meshviewer/Meshviewer_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/09.Meshviewer/icon.ico | Bin 0 -> 2238 bytes .../irrlicht-1.8.1/examples/09.Meshviewer/main.cpp | 1042 + .../examples/09.Meshviewer/resource.h | 16 + .../examples/09.Meshviewer/tutorial.html | 182 + .../irrlicht-1.8.1/examples/10.Shaders/Makefile | 38 + .../irrlicht-1.8.1/examples/10.Shaders/Shaders.cbp | 56 + .../irrlicht-1.8.1/examples/10.Shaders/Shaders.dev | 59 + .../examples/10.Shaders/Shaders.vcproj | 163 + .../examples/10.Shaders/Shaders_vc10.vcxproj | 231 + .../examples/10.Shaders/Shaders_vc11.vcxproj | 235 + .../examples/10.Shaders/Shaders_vc8.vcproj | 231 + .../examples/10.Shaders/Shaders_vc9.vcproj | 230 + .../irrlicht-1.8.1/examples/10.Shaders/main.cpp | 443 + .../examples/10.Shaders/tutorial.html | 566 + .../examples/11.PerPixelLighting/Makefile | 38 + .../11.PerPixelLighting/PerPixelLighting.cbp | 56 + .../11.PerPixelLighting/PerPixelLighting.dev | 59 + .../11.PerPixelLighting/PerPixelLighting.vcproj | 163 + .../PerPixelLighting_vc10.vcxproj | 231 + .../PerPixelLighting_vc11.vcxproj | 235 + .../PerPixelLighting_vc8.vcproj | 231 + .../PerPixelLighting_vc9.vcproj | 230 + .../examples/11.PerPixelLighting/main.cpp | 487 + .../examples/11.PerPixelLighting/tutorial.html | 502 + .../examples/12.TerrainRendering/Makefile | 38 + .../12.TerrainRendering/TerrainRendering.cbp | 56 + .../12.TerrainRendering/TerrainRendering.dev | 59 + .../12.TerrainRendering/TerrainRendering.vcproj | 163 + .../TerrainRendering_vc10.vcxproj | 231 + .../TerrainRendering_vc11.vcxproj | 235 + .../TerrainRendering_vc8.vcproj | 231 + .../TerrainRendering_vc9.vcproj | 230 + .../examples/12.TerrainRendering/main.cpp | 285 + .../examples/12.TerrainRendering/tutorial.html | 122 + .../examples/13.RenderToTexture/Makefile | 38 + .../13.RenderToTexture/RenderToTexture.cbp | 55 + .../13.RenderToTexture/RenderToTexture.dev | 59 + .../13.RenderToTexture/RenderToTexture.vcproj | 163 + .../RenderToTexture_vc10.vcxproj | 231 + .../RenderToTexture_vc11.vcxproj | 235 + .../13.RenderToTexture/RenderToTexture_vc8.vcproj | 231 + .../13.RenderToTexture/RenderToTexture_vc9.vcproj | 230 + .../examples/13.RenderToTexture/main.cpp | 211 + .../examples/13.RenderToTexture/tutorial.html | 244 + .../examples/14.Win32Window/Makefile | 38 + .../examples/14.Win32Window/Win32Window.cbp | 43 + .../examples/14.Win32Window/Win32Window.dev | 59 + .../examples/14.Win32Window/Win32Window.vcproj | 165 + .../14.Win32Window/Win32Window_vc10.vcxproj | 235 + .../14.Win32Window/Win32Window_vc11.vcxproj | 239 + .../examples/14.Win32Window/Win32Window_vc8.vcproj | 232 + .../examples/14.Win32Window/Win32Window_vc9.vcproj | 232 + .../examples/14.Win32Window/main.cpp | 251 + .../examples/14.Win32Window/tutorial.html | 247 + .../examples/15.LoadIrrFile/LoadIrrFile.cbp | 54 + .../examples/15.LoadIrrFile/LoadIrrFile.dev | 59 + .../examples/15.LoadIrrFile/LoadIrrFile.vcproj | 162 + .../15.LoadIrrFile/LoadIrrFile_vc10.vcxproj | 231 + .../15.LoadIrrFile/LoadIrrFile_vc11.vcxproj | 235 + .../examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj | 231 + .../examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj | 230 + .../examples/15.LoadIrrFile/Makefile | 38 + .../examples/15.LoadIrrFile/main.cpp | 173 + .../examples/15.LoadIrrFile/tutorial.html | 129 + .../examples/16.Quake3MapShader/Makefile | 38 + .../16.Quake3MapShader/Quake3MapShader.cbp | 56 + .../16.Quake3MapShader/Quake3MapShader.dev | 59 + .../16.Quake3MapShader/Quake3MapShader.vcproj | 133 + .../Quake3MapShader_vc10.vcxproj | 190 + .../Quake3MapShader_vc11.vcxproj | 194 + .../16.Quake3MapShader/Quake3MapShader_vc8.vcproj | 190 + .../16.Quake3MapShader/Quake3MapShader_vc9.vcproj | 188 + .../examples/16.Quake3MapShader/main.cpp | 389 + .... HelloWorld for Windows Mobile on PC_v8.vcproj | 185 + .... HelloWorld for Windows Mobile on PC_v9.vcproj | 184 + ...elloWorld for Windows Mobile on PC_vc10.vcxproj | 176 + ...elloWorld for Windows Mobile on PC_vc11.vcxproj | 180 + .../17.HelloWorld_Mobile/HelloWorld_mobile.sln | 33 + .../17.HelloWorld_Mobile/HelloWorld_mobile.vcproj | 198 + .../examples/17.HelloWorld_Mobile/main.cpp | 503 + .../examples/18.SplitScreen/Makefile | 38 + .../examples/18.SplitScreen/SplitScreen.cbp | 55 + .../examples/18.SplitScreen/SplitScreen.dev | 59 + .../examples/18.SplitScreen/SplitScreen.vcproj | 132 + .../18.SplitScreen/SplitScreen_vc10.vcxproj | 190 + .../18.SplitScreen/SplitScreen_vc11.vcxproj | 194 + .../examples/18.SplitScreen/SplitScreen_vc8.vcproj | 189 + .../examples/18.SplitScreen/SplitScreen_vc9.vcproj | 188 + .../examples/18.SplitScreen/main.cpp | 244 + .../examples/19.MouseAndJoystick/Makefile | 39 + .../19.MouseAndJoystick/MouseAndJoystick.cbp | 56 + .../19.MouseAndJoystick/MouseAndJoystick.dev | 59 + .../19.MouseAndJoystick/MouseAndJoystick.vcproj | 162 + .../MouseAndJoystick_vc10.vcxproj | 227 + .../MouseAndJoystick_vc11.vcxproj | 231 + .../MouseAndJoystick_vc8.vcproj | 231 + .../MouseAndJoystick_vc9.vcproj | 230 + .../examples/19.MouseAndJoystick/main.cpp | 285 + .../examples/20.ManagedLights/Makefile | 39 + .../examples/20.ManagedLights/ManagedLights.cbp | 57 + .../examples/20.ManagedLights/ManagedLights.dev | 59 + .../examples/20.ManagedLights/ManagedLights.vcproj | 163 + .../20.ManagedLights/ManagedLights_vc10.vcxproj | 230 + .../20.ManagedLights/ManagedLights_vc11.vcxproj | 234 + .../20.ManagedLights/ManagedLights_vc8.vcproj | 231 + .../20.ManagedLights/ManagedLights_vc9.vcproj | 231 + .../examples/20.ManagedLights/main.cpp | 386 + .../examples/21.Quake3Explorer/Makefile | 38 + .../examples/21.Quake3Explorer/Quake3Explorer.cbp | 59 + .../examples/21.Quake3Explorer/Quake3Explorer.dev | 99 + .../21.Quake3Explorer/Quake3Explorer.vcproj | 132 + .../21.Quake3Explorer/Quake3Explorer_vc10.vcxproj | 196 + .../21.Quake3Explorer/Quake3Explorer_vc11.vcxproj | 200 + .../21.Quake3Explorer/Quake3Explorer_vc8.vcproj | 210 + .../21.Quake3Explorer/Quake3Explorer_vc9.vcproj | 204 + .../examples/21.Quake3Explorer/main.cpp | 2188 ++ .../examples/21.Quake3Explorer/q3factory.cpp | 824 + .../examples/21.Quake3Explorer/q3factory.h | 149 + .../examples/21.Quake3Explorer/sound.cpp | 98 + .../examples/21.Quake3Explorer/sound.h | 18 + .../examples/22.MaterialViewer/Makefile | 38 + .../examples/22.MaterialViewer/MaterialViewer.cbp | 55 + .../examples/22.MaterialViewer/MaterialViewer.dev | 59 + .../22.MaterialViewer/MaterialViewer.vcproj | 229 + .../22.MaterialViewer/MaterialViewer_vc10.vcxproj | 231 + .../22.MaterialViewer/MaterialViewer_vc11.vcxproj | 235 + .../22.MaterialViewer/MaterialViewer_vc8.vcproj | 231 + .../22.MaterialViewer/MaterialViewer_vc9.vcproj | 230 + .../examples/22.MaterialViewer/main.cpp | 1057 + .../examples/23.SMeshHandling/Makefile | 38 + .../examples/23.SMeshHandling/SMeshHandling.cbp | 44 + .../examples/23.SMeshHandling/SMeshHandling.dev | 59 + .../examples/23.SMeshHandling/SMeshHandling.vcproj | 132 + .../23.SMeshHandling/SMeshHandling_vc10.vcxproj | 188 + .../23.SMeshHandling/SMeshHandling_vc11.vcxproj | 192 + .../23.SMeshHandling/SMeshHandling_vc8.vcproj | 190 + .../23.SMeshHandling/SMeshHandling_vc9.vcproj | 187 + .../examples/23.SMeshHandling/main.cpp | 426 + .../examples/24.CursorControl/CursorControl.cbp | 56 + .../examples/24.CursorControl/CursorControl.vcproj | 132 + .../24.CursorControl/CursorControl_vc10.vcxproj | 184 + .../24.CursorControl/CursorControl_vc11.vcxproj | 188 + .../24.CursorControl/CursorControl_vc8.vcproj | 190 + .../24.CursorControl/CursorControl_vc9.vcproj | 185 + .../examples/24.CursorControl/Makefile | 66 + .../examples/24.CursorControl/main.cpp | 563 + .../examples/25.XmlHandling/Makefile | 66 + .../examples/25.XmlHandling/XmlHandling.cbp | 55 + .../examples/25.XmlHandling/XmlHandling.vcproj | 195 + .../25.XmlHandling/XmlHandling_vc10.vcxproj | 178 + .../25.XmlHandling/XmlHandling_vc11.vcxproj | 182 + .../examples/25.XmlHandling/XmlHandling_vc8.vcproj | 190 + .../examples/25.XmlHandling/XmlHandling_vc9.vcproj | 185 + .../examples/25.XmlHandling/main.cpp | 505 + .../examples/26.OcclusionQuery/Makefile | 39 + .../examples/26.OcclusionQuery/OcclusionQuery.cbp | 55 + .../examples/26.OcclusionQuery/OcclusionQuery.dev | 59 + .../26.OcclusionQuery/OcclusionQuery.vcproj | 163 + .../26.OcclusionQuery/OcclusionQuery_vc10.vcxproj | 231 + .../26.OcclusionQuery/OcclusionQuery_vc11.vcxproj | 235 + .../26.OcclusionQuery/OcclusionQuery_vc8.vcproj | 231 + .../26.OcclusionQuery/OcclusionQuery_vc9.vcproj | 230 + .../examples/26.OcclusionQuery/main.cpp | 213 + .../BuildAllExamples.MacOSX/DemoApp-Info.plist | 24 + .../examples/BuildAllExamples.workspace | 35 + .../examples/BuildAllExamples_v8.sln | 236 + .../examples/BuildAllExamples_v9.sln | 284 + .../examples/BuildAllExamples_vc10.sln | 409 + .../examples/BuildAllExamples_vc11.sln | 409 + src/others/irrlicht-1.8.1/examples/Demo/CDemo.cpp | 815 + src/others/irrlicht-1.8.1/examples/Demo/CDemo.h | 110 + .../irrlicht-1.8.1/examples/Demo/CMainMenu.cpp | 378 + .../irrlicht-1.8.1/examples/Demo/CMainMenu.h | 48 + .../irrlicht-1.8.1/examples/Demo/Demo.vcproj | 223 + .../irrlicht-1.8.1/examples/Demo/Demo_vc10.vcxproj | 279 + .../irrlicht-1.8.1/examples/Demo/Demo_vc11.vcxproj | 283 + .../irrlicht-1.8.1/examples/Demo/Demo_vc8.vcproj | 300 + .../irrlicht-1.8.1/examples/Demo/Demo_vc9.vcproj | 300 + src/others/irrlicht-1.8.1/examples/Demo/Makefile | 43 + src/others/irrlicht-1.8.1/examples/Demo/demo.cbp | 68 + src/others/irrlicht-1.8.1/examples/Demo/demo.dev | 99 + src/others/irrlicht-1.8.1/examples/Demo/icon.ico | Bin 0 -> 2238 bytes src/others/irrlicht-1.8.1/examples/Demo/main.cpp | 49 + src/others/irrlicht-1.8.1/examples/Demo/resource.h | 16 + .../irrlicht-1.8.1/examples/Demo/resscript.rc | 72 + src/others/irrlicht-1.8.1/examples/Makefile | 8 + .../irrlicht-1.8.1/examples/buildAllExamples.sh | 8 + .../examples/whereAreTheBinaries.txt | 7 + .../irrlicht-1.8.1/include/CDynamicMeshBuffer.h | 116 + src/others/irrlicht-1.8.1/include/CIndexBuffer.h | 226 + src/others/irrlicht-1.8.1/include/CMeshBuffer.h | 301 + src/others/irrlicht-1.8.1/include/CVertexBuffer.h | 210 + src/others/irrlicht-1.8.1/include/EAttributes.h | 101 + src/others/irrlicht-1.8.1/include/ECullingTypes.h | 41 + .../irrlicht-1.8.1/include/EDebugSceneTypes.h | 50 + src/others/irrlicht-1.8.1/include/EDeviceTypes.h | 60 + .../irrlicht-1.8.1/include/EDriverFeatures.h | 133 + src/others/irrlicht-1.8.1/include/EDriverTypes.h | 64 + src/others/irrlicht-1.8.1/include/EGUIAlignment.h | 38 + .../irrlicht-1.8.1/include/EGUIElementTypes.h | 140 + .../irrlicht-1.8.1/include/EHardwareBufferFlags.h | 44 + src/others/irrlicht-1.8.1/include/EMaterialFlags.h | 95 + src/others/irrlicht-1.8.1/include/EMaterialTypes.h | 234 + .../irrlicht-1.8.1/include/EMeshWriterEnums.h | 59 + .../irrlicht-1.8.1/include/EMessageBoxFlags.h | 36 + .../irrlicht-1.8.1/include/EPrimitiveTypes.h | 56 + .../include/ESceneNodeAnimatorTypes.h | 58 + .../irrlicht-1.8.1/include/ESceneNodeTypes.h | 106 + src/others/irrlicht-1.8.1/include/EShaderTypes.h | 90 + .../irrlicht-1.8.1/include/ETerrainElements.h | 36 + src/others/irrlicht-1.8.1/include/IAnimatedMesh.h | 115 + .../irrlicht-1.8.1/include/IAnimatedMeshMD2.h | 79 + .../irrlicht-1.8.1/include/IAnimatedMeshMD3.h | 304 + .../include/IAnimatedMeshSceneNode.h | 228 + .../include/IAttributeExchangingObject.h | 71 + src/others/irrlicht-1.8.1/include/IAttributes.h | 738 + .../irrlicht-1.8.1/include/IBillboardSceneNode.h | 75 + .../include/IBillboardTextSceneNode.h | 62 + src/others/irrlicht-1.8.1/include/IBoneSceneNode.h | 108 + .../irrlicht-1.8.1/include/ICameraSceneNode.h | 207 + .../irrlicht-1.8.1/include/IColladaMeshWriter.h | 405 + src/others/irrlicht-1.8.1/include/ICursorControl.h | 192 + .../include/IDummyTransformationSceneNode.h | 42 + .../irrlicht-1.8.1/include/IDynamicMeshBuffer.h | 211 + src/others/irrlicht-1.8.1/include/IEventReceiver.h | 490 + src/others/irrlicht-1.8.1/include/IFileArchive.h | 132 + src/others/irrlicht-1.8.1/include/IFileList.h | 94 + src/others/irrlicht-1.8.1/include/IFileSystem.h | 385 + .../include/IGPUProgrammingServices.h | 474 + src/others/irrlicht-1.8.1/include/IGUIButton.h | 151 + src/others/irrlicht-1.8.1/include/IGUICheckBox.h | 38 + .../irrlicht-1.8.1/include/IGUIColorSelectDialog.h | 30 + src/others/irrlicht-1.8.1/include/IGUIComboBox.h | 74 + .../irrlicht-1.8.1/include/IGUIContextMenu.h | 162 + src/others/irrlicht-1.8.1/include/IGUIEditBox.h | 135 + src/others/irrlicht-1.8.1/include/IGUIElement.h | 1037 + .../irrlicht-1.8.1/include/IGUIElementFactory.h | 66 + .../irrlicht-1.8.1/include/IGUIEnvironment.h | 620 + .../irrlicht-1.8.1/include/IGUIFileOpenDialog.h | 44 + src/others/irrlicht-1.8.1/include/IGUIFont.h | 104 + src/others/irrlicht-1.8.1/include/IGUIFontBitmap.h | 46 + src/others/irrlicht-1.8.1/include/IGUIImage.h | 58 + src/others/irrlicht-1.8.1/include/IGUIImageList.h | 45 + src/others/irrlicht-1.8.1/include/IGUIInOutFader.h | 67 + src/others/irrlicht-1.8.1/include/IGUIListBox.h | 138 + src/others/irrlicht-1.8.1/include/IGUIMeshViewer.h | 53 + src/others/irrlicht-1.8.1/include/IGUIScrollBar.h | 65 + src/others/irrlicht-1.8.1/include/IGUISkin.h | 574 + src/others/irrlicht-1.8.1/include/IGUISpinBox.h | 69 + src/others/irrlicht-1.8.1/include/IGUISpriteBank.h | 95 + src/others/irrlicht-1.8.1/include/IGUIStaticText.h | 135 + src/others/irrlicht-1.8.1/include/IGUITabControl.h | 136 + src/others/irrlicht-1.8.1/include/IGUITable.h | 205 + src/others/irrlicht-1.8.1/include/IGUIToolbar.h | 40 + src/others/irrlicht-1.8.1/include/IGUITreeView.h | 278 + src/others/irrlicht-1.8.1/include/IGUIWindow.h | 74 + .../irrlicht-1.8.1/include/IGeometryCreator.h | 177 + src/others/irrlicht-1.8.1/include/IImage.h | 155 + src/others/irrlicht-1.8.1/include/IImageLoader.h | 53 + src/others/irrlicht-1.8.1/include/IImageWriter.h | 45 + src/others/irrlicht-1.8.1/include/IIndexBuffer.h | 65 + src/others/irrlicht-1.8.1/include/ILightManager.h | 62 + .../irrlicht-1.8.1/include/ILightSceneNode.h | 86 + src/others/irrlicht-1.8.1/include/ILogger.h | 102 + .../irrlicht-1.8.1/include/IMaterialRenderer.h | 101 + .../include/IMaterialRendererServices.h | 115 + src/others/irrlicht-1.8.1/include/IMesh.h | 75 + src/others/irrlicht-1.8.1/include/IMeshBuffer.h | 154 + src/others/irrlicht-1.8.1/include/IMeshCache.h | 177 + src/others/irrlicht-1.8.1/include/IMeshLoader.h | 53 + .../irrlicht-1.8.1/include/IMeshManipulator.h | 393 + src/others/irrlicht-1.8.1/include/IMeshSceneNode.h | 79 + src/others/irrlicht-1.8.1/include/IMeshWriter.h | 58 + .../irrlicht-1.8.1/include/IMetaTriangleSelector.h | 43 + src/others/irrlicht-1.8.1/include/IOSOperator.h | 50 + .../irrlicht-1.8.1/include/IParticleAffector.h | 72 + .../IParticleAnimatedMeshSceneNodeEmitter.h | 54 + .../include/IParticleAttractionAffector.h | 59 + .../irrlicht-1.8.1/include/IParticleBoxEmitter.h | 36 + .../include/IParticleCylinderEmitter.h | 59 + .../irrlicht-1.8.1/include/IParticleEmitter.h | 129 + .../include/IParticleFadeOutAffector.h | 41 + .../include/IParticleGravityAffector.h | 42 + .../irrlicht-1.8.1/include/IParticleMeshEmitter.h | 54 + .../irrlicht-1.8.1/include/IParticleRingEmitter.h | 47 + .../include/IParticleRotationAffector.h | 41 + .../include/IParticleSphereEmitter.h | 41 + .../include/IParticleSystemSceneNode.h | 512 + src/others/irrlicht-1.8.1/include/IQ3LevelMesh.h | 46 + src/others/irrlicht-1.8.1/include/IQ3Shader.h | 885 + src/others/irrlicht-1.8.1/include/IRandomizer.h | 33 + src/others/irrlicht-1.8.1/include/IReadFile.h | 58 + .../irrlicht-1.8.1/include/IReferenceCounted.h | 170 + .../include/ISceneCollisionManager.h | 205 + src/others/irrlicht-1.8.1/include/ISceneLoader.h | 62 + src/others/irrlicht-1.8.1/include/ISceneManager.h | 1663 ++ src/others/irrlicht-1.8.1/include/ISceneNode.h | 858 + .../irrlicht-1.8.1/include/ISceneNodeAnimator.h | 78 + .../include/ISceneNodeAnimatorCameraFPS.h | 69 + .../include/ISceneNodeAnimatorCameraMaya.h | 58 + .../include/ISceneNodeAnimatorCollisionResponse.h | 171 + .../include/ISceneNodeAnimatorFactory.h | 69 + .../irrlicht-1.8.1/include/ISceneNodeFactory.h | 68 + .../include/ISceneUserDataSerializer.h | 51 + .../include/IShaderConstantSetCallBack.h | 85 + .../include/IShadowVolumeSceneNode.h | 38 + src/others/irrlicht-1.8.1/include/ISkinnedMesh.h | 219 + .../irrlicht-1.8.1/include/ITerrainSceneNode.h | 182 + src/others/irrlicht-1.8.1/include/ITextSceneNode.h | 37 + src/others/irrlicht-1.8.1/include/ITexture.h | 219 + src/others/irrlicht-1.8.1/include/ITimer.h | 103 + .../irrlicht-1.8.1/include/ITriangleSelector.h | 131 + src/others/irrlicht-1.8.1/include/IVertexBuffer.h | 52 + src/others/irrlicht-1.8.1/include/IVideoDriver.h | 1471 ++ src/others/irrlicht-1.8.1/include/IVideoModeList.h | 62 + .../irrlicht-1.8.1/include/IVolumeLightSceneNode.h | 60 + src/others/irrlicht-1.8.1/include/IWriteFile.h | 50 + src/others/irrlicht-1.8.1/include/IXMLReader.h | 31 + src/others/irrlicht-1.8.1/include/IXMLWriter.h | 77 + .../irrlicht-1.8.1/include/IrrCompileConfig.h | 832 + src/others/irrlicht-1.8.1/include/IrrlichtDevice.h | 322 + src/others/irrlicht-1.8.1/include/Keycodes.h | 173 + src/others/irrlicht-1.8.1/include/S3DVertex.h | 274 + src/others/irrlicht-1.8.1/include/SAnimatedMesh.h | 189 + src/others/irrlicht-1.8.1/include/SColor.h | 697 + .../irrlicht-1.8.1/include/SExposedVideoData.h | 90 + .../include/SIrrCreationParameters.h | 308 + src/others/irrlicht-1.8.1/include/SKeyMap.h | 41 + src/others/irrlicht-1.8.1/include/SLight.h | 98 + src/others/irrlicht-1.8.1/include/SMaterial.h | 685 + src/others/irrlicht-1.8.1/include/SMaterialLayer.h | 228 + src/others/irrlicht-1.8.1/include/SMesh.h | 140 + src/others/irrlicht-1.8.1/include/SMeshBuffer.h | 7 + .../irrlicht-1.8.1/include/SMeshBufferLightMap.h | 7 + .../irrlicht-1.8.1/include/SMeshBufferTangents.h | 7 + src/others/irrlicht-1.8.1/include/SParticle.h | 56 + .../irrlicht-1.8.1/include/SSharedMeshBuffer.h | 242 + .../irrlicht-1.8.1/include/SSkinMeshBuffer.h | 404 + src/others/irrlicht-1.8.1/include/SVertexIndex.h | 79 + .../irrlicht-1.8.1/include/SVertexManipulator.h | 292 + src/others/irrlicht-1.8.1/include/SViewFrustum.h | 370 + .../irrlicht-1.8.1/include/SceneParameters.h | 182 + src/others/irrlicht-1.8.1/include/aabbox3d.h | 332 + src/others/irrlicht-1.8.1/include/coreutil.h | 188 + src/others/irrlicht-1.8.1/include/dimension2d.h | 224 + src/others/irrlicht-1.8.1/include/driverChoice.h | 45 + src/others/irrlicht-1.8.1/include/fast_atof.h | 364 + src/others/irrlicht-1.8.1/include/heapsort.h | 70 + src/others/irrlicht-1.8.1/include/irrAllocator.h | 124 + src/others/irrlicht-1.8.1/include/irrArray.h | 627 + src/others/irrlicht-1.8.1/include/irrList.h | 416 + src/others/irrlicht-1.8.1/include/irrMap.h | 1127 + src/others/irrlicht-1.8.1/include/irrMath.h | 732 + src/others/irrlicht-1.8.1/include/irrString.h | 1368 ++ src/others/irrlicht-1.8.1/include/irrTypes.h | 250 + src/others/irrlicht-1.8.1/include/irrXML.h | 575 + src/others/irrlicht-1.8.1/include/irrlicht.h | 394 + src/others/irrlicht-1.8.1/include/irrpack.h | 39 + src/others/irrlicht-1.8.1/include/irrunpack.h | 20 + src/others/irrlicht-1.8.1/include/line2d.h | 274 + src/others/irrlicht-1.8.1/include/line3d.h | 144 + src/others/irrlicht-1.8.1/include/matrix4.h | 2242 ++ src/others/irrlicht-1.8.1/include/path.h | 88 + src/others/irrlicht-1.8.1/include/plane3d.h | 245 + src/others/irrlicht-1.8.1/include/position2d.h | 32 + src/others/irrlicht-1.8.1/include/quaternion.h | 696 + src/others/irrlicht-1.8.1/include/rect.h | 279 + src/others/irrlicht-1.8.1/include/triangle3d.h | 279 + src/others/irrlicht-1.8.1/include/vector2d.h | 342 + src/others/irrlicht-1.8.1/include/vector3d.h | 458 + .../lib/Win64-visualStudio/readme.txt | 11 + src/others/irrlicht-1.8.1/media/001shot.jpg | Bin 0 -> 6126 bytes src/others/irrlicht-1.8.1/media/002shot.jpg | Bin 0 -> 19218 bytes src/others/irrlicht-1.8.1/media/003shot.jpg | Bin 0 -> 5925 bytes src/others/irrlicht-1.8.1/media/004shot.jpg | Bin 0 -> 8132 bytes src/others/irrlicht-1.8.1/media/005shot.jpg | Bin 0 -> 11356 bytes src/others/irrlicht-1.8.1/media/006shot.jpg | Bin 0 -> 10657 bytes src/others/irrlicht-1.8.1/media/007shot.jpg | Bin 0 -> 24825 bytes src/others/irrlicht-1.8.1/media/008shot.jpg | Bin 0 -> 26977 bytes src/others/irrlicht-1.8.1/media/009shot.jpg | Bin 0 -> 20331 bytes src/others/irrlicht-1.8.1/media/010shot.jpg | Bin 0 -> 18563 bytes src/others/irrlicht-1.8.1/media/011shot.jpg | Bin 0 -> 19423 bytes src/others/irrlicht-1.8.1/media/012shot.jpg | Bin 0 -> 20291 bytes src/others/irrlicht-1.8.1/media/013shot.jpg | Bin 0 -> 8782 bytes src/others/irrlicht-1.8.1/media/014shot.jpg | Bin 0 -> 19953 bytes src/others/irrlicht-1.8.1/media/015shot.jpg | Bin 0 -> 21671 bytes src/others/irrlicht-1.8.1/media/016shot.jpg | Bin 0 -> 12038 bytes src/others/irrlicht-1.8.1/media/017shot.jpg | Bin 0 -> 9051 bytes src/others/irrlicht-1.8.1/media/018shot.jpg | Bin 0 -> 26137 bytes src/others/irrlicht-1.8.1/media/019shot.jpg | Bin 0 -> 4554 bytes src/others/irrlicht-1.8.1/media/020shot.jpg | Bin 0 -> 11126 bytes src/others/irrlicht-1.8.1/media/021shot.jpg | Bin 0 -> 25032 bytes src/others/irrlicht-1.8.1/media/022shot.jpg | Bin 0 -> 15370 bytes src/others/irrlicht-1.8.1/media/023shot.jpg | Bin 0 -> 12668 bytes src/others/irrlicht-1.8.1/media/024shot.jpg | Bin 0 -> 15988 bytes src/others/irrlicht-1.8.1/media/025shot.jpg | Bin 0 -> 9279 bytes src/others/irrlicht-1.8.1/media/026shot.jpg | Bin 0 -> 11142 bytes src/others/irrlicht-1.8.1/media/2ddemo.png | Bin 0 -> 44217 bytes src/others/irrlicht-1.8.1/media/Faerie5.BMP | Bin 0 -> 43538 bytes src/others/irrlicht-1.8.1/media/IrrlichtTheme.ogg | Bin 0 -> 1300197 bytes src/others/irrlicht-1.8.1/media/Particle.tga | Bin 0 -> 12827 bytes src/others/irrlicht-1.8.1/media/axe.jpg | Bin 0 -> 65192 bytes src/others/irrlicht-1.8.1/media/ball.wav | Bin 0 -> 4870 bytes src/others/irrlicht-1.8.1/media/bigfont.png | Bin 0 -> 21272 bytes src/others/irrlicht-1.8.1/media/burninglogo.png | Bin 0 -> 14035 bytes src/others/irrlicht-1.8.1/media/config.xml | 29 + src/others/irrlicht-1.8.1/media/d3d8.psh | 10 + src/others/irrlicht-1.8.1/media/d3d8.vsh | 37 + src/others/irrlicht-1.8.1/media/d3d9.hlsl | 84 + src/others/irrlicht-1.8.1/media/d3d9.psh | 11 + src/others/irrlicht-1.8.1/media/d3d9.vsh | 42 + src/others/irrlicht-1.8.1/media/demoback.jpg | Bin 0 -> 97262 bytes src/others/irrlicht-1.8.1/media/detailmap3.jpg | Bin 0 -> 92466 bytes src/others/irrlicht-1.8.1/media/directxlogo.png | Bin 0 -> 9932 bytes src/others/irrlicht-1.8.1/media/dotnetback.jpg | Bin 0 -> 49559 bytes src/others/irrlicht-1.8.1/media/dwarf-Read-Me.txt | 51 + src/others/irrlicht-1.8.1/media/dwarf.jpg | Bin 0 -> 84160 bytes src/others/irrlicht-1.8.1/media/dwarf.x | 18468 +++++++++++++++++ src/others/irrlicht-1.8.1/media/earth.jpg | Bin 0 -> 24107 bytes src/others/irrlicht-1.8.1/media/earth.x | 20711 +++++++++++++++++++ src/others/irrlicht-1.8.1/media/earthbump.jpg | Bin 0 -> 24419 bytes src/others/irrlicht-1.8.1/media/enano.jpg | Bin 0 -> 19890 bytes src/others/irrlicht-1.8.1/media/example.irr | Bin 0 -> 30080 bytes src/others/irrlicht-1.8.1/media/faerie.md2 | Bin 0 -> 320996 bytes src/others/irrlicht-1.8.1/media/faerie2.bmp | Bin 0 -> 43538 bytes src/others/irrlicht-1.8.1/media/fire.bmp | Bin 0 -> 24078 bytes src/others/irrlicht-1.8.1/media/fireball.bmp | Bin 0 -> 5174 bytes src/others/irrlicht-1.8.1/media/fontcourier.bmp | Bin 0 -> 196662 bytes .../irrlicht-1.8.1/media/fonthaettenschweiler.bmp | Bin 0 -> 196662 bytes src/others/irrlicht-1.8.1/media/fontlucida.png | Bin 0 -> 19727 bytes src/others/irrlicht-1.8.1/media/gun.jpg | Bin 0 -> 25863 bytes src/others/irrlicht-1.8.1/media/gun.md2 | Bin 0 -> 55500 bytes src/others/irrlicht-1.8.1/media/help.png | Bin 0 -> 881 bytes .../media/icon_crosshairs16x16bw1.png | Bin 0 -> 203 bytes .../media/icon_crosshairs16x16bw2.png | Bin 0 -> 192 bytes .../media/icon_crosshairs16x16bw3.png | Bin 0 -> 208 bytes .../media/icon_crosshairs16x16col.png | Bin 0 -> 560 bytes src/others/irrlicht-1.8.1/media/iconlist.png | Bin 0 -> 30951 bytes src/others/irrlicht-1.8.1/media/impact.wav | Bin 0 -> 3942 bytes src/others/irrlicht-1.8.1/media/irr.ico | Bin 0 -> 2238 bytes src/others/irrlicht-1.8.1/media/irrlicht.dat | Bin 0 -> 8702 bytes src/others/irrlicht-1.8.1/media/irrlicht2_bk.jpg | Bin 0 -> 37467 bytes src/others/irrlicht-1.8.1/media/irrlicht2_dn.jpg | Bin 0 -> 62215 bytes src/others/irrlicht-1.8.1/media/irrlicht2_ft.jpg | Bin 0 -> 38701 bytes src/others/irrlicht-1.8.1/media/irrlicht2_lf.jpg | Bin 0 -> 46020 bytes src/others/irrlicht-1.8.1/media/irrlicht2_rt.jpg | Bin 0 -> 36551 bytes src/others/irrlicht-1.8.1/media/irrlicht2_up.jpg | Bin 0 -> 12208 bytes src/others/irrlicht-1.8.1/media/irrlichtlogo.BMP | Bin 0 -> 3806 bytes src/others/irrlicht-1.8.1/media/irrlichtlogo.jpg | Bin 0 -> 2593 bytes src/others/irrlicht-1.8.1/media/irrlichtlogo2.png | Bin 0 -> 15109 bytes src/others/irrlicht-1.8.1/media/irrlichtlogo3.png | Bin 0 -> 8225 bytes .../irrlicht-1.8.1/media/irrlichtlogoaligned.jpg | Bin 0 -> 2643 bytes .../irrlicht-1.8.1/media/irrlichtlogoalpha.tga | Bin 0 -> 16923 bytes .../irrlicht-1.8.1/media/irrlichtlogoalpha2.tga | Bin 0 -> 30634 bytes src/others/irrlicht-1.8.1/media/lightFalloff.png | Bin 0 -> 43385 bytes src/others/irrlicht-1.8.1/media/lucida.xml | Bin 0 -> 155900 bytes src/others/irrlicht-1.8.1/media/lucida0.png | Bin 0 -> 23853 bytes src/others/irrlicht-1.8.1/media/map-20kdm2.pk3 | Bin 0 -> 2086107 bytes src/others/irrlicht-1.8.1/media/map-20kdm2.txt | 50 + .../media/ninja animation ranges.txt | 36 + src/others/irrlicht-1.8.1/media/ninja.b3d | Bin 0 -> 106407 bytes src/others/irrlicht-1.8.1/media/nskinbl.jpg | Bin 0 -> 39906 bytes src/others/irrlicht-1.8.1/media/nskinrd.jpg | Bin 0 -> 52173 bytes src/others/irrlicht-1.8.1/media/open.png | Bin 0 -> 904 bytes src/others/irrlicht-1.8.1/media/opengl.frag | 9 + src/others/irrlicht-1.8.1/media/opengl.psh | 22 + src/others/irrlicht-1.8.1/media/opengl.vert | 27 + src/others/irrlicht-1.8.1/media/opengl.vsh | 60 + src/others/irrlicht-1.8.1/media/opengllogo.png | Bin 0 -> 13339 bytes src/others/irrlicht-1.8.1/media/particle.bmp | Bin 0 -> 24078 bytes src/others/irrlicht-1.8.1/media/particlegreen.jpg | Bin 0 -> 21777 bytes src/others/irrlicht-1.8.1/media/particlered.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/particlewhite.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal1.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal2.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal3.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal4.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal5.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal6.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/portal7.bmp | Bin 0 -> 49206 bytes src/others/irrlicht-1.8.1/media/rockwall.jpg | Bin 0 -> 89121 bytes .../irrlicht-1.8.1/media/rockwall_height.bmp | Bin 0 -> 66614 bytes src/others/irrlicht-1.8.1/media/room.3ds | Bin 0 -> 5508 bytes src/others/irrlicht-1.8.1/media/rsptnback.jpg | Bin 0 -> 33912 bytes src/others/irrlicht-1.8.1/media/skydome.jpg | Bin 0 -> 39052 bytes src/others/irrlicht-1.8.1/media/skydome2.jpg | Bin 0 -> 62534 bytes src/others/irrlicht-1.8.1/media/smoke.bmp | Bin 0 -> 5174 bytes src/others/irrlicht-1.8.1/media/smoke2.jpg | Bin 0 -> 22618 bytes src/others/irrlicht-1.8.1/media/smoke3.jpg | Bin 0 -> 23083 bytes src/others/irrlicht-1.8.1/media/spheremap.jpg | Bin 0 -> 16705 bytes src/others/irrlicht-1.8.1/media/stones.jpg | Bin 0 -> 7764 bytes src/others/irrlicht-1.8.1/media/sydney.bmp | Bin 0 -> 60522 bytes src/others/irrlicht-1.8.1/media/sydney.md2 | Bin 0 -> 302128 bytes src/others/irrlicht-1.8.1/media/t351sml.jpg | Bin 0 -> 8515 bytes .../irrlicht-1.8.1/media/terrain-heightmap.bmp | Bin 0 -> 67962 bytes .../irrlicht-1.8.1/media/terrain-texture.jpg | Bin 0 -> 184786 bytes src/others/irrlicht-1.8.1/media/tools.png | Bin 0 -> 845 bytes src/others/irrlicht-1.8.1/media/vc6include.jpg | Bin 0 -> 10722 bytes src/others/irrlicht-1.8.1/media/vc6optionsdir.jpg | Bin 0 -> 12147 bytes src/others/irrlicht-1.8.1/media/vcnetinclude.jpg | Bin 0 -> 12479 bytes src/others/irrlicht-1.8.1/media/wall.bmp | Bin 0 -> 196662 bytes src/others/irrlicht-1.8.1/media/wall.jpg | Bin 0 -> 89206 bytes src/others/irrlicht-1.8.1/media/water.jpg | Bin 0 -> 19451 bytes .../irrlicht-1.8.1/media/yodan mdl - readme.txt | 53 + src/others/irrlicht-1.8.1/media/yodan.mdl | Bin 0 -> 364704 bytes src/others/irrlicht-1.8.1/media/zip.png | Bin 0 -> 833 bytes src/others/irrlicht-1.8.1/readme.txt | 235 + .../irrlicht-1.8.1/source/Irrlicht/BuiltInFont.h | 1075 + .../source/Irrlicht/C3DSMeshFileLoader.cpp | 1396 ++ .../source/Irrlicht/C3DSMeshFileLoader.h | 166 + .../source/Irrlicht/CAnimatedMeshHalfLife.cpp | 1695 ++ .../source/Irrlicht/CAnimatedMeshHalfLife.h | 630 + .../source/Irrlicht/CAnimatedMeshMD2.cpp | 457 + .../source/Irrlicht/CAnimatedMeshMD2.h | 154 + .../source/Irrlicht/CAnimatedMeshMD3.cpp | 468 + .../source/Irrlicht/CAnimatedMeshMD3.h | 135 + .../source/Irrlicht/CAnimatedMeshSceneNode.cpp | 1132 + .../source/Irrlicht/CAnimatedMeshSceneNode.h | 227 + .../source/Irrlicht/CAttributeImpl.h | 2071 ++ .../irrlicht-1.8.1/source/Irrlicht/CAttributes.cpp | 1665 ++ .../irrlicht-1.8.1/source/Irrlicht/CAttributes.h | 712 + .../source/Irrlicht/CB3DMeshFileLoader.cpp | 1105 + .../source/Irrlicht/CB3DMeshFileLoader.h | 140 + .../source/Irrlicht/CBSPMeshFileLoader.cpp | 107 + .../source/Irrlicht/CBSPMeshFileLoader.h | 52 + .../source/Irrlicht/CBillboardSceneNode.cpp | 294 + .../source/Irrlicht/CBillboardSceneNode.h | 99 + src/others/irrlicht-1.8.1/source/Irrlicht/CBlit.h | 1273 ++ .../source/Irrlicht/CBoneSceneNode.cpp | 129 + .../source/Irrlicht/CBoneSceneNode.h | 79 + .../Irrlicht/CBurningShader_Raster_Reference.cpp | 1143 + .../irrlicht-1.8.1/source/Irrlicht/CCSMLoader.cpp | 872 + .../irrlicht-1.8.1/source/Irrlicht/CCSMLoader.h | 82 + .../source/Irrlicht/CCameraSceneNode.cpp | 385 + .../source/Irrlicht/CCameraSceneNode.h | 172 + .../source/Irrlicht/CCgMaterialRenderer.cpp | 361 + .../source/Irrlicht/CCgMaterialRenderer.h | 176 + .../source/Irrlicht/CColladaFileLoader.cpp | 2957 +++ .../source/Irrlicht/CColladaFileLoader.h | 389 + .../source/Irrlicht/CColladaMeshWriter.cpp | 2245 ++ .../source/Irrlicht/CColladaMeshWriter.h | 271 + .../source/Irrlicht/CColorConverter.cpp | 705 + .../source/Irrlicht/CColorConverter.h | 92 + .../source/Irrlicht/CCubeSceneNode.cpp | 235 + .../source/Irrlicht/CCubeSceneNode.h | 93 + .../irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.cpp | 2455 +++ .../irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.h | 341 + .../source/Irrlicht/CD3D8MaterialRenderer.h | 581 + .../source/Irrlicht/CD3D8NormalMapRenderer.cpp | 248 + .../source/Irrlicht/CD3D8NormalMapRenderer.h | 56 + .../source/Irrlicht/CD3D8ParallaxMapRenderer.cpp | 318 + .../source/Irrlicht/CD3D8ParallaxMapRenderer.h | 62 + .../Irrlicht/CD3D8ShaderMaterialRenderer.cpp | 332 + .../source/Irrlicht/CD3D8ShaderMaterialRenderer.h | 82 + .../source/Irrlicht/CD3D8Texture.cpp | 659 + .../irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.h | 120 + .../source/Irrlicht/CD3D9CgMaterialRenderer.cpp | 222 + .../source/Irrlicht/CD3D9CgMaterialRenderer.h | 83 + .../irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.cpp | 3633 ++++ .../irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.h | 496 + .../source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp | 428 + .../source/Irrlicht/CD3D9HLSLMaterialRenderer.h | 85 + .../source/Irrlicht/CD3D9MaterialRenderer.h | 615 + .../source/Irrlicht/CD3D9NormalMapRenderer.cpp | 306 + .../source/Irrlicht/CD3D9NormalMapRenderer.h | 56 + .../source/Irrlicht/CD3D9ParallaxMapRenderer.cpp | 410 + .../source/Irrlicht/CD3D9ParallaxMapRenderer.h | 63 + .../Irrlicht/CD3D9ShaderMaterialRenderer.cpp | 540 + .../source/Irrlicht/CD3D9ShaderMaterialRenderer.h | 102 + .../source/Irrlicht/CD3D9Texture.cpp | 699 + .../irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.h | 130 + .../irrlicht-1.8.1/source/Irrlicht/CDMFLoader.cpp | 436 + .../irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h | 91 + .../source/Irrlicht/CDefaultGUIElementFactory.cpp | 164 + .../source/Irrlicht/CDefaultGUIElementFactory.d | 2 + .../source/Irrlicht/CDefaultGUIElementFactory.h | 70 + .../Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp | 162 + .../Irrlicht/CDefaultSceneNodeAnimatorFactory.h | 75 + .../source/Irrlicht/CDefaultSceneNodeFactory.cpp | 179 + .../source/Irrlicht/CDefaultSceneNodeFactory.h | 80 + .../source/Irrlicht/CDepthBuffer.cpp | 176 + .../irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h | 94 + .../Irrlicht/CDummyTransformationSceneNode.cpp | 105 + .../Irrlicht/CDummyTransformationSceneNode.h | 62 + .../source/Irrlicht/CEmptySceneNode.cpp | 70 + .../source/Irrlicht/CEmptySceneNode.h | 46 + .../irrlicht-1.8.1/source/Irrlicht/CFPSCounter.cpp | 76 + .../irrlicht-1.8.1/source/Irrlicht/CFPSCounter.h | 54 + .../irrlicht-1.8.1/source/Irrlicht/CFileList.cpp | 165 + .../irrlicht-1.8.1/source/Irrlicht/CFileList.h | 138 + .../irrlicht-1.8.1/source/Irrlicht/CFileSystem.cpp | 1078 + .../irrlicht-1.8.1/source/Irrlicht/CFileSystem.h | 173 + .../irrlicht-1.8.1/source/Irrlicht/CGUIButton.cpp | 531 + .../irrlicht-1.8.1/source/Irrlicht/CGUIButton.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIButton.h | 143 + .../source/Irrlicht/CGUICheckBox.cpp | 205 + .../irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.h | 55 + .../source/Irrlicht/CGUIColorSelectDialog.cpp | 483 + .../source/Irrlicht/CGUIColorSelectDialog.d | 2 + .../source/Irrlicht/CGUIColorSelectDialog.h | 74 + .../source/Irrlicht/CGUIComboBox.cpp | 523 + .../irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.h | 117 + .../source/Irrlicht/CGUIContextMenu.cpp | 869 + .../source/Irrlicht/CGUIContextMenu.d | 2 + .../source/Irrlicht/CGUIContextMenu.h | 174 + .../irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.cpp | 1555 ++ .../irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.h | 182 + .../source/Irrlicht/CGUIEnvironment.cpp | 1658 ++ .../source/Irrlicht/CGUIEnvironment.d | 2 + .../source/Irrlicht/CGUIEnvironment.h | 323 + .../source/Irrlicht/CGUIFileOpenDialog.cpp | 446 + .../source/Irrlicht/CGUIFileOpenDialog.d | 2 + .../source/Irrlicht/CGUIFileOpenDialog.h | 84 + .../irrlicht-1.8.1/source/Irrlicht/CGUIFont.cpp | 589 + .../irrlicht-1.8.1/source/Irrlicht/CGUIFont.d | 1 + .../irrlicht-1.8.1/source/Irrlicht/CGUIFont.h | 118 + .../irrlicht-1.8.1/source/Irrlicht/CGUIImage.cpp | 164 + .../irrlicht-1.8.1/source/Irrlicht/CGUIImage.d | 1 + .../irrlicht-1.8.1/source/Irrlicht/CGUIImage.h | 75 + .../source/Irrlicht/CGUIImageList.cpp | 93 + .../irrlicht-1.8.1/source/Irrlicht/CGUIImageList.d | 26 + .../irrlicht-1.8.1/source/Irrlicht/CGUIImageList.h | 68 + .../source/Irrlicht/CGUIInOutFader.cpp | 179 + .../source/Irrlicht/CGUIInOutFader.d | 2 + .../source/Irrlicht/CGUIInOutFader.h | 75 + .../irrlicht-1.8.1/source/Irrlicht/CGUIListBox.cpp | 910 + .../irrlicht-1.8.1/source/Irrlicht/CGUIListBox.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIListBox.h | 190 + .../irrlicht-1.8.1/source/Irrlicht/CGUIMenu.cpp | 294 + .../irrlicht-1.8.1/source/Irrlicht/CGUIMenu.d | 1 + .../irrlicht-1.8.1/source/Irrlicht/CGUIMenu.h | 52 + .../source/Irrlicht/CGUIMeshViewer.cpp | 171 + .../source/Irrlicht/CGUIMeshViewer.d | 2 + .../source/Irrlicht/CGUIMeshViewer.h | 61 + .../source/Irrlicht/CGUIMessageBox.cpp | 463 + .../source/Irrlicht/CGUIMessageBox.d | 2 + .../source/Irrlicht/CGUIMessageBox.h | 64 + .../source/Irrlicht/CGUIModalScreen.cpp | 235 + .../source/Irrlicht/CGUIModalScreen.d | 2 + .../source/Irrlicht/CGUIModalScreen.h | 70 + .../source/Irrlicht/CGUIScrollBar.cpp | 569 + .../irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.h | 113 + .../irrlicht-1.8.1/source/Irrlicht/CGUISkin.cpp | 1019 + .../irrlicht-1.8.1/source/Irrlicht/CGUISkin.d | 1 + .../irrlicht-1.8.1/source/Irrlicht/CGUISkin.h | 249 + .../irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.cpp | 327 + .../irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.h | 108 + .../source/Irrlicht/CGUISpriteBank.cpp | 250 + .../source/Irrlicht/CGUISpriteBank.d | 2 + .../source/Irrlicht/CGUISpriteBank.h | 84 + .../source/Irrlicht/CGUIStaticText.cpp | 630 + .../source/Irrlicht/CGUIStaticText.d | 2 + .../source/Irrlicht/CGUIStaticText.h | 145 + .../source/Irrlicht/CGUITabControl.cpp | 1042 + .../source/Irrlicht/CGUITabControl.d | 2 + .../source/Irrlicht/CGUITabControl.h | 202 + .../irrlicht-1.8.1/source/Irrlicht/CGUITable.cpp | 1256 ++ .../irrlicht-1.8.1/source/Irrlicht/CGUITable.d | 1 + .../irrlicht-1.8.1/source/Irrlicht/CGUITable.h | 224 + .../irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.cpp | 176 + .../irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.h | 52 + .../source/Irrlicht/CGUITreeView.cpp | 1101 + .../irrlicht-1.8.1/source/Irrlicht/CGUITreeView.d | 19 + .../irrlicht-1.8.1/source/Irrlicht/CGUITreeView.h | 331 + .../irrlicht-1.8.1/source/Irrlicht/CGUIWindow.cpp | 404 + .../irrlicht-1.8.1/source/Irrlicht/CGUIWindow.d | 2 + .../irrlicht-1.8.1/source/Irrlicht/CGUIWindow.h | 99 + .../source/Irrlicht/CGeometryCreator.cpp | 892 + .../source/Irrlicht/CGeometryCreator.h | 65 + .../irrlicht-1.8.1/source/Irrlicht/CImage.cpp | 462 + src/others/irrlicht-1.8.1/source/Irrlicht/CImage.h | 127 + .../source/Irrlicht/CImageLoaderBMP.cpp | 372 + .../source/Irrlicht/CImageLoaderBMP.h | 100 + .../source/Irrlicht/CImageLoaderDDS.cpp | 712 + .../source/Irrlicht/CImageLoaderDDS.h | 296 + .../source/Irrlicht/CImageLoaderJPG.cpp | 306 + .../source/Irrlicht/CImageLoaderJPG.h | 116 + .../source/Irrlicht/CImageLoaderPCX.cpp | 231 + .../source/Irrlicht/CImageLoaderPCX.h | 82 + .../source/Irrlicht/CImageLoaderPNG.cpp | 290 + .../source/Irrlicht/CImageLoaderPNG.h | 45 + .../source/Irrlicht/CImageLoaderPPM.cpp | 277 + .../source/Irrlicht/CImageLoaderPPM.h | 55 + .../source/Irrlicht/CImageLoaderPSD.cpp | 375 + .../source/Irrlicht/CImageLoaderPSD.h | 72 + .../source/Irrlicht/CImageLoaderRGB.cpp | 654 + .../source/Irrlicht/CImageLoaderRGB.h | 165 + .../source/Irrlicht/CImageLoaderTGA.cpp | 239 + .../source/Irrlicht/CImageLoaderTGA.h | 82 + .../source/Irrlicht/CImageLoaderWAL.cpp | 285 + .../source/Irrlicht/CImageLoaderWAL.h | 100 + .../source/Irrlicht/CImageWriterBMP.cpp | 140 + .../source/Irrlicht/CImageWriterBMP.h | 37 + .../source/Irrlicht/CImageWriterJPG.cpp | 229 + .../source/Irrlicht/CImageWriterJPG.h | 37 + .../source/Irrlicht/CImageWriterPCX.cpp | 162 + .../source/Irrlicht/CImageWriterPCX.h | 37 + .../source/Irrlicht/CImageWriterPNG.cpp | 222 + .../source/Irrlicht/CImageWriterPNG.h | 37 + .../source/Irrlicht/CImageWriterPPM.cpp | 105 + .../source/Irrlicht/CImageWriterPPM.h | 37 + .../source/Irrlicht/CImageWriterPSD.cpp | 46 + .../source/Irrlicht/CImageWriterPSD.h | 37 + .../source/Irrlicht/CImageWriterTGA.cpp | 147 + .../source/Irrlicht/CImageWriterTGA.h | 37 + .../source/Irrlicht/CIrrDeviceConsole.cpp | 477 + .../source/Irrlicht/CIrrDeviceConsole.h | 330 + .../source/Irrlicht/CIrrDeviceFB.cpp | 405 + .../irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.h | 207 + .../source/Irrlicht/CIrrDeviceLinux.cpp | 2303 +++ .../source/Irrlicht/CIrrDeviceLinux.h | 452 + .../source/Irrlicht/CIrrDeviceSDL.cpp | 973 + .../irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.h | 235 + .../source/Irrlicht/CIrrDeviceStub.cpp | 429 + .../source/Irrlicht/CIrrDeviceStub.h | 186 + .../source/Irrlicht/CIrrDeviceWin32.cpp | 2068 ++ .../source/Irrlicht/CIrrDeviceWin32.h | 420 + .../source/Irrlicht/CIrrDeviceWinCE.cpp | 868 + .../source/Irrlicht/CIrrDeviceWinCE.h | 296 + .../source/Irrlicht/CIrrMeshFileLoader.cpp | 554 + .../source/Irrlicht/CIrrMeshFileLoader.h | 90 + .../source/Irrlicht/CIrrMeshWriter.cpp | 315 + .../source/Irrlicht/CIrrMeshWriter.h | 63 + .../source/Irrlicht/CLMTSMeshFileLoader.cpp | 373 + .../source/Irrlicht/CLMTSMeshFileLoader.h | 109 + .../source/Irrlicht/CLWOMeshFileLoader.cpp | 2114 ++ .../source/Irrlicht/CLWOMeshFileLoader.h | 87 + .../source/Irrlicht/CLightSceneNode.cpp | 275 + .../source/Irrlicht/CLightSceneNode.h | 108 + .../source/Irrlicht/CLimitReadFile.cpp | 127 + .../source/Irrlicht/CLimitReadFile.h | 62 + .../irrlicht-1.8.1/source/Irrlicht/CLogger.cpp | 102 + .../irrlicht-1.8.1/source/Irrlicht/CLogger.h | 56 + .../source/Irrlicht/CMD2MeshFileLoader.cpp | 364 + .../source/Irrlicht/CMD2MeshFileLoader.h | 45 + .../source/Irrlicht/CMD3MeshFileLoader.cpp | 53 + .../source/Irrlicht/CMD3MeshFileLoader.h | 49 + .../source/Irrlicht/CMS3DMeshFileLoader.cpp | 818 + .../source/Irrlicht/CMS3DMeshFileLoader.h | 49 + .../irrlicht-1.8.1/source/Irrlicht/CMY3DHelper.h | 447 + .../source/Irrlicht/CMY3DMeshFileLoader.cpp | 882 + .../source/Irrlicht/CMY3DMeshFileLoader.h | 131 + .../irrlicht-1.8.1/source/Irrlicht/CMemoryFile.cpp | 122 + .../irrlicht-1.8.1/source/Irrlicht/CMemoryFile.h | 62 + .../irrlicht-1.8.1/source/Irrlicht/CMeshCache.cpp | 178 + .../irrlicht-1.8.1/source/Irrlicht/CMeshCache.h | 123 + .../source/Irrlicht/CMeshManipulator.cpp | 1820 ++ .../source/Irrlicht/CMeshManipulator.h | 95 + .../source/Irrlicht/CMeshSceneNode.cpp | 447 + .../source/Irrlicht/CMeshSceneNode.h | 103 + .../source/Irrlicht/CMetaTriangleSelector.cpp | 188 + .../source/Irrlicht/CMetaTriangleSelector.h | 76 + .../source/Irrlicht/CMountPointReader.cpp | 175 + .../source/Irrlicht/CMountPointReader.h | 89 + .../irrlicht-1.8.1/source/Irrlicht/CNPKReader.cpp | 277 + .../irrlicht-1.8.1/source/Irrlicht/CNPKReader.h | 128 + .../irrlicht-1.8.1/source/Irrlicht/CNullDriver.cpp | 2448 +++ .../irrlicht-1.8.1/source/Irrlicht/CNullDriver.h | 849 + .../source/Irrlicht/COBJMeshFileLoader.cpp | 931 + .../source/Irrlicht/COBJMeshFileLoader.h | 122 + .../source/Irrlicht/COBJMeshWriter.cpp | 243 + .../source/Irrlicht/COBJMeshWriter.h | 58 + .../irrlicht-1.8.1/source/Irrlicht/COCTLoader.cpp | 336 + .../irrlicht-1.8.1/source/Irrlicht/COCTLoader.h | 141 + .../irrlicht-1.8.1/source/Irrlicht/COSOperator.cpp | 212 + .../irrlicht-1.8.1/source/Irrlicht/COSOperator.h | 60 + .../source/Irrlicht/COctreeSceneNode.cpp | 636 + .../source/Irrlicht/COctreeSceneNode.h | 115 + .../source/Irrlicht/COctreeTriangleSelector.cpp | 265 + .../source/Irrlicht/COctreeTriangleSelector.h | 80 + .../source/Irrlicht/COgreMeshFileLoader.cpp | 1592 ++ .../source/Irrlicht/COgreMeshFileLoader.h | 269 + .../source/Irrlicht/COpenGLCgMaterialRenderer.cpp | 244 + .../source/Irrlicht/COpenGLCgMaterialRenderer.h | 99 + .../source/Irrlicht/COpenGLDriver.cpp | 4830 +++++ .../irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.h | 613 + .../source/Irrlicht/COpenGLExtensionHandler.cpp | 804 + .../source/Irrlicht/COpenGLExtensionHandler.h | 2586 +++ .../source/Irrlicht/COpenGLMaterialRenderer.h | 756 + .../source/Irrlicht/COpenGLNormalMapRenderer.cpp | 291 + .../source/Irrlicht/COpenGLNormalMapRenderer.h | 49 + .../source/Irrlicht/COpenGLParallaxMapRenderer.cpp | 354 + .../source/Irrlicht/COpenGLParallaxMapRenderer.h | 55 + .../source/Irrlicht/COpenGLSLMaterialRenderer.cpp | 693 + .../source/Irrlicht/COpenGLSLMaterialRenderer.h | 141 + .../Irrlicht/COpenGLShaderMaterialRenderer.cpp | 339 + .../Irrlicht/COpenGLShaderMaterialRenderer.h | 97 + .../source/Irrlicht/COpenGLTexture.cpp | 963 + .../source/Irrlicht/COpenGLTexture.h | 205 + .../source/Irrlicht/CPLYMeshFileLoader.cpp | 817 + .../source/Irrlicht/CPLYMeshFileLoader.h | 148 + .../source/Irrlicht/CPLYMeshWriter.cpp | 183 + .../source/Irrlicht/CPLYMeshWriter.h | 35 + .../irrlicht-1.8.1/source/Irrlicht/CPakReader.cpp | 196 + .../irrlicht-1.8.1/source/Irrlicht/CPakReader.h | 125 + .../CParticleAnimatedMeshSceneNodeEmitter.cpp | 200 + .../CParticleAnimatedMeshSceneNodeEmitter.h | 161 + .../Irrlicht/CParticleAttractionAffector.cpp | 84 + .../source/Irrlicht/CParticleAttractionAffector.h | 87 + .../source/Irrlicht/CParticleBoxEmitter.cpp | 188 + .../source/Irrlicht/CParticleBoxEmitter.h | 133 + .../source/Irrlicht/CParticleCylinderEmitter.cpp | 187 + .../source/Irrlicht/CParticleCylinderEmitter.h | 164 + .../source/Irrlicht/CParticleFadeOutAffector.cpp | 70 + .../source/Irrlicht/CParticleFadeOutAffector.h | 63 + .../source/Irrlicht/CParticleGravityAffector.cpp | 64 + .../source/Irrlicht/CParticleGravityAffector.h | 64 + .../source/Irrlicht/CParticleMeshEmitter.cpp | 190 + .../source/Irrlicht/CParticleMeshEmitter.h | 160 + .../source/Irrlicht/CParticlePointEmitter.cpp | 147 + .../source/Irrlicht/CParticlePointEmitter.h | 123 + .../source/Irrlicht/CParticleRingEmitter.cpp | 177 + .../source/Irrlicht/CParticleRingEmitter.h | 148 + .../source/Irrlicht/CParticleRotationAffector.cpp | 67 + .../source/Irrlicht/CParticleRotationAffector.h | 56 + .../source/Irrlicht/CParticleScaleAffector.cpp | 53 + .../source/Irrlicht/CParticleScaleAffector.h | 44 + .../source/Irrlicht/CParticleSphereEmitter.cpp | 175 + .../source/Irrlicht/CParticleSphereEmitter.h | 141 + .../source/Irrlicht/CParticleSystemSceneNode.cpp | 721 + .../source/Irrlicht/CParticleSystemSceneNode.h | 239 + .../source/Irrlicht/CQ3LevelMesh.cpp | 2082 ++ .../irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.h | 491 + .../source/Irrlicht/CQuake3ShaderSceneNode.cpp | 1376 ++ .../source/Irrlicht/CQuake3ShaderSceneNode.h | 118 + .../irrlicht-1.8.1/source/Irrlicht/CReadFile.cpp | 114 + .../irrlicht-1.8.1/source/Irrlicht/CReadFile.h | 64 + .../source/Irrlicht/CSMFMeshFileLoader.cpp | 232 + .../source/Irrlicht/CSMFMeshFileLoader.h | 67 + .../source/Irrlicht/CSTLMeshFileLoader.cpp | 253 + .../source/Irrlicht/CSTLMeshFileLoader.h | 49 + .../source/Irrlicht/CSTLMeshWriter.cpp | 187 + .../source/Irrlicht/CSTLMeshWriter.h | 55 + .../source/Irrlicht/CSceneCollisionManager.cpp | 960 + .../source/Irrlicht/CSceneCollisionManager.h | 158 + .../source/Irrlicht/CSceneLoaderIrr.cpp | 284 + .../source/Irrlicht/CSceneLoaderIrr.h | 82 + .../source/Irrlicht/CSceneManager.cpp | 2522 +++ .../irrlicht-1.8.1/source/Irrlicht/CSceneManager.h | 659 + .../Irrlicht/CSceneNodeAnimatorCameraFPS.cpp | 355 + .../source/Irrlicht/CSceneNodeAnimatorCameraFPS.h | 123 + .../Irrlicht/CSceneNodeAnimatorCameraMaya.cpp | 317 + .../source/Irrlicht/CSceneNodeAnimatorCameraMaya.h | 116 + .../CSceneNodeAnimatorCollisionResponse.cpp | 303 + .../Irrlicht/CSceneNodeAnimatorCollisionResponse.h | 157 + .../source/Irrlicht/CSceneNodeAnimatorDelete.cpp | 51 + .../source/Irrlicht/CSceneNodeAnimatorDelete.h | 46 + .../Irrlicht/CSceneNodeAnimatorFlyCircle.cpp | 100 + .../source/Irrlicht/CSceneNodeAnimatorFlyCircle.h | 64 + .../Irrlicht/CSceneNodeAnimatorFlyStraight.cpp | 112 + .../Irrlicht/CSceneNodeAnimatorFlyStraight.h | 60 + .../Irrlicht/CSceneNodeAnimatorFollowSpline.cpp | 161 + .../Irrlicht/CSceneNodeAnimatorFollowSpline.h | 63 + .../source/Irrlicht/CSceneNodeAnimatorRotation.cpp | 73 + .../source/Irrlicht/CSceneNodeAnimatorRotation.h | 49 + .../source/Irrlicht/CSceneNodeAnimatorTexture.cpp | 140 + .../source/Irrlicht/CSceneNodeAnimatorTexture.h | 59 + .../source/Irrlicht/CShadowVolumeSceneNode.cpp | 419 + .../source/Irrlicht/CShadowVolumeSceneNode.h | 87 + .../source/Irrlicht/CSkinnedMesh.cpp | 1471 ++ .../irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.h | 215 + .../source/Irrlicht/CSkyBoxSceneNode.cpp | 263 + .../source/Irrlicht/CSkyBoxSceneNode.h | 62 + .../source/Irrlicht/CSkyDomeSceneNode.cpp | 264 + .../source/Irrlicht/CSkyDomeSceneNode.h | 50 + .../source/Irrlicht/CSoftware2MaterialRenderer.h | 118 + .../source/Irrlicht/CSoftwareDriver.cpp | 973 + .../source/Irrlicht/CSoftwareDriver.h | 180 + .../source/Irrlicht/CSoftwareDriver2.cpp | 2723 +++ .../source/Irrlicht/CSoftwareDriver2.h | 290 + .../source/Irrlicht/CSoftwareTexture.cpp | 151 + .../source/Irrlicht/CSoftwareTexture.h | 76 + .../source/Irrlicht/CSoftwareTexture2.cpp | 156 + .../source/Irrlicht/CSoftwareTexture2.h | 141 + .../source/Irrlicht/CSphereSceneNode.cpp | 199 + .../source/Irrlicht/CSphereSceneNode.h | 96 + .../irrlicht-1.8.1/source/Irrlicht/CTRFlat.cpp | 300 + .../irrlicht-1.8.1/source/Irrlicht/CTRFlatWire.cpp | 281 + .../irrlicht-1.8.1/source/Irrlicht/CTRGouraud.cpp | 358 + .../irrlicht-1.8.1/source/Irrlicht/CTRGouraud2.cpp | 645 + .../source/Irrlicht/CTRGouraudAlpha2.cpp | 657 + .../source/Irrlicht/CTRGouraudAlphaNoZ2.cpp | 654 + .../source/Irrlicht/CTRGouraudWire.cpp | 326 + .../source/Irrlicht/CTRNormalMap.cpp | 848 + .../source/Irrlicht/CTRStencilShadow.cpp | 930 + .../source/Irrlicht/CTRTextureBlend.cpp | 2385 +++ .../source/Irrlicht/CTRTextureDetailMap2.cpp | 659 + .../source/Irrlicht/CTRTextureFlat.cpp | 339 + .../source/Irrlicht/CTRTextureFlatWire.cpp | 313 + .../source/Irrlicht/CTRTextureGouraud.cpp | 468 + .../source/Irrlicht/CTRTextureGouraud.h | 85 + .../source/Irrlicht/CTRTextureGouraud2.cpp | 674 + .../source/Irrlicht/CTRTextureGouraudAdd.cpp | 419 + .../source/Irrlicht/CTRTextureGouraudAdd2.cpp | 680 + .../source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp | 645 + .../source/Irrlicht/CTRTextureGouraudAlpha.cpp | 744 + .../source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp | 745 + .../source/Irrlicht/CTRTextureGouraudNoZ.cpp | 367 + .../source/Irrlicht/CTRTextureGouraudNoZ2.cpp | 647 + .../Irrlicht/CTRTextureGouraudVertexAlpha2.cpp | 690 + .../source/Irrlicht/CTRTextureGouraudWire.cpp | 364 + .../source/Irrlicht/CTRTextureLightMap2_Add.cpp | 672 + .../source/Irrlicht/CTRTextureLightMap2_M1.cpp | 644 + .../source/Irrlicht/CTRTextureLightMap2_M2.cpp | 644 + .../source/Irrlicht/CTRTextureLightMap2_M4.cpp | 1154 ++ .../Irrlicht/CTRTextureLightMapGouraud2_M4.cpp | 690 + .../source/Irrlicht/CTRTextureWire2.cpp | 298 + .../irrlicht-1.8.1/source/Irrlicht/CTarReader.cpp | 258 + .../irrlicht-1.8.1/source/Irrlicht/CTarReader.h | 133 + .../source/Irrlicht/CTerrainSceneNode.cpp | 1502 ++ .../source/Irrlicht/CTerrainSceneNode.h | 330 + .../source/Irrlicht/CTerrainTriangleSelector.cpp | 234 + .../source/Irrlicht/CTerrainTriangleSelector.h | 100 + .../source/Irrlicht/CTextSceneNode.cpp | 471 + .../source/Irrlicht/CTextSceneNode.h | 160 + src/others/irrlicht-1.8.1/source/Irrlicht/CTimer.h | 108 + .../source/Irrlicht/CTriangleBBSelector.cpp | 80 + .../source/Irrlicht/CTriangleBBSelector.h | 43 + .../source/Irrlicht/CTriangleSelector.cpp | 298 + .../source/Irrlicht/CTriangleSelector.h | 92 + .../source/Irrlicht/CVideoModeList.cpp | 132 + .../source/Irrlicht/CVideoModeList.h | 79 + .../source/Irrlicht/CVolumeLightSceneNode.cpp | 202 + .../source/Irrlicht/CVolumeLightSceneNode.h | 93 + .../irrlicht-1.8.1/source/Irrlicht/CWADReader.cpp | 263 + .../irrlicht-1.8.1/source/Irrlicht/CWADReader.h | 177 + .../source/Irrlicht/CWaterSurfaceSceneNode.cpp | 137 + .../source/Irrlicht/CWaterSurfaceSceneNode.h | 61 + .../irrlicht-1.8.1/source/Irrlicht/CWriteFile.cpp | 123 + .../irrlicht-1.8.1/source/Irrlicht/CWriteFile.h | 58 + .../irrlicht-1.8.1/source/Irrlicht/CXMLReader.cpp | 70 + .../irrlicht-1.8.1/source/Irrlicht/CXMLReader.h | 26 + .../source/Irrlicht/CXMLReaderImpl.h | 821 + .../irrlicht-1.8.1/source/Irrlicht/CXMLWriter.cpp | 257 + .../irrlicht-1.8.1/source/Irrlicht/CXMLWriter.h | 76 + .../source/Irrlicht/CXMeshFileLoader.cpp | 2423 +++ .../source/Irrlicht/CXMeshFileLoader.h | 198 + .../irrlicht-1.8.1/source/Irrlicht/CZBuffer.cpp | 109 + .../irrlicht-1.8.1/source/Irrlicht/CZBuffer.h | 52 + .../irrlicht-1.8.1/source/Irrlicht/CZipReader.cpp | 839 + .../irrlicht-1.8.1/source/Irrlicht/CZipReader.h | 227 + .../irrlicht-1.8.1/source/Irrlicht/IAttribute.h | 107 + .../source/Irrlicht/IBurningShader.cpp | 120 + .../source/Irrlicht/IBurningShader.h | 201 + .../irrlicht-1.8.1/source/Irrlicht/IDepthBuffer.h | 82 + .../source/Irrlicht/IImagePresenter.h | 36 + .../source/Irrlicht/ISceneNodeAnimatorFinishing.h | 36 + .../source/Irrlicht/ITriangleRenderer.h | 68 + .../irrlicht-1.8.1/source/Irrlicht/IZBuffer.h | 47 + .../source/Irrlicht/Irrlicht-gcc.cbp | 1323 ++ .../irrlicht-1.8.1/source/Irrlicht/Irrlicht.aps | Bin 0 -> 61604 bytes .../irrlicht-1.8.1/source/Irrlicht/Irrlicht.cpp | 154 + .../irrlicht-1.8.1/source/Irrlicht/Irrlicht.dev | 6630 ++++++ .../irrlicht-1.8.1/source/Irrlicht/Irrlicht.rc | Bin 0 -> 4598 bytes .../source/Irrlicht/Irrlicht10.0.sln | 50 + .../source/Irrlicht/Irrlicht10.0.vcxproj | 1555 ++ .../source/Irrlicht/Irrlicht10.0.vcxproj.filters | 2247 ++ .../source/Irrlicht/Irrlicht11.0.sln | 50 + .../source/Irrlicht/Irrlicht11.0.vcxproj | 1563 ++ .../source/Irrlicht/Irrlicht11.0.vcxproj.filters | 2247 ++ .../irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.sln | 29 + .../source/Irrlicht/Irrlicht8.0.vcproj | 3512 ++++ .../irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.sln | 32 + .../source/Irrlicht/Irrlicht9.0.vcproj | 3656 ++++ .../source/Irrlicht/Irrlicht_mobile6.sln | 22 + .../source/Irrlicht/Irrlicht_mobile6.vcproj | 3085 +++ .../source/Irrlicht/Irrlicht_xbox.sln | 30 + .../source/Irrlicht/Irrlicht_xbox.vcproj | 1987 ++ .../source/Irrlicht/MacOSX/._MainMenu.nib | Bin 0 -> 82 bytes .../source/Irrlicht/MacOSX/AppDelegate.h | 24 + .../source/Irrlicht/MacOSX/AppDelegate.mm | 79 + .../source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h | 251 + .../source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm | 1889 ++ .../source/Irrlicht/MacOSX/DemoApp-Info.plist | 24 + .../source/Irrlicht/MacOSX/Irrlicht-Info.plist | 20 + .../MacOSX/MacOSX.xcodeproj/project.pbxproj | 7232 +++++++ .../source/Irrlicht/MacOSX/MacOSX_Prefix.pch | 5 + .../Irrlicht/MacOSX/MainMenu.nib/classes.nib | 4 + .../source/Irrlicht/MacOSX/MainMenu.nib/info.nib | 17 + .../Irrlicht/MacOSX/MainMenu.nib/keyedobjects.nib | Bin 0 -> 13030 bytes .../source/Irrlicht/MacOSX/OSXClipboard.h | 15 + .../source/Irrlicht/MacOSX/OSXClipboard.mm | 36 + .../source/Irrlicht/MacOSX/irrFramework-Info.plist | 20 + src/others/irrlicht-1.8.1/source/Irrlicht/Makefile | 203 + src/others/irrlicht-1.8.1/source/Irrlicht/Octree.h | 388 + .../irrlicht-1.8.1/source/Irrlicht/S2DVertex.h | 30 + .../irrlicht-1.8.1/source/Irrlicht/S4DVertex.h | 693 + .../irrlicht-1.8.1/source/Irrlicht/SConstruct | 102 + .../Irrlicht/SoftwareDriver2_compile_config.h | 104 + .../source/Irrlicht/SoftwareDriver2_helper.h | 1042 + .../source/Irrlicht/aesGladman/Readme.txt | 25 + .../source/Irrlicht/aesGladman/aes.h | 137 + .../source/Irrlicht/aesGladman/aescrypt.cpp | 303 + .../source/Irrlicht/aesGladman/aeskey.cpp | 455 + .../source/Irrlicht/aesGladman/aesopt.h | 955 + .../source/Irrlicht/aesGladman/aestab.cpp | 223 + .../source/Irrlicht/aesGladman/fileenc.cpp | 140 + .../source/Irrlicht/aesGladman/fileenc.h | 114 + .../source/Irrlicht/aesGladman/hmac.cpp | 142 + .../source/Irrlicht/aesGladman/hmac.h | 95 + .../source/Irrlicht/aesGladman/prng.cpp | 146 + .../source/Irrlicht/aesGladman/prng.h | 74 + .../source/Irrlicht/aesGladman/pwd2key.cpp | 186 + .../source/Irrlicht/aesGladman/pwd2key.h | 50 + .../source/Irrlicht/aesGladman/sha1.cpp | 237 + .../source/Irrlicht/aesGladman/sha1.h | 68 + .../source/Irrlicht/aesGladman/sha2.cpp | 626 + .../source/Irrlicht/aesGladman/sha2.h | 160 + .../irrlicht-1.8.1/source/Irrlicht/builtInFont.bmp | Bin 0 -> 8266 bytes .../irrlicht-1.8.1/source/Irrlicht/bzip2/CHANGES | 327 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/LICENSE | 42 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile | 217 + .../source/Irrlicht/bzip2/Makefile-libbz2_so | 59 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/README | 215 + .../Irrlicht/bzip2/README.COMPILATION.PROBLEMS | 58 + .../source/Irrlicht/bzip2/README.XML.STUFF | 45 + .../source/Irrlicht/bzip2/blocksort.c | 1094 + .../source/Irrlicht/bzip2/bz-common.xsl | 39 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bz-fo.xsl | 276 + .../source/Irrlicht/bzip2/bz-html.xsl | 20 + .../source/Irrlicht/bzip2/bzcompress.c | 672 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff | 76 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff.1 | 47 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep | 75 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep.1 | 56 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzip.css | 74 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1 | 454 + .../source/Irrlicht/bzip2/bzip2.1.preformatted | 399 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.c | 2034 ++ .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.txt | 391 + .../source/Irrlicht/bzip2/bzip2recover.c | 514 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.c | 1580 ++ .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h | 285 + .../source/Irrlicht/bzip2/bzlib_private.h | 509 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore | 61 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore.1 | 152 + .../source/Irrlicht/bzip2/crctable.c | 104 + .../source/Irrlicht/bzip2/decompress.c | 646 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.c | 175 + .../source/Irrlicht/bzip2/dlltest.dsp | 93 + .../source/Irrlicht/bzip2/entities.xml | 9 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl | 68 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/huffman.c | 205 + .../source/Irrlicht/bzip2/libbz2.def | 27 + .../source/Irrlicht/bzip2/libbz2.dsp | 130 + .../source/Irrlicht/bzip2/makefile.msc | 63 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/mk251.c | 31 + .../source/Irrlicht/bzip2/randtable.c | 84 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/spewG.c | 54 + .../source/Irrlicht/bzip2/unzcrash.c | 141 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/words0 | 9 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/words1 | 4 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/words2 | 5 + .../irrlicht-1.8.1/source/Irrlicht/bzip2/words3 | 30 + .../source/Irrlicht/bzip2/xmlproc.sh | 114 + .../irrlicht-1.8.1/source/Irrlicht/dmfsupport.h | 732 + src/others/irrlicht-1.8.1/source/Irrlicht/glext.h | 11488 ++++++++++ src/others/irrlicht-1.8.1/source/Irrlicht/glxext.h | 993 + .../irrlicht-1.8.1/source/Irrlicht/irrXML.cpp | 180 + .../irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.c | 999 + .../irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.h | 231 + .../irrlicht-1.8.1/source/Irrlicht/lzma/Types.h | 254 + src/others/irrlicht-1.8.1/source/Irrlicht/os.cpp | 347 + src/others/irrlicht-1.8.1/source/Irrlicht/os.h | 131 + .../irrlicht-1.8.1/source/Irrlicht/resource.h | 14 + .../irrlicht-1.8.1/source/Irrlicht/source.txt | 40 + src/others/irrlicht-1.8.1/source/Irrlicht/wglext.h | 929 + src/others/irrlicht-1.8.1/source/source.txt | 53 + .../tools/FileToHeader/FileToHeader.cbp | 48 + .../irrlicht-1.8.1/tools/FileToHeader/Makefile | 35 + .../irrlicht-1.8.1/tools/FileToHeader/main.cpp | 175 + .../irrlicht-1.8.1/tools/GUIEditor/CGUIAttribute.h | 169 + .../tools/GUIEditor/CGUIAttributeEditor.cpp | 120 + .../tools/GUIEditor/CGUIAttributeEditor.h | 54 + .../tools/GUIEditor/CGUIBoolAttribute.h | 68 + .../tools/GUIEditor/CGUIColorAttribute.h | 179 + .../tools/GUIEditor/CGUIDummyEditorStub.h | 59 + .../tools/GUIEditor/CGUIEditFactory.cpp | 120 + .../tools/GUIEditor/CGUIEditFactory.h | 53 + .../tools/GUIEditor/CGUIEditWindow.cpp | 356 + .../tools/GUIEditor/CGUIEditWindow.h | 88 + .../tools/GUIEditor/CGUIEditWorkspace.cpp | 927 + .../tools/GUIEditor/CGUIEditWorkspace.h | 168 + .../tools/GUIEditor/CGUIEnumAttribute.h | 114 + .../irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.cpp | 340 + .../irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.h | 128 + .../tools/GUIEditor/CGUIStringAttribute.h | 70 + .../tools/GUIEditor/CGUITextureAttribute.h | 140 + .../tools/GUIEditor/CGUITextureCacheBrowser.cpp | 336 + .../tools/GUIEditor/CGUITextureCacheBrowser.h | 88 + .../tools/GUIEditor/CMemoryReadWriteFile.cpp | 95 + .../tools/GUIEditor/CMemoryReadWriteFile.h | 73 + .../irrlicht-1.8.1/tools/GUIEditor/EGUIEditTypes.h | 61 + .../tools/GUIEditor/GUI Editor_v8.sln | 20 + .../tools/GUIEditor/GUI Editor_v8.vcproj | 295 + .../tools/GUIEditor/GUI Editor_v9.sln | 20 + .../tools/GUIEditor/GUI Editor_v9.vcproj | 293 + .../tools/GUIEditor/GUI Editor_vc10.vcxproj | 213 + .../GUIEditor/GUI Editor_vc10.vcxproj.filters | 88 + .../tools/GUIEditor/GUI Editor_vc11.vcxproj | 217 + .../GUIEditor/GUI Editor_vc11.vcxproj.filters | 88 + .../tools/GUIEditor/GUIEditor_gcc.cbp | 77 + src/others/irrlicht-1.8.1/tools/GUIEditor/Makefile | 43 + src/others/irrlicht-1.8.1/tools/GUIEditor/main.cpp | 76 + .../tools/IrrFontTool/newFontTool/CFontTool.cpp | 801 + .../tools/IrrFontTool/newFontTool/CFontTool.h | 78 + .../IrrFontTool/newFontTool/CVectorFontTool.h | 1199 ++ .../tools/IrrFontTool/newFontTool/Makefile | 38 + .../IrrFontTool/newFontTool/irrFontTool_v8.sln | 20 + .../IrrFontTool/newFontTool/irrFontTool_v8.vcproj | 201 + .../IrrFontTool/newFontTool/irrFontTool_v9.sln | 20 + .../IrrFontTool/newFontTool/irrFontTool_v9.vcproj | 202 + .../IrrFontTool/newFontTool/irrFontTool_vc10.sln | 20 + .../newFontTool/irrFontTool_vc10.vcxproj | 203 + .../IrrFontTool/newFontTool/irrFontTool_vc11.sln | 20 + .../newFontTool/irrFontTool_vc11.vcxproj | 207 + .../tools/IrrFontTool/newFontTool/main.cpp | 493 + .../tools/IrrFontTool/oldFontTool/source.zip | Bin 0 -> 37849 bytes .../irrlicht-1.8.1/tools/IrrFontTool/readme.txt | 13 + .../irrlicht-1.8.1/tools/MeshConverter/Makefile | 38 + .../tools/MeshConverter/MeshConverter.cbp | 54 + .../tools/MeshConverter/MeshConverter_v9.vcproj | 187 + .../tools/MeshConverter/MeshConverter_vc10.vcxproj | 192 + .../tools/MeshConverter/MeshConverter_vc11.vcxproj | 196 + .../irrlicht-1.8.1/tools/MeshConverter/main.cpp | 108 + .../irrlicht-1.8.1/tools/irrEdit/irrEdit.jpg | Bin 0 -> 41602 bytes .../irrlicht-1.8.1/tools/irrEdit/irrEdit.txt | 7 + 2593 files changed, 754838 insertions(+), 2 deletions(-) create mode 100644 src/others/irrlicht-1.8.1/bin/Linux/readme.txt create mode 100644 src/others/irrlicht-1.8.1/bin/MacOSX/readme.txt create mode 100644 src/others/irrlicht-1.8.1/bin/Win32-VisualStudio/irrlicht.ico create mode 100644 src/others/irrlicht-1.8.1/bin/Win32-gcc/irrlicht.ico create mode 100644 src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/irrlicht.ico create mode 100644 src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/readme.txt create mode 100644 src/others/irrlicht-1.8.1/changes.txt create mode 100644 src/others/irrlicht-1.8.1/doc/aesGladman.txt create mode 100644 src/others/irrlicht-1.8.1/doc/bzip2-license.txt create mode 100644 src/others/irrlicht-1.8.1/doc/html/001shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/002shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/003shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/004shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/005shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/006shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/007shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/008shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/009shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/010shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/011shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/012shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/013shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/014shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/015shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/016shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/017shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/018shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/019shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/020shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/021shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/022shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/023shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/024shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/025shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/026shot.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_image_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_image_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_logger_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_logger_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_texture_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_texture_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_timer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_timer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_keycodes_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_keycodes_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_color_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_color_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_light_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_light_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_material_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_material_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_particle_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_particle_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/annotated.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/bc_s.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classes.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_base.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/closed.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/coreutil_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/coreutil_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/deprecated.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/dimension2d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/dimension2d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/doxygen.css create mode 100644 src/others/irrlicht-1.8.1/doc/html/doxygen.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/driver_choice_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/driver_choice_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/dynsections.js create mode 100644 src/others/irrlicht-1.8.1/doc/html/example001.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example002.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example003.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example004.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example005.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example006.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example007.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example008.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example009.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example010.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example011.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example012.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example013.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example014.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example015.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example016.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example017.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example018.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example019.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example020.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example021.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example022.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example023.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example024.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example025.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/example026.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/fast__atof_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/fast__atof_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/files.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2blank.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2doc.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2folderclosed.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2folderopen.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2lastnode.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2link.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2mlastnode.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2mnode.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2node.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2plastnode.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2pnode.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2splitbar.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/ftv2vertline.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x6a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x71.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x79.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x7a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_0x7e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_enum.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_eval.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x6a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x71.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x79.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_func_0x7e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_rela.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_type.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x79.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/functions_vars_0x7a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/globals.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/globals_defs.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/heapsort_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/heapsort_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/hierarchy.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/index.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/installdox create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_array_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_array_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_list_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_list_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_map_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_map_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_math_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_math_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_string_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_string_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_types_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_types_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrlicht.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrlicht_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrlicht_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrlichtlogo.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrpack_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrpack_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrunpack_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/irrunpack_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/jquery.js create mode 100644 src/others/irrlicht-1.8.1/doc/html/line2d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/line2d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/line3d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/line3d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/logobig.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/matrix4_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/matrix4_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1core.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1gui.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1io.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene_1_1quake3.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1video.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_enum.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_func.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_type.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespacemembers_vars.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/namespaces.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/nav_f.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/nav_h.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/navtree.css create mode 100644 src/others/irrlicht-1.8.1/doc/html/navtree.js create mode 100644 src/others/irrlicht-1.8.1/doc/html/open.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/pages.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/path_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/path_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/plane3d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/plane3d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/position2d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/position2d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/quaternion_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/quaternion_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/rect_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/rect_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/resize.js create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_5f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_6a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_71.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_79.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_7a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/all_7e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_71.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/classes_78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/close.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_5f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/defines_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enums_65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enums_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/enumvalues_77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_71.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/files_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_6a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_71.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_79.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/functions_7e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/mag_sel.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/namespaces_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/nomatches.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/related_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/related_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/related_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/related_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/related_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/search.css create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/search.js create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/search_l.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/search_m.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/search_r.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/typedefs_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_61.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_62.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_63.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_64.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_65.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_66.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_67.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_68.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_69.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_6a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_6b.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_6c.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_6d.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_6e.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_6f.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_70.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_72.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_73.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_74.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_75.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_76.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_77.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_78.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_79.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/search/variables_7a.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/tab_a.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/tab_b.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/tab_h.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/tab_s.png create mode 100644 src/others/irrlicht-1.8.1/doc/html/tabs.css create mode 100644 src/others/irrlicht-1.8.1/doc/html/triangle3d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/triangle3d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/tut_8txt.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat-members.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/vc6include.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/vc6optionsdir.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/vcnetinclude.jpg create mode 100644 src/others/irrlicht-1.8.1/doc/html/vector2d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/vector3d_8h.html create mode 100644 src/others/irrlicht-1.8.1/doc/html/vector3d_8h_source.html create mode 100644 src/others/irrlicht-1.8.1/doc/irrlicht-license.txt create mode 100644 src/others/irrlicht-1.8.1/doc/jpglib-license.txt create mode 100644 src/others/irrlicht-1.8.1/doc/libpng-license.txt create mode 100644 src/others/irrlicht-1.8.1/doc/readme.txt create mode 100644 src/others/irrlicht-1.8.1/doc/upgrade-guide.txt create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.dev create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/01.HelloWorld/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.dev create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/02.Quake3Map/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.dev create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement.dev create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.dev create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/05.UserInterface/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.dev create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/06.2DGraphics/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision.dev create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/07.Collision/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.dev create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/08.SpecialFX/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/9.Meshviewer.rc create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/MeshViewer.dev create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/icon.ico create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/resource.h create mode 100644 src/others/irrlicht-1.8.1/examples/09.Meshviewer/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.dev create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/10.Shaders/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.dev create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.dev create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/12.TerrainRendering/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.dev create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/13.RenderToTexture/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.dev create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/14.Win32Window/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.dev create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.dev create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.dev create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/18.SplitScreen/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.dev create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.dev create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/20.ManagedLights/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.dev create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.h create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.h create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/24.CursorControl/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/25.XmlHandling/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.dev create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist create mode 100644 src/others/irrlicht-1.8.1/examples/BuildAllExamples.workspace create mode 100644 src/others/irrlicht-1.8.1/examples/BuildAllExamples_v8.sln create mode 100644 src/others/irrlicht-1.8.1/examples/BuildAllExamples_v9.sln create mode 100644 src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc10.sln create mode 100644 src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc11.sln create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/CDemo.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/CDemo.h create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.h create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/Demo.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/Demo_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/Demo_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/Demo_vc8.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/Demo_vc9.vcproj create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/Makefile create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/demo.cbp create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/demo.dev create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/icon.ico create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/main.cpp create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/resource.h create mode 100644 src/others/irrlicht-1.8.1/examples/Demo/resscript.rc create mode 100644 src/others/irrlicht-1.8.1/examples/Makefile create mode 100755 src/others/irrlicht-1.8.1/examples/buildAllExamples.sh create mode 100644 src/others/irrlicht-1.8.1/examples/whereAreTheBinaries.txt create mode 100644 src/others/irrlicht-1.8.1/include/CDynamicMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/CIndexBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/CMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/CVertexBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/EAttributes.h create mode 100644 src/others/irrlicht-1.8.1/include/ECullingTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EDebugSceneTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EDeviceTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EDriverFeatures.h create mode 100644 src/others/irrlicht-1.8.1/include/EDriverTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EGUIAlignment.h create mode 100644 src/others/irrlicht-1.8.1/include/EGUIElementTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EHardwareBufferFlags.h create mode 100644 src/others/irrlicht-1.8.1/include/EMaterialFlags.h create mode 100644 src/others/irrlicht-1.8.1/include/EMaterialTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EMeshWriterEnums.h create mode 100644 src/others/irrlicht-1.8.1/include/EMessageBoxFlags.h create mode 100644 src/others/irrlicht-1.8.1/include/EPrimitiveTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/ESceneNodeTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/EShaderTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/ETerrainElements.h create mode 100644 src/others/irrlicht-1.8.1/include/IAnimatedMesh.h create mode 100644 src/others/irrlicht-1.8.1/include/IAnimatedMeshMD2.h create mode 100644 src/others/irrlicht-1.8.1/include/IAnimatedMeshMD3.h create mode 100644 src/others/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IAttributeExchangingObject.h create mode 100644 src/others/irrlicht-1.8.1/include/IAttributes.h create mode 100644 src/others/irrlicht-1.8.1/include/IBillboardSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IBillboardTextSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IBoneSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/ICameraSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IColladaMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/include/ICursorControl.h create mode 100644 src/others/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IDynamicMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/IEventReceiver.h create mode 100644 src/others/irrlicht-1.8.1/include/IFileArchive.h create mode 100644 src/others/irrlicht-1.8.1/include/IFileList.h create mode 100644 src/others/irrlicht-1.8.1/include/IFileSystem.h create mode 100644 src/others/irrlicht-1.8.1/include/IGPUProgrammingServices.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIButton.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUICheckBox.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIColorSelectDialog.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIComboBox.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIContextMenu.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIEditBox.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIElement.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIElementFactory.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIEnvironment.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIFileOpenDialog.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIFont.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIFontBitmap.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIImage.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIImageList.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIInOutFader.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIListBox.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIMeshViewer.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIScrollBar.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUISkin.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUISpinBox.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUISpriteBank.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIStaticText.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUITabControl.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUITable.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIToolbar.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUITreeView.h create mode 100644 src/others/irrlicht-1.8.1/include/IGUIWindow.h create mode 100644 src/others/irrlicht-1.8.1/include/IGeometryCreator.h create mode 100644 src/others/irrlicht-1.8.1/include/IImage.h create mode 100644 src/others/irrlicht-1.8.1/include/IImageLoader.h create mode 100644 src/others/irrlicht-1.8.1/include/IImageWriter.h create mode 100644 src/others/irrlicht-1.8.1/include/IIndexBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/ILightManager.h create mode 100644 src/others/irrlicht-1.8.1/include/ILightSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/ILogger.h create mode 100644 src/others/irrlicht-1.8.1/include/IMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/include/IMaterialRendererServices.h create mode 100644 src/others/irrlicht-1.8.1/include/IMesh.h create mode 100644 src/others/irrlicht-1.8.1/include/IMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/IMeshCache.h create mode 100644 src/others/irrlicht-1.8.1/include/IMeshLoader.h create mode 100644 src/others/irrlicht-1.8.1/include/IMeshManipulator.h create mode 100644 src/others/irrlicht-1.8.1/include/IMeshSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/include/IMetaTriangleSelector.h create mode 100644 src/others/irrlicht-1.8.1/include/IOSOperator.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleAffector.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleAttractionAffector.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleBoxEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleCylinderEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleFadeOutAffector.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleGravityAffector.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleMeshEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleRingEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleRotationAffector.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleSphereEmitter.h create mode 100644 src/others/irrlicht-1.8.1/include/IParticleSystemSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IQ3LevelMesh.h create mode 100644 src/others/irrlicht-1.8.1/include/IQ3Shader.h create mode 100644 src/others/irrlicht-1.8.1/include/IRandomizer.h create mode 100644 src/others/irrlicht-1.8.1/include/IReadFile.h create mode 100644 src/others/irrlicht-1.8.1/include/IReferenceCounted.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneCollisionManager.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneLoader.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneManager.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneNodeFactory.h create mode 100644 src/others/irrlicht-1.8.1/include/ISceneUserDataSerializer.h create mode 100644 src/others/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h create mode 100644 src/others/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/ISkinnedMesh.h create mode 100644 src/others/irrlicht-1.8.1/include/ITerrainSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/ITextSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/ITexture.h create mode 100644 src/others/irrlicht-1.8.1/include/ITimer.h create mode 100644 src/others/irrlicht-1.8.1/include/ITriangleSelector.h create mode 100644 src/others/irrlicht-1.8.1/include/IVertexBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/IVideoDriver.h create mode 100644 src/others/irrlicht-1.8.1/include/IVideoModeList.h create mode 100644 src/others/irrlicht-1.8.1/include/IVolumeLightSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/include/IWriteFile.h create mode 100644 src/others/irrlicht-1.8.1/include/IXMLReader.h create mode 100644 src/others/irrlicht-1.8.1/include/IXMLWriter.h create mode 100644 src/others/irrlicht-1.8.1/include/IrrCompileConfig.h create mode 100644 src/others/irrlicht-1.8.1/include/IrrlichtDevice.h create mode 100644 src/others/irrlicht-1.8.1/include/Keycodes.h create mode 100644 src/others/irrlicht-1.8.1/include/S3DVertex.h create mode 100644 src/others/irrlicht-1.8.1/include/SAnimatedMesh.h create mode 100644 src/others/irrlicht-1.8.1/include/SColor.h create mode 100644 src/others/irrlicht-1.8.1/include/SExposedVideoData.h create mode 100644 src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h create mode 100644 src/others/irrlicht-1.8.1/include/SKeyMap.h create mode 100644 src/others/irrlicht-1.8.1/include/SLight.h create mode 100644 src/others/irrlicht-1.8.1/include/SMaterial.h create mode 100644 src/others/irrlicht-1.8.1/include/SMaterialLayer.h create mode 100644 src/others/irrlicht-1.8.1/include/SMesh.h create mode 100644 src/others/irrlicht-1.8.1/include/SMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/SMeshBufferLightMap.h create mode 100644 src/others/irrlicht-1.8.1/include/SMeshBufferTangents.h create mode 100644 src/others/irrlicht-1.8.1/include/SParticle.h create mode 100644 src/others/irrlicht-1.8.1/include/SSharedMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/SSkinMeshBuffer.h create mode 100644 src/others/irrlicht-1.8.1/include/SVertexIndex.h create mode 100644 src/others/irrlicht-1.8.1/include/SVertexManipulator.h create mode 100644 src/others/irrlicht-1.8.1/include/SViewFrustum.h create mode 100644 src/others/irrlicht-1.8.1/include/SceneParameters.h create mode 100644 src/others/irrlicht-1.8.1/include/aabbox3d.h create mode 100644 src/others/irrlicht-1.8.1/include/coreutil.h create mode 100644 src/others/irrlicht-1.8.1/include/dimension2d.h create mode 100644 src/others/irrlicht-1.8.1/include/driverChoice.h create mode 100644 src/others/irrlicht-1.8.1/include/fast_atof.h create mode 100644 src/others/irrlicht-1.8.1/include/heapsort.h create mode 100644 src/others/irrlicht-1.8.1/include/irrAllocator.h create mode 100644 src/others/irrlicht-1.8.1/include/irrArray.h create mode 100644 src/others/irrlicht-1.8.1/include/irrList.h create mode 100644 src/others/irrlicht-1.8.1/include/irrMap.h create mode 100644 src/others/irrlicht-1.8.1/include/irrMath.h create mode 100644 src/others/irrlicht-1.8.1/include/irrString.h create mode 100644 src/others/irrlicht-1.8.1/include/irrTypes.h create mode 100644 src/others/irrlicht-1.8.1/include/irrXML.h create mode 100644 src/others/irrlicht-1.8.1/include/irrlicht.h create mode 100644 src/others/irrlicht-1.8.1/include/irrpack.h create mode 100644 src/others/irrlicht-1.8.1/include/irrunpack.h create mode 100644 src/others/irrlicht-1.8.1/include/line2d.h create mode 100644 src/others/irrlicht-1.8.1/include/line3d.h create mode 100644 src/others/irrlicht-1.8.1/include/matrix4.h create mode 100644 src/others/irrlicht-1.8.1/include/path.h create mode 100644 src/others/irrlicht-1.8.1/include/plane3d.h create mode 100644 src/others/irrlicht-1.8.1/include/position2d.h create mode 100644 src/others/irrlicht-1.8.1/include/quaternion.h create mode 100644 src/others/irrlicht-1.8.1/include/rect.h create mode 100644 src/others/irrlicht-1.8.1/include/triangle3d.h create mode 100644 src/others/irrlicht-1.8.1/include/vector2d.h create mode 100644 src/others/irrlicht-1.8.1/include/vector3d.h create mode 100644 src/others/irrlicht-1.8.1/lib/Win64-visualStudio/readme.txt create mode 100644 src/others/irrlicht-1.8.1/media/001shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/002shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/003shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/004shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/005shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/006shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/007shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/008shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/009shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/010shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/011shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/012shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/013shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/014shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/015shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/016shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/017shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/018shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/019shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/020shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/021shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/022shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/023shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/024shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/025shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/026shot.jpg create mode 100644 src/others/irrlicht-1.8.1/media/2ddemo.png create mode 100644 src/others/irrlicht-1.8.1/media/Faerie5.BMP create mode 100644 src/others/irrlicht-1.8.1/media/IrrlichtTheme.ogg create mode 100644 src/others/irrlicht-1.8.1/media/Particle.tga create mode 100644 src/others/irrlicht-1.8.1/media/axe.jpg create mode 100644 src/others/irrlicht-1.8.1/media/ball.wav create mode 100644 src/others/irrlicht-1.8.1/media/bigfont.png create mode 100644 src/others/irrlicht-1.8.1/media/burninglogo.png create mode 100644 src/others/irrlicht-1.8.1/media/config.xml create mode 100644 src/others/irrlicht-1.8.1/media/d3d8.psh create mode 100644 src/others/irrlicht-1.8.1/media/d3d8.vsh create mode 100644 src/others/irrlicht-1.8.1/media/d3d9.hlsl create mode 100644 src/others/irrlicht-1.8.1/media/d3d9.psh create mode 100644 src/others/irrlicht-1.8.1/media/d3d9.vsh create mode 100644 src/others/irrlicht-1.8.1/media/demoback.jpg create mode 100644 src/others/irrlicht-1.8.1/media/detailmap3.jpg create mode 100644 src/others/irrlicht-1.8.1/media/directxlogo.png create mode 100644 src/others/irrlicht-1.8.1/media/dotnetback.jpg create mode 100644 src/others/irrlicht-1.8.1/media/dwarf-Read-Me.txt create mode 100644 src/others/irrlicht-1.8.1/media/dwarf.jpg create mode 100644 src/others/irrlicht-1.8.1/media/dwarf.x create mode 100644 src/others/irrlicht-1.8.1/media/earth.jpg create mode 100644 src/others/irrlicht-1.8.1/media/earth.x create mode 100644 src/others/irrlicht-1.8.1/media/earthbump.jpg create mode 100644 src/others/irrlicht-1.8.1/media/enano.jpg create mode 100644 src/others/irrlicht-1.8.1/media/example.irr create mode 100644 src/others/irrlicht-1.8.1/media/faerie.md2 create mode 100644 src/others/irrlicht-1.8.1/media/faerie2.bmp create mode 100644 src/others/irrlicht-1.8.1/media/fire.bmp create mode 100644 src/others/irrlicht-1.8.1/media/fireball.bmp create mode 100644 src/others/irrlicht-1.8.1/media/fontcourier.bmp create mode 100644 src/others/irrlicht-1.8.1/media/fonthaettenschweiler.bmp create mode 100644 src/others/irrlicht-1.8.1/media/fontlucida.png create mode 100644 src/others/irrlicht-1.8.1/media/gun.jpg create mode 100644 src/others/irrlicht-1.8.1/media/gun.md2 create mode 100644 src/others/irrlicht-1.8.1/media/help.png create mode 100644 src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw1.png create mode 100644 src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw2.png create mode 100644 src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw3.png create mode 100644 src/others/irrlicht-1.8.1/media/icon_crosshairs16x16col.png create mode 100644 src/others/irrlicht-1.8.1/media/iconlist.png create mode 100644 src/others/irrlicht-1.8.1/media/impact.wav create mode 100644 src/others/irrlicht-1.8.1/media/irr.ico create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht.dat create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht2_bk.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht2_dn.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht2_ft.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht2_lf.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht2_rt.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlicht2_up.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogo.BMP create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogo.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogo2.png create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogo3.png create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogoaligned.jpg create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogoalpha.tga create mode 100644 src/others/irrlicht-1.8.1/media/irrlichtlogoalpha2.tga create mode 100644 src/others/irrlicht-1.8.1/media/lightFalloff.png create mode 100644 src/others/irrlicht-1.8.1/media/lucida.xml create mode 100644 src/others/irrlicht-1.8.1/media/lucida0.png create mode 100644 src/others/irrlicht-1.8.1/media/map-20kdm2.pk3 create mode 100644 src/others/irrlicht-1.8.1/media/map-20kdm2.txt create mode 100644 src/others/irrlicht-1.8.1/media/ninja animation ranges.txt create mode 100644 src/others/irrlicht-1.8.1/media/ninja.b3d create mode 100644 src/others/irrlicht-1.8.1/media/nskinbl.jpg create mode 100644 src/others/irrlicht-1.8.1/media/nskinrd.jpg create mode 100644 src/others/irrlicht-1.8.1/media/open.png create mode 100644 src/others/irrlicht-1.8.1/media/opengl.frag create mode 100644 src/others/irrlicht-1.8.1/media/opengl.psh create mode 100644 src/others/irrlicht-1.8.1/media/opengl.vert create mode 100644 src/others/irrlicht-1.8.1/media/opengl.vsh create mode 100644 src/others/irrlicht-1.8.1/media/opengllogo.png create mode 100644 src/others/irrlicht-1.8.1/media/particle.bmp create mode 100644 src/others/irrlicht-1.8.1/media/particlegreen.jpg create mode 100644 src/others/irrlicht-1.8.1/media/particlered.bmp create mode 100644 src/others/irrlicht-1.8.1/media/particlewhite.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal1.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal2.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal3.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal4.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal5.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal6.bmp create mode 100644 src/others/irrlicht-1.8.1/media/portal7.bmp create mode 100644 src/others/irrlicht-1.8.1/media/rockwall.jpg create mode 100644 src/others/irrlicht-1.8.1/media/rockwall_height.bmp create mode 100644 src/others/irrlicht-1.8.1/media/room.3ds create mode 100644 src/others/irrlicht-1.8.1/media/rsptnback.jpg create mode 100644 src/others/irrlicht-1.8.1/media/skydome.jpg create mode 100644 src/others/irrlicht-1.8.1/media/skydome2.jpg create mode 100644 src/others/irrlicht-1.8.1/media/smoke.bmp create mode 100644 src/others/irrlicht-1.8.1/media/smoke2.jpg create mode 100644 src/others/irrlicht-1.8.1/media/smoke3.jpg create mode 100644 src/others/irrlicht-1.8.1/media/spheremap.jpg create mode 100644 src/others/irrlicht-1.8.1/media/stones.jpg create mode 100644 src/others/irrlicht-1.8.1/media/sydney.bmp create mode 100644 src/others/irrlicht-1.8.1/media/sydney.md2 create mode 100644 src/others/irrlicht-1.8.1/media/t351sml.jpg create mode 100644 src/others/irrlicht-1.8.1/media/terrain-heightmap.bmp create mode 100644 src/others/irrlicht-1.8.1/media/terrain-texture.jpg create mode 100644 src/others/irrlicht-1.8.1/media/tools.png create mode 100644 src/others/irrlicht-1.8.1/media/vc6include.jpg create mode 100644 src/others/irrlicht-1.8.1/media/vc6optionsdir.jpg create mode 100644 src/others/irrlicht-1.8.1/media/vcnetinclude.jpg create mode 100644 src/others/irrlicht-1.8.1/media/wall.bmp create mode 100644 src/others/irrlicht-1.8.1/media/wall.jpg create mode 100644 src/others/irrlicht-1.8.1/media/water.jpg create mode 100644 src/others/irrlicht-1.8.1/media/yodan mdl - readme.txt create mode 100644 src/others/irrlicht-1.8.1/media/yodan.mdl create mode 100644 src/others/irrlicht-1.8.1/media/zip.png create mode 100644 src/others/irrlicht-1.8.1/readme.txt create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/BuiltInFont.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAttributeImpl.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBlit.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CBurningShader_Raster_Reference.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8MaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9MaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.d create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImage.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImage.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DHelper.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlat.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlatWire.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlpha2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudWire.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRNormalMap.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRStencilShadow.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureBlend.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureDetailMap2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlat.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlatWire.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlpha.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudWire.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_Add.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M1.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M4.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureWire2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTimer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReaderImpl.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/IAttribute.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/IDepthBuffer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/IImagePresenter.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/ISceneNodeAnimatorFinishing.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/ITriangleRenderer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/IZBuffer.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht-gcc.cbp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.aps create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.dev create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.rc create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.sln create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj.filters create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.sln create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj.filters create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.sln create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.vcproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.sln create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.vcproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.sln create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.vcproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.sln create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.vcproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/._MainMenu.nib create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/DemoApp-Info.plist create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/Irrlicht-Info.plist create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX_Prefix.pch create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/classes.nib create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/info.nib create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/keyedobjects.nib create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.mm create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/irrFramework-Info.plist create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Makefile create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/Octree.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/S2DVertex.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/S4DVertex.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/SConstruct create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_compile_config.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_helper.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/Readme.txt create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aes.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aescrypt.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aeskey.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aesopt.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aestab.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/builtInFont.bmp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/CHANGES create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/LICENSE create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile-libbz2_so create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.XML.STUFF create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/blocksort.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-common.xsl create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-fo.xsl create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-html.xsl create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzcompress.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff.1 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep.1 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip.css create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1.preformatted create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.txt create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2recover.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib_private.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore.1 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/crctable.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/decompress.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.dsp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/entities.xml create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/huffman.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.def create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.dsp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/makefile.msc create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/mk251.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/randtable.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/spewG.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/unzcrash.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words0 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words1 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words2 create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words3 create mode 100755 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/xmlproc.sh create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/dmfsupport.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/glext.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/glxext.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/irrXML.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.c create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/lzma/Types.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/os.cpp create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/os.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/resource.h create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/source.txt create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/wglext.h create mode 100644 src/others/irrlicht-1.8.1/source/source.txt create mode 100644 src/others/irrlicht-1.8.1/tools/FileToHeader/FileToHeader.cbp create mode 100644 src/others/irrlicht-1.8.1/tools/FileToHeader/Makefile create mode 100644 src/others/irrlicht-1.8.1/tools/FileToHeader/main.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttribute.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIBoolAttribute.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIColorAttribute.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIDummyEditorStub.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEnumAttribute.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIStringAttribute.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureAttribute.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/EGUIEditTypes.h create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.sln create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.vcproj create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.sln create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.vcproj create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/GUIEditor_gcc.cbp create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/Makefile create mode 100644 src/others/irrlicht-1.8.1/tools/GUIEditor/main.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.h create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CVectorFontTool.h create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/Makefile create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/main.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/oldFontTool/source.zip create mode 100644 src/others/irrlicht-1.8.1/tools/IrrFontTool/readme.txt create mode 100644 src/others/irrlicht-1.8.1/tools/MeshConverter/Makefile create mode 100644 src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter.cbp create mode 100644 src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_v9.vcproj create mode 100644 src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc10.vcxproj create mode 100644 src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc11.vcxproj create mode 100644 src/others/irrlicht-1.8.1/tools/MeshConverter/main.cpp create mode 100644 src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.jpg create mode 100644 src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.txt (limited to 'src') diff --git a/src/extantz/build.lua b/src/extantz/build.lua index 7708126..abb449e 100755 --- a/src/extantz/build.lua +++ b/src/extantz/build.lua @@ -13,8 +13,8 @@ if 'nil' == type(dir) then dir = workingDir end ---CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include -I../GuiLua' ---LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' +--CFLAGS = CFLAGS .. ' -I../others/irrlicht-1.8.1/include -I/usr/X11R6/include -I../GuiLua' +--LDFLAGS = LDFLAGS .. ' -L../others/irrlicht-1.8.1/lib/Linux' --libs = libs .. ' -lIrrlicht -lephysics -lGL -lbz2 -lGuiLua' CFLAGS = CFLAGS .. ' -I/usr/X11R6/include -I../GuiLua' libs = libs .. ' -lephysics -lGuiLua' diff --git a/src/others/irrlicht-1.8.1/bin/Linux/readme.txt b/src/others/irrlicht-1.8.1/bin/Linux/readme.txt new file mode 100644 index 0000000..c93be39 --- /dev/null +++ b/src/others/irrlicht-1.8.1/bin/Linux/readme.txt @@ -0,0 +1,4 @@ +If you wish to compile the engine in linux yourself, +goto the \source directory. Run a 'make' in the subfolder 'Irrlicht'. +After this, you should be able to make all example applications in \examples. +Then just start an X Server and run them, from the directory where they are. diff --git a/src/others/irrlicht-1.8.1/bin/MacOSX/readme.txt b/src/others/irrlicht-1.8.1/bin/MacOSX/readme.txt new file mode 100644 index 0000000..ea3cfa0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/bin/MacOSX/readme.txt @@ -0,0 +1,5 @@ +The Irrlicht Engine is staticly compiled together with the application under MacOSX. + +If you wish to compile the engine in MacOSX yourself, use the source in the \source directory. + +Please note that this SDK has not been tested on MacOSX. Get a SDK especially for MacOSX on http://irrlicht.sf.net \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/bin/Win32-VisualStudio/irrlicht.ico b/src/others/irrlicht-1.8.1/bin/Win32-VisualStudio/irrlicht.ico new file mode 100644 index 0000000..49f8eab Binary files /dev/null and b/src/others/irrlicht-1.8.1/bin/Win32-VisualStudio/irrlicht.ico differ diff --git a/src/others/irrlicht-1.8.1/bin/Win32-gcc/irrlicht.ico b/src/others/irrlicht-1.8.1/bin/Win32-gcc/irrlicht.ico new file mode 100644 index 0000000..49f8eab Binary files /dev/null and b/src/others/irrlicht-1.8.1/bin/Win32-gcc/irrlicht.ico differ diff --git a/src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/irrlicht.ico b/src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/irrlicht.ico new file mode 100644 index 0000000..49f8eab Binary files /dev/null and b/src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/irrlicht.ico differ diff --git a/src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/readme.txt b/src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/readme.txt new file mode 100644 index 0000000..e2f88f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/bin/Win64-VisualStudio/readme.txt @@ -0,0 +1,3 @@ +Sorry, I cannot provide procompiled binaries for Win64. +Please goto the \source directory, unzip the source.zip file +and compile them yourself, it will cost you about 3 minutes. :) \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/changes.txt b/src/others/irrlicht-1.8.1/changes.txt new file mode 100644 index 0000000..b9aa881 --- /dev/null +++ b/src/others/irrlicht-1.8.1/changes.txt @@ -0,0 +1,5097 @@ +Changes in 1.8.1 (17.11.2013) + + - Improved OpenGL performance under OSX (Thanks devonsoft for reporting). + - Fixed OSX compilation issues. + - [KNOWN BUG] Software driver doesn't work properly under OSX 10.9. + - For speed improvement the following attributes accessible by ISceneManager::getParameters() are no longer updated in release: + "culled", "calls", "drawn_solid", "drawn_transparent", "drawn_transparent_effect". + They can be enabled by compiling Irrlicht with the define _IRR_SCENEMANAGER_DEBUG. + Thanks @hendu for reporting, see http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion. + - Fix compile problem with CIrrDeviceSDL on VS2008 (and maybe other systems). Thanks @HellFlip for reporting. + - Fix quaternion::rotationFromTo() (Thanks @takamoto for reporting) + - Fix iszero for s64 (Thanks @chronologicaldot for reporting) + - Fix crash in SoftwareDriver2 when Material was EMT_DETAIL_MAP but texture[1] was not set (Thanks for fix by chronologicaldot) + - Fix buffer overrun in x-loader (Thanks for fix by Otaka) + - Fix cursor visibility update problem under Windows 8 (Thanks @luthyr for reporting) + - Fix irredit links in loadScene/saveScene docs. + - Fix issue in CAnimatedMeshSceneNode::clone which caused a crash. (reported and fixed by luthyr) + - Fix compiling errors for c++ builder (thx @Greatwolf for many patches and @cfanderek for reminding) + - Initialized IColladaMeshWriter::GeometryWriting which was uninitialized. + - Fix linker trouble with irr::core::equalsByUl when compiling Irrlicht as managed code (thx @ Memorial76 for a report + testcase) + - Fix crashes in CCubeSceneNode::clone and CSphereSceneNode::clone (reported by marsupial) + - Fix the clipping in the listbox drawing which was only showing the right line of the sunken pane (reported by Mloren and Abraxas). + - Initialize slider in example 05 correct (reported by Zerochen) + - Fix crash in CMeshSceneNode::clone when the mesh had no shadow (reported by christianclavet, bug-fix found by Nadro) + +-------------------------- +Changes in 1.8 (7.11.2012) + + - Let sphere mesh use full opaque color, just as all the other ones do + + - Gcc on Win32 (MinGW) now also works with the _w file access functions when compiled with _IRR_WCHAR_FILESYSTEM. (thx @ alexzk for reporting compile troubles) + + - Fix a bunch of off-by one errors in irr::core::string in functions equals_substring_ignore_case, findFirst, findFirstChar, findNext, findLast, findLastChar, replace, remove and removeChars. + This prevents some potential memory access errors, find functions no longer try to find the \0, replace no longer replaces the \0 and remove no longer tries to remove it (which did remove the last character instead). + + - matrix4::setRotationAxisRadians added + + - user clipplanes fixed + + - Skip rendering of lines, points, and polygons, as these lead to crahses due to wrong access to the vertex lists. A fix would need major rewrite of the vertex cache, or at least some other render methods. + + - Add mipmap generation for makeColorKeyTexture + + - Add another saveScene overload which allows to pass in a user-created XMLWriter. Patch suggested by eversilver. + + - quaternion conversions to and from matrix4 no longer invert rotations. + To test if your code was affected by this you can set IRR_TEST_BROKEN_QUATERNION_USE in quaternion.h and try to compile your application. + Then on all compile-errors when you pass the matrix to the quaternion you can replace the matrix transposed matrix. + For all errors you get on getMatrix() you can use quaternion::getMatrix_transposed instead. + + - CGUIEnvironment::loadGui - loading a gui into a target-element no longer messes up when the gui-file contained guienvironment serialization. + + - Colladawriter now exports materials per node when those are used in Irrlicht + + - Colladawriter now writing matrices for node transformations as old solution did not work with CDummyTransformationSceneNode's. + + - Colladawriter no longer create an extra node for the scenemanger as has that job in Collada. + + - Colladwriter no longer makes all Scenenodes children of ambient-light as that can be parallel on the same layer instead. + + - Colladareader now creates the ambient-light correct instead of creating a point-light for it. + + - Add new parameter to array reallocate function. This prevents a reallocation in case the array would become smaller. As the reallocation operation is quite time consuming, this can be avoided on request now, on the expense of more memory consumption. + + - Add IAnimatedMeshSceneNode::getLoopMode (asked for by JLouisB) + + - CSceneNodeAnimatorCameraFPS now resets the key-input when it was disabled (thx @ gerdb for reporting and patch-proposal) + + - Properly destroy OpenGL resources on linux (thx @curaga for the patch) + + - Fix diplay bux in the attribute-panel of the GUIEditor. Fixes bug 3517314 (thx @Darkcoder for reporting). + + - Allow caching cursor position on X11 to work around slow XQueryPointer calls (thx @Hendu for reporting+patch proposal) + + - Make sure after EGET_EDITBOX_ENTER and EGET_COMBO_BOX_CHANGED event processing no more code is executed for the corresponding editbox or combobox objects to allow clearing the environment on those actions (see comments on bug-id 2995838). + + - Fix string::replace which failed replacing substrings at the end when the replacement was longer + + - Struct packing works now with gcc 4.7 changes on MinGW (thx @Sudi for reporting). + + - Struct packing uses now same solution throughout (by including headers in corresponding places) + + - User can now set characters used for decimal point in fast_atof for localisation. + + - Add parameter useAlphaChannel to second IGUIEnvironment::addImage function. + + - Get rid of unnecessary warning "Could not load sprite bank because the file does not exist" for "#defaultfont". + + - Fix MRT disabling. Bug found and fixed by hendu. + + - core:::array::reallocate returning now immediately when it has nothing to do. Should reduce a lot of memory thrashing on irrArrays. + + - Start mesh animations at first OnAnimate , before start-frame was rather random. Thx @Auria for reporting and patch proposal. + + - renderTargetTexture now working with ECF_R5G6B5 + + - add -fPic in c::b linux fast math shared build. + + - Fix by Auria for starting the animated meshes only at first OnAnimate instead of at random times and animation frames. + + - Add support for MAX_COMBINED_TEXTURES, which allows more texture support than with the original fixed pipeline texture check under OpenGL. Now, more than 4 textures should also work with newer gfx cards and drivers, which often only support 4 fixed pipeline textures. + + - triangle3d::isPointInsideFast now using some epsilon to catch all points on the borders. + + - triangle3d::getIntersectionOfPlaneWithLine calculates now with higher precision for more exact results. + + - triangle3d::isOnSameSide (used by isPointInside) calculates now with higher precision and uses some epsilon to make it work with larger integers and less floating point troubles. Slightly slower now. + + - new function equalsByUlp to test for spacing between floating point numbers. + + - speedup for collada writing. + + - speedup for xml-writing. + + - Fix 8bit grey image TGAs, which were not working due to missing palette. Also switched to RGB8 format, as otherwise a loss in precision would occur. Thanks to Klunk for the error report and a test image. + + - fixed issues with a D3D driver and Aero effects. + + - Fix font-drawing in CGUIButton to use EGDF_BUTTON again (thx @DJLinux for reporting). + + - Add texture cache with proper reference handling. This avoids deletion of textures while still being active on the GPU. Test case and fix by m(att)giuca + + - CFileSystem::removeFileArchive now checking for normalized path + + - Fix zip's with passwords on 64-bit systems (thx @ Dr. Gladman for writing the bugfix) + + - replace asserts in tests with macro assert_log to allow running all tests through on problems. + + - added IGUIElement::setName and IGUIElement::getName (similar to ISceneNode) + + - irr::s64 support + + - line2d::getClosestPoint can now also get the closest point on the line additional to only checking for closest point on the line-segment. + + - avoid division by zero in line2d::getClosestPoint when start- and endpoint are identical + + - Support for sw drivers under OSX + + - Fix font-loading which got broken by fixed xml-loading. Thanks @ pc0de for finding and providing a test and patch. + + - Don't crash draw2DSpriteBatch when it get's no textures. + + - Add support for int passing in setShaderConstant + + - Support for better collada texture wrapping support on loading. + + - Fix for render context change where only the window id is given. We now try to change only the window ID, keeping context and display unchanged. Suggestion by vovo4ka from the forum. + + - XML-reader now ignores all whitespace-only EXN_TEXT elements as old way didn't work in cross-platform way (and arguably also not well on Windows). + + - CXMLReader initializes IsEmptyElement now. + + - line2d::intersectWith and and line2d::getClosestPoint work now also with integers. + + - line2d::getMiddle and line3d::getMiddle work now also with integers. But can be slower for compilers which are not optimizing division by 2 to multiplication by 0.5 for floats. + + - Add Nadro's initial Cg support. Example 10 is enhanced to allow also Cg shaders. + + - Add mipmap support from FBO extension, patch by Nadro. + + - Add vertex optimization algorithm submitted by curaga + + - rename texureBlend functions to textureBlend + + - Add threshold for slerp calculation, switching between linear and slerp at this point. + + - Fix for bug 3401933 - vertex color interpolation with shadow volumes in the scene + + - Fixed bug in button sprites reported by RdR + + - Fixed button state sprite animations for pressed, focused and hovered. + + - Added serialization for terrain smooth factor, patch by RdR + + - Implemented more button states for sprite banks, patch submitted by RdR + + - Add IGUIEnvironment::getHovered to get the element most recently known to be under the mouse cursor + + - Add FPS settings for animated meshes, which allows to push animation speed from files to Irrlicht animation system + + - Maya camera updates + + - Add support for bsp brush entities. Written by Hendu. + + - weighted normals recalculation fixed + + - Billboard improvements + + - API docs updates + + - triangle selector improvements + + - OSX improvements by Auria + + - Add new methods for adding and removing file archives based on ifilearchive pointers. + + - Add getBackgroundColor, isDrawBackgroundEnabled and isDrawBorderEnabled to IGUIStaticText (thx 4 patch from Nalin). + + - Reduction of multiple skinning the same mesh and frame in one render cycle + + - Added ISceneNodeAnimatorCameraFPS::getKeyMap and a new ISceneNodeAnimatorCameraFPS::setKeyMap. + + - CSceneNodeAnimatorCameraFPS uses now SKeyMap instead of SCamKeyMap (structs were identical which was confusing and there wasn't any explanation in comments, so I decided to simplify it). + + - Add some workaround to MeshViewer to show how we can currently fix the FPS-cam when users to alt-tab while moving. We can improve that some day when we have focus-events, but this works for now. + + - Fix LZMA decompression + + - Ply normal fixes + + - HW buffers only support rendering with both vertex and index buffers + + - Enables VBOs for water node + + - Octree support for non-standard vertex meshes + + - Fix rotationFromTo + + - Added ConstIterator + + - Fix for getScreenCoordinatesFrom3DPosition to use proper RTT sizes + + - Add IGUIComboBox::setMaxSelectionRows and IGUIComboBox::getMaxSelectionRows + + - Scenemanager switches from type ESNT_UNKNOWN to type ESNT_SCENE_MANAGER. + + - Add getActiveFont to all elements which have setOverrideFont for cleaner code + + - Add getOverrideFont to all elements which have setOverrideFont to have a consistent interface + + - IGUIEditBox: added missing serialization for Border + + - IGUIEditBox: remove bug that added spaces to the end of each line + + - IGUIEditBox: fix crash that happened when wordwrapping was enabled, spaces were entered beyond the border and then cursor-key was pressed. + + - IGUIEditBox::setDrawBackground added. + + - CGUISkin::draw3DSunkenPane no longer ignores fillBackGround in non-flat mode. Also borderlines are no longer drawn overlapping to avoid ugly corners. + + - CDummyTransformationSceneNode::clone() added. + + - IParticleSystemSceneNode::doParticleSystem now public to allow rendering outside scenegraph. + + - getRelativeFilenames updates and fixes + + - Renamed IOSOperator::getOperationSystemVersion to getOperatingSystemVersion. Changed return type from wchar_t to core::stringc, as that's the internal representation the name is built on. + + - Added IGUITabControl::insertTab, IGUITabControl::removeTab, IGUITabControl::clear and IGUITabControl::getTabAt + + - Add 32bit support to some mesh manipulator methods + + - Fix mipmap locking under OpenGL + + - Improvement of screenshot function to support more color formats and targets + + - getAngle fix to avoid NaNs + + - Available gfx memory output in log messages + + - Improved 2d render settings and caching + + - Initial suppport for sRGB render functions + + - Improved terrain scene node rendering + + - Paletted png image support fixed + + - Gamma settings in image loaders improved + + - Support for relative filenames in serialization + + - Access to selectors inside meta selectors implemented + + - DirectInput joystick support + + - Support for scaling with draw2dimage with burnings video + + - More gl extensions have correctly initialised return values + + - Some fixes for quaternion to euler function + + - Properly return nullptr if RTT creation fails on low levels + + - Added IGUIListBox::getItemAt + + - Add more image formats tried to load by q3 level loader + + - Add fast_atof improvements from assimp, also strtoul10 method + + - Add blend equation function for MRTs + + - Add new material fields for blend operation and polygon offset (depth bias). + + - Reorder texture stage assignments + + - Improved VSync handling + + - Fix Ogre loader for materials with more than one texture + + - Fix createMeshCopy material handling + + - Framework target for OSX project added + + - Terrain scene node fixes + + - Fix HSL color class + + - Fix color selection GUI element + + - Transparency issues in particle system fixed + + - Particle sphere emitter rand values fixed + + - Support Unicode SHY dynamic hypen in word wrap + + - Fix OBJ reader sometimes running over EOF + + - Added IGUITable::getColumnWidth + + - Billboard text animates in OnAnimate now + + - Fix mountpoint reader to properly sync file names and firectories + + - Added the ability to open an archive from an IReadFile*, added a FileToHeader tool with instructions of how to make a portable app that consists of a single executable file. + + - Added suppport for right-to-left (RTL) text, supplied by Auria from STK + + - Added ISceneManager::createSceneNodeAnimator to create animators by name + + - The Makefile now creates a symlink from the soname to the binary name during install. Binary compatibility is only confirmed between same minor releases. + + - Added SMF mesh loader, loads meshes from 3D World Studio. Originally written by Joseph Ellis + + - The loader selection process now consistently checks loader lists in reverse order, so new loaders added to Irrlicht override the internal ones. This applies when adding external mesh, image, scene and archive loaders, image writers, plus node, animator and GUI element factories. + + - Added getters to retrieve mesh, scene and archive loaders. + + - Added ISceneLoader interface and .irr loader. Users can now add their own scene loaders to the scene manager and use them by calling loadScene. + + - Renamed IGUIElement::bringToBack to sendToBack, like in Windows + + - Send EGET_ELEMENT_CLOSED event when context menus should be closed (thx @ Mloren for reporting). + + - Added treeview to GUI editor, provided by Armen + + - Added root type for GUI environment + + - zip archive fixes: Fix directory tags in file list. Fix loading of stream zip files which have file sizes only in the central directory. + + - Fixed panel scrollbars in GUI editor, reported by Armen + + - Fix b3d loading of files with mixed mesh/bone sections. + + - Fix particle emitters which used integer random numbers so far. The distributions of the particles should be much better (and the code also somewhat faster) now. + + - Add new random method frand: Returns a random number in the interval [0..1] and gives better distributions than using fmodf on the integer number. + + - Add node parameter to saveScene and loadScene. saveScene saves the given node and all descendants to the file (if 0, the full scene is saved as before). loadScene loads all elements of the scene as childs of the given node. As before, 0 would load the file on the top level (scenemanager). + + - Add method to make a filename relative to a given directory. + + - Fix setMesh to correctly update the joints cache. + + - Fix setting transition time of skinned meshes back to 0. + + - Add some getters to IGUIImage: getImage, getColor + + - Fix OpenGL FBODepthTexture to create less overhead + + - Fix MRT disabling under OpenGL + + - API change: Added write only lock mode for textures. The lock method has changed the signature and uses an enum parameter now instead of a bool. The default is still to lock for read/write (previously 'false'). The old 'true' value should be replaced by ETLM_READ_ONLY. + + - Speedup deleting of particles + + - Add function IParticleSystemSceneNode::clearParticles + + - Fix RTT render states under OpenGL + + - Fix AntiAliasing setup under Windows/OpenGL in case no AA is available + + - Fix transformation matrices when RTT used + + - API change: getScreenCoordinatesFrom3DPosition has a new parameter, which needs to be set to true to get the original behavior. Now, the method returns coordinates which would fit as render coordinates of a currently enabled viewport. With the parameter set to true the result would fit only after the viewport is reset to full window rendering. + + - More checks for Stencilbuffer + + - Improve render state resets + + - Fix MRT handling + + - Fix file search + + - Add flag and method to disable clipping of the text to the gui element rectangle in GUI static text. + + - addShadowVolumeSceneNode now replaces an existing shadow. One should avoid to call this method multiple times without changing any parameter, as it is quite time consuming and cannot recognize the duplicate calls. + + - Add function IGUIEnvironment::removeFont (TODO: Does not remove the texture from cache so far) + + - Fixed mem leak in mountfilesystem + + - Update to libjpeg 8b, zlib 1.2.5, bzip2 1.0.6, libpng 1.4.4 and lzma from 9.20 SDK + + - Functions in IMeshCache expecting IAnimatedMesh* parameters removed as similar functions with IMesh* can be used since a while. Fixes also problems when IAnimatedMesh* got upcasted to IMesh*. (thx @ Greenya for reporting) + + - Fix blend states for MRTs + + - 64bit targets for MSVC added + + - The following functions will now use a "ISceneNode *" instead of a "const ISceneNode *": + ITriangleSelector::getSceneNodeForTriangle, ISceneNodeAnimatorCollisionResponse::getCollisionNode, ISceneCollisionManager::getCollisionPoint and ISceneCollisionManager::getCollisionResultPosition. + As collision functions often are followed by changing node positions users where so far forced to using const_casts (found by Greenya). + + - Add vector3d::getAs3Values (patch provided by slavik262) + + - Add function to SViewFrustum to get corners of the near plane (patch provided by Matt Kline, aka slavik262) + + - ParticleFadeOutAffector::setFadeOutTime can no longer be set to invalid values + + - ParticleFadeOutAffector uses now throughout u32 for fadeOutTime (found by greenya) + + - Add missing access function CParticleSystemSceneNode::getAffectors() (seen by B@z) + + - Add missing setters/getters for particle emitters (seen by B@z) + + - Compile-defines can now be disabled from Makefiles/Projectfiles instead of having to change IrrCompileConfig.h each time. + + - IGUITabControl::setActiveTab should only take IGUITab* and not IGUIElement* (thx to greenya for finding) + + - Add new skin-colors: EGDC_GRAY_WINDOW_SYMBOL, EGDC_EDITABLE, EGDC_GRAY_EDITABLE, EGDC_FOCUSED_EDITABLE + + - Disabled state is now extended to sub-elements + + - Make disabled state for several elements more visible + + - Bugfix: Icons in tabcontrol get now affected immediately by skin-changes + + - Proper cleanup if visual not created + + - XML reader bugfix + + - Disable mipmaps in 2d mode everywhere + + - Add xml example written by Yoran Bosman. + + - Fix cursor cleanup under Linux when using multiple devices + + - Fix collada parser + + - Fix MRT reset under D3D + + - Add a generic attribute interface for querying video driver attributes which are not necessarily of type bool. This interface allows to check certain supported features, such as the number of user clip planes, supported lights and textures, MRTs, and other things. The interface might change in the future, but it's fully functional already. The supported attributes are listed in the API docs of the function: +The following names can be queried for the given types: + * MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. + * MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. + * MaxLights (int) Number of hardware lights supported in the fixed function pipieline of the driver, typically 6-8. Use light manager or deferred shading for more. + * MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. + * MaxUserClipPlanes (int) Number of additional clip planes, which can be set by the user via dedicated driver methods. + * MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL + * MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. + * MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer). + * MaxTextureSize (int) Dimension that a texture may have, both in width and height. + * MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far. + * MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems. + * Version (int) Version of the driver. Should be Major*100+Minor + * ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor. + + - Fix getRotationDegrees + + - Add creation parameter which allows to disable highres timers on Windows upon device creation. + + - Several transparency setup bugs fixed. Now, alpha_vertex_blend uses proper alpha blending instead of a mixed add/alpha blending. + + - Added a method to get real time and date in a human readable struct + + - Fix add folder archives method to support files without trailing slashes. + + - fix transparent_reflection_2_layers + + - Add support for MSVC 2010 + + - Fix "unsupported format" warning on RTT usage + + - Add IGUIElement::bringToBack (patch written by DtD, although I'm to blame for the function-name) + + - BurningVideo + - add Normalmap Rendering (one light only), pushed Burningvideo to 0.46 + - add Stencil Shadow Rendering (one color only and 32 bit only), + pushed Burningvideo to 0.47 + - internal vertexformat changed + - changed fixpoint from 9 to 10 bit fract resolution + - renamed createBurningVideoDriver to createBurningVideoDriver and uses SIrrlichtCreationParameters like opengl + - internal interfaces for the trianglerenders unified. + + - Example 11, changed the light billboards to use the light color. + allow to disable the bump/parallax on the earth like in the room ( with transparency ) + + - added DDS Image files, DXT2, DXT3, DXT4, DXT5, based on code from nvidia and Randy Reddig + + - added Halflife 1 Model Loader (based on code by Fabio Concas) + Halflife 1.1.0.8, Counter-Strike 1.6 working + -> Load all Textures ( can even optimize it to texture atlas ), all bone animation, all submodels. + -> But to make use of the values (named animation, mouth animation) + the Interface for IAnimatedMeshSceneNode has to be redone. + + TODO: + ->can handle float frames numbers, the interface for getMesh should be reworked + This is my idea of a new getMesh interface for IAnimatedMesh + + //! Returns the IMesh interface for a frame. + /** \param frameA: Frame number as zero based index. + The Blend Factor is in the fractional part of frameA + The Mesh will be calculated as + frame = integer(frameA) * (1-fractional(frameA )) + frameB * fractional(frameA) + FrameNr KeyFrameA KeyFrameB + 40.0 1 0 + 40.1 0.9 0.1 + 40.5 0.5 0.5 + 40.9 0.1 0.9 + 41.0 0 1 + \param frameB: Frame number as zero based index. The other KeyFrame which is blended with FrameA. + \param userParam: for Example Level of detail, or something else + */ + virtual IMesh* getMesh(f32 frameA, s32 frameB = 0,s32 param = 0) = 0; + + For now i used the (unused, always 255) detail level parameter and set a blend percentage as + s32 frameNr = (s32) getFrameNr(); + s32 frameBlend = (s32) (core::fract ( getFrameNr() ) * 1000.f); + return Mesh->getMesh(frameNr, frameBlend, StartFrame, EndFrame); + + So no interface is affected. + + -> TODO: Quaternion Rotation is done private hand made and should be done with irrlicht quaternions + + - Included 357kb Yodan.mdl mesh and copyright info file from Doug Hillyer + to the media directory, used in example 7. collision as 4th model. + + - added Halflife 1 Texture Loader + Valve uses WAL archive types like quake2. textures are inside model files + I reworked the existing ImageloaderWAL and added named Halflife textures to wal2 ( they have no extension ) + and an LMP (palette/texture) loader into the same file (all using 32bit now) + + - added WAD Archive Loader (Quake2 (WAL2) and Halflife (WAL3) are supported) + + - CFileList + added Offset Parameter to SFileListEntry and removed the private array from the archive loaders. + CFileList::addItem now uses automatic incremental id if id = 0 + + - added void splitFilename, splits a path into components + + - added parameter make_lower to substring ( copy just lower case ) + string subString(u32 begin, s32 length, bool make_lower = false ) const + + - ColorConverter added + //! converts a 8 bit palettized or non palettized image (A8) into R8G8B8 + static void convert8BitTo24Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad = 0, bool flip=false); + //! converts a 8 bit palettized or non palettized image (A8) into A8R8G8B8 + static void convert8BitTo32Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad = 0, bool flip=false); + + - In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing) + + - add CGUIEditBox::getOverrideColor and CGUIEditBox::isOverrideColorEnabled + + - add dimension2d::operator- + + - Add logging level ELL_DEBUG + + - Add parameter DisplayAdapter to creation params to allow selecting the card when more than one card is in the system. + + - Added support for custom cursors + + - WM_SYSCOMMAND - SC_KEYMENU message is now ignored (F10 and ALT in Win32 windowed mode) + + - Avoid argument lookup ambiguity in swap when used in combination with stl. Using same trick as boost now and use 2 different template parameters in it. + + - Add UseMipMap flag in material + + - Add occlusion query support. Based on code by Nadro + + - Add support for vertex_array_bgra extension in OpenGL driver. This will speed up OpenGL rendering quite a lot as it skips the silly color conversion thing we have to do otherwise. + + - Replace raw xml char implementation with template struct in order to decouple the type from POD types. May also help for 64bit problems or changes needed there. + + - Fixed bug causing memory access violation in string::replace found and patched by Nalin. + + - Fix windows32 class unregister + + - Add parameter to line2d::intersectWith to allow getting intersections outside the segments (thx Yoran). + + - External windows are not destroyed anymore + + - clamp values in getRotationDegrees to avoid nan values + + - texture size in terrain mesh fixed + + - ms3d fixes + + - Add new matrix methods for infinite projection matrix + + - Support new OpenGL 2.x shader creation + +----------------------------- +Changes in 1.7.4 (not yet released) + + - fixed getDepthFunction in IQ3Shader which always returned ECFN_EQUAL due to missing break (found by the cppcheck tool) + + - STL loader improved to handle arbitrary file starts + + - Compiler problem with gcc4.6 and big endian systems fixed + + - Change include order to get example 21 compiling on MinGW. + + - Irrlicht.dll has correct name now again (was named libIrrlicht.dll in c::b). This fixes bugreport 3518765 reported by tetho. + + - Fix linker path in example 16 for C::B project file (linker path was in include path section). + + - Link with opengl32 and gdi32 in Example 14 in C::B. + + - Remove --no-export-all-symbols which got recently added to the windows build as that flag is not known by gcc on Windows. + + - Fix bug in example 23 where Width and Height got mixed up. Thanks @Lazier for reporting. + + - Fix for R5G6B5 converter submitted by XMight + + - Fix conversion warning under mingw, found by Randajad + + - Set EMF_NORMALIZE_NORMALS correct for syndey model in Demo (thanks @ Midnight for reporting). + + - SceneNodeAnimatorFlyCircle fixes serialization of RadiusEllipsoid (was writing Radius). Thx @ wing64 for reporting. + + - Yield on Linux now uses nanosleep with 1ns as 0 isn't guaranteed to yield (thx @ hendu for finding + fix) + +----------------------------- +Changes in 1.7.3 (20.02.2012) + + - SceneNodeAnimatorFlyCircle fixes serialization of RadiusEllipsoid (was writing Radius). Thx @ wing64 for reporting. + + - Yield on Linux now uses nanosleep with 1ns as 0 isn't guaranteed to yield (thx @ hendu for finding + fix) + + - GUIEditor attributes have now scrollbar to be editable + + - Remove warning when compiling line2d::intersectWith with other types than f32. + + - Document that triangle3d::isPointInside should not be used with int's. + + - triangle3d::isPointInsideFast handles 'on-border' cases now consistently. + + - Some more editbox fixes + + - Harden Linux joystick usage, in case the driver returns illegal values + + - Bugfix: vector2d.normalize() and vector3d.normalize() had returned wrong results with very short vectors since Irrlicht 1.5. Thanks to Willem Swart for Bugreport + testcase. + + - Unknown keymappings now use the X11 keycode instead of 0 to make such keys at least usable in games. + + - KeyMapping for KeyInput.Key on X11 ignores states like shift&ctrl now like on Windows. + + - Additional keymappings for X11 (tested with german and us keyboards which seem to work now in all cases). + + - Fix crash in multiline editbox when pasting several lines into it on Windows (found by Reiko) + + - example 09.Meshviewer no longer catches keys while a modal dialog is open + + - Fix SSharedMeshBuffer + + - Fix right handed ortho matrix + + - editbox no longer displays cursor when disabled + + - editbox autoscrolling now at least works good enough to actually show the text which the user is typing in. + + - editbox no longer moves text into next line when it fails wrapping creating senseless empty lines which mess up scrolling. + + - Fix crash in editbox when scrolling up with empty first lines caused by textwrapping. + + - Fix endianess conversions + + - Changes to isPointInside + + - Fix focus problem when removing an unfocused modal dialog reported by Reiko here: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=44358 + + - Fix md2 normals problem again + + - Add integer template specialization for vector3d::getSphericalCoordinateAngles which rounds angles to nearest integer now. + + - Recalculate FrameRect and ScrollPos in CGUIEditBox when AbsoluteRect gets changed (thx @ serengeor for report + testcase) + + - Fix crash in editbox + + - Fix 'k' in bigfont.png (thx @ Scrappi for reporting) + + - fix serialization for CBillboardSceneNode, it had missed 2 color (thx for finding + patch from pc0de) + + - EMIE_MOUSE_WHEEL messages now handled correctly in several gui-element when wheel isn't just 1.0 or -1.0 (thx @ Reiko for reporting) + + - Fix problems in Textwrapping in CGUIStaticText. Did use wrong size and did ignore last word of the text (thx @ Reiko for bugreport) + + - Fix crash in collada (.dae) loading + + - Fix bug handling in case RTT is not properly created + + - Fix SColorf interpolation + + - Fix memory-leaks in example 22 MaterialViewer + + - Fix array::erase which did destroy objects more than once when used with a range (thx @ RedDragCZ for reporting + testcase). + + - Copy now all membervariables for CCameraSceneNode when cloning. + + - ICameraSceneNode::IsOrthogonal is correctly serialized and cloned now. + + - CGUIScrollBar passes unused mousemove-events now to parent element. Fixes focus-bug in ComboBox reported by REDDemon here: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=43474&highlight= + + - Fix getAngle and getAngleWith + + - Fix clipping in CGUITabControl + + - Fix clipping in CGUITable, reported by ceyron + + - Skip bone weights and additional information in ms3d file if no joint was defined before. + + - Fix mem leak in CImage, found by mloren. + + - Fix tga writing, reported by xirtamatrix + + - Tab-positions care now about the borders correctly + + - TabControl now respositions it's tabs when setTabVerticalAlignment is changed (thx @ ceyron for reporting+testcase) + + - CGUIModalScreen now no longer takes focus itself, but tries to give it first child when possible to fix modal windows losing focus all the time + + - Modal screens no longer blinks when gui-elements call removeFocus on themself (thx @ yaten for reporting+testcase) + + - Fix crash in multiline-editbox when selecting with mouse (thx @ ceyron for reporting and testcase) + + - Fix render context creation for OpenGL under Windows. + + - Fix the reset problem of d3d9 driver in combination with hardware buffers. + + - Fix .x loader in case of unused vertices. + + - Avoid empty line in texts with very large words. Text wrapping would introduce an empty line in earlier versions. + + - Add a new attribute which assigns hw mapping hint to the whole Mesh. + + - Allow creation of water scene node without mesh. + + - Fix regeneration of skydome. + + - Fix scene node type and factory support for volume light + + - Q3 maps no longer crash when faces try accessing lightmaps which are not mentioned to be loaded in the file. + + - Fix crash on null-readfile in texture loading + + - Get particles saved before 1.7.2 (for example in irrEdit) working again (thx to smashly for problem reporting) + + - Fix IGUIScrollBar setMax and setMin which had been restricted wrongly (reported by REDDemon) + + - Fix CNullDriver::createImage - Creating the image from a texture-rectangle which doesn't start at 0,0 works now again (thx @ ceyron for bugreport+testcase) + + - Menu no longer sets highlight state when clicking disabled menu-item (reported by Mloren) + + - Treeview can now be disabled + +----------------------------- +Changes in 1.7.2 (15.11.2010) + + - Fix in d3d9 driver, which caused a crash when device creation failed. Bug found and fixed by Kostya + + - Fix a wrong access to Value instead of ValueW. Found and fixed by vroad. + + - Fix line loop rendering in d3d drivers. Fix submitted by tonic. + + - Fix tar recognition in tar reader. + + - Fix blend mode setup in OpenGL driver, when using the material2d override, as pointed out by Auria + + - Avoid crash due to tcoords2 handling. Might need some more fixing to work correctly. + + - Fix 2d line intersections. Has had problems with consecutive, but non-overlapping line segments and with overlapping line segments. + + - Fix image creation from texture, found by dataslayer + + - Fix crashes when taking Screenhots for DirectX in Windowed mode (thx to agamemnus for reporting) + + - StaticText does now serialize the background color + + - Fix gui-elements which didn't care when skin-colors changed. That made it impossible to make the gui slowly transparent (thx to PI for reporting). + Note that it couldn't be completely fixed for the SpinBox without breaking the interface, so for that element you have to enforce this by calling for example element->setValue(element->getValue()) once. + + - Fix CXMLReaderImpl::getAttributeValueAsInt which returned wrong values with large integers (thx to squisher for finding) + + - Fix compile problem in swap when using irrlicht in combination with stl (backport from trunk r3281) + + - Add EGET_TREEVIEW_NODE_COLLAPSE and deprecate EGET_TREEVIEW_NODE_COLLAPS (found by greenya) + + - Fix serialization in CParticleSystemSceneNode (found by B@z) + + - Prevent crash in BillboardTextSceneNode when a custom font is used. Found and fixed by Nalin (bugtracker id: 3020487) + + - Fix problem in animation system that currentFrame got messed up after long pauses (especially when not starting at frame 0). + See forum thread (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?p=210537#210537) and bug id 2898876. + Also remove BeginFrameTime in CAnimatedMeshSceneNode as it hasn't been used anymore since some time. + + - Add framerate and current frame information for animations in example 09 and do some minor cleanup. + + - Added another test for xml-reader. + + - Fix serialization in several particle emitters and affectors (thx to Ion Dune for reporting). + + - Fix compile-error on VS for vector2d::getAngleTrig when used with integers. (thx to greenya for reporting) + + - Fix bug in dimension2d::getInterpolated that caused wrong results when used with integers as template parameter. (thx to Greenya for noticing a warning which made me look over this code). + + - Remove 2 minor memory leaks in meshloaders (found by tool cppcheck-1.43) + + - reduce file dependencies for IGUIEventReceiver.h (thx ngc92) + + - Initialize GUIEvent.Element in several places (found by greenya) + + - Add EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH and deprecated EGDS_MESSAGE_BOX_MAX_TEST_WIDTH (thx to greenya for reporting). + + - Fix colors in irr files. + + - Fix several places where "used" in core::string was used wrongly preventing some memory corruption + + - Remove additional slash in pathnames in X-Loader + + - Fix crash in CGUIListBox when environment was cleared on events + + - Bugfix: Clear up depth-textures which could not be attached in OpenGL to prevent crashes. + + - Fix arrowMesh boundingbox. + + - Fix rounding problem in getInterpolated in the color classes + + - Scrollbar in GUIListbox now uses default id -1 instead of 0 + + - Fix octree clipping issues. + + - Fix obj loader. + + - clone function fixes. + + - Fix tooltips. + + - Fix Ogre parser. + +----------------------------- +Changes in 1.7.1 (17.02.2010) + + - Fix octree with frustum+parent checks enabled (didn't clip at all before). Now using plane-checks instead of edge-checks for frustum-box intersection. + + - Prevent that X11 selects larger resolutions in fullscreen even when perfect fits are available. + + - Ignore setResizable also on X11 when we're fullscreen to avoid messing up the window mode. + + - Work around a crash when pressing ESC after closing a Messagebox (found by Acki) + + - Prevent borland compile warnings in SColorHSL::FromRGB and in SVertexColorThresholdManipulator (found by mdeininger) + + - Improve Windows version detection rules (Patch from brferreira) + + - Make it compile on Borland compilers (thx to mdeininger) + + - Make sure that CAnimatedMeshSceneNode::clone calls the virtual updateAbsolutePosition for the new object + + - Fix that clones got dropped too often when SceneNodes without parent got cloned (found by Ulf) + + - Make sure TAB is still recognized on X11 when shift+tab is pressed. This does also fix going to the previous tabstop on X11. + + - Send EGET_ELEMENT_LEFT also when there won't be a new hovered element + + - Update docs for EGET_ELEMENT_LEFT and EGET_ELEMENT_HOVERED + + - Fix tooltips: Remove them when the element is hidden or removed (thx to seven for finding) + + - Fix tooltips: Make (more) sure they don't get confused by gui-subelements + + - Fix tooltips: Get faster relaunch times working + + - Fix tooltips: Make sure hovered element is never the tooltip itself + + - Fix string::remove which got in an endless loop when remove was called with an empty string (found and fixed by Ulf) + + - Correctly release the GLSL shaders + + - Make sure we only release an X11 atom when it was actually created + + - Fix aabbox collision test, which not only broke the collision test routines, but also frustum culling, octree tests, etc. + + - Fix compilation problem under OSX due to wrong glProgramParameteri usage + + - mem leak in OBJ loader fixed + + - Removed some default parameters to reduce ambigious situations + +--------------------------- +Changes in 1.7 (03.02.2010) + + - Implement minimize and deminimize under OSX. + + - Define sorting order for vector2d and vector3d in operators <, <=, > and >= to fix bugs 2783509 and 2783510. Operators order now by X,Y,Z and use float tolerances. + + - Ogre mesh 32bit indices fixed. + + - Fix tooltips for gui-elements with sub-element like IGUISpinBox (id: 2927079, found by ArakisTheKitsune) + + - ITimer no longer stops when started twice + + - wchar_t filesystem updates under Windows. + + - Joystick POV fixed under Windows, ids fixed under OSX. + + - Some updates to skinned mesh for better bones support and scaling animations. + + - OSX supports external window id in creation parameters now. + + - Fix bbox collision tests. + + - Updates for win32 key handling + + - new convenience method for flat plane creation. + + - Sky dome and other meshes use VBOs by default now. + + - Speed up b3d loading for files with many frames, material color flags and vertex color support enhanced. + + - Add hasType to IGUIElement as a dynamic_cast substitute. + + - Add another parameter to IGUISkin::draw3DWindowBackground to allow getting the client area without actually drawing + + - Add function getClientRect to IGUIWindow for getting the draw-able area + + - Fix bug that menus on IGUIWindows with titlebar got drawn too high (id: 2714400) + + - Renamed OctTree to Octree + + - Allow getting a ConstIterator from a non-const core:list + + - Add swap functions to irrMath and to the core classes. + + - Deprecate map::isEmpty() and replace it with map::empty() to make it similar to other base classes. + + - Allow to set the logging level already in SIrrlichtCreationParameters. + + - Add clearSystemMessages to devices (implemented only for Linux and Win32 so far). + + - Support changing the render window from beginScene also with OpenGL driver. + + - Add getMaterial2D which allows to alter the 2d render state settings, such as filtering, anti-aliasing, thickness, etc. + + - Fix incorrect cursorpos for resizable windows on Windows Vista (found and patched by buffer) + + - Change the beginScene window parameter from void* to SExposedVideoData&. This will allow to manage contexts for OpenGL at some point. + + - Add bzip2 and LZMA decompression modes for zip loader. + + - Add OBJ_TEXTURE_PATH and B3D_TEXTURE_PATH to SceneParameters to allow setting texture-paths for obj and b3d. + + - Irrlicht keeps now filenames additionally to the internally used names, thereby fixing some problems with uppercase-filenames on Linux. + + - Bugfix: Mousewheel no longer sends EMIE_MOUSE_WHEEL messages twice on Linux. + + - Use latest jpeglib + + - refactoring: E_ATTRIBUTE_TYPE and IAttribute have now own headers + + - CStringWArrayAttribute speedup + + - SceneNodeAnimatorFollowSpline can now loop and pingpong + + - Meshviewer.example got some fast-scale buttons. + + - Support AES-encrypted zip files. Should work with 128, 196, and 256 bit AES. This addition also adds a new PRNG, SHA, and other algorithms to the engine, though no interface is yet added for them. The implementation of the encryption algorithms is provided by Dr Brian Gladman. + + - flattenFilename and getAbsolutePath fixed and properly added at several places. + + - Added geometry shaders for OpenGL. A first version of the code was submitted by Matthew Kielan (devsh). + + - Bugfix: irrArray should no longer crash when using other allocators. + + - Add MaterialViewer example. + + - Texture activation now back in setMaterial, which simplifies writing external material renderers (OpenGL only). + + - Checkbox uses now disabled text color when disabled. + + - Changed colors for window-title caption to keep them readable when not active. + + - Draw sub-menus to left side if they would be outside main-window otherwise. + + - Give ListBox better defaults for the ScrollBar stepsizes. + + - Double and triple click events now for each mouse-button. Old events for that got removed. + + - Fix adding archives twice, which caused multiple archives of the same name and type covering each other. This one required a texture name change from using backslashes to slashes under Windows. + + - Give access to texture mipmaps. You can provide custom mipmap textures upon generation, regeneration, and locking. + Make sure the provided data is large enough and covers all miplevels. Also the returned pointer (from lock) will only cover the smaller data of the mipmap level dimension chosen (level 0 is the original texture). + + - Separate TextureWrap mode into U and V fields + + - Add mirror texture wrap modes + + - windows show now active/inactive state + + - remove unneeded drop/grab calls found by manik_sheeri + + - fix rounding problem in IGUIElements which have EGUIA_SCALE alignments. + + - MessageBox supports now automatic resizing and images. + Deprecated EGDS_MESSAGE_BOX_WIDTH and EGDS_MESSAGE_BOX_HEIGHT + + - Let maya-cam animator react on a setTarget call to the camera which happened outside it's own control + + - New contextmenue features: + automatic checking for checked flag. + close handling now customizable + serialization can handle incomplete xml's + setEventParent now in public interface + New function findItemWithCommandId + New function insertItem + + - new vector3d::getSphericalCoordinateAngles method. + + - new triangle3d::isTotalOutsideBox method. + + - Newly introduced VertexManipulator interface. This allows for very easy creation of vertex manipulation algorithms. Several manipulators, e.g. vertex color changer and transformation algorithms are already available. + + - createMeshWith1TCoords avoids vertex duplication + + - getRotation now handles matrices with scaling as well + + - Ogre format animations now supported. + + - irrArray: Fixed issues with push_front and reallocation + Changed behavior for set_pointer and clear, when free_when_destroyed is false + + - NPK (Nebula device archive) reader added, it's an uncompressed PAK-like format + + - SSkinMeshBuffer::MoveTo* methods renamed to convertTo* + + - Multiple Render Target (MRT) support added, including some enhanced blend features where supported + + - Directory changing fixed for virtual file systems (Archives etc) + + - Fix texture matrix init in scene manager and driver + + - More draw2dimage support in software drivers + + - Sphere node now properly chooses a good tesselation based on the parameters + + - Active camera not registered twice anymore + + - Parallax/normal map shader rotation bug under OpenGL fixed + + - bump map handling for obj files fixed + + - Fog serialization added + + - New context menu features added + + - Bounding Box updates for skinned meshes fixed + + - The current FPS for an animated scene node can be queried now, added some variables to serialization + + - Scrollbars fixed + + - Fixed 2d vertex primitive method to correctly handle transparency + + - Fullscreen handling has been enhanced for Windows, now proper resolution is restored on Alt-Tab etc. + + - Cameras can now be added to the scene node without automatically activating them + Clone method added + + - New video driver method getMaxTextureSize + + - PAK archive reader fixed + + - TRANSPARENT_ALPHA_CHANNEL_REF uses modulate to enable lighting + + - LIGHTMAP_ADD now always uses add operator + + - Some Unicode file system fixes + + - destructor of irrString not virtual anymore, please don't derive from irrString + Some new methods added, for searching and splitting + Assignment operator optimized + + - new lightness method for SColor + + - draw3DTriangle now renders filled polygons, old behavior can be achieved by setting EMT_WIREFRAME + +----------------------------- +Changes in 1.6.1 (13.01.2010) + + - Fix pingpong for CSceneNodeAnimatorFlyStraight (found by gbox) + + - Fix bug with IGUIEditBox where the cursor position is reset on text change. + + - Make sure the window top-left corner on Windows is not negative on start so that Windows sytem-menu is always visible. + + - Fix problem that the window did sometimes not get the keyboard focus in X11 in fullscreen. Add more debug output in case focus grabbing goes wrong. + + - Fix screensize in videodriver when we didn't get the requested window size. This also prevents that gui-clicks are no longer synchronized with gui-drawing and elements can't be hit anymore. + + - Bugfix: Prevent a crash when getTypeName was called for the guienvironment. EGUIET_ELEMENT got changed for this. + + - Bugfix: Horizontal centered font with linebreaks draw now all lines. For example multiline TextSceneNodes work again. + + - Bugfix: spinbox can no longer get in an endless loop due to floating point rounding error (found by slavik262) + + - !!API change!! Disabled AntiAliasing of Lines in material default + Please enable this manually per material when sure that it won't lead to SW rendering. + + - IGUIComboBox: clicking on the statictext displaying the active selection does now close and open listbox correctly. (Bug found by Reiko) + + - Scrollbuttons in IGUITabControl adapt now to tab-height. + + - Fix texturing of cylinder mesh + + - Fix modal dialog position (found by LoneBoco: http://sourceforge.net/tracker/?func=detail&aid=2900266&group_id=74339&atid=540676) + + - Fix DMF loading + + - Fixing left+right special keys (ctrl, shift, alt) on Win32 (thanks to pc0de for good patch-ideas). + + - Make stringarrays for enums in IGUISkin a little safer + + - Add support for keys KEY_PRINT, KEY_HOME (on numpad) and KEY_NUMLOCK on Linux. + + - Fix material handling in createMeshWith1TCoords + + - Fix another (OldValue == NewValue) before drop()/grap(), this time in CTextureAttribute::setTexture. + + - Fix LIGHTMAP_LIGHTING for D3D drivers. + + - AntiAliasing disabled for debug render elements. + + - Bugfix: CGUIToolBar::addButton does no longer mess up when no image is set and does now actually work with the text. + + - Fix ninja animation range which got messed up a little when b3d animations got fixed (thx gbox for finding) + +--------------------------- +Changes in 1.6 (23.09.2009) + + - Added IFileSystem::createEmptyFileList, exposed IFileList::sort, addItem and added getID + + - Fix MAKE_IRR_ID so it can be used from outside the irr namespace (Micha's patch) + + - Renamed some methods in ISkinnedMesh to match the official Irrlicht naming scheme according to createXXX() + + - Change debug data to draw using lines instead of arrows, which is much faster. Patch by pc0de + + - Fix a bug with FPS camera animator causing stutters. Patch by FuzzYspo0N + + - Fix scrolling controls in CGUITabControl + + - Fix a bug when getting optimal texture size in D3D drivers, by Jetro Lauha (tonic) + + - Added EGDS_TITLEBARTEXT_DISTANCE_X and EGDS_TITLEBARTEXT_DISTANCE_Y to GUI, submitted by FuzzYspo0N + + - Fix for UFT8 filenames displayed in file dialog, patch by MadHyde. + + - Added const method for array::binary_search, potentially slow as it doesn't sort the list! + + - Add support for scaling button images. + + - Irrlicht can now come with multiple device types compiled in, the device to use is selected by SIrrlichtCreationParameters.DeviceType. This defaults to EIDT_BEST which automatically select the best device available starting with native, then X11, SDL and finally the console. + + - Added support for EXP2 fog distribution. This required a change in the setFog parameters where now an enum value instead of the bool linear is given. + + - IFileSystem changes: + + - Renamed the following functions- + IFileArchive::getArchiveType to getType + IFileSystem::registerFileArchive to addFileArchive + IFileSystem::unregisterFileArchive to removeFileArchive + IFileArchive::openFile to createAndOpenFile + + - New enum, E_FILE_ARCHIVE_TYPE. getType on IArchiveLoader and IFileArchive now both return this. + + - IFileSystem::addFileArchive takes a parameter to specify the archive type rather always using the file extension. IFileSystem::addZipFileArchive, addFolderFileArchive and addPakFileArchive now use this but these functions are now marked as deprecated. Users should now use addFileArchive instead. + + - Added TAR archive loader. + + - The ZIP archive loader can now load gzip files, combined with the TAR loader this means Irrlicht now has native support for .tar.gz + Currently this must be done in two calls, for example: + fileSystem->addFileArchive("path/to/myArchive.tar.gz"); + fileSystem->addFileArchive("myArchive.tar"); + + - Fix highlighting in IGUIEditBox where kerning pairs are used in the font. For example in future italic, OS or other custom fonts. + + - IOSOperator::getTextFromClipboard returns now const c8* instead of c8* + + - Support for copy&paste on linux (X11) added (fixing bug 2804014 found by Pan) + + - bugfix for 2795321 found by egrath: Don't rely anymore on broken XkbSetDetectableAutoRepeat. + + - bugfix: CMountPointReader::openFile no longer returns true for empty files. Corresponding test added. + + - Direct3D now also uses screen coordinates in 2d mode, just like OpenGL. This means that screen coords are going from 0..ScreenWidth and 0..ScreenHeight instead of -1..1. + + - ALT+F4 keypress now closes Windows SDL device + + - Allow Direct3D drivers in SDL, patch by Halifax + + - Added compiler error when attempting to compile with VC6. + + - Use setWindowTextA in Windows device for WIN64 platform, posted by veegun + + - ELL_ERROR log events are now created when shaders fail to compile or link, reported by Halan + + - irrList now uses irrAllocator, fixed by Nox + + - Added IGUIWindow::setDraggable and IGUIWindow::isDraggable, by Nox + + - Added SGI RGB file reader by Gary Conway, for loading Silicon Graphics .rgb, .rgba, .sgi, .int and .inta textures + + - Renamed setResizeAble to setResizable + + - Added new device method minimizeWindow which minimizes the window (just as if the minimize button has been clicked). + + - SkyDome is now serialized correctly + + - Added PLY mesh reader and writer + + - Ensure ListBox on combo box doesn't hang off the bottom of the GUI root, by Matthias Specht + + - Made IGUIElements recalculate clipping rectangle after setNotClipped, reported by Aelis440 + + - Bug fix for the combo box where it showed white text instead of skin color before being focused, fix posted by drewbacca + + - EGDS_MESSAGE_BOX_HEIGHT is now honoured, bug reported by Spkka + + - Fixed a bug in the edit box where events are sometimes sent to a null parent, reported by Sudi. + + - Coordinate system fix for OpenGL in SDL device + + - Added generic console device. You can now use Irrlicht to create and manipuate graphics on a shell where no graphics hardware + or windowing system is available. To enable it uncomment #define _IRR_USE_CONSOLE_DEVICE_ in IrrCompileConfig.h + - The console device can now present images from the software drivers and display them as ASCII art in the console + - By default it replaces the default font in the skin, to prevent fonts from being huge. + + - Fixed problems with changing cursor visibility while mouse is pressed on windows + + - Allow control of background drawing in listbox + + - Allow control of drawing background and titlebar in windows + + - Improved window serialization + + - Add mouse events EMIE_MOUSE_DOUBLE_CLICK and EMIE_MOUSE_TRIPLE_CLICK (thx to Ulf for patch proposal) + + - Set "ButtonStates" for mouse events also on Linux (was only for Windows formerly) + + - Add Shift+Control states to mouse event + + - bugfix (2003238): serialize modal screens + + - allow stacking modal screens + + - allowing hiding modals + + - replace many IsVisible checks with virtual isVisible() checks in IGUIElement + + - bugfix: reset selected row when clearing CGUITable + + - adding events EGET_EDITBOX_CHANGED and EGET_EDITBOX_MARKING_CHANGED + + - prevent editbox from recalculating its textbreaking each frame + + - let spinbox react on each textchange without waiting for enter to prevent getting value changes without corresponding EGET_SPINBOX_CHANGED events. + + - new test for zipreader + + - prevent dropping objects accidentally in many set functions + + - Reversed change in vector3d::normalize. + Works now again as documented and a corresponding test has been added. + Does fix bug 2770709 (https://sourceforge.net/tracker/?func=detail&aid=2770709&group_id=74339&atid=540676) + + - Animations can now be paused by setting the fps to 0. + + - Avoid fp-precision problem in getPickedNodeBB (see also http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=33838&highlight=). + This change might also fix the problem with picking nodes found by aanderse (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=32890&highlight=) + + - implemented isALoadableFileFormat ( File *file ) for the Archive Loader + + - PixelBlend16 and PixelBlend16_simd are working for the new rules. + + - bugfix. CLightSceneNode didn't correctly update it's attributes + + - vector template and equals tests + also set the equal test for s32 to behave like the f32 routine. + The function equals always implements a weak test. + that means a tolerance MUST always be used if you use the equal function. default is 1. + + - VideoDriver drawPixel + The HW renderes are using the alpha components for blending. + The Software Renderes and image loaders are using CImage::setPixel copy. + so setPixel is engaged to either blends or copy the pixel + default: false + - Burningvideo + added RenderMaterial EMT_SPHERE_MAP + pushed burningsvideo to 0.43 + added RenderMaterial EMT_REFLECTION_2_LAYER + pushed burningsvideo to 0.44 + set EMT_TRANSPARENT_ALPHA_CHANNEL_REF + to use AlphaRef 0.5 like Direct3D + + One Note: in OpenGL there is know difference between sphere_map and reflection layer + both using GL_TEXTURE_GEN_MODE GL_SPHERE_MAP, whereas in d3d one time using camera_normal + on sphere and reflection on refletcion_layer. + + The visual difference is that on sphere map the "image is not moving" when you rotate the + viewer. For Burning i took the opengl visual. always moving + + - rename quake3 SEntity to IEntity to be confom with IShader + + - fixed createMeshWith2TCoords, normals were missing during copy. + + - added + //! Creates a copy of the mesh, which will only consist of S3DVertex vertices. + IMesh* CMeshManipulator::createMeshWith1TCoords(IMesh* mesh) const + + - added io::IFileSystem* CSceneManager::getFileSystem() + + - added virtual const c8* ISceneManager::getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type); + + - added CSceneNodeAnimatorFlyCircle::radiusEllipsoid. + if radiusEllipsoid == 0 the default circle animation is done + else radiusEllipsoid forms the b-axe of the ellipsoid. + -> gummiball bouncing + + - added ISceneManager::createFlyStraightAnimator variable bool ping-pong + used in loop mode to device if start from beginning ( default ) or make ping-pong + -> straight bouncing + + - changed IFileSystem::registerFileArchive + remove the index of the hierarchy and added a new interface method + //! move the hirarchy of the filesystem. moves sourceIndex relative up or down + virtual bool moveFileArchive( u32 sourceIndex, s32 relative ) = 0; + + - bugfix and changes in SViewFrustum::SViewFrustum + wrong size of Matrices copy. + renamed E_TRANSFORMATION_STATE_2 to E_TRANSFORMATION_STATE_FRUSTUM + therefore also changed SViewFrustum::setTransformState to not tap + + in the pitfall again of wrong memory... + + - moved + //! EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending + inline bool textureBlendFunc_hasAlpha ( E_BLEND_FACTOR factor ) const + from the material renderes ( 3x declared ) to SMaterial.h + + - updated managed light example to use standard driver selection + + - BurningsVideo + - LightModel reworked. + Point Light & Direction Light works for Diffuse Color as expected + Specular and Fog still have problems ( needs new pixel shader ) + pushed burningsvideo to 0.42 for this major step + + - removed obsolete matrix transformations + renamed E_TRANSFORMATION_STATE_2 to E_TRANSFORMATION_STATE_BURNING + + - cleaned line3d.h vector3d.h template behavior. + many mixed f32/f64 implementations are here. i'm not sure if this should be + the default behavior to use f64 for example for 1.0/x value, because they + benefit from more precisions, but in my point of view the user is responsible + of choosing a vector3d or vector3d. + + - added core::squareroot to irrmath.h + -> for having candidates for faster math in the same file + + - added AllowZWriteOnTransparent from SceneManager to burningsvideo + + -added hasAlpha() to ITexture + This info can be used for e.q to downgrade a transparent alpha channel blit + to add if the texture has no alpha channel. + +- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!! + + The FileSystem is now build internally like for e.g. the image- and meshloaders. + There exists a known list of ArchiveLoaders, which know how to produce a Archive. + The Loaders and the Archives can be attached/detached on runtime. + + The FileNames are now stored as io::path. where c16 is toggled between char/wchar + with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off) + Replaced most (const c8* filename) to string references. + + Basically the FileSystem is divided into two regions. Native and Virtual. + Native means using the backend OS. + Virtual means only use currently attached IArchives. + + Browsing + each FileSystem has it's own workdirectory and it's own methods to + - create a FileTree + - add/remove files & directory ( to be done ) + Hint: store a savegame in a zip archive... + + basic browsing for all archives is implemented. + Example 21. Quake3Explorer shows this + + TODO: + - a file filter should be implemented. + - The IArchive should have a function to create a filetree + for now CFileList is used. + + Class Hierarchy: + + IArchiveLoader: is able to produce a IFileArchive + - ZipLoader + - PakLoader + - MountPointReader ( formaly known as CUnzipReader ) + + IFileArchive: + -ZipArchive + -PakArchive + -MountPoint (known as FolderFile) + + IFileSystem + - addArchiveLoader + + - changed implementation of isALoadableFileExtension in all loaders + to have consistent behavior + - added a parameter to IFileList * createFileList + setFileListSystem + allows to query files in any of the game archives + standard behavior listtype = SYSTEM ( default) + + - CLimitReadFile + added multiple file random-access support. + solved problems with mixed compressed & uncompressed files in a zip + +- IrrlichtDevice + added: + virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0; + virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0; + and calculating methods to DeviceStub. + + - irrlicht.h + changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix + to extern "C" name mangling. + + - ParticleSystem + removed the private (old?,wrong?) interface from the ParticleEffectors + to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes + +- Generic + - vector3d& normalize() optimized + added reciprocal_squareroot for f64 + + - dimension2d + added operator dimension2d& operator=(const dimension2d& other) + to cast between different types + + - vector2d bugfix operator+= + + - C3DSMeshLoader renamed chunks const u16 to a enum + removing "variable declared but never used warning" + + - added a global const identity Material + changed all references *((video::SMaterial*)0) to point to IdentityMaterial + removed warning: "a NULL reference is not allowed" + + - modified IRRLICHT_MATH to not support reciprocal stuff + but to use faster float-to-int conversion. + + - core::matrix4 + USE_MATRIX_TEST + + i tried to optimize the identity-check ( w.r.t. performance) + i didn't succeed so well, so i made a define for the matrix isIdentity -check + for now it's sometimes faster to always calculate versus identity-check + but if there are a lot of scenenodes/ particles one can profit from the + fast_inverse matrix, when no scaling is used. further approvement could + be done on inverse for just translation! ( many static scenenodes are not rotated, + they are just placed somewhere in the world) + one thing to take in account is that sizeof(matrix) is 64 byte and + with the additional bool/u32 makes it 66 byte which is not really cache-friendly.. + + - added buildRotateFromTo + Builds a matrix that rotates from one vector to another + + - irr::array. changed allocating routine in push_back + + added a new method setAllocStrategy, + safe ( used + 1 ), double ( used * 2 + 1) + better default strategies will be implemented + + - removed binary_search_const + i added it quite a long time ago, but it doesnt make real sense + a call to a sort method should happen always. i just wanted to safe + a few cycles.. + - added binary_search_multi + searches for a multi-set ( more than 1 entry in the sorted array) + returns start and end-index + + - changed some identity matrix settings to use core::IdentityMatrix + + - added deletePathFromFilename to generic string functions in coreutil.h and + removed from CZipReader and CPakReader + + - s32 deserializeAttributes used instead of virtual void deserializeAttributes in + ParticleSystem ( wrong virtual was used) + +- strings & Locale + - started to add locale support + - added verify to string + - added some helper functions + +- XBOX + i have access to a XBOX development machine now. I started to compile + for the XBOX. Question: Who did the previous implementation?. There + is no XBOX-Device inhere. maybe it's forbidden because of using the offical + Microsoft XDK. I will implement a native or sdl device based on opendk. + irrlicht compiles without errors on the xbox but can't be used. + +- Windows Mobile + reworked a little. added the mobile example to the windows solution for + cross development. + added maximal 128x128 texture size for windows mobile ( memory issues ) + +- Collision Speed Up + + The Collision Speed Up greatly improves with many small static child-nodes + + - added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate + + - modified createOctTreeTriangleSelector and createTriangleSelector + to allow node == 0, to be added to a meta selector + + - CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS + on first update: + Problem. you start setting the map. (setWorld). First update cames 4000 ms later. + The Animator applies the missing force... big problem... + changed to react on first update like camera. + + - add Variable FirstUpdate. if set to true ( on all changes ) + then position, lasttime, and falling are initialized + + -added #define OCTTREE_USE_HARDWARE in Octree.h + + if defined octtree uses internally a derived scene::MeshBuffer which has + the possibility to use the Hardware Vertex Buffer for static vertices and + dirty indices;-) + + if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer + so it's not just a replacement inside the octree. It also in the OctTreeSceneNode. + #define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside + + - virtual void ISceneNode::updateAbsolutePosition() + - changed inline CMatrix4 CMatrix4::operator*(const CMatrix4& m2) const + + - changed inline bool CMatrix4::isIdentity() const + to look first on Translation, because this is the most challenging element + + - virtual core::matrix4 getRelativeTransformation() const + Hierarchy on Identity-Check + 1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity + 2) ->isIdentity () -> 16 floating point checks to be passed as Identity + + - inline void CMatrix4::transformBoxEx(core::aabbox3d& box) const + added isIdentity() check + +- changed CSceneNodeAnimatorCollisionResponse + - added CSceneNodeAnimatorCollisionResponse::setGravity + needed to set the differents Forces for the Animator. for eq. water.. + - added CSceneNodeAnimatorCollisionResponse::setAnimateTarget + - added CSceneNodeAnimatorCollisionResponse::getAnimateTarget + - changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate + - TODO: set Gravity to Physically frame independent values.. + current response uses an frame depdended acceleration vector. + ~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03 + may effect existing application.. + +- SceneNodes + - CSkyDomeSceneNode + moved radius ( default 1000 ) to constructor + added Normals + added DebugInfo + added Material.ZBuffer, added SceneManager + + - CVolumeLightSceneNode: + changed default blending OneTextureBlendgl_src_color gl_src_alpha to + EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one ) + which gives the same effect on non-transparent-materials. + Following the unspoken guide-line, lowest effect as default + + - changed SceneNode Skydome from f64 to f32 + + - AnimatedMesh Debug Data: + mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order) + + - Camera SceneNode setPosition + Camera now finally allow to change position and target and updates all + effected animators.. + +- Device: + added the current mousebutton state to the Mouse Event + so i need to get the current mouse state from the OS + +- GUI + + - CGUIFont: + - added virtual void setInvisibleCharacters( const wchar_t *s ) = 0; + define which characters should not be drawn ( send to driver) by the font. + default: setInvisibleCharacters ( L" " ); + + - added MultiLine rendering + should avoid to us CStaticText breaking text in future + + - CGUIListBox + - changed Scrollbar LargeStepSize to ItemHeight + which easy enables to scroll line by line + + - CGUIScrollBar + - bug: event lost when moving outside the window + - bug: Scrollbar notifyListBox notify when the scrollbar is clicked. + - changed timed event in draw to OnPostRender + + - added GUI Image List from Reinhard Ostermeier, modified to work + + - FileOpenDialog + changed the static text for the filename to an edit box. + + - changed the interface for addEditBox to match with addStaticText + + - changed the interface for addSpinBox to match with addEditBox + + - added MouseWheel to Spinbox + + - changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker + + - CGUISpritebank + removed some crashes with empty Sprite banks + + - IGUIScrollBar + added SetMin before min was always 0 + changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down + + - IComboBox: added ItemData + + - optimized IsVisible check in IGUIElement::draw + +- Image Loaders + - added TGA file type 2 ( grayscale uncompressed ) + - added TGA file type (1) 8 Bit indexed color uncompressed + + ColorConverter: + - added convert_B8G8R8toA8R8G8B8 + - added convert_B8G8R8A8toA8R8G8B8 + +- Media Files + - added missing shaders and textures to map-20kdm2. + Taken from free implementation + - ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero + - impact.wav clip-restoration, trim cross-zero + - added gun.md2, gun.pcx to media-files + - added new irrlicht logo irrlicht3.png + +- OctTree + -added + #define OCTTREE_PARENTTEST ( default: disabled ) + used to leave-out children test if the parent passed a complete frustum. + plus: leaves out children test + minus: all edges have to be checked + - added MeshBuffer Hardware Hint Vertex to octtree + +- CQuake3ShaderSceneNode: + - removed function releaseMesh + Shader doesn't copy the original mesh anymore ( saving memory ) + so therefore this (for others often misleading ) function was removed + - changed constructor to take a (shared) destination meshbuffer for rendering + reducing vertex-memory to a half + - don't copy the original vertices anymore + - added deformvertexes autosprite + - added deformvertexes move + - added support for RTCW and Raven BSPs ( qmap2 ) + - added polygonoffset (TODO: not perfect) + - added added nomipmaps + - added rgbgen const + - added alphagen + - added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices + - added Quake3Explorer examples + - added wave noise + - added tcmod transform + - added whiteimage + - added collision to Quake3Explorer + - renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo ) + - updated quake3:blendfunc + - added crouch to Quake3Explorer + (modifying the ellipsiodRadius of the camera animator ) + added crouch to CSceneNodeAnimatorCameraFPS + still problems with stand up and collision + - Quake3MapLoader + modified memory allocation for faster loading + - Quake3LoadParam + added Parameter to the Mesh-Loader + - added + The still existing missing caulking of curved surfaces. + using round in the coordinates doesn't solve the problem. + but for the demo bsp mesh it solves the problem... (luck) + so for now it's switchable. + TJUNCTION_SOLVER_ROUND + default:off + +- BurningVideo + - pushed BurningsVideo to 0.40 + - added blendfunc gl_one_minus_dst_alpha gl_one + - added blendfunc gl_dst_color gl_zero + - added blendfunc gl_dst_color src_alpha + - modified AlphaChannel_Ref renderer to support alpha test lessequal + - addded 32 Bit Index Buffer + - added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash ) + - added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2 + Burning checks this flag and when set, it bypasses the power2 size check, + which is necessary on 3D but can be avoided on 2D. + used on fonts automatically. + - added Support for Destination Alpha + +- Direct3D8 + - added 32 Bit Index Buffer + - compile for XBOX + +- Direct3D9 + - fixed crash on RTT Textures DepthBuffer freed twice. + added deleteAllTextures to destructor + +- NullDriver + - removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures + + - ISceneCollisionManager::getSceneNodeAndCollisionPointFromRay() allows selection by BB and triangle on a heirarchy of scene nodes. + + - Triangle selectors created from animated mesh scene nodes will update themselves as required to stay in sync with the node. + + - IVideoDriver has methods to enumerate the available image loaders and writers. + + - Octtree scene nodes are now IMeshSceneNodes rather than ISceneNodes, and so you can call getMesh() on them. + + - New scene parameter B3D_LOADER_IGNORE_MIPMAP_FLAG to ignore the often missing mipmap flag in b3d files. If this parameter is true, the old pre Irrlicht-1.5 behavior is restored. + + - Added Mipmap LOD Bias attribute to MaterialLayer. + + - Added ColorMask support to selectively disable color planes on rendering. + + - Added support for all available depth test functions. + + - Add an outNode to getCollisionPoint() that returns the scene node that was hit, as well as the triangle. + + - Initial support for Alpha To Coverage, needs some more fixing until it works on all supported platforms. + + - Added support for Anti-Aliasing modes per material + + - Added an ICollisionCallback to ISceneNodeAnimatorCollisionResponse, to inform the application that a collision has occured. Thanks to garrittg for this. + + - Added an startPosition parameter to createFlyCircleAnimator() to allow starting the animator at any position on the circle. + + - Many uses of dimension2d changed to dimension2d, including IImage, ITexture and screen dimensions. You will have to change (at least) createDevice() calls to use dimension2d + + - Added Doublebuffer flag to SIrrCreationParameters, for better finetuning + + - Added Stereo-Framebuffer support for professional OpenGL cards + + - Added IFileSystem::createMemoryWriteFile() to allow creation of an IWriteFile interface that uses an application supplied memory buffer. + + - Added an IVideoDriver::writeImageToFile() overload that can take an IWriteFile interface. + + - (Internal) Replaced CMemoryReadFile with CMemoryFile, that also implements an IWriteFile interface. + + - Added an optional light manager to the scene manager to allow the user application to turn lights on and off during scene rendering. This can be used to produce "zoned" lighting. See example 20.ManagedLights. + + - Added a method to flip the Y movement of the FPS camera. + + - The Anisotropy filter can now be set to the AF value per texture layer. So no forced MAX_ANISOTROPY anymore. .irr files will probably fail, though. + + - AntiAlias parameter in SIrrCreationParameters is now an u8 value specifying the multisampling level (0 for disabled, 4,6,8, and others for anti-aliasing) + + - D3D devices use DISCARD for windowed renderbuffers now, can be faster. + + - Changed behavior of PixelBlend16() / PixelBlend16_simd() so that they treat the 1 bit alpha of the source pixel as boolean, i.e. they draw either the source pixel, or the destination pixel, rather than "blending". (Issue revealed by the fix to IVideoDriver::makeColorKeyTexture()). + + - IVideoDriver::makeColorKeyTexture() bug fixed so that only alphas, not whole texel colors, are zeroed. An optional parameter allows using the old (buggy) behavior for backwards compatibility. + + - position2d is now a synonym for vector2d. position2d is therefore marked as deprecated, although it's unlikely to be removed. + + - ISceneNodeAnimator now has a hasFinished() method. + + - ISceneNodeAnimatorCollisionResponse exposes the target node. Setting the node again resets the last position, allowing the node to be teleported. + + - Add a hitPosition out parameter to ISceneCollisionManager::getCollisionResultPosition() - this is a (small) API breaking change. + +------------------------------------- +Changes in version 1.5.2 (16.12.2009) + + - Properly check boundaries in getFont and setFont. + + - Reinit values in the driver when scene manager is cleared. + + - Normals handling fixed in createMeshWithTangents, existing normals are not always destroyed now. + + - Fix terrain smoothing, bug found by loverlinfish + + - SOLARIS recognition removed. Please specify the platform define manually. This allows for compilation under sparc/Linux and sparc/Solaris + + - Some uninitialized variables fixed + + - FreeBSD joystick support added (for Debian package) + + - Fix cursor problems found by buffer and by rvl2 as described in http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=34823&highlight= + + - OSX/XCode updates + + - MS3D loader bug fixed + + - Float parse bug fixed + +------------------------------------- +Changes in version 1.5.1 (05.08.2009) + + - Make sure a missing font does not corrupt the skin. + + - Fix getAngle in vector2d as suggested by xray. This has only a minor impact on s32 vectors. + + - bugfix: CGUIFont::getCharacterFromPos regards now kerning (found by Arras) + + - Add support for range fog in some OpenGL versions. + + - Fix for shadow volume removal, submitted by vitek. + + - Avoid using X11 autorepeat to deal with broken X11 versions. + + - Speculars are properly exported into mtl files now, instead of corrupting them. + + - Binary type loading in attributes fixed. + + - bugfix: Use make_lower throughout for spritebank filenames (found and patched by Ion Dune) + + - STL loader fixed: Right-handedness corrected, normals and bboxes are correctly added now. + + - bugfix: CUnZipReader::openFile no longer returns true for empty files. Corresponding test added. + + - Big endian issues in .x loader fixed. + + - HSLColor methods repaired. + + - copyToScaling fixed. + + - Fixed problem with highlighting menus when mouse was outside sub-menu area. + + - bugfix (2796207): menu acted (wrongly) on left-click down instead of left-click up. + + - bswap16 fallback macro fixed + + - getBaseName fixed to work correct with dots in filenames. + + - static method isDriverSupported allows for simple check of available drivers. + + - Some defines added to check for the Irrlicht version of the library. + + - Make sure all renderstates are properly initialized + + - Wrong size for main depth buffer fixed. + + - Fix 3ds shininess to the allowed range. + + - Fix loading of Collada files from irrEdit 1.2 + + - Remove texture pointers after texture clear. + + - WindowsCE pathnames fixed. + + - Some virtuals are now overridden as expected. + + - Incomplete FBOs are properly signalled now + + - Update to libpng 1.2.35, fixed issues on 64bit machines with system's libpng. + + - Fixed wrong grab/drop in setOverrideFont + + - Added draw2dRectOutline + + - rectf and recti added. + + - Fix ALPHA_CHANNEL_REF to a fixed check for alpha==127 as expected. + + - Fixed OSX device bug where screen size was not set in fullscreen mode. + + - cursor setVisible changed to be called less often. + + - OpenGL version calculation fixed. + + - OSX device now supports shift and ctrl keys. + + - Fixed ambient light issues in burningsvideo. + + - device reset for d3d fixed when using VBOs. + + - Fix dimension2d += + + - MD2 mesh loader: Now uses much less memory, reduced number of allocations when loading meshes. + + - OpenGL render state (texture wrongly cached) fixed. + + - Fixed animator removal. + + - Checnged collision checks for children of invisible elements to also be ignored (as they're actually invisible due to inheritance). + + - Fix terrain to use 32bit only when necessary, make terrain use hw buffers. Heightmap loading and height calculation fixed. Visibility and LOD calculations updated. + + - Some mem leaks fixed + + - FPS camera resets the cursor better + +----------------------------------- +Changes in version 1.5 (15.12.2008) + + - Construction calls for FPS camera changed to take speed in units/milliseconds, just as the setSpeed method does. + + - Code::Blocks workspaces added. C::B projects (using gcc) now output to /lib/gcc and /bin/gcc, when built on either Windows or Linux. + + - Added a test suite in the /tests directory. This can be used to perform regression tests, and should be updated with new tests to verify fixes or validate new features. + + - Changed the preferred way of altering light node's radius: Use the new member methods of ILightSceneNode instead of directly modifying the SLight structure. + + - Changed the initial attenuation back to (0,1/radius,0). To override this value simply change the attenuation in the SLight (lightnode->getLightData().Attenuation.set(x,y,z)) + + - Dirty fix for OSX device setResizable and a bug fix to do with resizing the device. + + - Terrain heightmap and texture were flipped in order to draw them as expected (looking onto the terrain from high above will just look like the actual texture/heightmap). + + - Significant internal change to the way that FPS camera jump speed and collision response animator gravity interact. The behavior is now much more realistic, but it will require you to adjust your jump speed and gravity. + + - Skybox won't be culled anymore by nearplane or farplane. + + - BBoxes of animated meshes (skinned meshes) are updated again. + + - Lost devices (as found with D3D) are properly handled now. So the screen can be resized or minimized without crashing the app. + + - Renamed IGUIElement::setRelativePosition(const core::rect& r) to IGUIElement::setRelativePositionProportional(), as it has radically different functionality from setRelativePosition(const core::rect& r) + + - Added IGUIElement::setRelativePosition(const core::position2di & position) to set a new position while retaining the existing height and width. + + - Many Collada fixes. z_up coords are supported now, texture coords are properly loaded. Transparency is supported. + + - Camera scene node rotation and target can now be bound together so that changing one automatically changes the other (as the FPS camera has always done). See ICameraSceneNode::bindTargetAndRotation() + + - Removed the extra libpng files for OSX. OSX now also uses the default libpng. + + - Enhanced PCX support with some more color formats and write support. + + - Fixed LMTS problems with extra data in files. + + - Removed VS6 .dsw / .dsp project files - VS6 is no longer supported. + + - Particles can be scaled during animations. Particle scaling needs to happen in the emitter now, instead of in the Particle system scene node. Deprecation methods will guide the user. + + - ISceneNode::setParent and addChild now updates node SceneManager pointers if the node was from another SceneManager. + + - Basic support for joystick input events on Windows, Linux, SDL and OSX. Tested with wired Logitech and Thrustmaster wired controllers and XBox 360 wireless controller ( http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver ) + + - Fixed scaled octree nodes being incorrectly frustum culled. + + - FSAA under OpenGL and Win32 added. Now all hw drivers and platforms should support it. + + - Unlimited RTT fix for D3D systems. Depth buffers are now shared if possible, otherwise a new depth buffer is generated. In order to save VidMem one should create RTTs starting with the largest one. + + - Avoid RTTs with nonFBO-support under OpenGL which are larger than the screen. Since we rely on rendering into textures in this case we need to clamp the size by the screensize. + + - Fixes for getAbsoluteFilename under Linux in order to return a filename instead of en empty string in case the file doesn't exist. + + - Use absolute path names when creating / finding textures. + + - Font tool implementation for Linux with xft, by Neil Burlock. + + - Support for normals and UV coords from DeclData in .x files. + + - Modified line2d::intersectWith() to cover more cases. + + - Added IVideoDriver::drawPixel(). + + - Moved the window pointer from endScene to beginScene, as this is required for OpenGL support of external window pointers. + + - Fix for terrain culling. + + - Added minimize button to win32 window (if resizable) + + - Major API change: RTTs are now created via addRenderTargetTexture instead of createRenderTargetTexture, which allows to retrieve them from the texture cache, but also changes the way of removing the RTTs, and especially one must not drop the pointer anymore. + + - WindowsCE-Bugfix + + - disableFeature can be used to override feature support of the video driver. + + - draw2DImage can now also handle RTTs under OpenGL (which were flipped before). + + - Ogre mesh format fixes for proper texture support. + + - Added .obj mesh writer. + + - Some core::string constructors made explicit to avoid unintended conversions. Just add core::stringc() or core::stringw() around the old code to avoid warnings. + + - IdentityMatrix is now a properly defined global, with external visibility on all platforms. + + - Bugfix for context releases with glx 1.3 on error. + + - Removed constraints for sizes of the terrain scene node. + + - Support for 32bit indices in a special MeshBuffer class. + + - isBetweenPoints return true now even for the begin and end points, i.e. line segments are now including their start and end. + + - Fix XML reader creation for non-existing files and invalid callbacks. + + - Changed interpretation of MaterialTypeParam==0 in transparent materials. Now it's consistent with all other values, but one has to set the value to 0.5 to get the old behavior (slightly faster rendering, but no smooth borders) + + - Replaced transformBox by transformBoxEx in some internal methods to avoid major malfunction of the transformations. + + - Fix use of zip file inside zip files. + + - Avoid loading textures which are not used by the mesh in b3d loader. + + - Added scaleTCoords methods to MeshManipulator + + - Enable use of other meshes for shadow mesh generation, can be used to speed up shadow generation and rendering for complex meshes. Patch based on a version by tonic. + + - Fixed usage of SIrrCreationParameters struct, which dind't have copy constructor and assignment operator anymore, since the Irrlicht version string was made const. + + - New glext.h (version 41) and glxext.h (version 20) supporting OpenGL 3.0 + + - Added support for read-only locking of textures. Can speed up those calls. + + - Added support for locking RTTs under OpenGL. + + - Implementation of UserData events from system events. + + - ICameraSceneNode::setIsOrthogonal replaced by a parameter to setProjectionMatrix. + + - All meshbuffers are now dynamically allocated to avoid problems with grabbed buffers, which may be deleted before the last drop happens (due to static memory allocation). + + - Enhanced scene graph traversal with example from rogerborg. + + - FPS camera disabling of event receiver works better now. + + - scene deserialization allows for a user defined callback after a new scene node is created. + + - Fixed tangent mesh loading from .irrmesh files. + + - OpenGL clamp modes are now properly set. + + - IMeshManipulator::transformMesh renamed to transform, also supports meshbuffers now. + scaleMesh renamed to scale, supports meshbuffers as well. + + - vector3d::rotationToDirection added. + + - New mesh generators for cone and cylinder. + + - Hardware accelerated Vertex and Index Buffer support finally integrated into Irrlicht. Thanks to a resource handling idea by Klasker and the almost immediate implementation by Luke, Irrlicht now supports VBOs under OpenGL and D3D. + Hardware buffers make rendering the same vertices much faster. To use this feature with a mesh, simply set a usage type via MeshBuffer->setHardwareMappingHint(scene::EHM_STATIC). The driver will upload the vertices and indices on the next draw and reuse this information without the need to upload it each frame. + Vertex and Index buffers can also be updated separately, which is e.g. useful for the terrain node's LOD. + + - Changed FBO creation according to Nadro's patch. Seems to have zbuffer problems currently. + + - Update to libpng 1.2.29 + + - Compiler flag for PerfHUD support added. + + - recalculateNormals and tangent space creation enhancements by ryanclark. + + - Added getColorFormat methods for device and driver, returning the color format of the device's window and the driver's framebuffer. + + - Added isFullscreen method. + + - Added isWindowFocused and isWindowMinimized methods. + + - Screenshots are now always made from the frontbuffer, so always the last completely rendered image is captured. However, overlapping windows may corrupt those parts of the screenshot (as was previously happening with d3d already). + + - New device creation parameter to disable Irrlicht's system event handling. + + - New device creation parameter to specify depth bits. + + - New device creation parameter to request alpha channel in framebuffer. + + - Draw2DImage methods under OpenGL now also handle RTTs correctly. + + - Fixed RTT bug which lead to strangely clamped textures. + + - Speed improvement for screenshots on some Intel cards under OpenGL. + + - My3D file loader fixed. + + - Terrain mesh performance increased. + + - Fixed mem leak in cube node. + + - Compiler errors in shaders won't corrupt the material renderer list anymore. + + - Quake3 shader files now have properly working texture matrices again. + + - FPS and Maya style cameras are now standard cameras with a special animator. + - ISceneNodeAnimator now inherits IEventReceiver + - New method ISceneNodeAnimator::isEventReceiverEnabled, returns false by default + - CCameraSceneNode::OnEvent passes events to animators with enabled event receivers + - ISceneNodeAnimatorCameraFPS and ISceneNodeAnimatorCameraMaya interfaces for changing camera settings at run-time. + + - Changed SExposedVideoData to use void* instead of s32. Fixed 64bit portability. + + - Added support for front face culling. + + - Fix for HLSL shaders in one file. + + - Billboard::setColor bug fix by rogerborg. + + - Scene node sorting uses squared distances now. + + - Enhanced API for hte math functions. Many of them will now return a reference to *this for chained method invocations. + + - prevent .x loader to load .xml files. + + - AntiAlias support for OSX device. + + - Period character handling bug fixed. + + - New filesystem methods for filename handling. + + - added getVideoModeList and getDesktopResolution support for OSX + + - Octree supports tangent meshes now. Some performance improvements for the generation. + + - Fix mouse pointer and fullscreen mode problems in OSX. + + - Make cube and sphere scene node a mesh scene node (for access to the cube/sphere mesh). + + - Support for normal maps in 3ds files. Mem leak fixed. Loading for files with keyframe data fixed. + + - BillboardTextSceneNode is now an IBillboardSceneNode and an ITextSceneNode. + + - Support for external windows under Linux. + + - .X loader bug fixes. + + - Better debug visualization for MeshSceneNodes. + + - Fixed bug in material serialization when using the NullDriver. + + - Fix for Win32 CursorControl::setVisible + + - Support for LWO files. + + - Support for Collada 1.4 files. + + - Better and faster terrain smoothing by Frosty Topaz. + + - Fixed a performance bug in ISceneNode constructor reported by izhbq412 + + - Win32 device now makes the cursor invisible immediately when setVisible(false) is called. + + - Command line tool for mesh conversion added. + + - Added volume light scene node + + - .obj files now won't duplicate vertices unnecessarily. This allows recalculation of smooth normals and other things, and is also faster when rendering. The loading is a little slower now. + They also support normal maps and texture clamping now. Group support added, can be ignored via scene manager attribute scene::OBJ_LOADER_IGNORE_GROUPS. + Normals will be calculated if the file doesn't provide them. + + - Better fix for hires timers on dual core machines by RogerBorg + + - added Initial Windows Mobile 6 Version. + - Windows Mobile 6 SDK + - Visual Studio 2005 + + - Added checks to avoid buffer overrun in b3d loader. Enabled normals calculation in all cases, previously it was not done for lightmapped meshes. + Fixed transparency support. Added mipmap creation flag support which might disable mipmap creation too often. Should be checked. + + - Burningvideo: MipMap Selection repaired + + - renamed private Driver function getTextureSizeFromImageSize to getTextureSizeFromSurfaceSize + + - Added collision manager speedup patch by RogerBorg. + + - D3D drivers now releases the IImage member from initialization, thus freeing lots of memory. The image is accessible via the driver anyway. + + - SDL device character handling enhanced. + + - MeshBuffers can now access the elements of the S3DVertex base class in all vertex types directly, instead of using the getVertices() pointer access. This simplifies simple mesh manipulations as it does not require a switch statement over all vertex types. + + - More OpenGL renderstate bugs fixed + + - GLSL changes for setting arrays. Also allow for only pixel or vertex shader to be set. + + - Bugfix for removeChild in AnimatedMeshSceneNode. + + - Some bugfixes for Joint handling and skinned meshes. Added getJointCount in IAnimatedMeshSceneNode and isStatic in ISkinnedMesh. + + - Added WAL image format support based on the original loader by Murphy McCauley, written for Irrlicht around version 0.7. + + - OpenGL RTTs now also support alpha values. + + - New method driver->getVendorInfo() to query information about the actual hardware driver. + + - Fixed somed CQuake3ShaderSceneNode problems. + + - Changed BurningsVideo internal Vertex Format. version changed to 0.39 + + - SceneManager: + Removed the seperate rendering states for quake3 Shader Scene Nodes. + Nodes are now solid or transparent. ( but still more states are needed ) + + - GUI: + + - Editbox didn't draw children + - Checking IsEnabled is now consistent across all GUI elements + - Move window to front bug fixed. + - Disabling the BMP loader now compiles without the built-in font + - Added setTextAlignment to IGUIComboBox + - Avoid dropping skin pointer which is in use. + - Better warning for fonts without regions (sometimes wrong file is loaded by the user). + - Fixed a bug in CGUISpriteBank which caused a crash when a non-looping animated sprite reached the end of its animation. + - Modal screens no longer flash invisible children when rejecting a focus change. + - Finally added StarSonata patch with table element and TabControl additions. Table is based on MultiColor listbox by Acki, and has loads of changes by CuteAlien. + +------------------------------------------- +Changes in version 1.4.2 (22.9.2008) + + - Unified the handling of zwrite enable with transparent materials on all hw accelerated drivers. This means that all transparent materials will now disable ZWrite, ignoring the material flag. + There is a scene manager attribute, though, which will revert this behavior to the usual SMaterial driven way. Simply call + SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true) and set the SMaterial flag as desired. + + - Some changes for texture matrices in q3 shaders. + + - Added BlindSide's irrAllocator patch for proper TextureMatrix release under Win32 with any CRT library. + + - Added VC9 project files. + + - Added getEmitter for particle system scene nodes. + + - Fixed rounding problem in getScreenCoordinatesFrom3DPosition + + - Fixed Software renderer color flicker, was a shift bug I believe. + + - irrMap fix to make root node always black, by rogerborg. + + - Possible core dump fixed in particle system node, by CuteAlien. + + - Mem leak fixed in b3d loader. + + - Avoid double rendering of child nodes of joints. + + - Support for d3d draw2dimage clipping by CuteAlien. + + - Fixed an animation transition bug, pointed out by wuallen. + + - Fixed the major problem with OpenGL drivers, that claim to be 2.x compatible, but don't offer NPOT support (well, they do, but only in sw rendering...). Now we check for the extension string only. + + - Fixed .obj loader bug which inserted vertices in wrong buffers. + + - Fixed minor mem leak in Linux device. + +------------------------------------------- +Changes in version 1.4.1 (04 Jun 2008) + + - MD3 meshes are movable again. + + - New JPG image writer version by Vitek. + + - Texture matrix fixes, all methods should now work as expected. + + - Some container methods now return the this pointer after member functions have been called on them, in order to allow call chains. + + - Some new methods for SColorf access, for uniform API of all colors. + + - bug fix for SMaterialLayer equality check. Did only check the TextureMatrix pointers, instead of the matrices. + + - New getMesh method for the SceneManager, which takes an IReadFile instead of a filename. + + - Support for flags _WIN32 and _WIN64 in addition to WIN32 and WIN64 added, this simplifies usage of Irrlicht headers under MSVC. + + - Fixed a crash in GUIMeshViewer + + - new string method findLastChar by Halifax + + - GUIEditBox got the 1 pixel shift after click fixed. + + - Some debug visualization has been fixed for skinned meshes + + - Undef PI symbol before declaring core::PI to avoid compilation problems + + - SAnimatedMesh now properly returns properties of Meshes[0] if those exist, such that it should be usable in place of an SMesh again. + + - Fixed 2d initialisation in opengl and d3d9 driver. This should fix problems with render states mixing up and distrubing, e.g. skin effects. + + - Avoid a crash when passing setSkin the current skin + + + - Fixed current frame calculation for non-looped animations. Bug reported by greenya. + + - Fixed bug in CBillboardSceneNode::setColor, reported by rogerborg + + - Fixed clipping of menu, toolbar and combo box GUI elements, reported by greenya + - setNotClipped now applies all the way up to the root of the GUI environment, rather than just to the next parent + + - Made new scene managers use the original manager's GUIEnvironment, reported by MasterGod + + - Fixed IGUICheckBox::setEnabled, reported by Dorth + + - Fixed the FollowSpline animator to avoid crashes when only one waypoint is given. + + - OpenGL VolumeShadow now uses glPolygonOffset to avoid zbuffer artifacts. + + - Fixed meshbuffer corruption in append methods. + + - Fixed mem leaks in irrArray. + + - Fixed minor bugs in ISceneNode and ISceneManager. + + - Fixed the MeshCache handling of GeometryCreator meshes. + + - Terrain LOD bugfix. + + - Some Collada 1.3 loader enhancements and bug fixes. + + - Fixed a bug in CGUISpriteBank which caused a crash when a non-looping animated sprite reached the end of its animation. + + - Enhanced the .obj loader with the patch from ryanclark. This allows for recalculation of smoothed normals of the mesh, also should decrease the tri count on some meshes. + + - Avoid the global Logger to be destroyed too early. + + - Function setbit was renamed to setbit_cond to avoid name clashes. + + - Fixed .x animations with multiple references to the same joint from different meshes. Fixed texture path problems. + + - Support for Milkshape 1.8 files, also with multiple weights per joint. + + - The config file now also supports _IRR_OSX_PLATFORM_ and _IRR_USE_OSX_DEVICE_. This allows to use the Linux device (X11 support) on OSX. + + - Avoid terrain scene node crash when heightmap cannot be loaded. + + - Speed improvements for WaterSceneNode. + + - FlyCircle animator now also works for upvectors (Direction parameter) which are not (0,1,0). Is also faster now, since most calculations are done on init. Thanks to Dorth for working on this. + + - The 3ds loader correctly creates a texture matrix when texture tiling properties are found in the file. + + - Fix for S3DVertex comparison operators. Used some wrong logic. + + - Bugfix getCurrentRenderTargetSize in D3D drivers. Due to signature differences a wrong virtual method was chosen. Thanks to Jiang for finding it. + +------------------------------------------- +Changes in version 1.4 (30 Nov 2007) + + - Major API change: All material properties which are available per texture layer (curently texture, texture matrix, texture filters, and texture wrap mode) are separated into a new struct SMaterialLayer. You can access them via the array TextureLayer[] in SMaterial. The texture matrix methods in SMaterial are still alive, and also textures can be accessed via methods in SMaterial now. But still, many places in user code need some update (usually changing material.Textures[i] to material.TextureLayer[i].Texture etc.) + + - Major API rewriting for proper const usage. Now, most getter methods are const and so are the larger parameters and return values. Moreover, many methods taking only unsigned numbers now use u32 instead of s32 in order to recognize this limitation from the method's signature. + + - the base class for nearly all Irrlicht classes has been renamed from IUnknown to IReferenceCounted + + - Fixed Skybox texture orientations. They are now displayed non-flipped. Existing skyboxes have to be changed, though: Exchange left and right texture. Textures from Terragen and other tools can be used directly, now. Quake maps will also need the right/left exchange. + + - Added ITexture::isRenderTarget() + + - Added STL mesh file format reader and writer. + + - Added IMeshManipulator::createMeshWelded which creates a copy of the mesh with similar vertices welded together. + + - Irrlicht now has its own file format for static meshes. It is based on xml and has the + extension .irrmesh. Irrlicht is able to write every IMesh to this file format, and of course to + read it back again. + + - Irrlicht is now able to write Meshes out into files. Use ISceneManager::createMeshWriter() + to obtain an interface with which you can write out meshes. Currently, an own .irrmesh + file format is supported as well as the COLLADA file format. + + - fixed the keyboard autorepeat difference betwenn Linux and Windows. Thanks to denton we now have only KeyPressed events on both systems in case of autorepeat. + + - Added several new particle emitters and affectors from IrrSpintz. Also some new getter and setter methods were added. + + - D3D transparent materials do not disable zbuffer writing automatically anymore. This has to be done by the user to keep those settings configurable. + + - OpenGL texture now also require a regenerateMipmapLevels() after unlocking. This is the same as for d3d devices now. + + - Point sprite support in the driver. Point sprites use just one 3d vertex and a size to create a textured billboard on the GPU. This can provide fast particle systems, especially in combination with shaders. The proper particle extension will follow later on as it needs some more refactoring. + + - OpenGL 2D drawing accuracy fix by tuXXX + + - Added OnResize and getCurrentRenderTargetSize to the software video drivers. + + - Added Spot light type for dynamic lights. Note that both position and direction for all dynamic lights are now determined by the LightSceneNode, the SLight attributes are only used for internal purposes. + API change! One can easily work around this change by setting the LightSceneNode's Position and Rotation instead of the SLight's. This change won't provoke a compile error, though, and can hence go unrecognized besides the visual problems. + The lights use a default direction (0,0,-1) which is rotated by the usual scene node transformations and can hence be modified by scene node animators. + A change in the Radius usage can lead to strange artifacts. Just increase the Radius in this case. further handling of Radius is to be discussed. + + - Added per pixel fog support for OpenGL. + + - Added driver support for user defined clip planes, based on mandrav's patch. + The OpenGL version is more picky about ModelView matrices, so it's best to set the projection plane at the time it is used. + + - .obj files now load relative indices correctly. Collada files load textures. + + - A new MeshBuffer implementation is publicly available. It supports a shared vertex list for all MeshBuffers, used for MS3D meshes. + + - MeshBuffers can recalculate their BoundingBoxes on their own now, no need for MeshManipulators. New append methods help to merge MeshBuffers. take care that the types match! + + - The new texture generation mode is working. With ETCF_NO_ALPHA_CHANNEL textures are generated without ALPHA bits reserved. + + - D3D9 hardware mipmap updates are re-enabled, problems should be reported. + + - In some cases fullscreeen modes under win32 should have a better frame rate now. + + - Fixed the hillplane mesh to work with non-quadratic dimensions as well. Changed the interface also, so use a u32 dimension to specify the tilecount now. + + - Hires timers are disabled on windows systems with more than one CPU, due to bugs + in the BIOS of many multi-core motherboards. To enable hires timers in your project, + use SetProcessAffinityMask to set to use only one CPU before creating the device. + + - OpenGL render targets now the same way up as the other drivers. If you have + written opengl shaders that use render targets then you'll need to change your + texture coordinates accordingly. + + - Fixed some OpenGL renderstate stuff. setBasicRenderstate returns with + active texture layer 0. The material renderer must return from OnUnset + with the same active texture layer. The alpha test is disabled and the + texture mode should be GL_MODULATE. + + - Fixed CSoftwareTexture2::getOriginalSize, reported by CaptainPants. Added a + new method CSoftwareTexture2::getMaxMipMapSize to return the size of the largest + mipmap, which is used by texelarea instead of getOriginalSize. + + - Changed parameter order of addArrowMesh and added default parameters such + that it's enough to set the color (or even just the name). + + - Fixed bugs in MY3D and OBJ loader. + + - Added IMeshCache::clearUnusedMeshes(). This allows the user to remove + meshes that are sitting in the mesh cache but aren't used by any scene nodes. + This is useful for example when changing levels. + + - Added IUnknown::getReferenceCount() + + - createDevice now reports errors if the driverType is unknown, previously it + created a window but populated it with a null driver without any warning. + + - Fixed a bug in CBillboardTextSceneNode::setText where the old text was not + cleared. + + - Changed irrArray::linear_search to use the == operator rather than < + This may be slower in some cases, but it no longer returns false positives + when searching arrays of classes that override the < operator but + !(x for relative positioning within their parents + + - getFileSystem added to the GUI environment + + - New IGUISpriteBank, used to hold 2d image data like fonts and GUI icons. + Icons provided by the built-in font are now accessed through the skin's sprite bank. + Users can override the icons by setting a different sprite bank and setting new sprites. + + - Skins are now serializable and are loaded/saved with the GUI. + + - IGUIStaticText getter/setter functions patch by rogerborg. + +- added 3d TextSceneNode2. to view a Text in real 3D Space + in fact it is a combination of Billboard & TextSceneNode + +- Burning Video (the second but only complete software renderer) + - New Compile Config BURNINGVIDEO_RENDERER_ULTRA_FAST + - New Compile Config BURNINGVIDEO_RENDERER_FAST + touching the 20fps border in the demo ( P4 mobile 2Ghz ). 15fps average. + ( Compile config Release Fast-FPU ) + + - VertexCache for Tansformed & Light Vertices + boost small drawPrimitive Calls ( 2DRectangle, Billboard ) and Real Index Triangles + + - Bilinear Dither + - clipping test ( compare instead of generic plane normal ) + - support for NOT using vertexcolor + #define SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + +- added vertex to color to billboard. + shade top & shade down. + to support some static lighting effect on billboards + +- Implemented line rendering for SoftwareDriver + +- XMLWriter fix for 32bit wchar_t (esp. for big endian) + +- updated to latest PNG library + +- implemented CImagerWriterJpeg::writeImage + +- The ISceneManager::addCameraSceneNodeFPS() has a new parameter named 'jumpSpeed' + and a Key Map Entry. + +- added param to IIImageWriteFile::writeImage + control Parameter for the backend ( e.g. jpeg compression level ) + +- addContextMenu: CGUIEnvironment::addContextMenu set the focus on the submenu. + +- Added IFileSystem::createMemoryReadFile for accessing memory like a file. + +- Added core::map class submitted by Nastase Catalin (Kat'Oun) + +- Fix vertex colors for .x and .ms3d, alpha bug in .obj + +- Fixed 16bit depth screens under Windows. + +- Implemented getMeshBuffer(SMaterial) for all AnimatedMeshes. + It was returning 0 for all implementations previously. User defined IMesh derivates + will also have to implement it now due to the removed empty implementation. + +- Added yield() method to IrrlichtDevice which allows to pause the Irrlicht process for + a very short time. This allows other processes to execute without a major + penalty for the Irrlicht application. + +- Added sleep() methd to IrrlichtDevice, for pausing the Irrlicht process for a longer + amount of time. + +- Auto-split mesh to 16bit buffers in 3ds loader + +- 8bit RGB332 image format support + +- isActive() under Linux now behaves like the Windows variant: True iff window has focus + +- Fixed(?) the glXGetProcAddress problems with different drivers + +- B3D changes by Luke: + Texture scaling bugfix, support for alpha blending, new option to normalise weights, + animation code optimization, fixed memory leak + +- ROUNDING_ERROR is now ROUNDING_ERROR_f32 or ROUNDING_ERROR_f64 + +- Material ZBuffer flag changed to a u32 value + Reason: change ( off or on ) to , off, lequal, equal + Necessary for multi-pass if previous stage has had transparency + +- DebugDataVisible is now an enum of flags + show normals is supported ( uses the new build in arrowmesh ) + +- New Function: GeometryCreator + addArrowMesh. build a closed cylinder and a cone + used to show normals as debug feature + +- New Function: + CMeshManipulator::transformMesh(scene::IMesh* mesh, const core::matrix4& m) const + transforms VertexPosition and VertexNormal + +- BUGFIX: CGUIButton notified Pressed when Mouse was clicked Inside ( correct ) + but also left up outside rectangle ( incorrect) + +- BUGFIX: Octree:getPolys(const scene::SViewFrustum& frustum, SIndexData* idxdata) + was recursive calling invisible children + +- CFileList: Changed FileListEntry sorting to + a) Directory comes first + b) sorting ignores case + so it feel's more like common browers + +- added a Texture transform to IVideoDriver::setTransform + +- quaternion::getmatrix + in fact the getmatrix version is returning the transposed. + i'm quite sure that this is the wrong implementation. + so this should be verified to remove the getmatrix_transposed version... + +- Quake3 Map Loader: + new loading method + - Bezier Patches with LOD more than 3 + - Multiple Meshes, stay compatible with the previous version + - Indexed Triangle List + - initial support for quake3 Shaders and Entities + - Shaders are parsed. When it's possible to resolve a 2 Texture Scheme it's taken + Shaders exist in namespace scene::quake3 + - The Example Quake3Map shows how to continue applying the Q3Shaders with SceneNodes + ( for example animmap converts to TextureAnimator.) + TODO: use the Irrlicht Variable Syntax to remove redundant code.. + +- added getVertexPitch() to IMeshBuffer interface + +- added generic isupper, isspace.. functions to coreutil.h to remove dependencies for ctype.h + ( future: it's possibly to use binary comparison test..) + removed 1000's include of string.h and moved one to irrstring.h + in preparing of complete removing the MSVC. + +- moved fast_atof.h to the public include + added strtol10 to remove dependencies for stdlib.h + anyway math.h is needed for powf + +- core::vector3d + added getInterpolated_quadratic. + vector3d getInterpolated_quadratic(const vector3d& v2, const vector3d& v3, const T d) const + // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d; + +- irrstring: added param start to findLast(T c, s32 start = -1 ) + reason: to continue searching reverse on a specific position + (parameter is checked against boundaries ) + +- added operation reciprocal_squareroot to irrmath. + core::reciprocal_squareroot = 1.f / sqrtf ( x ) + changed the core::vector3df normalize vector. + specialized templates are not allowed in irrlicht currently, so it's only for f32 for now. + a C function and a NVidia Version are in irrmath.h + +- add Primitives to CFPSCounter + and changed interpolation to 1500ms instead of 2000ms + and rounding to ceiling.. + +- added Interface setAmbientLight to ISceneManager + it was a Bug, because SceneManager always calls Driver therefore AmbientLight has to be set in SceneManager. + +- changed GUIFont & FontTool to support kerning ( on a global basis ) + very basic mode.. apply an offset for position + useful for example if you want to apply an outline stroke in your favorite + and therefore let the texture grow. + and to correct the border back on drawing, specify the parameter in IGUIFont. + this is quite useful if you want to use more artistic fonts. + default = 0 + better kerning would need a seperate coordinate set for each symbol. + +- changed MD2_FRAME_SHIFT to lower framerate + -> lower IPol + problems can occur if somebody uses hardcoded frame-numbers instead + of Animation name... + +- changed spelling "frustrum" to "frustum" + + -> changed also SViewFrustrum.h to SViewFrustum.h + +- changed Parameter AutomaticCulling from bool to enum E_CULLING_TYPE + to support more than two culling modes. + + added Frustum culling ( it's a copy & paste from the octree ) + added initial bounding sphere + used for culling point lights.. + +- Added getSystemMemory and getProcessorSpeedMHz for Windows and Linux to the OSOperator, submitted by Vitek. + +------------------------------------------- +Changes in version 1.2 (29 Nov 2006) + +- Added Solaris/Sparc port (basically some compiler define statements). Irrlicht and the examples should compile out-of-the-box on Suns with the usual Makefiles and gnumake. + +- Added texture matrix support for hardware accelerated drivers. This allows for efficient texture coord manipulations for complete meshes at once. + +- Multisampling with OpenGL under Linux added + +- Non-power-of-two textures are left unscaled if the driver supports such textures. + +- new draw2DImage method that speeds up drawing many quads from the same texture. Font drawing is improved by this under OpenGL. + +- TGA files are now always correctly flipped and loaded if compressed. All PNG color formats are now supported, including correct alpha handling. + +- 3ds mesh loader fix in texture loading, now loads some textures that were not loaded before, but might introduce problems with very recent files. OGRE mesh loader bugfixes and lightmap support. Several B3d mesh loader updates. Obj and mtl loader enhancements. + +- A new compile flag (IRR_OPENGL_USE_EXTPOINTER) allows Irrlicht to either use OpenGL extension function pointers or direct OpenGL calls. + +- OpenGL now uses frame buffer objects for render targets larger than the screen, supplied by Mandrav + +- Split ESNRP_LIGHT_AND_CAMERA passes into ESNRP_LIGHT and ESNRP_CAMERA to fix a problem with lights being rendered before cameras in OpenGL (thanks again to Vitek for finding this). ESNRP_LIGHT_AND_CAMERA is now deprecated. + +- Fixed many OpenGL render state problems which were related to wrong texture states. The textures are now enabled and disabled by the material renderers in OnSetMaterial. Also enabled the texture state cache which helps preventing texture changes just as the one for D3Dx. Thanks to hey_i_am_real for some good hints on where the problem was located. + +- Added compile flag _IRR_COMPILE_WITH_X11_ which is by default enabled. Disabling the flag removes all X11 dependencies from Irrlicht and allows for a headless Linux Irrlicht server - added by request :-) + +- Win32 OpenGL driver tries to use the requested bpp size. + +- Default texture format is now A8R8G8B8 if not explicitly specified. This fixes some color artifacts with lightmaps. Bugfix submitted by hey_i_am_real. + +- In OnPostRender all transformations were taken as relative and multiplied with the root transformation matrix every time due to a wrong check for the real root node. This shoudl increase render performance for scenes with lots of (invisible) nodes. + +- Added correct list copy constructor. + +- Color selection dialog added. + +- New GUI skin "Burning Skin". + it's a black & white skin. look elegant on true-color. + and looks ok on 1-Bit ( e.g. no vertex color in burnings video ) + +- GUIStatic text is correctly grayed out if disabled. + +- Added getHeight method for terrain node submitted by Spintz. It calculates the height from the base mesh instead of requiring ray casts and collision detection and is much faster. + +- New methods core::lerp to linearly interpolate two floats and SColor.getLuminance to calculate luminance of RGB color. + +- MAJOR API CHANGE: + Fixed matrix access methods mat(x,y). These were previously said to be (row,column) but actually were (column, row). This lead to some confusion and made their use quite tricky. Irrlicht code is updated for the new method, but applications will silently fail now (i.e. compile without errors, but not working as expected). + +- Update to zlib-1.2.3 + +- Fixed vertex alpha handling in DirectX drivers. + +- Image writers fixed and working (at least for little endian systems). + +- VSync under Linux fixed and correctly working. + +- New os::Byteswap::byteswap methods which can be used for byteswapping (endianess correction) in mesh loaders and image loaders. + +- New video driver feature to check for multitexture feature. + +- Direct3D drivers update the devicelost variable if reseeting failed with this return code. + +- VideoModeList under Linux is correctly filled now. No glX calls are made if GLX extension is not found - only software drivers are available then. RandR extension can be enabled with a new compile flag in IrrCompileConfig.h, either instead of XF86VidMode or in addition. + +- Big Endian support for MS3D loader. + +- Apfelbaum software renderer: basic mipmap support (per triangle), switch for using w-buffer instad z-buffer ( default on ) + +- Better FPU support: Changed various fpu-call's in whole project (main reason to use faster float to int conversion on x86. ( fistp )) + +- changed Visual Studio 7.1 vcproj project config "Release Fast FPU" to __fastcall in /QIfist + +- CGUIFont added True Alpha Font Support. (currently it's a little hack, but it'a good starting point. Fonts are back compatible. To use the new feature make first pixel half transparent in the font file.) + +- Scolor: replaced s16 color with u16 color, replaced s32 color with u32 color to get rid of unnecessary arithmetic shift + +- Colorconverter: X8R8G8B8toA1R5G5B5, set Alpha High, minor: A1R5G5B5toA8R8G8B8 changed if (a) to conditional set + +- CImage: added boxfilter (weigthed average), (generic, slow) + +- The scene manager now sets an ambient light color when calling ISceneManager::drawAll(). + You can influence this by calling ISceneManager::setAmbientLight(). That light color + is also stored when saving .irr files via ISceneManager::saveScene(). + +- Loaded COLLADA files which contained only one single mesh now behave like all the + other loaded meshes, and the #meshname workaround has been removed. + +- File lists are now sorted. + +- Dynamically checking the OpenGL version now instead of at compile time to call the supported methods of the executing machine, not that one of the compile host. This should fix the extension check and the automatic mipmap update. + +- Fixed vertex alpha handling of 2D images with OpenGL. + +- Default depth buffer under Windows now 24bit to avoid zbuffer fighting. + +- Fixed light count in OpenGL. + +- Particle emitters can now be enabled/disabled via a new method. + +- Sky dome is rotatable just like the sky box. + +- Rotation animator can be applied to several nodes now, before it only rotated the first one it was applied to. + +- Support for drawing other vertex primitive lists such as triangle strips. + +- Default specular color is white again, thus simply enabling shininess is enough to get speculars. + +- Some .x loader and animator improvements. Vertex color support. + +- isActive now also work under Linux. + +------------------------------------------- + +Changes in version 1.1 (06 Aug 2006) + +- New example to show some features of the .irr format + +- Added support for making screenshots in all video drivers and a general + possibility to save any IImage to several file formats. + Some image writers are not yet implemented. As a testcase screenshots + are now available in the demo by pressing F9. + This code was contributed by Travis Vitek. + +- Changed EAMTS_OCT to EAMT_OCT. + +- Improved .3ds and .obj file importers. + +- Added support for .b3d (Blitz Basic) submitted by Luke Hoschke and + .pak (Quake archive) files submitted by skreamz. + +- Added sky dome implementation contributed by Anders la Cour-Harbo (alc). + +- In addition to the Cube scene node (formerly test scene node) there is now also a sphere scene node available, + with an adjustable amount of polygons. Use ISceneManager::addSphereSceneNode to create it. + Thx to Alfaz93 for making available his code on which this node is based on. + Note that both nodes now use default material settings, e.g. lighting is enabled by default. + +- Fixed Linux keyhandling for many keys. + +- The aspect ratio has been inverted in the matrix, which means when setting a new aspect ratio + for cameras, set it to screen.width/screen.height now instead of screen.height/screen.width + as previously. + +- added support for reading/importing binary .x files. + +- .ms3d and .x normals are now correctly transformed in animations, bounding + boxes are slightly better transformed, but not yet correct. + +- Added possibility to load and save Irrlicht scenes to and from xml files via + ISceneManager::saveScene and ISceneManager::loadScene. Note that not all + scene nodes are supported yet, but most features should already work. + +- Bounding box of the Skybox corrected (set to null) + +- The SMaterial structure now supports 4 textures. (Currently ignored by the renderers and their materials.) + +- Test scene node renamed to CubeSceneNode. + +- Added scene node animator factories. This is the same as scene node + factories, but for scene node animators. + +- Added scene node factories. This is an interface making it possible to dynamicly + create scene nodes. To be able to add custom scene nodes to Irrlicht and + to make it possible for the scene manager to save and load those external scene nodes, simply + implement this interface and register it in you scene manager via ISceneManager:: + registerSceneNodeFactory + +- Introduced IMeshSceneNode interface with the possibility to set readonly materials to make + it possible to use the mesh materials directly instead of overriding them. In this way + it is possible to change the materials of a mesh causing all mesh scene nodes + referencing this mesh to change, too. + +- Added possibility to load OGRE .mesh files directly, thanks to Christian Stehno who contributed + a loader for this. + +- Merged with Irrlicht 1.0 for MacOS + +- Added a method getType() to ISceneNodeAnimator. + +- There is now a system to serialize and deserialize attributes of scene nodes. In this way + it should be quite simple to to expose the attributes of your scene node for scripting + languages, editors, debuggers or xml serialization purposes. + +- Irrlicht containers and strings now have allocators, making it possible to + use them across .dll boundaries. + +- Changed the name of scene nodes from wide character to to char* for speed and memory reasons. + +- Renamed IStringParameter class to IAttributes and enhanced it to be able to + serialize its content into and from xml. + +- Textures now have a method getName(). + +- Added the methods getTextureCount() and getTextureByIndex() to IVideoDriver. + +- Most classes now derive virtually from IUnknown. + +------------------------------------------- +Changes in version 1.0 (19 Apr 2006) + +- Irrlicht now will load d3d 9 dlls (like d3dx9_27.dll) manually if needed. If you compile irrlicht + with an SDK which needs one of these dlls, irrlicht will now also start up on a pc without + these Dlls installed. Note that now these dlls will also only be loaded if your application + uses shaders. If the dlls are missing, shader support will be disabled. + +- The Apfelbaum Software Software Renderer now works in 32 bit and is capable of rendering dynamic + lighting as well as doing alpha channel blending. + +- Added support for the Code::Blocks IDE (http://www.codeblocks.org) + +- It is now possible to draw temporarily to foreign windows, by specifying a window handle when + calling IVideoDriver::endScene(). Note: This does not work in fullscreen mode and is not + implemented for all devices (only for D3D8, D3D9, Software1 and Software2, and only for Windows). + In addition, you can also specify the source rectangle to present. + +- Picking is now more accurate and also works with view ports and better with orthogonal cameras. + +- Scene Nodes now have an additional flag, IsDebugObject. This denotes if a + scene node is a debug object. Debug objects have some special properties, + for example they can be easily excluded + from collision detection, picking or from serialization, etc. + +- Scene Nodes now have the possibility to return their type using + virtual ESCENE_NODE_TYPE getType(). + +- Improved support for orthogonal rendering: Skyboxes and billboards can be + used with orthogonal cameras now, too. + +- Fixed a bug in collision + +- Fixed some marshalling bugs in Irrlicht.NET + +- Some fixes to make gcc 4 happy. + +- Fixed a bug which caused the engine to crash when trying to use the + apfelbaum software rasterizer with linux + +- Several improvements to Irrlicht.NET, for example string output for vectors, viewfrustrum access + for cameras, drawing of bounding boxes, support for orthogonal cameras. + +- Updated DMF importer to support new DeleD functionalities, solid materials will now be + shown correctly again in Irrlicht. Thanks to Salvatore "Il Buzzo". + +- Added a method to change the return value of ICameraSceneNode::isOrthogonal + +- Improved md2 animation playback + +- Fixed the REFLECTION_2_LAYER materials. Now also works for OpenGL. Had to change the parameters + of this material (for all drivers), the reflection is now at texture 2 and the diffuse map at + texture 1. This was the other way round before. + +- Added examples for csharp, visualbasic, delphi.net and boo. + +- Several other small bug fixes. + +------------------------------------------------------------------------------------- +Changes in version 0.14.0 (30 November 2005) + +- Irrlicht now includes another video driver type. Together with D3D8, D3D9, OpenGL, the NULL + driver and the Software Renderer, an Irrlicht user now has the decision between 6 renderers: + The new included renderer is The Apfelbaum Software Renderer, an alternative software renderer + for Irrlicht. Basically it can be described as the Irrlicht Software renderer on steroids. + It rasterizes 3D geometry perfectly: It is able to perform correct 3d clipping, perspective + correct texture mapping, perspective correct color mapping, and renders sub pixel correct, + sub texel correct primitives. In addition, it does bilinear texel filtering and supports more + materials than the EDT_SOFTWARE driver. In short: It looks a lot like the already available hardware + accelerated drivers, but without hardware. :) This renderer has been written entirely by + Thomas Alten, thanks a lot for this huge contribution. + +- Irrlicht now supports anisotropic filtering. Use the SMaterial::AnisotropicFilter member or + EMF_ANISOTROPIC_FILTER flag to enable it. I implemented this for all 3 hardware accelerated + drivers: D3D8, D3D9 and OpenGL. + +- Irrlicht now supports the recently released new microsoft compiler. Irrlicht versions compiled + with older verions of this compiler can now also be used with the new one, which wasn't possible + previously because of a name mangeling issue. + +- All 2D drawing functions can now be used to draw into textures (render targets). This also + means for example that the whole GUI environment can be rendered into textures. + +- Irrlicht.NET now supports shaders. + +- Irrlicht now loads all textures in 32 bit mode by default. (Previously this + was 16bit). To change this behavior back again, use + device->getVideoDriver()->setTextureCreationFlag(ETCF_ALWAYS_16_BIT, true); + +- Irrlicht.NET now supports Particlesystems and Shaders. Thanks to a code + contribution by Delight. + +- Fixed a bug in the mipmap generation. Now mipmaps are not that blurry + anymore and the rendering quality has been improved a lot. + +- It is now possible to assign a userData int to callback functions of shaders. In this way it + it easily possible to use the same callback method for multiple materials and distinguish + between them during the call. + +- Directional lights are now supported in the OpenGL and D3D drivers. To switch on directional + lighting, set the light type to ELT_DIRECTIONAL in the SLight structure. + +- Fixed several bugs in the GLSL implementation. Thanks to Michael Zoech for + sending in his improvements. + +- For the windows version of Irrlicht, the engine now displays an icon in the + program window, if there is one available in the start path with the name "irr.ico". + +- It is now possible to use images with alpha channels on buttons. Use the new + IGUIButton::setUseAlphaChannel() method to enable this feature. + +- The scene manager has a new method getSceneNodeFromName() which finds a scene node by its name. + +- It is now also possible to attach scene nodes to joints/bones of sceletal animated .x files. + (Using IAnimatedMesh->getXJointNode() ). This was previously only possible with milkshape models. + +- Billboards now draw their bounding box when debugdata is set to visible for them. + +- Lights now draw their bounding box and radius when debugdata is set to visible for them. + +- Upgraded to irrXML 1.2. Thanks to some hints by Patrik Mller, irrXML, the XML parser used + by the Irrlicht Engine now has CDATA support and some other useful new features. + +- Support for VisualC++ (Express) 2005. Added a project file and a IrrlichtPropsVC2005.vsprops + file which sets the no deprecate define and adds needed libraries. + +- Fixed size of the bounding box of billboards. + +- Billboards are now also culled by default, increasing rendering speed a bit. + +- Fixed a bug which caused the .ms3d loader to crash when loading .ms3d files + without materials. Thanks to sdi2000 for posting this. + +- Fixed a bug causing the possibility to crash when destructing the scene + graph or a scene node with children. + +- Fixed some bugs which caused invalid RTT operations, when for example the + render target texture was smaller than the screen. + +- Fixed a heavy bug in Irrlicht.NET causing lots of memory leaks when drawing text. + +- Fixed a bug in the attachement of scene nodes to animated X files. + +- Fixed a bug in the .NET Vector3D addition operator. + +- Updated to Salvatore Russo's DMF loader version 1.3. Notes by him: + This version just adds some new functionalities. First of all Alpha Blended Textures are now + supported by DeleD as well as loader. Because of some trouble with Irrlicht 0.12.0 TGA loading, + TGA textures are always flipped so I've added a parameter so that you can choose to + flip or not all TGA textures coords, this way: + SceneManager->getParameters()->setParameter(scene::DMF_FLIP_ALPHA_TEXTURES, true); + you can also set material transparent reference value by setting: + SceneManager->getParameters()->setParameter(scene::DMF_ALPHA_CHANNEL_REF, 0.01); + you can use every value beetween 0 and 1, but to respect DeleD rapresentation + 0.01 is OK, just a note, if you set 0, it's just like you set 0.5, this means + that each pixel found corresponding to a position in alpha map that has a value<127 + won't be drawn. + +- Fixed a small bug in the line breaking algorithm. + +- Fixed a bug which caused the engine to display strange artifact pixels when drawing 2D images + like text in screens which odd resolutions. + +- Slightly changed the interface of createDevice and createDeviceEx(): the version parameter + now is a char* instead of wchar_t*. Also, IrrlichtDevice::getVersion() now returns char* + instead of wchar_t*. + +- Fixed some parts in the source to make Irrlicht compile in Linux 64. + +- Renamed the EDT_DIRECTX8, EDT_DIRECTX9, _IRR_COMPILE_WITH_DIRECTX_8_ and + _IRR_COMPILE_WITH_DIRECTX_8_ enumeration literals to EDT_DIRECT3D8, EDT_DIRECT3D9, + _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_. You might need to + update your code and compilation settings with these new names. + +- Added the remaining '..' directory in the linux version of the file list + +- Updated to a faster version of the TerrainSceneNode by Spintz. Much thanks again! + +- Fixed a bug causing billboards to be displayed upside down. + +- The D3D drivers now won't crash anymore when they get feeded with nullpointers as shader constants. + +- Irrlicht now identifies the Linux platform it runs on and returns a more detailed string + when calling getOperationSystemVersion(). + +- Fixed some bugs in several collision test methods thanks to Spintz. + +- Updated font tool + +- Made the list::iterator constructor which took a sklistnode as parameter private, + to make Irrlicht compatible with the Errlicht interface. + +------------------------------------------------------------------------------------- +Changes in version 0.12.0 (24 August 2005) + +- It is now possible to have multiple scene managers. Use ISceneManager::createNewSceneManager() + to create a new one. This can be used to easily draw and/or store two independent scenes at + the same time. + +- Irrlicht now supports GLSL, the OpenGL Shading Language, which means Irrlicht now + supports 14 shading modes/languages: ARB Vertex Programs, ARB Pixel Programs, HLSL, + GLSL 100, GLSL 110VS1.1, VS2.0, VS3.0, PS1.1, PS1.2, PS1.3, PS1.4, PS2.0, PS3.0. + Lots of thanks go to William Finlayson for implementing this and making available his code + to be used in Irrlicht. + +- Added support for pixel shader 3.0 and vertex shader 3.0. + +- Irrlicht now supports detail maps, use EMT_DETAIL_MAP for this. The new terrain scene node + tutorial shows how to use detail maps. + +- Again some changes have been made in Irrlicht.NET. For example it is now a little bit more memory + friendly, I removed several bugs and made the terrain scene node, realtime shadows and key codes + available. + In addition, I extended the .net example application a lot, just try it out. + +- I've worked around a heavy bug in the microsoft compiler which caused lots of bugs in Irrlicht.NET. + They are all fixed now. See http://support.microsoft.com/default.aspx?kbid=823071 for details. + +- The timer of the engine has been enhanced a lot, which maybe needs a little change in your + project if you are upgrading from an older version of Irrlicht. It is now possible + to set the speed of the timer, a new time value, and to start and stop it. Also, all + calls to getTime() will now return the same value within the same drawing frame. + The timer will only advance when ITimer::tick() is called. IrrlichtDevice::run() will + call this method automaticly, but if you aren't using this method, and you are wondering + why your scene is not animating anymore, just call Device->getTimer()->tick() before + drawing your scene. If you need the system time, not the new virtual time, + use ITimer::getRealTime(). + +- The material EMT_TRANSPARENT_ALPHA_CHANNEL now is using a configurable alpha ref value. + The default value is 127, which means people who are using this material for drawing + things like grass, trees etc will get nice results automaticly when changing to 0.12.0. + To change to a different alpha ref value, just change SMaterial::MaterialTypeParam value. + See EMT_TRANSPARENT_ALPHA_CHANNEL for details. + Also, this fixes two bugs: + - A bug causing the D3D versions not looking like the OpenGL version. + - A second bug which caused the texture to look like disappearing when looking at from far away. + +- Upgraded to a new dmf loader version by Salvatore Russo which is able to use a texture path + and material directories. Set DMF_USE_MATERIALS_DIRS and DMF_TEXTURE_PATH using the + ISceneManager::getParameters() method. + +- It is now possible to set a separate scale for the second texture coordinate set in the + terrain scene node when calling ITerrainSceneNode::scaleTexture(). This is useful when using + detail maps on the terrain. + +- Added a new material flag named EMF_NORMALIZE_NORMALS. You can enable this if you need + to scale a dynamic lighted model. Usually, its normals will get scaled too then and it + will get darker. If you enable the EMF_NORMALIZE_NORMALS flag, the normals will be + normalized again. + +- When loading Milkshape .ms3d files, Irrlicht also loads materials and tries to apply the textures. + Thanks to atomice for this patch. + +- The ISceneManager::addCameraSceneNodeFPS() has a new parameter named 'noVerticalMovement' with which + it is possible to disable vertical movement of the FPS camera and make the camera behave just like + in most ego shooters today. + +- Made Irrlicht 64 bit compatible, removing some 32 bit only constructs. However, I wasn't able to + test it out extensively. If you are compiling Irrlicht for a 64 bit windows environment and get + a linker problem, try playerdark's solution: + "The linker settings are so that no machine is specified in the drop down field, instead, + the command line option /MACHINE:x86 is set manually which interferes with the 64 bit linker + of course. Removing that from the 64 bit version (and replacing it with the drop down selection + in the 32 bit version for that matter) fixed the linker problem." + +- There is now a IrrlichtDevice::postEventFromUser() method available, to make it possible to + post key or mouse input events to the engine if you are using an own input library for + example for doing joystick input. + +- The GUI Environment now has an own basic RTTI system, and all IGUIElement derived classes + have a method named getType(). This is needed for the .NET wrapper but will be used + later for serializing and deserializing. + If you wrote your own GUIElements, you need to set the type for your element as first parameter + in the constructor of IGUIElement. For own (=unknown) elements, simply use EGUIET_ELEMENT. + +- Thanks to William Finlayson, Irrlicht now also supports RTT (render to texture) when + rendering using OpenGL. + +- Thanks to William Finlayson, the EMT_REFLECTION_2_LAYER is now implemented in the + OpenGL version of Irrlicht, too. + +- There is now a mesh cache interface available. With this, is is possible to get access to + all loaded meshes, and to remove them to free memory. You can get access to the cache + using ISceneManager::getMeshCache(). Please note that the addMesh() method of ISceneManager + now is now longer available, you can find it now in the IMeshCache interface. + +- The VideoDriver now has a method for clearing the zbuffer at any time: IVideoDriver::clearZBuffer(). + With this, it is for example easily possible to overlay two scenes. + +- Fixed a bug which caused Irrlicht to crash when loading grayscale jpeg files. + +- Somebody sent me an .x file (tank_human1_crashes_irrlicht.zip) which caused Irrlicht to crash. + It seems I've lost that mail, but maybe you are reading this: It's fixed now. :) + +- Fixed a bug which caused the diffuse maps of lightmaps to disappear under certain circumstances + in OpenGL. + +- Its now possible to make IGUIStaticText draw its background. + +- Removed the first two default parameters from + IGPUProgrammingServices::addShaderMaterialFromFiles() to prevent SWIG + to create non compilable wrapper code. + +- Fixed a small bug which caused the terrain scene node to be culled incorrectly. + +- Changed the names the driver return (now "OpenGL 1.5", "Direct3D 9.0" and "Direct3D 8.1") + +- Added a new macro _IRR_DEBUG_BREAK_IF which is now used instead of the _asm int 3 break points in + debug mode. + +- Fixed a bug were the software renderer didn't clip 2d rectangles. This effect was visible for + example when using list boxes, selecting an entry at the end an scrolling up so that it wasn't + visible anymore. + +- There is now a new gui event available (named EGET_COMBO_BOX_CHANGED) which will be + sent when the selected item in a combo box has been changed. Finally. + +- Fixed a Problem which caused an empty window to be created when a rendering device + could not be initialized under special circumstances. Thanks to Sascha Plumhoff for + the bug report. + +- Fixed a bug with the FileList in Linux, reported by DrAnonymous and fixed by William Finlayson. + +- Fixed some bad documentation bugs. + +- The XWindow handle is now exposed too, via IVideoDriver::getExposedVideoData(). + +------------------------------------------------------------------------------------- +Changes in version 0.11.0 (08 July 2005) + +- Antialiasing is now supported by Irrlicht in the D3D8 and D3D9 renderer. To switch + it on, use createDeviceEx() and set SIrrlichtCreationParameters::AntiAlias to true. + +- Irrlicht.NET can now run inside a pre created Windows.Form window. + +- I'm no longer providing a Visual Studio 7.0 project/solution file for the Irrlicht + Engine sourcecode, only 7.1 and 6.0 are supported. If you are using Visual Studio 7.0, + just open the .dsp file for Visual Studio 6.0, it will be converted automaticly. + +- Irrlicht.NET includes now all basic GUI Elements and can capture GUI events. There are + still some features missing, but it is already enough to do simple things like showing + message boxes, displaying images, getting input strings, etc. + +- Improved the .NET documentation a bit. + +- There is a full implemented ISceneCollisionManager now available in Irrlicht.NET. + +- The Linux OpenGL renderer now supports mip mapping. + +- It is now possible to compile Irrlicht as shared lib in Linux. To do this, go into the source + folder and run 'make sharedlib'. This should create a libIrrlicht.so.0.11.0 file in + lib/Linux. To install it in /usr/local/lib, you can run 'make install'. + +- The drawing of the GUI system has been refactored and a lot of redundant code has + been removed. + +- The new method IVideoDriver::draw2DRectangle() is able to draw rectangles not only + filled with a single color, but with a gradient from four colors. This is implemented + in all drivers except the Software driver which still uses one color for this method. + +- It is now possible to customize the GUI system's skin a lot more: Simply implement your + own IGUISkin interface and implement the draw..() methods. + +- There are now two build-in skins available: Windows Classic and Windows Metallic. The + default skin is now Windows Metallic, if you want to change back to the old skin, use the + following code: + gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC); + environment->setSkin(newskin); + newskin->drop(); + +- Added improved keyboard input handling for the Linux version of Irrlicht, thanks to + Fabien Coutant for the fix. + +- Fixed a bug in the Linux OpenGLDriver which caused to load a wrong OpenGL extension + and made multitexturing look quite strange. Thanks to hybrid for spotting out that + bug. + +- COLLADA file loading now works the same like the loading of other meshes: Just + call ISceneManager::getMesh("yourfile") and display it using for example + ISceneManager::addAnimatedMesh(yourLoadedMesh); + To make it possible to create instances from meshes, lights and cameras in COLLADA + files again as in irrlicht 0.10, just enable the collada instance creating mode: + SceneManager->getParameters()->setParameter(COLLADA_CREATE_SCENE_INSTANCES, true); + +- Added lots of useful methods to the IStringParameters class. It is now possible to + set not only strings but also boolean, integer and float values as parameters. +- Fixed a bug with the TRANSPARENT_ALPHA_CHANNEL materials in all renderers to make them + work more as expected: They didn't write to the zbuffer. If you are using this + material and you don't want the new setting, just set the ZWriteEnable flag in the + SMaterial structure of your transparent material to false. Thanks to Fabien to + point this out. + +- There are now some new defines making it possible to use system installed libs instead of + the ones which come with Irrlicht: _IRR_USE_NON_SYSTEM_JPEG_LIB_, + _IRR_USE_NON_SYSTEM_LIB_PNG_ and _IRR_USE_NON_SYSTEM_ZLIB_, which are defined by default + in the file IrrCompileConfig.h + +- Renamed ISceneManager::getStringParameters() to ISceneManager::getParameters() +- Changed the define _IRR_D3D_SHADER_DEBUGGING to _IRR_D3D_NO_SHADER_DEBUGGING to be + able to make it defined by default and to let it be included in the doxygen documentation. + +- The SceneManager now does not do any culling tests for cameras, lights and skyboxes. + +- Added a transformBoxEx() method to matrix4 which transforms a bounding box more accurate. + +- Small edit box copy & paste bug fixed thanks to Fish HF + +- Fixed a bug which caused the engine to read windows messages when embedded in + a custom win32 control when called IrrlichtDevice::setResizeAble(). Thanks for + Duncan Mac Leod to find that bug. + +- Fixed a bug in the HLSL renderer which caused Irrlicht to crash, if no vertex shader + was specified. Thanks to mightypanda for reporting this. + +- Fixed a bug in the normal map generation thanks to jox. Parallax mapping and + normalmapping now even look a lot better because of this. ;) + +- Updated to irrXML 1.1: + - The XML parser is now also able to parse embedded text correctly when it is shorter than + 2 characters. + - The XML parser now treats whitespace quite smart and doesn't report it when it is + obviously used for formatting the xml file. (Text won't be reported when it only contains + whitespace and is shorter than 3 characters) + - The XML parser won't crash anymore when the xml file is malformed and an attribute has + an opening but no closing attribute. + - Removed a documentation which claimed that the xml parser doesn't work as the xml standard + when replacing special characters, which wasn't true. + +------------------------------------------------------------------------------------- +Changes in version 0.10.0 (26 May 2005) + +- The engine is now able to use parallax mapping. It's implemented for D3D9, D3D8 and OpenGL. + The perPixelLighing tutorial shows how to use it. Thanks go to Terry Welsh who wrote + the 'Parallax Mapping with Offset Limiting'-paper on which the Irrlicht implementation + is based and who allowed me to use his texture for use in the example. + +- Added render to texture support. Currently, only the D3D9, D3D8 and the software renderer + are able to use this feature. There is a new example, showing how to render scenes into + a texture. + +- Irrlicht now can load .png textures. There is also a new compile configuration + define to exclude the png loading option: _IRR_COMPILE_WITH_LIBPNG_. Thanks to + rt who originally wrote the png loader and who allowed me to use and modify his code + and place it under the Irrlicht Engine license. + +- Added support for COLLADA files. COLLADA is an open Digital Asset Exchange Schema for the + interactive 3D industry. There are exporters and importers for this format available + for most of the big 3d packages at http://collada.org. Irrlicht can import COLLADA files + by using the ISceneManager::getMesh() method. As COLLADA need not contain only one single mesh + but multiple meshes and a whole scene setup with lights, cameras and mesh instances, + this loader sets up a scene as described by the COLLADA file instead of loading + and returning one mesh. The returned mesh is just a dummy object. However, if the + COLLADA file does not include any tags, only meshes will be loaded by the + engine and no scene nodes should be created. Meshes included in + the scene will be added into the scene manager with the following naming scheme: + path/to/file/file.dea#meshname. The loading of such meshes is logged. + Currently, this loader is able to create meshes (made of only polygons), lights, + and cameras. Materials and animations are currently not supported but this will + change with future releases. + +- Added Delgine DeleD .dmf mesh loading support. I simply added Salvatore Russo's .dmf loader to + Irrlicht, and changed some parts of it. Thanks to Salvatore for his work and for allowing + me to use his code in Irrlicht and put it under Irrlicht's license. + +- Specular highlights are now finally usable the engine. To activate, simply set the shininess + of a scene node to a value other than 0: sceneNode->getMaterial(0).Shininess = 20.0f; + You can also change the color of the highlights using + sceneNode->getMaterial(0).SpecularColor.set(255,255,255,255);. The specular color of the + dynamic lights will influence the highlight color, too, but they are set to a useful + value by default when creating the light. This feature is currently only available in + the D3D drivers. + +- Added a new material type: EMT_TRANSPARENT_ALPHA_CHANNEL_REF. This draws a pixel of the + material only when the alpha channel has a value greater than 128. It is ideal for drawing + for example leafes of plants and does not use alpha blending, so it is a lot faster than + EMT_TRANSPARENT_ALPHA_CHANNEL. + +- There is now a createDeviceEx() method with which it is possible to create an Irrlicht Engine + device into an already existing window. This currently only works in Windows. + This method will be extended in the future with other options. + +- Irrlicht.NET has been extended with ports of the SceneNodeAnimators, TriangleSelectors + the FileSystem and Font drawing. Also the documentation of it has been improved a lot. + +- There are two new tutorials/examples available. One demonstrates how to use render to texture + feature, the other one shows how to run Irrlicht inside a precreated Win32 window/widget. + This means there are now 17 examples available in the SDK. + +- The software renderer now renders 3d geometry transparent when its material is + somewhat transparent. + +- The XML Parser has been enhanced. Several small bugs have been fixed and there are some + new features: The parser can now read ASCII, UTF-8, UTF-16 and UTF-32 (both little and + big endian) files, and return the parsed string data in one selectable format from the + same list. In addition, it is now completely independent from Irrlicht. If you wish to + use the parser without the engine, take a look at the newly created project at + http://irrxml.sourceforge.net. + +- Upgraded to DirectX Exporter Mod 1.3.1 + +- Upgraded dev-cpp project file to Dev-C++ 4.9.9.2. Removed dependency to zlib and + jpeglib for devcpp, the necessary .c files are now simply included in the project. + +- Renamed the VisualStudio and DevCpp sub directories in the SDK to Win32-gcc, + Win32-VisualStudio. + +- Fixed a bug in irrXML causing it to replace xml characters wrongly sometimes. + +- The C++ decorations at createDevice() have been added again, because lots of people + started to mix the gcc and the microsoft .DLL and got confused why the thing crashed + at random positions. + +- Moved heapsink and heapsort into the core namespace. + +- Updated to My3D version 3.15 + +- Fixed the wrongly drawn alpha channel material in OpenGL driver and a problem with the + VertexAlpha material in the same driver. + +- Implemented multipass rendering in the OCTTree scene node now too. This means that octtrees can + now contain transparent materials as well. + +- Improved string comparison speed, especially when comparing with pointer to char or w_char, + no more temporary strings are being constructed now. In addition, there are some new + string comparison methods in this class. + +- Added string::replace() method. + +- Added string::trim() method. + +- Addes string::erase() method. + +- Fixed a bug in array which caused data corruption if an element which already inside the + the array was pushed_back. Thanks to vox for reporting this and to provide a solutin + +- Added ISceneManager::addMesh() method. + +- Added IMeshManipulator::recalculateNormals(IMeshBuffer*) method. + +- The file array.h has been renamed to irrArray.h + +- Due to a bug, Irrlicht 0.9 didn't cull the scene nodes anymore which resulted in a huge + performance loss. This is fixed now. + +- After lots releases ignoring the 'make the fps camera smoother request', it is now + finally integrated. + +- Removed audiere dependency and the mp3 file, reeducing SDK download size. + +- A bug was fixed causing the binding of the wrong fragment program sometimes in OpenGL. + +- Lots of internal filenames have been renamed. All CVideo* files have been renamed to + fit the other name conventions, CD3D9Driver.h into CD3D9Driver.h for example. + +- The IMaterialRenderer interface now has the new method getRenderCapability() which + returns if the material is able to be rendererd with all settings on current hardware. + +- Added IMeshManipulator::setVertexColors(); + +- Added float color reading support in the 3DS loader. + +- video::EVDF_BILINEAR_FILER renamed to EVDF_BILINEAR_FILTER + +- core::equals function added. + +- fixed a small bug in fast_atof thanks to jox + +- Added a method ICamera::isOrthogonal() which is being used by + ISceneCollisionManager::getRayFromScreenCoordinates(), thanks to a bug report and fix by + jox in this thread: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=6243 + +- Added some fixes to the GUI environment to make the parent and child pointers be more + consistent as suggested by jox in this thread: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=6220 + +- Fixed a bug which caused the ambient light not to be reset after a window resize in D3D8 and 9. + Thanks to jox for this bug report and fix. + +- vector3df equals method added. + +- added SColorf::getInterpolated() method + +- Moved ITextSceneNode interface to include folder. + +- Fixed a small bug in the My3DLoader which failed sometimes finding the right textures. + +- Fixed bounding box problem with meshes without joints in .X file loader, thanks to + jox. (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=6669) + +- Fixed IFileSystem::getWorkingDirectory in Linux version. + (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=6678) + +------------------------------------------------------------------------------------- +Changes in version 0.9 (28 Mar 2005) + +- There is now a 100% working terrain renderer available. The old buggy and unfinished terrain + scene node has been replaced by a new TerrainSceneNode which is based on Spintz's + GeoMipMapSceneNode and Soconnes terrain renderer. Lots of thanks for their work on + this and that they allowed it to be modified and integrated into Irrlicht. + +- It is now possible for a scene node to draw itself in multiple passes. This means it can + register itself for multiple render passes (E_SCENE_NODE_RENDER_PASS) and during rendering + it can query the current render pass using ISceneManager::getSceneNodeRenderPass(). With + this, SceneNodes can contain solid and transparent materials at the same time and will be + rendered in the correct order from now on. + The IAnimatedMeshSceneNode and the IMeshSceneNode implement this feature, so it is now + possible to create for example cars with transparent windows without the need of a separate + scene node. Because of this change, all render time enumeration values have been renamed. + +- Irrlicht is now able to load OCT files directly. OCT files + can be created with Paul Nette's Radiosity Processor from http://www.fluidstudios.com + or exported from Blender with Murphy McCauley's exporter. This exporter can be found + in the directory \exporters\OCTTools of the Irrlicht SDK or from his homepage + http://www.constantthought.com/project/OCTTools. A lot of thanks go to Murphy McCauley + for this work on this and his permission to include his OCTTools into Irrlicht. + +- Irrlicht is now able to load Cartography shop 4 (.csm) files directly. A lot of + thanks go to Saurav Mohapatra for this work on this and his permission to adapt and + include his IrrCSM library into Irrlicht. If you are using .csm files, please note that + you'll have to set the path of the textures before loading meshes. You can do this using + SceneManager->getStringParameters()->setParameter(scene::CSM_TEXTURE_PATH, + "path/to/your/textures");. The original loader can be obtained from + http://www.geocities.com/standard_template/index.html + +- Irrlicht is now able to load Pulsar LMTools (.lmts) files directly because it now + integrates a modified version of Jonas Petersen's lmts loader in version 1.5 (from + http://development.mindfloaters.de/). Lots of thanks go to him for creating this + loader and giving his permission to add it to Irrlicht. If you are using this loader, + please note that you can set the path of the textures before loading .lmts files. + You can do this using SceneManager->getStringParameters()->setParameter( + scene::LMTS_TEXTURE_PATH, "path/to/your/textures"); + +- Irrlicht is now able to load my3D files directly. The My3DTools 3.12 loader by + Zhuck Dimitry was (a bit modified and) integrated into the engine. Lots of thanks + go to him for his work and for giving his permission to do that. Newer versions + of this loader can be found at http://my3dproject.nm.ru. The exporters for this + file format have also been added into the \exporters directory of the SDK. + +- To be able to replace built-in meshloaders with newer external versions without the + need of recompiling the engine, now mesh loaders which are added to the engine using + ISceneManager::addExternalMeshLoader() are prefered over built-in mesh loaders. + Thanks to for his suggestion of this. + +- D3D8 and D3D9 support for dev-cpp has been improved. If you are using Dev-Cpp and + a DirectX-Devpack for recompiling the engine, just add + -DIRR_COMPILE_WITH_DX9_DEV_PACK to your compiler + settings and something like -ld3dx9 -ld3dx8 to the linker settings and + press 'compile'. + +- The SceneManager now contains an interface for storing and exchanging parameters. + ISceneManager::getStringParameters() returns IStringParameters, which can be used for + example by extensions like external mesh loaders to set and read independent parameters. + This is also currently used by the newly built in CMS, LMTS and MY3D loader: It is possible to + set a value 'CSM_TexturePath', 'LMTS_TexturePath' or 'MY3D_TexturePath' to let them know + the path of the textures. + +- IAnimatedMeshSceneNode now has two new methods for being able to have more influcence + on the animation playback: It is now possible to set the playback mode to looped or + non looped with IAnimatedMeshSceneNode::setLoopMode() and it is possible to set + a callback interface which will be called when animation playback has finished + using IAnimatedMeshSceneNode::setAnimationEndCallback(). Thanks to Electron for his + suggestion for this addition. + +- The software renderer has a new triangle renderer specialized on disabled zread and write. + This means that skyboxes are now rendered in the correct order when using the software + renderer. + +- Multitexturing and other extensions in Linux are now turned on by default. There is a new + #define in the file IrrCompileConfig.h for disabling this again: LINUX_OPENGL_USE_EXTENSIONS + +- There is now a EET_USER_EVENT user event type for making it possible to send custom + events through the system. + +- The setTarget()-method of the FPSCameraSceneNode now is finally correctly implemented. + +- Changing parents of scene nodes is now much safer. The parent member of a scene node now is + set to 0 in all cases and should never point to invalid data when rearranging the scene node + tree. In addition, there is now a getParent() method in the ISceneNode class. + +- Debug breakpoints using "_asm int 3" are now only being used when in debug mode and + using Micosoft's compiler. Now more exotic compilers like BorlandC++ will like + Irrlicht better because of this. + +- Updated zlib version to 1.2.2 + +- An implementation of 3D triangle clipping in the software renderer has been started. It + is not 100% ready, but it is a beginning. This means now for version 0.9, that there are + not that much artifact triangles drawn anymore. But this means also that drawing is + a lot faster and that triangles clipped at the border of the screen will disappear + too fast. If anyone wants to finish the drawClippedIndexedTriangleListT() method + in the CSoftwareDriver class, he is welcome :) + +- There is a new parameter in the IVideoDriver::createImageFromData() which causes the + image to be able to own foreign memory. + +- A renderstate setting has been fixed which caused to disable mip maps on wrong geometry + when there was other geometry which had no mip maps. At least this bug doesn't appear + on my hardware any more, I hope this means the problem it is now fixed. + +- A bug in the D3D version of the stencil shadows has been fixed thanks to Murphy. Sometimes + you could see a small shadow similar to the the real shadow in the scene. This should now + be fixed. + +- Irrlicht can now draw non filled concyclic reqular 2d polyons like triangles, tetragons, + pentagons, hexagons, heptagons, octagons, enneagons, decagons, hendecagons, dodecagon and + triskaidecagons. And circles. Yes, I was a little bit bored. Christian Lins made a + suggestion to add 2D circle drawing support to Irrlicht, and I did this, but also added + support for drawing these figures using the same method. Check out + IVideoDriver::draw2DPolygon(). + +- Removed a memory leak when creating hlsl pixel shaders. + +- I've made varoius updates to the documentation and moved to doxygen 1.4 + +- Fixed a bug in the xml reader which caused it to crash when reading empty xml files. + +- Removed the buggy bsp tree scene node from the engine. + +- Tweaked some settings with some GUI elements. + +- ISceneNode::getAbsolutePosition now should be way faster. + +- Applied a fix by William Finlayson to the opengl stencil shadow drawing code which + fixes several bugs. + +- There is now a min_ and max_ template function available in the core namespace. + +- Added some bugfixes to MayaCameraSceneNode by jox. An even more improved version can + be found at http://development.mindfloaters.de/Downloads.12.0.html. + +- core::array now has a push_front method. + +- core::array now has an insert method. (Thanks to jox) + +- IrrlichtDevice now has a getEventReceiver() method. + +- Fixed a mouse wheel - mouse coordinates bug thanks to a bug report and fix by jox. + +- Changed the first parameter in IGUIContextMenu::addItem(wchar_t* text, ...) to const. + Thanks to jox.. again. :) + +- Fixed ignore path bug in zip file reader thanks to Pr3t3nd3r. It is now possible + to use zip files with the complete path to the files from the archive. + +- Fixed matrix4::rotateVect method after a suggestion by several users. (I think Electron, + Pr3t3nd3r, Jox) Thanks all :) + +- Fixed a bug in CGUIEditbox that enables you to write more characters than the max set + limit, thanks to Rush for the bug report and fix. + +- Added getAngleTrig() method to vector2d as suggested by Pr3t3nd3r, thanks! + +- After a suggestion by schick, plane3d now stores the normal vector first, and then + the distance to the origin. + +- A bug was fixed which caused 2D elements to be drawn with a second texture set in OpenGL + mode when 3D geometry with >1 textures has been rendered before. This effect has often + been reported as darkened 2D gui in the forum. + +- A bug in IrrCompileConfig prevented users to be able to recompile irrlicht with D3D9 + with gcc. This is now fixed, thanks to Jedive. + +- The project setup for Dev-C++ is now nicer. Added lots of folders and cleaned up the + whole setup a little bit with this. + +- Fixed a small bug in CGUIScrollbar reported by Klaus Niederkrueger. + +- The Checkbox rect is now clipped correctly, thanks to jox for that bug report. + +- The debug names of all scene nodes and GUI elements are now set correctly. + +- Applied a patch making it possible to compile Irrlicht without OpenGL in Linux. + +- core::rect::clipAgainst was fixed thanks to a bug report and correction by Jox. + +------------------------------------------------------------------------------------- +Changes in version 0.8 (19 Feb 2005) + +- Irrlicht now supports HLSL. This is possible using the new + IGPUProgrammingServices::addHighLevelShaderMaterial() methods. Also, methods for setting high + level shader constants have been added. + +- Irrlicht.NET now supports events and cursor control. This means now you can read mouse + and keyboard input from .NET projects like C# and VB.net too. + +- There are three new built in materials for doing normal/bump mapping available: + EMT_NORMAL_MAP_SOLID, EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR and + EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA. If the hardware does not + support these, the materials will fall back to their base materials. To be able to + use these materials, there is the new vertex type 'S3DVertexTangents', the material + does not work with any other vertex types. There are some new methods to create meshes + with this vertex type (IMeshManipulator::createMeshWithTangents()). + +- A new example/tutorial (11.PerPixelLighting) shows how to use per pixel lighting + in your applications. + +- The software renderer now works in Linux, too. + +- Irrlicht now has a built-in normal map generator. It creates on the fly 32 and 16 bit + normal maps from height maps (IVideoDriver::makeNormalMapTexture). As most other things + in Irrlicht, the generator does not depend on D3D, D3DX or OpenGL. + +- Added shader debugging capabilities to Irrlicht. If _IRR_D3D_SHADER_DEBUGGING is + defined in IrrCompileConfig.h (commented out by default), it is now possible to + debug all D3D9 shaders in VisualStudio. All shaders (which have been generated in memory + or read from archives for example) will be emitted into a temporary file for this purpose. + To debug your shaders, choose Debug->Direct3D->StartWithDirect3DDebugging in Visual Studio, + and for every shader a file named 'irr_dbg_shader_%%.vsh' or 'irr_dbg_shader_%%.psh' + will be created. Drag'n'drop the file you want to debug into visual studio. That's it. + You can now set breakpoints and watch registers etc. This works both with ASM, HLSL, + pixel and vertex shaders. + Note that the engine will run in D3D REF for this, which is a lot slower than HAL. + +- Support for compressed .tga texture loading added. (Support from 0.4.1 was buggy) + Thanks to neojzs for posting his improvement. + +- Support for 32 bit .bmp texture loading added. + +- Global particles are now possible. Use IParticleSystem::setParticlesAreGlobal() + to switch between global and local particles. A demonstration of this can be seen in the + new tutorial (11.SpecialFX2). + +- It is now possible to let IGUIImages draw themselves using the alpha channel of the texture + they show. Use IGUIImage::setUseAlphaChannel() for this. + +- ITexture now has a method for rebuilding the mip map levels: regenerateMipMapLevels(). + This is useful for example after locking and modifying the texture. + +- Gravity acceleration speed in CollisionResponseAnimator was changed thanks to a suggestion + by Morrog. The accelerationPerSecond value has been removed beacause of this, you + can now control everything just with the gravity vector. Note that the gravity value + must now be a little bit smaller to achieve the same effect as before. + +- Fixed a problem with several material renderers which weren't able to update their states + at the right time sometimes. A new method OnRender() will be called every time the + material is actually used. + +- Adjusted all tutorials to fit some interface changes. + +- Changed the opengl shader of tutorial 10 to fit the d3d shaders. The now look the same. + +- The MeshManipulator has a new method createMeshWithTangents() which creates a mesh + with normals, tangents and binormals from any mesh. + +- Wrong 2D alpha channel renderstates have been set when using D3D9 and 8. This has been fixed now. + +- When loading 32 bit images with an alpha channel and storing them internally as 16 bit, the + alpha channel got lost. This is now fixed, the remaining one bit alpha channel is now + stored correctly. + +- There is a new overloaded IGUIEnvironment::addImage method, which creates an image directly with + a texture as parameter, adjusting its size to the original size of the texture. + +- A small bug in rect::isValid() has been fixed, thanks to jox. + +- Fixed a bug in D3D8, D3D9 and OpenGL, which caused Materials be set and unset with an unequal + amount when mixing 3d with 2d grafics or stencil buffer shadows. + +- If you are recompiling the whole engine with Visual Studio 6 (which means + Irrlicht.dll, NOT the application which is using Irrlicht), DirectX9 support is disabled + now by default, because Microsoft stopped support for DX9 on VS6 in December + 2004. You can reenable this by uncommenting the new define at the bottom of + IrrCompileConfig.h, if you have an old SDK for example. + +- The mixed fvf and vertex shader system in D3D8 caused a slight issue in Irrlicht ending up + in really messed up render states sometimes. This is now fixed. + +- A major bug with the OpenGL renderer which occured on some OpenGL implementations + has been removed thanks to a bugfix by Murphy and a great report and some investigations + by ElectroDruid. + +- Sorting transparent scene nodes was broken in all previous versions of Irrlicht. This + didn't attract a lot attention because most users used the ADD_COLOR transparencies for which + the sorting is not relevant. Thanks to Morrog and mmm76, sorting now is right. +- After the application window is resized, getViewport() no longer returns viewport as the + first time the window has been created. + +- The draw primitive functions are no longer wrongly checking the maximum primitive count with + the vertex amount value. Thanks to Spintz for the bug report. + +- Template materials in X files just like exported in the panda exporter are now + supported, thanks to JoeWright. + +- Changed the stringc typedef slightly to make it work with people not using + namespace irr. Thanks to schick. + +- Refactored the MeshManipulator code, which in some cases now uses template methods for performing + calculations on different vertex types. + +- Fixed an interface problem with newer versions of libJPEG. + Thanks to Fabien Coutant and Simon Barner for some help and clues into the right direction. + Was not able to add system specific zlib/jpeglib support due to issues on + some strange systems/users and a lack of time, sorry. + +- Typo in plane3d and triangle3d: method isFrontFacting renamed to isFrontFacing. + +------------------------------------------------------------------------------------- +Changes in version 0.7.1: (26 Sep 2004) + +- Fixed some bugs which prevented the engine to compile with gcc 3.4.1. + +- Fixed a problem with the OpenGL driver, which caused the renderstates not to be reset correctly + when drawing scene nodes with reflective materials. + +- Fixed error in Irrlicht's software mip map generation, which caused that some mipmap levels + looked strange. This fix was found by jox, the hardcore bug fixer, + so many thanks go to him. Again. :) + +- Disabled hardware mip map generation in D3D9 again, because it seems to cause problems on + some hardware. I don't have any hardware where this problem occurs, but I hope this helps. + +- Fixed a small bug in fast_atof submitted in the forum by da_dude. + +- Fixed string operator + after a bug report by osre and a fix suggestion by jox. + +- IEventReceiver now has a virtual destructor for the people who needed it. + +- 3DS-Loader patched due to some suggestions of Daniel Azkona Coya. + +------------------------------------------------------------------------------------- +Changes in version 0.7: (11 Sep 2004) + +- The first version of Irrlicht.NET is included in this release. It is a managed C++ + wrapper .DLL which makes the most important features of the engine available for all + .NET languages. The wrapper is incomplete, but it can already be used. + You can find the documentation for this .DLL in the compiled help file doc\IrrlichtNET.chm. + There are also two very basic examples available, which show how to use Irrlicht.NET + from C# and VisualBasic. + +- Low level vertex and pixel shader programming is now possible. There are + now some methods with wich you can write GPU programs in vertex/pixel shader assembler + using Direct3D 8 and 9 and in ARB vertex and fragment program assembler for OpenGL. + You can use the IGPUProgrammingServices interface which can be reached by + IVideoDriver->getGPUProgrammingServices() for this. The new material types you can create + with this can be combined with all other already existing material types. + For example, it is possible to create a new material which uses a vertex shader to + calculate texture coordinates and diffuse colors, and let this be rendered by the built in + material video::EMT_TRANSPARENT_ADD_COLOR. + Support for high level programming languages like GLSL or HLSL is planned for the + following releases. Also note that you won't be able to use all techniques shaders offer with + Irrlicht, due to its current high level abstraction of the 3D APIs. For example, the engine + does not expose vertex streams or vertex buffers currently. + +- There is a new tutorial showing how to use shaders with the engine. In addition, all + old tutorials have been rewritten and adapted. For example, the hello world + tutorial now also shows how to set up visual studio .NET to use it with + the engine. + +- Hardware mip map level generation of textures is now supported when using D3D9. + +- Internal pointers and data of the video drivers can now be exposed for experienced users with + VideoDriver::getExposedVideoData(). For example, you can get a pointer to the IDirect3DDevice9 + interface and the HWND window handle, if the engine is running with D3D9. + +- The createDevice() function has a new additional parameter: bool vsync. With this, it is now + possible to enable or disable the waiting for the vertical retrace period. This is implemented + in D3D9, D3D8, and the Windows OpenGL driver only, the software driver will ignore this flag. + +- The engine now behaves like in the documentation: irr::createDevice() returns 0, if + the desired driver could not be initialized. + +- There is a new SceneNode available: The ITextSceneNode is able to display 2D text at a + position in 3D space. Use ISceneManager::addTextSceneNode() to create one. + +- Finally now all VideoDrivers have a draw2DLine() implementation, thanks to some additions sent in + by Vash TheStampede. + +- Applied some changes to the compilation configuration, so that it should now + be easier to use the engine with XBOX projects. Thanks to MattyBoy for sending + in some clues for this. + +- Some improvements for the linux version of the engine: The NULL device is finally fully operational with Linux + too, and also all examples and even the techdemo compile and run with this OS. + +- The default field of view in the cameras of the irrlicht engine was a little bit + extreme, so I changed it now from core::PI / 3.5f to core::PI / 2.5f. + +- Added a new draw2DImage method for partially draw a 2d Texture, as sent in by zola with + implementations for OpenGL, D3D8 and D3D9. Software implementation is missing. + +- The string class is now able to convert integer values into a string or append it as string + to itself. + +- Added a getDriverType() method to the IVideoDriver interface. + +- Added a getTransform() method to the IVideoDriver interface. + +- The EMT_TRANSPARENT_ALPHA_CHANNEL material in OpenGL is now implemented. + +- The integrated XML Parser now works better with different text file formats. (ASCII, UFT-16,..) + +- IGUIEdit Box now feels more like a windows editbox, thanks to some changes by Jox + +- Added a new method to IVideoDriver: createImageFromData as suggested by Oliver Klems. + +- Fixed a the EMT_TRANSPARENT_ALPHA_CHANNEL problem in D3D8 and D3D9 due to a suggestion by Jox. + +- Added 3 methods created by zola to the quaternion class: fromAngleAxis(), toEuler() and + operator*(vector3df&). + +- A bug in a matrix multiplication operator was fixed. + +- Changed visual studio project files to version 7.1, but provided 7.0 project files + for people with that version. + +- Added SceneNodeAnimatorRotation rotation fix as posted by warui + +- Added normalization fix to vector2d and 3d. Warui suggested a fix like that in the forum. + The one I made has the same result, but is a little bit faster. + +- Fixed some problems with the drawStencilShadow() method in the OpenGL implementation of the + IVideoDriver interface after some suggestions by Nicholas Bray. + +- Added IGUIButton::setPressed() and isPressed(). + +- Fixed checkPrimitiveCount() bug in NullDevice. + +- Applied jox's matrix4::getRotationDegrees() fix, many thanks for posting this! + +- Changed aabbox3d::getExtend() to getExtent(). + +- Changed IXMLReader::isEmtpyElement() to isEmptyElement() + +- Fixed a bug in CSceneManager::getSceneNodeFromId() which caused the engine to crash sometimes. + +- Fixed a bug in CGUISkin::setSize reported by REAPER. This method never worked before. + +- Improved texture mapping and normals of the TestSceneNode, thanks go again to Jox. + +- ScrollBar is now posting mousewheel events, thanks go to REAPER to post this bug and a fix for it. + +- Added - operator to vector2d and vector3d, thanks to calimero + +- Fixed a bug in vector2d::getAngle() and vector2d::rotateBy() thanks to Jox. + +- Fixed a bug in quaternion::set(f32 x, f32 y, f32 z) thanks again to Jox. + +- Fixed a bug in list::insert_before and list::insert_after, reported by Haddock. + +- Fixed a bug in XML Parser which caused a seqfault on linux. Thanks for G.o.D reporting this problem. + +- EDriverType enumeration renamed to E_DRIVER_TYPE + +- SceneNodeRenderTime enumeration renamed to E_SCENE_NODE_RENDER_PASS + +------------------------------------------------------------------------------------- +Changes in version 0.6: (09 Mar 2004) + +- Irrlicht now includes its own XML parser. It provides forward-only, read-only + access to a stream of non validated XML data. It can read everywhere Irrlicht can, + also in compressed .zip-Files for example. Use IFileSystem::createXMLReader() to + use it. + +- Like the new XMLReader, there is also a IXMLWriter available for making it easier + to write xml files. + +- There is a new tutorial available in the SDK. It is for more advanced users, and + shows how to create a 3d model viewer with the engine easily. It shows how to + use menus, tabcontrols, edit-, message- and sky boxes. + The resulting program can also be used as tool, to check if the engine + loads exported 3d models correctly. + +- Again, there are some new GUI widgets available: A ComboBox, a ToolBar, a PushButton + and an ImageButton. The last two are simply the old IGUIButton, but it is now able + to display additional images and behave like a PushButton. + +- It is now possible to make the drawing window resizeable, if it is in windowed mode. + Use IVideoDriver::setResizeAble(true) to do this. + +- The .x file reader and animation player now should work with 99% of all text .x files. + This is achieved by most of the following bug fixes. + +- Fixed a huge bug in the .x file reader, which caused that negative coordinates were + interpreted as positive ones sometimes. This caused that sometimes .x animations + were played wrong. + +- Slerp interpolation of the quaternion class fixed. This means that also some bugs + in the animation of .x files are removed now. + +- Added virtual joints to not weighted vertices to improve .x file animations. + +- The FileSystem is now 100% implemented. Finally it is now possible to write files + too. There is a new Class IWriteFile and the corresponding + IFileSystem::createAndWriteFile() + +- Added lots of text and sample code to the documentation. In most parts + documentation should be clearer now. + +- The ISceneManager has a clear() method, which clears the whole scene, all scene nodes + are removed. + +- All ISceneNodes now own a new method called removeAll(), which deletes all children + of the node. + +- Fixed a bug which prevented the possibility to compile directx8 without + having installed directx9. + +- Fixed a bug in 3d line dawing in D3D 8 and 9. + +- All video drivers now print out the gfx adapter type, vendor and driver version + into the log strings. + +- The D3D9 device is now as fast as the D3D8 device. + +- The string class has an additional new constructor for creating a string from + character data with a specific length. + +- Bug fixed in string class assignment operator which might cause a crash in very + special circumstances. + +- Added a findNext() method to the string class. + +- The ISceneNode class now has a isDebugDataVisible() method. + +- Some lines were changed to make the source of the engine compatible to VS.NET 2003. + +- Some functionality of the IFileList and IFileSystem was missing in the Linux version + of the engine. This caused the FileOpen-Dialog not to work. I fixed this problem. + +- The Middle and Right mouse button were swapped in the Linux version. This is now + fixed. + +- Multitexturing should now work with most linux systems too, thanks to a bug + report by Martin Piskernig. + +- The logger now has an additional log() method which accepts another combination + of strings. + +- Fixed a bug which caused fonts to be displayed very transparent in OpenGL. + +- Removed one of the redundant overloaded IGUIEnvironment::updateAbsolutePosition() + methods. + +- Fixed lots of clipping problems in all GUI Widgets. + +- core::rect has the new methods getCenter() and isValid(). + +- Scrollbar buttons are now disabled if it is not possible to scroll. + +------------------------------------------------------------------------------------- +Changes in version 0.5: (17 Feb 2004) + +------------------------------------- +/ Highlights in short: +/ * DirectX 9 support +/ * .x file support in all render devices including opengl and software +/ * new materials like lightmaps with dynamic lighting +/ * fog +/ * stencil buffer shadows now also work in OpenGL device +/ * more gui widgets: tab controls, edit boxes, menus +/ * spline animation support +/ * mouse wheel support +/ * triangle fan drawing +/ * quaternions +/ * improved keyboard input control +/ * lots of bugfixes including improved quake 3 map support +------------------------------------- + +- DirectX 9 is now supported by Irrlicht. This does not mean that it replaces + DirectX 8. The engine now supports both. You can now select between OpenGL, + DirectX8, DirectX9, Software and the Null device. + +- The engine now is able to read and display .x files. Using + Microsoft's excellent .x file exporter for Maya or MAX which comes + with the DX8 and DX9 SDK, it is now possible to create content for + the engine easily. Using .X files with Irrlicht is independent of D3D, + they can be used with OpenGL and with Linux for example too. + Currently only text file .x files are supported, and some animated .x + files may be displayed not 100% correctly, because the animation player + may still have some small bugs. It works perfectly with most .x files which + come with the DX9-SDK. Some skinned mesh .x files which use + quaternions for animating joints have some problems, there might be a + bug somewhere. I commented the lines with a possible bug in CXAnimationPlayer.cpp. + +- The GUI Environment now supports edit boxes. They should support unicode input + from every keyboard around the world, scrolling, copying and pasting (exchanging + data with the clipboard directly), maximum character amount, marking and all + shortcuts like ctrl+X, ctrl+V, ctrg+C, shift+Left, shift+Right, Home, End, + and so on. Wow, I never programmed an edit box, its much more work than it + seems to be. + +- Tabcontrols are now available in the GUI environment. It is also + possible to create tabs without tabcontrols, to be able to create + invisible gui elements for grouping other elements together. + +- Another new supported GUI Element are context menus. They support + ordinary text menu items, separators and sub menus. In Addition, + a standard menu as seen at the top of most windows can be + created easily with them. + +- Rewrote all tutorials to fit the new API. + +- Spline animations are now supported thanks to a spline scene node animator + written by Matthias Gall. + +- Taskswitching now works with Direct3D 8 and 9 devices in fullscreen mode. + +- Added Material types EMT_LIGHTMAP_LIGHTING, EMT_LIGHTMAP_LIGHTING_M2, + EMT_LIGHTMAP_LIGHTING_M4 and EMT_LIGHTMAP_ADD. + +- The engine now supports drawing of trianglefans. To do this, use + IVideoDriver::drawIndexedTriangleFan(). Mario Gruber sent in code for this, + so lots of thanks go to him! + +- It is now possible to draw 3d objects with fog. Simply switch on the fog flag + in the objects material. To change to way fog is drawn (per pixel/vertex, color, + linear/expontential) use IVideoDriver::setFog(); + +- With IrrlichtDevice::getOSOperator() a pointer to an interface is returned, with + wich it is possible to do some operation system specific operations. Currently + there are only 3 methods supported, but more will be added in the future. + +- Mouse wheel input is now supported. + +- The Key Event structure of SEvent now contains a Char entry, describing the + corresponding character of the pressed key. Also two bools were added, + specifying if shift or ctrl was pressed too. + +- The version of the Operating System is now printed out into the log at + startup. + +- There is now a non-const getBoundingBox() method in IMeshBuffer and + IMesh available. + +- IGUIElement now has a method getElementFromId(), which searches children + (and its children if wanted) for an element with a specific id. If you + want to search all items, just do + IGUIEnvironment::getRootGUIElement::getElementFromId(). + +- ISceneNode::updateAbsolutePosition() is now public + +- Small bug fixed in CMeshManipulator::scaleMesh(). + +- The engine now supports Quaternions. + +- A bug was fixed causing the windows caption not to be displayed in + Windows 95/98/ME. + +- IGUIEnvironment::getBuildInFont() was renamed to getBuiltInFont(). + +- IGUIElement::bringToFront() is able to brint a child to the front. + Windows for example are now using this new feature. + +- Changed the texture mapping of the test scene node a little bit based on + code sent in by Dr Andros C Bragianos. + +- Added code to fix some bug in some ATI drivers. Thanks to ariaci for posting + this code. + +- Stencil buffer shadows now also work with the OpenGL device, they worked only + in D3D in earlier versions. Lots of thanks go to Philipp Dortmann, who + sent in a modification to the opengl driver! + +- IGUIStaticText::setWordWarp() renamed to setWordWrap(), + IGUIStaticText::enableOverrrideColor() renamed to enableOverrideColor() + [thanks to saigumi] + +- A bug was fixed, causing that the window was not able to be closed with Alt+F4 + in Win95/98. + +- Optimized the Octree-Scene node a little bit for getting more rendering speed. + Culling is now done with the real frustum, not the bounding box around it. + Speed increase is about 5%, it's not much but ok. + +- Bug fixed in the Quake 3 .bsp file loader, which caused holes to appear in + some maps. + +- Combination of 3D displaying and drawing GUI elements was improved, and the + priority of input receiving of 3d cameras and gui elements swapped. + +- A bug in the static text was fixed, which caused it to draw itself outside + of its clipping rectangle. + +- KeyFocus and MouseFocus methods in GUIEnvironment are now merged into one method. + +- The Clamptexturecoordinates flag in the material was removed. + +- IVideoDriver::draw3DLine in all devices was improved. + +- The devcpp-version of the binary DLL which comes with the SDK is now faster. + I'll compile this version from now on always with optimization switched on. + +- Other, Minor New/Changed methods in public interfaces: + * buildShadowMatrix in matrix4 + * getRotationDegrees in matrix4 (sent in by Chev) + * rotateVect in matrix4 + * linear_search in array + * recalculateBoundingBox in MeshManipulator + * ISceneManager::addStaticText() now has a parameter for word wrapping + * getCharacterFromPos() in IGUIFont + * drawMeshBuffer() in IVideoDriver; + * interpolate() in matrix4 + * getLast in array + +------------------------------------------------------------------------------------- +Changes in version 0.4.2: (13 Dec 2003) + +- The engine does no more use only 16 bit textures internaly. Now all + other texture formats are supported too. This means higher precision + and better quality images. In this context, the ISurface interface has + been replaced by IImage, and the ISurfaceLoader by IImageLoader. + +- By changing the texture creation mode of the IVideoDriver, it is now + possible to influence how textures are created: You can choose between + 'optimized for speed', 'optimized for quality' or simply set constant + bit depth like 'always 32 bit'. Also, you can now enable and disable + Mip map generation with these flags. Take a look at + IVideoDriver::setTextureCreationFlag() for details. + +- There is now some support for outdoor or terrain rendering available. + You can create a static mesh from a heightmap and a texture using + ISceneManager::addTerrainMesh(). You can specify a huge texture if you + like, even bigger as your hardware allows to render, because the texture + will be splitted up if necessary. + Another possibility for doing terrain rendering is the new Terrain Scene + node. But it is only in a very early alpha stage, I disabled for example + the use of different level of details. + +- It is now possible to load software images into memory from files on + disk, without creating a hardware texture. You can do this by calling + IVideoDriver::createImageFromFile(). This is very useful for example + for loading heighmaps for terrain renderers. + +- The Quake 3 Map Loader now supports curved surfaces, thanks to by Dean P. Macri + who sent in his code. (He also sent in lots of other cool stuff, which I will merge + with the code of next releases, lots of thanks to him!) + +- It is now possible to control what text is printed out to the console and + the debug window of Visual Studio. By getting a pointer to the ILogger + interface, is is possible to adjust if Warning, Error or Informational + texts should be printed out. In addition, now every text can be catched + by the event receiver. + +- The engine is now capable of loading .PCX files. Only a few PCX formats + are supported currently, but at least the common used formats + of most textures of the quake 2 models. Thanks go to Dean P. Macri who + sent in the code for the new PCXLoader! + +- A new Scene node is available, which simply does nothing. It is useful for doing + advanced transformations or for structuring the scene graph. + +- The ISceneManager::addOctTreeSceneNode() now takes AnimatedMeshes as parameter. + If this new method is called, the first frame in the animated mesh is taken as + mesh to construct the octree. This means that you won't have to write + addOctTreeSceneNode(yourMesh->getMesh(0)) anymore, but can use + addOctTreeSceneNode(yourMesh), which is a little bit more intuitive. + +- The Driver type enumeration have been adapted to the Irrlicht + naming conventions. For example instead of writing DT_OPENGL, now write + EDT_OPENGL. + +- The ITexture interface has two new methods for getting the size of the + texture: ITexture::getSize() and ITexture::getOriginalSize(). This replaces + the old getDimension()-method and allows to disable bugs which are generated + by the automatic scaling to optimal sizes of textures. + +- There are some new keycodes available: KEY_COMMA, KEY_PLUS, KEY_MINUS, KEY_PERIOD. + +- There are now 3 lightmap Material types: EMT_LIGHTMAP, EMT_LIGHTMAP_M2 and + EMT_LIGHTMAP_M4, which are making the lightmaps 2 or 4 times brighter. If you used + the Material EMT_LIGHTMAP in your code, you should replace it now with + EMT_LIGHTMAP_M4. + +- The transformation enumeration names have been adapted to the irrlicht + naming conventions. For example instead of writing TS_VIEW, now write + ETS_VIEW. + +- Video driver feature enumeration names have been changed from + EK3DVDF_... to EVDF_... + +- The GUIEnvironment now has a new method: getRootGUIElement(). With this it + is possible now to add external created custom GUI Elements to the gui environment, + without an existing internal GUI element as parent. + +- The setViewPort()-Method of the OpenGL-device now works, too. Nothing stands now + in the way of creating splitscreen applications using the OpenGL device. + Oliver Klems sent code for this, I slightly modified it. Thank you! + +- Corrected a bug, which made the EMT_REFLECTION_2_LAYER Material disappear on some + hardware. + +- Sirshane sent in a bug fix: It is now possible to make the mouse cursor + invisible in the Linux version of the engine. Thanx sirshane! + +- getFrameNr() of IAnimatedMeshSceneNode is now public. + +- Again a small bug in the 3ds file loader was fixed. + +- A small bug causing light positions being transformed in the OpenGL + driver differently compared to D3D. Thanx to Matthias Gall for reporting + this! + +- Typing error fixed: ISceneCollisionMananger::getRayFromScreenCoordiantes renamed to + getRayFromScreenCoordinates. + +- Linux support with multitexturing and mipmap generation has been improved. + +- A bug was fixed wich caused the Engine not to run when compiled + as dynamic library under linux. Thanks to Shane Parker who pointed out + the problem. + +- A bug was fixed in position2d.h in the operator +=, and the list iterator now + has per and postfix operators. Thanks to Isometric God for spotting this out. + +- A bug was fixed in the Metatriangleselector, causing it to detect only collisions + with the last TriangleSelector in it. + +------------------------------------------------------------------------------------- +Changes in version 0.4.1: (18 Sep 2003) + + +- Input events are now processed faster than repaint and window events. This + means that input commands now effect things directly, in earlier versions + there could be a delay when there were low frames per second. Some people + noticed this when moving with the fps camera in large levels: The camera + sometimes stopped seconds after the button was released. This is now fixed. + +- A Message Box is now available in the GUI Environment. It looks like the + windows message boxes and supports OK, Cancel, Yes and No buttons, which + can be combined freely. Also, it shows multiline text and adjusts its size + based on the amount of text it shows, so it should be very useful for displaying + (debug) messages during runtime. + +- It is now possible to make all windows (message boxes, file open dialogs, + simple windows) modal. + +- IGUIStaticText now supports multiline text via automatic word warp and manual + line breaking with '\n'. You only need to switch it on with + yourText->setWordWrap(true); + +- Non default MD2 animations are now supported. Which means simply that you can + enumerate the names of all md2 animations and the AnimatedMeshSceneNode now supports + a setMD2Animation() with a character string as parameter instead of a constant. + +- You do not need an event receiver anymore for sending user events to the active + camera, this is now done autmaticly. In addition, it is now possible to + set a new event receiver during runtime of the engine using IrrlichtDevice:: + setEventReceiver(). + +- It is now possible to disable and enable the input receiver of a camera. This + is useful for example for removing the users control of the camera. To do this, + call camera->setInputReceiverEnabled(false); + +- The first person shooter camera now supports a keymap: You can define your own + key mapping to control the camera when you create it with ISceneManager:: + addCameraSceneNodeFPS(). + +- Thanks to Jon Pry, the engine now also loads compressed TGA texture files. Now only + 8 bit palette using TGAs are missing. :) + +- There are methods for converting 3d coordinates in 2d coordinates and the other + way round. You can find them as two new methods of the ISceneCollisionManager: + getRayFromScreenCoordiantes() and getScreenCoordinatesFrom3DPosition(). + +- There are now access methods in IGUIWindow for getting pointers to the + maximize, minimize and close buttons, to be able to remove them for + example. + +- Before starting up the engine, a version check now is performed and a warning is + written, if Irrlicht.DLL version and header version of your application do + not match. + +- A bug with the skybox has been fixed: In OpenGL, it was possible to see the + borders of the skybox. In addition, when a skybox was visible, there were + errors in the texture coordinates of other meshes. This is all fixed now. + +- A bug has been fixed causing the engine to crash when removing gui childs + which where created inside the .dll but are removed from outside. + +- A bug was fixed causing the engine to crash when drawing debug data of + octtree scene nodes with geometry data with vertices with one texture + coordiante. + +- Multitexturing now works with linux, too. Thanx to Jon Pry again, for showing + me where the problem was. + +- The bug (reported by saigumi) preventing scene nodes attached to a camera + from moving correctly is now fixed. + +- The "Climb-Walls" bug (reported first by Matthias Gall) is fixed. Gravity + acceleration is now quadratic instead of linear. + +- A warning is now printed out, if more vertices are rendererd with one call + than the hardware supports. + +- Other, Minor New/Changed methods in public interfaces: + * get and setText() in IGUISkin + * += operators are now available in the string class. + * setRelativePosition() in IGUIElement + * enumeration EKEY_CODES renamed to EKEY_CODE + * getMaximalPrimitiveCount() in IVideoDriver + * getAnimationCount() in IAnimatedMeshMD2 + * getAnimationName() in IAnimatedMeshMD2 + +------------------------------------------------------------------------------------- +Changes in version 0.4: (04 Sep 2003) + +- Collision detection and reponse based on ellipsoids in now implemented. + There is a new method available in the ISceneCollisionMananger, which returns + a collision response point. In addition, a new SceneNodeAnimator is available, + which causes a scene node, to which it is attached to, not to move through + walls, to climb stairs and to be affected by gravity. This scene node animator + can be attached to any scene node. For example adding it to the FPSCamera, it makes + the user possible to walk through the 3d world as in first person shooters. + +- There is now a full featured Particle System included in the engine for + creating fire, explosions, snow, smoke and so on. + It is customizeable and extensible. There is a ParticleSystemScene node + available in the SceneManager and some standard particle emitters and + affectors are already implemented. + +- Realistic water: The engine now features an IWaterSurfaceScene node, which + animates a static mesh with water waves. In combination with the new + EMT_REFLECTION or EMT_TRANSPARENT_REFLECTION material type, you can easily + create realistic animated water surfaces. + +- Triangle base picking is now possible using the ISceneCollisionMananager. + If a collision happened, the intersection point and the triangle causing + the intersection is returned. + +- Stencil shadows are now drawn using the ZFail method by default, but it is + possible to choose ZPass, if wished. This means that the camera may now move + inside the shadow volumes and no errors will occur. In addition a stencil + shadow bug is now fixed: In 0.3 there where no shadows visible in the TechDemo. + +- The interface of ISceneNode has changed: There is no more a RelativeTransformation + and AnimatedRelativeTransformation matrix. They have been replaced by 3 vectors: + RelativeTranslation, RelativeRotation and RelativeScale, which can be accessed by + the corresponing get() and set() methods. This simplifies the interface + a lot. Also, the set/getRelativePosition was renamed to set/getPosition. + +- The new IAnimatedMeshMD2 interface now returns start, begin time and + fps of every MD2 animation type. In this context, IAnimatedMeshSceneNode + got a new method called setMD2Animation(), which accepts a single constant + like EMAT_ATTACK, which starts and plays the fitting animation (attack + animation in this case), simplifying the interface a lot. + +- Some scene nodes can now draw debug data like their bounding boxes. + This feature is switched on for a single node by calling + ISceneNode::setDebugDataVisible(true). Looks really interesting for + animated scene nodes like particle systems or animated meshes. + +- There is now a IGUIInOutFader avaiable, which is able to fade in or + out the whole screen or parts of it. + +- The new IVideoModeList is a list with all available video modes. It can + be retrieved with IrrlichtDevice::getVideoModeList(). If you are confused + now, because you think you have to create an Irrlicht Device with a video + mode before being able to get the video mode list, let me tell you that + there is no need to start up an Irrlicht Device with DT_DIRECTX8, DT_OPENGL or + DT_SOFTWARE: For this (and for lots of other reasons) the null device, + DT_NULL exists. + +- With the new IMeshManipulator interface accessible with + ISceneManager::getMeshManipulator() it is possible to perform some basic + operations on meshes: Flipping all surfaces, recalculating all normals, + scaling the mesh, creating a new texture mapping and so on. + +- A new material for creating water surfaces or glass with reflections on it + is available: EMT_REFLECTION_2_LAYER and EMT_TRANSPARENT_REFLECTION_2_LAYER. + It has uses a reflection map, and an additional optional texture. + The transparency of this material is set by the alpha color value in the vertices. + +- Another new material is EMT_SOLID_2_LAYER. It is a material with 2 textures, + blended together with the alpha value of the vertex color. This material is + currently only available in DirectX. + +- Trilinear Filtering is now supported by the engine. + There is a new option in SMaterial: TrilinearFilter and EMF_TRILINEAR_FILTER. + +- The addChild() method of the IAnimatedMeshSceneNode for adding SceneNodes to + joints of skeletal animated meshes was removed. + Instead there is now a new method: getMS3DJointNode(). This returns a pointer + to a child node, wich has the same transformation as the corrsesponding joint. + In this way it is possible to do more advanced operations with joints and + attaching scene nodes to joints. Also, the IAnimatedMeshMS3D interface now gives + access to all joints. In this way, you can easily enumerate all names of all + joints in the mesh. + +- Font and color of every IGUIStaticText can now be set separately, without + modifying the IGUISkin. + +- There is now a ELEMENT_LEFT gui event, which all hovered elements receive when they + are left. + +- All features of the FileOpenDialog are now working. + +- Debug informations are now printed out to the console window + also on the win32 platform. + +- FPSCamera now supports setTarget(). Its not precise but working. + +- Textures of 3ds files are now loaded from the same directory in which the + 3ds file is. If the texture is not found there, the texture is tried to be + loaded from the current working directory. + +- A small bug in the 3ds file loader has been fixed. There were 3ds files exported + by anim8or, where the reading of the 3ds file never stopped. + +- It is now possible to configure the minimal amount of polygons contained + in every node in an OctTree via addOctTreeSceneNode(). + +- There is a new template class in the core namespace: triangle3d. With this, + it is easy to find intersections between lines and triangles, find out if + a point is within a triangle and so on. + +- A small bug in ISceneManager::addHillPlaneMesh() was fixed: Now the right tile + amount is created. + +- There is a new SceneNode available: IDummyTransformationSceneNode. It exists + for making it possible to insert matrix transformations anywhere into the + scene graph. + +- Added a new SceneNode animator for deleting Scene nodes automaticly after some + time. Create it with ISceneManager::createDeleteAnimator(). + +- The techdemo now is interactive. After a short non-interactive flight over + the quake 3 level, you are placed as player inside the level, may move around, + shoot fire balls and take a look at some animated characters which are placed + on the map. + +- I fixed a bug which caused the screen get black when choosing shadows and fullscreen + on some special 3d adapters. + +- I fixed some bugs in the linux port: The timer returned an incorrect time, causing + wrong animations everywhere and the releasing of keys and mouse buttons was not + sent as event. In addition, I placed a copy of the zlib.a and jpeglib.a into the + /lib/Linux directory and changed the Makefiles of the examples and the source + of the engine for doing this automaticly in the future, so I hope there will be no + problems with other versions of zlib and jpeglib anymore. + +- There are 2 new tutorials: One showing how to do collision detection and + for special effects. + +- Other, Minor New/Changed methods in public interfaces: + * getVersion() in IrrlichtDevice + * getLengthSQ() in vector3d + * getInterpolated() in vector3d + * getInterpolated() in SColor + * getAngle() in vector2d + * getAngleWith() in vector2d + * getPrimitiveCountDrawed() in IVideoDriver renamed to getPrimitiveCountDrawn() + * getSceneNodeFromSceenCoordinates() renamed to getSceneNodeFromScreenCoordinates() + * getMeshType() in IAnimatedMesh + * getInterpolated() in aabbox + * setMD2Animation() in IAnimatedMeshSceneNode + * getFullFileName() in IFileList + * addShadowVolumeSceneNode() in IAnimatedMeshSceneNode extended with zfail parameter + * drawStencilShadowVolume() in IVideoDriver extended with zfail parameter + * getDistanceFromSQ() in vector3d + * subString() in string + * findFirst() in string + * findLast() in string + * getTriangleSelector() in ISceneNode + * setTriangleSelector() in ISceneNode + * draw3DTriangle() in IVideoDriver + * setShadowColor() in ISceneManager + * getShadowColor() in ISceneManager + * addToDeletionQueue() in ISceneManager + * getSceneNodeFromId() in ISceneManager + +------------------------------------------------------------------------------------- +Changes in version 0.3: (18 Jul 2003) + +- Linux port: The Irrlicht Engine now compiles and runs on Linux. Currently only + the OpenGL driver is available. The Software driver would be there too, if + somebody could tell me a fast way to blit a A1R5G5B5 surface to the screen + using X. + All examples do compile and run, but there are some things missing: + * It is not yet possible to make the mouse cursor invisibe. + * The timer seems not to return the currect time. + * Multitexturing does not work correctly on all gfx adapters. + +- Ms3D Animations: The engine is now able to play skeletal animations directy + from Milkshape 3D (.ms3d) files. It is also possible to attach objects to + parts of the animated mesh. For example a weapon to the left hand of + the animated model. + +- Because the swprintf function in Windows32 does not match the ISO C standard, + and it does in linux and all other platforms, there is now a define in Irrlicht.h, + to make the code be the same on all platforms: + #define swprintf _snwprintf + This simply means that you need to add a parameter to your swprintf calls if + you used this function in your win32 irrlicht engine projects. For example instead + of writing + wchar_t tmp[255]; + swprint(tmp, "FPS: %d", fps); + you now write + wchar_t tmp[255]; + swprint(tmp, 255, "FPS: %d", fps); + +- Automatic culling has changed a little bit: It is now done by the SceneManager. + Scene nodes now only need to return a valid, non transformed bounding box to be + culled automaticly. It is explaned in the CustomSceneNode Tutorial how this works. + +- It is now possible to use the engine easily for 2D graphics: There are now to new + methods in the IVideoDriver, which create an 1bit alpha channel for textures + using an color key. The methods are both named makeColorKeyTexture. There is a + tutorial '2d graphics' which explains how this works. + +- The rect template class was removed and replaced by the rectEx class. There + is now only one rectangle template available, called 'rect' for simplifying + the interface. + +- The texture coordinate bug in Milkshape 3d models with lots of shared vertices + was fixed. + +- Bugfix with GUI environment hovering invisible elements. + +- There are two new tutorials: One for 2d graphics, and one for user interface. + +- Tutorial changes: + * All backslashes replaced by slashes in file names in + all tutorials for linux compatibility. + * RectEx replaces with rect in 1.HelloWorld + * Added second parameter to swprintf in 2.Quake3Map + * Added bounding box creation to 3.CustomSceneNode + * Added second parameter to swprintf in 4.Movement + +- New/Changed methods in public interfaces: + * getClosestPoint in line3d + * getMatrixOfMeshPart in IAnimatedMesh + * removeChild in ISceneNode now returns true or false + * addChild in IAnimatedMeshSceneNode + * setParent in ISceneNode + +------------------------------------------------------------------------------------- +Changes in version 0.2.5: (22 Jun 2003) + +- A new material type is available: EMT_TRANSPARENT_VERTEX_ALPHA, which + realizes transparency based on the vertex alpha color. It currently is + only implemented in the DirectX device. + +- There is now an ISceneCollisionManager available. Get it with + getSceneCollisionManager() from the ISceneManager. It currently only implements + picking, but more is coming soon. + +- Automatic Culling based on Bounding Boxes is implemented now. It can be switched on + or off for every SceneNode seperately using ISceneNode::setAutomaticCulling(). + It is on by default. + +- It is now possible to remove loaded textures for freeing memory or reloading them. + Use IVideoDriver::removeTexture() or removeAllTextures(). + +- New drawing methods in the IVideoDriver interface: + * Draw3dLine(), drawing a 3d line. + * Draw3dBox(), which draws an axis aligned bounding box. + * Draw2dLine(), currently only supported by the Software device. + +- MD2 bugfixes: + * There was a small bug with texture coordinates. + * Frames are now correctly interpolated when playing animations. + +- Bugfix in the 3ds file format loader: Single objects in the 3ds file with multiple + materials attached are now loaded correctly. + +- list.h renamed to irrlist.h due to compatibility issues. + +- Now works with Dev-C++ 5 Beta 8. (4.9.8.0) + +- New/Changed methods in public interfaces: + * 'getInverse' in matrix4. + * 'transformBox' in matrix4. + * 'repair' in aabbox. + * 'intersectsWithLine' in aabbox. + * 'getVector' in line3d. + * 'getMiddle' in line3d. + * 'normalize' method in vector3d and vector2d now returns reference to vector. + * 'getTransformedBoundingBox' in ISceneNode. + * 'getChildren' in ISceneNode + * 'setRotation' in ISceneNode + * 'addHillPlaneMesh' in ISceneManager now accepts a texture repeat count parameter. + + +------------------------------------------------------------------------------------- +Changes in version 0.2: (19 May 2003) + +- The engine is now able to load .3ds files, with their materials and textures. + +- There are some new SceneNodeAnimators: A fly straight animator and a texture animator. + +- Texture coordinates can now be set to clamp or wrap mode with + a flag in the SMaterial struct. + +- Skyboxes are implemented. + +- Billboards now work 100% correctly. + +- The IAnimatedMeshSceneNode is now able to draw shadows of itself. To enable this, just call + addShadowVolumeSceneNode(). Please note that shadows are currently just experimental, + there are some bugs, and they only only in Direct3D mode. + +- A small bug in the view frustum and the octree fixed. + +- The default aspect ratio in all camera scene nodes was changed. + +- Some changes and extenstions to the core::matrix4, SViewFrustum, plane3d and + aabbox were made. The plane3dex was removed, there is now only one plane implementation + available. Implemented some ideas and suggestions by Mark Jeacocke. Thanx a lot! + +- The interface for adding dynamic lights has been enhanced. There are some new methods + for handling dynamic light in the IVideoDriver interface. For example, it is now possible + to change the ambient light. + +- There is a new parameter in the createDevice() function, which specifies if the + stencil buffer should be activated. Also, now all parameters have default parameters. + +- There is now a timer object to get the current timer. It can be received using + the getTimer() method from the IrrlichtDevice. + +- The first person shooter camera is now able to be moved by external using + setRelativePosition() and the sceneNodeAnimators. In addition, it now supports + multiple FPS cameras. + +- Mesh format loading extenstions are now possible. To extend the engine with a + mesh format it currently does not support (e.g. .cob), just implement a + IMeshLoader interface and add it to the engine calling + ISceneManager::addExternalMeshLoader(). + +- It is now possible to extend the Irrlicht Engine easily with new texture file format + loaders. If there is an image file format the engine does not support (for example + .gif files) the IImageLoader interface can be implemented to load .gif files + and added to the engine via IVideoDriver::addExternalSurfaceLoader(). + +------------------------------------------------------------------------------------- +Changes in version 0.1.5: (03 Apr 2003) + +- The zlib and libjpeg are now included in the SDK. + +- It is now possible to let the scene manager generate a hilly plane on the fly. + +- The Interface for handling dynamic lights was simplified. + +- The OpenGL 2D and 3D device is now full implemented. + +- There is now a way to access to root scene node from the scene manager, and so it + is possible to add external created custom scene nodes to the scene. + +- There is a new Camera control scene node available in the engine: First Person Shooter + Camera Control. Look with mouse movement, move and strafe with the cursor keys. + +- The engine now compiles with g++ and the Microsoft compilers, which enables it to + develop applications for the engine with VisualC++6.0, VisualC++.NET and Dev-C++. + +- There is now a ICursorControl available in the engine, which is able to modify the + mouse cursor: Get/Set the position of the cursor, make it invisible or visible. + +- video::Color was renamed to video::SColor to fit the Irrlicht Engine naming conventions + and for g++ compatibility issues in the Vertices. + +------------------------------------------------------------------------------------- +Release notes of version 0.1: (14 Mar 2003) + + This is an alpha version of the SDK. So please note that there are + features missing in the engine and maybe also some bugs. The following + list is a complete list of parts of this alpha SDK which do not work + 100% correct. All other parts which can be found in the documentation + and accessed with the Irrlicht header files work and can already be + used. + +- OpenGL Device + The OpenGL Device is currently only able to load textures and draw basic + 3D primitives. No 2D functions, complex materials and dynamic light are + implemented. Please use the DirectX8 or the Software Device instead. + In the next release (0.2) the OpenGL device will be complete. + +- Software Device + Dynamic lighting, multitexturing, 3d clipping and bilinear filtering are + not implemented because the Software Device was intented to to only 2d + functions, the primitive 3d functions are only an addition. Until the + first non beta release (1.0) of the Engine, some more 3d functionality + will be added. + +- BspTree + The binary space partition scene node does not work correctly and has + some bugs in it, which might lead to crashes. Please use the OctTree + scene node instead. There is nearly no difference between the interface + of them. + +- MeshViewerGUIElement + The camera control of this element is currently disabled. + +- FileOpenDialog + Not all functions are implemented. + +- Render to Texture support + Is not implemented yet. + +- MS3D Skeletal Animation + A loaded mesh is currently not animated and only drawn static. + +- Quake 3 maps + No support for curved surfaces yet. + +- Linux Support + The engine currently only runs with Windows platforms. A linux version + will be available somewhere between the versions 0.2 and 0.5, it depends + on the need of the users. + +------------------------------------------------------------------------------------- diff --git a/src/others/irrlicht-1.8.1/doc/aesGladman.txt b/src/others/irrlicht-1.8.1/doc/aesGladman.txt new file mode 100644 index 0000000..e7ebb1c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/aesGladman.txt @@ -0,0 +1,34 @@ +The Irrlicht Engine may be compiled to provide support for AES encrypted files. The implementation used by Irrlicht is provided by Dr Brian Gladman. The license for these files (including AES, a PRNG, SHA, and other algorithms) is as follows + +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- +*/ + diff --git a/src/others/irrlicht-1.8.1/doc/bzip2-license.txt b/src/others/irrlicht-1.8.1/doc/bzip2-license.txt new file mode 100644 index 0000000..f420cff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/bzip2-license.txt @@ -0,0 +1,42 @@ + +-------------------------------------------------------------------------- + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2007 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, jseward@bzip.org +bzip2/libbzip2 version 1.0.5 of 10 December 2007 + +-------------------------------------------------------------------------- diff --git a/src/others/irrlicht-1.8.1/doc/html/001shot.jpg b/src/others/irrlicht-1.8.1/doc/html/001shot.jpg new file mode 100644 index 0000000..b7438d6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/001shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/002shot.jpg b/src/others/irrlicht-1.8.1/doc/html/002shot.jpg new file mode 100644 index 0000000..a8659aa Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/002shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/003shot.jpg b/src/others/irrlicht-1.8.1/doc/html/003shot.jpg new file mode 100644 index 0000000..c4865f1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/003shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/004shot.jpg b/src/others/irrlicht-1.8.1/doc/html/004shot.jpg new file mode 100644 index 0000000..20091c2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/004shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/005shot.jpg b/src/others/irrlicht-1.8.1/doc/html/005shot.jpg new file mode 100644 index 0000000..9d1c975 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/005shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/006shot.jpg b/src/others/irrlicht-1.8.1/doc/html/006shot.jpg new file mode 100644 index 0000000..8044e07 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/006shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/007shot.jpg b/src/others/irrlicht-1.8.1/doc/html/007shot.jpg new file mode 100644 index 0000000..24ce868 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/007shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/008shot.jpg b/src/others/irrlicht-1.8.1/doc/html/008shot.jpg new file mode 100644 index 0000000..529174b Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/008shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/009shot.jpg b/src/others/irrlicht-1.8.1/doc/html/009shot.jpg new file mode 100644 index 0000000..9bfa195 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/009shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/010shot.jpg b/src/others/irrlicht-1.8.1/doc/html/010shot.jpg new file mode 100644 index 0000000..0e798d3 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/010shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/011shot.jpg b/src/others/irrlicht-1.8.1/doc/html/011shot.jpg new file mode 100644 index 0000000..840a599 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/011shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/012shot.jpg b/src/others/irrlicht-1.8.1/doc/html/012shot.jpg new file mode 100644 index 0000000..aefd261 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/012shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/013shot.jpg b/src/others/irrlicht-1.8.1/doc/html/013shot.jpg new file mode 100644 index 0000000..4964019 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/013shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/014shot.jpg b/src/others/irrlicht-1.8.1/doc/html/014shot.jpg new file mode 100644 index 0000000..af6b7c6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/014shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/015shot.jpg b/src/others/irrlicht-1.8.1/doc/html/015shot.jpg new file mode 100644 index 0000000..9de0f8b Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/015shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/016shot.jpg b/src/others/irrlicht-1.8.1/doc/html/016shot.jpg new file mode 100644 index 0000000..58f450f Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/016shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/017shot.jpg b/src/others/irrlicht-1.8.1/doc/html/017shot.jpg new file mode 100644 index 0000000..0ff80d2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/017shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/018shot.jpg b/src/others/irrlicht-1.8.1/doc/html/018shot.jpg new file mode 100644 index 0000000..0cba94c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/018shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/019shot.jpg b/src/others/irrlicht-1.8.1/doc/html/019shot.jpg new file mode 100644 index 0000000..8faa915 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/019shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/020shot.jpg b/src/others/irrlicht-1.8.1/doc/html/020shot.jpg new file mode 100644 index 0000000..da5d98b Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/020shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/021shot.jpg b/src/others/irrlicht-1.8.1/doc/html/021shot.jpg new file mode 100644 index 0000000..48b28d7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/021shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/022shot.jpg b/src/others/irrlicht-1.8.1/doc/html/022shot.jpg new file mode 100644 index 0000000..c282197 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/022shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/023shot.jpg b/src/others/irrlicht-1.8.1/doc/html/023shot.jpg new file mode 100644 index 0000000..2be47ce Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/023shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/024shot.jpg b/src/others/irrlicht-1.8.1/doc/html/024shot.jpg new file mode 100644 index 0000000..9cfc0d1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/024shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/025shot.jpg b/src/others/irrlicht-1.8.1/doc/html/025shot.jpg new file mode 100644 index 0000000..91c8116 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/025shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/026shot.jpg b/src/others/irrlicht-1.8.1/doc/html/026shot.jpg new file mode 100644 index 0000000..b2acfcf Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/026shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h.html new file mode 100644 index 0000000..5572338 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: CDynamicMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
CDynamicMeshBuffer.h File Reference
+
+
+
#include "IDynamicMeshBuffer.h"
+#include "CVertexBuffer.h"
+#include "CIndexBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h_source.html new file mode 100644 index 0000000..7077c73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_dynamic_mesh_buffer_8h_source.html @@ -0,0 +1,229 @@ + + + + +Irrlicht 3D Engine: CDynamicMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
CDynamicMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __C_DYNAMIC_MESHBUFFER_H_INCLUDED__
+00006 #define __C_DYNAMIC_MESHBUFFER_H_INCLUDED__
+00007 
+00008 #include "IDynamicMeshBuffer.h"
+00009 
+00010 #include "CVertexBuffer.h"
+00011 #include "CIndexBuffer.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace scene
+00016 {
+00017 
+00018     class CDynamicMeshBuffer: public IDynamicMeshBuffer
+00019     {
+00020     public:
+00022         CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType)
+00023         {
+00024             VertexBuffer=new CVertexBuffer(vertexType);
+00025             IndexBuffer=new CIndexBuffer(indexType);
+00026         }
+00027 
+00029         virtual ~CDynamicMeshBuffer()
+00030         {
+00031             if (VertexBuffer)
+00032                 VertexBuffer->drop();
+00033             if (IndexBuffer)
+00034                 IndexBuffer->drop();
+00035         }
+00036 
+00037         virtual IVertexBuffer& getVertexBuffer() const
+00038         {
+00039             return *VertexBuffer;
+00040         }
+00041 
+00042         virtual IIndexBuffer& getIndexBuffer() const
+00043         {
+00044             return *IndexBuffer;
+00045         }
+00046 
+00047         virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer)
+00048         {
+00049             if (newVertexBuffer)
+00050                 newVertexBuffer->grab();
+00051             if (VertexBuffer)
+00052                 VertexBuffer->drop();
+00053 
+00054             VertexBuffer=newVertexBuffer;
+00055         }
+00056 
+00057         virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer)
+00058         {
+00059             if (newIndexBuffer)
+00060                 newIndexBuffer->grab();
+00061             if (IndexBuffer)
+00062                 IndexBuffer->drop();
+00063 
+00064             IndexBuffer=newIndexBuffer;
+00065         }
+00066 
+00068         virtual const video::SMaterial& getMaterial() const
+00069         {
+00070             return Material;
+00071         }
+00072 
+00074         virtual video::SMaterial& getMaterial()
+00075         {
+00076             return Material;
+00077         }
+00078 
+00080         virtual const core::aabbox3d<f32>& getBoundingBox() const
+00081         {
+00082             return BoundingBox;
+00083         }
+00084 
+00086         virtual void setBoundingBox( const core::aabbox3df& box)
+00087         {
+00088             BoundingBox = box;
+00089         }
+00090 
+00092         virtual void recalculateBoundingBox()
+00093         {
+00094             if (!getVertexBuffer().size())
+00095                 BoundingBox.reset(0,0,0);
+00096             else
+00097             {
+00098                 BoundingBox.reset(getVertexBuffer()[0].Pos);
+00099                 for (u32 i=1; i<getVertexBuffer().size(); ++i)
+00100                     BoundingBox.addInternalPoint(getVertexBuffer()[i].Pos);
+00101             }
+00102         }
+00103 
+00104         video::SMaterial Material;
+00105         core::aabbox3d<f32> BoundingBox;
+00106     private:
+00107         IVertexBuffer *VertexBuffer;
+00108         IIndexBuffer *IndexBuffer;
+00109     };
+00110 
+00111 
+00112 } // end namespace scene
+00113 } // end namespace irr
+00114 
+00115 #endif
+00116 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h.html new file mode 100644 index 0000000..ce89f33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: CIndexBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
CIndexBuffer.h File Reference
+
+
+
#include "IIndexBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+
    +
  • class irr::scene::CIndexBuffer +
  • class irr::scene::CIndexBuffer::CSpecificIndexList< T > +
  • class irr::scene::CIndexBuffer::IIndexList +
+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h_source.html new file mode 100644 index 0000000..109dbe6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_index_buffer_8h_source.html @@ -0,0 +1,342 @@ + + + + +Irrlicht 3D Engine: CIndexBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
CIndexBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __C_INDEX_BUFFER_H_INCLUDED__
+00006 #define __C_INDEX_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IIndexBuffer.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00015     class CIndexBuffer : public IIndexBuffer
+00016     {
+00017 
+00018         class IIndexList
+00019         {
+00020         public:
+00021             virtual ~IIndexList(){};
+00022 
+00023             virtual u32 stride() const =0;
+00024             virtual u32 size() const =0;
+00025             virtual void push_back(const u32 &element) =0;
+00026             virtual u32 operator [](u32 index) const =0;
+00027             virtual u32 getLast() =0;
+00028             virtual void setValue(u32 index, u32 value) =0;
+00029             virtual void set_used(u32 usedNow) =0;
+00030             virtual void reallocate(u32 new_size) =0;
+00031             virtual u32 allocated_size() const =0;
+00032             virtual void* pointer() =0;
+00033             virtual video::E_INDEX_TYPE getType() const =0;
+00034         };
+00035 
+00036         template <class T>
+00037         class CSpecificIndexList : public IIndexList
+00038         {
+00039         public:
+00040             core::array<T> Indices;
+00041 
+00042             virtual u32 stride() const {return sizeof(T);}
+00043 
+00044             virtual u32 size() const {return Indices.size();}
+00045 
+00046             virtual void push_back(const u32 &element)
+00047             {
+00048                 // push const ref due to compiler problem with gcc 4.6, big endian
+00049                 Indices.push_back((const T&)element);
+00050             }
+00051 
+00052             virtual u32 operator [](u32 index) const
+00053             {
+00054                 return (u32)(Indices[index]);
+00055             }
+00056 
+00057             virtual u32 getLast() {return (u32)Indices.getLast();}
+00058 
+00059             virtual void setValue(u32 index, u32 value)
+00060             {
+00061                 Indices[index]=(T)value;
+00062             }
+00063 
+00064             virtual void set_used(u32 usedNow)
+00065             {
+00066                 Indices.set_used(usedNow);
+00067             }
+00068 
+00069             virtual void reallocate(u32 new_size)
+00070             {
+00071                 Indices.reallocate(new_size);
+00072             }
+00073 
+00074             virtual u32 allocated_size() const
+00075             {
+00076                 return Indices.allocated_size();
+00077             }
+00078 
+00079             virtual void* pointer() {return Indices.pointer();}
+00080 
+00081             virtual video::E_INDEX_TYPE getType() const
+00082             {
+00083                 if (sizeof(T)==sizeof(u16))
+00084                     return video::EIT_16BIT;
+00085                 else
+00086                     return video::EIT_32BIT;
+00087             }
+00088         };
+00089 
+00090     public:
+00091         IIndexList *Indices;
+00092 
+00093         CIndexBuffer(video::E_INDEX_TYPE IndexType) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1)
+00094         {
+00095             setType(IndexType);
+00096         }
+00097 
+00098         CIndexBuffer(const IIndexBuffer &IndexBufferCopy) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1)
+00099         {
+00100             setType(IndexBufferCopy.getType());
+00101             reallocate(IndexBufferCopy.size());
+00102 
+00103             for (u32 n=0;n<IndexBufferCopy.size();++n)
+00104                 push_back(IndexBufferCopy[n]);
+00105         }
+00106 
+00107         virtual ~CIndexBuffer()
+00108         {
+00109             delete Indices;
+00110         }
+00111 
+00112         //virtual void setType(video::E_INDEX_TYPE IndexType);
+00113         virtual void setType(video::E_INDEX_TYPE IndexType)
+00114         {
+00115             IIndexList *NewIndices=0;
+00116 
+00117             switch (IndexType)
+00118             {
+00119                 case video::EIT_16BIT:
+00120                 {
+00121                     NewIndices=new CSpecificIndexList<u16>;
+00122                     break;
+00123                 }
+00124                 case video::EIT_32BIT:
+00125                 {
+00126                     NewIndices=new CSpecificIndexList<u32>;
+00127                     break;
+00128                 }
+00129             }
+00130 
+00131             if (Indices)
+00132             {
+00133                 NewIndices->reallocate( Indices->size() );
+00134 
+00135                 for(u32 n=0;n<Indices->size();++n)
+00136                     NewIndices->push_back((*Indices)[n]);
+00137 
+00138                 delete Indices;
+00139             }
+00140 
+00141             Indices=NewIndices;
+00142         }
+00143 
+00144         virtual void* getData() {return Indices->pointer();}
+00145 
+00146         virtual video::E_INDEX_TYPE getType() const {return Indices->getType();}
+00147 
+00148         virtual u32 stride() const {return Indices->stride();}
+00149 
+00150         virtual u32 size() const
+00151         {
+00152             return Indices->size();
+00153         }
+00154 
+00155         virtual void push_back(const u32 &element)
+00156         {
+00157             Indices->push_back(element);
+00158         }
+00159 
+00160         virtual u32 operator [](u32 index) const
+00161         {
+00162             return (*Indices)[index];
+00163         }
+00164 
+00165         virtual u32 getLast()
+00166         {
+00167             return Indices->getLast();
+00168         }
+00169 
+00170         virtual void setValue(u32 index, u32 value)
+00171         {
+00172             Indices->setValue(index, value);
+00173         }
+00174 
+00175         virtual void set_used(u32 usedNow)
+00176         {
+00177             Indices->set_used(usedNow);
+00178         }
+00179 
+00180         virtual void reallocate(u32 new_size)
+00181         {
+00182             Indices->reallocate(new_size);
+00183         }
+00184 
+00185         virtual u32 allocated_size() const
+00186         {
+00187             return Indices->allocated_size();
+00188         }
+00189 
+00190         virtual void* pointer()
+00191         {
+00192             return Indices->pointer();
+00193         }
+00194 
+00196         virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
+00197         {
+00198             return MappingHint;
+00199         }
+00200 
+00202         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
+00203         {
+00204             MappingHint=NewMappingHint;
+00205         }
+00206 
+00208         virtual void setDirty()
+00209         {
+00210             ++ChangedID;
+00211         }
+00212 
+00214 
+00215         virtual u32 getChangedID() const {return ChangedID;}
+00216 
+00217         E_HARDWARE_MAPPING MappingHint;
+00218         u32 ChangedID;
+00219     };
+00220 
+00221 
+00222 } // end namespace scene
+00223 } // end namespace irr
+00224 
+00225 #endif
+00226 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h.html new file mode 100644 index 0000000..05848ae --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h.html @@ -0,0 +1,151 @@ + + + + +Irrlicht 3D Engine: CMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
CMeshBuffer.h File Reference
+
+
+
#include "irrArray.h"
+#include "IMeshBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h_source.html new file mode 100644 index 0000000..c567bb1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_mesh_buffer_8h_source.html @@ -0,0 +1,377 @@ + + + + +Irrlicht 3D Engine: CMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
CMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __T_MESH_BUFFER_H_INCLUDED__
+00006 #define __T_MESH_BUFFER_H_INCLUDED__
+00007 
+00008 #include "irrArray.h"
+00009 #include "IMeshBuffer.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00016     template <class T>
+00017     class CMeshBuffer : public IMeshBuffer
+00018     {
+00019     public:
+00021         CMeshBuffer():ChangedID_Vertex(1),ChangedID_Index(1),MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER)
+00022         {
+00023             #ifdef _DEBUG
+00024             setDebugName("SMeshBuffer");
+00025             #endif
+00026         }
+00027 
+00028 
+00030 
+00031         virtual const video::SMaterial& getMaterial() const
+00032         {
+00033             return Material;
+00034         }
+00035 
+00036 
+00038 
+00039         virtual video::SMaterial& getMaterial()
+00040         {
+00041             return Material;
+00042         }
+00043 
+00044 
+00046 
+00047         virtual const void* getVertices() const
+00048         {
+00049             return Vertices.const_pointer();
+00050         }
+00051 
+00052 
+00054 
+00055         virtual void* getVertices()
+00056         {
+00057             return Vertices.pointer();
+00058         }
+00059 
+00060 
+00062 
+00063         virtual u32 getVertexCount() const
+00064         {
+00065             return Vertices.size();
+00066         }
+00067 
+00069 
+00070         virtual video::E_INDEX_TYPE getIndexType() const
+00071         {
+00072             return video::EIT_16BIT;
+00073         }
+00074 
+00076 
+00077         virtual const u16* getIndices() const
+00078         {
+00079             return Indices.const_pointer();
+00080         }
+00081 
+00082 
+00084 
+00085         virtual u16* getIndices()
+00086         {
+00087             return Indices.pointer();
+00088         }
+00089 
+00090 
+00092 
+00093         virtual u32 getIndexCount() const
+00094         {
+00095             return Indices.size();
+00096         }
+00097 
+00098 
+00100 
+00101         virtual const core::aabbox3d<f32>& getBoundingBox() const
+00102         {
+00103             return BoundingBox;
+00104         }
+00105 
+00106 
+00108 
+00109 
+00110         virtual void setBoundingBox(const core::aabbox3df& box)
+00111         {
+00112             BoundingBox = box;
+00113         }
+00114 
+00115 
+00117 
+00118         virtual void recalculateBoundingBox()
+00119         {
+00120             if (Vertices.empty())
+00121                 BoundingBox.reset(0,0,0);
+00122             else
+00123             {
+00124                 BoundingBox.reset(Vertices[0].Pos);
+00125                 for (u32 i=1; i<Vertices.size(); ++i)
+00126                     BoundingBox.addInternalPoint(Vertices[i].Pos);
+00127             }
+00128         }
+00129 
+00130 
+00132 
+00133         virtual video::E_VERTEX_TYPE getVertexType() const
+00134         {
+00135             return T().getType();
+00136         }
+00137 
+00139         virtual const core::vector3df& getPosition(u32 i) const
+00140         {
+00141             return Vertices[i].Pos;
+00142         }
+00143 
+00145         virtual core::vector3df& getPosition(u32 i)
+00146         {
+00147             return Vertices[i].Pos;
+00148         }
+00149 
+00151         virtual const core::vector3df& getNormal(u32 i) const
+00152         {
+00153             return Vertices[i].Normal;
+00154         }
+00155 
+00157         virtual core::vector3df& getNormal(u32 i)
+00158         {
+00159             return Vertices[i].Normal;
+00160         }
+00161 
+00163         virtual const core::vector2df& getTCoords(u32 i) const
+00164         {
+00165             return Vertices[i].TCoords;
+00166         }
+00167 
+00169         virtual core::vector2df& getTCoords(u32 i)
+00170         {
+00171             return Vertices[i].TCoords;
+00172         }
+00173 
+00174 
+00176 
+00180         virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices)
+00181         {
+00182             if (vertices == getVertices())
+00183                 return;
+00184 
+00185             const u32 vertexCount = getVertexCount();
+00186             u32 i;
+00187 
+00188             Vertices.reallocate(vertexCount+numVertices);
+00189             for (i=0; i<numVertices; ++i)
+00190             {
+00191                 Vertices.push_back(reinterpret_cast<const T*>(vertices)[i]);
+00192                 BoundingBox.addInternalPoint(reinterpret_cast<const T*>(vertices)[i].Pos);
+00193             }
+00194 
+00195             Indices.reallocate(getIndexCount()+numIndices);
+00196             for (i=0; i<numIndices; ++i)
+00197             {
+00198                 Indices.push_back(indices[i]+vertexCount);
+00199             }
+00200         }
+00201 
+00202 
+00204 
+00209         virtual void append(const IMeshBuffer* const other)
+00210         {
+00211             /*
+00212             if (this==other)
+00213                 return;
+00214 
+00215             const u32 vertexCount = getVertexCount();
+00216             u32 i;
+00217 
+00218             Vertices.reallocate(vertexCount+other->getVertexCount());
+00219             for (i=0; i<other->getVertexCount(); ++i)
+00220             {
+00221                 Vertices.push_back(reinterpret_cast<const T*>(other->getVertices())[i]);
+00222             }
+00223 
+00224             Indices.reallocate(getIndexCount()+other->getIndexCount());
+00225             for (i=0; i<other->getIndexCount(); ++i)
+00226             {
+00227                 Indices.push_back(other->getIndices()[i]+vertexCount);
+00228             }
+00229             BoundingBox.addInternalBox(other->getBoundingBox());
+00230             */
+00231         }
+00232 
+00233 
+00235         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
+00236         {
+00237             return MappingHint_Vertex;
+00238         }
+00239 
+00241         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
+00242         {
+00243             return MappingHint_Index;
+00244         }
+00245 
+00247         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
+00248         {
+00249             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
+00250                 MappingHint_Vertex=NewMappingHint;
+00251             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
+00252                 MappingHint_Index=NewMappingHint;
+00253         }
+00254 
+00255 
+00257         virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
+00258         {
+00259             if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX)
+00260                 ++ChangedID_Vertex;
+00261             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
+00262                 ++ChangedID_Index;
+00263         }
+00264 
+00266 
+00267         virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
+00268 
+00270 
+00271         virtual u32 getChangedID_Index() const {return ChangedID_Index;}
+00272 
+00273         u32 ChangedID_Vertex;
+00274         u32 ChangedID_Index;
+00275 
+00277         E_HARDWARE_MAPPING MappingHint_Vertex;
+00278         E_HARDWARE_MAPPING MappingHint_Index;
+00279 
+00281         video::SMaterial Material;
+00283         core::array<T> Vertices;
+00285         core::array<u16> Indices;
+00287         core::aabbox3d<f32> BoundingBox;
+00288     };
+00289 
+00291     typedef CMeshBuffer<video::S3DVertex> SMeshBuffer;
+00293     typedef CMeshBuffer<video::S3DVertex2TCoords> SMeshBufferLightMap;
+00295     typedef CMeshBuffer<video::S3DVertexTangents> SMeshBufferTangents;
+00296 } // end namespace scene
+00297 } // end namespace irr
+00298 
+00299 #endif
+00300 
+00301 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h.html new file mode 100644 index 0000000..5420eb7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: CVertexBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
CVertexBuffer.h File Reference
+
+
+
#include "IVertexBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+
    +
  • class irr::scene::CVertexBuffer::CSpecificVertexList< T > +
  • class irr::scene::CVertexBuffer +
  • class irr::scene::CVertexBuffer::IVertexList +
+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h_source.html new file mode 100644 index 0000000..f3514e9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_c_vertex_buffer_8h_source.html @@ -0,0 +1,326 @@ + + + + +Irrlicht 3D Engine: CVertexBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
CVertexBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __C_VERTEX_BUFFER_H_INCLUDED__
+00006 #define __C_VERTEX_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IVertexBuffer.h"
+00009 
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00016     class CVertexBuffer : public IVertexBuffer
+00017     {
+00018         class IVertexList
+00019         {
+00020         public:
+00021             virtual ~IVertexList(){};
+00022 
+00023             virtual u32 stride() const =0;
+00024 
+00025             virtual u32 size() const =0;
+00026 
+00027             virtual void push_back (const video::S3DVertex &element) =0;
+00028             virtual video::S3DVertex& operator [](const u32 index) const =0;
+00029             virtual video::S3DVertex& getLast() =0;
+00030             virtual void set_used(u32 usedNow) =0;
+00031             virtual void reallocate(u32 new_size) =0;
+00032             virtual u32 allocated_size() const =0;
+00033             virtual video::S3DVertex* pointer() =0;
+00034             virtual video::E_VERTEX_TYPE getType() const =0;
+00035         };
+00036 
+00037         template <class T>
+00038         class CSpecificVertexList : public IVertexList
+00039         {
+00040         public:
+00041             core::array<T> Vertices;
+00042 
+00043             virtual u32 stride() const {return sizeof(T);}
+00044 
+00045             virtual u32 size() const {return Vertices.size();}
+00046 
+00047             virtual void push_back (const video::S3DVertex &element)
+00048             {Vertices.push_back((T&)element);}
+00049 
+00050             virtual video::S3DVertex& operator [](const u32 index) const
+00051             {return (video::S3DVertex&)Vertices[index];}
+00052 
+00053             virtual video::S3DVertex& getLast()
+00054             {return (video::S3DVertex&)Vertices.getLast();}
+00055 
+00056             virtual void set_used(u32 usedNow)
+00057             {Vertices.set_used(usedNow);}
+00058 
+00059             virtual void reallocate(u32 new_size)
+00060             {Vertices.reallocate(new_size);}
+00061 
+00062             virtual u32 allocated_size() const
+00063             {
+00064                 return Vertices.allocated_size();
+00065             }
+00066 
+00067             virtual video::S3DVertex* pointer() {return Vertices.pointer();}
+00068 
+00069             virtual video::E_VERTEX_TYPE getType() const {return T().getType();}
+00070         };
+00071 
+00072     public:
+00073         IVertexList *Vertices;
+00074 
+00075         CVertexBuffer(video::E_VERTEX_TYPE vertexType) : Vertices(0),
+00076                 MappingHint(EHM_NEVER), ChangedID(1)
+00077         {
+00078             setType(vertexType);
+00079         }
+00080 
+00081         CVertexBuffer(const IVertexBuffer &VertexBufferCopy) :
+00082                 Vertices(0), MappingHint(EHM_NEVER),
+00083                 ChangedID(1)
+00084         {
+00085             setType(VertexBufferCopy.getType());
+00086             reallocate(VertexBufferCopy.size());
+00087 
+00088             for (u32 n=0;n<VertexBufferCopy.size();++n)
+00089                 push_back(VertexBufferCopy[n]);
+00090         }
+00091 
+00092         virtual ~CVertexBuffer()
+00093         {
+00094             delete Vertices;
+00095         }
+00096 
+00097 
+00098         virtual void setType(video::E_VERTEX_TYPE vertexType)
+00099         {
+00100             IVertexList *NewVertices=0;
+00101 
+00102             switch (vertexType)
+00103             {
+00104                 case video::EVT_STANDARD:
+00105                 {
+00106                     NewVertices=new CSpecificVertexList<video::S3DVertex>;
+00107                     break;
+00108                 }
+00109                 case video::EVT_2TCOORDS:
+00110                 {
+00111                     NewVertices=new CSpecificVertexList<video::S3DVertex2TCoords>;
+00112                     break;
+00113                 }
+00114                 case video::EVT_TANGENTS:
+00115                 {
+00116                     NewVertices=new CSpecificVertexList<video::S3DVertexTangents>;
+00117                     break;
+00118                 }
+00119             }
+00120             if (Vertices)
+00121             {
+00122                 NewVertices->reallocate( Vertices->size() );
+00123 
+00124                 for(u32 n=0;n<Vertices->size();++n)
+00125                     NewVertices->push_back((*Vertices)[n]);
+00126 
+00127                 delete Vertices;
+00128             }
+00129 
+00130             Vertices=NewVertices;
+00131         }
+00132 
+00133         virtual void* getData() {return Vertices->pointer();}
+00134 
+00135         virtual video::E_VERTEX_TYPE getType() const {return Vertices->getType();}
+00136 
+00137         virtual u32 stride() const {return Vertices->stride();}
+00138 
+00139         virtual u32 size() const
+00140         {
+00141             return Vertices->size();
+00142         }
+00143 
+00144         virtual void push_back (const video::S3DVertex &element)
+00145         {
+00146             Vertices->push_back(element);
+00147         }
+00148 
+00149         virtual video::S3DVertex& operator [](const u32 index) const
+00150         {
+00151             return (*Vertices)[index];
+00152         }
+00153 
+00154         virtual video::S3DVertex& getLast()
+00155         {
+00156             return Vertices->getLast();
+00157         }
+00158 
+00159         virtual void set_used(u32 usedNow)
+00160         {
+00161             Vertices->set_used(usedNow);
+00162         }
+00163 
+00164         virtual void reallocate(u32 new_size)
+00165         {
+00166             Vertices->reallocate(new_size);
+00167         }
+00168 
+00169         virtual u32 allocated_size() const
+00170         {
+00171             return Vertices->allocated_size();
+00172         }
+00173 
+00174         virtual video::S3DVertex* pointer()
+00175         {
+00176             return Vertices->pointer();
+00177         }
+00178 
+00180         virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
+00181         {
+00182             return MappingHint;
+00183         }
+00184 
+00186         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
+00187         {
+00188             MappingHint=NewMappingHint;
+00189         }
+00190 
+00192         virtual void setDirty()
+00193         {
+00194             ++ChangedID;
+00195         }
+00196 
+00198 
+00199         virtual u32 getChangedID() const {return ChangedID;}
+00200 
+00201         E_HARDWARE_MAPPING MappingHint;
+00202         u32 ChangedID;
+00203     };
+00204 
+00205 
+00206 } // end namespace scene
+00207 } // end namespace irr
+00208 
+00209 #endif
+00210 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h.html new file mode 100644 index 0000000..ca025b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: EAttributes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EAttributes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h_source.html new file mode 100644 index 0000000..a21c553 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_attributes_8h_source.html @@ -0,0 +1,220 @@ + + + + +Irrlicht 3D Engine: EAttributes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EAttributes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_ATTRIBUTES_H_INCLUDED__
+00006 #define __E_ATTRIBUTES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace io
+00011 {
+00012 
+00014 enum E_ATTRIBUTE_TYPE
+00015 {
+00016     // integer attribute
+00017     EAT_INT = 0,
+00018 
+00019     // float attribute
+00020     EAT_FLOAT,
+00021 
+00022     // string attribute
+00023     EAT_STRING,
+00024 
+00025     // boolean attribute
+00026     EAT_BOOL,
+00027 
+00028     // enumeration attribute
+00029     EAT_ENUM,
+00030 
+00031     // color attribute
+00032     EAT_COLOR,
+00033 
+00034     // floating point color attribute
+00035     EAT_COLORF,
+00036 
+00037     // 3d vector attribute
+00038     EAT_VECTOR3D,
+00039 
+00040     // 2d position attribute
+00041     EAT_POSITION2D,
+00042 
+00043     // vector 2d attribute
+00044     EAT_VECTOR2D,
+00045 
+00046     // rectangle attribute
+00047     EAT_RECT,
+00048 
+00049     // matrix attribute
+00050     EAT_MATRIX,
+00051 
+00052     // quaternion attribute
+00053     EAT_QUATERNION,
+00054 
+00055     // 3d bounding box
+00056     EAT_BBOX,
+00057 
+00058     // plane
+00059     EAT_PLANE,
+00060 
+00061     // 3d triangle
+00062     EAT_TRIANGLE3D,
+00063 
+00064     // line 2d
+00065     EAT_LINE2D,
+00066 
+00067     // line 3d
+00068     EAT_LINE3D,
+00069 
+00070     // array of stringws attribute
+00071     EAT_STRINGWARRAY,
+00072 
+00073     // array of float
+00074     EAT_FLOATARRAY,
+00075 
+00076     // array of int
+00077     EAT_INTARRAY,
+00078 
+00079     // binary data attribute
+00080     EAT_BINARY,
+00081 
+00082     // texture reference attribute
+00083     EAT_TEXTURE,
+00084 
+00085     // user pointer void*
+00086     EAT_USER_POINTER,
+00087 
+00088     // dimension attribute
+00089     EAT_DIMENSION2D,
+00090 
+00091     // known attribute type count
+00092     EAT_COUNT,
+00093 
+00094     // unknown attribute
+00095     EAT_UNKNOWN
+00096 };
+00097 
+00098 } // end namespace io
+00099 } // end namespace irr
+00100 
+00101 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h.html new file mode 100644 index 0000000..e3d3ff9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: ECullingTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ECullingTypes.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h_source.html new file mode 100644 index 0000000..b51c8f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_culling_types_8h_source.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: ECullingTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ECullingTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_CULLING_TYPES_H_INCLUDED__
+00006 #define __E_CULLING_TYPES_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016     enum E_CULLING_TYPE
+00017     {
+00018         EAC_OFF = 0,
+00019         EAC_BOX = 1,
+00020         EAC_FRUSTUM_BOX = 2,
+00021         EAC_FRUSTUM_SPHERE = 4,
+00022         EAC_OCC_QUERY = 8
+00023     };
+00024 
+00026     const c8* const AutomaticCullingNames[] =
+00027     {
+00028         "false",
+00029         "box",          // camera box against node box
+00030         "frustum_box",      // camera frustum against node box
+00031         "frustum_sphere",   // camera frustum against node sphere
+00032         "occ_query",    // occlusion query
+00033         0
+00034     };
+00035 
+00036 } // end namespace scene
+00037 } // end namespace irr
+00038 
+00039 
+00040 #endif // __E_CULLING_TYPES_H_INCLUDED__
+00041 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h.html new file mode 100644 index 0000000..1c97ad0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h.html @@ -0,0 +1,151 @@ + + + + +Irrlicht 3D Engine: EDebugSceneTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EDebugSceneTypes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h_source.html new file mode 100644 index 0000000..7c634f7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_debug_scene_types_8h_source.html @@ -0,0 +1,160 @@ + + + + +Irrlicht 3D Engine: EDebugSceneTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EDebugSceneTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_DEBUG_SCENE_TYPES_H_INCLUDED__
+00006 #define __E_DEBUG_SCENE_TYPES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace scene
+00011 {
+00012 
+00014     enum E_DEBUG_SCENE_TYPE
+00015     {
+00017         EDS_OFF = 0,
+00018 
+00020         EDS_BBOX = 1,
+00021 
+00023         EDS_NORMALS = 2,
+00024 
+00026         EDS_SKELETON = 4,
+00027 
+00029         EDS_MESH_WIRE_OVERLAY = 8,
+00030 
+00032         EDS_HALF_TRANSPARENCY = 16,
+00033 
+00035         EDS_BBOX_BUFFERS = 32,
+00036 
+00038         EDS_BBOX_ALL = EDS_BBOX | EDS_BBOX_BUFFERS,
+00039 
+00041         EDS_FULL = 0xffffffff
+00042     };
+00043 
+00044 
+00045 } // end namespace scene
+00046 } // end namespace irr
+00047 
+00048 
+00049 #endif // __E_DEBUG_SCENE_TYPES_H_INCLUDED__
+00050 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h.html new file mode 100644 index 0000000..ebc8413 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h.html @@ -0,0 +1,147 @@ + + + + +Irrlicht 3D Engine: EDeviceTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EDeviceTypes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h_source.html new file mode 100644 index 0000000..2544fc2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_device_types_8h_source.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: EDeviceTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EDeviceTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_DEVICE_TYPES_H_INCLUDED__
+00006 #define __E_DEVICE_TYPES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 
+00012     enum E_DEVICE_TYPE
+00013     {
+00014 
+00016 
+00017         EIDT_WIN32,
+00018 
+00020 
+00021         EIDT_WINCE,
+00022 
+00024 
+00026         EIDT_X11,
+00027 
+00029 
+00030         EIDT_OSX,
+00031 
+00033 
+00035         EIDT_SDL,
+00036 
+00038 
+00041         EIDT_FRAMEBUFFER,
+00042 
+00044 
+00047         EIDT_CONSOLE,
+00048 
+00050 
+00054         EIDT_BEST
+00055     };
+00056 
+00057 } // end namespace irr
+00058 
+00059 #endif // __E_DEVICE_TYPES_H_INCLUDED__
+00060 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h.html new file mode 100644 index 0000000..ac8bd58 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h.html @@ -0,0 +1,186 @@ + + + + +Irrlicht 3D Engine: EDriverFeatures.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EDriverFeatures.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h_source.html new file mode 100644 index 0000000..bcc01e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_driver_features_8h_source.html @@ -0,0 +1,215 @@ + + + + +Irrlicht 3D Engine: EDriverFeatures.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EDriverFeatures.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_DRIVER_FEATURES_H_INCLUDED__
+00006 #define __E_DRIVER_FEATURES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace video
+00011 {
+00012 
+00014     enum E_VIDEO_DRIVER_FEATURE
+00015     {
+00017         EVDF_RENDER_TO_TARGET = 0,
+00018 
+00020         EVDF_HARDWARE_TL,
+00021 
+00023         EVDF_MULTITEXTURE,
+00024 
+00026         EVDF_BILINEAR_FILTER,
+00027 
+00029         EVDF_MIP_MAP,
+00030 
+00032         EVDF_MIP_MAP_AUTO_UPDATE,
+00033 
+00035         EVDF_STENCIL_BUFFER,
+00036 
+00038         EVDF_VERTEX_SHADER_1_1,
+00039 
+00041         EVDF_VERTEX_SHADER_2_0,
+00042 
+00044         EVDF_VERTEX_SHADER_3_0,
+00045 
+00047         EVDF_PIXEL_SHADER_1_1,
+00048 
+00050         EVDF_PIXEL_SHADER_1_2,
+00051 
+00053         EVDF_PIXEL_SHADER_1_3,
+00054 
+00056         EVDF_PIXEL_SHADER_1_4,
+00057 
+00059         EVDF_PIXEL_SHADER_2_0,
+00060 
+00062         EVDF_PIXEL_SHADER_3_0,
+00063 
+00065         EVDF_ARB_VERTEX_PROGRAM_1,
+00066 
+00068         EVDF_ARB_FRAGMENT_PROGRAM_1,
+00069 
+00071         EVDF_ARB_GLSL,
+00072 
+00074         EVDF_HLSL,
+00075 
+00077         EVDF_TEXTURE_NSQUARE,
+00078 
+00080         EVDF_TEXTURE_NPOT,
+00081 
+00083         EVDF_FRAMEBUFFER_OBJECT,
+00084 
+00086         EVDF_VERTEX_BUFFER_OBJECT,
+00087 
+00089         EVDF_ALPHA_TO_COVERAGE,
+00090 
+00092         EVDF_COLOR_MASK,
+00093 
+00095         EVDF_MULTIPLE_RENDER_TARGETS,
+00096 
+00098         EVDF_MRT_BLEND,
+00099 
+00101         EVDF_MRT_COLOR_MASK,
+00102 
+00104         EVDF_MRT_BLEND_FUNC,
+00105 
+00107         EVDF_GEOMETRY_SHADER,
+00108 
+00110         EVDF_OCCLUSION_QUERY,
+00111 
+00113         EVDF_POLYGON_OFFSET,
+00114 
+00116         EVDF_BLEND_OPERATIONS,
+00117 
+00119         EVDF_TEXTURE_MATRIX,
+00120 
+00122         EVDF_CG,
+00123 
+00125         EVDF_COUNT
+00126     };
+00127 
+00128 } // end namespace video
+00129 } // end namespace irr
+00130 
+00131 
+00132 #endif
+00133 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h.html new file mode 100644 index 0000000..5bf9e8d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: EDriverTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EDriverTypes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h_source.html new file mode 100644 index 0000000..f46178c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_driver_types_8h_source.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: EDriverTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EDriverTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_DRIVER_TYPES_H_INCLUDED__
+00006 #define __E_DRIVER_TYPES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace video
+00011 {
+00012 
+00014     enum E_DRIVER_TYPE
+00015     {
+00017 
+00019         EDT_NULL,
+00020 
+00022 
+00026         EDT_SOFTWARE,
+00027 
+00029 
+00038         EDT_BURNINGSVIDEO,
+00039 
+00041 
+00043         EDT_DIRECT3D8,
+00044 
+00046 
+00048         EDT_DIRECT3D9,
+00049 
+00051 
+00053         EDT_OPENGL,
+00054 
+00056         EDT_COUNT
+00057     };
+00058 
+00059 } // end namespace video
+00060 } // end namespace irr
+00061 
+00062 
+00063 #endif
+00064 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h.html new file mode 100644 index 0000000..49138c9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: EGUIAlignment.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EGUIAlignment.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h_source.html new file mode 100644 index 0000000..cebe587 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_alignment_8h_source.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: EGUIAlignment.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EGUIAlignment.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_GUI_ALIGNMENT_H_INCLUDED__
+00006 #define __E_GUI_ALIGNMENT_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace gui
+00011 {
+00012 enum EGUI_ALIGNMENT
+00013 {
+00015     EGUIA_UPPERLEFT=0,
+00017     EGUIA_LOWERRIGHT,
+00019     EGUIA_CENTER,
+00021     EGUIA_SCALE
+00022 };
+00023 
+00025 const c8* const GUIAlignmentNames[] =
+00026 {
+00027     "upperLeft",
+00028     "lowerRight",
+00029     "center",
+00030     "scale",
+00031     0
+00032 };
+00033 
+00034 } // namespace gui
+00035 } // namespace irr
+00036 
+00037 #endif // __E_GUI_ALIGNMENT_H_INCLUDED__
+00038 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h.html new file mode 100644 index 0000000..1d51e18 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h.html @@ -0,0 +1,180 @@ + + + + +Irrlicht 3D Engine: EGUIElementTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h_source.html new file mode 100644 index 0000000..0fcd9af --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_g_u_i_element_types_8h_source.html @@ -0,0 +1,231 @@ + + + + +Irrlicht 3D Engine: EGUIElementTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EGUIElementTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_GUI_ELEMENT_TYPES_H_INCLUDED__
+00006 #define __E_GUI_ELEMENT_TYPES_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014 
+00016 
+00017 enum EGUI_ELEMENT_TYPE
+00018 {
+00020     EGUIET_BUTTON = 0,
+00021 
+00023     EGUIET_CHECK_BOX,
+00024 
+00026     EGUIET_COMBO_BOX,
+00027 
+00029     EGUIET_CONTEXT_MENU,
+00030 
+00032     EGUIET_MENU,
+00033 
+00035     EGUIET_EDIT_BOX,
+00036 
+00038     EGUIET_FILE_OPEN_DIALOG,
+00039 
+00041     EGUIET_COLOR_SELECT_DIALOG,
+00042 
+00044     EGUIET_IN_OUT_FADER,
+00045 
+00047     EGUIET_IMAGE,
+00048 
+00050     EGUIET_LIST_BOX,
+00051 
+00053     EGUIET_MESH_VIEWER,
+00054 
+00056     EGUIET_MESSAGE_BOX,
+00057 
+00059     EGUIET_MODAL_SCREEN,
+00060 
+00062     EGUIET_SCROLL_BAR,
+00063 
+00065     EGUIET_SPIN_BOX,
+00066 
+00068     EGUIET_STATIC_TEXT,
+00069 
+00071     EGUIET_TAB,
+00072 
+00074     EGUIET_TAB_CONTROL,
+00075 
+00077     EGUIET_TABLE,
+00078 
+00080     EGUIET_TOOL_BAR,
+00081 
+00083     EGUIET_TREE_VIEW,
+00084 
+00086     EGUIET_WINDOW,
+00087 
+00089     EGUIET_ELEMENT,
+00090 
+00092     EGUIET_ROOT,
+00093 
+00095     EGUIET_COUNT,
+00096 
+00098     EGUIET_FORCE_32_BIT = 0x7fffffff
+00099 
+00100 };
+00101 
+00103 const c8* const GUIElementTypeNames[] =
+00104 {
+00105     "button",
+00106     "checkBox",
+00107     "comboBox",
+00108     "contextMenu",
+00109     "menu",
+00110     "editBox",
+00111     "fileOpenDialog",
+00112     "colorSelectDialog",
+00113     "inOutFader",
+00114     "image",
+00115     "listBox",
+00116     "meshViewer",
+00117     "messageBox",
+00118     "modalScreen",
+00119     "scrollBar",
+00120     "spinBox",
+00121     "staticText",
+00122     "tab",
+00123     "tabControl",
+00124     "table",
+00125     "toolBar",
+00126     "treeview",
+00127     "window",
+00128     "element",
+00129     "root",
+00130     0
+00131 };
+00132 
+00133 } // end namespace gui
+00134 } // end namespace irr
+00135 
+00136 #endif
+00137 
+00138 
+00139 
+00140 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h.html new file mode 100644 index 0000000..cc9b81a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h.html @@ -0,0 +1,147 @@ + + + + +Irrlicht 3D Engine: EHardwareBufferFlags.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EHardwareBufferFlags.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h_source.html new file mode 100644 index 0000000..5a5ec95 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_hardware_buffer_flags_8h_source.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: EHardwareBufferFlags.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EHardwareBufferFlags.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_HARDWARE_BUFFER_FLAGS_INCLUDED__
+00006 #define __E_HARDWARE_BUFFER_FLAGS_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace scene
+00011 {
+00012 
+00013     enum E_HARDWARE_MAPPING
+00014     {
+00016         EHM_NEVER=0,
+00017 
+00019         EHM_STATIC,
+00020 
+00022         EHM_DYNAMIC,
+00023 
+00025         EHM_STREAM
+00026     };
+00027 
+00028     enum E_BUFFER_TYPE
+00029     {
+00031         EBT_NONE=0,
+00033         EBT_VERTEX,
+00035         EBT_INDEX,
+00037         EBT_VERTEX_AND_INDEX
+00038     };
+00039 
+00040 } // end namespace scene
+00041 } // end namespace irr
+00042 
+00043 #endif
+00044 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h.html new file mode 100644 index 0000000..0f38409 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: EMaterialFlags.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EMaterialFlags.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h_source.html new file mode 100644 index 0000000..cd591f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_material_flags_8h_source.html @@ -0,0 +1,186 @@ + + + + +Irrlicht 3D Engine: EMaterialFlags.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EMaterialFlags.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_MATERIAL_FLAGS_H_INCLUDED__
+00006 #define __E_MATERIAL_FLAGS_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace video
+00011 {
+00012 
+00014     enum E_MATERIAL_FLAG
+00015     {
+00017         EMF_WIREFRAME = 0x1,
+00018 
+00020         EMF_POINTCLOUD = 0x2,
+00021 
+00023         EMF_GOURAUD_SHADING = 0x4,
+00024 
+00026         EMF_LIGHTING = 0x8,
+00027 
+00029         EMF_ZBUFFER = 0x10,
+00030 
+00032 
+00033         EMF_ZWRITE_ENABLE = 0x20,
+00034 
+00036         EMF_BACK_FACE_CULLING = 0x40,
+00037 
+00039 
+00040         EMF_FRONT_FACE_CULLING = 0x80,
+00041 
+00043         EMF_BILINEAR_FILTER = 0x100,
+00044 
+00046 
+00048         EMF_TRILINEAR_FILTER = 0x200,
+00049 
+00051 
+00055         EMF_ANISOTROPIC_FILTER = 0x400,
+00056 
+00058         EMF_FOG_ENABLE = 0x800,
+00059 
+00061 
+00066         EMF_NORMALIZE_NORMALS = 0x1000,
+00067 
+00069         EMF_TEXTURE_WRAP = 0x2000,
+00070 
+00072         EMF_ANTI_ALIASING = 0x4000,
+00073 
+00075         EMF_COLOR_MASK = 0x8000,
+00076 
+00078         EMF_COLOR_MATERIAL = 0x10000,
+00079 
+00081         EMF_USE_MIP_MAPS = 0x20000,
+00082 
+00084         EMF_BLEND_OPERATION = 0x40000,
+00085 
+00087         EMF_POLYGON_OFFSET = 0x80000
+00088     };
+00089 
+00090 } // end namespace video
+00091 } // end namespace irr
+00092 
+00093 
+00094 #endif // __E_MATERIAL_FLAGS_H_INCLUDED__
+00095 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h.html new file mode 100644 index 0000000..cc45789 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: EMaterialTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EMaterialTypes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h_source.html new file mode 100644 index 0000000..c000bd0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_material_types_8h_source.html @@ -0,0 +1,240 @@ + + + + +Irrlicht 3D Engine: EMaterialTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EMaterialTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_MATERIAL_TYPES_H_INCLUDED__
+00006 #define __E_MATERIAL_TYPES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace video
+00011 {
+00012 
+00014     enum E_MATERIAL_TYPE
+00015     {
+00017 
+00019         EMT_SOLID = 0,
+00020 
+00022 
+00025         EMT_SOLID_2_LAYER,
+00026 
+00028 
+00031         EMT_LIGHTMAP,
+00032 
+00034 
+00035         EMT_LIGHTMAP_ADD,
+00036 
+00038 
+00042         EMT_LIGHTMAP_M2,
+00043 
+00045 
+00049         EMT_LIGHTMAP_M4,
+00050 
+00052         EMT_LIGHTMAP_LIGHTING,
+00053 
+00055         EMT_LIGHTMAP_LIGHTING_M2,
+00056 
+00058         EMT_LIGHTMAP_LIGHTING_M4,
+00059 
+00061 
+00068         EMT_DETAIL_MAP,
+00069 
+00071 
+00073         EMT_SPHERE_MAP,
+00074 
+00076 
+00077         EMT_REFLECTION_2_LAYER,
+00078 
+00080 
+00088         EMT_TRANSPARENT_ADD_COLOR,
+00089 
+00091 
+00101         EMT_TRANSPARENT_ALPHA_CHANNEL,
+00102 
+00104 
+00113         EMT_TRANSPARENT_ALPHA_CHANNEL_REF,
+00114 
+00116         EMT_TRANSPARENT_VERTEX_ALPHA,
+00117 
+00119 
+00124         EMT_TRANSPARENT_REFLECTION_2_LAYER,
+00125 
+00127 
+00137         EMT_NORMAL_MAP_SOLID,
+00138 
+00140 
+00150         EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR,
+00151 
+00153 
+00163         EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA,
+00164 
+00166 
+00181         EMT_PARALLAX_MAP_SOLID,
+00182 
+00184 
+00185         EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR,
+00186 
+00188 
+00189         EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA,
+00190 
+00192 
+00193         EMT_ONETEXTURE_BLEND,
+00194 
+00196         EMT_FORCE_32BIT = 0x7fffffff
+00197     };
+00198 
+00200     const char* const sBuiltInMaterialTypeNames[] =
+00201     {
+00202         "solid",
+00203         "solid_2layer",
+00204         "lightmap",
+00205         "lightmap_add",
+00206         "lightmap_m2",
+00207         "lightmap_m4",
+00208         "lightmap_light",
+00209         "lightmap_light_m2",
+00210         "lightmap_light_m4",
+00211         "detail_map",
+00212         "sphere_map",
+00213         "reflection_2layer",
+00214         "trans_add",
+00215         "trans_alphach",
+00216         "trans_alphach_ref",
+00217         "trans_vertex_alpha",
+00218         "trans_reflection_2layer",
+00219         "normalmap_solid",
+00220         "normalmap_trans_add",
+00221         "normalmap_trans_vertexalpha",
+00222         "parallaxmap_solid",
+00223         "parallaxmap_trans_add",
+00224         "parallaxmap_trans_vertexalpha",
+00225         "onetexture_blend",
+00226         0
+00227     };
+00228 
+00229 } // end namespace video
+00230 } // end namespace irr
+00231 
+00232 
+00233 #endif // __E_MATERIAL_TYPES_H_INCLUDED__
+00234 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h.html new file mode 100644 index 0000000..2ed0041 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: EMeshWriterEnums.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EMeshWriterEnums.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h_source.html new file mode 100644 index 0000000..62602b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_mesh_writer_enums_8h_source.html @@ -0,0 +1,166 @@ + + + + +Irrlicht 3D Engine: EMeshWriterEnums.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EMeshWriterEnums.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_MESH_WRITER_ENUMS_H_INCLUDED__
+00006 #define __E_MESH_WRITER_ENUMS_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 
+00019     enum EMESH_WRITER_TYPE
+00020     {
+00022         EMWT_IRR_MESH     = MAKE_IRR_ID('i','r','r','m'),
+00023 
+00025         EMWT_COLLADA      = MAKE_IRR_ID('c','o','l','l'),
+00026 
+00028         EMWT_STL          = MAKE_IRR_ID('s','t','l',0),
+00029 
+00031         EMWT_OBJ          = MAKE_IRR_ID('o','b','j',0),
+00032 
+00034         EMWT_PLY          = MAKE_IRR_ID('p','l','y',0)
+00035     };
+00036 
+00037 
+00039     enum E_MESH_WRITER_FLAGS
+00040     {
+00042         EMWF_NONE = 0,
+00043 
+00045         EMWF_WRITE_LIGHTMAPS = 0x1,
+00046 
+00048         EMWF_WRITE_COMPRESSED = 0x2,
+00049 
+00051         EMWF_WRITE_BINARY = 0x4
+00052     };
+00053 
+00054 } // end namespace scene
+00055 } // end namespace irr
+00056 
+00057 
+00058 #endif // __E_MESH_WRITER_ENUMS_H_INCLUDED__
+00059 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h.html new file mode 100644 index 0000000..b6bbe96 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: EMessageBoxFlags.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EMessageBoxFlags.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h_source.html new file mode 100644 index 0000000..f9db7af --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_message_box_flags_8h_source.html @@ -0,0 +1,150 @@ + + + + +Irrlicht 3D Engine: EMessageBoxFlags.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EMessageBoxFlags.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_MESSAGE_BOX_FLAGS_H_INCLUDED__
+00006 #define __E_MESSAGE_BOX_FLAGS_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace gui
+00011 {
+00012 
+00014 enum EMESSAGE_BOX_FLAG
+00015 {
+00017     EMBF_OK = 0x1,
+00018 
+00020     EMBF_CANCEL = 0x2,
+00021 
+00023     EMBF_YES = 0x4,
+00024 
+00026     EMBF_NO = 0x8,
+00027 
+00029     EMBF_FORCE_32BIT = 0x7fffffff
+00030 };
+00031 
+00032 } // namespace gui
+00033 } // namespace irr
+00034 
+00035 #endif
+00036 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h.html new file mode 100644 index 0000000..8ac28b6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: EPrimitiveTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EPrimitiveTypes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h_source.html new file mode 100644 index 0000000..49ddf08 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_primitive_types_8h_source.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: EPrimitiveTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EPrimitiveTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_PRIMITIVE_TYPES_H_INCLUDED__
+00006 #define __E_PRIMITIVE_TYPES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace scene
+00011 {
+00012 
+00014     enum E_PRIMITIVE_TYPE
+00015     {
+00017         EPT_POINTS=0,
+00018 
+00020         EPT_LINE_STRIP,
+00021 
+00023         EPT_LINE_LOOP,
+00024 
+00026         EPT_LINES,
+00027 
+00030         EPT_TRIANGLE_STRIP,
+00031 
+00034         EPT_TRIANGLE_FAN,
+00035 
+00037         EPT_TRIANGLES,
+00038 
+00040         EPT_QUAD_STRIP,
+00041 
+00043         EPT_QUADS,
+00044 
+00046         EPT_POLYGON,
+00047 
+00049         EPT_POINT_SPRITES
+00050     };
+00051 
+00052 } // end namespace scene
+00053 } // end namespace irr
+00054 
+00055 #endif
+00056 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h.html new file mode 100644 index 0000000..007e950 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: ESceneNodeAnimatorTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ESceneNodeAnimatorTypes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h_source.html new file mode 100644 index 0000000..6ab8843 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_animator_types_8h_source.html @@ -0,0 +1,165 @@ + + + + +Irrlicht 3D Engine: ESceneNodeAnimatorTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ESceneNodeAnimatorTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_SCENE_NODE_ANIMATOR_TYPES_H_INCLUDED__
+00006 #define __E_SCENE_NODE_ANIMATOR_TYPES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace scene
+00011 {
+00012 
+00014     enum ESCENE_NODE_ANIMATOR_TYPE
+00015     {
+00017         ESNAT_FLY_CIRCLE = 0,
+00018 
+00020         ESNAT_FLY_STRAIGHT,
+00021 
+00023         ESNAT_FOLLOW_SPLINE,
+00024 
+00026         ESNAT_ROTATION,
+00027 
+00029         ESNAT_TEXTURE,
+00030 
+00032         ESNAT_DELETION,
+00033 
+00035         ESNAT_COLLISION_RESPONSE,
+00036 
+00038         ESNAT_CAMERA_FPS,
+00039 
+00041         ESNAT_CAMERA_MAYA,
+00042 
+00044         ESNAT_COUNT,
+00045 
+00047         ESNAT_UNKNOWN,
+00048 
+00050         ESNAT_FORCE_32_BIT = 0x7fffffff
+00051     };
+00052 
+00053 } // end namespace scene
+00054 } // end namespace irr
+00055 
+00056 
+00057 #endif
+00058 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h.html new file mode 100644 index 0000000..ceb443d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h.html @@ -0,0 +1,172 @@ + + + + +Irrlicht 3D Engine: ESceneNodeTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ESceneNodeTypes.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h_source.html new file mode 100644 index 0000000..389cc5f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_scene_node_types_8h_source.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: ESceneNodeTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ESceneNodeTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_SCENE_NODE_TYPES_H_INCLUDED__
+00006 #define __E_SCENE_NODE_TYPES_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 
+00019     enum ESCENE_NODE_TYPE
+00020     {
+00022         ESNT_SCENE_MANAGER  = MAKE_IRR_ID('s','m','n','g'),
+00023 
+00025         ESNT_CUBE           = MAKE_IRR_ID('c','u','b','e'),
+00026 
+00028         ESNT_SPHERE         = MAKE_IRR_ID('s','p','h','r'),
+00029 
+00031         ESNT_TEXT           = MAKE_IRR_ID('t','e','x','t'),
+00032 
+00034         ESNT_WATER_SURFACE  = MAKE_IRR_ID('w','a','t','r'),
+00035 
+00037         ESNT_TERRAIN        = MAKE_IRR_ID('t','e','r','r'),
+00038 
+00040         ESNT_SKY_BOX        = MAKE_IRR_ID('s','k','y','_'),
+00041 
+00043         ESNT_SKY_DOME       = MAKE_IRR_ID('s','k','y','d'),
+00044 
+00046         ESNT_SHADOW_VOLUME  = MAKE_IRR_ID('s','h','d','w'),
+00047 
+00049         ESNT_OCTREE         = MAKE_IRR_ID('o','c','t','r'),
+00050 
+00052         ESNT_MESH           = MAKE_IRR_ID('m','e','s','h'),
+00053 
+00055         ESNT_LIGHT          = MAKE_IRR_ID('l','g','h','t'),
+00056 
+00058         ESNT_EMPTY          = MAKE_IRR_ID('e','m','t','y'),
+00059 
+00061         ESNT_DUMMY_TRANSFORMATION = MAKE_IRR_ID('d','m','m','y'),
+00062 
+00064         ESNT_CAMERA         = MAKE_IRR_ID('c','a','m','_'),
+00065 
+00067         ESNT_BILLBOARD      = MAKE_IRR_ID('b','i','l','l'),
+00068 
+00070         ESNT_ANIMATED_MESH  = MAKE_IRR_ID('a','m','s','h'),
+00071 
+00073         ESNT_PARTICLE_SYSTEM = MAKE_IRR_ID('p','t','c','l'),
+00074 
+00076         ESNT_Q3SHADER_SCENE_NODE  = MAKE_IRR_ID('q','3','s','h'),
+00077 
+00079         ESNT_MD3_SCENE_NODE  = MAKE_IRR_ID('m','d','3','_'),
+00080 
+00082         ESNT_VOLUME_LIGHT  = MAKE_IRR_ID('v','o','l','l'),
+00083 
+00085 
+00086         ESNT_CAMERA_MAYA    = MAKE_IRR_ID('c','a','m','M'),
+00087 
+00089 
+00090         ESNT_CAMERA_FPS     = MAKE_IRR_ID('c','a','m','F'),
+00091 
+00093         ESNT_UNKNOWN        = MAKE_IRR_ID('u','n','k','n'),
+00094 
+00096         ESNT_ANY            = MAKE_IRR_ID('a','n','y','_')
+00097     };
+00098 
+00099 
+00100 
+00101 } // end namespace scene
+00102 } // end namespace irr
+00103 
+00104 
+00105 #endif
+00106 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h.html new file mode 100644 index 0000000..c96265e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h.html @@ -0,0 +1,178 @@ + + + + +Irrlicht 3D Engine: EShaderTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
EShaderTypes.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h_source.html new file mode 100644 index 0000000..3be1443 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_shader_types_8h_source.html @@ -0,0 +1,201 @@ + + + + +Irrlicht 3D Engine: EShaderTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
EShaderTypes.h
+
+
+Go to the documentation of this file.
00001 #ifndef __E_SHADER_TYPES_H_INCLUDED__
+00002 #define __E_SHADER_TYPES_H_INCLUDED__
+00003 
+00004 #include "irrTypes.h"
+00005 
+00006 namespace irr
+00007 {
+00008 namespace video
+00009 {
+00010 
+00012 enum E_VERTEX_SHADER_TYPE
+00013 {
+00014     EVST_VS_1_1 = 0,
+00015     EVST_VS_2_0,
+00016     EVST_VS_2_a,
+00017     EVST_VS_3_0,
+00018     EVST_VS_4_0,
+00019     EVST_VS_4_1,
+00020     EVST_VS_5_0,
+00021 
+00023     EVST_COUNT
+00024 };
+00025 
+00027 const c8* const VERTEX_SHADER_TYPE_NAMES[] = {
+00028     "vs_1_1",
+00029     "vs_2_0",
+00030     "vs_2_a",
+00031     "vs_3_0",
+00032     "vs_4_0",
+00033     "vs_4_1",
+00034     "vs_5_0",
+00035     0 };
+00036 
+00038 enum E_PIXEL_SHADER_TYPE
+00039 {
+00040     EPST_PS_1_1 = 0,
+00041     EPST_PS_1_2,
+00042     EPST_PS_1_3,
+00043     EPST_PS_1_4,
+00044     EPST_PS_2_0,
+00045     EPST_PS_2_a,
+00046     EPST_PS_2_b,
+00047     EPST_PS_3_0,
+00048     EPST_PS_4_0,
+00049     EPST_PS_4_1,
+00050     EPST_PS_5_0,
+00051 
+00053     EPST_COUNT
+00054 };
+00055 
+00057 const c8* const PIXEL_SHADER_TYPE_NAMES[] = {
+00058     "ps_1_1",
+00059     "ps_1_2",
+00060     "ps_1_3",
+00061     "ps_1_4",
+00062     "ps_2_0",
+00063     "ps_2_a",
+00064     "ps_2_b",
+00065     "ps_3_0",
+00066     "ps_4_0",
+00067     "ps_4_1",
+00068     "ps_5_0",
+00069     0 };
+00070 
+00072 enum E_GEOMETRY_SHADER_TYPE
+00073 {
+00074     EGST_GS_4_0 = 0,
+00075 
+00077     EGST_COUNT
+00078 };
+00079 
+00081 const c8* const GEOMETRY_SHADER_TYPE_NAMES[] = {
+00082     "gs_4_0",
+00083     0 };
+00084 
+00085 
+00086 } // end namespace video
+00087 } // end namespace irr
+00088 
+00089 #endif // __E_SHADER_TYPES_H_INCLUDED__
+00090 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h.html b/src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h.html new file mode 100644 index 0000000..534f37b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: ETerrainElements.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ETerrainElements.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h_source.html new file mode 100644 index 0000000..3f2a45c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_e_terrain_elements_8h_source.html @@ -0,0 +1,150 @@ + + + + +Irrlicht 3D Engine: ETerrainElements.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ETerrainElements.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_TERRAIN_ELEMENTS_H__
+00006 #define __E_TERRAIN_ELEMENTS_H__
+00007 
+00008 namespace irr
+00009 {
+00010 namespace scene
+00011 {
+00012 
+00014     enum E_TERRAIN_PATCH_SIZE
+00015     {
+00017         ETPS_9 = 9,
+00018 
+00020         ETPS_17 = 17,
+00021 
+00023         ETPS_33 = 33,
+00024 
+00026         ETPS_65 = 65,
+00027 
+00029         ETPS_129 = 129
+00030     };
+00031 
+00032 } // end namespace scene
+00033 } // end namespace irr
+00034 
+00035 #endif
+00036 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h.html new file mode 100644 index 0000000..54c83c5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: IAnimatedMesh.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IAnimatedMesh.h File Reference
+
+
+
#include "aabbox3d.h"
+#include "IMesh.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h_source.html new file mode 100644 index 0000000..7e81ddc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_8h_source.html @@ -0,0 +1,191 @@ + + + + +Irrlicht 3D Engine: IAnimatedMesh.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IAnimatedMesh.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_ANIMATED_MESH_H_INCLUDED__
+00006 #define __I_ANIMATED_MESH_H_INCLUDED__
+00007 
+00008 #include "aabbox3d.h"
+00009 #include "IMesh.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00016     enum E_ANIMATED_MESH_TYPE
+00017     {
+00019         EAMT_UNKNOWN = 0,
+00020 
+00022         EAMT_MD2,
+00023 
+00025         EAMT_MD3,
+00026 
+00028         EAMT_OBJ,
+00029 
+00031         EAMT_BSP,
+00032 
+00034         EAMT_3DS,
+00035 
+00037         EAMT_MY3D,
+00038 
+00040         EAMT_LMTS,
+00041 
+00043         EAMT_CSM,
+00044 
+00046 
+00048         EAMT_OCT,
+00049 
+00051         EAMT_MDL_HALFLIFE,
+00052 
+00054         EAMT_SKINNED
+00055     };
+00056 
+00058 
+00062     class IAnimatedMesh : public IMesh
+00063     {
+00064     public:
+00065 
+00067 
+00069         virtual u32 getFrameCount() const = 0;
+00070 
+00072 
+00075         virtual f32 getAnimationSpeed() const = 0;
+00076 
+00078 
+00082         virtual void setAnimationSpeed(f32 fps) =0;
+00083 
+00085 
+00097         virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0;
+00098 
+00100 
+00105         virtual E_ANIMATED_MESH_TYPE getMeshType() const
+00106         {
+00107             return EAMT_UNKNOWN;
+00108         }
+00109     };
+00110 
+00111 } // end namespace scene
+00112 } // end namespace irr
+00113 
+00114 #endif
+00115 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h.html new file mode 100644 index 0000000..19d3309 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h.html @@ -0,0 +1,174 @@ + + + + +Irrlicht 3D Engine: IAnimatedMeshMD2.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IAnimatedMeshMD2.h File Reference
+
+
+
#include "IAnimatedMesh.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h_source.html new file mode 100644 index 0000000..312589e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d2_8h_source.html @@ -0,0 +1,184 @@ + + + + +Irrlicht 3D Engine: IAnimatedMeshMD2.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IAnimatedMeshMD2.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_ANIMATED_MESH_MD2_H_INCLUDED__
+00006 #define __I_ANIMATED_MESH_MD2_H_INCLUDED__
+00007 
+00008 #include "IAnimatedMesh.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016     enum EMD2_ANIMATION_TYPE
+00017     {
+00018         EMAT_STAND = 0,
+00019         EMAT_RUN,
+00020         EMAT_ATTACK,
+00021         EMAT_PAIN_A,
+00022         EMAT_PAIN_B,
+00023         EMAT_PAIN_C,
+00024         EMAT_JUMP,
+00025         EMAT_FLIP,
+00026         EMAT_SALUTE,
+00027         EMAT_FALLBACK,
+00028         EMAT_WAVE,
+00029         EMAT_POINT,
+00030         EMAT_CROUCH_STAND,
+00031         EMAT_CROUCH_WALK,
+00032         EMAT_CROUCH_ATTACK,
+00033         EMAT_CROUCH_PAIN,
+00034         EMAT_CROUCH_DEATH,
+00035         EMAT_DEATH_FALLBACK,
+00036         EMAT_DEATH_FALLFORWARD,
+00037         EMAT_DEATH_FALLBACKSLOW,
+00038         EMAT_BOOM,
+00039 
+00041         EMAT_COUNT
+00042     };
+00043 
+00045     class IAnimatedMeshMD2 : public IAnimatedMesh
+00046     {
+00047     public:
+00048 
+00050 
+00055         virtual void getFrameLoop(EMD2_ANIMATION_TYPE l, s32& outBegin,
+00056             s32& outEnd, s32& outFPS) const = 0;
+00057 
+00059 
+00064         virtual bool getFrameLoop(const c8* name,
+00065             s32& outBegin, s32& outEnd, s32& outFPS) const = 0;
+00066 
+00068         virtual s32 getAnimationCount() const = 0;
+00069 
+00071 
+00072         virtual const c8* getAnimationName(s32 nr) const = 0;
+00073     };
+00074 
+00075 } // end namespace scene
+00076 } // end namespace irr
+00077 
+00078 #endif
+00079 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h.html new file mode 100644 index 0000000..b046f5b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h.html @@ -0,0 +1,208 @@ + + + + +Irrlicht 3D Engine: IAnimatedMeshMD3.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IAnimatedMeshMD3.h File Reference
+
+
+
#include "IAnimatedMesh.h"
+#include "IQ3Shader.h"
+#include "quaternion.h"
+#include "irrpack.h"
+#include "irrunpack.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h_source.html new file mode 100644 index 0000000..47dc4e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_m_d3_8h_source.html @@ -0,0 +1,405 @@ + + + + +Irrlicht 3D Engine: IAnimatedMeshMD3.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IAnimatedMeshMD3.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2007-2012 Nikolaus Gebhardt / Thomas Alten
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_ANIMATED_MESH_MD3_H_INCLUDED__
+00006 #define __I_ANIMATED_MESH_MD3_H_INCLUDED__
+00007 
+00008 #include "IAnimatedMesh.h"
+00009 #include "IQ3Shader.h"
+00010 #include "quaternion.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016 
+00017     enum eMD3Models
+00018     {
+00019         EMD3_HEAD = 0,
+00020         EMD3_UPPER,
+00021         EMD3_LOWER,
+00022         EMD3_WEAPON,
+00023         EMD3_NUMMODELS
+00024     };
+00025 
+00027     enum EMD3_ANIMATION_TYPE
+00028     {
+00029         // Animations for both lower and upper parts of the player
+00030         EMD3_BOTH_DEATH_1 = 0,
+00031         EMD3_BOTH_DEAD_1,
+00032         EMD3_BOTH_DEATH_2,
+00033         EMD3_BOTH_DEAD_2,
+00034         EMD3_BOTH_DEATH_3,
+00035         EMD3_BOTH_DEAD_3,
+00036 
+00037         // Animations for the upper part
+00038         EMD3_TORSO_GESTURE,
+00039         EMD3_TORSO_ATTACK_1,
+00040         EMD3_TORSO_ATTACK_2,
+00041         EMD3_TORSO_DROP,
+00042         EMD3_TORSO_RAISE,
+00043         EMD3_TORSO_STAND_1,
+00044         EMD3_TORSO_STAND_2,
+00045 
+00046         // Animations for the lower part
+00047         EMD3_LEGS_WALK_CROUCH,
+00048         EMD3_LEGS_WALK,
+00049         EMD3_LEGS_RUN,
+00050         EMD3_LEGS_BACK,
+00051         EMD3_LEGS_SWIM,
+00052         EMD3_LEGS_JUMP_1,
+00053         EMD3_LEGS_LAND_1,
+00054         EMD3_LEGS_JUMP_2,
+00055         EMD3_LEGS_LAND_2,
+00056         EMD3_LEGS_IDLE,
+00057         EMD3_LEGS_IDLE_CROUCH,
+00058         EMD3_LEGS_TURN,
+00059 
+00061         EMD3_ANIMATION_COUNT
+00062     };
+00063 
+00064     struct SMD3AnimationInfo
+00065     {
+00067         s32 first;
+00069         s32 num;
+00071         s32 looping;
+00073         s32 fps;
+00074     };
+00075 
+00076 
+00077 // byte-align structures
+00078 #include "irrpack.h"
+00079 
+00081     struct SMD3Header
+00082     {
+00083         c8  headerID[4];    //id of file, always "IDP3"
+00084         s32 Version;    //this is a version number, always 15
+00085         s8  fileName[68];   //sometimes left Blank... 65 chars, 32bit aligned == 68 chars
+00086         s32 numFrames;  //number of KeyFrames
+00087         s32 numTags;    //number of 'tags' per frame
+00088         s32 numMeshes;  //number of meshes/skins
+00089         s32 numMaxSkins;    //maximum number of unique skins used in md3 file. artefact md2
+00090         s32 frameStart; //starting position of frame-structur
+00091         s32 tagStart;   //starting position of tag-structures
+00092         s32 tagEnd;     //ending position of tag-structures/starting position of mesh-structures
+00093         s32 fileSize;
+00094     } PACK_STRUCT;
+00095 
+00097     struct SMD3MeshHeader
+00098     {
+00099         c8 meshID[4];       //id, must be IDP3
+00100         c8 meshName[68];    //name of mesh 65 chars, 32 bit aligned == 68 chars
+00101 
+00102         s32 numFrames;      //number of meshframes in mesh
+00103         s32 numShader;      //number of skins in mesh
+00104         s32 numVertices;    //number of vertices
+00105         s32 numTriangles;   //number of Triangles
+00106 
+00107         s32 offset_triangles;   //starting position of Triangle data, relative to start of Mesh_Header
+00108         s32 offset_shaders; //size of header
+00109         s32 offset_st;      //starting position of texvector data, relative to start of Mesh_Header
+00110         s32 vertexStart;    //starting position of vertex data,relative to start of Mesh_Header
+00111         s32 offset_end;
+00112     } PACK_STRUCT;
+00113 
+00114 
+00116     struct SMD3Vertex
+00117     {
+00118         s16 position[3];
+00119         u8 normal[2];
+00120     } PACK_STRUCT;
+00121 
+00123     struct SMD3TexCoord
+00124     {
+00125         f32 u;
+00126         f32 v;
+00127     } PACK_STRUCT;
+00128 
+00130     struct SMD3Face
+00131     {
+00132         s32 Index[3];
+00133     } PACK_STRUCT;
+00134 
+00135 
+00136 // Default alignment
+00137 #include "irrunpack.h"
+00138 
+00140     struct SMD3MeshBuffer : public IReferenceCounted
+00141     {
+00142         SMD3MeshHeader MeshHeader;
+00143 
+00144         core::stringc Shader;
+00145         core::array < s32 > Indices;
+00146         core::array < SMD3Vertex > Vertices;
+00147         core::array < SMD3TexCoord > Tex;
+00148     };
+00149 
+00151 
+00152     struct SMD3QuaternionTag
+00153     {
+00154         virtual ~SMD3QuaternionTag()
+00155         {
+00156             position.X = 0.f;
+00157         }
+00158 
+00159         // construct copy constructor
+00160         SMD3QuaternionTag( const SMD3QuaternionTag & copyMe )
+00161         {
+00162             *this = copyMe;
+00163         }
+00164 
+00165         // construct for searching
+00166         SMD3QuaternionTag( const core::stringc& name )
+00167             : Name ( name ) {}
+00168 
+00169         // construct from a position and euler angles in degrees
+00170         SMD3QuaternionTag ( const core::vector3df &pos, const core::vector3df &angle )
+00171             : position(pos), rotation(angle * core::DEGTORAD) {}
+00172 
+00173         // set to matrix
+00174         void setto ( core::matrix4 &m )
+00175         {
+00176             rotation.getMatrix ( m, position );
+00177         }
+00178 
+00179         bool operator == ( const SMD3QuaternionTag &other ) const
+00180         {
+00181             return Name == other.Name;
+00182         }
+00183 
+00184         SMD3QuaternionTag & operator=( const SMD3QuaternionTag & copyMe )
+00185         {
+00186             Name = copyMe.Name;
+00187             position = copyMe.position;
+00188             rotation = copyMe.rotation;
+00189             return *this;
+00190         }
+00191 
+00192         core::stringc Name;
+00193         core::vector3df position;
+00194         core::quaternion rotation;
+00195     };
+00196 
+00198     struct SMD3QuaternionTagList
+00199     {
+00200         SMD3QuaternionTagList()
+00201         {
+00202             Container.setAllocStrategy(core::ALLOC_STRATEGY_SAFE);
+00203         }
+00204 
+00205         // construct copy constructor
+00206         SMD3QuaternionTagList(const SMD3QuaternionTagList& copyMe)
+00207         {
+00208             *this = copyMe;
+00209         }
+00210 
+00211         virtual ~SMD3QuaternionTagList() {}
+00212 
+00213         SMD3QuaternionTag* get(const core::stringc& name)
+00214         {
+00215             SMD3QuaternionTag search ( name );
+00216             s32 index = Container.linear_search ( search );
+00217             if ( index >= 0 )
+00218                 return &Container[index];
+00219             return 0;
+00220         }
+00221 
+00222         u32 size () const
+00223         {
+00224             return Container.size();
+00225         }
+00226 
+00227         void set_used(u32 new_size)
+00228         {
+00229             s32 diff = (s32) new_size - (s32) Container.allocated_size();
+00230             if ( diff > 0 )
+00231             {
+00232                 SMD3QuaternionTag e("");
+00233                 for ( s32 i = 0; i < diff; ++i )
+00234                     Container.push_back(e);
+00235             }
+00236         }
+00237 
+00238         const SMD3QuaternionTag& operator[](u32 index) const
+00239         {
+00240             return Container[index];
+00241         }
+00242 
+00243         SMD3QuaternionTag& operator[](u32 index)
+00244         {
+00245             return Container[index];
+00246         }
+00247 
+00248         void push_back(const SMD3QuaternionTag& other)
+00249         {
+00250             Container.push_back(other);
+00251         }
+00252 
+00253         SMD3QuaternionTagList& operator = (const SMD3QuaternionTagList & copyMe)
+00254         {
+00255             Container = copyMe.Container;
+00256             return *this;
+00257         }
+00258 
+00259     private:
+00260         core::array < SMD3QuaternionTag > Container;
+00261     };
+00262 
+00263 
+00265     struct SMD3Mesh: public IReferenceCounted
+00266     {
+00267         SMD3Mesh ()
+00268         {
+00269             MD3Header.numFrames = 0;
+00270         }
+00271 
+00272         virtual ~SMD3Mesh()
+00273         {
+00274             for (u32 i=0; i<Buffer.size(); ++i)
+00275                 Buffer[i]->drop();
+00276         }
+00277 
+00278         core::stringc Name;
+00279         core::array<SMD3MeshBuffer*> Buffer;
+00280         SMD3QuaternionTagList TagList;
+00281         SMD3Header MD3Header;
+00282     };
+00283 
+00284 
+00286     class IAnimatedMeshMD3 : public IAnimatedMesh
+00287     {
+00288     public:
+00289 
+00291         virtual void setInterpolationShift(u32 shift, u32 loopMode) =0;
+00292 
+00294         virtual SMD3QuaternionTagList* getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) =0;
+00295 
+00297         virtual SMD3Mesh* getOriginalMesh() =0;
+00298     };
+00299 
+00300 } // end namespace scene
+00301 } // end namespace irr
+00302 
+00303 #endif
+00304 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h.html new file mode 100644 index 0000000..5499a54 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IAnimatedMeshSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IAnimatedMeshSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+#include "IBoneSceneNode.h"
+#include "IAnimatedMeshMD2.h"
+#include "IAnimatedMeshMD3.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h_source.html new file mode 100644 index 0000000..8b503ce --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_animated_mesh_scene_node_8h_source.html @@ -0,0 +1,248 @@ + + + + +Irrlicht 3D Engine: IAnimatedMeshSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IAnimatedMeshSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
+00006 #define __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 #include "IBoneSceneNode.h"
+00010 #include "IAnimatedMeshMD2.h"
+00011 #include "IAnimatedMeshMD3.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace scene
+00016 {
+00017     class IShadowVolumeSceneNode;
+00018 
+00019     enum E_JOINT_UPDATE_ON_RENDER
+00020     {
+00022         EJUOR_NONE = 0,
+00023 
+00025         EJUOR_READ,
+00026 
+00028         EJUOR_CONTROL
+00029     };
+00030 
+00031 
+00032     class IAnimatedMeshSceneNode;
+00033 
+00035 
+00039     class IAnimationEndCallBack : public virtual IReferenceCounted
+00040     {
+00041     public:
+00042 
+00044 
+00047         virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0;
+00048     };
+00049 
+00051 
+00053     class IAnimatedMeshSceneNode : public ISceneNode
+00054     {
+00055     public:
+00056 
+00058         IAnimatedMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00059             const core::vector3df& position = core::vector3df(0,0,0),
+00060             const core::vector3df& rotation = core::vector3df(0,0,0),
+00061             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
+00062             : ISceneNode(parent, mgr, id, position, rotation, scale) {}
+00063 
+00065         virtual ~IAnimatedMeshSceneNode() {}
+00066 
+00068 
+00072         virtual void setCurrentFrame(f32 frame) = 0;
+00073 
+00075 
+00079         virtual bool setFrameLoop(s32 begin, s32 end) = 0;
+00080 
+00082 
+00083         virtual void setAnimationSpeed(f32 framesPerSecond) = 0;
+00084 
+00086 
+00087         virtual f32 getAnimationSpeed() const =0;
+00088 
+00090 
+00107         virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0,
+00108             s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0;
+00109 
+00110 
+00112 
+00126         virtual IBoneSceneNode* getJointNode(const c8* jointName)=0;
+00127 
+00129         virtual IBoneSceneNode* getJointNode(u32 jointID) = 0;
+00130 
+00132 
+00133         virtual u32 getJointCount() const = 0;
+00134 
+00136 
+00143         virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim) = 0;
+00144 
+00146 
+00158         virtual bool setMD2Animation(const c8* animationName) = 0;
+00159 
+00161         virtual f32 getFrameNr() const = 0;
+00163         virtual s32 getStartFrame() const = 0;
+00165         virtual s32 getEndFrame() const = 0;
+00166 
+00168 
+00169         virtual void setLoopMode(bool playAnimationLooped) = 0;
+00170 
+00172 
+00173         virtual bool getLoopMode() const = 0;
+00174 
+00176 
+00179         virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0) = 0;
+00180 
+00182 
+00185         virtual void setReadOnlyMaterials(bool readonly) = 0;
+00186 
+00188         virtual bool isReadOnlyMaterials() const = 0;
+00189 
+00191         virtual void setMesh(IAnimatedMesh* mesh) = 0;
+00192 
+00194         virtual IAnimatedMesh* getMesh(void) = 0;
+00195 
+00197         virtual const SMD3QuaternionTag* getMD3TagTransformation( const core::stringc & tagname) = 0;
+00198 
+00200         virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0;
+00201 
+00203 
+00206         virtual void setTransitionTime(f32 Time) =0;
+00207 
+00209 
+00210         virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0;
+00211 
+00213 
+00214         virtual void setRenderFromIdentity( bool On )=0;
+00215 
+00217 
+00220         virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) = 0;
+00221 
+00222     };
+00223 
+00224 } // end namespace scene
+00225 } // end namespace irr
+00226 
+00227 #endif
+00228 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h.html new file mode 100644 index 0000000..6cbcb3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h.html @@ -0,0 +1,149 @@ + + + + +Irrlicht 3D Engine: IAttributeExchangingObject.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IAttributeExchangingObject.h File Reference
+
+
+
#include "IReferenceCounted.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h_source.html new file mode 100644 index 0000000..fb96400 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_attribute_exchanging_object_8h_source.html @@ -0,0 +1,178 @@ + + + + +Irrlicht 3D Engine: IAttributeExchangingObject.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IAttributeExchangingObject.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__
+00006 #define __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 
+00010 
+00011 namespace irr
+00012 {
+00013 
+00014 namespace io
+00015 {
+00016 
+00017 class IAttributes;
+00018 
+00020 enum E_ATTRIBUTE_READ_WRITE_FLAGS
+00021 {
+00023     EARWF_FOR_FILE = 0x00000001,
+00024 
+00026     EARWF_FOR_EDITOR = 0x00000002,
+00027 
+00029     EARWF_USE_RELATIVE_PATHS = 0x00000004
+00030 };
+00031 
+00032 
+00034 struct SAttributeReadWriteOptions
+00035 {
+00037     SAttributeReadWriteOptions()
+00038         : Flags(0), Filename(0)
+00039     {
+00040     }
+00041 
+00043     s32 Flags;
+00044 
+00046     const fschar_t* Filename;
+00047 };
+00048 
+00049 
+00051 class IAttributeExchangingObject : virtual public IReferenceCounted
+00052 {
+00053 public:
+00054 
+00056 
+00058     virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {}
+00059 
+00061 
+00063     virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) {}
+00064 
+00065 };
+00066 
+00067 } // end namespace io
+00068 } // end namespace irr
+00069 
+00070 #endif
+00071 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h.html new file mode 100644 index 0000000..f5020fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: IAttributes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IAttributes.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "SColor.h"
+#include "vector3d.h"
+#include "vector2d.h"
+#include "line2d.h"
+#include "line3d.h"
+#include "triangle3d.h"
+#include "position2d.h"
+#include "rect.h"
+#include "dimension2d.h"
+#include "matrix4.h"
+#include "quaternion.h"
+#include "plane3d.h"
+#include "irrString.h"
+#include "irrArray.h"
+#include "IXMLReader.h"
+#include "EAttributes.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+
    +
  • class irr::io::IAttributes +
    Provides a generic interface for attributes and their values and the possiblity to serialize them. More...
+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h_source.html new file mode 100644 index 0000000..93b20a5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_attributes_8h_source.html @@ -0,0 +1,600 @@ + + + + +Irrlicht 3D Engine: IAttributes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IAttributes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_ATTRIBUTES_H_INCLUDED__
+00006 #define __I_ATTRIBUTES_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "SColor.h"
+00010 #include "vector3d.h"
+00011 #include "vector2d.h"
+00012 #include "line2d.h"
+00013 #include "line3d.h"
+00014 #include "triangle3d.h"
+00015 #include "position2d.h"
+00016 #include "rect.h"
+00017 #include "dimension2d.h"
+00018 #include "matrix4.h"
+00019 #include "quaternion.h"
+00020 #include "plane3d.h"
+00021 #include "triangle3d.h"
+00022 #include "line2d.h"
+00023 #include "line3d.h"
+00024 #include "irrString.h"
+00025 #include "irrArray.h"
+00026 #include "IXMLReader.h"
+00027 #include "EAttributes.h"
+00028 #include "path.h"
+00029 
+00030 namespace irr
+00031 {
+00032 namespace video
+00033 {
+00034     class ITexture;
+00035 } // end namespace video
+00036 namespace io
+00037 {
+00038     class IXMLWriter;
+00039 
+00041 class IAttributes : public virtual IReferenceCounted
+00042 {
+00043 public:
+00044 
+00046     virtual u32 getAttributeCount() const = 0;
+00047 
+00050     virtual const c8* getAttributeName(s32 index) = 0;
+00051 
+00054     virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) = 0;
+00055 
+00058     virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) = 0;
+00059 
+00062     virtual const wchar_t* getAttributeTypeString(const c8* attributeName) = 0;
+00063 
+00066     virtual const wchar_t* getAttributeTypeString(s32 index) = 0;
+00067 
+00069     virtual bool existsAttribute(const c8* attributeName) = 0;
+00070 
+00072     virtual s32 findAttribute(const c8* attributeName) const =0;
+00073 
+00075     virtual void clear() = 0;
+00076 
+00083     virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false, const wchar_t* elementName=0) = 0;
+00084 
+00089     virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* elementName=0) = 0;
+00090 
+00091 
+00092     /*
+00093 
+00094         Integer Attribute
+00095 
+00096     */
+00097 
+00099     virtual void addInt(const c8* attributeName, s32 value) = 0;
+00100 
+00102     virtual void setAttribute(const c8* attributeName, s32 value) = 0;
+00103 
+00107     virtual s32 getAttributeAsInt(const c8* attributeName) const =0;
+00108 
+00111     virtual s32 getAttributeAsInt(s32 index) const =0;
+00112 
+00114     virtual void setAttribute(s32 index, s32 value) = 0;
+00115 
+00116     /*
+00117 
+00118         Float Attribute
+00119 
+00120     */
+00121 
+00123     virtual void addFloat(const c8* attributeName, f32 value) = 0;
+00124 
+00126     virtual void setAttribute(const c8* attributeName, f32 value) = 0;
+00127 
+00131     virtual f32 getAttributeAsFloat(const c8* attributeName) = 0;
+00132 
+00135     virtual f32 getAttributeAsFloat(s32 index) = 0;
+00136 
+00138     virtual void setAttribute(s32 index, f32 value) = 0;
+00139 
+00140     /*
+00141 
+00142         String Attribute
+00143 
+00144     */
+00145 
+00147     virtual void addString(const c8* attributeName, const c8* value) = 0;
+00148 
+00152     virtual void setAttribute(const c8* attributeName, const c8* value) = 0;
+00153 
+00158     virtual core::stringc getAttributeAsString(const c8* attributeName) = 0;
+00159 
+00163     virtual void getAttributeAsString(const c8* attributeName, c8* target) = 0;
+00164 
+00167     virtual core::stringc getAttributeAsString(s32 index) = 0;
+00168 
+00172     virtual void setAttribute(s32 index, const c8* value) = 0;
+00173 
+00174     // wide strings
+00175 
+00177     virtual void addString(const c8* attributeName, const wchar_t* value) = 0;
+00178 
+00182     virtual void setAttribute(const c8* attributeName, const wchar_t* value) = 0;
+00183 
+00188     virtual core::stringw getAttributeAsStringW(const c8* attributeName) = 0;
+00189 
+00193     virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) = 0;
+00194 
+00197     virtual core::stringw getAttributeAsStringW(s32 index) = 0;
+00198 
+00202     virtual void setAttribute(s32 index, const wchar_t* value) = 0;
+00203 
+00204     /*
+00205 
+00206         Binary Data Attribute
+00207 
+00208     */
+00209 
+00211     virtual void addBinary(const c8* attributeName, void* data, s32 dataSizeInBytes) = 0;
+00212 
+00214     virtual void setAttribute(const c8* attributeName, void* data, s32 dataSizeInBytes ) = 0;
+00215 
+00217 
+00221     virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) = 0;
+00222 
+00224 
+00228     virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) = 0;
+00229 
+00231     virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes ) = 0;
+00232 
+00233 
+00234     /*
+00235         Array Attribute
+00236     */
+00237 
+00239     virtual void addArray(const c8* attributeName, const core::array<core::stringw>& value) = 0;
+00240 
+00244     virtual void setAttribute(const c8* attributeName, const core::array<core::stringw>& value) = 0;
+00245 
+00250     virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName) = 0;
+00251 
+00254     virtual core::array<core::stringw> getAttributeAsArray(s32 index) = 0;
+00255 
+00257     virtual void setAttribute(s32 index, const core::array<core::stringw>& value) = 0;
+00258 
+00259 
+00260     /*
+00261 
+00262         Bool Attribute
+00263 
+00264     */
+00265 
+00267     virtual void addBool(const c8* attributeName, bool value) = 0;
+00268 
+00270     virtual void setAttribute(const c8* attributeName, bool value) = 0;
+00271 
+00275     virtual bool getAttributeAsBool(const c8* attributeName) = 0;
+00276 
+00279     virtual bool getAttributeAsBool(s32 index) = 0;
+00280 
+00282     virtual void setAttribute(s32 index, bool value) = 0;
+00283 
+00284     /*
+00285 
+00286         Enumeration Attribute
+00287 
+00288     */
+00289 
+00291     virtual void addEnum(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals) = 0;
+00292 
+00294     virtual void addEnum(const c8* attributeName, s32 enumValue, const c8* const* enumerationLiterals) = 0;
+00295 
+00297     virtual void setAttribute(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals) = 0;
+00298 
+00302     virtual const c8* getAttributeAsEnumeration(const c8* attributeName) = 0;
+00303 
+00305 
+00312     virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) = 0;
+00313 
+00315 
+00322     virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) = 0;
+00323 
+00326     virtual const c8* getAttributeAsEnumeration(s32 index) = 0;
+00327 
+00331     virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) = 0;
+00332 
+00336     virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) = 0;
+00337 
+00339     virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals) = 0;
+00340 
+00341 
+00342     /*
+00343 
+00344         SColor Attribute
+00345 
+00346     */
+00347 
+00349     virtual void addColor(const c8* attributeName, video::SColor value) = 0;
+00350 
+00351 
+00353     virtual void setAttribute(const c8* attributeName, video::SColor color) = 0;
+00354 
+00358     virtual video::SColor getAttributeAsColor(const c8* attributeName) = 0;
+00359 
+00362     virtual video::SColor getAttributeAsColor(s32 index) = 0;
+00363 
+00365     virtual void setAttribute(s32 index, video::SColor color) = 0;
+00366 
+00367     /*
+00368 
+00369         SColorf Attribute
+00370 
+00371     */
+00372 
+00374     virtual void addColorf(const c8* attributeName, video::SColorf value) = 0;
+00375 
+00377     virtual void setAttribute(const c8* attributeName, video::SColorf color) = 0;
+00378 
+00382     virtual video::SColorf getAttributeAsColorf(const c8* attributeName) = 0;
+00383 
+00386     virtual video::SColorf getAttributeAsColorf(s32 index) = 0;
+00387 
+00389     virtual void setAttribute(s32 index, video::SColorf color) = 0;
+00390 
+00391 
+00392     /*
+00393 
+00394         Vector3d Attribute
+00395 
+00396     */
+00397 
+00399     virtual void addVector3d(const c8* attributeName, core::vector3df value) = 0;
+00400 
+00402     virtual void setAttribute(const c8* attributeName, core::vector3df v) = 0;
+00403 
+00407     virtual core::vector3df getAttributeAsVector3d(const c8* attributeName) = 0;
+00408 
+00411     virtual core::vector3df getAttributeAsVector3d(s32 index) = 0;
+00412 
+00414     virtual void setAttribute(s32 index, core::vector3df v) = 0;
+00415 
+00416     /*
+00417 
+00418         Vector2d Attribute
+00419 
+00420     */
+00421 
+00423     virtual void addVector2d(const c8* attributeName, core::vector2df value) = 0;
+00424 
+00426     virtual void setAttribute(const c8* attributeName, core::vector2df v) = 0;
+00427 
+00431     virtual core::vector2df getAttributeAsVector2d(const c8* attributeName) = 0;
+00432 
+00435     virtual core::vector2df getAttributeAsVector2d(s32 index) = 0;
+00436 
+00438     virtual void setAttribute(s32 index, core::vector2df v) = 0;
+00439 
+00440     /*
+00441 
+00442         Position2d Attribute
+00443 
+00444     */
+00445 
+00447     virtual void addPosition2d(const c8* attributeName, core::position2di value) = 0;
+00448 
+00450     virtual void setAttribute(const c8* attributeName, core::position2di v) = 0;
+00451 
+00455     virtual core::position2di getAttributeAsPosition2d(const c8* attributeName) = 0;
+00456 
+00459     virtual core::position2di getAttributeAsPosition2d(s32 index) = 0;
+00460 
+00462     virtual void setAttribute(s32 index, core::position2di v) = 0;
+00463 
+00464     /*
+00465 
+00466         Rectangle Attribute
+00467 
+00468     */
+00469 
+00471     virtual void addRect(const c8* attributeName, core::rect<s32> value) = 0;
+00472 
+00474     virtual void setAttribute(const c8* attributeName, core::rect<s32> v) = 0;
+00475 
+00479     virtual core::rect<s32> getAttributeAsRect(const c8* attributeName) = 0;
+00480 
+00483     virtual core::rect<s32> getAttributeAsRect(s32 index) = 0;
+00484 
+00486     virtual void setAttribute(s32 index, core::rect<s32> v) = 0;
+00487 
+00488 
+00489     /*
+00490 
+00491         Dimension2d Attribute
+00492 
+00493     */
+00494 
+00496     virtual void addDimension2d(const c8* attributeName, core::dimension2d<u32> value) = 0;
+00497 
+00499     virtual void setAttribute(const c8* attributeName, core::dimension2d<u32> v) = 0;
+00500 
+00504     virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName) = 0;
+00505 
+00508     virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index) = 0;
+00509 
+00511     virtual void setAttribute(s32 index, core::dimension2d<u32> v) = 0;
+00512 
+00513 
+00514     /*
+00515         matrix attribute
+00516     */
+00517 
+00519     virtual void addMatrix(const c8* attributeName, const core::matrix4& v) = 0;
+00520 
+00522     virtual void setAttribute(const c8* attributeName, const core::matrix4& v) = 0;
+00523 
+00527     virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName) = 0;
+00528 
+00531     virtual core::matrix4 getAttributeAsMatrix(s32 index) = 0;
+00532 
+00534     virtual void setAttribute(s32 index, const core::matrix4& v) = 0;
+00535 
+00536     /*
+00537         quaternion attribute
+00538 
+00539     */
+00540 
+00542     virtual void addQuaternion(const c8* attributeName, core::quaternion v) = 0;
+00543 
+00545     virtual void setAttribute(const c8* attributeName, core::quaternion v) = 0;
+00546 
+00550     virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName) = 0;
+00551 
+00554     virtual core::quaternion getAttributeAsQuaternion(s32 index) = 0;
+00555 
+00557     virtual void setAttribute(s32 index, core::quaternion v) = 0;
+00558 
+00559     /*
+00560 
+00561         3d bounding box
+00562 
+00563     */
+00564 
+00566     virtual void addBox3d(const c8* attributeName, core::aabbox3df v) = 0;
+00567 
+00569     virtual void setAttribute(const c8* attributeName, core::aabbox3df v) = 0;
+00570 
+00574     virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName) = 0;
+00575 
+00578     virtual core::aabbox3df getAttributeAsBox3d(s32 index) = 0;
+00579 
+00581     virtual void setAttribute(s32 index, core::aabbox3df v) = 0;
+00582 
+00583     /*
+00584 
+00585         plane
+00586 
+00587     */
+00588 
+00590     virtual void addPlane3d(const c8* attributeName, core::plane3df v) = 0;
+00591 
+00593     virtual void setAttribute(const c8* attributeName, core::plane3df v) = 0;
+00594 
+00598     virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName) = 0;
+00599 
+00602     virtual core::plane3df getAttributeAsPlane3d(s32 index) = 0;
+00603 
+00605     virtual void setAttribute(s32 index, core::plane3df v) = 0;
+00606 
+00607 
+00608     /*
+00609 
+00610         3d triangle
+00611 
+00612     */
+00613 
+00615     virtual void addTriangle3d(const c8* attributeName, core::triangle3df v) = 0;
+00616 
+00618     virtual void setAttribute(const c8* attributeName, core::triangle3df v) = 0;
+00619 
+00623     virtual core::triangle3df getAttributeAsTriangle3d(const c8* attributeName) = 0;
+00624 
+00627     virtual core::triangle3df getAttributeAsTriangle3d(s32 index) = 0;
+00628 
+00630     virtual void setAttribute(s32 index, core::triangle3df v) = 0;
+00631 
+00632 
+00633     /*
+00634 
+00635         line 2d
+00636 
+00637     */
+00638 
+00640     virtual void addLine2d(const c8* attributeName, core::line2df v) = 0;
+00641 
+00643     virtual void setAttribute(const c8* attributeName, core::line2df v) = 0;
+00644 
+00648     virtual core::line2df getAttributeAsLine2d(const c8* attributeName) = 0;
+00649 
+00652     virtual core::line2df getAttributeAsLine2d(s32 index) = 0;
+00653 
+00655     virtual void setAttribute(s32 index, core::line2df v) = 0;
+00656 
+00657 
+00658     /*
+00659 
+00660         line 3d
+00661 
+00662     */
+00663 
+00665     virtual void addLine3d(const c8* attributeName, core::line3df v) = 0;
+00666 
+00668     virtual void setAttribute(const c8* attributeName, core::line3df v) = 0;
+00669 
+00673     virtual core::line3df getAttributeAsLine3d(const c8* attributeName) = 0;
+00674 
+00677     virtual core::line3df getAttributeAsLine3d(s32 index) = 0;
+00678 
+00680     virtual void setAttribute(s32 index, core::line3df v) = 0;
+00681 
+00682 
+00683     /*
+00684 
+00685         Texture Attribute
+00686 
+00687     */
+00688 
+00690     virtual void addTexture(const c8* attributeName, video::ITexture* texture, const io::path& filename = "") = 0;
+00691 
+00693     virtual void setAttribute(const c8* attributeName, video::ITexture* texture, const io::path& filename = "") = 0;
+00694 
+00697     virtual video::ITexture* getAttributeAsTexture(const c8* attributeName) = 0;
+00698 
+00701     virtual video::ITexture* getAttributeAsTexture(s32 index) = 0;
+00702 
+00704     virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = "") = 0;
+00705 
+00706 
+00707     /*
+00708 
+00709         User Pointer Attribute
+00710 
+00711     */
+00712 
+00714     virtual void addUserPointer(const c8* attributeName, void* userPointer) = 0;
+00715 
+00717     virtual void setAttribute(const c8* attributeName, void* userPointer) = 0;
+00718 
+00721     virtual void* getAttributeAsUserPointer(const c8* attributeName) = 0;
+00722 
+00725     virtual void* getAttributeAsUserPointer(s32 index) = 0;
+00726 
+00728     virtual void setAttribute(s32 index, void* userPointer) = 0;
+00729 
+00730 };
+00731 
+00732 } // end namespace io
+00733 } // end namespace irr
+00734 
+00735 #endif
+00736 
+00737 
+00738 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h.html new file mode 100644 index 0000000..589093f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IBillboardSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IBillboardSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h_source.html new file mode 100644 index 0000000..7da708f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_scene_node_8h_source.html @@ -0,0 +1,172 @@ + + + + +Irrlicht 3D Engine: IBillboardSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IBillboardSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_BILLBOARD_SCENE_NODE_H_INCLUDED__
+00006 #define __I_BILLBOARD_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 
+00020 class IBillboardSceneNode : public ISceneNode
+00021 {
+00022 public:
+00023 
+00025     IBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00026         const core::vector3df& position = core::vector3df(0,0,0))
+00027         : ISceneNode(parent, mgr, id, position) {}
+00028 
+00030     virtual void setSize(const core::dimension2d<f32>& size) = 0;
+00031 
+00033 
+00037     virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) = 0;
+00038 
+00040 
+00044     virtual const core::dimension2d<f32>& getSize() const = 0;
+00045 
+00047 
+00051     virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const =0;
+00052 
+00054 
+00055     virtual void setColor(const video::SColor& overallColor) = 0;
+00056 
+00058 
+00060     virtual void setColor(const video::SColor& topColor,
+00061             const video::SColor& bottomColor) = 0;
+00062 
+00064 
+00066     virtual void getColor(video::SColor& topColor,
+00067             video::SColor& bottomColor) const = 0;
+00068 };
+00069 
+00070 } // end namespace scene
+00071 } // end namespace irr
+00072 
+00073 
+00074 #endif
+00075 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h.html new file mode 100644 index 0000000..bf8e6aa --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IBillboardTextSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IBillboardTextSceneNode.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h_source.html new file mode 100644 index 0000000..18fb31a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_billboard_text_scene_node_8h_source.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: IBillboardTextSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IBillboardTextSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__
+00006 #define __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "IBillboardSceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 
+00021 class IBillboardTextSceneNode : public IBillboardSceneNode
+00022 {
+00023 public:
+00024 
+00026     IBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00027         const core::vector3df& position = core::vector3df(0,0,0))
+00028         : IBillboardSceneNode(parent, mgr, id, position) {}
+00029 
+00031     virtual void setSize(const core::dimension2d<f32>& size) = 0;
+00032 
+00034     virtual const core::dimension2d<f32>& getSize() const = 0;
+00035 
+00037 
+00038     virtual void setColor(const video::SColor & overallColor) = 0;
+00039 
+00041 
+00043     virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) = 0;
+00044 
+00046 
+00048     virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const = 0;
+00049 
+00051     virtual void setText(const wchar_t* text) = 0;
+00052 
+00054     virtual void setTextColor(video::SColor color) = 0;
+00055 };
+00056 
+00057 } // end namespace scene
+00058 } // end namespace irr
+00059 
+00060 
+00061 #endif
+00062 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h.html new file mode 100644 index 0000000..37472a2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: IBoneSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IBoneSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h_source.html new file mode 100644 index 0000000..69c4456 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_bone_scene_node_8h_source.html @@ -0,0 +1,208 @@ + + + + +Irrlicht 3D Engine: IBoneSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IBoneSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_BONE_SCENE_NODE_H_INCLUDED__
+00006 #define __I_BONE_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016     enum E_BONE_ANIMATION_MODE
+00017     {
+00019         EBAM_AUTOMATIC=0,
+00020 
+00022         EBAM_ANIMATED,
+00023 
+00025         EBAM_UNANIMATED,
+00026 
+00028         EBAM_COUNT
+00029 
+00030     };
+00031 
+00032     enum E_BONE_SKINNING_SPACE
+00033     {
+00035         EBSS_LOCAL=0,
+00036 
+00038         EBSS_GLOBAL,
+00039 
+00040         EBSS_COUNT
+00041     };
+00042 
+00044     const c8* const BoneAnimationModeNames[] =
+00045     {
+00046         "automatic",
+00047         "animated",
+00048         "unanimated",
+00049         0,
+00050     };
+00051 
+00052 
+00054 
+00055     class IBoneSceneNode : public ISceneNode
+00056     {
+00057     public:
+00058 
+00059         IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :
+00060             ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
+00061 
+00063 
+00064         _IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); }
+00065 
+00067         virtual u32 getBoneIndex() const = 0;
+00068 
+00070 
+00071         virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0;
+00072 
+00074         virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0;
+00075 
+00077         virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
+00078 
+00080         //virtual core::matrix4 getRelativeTransformation() const = 0;
+00081 
+00083         virtual void OnAnimate(u32 timeMs) =0;
+00084 
+00086 
+00087         virtual void render() { }
+00088 
+00090         virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0;
+00091 
+00093         virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0;
+00094 
+00096         virtual void updateAbsolutePositionOfAllChildren()=0;
+00097 
+00098         s32 positionHint;
+00099         s32 scaleHint;
+00100         s32 rotationHint;
+00101     };
+00102 
+00103 
+00104 } // end namespace scene
+00105 } // end namespace irr
+00106 
+00107 #endif
+00108 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h.html new file mode 100644 index 0000000..50b84ab --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: ICameraSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ICameraSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+#include "IEventReceiver.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h_source.html new file mode 100644 index 0000000..1cb66af --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_camera_scene_node_8h_source.html @@ -0,0 +1,258 @@ + + + + +Irrlicht 3D Engine: ICameraSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ICameraSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_CAMERA_SCENE_NODE_H_INCLUDED__
+00006 #define __I_CAMERA_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 #include "IEventReceiver.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015     struct SViewFrustum;
+00016 
+00018 
+00023     class ICameraSceneNode : public ISceneNode, public IEventReceiver
+00024     {
+00025     public:
+00026 
+00028         ICameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00029             const core::vector3df& position = core::vector3df(0,0,0),
+00030             const core::vector3df& rotation = core::vector3df(0,0,0),
+00031             const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f))
+00032             : ISceneNode(parent, mgr, id, position, rotation, scale), IsOrthogonal(false) {}
+00033 
+00035 
+00045         virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal=false) =0;
+00046 
+00048 
+00049         virtual const core::matrix4& getProjectionMatrix() const =0;
+00050 
+00052 
+00053         virtual const core::matrix4& getViewMatrix() const =0;
+00054 
+00056 
+00060         virtual void setViewMatrixAffector(const core::matrix4& affector) =0;
+00061 
+00063 
+00064         virtual const core::matrix4& getViewMatrixAffector() const =0;
+00065 
+00067 
+00073         virtual bool OnEvent(const SEvent& event) =0;
+00074 
+00076 
+00083         virtual void setTarget(const core::vector3df& pos) =0;
+00084 
+00086 
+00091         virtual void setRotation(const core::vector3df& rotation) =0;
+00092 
+00094 
+00095         virtual const core::vector3df& getTarget() const =0;
+00096 
+00098 
+00099         virtual void setUpVector(const core::vector3df& pos) =0;
+00100 
+00102 
+00103         virtual const core::vector3df& getUpVector() const =0;
+00104 
+00106 
+00107         virtual f32 getNearValue() const =0;
+00108 
+00110 
+00111         virtual f32 getFarValue() const =0;
+00112 
+00114 
+00115         virtual f32 getAspectRatio() const =0;
+00116 
+00118 
+00119         virtual f32 getFOV() const =0;
+00120 
+00122 
+00123         virtual void setNearValue(f32 zn) =0;
+00124 
+00126 
+00127         virtual void setFarValue(f32 zf) =0;
+00128 
+00130 
+00131         virtual void setAspectRatio(f32 aspect) =0;
+00132 
+00134 
+00135         virtual void setFOV(f32 fovy) =0;
+00136 
+00138 
+00140         virtual const SViewFrustum* getViewFrustum() const =0;
+00141 
+00143 
+00145         virtual void setInputReceiverEnabled(bool enabled) =0;
+00146 
+00148         virtual bool isInputReceiverEnabled() const =0;
+00149 
+00151         virtual bool isOrthogonal() const
+00152         {
+00153             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00154             return IsOrthogonal;
+00155         }
+00156 
+00158 
+00166         virtual void bindTargetAndRotation(bool bound) =0;
+00167 
+00169 
+00170         virtual bool getTargetAndRotationBinding(void) const =0;
+00171 
+00173         virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
+00174         {
+00175             ISceneNode::serializeAttributes(out, options);
+00176 
+00177             if (!out)
+00178                 return;
+00179             out->addBool    ("IsOrthogonal", IsOrthogonal );
+00180         }
+00181 
+00183         virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
+00184         {
+00185             ISceneNode::deserializeAttributes(in, options);
+00186             if (!in)
+00187                 return;
+00188 
+00189             if ( in->findAttribute("IsOrthogonal") )
+00190                 IsOrthogonal = in->getAttributeAsBool("IsOrthogonal");
+00191         }
+00192 
+00193     protected:
+00194 
+00195         void cloneMembers(ICameraSceneNode* toCopyFrom)
+00196         {
+00197             IsOrthogonal = toCopyFrom->IsOrthogonal;
+00198         }
+00199 
+00200         bool IsOrthogonal;
+00201     };
+00202 
+00203 } // end namespace scene
+00204 } // end namespace irr
+00205 
+00206 #endif
+00207 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h.html new file mode 100644 index 0000000..7ed1224 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h.html @@ -0,0 +1,182 @@ + + + + +Irrlicht 3D Engine: IColladaMeshWriter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IColladaMeshWriter.h File Reference
+
+
+
#include "IMeshWriter.h"
+#include "ISceneNode.h"
+#include "IAnimatedMesh.h"
+#include "SMaterial.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h_source.html new file mode 100644 index 0000000..3176f06 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_collada_mesh_writer_8h_source.html @@ -0,0 +1,416 @@ + + + + +Irrlicht 3D Engine: IColladaMeshWriter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IColladaMeshWriter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__
+00006 #define __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__
+00007 
+00008 #include "IMeshWriter.h"
+00009 #include "ISceneNode.h"
+00010 #include "IAnimatedMesh.h"
+00011 #include "SMaterial.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace io
+00016 {
+00017     class IWriteFile;
+00018 } // end namespace io
+00019 
+00020 namespace scene
+00021 {
+00023     enum E_COLLADA_TECHNIQUE_FX
+00024     {
+00027         ECTF_BLINN, 
+00029         ECTF_PHONG,
+00031         ECTF_LAMBERT,
+00032         // constantly shaded surface that is independent of lighting. 
+00033         ECTF_CONSTANT
+00034     };
+00035 
+00037     enum E_COLLADA_TRANSPARENT_FX
+00038     {
+00040         ECOF_A_ONE = 0,
+00041 
+00043         ECOF_RGB_ZERO = 1
+00044     };
+00045 
+00047     enum E_COLLADA_COLOR_SAMPLER
+00048     {
+00049         ECCS_DIFFUSE,
+00050         ECCS_AMBIENT,
+00051         ECCS_EMISSIVE,
+00052         ECCS_SPECULAR,
+00053         ECCS_TRANSPARENT,
+00054         ECCS_REFLECTIVE
+00055     };
+00056 
+00058     enum E_COLLADA_IRR_COLOR
+00059     {
+00061         ECIC_NONE,
+00062 
+00064         ECIC_CUSTOM,
+00065 
+00067         ECIC_DIFFUSE,
+00068 
+00070         ECIC_AMBIENT,
+00071 
+00073         ECIC_EMISSIVE,
+00074 
+00076         ECIC_SPECULAR
+00077     };
+00078 
+00080     enum E_COLLADA_GEOMETRY_WRITING
+00081     {
+00083         ECGI_PER_MESH,  
+00084 
+00088         ECGI_PER_MESH_AND_MATERIAL
+00089     };
+00090 
+00092     class IColladaMeshWriterProperties  : public virtual IReferenceCounted
+00093     {
+00094     public:
+00095         virtual ~IColladaMeshWriterProperties ()    {}
+00096 
+00098         virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx(const video::SMaterial& material) const = 0;
+00099 
+00101 
+00104         virtual s32 getTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0;
+00105 
+00107 
+00111         virtual E_COLLADA_IRR_COLOR getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0;
+00112 
+00114 
+00115         virtual video::SColor getCustomColor(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0;
+00116 
+00118 
+00119         virtual E_COLLADA_TRANSPARENT_FX getTransparentFx(const video::SMaterial& material) const = 0;
+00120 
+00122 
+00124         virtual f32 getTransparency(const video::SMaterial& material) const = 0;
+00125 
+00127 
+00129         virtual f32 getReflectivity(const video::SMaterial& material) const = 0;
+00130 
+00132 
+00134         virtual f32 getIndexOfRefraction(const video::SMaterial& material) const = 0;
+00135 
+00138         virtual bool isExportable(const irr::scene::ISceneNode * node) const = 0;
+00139 
+00142         // Note: Function is not const because there is no const getMesh() function.
+00143         virtual IMesh* getMesh(irr::scene::ISceneNode * node) = 0;
+00144 
+00146 
+00150         virtual bool useNodeMaterial(const scene::ISceneNode* node) const = 0;
+00151 
+00152     };
+00153 
+00155 
+00158     class IColladaMeshWriterNames  : public virtual IReferenceCounted
+00159     {
+00160     public:
+00161     
+00162         virtual ~IColladaMeshWriterNames () {}
+00163 
+00165 
+00174         virtual irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance) = 0;
+00175 
+00177 
+00183         virtual irr::core::stringw nameForNode(const scene::ISceneNode* node) = 0;
+00184 
+00186 
+00196         virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) = 0;
+00197     };
+00198 
+00199 
+00201     class IColladaMeshWriter : public IMeshWriter
+00202     {
+00203     public:
+00204 
+00205         IColladaMeshWriter() 
+00206             : Properties(0), DefaultProperties(0), NameGenerator(0), DefaultNameGenerator(0)
+00207             , WriteTextures(true), WriteDefaultScene(true), ExportSMaterialOnce(true)
+00208             , AmbientLight(0.f, 0.f, 0.f, 1.f)
+00209             , GeometryWriting(ECGI_PER_MESH)
+00210         {
+00211         }
+00212 
+00214         virtual ~IColladaMeshWriter() 
+00215         {
+00216             if ( Properties )
+00217                 Properties->drop();
+00218             if ( DefaultProperties )
+00219                 DefaultProperties->drop();
+00220             if ( NameGenerator )
+00221                 NameGenerator->drop();
+00222             if ( DefaultNameGenerator )
+00223                 DefaultNameGenerator->drop();
+00224         }
+00225 
+00227         virtual bool writeScene(io::IWriteFile* file, scene::ISceneNode* root) = 0;
+00228 
+00229 
+00231         virtual void setWriteTextures(bool write)
+00232         {
+00233             WriteTextures = write;
+00234         }
+00235 
+00237         virtual bool getWriteTextures() const 
+00238         {
+00239             return WriteTextures;
+00240         }
+00241 
+00243 
+00247         virtual void setWriteDefaultScene(bool write)
+00248         {
+00249             WriteDefaultScene = write;
+00250         }
+00251 
+00253         virtual bool getWriteDefaultScene() const
+00254         {
+00255             return WriteDefaultScene;
+00256         }
+00257 
+00259         virtual void setAmbientLight(const video::SColorf &ambientColor)
+00260         {
+00261             AmbientLight = ambientColor;
+00262         }
+00263 
+00265         virtual video::SColorf getAmbientLight() const
+00266         {
+00267             return AmbientLight;
+00268         }
+00269 
+00271 
+00278         virtual void setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle) 
+00279         {
+00280             GeometryWriting = writeStyle;
+00281         }
+00282 
+00284         virtual E_COLLADA_GEOMETRY_WRITING getGeometryWriting() const
+00285         {
+00286             return GeometryWriting;
+00287         }
+00288 
+00290 
+00297         virtual void setExportSMaterialsOnlyOnce(bool exportOnce)
+00298         {
+00299             ExportSMaterialOnce = exportOnce;
+00300         }
+00301 
+00302         virtual bool getExportSMaterialsOnlyOnce() const
+00303         {
+00304             return ExportSMaterialOnce;
+00305         }
+00306 
+00308 
+00310         virtual void setProperties(IColladaMeshWriterProperties * p)
+00311         {
+00312             if ( p == Properties )
+00313                 return;
+00314             if ( p ) 
+00315                 p->grab();
+00316             if ( Properties )
+00317                 Properties->drop();
+00318             Properties = p;
+00319         }
+00320 
+00322         virtual IColladaMeshWriterProperties * getProperties() const
+00323         {
+00324             return Properties;
+00325         }
+00326 
+00328 
+00329         IColladaMeshWriterProperties * getDefaultProperties() const 
+00330         { 
+00331             return DefaultProperties; 
+00332         }
+00333 
+00335         virtual void setNameGenerator(IColladaMeshWriterNames * nameGenerator)
+00336         {
+00337             if ( nameGenerator == NameGenerator )
+00338                 return;
+00339             if ( nameGenerator ) 
+00340                 nameGenerator->grab();
+00341             if ( NameGenerator )
+00342                 NameGenerator->drop();
+00343             NameGenerator = nameGenerator;
+00344         }
+00345 
+00347         virtual IColladaMeshWriterNames * getNameGenerator() const
+00348         {
+00349             return NameGenerator;
+00350         }
+00351 
+00353 
+00354         IColladaMeshWriterNames * getDefaultNameGenerator() const 
+00355         { 
+00356             return DefaultNameGenerator; 
+00357         }
+00358 
+00360 
+00361         virtual irr::core::stringw toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix=irr::core::stringw(L"_NC_")) const = 0;
+00362 
+00363 
+00364     protected:
+00365         // NOTE: You usually should also call setProperties with the same paraemter when using setDefaultProperties
+00366         virtual void setDefaultProperties(IColladaMeshWriterProperties * p)
+00367         {
+00368             if ( p == DefaultProperties )
+00369                 return;
+00370             if ( p ) 
+00371                 p->grab();
+00372             if ( DefaultProperties )
+00373                 DefaultProperties->drop();
+00374             DefaultProperties = p;
+00375         }
+00376 
+00377         // NOTE: You usually should also call setNameGenerator with the same paraemter when using setDefaultProperties
+00378         virtual void setDefaultNameGenerator(IColladaMeshWriterNames * p)
+00379         {
+00380             if ( p == DefaultNameGenerator )
+00381                 return;
+00382             if ( p ) 
+00383                 p->grab();
+00384             if ( DefaultNameGenerator )
+00385                 DefaultNameGenerator->drop();
+00386             DefaultNameGenerator = p;
+00387         }
+00388 
+00389     private:
+00390         IColladaMeshWriterProperties * Properties;
+00391         IColladaMeshWriterProperties * DefaultProperties;
+00392         IColladaMeshWriterNames * NameGenerator;
+00393         IColladaMeshWriterNames * DefaultNameGenerator;
+00394         bool WriteTextures;
+00395         bool WriteDefaultScene;
+00396         bool ExportSMaterialOnce;
+00397         video::SColorf AmbientLight;
+00398         E_COLLADA_GEOMETRY_WRITING GeometryWriting;
+00399     };
+00400 
+00401 
+00402 } // end namespace
+00403 } // end namespace
+00404 
+00405 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h.html new file mode 100644 index 0000000..9844b2d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: ICursorControl.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ICursorControl.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "position2d.h"
+#include "rect.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h_source.html new file mode 100644 index 0000000..e525e4f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_cursor_control_8h_source.html @@ -0,0 +1,262 @@ + + + + +Irrlicht 3D Engine: ICursorControl.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ICursorControl.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_CURSOR_CONTROL_H_INCLUDED__
+00006 #define __I_CURSOR_CONTROL_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "position2d.h"
+00010 #include "rect.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace gui
+00015 {
+00016 
+00017     class IGUISpriteBank;
+00018 
+00020     enum ECURSOR_ICON
+00021     {
+00022         // Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far.
+00023         ECI_NORMAL,     // arrow
+00024         ECI_CROSS,      // Crosshair
+00025         ECI_HAND,       // Hand
+00026         ECI_HELP,       // Arrow and question mark
+00027         ECI_IBEAM,      // typical text-selection cursor
+00028         ECI_NO,         // should not click icon
+00029         ECI_WAIT,       // hourclass
+00030         ECI_SIZEALL,    // arrow in all directions
+00031         ECI_SIZENESW,   // resizes in direction north-east or south-west
+00032         ECI_SIZENWSE,   // resizes in direction north-west or south-east
+00033         ECI_SIZENS,     // resizes in direction north or south
+00034         ECI_SIZEWE,     // resizes in direction west or east
+00035         ECI_UP,         // up-arrow
+00036 
+00037         // Implementer note: Should we add system specific cursors, which use guaranteed the system icons,
+00038         // then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those
+00039         // additionally.
+00040 
+00041         ECI_COUNT       // maximal of defined cursors. Note that higher values can be created at runtime
+00042     };
+00043 
+00045     const c8* const GUICursorIconNames[ECI_COUNT+1] =
+00046     {
+00047         "normal",
+00048         "cross",
+00049         "hand",
+00050         "help",
+00051         "ibeam",
+00052         "no",
+00053         "wait",
+00054         "sizeall",
+00055         "sizenesw",
+00056         "sizenwse",
+00057         "sizens",
+00058         "sizewe",
+00059         "sizeup",
+00060         0
+00061     };
+00062 
+00064     struct SCursorSprite
+00065     {
+00066         SCursorSprite()
+00067         : SpriteBank(0), SpriteId(-1)
+00068         {
+00069         }
+00070 
+00071         SCursorSprite( gui::IGUISpriteBank * spriteBank, s32 spriteId, const core::position2d<s32> &hotspot=(core::position2d<s32>(0,0)) )
+00072         : SpriteBank(spriteBank), SpriteId(spriteId), HotSpot(hotspot)
+00073         {
+00074         }
+00075 
+00076         IGUISpriteBank * SpriteBank;
+00077         s32 SpriteId;
+00078         core::position2d<s32> HotSpot;
+00079     };
+00080 
+00082     enum ECURSOR_PLATFORM_BEHAVIOR
+00083     {
+00085         ECPB_NONE = 0,
+00086 
+00088 
+00093         ECPB_X11_CACHE_UPDATES = 1
+00094     };
+00095 
+00097     class ICursorControl : public virtual IReferenceCounted
+00098     {
+00099     public:
+00100 
+00102 
+00104         virtual void setVisible(bool visible) = 0;
+00105 
+00107 
+00108         virtual bool isVisible() const = 0;
+00109 
+00111 
+00116         virtual void setPosition(const core::position2d<f32> &pos) = 0;
+00117 
+00119 
+00125         virtual void setPosition(f32 x, f32 y) = 0;
+00126 
+00128 
+00129         virtual void setPosition(const core::position2d<s32> &pos) = 0;
+00130 
+00132 
+00134         virtual void setPosition(s32 x, s32 y) = 0;
+00135 
+00137 
+00139         virtual const core::position2d<s32>& getPosition() = 0;
+00140 
+00142 
+00146         virtual core::position2d<f32> getRelativePosition() = 0;
+00147 
+00149 
+00154         virtual void setReferenceRect(core::rect<s32>* rect=0) = 0;
+00155 
+00156 
+00158 
+00159         virtual void setActiveIcon(ECURSOR_ICON iconId) {}
+00160 
+00162         virtual ECURSOR_ICON getActiveIcon() const { return gui::ECI_NORMAL; }
+00163 
+00165 
+00166         virtual ECURSOR_ICON addIcon(const gui::SCursorSprite& icon) { return gui::ECI_NORMAL; }
+00167 
+00169 
+00173         virtual void changeIcon(ECURSOR_ICON iconId, const gui::SCursorSprite& sprite) {}
+00174 
+00176         virtual core::dimension2di getSupportedIconSize() const { return core::dimension2di(0,0); }
+00177 
+00179         virtual void setPlatformBehavior(ECURSOR_PLATFORM_BEHAVIOR behavior) {}
+00180 
+00182 
+00184         virtual ECURSOR_PLATFORM_BEHAVIOR getPlatformBehavior() const { return ECPB_NONE; }
+00185     };
+00186 
+00187 
+00188 } // end namespace gui
+00189 } // end namespace irr
+00190 
+00191 #endif
+00192 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h.html new file mode 100644 index 0000000..2ff4925 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IDummyTransformationSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IDummyTransformationSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h_source.html new file mode 100644 index 0000000..fb7ee6f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_dummy_transformation_scene_node_8h_source.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IDummyTransformationSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IDummyTransformationSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__
+00006 #define __I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 
+00023 class IDummyTransformationSceneNode : public ISceneNode
+00024 {
+00025 public:
+00026 
+00028     IDummyTransformationSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
+00029         : ISceneNode(parent, mgr, id) {}
+00030 
+00032 
+00034     virtual core::matrix4& getRelativeTransformationMatrix() = 0;
+00035 };
+00036 
+00037 } // end namespace scene
+00038 } // end namespace irr
+00039 
+00040 
+00041 #endif
+00042 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h.html new file mode 100644 index 0000000..9376525 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IDynamicMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IDynamicMeshBuffer.h File Reference
+
+
+
#include "IMeshBuffer.h"
+#include "IVertexBuffer.h"
+#include "IIndexBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h_source.html new file mode 100644 index 0000000..4d84eea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_dynamic_mesh_buffer_8h_source.html @@ -0,0 +1,297 @@ + + + + +Irrlicht 3D Engine: IDynamicMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IDynamicMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__
+00006 #define __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IMeshBuffer.h"
+00009 #include "IVertexBuffer.h"
+00010 #include "IIndexBuffer.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016 
+00018     class IDynamicMeshBuffer : public IMeshBuffer
+00019     {
+00020     public:
+00021         virtual IVertexBuffer &getVertexBuffer() const =0;
+00022         virtual IIndexBuffer &getIndexBuffer() const =0;
+00023 
+00024         virtual void setVertexBuffer(IVertexBuffer *vertexBuffer) =0;
+00025         virtual void setIndexBuffer(IIndexBuffer *indexBuffer) =0;
+00026 
+00028 
+00029         virtual video::SMaterial& getMaterial() =0;
+00030 
+00032 
+00033         virtual const video::SMaterial& getMaterial() const =0;
+00034 
+00036 
+00037         virtual const core::aabbox3df& getBoundingBox() const =0;
+00038 
+00040 
+00042         virtual void setBoundingBox(const core::aabbox3df& box) =0;
+00043 
+00045         virtual void recalculateBoundingBox() =0;
+00046 
+00048 
+00053         virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices)
+00054         {
+00055 
+00056         }
+00057 
+00059 
+00061         virtual void append(const IMeshBuffer* const other)
+00062         {
+00063 
+00064         }
+00065 
+00066         // ------------------- To be removed? -------------------  //
+00067 
+00069         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
+00070         {
+00071             return getVertexBuffer().getHardwareMappingHint();
+00072         }
+00073 
+00075         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
+00076         {
+00077             return getIndexBuffer().getHardwareMappingHint();
+00078         }
+00079 
+00081         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
+00082         {
+00083             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
+00084                 getVertexBuffer().setHardwareMappingHint(NewMappingHint);
+00085             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
+00086                 getIndexBuffer().setHardwareMappingHint(NewMappingHint);
+00087         }
+00088 
+00090         virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
+00091         {
+00092             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
+00093                 getVertexBuffer().setDirty();
+00094             if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
+00095                 getIndexBuffer().setDirty();
+00096         }
+00097 
+00098         virtual u32 getChangedID_Vertex() const
+00099         {
+00100             return getVertexBuffer().getChangedID();
+00101         }
+00102 
+00103         virtual u32 getChangedID_Index() const
+00104         {
+00105             return getIndexBuffer().getChangedID();
+00106         }
+00107 
+00108         // ------------------- Old interface -------------------  //
+00109 
+00111 
+00112         virtual video::E_VERTEX_TYPE getVertexType() const
+00113         {
+00114             return getVertexBuffer().getType();
+00115         }
+00116 
+00118 
+00120         virtual const void* getVertices() const
+00121         {
+00122             return getVertexBuffer().getData();
+00123         }
+00124 
+00126 
+00128         virtual void* getVertices()
+00129         {
+00130             return getVertexBuffer().getData();
+00131         }
+00132 
+00134 
+00135         virtual u32 getVertexCount() const
+00136         {
+00137             return getVertexBuffer().size();
+00138         }
+00139 
+00141 
+00142         virtual video::E_INDEX_TYPE getIndexType() const
+00143         {
+00144             return getIndexBuffer().getType();
+00145         }
+00146 
+00148 
+00149         virtual const u16* getIndices() const
+00150         {
+00151             return (u16*)getIndexBuffer().getData();
+00152         }
+00153 
+00155 
+00156         virtual u16* getIndices()
+00157         {
+00158             return (u16*)getIndexBuffer().getData();
+00159         }
+00160 
+00162 
+00163         virtual u32 getIndexCount() const
+00164         {
+00165             return getIndexBuffer().size();
+00166         }
+00167 
+00169         virtual const core::vector3df& getPosition(u32 i) const
+00170         {
+00171             return getVertexBuffer()[i].Pos;
+00172         }
+00173 
+00175         virtual core::vector3df& getPosition(u32 i)
+00176         {
+00177             return getVertexBuffer()[i].Pos;
+00178         }
+00179 
+00181         virtual const core::vector2df& getTCoords(u32 i) const
+00182         {
+00183             return getVertexBuffer()[i].TCoords;
+00184         }
+00185 
+00187         virtual core::vector2df& getTCoords(u32 i)
+00188         {
+00189             return getVertexBuffer()[i].TCoords;
+00190         }
+00191 
+00193         virtual const core::vector3df& getNormal(u32 i) const
+00194         {
+00195             return getVertexBuffer()[i].Normal;
+00196         }
+00197 
+00199         virtual core::vector3df& getNormal(u32 i)
+00200         {
+00201             return getVertexBuffer()[i].Normal;
+00202         }
+00203     };
+00204 
+00205 
+00206 } // end namespace scene
+00207 } // end namespace irr
+00208 
+00209 #endif
+00210 
+00211 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h.html new file mode 100644 index 0000000..afb8d33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h.html @@ -0,0 +1,240 @@ + + + + +Irrlicht 3D Engine: IEventReceiver.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IEventReceiver.h File Reference
+
+
+
#include "ILogger.h"
+#include "Keycodes.h"
+#include "irrString.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h_source.html new file mode 100644 index 0000000..c81f7f0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_event_receiver_8h_source.html @@ -0,0 +1,435 @@ + + + + +Irrlicht 3D Engine: IEventReceiver.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IEventReceiver.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_EVENT_RECEIVER_H_INCLUDED__
+00006 #define __I_EVENT_RECEIVER_H_INCLUDED__
+00007 
+00008 #include "ILogger.h"
+00009 #include "Keycodes.h"
+00010 #include "irrString.h"
+00011 
+00012 namespace irr
+00013 {
+00015     enum EEVENT_TYPE
+00016     {
+00018 
+00022         EET_GUI_EVENT = 0,
+00023 
+00025 
+00030         EET_MOUSE_INPUT_EVENT,
+00031 
+00033 
+00035         EET_KEY_INPUT_EVENT,
+00036 
+00038 
+00045         EET_JOYSTICK_INPUT_EVENT,
+00046 
+00048 
+00050         EET_LOG_TEXT_EVENT,
+00051 
+00053 
+00065         EET_USER_EVENT,
+00066 
+00069         EGUIET_FORCE_32_BIT = 0x7fffffff
+00070 
+00071     };
+00072 
+00074     enum EMOUSE_INPUT_EVENT
+00075     {
+00077         EMIE_LMOUSE_PRESSED_DOWN = 0,
+00078 
+00080         EMIE_RMOUSE_PRESSED_DOWN,
+00081 
+00083         EMIE_MMOUSE_PRESSED_DOWN,
+00084 
+00086         EMIE_LMOUSE_LEFT_UP,
+00087 
+00089         EMIE_RMOUSE_LEFT_UP,
+00090 
+00092         EMIE_MMOUSE_LEFT_UP,
+00093 
+00095         EMIE_MOUSE_MOVED,
+00096 
+00099         EMIE_MOUSE_WHEEL,
+00100 
+00103         EMIE_LMOUSE_DOUBLE_CLICK,
+00104 
+00107         EMIE_RMOUSE_DOUBLE_CLICK,
+00108 
+00111         EMIE_MMOUSE_DOUBLE_CLICK,
+00112 
+00115         EMIE_LMOUSE_TRIPLE_CLICK,
+00116 
+00119         EMIE_RMOUSE_TRIPLE_CLICK,
+00120 
+00123         EMIE_MMOUSE_TRIPLE_CLICK,
+00124 
+00126         EMIE_COUNT
+00127     };
+00128 
+00130     enum E_MOUSE_BUTTON_STATE_MASK
+00131     {
+00132         EMBSM_LEFT    = 0x01,
+00133         EMBSM_RIGHT   = 0x02,
+00134         EMBSM_MIDDLE  = 0x04,
+00135 
+00137         EMBSM_EXTRA1  = 0x08,
+00138 
+00140         EMBSM_EXTRA2  = 0x10,
+00141 
+00142         EMBSM_FORCE_32_BIT = 0x7fffffff
+00143     };
+00144 
+00145     namespace gui
+00146     {
+00147 
+00148         class IGUIElement;
+00149 
+00151         enum EGUI_EVENT_TYPE
+00152         {
+00154 
+00156             EGET_ELEMENT_FOCUS_LOST = 0,
+00157 
+00159 
+00160             EGET_ELEMENT_FOCUSED,
+00161 
+00163 
+00164             EGET_ELEMENT_HOVERED,
+00165 
+00167 
+00168             EGET_ELEMENT_LEFT,
+00169 
+00171 
+00173             EGET_ELEMENT_CLOSED,
+00174 
+00176             EGET_BUTTON_CLICKED,
+00177 
+00179             EGET_SCROLL_BAR_CHANGED,
+00180 
+00182             EGET_CHECKBOX_CHANGED,
+00183 
+00185 
+00186             EGET_LISTBOX_CHANGED,
+00187 
+00189 
+00190             EGET_LISTBOX_SELECTED_AGAIN,
+00191 
+00193             EGET_FILE_SELECTED,
+00194 
+00196             EGET_DIRECTORY_SELECTED,
+00197 
+00199             EGET_FILE_CHOOSE_DIALOG_CANCELLED,
+00200 
+00202             EGET_MESSAGEBOX_YES,
+00203 
+00205             EGET_MESSAGEBOX_NO,
+00206 
+00208             EGET_MESSAGEBOX_OK,
+00209 
+00211             EGET_MESSAGEBOX_CANCEL,
+00212 
+00214             EGET_EDITBOX_ENTER,
+00215 
+00217             EGET_EDITBOX_CHANGED,
+00218 
+00220             EGET_EDITBOX_MARKING_CHANGED,
+00221 
+00223             EGET_TAB_CHANGED,
+00224 
+00226             EGET_MENU_ITEM_SELECTED,
+00227 
+00229             EGET_COMBO_BOX_CHANGED,
+00230 
+00232             EGET_SPINBOX_CHANGED,
+00233 
+00235             EGET_TABLE_CHANGED,
+00236             EGET_TABLE_HEADER_CHANGED,
+00237             EGET_TABLE_SELECTED_AGAIN,
+00238 
+00240             EGET_TREEVIEW_NODE_DESELECT,
+00241 
+00243             EGET_TREEVIEW_NODE_SELECT,
+00244 
+00246             EGET_TREEVIEW_NODE_EXPAND,
+00247 
+00249             EGET_TREEVIEW_NODE_COLLAPSE,
+00250 
+00253             EGET_TREEVIEW_NODE_COLLAPS = EGET_TREEVIEW_NODE_COLLAPSE,
+00254 
+00256             EGET_COUNT
+00257         };
+00258     } // end namespace gui
+00259 
+00260 
+00262 struct SEvent
+00263 {
+00265     struct SGUIEvent
+00266     {
+00268         gui::IGUIElement* Caller;
+00269 
+00271         gui::IGUIElement* Element;
+00272 
+00274         gui::EGUI_EVENT_TYPE EventType;
+00275 
+00276     };
+00277 
+00279     struct SMouseInput
+00280     {
+00282         s32 X;
+00283 
+00285         s32 Y;
+00286 
+00288 
+00289         f32 Wheel;
+00290 
+00292         bool Shift:1;
+00293 
+00295         bool Control:1;
+00296 
+00300         u32 ButtonStates;
+00301 
+00303         bool isLeftPressed() const { return 0 != ( ButtonStates & EMBSM_LEFT ); }
+00304 
+00306         bool isRightPressed() const { return 0 != ( ButtonStates & EMBSM_RIGHT ); }
+00307 
+00309         bool isMiddlePressed() const { return 0 != ( ButtonStates & EMBSM_MIDDLE ); }
+00310 
+00312         EMOUSE_INPUT_EVENT Event;
+00313     };
+00314 
+00316     struct SKeyInput
+00317     {
+00319         wchar_t Char;
+00320 
+00322         EKEY_CODE Key;
+00323 
+00325         bool PressedDown:1;
+00326 
+00328         bool Shift:1;
+00329 
+00331         bool Control:1;
+00332     };
+00333 
+00335 
+00342     struct SJoystickEvent
+00343     {
+00344         enum
+00345         {
+00346             NUMBER_OF_BUTTONS = 32,
+00347 
+00348             AXIS_X = 0, // e.g. analog stick 1 left to right
+00349             AXIS_Y,     // e.g. analog stick 1 top to bottom
+00350             AXIS_Z,     // e.g. throttle, or analog 2 stick 2 left to right
+00351             AXIS_R,     // e.g. rudder, or analog 2 stick 2 top to bottom
+00352             AXIS_U,
+00353             AXIS_V,
+00354             NUMBER_OF_AXES
+00355         };
+00356 
+00359         u32 ButtonStates;
+00360 
+00369         s16 Axis[NUMBER_OF_AXES];
+00370 
+00376         u16 POV;
+00377 
+00379 
+00381         u8 Joystick;
+00382 
+00384         bool IsButtonPressed(u32 button) const
+00385         {
+00386             if(button >= (u32)NUMBER_OF_BUTTONS)
+00387                 return false;
+00388 
+00389             return (ButtonStates & (1 << button)) ? true : false;
+00390         }
+00391     };
+00392 
+00393 
+00395     struct SLogEvent
+00396     {
+00398         const c8* Text;
+00399 
+00401         ELOG_LEVEL Level;
+00402     };
+00403 
+00405     struct SUserEvent
+00406     {
+00408         s32 UserData1;
+00409 
+00411         s32 UserData2;
+00412     };
+00413 
+00414     EEVENT_TYPE EventType;
+00415     union
+00416     {
+00417         struct SGUIEvent GUIEvent;
+00418         struct SMouseInput MouseInput;
+00419         struct SKeyInput KeyInput;
+00420         struct SJoystickEvent JoystickEvent;
+00421         struct SLogEvent LogEvent;
+00422         struct SUserEvent UserEvent;
+00423     };
+00424 
+00425 };
+00426 
+00428 
+00433 class IEventReceiver
+00434 {
+00435 public:
+00436 
+00438     virtual ~IEventReceiver() {}
+00439 
+00441 
+00446     virtual bool OnEvent(const SEvent& event) = 0;
+00447 };
+00448 
+00449 
+00451 struct SJoystickInfo
+00452 {
+00454 
+00457     u8              Joystick;
+00458 
+00460     core::stringc   Name;
+00461 
+00463     u32             Buttons;
+00464 
+00466 
+00468     u32             Axes;
+00469 
+00471 
+00473     enum
+00474     {
+00476         POV_HAT_PRESENT,
+00477 
+00479         POV_HAT_ABSENT,
+00480 
+00482         POV_HAT_UNKNOWN
+00483     } PovHat;
+00484 }; // struct SJoystickInfo
+00485 
+00486 
+00487 } // end namespace irr
+00488 
+00489 #endif
+00490 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h.html new file mode 100644 index 0000000..ebccf99 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: IFileArchive.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IFileArchive.h File Reference
+
+
+
#include "IReadFile.h"
+#include "IFileList.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h_source.html new file mode 100644 index 0000000..10cdfb1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_file_archive_8h_source.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: IFileArchive.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IFileArchive.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt/ Thomas Alten
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_FILE_ARCHIVE_H_INCLUDED__
+00006 #define __I_FILE_ARCHIVE_H_INCLUDED__
+00007 
+00008 #include "IReadFile.h"
+00009 #include "IFileList.h"
+00010 
+00011 namespace irr
+00012 {
+00013 
+00014 namespace io
+00015 {
+00016 
+00018 enum EFileSystemType
+00019 {
+00020     FILESYSTEM_NATIVE = 0,  // Native OS FileSystem
+00021     FILESYSTEM_VIRTUAL  // Virtual FileSystem
+00022 };
+00023 
+00025 enum E_FILE_ARCHIVE_TYPE
+00026 {
+00028     EFAT_ZIP     = MAKE_IRR_ID('Z','I','P', 0),
+00029 
+00031     EFAT_GZIP    = MAKE_IRR_ID('g','z','i','p'),
+00032 
+00034     EFAT_FOLDER  = MAKE_IRR_ID('f','l','d','r'),
+00035 
+00037     EFAT_PAK     = MAKE_IRR_ID('P','A','K', 0),
+00038 
+00040     EFAT_NPK     = MAKE_IRR_ID('N','P','K', 0),
+00041 
+00043     EFAT_TAR     = MAKE_IRR_ID('T','A','R', 0),
+00044 
+00046     EFAT_WAD     = MAKE_IRR_ID('W','A','D', 0),
+00047 
+00049     EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
+00050 };
+00051 
+00053 class IFileArchive : public virtual IReferenceCounted
+00054 {
+00055 public:
+00056 
+00058 
+00062     virtual IReadFile* createAndOpenFile(const path& filename) =0;
+00063 
+00065 
+00068     virtual IReadFile* createAndOpenFile(u32 index) =0;
+00069 
+00071 
+00073     virtual const IFileList* getFileList() const =0;
+00074 
+00076     virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; }
+00077 
+00079 
+00083     core::stringc Password;
+00084 };
+00085 
+00087 
+00091 class IArchiveLoader : public virtual IReferenceCounted
+00092 {
+00093 public:
+00095 
+00098     virtual bool isALoadableFileFormat(const path& filename) const =0;
+00099 
+00101 
+00104     virtual bool isALoadableFileFormat(io::IReadFile* file) const =0;
+00105 
+00107 
+00110     virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0;
+00111 
+00113 
+00117     virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0;
+00118 
+00120 
+00124     virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const =0;
+00125 };
+00126 
+00127 
+00128 } // end namespace io
+00129 } // end namespace irr
+00130 
+00131 #endif
+00132 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h.html new file mode 100644 index 0000000..3da7ba0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IFileList.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IFileList.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h_source.html new file mode 100644 index 0000000..3bcab09 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_file_list_8h_source.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: IFileList.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IFileList.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_FILE_LIST_H_INCLUDED__
+00006 #define __I_FILE_LIST_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00015 
+00017 
+00019 class IFileList : public virtual IReferenceCounted
+00020 {
+00021 public:
+00023 
+00024     virtual u32 getFileCount() const = 0;
+00025 
+00027 
+00031     virtual const io::path& getFileName(u32 index) const = 0;
+00032 
+00034 
+00037     virtual const io::path& getFullFileName(u32 index) const = 0;
+00038 
+00040 
+00043     virtual u32 getFileSize(u32 index) const = 0;
+00044 
+00046 
+00049     virtual u32 getFileOffset(u32 index) const = 0;
+00050 
+00052 
+00058     virtual u32 getID(u32 index) const = 0;
+00059 
+00061 
+00064     virtual bool isDirectory(u32 index) const = 0;
+00065 
+00067 
+00072     virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0;
+00073 
+00075     virtual const io::path& getPath() const = 0;
+00076 
+00078 
+00083     virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0) = 0;
+00084 
+00086     virtual void sort() = 0;
+00087 };
+00088 
+00089 } // end namespace irr
+00090 } // end namespace io
+00091 
+00092 
+00093 #endif
+00094 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h.html new file mode 100644 index 0000000..c00dcf9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IFileSystem.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IFileSystem.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "IXMLReader.h"
+#include "IFileArchive.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h_source.html new file mode 100644 index 0000000..78283d7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_file_system_8h_source.html @@ -0,0 +1,286 @@ + + + + +Irrlicht 3D Engine: IFileSystem.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IFileSystem.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_FILE_SYSTEM_H_INCLUDED__
+00006 #define __I_FILE_SYSTEM_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "IXMLReader.h"
+00010 #include "IFileArchive.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace video
+00015 {
+00016     class IVideoDriver;
+00017 } // end namespace video
+00018 namespace io
+00019 {
+00020 
+00021 class IReadFile;
+00022 class IWriteFile;
+00023 class IFileList;
+00024 class IXMLWriter;
+00025 class IAttributes;
+00026 
+00027 
+00029 
+00032 class IFileSystem : public virtual IReferenceCounted
+00033 {
+00034 public:
+00035 
+00037 
+00041     virtual IReadFile* createAndOpenFile(const path& filename) =0;
+00042 
+00044 
+00054     virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0;
+00055 
+00057 
+00066     virtual IReadFile* createLimitReadFile(const path& fileName,
+00067             IReadFile* alreadyOpenedFile, long pos, long areaSize) =0;
+00068 
+00070 
+00081     virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0;
+00082 
+00083 
+00085 
+00092     virtual IWriteFile* createAndWriteFile(const path& filename, bool append=false) =0;
+00093 
+00095 
+00116     virtual bool addFileArchive(const path& filename, bool ignoreCase=true,
+00117             bool ignorePaths=true,
+00118             E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN,
+00119             const core::stringc& password="",
+00120             IFileArchive** retArchive=0) =0;
+00121 
+00123 
+00148     virtual bool addFileArchive(IReadFile* file, bool ignoreCase=true,
+00149             bool ignorePaths=true,
+00150             E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN,
+00151             const core::stringc& password="",
+00152             IFileArchive** retArchive=0) =0;
+00153 
+00155 
+00157     virtual bool addFileArchive(IFileArchive* archive) =0;
+00158 
+00160     virtual u32 getFileArchiveCount() const =0;
+00161 
+00163 
+00168     virtual bool removeFileArchive(u32 index) =0;
+00169 
+00171 
+00182     virtual bool removeFileArchive(const path& filename) =0;
+00183 
+00185 
+00190     virtual bool removeFileArchive(const IFileArchive* archive) =0;
+00191 
+00193 
+00196     virtual bool moveFileArchive(u32 sourceIndex, s32 relative) =0;
+00197 
+00199     virtual IFileArchive* getFileArchive(u32 index) =0;
+00200 
+00202 
+00204     virtual void addArchiveLoader(IArchiveLoader* loader) =0;
+00205 
+00207     virtual u32 getArchiveLoaderCount() const = 0;
+00208 
+00210 
+00213     virtual IArchiveLoader* getArchiveLoader(u32 index) const = 0;
+00214 
+00216 
+00228     _IRR_DEPRECATED_ virtual bool addZipFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
+00229     {
+00230         return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_ZIP);
+00231     }
+00232 
+00234 
+00244     _IRR_DEPRECATED_ virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
+00245     {
+00246         return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_FOLDER);
+00247     }
+00248 
+00250 
+00262     _IRR_DEPRECATED_ virtual bool addPakFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
+00263     {
+00264         return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_PAK);
+00265     }
+00266 
+00268 
+00269     virtual const path& getWorkingDirectory() =0;
+00270 
+00272 
+00276     virtual bool changeWorkingDirectoryTo(const path& newDirectory) =0;
+00277 
+00279 
+00281     virtual path getAbsolutePath(const path& filename) const =0;
+00282 
+00284 
+00286     virtual path getFileDir(const path& filename) const =0;
+00287 
+00289 
+00293     virtual path getFileBasename(const path& filename, bool keepExtension=true) const =0;
+00294 
+00296     virtual path& flattenFilename(path& directory, const path& root="/") const =0;
+00297 
+00299     virtual path getRelativeFilename(const path& filename, const path& directory) const =0;
+00300 
+00302 
+00305     virtual IFileList* createFileList() =0;
+00306 
+00308 
+00311     virtual IFileList* createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths) =0;
+00312 
+00314     virtual EFileSystemType setFileListSystem(EFileSystemType listType) =0;
+00315 
+00317 
+00319     virtual bool existFile(const path& filename) const =0;
+00320 
+00322 
+00328     virtual IXMLReader* createXMLReader(const path& filename) =0;
+00329 
+00331 
+00337     virtual IXMLReader* createXMLReader(IReadFile* file) =0;
+00338 
+00340 
+00346     virtual IXMLReaderUTF8* createXMLReaderUTF8(const path& filename) =0;
+00347 
+00349 
+00355     virtual IXMLReaderUTF8* createXMLReaderUTF8(IReadFile* file) =0;
+00356 
+00358 
+00362     virtual IXMLWriter* createXMLWriter(const path& filename) =0;
+00363 
+00365 
+00369     virtual IXMLWriter* createXMLWriter(IWriteFile* file) =0;
+00370 
+00372 
+00377     virtual IAttributes* createEmptyAttributes(video::IVideoDriver* driver=0) =0;
+00378 };
+00379 
+00380 
+00381 } // end namespace io
+00382 } // end namespace irr
+00383 
+00384 #endif
+00385 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h.html new file mode 100644 index 0000000..2163603 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IGPUProgrammingServices.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGPUProgrammingServices.h File Reference
+
+
+
#include "EShaderTypes.h"
+#include "EMaterialTypes.h"
+#include "EPrimitiveTypes.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h_source.html new file mode 100644 index 0000000..4551e75 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_p_u_programming_services_8h_source.html @@ -0,0 +1,383 @@ + + + + +Irrlicht 3D Engine: IGPUProgrammingServices.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGPUProgrammingServices.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GPU_PROGRAMMING_SERVICES_H_INCLUDED__
+00006 #define __I_GPU_PROGRAMMING_SERVICES_H_INCLUDED__
+00007 
+00008 #include "EShaderTypes.h"
+00009 #include "EMaterialTypes.h"
+00010 #include "EPrimitiveTypes.h"
+00011 #include "path.h"
+00012 
+00013 namespace irr
+00014 {
+00015 
+00016 namespace io
+00017 {
+00018     class IReadFile;
+00019 } // end namespace io
+00020 
+00021 namespace video
+00022 {
+00023 
+00024 class IVideoDriver;
+00025 class IShaderConstantSetCallBack;
+00026 
+00028 enum E_GPU_SHADING_LANGUAGE
+00029 {
+00031     EGSL_DEFAULT = 0,
+00032 
+00034     EGSL_CG
+00035 };
+00036 
+00038 class IGPUProgrammingServices
+00039 {
+00040 public:
+00041 
+00043     virtual ~IGPUProgrammingServices() {}
+00044 
+00046 
+00087     virtual s32 addHighLevelShaderMaterial(
+00088         const c8* vertexShaderProgram,
+00089         const c8* vertexShaderEntryPointName,
+00090         E_VERTEX_SHADER_TYPE vsCompileTarget,
+00091         const c8* pixelShaderProgram,
+00092         const c8* pixelShaderEntryPointName,
+00093         E_PIXEL_SHADER_TYPE psCompileTarget,
+00094         const c8* geometryShaderProgram,
+00095         const c8* geometryShaderEntryPointName = "main",
+00096         E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
+00097         scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
+00098         scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
+00099         u32 verticesOut = 0,
+00100         IShaderConstantSetCallBack* callback = 0,
+00101         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00102         s32 userData = 0,
+00103         E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
+00104 
+00106     s32 addHighLevelShaderMaterial(
+00107         const c8* vertexShaderProgram,
+00108         const c8* vertexShaderEntryPointName="main",
+00109         E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1,
+00110         const c8* pixelShaderProgram=0,
+00111         const c8* pixelShaderEntryPointName="main",
+00112         E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1,
+00113         IShaderConstantSetCallBack* callback=0,
+00114         E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
+00115         s32 userData=0,
+00116         E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)
+00117     {
+00118         return addHighLevelShaderMaterial(
+00119             vertexShaderProgram, vertexShaderEntryPointName,
+00120             vsCompileTarget, pixelShaderProgram,
+00121             pixelShaderEntryPointName, psCompileTarget,
+00122             0, "main", EGST_GS_4_0,
+00123             scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
+00124             callback, baseMaterial, userData, shadingLang);
+00125     }
+00126 
+00128 
+00131     s32 addHighLevelShaderMaterial(
+00132         const c8* vertexShaderProgram,
+00133         const c8* pixelShaderProgram=0,
+00134         IShaderConstantSetCallBack* callback=0,
+00135         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00136         s32 userData=0)
+00137     {
+00138         return addHighLevelShaderMaterial(
+00139             vertexShaderProgram, "main",
+00140             EVST_VS_1_1, pixelShaderProgram,
+00141             "main", EPST_PS_1_1,
+00142             0, "main", EGST_GS_4_0,
+00143             scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
+00144             callback, baseMaterial, userData);
+00145     }
+00146 
+00148 
+00151     s32 addHighLevelShaderMaterial(
+00152         const c8* vertexShaderProgram,
+00153         const c8* pixelShaderProgram = 0,
+00154         const c8* geometryShaderProgram = 0,
+00155         scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
+00156         scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
+00157         u32 verticesOut = 0,
+00158         IShaderConstantSetCallBack* callback = 0,
+00159         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00160         s32 userData = 0 )
+00161     {
+00162         return addHighLevelShaderMaterial(
+00163             vertexShaderProgram, "main",
+00164             EVST_VS_1_1, pixelShaderProgram,
+00165             "main", EPST_PS_1_1,
+00166             geometryShaderProgram, "main", EGST_GS_4_0,
+00167             inType, outType, verticesOut,
+00168             callback, baseMaterial, userData);
+00169     }
+00170 
+00172 
+00214     virtual s32 addHighLevelShaderMaterialFromFiles(
+00215         const io::path& vertexShaderProgramFileName,
+00216         const c8* vertexShaderEntryPointName,
+00217         E_VERTEX_SHADER_TYPE vsCompileTarget,
+00218         const io::path& pixelShaderProgramFileName,
+00219         const c8* pixelShaderEntryPointName,
+00220         E_PIXEL_SHADER_TYPE psCompileTarget,
+00221         const io::path& geometryShaderProgramFileName,
+00222         const c8* geometryShaderEntryPointName = "main",
+00223         E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
+00224         scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
+00225         scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
+00226         u32 verticesOut = 0,
+00227         IShaderConstantSetCallBack* callback = 0,
+00228         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00229         s32 userData = 0,
+00230         E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
+00231 
+00233     s32 addHighLevelShaderMaterialFromFiles(
+00234         const io::path& vertexShaderProgramFileName,
+00235         const c8* vertexShaderEntryPointName = "main",
+00236         E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
+00237         const io::path& pixelShaderProgramFileName = "",
+00238         const c8* pixelShaderEntryPointName = "main",
+00239         E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
+00240         IShaderConstantSetCallBack* callback = 0,
+00241         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00242         s32 userData = 0,
+00243         E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT)
+00244     {
+00245         return addHighLevelShaderMaterialFromFiles(
+00246             vertexShaderProgramFileName, vertexShaderEntryPointName,
+00247             vsCompileTarget, pixelShaderProgramFileName,
+00248             pixelShaderEntryPointName, psCompileTarget,
+00249             "", "main", EGST_GS_4_0,
+00250             scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
+00251             callback, baseMaterial, userData, shadingLang);
+00252     }
+00253 
+00255 
+00258     s32 addHighLevelShaderMaterialFromFiles(
+00259         const io::path& vertexShaderProgramFileName,
+00260         const io::path& pixelShaderProgramFileName = "",
+00261         IShaderConstantSetCallBack* callback = 0,
+00262         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00263         s32 userData = 0 )
+00264     {
+00265         return addHighLevelShaderMaterialFromFiles(
+00266             vertexShaderProgramFileName, "main",
+00267             EVST_VS_1_1, pixelShaderProgramFileName,
+00268             "main", EPST_PS_1_1,
+00269             "", "main", EGST_GS_4_0,
+00270             scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
+00271             callback, baseMaterial, userData);
+00272     }
+00273 
+00275 
+00278     s32 addHighLevelShaderMaterialFromFiles(
+00279         const io::path& vertexShaderProgramFileName,
+00280         const io::path& pixelShaderProgramFileName = "",
+00281         const io::path& geometryShaderProgramFileName = "",
+00282         scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
+00283         scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
+00284         u32 verticesOut = 0,
+00285         IShaderConstantSetCallBack* callback = 0,
+00286         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00287         s32 userData = 0 )
+00288     {
+00289         return addHighLevelShaderMaterialFromFiles(
+00290             vertexShaderProgramFileName, "main",
+00291             EVST_VS_1_1, pixelShaderProgramFileName,
+00292             "main", EPST_PS_1_1,
+00293             geometryShaderProgramFileName, "main", EGST_GS_4_0,
+00294             inType, outType, verticesOut,
+00295             callback, baseMaterial, userData);
+00296     }
+00297 
+00299 
+00339     virtual s32 addHighLevelShaderMaterialFromFiles(
+00340         io::IReadFile* vertexShaderProgram,
+00341         const c8* vertexShaderEntryPointName,
+00342         E_VERTEX_SHADER_TYPE vsCompileTarget,
+00343         io::IReadFile* pixelShaderProgram,
+00344         const c8* pixelShaderEntryPointName,
+00345         E_PIXEL_SHADER_TYPE psCompileTarget,
+00346         io::IReadFile* geometryShaderProgram,
+00347         const c8* geometryShaderEntryPointName = "main",
+00348         E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
+00349         scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
+00350         scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
+00351         u32 verticesOut = 0,
+00352         IShaderConstantSetCallBack* callback = 0,
+00353         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00354         s32 userData = 0,
+00355         E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
+00356 
+00358     s32 addHighLevelShaderMaterialFromFiles(
+00359         io::IReadFile* vertexShaderProgram,
+00360         const c8* vertexShaderEntryPointName = "main",
+00361         E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
+00362         io::IReadFile* pixelShaderProgram = 0,
+00363         const c8* pixelShaderEntryPointName = "main",
+00364         E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
+00365         IShaderConstantSetCallBack* callback = 0,
+00366         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00367         s32 userData = 0,
+00368         E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT)
+00369     {
+00370         return addHighLevelShaderMaterialFromFiles(
+00371             vertexShaderProgram, vertexShaderEntryPointName,
+00372             vsCompileTarget, pixelShaderProgram,
+00373             pixelShaderEntryPointName, psCompileTarget,
+00374             0, "main", EGST_GS_4_0,
+00375             scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
+00376             callback, baseMaterial, userData, shadingLang);
+00377     }
+00378 
+00380 
+00413     virtual s32 addShaderMaterial(const c8* vertexShaderProgram = 0,
+00414         const c8* pixelShaderProgram = 0,
+00415         IShaderConstantSetCallBack* callback = 0,
+00416         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00417         s32 userData = 0) = 0;
+00418 
+00420 
+00437     virtual s32 addShaderMaterialFromFiles(io::IReadFile* vertexShaderProgram,
+00438         io::IReadFile* pixelShaderProgram,
+00439         IShaderConstantSetCallBack* callback = 0,
+00440         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00441         s32 userData = 0) = 0;
+00442 
+00444 
+00462     virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName,
+00463         const io::path& pixelShaderProgramFileName,
+00464         IShaderConstantSetCallBack* callback = 0,
+00465         E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
+00466         s32 userData = 0) = 0;
+00467 };
+00468 
+00469 
+00470 } // end namespace video
+00471 } // end namespace irr
+00472 
+00473 #endif
+00474 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h.html new file mode 100644 index 0000000..7d6ad73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h.html @@ -0,0 +1,163 @@ + + + + +Irrlicht 3D Engine: IGUIButton.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIButton.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h_source.html new file mode 100644 index 0000000..6d5cdd5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_button_8h_source.html @@ -0,0 +1,228 @@ + + + + +Irrlicht 3D Engine: IGUIButton.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIButton.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_BUTTON_H_INCLUDED__
+00006 #define __I_GUI_BUTTON_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00013 namespace video
+00014 {
+00015     class ITexture;
+00016 } // end namespace video
+00017 
+00018 namespace gui
+00019 {
+00020     class IGUIFont;
+00021     class IGUISpriteBank;
+00022 
+00023     enum EGUI_BUTTON_STATE
+00024     {
+00026         EGBS_BUTTON_UP=0,
+00028         EGBS_BUTTON_DOWN,
+00030         EGBS_BUTTON_MOUSE_OVER,
+00032         EGBS_BUTTON_MOUSE_OFF,
+00034         EGBS_BUTTON_FOCUSED,
+00036         EGBS_BUTTON_NOT_FOCUSED,
+00038         EGBS_COUNT
+00039     };
+00040 
+00042     const c8* const GUIButtonStateNames[] =
+00043     {
+00044         "buttonUp",
+00045         "buttonDown",
+00046         "buttonMouseOver",
+00047         "buttonMouseOff",
+00048         "buttonFocused",
+00049         "buttonNotFocused",
+00050         0,
+00051         0,
+00052     };
+00053 
+00055 
+00058     class IGUIButton : public IGUIElement
+00059     {
+00060     public:
+00061 
+00063         IGUIButton(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00064             : IGUIElement(EGUIET_BUTTON, environment, parent, id, rectangle) {}
+00065 
+00067 
+00069         virtual void setOverrideFont(IGUIFont* font=0) = 0;
+00070 
+00072 
+00073         virtual IGUIFont* getOverrideFont(void) const = 0;
+00074 
+00076 
+00078         virtual IGUIFont* getActiveFont() const = 0;
+00079 
+00081 
+00082         virtual void setImage(video::ITexture* image=0) = 0;
+00083 
+00085 
+00087         virtual void setImage(video::ITexture* image, const core::rect<s32>& pos) = 0;
+00088 
+00090 
+00093         virtual void setPressedImage(video::ITexture* image=0) = 0;
+00094 
+00096 
+00098         virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos) = 0;
+00099 
+00101         virtual void setSpriteBank(IGUISpriteBank* bank=0) = 0;
+00102 
+00104 
+00110         virtual void setSprite(EGUI_BUTTON_STATE state, s32 index,
+00111                 video::SColor color=video::SColor(255,255,255,255), bool loop=false) = 0;
+00112 
+00114 
+00116         virtual void setIsPushButton(bool isPushButton=true) = 0;
+00117 
+00119         virtual void setPressed(bool pressed=true) = 0;
+00120 
+00122         virtual bool isPressed() const = 0;
+00123 
+00125         virtual void setUseAlphaChannel(bool useAlphaChannel=true) = 0;
+00126 
+00128         virtual bool isAlphaChannelUsed() const = 0;
+00129 
+00131         virtual bool isPushButton() const = 0;
+00132 
+00134         virtual void setDrawBorder(bool border=true) = 0;
+00135 
+00137         virtual bool isDrawingBorder() const = 0;
+00138 
+00140         virtual void setScaleImage(bool scaleImage=true) = 0;
+00141 
+00143         virtual bool isScalingImage() const = 0;
+00144     };
+00145 
+00146 
+00147 } // end namespace gui
+00148 } // end namespace irr
+00149 
+00150 #endif
+00151 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h.html new file mode 100644 index 0000000..3771a21 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IGUICheckBox.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUICheckBox.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h_source.html new file mode 100644 index 0000000..b96e979 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_check_box_8h_source.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IGUICheckBox.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUICheckBox.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_CHECKBOX_H_INCLUDED__
+00006 #define __I_GUI_CHECKBOX_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014 
+00016 
+00019     class IGUICheckBox : public IGUIElement
+00020     {
+00021     public:
+00022 
+00024         IGUICheckBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00025             : IGUIElement(EGUIET_CHECK_BOX, environment, parent, id, rectangle) {}
+00026 
+00028         virtual void setChecked(bool checked) = 0;
+00029 
+00031         virtual bool isChecked() const = 0;
+00032     };
+00033 
+00034 } // end namespace gui
+00035 } // end namespace irr
+00036 
+00037 #endif
+00038 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h.html new file mode 100644 index 0000000..9108c55 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IGUIColorSelectDialog.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIColorSelectDialog.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h_source.html new file mode 100644 index 0000000..2a3fa03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_color_select_dialog_8h_source.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: IGUIColorSelectDialog.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIColorSelectDialog.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__
+00006 #define __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014 
+00016     class IGUIColorSelectDialog : public IGUIElement
+00017     {
+00018     public:
+00019 
+00021         IGUIColorSelectDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00022             : IGUIElement(EGUIET_COLOR_SELECT_DIALOG, environment, parent, id, rectangle) {}
+00023     };
+00024 
+00025 
+00026 } // end namespace gui
+00027 } // end namespace irr
+00028 
+00029 #endif
+00030 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h.html new file mode 100644 index 0000000..3e61c44 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IGUIComboBox.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIComboBox.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h_source.html new file mode 100644 index 0000000..35bb0d9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_combo_box_8h_source.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: IGUIComboBox.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIComboBox.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_COMBO_BOX_H_INCLUDED__
+00006 #define __I_GUI_COMBO_BOX_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014 
+00016 
+00019     class IGUIComboBox : public IGUIElement
+00020     {
+00021     public:
+00022 
+00024         IGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00025             : IGUIElement(EGUIET_COMBO_BOX, environment, parent, id, rectangle) {}
+00026 
+00028         virtual u32 getItemCount() const = 0;
+00029 
+00031         virtual const wchar_t* getItem(u32 idx) const = 0;
+00032 
+00034         virtual u32 getItemData(u32 idx) const = 0;
+00035 
+00037         virtual s32 getIndexForItemData(u32 data ) const = 0;
+00038 
+00040         virtual u32 addItem(const wchar_t* text, u32 data = 0) = 0;
+00041 
+00043 
+00044         virtual void removeItem(u32 idx) = 0;
+00045 
+00047         virtual void clear() = 0;
+00048 
+00050         virtual s32 getSelected() const = 0;
+00051 
+00053         virtual void setSelected(s32 idx) = 0;
+00054 
+00056 
+00060         virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
+00061 
+00063         virtual void setMaxSelectionRows(u32 max) = 0;
+00064 
+00066         virtual u32 getMaxSelectionRows() const = 0;
+00067     };
+00068 
+00069 
+00070 } // end namespace gui
+00071 } // end namespace irr
+00072 
+00073 #endif
+00074 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h.html new file mode 100644 index 0000000..59be491 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: IGUIContextMenu.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIContextMenu.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h_source.html new file mode 100644 index 0000000..94f655c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_context_menu_8h_source.html @@ -0,0 +1,218 @@ + + + + +Irrlicht 3D Engine: IGUIContextMenu.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIContextMenu.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__
+00006 #define __I_GUI_CONTEXT_MENU_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00016     enum ECONTEXT_MENU_CLOSE
+00017     {
+00019         ECMC_IGNORE = 0,
+00020 
+00022         ECMC_REMOVE = 1,
+00023 
+00025         ECMC_HIDE = 2
+00026 
+00027         // note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
+00028     };
+00029 
+00031 
+00035     class IGUIContextMenu : public IGUIElement
+00036     {
+00037     public:
+00038 
+00040         IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00041             : IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {}
+00042 
+00044         virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0;
+00045 
+00047         virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0;
+00048 
+00050         virtual u32 getItemCount() const = 0;
+00051 
+00053 
+00064         virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
+00065             bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
+00066 
+00068 
+00081         virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true,
+00082             bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
+00083 
+00085 
+00089         virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0;
+00090 
+00092         virtual void addSeparator() = 0;
+00093 
+00095 
+00096         virtual const wchar_t* getItemText(u32 idx) const = 0;
+00097 
+00099 
+00101         virtual void setItemText(u32 idx, const wchar_t* text) = 0;
+00102 
+00104 
+00105         virtual bool isItemEnabled(u32 idx) const = 0;
+00106 
+00108 
+00110         virtual void setItemEnabled(u32 idx, bool enabled) = 0;
+00111 
+00113 
+00115         virtual void setItemChecked(u32 idx, bool enabled) = 0;
+00116 
+00118 
+00119         virtual bool isItemChecked(u32 idx) const = 0;
+00120 
+00122 
+00123         virtual void removeItem(u32 idx) = 0;
+00124 
+00126         virtual void removeAllItems() = 0;
+00127 
+00129 
+00130         virtual s32 getSelectedItem() const = 0;
+00131 
+00133 
+00134         virtual s32 getItemCommandId(u32 idx) const = 0;
+00135 
+00137 
+00140         virtual void setItemCommandId(u32 idx, s32 id) = 0;
+00141 
+00143 
+00146         virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0;
+00147 
+00149         virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0;
+00150 
+00152         virtual bool getItemAutoChecking(u32 idx) const = 0;
+00153 
+00155         virtual void setEventParent(IGUIElement *parent) = 0;
+00156     };
+00157 
+00158 } // end namespace gui
+00159 } // end namespace irr
+00160 
+00161 #endif
+00162 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h.html new file mode 100644 index 0000000..dd2bafd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IGUIEditBox.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIEditBox.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h_source.html new file mode 100644 index 0000000..ebdf154 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_edit_box_8h_source.html @@ -0,0 +1,210 @@ + + + + +Irrlicht 3D Engine: IGUIEditBox.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIEditBox.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_EDIT_BOX_H_INCLUDED__
+00006 #define __I_GUI_EDIT_BOX_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "SColor.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015     class IGUIFont;
+00016 
+00018 
+00023     class IGUIEditBox : public IGUIElement
+00024     {
+00025     public:
+00026 
+00028         IGUIEditBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00029             : IGUIElement(EGUIET_EDIT_BOX, environment, parent, id, rectangle) {}
+00030 
+00032 
+00034         virtual void setOverrideFont(IGUIFont* font=0) = 0;
+00035 
+00037 
+00038         virtual IGUIFont* getOverrideFont() const = 0;
+00039 
+00041 
+00043         virtual IGUIFont* getActiveFont() const = 0;
+00044 
+00046 
+00053         virtual void setOverrideColor(video::SColor color) = 0;
+00054 
+00056         virtual video::SColor getOverrideColor() const = 0;
+00057 
+00059 
+00062         virtual void enableOverrideColor(bool enable) = 0;
+00063 
+00065 
+00066         virtual bool isOverrideColorEnabled(void) const = 0;
+00067 
+00069         virtual void setDrawBackground(bool draw) = 0;
+00070 
+00072 
+00073         virtual void setDrawBorder(bool border) = 0;
+00074 
+00076 
+00080         virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
+00081 
+00083 
+00085         virtual void setWordWrap(bool enable) = 0;
+00086 
+00088 
+00089         virtual bool isWordWrapEnabled() const = 0;
+00090 
+00092 
+00094         virtual void setMultiLine(bool enable) = 0;
+00095 
+00097 
+00098         virtual bool isMultiLineEnabled() const = 0;
+00099 
+00101 
+00102         virtual void setAutoScroll(bool enable) = 0;
+00103 
+00105 
+00106         virtual bool isAutoScrollEnabled() const = 0;
+00107 
+00109 
+00112         virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') = 0;
+00113 
+00115         virtual bool isPasswordBox() const = 0;
+00116 
+00118 
+00119         virtual core::dimension2du getTextDimension() = 0;
+00120 
+00122 
+00124         virtual void setMax(u32 max) = 0;
+00125 
+00127         virtual u32 getMax() const = 0;
+00128     };
+00129 
+00130 
+00131 } // end namespace gui
+00132 } // end namespace irr
+00133 
+00134 #endif
+00135 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h.html new file mode 100644 index 0000000..c89e579 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: IGUIElement.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIElement.h File Reference
+
+
+
#include "IAttributeExchangingObject.h"
+#include "irrList.h"
+#include "rect.h"
+#include "irrString.h"
+#include "IEventReceiver.h"
+#include "EGUIElementTypes.h"
+#include "EGUIAlignment.h"
+#include "IAttributes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h_source.html new file mode 100644 index 0000000..d304471 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_8h_source.html @@ -0,0 +1,1030 @@ + + + + +Irrlicht 3D Engine: IGUIElement.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIElement.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_ELEMENT_H_INCLUDED__
+00006 #define __I_GUI_ELEMENT_H_INCLUDED__
+00007 
+00008 #include "IAttributeExchangingObject.h"
+00009 #include "irrList.h"
+00010 #include "rect.h"
+00011 #include "irrString.h"
+00012 #include "IEventReceiver.h"
+00013 #include "EGUIElementTypes.h"
+00014 #include "EGUIAlignment.h"
+00015 #include "IAttributes.h"
+00016 
+00017 namespace irr
+00018 {
+00019 namespace gui
+00020 {
+00021 
+00022 class IGUIEnvironment;
+00023 
+00025 class IGUIElement : public virtual io::IAttributeExchangingObject, public IEventReceiver
+00026 {
+00027 public:
+00028 
+00030     IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment* environment, IGUIElement* parent,
+00031         s32 id, const core::rect<s32>& rectangle)
+00032         : Parent(0), RelativeRect(rectangle), AbsoluteRect(rectangle),
+00033         AbsoluteClippingRect(rectangle), DesiredRect(rectangle),
+00034         MaxSize(0,0), MinSize(1,1), IsVisible(true), IsEnabled(true),
+00035         IsSubElement(false), NoClip(false), ID(id), IsTabStop(false), TabOrder(-1), IsTabGroup(false),
+00036         AlignLeft(EGUIA_UPPERLEFT), AlignRight(EGUIA_UPPERLEFT), AlignTop(EGUIA_UPPERLEFT), AlignBottom(EGUIA_UPPERLEFT),
+00037         Environment(environment), Type(type)
+00038     {
+00039         #ifdef _DEBUG
+00040         setDebugName("IGUIElement");
+00041         #endif
+00042 
+00043         // if we were given a parent to attach to
+00044         if (parent)
+00045         {
+00046             parent->addChildToEnd(this);
+00047             recalculateAbsolutePosition(true);
+00048         }
+00049     }
+00050 
+00051 
+00053     virtual ~IGUIElement()
+00054     {
+00055         // delete all children
+00056         core::list<IGUIElement*>::Iterator it = Children.begin();
+00057         for (; it != Children.end(); ++it)
+00058         {
+00059             (*it)->Parent = 0;
+00060             (*it)->drop();
+00061         }
+00062     }
+00063 
+00064 
+00066     IGUIElement* getParent() const
+00067     {
+00068         return Parent;
+00069     }
+00070 
+00071 
+00073     core::rect<s32> getRelativePosition() const
+00074     {
+00075         return RelativeRect;
+00076     }
+00077 
+00078 
+00080 
+00081     void setRelativePosition(const core::rect<s32>& r)
+00082     {
+00083         if (Parent)
+00084         {
+00085             const core::rect<s32>& r2 = Parent->getAbsolutePosition();
+00086 
+00087             core::dimension2df d((f32)(r2.getSize().Width), (f32)(r2.getSize().Height));
+00088 
+00089             if (AlignLeft   == EGUIA_SCALE)
+00090                 ScaleRect.UpperLeftCorner.X = (f32)r.UpperLeftCorner.X / d.Width;
+00091             if (AlignRight  == EGUIA_SCALE)
+00092                 ScaleRect.LowerRightCorner.X = (f32)r.LowerRightCorner.X / d.Width;
+00093             if (AlignTop    == EGUIA_SCALE)
+00094                 ScaleRect.UpperLeftCorner.Y = (f32)r.UpperLeftCorner.Y / d.Height;
+00095             if (AlignBottom == EGUIA_SCALE)
+00096                 ScaleRect.LowerRightCorner.Y = (f32)r.LowerRightCorner.Y / d.Height;
+00097         }
+00098 
+00099         DesiredRect = r;
+00100         updateAbsolutePosition();
+00101     }
+00102 
+00104 
+00105     void setRelativePosition(const core::position2di & position)
+00106     {
+00107         const core::dimension2di mySize = RelativeRect.getSize();
+00108         const core::rect<s32> rectangle(position.X, position.Y,
+00109                         position.X + mySize.Width, position.Y + mySize.Height);
+00110         setRelativePosition(rectangle);
+00111     }
+00112 
+00113 
+00115 
+00119     void setRelativePositionProportional(const core::rect<f32>& r)
+00120     {
+00121         if (!Parent)
+00122             return;
+00123 
+00124         const core::dimension2di& d = Parent->getAbsolutePosition().getSize();
+00125 
+00126         DesiredRect = core::rect<s32>(
+00127                     core::floor32((f32)d.Width * r.UpperLeftCorner.X),
+00128                     core::floor32((f32)d.Height * r.UpperLeftCorner.Y),
+00129                     core::floor32((f32)d.Width * r.LowerRightCorner.X),
+00130                     core::floor32((f32)d.Height * r.LowerRightCorner.Y));
+00131 
+00132         ScaleRect = r;
+00133 
+00134         updateAbsolutePosition();
+00135     }
+00136 
+00137 
+00139     core::rect<s32> getAbsolutePosition() const
+00140     {
+00141         return AbsoluteRect;
+00142     }
+00143 
+00144 
+00146     core::rect<s32> getAbsoluteClippingRect() const
+00147     {
+00148         return AbsoluteClippingRect;
+00149     }
+00150 
+00151 
+00153 
+00154     void setNotClipped(bool noClip)
+00155     {
+00156         NoClip = noClip;
+00157         updateAbsolutePosition();
+00158     }
+00159 
+00160 
+00162 
+00163     bool isNotClipped() const
+00164     {
+00165         return NoClip;
+00166     }
+00167 
+00168 
+00170 
+00171     void setMaxSize(core::dimension2du size)
+00172     {
+00173         MaxSize = size;
+00174         updateAbsolutePosition();
+00175     }
+00176 
+00177 
+00179     void setMinSize(core::dimension2du size)
+00180     {
+00181         MinSize = size;
+00182         if (MinSize.Width < 1)
+00183             MinSize.Width = 1;
+00184         if (MinSize.Height < 1)
+00185             MinSize.Height = 1;
+00186         updateAbsolutePosition();
+00187     }
+00188 
+00189 
+00191     void setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)
+00192     {
+00193         AlignLeft = left;
+00194         AlignRight = right;
+00195         AlignTop = top;
+00196         AlignBottom = bottom;
+00197 
+00198         if (Parent)
+00199         {
+00200             core::rect<s32> r(Parent->getAbsolutePosition());
+00201 
+00202             core::dimension2df d((f32)r.getSize().Width, (f32)r.getSize().Height);
+00203 
+00204             if (AlignLeft   == EGUIA_SCALE)
+00205                 ScaleRect.UpperLeftCorner.X = (f32)DesiredRect.UpperLeftCorner.X / d.Width;
+00206             if (AlignRight  == EGUIA_SCALE)
+00207                 ScaleRect.LowerRightCorner.X = (f32)DesiredRect.LowerRightCorner.X / d.Width;
+00208             if (AlignTop    == EGUIA_SCALE)
+00209                 ScaleRect.UpperLeftCorner.Y = (f32)DesiredRect.UpperLeftCorner.Y / d.Height;
+00210             if (AlignBottom == EGUIA_SCALE)
+00211                 ScaleRect.LowerRightCorner.Y = (f32)DesiredRect.LowerRightCorner.Y / d.Height;
+00212         }
+00213     }
+00214 
+00215 
+00217     virtual void updateAbsolutePosition()
+00218     {
+00219         recalculateAbsolutePosition(false);
+00220 
+00221         // update all children
+00222         core::list<IGUIElement*>::Iterator it = Children.begin();
+00223         for (; it != Children.end(); ++it)
+00224         {
+00225             (*it)->updateAbsolutePosition();
+00226         }
+00227     }
+00228 
+00229 
+00231 
+00242     IGUIElement* getElementFromPoint(const core::position2d<s32>& point)
+00243     {
+00244         IGUIElement* target = 0;
+00245 
+00246         // we have to search from back to front, because later children
+00247         // might be drawn over the top of earlier ones.
+00248 
+00249         core::list<IGUIElement*>::Iterator it = Children.getLast();
+00250 
+00251         if (isVisible())
+00252         {
+00253             while(it != Children.end())
+00254             {
+00255                 target = (*it)->getElementFromPoint(point);
+00256                 if (target)
+00257                     return target;
+00258 
+00259                 --it;
+00260             }
+00261         }
+00262 
+00263         if (isVisible() && isPointInside(point))
+00264             target = this;
+00265 
+00266         return target;
+00267     }
+00268 
+00269 
+00271 
+00272     virtual bool isPointInside(const core::position2d<s32>& point) const
+00273     {
+00274         return AbsoluteClippingRect.isPointInside(point);
+00275     }
+00276 
+00277 
+00279     virtual void addChild(IGUIElement* child)
+00280     {
+00281         addChildToEnd(child);
+00282         if (child)
+00283         {
+00284             child->updateAbsolutePosition();
+00285         }
+00286     }
+00287 
+00289     virtual void removeChild(IGUIElement* child)
+00290     {
+00291         core::list<IGUIElement*>::Iterator it = Children.begin();
+00292         for (; it != Children.end(); ++it)
+00293             if ((*it) == child)
+00294             {
+00295                 (*it)->Parent = 0;
+00296                 (*it)->drop();
+00297                 Children.erase(it);
+00298                 return;
+00299             }
+00300     }
+00301 
+00302 
+00304     virtual void remove()
+00305     {
+00306         if (Parent)
+00307             Parent->removeChild(this);
+00308     }
+00309 
+00310 
+00312     virtual void draw()
+00313     {
+00314         if ( isVisible() )
+00315         {
+00316             core::list<IGUIElement*>::Iterator it = Children.begin();
+00317             for (; it != Children.end(); ++it)
+00318                 (*it)->draw();
+00319         }
+00320     }
+00321 
+00322 
+00324     virtual void OnPostRender(u32 timeMs)
+00325     {
+00326         if ( isVisible() )
+00327         {
+00328             core::list<IGUIElement*>::Iterator it = Children.begin();
+00329             for (; it != Children.end(); ++it)
+00330                 (*it)->OnPostRender( timeMs );
+00331         }
+00332     }
+00333 
+00334 
+00336     virtual void move(core::position2d<s32> absoluteMovement)
+00337     {
+00338         setRelativePosition(DesiredRect + absoluteMovement);
+00339     }
+00340 
+00341 
+00343     virtual bool isVisible() const
+00344     {
+00345         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00346         return IsVisible;
+00347     }
+00348 
+00349 
+00351     virtual void setVisible(bool visible)
+00352     {
+00353         IsVisible = visible;
+00354     }
+00355 
+00356 
+00358     virtual bool isSubElement() const
+00359     {
+00360         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00361         return IsSubElement;
+00362     }
+00363 
+00364 
+00366 
+00368     virtual void setSubElement(bool subElement)
+00369     {
+00370         IsSubElement = subElement;
+00371     }
+00372 
+00373 
+00375 
+00377     void setTabStop(bool enable)
+00378     {
+00379         IsTabStop = enable;
+00380     }
+00381 
+00382 
+00384     bool isTabStop() const
+00385     {
+00386         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00387         return IsTabStop;
+00388     }
+00389 
+00390 
+00392 
+00394     void setTabOrder(s32 index)
+00395     {
+00396         // negative = autonumber
+00397         if (index < 0)
+00398         {
+00399             TabOrder = 0;
+00400             IGUIElement *el = getTabGroup();
+00401             while (IsTabGroup && el && el->Parent)
+00402                 el = el->Parent;
+00403 
+00404             IGUIElement *first=0, *closest=0;
+00405             if (el)
+00406             {
+00407                 // find the highest element number
+00408                 el->getNextElement(-1, true, IsTabGroup, first, closest, true);
+00409                 if (first)
+00410                 {
+00411                     TabOrder = first->getTabOrder() + 1;
+00412                 }
+00413             }
+00414 
+00415         }
+00416         else
+00417             TabOrder = index;
+00418     }
+00419 
+00420 
+00422     s32 getTabOrder() const
+00423     {
+00424         return TabOrder;
+00425     }
+00426 
+00427 
+00429 
+00431     void setTabGroup(bool isGroup)
+00432     {
+00433         IsTabGroup = isGroup;
+00434     }
+00435 
+00436 
+00438     bool isTabGroup() const
+00439     {
+00440         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00441         return IsTabGroup;
+00442     }
+00443 
+00444 
+00446     IGUIElement* getTabGroup()
+00447     {
+00448         IGUIElement *ret=this;
+00449 
+00450         while (ret && !ret->isTabGroup())
+00451             ret = ret->getParent();
+00452 
+00453         return ret;
+00454     }
+00455 
+00456 
+00458 
+00462     virtual bool isEnabled() const
+00463     {
+00464         if ( isSubElement() && IsEnabled && getParent() )
+00465             return getParent()->isEnabled();
+00466 
+00467         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00468         return IsEnabled;
+00469     }
+00470 
+00471 
+00473     virtual void setEnabled(bool enabled)
+00474     {
+00475         IsEnabled = enabled;
+00476     }
+00477 
+00478 
+00480     virtual void setText(const wchar_t* text)
+00481     {
+00482         Text = text;
+00483     }
+00484 
+00485 
+00487     virtual const wchar_t* getText() const
+00488     {
+00489         return Text.c_str();
+00490     }
+00491 
+00492 
+00494     virtual void setToolTipText(const wchar_t* text)
+00495     {
+00496         ToolTipText = text;
+00497     }
+00498 
+00499 
+00501     virtual const core::stringw& getToolTipText() const
+00502     {
+00503         return ToolTipText;
+00504     }
+00505 
+00506 
+00508     virtual s32 getID() const
+00509     {
+00510         return ID;
+00511     }
+00512 
+00513 
+00515     virtual void setID(s32 id)
+00516     {
+00517         ID = id;
+00518     }
+00519 
+00520 
+00522     virtual bool OnEvent(const SEvent& event)
+00523     {
+00524         return Parent ? Parent->OnEvent(event) : false;
+00525     }
+00526 
+00527 
+00529 
+00530     virtual bool bringToFront(IGUIElement* element)
+00531     {
+00532         core::list<IGUIElement*>::Iterator it = Children.begin();
+00533         for (; it != Children.end(); ++it)
+00534         {
+00535             if (element == (*it))
+00536             {
+00537                 Children.erase(it);
+00538                 Children.push_back(element);
+00539                 return true;
+00540             }
+00541         }
+00542 
+00543         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00544         return false;
+00545     }
+00546 
+00547 
+00549 
+00550     virtual bool sendToBack(IGUIElement* child)
+00551     {
+00552         core::list<IGUIElement*>::Iterator it = Children.begin();
+00553         if (child == (*it)) // already there
+00554             return true;
+00555         for (; it != Children.end(); ++it)
+00556         {
+00557             if (child == (*it))
+00558             {
+00559                 Children.erase(it);
+00560                 Children.push_front(child);
+00561                 return true;
+00562             }
+00563         }
+00564 
+00565         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00566         return false;
+00567     }
+00568 
+00570     virtual const core::list<IGUIElement*>& getChildren() const
+00571     {
+00572         return Children;
+00573     }
+00574 
+00575 
+00577 
+00583     virtual IGUIElement* getElementFromId(s32 id, bool searchchildren=false) const
+00584     {
+00585         IGUIElement* e = 0;
+00586 
+00587         core::list<IGUIElement*>::ConstIterator it = Children.begin();
+00588         for (; it != Children.end(); ++it)
+00589         {
+00590             if ((*it)->getID() == id)
+00591                 return (*it);
+00592 
+00593             if (searchchildren)
+00594                 e = (*it)->getElementFromId(id, true);
+00595 
+00596             if (e)
+00597                 return e;
+00598         }
+00599 
+00600         return e;
+00601     }
+00602 
+00603 
+00606     bool isMyChild(IGUIElement* child) const
+00607     {
+00608         if (!child)
+00609             return false;
+00610         do
+00611         {
+00612             if (child->Parent)
+00613                 child = child->Parent;
+00614 
+00615         } while (child->Parent && child != this);
+00616 
+00617         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00618         return child == this;
+00619     }
+00620 
+00621 
+00623 
+00630     bool getNextElement(s32 startOrder, bool reverse, bool group,
+00631         IGUIElement*& first, IGUIElement*& closest, bool includeInvisible=false) const
+00632     {
+00633         // we'll stop searching if we find this number
+00634         s32 wanted = startOrder + ( reverse ? -1 : 1 );
+00635         if (wanted==-2)
+00636             wanted = 1073741824; // maximum s32
+00637 
+00638         core::list<IGUIElement*>::ConstIterator it = Children.begin();
+00639 
+00640         s32 closestOrder, currentOrder;
+00641 
+00642         while(it != Children.end())
+00643         {
+00644             // ignore invisible elements and their children
+00645             if ( ( (*it)->isVisible() || includeInvisible ) &&
+00646                 (group == true || (*it)->isTabGroup() == false) )
+00647             {
+00648                 // only check tab stops and those with the same group status
+00649                 if ((*it)->isTabStop() && ((*it)->isTabGroup() == group))
+00650                 {
+00651                     currentOrder = (*it)->getTabOrder();
+00652 
+00653                     // is this what we're looking for?
+00654                     if (currentOrder == wanted)
+00655                     {
+00656                         closest = *it;
+00657                         return true;
+00658                     }
+00659 
+00660                     // is it closer than the current closest?
+00661                     if (closest)
+00662                     {
+00663                         closestOrder = closest->getTabOrder();
+00664                         if ( ( reverse && currentOrder > closestOrder && currentOrder < startOrder)
+00665                             ||(!reverse && currentOrder < closestOrder && currentOrder > startOrder))
+00666                         {
+00667                             closest = *it;
+00668                         }
+00669                     }
+00670                     else
+00671                     if ( (reverse && currentOrder < startOrder) || (!reverse && currentOrder > startOrder) )
+00672                     {
+00673                         closest = *it;
+00674                     }
+00675 
+00676                     // is it before the current first?
+00677                     if (first)
+00678                     {
+00679                         closestOrder = first->getTabOrder();
+00680 
+00681                         if ( (reverse && closestOrder < currentOrder) || (!reverse && closestOrder > currentOrder) )
+00682                         {
+00683                             first = *it;
+00684                         }
+00685                     }
+00686                     else
+00687                     {
+00688                         first = *it;
+00689                     }
+00690                 }
+00691                 // search within children
+00692                 if ((*it)->getNextElement(startOrder, reverse, group, first, closest))
+00693                 {
+00694                     _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00695                     return true;
+00696                 }
+00697             }
+00698             ++it;
+00699         }
+00700         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00701         return false;
+00702     }
+00703 
+00704 
+00706 
+00710     EGUI_ELEMENT_TYPE getType() const
+00711     {
+00712         return Type;
+00713     }
+00714 
+00716 
+00724     virtual bool hasType(EGUI_ELEMENT_TYPE type) const
+00725     {
+00726         return type == Type;
+00727     }
+00728 
+00729 
+00731 
+00733     virtual const c8* getTypeName() const
+00734     {
+00735         return GUIElementTypeNames[Type];
+00736     }
+00737     
+00739 
+00740     virtual const c8* getName() const
+00741     {
+00742         return Name.c_str();
+00743     }
+00744 
+00745 
+00747 
+00748     virtual void setName(const c8* name)
+00749     {
+00750         Name = name;
+00751     }
+00752 
+00753 
+00755 
+00756     virtual void setName(const core::stringc& name)
+00757     {
+00758         Name = name;
+00759     }
+00760 
+00761 
+00763 
+00765     virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
+00766     {
+00767         out->addString("Name", Name.c_str());       
+00768         out->addInt("Id", ID );
+00769         out->addString("Caption", getText());
+00770         out->addRect("Rect", DesiredRect);
+00771         out->addPosition2d("MinSize", core::position2di(MinSize.Width, MinSize.Height));
+00772         out->addPosition2d("MaxSize", core::position2di(MaxSize.Width, MaxSize.Height));
+00773         out->addEnum("LeftAlign", AlignLeft, GUIAlignmentNames);
+00774         out->addEnum("RightAlign", AlignRight, GUIAlignmentNames);
+00775         out->addEnum("TopAlign", AlignTop, GUIAlignmentNames);
+00776         out->addEnum("BottomAlign", AlignBottom, GUIAlignmentNames);
+00777         out->addBool("Visible", IsVisible);
+00778         out->addBool("Enabled", IsEnabled);
+00779         out->addBool("TabStop", IsTabStop);
+00780         out->addBool("TabGroup", IsTabGroup);
+00781         out->addInt("TabOrder", TabOrder);
+00782         out->addBool("NoClip", NoClip);
+00783     }
+00784 
+00785 
+00787 
+00789     virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
+00790     {
+00791         setName(in->getAttributeAsString("Name"));
+00792         setID(in->getAttributeAsInt("Id"));
+00793         setText(in->getAttributeAsStringW("Caption").c_str());
+00794         setVisible(in->getAttributeAsBool("Visible"));
+00795         setEnabled(in->getAttributeAsBool("Enabled"));
+00796         IsTabStop = in->getAttributeAsBool("TabStop");
+00797         IsTabGroup = in->getAttributeAsBool("TabGroup");
+00798         TabOrder = in->getAttributeAsInt("TabOrder");
+00799 
+00800         core::position2di p = in->getAttributeAsPosition2d("MaxSize");
+00801         setMaxSize(core::dimension2du(p.X,p.Y));
+00802 
+00803         p = in->getAttributeAsPosition2d("MinSize");
+00804         setMinSize(core::dimension2du(p.X,p.Y));
+00805 
+00806         setAlignment((EGUI_ALIGNMENT) in->getAttributeAsEnumeration("LeftAlign", GUIAlignmentNames),
+00807             (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("RightAlign", GUIAlignmentNames),
+00808             (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("TopAlign", GUIAlignmentNames),
+00809             (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("BottomAlign", GUIAlignmentNames));
+00810 
+00811         setRelativePosition(in->getAttributeAsRect("Rect"));
+00812 
+00813         setNotClipped(in->getAttributeAsBool("NoClip"));
+00814     }
+00815 
+00816 protected:
+00817     // not virtual because needed in constructor
+00818     void addChildToEnd(IGUIElement* child)
+00819     {
+00820         if (child)
+00821         {
+00822             child->grab(); // prevent destruction when removed
+00823             child->remove(); // remove from old parent
+00824             child->LastParentRect = getAbsolutePosition();
+00825             child->Parent = this;
+00826             Children.push_back(child);
+00827         }
+00828     }
+00829 
+00830     // not virtual because needed in constructor
+00831     void recalculateAbsolutePosition(bool recursive)
+00832     {
+00833         core::rect<s32> parentAbsolute(0,0,0,0);
+00834         core::rect<s32> parentAbsoluteClip;
+00835         f32 fw=0.f, fh=0.f;
+00836 
+00837         if (Parent)
+00838         {
+00839             parentAbsolute = Parent->AbsoluteRect;
+00840 
+00841             if (NoClip)
+00842             {
+00843                 IGUIElement* p=this;
+00844                 while (p && p->Parent)
+00845                     p = p->Parent;
+00846                 parentAbsoluteClip = p->AbsoluteClippingRect;
+00847             }
+00848             else
+00849                 parentAbsoluteClip = Parent->AbsoluteClippingRect;
+00850         }
+00851 
+00852         const s32 diffx = parentAbsolute.getWidth() - LastParentRect.getWidth();
+00853         const s32 diffy = parentAbsolute.getHeight() - LastParentRect.getHeight();
+00854 
+00855         if (AlignLeft == EGUIA_SCALE || AlignRight == EGUIA_SCALE)
+00856             fw = (f32)parentAbsolute.getWidth();
+00857 
+00858         if (AlignTop == EGUIA_SCALE || AlignBottom == EGUIA_SCALE)
+00859             fh = (f32)parentAbsolute.getHeight();
+00860 
+00861         switch (AlignLeft)
+00862         {
+00863             case EGUIA_UPPERLEFT:
+00864                 break;
+00865             case EGUIA_LOWERRIGHT:
+00866                 DesiredRect.UpperLeftCorner.X += diffx;
+00867                 break;
+00868             case EGUIA_CENTER:
+00869                 DesiredRect.UpperLeftCorner.X += diffx/2;
+00870                 break;
+00871             case EGUIA_SCALE:
+00872                 DesiredRect.UpperLeftCorner.X = core::round32(ScaleRect.UpperLeftCorner.X * fw);
+00873                 break;
+00874         }
+00875 
+00876         switch (AlignRight)
+00877         {
+00878             case EGUIA_UPPERLEFT:
+00879                 break;
+00880             case EGUIA_LOWERRIGHT:
+00881                 DesiredRect.LowerRightCorner.X += diffx;
+00882                 break;
+00883             case EGUIA_CENTER:
+00884                 DesiredRect.LowerRightCorner.X += diffx/2;
+00885                 break;
+00886             case EGUIA_SCALE:
+00887                 DesiredRect.LowerRightCorner.X = core::round32(ScaleRect.LowerRightCorner.X * fw);
+00888                 break;
+00889         }
+00890 
+00891         switch (AlignTop)
+00892         {
+00893             case EGUIA_UPPERLEFT:
+00894                 break;
+00895             case EGUIA_LOWERRIGHT:
+00896                 DesiredRect.UpperLeftCorner.Y += diffy;
+00897                 break;
+00898             case EGUIA_CENTER:
+00899                 DesiredRect.UpperLeftCorner.Y += diffy/2;
+00900                 break;
+00901             case EGUIA_SCALE:
+00902                 DesiredRect.UpperLeftCorner.Y = core::round32(ScaleRect.UpperLeftCorner.Y * fh);
+00903                 break;
+00904         }
+00905 
+00906         switch (AlignBottom)
+00907         {
+00908             case EGUIA_UPPERLEFT:
+00909                 break;
+00910             case EGUIA_LOWERRIGHT:
+00911                 DesiredRect.LowerRightCorner.Y += diffy;
+00912                 break;
+00913             case EGUIA_CENTER:
+00914                 DesiredRect.LowerRightCorner.Y += diffy/2;
+00915                 break;
+00916             case EGUIA_SCALE:
+00917                 DesiredRect.LowerRightCorner.Y = core::round32(ScaleRect.LowerRightCorner.Y * fh);
+00918                 break;
+00919         }
+00920 
+00921         RelativeRect = DesiredRect;
+00922 
+00923         const s32 w = RelativeRect.getWidth();
+00924         const s32 h = RelativeRect.getHeight();
+00925 
+00926         // make sure the desired rectangle is allowed
+00927         if (w < (s32)MinSize.Width)
+00928             RelativeRect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + MinSize.Width;
+00929         if (h < (s32)MinSize.Height)
+00930             RelativeRect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + MinSize.Height;
+00931         if (MaxSize.Width && w > (s32)MaxSize.Width)
+00932             RelativeRect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + MaxSize.Width;
+00933         if (MaxSize.Height && h > (s32)MaxSize.Height)
+00934             RelativeRect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + MaxSize.Height;
+00935 
+00936         RelativeRect.repair();
+00937 
+00938         AbsoluteRect = RelativeRect + parentAbsolute.UpperLeftCorner;
+00939 
+00940         if (!Parent)
+00941             parentAbsoluteClip = AbsoluteRect;
+00942 
+00943         AbsoluteClippingRect = AbsoluteRect;
+00944         AbsoluteClippingRect.clipAgainst(parentAbsoluteClip);
+00945 
+00946         LastParentRect = parentAbsolute;
+00947 
+00948         if ( recursive )
+00949         {
+00950             // update all children
+00951             core::list<IGUIElement*>::Iterator it = Children.begin();
+00952             for (; it != Children.end(); ++it)
+00953             {
+00954                 (*it)->recalculateAbsolutePosition(recursive);
+00955             }
+00956         }
+00957     }
+00958 
+00959 protected:
+00960 
+00962     core::list<IGUIElement*> Children;
+00963 
+00965     IGUIElement* Parent;
+00966 
+00968     core::rect<s32> RelativeRect;
+00969 
+00971     core::rect<s32> AbsoluteRect;
+00972 
+00974     core::rect<s32> AbsoluteClippingRect;
+00975 
+00978     core::rect<s32> DesiredRect;
+00979 
+00981     core::rect<s32> LastParentRect;
+00982 
+00984     core::rect<f32> ScaleRect;
+00985 
+00987     core::dimension2du MaxSize, MinSize;
+00988 
+00990     bool IsVisible;
+00991 
+00993     bool IsEnabled;
+00994 
+00996     bool IsSubElement;
+00997 
+00999     bool NoClip;
+01000 
+01002     core::stringw Text;
+01003 
+01005     core::stringw ToolTipText;
+01006     
+01008     core::stringc Name;
+01009 
+01011     s32 ID;
+01012 
+01014     bool IsTabStop;
+01015 
+01017     s32 TabOrder;
+01018 
+01020     bool IsTabGroup;
+01021 
+01023     EGUI_ALIGNMENT AlignLeft, AlignRight, AlignTop, AlignBottom;
+01024 
+01026     IGUIEnvironment* Environment;
+01027 
+01029     EGUI_ELEMENT_TYPE Type;
+01030 };
+01031 
+01032 
+01033 } // end namespace gui
+01034 } // end namespace irr
+01035 
+01036 #endif
+01037 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h.html new file mode 100644 index 0000000..8198ca4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IGUIElementFactory.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIElementFactory.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "EGUIElementTypes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h_source.html new file mode 100644 index 0000000..0aeb4e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_element_factory_8h_source.html @@ -0,0 +1,166 @@ + + + + +Irrlicht 3D Engine: IGUIElementFactory.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIElementFactory.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_ELEMENT_FACTORY_H_INCLUDED__
+00006 #define __I_GUI_ELEMENT_FACTORY_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "EGUIElementTypes.h"
+00010 
+00011 namespace irr
+00012 {
+00013 
+00014 namespace gui
+00015 {
+00016     class IGUIElement;
+00017 
+00019 
+00026     class IGUIElementFactory : public virtual IReferenceCounted
+00027     {
+00028     public:
+00029 
+00031 
+00034         virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) = 0;
+00035 
+00037 
+00040         virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0) = 0;
+00041 
+00043         virtual s32 getCreatableGUIElementTypeCount() const = 0;
+00044 
+00046 
+00048         virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0;
+00049 
+00051 
+00053         virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0;
+00054 
+00056 
+00058         virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0;
+00059     };
+00060 
+00061 
+00062 } // end namespace gui
+00063 } // end namespace irr
+00064 
+00065 #endif // __I_GUI_ELEMENT_FACTORY_H_INCLUDED__
+00066 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h.html new file mode 100644 index 0000000..06f991d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h.html @@ -0,0 +1,149 @@ + + + + +Irrlicht 3D Engine: IGUIEnvironment.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIEnvironment.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "IGUISkin.h"
+#include "rect.h"
+#include "EMessageBoxFlags.h"
+#include "IEventReceiver.h"
+#include "IXMLReader.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h_source.html new file mode 100644 index 0000000..6d7b641 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_environment_8h_source.html @@ -0,0 +1,394 @@ + + + + +Irrlicht 3D Engine: IGUIEnvironment.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIEnvironment.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_ENVIRONMENT_H_INCLUDED__
+00006 #define __I_GUI_ENVIRONMENT_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "IGUISkin.h"
+00010 #include "rect.h"
+00011 #include "EMessageBoxFlags.h"
+00012 #include "IEventReceiver.h"
+00013 #include "IXMLReader.h"
+00014 #include "path.h"
+00015 
+00016 namespace irr
+00017 {
+00018     class IOSOperator;
+00019     class IEventReceiver;
+00020 
+00021     namespace io
+00022     {
+00023         class IXMLWriter;
+00024         class IReadFile;
+00025         class IWriteFile;
+00026         class IFileSystem;
+00027     } // end namespace io
+00028     namespace video
+00029     {
+00030         class IVideoDriver;
+00031         class ITexture;
+00032     } // end namespace video
+00033 
+00034 namespace gui
+00035 {
+00036 
+00037 class IGUIElement;
+00038 class IGUIFont;
+00039 class IGUISpriteBank;
+00040 class IGUIScrollBar;
+00041 class IGUIImage;
+00042 class IGUIMeshViewer;
+00043 class IGUICheckBox;
+00044 class IGUIListBox;
+00045 class IGUITreeView;
+00046 class IGUIImageList;
+00047 class IGUIFileOpenDialog;
+00048 class IGUIColorSelectDialog;
+00049 class IGUIInOutFader;
+00050 class IGUIStaticText;
+00051 class IGUIEditBox;
+00052 class IGUISpinBox;
+00053 class IGUITabControl;
+00054 class IGUITab;
+00055 class IGUITable;
+00056 class IGUIContextMenu;
+00057 class IGUIComboBox;
+00058 class IGUIToolBar;
+00059 class IGUIButton;
+00060 class IGUIWindow;
+00061 class IGUIElementFactory;
+00062 
+00064 
+00070 class IGUIEnvironment : public virtual IReferenceCounted
+00071 {
+00072 public:
+00073 
+00075     virtual void drawAll() = 0;
+00076 
+00078 
+00083     virtual bool setFocus(IGUIElement* element) = 0;
+00084 
+00086 
+00087     virtual IGUIElement* getFocus() const = 0;
+00088 
+00090 
+00095     virtual IGUIElement* getHovered() const = 0;
+00096 
+00098 
+00102     virtual bool removeFocus(IGUIElement* element) = 0;
+00103 
+00105 
+00107     virtual bool hasFocus(IGUIElement* element) const = 0;
+00108 
+00110 
+00111     virtual video::IVideoDriver* getVideoDriver() const = 0;
+00112 
+00114 
+00115     virtual io::IFileSystem* getFileSystem() const = 0;
+00116 
+00118 
+00119     virtual IOSOperator* getOSOperator() const = 0;
+00120 
+00122     virtual void clear() = 0;
+00123 
+00125 
+00129     virtual bool postEventFromUser(const SEvent& event) = 0;
+00130 
+00132 
+00135     virtual void setUserEventReceiver(IEventReceiver* evr) = 0;
+00136 
+00138 
+00139     virtual IGUISkin* getSkin() const = 0;
+00140 
+00142 
+00154     virtual void setSkin(IGUISkin* skin) = 0;
+00155 
+00157 
+00162     virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type) = 0;
+00163 
+00164 
+00166 
+00172     virtual IGUIImageList* createImageList( video::ITexture* texture,
+00173                     core::dimension2d<s32> imageSize,
+00174                     bool useAlphaChannel ) = 0;
+00175 
+00177 
+00182     virtual IGUIFont* getFont(const io::path& filename) = 0;
+00183 
+00185 
+00190     virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) = 0;
+00191 
+00193     virtual void removeFont(IGUIFont* font) = 0;
+00194 
+00196 
+00199     virtual IGUIFont* getBuiltInFont() const = 0;
+00200 
+00202 
+00206     virtual IGUISpriteBank* getSpriteBank(const io::path& filename) = 0;
+00207 
+00209 
+00212     virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) = 0;
+00213 
+00215 
+00221     virtual IGUIElement* getRootGUIElement() = 0;
+00222 
+00224 
+00232     virtual IGUIButton* addButton(const core::rect<s32>& rectangle,
+00233         IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext = 0) = 0;
+00234 
+00236 
+00246     virtual IGUIWindow* addWindow(const core::rect<s32>& rectangle, bool modal = false,
+00247         const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1) = 0;
+00248 
+00250 
+00256     virtual IGUIElement* addModalScreen(IGUIElement* parent) = 0;
+00257 
+00259 
+00273     virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0,
+00274         bool modal = true, s32 flags = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) = 0;
+00275 
+00277 
+00285     virtual IGUIScrollBar* addScrollBar(bool horizontal, const core::rect<s32>& rectangle,
+00286         IGUIElement* parent=0, s32 id=-1) = 0;
+00287 
+00289 
+00300     virtual IGUIImage* addImage(video::ITexture* image, core::position2d<s32> pos,
+00301         bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0;
+00302 
+00304 
+00314     virtual IGUIImage* addImage(const core::rect<s32>& rectangle,
+00315         IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) = 0;
+00316 
+00318 
+00326     virtual IGUICheckBox* addCheckBox(bool checked, const core::rect<s32>& rectangle,
+00327         IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0;
+00328 
+00330 
+00337     virtual IGUIListBox* addListBox(const core::rect<s32>& rectangle,
+00338         IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0;
+00339 
+00341 
+00350     virtual IGUITreeView* addTreeView(const core::rect<s32>& rectangle,
+00351         IGUIElement* parent=0, s32 id=-1, bool drawBackground=false,
+00352         bool scrollBarVertical = true, bool scrollBarHorizontal = false) = 0;
+00353 
+00355 
+00362     virtual IGUIMeshViewer* addMeshViewer(const core::rect<s32>& rectangle,
+00363             IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0;
+00364 
+00366 
+00379     virtual IGUIFileOpenDialog* addFileOpenDialog(const wchar_t* title=0,
+00380         bool modal=true, IGUIElement* parent=0, s32 id=-1,
+00381         bool restoreCWD=false, io::path::char_type* startDir=0) = 0;
+00382 
+00384 
+00393     virtual IGUIColorSelectDialog* addColorSelectDialog(const wchar_t* title = 0,
+00394         bool modal=true, IGUIElement* parent=0, s32 id=-1) = 0;
+00395 
+00397 
+00408     virtual IGUIStaticText* addStaticText(const wchar_t* text, const core::rect<s32>& rectangle,
+00409         bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1,
+00410         bool fillBackground = false) = 0;
+00411 
+00413 
+00427     virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect<s32>& rectangle,
+00428         bool border=true, IGUIElement* parent=0, s32 id=-1) = 0;
+00429 
+00431 
+00441     virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect<s32>& rectangle,
+00442         bool border=true,IGUIElement* parent=0, s32 id=-1) = 0;
+00443 
+00445 
+00452     virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1) = 0;
+00453 
+00455 
+00467     virtual IGUITabControl* addTabControl(const core::rect<s32>& rectangle,
+00468         IGUIElement* parent=0, bool fillbackground=false,
+00469         bool border=true, s32 id=-1) = 0;
+00470 
+00472 
+00482     virtual IGUITab* addTab(const core::rect<s32>& rectangle,
+00483         IGUIElement* parent=0, s32 id=-1) = 0;
+00484 
+00486 
+00494     virtual IGUIContextMenu* addContextMenu(const core::rect<s32>& rectangle,
+00495         IGUIElement* parent=0, s32 id=-1) = 0;
+00496 
+00498 
+00506     virtual IGUIContextMenu* addMenu(IGUIElement* parent=0, s32 id=-1) = 0;
+00507 
+00509 
+00517     virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1) = 0;
+00518 
+00520 
+00527     virtual IGUIComboBox* addComboBox(const core::rect<s32>& rectangle,
+00528         IGUIElement* parent=0, s32 id=-1) = 0;
+00529 
+00531 
+00539     virtual IGUITable* addTable(const core::rect<s32>& rectangle,
+00540         IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) =0;
+00541 
+00543 
+00546     virtual IGUIElementFactory* getDefaultGUIElementFactory() const = 0;
+00547 
+00549 
+00553     virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd) = 0;
+00554 
+00556 
+00557     virtual u32 getRegisteredGUIElementFactoryCount() const = 0;
+00558 
+00560 
+00562     virtual IGUIElementFactory* getGUIElementFactory(u32 index) const = 0;
+00563 
+00565 
+00570     virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0) = 0;
+00571 
+00573 
+00576     virtual bool saveGUI(const io::path& filename, IGUIElement* start=0) = 0;
+00577 
+00579 
+00582     virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) = 0;
+00583 
+00585 
+00591     virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) = 0;
+00592 
+00594 
+00600     virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0;
+00601 
+00603     virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const =0;
+00604 
+00606     virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)=0;
+00607 
+00609     virtual void writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) =0;
+00610 
+00612     virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0;
+00613 };
+00614 
+00615 
+00616 } // end namespace gui
+00617 } // end namespace irr
+00618 
+00619 #endif
+00620 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h.html new file mode 100644 index 0000000..e2bf738 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IGUIFileOpenDialog.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIFileOpenDialog.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h_source.html new file mode 100644 index 0000000..837c35a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_file_open_dialog_8h_source.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: IGUIFileOpenDialog.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIFileOpenDialog.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
+00006 #define __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015 
+00017 
+00024     class IGUIFileOpenDialog : public IGUIElement
+00025     {
+00026     public:
+00027 
+00029         IGUIFileOpenDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00030             : IGUIElement(EGUIET_FILE_OPEN_DIALOG, environment, parent, id, rectangle) {}
+00031 
+00033         virtual const wchar_t* getFileName() const = 0;
+00034 
+00036         virtual const io::path& getDirectoryName() = 0;
+00037     };
+00038 
+00039 
+00040 } // end namespace gui
+00041 } // end namespace irr
+00042 
+00043 #endif
+00044 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h.html new file mode 100644 index 0000000..84bfe1b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IGUIFont.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIFont.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "SColor.h"
+#include "rect.h"
+#include "irrString.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h_source.html new file mode 100644 index 0000000..00a9064 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_8h_source.html @@ -0,0 +1,185 @@ + + + + +Irrlicht 3D Engine: IGUIFont.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIFont.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_FONT_H_INCLUDED__
+00006 #define __I_GUI_FONT_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "SColor.h"
+00010 #include "rect.h"
+00011 #include "irrString.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace gui
+00016 {
+00017 
+00019 enum EGUI_FONT_TYPE
+00020 {
+00022     EGFT_BITMAP = 0,
+00023 
+00025 
+00028     EGFT_VECTOR,
+00029 
+00031 
+00032     EGFT_OS,
+00033 
+00035     EGFT_CUSTOM
+00036 };
+00037 
+00039 class IGUIFont : public virtual IReferenceCounted
+00040 {
+00041 public:
+00042 
+00044 
+00051     virtual void draw(const core::stringw& text, const core::rect<s32>& position,
+00052         video::SColor color, bool hcenter=false, bool vcenter=false,
+00053         const core::rect<s32>* clip=0) = 0;
+00054 
+00056 
+00058     virtual core::dimension2d<u32> getDimension(const wchar_t* text) const = 0;
+00059 
+00061 
+00065     virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0;
+00066 
+00068     virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; }
+00069 
+00071     virtual void setKerningWidth (s32 kerning) = 0;
+00072 
+00074     virtual void setKerningHeight (s32 kerning) = 0;
+00075 
+00077 
+00087     virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0;
+00088 
+00090     virtual s32 getKerningHeight() const = 0;
+00091 
+00093 
+00097     virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
+00098 };
+00099 
+00100 } // end namespace gui
+00101 } // end namespace irr
+00102 
+00103 #endif
+00104 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h.html new file mode 100644 index 0000000..67f20d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IGUIFontBitmap.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIFontBitmap.h File Reference
+
+
+
#include "IGUIFont.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h_source.html new file mode 100644 index 0000000..fc5c0ed --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_font_bitmap_8h_source.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: IGUIFontBitmap.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIFontBitmap.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_FONT_BITMAP_H_INCLUDED__
+00006 #define __I_GUI_FONT_BITMAP_H_INCLUDED__
+00007 
+00008 #include "IGUIFont.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014     class IGUISpriteBank;
+00015 
+00017 class IGUIFontBitmap : public IGUIFont
+00018 {
+00019 public:
+00020 
+00022     virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; }
+00023 
+00025     virtual IGUISpriteBank* getSpriteBank() const = 0;
+00026 
+00028     virtual u32 getSpriteNoFromChar(const wchar_t *c) const = 0;
+00029 
+00031 
+00039     virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0;
+00040 };
+00041 
+00042 } // end namespace gui
+00043 } // end namespace irr
+00044 
+00045 #endif
+00046 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h.html new file mode 100644 index 0000000..f883536 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IGUIImage.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIImage.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h_source.html new file mode 100644 index 0000000..9230886 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_8h_source.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: IGUIImage.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIImage.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_IMAGE_H_INCLUDED__
+00006 #define __I_GUI_IMAGE_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace video
+00013 {
+00014     class ITexture;
+00015 }
+00016 namespace gui
+00017 {
+00018 
+00020     class IGUIImage : public IGUIElement
+00021     {
+00022     public:
+00023 
+00025         IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00026             : IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {}
+00027 
+00029         virtual void setImage(video::ITexture* image) = 0;
+00030 
+00032         virtual video::ITexture* getImage() const = 0;
+00033 
+00035         virtual void setColor(video::SColor color) = 0;
+00036 
+00038         virtual void setScaleImage(bool scale) = 0;
+00039 
+00041         virtual void setUseAlphaChannel(bool use) = 0;
+00042 
+00044         virtual video::SColor getColor() const = 0;
+00045 
+00047         virtual bool isImageScaled() const = 0;
+00048 
+00050         virtual bool isAlphaChannelUsed() const = 0;
+00051     };
+00052 
+00053 
+00054 } // end namespace gui
+00055 } // end namespace irr
+00056 
+00057 #endif
+00058 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h.html new file mode 100644 index 0000000..3713c9a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IGUIImageList.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIImageList.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "rect.h"
+#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h_source.html new file mode 100644 index 0000000..cff58b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_image_list_8h_source.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: IGUIImageList.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIImageList.h
+
+
+Go to the documentation of this file.
00001 // This file is part of the "Irrlicht Engine".
+00002 // written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
+00003 
+00004 #ifndef __I_GUI_IMAGE_LIST_H_INCLUDED__
+00005 #define __I_GUI_IMAGE_LIST_H_INCLUDED__
+00006 
+00007 #include "IGUIElement.h"
+00008 #include "rect.h"
+00009 #include "irrTypes.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015 
+00017 class IGUIImageList : public virtual IReferenceCounted
+00018 {
+00019 public:
+00020 
+00022     virtual ~IGUIImageList() {};
+00023 
+00029     virtual void draw(s32 index, const core::position2d<s32>& destPos,
+00030         const core::rect<s32>* clip = 0) = 0;
+00031 
+00034     virtual s32 getImageCount() const = 0;
+00035 
+00038     virtual core::dimension2d<s32> getImageSize() const = 0;
+00039 };
+00040 
+00041 } // end namespace gui
+00042 } // end namespace irr
+00043 
+00044 #endif
+00045 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h.html new file mode 100644 index 0000000..fdb513c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IGUIInOutFader.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIInOutFader.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h_source.html new file mode 100644 index 0000000..b917a21 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_in_out_fader_8h_source.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: IGUIInOutFader.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIInOutFader.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_IN_OUT_FADER_H_INCLUDED__
+00006 #define __I_GUI_IN_OUT_FADER_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "SColor.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015 
+00017 
+00027     class IGUIInOutFader : public IGUIElement
+00028     {
+00029     public:
+00030 
+00032         IGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00033             : IGUIElement(EGUIET_IN_OUT_FADER, environment, parent, id, rectangle) {}
+00034 
+00036         virtual video::SColor getColor() const = 0;
+00037 
+00039 
+00040         virtual void setColor(video::SColor color) = 0;
+00041         virtual void setColor(video::SColor source, video::SColor dest) = 0;
+00042 
+00044 
+00049         virtual void fadeIn(u32 time) = 0;
+00050 
+00052 
+00056         virtual void fadeOut(u32 time) = 0;
+00057 
+00059         virtual bool isReady() const = 0;
+00060     };
+00061 
+00062 
+00063 } // end namespace gui
+00064 } // end namespace irr
+00065 
+00066 #endif
+00067 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h.html new file mode 100644 index 0000000..421fd6a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: IGUIListBox.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIListBox.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h_source.html new file mode 100644 index 0000000..0e34eb0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_list_box_8h_source.html @@ -0,0 +1,216 @@ + + + + +Irrlicht 3D Engine: IGUIListBox.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIListBox.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_LIST_BOX_H_INCLUDED__
+00006 #define __I_GUI_LIST_BOX_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "SColor.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015     class IGUISpriteBank;
+00016 
+00018     enum EGUI_LISTBOX_COLOR
+00019     {
+00021         EGUI_LBC_TEXT=0,
+00023         EGUI_LBC_TEXT_HIGHLIGHT,
+00025         EGUI_LBC_ICON,
+00027         EGUI_LBC_ICON_HIGHLIGHT,
+00029         EGUI_LBC_COUNT
+00030     };
+00031 
+00032 
+00034 
+00038     class IGUIListBox : public IGUIElement
+00039     {
+00040     public:
+00042         IGUIListBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00043             : IGUIElement(EGUIET_LIST_BOX, environment, parent, id, rectangle) {}
+00044 
+00046         virtual u32 getItemCount() const = 0;
+00047 
+00049         virtual const wchar_t* getListItem(u32 id) const = 0;
+00050 
+00052         virtual u32 addItem(const wchar_t* text) = 0;
+00053 
+00055 
+00058         virtual u32 addItem(const wchar_t* text, s32 icon) = 0;
+00059 
+00061         virtual void removeItem(u32 index) = 0;
+00062 
+00064 
+00065         virtual s32 getItemAt(s32 xpos, s32 ypos) const = 0;
+00066 
+00068         virtual s32 getIcon(u32 index) const = 0;
+00069 
+00071 
+00075         virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
+00076 
+00078         virtual void clear() = 0;
+00079 
+00081         virtual s32 getSelected() const = 0;
+00082 
+00084         virtual void setSelected(s32 index) = 0;
+00085 
+00087         virtual void setSelected(const wchar_t *item) = 0;
+00088 
+00090         virtual void setAutoScrollEnabled(bool scroll) = 0;
+00091 
+00093         virtual bool isAutoScrollEnabled() const = 0;
+00094 
+00096         virtual void setItemOverrideColor(u32 index, video::SColor color) = 0;
+00097 
+00099         virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) = 0;
+00100 
+00102         virtual void clearItemOverrideColor(u32 index) = 0;
+00103 
+00105         virtual void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) = 0;
+00106 
+00108         virtual bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0;
+00109 
+00111         virtual video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0;
+00112 
+00114         virtual video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const = 0;
+00115 
+00117         virtual void setItem(u32 index, const wchar_t* text, s32 icon) = 0;
+00118 
+00120 
+00121         virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon) = 0;
+00122 
+00124         virtual void swapItems(u32 index1, u32 index2) = 0;
+00125 
+00127         virtual void setItemHeight( s32 height ) = 0;
+00128 
+00130         virtual void setDrawBackground(bool draw) = 0;
+00131 };
+00132 
+00133 
+00134 } // end namespace gui
+00135 } // end namespace irr
+00136 
+00137 #endif
+00138 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h.html new file mode 100644 index 0000000..2828af1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IGUIMeshViewer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIMeshViewer.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h_source.html new file mode 100644 index 0000000..4342a88 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_mesh_viewer_8h_source.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: IGUIMeshViewer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIMeshViewer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_MESH_VIEWER_H_INCLUDED__
+00006 #define __I_GUI_MESH_VIEWER_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00013 namespace video
+00014 {
+00015     class SMaterial;
+00016 } // end namespace video
+00017 
+00018 namespace scene
+00019 {
+00020     class IAnimatedMesh;
+00021 } // end namespace scene
+00022 
+00023 namespace gui
+00024 {
+00025 
+00027     class IGUIMeshViewer : public IGUIElement
+00028     {
+00029     public:
+00030 
+00032         IGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00033             : IGUIElement(EGUIET_MESH_VIEWER, environment, parent, id, rectangle) {}
+00034 
+00036         virtual void setMesh(scene::IAnimatedMesh* mesh) = 0;
+00037 
+00039         virtual scene::IAnimatedMesh* getMesh() const = 0;
+00040 
+00042         virtual void setMaterial(const video::SMaterial& material) = 0;
+00043 
+00045         virtual const video::SMaterial& getMaterial() const = 0;
+00046     };
+00047 
+00048 
+00049 } // end namespace gui
+00050 } // end namespace irr
+00051 
+00052 #endif
+00053 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h.html new file mode 100644 index 0000000..667e6a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IGUIScrollBar.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIScrollBar.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h_source.html new file mode 100644 index 0000000..be6428a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_scroll_bar_8h_source.html @@ -0,0 +1,169 @@ + + + + +Irrlicht 3D Engine: IGUIScrollBar.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIScrollBar.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_SCROLL_BAR_H_INCLUDED__
+00006 #define __I_GUI_SCROLL_BAR_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014 
+00016 
+00019     class IGUIScrollBar : public IGUIElement
+00020     {
+00021     public:
+00022 
+00024         IGUIScrollBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00025             : IGUIElement(EGUIET_SCROLL_BAR, environment, parent, id, rectangle) {}
+00026 
+00028         virtual void setMax(s32 max) = 0;
+00030         virtual s32 getMax() const = 0;
+00031 
+00033         virtual void setMin(s32 min) = 0;
+00035         virtual s32 getMin() const = 0;
+00036 
+00038         virtual s32 getSmallStep() const = 0;
+00039 
+00041 
+00043         virtual void setSmallStep(s32 step) = 0;
+00044 
+00046         virtual s32 getLargeStep() const = 0;
+00047 
+00049 
+00051         virtual void setLargeStep(s32 step) = 0;
+00052 
+00054         virtual s32 getPos() const = 0;
+00055 
+00057         virtual void setPos(s32 pos) = 0;
+00058     };
+00059 
+00060 
+00061 } // end namespace gui
+00062 } // end namespace irr
+00063 
+00064 #endif
+00065 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h.html new file mode 100644 index 0000000..ac52925 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h.html @@ -0,0 +1,288 @@ + + + + +Irrlicht 3D Engine: IGUISkin.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUISkin.h File Reference
+
+
+
#include "IAttributeExchangingObject.h"
+#include "EGUIAlignment.h"
+#include "SColor.h"
+#include "rect.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h_source.html new file mode 100644 index 0000000..1516a9d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_skin_8h_source.html @@ -0,0 +1,477 @@ + + + + +Irrlicht 3D Engine: IGUISkin.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUISkin.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_SKIN_H_INCLUDED__
+00006 #define __I_GUI_SKIN_H_INCLUDED__
+00007 
+00008 #include "IAttributeExchangingObject.h"
+00009 #include "EGUIAlignment.h"
+00010 #include "SColor.h"
+00011 #include "rect.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace gui
+00016 {
+00017     class IGUIFont;
+00018     class IGUISpriteBank;
+00019     class IGUIElement;
+00020 
+00022 
+00030     enum EGUI_SKIN_TYPE
+00031     {
+00033         EGST_WINDOWS_CLASSIC=0,
+00034 
+00036         EGST_WINDOWS_METALLIC,
+00037 
+00039         EGST_BURNING_SKIN,
+00040 
+00042         EGST_UNKNOWN,
+00043 
+00045         EGST_COUNT
+00046     };
+00047 
+00049     const c8* const GUISkinTypeNames[EGST_COUNT+1] =
+00050     {
+00051         "windowsClassic",
+00052         "windowsMetallic",
+00053         "burning",
+00054         "unknown",
+00055         0,
+00056     };
+00057 
+00058 
+00060     enum EGUI_DEFAULT_COLOR
+00061     {
+00063         EGDC_3D_DARK_SHADOW = 0,
+00065         EGDC_3D_SHADOW,
+00067         EGDC_3D_FACE,
+00069         EGDC_3D_HIGH_LIGHT,
+00071         EGDC_3D_LIGHT,
+00073         EGDC_ACTIVE_BORDER,
+00075         EGDC_ACTIVE_CAPTION,
+00077         EGDC_APP_WORKSPACE,
+00079         EGDC_BUTTON_TEXT,
+00081         EGDC_GRAY_TEXT,
+00083         EGDC_HIGH_LIGHT,
+00085         EGDC_HIGH_LIGHT_TEXT,
+00087         EGDC_INACTIVE_BORDER,
+00089         EGDC_INACTIVE_CAPTION,
+00091         EGDC_TOOLTIP,
+00093         EGDC_TOOLTIP_BACKGROUND,
+00095         EGDC_SCROLLBAR,
+00097         EGDC_WINDOW,
+00099         EGDC_WINDOW_SYMBOL,
+00101         EGDC_ICON,
+00103         EGDC_ICON_HIGH_LIGHT,
+00105         EGDC_GRAY_WINDOW_SYMBOL,
+00107         EGDC_EDITABLE,
+00109         EGDC_GRAY_EDITABLE,
+00111         EGDC_FOCUSED_EDITABLE,
+00112 
+00115         EGDC_COUNT
+00116     };
+00117 
+00119     const c8* const GUISkinColorNames[EGDC_COUNT+1] =
+00120     {
+00121         "3DDarkShadow",
+00122         "3DShadow",
+00123         "3DFace",
+00124         "3DHighlight",
+00125         "3DLight",
+00126         "ActiveBorder",
+00127         "ActiveCaption",
+00128         "AppWorkspace",
+00129         "ButtonText",
+00130         "GrayText",
+00131         "Highlight",
+00132         "HighlightText",
+00133         "InactiveBorder",
+00134         "InactiveCaption",
+00135         "ToolTip",
+00136         "ToolTipBackground",
+00137         "ScrollBar",
+00138         "Window",
+00139         "WindowSymbol",
+00140         "Icon",
+00141         "IconHighlight",
+00142         "GrayWindowSymbol",
+00143         "Editable",
+00144         "GrayEditable",
+00145         "FocusedEditable",
+00146         0,
+00147     };
+00148 
+00150     enum EGUI_DEFAULT_SIZE
+00151     {
+00153         EGDS_SCROLLBAR_SIZE = 0,
+00155         EGDS_MENU_HEIGHT,
+00157         EGDS_WINDOW_BUTTON_WIDTH,
+00159         EGDS_CHECK_BOX_WIDTH,
+00161         EGDS_MESSAGE_BOX_WIDTH,
+00163         EGDS_MESSAGE_BOX_HEIGHT,
+00165         EGDS_BUTTON_WIDTH,
+00167         EGDS_BUTTON_HEIGHT,
+00169         EGDS_TEXT_DISTANCE_X,
+00171         EGDS_TEXT_DISTANCE_Y,
+00173         EGDS_TITLEBARTEXT_DISTANCE_X,
+00175         EGDS_TITLEBARTEXT_DISTANCE_Y,
+00177         EGDS_MESSAGE_BOX_GAP_SPACE,
+00179         EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH,
+00181         EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH,
+00183         EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT,
+00185         EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT,
+00187         EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X,
+00189         EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y,
+00191         EGDS_BUTTON_PRESSED_TEXT_OFFSET_X,
+00193         EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y,
+00194 
+00197         EGDS_COUNT
+00198     };
+00199 
+00200 
+00202     const c8* const GUISkinSizeNames[EGDS_COUNT+1] =
+00203     {
+00204         "ScrollBarSize",
+00205         "MenuHeight",
+00206         "WindowButtonWidth",
+00207         "CheckBoxWidth",
+00208         "MessageBoxWidth",
+00209         "MessageBoxHeight",
+00210         "ButtonWidth",
+00211         "ButtonHeight",
+00212         "TextDistanceX",
+00213         "TextDistanceY",
+00214         "TitleBarTextX",
+00215         "TitleBarTextY",
+00216         "MessageBoxGapSpace",
+00217         "MessageBoxMinTextWidth",
+00218         "MessageBoxMaxTextWidth",
+00219         "MessageBoxMinTextHeight",
+00220         "MessageBoxMaxTextHeight",
+00221         "ButtonPressedImageOffsetX",
+00222         "ButtonPressedImageOffsetY"
+00223         "ButtonPressedTextOffsetX",
+00224         "ButtonPressedTextOffsetY",
+00225         0
+00226     };
+00227 
+00228 
+00229     enum EGUI_DEFAULT_TEXT
+00230     {
+00232         EGDT_MSG_BOX_OK = 0,
+00234         EGDT_MSG_BOX_CANCEL,
+00236         EGDT_MSG_BOX_YES,
+00238         EGDT_MSG_BOX_NO,
+00240         EGDT_WINDOW_CLOSE,
+00242         EGDT_WINDOW_MAXIMIZE,
+00244         EGDT_WINDOW_MINIMIZE,
+00246         EGDT_WINDOW_RESTORE,
+00247 
+00249         EGDT_COUNT
+00250     };
+00251 
+00253     const c8* const GUISkinTextNames[EGDT_COUNT+1] =
+00254     {
+00255         "MessageBoxOkay",
+00256         "MessageBoxCancel",
+00257         "MessageBoxYes",
+00258         "MessageBoxNo",
+00259         "WindowButtonClose",
+00260         "WindowButtonMaximize",
+00261         "WindowButtonMinimize",
+00262         "WindowButtonRestore",
+00263         0
+00264     };
+00265 
+00267     enum EGUI_DEFAULT_ICON
+00268     {
+00270         EGDI_WINDOW_MAXIMIZE = 0,
+00272         EGDI_WINDOW_RESTORE,
+00274         EGDI_WINDOW_CLOSE,
+00276         EGDI_WINDOW_MINIMIZE,
+00278         EGDI_WINDOW_RESIZE,
+00280         EGDI_CURSOR_UP,
+00282         EGDI_CURSOR_DOWN,
+00284         EGDI_CURSOR_LEFT,
+00286         EGDI_CURSOR_RIGHT,
+00288         EGDI_MENU_MORE,
+00290         EGDI_CHECK_BOX_CHECKED,
+00292         EGDI_DROP_DOWN,
+00294         EGDI_SMALL_CURSOR_UP,
+00296         EGDI_SMALL_CURSOR_DOWN,
+00298         EGDI_RADIO_BUTTON_CHECKED,
+00300         EGDI_MORE_LEFT,
+00302         EGDI_MORE_RIGHT,
+00304         EGDI_MORE_UP,
+00306         EGDI_MORE_DOWN,
+00308         EGDI_EXPAND,
+00309 
+00311         EGDI_COLLAPSE,
+00313         EGDI_FILE,
+00315         EGDI_DIRECTORY,
+00316 
+00318         EGDI_COUNT
+00319     };
+00320 
+00321     const c8* const GUISkinIconNames[EGDI_COUNT+1] =
+00322     {
+00323         "windowMaximize",
+00324         "windowRestore",
+00325         "windowClose",
+00326         "windowMinimize",
+00327         "windowResize",
+00328         "cursorUp",
+00329         "cursorDown",
+00330         "cursorLeft",
+00331         "cursorRight",
+00332         "menuMore",
+00333         "checkBoxChecked",
+00334         "dropDown",
+00335         "smallCursorUp",
+00336         "smallCursorDown",
+00337         "radioButtonChecked",
+00338         "moreLeft",
+00339         "moreRight",
+00340         "moreUp",
+00341         "moreDown",
+00342         "expand",
+00343         "collapse",
+00344         "file",
+00345         "directory",
+00346         0
+00347     };
+00348 
+00349     // Customizable fonts
+00350     enum EGUI_DEFAULT_FONT
+00351     {
+00353         EGDF_DEFAULT=0,
+00355         EGDF_BUTTON,
+00357         EGDF_WINDOW,
+00359         EGDF_MENU,
+00361         EGDF_TOOLTIP,
+00364         EGDF_COUNT
+00365     };
+00366 
+00367     const c8* const GUISkinFontNames[EGDF_COUNT+1] =
+00368     {
+00369         "defaultFont",
+00370         "buttonFont",
+00371         "windowFont",
+00372         "menuFont",
+00373         "tooltipFont",
+00374         0
+00375     };
+00376 
+00378     class IGUISkin : public virtual io::IAttributeExchangingObject
+00379     {
+00380     public:
+00381 
+00383         virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0;
+00384 
+00386         virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) = 0;
+00387 
+00389         virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0;
+00390 
+00392 
+00394         virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0;
+00395 
+00397 
+00399         virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) = 0;
+00400 
+00402         virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0;
+00403 
+00405         virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0;
+00406 
+00408         virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0;
+00409 
+00411         virtual IGUISpriteBank* getSpriteBank() const = 0;
+00412 
+00414         virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
+00415 
+00417 
+00418         virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0;
+00419 
+00421 
+00425         virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index) = 0;
+00426 
+00428 
+00436         virtual void draw3DButtonPaneStandard(IGUIElement* element,
+00437             const core::rect<s32>& rect,
+00438             const core::rect<s32>* clip=0) = 0;
+00439 
+00441 
+00449         virtual void draw3DButtonPanePressed(IGUIElement* element,
+00450             const core::rect<s32>& rect,
+00451             const core::rect<s32>* clip=0) = 0;
+00452 
+00454 
+00465         virtual void draw3DSunkenPane(IGUIElement* element,
+00466             video::SColor bgcolor, bool flat, bool fillBackGround,
+00467             const core::rect<s32>& rect,
+00468             const core::rect<s32>* clip=0) = 0;
+00469 
+00471 
+00484         virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element,
+00485             bool drawTitleBar, video::SColor titleBarColor,
+00486             const core::rect<s32>& rect,
+00487             const core::rect<s32>* clip=0,
+00488             core::rect<s32>* checkClientArea=0) = 0;
+00489 
+00491 
+00499         virtual void draw3DMenuPane(IGUIElement* element,
+00500             const core::rect<s32>& rect,
+00501             const core::rect<s32>* clip=0) = 0;
+00502 
+00504 
+00510         virtual void draw3DToolBar(IGUIElement* element,
+00511             const core::rect<s32>& rect,
+00512             const core::rect<s32>* clip=0) = 0;
+00513 
+00515 
+00523         virtual void draw3DTabButton(IGUIElement* element, bool active,
+00524             const core::rect<s32>& rect, const core::rect<s32>* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0;
+00525 
+00527 
+00536         virtual void draw3DTabBody(IGUIElement* element, bool border, bool background,
+00537             const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0;
+00538 
+00540 
+00549         virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,
+00550             const core::position2di position, u32 starttime=0, u32 currenttime=0,
+00551             bool loop=false, const core::rect<s32>* clip=0) = 0;
+00552 
+00554 
+00562         virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color,
+00563             const core::rect<s32>& pos, const core::rect<s32>* clip = 0) = 0;
+00564 
+00566         virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; }
+00567     };
+00568 
+00569 
+00570 } // end namespace gui
+00571 } // end namespace irr
+00572 
+00573 #endif
+00574 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h.html new file mode 100644 index 0000000..6854646 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IGUISpinBox.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUISpinBox.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h_source.html new file mode 100644 index 0000000..bfd4cba --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_spin_box_8h_source.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: IGUISpinBox.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUISpinBox.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2006-2012 Michael Zeilfelder
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_SPIN_BOX_H_INCLUDED__
+00006 #define __I_GUI_SPIN_BOX_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace gui
+00013 {
+00014     class IGUIEditBox;
+00015 
+00017 
+00020     class IGUISpinBox : public IGUIElement
+00021     {
+00022     public:
+00023 
+00025         IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent,
+00026                     s32 id, core::rect<s32> rectangle)
+00027             : IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {}
+00028 
+00030         virtual IGUIEditBox* getEditBox() const = 0;
+00031 
+00033 
+00034         virtual void setValue(f32 val) = 0;
+00035 
+00037         virtual f32 getValue() const = 0;
+00038 
+00040 
+00042         virtual void setRange(f32 min, f32 max) = 0;
+00043 
+00045         virtual f32 getMin() const = 0;
+00046 
+00048         virtual f32 getMax() const = 0;
+00049 
+00051 
+00053         virtual void setStepSize(f32 step=1.f) = 0;
+00054 
+00057 
+00058         virtual void setDecimalPlaces(s32 places) = 0;
+00059 
+00061         virtual f32 getStepSize() const = 0;
+00062     };
+00063 
+00064 
+00065 } // end namespace gui
+00066 } // end namespace irr
+00067 
+00068 #endif // __I_GUI_SPIN_BOX_H_INCLUDED__
+00069 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h.html new file mode 100644 index 0000000..387e59a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: IGUISpriteBank.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUISpriteBank.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrArray.h"
+#include "SColor.h"
+#include "rect.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h_source.html new file mode 100644 index 0000000..f27d0db --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_sprite_bank_8h_source.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: IGUISpriteBank.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUISpriteBank.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_SPRITE_BANK_H_INCLUDED__
+00006 #define __I_GUI_SPRITE_BANK_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrArray.h"
+00010 #include "SColor.h"
+00011 #include "rect.h"
+00012 
+00013 namespace irr
+00014 {
+00015 
+00016 namespace video
+00017 {
+00018     class ITexture;
+00019 } // end namespace video
+00020 
+00021 namespace gui
+00022 {
+00023 
+00025 struct SGUISpriteFrame
+00026 {
+00027     u32 textureNumber;
+00028     u32 rectNumber;
+00029 };
+00030 
+00032 struct SGUISprite
+00033 {
+00034     SGUISprite() : Frames(), frameTime(0) {}
+00035 
+00036     core::array<SGUISpriteFrame> Frames;
+00037     u32 frameTime;
+00038 };
+00039 
+00040 
+00042 
+00045 class IGUISpriteBank : public virtual IReferenceCounted
+00046 {
+00047 public:
+00048 
+00050     virtual core::array< core::rect<s32> >& getPositions() = 0;
+00051 
+00053     virtual core::array< SGUISprite >& getSprites() = 0;
+00054 
+00056     virtual u32 getTextureCount() const = 0;
+00057 
+00059     virtual video::ITexture* getTexture(u32 index) const = 0;
+00060 
+00062     virtual void addTexture(video::ITexture* texture) = 0;
+00063 
+00065     virtual void setTexture(u32 index, video::ITexture* texture) = 0;
+00066 
+00070     virtual s32 addTextureAsSprite(video::ITexture* texture) = 0;
+00071 
+00073     virtual void clear() = 0;
+00074 
+00076     virtual void draw2DSprite(u32 index, const core::position2di& pos,
+00077             const core::rect<s32>* clip=0,
+00078             const video::SColor& color= video::SColor(255,255,255,255),
+00079             u32 starttime=0, u32 currenttime=0,
+00080             bool loop=true, bool center=false) = 0;
+00081 
+00083     virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos,
+00084             const core::rect<s32>* clip=0,
+00085             const video::SColor& color= video::SColor(255,255,255,255),
+00086             u32 starttime=0, u32 currenttime=0,
+00087             bool loop=true, bool center=false) = 0;
+00088 };
+00089 
+00090 
+00091 } // end namespace gui
+00092 } // end namespace irr
+00093 
+00094 #endif // __I_GUI_SPRITE_BANK_H_INCLUDED__
+00095 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h.html new file mode 100644 index 0000000..708ce45 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IGUIStaticText.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIStaticText.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h_source.html new file mode 100644 index 0000000..40b6dc2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_static_text_8h_source.html @@ -0,0 +1,210 @@ + + + + +Irrlicht 3D Engine: IGUIStaticText.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIStaticText.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_STATIC_TEXT_H_INCLUDED__
+00006 #define __I_GUI_STATIC_TEXT_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "SColor.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015     class IGUIFont;
+00016 
+00018     class IGUIStaticText : public IGUIElement
+00019     {
+00020     public:
+00021 
+00023         IGUIStaticText(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00024             : IGUIElement(EGUIET_STATIC_TEXT, environment, parent, id, rectangle) {}
+00025 
+00027 
+00029         virtual void setOverrideFont(IGUIFont* font=0) = 0;
+00030 
+00032 
+00033         virtual IGUIFont* getOverrideFont(void) const = 0;
+00034 
+00036 
+00038         virtual IGUIFont* getActiveFont() const = 0;
+00039 
+00041 
+00048         virtual void setOverrideColor(video::SColor color) = 0;
+00049 
+00051 
+00052         virtual video::SColor getOverrideColor(void) const = 0;
+00053 
+00055 
+00058         virtual void enableOverrideColor(bool enable) = 0;
+00059 
+00061 
+00062         virtual bool isOverrideColorEnabled(void) const = 0;
+00063 
+00065         virtual void setBackgroundColor(video::SColor color) = 0;
+00066 
+00068         virtual void setDrawBackground(bool draw) = 0;
+00069 
+00071 
+00072         virtual video::SColor getBackgroundColor() const = 0;
+00073 
+00075 
+00076         virtual bool isDrawBackgroundEnabled() const = 0;
+00077 
+00079         virtual void setDrawBorder(bool draw) = 0;
+00080 
+00082 
+00083         virtual bool isDrawBorderEnabled() const = 0;
+00084 
+00086 
+00090         virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
+00091 
+00093 
+00095         virtual void setWordWrap(bool enable) = 0;
+00096 
+00098 
+00099         virtual bool isWordWrapEnabled(void) const = 0;
+00100 
+00102 
+00105         virtual s32 getTextHeight() const = 0;
+00106 
+00108 
+00110         virtual s32 getTextWidth(void) const = 0;
+00111 
+00113         virtual void setTextRestrainedInside(bool restrainedInside) = 0;
+00114 
+00116         virtual bool isTextRestrainedInside() const = 0;
+00117 
+00119 
+00124         virtual void setRightToLeft(bool rtl) = 0;
+00125 
+00127         virtual bool isRightToLeft() const = 0;
+00128     };
+00129 
+00130 
+00131 } // end namespace gui
+00132 } // end namespace irr
+00133 
+00134 #endif
+00135 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h.html new file mode 100644 index 0000000..069586e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: IGUITabControl.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUITabControl.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "SColor.h"
+#include "IGUISkin.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h_source.html new file mode 100644 index 0000000..a6e4b84 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tab_control_8h_source.html @@ -0,0 +1,219 @@ + + + + +Irrlicht 3D Engine: IGUITabControl.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUITabControl.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_TAB_CONTROL_H_INCLUDED__
+00006 #define __I_GUI_TAB_CONTROL_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "SColor.h"
+00010 #include "IGUISkin.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace gui
+00015 {
+00017 
+00018     class IGUITab : public IGUIElement
+00019     {
+00020     public:
+00021 
+00023         IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00024             : IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {}
+00025 
+00027 
+00030         virtual s32 getNumber() const = 0;
+00031 
+00033         virtual void setDrawBackground(bool draw=true) = 0;
+00034 
+00036         virtual void setBackgroundColor(video::SColor c) = 0;
+00037 
+00039         virtual bool isDrawingBackground() const = 0;
+00040 
+00042         virtual video::SColor getBackgroundColor() const = 0;
+00043 
+00045         virtual void setTextColor(video::SColor c) = 0;
+00046 
+00048         virtual video::SColor getTextColor() const = 0;
+00049     };
+00050 
+00052 
+00055     class IGUITabControl : public IGUIElement
+00056     {
+00057     public:
+00058 
+00060         IGUITabControl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00061             : IGUIElement(EGUIET_TAB_CONTROL, environment, parent, id, rectangle) {}
+00062 
+00064         virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0;
+00065 
+00067 
+00068         virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1) = 0;
+00069 
+00071         virtual void removeTab(s32 idx) = 0;
+00072 
+00074         virtual void clear() = 0;
+00075 
+00077         virtual s32 getTabCount() const = 0;
+00078 
+00080 
+00083         virtual IGUITab* getTab(s32 idx) const = 0;
+00084 
+00086 
+00088         virtual bool setActiveTab(s32 idx) = 0;
+00089 
+00091 
+00093         virtual bool setActiveTab(IGUITab *tab) = 0;
+00094 
+00096         virtual s32 getActiveTab() const = 0;
+00097 
+00099 
+00100         virtual s32 getTabAt(s32 xpos, s32 ypos) const = 0;
+00101 
+00103         virtual void setTabHeight( s32 height ) = 0;
+00104 
+00106 
+00107         virtual s32 getTabHeight() const = 0;
+00108 
+00110         virtual void setTabMaxWidth(s32 width ) = 0;
+00111 
+00113         virtual s32 getTabMaxWidth() const = 0;
+00114 
+00116 
+00117         virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0;
+00118 
+00120 
+00121         virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const = 0;
+00122 
+00124         virtual void setTabExtraWidth( s32 extraWidth ) = 0;
+00125 
+00127 
+00128         virtual s32 getTabExtraWidth() const = 0;
+00129     };
+00130 
+00131 
+00132 } // end namespace gui
+00133 } // end namespace irr
+00134 
+00135 #endif
+00136 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h.html new file mode 100644 index 0000000..da6b028 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h.html @@ -0,0 +1,174 @@ + + + + +Irrlicht 3D Engine: IGUITable.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUITable.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "irrTypes.h"
+#include "SColor.h"
+#include "IGUISkin.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h_source.html new file mode 100644 index 0000000..602b163 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_table_8h_source.html @@ -0,0 +1,264 @@ + + + + +Irrlicht 3D Engine: IGUITable.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUITable.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2003-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_TABLE_H_INCLUDED__
+00006 #define __I_GUI_TABLE_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "irrTypes.h"
+00010 #include "SColor.h"
+00011 #include "IGUISkin.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace gui
+00016 {
+00017 
+00019     enum EGUI_COLUMN_ORDERING
+00020     {
+00022         EGCO_NONE,
+00023 
+00025         EGCO_CUSTOM,
+00026 
+00028         EGCO_ASCENDING,
+00029 
+00031         EGCO_DESCENDING,
+00032 
+00034         EGCO_FLIP_ASCENDING_DESCENDING,
+00035 
+00037         EGCO_COUNT
+00038     };
+00039 
+00041     const c8* const GUIColumnOrderingNames[] =
+00042     {
+00043         "none",
+00044         "custom",
+00045         "ascend",
+00046         "descend",
+00047         "ascend_descend",
+00048         0,
+00049     };
+00050 
+00051     enum EGUI_ORDERING_MODE
+00052     {
+00054         EGOM_NONE,
+00055 
+00057         EGOM_ASCENDING,
+00058 
+00060         EGOM_DESCENDING,
+00061 
+00064         EGOM_COUNT
+00065     };
+00066 
+00067     const c8* const GUIOrderingModeNames[] =
+00068     {
+00069         "none",
+00070         "ascending",
+00071         "descending",
+00072         0
+00073     };
+00074 
+00075     enum EGUI_TABLE_DRAW_FLAGS
+00076     {
+00077         EGTDF_ROWS = 1,
+00078         EGTDF_COLUMNS = 2,
+00079         EGTDF_ACTIVE_ROW = 4,
+00080         EGTDF_COUNT
+00081     };
+00082 
+00084 
+00089     class IGUITable : public IGUIElement
+00090     {
+00091     public:
+00093         IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00094             : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
+00095 
+00097 
+00098         virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
+00099 
+00101         virtual void removeColumn(u32 columnIndex) = 0;
+00102 
+00104         virtual s32 getColumnCount() const = 0;
+00105 
+00107 
+00110         virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
+00111 
+00113         virtual s32 getActiveColumn() const = 0;
+00114 
+00116         virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
+00117 
+00119         virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
+00120 
+00122         virtual u32 getColumnWidth(u32 columnIndex) const = 0;
+00123 
+00125         virtual void setResizableColumns(bool resizable) = 0;
+00126 
+00128         virtual bool hasResizableColumns() const = 0;
+00129 
+00131 
+00133         virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
+00134 
+00136         virtual s32 getSelected() const = 0;
+00137 
+00139         virtual void setSelected( s32 index ) = 0;
+00140 
+00142         virtual s32 getRowCount() const = 0;
+00143 
+00145 
+00152         virtual u32 addRow(u32 rowIndex) = 0;
+00153 
+00155         virtual void removeRow(u32 rowIndex) = 0;
+00156 
+00158         virtual void clearRows() = 0;
+00159 
+00161         virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
+00162 
+00164 
+00170         virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
+00171 
+00173         virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
+00174 
+00176         virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
+00177 
+00179         virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
+00180 
+00182         virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
+00183 
+00185         virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
+00186 
+00188         virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
+00189 
+00191         virtual void clear() = 0;
+00192 
+00194         virtual void setDrawFlags(s32 flags) = 0;
+00195 
+00197         virtual s32 getDrawFlags() const = 0;
+00198     };
+00199 
+00200 
+00201 } // end namespace gui
+00202 } // end namespace irr
+00203 
+00204 #endif
+00205 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h.html new file mode 100644 index 0000000..5e6b663 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IGUIToolbar.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIToolbar.h File Reference
+
+
+
#include "IGUIElement.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h_source.html new file mode 100644 index 0000000..6fc9918 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_toolbar_8h_source.html @@ -0,0 +1,157 @@ + + + + +Irrlicht 3D Engine: IGUIToolbar.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIToolbar.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_TOOL_BAR_H_INCLUDED__
+00006 #define __I_GUI_TOOL_BAR_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace video
+00013 {
+00014     class ITexture;
+00015 } // end namespace video
+00016 namespace gui
+00017 {
+00018     class IGUIButton;
+00019 
+00021     class IGUIToolBar : public IGUIElement
+00022     {
+00023     public:
+00024 
+00026         IGUIToolBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00027             : IGUIElement(EGUIET_TOOL_BAR, environment, parent, id, rectangle) {}
+00028 
+00030         virtual IGUIButton* addButton(s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext=0,
+00031             video::ITexture* img=0, video::ITexture* pressedimg=0,
+00032             bool isPushButton=false, bool useAlphaChannel=false) = 0;
+00033     };
+00034 
+00035 
+00036 } // end namespace gui
+00037 } // end namespace irr
+00038 
+00039 #endif
+00040 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h.html new file mode 100644 index 0000000..648e550 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: IGUITreeView.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUITreeView.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "IGUIImageList.h"
+#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h_source.html new file mode 100644 index 0000000..db819b5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_tree_view_8h_source.html @@ -0,0 +1,296 @@ + + + + +Irrlicht 3D Engine: IGUITreeView.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUITreeView.h
+
+
+Go to the documentation of this file.
00001 // written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_TREE_VIEW_H_INCLUDED__
+00006 #define __I_GUI_TREE_VIEW_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "IGUIImageList.h"
+00010 #include "irrTypes.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace gui
+00015 {
+00016     class IGUIFont;
+00017     class IGUITreeView;
+00018 
+00019 
+00021 
+00027     class IGUITreeViewNode : public IReferenceCounted
+00028     {
+00029     public:
+00031         virtual IGUITreeView* getOwner() const = 0;
+00032 
+00034 
+00035         virtual IGUITreeViewNode* getParent() const = 0;
+00036 
+00038         virtual const wchar_t* getText() const = 0;
+00039 
+00041         virtual void setText( const wchar_t* text ) = 0;
+00042 
+00044         virtual const wchar_t* getIcon() const = 0;
+00045 
+00047         virtual void setIcon( const wchar_t* icon ) = 0;
+00048 
+00050         virtual u32 getImageIndex() const = 0;
+00051 
+00053         virtual void setImageIndex( u32 imageIndex ) = 0;
+00054 
+00056         virtual u32 getSelectedImageIndex() const = 0;
+00057 
+00059         virtual void setSelectedImageIndex( u32 imageIndex ) = 0;
+00060 
+00062         virtual void* getData() const = 0;
+00063 
+00065         virtual void setData( void* data ) = 0;
+00066 
+00068         virtual IReferenceCounted* getData2() const = 0;
+00069 
+00071         virtual void setData2( IReferenceCounted* data ) = 0;
+00072 
+00074         virtual u32 getChildCount() const = 0;
+00075 
+00077         virtual void clearChildren() = 0;
+00078 
+00080 
+00082         _IRR_DEPRECATED_ void clearChilds()
+00083         {
+00084             return clearChildren();
+00085         }
+00086 
+00088         virtual bool hasChildren() const = 0;
+00089 
+00091 
+00093         _IRR_DEPRECATED_ bool hasChilds() const
+00094         {
+00095             return hasChildren();
+00096         }
+00097 
+00099 
+00107         virtual IGUITreeViewNode* addChildBack(
+00108                 const wchar_t* text, const wchar_t* icon = 0,
+00109                 s32 imageIndex=-1, s32 selectedImageIndex=-1,
+00110                 void* data=0, IReferenceCounted* data2=0) =0;
+00111 
+00113 
+00121         virtual IGUITreeViewNode* addChildFront(
+00122                 const wchar_t* text, const wchar_t* icon = 0,
+00123                 s32 imageIndex=-1, s32 selectedImageIndex=-1,
+00124                 void* data=0, IReferenceCounted* data2=0 ) =0;
+00125 
+00127 
+00137         virtual IGUITreeViewNode* insertChildAfter(
+00138                 IGUITreeViewNode* other,
+00139                 const wchar_t* text, const wchar_t* icon = 0,
+00140                 s32 imageIndex=-1, s32 selectedImageIndex=-1,
+00141                 void* data=0, IReferenceCounted* data2=0) =0;
+00142 
+00144 
+00154         virtual IGUITreeViewNode* insertChildBefore(
+00155                 IGUITreeViewNode* other,
+00156                 const wchar_t* text, const wchar_t* icon = 0,
+00157                 s32 imageIndex=-1, s32 selectedImageIndex=-1,
+00158                 void* data=0, IReferenceCounted* data2=0) = 0;
+00159 
+00161 
+00162         virtual IGUITreeViewNode* getFirstChild() const = 0;
+00163 
+00165 
+00166         virtual IGUITreeViewNode* getLastChild() const = 0;
+00167 
+00169 
+00172         virtual IGUITreeViewNode* getPrevSibling() const = 0;
+00173 
+00175 
+00178         virtual IGUITreeViewNode* getNextSibling() const = 0;
+00179 
+00181 
+00183         virtual IGUITreeViewNode* getNextVisible() const = 0;
+00184 
+00186 
+00187         virtual bool deleteChild( IGUITreeViewNode* child ) = 0;
+00188 
+00190 
+00191         virtual bool moveChildUp( IGUITreeViewNode* child ) = 0;
+00192 
+00194 
+00195         virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
+00196 
+00198         virtual bool getExpanded() const = 0;
+00199 
+00201         virtual void setExpanded( bool expanded ) = 0;
+00202 
+00204         virtual bool getSelected() const = 0;
+00205 
+00207         virtual void setSelected( bool selected ) = 0;
+00208 
+00210         virtual bool isRoot() const = 0;
+00211 
+00213 
+00214         virtual s32 getLevel() const = 0;
+00215 
+00217         virtual bool isVisible() const = 0;
+00218     };
+00219 
+00220 
+00222 
+00225     class IGUITreeView : public IGUIElement
+00226     {
+00227     public:
+00229         IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent,
+00230                 s32 id, core::rect<s32> rectangle)
+00231             : IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {}
+00232 
+00234         virtual IGUITreeViewNode* getRoot() const = 0;
+00235 
+00237         virtual IGUITreeViewNode* getSelected() const = 0;
+00238 
+00240         virtual bool getLinesVisible() const = 0;
+00241 
+00243 
+00244         virtual void setLinesVisible( bool visible ) = 0;
+00245 
+00247 
+00253         virtual void setIconFont( IGUIFont* font ) = 0;
+00254 
+00256 
+00257         virtual void setImageList( IGUIImageList* imageList ) = 0;
+00258 
+00260         virtual IGUIImageList* getImageList() const = 0;
+00261 
+00263         virtual void setImageLeftOfIcon( bool bLeftOf ) = 0;
+00264 
+00266         virtual bool getImageLeftOfIcon() const = 0;
+00267 
+00269 
+00270         virtual IGUITreeViewNode* getLastEventNode() const = 0;
+00271     };
+00272 
+00273 
+00274 } // end namespace gui
+00275 } // end namespace irr
+00276 
+00277 #endif
+00278 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h.html new file mode 100644 index 0000000..8e86b73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IGUIWindow.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGUIWindow.h File Reference
+
+
+
#include "IGUIElement.h"
+#include "EMessageBoxFlags.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h_source.html new file mode 100644 index 0000000..6f14444 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_g_u_i_window_8h_source.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: IGUIWindow.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGUIWindow.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GUI_WINDOW_H_INCLUDED__
+00006 #define __I_GUI_WINDOW_H_INCLUDED__
+00007 
+00008 #include "IGUIElement.h"
+00009 #include "EMessageBoxFlags.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace gui
+00014 {
+00015     class IGUIButton;
+00016 
+00018 
+00021     class IGUIWindow : public IGUIElement
+00022     {
+00023     public:
+00024 
+00026         IGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
+00027             : IGUIElement(EGUIET_WINDOW, environment, parent, id, rectangle) {}
+00028 
+00030 
+00031         virtual IGUIButton* getCloseButton() const = 0;
+00032 
+00034 
+00035         virtual IGUIButton* getMinimizeButton() const = 0;
+00036 
+00038 
+00039         virtual IGUIButton* getMaximizeButton() const = 0;
+00040 
+00042         virtual bool isDraggable() const = 0;
+00043 
+00045         virtual void setDraggable(bool draggable) = 0;
+00046 
+00048         virtual void setDrawBackground(bool draw) = 0;
+00049 
+00051         virtual bool getDrawBackground() const = 0;
+00052 
+00055         virtual void setDrawTitlebar(bool draw) = 0;
+00056 
+00058         virtual bool getDrawTitlebar() const = 0;
+00059 
+00061 
+00066         virtual core::rect<s32> getClientRect() const = 0;
+00067     };
+00068 
+00069 
+00070 } // end namespace gui
+00071 } // end namespace irr
+00072 
+00073 #endif
+00074 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h.html new file mode 100644 index 0000000..5e303ca --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IGeometryCreator.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IGeometryCreator.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "IMesh.h"
+#include "IImage.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h_source.html new file mode 100644 index 0000000..82c3509 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_geometry_creator_8h_source.html @@ -0,0 +1,215 @@ + + + + +Irrlicht 3D Engine: IGeometryCreator.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IGeometryCreator.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_GEOMETRY_CREATOR_H_INCLUDED__
+00006 #define __I_GEOMETRY_CREATOR_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "IMesh.h"
+00010 #include "IImage.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace video
+00015 {
+00016     class IVideoDriver;
+00017     class SMaterial;
+00018 }
+00019 
+00020 namespace scene
+00021 {
+00022 
+00024 
+00025 class IGeometryCreator : public IReferenceCounted
+00026 {
+00027 public:
+00028 
+00030 
+00034     virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0;
+00035 
+00037 
+00046     virtual IMesh* createHillPlaneMesh(
+00047             const core::dimension2d<f32>& tileSize,
+00048             const core::dimension2d<u32>& tileCount,
+00049             video::SMaterial* material, f32 hillHeight,
+00050             const core::dimension2d<f32>& countHills,
+00051             const core::dimension2d<f32>& textureRepeatCount) const =0;
+00052 
+00054 
+00061     IMesh* createPlaneMesh(
+00062             const core::dimension2d<f32>& tileSize,
+00063             const core::dimension2d<u32>& tileCount=core::dimension2du(1,1),
+00064             video::SMaterial* material=0,
+00065             const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const
+00066     {
+00067         return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount);
+00068     }
+00069 
+00071 
+00086     virtual IMesh* createTerrainMesh(video::IImage* texture,
+00087             video::IImage* heightmap,
+00088             const core::dimension2d<f32>& stretchSize,
+00089             f32 maxHeight, video::IVideoDriver* driver,
+00090             const core::dimension2d<u32>& defaultVertexBlockSize,
+00091             bool debugBorders=false) const =0;
+00092 
+00094 
+00107     virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4,
+00108             const u32 tesselationCone = 8, const f32 height = 1.f,
+00109             const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f,
+00110             const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF,
+00111             const video::SColor colorCone = 0xFFFFFFFF) const =0;
+00112 
+00113 
+00115 
+00121     virtual IMesh* createSphereMesh(f32 radius = 5.f,
+00122             u32 polyCountX = 16, u32 polyCountY = 16) const =0;
+00123 
+00125 
+00134     virtual IMesh* createCylinderMesh(f32 radius, f32 length,
+00135             u32 tesselation,
+00136             const video::SColor& color=video::SColor(0xffffffff),
+00137             bool closeTop=true, f32 oblique=0.f) const =0;
+00138 
+00140 
+00149     virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
+00150             const video::SColor& colorTop=video::SColor(0xffffffff),
+00151             const video::SColor& colorBottom=video::SColor(0xffffffff),
+00152             f32 oblique=0.f) const =0;
+00153 
+00155 
+00164     virtual IMesh* createVolumeLightMesh(
+00165             const u32 subdivideU=32, const u32 subdivideV=32,
+00166             const video::SColor footColor = 0xffffffff,
+00167             const video::SColor tailColor = 0xffffffff,
+00168             const f32 lpDistance = 8.f,
+00169             const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0;
+00170 };
+00171 
+00172 
+00173 } // end namespace scene
+00174 } // end namespace irr
+00175 
+00176 #endif // __I_GEOMETRY_CREATOR_H_INCLUDED__
+00177 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_image_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_image_8h.html new file mode 100644 index 0000000..c692cf9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_image_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: IImage.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IImage.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "position2d.h"
+#include "rect.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_image_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_image_8h_source.html new file mode 100644 index 0000000..ee2781a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_image_8h_source.html @@ -0,0 +1,241 @@ + + + + +Irrlicht 3D Engine: IImage.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IImage.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_IMAGE_H_INCLUDED__
+00006 #define __I_IMAGE_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "position2d.h"
+00010 #include "rect.h"
+00011 #include "SColor.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace video
+00016 {
+00017 
+00019 
+00022 class IImage : public virtual IReferenceCounted
+00023 {
+00024 public:
+00025 
+00027 
+00032     virtual void* lock() = 0;
+00033 
+00035 
+00037     virtual void unlock() = 0;
+00038 
+00040     virtual const core::dimension2d<u32>& getDimension() const = 0;
+00041 
+00043     virtual u32 getBitsPerPixel() const = 0;
+00044 
+00046     virtual u32 getBytesPerPixel() const = 0;
+00047 
+00049     virtual u32 getImageDataSizeInBytes() const = 0;
+00050 
+00052     virtual u32 getImageDataSizeInPixels() const = 0;
+00053 
+00055     virtual SColor getPixel(u32 x, u32 y) const = 0;
+00056 
+00058     virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend = false ) = 0;
+00059 
+00061     virtual ECOLOR_FORMAT getColorFormat() const = 0;
+00062 
+00064     virtual u32 getRedMask() const = 0;
+00065 
+00067     virtual u32 getGreenMask() const = 0;
+00068 
+00070     virtual u32 getBlueMask() const = 0;
+00071 
+00073     virtual u32 getAlphaMask() const = 0;
+00074 
+00076     virtual u32 getPitch() const =0;
+00077 
+00079     virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format=ECF_A8R8G8B8, u32 pitch=0) =0;
+00080 
+00082     virtual void copyToScaling(IImage* target) =0;
+00083 
+00085     virtual void copyTo(IImage* target, const core::position2d<s32>& pos=core::position2d<s32>(0,0)) =0;
+00086 
+00088     virtual void copyTo(IImage* target, const core::position2d<s32>& pos, const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect=0) =0;
+00089 
+00091     virtual void copyToWithAlpha(IImage* target, const core::position2d<s32>& pos,
+00092             const core::rect<s32>& sourceRect, const SColor &color,
+00093             const core::rect<s32>* clipRect = 0) =0;
+00094 
+00096     virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false) = 0;
+00097 
+00099     virtual void fill(const SColor &color) =0;
+00100 
+00102     static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
+00103     {
+00104         switch(format)
+00105         {
+00106         case ECF_A1R5G5B5:
+00107             return 16;
+00108         case ECF_R5G6B5:
+00109             return 16;
+00110         case ECF_R8G8B8:
+00111             return 24;
+00112         case ECF_A8R8G8B8:
+00113             return 32;
+00114         case ECF_R16F:
+00115             return 16;
+00116         case ECF_G16R16F:
+00117             return 32;
+00118         case ECF_A16B16G16R16F:
+00119             return 64;
+00120         case ECF_R32F:
+00121             return 32;
+00122         case ECF_G32R32F:
+00123             return 64;
+00124         case ECF_A32B32G32R32F:
+00125             return 128;
+00126         default:
+00127             return 0;
+00128         }
+00129     }
+00130 
+00132 
+00135     static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format)
+00136     {
+00137         switch(format)
+00138         {
+00139             case ECF_A1R5G5B5:
+00140             case ECF_R5G6B5:
+00141             case ECF_R8G8B8:
+00142             case ECF_A8R8G8B8:
+00143                 return false;
+00144             default:
+00145                 return true;
+00146         }
+00147     }
+00148 
+00149 };
+00150 
+00151 } // end namespace video
+00152 } // end namespace irr
+00153 
+00154 #endif
+00155 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h.html new file mode 100644 index 0000000..5f857a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IImageLoader.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IImageLoader.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "IImage.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h_source.html new file mode 100644 index 0000000..c038258 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_image_loader_8h_source.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: IImageLoader.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IImageLoader.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SURFACE_LOADER_H_INCLUDED__
+00006 #define __I_SURFACE_LOADER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "IImage.h"
+00010 #include "path.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace io
+00015 {
+00016     class IReadFile;
+00017 } // end namespace io
+00018 namespace video
+00019 {
+00020 
+00022 
+00026 class IImageLoader : public virtual IReferenceCounted
+00027 {
+00028 public:
+00029 
+00031 
+00034     virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
+00035 
+00037 
+00040     virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0;
+00041 
+00043 
+00045     virtual IImage* loadImage(io::IReadFile* file) const = 0;
+00046 };
+00047 
+00048 
+00049 } // end namespace video
+00050 } // end namespace irr
+00051 
+00052 #endif
+00053 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h.html new file mode 100644 index 0000000..5077746 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IImageWriter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IImageWriter.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrString.h"
+#include "coreutil.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h_source.html new file mode 100644 index 0000000..bd61311 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_image_writer_8h_source.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: IImageWriter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IImageWriter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef _I_IMAGE_WRITER_H_INCLUDED__
+00006 #define _I_IMAGE_WRITER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrString.h"
+00010 #include "coreutil.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace io
+00015 {
+00016     class IWriteFile;
+00017 } // end namespace io
+00018 
+00019 namespace video
+00020 {
+00021     class IImage;
+00022 
+00023 
+00025 class IImageWriter : public IReferenceCounted
+00026 {
+00027 public:
+00029 
+00031     virtual bool isAWriteableFileExtension(const io::path& filename) const = 0;
+00032 
+00034 
+00038     virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0;
+00039 };
+00040 
+00041 } // namespace video
+00042 } // namespace irr
+00043 
+00044 #endif // _I_IMAGE_WRITER_H_INCLUDED__
+00045 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h.html new file mode 100644 index 0000000..2ad523b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IIndexBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IIndexBuffer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrArray.h"
+#include "SVertexIndex.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h_source.html new file mode 100644 index 0000000..8b113ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_index_buffer_8h_source.html @@ -0,0 +1,181 @@ + + + + +Irrlicht 3D Engine: IIndexBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IIndexBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_INDEX_BUFFER_H_INCLUDED__
+00006 #define __I_INDEX_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrArray.h"
+00010 
+00011 #include "SVertexIndex.h"
+00012 
+00013 namespace irr
+00014 {
+00015 
+00016 namespace video
+00017 {
+00018 
+00019 }
+00020 
+00021 namespace scene
+00022 {
+00023 
+00024     class IIndexBuffer : public virtual IReferenceCounted
+00025     {
+00026     public:
+00027 
+00028         virtual void* getData() =0;
+00029 
+00030         virtual video::E_INDEX_TYPE getType() const =0;
+00031         virtual void setType(video::E_INDEX_TYPE IndexType) =0;
+00032 
+00033         virtual u32 stride() const =0;
+00034 
+00035         virtual u32 size() const =0;
+00036         virtual void push_back (const u32 &element) =0;
+00037         virtual u32 operator [](u32 index) const =0;
+00038         virtual u32 getLast() =0;
+00039         virtual void setValue(u32 index, u32 value) =0;
+00040         virtual void set_used(u32 usedNow) =0;
+00041         virtual void reallocate(u32 new_size) =0;
+00042         virtual u32 allocated_size() const=0;
+00043 
+00044         virtual void* pointer() =0;
+00045 
+00047         virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0;
+00048 
+00050         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0;
+00051 
+00053         virtual void setDirty() = 0;
+00054 
+00056 
+00057         virtual u32 getChangedID() const = 0;
+00058     };
+00059 
+00060 
+00061 } // end namespace scene
+00062 } // end namespace irr
+00063 
+00064 #endif
+00065 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h.html new file mode 100644 index 0000000..e75e88a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: ILightManager.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ILightManager.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrArray.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h_source.html new file mode 100644 index 0000000..b2c2a25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_light_manager_8h_source.html @@ -0,0 +1,163 @@ + + + + +Irrlicht 3D Engine: ILightManager.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ILightManager.h
+
+
+Go to the documentation of this file.
00001 // Written by Colin MacDonald - all rights assigned to Nikolaus Gebhardt
+00002 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00003 // This file is part of the "Irrlicht Engine".
+00004 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00005 
+00006 #ifndef __I_LIGHT_MANAGER_H_INCLUDED__
+00007 #define __I_LIGHT_MANAGER_H_INCLUDED__
+00008 
+00009 #include "IReferenceCounted.h"
+00010 #include "irrArray.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016     class ILightSceneNode;
+00017 
+00019 
+00025     class ILightManager : public IReferenceCounted
+00026     {
+00027     public:
+00029 
+00037         virtual void OnPreRender(core::array<ISceneNode*> & lightList) = 0;
+00038 
+00040 
+00041         virtual void OnPostRender(void) = 0;
+00042 
+00044 
+00045         virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0;
+00046 
+00048 
+00049         virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0;
+00050 
+00052 
+00053         virtual void OnNodePreRender(ISceneNode* node) = 0;
+00054 
+00056 
+00057         virtual void OnNodePostRender(ISceneNode* node) = 0;
+00058     };
+00059 } // end namespace scene
+00060 } // end namespace irr
+00061 
+00062 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h.html new file mode 100644 index 0000000..b8a6c49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: ILightSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ILightSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+#include "SLight.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h_source.html new file mode 100644 index 0000000..91d52b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_light_scene_node_8h_source.html @@ -0,0 +1,181 @@ + + + + +Irrlicht 3D Engine: ILightSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ILightSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_LIGHT_SCENE_NODE_H_INCLUDED__
+00006 #define __I_LIGHT_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 #include "SLight.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00017 
+00022 class ILightSceneNode : public ISceneNode
+00023 {
+00024 public:
+00025 
+00027     ILightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00028         const core::vector3df& position = core::vector3df(0,0,0))
+00029         : ISceneNode(parent, mgr, id, position) {}
+00030 
+00032 
+00033     virtual void setLightData(const video::SLight& light) = 0;
+00034 
+00036 
+00037     virtual const video::SLight& getLightData() const = 0;
+00038 
+00040 
+00041     virtual video::SLight& getLightData() = 0;
+00042 
+00044 
+00047     virtual void setVisible(bool isVisible) = 0;
+00048 
+00050 
+00055     virtual void setRadius(f32 radius) = 0;
+00056 
+00058 
+00059     virtual f32 getRadius() const = 0;
+00060 
+00062 
+00063     virtual void setLightType(video::E_LIGHT_TYPE type) = 0;
+00064 
+00066 
+00067     virtual video::E_LIGHT_TYPE getLightType() const = 0;
+00068 
+00070 
+00074     virtual void enableCastShadow(bool shadow=true) = 0;
+00075 
+00077 
+00078     virtual bool getCastShadow() const = 0;
+00079 };
+00080 
+00081 } // end namespace scene
+00082 } // end namespace irr
+00083 
+00084 
+00085 #endif
+00086 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_logger_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_logger_8h.html new file mode 100644 index 0000000..20fcfb1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_logger_8h.html @@ -0,0 +1,151 @@ + + + + +Irrlicht 3D Engine: ILogger.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ILogger.h File Reference
+
+
+
#include "IReferenceCounted.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_logger_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_logger_8h_source.html new file mode 100644 index 0000000..6fbe494 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_logger_8h_source.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: ILogger.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ILogger.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_LOGGER_H_INCLUDED__
+00006 #define __I_LOGGER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00017 enum ELOG_LEVEL
+00018 {
+00020     ELL_DEBUG,
+00021 
+00023     ELL_INFORMATION,
+00024 
+00026     ELL_WARNING,
+00027 
+00029     ELL_ERROR,
+00030 
+00033     ELL_NONE
+00034 };
+00035 
+00036 
+00038 class ILogger : public virtual IReferenceCounted
+00039 {
+00040 public:
+00041 
+00043     virtual ~ILogger() {}
+00044 
+00046     virtual ELOG_LEVEL getLogLevel() const = 0;
+00047 
+00049 
+00055     virtual void setLogLevel(ELOG_LEVEL ll) = 0;
+00056 
+00058 
+00064     virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
+00065 
+00067 
+00075     virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
+00076     virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
+00077 
+00079 
+00087     virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
+00088 
+00090 
+00096     virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
+00097 };
+00098 
+00099 } // end namespace
+00100 
+00101 #endif
+00102 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h.html new file mode 100644 index 0000000..8ef1ce2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IMaterialRenderer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMaterialRenderer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "SMaterial.h"
+#include "S3DVertex.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h_source.html new file mode 100644 index 0000000..0021fc8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_8h_source.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: IMaterialRenderer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMaterialRenderer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MATERIAL_RENDERER_H_INCLUDED__
+00006 #define __I_MATERIAL_RENDERER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "SMaterial.h"
+00010 #include "S3DVertex.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace video
+00015 {
+00016 
+00017 class IVideoDriver;
+00018 class IMaterialRendererServices;
+00019 
+00021 
+00024 class IMaterialRenderer : public virtual IReferenceCounted
+00025 {
+00026 public:
+00027 
+00029 
+00050     virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial,
+00051         bool resetAllRenderstates, IMaterialRendererServices* services) {}
+00052 
+00054 
+00071     virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) { return true; }
+00072 
+00074 
+00076     virtual void OnUnsetMaterial() {}
+00077 
+00079 
+00081     virtual bool isTransparent() const { return false; }
+00082 
+00084 
+00093     virtual s32 getRenderCapability() const { return 0; }
+00094 };
+00095 
+00096 
+00097 } // end namespace video
+00098 } // end namespace irr
+00099 
+00100 #endif
+00101 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h.html new file mode 100644 index 0000000..0c71fe5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IMaterialRendererServices.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMaterialRendererServices.h File Reference
+
+
+
#include "SMaterial.h"
+#include "S3DVertex.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h_source.html new file mode 100644 index 0000000..5857b7f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_material_renderer_services_8h_source.html @@ -0,0 +1,178 @@ + + + + +Irrlicht 3D Engine: IMaterialRendererServices.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMaterialRendererServices.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__
+00006 #define __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__
+00007 
+00008 #include "SMaterial.h"
+00009 #include "S3DVertex.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace video
+00014 {
+00015 
+00016 class IVideoDriver;
+00017 
+00018 
+00020 class IMaterialRendererServices
+00021 {
+00022 public:
+00023 
+00025     virtual ~IMaterialRendererServices() {}
+00026 
+00028 
+00037     virtual void setBasicRenderStates(const SMaterial& material,
+00038         const SMaterial& lastMaterial,
+00039         bool resetAllRenderstates) = 0;
+00040 
+00042 
+00066     virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count) = 0;
+00067 
+00069     virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count) = 0;
+00070 
+00072     virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count) = 0;
+00073 
+00075 
+00080     virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
+00081 
+00083 
+00090     virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count) = 0;
+00091 
+00093     virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count) = 0;
+00094 
+00096     virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count) = 0;
+00097 
+00099 
+00104     virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
+00105 
+00107 
+00108     virtual IVideoDriver* getVideoDriver() = 0;
+00109 };
+00110 
+00111 } // end namespace video
+00112 } // end namespace irr
+00113 
+00114 #endif
+00115 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h.html new file mode 100644 index 0000000..4b6c95f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IMesh.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMesh.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "SMaterial.h"
+#include "EHardwareBufferFlags.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h_source.html new file mode 100644 index 0000000..28b0fda --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_8h_source.html @@ -0,0 +1,172 @@ + + + + +Irrlicht 3D Engine: IMesh.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMesh.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MESH_H_INCLUDED__
+00006 #define __I_MESH_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "SMaterial.h"
+00010 #include "EHardwareBufferFlags.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016     class IMeshBuffer;
+00017 
+00019 
+00023     class IMesh : public virtual IReferenceCounted
+00024     {
+00025     public:
+00026 
+00028 
+00029         virtual u32 getMeshBufferCount() const = 0;
+00030 
+00032 
+00036         virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0;
+00037 
+00039 
+00042         virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0;
+00043 
+00045 
+00046         virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
+00047 
+00049 
+00050         virtual void setBoundingBox( const core::aabbox3df& box) = 0;
+00051 
+00053 
+00055         virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0;
+00056 
+00058 
+00062         virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
+00063 
+00065 
+00068         virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
+00069     };
+00070 
+00071 } // end namespace scene
+00072 } // end namespace irr
+00073 
+00074 #endif
+00075 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h.html new file mode 100644 index 0000000..182fea2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: IMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMeshBuffer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "SMaterial.h"
+#include "aabbox3d.h"
+#include "S3DVertex.h"
+#include "SVertexIndex.h"
+#include "EHardwareBufferFlags.h"
+#include "EPrimitiveTypes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h_source.html new file mode 100644 index 0000000..08dc283 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_buffer_8h_source.html @@ -0,0 +1,221 @@ + + + + +Irrlicht 3D Engine: IMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MESH_BUFFER_H_INCLUDED__
+00006 #define __I_MESH_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "SMaterial.h"
+00010 #include "aabbox3d.h"
+00011 #include "S3DVertex.h"
+00012 #include "SVertexIndex.h"
+00013 #include "EHardwareBufferFlags.h"
+00014 #include "EPrimitiveTypes.h"
+00015 
+00016 namespace irr
+00017 {
+00018 namespace scene
+00019 {
+00021 
+00039     class IMeshBuffer : public virtual IReferenceCounted
+00040     {
+00041     public:
+00042 
+00044 
+00045         virtual video::SMaterial& getMaterial() = 0;
+00046 
+00048 
+00049         virtual const video::SMaterial& getMaterial() const = 0;
+00050 
+00052 
+00053         virtual video::E_VERTEX_TYPE getVertexType() const = 0;
+00054 
+00056 
+00058         virtual const void* getVertices() const = 0;
+00059 
+00061 
+00063         virtual void* getVertices() = 0;
+00064 
+00066 
+00067         virtual u32 getVertexCount() const = 0;
+00068 
+00070 
+00071         virtual video::E_INDEX_TYPE getIndexType() const =0;
+00072 
+00074 
+00075         virtual const u16* getIndices() const = 0;
+00076 
+00078 
+00079         virtual u16* getIndices() = 0;
+00080 
+00082 
+00083         virtual u32 getIndexCount() const = 0;
+00084 
+00086 
+00087         virtual const core::aabbox3df& getBoundingBox() const = 0;
+00088 
+00090 
+00092         virtual void setBoundingBox(const core::aabbox3df& box) = 0;
+00093 
+00095         virtual void recalculateBoundingBox() = 0;
+00096 
+00098         virtual const core::vector3df& getPosition(u32 i) const = 0;
+00099 
+00101         virtual core::vector3df& getPosition(u32 i) = 0;
+00102 
+00104         virtual const core::vector3df& getNormal(u32 i) const = 0;
+00105 
+00107         virtual core::vector3df& getNormal(u32 i) = 0;
+00108 
+00110         virtual const core::vector2df& getTCoords(u32 i) const = 0;
+00111 
+00113         virtual core::vector2df& getTCoords(u32 i) = 0;
+00114 
+00116 
+00121         virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) = 0;
+00122 
+00124 
+00126         virtual void append(const IMeshBuffer* const other) = 0;
+00127 
+00129         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0;
+00130 
+00132         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0;
+00133 
+00135         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) = 0;
+00136 
+00138         virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
+00139 
+00141 
+00142         virtual u32 getChangedID_Vertex() const = 0;
+00143 
+00145 
+00146         virtual u32 getChangedID_Index() const = 0;
+00147     };
+00148 
+00149 } // end namespace scene
+00150 } // end namespace irr
+00151 
+00152 #endif
+00153 
+00154 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h.html new file mode 100644 index 0000000..67548af --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IMeshCache.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMeshCache.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h_source.html new file mode 100644 index 0000000..420a4f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_cache_8h_source.html @@ -0,0 +1,223 @@ + + + + +Irrlicht 3D Engine: IMeshCache.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMeshCache.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MESH_CACHE_H_INCLUDED__
+00006 #define __I_MESH_CACHE_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 
+00014 namespace scene
+00015 {
+00016     class IMesh;
+00017     class IAnimatedMesh;
+00018     class IAnimatedMeshSceneNode;
+00019     class IMeshLoader;
+00020 
+00022 
+00027     class IMeshCache : public virtual IReferenceCounted
+00028     {
+00029     public:
+00030 
+00032         virtual ~IMeshCache() {}
+00033 
+00035 
+00050         virtual void addMesh(const io::path& name, IAnimatedMesh* mesh) = 0;
+00051 
+00053 
+00057         virtual void removeMesh(const IMesh* const mesh) = 0;
+00058 
+00060 
+00065         virtual u32 getMeshCount() const = 0;
+00066 
+00068 
+00070         virtual s32 getMeshIndex(const IMesh* const mesh) const = 0;
+00071 
+00073 
+00079         virtual IAnimatedMesh* getMeshByIndex(u32 index) = 0;
+00080 
+00082 
+00084         _IRR_DEPRECATED_ IAnimatedMesh* getMeshByFilename(const io::path& filename)
+00085         {
+00086             return getMeshByName(filename);
+00087         }
+00088 
+00090 
+00092         _IRR_DEPRECATED_ const io::path& getMeshFilename(u32 index) const
+00093         {
+00094             return getMeshName(index).getInternalName();
+00095         }
+00096 
+00098 
+00100         _IRR_DEPRECATED_ const io::path& getMeshFilename(const IMesh* const mesh) const
+00101         {
+00102             return getMeshName(mesh).getInternalName();
+00103         }
+00104 
+00106 
+00108         _IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename)
+00109         {
+00110             return renameMesh(index, filename);
+00111         }
+00112 
+00114 
+00116         _IRR_DEPRECATED_ bool setMeshFilename(const IMesh* const mesh, const io::path& filename)
+00117         {
+00118             return renameMesh(mesh, filename);
+00119         }
+00120 
+00122 
+00124         virtual IAnimatedMesh* getMeshByName(const io::path& name) = 0;
+00125 
+00127 
+00129         virtual const io::SNamedPath& getMeshName(u32 index) const = 0;
+00130 
+00132 
+00134         virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0;
+00135 
+00137 
+00143         virtual bool renameMesh(u32 index, const io::path& name) = 0;
+00144 
+00146 
+00152         virtual bool renameMesh(const IMesh* const mesh, const io::path& name) = 0;
+00153 
+00155 
+00157         virtual bool isMeshLoaded(const io::path& name) = 0;
+00158 
+00160 
+00164         virtual void clear() = 0;
+00165 
+00167 
+00169         virtual void clearUnusedMeshes() = 0;
+00170     };
+00171 
+00172 
+00173 } // end namespace scene
+00174 } // end namespace irr
+00175 
+00176 #endif
+00177 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h.html new file mode 100644 index 0000000..72472b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: IMeshLoader.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMeshLoader.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h_source.html new file mode 100644 index 0000000..bb61506 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_loader_8h_source.html @@ -0,0 +1,160 @@ + + + + +Irrlicht 3D Engine: IMeshLoader.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMeshLoader.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MESH_LOADER_H_INCLUDED__
+00006 #define __I_MESH_LOADER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00015     class IReadFile;
+00016 } // end namespace io
+00017 namespace scene
+00018 {
+00019     class IAnimatedMesh;
+00020 
+00022 
+00026 class IMeshLoader : public virtual IReferenceCounted
+00027 {
+00028 public:
+00029 
+00031     virtual ~IMeshLoader() {}
+00032 
+00034 
+00038     virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
+00039 
+00041 
+00045     virtual IAnimatedMesh* createMesh(io::IReadFile* file) = 0;
+00046 };
+00047 
+00048 
+00049 } // end namespace scene
+00050 } // end namespace irr
+00051 
+00052 #endif
+00053 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h.html new file mode 100644 index 0000000..fd02ee2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: IMeshManipulator.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMeshManipulator.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "vector3d.h"
+#include "aabbox3d.h"
+#include "matrix4.h"
+#include "IAnimatedMesh.h"
+#include "IMeshBuffer.h"
+#include "SVertexManipulator.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h_source.html new file mode 100644 index 0000000..45996cf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_manipulator_8h_source.html @@ -0,0 +1,366 @@ + + + + +Irrlicht 3D Engine: IMeshManipulator.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMeshManipulator.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MESH_MANIPULATOR_H_INCLUDED__
+00006 #define __I_MESH_MANIPULATOR_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "vector3d.h"
+00010 #include "aabbox3d.h"
+00011 #include "matrix4.h"
+00012 #include "IAnimatedMesh.h"
+00013 #include "IMeshBuffer.h"
+00014 #include "SVertexManipulator.h"
+00015 
+00016 namespace irr
+00017 {
+00018 namespace scene
+00019 {
+00020 
+00021     struct SMesh;
+00022 
+00024 
+00029     class IMeshManipulator : public virtual IReferenceCounted
+00030     {
+00031     public:
+00032 
+00034 
+00037         virtual void flipSurfaces(IMesh* mesh) const = 0;
+00038 
+00040 
+00042         void setVertexColorAlpha(IMesh* mesh, s32 alpha) const
+00043         {
+00044             apply(scene::SVertexColorSetAlphaManipulator(alpha), mesh);
+00045         }
+00046 
+00048 
+00050         void setVertexColorAlpha(IMeshBuffer* buffer, s32 alpha) const
+00051         {
+00052             apply(scene::SVertexColorSetAlphaManipulator(alpha), buffer);
+00053         }
+00054 
+00056 
+00058         void setVertexColors(IMesh* mesh, video::SColor color) const
+00059         {
+00060             apply(scene::SVertexColorSetManipulator(color), mesh);
+00061         }
+00062 
+00064 
+00066         void setVertexColors(IMeshBuffer* buffer, video::SColor color) const
+00067         {
+00068             apply(scene::SVertexColorSetManipulator(color), buffer);
+00069         }
+00070 
+00072 
+00075         virtual void recalculateNormals(IMesh* mesh, bool smooth = false,
+00076                 bool angleWeighted = false) const=0;
+00077 
+00079 
+00082         virtual void recalculateNormals(IMeshBuffer* buffer,
+00083                 bool smooth = false, bool angleWeighted = false) const=0;
+00084 
+00086 
+00091         virtual void recalculateTangents(IMesh* mesh,
+00092                 bool recalculateNormals=false, bool smooth=false,
+00093                 bool angleWeighted=false) const=0;
+00094 
+00096 
+00101         virtual void recalculateTangents(IMeshBuffer* buffer,
+00102                 bool recalculateNormals=false, bool smooth=false,
+00103                 bool angleWeighted=false) const=0;
+00104 
+00106 
+00108         void scale(IMesh* mesh, const core::vector3df& factor) const
+00109         {
+00110             apply(SVertexPositionScaleManipulator(factor), mesh, true);
+00111         }
+00112 
+00114 
+00116         void scale(IMeshBuffer* buffer, const core::vector3df& factor) const
+00117         {
+00118             apply(SVertexPositionScaleManipulator(factor), buffer, true);
+00119         }
+00120 
+00122 
+00125         _IRR_DEPRECATED_ void scaleMesh(IMesh* mesh, const core::vector3df& factor) const {return scale(mesh,factor);}
+00126 
+00128 
+00131         void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const
+00132         {
+00133             apply(SVertexTCoordsScaleManipulator(factor, level), mesh);
+00134         }
+00135 
+00137 
+00140         void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const
+00141         {
+00142             apply(SVertexTCoordsScaleManipulator(factor, level), buffer);
+00143         }
+00144 
+00146 
+00148         void transform(IMesh* mesh, const core::matrix4& m) const
+00149         {
+00150             apply(SVertexPositionTransformManipulator(m), mesh, true);
+00151         }
+00152 
+00154 
+00156         void transform(IMeshBuffer* buffer, const core::matrix4& m) const
+00157         {
+00158             apply(SVertexPositionTransformManipulator(m), buffer, true);
+00159         }
+00160 
+00162 
+00165         _IRR_DEPRECATED_ virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const {return transform(mesh,m);}
+00166 
+00168 
+00172         virtual void makePlanarTextureMapping(IMesh* mesh, f32 resolution=0.001f) const=0;
+00173 
+00175 
+00179         virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const=0;
+00180 
+00182 
+00189         virtual void makePlanarTextureMapping(scene::IMesh* mesh,
+00190                 f32 resolutionS, f32 resolutionT,
+00191                 u8 axis, const core::vector3df& offset) const=0;
+00192 
+00194 
+00201         virtual void makePlanarTextureMapping(scene::IMeshBuffer* buffer,
+00202                 f32 resolutionS, f32 resolutionT,
+00203                 u8 axis, const core::vector3df& offset) const=0;
+00204 
+00206 
+00212         virtual SMesh* createMeshCopy(IMesh* mesh) const = 0;
+00213 
+00215 
+00231         virtual IMesh* createMeshWithTangents(IMesh* mesh,
+00232                 bool recalculateNormals=false, bool smooth=false,
+00233                 bool angleWeighted=false, bool recalculateTangents=true) const=0;
+00234 
+00236 
+00241         virtual IMesh* createMeshWith2TCoords(IMesh* mesh) const = 0;
+00242 
+00244 
+00249         virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const = 0;
+00250 
+00252 
+00257         virtual IMesh* createMeshUniquePrimitives(IMesh* mesh) const = 0;
+00258 
+00260 
+00265         virtual IMesh* createMeshWelded(IMesh* mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const = 0;
+00266 
+00268 
+00270         virtual s32 getPolyCount(IMesh* mesh) const = 0;
+00271 
+00273 
+00275         virtual s32 getPolyCount(IAnimatedMesh* mesh) const = 0;
+00276 
+00278 
+00284         virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh,
+00285             scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0;
+00286 
+00288 
+00296         virtual IMesh* createForsythOptimizedMesh(const IMesh *mesh) const = 0;
+00297 
+00299 
+00303         template <typename Functor>
+00304         bool apply(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate=false) const
+00305         {
+00306             return apply_(func, buffer, boundingBoxUpdate, func);
+00307         }
+00308 
+00309 
+00311 
+00315         template <typename Functor>
+00316         bool apply(const Functor& func, IMesh* mesh, bool boundingBoxUpdate=false) const
+00317         {
+00318             if (!mesh)
+00319                 return true;
+00320             bool result = true;
+00321             core::aabbox3df bufferbox;
+00322             for (u32 i=0; i<mesh->getMeshBufferCount(); ++i)
+00323             {
+00324                 result &= apply(func, mesh->getMeshBuffer(i), boundingBoxUpdate);
+00325                 if (boundingBoxUpdate)
+00326                 {
+00327                     if (0==i)
+00328                         bufferbox.reset(mesh->getMeshBuffer(i)->getBoundingBox());
+00329                     else
+00330                         bufferbox.addInternalBox(mesh->getMeshBuffer(i)->getBoundingBox());
+00331                 }
+00332             }
+00333             if (boundingBoxUpdate)
+00334                 mesh->setBoundingBox(bufferbox);
+00335             return result;
+00336         }
+00337 
+00338 protected:
+00340 
+00345         template <typename Functor>
+00346         bool apply_(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate, const IVertexManipulator& typeTest) const
+00347         {
+00348             if (!buffer)
+00349                 return true;
+00350 
+00351             core::aabbox3df bufferbox;
+00352             for (u32 i=0; i<buffer->getVertexCount(); ++i)
+00353             {
+00354                 switch (buffer->getVertexType())
+00355                 {
+00356                 case video::EVT_STANDARD:
+00357                     {
+00358                         video::S3DVertex* verts = (video::S3DVertex*)buffer->getVertices();
+00359                         func(verts[i]);
+00360                     }
+00361                     break;
+00362                 case video::EVT_2TCOORDS:
+00363                     {
+00364                         video::S3DVertex2TCoords* verts = (video::S3DVertex2TCoords*)buffer->getVertices();
+00365                         func(verts[i]);
+00366                     }
+00367                     break;
+00368                 case video::EVT_TANGENTS:
+00369                     {
+00370                         video::S3DVertexTangents* verts = (video::S3DVertexTangents*)buffer->getVertices();
+00371                         func(verts[i]);
+00372                     }
+00373                     break;
+00374                 }
+00375                 if (boundingBoxUpdate)
+00376                 {
+00377                     if (0==i)
+00378                         bufferbox.reset(buffer->getPosition(0));
+00379                     else
+00380                         bufferbox.addInternalPoint(buffer->getPosition(i));
+00381                 }
+00382             }
+00383             if (boundingBoxUpdate)
+00384                 buffer->setBoundingBox(bufferbox);
+00385             return true;
+00386         }
+00387 };
+00388 
+00389 } // end namespace scene
+00390 } // end namespace irr
+00391 
+00392 
+00393 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h.html new file mode 100644 index 0000000..5514bc7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IMeshSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMeshSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h_source.html new file mode 100644 index 0000000..de7687c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_scene_node_8h_source.html @@ -0,0 +1,172 @@ + + + + +Irrlicht 3D Engine: IMeshSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMeshSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_MESH_SCENE_NODE_H_INCLUDED__
+00006 #define __I_MESH_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00015 class IShadowVolumeSceneNode;
+00016 class IMesh;
+00017 
+00018 
+00020 class IMeshSceneNode : public ISceneNode
+00021 {
+00022 public:
+00023 
+00025 
+00027     IMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00028             const core::vector3df& position = core::vector3df(0,0,0),
+00029             const core::vector3df& rotation = core::vector3df(0,0,0),
+00030             const core::vector3df& scale = core::vector3df(1,1,1))
+00031         : ISceneNode(parent, mgr, id, position, rotation, scale) {}
+00032 
+00034 
+00035     virtual void setMesh(IMesh* mesh) = 0;
+00036 
+00038 
+00039     virtual IMesh* getMesh(void) = 0;
+00040 
+00042 
+00059     virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0,
+00060         s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0;
+00061 
+00063 
+00066     virtual void setReadOnlyMaterials(bool readonly) = 0;
+00067 
+00069 
+00071     virtual bool isReadOnlyMaterials() const = 0;
+00072 };
+00073 
+00074 } // end namespace scene
+00075 } // end namespace irr
+00076 
+00077 
+00078 #endif
+00079 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h.html new file mode 100644 index 0000000..fb84280 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: IMeshWriter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMeshWriter.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "EMeshWriterEnums.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h_source.html new file mode 100644 index 0000000..1880a3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_mesh_writer_8h_source.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: IMeshWriter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMeshWriter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_I_MESH_WRITER_H_INCLUDED__
+00006 #define __IRR_I_MESH_WRITER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "EMeshWriterEnums.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00015     class IWriteFile;
+00016 } // end namespace io
+00017 
+00018 namespace scene
+00019 {
+00020     class IMesh;
+00021 
+00023     class IMeshWriter : public virtual IReferenceCounted
+00024     {
+00025     public:
+00026 
+00028         virtual ~IMeshWriter() {}
+00029 
+00031 
+00035         virtual EMESH_WRITER_TYPE getType() const = 0;
+00036 
+00038 
+00042         virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh,
+00043                             s32 flags=EMWF_NONE) = 0;
+00044 
+00045         // Writes an animated mesh
+00046         // for future use, no writer is able to write animated meshes currently
+00047         /* \return Returns true if sucessful */
+00048         //virtual bool writeAnimatedMesh(io::IWriteFile* file,
+00049         // scene::IAnimatedMesh* mesh,
+00050         // s32 flags=EMWF_NONE) = 0;
+00051     };
+00052 
+00053 
+00054 } // end namespace
+00055 } // end namespace
+00056 
+00057 #endif
+00058 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h.html new file mode 100644 index 0000000..7a89c83 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IMetaTriangleSelector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IMetaTriangleSelector.h File Reference
+
+
+
#include "ITriangleSelector.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h_source.html new file mode 100644 index 0000000..635d1c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_meta_triangle_selector_8h_source.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: IMetaTriangleSelector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IMetaTriangleSelector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_META_TRIANGLE_SELECTOR_H_INCLUDED__
+00006 #define __I_META_TRIANGLE_SELECTOR_H_INCLUDED__
+00007 
+00008 #include "ITriangleSelector.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 
+00020 class IMetaTriangleSelector : public ITriangleSelector
+00021 {
+00022 public:
+00023 
+00025 
+00026     virtual void addTriangleSelector(ITriangleSelector* toAdd) = 0;
+00027 
+00029 
+00032     virtual bool removeTriangleSelector(ITriangleSelector* toRemove) = 0;
+00033 
+00035     virtual void removeAllTriangleSelectors() = 0;
+00036 };
+00037 
+00038 } // end namespace scene
+00039 } // end namespace irr
+00040 
+00041 
+00042 #endif
+00043 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h.html new file mode 100644 index 0000000..c56188d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h.html @@ -0,0 +1,138 @@ + + + + +Irrlicht 3D Engine: IOSOperator.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IOSOperator.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrString.h"
+
+

Go to the source code of this file.

+

+Classes

+
    +
  • class irr::IOSOperator +
    The Operating system operator provides operation system specific methods and informations. More...
+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h_source.html new file mode 100644 index 0000000..82700b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_o_s_operator_8h_source.html @@ -0,0 +1,160 @@ + + + + +Irrlicht 3D Engine: IOSOperator.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IOSOperator.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_OS_OPERATOR_H_INCLUDED__
+00006 #define __I_OS_OPERATOR_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrString.h"
+00010 
+00011 namespace irr
+00012 {
+00013 
+00015 class IOSOperator : public virtual IReferenceCounted
+00016 {
+00017 public:
+00019     virtual const core::stringc& getOperatingSystemVersion() const = 0;
+00020 
+00022 
+00023     _IRR_DEPRECATED_ const wchar_t* getOperationSystemVersion() const
+00024     {
+00025         return core::stringw(getOperatingSystemVersion()).c_str();
+00026     }
+00027 
+00029     virtual void copyToClipboard(const c8* text) const = 0;
+00030 
+00032 
+00033     virtual const c8* getTextFromClipboard() const = 0;
+00034 
+00036 
+00038     virtual bool getProcessorSpeedMHz(u32* MHz) const = 0;
+00039 
+00041 
+00044     virtual bool getSystemMemory(u32* Total, u32* Avail) const = 0;
+00045 
+00046 };
+00047 
+00048 } // end namespace
+00049 
+00050 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h.html new file mode 100644 index 0000000..5607977 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: IParticleAffector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleAffector.h File Reference
+
+
+
#include "IAttributeExchangingObject.h"
+#include "SParticle.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h_source.html new file mode 100644 index 0000000..6651db7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_affector_8h_source.html @@ -0,0 +1,182 @@ + + + + +Irrlicht 3D Engine: IParticleAffector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleAffector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_AFFECTOR_H_INCLUDED__
+00006 #define __I_PARTICLE_AFFECTOR_H_INCLUDED__
+00007 
+00008 #include "IAttributeExchangingObject.h"
+00009 #include "SParticle.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00017 enum E_PARTICLE_AFFECTOR_TYPE
+00018 {
+00019     EPAT_NONE = 0,
+00020     EPAT_ATTRACT,
+00021     EPAT_FADE_OUT,
+00022     EPAT_GRAVITY,
+00023     EPAT_ROTATE,
+00024     EPAT_SCALE,
+00025     EPAT_COUNT
+00026 };
+00027 
+00029 const c8* const ParticleAffectorTypeNames[] =
+00030 {
+00031     "None",
+00032     "Attract",
+00033     "FadeOut",
+00034     "Gravity",
+00035     "Rotate",
+00036     "Scale",
+00037     0
+00038 };
+00039 
+00041 class IParticleAffector : public virtual io::IAttributeExchangingObject
+00042 {
+00043 public:
+00044 
+00046     IParticleAffector() : Enabled(true) {}
+00047 
+00049 
+00052     virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0;
+00053 
+00055     virtual void setEnabled(bool enabled) { Enabled = enabled; }
+00056 
+00058     virtual bool getEnabled() const { return Enabled; }
+00059 
+00061     virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0;
+00062 
+00063 protected:
+00064     bool Enabled;
+00065 };
+00066 
+00067 } // end namespace scene
+00068 } // end namespace irr
+00069 
+00070 
+00071 #endif
+00072 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h.html new file mode 100644 index 0000000..8e4c8ae --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IParticleAnimatedMeshSceneNodeEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleAnimatedMeshSceneNodeEmitter.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h_source.html new file mode 100644 index 0000000..aec83bb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_animated_mesh_scene_node_emitter_8h_source.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: IParticleAnimatedMeshSceneNodeEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleAnimatedMeshSceneNodeEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IParticleEmitter.h"
+00009 #include "IAnimatedMeshSceneNode.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00017 class IParticleAnimatedMeshSceneNodeEmitter : public IParticleEmitter
+00018 {
+00019 public:
+00020 
+00022     virtual void setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ) = 0;
+00023 
+00025     virtual void setUseNormalDirection( bool useNormalDirection = true ) = 0;
+00026 
+00028     virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) = 0;
+00029 
+00031     virtual void setEveryMeshVertex( bool everyMeshVertex = true ) = 0;
+00032 
+00034     virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const = 0;
+00035 
+00037     virtual bool isUsingNormalDirection() const = 0;
+00038 
+00040     virtual f32 getNormalDirectionModifier() const = 0;
+00041 
+00043     virtual bool getEveryMeshVertex() const = 0;
+00044 
+00046     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_ANIMATED_MESH; }
+00047 };
+00048 
+00049 } // end namespace scene
+00050 } // end namespace irr
+00051 
+00052 
+00053 #endif // __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__
+00054 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h.html new file mode 100644 index 0000000..bc92437 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleAttractionAffector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleAttractionAffector.h File Reference
+
+
+
#include "IParticleAffector.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h_source.html new file mode 100644 index 0000000..95e9435 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_attraction_affector_8h_source.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: IParticleAttractionAffector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleAttractionAffector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
+00006 #define __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
+00007 
+00008 #include "IParticleAffector.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleAttractionAffector : public IParticleAffector
+00017 {
+00018 public:
+00019 
+00021     virtual void setPoint( const core::vector3df& point ) = 0;
+00022 
+00024     virtual void setAttract( bool attract ) = 0;
+00025 
+00027     virtual void setAffectX( bool affect ) = 0;
+00028 
+00030     virtual void setAffectY( bool affect ) = 0;
+00031 
+00033     virtual void setAffectZ( bool affect ) = 0;
+00034 
+00036     virtual const core::vector3df& getPoint() const = 0;
+00037 
+00039     virtual bool getAttract() const = 0;
+00040 
+00042     virtual bool getAffectX() const = 0;
+00043 
+00045     virtual bool getAffectY() const = 0;
+00046 
+00048     virtual bool getAffectZ() const = 0;
+00049 
+00051     virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ATTRACT; }
+00052 };
+00053 
+00054 } // end namespace scene
+00055 } // end namespace irr
+00056 
+00057 
+00058 #endif // __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
+00059 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h.html new file mode 100644 index 0000000..1e47051 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IParticleBoxEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleBoxEmitter.h File Reference
+
+
+
#include "IParticleEmitter.h"
+#include "aabbox3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h_source.html new file mode 100644 index 0000000..d67c40f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_box_emitter_8h_source.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IParticleBoxEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleBoxEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_BOX_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_BOX_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IParticleEmitter.h"
+00009 #include "aabbox3d.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00017 class IParticleBoxEmitter : public IParticleEmitter
+00018 {
+00019 public:
+00020 
+00022     virtual void setBox( const core::aabbox3df& box ) = 0;
+00023 
+00025     virtual const core::aabbox3df& getBox() const = 0;
+00026 
+00028     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_BOX; }
+00029 };
+00030 
+00031 } // end namespace scene
+00032 } // end namespace irr
+00033 
+00034 
+00035 #endif
+00036 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h.html new file mode 100644 index 0000000..95f9320 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleCylinderEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleCylinderEmitter.h File Reference
+
+
+
#include "IParticleEmitter.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h_source.html new file mode 100644 index 0000000..36dd981 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_cylinder_emitter_8h_source.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: IParticleCylinderEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleCylinderEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IParticleEmitter.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleCylinderEmitter : public IParticleEmitter
+00017 {
+00018 public:
+00019 
+00021     virtual void setCenter( const core::vector3df& center ) = 0;
+00022 
+00024     virtual void setNormal( const core::vector3df& normal ) = 0;
+00025 
+00027     virtual void setRadius( f32 radius ) = 0;
+00028 
+00030     virtual void setLength( f32 length ) = 0;
+00031 
+00033     virtual void setOutlineOnly( bool outlineOnly = true ) = 0;
+00034 
+00036     virtual const core::vector3df& getCenter() const = 0;
+00037 
+00039     virtual const core::vector3df& getNormal() const = 0;
+00040 
+00042     virtual f32 getRadius() const = 0;
+00043 
+00045     virtual f32 getLength() const = 0;
+00046 
+00048     virtual bool getOutlineOnly() const = 0;
+00049 
+00051     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_CYLINDER; }
+00052 };
+00053 
+00054 } // end namespace scene
+00055 } // end namespace irr
+00056 
+00057 
+00058 #endif
+00059 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h.html new file mode 100644 index 0000000..9d559b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h.html @@ -0,0 +1,169 @@ + + + + +Irrlicht 3D Engine: IParticleEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleEmitter.h File Reference
+
+
+
#include "IAttributeExchangingObject.h"
+#include "SParticle.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Typedefs

+ +

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h_source.html new file mode 100644 index 0000000..f8acfdf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_emitter_8h_source.html @@ -0,0 +1,219 @@ + + + + +Irrlicht 3D Engine: IParticleEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IAttributeExchangingObject.h"
+00009 #include "SParticle.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00017 enum E_PARTICLE_EMITTER_TYPE
+00018 {
+00019     EPET_POINT = 0,
+00020     EPET_ANIMATED_MESH,
+00021     EPET_BOX,
+00022     EPET_CYLINDER,
+00023     EPET_MESH,
+00024     EPET_RING,
+00025     EPET_SPHERE,
+00026     EPET_COUNT
+00027 };
+00028 
+00030 const c8* const ParticleEmitterTypeNames[] =
+00031 {
+00032     "Point",
+00033     "AnimatedMesh",
+00034     "Box",
+00035     "Cylinder",
+00036     "Mesh",
+00037     "Ring",
+00038     "Sphere",
+00039     0
+00040 };
+00041 
+00043 
+00045 class IParticleEmitter : public virtual io::IAttributeExchangingObject
+00046 {
+00047 public:
+00048 
+00050 
+00055     virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0;
+00056 
+00058     virtual void setDirection( const core::vector3df& newDirection ) = 0;
+00059 
+00061     virtual void setMinParticlesPerSecond( u32 minPPS ) = 0;
+00062 
+00064     virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0;
+00065 
+00067     virtual void setMinStartColor( const video::SColor& color ) = 0;
+00068 
+00070     virtual void setMaxStartColor( const video::SColor& color ) = 0;
+00071 
+00073     virtual void setMaxStartSize( const core::dimension2df& size ) = 0;
+00074 
+00076     virtual void setMinStartSize( const core::dimension2df& size ) = 0;
+00077 
+00079     virtual void setMinLifeTime( u32 lifeTimeMin ) = 0;
+00080 
+00082     virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
+00083 
+00085     virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
+00086 
+00088     virtual const core::vector3df& getDirection() const = 0;
+00089 
+00091     virtual u32 getMinParticlesPerSecond() const = 0;
+00092 
+00094     virtual u32 getMaxParticlesPerSecond() const = 0;
+00095 
+00097     virtual const video::SColor& getMinStartColor() const = 0;
+00098 
+00100     virtual const video::SColor& getMaxStartColor() const = 0;
+00101 
+00103     virtual const core::dimension2df& getMaxStartSize() const = 0;
+00104 
+00106     virtual const core::dimension2df& getMinStartSize() const = 0;
+00107 
+00109     virtual u32 getMinLifeTime() const = 0;
+00110 
+00112     virtual u32 getMaxLifeTime() const = 0;
+00113 
+00115     virtual s32 getMaxAngleDegrees() const = 0;
+00116 
+00117 
+00119     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
+00120 };
+00121 
+00122 typedef IParticleEmitter IParticlePointEmitter;
+00123 
+00124 } // end namespace scene
+00125 } // end namespace irr
+00126 
+00127 
+00128 #endif
+00129 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h.html new file mode 100644 index 0000000..a0221bb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleFadeOutAffector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleFadeOutAffector.h File Reference
+
+
+
#include "IParticleAffector.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h_source.html new file mode 100644 index 0000000..040ad01 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_fade_out_affector_8h_source.html @@ -0,0 +1,155 @@ + + + + +Irrlicht 3D Engine: IParticleFadeOutAffector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleFadeOutAffector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__
+00006 #define __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__
+00007 
+00008 #include "IParticleAffector.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleFadeOutAffector : public IParticleAffector
+00017 {
+00018 public:
+00019 
+00021     virtual void setTargetColor( const video::SColor& targetColor ) = 0;
+00022 
+00024     virtual void setFadeOutTime( u32 fadeOutTime ) = 0;
+00025 
+00027     virtual const video::SColor& getTargetColor() const = 0;
+00028 
+00030     virtual u32 getFadeOutTime() const = 0;
+00031 
+00033     virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_FADE_OUT; }
+00034 };
+00035 
+00036 } // end namespace scene
+00037 } // end namespace irr
+00038 
+00039 
+00040 #endif // __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__
+00041 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h.html new file mode 100644 index 0000000..b79d7c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleGravityAffector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleGravityAffector.h File Reference
+
+
+
#include "IParticleAffector.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h_source.html new file mode 100644 index 0000000..b2c7027 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_gravity_affector_8h_source.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: IParticleGravityAffector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleGravityAffector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
+00006 #define __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
+00007 
+00008 #include "IParticleAffector.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleGravityAffector : public IParticleAffector
+00017 {
+00018 public:
+00019 
+00021 
+00022     virtual void setTimeForceLost( f32 timeForceLost ) = 0;
+00023 
+00025     virtual void setGravity( const core::vector3df& gravity ) = 0;
+00026 
+00028     virtual f32 getTimeForceLost() const = 0;
+00029 
+00031     virtual const core::vector3df& getGravity() const = 0;
+00032 
+00034     virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_GRAVITY; }
+00035 };
+00036 
+00037 } // end namespace scene
+00038 } // end namespace irr
+00039 
+00040 
+00041 #endif // __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
+00042 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h.html new file mode 100644 index 0000000..b710610 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IParticleMeshEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleMeshEmitter.h File Reference
+
+
+
#include "IParticleEmitter.h"
+#include "IMesh.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h_source.html new file mode 100644 index 0000000..f96294f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_mesh_emitter_8h_source.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: IParticleMeshEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleMeshEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_MESH_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_MESH_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IParticleEmitter.h"
+00009 #include "IMesh.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00017 class IParticleMeshEmitter : public IParticleEmitter
+00018 {
+00019 public:
+00020 
+00022     virtual void setMesh( IMesh* mesh ) = 0;
+00023 
+00025     virtual void setUseNormalDirection( bool useNormalDirection = true ) = 0;
+00026 
+00028     virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) = 0;
+00029 
+00031     virtual void setEveryMeshVertex( bool everyMeshVertex = true ) = 0;
+00032 
+00034     virtual const IMesh* getMesh() const = 0;
+00035 
+00037     virtual bool isUsingNormalDirection() const = 0;
+00038 
+00040     virtual f32 getNormalDirectionModifier() const = 0;
+00041 
+00043     virtual bool getEveryMeshVertex() const = 0;
+00044 
+00046     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_MESH; }
+00047 };
+00048 
+00049 } // end namespace scene
+00050 } // end namespace irr
+00051 
+00052 
+00053 #endif
+00054 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h.html new file mode 100644 index 0000000..4e9f3f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleRingEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleRingEmitter.h File Reference
+
+
+
#include "IParticleEmitter.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h_source.html new file mode 100644 index 0000000..5b32aa1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_ring_emitter_8h_source.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: IParticleRingEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleRingEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_RING_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_RING_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IParticleEmitter.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleRingEmitter : public IParticleEmitter
+00017 {
+00018 public:
+00019 
+00021     virtual void setCenter( const core::vector3df& center ) = 0;
+00022 
+00024     virtual void setRadius( f32 radius ) = 0;
+00025 
+00027     virtual void setRingThickness( f32 ringThickness ) = 0;
+00028 
+00030     virtual const core::vector3df& getCenter() const = 0;
+00031 
+00033     virtual f32 getRadius() const = 0;
+00034 
+00036     virtual f32 getRingThickness() const = 0;
+00037 
+00039     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_RING; }
+00040 };
+00041 
+00042 } // end namespace scene
+00043 } // end namespace irr
+00044 
+00045 
+00046 #endif
+00047 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h.html new file mode 100644 index 0000000..1e3206e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleRotationAffector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleRotationAffector.h File Reference
+
+
+
#include "IParticleAffector.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h_source.html new file mode 100644 index 0000000..c623dc5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_rotation_affector_8h_source.html @@ -0,0 +1,155 @@ + + + + +Irrlicht 3D Engine: IParticleRotationAffector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleRotationAffector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
+00006 #define __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
+00007 
+00008 #include "IParticleAffector.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleRotationAffector : public IParticleAffector
+00017 {
+00018 public:
+00019 
+00021     virtual void setPivotPoint( const core::vector3df& point ) = 0;
+00022 
+00024     virtual void setSpeed( const core::vector3df& speed ) = 0;
+00025 
+00027     virtual const core::vector3df& getPivotPoint() const = 0;
+00028 
+00030     virtual const core::vector3df& getSpeed() const = 0;
+00031 
+00033     virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ROTATE; }
+00034 };
+00035 
+00036 } // end namespace scene
+00037 } // end namespace irr
+00038 
+00039 
+00040 #endif // __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
+00041 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h.html new file mode 100644 index 0000000..244a69d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IParticleSphereEmitter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleSphereEmitter.h File Reference
+
+
+
#include "IParticleEmitter.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h_source.html new file mode 100644 index 0000000..14dd97d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_sphere_emitter_8h_source.html @@ -0,0 +1,155 @@ + + + + +Irrlicht 3D Engine: IParticleSphereEmitter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleSphereEmitter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_SPHERE_EMITTER_H_INCLUDED__
+00006 #define __I_PARTICLE_SPHERE_EMITTER_H_INCLUDED__
+00007 
+00008 #include "IParticleEmitter.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class IParticleSphereEmitter : public IParticleEmitter
+00017 {
+00018 public:
+00019 
+00021     virtual void setCenter( const core::vector3df& center ) = 0;
+00022 
+00024     virtual void setRadius( f32 radius ) = 0;
+00025 
+00027     virtual const core::vector3df& getCenter() const = 0;
+00028 
+00030     virtual f32 getRadius() const = 0;
+00031 
+00033     virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_SPHERE; }
+00034 };
+00035 
+00036 } // end namespace scene
+00037 } // end namespace irr
+00038 
+00039 
+00040 #endif
+00041 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h.html new file mode 100644 index 0000000..c1f4a4a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h.html @@ -0,0 +1,150 @@ + + + + +Irrlicht 3D Engine: IParticleSystemSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IParticleSystemSceneNode.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h_source.html new file mode 100644 index 0000000..f8b36fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_particle_system_scene_node_8h_source.html @@ -0,0 +1,303 @@ + + + + +Irrlicht 3D Engine: IParticleSystemSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IParticleSystemSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__
+00006 #define __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 #include "IParticleAnimatedMeshSceneNodeEmitter.h"
+00010 #include "IParticleBoxEmitter.h"
+00011 #include "IParticleCylinderEmitter.h"
+00012 #include "IParticleMeshEmitter.h"
+00013 #include "IParticleRingEmitter.h"
+00014 #include "IParticleSphereEmitter.h"
+00015 #include "IParticleAttractionAffector.h"
+00016 #include "IParticleFadeOutAffector.h"
+00017 #include "IParticleGravityAffector.h"
+00018 #include "IParticleRotationAffector.h"
+00019 #include "dimension2d.h"
+00020 
+00021 namespace irr
+00022 {
+00023 namespace scene
+00024 {
+00025 
+00027 
+00046 class IParticleSystemSceneNode : public ISceneNode
+00047 {
+00048 public:
+00049 
+00051     IParticleSystemSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00052         const core::vector3df& position = core::vector3df(0,0,0),
+00053         const core::vector3df& rotation = core::vector3df(0,0,0),
+00054         const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
+00055             : ISceneNode(parent, mgr, id, position, rotation, scale) {}
+00056 
+00058     virtual void setParticleSize(
+00059         const core::dimension2d<f32> &size = core::dimension2d<f32>(5.0f, 5.0f)) = 0;
+00060 
+00062 
+00065     virtual void setParticlesAreGlobal(bool global=true) = 0;
+00066 
+00068     virtual void clearParticles() = 0;
+00069 
+00073     virtual void doParticleSystem(u32 time) = 0;
+00074 
+00076 
+00077     virtual IParticleEmitter* getEmitter() =0;
+00078 
+00080 
+00086     virtual void setEmitter(IParticleEmitter* emitter) = 0;
+00087 
+00089 
+00100     virtual void addAffector(IParticleAffector* affector) = 0;
+00101 
+00103 
+00104     virtual const core::list<IParticleAffector*>& getAffectors() const = 0;
+00105 
+00107     virtual void removeAllAffectors() = 0;
+00108 
+00110 
+00153     virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter(
+00154         scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true,
+00155         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00156         f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
+00157         bool everyMeshVertex = false,
+00158         u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
+00159         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00160         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00161         u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000,
+00162         s32 maxAngleDegrees = 0,
+00163         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00164         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00165 
+00167 
+00193     virtual IParticleBoxEmitter* createBoxEmitter(
+00194         const core::aabbox3df& box = core::aabbox3df(-10,28,-10,10,30,10),
+00195         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00196         u32 minParticlesPerSecond = 5,
+00197         u32 maxParticlesPerSecond = 10,
+00198         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00199         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00200         u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
+00201         s32 maxAngleDegrees=0,
+00202         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00203         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00204 
+00206 
+00237     virtual IParticleCylinderEmitter* createCylinderEmitter(
+00238         const core::vector3df& center, f32 radius,
+00239         const core::vector3df& normal, f32 length,
+00240         bool outlineOnly = false,
+00241         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00242         u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
+00243         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00244         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00245         u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000,
+00246         s32 maxAngleDegrees = 0,
+00247         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00248         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00249 
+00251 
+00293     virtual IParticleMeshEmitter* createMeshEmitter(
+00294         scene::IMesh* mesh, bool useNormalDirection = true,
+00295         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00296         f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
+00297         bool everyMeshVertex = false,
+00298         u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
+00299         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00300         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00301         u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000,
+00302         s32 maxAngleDegrees = 0,
+00303         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00304         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00305 
+00307 
+00332     virtual IParticlePointEmitter* createPointEmitter(
+00333         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00334         u32 minParticlesPerSecond = 5,
+00335         u32 maxParticlesPerSecond = 10,
+00336         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00337         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00338         u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
+00339         s32 maxAngleDegrees=0,
+00340         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00341         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00342 
+00344 
+00374     virtual IParticleRingEmitter* createRingEmitter(
+00375         const core::vector3df& center, f32 radius, f32 ringThickness,
+00376         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00377         u32 minParticlesPerSecond = 5,
+00378         u32 maxParticlesPerSecond = 10,
+00379         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00380         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00381         u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
+00382         s32 maxAngleDegrees=0,
+00383         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00384         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00385 
+00387 
+00414     virtual IParticleSphereEmitter* createSphereEmitter(
+00415         const core::vector3df& center, f32 radius,
+00416         const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
+00417         u32 minParticlesPerSecond = 5,
+00418         u32 maxParticlesPerSecond = 10,
+00419         const video::SColor& minStartColor = video::SColor(255,0,0,0),
+00420         const video::SColor& maxStartColor = video::SColor(255,255,255,255),
+00421         u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
+00422         s32 maxAngleDegrees=0,
+00423         const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f),
+00424         const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0;
+00425 
+00427 
+00444     virtual IParticleAttractionAffector* createAttractionAffector(
+00445         const core::vector3df& point, f32 speed = 1.0f, bool attract = true,
+00446         bool affectX = true, bool affectY = true, bool affectZ = true) = 0;
+00447 
+00449 
+00457     virtual IParticleAffector* createScaleParticleAffector(const core::dimension2df& scaleTo = core::dimension2df(1.0f, 1.0f)) = 0;
+00458 
+00460 
+00472     virtual IParticleFadeOutAffector* createFadeOutParticleAffector(
+00473         const video::SColor& targetColor = video::SColor(0,0,0,0),
+00474         u32 timeNeededToFadeOut = 1000) = 0;
+00475 
+00477 
+00489     virtual IParticleGravityAffector* createGravityAffector(
+00490         const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f),
+00491         u32 timeForceLost = 1000) = 0;
+00492 
+00494 
+00502     virtual IParticleRotationAffector* createRotationAffector(
+00503         const core::vector3df& speed = core::vector3df(5.0f,5.0f,5.0f),
+00504         const core::vector3df& pivotPoint = core::vector3df(0.0f,0.0f,0.0f) ) = 0;
+00505 };
+00506 
+00507 } // end namespace scene
+00508 } // end namespace irr
+00509 
+00510 
+00511 #endif
+00512 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h.html new file mode 100644 index 0000000..4b4001e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IQ3LevelMesh.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IQ3LevelMesh.h File Reference
+
+
+
#include "IAnimatedMesh.h"
+#include "IQ3Shader.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h_source.html new file mode 100644 index 0000000..995f22b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_q3_level_mesh_8h_source.html @@ -0,0 +1,157 @@ + + + + +Irrlicht 3D Engine: IQ3LevelMesh.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IQ3LevelMesh.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_Q3_LEVEL_MESH_H_INCLUDED__
+00006 #define __I_Q3_LEVEL_MESH_H_INCLUDED__
+00007 
+00008 #include "IAnimatedMesh.h"
+00009 #include "IQ3Shader.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00016 
+00017     class IQ3LevelMesh : public IAnimatedMesh
+00018     {
+00019     public:
+00020 
+00022 
+00024         virtual const quake3::IShader* getShader( const c8* filename, bool fileNameIsValid=true ) = 0;
+00025 
+00027         virtual const quake3::IShader* getShader(u32 index) const = 0;
+00028 
+00030         virtual quake3::tQ3EntityList& getEntityList() = 0;
+00031 
+00033 
+00036         virtual IMesh* getBrushEntityMesh(s32 num) const = 0;
+00037 
+00039         virtual IMesh* getBrushEntityMesh(quake3::IEntity &ent) const = 0;
+00040     };
+00041 
+00042 } // end namespace scene
+00043 } // end namespace irr
+00044 
+00045 #endif
+00046 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h.html new file mode 100644 index 0000000..0f1f3f3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h.html @@ -0,0 +1,244 @@ + + + + +Irrlicht 3D Engine: IQ3Shader.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IQ3Shader.h File Reference
+
+
+
#include "irrArray.h"
+#include "fast_atof.h"
+#include "IFileSystem.h"
+#include "IVideoDriver.h"
+#include "coreutil.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::scene::quake3 +
+

+Typedefs

+ +

+Enumerations

+ +

+Functions

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h_source.html new file mode 100644 index 0000000..71394d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_q3_shader_8h_source.html @@ -0,0 +1,982 @@ + + + + +Irrlicht 3D Engine: IQ3Shader.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IQ3Shader.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2006-2012 Nikolaus Gebhardt / Thomas Alten
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_Q3_LEVEL_SHADER_H_INCLUDED__
+00006 #define __I_Q3_LEVEL_SHADER_H_INCLUDED__
+00007 
+00008 #include "irrArray.h"
+00009 #include "fast_atof.h"
+00010 #include "IFileSystem.h"
+00011 #include "IVideoDriver.h"
+00012 #include "coreutil.h"
+00013 
+00014 namespace irr
+00015 {
+00016 namespace scene
+00017 {
+00018 namespace quake3
+00019 {
+00020 
+00021     static core::stringc irrEmptyStringc("");
+00022 
+00024     enum eQ3MeshIndex
+00025     {
+00026         E_Q3_MESH_GEOMETRY = 0,
+00027         E_Q3_MESH_ITEMS,
+00028         E_Q3_MESH_BILLBOARD,
+00029         E_Q3_MESH_FOG,
+00030         E_Q3_MESH_UNRESOLVED,
+00031         E_Q3_MESH_SIZE
+00032     };
+00033 
+00037     struct Q3LevelLoadParameter
+00038     {
+00039         Q3LevelLoadParameter ()
+00040             :defaultLightMapMaterial ( video::EMT_LIGHTMAP_M4 ),
+00041             defaultModulate ( video::EMFN_MODULATE_4X ),
+00042             defaultFilter ( video::EMF_BILINEAR_FILTER ),
+00043             patchTesselation ( 8 ),
+00044             verbose ( 0 ),
+00045             startTime ( 0 ), endTime ( 0 ),
+00046             mergeShaderBuffer ( 1 ),
+00047             cleanUnResolvedMeshes ( 1 ),
+00048             loadAllShaders ( 0 ),
+00049             loadSkyShader ( 0 ),
+00050             alpharef ( 1 ),
+00051             swapLump ( 0 ),
+00052     #ifdef __BIG_ENDIAN__
+00053             swapHeader ( 1 )
+00054     #else
+00055             swapHeader ( 0 )
+00056     #endif
+00057             {
+00058                 memcpy ( scriptDir, "scripts\x0", 8 );
+00059             }
+00060 
+00061         video::E_MATERIAL_TYPE defaultLightMapMaterial;
+00062         video::E_MODULATE_FUNC defaultModulate;
+00063         video::E_MATERIAL_FLAG defaultFilter;
+00064         s32 patchTesselation;
+00065         s32 verbose;
+00066         u32 startTime;
+00067         u32 endTime;
+00068         s32 mergeShaderBuffer;
+00069         s32 cleanUnResolvedMeshes;
+00070         s32 loadAllShaders;
+00071         s32 loadSkyShader;
+00072         s32 alpharef;
+00073         s32 swapLump;
+00074         s32 swapHeader;
+00075         c8 scriptDir [ 64 ];
+00076     };
+00077 
+00078     // some useful typedefs
+00079     typedef core::array< core::stringc > tStringList;
+00080     typedef core::array< video::ITexture* > tTexArray;
+00081 
+00082     // string helper.. TODO: move to generic files
+00083     inline s16 isEqual ( const core::stringc &string, u32 &pos, const c8 *list[], u16 listSize )
+00084     {
+00085         const char * in = string.c_str () + pos;
+00086 
+00087         for ( u16 i = 0; i != listSize; ++i )
+00088         {
+00089             if (string.size() < pos)
+00090                 return -2;
+00091             u32 len = (u32) strlen ( list[i] );
+00092             if (string.size() < pos+len)
+00093                 continue;
+00094             if ( in [len] != 0 && in [len] != ' ' )
+00095                 continue;
+00096             if ( strncmp ( in, list[i], len ) )
+00097                 continue;
+00098 
+00099             pos += len + 1;
+00100             return (s16) i;
+00101         }
+00102         return -2;
+00103     }
+00104 
+00105     inline f32 getAsFloat ( const core::stringc &string, u32 &pos )
+00106     {
+00107         const char * in = string.c_str () + pos;
+00108 
+00109         f32 value = 0.f;
+00110         pos += (u32) ( core::fast_atof_move ( in, value ) - in ) + 1;
+00111         return value;
+00112     }
+00113 
+00115     inline core::vector3df getAsVector3df ( const core::stringc &string, u32 &pos )
+00116     {
+00117         core::vector3df v;
+00118 
+00119         v.X = getAsFloat ( string, pos );
+00120         v.Z = getAsFloat ( string, pos );
+00121         v.Y = getAsFloat ( string, pos );
+00122 
+00123         return v;
+00124     }
+00125 
+00126 
+00127     /*
+00128         extract substrings
+00129     */
+00130     inline void getAsStringList ( tStringList &list, s32 max, const core::stringc &string, u32 &startPos )
+00131     {
+00132         list.clear ();
+00133 
+00134         s32 finish = 0;
+00135         s32 endPos;
+00136         do
+00137         {
+00138             endPos = string.findNext ( ' ', startPos );
+00139             if ( endPos == -1 )
+00140             {
+00141                 finish = 1;
+00142                 endPos = string.size();
+00143             }
+00144 
+00145             list.push_back ( string.subString ( startPos, endPos - startPos ) );
+00146             startPos = endPos + 1;
+00147 
+00148             if ( list.size() >= (u32) max )
+00149                 finish = 1;
+00150 
+00151         } while ( !finish );
+00152 
+00153     }
+00154 
+00156     struct SBlendFunc
+00157     {
+00158         SBlendFunc ( video::E_MODULATE_FUNC mod )
+00159             : type ( video::EMT_SOLID ), modulate ( mod ),
+00160                 param0( 0.f ),
+00161             isTransparent ( 0 ) {}
+00162 
+00163         video::E_MATERIAL_TYPE type;
+00164         video::E_MODULATE_FUNC modulate;
+00165 
+00166         f32 param0;
+00167         u32 isTransparent;
+00168     };
+00169 
+00170     // parses the content of Variable cull
+00171     inline bool getCullingFunction ( const core::stringc &cull )
+00172     {
+00173         if ( cull.size() == 0 )
+00174             return true;
+00175 
+00176         bool ret = true;
+00177         static const c8 * funclist[] = { "none", "disable", "twosided" };
+00178 
+00179         u32 pos = 0;
+00180         switch ( isEqual ( cull, pos, funclist, 3 ) )
+00181         {
+00182             case 0:
+00183             case 1:
+00184             case 2:
+00185                 ret = false;
+00186                 break;
+00187         }
+00188         return ret;
+00189     }
+00190 
+00191     // parses the content of Variable depthfunc
+00192     // return a z-test
+00193     inline u8 getDepthFunction ( const core::stringc &string )
+00194     {
+00195         u8 ret = video::ECFN_LESSEQUAL;
+00196 
+00197         if ( string.size() == 0 )
+00198             return ret;
+00199 
+00200         static const c8 * funclist[] = { "lequal","equal" };
+00201 
+00202         u32 pos = 0;
+00203         switch ( isEqual ( string, pos, funclist, 2 ) )
+00204         {
+00205             case 0:
+00206                 ret = video::ECFN_LESSEQUAL;
+00207                 break;
+00208             case 1:
+00209                 ret = video::ECFN_EQUAL;
+00210                 break;
+00211         }
+00212         return ret;
+00213     }
+00214 
+00215 
+00227     inline static void getBlendFunc ( const core::stringc &string, SBlendFunc &blendfunc )
+00228     {
+00229         if ( string.size() == 0 )
+00230             return;
+00231 
+00232         // maps to E_BLEND_FACTOR
+00233         static const c8 * funclist[] =
+00234         {
+00235             "gl_zero",
+00236             "gl_one",
+00237             "gl_dst_color",
+00238             "gl_one_minus_dst_color",
+00239             "gl_src_color",
+00240             "gl_one_minus_src_color",
+00241             "gl_src_alpha",
+00242             "gl_one_minus_src_alpha",
+00243             "gl_dst_alpha",
+00244             "gl_one_minus_dst_alpha",
+00245             "gl_src_alpha_sat",
+00246 
+00247             "add",
+00248             "filter",
+00249             "blend",
+00250 
+00251             "ge128",
+00252             "gt0",
+00253         };
+00254 
+00255 
+00256         u32 pos = 0;
+00257         s32 srcFact = isEqual ( string, pos, funclist, 16 );
+00258 
+00259         if ( srcFact < 0 )
+00260             return;
+00261 
+00262         u32 resolved = 0;
+00263         s32 dstFact = isEqual ( string, pos, funclist, 16 );
+00264 
+00265         switch ( srcFact )
+00266         {
+00267             case video::EBF_ZERO:
+00268                 switch ( dstFact )
+00269                 {
+00270                     // gl_zero gl_src_color == gl_dst_color gl_zero
+00271                     case video::EBF_SRC_COLOR:
+00272                         blendfunc.type = video::EMT_ONETEXTURE_BLEND;
+00273                         blendfunc.param0 = video::pack_textureBlendFunc ( video::EBF_DST_COLOR, video::EBF_ZERO, blendfunc.modulate );
+00274                         blendfunc.isTransparent = 1;
+00275                         resolved = 1;
+00276                         break;
+00277                 } break;
+00278 
+00279             case video::EBF_ONE:
+00280                 switch ( dstFact )
+00281                 {
+00282                     // gl_one gl_zero
+00283                     case video::EBF_ZERO:
+00284                         blendfunc.type = video::EMT_SOLID;
+00285                         blendfunc.isTransparent = 0;
+00286                         resolved = 1;
+00287                         break;
+00288 
+00289                     // gl_one gl_one
+00290                     case video::EBF_ONE:
+00291                         blendfunc.type = video::EMT_TRANSPARENT_ADD_COLOR;
+00292                         blendfunc.isTransparent = 1;
+00293                         resolved = 1;
+00294                         break;
+00295                 } break;
+00296 
+00297             case video::EBF_SRC_ALPHA:
+00298                 switch ( dstFact )
+00299                 {
+00300                     // gl_src_alpha gl_one_minus_src_alpha
+00301                     case video::EBF_ONE_MINUS_SRC_ALPHA:
+00302                         blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
+00303                         blendfunc.param0 = 1.f/255.f;
+00304                         blendfunc.isTransparent = 1;
+00305                         resolved = 1;
+00306                         break;
+00307                 } break;
+00308 
+00309             case 11:
+00310                 // add
+00311                 blendfunc.type = video::EMT_TRANSPARENT_ADD_COLOR;
+00312                 blendfunc.isTransparent = 1;
+00313                 resolved = 1;
+00314                 break;
+00315             case 12:
+00316                 // filter = gl_dst_color gl_zero or gl_zero gl_src_color
+00317                 blendfunc.type = video::EMT_ONETEXTURE_BLEND;
+00318                 blendfunc.param0 = video::pack_textureBlendFunc ( video::EBF_DST_COLOR, video::EBF_ZERO, blendfunc.modulate );
+00319                 blendfunc.isTransparent = 1;
+00320                 resolved = 1;
+00321                 break;
+00322             case 13:
+00323                 // blend = gl_src_alpha gl_one_minus_src_alpha
+00324                 blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
+00325                 blendfunc.param0 = 1.f/255.f;
+00326                 blendfunc.isTransparent = 1;
+00327                 resolved = 1;
+00328                 break;
+00329             case 14:
+00330                 // alphafunc ge128
+00331                 blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
+00332                 blendfunc.param0 = 0.5f;
+00333                 blendfunc.isTransparent = 1;
+00334                 resolved = 1;
+00335                 break;
+00336             case 15:
+00337                 // alphafunc gt0
+00338                 blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
+00339                 blendfunc.param0 = 1.f / 255.f;
+00340                 blendfunc.isTransparent = 1;
+00341                 resolved = 1;
+00342                 break;
+00343 
+00344         }
+00345 
+00346         // use the generic blender
+00347         if ( 0 == resolved )
+00348         {
+00349             blendfunc.type = video::EMT_ONETEXTURE_BLEND;
+00350             blendfunc.param0 = video::pack_textureBlendFunc (
+00351                     (video::E_BLEND_FACTOR) srcFact,
+00352                     (video::E_BLEND_FACTOR) dstFact,
+00353                     blendfunc.modulate);
+00354 
+00355             blendfunc.isTransparent = 1;
+00356         }
+00357     }
+00358 
+00359     // random noise [-1;1]
+00360     struct Noiser
+00361     {
+00362         static f32 get ()
+00363         {
+00364             static u32 RandomSeed = 0x69666966;
+00365             RandomSeed = (RandomSeed * 3631 + 1);
+00366 
+00367             f32 value = ( (f32) (RandomSeed & 0x7FFF ) * (1.0f / (f32)(0x7FFF >> 1) ) ) - 1.f;
+00368             return value;
+00369         }
+00370     };
+00371 
+00372     enum eQ3ModifierFunction
+00373     {
+00374         TCMOD               = 0,
+00375         DEFORMVERTEXES      = 1,
+00376         RGBGEN              = 2,
+00377         TCGEN               = 3,
+00378         MAP                 = 4,
+00379         ALPHAGEN            = 5,
+00380 
+00381         FUNCTION2           = 0x10,
+00382         SCROLL              = FUNCTION2 + 1,
+00383         SCALE               = FUNCTION2 + 2,
+00384         ROTATE              = FUNCTION2 + 3,
+00385         STRETCH             = FUNCTION2 + 4,
+00386         TURBULENCE          = FUNCTION2 + 5,
+00387         WAVE                = FUNCTION2 + 6,
+00388 
+00389         IDENTITY            = FUNCTION2 + 7,
+00390         VERTEX              = FUNCTION2 + 8,
+00391         TEXTURE             = FUNCTION2 + 9,
+00392         LIGHTMAP            = FUNCTION2 + 10,
+00393         ENVIRONMENT         = FUNCTION2 + 11,
+00394         DOLLAR_LIGHTMAP     = FUNCTION2 + 12,
+00395         BULGE               = FUNCTION2 + 13,
+00396         AUTOSPRITE          = FUNCTION2 + 14,
+00397         AUTOSPRITE2         = FUNCTION2 + 15,
+00398         TRANSFORM           = FUNCTION2 + 16,
+00399         EXACTVERTEX         = FUNCTION2 + 17,
+00400         CONSTANT            = FUNCTION2 + 18,
+00401         LIGHTINGSPECULAR    = FUNCTION2 + 19,
+00402         MOVE                = FUNCTION2 + 20,
+00403         NORMAL              = FUNCTION2 + 21,
+00404         IDENTITYLIGHTING    = FUNCTION2 + 22,
+00405 
+00406         WAVE_MODIFIER_FUNCTION  = 0x30,
+00407         SINUS               = WAVE_MODIFIER_FUNCTION + 1,
+00408         COSINUS             = WAVE_MODIFIER_FUNCTION + 2,
+00409         SQUARE              = WAVE_MODIFIER_FUNCTION + 3,
+00410         TRIANGLE            = WAVE_MODIFIER_FUNCTION + 4,
+00411         SAWTOOTH            = WAVE_MODIFIER_FUNCTION + 5,
+00412         SAWTOOTH_INVERSE    = WAVE_MODIFIER_FUNCTION + 6,
+00413         NOISE               = WAVE_MODIFIER_FUNCTION + 7,
+00414 
+00415 
+00416         UNKNOWN             = -2
+00417 
+00418     };
+00419 
+00420     struct SModifierFunction
+00421     {
+00422         SModifierFunction ()
+00423             : masterfunc0 ( UNKNOWN ), masterfunc1( UNKNOWN ), func ( SINUS ),
+00424             tcgen( TEXTURE ), rgbgen ( IDENTITY ), alphagen ( UNKNOWN ),
+00425             base ( 0 ), amp ( 1 ), phase ( 0 ), frequency ( 1 ),
+00426             wave ( 1 ),
+00427             x ( 0 ), y ( 0 ), z( 0 ), count( 0 ) {}
+00428 
+00429         // "tcmod","deformvertexes","rgbgen", "tcgen"
+00430         eQ3ModifierFunction masterfunc0;
+00431         // depends
+00432         eQ3ModifierFunction masterfunc1;
+00433         // depends
+00434         eQ3ModifierFunction func;
+00435 
+00436         eQ3ModifierFunction tcgen;
+00437         eQ3ModifierFunction rgbgen;
+00438         eQ3ModifierFunction alphagen;
+00439 
+00440         union
+00441         {
+00442             f32 base;
+00443             f32 bulgewidth;
+00444         };
+00445 
+00446         union
+00447         {
+00448             f32 amp;
+00449             f32 bulgeheight;
+00450         };
+00451 
+00452         f32 phase;
+00453 
+00454         union
+00455         {
+00456             f32 frequency;
+00457             f32 bulgespeed;
+00458         };
+00459 
+00460         union
+00461         {
+00462             f32 wave;
+00463             f32 div;
+00464         };
+00465 
+00466         f32 x;
+00467         f32 y;
+00468         f32 z;
+00469         u32 count;
+00470 
+00471         f32 evaluate ( f32 dt ) const
+00472         {
+00473             // phase in 0 and 1..
+00474             f32 x = core::fract( (dt + phase ) * frequency );
+00475             f32 y = 0.f;
+00476 
+00477             switch ( func )
+00478             {
+00479                 case SINUS:
+00480                     y = sinf ( x * core::PI * 2.f );
+00481                     break;
+00482                 case COSINUS:
+00483                     y = cosf ( x * core::PI * 2.f );
+00484                     break;
+00485                 case SQUARE:
+00486                     y = x < 0.5f ? 1.f : -1.f;
+00487                     break;
+00488                 case TRIANGLE:
+00489                     y = x < 0.5f ? ( 4.f * x ) - 1.f : ( -4.f * x ) + 3.f;
+00490                     break;
+00491                 case SAWTOOTH:
+00492                     y = x;
+00493                     break;
+00494                 case SAWTOOTH_INVERSE:
+00495                     y = 1.f - x;
+00496                     break;
+00497                 case NOISE:
+00498                     y = Noiser::get();
+00499                     break;
+00500                 default:
+00501                     break;
+00502             }
+00503 
+00504             return base + ( y * amp );
+00505         }
+00506 
+00507 
+00508     };
+00509 
+00510     inline core::vector3df getMD3Normal ( u32 i, u32 j )
+00511     {
+00512         const f32 lng = i * 2.0f * core::PI / 255.0f;
+00513         const f32 lat = j * 2.0f * core::PI / 255.0f;
+00514         return core::vector3df(cosf ( lat ) * sinf ( lng ),
+00515                 sinf ( lat ) * sinf ( lng ),
+00516                 cosf ( lng ));
+00517     }
+00518 
+00519     //
+00520     inline void getModifierFunc ( SModifierFunction& fill, const core::stringc &string, u32 &pos )
+00521     {
+00522         if ( string.size() == 0 )
+00523             return;
+00524 
+00525         static const c8 * funclist[] =
+00526         {
+00527             "sin","cos","square",
+00528             "triangle", "sawtooth","inversesawtooth", "noise"
+00529         };
+00530 
+00531         fill.func = (eQ3ModifierFunction) isEqual ( string,pos, funclist,7 );
+00532         fill.func = fill.func == UNKNOWN ? SINUS : (eQ3ModifierFunction) ((u32) fill.func + WAVE_MODIFIER_FUNCTION + 1);
+00533 
+00534         fill.base = getAsFloat ( string, pos );
+00535         fill.amp = getAsFloat ( string, pos );
+00536         fill.phase = getAsFloat ( string, pos );
+00537         fill.frequency = getAsFloat ( string, pos );
+00538     }
+00539 
+00540 
+00541     // name = "a b c .."
+00542     struct SVariable
+00543     {
+00544         core::stringc name;
+00545         core::stringc content;
+00546 
+00547         SVariable ( const c8 * n, const c8 *c = 0 ) : name ( n ), content (c) {}
+00548         virtual ~SVariable () {}
+00549 
+00550         void clear ()
+00551         {
+00552             name = "";
+00553             content = "";
+00554         }
+00555 
+00556         s32 isValid () const
+00557         {
+00558             return name.size();
+00559         }
+00560 
+00561         bool operator == ( const SVariable &other ) const
+00562         {
+00563             return 0 == strcmp ( name.c_str(), other.name.c_str () );
+00564         }
+00565 
+00566         bool operator < ( const SVariable &other ) const
+00567         {
+00568             return 0 > strcmp ( name.c_str(), other.name.c_str () );
+00569         }
+00570 
+00571     };
+00572 
+00573 
+00574     // string database. "a" = "Hello", "b" = "1234.6"
+00575     struct SVarGroup
+00576     {
+00577         SVarGroup () { Variable.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); }
+00578         virtual ~SVarGroup () {}
+00579 
+00580         u32 isDefined ( const c8 * name, const c8 * content = 0 ) const
+00581         {
+00582             for ( u32 i = 0; i != Variable.size (); ++i )
+00583             {
+00584                 if ( 0 == strcmp ( Variable[i].name.c_str(), name ) &&
+00585                     (  0 == content || strstr ( Variable[i].content.c_str(), content ) )
+00586                     )
+00587                 {
+00588                     return i + 1;
+00589                 }
+00590             }
+00591             return 0;
+00592         }
+00593 
+00594         // searches for Variable name and returns is content
+00595         // if Variable is not found a reference to an Empty String is returned
+00596         const core::stringc &get( const c8 * name ) const
+00597         {
+00598             SVariable search ( name );
+00599             s32 index = Variable.linear_search ( search );
+00600             if ( index < 0 )
+00601                 return irrEmptyStringc;
+00602 
+00603             return Variable [ index ].content;
+00604         }
+00605 
+00606         // set the Variable name
+00607         void set ( const c8 * name, const c8 * content = 0 )
+00608         {
+00609             u32 index = isDefined ( name, 0 );
+00610             if ( 0 == index )
+00611             {
+00612                 Variable.push_back ( SVariable ( name, content ) );
+00613             }
+00614             else
+00615             {
+00616                 Variable [ index ].content = content;
+00617             }
+00618         }
+00619 
+00620 
+00621         core::array < SVariable > Variable;
+00622     };
+00623 
+00625     struct SVarGroupList: public IReferenceCounted
+00626     {
+00627         SVarGroupList ()
+00628         {
+00629             VariableGroup.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE );
+00630         }
+00631         virtual ~SVarGroupList () {}
+00632 
+00633         core::array < SVarGroup > VariableGroup;
+00634     };
+00635 
+00636 
+00638     struct IShader
+00639     {
+00640         IShader ()
+00641             : ID ( 0 ), VarGroup ( 0 )  {}
+00642         virtual ~IShader () {}
+00643 
+00644         void operator = (const IShader &other )
+00645         {
+00646             ID = other.ID;
+00647             VarGroup = other.VarGroup;
+00648             name = other.name;
+00649         }
+00650 
+00651         bool operator == (const IShader &other ) const
+00652         {
+00653             return 0 == strcmp ( name.c_str(), other.name.c_str () );
+00654             //return name == other.name;
+00655         }
+00656 
+00657         bool operator < (const IShader &other ) const
+00658         {
+00659             return strcmp ( name.c_str(), other.name.c_str () ) < 0;
+00660             //return name < other.name;
+00661         }
+00662 
+00663         u32 getGroupSize () const
+00664         {
+00665             if ( 0 == VarGroup )
+00666                 return 0;
+00667             return VarGroup->VariableGroup.size ();
+00668         }
+00669 
+00670         const SVarGroup * getGroup ( u32 stage ) const
+00671         {
+00672             if ( 0 == VarGroup || stage >= VarGroup->VariableGroup.size () )
+00673                 return 0;
+00674 
+00675             return &VarGroup->VariableGroup [ stage ];
+00676         }
+00677 
+00678         // id
+00679         s32 ID;
+00680         SVarGroupList *VarGroup; // reference
+00681 
+00682         // Shader: shader name ( also first variable in first Vargroup )
+00683         // Entity: classname ( variable in Group(1) )
+00684         core::stringc name;
+00685     };
+00686 
+00687     typedef IShader IEntity;
+00688 
+00689     typedef core::array < IEntity > tQ3EntityList;
+00690 
+00691     /*
+00692         dump shader like original layout, regardless of internal data holding
+00693         no recursive folding..
+00694     */
+00695     inline void dumpVarGroup ( core::stringc &dest, const SVarGroup * group, s32 stack )
+00696     {
+00697         core::stringc buf;
+00698         s32 i;
+00699 
+00700 
+00701         if ( stack > 0 )
+00702         {
+00703             buf = "";
+00704             for ( i = 0; i < stack - 1; ++i )
+00705                 buf += '\t';
+00706 
+00707             buf += "{\n";
+00708             dest.append ( buf );
+00709         }
+00710 
+00711         for ( u32 g = 0; g != group->Variable.size(); ++g )
+00712         {
+00713             buf = "";
+00714             for ( i = 0; i < stack; ++i )
+00715                 buf += '\t';
+00716 
+00717             buf += group->Variable[g].name;
+00718             buf += " ";
+00719             buf += group->Variable[g].content;
+00720             buf += "\n";
+00721             dest.append ( buf );
+00722         }
+00723 
+00724         if ( stack > 1 )
+00725         {
+00726             buf = "";
+00727             for ( i = 0; i < stack - 1; ++i )
+00728                 buf += '\t';
+00729 
+00730             buf += "}\n";
+00731             dest.append ( buf );
+00732         }
+00733 
+00734     }
+00735 
+00739     inline core::stringc & dumpShader ( core::stringc &dest, const IShader * shader, bool entity = false )
+00740     {
+00741         if ( 0 == shader )
+00742             return dest;
+00743 
+00744         const SVarGroup * group;
+00745 
+00746         const u32 size = shader->VarGroup->VariableGroup.size ();
+00747         for ( u32 i = 0; i != size; ++i )
+00748         {
+00749             group = &shader->VarGroup->VariableGroup[ i ];
+00750             dumpVarGroup ( dest, group, core::clamp( (int)i, 0, 2 ) );
+00751         }
+00752 
+00753         if ( !entity )
+00754         {
+00755             if ( size <= 1 )
+00756             {
+00757                 dest.append ( "{\n" );
+00758             }
+00759             dest.append ( "}\n" );
+00760         }
+00761         return dest;
+00762     }
+00763 
+00764 
+00765     /*
+00766         quake3 doesn't care much about tga & jpg
+00767         load one or multiple files stored in name started at startPos to the texture array textures
+00768         if texture is not loaded 0 will be added ( to find missing textures easier)
+00769     */
+00770     inline void getTextures(tTexArray &textures,
+00771                 const core::stringc &name, u32 &startPos,
+00772                 io::IFileSystem *fileSystem,
+00773                 video::IVideoDriver* driver)
+00774     {
+00775         static const char* extension[] =
+00776         {
+00777             ".jpg",
+00778             ".jpeg",
+00779             ".png",
+00780             ".dds",
+00781             ".tga",
+00782             ".bmp",
+00783             ".pcx"
+00784         };
+00785 
+00786         tStringList stringList;
+00787         getAsStringList(stringList, -1, name, startPos);
+00788 
+00789         textures.clear();
+00790 
+00791         io::path loadFile;
+00792         for ( u32 i = 0; i!= stringList.size (); ++i )
+00793         {
+00794             video::ITexture* texture = 0;
+00795             for (u32 g = 0; g != 7 ; ++g)
+00796             {
+00797                 core::cutFilenameExtension ( loadFile, stringList[i] );
+00798 
+00799                 if ( loadFile == "$whiteimage" )
+00800                 {
+00801                     texture = driver->getTexture( "$whiteimage" );
+00802                     if ( 0 == texture )
+00803                     {
+00804                         core::dimension2du s ( 2, 2 );
+00805                         u32 image[4] = { 0xFFFFFFFF, 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF };
+00806                         video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image );
+00807                         texture = driver->addTexture( "$whiteimage", w );
+00808                         w->drop ();
+00809                     }
+00810 
+00811                 }
+00812                 else
+00813                 if ( loadFile == "$redimage" )
+00814                 {
+00815                     texture = driver->getTexture( "$redimage" );
+00816                     if ( 0 == texture )
+00817                     {
+00818                         core::dimension2du s ( 2, 2 );
+00819                         u32 image[4] = { 0xFFFF0000, 0xFFFF0000,0xFFFF0000,0xFFFF0000 };
+00820                         video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image );
+00821                         texture = driver->addTexture( "$redimage", w );
+00822                         w->drop ();
+00823                     }
+00824                 }
+00825                 else
+00826                 if ( loadFile == "$blueimage" )
+00827                 {
+00828                     texture = driver->getTexture( "$blueimage" );
+00829                     if ( 0 == texture )
+00830                     {
+00831                         core::dimension2du s ( 2, 2 );
+00832                         u32 image[4] = { 0xFF0000FF, 0xFF0000FF,0xFF0000FF,0xFF0000FF };
+00833                         video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image );
+00834                         texture = driver->addTexture( "$blueimage", w );
+00835                         w->drop ();
+00836                     }
+00837                 }
+00838                 else
+00839                 if ( loadFile == "$checkerimage" )
+00840                 {
+00841                     texture = driver->getTexture( "$checkerimage" );
+00842                     if ( 0 == texture )
+00843                     {
+00844                         core::dimension2du s ( 2, 2 );
+00845                         u32 image[4] = { 0xFFFFFFFF, 0xFF000000,0xFF000000,0xFFFFFFFF };
+00846                         video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image );
+00847                         texture = driver->addTexture( "$checkerimage", w );
+00848                         w->drop ();
+00849                     }
+00850                 }
+00851                 else
+00852                 if ( loadFile == "$lightmap" )
+00853                 {
+00854                     texture = 0;
+00855                 }
+00856                 else
+00857                 {
+00858                     loadFile.append ( extension[g] );
+00859                 }
+00860 
+00861                 if ( fileSystem->existFile ( loadFile ) )
+00862                 {
+00863                     texture = driver->getTexture( loadFile );
+00864                     if ( texture )
+00865                         break;
+00866                     texture = 0;
+00867                 }
+00868             }
+00869             // take 0 Texture
+00870             textures.push_back(texture);
+00871         }
+00872     }
+00873 
+00874 
+00876     class IShaderManager : public IReferenceCounted
+00877     {
+00878     };
+00879 
+00880 } // end namespace quake3
+00881 } // end namespace scene
+00882 } // end namespace irr
+00883 
+00884 #endif
+00885 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h.html new file mode 100644 index 0000000..0ebb17a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: IRandomizer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IRandomizer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h_source.html new file mode 100644 index 0000000..c66603f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_randomizer_8h_source.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: IRandomizer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IRandomizer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_RANDOMIZER_H_INCLUDED__
+00006 #define __I_RANDOMIZER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00014 class IRandomizer : public virtual IReferenceCounted
+00015 {
+00016 public:
+00018 
+00019     virtual void reset(s32 value=0x0f0f0f0f) =0;
+00020 
+00022     virtual s32 rand() const =0;
+00023 
+00025     virtual f32 frand() const =0;
+00026 
+00028     virtual s32 randMax() const =0;
+00029 };
+00030 
+00031 } // end namespace irr
+00032 
+00033 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h.html new file mode 100644 index 0000000..c448db0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: IReadFile.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IReadFile.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "coreutil.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Functions

+
    +
  • IReadFile * irr::io::createLimitReadFile (const io::path &fileName, IReadFile *alreadyOpenedFile, long pos, long areaSize) +
    Internal function, please do not use.
  • IReadFile * irr::io::createMemoryReadFile (void *memory, long size, const io::path &fileName, bool deleteMemoryWhenDropped) +
    Internal function, please do not use.
  • IReadFile * irr::io::createReadFile (const io::path &fileName) +
    Internal function, please do not use.
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h_source.html new file mode 100644 index 0000000..bb6cf5b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_read_file_8h_source.html @@ -0,0 +1,163 @@ + + + + +Irrlicht 3D Engine: IReadFile.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IReadFile.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_READ_FILE_H_INCLUDED__
+00006 #define __I_READ_FILE_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "coreutil.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00015 
+00017     class IReadFile : public virtual IReferenceCounted
+00018     {
+00019     public:
+00021 
+00024         virtual s32 read(void* buffer, u32 sizeToRead) = 0;
+00025 
+00027 
+00032         virtual bool seek(long finalPos, bool relativeMovement = false) = 0;
+00033 
+00035 
+00036         virtual long getSize() const = 0;
+00037 
+00039 
+00040         virtual long getPos() const = 0;
+00041 
+00043 
+00044         virtual const io::path& getFileName() const = 0;
+00045     };
+00046 
+00048     IReadFile* createReadFile(const io::path& fileName);
+00050     IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize);
+00052     IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped);
+00053 
+00054 } // end namespace io
+00055 } // end namespace irr
+00056 
+00057 #endif
+00058 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h.html new file mode 100644 index 0000000..9292323 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: IReferenceCounted.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IReferenceCounted.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html new file mode 100644 index 0000000..641e3b0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: IReferenceCounted.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IReferenceCounted.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_IREFERENCE_COUNTED_H_INCLUDED__
+00006 #define __I_IREFERENCE_COUNTED_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00014 
+00041     class IReferenceCounted
+00042     {
+00043     public:
+00044 
+00046         IReferenceCounted()
+00047             : DebugName(0), ReferenceCounter(1)
+00048         {
+00049         }
+00050 
+00052         virtual ~IReferenceCounted()
+00053         {
+00054         }
+00055 
+00057 
+00086         void grab() const { ++ReferenceCounter; }
+00087 
+00089 
+00116         bool drop() const
+00117         {
+00118             // someone is doing bad reference counting.
+00119             _IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0)
+00120 
+00121             --ReferenceCounter;
+00122             if (!ReferenceCounter)
+00123             {
+00124                 delete this;
+00125                 return true;
+00126             }
+00127 
+00128             return false;
+00129         }
+00130 
+00132 
+00133         s32 getReferenceCount() const
+00134         {
+00135             return ReferenceCounter;
+00136         }
+00137 
+00139 
+00142         const c8* getDebugName() const
+00143         {
+00144             return DebugName;
+00145         }
+00146 
+00147     protected:
+00148 
+00150 
+00153         void setDebugName(const c8* newName)
+00154         {
+00155             DebugName = newName;
+00156         }
+00157 
+00158     private:
+00159 
+00161         const c8* DebugName;
+00162 
+00164         mutable s32 ReferenceCounter;
+00165     };
+00166 
+00167 } // end namespace irr
+00168 
+00169 #endif
+00170 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h.html new file mode 100644 index 0000000..04596f7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: ISceneCollisionManager.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneCollisionManager.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "vector3d.h"
+#include "triangle3d.h"
+#include "position2d.h"
+#include "line3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h_source.html new file mode 100644 index 0000000..8a563e3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_collision_manager_8h_source.html @@ -0,0 +1,201 @@ + + + + +Irrlicht 3D Engine: ISceneCollisionManager.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneCollisionManager.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
+00006 #define __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "vector3d.h"
+00010 #include "triangle3d.h"
+00011 #include "position2d.h"
+00012 #include "line3d.h"
+00013 
+00014 namespace irr
+00015 {
+00016 
+00017 namespace scene
+00018 {
+00019     class ISceneNode;
+00020     class ICameraSceneNode;
+00021     class ITriangleSelector;
+00022 
+00024     class ISceneCollisionManager : public virtual IReferenceCounted
+00025     {
+00026     public:
+00027 
+00029 
+00041         virtual bool getCollisionPoint(const core::line3d<f32>& ray,
+00042                 ITriangleSelector* selector, core::vector3df& outCollisionPoint,
+00043                 core::triangle3df& outTriangle, ISceneNode*& outNode) =0;
+00044 
+00046 
+00068         virtual core::vector3df getCollisionResultPosition(
+00069             ITriangleSelector* selector,
+00070             const core::vector3df &ellipsoidPosition,
+00071             const core::vector3df& ellipsoidRadius,
+00072             const core::vector3df& ellipsoidDirectionAndSpeed,
+00073             core::triangle3df& triout,
+00074             core::vector3df& hitPosition,
+00075             bool& outFalling,
+00076             ISceneNode*& outNode,
+00077             f32 slidingSpeed = 0.0005f,
+00078             const core::vector3df& gravityDirectionAndSpeed
+00079             = core::vector3df(0.0f, 0.0f, 0.0f)) = 0;
+00080 
+00082 
+00088         virtual core::line3d<f32> getRayFromScreenCoordinates(
+00089             const core::position2d<s32>& pos, ICameraSceneNode* camera = 0) = 0;
+00090 
+00092 
+00106         virtual core::position2d<s32> getScreenCoordinatesFrom3DPosition(
+00107             const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0;
+00108 
+00110 
+00125         virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d<s32>& pos,
+00126                 s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
+00127 
+00129 
+00141         virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d<f32>& ray,
+00142                             s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
+00143 
+00145 
+00161         virtual ISceneNode* getSceneNodeFromCameraBB(ICameraSceneNode* camera,
+00162             s32 idBitMask=0, bool bNoDebugObjects = false) = 0;
+00163 
+00165 
+00191         virtual ISceneNode* getSceneNodeAndCollisionPointFromRay(
+00192                                 core::line3df ray,
+00193                                 core::vector3df & outCollisionPoint,
+00194                                 core::triangle3df & outTriangle,
+00195                                 s32 idBitMask = 0,
+00196                                 ISceneNode * collisionRootNode = 0,
+00197                                 bool noDebugObjects = false) = 0;
+00198     };
+00199 
+00200 
+00201 } // end namespace scene
+00202 } // end namespace irr
+00203 
+00204 #endif
+00205 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h.html new file mode 100644 index 0000000..8ea52d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: ISceneLoader.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneLoader.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h_source.html new file mode 100644 index 0000000..b0aeec6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_loader_8h_source.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: ISceneLoader.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneLoader.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2010-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_LOADER_H_INCLUDED__
+00006 #define __I_SCENE_LOADER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00015     class IReadFile;
+00016 } // end namespace io
+00017 namespace scene
+00018 {
+00019     class ISceneNode;
+00020     class ISceneUserDataSerializer;
+00021 
+00023 
+00026 class ISceneLoader : public virtual IReferenceCounted
+00027 {
+00028 public:
+00029 
+00031 
+00035     virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
+00036 
+00038 
+00041     virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0;
+00042 
+00044 
+00052     virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0,
+00053                            ISceneNode* rootNode=0) = 0;
+00054 
+00055 };
+00056 
+00057 
+00058 } // end namespace scene
+00059 } // end namespace irr
+00060 
+00061 #endif
+00062 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h.html new file mode 100644 index 0000000..ff3a596 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h.html @@ -0,0 +1,178 @@ + + + + +Irrlicht 3D Engine: ISceneManager.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneManager.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrArray.h"
+#include "irrString.h"
+#include "path.h"
+#include "vector3d.h"
+#include "dimension2d.h"
+#include "SColor.h"
+#include "ETerrainElements.h"
+#include "ESceneNodeTypes.h"
+#include "ESceneNodeAnimatorTypes.h"
+#include "EMeshWriterEnums.h"
+#include "SceneParameters.h"
+#include "IGeometryCreator.h"
+#include "ISkinnedMesh.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::scene::quake3 +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h_source.html new file mode 100644 index 0000000..2f071d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_manager_8h_source.html @@ -0,0 +1,659 @@ + + + + +Irrlicht 3D Engine: ISceneManager.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneManager.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_MANAGER_H_INCLUDED__
+00006 #define __I_SCENE_MANAGER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrArray.h"
+00010 #include "irrString.h"
+00011 #include "path.h"
+00012 #include "vector3d.h"
+00013 #include "dimension2d.h"
+00014 #include "SColor.h"
+00015 #include "ETerrainElements.h"
+00016 #include "ESceneNodeTypes.h"
+00017 #include "ESceneNodeAnimatorTypes.h"
+00018 #include "EMeshWriterEnums.h"
+00019 #include "SceneParameters.h"
+00020 #include "IGeometryCreator.h"
+00021 #include "ISkinnedMesh.h"
+00022 
+00023 namespace irr
+00024 {
+00025     struct SKeyMap;
+00026     struct SEvent;
+00027 
+00028 namespace io
+00029 {
+00030     class IReadFile;
+00031     class IAttributes;
+00032     class IWriteFile;
+00033     class IFileSystem;
+00034 } // end namespace io
+00035 
+00036 namespace gui
+00037 {
+00038     class IGUIFont;
+00039     class IGUIEnvironment;
+00040 } // end namespace gui
+00041 
+00042 namespace video
+00043 {
+00044     class IVideoDriver;
+00045     class SMaterial;
+00046     class IImage;
+00047     class ITexture;
+00048 } // end namespace video
+00049 
+00050 namespace scene
+00051 {
+00053 
+00055     enum E_SCENE_NODE_RENDER_PASS
+00056     {
+00058         ESNRP_NONE =0,
+00059 
+00061         ESNRP_CAMERA =1,
+00062 
+00064         ESNRP_LIGHT =2,
+00065 
+00067         ESNRP_SKY_BOX =4,
+00068 
+00070 
+00082         ESNRP_AUTOMATIC =24,
+00083 
+00085         ESNRP_SOLID =8,
+00086 
+00088         ESNRP_TRANSPARENT =16,
+00089 
+00091         ESNRP_TRANSPARENT_EFFECT =32,
+00092 
+00094         ESNRP_SHADOW =64
+00095     };
+00096 
+00097     class IAnimatedMesh;
+00098     class IAnimatedMeshSceneNode;
+00099     class IBillboardSceneNode;
+00100     class IBillboardTextSceneNode;
+00101     class ICameraSceneNode;
+00102     class IDummyTransformationSceneNode;
+00103     class ILightManager;
+00104     class ILightSceneNode;
+00105     class IMesh;
+00106     class IMeshBuffer;
+00107     class IMeshCache;
+00108     class IMeshLoader;
+00109     class IMeshManipulator;
+00110     class IMeshSceneNode;
+00111     class IMeshWriter;
+00112     class IMetaTriangleSelector;
+00113     class IParticleSystemSceneNode;
+00114     class ISceneCollisionManager;
+00115     class ISceneLoader;
+00116     class ISceneNode;
+00117     class ISceneNodeAnimator;
+00118     class ISceneNodeAnimatorCollisionResponse;
+00119     class ISceneNodeAnimatorFactory;
+00120     class ISceneNodeFactory;
+00121     class ISceneUserDataSerializer;
+00122     class ITerrainSceneNode;
+00123     class ITextSceneNode;
+00124     class ITriangleSelector;
+00125     class IVolumeLightSceneNode;
+00126 
+00127     namespace quake3
+00128     {
+00129         struct IShader;
+00130     } // end namespace quake3
+00131 
+00133 
+00150     class ISceneManager : public virtual IReferenceCounted
+00151     {
+00152     public:
+00153 
+00155 
+00399         virtual IAnimatedMesh* getMesh(const io::path& filename) = 0;
+00400 
+00402 
+00408         virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0;
+00409 
+00411 
+00414         virtual IMeshCache* getMeshCache() = 0;
+00415 
+00417 
+00419         virtual video::IVideoDriver* getVideoDriver() = 0;
+00420 
+00422 
+00424         virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
+00425 
+00427 
+00429         virtual io::IFileSystem* getFileSystem() = 0;
+00430 
+00432 
+00445         virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1,
+00446             const u32 subdivU = 32, const u32 subdivV = 32,
+00447             const video::SColor foot = video::SColor(51, 0, 230, 180),
+00448             const video::SColor tail = video::SColor(0, 0, 0, 0),
+00449             const core::vector3df& position = core::vector3df(0,0,0),
+00450             const core::vector3df& rotation = core::vector3df(0,0,0),
+00451             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
+00452 
+00454 
+00464         virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
+00465             const core::vector3df& position = core::vector3df(0,0,0),
+00466             const core::vector3df& rotation = core::vector3df(0,0,0),
+00467             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
+00468 
+00470 
+00484         virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16,
+00485                 ISceneNode* parent=0, s32 id=-1,
+00486                 const core::vector3df& position = core::vector3df(0,0,0),
+00487                 const core::vector3df& rotation = core::vector3df(0,0,0),
+00488                 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
+00489 
+00491 
+00501         virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh,
+00502                 ISceneNode* parent=0, s32 id=-1,
+00503                 const core::vector3df& position = core::vector3df(0,0,0),
+00504                 const core::vector3df& rotation = core::vector3df(0,0,0),
+00505                 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
+00506                 bool alsoAddIfMeshPointerZero=false) = 0;
+00507 
+00509 
+00519         virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1,
+00520             const core::vector3df& position = core::vector3df(0,0,0),
+00521             const core::vector3df& rotation = core::vector3df(0,0,0),
+00522             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
+00523             bool alsoAddIfMeshPointerZero=false) = 0;
+00524 
+00526 
+00540         virtual ISceneNode* addWaterSurfaceSceneNode(IMesh* mesh,
+00541             f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f,
+00542             ISceneNode* parent=0, s32 id=-1,
+00543             const core::vector3df& position = core::vector3df(0,0,0),
+00544             const core::vector3df& rotation = core::vector3df(0,0,0),
+00545             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
+00546 
+00547 
+00549 
+00561         virtual IMeshSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0,
+00562             s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0;
+00563 
+00565 
+00566         _IRR_DEPRECATED_ IMeshSceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0,
+00567             s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false)
+00568         {
+00569             return addOctreeSceneNode(mesh, parent, id, minimalPolysPerNode, alsoAddIfMeshPointerZero);
+00570         }
+00571 
+00573 
+00585         virtual IMeshSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0,
+00586             s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0;
+00587 
+00589 
+00590         _IRR_DEPRECATED_ IMeshSceneNode* addOctTreeSceneNode(IMesh* mesh, ISceneNode* parent=0,
+00591             s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false)
+00592         {
+00593             return addOctreeSceneNode(mesh, parent, id, minimalPolysPerNode, alsoAddIfMeshPointerZero);
+00594         }
+00595 
+00597 
+00613         virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0,
+00614             const core::vector3df& position = core::vector3df(0,0,0),
+00615             const core::vector3df& lookat = core::vector3df(0,0,100),
+00616             s32 id=-1, bool makeActive=true) = 0;
+00617 
+00619 
+00635         virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent=0,
+00636             f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f,
+00637             f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f,
+00638             bool makeActive=true) =0;
+00639 
+00641 
+00704         virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0,
+00705             f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1,
+00706             SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false,
+00707             f32 jumpSpeed = 0.f, bool invertMouse=false,
+00708             bool makeActive=true) = 0;
+00709 
+00711 
+00723         virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0,
+00724             const core::vector3df& position = core::vector3df(0,0,0),
+00725             video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f),
+00726             f32 radius=100.0f, s32 id=-1) = 0;
+00727 
+00729 
+00747         virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0,
+00748             const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
+00749             const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
+00750             video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
+00751 
+00753 
+00767         virtual ISceneNode* addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom,
+00768             video::ITexture* left, video::ITexture* right, video::ITexture* front,
+00769             video::ITexture* back, ISceneNode* parent = 0, s32 id=-1) = 0;
+00770 
+00772 
+00789         virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture,
+00790             u32 horiRes=16, u32 vertRes=8,
+00791             f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f,
+00792             ISceneNode* parent=0, s32 id=-1) = 0;
+00793 
+00795 
+00807         virtual IParticleSystemSceneNode* addParticleSystemSceneNode(
+00808             bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1,
+00809             const core::vector3df& position = core::vector3df(0,0,0),
+00810             const core::vector3df& rotation = core::vector3df(0,0,0),
+00811             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
+00812 
+00814 
+00869         virtual ITerrainSceneNode* addTerrainSceneNode(
+00870             const io::path& heightMapFileName,
+00871                 ISceneNode* parent=0, s32 id=-1,
+00872             const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
+00873             const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
+00874             const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
+00875             video::SColor vertexColor = video::SColor(255,255,255,255),
+00876             s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
+00877             bool addAlsoIfHeightmapEmpty = false) = 0;
+00878 
+00880 
+00907         virtual ITerrainSceneNode* addTerrainSceneNode(
+00908             io::IReadFile* heightMapFile,
+00909             ISceneNode* parent=0, s32 id=-1,
+00910             const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
+00911             const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
+00912             const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
+00913             video::SColor vertexColor = video::SColor(255,255,255,255),
+00914             s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
+00915             bool addAlsoIfHeightmapEmpty = false) = 0;
+00916 
+00918 
+00921         virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader,
+00922                                                 ISceneNode* parent=0, s32 id=-1
+00923                                                 ) = 0;
+00924 
+00925 
+00927 
+00931         virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0;
+00932 
+00934 
+00940         virtual IDummyTransformationSceneNode* addDummyTransformationSceneNode(
+00941             ISceneNode* parent=0, s32 id=-1) = 0;
+00942 
+00944         virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text,
+00945             video::SColor color=video::SColor(100,255,255,255),
+00946             ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0),
+00947             s32 id=-1) = 0;
+00948 
+00950 
+00961         virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text,
+00962             ISceneNode* parent = 0,
+00963             const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
+00964             const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
+00965             video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
+00966 
+00968 
+00994         virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name,
+00995             const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount,
+00996             video::SMaterial* material = 0, f32 hillHeight = 0.0f,
+00997             const core::dimension2d<f32>& countHills = core::dimension2d<f32>(0.0f, 0.0f),
+00998             const core::dimension2d<f32>& textureRepeatCount = core::dimension2d<f32>(1.0f, 1.0f)) = 0;
+00999 
+01001 
+01023         virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname,
+01024             video::IImage* texture, video::IImage* heightmap,
+01025             const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f),
+01026             f32 maxHeight=200.0f,
+01027             const core::dimension2d<u32>& defaultVertexBlockSize = core::dimension2d<u32>(64,64)) = 0;
+01028 
+01030 
+01041         virtual IAnimatedMesh* addArrowMesh(const io::path& name,
+01042                 video::SColor vtxColorCylinder=0xFFFFFFFF,
+01043                 video::SColor vtxColorCone=0xFFFFFFFF,
+01044                 u32 tesselationCylinder=4, u32 tesselationCone=8,
+01045                 f32 height=1.f, f32 cylinderHeight=0.6f,
+01046                 f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0;
+01047 
+01049 
+01055         virtual IAnimatedMesh* addSphereMesh(const io::path& name,
+01056                 f32 radius=5.f, u32 polyCountX = 16,
+01057                 u32 polyCountY = 16) = 0;
+01058 
+01060 
+01068         virtual IAnimatedMesh* addVolumeLightMesh(const io::path& name,
+01069                 const u32 SubdivideU = 32, const u32 SubdivideV = 32,
+01070                 const video::SColor FootColor = video::SColor(51, 0, 230, 180),
+01071                 const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0;
+01072 
+01074 
+01080         virtual ISceneNode* getRootSceneNode() = 0;
+01081 
+01083 
+01090         virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0;
+01091 
+01093 
+01100         virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0;
+01101 
+01103 
+01110         virtual ISceneNode* getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start=0) = 0;
+01111 
+01113 
+01118         virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type,
+01119                 core::array<scene::ISceneNode*>& outNodes,
+01120                 ISceneNode* start=0) = 0;
+01121 
+01123 
+01126         virtual ICameraSceneNode* getActiveCamera() const =0;
+01127 
+01129 
+01131         virtual void setActiveCamera(ICameraSceneNode* camera) = 0;
+01132 
+01134         virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0;
+01135 
+01137         virtual video::SColor getShadowColor() const = 0;
+01138 
+01140 
+01148         virtual u32 registerNodeForRendering(ISceneNode* node,
+01149             E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC) = 0;
+01150 
+01152 
+01156         virtual void drawAll() = 0;
+01157 
+01159 
+01164         virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationSpeed) = 0;
+01165 
+01167 
+01179         virtual ISceneNodeAnimator* createFlyCircleAnimator(
+01180                 const core::vector3df& center=core::vector3df(0.f,0.f,0.f),
+01181                 f32 radius=100.f, f32 speed=0.001f,
+01182                 const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f),
+01183                 f32 startPosition = 0.f,
+01184                 f32 radiusEllipsoid = 0.f) = 0;
+01185 
+01187 
+01199         virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint,
+01200             const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0;
+01201 
+01203 
+01212         virtual ISceneNodeAnimator* createTextureAnimator(const core::array<video::ITexture*>& textures,
+01213             s32 timePerFrame, bool loop=true) = 0;
+01214 
+01216 
+01221         virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMs) = 0;
+01222 
+01224 
+01254         virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator(
+01255             ITriangleSelector* world, ISceneNode* sceneNode,
+01256             const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30),
+01257             const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0),
+01258             const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0),
+01259             f32 slidingValue = 0.0005f) = 0;
+01260 
+01262 
+01270         virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime,
+01271             const core::array< core::vector3df >& points,
+01272             f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false) = 0;
+01273 
+01275 
+01293         virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node) = 0;
+01294 
+01296 
+01301         virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node) = 0;
+01302 
+01303 
+01305 
+01313         virtual ITriangleSelector* createTriangleSelectorFromBoundingBox(ISceneNode* node) = 0;
+01314 
+01316 
+01338         virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh,
+01339             ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
+01340 
+01342 
+01343         _IRR_DEPRECATED_ ITriangleSelector* createOctTreeTriangleSelector(IMesh* mesh,
+01344             ISceneNode* node, s32 minimalPolysPerNode=32)
+01345         {
+01346             return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode);
+01347         }
+01348 
+01350 
+01357         virtual IMetaTriangleSelector* createMetaTriangleSelector() = 0;
+01358 
+01360 
+01365         virtual ITriangleSelector* createTerrainTriangleSelector(
+01366             ITerrainSceneNode* node, s32 LOD=0) = 0;
+01367 
+01369 
+01375         virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0;
+01376 
+01378         virtual u32 getMeshLoaderCount() const = 0;
+01379 
+01381 
+01384         virtual IMeshLoader* getMeshLoader(u32 index) const = 0;
+01385 
+01387 
+01393         virtual void addExternalSceneLoader(ISceneLoader* externalLoader) = 0;
+01394 
+01396         virtual u32 getSceneLoaderCount() const = 0;
+01397 
+01399 
+01402         virtual ISceneLoader* getSceneLoader(u32 index) const = 0;
+01403 
+01405 
+01407         virtual ISceneCollisionManager* getSceneCollisionManager() = 0;
+01408 
+01410 
+01412         virtual IMeshManipulator* getMeshManipulator() = 0;
+01413 
+01415 
+01423         virtual void addToDeletionQueue(ISceneNode* node) = 0;
+01424 
+01426 
+01428         virtual bool postEventFromUser(const SEvent& event) = 0;
+01429 
+01431 
+01432         virtual void clear() = 0;
+01433 
+01435 
+01440         virtual io::IAttributes* getParameters() = 0;
+01441 
+01443 
+01449         virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0;
+01450 
+01452 
+01454         virtual ISceneNodeFactory* getDefaultSceneNodeFactory() = 0;
+01455 
+01457 
+01459         virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0;
+01460 
+01462         virtual u32 getRegisteredSceneNodeFactoryCount() const = 0;
+01463 
+01465 
+01467         virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0;
+01468 
+01470 
+01472         virtual ISceneNodeAnimatorFactory* getDefaultSceneNodeAnimatorFactory() = 0;
+01473 
+01475 
+01477         virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) = 0;
+01478 
+01480         virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0;
+01481 
+01483 
+01485         virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index) = 0;
+01486 
+01488         virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0;
+01489 
+01491         virtual const c8* getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) = 0;
+01492 
+01494 
+01496         virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0;
+01497 
+01499 
+01503         virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0) = 0;
+01504 
+01506 
+01524         virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0;
+01525 
+01527 
+01542         virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
+01543 
+01545 
+01560         virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
+01561 
+01563 
+01580         virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
+01581 
+01583 
+01599         virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
+01600 
+01602 
+01618         virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
+01619 
+01621 
+01623         virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0;
+01624 
+01626 
+01628         virtual ISkinnedMesh* createSkinnedMesh() = 0;
+01629 
+01631         virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;
+01632 
+01634         virtual const video::SColorf& getAmbientLight() const = 0;
+01635 
+01637 
+01639         virtual void setLightManager(ILightManager* lightManager) = 0;
+01640 
+01642 
+01644         virtual const IGeometryCreator* getGeometryCreator(void) const = 0;
+01645 
+01647 
+01655         virtual bool isCulled(const ISceneNode* node) const =0;
+01656     };
+01657 
+01658 
+01659 } // end namespace scene
+01660 } // end namespace irr
+01661 
+01662 #endif
+01663 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h.html new file mode 100644 index 0000000..8e463de --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: ISceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNode.h File Reference
+
+
+
#include "IAttributeExchangingObject.h"
+#include "ESceneNodeTypes.h"
+#include "ECullingTypes.h"
+#include "EDebugSceneTypes.h"
+#include "ISceneNodeAnimator.h"
+#include "ITriangleSelector.h"
+#include "SMaterial.h"
+#include "irrString.h"
+#include "aabbox3d.h"
+#include "matrix4.h"
+#include "irrList.h"
+#include "IAttributes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h_source.html new file mode 100644 index 0000000..99c3d81 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_8h_source.html @@ -0,0 +1,777 @@ + + + + +Irrlicht 3D Engine: ISceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_H_INCLUDED__
+00006 #define __I_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "IAttributeExchangingObject.h"
+00009 #include "ESceneNodeTypes.h"
+00010 #include "ECullingTypes.h"
+00011 #include "EDebugSceneTypes.h"
+00012 #include "ISceneNodeAnimator.h"
+00013 #include "ITriangleSelector.h"
+00014 #include "SMaterial.h"
+00015 #include "irrString.h"
+00016 #include "aabbox3d.h"
+00017 #include "matrix4.h"
+00018 #include "irrList.h"
+00019 #include "IAttributes.h"
+00020 
+00021 namespace irr
+00022 {
+00023 namespace scene
+00024 {
+00025     class ISceneManager;
+00026 
+00028     typedef core::list<ISceneNode*> ISceneNodeList;
+00030     typedef core::list<ISceneNodeAnimator*> ISceneNodeAnimatorList;
+00031 
+00033 
+00040     class ISceneNode : virtual public io::IAttributeExchangingObject
+00041     {
+00042     public:
+00043 
+00045         ISceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1,
+00046                 const core::vector3df& position = core::vector3df(0,0,0),
+00047                 const core::vector3df& rotation = core::vector3df(0,0,0),
+00048                 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
+00049             : RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale),
+00050                 Parent(0), SceneManager(mgr), TriangleSelector(0), ID(id),
+00051                 AutomaticCullingState(EAC_BOX), DebugDataVisible(EDS_OFF),
+00052                 IsVisible(true), IsDebugObject(false)
+00053         {
+00054             if (parent)
+00055                 parent->addChild(this);
+00056 
+00057             updateAbsolutePosition();
+00058         }
+00059 
+00060 
+00062         virtual ~ISceneNode()
+00063         {
+00064             // delete all children
+00065             removeAll();
+00066 
+00067             // delete all animators
+00068             ISceneNodeAnimatorList::Iterator ait = Animators.begin();
+00069             for (; ait != Animators.end(); ++ait)
+00070                 (*ait)->drop();
+00071 
+00072             if (TriangleSelector)
+00073                 TriangleSelector->drop();
+00074         }
+00075 
+00076 
+00078 
+00091         virtual void OnRegisterSceneNode()
+00092         {
+00093             if (IsVisible)
+00094             {
+00095                 ISceneNodeList::Iterator it = Children.begin();
+00096                 for (; it != Children.end(); ++it)
+00097                     (*it)->OnRegisterSceneNode();
+00098             }
+00099         }
+00100 
+00101 
+00103 
+00108         virtual void OnAnimate(u32 timeMs)
+00109         {
+00110             if (IsVisible)
+00111             {
+00112                 // animate this node with all animators
+00113 
+00114                 ISceneNodeAnimatorList::Iterator ait = Animators.begin();
+00115                 while (ait != Animators.end())
+00116                     {
+00117                     // continue to the next node before calling animateNode()
+00118                     // so that the animator may remove itself from the scene
+00119                     // node without the iterator becoming invalid
+00120                     ISceneNodeAnimator* anim = *ait;
+00121                     ++ait;
+00122                     anim->animateNode(this, timeMs);
+00123                 }
+00124 
+00125                 // update absolute position
+00126                 updateAbsolutePosition();
+00127 
+00128                 // perform the post render process on all children
+00129 
+00130                 ISceneNodeList::Iterator it = Children.begin();
+00131                 for (; it != Children.end(); ++it)
+00132                     (*it)->OnAnimate(timeMs);
+00133             }
+00134         }
+00135 
+00136 
+00138         virtual void render() = 0;
+00139 
+00140 
+00142 
+00143         virtual const c8* getName() const
+00144         {
+00145             return Name.c_str();
+00146         }
+00147 
+00148 
+00150 
+00151         virtual void setName(const c8* name)
+00152         {
+00153             Name = name;
+00154         }
+00155 
+00156 
+00158 
+00159         virtual void setName(const core::stringc& name)
+00160         {
+00161             Name = name;
+00162         }
+00163 
+00164 
+00166 
+00173         virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
+00174 
+00175 
+00177 
+00178         virtual const core::aabbox3d<f32> getTransformedBoundingBox() const
+00179         {
+00180             core::aabbox3d<f32> box = getBoundingBox();
+00181             AbsoluteTransformation.transformBoxEx(box);
+00182             return box;
+00183         }
+00184 
+00185 
+00187 
+00193         virtual const core::matrix4& getAbsoluteTransformation() const
+00194         {
+00195             return AbsoluteTransformation;
+00196         }
+00197 
+00198 
+00200 
+00204         virtual core::matrix4 getRelativeTransformation() const
+00205         {
+00206             core::matrix4 mat;
+00207             mat.setRotationDegrees(RelativeRotation);
+00208             mat.setTranslation(RelativeTranslation);
+00209 
+00210             if (RelativeScale != core::vector3df(1.f,1.f,1.f))
+00211             {
+00212                 core::matrix4 smat;
+00213                 smat.setScale(RelativeScale);
+00214                 mat *= smat;
+00215             }
+00216 
+00217             return mat;
+00218         }
+00219 
+00220 
+00222 
+00226         virtual bool isVisible() const
+00227         {
+00228             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00229             return IsVisible;
+00230         }
+00231 
+00233 
+00235         virtual bool isTrulyVisible() const
+00236         {
+00237             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00238             if(!IsVisible)
+00239                 return false;
+00240 
+00241             if(!Parent)
+00242                 return true;
+00243 
+00244             return Parent->isTrulyVisible();
+00245         }
+00246 
+00248 
+00252         virtual void setVisible(bool isVisible)
+00253         {
+00254             IsVisible = isVisible;
+00255         }
+00256 
+00257 
+00259 
+00261         virtual s32 getID() const
+00262         {
+00263             return ID;
+00264         }
+00265 
+00266 
+00268 
+00270         virtual void setID(s32 id)
+00271         {
+00272             ID = id;
+00273         }
+00274 
+00275 
+00277 
+00280         virtual void addChild(ISceneNode* child)
+00281         {
+00282             if (child && (child != this))
+00283             {
+00284                 // Change scene manager?
+00285                 if (SceneManager != child->SceneManager)
+00286                     child->setSceneManager(SceneManager);
+00287 
+00288                 child->grab();
+00289                 child->remove(); // remove from old parent
+00290                 Children.push_back(child);
+00291                 child->Parent = this;
+00292             }
+00293         }
+00294 
+00295 
+00297 
+00302         virtual bool removeChild(ISceneNode* child)
+00303         {
+00304             ISceneNodeList::Iterator it = Children.begin();
+00305             for (; it != Children.end(); ++it)
+00306                 if ((*it) == child)
+00307                 {
+00308                     (*it)->Parent = 0;
+00309                     (*it)->drop();
+00310                     Children.erase(it);
+00311                     return true;
+00312                 }
+00313 
+00314             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00315             return false;
+00316         }
+00317 
+00318 
+00320 
+00323         virtual void removeAll()
+00324         {
+00325             ISceneNodeList::Iterator it = Children.begin();
+00326             for (; it != Children.end(); ++it)
+00327             {
+00328                 (*it)->Parent = 0;
+00329                 (*it)->drop();
+00330             }
+00331 
+00332             Children.clear();
+00333         }
+00334 
+00335 
+00337 
+00339         virtual void remove()
+00340         {
+00341             if (Parent)
+00342                 Parent->removeChild(this);
+00343         }
+00344 
+00345 
+00347 
+00348         virtual void addAnimator(ISceneNodeAnimator* animator)
+00349         {
+00350             if (animator)
+00351             {
+00352                 Animators.push_back(animator);
+00353                 animator->grab();
+00354             }
+00355         }
+00356 
+00357 
+00359 
+00360         const core::list<ISceneNodeAnimator*>& getAnimators() const
+00361         {
+00362             return Animators;
+00363         }
+00364 
+00365 
+00367 
+00370         virtual void removeAnimator(ISceneNodeAnimator* animator)
+00371         {
+00372             ISceneNodeAnimatorList::Iterator it = Animators.begin();
+00373             for (; it != Animators.end(); ++it)
+00374             {
+00375                 if ((*it) == animator)
+00376                 {
+00377                     (*it)->drop();
+00378                     Animators.erase(it);
+00379                     return;
+00380                 }
+00381             }
+00382         }
+00383 
+00384 
+00386 
+00388         virtual void removeAnimators()
+00389         {
+00390             ISceneNodeAnimatorList::Iterator it = Animators.begin();
+00391             for (; it != Animators.end(); ++it)
+00392                 (*it)->drop();
+00393 
+00394             Animators.clear();
+00395         }
+00396 
+00397 
+00399 
+00406         virtual video::SMaterial& getMaterial(u32 num)
+00407         {
+00408             return video::IdentityMaterial;
+00409         }
+00410 
+00411 
+00413 
+00414         virtual u32 getMaterialCount() const
+00415         {
+00416             return 0;
+00417         }
+00418 
+00419 
+00421 
+00425         void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
+00426         {
+00427             for (u32 i=0; i<getMaterialCount(); ++i)
+00428                 getMaterial(i).setFlag(flag, newvalue);
+00429         }
+00430 
+00431 
+00433 
+00436         void setMaterialTexture(u32 textureLayer, video::ITexture* texture)
+00437         {
+00438             if (textureLayer >= video::MATERIAL_MAX_TEXTURES)
+00439                 return;
+00440 
+00441             for (u32 i=0; i<getMaterialCount(); ++i)
+00442                 getMaterial(i).setTexture(textureLayer, texture);
+00443         }
+00444 
+00445 
+00447 
+00448         void setMaterialType(video::E_MATERIAL_TYPE newType)
+00449         {
+00450             for (u32 i=0; i<getMaterialCount(); ++i)
+00451                 getMaterial(i).MaterialType = newType;
+00452         }
+00453 
+00454 
+00456 
+00460         virtual const core::vector3df& getScale() const
+00461         {
+00462             return RelativeScale;
+00463         }
+00464 
+00465 
+00467 
+00468         virtual void setScale(const core::vector3df& scale)
+00469         {
+00470             RelativeScale = scale;
+00471         }
+00472 
+00473 
+00475 
+00479         virtual const core::vector3df& getRotation() const
+00480         {
+00481             return RelativeRotation;
+00482         }
+00483 
+00484 
+00486 
+00488         virtual void setRotation(const core::vector3df& rotation)
+00489         {
+00490             RelativeRotation = rotation;
+00491         }
+00492 
+00493 
+00495 
+00498         virtual const core::vector3df& getPosition() const
+00499         {
+00500             return RelativeTranslation;
+00501         }
+00502 
+00503 
+00505 
+00507         virtual void setPosition(const core::vector3df& newpos)
+00508         {
+00509             RelativeTranslation = newpos;
+00510         }
+00511 
+00512 
+00514 
+00522         virtual core::vector3df getAbsolutePosition() const
+00523         {
+00524             return AbsoluteTransformation.getTranslation();
+00525         }
+00526 
+00527 
+00529 
+00534         void setAutomaticCulling( u32 state)
+00535         {
+00536             AutomaticCullingState = state;
+00537         }
+00538 
+00539 
+00541 
+00542         u32 getAutomaticCulling() const
+00543         {
+00544             return AutomaticCullingState;
+00545         }
+00546 
+00547 
+00549 
+00552         virtual void setDebugDataVisible(u32 state)
+00553         {
+00554             DebugDataVisible = state;
+00555         }
+00556 
+00558 
+00560         u32 isDebugDataVisible() const
+00561         {
+00562             return DebugDataVisible;
+00563         }
+00564 
+00565 
+00567 
+00569         void setIsDebugObject(bool debugObject)
+00570         {
+00571             IsDebugObject = debugObject;
+00572         }
+00573 
+00574 
+00576 
+00579         bool isDebugObject() const
+00580         {
+00581             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00582             return IsDebugObject;
+00583         }
+00584 
+00585 
+00587 
+00588         const core::list<ISceneNode*>& getChildren() const
+00589         {
+00590             return Children;
+00591         }
+00592 
+00593 
+00595 
+00596         virtual void setParent(ISceneNode* newParent)
+00597         {
+00598             grab();
+00599             remove();
+00600 
+00601             Parent = newParent;
+00602 
+00603             if (Parent)
+00604                 Parent->addChild(this);
+00605 
+00606             drop();
+00607         }
+00608 
+00609 
+00611 
+00620         virtual ITriangleSelector* getTriangleSelector() const
+00621         {
+00622             return TriangleSelector;
+00623         }
+00624 
+00625 
+00627 
+00635         virtual void setTriangleSelector(ITriangleSelector* selector)
+00636         {
+00637             if (TriangleSelector != selector)
+00638             {
+00639                 if (TriangleSelector)
+00640                     TriangleSelector->drop();
+00641 
+00642                 TriangleSelector = selector;
+00643                 if (TriangleSelector)
+00644                     TriangleSelector->grab();
+00645             }
+00646         }
+00647 
+00648 
+00650 
+00652         virtual void updateAbsolutePosition()
+00653         {
+00654             if (Parent)
+00655             {
+00656                 AbsoluteTransformation =
+00657                     Parent->getAbsoluteTransformation() * getRelativeTransformation();
+00658             }
+00659             else
+00660                 AbsoluteTransformation = getRelativeTransformation();
+00661         }
+00662 
+00663 
+00665 
+00666         scene::ISceneNode* getParent() const
+00667         {
+00668             return Parent;
+00669         }
+00670 
+00671 
+00673 
+00674         virtual ESCENE_NODE_TYPE getType() const
+00675         {
+00676             return ESNT_UNKNOWN;
+00677         }
+00678 
+00679 
+00681 
+00687         virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
+00688         {
+00689             if (!out)
+00690                 return;
+00691             out->addString  ("Name", Name.c_str());
+00692             out->addInt ("Id", ID );
+00693 
+00694             out->addVector3d("Position", getPosition() );
+00695             out->addVector3d("Rotation", getRotation() );
+00696             out->addVector3d("Scale", getScale() );
+00697 
+00698             out->addBool    ("Visible", IsVisible );
+00699             out->addInt ("AutomaticCulling", AutomaticCullingState);
+00700             out->addInt ("DebugDataVisible", DebugDataVisible );
+00701             out->addBool    ("IsDebugObject", IsDebugObject );
+00702         }
+00703 
+00704 
+00706 
+00712         virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
+00713         {
+00714             if (!in)
+00715                 return;
+00716             Name = in->getAttributeAsString("Name");
+00717             ID = in->getAttributeAsInt("Id");
+00718 
+00719             setPosition(in->getAttributeAsVector3d("Position"));
+00720             setRotation(in->getAttributeAsVector3d("Rotation"));
+00721             setScale(in->getAttributeAsVector3d("Scale"));
+00722 
+00723             IsVisible = in->getAttributeAsBool("Visible");
+00724             s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",
+00725                     scene::AutomaticCullingNames);
+00726             if (tmpState != -1)
+00727                 AutomaticCullingState = (u32)tmpState;
+00728             else
+00729                 AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");
+00730 
+00731             DebugDataVisible = in->getAttributeAsInt("DebugDataVisible");
+00732             IsDebugObject = in->getAttributeAsBool("IsDebugObject");
+00733 
+00734             updateAbsolutePosition();
+00735         }
+00736 
+00738 
+00741         virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0)
+00742         {
+00743             return 0; // to be implemented by derived classes
+00744         }
+00745 
+00747 
+00748         virtual ISceneManager* getSceneManager(void) const { return SceneManager; }
+00749 
+00750     protected:
+00751 
+00753 
+00757         void cloneMembers(ISceneNode* toCopyFrom, ISceneManager* newManager)
+00758         {
+00759             Name = toCopyFrom->Name;
+00760             AbsoluteTransformation = toCopyFrom->AbsoluteTransformation;
+00761             RelativeTranslation = toCopyFrom->RelativeTranslation;
+00762             RelativeRotation = toCopyFrom->RelativeRotation;
+00763             RelativeScale = toCopyFrom->RelativeScale;
+00764             ID = toCopyFrom->ID;
+00765             setTriangleSelector(toCopyFrom->TriangleSelector);
+00766             AutomaticCullingState = toCopyFrom->AutomaticCullingState;
+00767             DebugDataVisible = toCopyFrom->DebugDataVisible;
+00768             IsVisible = toCopyFrom->IsVisible;
+00769             IsDebugObject = toCopyFrom->IsDebugObject;
+00770 
+00771             if (newManager)
+00772                 SceneManager = newManager;
+00773             else
+00774                 SceneManager = toCopyFrom->SceneManager;
+00775 
+00776             // clone children
+00777 
+00778             ISceneNodeList::Iterator it = toCopyFrom->Children.begin();
+00779             for (; it != toCopyFrom->Children.end(); ++it)
+00780                 (*it)->clone(this, newManager);
+00781 
+00782             // clone animators
+00783 
+00784             ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin();
+00785             for (; ait != toCopyFrom->Animators.end(); ++ait)
+00786             {
+00787                 ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager);
+00788                 if (anim)
+00789                 {
+00790                     addAnimator(anim);
+00791                     anim->drop();
+00792                 }
+00793             }
+00794         }
+00795 
+00798         void setSceneManager(ISceneManager* newManager)
+00799         {
+00800             SceneManager = newManager;
+00801 
+00802             ISceneNodeList::Iterator it = Children.begin();
+00803             for (; it != Children.end(); ++it)
+00804                 (*it)->setSceneManager(newManager);
+00805         }
+00806 
+00808         core::stringc Name;
+00809 
+00811         core::matrix4 AbsoluteTransformation;
+00812 
+00814         core::vector3df RelativeTranslation;
+00815 
+00817         core::vector3df RelativeRotation;
+00818 
+00820         core::vector3df RelativeScale;
+00821 
+00823         ISceneNode* Parent;
+00824 
+00826         core::list<ISceneNode*> Children;
+00827 
+00829         core::list<ISceneNodeAnimator*> Animators;
+00830 
+00832         ISceneManager* SceneManager;
+00833 
+00835         ITriangleSelector* TriangleSelector;
+00836 
+00838         s32 ID;
+00839 
+00841         u32 AutomaticCullingState;
+00842 
+00844         u32 DebugDataVisible;
+00845 
+00847         bool IsVisible;
+00848 
+00850         bool IsDebugObject;
+00851     };
+00852 
+00853 
+00854 } // end namespace scene
+00855 } // end namespace irr
+00856 
+00857 #endif
+00858 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h.html new file mode 100644 index 0000000..0b0178e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimator.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNodeAnimator.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h_source.html new file mode 100644 index 0000000..5e736b5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_8h_source.html @@ -0,0 +1,184 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimator.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNodeAnimator.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_ANIMATOR_H_INCLUDED__
+00006 #define __I_SCENE_NODE_ANIMATOR_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "vector3d.h"
+00010 #include "ESceneNodeAnimatorTypes.h"
+00011 #include "IAttributeExchangingObject.h"
+00012 #include "IEventReceiver.h"
+00013 
+00014 namespace irr
+00015 {
+00016 namespace io
+00017 {
+00018     class IAttributes;
+00019 } // end namespace io
+00020 namespace scene
+00021 {
+00022     class ISceneNode;
+00023     class ISceneManager;
+00024 
+00026 
+00030     class ISceneNodeAnimator : public io::IAttributeExchangingObject, public IEventReceiver
+00031     {
+00032     public:
+00034 
+00036         virtual void animateNode(ISceneNode* node, u32 timeMs) =0;
+00037 
+00039 
+00041         virtual ISceneNodeAnimator* createClone(ISceneNode* node,
+00042                 ISceneManager* newManager=0) =0;
+00043 
+00045 
+00047         virtual bool isEventReceiverEnabled() const
+00048         {
+00049             return false;
+00050         }
+00051 
+00053         virtual bool OnEvent(const SEvent& event)
+00054         {
+00055             return false;
+00056         }
+00057 
+00059         virtual ESCENE_NODE_ANIMATOR_TYPE getType() const
+00060         {
+00061             return ESNAT_UNKNOWN;
+00062         }
+00063 
+00065 
+00067         virtual bool hasFinished(void) const
+00068         {
+00069             return false;
+00070         }
+00071     };
+00072 
+00073 
+00074 } // end namespace scene
+00075 } // end namespace irr
+00076 
+00077 #endif
+00078 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h.html new file mode 100644 index 0000000..e8804de --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorCameraFPS.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNodeAnimatorCameraFPS.h File Reference
+
+
+
#include "ISceneNodeAnimator.h"
+#include "IEventReceiver.h"
+#include "irrArray.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h_source.html new file mode 100644 index 0000000..5c96912 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_f_p_s_8h_source.html @@ -0,0 +1,170 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorCameraFPS.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNodeAnimatorCameraFPS.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
+00006 #define __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
+00007 
+00008 #include "ISceneNodeAnimator.h"
+00009 #include "IEventReceiver.h"
+00010 #include "irrArray.h"
+00011 
+00012 namespace irr
+00013 {
+00014     struct SKeyMap;
+00015 
+00016 namespace scene
+00017 {
+00018 
+00020 
+00023     class ISceneNodeAnimatorCameraFPS : public ISceneNodeAnimator
+00024     {
+00025     public:
+00026 
+00028         virtual f32 getMoveSpeed() const = 0;
+00029 
+00031         virtual void setMoveSpeed(f32 moveSpeed) = 0;
+00032 
+00034 
+00037         virtual f32 getRotateSpeed() const = 0;
+00038 
+00040         virtual void setRotateSpeed(f32 rotateSpeed) = 0;
+00041 
+00043 
+00045         virtual void setKeyMap(SKeyMap *map, u32 count) = 0;
+00046 
+00049         virtual void setKeyMap(const core::array<SKeyMap>& keymap) = 0;
+00050 
+00052         virtual const core::array<SKeyMap>& getKeyMap() const = 0;
+00053 
+00055 
+00058         virtual void setVerticalMovement(bool allow) = 0;
+00059 
+00061 
+00063         virtual void setInvertMouse(bool invert) = 0;
+00064     };
+00065 } // end namespace scene
+00066 } // end namespace irr
+00067 
+00068 #endif
+00069 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h.html new file mode 100644 index 0000000..5508cb3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorCameraMaya.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNodeAnimatorCameraMaya.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h_source.html new file mode 100644 index 0000000..673d0af --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_camera_maya_8h_source.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorCameraMaya.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNodeAnimatorCameraMaya.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__
+00006 #define __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__
+00007 
+00008 #include "ISceneNodeAnimator.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00013 namespace scene
+00014 {
+00015 
+00017 
+00025     class ISceneNodeAnimatorCameraMaya : public ISceneNodeAnimator
+00026     {
+00027     public:
+00028 
+00030         virtual f32 getMoveSpeed() const = 0;
+00031 
+00033         virtual void setMoveSpeed(f32 moveSpeed) = 0;
+00034 
+00036         virtual f32 getRotateSpeed() const = 0;
+00037 
+00039         virtual void setRotateSpeed(f32 rotateSpeed) = 0;
+00040 
+00042         virtual f32 getZoomSpeed() const = 0;
+00043 
+00045         virtual void setZoomSpeed(f32 zoomSpeed) = 0;
+00046 
+00048         virtual f32 getDistance() const = 0;
+00049 
+00051         virtual void setDistance(f32 distance) = 0;
+00052     };
+00053 
+00054 } // end namespace scene
+00055 } // end namespace irr
+00056 
+00057 #endif
+00058 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h.html new file mode 100644 index 0000000..0d535ca --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorCollisionResponse.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNodeAnimatorCollisionResponse.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h_source.html new file mode 100644 index 0000000..cde3cac --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_collision_response_8h_source.html @@ -0,0 +1,211 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorCollisionResponse.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNodeAnimatorCollisionResponse.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__
+00006 #define __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00015     class ISceneNodeAnimatorCollisionResponse;
+00016 
+00018 
+00022     class ICollisionCallback : public virtual IReferenceCounted
+00023     {
+00024     public:
+00025 
+00027 
+00036         virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) = 0;
+00037     };
+00038 
+00040 
+00053     class ISceneNodeAnimatorCollisionResponse : public ISceneNodeAnimator
+00054     {
+00055     public:
+00056 
+00058         virtual ~ISceneNodeAnimatorCollisionResponse() {}
+00059 
+00061 
+00066         virtual bool isFalling() const = 0;
+00067 
+00069 
+00077         virtual void setEllipsoidRadius(const core::vector3df& radius) = 0;
+00078 
+00080 
+00081         virtual core::vector3df getEllipsoidRadius() const = 0;
+00082 
+00084 
+00089         virtual void setGravity(const core::vector3df& gravity) = 0;
+00090 
+00093         virtual core::vector3df getGravity() const = 0;
+00094 
+00096 
+00098         virtual void jump(f32 jumpSpeed) = 0;
+00099 
+00101         virtual void setAnimateTarget ( bool enable ) = 0;
+00102         virtual bool getAnimateTarget () const = 0;
+00103 
+00105 
+00111         virtual void setEllipsoidTranslation(const core::vector3df &translation) = 0;
+00112 
+00114 
+00119         virtual core::vector3df getEllipsoidTranslation() const = 0;
+00120 
+00122 
+00124         virtual void setWorld(ITriangleSelector* newWorld) = 0;
+00125 
+00127         virtual ITriangleSelector* getWorld() const = 0;
+00128 
+00130 
+00133         virtual void setTargetNode(ISceneNode * node) = 0;
+00134 
+00136 
+00137         virtual ISceneNode* getTargetNode(void) const = 0;
+00138 
+00140         virtual bool collisionOccurred() const = 0;
+00141 
+00143         virtual const core::vector3df & getCollisionPoint() const = 0;
+00144 
+00146         virtual const core::triangle3df & getCollisionTriangle() const = 0;
+00147 
+00149 
+00153         virtual const core::vector3df & getCollisionResultPosition(void) const = 0;
+00154 
+00156         virtual ISceneNode* getCollisionNode(void) const = 0;
+00157 
+00159 
+00162         virtual void setCollisionCallback(ICollisionCallback* callback) = 0;
+00163 
+00164     };
+00165 
+00166 
+00167 } // end namespace scene
+00168 } // end namespace irr
+00169 
+00170 #endif
+00171 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h.html new file mode 100644 index 0000000..468bb0a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorFactory.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNodeAnimatorFactory.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h_source.html new file mode 100644 index 0000000..1ebdee3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_animator_factory_8h_source.html @@ -0,0 +1,166 @@ + + + + +Irrlicht 3D Engine: ISceneNodeAnimatorFactory.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNodeAnimatorFactory.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__
+00006 #define __I_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "ESceneNodeAnimatorTypes.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015     class ISceneNode;
+00016     class ISceneNodeAnimator;
+00017 
+00019 
+00027     class ISceneNodeAnimatorFactory : public virtual IReferenceCounted
+00028     {
+00029     public:
+00030 
+00032 
+00036         virtual ISceneNodeAnimator* createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target) = 0;
+00037 
+00039 
+00043         virtual ISceneNodeAnimator* createSceneNodeAnimator(const c8* typeName, ISceneNode* target) = 0;
+00044 
+00046         virtual u32 getCreatableSceneNodeAnimatorTypeCount() const = 0;
+00047 
+00049 
+00051         virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType(u32 idx) const = 0;
+00052 
+00054 
+00056         virtual const c8* getCreateableSceneNodeAnimatorTypeName(u32 idx) const = 0;
+00057 
+00059 
+00061         virtual const c8* getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const = 0;
+00062     };
+00063 
+00064 
+00065 } // end namespace scene
+00066 } // end namespace irr
+00067 
+00068 #endif
+00069 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h.html new file mode 100644 index 0000000..2158fc7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: ISceneNodeFactory.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneNodeFactory.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "ESceneNodeTypes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h_source.html new file mode 100644 index 0000000..c9d9eee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_node_factory_8h_source.html @@ -0,0 +1,165 @@ + + + + +Irrlicht 3D Engine: ISceneNodeFactory.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneNodeFactory.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_NODE_FACTORY_H_INCLUDED__
+00006 #define __I_SCENE_NODE_FACTORY_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "ESceneNodeTypes.h"
+00010 
+00011 namespace irr
+00012 {
+00013 
+00014 namespace scene
+00015 {
+00016     class ISceneNode;
+00017 
+00019 
+00027     class ISceneNodeFactory : public virtual IReferenceCounted
+00028     {
+00029     public:
+00031 
+00035         virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0) = 0;
+00036 
+00038 
+00042         virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0) = 0;
+00043 
+00045         virtual u32 getCreatableSceneNodeTypeCount() const = 0;
+00046 
+00048 
+00050         virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0;
+00051 
+00053 
+00055         virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0;
+00056 
+00058 
+00060         virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0;
+00061     };
+00062 
+00063 
+00064 } // end namespace scene
+00065 } // end namespace irr
+00066 
+00067 #endif
+00068 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h.html new file mode 100644 index 0000000..db93306 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: ISceneUserDataSerializer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISceneUserDataSerializer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h_source.html new file mode 100644 index 0000000..431e165 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_scene_user_data_serializer_8h_source.html @@ -0,0 +1,160 @@ + + + + +Irrlicht 3D Engine: ISceneUserDataSerializer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISceneUserDataSerializer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__
+00006 #define __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace io
+00013 {
+00014     class IAttributes;
+00015 } // end namespace io
+00016 namespace scene
+00017 {
+00018     class ISceneNode;
+00019 
+00021 
+00024 class ISceneUserDataSerializer
+00025 {
+00026 public:
+00027 
+00028     virtual ~ISceneUserDataSerializer() {}
+00029 
+00031     virtual void OnCreateNode(ISceneNode* node) = 0;
+00032     
+00034 
+00036     virtual void OnReadUserData(ISceneNode* forSceneNode, io::IAttributes* userData) = 0;
+00037 
+00039 
+00044     virtual io::IAttributes* createUserData(ISceneNode* forSceneNode) = 0;
+00045 };
+00046 
+00047 } // end namespace scene
+00048 } // end namespace irr
+00049 
+00050 #endif
+00051 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h.html new file mode 100644 index 0000000..4b2d5fa --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IShaderConstantSetCallBack.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IShaderConstantSetCallBack.h File Reference
+
+
+
#include "IReferenceCounted.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h_source.html new file mode 100644 index 0000000..73a023d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_shader_constant_set_call_back_8h_source.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: IShaderConstantSetCallBack.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IShaderConstantSetCallBack.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SHADER_CONSTANT_SET_CALLBACT_H_INCLUDED__
+00006 #define __I_SHADER_CONSTANT_SET_CALLBACT_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace video
+00013 {
+00014     class IMaterialRendererServices;
+00015     class SMaterial;
+00016 
+00018 
+00021 class IShaderConstantSetCallBack : public virtual IReferenceCounted
+00022 {
+00023 public:
+00024 
+00026 
+00044     virtual void OnSetMaterial(const SMaterial& material) { }
+00045 
+00047 
+00077     virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData) = 0;
+00078 };
+00079 
+00080 
+00081 } // end namespace video
+00082 } // end namespace irr
+00083 
+00084 #endif
+00085 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h.html new file mode 100644 index 0000000..7c3bd2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IShadowVolumeSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IShadowVolumeSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h_source.html new file mode 100644 index 0000000..54c54d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_shadow_volume_scene_node_8h_source.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: IShadowVolumeSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IShadowVolumeSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__
+00006 #define __I_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014     class IMesh;
+00015 
+00017     class IShadowVolumeSceneNode : public ISceneNode
+00018     {
+00019     public:
+00020 
+00022         IShadowVolumeSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
+00023             : ISceneNode(parent, mgr, id) {}
+00024 
+00026 
+00028         virtual void setShadowMesh(const IMesh* mesh) = 0;
+00029 
+00031         virtual void updateShadowVolumes() = 0;
+00032     };
+00033 
+00034 } // end namespace scene
+00035 } // end namespace irr
+00036 
+00037 #endif
+00038 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h.html new file mode 100644 index 0000000..ed8b5e6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: ISkinnedMesh.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ISkinnedMesh.h File Reference
+
+
+
#include "irrArray.h"
+#include "IBoneSceneNode.h"
+#include "IAnimatedMesh.h"
+#include "SSkinMeshBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h_source.html new file mode 100644 index 0000000..3825eb8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_skinned_mesh_8h_source.html @@ -0,0 +1,288 @@ + + + + +Irrlicht 3D Engine: ISkinnedMesh.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ISkinnedMesh.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SKINNED_MESH_H_INCLUDED__
+00006 #define __I_SKINNED_MESH_H_INCLUDED__
+00007 
+00008 #include "irrArray.h"
+00009 #include "IBoneSceneNode.h"
+00010 #include "IAnimatedMesh.h"
+00011 #include "SSkinMeshBuffer.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace scene
+00016 {
+00017 
+00018     enum E_INTERPOLATION_MODE
+00019     {
+00020         // constant does use the current key-values without interpolation
+00021         EIM_CONSTANT = 0,
+00022 
+00023         // linear interpolation
+00024         EIM_LINEAR,
+00025 
+00027         EIM_COUNT
+00028     };
+00029 
+00030 
+00032     class ISkinnedMesh : public IAnimatedMesh
+00033     {
+00034     public:
+00035 
+00037 
+00038         virtual u32 getJointCount() const = 0;
+00039 
+00041 
+00044         virtual const c8* getJointName(u32 number) const = 0;
+00045 
+00047 
+00049         virtual s32 getJointNumber(const c8* name) const = 0;
+00050 
+00052 
+00057         virtual bool useAnimationFrom(const ISkinnedMesh *mesh) = 0;
+00058 
+00060 
+00063         virtual void updateNormalsWhenAnimating(bool on) = 0;
+00064 
+00066         virtual void setInterpolationMode(E_INTERPOLATION_MODE mode) = 0;
+00067 
+00069         virtual void animateMesh(f32 frame, f32 blend)=0;
+00070 
+00072         virtual void skinMesh() = 0;
+00073 
+00075 
+00076         virtual void convertMeshToTangents() = 0;
+00077 
+00079         /* This feature is not implementated in Irrlicht yet */
+00080         virtual bool setHardwareSkinning(bool on) = 0;
+00081 
+00083         struct SWeight
+00084         {
+00086             u16 buffer_id; //I doubt 32bits is needed
+00087 
+00089             u32 vertex_id; //Store global ID here
+00090 
+00092             f32 strength;
+00093 
+00094         private:
+00096             friend class CSkinnedMesh;
+00097             bool *Moved;
+00098             core::vector3df StaticPos;
+00099             core::vector3df StaticNormal;
+00100         };
+00101 
+00102 
+00104         struct SPositionKey
+00105         {
+00106             f32 frame;
+00107             core::vector3df position;
+00108         };
+00109 
+00111         struct SScaleKey
+00112         {
+00113             f32 frame;
+00114             core::vector3df scale;
+00115         };
+00116 
+00118         struct SRotationKey
+00119         {
+00120             f32 frame;
+00121             core::quaternion rotation;
+00122         };
+00123 
+00125         struct SJoint
+00126         {
+00127             SJoint() : UseAnimationFrom(0), GlobalSkinningSpace(false),
+00128                 positionHint(-1),scaleHint(-1),rotationHint(-1)
+00129             {
+00130             }
+00131 
+00133             core::stringc Name;
+00134 
+00136             core::matrix4 LocalMatrix;
+00137 
+00139             core::array<SJoint*> Children;
+00140 
+00142             core::array<u32> AttachedMeshes;
+00143 
+00145             core::array<SPositionKey> PositionKeys;
+00146 
+00148             core::array<SScaleKey> ScaleKeys;
+00149 
+00151             core::array<SRotationKey> RotationKeys;
+00152 
+00154             core::array<SWeight> Weights;
+00155 
+00157             core::matrix4 GlobalMatrix;
+00158             core::matrix4 GlobalAnimatedMatrix;
+00159             core::matrix4 LocalAnimatedMatrix;
+00160             core::vector3df Animatedposition;
+00161             core::vector3df Animatedscale;
+00162             core::quaternion Animatedrotation;
+00163 
+00164             core::matrix4 GlobalInversedMatrix; //the x format pre-calculates this
+00165 
+00166         private:
+00168             friend class CSkinnedMesh;
+00169 
+00170             SJoint *UseAnimationFrom;
+00171             bool GlobalSkinningSpace;
+00172 
+00173             s32 positionHint;
+00174             s32 scaleHint;
+00175             s32 rotationHint;
+00176         };
+00177 
+00178 
+00179         //Interface for the mesh loaders (finalize should lock these functions, and they should have some prefix like loader_
+00180 
+00181         //these functions will use the needed arrays, set values, etc to help the loaders
+00182 
+00184         virtual core::array<SSkinMeshBuffer*>& getMeshBuffers() = 0;
+00185 
+00187         virtual core::array<SJoint*>& getAllJoints() = 0;
+00188 
+00190         virtual const core::array<SJoint*>& getAllJoints() const = 0;
+00191 
+00193         virtual void finalize() = 0;
+00194 
+00196         virtual SSkinMeshBuffer* addMeshBuffer() = 0;
+00197 
+00199         virtual SJoint* addJoint(SJoint *parent=0) = 0;
+00200 
+00202         virtual SWeight* addWeight(SJoint *joint) = 0;
+00203 
+00205         virtual SPositionKey* addPositionKey(SJoint *joint) = 0;
+00207         virtual SScaleKey* addScaleKey(SJoint *joint) = 0;
+00209         virtual SRotationKey* addRotationKey(SJoint *joint) = 0;
+00210 
+00212         virtual bool isStatic()=0;
+00213     };
+00214 
+00215 } // end namespace scene
+00216 } // end namespace irr
+00217 
+00218 #endif
+00219 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h.html new file mode 100644 index 0000000..d34e67c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h.html @@ -0,0 +1,144 @@ + + + + +Irrlicht 3D Engine: ITerrainSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ITerrainSceneNode.h File Reference
+
+
+
#include "ETerrainElements.h"
+#include "ISceneNode.h"
+#include "IDynamicMeshBuffer.h"
+#include "irrArray.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h_source.html new file mode 100644 index 0000000..5ccbafe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_terrain_scene_node_8h_source.html @@ -0,0 +1,223 @@ + + + + +Irrlicht 3D Engine: ITerrainSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ITerrainSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 // The code for the TerrainSceneNode is based on the terrain renderer by
+00006 // Soconne and the GeoMipMapSceneNode developed by Spintz. They made their
+00007 // code available for Irrlicht and allowed it to be distributed under this
+00008 // licence. I only modified some parts. A lot of thanks go to them.
+00009 
+00010 #ifndef __I_TERRAIN_SCENE_NODE_H__
+00011 #define __I_TERRAIN_SCENE_NODE_H__
+00012 
+00013 #include "ETerrainElements.h"
+00014 #include "ISceneNode.h"
+00015 #include "IDynamicMeshBuffer.h"
+00016 #include "irrArray.h"
+00017 
+00018 namespace irr
+00019 {
+00020 namespace io
+00021 {
+00022     class IReadFile;
+00023 } // end namespace io
+00024 namespace scene
+00025 {
+00026     class IMesh;
+00027 
+00029 
+00049     class ITerrainSceneNode : public ISceneNode
+00050     {
+00051     public:
+00053         ITerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00054             const core::vector3df& position = core::vector3df(0.0f, 0.0f, 0.0f),
+00055             const core::vector3df& rotation = core::vector3df(0.0f, 0.0f, 0.0f),
+00056             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f) )
+00057             : ISceneNode (parent, mgr, id, position, rotation, scale) {}
+00058 
+00060 
+00061         virtual const core::aabbox3d<f32>& getBoundingBox() const =0;
+00062 
+00064 
+00065         virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const =0;
+00066 
+00068 
+00069         virtual u32 getIndexCount() const =0;
+00070 
+00072 
+00073         virtual IMesh* getMesh() =0;
+00074 
+00076         virtual IMeshBuffer* getRenderBuffer() =0;
+00077 
+00078 
+00080 
+00082         virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const =0;
+00083 
+00085 
+00093         virtual s32 getIndicesForPatch(core::array<u32>& indices,
+00094             s32 patchX, s32 patchZ, s32 LOD=0) =0;
+00095 
+00097 
+00100         virtual s32 getCurrentLODOfPatches(core::array<s32>& LODs) const =0;
+00101 
+00103 
+00106         virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0) =0;
+00107 
+00109         virtual const core::vector3df& getTerrainCenter() const =0;
+00110 
+00112         virtual f32 getHeight(f32 x, f32 y) const =0;
+00113 
+00115 
+00117         virtual void setCameraMovementDelta(f32 delta) =0;
+00118 
+00120 
+00122         virtual void setCameraRotationDelta(f32 delta) =0;
+00123 
+00125 
+00126         virtual void setDynamicSelectorUpdate(bool bVal) =0;
+00127 
+00129 
+00135         virtual bool overrideLODDistance(s32 LOD, f64 newDistance) =0;
+00136 
+00138 
+00147         virtual void scaleTexture(f32 scale = 1.0f, f32 scale2=0.0f) =0;
+00148 
+00150 
+00155         virtual bool loadHeightMap(io::IReadFile* file, 
+00156             video::SColor vertexColor=video::SColor(255,255,255,255),
+00157             s32 smoothFactor=0) =0;
+00158 
+00160 
+00170         virtual bool loadHeightMapRAW(io::IReadFile* file, s32 bitsPerPixel=16,
+00171             bool signedData=false, bool floatVals=false, s32 width=0,
+00172             video::SColor vertexColor=video::SColor(255,255,255,255),
+00173             s32 smoothFactor=0) =0;
+00174 
+00175     };
+00176 
+00177 } // end namespace scene
+00178 } // end namespace irr
+00179 
+00180 
+00181 #endif // __I_TERRAIN_SCENE_NODE_H__
+00182 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h.html new file mode 100644 index 0000000..5db12c3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: ITextSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ITextSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h_source.html new file mode 100644 index 0000000..02cd578 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_text_scene_node_8h_source.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: ITextSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ITextSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_TEXT_SCENE_NODE_H_INCLUDED__
+00006 #define __I_TEXT_SCENE_NODE_H_INCLUDED__
+00007 
+00008 #include "ISceneNode.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace scene
+00013 {
+00014 
+00016 class ITextSceneNode : public ISceneNode
+00017 {
+00018 public:
+00019 
+00021     ITextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00022         const core::vector3df& position = core::vector3df(0,0,0))
+00023             : ISceneNode(parent, mgr, id, position) {}
+00024 
+00026     virtual void setText(const wchar_t* text) = 0;
+00027 
+00029     virtual void setTextColor(video::SColor color) = 0;
+00030 };
+00031 
+00032 } // end namespace scene
+00033 } // end namespace irr
+00034 
+00035 
+00036 #endif
+00037 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_texture_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_texture_8h.html new file mode 100644 index 0000000..c20bf2c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_texture_8h.html @@ -0,0 +1,165 @@ + + + + +Irrlicht 3D Engine: ITexture.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ITexture.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "IImage.h"
+#include "dimension2d.h"
+#include "EDriverTypes.h"
+#include "path.h"
+#include "matrix4.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_texture_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_texture_8h_source.html new file mode 100644 index 0000000..54bc971 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_texture_8h_source.html @@ -0,0 +1,241 @@ + + + + +Irrlicht 3D Engine: ITexture.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ITexture.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_TEXTURE_H_INCLUDED__
+00006 #define __I_TEXTURE_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "IImage.h"
+00010 #include "dimension2d.h"
+00011 #include "EDriverTypes.h"
+00012 #include "path.h"
+00013 #include "matrix4.h"
+00014 
+00015 namespace irr
+00016 {
+00017 namespace video
+00018 {
+00019 
+00020 
+00022 enum E_TEXTURE_CREATION_FLAG
+00023 {
+00032     ETCF_ALWAYS_16_BIT = 0x00000001,
+00033 
+00041     ETCF_ALWAYS_32_BIT = 0x00000002,
+00042 
+00049     ETCF_OPTIMIZED_FOR_QUALITY = 0x00000004,
+00050 
+00056     ETCF_OPTIMIZED_FOR_SPEED = 0x00000008,
+00057 
+00059     ETCF_CREATE_MIP_MAPS = 0x00000010,
+00060 
+00062     ETCF_NO_ALPHA_CHANNEL = 0x00000020,
+00063 
+00065 
+00066     ETCF_ALLOW_NON_POWER_2 = 0x00000040,
+00067 
+00070     ETCF_FORCE_32_BIT_DO_NOT_USE = 0x7fffffff
+00071 };
+00072 
+00074 enum E_TEXTURE_LOCK_MODE
+00075 {
+00077     ETLM_READ_WRITE = 0,
+00078 
+00080 
+00081     ETLM_READ_ONLY,
+00082 
+00084 
+00086     ETLM_WRITE_ONLY
+00087 };
+00088 
+00090 
+00098 class ITexture : public virtual IReferenceCounted
+00099 {
+00100 public:
+00101 
+00103     ITexture(const io::path& name) : NamedPath(name)
+00104     {
+00105     }
+00106 
+00108 
+00127     virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) = 0;
+00128 
+00130 
+00132     virtual void unlock() = 0;
+00133 
+00135 
+00142     virtual const core::dimension2d<u32>& getOriginalSize() const = 0;
+00143 
+00145 
+00146     virtual const core::dimension2d<u32>& getSize() const = 0;
+00147 
+00149 
+00153     virtual E_DRIVER_TYPE getDriverType() const = 0;
+00154 
+00156 
+00157     virtual ECOLOR_FORMAT getColorFormat() const = 0;
+00158 
+00160 
+00163     virtual u32 getPitch() const = 0;
+00164 
+00166 
+00167     virtual bool hasMipMaps() const { return false; }
+00168 
+00170     virtual bool hasAlpha() const {
+00171         return getColorFormat () == video::ECF_A8R8G8B8 || getColorFormat () == video::ECF_A1R5G5B5;
+00172     }
+00173 
+00175 
+00181     virtual void regenerateMipMapLevels(void* mipmapData=0) = 0;
+00182 
+00184 
+00188     virtual bool isRenderTarget() const { return false; }
+00189 
+00191     const io::SNamedPath& getName() const { return NamedPath; }
+00192 
+00193 protected:
+00194 
+00196 
+00198     inline E_TEXTURE_CREATION_FLAG getTextureFormatFromFlags(u32 flags)
+00199     {
+00200         if (flags & ETCF_OPTIMIZED_FOR_SPEED)
+00201             return ETCF_OPTIMIZED_FOR_SPEED;
+00202         if (flags & ETCF_ALWAYS_16_BIT)
+00203             return ETCF_ALWAYS_16_BIT;
+00204         if (flags & ETCF_ALWAYS_32_BIT)
+00205             return ETCF_ALWAYS_32_BIT;
+00206         if (flags & ETCF_OPTIMIZED_FOR_QUALITY)
+00207             return ETCF_OPTIMIZED_FOR_QUALITY;
+00208         return ETCF_OPTIMIZED_FOR_SPEED;
+00209     }
+00210 
+00211     io::SNamedPath NamedPath;
+00212 };
+00213 
+00214 
+00215 } // end namespace video
+00216 } // end namespace irr
+00217 
+00218 #endif
+00219 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_timer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_timer_8h.html new file mode 100644 index 0000000..49a0417 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_timer_8h.html @@ -0,0 +1,138 @@ + + + + +Irrlicht 3D Engine: ITimer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ITimer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_timer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_timer_8h_source.html new file mode 100644 index 0000000..5cc23de --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_timer_8h_source.html @@ -0,0 +1,199 @@ + + + + +Irrlicht 3D Engine: ITimer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ITimer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_TIMER_H_INCLUDED__
+00006 #define __I_TIMER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00014 class ITimer : public virtual IReferenceCounted
+00015 {
+00016 public:
+00018 
+00022     virtual u32 getRealTime() const = 0;
+00023 
+00024     enum EWeekday
+00025     {
+00026         EWD_SUNDAY=0,
+00027         EWD_MONDAY,
+00028         EWD_TUESDAY,
+00029         EWD_WEDNESDAY,
+00030         EWD_THURSDAY,
+00031         EWD_FRIDAY,
+00032         EWD_SATURDAY
+00033     };
+00034 
+00035     struct RealTimeDate
+00036     {
+00037         // Hour of the day, from 0 to 23
+00038         u32 Hour;
+00039         // Minute of the hour, from 0 to 59
+00040         u32 Minute;
+00041         // Second of the minute, due to extra seconds from 0 to 61
+00042         u32 Second;
+00043         // Year of the gregorian calender
+00044         s32 Year;
+00045         // Month of the year, from 1 to 12
+00046         u32 Month;
+00047         // Day of the month, from 1 to 31
+00048         u32 Day;
+00049         // Weekday for the current day
+00050         EWeekday Weekday;
+00051         // Day of the year, from 1 to 366
+00052         u32 Yearday;
+00053         // Whether daylight saving is on
+00054         bool IsDST;     
+00055     };
+00056 
+00057     virtual RealTimeDate getRealTimeAndDate() const = 0;
+00058 
+00060 
+00064     virtual u32 getTime() const = 0;
+00065 
+00067     virtual void setTime(u32 time) = 0;
+00068 
+00070 
+00073     virtual void stop() = 0;
+00074 
+00076 
+00079     virtual void start() = 0;
+00080 
+00082 
+00084     virtual void setSpeed(f32 speed = 1.0f) = 0;
+00085 
+00087 
+00089     virtual f32 getSpeed() const = 0;
+00090 
+00092     virtual bool isStopped() const = 0;
+00093 
+00095 
+00098     virtual void tick() = 0;
+00099 };
+00100 
+00101 } // end namespace irr
+00102 
+00103 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h.html new file mode 100644 index 0000000..c4a879b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: ITriangleSelector.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ITriangleSelector.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "triangle3d.h"
+#include "aabbox3d.h"
+#include "matrix4.h"
+#include "line3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h_source.html new file mode 100644 index 0000000..c94f306 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_triangle_selector_8h_source.html @@ -0,0 +1,178 @@ + + + + +Irrlicht 3D Engine: ITriangleSelector.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ITriangleSelector.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_TRIANGLE_SELECTOR_H_INCLUDED__
+00006 #define __I_TRIANGLE_SELECTOR_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "triangle3d.h"
+00010 #include "aabbox3d.h"
+00011 #include "matrix4.h"
+00012 #include "line3d.h"
+00013 
+00014 namespace irr
+00015 {
+00016 namespace scene
+00017 {
+00018 
+00019 class ISceneNode;
+00020 
+00022 
+00028 class ITriangleSelector : public virtual IReferenceCounted
+00029 {
+00030 public:
+00031 
+00033     virtual s32 getTriangleCount() const = 0;
+00034 
+00036 
+00050     virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
+00051         s32& outTriangleCount, const core::matrix4* transform=0) const = 0;
+00052 
+00054 
+00073     virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
+00074         s32& outTriangleCount, const core::aabbox3d<f32>& box,
+00075         const core::matrix4* transform=0) const = 0;
+00076 
+00078 
+00097     virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
+00098         s32& outTriangleCount, const core::line3d<f32>& line,
+00099         const core::matrix4* transform=0) const = 0;
+00100 
+00102 
+00110     virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0;
+00111 
+00113 
+00115     virtual u32 getSelectorCount() const = 0;
+00116 
+00118 
+00120     virtual ITriangleSelector* getSelector(u32 index) = 0;
+00121 
+00123 
+00125     virtual const ITriangleSelector* getSelector(u32 index) const = 0;
+00126 };
+00127 
+00128 } // end namespace scene
+00129 } // end namespace irr
+00130 
+00131 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h.html new file mode 100644 index 0000000..684c77d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IVertexBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IVertexBuffer.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrArray.h"
+#include "S3DVertex.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h_source.html new file mode 100644 index 0000000..db69a24 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_vertex_buffer_8h_source.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: IVertexBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IVertexBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_VERTEX_BUFFER_H_INCLUDED__
+00006 #define __I_VERTEX_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrArray.h"
+00010 #include "S3DVertex.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016 
+00017     class IVertexBuffer : public virtual IReferenceCounted
+00018     {
+00019     public:
+00020         virtual void* getData() =0;
+00021         virtual video::E_VERTEX_TYPE getType() const =0;
+00022         virtual void setType(video::E_VERTEX_TYPE vertexType) =0;
+00023         virtual u32 stride() const =0;
+00024         virtual u32 size() const =0;
+00025         virtual void push_back(const video::S3DVertex &element) =0;
+00026         virtual video::S3DVertex& operator [](const u32 index) const =0;
+00027         virtual video::S3DVertex& getLast() =0;
+00028         virtual void set_used(u32 usedNow) =0;
+00029         virtual void reallocate(u32 new_size) =0;
+00030         virtual u32 allocated_size() const =0;
+00031         virtual video::S3DVertex* pointer() =0;
+00032 
+00034         virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0;
+00035 
+00037         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0;
+00038 
+00040         virtual void setDirty() =0;
+00041 
+00043 
+00044         virtual u32 getChangedID() const = 0;
+00045     };
+00046 
+00047 
+00048 } // end namespace scene
+00049 } // end namespace irr
+00050 
+00051 #endif
+00052 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h.html new file mode 100644 index 0000000..e581236 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: IVideoDriver.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IVideoDriver.h File Reference
+
+
+
#include "rect.h"
+#include "SColor.h"
+#include "ITexture.h"
+#include "irrArray.h"
+#include "matrix4.h"
+#include "plane3d.h"
+#include "dimension2d.h"
+#include "position2d.h"
+#include "SMaterial.h"
+#include "IMeshBuffer.h"
+#include "triangle3d.h"
+#include "EDriverTypes.h"
+#include "EDriverFeatures.h"
+#include "SExposedVideoData.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h_source.html new file mode 100644 index 0000000..3512ade --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_video_driver_8h_source.html @@ -0,0 +1,790 @@ + + + + +Irrlicht 3D Engine: IVideoDriver.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IVideoDriver.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_I_VIDEO_DRIVER_H_INCLUDED__
+00006 #define __IRR_I_VIDEO_DRIVER_H_INCLUDED__
+00007 
+00008 #include "rect.h"
+00009 #include "SColor.h"
+00010 #include "ITexture.h"
+00011 #include "irrArray.h"
+00012 #include "matrix4.h"
+00013 #include "plane3d.h"
+00014 #include "dimension2d.h"
+00015 #include "position2d.h"
+00016 #include "SMaterial.h"
+00017 #include "IMeshBuffer.h"
+00018 #include "triangle3d.h"
+00019 #include "EDriverTypes.h"
+00020 #include "EDriverFeatures.h"
+00021 #include "SExposedVideoData.h"
+00022 
+00023 namespace irr
+00024 {
+00025 namespace io
+00026 {
+00027     class IAttributes;
+00028     struct SAttributeReadWriteOptions;
+00029     class IReadFile;
+00030     class IWriteFile;
+00031 } // end namespace io
+00032 namespace scene
+00033 {
+00034     class IMeshBuffer;
+00035     class IMesh;
+00036     class IMeshManipulator;
+00037     class ISceneNode;
+00038 } // end namespace scene
+00039 
+00040 namespace video
+00041 {
+00042     struct S3DVertex;
+00043     struct S3DVertex2TCoords;
+00044     struct S3DVertexTangents;
+00045     struct SLight;
+00046     class IImageLoader;
+00047     class IImageWriter;
+00048     class IMaterialRenderer;
+00049     class IGPUProgrammingServices;
+00050 
+00052     enum E_TRANSFORMATION_STATE
+00053     {
+00055         ETS_VIEW = 0,
+00057         ETS_WORLD,
+00059         ETS_PROJECTION,
+00061         ETS_TEXTURE_0,
+00063         ETS_TEXTURE_1,
+00065         ETS_TEXTURE_2,
+00067         ETS_TEXTURE_3,
+00068 #if _IRR_MATERIAL_MAX_TEXTURES_>4
+00069 
+00070         ETS_TEXTURE_4,
+00071 #if _IRR_MATERIAL_MAX_TEXTURES_>5
+00072 
+00073         ETS_TEXTURE_5,
+00074 #if _IRR_MATERIAL_MAX_TEXTURES_>6
+00075 
+00076         ETS_TEXTURE_6,
+00077 #if _IRR_MATERIAL_MAX_TEXTURES_>7
+00078 
+00079         ETS_TEXTURE_7,
+00080 #endif
+00081 #endif
+00082 #endif
+00083 #endif
+00084 
+00085         ETS_COUNT
+00086     };
+00087 
+00089 
+00092     enum E_LOST_RESOURCE
+00093     {
+00095         ELR_DEVICE = 1,
+00097         ELR_TEXTURES = 2,
+00099         ELR_RTTS = 4,
+00101         ELR_HW_BUFFERS = 8
+00102     };
+00103 
+00105 
+00106     enum E_RENDER_TARGET
+00107     {
+00109         ERT_FRAME_BUFFER=0,
+00111         ERT_RENDER_TEXTURE,
+00113         ERT_MULTI_RENDER_TEXTURES,
+00115         ERT_STEREO_LEFT_BUFFER,
+00117         ERT_STEREO_RIGHT_BUFFER,
+00119         ERT_STEREO_BOTH_BUFFERS,
+00121         ERT_AUX_BUFFER0,
+00123         ERT_AUX_BUFFER1,
+00125         ERT_AUX_BUFFER2,
+00127         ERT_AUX_BUFFER3,
+00129         ERT_AUX_BUFFER4
+00130     };
+00131 
+00133     enum E_FOG_TYPE
+00134     {
+00135         EFT_FOG_EXP=0,
+00136         EFT_FOG_LINEAR,
+00137         EFT_FOG_EXP2
+00138     };
+00139 
+00140     const c8* const FogTypeNames[] =
+00141     {
+00142         "FogExp",
+00143         "FogLinear",
+00144         "FogExp2",
+00145         0
+00146     };
+00147 
+00148     struct SOverrideMaterial
+00149     {
+00151         SMaterial Material;
+00153 
+00154         u32 EnableFlags;
+00156 
+00157         u16 EnablePasses;
+00159 
+00161         bool Enabled;
+00162 
+00164         SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) {}
+00165 
+00167         void apply(SMaterial& material)
+00168         {
+00169             if (Enabled)
+00170             {
+00171                 for (u32 i=0; i<32; ++i)
+00172                 {
+00173                     const u32 num=(1<<i);
+00174                     if (EnableFlags & num)
+00175                     {
+00176                         switch (num)
+00177                         {
+00178                         case EMF_WIREFRAME: material.Wireframe = Material.Wireframe; break;
+00179                         case EMF_POINTCLOUD: material.PointCloud = Material.PointCloud; break;
+00180                         case EMF_GOURAUD_SHADING: material.GouraudShading = Material.GouraudShading; break;
+00181                         case EMF_LIGHTING: material.Lighting = Material.Lighting; break;
+00182                         case EMF_ZBUFFER: material.ZBuffer = Material.ZBuffer; break;
+00183                         case EMF_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break;
+00184                         case EMF_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break;
+00185                         case EMF_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break;
+00186                         case EMF_BILINEAR_FILTER: material.TextureLayer[0].BilinearFilter = Material.TextureLayer[0].BilinearFilter; break;
+00187                         case EMF_TRILINEAR_FILTER: material.TextureLayer[0].TrilinearFilter = Material.TextureLayer[0].TrilinearFilter; break;
+00188                         case EMF_ANISOTROPIC_FILTER: material.TextureLayer[0].AnisotropicFilter = Material.TextureLayer[0].AnisotropicFilter; break;
+00189                         case EMF_FOG_ENABLE: material.FogEnable = Material.FogEnable; break;
+00190                         case EMF_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break;
+00191                         case EMF_TEXTURE_WRAP:
+00192                             material.TextureLayer[0].TextureWrapU = Material.TextureLayer[0].TextureWrapU;
+00193                             material.TextureLayer[0].TextureWrapV = Material.TextureLayer[0].TextureWrapV;
+00194                             break;
+00195                         case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
+00196                         case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
+00197                         case EMF_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break;
+00198                         case EMF_USE_MIP_MAPS: material.UseMipMaps = Material.UseMipMaps; break;
+00199                         case EMF_BLEND_OPERATION: material.BlendOperation = Material.BlendOperation; break;
+00200                         case EMF_POLYGON_OFFSET:
+00201                             material.PolygonOffsetDirection = Material.PolygonOffsetDirection;
+00202                             material.PolygonOffsetFactor = Material.PolygonOffsetFactor; break;
+00203                         }
+00204                     }
+00205                 }
+00206             }
+00207         }
+00208 
+00209     };
+00210 
+00211     struct IRenderTarget
+00212     {
+00213         IRenderTarget(ITexture* texture,
+00214                 E_COLOR_PLANE colorMask=ECP_ALL,
+00215                 E_BLEND_FACTOR blendFuncSrc=EBF_ONE,
+00216                 E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA,
+00217                 E_BLEND_OPERATION blendOp=EBO_NONE) :
+00218             RenderTexture(texture),
+00219             TargetType(ERT_RENDER_TEXTURE), ColorMask(colorMask),
+00220             BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst),
+00221             BlendOp(blendOp) {}
+00222         IRenderTarget(E_RENDER_TARGET target,
+00223                 E_COLOR_PLANE colorMask=ECP_ALL,
+00224                 E_BLEND_FACTOR blendFuncSrc=EBF_ONE,
+00225                 E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA,
+00226                 E_BLEND_OPERATION blendOp=EBO_NONE) :
+00227             RenderTexture(0),
+00228             TargetType(target), ColorMask(colorMask),
+00229             BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst),
+00230             BlendOp(blendOp) {}
+00231         bool operator!=(const IRenderTarget& other) const
+00232         {
+00233             return ((RenderTexture != other.RenderTexture) ||
+00234                 (TargetType != other.TargetType) ||
+00235                 (ColorMask != other.ColorMask) ||
+00236                 (BlendFuncSrc != other.BlendFuncSrc) ||
+00237                 (BlendFuncDst != other.BlendFuncDst) ||
+00238                 (BlendOp != other.BlendOp));
+00239         }
+00240         ITexture* RenderTexture;
+00241         E_RENDER_TARGET TargetType:8;
+00242         E_COLOR_PLANE ColorMask:8;
+00243         E_BLEND_FACTOR BlendFuncSrc:4;
+00244         E_BLEND_FACTOR BlendFuncDst:4;
+00245         E_BLEND_OPERATION BlendOp:4;
+00246     };
+00247 
+00249 
+00256     class IVideoDriver : public virtual IReferenceCounted
+00257     {
+00258     public:
+00259 
+00261 
+00278         virtual bool beginScene(bool backBuffer=true, bool zBuffer=true,
+00279                 SColor color=SColor(255,0,0,0),
+00280                 const SExposedVideoData& videoData=SExposedVideoData(),
+00281                 core::rect<s32>* sourceRect=0) =0;
+00282 
+00284 
+00287         virtual bool endScene() =0;
+00288 
+00290 
+00293         virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const =0;
+00294 
+00296 
+00300         virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) =0;
+00301 
+00303 
+00319         virtual const io::IAttributes& getDriverAttributes() const=0;
+00320 
+00322 
+00325         virtual bool checkDriverReset() =0;
+00326 
+00328 
+00331         virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) =0;
+00332 
+00334 
+00336         virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const =0;
+00337 
+00339 
+00340         virtual u32 getImageLoaderCount() const = 0;
+00341 
+00343 
+00346         virtual IImageLoader* getImageLoader(u32 n) = 0;
+00347 
+00349 
+00350         virtual u32 getImageWriterCount() const = 0;
+00351 
+00353 
+00356         virtual IImageWriter* getImageWriter(u32 n) = 0;
+00357 
+00359 
+00361         virtual void setMaterial(const SMaterial& material) =0;
+00362 
+00364 
+00373         virtual ITexture* getTexture(const io::path& filename) = 0;
+00374 
+00376 
+00385         virtual ITexture* getTexture(io::IReadFile* file) =0;
+00386 
+00388 
+00394         virtual ITexture* getTextureByIndex(u32 index) =0;
+00395 
+00397 
+00398         virtual u32 getTextureCount() const = 0;
+00399 
+00401 
+00403         virtual void renameTexture(ITexture* texture, const io::path& newName) = 0;
+00404 
+00406 
+00415         virtual ITexture* addTexture(const core::dimension2d<u32>& size,
+00416             const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
+00417 
+00419 
+00429         virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0;
+00430 
+00432 
+00441         virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
+00442                 const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
+00443 
+00445 
+00452         virtual void removeTexture(ITexture* texture) =0;
+00453 
+00455 
+00461         virtual void removeAllTextures() =0;
+00462 
+00464         virtual void removeHardwareBuffer(const scene::IMeshBuffer* mb) =0;
+00465 
+00467         virtual void removeAllHardwareBuffers() =0;
+00468 
+00470 
+00471         virtual void addOcclusionQuery(scene::ISceneNode* node,
+00472                 const scene::IMesh* mesh=0) =0;
+00473 
+00475         virtual void removeOcclusionQuery(scene::ISceneNode* node) =0;
+00476 
+00478         virtual void removeAllOcclusionQueries() =0;
+00479 
+00481 
+00483         virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false) =0;
+00484 
+00486 
+00488         virtual void runAllOcclusionQueries(bool visible=false) =0;
+00489 
+00491 
+00493         virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true) =0;
+00494 
+00496 
+00498         virtual void updateAllOcclusionQueries(bool block=true) =0;
+00499 
+00501 
+00504         virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const =0;
+00505 
+00507 
+00523         virtual void makeColorKeyTexture(video::ITexture* texture,
+00524                         video::SColor color,
+00525                         bool zeroTexels = false) const =0;
+00526 
+00528 
+00540         virtual void makeColorKeyTexture(video::ITexture* texture,
+00541                 core::position2d<s32> colorKeyPixelPos,
+00542                 bool zeroTexels = false) const =0;
+00543 
+00545 
+00552         virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const =0;
+00553 
+00555 
+00586         virtual bool setRenderTarget(video::ITexture* texture,
+00587             bool clearBackBuffer=true, bool clearZBuffer=true,
+00588             SColor color=video::SColor(0,0,0,0)) =0;
+00589 
+00591 
+00602         virtual bool setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true,
+00603                     bool clearZBuffer=true,
+00604                     SColor color=video::SColor(0,0,0,0)) =0;
+00605 
+00607         virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture,
+00608             bool clearBackBuffer=true, bool clearZBuffer=true,
+00609             SColor color=video::SColor(0,0,0,0)) =0;
+00610 
+00612 
+00615         virtual void setViewPort(const core::rect<s32>& area) =0;
+00616 
+00618 
+00619         virtual const core::rect<s32>& getViewPort() const =0;
+00620 
+00622 
+00636         virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
+00637                 const void* indexList, u32 primCount,
+00638                 E_VERTEX_TYPE vType=EVT_STANDARD,
+00639                 scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
+00640                 E_INDEX_TYPE iType=EIT_16BIT) =0;
+00641 
+00643 
+00662         virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
+00663                 const void* indexList, u32 primCount,
+00664                 E_VERTEX_TYPE vType=EVT_STANDARD,
+00665                 scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
+00666                 E_INDEX_TYPE iType=EIT_16BIT) =0;
+00667 
+00669 
+00677         void drawIndexedTriangleList(const S3DVertex* vertices,
+00678             u32 vertexCount, const u16* indexList, u32 triangleCount)
+00679         {
+00680             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
+00681         }
+00682 
+00684 
+00692         void drawIndexedTriangleList(const S3DVertex2TCoords* vertices,
+00693             u32 vertexCount, const u16* indexList, u32 triangleCount)
+00694         {
+00695             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT);
+00696         }
+00697 
+00699 
+00707         void drawIndexedTriangleList(const S3DVertexTangents* vertices,
+00708             u32 vertexCount, const u16* indexList, u32 triangleCount)
+00709         {
+00710             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT);
+00711         }
+00712 
+00714 
+00722         void drawIndexedTriangleFan(const S3DVertex* vertices,
+00723             u32 vertexCount, const u16* indexList, u32 triangleCount)
+00724         {
+00725             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
+00726         }
+00727 
+00729 
+00737         void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
+00738             u32 vertexCount, const u16* indexList, u32 triangleCount)
+00739         {
+00740             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
+00741         }
+00742 
+00744 
+00752         void drawIndexedTriangleFan(const S3DVertexTangents* vertices,
+00753             u32 vertexCount, const u16* indexList, u32 triangleCount)
+00754         {
+00755             drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
+00756         }
+00757 
+00759 
+00773         virtual void draw3DLine(const core::vector3df& start,
+00774             const core::vector3df& end, SColor color = SColor(255,255,255,255)) =0;
+00775 
+00777 
+00790         virtual void draw3DTriangle(const core::triangle3df& triangle,
+00791             SColor color = SColor(255,255,255,255)) =0;
+00792 
+00794 
+00805         virtual void draw3DBox(const core::aabbox3d<f32>& box,
+00806             SColor color = SColor(255,255,255,255)) =0;
+00807 
+00809 
+00812         virtual void draw2DImage(const video::ITexture* texture,
+00813             const core::position2d<s32>& destPos) =0;
+00814 
+00816 
+00831         virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
+00832             const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
+00833             SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0;
+00834 
+00836 
+00855         virtual void draw2DImageBatch(const video::ITexture* texture,
+00856                 const core::position2d<s32>& pos,
+00857                 const core::array<core::rect<s32> >& sourceRects,
+00858                 const core::array<s32>& indices,
+00859                 s32 kerningWidth=0,
+00860                 const core::rect<s32>* clipRect=0,
+00861                 SColor color=SColor(255,255,255,255),
+00862                 bool useAlphaChannelOfTexture=false) =0;
+00863 
+00865 
+00880         virtual void draw2DImageBatch(const video::ITexture* texture,
+00881                 const core::array<core::position2d<s32> >& positions,
+00882                 const core::array<core::rect<s32> >& sourceRects,
+00883                 const core::rect<s32>* clipRect=0,
+00884                 SColor color=SColor(255,255,255,255),
+00885                 bool useAlphaChannelOfTexture=false) =0;
+00886 
+00888 
+00897         virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
+00898             const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
+00899             const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) =0;
+00900 
+00902 
+00909         virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos,
+00910             const core::rect<s32>* clip =0) =0;
+00911 
+00913 
+00929         virtual void draw2DRectangle(const core::rect<s32>& pos,
+00930                 SColor colorLeftUp, SColor colorRightUp,
+00931                 SColor colorLeftDown, SColor colorRightDown,
+00932                 const core::rect<s32>* clip =0) =0;
+00933 
+00935 
+00938         virtual void draw2DRectangleOutline(const core::recti& pos,
+00939                 SColor color=SColor(255,255,255,255)) =0;
+00940 
+00942 
+00947         virtual void draw2DLine(const core::position2d<s32>& start,
+00948                     const core::position2d<s32>& end,
+00949                     SColor color=SColor(255,255,255,255)) =0;
+00950 
+00952 
+00955         virtual void drawPixel(u32 x, u32 y, const SColor& color) =0;
+00956 
+00958 
+00970         virtual void draw2DPolygon(core::position2d<s32> center,
+00971                 f32 radius,
+00972                 video::SColor color=SColor(100,255,255,255),
+00973                 s32 vertexCount=10) =0;
+00974 
+00976 
+00989         virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0) =0;
+00990 
+00992 
+01011         virtual void drawStencilShadow(bool clearStencilBuffer=false,
+01012             video::SColor leftUpEdge = video::SColor(255,0,0,0),
+01013             video::SColor rightUpEdge = video::SColor(255,0,0,0),
+01014             video::SColor leftDownEdge = video::SColor(255,0,0,0),
+01015             video::SColor rightDownEdge = video::SColor(255,0,0,0)) =0;
+01016 
+01018 
+01019         virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) =0;
+01020 
+01022 
+01026         virtual void drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length=10.f, SColor color=0xffffffff) =0;
+01027 
+01029 
+01045         virtual void setFog(SColor color=SColor(0,255,255,255),
+01046                 E_FOG_TYPE fogType=EFT_FOG_LINEAR,
+01047                 f32 start=50.0f, f32 end=100.0f, f32 density=0.01f,
+01048                 bool pixelFog=false, bool rangeFog=false) =0;
+01049 
+01051         virtual void getFog(SColor& color, E_FOG_TYPE& fogType,
+01052                 f32& start, f32& end, f32& density,
+01053                 bool& pixelFog, bool& rangeFog) = 0;
+01054 
+01056 
+01057         virtual ECOLOR_FORMAT getColorFormat() const =0;
+01058 
+01060 
+01061         virtual const core::dimension2d<u32>& getScreenSize() const =0;
+01062 
+01064 
+01068         virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const =0;
+01069 
+01071 
+01076         virtual s32 getFPS() const =0;
+01077 
+01079 
+01083         virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0;
+01084 
+01086         virtual void deleteAllDynamicLights() =0;
+01087 
+01091         virtual s32 addDynamicLight(const SLight& light) =0;
+01092 
+01094 
+01095         virtual u32 getMaximalDynamicLightAmount() const =0;
+01096 
+01098 
+01099         virtual u32 getDynamicLightCount() const =0;
+01100 
+01102 
+01105         virtual const SLight& getDynamicLight(u32 idx) const =0;
+01106 
+01110         virtual void turnLightOn(s32 lightIndex, bool turnOn) =0;
+01111 
+01113 
+01115         virtual const wchar_t* getName() const =0;
+01116 
+01118 
+01124         virtual void addExternalImageLoader(IImageLoader* loader) =0;
+01125 
+01127 
+01133         virtual void addExternalImageWriter(IImageWriter* writer) =0;
+01134 
+01136 
+01139         virtual u32 getMaximalPrimitiveCount() const =0;
+01140 
+01142 
+01151         virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true) =0;
+01152 
+01154 
+01157         virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const =0;
+01158 
+01160 
+01168         virtual IImage* createImageFromFile(const io::path& filename) = 0;
+01169 
+01171 
+01178         virtual IImage* createImageFromFile(io::IReadFile* file) =0;
+01179 
+01181 
+01188         virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0;
+01189 
+01191 
+01199         virtual bool writeImageToFile(IImage* image, io::IWriteFile* file, u32 param =0) =0;
+01200 
+01202 
+01216         virtual IImage* createImageFromData(ECOLOR_FORMAT format,
+01217             const core::dimension2d<u32>& size, void *data,
+01218             bool ownForeignMemory=false,
+01219             bool deleteMemory = true) =0;
+01220 
+01222 
+01228         virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) =0;
+01229 
+01231 
+01237         _IRR_DEPRECATED_ virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) =0;
+01238 
+01240 
+01247         _IRR_DEPRECATED_ virtual IImage* createImage(IImage* imageToCopy,
+01248                 const core::position2d<s32>& pos,
+01249                 const core::dimension2d<u32>& size) =0;
+01250 
+01252 
+01259         virtual IImage* createImage(ITexture* texture,
+01260                 const core::position2d<s32>& pos,
+01261                 const core::dimension2d<u32>& size) =0;
+01262 
+01264 
+01266         virtual void OnResize(const core::dimension2d<u32>& size) =0;
+01267 
+01269 
+01289         virtual s32 addMaterialRenderer(IMaterialRenderer* renderer, const c8* name =0) =0;
+01290 
+01292 
+01296         virtual IMaterialRenderer* getMaterialRenderer(u32 idx) =0;
+01297 
+01299 
+01300         virtual u32 getMaterialRendererCount() const =0;
+01301 
+01303 
+01312         virtual const c8* getMaterialRendererName(u32 idx) const =0;
+01313 
+01315 
+01320         virtual void setMaterialRendererName(s32 idx, const c8* name) =0;
+01321 
+01323 
+01332         virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material,
+01333             io::SAttributeReadWriteOptions* options=0) =0;
+01334 
+01336 
+01342         virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes) =0;
+01343 
+01345 
+01348         virtual const SExposedVideoData& getExposedVideoData() =0;
+01349 
+01351 
+01352         virtual E_DRIVER_TYPE getDriverType() const =0;
+01353 
+01355 
+01358         virtual IGPUProgrammingServices* getGPUProgrammingServices() =0;
+01359 
+01361         virtual scene::IMeshManipulator* getMeshManipulator() =0;
+01362 
+01364 
+01370         virtual void clearZBuffer() =0;
+01371 
+01373 
+01374         virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER) =0;
+01375 
+01377 
+01381         virtual video::ITexture* findTexture(const io::path& filename) = 0;
+01382 
+01384 
+01392         virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false) =0;
+01393 
+01395 
+01401         virtual void enableClipPlane(u32 index, bool enable) =0;
+01402 
+01404 
+01405         virtual void setMinHardwareBufferVertexCount(u32 count) =0;
+01406 
+01408 
+01412         virtual SOverrideMaterial& getOverrideMaterial() =0;
+01413 
+01415 
+01428         virtual SMaterial& getMaterial2D() =0;
+01429 
+01431 
+01433         virtual void enableMaterial2D(bool enable=true) =0;
+01434 
+01436         virtual core::stringc getVendorInfo() =0;
+01437 
+01439 
+01442         virtual void setAmbientLight(const SColorf& color) =0;
+01443 
+01445 
+01448         virtual void setAllowZWriteOnTransparent(bool flag) =0;
+01449 
+01451         virtual core::dimension2du getMaxTextureSize() const =0;
+01452 
+01454 
+01463         virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN,
+01464                 void* dP, ECOLOR_FORMAT dF) const =0;
+01465     };
+01466 
+01467 } // end namespace video
+01468 } // end namespace irr
+01469 
+01470 
+01471 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h.html new file mode 100644 index 0000000..55e08d1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: IVideoModeList.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IVideoModeList.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "dimension2d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h_source.html new file mode 100644 index 0000000..4595e4c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_video_mode_list_8h_source.html @@ -0,0 +1,165 @@ + + + + +Irrlicht 3D Engine: IVideoModeList.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IVideoModeList.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__
+00006 #define __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "dimension2d.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace video
+00014 {
+00015 
+00017 
+00023     class IVideoModeList : public virtual IReferenceCounted
+00024     {
+00025     public:
+00026 
+00028 
+00029         virtual s32 getVideoModeCount() const = 0;
+00030 
+00032 
+00034         virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const = 0;
+00035 
+00037 
+00041         virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const = 0;
+00042 
+00044 
+00046         virtual s32 getVideoModeDepth(s32 modeNumber) const = 0;
+00047 
+00049 
+00050         virtual const core::dimension2d<u32>& getDesktopResolution() const = 0;
+00051 
+00053 
+00054         virtual s32 getDesktopDepth() const = 0;
+00055     };
+00056 
+00057 } // end namespace video
+00058 } // end namespace irr
+00059 
+00060 
+00061 #endif
+00062 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h.html new file mode 100644 index 0000000..787ba3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: IVolumeLightSceneNode.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IVolumeLightSceneNode.h File Reference
+
+
+
#include "ISceneNode.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h_source.html new file mode 100644 index 0000000..9157031 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_volume_light_scene_node_8h_source.html @@ -0,0 +1,170 @@ + + + + +Irrlicht 3D Engine: IVolumeLightSceneNode.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IVolumeLightSceneNode.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 //
+00005 // created by Dean Wadsworth aka Varmint Dec 31 2007
+00006 
+00007 #ifndef __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__
+00008 #define __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__
+00009 
+00010 #include "ISceneNode.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016     class IMeshBuffer;
+00017 
+00018     class IVolumeLightSceneNode : public ISceneNode
+00019     {
+00020     public:
+00021 
+00023         IVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
+00024             const core::vector3df& position,
+00025             const core::vector3df& rotation,
+00026             const core::vector3df& scale)
+00027             : ISceneNode(parent, mgr, id, position, rotation, scale) {};
+00028 
+00030         virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; }
+00031 
+00033         virtual void setSubDivideU(const u32 inU) =0;
+00034 
+00036         virtual void setSubDivideV(const u32 inV) =0;
+00037 
+00039         virtual u32 getSubDivideU() const =0;
+00040 
+00042         virtual u32 getSubDivideV() const =0;
+00043 
+00045         virtual void setFootColor(const video::SColor inColor) =0;
+00046 
+00048         virtual void setTailColor(const video::SColor inColor) =0;
+00049 
+00051         virtual video::SColor getFootColor() const =0;
+00052 
+00054         virtual video::SColor getTailColor() const =0;
+00055     };
+00056 
+00057 } // end namespace scene
+00058 } // end namespace irr
+00059 
+00060 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h.html new file mode 100644 index 0000000..4abfd2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: IWriteFile.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IWriteFile.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Functions

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h_source.html new file mode 100644 index 0000000..ab073aa --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_write_file_8h_source.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: IWriteFile.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IWriteFile.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_WRITE_FILE_H_INCLUDED__
+00006 #define __I_WRITE_FILE_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00015 
+00017     class IWriteFile : public virtual IReferenceCounted
+00018     {
+00019     public:
+00021 
+00024         virtual s32 write(const void* buffer, u32 sizeToWrite) = 0;
+00025 
+00027 
+00032         virtual bool seek(long finalPos, bool relativeMovement = false) = 0;
+00033 
+00035 
+00036         virtual long getPos() const = 0;
+00037 
+00039 
+00040         virtual const path& getFileName() const = 0;
+00041     };
+00042 
+00044     IWriteFile* createWriteFile(const io::path& fileName, bool append);
+00045 
+00046 } // end namespace io
+00047 } // end namespace irr
+00048 
+00049 #endif
+00050 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h.html new file mode 100644 index 0000000..f84992a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: IXMLReader.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IXMLReader.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrXML.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h_source.html new file mode 100644 index 0000000..abb179b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_reader_8h_source.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: IXMLReader.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IXMLReader.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_XML_READER_H_INCLUDED__
+00006 #define __I_XML_READER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrXML.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace io
+00014 {
+00016 
+00019     typedef IIrrXMLReader<wchar_t, IReferenceCounted> IXMLReader;
+00020 
+00022 
+00025     typedef IIrrXMLReader<c8, IReferenceCounted> IXMLReaderUTF8;
+00026 
+00027 } // end namespace io
+00028 } // end namespace irr
+00029 
+00030 #endif
+00031 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h.html new file mode 100644 index 0000000..0b4cd80 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: IXMLWriter.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IXMLWriter.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "irrArray.h"
+#include "irrString.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h_source.html new file mode 100644 index 0000000..be01ce1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_x_m_l_writer_8h_source.html @@ -0,0 +1,169 @@ + + + + +Irrlicht 3D Engine: IXMLWriter.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IXMLWriter.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_XML_WRITER_H_INCLUDED__
+00006 #define __I_XML_WRITER_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "irrArray.h"
+00010 #include "irrString.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace io
+00015 {
+00016 
+00018 
+00020     class IXMLWriter : public virtual IReferenceCounted
+00021     {
+00022     public:
+00024 
+00027         virtual void writeXMLHeader() = 0;
+00028 
+00031 
+00046         virtual void writeElement(const wchar_t* name, bool empty=false,
+00047             const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0,
+00048             const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0,
+00049             const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0,
+00050             const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0,
+00051             const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0) = 0;
+00052 
+00054         virtual void writeElement(const wchar_t* name, bool empty,
+00055                 core::array<core::stringw> &names, core::array<core::stringw> &values) = 0;
+00056 
+00058         virtual void writeComment(const wchar_t* comment) = 0;
+00059 
+00061         virtual void writeClosingTag(const wchar_t* name) = 0;
+00062 
+00064 
+00067         virtual void writeText(const wchar_t* text) = 0;
+00068 
+00070         virtual void writeLineBreak() = 0;
+00071     };
+00072 
+00073 } // end namespace io
+00074 } // end namespace irr
+00075 
+00076 #endif
+00077 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h.html b/src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h.html new file mode 100644 index 0000000..ceb845b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h.html @@ -0,0 +1,1639 @@ + + + + +Irrlicht 3D Engine: IrrCompileConfig.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IrrCompileConfig.h File Reference
+
+
+
#include <stdio.h>
+
+

Go to the source code of this file.

+

+Defines

+ +

Define Documentation

+ +
+
+ + + + +
#define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
+
+
+ +

Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives.

+ +

Definition at line 640 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
+
+
+ +

Define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ if you want to open Nebula Device NPK archives.

+ +

Definition at line 650 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
+
+
+ +

Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives.

+ +

Definition at line 645 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
+
+
+ +

Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives.

+ +

Definition at line 655 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
+
+
+ +

Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives.

+ +

Definition at line 660 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
+
+
+ +

Define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ if you want to open ZIP and GZIP archives.

+

ZIP reading has several more options below to configure.

+ +

Definition at line 588 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define __IRR_HAS_S64
+
+
+ +

WinCE does not have OpenGL or DirectX9. use minimal loaders.

+

Define __IRR_HAS_S64 if the irr::s64 type should be enable (needs long long, available on most platforms, but not part of ISO C++ 98)

+ +

Definition at line 794 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_3DS_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files.

+ +

Definition at line 397 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_B3D_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_B3D_LOADER_ if you want to use Blitz3D files.

+ +

Definition at line 355 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_BMP_LOADER_
+
+
+

Define _IRR_COMPILE_WITH_BMP_LOADER_ if you want to load .bmp files Disabling this loader will also disable the built-in font

+ +

Definition at line 490 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_BMP_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files.

+ +

Definition at line 551 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_BSP_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_BSP_LOADER_ if you want to load Quake 3 BSP files.

+ +

Definition at line 412 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_BURNINGSVIDEO_
+
+
+ +

Define _IRR_COMPILE_WITH_BURNINGSVIDEO_ to compile the Irrlicht engine with Burning's video driver.

+

If you do not need this software driver, you can comment this define out.

+ +

Definition at line 179 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_BZIP2_
+
+
+ +

Define _IRR_COMPILE_WITH_BZIP2_ if you want to support bzip2 compressed zip archives.

+

bzip2 is superior to the original zip file compression modes, but requires a certain amount of memory for decompression and adds several files to the library.

+ +

Definition at line 618 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_COLLADA_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files.

+ +

Definition at line 402 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_COLLADA_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_COLLADA_WRITER_ if you want to write Collada files.

+ +

Definition at line 468 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_CONSOLE_DEVICE_
+
+
+ +

Uncomment this line to compile with the SDL device.

+

The defines for different operating system are: _IRR_XBOX_PLATFORM_ for XBox _IRR_WINDOWS_ for all irrlicht supported Windows versions _IRR_WINDOWS_CE_PLATFORM_ for Windows CE _IRR_WINDOWS_API_ for Windows or XBox _IRR_LINUX_PLATFORM_ for Linux (it is defined here if no other os is defined) _IRR_SOLARIS_PLATFORM_ for Solaris _IRR_OSX_PLATFORM_ for Apple systems running OSX _IRR_POSIX_API_ for Posix compatible systems Note: PLATFORM defines the OS specific layer, API can group several platforms DEVICE is the windowing system used, several PLATFORMs support more than one DEVICE Irrlicht can be compiled with more than one device _IRR_COMPILE_WITH_WINDOWS_DEVICE_ for Windows API based device _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ for Windows CE API based device _IRR_COMPILE_WITH_OSX_DEVICE_ for Cocoa native windowing on OSX _IRR_COMPILE_WITH_X11_DEVICE_ for Linux X11 based device _IRR_COMPILE_WITH_SDL_DEVICE_ for platform independent SDL framework _IRR_COMPILE_WITH_CONSOLE_DEVICE_ for no windowing system, used as a fallback _IRR_COMPILE_WITH_FB_DEVICE_ for framebuffer systems Passing defines to the compiler which have NO in front of the _IRR definename is an alternative way which can be used to disable defines (instead of outcommenting them in this header). So defines can be controlled from Makefiles or Projectfiles which allows building different library versions without having to change the sources. Example: NO_IRR_COMPILE_WITH_X11_ would disable X11 Comment this line to compile without the fallback console device.

+ +

Definition at line 54 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_CSM_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_CSM_LOADER_ if you want to load Cartography Shop files.

+ +

Definition at line 407 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_DMF_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_DMF_LOADER_ if you want to load DeleD files.

+ +

Definition at line 417 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_GUI_
+
+
+ +

Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI.

+

X11 has by default only monochrome cursors, but using the Xcursor library we can also get color cursor support. If you have the need for custom color cursors on X11 then enable this and make sure you also link to the Xcursor library in your Makefile/Projectfile. Disable this if you are using an external library to draw the GUI. If you disable this then you will not be able to use anything provided by the GUI Environment, including loading fonts.

+ +

Definition at line 226 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_HALFLIFE_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ if you want to load Halflife animated files.

+ +

Definition at line 382 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files.

+ +

Definition at line 377 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_
+
+
+ +

Uncomment the following line if you want to ignore the deprecated warnings.

+

Define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ if you want to be able to load .irr scenes using ISceneManager::loadScene

+ +

Definition at line 340 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_IRR_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_IRR_WRITER_ if you want to write static .irrMesh files.

+ +

Definition at line 463 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
+
+
+ +

Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events.

+ +

Definition at line 110 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_JPG_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files.

+ +

Definition at line 495 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_JPG_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_JPG_WRITER_ if you want to write .jpg files.

+ +

Definition at line 556 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_LIBJPEG_
+
+
+ +

Define _IRR_WCHAR_FILESYSTEM to enable unicode filesystem support for the engine.

+

This enables the engine to read/write from unicode filesystem. If you disable this feature, the engine behave as before (ansi). This is currently only supported for Windows based systems. You also have to set #define UNICODE for this to compile. Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg. This enables the engine to read jpeg images. If you comment this out, the engine will no longer read .jpeg images.

+ +

Definition at line 244 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_LIBPNG_
+
+
+ +

Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng.

+

This enables the engine to read png images. If you comment this out, the engine will no longer read .png images.

+ +

Definition at line 260 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_LMP_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_LMP_LOADER_ if you want to load .lmp files.

+ +

Definition at line 540 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_LMTS_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_LMTS_LOADER_ if you want to load LMTools files.

+ +

Definition at line 422 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_LWO_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_LWO_LOADER_ if you want to load Lightwave3D files.

+ +

Definition at line 442 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_LZMA_
+
+
+ +

Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files.

+

LZMA is a very efficient compression code, known from 7zip. Irrlicht currently only supports zip archives, though.

+ +

Definition at line 633 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_MD2_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files.

+ +

Definition at line 387 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_MD3_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files.

+ +

Definition at line 392 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_MS3D_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_MS3D_LOADER_ if you want to Milkshape files.

+ +

Definition at line 360 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_MY3D_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_MY3D_LOADER_ if you want to load MY3D files.

+ +

Definition at line 427 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_OBJ_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_OBJ_LOADER_ if you want to load Wavefront OBJ files.

+ +

Definition at line 432 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_OBJ_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_OBJ_WRITER_ if you want to write .obj files.

+ +

Definition at line 478 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_OCT_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_OCT_LOADER_ if you want to load FSRad OCT files.

+ +

Definition at line 437 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_OGRE_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_OGRE_LOADER_ if you want to load Ogre 3D files.

+ +

Definition at line 370 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_OPENGL_
+
+
+ +

Define _IRR_COMPILE_WITH_OPENGL_ to compile the Irrlicht engine with OpenGL.

+

Define _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_ to compile the Irrlicht engine with Direct3D8 and/or DIRECT3D9. If you only want to use the software device or opengl you can disable those defines. This switch is mostly disabled because people do not get the g++ compiler compile directX header files, and directX is only available on Windows platforms. If you are using Dev-Cpp, and want to compile this using a DX dev pack, you can define _IRR_COMPILE_WITH_DX9_DEV_PACK_. So you simply need to add something like this to the compiler settings: -DIRR_COMPILE_WITH_DX9_DEV_PACK and this to the linker settings: -ld3dx9 -ld3dx8

+

Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and so D3D8 support is now disabled by default. If you really want to build with D3D8 support, then you will have to source a DXSDK with the appropriate headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one. If you do not wish the engine to be compiled with OpenGL, comment this define out.

+ +

Definition at line 164 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PCX_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_PCX_LOADER_ if you want to load .pcx files.

+ +

Definition at line 500 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PCX_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_PCX_WRITER_ if you want to write .pcx files.

+ +

Definition at line 561 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PLY_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_PLY_LOADER_ if you want to load Polygon (Stanford Triangle) files.

+ +

Definition at line 452 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PLY_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_PLY_WRITER_ if you want to write .ply files.

+ +

Definition at line 483 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PNG_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_PNG_LOADER_ if you want to load .png files.

+ +

Definition at line 505 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PNG_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_PNG_WRITER_ if you want to write .png files.

+ +

Definition at line 566 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PPM_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_PPM_LOADER_ if you want to load .ppm/.pgm/.pbm files.

+ +

Definition at line 510 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PPM_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_PPM_WRITER_ if you want to write .ppm files.

+ +

Definition at line 571 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PSD_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files.

+ +

Definition at line 515 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_PSD_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_PSD_WRITER_ if you want to write .psd files.

+ +

Definition at line 576 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_RGB_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files.

+ +

Definition at line 545 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
+
+
+ +

Define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ if you want to use bone based.

+

animated meshes. If you compile without this, you will be unable to load B3D, MS3D or X meshes

+ +

Definition at line 348 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_SMF_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_SMF_LOADER_ if you want to load 3D World Studio mesh files.

+ +

Definition at line 457 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_SOFTWARE_
+
+
+ +

Define _IRR_COMPILE_WITH_SOFTWARE_ to compile the Irrlicht engine with software driver.

+

If you do not need the software driver, or want to use Burning's Video instead, comment this define out

+ +

Definition at line 172 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_STL_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_STL_LOADER_ if you want to load stereolithography files.

+ +

Definition at line 447 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_STL_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_STL_WRITER_ if you want to write .stl files.

+ +

Definition at line 473 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_TGA_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load .dds files.

+

Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files

+ +

Definition at line 530 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_TGA_WRITER_
+
+
+ +

Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files.

+ +

Definition at line 581 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_WAL_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files.

+ +

Definition at line 535 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_X11_
+
+
+ +

Define _IRR_COMPILE_WITH_X11_ to compile the Irrlicht engine with X11 support.

+

If you do not wish the engine to be compiled with X11, comment this define out.

+ +

Definition at line 188 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_X11_DEVICE_
+
+
+ +

Definition at line 105 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_X_LOADER_
+
+
+ +

Define _IRR_COMPILE_WITH_X_LOADER_ if you want to use Microsoft X files.

+ +

Definition at line 365 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
+
+
+ +

Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives.

+ +

Definition at line 610 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_COMPILE_WITH_ZLIB_
+
+
+ +

Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib.

+

This enables the engine to read from compressed .zip archives. If you disable this feature, the engine can still read archives, but only uncompressed ones.

+ +

Definition at line 597 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_D3D_NO_SHADER_DEBUGGING
+
+
+ +

Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9.

+

If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h, it is possible to debug all D3D9 shaders in VisualStudio. All shaders (which have been generated in memory or read from archives for example) will be emitted into a temporary file at runtime for this purpose. To debug your shaders, choose Debug->Direct3D->StartWithDirect3DDebugging in Visual Studio, and for every shader a file named 'irr_dbg_shader_%%.vsh' or 'irr_dbg_shader_%%.psh' will be created. Drag'n'drop the file you want to debug into visual studio. That's it. You can now set breakpoints and watch registers, variables etc. This works with ASM, HLSL, and both with pixel and vertex shaders. Note that the engine will run in D3D REF for this, which is a lot slower than HAL.

+ +

Definition at line 283 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_LINUX_PLATFORM_
+
+
+ +

WINCE is a very restricted environment for mobile devices.

+

WIN32 for Windows32 WIN64 for Windows64

+ +

Definition at line 102 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_LINUX_X11_VIDMODE_
+
+
+

On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags to remove the dependencies such that Irrlicht will compile on those systems, too. If you don't need colored cursors you can also disable the Xcursor extension

+ +

Definition at line 204 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_MATERIAL_MAX_TEXTURES_   4
+
+
+ +

Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht.

+ +

Definition at line 117 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_OPENGL_USE_EXTPOINTER_
+
+
+ +

Define _IRR_OPENGL_USE_EXTPOINTER_ if the OpenGL renderer should use OpenGL extensions via function pointers.

+

On some systems there is no support for the dynamic extension of OpenGL via function pointers such that this has to be undef'ed.

+ +

Definition at line 197 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_POSIX_API_
+
+
+ +

Definition at line 104 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_USE_NON_SYSTEM_BZLIB_
+
+
+ +

Define _IRR_USE_NON_SYSTEM_BZLIB_ to let irrlicht use the bzlib which comes with irrlicht.

+

If this is commented out, Irrlicht will try to compile using the bzlib installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is defined.

+ +

Definition at line 626 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
+
+
+ +

Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.

+

If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system. This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined.

+ +

Definition at line 252 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_USE_NON_SYSTEM_LIB_PNG_
+
+
+ +

Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.

+

If this is commented out, Irrlicht will try to compile using the libpng installed in the system. This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined.

+ +

Definition at line 268 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_USE_NON_SYSTEM_ZLIB_
+
+
+ +

Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht.

+

If this is commented out, Irrlicht will try to compile using the zlib installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is defined.

+ +

Definition at line 605 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define BURNINGVIDEO_RENDERER_BEAUTIFUL
+
+
+ +

Define _IRR_D3D_USE_LEGACY_HLSL_COMPILER to enable the old HLSL compiler in recent DX SDKs.

+

This enables support for ps_1_x shaders for recent DX SDKs. Otherwise, support for this shader model is not available anymore in SDKs after Oct2006. You need to distribute the OCT2006_d3dx9_31_x86.cab or OCT2006_d3dx9_31_x64.cab though, in order to provide the user with the proper DLL. That's why it's disabled by default. Define _IRR_COMPILE_WITH_CG_ to enable Cg Shading Language support Define _IRR_USE_NVIDIA_PERFHUD_ to opt-in to using the nVidia PerHUD tool Enable, by opting-in, to use the nVidia PerfHUD performance analysis driver tool <http://developer.nvidia.com/object/nvperfhud_home.html>. Define one of the three setting for Burning's Video Software Rasterizer So if we were marketing guys we could say Irrlicht has 4 Software-Rasterizers. In a Nutshell: All Burnings Rasterizers use 32 Bit Backbuffer, 32Bit Texture & 32 Bit Z or WBuffer, 16 Bit/32 Bit can be adjusted on a global flag.

+

BURNINGVIDEO_RENDERER_BEAUTIFUL 32 Bit + Vertexcolor + Lighting + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + Bilinear Texturefiltering + WBuffer

+

BURNINGVIDEO_RENDERER_FAST 32 Bit + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + WBuffer + Bilinear Dithering TextureFiltering + WBuffer

+

BURNINGVIDEO_RENDERER_ULTRA_FAST 16Bit + SubPixel/SubTexel Correct + ZBuffer

+ +

Definition at line 330 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define IRRCALLCONV
+
+
+ +

Definition at line 708 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define IRRLICHT_API
+
+
+ +

Set FPU settings.

+

Irrlicht should use approximate float and integer fpu techniques precision will be lower but speed higher. currently X86 only

+ +

Definition at line 705 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define IRRLICHT_SDK_VERSION   "1.8.1"
+
+
+ +

Definition at line 15 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define IRRLICHT_VERSION_MAJOR   1
+
+
+ +

Irrlicht SDK Version.

+ +

Definition at line 9 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define IRRLICHT_VERSION_MINOR   8
+
+
+ +

Definition at line 10 of file IrrCompileConfig.h.

+ +
+
+ +
+
+ + + + +
#define IRRLICHT_VERSION_REVISION   1
+
+
+ +

Definition at line 11 of file IrrCompileConfig.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h_source.html new file mode 100644 index 0000000..89a1db1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_irr_compile_config_8h_source.html @@ -0,0 +1,816 @@ + + + + +Irrlicht 3D Engine: IrrCompileConfig.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IrrCompileConfig.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_COMPILE_CONFIG_H_INCLUDED__
+00006 #define __IRR_COMPILE_CONFIG_H_INCLUDED__
+00007 
+00009 #define IRRLICHT_VERSION_MAJOR 1
+00010 #define IRRLICHT_VERSION_MINOR 8
+00011 #define IRRLICHT_VERSION_REVISION 1
+00012 // This flag will be defined only in SVN, the official release code will have
+00013 // it undefined
+00014 //#define IRRLICHT_VERSION_SVN -alpha
+00015 #define IRRLICHT_SDK_VERSION "1.8.1"
+00016 
+00017 #include <stdio.h> // TODO: Although included elsewhere this is required at least for mingw
+00018 
+00029 
+00039 
+00045 
+00046 
+00048 //#define _IRR_COMPILE_WITH_SDL_DEVICE_
+00049 #ifdef NO_IRR_COMPILE_WITH_SDL_DEVICE_
+00050 #undef _IRR_COMPILE_WITH_SDL_DEVICE_
+00051 #endif
+00052 
+00054 #define _IRR_COMPILE_WITH_CONSOLE_DEVICE_
+00055 #ifdef NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_
+00056 #undef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
+00057 #endif
+00058 
+00061 // The windows platform and API support SDL and WINDOW device
+00062 #if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)
+00063 #define _IRR_WINDOWS_
+00064 #define _IRR_WINDOWS_API_
+00065 #define _IRR_COMPILE_WITH_WINDOWS_DEVICE_
+00066 #endif
+00067 
+00069 #if defined(_WIN32_WCE)
+00070 #define _IRR_WINDOWS_
+00071 #define _IRR_WINDOWS_API_
+00072 #define _IRR_WINDOWS_CE_PLATFORM_
+00073 #define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
+00074 #endif
+00075 
+00076 #if defined(_MSC_VER) && (_MSC_VER < 1300)
+00077 #  error "Only Microsoft Visual Studio 7.0 and later are supported."
+00078 #endif
+00079 
+00080 // XBox only suppots the native Window stuff
+00081 #if defined(_XBOX)
+00082     #undef _IRR_WINDOWS_
+00083     #define _IRR_XBOX_PLATFORM_
+00084     #define _IRR_WINDOWS_API_
+00085     //#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_
+00086     #undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
+00087     //#define _IRR_COMPILE_WITH_SDL_DEVICE_
+00088 
+00089     #include <xtl.h>
+00090 #endif
+00091 
+00092 #if defined(__APPLE__) || defined(MACOSX)
+00093 #if !defined(MACOSX)
+00094 #define MACOSX // legacy support
+00095 #endif
+00096 #define _IRR_OSX_PLATFORM_
+00097 #define _IRR_COMPILE_WITH_OSX_DEVICE_
+00098 #endif
+00099 
+00100 #if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_)
+00101 #ifndef _IRR_SOLARIS_PLATFORM_
+00102 #define _IRR_LINUX_PLATFORM_
+00103 #endif
+00104 #define _IRR_POSIX_API_
+00105 #define _IRR_COMPILE_WITH_X11_DEVICE_
+00106 #endif
+00107 
+00108 
+00110 #define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
+00111 #ifdef NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_
+00112 #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
+00113 #endif
+00114 
+00115 
+00117 #define _IRR_MATERIAL_MAX_TEXTURES_ 4
+00118 
+00121 
+00134 #if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))
+00135 
+00137 
+00139 #define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
+00140 #ifdef NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
+00141 #undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
+00142 #endif
+00143 // can't get this to compile currently under borland, can be removed if someone has a better solution
+00144 #if defined(__BORLANDC__)
+00145 #undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
+00146 #endif
+00147 
+00149 // #define _IRR_COMPILE_WITH_DIRECT3D_8_
+00150 #define _IRR_COMPILE_WITH_DIRECT3D_9_
+00151 
+00152 #ifdef NO_IRR_COMPILE_WITH_DIRECT3D_8_
+00153 #undef _IRR_COMPILE_WITH_DIRECT3D_8_
+00154 #endif
+00155 #ifdef NO_IRR_COMPILE_WITH_DIRECT3D_9_
+00156 #undef _IRR_COMPILE_WITH_DIRECT3D_9_
+00157 #endif
+00158 
+00159 #endif
+00160 
+00162 
+00164 #define _IRR_COMPILE_WITH_OPENGL_
+00165 #ifdef NO_IRR_COMPILE_WITH_OPENGL_
+00166 #undef _IRR_COMPILE_WITH_OPENGL_
+00167 #endif
+00168 
+00170 
+00172 #define _IRR_COMPILE_WITH_SOFTWARE_
+00173 #ifdef NO_IRR_COMPILE_WITH_SOFTWARE_
+00174 #undef _IRR_COMPILE_WITH_SOFTWARE_
+00175 #endif
+00176 
+00178 
+00179 #define _IRR_COMPILE_WITH_BURNINGSVIDEO_
+00180 #ifdef NO_IRR_COMPILE_WITH_BURNINGSVIDEO_
+00181 #undef _IRR_COMPILE_WITH_BURNINGSVIDEO_
+00182 #endif
+00183 
+00185 
+00187 // Only used in LinuxDevice.
+00188 #define _IRR_COMPILE_WITH_X11_
+00189 #ifdef NO_IRR_COMPILE_WITH_X11_
+00190 #undef _IRR_COMPILE_WITH_X11_
+00191 #endif
+00192 
+00194 
+00196 #if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_)
+00197 #define _IRR_OPENGL_USE_EXTPOINTER_
+00198 #endif
+00199 
+00203 #if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_)
+00204 #define _IRR_LINUX_X11_VIDMODE_
+00205 //#define _IRR_LINUX_X11_RANDR_
+00206 #ifdef NO_IRR_LINUX_X11_VIDMODE_
+00207 #undef _IRR_LINUX_X11_VIDMODE_
+00208 #endif
+00209 #ifdef NO_IRR_LINUX_X11_RANDR_
+00210 #undef _IRR_LINUX_X11_RANDR_
+00211 #endif
+00212 
+00216 //#define _IRR_LINUX_XCURSOR_
+00217 #ifdef NO_IRR_LINUX_XCURSOR_
+00218 #undef _IRR_LINUX_XCURSOR_
+00219 #endif
+00220 
+00221 #endif
+00222 
+00224 
+00226 #define _IRR_COMPILE_WITH_GUI_
+00227 #ifdef NO_IRR_COMPILE_WITH_GUI_
+00228 #undef _IRR_COMPILE_WITH_GUI_
+00229 #endif
+00230 
+00232 
+00236 //#define _IRR_WCHAR_FILESYSTEM
+00237 #ifdef NO_IRR_WCHAR_FILESYSTEM
+00238 #undef _IRR_WCHAR_FILESYSTEM
+00239 #endif
+00240 
+00242 
+00244 #define _IRR_COMPILE_WITH_LIBJPEG_
+00245 #ifdef NO_IRR_COMPILE_WITH_LIBJPEG_
+00246 #undef _IRR_COMPILE_WITH_LIBJPEG_
+00247 #endif
+00248 
+00250 
+00252 #define _IRR_USE_NON_SYSTEM_JPEG_LIB_
+00253 #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
+00254 #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
+00255 #endif
+00256 
+00258 
+00260 #define _IRR_COMPILE_WITH_LIBPNG_
+00261 #ifdef NO_IRR_COMPILE_WITH_LIBPNG_
+00262 #undef _IRR_COMPILE_WITH_LIBPNG_
+00263 #endif
+00264 
+00266 
+00268 #define _IRR_USE_NON_SYSTEM_LIB_PNG_
+00269 #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
+00270 #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
+00271 #endif
+00272 
+00274 
+00283 #define _IRR_D3D_NO_SHADER_DEBUGGING
+00284 #ifdef NO_IRR_D3D_NO_SHADER_DEBUGGING
+00285 #undef _IRR_D3D_NO_SHADER_DEBUGGING
+00286 #endif
+00287 
+00289 
+00293 //#define _IRR_D3D_USE_LEGACY_HLSL_COMPILER
+00294 #ifdef NO_IRR_D3D_USE_LEGACY_HLSL_COMPILER
+00295 #undef _IRR_D3D_USE_LEGACY_HLSL_COMPILER
+00296 #endif
+00297 
+00299 //#define _IRR_COMPILE_WITH_CG_
+00300 #ifdef NO_IRR_COMPILE_WITH_CG_
+00301 #undef _IRR_COMPILE_WITH_CG_
+00302 #endif
+00303 #if !defined(_IRR_COMPILE_WITH_OPENGL_) && !defined(_IRR_COMPILE_WITH_DIRECT3D_9_)
+00304 #undef _IRR_COMPILE_WITH_CG_
+00305 #endif
+00306 
+00308 
+00310 #undef _IRR_USE_NVIDIA_PERFHUD_
+00311 
+00313 
+00330 #define BURNINGVIDEO_RENDERER_BEAUTIFUL
+00331 //#define BURNINGVIDEO_RENDERER_FAST
+00332 //#define BURNINGVIDEO_RENDERER_ULTRA_FAST
+00333 //#define BURNINGVIDEO_RENDERER_CE
+00334 
+00336 //#define IGNORE_DEPRECATED_WARNING
+00337 
+00339 
+00340 #define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_
+00341 #ifdef NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_
+00342 #undef _IRR_COMPILE_WITH_IRR_SCENE_LOADER_
+00343 #endif
+00344 
+00346 
+00348 #define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
+00349 #ifdef NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
+00350 #undef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
+00351 #endif
+00352 
+00353 #ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
+00354 
+00355 #define _IRR_COMPILE_WITH_B3D_LOADER_
+00356 #ifdef NO_IRR_COMPILE_WITH_B3D_LOADER_
+00357 #undef _IRR_COMPILE_WITH_B3D_LOADER_
+00358 #endif
+00359 
+00360 #define _IRR_COMPILE_WITH_MS3D_LOADER_
+00361 #ifdef NO_IRR_COMPILE_WITH_MS3D_LOADER_
+00362 #undef _IRR_COMPILE_WITH_MS3D_LOADER_
+00363 #endif
+00364 
+00365 #define _IRR_COMPILE_WITH_X_LOADER_
+00366 #ifdef NO_IRR_COMPILE_WITH_X_LOADER_
+00367 #undef _IRR_COMPILE_WITH_X_LOADER_
+00368 #endif
+00369 
+00370 #define _IRR_COMPILE_WITH_OGRE_LOADER_
+00371 #ifdef NO_IRR_COMPILE_WITH_OGRE_LOADER_
+00372 #undef _IRR_COMPILE_WITH_OGRE_LOADER_
+00373 #endif
+00374 #endif  // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
+00375 
+00377 #define _IRR_COMPILE_WITH_IRR_MESH_LOADER_
+00378 #ifdef NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_
+00379 #undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_
+00380 #endif
+00381 
+00382 #define _IRR_COMPILE_WITH_HALFLIFE_LOADER_
+00383 #ifdef NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_
+00384 #undef _IRR_COMPILE_WITH_HALFLIFE_LOADER_
+00385 #endif
+00386 
+00387 #define _IRR_COMPILE_WITH_MD2_LOADER_
+00388 #ifdef NO_IRR_COMPILE_WITH_MD2_LOADER_
+00389 #undef _IRR_COMPILE_WITH_MD2_LOADER_
+00390 #endif
+00391 
+00392 #define _IRR_COMPILE_WITH_MD3_LOADER_
+00393 #ifdef NO_IRR_COMPILE_WITH_MD3_LOADER_
+00394 #undef _IRR_COMPILE_WITH_MD3_LOADER_
+00395 #endif
+00396 
+00397 #define _IRR_COMPILE_WITH_3DS_LOADER_
+00398 #ifdef NO_IRR_COMPILE_WITH_3DS_LOADER_
+00399 #undef _IRR_COMPILE_WITH_3DS_LOADER_
+00400 #endif
+00401 
+00402 #define _IRR_COMPILE_WITH_COLLADA_LOADER_
+00403 #ifdef NO_IRR_COMPILE_WITH_COLLADA_LOADER_
+00404 #undef _IRR_COMPILE_WITH_COLLADA_LOADER_
+00405 #endif
+00406 
+00407 #define _IRR_COMPILE_WITH_CSM_LOADER_
+00408 #ifdef NO_IRR_COMPILE_WITH_CSM_LOADER_
+00409 #undef _IRR_COMPILE_WITH_CSM_LOADER_
+00410 #endif
+00411 
+00412 #define _IRR_COMPILE_WITH_BSP_LOADER_
+00413 #ifdef NO_IRR_COMPILE_WITH_BSP_LOADER_
+00414 #undef _IRR_COMPILE_WITH_BSP_LOADER_
+00415 #endif
+00416 
+00417 #define _IRR_COMPILE_WITH_DMF_LOADER_
+00418 #ifdef NO_IRR_COMPILE_WITH_DMF_LOADER_
+00419 #undef _IRR_COMPILE_WITH_DMF_LOADER_
+00420 #endif
+00421 
+00422 #define _IRR_COMPILE_WITH_LMTS_LOADER_
+00423 #ifdef NO_IRR_COMPILE_WITH_LMTS_LOADER_
+00424 #undef _IRR_COMPILE_WITH_LMTS_LOADER_
+00425 #endif
+00426 
+00427 #define _IRR_COMPILE_WITH_MY3D_LOADER_
+00428 #ifdef NO_IRR_COMPILE_WITH_MY3D_LOADER_
+00429 #undef _IRR_COMPILE_WITH_MY3D_LOADER_
+00430 #endif
+00431 
+00432 #define _IRR_COMPILE_WITH_OBJ_LOADER_
+00433 #ifdef NO_IRR_COMPILE_WITH_OBJ_LOADER_
+00434 #undef _IRR_COMPILE_WITH_OBJ_LOADER_
+00435 #endif
+00436 
+00437 #define _IRR_COMPILE_WITH_OCT_LOADER_
+00438 #ifdef NO_IRR_COMPILE_WITH_OCT_LOADER_
+00439 #undef _IRR_COMPILE_WITH_OCT_LOADER_
+00440 #endif
+00441 
+00442 #define _IRR_COMPILE_WITH_LWO_LOADER_
+00443 #ifdef NO_IRR_COMPILE_WITH_LWO_LOADER_
+00444 #undef _IRR_COMPILE_WITH_LWO_LOADER_
+00445 #endif
+00446 
+00447 #define _IRR_COMPILE_WITH_STL_LOADER_
+00448 #ifdef NO_IRR_COMPILE_WITH_STL_LOADER_
+00449 #undef _IRR_COMPILE_WITH_STL_LOADER_
+00450 #endif
+00451 
+00452 #define _IRR_COMPILE_WITH_PLY_LOADER_
+00453 #ifdef NO_IRR_COMPILE_WITH_PLY_LOADER_
+00454 #undef _IRR_COMPILE_WITH_PLY_LOADER_
+00455 #endif
+00456 
+00457 #define _IRR_COMPILE_WITH_SMF_LOADER_
+00458 #ifdef NO_IRR_COMPILE_WITH_SMF_LOADER_
+00459 #undef _IRR_COMPILE_WITH_SMF_LOADER_
+00460 #endif
+00461 
+00463 #define _IRR_COMPILE_WITH_IRR_WRITER_
+00464 #ifdef NO_IRR_COMPILE_WITH_IRR_WRITER_
+00465 #undef _IRR_COMPILE_WITH_IRR_WRITER_
+00466 #endif
+00467 
+00468 #define _IRR_COMPILE_WITH_COLLADA_WRITER_
+00469 #ifdef NO_IRR_COMPILE_WITH_COLLADA_WRITER_
+00470 #undef _IRR_COMPILE_WITH_COLLADA_WRITER_
+00471 #endif
+00472 
+00473 #define _IRR_COMPILE_WITH_STL_WRITER_
+00474 #ifdef NO_IRR_COMPILE_WITH_STL_WRITER_
+00475 #undef _IRR_COMPILE_WITH_STL_WRITER_
+00476 #endif
+00477 
+00478 #define _IRR_COMPILE_WITH_OBJ_WRITER_
+00479 #ifdef NO_IRR_COMPILE_WITH_OBJ_WRITER_
+00480 #undef _IRR_COMPILE_WITH_OBJ_WRITER_
+00481 #endif
+00482 
+00483 #define _IRR_COMPILE_WITH_PLY_WRITER_
+00484 #ifdef NO_IRR_COMPILE_WITH_PLY_WRITER_
+00485 #undef _IRR_COMPILE_WITH_PLY_WRITER_
+00486 #endif
+00487 
+00490 #define _IRR_COMPILE_WITH_BMP_LOADER_
+00491 #ifdef NO_IRR_COMPILE_WITH_BMP_LOADER_
+00492 #undef _IRR_COMPILE_WITH_BMP_LOADER_
+00493 #endif
+00494 
+00495 #define _IRR_COMPILE_WITH_JPG_LOADER_
+00496 #ifdef NO_IRR_COMPILE_WITH_JPG_LOADER_
+00497 #undef _IRR_COMPILE_WITH_JPG_LOADER_
+00498 #endif
+00499 
+00500 #define _IRR_COMPILE_WITH_PCX_LOADER_
+00501 #ifdef NO_IRR_COMPILE_WITH_PCX_LOADER_
+00502 #undef _IRR_COMPILE_WITH_PCX_LOADER_
+00503 #endif
+00504 
+00505 #define _IRR_COMPILE_WITH_PNG_LOADER_
+00506 #ifdef NO_IRR_COMPILE_WITH_PNG_LOADER_
+00507 #undef _IRR_COMPILE_WITH_PNG_LOADER_
+00508 #endif
+00509 
+00510 #define _IRR_COMPILE_WITH_PPM_LOADER_
+00511 #ifdef NO_IRR_COMPILE_WITH_PPM_LOADER_
+00512 #undef _IRR_COMPILE_WITH_PPM_LOADER_
+00513 #endif
+00514 
+00515 #define _IRR_COMPILE_WITH_PSD_LOADER_
+00516 #ifdef NO_IRR_COMPILE_WITH_PSD_LOADER_
+00517 #undef _IRR_COMPILE_WITH_PSD_LOADER_
+00518 #endif
+00519 
+00520 // Outcommented because
+00521 // a) it doesn't compile on 64-bit currently
+00522 // b) anyone enabling it should be aware that S3TC compression algorithm which might be used in that loader
+00523 // is patented in the US by S3 and they do collect license fees when it's used in applications.
+00524 // So if you are unfortunate enough to develop applications for US market and their broken patent system be careful.
+00525 // #define _IRR_COMPILE_WITH_DDS_LOADER_
+00526 #ifdef NO_IRR_COMPILE_WITH_DDS_LOADER_
+00527 #undef _IRR_COMPILE_WITH_DDS_LOADER_
+00528 #endif
+00529 
+00530 #define _IRR_COMPILE_WITH_TGA_LOADER_
+00531 #ifdef NO_IRR_COMPILE_WITH_TGA_LOADER_
+00532 #undef _IRR_COMPILE_WITH_TGA_LOADER_
+00533 #endif
+00534 
+00535 #define _IRR_COMPILE_WITH_WAL_LOADER_
+00536 #ifdef NO_IRR_COMPILE_WITH_WAL_LOADER_
+00537 #undef _IRR_COMPILE_WITH_WAL_LOADER_
+00538 #endif
+00539 
+00540 #define _IRR_COMPILE_WITH_LMP_LOADER_
+00541 #ifdef NO_IRR_COMPILE_WITH_LMP_LOADER_
+00542 #undef _IRR_COMPILE_WITH_LMP_LOADER_
+00543 #endif
+00544 
+00545 #define _IRR_COMPILE_WITH_RGB_LOADER_
+00546 #ifdef NO_IRR_COMPILE_WITH_RGB_LOADER_
+00547 #undef _IRR_COMPILE_WITH_RGB_LOADER_
+00548 #endif
+00549 
+00551 #define _IRR_COMPILE_WITH_BMP_WRITER_
+00552 #ifdef NO_IRR_COMPILE_WITH_BMP_WRITER_
+00553 #undef _IRR_COMPILE_WITH_BMP_WRITER_
+00554 #endif
+00555 
+00556 #define _IRR_COMPILE_WITH_JPG_WRITER_
+00557 #ifdef NO_IRR_COMPILE_WITH_JPG_WRITER_
+00558 #undef _IRR_COMPILE_WITH_JPG_WRITER_
+00559 #endif
+00560 
+00561 #define _IRR_COMPILE_WITH_PCX_WRITER_
+00562 #ifdef NO_IRR_COMPILE_WITH_PCX_WRITER_
+00563 #undef _IRR_COMPILE_WITH_PCX_WRITER_
+00564 #endif
+00565 
+00566 #define _IRR_COMPILE_WITH_PNG_WRITER_
+00567 #ifdef NO_IRR_COMPILE_WITH_PNG_WRITER_
+00568 #undef _IRR_COMPILE_WITH_PNG_WRITER_
+00569 #endif
+00570 
+00571 #define _IRR_COMPILE_WITH_PPM_WRITER_
+00572 #ifdef NO_IRR_COMPILE_WITH_PPM_WRITER_
+00573 #undef _IRR_COMPILE_WITH_PPM_WRITER_
+00574 #endif
+00575 
+00576 #define _IRR_COMPILE_WITH_PSD_WRITER_
+00577 #ifdef NO_IRR_COMPILE_WITH_PSD_WRITER_
+00578 #undef _IRR_COMPILE_WITH_PSD_WRITER_
+00579 #endif
+00580 
+00581 #define _IRR_COMPILE_WITH_TGA_WRITER_
+00582 #ifdef NO_IRR_COMPILE_WITH_TGA_WRITER_
+00583 #undef _IRR_COMPILE_WITH_TGA_WRITER_
+00584 #endif
+00585 
+00587 
+00588 #define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
+00589 #ifdef NO__IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
+00590 #undef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
+00591 #endif
+00592 #ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
+00593 
+00594 
+00597 #define _IRR_COMPILE_WITH_ZLIB_
+00598 #ifdef NO_IRR_COMPILE_WITH_ZLIB_
+00599 #undef _IRR_COMPILE_WITH_ZLIB_
+00600 #endif
+00601 
+00602 
+00605 #define _IRR_USE_NON_SYSTEM_ZLIB_
+00606 #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
+00607 #undef _IRR_USE_NON_SYSTEM_ZLIB_
+00608 #endif
+00609 
+00610 #define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
+00611 #ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_
+00612 #undef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
+00613 #endif
+00614 
+00615 
+00618 #define _IRR_COMPILE_WITH_BZIP2_
+00619 #ifdef NO_IRR_COMPILE_WITH_BZIP2_
+00620 #undef _IRR_COMPILE_WITH_BZIP2_
+00621 #endif
+00622 
+00623 
+00626 #define _IRR_USE_NON_SYSTEM_BZLIB_
+00627 #ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_
+00628 #undef _IRR_USE_NON_SYSTEM_BZLIB_
+00629 #endif
+00630 
+00631 
+00633 #define _IRR_COMPILE_WITH_LZMA_
+00634 #ifdef NO_IRR_COMPILE_WITH_LZMA_
+00635 #undef _IRR_COMPILE_WITH_LZMA_
+00636 #endif
+00637 #endif
+00638 
+00640 #define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
+00641 #ifdef NO__IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
+00642 #undef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
+00643 #endif
+00644 
+00645 #define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
+00646 #ifdef NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
+00647 #undef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
+00648 #endif
+00649 
+00650 #define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
+00651 #ifdef NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
+00652 #undef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
+00653 #endif
+00654 
+00655 #define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
+00656 #ifdef NO__IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
+00657 #undef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
+00658 #endif
+00659 
+00660 #define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
+00661 #ifdef NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
+00662 #undef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
+00663 #endif
+00664 
+00666 
+00669 #if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_)
+00670     //#define IRRLICHT_FAST_MATH
+00671     #ifdef NO_IRRLICHT_FAST_MATH
+00672     #undef IRRLICHT_FAST_MATH
+00673     #endif
+00674 #endif
+00675 
+00676 // Some cleanup and standard stuff
+00677 
+00678 #ifdef _IRR_WINDOWS_API_
+00679 
+00680 // To build Irrlicht as a static library, you must define _IRR_STATIC_LIB_ in both the
+00681 // Irrlicht build, *and* in the user application, before #including <irrlicht.h>
+00682 #ifndef _IRR_STATIC_LIB_
+00683 #ifdef IRRLICHT_EXPORTS
+00684 #define IRRLICHT_API __declspec(dllexport)
+00685 #else
+00686 #define IRRLICHT_API __declspec(dllimport)
+00687 #endif // IRRLICHT_EXPORT
+00688 #else
+00689 #define IRRLICHT_API
+00690 #endif // _IRR_STATIC_LIB_
+00691 
+00692 // Declare the calling convention.
+00693 #if defined(_STDCALL_SUPPORTED)
+00694 #define IRRCALLCONV __stdcall
+00695 #else
+00696 #define IRRCALLCONV __cdecl
+00697 #endif // STDCALL_SUPPORTED
+00698 
+00699 #else // _IRR_WINDOWS_API_
+00700 
+00701 // Force symbol export in shared libraries built with gcc.
+00702 #if (__GNUC__ >= 4) && !defined(_IRR_STATIC_LIB_) && defined(IRRLICHT_EXPORTS)
+00703 #define IRRLICHT_API __attribute__ ((visibility("default")))
+00704 #else
+00705 #define IRRLICHT_API
+00706 #endif
+00707 
+00708 #define IRRCALLCONV
+00709 
+00710 #endif // _IRR_WINDOWS_API_
+00711 
+00712 // We need to disable DIRECT3D9 support for Visual Studio 6.0 because
+00713 // those $%&$!! disabled support for it since Dec. 2004 and users are complaining
+00714 // about linker errors. Comment this out only if you are knowing what you are
+00715 // doing. (Which means you have an old DX9 SDK and VisualStudio6).
+00716 #ifdef _MSC_VER
+00717 #if (_MSC_VER < 1300 && !defined(__GNUC__))
+00718 #undef _IRR_COMPILE_WITH_DIRECT3D_9_
+00719 #pragma message("Compiling Irrlicht with Visual Studio 6.0, support for DX9 is disabled.")
+00720 #endif
+00721 #endif
+00722 
+00723 // XBox does not have OpenGL or DirectX9
+00724 #if defined(_IRR_XBOX_PLATFORM_)
+00725     #undef _IRR_COMPILE_WITH_OPENGL_
+00726     #undef _IRR_COMPILE_WITH_DIRECT3D_9_
+00727 #endif
+00728 
+00730 #if defined(_WIN32_WCE)
+00731     #undef _IRR_COMPILE_WITH_OPENGL_
+00732     #undef _IRR_COMPILE_WITH_DIRECT3D_8_
+00733     #undef _IRR_COMPILE_WITH_DIRECT3D_9_
+00734 
+00735     #undef BURNINGVIDEO_RENDERER_BEAUTIFUL
+00736     #undef BURNINGVIDEO_RENDERER_FAST
+00737     #undef BURNINGVIDEO_RENDERER_ULTRA_FAST
+00738     #define BURNINGVIDEO_RENDERER_CE
+00739 
+00740     #undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
+00741     #define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
+00742     //#define _IRR_WCHAR_FILESYSTEM
+00743 
+00744     #undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_
+00745     //#undef _IRR_COMPILE_WITH_MD2_LOADER_
+00746     #undef _IRR_COMPILE_WITH_MD3_LOADER_
+00747     #undef _IRR_COMPILE_WITH_3DS_LOADER_
+00748     #undef _IRR_COMPILE_WITH_COLLADA_LOADER_
+00749     #undef _IRR_COMPILE_WITH_CSM_LOADER_
+00750     #undef _IRR_COMPILE_WITH_BSP_LOADER_
+00751     #undef _IRR_COMPILE_WITH_DMF_LOADER_
+00752     #undef _IRR_COMPILE_WITH_LMTS_LOADER_
+00753     #undef _IRR_COMPILE_WITH_MY3D_LOADER_
+00754     #undef _IRR_COMPILE_WITH_OBJ_LOADER_
+00755     #undef _IRR_COMPILE_WITH_OCT_LOADER_
+00756     #undef _IRR_COMPILE_WITH_OGRE_LOADER_
+00757     #undef _IRR_COMPILE_WITH_LWO_LOADER_
+00758     #undef _IRR_COMPILE_WITH_STL_LOADER_
+00759     #undef _IRR_COMPILE_WITH_IRR_WRITER_
+00760     #undef _IRR_COMPILE_WITH_COLLADA_WRITER_
+00761     #undef _IRR_COMPILE_WITH_STL_WRITER_
+00762     #undef _IRR_COMPILE_WITH_OBJ_WRITER_
+00763     //#undef _IRR_COMPILE_WITH_BMP_LOADER_
+00764     //#undef _IRR_COMPILE_WITH_JPG_LOADER_
+00765     #undef _IRR_COMPILE_WITH_PCX_LOADER_
+00766     //#undef _IRR_COMPILE_WITH_PNG_LOADER_
+00767     #undef _IRR_COMPILE_WITH_PPM_LOADER_
+00768     #undef _IRR_COMPILE_WITH_PSD_LOADER_
+00769     //#undef _IRR_COMPILE_WITH_TGA_LOADER_
+00770     #undef _IRR_COMPILE_WITH_WAL_LOADER_
+00771     #undef _IRR_COMPILE_WITH_BMP_WRITER_
+00772     #undef _IRR_COMPILE_WITH_JPG_WRITER_
+00773     #undef _IRR_COMPILE_WITH_PCX_WRITER_
+00774     #undef _IRR_COMPILE_WITH_PNG_WRITER_
+00775     #undef _IRR_COMPILE_WITH_PPM_WRITER_
+00776     #undef _IRR_COMPILE_WITH_PSD_WRITER_
+00777     #undef _IRR_COMPILE_WITH_TGA_WRITER_
+00778 
+00779 #endif
+00780 
+00781 #ifndef _IRR_WINDOWS_API_
+00782     #undef _IRR_WCHAR_FILESYSTEM
+00783 #endif
+00784 
+00785 #if defined(__sparc__) || defined(__sun__)
+00786 #define __BIG_ENDIAN__
+00787 #endif
+00788 
+00789 #if defined(_IRR_SOLARIS_PLATFORM_)
+00790     #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
+00791 #endif
+00792 
+00794 #define __IRR_HAS_S64
+00795 #ifdef NO__IRR_HAS_S64
+00796 #undef __IRR_HAS_S64
+00797 #endif
+00798 
+00799 #if defined(__BORLANDC__)
+00800     #include <tchar.h>
+00801 
+00802     // Borland 5.5.1 does not have _strcmpi defined
+00803     #if __BORLANDC__ == 0x551
+00804     //    #define _strcmpi strcmpi
+00805         #undef _tfinddata_t
+00806         #undef _tfindfirst
+00807         #undef _tfindnext
+00808 
+00809         #define _tfinddata_t __tfinddata_t
+00810         #define _tfindfirst  __tfindfirst
+00811         #define _tfindnext   __tfindnext
+00812         typedef long intptr_t;
+00813     #endif
+00814 
+00815 #endif
+00816 
+00817 #ifdef _DEBUG
+00818 
+00819     // NOTE: Those attributes were used always until 1.8.0 and became a global define for 1.8.1
+00820     // which is only enabled in debug because it had a large (sometimes >5%) impact on speed.
+00821     // A better solution in the long run is to break the interface and remove _all_ attribute
+00822     // access in functions like CSceneManager::drawAll and instead put that information in some
+00823     // own struct/class or in CSceneManager.
+00824     // See http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion.
+00825     #define _IRR_SCENEMANAGER_DEBUG
+00826     #ifdef NO_IRR_SCENEMANAGER_DEBUG
+00827         #undef _IRR_SCENEMANAGER_DEBUG
+00828     #endif
+00829 #endif
+00830 
+00831 #endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
+00832 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h.html b/src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h.html new file mode 100644 index 0000000..4a7cfe9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: IrrlichtDevice.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
IrrlichtDevice.h File Reference
+
+
+
#include "IReferenceCounted.h"
+#include "dimension2d.h"
+#include "IVideoDriver.h"
+#include "EDriverTypes.h"
+#include "EDeviceTypes.h"
+#include "IEventReceiver.h"
+#include "ICursorControl.h"
+#include "IVideoModeList.h"
+#include "ITimer.h"
+#include "IOSOperator.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h_source.html new file mode 100644 index 0000000..cef2c07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_irrlicht_device_8h_source.html @@ -0,0 +1,313 @@ + + + + +Irrlicht 3D Engine: IrrlichtDevice.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
IrrlichtDevice.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__
+00006 #define __I_IRRLICHT_DEVICE_H_INCLUDED__
+00007 
+00008 #include "IReferenceCounted.h"
+00009 #include "dimension2d.h"
+00010 #include "IVideoDriver.h"
+00011 #include "EDriverTypes.h"
+00012 #include "EDeviceTypes.h"
+00013 #include "IEventReceiver.h"
+00014 #include "ICursorControl.h"
+00015 #include "IVideoModeList.h"
+00016 #include "ITimer.h"
+00017 #include "IOSOperator.h"
+00018 
+00019 namespace irr
+00020 {
+00021     class ILogger;
+00022     class IEventReceiver;
+00023     class IRandomizer;
+00024 
+00025     namespace io {
+00026         class IFileSystem;
+00027     } // end namespace io
+00028 
+00029     namespace gui {
+00030         class IGUIEnvironment;
+00031     } // end namespace gui
+00032 
+00033     namespace scene {
+00034         class ISceneManager;
+00035     } // end namespace scene
+00036 
+00038 
+00043     class IrrlichtDevice : public virtual IReferenceCounted
+00044     {
+00045     public:
+00046 
+00048 
+00072         virtual bool run() = 0;
+00073 
+00075 
+00077         virtual void yield() = 0;
+00078 
+00080 
+00084         virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0;
+00085 
+00087 
+00088         virtual video::IVideoDriver* getVideoDriver() = 0;
+00089 
+00091 
+00092         virtual io::IFileSystem* getFileSystem() = 0;
+00093 
+00095 
+00096         virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
+00097 
+00099 
+00100         virtual scene::ISceneManager* getSceneManager() = 0;
+00101 
+00103 
+00104         virtual gui::ICursorControl* getCursorControl() = 0;
+00105 
+00107 
+00108         virtual ILogger* getLogger() = 0;
+00109 
+00111 
+00119         virtual video::IVideoModeList* getVideoModeList() = 0;
+00120 
+00122 
+00127         virtual IOSOperator* getOSOperator() = 0;
+00128 
+00130 
+00133         virtual ITimer* getTimer() = 0;
+00134 
+00136 
+00137         virtual IRandomizer* getRandomizer() const =0;
+00138 
+00140 
+00143         virtual void setRandomizer(IRandomizer* r) =0;
+00144 
+00146 
+00149         virtual IRandomizer* createDefaultRandomizer() const =0;
+00150 
+00152 
+00153         virtual void setWindowCaption(const wchar_t* text) = 0;
+00154 
+00156 
+00171         virtual bool isWindowActive() const = 0;
+00172 
+00174 
+00175         virtual bool isWindowFocused() const = 0;
+00176 
+00178 
+00179         virtual bool isWindowMinimized() const = 0;
+00180 
+00182 
+00183         virtual bool isFullscreen() const = 0;
+00184 
+00186 
+00187         virtual video::ECOLOR_FORMAT getColorFormat() const = 0;
+00188 
+00190 
+00191         virtual void closeDevice() = 0;
+00192 
+00194 
+00197         virtual const c8* getVersion() const = 0;
+00198 
+00200 
+00204         virtual void setEventReceiver(IEventReceiver* receiver) = 0;
+00205 
+00207 
+00208         virtual IEventReceiver* getEventReceiver() = 0;
+00209 
+00211 
+00216         virtual bool postEventFromUser(const SEvent& event) = 0;
+00217 
+00219 
+00222         virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0;
+00223 
+00225 
+00228         virtual void setResizable(bool resize=false) = 0;
+00229 
+00231         virtual void minimizeWindow() =0;
+00232 
+00234         virtual void maximizeWindow() =0;
+00235 
+00237         virtual void restoreWindow() =0;
+00238 
+00240 
+00247         virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo) =0;
+00248 
+00250         virtual bool setGammaRamp(f32 red, f32 green, f32 blue,
+00251                     f32 relativebrightness, f32 relativecontrast) =0;
+00252 
+00254         virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue,
+00255                     f32 &brightness, f32 &contrast) =0;
+00256 
+00258 
+00267         virtual void clearSystemMessages() = 0;
+00268 
+00270 
+00272         virtual E_DEVICE_TYPE getType() const = 0;
+00273 
+00275 
+00277         static bool isDriverSupported(video::E_DRIVER_TYPE driver)
+00278         {
+00279             switch (driver)
+00280             {
+00281                 case video::EDT_NULL:
+00282                     return true;
+00283                 case video::EDT_SOFTWARE:
+00284 #ifdef _IRR_COMPILE_WITH_SOFTWARE_
+00285                     return true;
+00286 #else
+00287                     return false;
+00288 #endif
+00289                 case video::EDT_BURNINGSVIDEO:
+00290 #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
+00291                     return true;
+00292 #else
+00293                     return false;
+00294 #endif
+00295                 case video::EDT_DIRECT3D8:
+00296 #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_
+00297                     return true;
+00298 #else
+00299                     return false;
+00300 #endif
+00301                 case video::EDT_DIRECT3D9:
+00302 #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
+00303                     return true;
+00304 #else
+00305                     return false;
+00306 #endif
+00307                 case video::EDT_OPENGL:
+00308 #ifdef _IRR_COMPILE_WITH_OPENGL_
+00309                     return true;
+00310 #else
+00311                     return false;
+00312 #endif
+00313                 default:
+00314                     return false;
+00315             }
+00316         }
+00317     };
+00318 
+00319 } // end namespace irr
+00320 
+00321 #endif
+00322 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_keycodes_8h.html b/src/others/irrlicht-1.8.1/doc/html/_keycodes_8h.html new file mode 100644 index 0000000..f8f1065 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_keycodes_8h.html @@ -0,0 +1,330 @@ + + + + +Irrlicht 3D Engine: Keycodes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Keycodes.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_keycodes_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_keycodes_8h_source.html new file mode 100644 index 0000000..1cce97c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_keycodes_8h_source.html @@ -0,0 +1,293 @@ + + + + +Irrlicht 3D Engine: Keycodes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Keycodes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_KEY_CODES_H_INCLUDED__
+00006 #define __IRR_KEY_CODES_H_INCLUDED__
+00007 
+00008 namespace irr
+00009 {
+00010 
+00011     enum EKEY_CODE
+00012     {
+00013         KEY_LBUTTON          = 0x01,  // Left mouse button
+00014         KEY_RBUTTON          = 0x02,  // Right mouse button
+00015         KEY_CANCEL           = 0x03,  // Control-break processing
+00016         KEY_MBUTTON          = 0x04,  // Middle mouse button (three-button mouse)
+00017         KEY_XBUTTON1         = 0x05,  // Windows 2000/XP: X1 mouse button
+00018         KEY_XBUTTON2         = 0x06,  // Windows 2000/XP: X2 mouse button
+00019         KEY_BACK             = 0x08,  // BACKSPACE key
+00020         KEY_TAB              = 0x09,  // TAB key
+00021         KEY_CLEAR            = 0x0C,  // CLEAR key
+00022         KEY_RETURN           = 0x0D,  // ENTER key
+00023         KEY_SHIFT            = 0x10,  // SHIFT key
+00024         KEY_CONTROL          = 0x11,  // CTRL key
+00025         KEY_MENU             = 0x12,  // ALT key
+00026         KEY_PAUSE            = 0x13,  // PAUSE key
+00027         KEY_CAPITAL          = 0x14,  // CAPS LOCK key
+00028         KEY_KANA             = 0x15,  // IME Kana mode
+00029         KEY_HANGUEL          = 0x15,  // IME Hanguel mode (maintained for compatibility use KEY_HANGUL)
+00030         KEY_HANGUL           = 0x15,  // IME Hangul mode
+00031         KEY_JUNJA            = 0x17,  // IME Junja mode
+00032         KEY_FINAL            = 0x18,  // IME final mode
+00033         KEY_HANJA            = 0x19,  // IME Hanja mode
+00034         KEY_KANJI            = 0x19,  // IME Kanji mode
+00035         KEY_ESCAPE           = 0x1B,  // ESC key
+00036         KEY_CONVERT          = 0x1C,  // IME convert
+00037         KEY_NONCONVERT       = 0x1D,  // IME nonconvert
+00038         KEY_ACCEPT           = 0x1E,  // IME accept
+00039         KEY_MODECHANGE       = 0x1F,  // IME mode change request
+00040         KEY_SPACE            = 0x20,  // SPACEBAR
+00041         KEY_PRIOR            = 0x21,  // PAGE UP key
+00042         KEY_NEXT             = 0x22,  // PAGE DOWN key
+00043         KEY_END              = 0x23,  // END key
+00044         KEY_HOME             = 0x24,  // HOME key
+00045         KEY_LEFT             = 0x25,  // LEFT ARROW key
+00046         KEY_UP               = 0x26,  // UP ARROW key
+00047         KEY_RIGHT            = 0x27,  // RIGHT ARROW key
+00048         KEY_DOWN             = 0x28,  // DOWN ARROW key
+00049         KEY_SELECT           = 0x29,  // SELECT key
+00050         KEY_PRINT            = 0x2A,  // PRINT key
+00051         KEY_EXECUT           = 0x2B,  // EXECUTE key
+00052         KEY_SNAPSHOT         = 0x2C,  // PRINT SCREEN key
+00053         KEY_INSERT           = 0x2D,  // INS key
+00054         KEY_DELETE           = 0x2E,  // DEL key
+00055         KEY_HELP             = 0x2F,  // HELP key
+00056         KEY_KEY_0            = 0x30,  // 0 key
+00057         KEY_KEY_1            = 0x31,  // 1 key
+00058         KEY_KEY_2            = 0x32,  // 2 key
+00059         KEY_KEY_3            = 0x33,  // 3 key
+00060         KEY_KEY_4            = 0x34,  // 4 key
+00061         KEY_KEY_5            = 0x35,  // 5 key
+00062         KEY_KEY_6            = 0x36,  // 6 key
+00063         KEY_KEY_7            = 0x37,  // 7 key
+00064         KEY_KEY_8            = 0x38,  // 8 key
+00065         KEY_KEY_9            = 0x39,  // 9 key
+00066         KEY_KEY_A            = 0x41,  // A key
+00067         KEY_KEY_B            = 0x42,  // B key
+00068         KEY_KEY_C            = 0x43,  // C key
+00069         KEY_KEY_D            = 0x44,  // D key
+00070         KEY_KEY_E            = 0x45,  // E key
+00071         KEY_KEY_F            = 0x46,  // F key
+00072         KEY_KEY_G            = 0x47,  // G key
+00073         KEY_KEY_H            = 0x48,  // H key
+00074         KEY_KEY_I            = 0x49,  // I key
+00075         KEY_KEY_J            = 0x4A,  // J key
+00076         KEY_KEY_K            = 0x4B,  // K key
+00077         KEY_KEY_L            = 0x4C,  // L key
+00078         KEY_KEY_M            = 0x4D,  // M key
+00079         KEY_KEY_N            = 0x4E,  // N key
+00080         KEY_KEY_O            = 0x4F,  // O key
+00081         KEY_KEY_P            = 0x50,  // P key
+00082         KEY_KEY_Q            = 0x51,  // Q key
+00083         KEY_KEY_R            = 0x52,  // R key
+00084         KEY_KEY_S            = 0x53,  // S key
+00085         KEY_KEY_T            = 0x54,  // T key
+00086         KEY_KEY_U            = 0x55,  // U key
+00087         KEY_KEY_V            = 0x56,  // V key
+00088         KEY_KEY_W            = 0x57,  // W key
+00089         KEY_KEY_X            = 0x58,  // X key
+00090         KEY_KEY_Y            = 0x59,  // Y key
+00091         KEY_KEY_Z            = 0x5A,  // Z key
+00092         KEY_LWIN             = 0x5B,  // Left Windows key (Microsoft Natural keyboard)
+00093         KEY_RWIN             = 0x5C,  // Right Windows key (Natural keyboard)
+00094         KEY_APPS             = 0x5D,  // Applications key (Natural keyboard)
+00095         KEY_SLEEP            = 0x5F,  // Computer Sleep key
+00096         KEY_NUMPAD0          = 0x60,  // Numeric keypad 0 key
+00097         KEY_NUMPAD1          = 0x61,  // Numeric keypad 1 key
+00098         KEY_NUMPAD2          = 0x62,  // Numeric keypad 2 key
+00099         KEY_NUMPAD3          = 0x63,  // Numeric keypad 3 key
+00100         KEY_NUMPAD4          = 0x64,  // Numeric keypad 4 key
+00101         KEY_NUMPAD5          = 0x65,  // Numeric keypad 5 key
+00102         KEY_NUMPAD6          = 0x66,  // Numeric keypad 6 key
+00103         KEY_NUMPAD7          = 0x67,  // Numeric keypad 7 key
+00104         KEY_NUMPAD8          = 0x68,  // Numeric keypad 8 key
+00105         KEY_NUMPAD9          = 0x69,  // Numeric keypad 9 key
+00106         KEY_MULTIPLY         = 0x6A,  // Multiply key
+00107         KEY_ADD              = 0x6B,  // Add key
+00108         KEY_SEPARATOR        = 0x6C,  // Separator key
+00109         KEY_SUBTRACT         = 0x6D,  // Subtract key
+00110         KEY_DECIMAL          = 0x6E,  // Decimal key
+00111         KEY_DIVIDE           = 0x6F,  // Divide key
+00112         KEY_F1               = 0x70,  // F1 key
+00113         KEY_F2               = 0x71,  // F2 key
+00114         KEY_F3               = 0x72,  // F3 key
+00115         KEY_F4               = 0x73,  // F4 key
+00116         KEY_F5               = 0x74,  // F5 key
+00117         KEY_F6               = 0x75,  // F6 key
+00118         KEY_F7               = 0x76,  // F7 key
+00119         KEY_F8               = 0x77,  // F8 key
+00120         KEY_F9               = 0x78,  // F9 key
+00121         KEY_F10              = 0x79,  // F10 key
+00122         KEY_F11              = 0x7A,  // F11 key
+00123         KEY_F12              = 0x7B,  // F12 key
+00124         KEY_F13              = 0x7C,  // F13 key
+00125         KEY_F14              = 0x7D,  // F14 key
+00126         KEY_F15              = 0x7E,  // F15 key
+00127         KEY_F16              = 0x7F,  // F16 key
+00128         KEY_F17              = 0x80,  // F17 key
+00129         KEY_F18              = 0x81,  // F18 key
+00130         KEY_F19              = 0x82,  // F19 key
+00131         KEY_F20              = 0x83,  // F20 key
+00132         KEY_F21              = 0x84,  // F21 key
+00133         KEY_F22              = 0x85,  // F22 key
+00134         KEY_F23              = 0x86,  // F23 key
+00135         KEY_F24              = 0x87,  // F24 key
+00136         KEY_NUMLOCK          = 0x90,  // NUM LOCK key
+00137         KEY_SCROLL           = 0x91,  // SCROLL LOCK key
+00138         KEY_LSHIFT           = 0xA0,  // Left SHIFT key
+00139         KEY_RSHIFT           = 0xA1,  // Right SHIFT key
+00140         KEY_LCONTROL         = 0xA2,  // Left CONTROL key
+00141         KEY_RCONTROL         = 0xA3,  // Right CONTROL key
+00142         KEY_LMENU            = 0xA4,  // Left MENU key
+00143         KEY_RMENU            = 0xA5,  // Right MENU key
+00144         KEY_OEM_1            = 0xBA,  // for US    ";:"
+00145         KEY_PLUS             = 0xBB,  // Plus Key   "+"
+00146         KEY_COMMA            = 0xBC,  // Comma Key  ","
+00147         KEY_MINUS            = 0xBD,  // Minus Key  "-"
+00148         KEY_PERIOD           = 0xBE,  // Period Key "."
+00149         KEY_OEM_2            = 0xBF,  // for US    "/?"
+00150         KEY_OEM_3            = 0xC0,  // for US    "`~"
+00151         KEY_OEM_4            = 0xDB,  // for US    "[{"
+00152         KEY_OEM_5            = 0xDC,  // for US    "\|"
+00153         KEY_OEM_6            = 0xDD,  // for US    "]}"
+00154         KEY_OEM_7            = 0xDE,  // for US    "'""
+00155         KEY_OEM_8            = 0xDF,  // None
+00156         KEY_OEM_AX           = 0xE1,  // for Japan "AX"
+00157         KEY_OEM_102          = 0xE2,  // "<>" or "\|"
+00158         KEY_ATTN             = 0xF6,  // Attn key
+00159         KEY_CRSEL            = 0xF7,  // CrSel key
+00160         KEY_EXSEL            = 0xF8,  // ExSel key
+00161         KEY_EREOF            = 0xF9,  // Erase EOF key
+00162         KEY_PLAY             = 0xFA,  // Play key
+00163         KEY_ZOOM             = 0xFB,  // Zoom key
+00164         KEY_PA1              = 0xFD,  // PA1 key
+00165         KEY_OEM_CLEAR        = 0xFE,   // Clear key
+00166 
+00167         KEY_KEY_CODES_COUNT  = 0xFF // this is not a key, but the amount of keycodes there are.
+00168     };
+00169 
+00170 } // end namespace irr
+00171 
+00172 #endif
+00173 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h.html new file mode 100644 index 0000000..f6327c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: S3DVertex.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
S3DVertex.h File Reference
+
+
+
#include "vector3d.h"
+#include "vector2d.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Functions

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h_source.html new file mode 100644 index 0000000..a26dd05 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s3_d_vertex_8h_source.html @@ -0,0 +1,360 @@ + + + + +Irrlicht 3D Engine: S3DVertex.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
S3DVertex.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_3D_VERTEX_H_INCLUDED__
+00006 #define __S_3D_VERTEX_H_INCLUDED__
+00007 
+00008 #include "vector3d.h"
+00009 #include "vector2d.h"
+00010 #include "SColor.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace video
+00015 {
+00016 
+00018 enum E_VERTEX_TYPE
+00019 {
+00021     EVT_STANDARD = 0,
+00022 
+00024 
+00025     EVT_2TCOORDS,
+00026 
+00028 
+00029     EVT_TANGENTS
+00030 };
+00031 
+00033 const char* const sBuiltInVertexTypeNames[] =
+00034 {
+00035     "standard",
+00036     "2tcoords",
+00037     "tangents",
+00038     0
+00039 };
+00040 
+00042 struct S3DVertex
+00043 {
+00045     S3DVertex() {}
+00046 
+00048     S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
+00049         : Pos(x,y,z), Normal(nx,ny,nz), Color(c), TCoords(tu,tv) {}
+00050 
+00052     S3DVertex(const core::vector3df& pos, const core::vector3df& normal,
+00053         SColor color, const core::vector2d<f32>& tcoords)
+00054         : Pos(pos), Normal(normal), Color(color), TCoords(tcoords) {}
+00055 
+00057     core::vector3df Pos;
+00058 
+00060     core::vector3df Normal;
+00061 
+00063     SColor Color;
+00064 
+00066     core::vector2d<f32> TCoords;
+00067 
+00068     bool operator==(const S3DVertex& other) const
+00069     {
+00070         return ((Pos == other.Pos) && (Normal == other.Normal) &&
+00071             (Color == other.Color) && (TCoords == other.TCoords));
+00072     }
+00073 
+00074     bool operator!=(const S3DVertex& other) const
+00075     {
+00076         return ((Pos != other.Pos) || (Normal != other.Normal) ||
+00077             (Color != other.Color) || (TCoords != other.TCoords));
+00078     }
+00079 
+00080     bool operator<(const S3DVertex& other) const
+00081     {
+00082         return ((Pos < other.Pos) ||
+00083                 ((Pos == other.Pos) && (Normal < other.Normal)) ||
+00084                 ((Pos == other.Pos) && (Normal == other.Normal) && (Color < other.Color)) ||
+00085                 ((Pos == other.Pos) && (Normal == other.Normal) && (Color == other.Color) && (TCoords < other.TCoords)));
+00086     }
+00087 
+00088     E_VERTEX_TYPE getType() const
+00089     {
+00090         return EVT_STANDARD;
+00091     }
+00092 
+00093     S3DVertex getInterpolated(const S3DVertex& other, f32 d)
+00094     {
+00095         d = core::clamp(d, 0.0f, 1.0f);
+00096         return S3DVertex(Pos.getInterpolated(other.Pos, d),
+00097                 Normal.getInterpolated(other.Normal, d),
+00098                 Color.getInterpolated(other.Color, d),
+00099                 TCoords.getInterpolated(other.TCoords, d));
+00100     }
+00101 };
+00102 
+00103 
+00105 
+00108 struct S3DVertex2TCoords : public S3DVertex
+00109 {
+00111     S3DVertex2TCoords() : S3DVertex() {}
+00112 
+00114     S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)
+00115         : S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv), TCoords2(tu2,tv2) {}
+00116 
+00118     S3DVertex2TCoords(const core::vector3df& pos, SColor color,
+00119         const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2)
+00120         : S3DVertex(pos, core::vector3df(), color, tcoords), TCoords2(tcoords2) {}
+00121 
+00123     S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, const SColor& color,
+00124         const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2)
+00125         : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords2) {}
+00126 
+00128     S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)
+00129         : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu2,tv2) {}
+00130 
+00132     S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
+00133         : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu,tv) {}
+00134 
+00136     S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal,
+00137         SColor color, const core::vector2d<f32>& tcoords)
+00138         : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords) {}
+00139 
+00141     S3DVertex2TCoords(S3DVertex& o) : S3DVertex(o) {}
+00142 
+00144     core::vector2d<f32> TCoords2;
+00145 
+00147     bool operator==(const S3DVertex2TCoords& other) const
+00148     {
+00149         return ((static_cast<S3DVertex>(*this)==other) &&
+00150             (TCoords2 == other.TCoords2));
+00151     }
+00152 
+00154     bool operator!=(const S3DVertex2TCoords& other) const
+00155     {
+00156         return ((static_cast<S3DVertex>(*this)!=other) ||
+00157             (TCoords2 != other.TCoords2));
+00158     }
+00159 
+00160     bool operator<(const S3DVertex2TCoords& other) const
+00161     {
+00162         return ((static_cast<S3DVertex>(*this) < other) ||
+00163                 ((static_cast<S3DVertex>(*this) == other) && (TCoords2 < other.TCoords2)));
+00164     }
+00165 
+00166     E_VERTEX_TYPE getType() const
+00167     {
+00168         return EVT_2TCOORDS;
+00169     }
+00170 
+00171     S3DVertex2TCoords getInterpolated(const S3DVertex2TCoords& other, f32 d)
+00172     {
+00173         d = core::clamp(d, 0.0f, 1.0f);
+00174         return S3DVertex2TCoords(Pos.getInterpolated(other.Pos, d),
+00175                 Normal.getInterpolated(other.Normal, d),
+00176                 Color.getInterpolated(other.Color, d),
+00177                 TCoords.getInterpolated(other.TCoords, d),
+00178                 TCoords2.getInterpolated(other.TCoords2, d));
+00179     }
+00180 };
+00181 
+00182 
+00184 
+00185 struct S3DVertexTangents : public S3DVertex
+00186 {
+00188     S3DVertexTangents() : S3DVertex() { }
+00189 
+00191     S3DVertexTangents(f32 x, f32 y, f32 z, f32 nx=0.0f, f32 ny=0.0f, f32 nz=0.0f,
+00192             SColor c = 0xFFFFFFFF, f32 tu=0.0f, f32 tv=0.0f,
+00193             f32 tanx=0.0f, f32 tany=0.0f, f32 tanz=0.0f,
+00194             f32 bx=0.0f, f32 by=0.0f, f32 bz=0.0f)
+00195         : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), Tangent(tanx,tany,tanz), Binormal(bx,by,bz) { }
+00196 
+00198     S3DVertexTangents(const core::vector3df& pos, SColor c,
+00199         const core::vector2df& tcoords)
+00200         : S3DVertex(pos, core::vector3df(), c, tcoords) { }
+00201 
+00203     S3DVertexTangents(const core::vector3df& pos,
+00204         const core::vector3df& normal, SColor c,
+00205         const core::vector2df& tcoords,
+00206         const core::vector3df& tangent=core::vector3df(),
+00207         const core::vector3df& binormal=core::vector3df())
+00208         : S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { }
+00209 
+00211     core::vector3df Tangent;
+00212 
+00214     core::vector3df Binormal;
+00215 
+00216     bool operator==(const S3DVertexTangents& other) const
+00217     {
+00218         return ((static_cast<S3DVertex>(*this)==other) &&
+00219             (Tangent == other.Tangent) &&
+00220             (Binormal == other.Binormal));
+00221     }
+00222 
+00223     bool operator!=(const S3DVertexTangents& other) const
+00224     {
+00225         return ((static_cast<S3DVertex>(*this)!=other) ||
+00226             (Tangent != other.Tangent) ||
+00227             (Binormal != other.Binormal));
+00228     }
+00229 
+00230     bool operator<(const S3DVertexTangents& other) const
+00231     {
+00232         return ((static_cast<S3DVertex>(*this) < other) ||
+00233                 ((static_cast<S3DVertex>(*this) == other) && (Tangent < other.Tangent)) ||
+00234                 ((static_cast<S3DVertex>(*this) == other) && (Tangent == other.Tangent) && (Binormal < other.Binormal)));
+00235     }
+00236 
+00237     E_VERTEX_TYPE getType() const
+00238     {
+00239         return EVT_TANGENTS;
+00240     }
+00241 
+00242     S3DVertexTangents getInterpolated(const S3DVertexTangents& other, f32 d)
+00243     {
+00244         d = core::clamp(d, 0.0f, 1.0f);
+00245         return S3DVertexTangents(Pos.getInterpolated(other.Pos, d),
+00246                 Normal.getInterpolated(other.Normal, d),
+00247                 Color.getInterpolated(other.Color, d),
+00248                 TCoords.getInterpolated(other.TCoords, d),
+00249                 Tangent.getInterpolated(other.Tangent, d),
+00250                 Binormal.getInterpolated(other.Binormal, d));
+00251     }
+00252 };
+00253 
+00254 
+00255 
+00256 inline u32 getVertexPitchFromType(E_VERTEX_TYPE vertexType)
+00257 {
+00258     switch (vertexType)
+00259     {
+00260     case video::EVT_2TCOORDS:
+00261         return sizeof(video::S3DVertex2TCoords);
+00262     case video::EVT_TANGENTS:
+00263         return sizeof(video::S3DVertexTangents);
+00264     default:
+00265         return sizeof(video::S3DVertex);
+00266     }
+00267 }
+00268 
+00269 
+00270 } // end namespace video
+00271 } // end namespace irr
+00272 
+00273 #endif
+00274 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h.html new file mode 100644 index 0000000..2c57129 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: SAnimatedMesh.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SAnimatedMesh.h File Reference
+
+
+
#include "IAnimatedMesh.h"
+#include "IMesh.h"
+#include "aabbox3d.h"
+#include "irrArray.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h_source.html new file mode 100644 index 0000000..f6d73e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_animated_mesh_8h_source.html @@ -0,0 +1,278 @@ + + + + +Irrlicht 3D Engine: SAnimatedMesh.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SAnimatedMesh.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_ANIMATED_MESH_H_INCLUDED__
+00006 #define __S_ANIMATED_MESH_H_INCLUDED__
+00007 
+00008 #include "IAnimatedMesh.h"
+00009 #include "IMesh.h"
+00010 #include "aabbox3d.h"
+00011 #include "irrArray.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace scene
+00016 {
+00017 
+00019     struct SAnimatedMesh : public IAnimatedMesh
+00020     {
+00022         SAnimatedMesh(scene::IMesh* mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) : IAnimatedMesh(), FramesPerSecond(25.f), Type(type)
+00023         {
+00024             #ifdef _DEBUG
+00025             setDebugName("SAnimatedMesh");
+00026             #endif
+00027             addMesh(mesh);
+00028             recalculateBoundingBox();
+00029         }
+00030 
+00032         virtual ~SAnimatedMesh()
+00033         {
+00034             // drop meshes
+00035             for (u32 i=0; i<Meshes.size(); ++i)
+00036                 Meshes[i]->drop();
+00037         }
+00038 
+00040 
+00041         virtual u32 getFrameCount() const
+00042         {
+00043             return Meshes.size();
+00044         }
+00045 
+00047 
+00048         virtual f32 getAnimationSpeed() const
+00049         {
+00050             return FramesPerSecond;
+00051         }
+00052 
+00054 
+00056         virtual void setAnimationSpeed(f32 fps)
+00057         {
+00058             FramesPerSecond=fps;
+00059         }
+00060 
+00062 
+00069         virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)
+00070         {
+00071             if (Meshes.empty())
+00072                 return 0;
+00073 
+00074             return Meshes[frame];
+00075         }
+00076 
+00078         void addMesh(IMesh* mesh)
+00079         {
+00080             if (mesh)
+00081             {
+00082                 mesh->grab();
+00083                 Meshes.push_back(mesh);
+00084             }
+00085         }
+00086 
+00088 
+00089         virtual const core::aabbox3d<f32>& getBoundingBox() const
+00090         {
+00091             return Box;
+00092         }
+00093 
+00095         virtual void setBoundingBox(const core::aabbox3df& box)
+00096         {
+00097             Box = box;
+00098         }
+00099 
+00101         void recalculateBoundingBox()
+00102         {
+00103             Box.reset(0,0,0);
+00104 
+00105             if (Meshes.empty())
+00106                 return;
+00107 
+00108             Box = Meshes[0]->getBoundingBox();
+00109 
+00110             for (u32 i=1; i<Meshes.size(); ++i)
+00111                 Box.addInternalBox(Meshes[i]->getBoundingBox());
+00112         }
+00113 
+00115         virtual E_ANIMATED_MESH_TYPE getMeshType() const
+00116         {
+00117             return Type;
+00118         }
+00119 
+00121         virtual u32 getMeshBufferCount() const
+00122         {
+00123             if (Meshes.empty())
+00124                 return 0;
+00125 
+00126             return Meshes[0]->getMeshBufferCount();
+00127         }
+00128 
+00130         virtual IMeshBuffer* getMeshBuffer(u32 nr) const
+00131         {
+00132             if (Meshes.empty())
+00133                 return 0;
+00134 
+00135             return Meshes[0]->getMeshBuffer(nr);
+00136         }
+00137 
+00139 
+00142         virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const
+00143         {
+00144             if (Meshes.empty())
+00145                 return 0;
+00146 
+00147             return Meshes[0]->getMeshBuffer(material);
+00148         }
+00149 
+00151         virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
+00152         {
+00153             for (u32 i=0; i<Meshes.size(); ++i)
+00154                 Meshes[i]->setMaterialFlag(flag, newvalue);
+00155         }
+00156 
+00158         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
+00159         {
+00160             for (u32 i=0; i<Meshes.size(); ++i)
+00161                 Meshes[i]->setHardwareMappingHint(newMappingHint, buffer);
+00162         }
+00163 
+00165         virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
+00166         {
+00167             for (u32 i=0; i<Meshes.size(); ++i)
+00168                 Meshes[i]->setDirty(buffer);
+00169         }
+00170 
+00172         core::array<IMesh*> Meshes;
+00173 
+00175         core::aabbox3d<f32> Box;
+00176 
+00178         f32 FramesPerSecond;
+00179 
+00181         E_ANIMATED_MESH_TYPE Type;
+00182     };
+00183 
+00184 
+00185 } // end namespace scene
+00186 } // end namespace irr
+00187 
+00188 #endif
+00189 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_color_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_color_8h.html new file mode 100644 index 0000000..1933cd3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_color_8h.html @@ -0,0 +1,183 @@ + + + + +Irrlicht 3D Engine: SColor.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SColor.h File Reference
+
+
+
#include "irrTypes.h"
+#include "irrMath.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Functions

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_color_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_color_8h_source.html new file mode 100644 index 0000000..a14db32 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_color_8h_source.html @@ -0,0 +1,667 @@ + + + + +Irrlicht 3D Engine: SColor.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SColor.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __COLOR_H_INCLUDED__
+00006 #define __COLOR_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "irrMath.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace video
+00014 {
+00016 
+00017     enum ECOLOR_FORMAT
+00018     {
+00020 
+00023         ECF_A1R5G5B5 = 0,
+00024 
+00026         ECF_R5G6B5,
+00027 
+00029         ECF_R8G8B8,
+00030 
+00032         ECF_A8R8G8B8,
+00033 
+00036 
+00037         ECF_R16F,
+00038 
+00040         ECF_G16R16F,
+00041 
+00043         ECF_A16B16G16R16F,
+00044 
+00046         ECF_R32F,
+00047 
+00049         ECF_G32R32F,
+00050 
+00052         ECF_A32B32G32R32F,
+00053 
+00055         ECF_UNKNOWN
+00056     };
+00057 
+00058 
+00060     inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a=0xFF)
+00061     {
+00062         return (u16)((a & 0x80) << 8 |
+00063             (r & 0xF8) << 7 |
+00064             (g & 0xF8) << 2 |
+00065             (b & 0xF8) >> 3);
+00066     }
+00067 
+00068 
+00070     inline u16 RGB16(u32 r, u32 g, u32 b)
+00071     {
+00072         return RGBA16(r,g,b);
+00073     }
+00074 
+00075 
+00077     inline u16 RGB16from16(u16 r, u16 g, u16 b)
+00078     {
+00079         return (0x8000 |
+00080                 (r & 0x1F) << 10 |
+00081                 (g & 0x1F) << 5  |
+00082                 (b & 0x1F));
+00083     }
+00084 
+00085 
+00087     inline u16 X8R8G8B8toA1R5G5B5(u32 color)
+00088     {
+00089         return (u16)(0x8000 |
+00090             ( color & 0x00F80000) >> 9 |
+00091             ( color & 0x0000F800) >> 6 |
+00092             ( color & 0x000000F8) >> 3);
+00093     }
+00094 
+00095 
+00097     inline u16 A8R8G8B8toA1R5G5B5(u32 color)
+00098     {
+00099         return (u16)(( color & 0x80000000) >> 16|
+00100             ( color & 0x00F80000) >> 9 |
+00101             ( color & 0x0000F800) >> 6 |
+00102             ( color & 0x000000F8) >> 3);
+00103     }
+00104 
+00105 
+00107     inline u16 A8R8G8B8toR5G6B5(u32 color)
+00108     {
+00109         return (u16)(( color & 0x00F80000) >> 8 |
+00110             ( color & 0x0000FC00) >> 5 |
+00111             ( color & 0x000000F8) >> 3);
+00112     }
+00113 
+00114 
+00116 
+00117     inline u32 A1R5G5B5toA8R8G8B8(u16 color)
+00118     {
+00119         return ( (( -( (s32) color & 0x00008000 ) >> (s32) 31 ) & 0xFF000000 ) |
+00120                 (( color & 0x00007C00 ) << 9) | (( color & 0x00007000 ) << 4) |
+00121                 (( color & 0x000003E0 ) << 6) | (( color & 0x00000380 ) << 1) |
+00122                 (( color & 0x0000001F ) << 3) | (( color & 0x0000001C ) >> 2)
+00123                 );
+00124     }
+00125 
+00126 
+00128     inline u32 R5G6B5toA8R8G8B8(u16 color)
+00129     {
+00130         return 0xFF000000 |
+00131             ((color & 0xF800) << 8)|
+00132             ((color & 0x07E0) << 5)|
+00133             ((color & 0x001F) << 3);
+00134     }
+00135 
+00136 
+00138     inline u16 R5G6B5toA1R5G5B5(u16 color)
+00139     {
+00140         return 0x8000 | (((color & 0xFFC0) >> 1) | (color & 0x1F));
+00141     }
+00142 
+00143 
+00145     inline u16 A1R5G5B5toR5G6B5(u16 color)
+00146     {
+00147         return (((color & 0x7FE0) << 1) | (color & 0x1F));
+00148     }
+00149 
+00150 
+00151 
+00153 
+00155     inline u32 getAlpha(u16 color)
+00156     {
+00157         return ((color >> 15)&0x1);
+00158     }
+00159 
+00160 
+00162 
+00163     inline u32 getRed(u16 color)
+00164     {
+00165         return ((color >> 10)&0x1F);
+00166     }
+00167 
+00168 
+00170 
+00171     inline u32 getGreen(u16 color)
+00172     {
+00173         return ((color >> 5)&0x1F);
+00174     }
+00175 
+00176 
+00178 
+00179     inline u32 getBlue(u16 color)
+00180     {
+00181         return (color & 0x1F);
+00182     }
+00183 
+00184 
+00186     inline s32 getAverage(s16 color)
+00187     {
+00188         return ((getRed(color)<<3) + (getGreen(color)<<3) + (getBlue(color)<<3)) / 3;
+00189     }
+00190 
+00191 
+00193 
+00201     class SColor
+00202     {
+00203     public:
+00204 
+00206 
+00207         SColor() {}
+00208 
+00210 
+00211         SColor (u32 a, u32 r, u32 g, u32 b)
+00212             : color(((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff)) {}
+00213 
+00215         SColor(u32 clr)
+00216             : color(clr) {}
+00217 
+00219 
+00221         u32 getAlpha() const { return color>>24; }
+00222 
+00224 
+00226         u32 getRed() const { return (color>>16) & 0xff; }
+00227 
+00229 
+00231         u32 getGreen() const { return (color>>8) & 0xff; }
+00232 
+00234 
+00236         u32 getBlue() const { return color & 0xff; }
+00237 
+00239         f32 getLightness() const
+00240         {
+00241             return 0.5f*(core::max_(core::max_(getRed(),getGreen()),getBlue())+core::min_(core::min_(getRed(),getGreen()),getBlue()));
+00242         }
+00243 
+00245         f32 getLuminance() const
+00246         {
+00247             return 0.3f*getRed() + 0.59f*getGreen() + 0.11f*getBlue();
+00248         }
+00249 
+00251         u32 getAverage() const
+00252         {
+00253             return ( getRed() + getGreen() + getBlue() ) / 3;
+00254         }
+00255 
+00257 
+00259         void setAlpha(u32 a) { color = ((a & 0xff)<<24) | (color & 0x00ffffff); }
+00260 
+00262 
+00264         void setRed(u32 r) { color = ((r & 0xff)<<16) | (color & 0xff00ffff); }
+00265 
+00267 
+00269         void setGreen(u32 g) { color = ((g & 0xff)<<8) | (color & 0xffff00ff); }
+00270 
+00272 
+00274         void setBlue(u32 b) { color = (b & 0xff) | (color & 0xffffff00); }
+00275 
+00277 
+00278         u16 toA1R5G5B5() const { return A8R8G8B8toA1R5G5B5(color); }
+00279 
+00281 
+00284         void toOpenGLColor(u8* dest) const
+00285         {
+00286             *dest =   (u8)getRed();
+00287             *++dest = (u8)getGreen();
+00288             *++dest = (u8)getBlue();
+00289             *++dest = (u8)getAlpha();
+00290         }
+00291 
+00293 
+00307         void set(u32 a, u32 r, u32 g, u32 b)
+00308         {
+00309             color = (((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff));
+00310         }
+00311         void set(u32 col) { color = col; }
+00312 
+00314 
+00315         bool operator==(const SColor& other) const { return other.color == color; }
+00316 
+00318 
+00319         bool operator!=(const SColor& other) const { return other.color != color; }
+00320 
+00322 
+00323         bool operator<(const SColor& other) const { return (color < other.color); }
+00324 
+00326 
+00328         SColor operator+(const SColor& other) const
+00329         {
+00330             return SColor(core::min_(getAlpha() + other.getAlpha(), 255u),
+00331                     core::min_(getRed() + other.getRed(), 255u),
+00332                     core::min_(getGreen() + other.getGreen(), 255u),
+00333                     core::min_(getBlue() + other.getBlue(), 255u));
+00334         }
+00335 
+00337 
+00340         SColor getInterpolated(const SColor &other, f32 d) const
+00341         {
+00342             d = core::clamp(d, 0.f, 1.f);
+00343             const f32 inv = 1.0f - d;
+00344             return SColor((u32)core::round32(other.getAlpha()*inv + getAlpha()*d),
+00345                 (u32)core::round32(other.getRed()*inv + getRed()*d),
+00346                 (u32)core::round32(other.getGreen()*inv + getGreen()*d),
+00347                 (u32)core::round32(other.getBlue()*inv + getBlue()*d));
+00348         }
+00349 
+00351 
+00354         SColor getInterpolated_quadratic(const SColor& c1, const SColor& c2, f32 d) const
+00355         {
+00356             // this*(1-d)*(1-d) + 2 * c1 * (1-d) + c2 * d * d;
+00357             d = core::clamp(d, 0.f, 1.f);
+00358             const f32 inv = 1.f - d;
+00359             const f32 mul0 = inv * inv;
+00360             const f32 mul1 = 2.f * d * inv;
+00361             const f32 mul2 = d * d;
+00362 
+00363             return SColor(
+00364                     core::clamp( core::floor32(
+00365                             getAlpha() * mul0 + c1.getAlpha() * mul1 + c2.getAlpha() * mul2 ), 0, 255 ),
+00366                     core::clamp( core::floor32(
+00367                             getRed()   * mul0 + c1.getRed()   * mul1 + c2.getRed()   * mul2 ), 0, 255 ),
+00368                     core::clamp ( core::floor32(
+00369                             getGreen() * mul0 + c1.getGreen() * mul1 + c2.getGreen() * mul2 ), 0, 255 ),
+00370                     core::clamp ( core::floor32(
+00371                             getBlue()  * mul0 + c1.getBlue()  * mul1 + c2.getBlue()  * mul2 ), 0, 255 ));
+00372         }
+00373 
+00375 
+00378         void setData(const void *data, ECOLOR_FORMAT format)
+00379         {
+00380             switch (format)
+00381             {
+00382                 case ECF_A1R5G5B5:
+00383                     color = A1R5G5B5toA8R8G8B8(*(u16*)data);
+00384                     break;
+00385                 case ECF_R5G6B5:
+00386                     color = R5G6B5toA8R8G8B8(*(u16*)data);
+00387                     break;
+00388                 case ECF_A8R8G8B8:
+00389                     color = *(u32*)data;
+00390                     break;
+00391                 case ECF_R8G8B8:
+00392                     {
+00393                         u8* p = (u8*)data;
+00394                         set(255, p[0],p[1],p[2]);
+00395                     }
+00396                     break;
+00397                 default:
+00398                     color = 0xffffffff;
+00399                 break;
+00400             }
+00401         }
+00402 
+00404 
+00407         void getData(void *data, ECOLOR_FORMAT format)
+00408         {
+00409             switch(format)
+00410             {
+00411                 case ECF_A1R5G5B5:
+00412                 {
+00413                     u16 * dest = (u16*)data;
+00414                     *dest = video::A8R8G8B8toA1R5G5B5( color );
+00415                 } 
+00416                 break;
+00417 
+00418                 case ECF_R5G6B5:
+00419                 {
+00420                     u16 * dest = (u16*)data;
+00421                     *dest = video::A8R8G8B8toR5G6B5( color );
+00422                 } 
+00423                 break;
+00424 
+00425                 case ECF_R8G8B8:
+00426                 {
+00427                     u8* dest = (u8*)data;
+00428                     dest[0] = (u8)getRed();
+00429                     dest[1] = (u8)getGreen();
+00430                     dest[2] = (u8)getBlue();
+00431                 } 
+00432                 break;
+00433 
+00434                 case ECF_A8R8G8B8:
+00435                 {
+00436                     u32 * dest = (u32*)data;
+00437                     *dest = color;
+00438                 } 
+00439                 break;
+00440 
+00441                 default:
+00442                 break;
+00443             }
+00444         }
+00445 
+00447         u32 color;
+00448     };
+00449 
+00450 
+00452 
+00458     class SColorf
+00459     {
+00460     public:
+00462 
+00463         SColorf() : r(0.0f), g(0.0f), b(0.0f), a(1.0f) {}
+00464 
+00466 
+00476         SColorf(f32 r, f32 g, f32 b, f32 a = 1.0f) : r(r), g(g), b(b), a(a) {}
+00477 
+00479 
+00481         SColorf(SColor c)
+00482         {
+00483             const f32 inv = 1.0f / 255.0f;
+00484             r = c.getRed() * inv;
+00485             g = c.getGreen() * inv;
+00486             b = c.getBlue() * inv;
+00487             a = c.getAlpha() * inv;
+00488         }
+00489 
+00491         SColor toSColor() const
+00492         {
+00493             return SColor((u32)core::round32(a*255.0f), (u32)core::round32(r*255.0f), (u32)core::round32(g*255.0f), (u32)core::round32(b*255.0f));
+00494         }
+00495 
+00497 
+00503         void set(f32 rr, f32 gg, f32 bb) {r = rr; g =gg; b = bb; }
+00504 
+00506 
+00514         void set(f32 aa, f32 rr, f32 gg, f32 bb) {a = aa; r = rr; g =gg; b = bb; }
+00515 
+00517 
+00520         SColorf getInterpolated(const SColorf &other, f32 d) const
+00521         {
+00522             d = core::clamp(d, 0.f, 1.f);
+00523             const f32 inv = 1.0f - d;
+00524             return SColorf(other.r*inv + r*d,
+00525                 other.g*inv + g*d, other.b*inv + b*d, other.a*inv + a*d);
+00526         }
+00527 
+00529 
+00532         inline SColorf getInterpolated_quadratic(const SColorf& c1, const SColorf& c2,
+00533                 f32 d) const
+00534         {
+00535             d = core::clamp(d, 0.f, 1.f);
+00536             // this*(1-d)*(1-d) + 2 * c1 * (1-d) + c2 * d * d;
+00537             const f32 inv = 1.f - d;
+00538             const f32 mul0 = inv * inv;
+00539             const f32 mul1 = 2.f * d * inv;
+00540             const f32 mul2 = d * d;
+00541 
+00542             return SColorf (r * mul0 + c1.r * mul1 + c2.r * mul2,
+00543                     g * mul0 + c1.g * mul1 + c2.g * mul2,
+00544                     b * mul0 + c1.b * mul1 + c2.b * mul2,
+00545                     a * mul0 + c1.a * mul1 + c2.a * mul2);
+00546         }
+00547 
+00548 
+00550         void setColorComponentValue(s32 index, f32 value)
+00551         {
+00552             switch(index)
+00553             {
+00554             case 0: r = value; break;
+00555             case 1: g = value; break;
+00556             case 2: b = value; break;
+00557             case 3: a = value; break;
+00558             }
+00559         }
+00560 
+00562         f32 getAlpha() const { return a; }
+00563 
+00565         f32 getRed() const { return r; }
+00566 
+00568         f32 getGreen() const { return g; }
+00569 
+00571         f32 getBlue() const { return b; }
+00572 
+00574         f32 r;
+00575 
+00577         f32 g;
+00578 
+00580         f32 b;
+00581 
+00583         f32 a;
+00584     };
+00585 
+00586 
+00588 
+00592     class SColorHSL
+00593     {
+00594     public:
+00595         SColorHSL ( f32 h = 0.f, f32 s = 0.f, f32 l = 0.f )
+00596             : Hue ( h ), Saturation ( s ), Luminance ( l ) {}
+00597 
+00598         void fromRGB(const SColorf &color);
+00599         void toRGB(SColorf &color) const;
+00600 
+00601         f32 Hue;
+00602         f32 Saturation;
+00603         f32 Luminance;
+00604 
+00605     private:
+00606         inline f32 toRGB1(f32 rm1, f32 rm2, f32 rh) const;
+00607 
+00608     };
+00609 
+00610     inline void SColorHSL::fromRGB(const SColorf &color)
+00611     {
+00612         const f32 maxVal = core::max_(color.getRed(), color.getGreen(), color.getBlue());
+00613         const f32 minVal = (f32)core::min_(color.getRed(), color.getGreen(), color.getBlue());
+00614         Luminance = (maxVal+minVal)*50;
+00615         if (core::equals(maxVal, minVal))
+00616         {
+00617             Hue=0.f;
+00618             Saturation=0.f;
+00619             return;
+00620         }
+00621 
+00622         const f32 delta = maxVal-minVal;
+00623         if ( Luminance <= 50 )
+00624         {
+00625             Saturation = (delta)/(maxVal+minVal);
+00626         }
+00627         else
+00628         {
+00629             Saturation = (delta)/(2-maxVal-minVal);
+00630         }
+00631         Saturation *= 100;
+00632 
+00633         if (core::equals(maxVal, color.getRed()))
+00634             Hue = (color.getGreen()-color.getBlue())/delta;
+00635         else if (core::equals(maxVal, color.getGreen()))
+00636             Hue = 2+((color.getBlue()-color.getRed())/delta);
+00637         else // blue is max
+00638             Hue = 4+((color.getRed()-color.getGreen())/delta);
+00639 
+00640         Hue *= 60.0f;
+00641         while ( Hue < 0.f )
+00642             Hue += 360;
+00643     }
+00644 
+00645 
+00646     inline void SColorHSL::toRGB(SColorf &color) const
+00647     {
+00648         const f32 l = Luminance/100;
+00649         if (core::iszero(Saturation)) // grey
+00650         {
+00651             color.set(l, l, l);
+00652             return;
+00653         }
+00654 
+00655         f32 rm2;
+00656 
+00657         if ( Luminance <= 50 )
+00658         {
+00659             rm2 = l + l * (Saturation/100);
+00660         }
+00661         else
+00662         {
+00663             rm2 = l + (1 - l) * (Saturation/100);
+00664         }
+00665 
+00666         const f32 rm1 = 2.0f * l - rm2;
+00667 
+00668         const f32 h = Hue / 360.0f;
+00669         color.set( toRGB1(rm1, rm2, h + 1.f/3.f),
+00670             toRGB1(rm1, rm2, h),
+00671             toRGB1(rm1, rm2, h - 1.f/3.f)
+00672             );
+00673     }
+00674 
+00675 
+00676     // algorithm from Foley/Van-Dam
+00677     inline f32 SColorHSL::toRGB1(f32 rm1, f32 rm2, f32 rh) const
+00678     {
+00679         if (rh<0)
+00680             rh += 1;
+00681         if (rh>1)
+00682             rh -= 1;
+00683 
+00684         if (rh < 1.f/6.f)
+00685             rm1 = rm1 + (rm2 - rm1) * rh*6.f;
+00686         else if (rh < 0.5f)
+00687             rm1 = rm2;
+00688         else if (rh < 2.f/3.f)
+00689             rm1 = rm1 + (rm2 - rm1) * ((2.f/3.f)-rh)*6.f;
+00690 
+00691         return rm1;
+00692     }
+00693 
+00694 } // end namespace video
+00695 } // end namespace irr
+00696 
+00697 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h.html new file mode 100644 index 0000000..15c0911 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h.html @@ -0,0 +1,138 @@ + + + + +Irrlicht 3D Engine: SExposedVideoData.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SExposedVideoData.h File Reference
+
+
+ +

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h_source.html new file mode 100644 index 0000000..7829d8a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_exposed_video_data_8h_source.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: SExposedVideoData.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SExposedVideoData.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_EXPOSED_VIDEO_DATA_H_INCLUDED__
+00006 #define __S_EXPOSED_VIDEO_DATA_H_INCLUDED__
+00007 
+00008 // forward declarations for internal pointers
+00009 struct IDirect3D9;
+00010 struct IDirect3DDevice9;
+00011 struct IDirect3D8;
+00012 struct IDirect3DDevice8;
+00013 
+00014 namespace irr
+00015 {
+00016 namespace video
+00017 {
+00018 
+00020 
+00025 struct SExposedVideoData
+00026 {
+00027     SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;}
+00028     explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;}
+00029 
+00030     union
+00031     {
+00032         struct
+00033         {
+00035             IDirect3D9* D3D9;
+00036 
+00038             IDirect3DDevice9* D3DDev9;
+00039 
+00041 
+00042             void* HWnd;
+00043 
+00044         } D3D9;
+00045 
+00046         struct
+00047         {
+00049             IDirect3D8* D3D8;
+00050 
+00052             IDirect3DDevice8* D3DDev8;
+00053 
+00055 
+00056             void* HWnd;
+00057 
+00058         } D3D8;
+00059 
+00060         struct
+00061         {
+00063 
+00064             void* HDc;
+00065 
+00067 
+00068             void* HRc;
+00069 
+00071 
+00072             void* HWnd;
+00073         } OpenGLWin32;
+00074 
+00075         struct
+00076         {
+00077             // XWindow handles
+00078             void* X11Display;
+00079             void* X11Context;
+00080             unsigned long X11Window;
+00081         } OpenGLLinux;
+00082     };
+00083 };
+00084 
+00085 } // end namespace video
+00086 } // end namespace irr
+00087 
+00088 
+00089 #endif
+00090 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h.html new file mode 100644 index 0000000..e7d87da --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: SIrrCreationParameters.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SIrrCreationParameters.h File Reference
+
+
+
#include "EDriverTypes.h"
+#include "EDeviceTypes.h"
+#include "dimension2d.h"
+#include "ILogger.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h_source.html new file mode 100644 index 0000000..4f46fbe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_irr_creation_parameters_8h_source.html @@ -0,0 +1,267 @@ + + + + +Irrlicht 3D Engine: SIrrCreationParameters.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SIrrCreationParameters.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__
+00006 #define __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__
+00007 
+00008 #include "EDriverTypes.h"
+00009 #include "EDeviceTypes.h"
+00010 #include "dimension2d.h"
+00011 #include "ILogger.h"
+00012 
+00013 namespace irr
+00014 {
+00015     class IEventReceiver;
+00016 
+00018 
+00019     struct SIrrlichtCreationParameters
+00020     {
+00022         SIrrlichtCreationParameters() :
+00023             DeviceType(EIDT_BEST),
+00024             DriverType(video::EDT_BURNINGSVIDEO),
+00025             WindowSize(core::dimension2d<u32>(800, 600)),
+00026             Bits(16),
+00027             ZBufferBits(16),
+00028             Fullscreen(false),
+00029             Stencilbuffer(false),
+00030             Vsync(false),
+00031             AntiAlias(0),
+00032             HandleSRGB(false),
+00033             WithAlphaChannel(false),
+00034             Doublebuffer(true),
+00035             IgnoreInput(false),
+00036             Stereobuffer(false),
+00037             HighPrecisionFPU(false),
+00038             EventReceiver(0),
+00039             WindowId(0),
+00040 #ifdef _DEBUG
+00041             LoggingLevel(ELL_DEBUG),
+00042 #else
+00043             LoggingLevel(ELL_INFORMATION),
+00044 #endif
+00045             DisplayAdapter(0),
+00046             DriverMultithreaded(false),
+00047             UsePerformanceTimer(true),
+00048             SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
+00049         {
+00050         }
+00051 
+00052         SIrrlichtCreationParameters(const SIrrlichtCreationParameters& other) :
+00053             SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
+00054         {*this = other;}
+00055 
+00056         SIrrlichtCreationParameters& operator=(const SIrrlichtCreationParameters& other)
+00057         {
+00058             DeviceType = other.DeviceType;
+00059             DriverType = other.DriverType;
+00060             WindowSize = other.WindowSize;
+00061             Bits = other.Bits;
+00062             ZBufferBits = other.ZBufferBits;
+00063             Fullscreen = other.Fullscreen;
+00064             Stencilbuffer = other.Stencilbuffer;
+00065             Vsync = other.Vsync;
+00066             AntiAlias = other.AntiAlias;
+00067             HandleSRGB = other.HandleSRGB;
+00068             WithAlphaChannel = other.WithAlphaChannel;
+00069             Doublebuffer = other.Doublebuffer;
+00070             IgnoreInput = other.IgnoreInput;
+00071             Stereobuffer = other.Stereobuffer;
+00072             HighPrecisionFPU = other.HighPrecisionFPU;
+00073             EventReceiver = other.EventReceiver;
+00074             WindowId = other.WindowId;
+00075             LoggingLevel = other.LoggingLevel;
+00076             DriverMultithreaded = other.DriverMultithreaded;
+00077             DisplayAdapter = other.DisplayAdapter;
+00078             UsePerformanceTimer = other.UsePerformanceTimer;
+00079             return *this;
+00080         }
+00081 
+00083 
+00093         E_DEVICE_TYPE DeviceType;
+00094 
+00096 
+00100         video::E_DRIVER_TYPE DriverType;
+00101 
+00103         core::dimension2d<u32> WindowSize;
+00104 
+00106         u8 Bits;
+00107 
+00109         u8 ZBufferBits;
+00110 
+00112 
+00113         bool Fullscreen;
+00114 
+00116 
+00121         bool Stencilbuffer;
+00122 
+00124 
+00127         bool Vsync;
+00128 
+00130 
+00145         u8 AntiAlias;
+00146 
+00148 
+00160         bool HandleSRGB;
+00161 
+00163 
+00171         bool WithAlphaChannel;
+00172 
+00174 
+00179         bool Doublebuffer;
+00180 
+00182 
+00186         bool IgnoreInput;
+00187 
+00189 
+00194         bool Stereobuffer;
+00195 
+00197 
+00203         bool HighPrecisionFPU;
+00204 
+00206         IEventReceiver* EventReceiver;
+00207 
+00209 
+00259         void* WindowId;
+00260 
+00262 
+00267         ELOG_LEVEL LoggingLevel;
+00268 
+00270 
+00271         u32 DisplayAdapter;
+00272 
+00274 
+00277         bool DriverMultithreaded;
+00278 
+00280 
+00284         bool UsePerformanceTimer;
+00285 
+00287 
+00289         const c8* const SDK_version_do_not_use;
+00290     };
+00291 
+00292 
+00293 } // end namespace irr
+00294 
+00295 #endif
+00296 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h.html new file mode 100644 index 0000000..f00efbe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: SKeyMap.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SKeyMap.h File Reference
+
+
+
#include "Keycodes.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h_source.html new file mode 100644 index 0000000..1f13983 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_key_map_8h_source.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: SKeyMap.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SKeyMap.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_KEY_MAP_H_INCLUDED__
+00006 #define __S_KEY_MAP_H_INCLUDED__
+00007 
+00008 #include "Keycodes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00014     enum EKEY_ACTION
+00015     {
+00016         EKA_MOVE_FORWARD = 0,
+00017         EKA_MOVE_BACKWARD,
+00018         EKA_STRAFE_LEFT,
+00019         EKA_STRAFE_RIGHT,
+00020         EKA_JUMP_UP,
+00021         EKA_CROUCH,
+00022         EKA_COUNT,
+00023 
+00025         EKA_FORCE_32BIT = 0x7fffffff
+00026     };
+00027 
+00029     struct SKeyMap
+00030     {
+00031         SKeyMap() {}
+00032         SKeyMap(EKEY_ACTION action, EKEY_CODE keyCode) : Action(action), KeyCode(keyCode) {}
+00033 
+00034         EKEY_ACTION Action;
+00035         EKEY_CODE KeyCode;
+00036     };
+00037 
+00038 } // end namespace irr
+00039 
+00040 #endif
+00041 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_light_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_light_8h.html new file mode 100644 index 0000000..768f215 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_light_8h.html @@ -0,0 +1,155 @@ + + + + +Irrlicht 3D Engine: SLight.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SLight.h File Reference
+
+
+
#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_light_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_light_8h_source.html new file mode 100644 index 0000000..806c069 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_light_8h_source.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: SLight.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SLight.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_LIGHT_H_INCLUDED__
+00006 #define __S_LIGHT_H_INCLUDED__
+00007 
+00008 #include "SColor.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace video
+00013 {
+00014 
+00016 enum E_LIGHT_TYPE
+00017 {
+00019     ELT_POINT,
+00021     ELT_SPOT,
+00023     ELT_DIRECTIONAL,
+00024 
+00026     ELT_COUNT
+00027 };
+00028 
+00030 const c8* const LightTypeNames[] =
+00031 {
+00032     "Point",
+00033     "Spot",
+00034     "Directional",
+00035     0
+00036 };
+00037 
+00039 
+00041 struct SLight
+00042 {
+00043     SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f),
+00044         SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f),
+00045         OuterCone(45.f), InnerCone(0.f), Falloff(2.f),
+00046         Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
+00047         Radius(100.f), Type(ELT_POINT), CastShadows(true)
+00048         {}
+00049 
+00051     SColorf AmbientColor;
+00052 
+00054 
+00055     SColorf DiffuseColor;
+00056 
+00058 
+00059     SColorf SpecularColor;
+00060 
+00062 
+00065     core::vector3df Attenuation;
+00066 
+00068     f32 OuterCone;
+00069 
+00071     f32 InnerCone;
+00072 
+00074     f32 Falloff;
+00075 
+00077 
+00078     core::vector3df Position;
+00079 
+00081 
+00082     core::vector3df Direction;
+00083 
+00085     f32 Radius;
+00086 
+00088     E_LIGHT_TYPE Type;
+00089 
+00091     bool CastShadows:1;
+00092 };
+00093 
+00094 } // end namespace video
+00095 } // end namespace irr
+00096 
+00097 #endif
+00098 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_material_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_material_8h.html new file mode 100644 index 0000000..862b56b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_material_8h.html @@ -0,0 +1,252 @@ + + + + +Irrlicht 3D Engine: SMaterial.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SMaterial.h File Reference
+
+
+
#include "SColor.h"
+#include "matrix4.h"
+#include "irrArray.h"
+#include "irrMath.h"
+#include "EMaterialTypes.h"
+#include "EMaterialFlags.h"
+#include "SMaterialLayer.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +

+Functions

+
    +
  • f32 irr::video::pack_textureBlendFunc (const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE) +
    EMT_ONETEXTURE_BLEND: pack srcFact, dstFact, Modulate and alpha source to MaterialTypeParam.
  • bool irr::video::textureBlendFunc_hasAlpha (const E_BLEND_FACTOR factor) +
    EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending.
  • void irr::video::unpack_textureBlendFunc (E_BLEND_FACTOR &srcFact, E_BLEND_FACTOR &dstFact, E_MODULATE_FUNC &modulo, u32 &alphaSource, const f32 param) +
    EMT_ONETEXTURE_BLEND: unpack srcFact & dstFact and Modulo to MaterialTypeParam.
+

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_material_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_material_8h_source.html new file mode 100644 index 0000000..fad581a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_material_8h_source.html @@ -0,0 +1,648 @@ + + + + +Irrlicht 3D Engine: SMaterial.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMaterial.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_MATERIAL_H_INCLUDED__
+00006 #define __S_MATERIAL_H_INCLUDED__
+00007 
+00008 #include "SColor.h"
+00009 #include "matrix4.h"
+00010 #include "irrArray.h"
+00011 #include "irrMath.h"
+00012 #include "EMaterialTypes.h"
+00013 #include "EMaterialFlags.h"
+00014 #include "SMaterialLayer.h"
+00015 
+00016 namespace irr
+00017 {
+00018 namespace video
+00019 {
+00020     class ITexture;
+00021 
+00023     enum E_BLEND_FACTOR
+00024     {
+00025         EBF_ZERO    = 0,            
+00026         EBF_ONE,                    
+00027         EBF_DST_COLOR,              
+00028         EBF_ONE_MINUS_DST_COLOR,    
+00029         EBF_SRC_COLOR,              
+00030         EBF_ONE_MINUS_SRC_COLOR,    
+00031         EBF_SRC_ALPHA,              
+00032         EBF_ONE_MINUS_SRC_ALPHA,    
+00033         EBF_DST_ALPHA,              
+00034         EBF_ONE_MINUS_DST_ALPHA,    
+00035         EBF_SRC_ALPHA_SATURATE      
+00036     };
+00037 
+00039     enum E_BLEND_OPERATION
+00040     {
+00041         EBO_NONE = 0,   
+00042         EBO_ADD,        
+00043         EBO_SUBTRACT,   
+00044         EBO_REVSUBTRACT,
+00045         EBO_MIN,        
+00046         EBO_MAX,        
+00047         EBO_MIN_FACTOR, 
+00048         EBO_MAX_FACTOR, 
+00049         EBO_MIN_ALPHA,  
+00050         EBO_MAX_ALPHA   
+00051     };
+00052 
+00054     enum E_MODULATE_FUNC
+00055     {
+00056         EMFN_MODULATE_1X    = 1,
+00057         EMFN_MODULATE_2X    = 2,
+00058         EMFN_MODULATE_4X    = 4
+00059     };
+00060 
+00062     enum E_COMPARISON_FUNC
+00063     {
+00065         ECFN_NEVER=0,
+00067         ECFN_LESSEQUAL=1,
+00069         ECFN_EQUAL=2,
+00071         ECFN_LESS,
+00073         ECFN_NOTEQUAL,
+00075         ECFN_GREATEREQUAL,
+00077         ECFN_GREATER,
+00079         ECFN_ALWAYS
+00080     };
+00081 
+00083     enum E_COLOR_PLANE
+00084     {
+00086         ECP_NONE=0,
+00088         ECP_ALPHA=1,
+00090         ECP_RED=2,
+00092         ECP_GREEN=4,
+00094         ECP_BLUE=8,
+00096         ECP_RGB=14,
+00098         ECP_ALL=15
+00099     };
+00100 
+00102 
+00104     enum E_ALPHA_SOURCE
+00105     {
+00107         EAS_NONE=0,
+00109         EAS_VERTEX_COLOR,
+00111         EAS_TEXTURE
+00112     };
+00113 
+00115 
+00116     inline f32 pack_textureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE )
+00117     {
+00118         const u32 tmp = (alphaSource << 12) | (modulate << 8) | (srcFact << 4) | dstFact;
+00119         return FR(tmp);
+00120     }
+00121 
+00123 
+00124     inline void unpack_textureBlendFunc ( E_BLEND_FACTOR &srcFact, E_BLEND_FACTOR &dstFact,
+00125             E_MODULATE_FUNC &modulo, u32& alphaSource, const f32 param )
+00126     {
+00127         const u32 state = IR(param);
+00128         alphaSource = (state & 0x0000F000) >> 12;
+00129         modulo  = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 );
+00130         srcFact = E_BLEND_FACTOR ( ( state & 0x000000F0 ) >> 4 );
+00131         dstFact = E_BLEND_FACTOR ( ( state & 0x0000000F ) );
+00132     }
+00133 
+00135     inline bool textureBlendFunc_hasAlpha ( const E_BLEND_FACTOR factor )
+00136     {
+00137         switch ( factor )
+00138         {
+00139             case EBF_SRC_ALPHA:
+00140             case EBF_ONE_MINUS_SRC_ALPHA:
+00141             case EBF_DST_ALPHA:
+00142             case EBF_ONE_MINUS_DST_ALPHA:
+00143             case EBF_SRC_ALPHA_SATURATE:
+00144                 return true;
+00145             default:
+00146                 return false;
+00147         }
+00148     }
+00149 
+00150 
+00152 
+00158     enum E_ANTI_ALIASING_MODE
+00159     {
+00161         EAAM_OFF=0,
+00163         EAAM_SIMPLE=1,
+00165         EAAM_QUALITY=3,
+00167         EAAM_LINE_SMOOTH=4,
+00169         EAAM_POINT_SMOOTH=8,
+00171         EAAM_FULL_BASIC=15,
+00173 
+00174         EAAM_ALPHA_TO_COVERAGE=16
+00175     };
+00176 
+00178 
+00184     enum E_COLOR_MATERIAL
+00185     {
+00187         ECM_NONE=0,
+00189         ECM_DIFFUSE,
+00191         ECM_AMBIENT,
+00193         ECM_EMISSIVE,
+00195         ECM_SPECULAR,
+00197         ECM_DIFFUSE_AND_AMBIENT
+00198     };
+00199 
+00201 
+00202     enum E_POLYGON_OFFSET
+00203     {
+00205 
+00206         EPO_BACK=0,
+00208 
+00210         EPO_FRONT=1
+00211     };
+00212 
+00214     const c8* const PolygonOffsetDirectionNames[] =
+00215     {
+00216         "Back",
+00217         "Front",
+00218         0
+00219     };
+00220 
+00221 
+00223     const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_;
+00224 
+00226     class SMaterial
+00227     {
+00228     public:
+00230         SMaterial()
+00231         : MaterialType(EMT_SOLID), AmbientColor(255,255,255,255), DiffuseColor(255,255,255,255),
+00232             EmissiveColor(0,0,0,0), SpecularColor(255,255,255,255),
+00233             Shininess(0.0f), MaterialTypeParam(0.0f), MaterialTypeParam2(0.0f), Thickness(1.0f),
+00234             ZBuffer(ECFN_LESSEQUAL), AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL),
+00235             ColorMaterial(ECM_DIFFUSE), BlendOperation(EBO_NONE),
+00236             PolygonOffsetFactor(0), PolygonOffsetDirection(EPO_FRONT),
+00237             Wireframe(false), PointCloud(false), GouraudShading(true),
+00238             Lighting(true), ZWriteEnable(true), BackfaceCulling(true), FrontfaceCulling(false),
+00239             FogEnable(false), NormalizeNormals(false), UseMipMaps(true)
+00240         { }
+00241 
+00243 
+00244         SMaterial(const SMaterial& other)
+00245         {
+00246             // These pointers are checked during assignment
+00247             for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00248                 TextureLayer[i].TextureMatrix = 0;
+00249             *this = other;
+00250         }
+00251 
+00253 
+00254         SMaterial& operator=(const SMaterial& other)
+00255         {
+00256             // Check for self-assignment!
+00257             if (this == &other)
+00258                 return *this;
+00259 
+00260             MaterialType = other.MaterialType;
+00261 
+00262             AmbientColor = other.AmbientColor;
+00263             DiffuseColor = other.DiffuseColor;
+00264             EmissiveColor = other.EmissiveColor;
+00265             SpecularColor = other.SpecularColor;
+00266             Shininess = other.Shininess;
+00267             MaterialTypeParam = other.MaterialTypeParam;
+00268             MaterialTypeParam2 = other.MaterialTypeParam2;
+00269             Thickness = other.Thickness;
+00270             for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00271             {
+00272                 TextureLayer[i] = other.TextureLayer[i];
+00273             }
+00274 
+00275             Wireframe = other.Wireframe;
+00276             PointCloud = other.PointCloud;
+00277             GouraudShading = other.GouraudShading;
+00278             Lighting = other.Lighting;
+00279             ZWriteEnable = other.ZWriteEnable;
+00280             BackfaceCulling = other.BackfaceCulling;
+00281             FrontfaceCulling = other.FrontfaceCulling;
+00282             FogEnable = other.FogEnable;
+00283             NormalizeNormals = other.NormalizeNormals;
+00284             ZBuffer = other.ZBuffer;
+00285             AntiAliasing = other.AntiAliasing;
+00286             ColorMask = other.ColorMask;
+00287             ColorMaterial = other.ColorMaterial;
+00288             BlendOperation = other.BlendOperation;
+00289             PolygonOffsetFactor = other.PolygonOffsetFactor;
+00290             PolygonOffsetDirection = other.PolygonOffsetDirection;
+00291             UseMipMaps = other.UseMipMaps;
+00292 
+00293             return *this;
+00294         }
+00295 
+00297         SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES];
+00298 
+00300         E_MATERIAL_TYPE MaterialType;
+00301 
+00303 
+00306         SColor AmbientColor;
+00307 
+00309 
+00310         SColor DiffuseColor;
+00311 
+00313         SColor EmissiveColor;
+00314 
+00316 
+00318         SColor SpecularColor;
+00319 
+00321 
+00350         f32 Shininess;
+00351 
+00353 
+00355         f32 MaterialTypeParam;
+00356 
+00358 
+00359         f32 MaterialTypeParam2;
+00360 
+00362         f32 Thickness;
+00363 
+00365 
+00366         u8 ZBuffer;
+00367 
+00369 
+00372         u8 AntiAliasing;
+00373 
+00375 
+00379         u8 ColorMask:4;
+00380 
+00382 
+00387         u8 ColorMaterial:3;
+00388 
+00390 
+00392         E_BLEND_OPERATION BlendOperation:4;
+00393 
+00395 
+00397         u8 PolygonOffsetFactor:3;
+00398 
+00400 
+00401         E_POLYGON_OFFSET PolygonOffsetDirection:1;
+00402 
+00404 
+00407         bool Wireframe:1;
+00408 
+00410         bool PointCloud:1;
+00411 
+00413         bool GouraudShading:1;
+00414 
+00416         bool Lighting:1;
+00417 
+00419 
+00422         bool ZWriteEnable:1;
+00423 
+00425         bool BackfaceCulling:1;
+00426 
+00428         bool FrontfaceCulling:1;
+00429 
+00431         bool FogEnable:1;
+00432 
+00434 
+00435         bool NormalizeNormals:1;
+00436 
+00438 
+00439         bool UseMipMaps:1;
+00440 
+00442 
+00444         core::matrix4& getTextureMatrix(u32 i)
+00445         {
+00446             return TextureLayer[i].getTextureMatrix();
+00447         }
+00448 
+00450 
+00452         const core::matrix4& getTextureMatrix(u32 i) const
+00453         {
+00454             if (i<MATERIAL_MAX_TEXTURES)
+00455                 return TextureLayer[i].getTextureMatrix();
+00456             else
+00457                 return core::IdentityMatrix;
+00458         }
+00459 
+00461 
+00463         void setTextureMatrix(u32 i, const core::matrix4& mat)
+00464         {
+00465             if (i>=MATERIAL_MAX_TEXTURES)
+00466                 return;
+00467             TextureLayer[i].setTextureMatrix(mat);
+00468         }
+00469 
+00471 
+00473         ITexture* getTexture(u32 i) const
+00474         {
+00475             return i < MATERIAL_MAX_TEXTURES ? TextureLayer[i].Texture : 0;
+00476         }
+00477 
+00479 
+00482         void setTexture(u32 i, ITexture* tex)
+00483         {
+00484             if (i>=MATERIAL_MAX_TEXTURES)
+00485                 return;
+00486             TextureLayer[i].Texture = tex;
+00487         }
+00488 
+00490 
+00492         void setFlag(E_MATERIAL_FLAG flag, bool value)
+00493         {
+00494             switch (flag)
+00495             {
+00496                 case EMF_WIREFRAME:
+00497                     Wireframe = value; break;
+00498                 case EMF_POINTCLOUD:
+00499                     PointCloud = value; break;
+00500                 case EMF_GOURAUD_SHADING:
+00501                     GouraudShading = value; break;
+00502                 case EMF_LIGHTING:
+00503                     Lighting = value; break;
+00504                 case EMF_ZBUFFER:
+00505                     ZBuffer = value; break;
+00506                 case EMF_ZWRITE_ENABLE:
+00507                     ZWriteEnable = value; break;
+00508                 case EMF_BACK_FACE_CULLING:
+00509                     BackfaceCulling = value; break;
+00510                 case EMF_FRONT_FACE_CULLING:
+00511                     FrontfaceCulling = value; break;
+00512                 case EMF_BILINEAR_FILTER:
+00513                 {
+00514                     for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00515                         TextureLayer[i].BilinearFilter = value;
+00516                 }
+00517                 break;
+00518                 case EMF_TRILINEAR_FILTER:
+00519                 {
+00520                     for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00521                         TextureLayer[i].TrilinearFilter = value;
+00522                 }
+00523                 break;
+00524                 case EMF_ANISOTROPIC_FILTER:
+00525                 {
+00526                     if (value)
+00527                         for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00528                             TextureLayer[i].AnisotropicFilter = 0xFF;
+00529                     else
+00530                         for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00531                             TextureLayer[i].AnisotropicFilter = 0;
+00532                 }
+00533                 break;
+00534                 case EMF_FOG_ENABLE:
+00535                     FogEnable = value; break;
+00536                 case EMF_NORMALIZE_NORMALS:
+00537                     NormalizeNormals = value; break;
+00538                 case EMF_TEXTURE_WRAP:
+00539                 {
+00540                     for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
+00541                     {
+00542                         TextureLayer[i].TextureWrapU = (E_TEXTURE_CLAMP)value;
+00543                         TextureLayer[i].TextureWrapV = (E_TEXTURE_CLAMP)value;
+00544                     }
+00545                 }
+00546                 break;
+00547                 case EMF_ANTI_ALIASING:
+00548                     AntiAliasing = value?EAAM_SIMPLE:EAAM_OFF; break;
+00549                 case EMF_COLOR_MASK:
+00550                     ColorMask = value?ECP_ALL:ECP_NONE; break;
+00551                 case EMF_COLOR_MATERIAL:
+00552                     ColorMaterial = value?ECM_DIFFUSE:ECM_NONE; break;
+00553                 case EMF_USE_MIP_MAPS:
+00554                     UseMipMaps = value; break;
+00555                 case EMF_BLEND_OPERATION:
+00556                     BlendOperation = value?EBO_ADD:EBO_NONE; break;
+00557                 case EMF_POLYGON_OFFSET:
+00558                     PolygonOffsetFactor = value?1:0;
+00559                     PolygonOffsetDirection = EPO_BACK;
+00560                     break;
+00561                 default:
+00562                     break;
+00563             }
+00564         }
+00565 
+00567 
+00569         bool getFlag(E_MATERIAL_FLAG flag) const
+00570         {
+00571             switch (flag)
+00572             {
+00573                 case EMF_WIREFRAME:
+00574                     return Wireframe;
+00575                 case EMF_POINTCLOUD:
+00576                     return PointCloud;
+00577                 case EMF_GOURAUD_SHADING:
+00578                     return GouraudShading;
+00579                 case EMF_LIGHTING:
+00580                     return Lighting;
+00581                 case EMF_ZBUFFER:
+00582                     return ZBuffer!=ECFN_NEVER;
+00583                 case EMF_ZWRITE_ENABLE:
+00584                     return ZWriteEnable;
+00585                 case EMF_BACK_FACE_CULLING:
+00586                     return BackfaceCulling;
+00587                 case EMF_FRONT_FACE_CULLING:
+00588                     return FrontfaceCulling;
+00589                 case EMF_BILINEAR_FILTER:
+00590                     return TextureLayer[0].BilinearFilter;
+00591                 case EMF_TRILINEAR_FILTER:
+00592                     return TextureLayer[0].TrilinearFilter;
+00593                 case EMF_ANISOTROPIC_FILTER:
+00594                     return TextureLayer[0].AnisotropicFilter!=0;
+00595                 case EMF_FOG_ENABLE:
+00596                     return FogEnable;
+00597                 case EMF_NORMALIZE_NORMALS:
+00598                     return NormalizeNormals;
+00599                 case EMF_TEXTURE_WRAP:
+00600                     return !(TextureLayer[0].TextureWrapU ||
+00601                             TextureLayer[0].TextureWrapV ||
+00602                             TextureLayer[1].TextureWrapU ||
+00603                             TextureLayer[1].TextureWrapV ||
+00604                             TextureLayer[2].TextureWrapU ||
+00605                             TextureLayer[2].TextureWrapV ||
+00606                             TextureLayer[3].TextureWrapU ||
+00607                             TextureLayer[3].TextureWrapV);
+00608                 case EMF_ANTI_ALIASING:
+00609                     return (AntiAliasing==1);
+00610                 case EMF_COLOR_MASK:
+00611                     return (ColorMask!=ECP_NONE);
+00612                 case EMF_COLOR_MATERIAL:
+00613                     return (ColorMaterial != ECM_NONE);
+00614                 case EMF_USE_MIP_MAPS:
+00615                     return UseMipMaps;
+00616                 case EMF_BLEND_OPERATION:
+00617                     return BlendOperation != EBO_NONE;
+00618                 case EMF_POLYGON_OFFSET:
+00619                     return PolygonOffsetFactor != 0;
+00620             }
+00621 
+00622             return false;
+00623         }
+00624 
+00626 
+00628         inline bool operator!=(const SMaterial& b) const
+00629         {
+00630             bool different =
+00631                 MaterialType != b.MaterialType ||
+00632                 AmbientColor != b.AmbientColor ||
+00633                 DiffuseColor != b.DiffuseColor ||
+00634                 EmissiveColor != b.EmissiveColor ||
+00635                 SpecularColor != b.SpecularColor ||
+00636                 Shininess != b.Shininess ||
+00637                 MaterialTypeParam != b.MaterialTypeParam ||
+00638                 MaterialTypeParam2 != b.MaterialTypeParam2 ||
+00639                 Thickness != b.Thickness ||
+00640                 Wireframe != b.Wireframe ||
+00641                 PointCloud != b.PointCloud ||
+00642                 GouraudShading != b.GouraudShading ||
+00643                 Lighting != b.Lighting ||
+00644                 ZBuffer != b.ZBuffer ||
+00645                 ZWriteEnable != b.ZWriteEnable ||
+00646                 BackfaceCulling != b.BackfaceCulling ||
+00647                 FrontfaceCulling != b.FrontfaceCulling ||
+00648                 FogEnable != b.FogEnable ||
+00649                 NormalizeNormals != b.NormalizeNormals ||
+00650                 AntiAliasing != b.AntiAliasing ||
+00651                 ColorMask != b.ColorMask ||
+00652                 ColorMaterial != b.ColorMaterial ||
+00653                 BlendOperation != b.BlendOperation ||
+00654                 PolygonOffsetFactor != b.PolygonOffsetFactor ||
+00655                 PolygonOffsetDirection != b.PolygonOffsetDirection ||
+00656                 UseMipMaps != b.UseMipMaps;
+00657             for (u32 i=0; (i<MATERIAL_MAX_TEXTURES) && !different; ++i)
+00658             {
+00659                 different |= (TextureLayer[i] != b.TextureLayer[i]);
+00660             }
+00661             return different;
+00662         }
+00663 
+00665 
+00667         inline bool operator==(const SMaterial& b) const
+00668         { return !(b!=*this); }
+00669 
+00670         bool isTransparent() const
+00671         {
+00672             return MaterialType==EMT_TRANSPARENT_ADD_COLOR ||
+00673                 MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL ||
+00674                 MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA ||
+00675                 MaterialType==EMT_TRANSPARENT_REFLECTION_2_LAYER;
+00676         }
+00677     };
+00678 
+00680     IRRLICHT_API extern SMaterial IdentityMaterial;
+00681 
+00682 } // end namespace video
+00683 } // end namespace irr
+00684 
+00685 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h.html new file mode 100644 index 0000000..531dc5c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h.html @@ -0,0 +1,157 @@ + + + + +Irrlicht 3D Engine: SMaterialLayer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SMaterialLayer.h File Reference
+
+
+
#include "matrix4.h"
+#include "irrAllocator.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h_source.html new file mode 100644 index 0000000..6304095 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_material_layer_8h_source.html @@ -0,0 +1,309 @@ + + + + +Irrlicht 3D Engine: SMaterialLayer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMaterialLayer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_MATERIAL_LAYER_H_INCLUDED__
+00006 #define __S_MATERIAL_LAYER_H_INCLUDED__
+00007 
+00008 #include "matrix4.h"
+00009 #include "irrAllocator.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace video
+00014 {
+00015     class ITexture;
+00016 
+00018     enum E_TEXTURE_CLAMP
+00019     {
+00021         ETC_REPEAT = 0,
+00023         ETC_CLAMP,
+00025         ETC_CLAMP_TO_EDGE,
+00027         ETC_CLAMP_TO_BORDER,
+00029         ETC_MIRROR,
+00031         ETC_MIRROR_CLAMP,
+00033         ETC_MIRROR_CLAMP_TO_EDGE,
+00035         ETC_MIRROR_CLAMP_TO_BORDER
+00036     };
+00037     static const char* const aTextureClampNames[] = {
+00038             "texture_clamp_repeat",
+00039             "texture_clamp_clamp",
+00040             "texture_clamp_clamp_to_edge",
+00041             "texture_clamp_clamp_to_border",
+00042             "texture_clamp_mirror",
+00043             "texture_clamp_mirror_clamp",
+00044             "texture_clamp_mirror_clamp_to_edge",
+00045             "texture_clamp_mirror_clamp_to_border", 0};
+00046 
+00048     class SMaterialLayer
+00049     {
+00050     public:
+00052         SMaterialLayer()
+00053             : Texture(0),
+00054                 TextureWrapU(ETC_REPEAT),
+00055                 TextureWrapV(ETC_REPEAT),
+00056                 BilinearFilter(true),
+00057                 TrilinearFilter(false),
+00058                 AnisotropicFilter(0),
+00059                 LODBias(0),
+00060                 TextureMatrix(0)
+00061             {}
+00062 
+00064 
+00065         SMaterialLayer(const SMaterialLayer& other)
+00066         {
+00067             // This pointer is checked during assignment
+00068             TextureMatrix = 0;
+00069             *this = other;
+00070         }
+00071 
+00073         ~SMaterialLayer()
+00074         {
+00075             MatrixAllocator.destruct(TextureMatrix);
+00076             MatrixAllocator.deallocate(TextureMatrix); 
+00077         }
+00078 
+00080 
+00082         SMaterialLayer& operator=(const SMaterialLayer& other)
+00083         {
+00084             // Check for self-assignment!
+00085             if (this == &other)
+00086                 return *this;
+00087 
+00088             Texture = other.Texture;
+00089             if (TextureMatrix)
+00090             {
+00091                 if (other.TextureMatrix)
+00092                     *TextureMatrix = *other.TextureMatrix;
+00093                 else
+00094                 {
+00095                     MatrixAllocator.destruct(TextureMatrix);
+00096                     MatrixAllocator.deallocate(TextureMatrix); 
+00097                     TextureMatrix = 0;
+00098                 }
+00099             }
+00100             else
+00101             {
+00102                 if (other.TextureMatrix)
+00103                 {
+00104                     TextureMatrix = MatrixAllocator.allocate(1);
+00105                     MatrixAllocator.construct(TextureMatrix,*other.TextureMatrix);
+00106                 }
+00107                 else
+00108                     TextureMatrix = 0;
+00109             }
+00110             TextureWrapU = other.TextureWrapU;
+00111             TextureWrapV = other.TextureWrapV;
+00112             BilinearFilter = other.BilinearFilter;
+00113             TrilinearFilter = other.TrilinearFilter;
+00114             AnisotropicFilter = other.AnisotropicFilter;
+00115             LODBias = other.LODBias;
+00116 
+00117             return *this;
+00118         }
+00119 
+00121 
+00122         core::matrix4& getTextureMatrix()
+00123         {
+00124             if (!TextureMatrix)
+00125             {
+00126                 TextureMatrix = MatrixAllocator.allocate(1);
+00127                 MatrixAllocator.construct(TextureMatrix,core::IdentityMatrix);
+00128             }
+00129             return *TextureMatrix;
+00130         }
+00131 
+00133 
+00134         const core::matrix4& getTextureMatrix() const
+00135         {
+00136             if (TextureMatrix)
+00137                 return *TextureMatrix;
+00138             else
+00139                 return core::IdentityMatrix;
+00140         }
+00141 
+00143 
+00144         void setTextureMatrix(const core::matrix4& mat)
+00145         {
+00146             if (!TextureMatrix)
+00147             {
+00148                 TextureMatrix = MatrixAllocator.allocate(1);
+00149                 MatrixAllocator.construct(TextureMatrix,mat);
+00150             }
+00151             else
+00152                 *TextureMatrix = mat;
+00153         }
+00154 
+00156 
+00158         inline bool operator!=(const SMaterialLayer& b) const
+00159         {
+00160             bool different =
+00161                 Texture != b.Texture ||
+00162                 TextureWrapU != b.TextureWrapU ||
+00163                 TextureWrapV != b.TextureWrapV ||
+00164                 BilinearFilter != b.BilinearFilter ||
+00165                 TrilinearFilter != b.TrilinearFilter ||
+00166                 AnisotropicFilter != b.AnisotropicFilter ||
+00167                 LODBias != b.LODBias;
+00168             if (different)
+00169                 return true;
+00170             else
+00171                 different |= (TextureMatrix != b.TextureMatrix) &&
+00172                     TextureMatrix && b.TextureMatrix &&
+00173                     (*TextureMatrix != *(b.TextureMatrix));
+00174             return different;
+00175         }
+00176 
+00178 
+00180         inline bool operator==(const SMaterialLayer& b) const
+00181         { return !(b!=*this); }
+00182 
+00184         ITexture* Texture;
+00185 
+00187 
+00188         u8 TextureWrapU:4;
+00189         u8 TextureWrapV:4;
+00190 
+00192         bool BilinearFilter:1;
+00193 
+00195 
+00197         bool TrilinearFilter:1;
+00198 
+00200 
+00206         u8 AnisotropicFilter;
+00207 
+00209 
+00213         s8 LODBias;
+00214 
+00215     private:
+00216         friend class SMaterial;
+00217         irr::core::irrAllocator<irr::core::matrix4> MatrixAllocator;
+00218 
+00220 
+00222         core::matrix4* TextureMatrix;
+00223     };
+00224 
+00225 } // end namespace video
+00226 } // end namespace irr
+00227 
+00228 #endif // __S_MATERIAL_LAYER_H_INCLUDED__
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h.html new file mode 100644 index 0000000..7883d68 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: SMesh.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SMesh.h File Reference
+
+
+
#include "IMesh.h"
+#include "IMeshBuffer.h"
+#include "aabbox3d.h"
+#include "irrArray.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h_source.html new file mode 100644 index 0000000..fc7c448 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_8h_source.html @@ -0,0 +1,244 @@ + + + + +Irrlicht 3D Engine: SMesh.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMesh.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_MESH_H_INCLUDED__
+00006 #define __S_MESH_H_INCLUDED__
+00007 
+00008 #include "IMesh.h"
+00009 #include "IMeshBuffer.h"
+00010 #include "aabbox3d.h"
+00011 #include "irrArray.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace scene
+00016 {
+00018     struct SMesh : public IMesh
+00019     {
+00021         SMesh()
+00022         {
+00023             #ifdef _DEBUG
+00024             setDebugName("SMesh");
+00025             #endif
+00026         }
+00027 
+00029         virtual ~SMesh()
+00030         {
+00031             // drop buffers
+00032             for (u32 i=0; i<MeshBuffers.size(); ++i)
+00033                 MeshBuffers[i]->drop();
+00034         }
+00035 
+00037         virtual void clear()
+00038         {
+00039             for (u32 i=0; i<MeshBuffers.size(); ++i)
+00040                 MeshBuffers[i]->drop();
+00041             MeshBuffers.clear();
+00042             BoundingBox.reset ( 0.f, 0.f, 0.f );
+00043         }
+00044 
+00045 
+00047         virtual u32 getMeshBufferCount() const
+00048         {
+00049             return MeshBuffers.size();
+00050         }
+00051 
+00053         virtual IMeshBuffer* getMeshBuffer(u32 nr) const
+00054         {
+00055             return MeshBuffers[nr];
+00056         }
+00057 
+00059 
+00060         virtual IMeshBuffer* getMeshBuffer( const video::SMaterial & material) const
+00061         {
+00062             for (s32 i = (s32)MeshBuffers.size()-1; i >= 0; --i)
+00063             {
+00064                 if ( material == MeshBuffers[i]->getMaterial())
+00065                     return MeshBuffers[i];
+00066             }
+00067 
+00068             return 0;
+00069         }
+00070 
+00072         virtual const core::aabbox3d<f32>& getBoundingBox() const
+00073         {
+00074             return BoundingBox;
+00075         }
+00076 
+00078         virtual void setBoundingBox( const core::aabbox3df& box)
+00079         {
+00080             BoundingBox = box;
+00081         }
+00082 
+00084         void recalculateBoundingBox()
+00085         {
+00086             if (MeshBuffers.size())
+00087             {
+00088                 BoundingBox = MeshBuffers[0]->getBoundingBox();
+00089                 for (u32 i=1; i<MeshBuffers.size(); ++i)
+00090                     BoundingBox.addInternalBox(MeshBuffers[i]->getBoundingBox());
+00091             }
+00092             else
+00093                 BoundingBox.reset(0.0f, 0.0f, 0.0f);
+00094         }
+00095 
+00097 
+00098         void addMeshBuffer(IMeshBuffer* buf)
+00099         {
+00100             if (buf)
+00101             {
+00102                 buf->grab();
+00103                 MeshBuffers.push_back(buf);
+00104             }
+00105         }
+00106 
+00108         virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
+00109         {
+00110             for (u32 i=0; i<MeshBuffers.size(); ++i)
+00111                 MeshBuffers[i]->getMaterial().setFlag(flag, newvalue);
+00112         }
+00113 
+00115         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
+00116         {
+00117             for (u32 i=0; i<MeshBuffers.size(); ++i)
+00118                 MeshBuffers[i]->setHardwareMappingHint(newMappingHint, buffer);
+00119         }
+00120 
+00122         virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
+00123         {
+00124             for (u32 i=0; i<MeshBuffers.size(); ++i)
+00125                 MeshBuffers[i]->setDirty(buffer);
+00126         }
+00127 
+00129         core::array<IMeshBuffer*> MeshBuffers;
+00130 
+00132         core::aabbox3d<f32> BoundingBox;
+00133     };
+00134 
+00135 
+00136 } // end namespace scene
+00137 } // end namespace irr
+00138 
+00139 #endif
+00140 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h.html new file mode 100644 index 0000000..3b894cf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: SMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMeshBuffer.h File Reference
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h_source.html new file mode 100644 index 0000000..2d90846 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_8h_source.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: SMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 // replaced by template
+00006 #include "CMeshBuffer.h"
+00007 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h.html new file mode 100644 index 0000000..83708c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: SMeshBufferLightMap.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMeshBufferLightMap.h File Reference
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h_source.html new file mode 100644 index 0000000..c1e9f37 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_light_map_8h_source.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: SMeshBufferLightMap.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMeshBufferLightMap.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 // replaced by template
+00006 #include "CMeshBuffer.h"
+00007 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h.html new file mode 100644 index 0000000..8b2e4e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: SMeshBufferTangents.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMeshBufferTangents.h File Reference
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h_source.html new file mode 100644 index 0000000..a0026b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_mesh_buffer_tangents_8h_source.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: SMeshBufferTangents.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SMeshBufferTangents.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 // replaced by template
+00006 #include "CMeshBuffer.h"
+00007 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_particle_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_particle_8h.html new file mode 100644 index 0000000..8d49f82 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_particle_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: SParticle.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SParticle.h File Reference
+
+
+
#include "vector3d.h"
+#include "dimension2d.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_particle_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_particle_8h_source.html new file mode 100644 index 0000000..81d01a5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_particle_8h_source.html @@ -0,0 +1,166 @@ + + + + +Irrlicht 3D Engine: SParticle.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SParticle.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_PARTICLE_H_INCLUDED__
+00006 #define __S_PARTICLE_H_INCLUDED__
+00007 
+00008 #include "vector3d.h"
+00009 #include "dimension2d.h"
+00010 #include "SColor.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00017     struct SParticle
+00018     {
+00020         core::vector3df pos;
+00021 
+00023         core::vector3df vector;
+00024 
+00026         u32 startTime;
+00027 
+00029         u32 endTime;
+00030 
+00032         video::SColor color;
+00033 
+00035 
+00036         video::SColor startColor;
+00037 
+00039 
+00040         core::vector3df startVector;
+00041 
+00043 
+00044         core::dimension2df size;
+00045 
+00047 
+00048         core::dimension2df startSize;
+00049     };
+00050 
+00051 
+00052 } // end namespace scene
+00053 } // end namespace irr
+00054 
+00055 #endif
+00056 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h.html new file mode 100644 index 0000000..1b56686 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: SSharedMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SSharedMeshBuffer.h File Reference
+
+
+
#include "irrArray.h"
+#include "IMeshBuffer.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h_source.html new file mode 100644 index 0000000..5ab9a77 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_shared_mesh_buffer_8h_source.html @@ -0,0 +1,325 @@ + + + + +Irrlicht 3D Engine: SSharedMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SSharedMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_SHARED_MESH_BUFFER_H_INCLUDED__
+00006 #define __S_SHARED_MESH_BUFFER_H_INCLUDED__
+00007 
+00008 #include "irrArray.h"
+00009 #include "IMeshBuffer.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00016     struct SSharedMeshBuffer : public IMeshBuffer
+00017     {
+00019         SSharedMeshBuffer() : IMeshBuffer(), Vertices(0), ChangedID_Vertex(1), ChangedID_Index(1), MappingHintVertex(EHM_NEVER), MappingHintIndex(EHM_NEVER)
+00020         {
+00021             #ifdef _DEBUG
+00022             setDebugName("SSharedMeshBuffer");
+00023             #endif
+00024         }
+00025 
+00027         SSharedMeshBuffer(core::array<video::S3DVertex> *vertices) : IMeshBuffer(), Vertices(vertices)
+00028         {
+00029             #ifdef _DEBUG
+00030             setDebugName("SSharedMeshBuffer");
+00031             #endif
+00032         }
+00033 
+00035         virtual const video::SMaterial& getMaterial() const
+00036         {
+00037             return Material;
+00038         }
+00039 
+00041         virtual video::SMaterial& getMaterial()
+00042         {
+00043             return Material;
+00044         }
+00045 
+00047         virtual const void* getVertices() const
+00048         {
+00049             if (Vertices)
+00050                 return Vertices->const_pointer();
+00051             else
+00052                 return 0;
+00053         }
+00054 
+00056         virtual void* getVertices()
+00057         {
+00058             if (Vertices)
+00059                 return Vertices->pointer();
+00060             else
+00061                 return 0;
+00062         }
+00063 
+00065         virtual u32 getVertexCount() const
+00066         {
+00067             if (Vertices)
+00068                 return Vertices->size();
+00069             else
+00070                 return 0;
+00071         }
+00072 
+00074         virtual const u16* getIndices() const
+00075         {
+00076             return Indices.const_pointer();
+00077         }
+00078 
+00080         virtual u16* getIndices()
+00081         {
+00082             return Indices.pointer();
+00083         }
+00084 
+00086         virtual u32 getIndexCount() const
+00087         {
+00088             return Indices.size();
+00089         }
+00090 
+00092         virtual video::E_INDEX_TYPE getIndexType() const
+00093         {
+00094             return video::EIT_16BIT;
+00095         }
+00096 
+00098         virtual const core::aabbox3d<f32>& getBoundingBox() const
+00099         {
+00100             return BoundingBox;
+00101         }
+00102 
+00104         virtual void setBoundingBox( const core::aabbox3df& box)
+00105         {
+00106             BoundingBox = box;
+00107         }
+00108 
+00110         virtual video::E_VERTEX_TYPE getVertexType() const
+00111         {
+00112             return video::EVT_STANDARD;
+00113         }
+00114 
+00116         virtual void recalculateBoundingBox()
+00117         {
+00118             if (!Vertices || Vertices->empty() || Indices.empty())
+00119                 BoundingBox.reset(0,0,0);
+00120             else
+00121             {
+00122                 BoundingBox.reset((*Vertices)[Indices[0]].Pos);
+00123                 for (u32 i=1; i<Indices.size(); ++i)
+00124                     BoundingBox.addInternalPoint((*Vertices)[Indices[i]].Pos);
+00125             }
+00126         }
+00127 
+00129         virtual const core::vector3df& getPosition(u32 i) const
+00130         {
+00131             _IRR_DEBUG_BREAK_IF(!Vertices);
+00132             return (*Vertices)[Indices[i]].Pos;
+00133         }
+00134 
+00136         virtual core::vector3df& getPosition(u32 i)
+00137         {
+00138             _IRR_DEBUG_BREAK_IF(!Vertices);
+00139             return (*Vertices)[Indices[i]].Pos;
+00140         }
+00141 
+00143         virtual const core::vector3df& getNormal(u32 i) const
+00144         {
+00145             _IRR_DEBUG_BREAK_IF(!Vertices);
+00146             return (*Vertices)[Indices[i]].Normal;
+00147         }
+00148 
+00150         virtual core::vector3df& getNormal(u32 i)
+00151         {
+00152             _IRR_DEBUG_BREAK_IF(!Vertices);
+00153             return (*Vertices)[Indices[i]].Normal;
+00154         }
+00155 
+00157         virtual const core::vector2df& getTCoords(u32 i) const
+00158         {
+00159             _IRR_DEBUG_BREAK_IF(!Vertices);
+00160             return (*Vertices)[Indices[i]].TCoords;
+00161         }
+00162 
+00164         virtual core::vector2df& getTCoords(u32 i)
+00165         {
+00166             _IRR_DEBUG_BREAK_IF(!Vertices);
+00167             return (*Vertices)[Indices[i]].TCoords;
+00168         }
+00169 
+00171         virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {}
+00172 
+00174         virtual void append(const IMeshBuffer* const other) {}
+00175 
+00177         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
+00178         {
+00179             return MappingHintVertex;
+00180         }
+00181 
+00183         virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
+00184         {
+00185             return MappingHintIndex;
+00186         }
+00187 
+00189         virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
+00190         {
+00191             if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX)
+00192                 MappingHintVertex=NewMappingHint;
+00193             if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_INDEX)
+00194                 MappingHintIndex=NewMappingHint;
+00195         }
+00196 
+00198         virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
+00199         {
+00200             if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX)
+00201                 ++ChangedID_Vertex;
+00202             if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_INDEX)
+00203                 ++ChangedID_Index;
+00204         }
+00205 
+00207 
+00208         virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
+00209 
+00211 
+00212         virtual u32 getChangedID_Index() const {return ChangedID_Index;}
+00213 
+00215         video::SMaterial Material;
+00216 
+00218         core::array<video::S3DVertex> *Vertices;
+00219 
+00221         core::array<u16> Indices;
+00222 
+00224         u32 ChangedID_Vertex;
+00225 
+00227         u32 ChangedID_Index;
+00228 
+00230         core::aabbox3df BoundingBox;
+00231 
+00233         E_HARDWARE_MAPPING MappingHintVertex;
+00234         E_HARDWARE_MAPPING MappingHintIndex;
+00235     };
+00236 
+00237 
+00238 } // end namespace scene
+00239 } // end namespace irr
+00240 
+00241 #endif
+00242 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h.html new file mode 100644 index 0000000..36acad1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: SSkinMeshBuffer.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SSkinMeshBuffer.h File Reference
+
+
+
#include "IMeshBuffer.h"
+#include "S3DVertex.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h_source.html new file mode 100644 index 0000000..a8a3f07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_skin_mesh_buffer_8h_source.html @@ -0,0 +1,493 @@ + + + + +Irrlicht 3D Engine: SSkinMeshBuffer.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SSkinMeshBuffer.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SKIN_MESH_BUFFER_H_INCLUDED__
+00006 #define __I_SKIN_MESH_BUFFER_H_INCLUDED__
+00007 
+00008 #include "IMeshBuffer.h"
+00009 #include "S3DVertex.h"
+00010 
+00011 
+00012 namespace irr
+00013 {
+00014 namespace scene
+00015 {
+00016 
+00017 
+00019 struct SSkinMeshBuffer : public IMeshBuffer
+00020 {
+00022     SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) :
+00023         ChangedID_Vertex(1), ChangedID_Index(1), VertexType(vt),
+00024         MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER),
+00025         BoundingBoxNeedsRecalculated(true)
+00026     {
+00027         #ifdef _DEBUG
+00028         setDebugName("SSkinMeshBuffer");
+00029         #endif
+00030     }
+00031 
+00033     virtual const video::SMaterial& getMaterial() const
+00034     {
+00035         return Material;
+00036     }
+00037 
+00039     virtual video::SMaterial& getMaterial()
+00040     {
+00041         return Material;
+00042     }
+00043 
+00045     virtual video::S3DVertex *getVertex(u32 index)
+00046     {
+00047         switch (VertexType)
+00048         {
+00049             case video::EVT_2TCOORDS:
+00050                 return (video::S3DVertex*)&Vertices_2TCoords[index];
+00051             case video::EVT_TANGENTS:
+00052                 return (video::S3DVertex*)&Vertices_Tangents[index];
+00053             default:
+00054                 return &Vertices_Standard[index];
+00055         }
+00056     }
+00057 
+00059     virtual const void* getVertices() const
+00060     {
+00061         switch (VertexType)
+00062         {
+00063             case video::EVT_2TCOORDS:
+00064                 return Vertices_2TCoords.const_pointer();
+00065             case video::EVT_TANGENTS:
+00066                 return Vertices_Tangents.const_pointer();
+00067             default:
+00068                 return Vertices_Standard.const_pointer();
+00069         }
+00070     }
+00071 
+00073     virtual void* getVertices()
+00074     {
+00075         switch (VertexType)
+00076         {
+00077             case video::EVT_2TCOORDS:
+00078                 return Vertices_2TCoords.pointer();
+00079             case video::EVT_TANGENTS:
+00080                 return Vertices_Tangents.pointer();
+00081             default:
+00082                 return Vertices_Standard.pointer();
+00083         }
+00084     }
+00085 
+00087     virtual u32 getVertexCount() const
+00088     {
+00089         switch (VertexType)
+00090         {
+00091             case video::EVT_2TCOORDS:
+00092                 return Vertices_2TCoords.size();
+00093             case video::EVT_TANGENTS:
+00094                 return Vertices_Tangents.size();
+00095             default:
+00096                 return Vertices_Standard.size();
+00097         }
+00098     }
+00099 
+00101 
+00102     virtual video::E_INDEX_TYPE getIndexType() const
+00103     {
+00104         return video::EIT_16BIT;
+00105     }
+00106 
+00108     virtual const u16* getIndices() const
+00109     {
+00110         return Indices.const_pointer();
+00111     }
+00112 
+00114     virtual u16* getIndices()
+00115     {
+00116         return Indices.pointer();
+00117     }
+00118 
+00120     virtual u32 getIndexCount() const
+00121     {
+00122         return Indices.size();
+00123     }
+00124 
+00126     virtual const core::aabbox3d<f32>& getBoundingBox() const
+00127     {
+00128         return BoundingBox;
+00129     }
+00130 
+00132     virtual void setBoundingBox( const core::aabbox3df& box)
+00133     {
+00134         BoundingBox = box;
+00135     }
+00136 
+00138     virtual void recalculateBoundingBox()
+00139     {
+00140         if(!BoundingBoxNeedsRecalculated)
+00141             return;
+00142 
+00143         BoundingBoxNeedsRecalculated = false;
+00144 
+00145         switch (VertexType)
+00146         {
+00147             case video::EVT_STANDARD:
+00148             {
+00149                 if (Vertices_Standard.empty())
+00150                     BoundingBox.reset(0,0,0);
+00151                 else
+00152                 {
+00153                     BoundingBox.reset(Vertices_Standard[0].Pos);
+00154                     for (u32 i=1; i<Vertices_Standard.size(); ++i)
+00155                         BoundingBox.addInternalPoint(Vertices_Standard[i].Pos);
+00156                 }
+00157                 break;
+00158             }
+00159             case video::EVT_2TCOORDS:
+00160             {
+00161                 if (Vertices_2TCoords.empty())
+00162                     BoundingBox.reset(0,0,0);
+00163                 else
+00164                 {
+00165                     BoundingBox.reset(Vertices_2TCoords[0].Pos);
+00166                     for (u32 i=1; i<Vertices_2TCoords.size(); ++i)
+00167                         BoundingBox.addInternalPoint(Vertices_2TCoords[i].Pos);
+00168                 }
+00169                 break;
+00170             }
+00171             case video::EVT_TANGENTS:
+00172             {
+00173                 if (Vertices_Tangents.empty())
+00174                     BoundingBox.reset(0,0,0);
+00175                 else
+00176                 {
+00177                     BoundingBox.reset(Vertices_Tangents[0].Pos);
+00178                     for (u32 i=1; i<Vertices_Tangents.size(); ++i)
+00179                         BoundingBox.addInternalPoint(Vertices_Tangents[i].Pos);
+00180                 }
+00181                 break;
+00182             }
+00183         }
+00184     }
+00185 
+00187     virtual video::E_VERTEX_TYPE getVertexType() const
+00188     {
+00189         return VertexType;
+00190     }
+00191 
+00193     virtual void convertTo2TCoords()
+00194     {
+00195         if (VertexType==video::EVT_STANDARD)
+00196         {
+00197             for(u32 n=0;n<Vertices_Standard.size();++n)
+00198             {
+00199                 video::S3DVertex2TCoords Vertex;
+00200                 Vertex.Color=Vertices_Standard[n].Color;
+00201                 Vertex.Pos=Vertices_Standard[n].Pos;
+00202                 Vertex.Normal=Vertices_Standard[n].Normal;
+00203                 Vertex.TCoords=Vertices_Standard[n].TCoords;
+00204                 Vertices_2TCoords.push_back(Vertex);
+00205             }
+00206             Vertices_Standard.clear();
+00207             VertexType=video::EVT_2TCOORDS;
+00208         }
+00209     }
+00210 
+00212     virtual void convertToTangents()
+00213     {
+00214         if (VertexType==video::EVT_STANDARD)
+00215         {
+00216             for(u32 n=0;n<Vertices_Standard.size();++n)
+00217             {
+00218                 video::S3DVertexTangents Vertex;
+00219                 Vertex.Color=Vertices_Standard[n].Color;
+00220                 Vertex.Pos=Vertices_Standard[n].Pos;
+00221                 Vertex.Normal=Vertices_Standard[n].Normal;
+00222                 Vertex.TCoords=Vertices_Standard[n].TCoords;
+00223                 Vertices_Tangents.push_back(Vertex);
+00224             }
+00225             Vertices_Standard.clear();
+00226             VertexType=video::EVT_TANGENTS;
+00227         }
+00228         else if (VertexType==video::EVT_2TCOORDS)
+00229         {
+00230             for(u32 n=0;n<Vertices_2TCoords.size();++n)
+00231             {
+00232                 video::S3DVertexTangents Vertex;
+00233                 Vertex.Color=Vertices_2TCoords[n].Color;
+00234                 Vertex.Pos=Vertices_2TCoords[n].Pos;
+00235                 Vertex.Normal=Vertices_2TCoords[n].Normal;
+00236                 Vertex.TCoords=Vertices_2TCoords[n].TCoords;
+00237                 Vertices_Tangents.push_back(Vertex);
+00238             }
+00239             Vertices_2TCoords.clear();
+00240             VertexType=video::EVT_TANGENTS;
+00241         }
+00242     }
+00243 
+00245     virtual const core::vector3df& getPosition(u32 i) const
+00246     {
+00247         switch (VertexType)
+00248         {
+00249             case video::EVT_2TCOORDS:
+00250                 return Vertices_2TCoords[i].Pos;
+00251             case video::EVT_TANGENTS:
+00252                 return Vertices_Tangents[i].Pos;
+00253             default:
+00254                 return Vertices_Standard[i].Pos;
+00255         }
+00256     }
+00257 
+00259     virtual core::vector3df& getPosition(u32 i)
+00260     {
+00261         switch (VertexType)
+00262         {
+00263             case video::EVT_2TCOORDS:
+00264                 return Vertices_2TCoords[i].Pos;
+00265             case video::EVT_TANGENTS:
+00266                 return Vertices_Tangents[i].Pos;
+00267             default:
+00268                 return Vertices_Standard[i].Pos;
+00269         }
+00270     }
+00271 
+00273     virtual const core::vector3df& getNormal(u32 i) const
+00274     {
+00275         switch (VertexType)
+00276         {
+00277             case video::EVT_2TCOORDS:
+00278                 return Vertices_2TCoords[i].Normal;
+00279             case video::EVT_TANGENTS:
+00280                 return Vertices_Tangents[i].Normal;
+00281             default:
+00282                 return Vertices_Standard[i].Normal;
+00283         }
+00284     }
+00285 
+00287     virtual core::vector3df& getNormal(u32 i)
+00288     {
+00289         switch (VertexType)
+00290         {
+00291             case video::EVT_2TCOORDS:
+00292                 return Vertices_2TCoords[i].Normal;
+00293             case video::EVT_TANGENTS:
+00294                 return Vertices_Tangents[i].Normal;
+00295             default:
+00296                 return Vertices_Standard[i].Normal;
+00297         }
+00298     }
+00299 
+00301     virtual const core::vector2df& getTCoords(u32 i) const
+00302     {
+00303         switch (VertexType)
+00304         {
+00305             case video::EVT_2TCOORDS:
+00306                 return Vertices_2TCoords[i].TCoords;
+00307             case video::EVT_TANGENTS:
+00308                 return Vertices_Tangents[i].TCoords;
+00309             default:
+00310                 return Vertices_Standard[i].TCoords;
+00311         }
+00312     }
+00313 
+00315     virtual core::vector2df& getTCoords(u32 i)
+00316     {
+00317         switch (VertexType)
+00318         {
+00319             case video::EVT_2TCOORDS:
+00320                 return Vertices_2TCoords[i].TCoords;
+00321             case video::EVT_TANGENTS:
+00322                 return Vertices_Tangents[i].TCoords;
+00323             default:
+00324                 return Vertices_Standard[i].TCoords;
+00325         }
+00326     }
+00327 
+00329     virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {}
+00330 
+00332     virtual void append(const IMeshBuffer* const other) {}
+00333 
+00335     virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
+00336     {
+00337         return MappingHint_Vertex;
+00338     }
+00339 
+00341     virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
+00342     {
+00343         return MappingHint_Index;
+00344     }
+00345 
+00347     virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
+00348     {
+00349         if (Buffer==EBT_VERTEX)
+00350             MappingHint_Vertex=NewMappingHint;
+00351         else if (Buffer==EBT_INDEX)
+00352             MappingHint_Index=NewMappingHint;
+00353         else if (Buffer==EBT_VERTEX_AND_INDEX)
+00354         {
+00355             MappingHint_Vertex=NewMappingHint;
+00356             MappingHint_Index=NewMappingHint;
+00357         }
+00358     }
+00359 
+00361     virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
+00362     {
+00363         if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
+00364             ++ChangedID_Vertex;
+00365         if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
+00366             ++ChangedID_Index;
+00367     }
+00368 
+00369     virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
+00370 
+00371     virtual u32 getChangedID_Index() const {return ChangedID_Index;}
+00372 
+00374     void boundingBoxNeedsRecalculated(void) { BoundingBoxNeedsRecalculated = true; }
+00375 
+00376     core::array<video::S3DVertexTangents> Vertices_Tangents;
+00377     core::array<video::S3DVertex2TCoords> Vertices_2TCoords;
+00378     core::array<video::S3DVertex> Vertices_Standard;
+00379     core::array<u16> Indices;
+00380 
+00381     u32 ChangedID_Vertex;
+00382     u32 ChangedID_Index;
+00383 
+00384     //ISkinnedMesh::SJoint *AttachedJoint;
+00385     core::matrix4 Transformation;
+00386 
+00387     video::SMaterial Material;
+00388     video::E_VERTEX_TYPE VertexType;
+00389 
+00390     core::aabbox3d<f32> BoundingBox;
+00391 
+00392     // hardware mapping hint
+00393     E_HARDWARE_MAPPING MappingHint_Vertex:3;
+00394     E_HARDWARE_MAPPING MappingHint_Index:3;
+00395 
+00396     bool BoundingBoxNeedsRecalculated:1;
+00397 };
+00398 
+00399 
+00400 } // end namespace scene
+00401 } // end namespace irr
+00402 
+00403 #endif
+00404 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h.html new file mode 100644 index 0000000..8b48770 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: SVertexIndex.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SVertexIndex.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h_source.html new file mode 100644 index 0000000..fda37c3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_index_8h_source.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: SVertexIndex.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SVertexIndex.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_VERTEX_INDEX_H_INCLUDED__
+00006 #define __S_VERTEX_INDEX_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 
+00011 namespace irr
+00012 {
+00013 namespace video
+00014 {
+00015 enum E_INDEX_TYPE
+00016 {
+00017     EIT_16BIT = 0,
+00018     EIT_32BIT
+00019 };
+00020 
+00021 
+00022 /*
+00024 template <class T>
+00025 struct SSpecificVertexIndex
+00026 {
+00027     T Index;
+00028 
+00030     SSpecificVertexIndex() {}
+00031 
+00033     SSpecificVertexIndex(u32 _index) :Index(_index) {}
+00034 
+00035     bool operator==(const SSpecificVertexIndex& other) const
+00036     {
+00037         return (Index == other.Index);
+00038     }
+00039 
+00040     bool operator!=(const SSpecificVertexIndex& other) const
+00041     {
+00042         return (Index != other.Index);
+00043     }
+00044 
+00045     bool operator<(const SSpecificVertexIndex& other) const
+00046     {
+00047         return (Index < other.Index);
+00048     }
+00049 
+00050     SSpecificVertexIndex operator+(const u32& other) const
+00051     {
+00052         return SSpecificVertexIndex(Index + other);
+00053     }
+00054 
+00055     operator const u32() const
+00056     {
+00057         return (const u32)Index;
+00058     }
+00059 
+00060     E_INDEX_TYPE getType() const
+00061     {
+00062         if (sizeof(T)==sizeof(u16))
+00063             return video::EIT_16BIT;
+00064         return video::EIT_32BIT;
+00065     }
+00066 
+00067 };
+00068 
+00069 //typedef SSpecificVertexIndex<u16> SVertexIndex;
+00070 
+00071 typedef u32 SVertexIndex;
+00072 */
+00073 
+00074 
+00075 } // end namespace video
+00076 } // end namespace irr
+00077 
+00078 #endif
+00079 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h.html new file mode 100644 index 0000000..c4f9184 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: SVertexManipulator.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SVertexManipulator.h File Reference
+
+
+
#include "S3DVertex.h"
+#include "SColor.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h_source.html new file mode 100644 index 0000000..48a3bad --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_vertex_manipulator_8h_source.html @@ -0,0 +1,389 @@ + + + + +Irrlicht 3D Engine: SVertexManipulator.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SVertexManipulator.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2009-2012 Christian Stehno
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_VERTEX_MANIPULATOR_H_INCLUDED__
+00006 #define __S_VERTEX_MANIPULATOR_H_INCLUDED__
+00007 
+00008 #include "S3DVertex.h"
+00009 #include "SColor.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace scene
+00014 {
+00015 
+00016     class IMesh;
+00017     class IMeshBuffer;
+00018     struct SMesh;
+00019 
+00021 
+00023     struct IVertexManipulator
+00024     {
+00025     };
+00027     class SVertexColorSetManipulator : public IVertexManipulator
+00028     {
+00029     public:
+00030         SVertexColorSetManipulator(video::SColor color) : Color(color) {}
+00031         void operator()(video::S3DVertex& vertex) const
+00032         {
+00033             vertex.Color=Color;
+00034         }
+00035     private:
+00036         video::SColor Color;
+00037     };
+00039     class SVertexColorSetAlphaManipulator : public IVertexManipulator
+00040     {
+00041     public:
+00042         SVertexColorSetAlphaManipulator(u32 alpha) : Alpha(alpha) {}
+00043         void operator()(video::S3DVertex& vertex) const
+00044         {
+00045             vertex.Color.setAlpha(Alpha);
+00046         }
+00047     private:
+00048         u32 Alpha;
+00049     };
+00051     class SVertexColorInvertManipulator : public IVertexManipulator
+00052     {
+00053     public:
+00054         void operator()(video::S3DVertex& vertex) const
+00055         {
+00056             vertex.Color.setRed(255-vertex.Color.getRed());
+00057             vertex.Color.setGreen(255-vertex.Color.getGreen());
+00058             vertex.Color.setBlue(255-vertex.Color.getBlue());
+00059         }
+00060     };
+00062 
+00063     class SVertexColorThresholdManipulator : public IVertexManipulator
+00064     {
+00065     public:
+00066         SVertexColorThresholdManipulator(u8 threshold, video::SColor low,
+00067             video::SColor high) : Threshold(threshold), Low(low), High(high) {}
+00068         void operator()(video::S3DVertex& vertex) const
+00069         {
+00070             vertex.Color = ((u8)vertex.Color.getAverage()>Threshold)?High:Low;
+00071         }
+00072     private:
+00073         u8 Threshold;
+00074         video::SColor Low;
+00075         video::SColor High;
+00076     };
+00078 
+00079     class SVertexColorBrightnessManipulator : public IVertexManipulator
+00080     {
+00081     public:
+00082         SVertexColorBrightnessManipulator(s32 amount) : Amount(amount) {}
+00083         void operator()(video::S3DVertex& vertex) const
+00084         {
+00085             vertex.Color.setRed(core::clamp(vertex.Color.getRed()+Amount, 0u, 255u));
+00086             vertex.Color.setGreen(core::clamp(vertex.Color.getGreen()+Amount, 0u, 255u));
+00087             vertex.Color.setBlue(core::clamp(vertex.Color.getBlue()+Amount, 0u, 255u));
+00088         }
+00089     private:
+00090         s32 Amount;
+00091     };
+00093 
+00094     class SVertexColorContrastManipulator : public IVertexManipulator
+00095     {
+00096     public:
+00097         SVertexColorContrastManipulator(f32 factor) : Factor(factor) {}
+00098         void operator()(video::S3DVertex& vertex) const
+00099         {
+00100             vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+128, 0, 255));
+00101             vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+128, 0, 255));
+00102             vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+128, 0, 255));
+00103         }
+00104     private:
+00105         f32 Factor;
+00106     };
+00108 
+00110     class SVertexColorContrastBrightnessManipulator : public IVertexManipulator
+00111     {
+00112     public:
+00113         SVertexColorContrastBrightnessManipulator(f32 factor, s32 amount) : Factor(factor), Amount(amount+128) {}
+00114         void operator()(video::S3DVertex& vertex) const
+00115         {
+00116             vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+Amount, 0, 255));
+00117             vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+Amount, 0, 255));
+00118             vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+Amount, 0, 255));
+00119         }
+00120     private:
+00121         f32 Factor;
+00122         s32 Amount;
+00123     };
+00125 
+00126     class SVertexColorGammaManipulator : public IVertexManipulator
+00127     {
+00128     public:
+00129         SVertexColorGammaManipulator(f32 gamma) : Gamma(1.f)
+00130         {
+00131             if (gamma != 0.f)
+00132                 Gamma = 1.f/gamma;
+00133         }
+00134         void operator()(video::S3DVertex& vertex) const
+00135         {
+00136             vertex.Color.setRed(core::clamp(core::round32(powf((f32)(vertex.Color.getRed()),Gamma)), 0, 255));
+00137             vertex.Color.setGreen(core::clamp(core::round32(powf((f32)(vertex.Color.getGreen()),Gamma)), 0, 255));
+00138             vertex.Color.setBlue(core::clamp(core::round32(powf((f32)(vertex.Color.getBlue()),Gamma)), 0, 255));
+00139         }
+00140     private:
+00141         f32 Gamma;
+00142     };
+00144 
+00145     class SVertexColorScaleManipulator : public IVertexManipulator
+00146     {
+00147     public:
+00148         SVertexColorScaleManipulator(f32 factor) : Factor(factor) {}
+00149         void operator()(video::S3DVertex& vertex) const
+00150         {
+00151             vertex.Color.setRed(core::clamp(core::round32(vertex.Color.getRed()*Factor), 0, 255));
+00152             vertex.Color.setGreen(core::clamp(core::round32(vertex.Color.getGreen()*Factor), 0, 255));
+00153             vertex.Color.setBlue(core::clamp(core::round32(vertex.Color.getBlue()*Factor), 0, 255));
+00154         }
+00155     private:
+00156         f32 Factor;
+00157     };
+00159 
+00160     class SVertexColorDesaturateToLightnessManipulator : public IVertexManipulator
+00161     {
+00162     public:
+00163         void operator()(video::S3DVertex& vertex) const
+00164         {
+00165             vertex.Color=core::round32(vertex.Color.getLightness());
+00166         }
+00167     };
+00169 
+00170     class SVertexColorDesaturateToAverageManipulator : public IVertexManipulator
+00171     {
+00172     public:
+00173         void operator()(video::S3DVertex& vertex) const
+00174         {
+00175             vertex.Color=vertex.Color.getAverage();
+00176         }
+00177     };
+00179 
+00180     class SVertexColorDesaturateToLuminanceManipulator : public IVertexManipulator
+00181     {
+00182     public:
+00183         void operator()(video::S3DVertex& vertex) const
+00184         {
+00185             vertex.Color=core::round32(vertex.Color.getLuminance());
+00186         }
+00187     };
+00189 
+00190     class SVertexColorInterpolateLinearManipulator : public IVertexManipulator
+00191     {
+00192     public:
+00193         SVertexColorInterpolateLinearManipulator(video::SColor color, f32 factor) :
+00194           Color(color), Factor(factor) {}
+00195         void operator()(video::S3DVertex& vertex) const
+00196         {
+00197             vertex.Color=vertex.Color.getInterpolated(Color, Factor);
+00198         }
+00199     private:
+00200         video::SColor Color;
+00201         f32 Factor;
+00202     };
+00204 
+00205     class SVertexColorInterpolateQuadraticManipulator : public IVertexManipulator
+00206     {
+00207     public:
+00208         SVertexColorInterpolateQuadraticManipulator(video::SColor color1, video::SColor color2, f32 factor) :
+00209           Color1(color1), Color2(color2), Factor(factor) {}
+00210         void operator()(video::S3DVertex& vertex) const
+00211         {
+00212             vertex.Color=vertex.Color.getInterpolated_quadratic(Color1, Color2, Factor);
+00213         }
+00214     private:
+00215         video::SColor Color1;
+00216         video::SColor Color2;
+00217         f32 Factor;
+00218     };
+00219 
+00221     class SVertexPositionScaleManipulator : public IVertexManipulator
+00222     {
+00223     public:
+00224         SVertexPositionScaleManipulator(const core::vector3df& factor) : Factor(factor) {}
+00225         template <typename VType>
+00226         void operator()(VType& vertex) const
+00227         {
+00228             vertex.Pos *= Factor;
+00229         }
+00230     private:
+00231         core::vector3df Factor;
+00232     };
+00233 
+00235 
+00238     class SVertexPositionScaleAlongNormalsManipulator : public IVertexManipulator
+00239     {
+00240     public:
+00241         SVertexPositionScaleAlongNormalsManipulator(const core::vector3df& factor) : Factor(factor) {}
+00242         template <typename VType>
+00243         void operator()(VType& vertex) const
+00244         {
+00245             vertex.Pos += vertex.Normal*Factor;
+00246         }
+00247     private:
+00248         core::vector3df Factor;
+00249     };
+00250 
+00252     class SVertexPositionTransformManipulator : public IVertexManipulator
+00253     {
+00254     public:
+00255         SVertexPositionTransformManipulator(const core::matrix4& m) : Transformation(m) {}
+00256         template <typename VType>
+00257         void operator()(VType& vertex) const
+00258         {
+00259             Transformation.transformVect(vertex.Pos);
+00260         }
+00261     private:
+00262         core::matrix4 Transformation;
+00263     };
+00264 
+00266     class SVertexTCoordsScaleManipulator : public IVertexManipulator
+00267     {
+00268     public:
+00269         SVertexTCoordsScaleManipulator(const core::vector2df& factor, u32 uvSet=1) : Factor(factor), UVSet(uvSet) {}
+00270         void operator()(video::S3DVertex2TCoords& vertex) const
+00271         {
+00272             if (1==UVSet)
+00273                 vertex.TCoords *= Factor;
+00274             else if (2==UVSet)
+00275                 vertex.TCoords2 *= Factor;
+00276         }
+00277         template <typename VType>
+00278         void operator()(VType& vertex) const
+00279         {
+00280             if (1==UVSet)
+00281                 vertex.TCoords *= Factor;
+00282         }
+00283     private:
+00284         core::vector2df Factor;
+00285         u32 UVSet;
+00286     };
+00287 
+00288 } // end namespace scene
+00289 } // end namespace irr
+00290 
+00291 
+00292 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h.html b/src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h.html new file mode 100644 index 0000000..ef7b054 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h.html @@ -0,0 +1,144 @@ + + + + +Irrlicht 3D Engine: SViewFrustum.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SViewFrustum.h File Reference
+
+
+
#include "plane3d.h"
+#include "vector3d.h"
+#include "line3d.h"
+#include "aabbox3d.h"
+#include "matrix4.h"
+#include "IVideoDriver.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h_source.html new file mode 100644 index 0000000..bfcab04 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_s_view_frustum_8h_source.html @@ -0,0 +1,444 @@ + + + + +Irrlicht 3D Engine: SViewFrustum.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SViewFrustum.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __S_VIEW_FRUSTUM_H_INCLUDED__
+00006 #define __S_VIEW_FRUSTUM_H_INCLUDED__
+00007 
+00008 #include "plane3d.h"
+00009 #include "vector3d.h"
+00010 #include "line3d.h"
+00011 #include "aabbox3d.h"
+00012 #include "matrix4.h"
+00013 #include "IVideoDriver.h"
+00014 
+00015 namespace irr
+00016 {
+00017 namespace scene
+00018 {
+00019 
+00021 
+00025     struct SViewFrustum
+00026     {
+00027         enum VFPLANES
+00028         {
+00030             VF_FAR_PLANE = 0,
+00032             VF_NEAR_PLANE,
+00034             VF_LEFT_PLANE,
+00036             VF_RIGHT_PLANE,
+00038             VF_BOTTOM_PLANE,
+00040             VF_TOP_PLANE,
+00041 
+00043             VF_PLANE_COUNT
+00044         };
+00045 
+00046 
+00048         SViewFrustum() {}
+00049 
+00051         SViewFrustum(const SViewFrustum& other);
+00052 
+00054         SViewFrustum(const core::matrix4& mat);
+00055 
+00057         inline void setFrom(const core::matrix4& mat);
+00058 
+00060 
+00061         void transform(const core::matrix4& mat);
+00062 
+00064         core::vector3df getFarLeftUp() const;
+00065 
+00067         core::vector3df getFarLeftDown() const;
+00068 
+00070         core::vector3df getFarRightUp() const;
+00071 
+00073         core::vector3df getFarRightDown() const;
+00074 
+00076         core::vector3df getNearLeftUp() const;
+00077 
+00079         core::vector3df getNearLeftDown() const;
+00080 
+00082         core::vector3df getNearRightUp() const;
+00083 
+00085         core::vector3df getNearRightDown() const;
+00086 
+00088         const core::aabbox3d<f32> &getBoundingBox() const;
+00089 
+00091         inline void recalculateBoundingBox();
+00092 
+00094         core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state);
+00095 
+00097         const core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state) const;
+00098 
+00100 
+00101         bool clipLine(core::line3d<f32>& line) const;
+00102 
+00104         core::vector3df cameraPosition;
+00105 
+00107         core::plane3d<f32> planes[VF_PLANE_COUNT];
+00108 
+00110         core::aabbox3d<f32> boundingBox;
+00111 
+00112     private:
+00114         enum E_TRANSFORMATION_STATE_FRUSTUM
+00115         {
+00116             ETS_VIEW = 0,
+00117             ETS_PROJECTION = 1,
+00118             ETS_COUNT_FRUSTUM
+00119         };
+00120 
+00122         core::matrix4 Matrices[ETS_COUNT_FRUSTUM];
+00123     };
+00124 
+00125 
+00129     inline SViewFrustum::SViewFrustum(const SViewFrustum& other)
+00130     {
+00131         cameraPosition=other.cameraPosition;
+00132         boundingBox=other.boundingBox;
+00133 
+00134         u32 i;
+00135         for (i=0; i<VF_PLANE_COUNT; ++i)
+00136             planes[i]=other.planes[i];
+00137 
+00138         for (i=0; i<ETS_COUNT_FRUSTUM; ++i)
+00139             Matrices[i]=other.Matrices[i];
+00140     }
+00141 
+00142     inline SViewFrustum::SViewFrustum(const core::matrix4& mat)
+00143     {
+00144         setFrom ( mat );
+00145     }
+00146 
+00147 
+00148     inline void SViewFrustum::transform(const core::matrix4& mat)
+00149     {
+00150         for (u32 i=0; i<VF_PLANE_COUNT; ++i)
+00151             mat.transformPlane(planes[i]);
+00152 
+00153         mat.transformVect(cameraPosition);
+00154         recalculateBoundingBox();
+00155     }
+00156 
+00157 
+00158     inline core::vector3df SViewFrustum::getFarLeftUp() const
+00159     {
+00160         core::vector3df p;
+00161         planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes(
+00162             planes[scene::SViewFrustum::VF_TOP_PLANE],
+00163             planes[scene::SViewFrustum::VF_LEFT_PLANE], p);
+00164 
+00165         return p;
+00166     }
+00167 
+00168     inline core::vector3df SViewFrustum::getFarLeftDown() const
+00169     {
+00170         core::vector3df p;
+00171         planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes(
+00172             planes[scene::SViewFrustum::VF_BOTTOM_PLANE],
+00173             planes[scene::SViewFrustum::VF_LEFT_PLANE], p);
+00174 
+00175         return p;
+00176     }
+00177 
+00178     inline core::vector3df SViewFrustum::getFarRightUp() const
+00179     {
+00180         core::vector3df p;
+00181         planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes(
+00182             planes[scene::SViewFrustum::VF_TOP_PLANE],
+00183             planes[scene::SViewFrustum::VF_RIGHT_PLANE], p);
+00184 
+00185         return p;
+00186     }
+00187 
+00188     inline core::vector3df SViewFrustum::getFarRightDown() const
+00189     {
+00190         core::vector3df p;
+00191         planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes(
+00192             planes[scene::SViewFrustum::VF_BOTTOM_PLANE],
+00193             planes[scene::SViewFrustum::VF_RIGHT_PLANE], p);
+00194 
+00195         return p;
+00196     }
+00197 
+00198     inline core::vector3df SViewFrustum::getNearLeftUp() const
+00199     {
+00200         core::vector3df p;
+00201         planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes(
+00202             planes[scene::SViewFrustum::VF_TOP_PLANE],
+00203             planes[scene::SViewFrustum::VF_LEFT_PLANE], p);
+00204 
+00205         return p;
+00206     }
+00207 
+00208     inline core::vector3df SViewFrustum::getNearLeftDown() const
+00209     {
+00210         core::vector3df p;
+00211         planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes(
+00212             planes[scene::SViewFrustum::VF_BOTTOM_PLANE],
+00213             planes[scene::SViewFrustum::VF_LEFT_PLANE], p);
+00214 
+00215         return p;
+00216     }
+00217 
+00218     inline core::vector3df SViewFrustum::getNearRightUp() const
+00219     {
+00220         core::vector3df p;
+00221         planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes(
+00222             planes[scene::SViewFrustum::VF_TOP_PLANE],
+00223             planes[scene::SViewFrustum::VF_RIGHT_PLANE], p);
+00224 
+00225         return p;
+00226     }
+00227 
+00228     inline core::vector3df SViewFrustum::getNearRightDown() const
+00229     {
+00230         core::vector3df p;
+00231         planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes(
+00232             planes[scene::SViewFrustum::VF_BOTTOM_PLANE],
+00233             planes[scene::SViewFrustum::VF_RIGHT_PLANE], p);
+00234 
+00235         return p;
+00236     }
+00237 
+00238     inline const core::aabbox3d<f32> &SViewFrustum::getBoundingBox() const
+00239     {
+00240         return boundingBox;
+00241     }
+00242 
+00243     inline void SViewFrustum::recalculateBoundingBox()
+00244     {
+00245         boundingBox.reset ( cameraPosition );
+00246 
+00247         boundingBox.addInternalPoint(getFarLeftUp());
+00248         boundingBox.addInternalPoint(getFarRightUp());
+00249         boundingBox.addInternalPoint(getFarLeftDown());
+00250         boundingBox.addInternalPoint(getFarRightDown());
+00251     }
+00252 
+00255     inline void SViewFrustum::setFrom(const core::matrix4& mat)
+00256     {
+00257         // left clipping plane
+00258         planes[VF_LEFT_PLANE].Normal.X = mat[3 ] + mat[0];
+00259         planes[VF_LEFT_PLANE].Normal.Y = mat[7 ] + mat[4];
+00260         planes[VF_LEFT_PLANE].Normal.Z = mat[11] + mat[8];
+00261         planes[VF_LEFT_PLANE].D =        mat[15] + mat[12];
+00262 
+00263         // right clipping plane
+00264         planes[VF_RIGHT_PLANE].Normal.X = mat[3 ] - mat[0];
+00265         planes[VF_RIGHT_PLANE].Normal.Y = mat[7 ] - mat[4];
+00266         planes[VF_RIGHT_PLANE].Normal.Z = mat[11] - mat[8];
+00267         planes[VF_RIGHT_PLANE].D =        mat[15] - mat[12];
+00268 
+00269         // top clipping plane
+00270         planes[VF_TOP_PLANE].Normal.X = mat[3 ] - mat[1];
+00271         planes[VF_TOP_PLANE].Normal.Y = mat[7 ] - mat[5];
+00272         planes[VF_TOP_PLANE].Normal.Z = mat[11] - mat[9];
+00273         planes[VF_TOP_PLANE].D =        mat[15] - mat[13];
+00274 
+00275         // bottom clipping plane
+00276         planes[VF_BOTTOM_PLANE].Normal.X = mat[3 ] + mat[1];
+00277         planes[VF_BOTTOM_PLANE].Normal.Y = mat[7 ] + mat[5];
+00278         planes[VF_BOTTOM_PLANE].Normal.Z = mat[11] + mat[9];
+00279         planes[VF_BOTTOM_PLANE].D =        mat[15] + mat[13];
+00280 
+00281         // far clipping plane
+00282         planes[VF_FAR_PLANE].Normal.X = mat[3 ] - mat[2];
+00283         planes[VF_FAR_PLANE].Normal.Y = mat[7 ] - mat[6];
+00284         planes[VF_FAR_PLANE].Normal.Z = mat[11] - mat[10];
+00285         planes[VF_FAR_PLANE].D =        mat[15] - mat[14];
+00286 
+00287         // near clipping plane
+00288         planes[VF_NEAR_PLANE].Normal.X = mat[2];
+00289         planes[VF_NEAR_PLANE].Normal.Y = mat[6];
+00290         planes[VF_NEAR_PLANE].Normal.Z = mat[10];
+00291         planes[VF_NEAR_PLANE].D =        mat[14];
+00292 
+00293         // normalize normals
+00294         u32 i;
+00295         for ( i=0; i != VF_PLANE_COUNT; ++i)
+00296         {
+00297             const f32 len = -core::reciprocal_squareroot(
+00298                     planes[i].Normal.getLengthSQ());
+00299             planes[i].Normal *= len;
+00300             planes[i].D *= len;
+00301         }
+00302 
+00303         // make bounding box
+00304         recalculateBoundingBox();
+00305     }
+00306 
+00310     inline core::matrix4& SViewFrustum::getTransform(video::E_TRANSFORMATION_STATE state )
+00311     {
+00312         u32 index = 0;
+00313         switch ( state )
+00314         {
+00315             case video::ETS_PROJECTION:
+00316                 index = SViewFrustum::ETS_PROJECTION; break;
+00317             case video::ETS_VIEW:
+00318                 index = SViewFrustum::ETS_VIEW; break;
+00319             default:
+00320                 break;
+00321         }
+00322         return Matrices [ index ];
+00323     }
+00324 
+00328     inline const core::matrix4& SViewFrustum::getTransform(video::E_TRANSFORMATION_STATE state ) const
+00329     {
+00330         u32 index = 0;
+00331         switch ( state )
+00332         {
+00333             case video::ETS_PROJECTION:
+00334                 index = SViewFrustum::ETS_PROJECTION; break;
+00335             case video::ETS_VIEW:
+00336                 index = SViewFrustum::ETS_VIEW; break;
+00337             default:
+00338                 break;
+00339         }
+00340         return Matrices [ index ];
+00341     }
+00342 
+00344     inline bool SViewFrustum::clipLine(core::line3d<f32>& line) const
+00345     {
+00346         bool wasClipped = false;
+00347         for (u32 i=0; i < VF_PLANE_COUNT; ++i)
+00348         {
+00349             if (planes[i].classifyPointRelation(line.start) == core::ISREL3D_FRONT)
+00350             {
+00351                 line.start = line.start.getInterpolated(line.end,
+00352                         planes[i].getKnownIntersectionWithLine(line.start, line.end));
+00353                 wasClipped = true;
+00354             }
+00355             if (planes[i].classifyPointRelation(line.end) == core::ISREL3D_FRONT)
+00356             {
+00357                 line.end = line.start.getInterpolated(line.end,
+00358                         planes[i].getKnownIntersectionWithLine(line.start, line.end));
+00359                 wasClipped = true;
+00360             }
+00361         }
+00362         return wasClipped;
+00363     }
+00364 
+00365 
+00366 } // end namespace scene
+00367 } // end namespace irr
+00368 
+00369 #endif
+00370 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h.html b/src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h.html new file mode 100644 index 0000000..d7f7c90 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: SceneParameters.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SceneParameters.h File Reference
+
+
+ +

Header file containing all scene parameters for modifying mesh loading etc. +More...

+ +

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
+

+Variables

+ +

Detailed Description

+

Header file containing all scene parameters for modifying mesh loading etc.

+

This file includes all parameter names which can be set using ISceneManager::getParameters() to modify the behavior of plugins and mesh loaders.

+ +

Definition in file SceneParameters.h.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h_source.html new file mode 100644 index 0000000..88f3a96 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_scene_parameters_8h_source.html @@ -0,0 +1,191 @@ + + + + +Irrlicht 3D Engine: SceneParameters.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SceneParameters.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __I_SCENE_PARAMETERS_H_INCLUDED__
+00006 #define __I_SCENE_PARAMETERS_H_INCLUDED__
+00007 
+00015 namespace irr
+00016 {
+00017 namespace scene
+00018 {
+00020 
+00030     const c8* const ALLOW_ZWRITE_ON_TRANSPARENT = "Allow_ZWrite_On_Transparent";
+00031 
+00033 
+00038     const c8* const CSM_TEXTURE_PATH = "CSM_TexturePath";
+00039 
+00041 
+00046     const c8* const LMTS_TEXTURE_PATH = "LMTS_TexturePath";
+00047 
+00049 
+00054     const c8* const MY3D_TEXTURE_PATH = "MY3D_TexturePath";
+00055 
+00057 
+00067     const c8* const COLLADA_CREATE_SCENE_INSTANCES = "COLLADA_CreateSceneInstances";
+00068 
+00070 
+00077     const c8* const DMF_TEXTURE_PATH = "DMF_TexturePath";
+00078 
+00080 
+00093     const c8* const DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir";
+00094 
+00096 
+00102     const c8* const DMF_ALPHA_CHANNEL_REF = "DMF_AlphaRef";
+00103 
+00105 
+00111     const c8* const DMF_FLIP_ALPHA_TEXTURES = "DMF_FlipAlpha";
+00112 
+00113 
+00115 
+00120     const c8* const OBJ_TEXTURE_PATH = "OBJ_TexturePath";
+00121 
+00123 
+00128     const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups";
+00129 
+00130 
+00132 
+00137     const c8* const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles";
+00138 
+00139 
+00141 
+00146     const c8* const B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag";
+00147 
+00149 
+00154     const c8* const B3D_TEXTURE_PATH = "B3D_TexturePath";
+00155 
+00157 
+00159     const c8* const IRR_SCENE_MANAGER_IS_EDITOR = "IRR_Editor";
+00160 
+00162 
+00167     const c8* const DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length";
+00168 
+00170 
+00175     const c8* const DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color";
+00176 
+00177 
+00178 } // end namespace scene
+00179 } // end namespace irr
+00180 
+00181 #endif
+00182 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h.html b/src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h.html new file mode 100644 index 0000000..16c4789 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: aabbox3d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
aabbox3d.h File Reference
+
+
+
#include "irrMath.h"
+#include "plane3d.h"
+#include "line3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h_source.html new file mode 100644 index 0000000..f911db4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/aabbox3d_8h_source.html @@ -0,0 +1,390 @@ + + + + +Irrlicht 3D Engine: aabbox3d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
aabbox3d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_AABBOX_3D_H_INCLUDED__
+00006 #define __IRR_AABBOX_3D_H_INCLUDED__
+00007 
+00008 #include "irrMath.h"
+00009 #include "plane3d.h"
+00010 #include "line3d.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace core
+00015 {
+00016 
+00018 
+00020 template <class T>
+00021 class aabbox3d
+00022 {
+00023     public:
+00024 
+00026         aabbox3d(): MinEdge(-1,-1,-1), MaxEdge(1,1,1) {}
+00028         aabbox3d(const vector3d<T>& min, const vector3d<T>& max): MinEdge(min), MaxEdge(max) {}
+00030         aabbox3d(const vector3d<T>& init): MinEdge(init), MaxEdge(init) {}
+00032         aabbox3d(T minx, T miny, T minz, T maxx, T maxy, T maxz): MinEdge(minx, miny, minz), MaxEdge(maxx, maxy, maxz) {}
+00033 
+00034         // operators
+00036 
+00038         inline bool operator==(const aabbox3d<T>& other) const { return (MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);}
+00040 
+00042         inline bool operator!=(const aabbox3d<T>& other) const { return !(MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);}
+00043 
+00044         // functions
+00045 
+00047 
+00050         void reset(T x, T y, T z)
+00051         {
+00052             MaxEdge.set(x,y,z);
+00053             MinEdge = MaxEdge;
+00054         }
+00055 
+00057 
+00058         void reset(const aabbox3d<T>& initValue)
+00059         {
+00060             *this = initValue;
+00061         }
+00062 
+00064 
+00065         void reset(const vector3d<T>& initValue)
+00066         {
+00067             MaxEdge = initValue;
+00068             MinEdge = initValue;
+00069         }
+00070 
+00072 
+00074         void addInternalPoint(const vector3d<T>& p)
+00075         {
+00076             addInternalPoint(p.X, p.Y, p.Z);
+00077         }
+00078 
+00080 
+00082         void addInternalBox(const aabbox3d<T>& b)
+00083         {
+00084             addInternalPoint(b.MaxEdge);
+00085             addInternalPoint(b.MinEdge);
+00086         }
+00087 
+00089 
+00093         void addInternalPoint(T x, T y, T z)
+00094         {
+00095             if (x>MaxEdge.X) MaxEdge.X = x;
+00096             if (y>MaxEdge.Y) MaxEdge.Y = y;
+00097             if (z>MaxEdge.Z) MaxEdge.Z = z;
+00098 
+00099             if (x<MinEdge.X) MinEdge.X = x;
+00100             if (y<MinEdge.Y) MinEdge.Y = y;
+00101             if (z<MinEdge.Z) MinEdge.Z = z;
+00102         }
+00103 
+00105 
+00106         vector3d<T> getCenter() const
+00107         {
+00108             return (MinEdge + MaxEdge) / 2;
+00109         }
+00110 
+00112 
+00113         vector3d<T> getExtent() const
+00114         {
+00115             return MaxEdge - MinEdge;
+00116         }
+00117 
+00119 
+00121         bool isEmpty() const
+00122         {
+00123             return MinEdge.equals ( MaxEdge );
+00124         }
+00125 
+00127         T getVolume() const
+00128         {
+00129             const vector3d<T> e = getExtent();
+00130             return e.X * e.Y * e.Z;
+00131         }
+00132 
+00134         T getArea() const
+00135         {
+00136             const vector3d<T> e = getExtent();
+00137             return 2*(e.X*e.Y + e.X*e.Z + e.Y*e.Z);
+00138         }
+00139 
+00141 
+00142         void getEdges(vector3d<T> *edges) const
+00143         {
+00144             const core::vector3d<T> middle = getCenter();
+00145             const core::vector3d<T> diag = middle - MaxEdge;
+00146 
+00147             /*
+00148             Edges are stored in this way:
+00149             Hey, am I an ascii artist, or what? :) niko.
+00150                    /3--------/7
+00151                   / |       / |
+00152                  /  |      /  |
+00153                 1---------5   |
+00154                 |  /2- - -|- -6
+00155                 | /       |  /
+00156                 |/        | /
+00157                 0---------4/
+00158             */
+00159 
+00160             edges[0].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z + diag.Z);
+00161             edges[1].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z + diag.Z);
+00162             edges[2].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z - diag.Z);
+00163             edges[3].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z - diag.Z);
+00164             edges[4].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z + diag.Z);
+00165             edges[5].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z + diag.Z);
+00166             edges[6].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z - diag.Z);
+00167             edges[7].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z - diag.Z);
+00168         }
+00169 
+00171 
+00172         void repair()
+00173         {
+00174             T t;
+00175 
+00176             if (MinEdge.X > MaxEdge.X)
+00177                 { t=MinEdge.X; MinEdge.X = MaxEdge.X; MaxEdge.X=t; }
+00178             if (MinEdge.Y > MaxEdge.Y)
+00179                 { t=MinEdge.Y; MinEdge.Y = MaxEdge.Y; MaxEdge.Y=t; }
+00180             if (MinEdge.Z > MaxEdge.Z)
+00181                 { t=MinEdge.Z; MinEdge.Z = MaxEdge.Z; MaxEdge.Z=t; }
+00182         }
+00183 
+00185 
+00190         aabbox3d<T> getInterpolated(const aabbox3d<T>& other, f32 d) const
+00191         {
+00192             f32 inv = 1.0f - d;
+00193             return aabbox3d<T>((other.MinEdge*inv) + (MinEdge*d),
+00194                 (other.MaxEdge*inv) + (MaxEdge*d));
+00195         }
+00196 
+00198 
+00201         bool isPointInside(const vector3d<T>& p) const
+00202         {
+00203             return (p.X >= MinEdge.X && p.X <= MaxEdge.X &&
+00204                 p.Y >= MinEdge.Y && p.Y <= MaxEdge.Y &&
+00205                 p.Z >= MinEdge.Z && p.Z <= MaxEdge.Z);
+00206         }
+00207 
+00209 
+00212         bool isPointTotalInside(const vector3d<T>& p) const
+00213         {
+00214             return (p.X > MinEdge.X && p.X < MaxEdge.X &&
+00215                 p.Y > MinEdge.Y && p.Y < MaxEdge.Y &&
+00216                 p.Z > MinEdge.Z && p.Z < MaxEdge.Z);
+00217         }
+00218 
+00220 
+00223         bool isFullInside(const aabbox3d<T>& other) const
+00224         {
+00225             return (MinEdge.X >= other.MinEdge.X && MinEdge.Y >= other.MinEdge.Y && MinEdge.Z >= other.MinEdge.Z &&
+00226                 MaxEdge.X <= other.MaxEdge.X && MaxEdge.Y <= other.MaxEdge.Y && MaxEdge.Z <= other.MaxEdge.Z);
+00227         }
+00228 
+00230 
+00233         bool intersectsWithBox(const aabbox3d<T>& other) const
+00234         {
+00235             return (MinEdge.X <= other.MaxEdge.X && MinEdge.Y <= other.MaxEdge.Y && MinEdge.Z <= other.MaxEdge.Z &&
+00236                 MaxEdge.X >= other.MinEdge.X && MaxEdge.Y >= other.MinEdge.Y && MaxEdge.Z >= other.MinEdge.Z);
+00237         }
+00238 
+00240 
+00242         bool intersectsWithLine(const line3d<T>& line) const
+00243         {
+00244             return intersectsWithLine(line.getMiddle(), line.getVector().normalize(),
+00245                     (T)(line.getLength() * 0.5));
+00246         }
+00247 
+00249 
+00253         bool intersectsWithLine(const vector3d<T>& linemiddle,
+00254                     const vector3d<T>& linevect, T halflength) const
+00255         {
+00256             const vector3d<T> e = getExtent() * (T)0.5;
+00257             const vector3d<T> t = getCenter() - linemiddle;
+00258 
+00259             if ((fabs(t.X) > e.X + halflength * fabs(linevect.X)) ||
+00260                 (fabs(t.Y) > e.Y + halflength * fabs(linevect.Y)) ||
+00261                 (fabs(t.Z) > e.Z + halflength * fabs(linevect.Z)) )
+00262                 return false;
+00263 
+00264             T r = e.Y * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.Y);
+00265             if (fabs(t.Y*linevect.Z - t.Z*linevect.Y) > r )
+00266                 return false;
+00267 
+00268             r = e.X * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.X);
+00269             if (fabs(t.Z*linevect.X - t.X*linevect.Z) > r )
+00270                 return false;
+00271 
+00272             r = e.X * (T)fabs(linevect.Y) + e.Y * (T)fabs(linevect.X);
+00273             if (fabs(t.X*linevect.Y - t.Y*linevect.X) > r)
+00274                 return false;
+00275 
+00276             return true;
+00277         }
+00278 
+00280 
+00284         EIntersectionRelation3D classifyPlaneRelation(const plane3d<T>& plane) const
+00285         {
+00286             vector3d<T> nearPoint(MaxEdge);
+00287             vector3d<T> farPoint(MinEdge);
+00288 
+00289             if (plane.Normal.X > (T)0)
+00290             {
+00291                 nearPoint.X = MinEdge.X;
+00292                 farPoint.X = MaxEdge.X;
+00293             }
+00294 
+00295             if (plane.Normal.Y > (T)0)
+00296             {
+00297                 nearPoint.Y = MinEdge.Y;
+00298                 farPoint.Y = MaxEdge.Y;
+00299             }
+00300 
+00301             if (plane.Normal.Z > (T)0)
+00302             {
+00303                 nearPoint.Z = MinEdge.Z;
+00304                 farPoint.Z = MaxEdge.Z;
+00305             }
+00306 
+00307             if (plane.Normal.dotProduct(nearPoint) + plane.D > (T)0)
+00308                 return ISREL3D_FRONT;
+00309 
+00310             if (plane.Normal.dotProduct(farPoint) + plane.D > (T)0)
+00311                 return ISREL3D_CLIPPED;
+00312 
+00313             return ISREL3D_BACK;
+00314         }
+00315 
+00317         vector3d<T> MinEdge;
+00318 
+00320         vector3d<T> MaxEdge;
+00321 };
+00322 
+00324     typedef aabbox3d<f32> aabbox3df;
+00326     typedef aabbox3d<s32> aabbox3di;
+00327 
+00328 } // end namespace core
+00329 } // end namespace irr
+00330 
+00331 #endif
+00332 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/annotated.html b/src/others/irrlicht-1.8.1/doc/html/annotated.html new file mode 100644 index 0000000..722a4c6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/annotated.html @@ -0,0 +1,347 @@ + + + + +Irrlicht 3D Engine: Class List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::aabbox3d< T >Axis aligned bounding box in 3d dimensional space
irr::core::map< KeyType, ValueType >::AccessClass
irr::core::array< T, TAlloc >Self reallocating template array (like stl vector) with additional features
irr::scene::CDynamicMeshBuffer
irr::scene::CIndexBuffer
irr::core::CMatrix4< T >4x4 matrix. Mostly used as transformation matrix for 3d calculations
irr::scene::CMeshBuffer< T >Template implementation of the IMeshBuffer interface
irr::core::list< T >::ConstIteratorList iterator for const access
irr::core::map< KeyType, ValueType >::ConstIteratorConst Iterator
irr::scene::CVertexBuffer
irr::core::dimension2d< T >Specifies a 2 dimensional size
irr::core::FloatIntUnion32
irr::scene::IAnimatedMeshInterface for an animated mesh
irr::scene::IAnimatedMeshMD2Interface for using some special functions of MD2 meshes
irr::scene::IAnimatedMeshMD3Interface for using some special functions of MD3 meshes
irr::scene::IAnimatedMeshSceneNodeScene node capable of displaying an animated mesh and its shadow
irr::scene::IAnimationEndCallBackCallback interface for catching events of ended animations
irr::io::IArchiveLoaderClass which is able to create an archive from a file
irr::io::IAttributeExchangingObjectAn object which is able to serialize and deserialize its attributes into an attributes object
irr::io::IAttributesProvides a generic interface for attributes and their values and the possiblity to serialize them
irr::scene::IBillboardSceneNodeA billboard scene node
irr::scene::IBillboardTextSceneNodeA billboard text scene node
irr::scene::IBoneSceneNodeInterface for bones used for skeletal animation
irr::scene::ICameraSceneNodeScene Node which is a (controlable) camera
irr::scene::IColladaMeshWriterInterface for writing meshes
irr::scene::IColladaMeshWriterNamesCallback interface to use custom names on collada writing
irr::scene::IColladaMeshWriterPropertiesCallback interface for properties which can be used to influence collada writing
irr::scene::ICollisionCallbackCallback interface for catching events of collisions
irr::gui::ICursorControlInterface to manipulate the mouse cursor
irr::scene::IDummyTransformationSceneNodeDummy scene node for adding additional transformations to the scene graph
irr::scene::IDynamicMeshBuffer
irr::IEventReceiverInterface of an object which can receive events
irr::io::IFileArchiveThe FileArchive manages archives and provides access to files inside them
irr::io::IFileListProvides a list of files and folders
irr::io::IFileReadCallBackCallback class for file read abstraction
irr::io::IFileSystemThe FileSystem manages files and archives and provides access to them
irr::scene::IGeometryCreatorHelper class for creating geometry on the fly
irr::video::IGPUProgrammingServicesInterface making it possible to create and use programs running on the GPU
irr::gui::IGUIButtonGUI Button interface
irr::gui::IGUICheckBoxGUI Check box interface
irr::gui::IGUIColorSelectDialogStandard color chooser dialog
irr::gui::IGUIComboBoxCombobox widget
irr::gui::IGUIContextMenuGUI Context menu interface
irr::gui::IGUIEditBoxSingle line edit box for editing simple text
irr::gui::IGUIElementBase class of all GUI elements
irr::gui::IGUIElementFactoryInterface making it possible to dynamically create GUI elements
irr::gui::IGUIEnvironmentGUI Environment. Used as factory and manager of all other GUI elements
irr::gui::IGUIFileOpenDialogStandard file chooser dialog
irr::gui::IGUIFontFont interface
irr::gui::IGUIFontBitmapFont interface
irr::gui::IGUIImageGUI element displaying an image
irr::gui::IGUIImageListFont interface
irr::gui::IGUIInOutFaderElement for fading out or in
irr::gui::IGUIListBoxDefault list box GUI element
irr::gui::IGUIMeshViewer3d mesh viewing GUI element
irr::gui::IGUIScrollBarDefault scroll bar GUI element
irr::gui::IGUISkinA skin modifies the look of the GUI elements
irr::gui::IGUISpinBoxSingle line edit box + spin buttons
irr::gui::IGUISpriteBankSprite bank interface
irr::gui::IGUIStaticTextMulti or single line text label
irr::gui::IGUITabA tab-page, onto which other gui elements could be added
irr::gui::IGUITabControlA standard tab control
irr::gui::IGUITableDefault list box GUI element
irr::gui::IGUIToolBarStays at the top of its parent like the menu bar and contains tool buttons
irr::gui::IGUITreeViewDefault tree view GUI element
irr::gui::IGUITreeViewNodeNode for gui tree view
irr::gui::IGUIWindowDefault moveable window GUI element with border, caption and close icons
irr::video::IImageInterface for software image data
irr::video::IImageLoaderClass which is able to create a image from a file
irr::video::IImageWriterInterface for writing software image data
irr::scene::IIndexBuffer
irr::io::IIrrXMLReader< char_type, super_class >Interface providing easy read access to a XML file
irr::scene::ILightManagerILightManager provides an interface for user applications to manipulate the list of lights in the scene
irr::scene::ILightSceneNodeScene node which is a dynamic light
irr::ILoggerInterface for logging messages, warnings and errors
irr::video::IMaterialRendererInterface for material rendering
irr::video::IMaterialRendererServicesInterface providing some methods for changing advanced, internal states of a IVideoDriver
irr::scene::IMeshClass which holds the geometry of an object
irr::scene::IMeshBufferStruct for holding a mesh with a single material
irr::scene::IMeshCacheThe mesh cache stores already loaded meshes and provides an interface to them
irr::scene::IMeshLoaderClass which is able to load an animated mesh from a file
irr::scene::IMeshManipulatorAn interface for easy manipulation of meshes
irr::scene::IMeshSceneNodeA scene node displaying a static mesh
irr::scene::IMeshWriterInterface for writing meshes
irr::scene::IMetaTriangleSelectorInterface for making multiple triangle selectors work as one big selector
irr::core::inttofloat
irr::IOSOperatorThe Operating system operator provides operation system specific methods and informations
irr::scene::IParticleAffectorA particle affector modifies particles
irr::scene::IParticleAnimatedMeshSceneNodeEmitterA particle emitter which emits particles from mesh vertices
irr::scene::IParticleAttractionAffectorA particle affector which attracts or detracts particles
irr::scene::IParticleBoxEmitterA particle emitter which emits particles from a box shaped space
irr::scene::IParticleCylinderEmitterA particle emitter which emits from a cylindrically shaped space
irr::scene::IParticleEmitterA particle emitter for using with particle systems
irr::scene::IParticleFadeOutAffectorA particle affector which fades out the particles
irr::scene::IParticleGravityAffectorA particle affector which applies gravity to particles
irr::scene::IParticleMeshEmitterA particle emitter which emits from vertices of a mesh
irr::scene::IParticleRingEmitterA particle emitter which emits particles along a ring shaped area
irr::scene::IParticleRotationAffectorA particle affector which rotates the particle system
irr::scene::IParticleSphereEmitterA particle emitter which emits from a spherical space
irr::scene::IParticleSystemSceneNodeA particle system scene node for creating snow, fire, exlosions, smoke..
irr::scene::IQ3LevelMeshInterface for a Mesh which can be loaded directly from a Quake3 .bsp-file
irr::IRandomizerInterface for generating random numbers
irr::io::IReadFileInterface providing read acess to a file
irr::IReferenceCountedBase class of most objects of the Irrlicht Engine
irr::video::IRenderTarget
irr::core::irrAllocator< T >Very simple allocator implementation, containers using it can be used across dll boundaries
irr::core::irrAllocatorFast< T >Fast allocator, only to be used in containers inside the same memory heap
irr::IrrlichtDeviceThe Irrlicht device. You can create it with createDevice() or createDeviceEx()
irr::scene::ISceneCollisionManagerThe Scene Collision Manager provides methods for performing collision tests and picking on scene nodes
irr::scene::ISceneLoaderClass which can load a scene into the scene manager
irr::scene::ISceneManagerThe Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff
irr::scene::ISceneNodeScene node interface
irr::scene::ISceneNodeAnimatorAnimates a scene node. Can animate position, rotation, material, and so on
irr::scene::ISceneNodeAnimatorCameraFPSSpecial scene node animator for FPS cameras
irr::scene::ISceneNodeAnimatorCameraMayaSpecial scene node animator for Maya-style cameras
irr::scene::ISceneNodeAnimatorCollisionResponseSpecial scene node animator for doing automatic collision detection and response
irr::scene::ISceneNodeAnimatorFactoryInterface for dynamic creation of scene node animators
irr::scene::ISceneNodeFactoryInterface for dynamic creation of scene nodes
irr::scene::ISceneUserDataSerializerInterface to read and write user data to and from .irr files
irr::scene::quake3::IShaderA Parsed Shader Holding Variables ordered in Groups
irr::video::IShaderConstantSetCallBackInterface making it possible to set constants for gpu programs every frame
irr::scene::quake3::IShaderManagerManages various Quake3 Shader Styles
irr::scene::IShadowVolumeSceneNodeScene node for rendering a shadow volume into a stencil buffer
irr::scene::ISkinnedMeshInterface for using some special functions of Skinned meshes
irr::core::list< T >::IteratorList iterator
irr::core::map< KeyType, ValueType >::IteratorNormal Iterator
irr::scene::ITerrainSceneNodeA scene node for displaying terrain using the geo mip map algorithm
irr::scene::ITextSceneNodeA scene node for displaying 2d text at a position in three dimensional space
irr::video::ITextureInterface of a Video Driver dependent Texture
irr::ITimerInterface for getting and manipulating the virtual time
irr::scene::ITriangleSelectorInterface to return triangles with specific properties
irr::scene::IVertexBuffer
irr::scene::IVertexManipulatorInterface for vertex manipulators
irr::video::IVideoDriverInterface to driver which is able to perform 2d and 3d graphics functions
irr::video::IVideoModeListA list of all available video modes
irr::scene::IVolumeLightSceneNode
irr::io::IWriteFileInterface providing write access to a file
irr::io::IXMLBaseEmpty class to be used as parent class for IrrXMLReader
irr::io::IXMLWriterInterface providing methods for making it easier to write XML files
irr::core::line2d< T >2D line between two points with intersection methods
irr::core::line3d< T >3D line between two points with intersection methods
irr::core::list< T >Doubly linked list template
irr::core::map< KeyType, ValueType >Map template for associative arrays using a red-black tree
irr::scene::quake3::Noiser
irr::core::map< KeyType, ValueType >::ParentFirstIteratorParent First Iterator
irr::core::map< KeyType, ValueType >::ParentLastIteratorParent Last Iterator
irr::core::plane3d< T >Template plane class with some intersection testing methods
irr::scene::quake3::Q3LevelLoadParameter
irr::core::quaternionQuaternion class for representing rotations
irr::ITimer::RealTimeDate
irr::core::rect< T >Rectangle template
irr::video::S3DVertexStandard vertex used by the Irrlicht engine
irr::video::S3DVertex2TCoordsVertex with two texture coordinates
irr::video::S3DVertexTangentsVertex with a tangent and binormal vector
irr::scene::SAnimatedMeshSimple implementation of the IAnimatedMesh interface
irr::io::SAttributeReadWriteOptionsStruct holding data describing options
irr::scene::quake3::SBlendFuncA blend function for a q3 shader
irr::video::SColorClass representing a 32 bit ARGB color
irr::video::SColorfClass representing a color with four floats
irr::video::SColorHSLClass representing a color in HSL format
irr::gui::SCursorSpriteStructure used to set sprites as cursors
irr::SEventSEvents hold information about an event. See irr::IEventReceiver for details on event handling
irr::video::SExposedVideoDataStructure for holding data describing a driver and operating system specific data
irr::SEvent::SGUIEventAny kind of GUI event
irr::gui::SGUISpriteA sprite composed of several frames
irr::gui::SGUISpriteFrameA single sprite frame
irr::SIrrlichtCreationParametersStructure for holding Irrlicht Device creation parameters
irr::scene::ISkinnedMesh::SJointJoints
irr::SEvent::SJoystickEventA joystick event
irr::SJoystickInfoInformation on a joystick, returned from irr::IrrlichtDevice::activateJoysticks()
irr::SEvent::SKeyInputAny kind of keyboard event
irr::SKeyMapStruct storing which key belongs to which action
irr::video::SLightStructure for holding data describing a dynamic point light
irr::SEvent::SLogEventAny kind of log event
irr::video::SMaterialStruct for holding parameters for a material renderer
irr::video::SMaterialLayerStruct for holding material parameters which exist per texture layer
irr::scene::SMD3AnimationInfo
irr::scene::SMD3FaceTriangle Index
irr::scene::SMD3HeaderThis holds the header info of the MD3 file
irr::scene::SMD3MeshHolding Frames Buffers and Tag Infos
irr::scene::SMD3MeshBufferHolding Frame Data for a Mesh
irr::scene::SMD3MeshHeaderThis holds the header info of an MD3 mesh section
irr::scene::SMD3QuaternionTagHold a tag info for connecting meshes
irr::scene::SMD3QuaternionTagListHolds a associative list of named quaternions
irr::scene::SMD3TexCoordTexture Coordinate
irr::scene::SMD3VertexCompressed Vertex Data
irr::scene::SMeshSimple implementation of the IMesh interface
irr::scene::quake3::SModifierFunction
irr::SEvent::SMouseInputAny kind of mouse event
irr::io::SNamedPathUsed in places where we identify objects by a filename, but don't actually work with the real filename
irr::video::SOverrideMaterial
irr::scene::SParticleStruct for holding particle data
irr::scene::ISkinnedMesh::SPositionKeyAnimation keyframe which describes a new position
irr::scene::ISkinnedMesh::SRotationKeyAnimation keyframe which describes a new rotation
irr::scene::ISkinnedMesh::SScaleKeyAnimation keyframe which describes a new scale
irr::scene::SSharedMeshBufferImplementation of the IMeshBuffer interface with shared vertex list
irr::scene::SSkinMeshBufferA mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime
irr::core::string< T, TAlloc >
irr::SEvent::SUserEventAny kind of user event
irr::scene::quake3::SVarGroup
irr::scene::quake3::SVarGroupListHolding a group a variable
irr::scene::quake3::SVariable
irr::scene::SVertexColorBrightnessManipulatorVertex manipulator which adjusts the brightness by the given amount
irr::scene::SVertexColorContrastBrightnessManipulatorVertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount
irr::scene::SVertexColorContrastManipulatorVertex manipulator which adjusts the contrast by the given factor
irr::scene::SVertexColorDesaturateToAverageManipulatorVertex manipulator which desaturates the color values
irr::scene::SVertexColorDesaturateToLightnessManipulatorVertex manipulator which desaturates the color values
irr::scene::SVertexColorDesaturateToLuminanceManipulatorVertex manipulator which desaturates the color values
irr::scene::SVertexColorGammaManipulatorVertex manipulator which adjusts the brightness by a gamma operation
irr::scene::SVertexColorInterpolateLinearManipulatorVertex manipulator which interpolates the color values
irr::scene::SVertexColorInterpolateQuadraticManipulatorVertex manipulator which interpolates the color values
irr::scene::SVertexColorInvertManipulatorVertex manipulator which invertes the RGB values
irr::scene::SVertexColorScaleManipulatorVertex manipulator which scales the color values
irr::scene::SVertexColorSetAlphaManipulatorVertex manipulator to set the alpha value of the vertex color to a fixed value
irr::scene::SVertexColorSetManipulatorVertex manipulator to set color to a fixed color for all vertices
irr::scene::SVertexColorThresholdManipulatorVertex manipulator to set vertex color to one of two values depending on a given threshold
irr::scene::SVertexPositionScaleAlongNormalsManipulatorVertex manipulator which scales the position of the vertex along the normals
irr::scene::SVertexPositionScaleManipulatorVertex manipulator which scales the position of the vertex
irr::scene::SVertexPositionTransformManipulatorVertex manipulator which transforms the position of the vertex
irr::scene::SVertexTCoordsScaleManipulatorVertex manipulator which scales the TCoords of the vertex
irr::scene::SViewFrustumDefines the view frustum. That's the space visible by the camera
irr::scene::ISkinnedMesh::SWeightA vertex weight
irr::core::triangle3d< T >3d triangle template class for doing collision detection and other things
irr::core::vector2d< T >2d vector template class with lots of operators and methods
irr::core::vector3d< T >3d vector template class with lots of operators and methods
irr::io::xmlChar< T >
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/bc_s.png b/src/others/irrlicht-1.8.1/doc/html/bc_s.png new file mode 100644 index 0000000..9251858 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/bc_s.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classes.html b/src/others/irrlicht-1.8.1/doc/html/classes.html new file mode 100644 index 0000000..1d3f572 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classes.html @@ -0,0 +1,192 @@ + + + + +Irrlicht 3D Engine: Class Index + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class Index
+
+
+
A | C | D | F | I | L | M | N | P | Q | R | S | T | V | X
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  A  
+
IGUIContextMenu (irr::gui)   IParticleGravityAffector (irr::scene)   
  N  
+
SMD3Vertex (irr::scene)   
IGUIEditBox (irr::gui)   IParticleMeshEmitter (irr::scene)   SMesh (irr::scene)   
aabbox3d (irr::core)   IGUIElement (irr::gui)   IParticleRingEmitter (irr::scene)   Noiser (irr::scene::quake3)   SModifierFunction (irr::scene::quake3)   
map::AccessClass (irr::core)   IGUIElementFactory (irr::gui)   IParticleRotationAffector (irr::scene)   
  P  
+
SEvent::SMouseInput (irr)   
array (irr::core)   IGUIEnvironment (irr::gui)   IParticleSphereEmitter (irr::scene)   SNamedPath (irr::io)   
  C  
+
IGUIFileOpenDialog (irr::gui)   IParticleSystemSceneNode (irr::scene)   map::ParentFirstIterator (irr::core)   SOverrideMaterial (irr::video)   
IGUIFont (irr::gui)   IQ3LevelMesh (irr::scene)   map::ParentLastIterator (irr::core)   SParticle (irr::scene)   
CDynamicMeshBuffer (irr::scene)   IGUIFontBitmap (irr::gui)   IRandomizer (irr)   plane3d (irr::core)   ISkinnedMesh::SPositionKey (irr::scene)   
CIndexBuffer (irr::scene)   IGUIImage (irr::gui)   IReadFile (irr::io)   
  Q  
+
ISkinnedMesh::SRotationKey (irr::scene)   
CMatrix4 (irr::core)   IGUIImageList (irr::gui)   IReferenceCounted (irr)   ISkinnedMesh::SScaleKey (irr::scene)   
CMeshBuffer (irr::scene)   IGUIInOutFader (irr::gui)   IRenderTarget (irr::video)   Q3LevelLoadParameter (irr::scene::quake3)   SSharedMeshBuffer (irr::scene)   
map::ConstIterator (irr::core)   IGUIListBox (irr::gui)   irrAllocator (irr::core)   quaternion (irr::core)   SSkinMeshBuffer (irr::scene)   
list::ConstIterator (irr::core)   IGUIMeshViewer (irr::gui)   irrAllocatorFast (irr::core)   
  R  
+
string (irr::core)   
CVertexBuffer (irr::scene)   IGUIScrollBar (irr::gui)   IrrlichtDevice (irr)   SEvent::SUserEvent (irr)   
  D  
+
IGUISkin (irr::gui)   ISceneCollisionManager (irr::scene)   ITimer::RealTimeDate (irr)   SVarGroup (irr::scene::quake3)   
IGUISpinBox (irr::gui)   ISceneLoader (irr::scene)   rect (irr::core)   SVarGroupList (irr::scene::quake3)   
dimension2d (irr::core)   IGUISpriteBank (irr::gui)   ISceneManager (irr::scene)   
  S  
+
SVariable (irr::scene::quake3)   
  F  
+
IGUIStaticText (irr::gui)   ISceneNode (irr::scene)   SVertexColorBrightnessManipulator (irr::scene)   
IGUITab (irr::gui)   ISceneNodeAnimator (irr::scene)   S3DVertex (irr::video)   SVertexColorContrastBrightnessManipulator (irr::scene)   
FloatIntUnion32 (irr::core)   IGUITabControl (irr::gui)   ISceneNodeAnimatorCameraFPS (irr::scene)   S3DVertex2TCoords (irr::video)   SVertexColorContrastManipulator (irr::scene)   
  I  
+
IGUITable (irr::gui)   ISceneNodeAnimatorCameraMaya (irr::scene)   S3DVertexTangents (irr::video)   SVertexColorDesaturateToAverageManipulator (irr::scene)   
IGUIToolBar (irr::gui)   ISceneNodeAnimatorCollisionResponse (irr::scene)   SAnimatedMesh (irr::scene)   SVertexColorDesaturateToLightnessManipulator (irr::scene)   
IAnimatedMesh (irr::scene)   IGUITreeView (irr::gui)   ISceneNodeAnimatorFactory (irr::scene)   SAttributeReadWriteOptions (irr::io)   SVertexColorDesaturateToLuminanceManipulator (irr::scene)   
IAnimatedMeshMD2 (irr::scene)   IGUITreeViewNode (irr::gui)   ISceneNodeFactory (irr::scene)   SBlendFunc (irr::scene::quake3)   SVertexColorGammaManipulator (irr::scene)   
IAnimatedMeshMD3 (irr::scene)   IGUIWindow (irr::gui)   ISceneUserDataSerializer (irr::scene)   SColor (irr::video)   SVertexColorInterpolateLinearManipulator (irr::scene)   
IAnimatedMeshSceneNode (irr::scene)   IImage (irr::video)   IShader (irr::scene::quake3)   SColorf (irr::video)   SVertexColorInterpolateQuadraticManipulator (irr::scene)   
IAnimationEndCallBack (irr::scene)   IImageLoader (irr::video)   IShaderConstantSetCallBack (irr::video)   SColorHSL (irr::video)   SVertexColorInvertManipulator (irr::scene)   
IArchiveLoader (irr::io)   IImageWriter (irr::video)   IShaderManager (irr::scene::quake3)   SCursorSprite (irr::gui)   SVertexColorScaleManipulator (irr::scene)   
IAttributeExchangingObject (irr::io)   IIndexBuffer (irr::scene)   IShadowVolumeSceneNode (irr::scene)   SEvent (irr)   SVertexColorSetAlphaManipulator (irr::scene)   
IAttributes (irr::io)   IIrrXMLReader (irr::io)   ISkinnedMesh (irr::scene)   SExposedVideoData (irr::video)   SVertexColorSetManipulator (irr::scene)   
IBillboardSceneNode (irr::scene)   ILightManager (irr::scene)   map::Iterator (irr::core)   SEvent::SGUIEvent (irr)   SVertexColorThresholdManipulator (irr::scene)   
IBillboardTextSceneNode (irr::scene)   ILightSceneNode (irr::scene)   list::Iterator (irr::core)   SGUISprite (irr::gui)   SVertexPositionScaleAlongNormalsManipulator (irr::scene)   
IBoneSceneNode (irr::scene)   ILogger (irr)   ITerrainSceneNode (irr::scene)   SGUISpriteFrame (irr::gui)   SVertexPositionScaleManipulator (irr::scene)   
ICameraSceneNode (irr::scene)   IMaterialRenderer (irr::video)   ITextSceneNode (irr::scene)   SIrrlichtCreationParameters (irr)   SVertexPositionTransformManipulator (irr::scene)   
IColladaMeshWriter (irr::scene)   IMaterialRendererServices (irr::video)   ITexture (irr::video)   ISkinnedMesh::SJoint (irr::scene)   SVertexTCoordsScaleManipulator (irr::scene)   
IColladaMeshWriterNames (irr::scene)   IMesh (irr::scene)   ITimer (irr)   SEvent::SJoystickEvent (irr)   SViewFrustum (irr::scene)   
IColladaMeshWriterProperties (irr::scene)   IMeshBuffer (irr::scene)   ITriangleSelector (irr::scene)   SJoystickInfo (irr)   ISkinnedMesh::SWeight (irr::scene)   
ICollisionCallback (irr::scene)   IMeshCache (irr::scene)   IVertexBuffer (irr::scene)   SEvent::SKeyInput (irr)   
  T  
+
ICursorControl (irr::gui)   IMeshLoader (irr::scene)   IVertexManipulator (irr::scene)   SKeyMap (irr)   
IDummyTransformationSceneNode (irr::scene)   IMeshManipulator (irr::scene)   IVideoDriver (irr::video)   SLight (irr::video)   triangle3d (irr::core)   
IDynamicMeshBuffer (irr::scene)   IMeshSceneNode (irr::scene)   IVideoModeList (irr::video)   SEvent::SLogEvent (irr)   
  V  
+
IEventReceiver (irr)   IMeshWriter (irr::scene)   IVolumeLightSceneNode (irr::scene)   SMaterial (irr::video)   
IFileArchive (irr::io)   IMetaTriangleSelector (irr::scene)   IWriteFile (irr::io)   SMaterialLayer (irr::video)   vector2d (irr::core)   
IFileList (irr::io)   inttofloat (irr::core)   IXMLBase (irr::io)   SMD3AnimationInfo (irr::scene)   vector3d (irr::core)   
IFileReadCallBack (irr::io)   IOSOperator (irr)   IXMLWriter (irr::io)   SMD3Face (irr::scene)   
  X  
+
IFileSystem (irr::io)   IParticleAffector (irr::scene)   
  L  
+
SMD3Header (irr::scene)   
IGeometryCreator (irr::scene)   IParticleAnimatedMeshSceneNodeEmitter (irr::scene)   SMD3Mesh (irr::scene)   xmlChar (irr::io)   
IGPUProgrammingServices (irr::video)   IParticleAttractionAffector (irr::scene)   line2d (irr::core)   SMD3MeshBuffer (irr::scene)   
IGUIButton (irr::gui)   IParticleBoxEmitter (irr::scene)   line3d (irr::core)   SMD3MeshHeader (irr::scene)   
IGUICheckBox (irr::gui)   IParticleCylinderEmitter (irr::scene)   list (irr::core)   SMD3QuaternionTag (irr::scene)   
IGUIColorSelectDialog (irr::gui)   IParticleEmitter (irr::scene)   
  M  
+
SMD3QuaternionTagList (irr::scene)   
IGUIComboBox (irr::gui)   IParticleFadeOutAffector (irr::scene)   SMD3TexCoord (irr::scene)   
map (irr::core)   
+
A | C | D | F | I | L | M | N | P | Q | R | S | T | V | X
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver-members.html new file mode 100644 index 0000000..e6f8a50 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::IEventReceiver Member List
+
+
+This is the complete list of members for irr::IEventReceiver, including all inherited members. + + +
OnEvent(const SEvent &event)=0irr::IEventReceiver [pure virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.html new file mode 100644 index 0000000..37924f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.html @@ -0,0 +1,225 @@ + + + + +Irrlicht 3D Engine: irr::IEventReceiver Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::IEventReceiver Class Reference
+
+
+ +

Interface of an object which can receive events. + More...

+ +

#include <IEventReceiver.h>

+
+ + Inheritance diagram for irr::IEventReceiver:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface of an object which can receive events.

+

Many of the engine's classes inherit IEventReceiver so they are able to process events. Events usually start at a postEventFromUser function and are passed down through a chain of event receivers until OnEvent returns true. See irr::EEVENT_TYPE for a description of where each type of event starts, and the path it takes through the system.

+ +

Definition at line 433 of file IEventReceiver.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::IEventReceiver::~IEventReceiver () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 438 of file IEventReceiver.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool irr::IEventReceiver::OnEvent (const SEventevent) [pure virtual]
+
+
+ +

Called if an event happened.

+

Please take care that you should only return 'true' when you want to _prevent_ Irrlicht from processing the event any further. So 'true' does mean that an event is completely done. Therefore your return value for all unprocessed events should be 'false'.

+
Returns:
True if the event was processed.
+ +

Implemented in irr::gui::IGUIElement, irr::scene::ICameraSceneNode, and irr::scene::ISceneNodeAnimator.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.png new file mode 100644 index 0000000..7cff07f Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_event_receiver.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger-members.html new file mode 100644 index 0000000..883dc0b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger-members.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::ILogger Member List
+
+
+This is the complete list of members for irr::ILogger, including all inherited members. + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getLogLevel() const =0irr::ILogger [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
log(const c8 *text, ELOG_LEVEL ll=ELL_INFORMATION)=0irr::ILogger [pure virtual]
log(const c8 *text, const c8 *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0irr::ILogger [pure virtual]
log(const c8 *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0irr::ILogger [pure virtual]
log(const wchar_t *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0irr::ILogger [pure virtual]
log(const wchar_t *text, ELOG_LEVEL ll=ELL_INFORMATION)=0irr::ILogger [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setLogLevel(ELOG_LEVEL ll)=0irr::ILogger [pure virtual]
~ILogger()irr::ILogger [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.html new file mode 100644 index 0000000..bdb50a5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.html @@ -0,0 +1,417 @@ + + + + +Irrlicht 3D Engine: irr::ILogger Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::ILogger Class Reference
+
+
+ +

Interface for logging messages, warnings and errors. + More...

+ +

#include <ILogger.h>

+
+ + Inheritance diagram for irr::ILogger:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual ~ILogger () +
    Destructor.
  • virtual ELOG_LEVEL getLogLevel () const =0 +
    Returns the current set log level.
  • virtual void log (const c8 *text, ELOG_LEVEL ll=ELL_INFORMATION)=0 +
    Prints out a text into the log.
  • virtual void log (const c8 *text, const c8 *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0 +
    Prints out a text into the log.
  • virtual void log (const c8 *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0 +
  • virtual void log (const wchar_t *text, const wchar_t *hint, ELOG_LEVEL ll=ELL_INFORMATION)=0 +
    Prints out a text into the log.
  • virtual void log (const wchar_t *text, ELOG_LEVEL ll=ELL_INFORMATION)=0 +
    Prints out a text into the log.
  • virtual void setLogLevel (ELOG_LEVEL ll)=0 +
    Sets a new log level.
+

Detailed Description

+

Interface for logging messages, warnings and errors.

+ +

Definition at line 38 of file ILogger.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::ILogger::~ILogger () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 43 of file ILogger.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual ELOG_LEVEL irr::ILogger::getLogLevel () const [pure virtual]
+
+
+ +

Returns the current set log level.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::ILogger::log (const c8text,
ELOG_LEVEL ll = ELL_INFORMATION 
) [pure virtual]
+
+
+ +

Prints out a text into the log.

+
Parameters:
+ + + +
text,:Text to print out.
ll,:Log level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::ILogger::log (const c8text,
const c8hint,
ELOG_LEVEL ll = ELL_INFORMATION 
) [pure virtual]
+
+
+ +

Prints out a text into the log.

+
Parameters:
+ + + + +
text,:Text to print out.
hint,:Additional info. This string is added after a " :" to the string.
ll,:Log level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::ILogger::log (const c8text,
const wchar_t * hint,
ELOG_LEVEL ll = ELL_INFORMATION 
) [pure virtual]
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::ILogger::log (const wchar_t * text,
const wchar_t * hint,
ELOG_LEVEL ll = ELL_INFORMATION 
) [pure virtual]
+
+
+ +

Prints out a text into the log.

+
Parameters:
+ + + + +
text,:Text to print out.
hint,:Additional info. This string is added after a " :" to the string.
ll,:Log level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::ILogger::log (const wchar_t * text,
ELOG_LEVEL ll = ELL_INFORMATION 
) [pure virtual]
+
+
+ +

Prints out a text into the log.

+
Parameters:
+ + + +
text,:Text to print out.
ll,:Log level of the text. If the text is an error, set it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it is just an informational text, set it to ELL_INFORMATION. Texts are filtered with these levels. If you want to be a text displayed, independent on what level filter is set, use ELL_NONE.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::ILogger::setLogLevel (ELOG_LEVEL ll) [pure virtual]
+
+
+ +

Sets a new log level.

+

With this value, texts which are sent to the logger are filtered out. For example setting this value to ELL_WARNING, only warnings and errors are printed out. Setting it to ELL_INFORMATION, which is the default setting, warnings, errors and informational texts are printed out.

+
Parameters:
+ + +
ll,:new log level filter value.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.png new file mode 100644 index 0000000..56c0a80 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_logger.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator-members.html new file mode 100644 index 0000000..e70eafb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::IOSOperator Member List
+
+
+This is the complete list of members for irr::IOSOperator, including all inherited members. + + + + + + + + + + + + + +
copyToClipboard(const c8 *text) const =0irr::IOSOperator [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getOperatingSystemVersion() const =0irr::IOSOperator [pure virtual]
getOperationSystemVersion() const irr::IOSOperator [inline]
getProcessorSpeedMHz(u32 *MHz) const =0irr::IOSOperator [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSystemMemory(u32 *Total, u32 *Avail) const =0irr::IOSOperator [pure virtual]
getTextFromClipboard() const =0irr::IOSOperator [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.html new file mode 100644 index 0000000..b82ee17 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.html @@ -0,0 +1,303 @@ + + + + +Irrlicht 3D Engine: irr::IOSOperator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::IOSOperator Class Reference
+
+
+ +

The Operating system operator provides operation system specific methods and informations. + More...

+ +

#include <IOSOperator.h>

+
+ + Inheritance diagram for irr::IOSOperator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

The Operating system operator provides operation system specific methods and informations.

+ +

Definition at line 15 of file IOSOperator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::IOSOperator::copyToClipboard (const c8text) const [pure virtual]
+
+
+ +

Copies text to the clipboard.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::stringc& irr::IOSOperator::getOperatingSystemVersion () const [pure virtual]
+
+
+ +

Get the current operation system version as string.

+ +

Referenced by getOperationSystemVersion().

+ +
+
+ +
+
+ + + + + + + +
_IRR_DEPRECATED_ const wchar_t* irr::IOSOperator::getOperationSystemVersion () const [inline]
+
+
+ +

Get the current operation system version as string.

+
Deprecated:
Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9.
+ +

Definition at line 23 of file IOSOperator.h.

+ +

References getOperatingSystemVersion().

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::IOSOperator::getProcessorSpeedMHz (u32MHz) const [pure virtual]
+
+
+ +

Get the processor speed in megahertz.

+
Parameters:
+ + +
MHzThe integer variable to store the speed in.
+
+
+
Returns:
True if successful, false if not
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::IOSOperator::getSystemMemory (u32Total,
u32Avail 
) const [pure virtual]
+
+
+ +

Get the total and available system RAM.

+
Parameters:
+ + + +
Total,:will contain the total system memory
Avail,:will contain the available memory
+
+
+
Returns:
True if successful, false if not
+ +
+
+ +
+
+ + + + + + + +
virtual const c8* irr::IOSOperator::getTextFromClipboard () const [pure virtual]
+
+
+ +

Get text from the clipboard.

+
Returns:
Returns 0 if no string is in there.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.png new file mode 100644 index 0000000..225c530 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_o_s_operator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer-members.html new file mode 100644 index 0000000..da029bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::IRandomizer Member List
+
+
+This is the complete list of members for irr::IRandomizer, including all inherited members. + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
frand() const =0irr::IRandomizer [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
rand() const =0irr::IRandomizer [pure virtual]
randMax() const =0irr::IRandomizer [pure virtual]
reset(s32 value=0x0f0f0f0f)=0irr::IRandomizer [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.html new file mode 100644 index 0000000..5756797 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.html @@ -0,0 +1,236 @@ + + + + +Irrlicht 3D Engine: irr::IRandomizer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::IRandomizer Class Reference
+
+
+ +

Interface for generating random numbers. + More...

+ +

#include <IRandomizer.h>

+
+ + Inheritance diagram for irr::IRandomizer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual f32 frand () const =0 +
    generates a pseudo random number in the range 0..1
  • virtual s32 rand () const =0 +
    generates a pseudo random number in the range 0..randMax()
  • virtual s32 randMax () const =0 +
    get maxmimum number generated by rand()
  • virtual void reset (s32 value=0x0f0f0f0f)=0 +
    resets the randomizer
+

Detailed Description

+

Interface for generating random numbers.

+ +

Definition at line 14 of file IRandomizer.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual f32 irr::IRandomizer::frand () const [pure virtual]
+
+
+ +

generates a pseudo random number in the range 0..1

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::IRandomizer::rand () const [pure virtual]
+
+
+ +

generates a pseudo random number in the range 0..randMax()

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::IRandomizer::randMax () const [pure virtual]
+
+
+ +

get maxmimum number generated by rand()

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::IRandomizer::reset (s32 value = 0x0f0f0f0f) [pure virtual]
+
+
+ +

resets the randomizer

+
Parameters:
+ + +
valueInitialization value (seed)
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.png new file mode 100644 index 0000000..69f5bd1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_randomizer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted-members.html new file mode 100644 index 0000000..3526318 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted-members.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::IReferenceCounted Member List
+
+
+This is the complete list of members for irr::IReferenceCounted, including all inherited members. + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.html new file mode 100644 index 0000000..7fa862e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.html @@ -0,0 +1,391 @@ + + + + +Irrlicht 3D Engine: irr::IReferenceCounted Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::IReferenceCounted Class Reference
+
+
+ +

Base class of most objects of the Irrlicht Engine. + More...

+ +

#include <IReferenceCounted.h>

+
+ + Inheritance diagram for irr::IReferenceCounted:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+
    +
  • void setDebugName (const c8 *newName) +
    Sets the debug name of the object.
+

Detailed Description

+

Base class of most objects of the Irrlicht Engine.

+

This class provides reference counting through the methods grab() and drop(). It also is able to store a debug string for every instance of an object. Most objects of the Irrlicht Engine are derived from IReferenceCounted, and so they are reference counted.

+

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

+

A simple example:

+

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128)); If you no longer need the texture, call texture->drop().

+

If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

+ +

Definition at line 41 of file IReferenceCounted.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::IReferenceCounted::IReferenceCounted () [inline]
+
+
+ +

Constructor.

+ +

Definition at line 46 of file IReferenceCounted.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::IReferenceCounted::~IReferenceCounted () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 52 of file IReferenceCounted.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool irr::IReferenceCounted::drop () const [inline]
+
+
+ +

Drops the object. Decrements the reference counter by one.

+

The IReferenceCounted class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IReferenceCounted, and so they are reference counted.

+

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

+

A simple example:

+

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

+
Returns:
True, if the object was deleted.
+ +

Definition at line 116 of file IReferenceCounted.h.

+ +

References _IRR_DEBUG_BREAK_IF.

+ +

Referenced by irr::scene::SMesh::clear(), irr::scene::ISceneNode::cloneMembers(), irr::scene::quake3::getTextures(), irr::scene::IColladaMeshWriter::setDefaultNameGenerator(), irr::scene::IColladaMeshWriter::setDefaultProperties(), irr::scene::CDynamicMeshBuffer::setIndexBuffer(), irr::scene::IColladaMeshWriter::setNameGenerator(), irr::scene::ISceneNode::setParent(), irr::scene::IColladaMeshWriter::setProperties(), irr::scene::ISceneNode::setTriangleSelector(), irr::scene::CDynamicMeshBuffer::setVertexBuffer(), irr::scene::CDynamicMeshBuffer::~CDynamicMeshBuffer(), irr::scene::IColladaMeshWriter::~IColladaMeshWriter(), irr::scene::ISceneNode::~ISceneNode(), irr::scene::SAnimatedMesh::~SAnimatedMesh(), irr::scene::SMD3Mesh::~SMD3Mesh(), and irr::scene::SMesh::~SMesh().

+ +
+
+ +
+
+ + + + + + + +
const c8* irr::IReferenceCounted::getDebugName () const [inline]
+
+
+ +

Returns the debug name of the object.

+

The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

+
Returns:
Returns a string, previously set by setDebugName();
+ +

Definition at line 142 of file IReferenceCounted.h.

+ +
+
+ +
+
+ + + + + + + +
s32 irr::IReferenceCounted::getReferenceCount () const [inline]
+
+
+ +

Get the reference count.

+
Returns:
Current value of the reference counter.
+ +

Definition at line 133 of file IReferenceCounted.h.

+ +
+
+ +
+
+ + + + + + + +
void irr::IReferenceCounted::grab () const [inline]
+
+
+ +

Grabs the object. Increments the reference counter by one.

+

Someone who calls grab() to an object, should later also call drop() to it. If an object never gets as much drop() as grab() calls, it will never be destroyed. The IReferenceCounted class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IReferenceCounted, and so they are reference counted.

+

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

+

A simple example:

+

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

+ +

Definition at line 86 of file IReferenceCounted.h.

+ +

Referenced by irr::scene::ISceneNode::addAnimator(), irr::scene::ISceneNode::addChild(), irr::gui::IGUIElement::addChildToEnd(), irr::scene::SAnimatedMesh::addMesh(), irr::scene::SMesh::addMeshBuffer(), irr::scene::IColladaMeshWriter::setDefaultNameGenerator(), irr::scene::IColladaMeshWriter::setDefaultProperties(), irr::scene::CDynamicMeshBuffer::setIndexBuffer(), irr::scene::IColladaMeshWriter::setNameGenerator(), irr::scene::ISceneNode::setParent(), irr::scene::IColladaMeshWriter::setProperties(), irr::scene::ISceneNode::setTriangleSelector(), and irr::scene::CDynamicMeshBuffer::setVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
void irr::IReferenceCounted::setDebugName (const c8newName) [inline, protected]
+
+
+ +

Sets the debug name of the object.

+

The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

+
Parameters:
+ + +
newName,:New debug name to set.
+
+
+ +

Definition at line 153 of file IReferenceCounted.h.

+ +

Referenced by irr::scene::CMeshBuffer< T >::CMeshBuffer(), irr::gui::IGUIElement::IGUIElement(), irr::scene::SAnimatedMesh::SAnimatedMesh(), irr::scene::SMesh::SMesh(), irr::scene::SSharedMeshBuffer::SSharedMeshBuffer(), and irr::scene::SSkinMeshBuffer::SSkinMeshBuffer().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.png new file mode 100644 index 0000000..ed23eda Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer-members.html new file mode 100644 index 0000000..ce15fa2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer-members.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::ITimer Member List
+
+
+This is the complete list of members for irr::ITimer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
EWD_FRIDAY enum valueirr::ITimer
EWD_MONDAY enum valueirr::ITimer
EWD_SATURDAY enum valueirr::ITimer
EWD_SUNDAY enum valueirr::ITimer
EWD_THURSDAY enum valueirr::ITimer
EWD_TUESDAY enum valueirr::ITimer
EWD_WEDNESDAY enum valueirr::ITimer
EWeekday enum nameirr::ITimer
getDebugName() const irr::IReferenceCounted [inline]
getRealTime() const =0irr::ITimer [pure virtual]
getRealTimeAndDate() const =0irr::ITimer [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSpeed() const =0irr::ITimer [pure virtual]
getTime() const =0irr::ITimer [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isStopped() const =0irr::ITimer [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setSpeed(f32 speed=1.0f)=0irr::ITimer [pure virtual]
setTime(u32 time)=0irr::ITimer [pure virtual]
start()=0irr::ITimer [pure virtual]
stop()=0irr::ITimer [pure virtual]
tick()=0irr::ITimer [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.html new file mode 100644 index 0000000..d347f6b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.html @@ -0,0 +1,406 @@ + + + + +Irrlicht 3D Engine: irr::ITimer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::ITimer Class Reference
+
+
+ +

Interface for getting and manipulating the virtual time. + More...

+ +

#include <ITimer.h>

+
+ + Inheritance diagram for irr::ITimer:
+
+
+ + +

List of all members.

+

+Classes

+ +

+Public Types

+ +

+Public Member Functions

+
    +
  • virtual u32 getRealTime () const =0 +
    Returns current real time in milliseconds of the system.
  • virtual RealTimeDate getRealTimeAndDate () const =0 +
  • virtual f32 getSpeed () const =0 +
    Returns current speed of the timer.
  • virtual u32 getTime () const =0 +
    Returns current virtual time in milliseconds.
  • virtual bool isStopped () const =0 +
    Returns if the virtual timer is currently stopped.
  • virtual void setSpeed (f32 speed=1.0f)=0 +
    Sets the speed of the timer.
  • virtual void setTime (u32 time)=0 +
    sets current virtual time
  • virtual void start ()=0 +
    Starts the virtual timer.
  • virtual void stop ()=0 +
    Stops the virtual timer.
  • virtual void tick ()=0 +
    Advances the virtual time.
+

Detailed Description

+

Interface for getting and manipulating the virtual time.

+ +

Definition at line 14 of file ITimer.h.

+

Member Enumeration Documentation

+ +
+
+ + + + +
enum irr::ITimer::EWeekday
+
+
+
Enumerator:
+ + + + + + + +
EWD_SUNDAY  +
EWD_MONDAY  +
EWD_TUESDAY  +
EWD_WEDNESDAY  +
EWD_THURSDAY  +
EWD_FRIDAY  +
EWD_SATURDAY  +
+
+
+ +

Definition at line 24 of file ITimer.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual u32 irr::ITimer::getRealTime () const [pure virtual]
+
+
+ +

Returns current real time in milliseconds of the system.

+

This value does not start with 0 when the application starts. For example in one implementation the value returned could be the amount of milliseconds which have elapsed since the system was started.

+ +
+
+ +
+
+ + + + + + + +
virtual RealTimeDate irr::ITimer::getRealTimeAndDate () const [pure virtual]
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::ITimer::getSpeed () const [pure virtual]
+
+
+ +

Returns current speed of the timer.

+

The speed is the factor with which the time is running faster or slower then the real system time.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::ITimer::getTime () const [pure virtual]
+
+
+ +

Returns current virtual time in milliseconds.

+

This value starts with 0 and can be manipulated using setTime(), stopTimer(), startTimer(), etc. This value depends on the set speed of the timer if the timer is stopped, etc. If you need the system time, use getRealTime()

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::ITimer::isStopped () const [pure virtual]
+
+
+ +

Returns if the virtual timer is currently stopped.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::ITimer::setSpeed (f32 speed = 1.0f) [pure virtual]
+
+
+ +

Sets the speed of the timer.

+

The speed is the factor with which the time is running faster or slower then the real system time.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::ITimer::setTime (u32 time) [pure virtual]
+
+
+ +

sets current virtual time

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::ITimer::start () [pure virtual]
+
+
+ +

Starts the virtual timer.

+

The timer is reference counted, which means everything which calls stop() will also have to call start(), otherwise the timer may not start/stop correctly again.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::ITimer::stop () [pure virtual]
+
+
+ +

Stops the virtual timer.

+

The timer is reference counted, which means everything which calls stop() will also have to call start(), otherwise the timer may not start/stop correctly again.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::ITimer::tick () [pure virtual]
+
+
+ +

Advances the virtual time.

+

Makes the virtual timer update the time value based on the real time. This is called automatically when calling IrrlichtDevice::run(), but you can call it manually if you don't use this method.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.png new file mode 100644 index 0000000..bfaf372 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_timer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device-members.html new file mode 100644 index 0000000..28f2252 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device-members.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::IrrlichtDevice Member List
+
+
+This is the complete list of members for irr::IrrlichtDevice, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
activateJoysticks(core::array< SJoystickInfo > &joystickInfo)=0irr::IrrlichtDevice [pure virtual]
clearSystemMessages()=0irr::IrrlichtDevice [pure virtual]
closeDevice()=0irr::IrrlichtDevice [pure virtual]
createDefaultRandomizer() const =0irr::IrrlichtDevice [pure virtual]
drop() const irr::IReferenceCounted [inline]
getColorFormat() const =0irr::IrrlichtDevice [pure virtual]
getCursorControl()=0irr::IrrlichtDevice [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getEventReceiver()=0irr::IrrlichtDevice [pure virtual]
getFileSystem()=0irr::IrrlichtDevice [pure virtual]
getGammaRamp(f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast)=0irr::IrrlichtDevice [pure virtual]
getGUIEnvironment()=0irr::IrrlichtDevice [pure virtual]
getLogger()=0irr::IrrlichtDevice [pure virtual]
getOSOperator()=0irr::IrrlichtDevice [pure virtual]
getRandomizer() const =0irr::IrrlichtDevice [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSceneManager()=0irr::IrrlichtDevice [pure virtual]
getTimer()=0irr::IrrlichtDevice [pure virtual]
getType() const =0irr::IrrlichtDevice [pure virtual]
getVersion() const =0irr::IrrlichtDevice [pure virtual]
getVideoDriver()=0irr::IrrlichtDevice [pure virtual]
getVideoModeList()=0irr::IrrlichtDevice [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isDriverSupported(video::E_DRIVER_TYPE driver)irr::IrrlichtDevice [inline, static]
isFullscreen() const =0irr::IrrlichtDevice [pure virtual]
isWindowActive() const =0irr::IrrlichtDevice [pure virtual]
isWindowFocused() const =0irr::IrrlichtDevice [pure virtual]
isWindowMinimized() const =0irr::IrrlichtDevice [pure virtual]
maximizeWindow()=0irr::IrrlichtDevice [pure virtual]
minimizeWindow()=0irr::IrrlichtDevice [pure virtual]
postEventFromUser(const SEvent &event)=0irr::IrrlichtDevice [pure virtual]
restoreWindow()=0irr::IrrlichtDevice [pure virtual]
run()=0irr::IrrlichtDevice [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEventReceiver(IEventReceiver *receiver)=0irr::IrrlichtDevice [pure virtual]
setGammaRamp(f32 red, f32 green, f32 blue, f32 relativebrightness, f32 relativecontrast)=0irr::IrrlichtDevice [pure virtual]
setInputReceivingSceneManager(scene::ISceneManager *sceneManager)=0irr::IrrlichtDevice [pure virtual]
setRandomizer(IRandomizer *r)=0irr::IrrlichtDevice [pure virtual]
setResizable(bool resize=false)=0irr::IrrlichtDevice [pure virtual]
setWindowCaption(const wchar_t *text)=0irr::IrrlichtDevice [pure virtual]
sleep(u32 timeMs, bool pauseTimer=false)=0irr::IrrlichtDevice [pure virtual]
yield()=0irr::IrrlichtDevice [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.html new file mode 100644 index 0000000..aaa4ee0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.html @@ -0,0 +1,1043 @@ + + + + +Irrlicht 3D Engine: irr::IrrlichtDevice Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::IrrlichtDevice Class Reference
+
+
+ +

The Irrlicht device. You can create it with createDevice() or createDeviceEx(). + More...

+ +

#include <IrrlichtDevice.h>

+
+ + Inheritance diagram for irr::IrrlichtDevice:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Static Public Member Functions

+ +

Detailed Description

+

The Irrlicht device. You can create it with createDevice() or createDeviceEx().

+

This is the most important class of the Irrlicht Engine. You can access everything in the engine if you have a pointer to an instance of this class. There should be only one instance of this class at any time.

+ +

Definition at line 43 of file IrrlichtDevice.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool irr::IrrlichtDevice::activateJoysticks (core::array< SJoystickInfo > & joystickInfo) [pure virtual]
+
+
+ +

Activate any joysticks, and generate events for them.

+

Irrlicht contains support for joysticks, but does not generate joystick events by default, as this would consume joystick info that 3rd party libraries might rely on. Call this method to activate joystick support in Irrlicht and to receive irr::SJoystickEvent events.

+
Parameters:
+ + +
joystickInfoOn return, this will contain an array of each joystick that was found and activated.
+
+
+
Returns:
true if joysticks are supported on this device and _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ is defined, false if joysticks are not supported or support is compiled out.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::IrrlichtDevice::clearSystemMessages () [pure virtual]
+
+
+ +

Remove messages pending in the system message loop.

+

This function is usually used after messages have been buffered for a longer time, for example when loading a large scene. Clearing the message loop prevents that mouse- or buttonclicks which users have pressed in the meantime will now trigger unexpected actions in the gui.
+ So far the following messages are cleared:
+ Win32: All keyboard and mouse messages
+ Linux: All keyboard and mouse messages
+ All other devices are not yet supported here.
+ The function is still somewhat experimental, as the kind of messages we clear is based on just a few use-cases. If you think further messages should be cleared, or some messages should not be cleared here, then please tell us.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::IrrlichtDevice::closeDevice () [pure virtual]
+
+
+ +

Notifies the device that it should close itself.

+

IrrlichtDevice::run() will always return false after closeDevice() was called.

+ +
+
+ +
+
+ + + + + + + +
virtual IRandomizer* irr::IrrlichtDevice::createDefaultRandomizer () const [pure virtual]
+
+
+ +

Creates a new default randomizer.

+

The default randomizer provides the random sequence known from previous Irrlicht versions and is the initial randomizer set on device creation.

+
Returns:
Pointer to the default IRandomizer object.
+ +
+
+ +
+
+ + + + + + + +
virtual video::ECOLOR_FORMAT irr::IrrlichtDevice::getColorFormat () const [pure virtual]
+
+
+ +

Get the current color format of the window.

+
Returns:
Color format of the window.
+ +
+
+ +
+
+ + + + + + + +
virtual gui::ICursorControl* irr::IrrlichtDevice::getCursorControl () [pure virtual]
+
+
+ +

Provides access to the cursor control.

+
Returns:
Pointer to the mouse cursor control interface.
+ +
+
+ +
+
+ + + + + + + +
virtual IEventReceiver* irr::IrrlichtDevice::getEventReceiver () [pure virtual]
+
+
+ +

Provides access to the current event receiver.

+
Returns:
Pointer to the current event receiver. Returns 0 if there is none.
+ +
+
+ +
+
+ + + + + + + +
virtual io::IFileSystem* irr::IrrlichtDevice::getFileSystem () [pure virtual]
+
+
+ +

Provides access to the virtual file system.

+
Returns:
Pointer to the file system.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::IrrlichtDevice::getGammaRamp (f32red,
f32green,
f32blue,
f32brightness,
f32contrast 
) [pure virtual]
+
+
+ +

Get the current Gamma Value for the Display.

+ +
+
+ +
+
+ + + + + + + +
virtual gui::IGUIEnvironment* irr::IrrlichtDevice::getGUIEnvironment () [pure virtual]
+
+
+ +

Provides access to the 2d user interface environment.

+
Returns:
Pointer to the gui environment.
+ +
+
+ +
+
+ + + + + + + +
virtual ILogger* irr::IrrlichtDevice::getLogger () [pure virtual]
+
+
+ +

Provides access to the message logger.

+
Returns:
Pointer to the logger.
+ +
+
+ +
+
+ + + + + + + +
virtual IOSOperator* irr::IrrlichtDevice::getOSOperator () [pure virtual]
+
+
+ +

Provides access to the operation system operator object.

+

The OS operator provides methods for getting system specific informations and doing system specific operations, such as exchanging data with the clipboard or reading the operation system version.

+
Returns:
Pointer to the OS operator.
+ +
+
+ +
+
+ + + + + + + +
virtual IRandomizer* irr::IrrlichtDevice::getRandomizer () const [pure virtual]
+
+
+ +

Provides access to the engine's currently set randomizer.

+
Returns:
Pointer to the IRandomizer object.
+ +
+
+ +
+
+ + + + + + + +
virtual scene::ISceneManager* irr::IrrlichtDevice::getSceneManager () [pure virtual]
+
+
+ +

Provides access to the scene manager.

+
Returns:
Pointer to the scene manager.
+ +
+
+ +
+
+ + + + + + + +
virtual ITimer* irr::IrrlichtDevice::getTimer () [pure virtual]
+
+
+ +

Provides access to the engine's timer.

+

The system time can be retrieved by it as well as the virtual time, which also can be manipulated.

+
Returns:
Pointer to the ITimer object.
+ +
+
+ +
+
+ + + + + + + +
virtual E_DEVICE_TYPE irr::IrrlichtDevice::getType () const [pure virtual]
+
+
+ +

Get the type of the device.

+

This allows the user to check which windowing system is currently being used.

+ +
+
+ +
+
+ + + + + + + +
virtual const c8* irr::IrrlichtDevice::getVersion () const [pure virtual]
+
+
+ +

Get the version of the engine.

+

The returned string will look like this: "1.2.3" or this: "1.2".

+
Returns:
String which contains the version.
+ +
+
+ +
+
+ + + + + + + +
virtual video::IVideoDriver* irr::IrrlichtDevice::getVideoDriver () [pure virtual]
+
+
+ +

Provides access to the video driver for drawing 3d and 2d geometry.

+
Returns:
Pointer the video driver.
+ +
+
+ +
+
+ + + + + + + +
virtual video::IVideoModeList* irr::IrrlichtDevice::getVideoModeList () [pure virtual]
+
+
+ +

Gets a list with all video modes available.

+

If you are confused now, because you think you have to create an Irrlicht Device with a video mode before being able to get the video mode list, let me tell you that there is no need to start up an Irrlicht Device with EDT_DIRECT3D8, EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other reasons) the null driver, EDT_NULL exists.

+
Returns:
Pointer to a list with all video modes supported by the gfx adapter.
+ +
+
+ +
+
+ + + + + + + + +
static bool irr::IrrlichtDevice::isDriverSupported (video::E_DRIVER_TYPE driver) [inline, static]
+
+
+ +

Check if a driver type is supported by the engine.

+

Even if true is returned the driver may not be available for a configuration requested when creating the device.

+ +

Definition at line 277 of file IrrlichtDevice.h.

+ +

References irr::video::EDT_BURNINGSVIDEO, irr::video::EDT_DIRECT3D8, irr::video::EDT_DIRECT3D9, irr::video::EDT_NULL, irr::video::EDT_OPENGL, and irr::video::EDT_SOFTWARE.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::IrrlichtDevice::isFullscreen () const [pure virtual]
+
+
+ +

Checks if the Irrlicht window is running in fullscreen mode.

+
Returns:
True if window is fullscreen.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::IrrlichtDevice::isWindowActive () const [pure virtual]
+
+
+ +

Returns if the window is active.

+

If the window is inactive, nothing needs to be drawn. So if you don't want to draw anything when the window is inactive, create your drawing loop this way:

+
        while(device->run())
+        {
+            if (device->isWindowActive())
+            {
+                // draw everything here
+            }
+            else
+                device->yield();
+        }
+
Returns:
True if window is active.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::IrrlichtDevice::isWindowFocused () const [pure virtual]
+
+
+ +

Checks if the Irrlicht window has focus.

+
Returns:
True if window has focus.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::IrrlichtDevice::isWindowMinimized () const [pure virtual]
+
+
+ +

Checks if the Irrlicht window is minimized.

+
Returns:
True if window is minimized.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::IrrlichtDevice::maximizeWindow () [pure virtual]
+
+
+ +

Maximizes the window if possible.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::IrrlichtDevice::minimizeWindow () [pure virtual]
+
+
+ +

Minimizes the window if possible.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::IrrlichtDevice::postEventFromUser (const SEventevent) [pure virtual]
+
+
+ +

Sends a user created event to the engine.

+

Is is usually not necessary to use this. However, if you are using an own input library for example for doing joystick input, you can use this to post key or mouse input events to the engine. Internally, this method only delegates the events further to the scene manager and the GUI environment.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::IrrlichtDevice::restoreWindow () [pure virtual]
+
+
+ +

Restore the window to normal size if possible.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::IrrlichtDevice::run () [pure virtual]
+
+
+ +

Runs the device.

+

Also increments the virtual timer by calling ITimer::tick();. You can prevent this by calling ITimer::stop(); before and ITimer::start() after calling IrrlichtDevice::run(). Returns false if device wants to be deleted. Use it in this way:

+
        while(device->run())
+        {
+            // draw everything here
+        }
+

If you want the device to do nothing if the window is inactive (recommended), use the slightly enhanced code shown at isWindowActive().

+

Note if you are running Irrlicht inside an external, custom created window: Calling Device->run() will cause Irrlicht to dispatch windows messages internally. If you are running Irrlicht in your own custom window, you can also simply use your own message loop using GetMessage, DispatchMessage and whatever and simply don't use this method. But note that Irrlicht will not be able to fetch user input then. See irr::SIrrlichtCreationParameters::WindowId for more informations and example code.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::IrrlichtDevice::setEventReceiver (IEventReceiverreceiver) [pure virtual]
+
+
+ +

Sets a new user event receiver which will receive events from the engine.

+

Return true in IEventReceiver::OnEvent to prevent the event from continuing along the chain of event receivers. The path that an event takes through the system depends on its type. See irr::EEVENT_TYPE for details.

+
Parameters:
+ + +
receiverNew receiver to be used.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::IrrlichtDevice::setGammaRamp (f32 red,
f32 green,
f32 blue,
f32 relativebrightness,
f32 relativecontrast 
) [pure virtual]
+
+
+ +

Set the current Gamma Value for the Display.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::IrrlichtDevice::setInputReceivingSceneManager (scene::ISceneManagersceneManager) [pure virtual]
+
+
+ +

Sets the input receiving scene manager.

+

If set to null, the main scene manager (returned by GetSceneManager()) will receive the input

+
Parameters:
+ + +
sceneManagerNew scene manager to be used.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::IrrlichtDevice::setRandomizer (IRandomizerr) [pure virtual]
+
+
+ +

Sets a new randomizer.

+
Parameters:
+ + +
rPointer to the new IRandomizer object. This object is grab()'ed by the engine and will be released upon the next setRandomizer call or upon device destruction.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::IrrlichtDevice::setResizable (bool resize = false) [pure virtual]
+
+
+ +

Sets if the window should be resizable in windowed mode.

+

The default is false. This method only works in windowed mode.

+
Parameters:
+ + +
resizeFlag whether the window should be resizable.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::IrrlichtDevice::setWindowCaption (const wchar_t * text) [pure virtual]
+
+
+ +

Sets the caption of the window.

+
Parameters:
+ + +
text,:New text of the window caption.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::IrrlichtDevice::sleep (u32 timeMs,
bool pauseTimer = false 
) [pure virtual]
+
+
+ +

Pause execution and let other processes to run for a specified amount of time.

+

It may not wait the full given time, as sleep may be interrupted

+
Parameters:
+ + + +
timeMs,:Time to sleep for in milisecs.
pauseTimer,:If true, pauses the device timer while sleeping
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::IrrlichtDevice::yield () [pure virtual]
+
+
+ +

Cause the device to temporarily pause execution and let other processes run.

+

This should bring down processor usage without major performance loss for Irrlicht

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.png new file mode 100644 index 0000000..fc483a6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_irrlicht_device.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4-members.html new file mode 100644 index 0000000..20b56db --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4-members.html @@ -0,0 +1,210 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::CMatrix4< T > Member List
+
+
+This is the complete list of members for irr::core::CMatrix4< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
buildAxisAlignedBillboard(const core::vector3df &camPos, const core::vector3df &center, const core::vector3df &translation, const core::vector3df &axis, const core::vector3df &from)irr::core::CMatrix4< T > [inline]
buildCameraLookAtMatrixLH(const vector3df &position, const vector3df &target, const vector3df &upVector)irr::core::CMatrix4< T > [inline]
buildCameraLookAtMatrixRH(const vector3df &position, const vector3df &target, const vector3df &upVector)irr::core::CMatrix4< T > [inline]
buildNDCToDCMatrix(const core::rect< s32 > &area, f32 zScale)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixOrthoLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixOrthoRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixPerspectiveFovInfinityLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon=0)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixPerspectiveFovLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixPerspectiveFovRH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixPerspectiveLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)irr::core::CMatrix4< T > [inline]
buildProjectionMatrixPerspectiveRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)irr::core::CMatrix4< T > [inline]
buildRotateFromTo(const core::vector3df &from, const core::vector3df &to)irr::core::CMatrix4< T > [inline]
buildShadowMatrix(const core::vector3df &light, core::plane3df plane, f32 point=1.0f)irr::core::CMatrix4< T > [inline]
buildTextureTransform(f32 rotateRad, const core::vector2df &rotatecenter, const core::vector2df &translate, const core::vector2df &scale)irr::core::CMatrix4< T > [inline]
CMatrix4(eConstructor constructor=EM4CONST_IDENTITY)irr::core::CMatrix4< T > [inline]
CMatrix4(const CMatrix4< T > &other, eConstructor constructor=EM4CONST_COPY)irr::core::CMatrix4< T > [inline]
eConstructor enum nameirr::core::CMatrix4< T >
EM4CONST_COPY enum valueirr::core::CMatrix4< T >
EM4CONST_IDENTITY enum valueirr::core::CMatrix4< T >
EM4CONST_INVERSE enum valueirr::core::CMatrix4< T >
EM4CONST_INVERSE_TRANSPOSED enum valueirr::core::CMatrix4< T >
EM4CONST_NOTHING enum valueirr::core::CMatrix4< T >
EM4CONST_TRANSPOSED enum valueirr::core::CMatrix4< T >
equals(const core::CMatrix4< T > &other, const T tolerance=(T) ROUNDING_ERROR_f64) const irr::core::CMatrix4< T > [inline]
getDefinitelyIdentityMatrix() const irr::core::CMatrix4< T > [inline]
getInverse(CMatrix4< T > &out) const irr::core::CMatrix4< T > [inline]
getInversePrimitive(CMatrix4< T > &out) const irr::core::CMatrix4< T > [inline]
getRotationDegrees() const irr::core::CMatrix4< T > [inline]
getScale() const irr::core::CMatrix4< T > [inline]
getTranslation() const irr::core::CMatrix4< T > [inline]
getTransposed() const irr::core::CMatrix4< T > [inline]
getTransposed(CMatrix4< T > &dest) const irr::core::CMatrix4< T > [inline]
interpolate(const core::CMatrix4< T > &b, f32 time) const irr::core::CMatrix4< T > [inline]
inverseRotateVect(vector3df &vect) const irr::core::CMatrix4< T > [inline]
inverseTranslateVect(vector3df &vect) const irr::core::CMatrix4< T > [inline]
isIdentity() const irr::core::CMatrix4< T > [inline]
isIdentity_integer_base() const irr::core::CMatrix4< T > [inline]
isOrthogonal() const irr::core::CMatrix4< T > [inline]
makeIdentity()irr::core::CMatrix4< T > [inline]
makeInverse()irr::core::CMatrix4< T > [inline]
multiplyWith1x4Matrix(T *matrix) const irr::core::CMatrix4< T > [inline]
operator!=(const CMatrix4< T > &other) const irr::core::CMatrix4< T > [inline]
operator()(const s32 row, const s32 col)irr::core::CMatrix4< T > [inline]
operator()(const s32 row, const s32 col) const irr::core::CMatrix4< T > [inline]
operator*(const CMatrix4< T > &other) const irr::core::CMatrix4< T > [inline]
operator*(const T &scalar) const irr::core::CMatrix4< T > [inline]
operator*=(const CMatrix4< T > &other)irr::core::CMatrix4< T > [inline]
operator*=(const T &scalar)irr::core::CMatrix4< T > [inline]
operator+(const CMatrix4< T > &other) const irr::core::CMatrix4< T > [inline]
operator+=(const CMatrix4< T > &other)irr::core::CMatrix4< T > [inline]
operator-(const CMatrix4< T > &other) const irr::core::CMatrix4< T > [inline]
operator-=(const CMatrix4< T > &other)irr::core::CMatrix4< T > [inline]
operator=(const CMatrix4< T > &other)irr::core::CMatrix4< T > [inline]
operator=(const T &scalar)irr::core::CMatrix4< T > [inline]
operator==(const CMatrix4< T > &other) const irr::core::CMatrix4< T > [inline]
operator[](u32 index)irr::core::CMatrix4< T > [inline]
operator[](u32 index) const irr::core::CMatrix4< T > [inline]
pointer() const irr::core::CMatrix4< T > [inline]
pointer()irr::core::CMatrix4< T > [inline]
rotateVect(vector3df &vect) const irr::core::CMatrix4< T > [inline]
rotateVect(core::vector3df &out, const core::vector3df &in) const irr::core::CMatrix4< T > [inline]
rotateVect(T *out, const core::vector3df &in) const irr::core::CMatrix4< T > [inline]
setbyproduct(const CMatrix4< T > &other_a, const CMatrix4< T > &other_b)irr::core::CMatrix4< T > [inline]
setbyproduct_nocheck(const CMatrix4< T > &other_a, const CMatrix4< T > &other_b)irr::core::CMatrix4< T > [inline]
setDefinitelyIdentityMatrix(bool isDefinitelyIdentityMatrix)irr::core::CMatrix4< T > [inline]
setInverseRotationDegrees(const vector3d< T > &rotation)irr::core::CMatrix4< T > [inline]
setInverseRotationRadians(const vector3d< T > &rotation)irr::core::CMatrix4< T > [inline]
setInverseTranslation(const vector3d< T > &translation)irr::core::CMatrix4< T > [inline]
setM(const T *data)irr::core::CMatrix4< T > [inline]
setRotationAxisRadians(const T &angle, const vector3d< T > &axis)irr::core::CMatrix4< T > [inline]
setRotationCenter(const core::vector3df &center, const core::vector3df &translate)irr::core::CMatrix4< T > [inline]
setRotationDegrees(const vector3d< T > &rotation)irr::core::CMatrix4< T > [inline]
setRotationRadians(const vector3d< T > &rotation)irr::core::CMatrix4< T > [inline]
setScale(const vector3d< T > &scale)irr::core::CMatrix4< T > [inline]
setScale(const T scale)irr::core::CMatrix4< T > [inline]
setTextureRotationCenter(f32 radAngle)irr::core::CMatrix4< T > [inline]
setTextureScale(f32 sx, f32 sy)irr::core::CMatrix4< T > [inline]
setTextureScaleCenter(f32 sx, f32 sy)irr::core::CMatrix4< T > [inline]
setTextureTranslate(f32 x, f32 y)irr::core::CMatrix4< T > [inline]
setTextureTranslateTransposed(f32 x, f32 y)irr::core::CMatrix4< T > [inline]
setTranslation(const vector3d< T > &translation)irr::core::CMatrix4< T > [inline]
transformBox(core::aabbox3d< f32 > &box) const irr::core::CMatrix4< T > [inline]
transformBoxEx(core::aabbox3d< f32 > &box) const irr::core::CMatrix4< T > [inline]
transformPlane(core::plane3d< f32 > &plane) const irr::core::CMatrix4< T > [inline]
transformPlane(const core::plane3d< f32 > &in, core::plane3d< f32 > &out) const irr::core::CMatrix4< T > [inline]
transformVec3(T *out, const T *in) const irr::core::CMatrix4< T > [inline]
transformVect(vector3df &vect) const irr::core::CMatrix4< T > [inline]
transformVect(vector3df &out, const vector3df &in) const irr::core::CMatrix4< T > [inline]
transformVect(T *out, const core::vector3df &in) const irr::core::CMatrix4< T > [inline]
translateVect(vector3df &vect) const irr::core::CMatrix4< T > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4.html new file mode 100644 index 0000000..9875ee4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1_c_matrix4.html @@ -0,0 +1,2908 @@ + + + + +Irrlicht 3D Engine: irr::core::CMatrix4< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::CMatrix4< T > Class Template Reference
+
+
+ +

4x4 matrix. Mostly used as transformation matrix for 3d calculations. + More...

+ +

#include <matrix4.h>

+ +

List of all members.

+

+Public Types

+ +

+Public Member Functions

+ +

Detailed Description

+

template<class T>
+class irr::core::CMatrix4< T >

+ +

4x4 matrix. Mostly used as transformation matrix for 3d calculations.

+

The matrix is a D3D style matrix, row major with translations in the 4th row.

+ +

Definition at line 45 of file matrix4.h.

+

Member Enumeration Documentation

+ +
+
+
+template<class T>
+ + + + +
enum irr::core::CMatrix4::eConstructor
+
+
+ +

Constructor Flags.

+
Enumerator:
+ + + + + + +
EM4CONST_NOTHING  +
EM4CONST_COPY  +
EM4CONST_IDENTITY  +
EM4CONST_TRANSPOSED  +
EM4CONST_INVERSE  +
EM4CONST_INVERSE_TRANSPOSED  +
+
+
+ +

Definition at line 50 of file matrix4.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<class T >
+ + + + + + + + +
irr::core::CMatrix4< T >::CMatrix4 (eConstructor constructor = EM4CONST_IDENTITY) [inline]
+
+
+ +

Default constructor.

+
Parameters:
+ + +
constructorChoose the initialization style
+
+
+ +

Definition at line 417 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
irr::core::CMatrix4< T >::CMatrix4 (const CMatrix4< T > & other,
eConstructor constructor = EM4CONST_COPY 
) [inline]
+
+
+ +

Copy constructor.

+
Parameters:
+ + + +
otherOther matrix to copy from
constructorChoose the initialization style
+
+
+ +

Definition at line 440 of file matrix4.h.

+ +

References irr::core::CMatrix4< T >::getInverse(), and irr::core::CMatrix4< T >::getTransposed().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::buildAxisAlignedBillboard (const core::vector3dfcamPos,
const core::vector3dfcenter,
const core::vector3dftranslation,
const core::vector3dfaxis,
const core::vector3dffrom 
) [inline]
+
+
+ +

Builds a matrix which rotates a source vector to a look vector over an arbitrary axis.

+
Parameters:
+ + + + + + + + + + + +
camPos,:viewer position in world coo
center,:object position in world-coo and rotation pivot
translation,:object final translation from center
axis,:axis to rotate about
from,:source vector to rotate from
camPos,:viewer position in world coord
center,:object position in world-coord, rotation pivot
translation,:object final translation from center
axis,:axis to rotate about
from,:source vector to rotate from
+
+
+ +

Definition at line 1990 of file matrix4.h.

+ +

References irr::core::vector3d< T >::crossProduct(), irr::core::vector3d< T >::dotProduct(), irr::core::vector3d< T >::normalize(), irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildCameraLookAtMatrixLH (const vector3dfposition,
const vector3dftarget,
const vector3dfupVector 
) [inline]
+
+ +
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildCameraLookAtMatrixRH (const vector3dfposition,
const vector3dftarget,
const vector3dfupVector 
) [inline]
+
+ +
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildNDCToDCMatrix (const core::rect< s32 > & area,
f32 zScale 
) [inline]
+
+
+ +

Builds a matrix which transforms a normalized Device Coordinate to Device Coordinates.

+

Used to scale <-1,-1><1,1> to viewport, for example from <-1,-1> <1,1> to the viewport <0,0><0,640>

+ +

Definition at line 1913 of file matrix4.h.

+ +

References irr::core::rect< T >::getHeight(), irr::core::rect< T >::getWidth(), irr::core::rect< T >::LowerRightCorner, and irr::core::rect< T >::UpperLeftCorner.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixOrthoLH (f32 widthOfViewVolume,
f32 heightOfViewVolume,
f32 zNear,
f32 zFar 
) [inline]
+
+
+ +

Builds a left-handed orthogonal projection matrix.

+ +

Definition at line 1604 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixOrthoRH (f32 widthOfViewVolume,
f32 heightOfViewVolume,
f32 zNear,
f32 zFar 
) [inline]
+
+
+ +

Builds a right-handed orthogonal projection matrix.

+ +

Definition at line 1639 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixPerspectiveFovInfinityLH (f32 fieldOfViewRadians,
f32 aspectRatio,
f32 zNear,
f32 epsilon = 0 
) [inline]
+
+
+ +

Builds a left-handed perspective projection matrix based on a field of view, with far plane at infinity.

+ +

Definition at line 1568 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF, and irr::core::reciprocal().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixPerspectiveFovLH (f32 fieldOfViewRadians,
f32 aspectRatio,
f32 zNear,
f32 zFar 
) [inline]
+
+
+ +

Builds a left-handed perspective projection matrix based on a field of view.

+ +

Definition at line 1531 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF, and irr::core::reciprocal().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixPerspectiveFovRH (f32 fieldOfViewRadians,
f32 aspectRatio,
f32 zNear,
f32 zFar 
) [inline]
+
+
+ +

Builds a right-handed perspective projection matrix based on a field of view.

+ +

Definition at line 1492 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF, and irr::core::reciprocal().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixPerspectiveLH (f32 widthOfViewVolume,
f32 heightOfViewVolume,
f32 zNear,
f32 zFar 
) [inline]
+
+
+ +

Builds a left-handed perspective projection matrix.

+ +

Definition at line 1709 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildProjectionMatrixPerspectiveRH (f32 widthOfViewVolume,
f32 heightOfViewVolume,
f32 zNear,
f32 zFar 
) [inline]
+
+
+ +

Builds a right-handed perspective projection matrix.

+ +

Definition at line 1674 of file matrix4.h.

+ +

References _IRR_DEBUG_BREAK_IF.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildRotateFromTo (const core::vector3dffrom,
const core::vector3dfto 
) [inline]
+
+
+ +

Builds a matrix that rotates from one vector to another.

+
Parameters:
+ + + + + +
from,:vector to rotate from
to,:vector to rotate to
from,:vector to rotate from
to,:vector to rotate to
+
+
+

http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm

+ +

Definition at line 1934 of file matrix4.h.

+ +

References irr::core::vector3d< T >::crossProduct(), irr::core::vector3d< T >::dotProduct(), irr::core::vector3d< T >::normalize(), irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildShadowMatrix (const core::vector3dflight,
core::plane3df plane,
f32 point = 1.0f 
) [inline]
+
+
+ +

Builds a matrix that flattens geometry into a plane.

+
Parameters:
+ + + + +
light,:light source
plane,:plane into which the geometry if flattened into
point,:value between 0 and 1, describing the light source. If this is 1, it is a point light, if it is 0, it is a directional light.
+
+
+ +

Definition at line 1743 of file matrix4.h.

+ +

References irr::core::plane3d< T >::D, irr::core::vector3d< T >::dotProduct(), irr::core::plane3d< T >::Normal, irr::core::vector3d< T >::normalize(), irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::buildTextureTransform (f32 rotateRad,
const core::vector2dfrotatecenter,
const core::vector2dftranslate,
const core::vector2dfscale 
) [inline]
+
+
+ +

Set to a texture transformation matrix with the given parameters.

+

Generate texture coordinates as linear functions so that: u = Ux*x + Uy*y + Uz*z + Uw v = Vx*x + Vy*y + Vz*z + Vw The matrix M for this case is: Ux Vx 0 0 Uy Vy 0 0 Uz Vz 0 0 Uw Vw 0 0

+ +

Definition at line 2065 of file matrix4.h.

+ +

References irr::core::vector2d< T >::X, and irr::core::vector2d< T >::Y.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
bool irr::core::CMatrix4< T >::equals (const core::CMatrix4< T > & other,
const T tolerance = (T)ROUNDING_ERROR_f64 
) const [inline]
+
+
+ +

Compare two matrices using the equal method.

+ +

Definition at line 2210 of file matrix4.h.

+ +

References irr::core::equals().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
bool irr::core::CMatrix4< T >::getDefinitelyIdentityMatrix () const [inline]
+
+
+ +

Gets if the matrix is definitely identity matrix.

+ +

Definition at line 2198 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
bool irr::core::CMatrix4< T >::getInverse (CMatrix4< T > & out) const [inline]
+
+
+ +

Gets the inversed matrix of this one.

+
Parameters:
+ + +
out,:where result matrix is written to.
+
+
+
Returns:
Returns false if there is no inverse matrix.
+

Calculates the inverse of this Matrix The inverse is calculated using Cramers rule. If no inverse exists then 'false' is returned.

+ +

Definition at line 1307 of file matrix4.h.

+ +

References FLT_MIN, irr::core::iszero(), and irr::core::reciprocal().

+ +

Referenced by irr::core::CMatrix4< T >::CMatrix4().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
bool irr::core::CMatrix4< T >::getInversePrimitive (CMatrix4< T > & out) const [inline]
+
+
+ +

Inverts a primitive matrix which only contains a translation and a rotation.

+
Parameters:
+ + +
out,:where result matrix is written to.
+
+
+

Inverts a primitive matrix which only contains a translation and a rotation

+
Parameters:
+ + +
out,:where result matrix is written to.
+
+
+ +

Definition at line 1393 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
core::vector3d< T > irr::core::CMatrix4< T >::getRotationDegrees () const [inline]
+
+
+ +

Returns the rotation, as set by setRotation().

+

Returns a rotation that is equivalent to that set by setRotationDegrees().

+

This code was orginally written by by Chev.

+

This code was sent in by Chev. Note that it does not necessarily return the *same* Euler angles as those set by setRotationDegrees(), but the rotation will be equivalent, i.e. will have the same result when used to rotate a vector or node.

+ +

Definition at line 860 of file matrix4.h.

+ +

References irr::core::clamp(), irr::core::iszero(), irr::core::RADTODEG64, irr::core::reciprocal(), irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
vector3d< T > irr::core::CMatrix4< T >::getScale () const [inline]
+
+
+ +

Get Scale.

+

Returns the absolute values of the scales of the matrix.

+

Note that this returns the absolute (positive) values unless only scale is set. Unfortunately it does not appear to be possible to extract any original negative values. The best that we could do would be to arbitrarily make one scale negative if one or three of them were negative. FIXME - return the original values.

+ +

Definition at line 795 of file matrix4.h.

+ +

References irr::core::iszero().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
vector3d< T > irr::core::CMatrix4< T >::getTranslation () const [inline]
+
+
+ +

Gets the current translation.

+ +

Definition at line 744 of file matrix4.h.

+ +

Referenced by irr::scene::ISceneNode::getAbsolutePosition().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
CMatrix4< T > irr::core::CMatrix4< T >::getTransposed () const [inline]
+
+
+ +

Gets transposed matrix.

+ +

Definition at line 1874 of file matrix4.h.

+ +

Referenced by irr::core::CMatrix4< T >::CMatrix4().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::getTransposed (CMatrix4< T > & dest) const [inline]
+
+
+ +

Gets transposed matrix.

+ +

Definition at line 1884 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > irr::core::CMatrix4< T >::interpolate (const core::CMatrix4< T > & b,
f32 time 
) const [inline]
+
+
+ +

Creates a new matrix as interpolated matrix from two other ones.

+
Parameters:
+ + + +
b,:other matrix to interpolate with
time,:Must be a value between 0 and 1.
+
+
+ +

Definition at line 1857 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::inverseRotateVect (vector3dfvect) const [inline]
+
+
+ +

Rotate a vector by the inverse of the rotation part of this matrix.

+ +

Definition at line 1128 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::inverseTranslateVect (vector3dfvect) const [inline]
+
+
+ +

Translate a vector by the inverse of the translation part of this matrix.

+ +

Definition at line 1290 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
bool irr::core::CMatrix4< T >::isIdentity () const [inline]
+
+
+ +

Returns true if the matrix is the identity matrix.

+ +

Definition at line 1000 of file matrix4.h.

+ +

References irr::core::equals().

+ +

Referenced by irr::core::CMatrix4< T >::operator*(), irr::core::CMatrix4< T >::operator*=(), and irr::core::CMatrix4< T >::setbyproduct().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
bool irr::core::CMatrix4< T >::isIdentity_integer_base () const [inline]
+
+
+ +

Returns true if the matrix is the identity matrix.

+ +

Definition at line 1067 of file matrix4.h.

+ +

References F32_VALUE_1, and irr::core::IR().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
bool irr::core::CMatrix4< T >::isOrthogonal () const [inline]
+
+
+ +

Returns true if the matrix is orthogonal.

+ +

Definition at line 1038 of file matrix4.h.

+ +

References irr::core::iszero().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::makeIdentity () [inline]
+
+
+ +

Set matrix to identity.

+ +

Definition at line 984 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
bool irr::core::CMatrix4< T >::makeInverse () [inline]
+
+
+ +

Calculates inverse of matrix. Slow.

+
Returns:
Returns false if there is no inverse matrix.
+ +

Definition at line 1424 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::multiplyWith1x4Matrix (T * matrix) const [inline]
+
+
+ +

Multiplies this matrix by a 1x4 matrix.

+ +

Definition at line 1268 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
bool irr::core::CMatrix4< T >::operator!= (const CMatrix4< T > & other) const [inline]
+
+
+ +

Returns true if other matrix is not equal to this matrix.

+ +

Definition at line 1484 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
T& irr::core::CMatrix4< T >::operator() (const s32 row,
const s32 col 
) [inline]
+
+
+ +

Simple operator for directly accessing every element of the matrix.

+ +

Definition at line 69 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
const T& irr::core::CMatrix4< T >::operator() (const s32 row,
const s32 col 
) const [inline]
+
+
+ +

Simple operator for directly accessing every element of the matrix.

+ +

Definition at line 78 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > irr::core::CMatrix4< T >::operator* (const CMatrix4< T > & other) const [inline]
+
+
+ +

Multiply by another matrix.

+

multiply by another matrix

+

Calculate other*this

+ +

Definition at line 705 of file matrix4.h.

+ +

References irr::core::CMatrix4< T >::isIdentity().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > irr::core::CMatrix4< T >::operator* (const T & scalar) const [inline]
+
+
+ +

Multiply by scalar.

+ +

Definition at line 576 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::operator*= (const CMatrix4< T > & other) [inline]
+
+
+ +

Multiply by another matrix.

+

Calculate and return other*this

+ +

Definition at line 626 of file matrix4.h.

+ +

References irr::core::CMatrix4< T >::isIdentity().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::operator*= (const T & scalar) [inline]
+
+
+ +

Multiply by scalar.

+ +

Definition at line 602 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > irr::core::CMatrix4< T >::operator+ (const CMatrix4< T > & other) const [inline]
+
+
+ +

Add another matrix.

+ +

Definition at line 476 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::operator+= (const CMatrix4< T > & other) [inline]
+
+
+ +

Add another matrix.

+ +

Definition at line 502 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > irr::core::CMatrix4< T >::operator- (const CMatrix4< T > & other) const [inline]
+
+
+ +

Subtract another matrix.

+ +

Definition at line 526 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::operator-= (const CMatrix4< T > & other) [inline]
+
+
+ +

Subtract another matrix.

+ +

Definition at line 552 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::operator= (const CMatrix4< T > & other) [inline]
+
+
+ +

Sets this matrix equal to the other matrix.

+ +

Definition at line 1443 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::operator= (const T & scalar) [inline]
+
+
+ +

Sets all elements of this matrix to the value.

+ +

Definition at line 1456 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
bool irr::core::CMatrix4< T >::operator== (const CMatrix4< T > & other) const [inline]
+
+
+ +

Returns true if other matrix is equal to this matrix.

+ +

Definition at line 1469 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T& irr::core::CMatrix4< T >::operator[] (u32 index) [inline]
+
+
+ +

Simple operator for linearly accessing every element of the matrix.

+ +

Definition at line 81 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
const T& irr::core::CMatrix4< T >::operator[] (u32 index) const [inline]
+
+
+ +

Simple operator for linearly accessing every element of the matrix.

+ +

Definition at line 90 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
const T* irr::core::CMatrix4< T >::pointer () const [inline]
+
+
+ +

Returns pointer to internal array.

+ +

Definition at line 99 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T* irr::core::CMatrix4< T >::pointer () [inline]
+
+
+ +

Definition at line 100 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::rotateVect (vector3dfvect) const [inline]
+
+
+ +

Rotate a vector by the rotation part of this matrix.

+ +

Definition at line 1101 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::rotateVect (core::vector3dfout,
const core::vector3dfin 
) const [inline]
+
+
+ +

An alternate transform vector method, writing into a second vector.

+ +

Definition at line 1111 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::rotateVect (T * out,
const core::vector3dfin 
) const [inline]
+
+
+ +

An alternate transform vector method, writing into an array of 3 floats.

+ +

Definition at line 1120 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setbyproduct (const CMatrix4< T > & other_a,
const CMatrix4< T > & other_b 
) [inline]
+
+
+ +

set this matrix to the product of two matrices

+

multiply by another matrix

+

Calculate b*a

+ +

Definition at line 688 of file matrix4.h.

+ +

References irr::core::CMatrix4< T >::isIdentity().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setbyproduct_nocheck (const CMatrix4< T > & other_a,
const CMatrix4< T > & other_b 
) [inline]
+
+
+ +

Set this matrix to the product of two matrices.

+

multiply by another matrix

+

Calculate b*a, no optimization used, use it if you know you never have a identity matrix

+ +

Definition at line 653 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::setDefinitelyIdentityMatrix (bool isDefinitelyIdentityMatrix) [inline]
+
+
+ +

Sets if the matrix is definitely identity matrix.

+ +

Definition at line 2188 of file matrix4.h.

+ +

Referenced by irr::core::quaternion::getMatrix(), and irr::core::quaternion::getMatrix_transposed().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setInverseRotationDegrees (const vector3d< T > & rotation) [inline]
+
+
+ +

Make an inverted rotation matrix from Euler angles.

+

The 4th row and column are unmodified.

+ +

Definition at line 819 of file matrix4.h.

+ +

References irr::core::DEGTORAD.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setInverseRotationRadians (const vector3d< T > & rotation) [inline]
+
+
+ +

Make an inverted rotation matrix from Euler angles.

+

Sets matrix to rotation matrix of inverse angles given as parameters.

+

The 4th row and column are unmodified.

+ +

Definition at line 917 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setInverseTranslation (const vector3d< T > & translation) [inline]
+
+
+ +

Set the inverse translation of the current matrix. Will erase any previous values.

+ +

Definition at line 763 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setM (const T * data) [inline]
+
+
+ +

Sets all matrix data members at once.

+ +

Definition at line 2175 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setRotationAxisRadians (const T & angle,
const vector3d< T > & axis 
) [inline]
+
+
+ +

Make a rotation matrix from angle and axis, assuming left handed rotation.

+

Sets matrix to rotation matrix defined by axis and angle, assuming LH rotation.

+

The 4th row and column are unmodified.

+ +

Definition at line 948 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::setRotationCenter (const core::vector3dfcenter,
const core::vector3dftranslate 
) [inline]
+
+
+ +

Builds a combined matrix which translates to a center before rotation and translates from origin afterwards.

+

Builds a combined matrix which translate to a center before rotation and translate afterwards.

+
Parameters:
+ + + +
centerPosition to rotate around
translateTranslation applied after the rotation
+
+
+ +

Definition at line 2041 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +

Referenced by irr::core::quaternion::getMatrixCenter().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setRotationDegrees (const vector3d< T > & rotation) [inline]
+
+
+ +

Make a rotation matrix from Euler angles. The 4th row and column are unmodified.

+ +

Definition at line 813 of file matrix4.h.

+ +

References irr::core::DEGTORAD.

+ +

Referenced by irr::scene::ISceneNode::getRelativeTransformation().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setRotationRadians (const vector3d< T > & rotation) [inline]
+
+
+ +

Make a rotation matrix from Euler angles. The 4th row and column are unmodified.

+ +

Definition at line 825 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setScale (const vector3d< T > & scale) [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
CMatrix4<T>& irr::core::CMatrix4< T >::setScale (const T scale) [inline]
+
+
+ +

Set Scale.

+ +

Definition at line 196 of file matrix4.h.

+ +

References irr::core::CMatrix4< T >::setScale().

+ +

Referenced by irr::core::CMatrix4< T >::setScale().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setTextureRotationCenter (f32 radAngle) [inline]
+
+
+ +

Set texture transformation rotation.

+

Rotate about z axis, recenter at (0.5,0.5). Doesn't clear other elements than those affected

+
Parameters:
+ + +
radAngleAngle in radians
+
+
+
Returns:
Altered matrix
+ +

Definition at line 2101 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setTextureScale (f32 sx,
f32 sy 
) [inline]
+
+
+ +

Set texture transformation scale.

+

Doesn't clear other elements than those affected.

+
Parameters:
+ + + +
sxScale factor on x axis
syScale factor on y axis
+
+
+
Returns:
Altered matrix.
+ +

Definition at line 2147 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setTextureScaleCenter (f32 sx,
f32 sy 
) [inline]
+
+
+ +

Set texture transformation scale, and recenter at (0.5,0.5)

+

Doesn't clear other elements than those affected.

+
Parameters:
+ + + +
sxScale factor on x axis
syScale factor on y axis
+
+
+
Returns:
Altered matrix.
+ +

Definition at line 2159 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setTextureTranslate (f32 x,
f32 y 
) [inline]
+
+
+ +

Set texture transformation translation.

+

Doesn't clear other elements than those affected.

+
Parameters:
+ + + +
xOffset on x axis
yOffset on y axis
+
+
+
Returns:
Altered matrix
+ +

Definition at line 2122 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setTextureTranslateTransposed (f32 x,
f32 y 
) [inline]
+
+
+ +

Set texture transformation translation, using a transposed representation.

+

Doesn't clear other elements than those affected.

+
Parameters:
+ + + +
xOffset on x axis
yOffset on y axis
+
+
+
Returns:
Altered matrix
+ +

Definition at line 2135 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
CMatrix4< T > & irr::core::CMatrix4< T >::setTranslation (const vector3d< T > & translation) [inline]
+
+
+ +

Set the translation of the current matrix. Will erase any previous values.

+ +

Definition at line 751 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +

Referenced by irr::scene::ISceneNode::getRelativeTransformation().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::transformBox (core::aabbox3d< f32 > & box) const [inline]
+
+
+ +

Transforms a axis aligned bounding box.

+

The result box of this operation may not be accurate at all. For correct results, use transformBoxEx()

+ +

Definition at line 1203 of file matrix4.h.

+ +

References irr::core::aabbox3d< T >::MaxEdge, irr::core::aabbox3d< T >::MinEdge, and irr::core::aabbox3d< T >::repair().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::transformBoxEx (core::aabbox3d< f32 > & box) const [inline]
+
+
+ +

Transforms a axis aligned bounding box.

+

Transforms a axis aligned bounding box more accurately than transformBox()

+

The result box of this operation should by accurate, but this operation is slower than transformBox().

+ +

Definition at line 1217 of file matrix4.h.

+ +

References irr::core::aabbox3d< T >::MaxEdge, irr::core::aabbox3d< T >::MinEdge, irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +

Referenced by irr::scene::ISceneNode::getTransformedBoundingBox().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::transformPlane (core::plane3d< f32 > & plane) const [inline]
+
+
+ +

Transforms a plane by this matrix.

+ +

Definition at line 1179 of file matrix4.h.

+ +

References irr::core::plane3d< T >::getMemberPoint(), irr::core::plane3d< T >::Normal, and irr::core::plane3d< T >::setPlane().

+ +

Referenced by irr::scene::SViewFrustum::transform().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::transformPlane (const core::plane3d< f32 > & in,
core::plane3d< f32 > & out 
) const [inline]
+
+
+ +

Transforms a plane by this matrix.

+ +

Definition at line 1195 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::transformVec3 (T * out,
const T * in 
) const [inline]
+
+
+ +

An alternate transform vector method, reading from and writing to an array of 3 floats.

+ +

Definition at line 1169 of file matrix4.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::transformVect (vector3dfvect) const [inline]
+
+ +
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::transformVect (vector3dfout,
const vector3dfin 
) const [inline]
+
+
+ +

Transforms input vector by this matrix and stores result in output vector.

+ +

Definition at line 1151 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::CMatrix4< T >::transformVect (T * out,
const core::vector3dfin 
) const [inline]
+
+
+ +

An alternate transform vector method, writing into an array of 4 floats.

+ +

Definition at line 1160 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
void irr::core::CMatrix4< T >::translateVect (vector3dfvect) const [inline]
+
+
+ +

Translate a vector by the translation part of this matrix.

+ +

Definition at line 1298 of file matrix4.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d-members.html new file mode 100644 index 0000000..0a958f5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d-members.html @@ -0,0 +1,149 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::aabbox3d< T > Member List
+
+
+This is the complete list of members for irr::core::aabbox3d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
aabbox3d()irr::core::aabbox3d< T > [inline]
aabbox3d(const vector3d< T > &min, const vector3d< T > &max)irr::core::aabbox3d< T > [inline]
aabbox3d(const vector3d< T > &init)irr::core::aabbox3d< T > [inline]
aabbox3d(T minx, T miny, T minz, T maxx, T maxy, T maxz)irr::core::aabbox3d< T > [inline]
addInternalBox(const aabbox3d< T > &b)irr::core::aabbox3d< T > [inline]
addInternalPoint(const vector3d< T > &p)irr::core::aabbox3d< T > [inline]
addInternalPoint(T x, T y, T z)irr::core::aabbox3d< T > [inline]
classifyPlaneRelation(const plane3d< T > &plane) const irr::core::aabbox3d< T > [inline]
getArea() const irr::core::aabbox3d< T > [inline]
getCenter() const irr::core::aabbox3d< T > [inline]
getEdges(vector3d< T > *edges) const irr::core::aabbox3d< T > [inline]
getExtent() const irr::core::aabbox3d< T > [inline]
getInterpolated(const aabbox3d< T > &other, f32 d) const irr::core::aabbox3d< T > [inline]
getVolume() const irr::core::aabbox3d< T > [inline]
intersectsWithBox(const aabbox3d< T > &other) const irr::core::aabbox3d< T > [inline]
intersectsWithLine(const line3d< T > &line) const irr::core::aabbox3d< T > [inline]
intersectsWithLine(const vector3d< T > &linemiddle, const vector3d< T > &linevect, T halflength) const irr::core::aabbox3d< T > [inline]
isEmpty() const irr::core::aabbox3d< T > [inline]
isFullInside(const aabbox3d< T > &other) const irr::core::aabbox3d< T > [inline]
isPointInside(const vector3d< T > &p) const irr::core::aabbox3d< T > [inline]
isPointTotalInside(const vector3d< T > &p) const irr::core::aabbox3d< T > [inline]
MaxEdgeirr::core::aabbox3d< T >
MinEdgeirr::core::aabbox3d< T >
operator!=(const aabbox3d< T > &other) const irr::core::aabbox3d< T > [inline]
operator==(const aabbox3d< T > &other) const irr::core::aabbox3d< T > [inline]
repair()irr::core::aabbox3d< T > [inline]
reset(T x, T y, T z)irr::core::aabbox3d< T > [inline]
reset(const aabbox3d< T > &initValue)irr::core::aabbox3d< T > [inline]
reset(const vector3d< T > &initValue)irr::core::aabbox3d< T > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d.html new file mode 100644 index 0000000..e0cbca7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1aabbox3d.html @@ -0,0 +1,1087 @@ + + + + +Irrlicht 3D Engine: irr::core::aabbox3d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::aabbox3d< T > Class Template Reference
+
+
+ +

Axis aligned bounding box in 3d dimensional space. + More...

+ +

#include <aabbox3d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

template<class T>
+class irr::core::aabbox3d< T >

+ +

Axis aligned bounding box in 3d dimensional space.

+

Has some useful methods used with occlusion culling or clipping.

+ +

Definition at line 21 of file aabbox3d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::aabbox3d< T >::aabbox3d () [inline]
+
+
+ +

Default Constructor.

+ +

Definition at line 26 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::aabbox3d< T >::aabbox3d (const vector3d< T > & min,
const vector3d< T > & max 
) [inline]
+
+
+ +

Constructor with min edge and max edge.

+ +

Definition at line 28 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::aabbox3d< T >::aabbox3d (const vector3d< T > & init) [inline]
+
+
+ +

Constructor with only one point.

+ +

Definition at line 30 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::aabbox3d< T >::aabbox3d (minx,
miny,
minz,
maxx,
maxy,
maxz 
) [inline]
+
+
+ +

Constructor with min edge and max edge as single values, not vectors.

+ +

Definition at line 32 of file aabbox3d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::aabbox3d< T >::addInternalBox (const aabbox3d< T > & b) [inline]
+
+
+ +

Adds another bounding box.

+

The box grows bigger, if the new box was outside of the box.

+
Parameters:
+ + +
b,:Other bounding box to add into this box.
+
+
+ +

Definition at line 82 of file aabbox3d.h.

+ +

Referenced by irr::scene::IMeshManipulator::apply(), irr::scene::SMesh::recalculateBoundingBox(), and irr::scene::SAnimatedMesh::recalculateBoundingBox().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::aabbox3d< T >::addInternalPoint (const vector3d< T > & p) [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::aabbox3d< T >::addInternalPoint (x,
y,
z 
) [inline]
+
+
+ +

Adds a point to the bounding box.

+

The box grows bigger, if point is outside of the box.

+
Parameters:
+ + + + +
xX coordinate of the point to add to this box.
yY coordinate of the point to add to this box.
zZ coordinate of the point to add to this box.
+
+
+ +

Definition at line 93 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
EIntersectionRelation3D irr::core::aabbox3d< T >::classifyPlaneRelation (const plane3d< T > & plane) const [inline]
+
+
+ +

Classifies a relation with a plane.

+
Parameters:
+ + +
planePlane to classify relation to.
+
+
+
Returns:
Returns ISREL3D_FRONT if the box is in front of the plane, ISREL3D_BACK if the box is behind the plane, and ISREL3D_CLIPPED if it is on both sides of the plane.
+ +

Definition at line 284 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::aabbox3d< T >::getArea () const [inline]
+
+
+ +

Get the surface area of the box in squared units.

+ +

Definition at line 134 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::aabbox3d< T >::getCenter () const [inline]
+
+
+ +

Get center of the bounding box.

+
Returns:
Center of the bounding box.
+ +

Definition at line 106 of file aabbox3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::getEdges(), and irr::core::aabbox3d< f32 >::intersectsWithLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::aabbox3d< T >::getEdges (vector3d< T > * edges) const [inline]
+
+
+ +

Stores all 8 edges of the box into an array.

+
Parameters:
+ + +
edges,:Pointer to array of 8 edges.
+
+
+ +

Definition at line 142 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::aabbox3d< T >::getExtent () const [inline]
+
+
+ +

Get extent of the box (maximal distance of two points in the box)

+
Returns:
Extent of the bounding box.
+ +

Definition at line 113 of file aabbox3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::getArea(), irr::core::aabbox3d< f32 >::getVolume(), and irr::core::aabbox3d< f32 >::intersectsWithLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
aabbox3d<T> irr::core::aabbox3d< T >::getInterpolated (const aabbox3d< T > & other,
f32 d 
) const [inline]
+
+
+ +

Calculates a new interpolated bounding box.

+

d=0 returns other, d=1 returns this, all other values blend between the two boxes.

+
Parameters:
+ + + +
otherOther box to interpolate between
dValue between 0.0f and 1.0f.
+
+
+
Returns:
Interpolated box.
+ +

Definition at line 190 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::aabbox3d< T >::getVolume () const [inline]
+
+
+ +

Get the volume enclosed by the box in cubed units.

+ +

Definition at line 127 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::intersectsWithBox (const aabbox3d< T > & other) const [inline]
+
+
+ +

Determines if the axis-aligned box intersects with another axis-aligned box.

+
Parameters:
+ + +
other,:Other box to check a intersection with.
+
+
+
Returns:
True if there is an intersection with the other box, otherwise false.
+ +

Definition at line 233 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::intersectsWithLine (const line3d< T > & line) const [inline]
+
+
+ +

Tests if the box intersects with a line.

+
Parameters:
+ + +
line,:Line to test intersection with.
+
+
+
Returns:
True if there is an intersection , else false.
+ +

Definition at line 242 of file aabbox3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::intersectsWithLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::aabbox3d< T >::intersectsWithLine (const vector3d< T > & linemiddle,
const vector3d< T > & linevect,
halflength 
) const [inline]
+
+
+ +

Tests if the box intersects with a line.

+
Parameters:
+ + + + +
linemiddleCenter of the line.
linevectVector of the line.
halflengthHalf length of the line.
+
+
+
Returns:
True if there is an intersection, else false.
+ +

Definition at line 253 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
bool irr::core::aabbox3d< T >::isEmpty () const [inline]
+
+
+ +

Check if the box is empty.

+

This means that there is no space between the min and max edge.

+
Returns:
True if box is empty, else false.
+ +

Definition at line 121 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::isFullInside (const aabbox3d< T > & other) const [inline]
+
+
+ +

Check if this box is completely inside the 'other' box.

+
Parameters:
+ + +
other,:Other box to check against.
+
+
+
Returns:
True if this box is completly inside the other box, otherwise false.
+ +

Definition at line 223 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::isPointInside (const vector3d< T > & p) const [inline]
+
+
+ +

Determines if a point is within this box.

+

Border is included (IS part of the box)!

+
Parameters:
+ + +
p,:Point to check.
+
+
+
Returns:
True if the point is within the box and false if not
+ +

Definition at line 201 of file aabbox3d.h.

+ +

Referenced by irr::core::triangle3d< T >::isTotalInsideBox().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::isPointTotalInside (const vector3d< T > & p) const [inline]
+
+
+ +

Determines if a point is within this box and not its borders.

+

Border is excluded (NOT part of the box)!

+
Parameters:
+ + +
p,:Point to check.
+
+
+
Returns:
True if the point is within the box and false if not.
+ +

Definition at line 212 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::operator!= (const aabbox3d< T > & other) const [inline]
+
+
+ +

Inequality operator.

+
Parameters:
+ + +
otherbox to compare with.
+
+
+
Returns:
True if both boxes are different, else false.
+ +

Definition at line 42 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::aabbox3d< T >::operator== (const aabbox3d< T > & other) const [inline]
+
+
+ +

Equality operator.

+
Parameters:
+ + +
otherbox to compare with.
+
+
+
Returns:
True if both boxes are equal, else false.
+ +

Definition at line 38 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
void irr::core::aabbox3d< T >::repair () [inline]
+
+
+ +

Repairs the box.

+

Necessary if for example MinEdge and MaxEdge are swapped.

+ +

Definition at line 172 of file aabbox3d.h.

+ +

Referenced by irr::core::CMatrix4< T >::transformBox().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::aabbox3d< T >::reset (x,
y,
z 
) [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::aabbox3d< T >::reset (const aabbox3d< T > & initValue) [inline]
+
+
+ +

Resets the bounding box.

+
Parameters:
+ + +
initValueNew box to set this one to.
+
+
+ +

Definition at line 58 of file aabbox3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::aabbox3d< T >::reset (const vector3d< T > & initValue) [inline]
+
+
+ +

Resets the bounding box to a one-point box.

+
Parameters:
+ + +
initValueNew point.
+
+
+ +

Definition at line 65 of file aabbox3d.h.

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array-members.html new file mode 100644 index 0000000..31f2610 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array-members.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::array< T, TAlloc > Member List
+
+
+This is the complete list of members for irr::core::array< T, TAlloc >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
allocated_size() const irr::core::array< T, TAlloc > [inline]
array()irr::core::array< T, TAlloc > [inline]
array(u32 start_count)irr::core::array< T, TAlloc > [inline]
array(const array< T, TAlloc > &other)irr::core::array< T, TAlloc > [inline]
binary_search(const T &element)irr::core::array< T, TAlloc > [inline]
binary_search(const T &element) const irr::core::array< T, TAlloc > [inline]
binary_search(const T &element, s32 left, s32 right) const irr::core::array< T, TAlloc > [inline]
binary_search_multi(const T &element, s32 &last)irr::core::array< T, TAlloc > [inline]
clear()irr::core::array< T, TAlloc > [inline]
const_pointer() const irr::core::array< T, TAlloc > [inline]
empty() const irr::core::array< T, TAlloc > [inline]
erase(u32 index)irr::core::array< T, TAlloc > [inline]
erase(u32 index, s32 count)irr::core::array< T, TAlloc > [inline]
getLast()irr::core::array< T, TAlloc > [inline]
getLast() const irr::core::array< T, TAlloc > [inline]
insert(const T &element, u32 index=0)irr::core::array< T, TAlloc > [inline]
linear_reverse_search(const T &element) const irr::core::array< T, TAlloc > [inline]
linear_search(const T &element) const irr::core::array< T, TAlloc > [inline]
operator!=(const array< T, TAlloc > &other) const irr::core::array< T, TAlloc > [inline]
operator=(const array< T, TAlloc > &other)irr::core::array< T, TAlloc > [inline]
operator==(const array< T, TAlloc > &other) const irr::core::array< T, TAlloc > [inline]
operator[](u32 index)irr::core::array< T, TAlloc > [inline]
operator[](u32 index) const irr::core::array< T, TAlloc > [inline]
pointer()irr::core::array< T, TAlloc > [inline]
push_back(const T &element)irr::core::array< T, TAlloc > [inline]
push_front(const T &element)irr::core::array< T, TAlloc > [inline]
reallocate(u32 new_size, bool canShrink=true)irr::core::array< T, TAlloc > [inline]
set_free_when_destroyed(bool f)irr::core::array< T, TAlloc > [inline]
set_pointer(T *newPointer, u32 size, bool _is_sorted=false, bool _free_when_destroyed=true)irr::core::array< T, TAlloc > [inline]
set_sorted(bool _is_sorted)irr::core::array< T, TAlloc > [inline]
set_used(u32 usedNow)irr::core::array< T, TAlloc > [inline]
setAllocStrategy(eAllocStrategy newStrategy=ALLOC_STRATEGY_DOUBLE)irr::core::array< T, TAlloc > [inline]
size() const irr::core::array< T, TAlloc > [inline]
sort()irr::core::array< T, TAlloc > [inline]
swap(array< T, TAlloc > &other)irr::core::array< T, TAlloc > [inline]
~array()irr::core::array< T, TAlloc > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array.html new file mode 100644 index 0000000..90c1847 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1array.html @@ -0,0 +1,1252 @@ + + + + +Irrlicht 3D Engine: irr::core::array< T, TAlloc > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::array< T, TAlloc > Class Template Reference
+
+
+ +

Self reallocating template array (like stl vector) with additional features. + More...

+ +

#include <irrArray.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • array () +
    Default constructor for empty array.
  • array (u32 start_count) +
    Constructs an array and allocates an initial chunk of memory.
  • array (const array< T, TAlloc > &other) +
    Copy constructor.
  • ~array () +
    Destructor.
  • u32 allocated_size () const +
    Get amount of memory allocated.
  • s32 binary_search (const T &element) +
    Performs a binary search for an element, returns -1 if not found.
  • s32 binary_search (const T &element) const +
    Performs a binary search for an element if possible, returns -1 if not found.
  • s32 binary_search (const T &element, s32 left, s32 right) const +
    Performs a binary search for an element, returns -1 if not found.
  • s32 binary_search_multi (const T &element, s32 &last) +
  • void clear () +
    Clears the array and deletes all allocated memory.
  • const T * const_pointer () const +
    Gets a const pointer to the array.
  • bool empty () const +
    Check if array is empty.
  • void erase (u32 index) +
    Erases an element from the array.
  • void erase (u32 index, s32 count) +
    Erases some elements from the array.
  • T & getLast () +
    Gets last element.
  • const T & getLast () const +
    Gets last element.
  • void insert (const T &element, u32 index=0) +
    Insert item into array at specified position.
  • s32 linear_reverse_search (const T &element) const +
    Finds an element in linear time, which is very slow.
  • s32 linear_search (const T &element) const +
    Finds an element in linear time, which is very slow.
  • bool operator!= (const array< T, TAlloc > &other) const +
    Inequality operator.
  • const array< T, TAlloc > & operator= (const array< T, TAlloc > &other) +
    Assignment operator.
  • bool operator== (const array< T, TAlloc > &other) const +
    Equality operator.
  • T & operator[] (u32 index) +
    Direct access operator.
  • const T & operator[] (u32 index) const +
    Direct const access operator.
  • T * pointer () +
    Gets a pointer to the array.
  • void push_back (const T &element) +
    Adds an element at back of array.
  • void push_front (const T &element) +
    Adds an element at the front of the array.
  • void reallocate (u32 new_size, bool canShrink=true) +
    Reallocates the array, make it bigger or smaller.
  • void set_free_when_destroyed (bool f) +
    Sets if the array should delete the memory it uses upon destruction.
  • void set_pointer (T *newPointer, u32 size, bool _is_sorted=false, bool _free_when_destroyed=true) +
    Sets pointer to new array, using this as new workspace.
  • void set_sorted (bool _is_sorted) +
    Sets if the array is sorted.
  • void set_used (u32 usedNow) +
    Sets the size of the array and allocates new elements if necessary.
  • void setAllocStrategy (eAllocStrategy newStrategy=ALLOC_STRATEGY_DOUBLE) +
    set a new allocation strategy
  • u32 size () const +
    Get number of occupied elements of the array.
  • void sort () +
    Sorts the array using heapsort.
  • void swap (array< T, TAlloc > &other) +
    Swap the content of this array container with the content of another array.
+

Detailed Description

+

template<class T, typename TAlloc = irrAllocator<T>>
+class irr::core::array< T, TAlloc >

+ +

Self reallocating template array (like stl vector) with additional features.

+

Some features are: Heap sorting, binary search methods, easier debugging.

+ +

Definition at line 22 of file irrArray.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
irr::core::array< T, TAlloc >::array () [inline]
+
+
+ +

Default constructor for empty array.

+ +

Definition at line 28 of file irrArray.h.

+ +

Referenced by irr::core::string< fschar_t >::operator<().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::array< T, TAlloc >::array (u32 start_count) [inline]
+
+
+ +

Constructs an array and allocates an initial chunk of memory.

+
Parameters:
+ + +
start_countAmount of elements to pre-allocate.
+
+
+ +

Definition at line 37 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::array< T, TAlloc >::array (const array< T, TAlloc > & other) [inline]
+
+
+ +

Copy constructor.

+ +

Definition at line 46 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
irr::core::array< T, TAlloc >::~array () [inline]
+
+
+ +

Destructor.

+

Frees allocated memory, if set_free_when_destroyed was not set to false by the user before.

+ +

Definition at line 55 of file irrArray.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
u32 irr::core::array< T, TAlloc >::allocated_size () const [inline]
+
+
+ +

Get amount of memory allocated.

+
Returns:
Amount of memory allocated. The amount of bytes allocated would be allocated_size() * sizeof(ElementTypeUsed);
+ +

Definition at line 377 of file irrArray.h.

+ +

Referenced by irr::scene::SMD3QuaternionTagList::set_used().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
s32 irr::core::array< T, TAlloc >::binary_search (const T & element) [inline]
+
+
+ +

Performs a binary search for an element, returns -1 if not found.

+

The array will be sorted before the binary search if it is not already sorted. Caution is advised! Be careful not to call this on unsorted const arrays, or the slower method will be used.

+
Parameters:
+ + +
elementElement to search for.
+
+
+
Returns:
Position of the searched element if it was found, otherwise -1 is returned.
+ +

Definition at line 409 of file irrArray.h.

+ +

Referenced by irr::core::array< IMesh * >::binary_search(), and irr::core::array< IMesh * >::binary_search_multi().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
s32 irr::core::array< T, TAlloc >::binary_search (const T & element) const [inline]
+
+
+ +

Performs a binary search for an element if possible, returns -1 if not found.

+

This method is for const arrays and so cannot call sort(), if the array is not sorted then linear_search will be used instead. Potentially very slow!

+
Parameters:
+ + +
elementElement to search for.
+
+
+
Returns:
Position of the searched element if it was found, otherwise -1 is returned.
+ +

Definition at line 422 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::core::array< T, TAlloc >::binary_search (const T & element,
s32 left,
s32 right 
) const [inline]
+
+
+ +

Performs a binary search for an element, returns -1 if not found.

+
Parameters:
+ + + + +
element,:Element to search for.
leftFirst left index
rightLast right index.
+
+
+
Returns:
Position of the searched element if it was found, otherwise -1 is returned.
+ +

Definition at line 437 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::array< T, TAlloc >::binary_search_multi (const T & element,
s32last 
) [inline]
+
+
+

Performs a binary search for an element, returns -1 if not found. it is used for searching a multiset The array will be sorted before the binary search if it is not already sorted.

+
Parameters:
+ + + +
elementElement to search for.
&lastreturn lastIndex of equal elements
+
+
+
Returns:
Position of the first searched element if it was found, otherwise -1 is returned.
+ +

Definition at line 475 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
void irr::core::array< T, TAlloc >::clear () [inline]
+
+ +
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
const T* irr::core::array< T, TAlloc >::const_pointer () const [inline]
+
+ +
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
bool irr::core::array< T, TAlloc >::empty () const [inline]
+
+ +
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::erase (u32 index) [inline]
+
+
+ +

Erases an element from the array.

+

May be slow, because all elements following after the erased element have to be copied.

+
Parameters:
+ + +
index,:Index of element to be erased.
+
+
+ +

Definition at line 536 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
void irr::core::array< T, TAlloc >::erase (u32 index,
s32 count 
) [inline]
+
+
+ +

Erases some elements from the array.

+

May be slow, because all elements following after the erased element have to be copied.

+
Parameters:
+ + + +
index,:Index of the first element to be erased.
count,:Amount of elements to be erased.
+
+
+ +

Definition at line 557 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
T& irr::core::array< T, TAlloc >::getLast () [inline]
+
+
+ +

Gets last element.

+ +

Definition at line 333 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
const T& irr::core::array< T, TAlloc >::getLast () const [inline]
+
+
+ +

Gets last element.

+ +

Definition at line 342 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
void irr::core::array< T, TAlloc >::insert (const T & element,
u32 index = 0 
) [inline]
+
+
+ +

Insert item into array at specified position.

+

Please use this only if you know what you are doing (possible performance loss). The preferred method of adding elements should be push_back().

+
Parameters:
+ + + +
element,:Element to be inserted
index,:Where position to insert the new element.
+
+
+ +

Definition at line 135 of file irrArray.h.

+ +

Referenced by irr::core::array< IMesh * >::push_back(), and irr::core::array< IMesh * >::push_front().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
s32 irr::core::array< T, TAlloc >::linear_reverse_search (const T & element) const [inline]
+
+
+ +

Finds an element in linear time, which is very slow.

+

Use binary_search for faster finding. Only works if ==operator is implemented.

+
Parameters:
+ + +
element,:Element to search for.
+
+
+
Returns:
Position of the searched element if it was found, otherwise -1 is returned.
+ +

Definition at line 522 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
s32 irr::core::array< T, TAlloc >::linear_search (const T & element) const [inline]
+
+
+ +

Finds an element in linear time, which is very slow.

+

Use binary_search for faster finding. Only works if ==operator is implemented.

+
Parameters:
+ + +
elementElement to search for.
+
+
+
Returns:
Position of the searched element if it was found, otherwise -1 is returned.
+ +

Definition at line 506 of file irrArray.h.

+ +

Referenced by irr::core::array< IMesh * >::binary_search(), irr::scene::SMD3QuaternionTagList::get(), and irr::scene::quake3::SVarGroup::get().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::array< T, TAlloc >::operator!= (const array< T, TAlloc > & other) const [inline]
+
+
+ +

Inequality operator.

+ +

Definition at line 308 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
const array<T, TAlloc>& irr::core::array< T, TAlloc >::operator= (const array< T, TAlloc > & other) [inline]
+
+
+ +

Assignment operator.

+ +

Definition at line 267 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::array< T, TAlloc >::operator== (const array< T, TAlloc > & other) const [inline]
+
+
+ +

Equality operator.

+ +

Definition at line 295 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
T& irr::core::array< T, TAlloc >::operator[] (u32 index) [inline]
+
+
+ +

Direct access operator.

+ +

Definition at line 315 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
const T& irr::core::array< T, TAlloc >::operator[] (u32 index) const [inline]
+
+
+ +

Direct const access operator.

+ +

Definition at line 324 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
T* irr::core::array< T, TAlloc >::pointer () [inline]
+
+ +
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::push_back (const T & element) [inline]
+
+ +
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::push_front (const T & element) [inline]
+
+
+ +

Adds an element at the front of the array.

+

If the array is to small to add this new element, the array is made bigger. Please note that this is slow, because the whole array needs to be copied for this.

+
Parameters:
+ + +
elementElement to add at the back of the array.
+
+
+ +

Definition at line 123 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
void irr::core::array< T, TAlloc >::reallocate (u32 new_size,
bool canShrink = true 
) [inline]
+
+
+ +

Reallocates the array, make it bigger or smaller.

+
Parameters:
+ + + +
new_sizeNew size of array.
canShrinkSpecifies whether the array is reallocated even if enough space is available. Setting this flag to false can speed up array usage, but may use more memory than required by the data.
+
+
+ +

Definition at line 67 of file irrArray.h.

+ +

Referenced by irr::scene::CMeshBuffer< T >::append(), irr::core::array< IMesh * >::array(), irr::core::array< IMesh * >::insert(), and irr::core::array< IMesh * >::set_used().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::set_free_when_destroyed (bool f) [inline]
+
+
+ +

Sets if the array should delete the memory it uses upon destruction.

+

Also clear and set_pointer will only delete the (original) memory area if this flag is set to true, which is also the default. The methods reallocate, set_used, push_back, push_front, insert, and erase will still try to deallocate the original memory, which might cause troubles depending on the intended use of the memory area.

+
Parameters:
+ + +
fIf true, the array frees the allocated memory in its destructor, otherwise not. The default is true.
+
+
+ +

Definition at line 247 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::array< T, TAlloc >::set_pointer (T * newPointer,
u32 size,
bool _is_sorted = false,
bool _free_when_destroyed = true 
) [inline]
+
+
+ +

Sets pointer to new array, using this as new workspace.

+

Make sure that set_free_when_destroyed is used properly.

+
Parameters:
+ + + + + +
newPointer,:Pointer to new array of elements.
size,:Size of the new array.
_is_sortedFlag which tells whether the new array is already sorted.
_free_when_destroyedSets whether the new memory area shall be freed by the array upon destruction, or if this will be up to the user application.
+
+
+ +

Definition at line 228 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::set_sorted (bool _is_sorted) [inline]
+
+
+ +

Sets if the array is sorted.

+ +

Definition at line 584 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::set_used (u32 usedNow) [inline]
+
+
+ +

Sets the size of the array and allocates new elements if necessary.

+

Please note: This is only secure when using it with simple types, because no default constructor will be called for the added elements.

+
Parameters:
+ + +
usedNowAmount of elements now used.
+
+
+ +

Definition at line 257 of file irrArray.h.

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::setAllocStrategy (eAllocStrategy newStrategy = ALLOC_STRATEGY_DOUBLE) [inline]
+
+
+ +

set a new allocation strategy

+

if the maximum size of the array is unknown, you can define how big the allocation should happen.

+
Parameters:
+ + +
newStrategyNew strategy to apply to this array.
+
+
+ +

Definition at line 103 of file irrArray.h.

+ +

Referenced by irr::scene::SMD3QuaternionTagList::SMD3QuaternionTagList(), irr::scene::quake3::SVarGroup::SVarGroup(), and irr::scene::quake3::SVarGroupList::SVarGroupList().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
u32 irr::core::array< T, TAlloc >::size () const [inline]
+
+
+ +

Get number of occupied elements of the array.

+
Returns:
Size of elements in the array which are actually occupied.
+ +

Definition at line 368 of file irrArray.h.

+ +

Referenced by irr::scene::SMesh::clear(), irr::scene::SSkinMeshBuffer::convertTo2TCoords(), irr::scene::SSkinMeshBuffer::convertToTangents(), irr::scene::quake3::dumpShader(), irr::scene::quake3::dumpVarGroup(), irr::scene::quake3::getAsStringList(), irr::scene::SAnimatedMesh::getFrameCount(), irr::scene::quake3::IShader::getGroup(), irr::scene::quake3::IShader::getGroupSize(), irr::scene::SSharedMeshBuffer::getIndexCount(), irr::scene::CMeshBuffer< T >::getIndexCount(), irr::scene::SSkinMeshBuffer::getIndexCount(), irr::scene::SMesh::getMeshBuffer(), irr::scene::SMesh::getMeshBufferCount(), irr::scene::quake3::getTextures(), irr::scene::CMeshBuffer< T >::getVertexCount(), irr::scene::SSharedMeshBuffer::getVertexCount(), irr::scene::SSkinMeshBuffer::getVertexCount(), irr::scene::quake3::SVarGroup::isDefined(), irr::scene::SMesh::recalculateBoundingBox(), irr::scene::SAnimatedMesh::recalculateBoundingBox(), irr::scene::SSharedMeshBuffer::recalculateBoundingBox(), irr::scene::CMeshBuffer< T >::recalculateBoundingBox(), irr::scene::SSkinMeshBuffer::recalculateBoundingBox(), irr::core::array< IMesh * >::set_pointer(), irr::scene::SMesh::setDirty(), irr::scene::SAnimatedMesh::setDirty(), irr::scene::SMesh::setHardwareMappingHint(), irr::scene::SAnimatedMesh::setHardwareMappingHint(), irr::scene::SMesh::setMaterialFlag(), irr::scene::SAnimatedMesh::setMaterialFlag(), irr::scene::SMD3QuaternionTagList::size(), irr::scene::SAnimatedMesh::~SAnimatedMesh(), irr::scene::SMD3Mesh::~SMD3Mesh(), and irr::scene::SMesh::~SMesh().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
void irr::core::array< T, TAlloc >::sort () [inline]
+
+
+ +

Sorts the array using heapsort.

+

There is no additional memory waste and the algorithm performs O(n*log n) in worst case.

+ +

Definition at line 394 of file irrArray.h.

+ +

Referenced by irr::core::array< IMesh * >::binary_search(), and irr::core::array< IMesh * >::binary_search_multi().

+ +
+
+ +
+
+
+template<class T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::array< T, TAlloc >::swap (array< T, TAlloc > & other) [inline]
+
+
+ +

Swap the content of this array container with the content of another array.

+

Afterwards this object will contain the content of the other object and the other object will contain the content of this object.

+
Parameters:
+ + +
otherSwap content with this object
+
+
+ +

Definition at line 594 of file irrArray.h.

+ +

Referenced by irr::core::array< IMesh * >::swap().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d-members.html new file mode 100644 index 0000000..1d32de0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d-members.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::dimension2d< T > Member List
+
+
+This is the complete list of members for irr::core::dimension2d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
dimension2d()irr::core::dimension2d< T > [inline]
dimension2d(const T &width, const T &height)irr::core::dimension2d< T > [inline]
dimension2d(const vector2d< T > &other)irr::core::dimension2d< T >
dimension2d(const dimension2d< U > &other)irr::core::dimension2d< T > [inline, explicit]
getArea() const irr::core::dimension2d< T > [inline]
getInterpolated(const dimension2d< T > &other, f32 d) const irr::core::dimension2d< T > [inline]
getOptimalSize(bool requirePowerOfTwo=true, bool requireSquare=false, bool larger=true, u32 maxValue=0) const irr::core::dimension2d< T > [inline]
Heightirr::core::dimension2d< T >
operator!=(const dimension2d< T > &other) const irr::core::dimension2d< T > [inline]
operator!=(const vector2d< T > &other) const irr::core::dimension2d< T > [inline]
operator*(const T &scale) const irr::core::dimension2d< T > [inline]
operator*=(const T &scale)irr::core::dimension2d< T > [inline]
operator+(const dimension2d< T > &other) const irr::core::dimension2d< T > [inline]
operator+=(const dimension2d< T > &other)irr::core::dimension2d< T > [inline]
operator-(const dimension2d< T > &other) const irr::core::dimension2d< T > [inline]
operator-=(const dimension2d< T > &other)irr::core::dimension2d< T > [inline]
operator/(const T &scale) const irr::core::dimension2d< T > [inline]
operator/=(const T &scale)irr::core::dimension2d< T > [inline]
operator=(const dimension2d< U > &other)irr::core::dimension2d< T > [inline]
operator==(const dimension2d< T > &other) const irr::core::dimension2d< T > [inline]
operator==(const vector2d< T > &other) const irr::core::dimension2d< T >
set(const T &width, const T &height)irr::core::dimension2d< T > [inline]
Widthirr::core::dimension2d< T >
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d.html new file mode 100644 index 0000000..7f5448b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1dimension2d.html @@ -0,0 +1,769 @@ + + + + +Irrlicht 3D Engine: irr::core::dimension2d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::dimension2d< T > Class Template Reference
+
+
+ +

Specifies a 2 dimensional size. + More...

+ +

#include <dimension2d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • T Height +
    Height of the dimension.
  • T Width +
    Width of the dimension.
+

Detailed Description

+

template<class T>
+class irr::core::dimension2d< T >

+ +

Specifies a 2 dimensional size.

+ +

Definition at line 20 of file dimension2d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::dimension2d< T >::dimension2d () [inline]
+
+
+ +

Default constructor for empty dimension.

+ +

Definition at line 24 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::dimension2d< T >::dimension2d (const T & width,
const T & height 
) [inline]
+
+
+ +

Constructor with width and height.

+ +

Definition at line 26 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::dimension2d< T >::dimension2d (const vector2d< T > & other)
+
+
+ +

Definition at line 333 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+
+template<class U >
+ + + + + + + + +
irr::core::dimension2d< T >::dimension2d (const dimension2d< U > & other) [inline, explicit]
+
+
+ +

Use this constructor only where you are sure that the conversion is valid.

+ +

Definition at line 33 of file dimension2d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::dimension2d< T >::getArea () const [inline]
+
+
+ +

Get area.

+ +

Definition at line 130 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
dimension2d<T> irr::core::dimension2d< T >::getInterpolated (const dimension2d< T > & other,
f32 d 
) const [inline]
+
+
+ +

Get the interpolated dimension.

+
Parameters:
+ + + +
otherOther dimension to interpolate with.
dValue between 0.0f and 1.0f.
+
+
+
Returns:
Interpolated dimension.
+ +

Definition at line 196 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
dimension2d<T> irr::core::dimension2d< T >::getOptimalSize (bool requirePowerOfTwo = true,
bool requireSquare = false,
bool larger = true,
u32 maxValue = 0 
) const [inline]
+
+
+ +

Get the optimal size according to some properties.

+

This is a function often used for texture dimension calculations. The function returns the next larger or smaller dimension which is a power-of-two dimension (2^n,2^m) and/or square (Width=Height).

+
Parameters:
+ + + + + +
requirePowerOfTwoForces the result to use only powers of two as values.
requireSquareMakes width==height in the result
largerChoose whether the result is larger or smaller than the current dimension. If one dimension need not be changed it is kept with any value of larger.
maxValueMaximum texturesize. if value > 0 size is clamped to maxValue
+
+
+
Returns:
The optimal dimension under the given constraints.
+ +

Definition at line 150 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::dimension2d< T >::operator!= (const dimension2d< T > & other) const [inline]
+
+
+ +

Inequality operator.

+ +

Definition at line 53 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::dimension2d< T >::operator!= (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 60 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T> irr::core::dimension2d< T >::operator* (const T & scale) const [inline]
+
+
+ +

Multiply width and height by scalar.

+ +

Definition at line 96 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T>& irr::core::dimension2d< T >::operator*= (const T & scale) [inline]
+
+
+ +

Multiply width and height by scalar.

+ +

Definition at line 88 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T> irr::core::dimension2d< T >::operator+ (const dimension2d< T > & other) const [inline]
+
+
+ +

Add two dimensions.

+ +

Definition at line 110 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T>& irr::core::dimension2d< T >::operator+= (const dimension2d< T > & other) [inline]
+
+
+ +

Add another dimension to this one.

+ +

Definition at line 102 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T> irr::core::dimension2d< T >::operator- (const dimension2d< T > & other) const [inline]
+
+
+ +

Subtract one dimension from another.

+ +

Definition at line 124 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T>& irr::core::dimension2d< T >::operator-= (const dimension2d< T > & other) [inline]
+
+
+ +

Subtract a dimension from this one.

+ +

Definition at line 116 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T> irr::core::dimension2d< T >::operator/ (const T & scale) const [inline]
+
+
+ +

Divide width and height by scalar.

+ +

Definition at line 82 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
dimension2d<T>& irr::core::dimension2d< T >::operator/= (const T & scale) [inline]
+
+
+ +

Divide width and height by scalar.

+ +

Definition at line 74 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+
+template<class U >
+ + + + + + + + +
dimension2d<T>& irr::core::dimension2d< T >::operator= (const dimension2d< U > & other) [inline]
+
+
+ +

Definition at line 37 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::dimension2d< T >::operator== (const dimension2d< T > & other) const [inline]
+
+
+ +

Equality operator.

+ +

Definition at line 46 of file dimension2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::dimension2d< T >::operator== (const vector2d< T > & other) const
+
+
+ +

Definition at line 336 of file vector2d.h.

+ +

References irr::core::vector2d< T >::X, and irr::core::vector2d< T >::Y.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
dimension2d<T>& irr::core::dimension2d< T >::set (const T & width,
const T & height 
) [inline]
+
+
+ +

Set to new values.

+ +

Definition at line 66 of file dimension2d.h.

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator-members.html new file mode 100644 index 0000000..5793dc3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator-members.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::irrAllocator< T > Member List
+
+
+This is the complete list of members for irr::core::irrAllocator< T >, including all inherited members. + + + + + + + +
allocate(size_t cnt)irr::core::irrAllocator< T > [inline]
construct(T *ptr, const T &e)irr::core::irrAllocator< T > [inline]
deallocate(T *ptr)irr::core::irrAllocator< T > [inline]
destruct(T *ptr)irr::core::irrAllocator< T > [inline]
internal_delete(void *ptr)irr::core::irrAllocator< T > [inline, protected, virtual]
internal_new(size_t cnt)irr::core::irrAllocator< T > [inline, protected, virtual]
~irrAllocator()irr::core::irrAllocator< T > [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator.html new file mode 100644 index 0000000..5b18070 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator.html @@ -0,0 +1,337 @@ + + + + +Irrlicht 3D Engine: irr::core::irrAllocator< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::irrAllocator< T > Class Template Reference
+
+
+ +

Very simple allocator implementation, containers using it can be used across dll boundaries. + More...

+ +

#include <irrAllocator.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • virtual ~irrAllocator () +
    Destructor.
  • T * allocate (size_t cnt) +
    Allocate memory for an array of objects.
  • void construct (T *ptr, const T &e) +
    Construct an element.
  • void deallocate (T *ptr) +
    Deallocate memory for an array of objects.
  • void destruct (T *ptr) +
    Destruct an element.
+

+Protected Member Functions

+ +

Detailed Description

+

template<typename T>
+class irr::core::irrAllocator< T >

+ +

Very simple allocator implementation, containers using it can be used across dll boundaries.

+ +

Definition at line 25 of file irrAllocator.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T>
+ + + + + + + +
virtual irr::core::irrAllocator< T >::~irrAllocator () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 30 of file irrAllocator.h.

+ +
+
+

Member Function Documentation

+ + + + + +
+
+
+template<typename T>
+ + + + + + + + +
void irr::core::irrAllocator< T >::deallocate (T * ptr) [inline]
+
+ +
+ +
+
+
+template<typename T>
+ + + + + + + + +
void irr::core::irrAllocator< T >::destruct (T * ptr) [inline]
+
+ +
+ +
+
+
+template<typename T>
+ + + + + + + + +
virtual void irr::core::irrAllocator< T >::internal_delete (void * ptr) [inline, protected, virtual]
+
+
+ +

Definition at line 63 of file irrAllocator.h.

+ +

Referenced by irr::core::irrAllocator< IMesh * >::deallocate().

+ +
+
+ +
+
+
+template<typename T>
+ + + + + + + + +
virtual void* irr::core::irrAllocator< T >::internal_new (size_t cnt) [inline, protected, virtual]
+
+
+ +

Definition at line 58 of file irrAllocator.h.

+ +

Referenced by irr::core::irrAllocator< IMesh * >::allocate().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast-members.html new file mode 100644 index 0000000..57bf605 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast-members.html @@ -0,0 +1,124 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::irrAllocatorFast< T > Member List
+
+
+This is the complete list of members for irr::core::irrAllocatorFast< T >, including all inherited members. + + + + +
allocate(size_t cnt)irr::core::irrAllocatorFast< T > [inline]
construct(T *ptr, const T &e)irr::core::irrAllocatorFast< T > [inline]
deallocate(T *ptr)irr::core::irrAllocatorFast< T > [inline]
destruct(T *ptr)irr::core::irrAllocatorFast< T > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast.html new file mode 100644 index 0000000..2ab357e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1irr_allocator_fast.html @@ -0,0 +1,253 @@ + + + + +Irrlicht 3D Engine: irr::core::irrAllocatorFast< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::irrAllocatorFast< T > Class Template Reference
+
+
+ +

Fast allocator, only to be used in containers inside the same memory heap. + More...

+ +

#include <irrAllocator.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • T * allocate (size_t cnt) +
    Allocate memory for an array of objects.
  • void construct (T *ptr, const T &e) +
    Construct an element.
  • void deallocate (T *ptr) +
    Deallocate memory for an array of objects.
  • void destruct (T *ptr) +
    Destruct an element.
+

Detailed Description

+

template<typename T>
+class irr::core::irrAllocatorFast< T >

+ +

Fast allocator, only to be used in containers inside the same memory heap.

+

Containers using it are NOT able to be used it across dll boundaries. Use this when using in an internal class or function or when compiled into a static lib

+ +

Definition at line 75 of file irrAllocator.h.

+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + + + + +
T* irr::core::irrAllocatorFast< T >::allocate (size_t cnt) [inline]
+
+
+ +

Allocate memory for an array of objects.

+ +

Definition at line 80 of file irrAllocator.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::irrAllocatorFast< T >::construct (T * ptr,
const T & e 
) [inline]
+
+
+ +

Construct an element.

+ +

Definition at line 92 of file irrAllocator.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
void irr::core::irrAllocatorFast< T >::deallocate (T * ptr) [inline]
+
+
+ +

Deallocate memory for an array of objects.

+ +

Definition at line 86 of file irrAllocator.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
void irr::core::irrAllocatorFast< T >::destruct (T * ptr) [inline]
+
+
+ +

Destruct an element.

+ +

Definition at line 98 of file irrAllocator.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d-members.html new file mode 100644 index 0000000..912c5c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d-members.html @@ -0,0 +1,147 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::line2d< T > Member List
+
+
+This is the complete list of members for irr::core::line2d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
endirr::core::line2d< T >
getAngleWith(const line2d< T > &l) const irr::core::line2d< T > [inline]
getClosestPoint(const vector2d< T > &point, bool checkOnlySegments=true) const irr::core::line2d< T > [inline]
getClosestPoint(const vector2df &point, bool checkOnlySegments) constirr::core::line2d< T > [inline]
getLength() const irr::core::line2d< T > [inline]
getLengthSQ() const irr::core::line2d< T > [inline]
getMiddle() const irr::core::line2d< T > [inline]
getPointOrientation(const vector2d< T > &point) const irr::core::line2d< T > [inline]
getUnitVector() const irr::core::line2d< T > [inline]
getVector() const irr::core::line2d< T > [inline]
intersectWith(const line2d< T > &l, vector2d< T > &out, bool checkOnlySegments=true) const irr::core::line2d< T > [inline]
isPointBetweenStartAndEnd(const vector2d< T > &point) const irr::core::line2d< T > [inline]
isPointOnLine(const vector2d< T > &point) const irr::core::line2d< T > [inline]
line2d()irr::core::line2d< T > [inline]
line2d(T xa, T ya, T xb, T yb)irr::core::line2d< T > [inline]
line2d(const vector2d< T > &start, const vector2d< T > &end)irr::core::line2d< T > [inline]
line2d(const line2d< T > &other)irr::core::line2d< T > [inline]
operator!=(const line2d< T > &other) const irr::core::line2d< T > [inline]
operator+(const vector2d< T > &point) const irr::core::line2d< T > [inline]
operator+=(const vector2d< T > &point)irr::core::line2d< T > [inline]
operator-(const vector2d< T > &point) const irr::core::line2d< T > [inline]
operator-=(const vector2d< T > &point)irr::core::line2d< T > [inline]
operator==(const line2d< T > &other) const irr::core::line2d< T > [inline]
setLine(const T &xa, const T &ya, const T &xb, const T &yb)irr::core::line2d< T > [inline]
setLine(const vector2d< T > &nstart, const vector2d< T > &nend)irr::core::line2d< T > [inline]
setLine(const line2d< T > &line)irr::core::line2d< T > [inline]
startirr::core::line2d< T >
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d.html new file mode 100644 index 0000000..0b8b48f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line2d.html @@ -0,0 +1,955 @@ + + + + +Irrlicht 3D Engine: irr::core::line2d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::line2d< T > Class Template Reference
+
+
+ +

2D line between two points with intersection methods. + More...

+ +

#include <line2d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

template<class T>
+class irr::core::line2d< T >

+ +

2D line between two points with intersection methods.

+ +

Definition at line 18 of file line2d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::line2d< T >::line2d () [inline]
+
+
+ +

Default constructor for line going from (0,0) to (1,1).

+ +

Definition at line 22 of file line2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::line2d< T >::line2d (xa,
ya,
xb,
yb 
) [inline]
+
+
+ +

Constructor for line between the two points.

+ +

Definition at line 24 of file line2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::line2d< T >::line2d (const vector2d< T > & start,
const vector2d< T > & end 
) [inline]
+
+
+ +

Constructor for line between the two points given as vectors.

+ +

Definition at line 26 of file line2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::line2d< T >::line2d (const line2d< T > & other) [inline]
+
+
+ +

Copy constructor.

+ +

Definition at line 28 of file line2d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
f64 irr::core::line2d< T >::getAngleWith (const line2d< T > & l) const [inline]
+
+
+ +

Get angle between this line and given line.

+
Parameters:
+ + +
lOther line for test.
+
+
+
Returns:
Angle in degrees.
+ +

Definition at line 182 of file line2d.h.

+ +

References irr::core::vector2d< T >::getAngleWith(), and irr::core::line2d< T >::getVector().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
vector2d<T> irr::core::line2d< T >::getClosestPoint (const vector2d< T > & point,
bool checkOnlySegments = true 
) const [inline]
+
+
+ +

Get the closest point on this line to a point.

+
Parameters:
+ + +
checkOnlySegments,:Default (true) is to return a point on the line-segment (between begin and end) of the line. When set to false the function will check for the first the closest point on the the line even when outside the segment.
+
+
+ +

Definition at line 216 of file line2d.h.

+ +

References irr::core::vector2d< T >::dotProduct(), irr::core::line2d< T >::end, irr::core::vector2d< T >::getLength(), irr::core::line2d< T >::start, irr::core::vector2d< T >::X, and irr::core::vector2d< T >::Y.

+ +
+
+ +
+
+
+template<>
+ + + + + + + + + + + + + + + + + + +
vector2df irr::core::line2d< irr::f32 >::getClosestPoint (const vector2dfpoint,
bool checkOnlySegments 
) const [inline]
+
+
+ +

Definition at line 244 of file line2d.h.

+ +

References irr::core::vector2d< T >::dotProduct(), and irr::core::vector2d< T >::getLength().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::line2d< T >::getLength () const [inline]
+
+
+ +

Get length of line.

+
Returns:
Length of the line.
+ +

Definition at line 53 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +

Referenced by irr::core::line2d< T >::getUnitVector().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::line2d< T >::getLengthSQ () const [inline]
+
+
+ +

Get squared length of the line.

+
Returns:
Squared length of line.
+ +

Definition at line 57 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector2d<T> irr::core::line2d< T >::getMiddle () const [inline]
+
+
+ +

Get middle of the line.

+
Returns:
center of the line.
+ +

Definition at line 61 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::line2d< T >::getPointOrientation (const vector2d< T > & point) const [inline]
+
+
+ +

Tells us if the given point lies to the left, right, or on the line.

+
Returns:
0 if the point is on the line <0 if to the left, or >0 if to the right.
+ +

Definition at line 192 of file line2d.h.

+ +

References irr::core::line2d< T >::end, irr::core::line2d< T >::start, irr::core::vector2d< T >::X, and irr::core::vector2d< T >::Y.

+ +

Referenced by irr::core::line2d< T >::isPointOnLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector2d<T> irr::core::line2d< T >::getUnitVector () const [inline]
+
+
+ +

Get unit vector of the line.

+
Returns:
Unit vector of this line.
+ +

Definition at line 173 of file line2d.h.

+ +

References irr::core::line2d< T >::end, irr::core::line2d< T >::getLength(), and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector2d<T> irr::core::line2d< T >::getVector () const [inline]
+
+
+ +

Get the vector of the line.

+
Returns:
The vector of the line.
+ +

Definition at line 68 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +

Referenced by irr::core::line2d< T >::getAngleWith().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::line2d< T >::intersectWith (const line2d< T > & l,
vector2d< T > & out,
bool checkOnlySegments = true 
) const [inline]
+
+
+ +

Tests if this line intersects with another line.

+
Parameters:
+ + + + +
l,:Other line to test intersection with.
checkOnlySegments,:Default is to check intersection between the begin and endpoints. When set to false the function will check for the first intersection point when extending the lines.
out,:If there is an intersection, the location of the intersection will be stored in this vector.
+
+
+
Returns:
True if there is an intersection, false if not.
+ +

Definition at line 77 of file line2d.h.

+ +

References irr::core::line2d< T >::end, irr::core::equals(), irr::core::line2d< T >::start, irr::core::vector2d< T >::X, and irr::core::vector2d< T >::Y.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line2d< T >::isPointBetweenStartAndEnd (const vector2d< T > & point) const [inline]
+
+
+ +

Check if the given point is between start and end of the line.

+

Assumes that the point is already somewhere on the line.

+ +

Definition at line 208 of file line2d.h.

+ +

References irr::core::line2d< T >::end, irr::core::vector2d< T >::isBetweenPoints(), and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line2d< T >::isPointOnLine (const vector2d< T > & point) const [inline]
+
+
+ +

Check if the given point is a member of the line.

+
Returns:
True if point is between start and end, else false.
+ +

Definition at line 200 of file line2d.h.

+ +

References irr::core::line2d< T >::end, irr::core::line2d< T >::getPointOrientation(), irr::core::vector2d< T >::isBetweenPoints(), and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line2d< T >::operator!= (const line2d< T > & other) const [inline]
+
+
+ +

Definition at line 40 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line2d<T> irr::core::line2d< T >::operator+ (const vector2d< T > & point) const [inline]
+
+
+ +

Definition at line 32 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line2d<T>& irr::core::line2d< T >::operator+= (const vector2d< T > & point) [inline]
+
+
+ +

Definition at line 33 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line2d<T> irr::core::line2d< T >::operator- (const vector2d< T > & point) const [inline]
+
+
+ +

Definition at line 35 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line2d<T>& irr::core::line2d< T >::operator-= (const vector2d< T > & point) [inline]
+
+
+ +

Definition at line 36 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line2d< T >::operator== (const line2d< T > & other) const [inline]
+
+
+ +

Definition at line 38 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::line2d< T >::setLine (const T & xa,
const T & ya,
const T & xb,
const T & yb 
) [inline]
+
+
+ +

Set this line to new line going through the two points.

+ +

Definition at line 45 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::line2d< T >::setLine (const vector2d< T > & nstart,
const vector2d< T > & nend 
) [inline]
+
+
+ +

Set this line to new line going through the two points.

+ +

Definition at line 47 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::line2d< T >::setLine (const line2d< T > & line) [inline]
+
+
+ +

Set this line to new line given as parameter.

+ +

Definition at line 49 of file line2d.h.

+ +

References irr::core::line2d< T >::end, and irr::core::line2d< T >::start.

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d-members.html new file mode 100644 index 0000000..6012bfb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d-members.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::line3d< T > Member List
+
+
+This is the complete list of members for irr::core::line3d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + +
endirr::core::line3d< T >
getClosestPoint(const vector3d< T > &point) const irr::core::line3d< T > [inline]
getIntersectionWithSphere(vector3d< T > sorigin, T sradius, f64 &outdistance) const irr::core::line3d< T > [inline]
getLength() const irr::core::line3d< T > [inline]
getLengthSQ() const irr::core::line3d< T > [inline]
getMiddle() const irr::core::line3d< T > [inline]
getVector() const irr::core::line3d< T > [inline]
isPointBetweenStartAndEnd(const vector3d< T > &point) const irr::core::line3d< T > [inline]
line3d()irr::core::line3d< T > [inline]
line3d(T xa, T ya, T za, T xb, T yb, T zb)irr::core::line3d< T > [inline]
line3d(const vector3d< T > &start, const vector3d< T > &end)irr::core::line3d< T > [inline]
operator!=(const line3d< T > &other) const irr::core::line3d< T > [inline]
operator+(const vector3d< T > &point) const irr::core::line3d< T > [inline]
operator+=(const vector3d< T > &point)irr::core::line3d< T > [inline]
operator-(const vector3d< T > &point) const irr::core::line3d< T > [inline]
operator-=(const vector3d< T > &point)irr::core::line3d< T > [inline]
operator==(const line3d< T > &other) const irr::core::line3d< T > [inline]
setLine(const T &xa, const T &ya, const T &za, const T &xb, const T &yb, const T &zb)irr::core::line3d< T > [inline]
setLine(const vector3d< T > &nstart, const vector3d< T > &nend)irr::core::line3d< T > [inline]
setLine(const line3d< T > &line)irr::core::line3d< T > [inline]
startirr::core::line3d< T >
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d.html new file mode 100644 index 0000000..a18c97f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1line3d.html @@ -0,0 +1,807 @@ + + + + +Irrlicht 3D Engine: irr::core::line3d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::line3d< T > Class Template Reference
+
+
+ +

3D line between two points with intersection methods. + More...

+ +

#include <line3d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

template<class T>
+class irr::core::line3d< T >

+ +

3D line between two points with intersection methods.

+ +

Definition at line 18 of file line3d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::line3d< T >::line3d () [inline]
+
+
+ +

Default constructor.

+

line from (0,0,0) to (1,1,1)

+ +

Definition at line 24 of file line3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::line3d< T >::line3d (xa,
ya,
za,
xb,
yb,
zb 
) [inline]
+
+
+ +

Constructor with two points.

+ +

Definition at line 26 of file line3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::line3d< T >::line3d (const vector3d< T > & start,
const vector3d< T > & end 
) [inline]
+
+
+ +

Constructor with two points as vectors.

+ +

Definition at line 28 of file line3d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::line3d< T >::getClosestPoint (const vector3d< T > & point) const [inline]
+
+
+ +

Get the closest point on this line to a point.

+
Parameters:
+ + +
pointThe point to compare to.
+
+
+
Returns:
The nearest point which is part of the line.
+ +

Definition at line 89 of file line3d.h.

+ +

References irr::core::vector3d< T >::dotProduct(), irr::core::line3d< T >::end, irr::core::vector3d< T >::getLength(), and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::line3d< T >::getIntersectionWithSphere (vector3d< T > sorigin,
sradius,
f64outdistance 
) const [inline]
+
+
+ +

Check if the line intersects with a shpere.

+
Parameters:
+ + + + +
sorigin,:Origin of the shpere.
sradius,:Radius of the sphere.
outdistance,:The distance to the first intersection point.
+
+
+
Returns:
True if there is an intersection. If there is one, the distance to the first intersection point is stored in outdistance.
+ +

Definition at line 113 of file line3d.h.

+ +

References irr::core::vector3d< T >::dotProduct(), irr::core::vector3d< T >::getLength(), irr::core::line3d< T >::getVector(), irr::core::squareroot(), and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::line3d< T >::getLength () const [inline]
+
+
+ +

Get length of line.

+
Returns:
Length of line.
+ +

Definition at line 56 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +

Referenced by irr::core::aabbox3d< f32 >::intersectsWithLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::line3d< T >::getLengthSQ () const [inline]
+
+
+ +

Get squared length of line.

+
Returns:
Squared length of line.
+ +

Definition at line 60 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::line3d< T >::getMiddle () const [inline]
+
+
+ +

Get middle of line.

+
Returns:
Center of line.
+ +

Definition at line 64 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +

Referenced by irr::core::aabbox3d< f32 >::intersectsWithLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::line3d< T >::getVector () const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line3d< T >::isPointBetweenStartAndEnd (const vector3d< T > & point) const [inline]
+
+
+ +

Check if the given point is between start and end of the line.

+

Assumes that the point is already somewhere on the line.

+
Parameters:
+ + +
pointThe point to test.
+
+
+
Returns:
True if point is on the line between start and end, else false.
+ +

Definition at line 81 of file line3d.h.

+ +

References irr::core::line3d< T >::end, irr::core::vector3d< T >::isBetweenPoints(), and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line3d< T >::operator!= (const line3d< T > & other) const [inline]
+
+
+ +

Definition at line 40 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line3d<T> irr::core::line3d< T >::operator+ (const vector3d< T > & point) const [inline]
+
+
+ +

Definition at line 32 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line3d<T>& irr::core::line3d< T >::operator+= (const vector3d< T > & point) [inline]
+
+
+ +

Definition at line 33 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line3d<T> irr::core::line3d< T >::operator- (const vector3d< T > & point) const [inline]
+
+
+ +

Definition at line 35 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
line3d<T>& irr::core::line3d< T >::operator-= (const vector3d< T > & point) [inline]
+
+
+ +

Definition at line 36 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::line3d< T >::operator== (const line3d< T > & other) const [inline]
+
+
+ +

Definition at line 38 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::line3d< T >::setLine (const T & xa,
const T & ya,
const T & za,
const T & xb,
const T & yb,
const T & zb 
) [inline]
+
+
+ +

Set this line to a new line going through the two points.

+ +

Definition at line 45 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::line3d< T >::setLine (const vector3d< T > & nstart,
const vector3d< T > & nend 
) [inline]
+
+
+ +

Set this line to a new line going through the two points.

+ +

Definition at line 48 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::line3d< T >::setLine (const line3d< T > & line) [inline]
+
+
+ +

Set this line to new line given as parameter.

+ +

Definition at line 51 of file line3d.h.

+ +

References irr::core::line3d< T >::end, and irr::core::line3d< T >::start.

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list-members.html new file mode 100644 index 0000000..7191dc5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list-members.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::list< T > Member List
+
+
+This is the complete list of members for irr::core::list< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + +
begin()irr::core::list< T > [inline]
begin() const irr::core::list< T > [inline]
clear()irr::core::list< T > [inline]
empty() const irr::core::list< T > [inline]
end()irr::core::list< T > [inline]
end() const irr::core::list< T > [inline]
erase(Iterator &it)irr::core::list< T > [inline]
getLast()irr::core::list< T > [inline]
getLast() const irr::core::list< T > [inline]
getSize() const irr::core::list< T > [inline]
insert_after(const Iterator &it, const T &element)irr::core::list< T > [inline]
insert_before(const Iterator &it, const T &element)irr::core::list< T > [inline]
list()irr::core::list< T > [inline]
list(const list< T > &other)irr::core::list< T > [inline]
operator=(const list< T > &other)irr::core::list< T > [inline]
push_back(const T &element)irr::core::list< T > [inline]
push_front(const T &element)irr::core::list< T > [inline]
size() const irr::core::list< T > [inline]
swap(list< T > &other)irr::core::list< T > [inline]
~list()irr::core::list< T > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list.html new file mode 100644 index 0000000..bb4fcff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list.html @@ -0,0 +1,706 @@ + + + + +Irrlicht 3D Engine: irr::core::list< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::list< T > Class Template Reference
+
+
+ +

Doubly linked list template. + More...

+ +

#include <irrList.h>

+ +

List of all members.

+

+Classes

+
    +
  • class ConstIterator +
    List iterator for const access. More...
  • class Iterator +
    List iterator. More...
  • struct SKListNode +
    List element node with pointer to previous and next element in the list.
+

+Public Member Functions

+ +

Detailed Description

+

template<class T>
+class irr::core::list< T >

+ +

Doubly linked list template.

+ +

Definition at line 20 of file irrList.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::list< T >::list () [inline]
+
+
+ +

Default constructor for empty list.

+ +

Definition at line 136 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::list< T >::list (const list< T > & other) [inline]
+
+
+ +

Copy constructor.

+ +

Definition at line 141 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::list< T >::~list () [inline]
+
+
+ +

Destructor.

+ +

Definition at line 148 of file irrList.h.

+ +
+
+

Member Function Documentation

+ + + +
+
+
+template<class T>
+ + + + + + + +
ConstIterator irr::core::list< T >::begin () const [inline]
+
+
+ +

Gets first node.

+
Returns:
A const list iterator pointing to the beginning of the list.
+ +

Definition at line 265 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
void irr::core::list< T >::clear () [inline]
+
+
+ +

Clears the list, deletes all elements in the list.

+

All existing iterators of this list will be invalid.

+ +

Definition at line 187 of file irrList.h.

+ +

Referenced by irr::core::list< ISceneNode * >::operator=(), irr::scene::ISceneNode::removeAll(), irr::scene::ISceneNode::removeAnimators(), and irr::core::list< ISceneNode * >::~list().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
bool irr::core::list< T >::empty () const [inline]
+
+
+ +

Checks for empty list.

+
Returns:
True if the list is empty and false if not.
+ +

Definition at line 205 of file irrList.h.

+ +
+
+ + + +
+
+
+template<class T>
+ + + + + + + +
ConstIterator irr::core::list< T >::end () const [inline]
+
+
+ +

Gets end node.

+
Returns:
Const list iterator pointing to null.
+ +

Definition at line 281 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator irr::core::list< T >::erase (Iteratorit) [inline]
+
+
+ +

Erases an element.

+
Parameters:
+ + +
itIterator pointing to the element which shall be erased.
+
+
+
Returns:
Iterator pointing to next element.
+ +

Definition at line 354 of file irrList.h.

+ +

Referenced by irr::gui::IGUIElement::bringToFront(), irr::scene::ISceneNode::removeAnimator(), irr::gui::IGUIElement::removeChild(), irr::scene::ISceneNode::removeChild(), and irr::gui::IGUIElement::sendToBack().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
Iterator irr::core::list< T >::getLast () [inline]
+
+
+ +

Gets last element.

+
Returns:
List iterator pointing to the last element of the list.
+ +

Definition at line 289 of file irrList.h.

+ +

Referenced by irr::gui::IGUIElement::getElementFromPoint().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
ConstIterator irr::core::list< T >::getLast () const [inline]
+
+
+ +

Gets last element.

+
Returns:
Const list iterator pointing to the last element of the list.
+ +

Definition at line 297 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
u32 irr::core::list< T >::getSize () const [inline]
+
+
+ +

Definition at line 179 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::list< T >::insert_after (const Iteratorit,
const T & element 
) [inline]
+
+
+ +

Inserts an element after an element.

+
Parameters:
+ + + +
itIterator pointing to element after which the new element should be inserted.
elementThe new element to be inserted into the list.
+
+
+ +

Definition at line 308 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::list< T >::insert_before (const Iteratorit,
const T & element 
) [inline]
+
+
+ +

Inserts an element before an element.

+
Parameters:
+ + + +
itIterator pointing to element before which the new element should be inserted.
elementThe new element to be inserted into the list.
+
+
+ +

Definition at line 332 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::list< T >::operator= (const list< T > & other) [inline]
+
+
+ +

Assignment operator.

+ +

Definition at line 155 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::list< T >::push_back (const T & element) [inline]
+
+
+ +

Adds an element at the end of the list.

+
Parameters:
+ + +
elementElement to add to the list.
+
+
+ +

Definition at line 213 of file irrList.h.

+ +

Referenced by irr::scene::ISceneNode::addAnimator(), irr::scene::ISceneNode::addChild(), irr::gui::IGUIElement::addChildToEnd(), irr::gui::IGUIElement::bringToFront(), and irr::core::list< ISceneNode * >::operator=().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::list< T >::push_front (const T & element) [inline]
+
+
+ +

Adds an element at the begin of the list.

+
Parameters:
+ + +
element,:Element to add to the list.
+
+
+ +

Definition at line 234 of file irrList.h.

+ +

Referenced by irr::gui::IGUIElement::sendToBack().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
u32 irr::core::list< T >::size () const [inline]
+
+
+ +

Returns amount of elements in list.

+
Returns:
Amount of elements in the list.
+ +

Definition at line 175 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::list< T >::swap (list< T > & other) [inline]
+
+
+ +

Swap the content of this list container with the content of another list.

+

Afterwards this object will contain the content of the other object and the other object will contain the content of this object. Iterators will afterwards be valid for the swapped object.

+
Parameters:
+ + +
otherSwap content with this object
+
+
+ +

Definition at line 393 of file irrList.h.

+ +

Referenced by irr::core::list< ISceneNode * >::swap().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator-members.html new file mode 100644 index 0000000..c335443 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator-members.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::list< T >::ConstIterator Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator.html new file mode 100644 index 0000000..eb7f25f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_const_iterator.html @@ -0,0 +1,559 @@ + + + + +Irrlicht 3D Engine: irr::core::list< T >::ConstIterator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::list< T >::ConstIterator Class Reference
+
+
+ +

List iterator for const access. + More...

+ +

#include <irrList.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Friends

+ +

Detailed Description

+

template<class T>
+class irr::core::list< T >::ConstIterator

+ +

List iterator for const access.

+ +

Definition at line 87 of file irrList.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::list< T >::ConstIterator::ConstIterator () [inline]
+
+
+ +

Definition at line 91 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::list< T >::ConstIterator::ConstIterator (const Iteratoriter) [inline]
+
+
+ +

Definition at line 92 of file irrList.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::ConstIterator::operator!= (const ConstIteratorother) const [inline]
+
+
+ +

Definition at line 117 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::ConstIterator::operator!= (const Iteratorother) const [inline]
+
+
+ +

Definition at line 119 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
const T& irr::core::list< T >::ConstIterator::operator* () [inline]
+
+
+ +

Definition at line 121 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator irr::core::list< T >::ConstIterator::operator+ (s32 num) const [inline]
+
+
+ +

Definition at line 112 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
ConstIterator& irr::core::list< T >::ConstIterator::operator++ () [inline]
+
+
+ +

Definition at line 94 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator irr::core::list< T >::ConstIterator::operator++ (s32 ) [inline]
+
+
+ +

Definition at line 96 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator& irr::core::list< T >::ConstIterator::operator+= (s32 num) [inline]
+
+
+ +

Definition at line 99 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator irr::core::list< T >::ConstIterator::operator- (s32 num) const [inline]
+
+
+ +

Definition at line 114 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
ConstIterator& irr::core::list< T >::ConstIterator::operator-- () [inline]
+
+
+ +

Definition at line 95 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator irr::core::list< T >::ConstIterator::operator-- (s32 ) [inline]
+
+
+ +

Definition at line 97 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator& irr::core::list< T >::ConstIterator::operator-= (s32 num) [inline]
+
+
+ +

Definition at line 113 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
const T* irr::core::list< T >::ConstIterator::operator-> () [inline]
+
+
+ +

Definition at line 122 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
ConstIterator& irr::core::list< T >::ConstIterator::operator= (const Iteratoriterator) [inline]
+
+
+ +

Definition at line 124 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::ConstIterator::operator== (const ConstIteratorother) const [inline]
+
+
+ +

Definition at line 116 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::ConstIterator::operator== (const Iteratorother) const [inline]
+
+
+ +

Definition at line 118 of file irrList.h.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<class T>
+ + + + +
friend class Iterator [friend]
+
+
+ +

Definition at line 131 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + +
friend class list< T > [friend]
+
+
+ +

Definition at line 132 of file irrList.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator-members.html new file mode 100644 index 0000000..99ab44f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator-members.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::list< T >::Iterator Member List
+
+
+This is the complete list of members for irr::core::list< T >::Iterator, including all inherited members. + + + + + + + + + + + + + + + + + +
ConstIterator classirr::core::list< T >::Iterator [friend]
Iterator()irr::core::list< T >::Iterator [inline]
list< T > classirr::core::list< T >::Iterator [friend]
operator!=(const Iterator &other) const irr::core::list< T >::Iterator [inline]
operator!=(const ConstIterator &other) const irr::core::list< T >::Iterator [inline]
operator*()irr::core::list< T >::Iterator [inline]
operator+(s32 num) const irr::core::list< T >::Iterator [inline]
operator++()irr::core::list< T >::Iterator [inline]
operator++(s32)irr::core::list< T >::Iterator [inline]
operator+=(s32 num)irr::core::list< T >::Iterator [inline]
operator-(s32 num) const irr::core::list< T >::Iterator [inline]
operator--()irr::core::list< T >::Iterator [inline]
operator--(s32)irr::core::list< T >::Iterator [inline]
operator-=(s32 num)irr::core::list< T >::Iterator [inline]
operator->()irr::core::list< T >::Iterator [inline]
operator==(const Iterator &other) const irr::core::list< T >::Iterator [inline]
operator==(const ConstIterator &other) const irr::core::list< T >::Iterator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator.html new file mode 100644 index 0000000..dd22602 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1list_1_1_iterator.html @@ -0,0 +1,515 @@ + + + + +Irrlicht 3D Engine: irr::core::list< T >::Iterator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::list< T >::Iterator Class Reference
+
+
+ +

List iterator. + More...

+ +

#include <irrList.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Friends

+ +

Detailed Description

+

template<class T>
+class irr::core::list< T >::Iterator

+ +

List iterator.

+ +

Definition at line 38 of file irrList.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::list< T >::Iterator::Iterator () [inline]
+
+
+ +

Definition at line 41 of file irrList.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::Iterator::operator!= (const Iteratorother) const [inline]
+
+
+ +

Definition at line 66 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::Iterator::operator!= (const ConstIteratorother) const [inline]
+
+
+ +

Definition at line 68 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T& irr::core::list< T >::Iterator::operator* () [inline]
+
+
+ +

Definition at line 74 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator irr::core::list< T >::Iterator::operator+ (s32 num) const [inline]
+
+
+ +

Definition at line 61 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
Iterator& irr::core::list< T >::Iterator::operator++ () [inline]
+
+
+ +

Definition at line 43 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator irr::core::list< T >::Iterator::operator++ (s32 ) [inline]
+
+
+ +

Definition at line 45 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator& irr::core::list< T >::Iterator::operator+= (s32 num) [inline]
+
+
+ +

Definition at line 48 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator irr::core::list< T >::Iterator::operator- (s32 num) const [inline]
+
+
+ +

Definition at line 63 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
Iterator& irr::core::list< T >::Iterator::operator-- () [inline]
+
+
+ +

Definition at line 44 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator irr::core::list< T >::Iterator::operator-- (s32 ) [inline]
+
+
+ +

Definition at line 46 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
Iterator& irr::core::list< T >::Iterator::operator-= (s32 num) [inline]
+
+
+ +

Definition at line 62 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T* irr::core::list< T >::Iterator::operator-> () [inline]
+
+
+ +

Definition at line 75 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::Iterator::operator== (const Iteratorother) const [inline]
+
+
+ +

Definition at line 65 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::list< T >::Iterator::operator== (const ConstIteratorother) const [inline]
+
+
+ +

Definition at line 67 of file irrList.h.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<class T>
+ + + + +
friend class ConstIterator [friend]
+
+
+ +

Definition at line 83 of file irrList.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + +
friend class list< T > [friend]
+
+
+ +

Definition at line 82 of file irrList.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map-members.html new file mode 100644 index 0000000..41cfadd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map-members.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::map< KeyType, ValueType > Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map.html new file mode 100644 index 0000000..b63c5ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map.html @@ -0,0 +1,720 @@ + + + + +Irrlicht 3D Engine: irr::core::map< KeyType, ValueType > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::map< KeyType, ValueType > Class Template Reference
+
+
+ +

map template for associative arrays using a red-black tree + More...

+ +

#include <irrMap.h>

+ +

List of all members.

+

+Classes

+ +

+Public Types

+
    +
  • typedef RBTree< KeyType,
    +ValueType > Node +
+

+Public Member Functions

+ +

Detailed Description

+

template<class KeyType, class ValueType>
+class irr::core::map< KeyType, ValueType >

+ +

map template for associative arrays using a red-black tree

+ +

Definition at line 18 of file irrMap.h.

+

Member Typedef Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + +
typedef RBTree<KeyType,ValueType> irr::core::map< KeyType, ValueType >::Node
+
+
+ +

Definition at line 134 of file irrMap.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::map () [inline]
+
+
+ +

Definition at line 673 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::~map () [inline]
+
+
+ +

Definition at line 676 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::clear().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
void irr::core::map< KeyType, ValueType >::clear () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
Node* irr::core::map< KeyType, ValueType >::delink (const KeyType & k) [inline]
+
+
+ +

Removes a node from the tree and returns it.

+

The returned node must be deleted by the user

+
Parameters:
+ + +
kthe key to remove
+
+
+
Returns:
A pointer to the node, or 0 if not found
+ +

Definition at line 784 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::find().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
bool irr::core::map< KeyType, ValueType >::empty () const [inline]
+
+
+

Is the tree empty?

+
Returns:
Returns true if empty, false if not
+ +

Definition at line 889 of file irrMap.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.

+ +

Referenced by irr::core::map< KeyType, ValueType >::isEmpty().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
Node* irr::core::map< KeyType, ValueType >::find (const KeyType & keyToFind) const [inline]
+
+
+

Search for a node with the specified key.

+
Parameters:
+ + +
keyToFind,:The key to find
+
+
+
Returns:
Returns 0 if node couldn't be found.
+ +

Definition at line 904 of file irrMap.h.

+ +

Referenced by irr::core::map< KeyType, ValueType >::delink(), irr::core::map< KeyType, ValueType >::AccessClass::operator ValueType(), irr::core::map< KeyType, ValueType >::remove(), and irr::core::map< KeyType, ValueType >::set().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
ConstIterator irr::core::map< KeyType, ValueType >::getConstIterator () const [inline]
+
+
+ +

Returns a Constiterator.

+ +

Definition at line 960 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::getRoot().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Iterator irr::core::map< KeyType, ValueType >::getIterator () const [inline]
+
+
+ +

Returns an iterator.

+ +

Definition at line 953 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::getRoot().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
ParentFirstIterator irr::core::map< KeyType, ValueType >::getParentFirstIterator () const [inline]
+
+
+

Returns a ParentFirstIterator. Traverses the tree from top to bottom. Typical usage is when storing the tree structure, because when reading it later (and inserting elements) the tree structure will be the same.

+ +

Definition at line 971 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::getRoot().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
ParentLastIterator irr::core::map< KeyType, ValueType >::getParentLastIterator () const [inline]
+
+
+

Returns a ParentLastIterator to traverse the tree from bottom to top. Typical usage is when deleting all elements in the tree because you must delete the children before you delete their parent.

+ +

Definition at line 982 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::getRoot().

+ +

Referenced by irr::core::map< KeyType, ValueType >::clear().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::getRoot () const [inline]
+
+
+

Gets the root element.

+
Returns:
Returns a pointer to the root node, or 0 if the tree is empty.
+ +

Definition at line 926 of file irrMap.h.

+ +

Referenced by irr::core::map< KeyType, ValueType >::getConstIterator(), irr::core::map< KeyType, ValueType >::getIterator(), irr::core::map< KeyType, ValueType >::getParentFirstIterator(), and irr::core::map< KeyType, ValueType >::getParentLastIterator().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::map< KeyType, ValueType >::insert (const KeyType & keyNew,
const ValueType & v 
) [inline]
+
+
+ +

Inserts a new node into the tree.

+
Parameters:
+ + + +
keyNew,:the index for this value
v,:the value to insert
+
+
+
Returns:
True if successful, false if it fails (already exists)
+ +

Definition at line 689 of file irrMap.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.

+ +

Referenced by irr::core::map< KeyType, ValueType >::set().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
_IRR_DEPRECATED_ bool irr::core::map< KeyType, ValueType >::isEmpty () const [inline]
+
+
+
Deprecated:
Use empty() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 896 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::empty().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
AccessClass irr::core::map< KeyType, ValueType >::operator[] (const KeyType & k) [inline]
+
+
+ +

operator [] for access to elements

+

for example myMap["key"]

+ +

Definition at line 994 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
bool irr::core::map< KeyType, ValueType >::remove (const KeyType & k) [inline]
+
+
+ +

Removes a node from the tree and deletes it.

+
Returns:
True if the node was found and deleted
+ +

Definition at line 823 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::find().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
bool irr::core::map< KeyType, ValueType >::remove (Nodep) [inline]
+
+
+ +

Removes a node from the tree and deletes it.

+
Returns:
True if the node was found and deleted
+ +

Definition at line 831 of file irrMap.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + + + + + + + + + + + +
void irr::core::map< KeyType, ValueType >::set (const KeyType & k,
const ValueType & v 
) [inline]
+
+
+ +

Replaces the value if the key already exists, otherwise inserts a new element.

+
Parameters:
+ + + +
kThe index for this value
vThe new value of
+
+
+ +

Definition at line 771 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::find(), and irr::core::map< KeyType, ValueType >::insert().

+ +

Referenced by irr::core::map< KeyType, ValueType >::AccessClass::operator=().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
u32 irr::core::map< KeyType, ValueType >::size () const [inline]
+
+
+ +

Returns the number of nodes in the tree.

+ +

Definition at line 932 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::swap (map< KeyType, ValueType > & other) [inline]
+
+
+ +

Swap the content of this map container with the content of another map.

+

Afterwards this object will contain the content of the other object and the other object will contain the content of this object. Iterators will afterwards be valid for the swapped object.

+
Parameters:
+ + +
otherSwap content with this object
+
+
+ +

Definition at line 942 of file irrMap.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class-members.html new file mode 100644 index 0000000..722c3d9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::map< KeyType, ValueType >::AccessClass Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class.html new file mode 100644 index 0000000..999a216 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_access_class.html @@ -0,0 +1,214 @@ + + + + +Irrlicht 3D Engine: irr::core::map< KeyType, ValueType >::AccessClass Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::map< KeyType, ValueType >::AccessClass Class Reference
+
+
+ +

#include <irrMap.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Friends

+ +

Detailed Description

+

template<class KeyType, class ValueType>
+class irr::core::map< KeyType, ValueType >::AccessClass

+ + +

Definition at line 635 of file irrMap.h.

+

Member Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::AccessClass::operator ValueType () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::AccessClass::operator= (const ValueType & value) [inline]
+
+
+ +

Definition at line 643 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::set().

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + +
friend class map< KeyType, ValueType > [friend]
+
+
+ +

Definition at line 638 of file irrMap.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator-members.html new file mode 100644 index 0000000..7d2904b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator.html new file mode 100644 index 0000000..f2ed493 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_const_iterator.html @@ -0,0 +1,445 @@ + + + + +Irrlicht 3D Engine: irr::core::map< KeyType, ValueType >::ConstIterator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::map< KeyType, ValueType >::ConstIterator Class Reference
+
+
+ +

Const Iterator. + More...

+ +

#include <irrMap.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Friends

+ +

Detailed Description

+

template<class KeyType, class ValueType>
+class irr::core::map< KeyType, ValueType >::ConstIterator

+ +

Const Iterator.

+ +

Definition at line 287 of file irrMap.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::ConstIterator::ConstIterator () [inline]
+
+
+ +

Definition at line 292 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::ConstIterator::ConstIterator (const Noderoot) [inline]
+
+
+ +

Definition at line 295 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::ConstIterator::reset().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::ConstIterator::ConstIterator (const ConstIteratorsrc) [inline]
+
+
+ +

Definition at line 301 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::ConstIterator::ConstIterator (const Iteratorsrc) [inline]
+
+
+ +

Definition at line 302 of file irrMap.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
bool irr::core::map< KeyType, ValueType >::ConstIterator::atEnd () const [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
const Node* irr::core::map< KeyType, ValueType >::ConstIterator::getNode () const [inline]
+
+
+ +

Definition at line 318 of file irrMap.h.

+ +

Referenced by irr::core::map< KeyType, ValueType >::ConstIterator::operator->().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
const Node& irr::core::map< KeyType, ValueType >::ConstIterator::operator* () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::ConstIterator::operator++ (int ) [inline]
+
+
+ +

Definition at line 330 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::ConstIterator::operator-- (int ) [inline]
+
+
+ +

Definition at line 335 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
const Node* irr::core::map< KeyType, ValueType >::ConstIterator::operator-> () [inline]
+
+
+ +

Definition at line 340 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::ConstIterator::getNode().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
ConstIterator& irr::core::map< KeyType, ValueType >::ConstIterator::operator= (const ConstIteratorsrc) [inline]
+
+
+ +

Definition at line 323 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::ConstIterator::reset (bool atLowest = true) [inline]
+
+
+ +

Definition at line 304 of file irrMap.h.

+ +

Referenced by irr::core::map< KeyType, ValueType >::ConstIterator::ConstIterator().

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + +
friend class Iterator [friend]
+
+
+ +

Definition at line 289 of file irrMap.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator-members.html new file mode 100644 index 0000000..423cbd6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator.html new file mode 100644 index 0000000..c8238eb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_iterator.html @@ -0,0 +1,423 @@ + + + + +Irrlicht 3D Engine: irr::core::map< KeyType, ValueType >::Iterator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::map< KeyType, ValueType >::Iterator Class Reference
+
+
+ +

Normal Iterator. + More...

+ +

#include <irrMap.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Friends

+ +

Detailed Description

+

template<class KeyType, class ValueType>
+class irr::core::map< KeyType, ValueType >::Iterator

+ +

Normal Iterator.

+ +

Definition at line 139 of file irrMap.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::Iterator::Iterator () [inline]
+
+
+ +

Definition at line 144 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::Iterator::Iterator (Noderoot) [inline]
+
+
+ +

Definition at line 147 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::Iterator::reset().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::Iterator::Iterator (const Iteratorsrc) [inline]
+
+
+ +

Definition at line 153 of file irrMap.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
bool irr::core::map< KeyType, ValueType >::Iterator::atEnd () const [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::Iterator::getNode () const [inline]
+
+
+ +

Definition at line 169 of file irrMap.h.

+ +

Referenced by irr::core::map< KeyType, ValueType >::Iterator::operator->().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node& irr::core::map< KeyType, ValueType >::Iterator::operator* () [inline]
+
+
+ +

Definition at line 196 of file irrMap.h.

+ +

References _IRR_DEBUG_BREAK_IF, and irr::core::map< KeyType, ValueType >::Iterator::atEnd().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::Iterator::operator++ (int ) [inline]
+
+
+ +

Definition at line 181 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::Iterator::operator-- (int ) [inline]
+
+
+ +

Definition at line 186 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::Iterator::operator-> () [inline]
+
+
+ +

Definition at line 191 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::Iterator::getNode().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
Iterator& irr::core::map< KeyType, ValueType >::Iterator::operator= (const Iteratorsrc) [inline]
+
+
+ +

Definition at line 174 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::Iterator::reset (bool atLowest = true) [inline]
+
+
+ +

Definition at line 155 of file irrMap.h.

+ +

Referenced by irr::core::map< KeyType, ValueType >::Iterator::Iterator().

+ +
+
+

Friends And Related Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + +
friend class ConstIterator [friend]
+
+
+ +

Definition at line 141 of file irrMap.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator-members.html new file mode 100644 index 0000000..41b50ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator.html new file mode 100644 index 0000000..3dc011b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_first_iterator.html @@ -0,0 +1,355 @@ + + + + +Irrlicht 3D Engine: irr::core::map< KeyType, ValueType >::ParentFirstIterator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::map< KeyType, ValueType >::ParentFirstIterator Class Reference
+
+
+ +

Parent First Iterator. + More...

+ +

#include <irrMap.h>

+ +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

template<class KeyType, class ValueType>
+class irr::core::map< KeyType, ValueType >::ParentFirstIterator

+ +

Parent First Iterator.

+

Traverses the tree from top to bottom. Typical usage is when storing the tree structure, because when reading it later (and inserting elements) the tree structure will be the same.

+ +

Definition at line 441 of file irrMap.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::ParentFirstIterator::ParentFirstIterator () [inline]
+
+
+ +

Definition at line 445 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::ParentFirstIterator::ParentFirstIterator (Noderoot) [inline, explicit]
+
+
+ +

Definition at line 447 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::ParentFirstIterator::reset().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
bool irr::core::map< KeyType, ValueType >::ParentFirstIterator::atEnd () const [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::ParentFirstIterator::getNode () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node& irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator* () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator++ (int ) [inline]
+
+
+ +

Definition at line 475 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator-> () [inline]
+
+
+ +

Definition at line 480 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::ParentFirstIterator::getNode().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
ParentFirstIterator& irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator= (const ParentFirstIteratorsrc) [inline]
+
+
+ +

Definition at line 468 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
void irr::core::map< KeyType, ValueType >::ParentFirstIterator::reset () [inline]
+
+ +
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator-members.html new file mode 100644 index 0000000..9dec1d5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator.html new file mode 100644 index 0000000..327b48f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1map_1_1_parent_last_iterator.html @@ -0,0 +1,355 @@ + + + + +Irrlicht 3D Engine: irr::core::map< KeyType, ValueType >::ParentLastIterator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::map< KeyType, ValueType >::ParentLastIterator Class Reference
+
+
+ +

Parent Last Iterator. + More...

+ +

#include <irrMap.h>

+ +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

template<class KeyType, class ValueType>
+class irr::core::map< KeyType, ValueType >::ParentLastIterator

+ +

Parent Last Iterator.

+

Traverse the tree from bottom to top. Typical usage is when deleting all elements in the tree because you must delete the children before you delete their parent.

+ +

Definition at line 541 of file irrMap.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
irr::core::map< KeyType, ValueType >::ParentLastIterator::ParentLastIterator () [inline]
+
+
+ +

Definition at line 545 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
irr::core::map< KeyType, ValueType >::ParentLastIterator::ParentLastIterator (Noderoot) [inline, explicit]
+
+
+ +

Definition at line 547 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::ParentLastIterator::reset().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
bool irr::core::map< KeyType, ValueType >::ParentLastIterator::atEnd () const [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::ParentLastIterator::getNode () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node& irr::core::map< KeyType, ValueType >::ParentLastIterator::operator* () [inline]
+
+ +
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
void irr::core::map< KeyType, ValueType >::ParentLastIterator::operator++ (int ) [inline]
+
+
+ +

Definition at line 575 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
Node* irr::core::map< KeyType, ValueType >::ParentLastIterator::operator-> () [inline]
+
+
+ +

Definition at line 580 of file irrMap.h.

+ +

References irr::core::map< KeyType, ValueType >::ParentLastIterator::getNode().

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + + +
ParentLastIterator& irr::core::map< KeyType, ValueType >::ParentLastIterator::operator= (const ParentLastIteratorsrc) [inline]
+
+
+ +

Definition at line 568 of file irrMap.h.

+ +
+
+ +
+
+
+template<class KeyType, class ValueType>
+ + + + + + + +
void irr::core::map< KeyType, ValueType >::ParentLastIterator::reset () [inline]
+
+ +
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d-members.html new file mode 100644 index 0000000..d0a2ee2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d-members.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::plane3d< T > Member List
+
+
+This is the complete list of members for irr::core::plane3d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
classifyPointRelation(const vector3d< T > &point) const irr::core::plane3d< T > [inline]
Dirr::core::plane3d< T >
existsIntersection(const plane3d< T > &other) const irr::core::plane3d< T > [inline]
getDistanceTo(const vector3d< T > &point) const irr::core::plane3d< T > [inline]
getIntersectionWithLimitedLine(const vector3d< T > &linePoint1, const vector3d< T > &linePoint2, vector3d< T > &outIntersection) const irr::core::plane3d< T > [inline]
getIntersectionWithLine(const vector3d< T > &linePoint, const vector3d< T > &lineVect, vector3d< T > &outIntersection) const irr::core::plane3d< T > [inline]
getIntersectionWithPlane(const plane3d< T > &other, vector3d< T > &outLinePoint, vector3d< T > &outLineVect) const irr::core::plane3d< T > [inline]
getIntersectionWithPlanes(const plane3d< T > &o1, const plane3d< T > &o2, vector3d< T > &outPoint) const irr::core::plane3d< T > [inline]
getKnownIntersectionWithLine(const vector3d< T > &linePoint1, const vector3d< T > &linePoint2) const irr::core::plane3d< T > [inline]
getMemberPoint() const irr::core::plane3d< T > [inline]
isFrontFacing(const vector3d< T > &lookDirection) const irr::core::plane3d< T > [inline]
Normalirr::core::plane3d< T >
operator!=(const plane3d< T > &other) const irr::core::plane3d< T > [inline]
operator==(const plane3d< T > &other) const irr::core::plane3d< T > [inline]
plane3d()irr::core::plane3d< T > [inline]
plane3d(const vector3d< T > &MPoint, const vector3d< T > &Normal)irr::core::plane3d< T > [inline]
plane3d(T px, T py, T pz, T nx, T ny, T nz)irr::core::plane3d< T > [inline]
plane3d(const vector3d< T > &point1, const vector3d< T > &point2, const vector3d< T > &point3)irr::core::plane3d< T > [inline]
plane3d(const vector3d< T > &normal, const T d)irr::core::plane3d< T > [inline]
recalculateD(const vector3d< T > &MPoint)irr::core::plane3d< T > [inline]
setPlane(const vector3d< T > &point, const vector3d< T > &nvector)irr::core::plane3d< T > [inline]
setPlane(const vector3d< T > &nvect, T d)irr::core::plane3d< T > [inline]
setPlane(const vector3d< T > &point1, const vector3d< T > &point2, const vector3d< T > &point3)irr::core::plane3d< T > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d.html new file mode 100644 index 0000000..647104b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1plane3d.html @@ -0,0 +1,927 @@ + + + + +Irrlicht 3D Engine: irr::core::plane3d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::plane3d< T > Class Template Reference
+
+
+ +

Template plane class with some intersection testing methods. + More...

+ +

#include <plane3d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • T D +
    Distance from origin.
  • vector3d< T > Normal +
    Normal vector of the plane.
+

Detailed Description

+

template<class T>
+class irr::core::plane3d< T >

+ +

Template plane class with some intersection testing methods.

+

It has to be ensured, that the normal is always normalized. The constructors and setters of this class will not ensure this automatically. So any normal passed in has to be normalized in advance. No change to the normal will be made by any of the class methods.

+ +

Definition at line 33 of file plane3d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::plane3d< T >::plane3d () [inline]
+
+
+ +

Definition at line 39 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::plane3d< T >::plane3d (const vector3d< T > & MPoint,
const vector3d< T > & Normal 
) [inline]
+
+
+ +

Definition at line 41 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::plane3d< T >::plane3d (px,
py,
pz,
nx,
ny,
nz 
) [inline]
+
+
+ +

Definition at line 43 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::plane3d< T >::plane3d (const vector3d< T > & point1,
const vector3d< T > & point2,
const vector3d< T > & point3 
) [inline]
+
+
+ +

Definition at line 45 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::plane3d< T >::plane3d (const vector3d< T > & normal,
const T d 
) [inline]
+
+
+ +

Definition at line 48 of file plane3d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
EIntersectionRelation3D irr::core::plane3d< T >::classifyPointRelation (const vector3d< T > & point) const [inline]
+
+
+ +

Classifies the relation of a point to this plane.

+
Parameters:
+ + +
pointPoint to classify its relation.
+
+
+
Returns:
ISREL3D_FRONT if the point is in front of the plane, ISREL3D_BACK if the point is behind of the plane, and ISREL3D_PLANAR if the point is within the plane.
+ +

Definition at line 135 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::plane3d< T >::existsIntersection (const plane3d< T > & other) const [inline]
+
+
+ +

Tests if there is an intersection with the other plane.

+
Returns:
True if there is a intersection.
+ +

Definition at line 162 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::plane3d< T >::getDistanceTo (const vector3d< T > & point) const [inline]
+
+
+ +

Get the distance to a point.

+

Note that this only works if the normal is normalized.

+ +

Definition at line 222 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::plane3d< T >::getIntersectionWithLimitedLine (const vector3d< T > & linePoint1,
const vector3d< T > & linePoint2,
vector3d< T > & outIntersection 
) const [inline]
+
+
+ +

Get an intersection with a 3d line, limited between two 3d points.

+
Parameters:
+ + + + +
linePoint1Point 1 of the line.
linePoint2Point 2 of the line.
outIntersectionPlace to store the intersection point, if there is one.
+
+
+
Returns:
True if there was an intersection, false if there was not.
+ +

Definition at line 121 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::plane3d< T >::getIntersectionWithLine (const vector3d< T > & linePoint,
const vector3d< T > & lineVect,
vector3d< T > & outIntersection 
) const [inline]
+
+
+ +

Get an intersection with a 3d line.

+
Parameters:
+ + + + +
lineVectVector of the line to intersect with.
linePointPoint of the line to intersect with.
outIntersectionPlace to store the intersection point, if there is one.
+
+
+
Returns:
True if there was an intersection, false if there was not.
+ +

Definition at line 86 of file plane3d.h.

+ +

Referenced by irr::core::plane3d< f32 >::getIntersectionWithLimitedLine(), and irr::core::plane3d< f32 >::getIntersectionWithPlanes().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::plane3d< T >::getIntersectionWithPlane (const plane3d< T > & other,
vector3d< T > & outLinePoint,
vector3d< T > & outLineVect 
) const [inline]
+
+
+ +

Intersects this plane with another.

+
Parameters:
+ + + + +
otherOther plane to intersect with.
outLinePointBase point of intersection line.
outLineVectVector of intersection.
+
+
+
Returns:
True if there is a intersection, false if not.
+ +

Definition at line 173 of file plane3d.h.

+ +

Referenced by irr::core::plane3d< f32 >::getIntersectionWithPlanes().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::plane3d< T >::getIntersectionWithPlanes (const plane3d< T > & o1,
const plane3d< T > & o2,
vector3d< T > & outPoint 
) const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
f32 irr::core::plane3d< T >::getKnownIntersectionWithLine (const vector3d< T > & linePoint1,
const vector3d< T > & linePoint2 
) const [inline]
+
+
+ +

Get percentage of line between two points where an intersection with this plane happens.

+

Only useful if known that there is an intersection.

+
Parameters:
+ + + +
linePoint1Point1 of the line to intersect with.
linePoint2Point2 of the line to intersect with.
+
+
+
Returns:
Where on a line between two points an intersection with this plane happened. For example, 0.5 is returned if the intersection happened exactly in the middle of the two points.
+ +

Definition at line 107 of file plane3d.h.

+ +

Referenced by irr::scene::SViewFrustum::clipLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::plane3d< T >::getMemberPoint () const [inline]
+
+
+ +

Gets a member point of the plane.

+ +

Definition at line 155 of file plane3d.h.

+ +

Referenced by irr::core::CMatrix4< T >::transformPlane().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::plane3d< T >::isFrontFacing (const vector3d< T > & lookDirection) const [inline]
+
+
+ +

Test if the triangle would be front or backfacing from any point.

+

Thus, this method assumes a camera position from which the triangle is definitely visible when looking into the given direction. Note that this only works if the normal is Normalized. Do not use this method with points as it will give wrong results!

+
Parameters:
+ + +
lookDirection,:Look direction.
+
+
+
Returns:
True if the plane is front facing and false if it is backfacing.
+ +

Definition at line 214 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::plane3d< T >::operator!= (const plane3d< T > & other) const [inline]
+
+
+ +

Definition at line 54 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::plane3d< T >::operator== (const plane3d< T > & other) const [inline]
+
+
+ +

Definition at line 52 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::plane3d< T >::recalculateD (const vector3d< T > & MPoint) [inline]
+
+
+ +

Recalculates the distance from origin by applying a new member point to the plane.

+ +

Definition at line 149 of file plane3d.h.

+ +

Referenced by irr::core::plane3d< f32 >::plane3d(), and irr::core::plane3d< f32 >::setPlane().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::plane3d< T >::setPlane (const vector3d< T > & point,
const vector3d< T > & nvector 
) [inline]
+
+
+ +

Definition at line 58 of file plane3d.h.

+ +

Referenced by irr::core::plane3d< f32 >::plane3d(), and irr::core::CMatrix4< T >::transformPlane().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::plane3d< T >::setPlane (const vector3d< T > & nvect,
d 
) [inline]
+
+
+ +

Definition at line 64 of file plane3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::plane3d< T >::setPlane (const vector3d< T > & point1,
const vector3d< T > & point2,
const vector3d< T > & point3 
) [inline]
+
+
+ +

Definition at line 70 of file plane3d.h.

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion-members.html new file mode 100644 index 0000000..2fa4af5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion-members.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::quaternion Member List
+
+
+This is the complete list of members for irr::core::quaternion, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
dotProduct(const quaternion &other) const irr::core::quaternion [inline]
equals(const quaternion &other, const f32 tolerance=ROUNDING_ERROR_f32) const irr::core::quaternion [inline]
fromAngleAxis(f32 angle, const vector3df &axis)irr::core::quaternion [inline]
getMatrix() const irr::core::quaternion [inline]
getMatrix(matrix4 &dest, const core::vector3df &translation=core::vector3df()) const irr::core::quaternion [inline]
getMatrix_transposed(matrix4 &dest) const irr::core::quaternion [inline]
getMatrixCenter(matrix4 &dest, const core::vector3df &center, const core::vector3df &translation) const irr::core::quaternion [inline]
lerp(quaternion q1, quaternion q2, f32 time)irr::core::quaternion [inline]
makeIdentity()irr::core::quaternion [inline]
makeInverse()irr::core::quaternion [inline]
normalize()irr::core::quaternion [inline]
operator!=(const quaternion &other) const irr::core::quaternion [inline]
operator*(const quaternion &other) const irr::core::quaternion [inline]
operator*(f32 s) const irr::core::quaternion [inline]
operator*(const vector3df &v) const irr::core::quaternion [inline]
operator*=(f32 s)irr::core::quaternion [inline]
operator*=(const quaternion &other)irr::core::quaternion [inline]
operator+(const quaternion &other) const irr::core::quaternion [inline]
operator=(const quaternion &other)irr::core::quaternion [inline]
operator=(const matrix4 &other)irr::core::quaternion [inline]
operator==(const quaternion &other) const irr::core::quaternion [inline]
quaternion()irr::core::quaternion [inline]
quaternion(f32 x, f32 y, f32 z, f32 w)irr::core::quaternion [inline]
quaternion(f32 x, f32 y, f32 z)irr::core::quaternion [inline]
quaternion(const vector3df &vec)irr::core::quaternion [inline]
quaternion(const matrix4 &mat)irr::core::quaternion [inline]
rotationFromTo(const vector3df &from, const vector3df &to)irr::core::quaternion [inline]
set(f32 x, f32 y, f32 z, f32 w)irr::core::quaternion [inline]
set(f32 x, f32 y, f32 z)irr::core::quaternion [inline]
set(const core::vector3df &vec)irr::core::quaternion [inline]
set(const core::quaternion &quat)irr::core::quaternion [inline]
slerp(quaternion q1, quaternion q2, f32 time, f32 threshold=.05f)irr::core::quaternion [inline]
toAngleAxis(f32 &angle, core::vector3df &axis) const irr::core::quaternion [inline]
toEuler(vector3df &euler) const irr::core::quaternion [inline]
Wirr::core::quaternion
Xirr::core::quaternion
Yirr::core::quaternion
Zirr::core::quaternion
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion.html new file mode 100644 index 0000000..0f4dbb7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1quaternion.html @@ -0,0 +1,1240 @@ + + + + +Irrlicht 3D Engine: irr::core::quaternion Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::quaternion Class Reference
+
+
+ +

Quaternion class for representing rotations. + More...

+ +

#include <quaternion.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Quaternion class for representing rotations.

+

It provides cheap combinations and avoids gimbal locks. Also useful for interpolations.

+ +

Definition at line 26 of file quaternion.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::core::quaternion::quaternion () [inline]
+
+
+ +

Default Constructor.

+ +

Definition at line 31 of file quaternion.h.

+ +

Referenced by operator*(), and operator+().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::quaternion::quaternion (f32 x,
f32 y,
f32 z,
f32 w 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 34 of file quaternion.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::quaternion::quaternion (f32 x,
f32 y,
f32 z 
) [inline]
+
+
+ +

Constructor which converts euler angles (radians) to a quaternion.

+ +

Definition at line 187 of file quaternion.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::core::quaternion::quaternion (const vector3dfvec) [inline]
+
+
+ +

Constructor which converts euler angles (radians) to a quaternion.

+ +

Definition at line 194 of file quaternion.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+ + + + + + + + +
irr::core::quaternion::quaternion (const matrix4mat) [inline]
+
+
+ +

Constructor which converts a matrix to a quaternion.

+ +

Definition at line 201 of file quaternion.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
f32 irr::core::quaternion::dotProduct (const quaternionother) const [inline]
+
+
+ +

Calculates the dot product.

+ +

Definition at line 556 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +

Referenced by slerp().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::quaternion::equals (const quaternionother,
const f32 tolerance = ROUNDING_ERROR_f32 
) const [inline]
+
+
+ +

returns if this quaternion equals the other one, taking floating point rounding errors into account

+ +

Definition at line 500 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
quaternion & irr::core::quaternion::fromAngleAxis (f32 angle,
const vector3dfaxis 
) [inline]
+
+
+ +

Create quaternion from rotation angle and rotation axis.

+

axis must be unit length, angle in radians

+

Axis must be unit length. The quaternion representing the rotation is q = cos(A/2)+sin(A/2)*(x*i+y*j+z*k).

+
Parameters:
+ + + +
angleRotation Angle in radians.
axisRotation axis.
+
+
+ +

Definition at line 563 of file quaternion.h.

+ +

References W, X, irr::core::vector3d< T >::X, Y, irr::core::vector3d< T >::Y, Z, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+ + + + + + + +
matrix4 irr::core::quaternion::getMatrix () const [inline]
+
+
+ +

Creates a matrix from this quaternion.

+ +

Definition at line 338 of file quaternion.h.

+ +

Referenced by irr::scene::SMD3QuaternionTag::setto().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::core::quaternion::getMatrix (matrix4dest,
const core::vector3dfcenter = core::vector3df() 
) const [inline]
+
+
+ +

Creates a matrix from this quaternion.

+

Creates a matrix from this quaternion

+ +

Definition at line 349 of file quaternion.h.

+ +

References irr::core::CMatrix4< T >::setDefinitelyIdentityMatrix(), W, X, irr::core::vector3d< T >::X, Y, irr::core::vector3d< T >::Y, Z, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+ + + + + + + + +
void irr::core::quaternion::getMatrix_transposed (matrix4dest) const [inline]
+
+
+ +

Creates a matrix from this quaternion.

+ +

Definition at line 411 of file quaternion.h.

+ +

References irr::core::CMatrix4< T >::setDefinitelyIdentityMatrix(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::quaternion::getMatrixCenter (matrix4dest,
const core::vector3dfcenter,
const core::vector3dftranslation 
) const [inline]
+
+
+

Creates a matrix from this quaternion Rotate about a center point shortcut for core::quaternion q; q.rotationFromTo ( vin[i].Normal, forward ); q.getMatrixCenter ( lookat, center, newPos );

+

core::matrix4 m2; m2.setInverseTranslation ( center ); lookat *= m2;

+

core::matrix4 m3; m2.setTranslation ( newPos ); lookat *= m3;

+

Creates a matrix from this quaternion Rotate about a center point shortcut for core::quaternion q; q.rotationFromTo(vin[i].Normal, forward); q.getMatrix(lookat, center);

+

core::matrix4 m2; m2.setInverseTranslation(center); lookat *= m2;

+ +

Definition at line 388 of file quaternion.h.

+ +

References irr::core::CMatrix4< T >::setRotationCenter(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
quaternion & irr::core::quaternion::lerp (quaternion q1,
quaternion q2,
f32 time 
) [inline]
+
+
+ +

Set this quaternion to the linear interpolation between two quaternions.

+
Parameters:
+ + + + +
q1First quaternion to be interpolated.
q2Second quaternion to be interpolated.
timeProgress of interpolation. For time=0 the result is q1, for time=1 the result is q2. Otherwise interpolation between q1 and q2.
+
+
+ +

Definition at line 523 of file quaternion.h.

+ +

Referenced by slerp().

+ +
+
+ +
+
+ + + + + + + +
core::quaternion & irr::core::quaternion::makeIdentity () [inline]
+
+
+ +

Set quaternion to identity.

+ +

Definition at line 649 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +

Referenced by rotationFromTo().

+ +
+
+ +
+
+ + + + + + + +
quaternion & irr::core::quaternion::makeInverse () [inline]
+
+
+ +

Inverts this quaternion.

+ +

Definition at line 438 of file quaternion.h.

+ +

References X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + +
quaternion & irr::core::quaternion::normalize () [inline]
+
+
+ +

Normalizes the quaternion.

+ +

Definition at line 510 of file quaternion.h.

+ +

References irr::core::reciprocal_squareroot(), W, X, Y, and Z.

+ +

Referenced by operator=(), rotationFromTo(), and set().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::core::quaternion::operator!= (const quaternionother) const [inline]
+
+
+ +

inequality operator

+ +

Definition at line 217 of file quaternion.h.

+ +
+
+ +
+
+ + + + + + + + +
quaternion irr::core::quaternion::operator* (const quaternionother) const [inline]
+
+
+ +

Multiplication operator.

+ +

Definition at line 294 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion irr::core::quaternion::operator* (f32 s) const [inline]
+
+
+ +

Multiplication operator with scalar.

+ +

Definition at line 308 of file quaternion.h.

+ +

References quaternion(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
vector3df irr::core::quaternion::operator* (const vector3dfv) const [inline]
+
+
+ +

Multiplication operator.

+ +

Definition at line 634 of file quaternion.h.

+ +

References irr::core::vector3d< T >::crossProduct(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion & irr::core::quaternion::operator*= (f32 s) [inline]
+
+
+ +

Multiplication operator with scalar.

+ +

Definition at line 315 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion & irr::core::quaternion::operator*= (const quaternionother) [inline]
+
+
+ +

Multiplication operator.

+ +

Definition at line 325 of file quaternion.h.

+ +
+
+ +
+
+ + + + + + + + +
quaternion irr::core::quaternion::operator+ (const quaternionother) const [inline]
+
+
+ +

Add operator.

+ +

Definition at line 331 of file quaternion.h.

+ +

References quaternion(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion & irr::core::quaternion::operator= (const quaternionother) [inline]
+
+
+ +

Assignment operator.

+ +

Definition at line 223 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion & irr::core::quaternion::operator= (const matrix4other) [inline]
+
+
+ +

Matrix assignment operator.

+ +

Definition at line 234 of file quaternion.h.

+ +

References normalize(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::core::quaternion::operator== (const quaternionother) const [inline]
+
+
+ +

Equalilty operator.

+ +

Definition at line 208 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
core::quaternion & irr::core::quaternion::rotationFromTo (const vector3dffrom,
const vector3dfto 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
quaternion & irr::core::quaternion::set (f32 x,
f32 y,
f32 z,
f32 w 
) [inline]
+
+
+ +

Sets new quaternion.

+ +

Definition at line 446 of file quaternion.h.

+ +

References W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
quaternion & irr::core::quaternion::set (f32 x,
f32 y,
f32 z 
) [inline]
+
+
+ +

Sets new quaternion based on euler angles (radians)

+ +

Definition at line 457 of file quaternion.h.

+ +

References normalize(), W, X, Y, and Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion & irr::core::quaternion::set (const core::vector3dfvec) [inline]
+
+
+ +

Sets new quaternion based on euler angles (radians)

+ +

Definition at line 487 of file quaternion.h.

+ +

References irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+ + + + + + + + +
quaternion & irr::core::quaternion::set (const core::quaternionquat) [inline]
+
+
+ +

Sets new quaternion from other quaternion.

+ +

Definition at line 493 of file quaternion.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
quaternion & irr::core::quaternion::slerp (quaternion q1,
quaternion q2,
f32 time,
f32 threshold = .05f 
) [inline]
+
+
+ +

Set this quaternion to the result of the spherical interpolation between two quaternions.

+
Parameters:
+ + + + + +
q1First quaternion to be interpolated.
q2Second quaternion to be interpolated.
timeProgress of interpolation. For time=0 the result is q1, for time=1 the result is q2. Otherwise interpolation between q1 and q2.
thresholdTo avoid inaccuracies at the end (time=1) the interpolation switches to linear interpolation at some point. This value defines how much of the remaining interpolation will be calculated with lerp. Everything from 1-threshold up will be linear interpolation.
+
+
+ +

Definition at line 531 of file quaternion.h.

+ +

References dotProduct(), lerp(), and irr::core::reciprocal().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::core::quaternion::toAngleAxis (f32angle,
core::vector3dfaxis 
) const [inline]
+
+
+ +

Fills an angle (radians) around an axis (unit vector)

+ +

Definition at line 575 of file quaternion.h.

+ +

References irr::core::iszero(), irr::core::reciprocal(), W, X, irr::core::vector3d< T >::X, Y, irr::core::vector3d< T >::Y, Z, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+ + + + + + + + +
void irr::core::quaternion::toEuler (vector3dfeuler) const [inline]
+
+
+ +

Output this quaternion to an euler angle (radians)

+ +

Definition at line 596 of file quaternion.h.

+ +

References irr::core::clamp(), irr::core::equals(), irr::core::PI64, W, X, irr::core::vector3d< T >::X, Y, irr::core::vector3d< T >::Y, Z, and irr::core::vector3d< T >::Z.

+ +
+
+

Member Data Documentation

+ + + + + + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect-members.html new file mode 100644 index 0000000..307e3ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect-members.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::rect< T > Member List
+
+
+This is the complete list of members for irr::core::rect< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + +
addInternalPoint(const position2d< T > &p)irr::core::rect< T > [inline]
addInternalPoint(T x, T y)irr::core::rect< T > [inline]
clipAgainst(const rect< T > &other)irr::core::rect< T > [inline]
constrainTo(const rect< T > &other)irr::core::rect< T > [inline]
getArea() const irr::core::rect< T > [inline]
getCenter() const irr::core::rect< T > [inline]
getHeight() const irr::core::rect< T > [inline]
getSize() const irr::core::rect< T > [inline]
getWidth() const irr::core::rect< T > [inline]
isPointInside(const position2d< T > &pos) const irr::core::rect< T > [inline]
isRectCollided(const rect< T > &other) const irr::core::rect< T > [inline]
isValid() const irr::core::rect< T > [inline]
LowerRightCornerirr::core::rect< T >
operator!=(const rect< T > &other) const irr::core::rect< T > [inline]
operator+(const position2d< T > &pos) const irr::core::rect< T > [inline]
operator+=(const position2d< T > &pos)irr::core::rect< T > [inline]
operator-(const position2d< T > &pos) const irr::core::rect< T > [inline]
operator-=(const position2d< T > &pos)irr::core::rect< T > [inline]
operator<(const rect< T > &other) const irr::core::rect< T > [inline]
operator==(const rect< T > &other) const irr::core::rect< T > [inline]
rect()irr::core::rect< T > [inline]
rect(T x, T y, T x2, T y2)irr::core::rect< T > [inline]
rect(const position2d< T > &upperLeft, const position2d< T > &lowerRight)irr::core::rect< T > [inline]
rect(const position2d< T > &pos, const dimension2d< U > &size)irr::core::rect< T > [inline]
repair()irr::core::rect< T > [inline]
UpperLeftCornerirr::core::rect< T >
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect.html new file mode 100644 index 0000000..82936d9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1rect.html @@ -0,0 +1,874 @@ + + + + +Irrlicht 3D Engine: irr::core::rect< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::rect< T > Class Template Reference
+
+
+ +

Rectangle template. + More...

+ +

#include <rect.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • rect () +
    Default constructor creating empty rectangle at (0,0)
  • rect (T x, T y, T x2, T y2) +
    Constructor with two corners.
  • rect (const position2d< T > &upperLeft, const position2d< T > &lowerRight) +
    Constructor with two corners.
  • template<class U > rect (const position2d< T > &pos, const dimension2d< U > &size) +
    Constructor with upper left corner and dimension.
  • void addInternalPoint (const position2d< T > &p) +
    Adds a point to the rectangle.
  • void addInternalPoint (T x, T y) +
    Adds a point to the bounding rectangle.
  • void clipAgainst (const rect< T > &other) +
    Clips this rectangle with another one.
  • bool constrainTo (const rect< T > &other) +
    Moves this rectangle to fit inside another one.
  • T getArea () const +
    Returns size of rectangle.
  • position2d< T > getCenter () const +
    Get the center of the rectangle.
  • T getHeight () const +
    Get height of rectangle.
  • dimension2d< T > getSize () const +
    Get the dimensions of the rectangle.
  • T getWidth () const +
    Get width of rectangle.
  • bool isPointInside (const position2d< T > &pos) const +
    Returns if a 2d point is within this rectangle.
  • bool isRectCollided (const rect< T > &other) const +
    Check if the rectangle collides with another rectangle.
  • bool isValid () const +
    Returns if the rect is valid to draw.
  • bool operator!= (const rect< T > &other) const +
    inequality operator
  • rect< T > operator+ (const position2d< T > &pos) const +
    move right by given numbers
  • rect< T > & operator+= (const position2d< T > &pos) +
    move right by given numbers
  • rect< T > operator- (const position2d< T > &pos) const +
    move left by given numbers
  • rect< T > & operator-= (const position2d< T > &pos) +
    move left by given numbers
  • bool operator< (const rect< T > &other) const +
    compares size of rectangles
  • bool operator== (const rect< T > &other) const +
    equality operator
  • void repair () +
    If the lower right corner of the rect is smaller then the upper left, the points are swapped.
+

+Public Attributes

+ +

Detailed Description

+

template<class T>
+class irr::core::rect< T >

+ +

Rectangle template.

+

Mostly used by 2D GUI elements and for 2D drawing methods. It has 2 positions instead of position and dimension and a fast method for collision detection with other rectangles and points.

+

Coordinates are (0,0) for top-left corner, and increasing to the right and to the bottom.

+ +

Definition at line 26 of file rect.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::rect< T >::rect () [inline]
+
+
+ +

Default constructor creating empty rectangle at (0,0)

+ +

Definition at line 31 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::rect< T >::rect (x,
y,
x2,
y2 
) [inline]
+
+
+ +

Constructor with two corners.

+ +

Definition at line 34 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::rect< T >::rect (const position2d< T > & upperLeft,
const position2d< T > & lowerRight 
) [inline]
+
+
+ +

Constructor with two corners.

+ +

Definition at line 38 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+
+template<class U >
+ + + + + + + + + + + + + + + + + + +
irr::core::rect< T >::rect (const position2d< T > & pos,
const dimension2d< U > & size 
) [inline]
+
+
+ +

Constructor with upper left corner and dimension.

+ +

Definition at line 43 of file rect.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::rect< T >::addInternalPoint (const position2d< T > & p) [inline]
+
+
+ +

Adds a point to the rectangle.

+

Causes the rectangle to grow bigger if point is outside of the box

+
Parameters:
+ + +
pPoint to add to the box.
+
+
+ +

Definition at line 241 of file rect.h.

+ +

Referenced by irr::core::rect< f32 >::addInternalPoint().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::rect< T >::addInternalPoint (x,
y 
) [inline]
+
+
+ +

Adds a point to the bounding rectangle.

+

Causes the rectangle to grow bigger if point is outside of the box

+
Parameters:
+ + + +
xX-Coordinate of the point to add to this box.
yY-Coordinate of the point to add to this box.
+
+
+ +

Definition at line 251 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::rect< T >::clipAgainst (const rect< T > & other) [inline]
+
+
+ +

Clips this rectangle with another one.

+
Parameters:
+ + +
otherRectangle to clip with
+
+
+ +

Definition at line 126 of file rect.h.

+ +

Referenced by irr::gui::IGUIElement::recalculateAbsolutePosition().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::rect< T >::constrainTo (const rect< T > & other) [inline]
+
+
+ +

Moves this rectangle to fit inside another one.

+
Returns:
True on success, false if not possible
+ +

Definition at line 147 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::rect< T >::getArea () const [inline]
+
+
+ +

Returns size of rectangle.

+ +

Definition at line 97 of file rect.h.

+ +

Referenced by irr::core::rect< f32 >::operator<().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
position2d<T> irr::core::rect< T >::getCenter () const [inline]
+
+
+ +

Get the center of the rectangle.

+ +

Definition at line 223 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::rect< T >::getHeight () const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + +
dimension2d<T> irr::core::rect< T >::getSize () const [inline]
+
+
+ +

Get the dimensions of the rectangle.

+ +

Definition at line 231 of file rect.h.

+ +

Referenced by irr::gui::IGUIElement::setRelativePosition(), and irr::gui::IGUIElement::setRelativePositionProportional().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::rect< T >::getWidth () const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::rect< T >::isPointInside (const position2d< T > & pos) const [inline]
+
+
+ +

Returns if a 2d point is within this rectangle.

+
Parameters:
+ + +
posPosition to test if it lies within this rectangle.
+
+
+
Returns:
True if the position is within the rectangle, false if not.
+ +

Definition at line 105 of file rect.h.

+ +

Referenced by irr::gui::IGUIElement::isPointInside().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::rect< T >::isRectCollided (const rect< T > & other) const [inline]
+
+
+ +

Check if the rectangle collides with another rectangle.

+
Parameters:
+ + +
otherRectangle to test collision with
+
+
+
Returns:
True if the rectangles collide.
+ +

Definition at line 116 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
bool irr::core::rect< T >::isValid () const [inline]
+
+
+ +

Returns if the rect is valid to draw.

+

It would be invalid if the UpperLeftCorner is lower or more right than the LowerRightCorner.

+ +

Definition at line 216 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::rect< T >::operator!= (const rect< T > & other) const [inline]
+
+
+ +

inequality operator

+ +

Definition at line 84 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
rect<T> irr::core::rect< T >::operator+ (const position2d< T > & pos) const [inline]
+
+
+ +

move right by given numbers

+ +

Definition at line 47 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
rect<T>& irr::core::rect< T >::operator+= (const position2d< T > & pos) [inline]
+
+
+ +

move right by given numbers

+ +

Definition at line 54 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
rect<T> irr::core::rect< T >::operator- (const position2d< T > & pos) const [inline]
+
+
+ +

move left by given numbers

+ +

Definition at line 62 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
rect<T>& irr::core::rect< T >::operator-= (const position2d< T > & pos) [inline]
+
+
+ +

move left by given numbers

+ +

Definition at line 69 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::rect< T >::operator< (const rect< T > & other) const [inline]
+
+
+ +

compares size of rectangles

+ +

Definition at line 91 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::rect< T >::operator== (const rect< T > & other) const [inline]
+
+
+ +

equality operator

+ +

Definition at line 77 of file rect.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
void irr::core::rect< T >::repair () [inline]
+
+
+ +

If the lower right corner of the rect is smaller then the upper left, the points are swapped.

+ +

Definition at line 196 of file rect.h.

+ +

Referenced by irr::gui::IGUIElement::recalculateAbsolutePosition().

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string-members.html new file mode 100644 index 0000000..5d4070a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string-members.html @@ -0,0 +1,187 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::string< T, TAlloc > Member List
+
+
+This is the complete list of members for irr::core::string< T, TAlloc >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(T character)irr::core::string< T, TAlloc > [inline]
append(const T *const other, u32 length=0xffffffff)irr::core::string< T, TAlloc > [inline]
append(const string< T, TAlloc > &other)irr::core::string< T, TAlloc > [inline]
append(const string< T, TAlloc > &other, u32 length)irr::core::string< T, TAlloc > [inline]
c_str() const irr::core::string< T, TAlloc > [inline]
char_type typedefirr::core::string< T, TAlloc >
empty() const irr::core::string< T, TAlloc > [inline]
equals_ignore_case(const string< T, TAlloc > &other) const irr::core::string< T, TAlloc > [inline]
equals_substring_ignore_case(const string< T, TAlloc > &other, const s32 sourcePos=0) const irr::core::string< T, TAlloc > [inline]
equalsn(const string< T, TAlloc > &other, u32 n) const irr::core::string< T, TAlloc > [inline]
equalsn(const T *const str, u32 n) const irr::core::string< T, TAlloc > [inline]
erase(u32 index)irr::core::string< T, TAlloc > [inline]
find(const B *const str, const u32 start=0) const irr::core::string< T, TAlloc > [inline]
findFirst(T c) const irr::core::string< T, TAlloc > [inline]
findFirstChar(const T *const c, u32 count=1) const irr::core::string< T, TAlloc > [inline]
findFirstCharNotInList(const B *const c, u32 count=1) const irr::core::string< T, TAlloc > [inline]
findLast(T c, s32 start=-1) const irr::core::string< T, TAlloc > [inline]
findLastChar(const T *const c, u32 count=1) const irr::core::string< T, TAlloc > [inline]
findLastCharNotInList(const B *const c, u32 count=1) const irr::core::string< T, TAlloc > [inline]
findNext(T c, u32 startPos) const irr::core::string< T, TAlloc > [inline]
lastChar() const irr::core::string< T, TAlloc > [inline]
lower_ignore_case(const string< T, TAlloc > &other) const irr::core::string< T, TAlloc > [inline]
make_lower()irr::core::string< T, TAlloc > [inline]
make_upper()irr::core::string< T, TAlloc > [inline]
operator!=(const T *const str) const irr::core::string< T, TAlloc > [inline]
operator!=(const string< T, TAlloc > &other) const irr::core::string< T, TAlloc > [inline]
operator+(const string< T, TAlloc > &other) const irr::core::string< T, TAlloc > [inline]
operator+(const B *const c) const irr::core::string< T, TAlloc > [inline]
operator+=(T c)irr::core::string< T, TAlloc > [inline]
operator+=(const T *const c)irr::core::string< T, TAlloc > [inline]
operator+=(const string< T, TAlloc > &other)irr::core::string< T, TAlloc > [inline]
operator+=(const int i)irr::core::string< T, TAlloc > [inline]
operator+=(const unsigned int i)irr::core::string< T, TAlloc > [inline]
operator+=(const long i)irr::core::string< T, TAlloc > [inline]
operator+=(const unsigned long i)irr::core::string< T, TAlloc > [inline]
operator+=(const double i)irr::core::string< T, TAlloc > [inline]
operator+=(const float i)irr::core::string< T, TAlloc > [inline]
operator<(const string< T, TAlloc > &other) const irr::core::string< T, TAlloc > [inline]
operator=(const string< T, TAlloc > &other)irr::core::string< T, TAlloc > [inline]
operator=(const string< B, A > &other)irr::core::string< T, TAlloc > [inline]
operator=(const B *const c)irr::core::string< T, TAlloc > [inline]
operator==(const T *const str) const irr::core::string< T, TAlloc > [inline]
operator==(const string< T, TAlloc > &other) const irr::core::string< T, TAlloc > [inline]
operator[](const u32 index)irr::core::string< T, TAlloc > [inline]
operator[](const u32 index) const irr::core::string< T, TAlloc > [inline]
remove(T c)irr::core::string< T, TAlloc > [inline]
remove(const string< T, TAlloc > &toRemove)irr::core::string< T, TAlloc > [inline]
removeChars(const string< T, TAlloc > &characters)irr::core::string< T, TAlloc > [inline]
replace(T toReplace, T replaceWith)irr::core::string< T, TAlloc > [inline]
replace(const string< T, TAlloc > &toReplace, const string< T, TAlloc > &replaceWith)irr::core::string< T, TAlloc > [inline]
reserve(u32 count)irr::core::string< T, TAlloc > [inline]
size() const irr::core::string< T, TAlloc > [inline]
split(container &ret, const T *const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const irr::core::string< T, TAlloc > [inline]
string()irr::core::string< T, TAlloc > [inline]
string(const string< T, TAlloc > &other)irr::core::string< T, TAlloc > [inline]
string(const string< B, A > &other)irr::core::string< T, TAlloc > [inline]
string(const double number)irr::core::string< T, TAlloc > [inline, explicit]
string(int number)irr::core::string< T, TAlloc > [inline, explicit]
string(unsigned int number)irr::core::string< T, TAlloc > [inline, explicit]
string(long number)irr::core::string< T, TAlloc > [inline, explicit]
string(unsigned long number)irr::core::string< T, TAlloc > [inline, explicit]
string(const B *const c, u32 length)irr::core::string< T, TAlloc > [inline]
string(const B *const c)irr::core::string< T, TAlloc > [inline]
subString(u32 begin, s32 length, bool make_lower=false) const irr::core::string< T, TAlloc > [inline]
trim(const string< T, TAlloc > &whitespace=" \t\n\r")irr::core::string< T, TAlloc > [inline]
validate()irr::core::string< T, TAlloc > [inline]
~string()irr::core::string< T, TAlloc > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string.html new file mode 100644 index 0000000..f2747fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1string.html @@ -0,0 +1,2237 @@ + + + + +Irrlicht 3D Engine: irr::core::string< T, TAlloc > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::string< T, TAlloc > Class Template Reference
+
+
+ +

#include <irrString.h>

+ +

List of all members.

+

+Public Types

+ +

+Public Member Functions

+
    +
  • string () +
    Default constructor.
  • string (const string< T, TAlloc > &other) +
    Constructor.
  • template<class B , class A > string (const string< B, A > &other) +
    Constructor from other string types.
  • string (const double number) +
    Constructs a string from a float.
  • string (int number) +
    Constructs a string from an int.
  • string (unsigned int number) +
    Constructs a string from an unsigned int.
  • string (long number) +
    Constructs a string from a long.
  • string (unsigned long number) +
    Constructs a string from an unsigned long.
  • template<class B > string (const B *const c, u32 length) +
    Constructor for copying a string from a pointer with a given length.
  • template<class B > string (const B *const c) +
    Constructor for unicode and ascii strings.
  • ~string () +
    Destructor.
  • string< T, TAlloc > & append (T character) +
    Appends a character to this string.
  • string< T, TAlloc > & append (const T *const other, u32 length=0xffffffff) +
    Appends a char string to this string.
  • string< T, TAlloc > & append (const string< T, TAlloc > &other) +
    Appends a string to this string.
  • string< T, TAlloc > & append (const string< T, TAlloc > &other, u32 length) +
    Appends a string of the length l to this string.
  • const T * c_str () const +
    Returns character string.
  • bool empty () const +
  • bool equals_ignore_case (const string< T, TAlloc > &other) const +
    Compares the strings ignoring case.
  • bool equals_substring_ignore_case (const string< T, TAlloc > &other, const s32 sourcePos=0) const +
    Compares the strings ignoring case.
  • bool equalsn (const string< T, TAlloc > &other, u32 n) const +
    compares the first n characters of the strings
  • bool equalsn (const T *const str, u32 n) const +
    compares the first n characters of the strings
  • string< T, TAlloc > & erase (u32 index) +
    Erases a character from the string.
  • template<class B > s32 find (const B *const str, const u32 start=0) const +
    finds another string in this string
  • s32 findFirst (T c) const +
    finds first occurrence of character in string
  • s32 findFirstChar (const T *const c, u32 count=1) const +
    finds first occurrence of a character of a list in string
  • template<class B > s32 findFirstCharNotInList (const B *const c, u32 count=1) const +
    Finds first position of a character not in a given list.
  • s32 findLast (T c, s32 start=-1) const +
    finds last occurrence of character in string
  • s32 findLastChar (const T *const c, u32 count=1) const +
    finds last occurrence of a character of a list in string
  • template<class B > s32 findLastCharNotInList (const B *const c, u32 count=1) const +
    Finds last position of a character not in a given list.
  • s32 findNext (T c, u32 startPos) const +
    finds next occurrence of character in string
  • T lastChar () const +
    gets the last char of a string or null
  • bool lower_ignore_case (const string< T, TAlloc > &other) const +
    Compares the strings ignoring case.
  • string< T, TAlloc > & make_lower () +
    Makes the string lower case.
  • string< T, TAlloc > & make_upper () +
    Makes the string upper case.
  • bool operator!= (const T *const str) const +
    Inequality operator.
  • bool operator!= (const string< T, TAlloc > &other) const +
    Inequality operator.
  • string< T, TAlloc > operator+ (const string< T, TAlloc > &other) const +
    Append operator for other strings.
  • template<class B > string< T, TAlloc > operator+ (const B *const c) const +
    Append operator for strings, ascii and unicode.
  • string< T, TAlloc > & operator+= (T c) +
    Appends a character to this string.
  • string< T, TAlloc > & operator+= (const T *const c) +
    Appends a char string to this string.
  • string< T, TAlloc > & operator+= (const string< T, TAlloc > &other) +
    Appends a string to this string.
  • string< T, TAlloc > & operator+= (const int i) +
    Appends a string representation of a number to this string.
  • string< T, TAlloc > & operator+= (const unsigned int i) +
    Appends a string representation of a number to this string.
  • string< T, TAlloc > & operator+= (const long i) +
    Appends a string representation of a number to this string.
  • string< T, TAlloc > & operator+= (const unsigned long i) +
    Appends a string representation of a number to this string.
  • string< T, TAlloc > & operator+= (const double i) +
    Appends a string representation of a number to this string.
  • string< T, TAlloc > & operator+= (const float i) +
    Appends a string representation of a number to this string.
  • bool operator< (const string< T, TAlloc > &other) const +
    Is smaller comparator.
  • string< T, TAlloc > & operator= (const string< T, TAlloc > &other) +
    Assignment operator.
  • template<class B , class A > string< T, TAlloc > & operator= (const string< B, A > &other) +
    Assignment operator for other string types.
  • template<class B > string< T, TAlloc > & operator= (const B *const c) +
    Assignment operator for strings, ascii and unicode.
  • bool operator== (const T *const str) const +
    Equality operator.
  • bool operator== (const string< T, TAlloc > &other) const +
    Equality operator.
  • T & operator[] (const u32 index) +
    Direct access operator.
  • const T & operator[] (const u32 index) const +
    Direct access operator.
  • string< T, TAlloc > & remove (T c) +
    Removes characters from a string.
  • string< T, TAlloc > & remove (const string< T, TAlloc > &toRemove) +
    Removes a string from the string.
  • string< T, TAlloc > & removeChars (const string< T, TAlloc > &characters) +
    Removes characters from a string.
  • string< T, TAlloc > & replace (T toReplace, T replaceWith) +
    Replaces all characters of a special type with another one.
  • string< T, TAlloc > & replace (const string< T, TAlloc > &toReplace, const string< T, TAlloc > &replaceWith) +
    Replaces all instances of a string with another one.
  • void reserve (u32 count) +
    Reserves some memory.
  • u32 size () const +
    Returns length of the string's content.
  • template<class container > u32 split (container &ret, const T *const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const +
    split string into parts.
  • string< T > subString (u32 begin, s32 length, bool make_lower=false) const +
    Returns a substring.
  • string< T, TAlloc > & trim (const string< T, TAlloc > &whitespace=" \t\n\r") +
    Trims the string.
  • string< T, TAlloc > & validate () +
    verify the existing string.
+

Detailed Description

+

template<typename T, typename TAlloc = irrAllocator<T>>
+class irr::core::string< T, TAlloc >

+ + +

Definition at line 73 of file irrString.h.

+

Member Typedef Documentation

+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + +
typedef T irr::core::string< T, TAlloc >::char_type
+
+
+ +

Definition at line 77 of file irrString.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
irr::core::string< T, TAlloc >::string () [inline]
+
+
+ +

Default constructor.

+ +

Definition at line 80 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (const string< T, TAlloc > & other) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 89 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B , class A >
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (const string< B, A > & other) [inline]
+
+
+ +

Constructor from other string types.

+ +

Definition at line 97 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (const double number) [inline, explicit]
+
+
+ +

Constructs a string from a float.

+ +

Definition at line 105 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (int number) [inline, explicit]
+
+
+ +

Constructs a string from an int.

+ +

Definition at line 115 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (unsigned int number) [inline, explicit]
+
+
+ +

Constructs a string from an unsigned int.

+ +

Definition at line 163 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (long number) [inline, explicit]
+
+
+ +

Constructs a string from a long.

+ +

Definition at line 194 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (unsigned long number) [inline, explicit]
+
+
+ +

Constructs a string from an unsigned long.

+ +

Definition at line 242 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + + + + + + + + + + + +
irr::core::string< T, TAlloc >::string (const B *const c,
u32 length 
) [inline]
+
+
+ +

Constructor for copying a string from a pointer with a given length.

+ +

Definition at line 274 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + +
irr::core::string< T, TAlloc >::string (const B *const c) [inline]
+
+
+ +

Constructor for unicode and ascii strings.

+ +

Definition at line 296 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
irr::core::string< T, TAlloc >::~string () [inline]
+
+
+ +

Destructor.

+ +

Definition at line 304 of file irrString.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::append (character) [inline]
+
+
+ +

Appends a character to this string.

+
Parameters:
+ + +
character,:Character to append.
+
+
+ +

Definition at line 603 of file irrString.h.

+ +

Referenced by irr::core::string< fschar_t >::append(), irr::scene::quake3::dumpShader(), irr::scene::quake3::dumpVarGroup(), irr::scene::quake3::getTextures(), irr::core::string< fschar_t >::operator+(), and irr::core::string< fschar_t >::operator+=().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::append (const T *const other,
u32 length = 0xffffffff 
) [inline]
+
+
+ +

Appends a char string to this string.

+
Parameters:
+ + + +
other,:Char string to append.
length,:The length of the string to append.
+
+
+ +

Definition at line 620 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::append (const string< T, TAlloc > & other) [inline]
+
+
+ +

Appends a string to this string.

+
Parameters:
+ + +
other,:String to append.
+
+
+ +

Definition at line 652 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::append (const string< T, TAlloc > & other,
u32 length 
) [inline]
+
+
+ +

Appends a string of the length l to this string.

+
Parameters:
+ + + +
other,:other String to append to this string.
length,:How much characters of the other string to add to this one.
+
+
+ +

Definition at line 675 of file irrString.h.

+ +
+
+ + + +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
bool irr::core::string< T, TAlloc >::empty () const [inline]
+
+
+

Informs if the string is empty or not.

+
Returns:
True if the string is empty, false if not.
+ +

Definition at line 488 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::equals_ignore_case (const string< T, TAlloc > & other) const [inline]
+
+
+ +

Compares the strings ignoring case.

+
Parameters:
+ + +
other,:Other string to compare.
+
+
+
Returns:
True if the strings are equal ignoring case.
+ +

Definition at line 522 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::string< T, TAlloc >::equals_substring_ignore_case (const string< T, TAlloc > & other,
const s32 sourcePos = 0 
) const [inline]
+
+
+ +

Compares the strings ignoring case.

+
Parameters:
+ + + +
other,:Other string to compare.
sourcePos,:where to start to compare in the string
+
+
+
Returns:
True if the strings are equal ignoring case.
+ +

Definition at line 535 of file irrString.h.

+ +

Referenced by irr::core::isFileExtension().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::string< T, TAlloc >::equalsn (const string< T, TAlloc > & other,
u32 n 
) const [inline]
+
+
+ +

compares the first n characters of the strings

+
Parameters:
+ + + +
otherOther string to compare.
nNumber of characters to compare
+
+
+
Returns:
True if the n first characters of both strings are equal.
+ +

Definition at line 569 of file irrString.h.

+ +

Referenced by irr::core::isInSameDirectory().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::string< T, TAlloc >::equalsn (const T *const str,
u32 n 
) const [inline]
+
+
+ +

compares the first n characters of the strings

+
Parameters:
+ + + +
strOther string to compare.
nNumber of characters to compare
+
+
+
Returns:
True if the n first characters of both strings are equal.
+ +

Definition at line 586 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::erase (u32 index) [inline]
+
+
+ +

Erases a character from the string.

+

May be slow, because all elements following after the erased element have to be copied.

+
Parameters:
+ + +
index,:Index of element to be erased.
+
+
+ +

Definition at line 1235 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::find (const B *const str,
const u32 start = 0 
) const [inline]
+
+
+ +

finds another string in this string

+
Parameters:
+ + + +
str,:Another string
start,:Start position of the search
+
+
+
Returns:
Positions where the string has been found, or -1 if not found.
+ +

Definition at line 859 of file irrString.h.

+ +

Referenced by irr::core::string< fschar_t >::replace().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
s32 irr::core::string< T, TAlloc >::findFirst (c) const [inline]
+
+
+ +

finds first occurrence of character in string

+
Parameters:
+ + +
c,:Character to search for.
+
+
+
Returns:
Position where the character has been found, or -1 if not found.
+ +

Definition at line 718 of file irrString.h.

+ +

Referenced by irr::core::fast_atof_move().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::findFirstChar (const T *const c,
u32 count = 1 
) const [inline]
+
+
+ +

finds first occurrence of a character of a list in string

+
Parameters:
+ + + +
c,:List of characters to find. For example if the method should find the first occurrence of 'a' or 'b', this parameter should be "ab".
count,:Amount of characters in the list. Usually, this should be strlen(c)
+
+
+
Returns:
Position where one of the characters has been found, or -1 if not found.
+ +

Definition at line 734 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::findFirstCharNotInList (const B *const c,
u32 count = 1 
) const [inline]
+
+
+ +

Finds first position of a character not in a given list.

+
Parameters:
+ + + +
c,:List of characters not to find. For example if the method should find the first occurrence of a character not 'a' or 'b', this parameter should be "ab".
count,:Amount of characters in the list. Usually, this should be strlen(c)
+
+
+
Returns:
Position where the character has been found, or -1 if not found.
+ +

Definition at line 756 of file irrString.h.

+ +

Referenced by irr::core::string< fschar_t >::trim().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::findLast (c,
s32 start = -1 
) const [inline]
+
+
+ +

finds last occurrence of character in string

+
Parameters:
+ + + +
c,:Character to search for.
start,:start to search reverse ( default = -1, on end )
+
+
+
Returns:
Position where the character has been found, or -1 if not found.
+ +

Definition at line 822 of file irrString.h.

+ +

Referenced by irr::core::cutFilenameExtension(), irr::core::getFileNameExtension(), and irr::core::isFileExtension().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::findLastChar (const T *const c,
u32 count = 1 
) const [inline]
+
+
+ +

finds last occurrence of a character of a list in string

+
Parameters:
+ + + +
c,:List of strings to find. For example if the method should find the last occurrence of 'a' or 'b', this parameter should be "ab".
count,:Amount of characters in the list. Usually, this should be strlen(c)
+
+
+
Returns:
Position where one of the characters has been found, or -1 if not found.
+ +

Definition at line 839 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::findLastCharNotInList (const B *const c,
u32 count = 1 
) const [inline]
+
+
+ +

Finds last position of a character not in a given list.

+
Parameters:
+ + + +
c,:List of characters not to find. For example if the method should find the first occurrence of a character not 'a' or 'b', this parameter should be "ab".
count,:Amount of characters in the list. Usually, this should be strlen(c)
+
+
+
Returns:
Position where the character has been found, or -1 if not found.
+ +

Definition at line 783 of file irrString.h.

+ +

Referenced by irr::core::string< fschar_t >::trim().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::string< T, TAlloc >::findNext (c,
u32 startPos 
) const [inline]
+
+
+ +

finds next occurrence of character in string

+
Parameters:
+ + + +
c,:Character to search for.
startPos,:Position in string to start searching.
+
+
+
Returns:
Position where the character has been found, or -1 if not found.
+ +

Definition at line 807 of file irrString.h.

+ +

Referenced by irr::core::isInSameDirectory().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
T irr::core::string< T, TAlloc >::lastChar () const [inline]
+
+
+ +

gets the last char of a string or null

+ +

Definition at line 1274 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::lower_ignore_case (const string< T, TAlloc > & other) const [inline]
+
+
+ +

Compares the strings ignoring case.

+
Parameters:
+ + +
other,:Other string to compare.
+
+
+
Returns:
True if this string is smaller ignoring case.
+ +

Definition at line 552 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::make_lower () [inline]
+
+
+ +

Makes the string lower case.

+ +

Definition at line 502 of file irrString.h.

+ +

Referenced by irr::io::SNamedPath::PathToName(), and irr::core::string< fschar_t >::subString().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::make_upper () [inline]
+
+
+ +

Makes the string upper case.

+ +

Definition at line 511 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::operator!= (const T *const str) const [inline]
+
+
+ +

Inequality operator.

+ +

Definition at line 465 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::operator!= (const string< T, TAlloc > & other) const [inline]
+
+
+ +

Inequality operator.

+ +

Definition at line 472 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc> irr::core::string< T, TAlloc >::operator+ (const string< T, TAlloc > & other) const [inline]
+
+
+ +

Append operator for other strings.

+ +

Definition at line 388 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + +
string<T,TAlloc> irr::core::string< T, TAlloc >::operator+ (const B *const c) const [inline]
+
+
+ +

Append operator for strings, ascii and unicode.

+ +

Definition at line 399 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (c) [inline]
+
+
+ +

Appends a character to this string.

+
Parameters:
+ + +
cCharacter to append.
+
+
+ +

Definition at line 925 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const T *const c) [inline]
+
+
+ +

Appends a char string to this string.

+
Parameters:
+ + +
cChar string to append.
+
+
+ +

Definition at line 934 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const string< T, TAlloc > & other) [inline]
+
+
+ +

Appends a string to this string.

+
Parameters:
+ + +
otherString to append.
+
+
+ +

Definition at line 943 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const int i) [inline]
+
+
+ +

Appends a string representation of a number to this string.

+
Parameters:
+ + +
iNumber to append.
+
+
+ +

Definition at line 952 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const unsigned int i) [inline]
+
+
+ +

Appends a string representation of a number to this string.

+
Parameters:
+ + +
iNumber to append.
+
+
+ +

Definition at line 961 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const long i) [inline]
+
+
+ +

Appends a string representation of a number to this string.

+
Parameters:
+ + +
iNumber to append.
+
+
+ +

Definition at line 970 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const unsigned long i) [inline]
+
+
+ +

Appends a string representation of a number to this string.

+
Parameters:
+ + +
iNumber to append.
+
+
+ +

Definition at line 979 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const double i) [inline]
+
+
+ +

Appends a string representation of a number to this string.

+
Parameters:
+ + +
iNumber to append.
+
+
+ +

Definition at line 988 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator+= (const float i) [inline]
+
+
+ +

Appends a string representation of a number to this string.

+
Parameters:
+ + +
iNumber to append.
+
+
+ +

Definition at line 997 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::operator< (const string< T, TAlloc > & other) const [inline]
+
+
+ +

Is smaller comparator.

+ +

Definition at line 451 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator= (const string< T, TAlloc > & other) [inline]
+
+
+ +

Assignment operator.

+ +

Definition at line 311 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B , class A >
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator= (const string< B, A > & other) [inline]
+
+
+ +

Assignment operator for other string types.

+ +

Definition at line 333 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class B >
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::operator= (const B *const c) [inline]
+
+
+ +

Assignment operator for strings, ascii and unicode.

+ +

Definition at line 342 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::operator== (const T *const str) const [inline]
+
+
+ +

Equality operator.

+ +

Definition at line 425 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
bool irr::core::string< T, TAlloc >::operator== (const string< T, TAlloc > & other) const [inline]
+
+
+ +

Equality operator.

+ +

Definition at line 440 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
T& irr::core::string< T, TAlloc >::operator[] (const u32 index) [inline]
+
+
+ +

Direct access operator.

+ +

Definition at line 409 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
const T& irr::core::string< T, TAlloc >::operator[] (const u32 index) const [inline]
+
+
+ +

Direct access operator.

+ +

Definition at line 417 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::remove (c) [inline]
+
+
+ +

Removes characters from a string.

+
Parameters:
+ + +
c,:Character to remove.
+
+
+ +

Definition at line 1127 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::remove (const string< T, TAlloc > & toRemove) [inline]
+
+
+ +

Removes a string from the string.

+
Parameters:
+ + +
toRemove,:String to remove.
+
+
+ +

Definition at line 1149 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::removeChars (const string< T, TAlloc > & characters) [inline]
+
+
+ +

Removes characters from a string.

+
Parameters:
+ + +
characters,:Characters to remove.
+
+
+ +

Definition at line 1182 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::replace (toReplace,
replaceWith 
) [inline]
+
+
+ +

Replaces all characters of a special type with another one.

+
Parameters:
+ + + +
toReplaceCharacter to replace.
replaceWithCharacter replacing the old one.
+
+
+ +

Definition at line 1007 of file irrString.h.

+ +

Referenced by irr::io::SNamedPath::PathToName(), and irr::core::string< fschar_t >::replace().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::replace (const string< T, TAlloc > & toReplace,
const string< T, TAlloc > & replaceWith 
) [inline]
+
+
+ +

Replaces all instances of a string with another one.

+
Parameters:
+ + + +
toReplaceThe string to replace.
replaceWithThe string replacing the old one.
+
+
+ +

Definition at line 1019 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
void irr::core::string< T, TAlloc >::reserve (u32 count) [inline]
+
+
+ +

Reserves some memory.

+
Parameters:
+ + +
count,:Amount of characters to reserve.
+
+
+ +

Definition at line 705 of file irrString.h.

+ +

Referenced by irr::core::string< fschar_t >::subString().

+ +
+
+ + + +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+
+template<class container >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
u32 irr::core::string< T, TAlloc >::split (container & ret,
const T *const c,
u32 count = 1,
bool ignoreEmptyTokens = true,
bool keepSeparators = false 
) const [inline]
+
+
+ +

split string into parts.

+

This method will split a string at certain delimiter characters into the container passed in as reference. The type of the container has to be given as template parameter. It must provide a push_back and a size method.

+
Parameters:
+ + + + + + +
retThe result container
cC-style string of delimiter characters
countNumber of delimiter characters
ignoreEmptyTokensFlag to avoid empty substrings in the result container. If two delimiters occur without a character in between, an empty substring would be placed in the result. If this flag is set, only non-empty strings are stored.
keepSeparatorsFlag which allows to add the separator to the result string. If this flag is true, the concatenation of the substrings results in the original string. Otherwise, only the characters between the delimiters are returned.
+
+
+
Returns:
The number of resulting substrings
+ +

Definition at line 1298 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + + + + + + + + + + + + + + + + + +
string<T> irr::core::string< T, TAlloc >::subString (u32 begin,
s32 length,
bool make_lower = false 
) const [inline]
+
+
+ +

Returns a substring.

+
Parameters:
+ + + + +
beginStart of substring.
lengthLength of substring.
make_lowercopy only lower case
+
+
+ +

Definition at line 891 of file irrString.h.

+ +

Referenced by irr::core::cutFilenameExtension(), irr::core::getFileNameExtension(), and irr::core::string< fschar_t >::trim().

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::trim (const string< T, TAlloc > & whitespace = " \t\n\r") [inline]
+
+
+ +

Trims the string.

+

Removes the specified characters (by default, Latin-1 whitespace) from the begining and the end of the string.

+ +

Definition at line 1218 of file irrString.h.

+ +
+
+ +
+
+
+template<typename T, typename TAlloc = irrAllocator<T>>
+ + + + + + + +
string<T,TAlloc>& irr::core::string< T, TAlloc >::validate () [inline]
+
+
+ +

verify the existing string.

+ +

Definition at line 1247 of file irrString.h.

+ +

Referenced by irr::core::deletePathFromPath().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d-members.html new file mode 100644 index 0000000..d131524 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d-members.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::triangle3d< T > Member List
+
+
+This is the complete list of members for irr::core::triangle3d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + +
closestPointOnTriangle(const core::vector3d< T > &p) const irr::core::triangle3d< T > [inline]
getArea() const irr::core::triangle3d< T > [inline]
getIntersectionOfPlaneWithLine(const vector3d< T > &linePoint, const vector3d< T > &lineVect, vector3d< T > &outIntersection) const irr::core::triangle3d< T > [inline]
getIntersectionWithLimitedLine(const line3d< T > &line, vector3d< T > &outIntersection) const irr::core::triangle3d< T > [inline]
getIntersectionWithLine(const vector3d< T > &linePoint, const vector3d< T > &lineVect, vector3d< T > &outIntersection) const irr::core::triangle3d< T > [inline]
getNormal() const irr::core::triangle3d< T > [inline]
getPlane() const irr::core::triangle3d< T > [inline]
isFrontFacing(const vector3d< T > &lookDirection) const irr::core::triangle3d< T > [inline]
isPointInside(const vector3d< T > &p) const irr::core::triangle3d< T > [inline]
isPointInsideFast(const vector3d< T > &p) const irr::core::triangle3d< T > [inline]
isTotalInsideBox(const aabbox3d< T > &box) const irr::core::triangle3d< T > [inline]
isTotalOutsideBox(const aabbox3d< T > &box) const irr::core::triangle3d< T > [inline]
operator!=(const triangle3d< T > &other) const irr::core::triangle3d< T > [inline]
operator==(const triangle3d< T > &other) const irr::core::triangle3d< T > [inline]
pointAirr::core::triangle3d< T >
pointBirr::core::triangle3d< T >
pointCirr::core::triangle3d< T >
set(const core::vector3d< T > &a, const core::vector3d< T > &b, const core::vector3d< T > &c)irr::core::triangle3d< T > [inline]
triangle3d()irr::core::triangle3d< T > [inline]
triangle3d(vector3d< T > v1, vector3d< T > v2, vector3d< T > v3)irr::core::triangle3d< T > [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d.html new file mode 100644 index 0000000..4c1f04a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1triangle3d.html @@ -0,0 +1,794 @@ + + + + +Irrlicht 3D Engine: irr::core::triangle3d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::triangle3d< T > Class Template Reference
+
+
+ +

3d triangle template class for doing collision detection and other things. + More...

+ +

#include <triangle3d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

template<class T>
+class irr::core::triangle3d< T >

+ +

3d triangle template class for doing collision detection and other things.

+ +

Definition at line 20 of file triangle3d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::triangle3d< T >::triangle3d () [inline]
+
+
+ +

Constructor for an all 0 triangle.

+ +

Definition at line 25 of file triangle3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::triangle3d< T >::triangle3d (vector3d< T > v1,
vector3d< T > v2,
vector3d< T > v3 
) [inline]
+
+
+ +

Constructor for triangle with given three vertices.

+ +

Definition at line 27 of file triangle3d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
core::vector3d<T> irr::core::triangle3d< T >::closestPointOnTriangle (const core::vector3d< T > & p) const [inline]
+
+
+ +

Get the closest point on a triangle to a point on the same plane.

+
Parameters:
+ + +
pPoint which must be on the same plane as the triangle.
+
+
+
Returns:
The closest point of the triangle
+ +

Definition at line 68 of file triangle3d.h.

+ +

References irr::core::vector3d< T >::getDistanceFrom(), irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::triangle3d< T >::getArea () const [inline]
+
+
+ +

Get the area of the triangle.

+ +

Definition at line 224 of file triangle3d.h.

+ +

References irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::triangle3d< T >::getIntersectionOfPlaneWithLine (const vector3d< T > & linePoint,
const vector3d< T > & lineVect,
vector3d< T > & outIntersection 
) const [inline]
+
+
+ +

Calculates the intersection between a 3d line and the plane the triangle is on.

+
Parameters:
+ + + + +
lineVectVector of the line to intersect with.
linePointPoint of the line to intersect with.
outIntersectionPlace to store the intersection point, if there is one.
+
+
+
Returns:
True if there was an intersection, else false.
+ +

Definition at line 169 of file triangle3d.h.

+ +

References irr::core::vector3d< T >::dotProduct(), irr::core::triangle3d< T >::getNormal(), irr::core::iszero(), irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, irr::core::triangle3d< T >::pointC, irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +

Referenced by irr::core::triangle3d< T >::getIntersectionWithLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::triangle3d< T >::getIntersectionWithLimitedLine (const line3d< T > & line,
vector3d< T > & outIntersection 
) const [inline]
+
+
+ +

Get an intersection with a 3d line.

+
Parameters:
+ + + +
lineLine to intersect with.
outIntersectionPlace to store the intersection point, if there is one.
+
+
+
Returns:
True if there was an intersection, false if not.
+ +

Definition at line 136 of file triangle3d.h.

+ +

References irr::core::line3d< T >::end, irr::core::triangle3d< T >::getIntersectionWithLine(), irr::core::line3d< T >::getVector(), irr::core::vector3d< T >::isBetweenPoints(), and irr::core::line3d< T >::start.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::triangle3d< T >::getIntersectionWithLine (const vector3d< T > & linePoint,
const vector3d< T > & lineVect,
vector3d< T > & outIntersection 
) const [inline]
+
+
+ +

Get an intersection with a 3d line.

+

Please note that also points are returned as intersection which are on the line, but not between the start and end point of the line. If you want the returned point be between start and end use getIntersectionWithLimitedLine().

+
Parameters:
+ + + + +
linePointPoint of the line to intersect with.
lineVectVector of the line to intersect with.
outIntersectionPlace to store the intersection point, if there is one.
+
+
+
Returns:
True if there was an intersection, false if there was not.
+ +

Definition at line 154 of file triangle3d.h.

+ +

References irr::core::triangle3d< T >::getIntersectionOfPlaneWithLine(), and irr::core::triangle3d< T >::isPointInside().

+ +

Referenced by irr::core::triangle3d< T >::getIntersectionWithLimitedLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::triangle3d< T >::getNormal () const [inline]
+
+
+ +

Get the normal of the triangle.

+

Please note: The normal is not always normalized.

+ +

Definition at line 199 of file triangle3d.h.

+ +

References irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +

Referenced by irr::core::triangle3d< T >::getIntersectionOfPlaneWithLine(), and irr::core::triangle3d< T >::isFrontFacing().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
plane3d<T> irr::core::triangle3d< T >::getPlane () const [inline]
+
+
+ +

Get the plane of this triangle.

+ +

Definition at line 218 of file triangle3d.h.

+ +

References irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::isFrontFacing (const vector3d< T > & lookDirection) const [inline]
+
+
+ +

Test if the triangle would be front or backfacing from any point.

+

Thus, this method assumes a camera position from which the triangle is definitely visible when looking at the given direction. Do not use this method with points as it will give wrong results!

+
Parameters:
+ + +
lookDirectionLook direction.
+
+
+
Returns:
True if the plane is front facing and false if it is backfacing.
+ +

Definition at line 210 of file triangle3d.h.

+ +

References irr::core::vector3d< T >::dotProduct(), F32_LOWER_EQUAL_0, and irr::core::triangle3d< T >::getNormal().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::isPointInside (const vector3d< T > & p) const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::isPointInsideFast (const vector3d< T > & p) const [inline]
+
+
+ +

Check if a point is inside the triangle (border-points count also as inside)

+

This method uses a barycentric coordinate system. It is faster than isPointInside but is more susceptible to floating point rounding errors. This will especially be noticable when the FPU is in single precision mode (which is for example set on default by Direct3D).

+
Parameters:
+ + +
pPoint to test. Assumes that this point is already on the plane of the triangle.
+
+
+
Returns:
True if point is inside the triangle, otherwise false.
+ +

Definition at line 108 of file triangle3d.h.

+ +

References irr::core::vector3d< T >::dotProduct(), irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, irr::core::triangle3d< T >::pointC, and irr::core::ROUNDING_ERROR_f32.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::isTotalInsideBox (const aabbox3d< T > & box) const [inline]
+
+
+ +

Determines if the triangle is totally inside a bounding box.

+
Parameters:
+ + +
boxBox to check.
+
+
+
Returns:
True if triangle is within the box, otherwise false.
+ +

Definition at line 44 of file triangle3d.h.

+ +

References irr::core::aabbox3d< T >::isPointInside(), irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::isTotalOutsideBox (const aabbox3d< T > & box) const [inline]
+
+
+ +

Determines if the triangle is totally outside a bounding box.

+
Parameters:
+ + +
boxBox to check.
+
+
+
Returns:
True if triangle is outside the box, otherwise false.
+ +

Definition at line 54 of file triangle3d.h.

+ +

References irr::core::aabbox3d< T >::MaxEdge, irr::core::aabbox3d< T >::MinEdge, irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::operator!= (const triangle3d< T > & other) const [inline]
+
+
+ +

Inequality operator.

+ +

Definition at line 36 of file triangle3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::triangle3d< T >::operator== (const triangle3d< T > & other) const [inline]
+
+
+ +

Equality operator.

+ +

Definition at line 30 of file triangle3d.h.

+ +

References irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::triangle3d< T >::set (const core::vector3d< T > & a,
const core::vector3d< T > & b,
const core::vector3d< T > & c 
) [inline]
+
+
+ +

sets the triangle's points

+ +

Definition at line 231 of file triangle3d.h.

+ +

References irr::core::triangle3d< T >::pointA, irr::core::triangle3d< T >::pointB, and irr::core::triangle3d< T >::pointC.

+ +
+
+

Member Data Documentation

+ + + + + + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d-members.html new file mode 100644 index 0000000..aa09f8b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d-members.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::vector2d< T > Member List
+
+
+This is the complete list of members for irr::core::vector2d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
dotProduct(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
equals(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
getAngle() const irr::core::vector2d< T > [inline]
getAngleTrig() const irr::core::vector2d< T > [inline]
getAngleWith(const vector2d< T > &b) const irr::core::vector2d< T > [inline]
getDistanceFrom(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
getDistanceFromSQ(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
getInterpolated(const vector2d< T > &other, f64 d) const irr::core::vector2d< T > [inline]
getInterpolated_quadratic(const vector2d< T > &v2, const vector2d< T > &v3, f64 d) const irr::core::vector2d< T > [inline]
getLength() const irr::core::vector2d< T > [inline]
getLengthSQ() const irr::core::vector2d< T > [inline]
interpolate(const vector2d< T > &a, const vector2d< T > &b, f64 d)irr::core::vector2d< T > [inline]
isBetweenPoints(const vector2d< T > &begin, const vector2d< T > &end) const irr::core::vector2d< T > [inline]
normalize()irr::core::vector2d< T > [inline]
operator!=(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator*(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator*(const T v) const irr::core::vector2d< T > [inline]
operator*=(const vector2d< T > &other)irr::core::vector2d< T > [inline]
operator*=(const T v)irr::core::vector2d< T > [inline]
operator+(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator+(const dimension2d< T > &other) const irr::core::vector2d< T > [inline]
operator+(const T v) const irr::core::vector2d< T > [inline]
operator+=(const vector2d< T > &other)irr::core::vector2d< T > [inline]
operator+=(const T v)irr::core::vector2d< T > [inline]
operator+=(const dimension2d< T > &other)irr::core::vector2d< T > [inline]
operator-() const irr::core::vector2d< T > [inline]
operator-(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator-(const dimension2d< T > &other) const irr::core::vector2d< T > [inline]
operator-(const T v) const irr::core::vector2d< T > [inline]
operator-=(const vector2d< T > &other)irr::core::vector2d< T > [inline]
operator-=(const T v)irr::core::vector2d< T > [inline]
operator-=(const dimension2d< T > &other)irr::core::vector2d< T > [inline]
operator/(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator/(const T v) const irr::core::vector2d< T > [inline]
operator/=(const vector2d< T > &other)irr::core::vector2d< T > [inline]
operator/=(const T v)irr::core::vector2d< T > [inline]
operator<(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator<=(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator=(const vector2d< T > &other)irr::core::vector2d< T > [inline]
operator=(const dimension2d< T > &other)irr::core::vector2d< T > [inline]
operator==(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator>(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
operator>=(const vector2d< T > &other) const irr::core::vector2d< T > [inline]
rotateBy(f64 degrees, const vector2d< T > &center=vector2d< T >())irr::core::vector2d< T > [inline]
set(T nx, T ny)irr::core::vector2d< T > [inline]
set(const vector2d< T > &p)irr::core::vector2d< T > [inline]
vector2d()irr::core::vector2d< T > [inline]
vector2d(T nx, T ny)irr::core::vector2d< T > [inline]
vector2d(T n)irr::core::vector2d< T > [inline, explicit]
vector2d(const vector2d< T > &other)irr::core::vector2d< T > [inline]
vector2d(const dimension2d< T > &other)irr::core::vector2d< T > [inline]
Xirr::core::vector2d< T >
Yirr::core::vector2d< T >
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d.html new file mode 100644 index 0000000..c0fb94f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector2d.html @@ -0,0 +1,1544 @@ + + + + +Irrlicht 3D Engine: irr::core::vector2d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::vector2d< T > Class Template Reference
+
+
+ +

2d vector template class with lots of operators and methods. + More...

+ +

#include <vector2d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • T X +
    X coordinate of vector.
  • T Y +
    Y coordinate of vector.
+

Detailed Description

+

template<class T>
+class irr::core::vector2d< T >

+ +

2d vector template class with lots of operators and methods.

+

As of Irrlicht 1.6, this class supercedes position2d, which should be considered deprecated.

+ +

Definition at line 21 of file vector2d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::vector2d< T >::vector2d () [inline]
+
+
+ +

Default constructor (null vector)

+ +

Definition at line 25 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
irr::core::vector2d< T >::vector2d (nx,
ny 
) [inline]
+
+
+ +

Constructor with two different values.

+ +

Definition at line 27 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::vector2d< T >::vector2d (n) [inline, explicit]
+
+
+ +

Constructor with the same value for both members.

+ +

Definition at line 29 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::vector2d< T >::vector2d (const vector2d< T > & other) [inline]
+
+
+ +

Copy constructor.

+ +

Definition at line 31 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::vector2d< T >::vector2d (const dimension2d< T > & other) [inline]
+
+
+ +

Definition at line 33 of file vector2d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::vector2d< T >::dotProduct (const vector2d< T > & other) const [inline]
+
+
+ +

Get the dot product of this vector with another.

+
Parameters:
+ + +
otherOther vector to take dot product with.
+
+
+
Returns:
The dot product of the two vectors.
+ +

Definition at line 124 of file vector2d.h.

+ +

Referenced by irr::core::line2d< T >::getClosestPoint().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::equals (const vector2d< T > & other) const [inline]
+
+
+ +

Checks if this vector equals the other one.

+

Takes floating point rounding errors into account.

+
Parameters:
+ + +
otherVector to compare with.
+
+
+
Returns:
True if the two vector are (almost) equal, else false.
+ +

Definition at line 104 of file vector2d.h.

+ +

Referenced by irr::core::vector2d< f32 >::equals(), irr::core::vector2d< f32 >::operator!=(), irr::core::vector2d< f32 >::operator<(), irr::core::vector2d< f32 >::operator<=(), irr::core::vector2d< f32 >::operator==(), irr::core::vector2d< f32 >::operator>(), and irr::core::vector2d< f32 >::operator>=().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
f64 irr::core::vector2d< T >::getAngle () const [inline]
+
+
+ +

Calculates the angle of this vector in degrees in the counter trigonometric sense.

+

0 is to the right (3 o'clock), values increase clockwise.

+
Returns:
Returns a value between 0 and 360.
+ +

Definition at line 208 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
f64 irr::core::vector2d< T >::getAngleTrig () const [inline]
+
+
+ +

Calculates the angle of this vector in degrees in the trigonometric sense.

+

0 is to the right (3 o'clock), values increase counter-clockwise. This method has been suggested by Pr3t3nd3r.

+
Returns:
Returns a value between 0 and 360.
+ +

Definition at line 185 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
f64 irr::core::vector2d< T >::getAngleWith (const vector2d< T > & b) const [inline]
+
+
+ +

Calculates the angle between this vector and another one in degree.

+
Parameters:
+ + +
bOther vector to test with.
+
+
+
Returns:
Returns a value between 0 and 90.
+ +

Definition at line 238 of file vector2d.h.

+ +

Referenced by irr::core::line2d< T >::getAngleWith().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::vector2d< T >::getDistanceFrom (const vector2d< T > & other) const [inline]
+
+
+ +

Gets distance from another point.

+

Here, the vector is interpreted as a point in 2-dimensional space.

+
Parameters:
+ + +
otherOther vector to measure from.
+
+
+
Returns:
Distance from other point.
+ +

Definition at line 133 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::vector2d< T >::getDistanceFromSQ (const vector2d< T > & other) const [inline]
+
+
+ +

Returns squared distance from another point.

+

Here, the vector is interpreted as a point in 2-dimensional space.

+
Parameters:
+ + +
otherOther vector to measure from.
+
+
+
Returns:
Squared distance from other point.
+ +

Definition at line 142 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
vector2d<T> irr::core::vector2d< T >::getInterpolated (const vector2d< T > & other,
f64 d 
) const [inline]
+
+
+ +

Creates an interpolated vector between this vector and another vector.

+
Parameters:
+ + + +
otherThe other vector to interpolate with.
dInterpolation value between 0.0f (all the other vector) and 1.0f (all this vector). Note that this is the opposite direction of interpolation to getInterpolated_quadratic()
+
+
+
Returns:
An interpolated vector. This vector is not modified.
+ +

Definition at line 278 of file vector2d.h.

+ +

Referenced by irr::video::S3DVertex::getInterpolated(), irr::video::S3DVertex2TCoords::getInterpolated(), and irr::video::S3DVertexTangents::getInterpolated().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
vector2d<T> irr::core::vector2d< T >::getInterpolated_quadratic (const vector2d< T > & v2,
const vector2d< T > & v3,
f64 d 
) const [inline]
+
+
+ +

Creates a quadratically interpolated vector between this and two other vectors.

+
Parameters:
+ + + + +
v2Second vector to interpolate with.
v3Third vector to interpolate with (maximum at 1.0f)
dInterpolation value between 0.0f (all this vector) and 1.0f (all the 3rd vector). Note that this is the opposite direction of interpolation to getInterpolated() and interpolate()
+
+
+
Returns:
An interpolated vector. This vector is not modified.
+ +

Definition at line 290 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::vector2d< T >::getLength () const [inline]
+
+
+ +

Gets the length of the vector.

+
Returns:
The length of the vector.
+ +

Definition at line 114 of file vector2d.h.

+ +

Referenced by irr::core::line2d< T >::getClosestPoint(), and irr::core::vector2d< f32 >::getDistanceFrom().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::vector2d< T >::getLengthSQ () const [inline]
+
+
+ +

Get the squared length of this vector.

+

This is useful because it is much faster than getLength().

+
Returns:
The squared length of the vector.
+ +

Definition at line 119 of file vector2d.h.

+ +

Referenced by irr::core::vector2d< f32 >::getDistanceFromSQ().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::interpolate (const vector2d< T > & a,
const vector2d< T > & b,
f64 d 
) [inline]
+
+
+ +

Sets this vector to the linearly interpolated vector between a and b.

+
Parameters:
+ + + + +
afirst vector to interpolate with, maximum at 1.0f
bsecond vector to interpolate with, maximum at 0.0f
dInterpolation value between 0.0f (all vector b) and 1.0f (all vector a) Note that this is the opposite direction of interpolation to getInterpolated_quadratic()
+
+
+ +

Definition at line 308 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::vector2d< T >::isBetweenPoints (const vector2d< T > & begin,
const vector2d< T > & end 
) const [inline]
+
+
+ +

Returns if this vector interpreted as a point is on a line between two other points.

+

It is assumed that the point is on the line.

+
Parameters:
+ + + +
beginBeginning vector to compare between.
endEnding vector to compare between.
+
+
+
Returns:
True if this vector is between begin and end, false if not.
+ +

Definition at line 259 of file vector2d.h.

+ +

Referenced by irr::core::line2d< T >::isPointBetweenStartAndEnd(), and irr::core::line2d< T >::isPointOnLine().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector2d<T>& irr::core::vector2d< T >::normalize () [inline]
+
+
+ +

Normalize the vector.

+

The null vector is left untouched.

+
Returns:
Reference to this vector, after normalization.
+ +

Definition at line 170 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::operator!= (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 96 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator* (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 57 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator* (const T v) const [inline]
+
+
+ +

Definition at line 59 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator*= (const vector2d< T > & other) [inline]
+
+
+ +

Definition at line 58 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator*= (const T v) [inline]
+
+
+ +

Definition at line 60 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator+ (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 43 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator+ (const dimension2d< T > & other) const [inline]
+
+
+ +

Definition at line 44 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator+ (const T v) const [inline]
+
+
+ +

Definition at line 46 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator+= (const vector2d< T > & other) [inline]
+
+
+ +

Definition at line 45 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator+= (const T v) [inline]
+
+
+ +

Definition at line 47 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator+= (const dimension2d< T > & other) [inline]
+
+
+ +

Definition at line 48 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator- () const [inline]
+
+
+ +

Definition at line 37 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator- (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 50 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator- (const dimension2d< T > & other) const [inline]
+
+
+ +

Definition at line 51 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator- (const T v) const [inline]
+
+
+ +

Definition at line 53 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator-= (const vector2d< T > & other) [inline]
+
+
+ +

Definition at line 52 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator-= (const T v) [inline]
+
+
+ +

Definition at line 54 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator-= (const dimension2d< T > & other) [inline]
+
+
+ +

Definition at line 55 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator/ (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 62 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T> irr::core::vector2d< T >::operator/ (const T v) const [inline]
+
+
+ +

Definition at line 64 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator/= (const vector2d< T > & other) [inline]
+
+
+ +

Definition at line 63 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator/= (const T v) [inline]
+
+
+ +

Definition at line 65 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::operator< (const vector2d< T > & other) const [inline]
+
+
+ +

sort in order X, Y. Difference must be above rounding tolerance.

+ +

Definition at line 82 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::operator<= (const vector2d< T > & other) const [inline]
+
+
+ +

sort in order X, Y. Equality with rounding tolerance.

+ +

Definition at line 68 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator= (const vector2d< T > & other) [inline]
+
+
+ +

Definition at line 39 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::operator= (const dimension2d< T > & other) [inline]
+
+
+ +

Definition at line 41 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::operator== (const vector2d< T > & other) const [inline]
+
+
+ +

Definition at line 95 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::operator> (const vector2d< T > & other) const [inline]
+
+
+ +

sort in order X, Y. Difference must be above rounding tolerance.

+ +

Definition at line 89 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector2d< T >::operator>= (const vector2d< T > & other) const [inline]
+
+
+ +

sort in order X, Y. Equality with rounding tolerance.

+ +

Definition at line 75 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::rotateBy (f64 degrees,
const vector2d< T > & center = vector2d<T>() 
) [inline]
+
+
+ +

rotates the point anticlockwise around a center by an amount of degrees.

+
Parameters:
+ + + +
degreesAmount of degrees to rotate by, anticlockwise.
centerRotation center.
+
+
+
Returns:
This vector after transformation.
+ +

Definition at line 151 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::set (nx,
ny 
) [inline]
+
+
+ +

Definition at line 109 of file vector2d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector2d<T>& irr::core::vector2d< T >::set (const vector2d< T > & p) [inline]
+
+
+ +

Definition at line 110 of file vector2d.h.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<class T>
+ + + + +
T irr::core::vector2d< T >::X
+
+
+ +

X coordinate of vector.

+ +

Definition at line 316 of file vector2d.h.

+ +

Referenced by irr::core::CMatrix4< T >::buildTextureTransform(), irr::gui::IGUIElement::deserializeAttributes(), irr::core::vector2d< f32 >::dotProduct(), irr::core::vector2d< f32 >::equals(), irr::core::vector2d< f32 >::getAngle(), irr::core::vector2d< f32 >::getAngleTrig(), irr::core::vector2d< f32 >::getAngleWith(), irr::core::line2d< T >::getClosestPoint(), irr::core::vector2d< f32 >::getDistanceFrom(), irr::core::vector2d< f32 >::getDistanceFromSQ(), irr::core::vector2d< f32 >::getInterpolated(), irr::core::vector2d< f32 >::getInterpolated_quadratic(), irr::core::vector2d< f32 >::getLength(), irr::core::vector2d< f32 >::getLengthSQ(), irr::core::line2d< T >::getPointOrientation(), irr::core::vector2d< f32 >::interpolate(), irr::core::line2d< T >::intersectWith(), irr::core::vector2d< f32 >::isBetweenPoints(), irr::core::vector2d< f32 >::normalize(), irr::core::vector2d< f32 >::operator*(), irr::core::vector2d< f32 >::operator*=(), irr::core::vector2d< f32 >::operator+(), irr::core::vector2d< f32 >::operator+=(), irr::core::vector2d< f32 >::operator-(), irr::core::vector2d< f32 >::operator-=(), irr::core::vector2d< f32 >::operator/(), irr::core::vector2d< f32 >::operator/=(), irr::core::vector2d< f32 >::operator<(), irr::core::vector2d< f32 >::operator<=(), irr::core::vector2d< f32 >::operator=(), irr::core::dimension2d< T >::operator==(), irr::core::vector2d< f32 >::operator>(), irr::core::vector2d< f32 >::operator>=(), irr::core::vector2d< f32 >::rotateBy(), irr::core::vector2d< f32 >::set(), and irr::gui::IGUIElement::setRelativePosition().

+ +
+
+ +
+
+
+template<class T>
+ + + + +
T irr::core::vector2d< T >::Y
+
+
+ +

Y coordinate of vector.

+ +

Definition at line 319 of file vector2d.h.

+ +

Referenced by irr::core::CMatrix4< T >::buildTextureTransform(), irr::gui::IGUIElement::deserializeAttributes(), irr::core::vector2d< f32 >::dotProduct(), irr::core::vector2d< f32 >::equals(), irr::core::vector2d< f32 >::getAngle(), irr::core::vector2d< f32 >::getAngleTrig(), irr::core::vector2d< f32 >::getAngleWith(), irr::core::line2d< T >::getClosestPoint(), irr::core::vector2d< f32 >::getDistanceFrom(), irr::core::vector2d< f32 >::getDistanceFromSQ(), irr::core::vector2d< f32 >::getInterpolated(), irr::core::vector2d< f32 >::getInterpolated_quadratic(), irr::core::vector2d< f32 >::getLength(), irr::core::vector2d< f32 >::getLengthSQ(), irr::core::line2d< T >::getPointOrientation(), irr::core::vector2d< f32 >::interpolate(), irr::core::line2d< T >::intersectWith(), irr::core::vector2d< f32 >::isBetweenPoints(), irr::core::vector2d< f32 >::normalize(), irr::core::vector2d< f32 >::operator*(), irr::core::vector2d< f32 >::operator*=(), irr::core::vector2d< f32 >::operator+(), irr::core::vector2d< f32 >::operator+=(), irr::core::vector2d< f32 >::operator-(), irr::core::vector2d< f32 >::operator-=(), irr::core::vector2d< f32 >::operator/(), irr::core::vector2d< f32 >::operator/=(), irr::core::vector2d< f32 >::operator<(), irr::core::vector2d< f32 >::operator<=(), irr::core::vector2d< f32 >::operator=(), irr::core::dimension2d< T >::operator==(), irr::core::vector2d< f32 >::operator>(), irr::core::vector2d< f32 >::operator>=(), irr::core::vector2d< f32 >::rotateBy(), irr::core::vector2d< f32 >::set(), and irr::gui::IGUIElement::setRelativePosition().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d-members.html new file mode 100644 index 0000000..074bd2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d-members.html @@ -0,0 +1,178 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::vector3d< T > Member List
+
+
+This is the complete list of members for irr::core::vector3d< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
crossProduct(const vector3d< T > &p) const irr::core::vector3d< T > [inline]
dotProduct(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
equals(const vector3d< T > &other, const T tolerance=(T) ROUNDING_ERROR_f32) const irr::core::vector3d< T > [inline]
getAs3Values(T *array) const irr::core::vector3d< T > [inline]
getAs4Values(T *array) const irr::core::vector3d< T > [inline]
getDistanceFrom(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
getDistanceFromSQ(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
getHorizontalAngle() const irr::core::vector3d< T > [inline]
getInterpolated(const vector3d< T > &other, f64 d) const irr::core::vector3d< T > [inline]
getInterpolated_quadratic(const vector3d< T > &v2, const vector3d< T > &v3, f64 d) const irr::core::vector3d< T > [inline]
getLength() const irr::core::vector3d< T > [inline]
getLengthSQ() const irr::core::vector3d< T > [inline]
getSphericalCoordinateAngles() const irr::core::vector3d< T > [inline]
getSphericalCoordinateAngles() constirr::core::vector3d< T > [inline]
interpolate(const vector3d< T > &a, const vector3d< T > &b, f64 d)irr::core::vector3d< T > [inline]
invert()irr::core::vector3d< T > [inline]
isBetweenPoints(const vector3d< T > &begin, const vector3d< T > &end) const irr::core::vector3d< T > [inline]
normalize()irr::core::vector3d< T > [inline]
operator!=(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator*(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator*(const T v) const irr::core::vector3d< T > [inline]
operator*=(const vector3d< T > &other)irr::core::vector3d< T > [inline]
operator*=(const T v)irr::core::vector3d< T > [inline]
operator+(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator+(const T val) const irr::core::vector3d< T > [inline]
operator+=(const vector3d< T > &other)irr::core::vector3d< T > [inline]
operator+=(const T val)irr::core::vector3d< T > [inline]
operator-() const irr::core::vector3d< T > [inline]
operator-(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator-(const T val) const irr::core::vector3d< T > [inline]
operator-=(const vector3d< T > &other)irr::core::vector3d< T > [inline]
operator-=(const T val)irr::core::vector3d< T > [inline]
operator/(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator/(const T v) const irr::core::vector3d< T > [inline]
operator/(s32 val) constirr::core::vector3d< T > [inline]
operator/=(const vector3d< T > &other)irr::core::vector3d< T > [inline]
operator/=(const T v)irr::core::vector3d< T > [inline]
operator/=(s32 val)irr::core::vector3d< T > [inline]
operator<(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator<=(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator=(const vector3d< T > &other)irr::core::vector3d< T > [inline]
operator==(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator>(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
operator>=(const vector3d< T > &other) const irr::core::vector3d< T > [inline]
rotateXYBy(f64 degrees, const vector3d< T > &center=vector3d< T >())irr::core::vector3d< T > [inline]
rotateXZBy(f64 degrees, const vector3d< T > &center=vector3d< T >())irr::core::vector3d< T > [inline]
rotateYZBy(f64 degrees, const vector3d< T > &center=vector3d< T >())irr::core::vector3d< T > [inline]
rotationToDirection(const vector3d< T > &forwards=vector3d< T >(0, 0, 1)) const irr::core::vector3d< T > [inline]
set(const T nx, const T ny, const T nz)irr::core::vector3d< T > [inline]
set(const vector3d< T > &p)irr::core::vector3d< T > [inline]
setLength(T newlength)irr::core::vector3d< T > [inline]
vector3d()irr::core::vector3d< T > [inline]
vector3d(T nx, T ny, T nz)irr::core::vector3d< T > [inline]
vector3d(T n)irr::core::vector3d< T > [inline, explicit]
vector3d(const vector3d< T > &other)irr::core::vector3d< T > [inline]
Xirr::core::vector3d< T >
Yirr::core::vector3d< T >
Zirr::core::vector3d< T >
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d.html new file mode 100644 index 0000000..a7112fb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1core_1_1vector3d.html @@ -0,0 +1,1716 @@ + + + + +Irrlicht 3D Engine: irr::core::vector3d< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::vector3d< T > Class Template Reference
+
+
+ +

3d vector template class with lots of operators and methods. + More...

+ +

#include <vector3d.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • T X +
    X coordinate of the vector.
  • T Y +
    Y coordinate of the vector.
  • T Z +
    Z coordinate of the vector.
+

Detailed Description

+

template<class T>
+class irr::core::vector3d< T >

+ +

3d vector template class with lots of operators and methods.

+

The vector3d class is used in Irrlicht for three main purposes: 1) As a direction vector (most of the methods assume this). 2) As a position in 3d space (which is synonymous with a direction vector from the origin to this position). 3) To hold three Euler rotations, where X is pitch, Y is yaw and Z is roll.

+ +

Definition at line 22 of file vector3d.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T>
+ + + + + + + +
irr::core::vector3d< T >::vector3d () [inline]
+
+
+ +

Default constructor (null vector).

+ +

Definition at line 26 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::core::vector3d< T >::vector3d (nx,
ny,
nz 
) [inline]
+
+
+ +

Constructor with three different values.

+ +

Definition at line 28 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::vector3d< T >::vector3d (n) [inline, explicit]
+
+
+ +

Constructor with the same value for all elements.

+ +

Definition at line 30 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
irr::core::vector3d< T >::vector3d (const vector3d< T > & other) [inline]
+
+
+ +

Copy constructor.

+ +

Definition at line 32 of file vector3d.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::crossProduct (const vector3d< T > & p) const [inline]
+
+
+ +

Calculates the cross product with another vector.

+
Parameters:
+ + +
pVector to multiply with.
+
+
+
Returns:
Crossproduct of this vector with p.
+ +

Definition at line 147 of file vector3d.h.

+ +

Referenced by irr::core::CMatrix4< T >::buildAxisAlignedBillboard(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixLH(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixRH(), irr::core::CMatrix4< T >::buildRotateFromTo(), irr::core::quaternion::operator*(), and irr::core::quaternion::rotationFromTo().

+ +
+
+ + + +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::vector3d< T >::equals (const vector3d< T > & other,
const T tolerance = (T)ROUNDING_ERROR_f32 
) const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::vector3d< T >::getAs3Values (T * array) const [inline]
+
+
+ +

Fills an array of 3 values with the vector data (usually floats).

+

Useful for setting in shader constants for example.

+ +

Definition at line 399 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
void irr::core::vector3d< T >::getAs4Values (T * array) const [inline]
+
+
+ +

Fills an array of 4 values with the vector data (usually floats).

+

Useful for setting in shader constants for example. The fourth value will always be 0.

+ +

Definition at line 389 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::vector3d< T >::getDistanceFrom (const vector3d< T > & other) const [inline]
+
+
+ +

Get distance from another point.

+

Here, the vector is interpreted as point in 3 dimensional space.

+ +

Definition at line 132 of file vector3d.h.

+ +

Referenced by irr::core::triangle3d< T >::closestPointOnTriangle().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
T irr::core::vector3d< T >::getDistanceFromSQ (const vector3d< T > & other) const [inline]
+
+
+ +

Returns squared distance from another point.

+

Here, the vector is interpreted as point in 3 dimensional space.

+ +

Definition at line 139 of file vector3d.h.

+ +

Referenced by irr::core::vector3d< f32 >::isBetweenPoints().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::vector3d< T >::getHorizontalAngle () const [inline]
+
+
+ +

Get the rotations that would make a (0,0,1) direction vector point in the same direction as this direction vector.

+

Thanks to Arras on the Irrlicht forums for this method. This utility method is very useful for orienting scene nodes towards specific targets. For example, if this vector represents the difference between two scene nodes, then applying the result of getHorizontalAngle() to one scene node will point it at the other one. Example code: Where target and seeker are of type ISceneNode* const vector3df toTarget(target->getAbsolutePosition() - seeker->getAbsolutePosition()); const vector3df requiredRotation = toTarget.getHorizontalAngle(); seeker->setRotation(requiredRotation);

+
Returns:
A rotation vector containing the X (pitch) and Y (raw) rotations (in degrees) that when applied to a +Z (e.g. 0, 0, 1) direction vector would make it point in the same direction as this vector. The Z (roll) rotation is always 0, since two Euler rotations are sufficient to point in any given direction.
+ +

Definition at line 301 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
vector3d<T> irr::core::vector3d< T >::getInterpolated (const vector3d< T > & other,
f64 d 
) const [inline]
+
+
+ +

Creates an interpolated vector between this vector and another vector.

+
Parameters:
+ + + +
otherThe other vector to interpolate with.
dInterpolation value between 0.0f (all the other vector) and 1.0f (all this vector). Note that this is the opposite direction of interpolation to getInterpolated_quadratic()
+
+
+
Returns:
An interpolated vector. This vector is not modified.
+ +

Definition at line 247 of file vector3d.h.

+ +

Referenced by irr::video::S3DVertex::getInterpolated(), irr::video::S3DVertex2TCoords::getInterpolated(), and irr::video::S3DVertexTangents::getInterpolated().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
vector3d<T> irr::core::vector3d< T >::getInterpolated_quadratic (const vector3d< T > & v2,
const vector3d< T > & v3,
f64 d 
) const [inline]
+
+
+ +

Creates a quadratically interpolated vector between this and two other vectors.

+
Parameters:
+ + + + +
v2Second vector to interpolate with.
v3Third vector to interpolate with (maximum at 1.0f)
dInterpolation value between 0.0f (all this vector) and 1.0f (all the 3rd vector). Note that this is the opposite direction of interpolation to getInterpolated() and interpolate()
+
+
+
Returns:
An interpolated vector. This vector is not modified.
+ +

Definition at line 259 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::vector3d< T >::getLength () const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + +
T irr::core::vector3d< T >::getLengthSQ () const [inline]
+
+
+ +

Get squared length of the vector.

+

This is useful because it is much faster than getLength().

+
Returns:
Squared length of the vector.
+ +

Definition at line 122 of file vector3d.h.

+ +

Referenced by irr::core::vector3d< f32 >::getDistanceFromSQ(), and irr::core::vector3d< f32 >::isBetweenPoints().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::vector3d< T >::getSphericalCoordinateAngles () const [inline]
+
+
+ +

Get the spherical coordinate angles.

+

This returns Euler degrees for the point represented by this vector. The calculation assumes the pole at (0,1,0) and returns the angles in X and Y.

+ +

Definition at line 330 of file vector3d.h.

+ +
+
+ +
+
+
+template<>
+ + + + + + + +
vector3d< s32 > irr::core::vector3d< s32 >::getSphericalCoordinateAngles () const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::interpolate (const vector3d< T > & a,
const vector3d< T > & b,
f64 d 
) [inline]
+
+
+ +

Sets this vector to the linearly interpolated vector between a and b.

+
Parameters:
+ + + + +
afirst vector to interpolate with, maximum at 1.0f
bsecond vector to interpolate with, maximum at 0.0f
dInterpolation value between 0.0f (all vector b) and 1.0f (all vector a) Note that this is the opposite direction of interpolation to getInterpolated_quadratic()
+
+
+ +

Definition at line 278 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T>& irr::core::vector3d< T >::invert () [inline]
+
+
+ +

Inverts the vector.

+ +

Definition at line 189 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
bool irr::core::vector3d< T >::isBetweenPoints (const vector3d< T > & begin,
const vector3d< T > & end 
) const [inline]
+
+
+ +

Returns if this vector interpreted as a point is on a line between two other points.

+

It is assumed that the point is on the line.

+
Parameters:
+ + + +
beginBeginning vector to compare between.
endEnding vector to compare between.
+
+
+
Returns:
True if this vector is between begin and end, false if not.
+ +

Definition at line 157 of file vector3d.h.

+ +

Referenced by irr::core::plane3d< f32 >::getIntersectionWithLimitedLine(), irr::core::triangle3d< T >::getIntersectionWithLimitedLine(), and irr::core::line3d< T >::isPointBetweenStartAndEnd().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T>& irr::core::vector3d< T >::normalize () [inline]
+
+
+ +

Normalizes the vector.

+

In case of the 0 vector the result is still 0, otherwise the length of the vector will be 1.

+
Returns:
Reference to this vector after normalization.
+ +

Definition at line 168 of file vector3d.h.

+ +

Referenced by irr::core::CMatrix4< T >::buildAxisAlignedBillboard(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixLH(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixRH(), irr::core::CMatrix4< T >::buildRotateFromTo(), irr::core::CMatrix4< T >::buildShadowMatrix(), irr::core::quaternion::rotationFromTo(), and irr::core::vector3d< f32 >::setLength().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector3d< T >::operator!= (const vector3d< T > & other) const [inline]
+
+
+ +

Definition at line 98 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator* (const vector3d< T > & other) const [inline]
+
+
+ +

Definition at line 50 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator* (const T v) const [inline]
+
+
+ +

Definition at line 52 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator*= (const vector3d< T > & other) [inline]
+
+
+ +

Definition at line 51 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator*= (const T v) [inline]
+
+
+ +

Definition at line 53 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator+ (const vector3d< T > & other) const [inline]
+
+
+ +

Definition at line 40 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator+ (const T val) const [inline]
+
+
+ +

Definition at line 42 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator+= (const vector3d< T > & other) [inline]
+
+
+ +

Definition at line 41 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator+= (const T val) [inline]
+
+
+ +

Definition at line 43 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator- () const [inline]
+
+
+ +

Definition at line 36 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator- (const vector3d< T > & other) const [inline]
+
+
+ +

Definition at line 45 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator- (const T val) const [inline]
+
+
+ +

Definition at line 47 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator-= (const vector3d< T > & other) [inline]
+
+
+ +

Definition at line 46 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator-= (const T val) [inline]
+
+
+ +

Definition at line 48 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator/ (const vector3d< T > & other) const [inline]
+
+
+ +

Definition at line 55 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::operator/ (const T v) const [inline]
+
+
+ +

Definition at line 57 of file vector3d.h.

+ +
+
+ +
+
+
+template<>
+ + + + + + + + +
vector3d< s32 > irr::core::vector3d< s32 >::operator/ (s32 val) const [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator/= (const vector3d< T > & other) [inline]
+
+
+ +

Definition at line 56 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator/= (const T v) [inline]
+
+
+ +

Definition at line 58 of file vector3d.h.

+ +
+
+ +
+
+
+template<>
+ + + + + + + + +
vector3d< s32 > & irr::core::vector3d< s32 >::operator/= (s32 val) [inline]
+
+ +
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector3d< T >::operator< (const vector3d< T > & other) const [inline]
+
+
+ +

sort in order X, Y, Z. Difference must be above rounding tolerance.

+ +

Definition at line 77 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector3d< T >::operator<= (const vector3d< T > & other) const [inline]
+
+
+ +

sort in order X, Y, Z. Equality with rounding tolerance.

+ +

Definition at line 61 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::operator= (const vector3d< T > & other) [inline]
+
+
+ +

Definition at line 38 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector3d< T >::operator== (const vector3d< T > & other) const [inline]
+
+
+ +

use weak float compare

+ +

Definition at line 93 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector3d< T >::operator> (const vector3d< T > & other) const [inline]
+
+
+ +

sort in order X, Y, Z. Difference must be above rounding tolerance.

+ +

Definition at line 85 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
bool irr::core::vector3d< T >::operator>= (const vector3d< T > & other) const [inline]
+
+
+ +

sort in order X, Y, Z. Equality with rounding tolerance.

+ +

Definition at line 69 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::vector3d< T >::rotateXYBy (f64 degrees,
const vector3d< T > & center = vector3d<T>() 
) [inline]
+
+
+ +

Rotates the vector by a specified number of degrees around the Z axis and the specified center.

+
Parameters:
+ + + +
degrees,:Number of degrees to rotate around the Z axis.
center,:The center of the rotation.
+
+
+ +

Definition at line 215 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::vector3d< T >::rotateXZBy (f64 degrees,
const vector3d< T > & center = vector3d<T>() 
) [inline]
+
+
+ +

Rotates the vector by a specified number of degrees around the Y axis and the specified center.

+
Parameters:
+ + + +
degreesNumber of degrees to rotate around the Y axis.
centerThe center of the rotation.
+
+
+ +

Definition at line 200 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + +
void irr::core::vector3d< T >::rotateYZBy (f64 degrees,
const vector3d< T > & center = vector3d<T>() 
) [inline]
+
+
+ +

Rotates the vector by a specified number of degrees around the X axis and the specified center.

+
Parameters:
+ + + +
degrees,:Number of degrees to rotate around the X axis.
center,:The center of the rotation.
+
+
+ +

Definition at line 230 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T> irr::core::vector3d< T >::rotationToDirection (const vector3d< T > & forwards = vector3d<T>(0, 0, 1)) const [inline]
+
+
+ +

Builds a direction vector from (this) rotation vector.

+

This vector is assumed to be a rotation vector composed of 3 Euler angle rotations, in degrees. The implementation performs the same calculations as using a matrix to do the rotation.

+
Parameters:
+ + +
[in]forwardsThe direction representing "forwards" which will be rotated by this vector. If you do not provide a direction, then the +Z axis (0, 0, 1) will be assumed to be forwards.
+
+
+
Returns:
A direction vector calculated by rotating the forwards direction by the 3 Euler angles (in degrees) represented by this vector.
+ +

Definition at line 357 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + + + + + + + + + + + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::set (const T nx,
const T ny,
const T nz 
) [inline]
+
+
+ +

Definition at line 113 of file vector3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::getEdges(), and irr::core::quaternion::rotationFromTo().

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::set (const vector3d< T > & p) [inline]
+
+
+ +

Definition at line 114 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T>
+ + + + + + + + +
vector3d<T>& irr::core::vector3d< T >::setLength (newlength) [inline]
+
+
+ +

Sets the length of the vector to a new value.

+ +

Definition at line 182 of file vector3d.h.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<class T>
+ + + + +
T irr::core::vector3d< T >::X
+
+
+ +

X coordinate of the vector.

+ +

Definition at line 408 of file vector3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::addInternalPoint(), irr::core::CMatrix4< T >::buildAxisAlignedBillboard(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixLH(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixRH(), irr::core::CMatrix4< T >::buildRotateFromTo(), irr::core::CMatrix4< T >::buildShadowMatrix(), irr::core::aabbox3d< f32 >::classifyPlaneRelation(), irr::core::vector3d< f32 >::crossProduct(), irr::core::vector3d< f32 >::dotProduct(), irr::core::vector3d< f32 >::equals(), irr::core::quaternion::fromAngleAxis(), irr::core::aabbox3d< f32 >::getArea(), irr::core::vector3d< f32 >::getAs3Values(), irr::core::vector3d< f32 >::getAs4Values(), irr::scene::quake3::getAsVector3df(), irr::core::vector3d< f32 >::getDistanceFrom(), irr::core::vector3d< f32 >::getDistanceFromSQ(), irr::core::aabbox3d< f32 >::getEdges(), irr::core::vector3d< f32 >::getHorizontalAngle(), irr::core::vector3d< f32 >::getInterpolated(), irr::core::vector3d< f32 >::getInterpolated_quadratic(), irr::core::triangle3d< T >::getIntersectionOfPlaneWithLine(), irr::core::vector3d< f32 >::getLength(), irr::core::vector3d< f32 >::getLengthSQ(), irr::core::quaternion::getMatrix(), irr::core::CMatrix4< T >::getRotationDegrees(), irr::core::vector3d< f32 >::getSphericalCoordinateAngles(), irr::core::vector3d< T >::getSphericalCoordinateAngles(), irr::core::aabbox3d< f32 >::getVolume(), irr::core::vector3d< f32 >::interpolate(), irr::core::aabbox3d< f32 >::intersectsWithLine(), irr::core::CMatrix4< T >::inverseRotateVect(), irr::core::CMatrix4< T >::inverseTranslateVect(), irr::core::vector3d< f32 >::invert(), irr::core::triangle3d< T >::isPointInside(), irr::core::aabbox3d< f32 >::isPointInside(), irr::core::aabbox3d< f32 >::isPointTotalInside(), irr::core::vector3d< f32 >::normalize(), irr::core::vector3d< f32 >::operator*(), irr::core::vector3d< f32 >::operator*=(), irr::core::vector3d< f32 >::operator+(), irr::core::vector3d< f32 >::operator+=(), irr::core::vector3d< f32 >::operator-(), irr::core::vector3d< f32 >::operator-=(), irr::core::vector3d< f32 >::operator/(), irr::core::vector3d< T >::operator/(), irr::core::vector3d< f32 >::operator/=(), irr::core::vector3d< T >::operator/=(), irr::core::vector3d< f32 >::operator<(), irr::core::vector3d< f32 >::operator<=(), irr::core::vector3d< f32 >::operator=(), irr::core::vector3d< f32 >::operator>(), irr::core::vector3d< f32 >::operator>=(), irr::core::quaternion::quaternion(), irr::core::CMatrix4< T >::rotateVect(), irr::core::vector3d< f32 >::rotateXYBy(), irr::core::vector3d< f32 >::rotateXZBy(), irr::core::vector3d< f32 >::rotateYZBy(), irr::core::quaternion::rotationFromTo(), irr::core::vector3d< f32 >::rotationToDirection(), irr::core::quaternion::set(), irr::core::vector3d< f32 >::set(), irr::core::CMatrix4< T >::setInverseRotationRadians(), irr::core::CMatrix4< T >::setInverseTranslation(), irr::core::CMatrix4< T >::setRotationAxisRadians(), irr::core::CMatrix4< T >::setRotationCenter(), irr::core::CMatrix4< T >::setRotationRadians(), irr::core::CMatrix4< T >::setScale(), irr::core::CMatrix4< T >::setTranslation(), irr::core::quaternion::toAngleAxis(), irr::core::quaternion::toEuler(), irr::core::CMatrix4< T >::transformBoxEx(), irr::core::CMatrix4< T >::transformVect(), irr::core::CMatrix4< T >::translateVect(), and irr::scene::SMD3QuaternionTag::~SMD3QuaternionTag().

+ +
+
+ +
+
+
+template<class T>
+ + + + +
T irr::core::vector3d< T >::Y
+
+
+ +

Y coordinate of the vector.

+ +

Definition at line 411 of file vector3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::addInternalPoint(), irr::core::CMatrix4< T >::buildAxisAlignedBillboard(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixLH(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixRH(), irr::core::CMatrix4< T >::buildRotateFromTo(), irr::core::CMatrix4< T >::buildShadowMatrix(), irr::core::aabbox3d< f32 >::classifyPlaneRelation(), irr::core::vector3d< f32 >::crossProduct(), irr::core::vector3d< f32 >::dotProduct(), irr::core::vector3d< f32 >::equals(), irr::core::quaternion::fromAngleAxis(), irr::core::aabbox3d< f32 >::getArea(), irr::core::vector3d< f32 >::getAs3Values(), irr::core::vector3d< f32 >::getAs4Values(), irr::scene::quake3::getAsVector3df(), irr::core::vector3d< f32 >::getDistanceFrom(), irr::core::vector3d< f32 >::getDistanceFromSQ(), irr::core::aabbox3d< f32 >::getEdges(), irr::core::vector3d< f32 >::getHorizontalAngle(), irr::core::vector3d< f32 >::getInterpolated(), irr::core::vector3d< f32 >::getInterpolated_quadratic(), irr::core::triangle3d< T >::getIntersectionOfPlaneWithLine(), irr::core::vector3d< f32 >::getLength(), irr::core::vector3d< f32 >::getLengthSQ(), irr::core::quaternion::getMatrix(), irr::core::CMatrix4< T >::getRotationDegrees(), irr::core::vector3d< f32 >::getSphericalCoordinateAngles(), irr::core::vector3d< T >::getSphericalCoordinateAngles(), irr::core::aabbox3d< f32 >::getVolume(), irr::core::vector3d< f32 >::interpolate(), irr::core::aabbox3d< f32 >::intersectsWithLine(), irr::core::CMatrix4< T >::inverseRotateVect(), irr::core::CMatrix4< T >::inverseTranslateVect(), irr::core::vector3d< f32 >::invert(), irr::core::triangle3d< T >::isPointInside(), irr::core::aabbox3d< f32 >::isPointInside(), irr::core::aabbox3d< f32 >::isPointTotalInside(), irr::core::vector3d< f32 >::normalize(), irr::core::vector3d< f32 >::operator*(), irr::core::vector3d< f32 >::operator*=(), irr::core::vector3d< f32 >::operator+(), irr::core::vector3d< f32 >::operator+=(), irr::core::vector3d< f32 >::operator-(), irr::core::vector3d< f32 >::operator-=(), irr::core::vector3d< f32 >::operator/(), irr::core::vector3d< T >::operator/(), irr::core::vector3d< f32 >::operator/=(), irr::core::vector3d< T >::operator/=(), irr::core::vector3d< f32 >::operator<(), irr::core::vector3d< f32 >::operator<=(), irr::core::vector3d< f32 >::operator=(), irr::core::vector3d< f32 >::operator>(), irr::core::vector3d< f32 >::operator>=(), irr::core::quaternion::quaternion(), irr::core::CMatrix4< T >::rotateVect(), irr::core::vector3d< f32 >::rotateXYBy(), irr::core::vector3d< f32 >::rotateXZBy(), irr::core::vector3d< f32 >::rotateYZBy(), irr::core::quaternion::rotationFromTo(), irr::core::vector3d< f32 >::rotationToDirection(), irr::core::quaternion::set(), irr::core::vector3d< f32 >::set(), irr::core::CMatrix4< T >::setInverseRotationRadians(), irr::core::CMatrix4< T >::setInverseTranslation(), irr::core::CMatrix4< T >::setRotationAxisRadians(), irr::core::CMatrix4< T >::setRotationCenter(), irr::core::CMatrix4< T >::setRotationRadians(), irr::core::CMatrix4< T >::setScale(), irr::core::CMatrix4< T >::setTranslation(), irr::core::quaternion::toAngleAxis(), irr::core::quaternion::toEuler(), irr::core::CMatrix4< T >::transformBoxEx(), irr::core::CMatrix4< T >::transformVect(), and irr::core::CMatrix4< T >::translateVect().

+ +
+
+ +
+
+
+template<class T>
+ + + + +
T irr::core::vector3d< T >::Z
+
+
+ +

Z coordinate of the vector.

+ +

Definition at line 414 of file vector3d.h.

+ +

Referenced by irr::core::aabbox3d< f32 >::addInternalPoint(), irr::core::CMatrix4< T >::buildAxisAlignedBillboard(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixLH(), irr::core::CMatrix4< T >::buildCameraLookAtMatrixRH(), irr::core::CMatrix4< T >::buildRotateFromTo(), irr::core::CMatrix4< T >::buildShadowMatrix(), irr::core::aabbox3d< f32 >::classifyPlaneRelation(), irr::core::vector3d< f32 >::crossProduct(), irr::core::vector3d< f32 >::dotProduct(), irr::core::vector3d< f32 >::equals(), irr::core::quaternion::fromAngleAxis(), irr::core::aabbox3d< f32 >::getArea(), irr::core::vector3d< f32 >::getAs3Values(), irr::core::vector3d< f32 >::getAs4Values(), irr::scene::quake3::getAsVector3df(), irr::core::vector3d< f32 >::getDistanceFrom(), irr::core::vector3d< f32 >::getDistanceFromSQ(), irr::core::aabbox3d< f32 >::getEdges(), irr::core::vector3d< f32 >::getHorizontalAngle(), irr::core::vector3d< f32 >::getInterpolated(), irr::core::vector3d< f32 >::getInterpolated_quadratic(), irr::core::triangle3d< T >::getIntersectionOfPlaneWithLine(), irr::core::vector3d< f32 >::getLength(), irr::core::vector3d< f32 >::getLengthSQ(), irr::core::quaternion::getMatrix(), irr::core::CMatrix4< T >::getRotationDegrees(), irr::core::vector3d< f32 >::getSphericalCoordinateAngles(), irr::core::vector3d< T >::getSphericalCoordinateAngles(), irr::core::aabbox3d< f32 >::getVolume(), irr::core::vector3d< f32 >::interpolate(), irr::core::aabbox3d< f32 >::intersectsWithLine(), irr::core::CMatrix4< T >::inverseRotateVect(), irr::core::CMatrix4< T >::inverseTranslateVect(), irr::core::vector3d< f32 >::invert(), irr::core::triangle3d< T >::isPointInside(), irr::core::aabbox3d< f32 >::isPointInside(), irr::core::aabbox3d< f32 >::isPointTotalInside(), irr::core::vector3d< f32 >::normalize(), irr::core::vector3d< f32 >::operator*(), irr::core::vector3d< f32 >::operator*=(), irr::core::vector3d< f32 >::operator+(), irr::core::vector3d< f32 >::operator+=(), irr::core::vector3d< f32 >::operator-(), irr::core::vector3d< f32 >::operator-=(), irr::core::vector3d< f32 >::operator/(), irr::core::vector3d< T >::operator/(), irr::core::vector3d< f32 >::operator/=(), irr::core::vector3d< T >::operator/=(), irr::core::vector3d< f32 >::operator<(), irr::core::vector3d< f32 >::operator<=(), irr::core::vector3d< f32 >::operator=(), irr::core::vector3d< f32 >::operator>(), irr::core::vector3d< f32 >::operator>=(), irr::core::quaternion::quaternion(), irr::core::CMatrix4< T >::rotateVect(), irr::core::vector3d< f32 >::rotateXYBy(), irr::core::vector3d< f32 >::rotateXZBy(), irr::core::vector3d< f32 >::rotateYZBy(), irr::core::quaternion::rotationFromTo(), irr::core::vector3d< f32 >::rotationToDirection(), irr::core::quaternion::set(), irr::core::vector3d< f32 >::set(), irr::core::CMatrix4< T >::setInverseRotationRadians(), irr::core::CMatrix4< T >::setInverseTranslation(), irr::core::CMatrix4< T >::setRotationAxisRadians(), irr::core::CMatrix4< T >::setRotationCenter(), irr::core::CMatrix4< T >::setRotationRadians(), irr::core::CMatrix4< T >::setScale(), irr::core::CMatrix4< T >::setTranslation(), irr::core::quaternion::toAngleAxis(), irr::core::quaternion::toEuler(), irr::core::CMatrix4< T >::transformBoxEx(), irr::core::CMatrix4< T >::transformVect(), and irr::core::CMatrix4< T >::translateVect().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control-members.html new file mode 100644 index 0000000..5863de6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control-members.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::ICursorControl Member List
+
+
+This is the complete list of members for irr::gui::ICursorControl, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
addIcon(const gui::SCursorSprite &icon)irr::gui::ICursorControl [inline, virtual]
changeIcon(ECURSOR_ICON iconId, const gui::SCursorSprite &sprite)irr::gui::ICursorControl [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getActiveIcon() const irr::gui::ICursorControl [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getPlatformBehavior() const irr::gui::ICursorControl [inline, virtual]
getPosition()=0irr::gui::ICursorControl [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition()=0irr::gui::ICursorControl [pure virtual]
getSupportedIconSize() const irr::gui::ICursorControl [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isVisible() const =0irr::gui::ICursorControl [pure virtual]
setActiveIcon(ECURSOR_ICON iconId)irr::gui::ICursorControl [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setPlatformBehavior(ECURSOR_PLATFORM_BEHAVIOR behavior)irr::gui::ICursorControl [inline, virtual]
setPosition(const core::position2d< f32 > &pos)=0irr::gui::ICursorControl [pure virtual]
setPosition(f32 x, f32 y)=0irr::gui::ICursorControl [pure virtual]
setPosition(const core::position2d< s32 > &pos)=0irr::gui::ICursorControl [pure virtual]
setPosition(s32 x, s32 y)=0irr::gui::ICursorControl [pure virtual]
setReferenceRect(core::rect< s32 > *rect=0)=0irr::gui::ICursorControl [pure virtual]
setVisible(bool visible)=0irr::gui::ICursorControl [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.html new file mode 100644 index 0000000..45b7a3c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.html @@ -0,0 +1,567 @@ + + + + +Irrlicht 3D Engine: irr::gui::ICursorControl Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::ICursorControl Class Reference
+
+
+ +

Interface to manipulate the mouse cursor. + More...

+ +

#include <ICursorControl.h>

+
+ + Inheritance diagram for irr::gui::ICursorControl:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface to manipulate the mouse cursor.

+ +

Definition at line 97 of file ICursorControl.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual ECURSOR_ICON irr::gui::ICursorControl::addIcon (const gui::SCursorSpriteicon) [inline, virtual]
+
+
+ +

Add a custom sprite as cursor icon.

+
Returns:
Identification for the icon
+ +

Definition at line 166 of file ICursorControl.h.

+ +

References irr::gui::ECI_NORMAL.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::ICursorControl::changeIcon (ECURSOR_ICON iconId,
const gui::SCursorSpritesprite 
) [inline, virtual]
+
+
+ +

replace a cursor icon.

+

Changing cursor icons is so far only supported on Win32 and Linux Note that this only changes the icons within your application, system cursors outside your application will not be affected.

+ +

Definition at line 173 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + + + + +
virtual ECURSOR_ICON irr::gui::ICursorControl::getActiveIcon () const [inline, virtual]
+
+
+ +

Gets the currently active icon.

+ +

Definition at line 162 of file ICursorControl.h.

+ +

References irr::gui::ECI_NORMAL.

+ +
+
+ +
+
+ + + + + + + +
virtual ECURSOR_PLATFORM_BEHAVIOR irr::gui::ICursorControl::getPlatformBehavior () const [inline, virtual]
+
+
+ +

Return platform specific behavior.

+
Returns:
Behavior set by setPlatformBehavior or ECPB_NONE for platforms not implementing specific behaviors.
+ +

Definition at line 184 of file ICursorControl.h.

+ +

References irr::gui::ECPB_NONE.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::position2d<s32>& irr::gui::ICursorControl::getPosition () [pure virtual]
+
+
+ +

Returns the current position of the mouse cursor.

+
Returns:
Returns the current position of the cursor. The returned position is the position of the mouse cursor in pixel units.
+ +
+
+ +
+
+ + + + + + + +
virtual core::position2d<f32> irr::gui::ICursorControl::getRelativePosition () [pure virtual]
+
+
+ +

Returns the current position of the mouse cursor.

+
Returns:
Returns the current position of the cursor. The returned position is a value between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is the top left corner and (1.0f, 1.0f) is the bottom right corner of the render window.
+ +
+
+ +
+
+ + + + + + + +
virtual core::dimension2di irr::gui::ICursorControl::getSupportedIconSize () const [inline, virtual]
+
+
+ +

Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work.

+ +

Definition at line 176 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::ICursorControl::isVisible () const [pure virtual]
+
+
+ +

Returns if the cursor is currently visible.

+
Returns:
True if the cursor is visible, false if not.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::ICursorControl::setActiveIcon (ECURSOR_ICON iconId) [inline, virtual]
+
+
+ +

Sets the active cursor icon.

+

Setting cursor icons is so far only supported on Win32 and Linux

+ +

Definition at line 159 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::ICursorControl::setPlatformBehavior (ECURSOR_PLATFORM_BEHAVIOR behavior) [inline, virtual]
+
+
+ +

Set platform specific behavior flags.

+ +

Definition at line 179 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::ICursorControl::setPosition (const core::position2d< f32 > & pos) [pure virtual]
+
+
+ +

Sets the new position of the cursor.

+

The position must be between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is the top left corner and (1.0f, 1.0f) is the bottom right corner of the render window.

+
Parameters:
+ + +
posNew position of the cursor.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::ICursorControl::setPosition (f32 x,
f32 y 
) [pure virtual]
+
+
+ +

Sets the new position of the cursor.

+

The position must be between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is the top left corner and (1.0f, 1.0f) is the bottom right corner of the render window.

+
Parameters:
+ + + +
xNew x-coord of the cursor.
yNew x-coord of the cursor.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::ICursorControl::setPosition (const core::position2d< s32 > & pos) [pure virtual]
+
+
+ +

Sets the new position of the cursor.

+
Parameters:
+ + +
pos,:New position of the cursor. The coordinates are pixel units.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::ICursorControl::setPosition (s32 x,
s32 y 
) [pure virtual]
+
+
+ +

Sets the new position of the cursor.

+
Parameters:
+ + + +
xNew x-coord of the cursor. The coordinates are pixel units.
yNew y-coord of the cursor. The coordinates are pixel units.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::ICursorControl::setReferenceRect (core::rect< s32 > * rect = 0) [pure virtual]
+
+
+ +

Sets an absolute reference rect for setting and retrieving the cursor position.

+

If this rect is set, the cursor position is not being calculated relative to the rendering window but to this rect. You can set the rect pointer to 0 to disable this feature again. This feature is useful when rendering into parts of foreign windows for example in an editor.

+
Parameters:
+ + +
rect,:A pointer to an reference rectangle or 0 to disable the reference rectangle.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::ICursorControl::setVisible (bool visible) [pure virtual]
+
+
+ +

Changes the visible state of the mouse cursor.

+
Parameters:
+ + +
visible,:The new visible state. If true, the cursor will be visible, if false, it will be invisible.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.png new file mode 100644 index 0000000..808ef6d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_cursor_control.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button-members.html new file mode 100644 index 0000000..048aab7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button-members.html @@ -0,0 +1,234 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIButton Member List
+
+
+This is the complete list of members for irr::gui::IGUIButton, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getActiveFont() const =0irr::gui::IGUIButton [pure virtual]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getOverrideFont(void) const =0irr::gui::IGUIButton [pure virtual]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIButton(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIButton [inline]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isAlphaChannelUsed() const =0irr::gui::IGUIButton [pure virtual]
isDrawingBorder() const =0irr::gui::IGUIButton [pure virtual]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isPressed() const =0irr::gui::IGUIButton [pure virtual]
isPushButton() const =0irr::gui::IGUIButton [pure virtual]
isScalingImage() const =0irr::gui::IGUIButton [pure virtual]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
IsVisibleirr::gui::IGUIElement [protected]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDrawBorder(bool border=true)=0irr::gui::IGUIButton [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setImage(video::ITexture *image=0)=0irr::gui::IGUIButton [pure virtual]
setImage(video::ITexture *image, const core::rect< s32 > &pos)=0irr::gui::IGUIButton [pure virtual]
setIsPushButton(bool isPushButton=true)=0irr::gui::IGUIButton [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setOverrideFont(IGUIFont *font=0)=0irr::gui::IGUIButton [pure virtual]
setPressed(bool pressed=true)=0irr::gui::IGUIButton [pure virtual]
setPressedImage(video::ITexture *image=0)=0irr::gui::IGUIButton [pure virtual]
setPressedImage(video::ITexture *image, const core::rect< s32 > &pos)=0irr::gui::IGUIButton [pure virtual]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setScaleImage(bool scaleImage=true)=0irr::gui::IGUIButton [pure virtual]
setSprite(EGUI_BUTTON_STATE state, s32 index, video::SColor color=video::SColor(255, 255, 255, 255), bool loop=false)=0irr::gui::IGUIButton [pure virtual]
setSpriteBank(IGUISpriteBank *bank=0)=0irr::gui::IGUIButton [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setUseAlphaChannel(bool useAlphaChannel=true)=0irr::gui::IGUIButton [pure virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.html new file mode 100644 index 0000000..81476c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.html @@ -0,0 +1,669 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIButton Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIButton Class Reference
+
+
+ +

GUI Button interface. + More...

+ +

#include <IGUIButton.h>

+
+ + Inheritance diagram for irr::gui::IGUIButton:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • IGUIButton (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle) +
    constructor
  • virtual IGUIFont * getActiveFont () const =0 +
    Get the font which is used right now for drawing.
  • virtual IGUIFont * getOverrideFont (void) const =0 +
    Gets the override font (if any)
  • virtual bool isAlphaChannelUsed () const =0 +
    Returns if the alpha channel should be used for drawing background images on the button.
  • virtual bool isDrawingBorder () const =0 +
    Returns if the border and button face are being drawn using the skin.
  • virtual bool isPressed () const =0 +
    Returns if the button is currently pressed.
  • virtual bool isPushButton () const =0 +
    Returns whether the button is a push button.
  • virtual bool isScalingImage () const =0 +
    Checks whether the button scales the used images.
  • virtual void setDrawBorder (bool border=true)=0 +
    Sets if the button should use the skin to draw its border and button face (default is true)
  • virtual void setImage (video::ITexture *image=0)=0 +
    Sets an image which should be displayed on the button when it is in normal state.
  • virtual void setImage (video::ITexture *image, const core::rect< s32 > &pos)=0 +
    Sets a background image for the button when it is in normal state.
  • virtual void setIsPushButton (bool isPushButton=true)=0 +
    Sets if the button should behave like a push button.
  • virtual void setOverrideFont (IGUIFont *font=0)=0 +
    Sets another skin independent font.
  • virtual void setPressed (bool pressed=true)=0 +
    Sets the pressed state of the button if this is a pushbutton.
  • virtual void setPressedImage (video::ITexture *image=0)=0 +
    Sets a background image for the button when it is in pressed state.
  • virtual void setPressedImage (video::ITexture *image, const core::rect< s32 > &pos)=0 +
    Sets an image which should be displayed on the button when it is in pressed state.
  • virtual void setScaleImage (bool scaleImage=true)=0 +
    Sets if the button should scale the button images to fit.
  • virtual void setSprite (EGUI_BUTTON_STATE state, s32 index, video::SColor color=video::SColor(255, 255, 255, 255), bool loop=false)=0 +
    Sets the animated sprite for a specific button state.
  • virtual void setSpriteBank (IGUISpriteBank *bank=0)=0 +
    Sets the sprite bank used by the button.
  • virtual void setUseAlphaChannel (bool useAlphaChannel=true)=0 +
    Sets if the alpha channel should be used for drawing background images on the button (default is false)
+

Detailed Description

+

GUI Button interface.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_BUTTON_CLICKED
  • +
+
+ +

Definition at line 58 of file IGUIButton.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIButton::IGUIButton (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 63 of file IGUIButton.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual IGUIFont* irr::gui::IGUIButton::getActiveFont () const [pure virtual]
+
+
+ +

Get the font which is used right now for drawing.

+

Currently this is the override font when one is set and the font of the active skin otherwise

+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIFont* irr::gui::IGUIButton::getOverrideFont (void ) const [pure virtual]
+
+
+ +

Gets the override font (if any)

+
Returns:
The override font (may be 0)
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIButton::isAlphaChannelUsed () const [pure virtual]
+
+
+ +

Returns if the alpha channel should be used for drawing background images on the button.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIButton::isDrawingBorder () const [pure virtual]
+
+
+ +

Returns if the border and button face are being drawn using the skin.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIButton::isPressed () const [pure virtual]
+
+
+ +

Returns if the button is currently pressed.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIButton::isPushButton () const [pure virtual]
+
+
+ +

Returns whether the button is a push button.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIButton::isScalingImage () const [pure virtual]
+
+
+ +

Checks whether the button scales the used images.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setDrawBorder (bool border = true) [pure virtual]
+
+
+ +

Sets if the button should use the skin to draw its border and button face (default is true)

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setImage (video::ITextureimage = 0) [pure virtual]
+
+
+ +

Sets an image which should be displayed on the button when it is in normal state.

+
Parameters:
+ + +
image,:Image to be displayed
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIButton::setImage (video::ITextureimage,
const core::rect< s32 > & pos 
) [pure virtual]
+
+
+ +

Sets a background image for the button when it is in normal state.

+
Parameters:
+ + + +
image,:Texture containing the image to be displayed
pos,:Position in the texture, where the image is located
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setIsPushButton (bool isPushButton = true) [pure virtual]
+
+
+ +

Sets if the button should behave like a push button.

+

Which means it can be in two states: Normal or Pressed. With a click on the button, the user can change the state of the button.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setOverrideFont (IGUIFontfont = 0) [pure virtual]
+
+
+ +

Sets another skin independent font.

+

If this is set to zero, the button uses the font of the skin.

+
Parameters:
+ + +
font,:New font to set.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setPressed (bool pressed = true) [pure virtual]
+
+
+ +

Sets the pressed state of the button if this is a pushbutton.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setPressedImage (video::ITextureimage = 0) [pure virtual]
+
+
+ +

Sets a background image for the button when it is in pressed state.

+

If no images is specified for the pressed state via setPressedImage(), this image is also drawn in pressed state.

+
Parameters:
+ + +
image,:Image to be displayed
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIButton::setPressedImage (video::ITextureimage,
const core::rect< s32 > & pos 
) [pure virtual]
+
+
+ +

Sets an image which should be displayed on the button when it is in pressed state.

+
Parameters:
+ + + +
image,:Texture containing the image to be displayed
pos,:Position in the texture, where the image is located
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setScaleImage (bool scaleImage = true) [pure virtual]
+
+
+ +

Sets if the button should scale the button images to fit.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIButton::setSprite (EGUI_BUTTON_STATE state,
s32 index,
video::SColor color = video::SColor(255, 255, 255, 255),
bool loop = false 
) [pure virtual]
+
+
+ +

Sets the animated sprite for a specific button state.

+
Parameters:
+ + + + + + +
index,:Number of the sprite within the sprite bank, use -1 for no sprite
state,:State of the button to set the sprite for
index,:The sprite number from the current sprite bank
color,:The color of the sprite
loop,:True if the animation should loop, false if not
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setSpriteBank (IGUISpriteBankbank = 0) [pure virtual]
+
+
+ +

Sets the sprite bank used by the button.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIButton::setUseAlphaChannel (bool useAlphaChannel = true) [pure virtual]
+
+
+ +

Sets if the alpha channel should be used for drawing background images on the button (default is false)

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.png new file mode 100644 index 0000000..2b2db99 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_button.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box-members.html new file mode 100644 index 0000000..d21d2a6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box-members.html @@ -0,0 +1,217 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUICheckBox Member List
+
+
+This is the complete list of members for irr::gui::IGUICheckBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUICheckBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUICheckBox [inline]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isChecked() const =0irr::gui::IGUICheckBox [pure virtual]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
isVisible() const irr::gui::IGUIElement [inline, virtual]
IsVisibleirr::gui::IGUIElement [protected]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setChecked(bool checked)=0irr::gui::IGUICheckBox [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.html new file mode 100644 index 0000000..30563c6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.html @@ -0,0 +1,245 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUICheckBox Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUICheckBox Class Reference
+
+
+ +

GUI Check box interface. + More...

+ +

#include <IGUICheckBox.h>

+
+ + Inheritance diagram for irr::gui::IGUICheckBox:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

GUI Check box interface.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_CHECKBOX_CHANGED
  • +
+
+ +

Definition at line 19 of file IGUICheckBox.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUICheckBox::IGUICheckBox (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 24 of file IGUICheckBox.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUICheckBox::isChecked () const [pure virtual]
+
+
+ +

Returns true if box is checked.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUICheckBox::setChecked (bool checked) [pure virtual]
+
+
+ +

Set if box is checked.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.png new file mode 100644 index 0000000..f27f784 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_check_box.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog-members.html new file mode 100644 index 0000000..14c47bb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog-members.html @@ -0,0 +1,215 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIColorSelectDialog Member List
+
+
+This is the complete list of members for irr::gui::IGUIColorSelectDialog, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIColorSelectDialog(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIColorSelectDialog [inline]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
isVisible() const irr::gui::IGUIElement [inline, virtual]
IsVisibleirr::gui::IGUIElement [protected]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.html new file mode 100644 index 0000000..4586ad6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.html @@ -0,0 +1,201 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIColorSelectDialog Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIColorSelectDialog Class Reference
+
+
+ +

Standard color chooser dialog. + More...

+ +

#include <IGUIColorSelectDialog.h>

+
+ + Inheritance diagram for irr::gui::IGUIColorSelectDialog:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Standard color chooser dialog.

+ +

Definition at line 16 of file IGUIColorSelectDialog.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIColorSelectDialog::IGUIColorSelectDialog (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 21 of file IGUIColorSelectDialog.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.png new file mode 100644 index 0000000..ae6cc7f Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box-members.html new file mode 100644 index 0000000..093bc38 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box-members.html @@ -0,0 +1,227 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIComboBox Member List
+
+
+This is the complete list of members for irr::gui::IGUIComboBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
addItem(const wchar_t *text, u32 data=0)=0irr::gui::IGUIComboBox [pure virtual]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
clear()=0irr::gui::IGUIComboBox [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getIndexForItemData(u32 data) const =0irr::gui::IGUIComboBox [pure virtual]
getItem(u32 idx) const =0irr::gui::IGUIComboBox [pure virtual]
getItemCount() const =0irr::gui::IGUIComboBox [pure virtual]
getItemData(u32 idx) const =0irr::gui::IGUIComboBox [pure virtual]
getMaxSelectionRows() const =0irr::gui::IGUIComboBox [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getSelected() const =0irr::gui::IGUIComboBox [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIComboBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIComboBox [inline]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
removeItem(u32 idx)=0irr::gui::IGUIComboBox [pure virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSelectionRows(u32 max)=0irr::gui::IGUIComboBox [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSelected(s32 idx)=0irr::gui::IGUIComboBox [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0irr::gui::IGUIComboBox [pure virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.html new file mode 100644 index 0000000..ba4fb65 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.html @@ -0,0 +1,470 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIComboBox Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIComboBox Class Reference
+
+
+ +

Combobox widget. + More...

+ +

#include <IGUIComboBox.h>

+
+ + Inheritance diagram for irr::gui::IGUIComboBox:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Combobox widget.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_COMBO_BOX_CHANGED
  • +
+
+ +

Definition at line 19 of file IGUIComboBox.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIComboBox::IGUIComboBox (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 24 of file IGUIComboBox.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual u32 irr::gui::IGUIComboBox::addItem (const wchar_t * text,
u32 data = 0 
) [pure virtual]
+
+
+ +

Adds an item and returns the index of it.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIComboBox::clear () [pure virtual]
+
+
+ +

Deletes all items in the combo box.

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::gui::IGUIComboBox::getIndexForItemData (u32 data) const [pure virtual]
+
+
+ +

Returns index based on item data.

+ +
+
+ +
+
+ + + + + + + + +
virtual const wchar_t* irr::gui::IGUIComboBox::getItem (u32 idx) const [pure virtual]
+
+
+ +

Returns string of an item. the idx may be a value from 0 to itemCount-1.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUIComboBox::getItemCount () const [pure virtual]
+
+
+ +

Returns amount of items in box.

+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::gui::IGUIComboBox::getItemData (u32 idx) const [pure virtual]
+
+
+ +

Returns item data of an item. the idx may be a value from 0 to itemCount-1.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUIComboBox::getMaxSelectionRows () const [pure virtual]
+
+
+ +

Get the maximimal number of rows for the selection listbox.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIComboBox::getSelected () const [pure virtual]
+
+
+ +

Returns id of selected item. returns -1 if no item is selected.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIComboBox::removeItem (u32 idx) [pure virtual]
+
+
+ +

Removes an item from the combo box.

+

Warning. This will change the index of all following items

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIComboBox::setMaxSelectionRows (u32 max) [pure virtual]
+
+
+ +

Set the maximal number of rows for the selection listbox.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIComboBox::setSelected (s32 idx) [pure virtual]
+
+
+ +

Sets the selected item. Set this to -1 if no item should be selected.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIComboBox::setTextAlignment (EGUI_ALIGNMENT horizontal,
EGUI_ALIGNMENT vertical 
) [pure virtual]
+
+
+ +

Sets text justification of the text area.

+
Parameters:
+ + + +
horizontal,:EGUIA_UPPERLEFT for left justified (default), EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
vertical,:EGUIA_UPPERLEFT to align with top edge, EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default).
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.png new file mode 100644 index 0000000..485bb98 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_combo_box.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu-members.html new file mode 100644 index 0000000..b05879c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu-members.html @@ -0,0 +1,237 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIContextMenu Member List
+
+
+This is the complete list of members for irr::gui::IGUIContextMenu, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
addItem(const wchar_t *text, s32 commandId=-1, bool enabled=true, bool hasSubMenu=false, bool checked=false, bool autoChecking=false)=0irr::gui::IGUIContextMenu [pure virtual]
addSeparator()=0irr::gui::IGUIContextMenu [pure virtual]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const =0irr::gui::IGUIContextMenu [pure virtual]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getCloseHandling() const =0irr::gui::IGUIContextMenu [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getItemAutoChecking(u32 idx) const =0irr::gui::IGUIContextMenu [pure virtual]
getItemCommandId(u32 idx) const =0irr::gui::IGUIContextMenu [pure virtual]
getItemCount() const =0irr::gui::IGUIContextMenu [pure virtual]
getItemText(u32 idx) const =0irr::gui::IGUIContextMenu [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getSelectedItem() const =0irr::gui::IGUIContextMenu [pure virtual]
getSubMenu(u32 idx) const =0irr::gui::IGUIContextMenu [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIContextMenu(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIContextMenu [inline]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
insertItem(u32 idx, const wchar_t *text, s32 commandId=-1, bool enabled=true, bool hasSubMenu=false, bool checked=false, bool autoChecking=false)=0irr::gui::IGUIContextMenu [pure virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isItemChecked(u32 idx) const =0irr::gui::IGUIContextMenu [pure virtual]
isItemEnabled(u32 idx) const =0irr::gui::IGUIContextMenu [pure virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeAllItems()=0irr::gui::IGUIContextMenu [pure virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
removeItem(u32 idx)=0irr::gui::IGUIContextMenu [pure virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setCloseHandling(ECONTEXT_MENU_CLOSE onClose)=0irr::gui::IGUIContextMenu [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setEventParent(IGUIElement *parent)=0irr::gui::IGUIContextMenu [pure virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setItemAutoChecking(u32 idx, bool autoChecking)=0irr::gui::IGUIContextMenu [pure virtual]
setItemChecked(u32 idx, bool enabled)=0irr::gui::IGUIContextMenu [pure virtual]
setItemCommandId(u32 idx, s32 id)=0irr::gui::IGUIContextMenu [pure virtual]
setItemEnabled(u32 idx, bool enabled)=0irr::gui::IGUIContextMenu [pure virtual]
setItemText(u32 idx, const wchar_t *text)=0irr::gui::IGUIContextMenu [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.html new file mode 100644 index 0000000..8facf11 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.html @@ -0,0 +1,876 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIContextMenu Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIContextMenu Class Reference
+
+
+ +

GUI Context menu interface. + More...

+ +

#include <IGUIContextMenu.h>

+
+ + Inheritance diagram for irr::gui::IGUIContextMenu:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

GUI Context menu interface.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_ELEMENT_CLOSED
  • +
  • EGET_MENU_ITEM_SELECTED
  • +
+
+ +

Definition at line 35 of file IGUIContextMenu.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIContextMenu::IGUIContextMenu (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 40 of file IGUIContextMenu.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual u32 irr::gui::IGUIContextMenu::addItem (const wchar_t * text,
s32 commandId = -1,
bool enabled = true,
bool hasSubMenu = false,
bool checked = false,
bool autoChecking = false 
) [pure virtual]
+
+
+ +

Adds a menu item.

+
Parameters:
+ + + + + + + +
text,:Text of menu item. Set this to 0 to create an separator instead of a real item, which is the same like calling addSeparator();
commandId,:Command id of menu item, a simple id you may set to whatever you want.
enabled,:Specifies if the menu item should be enabled.
hasSubMenu,:Set this to true if there should be a submenu at this item. You can access this submenu via getSubMenu().
checked,:Specifies if the menu item should be initially checked.
autoChecking,:Specifies if the item should be checked by clicking
+
+
+
Returns:
Returns the index of the new item
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIContextMenu::addSeparator () [pure virtual]
+
+
+ +

Adds a separator item to the menu.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUIContextMenu::findItemWithCommandId (s32 commandId,
u32 idxStartSearch = 0 
) const [pure virtual]
+
+
+ +

Find an item by it's CommandID.

+
Parameters:
+ + + +
commandId,:We are looking for the first item which has this commandID
idxStartSearch,:Start searching from this index.
+
+
+
Returns:
Returns the index of the item when found or otherwise -1.
+ +
+
+ +
+
+ + + + + + + +
virtual ECONTEXT_MENU_CLOSE irr::gui::IGUIContextMenu::getCloseHandling () const [pure virtual]
+
+
+ +

get current behavior when the menu will be closed

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIContextMenu::getItemAutoChecking (u32 idx) const [pure virtual]
+
+
+ +

does the element change the checked status on clicking

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::gui::IGUIContextMenu::getItemCommandId (u32 idx) const [pure virtual]
+
+
+ +

Get the command id of a menu item.

+
Parameters:
+ + +
idx,:Zero based index of the menu item
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUIContextMenu::getItemCount () const [pure virtual]
+
+
+ +

Get amount of menu items.

+ +
+
+ +
+
+ + + + + + + + +
virtual const wchar_t* irr::gui::IGUIContextMenu::getItemText (u32 idx) const [pure virtual]
+
+
+ +

Get text of the menu item.

+
Parameters:
+ + +
idx,:Zero based index of the menu item
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIContextMenu::getSelectedItem () const [pure virtual]
+
+
+ +

Get the selected item in the menu.

+
Returns:
Index of the selected item, -1 if none selected.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIContextMenu* irr::gui::IGUIContextMenu::getSubMenu (u32 idx) const [pure virtual]
+
+
+ +

Get a pointer to the submenu of an item.

+

0 is returned if there is no submenu

+
Parameters:
+ + +
idx,:Zero based index of the menu item
+
+
+
Returns:
Returns a pointer to the submenu of an item.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual u32 irr::gui::IGUIContextMenu::insertItem (u32 idx,
const wchar_t * text,
s32 commandId = -1,
bool enabled = true,
bool hasSubMenu = false,
bool checked = false,
bool autoChecking = false 
) [pure virtual]
+
+
+ +

Insert a menu item at specified position.

+
Parameters:
+ + + + + + + + +
idx,:Position to insert the new element, should be smaller than itemcount otherwise the item is added to the end.
text,:Text of menu item. Set this to 0 to create an separator instead of a real item, which is the same like calling addSeparator();
commandId,:Command id of menu item, a simple id you may set to whatever you want.
enabled,:Specifies if the menu item should be enabled.
hasSubMenu,:Set this to true if there should be a submenu at this item. You can access this submenu via getSubMenu().
checked,:Specifies if the menu item should be initially checked.
autoChecking,:Specifies if the item should be checked by clicking
+
+
+
Returns:
Returns the index of the new item
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIContextMenu::isItemChecked (u32 idx) const [pure virtual]
+
+
+ +

Check if a menu item is checked.

+
Parameters:
+ + +
idx,:Zero based index of the menu item
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIContextMenu::isItemEnabled (u32 idx) const [pure virtual]
+
+
+ +

Check if a menu item is enabled.

+
Parameters:
+ + +
idx,:Zero based index of the menu item
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIContextMenu::removeAllItems () [pure virtual]
+
+
+ +

Removes all menu items.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIContextMenu::removeItem (u32 idx) [pure virtual]
+
+
+ +

Removes a menu item.

+
Parameters:
+ + +
idx,:Zero based index of the menu item
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setCloseHandling (ECONTEXT_MENU_CLOSE onClose) [pure virtual]
+
+
+ +

set behavior when menus are closed

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setEventParent (IGUIElementparent) [pure virtual]
+
+
+ +

When an eventparent is set it receives events instead of the usual parent element.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setItemAutoChecking (u32 idx,
bool autoChecking 
) [pure virtual]
+
+
+ +

should the element change the checked status on clicking

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setItemChecked (u32 idx,
bool enabled 
) [pure virtual]
+
+
+ +

Sets if the menu item should be checked.

+
Parameters:
+ + + +
idx,:Zero based index of the menu item
enabled,:True if it is enabled, otherwise false.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setItemCommandId (u32 idx,
s32 id 
) [pure virtual]
+
+
+ +

Sets the command id of a menu item.

+
Parameters:
+ + + +
idx,:Zero based index of the menu item
id,:Command id of menu item, a simple id you may set to whatever you want.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setItemEnabled (u32 idx,
bool enabled 
) [pure virtual]
+
+
+ +

Sets if the menu item should be enabled.

+
Parameters:
+ + + +
idx,:Zero based index of the menu item
enabled,:True if it is enabled, otherwise false.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIContextMenu::setItemText (u32 idx,
const wchar_t * text 
) [pure virtual]
+
+
+ +

Sets text of the menu item.

+
Parameters:
+ + + +
idx,:Zero based index of the menu item
text,:New text of the item.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.png new file mode 100644 index 0000000..31e1a33 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_context_menu.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box-members.html new file mode 100644 index 0000000..4c34970 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box-members.html @@ -0,0 +1,236 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIEditBox Member List
+
+
+This is the complete list of members for irr::gui::IGUIEditBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
enableOverrideColor(bool enable)=0irr::gui::IGUIEditBox [pure virtual]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getActiveFont() const =0irr::gui::IGUIEditBox [pure virtual]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getMax() const =0irr::gui::IGUIEditBox [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getOverrideColor() const =0irr::gui::IGUIEditBox [pure virtual]
getOverrideFont() const =0irr::gui::IGUIEditBox [pure virtual]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getTextDimension()=0irr::gui::IGUIEditBox [pure virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIEditBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIEditBox [inline]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isAutoScrollEnabled() const =0irr::gui::IGUIEditBox [pure virtual]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMultiLineEnabled() const =0irr::gui::IGUIEditBox [pure virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isOverrideColorEnabled(void) const =0irr::gui::IGUIEditBox [pure virtual]
isPasswordBox() const =0irr::gui::IGUIEditBox [pure virtual]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
isWordWrapEnabled() const =0irr::gui::IGUIEditBox [pure virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setAutoScroll(bool enable)=0irr::gui::IGUIEditBox [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDrawBackground(bool draw)=0irr::gui::IGUIEditBox [pure virtual]
setDrawBorder(bool border)=0irr::gui::IGUIEditBox [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMax(u32 max)=0irr::gui::IGUIEditBox [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMultiLine(bool enable)=0irr::gui::IGUIEditBox [pure virtual]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setOverrideColor(video::SColor color)=0irr::gui::IGUIEditBox [pure virtual]
setOverrideFont(IGUIFont *font=0)=0irr::gui::IGUIEditBox [pure virtual]
setPasswordBox(bool passwordBox, wchar_t passwordChar=L'*')=0irr::gui::IGUIEditBox [pure virtual]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0irr::gui::IGUIEditBox [pure virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
setWordWrap(bool enable)=0irr::gui::IGUIEditBox [pure virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.html new file mode 100644 index 0000000..11f4280 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.html @@ -0,0 +1,711 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIEditBox Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIEditBox Class Reference
+
+
+ +

Single line edit box for editing simple text. + More...

+ +

#include <IGUIEditBox.h>

+
+ + Inheritance diagram for irr::gui::IGUIEditBox:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Single line edit box for editing simple text.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_EDITBOX_ENTER
  • +
  • EGET_EDITBOX_CHANGED
  • +
  • EGET_EDITBOX_MARKING_CHANGED
  • +
+
+ +

Definition at line 23 of file IGUIEditBox.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIEditBox::IGUIEditBox (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 28 of file IGUIEditBox.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::enableOverrideColor (bool enable) [pure virtual]
+
+
+ +

Sets if the text should use the override color or the color in the gui skin.

+
Parameters:
+ + +
enable,:If set to true, the override color, which can be set with IGUIEditBox::setOverrideColor is used, otherwise the EGDC_BUTTON_TEXT color of the skin.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual IGUIFont* irr::gui::IGUIEditBox::getActiveFont () const [pure virtual]
+
+
+ +

Get the font which is used right now for drawing.

+

Currently this is the override font when one is set and the font of the active skin otherwise

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUIEditBox::getMax () const [pure virtual]
+
+
+ +

Returns maximum amount of characters, previously set by setMax();.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SColor irr::gui::IGUIEditBox::getOverrideColor () const [pure virtual]
+
+
+ +

Gets the override color.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUIFont* irr::gui::IGUIEditBox::getOverrideFont () const [pure virtual]
+
+
+ +

Gets the override font (if any)

+
Returns:
The override font (may be 0)
+ +
+
+ +
+
+ + + + + + + +
virtual core::dimension2du irr::gui::IGUIEditBox::getTextDimension () [pure virtual]
+
+
+ +

Gets the size area of the text in the edit box.

+
Returns:
The size in pixels of the text
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIEditBox::isAutoScrollEnabled () const [pure virtual]
+
+
+ +

Checks to see if automatic scrolling is enabled.

+
Returns:
true if automatic scrolling is enabled, false if not
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIEditBox::isMultiLineEnabled () const [pure virtual]
+
+
+ +

Checks if multi line editing is enabled.

+
Returns:
true if multi-line is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIEditBox::isOverrideColorEnabled (void ) const [pure virtual]
+
+
+ +

Checks if an override color is enabled.

+
Returns:
true if the override color is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIEditBox::isPasswordBox () const [pure virtual]
+
+
+ +

Returns true if the edit box is currently a password box.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIEditBox::isWordWrapEnabled () const [pure virtual]
+
+
+ +

Checks if word wrap is enabled.

+
Returns:
true if word wrap is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setAutoScroll (bool enable) [pure virtual]
+
+
+ +

Enables or disables automatic scrolling with cursor position.

+
Parameters:
+ + +
enable,:If set to true, the text will move around with the cursor position
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setDrawBackground (bool draw) [pure virtual]
+
+
+ +

Sets whether to draw the background.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setDrawBorder (bool border) [pure virtual]
+
+
+ +

Turns the border on or off.

+
Parameters:
+ + +
border,:true if you want the border to be drawn, false if not
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setMax (u32 max) [pure virtual]
+
+
+ +

Sets the maximum amount of characters which may be entered in the box.

+
Parameters:
+ + +
max,:Maximum amount of characters. If 0, the character amount is infinity.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setMultiLine (bool enable) [pure virtual]
+
+
+ +

Enables or disables newlines.

+
Parameters:
+ + +
enable,:If set to true, the EGET_EDITBOX_ENTER event will not be fired, instead a newline character will be inserted.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setOverrideColor (video::SColor color) [pure virtual]
+
+
+ +

Sets another color for the text.

+

If set, the edit box does not use the EGDC_BUTTON_TEXT color defined in the skin, but the set color instead. You don't need to call IGUIEditBox::enableOverrrideColor(true) after this, this is done by this function. If you set a color, and you want the text displayed with the color of the skin again, call IGUIEditBox::enableOverrideColor(false);

+
Parameters:
+ + +
color,:New color of the text.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setOverrideFont (IGUIFontfont = 0) [pure virtual]
+
+
+ +

Sets another skin independent font.

+

If this is set to zero, the button uses the font of the skin.

+
Parameters:
+ + +
font,:New font to set.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIEditBox::setPasswordBox (bool passwordBox,
wchar_t passwordChar = L'*' 
) [pure virtual]
+
+
+ +

Sets whether the edit box is a password box. Setting this to true will.

+

disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x

+
Parameters:
+ + + +
passwordBox,:true to enable password, false to disable
passwordChar,:the character that is displayed instead of letters
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIEditBox::setTextAlignment (EGUI_ALIGNMENT horizontal,
EGUI_ALIGNMENT vertical 
) [pure virtual]
+
+
+ +

Sets text justification mode.

+
Parameters:
+ + + +
horizontal,:EGUIA_UPPERLEFT for left justified (default), EGUIA_LOWERRIGHT for right justified, or EGUIA_CENTER for centered text.
vertical,:EGUIA_UPPERLEFT to align with top edge, EGUIA_LOWERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default).
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEditBox::setWordWrap (bool enable) [pure virtual]
+
+
+ +

Enables or disables word wrap.

+
Parameters:
+ + +
enable,:If set to true, words going over one line are broken to the next line.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.png new file mode 100644 index 0000000..0296be0 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_edit_box.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element-members.html new file mode 100644 index 0000000..ea4f50b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element-members.html @@ -0,0 +1,214 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIElement Member List
+
+
+This is the complete list of members for irr::gui::IGUIElement, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.html new file mode 100644 index 0000000..a2fd8db --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.html @@ -0,0 +1,2371 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIElement Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIElement Class Reference
+
+
+ +

Base class of all GUI elements. + More...

+ +

#include <IGUIElement.h>

+
+ + Inheritance diagram for irr::gui::IGUIElement:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+ +

+Protected Attributes

+ +

Detailed Description

+

Base class of all GUI elements.

+ +

Definition at line 25 of file IGUIElement.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIElement::IGUIElement (EGUI_ELEMENT_TYPE type,
IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
const core::rect< s32 > & rectangle 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 30 of file IGUIElement.h.

+ +

References addChildToEnd(), recalculateAbsolutePosition(), and irr::IReferenceCounted::setDebugName().

+ +
+
+ +
+
+ + + + + + + +
virtual irr::gui::IGUIElement::~IGUIElement () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 53 of file IGUIElement.h.

+ +

References irr::core::list< T >::begin(), Children, and irr::core::list< T >::end().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::addChild (IGUIElementchild) [inline, virtual]
+
+
+ +

Adds a GUI element as new child of this element.

+ +

Definition at line 279 of file IGUIElement.h.

+ +

References addChildToEnd(), and updateAbsolutePosition().

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::addChildToEnd (IGUIElementchild) [inline, protected]
+
+ +
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIElement::bringToFront (IGUIElementelement) [inline, virtual]
+
+
+ +

Brings a child to front.

+
Returns:
True if successful, false if not.
+ +

Definition at line 530 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), irr::core::list< T >::erase(), and irr::core::list< T >::push_back().

+ +
+
+ + + +
+
+ + + + + + + +
virtual void irr::gui::IGUIElement::draw () [inline, virtual]
+
+
+ +

Draws the element and its children.

+ +

Definition at line 312 of file IGUIElement.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and isVisible().

+ +
+
+ +
+
+ + + + + + + +
core::rect<s32> irr::gui::IGUIElement::getAbsoluteClippingRect () const [inline]
+
+
+ +

Returns the visible area of the element.

+ +

Definition at line 146 of file IGUIElement.h.

+ +

References AbsoluteClippingRect.

+ +
+
+ +
+
+ + + + + + + +
core::rect<s32> irr::gui::IGUIElement::getAbsolutePosition () const [inline]
+
+
+ +

Gets the absolute rectangle of this element.

+ +

Definition at line 139 of file IGUIElement.h.

+ +

References AbsoluteRect.

+ +

Referenced by addChildToEnd(), setAlignment(), setRelativePosition(), and setRelativePositionProportional().

+ +
+
+ +
+
+ + + + + + + +
virtual const core::list<IGUIElement*>& irr::gui::IGUIElement::getChildren () const [inline, virtual]
+
+
+ +

Returns list with children of this element.

+ +

Definition at line 570 of file IGUIElement.h.

+ +

References Children.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIElement* irr::gui::IGUIElement::getElementFromId (s32 id,
bool searchchildren = false 
) const [inline, virtual]
+
+
+ +

Finds the first element with the given id.

+
Parameters:
+ + + +
id,:Id to search for.
searchchildren,:Set this to true, if also children of this element may contain the element with the searched id and they should be searched too.
+
+
+
Returns:
Returns the first element with the given id. If no element with this id was found, 0 is returned.
+ +

Definition at line 583 of file IGUIElement.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and getElementFromId().

+ +

Referenced by getElementFromId().

+ +
+
+ +
+
+ + + + + + + + +
IGUIElement* irr::gui::IGUIElement::getElementFromPoint (const core::position2d< s32 > & point) [inline]
+
+
+ +

Returns the topmost GUI element at the specific position.

+

This will check this GUI element and all of its descendants, so it may return this GUI element. To check all GUI elements, call this function on device->getGUIEnvironment()->getRootGUIElement(). Note that the root element is the size of the screen, so doing so (with an on-screen point) will always return the root element if no other element is above it at that point.

+
Parameters:
+ + +
point,:The point at which to find a GUI element.
+
+
+
Returns:
The topmost GUI element at that point, or 0 if there are no candidate elements at this point.
+ +

Definition at line 242 of file IGUIElement.h.

+ +

References Children, irr::core::list< T >::end(), getElementFromPoint(), irr::core::list< T >::getLast(), isPointInside(), and isVisible().

+ +

Referenced by getElementFromPoint().

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIElement::getID () const [inline, virtual]
+
+
+ +

Returns id. Can be used to identify the element.

+ +

Definition at line 508 of file IGUIElement.h.

+ +

References ID.

+ +
+
+ +
+
+ + + + + + + +
virtual const c8* irr::gui::IGUIElement::getName () const [inline, virtual]
+
+
+ +

Returns the name of the element.

+
Returns:
Name as character string.
+ +

Definition at line 740 of file IGUIElement.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and Name.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::gui::IGUIElement::getNextElement (s32 startOrder,
bool reverse,
bool group,
IGUIElement *& first,
IGUIElement *& closest,
bool includeInvisible = false 
) const [inline]
+
+
+ +

searches elements to find the closest next element to tab to

+
Parameters:
+ + + + + + + +
startOrder,:The TabOrder of the current element, -1 if none
reverse,:true if searching for a lower number
group,:true if searching for a higher one
first,:element with the highest/lowest known tab order depending on search direction
closest,:the closest match, depending on tab order and direction
includeInvisible,:includes invisible elements in the search (default=false)
+
+
+
Returns:
true if successfully found an element, false to continue searching/fail
+ +

Definition at line 630 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and getTabOrder().

+ +

Referenced by setTabOrder().

+ +
+
+ +
+
+ + + + + + + +
IGUIElement* irr::gui::IGUIElement::getParent () const [inline]
+
+
+ +

Returns parent of this element.

+ +

Definition at line 66 of file IGUIElement.h.

+ +

References Parent.

+ +

Referenced by getTabGroup(), and isEnabled().

+ +
+
+ +
+
+ + + + + + + +
core::rect<s32> irr::gui::IGUIElement::getRelativePosition () const [inline]
+
+
+ +

Returns the relative rectangle of this element.

+ +

Definition at line 73 of file IGUIElement.h.

+ +

References RelativeRect.

+ +
+
+ +
+
+ + + + + + + +
IGUIElement* irr::gui::IGUIElement::getTabGroup () [inline]
+
+
+ +

Returns the container element which holds all elements in this element's tab group.

+ +

Definition at line 446 of file IGUIElement.h.

+ +

References getParent(), and isTabGroup().

+ +

Referenced by setTabOrder().

+ +
+
+ +
+
+ + + + + + + +
s32 irr::gui::IGUIElement::getTabOrder () const [inline]
+
+
+ +

Returns the number in the tab order sequence.

+ +

Definition at line 422 of file IGUIElement.h.

+ +

References TabOrder.

+ +

Referenced by getNextElement(), and setTabOrder().

+ +
+
+ +
+
+ + + + + + + +
virtual const wchar_t* irr::gui::IGUIElement::getText () const [inline, virtual]
+
+
+ +

Returns caption of this element.

+ +

Definition at line 487 of file IGUIElement.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and Text.

+ +

Referenced by serializeAttributes().

+ +
+
+ +
+
+ + + + + + + +
virtual const core::stringw& irr::gui::IGUIElement::getToolTipText () const [inline, virtual]
+
+
+ +

Returns caption of this element.

+ +

Definition at line 501 of file IGUIElement.h.

+ +

References ToolTipText.

+ +
+
+ +
+
+ + + + + + + +
EGUI_ELEMENT_TYPE irr::gui::IGUIElement::getType () const [inline]
+
+
+ +

Returns the type of the gui element.

+

This is needed for the .NET wrapper but will be used later for serializing and deserializing. If you wrote your own GUIElements, you need to set the type for your element as first parameter in the constructor of IGUIElement. For own (=unknown) elements, simply use EGUIET_ELEMENT as type

+ +

Definition at line 710 of file IGUIElement.h.

+ +

References Type.

+ +
+
+ +
+
+ + + + + + + +
virtual const c8* irr::gui::IGUIElement::getTypeName () const [inline, virtual]
+
+
+ +

Returns the type name of the gui element.

+

This is needed serializing elements. For serializing your own elements, override this function and return your own type name which is created by your IGUIElementFactory

+ +

Definition at line 733 of file IGUIElement.h.

+ +

References irr::gui::GUIElementTypeNames, and Type.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIElement::hasType (EGUI_ELEMENT_TYPE type) const [inline, virtual]
+
+
+ +

Returns true if the gui element supports the given type.

+

This is mostly used to check if you can cast a gui element to the class that goes with the type. Most gui elements will only support their own type, but if you derive your own classes from interfaces you can overload this function and add a check for the type of the base-class additionally. This allows for checks comparable to the dynamic_cast of c++ with enabled rtti. Note that you can't do that by calling BaseClass::hasType(type), but you have to do an explicit comparison check, because otherwise the base class usually just checks for the membervariable Type which contains the type of your derived class.

+ +

Definition at line 724 of file IGUIElement.h.

+ +

References Type.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIElement::isEnabled () const [inline, virtual]
+
+
+ +

Returns true if element is enabled.

+

Currently elements do _not_ care about parent-states. So if you want to affect childs you have to enable/disable them all. The only exception to this are sub-elements which also check their parent.

+ +

Definition at line 462 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, getParent(), isEnabled(), IsEnabled, and isSubElement().

+ +

Referenced by isEnabled().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::gui::IGUIElement::isMyChild (IGUIElementchild) const [inline]
+
+
+

returns true if the given element is a child of this one.

+
Parameters:
+ + +
child,:The child element to check
+
+
+ +

Definition at line 606 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and Parent.

+ +
+
+ +
+
+ + + + + + + +
bool irr::gui::IGUIElement::isNotClipped () const [inline]
+
+
+ +

Gets whether the element will ignore its parent's clipping rectangle.

+
Returns:
true if the element is not clipped by its parent's clipping rectangle.
+ +

Definition at line 163 of file IGUIElement.h.

+ +

References NoClip.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIElement::isPointInside (const core::position2d< s32 > & point) const [inline, virtual]
+
+
+ +

Returns true if a point is within this element.

+

Elements with a shape other than a rectangle should override this method

+ +

Definition at line 272 of file IGUIElement.h.

+ +

References AbsoluteClippingRect, and irr::core::rect< T >::isPointInside().

+ +

Referenced by getElementFromPoint().

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIElement::isSubElement () const [inline, virtual]
+
+
+ +

Returns true if this element was created as part of its parent control.

+ +

Definition at line 358 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsSubElement.

+ +

Referenced by isEnabled().

+ +
+
+ +
+
+ + + + + + + +
bool irr::gui::IGUIElement::isTabGroup () const [inline]
+
+
+ +

Returns true if this element is a tab group.

+ +

Definition at line 438 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsTabGroup.

+ +

Referenced by getTabGroup().

+ +
+
+ +
+
+ + + + + + + +
bool irr::gui::IGUIElement::isTabStop () const [inline]
+
+
+ +

Returns true if this element can be focused by navigating with the tab key.

+ +

Definition at line 384 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsTabStop.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIElement::isVisible () const [inline, virtual]
+
+
+ +

Returns true if element is visible.

+ +

Definition at line 343 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsVisible.

+ +

Referenced by draw(), getElementFromPoint(), and OnPostRender().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::move (core::position2d< s32absoluteMovement) [inline, virtual]
+
+
+ +

Moves this element.

+ +

Definition at line 336 of file IGUIElement.h.

+ +

References DesiredRect, and setRelativePosition().

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIElement::OnEvent (const SEventevent) [inline, virtual]
+
+
+ +

Called if an event happened.

+ +

Implements irr::IEventReceiver.

+ +

Definition at line 522 of file IGUIElement.h.

+ +

References OnEvent(), and Parent.

+ +

Referenced by OnEvent().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::OnPostRender (u32 timeMs) [inline, virtual]
+
+
+ +

animate the element and its children.

+ +

Definition at line 324 of file IGUIElement.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and isVisible().

+ +
+
+ + + +
+
+ + + + + + + +
virtual void irr::gui::IGUIElement::remove () [inline, virtual]
+
+
+ +

Removes this element from its parent.

+ +

Definition at line 304 of file IGUIElement.h.

+ +

References Parent, and removeChild().

+ +

Referenced by addChildToEnd().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::removeChild (IGUIElementchild) [inline, virtual]
+
+
+ +

Removes a child.

+ +

Definition at line 289 of file IGUIElement.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and irr::core::list< T >::erase().

+ +

Referenced by remove().

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIElement::sendToBack (IGUIElementchild) [inline, virtual]
+
+
+ +

Moves a child to the back, so it's siblings are drawn on top of it.

+
Returns:
True if successful, false if not.
+ +

Definition at line 550 of file IGUIElement.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), irr::core::list< T >::erase(), and irr::core::list< T >::push_front().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIElement::serializeAttributes (io::IAttributesout,
io::SAttributeReadWriteOptionsoptions = 0 
) const [inline, virtual]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::gui::IGUIElement::setAlignment (EGUI_ALIGNMENT left,
EGUI_ALIGNMENT right,
EGUI_ALIGNMENT top,
EGUI_ALIGNMENT bottom 
) [inline]
+
+
+ +

The alignment defines how the borders of this element will be positioned when the parent element is resized.

+ +

Definition at line 191 of file IGUIElement.h.

+ +

References AlignBottom, AlignLeft, AlignRight, AlignTop, DesiredRect, irr::gui::EGUIA_SCALE, getAbsolutePosition(), irr::core::rect< T >::LowerRightCorner, Parent, ScaleRect, and irr::core::rect< T >::UpperLeftCorner.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setEnabled (bool enabled) [inline, virtual]
+
+
+ +

Sets the enabled state of this element.

+ +

Definition at line 473 of file IGUIElement.h.

+ +

References IsEnabled.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setID (s32 id) [inline, virtual]
+
+
+ +

Sets the id of this element.

+ +

Definition at line 515 of file IGUIElement.h.

+ +

References ID.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setMaxSize (core::dimension2du size) [inline]
+
+
+ +

Sets the maximum size allowed for this element.

+

If set to 0,0, there is no maximum size

+ +

Definition at line 171 of file IGUIElement.h.

+ +

References MaxSize, and updateAbsolutePosition().

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setMinSize (core::dimension2du size) [inline]
+
+
+ +

Sets the minimum size allowed for this element.

+ +

Definition at line 179 of file IGUIElement.h.

+ +

References irr::core::dimension2d< T >::Height, MinSize, updateAbsolutePosition(), and irr::core::dimension2d< T >::Width.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setName (const c8name) [inline, virtual]
+
+
+ +

Sets the name of the element.

+
Parameters:
+ + +
nameNew name of the gui element.
+
+
+ +

Definition at line 748 of file IGUIElement.h.

+ +

References Name.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setName (const core::stringcname) [inline, virtual]
+
+
+ +

Sets the name of the element.

+
Parameters:
+ + +
nameNew name of the gui element.
+
+
+ +

Definition at line 756 of file IGUIElement.h.

+ +

References Name.

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setNotClipped (bool noClip) [inline]
+
+
+ +

Sets whether the element will ignore its parent's clipping rectangle.

+
Parameters:
+ + +
noClipIf true, the element will not be clipped by its parent's clipping rectangle.
+
+
+ +

Definition at line 154 of file IGUIElement.h.

+ +

References NoClip, and updateAbsolutePosition().

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setRelativePosition (const core::rect< s32 > & r) [inline]
+
+ +
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setRelativePosition (const core::position2diposition) [inline]
+
+
+ +

Sets the relative rectangle of this element, maintaining its current width and height.

+
Parameters:
+ + +
positionThe new relative position to set. Width and height will not be changed.
+
+
+ +

Definition at line 105 of file IGUIElement.h.

+ +

References irr::core::rect< T >::getSize(), irr::core::dimension2d< T >::Height, RelativeRect, setRelativePosition(), irr::core::dimension2d< T >::Width, irr::core::vector2d< T >::X, and irr::core::vector2d< T >::Y.

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setRelativePositionProportional (const core::rect< f32 > & r) [inline]
+
+
+ +

Sets the relative rectangle of this element as a proportion of its parent's area.

+
Note:
This method used to be 'void setRelativePosition(const core::rect<f32>& r)'
+
Parameters:
+ + +
rThe rectangle to set, interpreted as a proportion of the parent's area. Meaningful values are in the range [0...1], unless you intend this element to spill outside its parent.
+
+
+ +

Definition at line 119 of file IGUIElement.h.

+ +

References DesiredRect, irr::core::floor32(), getAbsolutePosition(), irr::core::rect< T >::getSize(), irr::core::dimension2d< T >::Height, irr::core::rect< T >::LowerRightCorner, Parent, ScaleRect, updateAbsolutePosition(), irr::core::rect< T >::UpperLeftCorner, and irr::core::dimension2d< T >::Width.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setSubElement (bool subElement) [inline, virtual]
+
+
+ +

Sets whether this control was created as part of its parent.

+

For example, it is true when a scrollbar is part of a listbox. SubElements are not saved to disk when calling guiEnvironment->saveGUI()

+ +

Definition at line 368 of file IGUIElement.h.

+ +

References IsSubElement.

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setTabGroup (bool isGroup) [inline]
+
+
+ +

Sets whether this element is a container for a group of elements which can be navigated using the tab key.

+

For example, windows are tab groups. Groups can be navigated using ctrl+tab, providing isTabStop is true.

+ +

Definition at line 431 of file IGUIElement.h.

+ +

References IsTabGroup.

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setTabOrder (s32 index) [inline]
+
+
+ +

Sets the priority of focus when using the tab key to navigate between a group of elements.

+

See setTabGroup, isTabGroup and getTabGroup for information on tab groups. Elements with a lower number are focused first

+ +

Definition at line 394 of file IGUIElement.h.

+ +

References getNextElement(), getTabGroup(), getTabOrder(), IsTabGroup, Parent, and TabOrder.

+ +
+
+ +
+
+ + + + + + + + +
void irr::gui::IGUIElement::setTabStop (bool enable) [inline]
+
+
+ +

If set to true, the focus will visit this element when using the tab key to cycle through elements.

+

If this element is a tab group (see isTabGroup/setTabGroup) then ctrl+tab will be used instead.

+ +

Definition at line 377 of file IGUIElement.h.

+ +

References IsTabStop.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setText (const wchar_t * text) [inline, virtual]
+
+
+ +

Sets the new caption of this element.

+ +

Definition at line 480 of file IGUIElement.h.

+ +

References Text.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setToolTipText (const wchar_t * text) [inline, virtual]
+
+
+ +

Sets the new caption of this element.

+ +

Definition at line 494 of file IGUIElement.h.

+ +

References ToolTipText.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIElement::setVisible (bool visible) [inline, virtual]
+
+
+ +

Sets the visible state of this element.

+ +

Definition at line 351 of file IGUIElement.h.

+ +

References IsVisible.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIElement::updateAbsolutePosition () [inline, virtual]
+
+ +
+

Member Data Documentation

+ +
+ +
+ +

absolute clipping rect of element

+ +

Definition at line 974 of file IGUIElement.h.

+ +

Referenced by getAbsoluteClippingRect(), isPointInside(), and recalculateAbsolutePosition().

+ +
+
+ +
+ +
+ +

absolute rect of element

+ +

Definition at line 971 of file IGUIElement.h.

+ +

Referenced by getAbsolutePosition(), and recalculateAbsolutePosition().

+ +
+
+ + + +
+ +
+ +

tells the element how to act when its parent is resized

+ +

Definition at line 1023 of file IGUIElement.h.

+ +

Referenced by recalculateAbsolutePosition(), serializeAttributes(), setAlignment(), and setRelativePosition().

+ +
+
+ + + +
+ + +
+ + + +
+ +
+

the rectangle the element would prefer to be, if it was not constrained by parent or max/min size

+ +

Definition at line 978 of file IGUIElement.h.

+ +

Referenced by move(), recalculateAbsolutePosition(), serializeAttributes(), setAlignment(), setRelativePosition(), and setRelativePositionProportional().

+ +
+
+ +
+ +
+ +

GUI Environment.

+ +

Definition at line 1026 of file IGUIElement.h.

+ +
+
+ +
+
+ + + + +
s32 irr::gui::IGUIElement::ID [protected]
+
+
+ +

users can set this for identificating the element by integer

+ +

Definition at line 1011 of file IGUIElement.h.

+ +

Referenced by getID(), serializeAttributes(), and setID().

+ +
+
+ +
+
+ + + + +
bool irr::gui::IGUIElement::IsEnabled [protected]
+
+
+ +

is enabled?

+ +

Definition at line 993 of file IGUIElement.h.

+ +

Referenced by isEnabled(), serializeAttributes(), and setEnabled().

+ +
+
+ +
+
+ + + + +
bool irr::gui::IGUIElement::IsSubElement [protected]
+
+
+ +

is a part of a larger whole and should not be serialized?

+ +

Definition at line 996 of file IGUIElement.h.

+ +

Referenced by isSubElement(), and setSubElement().

+ +
+
+ +
+
+ + + + +
bool irr::gui::IGUIElement::IsTabGroup [protected]
+
+
+ +

tab groups are containers like windows, use ctrl+tab to navigate

+ +

Definition at line 1020 of file IGUIElement.h.

+ +

Referenced by deserializeAttributes(), isTabGroup(), serializeAttributes(), setTabGroup(), and setTabOrder().

+ +
+
+ +
+
+ + + + +
bool irr::gui::IGUIElement::IsTabStop [protected]
+
+
+ +

tab stop like in windows

+ +

Definition at line 1014 of file IGUIElement.h.

+ +

Referenced by deserializeAttributes(), isTabStop(), serializeAttributes(), and setTabStop().

+ +
+
+ +
+
+ + + + +
bool irr::gui::IGUIElement::IsVisible [protected]
+
+
+ +

is visible?

+ +

Definition at line 990 of file IGUIElement.h.

+ +

Referenced by isVisible(), serializeAttributes(), and setVisible().

+ +
+
+ +
+ +
+ +

for calculating the difference when resizing parent

+ +

Definition at line 981 of file IGUIElement.h.

+ +

Referenced by addChildToEnd(), and recalculateAbsolutePosition().

+ +
+
+ +
+ +
+ +

maximum and minimum size of the element

+ +

Definition at line 987 of file IGUIElement.h.

+ +

Referenced by recalculateAbsolutePosition(), serializeAttributes(), and setMaxSize().

+ +
+
+ +
+ +
+ +

Definition at line 987 of file IGUIElement.h.

+ +

Referenced by recalculateAbsolutePosition(), serializeAttributes(), and setMinSize().

+ +
+
+ +
+ +
+ +

users can set this for identificating the element by string

+ +

Definition at line 1008 of file IGUIElement.h.

+ +

Referenced by getName(), serializeAttributes(), and setName().

+ +
+
+ +
+
+ + + + +
bool irr::gui::IGUIElement::NoClip [protected]
+
+
+ +

does this element ignore its parent's clipping rectangle?

+ +

Definition at line 999 of file IGUIElement.h.

+ +

Referenced by isNotClipped(), recalculateAbsolutePosition(), serializeAttributes(), and setNotClipped().

+ +
+
+ + + +
+ +
+ +

relative rect of element

+ +

Definition at line 968 of file IGUIElement.h.

+ +

Referenced by getRelativePosition(), recalculateAbsolutePosition(), and setRelativePosition().

+ +
+
+ +
+ +
+ +

relative scale of the element inside its parent

+ +

Definition at line 984 of file IGUIElement.h.

+ +

Referenced by recalculateAbsolutePosition(), setAlignment(), setRelativePosition(), and setRelativePositionProportional().

+ +
+
+ +
+
+ + + + +
s32 irr::gui::IGUIElement::TabOrder [protected]
+
+
+ +

tab order

+ +

Definition at line 1017 of file IGUIElement.h.

+ +

Referenced by deserializeAttributes(), getTabOrder(), serializeAttributes(), and setTabOrder().

+ +
+
+ +
+ +
+ +

caption

+ +

Definition at line 1002 of file IGUIElement.h.

+ +

Referenced by getText(), and setText().

+ +
+
+ +
+ +
+ +

tooltip

+ +

Definition at line 1005 of file IGUIElement.h.

+ +

Referenced by getToolTipText(), and setToolTipText().

+ +
+
+ +
+ +
+ +

type of element

+ +

Definition at line 1029 of file IGUIElement.h.

+ +

Referenced by getType(), getTypeName(), and hasType().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.png new file mode 100644 index 0000000..a8ab2ff Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory-members.html new file mode 100644 index 0000000..4c2a899 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIElementFactory Member List
+
+
+This is the complete list of members for irr::gui::IGUIElementFactory, including all inherited members. + + + + + + + + + + + + + +
addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement *parent=0)=0irr::gui::IGUIElementFactory [pure virtual]
addGUIElement(const c8 *typeName, IGUIElement *parent=0)=0irr::gui::IGUIElementFactory [pure virtual]
drop() const irr::IReferenceCounted [inline]
getCreatableGUIElementTypeCount() const =0irr::gui::IGUIElementFactory [pure virtual]
getCreateableGUIElementType(s32 idx) const =0irr::gui::IGUIElementFactory [pure virtual]
getCreateableGUIElementTypeName(s32 idx) const =0irr::gui::IGUIElementFactory [pure virtual]
getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const =0irr::gui::IGUIElementFactory [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.html new file mode 100644 index 0000000..1975f4e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.html @@ -0,0 +1,329 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIElementFactory Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIElementFactory Class Reference
+
+
+ +

Interface making it possible to dynamically create GUI elements. + More...

+ +

#include <IGUIElementFactory.h>

+
+ + Inheritance diagram for irr::gui::IGUIElementFactory:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface making it possible to dynamically create GUI elements.

+

To be able to add custom elements to Irrlicht and to make it possible for the scene manager to save and load them, simply implement this interface and register it in your gui environment via IGUIEnvironment::registerGUIElementFactory. Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to increase the reference counter of the environment. This is not necessary because the it will grab() the factory anyway, and otherwise cyclic references will be created.

+ +

Definition at line 26 of file IGUIElementFactory.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIElement* irr::gui::IGUIElementFactory::addGUIElement (EGUI_ELEMENT_TYPE type,
IGUIElementparent = 0 
) [pure virtual]
+
+
+ +

adds an element to the gui environment based on its type id

+
Parameters:
+ + + +
type,:Type of the element to add.
parent,:Parent scene node of the new element, can be null to add to the root.
+
+
+
Returns:
Pointer to the new element or null if not successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIElement* irr::gui::IGUIElementFactory::addGUIElement (const c8typeName,
IGUIElementparent = 0 
) [pure virtual]
+
+
+ +

adds a GUI element to the GUI Environment based on its type name

+
Parameters:
+ + + +
typeName,:Type name of the element to add.
parent,:Parent scene node of the new element, can be null to add it to the root.
+
+
+
Returns:
Pointer to the new element or null if not successful.
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIElementFactory::getCreatableGUIElementTypeCount () const [pure virtual]
+
+
+ +

Get amount of GUI element types this factory is able to create.

+ +
+
+ +
+
+ + + + + + + + +
virtual EGUI_ELEMENT_TYPE irr::gui::IGUIElementFactory::getCreateableGUIElementType (s32 idx) const [pure virtual]
+
+
+ +

Get type of a createable element type.

+
Parameters:
+ + +
idx,:Index of the element type in this factory. Must be a value between 0 and getCreatableGUIElementTypeCount()
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::gui::IGUIElementFactory::getCreateableGUIElementTypeName (s32 idx) const [pure virtual]
+
+
+ +

Get type name of a createable GUI element type by index.

+
Parameters:
+ + +
idx,:Index of the type in this factory. Must be a value between 0 and getCreatableGUIElementTypeCount()
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::gui::IGUIElementFactory::getCreateableGUIElementTypeName (EGUI_ELEMENT_TYPE type) const [pure virtual]
+
+
+ +

returns type name of a createable GUI element

+
Parameters:
+ + +
type,:Type of GUI element.
+
+
+
Returns:
Name of the type if this factory can create the type, otherwise 0.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.png new file mode 100644 index 0000000..b88f25a Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_element_factory.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment-members.html new file mode 100644 index 0000000..2a1d6f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment-members.html @@ -0,0 +1,187 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIEnvironment Member List
+
+
+This is the complete list of members for irr::gui::IGUIEnvironment, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addButton(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, const wchar_t *text=0, const wchar_t *tooltiptext=0)=0irr::gui::IGUIEnvironment [pure virtual]
addCheckBox(bool checked, const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, const wchar_t *text=0)=0irr::gui::IGUIEnvironment [pure virtual]
addColorSelectDialog(const wchar_t *title=0, bool modal=true, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addComboBox(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addContextMenu(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addEditBox(const wchar_t *text, const core::rect< s32 > &rectangle, bool border=true, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addEmptySpriteBank(const io::path &name)=0irr::gui::IGUIEnvironment [pure virtual]
addFileOpenDialog(const wchar_t *title=0, bool modal=true, IGUIElement *parent=0, s32 id=-1, bool restoreCWD=false, io::path::char_type *startDir=0)=0irr::gui::IGUIEnvironment [pure virtual]
addFont(const io::path &name, IGUIFont *font)=0irr::gui::IGUIEnvironment [pure virtual]
addGUIElement(const c8 *elementName, IGUIElement *parent=0)=0irr::gui::IGUIEnvironment [pure virtual]
addImage(video::ITexture *image, core::position2d< s32 > pos, bool useAlphaChannel=true, IGUIElement *parent=0, s32 id=-1, const wchar_t *text=0)=0irr::gui::IGUIEnvironment [pure virtual]
addImage(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, const wchar_t *text=0, bool useAlphaChannel=true)=0irr::gui::IGUIEnvironment [pure virtual]
addInOutFader(const core::rect< s32 > *rectangle=0, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addListBox(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, bool drawBackground=false)=0irr::gui::IGUIEnvironment [pure virtual]
addMenu(IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addMeshViewer(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, const wchar_t *text=0)=0irr::gui::IGUIEnvironment [pure virtual]
addMessageBox(const wchar_t *caption, const wchar_t *text=0, bool modal=true, s32 flags=EMBF_OK, IGUIElement *parent=0, s32 id=-1, video::ITexture *image=0)=0irr::gui::IGUIEnvironment [pure virtual]
addModalScreen(IGUIElement *parent)=0irr::gui::IGUIEnvironment [pure virtual]
addScrollBar(bool horizontal, const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addSpinBox(const wchar_t *text, const core::rect< s32 > &rectangle, bool border=true, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addStaticText(const wchar_t *text, const core::rect< s32 > &rectangle, bool border=false, bool wordWrap=true, IGUIElement *parent=0, s32 id=-1, bool fillBackground=false)=0irr::gui::IGUIEnvironment [pure virtual]
addTab(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addTabControl(const core::rect< s32 > &rectangle, IGUIElement *parent=0, bool fillbackground=false, bool border=true, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addTable(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, bool drawBackground=false)=0irr::gui::IGUIEnvironment [pure virtual]
addToolBar(IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
addTreeView(const core::rect< s32 > &rectangle, IGUIElement *parent=0, s32 id=-1, bool drawBackground=false, bool scrollBarVertical=true, bool scrollBarHorizontal=false)=0irr::gui::IGUIEnvironment [pure virtual]
addWindow(const core::rect< s32 > &rectangle, bool modal=false, const wchar_t *text=0, IGUIElement *parent=0, s32 id=-1)=0irr::gui::IGUIEnvironment [pure virtual]
clear()=0irr::gui::IGUIEnvironment [pure virtual]
createImageList(video::ITexture *texture, core::dimension2d< s32 > imageSize, bool useAlphaChannel)=0irr::gui::IGUIEnvironment [pure virtual]
createSkin(EGUI_SKIN_TYPE type)=0irr::gui::IGUIEnvironment [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)=0irr::gui::IGUIEnvironment [pure virtual]
drawAll()=0irr::gui::IGUIEnvironment [pure virtual]
drop() const irr::IReferenceCounted [inline]
getBuiltInFont() const =0irr::gui::IGUIEnvironment [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDefaultGUIElementFactory() const =0irr::gui::IGUIEnvironment [pure virtual]
getFileSystem() const =0irr::gui::IGUIEnvironment [pure virtual]
getFocus() const =0irr::gui::IGUIEnvironment [pure virtual]
getFont(const io::path &filename)=0irr::gui::IGUIEnvironment [pure virtual]
getGUIElementFactory(u32 index) const =0irr::gui::IGUIEnvironment [pure virtual]
getHovered() const =0irr::gui::IGUIEnvironment [pure virtual]
getOSOperator() const =0irr::gui::IGUIEnvironment [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRegisteredGUIElementFactoryCount() const =0irr::gui::IGUIEnvironment [pure virtual]
getRootGUIElement()=0irr::gui::IGUIEnvironment [pure virtual]
getSkin() const =0irr::gui::IGUIEnvironment [pure virtual]
getSpriteBank(const io::path &filename)=0irr::gui::IGUIEnvironment [pure virtual]
getVideoDriver() const =0irr::gui::IGUIEnvironment [pure virtual]
grab() const irr::IReferenceCounted [inline]
hasFocus(IGUIElement *element) const =0irr::gui::IGUIEnvironment [pure virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
loadGUI(const io::path &filename, IGUIElement *parent=0)=0irr::gui::IGUIEnvironment [pure virtual]
loadGUI(io::IReadFile *file, IGUIElement *parent=0)=0irr::gui::IGUIEnvironment [pure virtual]
postEventFromUser(const SEvent &event)=0irr::gui::IGUIEnvironment [pure virtual]
readGUIElement(io::IXMLReader *reader, IGUIElement *node)=0irr::gui::IGUIEnvironment [pure virtual]
registerGUIElementFactory(IGUIElementFactory *factoryToAdd)=0irr::gui::IGUIEnvironment [pure virtual]
removeFocus(IGUIElement *element)=0irr::gui::IGUIEnvironment [pure virtual]
removeFont(IGUIFont *font)=0irr::gui::IGUIEnvironment [pure virtual]
saveGUI(const io::path &filename, IGUIElement *start=0)=0irr::gui::IGUIEnvironment [pure virtual]
saveGUI(io::IWriteFile *file, IGUIElement *start=0)=0irr::gui::IGUIEnvironment [pure virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const =0irr::gui::IGUIEnvironment [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setFocus(IGUIElement *element)=0irr::gui::IGUIEnvironment [pure virtual]
setSkin(IGUISkin *skin)=0irr::gui::IGUIEnvironment [pure virtual]
setUserEventReceiver(IEventReceiver *evr)=0irr::gui::IGUIEnvironment [pure virtual]
writeGUIElement(io::IXMLWriter *writer, IGUIElement *node)=0irr::gui::IGUIEnvironment [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.html new file mode 100644 index 0000000..7ba5cc9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.html @@ -0,0 +1,2458 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIEnvironment Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIEnvironment Class Reference
+
+
+ +

GUI Environment. Used as factory and manager of all other GUI elements. + More...

+ +

#include <IGUIEnvironment.h>

+
+ + Inheritance diagram for irr::gui::IGUIEnvironment:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

GUI Environment. Used as factory and manager of all other GUI elements.

+
This element can create the following events of type EGUI_EVENT_TYPE (which are passed on to focused sub-elements):
    +
  • EGET_ELEMENT_FOCUS_LOST
  • +
  • EGET_ELEMENT_FOCUSED
  • +
  • EGET_ELEMENT_LEFT
  • +
  • EGET_ELEMENT_HOVERED
  • +
+
+ +

Definition at line 70 of file IGUIEnvironment.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIButton* irr::gui::IGUIEnvironment::addButton (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
const wchar_t * text = 0,
const wchar_t * tooltiptext = 0 
) [pure virtual]
+
+
+ +

Adds a button element.

+
Parameters:
+ + + + + + +
rectangleRectangle specifying the borders of the button.
parentParent gui element of the button.
idId with which the gui element can be identified.
textText displayed on the button.
tooltiptextText displayed in the tooltip.
+
+
+
Returns:
Pointer to the created button. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUICheckBox* irr::gui::IGUIEnvironment::addCheckBox (bool checked,
const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
const wchar_t * text = 0 
) [pure virtual]
+
+
+ +

Adds a checkbox element.

+
Parameters:
+ + + + + + +
checkedDefine the initial state of the check box.
rectangleRectangle specifying the borders of the check box.
parentParent gui element of the check box.
idId to identify the gui element.
textTitle text of the check box.
+
+
+
Returns:
Pointer to the created check box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIColorSelectDialog* irr::gui::IGUIEnvironment::addColorSelectDialog (const wchar_t * title = 0,
bool modal = true,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a color select dialog.

+
Parameters:
+ + + + + +
titleThe title of the dialog.
modalDefines if the dialog is modal. This means, that all other gui elements which were created before the dialog cannot be used until it is removed.
parentThe parent of the dialog.
idThe ID of the dialog.
+
+
+
Returns:
Pointer to the created file open dialog. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIComboBox* irr::gui::IGUIEnvironment::addComboBox (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a combo box to the environment.

+
Parameters:
+ + + + +
rectangleRectangle specifying the borders of the combo box.
parentParent item of the element, e.g. a window. Set it to 0 to place the combo box directly in the environment.
idAn identifier for the combo box.
+
+
+
Returns:
Pointer to the created combo box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIContextMenu* irr::gui::IGUIEnvironment::addContextMenu (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a context menu to the environment.

+
Parameters:
+ + + + +
rectangleRectangle specifying the borders of the menu. Note that the menu is resizing itself based on what items you add.
parentParent item of the element, e.g. a window. Set it to 0 to place the menu directly in the environment.
idAn identifier for the menu.
+
+
+
Returns:
Pointer to the created context menu. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIEditBox* irr::gui::IGUIEnvironment::addEditBox (const wchar_t * text,
const core::rect< s32 > & rectangle,
bool border = true,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds an edit box.

+

Supports unicode input from every keyboard around the world, scrolling, copying and pasting (exchanging data with the clipboard directly), maximum character amount, marking, and all shortcuts like ctrl+X, ctrl+V, ctrl+C, shift+Left, shift+Right, Home, End, and so on.

+
Parameters:
+ + + + + + +
textText to be displayed. Can be altered after creation by setText().
rectangleRectangle specifying the borders of the edit box.
borderSet to true if the edit box should have a 3d border.
parentParent item of the element, e.g. a window. Set it to 0 to place the edit box directly in the environment.
idThe ID of the element.
+
+
+
Returns:
Pointer to the created edit box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUISpriteBank* irr::gui::IGUIEnvironment::addEmptySpriteBank (const io::pathname) [pure virtual]
+
+
+ +

Adds an empty sprite bank to the manager.

+
Parameters:
+ + +
nameName of the new sprite bank.
+
+
+
Returns:
Pointer to the sprite bank. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIFileOpenDialog* irr::gui::IGUIEnvironment::addFileOpenDialog (const wchar_t * title = 0,
bool modal = true,
IGUIElementparent = 0,
s32 id = -1,
bool restoreCWD = false,
io::path::char_typestartDir = 0 
) [pure virtual]
+
+
+ +

Adds a file open dialog.

+
Parameters:
+ + + + + + + +
titleText to be displayed as the title of the dialog.
modalDefines if the dialog is modal. This means, that all other gui elements which were created before the message box cannot be used until this messagebox is removed.
parentParent gui element of the dialog.
idId to identify the gui element.
restoreCWDIf set to true, the current workingn directory will be restored after the dialog is closed in some way. Otherwise the working directory will be the one that the file dialog was last showing.
startDirOptional path for which the file dialog will be opened.
+
+
+
Returns:
Pointer to the created file open dialog. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIFont* irr::gui::IGUIEnvironment::addFont (const io::pathname,
IGUIFontfont 
) [pure virtual]
+
+
+ +

Adds an externally loaded font to the font list.

+

This method allows to attach an already loaded font to the list of existing fonts. The font is grabbed if non-null and adding was successful.

+
Parameters:
+ + + +
nameName the font should be stored as.
fontPointer to font to add.
+
+
+
Returns:
Pointer to the font stored. This can differ from given parameter if the name previously existed.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIElement* irr::gui::IGUIEnvironment::addGUIElement (const c8elementName,
IGUIElementparent = 0 
) [pure virtual]
+
+
+ +

Adds a GUI element by its name.

+

Each factory is checked if it can create an element of the given name. The first match will be created.

+
Parameters:
+ + + +
elementNameName of the element to be created.
parentParent of the new element, if not 0.
+
+
+
Returns:
New GUI element, or 0 if no such element exists.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIImage* irr::gui::IGUIEnvironment::addImage (video::ITextureimage,
core::position2d< s32pos,
bool useAlphaChannel = true,
IGUIElementparent = 0,
s32 id = -1,
const wchar_t * text = 0 
) [pure virtual]
+
+
+ +

Adds an image element.

+
Parameters:
+ + + + + + + +
imageImage to be displayed.
posPosition of the image. The width and height of the image is taken from the image.
useAlphaChannelSets if the image should use the alpha channel of the texture to draw itself.
parentParent gui element of the image.
idId to identify the gui element.
textTitle text of the image.
+
+
+
Returns:
Pointer to the created image element. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIImage* irr::gui::IGUIEnvironment::addImage (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
const wchar_t * text = 0,
bool useAlphaChannel = true 
) [pure virtual]
+
+
+ +

Adds an image element.

+

Use IGUIImage::setImage later to set the image to be displayed.

+
Parameters:
+ + + + + + +
rectangleRectangle specifying the borders of the image.
parentParent gui element of the image.
idId to identify the gui element.
textTitle text of the image.
useAlphaChannelSets if the image should use the alpha channel of the texture to draw itself.
+
+
+
Returns:
Pointer to the created image element. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIInOutFader* irr::gui::IGUIEnvironment::addInOutFader (const core::rect< s32 > * rectangle = 0,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds an element for fading in or out.

+
Parameters:
+ + + + +
rectangleRectangle specifying the borders of the fader. If the pointer is NULL, the whole screen is used.
parentParent item of the element, e.g. a window.
idAn identifier for the fader.
+
+
+
Returns:
Pointer to the created in-out-fader. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIListBox* irr::gui::IGUIEnvironment::addListBox (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
bool drawBackground = false 
) [pure virtual]
+
+
+ +

Adds a list box element.

+
Parameters:
+ + + + + +
rectangleRectangle specifying the borders of the list box.
parentParent gui element of the list box.
idId to identify the gui element.
drawBackgroundFlag whether the background should be drawn.
+
+
+
Returns:
Pointer to the created list box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIContextMenu* irr::gui::IGUIEnvironment::addMenu (IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a menu to the environment.

+

This is like the menu you can find on top of most windows in modern graphical user interfaces.

+
Parameters:
+ + + +
parentParent item of the element, e.g. a window. Set it to 0 to place the menu directly in the environment.
idAn identifier for the menu.
+
+
+
Returns:
Pointer to the created menu. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIMeshViewer* irr::gui::IGUIEnvironment::addMeshViewer (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
const wchar_t * text = 0 
) [pure virtual]
+
+
+ +

Adds a mesh viewer. Not 100% implemented yet.

+
Parameters:
+ + + + + +
rectangleRectangle specifying the borders of the mesh viewer.
parentParent gui element of the mesh viewer.
idId to identify the gui element.
textTitle text of the mesh viewer.
+
+
+
Returns:
Pointer to the created mesh viewer. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIWindow* irr::gui::IGUIEnvironment::addMessageBox (const wchar_t * caption,
const wchar_t * text = 0,
bool modal = true,
s32 flags = EMBF_OK,
IGUIElementparent = 0,
s32 id = -1,
video::ITextureimage = 0 
) [pure virtual]
+
+
+ +

Adds a message box.

+
Parameters:
+ + + + + + + + +
captionText to be displayed the title of the message box.
textText to be displayed in the body of the message box.
modalDefines if the dialog is modal. This means, that all other gui elements which were created before the message box cannot be used until this messagebox is removed.
flagsFlags specifying the layout of the message box. For example to create a message box with an OK and a CANCEL button on it, set this to (EMBF_OK | EMBF_CANCEL).
parentParent gui element of the message box.
idId with which the gui element can be identified.
imageOptional texture which will be displayed beside the text as an image
+
+
+
Returns:
Pointer to the created message box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIElement* irr::gui::IGUIEnvironment::addModalScreen (IGUIElementparent) [pure virtual]
+
+
+ +

Adds a modal screen.

+

This control stops its parent's members from being able to receive input until its last child is removed, it then deletes itself.

+
Parameters:
+ + +
parentParent gui element of the modal.
+
+
+
Returns:
Pointer to the created modal. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIScrollBar* irr::gui::IGUIEnvironment::addScrollBar (bool horizontal,
const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a scrollbar.

+
Parameters:
+ + + + + +
horizontalSpecifies if the scroll bar is drawn horizontal or vertical.
rectangleRectangle specifying the borders of the scrollbar.
parentParent gui element of the scroll bar.
idId to identify the gui element.
+
+
+
Returns:
Pointer to the created scrollbar. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUISpinBox* irr::gui::IGUIEnvironment::addSpinBox (const wchar_t * text,
const core::rect< s32 > & rectangle,
bool border = true,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a spin box.

+

An edit box with up and down buttons

+
Parameters:
+ + + + + + +
textText to be displayed. Can be altered after creation by setText().
rectangleRectangle specifying the borders of the spin box.
borderSet to true if the spin box should have a 3d border.
parentParent item of the element, e.g. a window. Set it to 0 to place the spin box directly in the environment.
idThe ID of the element.
+
+
+
Returns:
Pointer to the created spin box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIStaticText* irr::gui::IGUIEnvironment::addStaticText (const wchar_t * text,
const core::rect< s32 > & rectangle,
bool border = false,
bool wordWrap = true,
IGUIElementparent = 0,
s32 id = -1,
bool fillBackground = false 
) [pure virtual]
+
+
+ +

Adds a static text.

+
Parameters:
+ + + + + + + + +
textText to be displayed. Can be altered after creation by SetText().
rectangleRectangle specifying the borders of the static text
borderSet to true if the static text should have a 3d border.
wordWrapEnable if the text should wrap into multiple lines.
parentParent item of the element, e.g. a window.
idThe ID of the element.
fillBackgroundEnable if the background shall be filled. Defaults to false.
+
+
+
Returns:
Pointer to the created static text. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITab* irr::gui::IGUIEnvironment::addTab (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds tab to the environment.

+

You can use this element to group other elements. This is not used for creating tabs on tab controls, please use IGUITabControl::addTab() for this instead.

+
Parameters:
+ + + + +
rectangleRectangle specifying the borders of the tab.
parentParent item of the element, e.g. a window. Set it to 0 to place the tab directly in the environment.
idAn identifier for the tab.
+
+
+
Returns:
Pointer to the created tab. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITabControl* irr::gui::IGUIEnvironment::addTabControl (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
bool fillbackground = false,
bool border = true,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a tab control to the environment.

+
Parameters:
+ + + + + + +
rectangleRectangle specifying the borders of the tab control.
parentParent item of the element, e.g. a window. Set it to 0 to place the tab control directly in the environment.
fillbackgroundSpecifies if the background of the tab control should be drawn.
borderSpecifies if a flat 3d border should be drawn. This is usually not necessary unless you place the control directly into the environment without a window as parent.
idAn identifier for the tab control.
+
+
+
Returns:
Pointer to the created tab control element. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITable* irr::gui::IGUIEnvironment::addTable (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
bool drawBackground = false 
) [pure virtual]
+
+
+ +

Adds a table to the environment.

+
Parameters:
+ + + + + +
rectangleRectangle specifying the borders of the table.
parentParent item of the element, e.g. a window. Set it to 0 to place the element directly in the environment.
idAn identifier for the table.
drawBackgroundFlag whether the background should be drawn.
+
+
+
Returns:
Pointer to the created table. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUIToolBar* irr::gui::IGUIEnvironment::addToolBar (IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a toolbar to the environment.

+

It is like a menu that is always placed on top of its parent, and contains buttons.

+
Parameters:
+ + + +
parentParent item of the element, e.g. a window. Set it to 0 to place the tool bar directly in the environment.
idAn identifier for the tool bar.
+
+
+
Returns:
Pointer to the created tool bar. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITreeView* irr::gui::IGUIEnvironment::addTreeView (const core::rect< s32 > & rectangle,
IGUIElementparent = 0,
s32 id = -1,
bool drawBackground = false,
bool scrollBarVertical = true,
bool scrollBarHorizontal = false 
) [pure virtual]
+
+
+ +

Adds a tree view element.

+
Parameters:
+ + + + + + + +
rectanglePosition and dimension of list box.
parentParent gui element of the list box.
idId to identify the gui element.
drawBackgroundFlag whether the background should be drawn.
scrollBarVerticalFlag whether a vertical scrollbar should be used
scrollBarHorizontalFlag whether a horizontal scrollbar should be used
+
+
+
Returns:
Pointer to the created list box. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIWindow* irr::gui::IGUIEnvironment::addWindow (const core::rect< s32 > & rectangle,
bool modal = false,
const wchar_t * text = 0,
IGUIElementparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds an empty window element.

+
Parameters:
+ + + + + + +
rectangleRectangle specifying the borders of the window.
modalDefines if the dialog is modal. This means, that all other gui elements which were created before the window cannot be used until it is removed.
textText displayed as the window title.
parentParent gui element of the window.
idId with which the gui element can be identified.
+
+
+
Returns:
Pointer to the created window. Returns 0 if an error occurred. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIEnvironment::clear () [pure virtual]
+
+
+ +

Removes all elements from the environment.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIImageList* irr::gui::IGUIEnvironment::createImageList (video::ITexturetexture,
core::dimension2d< s32imageSize,
bool useAlphaChannel 
) [pure virtual]
+
+
+ +

Creates the image list from the given texture.

+
Parameters:
+ + + + +
textureTexture to split into images
imageSizeDimension of each image
useAlphaChannelFlag whether alpha channel of the texture should be honored.
+
+
+
Returns:
Pointer to the font. Returns 0 if the font could not be loaded. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUISkin* irr::gui::IGUIEnvironment::createSkin (EGUI_SKIN_TYPE type) [pure virtual]
+
+
+ +

Creates a new GUI Skin based on a template.

+

Use setSkin() to set the created skin.

+
Parameters:
+ + +
typeThe type of the new skin.
+
+
+
Returns:
Pointer to the created skin. If you no longer need it, you should call IGUISkin::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIEnvironment::deserializeAttributes (io::IAttributesin,
io::SAttributeReadWriteOptionsoptions = 0 
) [pure virtual]
+
+
+ +

Reads attributes of the gui environment.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIEnvironment::drawAll () [pure virtual]
+
+
+ +

Draws all gui elements by traversing the GUI environment starting at the root node.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUIFont* irr::gui::IGUIEnvironment::getBuiltInFont () const [pure virtual]
+
+
+ +

Returns the default built-in font.

+
Returns:
Pointer to the default built-in font. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUIElementFactory* irr::gui::IGUIEnvironment::getDefaultGUIElementFactory () const [pure virtual]
+
+
+ +

Get the default element factory which can create all built-in elements.

+
Returns:
Pointer to the factory. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual io::IFileSystem* irr::gui::IGUIEnvironment::getFileSystem () const [pure virtual]
+
+
+ +

Returns the file system.

+
Returns:
Pointer to the file system.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUIElement* irr::gui::IGUIEnvironment::getFocus () const [pure virtual]
+
+
+ +

Returns the element which holds the focus.

+
Returns:
Pointer to the element with focus.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIFont* irr::gui::IGUIEnvironment::getFont (const io::pathfilename) [pure virtual]
+
+
+ +

Returns pointer to the font with the specified filename.

+

Loads the font if it was not loaded before.

+
Parameters:
+ + +
filenameFilename of the Font.
+
+
+
Returns:
Pointer to the font. Returns 0 if the font could not be loaded. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIElementFactory* irr::gui::IGUIEnvironment::getGUIElementFactory (u32 index) const [pure virtual]
+
+
+ +

Get a gui element factory by index.

+
Parameters:
+ + +
indexIndex of the factory.
+
+
+
Returns:
Factory at given index, or 0 if no such factory exists.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUIElement* irr::gui::IGUIEnvironment::getHovered () const [pure virtual]
+
+
+ +

Returns the element which was last under the mouse cursor.

+

NOTE: This information is updated _after_ the user-eventreceiver received it's mouse-events. To find the hovered element while catching mouse events you have to use instead: IGUIEnvironment::getRootGUIElement()->getElementFromPoint(mousePos);

+
Returns:
Pointer to the element under the mouse.
+ +
+
+ +
+
+ + + + + + + +
virtual IOSOperator* irr::gui::IGUIEnvironment::getOSOperator () const [pure virtual]
+
+
+ +

returns a pointer to the OS operator

+
Returns:
Pointer to the OS operator.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUIEnvironment::getRegisteredGUIElementFactoryCount () const [pure virtual]
+
+
+ +

Get amount of registered gui element factories.

+
Returns:
Amount of registered gui element factories.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUIElement* irr::gui::IGUIEnvironment::getRootGUIElement () [pure virtual]
+
+
+ +

Returns the root gui element.

+

This is the first gui element, the (direct or indirect) parent of all other gui elements. It is a valid IGUIElement, with dimensions the same size as the screen.

+
Returns:
Pointer to the root element of the GUI. The returned pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUISkin* irr::gui::IGUIEnvironment::getSkin () const [pure virtual]
+
+
+ +

Returns pointer to the current gui skin.

+
Returns:
Pointer to the GUI skin.
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUISpriteBank* irr::gui::IGUIEnvironment::getSpriteBank (const io::pathfilename) [pure virtual]
+
+
+ +

Returns pointer to the sprite bank with the specified file name.

+

Loads the bank if it was not loaded before.

+
Parameters:
+ + +
filenameFilename of the sprite bank's origin.
+
+
+
Returns:
Pointer to the sprite bank. Returns 0 if it could not be loaded. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual video::IVideoDriver* irr::gui::IGUIEnvironment::getVideoDriver () const [pure virtual]
+
+
+ +

Returns the current video driver.

+
Returns:
Pointer to the video driver.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::hasFocus (IGUIElementelement) const [pure virtual]
+
+
+ +

Returns whether the element has focus.

+
Parameters:
+ + +
elementPointer to the element which is tested.
+
+
+
Returns:
True if the element has focus, else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::loadGUI (const io::pathfilename,
IGUIElementparent = 0 
) [pure virtual]
+
+
+ +

Loads the gui. Note that the current gui is not cleared before.

+

When a parent is set the elements will be added below the parent, the parent itself does not deserialize. When the file contains skin-settings from the gui-environment those are always serialized into the guienvironment independent of the parent setting.

+
Parameters:
+ + + +
filenameName of the file.
parentParent for the loaded GUI, root if 0.
+
+
+
Returns:
True if loading succeeded, else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::loadGUI (io::IReadFilefile,
IGUIElementparent = 0 
) [pure virtual]
+
+
+ +

Loads the gui. Note that the current gui is not cleared before.

+

When a parent is set the elements will be added below the parent, the parent itself does not deserialize. When the file contains skin-settings from the gui-environment those are always serialized into the guienvironment independent of the parent setting.

+
Parameters:
+ + + +
fileThe file to load from.
parentParent for the loaded GUI, root if 0.
+
+
+
Returns:
True if loading succeeded, else false.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::postEventFromUser (const SEventevent) [pure virtual]
+
+
+ +

Posts an input event to the environment.

+

Usually you do not have to use this method, it is used by the engine internally.

+
Parameters:
+ + +
eventThe event to post.
+
+
+
Returns:
True if succeeded, else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIEnvironment::readGUIElement (io::IXMLReaderreader,
IGUIElementnode 
) [pure virtual]
+
+
+ +

reads an element

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEnvironment::registerGUIElementFactory (IGUIElementFactoryfactoryToAdd) [pure virtual]
+
+
+ +

Adds an element factory to the gui environment.

+

Use this to extend the gui environment with new element types which it should be able to create automatically, for example when loading data from xml files.

+
Parameters:
+ + +
factoryToAddPointer to new factory.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::removeFocus (IGUIElementelement) [pure virtual]
+
+
+ +

Removes the focus from an element.

+

Causes a EGET_ELEMENT_FOCUS_LOST event. If the event is absorbed then the focus will not be changed.

+
Parameters:
+ + +
elementPointer to the element which shall lose the focus.
+
+
+
Returns:
True on success, false on failure
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEnvironment::removeFont (IGUIFontfont) [pure virtual]
+
+
+ +

remove loaded font

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::saveGUI (const io::pathfilename,
IGUIElementstart = 0 
) [pure virtual]
+
+
+ +

Saves the current gui into a file.

+
Parameters:
+ + + +
filenameName of the file.
startThe GUIElement to start with. Root if 0.
+
+
+
Returns:
True if saving succeeded, else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::saveGUI (io::IWriteFilefile,
IGUIElementstart = 0 
) [pure virtual]
+
+
+ +

Saves the current gui into a file.

+
Parameters:
+ + + +
fileThe file to write to.
startThe GUIElement to start with. Root if 0.
+
+
+
Returns:
True if saving succeeded, else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIEnvironment::serializeAttributes (io::IAttributesout,
io::SAttributeReadWriteOptionsoptions = 0 
) const [pure virtual]
+
+
+ +

Writes attributes of the gui environment.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIEnvironment::setFocus (IGUIElementelement) [pure virtual]
+
+
+ +

Sets the focus to an element.

+

Causes a EGET_ELEMENT_FOCUS_LOST event followed by a EGET_ELEMENT_FOCUSED event. If someone absorbed either of the events, then the focus will not be changed.

+
Parameters:
+ + +
elementPointer to the element which shall get the focus.
+
+
+
Returns:
True on success, false on failure
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEnvironment::setSkin (IGUISkinskin) [pure virtual]
+
+
+ +

Sets a new GUI Skin.

+

You can use this to change the appearance of the whole GUI Environment. You can set one of the built-in skins or implement your own class derived from IGUISkin and enable it using this method. To set for example the built-in Windows classic skin, use the following code:

+
    gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC);
+    environment->setSkin(newskin);
+    newskin->drop();
+
Parameters:
+ + +
skinNew skin to use.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIEnvironment::setUserEventReceiver (IEventReceiverevr) [pure virtual]
+
+
+ +

This sets a new event receiver for gui events.

+

Usually you do not have to use this method, it is used by the engine internally.

+
Parameters:
+ + +
evrPointer to the new receiver.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIEnvironment::writeGUIElement (io::IXMLWriterwriter,
IGUIElementnode 
) [pure virtual]
+
+
+ +

writes an element

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.png new file mode 100644 index 0000000..f0279a3 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_environment.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog-members.html new file mode 100644 index 0000000..2d6c167 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog-members.html @@ -0,0 +1,217 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIFileOpenDialog Member List
+
+
+This is the complete list of members for irr::gui::IGUIFileOpenDialog, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirectoryName()=0irr::gui::IGUIFileOpenDialog [pure virtual]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getFileName() const =0irr::gui::IGUIFileOpenDialog [pure virtual]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIFileOpenDialog(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIFileOpenDialog [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
isVisible() const irr::gui::IGUIElement [inline, virtual]
IsVisibleirr::gui::IGUIElement [protected]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html new file mode 100644 index 0000000..9097433 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html @@ -0,0 +1,247 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIFileOpenDialog Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIFileOpenDialog Class Reference
+
+
+ +

Standard file chooser dialog. + More...

+ +

#include <IGUIFileOpenDialog.h>

+
+ + Inheritance diagram for irr::gui::IGUIFileOpenDialog:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Standard file chooser dialog.

+
Warning:
When the user selects a folder this does change the current working directory
+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_DIRECTORY_SELECTED
  • +
  • EGET_FILE_SELECTED
  • +
  • EGET_FILE_CHOOSE_DIALOG_CANCELLED
  • +
+
+ +

Definition at line 24 of file IGUIFileOpenDialog.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIFileOpenDialog::IGUIFileOpenDialog (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 29 of file IGUIFileOpenDialog.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const io::path& irr::gui::IGUIFileOpenDialog::getDirectoryName () [pure virtual]
+
+
+ +

Returns the directory of the selected file. Returns NULL, if no directory was selected.

+ +
+
+ +
+
+ + + + + + + +
virtual const wchar_t* irr::gui::IGUIFileOpenDialog::getFileName () const [pure virtual]
+
+
+ +

Returns the filename of the selected file. Returns NULL, if no file was selected.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.png new file mode 100644 index 0000000..0695f86 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font-members.html new file mode 100644 index 0000000..0f17b22 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font-members.html @@ -0,0 +1,136 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIFont Member List
+
+
+This is the complete list of members for irr::gui::IGUIFont, including all inherited members. + + + + + + + + + + + + + + + + +
draw(const core::stringw &text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0irr::gui::IGUIFont [pure virtual]
drop() const irr::IReferenceCounted [inline]
getCharacterFromPos(const wchar_t *text, s32 pixel_x) const =0irr::gui::IGUIFont [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDimension(const wchar_t *text) const =0irr::gui::IGUIFont [pure virtual]
getKerningHeight() const =0irr::gui::IGUIFont [pure virtual]
getKerningWidth(const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0irr::gui::IGUIFont [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::gui::IGUIFont [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setInvisibleCharacters(const wchar_t *s)=0irr::gui::IGUIFont [pure virtual]
setKerningHeight(s32 kerning)=0irr::gui::IGUIFont [pure virtual]
setKerningWidth(s32 kerning)=0irr::gui::IGUIFont [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.html new file mode 100644 index 0000000..812a282 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.html @@ -0,0 +1,430 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIFont Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIFont Class Reference
+
+
+ +

Font interface. + More...

+ +

#include <IGUIFont.h>

+
+ + Inheritance diagram for irr::gui::IGUIFont:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual void draw (const core::stringw &text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0 +
    Draws some text and clips it to the specified rectangle if wanted.
  • virtual s32 getCharacterFromPos (const wchar_t *text, s32 pixel_x) const =0 +
    Calculates the index of the character in the text which is on a specific position.
  • virtual core::dimension2d< u32 > getDimension (const wchar_t *text) const =0 +
    Calculates the width and height of a given string of text.
  • virtual s32 getKerningHeight () const =0 +
    Returns the distance between letters.
  • virtual s32 getKerningWidth (const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0 +
    Gets kerning values (distance between letters) for the font. If no parameters are provided,.
  • virtual EGUI_FONT_TYPE getType () const +
    Returns the type of this font.
  • virtual void setInvisibleCharacters (const wchar_t *s)=0 +
    Define which characters should not be drawn by the font.
  • virtual void setKerningHeight (s32 kerning)=0 +
    Sets global kerning height for the font.
  • virtual void setKerningWidth (s32 kerning)=0 +
    Sets global kerning width for the font.
+

Detailed Description

+

Font interface.

+ +

Definition at line 39 of file IGUIFont.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIFont::draw (const core::stringwtext,
const core::rect< s32 > & position,
video::SColor color,
bool hcenter = false,
bool vcenter = false,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

Draws some text and clips it to the specified rectangle if wanted.

+
Parameters:
+ + + + + + + +
text,:Text to draw
position,:Rectangle specifying position where to draw the text.
color,:Color of the text
hcenter,:Specifies if the text should be centered horizontally into the rectangle.
vcenter,:Specifies if the text should be centered vertically into the rectangle.
clip,:Optional pointer to a rectangle against which the text will be clipped. If the pointer is null, no clipping will be done.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUIFont::getCharacterFromPos (const wchar_t * text,
s32 pixel_x 
) const [pure virtual]
+
+
+ +

Calculates the index of the character in the text which is on a specific position.

+
Parameters:
+ + + +
text,:Text string.
pixel_x,:X pixel position of which the index of the character will be returned.
+
+
+
Returns:
Returns zero based index of the character in the text, and -1 if no no character is on this position. (=the text is too short).
+ +
+
+ +
+
+ + + + + + + + +
virtual core::dimension2d<u32> irr::gui::IGUIFont::getDimension (const wchar_t * text) const [pure virtual]
+
+
+ +

Calculates the width and height of a given string of text.

+
Returns:
Returns width and height of the area covered by the text if it would be drawn.
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIFont::getKerningHeight () const [pure virtual]
+
+
+ +

Returns the distance between letters.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUIFont::getKerningWidth (const wchar_t * thisLetter = 0,
const wchar_t * previousLetter = 0 
) const [pure virtual]
+
+
+ +

Gets kerning values (distance between letters) for the font. If no parameters are provided,.

+

the global kerning distance is returned.

+
Parameters:
+ + + +
thisLetter,:If this parameter is provided, the left side kerning for this letter is added to the global kerning value. For example, a space might only be one pixel wide, but it may be displayed as several pixels.
previousLetter,:If provided, kerning is calculated for both letters and added to the global kerning value. For example, in a font which supports kerning pairs a string such as 'Wo' may have the 'o' tucked neatly under the 'W'.
+
+
+ +

Implemented in irr::gui::IGUIFontBitmap.

+ +
+
+ +
+
+ + + + + + + +
virtual EGUI_FONT_TYPE irr::gui::IGUIFont::getType () const [inline, virtual]
+
+
+ +

Returns the type of this font.

+ +

Reimplemented in irr::gui::IGUIFontBitmap.

+ +

Definition at line 68 of file IGUIFont.h.

+ +

References irr::gui::EGFT_CUSTOM.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIFont::setInvisibleCharacters (const wchar_t * s) [pure virtual]
+
+
+ +

Define which characters should not be drawn by the font.

+

For example " " would not draw any space which is usually blank in most fonts.

+
Parameters:
+ + +
sString of symbols which are not send down to the videodriver
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIFont::setKerningHeight (s32 kerning) [pure virtual]
+
+
+ +

Sets global kerning height for the font.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIFont::setKerningWidth (s32 kerning) [pure virtual]
+
+
+ +

Sets global kerning width for the font.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.png new file mode 100644 index 0000000..73391b8 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap-members.html new file mode 100644 index 0000000..65dc7cf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap-members.html @@ -0,0 +1,138 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIFontBitmap Member List
+
+
+This is the complete list of members for irr::gui::IGUIFontBitmap, including all inherited members. + + + + + + + + + + + + + + + + + + +
draw(const core::stringw &text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0irr::gui::IGUIFont [pure virtual]
drop() const irr::IReferenceCounted [inline]
getCharacterFromPos(const wchar_t *text, s32 pixel_x) const =0irr::gui::IGUIFont [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDimension(const wchar_t *text) const =0irr::gui::IGUIFont [pure virtual]
getKerningHeight() const =0irr::gui::IGUIFont [pure virtual]
getKerningWidth(const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0irr::gui::IGUIFontBitmap [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSpriteBank() const =0irr::gui::IGUIFontBitmap [pure virtual]
getSpriteNoFromChar(const wchar_t *c) const =0irr::gui::IGUIFontBitmap [pure virtual]
getType() const irr::gui::IGUIFontBitmap [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setInvisibleCharacters(const wchar_t *s)=0irr::gui::IGUIFont [pure virtual]
setKerningHeight(s32 kerning)=0irr::gui::IGUIFont [pure virtual]
setKerningWidth(s32 kerning)=0irr::gui::IGUIFont [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html new file mode 100644 index 0000000..3e53581 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html @@ -0,0 +1,259 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIFontBitmap Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIFontBitmap Class Reference
+
+
+ +

Font interface. + More...

+ +

#include <IGUIFontBitmap.h>

+
+ + Inheritance diagram for irr::gui::IGUIFontBitmap:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual s32 getKerningWidth (const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0 +
    Gets kerning values (distance between letters) for the font. If no parameters are provided,.
  • virtual IGUISpriteBank * getSpriteBank () const =0 +
    returns the parsed Symbol Information
  • virtual u32 getSpriteNoFromChar (const wchar_t *c) const =0 +
    returns the sprite number from a given character
  • virtual EGUI_FONT_TYPE getType () const +
    Returns the type of this font.
+

Detailed Description

+

Font interface.

+ +

Definition at line 17 of file IGUIFontBitmap.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUIFontBitmap::getKerningWidth (const wchar_t * thisLetter = 0,
const wchar_t * previousLetter = 0 
) const [pure virtual]
+
+
+ +

Gets kerning values (distance between letters) for the font. If no parameters are provided,.

+

the global kerning distance is returned.

+
Parameters:
+ + + +
thisLetter,:If this parameter is provided, the left side kerning for this letter is added to the global kerning value. For example, a space might only be one pixel wide, but it may be displayed as several pixels.
previousLetter,:If provided, kerning is calculated for both letters and added to the global kerning value. For example, EGFT_BITMAP will add the right kerning value of previousLetter to the left side kerning value of thisLetter, then add the global value.
+
+
+ +

Implements irr::gui::IGUIFont.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUISpriteBank* irr::gui::IGUIFontBitmap::getSpriteBank () const [pure virtual]
+
+
+ +

returns the parsed Symbol Information

+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::gui::IGUIFontBitmap::getSpriteNoFromChar (const wchar_t * c) const [pure virtual]
+
+
+ +

returns the sprite number from a given character

+ +
+
+ +
+
+ + + + + + + +
virtual EGUI_FONT_TYPE irr::gui::IGUIFontBitmap::getType () const [inline, virtual]
+
+
+ +

Returns the type of this font.

+ +

Reimplemented from irr::gui::IGUIFont.

+ +

Definition at line 22 of file IGUIFontBitmap.h.

+ +

References irr::gui::EGFT_BITMAP.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.png new file mode 100644 index 0000000..232df2f Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_font_bitmap.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image-members.html new file mode 100644 index 0000000..e8dd6e4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image-members.html @@ -0,0 +1,223 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIImage Member List
+
+
+This is the complete list of members for irr::gui::IGUIImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getColor() const =0irr::gui::IGUIImage [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getImage() const =0irr::gui::IGUIImage [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIImage(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIImage [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isAlphaChannelUsed() const =0irr::gui::IGUIImage [pure virtual]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isImageScaled() const =0irr::gui::IGUIImage [pure virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setColor(video::SColor color)=0irr::gui::IGUIImage [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setImage(video::ITexture *image)=0irr::gui::IGUIImage [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setScaleImage(bool scale)=0irr::gui::IGUIImage [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setUseAlphaChannel(bool use)=0irr::gui::IGUIImage [pure virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.html new file mode 100644 index 0000000..fcd323a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.html @@ -0,0 +1,358 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIImage Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIImage Class Reference
+
+
+ +

GUI element displaying an image. + More...

+ +

#include <IGUIImage.h>

+
+ + Inheritance diagram for irr::gui::IGUIImage:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

GUI element displaying an image.

+ +

Definition at line 20 of file IGUIImage.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIImage::IGUIImage (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 25 of file IGUIImage.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual video::SColor irr::gui::IGUIImage::getColor () const [pure virtual]
+
+
+ +

Gets the color of the image.

+ +
+
+ +
+
+ + + + + + + +
virtual video::ITexture* irr::gui::IGUIImage::getImage () const [pure virtual]
+
+
+ +

Gets the image texture.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIImage::isAlphaChannelUsed () const [pure virtual]
+
+
+ +

Returns true if the image is using the alpha channel, false if not.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIImage::isImageScaled () const [pure virtual]
+
+
+ +

Returns true if the image is scaled to fit, false if not.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIImage::setColor (video::SColor color) [pure virtual]
+
+
+ +

Sets the color of the image.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIImage::setImage (video::ITextureimage) [pure virtual]
+
+
+ +

Sets an image texture.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIImage::setScaleImage (bool scale) [pure virtual]
+
+
+ +

Sets if the image should scale to fit the element.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIImage::setUseAlphaChannel (bool use) [pure virtual]
+
+
+ +

Sets if the image should use its alpha channel to draw itself.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.png new file mode 100644 index 0000000..99b6727 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list-members.html new file mode 100644 index 0000000..97ff9ac --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIImageList Member List
+
+
+This is the complete list of members for irr::gui::IGUIImageList, including all inherited members. + + + + + + + + + + + +
draw(s32 index, const core::position2d< s32 > &destPos, const core::rect< s32 > *clip=0)=0irr::gui::IGUIImageList [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getImageCount() const =0irr::gui::IGUIImageList [pure virtual]
getImageSize() const =0irr::gui::IGUIImageList [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IGUIImageList()irr::gui::IGUIImageList [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.html new file mode 100644 index 0000000..1040af9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.html @@ -0,0 +1,257 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIImageList Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIImageList Class Reference
+
+
+ +

Font interface. + More...

+ +

#include <IGUIImageList.h>

+
+ + Inheritance diagram for irr::gui::IGUIImageList:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Font interface.

+ +

Definition at line 17 of file IGUIImageList.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::gui::IGUIImageList::~IGUIImageList () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 22 of file IGUIImageList.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIImageList::draw (s32 index,
const core::position2d< s32 > & destPos,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+

Draws an image and clips it to the specified rectangle if wanted

+
Parameters:
+ + + + +
index,:Index of the image
destPos,:Position of the image to draw
clip,:Optional pointer to a rectalgle against which the text will be clipped. If the pointer is null, no clipping will be done.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIImageList::getImageCount () const [pure virtual]
+
+
+

Returns the count of Images in the list.

+
Returns:
Returns the count of Images in the list.
+ +
+
+ +
+
+ + + + + + + +
virtual core::dimension2d<s32> irr::gui::IGUIImageList::getImageSize () const [pure virtual]
+
+
+

Returns the size of the images in the list.

+
Returns:
Returns the size of the images in the list.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.png new file mode 100644 index 0000000..7f79a4d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_image_list.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader-members.html new file mode 100644 index 0000000..614f72d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader-members.html @@ -0,0 +1,221 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIInOutFader Member List
+
+
+This is the complete list of members for irr::gui::IGUIInOutFader, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
fadeIn(u32 time)=0irr::gui::IGUIInOutFader [pure virtual]
fadeOut(u32 time)=0irr::gui::IGUIInOutFader [pure virtual]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getColor() const =0irr::gui::IGUIInOutFader [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIInOutFader(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIInOutFader [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isReady() const =0irr::gui::IGUIInOutFader [pure virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setColor(video::SColor color)=0irr::gui::IGUIInOutFader [pure virtual]
setColor(video::SColor source, video::SColor dest)=0irr::gui::IGUIInOutFader [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html new file mode 100644 index 0000000..4960c6b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html @@ -0,0 +1,352 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIInOutFader Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIInOutFader Class Reference
+
+
+ +

Element for fading out or in. + More...

+ +

#include <IGUIInOutFader.h>

+
+ + Inheritance diagram for irr::gui::IGUIInOutFader:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Element for fading out or in.

+

Here is a small example on how the class is used. In this example we fade in from a total red screen in the beginning. As you can see, the fader is not only useful for dramatic in and out fading, but also to show that the player is hit in a first person shooter game for example.

+
    gui::IGUIInOutFader* fader = device->getGUIEnvironment()->addInOutFader();
+    fader->setColor(video::SColor(0,255,0,0));
+    fader->fadeIn(4000);
+
+

Definition at line 27 of file IGUIInOutFader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIInOutFader::IGUIInOutFader (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 32 of file IGUIInOutFader.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIInOutFader::fadeIn (u32 time) [pure virtual]
+
+
+ +

Starts the fade in process.

+

In the beginning the whole rect is drawn by the set color (black by default) and at the end of the overgiven time the color has faded out.

+
Parameters:
+ + +
time,:Time specifying how long it should need to fade in, in milliseconds.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIInOutFader::fadeOut (u32 time) [pure virtual]
+
+
+ +

Starts the fade out process.

+

In the beginning everything is visible, and at the end of the time only the set color (black by the fault) will be drawn.

+
Parameters:
+ + +
time,:Time specifying how long it should need to fade out, in milliseconds.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual video::SColor irr::gui::IGUIInOutFader::getColor () const [pure virtual]
+
+
+ +

Gets the color to fade out to or to fade in from.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIInOutFader::isReady () const [pure virtual]
+
+
+ +

Returns if the fade in or out process is done.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIInOutFader::setColor (video::SColor color) [pure virtual]
+
+
+ +

Sets the color to fade out to or to fade in from.

+
Parameters:
+ + +
color,:Color to where it is faded out od from it is faded in.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIInOutFader::setColor (video::SColor source,
video::SColor dest 
) [pure virtual]
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.png new file mode 100644 index 0000000..655c681 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_in_out_fader.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box-members.html new file mode 100644 index 0000000..9d2de40 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box-members.html @@ -0,0 +1,241 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIListBox Member List
+
+
+This is the complete list of members for irr::gui::IGUIListBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
addItem(const wchar_t *text)=0irr::gui::IGUIListBox [pure virtual]
addItem(const wchar_t *text, s32 icon)=0irr::gui::IGUIListBox [pure virtual]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
clear()=0irr::gui::IGUIListBox [pure virtual]
clearItemOverrideColor(u32 index)=0irr::gui::IGUIListBox [pure virtual]
clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType)=0irr::gui::IGUIListBox [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getIcon(u32 index) const =0irr::gui::IGUIListBox [pure virtual]
getID() const irr::gui::IGUIElement [inline, virtual]
getItemAt(s32 xpos, s32 ypos) const =0irr::gui::IGUIListBox [pure virtual]
getItemCount() const =0irr::gui::IGUIListBox [pure virtual]
getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const =0irr::gui::IGUIListBox [pure virtual]
getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const =0irr::gui::IGUIListBox [pure virtual]
getListItem(u32 id) const =0irr::gui::IGUIListBox [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getSelected() const =0irr::gui::IGUIListBox [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const =0irr::gui::IGUIListBox [pure virtual]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIListBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIListBox [inline]
insertItem(u32 index, const wchar_t *text, s32 icon)=0irr::gui::IGUIListBox [pure virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isAutoScrollEnabled() const =0irr::gui::IGUIListBox [pure virtual]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
removeItem(u32 index)=0irr::gui::IGUIListBox [pure virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setAutoScrollEnabled(bool scroll)=0irr::gui::IGUIListBox [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDrawBackground(bool draw)=0irr::gui::IGUIListBox [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setItem(u32 index, const wchar_t *text, s32 icon)=0irr::gui::IGUIListBox [pure virtual]
setItemHeight(s32 height)=0irr::gui::IGUIListBox [pure virtual]
setItemOverrideColor(u32 index, video::SColor color)=0irr::gui::IGUIListBox [pure virtual]
setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color)=0irr::gui::IGUIListBox [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSelected(s32 index)=0irr::gui::IGUIListBox [pure virtual]
setSelected(const wchar_t *item)=0irr::gui::IGUIListBox [pure virtual]
setSpriteBank(IGUISpriteBank *bank)=0irr::gui::IGUIListBox [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
swapItems(u32 index1, u32 index2)=0irr::gui::IGUIListBox [pure virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.html new file mode 100644 index 0000000..d5c7790 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.html @@ -0,0 +1,852 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIListBox Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIListBox Class Reference
+
+
+ +

Default list box GUI element. + More...

+ +

#include <IGUIListBox.h>

+
+ + Inheritance diagram for irr::gui::IGUIListBox:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Default list box GUI element.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_LISTBOX_CHANGED
  • +
  • EGET_LISTBOX_SELECTED_AGAIN
  • +
+
+ +

Definition at line 38 of file IGUIListBox.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIListBox::IGUIListBox (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 42 of file IGUIListBox.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual u32 irr::gui::IGUIListBox::addItem (const wchar_t * text) [pure virtual]
+
+
+ +

adds an list item, returns id of item

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual u32 irr::gui::IGUIListBox::addItem (const wchar_t * text,
s32 icon 
) [pure virtual]
+
+
+ +

adds an list item with an icon

+
Parameters:
+ + + +
textText of list entry
iconSprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon
+
+
+
Returns:
The id of the new created item
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUIListBox::clear () [pure virtual]
+
+
+ +

clears the list, deletes all items in the listbox

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::clearItemOverrideColor (u32 index) [pure virtual]
+
+
+ +

clear all item colors at index

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIListBox::clearItemOverrideColor (u32 index,
EGUI_LISTBOX_COLOR colorType 
) [pure virtual]
+
+
+ +

clear item color at index for given colortype

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::gui::IGUIListBox::getIcon (u32 index) const [pure virtual]
+
+
+ +

Returns the icon of an item.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUIListBox::getItemAt (s32 xpos,
s32 ypos 
) const [pure virtual]
+
+
+ +

get the the id of the item at the given absolute coordinates

+
Returns:
The id of the listitem or -1 when no item is at those coordinates
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUIListBox::getItemCount () const [pure virtual]
+
+
+ +

returns amount of list items

+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColor irr::gui::IGUIListBox::getItemDefaultColor (EGUI_LISTBOX_COLOR colorType) const [pure virtual]
+
+
+ +

return the default color which is used for the given colorType

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual video::SColor irr::gui::IGUIListBox::getItemOverrideColor (u32 index,
EGUI_LISTBOX_COLOR colorType 
) const [pure virtual]
+
+
+ +

return the overwrite color at given item index.

+ +
+
+ +
+
+ + + + + + + + +
virtual const wchar_t* irr::gui::IGUIListBox::getListItem (u32 id) const [pure virtual]
+
+
+ +

returns string of a list item. the may id be a value from 0 to itemCount-1

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIListBox::getSelected () const [pure virtual]
+
+
+ +

returns id of selected item. returns -1 if no item is selected.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::gui::IGUIListBox::hasItemOverrideColor (u32 index,
EGUI_LISTBOX_COLOR colorType 
) const [pure virtual]
+
+
+ +

has the item at index its color overwritten?

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUIListBox::insertItem (u32 index,
const wchar_t * text,
s32 icon 
) [pure virtual]
+
+
+ +

Insert the item at the given index.

+
Returns:
The index on success or -1 on failure.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIListBox::isAutoScrollEnabled () const [pure virtual]
+
+
+ +

returns true if automatic scrolling is enabled, false if not.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::removeItem (u32 index) [pure virtual]
+
+
+ +

Removes an item from the list.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::setAutoScrollEnabled (bool scroll) [pure virtual]
+
+
+ +

set whether the listbox should scroll to newly selected items

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::setDrawBackground (bool draw) [pure virtual]
+
+
+ +

Sets whether to draw the background.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIListBox::setItem (u32 index,
const wchar_t * text,
s32 icon 
) [pure virtual]
+
+
+ +

set the item at the given index

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::setItemHeight (s32 height) [pure virtual]
+
+
+ +

set global itemHeight

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIListBox::setItemOverrideColor (u32 index,
video::SColor color 
) [pure virtual]
+
+
+ +

set all item colors at given index to color

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIListBox::setItemOverrideColor (u32 index,
EGUI_LISTBOX_COLOR colorType,
video::SColor color 
) [pure virtual]
+
+
+ +

set all item colors of specified type at given index to color

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::setSelected (s32 index) [pure virtual]
+
+
+ +

sets the selected item. Set this to -1 if no item should be selected

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::setSelected (const wchar_t * item) [pure virtual]
+
+
+ +

sets the selected item. Set this to 0 if no item should be selected

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIListBox::setSpriteBank (IGUISpriteBankbank) [pure virtual]
+
+
+ +

Sets the sprite bank which should be used to draw list icons.

+

This font is set to the sprite bank of the built-in-font by default. A sprite can be displayed in front of every list item. An icon is an index within the icon sprite bank. Several default icons are available in the skin through getIcon.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIListBox::swapItems (u32 index1,
u32 index2 
) [pure virtual]
+
+
+ +

Swap the items at the given indices.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.png new file mode 100644 index 0000000..da4ddc4 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_list_box.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer-members.html new file mode 100644 index 0000000..bbe6f02 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer-members.html @@ -0,0 +1,219 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIMeshViewer Member List
+
+
+This is the complete list of members for irr::gui::IGUIMeshViewer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getMaterial() const =0irr::gui::IGUIMeshViewer [pure virtual]
getMesh() const =0irr::gui::IGUIMeshViewer [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIMeshViewer(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIMeshViewer [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaterial(const video::SMaterial &material)=0irr::gui::IGUIMeshViewer [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMesh(scene::IAnimatedMesh *mesh)=0irr::gui::IGUIMeshViewer [pure virtual]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html new file mode 100644 index 0000000..9cd65ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html @@ -0,0 +1,280 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIMeshViewer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIMeshViewer Class Reference
+
+
+ +

3d mesh viewing GUI element. + More...

+ +

#include <IGUIMeshViewer.h>

+
+ + Inheritance diagram for irr::gui::IGUIMeshViewer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

3d mesh viewing GUI element.

+ +

Definition at line 27 of file IGUIMeshViewer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIMeshViewer::IGUIMeshViewer (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 32 of file IGUIMeshViewer.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const video::SMaterial& irr::gui::IGUIMeshViewer::getMaterial () const [pure virtual]
+
+
+ +

Gets the material.

+ +
+
+ +
+
+ + + + + + + +
virtual scene::IAnimatedMesh* irr::gui::IGUIMeshViewer::getMesh () const [pure virtual]
+
+
+ +

Gets the displayed mesh.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIMeshViewer::setMaterial (const video::SMaterialmaterial) [pure virtual]
+
+
+ +

Sets the material.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIMeshViewer::setMesh (scene::IAnimatedMeshmesh) [pure virtual]
+
+
+ +

Sets the mesh to be shown.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.png new file mode 100644 index 0000000..305157d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar-members.html new file mode 100644 index 0000000..5553e96 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar-members.html @@ -0,0 +1,225 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIScrollBar Member List
+
+
+This is the complete list of members for irr::gui::IGUIScrollBar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getLargeStep() const =0irr::gui::IGUIScrollBar [pure virtual]
getMax() const =0irr::gui::IGUIScrollBar [pure virtual]
getMin() const =0irr::gui::IGUIScrollBar [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getPos() const =0irr::gui::IGUIScrollBar [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getSmallStep() const =0irr::gui::IGUIScrollBar [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIScrollBar(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIScrollBar [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setLargeStep(s32 step)=0irr::gui::IGUIScrollBar [pure virtual]
setMax(s32 max)=0irr::gui::IGUIScrollBar [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMin(s32 min)=0irr::gui::IGUIScrollBar [pure virtual]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setPos(s32 pos)=0irr::gui::IGUIScrollBar [pure virtual]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSmallStep(s32 step)=0irr::gui::IGUIScrollBar [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html new file mode 100644 index 0000000..0aeeb7b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html @@ -0,0 +1,403 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIScrollBar Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIScrollBar Class Reference
+
+
+ +

Default scroll bar GUI element. + More...

+ +

#include <IGUIScrollBar.h>

+
+ + Inheritance diagram for irr::gui::IGUIScrollBar:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Default scroll bar GUI element.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_SCROLL_BAR_CHANGED
  • +
+
+ +

Definition at line 19 of file IGUIScrollBar.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIScrollBar::IGUIScrollBar (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 24 of file IGUIScrollBar.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIScrollBar::getLargeStep () const [pure virtual]
+
+
+ +

gets the large step value

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIScrollBar::getMax () const [pure virtual]
+
+
+ +

gets the maximum value of the scrollbar.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIScrollBar::getMin () const [pure virtual]
+
+
+ +

gets the minimum value of the scrollbar.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIScrollBar::getPos () const [pure virtual]
+
+
+ +

gets the current position of the scrollbar

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIScrollBar::getSmallStep () const [pure virtual]
+
+
+ +

gets the small step value

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIScrollBar::setLargeStep (s32 step) [pure virtual]
+
+
+ +

Sets the large step.

+

That is the amount that the value changes by when clicking in the tray, or using the page up and page down keys.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIScrollBar::setMax (s32 max) [pure virtual]
+
+
+ +

sets the maximum value of the scrollbar.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIScrollBar::setMin (s32 min) [pure virtual]
+
+
+ +

sets the minimum value of the scrollbar.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIScrollBar::setPos (s32 pos) [pure virtual]
+
+
+ +

sets the current position of the scrollbar

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIScrollBar::setSmallStep (s32 step) [pure virtual]
+
+
+ +

Sets the small step.

+

That is the amount that the value changes by when clicking on the buttons or using the cursor keys.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.png new file mode 100644 index 0000000..6ef9b7d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_scroll_bar.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin-members.html new file mode 100644 index 0000000..fed937d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin-members.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUISkin Member List
+
+
+This is the complete list of members for irr::gui::IGUISkin, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
draw2DRectangle(IGUIElement *element, const video::SColor &color, const core::rect< s32 > &pos, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
draw3DButtonPanePressed(IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
draw3DButtonPaneStandard(IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
draw3DMenuPane(IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
draw3DSunkenPane(IGUIElement *element, video::SColor bgcolor, bool flat, bool fillBackGround, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
draw3DTabBody(IGUIElement *element, bool border, bool background, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT)=0irr::gui::IGUISkin [pure virtual]
draw3DTabButton(IGUIElement *element, bool active, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT)=0irr::gui::IGUISkin [pure virtual]
draw3DToolBar(IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
draw3DWindowBackground(IGUIElement *element, bool drawTitleBar, video::SColor titleBarColor, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, core::rect< s32 > *checkClientArea=0)=0irr::gui::IGUISkin [pure virtual]
drawIcon(IGUIElement *element, EGUI_DEFAULT_ICON icon, const core::position2di position, u32 starttime=0, u32 currenttime=0, bool loop=false, const core::rect< s32 > *clip=0)=0irr::gui::IGUISkin [pure virtual]
drop() const irr::IReferenceCounted [inline]
getColor(EGUI_DEFAULT_COLOR color) const =0irr::gui::IGUISkin [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDefaultText(EGUI_DEFAULT_TEXT text) const =0irr::gui::IGUISkin [pure virtual]
getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const =0irr::gui::IGUISkin [pure virtual]
getIcon(EGUI_DEFAULT_ICON icon) const =0irr::gui::IGUISkin [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSize(EGUI_DEFAULT_SIZE size) const =0irr::gui::IGUISkin [pure virtual]
getSpriteBank() const =0irr::gui::IGUISkin [pure virtual]
getType() const irr::gui::IGUISkin [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor)=0irr::gui::IGUISkin [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t *newText)=0irr::gui::IGUISkin [pure virtual]
setFont(IGUIFont *font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT)=0irr::gui::IGUISkin [pure virtual]
setIcon(EGUI_DEFAULT_ICON icon, u32 index)=0irr::gui::IGUISkin [pure virtual]
setSize(EGUI_DEFAULT_SIZE which, s32 size)=0irr::gui::IGUISkin [pure virtual]
setSpriteBank(IGUISpriteBank *bank)=0irr::gui::IGUISkin [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.html new file mode 100644 index 0000000..43b9678 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.html @@ -0,0 +1,1045 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUISkin Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUISkin Class Reference
+
+
+ +

A skin modifies the look of the GUI elements. + More...

+ +

#include <IGUISkin.h>

+
+ + Inheritance diagram for irr::gui::IGUISkin:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A skin modifies the look of the GUI elements.

+ +

Definition at line 378 of file IGUISkin.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw2DRectangle (IGUIElementelement,
const video::SColorcolor,
const core::rect< s32 > & pos,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws a 2d rectangle.

+
Parameters:
+ + + + + +
element,:Pointer to the element which wishes to draw this icon. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
color,:Color of the rectangle to draw. The alpha component specifies how transparent the rectangle will be.
pos,:Position of the rectangle.
clip,:Pointer to rectangle against which the rectangle will be clipped. If the pointer is null, no clipping will be performed.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DButtonPanePressed (IGUIElementelement,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws a pressed 3d button pane

+

Used for drawing for example buttons in pressed state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.

+
Parameters:
+ + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
rect,:Defining area where to draw.
clip,:Clip area.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DButtonPaneStandard (IGUIElementelement,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws a standard 3d button pane

+

Used for drawing for example buttons in normal state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.

+
Parameters:
+ + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
rect,:Defining area where to draw.
clip,:Clip area.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DMenuPane (IGUIElementelement,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws a standard 3d menu pane

+

Used for drawing for menus and context menus. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.

+
Parameters:
+ + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
rect,:Defining area where to draw.
clip,:Clip area.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DSunkenPane (IGUIElementelement,
video::SColor bgcolor,
bool flat,
bool fillBackGround,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws a sunken 3d pane

+

Used for drawing the background of edit, combo or check boxes.

+
Parameters:
+ + + + + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
bgcolor,:Background color.
flat,:Specifies if the sunken pane should be flat or displayed as sunken deep into the ground.
fillBackGround,:Specifies if the background should be filled with the background color or not be drawn at all.
rect,:Defining area where to draw.
clip,:Clip area.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DTabBody (IGUIElementelement,
bool border,
bool background,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0,
s32 tabHeight = -1,
gui::EGUI_ALIGNMENT alignment = EGUIA_UPPERLEFT 
) [pure virtual]
+
+
+ +

draws a tab control body

+
Parameters:
+ + + + + + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
border,:Specifies if the border should be drawn.
background,:Specifies if the background should be drawn.
rect,:Defining area where to draw.
clip,:Clip area.
tabHeightHeight of tab.
alignmentAlignment of GUI element.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DTabButton (IGUIElementelement,
bool active,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0,
gui::EGUI_ALIGNMENT alignment = EGUIA_UPPERLEFT 
) [pure virtual]
+
+
+ +

draws a tab button

+

Used for drawing for tab buttons on top of tabs.

+
Parameters:
+ + + + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
active,:Specifies if the tab is currently active.
rect,:Defining area where to draw.
clip,:Clip area.
alignmentAlignment of GUI element.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::draw3DToolBar (IGUIElementelement,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws a standard 3d tool bar

+

Used for drawing for toolbars and menus.

+
Parameters:
+ + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
rect,:Defining area where to draw.
clip,:Clip area.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual core::rect<s32> irr::gui::IGUISkin::draw3DWindowBackground (IGUIElementelement,
bool drawTitleBar,
video::SColor titleBarColor,
const core::rect< s32 > & rect,
const core::rect< s32 > * clip = 0,
core::rect< s32 > * checkClientArea = 0 
) [pure virtual]
+
+
+ +

draws a window background

+

Used for drawing the background of dialogs and windows.

+
Parameters:
+ + + + + + + +
element,:Pointer to the element which wishes to draw this. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
titleBarColor,:Title color.
drawTitleBar,:True to enable title drawing.
rect,:Defining area where to draw.
clip,:Clip area.
checkClientArea,:When set to non-null the function will not draw anything, but will instead return the clientArea which can be used for drawing by the calling window. That is the area without borders and without titlebar.
+
+
+
Returns:
Returns rect where it would be good to draw title bar text. This will work even when checkClientArea is set to a non-null value.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::drawIcon (IGUIElementelement,
EGUI_DEFAULT_ICON icon,
const core::position2di position,
u32 starttime = 0,
u32 currenttime = 0,
bool loop = false,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

draws an icon, usually from the skin's sprite bank

+
Parameters:
+ + + + + + + + +
element,:Pointer to the element which wishes to draw this icon. This parameter is usually not used by IGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
icon,:Specifies the icon to be drawn.
position,:The position to draw the icon
starttime,:The time at the start of the animation
currenttime,:The present time, used to calculate the frame number
loop,:Whether the animation should loop or not
clip,:Clip area.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColor irr::gui::IGUISkin::getColor (EGUI_DEFAULT_COLOR color) const [pure virtual]
+
+
+ +

returns default color

+ +
+
+ +
+
+ + + + + + + + +
virtual const wchar_t* irr::gui::IGUISkin::getDefaultText (EGUI_DEFAULT_TEXT text) const [pure virtual]
+
+
+ +

Returns a default text.

+

For example for Message box button captions: "OK", "Cancel", "Yes", "No" and so on.

+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIFont* irr::gui::IGUISkin::getFont (EGUI_DEFAULT_FONT which = EGDF_DEFAULT) const [pure virtual]
+
+
+ +

returns the default font

+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::gui::IGUISkin::getIcon (EGUI_DEFAULT_ICON icon) const [pure virtual]
+
+
+ +

Returns a default icon.

+

Returns the sprite index within the sprite bank

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::gui::IGUISkin::getSize (EGUI_DEFAULT_SIZE size) const [pure virtual]
+
+
+ +

returns size for the given size type

+ +
+
+ +
+
+ + + + + + + +
virtual IGUISpriteBank* irr::gui::IGUISkin::getSpriteBank () const [pure virtual]
+
+
+ +

returns the sprite bank

+ +
+
+ +
+
+ + + + + + + +
virtual EGUI_SKIN_TYPE irr::gui::IGUISkin::getType () const [inline, virtual]
+
+
+ +

get the type of this skin

+ +

Definition at line 566 of file IGUISkin.h.

+ +

References irr::gui::EGST_UNKNOWN.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::setColor (EGUI_DEFAULT_COLOR which,
video::SColor newColor 
) [pure virtual]
+
+
+ +

sets a default color

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::setDefaultText (EGUI_DEFAULT_TEXT which,
const wchar_t * newText 
) [pure virtual]
+
+
+ +

Sets a default text.

+

For example for Message box button captions: "OK", "Cancel", "Yes", "No" and so on.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::setFont (IGUIFontfont,
EGUI_DEFAULT_FONT which = EGDF_DEFAULT 
) [pure virtual]
+
+
+ +

sets a default font

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::setIcon (EGUI_DEFAULT_ICON icon,
u32 index 
) [pure virtual]
+
+
+ +

Sets a default icon.

+

Sets the sprite index used for drawing icons like arrows, close buttons and ticks in checkboxes

+
Parameters:
+ + + +
icon,:Enum specifying which icon to change
index,:The sprite index used to draw this icon
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISkin::setSize (EGUI_DEFAULT_SIZE which,
s32 size 
) [pure virtual]
+
+
+ +

sets a default size

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUISkin::setSpriteBank (IGUISpriteBankbank) [pure virtual]
+
+
+ +

sets the sprite bank

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.png new file mode 100644 index 0000000..96468d5 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_skin.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box-members.html new file mode 100644 index 0000000..d36610d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box-members.html @@ -0,0 +1,224 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUISpinBox Member List
+
+
+This is the complete list of members for irr::gui::IGUISpinBox, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getEditBox() const =0irr::gui::IGUISpinBox [pure virtual]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getMax() const =0irr::gui::IGUISpinBox [pure virtual]
getMin() const =0irr::gui::IGUISpinBox [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getStepSize() const =0irr::gui::IGUISpinBox [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
getValue() const =0irr::gui::IGUISpinBox [pure virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUISpinBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUISpinBox [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDecimalPlaces(s32 places)=0irr::gui::IGUISpinBox [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRange(f32 min, f32 max)=0irr::gui::IGUISpinBox [pure virtual]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setStepSize(f32 step=1.f)=0irr::gui::IGUISpinBox [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setValue(f32 val)=0irr::gui::IGUISpinBox [pure virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.html new file mode 100644 index 0000000..65c422c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.html @@ -0,0 +1,416 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUISpinBox Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUISpinBox Class Reference
+
+
+ +

Single line edit box + spin buttons. + More...

+ +

#include <IGUISpinBox.h>

+
+ + Inheritance diagram for irr::gui::IGUISpinBox:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Single line edit box + spin buttons.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_SPINBOX_CHANGED
  • +
+
+ +

Definition at line 20 of file IGUISpinBox.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUISpinBox::IGUISpinBox (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 25 of file IGUISpinBox.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual IGUIEditBox* irr::gui::IGUISpinBox::getEditBox () const [pure virtual]
+
+
+ +

Access the edit box used in the spin control.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::gui::IGUISpinBox::getMax () const [pure virtual]
+
+
+ +

get the maximum value which can be used in the spinbox

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::gui::IGUISpinBox::getMin () const [pure virtual]
+
+
+ +

get the minimum value which can be used in the spinbox

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::gui::IGUISpinBox::getStepSize () const [pure virtual]
+
+
+ +

get the current step size

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::gui::IGUISpinBox::getValue () const [pure virtual]
+
+
+ +

Get the current value of the spinbox.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUISpinBox::setDecimalPlaces (s32 places) [pure virtual]
+
+
+

Sets the number of decimal places to display. Note that this also rounds the range to the same number of decimal places.

+
Parameters:
+ + +
places,:The number of decimal places to display, use -1 to reset
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISpinBox::setRange (f32 min,
f32 max 
) [pure virtual]
+
+
+ +

set the range of values which can be used in the spinbox

+
Parameters:
+ + + +
min,:minimum value
max,:maximum value
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUISpinBox::setStepSize (f32 step = 1.f) [pure virtual]
+
+
+ +

Step size by which values are changed when pressing the spinbuttons.

+

The step size also determines the number of decimal places to display

+
Parameters:
+ + +
step,:stepsize used for value changes when pressing spinbuttons
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUISpinBox::setValue (f32 val) [pure virtual]
+
+
+ +

set the current value of the spinbox

+
Parameters:
+ + +
val,:value to be set in the spinbox
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.png new file mode 100644 index 0000000..0031d06 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_spin_box.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank-members.html new file mode 100644 index 0000000..b588b2b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank-members.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUISpriteBank Member List
+
+
+This is the complete list of members for irr::gui::IGUISpriteBank, including all inherited members. + + + + + + + + + + + + + + + + + +
addTexture(video::ITexture *texture)=0irr::gui::IGUISpriteBank [pure virtual]
addTextureAsSprite(video::ITexture *texture)=0irr::gui::IGUISpriteBank [pure virtual]
clear()=0irr::gui::IGUISpriteBank [pure virtual]
draw2DSprite(u32 index, const core::position2di &pos, const core::rect< s32 > *clip=0, const video::SColor &color=video::SColor(255, 255, 255, 255), u32 starttime=0, u32 currenttime=0, bool loop=true, bool center=false)=0irr::gui::IGUISpriteBank [pure virtual]
draw2DSpriteBatch(const core::array< u32 > &indices, const core::array< core::position2di > &pos, const core::rect< s32 > *clip=0, const video::SColor &color=video::SColor(255, 255, 255, 255), u32 starttime=0, u32 currenttime=0, bool loop=true, bool center=false)=0irr::gui::IGUISpriteBank [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getPositions()=0irr::gui::IGUISpriteBank [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSprites()=0irr::gui::IGUISpriteBank [pure virtual]
getTexture(u32 index) const =0irr::gui::IGUISpriteBank [pure virtual]
getTextureCount() const =0irr::gui::IGUISpriteBank [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setTexture(u32 index, video::ITexture *texture)=0irr::gui::IGUISpriteBank [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html new file mode 100644 index 0000000..02aa759 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html @@ -0,0 +1,453 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUISpriteBank Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUISpriteBank Class Reference
+
+
+ +

Sprite bank interface. + More...

+ +

#include <IGUISpriteBank.h>

+
+ + Inheritance diagram for irr::gui::IGUISpriteBank:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Sprite bank interface.

+

See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank for more information how to use the spritebank.

+ +

Definition at line 45 of file IGUISpriteBank.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUISpriteBank::addTexture (video::ITexturetexture) [pure virtual]
+
+
+ +

Adds a texture to the sprite bank.

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::gui::IGUISpriteBank::addTextureAsSprite (video::ITexturetexture) [pure virtual]
+
+
+

Add the texture and use it for a single non-animated sprite. The texture and the corresponding rectangle and sprite will all be added to the end of each array. returns the index of the sprite or -1 on failure

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUISpriteBank::clear () [pure virtual]
+
+
+ +

clears sprites, rectangles and textures

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISpriteBank::draw2DSprite (u32 index,
const core::position2dipos,
const core::rect< s32 > * clip = 0,
const video::SColorcolor = video::SColor(255, 255, 255, 255),
u32 starttime = 0,
u32 currenttime = 0,
bool loop = true,
bool center = false 
) [pure virtual]
+
+
+ +

Draws a sprite in 2d with position and color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISpriteBank::draw2DSpriteBatch (const core::array< u32 > & indices,
const core::array< core::position2di > & pos,
const core::rect< s32 > * clip = 0,
const video::SColorcolor = video::SColor(255, 255, 255, 255),
u32 starttime = 0,
u32 currenttime = 0,
bool loop = true,
bool center = false 
) [pure virtual]
+
+
+ +

Draws a sprite batch in 2d using an array of positions and a color.

+ +
+
+ +
+
+ + + + + + + +
virtual core::array< core::rect<s32> >& irr::gui::IGUISpriteBank::getPositions () [pure virtual]
+
+
+ +

Returns the list of rectangles held by the sprite bank.

+ +
+
+ +
+
+ + + + + + + +
virtual core::array< SGUISprite >& irr::gui::IGUISpriteBank::getSprites () [pure virtual]
+
+
+ +

Returns the array of animated sprites within the sprite bank.

+ +
+
+ +
+
+ + + + + + + + +
virtual video::ITexture* irr::gui::IGUISpriteBank::getTexture (u32 index) const [pure virtual]
+
+
+ +

Gets the texture with the specified index.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUISpriteBank::getTextureCount () const [pure virtual]
+
+
+ +

Returns the number of textures held by the sprite bank.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUISpriteBank::setTexture (u32 index,
video::ITexturetexture 
) [pure virtual]
+
+
+ +

Changes one of the textures in the sprite bank.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.png new file mode 100644 index 0000000..65d8418 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_sprite_bank.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text-members.html new file mode 100644 index 0000000..a4d976d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text-members.html @@ -0,0 +1,237 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIStaticText Member List
+
+
+This is the complete list of members for irr::gui::IGUIStaticText, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
enableOverrideColor(bool enable)=0irr::gui::IGUIStaticText [pure virtual]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getActiveFont() const =0irr::gui::IGUIStaticText [pure virtual]
getBackgroundColor() const =0irr::gui::IGUIStaticText [pure virtual]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getOverrideColor(void) const =0irr::gui::IGUIStaticText [pure virtual]
getOverrideFont(void) const =0irr::gui::IGUIStaticText [pure virtual]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getTextHeight() const =0irr::gui::IGUIStaticText [pure virtual]
getTextWidth(void) const =0irr::gui::IGUIStaticText [pure virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIStaticText(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIStaticText [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isDrawBackgroundEnabled() const =0irr::gui::IGUIStaticText [pure virtual]
isDrawBorderEnabled() const =0irr::gui::IGUIStaticText [pure virtual]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isOverrideColorEnabled(void) const =0irr::gui::IGUIStaticText [pure virtual]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isRightToLeft() const =0irr::gui::IGUIStaticText [pure virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isTextRestrainedInside() const =0irr::gui::IGUIStaticText [pure virtual]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
isWordWrapEnabled(void) const =0irr::gui::IGUIStaticText [pure virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setBackgroundColor(video::SColor color)=0irr::gui::IGUIStaticText [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDrawBackground(bool draw)=0irr::gui::IGUIStaticText [pure virtual]
setDrawBorder(bool draw)=0irr::gui::IGUIStaticText [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setOverrideColor(video::SColor color)=0irr::gui::IGUIStaticText [pure virtual]
setOverrideFont(IGUIFont *font=0)=0irr::gui::IGUIStaticText [pure virtual]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setRightToLeft(bool rtl)=0irr::gui::IGUIStaticText [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0irr::gui::IGUIStaticText [pure virtual]
setTextRestrainedInside(bool restrainedInside)=0irr::gui::IGUIStaticText [pure virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
setWordWrap(bool enable)=0irr::gui::IGUIStaticText [pure virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.html new file mode 100644 index 0000000..801d5dc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.html @@ -0,0 +1,691 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIStaticText Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIStaticText Class Reference
+
+
+ +

Multi or single line text label. + More...

+ +

#include <IGUIStaticText.h>

+
+ + Inheritance diagram for irr::gui::IGUIStaticText:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Multi or single line text label.

+ +

Definition at line 18 of file IGUIStaticText.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIStaticText::IGUIStaticText (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 23 of file IGUIStaticText.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::enableOverrideColor (bool enable) [pure virtual]
+
+
+ +

Sets if the static text should use the overide color or the color in the gui skin.

+
Parameters:
+ + +
enable,:If set to true, the override color, which can be set with IGUIStaticText::setOverrideColor is used, otherwise the EGDC_BUTTON_TEXT color of the skin.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual IGUIFont* irr::gui::IGUIStaticText::getActiveFont () const [pure virtual]
+
+
+ +

Get the font which is used right now for drawing.

+

Currently this is the override font when one is set and the font of the active skin otherwise

+ +
+
+ +
+
+ + + + + + + +
virtual video::SColor irr::gui::IGUIStaticText::getBackgroundColor () const [pure virtual]
+
+
+ +

Gets the background color.

+
Returns:
: The background color
+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColor irr::gui::IGUIStaticText::getOverrideColor (void ) const [pure virtual]
+
+
+ +

Gets the override color.

+
Returns:
: The override color
+ +
+
+ +
+
+ + + + + + + + +
virtual IGUIFont* irr::gui::IGUIStaticText::getOverrideFont (void ) const [pure virtual]
+
+
+ +

Gets the override font (if any)

+
Returns:
The override font (may be 0)
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUIStaticText::getTextHeight () const [pure virtual]
+
+
+ +

Returns the height of the text in pixels when it is drawn.

+

This is useful for adjusting the layout of gui elements based on the height of the multiline text in this element.

+
Returns:
Height of text in pixels.
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::gui::IGUIStaticText::getTextWidth (void ) const [pure virtual]
+
+
+ +

Returns the width of the current text, in the current font.

+

If the text is broken, this returns the width of the widest line

+
Returns:
The width of the text, or the widest broken line.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIStaticText::isDrawBackgroundEnabled () const [pure virtual]
+
+
+ +

Checks if background drawing is enabled.

+
Returns:
true if background drawing is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIStaticText::isDrawBorderEnabled () const [pure virtual]
+
+
+ +

Checks if border drawing is enabled.

+
Returns:
true if border drawing is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIStaticText::isOverrideColorEnabled (void ) const [pure virtual]
+
+
+ +

Checks if an override color is enabled.

+
Returns:
true if the override color is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIStaticText::isRightToLeft () const [pure virtual]
+
+
+ +

Checks whether the text in this element should be interpreted as right-to-left.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIStaticText::isTextRestrainedInside () const [pure virtual]
+
+
+ +

Checks if the text in this label should be clipped if it goes outside bounds.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUIStaticText::isWordWrapEnabled (void ) const [pure virtual]
+
+
+ +

Checks if word wrap is enabled.

+
Returns:
true if word wrap is enabled, false otherwise
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setBackgroundColor (video::SColor color) [pure virtual]
+
+
+ +

Sets another color for the background.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setDrawBackground (bool draw) [pure virtual]
+
+
+ +

Sets whether to draw the background.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setDrawBorder (bool draw) [pure virtual]
+
+
+ +

Sets whether to draw the border.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setOverrideColor (video::SColor color) [pure virtual]
+
+
+ +

Sets another color for the text.

+

If set, the static text does not use the EGDC_BUTTON_TEXT color defined in the skin, but the set color instead. You don't need to call IGUIStaticText::enableOverrrideColor(true) after this, this is done by this function. If you set a color, and you want the text displayed with the color of the skin again, call IGUIStaticText::enableOverrideColor(false);

+
Parameters:
+ + +
color,:New color of the text.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setOverrideFont (IGUIFontfont = 0) [pure virtual]
+
+
+ +

Sets another skin independent font.

+

If this is set to zero, the button uses the font of the skin.

+
Parameters:
+ + +
font,:New font to set.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setRightToLeft (bool rtl) [pure virtual]
+
+
+ +

Set whether the string should be interpreted as right-to-left (RTL) text.

+
Note:
This component does not implement the Unicode bidi standard, the text of the component should be already RTL if you call this. The main difference when RTL is enabled is that the linebreaks for multiline elements are performed starting from the end.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUIStaticText::setTextAlignment (EGUI_ALIGNMENT horizontal,
EGUI_ALIGNMENT vertical 
) [pure virtual]
+
+
+ +

Sets text justification mode.

+
Parameters:
+ + + +
horizontal,:EGUIA_UPPERLEFT for left justified (default), EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
vertical,:EGUIA_UPPERLEFT to align with top edge, EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default).
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setTextRestrainedInside (bool restrainedInside) [pure virtual]
+
+
+ +

Set whether the text in this label should be clipped if it goes outside bounds.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIStaticText::setWordWrap (bool enable) [pure virtual]
+
+
+ +

Enables or disables word wrap for using the static text as multiline text control.

+
Parameters:
+ + +
enable,:If set to true, words going over one line are broken on to the next line.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.png new file mode 100644 index 0000000..6246012 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_static_text.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab-members.html new file mode 100644 index 0000000..4325e26 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab-members.html @@ -0,0 +1,222 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUITab Member List
+
+
+This is the complete list of members for irr::gui::IGUITab, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getBackgroundColor() const =0irr::gui::IGUITab [pure virtual]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getNumber() const =0irr::gui::IGUITab [pure virtual]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getTextColor() const =0irr::gui::IGUITab [pure virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUITab(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUITab [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isDrawingBackground() const =0irr::gui::IGUITab [pure virtual]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setBackgroundColor(video::SColor c)=0irr::gui::IGUITab [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDrawBackground(bool draw=true)=0irr::gui::IGUITab [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setTextColor(video::SColor c)=0irr::gui::IGUITab [pure virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.html new file mode 100644 index 0000000..e547a0e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.html @@ -0,0 +1,340 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUITab Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUITab Class Reference
+
+
+ +

A tab-page, onto which other gui elements could be added. + More...

+ +

#include <IGUITabControl.h>

+
+ + Inheritance diagram for irr::gui::IGUITab:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A tab-page, onto which other gui elements could be added.

+

IGUITab refers to the page itself, not to the tab in the tabbar of an IGUITabControl.

+ +

Definition at line 18 of file IGUITabControl.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUITab::IGUITab (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 23 of file IGUITabControl.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual video::SColor irr::gui::IGUITab::getBackgroundColor () const [pure virtual]
+
+
+ +

returns the color of the background

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITab::getNumber () const [pure virtual]
+
+
+ +

Returns zero based index of tab if in tabcontrol.

+

Can be accessed later IGUITabControl::getTab() by this number. Note that this number can change when other tabs are inserted or removed .

+ +
+
+ +
+
+ + + + + + + +
virtual video::SColor irr::gui::IGUITab::getTextColor () const [pure virtual]
+
+
+ +

gets the color of the text

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITab::isDrawingBackground () const [pure virtual]
+
+
+ +

returns true if the tab is drawing its background, false if not

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITab::setBackgroundColor (video::SColor c) [pure virtual]
+
+
+ +

sets the color of the background, if it should be drawn.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITab::setDrawBackground (bool draw = true) [pure virtual]
+
+
+ +

sets if the tab should draw its background

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITab::setTextColor (video::SColor c) [pure virtual]
+
+
+ +

sets the color of the text

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.png new file mode 100644 index 0000000..c9fe51d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control-members.html new file mode 100644 index 0000000..c8a9af7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control-members.html @@ -0,0 +1,233 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUITabControl Member List
+
+
+This is the complete list of members for irr::gui::IGUITabControl, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
addTab(const wchar_t *caption, s32 id=-1)=0irr::gui::IGUITabControl [pure virtual]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
clear()=0irr::gui::IGUITabControl [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getActiveTab() const =0irr::gui::IGUITabControl [pure virtual]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTab(s32 idx) const =0irr::gui::IGUITabControl [pure virtual]
getTabAt(s32 xpos, s32 ypos) const =0irr::gui::IGUITabControl [pure virtual]
getTabCount() const =0irr::gui::IGUITabControl [pure virtual]
getTabExtraWidth() const =0irr::gui::IGUITabControl [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabHeight() const =0irr::gui::IGUITabControl [pure virtual]
getTabMaxWidth() const =0irr::gui::IGUITabControl [pure virtual]
getTabOrder() const irr::gui::IGUIElement [inline]
getTabVerticalAlignment() const =0irr::gui::IGUITabControl [pure virtual]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUITabControl(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUITabControl [inline]
insertTab(s32 idx, const wchar_t *caption, s32 id=-1)=0irr::gui::IGUITabControl [pure virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
IsVisibleirr::gui::IGUIElement [protected]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
removeTab(s32 idx)=0irr::gui::IGUITabControl [pure virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setActiveTab(s32 idx)=0irr::gui::IGUITabControl [pure virtual]
setActiveTab(IGUITab *tab)=0irr::gui::IGUITabControl [pure virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabExtraWidth(s32 extraWidth)=0irr::gui::IGUITabControl [pure virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabHeight(s32 height)=0irr::gui::IGUITabControl [pure virtual]
setTabMaxWidth(s32 width)=0irr::gui::IGUITabControl [pure virtual]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setTabVerticalAlignment(gui::EGUI_ALIGNMENT alignment)=0irr::gui::IGUITabControl [pure virtual]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.html new file mode 100644 index 0000000..3681d66 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.html @@ -0,0 +1,622 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUITabControl Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUITabControl Class Reference
+
+
+ +

A standard tab control. + More...

+ +

#include <IGUITabControl.h>

+
+ + Inheritance diagram for irr::gui::IGUITabControl:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A standard tab control.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_TAB_CHANGED
  • +
+
+ +

Definition at line 55 of file IGUITabControl.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUITabControl::IGUITabControl (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 60 of file IGUITabControl.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IGUITab* irr::gui::IGUITabControl::addTab (const wchar_t * caption,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a tab.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUITabControl::clear () [pure virtual]
+
+
+ +

Clears the tabcontrol removing all tabs.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITabControl::getActiveTab () const [pure virtual]
+
+
+ +

Returns which tab is currently active.

+ +
+
+ +
+
+ + + + + + + + +
virtual IGUITab* irr::gui::IGUITabControl::getTab (s32 idx) const [pure virtual]
+
+
+ +

Returns a tab based on zero based index.

+
Parameters:
+ + +
idx,:zero based index of tab. Is a value betwenn 0 and getTabcount()-1;
+
+
+
Returns:
Returns pointer to the Tab. Returns 0 if no tab is corresponding to this tab.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::gui::IGUITabControl::getTabAt (s32 xpos,
s32 ypos 
) const [pure virtual]
+
+
+ +

get the the id of the tab at the given absolute coordinates

+
Returns:
The id of the tab or -1 when no tab is at those coordinates
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITabControl::getTabCount () const [pure virtual]
+
+
+ +

Returns amount of tabs in the tabcontrol.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITabControl::getTabExtraWidth () const [pure virtual]
+
+
+ +

Get the extra width added to tabs on each side of the text.

+

return Returns the extra width of the tabs

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITabControl::getTabHeight () const [pure virtual]
+
+
+ +

Get the height of the tabs.

+

return Returns the height of the tabs

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITabControl::getTabMaxWidth () const [pure virtual]
+
+
+ +

get the maximal width of a tab

+ +
+
+ +
+
+ + + + + + + +
virtual gui::EGUI_ALIGNMENT irr::gui::IGUITabControl::getTabVerticalAlignment () const [pure virtual]
+
+
+ +

Get the alignment of the tabs.

+

return Returns the alignment of the tabs

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITab* irr::gui::IGUITabControl::insertTab (s32 idx,
const wchar_t * caption,
s32 id = -1 
) [pure virtual]
+
+
+ +

Insert the tab at the given index.

+
Returns:
The tab on success or NULL on failure.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITabControl::removeTab (s32 idx) [pure virtual]
+
+
+ +

Removes a tab from the tabcontrol.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUITabControl::setActiveTab (s32 idx) [pure virtual]
+
+
+ +

Brings a tab to front.

+
Parameters:
+ + +
idx,:number of the tab.
+
+
+
Returns:
Returns true if successful.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUITabControl::setActiveTab (IGUITabtab) [pure virtual]
+
+
+ +

Brings a tab to front.

+
Parameters:
+ + +
tab,:pointer to the tab.
+
+
+
Returns:
Returns true if successful.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITabControl::setTabExtraWidth (s32 extraWidth) [pure virtual]
+
+
+ +

Set the extra width added to tabs on each side of the text.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITabControl::setTabHeight (s32 height) [pure virtual]
+
+
+ +

Set the height of the tabs.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITabControl::setTabMaxWidth (s32 width) [pure virtual]
+
+
+ +

set the maximal width of a tab. Per default width is 0 which means "no width restriction".

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITabControl::setTabVerticalAlignment (gui::EGUI_ALIGNMENT alignment) [pure virtual]
+
+
+ +

Set the alignment of the tabs.

+

Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.png new file mode 100644 index 0000000..81903bd Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tab_control.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table-members.html new file mode 100644 index 0000000..48e95a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table-members.html @@ -0,0 +1,243 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUITable Member List
+
+
+This is the complete list of members for irr::gui::IGUITable, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
addColumn(const wchar_t *caption, s32 columnIndex=-1)=0irr::gui::IGUITable [pure virtual]
addRow(u32 rowIndex)=0irr::gui::IGUITable [pure virtual]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
clear()=0irr::gui::IGUITable [pure virtual]
clearRows()=0irr::gui::IGUITable [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getActiveColumn() const =0irr::gui::IGUITable [pure virtual]
getActiveColumnOrdering() const =0irr::gui::IGUITable [pure virtual]
getCellData(u32 rowIndex, u32 columnIndex) const =0irr::gui::IGUITable [pure virtual]
getCellText(u32 rowIndex, u32 columnIndex) const =0irr::gui::IGUITable [pure virtual]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getColumnCount() const =0irr::gui::IGUITable [pure virtual]
getColumnWidth(u32 columnIndex) const =0irr::gui::IGUITable [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDrawFlags() const =0irr::gui::IGUITable [pure virtual]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getRowCount() const =0irr::gui::IGUITable [pure virtual]
getSelected() const =0irr::gui::IGUITable [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasResizableColumns() const =0irr::gui::IGUITable [pure virtual]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUITable(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUITable [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE)=0irr::gui::IGUITable [pure virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
removeColumn(u32 columnIndex)=0irr::gui::IGUITable [pure virtual]
removeRow(u32 rowIndex)=0irr::gui::IGUITable [pure virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setActiveColumn(s32 idx, bool doOrder=false)=0irr::gui::IGUITable [pure virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color)=0irr::gui::IGUITable [pure virtual]
setCellData(u32 rowIndex, u32 columnIndex, void *data)=0irr::gui::IGUITable [pure virtual]
setCellText(u32 rowIndex, u32 columnIndex, const core::stringw &text)=0irr::gui::IGUITable [pure virtual]
setCellText(u32 rowIndex, u32 columnIndex, const core::stringw &text, video::SColor color)=0irr::gui::IGUITable [pure virtual]
setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode)=0irr::gui::IGUITable [pure virtual]
setColumnWidth(u32 columnIndex, u32 width)=0irr::gui::IGUITable [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDrawFlags(s32 flags)=0irr::gui::IGUITable [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setResizableColumns(bool resizable)=0irr::gui::IGUITable [pure virtual]
setSelected(s32 index)=0irr::gui::IGUITable [pure virtual]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
swapRows(u32 rowIndexA, u32 rowIndexB)=0irr::gui::IGUITable [pure virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.html new file mode 100644 index 0000000..008add1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.html @@ -0,0 +1,940 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUITable Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUITable Class Reference
+
+
+ +

Default list box GUI element. + More...

+ +

#include <IGUITable.h>

+
+ + Inheritance diagram for irr::gui::IGUITable:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Default list box GUI element.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_TABLE_CHANGED
  • +
  • EGET_TABLE_SELECTED_AGAIN
  • +
  • EGET_TABLE_HEADER_CHANGED
  • +
+
+ +

Definition at line 89 of file IGUITable.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUITable::IGUITable (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 93 of file IGUITable.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::addColumn (const wchar_t * caption,
s32 columnIndex = -1 
) [pure virtual]
+
+
+ +

Adds a column.

+

If columnIndex is outside the current range, do push new colum at the end

+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::gui::IGUITable::addRow (u32 rowIndex) [pure virtual]
+
+
+ +

adds a row to the table

+
Parameters:
+ + +
rowIndexZero based index of rows. The row will be inserted at this position, if a row already exist there, it will be placed after it. If the row is larger than the actual number of row by more than one, it won't be created. Note that if you create a row that's not at the end, there might be performance issues.
+
+
+
Returns:
index of inserted row.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUITable::clear () [pure virtual]
+
+
+ +

clears the table, deletes all items in the table

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUITable::clearRows () [pure virtual]
+
+
+ +

clears the table rows, but keeps the columns intact

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITable::getActiveColumn () const [pure virtual]
+
+
+ +

Returns which header is currently active.

+ +
+
+ +
+
+ + + + + + + +
virtual EGUI_ORDERING_MODE irr::gui::IGUITable::getActiveColumnOrdering () const [pure virtual]
+
+
+ +

Returns the ordering used by the currently active column.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void* irr::gui::IGUITable::getCellData (u32 rowIndex,
u32 columnIndex 
) const [pure virtual]
+
+
+ +

Get the data of a cell.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual const wchar_t* irr::gui::IGUITable::getCellText (u32 rowIndex,
u32 columnIndex 
) const [pure virtual]
+
+
+ +

Get the text of a cell.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITable::getColumnCount () const [pure virtual]
+
+
+ +

Returns the number of columns in the table control.

+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::gui::IGUITable::getColumnWidth (u32 columnIndex) const [pure virtual]
+
+
+ +

Get the width of a column.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITable::getDrawFlags () const [pure virtual]
+
+
+ +

Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITable::getRowCount () const [pure virtual]
+
+
+ +

Get amount of rows in the tabcontrol.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITable::getSelected () const [pure virtual]
+
+
+ +

Returns which row is currently selected.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITable::hasResizableColumns () const [pure virtual]
+
+
+ +

can columns be resized by dran 'n drop?

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::orderRows (s32 columnIndex = -1,
EGUI_ORDERING_MODE mode = EGOM_NONE 
) [pure virtual]
+
+
+ +

This tells the table to start ordering all the rows.

+

You need to explicitly tell the table to re order the rows when a new row is added or the cells data is changed. This makes the system more flexible and doesn't make you pay the cost of ordering when adding a lot of rows.

+
Parameters:
+ + + +
columnIndex,:When set to -1 the active column is used.
modeOrdering mode of the rows.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITable::removeColumn (u32 columnIndex) [pure virtual]
+
+
+ +

remove a column from the table

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITable::removeRow (u32 rowIndex) [pure virtual]
+
+
+ +

Remove a row from the table.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::gui::IGUITable::setActiveColumn (s32 idx,
bool doOrder = false 
) [pure virtual]
+
+
+ +

Makes a column active. This will trigger an ordering process.

+
Parameters:
+ + + +
idx,:The id of the column to make active.
doOrder,:Do also the ordering which depending on mode for active column
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::setCellColor (u32 rowIndex,
u32 columnIndex,
video::SColor color 
) [pure virtual]
+
+
+ +

Set the color of a cell text.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::setCellData (u32 rowIndex,
u32 columnIndex,
void * data 
) [pure virtual]
+
+
+ +

Set the data of a cell.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::setCellText (u32 rowIndex,
u32 columnIndex,
const core::stringwtext 
) [pure virtual]
+
+
+ +

Set the text of a cell.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::setCellText (u32 rowIndex,
u32 columnIndex,
const core::stringwtext,
video::SColor color 
) [pure virtual]
+
+
+ +

Set the text of a cell, and set a color of this cell.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::setColumnOrdering (u32 columnIndex,
EGUI_COLUMN_ORDERING mode 
) [pure virtual]
+
+
+ +

This tells the table control which ordering mode should be used when a column header is clicked.

+
Parameters:
+ + + +
columnIndexThe index of the column header.
mode,:One of the modes defined in EGUI_COLUMN_ORDERING
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::setColumnWidth (u32 columnIndex,
u32 width 
) [pure virtual]
+
+
+ +

Set the width of a column.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITable::setDrawFlags (s32 flags) [pure virtual]
+
+
+ +

Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITable::setResizableColumns (bool resizable) [pure virtual]
+
+
+ +

columns can be resized by drag 'n drop

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITable::setSelected (s32 index) [pure virtual]
+
+
+ +

set wich row is currently selected

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::gui::IGUITable::swapRows (u32 rowIndexA,
u32 rowIndexB 
) [pure virtual]
+
+
+ +

Swap two row positions.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.png new file mode 100644 index 0000000..1cb412e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_table.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar-members.html new file mode 100644 index 0000000..453bb51 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar-members.html @@ -0,0 +1,216 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIToolBar Member List
+
+
+This is the complete list of members for irr::gui::IGUIToolBar, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addButton(s32 id=-1, const wchar_t *text=0, const wchar_t *tooltiptext=0, video::ITexture *img=0, video::ITexture *pressedimg=0, bool isPushButton=false, bool useAlphaChannel=false)=0irr::gui::IGUIToolBar [pure virtual]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIToolBar(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIToolBar [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
IsEnabledirr::gui::IGUIElement [protected]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
IsTabGroupirr::gui::IGUIElement [protected]
IsTabStopirr::gui::IGUIElement [protected]
isTabStop() const irr::gui::IGUIElement [inline]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.html new file mode 100644 index 0000000..a8ec424 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.html @@ -0,0 +1,262 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIToolBar Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIToolBar Class Reference
+
+
+ +

Stays at the top of its parent like the menu bar and contains tool buttons. + More...

+ +

#include <IGUIToolbar.h>

+
+ + Inheritance diagram for irr::gui::IGUIToolBar:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Stays at the top of its parent like the menu bar and contains tool buttons.

+ +

Definition at line 21 of file IGUIToolbar.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIToolBar::IGUIToolBar (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 26 of file IGUIToolbar.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUIButton* irr::gui::IGUIToolBar::addButton (s32 id = -1,
const wchar_t * text = 0,
const wchar_t * tooltiptext = 0,
video::ITextureimg = 0,
video::ITexturepressedimg = 0,
bool isPushButton = false,
bool useAlphaChannel = false 
) [pure virtual]
+
+
+ +

Adds a button to the tool bar.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.png new file mode 100644 index 0000000..48358fc Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tool_bar.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view-members.html new file mode 100644 index 0000000..9210b9d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view-members.html @@ -0,0 +1,225 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUITreeView Member List
+
+
+This is the complete list of members for irr::gui::IGUITreeView, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getImageLeftOfIcon() const =0irr::gui::IGUITreeView [pure virtual]
getImageList() const =0irr::gui::IGUITreeView [pure virtual]
getLastEventNode() const =0irr::gui::IGUITreeView [pure virtual]
getLinesVisible() const =0irr::gui::IGUITreeView [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getRoot() const =0irr::gui::IGUITreeView [pure virtual]
getSelected() const =0irr::gui::IGUITreeView [pure virtual]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUITreeView(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUITreeView [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setIconFont(IGUIFont *font)=0irr::gui::IGUITreeView [pure virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setImageLeftOfIcon(bool bLeftOf)=0irr::gui::IGUITreeView [pure virtual]
setImageList(IGUIImageList *imageList)=0irr::gui::IGUITreeView [pure virtual]
setLinesVisible(bool visible)=0irr::gui::IGUITreeView [pure virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.html new file mode 100644 index 0000000..365dcbc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.html @@ -0,0 +1,406 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUITreeView Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUITreeView Class Reference
+
+
+ +

Default tree view GUI element. + More...

+ +

#include <IGUITreeView.h>

+
+ + Inheritance diagram for irr::gui::IGUITreeView:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Default tree view GUI element.

+

Displays a windows like tree buttons to expand/collaps the child nodes of an node and optional tree lines. Each node consits of an text, an icon text and a void pointer for user data.

+ +

Definition at line 225 of file IGUITreeView.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUITreeView::IGUITreeView (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 229 of file IGUITreeView.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeView::getImageLeftOfIcon () const [pure virtual]
+
+
+ +

Returns if the Image is left of the icon. Default is true.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUIImageList* irr::gui::IGUITreeView::getImageList () const [pure virtual]
+
+
+ +

Returns the image list which is used for the nodes.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeView::getLastEventNode () const [pure virtual]
+
+
+ +

Returns the node which is associated to the last event.

+

This pointer is only valid inside the OnEvent call!

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeView::getLinesVisible () const [pure virtual]
+
+
+ +

returns true if the tree lines are visible

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeView::getRoot () const [pure virtual]
+
+
+ +

returns the root node (not visible) from the tree.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeView::getSelected () const [pure virtual]
+
+
+ +

returns the selected node of the tree or 0 if none is selected

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeView::setIconFont (IGUIFontfont) [pure virtual]
+
+
+ +

Sets the font which should be used as icon font.

+

This font is set to the Irrlicht engine built-in-font by default. Icons can be displayed in front of every list item. An icon is a string, displayed with the icon font. When using the build-in-font of the Irrlicht engine as icon font, the icon strings defined in GUIIcons.h can be used.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeView::setImageLeftOfIcon (bool bLeftOf) [pure virtual]
+
+
+ +

Sets if the image is left of the icon. Default is true.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeView::setImageList (IGUIImageListimageList) [pure virtual]
+
+
+ +

Sets the image list which should be used for the image and selected image of every node.

+

The default is 0 (no images).

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeView::setLinesVisible (bool visible) [pure virtual]
+
+
+ +

sets if the tree lines are visible

+
Parameters:
+ + +
visibletrue for visible, false for invisible
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.png new file mode 100644 index 0000000..3e4c408 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node-members.html new file mode 100644 index 0000000..a25f04d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node-members.html @@ -0,0 +1,165 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUITreeViewNode Member List
+
+
+This is the complete list of members for irr::gui::IGUITreeViewNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addChildBack(const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0irr::gui::IGUITreeViewNode [pure virtual]
addChildFront(const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0irr::gui::IGUITreeViewNode [pure virtual]
clearChildren()=0irr::gui::IGUITreeViewNode [pure virtual]
clearChilds()irr::gui::IGUITreeViewNode [inline]
deleteChild(IGUITreeViewNode *child)=0irr::gui::IGUITreeViewNode [pure virtual]
drop() const irr::IReferenceCounted [inline]
getChildCount() const =0irr::gui::IGUITreeViewNode [pure virtual]
getData() const =0irr::gui::IGUITreeViewNode [pure virtual]
getData2() const =0irr::gui::IGUITreeViewNode [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getExpanded() const =0irr::gui::IGUITreeViewNode [pure virtual]
getFirstChild() const =0irr::gui::IGUITreeViewNode [pure virtual]
getIcon() const =0irr::gui::IGUITreeViewNode [pure virtual]
getImageIndex() const =0irr::gui::IGUITreeViewNode [pure virtual]
getLastChild() const =0irr::gui::IGUITreeViewNode [pure virtual]
getLevel() const =0irr::gui::IGUITreeViewNode [pure virtual]
getNextSibling() const =0irr::gui::IGUITreeViewNode [pure virtual]
getNextVisible() const =0irr::gui::IGUITreeViewNode [pure virtual]
getOwner() const =0irr::gui::IGUITreeViewNode [pure virtual]
getParent() const =0irr::gui::IGUITreeViewNode [pure virtual]
getPrevSibling() const =0irr::gui::IGUITreeViewNode [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSelected() const =0irr::gui::IGUITreeViewNode [pure virtual]
getSelectedImageIndex() const =0irr::gui::IGUITreeViewNode [pure virtual]
getText() const =0irr::gui::IGUITreeViewNode [pure virtual]
grab() const irr::IReferenceCounted [inline]
hasChildren() const =0irr::gui::IGUITreeViewNode [pure virtual]
hasChilds() const irr::gui::IGUITreeViewNode [inline]
insertChildAfter(IGUITreeViewNode *other, const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0irr::gui::IGUITreeViewNode [pure virtual]
insertChildBefore(IGUITreeViewNode *other, const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0irr::gui::IGUITreeViewNode [pure virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isRoot() const =0irr::gui::IGUITreeViewNode [pure virtual]
isVisible() const =0irr::gui::IGUITreeViewNode [pure virtual]
moveChildDown(IGUITreeViewNode *child)=0irr::gui::IGUITreeViewNode [pure virtual]
moveChildUp(IGUITreeViewNode *child)=0irr::gui::IGUITreeViewNode [pure virtual]
setData(void *data)=0irr::gui::IGUITreeViewNode [pure virtual]
setData2(IReferenceCounted *data)=0irr::gui::IGUITreeViewNode [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setExpanded(bool expanded)=0irr::gui::IGUITreeViewNode [pure virtual]
setIcon(const wchar_t *icon)=0irr::gui::IGUITreeViewNode [pure virtual]
setImageIndex(u32 imageIndex)=0irr::gui::IGUITreeViewNode [pure virtual]
setSelected(bool selected)=0irr::gui::IGUITreeViewNode [pure virtual]
setSelectedImageIndex(u32 imageIndex)=0irr::gui::IGUITreeViewNode [pure virtual]
setText(const wchar_t *text)=0irr::gui::IGUITreeViewNode [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html new file mode 100644 index 0000000..9178f73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html @@ -0,0 +1,1122 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUITreeViewNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUITreeViewNode Class Reference
+
+
+ +

Node for gui tree view. + More...

+ +

#include <IGUITreeView.h>

+
+ + Inheritance diagram for irr::gui::IGUITreeViewNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Node for gui tree view.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_TREEVIEW_NODE_EXPAND
  • +
  • EGET_TREEVIEW_NODE_COLLAPS
  • +
  • EGET_TREEVIEW_NODE_DESELECT
  • +
  • EGET_TREEVIEW_NODE_SELECT
  • +
+
+ +

Definition at line 27 of file IGUITreeView.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::addChildBack (const wchar_t * text,
const wchar_t * icon = 0,
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void * data = 0,
IReferenceCounteddata2 = 0 
) [pure virtual]
+
+
+ +

Adds a new node behind the last child node.

+
Parameters:
+ + + + + + + +
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
+
+
+
Returns:
The new node
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::addChildFront (const wchar_t * text,
const wchar_t * icon = 0,
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void * data = 0,
IReferenceCounteddata2 = 0 
) [pure virtual]
+
+
+ +

Adds a new node before the first child node.

+
Parameters:
+ + + + + + + +
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
+
+
+
Returns:
The new node
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::gui::IGUITreeViewNode::clearChildren () [pure virtual]
+
+
+ +

removes all children (recursive) from this node

+ +

Referenced by clearChilds().

+ +
+
+ +
+
+ + + + + + + +
_IRR_DEPRECATED_ void irr::gui::IGUITreeViewNode::clearChilds () [inline]
+
+
+ +

removes all children (recursive) from this node

+
Deprecated:
Deprecated in 1.8, use clearChildren() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 82 of file IGUITreeView.h.

+ +

References clearChildren().

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::deleteChild (IGUITreeViewNodechild) [pure virtual]
+
+
+ +

Deletes a child node.

+
Returns:
Returns true if the node was found as a child and is deleted.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUITreeViewNode::getChildCount () const [pure virtual]
+
+
+ +

returns the child item count

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::gui::IGUITreeViewNode::getData () const [pure virtual]
+
+
+ +

returns the user data (void*) of this node

+ +
+
+ +
+
+ + + + + + + +
virtual IReferenceCounted* irr::gui::IGUITreeViewNode::getData2 () const [pure virtual]
+
+
+ +

returns the user data2 (IReferenceCounted) of this node

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::getExpanded () const [pure virtual]
+
+
+ +

Returns true if the node is expanded (children are visible).

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::getFirstChild () const [pure virtual]
+
+
+ +

Return the first child node from this node.

+
Returns:
The first child node or 0 if this node has no children.
+ +
+
+ +
+
+ + + + + + + +
virtual const wchar_t* irr::gui::IGUITreeViewNode::getIcon () const [pure virtual]
+
+
+ +

returns the icon text of the node

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUITreeViewNode::getImageIndex () const [pure virtual]
+
+
+ +

returns the image index of the node

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::getLastChild () const [pure virtual]
+
+
+ +

Return the last child node from this node.

+
Returns:
The last child node or 0 if this node has no children.
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::gui::IGUITreeViewNode::getLevel () const [pure virtual]
+
+
+ +

Returns the level of this node.

+

The root node has level 0. Direct children of the root has level 1 ...

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::getNextSibling () const [pure virtual]
+
+
+ +

Returns the next sibling node from this node.

+
Returns:
The next sibling node from this node or 0 if this is the last node from the parent node.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::getNextVisible () const [pure virtual]
+
+
+ +

Returns the next visible (expanded, may be out of scrolling) node from this node.

+
Returns:
The next visible node from this node or 0 if this is the last visible node.
+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeView* irr::gui::IGUITreeViewNode::getOwner () const [pure virtual]
+
+
+ +

returns the owner (tree view) of this node

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::getParent () const [pure virtual]
+
+
+ +

Returns the parent node of this node.

+

For the root node this will return 0.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::getPrevSibling () const [pure virtual]
+
+
+ +

Returns the previous sibling node from this node.

+
Returns:
The previous sibling node from this node or 0 if this is the first node from the parent node.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::getSelected () const [pure virtual]
+
+
+ +

Returns true if the node is currently selected.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::gui::IGUITreeViewNode::getSelectedImageIndex () const [pure virtual]
+
+
+ +

returns the image index of the node

+ +
+
+ +
+
+ + + + + + + +
virtual const wchar_t* irr::gui::IGUITreeViewNode::getText () const [pure virtual]
+
+
+ +

returns the text of the node

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::hasChildren () const [pure virtual]
+
+
+ +

returns true if this node has child nodes

+ +

Referenced by hasChilds().

+ +
+
+ +
+
+ + + + + + + +
_IRR_DEPRECATED_ bool irr::gui::IGUITreeViewNode::hasChilds () const [inline]
+
+
+ +

returns true if this node has child nodes

+
Deprecated:
Deprecated in 1.8, use hasChildren() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 93 of file IGUITreeView.h.

+ +

References hasChildren().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::insertChildAfter (IGUITreeViewNodeother,
const wchar_t * text,
const wchar_t * icon = 0,
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void * data = 0,
IReferenceCounteddata2 = 0 
) [pure virtual]
+
+
+ +

Adds a new node behind the other node.

+

The other node has also te be a child node from this node.

+
Parameters:
+ + + + + + + + +
otherNode to insert after
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
+
+
+
Returns:
The new node or 0 if other is no child node from this
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IGUITreeViewNode* irr::gui::IGUITreeViewNode::insertChildBefore (IGUITreeViewNodeother,
const wchar_t * text,
const wchar_t * icon = 0,
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void * data = 0,
IReferenceCounteddata2 = 0 
) [pure virtual]
+
+
+ +

Adds a new node before the other node.

+

The other node has also te be a child node from this node.

+
Parameters:
+ + + + + + + + +
otherNode to insert before
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
+
+
+
Returns:
The new node or 0 if other is no child node from this
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::isRoot () const [pure virtual]
+
+
+ +

Returns true if this node is the root node.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::isVisible () const [pure virtual]
+
+
+ +

Returns true if this node is visible (all parents are expanded).

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::moveChildDown (IGUITreeViewNodechild) [pure virtual]
+
+
+ +

Moves a child node one position down.

+
Returns:
True if the node was found as achild node and was not already the last child.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::gui::IGUITreeViewNode::moveChildUp (IGUITreeViewNodechild) [pure virtual]
+
+
+ +

Moves a child node one position up.

+
Returns:
True if the node was found as achild node and was not already the first child.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setData (void * data) [pure virtual]
+
+
+ +

sets the user data (void*) of this node

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setData2 (IReferenceCounteddata) [pure virtual]
+
+
+ +

sets the user data2 (IReferenceCounted) of this node

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setExpanded (bool expanded) [pure virtual]
+
+
+ +

Sets if the node is expanded.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setIcon (const wchar_t * icon) [pure virtual]
+
+
+ +

sets the icon text of the node

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setImageIndex (u32 imageIndex) [pure virtual]
+
+
+ +

sets the image index of the node

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setSelected (bool selected) [pure virtual]
+
+
+ +

Sets this node as selected.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setSelectedImageIndex (u32 imageIndex) [pure virtual]
+
+
+ +

sets the image index of the node

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUITreeViewNode::setText (const wchar_t * text) [pure virtual]
+
+
+ +

sets the text of the node

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.png new file mode 100644 index 0000000..ce72940 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_tree_view_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window-members.html new file mode 100644 index 0000000..aa41870 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window-members.html @@ -0,0 +1,225 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::IGUIWindow Member List
+
+
+This is the complete list of members for irr::gui::IGUIWindow, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteClippingRectirr::gui::IGUIElement [protected]
AbsoluteRectirr::gui::IGUIElement [protected]
addChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
addChildToEnd(IGUIElement *child)irr::gui::IGUIElement [inline, protected]
AlignBottomirr::gui::IGUIElement [protected]
AlignLeftirr::gui::IGUIElement [protected]
AlignRightirr::gui::IGUIElement [protected]
AlignTopirr::gui::IGUIElement [protected]
bringToFront(IGUIElement *element)irr::gui::IGUIElement [inline, virtual]
Childrenirr::gui::IGUIElement [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::gui::IGUIElement [inline, virtual]
DesiredRectirr::gui::IGUIElement [protected]
draw()irr::gui::IGUIElement [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Environmentirr::gui::IGUIElement [protected]
getAbsoluteClippingRect() const irr::gui::IGUIElement [inline]
getAbsolutePosition() const irr::gui::IGUIElement [inline]
getChildren() const irr::gui::IGUIElement [inline, virtual]
getClientRect() const =0irr::gui::IGUIWindow [pure virtual]
getCloseButton() const =0irr::gui::IGUIWindow [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDrawBackground() const =0irr::gui::IGUIWindow [pure virtual]
getDrawTitlebar() const =0irr::gui::IGUIWindow [pure virtual]
getElementFromId(s32 id, bool searchchildren=false) const irr::gui::IGUIElement [inline, virtual]
getElementFromPoint(const core::position2d< s32 > &point)irr::gui::IGUIElement [inline]
getID() const irr::gui::IGUIElement [inline, virtual]
getMaximizeButton() const =0irr::gui::IGUIWindow [pure virtual]
getMinimizeButton() const =0irr::gui::IGUIWindow [pure virtual]
getName() const irr::gui::IGUIElement [inline, virtual]
getNextElement(s32 startOrder, bool reverse, bool group, IGUIElement *&first, IGUIElement *&closest, bool includeInvisible=false) const irr::gui::IGUIElement [inline]
getParent() const irr::gui::IGUIElement [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativePosition() const irr::gui::IGUIElement [inline]
getTabGroup()irr::gui::IGUIElement [inline]
getTabOrder() const irr::gui::IGUIElement [inline]
getText() const irr::gui::IGUIElement [inline, virtual]
getToolTipText() const irr::gui::IGUIElement [inline, virtual]
getType() const irr::gui::IGUIElement [inline]
getTypeName() const irr::gui::IGUIElement [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasType(EGUI_ELEMENT_TYPE type) const irr::gui::IGUIElement [inline, virtual]
IDirr::gui::IGUIElement [protected]
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)irr::gui::IGUIElement [inline]
IGUIWindow(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)irr::gui::IGUIWindow [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isDraggable() const =0irr::gui::IGUIWindow [pure virtual]
isEnabled() const irr::gui::IGUIElement [inline, virtual]
IsEnabledirr::gui::IGUIElement [protected]
isMyChild(IGUIElement *child) const irr::gui::IGUIElement [inline]
isNotClipped() const irr::gui::IGUIElement [inline]
isPointInside(const core::position2d< s32 > &point) const irr::gui::IGUIElement [inline, virtual]
IsSubElementirr::gui::IGUIElement [protected]
isSubElement() const irr::gui::IGUIElement [inline, virtual]
IsTabGroupirr::gui::IGUIElement [protected]
isTabGroup() const irr::gui::IGUIElement [inline]
isTabStop() const irr::gui::IGUIElement [inline]
IsTabStopirr::gui::IGUIElement [protected]
IsVisibleirr::gui::IGUIElement [protected]
isVisible() const irr::gui::IGUIElement [inline, virtual]
LastParentRectirr::gui::IGUIElement [protected]
MaxSizeirr::gui::IGUIElement [protected]
MinSizeirr::gui::IGUIElement [protected]
move(core::position2d< s32 > absoluteMovement)irr::gui::IGUIElement [inline, virtual]
Nameirr::gui::IGUIElement [protected]
NoClipirr::gui::IGUIElement [protected]
OnEvent(const SEvent &event)irr::gui::IGUIElement [inline, virtual]
OnPostRender(u32 timeMs)irr::gui::IGUIElement [inline, virtual]
Parentirr::gui::IGUIElement [protected]
recalculateAbsolutePosition(bool recursive)irr::gui::IGUIElement [inline, protected]
RelativeRectirr::gui::IGUIElement [protected]
remove()irr::gui::IGUIElement [inline, virtual]
removeChild(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
ScaleRectirr::gui::IGUIElement [protected]
sendToBack(IGUIElement *child)irr::gui::IGUIElement [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::gui::IGUIElement [inline, virtual]
setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom)irr::gui::IGUIElement [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDraggable(bool draggable)=0irr::gui::IGUIWindow [pure virtual]
setDrawBackground(bool draw)=0irr::gui::IGUIWindow [pure virtual]
setDrawTitlebar(bool draw)=0irr::gui::IGUIWindow [pure virtual]
setEnabled(bool enabled)irr::gui::IGUIElement [inline, virtual]
setID(s32 id)irr::gui::IGUIElement [inline, virtual]
setMaxSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setMinSize(core::dimension2du size)irr::gui::IGUIElement [inline]
setName(const c8 *name)irr::gui::IGUIElement [inline, virtual]
setName(const core::stringc &name)irr::gui::IGUIElement [inline, virtual]
setNotClipped(bool noClip)irr::gui::IGUIElement [inline]
setRelativePosition(const core::rect< s32 > &r)irr::gui::IGUIElement [inline]
setRelativePosition(const core::position2di &position)irr::gui::IGUIElement [inline]
setRelativePositionProportional(const core::rect< f32 > &r)irr::gui::IGUIElement [inline]
setSubElement(bool subElement)irr::gui::IGUIElement [inline, virtual]
setTabGroup(bool isGroup)irr::gui::IGUIElement [inline]
setTabOrder(s32 index)irr::gui::IGUIElement [inline]
setTabStop(bool enable)irr::gui::IGUIElement [inline]
setText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setToolTipText(const wchar_t *text)irr::gui::IGUIElement [inline, virtual]
setVisible(bool visible)irr::gui::IGUIElement [inline, virtual]
TabOrderirr::gui::IGUIElement [protected]
Textirr::gui::IGUIElement [protected]
ToolTipTextirr::gui::IGUIElement [protected]
Typeirr::gui::IGUIElement [protected]
updateAbsolutePosition()irr::gui::IGUIElement [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IGUIElement()irr::gui::IGUIElement [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.html new file mode 100644 index 0000000..bc9e1ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.html @@ -0,0 +1,404 @@ + + + + +Irrlicht 3D Engine: irr::gui::IGUIWindow Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::IGUIWindow Class Reference
+
+
+ +

Default moveable window GUI element with border, caption and close icons. + More...

+ +

#include <IGUIWindow.h>

+
+ + Inheritance diagram for irr::gui::IGUIWindow:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Default moveable window GUI element with border, caption and close icons.

+
This element can create the following events of type EGUI_EVENT_TYPE:
    +
  • EGET_ELEMENT_CLOSED
  • +
+
+ +

Definition at line 21 of file IGUIWindow.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::IGUIWindow::IGUIWindow (IGUIEnvironmentenvironment,
IGUIElementparent,
s32 id,
core::rect< s32rectangle 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 26 of file IGUIWindow.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual core::rect<s32> irr::gui::IGUIWindow::getClientRect () const [pure virtual]
+
+
+ +

Returns the rectangle of the drawable area (without border and without titlebar)

+

The coordinates are given relative to the top-left position of the gui element.
+ So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.
+ To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner. Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract the menu area additionally.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUIButton* irr::gui::IGUIWindow::getCloseButton () const [pure virtual]
+
+
+ +

Returns pointer to the close button.

+

You can hide the button by calling setVisible(false) on the result.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIWindow::getDrawBackground () const [pure virtual]
+
+
+ +

Get if the window background will be drawn.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIWindow::getDrawTitlebar () const [pure virtual]
+
+
+ +

Get if the window titlebar will be drawn.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUIButton* irr::gui::IGUIWindow::getMaximizeButton () const [pure virtual]
+
+
+ +

Returns pointer to the maximize button.

+

You can hide the button by calling setVisible(false) on the result.

+ +
+
+ +
+
+ + + + + + + +
virtual IGUIButton* irr::gui::IGUIWindow::getMinimizeButton () const [pure virtual]
+
+
+ +

Returns pointer to the minimize button.

+

You can hide the button by calling setVisible(false) on the result.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::gui::IGUIWindow::isDraggable () const [pure virtual]
+
+
+ +

Returns true if the window can be dragged with the mouse, false if not.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIWindow::setDraggable (bool draggable) [pure virtual]
+
+
+ +

Sets whether the window can be dragged by the mouse.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIWindow::setDrawBackground (bool draw) [pure virtual]
+
+
+ +

Set if the window background will be drawn.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::gui::IGUIWindow::setDrawTitlebar (bool draw) [pure virtual]
+
+
+

Set if the window titlebar will be drawn Note: If the background is not drawn, then the titlebar is automatically also not drawn

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.png new file mode 100644 index 0000000..c38abb8 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1gui_1_1_i_g_u_i_window.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader-members.html new file mode 100644 index 0000000..6d7362a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IArchiveLoader Member List
+
+
+This is the complete list of members for irr::io::IArchiveLoader, including all inherited members. + + + + + + + + + + + + +
createArchive(const path &filename, bool ignoreCase, bool ignorePaths) const =0irr::io::IArchiveLoader [pure virtual]
createArchive(io::IReadFile *file, bool ignoreCase, bool ignorePaths) const =0irr::io::IArchiveLoader [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isALoadableFileFormat(const path &filename) const =0irr::io::IArchiveLoader [pure virtual]
isALoadableFileFormat(io::IReadFile *file) const =0irr::io::IArchiveLoader [pure virtual]
isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0irr::io::IArchiveLoader [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.html new file mode 100644 index 0000000..1b4b9ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.html @@ -0,0 +1,329 @@ + + + + +Irrlicht 3D Engine: irr::io::IArchiveLoader Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IArchiveLoader Class Reference
+
+
+ +

Class which is able to create an archive from a file. + More...

+ +

#include <IFileArchive.h>

+
+ + Inheritance diagram for irr::io::IArchiveLoader:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Class which is able to create an archive from a file.

+

If you want the Irrlicht Engine be able to load archives of currently unsupported file formats (e.g .wad), then implement this and add your new Archive loader with IFileSystem::addArchiveLoader() to the engine.

+ +

Definition at line 91 of file IFileArchive.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IFileArchive* irr::io::IArchiveLoader::createArchive (const pathfilename,
bool ignoreCase,
bool ignorePaths 
) const [pure virtual]
+
+
+ +

Creates an archive from the filename.

+
Parameters:
+ + + + +
filenameFile to use.
ignoreCaseSearching is performed without regarding the case
ignorePathsFiles are searched for without checking for the directories
+
+
+
Returns:
Pointer to newly created archive, or 0 upon error.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IFileArchive* irr::io::IArchiveLoader::createArchive (io::IReadFilefile,
bool ignoreCase,
bool ignorePaths 
) const [pure virtual]
+
+
+ +

Creates an archive from the file.

+
Parameters:
+ + + + +
fileFile handle to use.
ignoreCaseSearching is performed without regarding the case
ignorePathsFiles are searched for without checking for the directories
+
+
+
Returns:
Pointer to newly created archive, or 0 upon error.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IArchiveLoader::isALoadableFileFormat (const pathfilename) const [pure virtual]
+
+
+ +

Check if the file might be loaded by this class.

+

Check based on the file extension (e.g. ".zip")

+
Parameters:
+ + +
filenameName of file to check.
+
+
+
Returns:
True if file seems to be loadable.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IArchiveLoader::isALoadableFileFormat (io::IReadFilefile) const [pure virtual]
+
+
+ +

Check if the file might be loaded by this class.

+

This check may look into the file.

+
Parameters:
+ + +
fileFile handle to check.
+
+
+
Returns:
True if file seems to be loadable.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IArchiveLoader::isALoadableFileFormat (E_FILE_ARCHIVE_TYPE fileType) const [pure virtual]
+
+
+ +

Check to see if the loader can create archives of this type.

+

Check based on the archive type.

+
Parameters:
+ + +
fileTypeThe archive type to check.
+
+
+
Returns:
True if the archile loader supports this type, false if not
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.png new file mode 100644 index 0000000..0669c9e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_archive_loader.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object-members.html new file mode 100644 index 0000000..785914c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IAttributeExchangingObject Member List
+
+
+This is the complete list of members for irr::io::IAttributeExchangingObject, including all inherited members. + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.html new file mode 100644 index 0000000..38af4ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.html @@ -0,0 +1,275 @@ + + + + +Irrlicht 3D Engine: irr::io::IAttributeExchangingObject Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IAttributeExchangingObject Class Reference
+
+
+ +

An object which is able to serialize and deserialize its attributes into an attributes object. + More...

+ +

#include <IAttributeExchangingObject.h>

+
+ + Inheritance diagram for irr::io::IAttributeExchangingObject:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

An object which is able to serialize and deserialize its attributes into an attributes object.

+ +

Definition at line 51 of file IAttributeExchangingObject.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributeExchangingObject::deserializeAttributes (io::IAttributesin,
io::SAttributeReadWriteOptionsoptions = 0 
) [inline, virtual]
+
+
+ +

Reads attributes of the object.

+

Implement this to set the attributes of your scene node animator for scripting languages, editors, debuggers or xml deserialization purposes.

+ +

Reimplemented in irr::gui::IGUIElement, irr::scene::ISceneNode, and irr::scene::ICameraSceneNode.

+ +

Definition at line 63 of file IAttributeExchangingObject.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributeExchangingObject::serializeAttributes (io::IAttributesout,
io::SAttributeReadWriteOptionsoptions = 0 
) const [inline, virtual]
+
+
+ +

Writes attributes of the object.

+

Implement this to expose the attributes of your scene node animator for scripting languages, editors, debuggers or xml serialization purposes.

+ +

Reimplemented in irr::gui::IGUIElement, irr::scene::ISceneNode, and irr::scene::ICameraSceneNode.

+ +

Definition at line 58 of file IAttributeExchangingObject.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.png new file mode 100644 index 0000000..a9a4c41 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attribute_exchanging_object.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes-members.html new file mode 100644 index 0000000..b3153cb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes-members.html @@ -0,0 +1,265 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IAttributes Member List
+
+
+This is the complete list of members for irr::io::IAttributes, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addArray(const c8 *attributeName, const core::array< core::stringw > &value)=0irr::io::IAttributes [pure virtual]
addBinary(const c8 *attributeName, void *data, s32 dataSizeInBytes)=0irr::io::IAttributes [pure virtual]
addBool(const c8 *attributeName, bool value)=0irr::io::IAttributes [pure virtual]
addBox3d(const c8 *attributeName, core::aabbox3df v)=0irr::io::IAttributes [pure virtual]
addColor(const c8 *attributeName, video::SColor value)=0irr::io::IAttributes [pure virtual]
addColorf(const c8 *attributeName, video::SColorf value)=0irr::io::IAttributes [pure virtual]
addDimension2d(const c8 *attributeName, core::dimension2d< u32 > value)=0irr::io::IAttributes [pure virtual]
addEnum(const c8 *attributeName, const c8 *enumValue, const c8 *const *enumerationLiterals)=0irr::io::IAttributes [pure virtual]
addEnum(const c8 *attributeName, s32 enumValue, const c8 *const *enumerationLiterals)=0irr::io::IAttributes [pure virtual]
addFloat(const c8 *attributeName, f32 value)=0irr::io::IAttributes [pure virtual]
addInt(const c8 *attributeName, s32 value)=0irr::io::IAttributes [pure virtual]
addLine2d(const c8 *attributeName, core::line2df v)=0irr::io::IAttributes [pure virtual]
addLine3d(const c8 *attributeName, core::line3df v)=0irr::io::IAttributes [pure virtual]
addMatrix(const c8 *attributeName, const core::matrix4 &v)=0irr::io::IAttributes [pure virtual]
addPlane3d(const c8 *attributeName, core::plane3df v)=0irr::io::IAttributes [pure virtual]
addPosition2d(const c8 *attributeName, core::position2di value)=0irr::io::IAttributes [pure virtual]
addQuaternion(const c8 *attributeName, core::quaternion v)=0irr::io::IAttributes [pure virtual]
addRect(const c8 *attributeName, core::rect< s32 > value)=0irr::io::IAttributes [pure virtual]
addString(const c8 *attributeName, const c8 *value)=0irr::io::IAttributes [pure virtual]
addString(const c8 *attributeName, const wchar_t *value)=0irr::io::IAttributes [pure virtual]
addTexture(const c8 *attributeName, video::ITexture *texture, const io::path &filename="")=0irr::io::IAttributes [pure virtual]
addTriangle3d(const c8 *attributeName, core::triangle3df v)=0irr::io::IAttributes [pure virtual]
addUserPointer(const c8 *attributeName, void *userPointer)=0irr::io::IAttributes [pure virtual]
addVector2d(const c8 *attributeName, core::vector2df value)=0irr::io::IAttributes [pure virtual]
addVector3d(const c8 *attributeName, core::vector3df value)=0irr::io::IAttributes [pure virtual]
clear()=0irr::io::IAttributes [pure virtual]
drop() const irr::IReferenceCounted [inline]
existsAttribute(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
findAttribute(const c8 *attributeName) const =0irr::io::IAttributes [pure virtual]
getAttributeAsArray(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsArray(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsBinaryData(const c8 *attributeName, void *outData, s32 maxSizeInBytes)=0irr::io::IAttributes [pure virtual]
getAttributeAsBinaryData(s32 index, void *outData, s32 maxSizeInBytes)=0irr::io::IAttributes [pure virtual]
getAttributeAsBool(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsBool(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsBox3d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsBox3d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsColor(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsColor(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsColorf(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsColorf(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsDimension2d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsDimension2d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsEnumeration(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsEnumeration(const c8 *attributeName, const c8 *const *enumerationLiteralsToUse)=0irr::io::IAttributes [pure virtual]
getAttributeAsEnumeration(s32 index, const c8 *const *enumerationLiteralsToUse)=0irr::io::IAttributes [pure virtual]
getAttributeAsEnumeration(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsFloat(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsFloat(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsInt(const c8 *attributeName) const =0irr::io::IAttributes [pure virtual]
getAttributeAsInt(s32 index) const =0irr::io::IAttributes [pure virtual]
getAttributeAsLine2d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsLine2d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsLine3d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsLine3d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsMatrix(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsMatrix(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsPlane3d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsPlane3d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsPosition2d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsPosition2d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsQuaternion(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsQuaternion(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsRect(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsRect(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsString(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsString(const c8 *attributeName, c8 *target)=0irr::io::IAttributes [pure virtual]
getAttributeAsString(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsStringW(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsStringW(const c8 *attributeName, wchar_t *target)=0irr::io::IAttributes [pure virtual]
getAttributeAsStringW(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsTexture(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsTexture(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsTriangle3d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsTriangle3d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsUserPointer(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsUserPointer(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsVector2d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsVector2d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeAsVector3d(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeAsVector3d(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeCount() const =0irr::io::IAttributes [pure virtual]
getAttributeEnumerationLiteralsOfEnumeration(const c8 *attributeName, core::array< core::stringc > &outLiterals)=0irr::io::IAttributes [pure virtual]
getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array< core::stringc > &outLiterals)=0irr::io::IAttributes [pure virtual]
getAttributeName(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeType(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeType(s32 index)=0irr::io::IAttributes [pure virtual]
getAttributeTypeString(const c8 *attributeName)=0irr::io::IAttributes [pure virtual]
getAttributeTypeString(s32 index)=0irr::io::IAttributes [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
read(io::IXMLReader *reader, bool readCurrentElementOnly=false, const wchar_t *elementName=0)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, s32 value)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, s32 value)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, f32 value)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, f32 value)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, const c8 *value)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, const c8 *value)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, const wchar_t *value)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, const wchar_t *value)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, void *data, s32 dataSizeInBytes)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, void *data, s32 dataSizeInBytes)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, const core::array< core::stringw > &value)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, const core::array< core::stringw > &value)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, bool value)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, bool value)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, const c8 *enumValue, const c8 *const *enumerationLiterals)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, const c8 *enumValue, const c8 *const *enumerationLiterals)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, video::SColor color)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, video::SColor color)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, video::SColorf color)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, video::SColorf color)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::vector3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::vector3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::vector2df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::vector2df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::position2di v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::position2di v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::rect< s32 > v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::rect< s32 > v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::dimension2d< u32 > v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::dimension2d< u32 > v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, const core::matrix4 &v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, const core::matrix4 &v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::quaternion v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::quaternion v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::aabbox3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::aabbox3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::plane3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::plane3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::triangle3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::triangle3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::line2df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::line2df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, core::line3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, core::line3df v)=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, video::ITexture *texture, const io::path &filename="")=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, video::ITexture *texture, const io::path &filename="")=0irr::io::IAttributes [pure virtual]
setAttribute(const c8 *attributeName, void *userPointer)=0irr::io::IAttributes [pure virtual]
setAttribute(s32 index, void *userPointer)=0irr::io::IAttributes [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
write(io::IXMLWriter *writer, bool writeXMLHeader=false, const wchar_t *elementName=0)=0irr::io::IAttributes [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.html new file mode 100644 index 0000000..d0f70a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.html @@ -0,0 +1,4236 @@ + + + + +Irrlicht 3D Engine: irr::io::IAttributes Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IAttributes Class Reference
+
+
+ +

Provides a generic interface for attributes and their values and the possiblity to serialize them. + More...

+ +

#include <IAttributes.h>

+
+ + Inheritance diagram for irr::io::IAttributes:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Provides a generic interface for attributes and their values and the possiblity to serialize them.

+ +

Definition at line 41 of file IAttributes.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addArray (const c8attributeName,
const core::array< core::stringw > & value 
) [pure virtual]
+
+
+ +

Adds an attribute as wide string array.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addBinary (const c8attributeName,
void * data,
s32 dataSizeInBytes 
) [pure virtual]
+
+
+ +

Adds an attribute as binary data.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addBool (const c8attributeName,
bool value 
) [pure virtual]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addBox3d (const c8attributeName,
core::aabbox3df v 
) [pure virtual]
+
+
+ +

Adds an attribute as axis aligned bounding box.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addColor (const c8attributeName,
video::SColor value 
) [pure virtual]
+
+
+ +

Adds an attribute as color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addColorf (const c8attributeName,
video::SColorf value 
) [pure virtual]
+
+
+ +

Adds an attribute as floating point color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addDimension2d (const c8attributeName,
core::dimension2d< u32value 
) [pure virtual]
+
+
+ +

Adds an attribute as dimension2d.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addEnum (const c8attributeName,
const c8enumValue,
const c8 *const * enumerationLiterals 
) [pure virtual]
+
+
+ +

Adds an attribute as enum.

+ +

Referenced by irr::gui::IGUIElement::serializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addEnum (const c8attributeName,
s32 enumValue,
const c8 *const * enumerationLiterals 
) [pure virtual]
+
+
+ +

Adds an attribute as enum.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addFloat (const c8attributeName,
f32 value 
) [pure virtual]
+
+
+ +

Adds an attribute as float.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addInt (const c8attributeName,
s32 value 
) [pure virtual]
+
+
+ +

Adds an attribute as integer.

+ +

Referenced by irr::scene::ISceneNode::serializeAttributes(), and irr::gui::IGUIElement::serializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addLine2d (const c8attributeName,
core::line2df v 
) [pure virtual]
+
+
+ +

Adds an attribute as a 2d line.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addLine3d (const c8attributeName,
core::line3df v 
) [pure virtual]
+
+
+ +

Adds an attribute as a 3d line.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addMatrix (const c8attributeName,
const core::matrix4v 
) [pure virtual]
+
+
+ +

Adds an attribute as matrix.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addPlane3d (const c8attributeName,
core::plane3df v 
) [pure virtual]
+
+
+ +

Adds an attribute as 3d plane.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addPosition2d (const c8attributeName,
core::position2di value 
) [pure virtual]
+
+
+ +

Adds an attribute as 2d position.

+ +

Referenced by irr::gui::IGUIElement::serializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addQuaternion (const c8attributeName,
core::quaternion v 
) [pure virtual]
+
+
+ +

Adds an attribute as quaternion.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addRect (const c8attributeName,
core::rect< s32value 
) [pure virtual]
+
+
+ +

Adds an attribute as rectangle.

+ +

Referenced by irr::gui::IGUIElement::serializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addString (const c8attributeName,
const c8value 
) [pure virtual]
+
+
+ +

Adds an attribute as string.

+ +

Referenced by irr::scene::ISceneNode::serializeAttributes(), and irr::gui::IGUIElement::serializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addString (const c8attributeName,
const wchar_t * value 
) [pure virtual]
+
+
+ +

Adds an attribute as string.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addTexture (const c8attributeName,
video::ITexturetexture,
const io::pathfilename = "" 
) [pure virtual]
+
+
+ +

Adds an attribute as texture reference.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addTriangle3d (const c8attributeName,
core::triangle3df v 
) [pure virtual]
+
+
+ +

Adds an attribute as 3d triangle.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addUserPointer (const c8attributeName,
void * userPointer 
) [pure virtual]
+
+
+ +

Adds an attribute as user pointner.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addVector2d (const c8attributeName,
core::vector2df value 
) [pure virtual]
+
+
+ +

Adds an attribute as 2d vector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::addVector3d (const c8attributeName,
core::vector3df value 
) [pure virtual]
+
+
+ +

Adds an attribute as 3d vector.

+ +

Referenced by irr::scene::ISceneNode::serializeAttributes().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::io::IAttributes::clear () [pure virtual]
+
+
+ +

Removes all attributes.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IAttributes::existsAttribute (const c8attributeName) [pure virtual]
+
+
+ +

Returns if an attribute with a name exists.

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::io::IAttributes::findAttribute (const c8attributeName) const [pure virtual]
+
+
+ +

Returns attribute index from name, -1 if not found.

+ +

Referenced by irr::scene::ICameraSceneNode::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::array<core::stringw> irr::io::IAttributes::getAttributeAsArray (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as an array of wide strings.

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute() or 0 if attribute is not set.
+ +
+
+ +
+
+ + + + + + + + +
virtual core::array<core::stringw> irr::io::IAttributes::getAttributeAsArray (s32 index) [pure virtual]
+
+
+

Returns attribute value as an array of wide strings by index.

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::getAttributeAsBinaryData (const c8attributeName,
void * outData,
s32 maxSizeInBytes 
) [pure virtual]
+
+
+ +

Gets an attribute as binary data.

+
Parameters:
+ + + + +
attributeName,:Name of the attribute to get.
outDataPointer to buffer where data shall be stored.
maxSizeInBytesMaximum number of bytes to write into outData.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::getAttributeAsBinaryData (s32 index,
void * outData,
s32 maxSizeInBytes 
) [pure virtual]
+
+
+ +

Gets an attribute as binary data.

+
Parameters:
+ + + + +
index,:Index value, must be between 0 and getAttributeCount()-1.
outDataPointer to buffer where data shall be stored.
maxSizeInBytesMaximum number of bytes to write into outData.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IAttributes::getAttributeAsBool (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as boolean value

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +

Referenced by irr::scene::ICameraSceneNode::deserializeAttributes(), irr::scene::ISceneNode::deserializeAttributes(), and irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IAttributes::getAttributeAsBool (s32 index) [pure virtual]
+
+
+

Gets an attribute as boolean value

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::aabbox3df irr::io::IAttributes::getAttributeAsBox3d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a axis aligned bounding box

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::aabbox3df irr::io::IAttributes::getAttributeAsBox3d (s32 index) [pure virtual]
+
+
+

Gets an attribute as axis aligned bounding box

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColor irr::io::IAttributes::getAttributeAsColor (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as color

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColor irr::io::IAttributes::getAttributeAsColor (s32 index) [pure virtual]
+
+
+

Gets an attribute as color

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColorf irr::io::IAttributes::getAttributeAsColorf (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as floating point color

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual video::SColorf irr::io::IAttributes::getAttributeAsColorf (s32 index) [pure virtual]
+
+
+

Gets an attribute as floating point color

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::dimension2d<u32> irr::io::IAttributes::getAttributeAsDimension2d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as dimension2d

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::dimension2d<u32> irr::io::IAttributes::getAttributeAsDimension2d (s32 index) [pure virtual]
+
+
+

Gets an attribute as dimension2d

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::io::IAttributes::getAttributeAsEnumeration (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as enumeration

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +

Referenced by irr::scene::ISceneNode::deserializeAttributes(), and irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::io::IAttributes::getAttributeAsEnumeration (const c8attributeName,
const c8 *const * enumerationLiteralsToUse 
) [pure virtual]
+
+
+ +

Gets an attribute as enumeration.

+
Parameters:
+ + + +
attributeName,:Name of the attribute to get.
enumerationLiteralsToUse,:Use these enumeration literals to get the index value instead of the set ones. This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but no information about its index.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::io::IAttributes::getAttributeAsEnumeration (s32 index,
const c8 *const * enumerationLiteralsToUse 
) [pure virtual]
+
+
+ +

Gets an attribute as enumeration.

+
Parameters:
+ + + +
index,:Index value, must be between 0 and getAttributeCount()-1.
enumerationLiteralsToUse,:Use these enumeration literals to get the index value instead of the set ones. This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but no information about its index.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::io::IAttributes::getAttributeAsEnumeration (s32 index) [pure virtual]
+
+
+

Gets an attribute as enumeration

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual f32 irr::io::IAttributes::getAttributeAsFloat (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as float value

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual f32 irr::io::IAttributes::getAttributeAsFloat (s32 index) [pure virtual]
+
+
+

Gets an attribute as float value

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::io::IAttributes::getAttributeAsInt (const c8attributeName) const [pure virtual]
+
+
+

Gets an attribute as integer value

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +

Referenced by irr::scene::ISceneNode::deserializeAttributes(), and irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::io::IAttributes::getAttributeAsInt (s32 index) const [pure virtual]
+
+
+

Gets an attribute as integer value

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::line2df irr::io::IAttributes::getAttributeAsLine2d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a 2d line

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::line2df irr::io::IAttributes::getAttributeAsLine2d (s32 index) [pure virtual]
+
+
+

Gets an attribute as a 2d line

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::line3df irr::io::IAttributes::getAttributeAsLine3d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a 3d line

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::line3df irr::io::IAttributes::getAttributeAsLine3d (s32 index) [pure virtual]
+
+
+

Gets an attribute as a 3d line

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::matrix4 irr::io::IAttributes::getAttributeAsMatrix (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a matrix4

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::matrix4 irr::io::IAttributes::getAttributeAsMatrix (s32 index) [pure virtual]
+
+
+

Gets an attribute as matrix

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::plane3df irr::io::IAttributes::getAttributeAsPlane3d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a 3d plane

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::plane3df irr::io::IAttributes::getAttributeAsPlane3d (s32 index) [pure virtual]
+
+
+

Gets an attribute as 3d plane

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::position2di irr::io::IAttributes::getAttributeAsPosition2d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as position

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +

Referenced by irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::position2di irr::io::IAttributes::getAttributeAsPosition2d (s32 index) [pure virtual]
+
+
+

Gets an attribute as position

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::quaternion irr::io::IAttributes::getAttributeAsQuaternion (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a quaternion

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::quaternion irr::io::IAttributes::getAttributeAsQuaternion (s32 index) [pure virtual]
+
+
+

Gets an attribute as quaternion

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::rect<s32> irr::io::IAttributes::getAttributeAsRect (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as rectangle

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +

Referenced by irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::rect<s32> irr::io::IAttributes::getAttributeAsRect (s32 index) [pure virtual]
+
+
+

Gets an attribute as rectangle

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::stringc irr::io::IAttributes::getAttributeAsString (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as string.

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute() or 0 if attribute is not set.
+ +

Referenced by irr::scene::ISceneNode::deserializeAttributes(), and irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::getAttributeAsString (const c8attributeName,
c8target 
) [pure virtual]
+
+
+

Gets an attribute as string.

+
Parameters:
+ + + +
attributeNameName of the attribute to get.
targetBuffer where the string is copied to.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::stringc irr::io::IAttributes::getAttributeAsString (s32 index) [pure virtual]
+
+
+

Returns attribute value as string by index.

+
Parameters:
+ + +
indexIndex value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::stringw irr::io::IAttributes::getAttributeAsStringW (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as string.

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute() or 0 if attribute is not set.
+ +

Referenced by irr::gui::IGUIElement::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::getAttributeAsStringW (const c8attributeName,
wchar_t * target 
) [pure virtual]
+
+
+

Gets an attribute as string.

+
Parameters:
+ + + +
attributeName,:Name of the attribute to get.
target,:Buffer where the string is copied to.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::stringw irr::io::IAttributes::getAttributeAsStringW (s32 index) [pure virtual]
+
+
+

Returns attribute value as string by index.

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual video::ITexture* irr::io::IAttributes::getAttributeAsTexture (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as texture reference

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual video::ITexture* irr::io::IAttributes::getAttributeAsTexture (s32 index) [pure virtual]
+
+
+

Gets an attribute as texture reference

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::triangle3df irr::io::IAttributes::getAttributeAsTriangle3d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as a 3d triangle

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::triangle3df irr::io::IAttributes::getAttributeAsTriangle3d (s32 index) [pure virtual]
+
+
+

Gets an attribute as 3d triangle

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void* irr::io::IAttributes::getAttributeAsUserPointer (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as user pointer

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void* irr::io::IAttributes::getAttributeAsUserPointer (s32 index) [pure virtual]
+
+
+

Gets an attribute as user pointer

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector2df irr::io::IAttributes::getAttributeAsVector2d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as vector

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector2df irr::io::IAttributes::getAttributeAsVector2d (s32 index) [pure virtual]
+
+
+

Gets an attribute as position

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df irr::io::IAttributes::getAttributeAsVector3d (const c8attributeName) [pure virtual]
+
+
+

Gets an attribute as 3d vector

+
Parameters:
+ + +
attributeName,:Name of the attribute to get.
+
+
+
Returns:
Returns value of the attribute previously set by setAttribute()
+ +

Referenced by irr::scene::ISceneNode::deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df irr::io::IAttributes::getAttributeAsVector3d (s32 index) [pure virtual]
+
+
+

Gets an attribute as 3d vector

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::io::IAttributes::getAttributeCount () const [pure virtual]
+
+
+ +

Returns amount of attributes in this collection of attributes.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::getAttributeEnumerationLiteralsOfEnumeration (const c8attributeName,
core::array< core::stringc > & outLiterals 
) [pure virtual]
+
+
+

Gets the list of enumeration literals of an enumeration attribute

+
Parameters:
+ + + +
attributeNameName of the attribute to get.
outLiteralsSet of strings to choose the enum name from.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::getAttributeEnumerationLiteralsOfEnumeration (s32 index,
core::array< core::stringc > & outLiterals 
) [pure virtual]
+
+
+

Gets the list of enumeration literals of an enumeration attribute

+
Parameters:
+ + + +
index,:Index value, must be between 0 and getAttributeCount()-1.
outLiteralsSet of strings to choose the enum name from.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::io::IAttributes::getAttributeName (s32 index) [pure virtual]
+
+
+

Returns attribute name by index.

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual E_ATTRIBUTE_TYPE irr::io::IAttributes::getAttributeType (const c8attributeName) [pure virtual]
+
+
+

Returns the type of an attribute

+
Parameters:
+ + +
attributeName,:Name for the attribute
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual E_ATTRIBUTE_TYPE irr::io::IAttributes::getAttributeType (s32 index) [pure virtual]
+
+
+

Returns attribute type by index.

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const wchar_t* irr::io::IAttributes::getAttributeTypeString (const c8attributeName) [pure virtual]
+
+
+

Returns the type string of the attribute

+
Parameters:
+ + +
attributeName,:String for the attribute type
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const wchar_t* irr::io::IAttributes::getAttributeTypeString (s32 index) [pure virtual]
+
+
+

Returns the type string of the attribute by index.

+
Parameters:
+ + +
index,:Index value, must be between 0 and getAttributeCount()-1.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IAttributes::read (io::IXMLReaderreader,
bool readCurrentElementOnly = false,
const wchar_t * elementName = 0 
) [pure virtual]
+
+
+

Reads attributes from a xml file.

+
Parameters:
+ + + + +
readerThe XML reader to read from
readCurrentElementOnlyIf set to true, reading only works if current element has the name 'attributes' or the name specified using elementName.
elementNameThe surrounding element name. If it is null, the default one, "attributes" will be taken. If set to false, the first appearing list of attributes are read.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
s32 value 
) [pure virtual]
+
+
+ +

Sets an attribute as integer value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
s32 value 
) [pure virtual]
+
+
+ +

Sets an attribute as integer value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
f32 value 
) [pure virtual]
+
+
+ +

Sets a attribute as float value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
f32 value 
) [pure virtual]
+
+
+ +

Sets an attribute as float value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
const c8value 
) [pure virtual]
+
+
+

Sets an attribute value as string.

+
Parameters:
+ + + +
attributeName,:Name for the attribute
value,:Value for the attribute. Set this to 0 to delete the attribute
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
const c8value 
) [pure virtual]
+
+
+

Sets an attribute value as string.

+
Parameters:
+ + + +
indexIndex value, must be between 0 and getAttributeCount()-1.
valueString to which the attribute is set.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
const wchar_t * value 
) [pure virtual]
+
+
+

Sets an attribute value as string.

+
Parameters:
+ + + +
attributeName,:Name for the attribute
value,:Value for the attribute. Set this to 0 to delete the attribute
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
const wchar_t * value 
) [pure virtual]
+
+
+

Sets an attribute value as string.

+
Parameters:
+ + + +
indexIndex value, must be between 0 and getAttributeCount()-1.
valueString to which the attribute is set.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
void * data,
s32 dataSizeInBytes 
) [pure virtual]
+
+
+ +

Sets an attribute as binary data.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
void * data,
s32 dataSizeInBytes 
) [pure virtual]
+
+
+ +

Sets an attribute as binary data.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
const core::array< core::stringw > & value 
) [pure virtual]
+
+
+

Sets an attribute value as a wide string array.

+
Parameters:
+ + + +
attributeName,:Name for the attribute
value,:Value for the attribute. Set this to 0 to delete the attribute
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
const core::array< core::stringw > & value 
) [pure virtual]
+
+
+ +

Sets an attribute as an array of wide strings.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
bool value 
) [pure virtual]
+
+
+ +

Sets an attribute as boolean value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
bool value 
) [pure virtual]
+
+
+ +

Sets an attribute as boolean value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
const c8enumValue,
const c8 *const * enumerationLiterals 
) [pure virtual]
+
+
+ +

Sets an attribute as enumeration.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
const c8enumValue,
const c8 *const * enumerationLiterals 
) [pure virtual]
+
+
+ +

Sets an attribute as enumeration.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
video::SColor color 
) [pure virtual]
+
+
+ +

Sets a attribute as color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
video::SColor color 
) [pure virtual]
+
+
+ +

Sets an attribute as color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
video::SColorf color 
) [pure virtual]
+
+
+ +

Sets a attribute as floating point color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
video::SColorf color 
) [pure virtual]
+
+
+ +

Sets an attribute as floating point color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::vector3df v 
) [pure virtual]
+
+
+ +

Sets a attribute as 3d vector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::vector3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as vector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::vector2df v 
) [pure virtual]
+
+
+ +

Sets a attribute as 2d vector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::vector2df v 
) [pure virtual]
+
+
+ +

Sets an attribute as 2d vector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::position2di v 
) [pure virtual]
+
+
+ +

Sets a attribute as 2d position.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::position2di v 
) [pure virtual]
+
+
+ +

Sets an attribute as 2d position.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::rect< s32v 
) [pure virtual]
+
+
+ +

Sets an attribute as rectangle.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::rect< s32v 
) [pure virtual]
+
+
+ +

Sets an attribute as rectangle.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::dimension2d< u32v 
) [pure virtual]
+
+
+ +

Sets an attribute as dimension2d.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::dimension2d< u32v 
) [pure virtual]
+
+
+ +

Sets an attribute as dimension2d.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
const core::matrix4v 
) [pure virtual]
+
+
+ +

Sets an attribute as matrix.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
const core::matrix4v 
) [pure virtual]
+
+
+ +

Sets an attribute as matrix.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::quaternion v 
) [pure virtual]
+
+
+ +

Sets an attribute as quaternion.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::quaternion v 
) [pure virtual]
+
+
+ +

Sets an attribute as quaternion.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::aabbox3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as axis aligned bounding box.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::aabbox3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as axis aligned bounding box.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::plane3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as 3d plane.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::plane3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as 3d plane.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::triangle3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as 3d trianle.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::triangle3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as 3d triangle.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::line2df v 
) [pure virtual]
+
+
+ +

Sets an attribute as a 2d line.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::line2df v 
) [pure virtual]
+
+
+ +

Sets an attribute as a 2d line.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
core::line3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as a 3d line.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
core::line3df v 
) [pure virtual]
+
+
+ +

Sets an attribute as a 3d line.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
video::ITexturetexture,
const io::pathfilename = "" 
) [pure virtual]
+
+
+ +

Sets an attribute as texture reference.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
video::ITexturetexture,
const io::pathfilename = "" 
) [pure virtual]
+
+
+ +

Sets an attribute as texture reference.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (const c8attributeName,
void * userPointer 
) [pure virtual]
+
+
+ +

Sets an attribute as user pointer.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::io::IAttributes::setAttribute (s32 index,
void * userPointer 
) [pure virtual]
+
+
+ +

Sets an attribute as user pointer.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IAttributes::write (io::IXMLWriterwriter,
bool writeXMLHeader = false,
const wchar_t * elementName = 0 
) [pure virtual]
+
+
+

Write these attributes into a xml file

+
Parameters:
+ + + + +
writer,:The XML writer to write to
writeXMLHeader,:Writes a header to the XML file, required if at the beginning of the file
elementName,:The surrounding element name. If it is null, the default one, "attributes" will be taken.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.png new file mode 100644 index 0000000..67be68c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_attributes.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive-members.html new file mode 100644 index 0000000..e01396e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IFileArchive Member List
+
+
+This is the complete list of members for irr::io::IFileArchive, including all inherited members. + + + + + + + + + + + + +
createAndOpenFile(const path &filename)=0irr::io::IFileArchive [pure virtual]
createAndOpenFile(u32 index)=0irr::io::IFileArchive [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getFileList() const =0irr::io::IFileArchive [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::io::IFileArchive [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
Passwordirr::io::IFileArchive
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.html new file mode 100644 index 0000000..34ef811 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.html @@ -0,0 +1,278 @@ + + + + +Irrlicht 3D Engine: irr::io::IFileArchive Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IFileArchive Class Reference
+
+
+ +

The FileArchive manages archives and provides access to files inside them. + More...

+ +

#include <IFileArchive.h>

+
+ + Inheritance diagram for irr::io::IFileArchive:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

The FileArchive manages archives and provides access to files inside them.

+ +

Definition at line 53 of file IFileArchive.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual IReadFile* irr::io::IFileArchive::createAndOpenFile (const pathfilename) [pure virtual]
+
+
+ +

Opens a file based on its name.

+

Creates and returns a new IReadFile for a file in the archive.

+
Parameters:
+ + +
filenameThe file to open
+
+
+
Returns:
Returns A pointer to the created file on success, or 0 on failure.
+ +
+
+ +
+
+ + + + + + + + +
virtual IReadFile* irr::io::IFileArchive::createAndOpenFile (u32 index) [pure virtual]
+
+
+ +

Opens a file based on its position in the file list.

+

Creates and returns

+
Parameters:
+ + +
indexThe zero based index of the file.
+
+
+
Returns:
Returns a pointer to the created file on success, or 0 on failure.
+ +
+
+ +
+
+ + + + + + + +
virtual const IFileList* irr::io::IFileArchive::getFileList () const [pure virtual]
+
+
+ +

Returns the complete file tree.

+
Returns:
Returns the complete directory tree for the archive, including all files and folders
+ +
+
+ +
+
+ + + + + + + +
virtual E_FILE_ARCHIVE_TYPE irr::io::IFileArchive::getType () const [inline, virtual]
+
+
+ +

get the archive type

+ +

Definition at line 76 of file IFileArchive.h.

+ +

References irr::io::EFAT_UNKNOWN.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

An optionally used password string.

+

This variable is publicly accessible from the interface in order to avoid single access patterns to this place, and hence allow some more obscurity.

+ +

Definition at line 83 of file IFileArchive.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.png new file mode 100644 index 0000000..23ea916 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_archive.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list-members.html new file mode 100644 index 0000000..3d23724 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list-members.html @@ -0,0 +1,138 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IFileList Member List
+
+
+This is the complete list of members for irr::io::IFileList, including all inherited members. + + + + + + + + + + + + + + + + + + +
addItem(const io::path &fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0)=0irr::io::IFileList [pure virtual]
drop() const irr::IReferenceCounted [inline]
findFile(const io::path &filename, bool isFolder=false) const =0irr::io::IFileList [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFileCount() const =0irr::io::IFileList [pure virtual]
getFileName(u32 index) const =0irr::io::IFileList [pure virtual]
getFileOffset(u32 index) const =0irr::io::IFileList [pure virtual]
getFileSize(u32 index) const =0irr::io::IFileList [pure virtual]
getFullFileName(u32 index) const =0irr::io::IFileList [pure virtual]
getID(u32 index) const =0irr::io::IFileList [pure virtual]
getPath() const =0irr::io::IFileList [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isDirectory(u32 index) const =0irr::io::IFileList [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
sort()=0irr::io::IFileList [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.html new file mode 100644 index 0000000..377a89c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.html @@ -0,0 +1,474 @@ + + + + +Irrlicht 3D Engine: irr::io::IFileList Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IFileList Class Reference
+
+
+ +

Provides a list of files and folders. + More...

+ +

#include <IFileList.h>

+
+ + Inheritance diagram for irr::io::IFileList:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual u32 addItem (const io::path &fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0)=0 +
    Add as a file or folder to the list.
  • virtual s32 findFile (const io::path &filename, bool isFolder=false) const =0 +
    Searches for a file or folder in the list.
  • virtual u32 getFileCount () const =0 +
    Get the number of files in the filelist.
  • virtual const io::path & getFileName (u32 index) const =0 +
    Gets the name of a file in the list, based on an index.
  • virtual u32 getFileOffset (u32 index) const =0 +
    Returns the file offset of a file in the file list, based on an index.
  • virtual u32 getFileSize (u32 index) const =0 +
    Returns the size of a file in the file list, based on an index.
  • virtual const io::path & getFullFileName (u32 index) const =0 +
    Gets the full name of a file in the list including the path, based on an index.
  • virtual u32 getID (u32 index) const =0 +
    Returns the ID of a file in the file list, based on an index.
  • virtual const io::path & getPath () const =0 +
    Returns the base path of the file list.
  • virtual bool isDirectory (u32 index) const =0 +
    Check if the file is a directory.
  • virtual void sort ()=0 +
    Sorts the file list. You should call this after adding any items to the file list.
+

Detailed Description

+

Provides a list of files and folders.

+

File lists usually contain a list of all files in a given folder, but can also contain a complete directory structure.

+ +

Definition at line 19 of file IFileList.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual u32 irr::io::IFileList::addItem (const io::pathfullPath,
u32 offset,
u32 size,
bool isDirectory,
u32 id = 0 
) [pure virtual]
+
+
+ +

Add as a file or folder to the list.

+
Parameters:
+ + + + + + +
fullPathThe file name including path, from the root of the file list.
isDirectoryTrue if this is a directory rather than a file.
offsetThe file offset inside an archive
sizeThe size of the file in bytes.
idThe ID of the file in the archive which owns it
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::io::IFileList::findFile (const io::pathfilename,
bool isFolder = false 
) const [pure virtual]
+
+
+ +

Searches for a file or folder in the list.

+

Searches for a file by name

+
Parameters:
+ + + +
filenameThe name of the file to search for.
isFolderTrue if you are searching for a directory path, false if you are searching for a file
+
+
+
Returns:
Returns the index of the file in the file list, or -1 if no matching name name was found.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::io::IFileList::getFileCount () const [pure virtual]
+
+
+ +

Get the number of files in the filelist.

+
Returns:
Amount of files and directories in the file list.
+ +
+
+ +
+
+ + + + + + + + +
virtual const io::path& irr::io::IFileList::getFileName (u32 index) const [pure virtual]
+
+
+ +

Gets the name of a file in the list, based on an index.

+

The path is not included in this name. Use getFullFileName for this.

+
Parameters:
+ + +
indexis the zero based index of the file which name should be returned. The index must be less than the amount getFileCount() returns.
+
+
+
Returns:
File name of the file. Returns 0, if an error occured.
+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::io::IFileList::getFileOffset (u32 index) const [pure virtual]
+
+
+ +

Returns the file offset of a file in the file list, based on an index.

+
Parameters:
+ + +
indexis the zero based index of the file which should be returned. The index must be less than the amount getFileCount() returns.
+
+
+
Returns:
The offset of the file in bytes.
+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::io::IFileList::getFileSize (u32 index) const [pure virtual]
+
+
+ +

Returns the size of a file in the file list, based on an index.

+
Parameters:
+ + +
indexis the zero based index of the file which should be returned. The index must be less than the amount getFileCount() returns.
+
+
+
Returns:
The size of the file in bytes.
+ +
+
+ +
+
+ + + + + + + + +
virtual const io::path& irr::io::IFileList::getFullFileName (u32 index) const [pure virtual]
+
+
+ +

Gets the full name of a file in the list including the path, based on an index.

+
Parameters:
+ + +
indexis the zero based index of the file which name should be returned. The index must be less than the amount getFileCount() returns.
+
+
+
Returns:
File name of the file. Returns 0 if an error occured.
+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::io::IFileList::getID (u32 index) const [pure virtual]
+
+
+ +

Returns the ID of a file in the file list, based on an index.

+

This optional ID can be used to link the file list entry to information held elsewhere. For example this could be an index in an IFileArchive, linking the entry to its data offset, uncompressed size and CRC.

+
Parameters:
+ + +
indexis the zero based index of the file which should be returned. The index must be less than the amount getFileCount() returns.
+
+
+
Returns:
The ID of the file.
+ +
+
+ +
+
+ + + + + + + +
virtual const io::path& irr::io::IFileList::getPath () const [pure virtual]
+
+
+ +

Returns the base path of the file list.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileList::isDirectory (u32 index) const [pure virtual]
+
+
+ +

Check if the file is a directory.

+
Parameters:
+ + +
indexThe zero based index which will be checked. The index must be less than the amount getFileCount() returns.
+
+
+
Returns:
True if the file is a directory, else false.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::io::IFileList::sort () [pure virtual]
+
+
+ +

Sorts the file list. You should call this after adding any items to the file list.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.png new file mode 100644 index 0000000..9496942 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_list.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back-members.html new file mode 100644 index 0000000..49f8b7a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IFileReadCallBack Member List
+
+
+This is the complete list of members for irr::io::IFileReadCallBack, including all inherited members. + + + +
getSize() const =0irr::io::IFileReadCallBack [pure virtual]
read(void *buffer, int sizeToRead)=0irr::io::IFileReadCallBack [pure virtual]
~IFileReadCallBack()irr::io::IFileReadCallBack [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back.html new file mode 100644 index 0000000..c0f9a7c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_read_call_back.html @@ -0,0 +1,223 @@ + + + + +Irrlicht 3D Engine: irr::io::IFileReadCallBack Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IFileReadCallBack Class Reference
+
+
+ +

Callback class for file read abstraction. + More...

+ +

#include <irrXML.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • virtual ~IFileReadCallBack () +
    Destructor.
  • virtual long getSize () const =0 +
    Returns size of file in bytes.
  • virtual int read (void *buffer, int sizeToRead)=0 +
    Reads an amount of bytes from the file.
+

Detailed Description

+

Callback class for file read abstraction.

+

With this, it is possible to make the xml parser read in other things than just files. The Irrlicht engine is using this for example to read xml from compressed .zip files. To make the parser read in any other data, derive a class from this interface, implement the two methods to read your data and give a pointer to an instance of your implementation when calling createIrrXMLReader(), createIrrXMLReaderUTF16() or createIrrXMLReaderUTF32()

+ +

Definition at line 214 of file irrXML.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::io::IFileReadCallBack::~IFileReadCallBack () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 219 of file irrXML.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual long irr::io::IFileReadCallBack::getSize () const [pure virtual]
+
+
+ +

Returns size of file in bytes.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual int irr::io::IFileReadCallBack::read (void * buffer,
int sizeToRead 
) [pure virtual]
+
+
+ +

Reads an amount of bytes from the file.

+
Parameters:
+ + + +
buffer,:Pointer to buffer where to read bytes will be written to.
sizeToRead,:Amount of bytes to read from the file.
+
+
+
Returns:
Returns how much bytes were read.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system-members.html new file mode 100644 index 0000000..4eb49be --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system-members.html @@ -0,0 +1,165 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IFileSystem Member List
+
+
+This is the complete list of members for irr::io::IFileSystem, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addArchiveLoader(IArchiveLoader *loader)=0irr::io::IFileSystem [pure virtual]
addFileArchive(const path &filename, bool ignoreCase=true, bool ignorePaths=true, E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, const core::stringc &password="", IFileArchive **retArchive=0)=0irr::io::IFileSystem [pure virtual]
addFileArchive(IReadFile *file, bool ignoreCase=true, bool ignorePaths=true, E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, const core::stringc &password="", IFileArchive **retArchive=0)=0irr::io::IFileSystem [pure virtual]
addFileArchive(IFileArchive *archive)=0irr::io::IFileSystem [pure virtual]
addFolderFileArchive(const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)irr::io::IFileSystem [inline, virtual]
addPakFileArchive(const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)irr::io::IFileSystem [inline, virtual]
addZipFileArchive(const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)irr::io::IFileSystem [inline, virtual]
changeWorkingDirectoryTo(const path &newDirectory)=0irr::io::IFileSystem [pure virtual]
createAndOpenFile(const path &filename)=0irr::io::IFileSystem [pure virtual]
createAndWriteFile(const path &filename, bool append=false)=0irr::io::IFileSystem [pure virtual]
createEmptyAttributes(video::IVideoDriver *driver=0)=0irr::io::IFileSystem [pure virtual]
createEmptyFileList(const io::path &path, bool ignoreCase, bool ignorePaths)=0irr::io::IFileSystem [pure virtual]
createFileList()=0irr::io::IFileSystem [pure virtual]
createLimitReadFile(const path &fileName, IReadFile *alreadyOpenedFile, long pos, long areaSize)=0irr::io::IFileSystem [pure virtual]
createMemoryReadFile(void *memory, s32 len, const path &fileName, bool deleteMemoryWhenDropped=false)=0irr::io::IFileSystem [pure virtual]
createMemoryWriteFile(void *memory, s32 len, const path &fileName, bool deleteMemoryWhenDropped=false)=0irr::io::IFileSystem [pure virtual]
createXMLReader(const path &filename)=0irr::io::IFileSystem [pure virtual]
createXMLReader(IReadFile *file)=0irr::io::IFileSystem [pure virtual]
createXMLReaderUTF8(const path &filename)=0irr::io::IFileSystem [pure virtual]
createXMLReaderUTF8(IReadFile *file)=0irr::io::IFileSystem [pure virtual]
createXMLWriter(const path &filename)=0irr::io::IFileSystem [pure virtual]
createXMLWriter(IWriteFile *file)=0irr::io::IFileSystem [pure virtual]
drop() const irr::IReferenceCounted [inline]
existFile(const path &filename) const =0irr::io::IFileSystem [pure virtual]
flattenFilename(path &directory, const path &root="/") const =0irr::io::IFileSystem [pure virtual]
getAbsolutePath(const path &filename) const =0irr::io::IFileSystem [pure virtual]
getArchiveLoader(u32 index) const =0irr::io::IFileSystem [pure virtual]
getArchiveLoaderCount() const =0irr::io::IFileSystem [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFileArchive(u32 index)=0irr::io::IFileSystem [pure virtual]
getFileArchiveCount() const =0irr::io::IFileSystem [pure virtual]
getFileBasename(const path &filename, bool keepExtension=true) const =0irr::io::IFileSystem [pure virtual]
getFileDir(const path &filename) const =0irr::io::IFileSystem [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeFilename(const path &filename, const path &directory) const =0irr::io::IFileSystem [pure virtual]
getWorkingDirectory()=0irr::io::IFileSystem [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
moveFileArchive(u32 sourceIndex, s32 relative)=0irr::io::IFileSystem [pure virtual]
removeFileArchive(u32 index)=0irr::io::IFileSystem [pure virtual]
removeFileArchive(const path &filename)=0irr::io::IFileSystem [pure virtual]
removeFileArchive(const IFileArchive *archive)=0irr::io::IFileSystem [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setFileListSystem(EFileSystemType listType)=0irr::io::IFileSystem [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.html new file mode 100644 index 0000000..b131fe4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.html @@ -0,0 +1,1381 @@ + + + + +Irrlicht 3D Engine: irr::io::IFileSystem Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IFileSystem Class Reference
+
+
+ +

The FileSystem manages files and archives and provides access to them. + More...

+ +

#include <IFileSystem.h>

+
+ + Inheritance diagram for irr::io::IFileSystem:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

The FileSystem manages files and archives and provides access to them.

+

It manages where files are, so that modules which use the the IO do not need to know where every file is located. A file could be in a .zip-Archive or as file on disk, using the IFileSystem makes no difference to this.

+ +

Definition at line 32 of file IFileSystem.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::io::IFileSystem::addArchiveLoader (IArchiveLoaderloader) [pure virtual]
+
+
+ +

Adds an external archive loader to the engine.

+

Use this function to add support for new archive types to the engine, for example proprietary or encrypted file storage.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IFileSystem::addFileArchive (const pathfilename,
bool ignoreCase = true,
bool ignorePaths = true,
E_FILE_ARCHIVE_TYPE archiveType = EFAT_UNKNOWN,
const core::stringcpassword = "",
IFileArchive ** retArchive = 0 
) [pure virtual]
+
+
+ +

Adds an archive to the file system.

+

After calling this, the Irrlicht Engine will also search and open files directly from this archive. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are just renamed .zip files. By default Irrlicht supports ZIP, PAK, TAR, PNK, and directories as archives. You can provide your own archive types by implementing IArchiveLoader and passing an instance to addArchiveLoader. Irrlicht supports AES-encrypted zip files, and the advanced compression techniques lzma and bzip2.

+
Parameters:
+ + + + + + + +
filename,:Filename of the archive to add to the file system.
ignoreCase,:If set to true, files in the archive can be accessed without writing all letters in the right case.
ignorePaths,:If set to true, files in the added archive can be accessed without its complete path.
archiveType,:If no specific E_FILE_ARCHIVE_TYPE is selected then the type of archive will depend on the extension of the file name. If you use a different extension then you can use this parameter to force a specific type of archive.
passwordAn optional password, which is used in case of encrypted archives.
retArchiveA pointer that will be set to the archive that is added.
+
+
+
Returns:
True if the archive was added successfully, false if not.
+ +

Referenced by addFolderFileArchive(), addPakFileArchive(), and addZipFileArchive().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IFileSystem::addFileArchive (IReadFilefile,
bool ignoreCase = true,
bool ignorePaths = true,
E_FILE_ARCHIVE_TYPE archiveType = EFAT_UNKNOWN,
const core::stringcpassword = "",
IFileArchive ** retArchive = 0 
) [pure virtual]
+
+
+ +

Adds an archive to the file system.

+

After calling this, the Irrlicht Engine will also search and open files directly from this archive. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are just renamed .zip files. By default Irrlicht supports ZIP, PAK, TAR, PNK, and directories as archives. You can provide your own archive types by implementing IArchiveLoader and passing an instance to addArchiveLoader. Irrlicht supports AES-encrypted zip files, and the advanced compression techniques lzma and bzip2. If you want to add a directory as an archive, prefix its name with a slash in order to let Irrlicht recognize it as a folder mount (mypath/). Using this technique one can build up a search order, because archives are read first, and can be used more easily with relative filenames.

+
Parameters:
+ + + + + + + +
file,:Archive to add to the file system.
ignoreCase,:If set to true, files in the archive can be accessed without writing all letters in the right case.
ignorePaths,:If set to true, files in the added archive can be accessed without its complete path.
archiveType,:If no specific E_FILE_ARCHIVE_TYPE is selected then the type of archive will depend on the extension of the file name. If you use a different extension then you can use this parameter to force a specific type of archive.
passwordAn optional password, which is used in case of encrypted archives.
retArchiveA pointer that will be set to the archive that is added.
+
+
+
Returns:
True if the archive was added successfully, false if not.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileSystem::addFileArchive (IFileArchivearchive) [pure virtual]
+
+
+ +

Adds an archive to the file system.

+
Parameters:
+ + +
archive,:The archive to add to the file system.
+
+
+
Returns:
True if the archive was added successfully, false if not.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual _IRR_DEPRECATED_ bool irr::io::IFileSystem::addFolderFileArchive (const c8filename,
bool ignoreCase = true,
bool ignorePaths = true 
) [inline, virtual]
+
+
+ +

Adds an unzipped archive (or basedirectory with subdirectories..) to the file system.

+
Deprecated:
This function is provided for compatibility with older versions of Irrlicht and may be removed in Irrlicht 1.9, you should use addFileArchive instead. Useful for handling data which will be in a zip file
+
Parameters:
+ + + + +
filename,:Filename of the unzipped zip archive base directory to add to the file system.
ignoreCase,:If set to true, files in the archive can be accessed without writing all letters in the right case.
ignorePaths,:If set to true, files in the added archive can be accessed without its complete path.
+
+
+
Returns:
True if the archive was added successful, false if not.
+ +

Definition at line 244 of file IFileSystem.h.

+ +

References addFileArchive(), and irr::io::EFAT_FOLDER.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual _IRR_DEPRECATED_ bool irr::io::IFileSystem::addPakFileArchive (const c8filename,
bool ignoreCase = true,
bool ignorePaths = true 
) [inline, virtual]
+
+
+ +

Adds a pak archive to the file system.

+
Deprecated:
This function is provided for compatibility with older versions of Irrlicht and may be removed in Irrlicht 1.9, you should use addFileArchive instead. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake2/KingPin/Hexen2 .pak files
+
Parameters:
+ + + + +
filename,:Filename of the pak archive to add to the file system.
ignoreCase,:If set to true, files in the archive can be accessed without writing all letters in the right case.
ignorePaths,:If set to true, files in the added archive can be accessed without its complete path.(should not use with Quake2 paks
+
+
+
Returns:
True if the archive was added successful, false if not.
+ +

Definition at line 262 of file IFileSystem.h.

+ +

References addFileArchive(), and irr::io::EFAT_PAK.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual _IRR_DEPRECATED_ bool irr::io::IFileSystem::addZipFileArchive (const c8filename,
bool ignoreCase = true,
bool ignorePaths = true 
) [inline, virtual]
+
+
+ +

Adds a zip archive to the file system.

+
Deprecated:
This function is provided for compatibility with older versions of Irrlicht and may be removed in Irrlicht 1.9, you should use addFileArchive instead. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are no different than .zip files.
+
Parameters:
+ + + + +
filename,:Filename of the zip archive to add to the file system.
ignoreCase,:If set to true, files in the archive can be accessed without writing all letters in the right case.
ignorePaths,:If set to true, files in the added archive can be accessed without its complete path.
+
+
+
Returns:
True if the archive was added successfully, false if not.
+ +

Definition at line 228 of file IFileSystem.h.

+ +

References addFileArchive(), and irr::io::EFAT_ZIP.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileSystem::changeWorkingDirectoryTo (const pathnewDirectory) [pure virtual]
+
+
+ +

Changes the current working directory.

+
Parameters:
+ + +
newDirectory,:A string specifying the new working directory. The string is operating system dependent. Under Windows it has the form "<drive>:\<directory>\<sudirectory>\<..>". An example would be: "C:\Windows\"
+
+
+
Returns:
True if successful, otherwise false.
+ +
+
+ +
+
+ + + + + + + + +
virtual IReadFile* irr::io::IFileSystem::createAndOpenFile (const pathfilename) [pure virtual]
+
+
+ +

Opens a file for read access.

+
Parameters:
+ + +
filename,:Name of file to open.
+
+
+
Returns:
Pointer to the created file interface. The returned pointer should be dropped when no longer needed. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IWriteFile* irr::io::IFileSystem::createAndWriteFile (const pathfilename,
bool append = false 
) [pure virtual]
+
+
+ +

Opens a file for write access.

+
Parameters:
+ + + +
filename,:Name of file to open.
append,:If the file already exist, all write operations are appended to the file.
+
+
+
Returns:
Pointer to the created file interface. 0 is returned, if the file could not created or opened for writing. The returned pointer should be dropped when no longer needed. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IAttributes* irr::io::IFileSystem::createEmptyAttributes (video::IVideoDriverdriver = 0) [pure virtual]
+
+
+ +

Creates a new empty collection of attributes, usable for serialization and more.

+
Parameters:
+ + +
driver,:Video driver to be used to load textures when specified as attribute values. Can be null to prevent automatic texture loading by attributes.
+
+
+
Returns:
Pointer to the created object. If you no longer need the object, you should call IAttributes::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IFileList* irr::io::IFileSystem::createEmptyFileList (const io::pathpath,
bool ignoreCase,
bool ignorePaths 
) [pure virtual]
+
+
+ +

Creates an empty filelist.

+
Returns:
a Pointer to the created IFileList is returned. After the list has been used it has to be deleted using its IFileList::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual IFileList* irr::io::IFileSystem::createFileList () [pure virtual]
+
+
+ +

Creates a list of files and directories in the current working directory and returns it.

+
Returns:
a Pointer to the created IFileList is returned. After the list has been used it has to be deleted using its IFileList::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IReadFile* irr::io::IFileSystem::createLimitReadFile (const pathfileName,
IReadFilealreadyOpenedFile,
long pos,
long areaSize 
) [pure virtual]
+
+
+ +

Creates an IReadFile interface for accessing files inside files.

+

This is useful e.g. for archives.

+
Parameters:
+ + + + + +
fileName,:The name given to this file
alreadyOpenedFile,:Pointer to the enclosing file
pos,:Start of the file inside alreadyOpenedFile
areaSize,:The length of the file
+
+
+
Returns:
A pointer to the created file interface. The returned pointer should be dropped when no longer needed. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IReadFile* irr::io::IFileSystem::createMemoryReadFile (void * memory,
s32 len,
const pathfileName,
bool deleteMemoryWhenDropped = false 
) [pure virtual]
+
+
+ +

Creates an IReadFile interface for accessing memory like a file.

+

This allows you to use a pointer to memory where an IReadFile is requested.

+
Parameters:
+ + + + + +
memory,:A pointer to the start of the file in memory
len,:The length of the memory in bytes
fileName,:The name given to this file
deleteMemoryWhenDropped,:True if the memory should be deleted along with the IReadFile when it is dropped.
+
+
+
Returns:
Pointer to the created file interface. The returned pointer should be dropped when no longer needed. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IWriteFile* irr::io::IFileSystem::createMemoryWriteFile (void * memory,
s32 len,
const pathfileName,
bool deleteMemoryWhenDropped = false 
) [pure virtual]
+
+
+ +

Creates an IWriteFile interface for accessing memory like a file.

+

This allows you to use a pointer to memory where an IWriteFile is requested. You are responsible for allocating enough memory.

+
Parameters:
+ + + + + +
memory,:A pointer to the start of the file in memory (allocated by you)
len,:The length of the memory in bytes
fileName,:The name given to this file
deleteMemoryWhenDropped,:True if the memory should be deleted along with the IWriteFile when it is dropped.
+
+
+
Returns:
Pointer to the created file interface. The returned pointer should be dropped when no longer needed. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IXMLReader* irr::io::IFileSystem::createXMLReader (const pathfilename) [pure virtual]
+
+
+ +

Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).

+

Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for more information on how to use the parser.

+
Returns:
0, if file could not be opened, otherwise a pointer to the created IXMLReader is returned. After use, the reader has to be deleted using its IXMLReader::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IXMLReader* irr::io::IFileSystem::createXMLReader (IReadFilefile) [pure virtual]
+
+
+ +

Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).

+

Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for more information on how to use the parser.

+
Returns:
0, if file could not be opened, otherwise a pointer to the created IXMLReader is returned. After use, the reader has to be deleted using its IXMLReader::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IXMLReaderUTF8* irr::io::IFileSystem::createXMLReaderUTF8 (const pathfilename) [pure virtual]
+
+
+ +

Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).

+

Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for more information on how to use the parser.

+
Returns:
0, if file could not be opened, otherwise a pointer to the created IXMLReader is returned. After use, the reader has to be deleted using its IXMLReaderUTF8::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IXMLReaderUTF8* irr::io::IFileSystem::createXMLReaderUTF8 (IReadFilefile) [pure virtual]
+
+
+ +

Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).

+

Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for more information on how to use the parser.

+
Returns:
0, if file could not be opened, otherwise a pointer to the created IXMLReader is returned. After use, the reader has to be deleted using its IXMLReaderUTF8::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IXMLWriter* irr::io::IFileSystem::createXMLWriter (const pathfilename) [pure virtual]
+
+
+ +

Creates a XML Writer from a file.

+
Returns:
0, if file could not be opened, otherwise a pointer to the created IXMLWriter is returned. After use, the reader has to be deleted using its IXMLWriter::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IXMLWriter* irr::io::IFileSystem::createXMLWriter (IWriteFilefile) [pure virtual]
+
+
+ +

Creates a XML Writer from a file.

+
Returns:
0, if file could not be opened, otherwise a pointer to the created IXMLWriter is returned. After use, the reader has to be deleted using its IXMLWriter::drop() method. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileSystem::existFile (const pathfilename) const [pure virtual]
+
+
+ +

Determines if a file exists and could be opened.

+
Parameters:
+ + +
filenameis the string identifying the file which should be tested for existence.
+
+
+
Returns:
True if file exists, and false if it does not exist or an error occured.
+ +

Referenced by irr::scene::quake3::getTextures().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual path& irr::io::IFileSystem::flattenFilename (pathdirectory,
const pathroot = "/" 
) const [pure virtual]
+
+
+ +

flatten a path and file name for example: "/you/me/../." becomes "/you"

+ +
+
+ +
+
+ + + + + + + + +
virtual path irr::io::IFileSystem::getAbsolutePath (const pathfilename) const [pure virtual]
+
+
+ +

Converts a relative path to an absolute (unique) path, resolving symbolic links if required.

+
Parameters:
+ + +
filenamePossibly relative file or directory name to query.
+
+
+
Returns:
Absolute filename which points to the same file.
+ +
+
+ +
+
+ + + + + + + + +
virtual IArchiveLoader* irr::io::IFileSystem::getArchiveLoader (u32 index) const [pure virtual]
+
+
+ +

Retrieve the given archive loader.

+
Parameters:
+ + +
indexThe index of the loader to retrieve. This parameter is an 0-based array index.
+
+
+
Returns:
A pointer to the specified loader, 0 if the index is incorrect.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::io::IFileSystem::getArchiveLoaderCount () const [pure virtual]
+
+
+ +

Gets the number of archive loaders currently added.

+ +
+
+ +
+
+ + + + + + + + +
virtual IFileArchive* irr::io::IFileSystem::getFileArchive (u32 index) [pure virtual]
+
+
+ +

Get the archive at a given index.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::io::IFileSystem::getFileArchiveCount () const [pure virtual]
+
+
+ +

Get the number of archives currently attached to the file system.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual path irr::io::IFileSystem::getFileBasename (const pathfilename,
bool keepExtension = true 
) const [pure virtual]
+
+
+ +

Get the base part of a filename, i.e. the name without the directory part.

+

If no directory is prefixed, the full name is returned.

+
Parameters:
+ + + +
filename,:The file to get the basename from
keepExtensionTrue if filename with extension is returned otherwise everything after the final '.' is removed as well.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual path irr::io::IFileSystem::getFileDir (const pathfilename) const [pure virtual]
+
+
+ +

Get the directory a file is located in.

+
Parameters:
+ + +
filename,:The file to get the directory from.
+
+
+
Returns:
String containing the directory of the file.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual path irr::io::IFileSystem::getRelativeFilename (const pathfilename,
const pathdirectory 
) const [pure virtual]
+
+
+ +

Get the relative filename, relative to the given directory.

+ +
+
+ +
+
+ + + + + + + +
virtual const path& irr::io::IFileSystem::getWorkingDirectory () [pure virtual]
+
+
+ +

Get the current working directory.

+
Returns:
Current working directory as a string.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IFileSystem::moveFileArchive (u32 sourceIndex,
s32 relative 
) [pure virtual]
+
+
+ +

Changes the search order of attached archives.

+
Parameters:
+ + + +
sourceIndex,:The index of the archive to change
relative,:The relative change in position, archives with a lower index are searched first
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileSystem::removeFileArchive (u32 index) [pure virtual]
+
+
+ +

Removes an archive from the file system.

+

This will close the archive and free any file handles, but will not close resources which have already been loaded and are now cached, for example textures and meshes.

+
Parameters:
+ + +
index,:The index of the archive to remove
+
+
+
Returns:
True on success, false on failure
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileSystem::removeFileArchive (const pathfilename) [pure virtual]
+
+
+ +

Removes an archive from the file system.

+

This will close the archive and free any file handles, but will not close resources which have already been loaded and are now cached, for example textures and meshes. Note that a relative filename might be interpreted differently on each call, depending on the current working directory. In case you want to remove an archive that was added using a relative path name, you have to change to the same working directory again. This means, that the filename given on creation is not an identifier for the archive, but just a usual filename that is used for locating the archive to work with.

+
Parameters:
+ + +
filenameThe archive pointed to by the name will be removed
+
+
+
Returns:
True on success, false on failure
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::io::IFileSystem::removeFileArchive (const IFileArchivearchive) [pure virtual]
+
+
+ +

Removes an archive from the file system.

+

This will close the archive and free any file handles, but will not close resources which have already been loaded and are now cached, for example textures and meshes.

+
Parameters:
+ + +
archiveThe archive to remove.
+
+
+
Returns:
True on success, false on failure
+ +
+
+ +
+
+ + + + + + + + +
virtual EFileSystemType irr::io::IFileSystem::setFileListSystem (EFileSystemType listType) [pure virtual]
+
+
+ +

Set the active type of file system.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.png new file mode 100644 index 0000000..d1728cb Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_file_system.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader-members.html new file mode 100644 index 0000000..9bc0875 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader-members.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IIrrXMLReader< char_type, super_class > Member List
+
+
+This is the complete list of members for irr::io::IIrrXMLReader< char_type, super_class >, including all inherited members. + + + + + + + + + + + + + + + + + +
getAttributeCount() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeName(int idx) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValue(int idx) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValue(const char_type *name) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValueAsFloat(const char_type *name) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValueAsFloat(int idx) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValueAsInt(const char_type *name) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValueAsInt(int idx) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getAttributeValueSafe(const char_type *name) const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getNodeData() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getNodeName() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getNodeType() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getParserFormat() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
getSourceFormat() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
isEmptyElement() const =0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
read()=0irr::io::IIrrXMLReader< char_type, super_class > [pure virtual]
~IIrrXMLReader()irr::io::IIrrXMLReader< char_type, super_class > [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader.html new file mode 100644 index 0000000..b4e92f8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_irr_x_m_l_reader.html @@ -0,0 +1,603 @@ + + + + +Irrlicht 3D Engine: irr::io::IIrrXMLReader< char_type, super_class > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IIrrXMLReader< char_type, super_class > Class Template Reference
+
+
+ +

Interface providing easy read access to a XML file. + More...

+ +

#include <irrXML.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • virtual ~IIrrXMLReader () +
    Destructor.
  • virtual unsigned int getAttributeCount () const =0 +
    Returns attribute count of the current XML node.
  • virtual const char_type * getAttributeName (int idx) const =0 +
    Returns name of an attribute.
  • virtual const char_type * getAttributeValue (int idx) const =0 +
    Returns the value of an attribute.
  • virtual const char_type * getAttributeValue (const char_type *name) const =0 +
    Returns the value of an attribute.
  • virtual float getAttributeValueAsFloat (const char_type *name) const =0 +
    Returns the value of an attribute as float.
  • virtual float getAttributeValueAsFloat (int idx) const =0 +
    Returns the value of an attribute as float.
  • virtual int getAttributeValueAsInt (const char_type *name) const =0 +
    Returns the value of an attribute as integer.
  • virtual int getAttributeValueAsInt (int idx) const =0 +
    Returns the value of an attribute as integer.
  • virtual const char_type * getAttributeValueSafe (const char_type *name) const =0 +
    Returns the value of an attribute in a safe way.
  • virtual const char_type * getNodeData () const =0 +
    Returns data of the current node.
  • virtual const char_type * getNodeName () const =0 +
    Returns the name of the current node.
  • virtual EXML_NODE getNodeType () const =0 +
    Returns the type of the current XML node.
  • virtual ETEXT_FORMAT getParserFormat () const =0 +
    Returns format of the strings returned by the parser.
  • virtual ETEXT_FORMAT getSourceFormat () const =0 +
    Returns format of the source xml file.
  • virtual bool isEmptyElement () const =0 +
    Returns if an element is an empty element, like <foo />
  • virtual bool read ()=0 +
    Reads forward to the next xml node.
+

Detailed Description

+

template<class char_type, class super_class>
+class irr::io::IIrrXMLReader< char_type, super_class >

+ +

Interface providing easy read access to a XML file.

+

You can create an instance of this reader using one of the factory functions createIrrXMLReader(), createIrrXMLReaderUTF16() and createIrrXMLReaderUTF32(). If using the parser from the Irrlicht Engine, please use IFileSystem::createXMLReader() instead. For a detailed intro how to use the parser, see irrxmlexample and features.

+

The typical usage of this parser looks like this:

+
    #include <irrXML.h>
+    using namespace irr; // irrXML is located in the namespace irr::io
+    using namespace io;
+
+    void main()
+    {
+        // create the reader using one of the factory functions
+        IrrXMLReader* xml = createIrrXMLReader("config.xml");
+
+        if (xml == 0)
+            return; // file could not be opened
+
+        // parse the file until end reached
+        while(xml->read())
+        {
+            // based on xml->getNodeType(), do something.
+        }
+
+        // delete the xml parser after usage
+        delete xml;
+    }
+

See irrxmlexample for a more detailed example.

+ +

Definition at line 275 of file irrXML.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual irr::io::IIrrXMLReader< char_type, super_class >::~IIrrXMLReader () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 280 of file irrXML.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual unsigned int irr::io::IIrrXMLReader< char_type, super_class >::getAttributeCount () const [pure virtual]
+
+
+ +

Returns attribute count of the current XML node.

+

This is usually non null if the current node is EXN_ELEMENT, and the element has attributes.

+
Returns:
Returns amount of attributes of this xml node.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual const char_type* irr::io::IIrrXMLReader< char_type, super_class >::getAttributeName (int idx) const [pure virtual]
+
+
+ +

Returns name of an attribute.

+
Parameters:
+ + +
idx,:Zero based index, should be something between 0 and getAttributeCount()-1.
+
+
+
Returns:
Name of the attribute, 0 if an attribute with this index does not exist.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual const char_type* irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValue (int idx) const [pure virtual]
+
+
+ +

Returns the value of an attribute.

+
Parameters:
+ + +
idx,:Zero based index, should be something between 0 and getAttributeCount()-1.
+
+
+
Returns:
Value of the attribute, 0 if an attribute with this index does not exist.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual const char_type* irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValue (const char_type * name) const [pure virtual]
+
+
+ +

Returns the value of an attribute.

+
Parameters:
+ + +
name,:Name of the attribute.
+
+
+
Returns:
Value of the attribute, 0 if an attribute with this name does not exist.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual float irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValueAsFloat (const char_type * name) const [pure virtual]
+
+
+ +

Returns the value of an attribute as float.

+
Parameters:
+ + +
name,:Name of the attribute.
+
+
+
Returns:
Value of the attribute as float, and 0 if an attribute with this name does not exist or the value could not be interpreted as float.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual float irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValueAsFloat (int idx) const [pure virtual]
+
+
+ +

Returns the value of an attribute as float.

+
Parameters:
+ + +
idx,:Zero based index, should be something between 0 and getAttributeCount()-1.
+
+
+
Returns:
Value of the attribute as float, and 0 if an attribute with this index does not exist or the value could not be interpreted as float.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual int irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValueAsInt (const char_type * name) const [pure virtual]
+
+
+ +

Returns the value of an attribute as integer.

+
Parameters:
+ + +
nameName of the attribute.
+
+
+
Returns:
Value of the attribute as integer, and 0 if an attribute with this name does not exist or the value could not be interpreted as integer.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual int irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValueAsInt (int idx) const [pure virtual]
+
+
+ +

Returns the value of an attribute as integer.

+
Parameters:
+ + +
idx,:Zero based index, should be something between 0 and getAttributeCount()-1.
+
+
+
Returns:
Value of the attribute as integer, and 0 if an attribute with this index does not exist or the value could not be interpreted as integer.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + + +
virtual const char_type* irr::io::IIrrXMLReader< char_type, super_class >::getAttributeValueSafe (const char_type * name) const [pure virtual]
+
+
+ +

Returns the value of an attribute in a safe way.

+

Like getAttributeValue(), but does not return 0 if the attribute does not exist. An empty string ("") is returned then.

+
Parameters:
+ + +
name,:Name of the attribute.
+
+
+
Returns:
Value of the attribute, and "" if an attribute with this name does not exist
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual const char_type* irr::io::IIrrXMLReader< char_type, super_class >::getNodeData () const [pure virtual]
+
+
+ +

Returns data of the current node.

+

Only valid if the node has some data and it is of type EXN_TEXT, EXN_COMMENT, EXN_CDATA or EXN_UNKNOWN.

+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual const char_type* irr::io::IIrrXMLReader< char_type, super_class >::getNodeName () const [pure virtual]
+
+
+ +

Returns the name of the current node.

+

Only valid, if the node type is EXN_ELEMENT.

+
Returns:
Name of the current node or 0 if the node has no name.
+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual EXML_NODE irr::io::IIrrXMLReader< char_type, super_class >::getNodeType () const [pure virtual]
+
+
+ +

Returns the type of the current XML node.

+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual ETEXT_FORMAT irr::io::IIrrXMLReader< char_type, super_class >::getParserFormat () const [pure virtual]
+
+
+ +

Returns format of the strings returned by the parser.

+

This will be UTF8 for example when you created a parser with IrrXMLReaderUTF8() and UTF32 when it has been created using IrrXMLReaderUTF32. It should not be necessary to call this method and only exists for informational purposes.

+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual ETEXT_FORMAT irr::io::IIrrXMLReader< char_type, super_class >::getSourceFormat () const [pure virtual]
+
+
+ +

Returns format of the source xml file.

+

It is not necessary to use this method because the parser will convert the input file format to the format wanted by the user when creating the parser. This method is useful to get/display additional informations.

+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual bool irr::io::IIrrXMLReader< char_type, super_class >::isEmptyElement () const [pure virtual]
+
+
+ +

Returns if an element is an empty element, like <foo />

+ +
+
+ +
+
+
+template<class char_type , class super_class >
+ + + + + + + +
virtual bool irr::io::IIrrXMLReader< char_type, super_class >::read () [pure virtual]
+
+
+ +

Reads forward to the next xml node.

+
Returns:
Returns false, if there was no further node.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file-members.html new file mode 100644 index 0000000..d85d8f3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IReadFile Member List
+
+
+This is the complete list of members for irr::io::IReadFile, including all inherited members. + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getFileName() const =0irr::io::IReadFile [pure virtual]
getPos() const =0irr::io::IReadFile [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSize() const =0irr::io::IReadFile [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
read(void *buffer, u32 sizeToRead)=0irr::io::IReadFile [pure virtual]
seek(long finalPos, bool relativeMovement=false)=0irr::io::IReadFile [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.html new file mode 100644 index 0000000..34a67b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.html @@ -0,0 +1,290 @@ + + + + +Irrlicht 3D Engine: irr::io::IReadFile Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IReadFile Class Reference
+
+
+ +

Interface providing read acess to a file. + More...

+ +

#include <IReadFile.h>

+
+ + Inheritance diagram for irr::io::IReadFile:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual const io::path & getFileName () const =0 +
    Get name of file.
  • virtual long getPos () const =0 +
    Get the current position in the file.
  • virtual long getSize () const =0 +
    Get size of file.
  • virtual s32 read (void *buffer, u32 sizeToRead)=0 +
    Reads an amount of bytes from the file.
  • virtual bool seek (long finalPos, bool relativeMovement=false)=0 +
    Changes position in file.
+

Detailed Description

+

Interface providing read acess to a file.

+ +

Definition at line 17 of file IReadFile.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const io::path& irr::io::IReadFile::getFileName () const [pure virtual]
+
+
+ +

Get name of file.

+
Returns:
File name as zero terminated character string.
+ +
+
+ +
+
+ + + + + + + +
virtual long irr::io::IReadFile::getPos () const [pure virtual]
+
+
+ +

Get the current position in the file.

+
Returns:
Current position in the file in bytes.
+ +
+
+ +
+
+ + + + + + + +
virtual long irr::io::IReadFile::getSize () const [pure virtual]
+
+
+ +

Get size of file.

+
Returns:
Size of the file in bytes.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::io::IReadFile::read (void * buffer,
u32 sizeToRead 
) [pure virtual]
+
+
+ +

Reads an amount of bytes from the file.

+
Parameters:
+ + + +
bufferPointer to buffer where read bytes are written to.
sizeToReadAmount of bytes to read from the file.
+
+
+
Returns:
How many bytes were read.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IReadFile::seek (long finalPos,
bool relativeMovement = false 
) [pure virtual]
+
+
+ +

Changes position in file.

+
Parameters:
+ + + +
finalPosDestination position in the file.
relativeMovementIf set to true, the position in the file is changed relative to current position. Otherwise the position is changed from beginning of file.
+
+
+
Returns:
True if successful, otherwise false.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.png new file mode 100644 index 0000000..d758687 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_read_file.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file-members.html new file mode 100644 index 0000000..97753c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IWriteFile Member List
+
+
+This is the complete list of members for irr::io::IWriteFile, including all inherited members. + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getFileName() const =0irr::io::IWriteFile [pure virtual]
getPos() const =0irr::io::IWriteFile [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
seek(long finalPos, bool relativeMovement=false)=0irr::io::IWriteFile [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
write(const void *buffer, u32 sizeToWrite)=0irr::io::IWriteFile [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.html new file mode 100644 index 0000000..11b192c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.html @@ -0,0 +1,270 @@ + + + + +Irrlicht 3D Engine: irr::io::IWriteFile Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IWriteFile Class Reference
+
+
+ +

Interface providing write access to a file. + More...

+ +

#include <IWriteFile.h>

+
+ + Inheritance diagram for irr::io::IWriteFile:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual const path & getFileName () const =0 +
    Get name of file.
  • virtual long getPos () const =0 +
    Get the current position in the file.
  • virtual bool seek (long finalPos, bool relativeMovement=false)=0 +
    Changes position in file.
  • virtual s32 write (const void *buffer, u32 sizeToWrite)=0 +
    Writes an amount of bytes to the file.
+

Detailed Description

+

Interface providing write access to a file.

+ +

Definition at line 17 of file IWriteFile.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const path& irr::io::IWriteFile::getFileName () const [pure virtual]
+
+
+ +

Get name of file.

+
Returns:
File name as zero terminated character string.
+ +
+
+ +
+
+ + + + + + + +
virtual long irr::io::IWriteFile::getPos () const [pure virtual]
+
+
+ +

Get the current position in the file.

+
Returns:
Current position in the file in bytes.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::io::IWriteFile::seek (long finalPos,
bool relativeMovement = false 
) [pure virtual]
+
+
+ +

Changes position in file.

+
Parameters:
+ + + +
finalPosDestination position in the file.
relativeMovementIf set to true, the position in the file is changed relative to current position. Otherwise the position is changed from begin of file.
+
+
+
Returns:
True if successful, otherwise false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::io::IWriteFile::write (const void * buffer,
u32 sizeToWrite 
) [pure virtual]
+
+
+ +

Writes an amount of bytes to the file.

+
Parameters:
+ + + +
bufferPointer to buffer of bytes to write.
sizeToWriteAmount of bytes to write to the file.
+
+
+
Returns:
How much bytes were written.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.png new file mode 100644 index 0000000..4f6e474 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_write_file.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_base.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_base.html new file mode 100644 index 0000000..8dc31b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_base.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: irr::io::IXMLBase Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IXMLBase Class Reference
+
+
+ +

Empty class to be used as parent class for IrrXMLReader. + More...

+ +

#include <irrXML.h>

+

Detailed Description

+

Empty class to be used as parent class for IrrXMLReader.

+

If you need another class as base class for the xml reader, you can do this by creating the reader using for example new CXMLReaderImpl<char, YourBaseClass>(yourcallback); The Irrlicht Engine for example needs IReferenceCounted as base class for every object to let it automaticly reference countend, hence it replaces IXMLBase with IReferenceCounted. See irrXML.cpp on how this can be done in detail.

+ +

Definition at line 237 of file irrXML.h.

+

The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer-members.html new file mode 100644 index 0000000..bd21112 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer-members.html @@ -0,0 +1,134 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::IXMLWriter Member List
+
+
+This is the complete list of members for irr::io::IXMLWriter, including all inherited members. + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
writeClosingTag(const wchar_t *name)=0irr::io::IXMLWriter [pure virtual]
writeComment(const wchar_t *comment)=0irr::io::IXMLWriter [pure virtual]
writeElement(const wchar_t *name, bool empty=false, const wchar_t *attr1Name=0, const wchar_t *attr1Value=0, const wchar_t *attr2Name=0, const wchar_t *attr2Value=0, const wchar_t *attr3Name=0, const wchar_t *attr3Value=0, const wchar_t *attr4Name=0, const wchar_t *attr4Value=0, const wchar_t *attr5Name=0, const wchar_t *attr5Value=0)=0irr::io::IXMLWriter [pure virtual]
writeElement(const wchar_t *name, bool empty, core::array< core::stringw > &names, core::array< core::stringw > &values)=0irr::io::IXMLWriter [pure virtual]
writeLineBreak()=0irr::io::IXMLWriter [pure virtual]
writeText(const wchar_t *text)=0irr::io::IXMLWriter [pure virtual]
writeXMLHeader()=0irr::io::IXMLWriter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.html new file mode 100644 index 0000000..70e5123 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.html @@ -0,0 +1,403 @@ + + + + +Irrlicht 3D Engine: irr::io::IXMLWriter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::IXMLWriter Class Reference
+
+
+ +

Interface providing methods for making it easier to write XML files. + More...

+ +

#include <IXMLWriter.h>

+
+ + Inheritance diagram for irr::io::IXMLWriter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual void writeClosingTag (const wchar_t *name)=0 +
    Writes the closing tag for an element. Like "</foo>".
  • virtual void writeComment (const wchar_t *comment)=0 +
    Writes a comment into the xml file.
  • virtual void writeElement (const wchar_t *name, bool empty=false, const wchar_t *attr1Name=0, const wchar_t *attr1Value=0, const wchar_t *attr2Name=0, const wchar_t *attr2Value=0, const wchar_t *attr3Name=0, const wchar_t *attr3Value=0, const wchar_t *attr4Name=0, const wchar_t *attr4Value=0, const wchar_t *attr5Name=0, const wchar_t *attr5Value=0)=0 +
  • virtual void writeElement (const wchar_t *name, bool empty, core::array< core::stringw > &names, core::array< core::stringw > &values)=0 +
    Writes an xml element with any number of attributes.
  • virtual void writeLineBreak ()=0 +
    Writes a line break.
  • virtual void writeText (const wchar_t *text)=0 +
    Writes a text into the file.
  • virtual void writeXMLHeader ()=0 +
    Writes an xml 1.0 header.
+

Detailed Description

+

Interface providing methods for making it easier to write XML files.

+

This XML Writer writes xml files using in the platform dependent wchar_t format and sets the xml-encoding correspondingly.

+ +

Definition at line 20 of file IXMLWriter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::io::IXMLWriter::writeClosingTag (const wchar_t * name) [pure virtual]
+
+
+ +

Writes the closing tag for an element. Like "</foo>".

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::io::IXMLWriter::writeComment (const wchar_t * comment) [pure virtual]
+
+
+ +

Writes a comment into the xml file.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IXMLWriter::writeElement (const wchar_t * name,
bool empty = false,
const wchar_t * attr1Name = 0,
const wchar_t * attr1Value = 0,
const wchar_t * attr2Name = 0,
const wchar_t * attr2Value = 0,
const wchar_t * attr3Name = 0,
const wchar_t * attr3Value = 0,
const wchar_t * attr4Name = 0,
const wchar_t * attr4Value = 0,
const wchar_t * attr5Name = 0,
const wchar_t * attr5Value = 0 
) [pure virtual]
+
+
+

Writes an xml element with maximal 5 attributes like "<foo />" or <foo optAttr="value" />. The element can be empty or not.

+
Parameters:
+ + + + + + + + + + + + + +
name,:Name of the element
empty,:Specifies if the element should be empty. Like "<foo />". If You set this to false, something like this is written instead: "<foo>".
attr1Name,:1st attributes name
attr1Value,:1st attributes value
attr2Name,:2nd attributes name
attr2Value,:2nd attributes value
attr3Name,:3rd attributes name
attr3Value,:3rd attributes value
attr4Name,:4th attributes name
attr4Value,:4th attributes value
attr5Name,:5th attributes name
attr5Value,:5th attributes value
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::io::IXMLWriter::writeElement (const wchar_t * name,
bool empty,
core::array< core::stringw > & names,
core::array< core::stringw > & values 
) [pure virtual]
+
+
+ +

Writes an xml element with any number of attributes.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::io::IXMLWriter::writeLineBreak () [pure virtual]
+
+
+ +

Writes a line break.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::io::IXMLWriter::writeText (const wchar_t * text) [pure virtual]
+
+
+ +

Writes a text into the file.

+

All occurrences of special characters such as & (&), < (<), > (>), and " (") are automaticly replaced.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::io::IXMLWriter::writeXMLHeader () [pure virtual]
+
+
+ +

Writes an xml 1.0 header.

+

Looks like <?xml version="1.0"?>. This should always be called before writing anything other, because also the text file header for unicode texts is written out with this method.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.png new file mode 100644 index 0000000..b66ca9e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1io_1_1_i_x_m_l_writer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer-members.html new file mode 100644 index 0000000..9ab5bf3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer-members.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::CDynamicMeshBuffer Member List
+
+
+This is the complete list of members for irr::scene::CDynamicMeshBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)irr::scene::IDynamicMeshBuffer [inline, virtual]
append(const IMeshBuffer *const other)irr::scene::IDynamicMeshBuffer [inline, virtual]
BoundingBoxirr::scene::CDynamicMeshBuffer
CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType)irr::scene::CDynamicMeshBuffer [inline]
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const irr::scene::CDynamicMeshBuffer [inline, virtual]
getChangedID_Index() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getChangedID_Vertex() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint_Index() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getHardwareMappingHint_Vertex() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndexBuffer() const irr::scene::CDynamicMeshBuffer [inline, virtual]
getIndexCount() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndexType() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndices() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndices()irr::scene::IDynamicMeshBuffer [inline, virtual]
getMaterial() const irr::scene::CDynamicMeshBuffer [inline, virtual]
getMaterial()irr::scene::CDynamicMeshBuffer [inline, virtual]
getNormal(u32 i) const irr::scene::IDynamicMeshBuffer [inline, virtual]
getNormal(u32 i)irr::scene::IDynamicMeshBuffer [inline, virtual]
getPosition(u32 i) const irr::scene::IDynamicMeshBuffer [inline, virtual]
getPosition(u32 i)irr::scene::IDynamicMeshBuffer [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTCoords(u32 i) const irr::scene::IDynamicMeshBuffer [inline, virtual]
getTCoords(u32 i)irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertexBuffer() const irr::scene::CDynamicMeshBuffer [inline, virtual]
getVertexCount() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertexType() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertices() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertices()irr::scene::IDynamicMeshBuffer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
Materialirr::scene::CDynamicMeshBuffer
recalculateBoundingBox()irr::scene::CDynamicMeshBuffer [inline, virtual]
setBoundingBox(const core::aabbox3df &box)irr::scene::CDynamicMeshBuffer [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::IDynamicMeshBuffer [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::IDynamicMeshBuffer [inline, virtual]
setIndexBuffer(IIndexBuffer *newIndexBuffer)irr::scene::CDynamicMeshBuffer [inline, virtual]
setVertexBuffer(IVertexBuffer *newVertexBuffer)irr::scene::CDynamicMeshBuffer [inline, virtual]
~CDynamicMeshBuffer()irr::scene::CDynamicMeshBuffer [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.html new file mode 100644 index 0000000..44688e3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.html @@ -0,0 +1,469 @@ + + + + +Irrlicht 3D Engine: irr::scene::CDynamicMeshBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::CDynamicMeshBuffer Class Reference
+
+
+ +

#include <CDynamicMeshBuffer.h>

+
+ + Inheritance diagram for irr::scene::CDynamicMeshBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 18 of file CDynamicMeshBuffer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::CDynamicMeshBuffer::CDynamicMeshBuffer (video::E_VERTEX_TYPE vertexType,
video::E_INDEX_TYPE indexType 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 22 of file CDynamicMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::CDynamicMeshBuffer::~CDynamicMeshBuffer () [inline, virtual]
+
+
+ +

destructor

+ +

Definition at line 29 of file CDynamicMeshBuffer.h.

+ +

References irr::IReferenceCounted::drop().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::CDynamicMeshBuffer::getBoundingBox () const [inline, virtual]
+
+
+ +

Get bounding box.

+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 80 of file CDynamicMeshBuffer.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + +
virtual IIndexBuffer& irr::scene::CDynamicMeshBuffer::getIndexBuffer () const [inline, virtual]
+
+
+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 42 of file CDynamicMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SMaterial& irr::scene::CDynamicMeshBuffer::getMaterial () const [inline, virtual]
+
+
+ +

Get Material of this buffer.

+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 68 of file CDynamicMeshBuffer.h.

+ +

References Material.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SMaterial& irr::scene::CDynamicMeshBuffer::getMaterial () [inline, virtual]
+
+
+ +

Get Material of this buffer.

+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 74 of file CDynamicMeshBuffer.h.

+ +

References Material.

+ +
+
+ +
+
+ + + + + + + +
virtual IVertexBuffer& irr::scene::CDynamicMeshBuffer::getVertexBuffer () const [inline, virtual]
+
+
+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 37 of file CDynamicMeshBuffer.h.

+ +

Referenced by recalculateBoundingBox().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::CDynamicMeshBuffer::recalculateBoundingBox () [inline, virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual void irr::scene::CDynamicMeshBuffer::setBoundingBox (const core::aabbox3dfbox) [inline, virtual]
+
+
+ +

Set bounding box.

+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 86 of file CDynamicMeshBuffer.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CDynamicMeshBuffer::setIndexBuffer (IIndexBuffernewIndexBuffer) [inline, virtual]
+
+
+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 57 of file CDynamicMeshBuffer.h.

+ +

References irr::IReferenceCounted::drop(), and irr::IReferenceCounted::grab().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CDynamicMeshBuffer::setVertexBuffer (IVertexBuffernewVertexBuffer) [inline, virtual]
+
+
+ +

Implements irr::scene::IDynamicMeshBuffer.

+ +

Definition at line 47 of file CDynamicMeshBuffer.h.

+ +

References irr::IReferenceCounted::drop(), and irr::IReferenceCounted::grab().

+ +
+
+

Member Data Documentation

+ + + +
+ +
+ +

Definition at line 104 of file CDynamicMeshBuffer.h.

+ +

Referenced by getMaterial().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.png new file mode 100644 index 0000000..7d3b72d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_dynamic_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer-members.html new file mode 100644 index 0000000..0f44336 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer-members.html @@ -0,0 +1,150 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::CIndexBuffer Member List
+
+
+This is the complete list of members for irr::scene::CIndexBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
allocated_size() const irr::scene::CIndexBuffer [inline, virtual]
ChangedIDirr::scene::CIndexBuffer
CIndexBuffer(video::E_INDEX_TYPE IndexType)irr::scene::CIndexBuffer [inline]
CIndexBuffer(const IIndexBuffer &IndexBufferCopy)irr::scene::CIndexBuffer [inline]
drop() const irr::IReferenceCounted [inline]
getChangedID() const irr::scene::CIndexBuffer [inline, virtual]
getData()irr::scene::CIndexBuffer [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint() const irr::scene::CIndexBuffer [inline, virtual]
getLast()irr::scene::CIndexBuffer [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::CIndexBuffer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
Indicesirr::scene::CIndexBuffer
IReferenceCounted()irr::IReferenceCounted [inline]
MappingHintirr::scene::CIndexBuffer
operator[](u32 index) const irr::scene::CIndexBuffer [inline, virtual]
pointer()irr::scene::CIndexBuffer [inline, virtual]
push_back(const u32 &element)irr::scene::CIndexBuffer [inline, virtual]
reallocate(u32 new_size)irr::scene::CIndexBuffer [inline, virtual]
set_used(u32 usedNow)irr::scene::CIndexBuffer [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty()irr::scene::CIndexBuffer [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)irr::scene::CIndexBuffer [inline, virtual]
setType(video::E_INDEX_TYPE IndexType)irr::scene::CIndexBuffer [inline, virtual]
setValue(u32 index, u32 value)irr::scene::CIndexBuffer [inline, virtual]
size() const irr::scene::CIndexBuffer [inline, virtual]
stride() const irr::scene::CIndexBuffer [inline, virtual]
~CIndexBuffer()irr::scene::CIndexBuffer [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.html new file mode 100644 index 0000000..b1bfd18 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.html @@ -0,0 +1,707 @@ + + + + +Irrlicht 3D Engine: irr::scene::CIndexBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::CIndexBuffer Class Reference
+
+
+ +

#include <CIndexBuffer.h>

+
+ + Inheritance diagram for irr::scene::CIndexBuffer:
+
+
+ + +

List of all members.

+

+Classes

+
    +
  • class CSpecificIndexList +
  • class IIndexList +
+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 15 of file CIndexBuffer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::CIndexBuffer::CIndexBuffer (video::E_INDEX_TYPE IndexType) [inline]
+
+
+ +

Definition at line 93 of file CIndexBuffer.h.

+ +

References setType().

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::CIndexBuffer::CIndexBuffer (const IIndexBufferIndexBufferCopy) [inline]
+
+ +
+ +
+
+ + + + + + + +
virtual irr::scene::CIndexBuffer::~CIndexBuffer () [inline, virtual]
+
+
+ +

Definition at line 107 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual u32 irr::scene::CIndexBuffer::allocated_size () const [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 185 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CIndexBuffer::getChangedID () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 215 of file CIndexBuffer.h.

+ +

References ChangedID.

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::CIndexBuffer::getData () [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 144 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::CIndexBuffer::getHardwareMappingHint () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 196 of file CIndexBuffer.h.

+ +

References MappingHint.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CIndexBuffer::getLast () [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 165 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::CIndexBuffer::getType () const [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 146 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::scene::CIndexBuffer::operator[] (u32 index) const [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 160 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::CIndexBuffer::pointer () [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 190 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CIndexBuffer::push_back (const u32element) [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 155 of file CIndexBuffer.h.

+ +

References Indices.

+ +

Referenced by CIndexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CIndexBuffer::reallocate (u32 new_size) [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 180 of file CIndexBuffer.h.

+ +

References Indices.

+ +

Referenced by CIndexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CIndexBuffer::set_used (u32 usedNow) [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 175 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::CIndexBuffer::setDirty () [inline, virtual]
+
+
+ +

flags the mesh as changed, reloads hardware buffers

+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 208 of file CIndexBuffer.h.

+ +

References ChangedID.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CIndexBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) [inline, virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 202 of file CIndexBuffer.h.

+ +

References MappingHint.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CIndexBuffer::setType (video::E_INDEX_TYPE IndexType) [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 113 of file CIndexBuffer.h.

+ +

References irr::video::EIT_16BIT, irr::video::EIT_32BIT, and Indices.

+ +

Referenced by CIndexBuffer().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::CIndexBuffer::setValue (u32 index,
u32 value 
) [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 170 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CIndexBuffer::size () const [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 150 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CIndexBuffer::stride () const [inline, virtual]
+
+
+ +

Implements irr::scene::IIndexBuffer.

+ +

Definition at line 148 of file CIndexBuffer.h.

+ +

References Indices.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 218 of file CIndexBuffer.h.

+ +

Referenced by getChangedID(), and setDirty().

+ +
+
+ + + +
+ +
+ +

Definition at line 217 of file CIndexBuffer.h.

+ +

Referenced by getHardwareMappingHint(), and setHardwareMappingHint().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.png new file mode 100644 index 0000000..c543356 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_index_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer-members.html new file mode 100644 index 0000000..8dfa107 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer-members.html @@ -0,0 +1,163 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::CMeshBuffer< T > Member List
+
+
+This is the complete list of members for irr::scene::CMeshBuffer< T >, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)irr::scene::CMeshBuffer< T > [inline, virtual]
append(const IMeshBuffer *const other)irr::scene::CMeshBuffer< T > [inline, virtual]
BoundingBoxirr::scene::CMeshBuffer< T >
ChangedID_Indexirr::scene::CMeshBuffer< T >
ChangedID_Vertexirr::scene::CMeshBuffer< T >
CMeshBuffer()irr::scene::CMeshBuffer< T > [inline]
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const irr::scene::CMeshBuffer< T > [inline, virtual]
getChangedID_Index() const irr::scene::CMeshBuffer< T > [inline, virtual]
getChangedID_Vertex() const irr::scene::CMeshBuffer< T > [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint_Index() const irr::scene::CMeshBuffer< T > [inline, virtual]
getHardwareMappingHint_Vertex() const irr::scene::CMeshBuffer< T > [inline, virtual]
getIndexCount() const irr::scene::CMeshBuffer< T > [inline, virtual]
getIndexType() const irr::scene::CMeshBuffer< T > [inline, virtual]
getIndices() const irr::scene::CMeshBuffer< T > [inline, virtual]
getIndices()irr::scene::CMeshBuffer< T > [inline, virtual]
getMaterial() const irr::scene::CMeshBuffer< T > [inline, virtual]
getMaterial()irr::scene::CMeshBuffer< T > [inline, virtual]
getNormal(u32 i) const irr::scene::CMeshBuffer< T > [inline, virtual]
getNormal(u32 i)irr::scene::CMeshBuffer< T > [inline, virtual]
getPosition(u32 i) const irr::scene::CMeshBuffer< T > [inline, virtual]
getPosition(u32 i)irr::scene::CMeshBuffer< T > [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTCoords(u32 i) const irr::scene::CMeshBuffer< T > [inline, virtual]
getTCoords(u32 i)irr::scene::CMeshBuffer< T > [inline, virtual]
getVertexCount() const irr::scene::CMeshBuffer< T > [inline, virtual]
getVertexType() const irr::scene::CMeshBuffer< T > [inline, virtual]
getVertices() const irr::scene::CMeshBuffer< T > [inline, virtual]
getVertices()irr::scene::CMeshBuffer< T > [inline, virtual]
grab() const irr::IReferenceCounted [inline]
Indicesirr::scene::CMeshBuffer< T >
IReferenceCounted()irr::IReferenceCounted [inline]
MappingHint_Indexirr::scene::CMeshBuffer< T >
MappingHint_Vertexirr::scene::CMeshBuffer< T >
Materialirr::scene::CMeshBuffer< T >
recalculateBoundingBox()irr::scene::CMeshBuffer< T > [inline, virtual]
setBoundingBox(const core::aabbox3df &box)irr::scene::CMeshBuffer< T > [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::CMeshBuffer< T > [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::CMeshBuffer< T > [inline, virtual]
Verticesirr::scene::CMeshBuffer< T >
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.html new file mode 100644 index 0000000..6a6d0fb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.html @@ -0,0 +1,1163 @@ + + + + +Irrlicht 3D Engine: irr::scene::CMeshBuffer< T > Class Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::CMeshBuffer< T > Class Template Reference
+
+
+ +

Template implementation of the IMeshBuffer interface. + More...

+ +

#include <CMeshBuffer.h>

+
+ + Inheritance diagram for irr::scene::CMeshBuffer< T >:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

template<class T>
+class irr::scene::CMeshBuffer< T >

+ +

Template implementation of the IMeshBuffer interface.

+ +

Definition at line 17 of file CMeshBuffer.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<class T >
+ + + + + + + +
irr::scene::CMeshBuffer< T >::CMeshBuffer () [inline]
+
+
+ +

Default constructor for empty meshbuffer.

+ +

Definition at line 21 of file CMeshBuffer.h.

+ +

References irr::IReferenceCounted::setDebugName().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::CMeshBuffer< T >::append (const void *const vertices,
u32 numVertices,
const u16 *const indices,
u32 numIndices 
) [inline, virtual]
+
+
+ +

Append the vertices and indices to the current buffer.

+

Only works for compatible types, i.e. either the same type or the main buffer is of standard type. Otherwise, behavior is undefined.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 180 of file CMeshBuffer.h.

+ +

References irr::core::aabbox3d< T >::addInternalPoint(), irr::scene::CMeshBuffer< T >::BoundingBox, irr::scene::CMeshBuffer< T >::getIndexCount(), irr::scene::CMeshBuffer< T >::getVertexCount(), irr::scene::CMeshBuffer< T >::getVertices(), irr::scene::CMeshBuffer< T >::Indices, irr::core::array< T, TAlloc >::push_back(), irr::core::array< T, TAlloc >::reallocate(), and irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual void irr::scene::CMeshBuffer< T >::append (const IMeshBuffer *const other) [inline, virtual]
+
+
+ +

Append the meshbuffer to the current buffer.

+

Only works for compatible types, i.e. either the same type or the main buffer is of standard type. Otherwise, behavior is undefined.

+
Parameters:
+ + +
otherMeshbuffer to be appended to this one.
+
+
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 209 of file CMeshBuffer.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::CMeshBuffer< T >::getBoundingBox () const [inline, virtual]
+
+
+ +

Get the axis aligned bounding box.

+
Returns:
Axis aligned bounding box of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 101 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::BoundingBox.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual u32 irr::scene::CMeshBuffer< T >::getChangedID_Index () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 271 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::ChangedID_Index.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual u32 irr::scene::CMeshBuffer< T >::getChangedID_Vertex () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 267 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::ChangedID_Vertex.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::getHardwareMappingHint_Index () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 241 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::MappingHint_Index.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::getHardwareMappingHint_Vertex () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 235 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::MappingHint_Vertex.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual u32 irr::scene::CMeshBuffer< T >::getIndexCount () const [inline, virtual]
+
+
+ +

Get number of indices.

+
Returns:
Number of indices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 93 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Indices, and irr::core::array< T, TAlloc >::size().

+ +

Referenced by irr::scene::CMeshBuffer< T >::append().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::CMeshBuffer< T >::getIndexType () const [inline, virtual]
+
+
+ +

Get type of index data which is stored in this meshbuffer.

+
Returns:
Index type of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 70 of file CMeshBuffer.h.

+ +

References irr::video::EIT_16BIT.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual const u16* irr::scene::CMeshBuffer< T >::getIndices () const [inline, virtual]
+
+
+ +

Get pointer to indices.

+
Returns:
Pointer to indices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 77 of file CMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::const_pointer(), and irr::scene::CMeshBuffer< T >::Indices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual u16* irr::scene::CMeshBuffer< T >::getIndices () [inline, virtual]
+
+
+ +

Get pointer to indices.

+
Returns:
Pointer to indices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 85 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Indices, and irr::core::array< T, TAlloc >::pointer().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual const video::SMaterial& irr::scene::CMeshBuffer< T >::getMaterial () const [inline, virtual]
+
+
+ +

Get material of this meshbuffer.

+
Returns:
Material of this buffer
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 31 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Material.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual video::SMaterial& irr::scene::CMeshBuffer< T >::getMaterial () [inline, virtual]
+
+
+ +

Get material of this meshbuffer.

+
Returns:
Material of this buffer
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 39 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Material.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual const core::vector3df& irr::scene::CMeshBuffer< T >::getNormal (u32 i) const [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 151 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual core::vector3df& irr::scene::CMeshBuffer< T >::getNormal (u32 i) [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 157 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual const core::vector3df& irr::scene::CMeshBuffer< T >::getPosition (u32 i) const [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 139 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual core::vector3df& irr::scene::CMeshBuffer< T >::getPosition (u32 i) [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 145 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual const core::vector2df& irr::scene::CMeshBuffer< T >::getTCoords (u32 i) const [inline, virtual]
+
+
+ +

returns texture coord of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 163 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual core::vector2df& irr::scene::CMeshBuffer< T >::getTCoords (u32 i) [inline, virtual]
+
+
+ +

returns texture coord of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 169 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual u32 irr::scene::CMeshBuffer< T >::getVertexCount () const [inline, virtual]
+
+
+ +

Get number of vertices.

+
Returns:
Number of vertices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 63 of file CMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::size(), and irr::scene::CMeshBuffer< T >::Vertices.

+ +

Referenced by irr::scene::CMeshBuffer< T >::append().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::CMeshBuffer< T >::getVertexType () const [inline, virtual]
+
+
+ +

Get type of vertex data stored in this buffer.

+
Returns:
Type of vertex data.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 133 of file CMeshBuffer.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual const void* irr::scene::CMeshBuffer< T >::getVertices () const [inline, virtual]
+
+
+ +

Get pointer to vertices.

+
Returns:
Pointer to vertices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 47 of file CMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::const_pointer(), and irr::scene::CMeshBuffer< T >::Vertices.

+ +

Referenced by irr::scene::CMeshBuffer< T >::append().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual void* irr::scene::CMeshBuffer< T >::getVertices () [inline, virtual]
+
+
+ +

Get pointer to vertices.

+
Returns:
Pointer to vertices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 55 of file CMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::pointer(), and irr::scene::CMeshBuffer< T >::Vertices.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + +
virtual void irr::scene::CMeshBuffer< T >::recalculateBoundingBox () [inline, virtual]
+
+ +
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual void irr::scene::CMeshBuffer< T >::setBoundingBox (const core::aabbox3dfbox) [inline, virtual]
+
+
+ +

Set the axis aligned bounding box.

+
Parameters:
+ + +
boxNew axis aligned bounding box for this buffer. set user axis aligned bounding box
+
+
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 110 of file CMeshBuffer.h.

+ +

References irr::scene::CMeshBuffer< T >::BoundingBox.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + +
virtual void irr::scene::CMeshBuffer< T >::setDirty (E_BUFFER_TYPE Buffer = EBT_VERTEX_AND_INDEX) [inline, virtual]
+
+ +
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::CMeshBuffer< T >::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint,
E_BUFFER_TYPE Buffer = EBT_VERTEX_AND_INDEX 
) [inline, virtual]
+
+ +
+

Member Data Documentation

+ + + +
+
+
+template<class T >
+ + + + +
u32 irr::scene::CMeshBuffer< T >::ChangedID_Index
+
+ +
+ +
+
+
+template<class T >
+ + + + +
u32 irr::scene::CMeshBuffer< T >::ChangedID_Vertex
+
+ +
+ +
+
+
+template<class T >
+ + + + +
core::array<u16> irr::scene::CMeshBuffer< T >::Indices
+
+
+ +

Indices into the vertices of this buffer.

+ +

Definition at line 285 of file CMeshBuffer.h.

+ +

Referenced by irr::scene::CMeshBuffer< T >::append(), irr::scene::CMeshBuffer< T >::getIndexCount(), and irr::scene::CMeshBuffer< T >::getIndices().

+ +
+
+ + + +
+
+
+template<class T >
+ + + + +
E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::MappingHint_Vertex
+
+ +
+ +
+
+
+template<class T >
+ + + + +
video::SMaterial irr::scene::CMeshBuffer< T >::Material
+
+
+ +

Material for this meshbuffer.

+ +

Definition at line 281 of file CMeshBuffer.h.

+ +

Referenced by irr::scene::CMeshBuffer< T >::getMaterial().

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.png new file mode 100644 index 0000000..f2cb2ce Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer-members.html new file mode 100644 index 0000000..27eb87e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer-members.html @@ -0,0 +1,149 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::CVertexBuffer Member List
+
+
+This is the complete list of members for irr::scene::CVertexBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
allocated_size() const irr::scene::CVertexBuffer [inline, virtual]
ChangedIDirr::scene::CVertexBuffer
CVertexBuffer(video::E_VERTEX_TYPE vertexType)irr::scene::CVertexBuffer [inline]
CVertexBuffer(const IVertexBuffer &VertexBufferCopy)irr::scene::CVertexBuffer [inline]
drop() const irr::IReferenceCounted [inline]
getChangedID() const irr::scene::CVertexBuffer [inline, virtual]
getData()irr::scene::CVertexBuffer [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint() const irr::scene::CVertexBuffer [inline, virtual]
getLast()irr::scene::CVertexBuffer [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::CVertexBuffer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
MappingHintirr::scene::CVertexBuffer
operator[](const u32 index) const irr::scene::CVertexBuffer [inline, virtual]
pointer()irr::scene::CVertexBuffer [inline, virtual]
push_back(const video::S3DVertex &element)irr::scene::CVertexBuffer [inline, virtual]
reallocate(u32 new_size)irr::scene::CVertexBuffer [inline, virtual]
set_used(u32 usedNow)irr::scene::CVertexBuffer [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty()irr::scene::CVertexBuffer [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)irr::scene::CVertexBuffer [inline, virtual]
setType(video::E_VERTEX_TYPE vertexType)irr::scene::CVertexBuffer [inline, virtual]
size() const irr::scene::CVertexBuffer [inline, virtual]
stride() const irr::scene::CVertexBuffer [inline, virtual]
Verticesirr::scene::CVertexBuffer
~CVertexBuffer()irr::scene::CVertexBuffer [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.html new file mode 100644 index 0000000..10e56cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.html @@ -0,0 +1,673 @@ + + + + +Irrlicht 3D Engine: irr::scene::CVertexBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::CVertexBuffer Class Reference
+
+
+ +

#include <CVertexBuffer.h>

+
+ + Inheritance diagram for irr::scene::CVertexBuffer:
+
+
+ + +

List of all members.

+

+Classes

+
    +
  • class CSpecificVertexList +
  • class IVertexList +
+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 16 of file CVertexBuffer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::CVertexBuffer::CVertexBuffer (video::E_VERTEX_TYPE vertexType) [inline]
+
+
+ +

Definition at line 75 of file CVertexBuffer.h.

+ +

References setType().

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::CVertexBuffer::CVertexBuffer (const IVertexBufferVertexBufferCopy) [inline]
+
+ +
+ +
+
+ + + + + + + +
virtual irr::scene::CVertexBuffer::~CVertexBuffer () [inline, virtual]
+
+
+ +

Definition at line 92 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual u32 irr::scene::CVertexBuffer::allocated_size () const [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 169 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CVertexBuffer::getChangedID () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 199 of file CVertexBuffer.h.

+ +

References ChangedID.

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::CVertexBuffer::getData () [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 133 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::CVertexBuffer::getHardwareMappingHint () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 180 of file CVertexBuffer.h.

+ +

References MappingHint.

+ +
+
+ +
+
+ + + + + + + +
virtual video::S3DVertex& irr::scene::CVertexBuffer::getLast () [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 154 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::CVertexBuffer::getType () const [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 135 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual video::S3DVertex& irr::scene::CVertexBuffer::operator[] (const u32 index) const [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 149 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual video::S3DVertex* irr::scene::CVertexBuffer::pointer () [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 174 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CVertexBuffer::push_back (const video::S3DVertexelement) [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 144 of file CVertexBuffer.h.

+ +

References Vertices.

+ +

Referenced by CVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CVertexBuffer::reallocate (u32 new_size) [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 164 of file CVertexBuffer.h.

+ +

References Vertices.

+ +

Referenced by CVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CVertexBuffer::set_used (u32 usedNow) [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 159 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::CVertexBuffer::setDirty () [inline, virtual]
+
+
+ +

flags the mesh as changed, reloads hardware buffers

+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 192 of file CVertexBuffer.h.

+ +

References ChangedID.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CVertexBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) [inline, virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 186 of file CVertexBuffer.h.

+ +

References MappingHint.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::CVertexBuffer::setType (video::E_VERTEX_TYPE vertexType) [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 98 of file CVertexBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_STANDARD, irr::video::EVT_TANGENTS, and Vertices.

+ +

Referenced by CVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CVertexBuffer::size () const [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 139 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::CVertexBuffer::stride () const [inline, virtual]
+
+
+ +

Implements irr::scene::IVertexBuffer.

+ +

Definition at line 137 of file CVertexBuffer.h.

+ +

References Vertices.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 202 of file CVertexBuffer.h.

+ +

Referenced by getChangedID(), and setDirty().

+ +
+
+ +
+ +
+ +

Definition at line 201 of file CVertexBuffer.h.

+ +

Referenced by getHardwareMappingHint(), and setHardwareMappingHint().

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.png new file mode 100644 index 0000000..f8be41a Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_c_vertex_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh-members.html new file mode 100644 index 0000000..bdf9950 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh-members.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IAnimatedMesh Member List
+
+
+This is the complete list of members for irr::scene::IAnimatedMesh, including all inherited members. + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getAnimationSpeed() const =0irr::scene::IAnimatedMesh [pure virtual]
getBoundingBox() const =0irr::scene::IMesh [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFrameCount() const =0irr::scene::IAnimatedMesh [pure virtual]
getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)=0irr::scene::IAnimatedMesh [pure virtual]
getMeshBuffer(u32 nr) const =0irr::scene::IMesh [pure virtual]
getMeshBuffer(const video::SMaterial &material) const =0irr::scene::IMesh [pure virtual]
getMeshBufferCount() const =0irr::scene::IMesh [pure virtual]
getMeshType() const irr::scene::IAnimatedMesh [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setAnimationSpeed(f32 fps)=0irr::scene::IAnimatedMesh [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMesh [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0irr::scene::IMesh [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.html new file mode 100644 index 0000000..04d78a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.html @@ -0,0 +1,314 @@ + + + + +Irrlicht 3D Engine: irr::scene::IAnimatedMesh Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IAnimatedMesh Class Reference
+
+
+ +

Interface for an animated mesh. + More...

+ +

#include <IAnimatedMesh.h>

+
+ + Inheritance diagram for irr::scene::IAnimatedMesh:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for an animated mesh.

+

There are already simple implementations of this interface available so you don't have to implement this interface on your own if you need to: You might want to use irr::scene::SAnimatedMesh, irr::scene::SMesh, irr::scene::SMeshBuffer etc.

+ +

Definition at line 62 of file IAnimatedMesh.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual f32 irr::scene::IAnimatedMesh::getAnimationSpeed () const [pure virtual]
+
+
+ +

Gets the animation speed of the animated mesh.

+
Returns:
The number of frames per second to play the animation with by default. If the amount is 0, it is a static, non animated mesh.
+ +

Implemented in irr::scene::SAnimatedMesh.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IAnimatedMesh::getFrameCount () const [pure virtual]
+
+
+ +

Gets the frame count of the animated mesh.

+
Returns:
The amount of frames. If the amount is 1, it is a static, non animated mesh.
+ +

Implemented in irr::scene::SAnimatedMesh.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IAnimatedMesh::getMesh (s32 frame,
s32 detailLevel = 255,
s32 startFrameLoop = -1,
s32 endFrameLoop = -1 
) [pure virtual]
+
+
+ +

Returns the IMesh interface for a frame.

+
Parameters:
+ + + + + +
frame,:Frame number as zero based index. The maximum frame number is getFrameCount() - 1;
detailLevel,:Level of detail. 0 is the lowest, 255 the highest level of detail. Most meshes will ignore the detail level.
startFrameLoop,:Because some animated meshes (.MD2) are blended between 2 static frames, and maybe animated in a loop, the startFrameLoop and the endFrameLoop have to be defined, to prevent the animation to be blended between frames which are outside of this loop. If startFrameLoop and endFrameLoop are both -1, they are ignored.
endFrameLoop,:see startFrameLoop.
+
+
+
Returns:
Returns the animated mesh based on a detail level.
+ +

Implemented in irr::scene::SAnimatedMesh.

+ +
+
+ +
+
+ + + + + + + +
virtual E_ANIMATED_MESH_TYPE irr::scene::IAnimatedMesh::getMeshType () const [inline, virtual]
+
+
+ +

Returns the type of the animated mesh.

+

In most cases it is not neccessary to use this method. This is useful for making a safe downcast. For example, if getMeshType() returns EAMT_MD2 it's safe to cast the IAnimatedMesh to IAnimatedMeshMD2.

+
Returns:
Type of the mesh.
+ +

Reimplemented in irr::scene::SAnimatedMesh.

+ +

Definition at line 105 of file IAnimatedMesh.h.

+ +

References irr::scene::EAMT_UNKNOWN.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMesh::setAnimationSpeed (f32 fps) [pure virtual]
+
+
+ +

Sets the animation speed of the animated mesh.

+
Parameters:
+ + +
fpsNumber of frames per second to play the animation with by default. If the amount is 0, it is not animated. The actual speed is set in the scene node the mesh is instantiated in.
+
+
+ +

Implemented in irr::scene::SAnimatedMesh.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.png new file mode 100644 index 0000000..e1ddbfc Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2-members.html new file mode 100644 index 0000000..e509cc6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2-members.html @@ -0,0 +1,144 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IAnimatedMeshMD2 Member List
+
+
+This is the complete list of members for irr::scene::IAnimatedMeshMD2, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getAnimationCount() const =0irr::scene::IAnimatedMeshMD2 [pure virtual]
getAnimationName(s32 nr) const =0irr::scene::IAnimatedMeshMD2 [pure virtual]
getAnimationSpeed() const =0irr::scene::IAnimatedMesh [pure virtual]
getBoundingBox() const =0irr::scene::IMesh [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFrameCount() const =0irr::scene::IAnimatedMesh [pure virtual]
getFrameLoop(EMD2_ANIMATION_TYPE l, s32 &outBegin, s32 &outEnd, s32 &outFPS) const =0irr::scene::IAnimatedMeshMD2 [pure virtual]
getFrameLoop(const c8 *name, s32 &outBegin, s32 &outEnd, s32 &outFPS) const =0irr::scene::IAnimatedMeshMD2 [pure virtual]
getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)=0irr::scene::IAnimatedMesh [pure virtual]
getMeshBuffer(u32 nr) const =0irr::scene::IMesh [pure virtual]
getMeshBuffer(const video::SMaterial &material) const =0irr::scene::IMesh [pure virtual]
getMeshBufferCount() const =0irr::scene::IMesh [pure virtual]
getMeshType() const irr::scene::IAnimatedMesh [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setAnimationSpeed(f32 fps)=0irr::scene::IAnimatedMesh [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMesh [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0irr::scene::IMesh [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.html new file mode 100644 index 0000000..54037f0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.html @@ -0,0 +1,305 @@ + + + + +Irrlicht 3D Engine: irr::scene::IAnimatedMeshMD2 Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IAnimatedMeshMD2 Class Reference
+
+
+ +

Interface for using some special functions of MD2 meshes. + More...

+ +

#include <IAnimatedMeshMD2.h>

+
+ + Inheritance diagram for irr::scene::IAnimatedMeshMD2:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for using some special functions of MD2 meshes.

+ +

Definition at line 45 of file IAnimatedMeshMD2.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual s32 irr::scene::IAnimatedMeshMD2::getAnimationCount () const [pure virtual]
+
+
+ +

Get amount of md2 animations in this file.

+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::IAnimatedMeshMD2::getAnimationName (s32 nr) const [pure virtual]
+
+
+ +

Get name of md2 animation.

+
Parameters:
+ + +
nr,:Zero based index of animation.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IAnimatedMeshMD2::getFrameLoop (EMD2_ANIMATION_TYPE l,
s32outBegin,
s32outEnd,
s32outFPS 
) const [pure virtual]
+
+
+ +

Get frame loop data for a default MD2 animation type.

+
Parameters:
+ + + + + +
lThe EMD2_ANIMATION_TYPE to get the frames for.
outBeginThe returned beginning frame for animation type specified.
outEndThe returned ending frame for the animation type specified.
outFPSThe number of frames per second, this animation should be played at.
+
+
+
Returns:
beginframe, endframe and frames per second for a default MD2 animation type.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::IAnimatedMeshMD2::getFrameLoop (const c8name,
s32outBegin,
s32outEnd,
s32outFPS 
) const [pure virtual]
+
+
+ +

Get frame loop data for a special MD2 animation type, identified by name.

+
Parameters:
+ + + + + +
nameName of the animation.
outBeginThe returned beginning frame for animation type specified.
outEndThe returned ending frame for the animation type specified.
outFPSThe number of frames per second, this animation should be played at.
+
+
+
Returns:
beginframe, endframe and frames per second for a special MD2 animation type.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.png new file mode 100644 index 0000000..5e614f0 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d2.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3-members.html new file mode 100644 index 0000000..b3ec4bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3-members.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IAnimatedMeshMD3 Member List
+
+
+This is the complete list of members for irr::scene::IAnimatedMeshMD3, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getAnimationSpeed() const =0irr::scene::IAnimatedMesh [pure virtual]
getBoundingBox() const =0irr::scene::IMesh [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFrameCount() const =0irr::scene::IAnimatedMesh [pure virtual]
getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)=0irr::scene::IAnimatedMesh [pure virtual]
getMeshBuffer(u32 nr) const =0irr::scene::IMesh [pure virtual]
getMeshBuffer(const video::SMaterial &material) const =0irr::scene::IMesh [pure virtual]
getMeshBufferCount() const =0irr::scene::IMesh [pure virtual]
getMeshType() const irr::scene::IAnimatedMesh [inline, virtual]
getOriginalMesh()=0irr::scene::IAnimatedMeshMD3 [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop)=0irr::scene::IAnimatedMeshMD3 [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setAnimationSpeed(f32 fps)=0irr::scene::IAnimatedMesh [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMesh [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setInterpolationShift(u32 shift, u32 loopMode)=0irr::scene::IAnimatedMeshMD3 [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0irr::scene::IMesh [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.html new file mode 100644 index 0000000..8225b33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.html @@ -0,0 +1,247 @@ + + + + +Irrlicht 3D Engine: irr::scene::IAnimatedMeshMD3 Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IAnimatedMeshMD3 Class Reference
+
+
+ +

Interface for using some special functions of MD3 meshes. + More...

+ +

#include <IAnimatedMeshMD3.h>

+
+ + Inheritance diagram for irr::scene::IAnimatedMeshMD3:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for using some special functions of MD3 meshes.

+ +

Definition at line 286 of file IAnimatedMeshMD3.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual SMD3Mesh* irr::scene::IAnimatedMeshMD3::getOriginalMesh () [pure virtual]
+
+
+ +

get the original md3 mesh.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual SMD3QuaternionTagList* irr::scene::IAnimatedMeshMD3::getTagList (s32 frame,
s32 detailLevel,
s32 startFrameLoop,
s32 endFrameLoop 
) [pure virtual]
+
+
+ +

get the tag list of the mesh.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IAnimatedMeshMD3::setInterpolationShift (u32 shift,
u32 loopMode 
) [pure virtual]
+
+
+ +

tune how many frames you want to render inbetween.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.png new file mode 100644 index 0000000..009eb6d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_m_d3.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node-members.html new file mode 100644 index 0000000..f50fc25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node-members.html @@ -0,0 +1,225 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IAnimatedMeshSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IAnimatedMeshSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
addShadowVolumeSceneNode(const IMesh *shadowMesh=0, s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
animateJoints(bool CalculateAbsolutePositions=true)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimationSpeed() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getEndFrame() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getFrameNr() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getID() const irr::scene::ISceneNode [inline, virtual]
getJointCount() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getJointNode(const c8 *jointName)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getJointNode(u32 jointID)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getLoopMode() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getMD3TagTransformation(const core::stringc &tagname)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getMesh(void)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getStartFrame() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IAnimatedMeshSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::IAnimatedMeshSceneNode [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isReadOnlyMaterials() const =0irr::scene::IAnimatedMeshSceneNode [pure virtual]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAnimationEndCallback(IAnimationEndCallBack *callback=0)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setAnimationSpeed(f32 framesPerSecond)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setCurrentFrame(f32 frame)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setFrameLoop(s32 begin, s32 end)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setLoopMode(bool playAnimationLooped)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setMD2Animation(EMD2_ANIMATION_TYPE anim)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setMD2Animation(const c8 *animationName)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setMesh(IAnimatedMesh *mesh)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setReadOnlyMaterials(bool readonly)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setRenderFromIdentity(bool On)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTransitionTime(f32 Time)=0irr::scene::IAnimatedMeshSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IAnimatedMeshSceneNode()irr::scene::IAnimatedMeshSceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.html new file mode 100644 index 0000000..ab1e042 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.html @@ -0,0 +1,870 @@ + + + + +Irrlicht 3D Engine: irr::scene::IAnimatedMeshSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IAnimatedMeshSceneNode Class Reference
+
+
+ +

Scene node capable of displaying an animated mesh and its shadow. + More...

+ +

#include <IAnimatedMeshSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IAnimatedMeshSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Scene node capable of displaying an animated mesh and its shadow.

+

The shadow is optional: If a shadow should be displayed too, just invoke the IAnimatedMeshSceneNode::createShadowVolumeSceneNode().

+ +

Definition at line 53 of file IAnimatedMeshSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IAnimatedMeshSceneNode::IAnimatedMeshSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0),
const core::vector3dfrotation = core::vector3df(0,0,0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 58 of file IAnimatedMeshSceneNode.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::IAnimatedMeshSceneNode::~IAnimatedMeshSceneNode () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 65 of file IAnimatedMeshSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IShadowVolumeSceneNode* irr::scene::IAnimatedMeshSceneNode::addShadowVolumeSceneNode (const IMeshshadowMesh = 0,
s32 id = -1,
bool zfailmethod = true,
f32 infinity = 1000.0f 
) [pure virtual]
+
+
+ +

Creates shadow volume scene node as child of this node.

+

The shadow can be rendered using the ZPass or the zfail method. ZPass is a little bit faster because the shadow volume creation is easier, but with this method there occur ugly looking artifacs when the camera is inside the shadow volume. These error do not occur with the ZFail method.

+
Parameters:
+ + + + + +
shadowMesh,:Optional custom mesh for shadow volume.
id,:Id of the shadow scene node. This id can be used to identify the node later.
zfailmethod,:If set to true, the shadow will use the zfail method, if not, zpass is used.
infinity,:Value used by the shadow volume algorithm to scale the shadow volume (for zfail shadow volume we support only finite shadows, so camera zfar must be larger than shadow back cap, which is depend on infinity parameter).
+
+
+
Returns:
Pointer to the created shadow scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::animateJoints (bool CalculateAbsolutePositions = true) [pure virtual]
+
+
+ +

animates the joints in the mesh based on the current frame.

+

Also takes in to account transitions.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::IAnimatedMeshSceneNode::clone (ISceneNodenewParent = 0,
ISceneManagernewManager = 0 
) [pure virtual]
+
+
+ +

Creates a clone of this scene node and its children.

+
Parameters:
+ + + +
newParentAn optional new parent.
newManagerAn optional new scene manager.
+
+
+
Returns:
The newly created clone of this node.
+ +

Reimplemented from irr::scene::ISceneNode.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IAnimatedMeshSceneNode::getAnimationSpeed () const [pure virtual]
+
+
+ +

Gets the speed with which the animation is played.

+
Returns:
Frames per second played.
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::scene::IAnimatedMeshSceneNode::getEndFrame () const [pure virtual]
+
+
+ +

Returns the current end frame number.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IAnimatedMeshSceneNode::getFrameNr () const [pure virtual]
+
+
+ +

Returns the currently displayed frame number.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IAnimatedMeshSceneNode::getJointCount () const [pure virtual]
+
+
+ +

Gets joint count.

+
Returns:
Amount of joints in the mesh.
+ +
+
+ +
+
+ + + + + + + + +
virtual IBoneSceneNode* irr::scene::IAnimatedMeshSceneNode::getJointNode (const c8jointName) [pure virtual]
+
+
+ +

Get a pointer to a joint in the mesh (if the mesh is a bone based mesh).

+

With this method it is possible to attach scene nodes to joints for example possible to attach a weapon to the left hand of an animated model. This example shows how:

+
        ISceneNode* hand =
+            yourAnimatedMeshSceneNode->getJointNode("LeftHand");
+        hand->addChild(weaponSceneNode);
+

Please note that the joint returned by this method may not exist before this call and the joints in the node were created by it.

+
Parameters:
+ + +
jointName,:Name of the joint.
+
+
+
Returns:
Pointer to the scene node which represents the joint with the specified name. Returns 0 if the contained mesh is not an skinned mesh or the name of the joint could not be found.
+ +
+
+ +
+
+ + + + + + + + +
virtual IBoneSceneNode* irr::scene::IAnimatedMeshSceneNode::getJointNode (u32 jointID) [pure virtual]
+
+
+ +

same as getJointNode(const c8* jointName), but based on id

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IAnimatedMeshSceneNode::getLoopMode () const [pure virtual]
+
+
+ +

returns the current loop mode

+

When true the animations are played looped

+ +
+
+ +
+
+ + + + + + + + +
virtual const SMD3QuaternionTag* irr::scene::IAnimatedMeshSceneNode::getMD3TagTransformation (const core::stringctagname) [pure virtual]
+
+
+ +

Get the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, or the absolutetransformation if it's a normal scenenode.

+ +
+
+ +
+
+ + + + + + + + +
virtual IAnimatedMesh* irr::scene::IAnimatedMeshSceneNode::getMesh (void ) [pure virtual]
+
+
+ +

Returns the current mesh.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::scene::IAnimatedMeshSceneNode::getStartFrame () const [pure virtual]
+
+
+ +

Returns the current start frame number.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IAnimatedMeshSceneNode::isReadOnlyMaterials () const [pure virtual]
+
+
+ +

Returns if the scene node should not copy the materials of the mesh but use them in a read only style.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setAnimationEndCallback (IAnimationEndCallBackcallback = 0) [pure virtual]
+
+
+ +

Sets a callback interface which will be called if an animation playback has ended.

+

Set this to 0 to disable the callback again. Please note that this will only be called when in non looped mode, see IAnimatedMeshSceneNode::setLoopMode().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setAnimationSpeed (f32 framesPerSecond) [pure virtual]
+
+
+ +

Sets the speed with which the animation is played.

+
Parameters:
+ + +
framesPerSecond,:Frames per second played.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setCurrentFrame (f32 frame) [pure virtual]
+
+
+ +

Sets the current frame number.

+

From now on the animation is played from this frame.

+
Parameters:
+ + +
frame,:Number of the frame to let the animation be started from. The frame number must be a valid frame number of the IMesh used by this scene node. Set IAnimatedMesh::getMesh() for details.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::IAnimatedMeshSceneNode::setFrameLoop (s32 begin,
s32 end 
) [pure virtual]
+
+
+ +

Sets the frame numbers between the animation is looped.

+

The default is 0 - MaximalFrameCount of the mesh.

+
Parameters:
+ + + +
begin,:Start frame number of the loop.
end,:End frame number of the loop.
+
+
+
Returns:
True if successful, false if not.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setJointMode (E_JOINT_UPDATE_ON_RENDER mode) [pure virtual]
+
+
+ +

Set how the joints should be updated on render.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setLoopMode (bool playAnimationLooped) [pure virtual]
+
+
+ +

Sets looping mode which is on by default.

+

If set to false, animations will not be played looped.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IAnimatedMeshSceneNode::setMD2Animation (EMD2_ANIMATION_TYPE anim) [pure virtual]
+
+
+ +

Starts a default MD2 animation.

+

With this method it is easily possible to start a Run, Attack, Die or whatever animation, if the mesh contained in this scene node is an md2 mesh. Otherwise, nothing happens.

+
Parameters:
+ + +
anim,:An MD2 animation type, which should be played, for example EMAT_STAND for the standing animation.
+
+
+
Returns:
True if successful, and false if not, for example if the mesh in the scene node is not a md2 mesh.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IAnimatedMeshSceneNode::setMD2Animation (const c8animationName) [pure virtual]
+
+
+ +

Starts a special MD2 animation.

+

With this method it is easily possible to start a Run, Attack, Die or whatever animation, if the mesh contained in this scene node is an md2 mesh. Otherwise, nothing happens. This method uses a character string to identify the animation. If the animation is a standard md2 animation, you might want to start this animation with the EMD2_ANIMATION_TYPE enumeration instead.

+
Parameters:
+ + +
animationName,:Name of the animation which should be played.
+
+
+
Returns:
Returns true if successful, and false if not, for example if the mesh in the scene node is not an md2 mesh, or no animation with this name could be found.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setMesh (IAnimatedMeshmesh) [pure virtual]
+
+
+ +

Sets a new mesh.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setReadOnlyMaterials (bool readonly) [pure virtual]
+
+
+ +

Sets if the scene node should not copy the materials of the mesh but use them in a read only style.

+

In this way it is possible to change the materials a mesh causing all mesh scene nodes referencing this mesh to change too.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setRenderFromIdentity (bool On) [pure virtual]
+
+
+ +

render mesh ignoring its transformation.

+

Culling is unaffected.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimatedMeshSceneNode::setTransitionTime (f32 Time) [pure virtual]
+
+
+ +

Sets the transition time in seconds.

+

Note: This needs to enable joints, and setJointmode set to EJUOR_CONTROL. You must call animateJoints(), or the mesh will not animate.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.png new file mode 100644 index 0000000..861f4b9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animated_mesh_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back-members.html new file mode 100644 index 0000000..ea6936c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back-members.html @@ -0,0 +1,128 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IAnimationEndCallBack Member List
+
+
+This is the complete list of members for irr::scene::IAnimationEndCallBack, including all inherited members. + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
OnAnimationEnd(IAnimatedMeshSceneNode *node)=0irr::scene::IAnimationEndCallBack [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.html new file mode 100644 index 0000000..0290ed1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.html @@ -0,0 +1,182 @@ + + + + +Irrlicht 3D Engine: irr::scene::IAnimationEndCallBack Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IAnimationEndCallBack Class Reference
+
+
+ +

Callback interface for catching events of ended animations. + More...

+ +

#include <IAnimatedMeshSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IAnimationEndCallBack:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Callback interface for catching events of ended animations.

+

Implement this interface and use IAnimatedMeshSceneNode::setAnimationEndCallback to be able to be notified if an animation playback has ended.

+ +

Definition at line 39 of file IAnimatedMeshSceneNode.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::IAnimationEndCallBack::OnAnimationEnd (IAnimatedMeshSceneNodenode) [pure virtual]
+
+
+ +

Will be called when the animation playback has ended.

+

See IAnimatedMeshSceneNode::setAnimationEndCallback for more informations.

+
Parameters:
+ + +
node,:Node of which the animation has ended.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.png new file mode 100644 index 0000000..be50ee0 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_animation_end_call_back.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node-members.html new file mode 100644 index 0000000..c68f4a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node-members.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IBillboardSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IBillboardSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getColor(video::SColor &topColor, video::SColor &bottomColor) const =0irr::scene::IBillboardSceneNode [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getSize() const =0irr::scene::IBillboardSceneNode [pure virtual]
getSize(f32 &height, f32 &bottomEdgeWidth, f32 &topEdgeWidth) const =0irr::scene::IBillboardSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IBillboardSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))irr::scene::IBillboardSceneNode [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setColor(const video::SColor &overallColor)=0irr::scene::IBillboardSceneNode [pure virtual]
setColor(const video::SColor &topColor, const video::SColor &bottomColor)=0irr::scene::IBillboardSceneNode [pure virtual]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setSize(const core::dimension2d< f32 > &size)=0irr::scene::IBillboardSceneNode [pure virtual]
setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth)=0irr::scene::IBillboardSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.html new file mode 100644 index 0000000..3c5aa95 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.html @@ -0,0 +1,443 @@ + + + + +Irrlicht 3D Engine: irr::scene::IBillboardSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IBillboardSceneNode Class Reference
+
+
+ +

A billboard scene node. + More...

+ +

#include <IBillboardSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IBillboardSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A billboard scene node.

+

A billboard is like a 3d sprite: A 2d element, which always looks to the camera. It is usually used for explosions, fire, lensflares, particles and things like that.

+ +

Definition at line 20 of file IBillboardSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IBillboardSceneNode::IBillboardSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 25 of file IBillboardSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IBillboardSceneNode::getColor (video::SColortopColor,
video::SColorbottomColor 
) const [pure virtual]
+
+
+ +

Gets the color of the top and bottom vertices of the billboard.

+
Parameters:
+ + + +
[out]topColorStores the color of the top vertices
[out]bottomColorStores the color of the bottom vertices
+
+
+ +

Implemented in irr::scene::IBillboardTextSceneNode.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<f32>& irr::scene::IBillboardSceneNode::getSize () const [pure virtual]
+
+
+ +

Returns the size of the billboard.

+

This will return the width of the bottom edge of the billboard. Use getWidths() to retrieve the bottom and top edges independently.

+
Returns:
Size of the billboard.
+ +

Implemented in irr::scene::IBillboardTextSceneNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IBillboardSceneNode::getSize (f32height,
f32bottomEdgeWidth,
f32topEdgeWidth 
) const [pure virtual]
+
+
+ +

Gets the size of the the billboard and handles independent top and bottom edge widths correctly.

+
Parameters:
+ + + + +
[out]heightThe height of the billboard.
[out]bottomEdgeWidthThe width of the bottom edge of the billboard.
[out]topEdgeWidthThe width of the top edge of the billboard.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBillboardSceneNode::setColor (const video::SColoroverallColor) [pure virtual]
+
+
+ +

Set the color of all vertices of the billboard.

+
Parameters:
+ + +
[in]overallColorColor to set
+
+
+ +

Implemented in irr::scene::IBillboardTextSceneNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IBillboardSceneNode::setColor (const video::SColortopColor,
const video::SColorbottomColor 
) [pure virtual]
+
+
+ +

Set the color of the top and bottom vertices of the billboard.

+
Parameters:
+ + + +
[in]topColorColor to set the top vertices
[in]bottomColorColor to set the bottom vertices
+
+
+ +

Implemented in irr::scene::IBillboardTextSceneNode.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBillboardSceneNode::setSize (const core::dimension2d< f32 > & size) [pure virtual]
+
+
+ +

Sets the size of the billboard, making it rectangular.

+ +

Implemented in irr::scene::IBillboardTextSceneNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IBillboardSceneNode::setSize (f32 height,
f32 bottomEdgeWidth,
f32 topEdgeWidth 
) [pure virtual]
+
+
+ +

Sets the size of the billboard with independent widths of the bottom and top edges.

+
Parameters:
+ + + + +
[in]heightThe height of the billboard.
[in]bottomEdgeWidthThe width of the bottom edge of the billboard.
[in]topEdgeWidthThe width of the top edge of the billboard.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.png new file mode 100644 index 0000000..1dde0ec Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node-members.html new file mode 100644 index 0000000..3205000 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node-members.html @@ -0,0 +1,209 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IBillboardTextSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IBillboardTextSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getColor(video::SColor &topColor, video::SColor &bottomColor) const =0irr::scene::IBillboardTextSceneNode [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getSize() const =0irr::scene::IBillboardTextSceneNode [pure virtual]
irr::scene::IBillboardSceneNode::getSize(f32 &height, f32 &bottomEdgeWidth, f32 &topEdgeWidth) const =0irr::scene::IBillboardSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IBillboardSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))irr::scene::IBillboardSceneNode [inline]
IBillboardTextSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))irr::scene::IBillboardTextSceneNode [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
isDebugObject() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setColor(const video::SColor &overallColor)=0irr::scene::IBillboardTextSceneNode [pure virtual]
setColor(const video::SColor &topColor, const video::SColor &bottomColor)=0irr::scene::IBillboardTextSceneNode [pure virtual]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setSize(const core::dimension2d< f32 > &size)=0irr::scene::IBillboardTextSceneNode [pure virtual]
irr::scene::IBillboardSceneNode::setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth)=0irr::scene::IBillboardSceneNode [pure virtual]
setText(const wchar_t *text)=0irr::scene::IBillboardTextSceneNode [pure virtual]
setTextColor(video::SColor color)=0irr::scene::IBillboardTextSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.html new file mode 100644 index 0000000..0eb0cba --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.html @@ -0,0 +1,393 @@ + + + + +Irrlicht 3D Engine: irr::scene::IBillboardTextSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IBillboardTextSceneNode Class Reference
+
+
+ +

A billboard text scene node. + More...

+ +

#include <IBillboardTextSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IBillboardTextSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A billboard text scene node.

+

Acts like a billboard which displays the currently set text. Due to the exclusion of RTTI in Irrlicht we have to avoid multiple inheritance. Hence, changes to the ITextSceneNode interface have to be copied here manually.

+ +

Definition at line 21 of file IBillboardTextSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IBillboardTextSceneNode::IBillboardTextSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 26 of file IBillboardTextSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IBillboardTextSceneNode::getColor (video::SColortopColor,
video::SColorbottomColor 
) const [pure virtual]
+
+
+ +

Gets the color of the top and bottom vertices of the billboard.

+
Parameters:
+ + + +
topColor,:stores the color of the top vertices
bottomColor,:stores the color of the bottom vertices
+
+
+ +

Implements irr::scene::IBillboardSceneNode.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<f32>& irr::scene::IBillboardTextSceneNode::getSize () const [pure virtual]
+
+
+ +

Returns the size of the billboard.

+ +

Implements irr::scene::IBillboardSceneNode.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBillboardTextSceneNode::setColor (const video::SColoroverallColor) [pure virtual]
+
+
+ +

Set the color of all vertices of the billboard.

+
Parameters:
+ + +
overallColor,:the color to set
+
+
+ +

Implements irr::scene::IBillboardSceneNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IBillboardTextSceneNode::setColor (const video::SColortopColor,
const video::SColorbottomColor 
) [pure virtual]
+
+
+ +

Set the color of the top and bottom vertices of the billboard.

+
Parameters:
+ + + +
topColor,:the color to set the top vertices
bottomColor,:the color to set the bottom vertices
+
+
+ +

Implements irr::scene::IBillboardSceneNode.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBillboardTextSceneNode::setSize (const core::dimension2d< f32 > & size) [pure virtual]
+
+
+ +

Sets the size of the billboard.

+ +

Implements irr::scene::IBillboardSceneNode.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBillboardTextSceneNode::setText (const wchar_t * text) [pure virtual]
+
+
+ +

sets the text string

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBillboardTextSceneNode::setTextColor (video::SColor color) [pure virtual]
+
+
+ +

sets the color of the text

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.png new file mode 100644 index 0000000..300f818 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_billboard_text_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node-members.html new file mode 100644 index 0000000..69f7e49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node-members.html @@ -0,0 +1,209 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IBoneSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IBoneSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimationMode() const =0irr::scene::IBoneSceneNode [pure virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoneIndex() const =0irr::scene::IBoneSceneNode [pure virtual]
getBoneName() const irr::scene::IBoneSceneNode [inline, virtual]
getBoundingBox() const =0irr::scene::IBoneSceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getSkinningSpace() const =0irr::scene::IBoneSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IBoneSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1)irr::scene::IBoneSceneNode [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
isDebugObject() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)=0irr::scene::IBoneSceneNode [pure virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
positionHintirr::scene::IBoneSceneNode
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()irr::scene::IBoneSceneNode [inline, virtual]
rotationHintirr::scene::IBoneSceneNode
scaleHintirr::scene::IBoneSceneNode
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAnimationMode(E_BONE_ANIMATION_MODE mode)=0irr::scene::IBoneSceneNode [pure virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setSkinningSpace(E_BONE_SKINNING_SPACE space)=0irr::scene::IBoneSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
updateAbsolutePositionOfAllChildren()=0irr::scene::IBoneSceneNode [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.html new file mode 100644 index 0000000..3ac3f4e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.html @@ -0,0 +1,458 @@ + + + + +Irrlicht 3D Engine: irr::scene::IBoneSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IBoneSceneNode Class Reference
+
+
+ +

Interface for bones used for skeletal animation. + More...

+ +

#include <IBoneSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IBoneSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Interface for bones used for skeletal animation.

+

Used with ISkinnedMesh and IAnimatedMeshSceneNode.

+ +

Definition at line 55 of file IBoneSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IBoneSceneNode::IBoneSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id = -1 
) [inline]
+
+
+ +

Definition at line 59 of file IBoneSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual E_BONE_ANIMATION_MODE irr::scene::IBoneSceneNode::getAnimationMode () const [pure virtual]
+
+
+ +

Gets the current animation mode of the bone.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IBoneSceneNode::getBoneIndex () const [pure virtual]
+
+
+ +

Get the index of the bone.

+ +
+
+ +
+
+ + + + + + + +
virtual _IRR_DEPRECATED_ const c8* irr::scene::IBoneSceneNode::getBoneName () const [inline, virtual]
+
+
+ +

Get the name of the bone.

+
Deprecated:
Use getName instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 64 of file IBoneSceneNode.h.

+ +

References irr::scene::ISceneNode::getName().

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::IBoneSceneNode::getBoundingBox () const [pure virtual]
+
+
+ +

Get the axis aligned bounding box of this node.

+ +

Implements irr::scene::ISceneNode.

+ +
+
+ +
+
+ + + + + + + +
virtual E_BONE_SKINNING_SPACE irr::scene::IBoneSceneNode::getSkinningSpace () const [pure virtual]
+
+
+ +

How the relative transformation of the bone is used.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBoneSceneNode::OnAnimate (u32 timeMs) [pure virtual]
+
+
+ +

Returns the relative transformation of the scene node.

+

The animation method.

+ +

Reimplemented from irr::scene::ISceneNode.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IBoneSceneNode::render () [inline, virtual]
+
+
+ +

The render method.

+

Does nothing as bones are not visible.

+ +

Implements irr::scene::ISceneNode.

+ +

Definition at line 87 of file IBoneSceneNode.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IBoneSceneNode::setAnimationMode (E_BONE_ANIMATION_MODE mode) [pure virtual]
+
+
+ +

Sets the animation mode of the bone.

+
Returns:
True if successful. (Unused)
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IBoneSceneNode::setSkinningSpace (E_BONE_SKINNING_SPACE space) [pure virtual]
+
+
+ +

How the relative transformation of the bone is used.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IBoneSceneNode::updateAbsolutePositionOfAllChildren () [pure virtual]
+
+
+ +

Updates the absolute position based on the relative and the parents position.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 98 of file IBoneSceneNode.h.

+ +
+
+ +
+ +
+ +

Definition at line 100 of file IBoneSceneNode.h.

+ +
+
+ +
+ +
+ +

Definition at line 99 of file IBoneSceneNode.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.png new file mode 100644 index 0000000..56e2780 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_bone_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node-members.html new file mode 100644 index 0000000..b2a5cdf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node-members.html @@ -0,0 +1,226 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ICameraSceneNode Member List
+
+
+This is the complete list of members for irr::scene::ICameraSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
bindTargetAndRotation(bool bound)=0irr::scene::ICameraSceneNode [pure virtual]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ICameraSceneNode *toCopyFrom)irr::scene::ICameraSceneNode [inline, protected]
irr::scene::ISceneNode::cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ICameraSceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAspectRatio() const =0irr::scene::ICameraSceneNode [pure virtual]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getFarValue() const =0irr::scene::ICameraSceneNode [pure virtual]
getFOV() const =0irr::scene::ICameraSceneNode [pure virtual]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getNearValue() const =0irr::scene::ICameraSceneNode [pure virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getProjectionMatrix() const =0irr::scene::ICameraSceneNode [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTarget() const =0irr::scene::ICameraSceneNode [pure virtual]
getTargetAndRotationBinding(void) const =0irr::scene::ICameraSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
getUpVector() const =0irr::scene::ICameraSceneNode [pure virtual]
getViewFrustum() const =0irr::scene::ICameraSceneNode [pure virtual]
getViewMatrix() const =0irr::scene::ICameraSceneNode [pure virtual]
getViewMatrixAffector() const =0irr::scene::ICameraSceneNode [pure virtual]
grab() const irr::IReferenceCounted [inline]
ICameraSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ICameraSceneNode [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
isDebugObject() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isInputReceiverEnabled() const =0irr::scene::ICameraSceneNode [pure virtual]
isOrthogonal() const irr::scene::ICameraSceneNode [inline, virtual]
IsOrthogonalirr::scene::ICameraSceneNode [protected]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnEvent(const SEvent &event)=0irr::scene::ICameraSceneNode [pure virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ICameraSceneNode [inline, virtual]
setAspectRatio(f32 aspect)=0irr::scene::ICameraSceneNode [pure virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setFarValue(f32 zf)=0irr::scene::ICameraSceneNode [pure virtual]
setFOV(f32 fovy)=0irr::scene::ICameraSceneNode [pure virtual]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setInputReceiverEnabled(bool enabled)=0irr::scene::ICameraSceneNode [pure virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setNearValue(f32 zn)=0irr::scene::ICameraSceneNode [pure virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setProjectionMatrix(const core::matrix4 &projection, bool isOrthogonal=false)=0irr::scene::ICameraSceneNode [pure virtual]
setRotation(const core::vector3df &rotation)=0irr::scene::ICameraSceneNode [pure virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTarget(const core::vector3df &pos)=0irr::scene::ICameraSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setUpVector(const core::vector3df &pos)=0irr::scene::ICameraSceneNode [pure virtual]
setViewMatrixAffector(const core::matrix4 &affector)=0irr::scene::ICameraSceneNode [pure virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.html new file mode 100644 index 0000000..1ccd096 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.html @@ -0,0 +1,927 @@ + + + + +Irrlicht 3D Engine: irr::scene::ICameraSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ICameraSceneNode Class Reference
+
+
+ +

Scene Node which is a (controlable) camera. + More...

+ +

#include <ICameraSceneNode.h>

+
+ + Inheritance diagram for irr::scene::ICameraSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+ +

+Protected Attributes

+ +

Detailed Description

+

Scene Node which is a (controlable) camera.

+

The whole scene will be rendered from the cameras point of view. Because the ICameraScenNode is a SceneNode, it can be attached to any other scene node, and will follow its parents movement, rotation and so on.

+ +

Definition at line 23 of file ICameraSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::ICameraSceneNode::ICameraSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0),
const core::vector3dfrotation = core::vector3df(0,0,0),
const core::vector3dfscale = core::vector3df(1.0f,1.0f,1.0f) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 28 of file ICameraSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::bindTargetAndRotation (bool bound) [pure virtual]
+
+
+ +

Binds the camera scene node's rotation to its target position and vice vera, or unbinds them.

+

When bound, calling setRotation() will update the camera's target position to be along its +Z axis, and likewise calling setTarget() will update its rotation so that its +Z axis will point at the target point. FPS camera use this binding by default; other cameras do not.

+
Parameters:
+ + +
boundTrue to bind the camera's scene node rotation and targetting, false to unbind them.
+
+
+
See also:
getTargetAndRotationBinding()
+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::ICameraSceneNode::cloneMembers (ICameraSceneNodetoCopyFrom) [inline, protected]
+
+
+ +

Definition at line 195 of file ICameraSceneNode.h.

+ +

References IsOrthogonal.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ICameraSceneNode::deserializeAttributes (io::IAttributesin,
io::SAttributeReadWriteOptionsoptions = 0 
) [inline, virtual]
+
+
+ +

Reads attributes of the camera node.

+ +

Reimplemented from irr::scene::ISceneNode.

+ +

Definition at line 183 of file ICameraSceneNode.h.

+ +

References irr::io::IAttributes::findAttribute(), irr::io::IAttributes::getAttributeAsBool(), and IsOrthogonal.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ICameraSceneNode::getAspectRatio () const [pure virtual]
+
+
+ +

Gets the aspect ratio of the camera.

+
Returns:
The aspect ratio of the camera.
+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ICameraSceneNode::getFarValue () const [pure virtual]
+
+
+ +

Gets the value of the far plane of the camera.

+
Returns:
The value of the far plane of the camera.
+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ICameraSceneNode::getFOV () const [pure virtual]
+
+
+ +

Gets the field of view of the camera.

+
Returns:
The field of view of the camera in radians.
+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ICameraSceneNode::getNearValue () const [pure virtual]
+
+
+ +

Gets the value of the near plane of the camera.

+
Returns:
The value of the near plane of the camera.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::matrix4& irr::scene::ICameraSceneNode::getProjectionMatrix () const [pure virtual]
+
+
+ +

Gets the current projection matrix of the camera.

+
Returns:
The current projection matrix of the camera.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ICameraSceneNode::getTarget () const [pure virtual]
+
+
+ +

Gets the current look at target of the camera.

+
Returns:
The current look at target of the camera, in world co-ordinates
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ICameraSceneNode::getTargetAndRotationBinding (void ) const [pure virtual]
+
+
+ +

Queries if the camera scene node's rotation and its target position are bound together.

+
See also:
bindTargetAndRotation()
+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ICameraSceneNode::getUpVector () const [pure virtual]
+
+
+ +

Gets the up vector of the camera.

+
Returns:
The up vector of the camera, in world space.
+ +
+
+ +
+
+ + + + + + + +
virtual const SViewFrustum* irr::scene::ICameraSceneNode::getViewFrustum () const [pure virtual]
+
+
+ +

Get the view frustum.

+

Needed sometimes by bspTree or LOD render nodes.

+
Returns:
The current view frustum.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::matrix4& irr::scene::ICameraSceneNode::getViewMatrix () const [pure virtual]
+
+
+ +

Gets the current view matrix of the camera.

+
Returns:
The current view matrix of the camera.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::matrix4& irr::scene::ICameraSceneNode::getViewMatrixAffector () const [pure virtual]
+
+
+ +

Get the custom view matrix affector.

+
Returns:
The affector matrix.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ICameraSceneNode::isInputReceiverEnabled () const [pure virtual]
+
+
+ +

Checks if the input receiver of the camera is currently enabled.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ICameraSceneNode::isOrthogonal () const [inline, virtual]
+
+
+ +

Checks if a camera is orthogonal.

+ +

Definition at line 151 of file ICameraSceneNode.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsOrthogonal.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ICameraSceneNode::OnEvent (const SEventevent) [pure virtual]
+
+
+ +

It is possible to send mouse and key events to the camera.

+

Most cameras may ignore this input, but camera scene nodes which are created for example with ISceneManager::addCameraSceneNodeMaya or ISceneManager::addCameraSceneNodeFPS, may want to get this input for changing their position, look at target or whatever.

+ +

Implements irr::IEventReceiver.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ICameraSceneNode::serializeAttributes (io::IAttributesout,
io::SAttributeReadWriteOptionsoptions = 0 
) const [inline, virtual]
+
+
+ +

Writes attributes of the camera node.

+ +

Reimplemented from irr::scene::ISceneNode.

+ +

Definition at line 173 of file ICameraSceneNode.h.

+ +

References irr::io::IAttributes::addBool(), and IsOrthogonal.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setAspectRatio (f32 aspect) [pure virtual]
+
+
+ +

Sets the aspect ratio (default: 4.0f / 3.0f)

+
Parameters:
+ + +
aspect,:New aspect ratio.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setFarValue (f32 zf) [pure virtual]
+
+
+ +

Sets the value of the far clipping plane (default: 2000.0f)

+
Parameters:
+ + +
zf,:New z far value.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setFOV (f32 fovy) [pure virtual]
+
+
+ +

Sets the field of view (Default: PI / 2.5f)

+
Parameters:
+ + +
fovy,:New field of view in radians.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setInputReceiverEnabled (bool enabled) [pure virtual]
+
+
+ +

Disables or enables the camera to get key or mouse inputs.

+

If this is set to true, the camera will respond to key inputs otherwise not.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setNearValue (f32 zn) [pure virtual]
+
+
+ +

Sets the value of the near clipping plane. (default: 1.0f)

+
Parameters:
+ + +
zn,:New z near value.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setProjectionMatrix (const core::matrix4projection,
bool isOrthogonal = false 
) [pure virtual]
+
+
+ +

Sets the projection matrix of the camera.

+

The core::matrix4 class has some methods to build a projection matrix. e.g: core::matrix4::buildProjectionMatrixPerspectiveFovLH. Note that the matrix will only stay as set by this method until one of the following Methods are called: setNearValue, setFarValue, setAspectRatio, setFOV.

+
Parameters:
+ + + +
projectionThe new projection matrix of the camera.
isOrthogonalSet this to true if the matrix is an orthogonal one (e.g. from matrix4::buildProjectionMatrixOrtho).
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setRotation (const core::vector3dfrotation) [pure virtual]
+
+
+ +

Sets the rotation of the node.

+

This only modifies the relative rotation of the node. If the camera's target and rotation are bound (

+
See also:
bindTargetAndRotation() ) then calling this will also change the camera's target to match the rotation.
+
Parameters:
+ + +
rotationNew rotation of the node in degrees.
+
+
+ +

Reimplemented from irr::scene::ISceneNode.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setTarget (const core::vector3dfpos) [pure virtual]
+
+
+ +

Sets the look at target of the camera.

+

If the camera's target and rotation are bound (

+
See also:
bindTargetAndRotation() ) then calling this will also change the camera's scene node rotation to match the target. Note that setTarget uses the current absolute position internally, so if you changed setPosition since last rendering you must call updateAbsolutePosition before using this function.
+
Parameters:
+ + +
posLook at target of the camera, in world co-ordinates.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setUpVector (const core::vector3dfpos) [pure virtual]
+
+
+ +

Sets the up vector of the camera.

+
Parameters:
+ + +
pos,:New upvector of the camera.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ICameraSceneNode::setViewMatrixAffector (const core::matrix4affector) [pure virtual]
+
+
+ +

Sets a custom view matrix affector.

+

The matrix passed here, will be multiplied with the view matrix when it gets updated. This allows for custom camera setups like, for example, a reflection camera.

+
Parameters:
+ + +
affectorThe affector matrix.
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
bool irr::scene::ICameraSceneNode::IsOrthogonal [protected]
+
+
+ +

Definition at line 200 of file ICameraSceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), isOrthogonal(), and serializeAttributes().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.png new file mode 100644 index 0000000..c7e1154 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_camera_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer-members.html new file mode 100644 index 0000000..85567ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer-members.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IColladaMeshWriter Member List
+
+
+This is the complete list of members for irr::scene::IColladaMeshWriter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getAmbientLight() const irr::scene::IColladaMeshWriter [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDefaultNameGenerator() const irr::scene::IColladaMeshWriter [inline]
getDefaultProperties() const irr::scene::IColladaMeshWriter [inline]
getExportSMaterialsOnlyOnce() const irr::scene::IColladaMeshWriter [inline, virtual]
getGeometryWriting() const irr::scene::IColladaMeshWriter [inline, virtual]
getNameGenerator() const irr::scene::IColladaMeshWriter [inline, virtual]
getProperties() const irr::scene::IColladaMeshWriter [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const =0irr::scene::IMeshWriter [pure virtual]
getWriteDefaultScene() const irr::scene::IColladaMeshWriter [inline, virtual]
getWriteTextures() const irr::scene::IColladaMeshWriter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IColladaMeshWriter()irr::scene::IColladaMeshWriter [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setAmbientLight(const video::SColorf &ambientColor)irr::scene::IColladaMeshWriter [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDefaultNameGenerator(IColladaMeshWriterNames *p)irr::scene::IColladaMeshWriter [inline, protected, virtual]
setDefaultProperties(IColladaMeshWriterProperties *p)irr::scene::IColladaMeshWriter [inline, protected, virtual]
setExportSMaterialsOnlyOnce(bool exportOnce)irr::scene::IColladaMeshWriter [inline, virtual]
setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle)irr::scene::IColladaMeshWriter [inline, virtual]
setNameGenerator(IColladaMeshWriterNames *nameGenerator)irr::scene::IColladaMeshWriter [inline, virtual]
setProperties(IColladaMeshWriterProperties *p)irr::scene::IColladaMeshWriter [inline, virtual]
setWriteDefaultScene(bool write)irr::scene::IColladaMeshWriter [inline, virtual]
setWriteTextures(bool write)irr::scene::IColladaMeshWriter [inline, virtual]
toNCName(const irr::core::stringw &oldString, const irr::core::stringw &prefix=irr::core::stringw(L"_NC_")) const =0irr::scene::IColladaMeshWriter [pure virtual]
writeMesh(io::IWriteFile *file, scene::IMesh *mesh, s32 flags=EMWF_NONE)=0irr::scene::IMeshWriter [pure virtual]
writeScene(io::IWriteFile *file, scene::ISceneNode *root)=0irr::scene::IColladaMeshWriter [pure virtual]
~IColladaMeshWriter()irr::scene::IColladaMeshWriter [inline, virtual]
~IMeshWriter()irr::scene::IMeshWriter [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.html new file mode 100644 index 0000000..ae07891 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.html @@ -0,0 +1,666 @@ + + + + +Irrlicht 3D Engine: irr::scene::IColladaMeshWriter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IColladaMeshWriter Class Reference
+
+
+ +

Interface for writing meshes. + More...

+ +

#include <IColladaMeshWriter.h>

+
+ + Inheritance diagram for irr::scene::IColladaMeshWriter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+ +

Detailed Description

+

Interface for writing meshes.

+ +

Definition at line 201 of file IColladaMeshWriter.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::IColladaMeshWriter::IColladaMeshWriter () [inline]
+
+
+ +

Definition at line 205 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::IColladaMeshWriter::~IColladaMeshWriter () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 214 of file IColladaMeshWriter.h.

+ +

References irr::IReferenceCounted::drop().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual video::SColorf irr::scene::IColladaMeshWriter::getAmbientLight () const [inline, virtual]
+
+
+ +

Return ambient light of the scene which is written.

+ +

Definition at line 265 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
IColladaMeshWriterNames* irr::scene::IColladaMeshWriter::getDefaultNameGenerator () const [inline]
+
+
+ +

Return the original default name generator of the writer.

+

You can use this pointer in your own generator to access and return default values.

+ +

Definition at line 354 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
IColladaMeshWriterProperties* irr::scene::IColladaMeshWriter::getDefaultProperties () const [inline]
+
+
+ +

Return the original default properties of the writer.

+

You can use this pointer in your own properties to access and return default values.

+ +

Definition at line 329 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IColladaMeshWriter::getExportSMaterialsOnlyOnce () const [inline, virtual]
+
+
+ +

Definition at line 302 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual E_COLLADA_GEOMETRY_WRITING irr::scene::IColladaMeshWriter::getGeometryWriting () const [inline, virtual]
+
+
+ +

Get the current style of geometry writing.

+ +

Definition at line 284 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual IColladaMeshWriterNames* irr::scene::IColladaMeshWriter::getNameGenerator () const [inline, virtual]
+
+
+ +

Get currently used name generator.

+ +

Definition at line 347 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual IColladaMeshWriterProperties* irr::scene::IColladaMeshWriter::getProperties () const [inline, virtual]
+
+
+ +

Get properties which are currently used.

+ +

Definition at line 322 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IColladaMeshWriter::getWriteDefaultScene () const [inline, virtual]
+
+
+ +

Get if a default scene should be written.

+ +

Definition at line 253 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IColladaMeshWriter::getWriteTextures () const [inline, virtual]
+
+
+ +

Get if texture information should be written.

+ +

Definition at line 237 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setAmbientLight (const video::SColorfambientColor) [inline, virtual]
+
+
+ +

Sets ambient color of the scene to write.

+ +

Definition at line 259 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setDefaultNameGenerator (IColladaMeshWriterNamesp) [inline, protected, virtual]
+
+
+ +

Definition at line 378 of file IColladaMeshWriter.h.

+ +

References irr::IReferenceCounted::drop(), and irr::IReferenceCounted::grab().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setDefaultProperties (IColladaMeshWriterPropertiesp) [inline, protected, virtual]
+
+
+ +

Definition at line 366 of file IColladaMeshWriter.h.

+ +

References irr::IReferenceCounted::drop(), and irr::IReferenceCounted::grab().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setExportSMaterialsOnlyOnce (bool exportOnce) [inline, virtual]
+
+
+ +

Make certain there is only one collada material generated per Irrlicht material.

+

Checks before creating a collada material-name if an identical irr:::video::SMaterial has been exported already. If so don't export it with another name. This is set by default and leads to way smaller .dae files. Note that if you need to disable this flag for some reason you can still get a similar effect using the IColladaMeshWriterNames::nameForMaterial by returning identical names for identical materials there.

+ +

Definition at line 297 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setGeometryWriting (E_COLLADA_GEOMETRY_WRITING writeStyle) [inline, virtual]
+
+
+ +

Control when and how often a mesh is written.

+

Optimally ECGI_PER_MESH would be always sufficent - writing geometry once per mesh. Unfortunately many tools (at the time of writing this nearly all of them) have trouble on import when different materials are used per node. So when you override materials per node and importing the resuling collada has materials problems in other tools try using other values here.

+
Parameters:
+ + +
writeStyleOne of the E_COLLADA_GEOMETRY_WRITING settings.
+
+
+ +

Definition at line 278 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setNameGenerator (IColladaMeshWriterNamesnameGenerator) [inline, virtual]
+
+
+ +

Install a generator to create custom names on export.

+ +

Definition at line 335 of file IColladaMeshWriter.h.

+ +

References irr::IReferenceCounted::drop(), and irr::IReferenceCounted::grab().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setProperties (IColladaMeshWriterPropertiesp) [inline, virtual]
+
+
+ +

Set properties to use by the meshwriter instead of it's default properties.

+

Overloading properties with an own class allows modifying the writing process in certain ways. By default properties are set to the DefaultProperties.

+ +

Definition at line 310 of file IColladaMeshWriter.h.

+ +

References irr::IReferenceCounted::drop(), and irr::IReferenceCounted::grab().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setWriteDefaultScene (bool write) [inline, virtual]
+
+
+ +

Set if a default scene should be written when writing meshes.

+

Many collada readers fail to read a mesh if the collada files doesn't contain a scene as well. The scene is doing an instantiation of the mesh. When using writeScene this flag is ignored (as we have scene there already)

+ +

Definition at line 247 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IColladaMeshWriter::setWriteTextures (bool write) [inline, virtual]
+
+
+ +

Set if texture information should be written.

+ +

Definition at line 231 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual irr::core::stringw irr::scene::IColladaMeshWriter::toNCName (const irr::core::stringwoldString,
const irr::core::stringwprefix = irr::core::stringw(L"_NC_") 
) const [pure virtual]
+
+
+ +

Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix.

+

A tool function to help when using a custom name generator to generative valid names for collada names and id's.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::IColladaMeshWriter::writeScene (io::IWriteFilefile,
scene::ISceneNoderoot 
) [pure virtual]
+
+
+ +

writes a scene starting with the given node

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.png new file mode 100644 index 0000000..405b754 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names-members.html new file mode 100644 index 0000000..11d0bc4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IColladaMeshWriterNames Member List
+
+
+This is the complete list of members for irr::scene::IColladaMeshWriterNames, including all inherited members. + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
nameForMaterial(const video::SMaterial &material, int materialId, const scene::IMesh *mesh, const scene::ISceneNode *node)=0irr::scene::IColladaMeshWriterNames [pure virtual]
nameForMesh(const scene::IMesh *mesh, int instance)=0irr::scene::IColladaMeshWriterNames [pure virtual]
nameForNode(const scene::ISceneNode *node)=0irr::scene::IColladaMeshWriterNames [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IColladaMeshWriterNames()irr::scene::IColladaMeshWriterNames [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.html new file mode 100644 index 0000000..85ee2b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.html @@ -0,0 +1,277 @@ + + + + +Irrlicht 3D Engine: irr::scene::IColladaMeshWriterNames Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IColladaMeshWriterNames Class Reference
+
+
+ +

Callback interface to use custom names on collada writing. + More...

+ +

#include <IColladaMeshWriter.h>

+
+ + Inheritance diagram for irr::scene::IColladaMeshWriterNames:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Callback interface to use custom names on collada writing.

+

You can either modify names and id's written to collada or you can use this interface to just find out which names are used on writing.

+ +

Definition at line 158 of file IColladaMeshWriter.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::IColladaMeshWriterNames::~IColladaMeshWriterNames () [inline, virtual]
+
+
+ +

Definition at line 162 of file IColladaMeshWriter.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual irr::core::stringw irr::scene::IColladaMeshWriterNames::nameForMaterial (const video::SMaterialmaterial,
int materialId,
const scene::IMeshmesh,
const scene::ISceneNodenode 
) [pure virtual]
+
+
+ +

Return a name for the material.

+

There is one material created in the writer for each unique name. So you can use this to control the number of materials which get written. For example Irrlicht does by default write one material for each material instanced by a node. So if you know that in your application material instances per node are identical between different nodes you can reduce the number of exported materials using that knowledge by using identical names for such shared materials. Names must follow the xs::NCName standard to be valid, you can run them through IColladaMeshWriter::toNCName to ensure that.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual irr::core::stringw irr::scene::IColladaMeshWriterNames::nameForMesh (const scene::IMeshmesh,
int instance 
) [pure virtual]
+
+
+ +

Return a unique name for the given mesh.

+

Note that names really must be unique here per mesh-pointer, so mostly it's a good idea to return the nameForMesh from IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow the xs::NCName standard to be valid, you can run them through IColladaMeshWriter::toNCName to ensure that.

+
Parameters:
+ + + +
meshPointer to the mesh which needs a name
instanceWhen E_COLLADA_GEOMETRY_WRITING is not ECGI_PER_MESH then several instances of the same mesh can be written and this counts them.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual irr::core::stringw irr::scene::IColladaMeshWriterNames::nameForNode (const scene::ISceneNodenode) [pure virtual]
+
+
+ +

Return a unique name for the given node.

+

Note that names really must be unique here per node-pointer, so mostly it's a good idea to return the nameForNode from IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow the xs::NCName standard to be valid, you can run them through IColladaMeshWriter::toNCName to ensure that.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.png new file mode 100644 index 0000000..29d920f Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_names.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties-members.html new file mode 100644 index 0000000..a4e37e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties-members.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IColladaMeshWriterProperties Member List
+
+
+This is the complete list of members for irr::scene::IColladaMeshWriterProperties, including all inherited members. + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getColorMapping(const video::SMaterial &material, E_COLLADA_COLOR_SAMPLER cs) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getCustomColor(const video::SMaterial &material, E_COLLADA_COLOR_SAMPLER cs) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getIndexOfRefraction(const video::SMaterial &material) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getMesh(irr::scene::ISceneNode *node)=0irr::scene::IColladaMeshWriterProperties [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getReflectivity(const video::SMaterial &material) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getTechniqueFx(const video::SMaterial &material) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getTextureIdx(const video::SMaterial &material, E_COLLADA_COLOR_SAMPLER cs) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getTransparency(const video::SMaterial &material) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
getTransparentFx(const video::SMaterial &material) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isExportable(const irr::scene::ISceneNode *node) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
useNodeMaterial(const scene::ISceneNode *node) const =0irr::scene::IColladaMeshWriterProperties [pure virtual]
~IColladaMeshWriterProperties()irr::scene::IColladaMeshWriterProperties [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html new file mode 100644 index 0000000..59caca1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html @@ -0,0 +1,434 @@ + + + + +Irrlicht 3D Engine: irr::scene::IColladaMeshWriterProperties Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IColladaMeshWriterProperties Class Reference
+
+
+ +

Callback interface for properties which can be used to influence collada writing. + More...

+ +

#include <IColladaMeshWriter.h>

+
+ + Inheritance diagram for irr::scene::IColladaMeshWriterProperties:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Callback interface for properties which can be used to influence collada writing.

+ +

Definition at line 92 of file IColladaMeshWriter.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::IColladaMeshWriterProperties::~IColladaMeshWriterProperties () [inline, virtual]
+
+
+ +

Definition at line 95 of file IColladaMeshWriter.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual E_COLLADA_IRR_COLOR irr::scene::IColladaMeshWriterProperties::getColorMapping (const video::SMaterialmaterial,
E_COLLADA_COLOR_SAMPLER cs 
) const [pure virtual]
+
+
+ +

Return which color from Irrlicht should be used for the color requested by collada.

+

Note that collada allows exporting either texture or color, not both. So color mapping is only checked if we have no valid texture already. By default we try to return best fits when possible. For example ECCS_DIFFUSE is mapped to ECIC_DIFFUSE. When ECIC_CUSTOM is returned then the result of getCustomColor will be used.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual video::SColor irr::scene::IColladaMeshWriterProperties::getCustomColor (const video::SMaterialmaterial,
E_COLLADA_COLOR_SAMPLER cs 
) const [pure virtual]
+
+
+ +

Return custom colors for certain color types requested by collada.

+

Only used when getColorMapping returns ECIC_CUSTOM for the same paramters.

+ +
+
+ +
+
+ + + + + + + + +
virtual f32 irr::scene::IColladaMeshWriterProperties::getIndexOfRefraction (const video::SMaterialmaterial) const [pure virtual]
+
+
+ +

Return index of refraction for that material.

+

By default we don't write that.

+
Returns:
a value greater equal 0.f to write <index_of_refraction> when it is lesser than 0 nothing will be written
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IColladaMeshWriterProperties::getMesh (irr::scene::ISceneNodenode) [pure virtual]
+
+
+

Return the mesh for the given node. If it has no mesh or shouldn't export it's mesh you can return 0 in which case only the transformation matrix of the node will be used.

+ +
+
+ +
+
+ + + + + + + + +
virtual f32 irr::scene::IColladaMeshWriterProperties::getReflectivity (const video::SMaterialmaterial) const [pure virtual]
+
+
+ +

Reflectivity value for that material.

+

The amount of perfect mirror reflection to be added to the reflected light

+
Returns:
0.0 - 1.0 for reflectivity and element is not written at all when < 0.f
+ +
+
+ +
+
+ + + + + + + + +
virtual E_COLLADA_TECHNIQUE_FX irr::scene::IColladaMeshWriterProperties::getTechniqueFx (const video::SMaterialmaterial) const [pure virtual]
+
+
+ +

Which lighting model should be used in the technique (FX) section when exporting effects (materials)

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::scene::IColladaMeshWriterProperties::getTextureIdx (const video::SMaterialmaterial,
E_COLLADA_COLOR_SAMPLER cs 
) const [pure virtual]
+
+
+ +

Which texture index should be used when writing the texture of the given sampler color.

+
Returns:
the index to the texture-layer or -1 if that texture should never be exported Note: for ECCS_TRANSPARENT by default the alpha channel is used, if you want to use RGB you have to set also the ECOF_RGB_ZERO flag in getTransparentFx.
+ +
+
+ +
+
+ + + + + + + + +
virtual f32 irr::scene::IColladaMeshWriterProperties::getTransparency (const video::SMaterialmaterial) const [pure virtual]
+
+
+ +

Transparency value for that material.

+

This value is additional to transparent settings, if both are set they will be multiplicated.

+
Returns:
1.0 for fully transparent, 0.0 for not transparent and not written at all when < 0.f
+ +
+
+ +
+
+ + + + + + + + +
virtual E_COLLADA_TRANSPARENT_FX irr::scene::IColladaMeshWriterProperties::getTransparentFx (const video::SMaterialmaterial) const [pure virtual]
+
+
+ +

Return the transparence color interpretation.

+

Not this is only about ECCS_TRANSPARENT and does not affect getTransparency.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IColladaMeshWriterProperties::isExportable (const irr::scene::ISceneNodenode) const [pure virtual]
+
+
+

Should node be used in scene export? (only needed for scene-writing, ignored in mesh-writing) By default all visible nodes are exported.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IColladaMeshWriterProperties::useNodeMaterial (const scene::ISceneNodenode) const [pure virtual]
+
+
+ +

Return if the node has it's own material overwriting the mesh-materials.

+

Usually true except for mesh-nodes which have isReadOnlyMaterials set. This is mostly important for naming (as ISceneNode::getMaterial() already returns the correct material). You have to override it when exporting custom scenenodes with own materials.

+
Returns:
true => The node's own material is used, false => ignore node material and use the one from the mesh
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.png new file mode 100644 index 0000000..6377b56 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collada_mesh_writer_properties.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback-members.html new file mode 100644 index 0000000..21a1491 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback-members.html @@ -0,0 +1,128 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ICollisionCallback Member List
+
+
+This is the complete list of members for irr::scene::ICollisionCallback, including all inherited members. + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
onCollision(const ISceneNodeAnimatorCollisionResponse &animator)=0irr::scene::ICollisionCallback [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.html new file mode 100644 index 0000000..82fb854 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.html @@ -0,0 +1,189 @@ + + + + +Irrlicht 3D Engine: irr::scene::ICollisionCallback Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ICollisionCallback Class Reference
+
+
+ +

Callback interface for catching events of collisions. + More...

+ +

#include <ISceneNodeAnimatorCollisionResponse.h>

+
+ + Inheritance diagram for irr::scene::ICollisionCallback:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Callback interface for catching events of collisions.

+

Implement this interface and use ISceneNodeAnimatorCollisionResponse::setCollisionCallback to be able to be notified if a collision has occurred.

+ +

Definition at line 22 of file ISceneNodeAnimatorCollisionResponse.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool irr::scene::ICollisionCallback::onCollision (const ISceneNodeAnimatorCollisionResponseanimator) [pure virtual]
+
+
+ +

Will be called when a collision occurrs.

+

See ISceneNodeAnimatorCollisionResponse::setCollisionCallback for more information.

+
Parameters:
+ + +
animator,:Collision response animator in which the collision occurred. You can call this animator's methods to find the node, collisionPoint and/or collision triangle.
+
+
+
Return values:
+ + + +
trueif the collision was handled in the animator. The animator's target node will *not* be stopped at the collision point, but will instead move fully to the location that triggered the collision check.
falseif the collision was not handled in the animator. The animator's target node will be moved to the collision position.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.png new file mode 100644 index 0000000..d488b4b Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_collision_callback.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node-members.html new file mode 100644 index 0000000..3a570ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node-members.html @@ -0,0 +1,200 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IDummyTransformationSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IDummyTransformationSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRelativeTransformationMatrix()=0irr::scene::IDummyTransformationSceneNode [pure virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IDummyTransformationSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id)irr::scene::IDummyTransformationSceneNode [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.html new file mode 100644 index 0000000..8222370 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.html @@ -0,0 +1,216 @@ + + + + +Irrlicht 3D Engine: irr::scene::IDummyTransformationSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IDummyTransformationSceneNode Class Reference
+
+
+ +

Dummy scene node for adding additional transformations to the scene graph. + More...

+ +

#include <IDummyTransformationSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IDummyTransformationSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Dummy scene node for adding additional transformations to the scene graph.

+

This scene node does not render itself, and does not respond to set/getPosition, set/getRotation and set/getScale. Its just a simple scene node that takes a matrix as relative transformation, making it possible to insert any transformation anywhere into the scene graph. This scene node is for example used by the IAnimatedMeshSceneNode for emulating joint scene nodes when playing skeletal animations.

+ +

Definition at line 23 of file IDummyTransformationSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IDummyTransformationSceneNode::IDummyTransformationSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 28 of file IDummyTransformationSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual core::matrix4& irr::scene::IDummyTransformationSceneNode::getRelativeTransformationMatrix () [pure virtual]
+
+
+ +

Returns a reference to the current relative transformation matrix.

+

This is the matrix, this scene node uses instead of scale, translation and rotation.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.png new file mode 100644 index 0000000..17931b5 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dummy_transformation_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer-members.html new file mode 100644 index 0000000..fe84160 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer-members.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IDynamicMeshBuffer Member List
+
+
+This is the complete list of members for irr::scene::IDynamicMeshBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)irr::scene::IDynamicMeshBuffer [inline, virtual]
append(const IMeshBuffer *const other)irr::scene::IDynamicMeshBuffer [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const =0irr::scene::IDynamicMeshBuffer [pure virtual]
getChangedID_Index() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getChangedID_Vertex() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint_Index() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getHardwareMappingHint_Vertex() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndexBuffer() const =0irr::scene::IDynamicMeshBuffer [pure virtual]
getIndexCount() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndexType() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndices() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getIndices()irr::scene::IDynamicMeshBuffer [inline, virtual]
getMaterial()=0irr::scene::IDynamicMeshBuffer [pure virtual]
getMaterial() const =0irr::scene::IDynamicMeshBuffer [pure virtual]
getNormal(u32 i) const irr::scene::IDynamicMeshBuffer [inline, virtual]
getNormal(u32 i)irr::scene::IDynamicMeshBuffer [inline, virtual]
getPosition(u32 i) const irr::scene::IDynamicMeshBuffer [inline, virtual]
getPosition(u32 i)irr::scene::IDynamicMeshBuffer [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTCoords(u32 i) const irr::scene::IDynamicMeshBuffer [inline, virtual]
getTCoords(u32 i)irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertexBuffer() const =0irr::scene::IDynamicMeshBuffer [pure virtual]
getVertexCount() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertexType() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertices() const irr::scene::IDynamicMeshBuffer [inline, virtual]
getVertices()irr::scene::IDynamicMeshBuffer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
recalculateBoundingBox()=0irr::scene::IDynamicMeshBuffer [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IDynamicMeshBuffer [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::IDynamicMeshBuffer [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::IDynamicMeshBuffer [inline, virtual]
setIndexBuffer(IIndexBuffer *indexBuffer)=0irr::scene::IDynamicMeshBuffer [pure virtual]
setVertexBuffer(IVertexBuffer *vertexBuffer)=0irr::scene::IDynamicMeshBuffer [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html new file mode 100644 index 0000000..91ca874 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html @@ -0,0 +1,977 @@ + + + + +Irrlicht 3D Engine: irr::scene::IDynamicMeshBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IDynamicMeshBuffer Class Reference
+
+
+ +

#include <IDynamicMeshBuffer.h>

+
+ + Inheritance diagram for irr::scene::IDynamicMeshBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

a dynamic meshBuffer

+ +

Definition at line 18 of file IDynamicMeshBuffer.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::append (const void *const vertices,
u32 numVertices,
const u16 *const indices,
u32 numIndices 
) [inline, virtual]
+
+
+ +

Append the vertices and indices to the current buffer.

+

Only works for compatible vertex types.

+
Parameters:
+ + + + + +
verticesPointer to a vertex array.
numVerticesNumber of vertices in the array.
indicesPointer to index array.
numIndicesNumber of indices in array.
+
+
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 53 of file IDynamicMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::append (const IMeshBuffer *const other) [inline, virtual]
+
+
+ +

Append the meshbuffer to the current buffer.

+

Only works for compatible vertex types

+
Parameters:
+ + +
otherBuffer to append to this one.
+
+
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 61 of file IDynamicMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3df& irr::scene::IDynamicMeshBuffer::getBoundingBox () const [pure virtual]
+
+
+ +

Get the axis aligned bounding box of this meshbuffer.

+
Returns:
Axis aligned bounding box of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IDynamicMeshBuffer::getChangedID_Index () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 103 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IIndexBuffer::getChangedID(), and getIndexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IDynamicMeshBuffer::getChangedID_Vertex () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 98 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IVertexBuffer::getChangedID(), and getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::IDynamicMeshBuffer::getHardwareMappingHint_Index () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 75 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IIndexBuffer::getHardwareMappingHint(), and getIndexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::IDynamicMeshBuffer::getHardwareMappingHint_Vertex () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 69 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IVertexBuffer::getHardwareMappingHint(), and getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual IIndexBuffer& irr::scene::IDynamicMeshBuffer::getIndexBuffer () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IDynamicMeshBuffer::getIndexCount () const [inline, virtual]
+
+
+ +

Get amount of indices in this meshbuffer.

+
Returns:
Number of indices in this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 163 of file IDynamicMeshBuffer.h.

+ +

References getIndexBuffer(), and irr::scene::IIndexBuffer::size().

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::IDynamicMeshBuffer::getIndexType () const [inline, virtual]
+
+
+ +

Get type of index data which is stored in this meshbuffer.

+
Returns:
Index type of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 142 of file IDynamicMeshBuffer.h.

+ +

References getIndexBuffer(), and irr::scene::IIndexBuffer::getType().

+ +
+
+ +
+
+ + + + + + + +
virtual const u16* irr::scene::IDynamicMeshBuffer::getIndices () const [inline, virtual]
+
+
+ +

Get access to Indices.

+
Returns:
Pointer to indices array.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 149 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IIndexBuffer::getData(), and getIndexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual u16* irr::scene::IDynamicMeshBuffer::getIndices () [inline, virtual]
+
+
+ +

Get access to Indices.

+
Returns:
Pointer to indices array.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 156 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IIndexBuffer::getData(), and getIndexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual video::SMaterial& irr::scene::IDynamicMeshBuffer::getMaterial () [pure virtual]
+
+
+ +

Get the material of this meshbuffer.

+
Returns:
Material of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SMaterial& irr::scene::IDynamicMeshBuffer::getMaterial () const [pure virtual]
+
+
+ +

Get the material of this meshbuffer.

+
Returns:
Material of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::IDynamicMeshBuffer::getNormal (u32 i) const [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 193 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::IDynamicMeshBuffer::getNormal (u32 i) [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 199 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::IDynamicMeshBuffer::getPosition (u32 i) const [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 169 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::IDynamicMeshBuffer::getPosition (u32 i) [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 175 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector2df& irr::scene::IDynamicMeshBuffer::getTCoords (u32 i) const [inline, virtual]
+
+
+ +

returns texture coords of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 181 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector2df& irr::scene::IDynamicMeshBuffer::getTCoords (u32 i) [inline, virtual]
+
+
+ +

returns texture coords of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 187 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual IVertexBuffer& irr::scene::IDynamicMeshBuffer::getVertexBuffer () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IDynamicMeshBuffer::getVertexCount () const [inline, virtual]
+
+
+ +

Get amount of vertices in meshbuffer.

+
Returns:
Number of vertices in this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 135 of file IDynamicMeshBuffer.h.

+ +

References getVertexBuffer(), and irr::scene::IVertexBuffer::size().

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::IDynamicMeshBuffer::getVertexType () const [inline, virtual]
+
+
+ +

Get type of vertex data which is stored in this meshbuffer.

+
Returns:
Vertex type of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 112 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IVertexBuffer::getType(), and getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual const void* irr::scene::IDynamicMeshBuffer::getVertices () const [inline, virtual]
+
+
+ +

Get access to vertex data. The data is an array of vertices.

+

Which vertex type is used can be determined by getVertexType().

+
Returns:
Pointer to array of vertices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 120 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IVertexBuffer::getData(), and getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::IDynamicMeshBuffer::getVertices () [inline, virtual]
+
+
+ +

Get access to vertex data. The data is an array of vertices.

+

Which vertex type is used can be determined by getVertexType().

+
Returns:
Pointer to array of vertices.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 128 of file IDynamicMeshBuffer.h.

+ +

References irr::scene::IVertexBuffer::getData(), and getVertexBuffer().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::recalculateBoundingBox () [pure virtual]
+
+
+ +

Recalculates the bounding box. Should be called if the mesh changed.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::setBoundingBox (const core::aabbox3dfbox) [pure virtual]
+
+
+ +

Set axis aligned bounding box.

+
Parameters:
+ + +
boxUser defined axis aligned bounding box to use for this buffer.
+
+
+ +

Implements irr::scene::IMeshBuffer.

+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::setDirty (E_BUFFER_TYPE Buffer = EBT_VERTEX_AND_INDEX) [inline, virtual]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint,
E_BUFFER_TYPE Buffer = EBT_VERTEX_AND_INDEX 
) [inline, virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::setIndexBuffer (IIndexBufferindexBuffer) [pure virtual]
+
+
+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IDynamicMeshBuffer::setVertexBuffer (IVertexBuffervertexBuffer) [pure virtual]
+
+
+ +

Implemented in irr::scene::CDynamicMeshBuffer.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.png new file mode 100644 index 0000000..5d56fa0 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_dynamic_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator-members.html new file mode 100644 index 0000000..62382a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator-members.html @@ -0,0 +1,136 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IGeometryCreator Member List
+
+
+This is the complete list of members for irr::scene::IGeometryCreator, including all inherited members. + + + + + + + + + + + + + + + + +
createArrowMesh(const u32 tesselationCylinder=4, const u32 tesselationCone=8, const f32 height=1.f, const f32 cylinderHeight=0.6f, const f32 widthCylinder=0.05f, const f32 widthCone=0.3f, const video::SColor colorCylinder=0xFFFFFFFF, const video::SColor colorCone=0xFFFFFFFF) const =0irr::scene::IGeometryCreator [pure virtual]
createConeMesh(f32 radius, f32 length, u32 tesselation, const video::SColor &colorTop=video::SColor(0xffffffff), const video::SColor &colorBottom=video::SColor(0xffffffff), f32 oblique=0.f) const =0irr::scene::IGeometryCreator [pure virtual]
createCubeMesh(const core::vector3df &size=core::vector3df(5.f, 5.f, 5.f)) const =0irr::scene::IGeometryCreator [pure virtual]
createCylinderMesh(f32 radius, f32 length, u32 tesselation, const video::SColor &color=video::SColor(0xffffffff), bool closeTop=true, f32 oblique=0.f) const =0irr::scene::IGeometryCreator [pure virtual]
createHillPlaneMesh(const core::dimension2d< f32 > &tileSize, const core::dimension2d< u32 > &tileCount, video::SMaterial *material, f32 hillHeight, const core::dimension2d< f32 > &countHills, const core::dimension2d< f32 > &textureRepeatCount) const =0irr::scene::IGeometryCreator [pure virtual]
createPlaneMesh(const core::dimension2d< f32 > &tileSize, const core::dimension2d< u32 > &tileCount=core::dimension2du(1, 1), video::SMaterial *material=0, const core::dimension2df &textureRepeatCount=core::dimension2df(1.f, 1.f)) const irr::scene::IGeometryCreator [inline]
createSphereMesh(f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16) const =0irr::scene::IGeometryCreator [pure virtual]
createTerrainMesh(video::IImage *texture, video::IImage *heightmap, const core::dimension2d< f32 > &stretchSize, f32 maxHeight, video::IVideoDriver *driver, const core::dimension2d< u32 > &defaultVertexBlockSize, bool debugBorders=false) const =0irr::scene::IGeometryCreator [pure virtual]
createVolumeLightMesh(const u32 subdivideU=32, const u32 subdivideV=32, const video::SColor footColor=0xffffffff, const video::SColor tailColor=0xffffffff, const f32 lpDistance=8.f, const core::vector3df &lightDim=core::vector3df(1.f, 1.2f, 1.f)) const =0irr::scene::IGeometryCreator [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.html new file mode 100644 index 0000000..c06765b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.html @@ -0,0 +1,702 @@ + + + + +Irrlicht 3D Engine: irr::scene::IGeometryCreator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IGeometryCreator Class Reference
+
+
+ +

Helper class for creating geometry on the fly. + More...

+ +

#include <IGeometryCreator.h>

+
+ + Inheritance diagram for irr::scene::IGeometryCreator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Helper class for creating geometry on the fly.

+

You can get an instance of this class through ISceneManager::getGeometryCreator()

+ +

Definition at line 25 of file IGeometryCreator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createArrowMesh (const u32 tesselationCylinder = 4,
const u32 tesselationCone = 8,
const f32 height = 1.f,
const f32 cylinderHeight = 0.6f,
const f32 widthCylinder = 0.05f,
const f32 widthCone = 0.3f,
const video::SColor colorCylinder = 0xFFFFFFFF,
const video::SColor colorCone = 0xFFFFFFFF 
) const [pure virtual]
+
+
+ +

Create an arrow mesh, composed of a cylinder and a cone.

+
Parameters:
+ + + + + + + + + +
tesselationCylinderNumber of quads composing the cylinder.
tesselationConeNumber of triangles composing the cone's roof.
heightTotal height of the arrow
cylinderHeightTotal height of the cylinder, should be lesser than total height
widthCylinderDiameter of the cylinder
widthConeDiameter of the cone's base, should be not smaller than the cylinder's diameter
colorCylindercolor of the cylinder
colorConecolor of the cone
+
+
+
Returns:
Generated mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createConeMesh (f32 radius,
f32 length,
u32 tesselation,
const video::SColorcolorTop = video::SColor(0xffffffff),
const video::SColorcolorBottom = video::SColor(0xffffffff),
f32 oblique = 0.f 
) const [pure virtual]
+
+
+ +

Create a cone mesh.

+
Parameters:
+ + + + + + + +
radiusRadius of the cone.
lengthLength of the cone.
tesselationNumber of quads around the circumference of the cone.
colorTopThe color of the top of the cone.
colorBottomThe color of the bottom of the cone.
oblique(to be documented)
+
+
+
Returns:
Generated mesh.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createCubeMesh (const core::vector3dfsize = core::vector3df(5.f, 5.f, 5.f)) const [pure virtual]
+
+
+ +

Creates a simple cube mesh.

+
Parameters:
+ + +
sizeDimensions of the cube.
+
+
+
Returns:
Generated mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createCylinderMesh (f32 radius,
f32 length,
u32 tesselation,
const video::SColorcolor = video::SColor(0xffffffff),
bool closeTop = true,
f32 oblique = 0.f 
) const [pure virtual]
+
+
+ +

Create a cylinder mesh.

+
Parameters:
+ + + + + + + +
radiusRadius of the cylinder.
lengthLength of the cylinder.
tesselationNumber of quads around the circumference of the cylinder.
colorThe color of the cylinder.
closeTopIf true, close the ends of the cylinder, otherwise leave them open.
oblique(to be documented)
+
+
+
Returns:
Generated mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createHillPlaneMesh (const core::dimension2d< f32 > & tileSize,
const core::dimension2d< u32 > & tileCount,
video::SMaterialmaterial,
f32 hillHeight,
const core::dimension2d< f32 > & countHills,
const core::dimension2d< f32 > & textureRepeatCount 
) const [pure virtual]
+
+
+ +

Create a pseudo-random mesh representing a hilly terrain.

+
Parameters:
+ + + + + + + +
tileSizeThe size of each tile.
tileCountThe number of tiles in each dimension.
materialThe material to apply to the mesh.
hillHeightThe maximum height of the hills.
countHillsThe number of hills along each dimension.
textureRepeatCountThe number of times to repeat the material texture along each dimension.
+
+
+
Returns:
Generated mesh.
+ +

Referenced by createPlaneMesh().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IMesh* irr::scene::IGeometryCreator::createPlaneMesh (const core::dimension2d< f32 > & tileSize,
const core::dimension2d< u32 > & tileCount = core::dimension2du(1,1),
video::SMaterialmaterial = 0,
const core::dimension2dftextureRepeatCount = core::dimension2df(1.f,1.f) 
) const [inline]
+
+
+ +

Create a simple rectangular textured plane mesh.

+
Parameters:
+ + + + + +
tileSizeThe size of each tile.
tileCountThe number of tiles in each dimension.
materialThe material to apply to the mesh.
textureRepeatCountThe number of times to repeat the material texture along each dimension.
+
+
+
Returns:
Generated mesh.
+ +

Definition at line 61 of file IGeometryCreator.h.

+ +

References createHillPlaneMesh().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createSphereMesh (f32 radius = 5.f,
u32 polyCountX = 16,
u32 polyCountY = 16 
) const [pure virtual]
+
+
+ +

Create a sphere mesh.

+
Parameters:
+ + + + +
radiusRadius of the sphere
polyCountXNumber of quads used for the horizontal tiling
polyCountYNumber of quads used for the vertical tiling
+
+
+
Returns:
Generated mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createTerrainMesh (video::IImagetexture,
video::IImageheightmap,
const core::dimension2d< f32 > & stretchSize,
f32 maxHeight,
video::IVideoDriverdriver,
const core::dimension2d< u32 > & defaultVertexBlockSize,
bool debugBorders = false 
) const [pure virtual]
+
+
+ +

Create a terrain mesh from an image representing a heightfield.

+
Parameters:
+ + + + + + + + +
textureThe texture to apply to the terrain.
heightmapAn image that will be interpreted as a heightmap. The brightness (average color) of each pixel is interpreted as a height, with a 255 brightness pixel producing the maximum height.
stretchSizeThe size that each pixel will produce, i.e. a 512x512 heightmap and a stretchSize of (10.f, 20.f) will produce a mesh of size 5120.f x 10240.f
maxHeightThe maximum height of the terrain.
driverThe current video driver.
defaultVertexBlockSize(to be documented)
debugBorders(to be documented)
+
+
+
Returns:
Generated mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IGeometryCreator::createVolumeLightMesh (const u32 subdivideU = 32,
const u32 subdivideV = 32,
const video::SColor footColor = 0xffffffff,
const video::SColor tailColor = 0xffffffff,
const f32 lpDistance = 8.f,
const core::vector3dflightDim = core::vector3df(1.f, 1.2f, 1.f) 
) const [pure virtual]
+
+
+ +

Create a volume light mesh.

+
Parameters:
+ + + + + + + +
subdivideUHorizontal patch count.
subdivideVVertical patch count.
footColorColor at the bottom of the light.
tailColorColor at the mid of the light.
lpDistanceVirtual distance of the light point for normals.
lightDimDimensions of the light.
+
+
+
Returns:
Generated mesh.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.png new file mode 100644 index 0000000..e77ca0e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_geometry_creator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer-members.html new file mode 100644 index 0000000..374503b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer-members.html @@ -0,0 +1,144 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IIndexBuffer Member List
+
+
+This is the complete list of members for irr::scene::IIndexBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
allocated_size() const =0irr::scene::IIndexBuffer [pure virtual]
drop() const irr::IReferenceCounted [inline]
getChangedID() const =0irr::scene::IIndexBuffer [pure virtual]
getData()=0irr::scene::IIndexBuffer [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint() const =0irr::scene::IIndexBuffer [pure virtual]
getLast()=0irr::scene::IIndexBuffer [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const =0irr::scene::IIndexBuffer [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
operator[](u32 index) const =0irr::scene::IIndexBuffer [pure virtual]
pointer()=0irr::scene::IIndexBuffer [pure virtual]
push_back(const u32 &element)=0irr::scene::IIndexBuffer [pure virtual]
reallocate(u32 new_size)=0irr::scene::IIndexBuffer [pure virtual]
set_used(u32 usedNow)=0irr::scene::IIndexBuffer [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty()=0irr::scene::IIndexBuffer [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0irr::scene::IIndexBuffer [pure virtual]
setType(video::E_INDEX_TYPE IndexType)=0irr::scene::IIndexBuffer [pure virtual]
setValue(u32 index, u32 value)=0irr::scene::IIndexBuffer [pure virtual]
size() const =0irr::scene::IIndexBuffer [pure virtual]
stride() const =0irr::scene::IIndexBuffer [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.html new file mode 100644 index 0000000..d78caef --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.html @@ -0,0 +1,514 @@ + + + + +Irrlicht 3D Engine: irr::scene::IIndexBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IIndexBuffer Class Reference
+
+
+ +

#include <IIndexBuffer.h>

+
+ + Inheritance diagram for irr::scene::IIndexBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+
+

Definition at line 24 of file IIndexBuffer.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual u32 irr::scene::IIndexBuffer::allocated_size () const [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IIndexBuffer::getChangedID () const [pure virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implemented in irr::scene::CIndexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::getChangedID_Index().

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::IIndexBuffer::getData () [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::IIndexBuffer::getHardwareMappingHint () const [pure virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implemented in irr::scene::CIndexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::getHardwareMappingHint_Index().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IIndexBuffer::getLast () [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::IIndexBuffer::getType () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual u32 irr::scene::IIndexBuffer::operator[] (u32 index) const [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::IIndexBuffer::pointer () [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IIndexBuffer::push_back (const u32element) [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IIndexBuffer::reallocate (u32 new_size) [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IIndexBuffer::set_used (u32 usedNow) [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IIndexBuffer::setDirty () [pure virtual]
+
+
+ +

flags the meshbuffer as changed, reloads hardware buffers

+ +

Implemented in irr::scene::CIndexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::setDirty().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IIndexBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) [pure virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implemented in irr::scene::CIndexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::setHardwareMappingHint().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IIndexBuffer::setType (video::E_INDEX_TYPE IndexType) [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IIndexBuffer::setValue (u32 index,
u32 value 
) [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IIndexBuffer::size () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IIndexBuffer::stride () const [pure virtual]
+
+
+ +

Implemented in irr::scene::CIndexBuffer.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.png new file mode 100644 index 0000000..c52e366 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_index_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager-members.html new file mode 100644 index 0000000..97270cc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ILightManager Member List
+
+
+This is the complete list of members for irr::scene::ILightManager, including all inherited members. + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
OnNodePostRender(ISceneNode *node)=0irr::scene::ILightManager [pure virtual]
OnNodePreRender(ISceneNode *node)=0irr::scene::ILightManager [pure virtual]
OnPostRender(void)=0irr::scene::ILightManager [pure virtual]
OnPreRender(core::array< ISceneNode * > &lightList)=0irr::scene::ILightManager [pure virtual]
OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass)=0irr::scene::ILightManager [pure virtual]
OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass)=0irr::scene::ILightManager [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.html new file mode 100644 index 0000000..fa62290 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.html @@ -0,0 +1,307 @@ + + + + +Irrlicht 3D Engine: irr::scene::ILightManager Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ILightManager Class Reference
+
+
+ +

ILightManager provides an interface for user applications to manipulate the list of lights in the scene. + More...

+ +

#include <ILightManager.h>

+
+ + Inheritance diagram for irr::scene::ILightManager:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

ILightManager provides an interface for user applications to manipulate the list of lights in the scene.

+

The light list can be trimmed or re-ordered before device/ hardware lights are created, and/or individual lights can be switched on and off before or after each scene node is rendered. It is assumed that the ILightManager implementation will store any data that it wishes to retain, i.e. the ISceneManager to which it is assigned, the lightList, the current render pass, and the current scene node.

+ +

Definition at line 25 of file ILightManager.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightManager::OnNodePostRender (ISceneNodenode) [pure virtual]
+
+
+ +

Called after the the node specified in OnNodePreRender() has been rendered.

+
Parameters:
+ + +
[in]node,:the scene node that has just been rendered
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightManager::OnNodePreRender (ISceneNodenode) [pure virtual]
+
+
+ +

Called before the given scene node is rendered.

+
Parameters:
+ + +
[in]node,:the scene node that's about to be rendered
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightManager::OnPostRender (void ) [pure virtual]
+
+
+ +

Called after the last scene node is rendered.

+

After this call returns, the lightList passed to OnPreRender() becomes invalid.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightManager::OnPreRender (core::array< ISceneNode * > & lightList) [pure virtual]
+
+
+ +

Called after the scene's light list has been built, but before rendering has begun.

+

As actual device/hardware lights are not created until the ESNRP_LIGHT render pass, this provides an opportunity for the light manager to trim or re-order the light list, before any device/hardware lights have actually been created.

+
Parameters:
+ + +
lightList,:the Scene Manager's light list, which the light manager may modify. This reference will remain valid until OnPostRender().
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightManager::OnRenderPassPostRender (E_SCENE_NODE_RENDER_PASS renderPass) [pure virtual]
+
+
+ +

Called after the render pass specified in OnRenderPassPreRender() ends.

+
Parameters:
+ + +
[in]renderPass,:the render pass that has finished
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightManager::OnRenderPassPreRender (E_SCENE_NODE_RENDER_PASS renderPass) [pure virtual]
+
+
+ +

Called before a render pass begins.

+
Parameters:
+ + +
renderPass,:the render pass that's about to begin
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.png new file mode 100644 index 0000000..073049e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_manager.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node-members.html new file mode 100644 index 0000000..ade966f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node-members.html @@ -0,0 +1,208 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ILightSceneNode Member List
+
+
+This is the complete list of members for irr::scene::ILightSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
enableCastShadow(bool shadow=true)=0irr::scene::ILightSceneNode [pure virtual]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getCastShadow() const =0irr::scene::ILightSceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getLightData() const =0irr::scene::ILightSceneNode [pure virtual]
getLightData()=0irr::scene::ILightSceneNode [pure virtual]
getLightType() const =0irr::scene::ILightSceneNode [pure virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getRadius() const =0irr::scene::ILightSceneNode [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
ILightSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))irr::scene::ILightSceneNode [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
isDebugObject() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setLightData(const video::SLight &light)=0irr::scene::ILightSceneNode [pure virtual]
setLightType(video::E_LIGHT_TYPE type)=0irr::scene::ILightSceneNode [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRadius(f32 radius)=0irr::scene::ILightSceneNode [pure virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)=0irr::scene::ILightSceneNode [pure virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.html new file mode 100644 index 0000000..893a42d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.html @@ -0,0 +1,437 @@ + + + + +Irrlicht 3D Engine: irr::scene::ILightSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ILightSceneNode Class Reference
+
+
+ +

Scene node which is a dynamic light. + More...

+ +

#include <ILightSceneNode.h>

+
+ + Inheritance diagram for irr::scene::ILightSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Scene node which is a dynamic light.

+

You can switch the light on and off by making it visible or not. It can be animated by ordinary scene node animators. If the light type is directional or spot, the direction of the light source is defined by the rotation of the scene node (assuming (0,0,1) as the local direction of the light).

+ +

Definition at line 22 of file ILightSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::ILightSceneNode::ILightSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0) 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 27 of file ILightSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightSceneNode::enableCastShadow (bool shadow = true) [pure virtual]
+
+
+ +

Sets whether this light casts shadows.

+

Enabling this flag won't automatically cast shadows, the meshes will still need shadow scene nodes attached. But one can enable or disable distinct lights for shadow casting for performance reasons.

+
Parameters:
+ + +
shadowTrue if this light shall cast shadows.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ILightSceneNode::getCastShadow () const [pure virtual]
+
+
+ +

Check whether this light casts shadows.

+
Returns:
True if light would cast shadows, else false.
+ +
+
+ +
+
+ + + + + + + +
virtual const video::SLight& irr::scene::ILightSceneNode::getLightData () const [pure virtual]
+
+
+ +

Gets the light data associated with this ILightSceneNode.

+
Returns:
The light data.
+ +
+
+ +
+
+ + + + + + + +
virtual video::SLight& irr::scene::ILightSceneNode::getLightData () [pure virtual]
+
+
+ +

Gets the light data associated with this ILightSceneNode.

+
Returns:
The light data.
+ +
+
+ +
+
+ + + + + + + +
virtual video::E_LIGHT_TYPE irr::scene::ILightSceneNode::getLightType () const [pure virtual]
+
+
+ +

Gets the light type.

+
Returns:
The current light type.
+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ILightSceneNode::getRadius () const [pure virtual]
+
+
+ +

Gets the light's radius of influence.

+
Returns:
The current radius.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightSceneNode::setLightData (const video::SLightlight) [pure virtual]
+
+
+ +

Sets the light data associated with this ILightSceneNode.

+
Parameters:
+ + +
lightThe new light data.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightSceneNode::setLightType (video::E_LIGHT_TYPE type) [pure virtual]
+
+
+ +

Sets the light type.

+
Parameters:
+ + +
typeThe new type.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightSceneNode::setRadius (f32 radius) [pure virtual]
+
+
+ +

Sets the light's radius of influence.

+

Outside this radius the light won't lighten geometry and cast no shadows. Setting the radius will also influence the attenuation, setting it to (0,1/radius,0). If you want to override this behavior, set the attenuation after the radius.

+
Parameters:
+ + +
radiusThe new radius.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ILightSceneNode::setVisible (bool isVisible) [pure virtual]
+
+
+ +

Sets if the node should be visible or not.

+

All children of this node won't be visible either, when set to true.

+
Parameters:
+ + +
isVisibleIf the node shall be visible.
+
+
+ +

Reimplemented from irr::scene::ISceneNode.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.png new file mode 100644 index 0000000..740137d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_light_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh-members.html new file mode 100644 index 0000000..7ed1b36 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh-members.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMesh Member List
+
+
+This is the complete list of members for irr::scene::IMesh, including all inherited members. + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const =0irr::scene::IMesh [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getMeshBuffer(u32 nr) const =0irr::scene::IMesh [pure virtual]
getMeshBuffer(const video::SMaterial &material) const =0irr::scene::IMesh [pure virtual]
getMeshBufferCount() const =0irr::scene::IMesh [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMesh [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0irr::scene::IMesh [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.html new file mode 100644 index 0000000..7435b1d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.html @@ -0,0 +1,394 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMesh Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMesh Class Reference
+
+
+ +

Class which holds the geometry of an object. + More...

+ +

#include <IMesh.h>

+
+ + Inheritance diagram for irr::scene::IMesh:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Class which holds the geometry of an object.

+

An IMesh is nothing more than a collection of some mesh buffers (IMeshBuffer). SMesh is a simple implementation of an IMesh. A mesh is usually added to an IMeshSceneNode in order to be rendered.

+ +

Definition at line 23 of file IMesh.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::IMesh::getBoundingBox () const [pure virtual]
+
+
+ +

Get an axis aligned bounding box of the mesh.

+
Returns:
Bounding box of this mesh.
+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshBuffer* irr::scene::IMesh::getMeshBuffer (u32 nr) const [pure virtual]
+
+
+ +

Get pointer to a mesh buffer.

+
Parameters:
+ + +
nr,:Zero based index of the mesh buffer. The maximum value is getMeshBufferCount() - 1;
+
+
+
Returns:
Pointer to the mesh buffer or 0 if there is no such mesh buffer.
+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +

Referenced by irr::scene::IMeshManipulator::apply().

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshBuffer* irr::scene::IMesh::getMeshBuffer (const video::SMaterialmaterial) const [pure virtual]
+
+
+ +

Get pointer to a mesh buffer which fits a material.

+
Parameters:
+ + +
material,:material to search for
+
+
+
Returns:
Pointer to the mesh buffer or 0 if there is no such mesh buffer.
+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IMesh::getMeshBufferCount () const [pure virtual]
+
+
+ +

Get the amount of mesh buffers.

+
Returns:
Amount of mesh buffers (IMeshBuffer) in this mesh.
+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +

Referenced by irr::scene::IMeshManipulator::apply().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMesh::setBoundingBox (const core::aabbox3dfbox) [pure virtual]
+
+
+ +

Set user-defined axis aligned bounding box.

+
Parameters:
+ + +
boxNew bounding box to use for the mesh.
+
+
+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +

Referenced by irr::scene::IMeshManipulator::apply().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMesh::setDirty (E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX) [pure virtual]
+
+
+ +

Flag the meshbuffer as changed, reloads hardware buffers.

+

This method has to be called every time the vertices or indices have changed. Otherwise, changes won't be updated on the GPU in the next render cycle.

+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMesh::setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint,
E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX 
) [pure virtual]
+
+
+ +

Set the hardware mapping hint.

+

This methods allows to define optimization hints for the hardware. This enables, e.g., the use of hardware buffers on pltforms that support this feature. This can lead to noticeable performance gains.

+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMesh::setMaterialFlag (video::E_MATERIAL_FLAG flag,
bool newvalue 
) [pure virtual]
+
+
+ +

Sets a flag of all contained materials to a new value.

+
Parameters:
+ + + +
flag,:Flag to set in all materials.
newvalue,:New value to set in all materials.
+
+
+ +

Implemented in irr::scene::SAnimatedMesh, and irr::scene::SMesh.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.png new file mode 100644 index 0000000..52d6a55 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer-members.html new file mode 100644 index 0000000..020cd2b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer-members.html @@ -0,0 +1,154 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMeshBuffer Member List
+
+
+This is the complete list of members for irr::scene::IMeshBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)=0irr::scene::IMeshBuffer [pure virtual]
append(const IMeshBuffer *const other)=0irr::scene::IMeshBuffer [pure virtual]
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const =0irr::scene::IMeshBuffer [pure virtual]
getChangedID_Index() const =0irr::scene::IMeshBuffer [pure virtual]
getChangedID_Vertex() const =0irr::scene::IMeshBuffer [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint_Index() const =0irr::scene::IMeshBuffer [pure virtual]
getHardwareMappingHint_Vertex() const =0irr::scene::IMeshBuffer [pure virtual]
getIndexCount() const =0irr::scene::IMeshBuffer [pure virtual]
getIndexType() const =0irr::scene::IMeshBuffer [pure virtual]
getIndices() const =0irr::scene::IMeshBuffer [pure virtual]
getIndices()=0irr::scene::IMeshBuffer [pure virtual]
getMaterial()=0irr::scene::IMeshBuffer [pure virtual]
getMaterial() const =0irr::scene::IMeshBuffer [pure virtual]
getNormal(u32 i) const =0irr::scene::IMeshBuffer [pure virtual]
getNormal(u32 i)=0irr::scene::IMeshBuffer [pure virtual]
getPosition(u32 i) const =0irr::scene::IMeshBuffer [pure virtual]
getPosition(u32 i)=0irr::scene::IMeshBuffer [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTCoords(u32 i) const =0irr::scene::IMeshBuffer [pure virtual]
getTCoords(u32 i)=0irr::scene::IMeshBuffer [pure virtual]
getVertexCount() const =0irr::scene::IMeshBuffer [pure virtual]
getVertexType() const =0irr::scene::IMeshBuffer [pure virtual]
getVertices() const =0irr::scene::IMeshBuffer [pure virtual]
getVertices()=0irr::scene::IMeshBuffer [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
recalculateBoundingBox()=0irr::scene::IMeshBuffer [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMeshBuffer [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMeshBuffer [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMeshBuffer [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.html new file mode 100644 index 0000000..4b5a3fa --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.html @@ -0,0 +1,821 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMeshBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMeshBuffer Class Reference
+
+
+ +

Struct for holding a mesh with a single material. + More...

+ +

#include <IMeshBuffer.h>

+
+ + Inheritance diagram for irr::scene::IMeshBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Struct for holding a mesh with a single material.

+

A part of an IMesh which has the same material on each face of that group. Logical groups of an IMesh need not be put into separate mesh buffers, but can be. Separately animated parts of the mesh must be put into separate mesh buffers. Some mesh buffer implementations have limitations on the number of vertices the buffer can hold. In that case, logical grouping can help. Moreover, the number of vertices should be optimized for the GPU upload, which often depends on the type of gfx card. Typial figures are 1000-10000 vertices per buffer. SMeshBuffer is a simple implementation of a MeshBuffer, which supports up to 65535 vertices.

+

Since meshbuffers are used for drawing, and hence will be exposed to the driver, chances are high that they are grab()'ed from somewhere. It's therefore required to dynamically allocate meshbuffers which are passed to a video driver and only drop the buffer once it's not used in the current code block anymore.

+ +

Definition at line 39 of file IMeshBuffer.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshBuffer::append (const void *const vertices,
u32 numVertices,
const u16 *const indices,
u32 numIndices 
) [pure virtual]
+
+
+ +

Append the vertices and indices to the current buffer.

+

Only works for compatible vertex types.

+
Parameters:
+ + + + + +
verticesPointer to a vertex array.
numVerticesNumber of vertices in the array.
indicesPointer to index array.
numIndicesNumber of indices in array.
+
+
+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshBuffer::append (const IMeshBuffer *const other) [pure virtual]
+
+
+ +

Append the meshbuffer to the current buffer.

+

Only works for compatible vertex types

+
Parameters:
+ + +
otherBuffer to append to this one.
+
+
+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3df& irr::scene::IMeshBuffer::getBoundingBox () const [pure virtual]
+
+
+ +

Get the axis aligned bounding box of this meshbuffer.

+
Returns:
Axis aligned bounding box of this buffer.
+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, irr::scene::CDynamicMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +

Referenced by irr::scene::IMeshManipulator::apply().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IMeshBuffer::getChangedID_Index () const [pure virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IMeshBuffer::getChangedID_Vertex () const [pure virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::IMeshBuffer::getHardwareMappingHint_Index () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::IMeshBuffer::getHardwareMappingHint_Vertex () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IMeshBuffer::getIndexCount () const [pure virtual]
+
+
+ +

Get amount of indices in this meshbuffer.

+
Returns:
Number of indices in this buffer.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::IMeshBuffer::getIndexType () const [pure virtual]
+
+
+ +

Get type of index data which is stored in this meshbuffer.

+
Returns:
Index type of this buffer.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::SSharedMeshBuffer, and irr::scene::CMeshBuffer< T >.

+ +
+
+ +
+
+ + + + + + + +
virtual const u16* irr::scene::IMeshBuffer::getIndices () const [pure virtual]
+
+
+ +

Get access to Indices.

+
Returns:
Pointer to indices array.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u16* irr::scene::IMeshBuffer::getIndices () [pure virtual]
+
+
+ +

Get access to Indices.

+
Returns:
Pointer to indices array.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SMaterial& irr::scene::IMeshBuffer::getMaterial () [pure virtual]
+
+
+ +

Get the material of this meshbuffer.

+
Returns:
Material of this buffer.
+ +

Implemented in irr::scene::CDynamicMeshBuffer, irr::scene::SSharedMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSkinMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SMaterial& irr::scene::IMeshBuffer::getMaterial () const [pure virtual]
+
+
+ +

Get the material of this meshbuffer.

+
Returns:
Material of this buffer.
+ +

Implemented in irr::scene::CDynamicMeshBuffer, irr::scene::SSharedMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::IDynamicMeshBuffer, and irr::scene::CMeshBuffer< T >.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::IMeshBuffer::getNormal (u32 i) const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::IMeshBuffer::getNormal (u32 i) [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::IMeshBuffer::getPosition (u32 i) const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::IMeshBuffer::getPosition (u32 i) [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual const core::vector2df& irr::scene::IMeshBuffer::getTCoords (u32 i) const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual core::vector2df& irr::scene::IMeshBuffer::getTCoords (u32 i) [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IMeshBuffer::getVertexCount () const [pure virtual]
+
+
+ +

Get amount of vertices in meshbuffer.

+
Returns:
Number of vertices in this buffer.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::SSharedMeshBuffer, and irr::scene::CMeshBuffer< T >.

+ +

Referenced by irr::scene::IMeshManipulator::apply_().

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::IMeshBuffer::getVertexType () const [pure virtual]
+
+
+ +

Get type of vertex data which is stored in this meshbuffer.

+
Returns:
Vertex type of this buffer.
+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::IDynamicMeshBuffer, and irr::scene::SSharedMeshBuffer.

+ +

Referenced by irr::scene::IMeshManipulator::apply_().

+ +
+
+ +
+
+ + + + + + + +
virtual const void* irr::scene::IMeshBuffer::getVertices () const [pure virtual]
+
+
+ +

Get access to vertex data. The data is an array of vertices.

+

Which vertex type is used can be determined by getVertexType().

+
Returns:
Pointer to array of vertices.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, and irr::scene::SSharedMeshBuffer.

+ +

Referenced by irr::scene::IMeshManipulator::apply_().

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::IMeshBuffer::getVertices () [pure virtual]
+
+
+ +

Get access to vertex data. The data is an array of vertices.

+

Which vertex type is used can be determined by getVertexType().

+
Returns:
Pointer to array of vertices.
+ +

Implemented in irr::scene::IDynamicMeshBuffer, irr::scene::SSkinMeshBuffer, irr::scene::SSharedMeshBuffer, and irr::scene::CMeshBuffer< T >.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IMeshBuffer::recalculateBoundingBox () [pure virtual]
+
+
+ +

Recalculates the bounding box. Should be called if the mesh changed.

+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, irr::scene::CDynamicMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshBuffer::setBoundingBox (const core::aabbox3dfbox) [pure virtual]
+
+
+ +

Set axis aligned bounding box.

+
Parameters:
+ + +
boxUser defined axis aligned bounding box to use for this buffer.
+
+
+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, irr::scene::CDynamicMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +

Referenced by irr::scene::IMeshManipulator::apply_().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshBuffer::setDirty (E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX) [pure virtual]
+
+
+ +

flags the meshbuffer as changed, reloads hardware buffers

+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint,
E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX 
) [pure virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implemented in irr::scene::SSkinMeshBuffer, irr::scene::CMeshBuffer< T >, irr::scene::SSharedMeshBuffer, and irr::scene::IDynamicMeshBuffer.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.png new file mode 100644 index 0000000..cc61234 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache-members.html new file mode 100644 index 0000000..bdda3f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache-members.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMeshCache Member List
+
+
+This is the complete list of members for irr::scene::IMeshCache, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + +
addMesh(const io::path &name, IAnimatedMesh *mesh)=0irr::scene::IMeshCache [pure virtual]
clear()=0irr::scene::IMeshCache [pure virtual]
clearUnusedMeshes()=0irr::scene::IMeshCache [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getMeshByFilename(const io::path &filename)irr::scene::IMeshCache [inline]
getMeshByIndex(u32 index)=0irr::scene::IMeshCache [pure virtual]
getMeshByName(const io::path &name)=0irr::scene::IMeshCache [pure virtual]
getMeshCount() const =0irr::scene::IMeshCache [pure virtual]
getMeshFilename(u32 index) const irr::scene::IMeshCache [inline]
getMeshFilename(const IMesh *const mesh) const irr::scene::IMeshCache [inline]
getMeshIndex(const IMesh *const mesh) const =0irr::scene::IMeshCache [pure virtual]
getMeshName(u32 index) const =0irr::scene::IMeshCache [pure virtual]
getMeshName(const IMesh *const mesh) const =0irr::scene::IMeshCache [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isMeshLoaded(const io::path &name)=0irr::scene::IMeshCache [pure virtual]
removeMesh(const IMesh *const mesh)=0irr::scene::IMeshCache [pure virtual]
renameMesh(u32 index, const io::path &name)=0irr::scene::IMeshCache [pure virtual]
renameMesh(const IMesh *const mesh, const io::path &name)=0irr::scene::IMeshCache [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setMeshFilename(u32 index, const io::path &filename)irr::scene::IMeshCache [inline]
setMeshFilename(const IMesh *const mesh, const io::path &filename)irr::scene::IMeshCache [inline]
~IMeshCache()irr::scene::IMeshCache [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.html new file mode 100644 index 0000000..5305a8f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.html @@ -0,0 +1,694 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMeshCache Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMeshCache Class Reference
+
+
+ +

The mesh cache stores already loaded meshes and provides an interface to them. + More...

+ +

#include <IMeshCache.h>

+
+ + Inheritance diagram for irr::scene::IMeshCache:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

The mesh cache stores already loaded meshes and provides an interface to them.

+

You can access it using ISceneManager::getMeshCache(). All existing scene managers will return a pointer to the same mesh cache, because it is shared between them. With this interface, it is possible to manually add new loaded meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate through already loaded meshes.

+ +

Definition at line 27 of file IMeshCache.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::IMeshCache::~IMeshCache () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 32 of file IMeshCache.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshCache::addMesh (const io::pathname,
IAnimatedMeshmesh 
) [pure virtual]
+
+
+ +

Adds a mesh to the internal list of loaded meshes.

+

Usually, ISceneManager::getMesh() is called to load a mesh from a file. That method searches the list of loaded meshes if a mesh has already been loaded and returns a pointer to if it is in that list and already in memory. Otherwise it loads the mesh. With IMeshCache::addMesh(), it is possible to pretend that a mesh already has been loaded. This method can be used for example by mesh loaders who need to load more than one mesh with one call. They can add additional meshes with this method to the scene manager. The COLLADA loader for example uses this method.

+
Parameters:
+ + + +
nameName of the mesh. When calling ISceneManager::getMesh() with this name it will return the mesh set by this method.
meshPointer to a mesh which will now be referenced by this name.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IMeshCache::clear () [pure virtual]
+
+
+ +

Clears the whole mesh cache, removing all meshes.

+

All meshes will be reloaded completely when using ISceneManager::getMesh() after calling this method. Warning: If you have pointers to meshes that were loaded with ISceneManager::getMesh() and you did not grab them, then they may become invalid.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IMeshCache::clearUnusedMeshes () [pure virtual]
+
+
+ +

Clears all meshes that are held in the mesh cache but not used anywhere else.

+

Warning: If you have pointers to meshes that were loaded with ISceneManager::getMesh() and you did not grab them, then they may become invalid.

+ +
+
+ +
+
+ + + + + + + + +
_IRR_DEPRECATED_ IAnimatedMesh* irr::scene::IMeshCache::getMeshByFilename (const io::pathfilename) [inline]
+
+
+ +

Returns a mesh based on its name (often a filename).

+
Deprecated:
Use getMeshByName() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 84 of file IMeshCache.h.

+ +

References getMeshByName().

+ +
+
+ +
+
+ + + + + + + + +
virtual IAnimatedMesh* irr::scene::IMeshCache::getMeshByIndex (u32 index) [pure virtual]
+
+
+ +

Returns a mesh based on its index number.

+
Parameters:
+ + +
index,:Index of the mesh, number between 0 and getMeshCount()-1. Note that this number is only valid until a new mesh is loaded or removed.
+
+
+
Returns:
Pointer to the mesh or 0 if there is none with this number.
+ +
+
+ +
+
+ + + + + + + + +
virtual IAnimatedMesh* irr::scene::IMeshCache::getMeshByName (const io::pathname) [pure virtual]
+
+
+ +

Returns a mesh based on its name.

+
Parameters:
+ + +
nameName of the mesh. Usually a filename.
+
+
+
Returns:
Pointer to the mesh or 0 if there is none with this number.
+ +

Referenced by getMeshByFilename().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IMeshCache::getMeshCount () const [pure virtual]
+
+
+ +

Returns amount of loaded meshes in the cache.

+

You can load new meshes into the cache using getMesh() and addMesh(). If you ever need to access the internal mesh cache, you can do this using removeMesh(), getMeshNumber(), getMeshByIndex() and getMeshName().

+
Returns:
Number of meshes in cache.
+ +
+
+ +
+
+ + + + + + + + +
_IRR_DEPRECATED_ const io::path& irr::scene::IMeshCache::getMeshFilename (u32 index) const [inline]
+
+
+ +

Get the name of a loaded mesh, based on its index. (Name is often identical to the filename).

+
Deprecated:
Use getMeshName() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 92 of file IMeshCache.h.

+ +

References irr::io::SNamedPath::getInternalName(), and getMeshName().

+ +
+
+ +
+
+ + + + + + + + +
_IRR_DEPRECATED_ const io::path& irr::scene::IMeshCache::getMeshFilename (const IMesh *const mesh) const [inline]
+
+
+ +

Get the name of a loaded mesh, if there is any. (Name is often identical to the filename).

+
Deprecated:
Use getMeshName() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 100 of file IMeshCache.h.

+ +

References irr::io::SNamedPath::getInternalName(), and getMeshName().

+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::scene::IMeshCache::getMeshIndex (const IMesh *const mesh) const [pure virtual]
+
+
+ +

Returns current index number of the mesh or -1 when not found.

+
Parameters:
+ + +
meshPointer to the mesh to search for.
+
+
+
Returns:
Index of the mesh in the cache, or -1 if not found.
+ +
+
+ +
+
+ + + + + + + + +
virtual const io::SNamedPath& irr::scene::IMeshCache::getMeshName (u32 index) const [pure virtual]
+
+
+ +

Get the name of a loaded mesh, based on its index.

+
Parameters:
+ + +
index,:Index of the mesh, number between 0 and getMeshCount()-1.
+
+
+
Returns:
The name if mesh was found and has a name, else the path is empty.
+ +

Referenced by getMeshFilename().

+ +
+
+ +
+
+ + + + + + + + +
virtual const io::SNamedPath& irr::scene::IMeshCache::getMeshName (const IMesh *const mesh) const [pure virtual]
+
+
+ +

Get the name of the loaded mesh if there is any.

+
Parameters:
+ + +
meshPointer to mesh to query.
+
+
+
Returns:
The name if mesh was found and has a name, else the path is empty.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IMeshCache::isMeshLoaded (const io::pathname) [pure virtual]
+
+
+ +

Check if a mesh was already loaded.

+
Parameters:
+ + +
nameName of the mesh. Usually a filename.
+
+
+
Returns:
True if the mesh has been loaded, else false.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshCache::removeMesh (const IMesh *const mesh) [pure virtual]
+
+
+ +

Removes the mesh from the cache.

+

After loading a mesh with getMesh(), the mesh can be removed from the cache using this method, freeing a lot of memory.

+
Parameters:
+ + +
meshPointer to the mesh which shall be removed.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::IMeshCache::renameMesh (u32 index,
const io::pathname 
) [pure virtual]
+
+
+ +

Renames a loaded mesh.

+

Note that renaming meshes might change the ordering of the meshes, and so the index of the meshes as returned by getMeshIndex() or taken by some methods will change.

+
Parameters:
+ + + +
indexThe index of the mesh in the cache.
nameNew name for the mesh.
+
+
+
Returns:
True if mesh was renamed.
+ +

Referenced by setMeshFilename().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::IMeshCache::renameMesh (const IMesh *const mesh,
const io::pathname 
) [pure virtual]
+
+
+ +

Renames the loaded mesh.

+

Note that renaming meshes might change the ordering of the meshes, and so the index of the meshes as returned by getMeshIndex() or taken by some methods will change.

+
Parameters:
+ + + +
meshMesh to be renamed.
nameNew name for the mesh.
+
+
+
Returns:
True if mesh was renamed.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
_IRR_DEPRECATED_ bool irr::scene::IMeshCache::setMeshFilename (u32 index,
const io::pathfilename 
) [inline]
+
+
+ +

Renames a loaded mesh.

+
Deprecated:
Use renameMesh() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 108 of file IMeshCache.h.

+ +

References renameMesh().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
_IRR_DEPRECATED_ bool irr::scene::IMeshCache::setMeshFilename (const IMesh *const mesh,
const io::pathfilename 
) [inline]
+
+
+ +

Renames a loaded mesh.

+
Deprecated:
Use renameMesh() instead. This method may be removed by Irrlicht 1.9
+ +

Definition at line 116 of file IMeshCache.h.

+ +

References renameMesh().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.png new file mode 100644 index 0000000..51d3da5 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_cache.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader-members.html new file mode 100644 index 0000000..a09b1c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMeshLoader Member List
+
+
+This is the complete list of members for irr::scene::IMeshLoader, including all inherited members. + + + + + + + + + + +
createMesh(io::IReadFile *file)=0irr::scene::IMeshLoader [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isALoadableFileExtension(const io::path &filename) const =0irr::scene::IMeshLoader [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IMeshLoader()irr::scene::IMeshLoader [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.html new file mode 100644 index 0000000..45c6f93 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.html @@ -0,0 +1,232 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMeshLoader Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMeshLoader Class Reference
+
+
+ +

Class which is able to load an animated mesh from a file. + More...

+ +

#include <IMeshLoader.h>

+
+ + Inheritance diagram for irr::scene::IMeshLoader:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Class which is able to load an animated mesh from a file.

+

If you want Irrlicht be able to load meshes of currently unsupported file formats (e.g. .cob), then implement this and add your new Meshloader with ISceneManager::addExternalMeshLoader() to the engine.

+ +

Definition at line 26 of file IMeshLoader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::IMeshLoader::~IMeshLoader () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 31 of file IMeshLoader.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual IAnimatedMesh* irr::scene::IMeshLoader::createMesh (io::IReadFilefile) [pure virtual]
+
+
+ +

Creates/loads an animated mesh from the file.

+
Parameters:
+ + +
fileFile handler to load the file from.
+
+
+
Returns:
Pointer to the created mesh. Returns 0 if loading failed. If you no longer need the mesh, you should call IAnimatedMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IMeshLoader::isALoadableFileExtension (const io::pathfilename) const [pure virtual]
+
+
+ +

Returns true if the file might be loaded by this class.

+

This decision should be based on the file extension (e.g. ".cob") only.

+
Parameters:
+ + +
filenameName of the file to test.
+
+
+
Returns:
True if the file might be loaded by this class.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.png new file mode 100644 index 0000000..c67459f Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_loader.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator-members.html new file mode 100644 index 0000000..910d7ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator-members.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMeshManipulator Member List
+
+
+This is the complete list of members for irr::scene::IMeshManipulator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
apply(const Functor &func, IMeshBuffer *buffer, bool boundingBoxUpdate=false) const irr::scene::IMeshManipulator [inline]
apply(const Functor &func, IMesh *mesh, bool boundingBoxUpdate=false) const irr::scene::IMeshManipulator [inline]
apply_(const Functor &func, IMeshBuffer *buffer, bool boundingBoxUpdate, const IVertexManipulator &typeTest) const irr::scene::IMeshManipulator [inline, protected]
createAnimatedMesh(IMesh *mesh, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) const =0irr::scene::IMeshManipulator [pure virtual]
createForsythOptimizedMesh(const IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
createMeshCopy(IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
createMeshUniquePrimitives(IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
createMeshWelded(IMesh *mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const =0irr::scene::IMeshManipulator [pure virtual]
createMeshWith1TCoords(IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
createMeshWith2TCoords(IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
createMeshWithTangents(IMesh *mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false, bool recalculateTangents=true) const =0irr::scene::IMeshManipulator [pure virtual]
drop() const irr::IReferenceCounted [inline]
flipSurfaces(IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getPolyCount(IMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
getPolyCount(IAnimatedMesh *mesh) const =0irr::scene::IMeshManipulator [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
makePlanarTextureMapping(IMesh *mesh, f32 resolution=0.001f) const =0irr::scene::IMeshManipulator [pure virtual]
makePlanarTextureMapping(scene::IMeshBuffer *meshbuffer, f32 resolution=0.001f) const =0irr::scene::IMeshManipulator [pure virtual]
makePlanarTextureMapping(scene::IMesh *mesh, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df &offset) const =0irr::scene::IMeshManipulator [pure virtual]
makePlanarTextureMapping(scene::IMeshBuffer *buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df &offset) const =0irr::scene::IMeshManipulator [pure virtual]
recalculateNormals(IMesh *mesh, bool smooth=false, bool angleWeighted=false) const =0irr::scene::IMeshManipulator [pure virtual]
recalculateNormals(IMeshBuffer *buffer, bool smooth=false, bool angleWeighted=false) const =0irr::scene::IMeshManipulator [pure virtual]
recalculateTangents(IMesh *mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const =0irr::scene::IMeshManipulator [pure virtual]
recalculateTangents(IMeshBuffer *buffer, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const =0irr::scene::IMeshManipulator [pure virtual]
scale(IMesh *mesh, const core::vector3df &factor) const irr::scene::IMeshManipulator [inline]
scale(IMeshBuffer *buffer, const core::vector3df &factor) const irr::scene::IMeshManipulator [inline]
scaleMesh(IMesh *mesh, const core::vector3df &factor) const irr::scene::IMeshManipulator [inline]
scaleTCoords(scene::IMesh *mesh, const core::vector2df &factor, u32 level=1) const irr::scene::IMeshManipulator [inline]
scaleTCoords(scene::IMeshBuffer *buffer, const core::vector2df &factor, u32 level=1) const irr::scene::IMeshManipulator [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setVertexColorAlpha(IMesh *mesh, s32 alpha) const irr::scene::IMeshManipulator [inline]
setVertexColorAlpha(IMeshBuffer *buffer, s32 alpha) const irr::scene::IMeshManipulator [inline]
setVertexColors(IMesh *mesh, video::SColor color) const irr::scene::IMeshManipulator [inline]
setVertexColors(IMeshBuffer *buffer, video::SColor color) const irr::scene::IMeshManipulator [inline]
transform(IMesh *mesh, const core::matrix4 &m) const irr::scene::IMeshManipulator [inline]
transform(IMeshBuffer *buffer, const core::matrix4 &m) const irr::scene::IMeshManipulator [inline]
transformMesh(IMesh *mesh, const core::matrix4 &m) const irr::scene::IMeshManipulator [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.html new file mode 100644 index 0000000..7747984 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.html @@ -0,0 +1,1573 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMeshManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMeshManipulator Class Reference
+
+
+ +

An interface for easy manipulation of meshes. + More...

+ +

#include <IMeshManipulator.h>

+
+ + Inheritance diagram for irr::scene::IMeshManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+
    +
  • template<typename Functor > bool apply_ (const Functor &func, IMeshBuffer *buffer, bool boundingBoxUpdate, const IVertexManipulator &typeTest) const +
    Apply a manipulator based on the type of the functor.
+

Detailed Description

+

An interface for easy manipulation of meshes.

+

Scale, set alpha value, flip surfaces, and so on. This exists for fixing problems with wrong imported or exported meshes quickly after loading. It is not intended for doing mesh modifications and/or animations during runtime.

+ +

Definition at line 29 of file IMeshManipulator.h.

+

Member Function Documentation

+ +
+
+
+template<typename Functor >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::scene::IMeshManipulator::apply (const Functor & func,
IMeshBufferbuffer,
bool boundingBoxUpdate = false 
) const [inline]
+
+
+ +

Apply a manipulator on the Meshbuffer.

+
Parameters:
+ + + + +
funcA functor defining the mesh manipulation.
bufferThe Meshbuffer to apply the manipulator to.
boundingBoxUpdateSpecifies if the bounding box should be updated during manipulation.
+
+
+
Returns:
True if the functor was successfully applied, else false.
+ +

Definition at line 304 of file IMeshManipulator.h.

+ +

References apply_().

+ +

Referenced by apply(), scale(), scaleTCoords(), setVertexColorAlpha(), setVertexColors(), and transform().

+ +
+
+ +
+
+
+template<typename Functor >
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::scene::IMeshManipulator::apply (const Functor & func,
IMeshmesh,
bool boundingBoxUpdate = false 
) const [inline]
+
+
+ +

Apply a manipulator on the Mesh.

+
Parameters:
+ + + + +
funcA functor defining the mesh manipulation.
meshThe Mesh to apply the manipulator to.
boundingBoxUpdateSpecifies if the bounding box should be updated during manipulation.
+
+
+
Returns:
True if the functor was successfully applied, else false.
+ +

Definition at line 316 of file IMeshManipulator.h.

+ +

References irr::core::aabbox3d< T >::addInternalBox(), apply(), irr::scene::IMeshBuffer::getBoundingBox(), irr::scene::IMesh::getMeshBuffer(), irr::scene::IMesh::getMeshBufferCount(), irr::core::aabbox3d< T >::reset(), and irr::scene::IMesh::setBoundingBox().

+ +
+
+ +
+
+
+template<typename Functor >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::scene::IMeshManipulator::apply_ (const Functor & func,
IMeshBufferbuffer,
bool boundingBoxUpdate,
const IVertexManipulatortypeTest 
) const [inline, protected]
+
+
+ +

Apply a manipulator based on the type of the functor.

+
Parameters:
+ + + + + +
funcA functor defining the mesh manipulation.
bufferThe Meshbuffer to apply the manipulator to.
boundingBoxUpdateSpecifies if the bounding box should be updated during manipulation.
typeTestUnused parameter, which handles the proper call selection based on the type of the Functor which is passed in two times.
+
+
+
Returns:
True if the functor was successfully applied, else false.
+ +

Definition at line 346 of file IMeshManipulator.h.

+ +

References irr::core::aabbox3d< T >::addInternalPoint(), irr::video::EVT_2TCOORDS, irr::video::EVT_STANDARD, irr::video::EVT_TANGENTS, irr::scene::IMeshBuffer::getPosition(), irr::scene::IMeshBuffer::getVertexCount(), irr::scene::IMeshBuffer::getVertexType(), irr::scene::IMeshBuffer::getVertices(), irr::core::aabbox3d< T >::reset(), and irr::scene::IMeshBuffer::setBoundingBox().

+ +

Referenced by apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IAnimatedMesh* irr::scene::IMeshManipulator::createAnimatedMesh (IMeshmesh,
scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN 
) const [pure virtual]
+
+
+ +

Create a new AnimatedMesh and adds the mesh to it.

+
Parameters:
+ + + +
meshInput mesh
typeThe type of the animated mesh to create.
+
+
+
Returns:
Newly created animated mesh with mesh as its only content. When you don't need the animated mesh anymore, you should call IAnimatedMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IMeshManipulator::createForsythOptimizedMesh (const IMeshmesh) const [pure virtual]
+
+
+ +

Vertex cache optimization according to the Forsyth paper.

+

More information can be found at http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html

+

The function is thread-safe (read: you can optimize several meshes in different threads).

+
Parameters:
+ + +
meshSource mesh for the operation.
+
+
+
Returns:
A new mesh optimized for the vertex cache.
+ +
+
+ +
+
+ + + + + + + + +
virtual SMesh* irr::scene::IMeshManipulator::createMeshCopy (IMeshmesh) const [pure virtual]
+
+
+ +

Clones a static IMesh into a modifiable SMesh.

+

All meshbuffers in the returned SMesh are of type SMeshBuffer or SMeshBufferLightMap.

+
Parameters:
+ + +
meshMesh to copy.
+
+
+
Returns:
Cloned mesh. If you no longer need the cloned mesh, you should call SMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IMeshManipulator::createMeshUniquePrimitives (IMeshmesh) const [pure virtual]
+
+
+ +

Creates a copy of a mesh with all vertices unwelded.

+
Parameters:
+ + +
meshInput mesh
+
+
+
Returns:
Mesh consisting only of unique faces. All vertices which were previously shared are now duplicated. If you no longer need the cloned mesh, you should call IMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IMeshManipulator::createMeshWelded (IMeshmesh,
f32 tolerance = core::ROUNDING_ERROR_f32 
) const [pure virtual]
+
+
+ +

Creates a copy of a mesh with vertices welded.

+
Parameters:
+ + + +
meshInput mesh
toleranceThe threshold for vertex comparisons.
+
+
+
Returns:
Mesh without redundant vertices. If you no longer need the cloned mesh, you should call IMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IMeshManipulator::createMeshWith1TCoords (IMeshmesh) const [pure virtual]
+
+
+ +

Creates a copy of the mesh, which will only consist of S3DVertex vertices.

+
Parameters:
+ + +
meshInput mesh
+
+
+
Returns:
Mesh consisting only of S3DVertex vertices. If you no longer need the cloned mesh, you should call IMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IMeshManipulator::createMeshWith2TCoords (IMeshmesh) const [pure virtual]
+
+
+ +

Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices.

+
Parameters:
+ + +
meshInput mesh
+
+
+
Returns:
Mesh consisting only of S3DVertex2TCoord vertices. If you no longer need the cloned mesh, you should call IMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::IMeshManipulator::createMeshWithTangents (IMeshmesh,
bool recalculateNormals = false,
bool smooth = false,
bool angleWeighted = false,
bool recalculateTangents = true 
) const [pure virtual]
+
+
+ +

Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices.

+

This is useful if you want to draw tangent space normal mapped geometry because it calculates the tangent and binormal data which is needed there.

+
Parameters:
+ + + + + + +
meshInput mesh
recalculateNormalsThe normals are recalculated if set, otherwise the original ones are kept. Note that keeping the normals may introduce inaccurate tangents if the normals are very different to those calculated from the faces.
smoothThe normals/tangents are smoothed across the meshbuffer's faces if this flag is set.
angleWeightedImproved smoothing calculation used
recalculateTangentsWhether are actually calculated, or just the mesh with proper type is created.
+
+
+
Returns:
Mesh consisting only of S3DVertexTangents vertices. If you no longer need the cloned mesh, you should call IMesh::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshManipulator::flipSurfaces (IMeshmesh) const [pure virtual]
+
+
+ +

Flips the direction of surfaces.

+

Changes backfacing triangles to frontfacing triangles and vice versa.

+
Parameters:
+ + +
meshMesh on which the operation is performed.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::scene::IMeshManipulator::getPolyCount (IMeshmesh) const [pure virtual]
+
+
+ +

Get amount of polygons in mesh.

+
Parameters:
+ + +
meshInput mesh
+
+
+
Returns:
Number of polygons in mesh.
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::scene::IMeshManipulator::getPolyCount (IAnimatedMeshmesh) const [pure virtual]
+
+
+ +

Get amount of polygons in mesh.

+
Parameters:
+ + +
meshInput mesh
+
+
+
Returns:
Number of polygons in mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping (IMeshmesh,
f32 resolution = 0.001f 
) const [pure virtual]
+
+
+ +

Creates a planar texture mapping on the mesh.

+
Parameters:
+ + + +
mesh,:Mesh on which the operation is performed.
resolution,:resolution of the planar mapping. This is the value specifying which is the relation between world space and texture coordinate space.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping (scene::IMeshBuffermeshbuffer,
f32 resolution = 0.001f 
) const [pure virtual]
+
+
+ +

Creates a planar texture mapping on the meshbuffer.

+
Parameters:
+ + + +
meshbuffer,:Buffer on which the operation is performed.
resolution,:resolution of the planar mapping. This is the value specifying which is the relation between world space and texture coordinate space.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping (scene::IMeshmesh,
f32 resolutionS,
f32 resolutionT,
u8 axis,
const core::vector3dfoffset 
) const [pure virtual]
+
+
+ +

Creates a planar texture mapping on the buffer.

+

This method is currently implemented towards the LWO planar mapping. A more general biasing might be required.

+
Parameters:
+ + + + + + +
meshMesh on which the operation is performed.
resolutionSResolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space.
resolutionTResolution of the planar mapping in vertical direction. This is the ratio between object space and texture space.
axisThe axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z).
offsetVector added to the vertex positions (in object coordinates).
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping (scene::IMeshBufferbuffer,
f32 resolutionS,
f32 resolutionT,
u8 axis,
const core::vector3dfoffset 
) const [pure virtual]
+
+
+ +

Creates a planar texture mapping on the meshbuffer.

+

This method is currently implemented towards the LWO planar mapping. A more general biasing might be required.

+
Parameters:
+ + + + + + +
bufferBuffer on which the operation is performed.
resolutionSResolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space.
resolutionTResolution of the planar mapping in vertical direction. This is the ratio between object space and texture space.
axisThe axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z).
offsetVector added to the vertex positions (in object coordinates).
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::recalculateNormals (IMeshmesh,
bool smooth = false,
bool angleWeighted = false 
) const [pure virtual]
+
+
+ +

Recalculates all normals of the mesh.

+
Parameters:
+ + + + +
mesh,:Mesh on which the operation is performed.
smooth,:If the normals shall be smoothed.
angleWeighted,:If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::recalculateNormals (IMeshBufferbuffer,
bool smooth = false,
bool angleWeighted = false 
) const [pure virtual]
+
+
+ +

Recalculates all normals of the mesh buffer.

+
Parameters:
+ + + + +
buffer,:Mesh buffer on which the operation is performed.
smooth,:If the normals shall be smoothed.
angleWeighted,:If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::recalculateTangents (IMeshmesh,
bool recalculateNormals = false,
bool smooth = false,
bool angleWeighted = false 
) const [pure virtual]
+
+
+ +

Recalculates tangents, requires a tangent mesh.

+
Parameters:
+ + + + + +
meshMesh on which the operation is performed.
recalculateNormalsIf the normals shall be recalculated, otherwise original normals of the mesh are used unchanged.
smoothIf the normals shall be smoothed.
angleWeightedIf the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IMeshManipulator::recalculateTangents (IMeshBufferbuffer,
bool recalculateNormals = false,
bool smooth = false,
bool angleWeighted = false 
) const [pure virtual]
+
+
+ +

Recalculates tangents, requires a tangent mesh buffer.

+
Parameters:
+ + + + + +
bufferMeshbuffer on which the operation is performed.
recalculateNormalsIf the normals shall be recalculated, otherwise original normals of the buffer are used unchanged.
smoothIf the normals shall be smoothed.
angleWeightedIf the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::scale (IMeshmesh,
const core::vector3dffactor 
) const [inline]
+
+
+ +

Scales the actual mesh, not a scene node.

+
Parameters:
+ + + +
meshMesh on which the operation is performed.
factorScale factor for each axis.
+
+
+ +

Definition at line 108 of file IMeshManipulator.h.

+ +

References apply().

+ +

Referenced by scaleMesh().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::scale (IMeshBufferbuffer,
const core::vector3dffactor 
) const [inline]
+
+
+ +

Scales the actual meshbuffer, not a scene node.

+
Parameters:
+ + + +
bufferMeshbuffer on which the operation is performed.
factorScale factor for each axis.
+
+
+ +

Definition at line 116 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
_IRR_DEPRECATED_ void irr::scene::IMeshManipulator::scaleMesh (IMeshmesh,
const core::vector3dffactor 
) const [inline]
+
+
+ +

Scales the actual mesh, not a scene node.

+
Deprecated:
Use scale() instead. This method may be removed by Irrlicht 1.9
+
Parameters:
+ + + +
meshMesh on which the operation is performed.
factorScale factor for each axis.
+
+
+ +

Definition at line 125 of file IMeshManipulator.h.

+ +

References scale().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::scaleTCoords (scene::IMeshmesh,
const core::vector2dffactor,
u32 level = 1 
) const [inline]
+
+
+ +

Scale the texture coords of a mesh.

+
Parameters:
+ + + + +
meshMesh on which the operation is performed.
factorVector which defines the scale for each axis.
levelNumber of texture coord, starting from 1. Support for level 2 exists for LightMap buffers.
+
+
+ +

Definition at line 131 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::scaleTCoords (scene::IMeshBufferbuffer,
const core::vector2dffactor,
u32 level = 1 
) const [inline]
+
+
+ +

Scale the texture coords of a meshbuffer.

+
Parameters:
+ + + + +
bufferMeshbuffer on which the operation is performed.
factorVector which defines the scale for each axis.
levelNumber of texture coord, starting from 1. Support for level 2 exists for LightMap buffers.
+
+
+ +

Definition at line 140 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::setVertexColorAlpha (IMeshmesh,
s32 alpha 
) const [inline]
+
+
+ +

Sets the alpha vertex color value of the whole mesh to a new value.

+
Parameters:
+ + + +
meshMesh on which the operation is performed.
alphaNew alpha value. Must be a value between 0 and 255.
+
+
+ +

Definition at line 42 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::setVertexColorAlpha (IMeshBufferbuffer,
s32 alpha 
) const [inline]
+
+
+ +

Sets the alpha vertex color value of the whole mesh to a new value.

+
Parameters:
+ + + +
bufferMeshbuffer on which the operation is performed.
alphaNew alpha value. Must be a value between 0 and 255.
+
+
+ +

Definition at line 50 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::setVertexColors (IMeshmesh,
video::SColor color 
) const [inline]
+
+
+ +

Sets the colors of all vertices to one color.

+
Parameters:
+ + + +
meshMesh on which the operation is performed.
colorNew color.
+
+
+ +

Definition at line 58 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::setVertexColors (IMeshBufferbuffer,
video::SColor color 
) const [inline]
+
+
+ +

Sets the colors of all vertices to one color.

+
Parameters:
+ + + +
bufferMeshbuffer on which the operation is performed.
colorNew color.
+
+
+ +

Definition at line 66 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::transform (IMeshmesh,
const core::matrix4m 
) const [inline]
+
+
+ +

Applies a transformation to a mesh.

+
Parameters:
+ + + +
meshMesh on which the operation is performed.
mtransformation matrix.
+
+
+ +

Definition at line 148 of file IMeshManipulator.h.

+ +

References apply().

+ +

Referenced by transformMesh().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::IMeshManipulator::transform (IMeshBufferbuffer,
const core::matrix4m 
) const [inline]
+
+
+ +

Applies a transformation to a meshbuffer.

+
Parameters:
+ + + +
bufferMeshbuffer on which the operation is performed.
mtransformation matrix.
+
+
+ +

Definition at line 156 of file IMeshManipulator.h.

+ +

References apply().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual _IRR_DEPRECATED_ void irr::scene::IMeshManipulator::transformMesh (IMeshmesh,
const core::matrix4m 
) const [inline, virtual]
+
+
+ +

Applies a transformation to a mesh.

+
Deprecated:
Use transform() instead. This method may be removed by Irrlicht 1.9
+
Parameters:
+ + + +
meshMesh on which the operation is performed.
mtransformation matrix.
+
+
+ +

Definition at line 165 of file IMeshManipulator.h.

+ +

References transform().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.png new file mode 100644 index 0000000..e534f7e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node-members.html new file mode 100644 index 0000000..c471819 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node-members.html @@ -0,0 +1,204 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMeshSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IMeshSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
addShadowVolumeSceneNode(const IMesh *shadowMesh=0, s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f)=0irr::scene::IMeshSceneNode [pure virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getMesh(void)=0irr::scene::IMeshSceneNode [pure virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IMeshSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1, 1, 1))irr::scene::IMeshSceneNode [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isReadOnlyMaterials() const =0irr::scene::IMeshSceneNode [pure virtual]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setMesh(IMesh *mesh)=0irr::scene::IMeshSceneNode [pure virtual]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setReadOnlyMaterials(bool readonly)=0irr::scene::IMeshSceneNode [pure virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.html new file mode 100644 index 0000000..37c50b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.html @@ -0,0 +1,362 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMeshSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMeshSceneNode Class Reference
+
+
+ +

A scene node displaying a static mesh. + More...

+ +

#include <IMeshSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IMeshSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A scene node displaying a static mesh.

+ +

Definition at line 20 of file IMeshSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IMeshSceneNode::IMeshSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0),
const core::vector3dfrotation = core::vector3df(0,0,0),
const core::vector3dfscale = core::vector3df(1,1,1) 
) [inline]
+
+
+ +

Constructor.

+

Use setMesh() to set the mesh to display.

+ +

Definition at line 27 of file IMeshSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IShadowVolumeSceneNode* irr::scene::IMeshSceneNode::addShadowVolumeSceneNode (const IMeshshadowMesh = 0,
s32 id = -1,
bool zfailmethod = true,
f32 infinity = 1000.0f 
) [pure virtual]
+
+
+ +

Creates shadow volume scene node as child of this node.

+

The shadow can be rendered using the ZPass or the zfail method. ZPass is a little bit faster because the shadow volume creation is easier, but with this method there occur ugly looking artifacs when the camera is inside the shadow volume. These error do not occur with the ZFail method.

+
Parameters:
+ + + + + +
shadowMesh,:Optional custom mesh for shadow volume.
id,:Id of the shadow scene node. This id can be used to identify the node later.
zfailmethod,:If set to true, the shadow will use the zfail method, if not, zpass is used.
infinity,:Value used by the shadow volume algorithm to scale the shadow volume (for zfail shadow volume we support only finite shadows, so camera zfar must be larger than shadow back cap, which is depend on infinity parameter).
+
+
+
Returns:
Pointer to the created shadow scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IMeshSceneNode::getMesh (void ) [pure virtual]
+
+
+ +

Get the currently defined mesh for display.

+
Returns:
Pointer to mesh which is displayed by this node.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IMeshSceneNode::isReadOnlyMaterials () const [pure virtual]
+
+
+ +

Check if the scene node should not copy the materials of the mesh but use them in a read only style.

+

This flag can be set by setReadOnlyMaterials().

+
Returns:
Whether the materials are read-only.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshSceneNode::setMesh (IMeshmesh) [pure virtual]
+
+
+ +

Sets a new mesh to display.

+
Parameters:
+ + +
meshMesh to display.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IMeshSceneNode::setReadOnlyMaterials (bool readonly) [pure virtual]
+
+
+ +

Sets if the scene node should not copy the materials of the mesh but use them in a read only style.

+

In this way it is possible to change the materials of a mesh causing all mesh scene nodes referencing this mesh to change, too.

+
Parameters:
+ + +
readonlyFlag if the materials shall be read-only.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.png new file mode 100644 index 0000000..0bd3842 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer-members.html new file mode 100644 index 0000000..0dfbdf1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMeshWriter Member List
+
+
+This is the complete list of members for irr::scene::IMeshWriter, including all inherited members. + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const =0irr::scene::IMeshWriter [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
writeMesh(io::IWriteFile *file, scene::IMesh *mesh, s32 flags=EMWF_NONE)=0irr::scene::IMeshWriter [pure virtual]
~IMeshWriter()irr::scene::IMeshWriter [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.html new file mode 100644 index 0000000..1738fa9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.html @@ -0,0 +1,243 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMeshWriter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMeshWriter Class Reference
+
+
+ +

Interface for writing meshes. + More...

+ +

#include <IMeshWriter.h>

+
+ + Inheritance diagram for irr::scene::IMeshWriter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for writing meshes.

+ +

Definition at line 23 of file IMeshWriter.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::IMeshWriter::~IMeshWriter () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 28 of file IMeshWriter.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual EMESH_WRITER_TYPE irr::scene::IMeshWriter::getType () const [pure virtual]
+
+
+ +

Get the type of the mesh writer.

+

For own implementations, use MAKE_IRR_ID as shown in the EMESH_WRITER_TYPE enumeration to return your own unique mesh type id.

+
Returns:
Type of the mesh writer.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::IMeshWriter::writeMesh (io::IWriteFilefile,
scene::IMeshmesh,
s32 flags = EMWF_NONE 
) [pure virtual]
+
+
+ +

Write a static mesh.

+
Parameters:
+ + + + +
fileFile handle to write the mesh to.
meshPointer to mesh to be written.
flagsOptional flags to set properties of the writer.
+
+
+
Returns:
True if sucessful
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.png new file mode 100644 index 0000000..7cc9f42 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_mesh_writer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector-members.html new file mode 100644 index 0000000..8ed030b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector-members.html @@ -0,0 +1,138 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IMetaTriangleSelector Member List
+
+
+This is the complete list of members for irr::scene::IMetaTriangleSelector, including all inherited members. + + + + + + + + + + + + + + + + + + +
addTriangleSelector(ITriangleSelector *toAdd)=0irr::scene::IMetaTriangleSelector [pure virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getSceneNodeForTriangle(u32 triangleIndex) const =0irr::scene::ITriangleSelector [pure virtual]
getSelector(u32 index)=0irr::scene::ITriangleSelector [pure virtual]
getSelector(u32 index) const =0irr::scene::ITriangleSelector [pure virtual]
getSelectorCount() const =0irr::scene::ITriangleSelector [pure virtual]
getTriangleCount() const =0irr::scene::ITriangleSelector [pure virtual]
getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::matrix4 *transform=0) const =0irr::scene::ITriangleSelector [pure virtual]
getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::aabbox3d< f32 > &box, const core::matrix4 *transform=0) const =0irr::scene::ITriangleSelector [pure virtual]
getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::line3d< f32 > &line, const core::matrix4 *transform=0) const =0irr::scene::ITriangleSelector [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
removeAllTriangleSelectors()=0irr::scene::IMetaTriangleSelector [pure virtual]
removeTriangleSelector(ITriangleSelector *toRemove)=0irr::scene::IMetaTriangleSelector [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.html new file mode 100644 index 0000000..520b6e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.html @@ -0,0 +1,228 @@ + + + + +Irrlicht 3D Engine: irr::scene::IMetaTriangleSelector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IMetaTriangleSelector Class Reference
+
+
+ +

Interface for making multiple triangle selectors work as one big selector. + More...

+ +

#include <IMetaTriangleSelector.h>

+
+ + Inheritance diagram for irr::scene::IMetaTriangleSelector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for making multiple triangle selectors work as one big selector.

+

This is nothing more than a collection of one or more triangle selectors providing together the interface of one triangle selector. In this way, collision tests can be done with different triangle soups in one pass.

+ +

Definition at line 20 of file IMetaTriangleSelector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::IMetaTriangleSelector::addTriangleSelector (ITriangleSelectortoAdd) [pure virtual]
+
+
+ +

Adds a triangle selector to the collection of triangle selectors.

+
Parameters:
+ + +
toAdd,:Pointer to an triangle selector to add to the list.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IMetaTriangleSelector::removeAllTriangleSelectors () [pure virtual]
+
+
+ +

Removes all triangle selectors from the collection.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::IMetaTriangleSelector::removeTriangleSelector (ITriangleSelectortoRemove) [pure virtual]
+
+
+ +

Removes a specific triangle selector from the collection.

+
Parameters:
+ + +
toRemove,:Pointer to an triangle selector which is in the list but will be removed.
+
+
+
Returns:
True if successful, false if not.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.png new file mode 100644 index 0000000..7b383ec Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_meta_triangle_selector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector-members.html new file mode 100644 index 0000000..1e20c2c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector-members.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleAffector Member List
+
+
+This is the complete list of members for irr::scene::IParticleAffector, including all inherited members. + + + + + + + + + + + + + + + +
affect(u32 now, SParticle *particlearray, u32 count)=0irr::scene::IParticleAffector [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Enabledirr::scene::IParticleAffector [protected]
getDebugName() const irr::IReferenceCounted [inline]
getEnabled() const irr::scene::IParticleAffector [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const =0irr::scene::IParticleAffector [pure virtual]
grab() const irr::IReferenceCounted [inline]
IParticleAffector()irr::scene::IParticleAffector [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::scene::IParticleAffector [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.html new file mode 100644 index 0000000..c579b07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.html @@ -0,0 +1,317 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleAffector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleAffector Class Reference
+
+
+ +

A particle affector modifies particles. + More...

+ +

#include <IParticleAffector.h>

+
+ + Inheritance diagram for irr::scene::IParticleAffector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Attributes

+ +

Detailed Description

+

A particle affector modifies particles.

+ +

Definition at line 41 of file IParticleAffector.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::IParticleAffector::IParticleAffector () [inline]
+
+
+ +

constructor

+ +

Definition at line 46 of file IParticleAffector.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::IParticleAffector::affect (u32 now,
SParticleparticlearray,
u32 count 
) [pure virtual]
+
+
+ +

Affects an array of particles.

+
Parameters:
+ + + + +
nowCurrent time. (Same as ITimer::getTime() would return)
particlearrayArray of particles.
countAmount of particles in array.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAffector::getEnabled () const [inline, virtual]
+
+
+ +

Gets whether or not the affector is currently enabled.

+ +

Definition at line 58 of file IParticleAffector.h.

+ +

References Enabled.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_AFFECTOR_TYPE irr::scene::IParticleAffector::getType () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAffector::setEnabled (bool enabled) [inline, virtual]
+
+
+ +

Sets whether or not the affector is currently enabled.

+ +

Definition at line 55 of file IParticleAffector.h.

+ +

References Enabled.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
bool irr::scene::IParticleAffector::Enabled [protected]
+
+
+ +

Definition at line 64 of file IParticleAffector.h.

+ +

Referenced by getEnabled(), and setEnabled().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.png new file mode 100644 index 0000000..bdfb942 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_affector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter-members.html new file mode 100644 index 0000000..4638905 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter-members.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleAnimatedMeshSceneNodeEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleAnimatedMeshSceneNodeEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getAnimatedMeshSceneNode() const =0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getEveryMeshVertex() const =0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getNormalDirectionModifier() const =0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleAnimatedMeshSceneNodeEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isUsingNormalDirection() const =0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setAnimatedMeshSceneNode(IAnimatedMeshSceneNode *node)=0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setEveryMeshVertex(bool everyMeshVertex=true)=0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setNormalDirectionModifier(f32 normalDirectionModifier)=0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
setUseNormalDirection(bool useNormalDirection=true)=0irr::scene::IParticleAnimatedMeshSceneNodeEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.html new file mode 100644 index 0000000..ebebb3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.html @@ -0,0 +1,338 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleAnimatedMeshSceneNodeEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleAnimatedMeshSceneNodeEmitter Class Reference
+
+
+ +

A particle emitter which emits particles from mesh vertices. + More...

+ +

#include <IParticleAnimatedMeshSceneNodeEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleAnimatedMeshSceneNodeEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle emitter which emits particles from mesh vertices.

+ +

Definition at line 17 of file IParticleAnimatedMeshSceneNodeEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const IAnimatedMeshSceneNode* irr::scene::IParticleAnimatedMeshSceneNodeEmitter::getAnimatedMeshSceneNode () const [pure virtual]
+
+
+ +

Get mesh we're emitting particles from.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAnimatedMeshSceneNodeEmitter::getEveryMeshVertex () const [pure virtual]
+
+
+ +

Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleAnimatedMeshSceneNodeEmitter::getNormalDirectionModifier () const [pure virtual]
+
+
+ +

Get the amount that the normal is divided by for getting a particles direction.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleAnimatedMeshSceneNodeEmitter::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Reimplemented from irr::scene::IParticleEmitter.

+ +

Definition at line 46 of file IParticleAnimatedMeshSceneNodeEmitter.h.

+ +

References irr::scene::EPET_ANIMATED_MESH.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAnimatedMeshSceneNodeEmitter::isUsingNormalDirection () const [pure virtual]
+
+
+ +

Get whether to use vertex normal for direction, or direction specified.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAnimatedMeshSceneNodeEmitter::setAnimatedMeshSceneNode (IAnimatedMeshSceneNodenode) [pure virtual]
+
+
+ +

Set Mesh to emit particles from.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAnimatedMeshSceneNodeEmitter::setEveryMeshVertex (bool everyMeshVertex = true) [pure virtual]
+
+
+ +

Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAnimatedMeshSceneNodeEmitter::setNormalDirectionModifier (f32 normalDirectionModifier) [pure virtual]
+
+
+ +

Set the amount that the normal is divided by for getting a particles direction.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAnimatedMeshSceneNodeEmitter::setUseNormalDirection (bool useNormalDirection = true) [pure virtual]
+
+
+ +

Set whether to use vertex normal for direction, or direction specified.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.png new file mode 100644 index 0000000..23b5720 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector-members.html new file mode 100644 index 0000000..ea25e77 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector-members.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleAttractionAffector Member List
+
+
+This is the complete list of members for irr::scene::IParticleAttractionAffector, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
affect(u32 now, SParticle *particlearray, u32 count)=0irr::scene::IParticleAffector [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Enabledirr::scene::IParticleAffector [protected]
getAffectX() const =0irr::scene::IParticleAttractionAffector [pure virtual]
getAffectY() const =0irr::scene::IParticleAttractionAffector [pure virtual]
getAffectZ() const =0irr::scene::IParticleAttractionAffector [pure virtual]
getAttract() const =0irr::scene::IParticleAttractionAffector [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getEnabled() const irr::scene::IParticleAffector [inline, virtual]
getPoint() const =0irr::scene::IParticleAttractionAffector [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleAttractionAffector [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IParticleAffector()irr::scene::IParticleAffector [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setAffectX(bool affect)=0irr::scene::IParticleAttractionAffector [pure virtual]
setAffectY(bool affect)=0irr::scene::IParticleAttractionAffector [pure virtual]
setAffectZ(bool affect)=0irr::scene::IParticleAttractionAffector [pure virtual]
setAttract(bool attract)=0irr::scene::IParticleAttractionAffector [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::scene::IParticleAffector [inline, virtual]
setPoint(const core::vector3df &point)=0irr::scene::IParticleAttractionAffector [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.html new file mode 100644 index 0000000..129d2d5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.html @@ -0,0 +1,376 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleAttractionAffector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleAttractionAffector Class Reference
+
+
+ +

A particle affector which attracts or detracts particles. + More...

+ +

#include <IParticleAttractionAffector.h>

+
+ + Inheritance diagram for irr::scene::IParticleAttractionAffector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual bool getAffectX () const =0 +
    Get whether or not the particles X position are affected.
  • virtual bool getAffectY () const =0 +
    Get whether or not the particles Y position are affected.
  • virtual bool getAffectZ () const =0 +
    Get whether or not the particles Z position are affected.
  • virtual bool getAttract () const =0 +
    Get whether or not the particles are attracting or detracting.
  • virtual const core::vector3df & getPoint () const =0 +
    Get the point that particles are attracted to.
  • virtual E_PARTICLE_AFFECTOR_TYPE getType () const +
    Get emitter type.
  • virtual void setAffectX (bool affect)=0 +
    Set whether or not this will affect particles in the X direction.
  • virtual void setAffectY (bool affect)=0 +
    Set whether or not this will affect particles in the Y direction.
  • virtual void setAffectZ (bool affect)=0 +
    Set whether or not this will affect particles in the Z direction.
  • virtual void setAttract (bool attract)=0 +
    Set whether or not the particles are attracting or detracting.
  • virtual void setPoint (const core::vector3df &point)=0 +
    Set the point that particles will attract to.
+

Detailed Description

+

A particle affector which attracts or detracts particles.

+ +

Definition at line 16 of file IParticleAttractionAffector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAttractionAffector::getAffectX () const [pure virtual]
+
+
+ +

Get whether or not the particles X position are affected.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAttractionAffector::getAffectY () const [pure virtual]
+
+
+ +

Get whether or not the particles Y position are affected.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAttractionAffector::getAffectZ () const [pure virtual]
+
+
+ +

Get whether or not the particles Z position are affected.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleAttractionAffector::getAttract () const [pure virtual]
+
+
+ +

Get whether or not the particles are attracting or detracting.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleAttractionAffector::getPoint () const [pure virtual]
+
+
+ +

Get the point that particles are attracted to.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_AFFECTOR_TYPE irr::scene::IParticleAttractionAffector::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Implements irr::scene::IParticleAffector.

+ +

Definition at line 51 of file IParticleAttractionAffector.h.

+ +

References irr::scene::EPAT_ATTRACT.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAttractionAffector::setAffectX (bool affect) [pure virtual]
+
+
+ +

Set whether or not this will affect particles in the X direction.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAttractionAffector::setAffectY (bool affect) [pure virtual]
+
+
+ +

Set whether or not this will affect particles in the Y direction.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAttractionAffector::setAffectZ (bool affect) [pure virtual]
+
+
+ +

Set whether or not this will affect particles in the Z direction.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAttractionAffector::setAttract (bool attract) [pure virtual]
+
+
+ +

Set whether or not the particles are attracting or detracting.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleAttractionAffector::setPoint (const core::vector3dfpoint) [pure virtual]
+
+
+ +

Set the point that particles will attract to.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.png new file mode 100644 index 0000000..bc7ce67 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_attraction_affector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter-members.html new file mode 100644 index 0000000..e845f42 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter-members.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleBoxEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleBoxEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getBox() const =0irr::scene::IParticleBoxEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleBoxEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setBox(const core::aabbox3df &box)=0irr::scene::IParticleBoxEmitter [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.html new file mode 100644 index 0000000..e13f4f7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.html @@ -0,0 +1,220 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleBoxEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleBoxEmitter Class Reference
+
+
+ +

A particle emitter which emits particles from a box shaped space. + More...

+ +

#include <IParticleBoxEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleBoxEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle emitter which emits particles from a box shaped space.

+ +

Definition at line 17 of file IParticleBoxEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::aabbox3df& irr::scene::IParticleBoxEmitter::getBox () const [pure virtual]
+
+
+ +

Get the box shape set.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleBoxEmitter::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Reimplemented from irr::scene::IParticleEmitter.

+ +

Definition at line 28 of file IParticleBoxEmitter.h.

+ +

References irr::scene::EPET_BOX.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleBoxEmitter::setBox (const core::aabbox3dfbox) [pure virtual]
+
+
+ +

Set the box shape.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.png new file mode 100644 index 0000000..be44376 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_box_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter-members.html new file mode 100644 index 0000000..2116415 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter-members.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleCylinderEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleCylinderEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getCenter() const =0irr::scene::IParticleCylinderEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getLength() const =0irr::scene::IParticleCylinderEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getNormal() const =0irr::scene::IParticleCylinderEmitter [pure virtual]
getOutlineOnly() const =0irr::scene::IParticleCylinderEmitter [pure virtual]
getRadius() const =0irr::scene::IParticleCylinderEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleCylinderEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setCenter(const core::vector3df &center)=0irr::scene::IParticleCylinderEmitter [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setLength(f32 length)=0irr::scene::IParticleCylinderEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setNormal(const core::vector3df &normal)=0irr::scene::IParticleCylinderEmitter [pure virtual]
setOutlineOnly(bool outlineOnly=true)=0irr::scene::IParticleCylinderEmitter [pure virtual]
setRadius(f32 radius)=0irr::scene::IParticleCylinderEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.html new file mode 100644 index 0000000..d2a5e2c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.html @@ -0,0 +1,376 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleCylinderEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleCylinderEmitter Class Reference
+
+
+ +

A particle emitter which emits from a cylindrically shaped space. + More...

+ +

#include <IParticleCylinderEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleCylinderEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle emitter which emits from a cylindrically shaped space.

+ +

Definition at line 16 of file IParticleCylinderEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleCylinderEmitter::getCenter () const [pure virtual]
+
+
+ +

Get the center of the cylinder.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleCylinderEmitter::getLength () const [pure virtual]
+
+
+ +

Get the center of the cylinder.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleCylinderEmitter::getNormal () const [pure virtual]
+
+
+ +

Get the normal of the cylinder.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleCylinderEmitter::getOutlineOnly () const [pure virtual]
+
+
+ +

Get whether or not to draw points inside the cylinder.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleCylinderEmitter::getRadius () const [pure virtual]
+
+
+ +

Get the radius of the cylinder.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleCylinderEmitter::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Reimplemented from irr::scene::IParticleEmitter.

+ +

Definition at line 51 of file IParticleCylinderEmitter.h.

+ +

References irr::scene::EPET_CYLINDER.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleCylinderEmitter::setCenter (const core::vector3dfcenter) [pure virtual]
+
+
+ +

Set the center of the radius for the cylinder, at one end of the cylinder.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleCylinderEmitter::setLength (f32 length) [pure virtual]
+
+
+ +

Set the length of the cylinder.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleCylinderEmitter::setNormal (const core::vector3dfnormal) [pure virtual]
+
+
+ +

Set the normal of the cylinder.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleCylinderEmitter::setOutlineOnly (bool outlineOnly = true) [pure virtual]
+
+
+ +

Set whether or not to draw points inside the cylinder.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleCylinderEmitter::setRadius (f32 radius) [pure virtual]
+
+
+ +

Set the radius of the cylinder.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.png new file mode 100644 index 0000000..8e6b847 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_cylinder_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter-members.html new file mode 100644 index 0000000..d3b8d99 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter-members.html @@ -0,0 +1,151 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.html new file mode 100644 index 0000000..fa46d3a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.html @@ -0,0 +1,622 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleEmitter Class Reference
+
+
+ +

A particle emitter for using with particle systems. + More...

+ +

#include <IParticleEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle emitter for using with particle systems.

+

A Particle emitter emitts new particles into a particle system.

+ +

Definition at line 45 of file IParticleEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::scene::IParticleEmitter::emitt (u32 now,
u32 timeSinceLastCall,
SParticle *& outArray 
) [pure virtual]
+
+
+ +

Prepares an array with new particles to emitt into the system.

+
Parameters:
+ + + + +
nowCurrent time.
timeSinceLastCallTime elapsed since last call, in milliseconds.
outArrayPointer which will point to the array with the new particles to add into the system.
+
+
+
Returns:
Amount of new particles in the array. Can be 0.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleEmitter::getDirection () const [pure virtual]
+
+
+ +

Get direction the emitter emits particles.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::scene::IParticleEmitter::getMaxAngleDegrees () const [pure virtual]
+
+
+ +

Get maximal random derivation from the direction.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IParticleEmitter::getMaxLifeTime () const [pure virtual]
+
+
+ +

Get the maximum particle life-time in milliseconds.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IParticleEmitter::getMaxParticlesPerSecond () const [pure virtual]
+
+
+ +

Get the maximum number of particles the emitter emits per second.

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SColor& irr::scene::IParticleEmitter::getMaxStartColor () const [pure virtual]
+
+
+ +

Get the maximum starting color for particles.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2df& irr::scene::IParticleEmitter::getMaxStartSize () const [pure virtual]
+
+
+ +

Get the maximum starting size for particles.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IParticleEmitter::getMinLifeTime () const [pure virtual]
+
+
+ +

Get the minimum particle life-time in milliseconds.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IParticleEmitter::getMinParticlesPerSecond () const [pure virtual]
+
+
+ +

Get the minimum number of particles the emitter emits per second.

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SColor& irr::scene::IParticleEmitter::getMinStartColor () const [pure virtual]
+
+
+ +

Get the minimum starting color for particles.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2df& irr::scene::IParticleEmitter::getMinStartSize () const [pure virtual]
+
+
+ +

Get the minimum starting size for particles.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleEmitter::getType () const [inline, virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setDirection (const core::vector3dfnewDirection) [pure virtual]
+
+
+ +

Set direction the emitter emits particles.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMaxAngleDegrees (s32 maxAngleDegrees) [pure virtual]
+
+
+ +

Set maximal random derivation from the direction.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMaxLifeTime (u32 lifeTimeMax) [pure virtual]
+
+
+ +

Set the maximum particle life-time in milliseconds.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMaxParticlesPerSecond (u32 maxPPS) [pure virtual]
+
+
+ +

Set maximum number of particles the emitter emits per second.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMaxStartColor (const video::SColorcolor) [pure virtual]
+
+
+ +

Set maximum starting color for particles.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMaxStartSize (const core::dimension2dfsize) [pure virtual]
+
+
+ +

Set the maximum starting size for particles.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMinLifeTime (u32 lifeTimeMin) [pure virtual]
+
+
+ +

Set the minimum particle life-time in milliseconds.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMinParticlesPerSecond (u32 minPPS) [pure virtual]
+
+
+ +

Set minimum number of particles the emitter emits per second.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMinStartColor (const video::SColorcolor) [pure virtual]
+
+
+ +

Set minimum starting color for particles.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleEmitter::setMinStartSize (const core::dimension2dfsize) [pure virtual]
+
+
+ +

Set the minimum starting size for particles.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.png new file mode 100644 index 0000000..4d690fd Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector-members.html new file mode 100644 index 0000000..2eb3ce9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector-members.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleFadeOutAffector Member List
+
+
+This is the complete list of members for irr::scene::IParticleFadeOutAffector, including all inherited members. + + + + + + + + + + + + + + + + + + + +
affect(u32 now, SParticle *particlearray, u32 count)=0irr::scene::IParticleAffector [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Enabledirr::scene::IParticleAffector [protected]
getDebugName() const irr::IReferenceCounted [inline]
getEnabled() const irr::scene::IParticleAffector [inline, virtual]
getFadeOutTime() const =0irr::scene::IParticleFadeOutAffector [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTargetColor() const =0irr::scene::IParticleFadeOutAffector [pure virtual]
getType() const irr::scene::IParticleFadeOutAffector [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IParticleAffector()irr::scene::IParticleAffector [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::scene::IParticleAffector [inline, virtual]
setFadeOutTime(u32 fadeOutTime)=0irr::scene::IParticleFadeOutAffector [pure virtual]
setTargetColor(const video::SColor &targetColor)=0irr::scene::IParticleFadeOutAffector [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.html new file mode 100644 index 0000000..f1f4647 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.html @@ -0,0 +1,259 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleFadeOutAffector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleFadeOutAffector Class Reference
+
+
+ +

A particle affector which fades out the particles. + More...

+ +

#include <IParticleFadeOutAffector.h>

+
+ + Inheritance diagram for irr::scene::IParticleFadeOutAffector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual u32 getFadeOutTime () const =0 +
    Gets the time in milliseconds it takes for each particle to fade out.
  • virtual const video::SColor & getTargetColor () const =0 +
    Gets the targetColor, i.e. the color the particles will interpolate to over time.
  • virtual E_PARTICLE_AFFECTOR_TYPE getType () const +
    Get emitter type.
  • virtual void setFadeOutTime (u32 fadeOutTime)=0 +
    Sets the time in milliseconds it takes for each particle to fade out (minimal 1 ms)
  • virtual void setTargetColor (const video::SColor &targetColor)=0 +
    Sets the targetColor, i.e. the color the particles will interpolate to over time.
+

Detailed Description

+

A particle affector which fades out the particles.

+ +

Definition at line 16 of file IParticleFadeOutAffector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual u32 irr::scene::IParticleFadeOutAffector::getFadeOutTime () const [pure virtual]
+
+
+ +

Gets the time in milliseconds it takes for each particle to fade out.

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SColor& irr::scene::IParticleFadeOutAffector::getTargetColor () const [pure virtual]
+
+
+ +

Gets the targetColor, i.e. the color the particles will interpolate to over time.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_AFFECTOR_TYPE irr::scene::IParticleFadeOutAffector::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Implements irr::scene::IParticleAffector.

+ +

Definition at line 33 of file IParticleFadeOutAffector.h.

+ +

References irr::scene::EPAT_FADE_OUT.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleFadeOutAffector::setFadeOutTime (u32 fadeOutTime) [pure virtual]
+
+
+ +

Sets the time in milliseconds it takes for each particle to fade out (minimal 1 ms)

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleFadeOutAffector::setTargetColor (const video::SColortargetColor) [pure virtual]
+
+
+ +

Sets the targetColor, i.e. the color the particles will interpolate to over time.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.png new file mode 100644 index 0000000..963af46 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_fade_out_affector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector-members.html new file mode 100644 index 0000000..169c25a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector-members.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleGravityAffector Member List
+
+
+This is the complete list of members for irr::scene::IParticleGravityAffector, including all inherited members. + + + + + + + + + + + + + + + + + + + +
affect(u32 now, SParticle *particlearray, u32 count)=0irr::scene::IParticleAffector [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Enabledirr::scene::IParticleAffector [protected]
getDebugName() const irr::IReferenceCounted [inline]
getEnabled() const irr::scene::IParticleAffector [inline, virtual]
getGravity() const =0irr::scene::IParticleGravityAffector [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTimeForceLost() const =0irr::scene::IParticleGravityAffector [pure virtual]
getType() const irr::scene::IParticleGravityAffector [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IParticleAffector()irr::scene::IParticleAffector [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::scene::IParticleAffector [inline, virtual]
setGravity(const core::vector3df &gravity)=0irr::scene::IParticleGravityAffector [pure virtual]
setTimeForceLost(f32 timeForceLost)=0irr::scene::IParticleGravityAffector [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.html new file mode 100644 index 0000000..e93f598 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.html @@ -0,0 +1,260 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleGravityAffector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleGravityAffector Class Reference
+
+
+ +

A particle affector which applies gravity to particles. + More...

+ +

#include <IParticleGravityAffector.h>

+
+ + Inheritance diagram for irr::scene::IParticleGravityAffector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle affector which applies gravity to particles.

+ +

Definition at line 16 of file IParticleGravityAffector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleGravityAffector::getGravity () const [pure virtual]
+
+
+ +

Get the direction and force of gravity.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleGravityAffector::getTimeForceLost () const [pure virtual]
+
+
+ +

Get the time in milliseconds when the gravity force is totally lost.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_AFFECTOR_TYPE irr::scene::IParticleGravityAffector::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Implements irr::scene::IParticleAffector.

+ +

Definition at line 34 of file IParticleGravityAffector.h.

+ +

References irr::scene::EPAT_GRAVITY.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleGravityAffector::setGravity (const core::vector3dfgravity) [pure virtual]
+
+
+ +

Set the direction and force of gravity in all 3 dimensions.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleGravityAffector::setTimeForceLost (f32 timeForceLost) [pure virtual]
+
+
+ +

Set the time in milliseconds when the gravity force is totally lost.

+

At that point the particle does not move any more.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.png new file mode 100644 index 0000000..fa1d4b8 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_gravity_affector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter-members.html new file mode 100644 index 0000000..37eca8e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter-members.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleMeshEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleMeshEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getEveryMeshVertex() const =0irr::scene::IParticleMeshEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMesh() const =0irr::scene::IParticleMeshEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getNormalDirectionModifier() const =0irr::scene::IParticleMeshEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleMeshEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isUsingNormalDirection() const =0irr::scene::IParticleMeshEmitter [pure virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setEveryMeshVertex(bool everyMeshVertex=true)=0irr::scene::IParticleMeshEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMesh(IMesh *mesh)=0irr::scene::IParticleMeshEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setNormalDirectionModifier(f32 normalDirectionModifier)=0irr::scene::IParticleMeshEmitter [pure virtual]
setUseNormalDirection(bool useNormalDirection=true)=0irr::scene::IParticleMeshEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.html new file mode 100644 index 0000000..2c8a36b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.html @@ -0,0 +1,337 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleMeshEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleMeshEmitter Class Reference
+
+
+ +

A particle emitter which emits from vertices of a mesh. + More...

+ +

#include <IParticleMeshEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleMeshEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+
    +
  • virtual bool getEveryMeshVertex () const =0 +
    Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices.
  • virtual const IMesh * getMesh () const =0 +
    Get Mesh we're emitting particles from.
  • virtual f32 getNormalDirectionModifier () const =0 +
    Get the amount that the normal is divided by for getting a particles direction.
  • virtual E_PARTICLE_EMITTER_TYPE getType () const +
    Get emitter type.
  • virtual bool isUsingNormalDirection () const =0 +
    Get whether to use vertex normal for direction, or direction specified.
  • virtual void setEveryMeshVertex (bool everyMeshVertex=true)=0 +
    Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices.
  • virtual void setMesh (IMesh *mesh)=0 +
    Set Mesh to emit particles from.
  • virtual void setNormalDirectionModifier (f32 normalDirectionModifier)=0 +
    Set the amount that the normal is divided by for getting a particles direction.
  • virtual void setUseNormalDirection (bool useNormalDirection=true)=0 +
    Set whether to use vertex normal for direction, or direction specified.
+

Detailed Description

+

A particle emitter which emits from vertices of a mesh.

+ +

Definition at line 17 of file IParticleMeshEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleMeshEmitter::getEveryMeshVertex () const [pure virtual]
+
+
+ +

Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual const IMesh* irr::scene::IParticleMeshEmitter::getMesh () const [pure virtual]
+
+
+ +

Get Mesh we're emitting particles from.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleMeshEmitter::getNormalDirectionModifier () const [pure virtual]
+
+
+ +

Get the amount that the normal is divided by for getting a particles direction.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleMeshEmitter::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Reimplemented from irr::scene::IParticleEmitter.

+ +

Definition at line 46 of file IParticleMeshEmitter.h.

+ +

References irr::scene::EPET_MESH.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::IParticleMeshEmitter::isUsingNormalDirection () const [pure virtual]
+
+
+ +

Get whether to use vertex normal for direction, or direction specified.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleMeshEmitter::setEveryMeshVertex (bool everyMeshVertex = true) [pure virtual]
+
+
+ +

Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleMeshEmitter::setMesh (IMeshmesh) [pure virtual]
+
+
+ +

Set Mesh to emit particles from.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleMeshEmitter::setNormalDirectionModifier (f32 normalDirectionModifier) [pure virtual]
+
+
+ +

Set the amount that the normal is divided by for getting a particles direction.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleMeshEmitter::setUseNormalDirection (bool useNormalDirection = true) [pure virtual]
+
+
+ +

Set whether to use vertex normal for direction, or direction specified.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.png new file mode 100644 index 0000000..7273aa0 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_mesh_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter-members.html new file mode 100644 index 0000000..79b438a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter-members.html @@ -0,0 +1,157 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleRingEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleRingEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getCenter() const =0irr::scene::IParticleRingEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getRadius() const =0irr::scene::IParticleRingEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRingThickness() const =0irr::scene::IParticleRingEmitter [pure virtual]
getType() const irr::scene::IParticleRingEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setCenter(const core::vector3df &center)=0irr::scene::IParticleRingEmitter [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setRadius(f32 radius)=0irr::scene::IParticleRingEmitter [pure virtual]
setRingThickness(f32 ringThickness)=0irr::scene::IParticleRingEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.html new file mode 100644 index 0000000..79762be --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.html @@ -0,0 +1,298 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleRingEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleRingEmitter Class Reference
+
+
+ +

A particle emitter which emits particles along a ring shaped area. + More...

+ +

#include <IParticleRingEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleRingEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle emitter which emits particles along a ring shaped area.

+ +

Definition at line 16 of file IParticleRingEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleRingEmitter::getCenter () const [pure virtual]
+
+
+ +

Get the center of the ring.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleRingEmitter::getRadius () const [pure virtual]
+
+
+ +

Get the radius of the ring.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleRingEmitter::getRingThickness () const [pure virtual]
+
+
+ +

Get the thickness of the ring.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleRingEmitter::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Reimplemented from irr::scene::IParticleEmitter.

+ +

Definition at line 39 of file IParticleRingEmitter.h.

+ +

References irr::scene::EPET_RING.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleRingEmitter::setCenter (const core::vector3dfcenter) [pure virtual]
+
+
+ +

Set the center of the ring.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleRingEmitter::setRadius (f32 radius) [pure virtual]
+
+
+ +

Set the radius of the ring.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleRingEmitter::setRingThickness (f32 ringThickness) [pure virtual]
+
+
+ +

Set the thickness of the ring.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.png new file mode 100644 index 0000000..bcd642c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_ring_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector-members.html new file mode 100644 index 0000000..5a268e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector-members.html @@ -0,0 +1,139 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleRotationAffector Member List
+
+
+This is the complete list of members for irr::scene::IParticleRotationAffector, including all inherited members. + + + + + + + + + + + + + + + + + + + +
affect(u32 now, SParticle *particlearray, u32 count)=0irr::scene::IParticleAffector [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
Enabledirr::scene::IParticleAffector [protected]
getDebugName() const irr::IReferenceCounted [inline]
getEnabled() const irr::scene::IParticleAffector [inline, virtual]
getPivotPoint() const =0irr::scene::IParticleRotationAffector [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSpeed() const =0irr::scene::IParticleRotationAffector [pure virtual]
getType() const irr::scene::IParticleRotationAffector [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IParticleAffector()irr::scene::IParticleAffector [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEnabled(bool enabled)irr::scene::IParticleAffector [inline, virtual]
setPivotPoint(const core::vector3df &point)=0irr::scene::IParticleRotationAffector [pure virtual]
setSpeed(const core::vector3df &speed)=0irr::scene::IParticleRotationAffector [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.html new file mode 100644 index 0000000..7537114 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.html @@ -0,0 +1,259 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleRotationAffector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleRotationAffector Class Reference
+
+
+ +

A particle affector which rotates the particle system. + More...

+ +

#include <IParticleRotationAffector.h>

+
+ + Inheritance diagram for irr::scene::IParticleRotationAffector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle affector which rotates the particle system.

+ +

Definition at line 16 of file IParticleRotationAffector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleRotationAffector::getPivotPoint () const [pure virtual]
+
+
+ +

Get the point that particles are attracted to.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleRotationAffector::getSpeed () const [pure virtual]
+
+
+ +

Get the speed in degrees per second in all 3 dimensions.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_AFFECTOR_TYPE irr::scene::IParticleRotationAffector::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Implements irr::scene::IParticleAffector.

+ +

Definition at line 33 of file IParticleRotationAffector.h.

+ +

References irr::scene::EPAT_ROTATE.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleRotationAffector::setPivotPoint (const core::vector3dfpoint) [pure virtual]
+
+
+ +

Set the point that particles will rotate around.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleRotationAffector::setSpeed (const core::vector3dfspeed) [pure virtual]
+
+
+ +

Set the speed in degrees per second in all 3 dimensions.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.png new file mode 100644 index 0000000..abf8212 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_rotation_affector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter-members.html new file mode 100644 index 0000000..b533c73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter-members.html @@ -0,0 +1,155 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleSphereEmitter Member List
+
+
+This is the complete list of members for irr::scene::IParticleSphereEmitter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
emitt(u32 now, u32 timeSinceLastCall, SParticle *&outArray)=0irr::scene::IParticleEmitter [pure virtual]
getCenter() const =0irr::scene::IParticleSphereEmitter [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDirection() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxAngleDegrees() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMaxStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getMinLifeTime() const =0irr::scene::IParticleEmitter [pure virtual]
getMinParticlesPerSecond() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartColor() const =0irr::scene::IParticleEmitter [pure virtual]
getMinStartSize() const =0irr::scene::IParticleEmitter [pure virtual]
getRadius() const =0irr::scene::IParticleSphereEmitter [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::IParticleSphereEmitter [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setCenter(const core::vector3df &center)=0irr::scene::IParticleSphereEmitter [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirection(const core::vector3df &newDirection)=0irr::scene::IParticleEmitter [pure virtual]
setMaxAngleDegrees(s32 maxAngleDegrees)=0irr::scene::IParticleEmitter [pure virtual]
setMaxLifeTime(u32 lifeTimeMax)=0irr::scene::IParticleEmitter [pure virtual]
setMaxParticlesPerSecond(u32 maxPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMaxStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setMinLifeTime(u32 lifeTimeMin)=0irr::scene::IParticleEmitter [pure virtual]
setMinParticlesPerSecond(u32 minPPS)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartColor(const video::SColor &color)=0irr::scene::IParticleEmitter [pure virtual]
setMinStartSize(const core::dimension2df &size)=0irr::scene::IParticleEmitter [pure virtual]
setRadius(f32 radius)=0irr::scene::IParticleSphereEmitter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.html new file mode 100644 index 0000000..dbeebdb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.html @@ -0,0 +1,259 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleSphereEmitter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleSphereEmitter Class Reference
+
+
+ +

A particle emitter which emits from a spherical space. + More...

+ +

#include <IParticleSphereEmitter.h>

+
+ + Inheritance diagram for irr::scene::IParticleSphereEmitter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle emitter which emits from a spherical space.

+ +

Definition at line 16 of file IParticleSphereEmitter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::IParticleSphereEmitter::getCenter () const [pure virtual]
+
+
+ +

Get the center of the sphere for particle emissions.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::IParticleSphereEmitter::getRadius () const [pure virtual]
+
+
+ +

Get the radius of the sphere for particle emissions.

+ +
+
+ +
+
+ + + + + + + +
virtual E_PARTICLE_EMITTER_TYPE irr::scene::IParticleSphereEmitter::getType () const [inline, virtual]
+
+
+ +

Get emitter type.

+ +

Reimplemented from irr::scene::IParticleEmitter.

+ +

Definition at line 33 of file IParticleSphereEmitter.h.

+ +

References irr::scene::EPET_SPHERE.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSphereEmitter::setCenter (const core::vector3dfcenter) [pure virtual]
+
+
+ +

Set the center of the sphere for particle emissions.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSphereEmitter::setRadius (f32 radius) [pure virtual]
+
+
+ +

Set the radius of the sphere for particle emissions.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.png new file mode 100644 index 0000000..c4ae8dd Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_sphere_emitter.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node-members.html new file mode 100644 index 0000000..24dbf7c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node-members.html @@ -0,0 +1,220 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IParticleSystemSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IParticleSystemSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAffector(IParticleAffector *affector)=0irr::scene::IParticleSystemSceneNode [pure virtual]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clearParticles()=0irr::scene::IParticleSystemSceneNode [pure virtual]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
createAnimatedMeshSceneNodeEmitter(scene::IAnimatedMeshSceneNode *node, bool useNormalDirection=true, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), f32 normalDirectionModifier=100.0f, s32 mbNumber=-1, bool everyMeshVertex=false, u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createAttractionAffector(const core::vector3df &point, f32 speed=1.0f, bool attract=true, bool affectX=true, bool affectY=true, bool affectZ=true)=0irr::scene::IParticleSystemSceneNode [pure virtual]
createBoxEmitter(const core::aabbox3df &box=core::aabbox3df(-10, 28,-10, 10, 30, 10), const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createCylinderEmitter(const core::vector3df &center, f32 radius, const core::vector3df &normal, f32 length, bool outlineOnly=false, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createFadeOutParticleAffector(const video::SColor &targetColor=video::SColor(0, 0, 0, 0), u32 timeNeededToFadeOut=1000)=0irr::scene::IParticleSystemSceneNode [pure virtual]
createGravityAffector(const core::vector3df &gravity=core::vector3df(0.0f,-0.03f, 0.0f), u32 timeForceLost=1000)=0irr::scene::IParticleSystemSceneNode [pure virtual]
createMeshEmitter(scene::IMesh *mesh, bool useNormalDirection=true, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), f32 normalDirectionModifier=100.0f, s32 mbNumber=-1, bool everyMeshVertex=false, u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createPointEmitter(const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createRingEmitter(const core::vector3df &center, f32 radius, f32 ringThickness, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createRotationAffector(const core::vector3df &speed=core::vector3df(5.0f, 5.0f, 5.0f), const core::vector3df &pivotPoint=core::vector3df(0.0f, 0.0f, 0.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createScaleParticleAffector(const core::dimension2df &scaleTo=core::dimension2df(1.0f, 1.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
createSphereEmitter(const core::vector3df &center, f32 radius, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
doParticleSystem(u32 time)=0irr::scene::IParticleSystemSceneNode [pure virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAffectors() const =0irr::scene::IParticleSystemSceneNode [pure virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getEmitter()=0irr::scene::IParticleSystemSceneNode [pure virtual]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IParticleSystemSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::IParticleSystemSceneNode [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAllAffectors()=0irr::scene::IParticleSystemSceneNode [pure virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEmitter(IParticleEmitter *emitter)=0irr::scene::IParticleSystemSceneNode [pure virtual]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setParticlesAreGlobal(bool global=true)=0irr::scene::IParticleSystemSceneNode [pure virtual]
setParticleSize(const core::dimension2d< f32 > &size=core::dimension2d< f32 >(5.0f, 5.0f))=0irr::scene::IParticleSystemSceneNode [pure virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.html new file mode 100644 index 0000000..8494184 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.html @@ -0,0 +1,1441 @@ + + + + +Irrlicht 3D Engine: irr::scene::IParticleSystemSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IParticleSystemSceneNode Class Reference
+
+
+ +

A particle system scene node for creating snow, fire, exlosions, smoke... + More...

+ +

#include <IParticleSystemSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IParticleSystemSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A particle system scene node for creating snow, fire, exlosions, smoke...

+

A scene node controlling a particle System. The behavior of the particles can be controlled by setting the right particle emitters and affectors. You can for example easily create a campfire by doing this:

+
    scene::IParticleSystemSceneNode* p = scenemgr->addParticleSystemSceneNode();
+    p->setParticleSize(core::dimension2d<f32>(20.0f, 10.0f));
+    scene::IParticleEmitter* em = p->createBoxEmitter(
+        core::aabbox3d<f32>(-5,0,-5,5,1,5),
+        core::vector3df(0.0f,0.03f,0.0f),
+        40,80, video::SColor(0,255,255,255),video::SColor(0,255,255,255), 1100,2000);
+    p->setEmitter(em);
+    em->drop();
+    scene::IParticleAffector* paf = p->createFadeOutParticleAffector();
+    p->addAffector(paf);
+    paf->drop();
+
+

Definition at line 46 of file IParticleSystemSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IParticleSystemSceneNode::IParticleSystemSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0),
const core::vector3dfrotation = core::vector3df(0,0,0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 51 of file IParticleSystemSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::addAffector (IParticleAffectoraffector) [pure virtual]
+
+
+ +

Adds new particle effector to the particle system.

+

A particle affector modifies the particles. For example, the FadeOut affector lets all particles fade out after some time. It is created and used in this way:

+
    IParticleAffector* p = createFadeOutParticleAffector();
+    addAffector(p);
+    p->drop();
+

Please note that an affector is not necessary for the particle system to work.

+
Parameters:
+ + +
affector,:New affector.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::clearParticles () [pure virtual]
+
+
+ +

Remove all currently visible particles.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleAnimatedMeshSceneNodeEmitter* irr::scene::IParticleSystemSceneNode::createAnimatedMeshSceneNodeEmitter (scene::IAnimatedMeshSceneNodenode,
bool useNormalDirection = true,
const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
f32 normalDirectionModifier = 100.0f,
s32 mbNumber = -1,
bool everyMeshVertex = false,
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a particle emitter for an animated mesh scene node.

+
Parameters:
+ + + + + + + + + + + + + + + + +
node,:Pointer to the animated mesh scene node to emit particles from
useNormalDirection,:If true, the direction of each particle created will be the normal of the vertex that it's emitting from. The normal is divided by the normalDirectionModifier parameter, which defaults to 100.0f.
direction,:Direction and speed of particle emission.
normalDirectionModifier,:If the emitter is using the normal direction then the normal of the vertex that is being emitted from is divided by this number.
mbNumber,:This allows you to specify a specific meshBuffer for the IMesh* to emit particles from. The default value is -1, which means a random meshBuffer picked from all of the meshes meshBuffers will be selected to pick a random vertex from. If the value is 0 or greater, it will only pick random vertices from the meshBuffer specified by this value.
everyMeshVertex,:If true, the emitter will emit between min/max particles every second, for every vertex in the mesh, if false, it will emit between min/max particles from random vertices in the mesh.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleAttractionAffector* irr::scene::IParticleSystemSceneNode::createAttractionAffector (const core::vector3dfpoint,
f32 speed = 1.0f,
bool attract = true,
bool affectX = true,
bool affectY = true,
bool affectZ = true 
) [pure virtual]
+
+
+ +

Creates a point attraction affector.

+

This affector modifies the positions of the particles and attracts them to a specified point at a specified speed per second.

+
Parameters:
+ + + + + + + +
point,:Point to attract particles to.
speed,:Speed in units per second, to attract to the specified point.
attract,:Whether the particles attract or detract from this point.
affectX,:Whether or not this will affect the X position of the particle.
affectY,:Whether or not this will affect the Y position of the particle.
affectZ,:Whether or not this will affect the Z position of the particle.
+
+
+
Returns:
Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleBoxEmitter* irr::scene::IParticleSystemSceneNode::createBoxEmitter (const core::aabbox3dfbox = core::aabbox3df(-10, 28,-10, 10, 30, 10),
const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a box particle emitter.

+
Parameters:
+ + + + + + + + + + + + +
box,:The box for the emitter.
direction,:Direction and speed of particle emission.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleCylinderEmitter* irr::scene::IParticleSystemSceneNode::createCylinderEmitter (const core::vector3dfcenter,
f32 radius,
const core::vector3dfnormal,
f32 length,
bool outlineOnly = false,
const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a particle emitter for emitting from a cylinder.

+
Parameters:
+ + + + + + + + + + + + + + + + +
center,:The center of the circle at the base of the cylinder
radius,:The thickness of the cylinder
normal,:Direction of the length of the cylinder
length,:The length of the the cylinder
outlineOnly,:Whether or not to put points inside the cylinder or on the outline only
direction,:Direction and speed of particle emission.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IParticleFadeOutAffector* irr::scene::IParticleSystemSceneNode::createFadeOutParticleAffector (const video::SColortargetColor = video::SColor(0, 0, 0, 0),
u32 timeNeededToFadeOut = 1000 
) [pure virtual]
+
+
+ +

Creates a fade out particle affector.

+

This affector modifies the color of every particle and and reaches the final color when the particle dies. This affector looks really good, if the EMT_TRANSPARENT_ADD_COLOR material is used and the targetColor is video::SColor(0,0,0,0): Particles are fading out into void with this setting.

+
Parameters:
+ + + +
targetColor,:Color whereto the color of the particle is changed.
timeNeededToFadeOut,:How much time in milli seconds should the affector need to change the color to the targetColor.
+
+
+
Returns:
Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IParticleGravityAffector* irr::scene::IParticleSystemSceneNode::createGravityAffector (const core::vector3dfgravity = core::vector3df(0.0f,-0.03f, 0.0f),
u32 timeForceLost = 1000 
) [pure virtual]
+
+
+ +

Creates a gravity affector.

+

This affector modifies the direction of the particle. It assumes that the particle is fired out of the emitter with huge force, but is loosing this after some time and is catched by the gravity then. This affector is ideal for creating things like fountains.

+
Parameters:
+ + + +
gravity,:Direction and force of gravity.
timeForceLost,:Time in milli seconds when the force of the emitter is totally lost and the particle does not move any more. This is the time where gravity fully affects the particle.
+
+
+
Returns:
Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleMeshEmitter* irr::scene::IParticleSystemSceneNode::createMeshEmitter (scene::IMeshmesh,
bool useNormalDirection = true,
const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
f32 normalDirectionModifier = 100.0f,
s32 mbNumber = -1,
bool everyMeshVertex = false,
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a mesh particle emitter.

+
Parameters:
+ + + + + + + + + + + + + + + + +
mesh,:Pointer to mesh to emit particles from
useNormalDirection,:If true, the direction of each particle created will be the normal of the vertex that it's emitting from. The normal is divided by the normalDirectionModifier parameter, which defaults to 100.0f.
direction,:Direction and speed of particle emission.
normalDirectionModifier,:If the emitter is using the normal direction then the normal of the vertex that is being emitted from is divided by this number.
mbNumber,:This allows you to specify a specific meshBuffer for the IMesh* to emit particles from. The default value is -1, which means a random meshBuffer picked from all of the meshes meshBuffers will be selected to pick a random vertex from. If the value is 0 or greater, it will only pick random vertices from the meshBuffer specified by this value.
everyMeshVertex,:If true, the emitter will emit between min/max particles every second, for every vertex in the mesh, if false, it will emit between min/max particles from random vertices in the mesh.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticlePointEmitter* irr::scene::IParticleSystemSceneNode::createPointEmitter (const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a point particle emitter.

+
Parameters:
+ + + + + + + + + + + +
direction,:Direction and speed of particle emission.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleRingEmitter* irr::scene::IParticleSystemSceneNode::createRingEmitter (const core::vector3dfcenter,
f32 radius,
f32 ringThickness,
const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a ring particle emitter.

+
Parameters:
+ + + + + + + + + + + + + + +
center,:Center of ring
radius,:Distance of points from center, points will be rotated around the Y axis at a random 360 degrees and will then be shifted by the provided ringThickness values in each axis.
ringThickness: thickness of the ring or how wide the ring is
direction,:Direction and speed of particle emission.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IParticleRotationAffector* irr::scene::IParticleSystemSceneNode::createRotationAffector (const core::vector3dfspeed = core::vector3df(5.0f, 5.0f, 5.0f),
const core::vector3dfpivotPoint = core::vector3df(0.0f, 0.0f, 0.0f) 
) [pure virtual]
+
+
+ +

Creates a rotation affector.

+

This affector modifies the positions of the particles and attracts them to a specified point at a specified speed per second.

+
Parameters:
+ + + +
speed,:Rotation in degrees per second
pivotPoint,:Point to rotate the particles around
+
+
+
Returns:
Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + +
virtual IParticleAffector* irr::scene::IParticleSystemSceneNode::createScaleParticleAffector (const core::dimension2dfscaleTo = core::dimension2df(1.0f, 1.0f)) [pure virtual]
+
+
+ +

Creates a scale particle affector.

+

This affector scales the particle to the a multiple of its size defined by the scaleTo variable.

+
Parameters:
+ + +
scaleTo,:multiple of the size which the particle will be scaled to until deletion
+
+
+
Returns:
Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleSphereEmitter* irr::scene::IParticleSystemSceneNode::createSphereEmitter (const core::vector3dfcenter,
f32 radius,
const core::vector3dfdirection = core::vector3df(0.0f, 0.03f, 0.0f),
u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
const video::SColorminStartColor = video::SColor(255, 0, 0, 0),
const video::SColormaxStartColor = video::SColor(255, 255, 255, 255),
u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
s32 maxAngleDegrees = 0,
const core::dimension2dfminStartSize = core::dimension2df(5.0f, 5.0f),
const core::dimension2dfmaxStartSize = core::dimension2df(5.0f, 5.0f) 
) [pure virtual]
+
+
+ +

Creates a sphere particle emitter.

+
Parameters:
+ + + + + + + + + + + + + +
center,:Center of sphere
radius,:Radius of sphere
direction,:Direction and speed of particle emission.
minParticlesPerSecond,:Minimal amount of particles emitted per second.
maxParticlesPerSecond,:Maximal amount of particles emitted per second.
minStartColor,:Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColor,:Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMin,:Minimal lifetime of a particle, in milliseconds.
lifeTimeMax,:Maximal lifetime of a particle, in milliseconds.
maxAngleDegrees,:Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSize,:Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSize,:Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
+
+
+
Returns:
Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::doParticleSystem (u32 time) [pure virtual]
+
+
+

Do manually update the particles. This should only be called when you want to render the node outside the scenegraph, as the node will care about this otherwise automatically.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::list<IParticleAffector*>& irr::scene::IParticleSystemSceneNode::getAffectors () const [pure virtual]
+
+
+ +

Get a list of all particle affectors.

+
Returns:
The list of particle affectors attached to this node.
+ +
+
+ +
+
+ + + + + + + +
virtual IParticleEmitter* irr::scene::IParticleSystemSceneNode::getEmitter () [pure virtual]
+
+
+ +

Gets the particle emitter, which creates the particles.

+
Returns:
The particle emitter. Can be 0 if none is set.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::removeAllAffectors () [pure virtual]
+
+
+ +

Removes all particle affectors in the particle system.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::setEmitter (IParticleEmitteremitter) [pure virtual]
+
+
+ +

Sets the particle emitter, which creates the particles.

+

A particle emitter can be created using one of the createEmitter methods. For example to create and use a simple PointEmitter, call IParticleEmitter* p = createPointEmitter(); setEmitter(p); p->drop();

+
Parameters:
+ + +
emitter,:Sets the particle emitter. You can set this to 0 for removing the current emitter and stopping the particle system emitting new particles.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::setParticlesAreGlobal (bool global = true) [pure virtual]
+
+
+ +

Sets if the particles should be global.

+

If they are, the particles are affected by the movement of the particle system scene node too, otherwise they completely ignore it. Default is true.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IParticleSystemSceneNode::setParticleSize (const core::dimension2d< f32 > & size = core::dimension2df32 >(5.0f, 5.0f)) [pure virtual]
+
+
+ +

Sets the size of all particles.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.png new file mode 100644 index 0000000..8c78b5d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_particle_system_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh-members.html new file mode 100644 index 0000000..c0517c4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh-members.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IQ3LevelMesh Member List
+
+
+This is the complete list of members for irr::scene::IQ3LevelMesh, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getAnimationSpeed() const =0irr::scene::IAnimatedMesh [pure virtual]
getBoundingBox() const =0irr::scene::IMesh [pure virtual]
getBrushEntityMesh(s32 num) const =0irr::scene::IQ3LevelMesh [pure virtual]
getBrushEntityMesh(quake3::IEntity &ent) const =0irr::scene::IQ3LevelMesh [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getEntityList()=0irr::scene::IQ3LevelMesh [pure virtual]
getFrameCount() const =0irr::scene::IAnimatedMesh [pure virtual]
getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)=0irr::scene::IAnimatedMesh [pure virtual]
getMeshBuffer(u32 nr) const =0irr::scene::IMesh [pure virtual]
getMeshBuffer(const video::SMaterial &material) const =0irr::scene::IMesh [pure virtual]
getMeshBufferCount() const =0irr::scene::IMesh [pure virtual]
getMeshType() const irr::scene::IAnimatedMesh [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getShader(const c8 *filename, bool fileNameIsValid=true)=0irr::scene::IQ3LevelMesh [pure virtual]
getShader(u32 index) const =0irr::scene::IQ3LevelMesh [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setAnimationSpeed(f32 fps)=0irr::scene::IAnimatedMesh [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMesh [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0irr::scene::IMesh [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.html new file mode 100644 index 0000000..4ecf467 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.html @@ -0,0 +1,280 @@ + + + + +Irrlicht 3D Engine: irr::scene::IQ3LevelMesh Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IQ3LevelMesh Class Reference
+
+
+ +

Interface for a Mesh which can be loaded directly from a Quake3 .bsp-file. + More...

+ +

#include <IQ3LevelMesh.h>

+
+ + Inheritance diagram for irr::scene::IQ3LevelMesh:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for a Mesh which can be loaded directly from a Quake3 .bsp-file.

+

The Mesh tries to load all textures of the map.

+ +

Definition at line 17 of file IQ3LevelMesh.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IQ3LevelMesh::getBrushEntityMesh (s32 num) const [pure virtual]
+
+
+ +

returns the requested brush entity

+
Parameters:
+ + +
numThe number from the model key of the entity.
+
+
+

Use this interface if you parse the entities yourself.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMesh* irr::scene::IQ3LevelMesh::getBrushEntityMesh (quake3::IEntityent) const [pure virtual]
+
+
+ +

returns the requested brush entity

+ +
+
+ +
+
+ + + + + + + +
virtual quake3::tQ3EntityList& irr::scene::IQ3LevelMesh::getEntityList () [pure virtual]
+
+
+ +

get's an interface to the entities

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual const quake3::IShader* irr::scene::IQ3LevelMesh::getShader (const c8filename,
bool fileNameIsValid = true 
) [pure virtual]
+
+
+ +

loads the shader definition from file

+
Parameters:
+ + + +
filenameName of the shaderfile, defaults to /scripts if fileNameIsValid is false.
fileNameIsValidSpecifies whether the filename is valid in the current situation.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const quake3::IShader* irr::scene::IQ3LevelMesh::getShader (u32 index) const [pure virtual]
+
+
+ +

returns a already loaded Shader

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.png new file mode 100644 index 0000000..ef57acb Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_q3_level_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager-members.html new file mode 100644 index 0000000..a51dbb5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager-members.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneCollisionManager Member List
+
+
+This is the complete list of members for irr::scene::ISceneCollisionManager, including all inherited members. + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getCollisionPoint(const core::line3d< f32 > &ray, ITriangleSelector *selector, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle, ISceneNode *&outNode)=0irr::scene::ISceneCollisionManager [pure virtual]
getCollisionResultPosition(ITriangleSelector *selector, const core::vector3df &ellipsoidPosition, const core::vector3df &ellipsoidRadius, const core::vector3df &ellipsoidDirectionAndSpeed, core::triangle3df &triout, core::vector3df &hitPosition, bool &outFalling, ISceneNode *&outNode, f32 slidingSpeed=0.0005f, const core::vector3df &gravityDirectionAndSpeed=core::vector3df(0.0f, 0.0f, 0.0f))=0irr::scene::ISceneCollisionManager [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getRayFromScreenCoordinates(const core::position2d< s32 > &pos, ICameraSceneNode *camera=0)=0irr::scene::ISceneCollisionManager [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSceneNodeAndCollisionPointFromRay(core::line3df ray, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle, s32 idBitMask=0, ISceneNode *collisionRootNode=0, bool noDebugObjects=false)=0irr::scene::ISceneCollisionManager [pure virtual]
getSceneNodeFromCameraBB(ICameraSceneNode *camera, s32 idBitMask=0, bool bNoDebugObjects=false)=0irr::scene::ISceneCollisionManager [pure virtual]
getSceneNodeFromRayBB(const core::line3d< f32 > &ray, s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode *root=0)=0irr::scene::ISceneCollisionManager [pure virtual]
getSceneNodeFromScreenCoordinatesBB(const core::position2d< s32 > &pos, s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode *root=0)=0irr::scene::ISceneCollisionManager [pure virtual]
getScreenCoordinatesFrom3DPosition(const core::vector3df &pos, ICameraSceneNode *camera=0, bool useViewPort=false)=0irr::scene::ISceneCollisionManager [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.html new file mode 100644 index 0000000..457c0f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.html @@ -0,0 +1,612 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneCollisionManager Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneCollisionManager Class Reference
+
+
+ +

The Scene Collision Manager provides methods for performing collision tests and picking on scene nodes. + More...

+ +

#include <ISceneCollisionManager.h>

+
+ + Inheritance diagram for irr::scene::ISceneCollisionManager:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

The Scene Collision Manager provides methods for performing collision tests and picking on scene nodes.

+ +

Definition at line 24 of file ISceneCollisionManager.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneCollisionManager::getCollisionPoint (const core::line3d< f32 > & ray,
ITriangleSelectorselector,
core::vector3dfoutCollisionPoint,
core::triangle3dfoutTriangle,
ISceneNode *& outNode 
) [pure virtual]
+
+
+ +

Finds the nearest collision point of a line and lots of triangles, if there is one.

+
Parameters:
+ + + + + + +
ray,:Line with which collisions are tested.
selector,:TriangleSelector containing the triangles. It can be created for example using ISceneManager::createTriangleSelector() or ISceneManager::createTriangleOctreeSelector().
outCollisionPoint,:If a collision is detected, this will contain the position of the nearest collision to the line-start.
outTriangle,:If a collision is detected, this will contain the triangle with which the ray collided.
outNode,:If a collision is detected, this will contain the scene node associated with the triangle that was hit.
+
+
+
Returns:
True if a collision was detected and false if not.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual core::vector3df irr::scene::ISceneCollisionManager::getCollisionResultPosition (ITriangleSelectorselector,
const core::vector3dfellipsoidPosition,
const core::vector3dfellipsoidRadius,
const core::vector3dfellipsoidDirectionAndSpeed,
core::triangle3dftriout,
core::vector3dfhitPosition,
bool & outFalling,
ISceneNode *& outNode,
f32 slidingSpeed = 0.0005f,
const core::vector3dfgravityDirectionAndSpeed = core::vector3df(0.0f, 0.0f, 0.0f) 
) [pure virtual]
+
+
+ +

Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid.

+

This can be used for moving a character in a 3d world: The character will slide at walls and is able to walk up stairs. The method used how to calculate the collision result position is based on the paper "Improved Collision detection and + Response" by Kasper Fauerby.

+
Parameters:
+ + + + + + + + + + + +
selector,:TriangleSelector containing the triangles of the world. It can be created for example using ISceneManager::createTriangleSelector() or ISceneManager::createTriangleOctreeSelector().
ellipsoidPosition,:Position of the ellipsoid.
ellipsoidRadius,:Radius of the ellipsoid.
ellipsoidDirectionAndSpeed,:Direction and speed of the movement of the ellipsoid.
triout,:Optional parameter where the last triangle causing a collision is stored, if there is a collision.
hitPosition,:Return value for the position of the collision
outFalling,:Is set to true if the ellipsoid is falling down, caused by gravity.
outNode,:the node with which the ellipoid collided (if any)
slidingSpeed,:DOCUMENTATION NEEDED.
gravityDirectionAndSpeed,:Direction and force of gravity.
+
+
+
Returns:
New position of the ellipsoid.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual core::line3d<f32> irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates (const core::position2d< s32 > & pos,
ICameraSceneNodecamera = 0 
) [pure virtual]
+
+
+ +

Returns a 3d ray which would go through the 2d screen coodinates.

+
Parameters:
+ + + +
pos,:Screen coordinates in pixels.
camera,:Camera from which the ray starts. If null, the active camera is used.
+
+
+
Returns:
Ray starting from the position of the camera and ending at a length of the far value of the camera at a position which would be behind the 2d screen coodinates.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeAndCollisionPointFromRay (core::line3df ray,
core::vector3dfoutCollisionPoint,
core::triangle3dfoutTriangle,
s32 idBitMask = 0,
ISceneNodecollisionRootNode = 0,
bool noDebugObjects = false 
) [pure virtual]
+
+
+ +

Perform a ray/box and ray/triangle collision check on a heirarchy of scene nodes.

+

This checks all scene nodes under the specified one, first by ray/bounding box, and then by accurate ray/triangle collision, finding the nearest collision, and the scene node containg it. It returns the node hit, and (via output parameters) the position of the collision, and the triangle that was hit.

+

All scene nodes in the hierarchy tree under the specified node are checked. Only nodes that are visible, with an ID that matches at least one bit in the supplied bitmask, and which have a triangle selector are considered as candidates for being hit. You do not have to build a meta triangle selector; the individual triangle selectors of each candidate scene node are used automatically.

+
Parameters:
+ + + + + + + +
ray,:Line with which collisions are tested.
outCollisionPoint,:If a collision is detected, this will contain the position of the nearest collision.
outTriangle,:If a collision is detected, this will contain the triangle with which the ray collided.
idBitMask,:Only scene nodes with an id which matches at least one of the bits contained in this mask will be tested. However, if this parameter is 0, then all nodes are checked.
collisionRootNode,:the scene node at which to begin checking. Only this node and its children will be checked. If you want to check the entire scene, pass 0, and the root scene node will be used (this is the default).
noDebugObjects,:when true, debug objects are not considered viable targets. Debug objects are scene nodes with IsDebugObject() = true.
+
+
+
Returns:
Returns the scene node containing the hit triangle nearest to ray.start. If no collision is detected, then 0 is returned.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromCameraBB (ICameraSceneNodecamera,
s32 idBitMask = 0,
bool bNoDebugObjects = false 
) [pure virtual]
+
+
+ +

Get the scene node, which the given camera is looking at and whose id matches the bitmask.

+

A ray is simply casted from the position of the camera to the view target position, and all scene nodes are tested against this ray. The collision tests are done using a bounding box for each scene node.

+
Parameters:
+ + + + +
camera,:Camera from which the ray is casted.
idBitMask,:Only scene nodes with an id which matches at least one of the bits contained in this mask will be tested. However, if this parameter is 0, then all nodes are checked. feature is disabled. Please note that the default node id of -1 will match with every bitmask != 0
bNoDebugObjects,:Doesn't take debug objects into account when true. These are scene nodes with IsDebugObject() = true.
+
+
+
Returns:
Scene node nearest to the camera, which collides with the ray and matches the idBitMask, if the mask is not null. If no scene node is found, 0 is returned.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromRayBB (const core::line3d< f32 > & ray,
s32 idBitMask = 0,
bool bNoDebugObjects = false,
ISceneNoderoot = 0 
) [pure virtual]
+
+
+ +

Returns the nearest scene node which collides with a 3d ray and whose id matches a bitmask.

+

The collision tests are done using a bounding box for each scene node. The recursive search can be limited be specifying a scene node.

+
Parameters:
+ + + + + +
rayLine with which collisions are tested.
idBitMaskOnly scene nodes with an id which matches at least one of the bits contained in this mask will be tested. However, if this parameter is 0, then all nodes are checked.
bNoDebugObjects,:Doesn't take debug objects into account when true. These are scene nodes with IsDebugObject() = true.
rootIf different from 0, the search is limited to the children of this node.
+
+
+
Returns:
Scene node nearest to ray.start, which collides with the ray and matches the idBitMask, if the mask is not null. If no scene node is found, 0 is returned.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB (const core::position2d< s32 > & pos,
s32 idBitMask = 0,
bool bNoDebugObjects = false,
ISceneNoderoot = 0 
) [pure virtual]
+
+
+ +

Gets the scene node, which is currently visible under the given screencoordinates, viewed from the currently active camera.

+

The collision tests are done using a bounding box for each scene node. You can limit the recursive search so just all children of the specified root are tested.

+
Parameters:
+ + + + + +
pos,:Position in pixel screen coordinates, under which the returned scene node will be.
idBitMask,:Only scene nodes with an id with bits set like in this mask will be tested. If the BitMask is 0, this feature is disabled. Please note that the default node id of -1 will match with every bitmask != 0
bNoDebugObjects,:Doesn't take debug objects into account when true. These are scene nodes with IsDebugObject() = true.
rootIf different from 0, the search is limited to the children of this node.
+
+
+
Returns:
Visible scene node under screen coordinates with matching bits in its id. If there is no scene node under this position, 0 is returned.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual core::position2d<s32> irr::scene::ISceneCollisionManager::getScreenCoordinatesFrom3DPosition (const core::vector3dfpos,
ICameraSceneNodecamera = 0,
bool useViewPort = false 
) [pure virtual]
+
+
+ +

Calculates 2d screen position from a 3d position.

+
Parameters:
+ + + + +
pos,:3D position in world space to be transformed into 2d.
camera,:Camera to be used. If null, the currently active camera is used.
useViewPort,:Calculate screen coordinates relative to the current view port. Please note that unless the driver does not take care of the view port, it is usually best to get the result in absolute screen coordinates (flag=false).
+
+
+
Returns:
2d screen coordinates which a object in the 3d world would have if it would be rendered to the screen. If the 3d position is behind the camera, it is set to (-1000,-1000). In most cases you can ignore this fact, because if you use this method for drawing a decorator over a 3d object, it will be clipped by the screen borders.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.png new file mode 100644 index 0000000..02d1230 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_collision_manager.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader-members.html new file mode 100644 index 0000000..f4d7174 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneLoader Member List
+
+
+This is the complete list of members for irr::scene::ISceneLoader, including all inherited members. + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isALoadableFileExtension(const io::path &filename) const =0irr::scene::ISceneLoader [pure virtual]
isALoadableFileFormat(io::IReadFile *file) const =0irr::scene::ISceneLoader [pure virtual]
loadScene(io::IReadFile *file, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *rootNode=0)=0irr::scene::ISceneLoader [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.html new file mode 100644 index 0000000..00b6b26 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.html @@ -0,0 +1,256 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneLoader Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneLoader Class Reference
+
+
+ +

Class which can load a scene into the scene manager. + More...

+ +

#include <ISceneLoader.h>

+
+ + Inheritance diagram for irr::scene::ISceneLoader:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Class which can load a scene into the scene manager.

+

If you want Irrlicht to be able to load currently unsupported scene file formats (e.g. .vrml), then implement this and add your new Sceneloader to the engine with ISceneManager::addExternalSceneLoader().

+ +

Definition at line 26 of file ISceneLoader.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneLoader::isALoadableFileExtension (const io::pathfilename) const [pure virtual]
+
+
+ +

Returns true if the class might be able to load this file.

+

This decision should be based on the file extension (e.g. ".vrml") only.

+
Parameters:
+ + +
filenameName of the file to test.
+
+
+
Returns:
True if the extension is a recognised type.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneLoader::isALoadableFileFormat (io::IReadFilefile) const [pure virtual]
+
+
+ +

Returns true if the class might be able to load this file.

+

This decision will be based on a quick look at the contents of the file.

+
Parameters:
+ + +
fileThe file to test.
+
+
+
Returns:
True if the extension is a recognised type.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneLoader::loadScene (io::IReadFilefile,
ISceneUserDataSerializeruserDataSerializer = 0,
ISceneNoderootNode = 0 
) [pure virtual]
+
+
+ +

Loads the scene into the scene manager.

+
Parameters:
+ + + + +
fileFile which contains the scene.
userDataSerializer,:If you want to load user data which may be attached to some some scene nodes in the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter.
rootNodeThe node to load the scene into, if none is provided then the scene will be loaded into the root node.
+
+
+
Returns:
Returns true on success, false on failure. Returns 0 if loading failed.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.png new file mode 100644 index 0000000..936480e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_loader.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager-members.html new file mode 100644 index 0000000..039a202 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager-members.html @@ -0,0 +1,226 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneManager Member List
+
+
+This is the complete list of members for irr::scene::ISceneManager, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addAnimatedMeshSceneNode(IAnimatedMesh *mesh, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f), bool alsoAddIfMeshPointerZero=false)=0irr::scene::ISceneManager [pure virtual]
addArrowMesh(const io::path &name, video::SColor vtxColorCylinder=0xFFFFFFFF, video::SColor vtxColorCone=0xFFFFFFFF, u32 tesselationCylinder=4, u32 tesselationCone=8, f32 height=1.f, f32 cylinderHeight=0.6f, f32 widthCylinder=0.05f, f32 widthCone=0.3f)=0irr::scene::ISceneManager [pure virtual]
addBillboardSceneNode(ISceneNode *parent=0, const core::dimension2d< f32 > &size=core::dimension2d< f32 >(10.0f, 10.0f), const core::vector3df &position=core::vector3df(0, 0, 0), s32 id=-1, video::SColor colorTop=0xFFFFFFFF, video::SColor colorBottom=0xFFFFFFFF)=0irr::scene::ISceneManager [pure virtual]
addBillboardTextSceneNode(gui::IGUIFont *font, const wchar_t *text, ISceneNode *parent=0, const core::dimension2d< f32 > &size=core::dimension2d< f32 >(10.0f, 10.0f), const core::vector3df &position=core::vector3df(0, 0, 0), s32 id=-1, video::SColor colorTop=0xFFFFFFFF, video::SColor colorBottom=0xFFFFFFFF)=0irr::scene::ISceneManager [pure virtual]
addCameraSceneNode(ISceneNode *parent=0, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &lookat=core::vector3df(0, 0, 100), s32 id=-1, bool makeActive=true)=0irr::scene::ISceneManager [pure virtual]
addCameraSceneNodeFPS(ISceneNode *parent=0, f32 rotateSpeed=100.0f, f32 moveSpeed=0.5f, s32 id=-1, SKeyMap *keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, f32 jumpSpeed=0.f, bool invertMouse=false, bool makeActive=true)=0irr::scene::ISceneManager [pure virtual]
addCameraSceneNodeMaya(ISceneNode *parent=0, f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f, f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f, bool makeActive=true)=0irr::scene::ISceneManager [pure virtual]
addCubeSceneNode(f32 size=10.0f, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))=0irr::scene::ISceneManager [pure virtual]
addDummyTransformationSceneNode(ISceneNode *parent=0, s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addEmptySceneNode(ISceneNode *parent=0, s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addExternalMeshLoader(IMeshLoader *externalLoader)=0irr::scene::ISceneManager [pure virtual]
addExternalSceneLoader(ISceneLoader *externalLoader)=0irr::scene::ISceneManager [pure virtual]
addHillPlaneMesh(const io::path &name, const core::dimension2d< f32 > &tileSize, const core::dimension2d< u32 > &tileCount, video::SMaterial *material=0, f32 hillHeight=0.0f, const core::dimension2d< f32 > &countHills=core::dimension2d< f32 >(0.0f, 0.0f), const core::dimension2d< f32 > &textureRepeatCount=core::dimension2d< f32 >(1.0f, 1.0f))=0irr::scene::ISceneManager [pure virtual]
addLightSceneNode(ISceneNode *parent=0, const core::vector3df &position=core::vector3df(0, 0, 0), video::SColorf color=video::SColorf(1.0f, 1.0f, 1.0f), f32 radius=100.0f, s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addMeshSceneNode(IMesh *mesh, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f), bool alsoAddIfMeshPointerZero=false)=0irr::scene::ISceneManager [pure virtual]
addOctreeSceneNode(IAnimatedMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false)=0irr::scene::ISceneManager [pure virtual]
addOctreeSceneNode(IMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false)=0irr::scene::ISceneManager [pure virtual]
addOctTreeSceneNode(IAnimatedMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false)irr::scene::ISceneManager [inline]
addOctTreeSceneNode(IMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false)irr::scene::ISceneManager [inline]
addParticleSystemSceneNode(bool withDefaultEmitter=true, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))=0irr::scene::ISceneManager [pure virtual]
addQuake3SceneNode(const IMeshBuffer *meshBuffer, const quake3::IShader *shader, ISceneNode *parent=0, s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addSceneNode(const char *sceneNodeTypeName, ISceneNode *parent=0)=0irr::scene::ISceneManager [pure virtual]
addSkyBoxSceneNode(video::ITexture *top, video::ITexture *bottom, video::ITexture *left, video::ITexture *right, video::ITexture *front, video::ITexture *back, ISceneNode *parent=0, s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addSkyDomeSceneNode(video::ITexture *texture, u32 horiRes=16, u32 vertRes=8, f32 texturePercentage=0.9, f32 spherePercentage=2.0, f32 radius=1000.f, ISceneNode *parent=0, s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addSphereMesh(const io::path &name, f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16)=0irr::scene::ISceneManager [pure virtual]
addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))=0irr::scene::ISceneManager [pure virtual]
addTerrainMesh(const io::path &meshname, video::IImage *texture, video::IImage *heightmap, const core::dimension2d< f32 > &stretchSize=core::dimension2d< f32 >(10.0f, 10.0f), f32 maxHeight=200.0f, const core::dimension2d< u32 > &defaultVertexBlockSize=core::dimension2d< u32 >(64, 64))=0irr::scene::ISceneManager [pure virtual]
addTerrainSceneNode(const io::path &heightMapFileName, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &rotation=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f), video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, bool addAlsoIfHeightmapEmpty=false)=0irr::scene::ISceneManager [pure virtual]
addTerrainSceneNode(io::IReadFile *heightMapFile, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &rotation=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f), video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, bool addAlsoIfHeightmapEmpty=false)=0irr::scene::ISceneManager [pure virtual]
addTextSceneNode(gui::IGUIFont *font, const wchar_t *text, video::SColor color=video::SColor(100, 255, 255, 255), ISceneNode *parent=0, const core::vector3df &position=core::vector3df(0, 0, 0), s32 id=-1)=0irr::scene::ISceneManager [pure virtual]
addToDeletionQueue(ISceneNode *node)=0irr::scene::ISceneManager [pure virtual]
addVolumeLightMesh(const io::path &name, const u32 SubdivideU=32, const u32 SubdivideV=32, const video::SColor FootColor=video::SColor(51, 0, 230, 180), const video::SColor TailColor=video::SColor(0, 0, 0, 0))=0irr::scene::ISceneManager [pure virtual]
addVolumeLightSceneNode(ISceneNode *parent=0, s32 id=-1, const u32 subdivU=32, const u32 subdivV=32, const video::SColor foot=video::SColor(51, 0, 230, 180), const video::SColor tail=video::SColor(0, 0, 0, 0), const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))=0irr::scene::ISceneManager [pure virtual]
addWaterSurfaceSceneNode(IMesh *mesh, f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))=0irr::scene::ISceneManager [pure virtual]
clear()=0irr::scene::ISceneManager [pure virtual]
createCollisionResponseAnimator(ITriangleSelector *world, ISceneNode *sceneNode, const core::vector3df &ellipsoidRadius=core::vector3df(30, 60, 30), const core::vector3df &gravityPerSecond=core::vector3df(0,-10.0f, 0), const core::vector3df &ellipsoidTranslation=core::vector3df(0, 0, 0), f32 slidingValue=0.0005f)=0irr::scene::ISceneManager [pure virtual]
createDeleteAnimator(u32 timeMs)=0irr::scene::ISceneManager [pure virtual]
createFlyCircleAnimator(const core::vector3df &center=core::vector3df(0.f, 0.f, 0.f), f32 radius=100.f, f32 speed=0.001f, const core::vector3df &direction=core::vector3df(0.f, 1.f, 0.f), f32 startPosition=0.f, f32 radiusEllipsoid=0.f)=0irr::scene::ISceneManager [pure virtual]
createFlyStraightAnimator(const core::vector3df &startPoint, const core::vector3df &endPoint, u32 timeForWay, bool loop=false, bool pingpong=false)=0irr::scene::ISceneManager [pure virtual]
createFollowSplineAnimator(s32 startTime, const core::array< core::vector3df > &points, f32 speed=1.0f, f32 tightness=0.5f, bool loop=true, bool pingpong=false)=0irr::scene::ISceneManager [pure virtual]
createMeshWriter(EMESH_WRITER_TYPE type)=0irr::scene::ISceneManager [pure virtual]
createMetaTriangleSelector()=0irr::scene::ISceneManager [pure virtual]
createNewSceneManager(bool cloneContent=false)=0irr::scene::ISceneManager [pure virtual]
createOctreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)=0irr::scene::ISceneManager [pure virtual]
createOctTreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)irr::scene::ISceneManager [inline]
createRotationAnimator(const core::vector3df &rotationSpeed)=0irr::scene::ISceneManager [pure virtual]
createSceneNodeAnimator(const char *typeName, ISceneNode *target=0)=0irr::scene::ISceneManager [pure virtual]
createSkinnedMesh()=0irr::scene::ISceneManager [pure virtual]
createTerrainTriangleSelector(ITerrainSceneNode *node, s32 LOD=0)=0irr::scene::ISceneManager [pure virtual]
createTextureAnimator(const core::array< video::ITexture * > &textures, s32 timePerFrame, bool loop=true)=0irr::scene::ISceneManager [pure virtual]
createTriangleSelector(IMesh *mesh, ISceneNode *node)=0irr::scene::ISceneManager [pure virtual]
createTriangleSelector(IAnimatedMeshSceneNode *node)=0irr::scene::ISceneManager [pure virtual]
createTriangleSelectorFromBoundingBox(ISceneNode *node)=0irr::scene::ISceneManager [pure virtual]
drawAll()=0irr::scene::ISceneManager [pure virtual]
drop() const irr::IReferenceCounted [inline]
getActiveCamera() const =0irr::scene::ISceneManager [pure virtual]
getAmbientLight() const =0irr::scene::ISceneManager [pure virtual]
getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type)=0irr::scene::ISceneManager [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDefaultSceneNodeAnimatorFactory()=0irr::scene::ISceneManager [pure virtual]
getDefaultSceneNodeFactory()=0irr::scene::ISceneManager [pure virtual]
getFileSystem()=0irr::scene::ISceneManager [pure virtual]
getGeometryCreator(void) const =0irr::scene::ISceneManager [pure virtual]
getGUIEnvironment()=0irr::scene::ISceneManager [pure virtual]
getMesh(const io::path &filename)=0irr::scene::ISceneManager [pure virtual]
getMesh(io::IReadFile *file)=0irr::scene::ISceneManager [pure virtual]
getMeshCache()=0irr::scene::ISceneManager [pure virtual]
getMeshLoader(u32 index) const =0irr::scene::ISceneManager [pure virtual]
getMeshLoaderCount() const =0irr::scene::ISceneManager [pure virtual]
getMeshManipulator()=0irr::scene::ISceneManager [pure virtual]
getParameters()=0irr::scene::ISceneManager [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRegisteredSceneNodeAnimatorFactoryCount() const =0irr::scene::ISceneManager [pure virtual]
getRegisteredSceneNodeFactoryCount() const =0irr::scene::ISceneManager [pure virtual]
getRootSceneNode()=0irr::scene::ISceneManager [pure virtual]
getSceneCollisionManager()=0irr::scene::ISceneManager [pure virtual]
getSceneLoader(u32 index) const =0irr::scene::ISceneManager [pure virtual]
getSceneLoaderCount() const =0irr::scene::ISceneManager [pure virtual]
getSceneNodeAnimatorFactory(u32 index)=0irr::scene::ISceneManager [pure virtual]
getSceneNodeFactory(u32 index)=0irr::scene::ISceneManager [pure virtual]
getSceneNodeFromId(s32 id, ISceneNode *start=0)=0irr::scene::ISceneManager [pure virtual]
getSceneNodeFromName(const c8 *name, ISceneNode *start=0)=0irr::scene::ISceneManager [pure virtual]
getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode *start=0)=0irr::scene::ISceneManager [pure virtual]
getSceneNodeRenderPass() const =0irr::scene::ISceneManager [pure virtual]
getSceneNodesFromType(ESCENE_NODE_TYPE type, core::array< scene::ISceneNode * > &outNodes, ISceneNode *start=0)=0irr::scene::ISceneManager [pure virtual]
getSceneNodeTypeName(ESCENE_NODE_TYPE type)=0irr::scene::ISceneManager [pure virtual]
getShadowColor() const =0irr::scene::ISceneManager [pure virtual]
getVideoDriver()=0irr::scene::ISceneManager [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isCulled(const ISceneNode *node) const =0irr::scene::ISceneManager [pure virtual]
loadScene(const io::path &filename, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *rootNode=0)=0irr::scene::ISceneManager [pure virtual]
loadScene(io::IReadFile *file, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *rootNode=0)=0irr::scene::ISceneManager [pure virtual]
postEventFromUser(const SEvent &event)=0irr::scene::ISceneManager [pure virtual]
registerNodeForRendering(ISceneNode *node, E_SCENE_NODE_RENDER_PASS pass=ESNRP_AUTOMATIC)=0irr::scene::ISceneManager [pure virtual]
registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory *factoryToAdd)=0irr::scene::ISceneManager [pure virtual]
registerSceneNodeFactory(ISceneNodeFactory *factoryToAdd)=0irr::scene::ISceneManager [pure virtual]
saveScene(const io::path &filename, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0irr::scene::ISceneManager [pure virtual]
saveScene(io::IWriteFile *file, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0irr::scene::ISceneManager [pure virtual]
saveScene(io::IXMLWriter *writer, const io::path &currentPath, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0irr::scene::ISceneManager [pure virtual]
setActiveCamera(ICameraSceneNode *camera)=0irr::scene::ISceneManager [pure virtual]
setAmbientLight(const video::SColorf &ambientColor)=0irr::scene::ISceneManager [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setLightManager(ILightManager *lightManager)=0irr::scene::ISceneManager [pure virtual]
setShadowColor(video::SColor color=video::SColor(150, 0, 0, 0))=0irr::scene::ISceneManager [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.html new file mode 100644 index 0000000..4375571 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.html @@ -0,0 +1,4324 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneManager Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneManager Class Reference
+
+
+ +

The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff. + More...

+ +

#include <ISceneManager.h>

+
+ + Inheritance diagram for irr::scene::ISceneManager:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.

+

All Scene nodes can be created only here. There is a always growing list of scene nodes for lots of purposes: Indoor rendering scene nodes like the Octree (addOctreeSceneNode()) or the terrain renderer (addTerrainSceneNode()), different Camera scene nodes (addCameraSceneNode(), addCameraSceneNodeMaya()), scene nodes for Light (addLightSceneNode()), Billboards (addBillboardSceneNode()) and so on. A scene node is a node in the hierachical scene graph. Every scene node may have children, which are other scene nodes. Children move relative the their parents position. If the parent of a node is not visible, its children won't be visible, too. In this way, it is for example easily possible to attach a light to a moving car or to place a walking character on a moving platform on a moving ship. The SceneManager is also able to load 3d mesh files of different formats. Take a look at getMesh() to find out what formats are supported. If these formats are not enough, use addExternalMeshLoader() to add new formats to the engine.

+ +

Definition at line 150 of file ISceneManager.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IAnimatedMeshSceneNode* irr::scene::ISceneManager::addAnimatedMeshSceneNode (IAnimatedMeshmesh,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f),
bool alsoAddIfMeshPointerZero = false 
) [pure virtual]
+
+
+ +

Adds a scene node for rendering an animated mesh model.

+
Parameters:
+ + + + + + + + +
mesh,:Pointer to the loaded animated mesh to be displayed.
parent,:Parent of the scene node. Can be NULL if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:Position of the space relative to its parent where the scene node will be placed.
rotation,:Initital rotation of the scene node.
scale,:Initial scale of the scene node.
alsoAddIfMeshPointerZero,:Add the scene node even if a 0 pointer is passed.
+
+
+
Returns:
Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::addArrowMesh (const io::pathname,
video::SColor vtxColorCylinder = 0xFFFFFFFF,
video::SColor vtxColorCone = 0xFFFFFFFF,
u32 tesselationCylinder = 4,
u32 tesselationCone = 8,
f32 height = 1.f,
f32 cylinderHeight = 0.6f,
f32 widthCylinder = 0.05f,
f32 widthCone = 0.3f 
) [pure virtual]
+
+
+ +

add a static arrow mesh to the meshpool

+
Parameters:
+ + + + + + + + + + +
nameName of the mesh
vtxColorCylindercolor of the cylinder
vtxColorConecolor of the cone
tesselationCylinderNumber of quads the cylinder side consists of
tesselationConeNumber of triangles the cone's roof consits of
heightTotal height of the arrow
cylinderHeightTotal height of the cylinder, should be lesser than total height
widthCylinderDiameter of the cylinder
widthConeDiameter of the cone's base, should be not smaller than the cylinder's diameter
+
+
+
Returns:
Pointer to the arrow mesh if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IBillboardSceneNode* irr::scene::ISceneManager::addBillboardSceneNode (ISceneNodeparent = 0,
const core::dimension2d< f32 > & size = core::dimension2df32 >(10.0f, 10.0f),
const core::vector3dfposition = core::vector3df(0, 0, 0),
s32 id = -1,
video::SColor colorTop = 0xFFFFFFFF,
video::SColor colorBottom = 0xFFFFFFFF 
) [pure virtual]
+
+
+ +

Adds a billboard scene node to the scene graph.

+

A billboard is like a 3d sprite: A 2d element, which always looks to the camera. It is usually used for things like explosions, fire, lensflares and things like that.

+
Parameters:
+ + + + + + + +
parentParent scene node of the billboard. Can be null. If the parent moves, the billboard will move too.
sizeSize of the billboard. This size is 2 dimensional because a billboard only has width and height.
positionPosition of the space relative to its parent where the billboard will be placed.
idAn id of the node. This id can be used to identify the node.
colorTopThe color of the vertices at the top of the billboard (default: white).
colorBottomThe color of the vertices at the bottom of the billboard (default: white).
+
+
+
Returns:
Pointer to the billboard if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IBillboardTextSceneNode* irr::scene::ISceneManager::addBillboardTextSceneNode (gui::IGUIFontfont,
const wchar_t * text,
ISceneNodeparent = 0,
const core::dimension2d< f32 > & size = core::dimension2df32 >(10.0f, 10.0f),
const core::vector3dfposition = core::vector3df(0, 0, 0),
s32 id = -1,
video::SColor colorTop = 0xFFFFFFFF,
video::SColor colorBottom = 0xFFFFFFFF 
) [pure virtual]
+
+
+ +

Adds a text scene node, which uses billboards. The node, and the text on it, will scale with distance.

+
Parameters:
+ + + + + + + + + +
fontThe font to use on the billboard. Pass 0 to use the GUI environment's default font.
textThe text to display on the billboard.
parentThe billboard's parent. Pass 0 to use the root scene node.
sizeThe billboard's width and height.
positionThe billboards position relative to its parent.
id,:An id of the node. This id can be used to identify the node.
colorTop,:The color of the vertices at the top of the billboard (default: white).
colorBottom,:The color of the vertices at the bottom of the billboard (default: white).
+
+
+
Returns:
Pointer to the billboard if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ICameraSceneNode* irr::scene::ISceneManager::addCameraSceneNode (ISceneNodeparent = 0,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dflookat = core::vector3df(0, 0, 100),
s32 id = -1,
bool makeActive = true 
) [pure virtual]
+
+
+ +

Adds a camera scene node to the scene graph and sets it as active camera.

+

This camera does not react on user input like for example the one created with addCameraSceneNodeFPS(). If you want to move or animate it, use animators or the ISceneNode::setPosition(), ICameraSceneNode::setTarget() etc methods. By default, a camera's look at position (set with setTarget()) and its scene node rotation (set with setRotation()) are independent. If you want to be able to control the direction that the camera looks by using setRotation() then call ICameraSceneNode::bindTargetAndRotation(true) on it.

+
Parameters:
+ + + + + + +
position,:Position of the space relative to its parent where the camera will be placed.
lookat,:Position where the camera will look at. Also known as target.
parent,:Parent scene node of the camera. Can be null. If the parent moves, the camera will move too.
id,:id of the camera. This id can be used to identify the camera.
makeActiveFlag whether this camera should become the active one. Make sure you always have one active camera.
+
+
+
Returns:
Pointer to interface to camera if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ICameraSceneNode* irr::scene::ISceneManager::addCameraSceneNodeFPS (ISceneNodeparent = 0,
f32 rotateSpeed = 100.0f,
f32 moveSpeed = 0.5f,
s32 id = -1,
SKeyMapkeyMapArray = 0,
s32 keyMapSize = 0,
bool noVerticalMovement = false,
f32 jumpSpeed = 0.f,
bool invertMouse = false,
bool makeActive = true 
) [pure virtual]
+
+
+ +

Adds a camera scene node with an animator which provides mouse and keyboard control appropriate for first person shooters (FPS).

+

This FPS camera is intended to provide a demonstration of a camera that behaves like a typical First Person Shooter. It is useful for simple demos and prototyping but is not intended to provide a full solution for a production quality game. It binds the camera scene node rotation to the look-at target;

+
See also:
ICameraSceneNode::bindTargetAndRotation(). With this camera, you look with the mouse, and move with cursor keys. If you want to change the key layout, you can specify your own keymap. For example to make the camera be controlled by the cursor keys AND the keys W,A,S, and D, do something like this:
         SKeyMap keyMap[8];
+         keyMap[0].Action = EKA_MOVE_FORWARD;
+         keyMap[0].KeyCode = KEY_UP;
+         keyMap[1].Action = EKA_MOVE_FORWARD;
+         keyMap[1].KeyCode = KEY_KEY_W;
+
+         keyMap[2].Action = EKA_MOVE_BACKWARD;
+         keyMap[2].KeyCode = KEY_DOWN;
+         keyMap[3].Action = EKA_MOVE_BACKWARD;
+         keyMap[3].KeyCode = KEY_KEY_S;
+
+         keyMap[4].Action = EKA_STRAFE_LEFT;
+         keyMap[4].KeyCode = KEY_LEFT;
+         keyMap[5].Action = EKA_STRAFE_LEFT;
+         keyMap[5].KeyCode = KEY_KEY_A;
+
+         keyMap[6].Action = EKA_STRAFE_RIGHT;
+         keyMap[6].KeyCode = KEY_RIGHT;
+         keyMap[7].Action = EKA_STRAFE_RIGHT;
+         keyMap[7].KeyCode = KEY_KEY_D;
+
+        camera = sceneManager->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8);
+
+
Parameters:
+ + + + + + + + + + + +
parent,:Parent scene node of the camera. Can be null.
rotateSpeed,:Speed in degress with which the camera is rotated. This can be done only with the mouse.
moveSpeed,:Speed in units per millisecond with which the camera is moved. Movement is done with the cursor keys.
id,:id of the camera. This id can be used to identify the camera.
keyMapArray,:Optional pointer to an array of a keymap, specifying what keys should be used to move the camera. If this is null, the default keymap is used. You can define actions more then one time in the array, to bind multiple keys to the same action.
keyMapSize,:Amount of items in the keymap array.
noVerticalMovement,:Setting this to true makes the camera only move within a horizontal plane, and disables vertical movement as known from most ego shooters. Default is 'false', with which it is possible to fly around in space, if no gravity is there.
jumpSpeed,:Speed with which the camera is moved when jumping.
invertMouse,:Setting this to true makes the camera look up when the mouse is moved down and down when the mouse is moved up, the default is 'false' which means it will follow the movement of the mouse cursor.
makeActiveFlag whether this camera should become the active one. Make sure you always have one active camera.
+
+
+
Returns:
Pointer to the interface of the camera if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ICameraSceneNode* irr::scene::ISceneManager::addCameraSceneNodeMaya (ISceneNodeparent = 0,
f32 rotateSpeed = -1500.f,
f32 zoomSpeed = 200.f,
f32 translationSpeed = 1500.f,
s32 id = -1,
f32 distance = 70.f,
bool makeActive = true 
) [pure virtual]
+
+
+ +

Adds a maya style user controlled camera scene node to the scene graph.

+

This is a standard camera with an animator that provides mouse control similar to camera in the 3D Software Maya by Alias Wavefront. The camera does not react on setPosition anymore after applying this animator. Instead use setTarget, to fix the target the camera the camera hovers around. And setDistance to set the current distance from that target, i.e. the radius of the orbit the camera hovers on.

+
Parameters:
+ + + + + + + + +
parent,:Parent scene node of the camera. Can be null.
rotateSpeed,:Rotation speed of the camera.
zoomSpeed,:Zoom speed of the camera.
translationSpeed,:TranslationSpeed of the camera.
id,:id of the camera. This id can be used to identify the camera.
distanceInitial distance of the camera from the object
makeActiveFlag whether this camera should become the active one. Make sure you always have one active camera.
+
+
+
Returns:
Returns a pointer to the interface of the camera if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMeshSceneNode* irr::scene::ISceneManager::addCubeSceneNode (f32 size = 10.0f,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [pure virtual]
+
+
+ +

Adds a cube scene node.

+
Parameters:
+ + + + + + + +
size,:Size of the cube, uniformly in each dimension.
parent,:Parent of the scene node. Can be 0 if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:Position of the space relative to its parent where the scene node will be placed.
rotation,:Initital rotation of the scene node.
scale,:Initial scale of the scene node.
+
+
+
Returns:
Pointer to the created test scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IDummyTransformationSceneNode* irr::scene::ISceneManager::addDummyTransformationSceneNode (ISceneNodeparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a dummy transformation scene node to the scene graph.

+

This scene node does not render itself, and does not respond to set/getPosition, set/getRotation and set/getScale. Its just a simple scene node that takes a matrix as relative transformation, making it possible to insert any transformation anywhere into the scene graph.

+
Returns:
Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::addEmptySceneNode (ISceneNodeparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds an empty scene node to the scene graph.

+

Can be used for doing advanced transformations or structuring the scene graph.

+
Returns:
Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::addExternalMeshLoader (IMeshLoaderexternalLoader) [pure virtual]
+
+
+ +

Adds an external mesh loader for extending the engine with new file formats.

+

If you want the engine to be extended with file formats it currently is not able to load (e.g. .cob), just implement the IMeshLoader interface in your loading class and add it with this method. Using this method it is also possible to override built-in mesh loaders with newer or updated versions without the need to recompile the engine.

+
Parameters:
+ + +
externalLoader,:Implementation of a new mesh loader.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::addExternalSceneLoader (ISceneLoaderexternalLoader) [pure virtual]
+
+
+ +

Adds an external scene loader for extending the engine with new file formats.

+

If you want the engine to be extended with file formats it currently is not able to load (e.g. .vrml), just implement the ISceneLoader interface in your loading class and add it with this method. Using this method it is also possible to override the built-in scene loaders with newer or updated versions without the need to recompile the engine.

+
Parameters:
+ + +
externalLoader,:Implementation of a new mesh loader.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::addHillPlaneMesh (const io::pathname,
const core::dimension2d< f32 > & tileSize,
const core::dimension2d< u32 > & tileCount,
video::SMaterialmaterial = 0,
f32 hillHeight = 0.0f,
const core::dimension2d< f32 > & countHills = core::dimension2df32 >(0.0f, 0.0f),
const core::dimension2d< f32 > & textureRepeatCount = core::dimension2df32 >(1.0f, 1.0f) 
) [pure virtual]
+
+
+ +

Adds a Hill Plane mesh to the mesh pool.

+

The mesh is generated on the fly and looks like a plane with some hills on it. It is uses mostly for quick tests of the engine only. You can specify how many hills there should be on the plane and how high they should be. Also you must specify a name for the mesh, because the mesh is added to the mesh pool, and can be retrieved again using ISceneManager::getMesh() with the name as parameter.

+
Parameters:
+ + + + + + + + +
name,:The name of this mesh which must be specified in order to be able to retrieve the mesh later with ISceneManager::getMesh().
tileSize,:Size of a tile of the mesh. (10.0f, 10.0f) would be a good value to start, for example.
tileCount,:Specifies how much tiles there will be. If you specifiy for example that a tile has the size (10.0f, 10.0f) and the tileCount is (10,10), than you get a field of 100 tiles which has the dimension 100.0fx100.0f.
material,:Material of the hill mesh.
hillHeight,:Height of the hills. If you specify a negative value you will get holes instead of hills. If the height is 0, no hills will be created.
countHills,:Amount of hills on the plane. There will be countHills.X hills along the X axis and countHills.Y along the Y axis. So in total there will be countHills.X * countHills.Y hills.
textureRepeatCount,:Defines how often the texture will be repeated in x and y direction. return Null if the creation failed. The reason could be that you specified some invalid parameters or that a mesh with that name already exists. If successful, a pointer to the mesh is returned. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ILightSceneNode* irr::scene::ISceneManager::addLightSceneNode (ISceneNodeparent = 0,
const core::vector3dfposition = core::vector3df(0, 0, 0),
video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f),
f32 radius = 100.0f,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a dynamic light scene node to the scene graph.

+

The light will cast dynamic light on all other scene nodes in the scene, which have the material flag video::MTF_LIGHTING turned on. (This is the default setting in most scene nodes).

+
Parameters:
+ + + + + + +
parent,:Parent scene node of the light. Can be null. If the parent moves, the light will move too.
position,:Position of the space relative to its parent where the light will be placed.
color,:Diffuse color of the light. Ambient or Specular colors can be set manually with the ILightSceneNode::getLightData() method.
radius,:Radius of the light.
id,:id of the node. This id can be used to identify the node.
+
+
+
Returns:
Pointer to the interface of the light if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMeshSceneNode* irr::scene::ISceneManager::addMeshSceneNode (IMeshmesh,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f),
bool alsoAddIfMeshPointerZero = false 
) [pure virtual]
+
+
+ +

Adds a scene node for rendering a static mesh.

+
Parameters:
+ + + + + + + + +
mesh,:Pointer to the loaded static mesh to be displayed.
parent,:Parent of the scene node. Can be NULL if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:Position of the space relative to its parent where the scene node will be placed.
rotation,:Initital rotation of the scene node.
scale,:Initial scale of the scene node.
alsoAddIfMeshPointerZero,:Add the scene node even if a 0 pointer is passed.
+
+
+
Returns:
Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMeshSceneNode* irr::scene::ISceneManager::addOctreeSceneNode (IAnimatedMeshmesh,
ISceneNodeparent = 0,
s32 id = -1,
s32 minimalPolysPerNode = 512,
bool alsoAddIfMeshPointerZero = false 
) [pure virtual]
+
+
+ +

Adds a scene node for rendering using a octree to the scene graph.

+

This a good method for rendering scenes with lots of geometry. The Octree is built on the fly from the mesh.

+
Parameters:
+ + + + + + +
mesh,:The mesh containing all geometry from which the octree will be build. If this animated mesh has more than one frames in it, the first frame is taken.
parent,:Parent node of the octree node.
id,:id of the node. This id can be used to identify the node.
minimalPolysPerNode,:Specifies the minimal polygons contained a octree node. If a node gets less polys than this value it will not be split into smaller nodes.
alsoAddIfMeshPointerZero,:Add the scene node even if a 0 pointer is passed.
+
+
+
Returns:
Pointer to the Octree if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +

Referenced by addOctTreeSceneNode().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMeshSceneNode* irr::scene::ISceneManager::addOctreeSceneNode (IMeshmesh,
ISceneNodeparent = 0,
s32 id = -1,
s32 minimalPolysPerNode = 256,
bool alsoAddIfMeshPointerZero = false 
) [pure virtual]
+
+
+ +

Adds a scene node for rendering using a octree to the scene graph.

+

This a good method for rendering scenes with lots of geometry. The Octree is built on the fly from the mesh, much faster then a bsp tree.

+
Parameters:
+ + + + + + +
mesh,:The mesh containing all geometry from which the octree will be build.
parent,:Parent node of the octree node.
id,:id of the node. This id can be used to identify the node.
minimalPolysPerNode,:Specifies the minimal polygons contained a octree node. If a node gets less polys than this value it will not be split into smaller nodes.
alsoAddIfMeshPointerZero,:Add the scene node even if a 0 pointer is passed.
+
+
+
Returns:
Pointer to the octree if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_IRR_DEPRECATED_ IMeshSceneNode* irr::scene::ISceneManager::addOctTreeSceneNode (IAnimatedMeshmesh,
ISceneNodeparent = 0,
s32 id = -1,
s32 minimalPolysPerNode = 512,
bool alsoAddIfMeshPointerZero = false 
) [inline]
+
+
+ +

Adds a scene node for rendering using a octree to the scene graph.

+
Deprecated:
Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9.
+ +

Definition at line 566 of file ISceneManager.h.

+ +

References addOctreeSceneNode().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_IRR_DEPRECATED_ IMeshSceneNode* irr::scene::ISceneManager::addOctTreeSceneNode (IMeshmesh,
ISceneNodeparent = 0,
s32 id = -1,
s32 minimalPolysPerNode = 256,
bool alsoAddIfMeshPointerZero = false 
) [inline]
+
+
+ +

Adds a scene node for rendering using a octree to the scene graph.

+
Deprecated:
Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9.
+ +

Definition at line 590 of file ISceneManager.h.

+ +

References addOctreeSceneNode().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IParticleSystemSceneNode* irr::scene::ISceneManager::addParticleSystemSceneNode (bool withDefaultEmitter = true,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [pure virtual]
+
+
+ +

Adds a particle system scene node to the scene graph.

+
Parameters:
+ + + + + + + +
withDefaultEmitter,:Creates a default working point emitter which emitts some particles. Set this to true to see a particle system in action. If set to false, you'll have to set the emitter you want by calling IParticleSystemSceneNode::setEmitter().
parent,:Parent of the scene node. Can be NULL if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:Position of the space relative to its parent where the scene node will be placed.
rotation,:Initital rotation of the scene node.
scale,:Initial scale of the scene node.
+
+
+
Returns:
Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMeshSceneNode* irr::scene::ISceneManager::addQuake3SceneNode (const IMeshBuffermeshBuffer,
const quake3::IShadershader,
ISceneNodeparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a quake3 scene node to the scene graph.

+

A Quake3 Scene renders multiple meshes for a specific HighLanguage Shader (Quake3 Style )

+
Returns:
Pointer to the quake3 scene node if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::addSceneNode (const char * sceneNodeTypeName,
ISceneNodeparent = 0 
) [pure virtual]
+
+
+ +

Adds a scene node to the scene by name.

+
Returns:
Pointer to the scene node added by a factory This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::addSkyBoxSceneNode (video::ITexturetop,
video::ITexturebottom,
video::ITextureleft,
video::ITextureright,
video::ITexturefront,
video::ITextureback,
ISceneNodeparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a skybox scene node to the scene graph.

+

A skybox is a big cube with 6 textures on it and is drawn around the camera position.

+
Parameters:
+ + + + + + + + + +
top,:Texture for the top plane of the box.
bottom,:Texture for the bottom plane of the box.
left,:Texture for the left plane of the box.
right,:Texture for the right plane of the box.
front,:Texture for the front plane of the box.
back,:Texture for the back plane of the box.
parent,:Parent scene node of the skybox. A skybox usually has no parent, so this should be null. Note: If a parent is set to the skybox, the box will not change how it is drawn.
id,:An id of the node. This id can be used to identify the node.
+
+
+
Returns:
Pointer to the sky box if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::addSkyDomeSceneNode (video::ITexturetexture,
u32 horiRes = 16,
u32 vertRes = 8,
f32 texturePercentage = 0.9,
f32 spherePercentage = 2.0,
f32 radius = 1000.f,
ISceneNodeparent = 0,
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a skydome scene node to the scene graph.

+

A skydome is a large (half-) sphere with a panoramic texture on the inside and is drawn around the camera position.

+
Parameters:
+ + + + + + + + + +
texture,:Texture for the dome.
horiRes,:Number of vertices of a horizontal layer of the sphere.
vertRes,:Number of vertices of a vertical layer of the sphere.
texturePercentage,:How much of the height of the texture is used. Should be between 0 and 1.
spherePercentage,:How much of the sphere is drawn. Value should be between 0 and 2, where 1 is an exact half-sphere and 2 is a full sphere.
radiusThe Radius of the sphere
parent,:Parent scene node of the dome. A dome usually has no parent, so this should be null. Note: If a parent is set, the dome will not change how it is drawn.
id,:An id of the node. This id can be used to identify the node.
+
+
+
Returns:
Pointer to the sky dome if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::addSphereMesh (const io::pathname,
f32 radius = 5.f,
u32 polyCountX = 16,
u32 polyCountY = 16 
) [pure virtual]
+
+
+ +

add a static sphere mesh to the meshpool

+
Parameters:
+ + + + + +
nameName of the mesh
radiusRadius of the sphere
polyCountXNumber of quads used for the horizontal tiling
polyCountYNumber of quads used for the vertical tiling
+
+
+
Returns:
Pointer to the sphere mesh if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMeshSceneNode* irr::scene::ISceneManager::addSphereSceneNode (f32 radius = 5.0f,
s32 polyCount = 16,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [pure virtual]
+
+
+ +

Adds a sphere scene node of the given radius and detail.

+
Parameters:
+ + + + + + + + +
radius,:Radius of the sphere.
polyCount,:The number of vertices in horizontal and vertical direction. The total polyCount of the sphere is polyCount*polyCount. This parameter must be less than 256 to stay within the 16-bit limit of the indices of a meshbuffer.
parent,:Parent of the scene node. Can be 0 if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:Position of the space relative to its parent where the scene node will be placed.
rotation,:Initital rotation of the scene node.
scale,:Initial scale of the scene node.
+
+
+
Returns:
Pointer to the created test scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::addTerrainMesh (const io::pathmeshname,
video::IImagetexture,
video::IImageheightmap,
const core::dimension2d< f32 > & stretchSize = core::dimension2df32 >(10.0f, 10.0f),
f32 maxHeight = 200.0f,
const core::dimension2d< u32 > & defaultVertexBlockSize = core::dimension2du32 >(64, 64) 
) [pure virtual]
+
+
+ +

Adds a static terrain mesh to the mesh pool.

+

The mesh is generated on the fly from a texture file and a height map file. Both files may be huge (8000x8000 pixels would be no problem) because the generator splits the files into smaller textures if necessary. You must specify a name for the mesh, because the mesh is added to the mesh pool, and can be retrieved again using ISceneManager::getMesh() with the name as parameter.

+
Parameters:
+ + + + + + + +
meshname,:The name of this mesh which must be specified in order to be able to retrieve the mesh later with ISceneManager::getMesh().
texture,:Texture for the terrain. Please note that this is not a hardware texture as usual (ITexture), but an IImage software texture. You can load this texture with IVideoDriver::createImageFromFile().
heightmap,:A grayscaled heightmap image. Like the texture, it can be created with IVideoDriver::createImageFromFile(). The amount of triangles created depends on the size of this texture, so use a small heightmap to increase rendering speed.
stretchSize,:Parameter defining how big a is pixel on the heightmap.
maxHeight,:Defines how high a white pixel on the heighmap is.
defaultVertexBlockSize,:Defines the initial dimension between vertices.
+
+
+
Returns:
Null if the creation failed. The reason could be that you specified some invalid parameters, that a mesh with that name already exists, or that a texture could not be found. If successful, a pointer to the mesh is returned. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITerrainSceneNode* irr::scene::ISceneManager::addTerrainSceneNode (const io::pathheightMapFileName,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3dfrotation = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f),
video::SColor vertexColor = video::SColor(255, 255, 255, 255),
s32 maxLOD = 5,
E_TERRAIN_PATCH_SIZE patchSize = ETPS_17,
s32 smoothFactor = 0,
bool addAlsoIfHeightmapEmpty = false 
) [pure virtual]
+
+
+ +

Adds a terrain scene node to the scene graph.

+

This node implements is a simple terrain renderer which uses a technique known as geo mip mapping for reducing the detail of triangle blocks which are far away. The code for the TerrainSceneNode is based on the terrain renderer by Soconne and the GeoMipMapSceneNode developed by Spintz. They made their code available for Irrlicht and allowed it to be distributed under this licence. I only modified some parts. A lot of thanks go to them.

+

This scene node is capable of loading terrains and updating the indices at runtime to enable viewing very large terrains very quickly. It uses a CLOD (Continuous Level of Detail) algorithm which updates the indices for each patch based on a LOD (Level of Detail) which is determined based on a patch's distance from the camera.

+

The patch size of the terrain must always be a size of 2^N+1, i.e. 8+1(9), 16+1(17), etc. The MaxLOD available is directly dependent on the patch size of the terrain. LOD 0 contains all of the indices to draw all the triangles at the max detail for a patch. As each LOD goes up by 1 the step taken, in generating indices increases by -2^LOD, so for LOD 1, the step taken is 2, for LOD 2, the step taken is 4, LOD 3 - 8, etc. The step can be no larger than the size of the patch, so having a LOD of 8, with a patch size of 17, is asking the algoritm to generate indices every 2^8 ( 256 ) vertices, which is not possible with a patch size of 17. The maximum LOD for a patch size of 17 is 2^4 ( 16 ). So, with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 ( every 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every 8 vertices ) and LOD 4 ( every 16 vertices ).

+
Parameters:
+ + + + + + + + + + + + +
heightMapFileName,:The name of the file on disk, to read vertex data from. This should be a gray scale bitmap.
parent,:Parent of the scene node. Can be 0 if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:The absolute position of this node.
rotation,:The absolute rotation of this node. ( NOT YET IMPLEMENTED )
scale,:The scale factor for the terrain. If you're using a heightmap of size 129x129 and would like your terrain to be 12900x12900 in game units, then use a scale factor of ( core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y scaling factor of 0.0f, then your terrain will be flat.
vertexColor,:The default color of all the vertices. If no texture is associated with the scene node, then all vertices will be this color. Defaults to white.
maxLOD,:The maximum LOD (level of detail) for the node. Only change if you know what you are doing, this might lead to strange behavior.
patchSize,:patch size of the terrain. Only change if you know what you are doing, this might lead to strange behavior.
smoothFactor,:The number of times the vertices are smoothed.
addAlsoIfHeightmapEmpty,:Add terrain node even with empty heightmap.
+
+
+
Returns:
Pointer to the created scene node. Can be null if the terrain could not be created, for example because the heightmap could not be loaded. The returned pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITerrainSceneNode* irr::scene::ISceneManager::addTerrainSceneNode (io::IReadFileheightMapFile,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3dfrotation = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f),
video::SColor vertexColor = video::SColor(255, 255, 255, 255),
s32 maxLOD = 5,
E_TERRAIN_PATCH_SIZE patchSize = ETPS_17,
s32 smoothFactor = 0,
bool addAlsoIfHeightmapEmpty = false 
) [pure virtual]
+
+
+ +

Adds a terrain scene node to the scene graph.

+

Just like the other addTerrainSceneNode() method, but takes an IReadFile pointer as parameter for the heightmap. For more informations take a look at the other function.

+
Parameters:
+ + + + + + + + + + + + +
heightMapFile,:The file handle to read vertex data from. This should be a gray scale bitmap.
parent,:Parent of the scene node. Can be 0 if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:The absolute position of this node.
rotation,:The absolute rotation of this node. ( NOT YET IMPLEMENTED )
scale,:The scale factor for the terrain. If you're using a heightmap of size 129x129 and would like your terrain to be 12900x12900 in game units, then use a scale factor of ( core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y scaling factor of 0.0f, then your terrain will be flat.
vertexColor,:The default color of all the vertices. If no texture is associated with the scene node, then all vertices will be this color. Defaults to white.
maxLOD,:The maximum LOD (level of detail) for the node. Only change if you know what you are doing, this might lead to strange behavior.
patchSize,:patch size of the terrain. Only change if you know what you are doing, this might lead to strange behavior.
smoothFactor,:The number of times the vertices are smoothed.
addAlsoIfHeightmapEmpty,:Add terrain node even with empty heightmap.
+
+
+
Returns:
Pointer to the created scene node. Can be null if the terrain could not be created, for example because the heightmap could not be loaded. The returned pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITextSceneNode* irr::scene::ISceneManager::addTextSceneNode (gui::IGUIFontfont,
const wchar_t * text,
video::SColor color = video::SColor(100, 255, 255, 255),
ISceneNodeparent = 0,
const core::vector3dfposition = core::vector3df(0, 0, 0),
s32 id = -1 
) [pure virtual]
+
+
+ +

Adds a text scene node, which is able to display 2d text at a position in three dimensional space.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::addToDeletionQueue (ISceneNodenode) [pure virtual]
+
+
+ +

Adds a scene node to the deletion queue.

+

The scene node is immediatly deleted when it's secure. Which means when the scene node does not execute animators and things like that. This method is for example used for deleting scene nodes by their scene node animators. In most other cases, a ISceneNode::remove() call is enough, using this deletion queue is not necessary. See ISceneManager::createDeleteAnimator() for details.

+
Parameters:
+ + +
node,:Node to detete.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::addVolumeLightMesh (const io::pathname,
const u32 SubdivideU = 32,
const u32 SubdivideV = 32,
const video::SColor FootColor = video::SColor(51, 0, 230, 180),
const video::SColor TailColor = video::SColor(0, 0, 0, 0) 
) [pure virtual]
+
+
+ +

Add a volume light mesh to the meshpool.

+
Parameters:
+ + + + + + +
nameName of the mesh
SubdivideUHorizontal subdivision count
SubdivideVVertical subdivision count
FootColorColor of the bottom of the light
TailColorColor of the top of the light
+
+
+
Returns:
Pointer to the volume light mesh if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IVolumeLightSceneNode* irr::scene::ISceneManager::addVolumeLightSceneNode (ISceneNodeparent = 0,
s32 id = -1,
const u32 subdivU = 32,
const u32 subdivV = 32,
const video::SColor foot = video::SColor(51, 0, 230, 180),
const video::SColor tail = video::SColor(0, 0, 0, 0),
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [pure virtual]
+
+
+ +

adds Volume Lighting Scene Node.

+

Example Usage: scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1, 32, 32, //Subdivide U/V video::SColor(0, 180, 180, 180), //foot color video::SColor(0, 0, 0, 0) //tail color ); if (n) { n->setScale(core::vector3df(46.0f, 45.0f, 46.0f)); n->getMaterial(0).setTexture(0, smgr->getVideoDriver()->getTexture("lightFalloff.png")); }

+
Returns:
Pointer to the volumeLight if successful, otherwise NULL. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::addWaterSurfaceSceneNode (IMeshmesh,
f32 waveHeight = 2.0f,
f32 waveSpeed = 300.0f,
f32 waveLength = 10.0f,
ISceneNodeparent = 0,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0, 0, 0),
const core::vector3dfrotation = core::vector3df(0, 0, 0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [pure virtual]
+
+
+ +

Adds a scene node for rendering a animated water surface mesh.

+

Looks really good when the Material type EMT_TRANSPARENT_REFLECTION is used.

+
Parameters:
+ + + + + + + + + + +
waveHeight,:Height of the water waves.
waveSpeed,:Speed of the water waves.
waveLength,:Lenght of a water wave.
mesh,:Pointer to the loaded static mesh to be displayed with water waves on it.
parent,:Parent of the scene node. Can be NULL if no parent.
id,:Id of the node. This id can be used to identify the scene node.
position,:Position of the space relative to its parent where the scene node will be placed.
rotation,:Initital rotation of the scene node.
scale,:Initial scale of the scene node.
+
+
+
Returns:
Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneManager::clear () [pure virtual]
+
+
+ +

Clears the whole scene.

+

All scene nodes are removed.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimatorCollisionResponse* irr::scene::ISceneManager::createCollisionResponseAnimator (ITriangleSelectorworld,
ISceneNodesceneNode,
const core::vector3dfellipsoidRadius = core::vector3df(30, 60, 30),
const core::vector3dfgravityPerSecond = core::vector3df(0,-10.0f, 0),
const core::vector3dfellipsoidTranslation = core::vector3df(0, 0, 0),
f32 slidingValue = 0.0005f 
) [pure virtual]
+
+
+ +

Creates a special scene node animator for doing automatic collision detection and response.

+

See ISceneNodeAnimatorCollisionResponse for details.

+
Parameters:
+ + + + + + + +
world,:Triangle selector holding all triangles of the world with which the scene node may collide. You can create a triangle selector with ISceneManager::createTriangleSelector();
sceneNode,:SceneNode which should be manipulated. After you added this animator to the scene node, the scene node will not be able to move through walls and is affected by gravity. If you need to teleport the scene node to a new position without it being effected by the collision geometry, then call sceneNode->setPosition(); then animator->setTargetNode(sceneNode);
ellipsoidRadius,:Radius of the ellipsoid with which collision detection and response is done. If you have got a scene node, and you are unsure about how big the radius should be, you could use the following code to determine it:
        const core::aabbox3d<f32>& box = yourSceneNode->getBoundingBox();
+        core::vector3df radius = box.MaxEdge - box.getCenter();
+
gravityPerSecond,:Sets the gravity of the environment, as an acceleration in units per second per second. If your units are equivalent to metres, then core::vector3df(0,-10.0f,0) would give an approximately realistic gravity. You can disable gravity by setting it to core::vector3df(0,0,0).
ellipsoidTranslation,:By default, the ellipsoid for collision detection is created around the center of the scene node, which means that the ellipsoid surrounds it completely. If this is not what you want, you may specify a translation for the ellipsoid.
slidingValue,:DOCUMENTATION NEEDED.
+
+
+
Returns:
The animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will cause it to do collision detection and response. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createDeleteAnimator (u32 timeMs) [pure virtual]
+
+
+ +

Creates a scene node animator, which deletes the scene node after some time automatically.

+
Parameters:
+ + +
timeMs,:Time in milliseconds, after when the node will be deleted.
+
+
+
Returns:
The animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createFlyCircleAnimator (const core::vector3dfcenter = core::vector3df(0.f, 0.f, 0.f),
f32 radius = 100.f,
f32 speed = 0.001f,
const core::vector3dfdirection = core::vector3df(0.f, 1.f, 0.f),
f32 startPosition = 0.f,
f32 radiusEllipsoid = 0.f 
) [pure virtual]
+
+
+ +

Creates a fly circle animator, which lets the attached scene node fly around a center.

+
Parameters:
+ + + + + + + +
center,:Center of the circle.
radius,:Radius of the circle.
speed,:The orbital speed, in radians per millisecond.
direction,:Specifies the upvector used for alignment of the mesh.
startPosition,:The position on the circle where the animator will begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase)
radiusEllipsoid,:if radiusEllipsoid != 0 then radius2 froms a ellipsoid begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase)
+
+
+
Returns:
The animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createFlyStraightAnimator (const core::vector3dfstartPoint,
const core::vector3dfendPoint,
u32 timeForWay,
bool loop = false,
bool pingpong = false 
) [pure virtual]
+
+
+ +

Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points.

+
Parameters:
+ + + + + + +
startPoint,:Start point of the line.
endPoint,:End point of the line.
timeForWay,:Time in milli seconds how long the node should need to move from the start point to the end point.
loop,:If set to false, the node stops when the end point is reached. If loop is true, the node begins again at the start.
pingpongFlag to set whether the animator should fly back from end to start again.
+
+
+
Returns:
The animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createFollowSplineAnimator (s32 startTime,
const core::array< core::vector3df > & points,
f32 speed = 1.0f,
f32 tightness = 0.5f,
bool loop = true,
bool pingpong = false 
) [pure virtual]
+
+
+ +

Creates a follow spline animator.

+

The animator modifies the position of the attached scene node to make it follow a hermite spline. It uses a subset of hermite splines: either cardinal splines (tightness != 0.5) or catmull-rom-splines (tightness == 0.5). The animator moves from one control point to the next in 1/speed seconds. This code was sent in by Matthias Gall. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshWriter* irr::scene::ISceneManager::createMeshWriter (EMESH_WRITER_TYPE type) [pure virtual]
+
+
+ +

Get a mesh writer implementation if available.

+

Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() for details.

+ +
+
+ +
+
+ + + + + + + +
virtual IMetaTriangleSelector* irr::scene::ISceneManager::createMetaTriangleSelector () [pure virtual]
+
+
+ +

Creates a meta triangle selector.

+

A meta triangle selector is nothing more than a collection of one or more triangle selectors providing together the interface of one triangle selector. In this way, collision tests can be done with different triangle soups in one pass.

+
Returns:
The selector, or null if not successful. If you no longer need the selector, you should call ITriangleSelector::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneManager* irr::scene::ISceneManager::createNewSceneManager (bool cloneContent = false) [pure virtual]
+
+
+ +

Creates a new scene manager.

+

This can be used to easily draw and/or store two independent scenes at the same time. The mesh cache will be shared between all existing scene managers, which means if you load a mesh in the original scene manager using for example getMesh(), the mesh will be available in all other scene managers too, without loading. The original/main scene manager will still be there and accessible via IrrlichtDevice::getSceneManager(). If you need input event in this new scene manager, for example for FPS cameras, you'll need to forward input to this manually: Just implement an IEventReceiver and call yourNewSceneManager->postEventFromUser(), and return true so that the original scene manager doesn't get the event. Otherwise, all input will go to the main scene manager automatically. If you no longer need the new scene manager, you should call ISceneManager::drop(). See IReferenceCounted::drop() for more information.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneManager::createOctreeTriangleSelector (IMeshmesh,
ISceneNodenode,
s32 minimalPolysPerNode = 32 
) [pure virtual]
+
+
+ +

Creates a Triangle Selector, optimized by an octree.

+

Triangle selectors can be used for doing collision detection. This triangle selector is optimized for huge amounts of triangle, it organizes them in an octree. Please note that the created triangle selector is not automaticly attached to the scene node. You will have to call ISceneNode::setTriangleSelector() for this. To create and attach a triangle selector is done like this:

+
        ITriangleSelector* s = sceneManager->createOctreeTriangleSelector(yourMesh,
+                yourSceneNode);
+        yourSceneNode->setTriangleSelector(s);
+        s->drop();
+

For more informations and examples on this, take a look at the collision tutorial in the SDK.

+
Parameters:
+ + + + +
mesh,:Mesh of which the triangles are taken.
node,:Scene node of which visibility and transformation is used.
minimalPolysPerNode,:Specifies the minimal polygons contained a octree node. If a node gets less polys the this value, it will not be splitted into smaller nodes.
+
+
+
Returns:
The selector, or null if not successful. If you no longer need the selector, you should call ITriangleSelector::drop(). See IReferenceCounted::drop() for more information.
+ +

Referenced by createOctTreeTriangleSelector().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
_IRR_DEPRECATED_ ITriangleSelector* irr::scene::ISceneManager::createOctTreeTriangleSelector (IMeshmesh,
ISceneNodenode,
s32 minimalPolysPerNode = 32 
) [inline]
+
+
+ +

//! Creates a Triangle Selector, optimized by an octree.

+
Deprecated:
Use createOctreeTriangleSelector instead. This method may be removed by Irrlicht 1.9.
+ +

Definition at line 1343 of file ISceneManager.h.

+ +

References createOctreeTriangleSelector().

+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createRotationAnimator (const core::vector3dfrotationSpeed) [pure virtual]
+
+
+ +

Creates a rotation animator, which rotates the attached scene node around itself.

+
Parameters:
+ + +
rotationSpeedSpecifies the speed of the animation in degree per 10 milliseconds.
+
+
+
Returns:
The animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createSceneNodeAnimator (const char * typeName,
ISceneNodetarget = 0 
) [pure virtual]
+
+
+ +

creates a scene node animator based on its type name

+
Parameters:
+ + + +
typeName,:Type of the scene node animator to add.
target,:Target scene node of the new animator.
+
+
+
Returns:
Returns pointer to the new scene node animator or null if not successful. You need to drop this pointer after calling this, see IReferenceCounted::drop() for details.
+ +
+
+ +
+
+ + + + + + + +
virtual ISkinnedMesh* irr::scene::ISceneManager::createSkinnedMesh () [pure virtual]
+
+
+ +

Get a skinned mesh, which is not available as header-only code.

+

Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() for details.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneManager::createTerrainTriangleSelector (ITerrainSceneNodenode,
s32 LOD = 0 
) [pure virtual]
+
+
+ +

Creates a triangle selector which can select triangles from a terrain scene node.

+
Parameters:
+ + + +
node,:Pointer to the created terrain scene node
LOD,:Level of detail, 0 for highest detail.
+
+
+
Returns:
The selector, or null if not successful. If you no longer need the selector, you should call ITriangleSelector::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneManager::createTextureAnimator (const core::array< video::ITexture * > & textures,
s32 timePerFrame,
bool loop = true 
) [pure virtual]
+
+
+ +

Creates a texture animator, which switches the textures of the target scene node based on a list of textures.

+
Parameters:
+ + + + +
textures,:List of textures to use.
timePerFrame,:Time in milliseconds, how long any texture in the list should be visible.
loop,:If set to to false, the last texture remains set, and the animation stops. If set to true, the animation restarts with the first texture.
+
+
+
Returns:
The animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneManager::createTriangleSelector (IMeshmesh,
ISceneNodenode 
) [pure virtual]
+
+
+ +

Creates a simple ITriangleSelector, based on a mesh.

+

Triangle selectors can be used for doing collision detection. Don't use this selector for a huge amount of triangles like in Quake3 maps. Instead, use for example ISceneManager::createOctreeTriangleSelector(). Please note that the created triangle selector is not automaticly attached to the scene node. You will have to call ISceneNode::setTriangleSelector() for this. To create and attach a triangle selector is done like this:

+
        ITriangleSelector* s = sceneManager->createTriangleSelector(yourMesh,
+                yourSceneNode);
+        yourSceneNode->setTriangleSelector(s);
+        s->drop();
+
Parameters:
+ + + +
mesh,:Mesh of which the triangles are taken.
node,:Scene node of which visibility and transformation is used.
+
+
+
Returns:
The selector, or null if not successful. If you no longer need the selector, you should call ITriangleSelector::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneManager::createTriangleSelector (IAnimatedMeshSceneNodenode) [pure virtual]
+
+
+ +

Creates a simple ITriangleSelector, based on an animated mesh scene node.

+

Details of the mesh associated with the node will be extracted internally. Call ITriangleSelector::update() to have the triangle selector updated based on the current frame of the animated mesh scene node.

+
Parameters:
+ + +
nodeThe animated mesh scene node from which to build the selector
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneManager::createTriangleSelectorFromBoundingBox (ISceneNodenode) [pure virtual]
+
+
+ +

Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box.

+

Triangle selectors can be used for doing collision detection. Every time when triangles are queried, the triangle selector gets the bounding box of the scene node, an creates new triangles. In this way, it works good with animated scene nodes.

+
Parameters:
+ + +
node,:Scene node of which the bounding box, visibility and transformation is used.
+
+
+
Returns:
The selector, or null if not successful. If you no longer need the selector, you should call ITriangleSelector::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneManager::drawAll () [pure virtual]
+
+
+ +

Draws all the scene nodes.

+

This can only be invoked between IVideoDriver::beginScene() and IVideoDriver::endScene(). Please note that the scene is not only drawn when calling this, but also animated by existing scene node animators, culling of scene nodes is done, etc.

+ +
+
+ +
+
+ + + + + + + +
virtual ICameraSceneNode* irr::scene::ISceneManager::getActiveCamera () const [pure virtual]
+
+
+ +

Get the current active camera.

+
Returns:
The active camera is returned. Note that this can be NULL, if there was no camera created yet. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual const video::SColorf& irr::scene::ISceneManager::getAmbientLight () const [pure virtual]
+
+
+ +

Get ambient color of the scene.

+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISceneManager::getAnimatorTypeName (ESCENE_NODE_ANIMATOR_TYPE type) [pure virtual]
+
+
+ +

Returns a typename from a scene node animator type or null if not found.

+ +
+
+ +
+
+ + + + + + + +
virtual ISceneNodeAnimatorFactory* irr::scene::ISceneManager::getDefaultSceneNodeAnimatorFactory () [pure virtual]
+
+
+ +

Get the default scene node animator factory which can create all built-in scene node animators.

+
Returns:
Pointer to the default scene node animator factory This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual ISceneNodeFactory* irr::scene::ISceneManager::getDefaultSceneNodeFactory () [pure virtual]
+
+
+ +

Get the default scene node factory which can create all built in scene nodes.

+
Returns:
Pointer to the default scene node factory This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual io::IFileSystem* irr::scene::ISceneManager::getFileSystem () [pure virtual]
+
+
+ +

Get the active FileSystem.

+
Returns:
Pointer to the FileSystem This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual const IGeometryCreator* irr::scene::ISceneManager::getGeometryCreator (void ) const [pure virtual]
+
+
+ +

Get an instance of a geometry creator.

+

The geometry creator provides some helper methods to create various types of basic geometry. This can be useful for custom scene nodes.

+ +
+
+ +
+
+ + + + + + + +
virtual gui::IGUIEnvironment* irr::scene::ISceneManager::getGUIEnvironment () [pure virtual]
+
+
+ +

Get the active GUIEnvironment.

+
Returns:
Pointer to the GUIEnvironment This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::getMesh (const io::pathfilename) [pure virtual]
+
+
+ +

Get pointer to an animateable mesh. Loads the file if not loaded already.

+

If you want to remove a loaded mesh from the cache again, use removeMesh(). Currently there are the following mesh formats supported:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Format Description
3D Studio (.3ds) Loader for 3D-Studio files which lots of 3D packages are able to export. Only static meshes are currently supported by this importer.
3D World Studio (.smf) Loader for Leadwerks SMF mesh files, a simple mesh format containing static geometry for games. The proprietary .STF texture format is not supported yet. This loader was originally written by Joseph Ellis.
Bliz Basic B3D (.b3d) Loader for blitz basic files, developed by Mark Sibly. This is the ideal animated mesh format for game characters as it is both rigidly defined and widely supported by modeling and animation software. As this format supports skeletal animations, an ISkinnedMesh will be returned by this importer.
Cartography shop 4 (.csm) Cartography Shop is a modeling program for creating architecture and calculating lighting. Irrlicht can directly import .csm files thanks to the IrrCSM library created by Saurav Mohapatra which is now integrated directly in Irrlicht. If you are using this loader, please note that you'll have to set the path of the textures before loading .csm files. You can do this using SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, "path/to/your/textures");
COLLADA (.dae, .xml)

COLLADA is an open Digital Asset Exchange Schema for the interactive 3D industry. There are exporters and importers for this format available for most of the big 3d packagesat http://collada.org. Irrlicht can import COLLADA files by using the ISceneManager::getMesh() method. COLLADA files need not contain only one single mesh but multiple meshes and a whole scene setup with lights, cameras and mesh instances, this loader can set up a scene as described by the COLLADA file instead of loading and returning one single mesh. By default, this loader behaves like the other loaders and does not create instances, but it can be switched into this mode by using SceneManager->getParameters()->setAttribute(COLLADA_CREATE_SCENE_INSTANCES, true); Created scene nodes will be named as the names of the nodes in the COLLADA file. The returned mesh is just a dummy object in this mode. Meshes included in the scene will be added into the scene manager with the following naming scheme: "path/to/file/file.dea#meshname". The loading of such meshes is logged. Currently, this loader is able to

+

create meshes (made of only polygons), lights, and cameras. Materials and animations are currently not supported but this will change with future releases.

+
Delgine DeleD (.dmf) DeleD (delgine.com) is a 3D editor and level-editor combined into one and is specifically designed for 3D game-development. With this loader, it is possible to directly load all geometry is as well as textures and lightmaps from .dmf files. To set texture and material paths, see scene::DMF_USE_MATERIALS_DIRS and scene::DMF_TEXTURE_PATH. It is also possible to flip the alpha texture by setting scene::DMF_FLIP_ALPHA_TEXTURES to true and to set the material transparent reference value by setting scene::DMF_ALPHA_CHANNEL_REF to a float between 0 and 1. The loader is based on Salvatore Russo's .dmf loader, I just changed some parts of it. Thanks to Salvatore for his work and for allowing me to use his code in Irrlicht and put it under Irrlicht's license. For newer and more enchanced versions of the loader, take a look at delgine.com.
DirectX (.x) Platform independent importer (so not D3D-only) for .x files. Most 3D packages can export these natively and there are several tools for them available, e.g. the Maya exporter included in the DX SDK. .x files can include skeletal animations and Irrlicht is able to play and display them, users can manipulate the joints via the ISkinnedMesh interface. Currently, Irrlicht only supports uncompressed .x files.
Half-Life model (.mdl) This loader opens Half-life 1 models, it was contributed by Fabio Concas and adapted by Thomas Alten.
Irrlicht Mesh (.irrMesh) This is a static mesh format written in XML, native to Irrlicht and written by the irr mesh writer. This format is exported by the CopperCube engine's lightmapper.
LightWave (.lwo) Native to NewTek's LightWave 3D, the LWO format is well known and supported by many exporters. This loader will import LWO2 models including lightmaps, bumpmaps and reflection textures.
Maya (.obj) Most 3D software can create .obj files which contain static geometry without material data. The material files .mtl are also supported. This importer for Irrlicht can load them directly.
Milkshape (.ms3d) .MS3D files contain models and sometimes skeletal animations from the Milkshape 3D modeling and animation software. Like the other skeletal mesh loaders, oints are exposed via the ISkinnedMesh animated mesh type.
My3D (.my3d) .my3D is a flexible 3D file format. The My3DTools contains plug-ins to export .my3D files from several 3D packages. With this built-in importer, Irrlicht can read and display those files directly. This loader was written by Zhuck Dimitry who also created the whole My3DTools package. If you are using this loader, please note that you can set the path of the textures before loading .my3d files. You can do this using SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, "path/to/your/textures");
OCT (.oct) The oct file format contains 3D geometry and lightmaps and can be loaded directly by Irrlicht. OCT files
+ can be created by FSRad, Paul Nette's radiosity processor or exported from Blender using OCTTools which can be found in the exporters/OCTTools directory of the SDK. Thanks to Murphy McCauley for creating all this.
OGRE Meshes (.mesh) Ogre .mesh files contain 3D data for the OGRE 3D engine. Irrlicht can read and display them directly with this importer. To define materials for the mesh, copy a .material file named like the corresponding .mesh file where the .mesh file is. (For example ogrehead.material for ogrehead.mesh). Thanks to Christian Stehno who wrote and contributed this loader.
Pulsar LMTools (.lmts) LMTools is a set of tools (Windows & Linux) for creating lightmaps. Irrlicht can directly read .lmts files thanks to
+ the importer created by Jonas Petersen. If you are using this loader, please note that you can set the path of the textures before loading .lmts files. You can do this using SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, "path/to/your/textures"); Notes for
+ this version of the loader:
+
    +
  • It does not recognise/support user data in the *.lmts files.
    +
  • +
  • The TGAs generated by LMTools don't work in Irrlicht for some reason (the textures are upside down). Opening and resaving them in a graphics app will solve the problem.
  • +
+
Quake 3 levels (.bsp) Quake 3 is a popular game by IDSoftware, and .pk3 files contain .bsp files and textures/lightmaps describing huge prelighted levels. Irrlicht can read .pk3 and .bsp files directly and thus render Quake 3 levels directly. Written by Nikolaus Gebhardt enhanced by Dean P. Macri with the curved surfaces feature.
Quake 2 models (.md2) Quake 2 models are characters with morph target animation. Irrlicht can read, display and animate them directly with this importer.
Quake 3 models (.md3) Quake 3 models are characters with morph target animation, they contain mount points for weapons and body parts and are typically made of several sections which are manually joined together.
Stanford Triangle (.ply) Invented by Stanford University and known as the native format of the infamous "Stanford Bunny" model, this is a popular static mesh format used by 3D scanning hardware and software. This loader supports extremely large models in both ASCII and binary format, but only has rudimentary material support in the form of vertex colors and texture coordinates.
Stereolithography (.stl) The STL format is used for rapid prototyping and computer-aided manufacturing, thus has no support for materials.
+

To load and display a mesh quickly, just do this:

+
  SceneManager->addAnimatedMeshSceneNode(
+        SceneManager->getMesh("yourmesh.3ds"));
+

If you would like to implement and add your own file format loader to Irrlicht, see addExternalMeshLoader().

+
Parameters:
+ + +
filename,:Filename of the mesh to load.
+
+
+
Returns:
Null if failed, otherwise pointer to the mesh. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IAnimatedMesh* irr::scene::ISceneManager::getMesh (io::IReadFilefile) [pure virtual]
+
+
+ +

Get pointer to an animateable mesh. Loads the file if not loaded already.

+

Works just as getMesh(const char* filename). If you want to remove a loaded mesh from the cache again, use removeMesh().

+
Parameters:
+ + +
fileFile handle of the mesh to load.
+
+
+
Returns:
NULL if failed and pointer to the mesh if successful. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual IMeshCache* irr::scene::ISceneManager::getMeshCache () [pure virtual]
+
+
+ +

Get interface to the mesh cache which is shared beween all existing scene managers.

+

With this interface, it is possible to manually add new loaded meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate through already loaded meshes.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshLoader* irr::scene::ISceneManager::getMeshLoader (u32 index) const [pure virtual]
+
+
+ +

Retrieve the given mesh loader.

+
Parameters:
+ + +
indexThe index of the loader to retrieve. This parameter is an 0-based array index.
+
+
+
Returns:
A pointer to the specified loader, 0 if the index is incorrect.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneManager::getMeshLoaderCount () const [pure virtual]
+
+
+ +

Returns the number of mesh loaders supported by Irrlicht at this time.

+ +
+
+ +
+
+ + + + + + + +
virtual IMeshManipulator* irr::scene::ISceneManager::getMeshManipulator () [pure virtual]
+
+
+ +

Get pointer to the mesh manipulator.

+
Returns:
Pointer to the mesh manipulator This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual io::IAttributes* irr::scene::ISceneManager::getParameters () [pure virtual]
+
+
+ +

Get interface to the parameters set in this scene.

+

String parameters can be used by plugins and mesh loaders. For example the CMS and LMTS loader want a parameter named 'CSM_TexturePath' and 'LMTS_TexturePath' set to the path were attached textures can be found. See CSM_TEXTURE_PATH, LMTS_TEXTURE_PATH, MY3D_TEXTURE_PATH, COLLADA_CREATE_SCENE_INSTANCES, DMF_TEXTURE_PATH and DMF_USE_MATERIALS_DIRS

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneManager::getRegisteredSceneNodeAnimatorFactoryCount () const [pure virtual]
+
+
+ +

Get amount of registered scene node animator factories.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneManager::getRegisteredSceneNodeFactoryCount () const [pure virtual]
+
+
+ +

Get amount of registered scene node factories.

+ +
+
+ +
+
+ + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::getRootSceneNode () [pure virtual]
+
+
+ +

Gets the root scene node.

+

This is the scene node which is parent of all scene nodes. The root scene node is a special scene node which only exists to manage all scene nodes. It will not be rendered and cannot be removed from the scene.

+
Returns:
Pointer to the root scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual ISceneCollisionManager* irr::scene::ISceneManager::getSceneCollisionManager () [pure virtual]
+
+
+ +

Get pointer to the scene collision manager.

+
Returns:
Pointer to the collision manager This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneLoader* irr::scene::ISceneManager::getSceneLoader (u32 index) const [pure virtual]
+
+
+ +

Retrieve the given scene loader.

+
Parameters:
+ + +
indexThe index of the loader to retrieve. This parameter is an 0-based array index.
+
+
+
Returns:
A pointer to the specified loader, 0 if the index is incorrect.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneManager::getSceneLoaderCount () const [pure virtual]
+
+
+ +

Returns the number of scene loaders supported by Irrlicht at this time.

+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneNodeAnimatorFactory* irr::scene::ISceneManager::getSceneNodeAnimatorFactory (u32 index) [pure virtual]
+
+
+ +

Get scene node animator factory by index.

+
Returns:
Pointer to the requested scene node animator factory, or 0 if it does not exist. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneNodeFactory* irr::scene::ISceneManager::getSceneNodeFactory (u32 index) [pure virtual]
+
+
+ +

Get a scene node factory by index.

+
Returns:
Pointer to the requested scene node factory, or 0 if it does not exist. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::getSceneNodeFromId (s32 id,
ISceneNodestart = 0 
) [pure virtual]
+
+
+ +

Get the first scene node with the specified id.

+
Parameters:
+ + + +
id,:The id to search for
start,:Scene node to start from. All children of this scene node are searched. If null is specified, the root scene node is taken.
+
+
+
Returns:
Pointer to the first scene node with this id, and null if no scene node could be found. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::getSceneNodeFromName (const c8name,
ISceneNodestart = 0 
) [pure virtual]
+
+
+ +

Get the first scene node with the specified name.

+
Parameters:
+ + + +
name,:The name to search for
start,:Scene node to start from. All children of this scene node are searched. If null is specified, the root scene node is taken.
+
+
+
Returns:
Pointer to the first scene node with this id, and null if no scene node could be found. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneManager::getSceneNodeFromType (scene::ESCENE_NODE_TYPE type,
ISceneNodestart = 0 
) [pure virtual]
+
+
+ +

Get the first scene node with the specified type.

+
Parameters:
+ + + +
type,:The type to search for
start,:Scene node to start from. All children of this scene node are searched. If null is specified, the root scene node is taken.
+
+
+
Returns:
Pointer to the first scene node with this type, and null if no scene node could be found. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual E_SCENE_NODE_RENDER_PASS irr::scene::ISceneManager::getSceneNodeRenderPass () const [pure virtual]
+
+
+ +

Get current render pass.

+

All scene nodes are being rendered in a specific order. First lights, cameras, sky boxes, solid geometry, and then transparent stuff. During the rendering process, scene nodes may want to know what the scene manager is rendering currently, because for example they registered for rendering twice, once for transparent geometry and once for solid. When knowing what rendering pass currently is active they can render the correct part of their geometry.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISceneManager::getSceneNodesFromType (ESCENE_NODE_TYPE type,
core::array< scene::ISceneNode * > & outNodes,
ISceneNodestart = 0 
) [pure virtual]
+
+
+ +

Get scene nodes by type.

+
Parameters:
+ + + + +
type,:Type of scene node to find (ESNT_ANY will return all child nodes).
outNodes,:array to be filled with results.
start,:Scene node to start from. All children of this scene node are searched. If null is specified, the root scene node is taken.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISceneManager::getSceneNodeTypeName (ESCENE_NODE_TYPE type) [pure virtual]
+
+
+ +

Get typename from a scene node type or null if not found.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SColor irr::scene::ISceneManager::getShadowColor () const [pure virtual]
+
+
+ +

Get the current color of shadows.

+ +
+
+ +
+
+ + + + + + + +
virtual video::IVideoDriver* irr::scene::ISceneManager::getVideoDriver () [pure virtual]
+
+
+ +

Get the video driver.

+
Returns:
Pointer to the video Driver. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneManager::isCulled (const ISceneNodenode) const [pure virtual]
+
+
+ +

Check if node is culled in current view frustum.

+

Please note that depending on the used culling method this check can be rather coarse, or slow. A positive result is correct, though, i.e. if this method returns true the node is positively not visible. The node might still be invisible even if this method returns false.

+
Parameters:
+ + +
nodeThe scene node which is checked for culling.
+
+
+
Returns:
True if node is not visible in the current scene, else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneManager::loadScene (const io::pathfilename,
ISceneUserDataSerializeruserDataSerializer = 0,
ISceneNoderootNode = 0 
) [pure virtual]
+
+
+ +

Loads a scene. Note that the current scene is not cleared before.

+

The scene is usually loaded from an .irr file, an xml based format, but other scene formats can be added to the engine via ISceneManager::addExternalSceneLoader. .irr files can Be edited with the Irrlicht Engine Editor, irrEdit (http://www.ambiera.com/irredit/) or saved directly by the engine using ISceneManager::saveScene().

+
Parameters:
+ + + + +
filenameName of the file to load from.
userDataSerializerIf you want to load user data possibily saved in that file for some scene nodes in the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter.
rootNodeNode which is taken as the root node of the scene. Pass 0 to add the scene directly to the scene manager (which is also the default).
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneManager::loadScene (io::IReadFilefile,
ISceneUserDataSerializeruserDataSerializer = 0,
ISceneNoderootNode = 0 
) [pure virtual]
+
+
+ +

Loads a scene. Note that the current scene is not cleared before.

+

The scene is usually loaded from an .irr file, an xml based format, but other scene formats can be added to the engine via ISceneManager::addExternalSceneLoader. .irr files can Be edited with the Irrlicht Engine Editor, irrEdit (http://www.ambiera.com/irredit/) or saved directly by the engine using ISceneManager::saveScene().

+
Parameters:
+ + + + +
fileFile where the scene is loaded from.
userDataSerializerIf you want to load user data possibily saved in that file for some scene nodes in the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter.
rootNodeNode which is taken as the root node of the scene. Pass 0 to add the scene directly to the scene manager (which is also the default).
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneManager::postEventFromUser (const SEventevent) [pure virtual]
+
+
+ +

Posts an input event to the environment.

+

Usually you do not have to use this method, it is used by the internal engine.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual u32 irr::scene::ISceneManager::registerNodeForRendering (ISceneNodenode,
E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC 
) [pure virtual]
+
+
+ +

Registers a node for rendering it at a specific time.

+

This method should only be used by SceneNodes when they get a ISceneNode::OnRegisterSceneNode() call.

+
Parameters:
+ + + +
node,:Node to register for drawing. Usually scene nodes would set 'this' as parameter here because they want to be drawn.
pass,:Specifies when the node wants to be drawn in relation to the other nodes. For example, if the node is a shadow, it usually wants to be drawn after all other nodes and will use ESNRP_SHADOW for this. See scene::E_SCENE_NODE_RENDER_PASS for details.
+
+
+
Returns:
scene will be rendered ( passed culling )
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::registerSceneNodeAnimatorFactory (ISceneNodeAnimatorFactoryfactoryToAdd) [pure virtual]
+
+
+ +

Adds a scene node animator factory to the scene manager.

+

Use this to extend the scene manager with new scene node animator types which it should be able to create automaticly, for example when loading data from xml files.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::registerSceneNodeFactory (ISceneNodeFactoryfactoryToAdd) [pure virtual]
+
+
+ +

Adds a scene node factory to the scene manager.

+

Use this to extend the scene manager with new scene node types which it should be able to create automaticly, for example when loading data from xml files.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneManager::saveScene (const io::pathfilename,
ISceneUserDataSerializeruserDataSerializer = 0,
ISceneNodenode = 0 
) [pure virtual]
+
+
+ +

Saves the current scene into a file.

+

Scene nodes with the option isDebugObject set to true are not being saved. The scene is usually written to an .irr file, an xml based format. .irr files can Be edited with the Irrlicht Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To load .irr files again, see ISceneManager::loadScene().

+
Parameters:
+ + + + +
filenameName of the file.
userDataSerializerIf you want to save some user data for every scene node into the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter.
nodeNode which is taken as the top node of the scene. This node and all of its descendants are saved into the scene file. Pass 0 or the scene manager to save the full scene (which is also the default).
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneManager::saveScene (io::IWriteFilefile,
ISceneUserDataSerializeruserDataSerializer = 0,
ISceneNodenode = 0 
) [pure virtual]
+
+
+ +

Saves the current scene into a file.

+

Scene nodes with the option isDebugObject set to true are not being saved. The scene is usually written to an .irr file, an xml based format. .irr files can Be edited with the Irrlicht Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To load .irr files again, see ISceneManager::loadScene().

+
Parameters:
+ + + + +
fileFile where the scene is saved into.
userDataSerializerIf you want to save some user data for every scene node into the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter.
nodeNode which is taken as the top node of the scene. This node and all of its descendants are saved into the scene file. Pass 0 or the scene manager to save the full scene (which is also the default).
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ISceneManager::saveScene (io::IXMLWriterwriter,
const io::pathcurrentPath,
ISceneUserDataSerializeruserDataSerializer = 0,
ISceneNodenode = 0 
) [pure virtual]
+
+
+ +

Saves the current scene into a file.

+

Scene nodes with the option isDebugObject set to true are not being saved. The scene is usually written to an .irr file, an xml based format. .irr files can Be edited with the Irrlicht Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To load .irr files again, see ISceneManager::loadScene().

+
Parameters:
+ + + + + +
writerXMLWriter with which the scene is saved.
currentPathPath which is used for relative file names. Usually the directory of the file written into.
userDataSerializerIf you want to save some user data for every scene node into the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter.
nodeNode which is taken as the top node of the scene. This node and all of its descendants are saved into the scene file. Pass 0 or the scene manager to save the full scene (which is also the default).
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::setActiveCamera (ICameraSceneNodecamera) [pure virtual]
+
+
+ +

Sets the currently active camera.

+

The previous active camera will be deactivated.

+
Parameters:
+ + +
camera,:The new camera which should be active.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::setAmbientLight (const video::SColorfambientColor) [pure virtual]
+
+
+ +

Sets ambient color of the scene.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::setLightManager (ILightManagerlightManager) [pure virtual]
+
+
+ +

Register a custom callbacks manager which gets callbacks during scene rendering.

+
Parameters:
+ + +
[in]lightManager,:the new callbacks manager. You may pass 0 to remove the current callbacks manager and restore the default behavior.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneManager::setShadowColor (video::SColor color = video::SColor(150, 0, 0, 0)) [pure virtual]
+
+
+ +

Sets the color of stencil buffers shadows drawn by the scene manager.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.png new file mode 100644 index 0000000..4407705 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_manager.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node-members.html new file mode 100644 index 0000000..4e423ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node-members.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNode Member List
+
+
+This is the complete list of members for irr::scene::ISceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
isDebugObject() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.html new file mode 100644 index 0000000..452b617 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.html @@ -0,0 +1,2157 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNode Class Reference
+
+
+ +

Scene node interface. + More...

+ +

#include <ISceneNode.h>

+
+ + Inheritance diagram for irr::scene::ISceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+ +

+Protected Attributes

+ +

Detailed Description

+

Scene node interface.

+

A scene node is a node in the hierarchical scene graph. Every scene node may have children, which are also scene nodes. Children move relative to their parent's position. If the parent of a node is not visible, its children won't be visible either. In this way, it is for example easily possible to attach a light to a moving car, or to place a walking character on a moving platform on a moving ship.

+ +

Definition at line 40 of file ISceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::ISceneNode::ISceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id = -1,
const core::vector3dfposition = core::vector3df(0,0,0),
const core::vector3dfrotation = core::vector3df(0,0,0),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 45 of file ISceneNode.h.

+ +

References addChild(), and updateAbsolutePosition().

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::ISceneNode::~ISceneNode () [inline, virtual]
+
+ +
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::addAnimator (ISceneNodeAnimatoranimator) [inline, virtual]
+
+
+ +

Adds an animator which should animate this node.

+
Parameters:
+ + +
animatorA pointer to the new animator.
+
+
+ +

Definition at line 348 of file ISceneNode.h.

+ +

References Animators, irr::IReferenceCounted::grab(), and irr::core::list< T >::push_back().

+ +

Referenced by cloneMembers().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::addChild (ISceneNodechild) [inline, virtual]
+
+
+ +

Adds a child to this scene node.

+

If the scene node already has a parent it is first removed from the other parent.

+
Parameters:
+ + +
childA pointer to the new child.
+
+
+ +

Definition at line 280 of file ISceneNode.h.

+ +

References Children, irr::IReferenceCounted::grab(), Parent, irr::core::list< T >::push_back(), remove(), SceneManager, and setSceneManager().

+ +

Referenced by ISceneNode(), and setParent().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneNode::clone (ISceneNodenewParent = 0,
ISceneManagernewManager = 0 
) [inline, virtual]
+
+
+ +

Creates a clone of this scene node and its children.

+
Parameters:
+ + + +
newParentAn optional new parent.
newManagerAn optional new scene manager.
+
+
+
Returns:
The newly created clone of this node.
+ +

Reimplemented in irr::scene::IAnimatedMeshSceneNode.

+ +

Definition at line 741 of file ISceneNode.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::ISceneNode::cloneMembers (ISceneNodetoCopyFrom,
ISceneManagernewManager 
) [inline, protected]
+
+
+ +

A clone function for the ISceneNode members.

+

This method can be used by clone() implementations of derived classes

+
Parameters:
+ + + +
toCopyFromThe node from which the values are copied
newManagerThe new scene manager.
+
+
+ +

Definition at line 757 of file ISceneNode.h.

+ +

References AbsoluteTransformation, addAnimator(), Animators, AutomaticCullingState, irr::core::list< T >::begin(), Children, irr::scene::ISceneNodeAnimator::createClone(), DebugDataVisible, irr::IReferenceCounted::drop(), irr::core::list< T >::end(), ID, IsDebugObject, IsVisible, Name, RelativeRotation, RelativeScale, RelativeTranslation, SceneManager, setTriangleSelector(), and TriangleSelector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISceneNode::deserializeAttributes (io::IAttributesin,
io::SAttributeReadWriteOptionsoptions = 0 
) [inline, virtual]
+
+
+ +

Reads attributes of the scene node.

+

Implement this to set the attributes of your scene node for scripting languages, editors, debuggers or xml deserialization purposes.

+
Parameters:
+ + + +
inThe attribute container to read from.
optionsAdditional options which might influence the deserialization.
+
+
+ +

Reimplemented from irr::io::IAttributeExchangingObject.

+ +

Reimplemented in irr::scene::ICameraSceneNode.

+ +

Definition at line 712 of file ISceneNode.h.

+ +

References irr::scene::AutomaticCullingNames, AutomaticCullingState, DebugDataVisible, irr::io::IAttributes::getAttributeAsBool(), irr::io::IAttributes::getAttributeAsEnumeration(), irr::io::IAttributes::getAttributeAsInt(), irr::io::IAttributes::getAttributeAsString(), irr::io::IAttributes::getAttributeAsVector3d(), ID, IsDebugObject, IsVisible, Name, setPosition(), setRotation(), setScale(), and updateAbsolutePosition().

+ +
+
+ +
+
+ + + + + + + +
virtual core::vector3df irr::scene::ISceneNode::getAbsolutePosition () const [inline, virtual]
+
+
+ +

Gets the absolute position of the node in world coordinates.

+

If you want the position of the node relative to its parent, use getPosition() instead. NOTE: For speed reasons the absolute position is not automatically recalculated on each change of the relative position or by a position change of an parent. Instead the update usually happens once per frame in OnAnimate. You can enforce an update with updateAbsolutePosition().

+
Returns:
The current absolute position of the scene node (updated on last call of updateAbsolutePosition).
+ +

Definition at line 522 of file ISceneNode.h.

+ +

References AbsoluteTransformation, and irr::core::CMatrix4< T >::getTranslation().

+ +
+
+ +
+
+ + + + + + + +
virtual const core::matrix4& irr::scene::ISceneNode::getAbsoluteTransformation () const [inline, virtual]
+
+
+ +

Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.

+

NOTE: For speed reasons the absolute transformation is not automatically recalculated on each change of the relative transformation or by a transformation change of an parent. Instead the update usually happens once per frame in OnAnimate. You can enforce an update with updateAbsolutePosition().

+
Returns:
The absolute transformation matrix.
+ +

Definition at line 193 of file ISceneNode.h.

+ +

References AbsoluteTransformation.

+ +

Referenced by updateAbsolutePosition().

+ +
+
+ +
+
+ + + + + + + +
const core::list<ISceneNodeAnimator*>& irr::scene::ISceneNode::getAnimators () const [inline]
+
+
+ +

Get a list of all scene node animators.

+
Returns:
The list of animators attached to this node.
+ +

Definition at line 360 of file ISceneNode.h.

+ +

References Animators.

+ +
+
+ +
+
+ + + + + + + +
u32 irr::scene::ISceneNode::getAutomaticCulling () const [inline]
+
+
+ +

Gets the automatic culling state.

+
Returns:
The automatic culling state.
+ +

Definition at line 542 of file ISceneNode.h.

+ +

References AutomaticCullingState.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::ISceneNode::getBoundingBox () const [pure virtual]
+
+
+ +

Get the axis aligned, not transformed bounding box of this node.

+

This means that if this node is an animated 3d character, moving in a room, the bounding box will always be around the origin. To get the box in real world coordinates, just transform it with the matrix you receive with getAbsoluteTransformation() or simply use getTransformedBoundingBox(), which does the same.

+
Returns:
The non-transformed bounding box.
+ +

Implemented in irr::scene::IBoneSceneNode, and irr::scene::ITerrainSceneNode.

+ +

Referenced by getTransformedBoundingBox().

+ +
+
+ +
+
+ + + + + + + +
const core::list<ISceneNode*>& irr::scene::ISceneNode::getChildren () const [inline]
+
+
+ +

Returns a const reference to the list of all children.

+
Returns:
The list of all children of this node.
+ +

Definition at line 588 of file ISceneNode.h.

+ +

References Children.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::scene::ISceneNode::getID () const [inline, virtual]
+
+
+ +

Get the id of the scene node.

+

This id can be used to identify the node.

+
Returns:
The id.
+ +

Definition at line 261 of file ISceneNode.h.

+ +

References ID.

+ +
+
+ +
+
+ + + + + + + + +
virtual video::SMaterial& irr::scene::ISceneNode::getMaterial (u32 num) [inline, virtual]
+
+
+ +

Returns the material based on the zero based index i.

+

To get the amount of materials used by this scene node, use getMaterialCount(). This function is needed for inserting the node into the scene hierarchy at an optimal position for minimizing renderstate changes, but can also be used to directly modify the material of a scene node.

+
Parameters:
+ + +
numZero based index. The maximal value is getMaterialCount() - 1.
+
+
+
Returns:
The material at that index.
+ +

Definition at line 406 of file ISceneNode.h.

+ +

References irr::video::IdentityMaterial.

+ +

Referenced by setMaterialFlag(), setMaterialTexture(), and setMaterialType().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneNode::getMaterialCount () const [inline, virtual]
+
+
+ +

Get amount of materials used by this scene node.

+
Returns:
Current amount of materials of this scene node.
+ +

Definition at line 414 of file ISceneNode.h.

+ +

Referenced by setMaterialFlag(), setMaterialTexture(), and setMaterialType().

+ +
+
+ +
+
+ + + + + + + +
virtual const c8* irr::scene::ISceneNode::getName () const [inline, virtual]
+
+
+ +

Returns the name of the node.

+
Returns:
Name as character string.
+ +

Definition at line 143 of file ISceneNode.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and Name.

+ +

Referenced by irr::scene::IBoneSceneNode::getBoneName().

+ +
+
+ +
+
+ + + + + + + +
scene::ISceneNode* irr::scene::ISceneNode::getParent () const [inline]
+
+
+ +

Returns the parent of this scene node.

+
Returns:
A pointer to the parent.
+ +

Definition at line 666 of file ISceneNode.h.

+ +

References Parent.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ISceneNode::getPosition () const [inline, virtual]
+
+
+ +

Gets the position of the node relative to its parent.

+

Note that the position is relative to the parent. If you want the position in world coordinates, use getAbsolutePosition() instead.

+
Returns:
The current position of the node relative to the parent.
+ +

Definition at line 498 of file ISceneNode.h.

+ +

References RelativeTranslation.

+ +

Referenced by serializeAttributes().

+ +
+
+ +
+
+ + + + + + + +
virtual core::matrix4 irr::scene::ISceneNode::getRelativeTransformation () const [inline, virtual]
+
+
+ +

Returns the relative transformation of the scene node.

+

The relative transformation is stored internally as 3 vectors: translation, rotation and scale. To get the relative transformation matrix, it is calculated from these values.

+
Returns:
The relative transformation matrix.
+ +

Definition at line 204 of file ISceneNode.h.

+ +

References RelativeRotation, RelativeScale, RelativeTranslation, irr::core::CMatrix4< T >::setRotationDegrees(), irr::core::CMatrix4< T >::setScale(), and irr::core::CMatrix4< T >::setTranslation().

+ +

Referenced by updateAbsolutePosition().

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ISceneNode::getRotation () const [inline, virtual]
+
+
+ +

Gets the rotation of the node relative to its parent.

+

Note that this is the relative rotation of the node. If you want the absolute rotation, use getAbsoluteTransformation().getRotation()

+
Returns:
Current relative rotation of the scene node.
+ +

Definition at line 479 of file ISceneNode.h.

+ +

References RelativeRotation.

+ +

Referenced by serializeAttributes().

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ISceneNode::getScale () const [inline, virtual]
+
+
+ +

Gets the scale of the scene node relative to its parent.

+

This is the scale of this node relative to its parent. If you want the absolute scale, use getAbsoluteTransformation().getScale()

+
Returns:
The scale of the scene node.
+ +

Definition at line 460 of file ISceneNode.h.

+ +

References RelativeScale.

+ +

Referenced by serializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneManager* irr::scene::ISceneNode::getSceneManager (void ) const [inline, virtual]
+
+
+ +

Retrieve the scene manager for this node.

+
Returns:
The node's scene manager.
+ +

Definition at line 748 of file ISceneNode.h.

+ +

References SceneManager.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32> irr::scene::ISceneNode::getTransformedBoundingBox () const [inline, virtual]
+
+
+ +

Get the axis aligned, transformed and animated absolute bounding box of this node.

+
Returns:
The transformed bounding box.
+ +

Definition at line 178 of file ISceneNode.h.

+ +

References AbsoluteTransformation, getBoundingBox(), and irr::core::CMatrix4< T >::transformBoxEx().

+ +
+
+ +
+
+ + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneNode::getTriangleSelector () const [inline, virtual]
+
+
+ +

Returns the triangle selector attached to this scene node.

+

The Selector can be used by the engine for doing collision detection. You can create a TriangleSelector with ISceneManager::createTriangleSelector() or ISceneManager::createOctreeTriangleSelector and set it with ISceneNode::setTriangleSelector(). If a scene node got no triangle selector, but collision tests should be done with it, a triangle selector is created using the bounding box of the scene node.

+
Returns:
A pointer to the TriangleSelector or 0, if there is none.
+ +

Definition at line 620 of file ISceneNode.h.

+ +

References TriangleSelector.

+ +
+
+ +
+
+ + + + + + + +
virtual ESCENE_NODE_TYPE irr::scene::ISceneNode::getType () const [inline, virtual]
+
+
+ +

Returns type of the scene node.

+
Returns:
The type of this node.
+ +

Reimplemented in irr::scene::IVolumeLightSceneNode.

+ +

Definition at line 674 of file ISceneNode.h.

+ +

References irr::scene::ESNT_UNKNOWN.

+ +
+
+ +
+
+ + + + + + + +
u32 irr::scene::ISceneNode::isDebugDataVisible () const [inline]
+
+
+ +

Returns if debug data like bounding boxes are drawn.

+
Returns:
A bitwise OR of the debug data values from irr::scene::E_DEBUG_SCENE_TYPE that are currently visible.
+ +

Definition at line 560 of file ISceneNode.h.

+ +

References DebugDataVisible.

+ +
+
+ +
+
+ + + + + + + +
bool irr::scene::ISceneNode::isDebugObject () const [inline]
+
+
+ +

Returns if this scene node is a debug object.

+

Debug objects have some special properties, for example they can be easily excluded from collision detection or from serialization, etc.

+
Returns:
If this node is a debug object, true is returned.
+ +

Definition at line 579 of file ISceneNode.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsDebugObject.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ISceneNode::isTrulyVisible () const [inline, virtual]
+
+
+ +

Check whether the node is truly visible, taking into accounts its parents' visibility.

+
Returns:
true if the node and all its parents are visible, false if this or any parent node is invisible.
+ +

Definition at line 235 of file ISceneNode.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, isTrulyVisible(), IsVisible, and Parent.

+ +

Referenced by isTrulyVisible().

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ISceneNode::isVisible () const [inline, virtual]
+
+
+ +

Returns whether the node should be visible (if all of its parents are visible).

+

This is only an option set by the user, but has nothing to do with geometry culling

+
Returns:
The requested visibility of the node, true means visible (if all parents are also visible).
+ +

Definition at line 226 of file ISceneNode.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsVisible.

+ +

Referenced by setVisible().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::OnAnimate (u32 timeMs) [inline, virtual]
+
+
+ +

OnAnimate() is called just before rendering the whole scene.

+

Nodes may calculate or store animations here, and may do other useful things, depending on what they are. Also, OnAnimate() should be called for all child scene nodes here. This method will be called once per frame, independent of whether the scene node is visible or not.

+
Parameters:
+ + +
timeMsCurrent time in milliseconds.
+
+
+ +

Reimplemented in irr::scene::IBoneSceneNode.

+ +

Definition at line 108 of file ISceneNode.h.

+ +

References irr::scene::ISceneNodeAnimator::animateNode(), Animators, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), IsVisible, and updateAbsolutePosition().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneNode::OnRegisterSceneNode () [inline, virtual]
+
+
+ +

This method is called just before the rendering process of the whole scene.

+

Nodes may register themselves in the render pipeline during this call, precalculate the geometry which should be renderered, and prevent their children from being able to register themselves if they are clipped by simply not calling their OnRegisterSceneNode method. If you are implementing your own scene node, you should overwrite this method with an implementation code looking like this:

+
        if (IsVisible)
+            SceneManager->registerNodeForRendering(this);
+
+        ISceneNode::OnRegisterSceneNode();
+
+

Definition at line 91 of file ISceneNode.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and IsVisible.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneNode::remove () [inline, virtual]
+
+
+ +

Removes this scene node from the scene.

+

If no other grab exists for this node, it will be deleted.

+ +

Definition at line 339 of file ISceneNode.h.

+ +

References Parent, and removeChild().

+ +

Referenced by addChild().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneNode::removeAll () [inline, virtual]
+
+
+ +

Removes all children of this scene node.

+

The scene nodes found in the children list are also dropped and might be deleted if no other grab exists on them.

+ +

Definition at line 323 of file ISceneNode.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::clear(), and irr::core::list< T >::end().

+ +

Referenced by ~ISceneNode().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::removeAnimator (ISceneNodeAnimatoranimator) [inline, virtual]
+
+
+ +

Removes an animator from this scene node.

+

If the animator is found, it is also dropped and might be deleted if not other grab exists for it.

+
Parameters:
+ + +
animatorA pointer to the animator to be deleted.
+
+
+ +

Definition at line 370 of file ISceneNode.h.

+ +

References Animators, irr::core::list< T >::begin(), irr::core::list< T >::end(), and irr::core::list< T >::erase().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneNode::removeAnimators () [inline, virtual]
+
+
+ +

Removes all animators from this scene node.

+

The animators might also be deleted if no other grab exists for them.

+ +

Definition at line 388 of file ISceneNode.h.

+ +

References Animators, irr::core::list< T >::begin(), irr::core::list< T >::clear(), and irr::core::list< T >::end().

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneNode::removeChild (ISceneNodechild) [inline, virtual]
+
+
+ +

Removes a child from this scene node.

+

If found in the children list, the child pointer is also dropped and might be deleted if no other grab exists.

+
Parameters:
+ + +
childA pointer to the child which shall be removed.
+
+
+
Returns:
True if the child was removed, and false if not, e.g. because it couldn't be found in the children list.
+ +

Definition at line 302 of file ISceneNode.h.

+ +

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and irr::core::list< T >::erase().

+ +

Referenced by remove().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneNode::render () [pure virtual]
+
+
+ +

Renders the node.

+ +

Implemented in irr::scene::IBoneSceneNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISceneNode::serializeAttributes (io::IAttributesout,
io::SAttributeReadWriteOptionsoptions = 0 
) const [inline, virtual]
+
+
+ +

Writes attributes of the scene node.

+

Implement this to expose the attributes of your scene node for scripting languages, editors, debuggers or xml serialization purposes.

+
Parameters:
+ + + +
outThe attribute container to write into.
optionsAdditional options which might influence the serialization.
+
+
+ +

Reimplemented from irr::io::IAttributeExchangingObject.

+ +

Reimplemented in irr::scene::ICameraSceneNode.

+ +

Definition at line 687 of file ISceneNode.h.

+ +

References irr::io::IAttributes::addBool(), irr::io::IAttributes::addInt(), irr::io::IAttributes::addString(), irr::io::IAttributes::addVector3d(), AutomaticCullingState, irr::core::string< T, TAlloc >::c_str(), DebugDataVisible, getPosition(), getRotation(), getScale(), ID, IsDebugObject, IsVisible, and Name.

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::ISceneNode::setAutomaticCulling (u32 state) [inline]
+
+
+ +

Enables or disables automatic culling based on the bounding box.

+

Automatic culling is enabled by default. Note that not all SceneNodes support culling and that some nodes always cull their geometry because it is their only reason for existence, for example the OctreeSceneNode.

+
Parameters:
+ + +
stateThe culling state to be used.
+
+
+ +

Definition at line 534 of file ISceneNode.h.

+ +

References AutomaticCullingState.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setDebugDataVisible (u32 state) [inline, virtual]
+
+
+ +

Sets if debug data like bounding boxes should be drawn.

+

A bitwise OR of the types from irr::scene::E_DEBUG_SCENE_TYPE. Please note that not all scene nodes support all debug data types.

+
Parameters:
+ + +
stateThe debug data visibility state to be used.
+
+
+ +

Definition at line 552 of file ISceneNode.h.

+ +

References DebugDataVisible.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setID (s32 id) [inline, virtual]
+
+
+ +

Sets the id of the scene node.

+

This id can be used to identify the node.

+
Parameters:
+ + +
idThe new id.
+
+
+ +

Definition at line 270 of file ISceneNode.h.

+ +

References ID.

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::ISceneNode::setIsDebugObject (bool debugObject) [inline]
+
+
+ +

Sets if this scene node is a debug object.

+

Debug objects have some special properties, for example they can be easily excluded from collision detection or from serialization, etc.

+ +

Definition at line 569 of file ISceneNode.h.

+ +

References IsDebugObject.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::ISceneNode::setMaterialFlag (video::E_MATERIAL_FLAG flag,
bool newvalue 
) [inline]
+
+
+ +

Sets all material flags at once to a new value.

+

Useful, for example, if you want the whole mesh to be affected by light.

+
Parameters:
+ + + +
flagWhich flag of all materials to be set.
newvalueNew value of that flag.
+
+
+ +

Definition at line 425 of file ISceneNode.h.

+ +

References getMaterial(), getMaterialCount(), and irr::video::SMaterial::setFlag().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::ISceneNode::setMaterialTexture (u32 textureLayer,
video::ITexturetexture 
) [inline]
+
+
+ +

Sets the texture of the specified layer in all materials of this scene node to the new texture.

+
Parameters:
+ + + +
textureLayerLayer of texture to be set. Must be a value smaller than MATERIAL_MAX_TEXTURES.
textureNew texture to be used.
+
+
+ +

Definition at line 436 of file ISceneNode.h.

+ +

References getMaterial(), getMaterialCount(), irr::video::MATERIAL_MAX_TEXTURES, and irr::video::SMaterial::setTexture().

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::ISceneNode::setMaterialType (video::E_MATERIAL_TYPE newType) [inline]
+
+
+ +

Sets the material type of all materials in this scene node to a new material type.

+
Parameters:
+ + +
newTypeNew type of material to be set.
+
+
+ +

Definition at line 448 of file ISceneNode.h.

+ +

References getMaterial(), getMaterialCount(), and irr::video::SMaterial::MaterialType.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setName (const c8name) [inline, virtual]
+
+
+ +

Sets the name of the node.

+
Parameters:
+ + +
nameNew name of the scene node.
+
+
+ +

Definition at line 151 of file ISceneNode.h.

+ +

References Name.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setName (const core::stringcname) [inline, virtual]
+
+
+ +

Sets the name of the node.

+
Parameters:
+ + +
nameNew name of the scene node.
+
+
+ +

Definition at line 159 of file ISceneNode.h.

+ +

References Name.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setParent (ISceneNodenewParent) [inline, virtual]
+
+
+ +

Changes the parent of the scene node.

+
Parameters:
+ + +
newParentThe new parent to be used.
+
+
+ +

Definition at line 596 of file ISceneNode.h.

+ +

References addChild(), irr::IReferenceCounted::drop(), irr::IReferenceCounted::grab(), and Parent.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setPosition (const core::vector3dfnewpos) [inline, virtual]
+
+
+ +

Sets the position of the node relative to its parent.

+

Note that the position is relative to the parent.

+
Parameters:
+ + +
newposNew relative position of the scene node.
+
+
+ +

Definition at line 507 of file ISceneNode.h.

+ +

References RelativeTranslation.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setRotation (const core::vector3dfrotation) [inline, virtual]
+
+
+ +

Sets the rotation of the node relative to its parent.

+

This only modifies the relative rotation of the node.

+
Parameters:
+ + +
rotationNew rotation of the node in degrees.
+
+
+ +

Reimplemented in irr::scene::ICameraSceneNode.

+ +

Definition at line 488 of file ISceneNode.h.

+ +

References RelativeRotation.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setScale (const core::vector3dfscale) [inline, virtual]
+
+
+ +

Sets the relative scale of the scene node.

+
Parameters:
+ + +
scaleNew scale of the node, relative to its parent.
+
+
+ +

Definition at line 468 of file ISceneNode.h.

+ +

References RelativeScale.

+ +

Referenced by deserializeAttributes().

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::ISceneNode::setSceneManager (ISceneManagernewManager) [inline, protected]
+
+
+

Sets the new scene manager for this node and all children. Called by addChild when moving nodes between scene managers

+ +

Definition at line 798 of file ISceneNode.h.

+ +

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and SceneManager.

+ +

Referenced by addChild().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setTriangleSelector (ITriangleSelectorselector) [inline, virtual]
+
+
+ +

Sets the triangle selector of the scene node.

+

The Selector can be used by the engine for doing collision detection. You can create a TriangleSelector with ISceneManager::createTriangleSelector() or ISceneManager::createOctreeTriangleSelector(). Some nodes may create their own selector by default, so it would be good to check if there is already a selector in this node by calling ISceneNode::getTriangleSelector().

+
Parameters:
+ + +
selectorNew triangle selector for this scene node.
+
+
+ +

Definition at line 635 of file ISceneNode.h.

+ +

References irr::IReferenceCounted::drop(), irr::IReferenceCounted::grab(), and TriangleSelector.

+ +

Referenced by cloneMembers().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNode::setVisible (bool isVisible) [inline, virtual]
+
+
+ +

Sets if the node should be visible or not.

+

All children of this node won't be visible either, when set to false. Invisible nodes are not valid candidates for selection by collision manager bounding box methods.

+
Parameters:
+ + +
isVisibleIf the node shall be visible.
+
+
+ +

Reimplemented in irr::scene::ILightSceneNode.

+ +

Definition at line 252 of file ISceneNode.h.

+ +

References isVisible(), and IsVisible.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISceneNode::updateAbsolutePosition () [inline, virtual]
+
+
+ +

Updates the absolute position based on the relative and the parents position.

+

Note: This does not recursively update the parents absolute positions, so if you have a deeper hierarchy you might want to update the parents first.

+ +

Definition at line 652 of file ISceneNode.h.

+ +

References AbsoluteTransformation, getAbsoluteTransformation(), getRelativeTransformation(), and Parent.

+ +

Referenced by deserializeAttributes(), ISceneNode(), and OnAnimate().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Absolute transformation of the node.

+ +

Definition at line 811 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), getAbsolutePosition(), getAbsoluteTransformation(), getTransformedBoundingBox(), and updateAbsolutePosition().

+ +
+
+ +
+ +
+ +

List of all animator nodes.

+ +

Definition at line 829 of file ISceneNode.h.

+ +

Referenced by addAnimator(), cloneMembers(), getAnimators(), OnAnimate(), removeAnimator(), removeAnimators(), and ~ISceneNode().

+ +
+
+ +
+ +
+ +

Automatic culling state.

+ +

Definition at line 841 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), getAutomaticCulling(), serializeAttributes(), and setAutomaticCulling().

+ +
+
+ +
+ +
+ +

List of all children of this node.

+ +

Definition at line 826 of file ISceneNode.h.

+ +

Referenced by addChild(), cloneMembers(), getChildren(), OnAnimate(), OnRegisterSceneNode(), removeAll(), removeChild(), and setSceneManager().

+ +
+
+ +
+ +
+ +

Flag if debug data should be drawn, such as Bounding Boxes.

+ +

Definition at line 844 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), isDebugDataVisible(), serializeAttributes(), and setDebugDataVisible().

+ +
+
+ +
+
+ + + + +
s32 irr::scene::ISceneNode::ID [protected]
+
+
+ +

ID of the node.

+ +

Definition at line 838 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), getID(), serializeAttributes(), and setID().

+ +
+
+ +
+
+ + + + +
bool irr::scene::ISceneNode::IsDebugObject [protected]
+
+
+ +

Is debug object?

+ +

Definition at line 850 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), isDebugObject(), serializeAttributes(), and setIsDebugObject().

+ +
+
+ +
+
+ + + + +
bool irr::scene::ISceneNode::IsVisible [protected]
+
+
+ +

Is the node visible?

+ +

Definition at line 847 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), isTrulyVisible(), isVisible(), OnAnimate(), OnRegisterSceneNode(), serializeAttributes(), and setVisible().

+ +
+
+ +
+ +
+ +

Name of the scene node.

+ +

Definition at line 808 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), deserializeAttributes(), getName(), serializeAttributes(), and setName().

+ +
+
+ +
+
+ + + + +
ISceneNode* irr::scene::ISceneNode::Parent [protected]
+
+
+ +

Pointer to the parent.

+ +

Definition at line 823 of file ISceneNode.h.

+ +

Referenced by addChild(), getParent(), isTrulyVisible(), remove(), setParent(), and updateAbsolutePosition().

+ +
+
+ +
+ +
+ +

Relative rotation of the scene node.

+ +

Definition at line 817 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), getRelativeTransformation(), getRotation(), and setRotation().

+ +
+
+ +
+ +
+ +

Relative scale of the scene node.

+ +

Definition at line 820 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), getRelativeTransformation(), getScale(), and setScale().

+ +
+
+ +
+ +
+ +

Relative translation of the scene node.

+ +

Definition at line 814 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), getPosition(), getRelativeTransformation(), and setPosition().

+ +
+
+ +
+ +
+ +

Pointer to the scene manager.

+ +

Definition at line 832 of file ISceneNode.h.

+ +

Referenced by addChild(), cloneMembers(), getSceneManager(), and setSceneManager().

+ +
+
+ +
+ +
+ +

Pointer to the triangle selector.

+ +

Definition at line 835 of file ISceneNode.h.

+ +

Referenced by cloneMembers(), getTriangleSelector(), setTriangleSelector(), and ~ISceneNode().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.png new file mode 100644 index 0000000..5618914 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator-members.html new file mode 100644 index 0000000..88faa70 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator-members.html @@ -0,0 +1,136 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNodeAnimator Member List
+
+
+This is the complete list of members for irr::scene::ISceneNodeAnimator, including all inherited members. + + + + + + + + + + + + + + + + +
animateNode(ISceneNode *node, u32 timeMs)=0irr::scene::ISceneNodeAnimator [pure virtual]
createClone(ISceneNode *node, ISceneManager *newManager=0)=0irr::scene::ISceneNodeAnimator [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const irr::scene::ISceneNodeAnimator [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasFinished(void) const irr::scene::ISceneNodeAnimator [inline, virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isEventReceiverEnabled() const irr::scene::ISceneNodeAnimator [inline, virtual]
OnEvent(const SEvent &event)irr::scene::ISceneNodeAnimator [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.html new file mode 100644 index 0000000..cda9af4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.html @@ -0,0 +1,325 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNodeAnimator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNodeAnimator Class Reference
+
+
+ +

Animates a scene node. Can animate position, rotation, material, and so on. + More...

+ +

#include <ISceneNodeAnimator.h>

+
+ + Inheritance diagram for irr::scene::ISceneNodeAnimator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Animates a scene node. Can animate position, rotation, material, and so on.

+

A scene node animator is able to animate a scene node in a very simple way. It may change its position, rotation, scale and/or material. There are lots of animators to choose from. You can create scene node animators with the ISceneManager interface.

+ +

Definition at line 30 of file ISceneNodeAnimator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISceneNodeAnimator::animateNode (ISceneNodenode,
u32 timeMs 
) [pure virtual]
+
+
+ +

Animates a scene node.

+
Parameters:
+ + + +
nodeNode to animate.
timeMsCurrent time in milli seconds.
+
+
+ +

Referenced by irr::scene::ISceneNode::OnAnimate().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneNodeAnimator::createClone (ISceneNodenode,
ISceneManagernewManager = 0 
) [pure virtual]
+
+
+ +

Creates a clone of this animator.

+

Please note that you will have to drop (IReferenceCounted::drop()) the returned pointer after calling this.

+ +

Referenced by irr::scene::ISceneNode::cloneMembers().

+ +
+
+ +
+
+ + + + + + + +
virtual ESCENE_NODE_ANIMATOR_TYPE irr::scene::ISceneNodeAnimator::getType () const [inline, virtual]
+
+
+ +

Returns type of the scene node animator.

+ +

Definition at line 59 of file ISceneNodeAnimator.h.

+ +

References irr::scene::ESNAT_UNKNOWN.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneNodeAnimator::hasFinished (void ) const [inline, virtual]
+
+
+ +

Returns if the animator has finished.

+

This is only valid for non-looping animators with a discrete end state.

+
Returns:
true if the animator has finished, false if it is still running.
+ +

Definition at line 67 of file ISceneNodeAnimator.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ISceneNodeAnimator::isEventReceiverEnabled () const [inline, virtual]
+
+
+ +

Returns true if this animator receives events.

+

When attached to an active camera, this animator will be able to respond to events such as mouse and keyboard events.

+ +

Definition at line 47 of file ISceneNodeAnimator.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISceneNodeAnimator::OnEvent (const SEventevent) [inline, virtual]
+
+
+ +

Event receiver, override this function for camera controlling animators.

+ +

Implements irr::IEventReceiver.

+ +

Definition at line 53 of file ISceneNodeAnimator.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.png new file mode 100644 index 0000000..aebcc23 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s-members.html new file mode 100644 index 0000000..a7e707f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s-members.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNodeAnimatorCameraFPS Member List
+
+
+This is the complete list of members for irr::scene::ISceneNodeAnimatorCameraFPS, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
animateNode(ISceneNode *node, u32 timeMs)=0irr::scene::ISceneNodeAnimator [pure virtual]
createClone(ISceneNode *node, ISceneManager *newManager=0)=0irr::scene::ISceneNodeAnimator [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getKeyMap() const =0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
getMoveSpeed() const =0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRotateSpeed() const =0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
getType() const irr::scene::ISceneNodeAnimator [inline, virtual]
grab() const irr::IReferenceCounted [inline]
hasFinished(void) const irr::scene::ISceneNodeAnimator [inline, virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isEventReceiverEnabled() const irr::scene::ISceneNodeAnimator [inline, virtual]
OnEvent(const SEvent &event)irr::scene::ISceneNodeAnimator [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setInvertMouse(bool invert)=0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
setKeyMap(SKeyMap *map, u32 count)=0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
setKeyMap(const core::array< SKeyMap > &keymap)=0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
setMoveSpeed(f32 moveSpeed)=0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
setRotateSpeed(f32 rotateSpeed)=0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
setVerticalMovement(bool allow)=0irr::scene::ISceneNodeAnimatorCameraFPS [pure virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.html new file mode 100644 index 0000000..0274fd8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.html @@ -0,0 +1,361 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNodeAnimatorCameraFPS Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNodeAnimatorCameraFPS Class Reference
+
+
+ +

Special scene node animator for FPS cameras. + More...

+ +

#include <ISceneNodeAnimatorCameraFPS.h>

+
+ + Inheritance diagram for irr::scene::ISceneNodeAnimatorCameraFPS:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Special scene node animator for FPS cameras.

+

This scene node animator can be attached to a camera to make it act like a first person shooter

+ +

Definition at line 23 of file ISceneNodeAnimatorCameraFPS.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::array<SKeyMap>& irr::scene::ISceneNodeAnimatorCameraFPS::getKeyMap () const [pure virtual]
+
+
+ +

Gets the keyboard mapping for this animator.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ISceneNodeAnimatorCameraFPS::getMoveSpeed () const [pure virtual]
+
+
+ +

Returns the speed of movement in units per millisecond.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ISceneNodeAnimatorCameraFPS::getRotateSpeed () const [pure virtual]
+
+
+ +

Returns the rotation speed in degrees.

+

The degrees are equivalent to a half screen movement of the mouse, i.e. if the mouse cursor had been moved to the border of the screen since the last animation.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraFPS::setInvertMouse (bool invert) [pure virtual]
+
+
+ +

Sets whether the Y axis of the mouse should be inverted.

+

If enabled then moving the mouse down will cause the camera to look up. It is disabled by default.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraFPS::setKeyMap (SKeyMapmap,
u32 count 
) [pure virtual]
+
+
+ +

Sets the keyboard mapping for this animator (old style)

+
Parameters:
+ + + +
mapArray of keyboard mappings, see irr::SKeyMap
countSize of the keyboard map array.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraFPS::setKeyMap (const core::array< SKeyMap > & keymap) [pure virtual]
+
+
+

Sets the keyboard mapping for this animator

+
Parameters:
+ + +
keymapThe new keymap array
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraFPS::setMoveSpeed (f32 moveSpeed) [pure virtual]
+
+
+ +

Sets the speed of movement in units per millisecond.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraFPS::setRotateSpeed (f32 rotateSpeed) [pure virtual]
+
+
+ +

Set the rotation speed in degrees.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraFPS::setVerticalMovement (bool allow) [pure virtual]
+
+
+ +

Sets whether vertical movement should be allowed.

+

If vertical movement is enabled then the camera may fight with gravity causing camera shake. Disable this if the camera has a collision animator with gravity enabled.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.png new file mode 100644 index 0000000..1f90e10 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya-members.html new file mode 100644 index 0000000..e159793 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya-members.html @@ -0,0 +1,144 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNodeAnimatorCameraMaya Member List
+
+
+This is the complete list of members for irr::scene::ISceneNodeAnimatorCameraMaya, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + +
animateNode(ISceneNode *node, u32 timeMs)=0irr::scene::ISceneNodeAnimator [pure virtual]
createClone(ISceneNode *node, ISceneManager *newManager=0)=0irr::scene::ISceneNodeAnimator [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getDistance() const =0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
getMoveSpeed() const =0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRotateSpeed() const =0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
getType() const irr::scene::ISceneNodeAnimator [inline, virtual]
getZoomSpeed() const =0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
grab() const irr::IReferenceCounted [inline]
hasFinished(void) const irr::scene::ISceneNodeAnimator [inline, virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isEventReceiverEnabled() const irr::scene::ISceneNodeAnimator [inline, virtual]
OnEvent(const SEvent &event)irr::scene::ISceneNodeAnimator [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDistance(f32 distance)=0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
setMoveSpeed(f32 moveSpeed)=0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
setRotateSpeed(f32 rotateSpeed)=0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
setZoomSpeed(f32 zoomSpeed)=0irr::scene::ISceneNodeAnimatorCameraMaya [pure virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.html new file mode 100644 index 0000000..5010b73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.html @@ -0,0 +1,314 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNodeAnimatorCameraMaya Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNodeAnimatorCameraMaya Class Reference
+
+
+ +

Special scene node animator for Maya-style cameras. + More...

+ +

#include <ISceneNodeAnimatorCameraMaya.h>

+
+ + Inheritance diagram for irr::scene::ISceneNodeAnimatorCameraMaya:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Special scene node animator for Maya-style cameras.

+

This scene node animator can be attached to a camera to make it act like a 3d modelling tool. The camera is moving relative to the target with the mouse, by pressing either of the three buttons. In order to move the camera, set a new target for the camera. The distance defines the current orbit radius the camera moves on. Distance can be changed via the setter or by mouse events.

+ +

Definition at line 25 of file ISceneNodeAnimatorCameraMaya.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual f32 irr::scene::ISceneNodeAnimatorCameraMaya::getDistance () const [pure virtual]
+
+
+ +

Returns the current distance, i.e. orbit radius.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ISceneNodeAnimatorCameraMaya::getMoveSpeed () const [pure virtual]
+
+
+ +

Returns the speed of movement.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ISceneNodeAnimatorCameraMaya::getRotateSpeed () const [pure virtual]
+
+
+ +

Returns the rotation speed.

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::ISceneNodeAnimatorCameraMaya::getZoomSpeed () const [pure virtual]
+
+
+ +

Returns the zoom speed.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraMaya::setDistance (f32 distance) [pure virtual]
+
+
+ +

Set the distance.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraMaya::setMoveSpeed (f32 moveSpeed) [pure virtual]
+
+
+ +

Sets the speed of movement.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraMaya::setRotateSpeed (f32 rotateSpeed) [pure virtual]
+
+
+ +

Set the rotation speed.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCameraMaya::setZoomSpeed (f32 zoomSpeed) [pure virtual]
+
+
+ +

Set the zoom speed.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.png new file mode 100644 index 0000000..e300f53 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response-members.html new file mode 100644 index 0000000..79af413 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response-members.html @@ -0,0 +1,157 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNodeAnimatorCollisionResponse Member List
+
+
+This is the complete list of members for irr::scene::ISceneNodeAnimatorCollisionResponse, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
animateNode(ISceneNode *node, u32 timeMs)=0irr::scene::ISceneNodeAnimator [pure virtual]
collisionOccurred() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
createClone(ISceneNode *node, ISceneManager *newManager=0)=0irr::scene::ISceneNodeAnimator [pure virtual]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::io::IAttributeExchangingObject [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAnimateTarget() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getCollisionNode(void) const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getCollisionPoint() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getCollisionResultPosition(void) const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getCollisionTriangle() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getEllipsoidRadius() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getEllipsoidTranslation() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getGravity() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTargetNode(void) const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
getType() const irr::scene::ISceneNodeAnimator [inline, virtual]
getWorld() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
grab() const irr::IReferenceCounted [inline]
hasFinished(void) const irr::scene::ISceneNodeAnimator [inline, virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isEventReceiverEnabled() const irr::scene::ISceneNodeAnimator [inline, virtual]
isFalling() const =0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
jump(f32 jumpSpeed)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
OnEvent(const SEvent &event)irr::scene::ISceneNodeAnimator [inline, virtual]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::io::IAttributeExchangingObject [inline, virtual]
setAnimateTarget(bool enable)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
setCollisionCallback(ICollisionCallback *callback)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setEllipsoidRadius(const core::vector3df &radius)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
setEllipsoidTranslation(const core::vector3df &translation)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
setGravity(const core::vector3df &gravity)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
setTargetNode(ISceneNode *node)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
setWorld(ITriangleSelector *newWorld)=0irr::scene::ISceneNodeAnimatorCollisionResponse [pure virtual]
~IEventReceiver()irr::IEventReceiver [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNodeAnimatorCollisionResponse()irr::scene::ISceneNodeAnimatorCollisionResponse [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.html new file mode 100644 index 0000000..05f89be --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.html @@ -0,0 +1,624 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNodeAnimatorCollisionResponse Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNodeAnimatorCollisionResponse Class Reference
+
+
+ +

Special scene node animator for doing automatic collision detection and response. + More...

+ +

#include <ISceneNodeAnimatorCollisionResponse.h>

+
+ + Inheritance diagram for irr::scene::ISceneNodeAnimatorCollisionResponse:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Special scene node animator for doing automatic collision detection and response.

+

This scene node animator can be attached to any single scene node and will then prevent it from moving through specified collision geometry (e.g. walls and floors of the) world, as well as having it fall under gravity. This animator provides a simple implementation of first person shooter cameras. Attach it to a camera, and the camera will behave as the player control in a first person shooter game: The camera stops and slides at walls, walks up stairs, falls down if there is no floor under it, and so on.

+

The animator will treat any change in the position of its target scene node as movement, including a setPosition(), as movement. If you want to teleport the target scene node manually to a location without it being effected by collision geometry, then call setTargetNode(node) after calling node->setPosition().

+ +

Definition at line 53 of file ISceneNodeAnimatorCollisionResponse.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::ISceneNodeAnimatorCollisionResponse::~ISceneNodeAnimatorCollisionResponse () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 58 of file ISceneNodeAnimatorCollisionResponse.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual bool irr::scene::ISceneNodeAnimatorCollisionResponse::collisionOccurred () const [pure virtual]
+
+
+ +

Returns true if a collision occurred during the last animateNode()

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ISceneNodeAnimatorCollisionResponse::getAnimateTarget () const [pure virtual]
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneNode* irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionNode (void ) const [pure virtual]
+
+
+ +

Returns the node that was collided with.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionPoint () const [pure virtual]
+
+
+ +

Returns the last point of collision.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionResultPosition (void ) const [pure virtual]
+
+
+ +

Returns the position that the target node will be moved to, unless the collision is consumed in a callback.

+

If you have a collision callback registered, and it consumes the collision, then the node will ignore the collision and will not stop at this position. Instead, it will move fully to the position that caused the collision to occur.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::triangle3df& irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionTriangle () const [pure virtual]
+
+
+ +

Returns the last triangle that caused a collision.

+ +
+
+ +
+
+ + + + + + + +
virtual core::vector3df irr::scene::ISceneNodeAnimatorCollisionResponse::getEllipsoidRadius () const [pure virtual]
+
+
+ +

Returns the radius of the ellipsoid for collision detection and response.

+
Returns:
Radius of the ellipsoid.
+ +
+
+ +
+
+ + + + + + + +
virtual core::vector3df irr::scene::ISceneNodeAnimatorCollisionResponse::getEllipsoidTranslation () const [pure virtual]
+
+
+ +

Get the translation of the ellipsoid for collision detection.

+

See ISceneNodeAnimatorCollisionResponse::setEllipsoidTranslation() for more details.

+
Returns:
Translation of the ellipsoid relative to the position of the scene node.
+ +
+
+ +
+
+ + + + + + + +
* virtual core::vector3df irr::scene::ISceneNodeAnimatorCollisionResponse::getGravity () const [pure virtual]
+
+
+

Get current vector of gravity.

+
Returns:
Gravity vector.
+ +
+
+ +
+
+ + + + + + + + +
virtual ISceneNode* irr::scene::ISceneNodeAnimatorCollisionResponse::getTargetNode (void ) const [pure virtual]
+
+
+ +

Gets the single node that this animator is acting on.

+
Returns:
The node that this animator is acting on.
+ +
+
+ +
+
+ + + + + + + +
virtual ITriangleSelector* irr::scene::ISceneNodeAnimatorCollisionResponse::getWorld () const [pure virtual]
+
+
+ +

Get the current triangle selector containing all triangles for collision detection.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ISceneNodeAnimatorCollisionResponse::isFalling () const [pure virtual]
+
+
+ +

Check if the attached scene node is falling.

+

Falling means that there is no blocking wall from the scene node in the direction of the gravity. The implementation of this method is very fast, no collision detection is done when invoking it.

+
Returns:
True if the scene node is falling, false if not.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::jump (f32 jumpSpeed) [pure virtual]
+
+
+ +

'Jump' the animator, by adding a jump speed opposite to its gravity

+
Parameters:
+ + +
jumpSpeedThe initial speed of the jump; the velocity will be opposite to this animator's gravity vector.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setAnimateTarget (bool enable) [pure virtual]
+
+
+ +

Should the Target react on collision ( default = true )

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setCollisionCallback (ICollisionCallbackcallback) [pure virtual]
+
+
+ +

Sets a callback interface which will be called if a collision occurs.

+
Parameters:
+ + +
callback,:collision callback handler that will be called when a collision occurs. Set this to 0 to disable the callback.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setEllipsoidRadius (const core::vector3dfradius) [pure virtual]
+
+
+ +

Sets the radius of the ellipsoid for collision detection and response.

+

If you have a scene node, and you are unsure about how big the radius should be, you could use the following code to determine it:

+
        core::aabbox<f32> box = yourSceneNode->getBoundingBox();
+        core::vector3df radius = box.MaxEdge - box.getCenter();
+
Parameters:
+ + +
radius,:New radius of the ellipsoid.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setEllipsoidTranslation (const core::vector3dftranslation) [pure virtual]
+
+
+ +

Set translation of the collision ellipsoid.

+

By default, the ellipsoid for collision detection is created around the center of the scene node, which means that the ellipsoid surrounds it completely. If this is not what you want, you may specify a translation for the ellipsoid.

+
Parameters:
+ + +
translation,:Translation of the ellipsoid relative to the position of the scene node.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setGravity (const core::vector3dfgravity) [pure virtual]
+
+
+ +

Sets the gravity of the environment.

+

A good example value would be core::vector3df(0,-100.0f,0) for letting gravity affect all object to fall down. For bigger gravity, make increase the length of the vector. You can disable gravity by setting it to core::vector3df(0,0,0);

+
Parameters:
+ + +
gravity,:New gravity vector.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setTargetNode (ISceneNodenode) [pure virtual]
+
+
+ +

Set the single node that this animator will act on.

+
Parameters:
+ + +
nodeThe new target node. Setting this will force the animator to update its last target position for the node, allowing setPosition() to teleport the node through collision geometry.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneNodeAnimatorCollisionResponse::setWorld (ITriangleSelectornewWorld) [pure virtual]
+
+
+ +

Sets a triangle selector holding all triangles of the world with which the scene node may collide.

+
Parameters:
+ + +
newWorld,:New triangle selector containing triangles to let the scene node collide with.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.png new file mode 100644 index 0000000..88f5802 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_collision_response.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory-members.html new file mode 100644 index 0000000..816e89d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNodeAnimatorFactory Member List
+
+
+This is the complete list of members for irr::scene::ISceneNodeAnimatorFactory, including all inherited members. + + + + + + + + + + + + + +
createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode *target)=0irr::scene::ISceneNodeAnimatorFactory [pure virtual]
createSceneNodeAnimator(const c8 *typeName, ISceneNode *target)=0irr::scene::ISceneNodeAnimatorFactory [pure virtual]
drop() const irr::IReferenceCounted [inline]
getCreatableSceneNodeAnimatorTypeCount() const =0irr::scene::ISceneNodeAnimatorFactory [pure virtual]
getCreateableSceneNodeAnimatorType(u32 idx) const =0irr::scene::ISceneNodeAnimatorFactory [pure virtual]
getCreateableSceneNodeAnimatorTypeName(u32 idx) const =0irr::scene::ISceneNodeAnimatorFactory [pure virtual]
getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const =0irr::scene::ISceneNodeAnimatorFactory [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.html new file mode 100644 index 0000000..d0c8097 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.html @@ -0,0 +1,329 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNodeAnimatorFactory Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNodeAnimatorFactory Class Reference
+
+
+ +

Interface for dynamic creation of scene node animators. + More...

+ +

#include <ISceneNodeAnimatorFactory.h>

+
+ + Inheritance diagram for irr::scene::ISceneNodeAnimatorFactory:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for dynamic creation of scene node animators.

+

To be able to add custom scene node animators to Irrlicht and to make it possible for the scene manager to save and load those external animators, simply implement this interface and register it in you scene manager via ISceneManager::registerSceneNodeAnimatorFactory. Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to increase the reference counter of the scene node manager. This is not necessary because the scene node manager will grab() the factory anyway, and otherwise cyclic references will be created and the scene manager and all its nodes won't get deallocated.

+ +

Definition at line 27 of file ISceneNodeAnimatorFactory.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneNodeAnimatorFactory::createSceneNodeAnimator (ESCENE_NODE_ANIMATOR_TYPE type,
ISceneNodetarget 
) [pure virtual]
+
+
+ +

creates a scene node animator based on its type id

+
Parameters:
+ + + +
type,:Type of the scene node animator to add.
target,:Target scene node of the new animator.
+
+
+
Returns:
Returns pointer to the new scene node animator or null if not successful. You need to drop this pointer after calling this, see IReferenceCounted::drop() for details.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNodeAnimator* irr::scene::ISceneNodeAnimatorFactory::createSceneNodeAnimator (const c8typeName,
ISceneNodetarget 
) [pure virtual]
+
+
+ +

creates a scene node animator based on its type name

+
Parameters:
+ + + +
typeName,:Type of the scene node animator to add.
target,:Target scene node of the new animator.
+
+
+
Returns:
Returns pointer to the new scene node animator or null if not successful. You need to drop this pointer after calling this, see IReferenceCounted::drop() for details.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneNodeAnimatorFactory::getCreatableSceneNodeAnimatorTypeCount () const [pure virtual]
+
+
+ +

returns amount of scene node animator types this factory is able to create

+ +
+
+ +
+
+ + + + + + + + +
virtual ESCENE_NODE_ANIMATOR_TYPE irr::scene::ISceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorType (u32 idx) const [pure virtual]
+
+
+ +

returns type of a createable scene node animator type

+
Parameters:
+ + +
idx,:Index of scene node animator type in this factory. Must be a value between 0 and getCreatableSceneNodeTypeCount()
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName (u32 idx) const [pure virtual]
+
+
+ +

returns type name of a createable scene node animator type

+
Parameters:
+ + +
idx,:Index of scene node animator type in this factory. Must be a value between 0 and getCreatableSceneNodeAnimatorTypeCount()
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName (ESCENE_NODE_ANIMATOR_TYPE type) const [pure virtual]
+
+
+ +

returns type name of a createable scene node animator type

+
Parameters:
+ + +
type,:Type of scene node animator.
+
+
+
Returns:
: Returns name of scene node animator type if this factory can create the type, otherwise 0.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.png new file mode 100644 index 0000000..4812f6e Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_animator_factory.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory-members.html new file mode 100644 index 0000000..42f4b10 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneNodeFactory Member List
+
+
+This is the complete list of members for irr::scene::ISceneNodeFactory, including all inherited members. + + + + + + + + + + + + + +
addSceneNode(ESCENE_NODE_TYPE type, ISceneNode *parent=0)=0irr::scene::ISceneNodeFactory [pure virtual]
addSceneNode(const c8 *typeName, ISceneNode *parent=0)=0irr::scene::ISceneNodeFactory [pure virtual]
drop() const irr::IReferenceCounted [inline]
getCreatableSceneNodeTypeCount() const =0irr::scene::ISceneNodeFactory [pure virtual]
getCreateableSceneNodeType(u32 idx) const =0irr::scene::ISceneNodeFactory [pure virtual]
getCreateableSceneNodeTypeName(u32 idx) const =0irr::scene::ISceneNodeFactory [pure virtual]
getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const =0irr::scene::ISceneNodeFactory [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.html new file mode 100644 index 0000000..6e415c9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.html @@ -0,0 +1,329 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneNodeFactory Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneNodeFactory Class Reference
+
+
+ +

Interface for dynamic creation of scene nodes. + More...

+ +

#include <ISceneNodeFactory.h>

+
+ + Inheritance diagram for irr::scene::ISceneNodeFactory:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for dynamic creation of scene nodes.

+

To be able to add custom scene nodes to Irrlicht and to make it possible for the scene manager to save and load those external scene nodes, simply implement this interface and register it in you scene manager via ISceneManager::registerSceneNodeFactory. Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to increase the reference counter of the scene node manager. This is not necessary because the scene node manager will grab() the factory anyway, and otherwise cyclic references will be created and the scene manager and all its nodes won't get deallocated.

+ +

Definition at line 27 of file ISceneNodeFactory.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneNodeFactory::addSceneNode (ESCENE_NODE_TYPE type,
ISceneNodeparent = 0 
) [pure virtual]
+
+
+ +

adds a scene node to the scene graph based on its type id

+
Parameters:
+ + + +
type,:Type of the scene node to add.
parent,:Parent scene node of the new node, can be null to add the scene node to the root.
+
+
+
Returns:
Returns pointer to the new scene node or null if not successful. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual ISceneNode* irr::scene::ISceneNodeFactory::addSceneNode (const c8typeName,
ISceneNodeparent = 0 
) [pure virtual]
+
+
+ +

adds a scene node to the scene graph based on its type name

+
Parameters:
+ + + +
typeName,:Type name of the scene node to add.
parent,:Parent scene node of the new node, can be null to add the scene node to the root.
+
+
+
Returns:
Returns pointer to the new scene node or null if not successful. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISceneNodeFactory::getCreatableSceneNodeTypeCount () const [pure virtual]
+
+
+ +

returns amount of scene node types this factory is able to create

+ +
+
+ +
+
+ + + + + + + + +
virtual ESCENE_NODE_TYPE irr::scene::ISceneNodeFactory::getCreateableSceneNodeType (u32 idx) const [pure virtual]
+
+
+ +

returns type of a createable scene node type

+
Parameters:
+ + +
idx,:Index of scene node type in this factory. Must be a value between 0 and getCreatableSceneNodeTypeCount()
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISceneNodeFactory::getCreateableSceneNodeTypeName (u32 idx) const [pure virtual]
+
+
+ +

returns type name of a createable scene node type by index

+
Parameters:
+ + +
idx,:Index of scene node type in this factory. Must be a value between 0 and getCreatableSceneNodeTypeCount()
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISceneNodeFactory::getCreateableSceneNodeTypeName (ESCENE_NODE_TYPE type) const [pure virtual]
+
+
+ +

returns type name of a createable scene node type

+
Parameters:
+ + +
type,:Type of scene node.
+
+
+
Returns:
: Returns name of scene node type if this factory can create the type, otherwise 0.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.png new file mode 100644 index 0000000..8bdd5bf Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_node_factory.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer-members.html new file mode 100644 index 0000000..69b9855 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer-members.html @@ -0,0 +1,124 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISceneUserDataSerializer Member List
+
+
+This is the complete list of members for irr::scene::ISceneUserDataSerializer, including all inherited members. + + + + +
createUserData(ISceneNode *forSceneNode)=0irr::scene::ISceneUserDataSerializer [pure virtual]
OnCreateNode(ISceneNode *node)=0irr::scene::ISceneUserDataSerializer [pure virtual]
OnReadUserData(ISceneNode *forSceneNode, io::IAttributes *userData)=0irr::scene::ISceneUserDataSerializer [pure virtual]
~ISceneUserDataSerializer()irr::scene::ISceneUserDataSerializer [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer.html new file mode 100644 index 0000000..5a81d9b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_scene_user_data_serializer.html @@ -0,0 +1,236 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISceneUserDataSerializer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISceneUserDataSerializer Class Reference
+
+
+ +

Interface to read and write user data to and from .irr files. + More...

+ +

#include <ISceneUserDataSerializer.h>

+ +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface to read and write user data to and from .irr files.

+

This interface is to be implemented by the user, to make it possible to read and write user data when reading or writing .irr files via ISceneManager. To be used with ISceneManager::loadScene() and ISceneManager::saveScene()

+ +

Definition at line 24 of file ISceneUserDataSerializer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::ISceneUserDataSerializer::~ISceneUserDataSerializer () [inline, virtual]
+
+
+ +

Definition at line 28 of file ISceneUserDataSerializer.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual io::IAttributes* irr::scene::ISceneUserDataSerializer::createUserData (ISceneNodeforSceneNode) [pure virtual]
+
+
+ +

Called when the scene manager is writing a scene node to an xml file for example.

+

Implement this method and return a list of attributes containing the user data you want to be saved together with the scene node. Return 0 if no user data should be added. Please note that the scene manager will call drop() to the returned pointer after it no longer needs it, so if you didn't create a new object for the return value and returning a longer existing IAttributes object, simply call grab() before returning it.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISceneUserDataSerializer::OnCreateNode (ISceneNodenode) [pure virtual]
+
+
+ +

Called when the scene manager create a scene node while loading a file.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISceneUserDataSerializer::OnReadUserData (ISceneNodeforSceneNode,
io::IAttributesuserData 
) [pure virtual]
+
+
+ +

Called when the scene manager read a scene node while loading a file.

+

The userData pointer contains a list of attributes with userData which were attached to the scene node in the read scene file.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node-members.html new file mode 100644 index 0000000..98100f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node-members.html @@ -0,0 +1,201 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IShadowVolumeSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IShadowVolumeSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
IShadowVolumeSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id)irr::scene::IShadowVolumeSceneNode [inline]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setShadowMesh(const IMesh *mesh)=0irr::scene::IShadowVolumeSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
updateShadowVolumes()=0irr::scene::IShadowVolumeSceneNode [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.html new file mode 100644 index 0000000..5d771d7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.html @@ -0,0 +1,235 @@ + + + + +Irrlicht 3D Engine: irr::scene::IShadowVolumeSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IShadowVolumeSceneNode Class Reference
+
+
+ +

Scene node for rendering a shadow volume into a stencil buffer. + More...

+ +

#include <IShadowVolumeSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IShadowVolumeSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Scene node for rendering a shadow volume into a stencil buffer.

+ +

Definition at line 17 of file IShadowVolumeSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IShadowVolumeSceneNode::IShadowVolumeSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 22 of file IShadowVolumeSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::IShadowVolumeSceneNode::setShadowMesh (const IMeshmesh) [pure virtual]
+
+
+ +

Sets the mesh from which the shadow volume should be generated.

+

To optimize shadow rendering, use a simpler mesh for shadows.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IShadowVolumeSceneNode::updateShadowVolumes () [pure virtual]
+
+
+ +

Updates the shadow volumes for current light positions.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.png new file mode 100644 index 0000000..b8c58f2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_shadow_volume_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh-members.html new file mode 100644 index 0000000..80d6a9a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh-members.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISkinnedMesh Member List
+
+
+This is the complete list of members for irr::scene::ISkinnedMesh, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addJoint(SJoint *parent=0)=0irr::scene::ISkinnedMesh [pure virtual]
addMeshBuffer()=0irr::scene::ISkinnedMesh [pure virtual]
addPositionKey(SJoint *joint)=0irr::scene::ISkinnedMesh [pure virtual]
addRotationKey(SJoint *joint)=0irr::scene::ISkinnedMesh [pure virtual]
addScaleKey(SJoint *joint)=0irr::scene::ISkinnedMesh [pure virtual]
addWeight(SJoint *joint)=0irr::scene::ISkinnedMesh [pure virtual]
animateMesh(f32 frame, f32 blend)=0irr::scene::ISkinnedMesh [pure virtual]
convertMeshToTangents()=0irr::scene::ISkinnedMesh [pure virtual]
drop() const irr::IReferenceCounted [inline]
finalize()=0irr::scene::ISkinnedMesh [pure virtual]
getAllJoints()=0irr::scene::ISkinnedMesh [pure virtual]
getAllJoints() const =0irr::scene::ISkinnedMesh [pure virtual]
getAnimationSpeed() const =0irr::scene::IAnimatedMesh [pure virtual]
getBoundingBox() const =0irr::scene::IMesh [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFrameCount() const =0irr::scene::IAnimatedMesh [pure virtual]
getJointCount() const =0irr::scene::ISkinnedMesh [pure virtual]
getJointName(u32 number) const =0irr::scene::ISkinnedMesh [pure virtual]
getJointNumber(const c8 *name) const =0irr::scene::ISkinnedMesh [pure virtual]
getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)=0irr::scene::IAnimatedMesh [pure virtual]
getMeshBuffer(u32 nr) const =0irr::scene::IMesh [pure virtual]
getMeshBuffer(const video::SMaterial &material) const =0irr::scene::IMesh [pure virtual]
getMeshBufferCount() const =0irr::scene::IMesh [pure virtual]
getMeshBuffers()=0irr::scene::ISkinnedMesh [pure virtual]
getMeshType() const irr::scene::IAnimatedMesh [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isStatic()=0irr::scene::ISkinnedMesh [pure virtual]
setAnimationSpeed(f32 fps)=0irr::scene::IAnimatedMesh [pure virtual]
setBoundingBox(const core::aabbox3df &box)=0irr::scene::IMesh [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0irr::scene::IMesh [pure virtual]
setHardwareSkinning(bool on)=0irr::scene::ISkinnedMesh [pure virtual]
setInterpolationMode(E_INTERPOLATION_MODE mode)=0irr::scene::ISkinnedMesh [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0irr::scene::IMesh [pure virtual]
skinMesh()=0irr::scene::ISkinnedMesh [pure virtual]
updateNormalsWhenAnimating(bool on)=0irr::scene::ISkinnedMesh [pure virtual]
useAnimationFrom(const ISkinnedMesh *mesh)=0irr::scene::ISkinnedMesh [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.html new file mode 100644 index 0000000..aba8a6b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.html @@ -0,0 +1,613 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISkinnedMesh Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISkinnedMesh Class Reference
+
+
+ +

Interface for using some special functions of Skinned meshes. + More...

+ +

#include <ISkinnedMesh.h>

+
+ + Inheritance diagram for irr::scene::ISkinnedMesh:
+
+
+ + +

List of all members.

+

+Classes

+ +

+Public Member Functions

+ +

Detailed Description

+

Interface for using some special functions of Skinned meshes.

+ +

Definition at line 32 of file ISkinnedMesh.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual SJoint* irr::scene::ISkinnedMesh::addJoint (SJointparent = 0) [pure virtual]
+
+
+ +

Adds a new joint to the mesh, access it as last one.

+ +
+
+ +
+
+ + + + + + + +
virtual SSkinMeshBuffer* irr::scene::ISkinnedMesh::addMeshBuffer () [pure virtual]
+
+
+ +

Adds a new meshbuffer to the mesh, access it as last one.

+ +
+
+ +
+
+ + + + + + + + +
virtual SPositionKey* irr::scene::ISkinnedMesh::addPositionKey (SJointjoint) [pure virtual]
+
+
+ +

Adds a new position key to the mesh, access it as last one.

+ +
+
+ +
+
+ + + + + + + + +
virtual SRotationKey* irr::scene::ISkinnedMesh::addRotationKey (SJointjoint) [pure virtual]
+
+
+ +

Adds a new rotation key to the mesh, access it as last one.

+ +
+
+ +
+
+ + + + + + + + +
virtual SScaleKey* irr::scene::ISkinnedMesh::addScaleKey (SJointjoint) [pure virtual]
+
+
+ +

Adds a new scale key to the mesh, access it as last one.

+ +
+
+ +
+
+ + + + + + + + +
virtual SWeight* irr::scene::ISkinnedMesh::addWeight (SJointjoint) [pure virtual]
+
+
+ +

Adds a new weight to the mesh, access it as last one.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ISkinnedMesh::animateMesh (f32 frame,
f32 blend 
) [pure virtual]
+
+
+ +

Animates this mesh's joints based on frame input.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISkinnedMesh::convertMeshToTangents () [pure virtual]
+
+
+ +

converts the vertex type of all meshbuffers to tangents.

+

E.g. used for bump mapping.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISkinnedMesh::finalize () [pure virtual]
+
+
+ +

loaders should call this after populating the mesh

+ +
+
+ +
+
+ + + + + + + +
virtual core::array<SJoint*>& irr::scene::ISkinnedMesh::getAllJoints () [pure virtual]
+
+
+ +

exposed for loaders: joints list

+ +
+
+ +
+
+ + + + + + + +
virtual const core::array<SJoint*>& irr::scene::ISkinnedMesh::getAllJoints () const [pure virtual]
+
+
+ +

exposed for loaders: joints list

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ISkinnedMesh::getJointCount () const [pure virtual]
+
+
+ +

Gets joint count.

+
Returns:
Amount of joints in the skeletal animated mesh.
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::scene::ISkinnedMesh::getJointName (u32 number) const [pure virtual]
+
+
+ +

Gets the name of a joint.

+
Parameters:
+ + +
number,:Zero based index of joint. The last joint has the number getJointCount()-1;
+
+
+
Returns:
Name of joint and null if an error happened.
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::scene::ISkinnedMesh::getJointNumber (const c8name) const [pure virtual]
+
+
+ +

Gets a joint number from its name.

+
Parameters:
+ + +
name,:Name of the joint.
+
+
+
Returns:
Number of the joint or -1 if not found.
+ +
+
+ +
+
+ + + + + + + +
virtual core::array<SSkinMeshBuffer*>& irr::scene::ISkinnedMesh::getMeshBuffers () [pure virtual]
+
+
+ +

exposed for loaders: to add mesh buffers

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::scene::ISkinnedMesh::isStatic () [pure virtual]
+
+
+ +

Check if the mesh is non-animated.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISkinnedMesh::setHardwareSkinning (bool on) [pure virtual]
+
+
+ +

Allows to enable hardware skinning.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISkinnedMesh::setInterpolationMode (E_INTERPOLATION_MODE mode) [pure virtual]
+
+
+ +

Sets Interpolation Mode.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::ISkinnedMesh::skinMesh () [pure virtual]
+
+
+ +

Preforms a software skin on this mesh based of joint positions.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ISkinnedMesh::updateNormalsWhenAnimating (bool on) [pure virtual]
+
+
+ +

Update Normals when Animating.

+
Parameters:
+ + +
onIf false don't animate, which is faster. Else update normals, which allows for proper lighting of animated meshes.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::scene::ISkinnedMesh::useAnimationFrom (const ISkinnedMeshmesh) [pure virtual]
+
+
+ +

Use animation from another mesh.

+

The animation is linked (not copied) based on joint names so make sure they are unique.

+
Returns:
True if all joints in this mesh were matched up (empty names will not be matched, and it's case sensitive). Unmatched joints will not be animated.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.png new file mode 100644 index 0000000..0cd31d9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_skinned_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node-members.html new file mode 100644 index 0000000..44f9e35 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node-members.html @@ -0,0 +1,216 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ITerrainSceneNode Member List
+
+
+This is the complete list of members for irr::scene::ITerrainSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ITerrainSceneNode [pure virtual]
getBoundingBox(s32 patchX, s32 patchZ) const =0irr::scene::ITerrainSceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getCurrentLODOfPatches(core::array< s32 > &LODs) const =0irr::scene::ITerrainSceneNode [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHeight(f32 x, f32 y) const =0irr::scene::ITerrainSceneNode [pure virtual]
getID() const irr::scene::ISceneNode [inline, virtual]
getIndexCount() const =0irr::scene::ITerrainSceneNode [pure virtual]
getIndicesForPatch(core::array< u32 > &indices, s32 patchX, s32 patchZ, s32 LOD=0)=0irr::scene::ITerrainSceneNode [pure virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getMesh()=0irr::scene::ITerrainSceneNode [pure virtual]
getMeshBufferForLOD(IDynamicMeshBuffer &mb, s32 LOD=0) const =0irr::scene::ITerrainSceneNode [pure virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRenderBuffer()=0irr::scene::ITerrainSceneNode [pure virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTerrainCenter() const =0irr::scene::ITerrainSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
ITerrainSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &rotation=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ITerrainSceneNode [inline]
loadHeightMap(io::IReadFile *file, video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 smoothFactor=0)=0irr::scene::ITerrainSceneNode [pure virtual]
loadHeightMapRAW(io::IReadFile *file, s32 bitsPerPixel=16, bool signedData=false, bool floatVals=false, s32 width=0, video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 smoothFactor=0)=0irr::scene::ITerrainSceneNode [pure virtual]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
overrideLODDistance(s32 LOD, f64 newDistance)=0irr::scene::ITerrainSceneNode [pure virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
scaleTexture(f32 scale=1.0f, f32 scale2=0.0f)=0irr::scene::ITerrainSceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setCameraMovementDelta(f32 delta)=0irr::scene::ITerrainSceneNode [pure virtual]
setCameraRotationDelta(f32 delta)=0irr::scene::ITerrainSceneNode [pure virtual]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDynamicSelectorUpdate(bool bVal)=0irr::scene::ITerrainSceneNode [pure virtual]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0)=0irr::scene::ITerrainSceneNode [pure virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.html new file mode 100644 index 0000000..f5ab34d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.html @@ -0,0 +1,793 @@ + + + + +Irrlicht 3D Engine: irr::scene::ITerrainSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ITerrainSceneNode Class Reference
+
+
+ +

A scene node for displaying terrain using the geo mip map algorithm. + More...

+ +

#include <ITerrainSceneNode.h>

+
+ + Inheritance diagram for irr::scene::ITerrainSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A scene node for displaying terrain using the geo mip map algorithm.

+

The code for the TerrainSceneNode is based on the Terrain renderer by Soconne and the GeoMipMapSceneNode developed by Spintz. They made their code available for Irrlicht and allowed it to be distributed under this licence. I only modified some parts. A lot of thanks go to them.

+

This scene node is capable of very quickly loading terrains and updating the indices at runtime to enable viewing very large terrains. It uses a CLOD (Continuous Level of Detail) algorithm which updates the indices for each patch based on a LOD (Level of Detail) which is determined based on a patch's distance from the camera.

+

The Patch Size of the terrain must always be a size of ( 2^N+1, i.e. 8+1(9), 16+1(17), etc. ). The MaxLOD available is directly dependent on the patch size of the terrain. LOD 0 contains all of the indices to draw all the triangles at the max detail for a patch. As each LOD goes up by 1 the step taken, in generating indices increases by - 2^LOD, so for LOD 1, the step taken is 2, for LOD 2, the step taken is 4, LOD 3 - 8, etc. The step can be no larger than the size of the patch, so having a LOD of 8, with a patch size of 17, is asking the algoritm to generate indices every 2^8 ( 256 ) vertices, which is not possible with a patch size of 17. The maximum LOD for a patch size of 17 is 2^4 ( 16 ). So, with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 ( every 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every 8 vertices ) and LOD 4 ( every 16 vertices ).

+ +

Definition at line 49 of file ITerrainSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::ITerrainSceneNode::ITerrainSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3dfrotation = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3dfscale = core::vector3df(1.0f, 1.0f, 1.0f) 
) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 53 of file ITerrainSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::ITerrainSceneNode::getBoundingBox () const [pure virtual]
+
+
+ +

Get the bounding box of the terrain.

+
Returns:
The bounding box of the entire terrain.
+ +

Implements irr::scene::ISceneNode.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::ITerrainSceneNode::getBoundingBox (s32 patchX,
s32 patchZ 
) const [pure virtual]
+
+
+ +

Get the bounding box of a patch.

+
Returns:
The bounding box of the chosen patch.
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::scene::ITerrainSceneNode::getCurrentLODOfPatches (core::array< s32 > & LODs) const [pure virtual]
+
+
+ +

Populates an array with the CurrentLOD of each patch.

+
Parameters:
+ + +
LODsA reference to a core::array<s32> to hold the values
+
+
+
Returns:
Number of elements in the array
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual f32 irr::scene::ITerrainSceneNode::getHeight (f32 x,
f32 y 
) const [pure virtual]
+
+
+ +

Get height of a point of the terrain.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ITerrainSceneNode::getIndexCount () const [pure virtual]
+
+
+ +

Get the number of indices currently in the meshbuffer.

+
Returns:
The index count.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::scene::ITerrainSceneNode::getIndicesForPatch (core::array< u32 > & indices,
s32 patchX,
s32 patchZ,
s32 LOD = 0 
) [pure virtual]
+
+
+ +

Gets the indices for a specified patch at a specified Level of Detail.

+
Parameters:
+ + + + + +
indicesA reference to an array of u32 indices.
patchXPatch x coordinate.
patchZPatch z coordinate.
LODThe level of detail to get for that patch. If -1, then get the CurrentLOD. If the CurrentLOD is set to -1, meaning it's not shown, then it will retrieve the triangles at the highest LOD (0).
+
+
+
Returns:
Number of indices put into the buffer.
+ +
+
+ +
+
+ + + + + + + +
virtual IMesh* irr::scene::ITerrainSceneNode::getMesh () [pure virtual]
+
+
+ +

Get pointer to the mesh.

+
Returns:
Pointer to the mesh.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ITerrainSceneNode::getMeshBufferForLOD (IDynamicMeshBuffermb,
s32 LOD = 0 
) const [pure virtual]
+
+
+ +

Gets the meshbuffer data based on a specified level of detail.

+
Parameters:
+ + + +
mbA reference to an IDynamicMeshBuffer object
LODThe level of detail you want the indices from.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual IMeshBuffer* irr::scene::ITerrainSceneNode::getRenderBuffer () [pure virtual]
+
+
+ +

Get pointer to the buffer used by the terrain (most users will not need this)

+ +
+
+ +
+
+ + + + + + + +
virtual const core::vector3df& irr::scene::ITerrainSceneNode::getTerrainCenter () const [pure virtual]
+
+
+ +

Get center of terrain.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ITerrainSceneNode::loadHeightMap (io::IReadFilefile,
video::SColor vertexColor = video::SColor(255, 255, 255, 255),
s32 smoothFactor = 0 
) [pure virtual]
+
+
+ +

Initializes the terrain data. Loads the vertices from the heightMapFile.

+

The file must contain a loadable image of the heightmap. The heightmap must be square.

+
Parameters:
+ + + + +
fileThe file to read the image from. File is not rewinded.
vertexColorColor of all vertices.
smoothFactorNumber of smoothing passes.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ITerrainSceneNode::loadHeightMapRAW (io::IReadFilefile,
s32 bitsPerPixel = 16,
bool signedData = false,
bool floatVals = false,
s32 width = 0,
video::SColor vertexColor = video::SColor(255, 255, 255, 255),
s32 smoothFactor = 0 
) [pure virtual]
+
+
+ +

Initializes the terrain data. Loads the vertices from the heightMapFile.

+

The data is interpreted as (signed) integers of the given bit size or floats (with 32bits, signed). Allowed bitsizes for integers are 8, 16, and 32. The heightmap must be square.

+
Parameters:
+ + + + + + + + +
fileThe file to read the RAW data from. File is not rewinded.
bitsPerPixelSize of data if integers used, for floats always use 32.
signedDataWhether we use signed or unsigned ints, ignored for floats.
floatValsWhether the data is float or int.
widthWidth (and also Height, as it must be square) of the heightmap. Use 0 for autocalculating from the filesize.
vertexColorColor of all vertices.
smoothFactorNumber of smoothing passes.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::scene::ITerrainSceneNode::overrideLODDistance (s32 LOD,
f64 newDistance 
) [pure virtual]
+
+
+ +

Override the default generation of distance thresholds.

+

For determining the LOD a patch is rendered at. If any LOD is overridden, then the scene node will no longer apply scaling factors to these values. If you override these distances, and then apply a scale to the scene node, it is your responsibility to update the new distances to work best with your new terrain size.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ITerrainSceneNode::scaleTexture (f32 scale = 1.0f,
f32 scale2 = 0.0f 
) [pure virtual]
+
+
+ +

Scales the base texture, similar to makePlanarTextureMapping.

+
Parameters:
+ + + +
scaleThe scaling amount. Values above 1.0 increase the number of time the texture is drawn on the terrain. Values below 0 will decrease the number of times the texture is drawn on the terrain. Using negative values will flip the texture, as well as still scaling it.
scale2If set to 0 (default value), this will set the second texture coordinate set to the same values as in the first set. If this is another value than zero, it will scale the second texture coordinate set by this value.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ITerrainSceneNode::setCameraMovementDelta (f32 delta) [pure virtual]
+
+
+ +

Sets the movement camera threshold.

+

It is used to determine when to recalculate indices for the scene node. The default value is 10.0f.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ITerrainSceneNode::setCameraRotationDelta (f32 delta) [pure virtual]
+
+
+ +

Sets the rotation camera threshold.

+

It is used to determine when to recalculate indices for the scene node. The default value is 1.0f.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ITerrainSceneNode::setDynamicSelectorUpdate (bool bVal) [pure virtual]
+
+
+ +

Sets whether or not the node should dynamically update its associated selector when the geomipmap data changes.

+
Parameters:
+ + +
bVal,:Boolean value representing whether or not to update selector dynamically.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ITerrainSceneNode::setLODOfPatch (s32 patchX,
s32 patchZ,
s32 LOD = 0 
) [pure virtual]
+
+
+ +

Manually sets the LOD of a patch.

+
Parameters:
+ + + + +
patchXPatch x coordinate.
patchZPatch z coordinate.
LODThe level of detail to set the patch to.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.png new file mode 100644 index 0000000..c3e2317 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_terrain_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node-members.html new file mode 100644 index 0000000..fa3dc6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node-members.html @@ -0,0 +1,201 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ITextSceneNode Member List
+
+
+This is the complete list of members for irr::scene::ITextSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::ISceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isDebugObject() const irr::scene::ISceneNode [inline]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
isVisible() const irr::scene::ISceneNode [inline, virtual]
ITextSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))irr::scene::ITextSceneNode [inline]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setText(const wchar_t *text)=0irr::scene::ITextSceneNode [pure virtual]
setTextColor(video::SColor color)=0irr::scene::ITextSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.html new file mode 100644 index 0000000..bdb1b0b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.html @@ -0,0 +1,241 @@ + + + + +Irrlicht 3D Engine: irr::scene::ITextSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ITextSceneNode Class Reference
+
+
+ +

A scene node for displaying 2d text at a position in three dimensional space. + More...

+ +

#include <ITextSceneNode.h>

+
+ + Inheritance diagram for irr::scene::ITextSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A scene node for displaying 2d text at a position in three dimensional space.

+ +

Definition at line 16 of file ITextSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::ITextSceneNode::ITextSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition = core::vector3df(0,0,0) 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 21 of file ITextSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual void irr::scene::ITextSceneNode::setText (const wchar_t * text) [pure virtual]
+
+
+ +

sets the text string

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::ITextSceneNode::setTextColor (video::SColor color) [pure virtual]
+
+
+ +

sets the color of the text

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.png new file mode 100644 index 0000000..018e0b4 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_text_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector-members.html new file mode 100644 index 0000000..4a9d23a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector-members.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ITriangleSelector Member List
+
+
+This is the complete list of members for irr::scene::ITriangleSelector, including all inherited members. + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getSceneNodeForTriangle(u32 triangleIndex) const =0irr::scene::ITriangleSelector [pure virtual]
getSelector(u32 index)=0irr::scene::ITriangleSelector [pure virtual]
getSelector(u32 index) const =0irr::scene::ITriangleSelector [pure virtual]
getSelectorCount() const =0irr::scene::ITriangleSelector [pure virtual]
getTriangleCount() const =0irr::scene::ITriangleSelector [pure virtual]
getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::matrix4 *transform=0) const =0irr::scene::ITriangleSelector [pure virtual]
getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::aabbox3d< f32 > &box, const core::matrix4 *transform=0) const =0irr::scene::ITriangleSelector [pure virtual]
getTriangles(core::triangle3df *triangles, s32 arraySize, s32 &outTriangleCount, const core::line3d< f32 > &line, const core::matrix4 *transform=0) const =0irr::scene::ITriangleSelector [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.html new file mode 100644 index 0000000..528caa7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.html @@ -0,0 +1,437 @@ + + + + +Irrlicht 3D Engine: irr::scene::ITriangleSelector Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ITriangleSelector Class Reference
+
+
+ +

Interface to return triangles with specific properties. + More...

+ +

#include <ITriangleSelector.h>

+
+ + Inheritance diagram for irr::scene::ITriangleSelector:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface to return triangles with specific properties.

+

Every ISceneNode may have a triangle selector, available with ISceneNode::getTriangleScelector() or ISceneManager::createTriangleSelector. This is used for doing collision detection: For example if you know, that a collision may have happened in the area between (1,1,1) and (10,10,10), you can get all triangles of the scene node in this area with the ITriangleSelector easily and check every triangle if it collided.

+ +

Definition at line 28 of file ITriangleSelector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual ISceneNode* irr::scene::ITriangleSelector::getSceneNodeForTriangle (u32 triangleIndex) const [pure virtual]
+
+
+ +

Get scene node associated with a given triangle.

+

This allows to find which scene node (potentially of several) is associated with a specific triangle.

+
Parameters:
+ + +
triangleIndex,:the index of the triangle for which you want to find the associated scene node.
+
+
+
Returns:
The scene node associated with that triangle.
+ +
+
+ +
+
+ + + + + + + + +
virtual ITriangleSelector* irr::scene::ITriangleSelector::getSelector (u32 index) [pure virtual]
+
+
+ +

Get TriangleSelector based on index based on getSelectorCount.

+

Only useful for MetaTriangleSelector, others return 'this' or 0

+ +
+
+ +
+
+ + + + + + + + +
virtual const ITriangleSelector* irr::scene::ITriangleSelector::getSelector (u32 index) const [pure virtual]
+
+
+ +

Get TriangleSelector based on index based on getSelectorCount.

+

Only useful for MetaTriangleSelector, others return 'this' or 0

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::ITriangleSelector::getSelectorCount () const [pure virtual]
+
+
+ +

Get number of TriangleSelectors that are part of this one.

+

Only useful for MetaTriangleSelector, others return 1

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::scene::ITriangleSelector::getTriangleCount () const [pure virtual]
+
+
+ +

Get amount of all available triangles in this selector.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ITriangleSelector::getTriangles (core::triangle3dftriangles,
s32 arraySize,
s32outTriangleCount,
const core::matrix4transform = 0 
) const [pure virtual]
+
+
+ +

Gets the triangles for one associated node.

+

This returns all triangles for one scene node associated with this selector. If there is more than one scene node associated (e.g. for an IMetaTriangleSelector) this this function may be called multiple times to retrieve all triangles.

+
Parameters:
+ + + + + +
trianglesArray where the resulting triangles will be written to.
arraySizeSize of the target array.
outTriangleCount,:Amount of triangles which have been written into the array.
transformPointer to matrix for transforming the triangles before they are returned. Useful for example to scale all triangles down into an ellipsoid space. If this pointer is null, no transformation will be done.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ITriangleSelector::getTriangles (core::triangle3dftriangles,
s32 arraySize,
s32outTriangleCount,
const core::aabbox3d< f32 > & box,
const core::matrix4transform = 0 
) const [pure virtual]
+
+
+ +

Gets the triangles for one associated node which may lie within a specific bounding box.

+

This returns all triangles for one scene node associated with this selector. If there is more than one scene node associated (e.g. for an IMetaTriangleSelector) this this function may be called multiple times to retrieve all triangles.

+

This method will return at least the triangles that intersect the box, but may return other triangles as well.

+
Parameters:
+ + + + + + +
trianglesArray where the resulting triangles will be written to.
arraySizeSize of the target array.
outTriangleCountAmount of triangles which have been written into the array.
boxOnly triangles which are in this axis aligned bounding box will be written into the array.
transformPointer to matrix for transforming the triangles before they are returned. Useful for example to scale all triangles down into an ellipsoid space. If this pointer is null, no transformation will be done.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::ITriangleSelector::getTriangles (core::triangle3dftriangles,
s32 arraySize,
s32outTriangleCount,
const core::line3d< f32 > & line,
const core::matrix4transform = 0 
) const [pure virtual]
+
+
+ +

Gets the triangles for one associated node which have or may have contact with a 3d line.

+

This returns all triangles for one scene node associated with this selector. If there is more than one scene node associated (e.g. for an IMetaTriangleSelector) this this function may be called multiple times to retrieve all triangles.

+

Please note that unoptimized triangle selectors also may return triangles which are not in contact at all with the 3d line.

+
Parameters:
+ + + + + + +
trianglesArray where the resulting triangles will be written to.
arraySizeSize of the target array.
outTriangleCountAmount of triangles which have been written into the array.
lineOnly triangles which may be in contact with this 3d line will be written into the array.
transformPointer to matrix for transforming the triangles before they are returned. Useful for example to scale all triangles down into an ellipsoid space. If this pointer is null, no transformation will be done.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.png new file mode 100644 index 0000000..f280449 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_triangle_selector.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer-members.html new file mode 100644 index 0000000..30999a5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer-members.html @@ -0,0 +1,143 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IVertexBuffer Member List
+
+
+This is the complete list of members for irr::scene::IVertexBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + +
allocated_size() const =0irr::scene::IVertexBuffer [pure virtual]
drop() const irr::IReferenceCounted [inline]
getChangedID() const =0irr::scene::IVertexBuffer [pure virtual]
getData()=0irr::scene::IVertexBuffer [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint() const =0irr::scene::IVertexBuffer [pure virtual]
getLast()=0irr::scene::IVertexBuffer [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getType() const =0irr::scene::IVertexBuffer [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
operator[](const u32 index) const =0irr::scene::IVertexBuffer [pure virtual]
pointer()=0irr::scene::IVertexBuffer [pure virtual]
push_back(const video::S3DVertex &element)=0irr::scene::IVertexBuffer [pure virtual]
reallocate(u32 new_size)=0irr::scene::IVertexBuffer [pure virtual]
set_used(u32 usedNow)=0irr::scene::IVertexBuffer [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty()=0irr::scene::IVertexBuffer [pure virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0irr::scene::IVertexBuffer [pure virtual]
setType(video::E_VERTEX_TYPE vertexType)=0irr::scene::IVertexBuffer [pure virtual]
size() const =0irr::scene::IVertexBuffer [pure virtual]
stride() const =0irr::scene::IVertexBuffer [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.html new file mode 100644 index 0000000..f15429a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.html @@ -0,0 +1,484 @@ + + + + +Irrlicht 3D Engine: irr::scene::IVertexBuffer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IVertexBuffer Class Reference
+
+
+ +

#include <IVertexBuffer.h>

+
+ + Inheritance diagram for irr::scene::IVertexBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+
+

Definition at line 17 of file IVertexBuffer.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual u32 irr::scene::IVertexBuffer::allocated_size () const [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IVertexBuffer::getChangedID () const [pure virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implemented in irr::scene::CVertexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::getChangedID_Vertex().

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::IVertexBuffer::getData () [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::IVertexBuffer::getHardwareMappingHint () const [pure virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implemented in irr::scene::CVertexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::getHardwareMappingHint_Vertex().

+ +
+
+ +
+
+ + + + + + + +
virtual video::S3DVertex& irr::scene::IVertexBuffer::getLast () [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::IVertexBuffer::getType () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + + +
virtual video::S3DVertex& irr::scene::IVertexBuffer::operator[] (const u32 index) const [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual video::S3DVertex* irr::scene::IVertexBuffer::pointer () [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVertexBuffer::push_back (const video::S3DVertexelement) [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVertexBuffer::reallocate (u32 new_size) [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVertexBuffer::set_used (u32 usedNow) [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::IVertexBuffer::setDirty () [pure virtual]
+
+
+ +

flags the meshbuffer as changed, reloads hardware buffers

+ +

Implemented in irr::scene::CVertexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::setDirty().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVertexBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) [pure virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implemented in irr::scene::CVertexBuffer.

+ +

Referenced by irr::scene::IDynamicMeshBuffer::setHardwareMappingHint().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVertexBuffer::setType (video::E_VERTEX_TYPE vertexType) [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IVertexBuffer::size () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IVertexBuffer::stride () const [pure virtual]
+
+
+ +

Implemented in irr::scene::CVertexBuffer.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.png new file mode 100644 index 0000000..6da23d9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_vertex_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node-members.html new file mode 100644 index 0000000..ac38a27 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node-members.html @@ -0,0 +1,207 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IVolumeLightSceneNode Member List
+
+
+This is the complete list of members for irr::scene::IVolumeLightSceneNode, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbsoluteTransformationirr::scene::ISceneNode [protected]
addAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
addChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
Animatorsirr::scene::ISceneNode [protected]
AutomaticCullingStateirr::scene::ISceneNode [protected]
Childrenirr::scene::ISceneNode [protected]
clone(ISceneNode *newParent=0, ISceneManager *newManager=0)irr::scene::ISceneNode [inline, virtual]
cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
DebugDataVisibleirr::scene::ISceneNode [protected]
deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)irr::scene::ISceneNode [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getAbsolutePosition() const irr::scene::ISceneNode [inline, virtual]
getAbsoluteTransformation() const irr::scene::ISceneNode [inline, virtual]
getAnimators() const irr::scene::ISceneNode [inline]
getAutomaticCulling() const irr::scene::ISceneNode [inline]
getBoundingBox() const =0irr::scene::ISceneNode [pure virtual]
getChildren() const irr::scene::ISceneNode [inline]
getDebugName() const irr::IReferenceCounted [inline]
getFootColor() const =0irr::scene::IVolumeLightSceneNode [pure virtual]
getID() const irr::scene::ISceneNode [inline, virtual]
getMaterial(u32 num)irr::scene::ISceneNode [inline, virtual]
getMaterialCount() const irr::scene::ISceneNode [inline, virtual]
getName() const irr::scene::ISceneNode [inline, virtual]
getParent() const irr::scene::ISceneNode [inline]
getPosition() const irr::scene::ISceneNode [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getRelativeTransformation() const irr::scene::ISceneNode [inline, virtual]
getRotation() const irr::scene::ISceneNode [inline, virtual]
getScale() const irr::scene::ISceneNode [inline, virtual]
getSceneManager(void) const irr::scene::ISceneNode [inline, virtual]
getSubDivideU() const =0irr::scene::IVolumeLightSceneNode [pure virtual]
getSubDivideV() const =0irr::scene::IVolumeLightSceneNode [pure virtual]
getTailColor() const =0irr::scene::IVolumeLightSceneNode [pure virtual]
getTransformedBoundingBox() const irr::scene::ISceneNode [inline, virtual]
getTriangleSelector() const irr::scene::ISceneNode [inline, virtual]
getType() const irr::scene::IVolumeLightSceneNode [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IDirr::scene::ISceneNode [protected]
IReferenceCounted()irr::IReferenceCounted [inline]
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))irr::scene::ISceneNode [inline]
isDebugDataVisible() const irr::scene::ISceneNode [inline]
isDebugObject() const irr::scene::ISceneNode [inline]
IsDebugObjectirr::scene::ISceneNode [protected]
isTrulyVisible() const irr::scene::ISceneNode [inline, virtual]
isVisible() const irr::scene::ISceneNode [inline, virtual]
IsVisibleirr::scene::ISceneNode [protected]
IVolumeLightSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position, const core::vector3df &rotation, const core::vector3df &scale)irr::scene::IVolumeLightSceneNode [inline]
Nameirr::scene::ISceneNode [protected]
OnAnimate(u32 timeMs)irr::scene::ISceneNode [inline, virtual]
OnRegisterSceneNode()irr::scene::ISceneNode [inline, virtual]
Parentirr::scene::ISceneNode [protected]
RelativeRotationirr::scene::ISceneNode [protected]
RelativeScaleirr::scene::ISceneNode [protected]
RelativeTranslationirr::scene::ISceneNode [protected]
remove()irr::scene::ISceneNode [inline, virtual]
removeAll()irr::scene::ISceneNode [inline, virtual]
removeAnimator(ISceneNodeAnimator *animator)irr::scene::ISceneNode [inline, virtual]
removeAnimators()irr::scene::ISceneNode [inline, virtual]
removeChild(ISceneNode *child)irr::scene::ISceneNode [inline, virtual]
render()=0irr::scene::ISceneNode [pure virtual]
SceneManagerirr::scene::ISceneNode [protected]
serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const irr::scene::ISceneNode [inline, virtual]
setAutomaticCulling(u32 state)irr::scene::ISceneNode [inline]
setDebugDataVisible(u32 state)irr::scene::ISceneNode [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setFootColor(const video::SColor inColor)=0irr::scene::IVolumeLightSceneNode [pure virtual]
setID(s32 id)irr::scene::ISceneNode [inline, virtual]
setIsDebugObject(bool debugObject)irr::scene::ISceneNode [inline]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::ISceneNode [inline]
setMaterialTexture(u32 textureLayer, video::ITexture *texture)irr::scene::ISceneNode [inline]
setMaterialType(video::E_MATERIAL_TYPE newType)irr::scene::ISceneNode [inline]
setName(const c8 *name)irr::scene::ISceneNode [inline, virtual]
setName(const core::stringc &name)irr::scene::ISceneNode [inline, virtual]
setParent(ISceneNode *newParent)irr::scene::ISceneNode [inline, virtual]
setPosition(const core::vector3df &newpos)irr::scene::ISceneNode [inline, virtual]
setRotation(const core::vector3df &rotation)irr::scene::ISceneNode [inline, virtual]
setScale(const core::vector3df &scale)irr::scene::ISceneNode [inline, virtual]
setSceneManager(ISceneManager *newManager)irr::scene::ISceneNode [inline, protected]
setSubDivideU(const u32 inU)=0irr::scene::IVolumeLightSceneNode [pure virtual]
setSubDivideV(const u32 inV)=0irr::scene::IVolumeLightSceneNode [pure virtual]
setTailColor(const video::SColor inColor)=0irr::scene::IVolumeLightSceneNode [pure virtual]
setTriangleSelector(ITriangleSelector *selector)irr::scene::ISceneNode [inline, virtual]
setVisible(bool isVisible)irr::scene::ISceneNode [inline, virtual]
TriangleSelectorirr::scene::ISceneNode [protected]
updateAbsolutePosition()irr::scene::ISceneNode [inline, virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~ISceneNode()irr::scene::ISceneNode [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.html new file mode 100644 index 0000000..027b6e4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.html @@ -0,0 +1,390 @@ + + + + +Irrlicht 3D Engine: irr::scene::IVolumeLightSceneNode Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::IVolumeLightSceneNode Class Reference
+
+
+ +

#include <IVolumeLightSceneNode.h>

+
+ + Inheritance diagram for irr::scene::IVolumeLightSceneNode:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+
+

Definition at line 18 of file IVolumeLightSceneNode.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::IVolumeLightSceneNode::IVolumeLightSceneNode (ISceneNodeparent,
ISceneManagermgr,
s32 id,
const core::vector3dfposition,
const core::vector3dfrotation,
const core::vector3dfscale 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 23 of file IVolumeLightSceneNode.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual video::SColor irr::scene::IVolumeLightSceneNode::getFootColor () const [pure virtual]
+
+
+ +

Returns the color of the base of the light.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IVolumeLightSceneNode::getSubDivideU () const [pure virtual]
+
+
+ +

Returns the number of segments across the U axis.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::IVolumeLightSceneNode::getSubDivideV () const [pure virtual]
+
+
+ +

Returns the number of segments across the V axis.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SColor irr::scene::IVolumeLightSceneNode::getTailColor () const [pure virtual]
+
+
+ +

Returns the color of the tip of the light.

+ +
+
+ +
+
+ + + + + + + +
virtual ESCENE_NODE_TYPE irr::scene::IVolumeLightSceneNode::getType () const [inline, virtual]
+
+
+ +

Returns type of the scene node.

+ +

Reimplemented from irr::scene::ISceneNode.

+ +

Definition at line 30 of file IVolumeLightSceneNode.h.

+ +

References irr::scene::ESNT_VOLUME_LIGHT.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVolumeLightSceneNode::setFootColor (const video::SColor inColor) [pure virtual]
+
+
+ +

Sets the color of the base of the light.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVolumeLightSceneNode::setSubDivideU (const u32 inU) [pure virtual]
+
+
+ +

Sets the number of segments across the U axis.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVolumeLightSceneNode::setSubDivideV (const u32 inV) [pure virtual]
+
+
+ +

Sets the number of segments across the V axis.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::IVolumeLightSceneNode::setTailColor (const video::SColor inColor) [pure virtual]
+
+
+ +

Sets the color of the tip of the light.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.png new file mode 100644 index 0000000..23900fd Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_i_volume_light_scene_node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator-members.html new file mode 100644 index 0000000..f0de5bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorBrightnessManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorBrightnessManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorBrightnessManipulator [inline]
SVertexColorBrightnessManipulator(s32 amount)irr::scene::SVertexColorBrightnessManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.html new file mode 100644 index 0000000..b631be3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorBrightnessManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorBrightnessManipulator Class Reference
+
+
+ +

Vertex manipulator which adjusts the brightness by the given amount. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorBrightnessManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which adjusts the brightness by the given amount.

+

A positive value increases brightness, a negative value darkens the colors.

+ +

Definition at line 79 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexColorBrightnessManipulator::SVertexColorBrightnessManipulator (s32 amount) [inline]
+
+
+ +

Definition at line 82 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorBrightnessManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 83 of file SVertexManipulator.h.

+ +

References irr::core::clamp(), and irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.png new file mode 100644 index 0000000..ac6fa81 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator-members.html new file mode 100644 index 0000000..58d83f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorContrastBrightnessManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorContrastBrightnessManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorContrastBrightnessManipulator [inline]
SVertexColorContrastBrightnessManipulator(f32 factor, s32 amount)irr::scene::SVertexColorContrastBrightnessManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.html new file mode 100644 index 0000000..edc25db --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.html @@ -0,0 +1,208 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorContrastBrightnessManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorContrastBrightnessManipulator Class Reference
+
+
+ +

Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorContrastBrightnessManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount.

+

Factors over 1 increase contrast, below 1 reduce it. A positive amount increases brightness, a negative one darkens the colors.

+ +

Definition at line 110 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::SVertexColorContrastBrightnessManipulator::SVertexColorContrastBrightnessManipulator (f32 factor,
s32 amount 
) [inline]
+
+
+ +

Definition at line 113 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorContrastBrightnessManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 114 of file SVertexManipulator.h.

+ +

References irr::core::clamp(), irr::video::S3DVertex::Color, and irr::core::round32().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.png new file mode 100644 index 0000000..e29a5d2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator-members.html new file mode 100644 index 0000000..192bbca --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorContrastManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorContrastManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorContrastManipulator [inline]
SVertexColorContrastManipulator(f32 factor)irr::scene::SVertexColorContrastManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.html new file mode 100644 index 0000000..945135a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorContrastManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorContrastManipulator Class Reference
+
+
+ +

Vertex manipulator which adjusts the contrast by the given factor. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorContrastManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which adjusts the contrast by the given factor.

+

Factors over 1 increase contrast, below 1 reduce it.

+ +

Definition at line 94 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexColorContrastManipulator::SVertexColorContrastManipulator (f32 factor) [inline]
+
+
+ +

Definition at line 97 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorContrastManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 98 of file SVertexManipulator.h.

+ +

References irr::core::clamp(), irr::video::S3DVertex::Color, and irr::core::round32().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.png new file mode 100644 index 0000000..15dbb23 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator-members.html new file mode 100644 index 0000000..18585a0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator-members.html @@ -0,0 +1,121 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorDesaturateToAverageManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorDesaturateToAverageManipulator, including all inherited members. + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorDesaturateToAverageManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.html new file mode 100644 index 0000000..d6c87a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorDesaturateToAverageManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorDesaturateToAverageManipulator Class Reference
+
+
+ +

Vertex manipulator which desaturates the color values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorDesaturateToAverageManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which desaturates the color values.

+

Uses the average value of the color.

+ +

Definition at line 170 of file SVertexManipulator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorDesaturateToAverageManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 173 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.png new file mode 100644 index 0000000..be27c48 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator-members.html new file mode 100644 index 0000000..b30dd18 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator-members.html @@ -0,0 +1,121 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorDesaturateToLightnessManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorDesaturateToLightnessManipulator, including all inherited members. + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorDesaturateToLightnessManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.html new file mode 100644 index 0000000..722407c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorDesaturateToLightnessManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorDesaturateToLightnessManipulator Class Reference
+
+
+ +

Vertex manipulator which desaturates the color values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorDesaturateToLightnessManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which desaturates the color values.

+

Uses the lightness value of the color.

+ +

Definition at line 160 of file SVertexManipulator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorDesaturateToLightnessManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 163 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color, and irr::core::round32().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.png new file mode 100644 index 0000000..f41bdaa Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator-members.html new file mode 100644 index 0000000..b388176 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator-members.html @@ -0,0 +1,121 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorDesaturateToLuminanceManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorDesaturateToLuminanceManipulator, including all inherited members. + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorDesaturateToLuminanceManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.html new file mode 100644 index 0000000..4a5eee6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorDesaturateToLuminanceManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorDesaturateToLuminanceManipulator Class Reference
+
+
+ +

Vertex manipulator which desaturates the color values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorDesaturateToLuminanceManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which desaturates the color values.

+

Uses the luminance value of the color.

+ +

Definition at line 180 of file SVertexManipulator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorDesaturateToLuminanceManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 183 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color, and irr::core::round32().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.png new file mode 100644 index 0000000..e24d57a Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator-members.html new file mode 100644 index 0000000..954beb8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorGammaManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorGammaManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorGammaManipulator [inline]
SVertexColorGammaManipulator(f32 gamma)irr::scene::SVertexColorGammaManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.html new file mode 100644 index 0000000..996246a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorGammaManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorGammaManipulator Class Reference
+
+
+ +

Vertex manipulator which adjusts the brightness by a gamma operation. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorGammaManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which adjusts the brightness by a gamma operation.

+

A value over one increases brightness, one below darkens the colors.

+ +

Definition at line 126 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexColorGammaManipulator::SVertexColorGammaManipulator (f32 gamma) [inline]
+
+
+ +

Definition at line 129 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorGammaManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 134 of file SVertexManipulator.h.

+ +

References irr::core::clamp(), irr::video::S3DVertex::Color, and irr::core::round32().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.png new file mode 100644 index 0000000..cef17c1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator-members.html new file mode 100644 index 0000000..5b950c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorInterpolateLinearManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorInterpolateLinearManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorInterpolateLinearManipulator [inline]
SVertexColorInterpolateLinearManipulator(video::SColor color, f32 factor)irr::scene::SVertexColorInterpolateLinearManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.html new file mode 100644 index 0000000..daeb335 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.html @@ -0,0 +1,208 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorInterpolateLinearManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorInterpolateLinearManipulator Class Reference
+
+
+ +

Vertex manipulator which interpolates the color values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorInterpolateLinearManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which interpolates the color values.

+

Uses linear interpolation.

+ +

Definition at line 190 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::SVertexColorInterpolateLinearManipulator::SVertexColorInterpolateLinearManipulator (video::SColor color,
f32 factor 
) [inline]
+
+
+ +

Definition at line 193 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorInterpolateLinearManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 195 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.png new file mode 100644 index 0000000..94419d2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator-members.html new file mode 100644 index 0000000..3492dd9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorInterpolateQuadraticManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorInterpolateQuadraticManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorInterpolateQuadraticManipulator [inline]
SVertexColorInterpolateQuadraticManipulator(video::SColor color1, video::SColor color2, f32 factor)irr::scene::SVertexColorInterpolateQuadraticManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.html new file mode 100644 index 0000000..de25db9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.html @@ -0,0 +1,214 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorInterpolateQuadraticManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorInterpolateQuadraticManipulator Class Reference
+
+
+ +

Vertex manipulator which interpolates the color values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorInterpolateQuadraticManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which interpolates the color values.

+

Uses linear interpolation.

+ +

Definition at line 205 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::SVertexColorInterpolateQuadraticManipulator::SVertexColorInterpolateQuadraticManipulator (video::SColor color1,
video::SColor color2,
f32 factor 
) [inline]
+
+
+ +

Definition at line 208 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorInterpolateQuadraticManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 210 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.png new file mode 100644 index 0000000..be17608 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator-members.html new file mode 100644 index 0000000..de8c226 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator-members.html @@ -0,0 +1,121 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorInvertManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorInvertManipulator, including all inherited members. + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorInvertManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.html new file mode 100644 index 0000000..b160198 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorInvertManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorInvertManipulator Class Reference
+
+
+ +

Vertex manipulator which invertes the RGB values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorInvertManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which invertes the RGB values.

+ +

Definition at line 51 of file SVertexManipulator.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorInvertManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 54 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.png new file mode 100644 index 0000000..100d35b Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator-members.html new file mode 100644 index 0000000..c369a22 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorScaleManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorScaleManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorScaleManipulator [inline]
SVertexColorScaleManipulator(f32 factor)irr::scene::SVertexColorScaleManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.html new file mode 100644 index 0000000..370f7b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorScaleManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorScaleManipulator Class Reference
+
+
+ +

Vertex manipulator which scales the color values. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorScaleManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which scales the color values.

+

Can e.g be used for white balance, factor would be 255.f/brightest color.

+ +

Definition at line 145 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexColorScaleManipulator::SVertexColorScaleManipulator (f32 factor) [inline]
+
+
+ +

Definition at line 148 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorScaleManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 149 of file SVertexManipulator.h.

+ +

References irr::core::clamp(), irr::video::S3DVertex::Color, and irr::core::round32().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.png new file mode 100644 index 0000000..5d0ff78 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator-members.html new file mode 100644 index 0000000..34d8919 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorSetAlphaManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorSetAlphaManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorSetAlphaManipulator [inline]
SVertexColorSetAlphaManipulator(u32 alpha)irr::scene::SVertexColorSetAlphaManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.html new file mode 100644 index 0000000..48fd97c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.html @@ -0,0 +1,197 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorSetAlphaManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorSetAlphaManipulator Class Reference
+
+
+ +

Vertex manipulator to set the alpha value of the vertex color to a fixed value. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorSetAlphaManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator to set the alpha value of the vertex color to a fixed value.

+ +

Definition at line 39 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexColorSetAlphaManipulator::SVertexColorSetAlphaManipulator (u32 alpha) [inline]
+
+
+ +

Definition at line 42 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorSetAlphaManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 43 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.png new file mode 100644 index 0000000..57d03f3 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator-members.html new file mode 100644 index 0000000..0e202cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorSetManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorSetManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorSetManipulator [inline]
SVertexColorSetManipulator(video::SColor color)irr::scene::SVertexColorSetManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.html new file mode 100644 index 0000000..5788dc4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.html @@ -0,0 +1,197 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorSetManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorSetManipulator Class Reference
+
+
+ +

Vertex manipulator to set color to a fixed color for all vertices. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorSetManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator to set color to a fixed color for all vertices.

+ +

Definition at line 27 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexColorSetManipulator::SVertexColorSetManipulator (video::SColor color) [inline]
+
+
+ +

Definition at line 30 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorSetManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 31 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.png new file mode 100644 index 0000000..24ee67d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_set_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator-members.html new file mode 100644 index 0000000..ef97c83 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexColorThresholdManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexColorThresholdManipulator, including all inherited members. + + +
operator()(video::S3DVertex &vertex) const irr::scene::SVertexColorThresholdManipulator [inline]
SVertexColorThresholdManipulator(u8 threshold, video::SColor low, video::SColor high)irr::scene::SVertexColorThresholdManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.html new file mode 100644 index 0000000..b2c2c1d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.html @@ -0,0 +1,214 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexColorThresholdManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexColorThresholdManipulator Class Reference
+
+
+ +

Vertex manipulator to set vertex color to one of two values depending on a given threshold. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexColorThresholdManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator to set vertex color to one of two values depending on a given threshold.

+

If average of the color value is >Threshold the High color is chosen, else Low.

+ +

Definition at line 63 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::scene::SVertexColorThresholdManipulator::SVertexColorThresholdManipulator (u8 threshold,
video::SColor low,
video::SColor high 
) [inline]
+
+
+ +

Definition at line 66 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexColorThresholdManipulator::operator() (video::S3DVertexvertex) const [inline]
+
+
+ +

Definition at line 68 of file SVertexManipulator.h.

+ +

References irr::video::S3DVertex::Color.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.png new file mode 100644 index 0000000..95ed171 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator-members.html new file mode 100644 index 0000000..5fc4961 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexPositionScaleAlongNormalsManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexPositionScaleAlongNormalsManipulator, including all inherited members. + + +
operator()(VType &vertex) const irr::scene::SVertexPositionScaleAlongNormalsManipulator [inline]
SVertexPositionScaleAlongNormalsManipulator(const core::vector3df &factor)irr::scene::SVertexPositionScaleAlongNormalsManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.html new file mode 100644 index 0000000..b1b7409 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexPositionScaleAlongNormalsManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexPositionScaleAlongNormalsManipulator Class Reference
+
+
+ +

Vertex manipulator which scales the position of the vertex along the normals. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexPositionScaleAlongNormalsManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which scales the position of the vertex along the normals.

+

This can look more pleasing than the usual Scale operator, but depends on the mesh geometry.

+ +

Definition at line 238 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexPositionScaleAlongNormalsManipulator::SVertexPositionScaleAlongNormalsManipulator (const core::vector3dffactor) [inline]
+
+
+ +

Definition at line 241 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename VType >
+ + + + + + + + +
void irr::scene::SVertexPositionScaleAlongNormalsManipulator::operator() (VType & vertex) const [inline]
+
+
+ +

Definition at line 243 of file SVertexManipulator.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.png new file mode 100644 index 0000000..b426a23 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator-members.html new file mode 100644 index 0000000..23d1b50 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexPositionScaleManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexPositionScaleManipulator, including all inherited members. + + +
operator()(VType &vertex) const irr::scene::SVertexPositionScaleManipulator [inline]
SVertexPositionScaleManipulator(const core::vector3df &factor)irr::scene::SVertexPositionScaleManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.html new file mode 100644 index 0000000..409e904 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.html @@ -0,0 +1,197 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexPositionScaleManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexPositionScaleManipulator Class Reference
+
+
+ +

Vertex manipulator which scales the position of the vertex. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexPositionScaleManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which scales the position of the vertex.

+ +

Definition at line 221 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexPositionScaleManipulator::SVertexPositionScaleManipulator (const core::vector3dffactor) [inline]
+
+
+ +

Definition at line 224 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename VType >
+ + + + + + + + +
void irr::scene::SVertexPositionScaleManipulator::operator() (VType & vertex) const [inline]
+
+
+ +

Definition at line 226 of file SVertexManipulator.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.png new file mode 100644 index 0000000..2328873 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator-members.html new file mode 100644 index 0000000..faa04b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexPositionTransformManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexPositionTransformManipulator, including all inherited members. + + +
operator()(VType &vertex) const irr::scene::SVertexPositionTransformManipulator [inline]
SVertexPositionTransformManipulator(const core::matrix4 &m)irr::scene::SVertexPositionTransformManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.html new file mode 100644 index 0000000..76a4461 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.html @@ -0,0 +1,199 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexPositionTransformManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexPositionTransformManipulator Class Reference
+
+
+ +

Vertex manipulator which transforms the position of the vertex. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexPositionTransformManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which transforms the position of the vertex.

+ +

Definition at line 252 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SVertexPositionTransformManipulator::SVertexPositionTransformManipulator (const core::matrix4m) [inline]
+
+
+ +

Definition at line 255 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename VType >
+ + + + + + + + +
void irr::scene::SVertexPositionTransformManipulator::operator() (VType & vertex) const [inline]
+
+
+ +

Definition at line 257 of file SVertexManipulator.h.

+ +

References irr::core::CMatrix4< T >::transformVect().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.png new file mode 100644 index 0000000..b8ca346 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator-members.html new file mode 100644 index 0000000..bb92c34 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SVertexTCoordsScaleManipulator Member List
+
+
+This is the complete list of members for irr::scene::SVertexTCoordsScaleManipulator, including all inherited members. + + + +
operator()(video::S3DVertex2TCoords &vertex) const irr::scene::SVertexTCoordsScaleManipulator [inline]
operator()(VType &vertex) const irr::scene::SVertexTCoordsScaleManipulator [inline]
SVertexTCoordsScaleManipulator(const core::vector2df &factor, u32 uvSet=1)irr::scene::SVertexTCoordsScaleManipulator [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.html new file mode 100644 index 0000000..86db17c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.html @@ -0,0 +1,229 @@ + + + + +Irrlicht 3D Engine: irr::scene::SVertexTCoordsScaleManipulator Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SVertexTCoordsScaleManipulator Class Reference
+
+
+ +

Vertex manipulator which scales the TCoords of the vertex. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::SVertexTCoordsScaleManipulator:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Vertex manipulator which scales the TCoords of the vertex.

+ +

Definition at line 266 of file SVertexManipulator.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::SVertexTCoordsScaleManipulator::SVertexTCoordsScaleManipulator (const core::vector2dffactor,
u32 uvSet = 1 
) [inline]
+
+
+ +

Definition at line 269 of file SVertexManipulator.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SVertexTCoordsScaleManipulator::operator() (video::S3DVertex2TCoordsvertex) const [inline]
+
+ +
+ +
+
+
+template<typename VType >
+ + + + + + + + +
void irr::scene::SVertexTCoordsScaleManipulator::operator() (VType & vertex) const [inline]
+
+
+ +

Definition at line 278 of file SVertexManipulator.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.png new file mode 100644 index 0000000..845efec Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager-members.html new file mode 100644 index 0000000..ea9abeb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager-members.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::IShaderManager Member List
+
+
+This is the complete list of members for irr::scene::quake3::IShaderManager, including all inherited members. + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html new file mode 100644 index 0000000..a260a36 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::IShaderManager Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::IShaderManager Class Reference
+
+
+ +

Manages various Quake3 Shader Styles. + More...

+ +

#include <IQ3Shader.h>

+
+ + Inheritance diagram for irr::scene::quake3::IShaderManager:
+
+
+ + +

List of all members.

+

Detailed Description

+

Manages various Quake3 Shader Styles.

+ +

Definition at line 876 of file IQ3Shader.h.

+

The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.png new file mode 100644 index 0000000..53fafba Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1scene_1_1quake3_1_1_i_shader_manager.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services-members.html new file mode 100644 index 0000000..af67b65 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services-members.html @@ -0,0 +1,134 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IGPUProgrammingServices Member List
+
+
+This is the complete list of members for irr::video::IGPUProgrammingServices, including all inherited members. + + + + + + + + + + + + + + +
addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const c8 *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const c8 *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0irr::video::IGPUProgrammingServices [pure virtual]
addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const c8 *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)irr::video::IGPUProgrammingServices [inline]
addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)irr::video::IGPUProgrammingServices [inline]
addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, const c8 *geometryShaderProgram=0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)irr::video::IGPUProgrammingServices [inline]
addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const io::path &pixelShaderProgramFileName, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const io::path &geometryShaderProgramFileName, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0irr::video::IGPUProgrammingServices [pure virtual]
addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const io::path &pixelShaderProgramFileName="", const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)irr::video::IGPUProgrammingServices [inline]
addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)irr::video::IGPUProgrammingServices [inline]
addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", const io::path &geometryShaderProgramFileName="", scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)irr::video::IGPUProgrammingServices [inline]
addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, io::IReadFile *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, io::IReadFile *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0irr::video::IGPUProgrammingServices [pure virtual]
addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, io::IReadFile *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)irr::video::IGPUProgrammingServices [inline]
addShaderMaterial(const c8 *vertexShaderProgram=0, const c8 *pixelShaderProgram=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0irr::video::IGPUProgrammingServices [pure virtual]
addShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, io::IReadFile *pixelShaderProgram, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0irr::video::IGPUProgrammingServices [pure virtual]
addShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0irr::video::IGPUProgrammingServices [pure virtual]
~IGPUProgrammingServices()irr::video::IGPUProgrammingServices [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services.html new file mode 100644 index 0000000..2595231 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_g_p_u_programming_services.html @@ -0,0 +1,1270 @@ + + + + +Irrlicht 3D Engine: irr::video::IGPUProgrammingServices Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IGPUProgrammingServices Class Reference
+
+
+ +

Interface making it possible to create and use programs running on the GPU. + More...

+ +

#include <IGPUProgrammingServices.h>

+ +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface making it possible to create and use programs running on the GPU.

+ +

Definition at line 38 of file IGPUProgrammingServices.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::video::IGPUProgrammingServices::~IGPUProgrammingServices () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 43 of file IGPUProgrammingServices.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial (const c8vertexShaderProgram,
const c8vertexShaderEntryPointName,
E_VERTEX_SHADER_TYPE vsCompileTarget,
const c8pixelShaderProgram,
const c8pixelShaderEntryPointName,
E_PIXEL_SHADER_TYPE psCompileTarget,
const c8geometryShaderProgram,
const c8geometryShaderEntryPointName = "main",
E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 verticesOut = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT 
) [pure virtual]
+
+
+ +

Adds a new high-level shading material renderer to the VideoDriver.

+

Currently only HLSL/D3D9 and GLSL/OpenGL are supported.

+
Parameters:
+ + + + + + + + + + + + + + + + + +
vertexShaderProgramString containing the source of the vertex shader program. This can be 0 if no vertex program shall be used.
vertexShaderEntryPointNameName of the entry function of the vertexShaderProgram (p.e. "main")
vsCompileTargetVertex shader version the high level shader shall be compiled to.
pixelShaderProgramString containing the source of the pixel shader program. This can be 0 if no pixel shader shall be used.
pixelShaderEntryPointNameEntry name of the function of the pixelShaderProgram (p.e. "main")
psCompileTargetPixel shader version the high level shader shall be compiled to.
geometryShaderProgramString containing the source of the geometry shader program. This can be 0 if no geometry shader shall be used.
geometryShaderEntryPointNameEntry name of the function of the geometryShaderProgram (p.e. "main")
gsCompileTargetGeometry shader version the high level shader shall be compiled to.
inTypeType of vertices passed to geometry shader
outTypeType of vertices created by geometry shader
verticesOutMaximal number of vertices created by geometry shader. If 0, maximal number supported is assumed.
callbackPointer to an implementation of IShaderConstantSetCallBack in which you can set the needed vertex, pixel, and geometry shader program constants. Set this to 0 if you don't need this.
baseMaterialBase material which renderstates will be used to shade the material.
userDataa user data int. This int can be set to any value and will be set as parameter in the callback method when calling OnSetConstants(). In this way it is easily possible to use the same callback method for multiple materials and distinguish between them during the call.
shaderLanga type of shading language used in current shader.
+
+
+
Returns:
Number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured, e.g. if a shader program could not be compiled or a compile target is not reachable. The error strings are then printed to the error log and can be catched with a custom event receiver.
+ +

Referenced by addHighLevelShaderMaterial().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial (const c8vertexShaderProgram,
const c8vertexShaderEntryPointName = "main",
E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
const c8pixelShaderProgram = 0,
const c8pixelShaderEntryPointName = "main",
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT 
) [inline]
+
+
+ +

convenience function for use without geometry shaders

+ +

Definition at line 106 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterial(), irr::video::EGST_GS_4_0, irr::scene::EPT_TRIANGLE_STRIP, and irr::scene::EPT_TRIANGLES.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial (const c8vertexShaderProgram,
const c8pixelShaderProgram = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [inline]
+
+
+ +

convenience function for use with many defaults, without geometry shader

+

All shader names are set to "main" and compile targets are shader type 1.1.

+ +

Definition at line 131 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterial(), irr::video::EGST_GS_4_0, irr::video::EPST_PS_1_1, irr::scene::EPT_TRIANGLE_STRIP, irr::scene::EPT_TRIANGLES, and irr::video::EVST_VS_1_1.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial (const c8vertexShaderProgram,
const c8pixelShaderProgram = 0,
const c8geometryShaderProgram = 0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 verticesOut = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [inline]
+
+
+ +

convenience function for use with many defaults, with geometry shader

+

All shader names are set to "main" and compile targets are shader type 1.1 and geometry shader 4.0.

+ +

Definition at line 151 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterial(), irr::video::EGST_GS_4_0, irr::video::EPST_PS_1_1, and irr::video::EVST_VS_1_1.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles (const io::pathvertexShaderProgramFileName,
const c8vertexShaderEntryPointName,
E_VERTEX_SHADER_TYPE vsCompileTarget,
const io::pathpixelShaderProgramFileName,
const c8pixelShaderEntryPointName,
E_PIXEL_SHADER_TYPE psCompileTarget,
const io::pathgeometryShaderProgramFileName,
const c8geometryShaderEntryPointName = "main",
E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 verticesOut = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT 
) [pure virtual]
+
+
+ +

Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.

+
Parameters:
+ + + + + + + + + + + + + + + + + +
vertexShaderProgramFileNameText file containing the source of the vertex shader program. Set to empty string if no vertex shader shall be created.
vertexShaderEntryPointNameName of the entry function of the vertexShaderProgram (p.e. "main")
vsCompileTargetVertex shader version the high level shader shall be compiled to.
pixelShaderProgramFileNameText file containing the source of the pixel shader program. Set to empty string if no pixel shader shall be created.
pixelShaderEntryPointNameEntry name of the function of the pixelShaderProgram (p.e. "main")
psCompileTargetPixel shader version the high level shader shall be compiled to.
geometryShaderProgramFileNameName of the source of the geometry shader program. Set to empty string if no geometry shader shall be created.
geometryShaderEntryPointNameEntry name of the function of the geometryShaderProgram (p.e. "main")
gsCompileTargetGeometry shader version the high level shader shall be compiled to.
inTypeType of vertices passed to geometry shader
outTypeType of vertices created by geometry shader
verticesOutMaximal number of vertices created by geometry shader. If 0, maximal number supported is assumed.
callbackPointer to an implementation of IShaderConstantSetCallBack in which you can set the needed vertex, pixel, and geometry shader program constants. Set this to 0 if you don't need this.
baseMaterialBase material which renderstates will be used to shade the material.
userDataa user data int. This int can be set to any value and will be set as parameter in the callback method when calling OnSetConstants(). In this way it is easily possible to use the same callback method for multiple materials and distinguish between them during the call.
shaderLanga type of shading language used in current shader.
+
+
+
Returns:
Number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured, e.g. if a shader program could not be compiled or a compile target is not reachable. The error strings are then printed to the error log and can be catched with a custom event receiver.
+ +

Referenced by addHighLevelShaderMaterialFromFiles().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles (const io::pathvertexShaderProgramFileName,
const c8vertexShaderEntryPointName = "main",
E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
const io::pathpixelShaderProgramFileName = "",
const c8pixelShaderEntryPointName = "main",
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT 
) [inline]
+
+
+ +

convenience function for use without geometry shaders

+ +

Definition at line 233 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterialFromFiles(), irr::video::EGST_GS_4_0, irr::scene::EPT_TRIANGLE_STRIP, and irr::scene::EPT_TRIANGLES.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles (const io::pathvertexShaderProgramFileName,
const io::pathpixelShaderProgramFileName = "",
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [inline]
+
+
+ +

convenience function for use with many defaults, without geometry shader

+

All shader names are set to "main" and compile targets are shader type 1.1.

+ +

Definition at line 258 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterialFromFiles(), irr::video::EGST_GS_4_0, irr::video::EPST_PS_1_1, irr::scene::EPT_TRIANGLE_STRIP, irr::scene::EPT_TRIANGLES, and irr::video::EVST_VS_1_1.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles (const io::pathvertexShaderProgramFileName,
const io::pathpixelShaderProgramFileName = "",
const io::pathgeometryShaderProgramFileName = "",
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 verticesOut = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [inline]
+
+
+ +

convenience function for use with many defaults, with geometry shader

+

All shader names are set to "main" and compile targets are shader type 1.1 and geometry shader 4.0.

+ +

Definition at line 278 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterialFromFiles(), irr::video::EGST_GS_4_0, irr::video::EPST_PS_1_1, and irr::video::EVST_VS_1_1.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles (io::IReadFilevertexShaderProgram,
const c8vertexShaderEntryPointName,
E_VERTEX_SHADER_TYPE vsCompileTarget,
io::IReadFilepixelShaderProgram,
const c8pixelShaderEntryPointName,
E_PIXEL_SHADER_TYPE psCompileTarget,
io::IReadFilegeometryShaderProgram,
const c8geometryShaderEntryPointName = "main",
E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 verticesOut = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT 
) [pure virtual]
+
+
+ +

Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.

+
Parameters:
+ + + + + + + + + + + + + + + + + +
vertexShaderProgramText file handle containing the source of the vertex shader program. Set to 0 if no vertex shader shall be created.
vertexShaderEntryPointNameName of the entry function of the vertexShaderProgram
vsCompileTargetVertex shader version the high level shader shall be compiled to.
pixelShaderProgramText file handle containing the source of the pixel shader program. Set to 0 if no pixel shader shall be created.
pixelShaderEntryPointNameEntry name of the function of the pixelShaderProgram (p.e. "main")
psCompileTargetPixel shader version the high level shader shall be compiled to.
geometryShaderProgramText file handle containing the source of the geometry shader program. Set to 0 if no geometry shader shall be created.
geometryShaderEntryPointNameEntry name of the function of the geometryShaderProgram (p.e. "main")
gsCompileTargetGeometry shader version the high level shader shall be compiled to.
inTypeType of vertices passed to geometry shader
outTypeType of vertices created by geometry shader
verticesOutMaximal number of vertices created by geometry shader. If 0, maximal number supported is assumed.
callbackPointer to an implementation of IShaderConstantSetCallBack in which you can set the needed vertex and pixel shader program constants. Set this to 0 if you don't need this.
baseMaterialBase material which renderstates will be used to shade the material.
userDataa user data int. This int can be set to any value and will be set as parameter in the callback method when calling OnSetConstants(). In this way it is easily possible to use the same callback method for multiple materials and distinguish between them during the call.
shaderLanga type of shading language used in current shader.
+
+
+
Returns:
Number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured, e.g. if a shader program could not be compiled or a compile target is not reachable. The error strings are then printed to the error log and can be catched with a custom event receiver.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles (io::IReadFilevertexShaderProgram,
const c8vertexShaderEntryPointName = "main",
E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
io::IReadFilepixelShaderProgram = 0,
const c8pixelShaderEntryPointName = "main",
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT 
) [inline]
+
+
+ +

convenience function for use without geometry shaders

+ +

Definition at line 358 of file IGPUProgrammingServices.h.

+ +

References addHighLevelShaderMaterialFromFiles(), irr::video::EGST_GS_4_0, irr::scene::EPT_TRIANGLE_STRIP, and irr::scene::EPT_TRIANGLES.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IGPUProgrammingServices::addShaderMaterial (const c8vertexShaderProgram = 0,
const c8pixelShaderProgram = 0,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [pure virtual]
+
+
+ +

Adds a new ASM shader material renderer to the VideoDriver.

+

Note that it is a good idea to call IVideoDriver::queryFeature() in advance to check if the IVideoDriver supports the vertex and/or pixel shader version your are using.

+

The material is added to the VideoDriver like with IVideoDriver::addMaterialRenderer() and can be used like it had been added with that method.

+
Parameters:
+ + +
vertexShaderProgramString containing the source of the vertex shader program. This can be 0 if no vertex program shall be used.
+
+
+

For DX8 programs, the will always input registers look like this: v0: position, v1: normal, v2: color, v3: texture cooridnates, v4: texture coordinates 2 if available.

+

For DX9 programs, you can manually set the registers using the dcl_ statements.

+
Parameters:
+ + + + + +
pixelShaderProgramString containing the source of the pixel shader program. This can be 0 if you don't want to use a pixel shader.
callbackPointer to an implementation of IShaderConstantSetCallBack in which you can set the needed vertex and pixel shader program constants. Set this to 0 if you don't need this.
baseMaterialBase material which renderstates will be used to shade the material.
userDataa user data int. This int can be set to any value and will be set as parameter in the callback method when calling OnSetConstants(). In this way it is easily possible to use the same callback method for multiple materials and distinguish between them during the call.
+
+
+
Returns:
Returns the number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured. -1 is returned for example if a vertex or pixel shader program could not be compiled, the error strings are then printed out into the error log, and can be catched with a custom event receiver.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IGPUProgrammingServices::addShaderMaterialFromFiles (io::IReadFilevertexShaderProgram,
io::IReadFilepixelShaderProgram,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [pure virtual]
+
+
+ +

Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.

+
Parameters:
+ + + + + + +
vertexShaderProgramText file containing the source of the vertex shader program. Set to 0 if no shader shall be created.
pixelShaderProgramText file containing the source of the pixel shader program. Set to 0 if no shader shall be created.
callbackPointer to an IShaderConstantSetCallback object to which the OnSetConstants function is called.
baseMaterialbaseMaterial
userDataa user data int. This int can be set to any value and will be set as parameter in the callback method when calling OnSetConstants(). In this way it is easily possible to use the same callback method for multiple materials and distinguish between them during the call.
+
+
+
Returns:
Returns the number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured. -1 is returned for example if a vertex or pixel shader program could not be compiled, the error strings are then printed out into the error log, and can be catched with a custom event receiver.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IGPUProgrammingServices::addShaderMaterialFromFiles (const io::pathvertexShaderProgramFileName,
const io::pathpixelShaderProgramFileName,
IShaderConstantSetCallBackcallback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0 
) [pure virtual]
+
+
+ +

Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.

+
Parameters:
+ + + + + + +
vertexShaderProgramFileNameText file name containing the source of the vertex shader program. Set to 0 if no shader shall be created.
pixelShaderProgramFileNameText file name containing the source of the pixel shader program. Set to 0 if no shader shall be created.
callbackPointer to an IShaderConstantSetCallback object on which the OnSetConstants function is called.
baseMaterialbaseMaterial
userDataa user data int. This int can be set to any value and will be set as parameter in the callback method when calling OnSetConstants(). In this way it is easily possible to use the same callback method for multiple materials and distinguish between them during the call.
+
+
+
Returns:
Returns the number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured. -1 is returned for example if a vertex or pixel shader program could not be compiled, the error strings are then printed out into the error log, and can be catched with a custom event receiver.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image-members.html new file mode 100644 index 0000000..1a5ac25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image-members.html @@ -0,0 +1,151 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IImage Member List
+
+
+This is the complete list of members for irr::video::IImage, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
copyTo(IImage *target, const core::position2d< s32 > &pos=core::position2d< s32 >(0, 0))=0irr::video::IImage [pure virtual]
copyTo(IImage *target, const core::position2d< s32 > &pos, const core::rect< s32 > &sourceRect, const core::rect< s32 > *clipRect=0)=0irr::video::IImage [pure virtual]
copyToScaling(void *target, u32 width, u32 height, ECOLOR_FORMAT format=ECF_A8R8G8B8, u32 pitch=0)=0irr::video::IImage [pure virtual]
copyToScaling(IImage *target)=0irr::video::IImage [pure virtual]
copyToScalingBoxFilter(IImage *target, s32 bias=0, bool blend=false)=0irr::video::IImage [pure virtual]
copyToWithAlpha(IImage *target, const core::position2d< s32 > &pos, const core::rect< s32 > &sourceRect, const SColor &color, const core::rect< s32 > *clipRect=0)=0irr::video::IImage [pure virtual]
drop() const irr::IReferenceCounted [inline]
fill(const SColor &color)=0irr::video::IImage [pure virtual]
getAlphaMask() const =0irr::video::IImage [pure virtual]
getBitsPerPixel() const =0irr::video::IImage [pure virtual]
getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)irr::video::IImage [inline, static]
getBlueMask() const =0irr::video::IImage [pure virtual]
getBytesPerPixel() const =0irr::video::IImage [pure virtual]
getColorFormat() const =0irr::video::IImage [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDimension() const =0irr::video::IImage [pure virtual]
getGreenMask() const =0irr::video::IImage [pure virtual]
getImageDataSizeInBytes() const =0irr::video::IImage [pure virtual]
getImageDataSizeInPixels() const =0irr::video::IImage [pure virtual]
getPitch() const =0irr::video::IImage [pure virtual]
getPixel(u32 x, u32 y) const =0irr::video::IImage [pure virtual]
getRedMask() const =0irr::video::IImage [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isRenderTargetOnlyFormat(const ECOLOR_FORMAT format)irr::video::IImage [inline, static]
lock()=0irr::video::IImage [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setPixel(u32 x, u32 y, const SColor &color, bool blend=false)=0irr::video::IImage [pure virtual]
unlock()=0irr::video::IImage [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.html new file mode 100644 index 0000000..9d032a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.html @@ -0,0 +1,776 @@ + + + + +Irrlicht 3D Engine: irr::video::IImage Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IImage Class Reference
+
+
+ +

Interface for software image data. + More...

+ +

#include <IImage.h>

+
+ + Inheritance diagram for irr::video::IImage:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Static Public Member Functions

+ +

Detailed Description

+

Interface for software image data.

+

Image loaders create these images from files. IVideoDrivers convert these images into their (hardware) textures.

+ +

Definition at line 22 of file IImage.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IImage::copyTo (IImagetarget,
const core::position2d< s32 > & pos = core::position2d< s32 >(0, 0) 
) [pure virtual]
+
+
+ +

copies this surface into another

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IImage::copyTo (IImagetarget,
const core::position2d< s32 > & pos,
const core::rect< s32 > & sourceRect,
const core::rect< s32 > * clipRect = 0 
) [pure virtual]
+
+
+ +

copies this surface into another

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IImage::copyToScaling (void * target,
u32 width,
u32 height,
ECOLOR_FORMAT format = ECF_A8R8G8B8,
u32 pitch = 0 
) [pure virtual]
+
+
+ +

Copies the image into the target, scaling the image to fit.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IImage::copyToScaling (IImagetarget) [pure virtual]
+
+
+ +

Copies the image into the target, scaling the image to fit.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IImage::copyToScalingBoxFilter (IImagetarget,
s32 bias = 0,
bool blend = false 
) [pure virtual]
+
+
+ +

copies this surface into another, scaling it to fit, appyling a box filter

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IImage::copyToWithAlpha (IImagetarget,
const core::position2d< s32 > & pos,
const core::rect< s32 > & sourceRect,
const SColorcolor,
const core::rect< s32 > * clipRect = 0 
) [pure virtual]
+
+
+ +

copies this surface into another, using the alpha mask and cliprect and a color to add with

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IImage::fill (const SColorcolor) [pure virtual]
+
+
+ +

fills the surface with given color

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getAlphaMask () const [pure virtual]
+
+
+ +

Returns mask for alpha value of a pixel.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getBitsPerPixel () const [pure virtual]
+
+
+ +

Returns bits per pixel.

+ +
+
+ +
+
+ + + + + + + + +
static u32 irr::video::IImage::getBitsPerPixelFromFormat (const ECOLOR_FORMAT format) [inline, static]
+
+ +
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getBlueMask () const [pure virtual]
+
+
+ +

Returns mask for blue value of a pixel.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getBytesPerPixel () const [pure virtual]
+
+
+ +

Returns bytes per pixel.

+ +
+
+ +
+
+ + + + + + + +
virtual ECOLOR_FORMAT irr::video::IImage::getColorFormat () const [pure virtual]
+
+
+ +

Returns the color format.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<u32>& irr::video::IImage::getDimension () const [pure virtual]
+
+
+ +

Returns width and height of image data.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getGreenMask () const [pure virtual]
+
+
+ +

Returns mask for green value of a pixel.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getImageDataSizeInBytes () const [pure virtual]
+
+
+ +

Returns image data size in bytes.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getImageDataSizeInPixels () const [pure virtual]
+
+
+ +

Returns image data size in pixels.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getPitch () const [pure virtual]
+
+
+ +

Returns pitch of image.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual SColor irr::video::IImage::getPixel (u32 x,
u32 y 
) const [pure virtual]
+
+
+ +

Returns a pixel.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IImage::getRedMask () const [pure virtual]
+
+
+ +

Returns mask for red value of a pixel.

+ +
+
+ +
+
+ + + + + + + + +
static bool irr::video::IImage::isRenderTargetOnlyFormat (const ECOLOR_FORMAT format) [inline, static]
+
+
+ +

test if the color format is only viable for RenderTarget textures

+

Since we don't have support for e.g. floating point IImage formats one should test if the color format can be used for arbitrary usage, or if it is restricted to RTTs.

+ +

Definition at line 135 of file IImage.h.

+ +

References irr::video::ECF_A1R5G5B5, irr::video::ECF_A8R8G8B8, irr::video::ECF_R5G6B5, and irr::video::ECF_R8G8B8.

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::video::IImage::lock () [pure virtual]
+
+
+ +

Lock function. Use this to get a pointer to the image data.

+

After you don't need the pointer anymore, you must call unlock().

+
Returns:
Pointer to the image data. What type of data is pointed to depends on the color format of the image. For example if the color format is ECF_A8R8G8B8, it is of u32. Be sure to call unlock() after you don't need the pointer any more.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IImage::setPixel (u32 x,
u32 y,
const SColorcolor,
bool blend = false 
) [pure virtual]
+
+
+ +

Sets a pixel.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IImage::unlock () [pure virtual]
+
+
+ +

Unlock function.

+

Should be called after the pointer received by lock() is not needed anymore.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.png new file mode 100644 index 0000000..53ce3c7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader-members.html new file mode 100644 index 0000000..6bed19c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IImageLoader Member List
+
+
+This is the complete list of members for irr::video::IImageLoader, including all inherited members. + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isALoadableFileExtension(const io::path &filename) const =0irr::video::IImageLoader [pure virtual]
isALoadableFileFormat(io::IReadFile *file) const =0irr::video::IImageLoader [pure virtual]
loadImage(io::IReadFile *file) const =0irr::video::IImageLoader [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.html new file mode 100644 index 0000000..c969f3e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.html @@ -0,0 +1,238 @@ + + + + +Irrlicht 3D Engine: irr::video::IImageLoader Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IImageLoader Class Reference
+
+
+ +

Class which is able to create a image from a file. + More...

+ +

#include <IImageLoader.h>

+
+ + Inheritance diagram for irr::video::IImageLoader:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Class which is able to create a image from a file.

+

If you want the Irrlicht Engine be able to load textures of currently unsupported file formats (e.g .gif), then implement this and add your new Surface loader with IVideoDriver::addExternalImageLoader() to the engine.

+ +

Definition at line 26 of file IImageLoader.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool irr::video::IImageLoader::isALoadableFileExtension (const io::pathfilename) const [pure virtual]
+
+
+ +

Check if the file might be loaded by this class.

+

Check is based on the file extension (e.g. ".tga")

+
Parameters:
+ + +
filenameName of file to check.
+
+
+
Returns:
True if file seems to be loadable.
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::video::IImageLoader::isALoadableFileFormat (io::IReadFilefile) const [pure virtual]
+
+
+ +

Check if the file might be loaded by this class.

+

Check might look into the file.

+
Parameters:
+ + +
fileFile handle to check.
+
+
+
Returns:
True if file seems to be loadable.
+ +
+
+ +
+
+ + + + + + + + +
virtual IImage* irr::video::IImageLoader::loadImage (io::IReadFilefile) const [pure virtual]
+
+
+ +

Creates a surface from the file.

+
Parameters:
+ + +
fileFile handle to check.
+
+
+
Returns:
Pointer to newly created image, or 0 upon error.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.png new file mode 100644 index 0000000..2940fd5 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_loader.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer-members.html new file mode 100644 index 0000000..6ddaf06 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IImageWriter Member List
+
+
+This is the complete list of members for irr::video::IImageWriter, including all inherited members. + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isAWriteableFileExtension(const io::path &filename) const =0irr::video::IImageWriter [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
writeImage(io::IWriteFile *file, IImage *image, u32 param=0) const =0irr::video::IImageWriter [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.html new file mode 100644 index 0000000..0304482 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.html @@ -0,0 +1,226 @@ + + + + +Irrlicht 3D Engine: irr::video::IImageWriter Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IImageWriter Class Reference
+
+
+ +

Interface for writing software image data. + More...

+ +

#include <IImageWriter.h>

+
+ + Inheritance diagram for irr::video::IImageWriter:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for writing software image data.

+ +

Definition at line 25 of file IImageWriter.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual bool irr::video::IImageWriter::isAWriteableFileExtension (const io::pathfilename) const [pure virtual]
+
+
+ +

Check if this writer can write a file with the given extension.

+
Parameters:
+ + +
filenameName of the file to check.
+
+
+
Returns:
True if file extension specifies a writable type.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IImageWriter::writeImage (io::IWriteFilefile,
IImageimage,
u32 param = 0 
) const [pure virtual]
+
+
+ +

Write image to file.

+
Parameters:
+ + + + +
fileFile handle to write to.
imageImage to write into file.
paramWriter specific parameter, influencing e.g. quality.
+
+
+
Returns:
True if image was successfully written.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.png new file mode 100644 index 0000000..cbbdb90 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_image_writer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer-members.html new file mode 100644 index 0000000..f86a18d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IMaterialRenderer Member List
+
+
+This is the complete list of members for irr::video::IMaterialRenderer, including all inherited members. + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
getRenderCapability() const irr::video::IMaterialRenderer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
isTransparent() const irr::video::IMaterialRenderer [inline, virtual]
OnRender(IMaterialRendererServices *service, E_VERTEX_TYPE vtxtype)irr::video::IMaterialRenderer [inline, virtual]
OnSetMaterial(const SMaterial &material, const SMaterial &lastMaterial, bool resetAllRenderstates, IMaterialRendererServices *services)irr::video::IMaterialRenderer [inline, virtual]
OnUnsetMaterial()irr::video::IMaterialRenderer [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.html new file mode 100644 index 0000000..d10f1af --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.html @@ -0,0 +1,317 @@ + + + + +Irrlicht 3D Engine: irr::video::IMaterialRenderer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IMaterialRenderer Class Reference
+
+
+ +

Interface for material rendering. + More...

+ +

#include <IMaterialRenderer.h>

+
+ + Inheritance diagram for irr::video::IMaterialRenderer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface for material rendering.

+

Can be used to extend the engine with new materials. Refer to IVideoDriver::addMaterialRenderer() for more informations on how to extend the engine with new materials.

+ +

Definition at line 24 of file IMaterialRenderer.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual s32 irr::video::IMaterialRenderer::getRenderCapability () const [inline, virtual]
+
+
+ +

Returns the render capability of the material.

+

Because some more complex materials are implemented in multiple ways and need special hardware capabilities, it is possible to query how the current material renderer is performing on the current hardware with this function.

+
Returns:
Returns 0 if everything is running fine. Any other value is material renderer specific and means for example that the renderer switched back to a fall back material because it cannot use the latest shaders. More specific examples: Fixed function pipeline materials should return 0 in most cases, parallax mapped material will only return 0 when at least pixel shader 1.4 is available on that machine.
+ +

Definition at line 93 of file IMaterialRenderer.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::video::IMaterialRenderer::isTransparent () const [inline, virtual]
+
+
+ +

Returns if the material is transparent.

+

The scene managment needs to know this for being able to sort the materials by opaque and transparent.

+ +

Definition at line 81 of file IMaterialRenderer.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRenderer::OnRender (IMaterialRendererServicesservice,
E_VERTEX_TYPE vtxtype 
) [inline, virtual]
+
+
+ +

Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call.

+

OnSetMaterial should normally only be called if the renderer decides that the renderstates should be changed, it won't be called if for example two drawIndexedTriangleList() will be called with the same material set. This method will be called every time. This is useful for example for materials with shaders, which don't only set new renderstates but also shader constants.

+
Parameters:
+ + + +
service,:Pointer to interface providing methos for setting constants and other things.
vtxtype,:Vertex type with which the next rendering will be done. This can be used by the material renderer to set some specific optimized shaders or if this is an incompatible vertex type for this renderer, to refuse rendering for example.
+
+
+
Returns:
Returns true if everything is ok, and false if nothing should be rendered. The material renderer can choose to return false for example if he doesn't support the specified vertex type. This is actually done in D3D8 and D3D9 when using a normal mapped material with a vertex type other than EVT_TANGENTS.
+ +

Definition at line 71 of file IMaterialRenderer.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IMaterialRenderer::OnSetMaterial (const SMaterialmaterial,
const SMateriallastMaterial,
bool resetAllRenderstates,
IMaterialRendererServicesservices 
) [inline, virtual]
+
+
+ +

Called by the IVideoDriver implementation the let the renderer set its needed render states.

+

This is called during the IVideoDriver::setMaterial() call. When overriding this, you can set some renderstates or for example a vertex or pixel shader if you like.

+
Parameters:
+ + + + + +
material,:The new material parameters to be set. The renderer may change the material flags in this material. For example if this material does not accept the zbuffer = true, it can set it to false. This is useful, because in the next lastMaterial will be just the material in this call.
lastMaterial,:The material parameters which have been set before this material.
resetAllRenderstates,:True if all renderstates should really be reset. This is usually true if the last rendering mode was not a usual 3d rendering mode, but for example a 2d rendering mode. You should reset really all renderstates if this is true, no matter if the lastMaterial had some similar settings. This is used because in most cases, some common renderstates are not changed if they are already there, for example bilinear filtering, wireframe, gouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and fogenable.
services,:Interface providing some methods for changing advanced, internal states of a IVideoDriver.
+
+
+ +

Definition at line 50 of file IMaterialRenderer.h.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IMaterialRenderer::OnUnsetMaterial () [inline, virtual]
+
+
+ +

Called by the IVideoDriver to unset this material.

+

Called during the IVideoDriver::setMaterial() call before the new material will get the OnSetMaterial() call.

+ +

Definition at line 76 of file IMaterialRenderer.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.png new file mode 100644 index 0000000..8cb7399 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services-members.html new file mode 100644 index 0000000..13a4500 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IMaterialRendererServices Member List
+
+
+This is the complete list of members for irr::video::IMaterialRendererServices, including all inherited members. + + + + + + + + + + + +
getVideoDriver()=0irr::video::IMaterialRendererServices [pure virtual]
setBasicRenderStates(const SMaterial &material, const SMaterial &lastMaterial, bool resetAllRenderstates)=0irr::video::IMaterialRendererServices [pure virtual]
setPixelShaderConstant(const c8 *name, const f32 *floats, int count)=0irr::video::IMaterialRendererServices [pure virtual]
setPixelShaderConstant(const c8 *name, const bool *bools, int count)=0irr::video::IMaterialRendererServices [pure virtual]
setPixelShaderConstant(const c8 *name, const s32 *ints, int count)=0irr::video::IMaterialRendererServices [pure virtual]
setPixelShaderConstant(const f32 *data, s32 startRegister, s32 constantAmount=1)=0irr::video::IMaterialRendererServices [pure virtual]
setVertexShaderConstant(const c8 *name, const f32 *floats, int count)=0irr::video::IMaterialRendererServices [pure virtual]
setVertexShaderConstant(const c8 *name, const bool *bools, int count)=0irr::video::IMaterialRendererServices [pure virtual]
setVertexShaderConstant(const c8 *name, const s32 *ints, int count)=0irr::video::IMaterialRendererServices [pure virtual]
setVertexShaderConstant(const f32 *data, s32 startRegister, s32 constantAmount=1)=0irr::video::IMaterialRendererServices [pure virtual]
~IMaterialRendererServices()irr::video::IMaterialRendererServices [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services.html new file mode 100644 index 0000000..67ddd43 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_material_renderer_services.html @@ -0,0 +1,568 @@ + + + + +Irrlicht 3D Engine: irr::video::IMaterialRendererServices Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IMaterialRendererServices Class Reference
+
+
+ +

Interface providing some methods for changing advanced, internal states of a IVideoDriver. + More...

+ +

#include <IMaterialRendererServices.h>

+ +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface providing some methods for changing advanced, internal states of a IVideoDriver.

+ +

Definition at line 20 of file IMaterialRendererServices.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::video::IMaterialRendererServices::~IMaterialRendererServices () [inline, virtual]
+
+
+ +

Destructor.

+ +

Definition at line 25 of file IMaterialRendererServices.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual IVideoDriver* irr::video::IMaterialRendererServices::getVideoDriver () [pure virtual]
+
+
+ +

Get pointer to the IVideoDriver interface.

+
Returns:
Pointer to the IVideoDriver interface
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IMaterialRendererServices::setBasicRenderStates (const SMaterialmaterial,
const SMateriallastMaterial,
bool resetAllRenderstates 
) [pure virtual]
+
+
+ +

Can be called by an IMaterialRenderer to make its work easier.

+

Sets all basic renderstates if needed. Basic render states are diffuse, ambient, specular, and emissive color, specular power, bilinear and trilinear filtering, wireframe mode, grouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and fog enabling.

+
Parameters:
+ + + + +
materialThe new material to be used.
lastMaterialThe material used until now.
resetAllRenderstatesSet to true if all renderstates should be set, regardless of their current state.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant (const c8name,
const f32floats,
int count 
) [pure virtual]
+
+
+ +

Sets a constant for the pixel shader based on a name.

+

This can be used if you used a high level shader language like GLSL or HLSL to create a shader. See setVertexShaderConstant() for an example on how to use this.

+
Parameters:
+ + + + +
nameName of the variable
floatsPointer to array of floats
countAmount of floats in array.
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant (const c8name,
const bool * bools,
int count 
) [pure virtual]
+
+
+ +

Bool interface for the above.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant (const c8name,
const s32ints,
int count 
) [pure virtual]
+
+
+ +

Int interface for the above.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IMaterialRendererServices::setPixelShaderConstant (const f32data,
s32 startRegister,
s32 constantAmount = 1 
) [pure virtual]
+
+
+ +

Sets a pixel shader constant.

+

Can be used if you created a shader using pixel/vertex shader assembler or ARB_fragment_program or ARB_vertex_program.

+
Parameters:
+ + + + +
dataData to be set in the constants
startRegisterFirst register to be set.
constantAmountAmount of registers to be set. One register consists of 4 floats.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRendererServices::setVertexShaderConstant (const c8name,
const f32floats,
int count 
) [pure virtual]
+
+
+ +

Sets a constant for the vertex shader based on a name.

+

This can be used if you used a high level shader language like GLSL or HLSL to create a shader. Example: If you created a shader which has variables named 'mWorldViewProj' (containing the WorldViewProjection matrix) and another one named 'fTime' containing one float, you can set them in your IShaderConstantSetCallBack derived class like this:

+
    virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)
+    {
+        video::IVideoDriver* driver = services->getVideoDriver();
+
+        f32 time = (f32)os::Timer::getTime()/100000.0f;
+        services->setVertexShaderConstant("fTime", &time, 1);
+
+        core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION));
+        worldViewProj *= driver->getTransform(video::ETS_VIEW);
+        worldViewProj *= driver->getTransform(video::ETS_WORLD);
+        services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16);
+    }
+
Parameters:
+ + + + +
nameName of the variable
floatsPointer to array of floats
countAmount of floats in array.
+
+
+
Returns:
True if successful.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRendererServices::setVertexShaderConstant (const c8name,
const bool * bools,
int count 
) [pure virtual]
+
+
+ +

Bool interface for the above.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IMaterialRendererServices::setVertexShaderConstant (const c8name,
const s32ints,
int count 
) [pure virtual]
+
+
+ +

Int interface for the above.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IMaterialRendererServices::setVertexShaderConstant (const f32data,
s32 startRegister,
s32 constantAmount = 1 
) [pure virtual]
+
+
+ +

Sets a vertex shader constant.

+

Can be used if you created a shader using pixel/vertex shader assembler or ARB_fragment_program or ARB_vertex_program.

+
Parameters:
+ + + + +
data,:Data to be set in the constants
startRegister,:First register to be set
constantAmount,:Amount of registers to be set. One register consists of 4 floats.
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back-members.html new file mode 100644 index 0000000..72fdd4c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IShaderConstantSetCallBack Member List
+
+
+This is the complete list of members for irr::video::IShaderConstantSetCallBack, including all inherited members. + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
OnSetConstants(IMaterialRendererServices *services, s32 userData)=0irr::video::IShaderConstantSetCallBack [pure virtual]
OnSetMaterial(const SMaterial &material)irr::video::IShaderConstantSetCallBack [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html new file mode 100644 index 0000000..244a98c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html @@ -0,0 +1,247 @@ + + + + +Irrlicht 3D Engine: irr::video::IShaderConstantSetCallBack Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IShaderConstantSetCallBack Class Reference
+
+
+ +

Interface making it possible to set constants for gpu programs every frame. + More...

+ +

#include <IShaderConstantSetCallBack.h>

+
+ + Inheritance diagram for irr::video::IShaderConstantSetCallBack:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface making it possible to set constants for gpu programs every frame.

+

Implement this interface in an own class and pass a pointer to it to one of the methods in IGPUProgrammingServices when creating a shader. The OnSetConstants method will be called every frame now.

+ +

Definition at line 21 of file IShaderConstantSetCallBack.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IShaderConstantSetCallBack::OnSetConstants (IMaterialRendererServicesservices,
s32 userData 
) [pure virtual]
+
+
+ +

Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set.

+

Implement the IShaderConstantSetCallBack in an own class and implement your own OnSetConstants method using the given IMaterialRendererServices interface. Pass a pointer to this class to one of the methods in IGPUProgrammingServices when creating a shader. The OnSetConstants method will now be called every time before geometry is being drawn using your shader material. A sample implementation would look like this:

+
    virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)
+    {
+        video::IVideoDriver* driver = services->getVideoDriver();
+
+        // set clip matrix at register 4
+        core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION));
+        worldViewProj *= driver->getTransform(video::ETS_VIEW);
+        worldViewProj *= driver->getTransform(video::ETS_WORLD);
+        services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4);
+        // for high level shading languages, this would be another solution:
+        //services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16);
+
+        // set some light color at register 9
+        video::SColorf col(0.0f,1.0f,1.0f,0.0f);
+        services->setVertexShaderConstant(reinterpret_cast<const f32*>(&col), 9, 1);
+        // for high level shading languages, this would be another solution:
+        //services->setVertexShaderConstant("myColor", reinterpret_cast<f32*>(&col), 4);
+    }
+
Parameters:
+ + + +
services,:Pointer to an interface providing methods to set the constants for the shader.
userData,:Userdata int which can be specified when creating the shader.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IShaderConstantSetCallBack::OnSetMaterial (const SMaterialmaterial) [inline, virtual]
+
+
+ +

Called to let the callBack know the used material (optional method)

+
    class MyCallBack : public IShaderConstantSetCallBack
+    {
+        const video::SMaterial *UsedMaterial;
+
+        OnSetMaterial(const video::SMaterial& material)
+        {
+            UsedMaterial=&material;
+        }
+
+        OnSetConstants(IMaterialRendererServices* services, s32 userData)
+        {
+            services->setVertexShaderConstant("myColor", reinterpret_cast<f32*>(&UsedMaterial->color), 4);
+        }
+    }
+
+

Definition at line 44 of file IShaderConstantSetCallBack.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.png new file mode 100644 index 0000000..ca8d2f8 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture-members.html new file mode 100644 index 0000000..06eb8ed --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture-members.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::ITexture Member List
+
+
+This is the complete list of members for irr::video::ITexture, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getColorFormat() const =0irr::video::ITexture [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDriverType() const =0irr::video::ITexture [pure virtual]
getName() const irr::video::ITexture [inline]
getOriginalSize() const =0irr::video::ITexture [pure virtual]
getPitch() const =0irr::video::ITexture [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getSize() const =0irr::video::ITexture [pure virtual]
getTextureFormatFromFlags(u32 flags)irr::video::ITexture [inline, protected]
grab() const irr::IReferenceCounted [inline]
hasAlpha() const irr::video::ITexture [inline, virtual]
hasMipMaps() const irr::video::ITexture [inline, virtual]
IReferenceCounted()irr::IReferenceCounted [inline]
isRenderTarget() const irr::video::ITexture [inline, virtual]
ITexture(const io::path &name)irr::video::ITexture [inline]
lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0)=0irr::video::ITexture [pure virtual]
NamedPathirr::video::ITexture [protected]
regenerateMipMapLevels(void *mipmapData=0)=0irr::video::ITexture [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
unlock()=0irr::video::ITexture [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.html new file mode 100644 index 0000000..5934dbd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.html @@ -0,0 +1,516 @@ + + + + +Irrlicht 3D Engine: irr::video::ITexture Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::ITexture Class Reference
+
+
+ +

Interface of a Video Driver dependent Texture. + More...

+ +

#include <ITexture.h>

+
+ + Inheritance diagram for irr::video::ITexture:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+ +

+Protected Attributes

+ +

Detailed Description

+

Interface of a Video Driver dependent Texture.

+

An ITexture is created by an IVideoDriver by using IVideoDriver::addTexture or IVideoDriver::getTexture. After that, the texture may only be used by this VideoDriver. As you can imagine, textures of the DirectX and the OpenGL device will, e.g., not be compatible. An exception is the Software device and the NULL device, their textures are compatible. If you try to use a texture created by one device with an other device, the device will refuse to do that and write a warning or an error message to the output buffer.

+ +

Definition at line 98 of file ITexture.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::video::ITexture::ITexture (const io::pathname) [inline]
+
+
+ +

constructor

+ +

Definition at line 103 of file ITexture.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual ECOLOR_FORMAT irr::video::ITexture::getColorFormat () const [pure virtual]
+
+
+ +

Get the color format of texture.

+
Returns:
The color format of texture.
+ +

Referenced by hasAlpha().

+ +
+
+ +
+
+ + + + + + + +
virtual E_DRIVER_TYPE irr::video::ITexture::getDriverType () const [pure virtual]
+
+
+ +

Get driver type of texture.

+

This is the driver, which created the texture. This method is used internally by the video devices, to check, if they may use a texture because textures may be incompatible between different devices.

+
Returns:
Driver type of texture.
+ +
+
+ +
+
+ + + + + + + +
const io::SNamedPath& irr::video::ITexture::getName () const [inline]
+
+
+ +

Get name of texture (in most cases this is the filename)

+ +

Definition at line 191 of file ITexture.h.

+ +

References NamedPath.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<u32>& irr::video::ITexture::getOriginalSize () const [pure virtual]
+
+
+ +

Get original size of the texture.

+

The texture is usually scaled, if it was created with an unoptimal size. For example if the size was not a power of two. This method returns the size of the texture it had before it was scaled. Can be useful when drawing 2d images on the screen, which should have the exact size of the original texture. Use ITexture::getSize() if you want to know the real size it has now stored in the system.

+
Returns:
The original size of the texture.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::ITexture::getPitch () const [pure virtual]
+
+
+ +

Get pitch of the main texture (in bytes).

+

The pitch is the amount of bytes used for a row of pixels in a texture.

+
Returns:
Pitch of texture in bytes.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<u32>& irr::video::ITexture::getSize () const [pure virtual]
+
+
+ +

Get dimension (=size) of the texture.

+
Returns:
The size of the texture.
+ +
+
+ +
+
+ + + + + + + + +
E_TEXTURE_CREATION_FLAG irr::video::ITexture::getTextureFormatFromFlags (u32 flags) [inline, protected]
+
+
+ +

Helper function, helps to get the desired texture creation format from the flags.

+
Returns:
Either ETCF_ALWAYS_32_BIT, ETCF_ALWAYS_16_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED.
+ +

Definition at line 198 of file ITexture.h.

+ +

References irr::video::ETCF_ALWAYS_16_BIT, irr::video::ETCF_ALWAYS_32_BIT, irr::video::ETCF_OPTIMIZED_FOR_QUALITY, and irr::video::ETCF_OPTIMIZED_FOR_SPEED.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::video::ITexture::hasAlpha () const [inline, virtual]
+
+
+ +

Returns if the texture has an alpha channel.

+ +

Definition at line 170 of file ITexture.h.

+ +

References irr::video::ECF_A1R5G5B5, irr::video::ECF_A8R8G8B8, and getColorFormat().

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::video::ITexture::hasMipMaps () const [inline, virtual]
+
+
+ +

Check whether the texture has MipMaps.

+
Returns:
True if texture has MipMaps, else false.
+ +

Definition at line 167 of file ITexture.h.

+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::video::ITexture::isRenderTarget () const [inline, virtual]
+
+
+ +

Check whether the texture is a render target.

+

Render targets can be set as such in the video driver, in order to render a scene into the texture. Once unbound as render target, they can be used just as usual textures again.

+
Returns:
True if this is a render target, otherwise false.
+ +

Definition at line 188 of file ITexture.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void* irr::video::ITexture::lock (E_TEXTURE_LOCK_MODE mode = ETLM_READ_WRITE,
u32 mipmapLevel = 0 
) [pure virtual]
+
+
+ +

Lock function.

+

Locks the Texture and returns a pointer to access the pixels. After lock() has been called and all operations on the pixels are done, you must call unlock(). Locks are not accumulating, hence one unlock will do for an arbitrary number of previous locks. You should avoid locking different levels without unlocking inbetween, though, because only the last level locked will be unlocked. The size of the i-th mipmap level is defined as max(getSize().Width>>i,1) and max(getSize().Height>>i,1)

+
Parameters:
+ + + +
modeSpecifies what kind of changes to the locked texture are allowed. Unspecified behavior will arise if texture is written in read only mode or read from in write only mode. Support for this feature depends on the driver, so don't rely on the texture being write-protected when locking with read-only, etc.
mipmapLevelNumber of the mipmapLevel to lock. 0 is main texture. Non-existing levels will silently fail and return 0.
+
+
+
Returns:
Returns a pointer to the pixel data. The format of the pixel can be determined by using getColorFormat(). 0 is returned, if the texture cannot be locked.
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::ITexture::regenerateMipMapLevels (void * mipmapData = 0) [pure virtual]
+
+
+ +

Regenerates the mip map levels of the texture.

+

Required after modifying the texture, usually after calling unlock().

+
Parameters:
+ + +
mipmapDataOptional parameter to pass in image data which will be used instead of the previously stored or automatically generated mipmap data. The data has to be a continuous pixel data for all mipmaps until 1x1 pixel. Each mipmap has to be half the width and height of the previous level. At least one pixel will be always kept.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::ITexture::unlock () [pure virtual]
+
+
+ +

Unlock function. Must be called after a lock() to the texture.

+

One should avoid to call unlock more than once before another lock. The last locked mip level will be unlocked.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 211 of file ITexture.h.

+ +

Referenced by getName().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.png new file mode 100644 index 0000000..bb65bac Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_texture.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver-members.html new file mode 100644 index 0000000..6d0935b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver-members.html @@ -0,0 +1,248 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IVideoDriver Member List
+
+
+This is the complete list of members for irr::video::IVideoDriver, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addDynamicLight(const SLight &light)=0irr::video::IVideoDriver [pure virtual]
addExternalImageLoader(IImageLoader *loader)=0irr::video::IVideoDriver [pure virtual]
addExternalImageWriter(IImageWriter *writer)=0irr::video::IVideoDriver [pure virtual]
addMaterialRenderer(IMaterialRenderer *renderer, const c8 *name=0)=0irr::video::IVideoDriver [pure virtual]
addOcclusionQuery(scene::ISceneNode *node, const scene::IMesh *mesh=0)=0irr::video::IVideoDriver [pure virtual]
addRenderTargetTexture(const core::dimension2d< u32 > &size, const io::path &name="rt", const ECOLOR_FORMAT format=ECF_UNKNOWN)=0irr::video::IVideoDriver [pure virtual]
addTexture(const core::dimension2d< u32 > &size, const io::path &name, ECOLOR_FORMAT format=ECF_A8R8G8B8)=0irr::video::IVideoDriver [pure virtual]
addTexture(const io::path &name, IImage *image, void *mipmapData=0)=0irr::video::IVideoDriver [pure virtual]
beginScene(bool backBuffer=true, bool zBuffer=true, SColor color=SColor(255, 0, 0, 0), const SExposedVideoData &videoData=SExposedVideoData(), core::rect< s32 > *sourceRect=0)=0irr::video::IVideoDriver [pure virtual]
checkDriverReset()=0irr::video::IVideoDriver [pure virtual]
clearZBuffer()=0irr::video::IVideoDriver [pure virtual]
convertColor(const void *sP, ECOLOR_FORMAT sF, s32 sN, void *dP, ECOLOR_FORMAT dF) const =0irr::video::IVideoDriver [pure virtual]
createAttributesFromMaterial(const video::SMaterial &material, io::SAttributeReadWriteOptions *options=0)=0irr::video::IVideoDriver [pure virtual]
createImage(ECOLOR_FORMAT format, const core::dimension2d< u32 > &size)=0irr::video::IVideoDriver [pure virtual]
createImage(ECOLOR_FORMAT format, IImage *imageToCopy)=0irr::video::IVideoDriver [pure virtual]
createImage(IImage *imageToCopy, const core::position2d< s32 > &pos, const core::dimension2d< u32 > &size)=0irr::video::IVideoDriver [pure virtual]
createImage(ITexture *texture, const core::position2d< s32 > &pos, const core::dimension2d< u32 > &size)=0irr::video::IVideoDriver [pure virtual]
createImageFromData(ECOLOR_FORMAT format, const core::dimension2d< u32 > &size, void *data, bool ownForeignMemory=false, bool deleteMemory=true)=0irr::video::IVideoDriver [pure virtual]
createImageFromFile(const io::path &filename)=0irr::video::IVideoDriver [pure virtual]
createImageFromFile(io::IReadFile *file)=0irr::video::IVideoDriver [pure virtual]
createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER)=0irr::video::IVideoDriver [pure virtual]
deleteAllDynamicLights()=0irr::video::IVideoDriver [pure virtual]
disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true)=0irr::video::IVideoDriver [pure virtual]
draw2DImage(const video::ITexture *texture, const core::position2d< s32 > &destPos)=0irr::video::IVideoDriver [pure virtual]
draw2DImage(const video::ITexture *texture, const core::position2d< s32 > &destPos, const core::rect< s32 > &sourceRect, const core::rect< s32 > *clipRect=0, SColor color=SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture=false)=0irr::video::IVideoDriver [pure virtual]
draw2DImage(const video::ITexture *texture, const core::rect< s32 > &destRect, const core::rect< s32 > &sourceRect, const core::rect< s32 > *clipRect=0, const video::SColor *const colors=0, bool useAlphaChannelOfTexture=false)=0irr::video::IVideoDriver [pure virtual]
draw2DImageBatch(const video::ITexture *texture, const core::position2d< s32 > &pos, const core::array< core::rect< s32 > > &sourceRects, const core::array< s32 > &indices, s32 kerningWidth=0, const core::rect< s32 > *clipRect=0, SColor color=SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture=false)=0irr::video::IVideoDriver [pure virtual]
draw2DImageBatch(const video::ITexture *texture, const core::array< core::position2d< s32 > > &positions, const core::array< core::rect< s32 > > &sourceRects, const core::rect< s32 > *clipRect=0, SColor color=SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture=false)=0irr::video::IVideoDriver [pure virtual]
draw2DLine(const core::position2d< s32 > &start, const core::position2d< s32 > &end, SColor color=SColor(255, 255, 255, 255))=0irr::video::IVideoDriver [pure virtual]
draw2DPolygon(core::position2d< s32 > center, f32 radius, video::SColor color=SColor(100, 255, 255, 255), s32 vertexCount=10)=0irr::video::IVideoDriver [pure virtual]
draw2DRectangle(SColor color, const core::rect< s32 > &pos, const core::rect< s32 > *clip=0)=0irr::video::IVideoDriver [pure virtual]
draw2DRectangle(const core::rect< s32 > &pos, SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, const core::rect< s32 > *clip=0)=0irr::video::IVideoDriver [pure virtual]
draw2DRectangleOutline(const core::recti &pos, SColor color=SColor(255, 255, 255, 255))=0irr::video::IVideoDriver [pure virtual]
draw2DVertexPrimitiveList(const void *vertices, u32 vertexCount, const void *indexList, u32 primCount, E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT)=0irr::video::IVideoDriver [pure virtual]
draw3DBox(const core::aabbox3d< f32 > &box, SColor color=SColor(255, 255, 255, 255))=0irr::video::IVideoDriver [pure virtual]
draw3DLine(const core::vector3df &start, const core::vector3df &end, SColor color=SColor(255, 255, 255, 255))=0irr::video::IVideoDriver [pure virtual]
draw3DTriangle(const core::triangle3df &triangle, SColor color=SColor(255, 255, 255, 255))=0irr::video::IVideoDriver [pure virtual]
drawIndexedTriangleFan(const S3DVertex *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)irr::video::IVideoDriver [inline]
drawIndexedTriangleFan(const S3DVertex2TCoords *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)irr::video::IVideoDriver [inline]
drawIndexedTriangleFan(const S3DVertexTangents *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)irr::video::IVideoDriver [inline]
drawIndexedTriangleList(const S3DVertex *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)irr::video::IVideoDriver [inline]
drawIndexedTriangleList(const S3DVertex2TCoords *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)irr::video::IVideoDriver [inline]
drawIndexedTriangleList(const S3DVertexTangents *vertices, u32 vertexCount, const u16 *indexList, u32 triangleCount)irr::video::IVideoDriver [inline]
drawMeshBuffer(const scene::IMeshBuffer *mb)=0irr::video::IVideoDriver [pure virtual]
drawMeshBufferNormals(const scene::IMeshBuffer *mb, f32 length=10.f, SColor color=0xffffffff)=0irr::video::IVideoDriver [pure virtual]
drawPixel(u32 x, u32 y, const SColor &color)=0irr::video::IVideoDriver [pure virtual]
drawStencilShadow(bool clearStencilBuffer=false, video::SColor leftUpEdge=video::SColor(255, 0, 0, 0), video::SColor rightUpEdge=video::SColor(255, 0, 0, 0), video::SColor leftDownEdge=video::SColor(255, 0, 0, 0), video::SColor rightDownEdge=video::SColor(255, 0, 0, 0))=0irr::video::IVideoDriver [pure virtual]
drawStencilShadowVolume(const core::array< core::vector3df > &triangles, bool zfail=true, u32 debugDataVisible=0)=0irr::video::IVideoDriver [pure virtual]
drawVertexPrimitiveList(const void *vertices, u32 vertexCount, const void *indexList, u32 primCount, E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT)=0irr::video::IVideoDriver [pure virtual]
drop() const irr::IReferenceCounted [inline]
enableClipPlane(u32 index, bool enable)=0irr::video::IVideoDriver [pure virtual]
enableMaterial2D(bool enable=true)=0irr::video::IVideoDriver [pure virtual]
endScene()=0irr::video::IVideoDriver [pure virtual]
fillMaterialStructureFromAttributes(video::SMaterial &outMaterial, io::IAttributes *attributes)=0irr::video::IVideoDriver [pure virtual]
findTexture(const io::path &filename)=0irr::video::IVideoDriver [pure virtual]
getColorFormat() const =0irr::video::IVideoDriver [pure virtual]
getCurrentRenderTargetSize() const =0irr::video::IVideoDriver [pure virtual]
getDebugName() const irr::IReferenceCounted [inline]
getDriverAttributes() const =0irr::video::IVideoDriver [pure virtual]
getDriverType() const =0irr::video::IVideoDriver [pure virtual]
getDynamicLight(u32 idx) const =0irr::video::IVideoDriver [pure virtual]
getDynamicLightCount() const =0irr::video::IVideoDriver [pure virtual]
getExposedVideoData()=0irr::video::IVideoDriver [pure virtual]
getFog(SColor &color, E_FOG_TYPE &fogType, f32 &start, f32 &end, f32 &density, bool &pixelFog, bool &rangeFog)=0irr::video::IVideoDriver [pure virtual]
getFPS() const =0irr::video::IVideoDriver [pure virtual]
getGPUProgrammingServices()=0irr::video::IVideoDriver [pure virtual]
getImageLoader(u32 n)=0irr::video::IVideoDriver [pure virtual]
getImageLoaderCount() const =0irr::video::IVideoDriver [pure virtual]
getImageWriter(u32 n)=0irr::video::IVideoDriver [pure virtual]
getImageWriterCount() const =0irr::video::IVideoDriver [pure virtual]
getMaterial2D()=0irr::video::IVideoDriver [pure virtual]
getMaterialRenderer(u32 idx)=0irr::video::IVideoDriver [pure virtual]
getMaterialRendererCount() const =0irr::video::IVideoDriver [pure virtual]
getMaterialRendererName(u32 idx) const =0irr::video::IVideoDriver [pure virtual]
getMaximalDynamicLightAmount() const =0irr::video::IVideoDriver [pure virtual]
getMaximalPrimitiveCount() const =0irr::video::IVideoDriver [pure virtual]
getMaxTextureSize() const =0irr::video::IVideoDriver [pure virtual]
getMeshManipulator()=0irr::video::IVideoDriver [pure virtual]
getName() const =0irr::video::IVideoDriver [pure virtual]
getOcclusionQueryResult(scene::ISceneNode *node) const =0irr::video::IVideoDriver [pure virtual]
getOverrideMaterial()=0irr::video::IVideoDriver [pure virtual]
getPrimitiveCountDrawn(u32 mode=0) const =0irr::video::IVideoDriver [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getScreenSize() const =0irr::video::IVideoDriver [pure virtual]
getTexture(const io::path &filename)=0irr::video::IVideoDriver [pure virtual]
getTexture(io::IReadFile *file)=0irr::video::IVideoDriver [pure virtual]
getTextureByIndex(u32 index)=0irr::video::IVideoDriver [pure virtual]
getTextureCount() const =0irr::video::IVideoDriver [pure virtual]
getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const =0irr::video::IVideoDriver [pure virtual]
getTransform(E_TRANSFORMATION_STATE state) const =0irr::video::IVideoDriver [pure virtual]
getVendorInfo()=0irr::video::IVideoDriver [pure virtual]
getViewPort() const =0irr::video::IVideoDriver [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
makeColorKeyTexture(video::ITexture *texture, video::SColor color, bool zeroTexels=false) const =0irr::video::IVideoDriver [pure virtual]
makeColorKeyTexture(video::ITexture *texture, core::position2d< s32 > colorKeyPixelPos, bool zeroTexels=false) const =0irr::video::IVideoDriver [pure virtual]
makeNormalMapTexture(video::ITexture *texture, f32 amplitude=1.0f) const =0irr::video::IVideoDriver [pure virtual]
OnResize(const core::dimension2d< u32 > &size)=0irr::video::IVideoDriver [pure virtual]
queryFeature(E_VIDEO_DRIVER_FEATURE feature) const =0irr::video::IVideoDriver [pure virtual]
removeAllHardwareBuffers()=0irr::video::IVideoDriver [pure virtual]
removeAllOcclusionQueries()=0irr::video::IVideoDriver [pure virtual]
removeAllTextures()=0irr::video::IVideoDriver [pure virtual]
removeHardwareBuffer(const scene::IMeshBuffer *mb)=0irr::video::IVideoDriver [pure virtual]
removeOcclusionQuery(scene::ISceneNode *node)=0irr::video::IVideoDriver [pure virtual]
removeTexture(ITexture *texture)=0irr::video::IVideoDriver [pure virtual]
renameTexture(ITexture *texture, const io::path &newName)=0irr::video::IVideoDriver [pure virtual]
runAllOcclusionQueries(bool visible=false)=0irr::video::IVideoDriver [pure virtual]
runOcclusionQuery(scene::ISceneNode *node, bool visible=false)=0irr::video::IVideoDriver [pure virtual]
setAllowZWriteOnTransparent(bool flag)=0irr::video::IVideoDriver [pure virtual]
setAmbientLight(const SColorf &color)=0irr::video::IVideoDriver [pure virtual]
setClipPlane(u32 index, const core::plane3df &plane, bool enable=false)=0irr::video::IVideoDriver [pure virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setFog(SColor color=SColor(0, 255, 255, 255), E_FOG_TYPE fogType=EFT_FOG_LINEAR, f32 start=50.0f, f32 end=100.0f, f32 density=0.01f, bool pixelFog=false, bool rangeFog=false)=0irr::video::IVideoDriver [pure virtual]
setMaterial(const SMaterial &material)=0irr::video::IVideoDriver [pure virtual]
setMaterialRendererName(s32 idx, const c8 *name)=0irr::video::IVideoDriver [pure virtual]
setMinHardwareBufferVertexCount(u32 count)=0irr::video::IVideoDriver [pure virtual]
setRenderTarget(video::ITexture *texture, bool clearBackBuffer=true, bool clearZBuffer=true, SColor color=video::SColor(0, 0, 0, 0))=0irr::video::IVideoDriver [pure virtual]
setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true, bool clearZBuffer=true, SColor color=video::SColor(0, 0, 0, 0))=0irr::video::IVideoDriver [pure virtual]
setRenderTarget(const core::array< video::IRenderTarget > &texture, bool clearBackBuffer=true, bool clearZBuffer=true, SColor color=video::SColor(0, 0, 0, 0))=0irr::video::IVideoDriver [pure virtual]
setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true)=0irr::video::IVideoDriver [pure virtual]
setTransform(E_TRANSFORMATION_STATE state, const core::matrix4 &mat)=0irr::video::IVideoDriver [pure virtual]
setViewPort(const core::rect< s32 > &area)=0irr::video::IVideoDriver [pure virtual]
turnLightOn(s32 lightIndex, bool turnOn)=0irr::video::IVideoDriver [pure virtual]
updateAllOcclusionQueries(bool block=true)=0irr::video::IVideoDriver [pure virtual]
updateOcclusionQuery(scene::ISceneNode *node, bool block=true)=0irr::video::IVideoDriver [pure virtual]
writeImageToFile(IImage *image, const io::path &filename, u32 param=0)=0irr::video::IVideoDriver [pure virtual]
writeImageToFile(IImage *image, io::IWriteFile *file, u32 param=0)=0irr::video::IVideoDriver [pure virtual]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.html new file mode 100644 index 0000000..a6afc35 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.html @@ -0,0 +1,4478 @@ + + + + +Irrlicht 3D Engine: irr::video::IVideoDriver Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IVideoDriver Class Reference
+
+
+ +

Interface to driver which is able to perform 2d and 3d graphics functions. + More...

+ +

#include <IVideoDriver.h>

+
+ + Inheritance diagram for irr::video::IVideoDriver:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

Interface to driver which is able to perform 2d and 3d graphics functions.

+

This interface is one of the most important interfaces of the Irrlicht Engine: All rendering and texture manipulation is done with this interface. You are able to use the Irrlicht Engine by only invoking methods of this interface if you like to, although the irr::scene::ISceneManager interface provides a lot of powerful classes and methods to make the programmer's life easier.

+ +

Definition at line 256 of file IVideoDriver.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
virtual s32 irr::video::IVideoDriver::addDynamicLight (const SLightlight) [pure virtual]
+
+
+

adds a dynamic light, returning an index to the light

+
Parameters:
+ + +
light,:the light data to use to create the light
+
+
+
Returns:
An index to the light, or -1 if an error occurs
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::addExternalImageLoader (IImageLoaderloader) [pure virtual]
+
+
+ +

Adds an external image loader to the engine.

+

This is useful if the Irrlicht Engine should be able to load textures of currently unsupported file formats (e.g. gif). The IImageLoader only needs to be implemented for loading this file format. A pointer to the implementation can be passed to the engine using this method.

+
Parameters:
+ + +
loaderPointer to the external loader created.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::addExternalImageWriter (IImageWriterwriter) [pure virtual]
+
+
+ +

Adds an external image writer to the engine.

+

This is useful if the Irrlicht Engine should be able to write textures of currently unsupported file formats (e.g .gif). The IImageWriter only needs to be implemented for writing this file format. A pointer to the implementation can be passed to the engine using this method.

+
Parameters:
+ + +
writer,:Pointer to the external writer created.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual s32 irr::video::IVideoDriver::addMaterialRenderer (IMaterialRendererrenderer,
const c8name = 0 
) [pure virtual]
+
+
+ +

Adds a new material renderer to the video device.

+

Use this method to extend the VideoDriver with new material types. To extend the engine using this method do the following: Derive a class from IMaterialRenderer and override the methods you need. For setting the right renderstates, you can try to get a pointer to the real rendering device using IVideoDriver::getExposedVideoData(). Add your class with IVideoDriver::addMaterialRenderer(). To use an object being displayed with your new material, set the MaterialType member of the SMaterial struct to the value returned by this method. If you simply want to create a new material using vertex and/or pixel shaders it would be easier to use the video::IGPUProgrammingServices interface which you can get using the getGPUProgrammingServices() method.

+
Parameters:
+ + + +
rendererA pointer to the new renderer.
nameOptional name for the material renderer entry.
+
+
+
Returns:
The number of the material type which can be set in SMaterial::MaterialType to use the renderer. -1 is returned if an error occured. For example if you tried to add an material renderer to the software renderer or the null device, which do not accept material renderers.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::addOcclusionQuery (scene::ISceneNodenode,
const scene::IMeshmesh = 0 
) [pure virtual]
+
+
+ +

Create occlusion query.

+

Use node for identification and mesh for occlusion test.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITexture* irr::video::IVideoDriver::addRenderTargetTexture (const core::dimension2d< u32 > & size,
const io::pathname = "rt",
const ECOLOR_FORMAT format = ECF_UNKNOWN 
) [pure virtual]
+
+
+ +

Adds a new render target texture to the texture cache.

+
Parameters:
+ + + + +
sizeSize of the texture, in pixels. Width and height should be a power of two (e.g. 64, 128, 256, 512, ...) and it should not be bigger than the backbuffer, because it shares the zbuffer with the screen buffer.
nameAn optional name for the RTT.
formatThe color format of the render target. Floating point formats are supported.
+
+
+
Returns:
Pointer to the created texture or 0 if the texture could not be created. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITexture* irr::video::IVideoDriver::addTexture (const core::dimension2d< u32 > & size,
const io::pathname,
ECOLOR_FORMAT format = ECF_A8R8G8B8 
) [pure virtual]
+
+
+ +

Creates an empty texture of specified size.

+
Parameters:
+ + + + +
size,:Size of the texture.
nameA name for the texture. Later calls to getTexture() with this name will return this texture
formatDesired color format of the texture. Please note that the driver may choose to create the texture in another color format.
+
+
+
Returns:
Pointer to the newly created texture. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +

Referenced by irr::scene::quake3::getTextures().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual ITexture* irr::video::IVideoDriver::addTexture (const io::pathname,
IImageimage,
void * mipmapData = 0 
) [pure virtual]
+
+
+ +

Creates a texture from an IImage.

+
Parameters:
+ + + + +
nameA name for the texture. Later calls of getTexture() with this name will return this texture
imageImage the texture is created from.
mipmapDataOptional pointer to a set of images which build up the whole mipmap set. Must be images of the same color type as image. If this parameter is not given, the mipmaps are derived from image.
+
+
+
Returns:
Pointer to the newly created texture. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::beginScene (bool backBuffer = true,
bool zBuffer = true,
SColor color = SColor(255, 0, 0, 0),
const SExposedVideoDatavideoData = SExposedVideoData(),
core::rect< s32 > * sourceRect = 0 
) [pure virtual]
+
+
+ +

Applications must call this method before performing any rendering.

+

This method can clear the back- and the z-buffer.

+
Parameters:
+ + + + + + +
backBufferSpecifies if the back buffer should be cleared, which means that the screen is filled with the color specified. If this parameter is false, the back buffer will not be cleared and the color parameter is ignored.
zBufferSpecifies if the depth buffer (z buffer) should be cleared. It is not nesesarry to do so if only 2d drawing is used.
colorThe color used for back buffer clearing
videoDataHandle of another window, if you want the bitmap to be displayed on another window. If this is an empty element, everything will be displayed in the default window. Note: This feature is not fully implemented for all devices.
sourceRectPointer to a rectangle defining the source rectangle of the area to be presented. Set to null to present everything. Note: not implemented in all devices.
+
+
+
Returns:
False if failed.
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::video::IVideoDriver::checkDriverReset () [pure virtual]
+
+
+ +

Check if the driver was recently reset.

+

For d3d devices you will need to recreate the RTTs if the driver was reset. Should be queried right after beginScene().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IVideoDriver::clearZBuffer () [pure virtual]
+
+
+ +

Clears the ZBuffer.

+

Note that you usually need not to call this method, as it is automatically done in IVideoDriver::beginScene() or IVideoDriver::setRenderTarget() if you enable zBuffer. But if you have to render some special things, you can clear the zbuffer during the rendering process with this method any time.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::convertColor (const void * sP,
ECOLOR_FORMAT sF,
s32 sN,
void * dP,
ECOLOR_FORMAT dF 
) const [pure virtual]
+
+
+ +

Color conversion convenience function.

+

Convert an image (as array of pixels) from source to destination array, thereby converting the color format. The pixel size is determined by the color formats.

+
Parameters:
+ + + + + + +
sPPointer to source
sFColor format of source
sNNumber of pixels to convert, both array must be large enough
dPPointer to destination
dFColor format of destination
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual io::IAttributes* irr::video::IVideoDriver::createAttributesFromMaterial (const video::SMaterialmaterial,
io::SAttributeReadWriteOptionsoptions = 0 
) [pure virtual]
+
+
+ +

Creates material attributes list from a material.

+

This method is useful for serialization and more. Please note that the video driver will use the material renderer names from getMaterialRendererName() to write out the material type name, so they should be set before.

+
Parameters:
+ + + +
materialThe material to serialize.
optionsAdditional options which might influence the serialization.
+
+
+
Returns:
The io::IAttributes container holding the material properties.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IImage* irr::video::IVideoDriver::createImage (ECOLOR_FORMAT format,
const core::dimension2d< u32 > & size 
) [pure virtual]
+
+
+ +

Creates an empty software image.

+
Parameters:
+ + + +
formatDesired color format of the image.
sizeSize of the image to create.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual _IRR_DEPRECATED_ IImage* irr::video::IVideoDriver::createImage (ECOLOR_FORMAT format,
IImageimageToCopy 
) [pure virtual]
+
+
+ +

Creates a software image by converting it to given format from another image.

+
Deprecated:
Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9.
+
Parameters:
+ + + +
formatDesired color format of the image.
imageToCopyImage to copy to the new image.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual _IRR_DEPRECATED_ IImage* irr::video::IVideoDriver::createImage (IImageimageToCopy,
const core::position2d< s32 > & pos,
const core::dimension2d< u32 > & size 
) [pure virtual]
+
+
+ +

Creates a software image from a part of another image.

+
Deprecated:
Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9.
+
Parameters:
+ + + + +
imageToCopyImage to copy to the new image in part.
posPosition of rectangle to copy.
sizeExtents of rectangle to copy.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual IImage* irr::video::IVideoDriver::createImage (ITexturetexture,
const core::position2d< s32 > & pos,
const core::dimension2d< u32 > & size 
) [pure virtual]
+
+
+ +

Creates a software image from a part of a texture.

+
Parameters:
+ + + + +
textureTexture to copy to the new image in part.
posPosition of rectangle to copy.
sizeExtents of rectangle to copy.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IImage* irr::video::IVideoDriver::createImageFromData (ECOLOR_FORMAT format,
const core::dimension2d< u32 > & size,
void * data,
bool ownForeignMemory = false,
bool deleteMemory = true 
) [pure virtual]
+
+
+ +

Creates a software image from a byte array.

+

No hardware texture will be created for this image. This method is useful for example if you want to read a heightmap for a terrain renderer.

+
Parameters:
+ + + + + + +
formatDesired color format of the texture
sizeDesired size of the image
dataA byte array with pixel color information
ownForeignMemoryIf true, the image will use the data pointer directly and own it afterwards. If false, the memory will by copied internally.
deleteMemoryWhether the memory is deallocated upon destruction.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +

Referenced by irr::scene::quake3::getTextures().

+ +
+
+ +
+
+ + + + + + + + +
virtual IImage* irr::video::IVideoDriver::createImageFromFile (const io::pathfilename) [pure virtual]
+
+
+ +

Creates a software image from a file.

+

No hardware texture will be created for this image. This method is useful for example if you want to read a heightmap for a terrain renderer.

+
Parameters:
+ + +
filenameName of the file from which the image is created.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual IImage* irr::video::IVideoDriver::createImageFromFile (io::IReadFilefile) [pure virtual]
+
+
+ +

Creates a software image from a file.

+

No hardware texture will be created for this image. This method is useful for example if you want to read a heightmap for a terrain renderer.

+
Parameters:
+ + +
fileFile from which the image is created.
+
+
+
Returns:
The created image. If you no longer need the image, you should call IImage::drop(). See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual IImage* irr::video::IVideoDriver::createScreenShot (video::ECOLOR_FORMAT format = video::ECF_UNKNOWN,
video::E_RENDER_TARGET target = video::ERT_FRAME_BUFFER 
) [pure virtual]
+
+
+ +

Make a screenshot of the last rendered frame.

+
Returns:
An image created from the last rendered frame.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IVideoDriver::deleteAllDynamicLights () [pure virtual]
+
+
+ +

Deletes all dynamic lights which were previously added with addDynamicLight().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::disableFeature (E_VIDEO_DRIVER_FEATURE feature,
bool flag = true 
) [pure virtual]
+
+
+ +

Disable a feature of the driver.

+

Can also be used to enable the features again. It is not possible to enable unsupported features this way, though.

+
Parameters:
+ + + +
featureFeature to disable.
flagWhen true the feature is disabled, otherwise it is enabled.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DImage (const video::ITexturetexture,
const core::position2d< s32 > & destPos 
) [pure virtual]
+
+
+ +

Draws a 2d image without any special effects.

+
Parameters:
+ + + +
texturePointer to texture to use.
destPosUpper left 2d destination position where the image will be drawn.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DImage (const video::ITexturetexture,
const core::position2d< s32 > & destPos,
const core::rect< s32 > & sourceRect,
const core::rect< s32 > * clipRect = 0,
SColor color = SColor(255, 255, 255, 255),
bool useAlphaChannelOfTexture = false 
) [pure virtual]
+
+
+ +

Draws a 2d image using a color.

+

(if color is other than Color(255,255,255,255)) and the alpha channel of the texture.

+
Parameters:
+ + + + + + + +
textureTexture to be drawn.
destPosUpper left 2d destination position where the image will be drawn.
sourceRectSource rectangle in the image.
clipRectPointer to rectangle on the screen where the image is clipped to. If this pointer is NULL the image is not clipped.
colorColor with which the image is drawn. If the color equals Color(255,255,255,255) it is ignored. Note that the alpha component is used: If alpha is other than 255, the image will be transparent.
useAlphaChannelOfTexture,:If true, the alpha channel of the texture is used to draw the image.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DImage (const video::ITexturetexture,
const core::rect< s32 > & destRect,
const core::rect< s32 > & sourceRect,
const core::rect< s32 > * clipRect = 0,
const video::SColor *const colors = 0,
bool useAlphaChannelOfTexture = false 
) [pure virtual]
+
+
+ +

Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.

+

Suggested and first implemented by zola.

+
Parameters:
+ + + + + + + +
textureThe texture to draw from
destRectThe rectangle to draw into
sourceRectThe rectangle denoting a part of the texture
clipRectClips the destination rectangle (may be 0)
colorsArray of 4 colors denoting the color values of the corners of the destRect
useAlphaChannelOfTextureTrue if alpha channel will be blended.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DImageBatch (const video::ITexturetexture,
const core::position2d< s32 > & pos,
const core::array< core::rect< s32 > > & sourceRects,
const core::array< s32 > & indices,
s32 kerningWidth = 0,
const core::rect< s32 > * clipRect = 0,
SColor color = SColor(255, 255, 255, 255),
bool useAlphaChannelOfTexture = false 
) [pure virtual]
+
+
+ +

Draws a set of 2d images, using a color and the alpha channel of the texture.

+

The images are drawn beginning at pos and concatenated in one line. All drawings are clipped against clipRect (if != 0). The subtextures are defined by the array of sourceRects and are chosen by the indices given.

+
Parameters:
+ + + + + + + + + +
textureTexture to be drawn.
posUpper left 2d destination position where the image will be drawn.
sourceRectsSource rectangles of the image.
indicesList of indices which choose the actual rectangle used each time.
kerningWidthOffset to Position on X
clipRectPointer to rectangle on the screen where the image is clipped to. If this pointer is 0 then the image is not clipped.
colorColor with which the image is drawn. Note that the alpha component is used. If alpha is other than 255, the image will be transparent.
useAlphaChannelOfTexture,:If true, the alpha channel of the texture is used to draw the image.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DImageBatch (const video::ITexturetexture,
const core::array< core::position2d< s32 > > & positions,
const core::array< core::rect< s32 > > & sourceRects,
const core::rect< s32 > * clipRect = 0,
SColor color = SColor(255, 255, 255, 255),
bool useAlphaChannelOfTexture = false 
) [pure virtual]
+
+
+ +

Draws a set of 2d images, using a color and the alpha channel of the texture.

+

All drawings are clipped against clipRect (if != 0). The subtextures are defined by the array of sourceRects and are positioned using the array of positions.

+
Parameters:
+ + + + + + + +
textureTexture to be drawn.
positionsArray of upper left 2d destinations where the images will be drawn.
sourceRectsSource rectangles of the image.
clipRectPointer to rectangle on the screen where the images are clipped to. If this pointer is 0 then the image is not clipped.
colorColor with which the image is drawn. Note that the alpha component is used. If alpha is other than 255, the image will be transparent.
useAlphaChannelOfTexture,:If true, the alpha channel of the texture is used to draw the image.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DLine (const core::position2d< s32 > & start,
const core::position2d< s32 > & end,
SColor color = SColor(255, 255, 255, 255) 
) [pure virtual]
+
+
+ +

Draws a 2d line. Both start and end will be included in coloring.

+
Parameters:
+ + + + +
startScreen coordinates of the start of the line in pixels.
endScreen coordinates of the start of the line in pixels.
colorColor of the line to draw.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DPolygon (core::position2d< s32center,
f32 radius,
video::SColor color = SColor(100, 255, 255, 255),
s32 vertexCount = 10 
) [pure virtual]
+
+
+ +

Draws a non filled concyclic regular 2d polyon.

+

This method can be used to draw circles, but also triangles, tetragons, pentagons, hexagons, heptagons, octagons, enneagons, decagons, hendecagons, dodecagon, triskaidecagons, etc. I think you'll got it now. And all this by simply specifying the vertex count. Welcome to the wonders of geometry.

+
Parameters:
+ + + + + +
centerPosition of center of circle (pixels).
radiusRadius of circle in pixels.
colorColor of the circle.
vertexCountAmount of vertices of the polygon. Specify 2 to draw a line, 3 to draw a triangle, 4 for tetragons and a lot (>10) for nearly a circle.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DRectangle (SColor color,
const core::rect< s32 > & pos,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

Draws a 2d rectangle.

+
Parameters:
+ + + + +
colorColor of the rectangle to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
posPosition of the rectangle.
clipPointer to rectangle against which the rectangle will be clipped. If the pointer is null, no clipping will be performed.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DRectangle (const core::rect< s32 > & pos,
SColor colorLeftUp,
SColor colorRightUp,
SColor colorLeftDown,
SColor colorRightDown,
const core::rect< s32 > * clip = 0 
) [pure virtual]
+
+
+ +

Draws a 2d rectangle with a gradient.

+
Parameters:
+ + + + + + + +
colorLeftUpColor of the upper left corner to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
colorRightUpColor of the upper right corner to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
colorLeftDownColor of the lower left corner to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
colorRightDownColor of the lower right corner to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
posPosition of the rectangle.
clipPointer to rectangle against which the rectangle will be clipped. If the pointer is null, no clipping will be performed.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DRectangleOutline (const core::rectipos,
SColor color = SColor(255, 255, 255, 255) 
) [pure virtual]
+
+
+ +

Draws the outline of a 2D rectangle.

+
Parameters:
+ + + +
posPosition of the rectangle.
colorColor of the rectangle to draw. The alpha component specifies how transparent the rectangle outline will be.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw2DVertexPrimitiveList (const void * vertices,
u32 vertexCount,
const void * indexList,
u32 primCount,
E_VERTEX_TYPE vType = EVT_STANDARD,
scene::E_PRIMITIVE_TYPE pType = scene::EPT_TRIANGLES,
E_INDEX_TYPE iType = EIT_16BIT 
) [pure virtual]
+
+
+ +

Draws a vertex primitive list in 2d.

+

Compared to the general (3d) version of this method, this one sets up a 2d render mode, and uses only x and y of vectors. Note that, depending on the index type, some vertices might be not accessible through the index list. The limit is at 65535 vertices for 16bit indices. Please note that currently not all primitives are available for all drivers, and some might be emulated via triangle renders. This function is not available for the sw drivers.

+
Parameters:
+ + + + + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices. These define the vertices used for each primitive. Depending on the pType, indices are interpreted as single objects (for point like primitives), pairs (for lines), triplets (for triangles), or quads.
primCountAmount of Primitives
vTypeVertex type, e.g. video::EVT_STANDARD for S3DVertex.
pTypePrimitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan.
iTypeIndex type, e.g. video::EIT_16BIT for 16bit indices.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw3DBox (const core::aabbox3d< f32 > & box,
SColor color = SColor(255, 255, 255, 255) 
) [pure virtual]
+
+
+ +

Draws a 3d axis aligned box.

+

This method simply calls draw3DLine for the edges of the box. Note that the box is drawn using the current transformation matrix and material. So if you need to draw it independently of the current transformation, use

+
        driver->setMaterial(someMaterial);
+        driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
+

for some properly set up material before drawing the box.

+
Parameters:
+ + + +
boxThe axis aligned box to draw
colorColor to use while drawing the box.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw3DLine (const core::vector3dfstart,
const core::vector3dfend,
SColor color = SColor(255, 255, 255, 255) 
) [pure virtual]
+
+
+ +

Draws a 3d line.

+

For some implementations, this method simply calls drawVertexPrimitiveList for some triangles. Note that the line is drawn using the current transformation matrix and material. So if you need to draw the 3D line independently of the current transformation, use

+
        driver->setMaterial(someMaterial);
+        driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
+

for some properly set up material before drawing the line. Some drivers support line thickness set in the material.

+
Parameters:
+ + + + +
startStart of the 3d line.
endEnd of the 3d line.
colorColor of the line.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::draw3DTriangle (const core::triangle3dftriangle,
SColor color = SColor(255, 255, 255, 255) 
) [pure virtual]
+
+
+ +

Draws a 3d triangle.

+

This method calls drawVertexPrimitiveList for some triangles. This method works with all drivers because it simply calls drawVertexPrimitiveList, but it is hence not very fast. Note that the triangle is drawn using the current transformation matrix and material. So if you need to draw it independently of the current transformation, use

+
        driver->setMaterial(someMaterial);
+        driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
+

for some properly set up material before drawing the triangle.

+
Parameters:
+ + + +
triangleThe triangle to draw.
colorColor of the line.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::IVideoDriver::drawIndexedTriangleFan (const S3DVertexvertices,
u32 vertexCount,
const u16indexList,
u32 triangleCount 
) [inline]
+
+
+ +

Draws an indexed triangle fan.

+

Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

+
Parameters:
+ + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices.
triangleCountAmount of Triangles. Usually amount of indices - 2.
+
+
+ +

Definition at line 722 of file IVideoDriver.h.

+ +

References drawVertexPrimitiveList(), irr::video::EIT_16BIT, irr::scene::EPT_TRIANGLE_FAN, and irr::video::EVT_STANDARD.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::IVideoDriver::drawIndexedTriangleFan (const S3DVertex2TCoordsvertices,
u32 vertexCount,
const u16indexList,
u32 triangleCount 
) [inline]
+
+
+ +

Draws an indexed triangle fan.

+

Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

+
Parameters:
+ + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices.
triangleCountAmount of Triangles. Usually amount of indices - 2.
+
+
+ +

Definition at line 737 of file IVideoDriver.h.

+ +

References drawVertexPrimitiveList(), irr::video::EIT_16BIT, irr::scene::EPT_TRIANGLE_FAN, and irr::video::EVT_2TCOORDS.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::IVideoDriver::drawIndexedTriangleFan (const S3DVertexTangentsvertices,
u32 vertexCount,
const u16indexList,
u32 triangleCount 
) [inline]
+
+
+ +

Draws an indexed triangle fan.

+

Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

+
Parameters:
+ + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices.
triangleCountAmount of Triangles. Usually amount of indices - 2.
+
+
+ +

Definition at line 752 of file IVideoDriver.h.

+ +

References drawVertexPrimitiveList(), irr::video::EIT_16BIT, irr::scene::EPT_TRIANGLE_FAN, and irr::video::EVT_TANGENTS.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::IVideoDriver::drawIndexedTriangleList (const S3DVertexvertices,
u32 vertexCount,
const u16indexList,
u32 triangleCount 
) [inline]
+
+
+ +

Draws an indexed triangle list.

+

Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

+
Parameters:
+ + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices.
triangleCountAmount of Triangles. Usually amount of indices / 3.
+
+
+ +

Definition at line 677 of file IVideoDriver.h.

+ +

References drawVertexPrimitiveList(), irr::video::EIT_16BIT, irr::scene::EPT_TRIANGLES, and irr::video::EVT_STANDARD.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::IVideoDriver::drawIndexedTriangleList (const S3DVertex2TCoordsvertices,
u32 vertexCount,
const u16indexList,
u32 triangleCount 
) [inline]
+
+
+ +

Draws an indexed triangle list.

+

Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

+
Parameters:
+ + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices.
triangleCountAmount of Triangles. Usually amount of indices / 3.
+
+
+ +

Definition at line 692 of file IVideoDriver.h.

+ +

References drawVertexPrimitiveList(), irr::video::EIT_16BIT, irr::scene::EPT_TRIANGLES, and irr::video::EVT_2TCOORDS.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::IVideoDriver::drawIndexedTriangleList (const S3DVertexTangentsvertices,
u32 vertexCount,
const u16indexList,
u32 triangleCount 
) [inline]
+
+
+ +

Draws an indexed triangle list.

+

Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

+
Parameters:
+ + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices.
triangleCountAmount of Triangles. Usually amount of indices / 3.
+
+
+ +

Definition at line 707 of file IVideoDriver.h.

+ +

References drawVertexPrimitiveList(), irr::video::EIT_16BIT, irr::scene::EPT_TRIANGLES, and irr::video::EVT_TANGENTS.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::drawMeshBuffer (const scene::IMeshBuffermb) [pure virtual]
+
+
+ +

Draws a mesh buffer.

+
Parameters:
+ + +
mbBuffer to draw
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::drawMeshBufferNormals (const scene::IMeshBuffermb,
f32 length = 10.f,
SColor color = 0xffffffff 
) [pure virtual]
+
+
+ +

Draws normals of a mesh buffer.

+
Parameters:
+ + + + +
mbBuffer to draw the normals of
lengthlength scale factor of the normals
colorColor the normals are rendered with
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::drawPixel (u32 x,
u32 y,
const SColorcolor 
) [pure virtual]
+
+
+ +

Draws a pixel.

+
Parameters:
+ + + + +
xThe x-position of the pixel.
yThe y-position of the pixel.
colorColor of the pixel to draw.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::drawStencilShadow (bool clearStencilBuffer = false,
video::SColor leftUpEdge = video::SColor(255, 0, 0, 0),
video::SColor rightUpEdge = video::SColor(255, 0, 0, 0),
video::SColor leftDownEdge = video::SColor(255, 0, 0, 0),
video::SColor rightDownEdge = video::SColor(255, 0, 0, 0) 
) [pure virtual]
+
+
+ +

Fills the stencil shadow with color.

+

After the shadow volume has been drawn into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this to draw the color of the shadow. Please note that the code for the opengl version of the method is based on free code sent in by Philipp Dortmann, lots of thanks go to him!

+
Parameters:
+ + + + + + +
clearStencilBufferSet this to false, if you want to draw every shadow with the same color, and only want to call drawStencilShadow() once after all shadow volumes have been drawn. Set this to true, if you want to paint every shadow with its own color.
leftUpEdgeColor of the shadow in the upper left corner of screen.
rightUpEdgeColor of the shadow in the upper right corner of screen.
leftDownEdgeColor of the shadow in the lower left corner of screen.
rightDownEdgeColor of the shadow in the lower right corner of screen.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::drawStencilShadowVolume (const core::array< core::vector3df > & triangles,
bool zfail = true,
u32 debugDataVisible = 0 
) [pure virtual]
+
+
+ +

Draws a shadow volume into the stencil buffer.

+

To draw a stencil shadow, do this: First, draw all geometry. Then use this method, to draw the shadow volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. Please note that the code for the opengl version of the method is based on free code sent in by Philipp Dortmann, lots of thanks go to him!

+
Parameters:
+ + + + +
trianglesArray of 3d vectors, specifying the shadow volume.
zfailIf set to true, zfail method is used, otherwise zpass.
debugDataVisibleThe debug data that is enabled for this shadow node
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::drawVertexPrimitiveList (const void * vertices,
u32 vertexCount,
const void * indexList,
u32 primCount,
E_VERTEX_TYPE vType = EVT_STANDARD,
scene::E_PRIMITIVE_TYPE pType = scene::EPT_TRIANGLES,
E_INDEX_TYPE iType = EIT_16BIT 
) [pure virtual]
+
+
+ +

Draws a vertex primitive list.

+

Note that, depending on the index type, some vertices might be not accessible through the index list. The limit is at 65535 vertices for 16bit indices. Please note that currently not all primitives are available for all drivers, and some might be emulated via triangle renders.

+
Parameters:
+ + + + + + + + +
verticesPointer to array of vertices.
vertexCountAmount of vertices in the array.
indexListPointer to array of indices. These define the vertices used for each primitive. Depending on the pType, indices are interpreted as single objects (for point like primitives), pairs (for lines), triplets (for triangles), or quads.
primCountAmount of Primitives
vTypeVertex type, e.g. video::EVT_STANDARD for S3DVertex.
pTypePrimitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan.
iTypeIndex type, e.g. video::EIT_16BIT for 16bit indices.
+
+
+ +

Referenced by drawIndexedTriangleFan(), and drawIndexedTriangleList().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::enableClipPlane (u32 index,
bool enable 
) [pure virtual]
+
+
+ +

Enable or disable a clipping plane.

+

There are at least 6 clipping planes available for the user to set at will.

+
Parameters:
+ + + +
indexThe plane index. Must be between 0 and MaxUserClipPlanes.
enableIf true, enable the clipping plane else disable it.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::enableMaterial2D (bool enable = true) [pure virtual]
+
+
+ +

Enable the 2d override material.

+
Parameters:
+ + +
enableFlag which tells whether the material shall be enabled or disabled.
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual bool irr::video::IVideoDriver::endScene () [pure virtual]
+
+
+ +

Presents the rendered image to the screen.

+

Applications must call this method after performing any rendering.

+
Returns:
False if failed and true if succeeded.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::fillMaterialStructureFromAttributes (video::SMaterialoutMaterial,
io::IAttributesattributes 
) [pure virtual]
+
+
+ +

Fills an SMaterial structure from attributes.

+

Please note that for setting material types of the material, the video driver will need to query the material renderers for their names, so all non built-in materials must have been created before calling this method.

+
Parameters:
+ + + +
outMaterialThe material to set the properties for.
attributesThe attributes to read from.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual video::ITexture* irr::video::IVideoDriver::findTexture (const io::pathfilename) [pure virtual]
+
+
+ +

Check if the image is already loaded.

+

Works similar to getTexture(), but does not load the texture if it is not currently loaded.

+
Parameters:
+ + +
filenameName of the texture.
+
+
+
Returns:
Pointer to loaded texture, or 0 if not found.
+ +
+
+ +
+
+ + + + + + + +
virtual ECOLOR_FORMAT irr::video::IVideoDriver::getColorFormat () const [pure virtual]
+
+
+ +

Get the current color format of the color buffer.

+
Returns:
Color format of the color buffer.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<u32>& irr::video::IVideoDriver::getCurrentRenderTargetSize () const [pure virtual]
+
+
+ +

Get the size of the current render target.

+

This method will return the screen size if the driver doesn't support render to texture, or if the current render target is the screen.

+
Returns:
Size of render target or screen/window
+ +
+
+ +
+
+ + + + + + + +
virtual const io::IAttributes& irr::video::IVideoDriver::getDriverAttributes () const [pure virtual]
+
+
+ +

Get attributes of the actual video driver.

+

The following names can be queried for the given types: MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. MaxLights (int) Number of hardware lights supported in the fixed function pipieline of the driver, typically 6-8. Use light manager or deferred shading for more. MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. MaxUserClipPlanes (int) Number of additional clip planes, which can be set by the user via dedicated driver methods. MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer). MaxTextureSize (int) Dimension that a texture may have, both in width and height. MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far. MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems. Version (int) Version of the driver. Should be Major*100+Minor ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor. AntiAlias (int) Number of Samples the driver uses for each pixel. 0 and 1 means anti aliasing is off, typical values are 2,4,8,16,32

+ +
+
+ +
+
+ + + + + + + +
virtual E_DRIVER_TYPE irr::video::IVideoDriver::getDriverType () const [pure virtual]
+
+
+ +

Get type of video driver.

+
Returns:
Type of driver.
+ +
+
+ +
+
+ + + + + + + + +
virtual const SLight& irr::video::IVideoDriver::getDynamicLight (u32 idx) const [pure virtual]
+
+
+ +

Returns light data which was previously set by IVideoDriver::addDynamicLight().

+
Parameters:
+ + +
idxZero based index of the light. Must be 0 or greater and smaller than IVideoDriver::getDynamicLightCount.
+
+
+
Returns:
Light data.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getDynamicLightCount () const [pure virtual]
+
+
+ +

Returns amount of dynamic lights currently set.

+
Returns:
Amount of dynamic lights currently set
+ +
+
+ +
+
+ + + + + + + +
virtual const SExposedVideoData& irr::video::IVideoDriver::getExposedVideoData () [pure virtual]
+
+
+ +

Returns driver and operating system specific data about the IVideoDriver.

+

This method should only be used if the engine should be extended without having to modify the source of the engine.

+
Returns:
Collection of device dependent pointers.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::getFog (SColorcolor,
E_FOG_TYPEfogType,
f32start,
f32end,
f32density,
bool & pixelFog,
bool & rangeFog 
) [pure virtual]
+
+
+ +

Gets the fog mode.

+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::video::IVideoDriver::getFPS () const [pure virtual]
+
+
+ +

Returns current frames per second value.

+

This value is updated approximately every 1.5 seconds and is only intended to provide a rough guide to the average frame rate. It is not suitable for use in performing timing calculations or framerate independent movement.

+
Returns:
Approximate amount of frames per second drawn.
+ +
+
+ +
+
+ + + + + + + +
virtual IGPUProgrammingServices* irr::video::IVideoDriver::getGPUProgrammingServices () [pure virtual]
+
+
+ +

Gets the IGPUProgrammingServices interface.

+
Returns:
Pointer to the IGPUProgrammingServices. Returns 0 if the video driver does not support this. For example the Software driver and the Null driver will always return 0.
+ +
+
+ +
+
+ + + + + + + + +
virtual IImageLoader* irr::video::IVideoDriver::getImageLoader (u32 n) [pure virtual]
+
+
+ +

Retrieve the given image loader.

+
Parameters:
+ + +
nThe index of the loader to retrieve. This parameter is an 0-based array index.
+
+
+
Returns:
A pointer to the specified loader, 0 if the index is incorrect.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getImageLoaderCount () const [pure virtual]
+
+
+ +

Retrieve the number of image loaders.

+
Returns:
Number of image loaders
+ +
+
+ +
+
+ + + + + + + + +
virtual IImageWriter* irr::video::IVideoDriver::getImageWriter (u32 n) [pure virtual]
+
+
+ +

Retrieve the given image writer.

+
Parameters:
+ + +
nThe index of the writer to retrieve. This parameter is an 0-based array index.
+
+
+
Returns:
A pointer to the specified writer, 0 if the index is incorrect.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getImageWriterCount () const [pure virtual]
+
+
+ +

Retrieve the number of image writers.

+
Returns:
Number of image writers
+ +
+
+ +
+
+ + + + + + + +
virtual SMaterial& irr::video::IVideoDriver::getMaterial2D () [pure virtual]
+
+
+ +

Get the 2d override material for altering its values.

+

The 2d override materual allows to alter certain render states of the 2d methods. Not all members of SMaterial are honored, especially not MaterialType and Textures. Moreover, the zbuffer is always ignored, and lighting is always off. All other flags can be changed, though some might have to effect in most cases. Please note that you have to enable/disable this effect with enableInitMaterial2D(). This effect is costly, as it increases the number of state changes considerably. Always reset the values when done.

+
Returns:
Material reference which should be altered to reflect the new settings.
+ +
+
+ +
+
+ + + + + + + + +
virtual IMaterialRenderer* irr::video::IVideoDriver::getMaterialRenderer (u32 idx) [pure virtual]
+
+
+ +

Get access to a material renderer by index.

+
Parameters:
+ + +
idxId of the material renderer. Can be a value of the E_MATERIAL_TYPE enum or a value which was returned by addMaterialRenderer().
+
+
+
Returns:
Pointer to material renderer or null if not existing.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getMaterialRendererCount () const [pure virtual]
+
+
+ +

Get amount of currently available material renderers.

+
Returns:
Amount of currently available material renderers.
+ +
+
+ +
+
+ + + + + + + + +
virtual const c8* irr::video::IVideoDriver::getMaterialRendererName (u32 idx) const [pure virtual]
+
+
+ +

Get name of a material renderer.

+

This string can, e.g., be used to test if a specific renderer already has been registered/created, or use this string to store data about materials: This returned name will be also used when serializing materials.

+
Parameters:
+ + +
idxId of the material renderer. Can be a value of the E_MATERIAL_TYPE enum or a value which was returned by addMaterialRenderer().
+
+
+
Returns:
String with the name of the renderer, or 0 if not exisiting
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getMaximalDynamicLightAmount () const [pure virtual]
+
+
+ +

Returns the maximal amount of dynamic lights the device can handle.

+
Returns:
Maximal amount of dynamic lights.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getMaximalPrimitiveCount () const [pure virtual]
+
+
+ +

Returns the maximum amount of primitives.

+

(mostly vertices) which the device is able to render with one drawVertexPrimitiveList call.

+
Returns:
Maximum amount of primitives.
+ +
+
+ +
+
+ + + + + + + +
virtual core::dimension2du irr::video::IVideoDriver::getMaxTextureSize () const [pure virtual]
+
+
+ +

Get the maximum texture size supported.

+ +
+
+ +
+
+ + + + + + + +
virtual scene::IMeshManipulator* irr::video::IVideoDriver::getMeshManipulator () [pure virtual]
+
+
+ +

Returns a pointer to the mesh manipulator.

+ +
+
+ +
+
+ + + + + + + +
virtual const wchar_t* irr::video::IVideoDriver::getName () const [pure virtual]
+
+
+ +

Gets name of this video driver.

+
Returns:
Returns the name of the video driver, e.g. in case of the Direct3D8 driver, it would return "Direct3D 8.1".
+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::video::IVideoDriver::getOcclusionQueryResult (scene::ISceneNodenode) const [pure virtual]
+
+
+ +

Return query result.

+

Return value is the number of visible pixels/fragments. The value is a safe approximation, i.e. can be larger than the actual value of pixels.

+ +
+
+ +
+
+ + + + + + + +
virtual SOverrideMaterial& irr::video::IVideoDriver::getOverrideMaterial () [pure virtual]
+
+
+ +

Get the global Material, which might override local materials.

+

Depending on the enable flags, values from this Material are used to override those of local materials of some meshbuffer being rendered.

+
Returns:
Reference to the Override Material.
+ +
+
+ +
+
+ + + + + + + + +
virtual u32 irr::video::IVideoDriver::getPrimitiveCountDrawn (u32 mode = 0) const [pure virtual]
+
+
+ +

Returns amount of primitives (mostly triangles) which were drawn in the last frame.

+

Together with getFPS() very useful method for statistics.

+
Parameters:
+ + +
modeDefines if the primitives drawn are accumulated or counted per frame.
+
+
+
Returns:
Amount of primitives drawn in the last frame.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<u32>& irr::video::IVideoDriver::getScreenSize () const [pure virtual]
+
+
+ +

Get the size of the screen or render window.

+
Returns:
Size of screen or render window.
+ +
+
+ +
+
+ + + + + + + + +
virtual ITexture* irr::video::IVideoDriver::getTexture (const io::pathfilename) [pure virtual]
+
+
+ +

Get access to a named texture.

+

Loads the texture from disk if it is not already loaded and generates mipmap levels if desired. Texture loading can be influenced using the setTextureCreationFlag() method. The texture can be in several imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD.

+
Parameters:
+ + +
filenameFilename of the texture to be loaded.
+
+
+
Returns:
Pointer to the texture, or 0 if the texture could not be loaded. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +

Referenced by irr::scene::quake3::getTextures().

+ +
+
+ +
+
+ + + + + + + + +
virtual ITexture* irr::video::IVideoDriver::getTexture (io::IReadFilefile) [pure virtual]
+
+
+ +

Get access to a named texture.

+

Loads the texture from disk if it is not already loaded and generates mipmap levels if desired. Texture loading can be influenced using the setTextureCreationFlag() method. The texture can be in several imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD.

+
Parameters:
+ + +
filePointer to an already opened file.
+
+
+
Returns:
Pointer to the texture, or 0 if the texture could not be loaded. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + + +
virtual ITexture* irr::video::IVideoDriver::getTextureByIndex (u32 index) [pure virtual]
+
+
+ +

Returns a texture by index.

+
Parameters:
+ + +
index,:Index of the texture, must be smaller than getTextureCount() Please note that this index might change when adding or removing textures
+
+
+
Returns:
Pointer to the texture, or 0 if the texture was not set or index is out of bounds. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::video::IVideoDriver::getTextureCount () const [pure virtual]
+
+
+ +

Returns amount of textures currently loaded.

+
Returns:
Amount of textures currently loaded
+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::video::IVideoDriver::getTextureCreationFlag (E_TEXTURE_CREATION_FLAG flag) const [pure virtual]
+
+
+ +

Returns if a texture creation flag is enabled or disabled.

+

You can change this value using setTextureCreationFlag().

+
Parameters:
+ + +
flagTexture creation flag.
+
+
+
Returns:
The current texture creation flag enabled mode.
+ +
+
+ +
+
+ + + + + + + + +
virtual const core::matrix4& irr::video::IVideoDriver::getTransform (E_TRANSFORMATION_STATE state) const [pure virtual]
+
+
+ +

Returns the transformation set by setTransform.

+
Parameters:
+ + +
stateTransformation type to query
+
+
+
Returns:
Matrix describing the transformation.
+ +
+
+ +
+
+ + + + + + + +
virtual core::stringc irr::video::IVideoDriver::getVendorInfo () [pure virtual]
+
+
+ +

Get the graphics card vendor name.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::rect<s32>& irr::video::IVideoDriver::getViewPort () const [pure virtual]
+
+
+ +

Gets the area of the current viewport.

+
Returns:
Rectangle of the current viewport.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::makeColorKeyTexture (video::ITexturetexture,
video::SColor color,
bool zeroTexels = false 
) const [pure virtual]
+
+
+ +

Sets a boolean alpha channel on the texture based on a color key.

+

This makes the texture fully transparent at the texels where this color key can be found when using for example draw2DImage with useAlphachannel==true. The alpha of other texels is not modified.

+
Parameters:
+ + + + +
textureTexture whose alpha channel is modified.
colorColor key color. Every texel with this color will become fully transparent as described above. Please note that the colors of a texture may be converted when loading it, so the color values may not be exactly the same in the engine and for example in picture edit programs. To avoid this problem, you could use the makeColorKeyTexture method, which takes the position of a pixel instead a color value.
zeroTexels\xrefitemdeprecated 21.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::makeColorKeyTexture (video::ITexturetexture,
core::position2d< s32colorKeyPixelPos,
bool zeroTexels = false 
) const [pure virtual]
+
+
+ +

Sets a boolean alpha channel on the texture based on the color at a position.

+

This makes the texture fully transparent at the texels where the color key can be found when using for example draw2DImage with useAlphachannel==true. The alpha of other texels is not modified.

+
Parameters:
+ + + + +
textureTexture whose alpha channel is modified.
colorKeyPixelPosPosition of a pixel with the color key color. Every texel with this color will become fully transparent as described above.
zeroTexels\xrefitemdeprecated 22.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::makeNormalMapTexture (video::ITexturetexture,
f32 amplitude = 1.0f 
) const [pure virtual]
+
+
+ +

Creates a normal map from a height map texture.

+

If the target texture has 32 bit, the height value is stored in the alpha component of the texture as addition. This value is used by the video::EMT_PARALLAX_MAP_SOLID material and similar materials.

+
Parameters:
+ + + +
textureTexture whose alpha channel is modified.
amplitudeConstant value by which the height information is multiplied.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::OnResize (const core::dimension2d< u32 > & size) [pure virtual]
+
+
+ +

Event handler for resize events. Only used by the engine internally.

+

Used to notify the driver that the window was resized. Usually, there is no need to call this method.

+ +
+
+ +
+
+ + + + + + + + +
virtual bool irr::video::IVideoDriver::queryFeature (E_VIDEO_DRIVER_FEATURE feature) const [pure virtual]
+
+
+ +

Queries the features of the driver.

+

Returns true if a feature is available

+
Parameters:
+ + +
featureFeature to query.
+
+
+
Returns:
True if the feature is available, false if not.
+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IVideoDriver::removeAllHardwareBuffers () [pure virtual]
+
+
+ +

Remove all hardware buffers.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IVideoDriver::removeAllOcclusionQueries () [pure virtual]
+
+
+ +

Remove all occlusion queries.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::video::IVideoDriver::removeAllTextures () [pure virtual]
+
+
+ +

Removes all textures from the texture cache and deletes them.

+

This method can free a lot of memory! Please note that after calling this, the pointer to the ITexture may no longer be valid, if it was not grabbed before by other parts of the engine for storing it longer. So it is a good idea to set all materials which are using this texture to 0 or another texture first.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::removeHardwareBuffer (const scene::IMeshBuffermb) [pure virtual]
+
+
+ +

Remove hardware buffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::removeOcclusionQuery (scene::ISceneNodenode) [pure virtual]
+
+
+ +

Remove occlusion query.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::removeTexture (ITexturetexture) [pure virtual]
+
+
+ +

Removes a texture from the texture cache and deletes it.

+

This method can free a lot of memory! Please note that after calling this, the pointer to the ITexture may no longer be valid, if it was not grabbed before by other parts of the engine for storing it longer. So it is a good idea to set all materials which are using this texture to 0 or another texture first.

+
Parameters:
+ + +
textureTexture to delete from the engine cache.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::renameTexture (ITexturetexture,
const io::pathnewName 
) [pure virtual]
+
+
+ +

Renames a texture.

+
Parameters:
+ + + +
texturePointer to the texture to rename.
newNameNew name for the texture. This should be a unique name.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::runAllOcclusionQueries (bool visible = false) [pure virtual]
+
+
+ +

Run all occlusion queries. Draws all meshes stored in queries.

+

If the meshes shall not be rendered visible, use overrideMaterial to disable the color and depth buffer.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::runOcclusionQuery (scene::ISceneNodenode,
bool visible = false 
) [pure virtual]
+
+
+ +

Run occlusion query. Draws mesh stored in query.

+

If the mesh shall not be rendered visible, use overrideMaterial to disable the color and depth buffer.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::setAllowZWriteOnTransparent (bool flag) [pure virtual]
+
+
+ +

Only used by the engine internally.

+

Passes the global material flag AllowZWriteOnTransparent. Use the SceneManager attribute to set this value from your app.

+
Parameters:
+ + +
flagDefault behavior is to disable ZWrite, i.e. false.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::setAmbientLight (const SColorfcolor) [pure virtual]
+
+
+ +

Only used by the engine internally.

+

The ambient color is set in the scene manager, see scene::ISceneManager::setAmbientLight().

+
Parameters:
+ + +
colorNew color of the ambient light.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::setClipPlane (u32 index,
const core::plane3dfplane,
bool enable = false 
) [pure virtual]
+
+
+ +

Set or unset a clipping plane.

+

There are at least 6 clipping planes available for the user to set at will.

+
Parameters:
+ + + + +
indexThe plane index. Must be between 0 and MaxUserClipPlanes.
planeThe plane itself.
enableIf true, enable the clipping plane else disable it.
+
+
+
Returns:
True if the clipping plane is usable.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::setFog (SColor color = SColor(0, 255, 255, 255),
E_FOG_TYPE fogType = EFT_FOG_LINEAR,
f32 start = 50.0f,
f32 end = 100.0f,
f32 density = 0.01f,
bool pixelFog = false,
bool rangeFog = false 
) [pure virtual]
+
+
+ +

Sets the fog mode.

+

These are global values attached to each 3d object rendered, which has the fog flag enabled in its material.

+
Parameters:
+ + + + + + + + +
colorColor of the fog
fogTypeType of fog used
startOnly used in linear fog mode (linearFog=true). Specifies where fog starts.
endOnly used in linear fog mode (linearFog=true). Specifies where fog ends.
densityOnly used in exponential fog mode (linearFog=false). Must be a value between 0 and 1.
pixelFogSet this to false for vertex fog, and true if you want per-pixel fog.
rangeFogSet this to true to enable range-based vertex fog. The distance from the viewer is used to compute the fog, not the z-coordinate. This is better, but slower. This might not be available with all drivers and fog settings.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::setMaterial (const SMaterialmaterial) [pure virtual]
+
+
+ +

Sets a material.

+

All 3d drawing functions will draw geometry using this material thereafter.

+
Parameters:
+ + +
material,:Material to be used from now on.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::setMaterialRendererName (s32 idx,
const c8name 
) [pure virtual]
+
+
+ +

Sets the name of a material renderer.

+

Will have no effect on built-in material renderers.

+
Parameters:
+ + + +
idx,:Id of the material renderer. Can be a value of the E_MATERIAL_TYPE enum or a value which was returned by addMaterialRenderer().
name,:New name of the material renderer.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::setMinHardwareBufferVertexCount (u32 count) [pure virtual]
+
+
+ +

Set the minimum number of vertices for which a hw buffer will be created.

+
Parameters:
+ + +
countNumber of vertices to set as minimum.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::setRenderTarget (video::ITexturetexture,
bool clearBackBuffer = true,
bool clearZBuffer = true,
SColor color = video::SColor(0, 0, 0, 0) 
) [pure virtual]
+
+
+ +

Sets a new render target.

+

This will only work if the driver supports the EVDF_RENDER_TO_TARGET feature, which can be queried with queryFeature(). Usually, rendering to textures is done in this way:

+
        // create render target
+        ITexture* target = driver->addRenderTargetTexture(core::dimension2d<u32>(128,128), "rtt1");
+
+        // ...
+
+        driver->setRenderTarget(target); // set render target
+        // .. draw stuff here
+        driver->setRenderTarget(0); // set previous render target
+

Please note that you cannot render 3D or 2D geometry with a render target as texture on it when you are rendering the scene into this render target at the same time. It is usually only possible to render into a texture between the IVideoDriver::beginScene() and endScene() method calls.

+
Parameters:
+ + + + + +
textureNew render target. Must be a texture created with IVideoDriver::addRenderTargetTexture(). If set to 0, it sets the previous render target which was set before the last setRenderTarget() call.
clearBackBufferClears the backbuffer of the render target with the color parameter
clearZBufferClears the zBuffer of the rendertarget. Note that because the frame buffer may share the zbuffer with the rendertarget, its zbuffer might be partially cleared too by this.
colorThe background color for the render target.
+
+
+
Returns:
True if sucessful and false if not.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::setRenderTarget (E_RENDER_TARGET target,
bool clearTarget = true,
bool clearZBuffer = true,
SColor color = video::SColor(0, 0, 0, 0) 
) [pure virtual]
+
+
+ +

set or reset special render targets

+

This method enables access to special color buffers such as stereoscopic buffers or auxiliary buffers.

+
Parameters:
+ + + + + +
targetEnum value for the render target
clearTargetClears the target buffer with the color parameter
clearZBufferClears the zBuffer of the rendertarget. Note that because the main frame buffer may share the zbuffer with the rendertarget, its zbuffer might be partially cleared too by this.
colorThe background color for the render target.
+
+
+
Returns:
True if sucessful and false if not.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::setRenderTarget (const core::array< video::IRenderTarget > & texture,
bool clearBackBuffer = true,
bool clearZBuffer = true,
SColor color = video::SColor(0, 0, 0, 0) 
) [pure virtual]
+
+
+ +

Sets new multiple render targets.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::setTextureCreationFlag (E_TEXTURE_CREATION_FLAG flag,
bool enabled = true 
) [pure virtual]
+
+
+ +

Enables or disables a texture creation flag.

+

These flags define how textures should be created. By changing this value, you can influence for example the speed of rendering a lot. But please note that the video drivers take this value only as recommendation. It could happen that you enable the ETCF_ALWAYS_16_BIT mode, but the driver still creates 32 bit textures.

+
Parameters:
+ + + +
flagTexture creation flag.
enabledSpecifies if the given flag should be enabled or disabled.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::setTransform (E_TRANSFORMATION_STATE state,
const core::matrix4mat 
) [pure virtual]
+
+
+ +

Sets transformation matrices.

+
Parameters:
+ + + +
stateTransformation type to be set, e.g. view, world, or projection.
matMatrix describing the transformation.
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::setViewPort (const core::rect< s32 > & area) [pure virtual]
+
+
+ +

Sets a new viewport.

+

Every rendering operation is done into this new area.

+
Parameters:
+ + +
area,:Rectangle defining the new area of rendering operations.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::turnLightOn (s32 lightIndex,
bool turnOn 
) [pure virtual]
+
+
+

Turns a dynamic light on or off

+
Parameters:
+ + + +
lightIndex,:the index returned by addDynamicLight
turnOn,:true to turn the light on, false to turn it off
+
+
+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::video::IVideoDriver::updateAllOcclusionQueries (bool block = true) [pure virtual]
+
+
+ +

Update all occlusion queries. Retrieves results from GPU.

+

If the query shall not block, set the flag to false. Update might not occur in this case, though

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::video::IVideoDriver::updateOcclusionQuery (scene::ISceneNodenode,
bool block = true 
) [pure virtual]
+
+
+ +

Update occlusion query. Retrieves results from GPU.

+

If the query shall not block, set the flag to false. Update might not occur in this case, though

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::writeImageToFile (IImageimage,
const io::pathfilename,
u32 param = 0 
) [pure virtual]
+
+
+ +

Writes the provided image to a file.

+

Requires that there is a suitable image writer registered for writing the image.

+
Parameters:
+ + + + +
imageImage to write.
filenameName of the file to write.
paramControl parameter for the backend (e.g. compression level).
+
+
+
Returns:
True on successful write.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool irr::video::IVideoDriver::writeImageToFile (IImageimage,
io::IWriteFilefile,
u32 param = 0 
) [pure virtual]
+
+
+ +

Writes the provided image to a file.

+

Requires that there is a suitable image writer registered for writing the image.

+
Parameters:
+ + + + +
imageImage to write.
fileAn already open io::IWriteFile object. The name will be used to determine the appropriate image writer to use.
paramControl parameter for the backend (e.g. compression level).
+
+
+
Returns:
True on successful write.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.png new file mode 100644 index 0000000..42c8b36 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_driver.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list-members.html new file mode 100644 index 0000000..24551bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IVideoModeList Member List
+
+
+This is the complete list of members for irr::video::IVideoModeList, including all inherited members. + + + + + + + + + + + + + +
drop() const irr::IReferenceCounted [inline]
getDebugName() const irr::IReferenceCounted [inline]
getDesktopDepth() const =0irr::video::IVideoModeList [pure virtual]
getDesktopResolution() const =0irr::video::IVideoModeList [pure virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getVideoModeCount() const =0irr::video::IVideoModeList [pure virtual]
getVideoModeDepth(s32 modeNumber) const =0irr::video::IVideoModeList [pure virtual]
getVideoModeResolution(s32 modeNumber) const =0irr::video::IVideoModeList [pure virtual]
getVideoModeResolution(const core::dimension2d< u32 > &minSize, const core::dimension2d< u32 > &maxSize) const =0irr::video::IVideoModeList [pure virtual]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.html new file mode 100644 index 0000000..12e92f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.html @@ -0,0 +1,308 @@ + + + + +Irrlicht 3D Engine: irr::video::IVideoModeList Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IVideoModeList Class Reference
+
+
+ +

A list of all available video modes. + More...

+ +

#include <IVideoModeList.h>

+
+ + Inheritance diagram for irr::video::IVideoModeList:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

A list of all available video modes.

+

You can get a list via IrrlichtDevice::getVideoModeList(). If you are confused now, because you think you have to create an Irrlicht Device with a video mode before being able to get the video mode list, let me tell you that there is no need to start up an Irrlicht Device with EDT_DIRECT3D8, EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other reasons) the null device, EDT_NULL exists.

+ +

Definition at line 23 of file IVideoModeList.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual s32 irr::video::IVideoModeList::getDesktopDepth () const [pure virtual]
+
+
+ +

Get the pixel depth of a video mode in bits.

+
Returns:
Size of each pixel of the current desktop video mode in bits.
+ +
+
+ +
+
+ + + + + + + +
virtual const core::dimension2d<u32>& irr::video::IVideoModeList::getDesktopResolution () const [pure virtual]
+
+
+ +

Get current desktop screen resolution.

+
Returns:
Size of screen in pixels of the current desktop video mode.
+ +
+
+ +
+
+ + + + + + + +
virtual s32 irr::video::IVideoModeList::getVideoModeCount () const [pure virtual]
+
+
+ +

Gets amount of video modes in the list.

+
Returns:
Returns amount of video modes.
+ +
+
+ +
+
+ + + + + + + + +
virtual s32 irr::video::IVideoModeList::getVideoModeDepth (s32 modeNumber) const [pure virtual]
+
+
+ +

Get the pixel depth of a video mode in bits.

+
Parameters:
+ + +
modeNumber,:zero based index of the video mode.
+
+
+
Returns:
Size of each pixel of the specified video mode in bits.
+ +
+
+ +
+
+ + + + + + + + +
virtual core::dimension2d<u32> irr::video::IVideoModeList::getVideoModeResolution (s32 modeNumber) const [pure virtual]
+
+
+ +

Get the screen size of a video mode in pixels.

+
Parameters:
+ + +
modeNumber,:zero based index of the video mode.
+
+
+
Returns:
Size of screen in pixels of the specified video mode.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual core::dimension2d<u32> irr::video::IVideoModeList::getVideoModeResolution (const core::dimension2d< u32 > & minSize,
const core::dimension2d< u32 > & maxSize 
) const [pure virtual]
+
+
+ +

Get a supported screen size with certain constraints.

+
Parameters:
+ + + +
minSize,:Minimum dimensions required.
maxSize,:Maximum dimensions allowed.
+
+
+
Returns:
Size of screen in pixels which matches the requirements. as good as possible.
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.png b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.png new file mode 100644 index 0000000..140c9b8 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_i_video_mode_list.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color-members.html new file mode 100644 index 0000000..b90224c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color-members.html @@ -0,0 +1,147 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::SColor Member List
+
+
+This is the complete list of members for irr::video::SColor, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
colorirr::video::SColor
getAlpha() const irr::video::SColor [inline]
getAverage() const irr::video::SColor [inline]
getBlue() const irr::video::SColor [inline]
getData(void *data, ECOLOR_FORMAT format)irr::video::SColor [inline]
getGreen() const irr::video::SColor [inline]
getInterpolated(const SColor &other, f32 d) const irr::video::SColor [inline]
getInterpolated_quadratic(const SColor &c1, const SColor &c2, f32 d) const irr::video::SColor [inline]
getLightness() const irr::video::SColor [inline]
getLuminance() const irr::video::SColor [inline]
getRed() const irr::video::SColor [inline]
operator!=(const SColor &other) const irr::video::SColor [inline]
operator+(const SColor &other) const irr::video::SColor [inline]
operator<(const SColor &other) const irr::video::SColor [inline]
operator==(const SColor &other) const irr::video::SColor [inline]
SColor()irr::video::SColor [inline]
SColor(u32 a, u32 r, u32 g, u32 b)irr::video::SColor [inline]
SColor(u32 clr)irr::video::SColor [inline]
set(u32 a, u32 r, u32 g, u32 b)irr::video::SColor [inline]
set(u32 col)irr::video::SColor [inline]
setAlpha(u32 a)irr::video::SColor [inline]
setBlue(u32 b)irr::video::SColor [inline]
setData(const void *data, ECOLOR_FORMAT format)irr::video::SColor [inline]
setGreen(u32 g)irr::video::SColor [inline]
setRed(u32 r)irr::video::SColor [inline]
toA1R5G5B5() const irr::video::SColor [inline]
toOpenGLColor(u8 *dest) const irr::video::SColor [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color.html new file mode 100644 index 0000000..4281793 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color.html @@ -0,0 +1,970 @@ + + + + +Irrlicht 3D Engine: irr::video::SColor Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SColor Class Reference
+
+
+ +

Class representing a 32 bit ARGB color. + More...

+ +

#include <SColor.h>

+ +

List of all members.

+

+Public Member Functions

+
    +
  • SColor () +
    Constructor of the Color. Does nothing.
  • SColor (u32 a, u32 r, u32 g, u32 b) +
    Constructs the color from 4 values representing the alpha, red, green and blue component.
  • SColor (u32 clr) +
    Constructs the color from a 32 bit value. Could be another color.
  • u32 getAlpha () const +
    Returns the alpha component of the color.
  • u32 getAverage () const +
    Get average intensity of the color in the range [0,255].
  • u32 getBlue () const +
    Returns the blue component of the color.
  • void getData (void *data, ECOLOR_FORMAT format) +
    Write the color to data in the defined format.
  • u32 getGreen () const +
    Returns the green component of the color.
  • SColor getInterpolated (const SColor &other, f32 d) const +
    Interpolates the color with a f32 value to another color.
  • SColor getInterpolated_quadratic (const SColor &c1, const SColor &c2, f32 d) const +
    Returns interpolated color. ( quadratic )
  • f32 getLightness () const +
    Get lightness of the color in the range [0,255].
  • f32 getLuminance () const +
    Get luminance of the color in the range [0,255].
  • u32 getRed () const +
    Returns the red component of the color.
  • bool operator!= (const SColor &other) const +
    Compares the color to another color.
  • SColor operator+ (const SColor &other) const +
    Adds two colors, result is clamped to 0..255 values.
  • bool operator< (const SColor &other) const +
    comparison operator
  • bool operator== (const SColor &other) const +
    Compares the color to another color.
  • void set (u32 a, u32 r, u32 g, u32 b) +
    Sets all four components of the color at once.
  • void set (u32 col) +
  • void setAlpha (u32 a) +
    Sets the alpha component of the Color.
  • void setBlue (u32 b) +
    Sets the blue component of the Color.
  • void setData (const void *data, ECOLOR_FORMAT format) +
    set the color by expecting data in the given format
  • void setGreen (u32 g) +
    Sets the green component of the Color.
  • void setRed (u32 r) +
    Sets the red component of the Color.
  • u16 toA1R5G5B5 () const +
    Calculates a 16 bit A1R5G5B5 value of this color.
  • void toOpenGLColor (u8 *dest) const +
    Converts color to OpenGL color format.
+

+Public Attributes

+ +

Detailed Description

+

Class representing a 32 bit ARGB color.

+

The color values for alpha, red, green, and blue are stored in a single u32. So all four values may be between 0 and 255. Alpha in Irrlicht is opacity, so 0 is fully transparent, 255 is fully opaque (solid). This class is used by most parts of the Irrlicht Engine to specify a color. Another way is using the class SColorf, which stores the color values in 4 floats. This class must consist of only one u32 and must not use virtual functions.

+ +

Definition at line 201 of file SColor.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SColor::SColor () [inline]
+
+
+ +

Constructor of the Color. Does nothing.

+

The color value is not initialized to save time.

+ +

Definition at line 207 of file SColor.h.

+ +

Referenced by getInterpolated(), getInterpolated_quadratic(), and operator+().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::SColor::SColor (u32 a,
u32 r,
u32 g,
u32 b 
) [inline]
+
+
+ +

Constructs the color from 4 values representing the alpha, red, green and blue component.

+

Must be values between 0 and 255.

+ +

Definition at line 211 of file SColor.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::video::SColor::SColor (u32 clr) [inline]
+
+
+ +

Constructs the color from a 32 bit value. Could be another color.

+ +

Definition at line 215 of file SColor.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
u32 irr::video::SColor::getAlpha () const [inline]
+
+
+ +

Returns the alpha component of the color.

+

The alpha component defines how opaque a color is.

+
Returns:
The alpha value of the color. 0 is fully transparent, 255 is fully opaque.
+ +

Definition at line 221 of file SColor.h.

+ +

References color.

+ +

Referenced by getInterpolated(), getInterpolated_quadratic(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor().

+ +
+
+ +
+
+ + + + + + + +
u32 irr::video::SColor::getAverage () const [inline]
+
+
+ +

Get average intensity of the color in the range [0,255].

+ +

Definition at line 251 of file SColor.h.

+ +

References getBlue(), getGreen(), and getRed().

+ +
+
+ +
+
+ + + + + + + +
u32 irr::video::SColor::getBlue () const [inline]
+
+
+ +

Returns the blue component of the color.

+
Returns:
Value between 0 and 255, specifying how blue the color is. 0 means no blue, 255 means full blue.
+ +

Definition at line 236 of file SColor.h.

+ +

References color.

+ +

Referenced by getAverage(), getData(), getInterpolated(), getInterpolated_quadratic(), getLightness(), getLuminance(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::video::SColor::getData (void * data,
ECOLOR_FORMAT format 
) [inline]
+
+
+ +

Write the color to data in the defined format.

+
Parameters:
+ + + +
data,:target to write the color. Must contain sufficiently large memory to receive the number of bytes neede for format
format,:tells the format used to write the color into data
+
+
+ +

Definition at line 407 of file SColor.h.

+ +

References irr::video::A8R8G8B8toA1R5G5B5(), irr::video::A8R8G8B8toR5G6B5(), color, irr::video::ECF_A1R5G5B5, irr::video::ECF_A8R8G8B8, irr::video::ECF_R5G6B5, irr::video::ECF_R8G8B8, getBlue(), getGreen(), and getRed().

+ +
+
+ +
+
+ + + + + + + +
u32 irr::video::SColor::getGreen () const [inline]
+
+
+ +

Returns the green component of the color.

+
Returns:
Value between 0 and 255, specifying how green the color is. 0 means no green, 255 means full green.
+ +

Definition at line 231 of file SColor.h.

+ +

References color.

+ +

Referenced by getAverage(), getData(), getInterpolated(), getInterpolated_quadratic(), getLightness(), getLuminance(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
SColor irr::video::SColor::getInterpolated (const SColorother,
f32 d 
) const [inline]
+
+
+ +

Interpolates the color with a f32 value to another color.

+
Parameters:
+ + + +
other,:Other color
d,:value between 0.0f and 1.0f
+
+
+
Returns:
Interpolated color.
+ +

Definition at line 340 of file SColor.h.

+ +

References irr::core::clamp(), getAlpha(), getBlue(), getGreen(), getRed(), irr::core::round32(), and SColor().

+ +

Referenced by irr::video::S3DVertex::getInterpolated(), irr::video::S3DVertex2TCoords::getInterpolated(), and irr::video::S3DVertexTangents::getInterpolated().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SColor irr::video::SColor::getInterpolated_quadratic (const SColorc1,
const SColorc2,
f32 d 
) const [inline]
+
+
+ +

Returns interpolated color. ( quadratic )

+
Parameters:
+ + + + +
c1,:first color to interpolate with
c2,:second color to interpolate with
d,:value between 0.0f and 1.0f.
+
+
+ +

Definition at line 354 of file SColor.h.

+ +

References irr::core::clamp(), irr::core::floor32(), getAlpha(), getBlue(), getGreen(), getRed(), and SColor().

+ +
+
+ +
+
+ + + + + + + +
f32 irr::video::SColor::getLightness () const [inline]
+
+
+ +

Get lightness of the color in the range [0,255].

+ +

Definition at line 239 of file SColor.h.

+ +

References getBlue(), getGreen(), getRed(), irr::core::max_(), and irr::core::min_().

+ +
+
+ +
+
+ + + + + + + +
f32 irr::video::SColor::getLuminance () const [inline]
+
+
+ +

Get luminance of the color in the range [0,255].

+ +

Definition at line 245 of file SColor.h.

+ +

References getBlue(), getGreen(), and getRed().

+ +
+
+ +
+
+ + + + + + + +
u32 irr::video::SColor::getRed () const [inline]
+
+
+ +

Returns the red component of the color.

+
Returns:
Value between 0 and 255, specifying how red the color is. 0 means no red, 255 means full red.
+ +

Definition at line 226 of file SColor.h.

+ +

References color.

+ +

Referenced by getAverage(), getData(), getInterpolated(), getInterpolated_quadratic(), getLightness(), getLuminance(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::SColor::operator!= (const SColorother) const [inline]
+
+
+ +

Compares the color to another color.

+
Returns:
True if the colors are different, and false if they are the same.
+ +

Definition at line 319 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + +
SColor irr::video::SColor::operator+ (const SColorother) const [inline]
+
+
+ +

Adds two colors, result is clamped to 0..255 values.

+
Parameters:
+ + +
otherColor to add to this color
+
+
+
Returns:
Addition of the two colors, clamped to 0..255 values
+ +

Definition at line 328 of file SColor.h.

+ +

References getAlpha(), getBlue(), getGreen(), getRed(), irr::core::min_(), and SColor().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::SColor::operator< (const SColorother) const [inline]
+
+
+ +

comparison operator

+
Returns:
True if this color is smaller than the other one
+ +

Definition at line 323 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::SColor::operator== (const SColorother) const [inline]
+
+
+ +

Compares the color to another color.

+
Returns:
True if the colors are the same, and false if not.
+ +

Definition at line 315 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::SColor::set (u32 a,
u32 r,
u32 g,
u32 b 
) [inline]
+
+
+ +

Sets all four components of the color at once.

+

Constructs the color from 4 values representing the alpha, red, green and blue components of the color. Must be values between 0 and 255.

+
Parameters:
+ + + + + +
a,:Alpha component of the color. The alpha component defines how transparent a color should be. Has to be a value between 0 and 255. 255 means not transparent (opaque), 0 means fully transparent.
r,:Sets the red component of the Color. Has to be a value between 0 and 255. 0 means no red, 255 means full red.
g,:Sets the green component of the Color. Has to be a value between 0 and 255. 0 means no green, 255 means full green.
b,:Sets the blue component of the Color. Has to be a value between 0 and 255. 0 means no blue, 255 means full blue.
+
+
+ +

Definition at line 307 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SColor::set (u32 col) [inline]
+
+
+ +

Definition at line 311 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SColor::setAlpha (u32 a) [inline]
+
+
+ +

Sets the alpha component of the Color.

+

The alpha component defines how transparent a color should be.

+
Parameters:
+ + +
aThe alpha value of the color. 0 is fully transparent, 255 is fully opaque.
+
+
+ +

Definition at line 259 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SColor::setBlue (u32 b) [inline]
+
+
+ +

Sets the blue component of the Color.

+
Parameters:
+ + +
b,:Has to be a value between 0 and 255. 0 means no blue, 255 means full blue.
+
+
+ +

Definition at line 274 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::video::SColor::setData (const void * data,
ECOLOR_FORMAT format 
) [inline]
+
+
+ +

set the color by expecting data in the given format

+
Parameters:
+ + + +
data,:must point to valid memory containing color information in the given format
format,:tells the format in which data is available
+
+
+ +

Definition at line 378 of file SColor.h.

+ +

References irr::video::A1R5G5B5toA8R8G8B8(), color, irr::video::ECF_A1R5G5B5, irr::video::ECF_A8R8G8B8, irr::video::ECF_R5G6B5, irr::video::ECF_R8G8B8, and irr::video::R5G6B5toA8R8G8B8().

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SColor::setGreen (u32 g) [inline]
+
+
+ +

Sets the green component of the Color.

+
Parameters:
+ + +
g,:Has to be a value between 0 and 255. 0 means no green, 255 means full green.
+
+
+ +

Definition at line 269 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SColor::setRed (u32 r) [inline]
+
+
+ +

Sets the red component of the Color.

+
Parameters:
+ + +
r,:Has to be a value between 0 and 255. 0 means no red, 255 means full red.
+
+
+ +

Definition at line 264 of file SColor.h.

+ +

References color.

+ +
+
+ +
+
+ + + + + + + +
u16 irr::video::SColor::toA1R5G5B5 () const [inline]
+
+
+ +

Calculates a 16 bit A1R5G5B5 value of this color.

+
Returns:
16 bit A1R5G5B5 value of this color.
+ +

Definition at line 278 of file SColor.h.

+ +

References irr::video::A8R8G8B8toA1R5G5B5(), and color.

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SColor::toOpenGLColor (u8dest) const [inline]
+
+
+ +

Converts color to OpenGL color format.

+

From ARGB to RGBA in 4 byte components for endian aware passing to OpenGL

+
Parameters:
+ + +
dest,:address where the 4x8 bit OpenGL color is stored.
+
+
+ +

Definition at line 284 of file SColor.h.

+ +

References getAlpha(), getBlue(), getGreen(), and getRed().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

color in A8R8G8B8 Format

+ +

Definition at line 447 of file SColor.h.

+ +

Referenced by getAlpha(), getBlue(), getData(), getGreen(), getRed(), operator!=(), operator<(), operator==(), set(), setAlpha(), setBlue(), setData(), setGreen(), setRed(), and toA1R5G5B5().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l-members.html new file mode 100644 index 0000000..11fd0f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l-members.html @@ -0,0 +1,126 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::SColorHSL Member List
+
+
+This is the complete list of members for irr::video::SColorHSL, including all inherited members. + + + + + + +
fromRGB(const SColorf &color)irr::video::SColorHSL [inline]
Hueirr::video::SColorHSL
Luminanceirr::video::SColorHSL
Saturationirr::video::SColorHSL
SColorHSL(f32 h=0.f, f32 s=0.f, f32 l=0.f)irr::video::SColorHSL [inline]
toRGB(SColorf &color) const irr::video::SColorHSL [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l.html new file mode 100644 index 0000000..7763b41 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_color_h_s_l.html @@ -0,0 +1,285 @@ + + + + +Irrlicht 3D Engine: irr::video::SColorHSL Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SColorHSL Class Reference
+
+
+ +

Class representing a color in HSL format. + More...

+ +

#include <SColor.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Class representing a color in HSL format.

+

The color values for hue, saturation, luminance are stored in 32bit floating point variables. Hue is in range [0,360], Luminance and Saturation are in percent [0,100]

+ +

Definition at line 592 of file SColor.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::SColorHSL::SColorHSL (f32 h = 0.f,
f32 s = 0.f,
f32 l = 0.f 
) [inline]
+
+
+ +

Definition at line 595 of file SColor.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::video::SColorHSL::fromRGB (const SColorfcolor) [inline]
+
+ +
+ +
+
+ + + + + + + + +
void irr::video::SColorHSL::toRGB (SColorfcolor) const [inline]
+
+
+ +

Definition at line 646 of file SColor.h.

+ +

References Hue, irr::core::iszero(), Luminance, Saturation, and irr::video::SColorf::set().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 601 of file SColor.h.

+ +

Referenced by fromRGB(), and toRGB().

+ +
+
+ +
+ +
+ +

Definition at line 603 of file SColor.h.

+ +

Referenced by fromRGB(), and toRGB().

+ +
+
+ +
+ +
+ +

Definition at line 602 of file SColor.h.

+ +

Referenced by fromRGB(), and toRGB().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf-members.html new file mode 100644 index 0000000..a8e9dbf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf-members.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::SColorf Member List
+
+
+This is the complete list of members for irr::video::SColorf, including all inherited members. + + + + + + + + + + + + + + + + + +
airr::video::SColorf
birr::video::SColorf
girr::video::SColorf
getAlpha() const irr::video::SColorf [inline]
getBlue() const irr::video::SColorf [inline]
getGreen() const irr::video::SColorf [inline]
getInterpolated(const SColorf &other, f32 d) const irr::video::SColorf [inline]
getInterpolated_quadratic(const SColorf &c1, const SColorf &c2, f32 d) const irr::video::SColorf [inline]
getRed() const irr::video::SColorf [inline]
rirr::video::SColorf
SColorf()irr::video::SColorf [inline]
SColorf(f32 r, f32 g, f32 b, f32 a=1.0f)irr::video::SColorf [inline]
SColorf(SColor c)irr::video::SColorf [inline]
set(f32 rr, f32 gg, f32 bb)irr::video::SColorf [inline]
set(f32 aa, f32 rr, f32 gg, f32 bb)irr::video::SColorf [inline]
setColorComponentValue(s32 index, f32 value)irr::video::SColorf [inline]
toSColor() const irr::video::SColorf [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf.html new file mode 100644 index 0000000..f16f10c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_colorf.html @@ -0,0 +1,688 @@ + + + + +Irrlicht 3D Engine: irr::video::SColorf Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SColorf Class Reference
+
+
+ +

Class representing a color with four floats. + More...

+ +

#include <SColor.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • f32 a +
    alpha color component
  • f32 b +
    blue component
  • f32 g +
    green color component
  • f32 r +
    red color component
+

Detailed Description

+

Class representing a color with four floats.

+

The color values for red, green, blue and alpha are each stored in a 32 bit floating point variable. So all four values may be between 0.0f and 1.0f. Another, faster way to define colors is using the class SColor, which stores the color values in a single 32 bit integer.

+ +

Definition at line 458 of file SColor.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SColorf::SColorf () [inline]
+
+
+ +

Default constructor for SColorf.

+

Sets red, green and blue to 0.0f and alpha to 1.0f.

+ +

Definition at line 463 of file SColor.h.

+ +

Referenced by getInterpolated(), and getInterpolated_quadratic().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::SColorf::SColorf (f32 r,
f32 g,
f32 b,
f32 a = 1.0f 
) [inline]
+
+
+ +

Constructs a color from up to four color values: red, green, blue, and alpha.

+
Parameters:
+ + + + + +
r,:Red color component. Should be a value between 0.0f meaning no red and 1.0f, meaning full red.
g,:Green color component. Should be a value between 0.0f meaning no green and 1.0f, meaning full green.
b,:Blue color component. Should be a value between 0.0f meaning no blue and 1.0f, meaning full blue.
a,:Alpha color component of the color. The alpha component defines how transparent a color should be. Has to be a value between 0.0f and 1.0f, 1.0f means not transparent (opaque), 0.0f means fully transparent.
+
+
+ +

Definition at line 476 of file SColor.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::video::SColorf::SColorf (SColor c) [inline]
+
+
+ +

Constructs a color from 32 bit Color.

+
Parameters:
+ + +
c,:32 bit color from which this SColorf class is constructed from.
+
+
+ +

Definition at line 481 of file SColor.h.

+ +

References a, b, g, irr::video::SColor::getAlpha(), irr::video::SColor::getBlue(), irr::video::SColor::getGreen(), irr::video::SColor::getRed(), and r.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
f32 irr::video::SColorf::getAlpha () const [inline]
+
+
+ +

Returns the alpha component of the color in the range 0.0 (transparent) to 1.0 (opaque)

+ +

Definition at line 562 of file SColor.h.

+ +

References a.

+ +
+
+ +
+
+ + + + + + + +
f32 irr::video::SColorf::getBlue () const [inline]
+
+
+ +

Returns the blue component of the color in the range 0.0 to 1.0.

+ +

Definition at line 571 of file SColor.h.

+ +

References b.

+ +

Referenced by irr::video::SColorHSL::fromRGB().

+ +
+
+ +
+
+ + + + + + + +
f32 irr::video::SColorf::getGreen () const [inline]
+
+
+ +

Returns the green component of the color in the range 0.0 to 1.0.

+ +

Definition at line 568 of file SColor.h.

+ +

References g.

+ +

Referenced by irr::video::SColorHSL::fromRGB().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
SColorf irr::video::SColorf::getInterpolated (const SColorfother,
f32 d 
) const [inline]
+
+
+ +

Interpolates the color with a f32 value to another color.

+
Parameters:
+ + + +
other,:Other color
d,:value between 0.0f and 1.0f
+
+
+
Returns:
Interpolated color.
+ +

Definition at line 520 of file SColor.h.

+ +

References a, b, irr::core::clamp(), g, r, and SColorf().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
SColorf irr::video::SColorf::getInterpolated_quadratic (const SColorfc1,
const SColorfc2,
f32 d 
) const [inline]
+
+
+ +

Returns interpolated color. ( quadratic )

+
Parameters:
+ + + + +
c1,:first color to interpolate with
c2,:second color to interpolate with
d,:value between 0.0f and 1.0f.
+
+
+ +

Definition at line 532 of file SColor.h.

+ +

References a, b, irr::core::clamp(), g, r, and SColorf().

+ +
+
+ +
+
+ + + + + + + +
f32 irr::video::SColorf::getRed () const [inline]
+
+
+ +

Returns the red component of the color in the range 0.0 to 1.0.

+ +

Definition at line 565 of file SColor.h.

+ +

References r.

+ +

Referenced by irr::video::SColorHSL::fromRGB().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::SColorf::set (f32 rr,
f32 gg,
f32 bb 
) [inline]
+
+
+ +

Sets three color components to new values at once.

+
Parameters:
+ + + + +
rr,:Red color component. Should be a value between 0.0f meaning no red (=black) and 1.0f, meaning full red.
gg,:Green color component. Should be a value between 0.0f meaning no green (=black) and 1.0f, meaning full green.
bb,:Blue color component. Should be a value between 0.0f meaning no blue (=black) and 1.0f, meaning full blue.
+
+
+ +

Definition at line 503 of file SColor.h.

+ +

References b, g, and r.

+ +

Referenced by irr::video::SColorHSL::toRGB().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::SColorf::set (f32 aa,
f32 rr,
f32 gg,
f32 bb 
) [inline]
+
+
+ +

Sets all four color components to new values at once.

+
Parameters:
+ + + + + +
aa,:Alpha component. Should be a value between 0.0f meaning fully transparent and 1.0f, meaning opaque.
rr,:Red color component. Should be a value between 0.0f meaning no red and 1.0f, meaning full red.
gg,:Green color component. Should be a value between 0.0f meaning no green and 1.0f, meaning full green.
bb,:Blue color component. Should be a value between 0.0f meaning no blue and 1.0f, meaning full blue.
+
+
+ +

Definition at line 514 of file SColor.h.

+ +

References a, b, g, and r.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::video::SColorf::setColorComponentValue (s32 index,
f32 value 
) [inline]
+
+
+ +

Sets a color component by index. R=0, G=1, B=2, A=3.

+ +

Definition at line 550 of file SColor.h.

+ +

References a, b, g, and r.

+ +
+
+ +
+
+ + + + + + + +
SColor irr::video::SColorf::toSColor () const [inline]
+
+
+ +

Converts this color to a SColor without floats.

+ +

Definition at line 491 of file SColor.h.

+ +

References a, b, g, r, and irr::core::round32().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

alpha color component

+ +

Definition at line 583 of file SColor.h.

+ +

Referenced by getAlpha(), getInterpolated(), getInterpolated_quadratic(), SColorf(), set(), setColorComponentValue(), and toSColor().

+ +
+
+ +
+ +
+ +

blue component

+ +

Definition at line 580 of file SColor.h.

+ +

Referenced by getBlue(), getInterpolated(), getInterpolated_quadratic(), SColorf(), set(), setColorComponentValue(), and toSColor().

+ +
+
+ +
+ +
+ +

green color component

+ +

Definition at line 577 of file SColor.h.

+ +

Referenced by getGreen(), getInterpolated(), getInterpolated_quadratic(), SColorf(), set(), setColorComponentValue(), and toSColor().

+ +
+
+ +
+ +
+ +

red color component

+ +

Definition at line 574 of file SColor.h.

+ +

Referenced by getInterpolated(), getInterpolated_quadratic(), getRed(), SColorf(), set(), setColorComponentValue(), and toSColor().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material-members.html new file mode 100644 index 0000000..bc1661e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material-members.html @@ -0,0 +1,160 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::SMaterial Member List
+
+
+This is the complete list of members for irr::video::SMaterial, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmbientColorirr::video::SMaterial
AntiAliasingirr::video::SMaterial
BackfaceCullingirr::video::SMaterial
BlendOperationirr::video::SMaterial
ColorMaskirr::video::SMaterial
ColorMaterialirr::video::SMaterial
DiffuseColorirr::video::SMaterial
EmissiveColorirr::video::SMaterial
FogEnableirr::video::SMaterial
FrontfaceCullingirr::video::SMaterial
getFlag(E_MATERIAL_FLAG flag) const irr::video::SMaterial [inline]
getTexture(u32 i) const irr::video::SMaterial [inline]
getTextureMatrix(u32 i)irr::video::SMaterial [inline]
getTextureMatrix(u32 i) const irr::video::SMaterial [inline]
GouraudShadingirr::video::SMaterial
isTransparent() const irr::video::SMaterial [inline]
Lightingirr::video::SMaterial
MaterialTypeirr::video::SMaterial
MaterialTypeParamirr::video::SMaterial
MaterialTypeParam2irr::video::SMaterial
NormalizeNormalsirr::video::SMaterial
operator!=(const SMaterial &b) const irr::video::SMaterial [inline]
operator=(const SMaterial &other)irr::video::SMaterial [inline]
operator==(const SMaterial &b) const irr::video::SMaterial [inline]
PointCloudirr::video::SMaterial
PolygonOffsetDirectionirr::video::SMaterial
PolygonOffsetFactorirr::video::SMaterial
setFlag(E_MATERIAL_FLAG flag, bool value)irr::video::SMaterial [inline]
setTexture(u32 i, ITexture *tex)irr::video::SMaterial [inline]
setTextureMatrix(u32 i, const core::matrix4 &mat)irr::video::SMaterial [inline]
Shininessirr::video::SMaterial
SMaterial()irr::video::SMaterial [inline]
SMaterial(const SMaterial &other)irr::video::SMaterial [inline]
SpecularColorirr::video::SMaterial
TextureLayerirr::video::SMaterial
Thicknessirr::video::SMaterial
UseMipMapsirr::video::SMaterial
Wireframeirr::video::SMaterial
ZBufferirr::video::SMaterial
ZWriteEnableirr::video::SMaterial
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material.html new file mode 100644 index 0000000..c0f89ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material.html @@ -0,0 +1,1138 @@ + + + + +Irrlicht 3D Engine: irr::video::SMaterial Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SMaterial Class Reference
+
+
+ +

Struct for holding parameters for a material renderer. + More...

+ +

#include <SMaterial.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Struct for holding parameters for a material renderer.

+ +

Definition at line 226 of file SMaterial.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SMaterial::SMaterial () [inline]
+
+
+ +

Default constructor. Creates a solid, lit material with white colors.

+ +

Definition at line 230 of file SMaterial.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::video::SMaterial::SMaterial (const SMaterialother) [inline]
+
+
+ +

Copy constructor.

+
Parameters:
+ + +
otherMaterial to copy from.
+
+
+ +

Definition at line 244 of file SMaterial.h.

+ +

References irr::video::MATERIAL_MAX_TEXTURES, and TextureLayer.

+ +
+
+

Member Function Documentation

+ + + +
+
+ + + + + + + + +
ITexture* irr::video::SMaterial::getTexture (u32 i) const [inline]
+
+
+ +

Gets the i-th texture.

+
Parameters:
+ + +
iThe desired level.
+
+
+
Returns:
Texture for texture level i, if defined, else 0.
+ +

Definition at line 473 of file SMaterial.h.

+ +

References irr::video::MATERIAL_MAX_TEXTURES, irr::video::SMaterialLayer::Texture, and TextureLayer.

+ +
+
+ +
+
+ + + + + + + + +
core::matrix4& irr::video::SMaterial::getTextureMatrix (u32 i) [inline]
+
+
+ +

Gets the texture transformation matrix for level i.

+
Parameters:
+ + +
iThe desired level. Must not be larger than MATERIAL_MAX_TEXTURES.
+
+
+
Returns:
Texture matrix for texture level i.
+ +

Definition at line 444 of file SMaterial.h.

+ +

References irr::video::SMaterialLayer::getTextureMatrix(), and TextureLayer.

+ +
+
+ +
+
+ + + + + + + + +
const core::matrix4& irr::video::SMaterial::getTextureMatrix (u32 i) const [inline]
+
+
+ +

Gets the immutable texture transformation matrix for level i.

+
Parameters:
+ + +
iThe desired level.
+
+
+
Returns:
Texture matrix for texture level i, or identity matrix for levels larger than MATERIAL_MAX_TEXTURES.
+ +

Definition at line 452 of file SMaterial.h.

+ +

References irr::video::SMaterialLayer::getTextureMatrix(), irr::core::IdentityMatrix, irr::video::MATERIAL_MAX_TEXTURES, and TextureLayer.

+ +
+
+ +
+
+ + + + + + + +
bool irr::video::SMaterial::isTransparent () const [inline]
+
+ +
+ +
+
+ + + + + + + + +
bool irr::video::SMaterial::operator!= (const SMaterialb) const [inline]
+
+ +
+ +
+
+ + + + + + + + +
SMaterial& irr::video::SMaterial::operator= (const SMaterialother) [inline]
+
+ +
+ +
+
+ + + + + + + + +
bool irr::video::SMaterial::operator== (const SMaterialb) const [inline]
+
+
+ +

Equality operator.

+
Parameters:
+ + +
bMaterial to compare to.
+
+
+
Returns:
True if the materials are equal, else false.
+ +

Definition at line 667 of file SMaterial.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::video::SMaterial::setFlag (E_MATERIAL_FLAG flag,
bool value 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::video::SMaterial::setTexture (u32 i,
ITexturetex 
) [inline]
+
+
+ +

Sets the i-th texture.

+

If i>=MATERIAL_MAX_TEXTURES this setting will be ignored.

+
Parameters:
+ + + +
iThe desired level.
texTexture for texture level i.
+
+
+ +

Definition at line 482 of file SMaterial.h.

+ +

References irr::video::MATERIAL_MAX_TEXTURES, irr::video::SMaterialLayer::Texture, and TextureLayer.

+ +

Referenced by irr::scene::ISceneNode::setMaterialTexture().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::video::SMaterial::setTextureMatrix (u32 i,
const core::matrix4mat 
) [inline]
+
+
+ +

Sets the i-th texture transformation matrix.

+
Parameters:
+ + + +
iThe desired level.
matTexture matrix for texture level i.
+
+
+ +

Definition at line 463 of file SMaterial.h.

+ +

References irr::video::MATERIAL_MAX_TEXTURES, irr::video::SMaterialLayer::setTextureMatrix(), and TextureLayer.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

How much ambient light (a global light) is reflected by this material.

+

The default is full white, meaning objects are completely globally illuminated. Reduce this if you want to see diffuse or specular light effects.

+ +

Definition at line 306 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Sets the antialiasing mode.

+

Values are chosen from E_ANTI_ALIASING_MODE. Default is EAAM_SIMPLE|EAAM_LINE_SMOOTH, i.e. simple multi-sample anti-aliasing and lime smoothing is enabled.

+ +

Definition at line 372 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Is backface culling enabled? Default: true.

+ +

Definition at line 425 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Store the blend operation of choice.

+

Values to be chosen from E_BLEND_OPERATION. The actual way to use this value is not yet determined, so ignore it for now.

+ +

Definition at line 392 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Defines the enabled color planes.

+

Values are defined as or'ed values of the E_COLOR_PLANE enum. Only enabled color planes will be rendered to the current render target. Typical use is to disable all colors when rendering only to depth or stencil buffer, or using Red and Green for Stereo rendering.

+ +

Definition at line 379 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Defines the interpretation of vertex color in the lighting equation.

+

Values should be chosen from E_COLOR_MATERIAL. When lighting is enabled, vertex color can be used instead of the material values for light modulation. This allows to easily change e.g. the diffuse light behavior of each face. The default, ECM_DIFFUSE, will result in a very similar rendering as with lighting turned off, just with light shading.

+ +

Definition at line 387 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

How much diffuse light coming from a light source is reflected by this material.

+

The default is full white.

+ +

Definition at line 310 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Light emitted by this material. Default is to emit no light.

+ +

Definition at line 313 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Is fog enabled? Default: false.

+ +

Definition at line 431 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Is frontface culling enabled? Default: false.

+ +

Definition at line 428 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Flat or Gouraud shading? Default: true.

+ +

Definition at line 413 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Will this material be lighted? Default: true.

+ +

Definition at line 416 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Type of the material. Specifies how everything is blended together.

+ +

Definition at line 300 of file SMaterial.h.

+ +

Referenced by isTransparent(), operator!=(), operator=(), and irr::scene::ISceneNode::setMaterialType().

+ +
+
+ +
+ +
+ +

Free parameter, dependent on the material type.

+

Mostly ignored, used for example in EMT_PARALLAX_MAP_SOLID and EMT_TRANSPARENT_ALPHA_CHANNEL.

+ +

Definition at line 355 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Second free parameter, dependent on the material type.

+

Mostly ignored.

+ +

Definition at line 359 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Should normals be normalized?

+

Always use this if the mesh lit and scaled. Default: false

+ +

Definition at line 435 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Draw as point cloud or filled triangles? Default: false.

+ +

Definition at line 410 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Flag defining the direction the polygon offset is applied to.

+

Can be to front or to back, specififed by values from E_POLYGON_OFFSET.

+ +

Definition at line 401 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Factor specifying how far the polygon offset should be made.

+

Specifying 0 disables the polygon offset. The direction is specified spearately. The factor can be from 0 to 7.

+ +

Definition at line 397 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Value affecting the size of specular highlights.

+

A value of 20 is common. If set to 0, no specular highlights are being used. To activate, simply set the shininess of a material to a value in the range [0.5;128]:

+
        sceneNode->getMaterial(0).Shininess = 20.0f;
+

You can change the color of the highlights using

+
        sceneNode->getMaterial(0).SpecularColor.set(255,255,255,255);
+

The specular color of the dynamic lights (SLight::SpecularColor) will influence the the highlight color too, but they are set to a useful value by default when creating the light scene node. Here is a simple example on how to use specular highlights:

+
        // load and display mesh
+        scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(
+        smgr->getMesh("data/faerie.md2"));
+        node->setMaterialTexture(0, driver->getTexture("data/Faerie2.pcx")); // set diffuse texture
+        node->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting
+        node->getMaterial(0).Shininess = 20.0f; // set size of specular highlights
+
+        // add white light
+        scene::ILightSceneNode* light = smgr->addLightSceneNode(0,
+            core::vector3df(5,5,5), video::SColorf(1.0f, 1.0f, 1.0f));
+
+

Definition at line 350 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

How much specular light (highlights from a light) is reflected.

+

The default is to reflect white specular light. See SMaterial::Shininess on how to enable specular lights.

+ +

Definition at line 318 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ + + +
+ +
+ +

Thickness of non-3dimensional elements such as lines and points.

+ +

Definition at line 362 of file SMaterial.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Shall mipmaps be used if available.

+

Sometimes, disabling mipmap usage can be useful. Default: true

+ +

Definition at line 439 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Draw as wireframe or filled triangles? Default: false.

+

The user can access a material flag using

+
 material.Wireframe=true 
+

or

+
 material.setFlag(EMF_WIREFRAME, true); 
+
+

Definition at line 407 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Is the ZBuffer enabled? Default: ECFN_LESSEQUAL.

+

Values are from E_COMPARISON_FUNC.

+ +

Definition at line 366 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+ +
+ +
+ +

Is the zbuffer writeable or is it read-only. Default: true.

+

This flag is forced to false if the MaterialType is a transparent type and the scene parameter ALLOW_ZWRITE_ON_TRANSPARENT is not set.

+ +

Definition at line 422 of file SMaterial.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), getFlag(), operator!=(), operator=(), and setFlag().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer-members.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer-members.html new file mode 100644 index 0000000..9cc7ad7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer-members.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer.html b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer.html new file mode 100644 index 0000000..ff4c06c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/classirr_1_1video_1_1_s_material_layer.html @@ -0,0 +1,559 @@ + + + + +Irrlicht 3D Engine: irr::video::SMaterialLayer Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SMaterialLayer Class Reference
+
+
+ +

Struct for holding material parameters which exist per texture layer. + More...

+ +

#include <SMaterialLayer.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

+Friends

+ +

Detailed Description

+

Struct for holding material parameters which exist per texture layer.

+ +

Definition at line 48 of file SMaterialLayer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SMaterialLayer::SMaterialLayer () [inline]
+
+
+ +

Default constructor.

+ +

Definition at line 52 of file SMaterialLayer.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::video::SMaterialLayer::SMaterialLayer (const SMaterialLayerother) [inline]
+
+
+ +

Copy constructor.

+
Parameters:
+ + +
otherMaterial layer to copy from.
+
+
+ +

Definition at line 65 of file SMaterialLayer.h.

+ +
+
+ +
+
+ + + + + + + +
irr::video::SMaterialLayer::~SMaterialLayer () [inline]
+
+
+ +

Destructor.

+ +

Definition at line 73 of file SMaterialLayer.h.

+ +

References irr::core::irrAllocator< T >::deallocate(), and irr::core::irrAllocator< T >::destruct().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
core::matrix4& irr::video::SMaterialLayer::getTextureMatrix () [inline]
+
+
+ +

Gets the texture transformation matrix.

+
Returns:
Texture matrix of this layer.
+ +

Definition at line 122 of file SMaterialLayer.h.

+ +

References irr::core::irrAllocator< T >::allocate(), irr::core::irrAllocator< T >::construct(), and irr::core::IdentityMatrix.

+ +

Referenced by irr::video::SMaterial::getTextureMatrix().

+ +
+
+ +
+
+ + + + + + + +
const core::matrix4& irr::video::SMaterialLayer::getTextureMatrix () const [inline]
+
+
+ +

Gets the immutable texture transformation matrix.

+
Returns:
Texture matrix of this layer.
+ +

Definition at line 134 of file SMaterialLayer.h.

+ +

References irr::core::IdentityMatrix.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::SMaterialLayer::operator!= (const SMaterialLayerb) const [inline]
+
+
+ +

Inequality operator.

+
Parameters:
+ + +
bLayer to compare to.
+
+
+
Returns:
True if layers are different, else false.
+ +

Definition at line 158 of file SMaterialLayer.h.

+ +

References AnisotropicFilter, BilinearFilter, LODBias, Texture, TextureWrapU, TextureWrapV, and TrilinearFilter.

+ +
+
+ +
+
+ + + + + + + + +
SMaterialLayer& irr::video::SMaterialLayer::operator= (const SMaterialLayerother) [inline]
+
+
+ +

Assignment operator.

+
Parameters:
+ + +
otherMaterial layer to copy from.
+
+
+
Returns:
This material layer, updated.
+ +

Definition at line 82 of file SMaterialLayer.h.

+ +

References irr::core::irrAllocator< T >::allocate(), AnisotropicFilter, BilinearFilter, irr::core::irrAllocator< T >::construct(), irr::core::irrAllocator< T >::deallocate(), irr::core::irrAllocator< T >::destruct(), LODBias, Texture, TextureWrapU, TextureWrapV, and TrilinearFilter.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::SMaterialLayer::operator== (const SMaterialLayerb) const [inline]
+
+
+ +

Equality operator.

+
Parameters:
+ + +
bLayer to compare to.
+
+
+
Returns:
True if layers are equal, else false.
+ +

Definition at line 180 of file SMaterialLayer.h.

+ +
+
+ +
+
+ + + + + + + + +
void irr::video::SMaterialLayer::setTextureMatrix (const core::matrix4mat) [inline]
+
+
+ +

Sets the texture transformation matrix to mat.

+
Parameters:
+ + +
matNew texture matrix for this layer.
+
+
+ +

Definition at line 144 of file SMaterialLayer.h.

+ +

References irr::core::irrAllocator< T >::allocate(), and irr::core::irrAllocator< T >::construct().

+ +

Referenced by irr::video::SMaterial::setTextureMatrix().

+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + +
friend class SMaterial [friend]
+
+
+ +

Definition at line 216 of file SMaterialLayer.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Is anisotropic filtering enabled? Default: 0, disabled.

+

In Irrlicht you can use anisotropic texture filtering in conjunction with bilinear or trilinear texture filtering to improve rendering results. Primitives will look less blurry with this flag switched on. The number gives the maximal anisotropy degree, and is often in the range 2-16. Value 1 is equivalent to 0, but should be avoided.

+ +

Definition at line 206 of file SMaterialLayer.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), irr::video::SMaterial::getFlag(), operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Is bilinear filtering enabled? Default: true.

+ +

Definition at line 192 of file SMaterialLayer.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), irr::video::SMaterial::getFlag(), operator!=(), and operator=().

+ +
+
+ +
+ +
+ +

Bias for the mipmap choosing decision.

+

This value can make the textures more or less blurry than with the default value of 0. The value (divided by 8.f) is added to the mipmap level chosen initially, and thus takes a smaller mipmap for a region if the value is positive.

+ +

Definition at line 213 of file SMaterialLayer.h.

+ +

Referenced by operator!=(), and operator=().

+ +
+
+ + + +
+ +
+ +

Texture Clamp Mode.

+

Values are taken from E_TEXTURE_CLAMP.

+ +

Definition at line 188 of file SMaterialLayer.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), irr::video::SMaterial::getFlag(), operator!=(), operator=(), and irr::video::SMaterial::setFlag().

+ +
+
+ + + +
+ +
+ +

Is trilinear filtering enabled? Default: false.

+

If the trilinear filter flag is enabled, the bilinear filtering flag is ignored.

+ +

Definition at line 197 of file SMaterialLayer.h.

+ +

Referenced by irr::video::SOverrideMaterial::apply(), irr::video::SMaterial::getFlag(), operator!=(), and operator=().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/closed.png b/src/others/irrlicht-1.8.1/doc/html/closed.png new file mode 100644 index 0000000..63a0962 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/closed.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/coreutil_8h.html b/src/others/irrlicht-1.8.1/doc/html/coreutil_8h.html new file mode 100644 index 0000000..bea9176 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/coreutil_8h.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: coreutil.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
coreutil.h File Reference
+
+
+ +

File containing useful basic utility functions. +More...

+
#include "irrString.h"
+#include "path.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Functions

+ +

Detailed Description

+

File containing useful basic utility functions.

+ +

Definition in file coreutil.h.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/coreutil_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/coreutil_8h_source.html new file mode 100644 index 0000000..5288ab4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/coreutil_8h_source.html @@ -0,0 +1,295 @@ + + + + +Irrlicht 3D Engine: coreutil.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
coreutil.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_CORE_UTIL_H_INCLUDED__
+00006 #define __IRR_CORE_UTIL_H_INCLUDED__
+00007 
+00008 #include "irrString.h"
+00009 #include "path.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015 
+00020 // ----------- some basic quite often used string functions -----------------
+00021 
+00023 inline s32 isFileExtension (    const io::path& filename,
+00024                                 const io::path& ext0,
+00025                                 const io::path& ext1,
+00026                                 const io::path& ext2)
+00027 {
+00028     s32 extPos = filename.findLast ( '.' );
+00029     if ( extPos < 0 )
+00030         return 0;
+00031 
+00032     extPos += 1;
+00033     if ( filename.equals_substring_ignore_case ( ext0, extPos ) ) return 1;
+00034     if ( filename.equals_substring_ignore_case ( ext1, extPos ) ) return 2;
+00035     if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3;
+00036     return 0;
+00037 }
+00038 
+00040 inline bool hasFileExtension (  const io::path& filename,
+00041                                 const io::path& ext0,
+00042                                 const io::path& ext1 = "",
+00043                                 const io::path& ext2 = "")
+00044 {
+00045     return isFileExtension ( filename, ext0, ext1, ext2 ) > 0;
+00046 }
+00047 
+00049 inline io::path& cutFilenameExtension ( io::path &dest, const io::path &source )
+00050 {
+00051     s32 endPos = source.findLast ( '.' );
+00052     dest = source.subString ( 0, endPos < 0 ? source.size () : endPos );
+00053     return dest;
+00054 }
+00055 
+00057 inline io::path& getFileNameExtension ( io::path &dest, const io::path &source )
+00058 {
+00059     s32 endPos = source.findLast ( '.' );
+00060     if ( endPos < 0 )
+00061         dest = "";
+00062     else
+00063         dest = source.subString ( endPos, source.size () );
+00064     return dest;
+00065 }
+00066 
+00068 inline io::path& deletePathFromFilename(io::path& filename)
+00069 {
+00070     // delete path from filename
+00071     const fschar_t* s = filename.c_str();
+00072     const fschar_t* p = s + filename.size();
+00073 
+00074     // search for path separator or beginning
+00075     while ( *p != '/' && *p != '\\' && p != s )
+00076         p--;
+00077 
+00078     if ( p != s )
+00079     {
+00080         ++p;
+00081         filename = p;
+00082     }
+00083     return filename;
+00084 }
+00085 
+00087 inline io::path& deletePathFromPath(io::path& filename, s32 pathCount)
+00088 {
+00089     // delete path from filename
+00090     s32 i = filename.size();
+00091 
+00092     // search for path separator or beginning
+00093     while ( i>=0 )
+00094     {
+00095         if ( filename[i] == '/' || filename[i] == '\\' )
+00096         {
+00097             if ( --pathCount <= 0 )
+00098                 break;
+00099         }
+00100         --i;
+00101     }
+00102 
+00103     if ( i>0 )
+00104     {
+00105         filename [ i + 1 ] = 0;
+00106         filename.validate();
+00107     }
+00108     else
+00109         filename="";
+00110     return filename;
+00111 }
+00112 
+00115 inline s32 isInSameDirectory ( const io::path& path, const io::path& file )
+00116 {
+00117     s32 subA = 0;
+00118     s32 subB = 0;
+00119     s32 pos;
+00120 
+00121     if ( path.size() && !path.equalsn ( file, path.size() ) )
+00122         return -1;
+00123 
+00124     pos = 0;
+00125     while ( (pos = path.findNext ( '/', pos )) >= 0 )
+00126     {
+00127         subA += 1;
+00128         pos += 1;
+00129     }
+00130 
+00131     pos = 0;
+00132     while ( (pos = file.findNext ( '/', pos )) >= 0 )
+00133     {
+00134         subB += 1;
+00135         pos += 1;
+00136     }
+00137 
+00138     return subB - subA;
+00139 }
+00140 
+00141 // splits a path into components
+00142 static inline void splitFilename(const io::path &name, io::path* path=0,
+00143         io::path* filename=0, io::path* extension=0, bool make_lower=false)
+00144 {
+00145     s32 i = name.size();
+00146     s32 extpos = i;
+00147 
+00148     // search for path separator or beginning
+00149     while ( i >= 0 )
+00150     {
+00151         if ( name[i] == '.' )
+00152         {
+00153             extpos = i;
+00154             if ( extension )
+00155                 *extension = name.subString ( extpos + 1, name.size() - (extpos + 1), make_lower );
+00156         }
+00157         else
+00158         if ( name[i] == '/' || name[i] == '\\' )
+00159         {
+00160             if ( filename )
+00161                 *filename = name.subString ( i + 1, extpos - (i + 1), make_lower );
+00162             if ( path )
+00163             {
+00164                 *path = name.subString ( 0, i + 1, make_lower );
+00165                 path->replace ( '\\', '/' );
+00166             }
+00167             return;
+00168         }
+00169         i -= 1;
+00170     }
+00171     if ( filename )
+00172         *filename = name.subString ( 0, extpos, make_lower );
+00173 }
+00174 
+00175 
+00177 #undef isdigit
+00178 #undef isspace
+00179 #undef isupper
+00180 inline s32 isdigit(s32 c) { return c >= '0' && c <= '9'; }
+00181 inline s32 isspace(s32 c) { return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; }
+00182 inline s32 isupper(s32 c) { return c >= 'A' && c <= 'Z'; }
+00183 
+00184 
+00185 } // end namespace core
+00186 } // end namespace irr
+00187 
+00188 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/deprecated.html b/src/others/irrlicht-1.8.1/doc/html/deprecated.html new file mode 100644 index 0000000..ad0d2f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/deprecated.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: Deprecated List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Deprecated List
+
+
+
+
Member irr::core::map< KeyType, ValueType >::isEmpty () const
+
Use empty() instead. This method may be removed by Irrlicht 1.9
+
Member irr::core::position2df
+
position2d is now a synonym for vector2d, but vector2d should be used directly.
+
Member irr::core::position2di
+
position2d is now a synonym for vector2d, but vector2d should be used directly.
+
Member irr::gui::EGDS_MESSAGE_BOX_HEIGHT
+
This may be removed by Irrlicht 1.9
+
Member irr::gui::EGDS_MESSAGE_BOX_WIDTH
+
This may be removed by Irrlicht 1.9
+
Member irr::gui::IGUITreeViewNode::clearChilds ()
+
Deprecated in 1.8, use clearChildren() instead. This method may be removed by Irrlicht 1.9
+
Member irr::gui::IGUITreeViewNode::hasChilds () const
+
Deprecated in 1.8, use hasChildren() instead. This method may be removed by Irrlicht 1.9
+
Member irr::io::IFileSystem::addFolderFileArchive (const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)
+
This function is provided for compatibility with older versions of Irrlicht and may be removed in Irrlicht 1.9, you should use addFileArchive instead. Useful for handling data which will be in a zip file
+
Member irr::io::IFileSystem::addPakFileArchive (const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)
+
This function is provided for compatibility with older versions of Irrlicht and may be removed in Irrlicht 1.9, you should use addFileArchive instead. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake2/KingPin/Hexen2 .pak files
+
Member irr::io::IFileSystem::addZipFileArchive (const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)
+
This function is provided for compatibility with older versions of Irrlicht and may be removed in Irrlicht 1.9, you should use addFileArchive instead. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are no different than .zip files.
+
Member irr::IOSOperator::getOperationSystemVersion () const
+
Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9.
+
Member irr::scene::IBoneSceneNode::getBoneName () const
+
Use getName instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshCache::getMeshByFilename (const io::path &filename)
+
Use getMeshByName() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshCache::getMeshFilename (u32 index) const
+
Use getMeshName() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshCache::getMeshFilename (const IMesh *const mesh) const
+
Use getMeshName() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshCache::setMeshFilename (u32 index, const io::path &filename)
+
Use renameMesh() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshCache::setMeshFilename (const IMesh *const mesh, const io::path &filename)
+
Use renameMesh() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshManipulator::scaleMesh (IMesh *mesh, const core::vector3df &factor) const
+
Use scale() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::IMeshManipulator::transformMesh (IMesh *mesh, const core::matrix4 &m) const
+
Use transform() instead. This method may be removed by Irrlicht 1.9
+
Member irr::scene::ISceneManager::addOctTreeSceneNode (IMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false)
+
Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9.
+
Member irr::scene::ISceneManager::addOctTreeSceneNode (IAnimatedMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false)
+
Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9.
+
Member irr::scene::ISceneManager::createOctTreeTriangleSelector (IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)
+
Use createOctreeTriangleSelector instead. This method may be removed by Irrlicht 1.9.
+
Member irr::video::IVideoDriver::createImage (IImage *imageToCopy, const core::position2d< s32 > &pos, const core::dimension2d< u32 > &size)=0
+
Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9.
+
Member irr::video::IVideoDriver::createImage (ECOLOR_FORMAT format, IImage *imageToCopy)=0
+
Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9.
+
Member irr::video::IVideoDriver::makeColorKeyTexture (video::ITexture *texture, core::position2d< s32 > colorKeyPixelPos, bool zeroTexels=false) const =0
+
If set to true, then any texels that match the color key will have their color, as well as their alpha, set to zero (i.e. black). This behavior matches the legacy (buggy) behavior prior to release 1.5 and is provided for backwards compatibility only. This parameter may be removed by Irrlicht 1.9.
+
Member irr::video::IVideoDriver::makeColorKeyTexture (video::ITexture *texture, video::SColor color, bool zeroTexels=false) const =0
+
If set to true, then any texels that match the color key will have their color, as well as their alpha, set to zero (i.e. black). This behavior matches the legacy (buggy) behavior prior to release 1.5 and is provided for backwards compatibility only. This parameter may be removed by Irrlicht 1.9.
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/dimension2d_8h.html b/src/others/irrlicht-1.8.1/doc/html/dimension2d_8h.html new file mode 100644 index 0000000..4efe3c2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/dimension2d_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: dimension2d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
dimension2d.h File Reference
+
+
+
#include "irrTypes.h"
+#include "irrMath.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/dimension2d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/dimension2d_8h_source.html new file mode 100644 index 0000000..f0df4b5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/dimension2d_8h_source.html @@ -0,0 +1,305 @@ + + + + +Irrlicht 3D Engine: dimension2d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
dimension2d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_DIMENSION2D_H_INCLUDED__
+00006 #define __IRR_DIMENSION2D_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "irrMath.h" // for irr::core::equals()
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015     template <class T>
+00016     class vector2d;
+00017 
+00019     template <class T>
+00020     class dimension2d
+00021     {
+00022         public:
+00024             dimension2d() : Width(0), Height(0) {}
+00026             dimension2d(const T& width, const T& height)
+00027                 : Width(width), Height(height) {}
+00028 
+00029             dimension2d(const vector2d<T>& other); // Defined in vector2d.h
+00030 
+00032             template <class U>
+00033             explicit dimension2d(const dimension2d<U>& other) :
+00034                 Width((T)other.Width), Height((T)other.Height) { }
+00035 
+00036             template <class U>
+00037             dimension2d<T>& operator=(const dimension2d<U>& other)
+00038             {
+00039                 Width = (T) other.Width;
+00040                 Height = (T) other.Height;
+00041                 return *this;
+00042             }
+00043 
+00044 
+00046             bool operator==(const dimension2d<T>& other) const
+00047             {
+00048                 return core::equals(Width, other.Width) &&
+00049                         core::equals(Height, other.Height);
+00050             }
+00051 
+00053             bool operator!=(const dimension2d<T>& other) const
+00054             {
+00055                 return ! (*this == other);
+00056             }
+00057 
+00058             bool operator==(const vector2d<T>& other) const;  // Defined in vector2d.h
+00059 
+00060             bool operator!=(const vector2d<T>& other) const
+00061             {
+00062                 return !(*this == other);
+00063             }
+00064 
+00066             dimension2d<T>& set(const T& width, const T& height)
+00067             {
+00068                 Width = width;
+00069                 Height = height;
+00070                 return *this;
+00071             }
+00072 
+00074             dimension2d<T>& operator/=(const T& scale)
+00075             {
+00076                 Width /= scale;
+00077                 Height /= scale;
+00078                 return *this;
+00079             }
+00080 
+00082             dimension2d<T> operator/(const T& scale) const
+00083             {
+00084                 return dimension2d<T>(Width/scale, Height/scale);
+00085             }
+00086 
+00088             dimension2d<T>& operator*=(const T& scale)
+00089             {
+00090                 Width *= scale;
+00091                 Height *= scale;
+00092                 return *this;
+00093             }
+00094 
+00096             dimension2d<T> operator*(const T& scale) const
+00097             {
+00098                 return dimension2d<T>(Width*scale, Height*scale);
+00099             }
+00100 
+00102             dimension2d<T>& operator+=(const dimension2d<T>& other)
+00103             {
+00104                 Width += other.Width;
+00105                 Height += other.Height;
+00106                 return *this;
+00107             }
+00108 
+00110             dimension2d<T> operator+(const dimension2d<T>& other) const
+00111             {
+00112                 return dimension2d<T>(Width+other.Width, Height+other.Height);
+00113             }
+00114 
+00116             dimension2d<T>& operator-=(const dimension2d<T>& other)
+00117             {
+00118                 Width -= other.Width;
+00119                 Height -= other.Height;
+00120                 return *this;
+00121             }
+00122 
+00124             dimension2d<T> operator-(const dimension2d<T>& other) const
+00125             {
+00126                 return dimension2d<T>(Width-other.Width, Height-other.Height);
+00127             }
+00128 
+00130             T getArea() const
+00131             {
+00132                 return Width*Height;
+00133             }
+00134 
+00136 
+00150             dimension2d<T> getOptimalSize(
+00151                     bool requirePowerOfTwo=true,
+00152                     bool requireSquare=false,
+00153                     bool larger=true,
+00154                     u32 maxValue = 0) const
+00155             {
+00156                 u32 i=1;
+00157                 u32 j=1;
+00158                 if (requirePowerOfTwo)
+00159                 {
+00160                     while (i<(u32)Width)
+00161                         i<<=1;
+00162                     if (!larger && i!=1 && i!=(u32)Width)
+00163                         i>>=1;
+00164                     while (j<(u32)Height)
+00165                         j<<=1;
+00166                     if (!larger && j!=1 && j!=(u32)Height)
+00167                         j>>=1;
+00168                 }
+00169                 else
+00170                 {
+00171                     i=(u32)Width;
+00172                     j=(u32)Height;
+00173                 }
+00174 
+00175                 if (requireSquare)
+00176                 {
+00177                     if ((larger && (i>j)) || (!larger && (i<j)))
+00178                         j=i;
+00179                     else
+00180                         i=j;
+00181                 }
+00182 
+00183                 if ( maxValue > 0 && i > maxValue)
+00184                     i = maxValue;
+00185 
+00186                 if ( maxValue > 0 && j > maxValue)
+00187                     j = maxValue;
+00188 
+00189                 return dimension2d<T>((T)i,(T)j);
+00190             }
+00191 
+00193 
+00196             dimension2d<T> getInterpolated(const dimension2d<T>& other, f32 d) const
+00197             {
+00198                 f32 inv = (1.0f - d);
+00199                 return dimension2d<T>( (T)(other.Width*inv + Width*d), (T)(other.Height*inv + Height*d));
+00200             }
+00201 
+00202 
+00204             T Width;
+00206             T Height;
+00207     };
+00208 
+00210     typedef dimension2d<f32> dimension2df;
+00212     typedef dimension2d<u32> dimension2du;
+00213 
+00215 
+00217     typedef dimension2d<s32> dimension2di;
+00218 
+00219 
+00220 } // end namespace core
+00221 } // end namespace irr
+00222 
+00223 #endif
+00224 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/doxygen.css b/src/others/irrlicht-1.8.1/doc/html/doxygen.css new file mode 100644 index 0000000..d384a7f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/doxygen.css @@ -0,0 +1,946 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBECF6; + border: 1px solid #A3A6D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D418C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #464BA2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9C9FD4; + color: #ffffff; + border: 1px double #868ACA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #464BA2; +} + +a.codeRef { + color: #464BA2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4C6E5; + background-color: #FBFBFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 8px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBECF6; + font-weight: bold; + border: 1px solid #C4C6E5; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #EBECF6; + border: 1px solid #C4C6E5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEEEF7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3A6D7; +} + +th.dirtab { + background: #EBECF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A4FAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9F9FC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4C6E5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #464BA2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #464BA2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBECF6; + border: 1px solid #A3A6D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8ABD9; + border-left: 1px solid #A8ABD9; + border-right: 1px solid #A8ABD9; + padding: 6px 0px 6px 0px; + color: #252755; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E3F2; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8ABD9; + border-left: 1px solid #A8ABD9; + border-right: 1px solid #A8ABD9; + padding: 2px 5px; + background-color: #FBFBFD; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F7FB 95%, #EEEEF7); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F7FB), to(#EEEEF7)); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A2D61; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D3068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #373B7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #A8ABD9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8ABD9; + border-bottom: 1px solid #A8ABD9; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8ABD9; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E3F2; + font-size: 90%; + color: #252755; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8ABD9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8A8DCC; + border:solid 1px #C2C4E4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#36397C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#686CBD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#36397C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + margin-left: 5px; + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9F9FC; + margin: 0px; + border-bottom: 1px solid #C4C6E5; +} + +div.headertitle +{ + padding: 5px 5px 5px 7px; +} + +dl +{ + padding: 0 0 0 10px; +} + +dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5358B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #9093CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#333675; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } + pre.fragment + { + overflow: visible; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + } +} + diff --git a/src/others/irrlicht-1.8.1/doc/html/doxygen.png b/src/others/irrlicht-1.8.1/doc/html/doxygen.png new file mode 100644 index 0000000..56bb69c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/doxygen.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/driver_choice_8h.html b/src/others/irrlicht-1.8.1/doc/html/driver_choice_8h.html new file mode 100644 index 0000000..ebf8d50 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/driver_choice_8h.html @@ -0,0 +1,135 @@ + + + + +Irrlicht 3D Engine: driverChoice.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
driverChoice.h File Reference
+
+
+
#include <iostream>
+#include <cstdio>
+#include "EDriverTypes.h"
+#include "irrTypes.h"
+#include "IrrlichtDevice.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/driver_choice_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/driver_choice_8h_source.html new file mode 100644 index 0000000..f3953b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/driver_choice_8h_source.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: driverChoice.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
driverChoice.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2009-2012 Christian Stehno
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __E_DRIVER_CHOICE_H_INCLUDED__
+00006 #define __E_DRIVER_CHOICE_H_INCLUDED__
+00007 
+00008 #include <iostream>
+00009 #include <cstdio>
+00010 #include "EDriverTypes.h"
+00011 #include "irrTypes.h"
+00012 #include "IrrlichtDevice.h"
+00013 
+00014 namespace irr
+00015 {
+00016 
+00018 static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true)
+00019 {
+00020     const char* const names[] = {"NullDriver","Software Renderer","Burning's Video","Direct3D 8.1","Direct3D 9.0c","OpenGL 1.x/2.x/3.x"};
+00021     printf("Please select the driver you want:\n");
+00022     irr::u32 i=0;
+00023     for (i=irr::video::EDT_COUNT; i>0; --i)
+00024     {
+00025         if (allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1))))
+00026             printf(" (%c) %s\n", 'a'+irr::video::EDT_COUNT-i, names[i-1]);
+00027     }
+00028 
+00029     char c;
+00030     std::cin >> c;
+00031     c = irr::video::EDT_COUNT+'a'-c;
+00032 
+00033     for (i=irr::video::EDT_COUNT; i>0; --i)
+00034     {
+00035         if (!(allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1)))))
+00036             --c;
+00037         if ((char)i==c)
+00038             return irr::video::E_DRIVER_TYPE(i-1);
+00039     }
+00040     return irr::video::EDT_COUNT;
+00041 }
+00042 
+00043 } // end namespace irr
+00044 
+00045 #endif
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/dynsections.js b/src/others/irrlicht-1.8.1/doc/html/dynsections.js new file mode 100644 index 0000000..bf14807 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/dynsections.js @@ -0,0 +1,42 @@ +var showTriggers = new Array(); + +function registerShow(sectId,showFunc) { + showTriggers[sectId] = showFunc; +} + +function hasClass(ele,cls) { + return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); +} + +function addClass(ele,cls) { + if (!this.hasClass(ele,cls)) ele.className += " "+cls; +} + +function removeClass(ele,cls) { + if (hasClass(ele,cls)) { + var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); + ele.className=ele.className.replace(reg,' '); + } +} + +function toggleVisibility(linkObj) { + var base = linkObj.getAttribute('id'); + var summary = document.getElementById(base + '-summary'); + var content = document.getElementById(base + '-content'); + var trigger = document.getElementById(base + '-trigger'); + if ( hasClass(linkObj,'closed') ) { + summary.style.display = 'none'; + content.style.display = 'block'; + trigger.src = trigger.src.substring(0,trigger.src.length-10)+'open.png'; + removeClass(linkObj,'closed'); + addClass(linkObj,'opened'); + if (showTriggers[base]) { showTriggers[base](); } + } else if ( hasClass(linkObj,'opened') ) { + summary.style.display = 'block'; + content.style.display = 'none'; + trigger.src = trigger.src.substring(0,trigger.src.length-8)+'closed.png'; + removeClass(linkObj,'opened'); + addClass(linkObj,'closed'); + } + return false; +} diff --git a/src/others/irrlicht-1.8.1/doc/html/example001.html b/src/others/irrlicht-1.8.1/doc/html/example001.html new file mode 100644 index 0000000..0943cd9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example001.html @@ -0,0 +1,232 @@ + + + + +Irrlicht 3D Engine: Tutorial 1: HelloWorld + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 1: HelloWorld
+
+
+
+001shot.jpg +
+

This Tutorial shows how to set up the IDE for using the Irrlicht Engine and how to write a simple HelloWorld program with it. The program will show how to use the basics of the VideoDriver, the GUIEnvironment, and the SceneManager. Microsoft Visual Studio is used as an IDE, but you will also be able to understand everything if you are using a different one or even another operating system than windows.

+

You have to include the header file <irrlicht.h> in order to use the engine. The header file can be found in the Irrlicht Engine SDK directory include. To let the compiler find this header file, the directory where it is located has to be specified. This is different for every IDE and compiler you use. Let's explain shortly how to do this in Microsoft Visual Studio:

+
    +
  • If you use Version 6.0, select the Menu Extras -> Options. Select the directories tab, and select the 'Include' Item in the combo box. Add the include directory of the irrlicht engine folder to the list of directories. Now the compiler will find the Irrlicht.h header file. We also need the irrlicht.lib to be found, so stay in that dialog, select 'Libraries' in the combo box and add the lib/VisualStudio directory.
    +vc6optionsdir.jpg +
    +
    +vc6include.jpg +
    +
  • +
+
    +
  • If your IDE is Visual Studio .NET, select Tools -> Options. Select the projects entry and then select VC++ directories. Select 'show directories for include files' in the combo box, and add the include directory of the irrlicht engine folder to the list of directories. Now the compiler will find the Irrlicht.h header file. We also need the irrlicht.lib to be found, so stay in that dialog, select 'show directories for Library files' and add the lib/VisualStudio directory.
    +vcnetinclude.jpg +
    +
  • +
+

That's it. With your IDE set up like this, you will now be able to develop applications with the Irrlicht Engine.

+

Lets start!

+

After we have set up the IDE, the compiler will know where to find the Irrlicht Engine header files so we can include it now in our code.

+
#include <irrlicht.h>
+

In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if you want to use a class of the engine, you have to write irr:: before the name of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write irr:: anymore.

+
using namespace irr;
+

There are 5 sub namespaces in the Irrlicht Engine. Take a look at them, you can read a detailed description of them in the documentation by clicking on the top menu item 'Namespace List' or by using this link: http://irrlicht.sourceforge.net/docu/namespaces.html Like the irr namespace, we do not want these 5 sub namespaces now, to keep this example simple. Hence, we tell the compiler again that we do not want always to write their names.

+
using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+

To be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib for VisualStudio. On Windows platforms, we have to get rid of the console window, which pops up when starting a program with main(). This is done by the second pragma. We could also use the WinMain method, though losing platform independence then.

+
#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
+#endif
+

This is the main method. We can now use main() on every platform.

+
int main()
+{
+

The most important function of the engine is the createDevice() function. The IrrlichtDevice is created by it, which is the root object for doing anything with the engine. createDevice() has 7 parameters:

+
    +
  • deviceType: Type of the device. This can currently be the Null-device, one of the two software renderers, D3D8, D3D9, or OpenGL. In this example we use EDT_SOFTWARE, but to try out, you might want to change it to EDT_BURNINGSVIDEO, EDT_NULL, EDT_DIRECT3D8, EDT_DIRECT3D9, or EDT_OPENGL.
  • +
+
    +
  • windowSize: Size of the Window or screen in FullScreenMode to be created. In this example we use 640x480.
  • +
+
    +
  • bits: Amount of color bits per pixel. This should be 16 or 32. The parameter is often ignored when running in windowed mode.
  • +
+
    +
  • fullscreen: Specifies if we want the device to run in fullscreen mode or not.
  • +
+
    +
  • stencilbuffer: Specifies if we want to use the stencil buffer (for drawing shadows).
  • +
+
    +
  • vsync: Specifies if we want to have vsync enabled, this is only useful in fullscreen mode.
  • +
+
    +
  • eventReceiver: An object to receive events. We do not want to use this parameter here, and set it to 0.
  • +
+

Always check the return value to cope with unsupported drivers, dimensions, etc.

+
    IrrlichtDevice *device =
+        createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
+            false, false, false, 0);
+
+    if (!device)
+        return 1;
+

Set the caption of the window to some nice text. Note that there is an 'L' in front of the string. The Irrlicht Engine uses wide character strings when displaying text.

+
    device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
+

Get a pointer to the VideoDriver, the SceneManager and the graphical user interface environment, so that we do not always have to write device->getVideoDriver(), device->getSceneManager(), or device->getGUIEnvironment().

+
    IVideoDriver* driver = device->getVideoDriver();
+    ISceneManager* smgr = device->getSceneManager();
+    IGUIEnvironment* guienv = device->getGUIEnvironment();
+

We add a hello world label to the window, using the GUI environment. The text is placed at the position (10,10) as top left corner and (260,22) as lower right corner.

+
    guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
+        rect<s32>(10,10,260,22), true);
+

To show something interesting, we load a Quake 2 model and display it. We only have to get the Mesh from the Scene Manager with getMesh() and add a SceneNode to display the mesh with addAnimatedMeshSceneNode(). We check the return value of getMesh() to become aware of loading problems and other errors.

+

Instead of writing the filename sydney.md2, it would also be possible to load a Maya object file (.obj), a complete Quake3 map (.bsp) or any other supported file format. By the way, that cool Quake 2 model called sydney was modelled by Brian Collins.

+
    IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
+    if (!mesh)
+    {
+        device->drop();
+        return 1;
+    }
+    IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
+

To let the mesh look a little bit nicer, we change its material. We disable lighting because we do not have a dynamic light in here, and the mesh would be totally black otherwise. Then we set the frame loop, such that the predefined STAND animation is used. And last, we apply a texture to the mesh. Without it the mesh would be drawn using only a color.

+
    if (node)
+    {
+        node->setMaterialFlag(EMF_LIGHTING, false);
+        node->setMD2Animation(scene::EMAT_STAND);
+        node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
+    }
+

To look at the mesh, we place a camera into 3d space at the position (0, 30, -40). The camera looks from there to (0,5,0), which is approximately the place where our md2 model is.

+
    smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
+

Ok, now we have set up the scene, lets draw everything: We run the device in a while() loop, until the device does not want to run any more. This would be when the user closes the window or presses ALT+F4 (or whatever keycode closes a window).

+
    while(device->run())
+    {
+

Anything can be drawn between a beginScene() and an endScene() call. The beginScene() call clears the screen with a color and the depth buffer, if desired. Then we let the Scene Manager and the GUI Environment draw their content. With the endScene() call everything is presented on the screen.

+
        driver->beginScene(true, true, SColor(255,100,101,140));
+
+        smgr->drawAll();
+        guienv->drawAll();
+
+        driver->endScene();
+    }
+

After we are done with the render loop, we have to delete the Irrlicht Device created before with createDevice(). In the Irrlicht Engine, you have to delete all objects you created with a method or function which starts with 'create'. The object is simply deleted by calling ->drop(). See the documentation at irr::IReferenceCounted::drop() for more information.

+
    device->drop();
+
+    return 0;
+}
+

That's it. Compile and run.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example002.html b/src/others/irrlicht-1.8.1/doc/html/example002.html new file mode 100644 index 0000000..7cbcf5a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example002.html @@ -0,0 +1,218 @@ + + + + +Irrlicht 3D Engine: Tutorial 2: Quake3Map + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 2: Quake3Map
+
+
+
+002shot.jpg +
+

This Tutorial shows how to load a Quake 3 map into the engine, create a SceneNode for optimizing the speed of rendering, and how to create a user controlled camera.

+

Please note that you should know the basics of the engine before starting this tutorial. Just take a short look at the first tutorial, if you haven't done this yet: http://irrlicht.sourceforge.net/tut001.html

+

Lets start like the HelloWorld example: We include the irrlicht header files and an additional file to be able to ask the user for a driver type using the console.

+
#include <irrlicht.h>
+#include <iostream>
+

As already written in the HelloWorld example, in the Irrlicht Engine everything can be found in the namespace 'irr'. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write that 'irr::'. There are 5 other sub namespaces 'core', 'scene', 'video', 'io' and 'gui'. Unlike in the HelloWorld example, we do not call 'using namespace' for these 5 other namespaces, because in this way you will see what can be found in which namespace. But if you like, you can also include the namespaces like in the previous example.

+
using namespace irr;
+

Again, to be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib:

+
#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

Ok, lets start. Again, we use the main() method as start, not the WinMain().

+
int main()
+{
+

Like in the HelloWorld example, we create an IrrlichtDevice with createDevice(). The difference now is that we ask the user to select which video driver to use. The Software device might be too slow to draw a huge Quake 3 map, but just for the fun of it, we make this decision possible, too. Instead of copying this whole code into your app, you can simply include driverChoice.h from Irrlicht's include directory. The function driverChoiceConsole does exactly the same.

+
    // ask user for driver
+
+    video::E_DRIVER_TYPE driverType;
+
+    printf("Please select the driver you want for this example:\n"\
+        " (a) OpenGL 1.5\n (b) Direct3D 9.0c\n (c) Direct3D 8.1\n"\
+        " (d) Burning's Software Renderer\n (e) Software Renderer\n"\
+        " (f) NullDevice\n (otherKey) exit\n\n");
+
+    char i;
+    std::cin >> i;
+
+    switch(i)
+    {
+        case 'a': driverType = video::EDT_OPENGL;   break;
+        case 'b': driverType = video::EDT_DIRECT3D9;break;
+        case 'c': driverType = video::EDT_DIRECT3D8;break;
+        case 'd': driverType = video::EDT_BURNINGSVIDEO;break;
+        case 'e': driverType = video::EDT_SOFTWARE; break;
+        case 'f': driverType = video::EDT_NULL;     break;
+        default: return 1;
+    }
+
+    // create device and exit if creation failed
+
+    IrrlichtDevice *device =
+        createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+

Get a pointer to the video driver and the SceneManager so that we do not always have to call irr::IrrlichtDevice::getVideoDriver() and irr::IrrlichtDevice::getSceneManager().

+
    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+

To display the Quake 3 map, we first need to load it. Quake 3 maps are packed into .pk3 files which are nothing else than .zip files. So we add the .pk3 file to our irr::io::IFileSystem. After it was added, we are able to read from the files in that archive as if they are directly stored on the disk.

+
    device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+

Now we can load the mesh by calling irr::scene::ISceneManager::getMesh(). We get a pointer returned to an irr::scene::IAnimatedMesh. As you might know, Quake 3 maps are not really animated, they are only a huge chunk of static geometry with some materials attached. Hence the IAnimatedMesh consists of only one frame, so we get the "first frame" of the "animation", which is our quake level and create an Octree scene node with it, using irr::scene::ISceneManager::addOctreeSceneNode(). The Octree optimizes the scene a little bit, trying to draw only geometry which is currently visible. An alternative to the Octree would be a irr::scene::IMeshSceneNode, which would always draw the complete geometry of the mesh, without optimization. Try it: Use irr::scene::ISceneManager::addMeshSceneNode() instead of addOctreeSceneNode() and compare the primitives drawn by the video driver. (There is a irr::video::IVideoDriver::getPrimitiveCountDrawn() method in the irr::video::IVideoDriver class). Note that this optimization with the Octree is only useful when drawing huge meshes consisting of lots of geometry.

+
    scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
+    scene::ISceneNode* node = 0;
+
+    if (mesh)
+        node = smgr->addOctreeSceneNode(mesh->getMesh(0), 0, -1, 1024);
+//      node = smgr->addMeshSceneNode(mesh->getMesh(0));
+

Because the level was not modelled around the origin (0,0,0), we translate the whole level a little bit. This is done on irr::scene::ISceneNode level using the methods irr::scene::ISceneNode::setPosition() (in this case), irr::scene::ISceneNode::setRotation(), and irr::scene::ISceneNode::setScale().

+
    if (node)
+        node->setPosition(core::vector3df(-1300,-144,-1249));
+

Now we only need a camera to look at the Quake 3 map. We want to create a user controlled camera. There are some cameras available in the Irrlicht engine. For example the MayaCamera which can be controlled like the camera in Maya: Rotate with left mouse button pressed, Zoom with both buttons pressed, translate with right mouse button pressed. This could be created with irr::scene::ISceneManager::addCameraSceneNodeMaya(). But for this example, we want to create a camera which behaves like the ones in first person shooter games (FPS) and hence use irr::scene::ISceneManager::addCameraSceneNodeFPS().

+
    smgr->addCameraSceneNodeFPS();
+

The mouse cursor needs not be visible, so we hide it via the irr::IrrlichtDevice::ICursorControl.

+
    device->getCursorControl()->setVisible(false);
+

We have done everything, so lets draw it. We also write the current frames per second and the primitives drawn into the caption of the window. The test for irr::IrrlichtDevice::isWindowActive() is optional, but prevents the engine to grab the mouse cursor after task switching when other programs are active. The call to irr::IrrlichtDevice::yield() will avoid the busy loop to eat up all CPU cycles when the window is not active.

+
    int lastFPS = -1;
+
+    while(device->run())
+    {
+        if (device->isWindowActive())
+        {
+            driver->beginScene(true, true, video::SColor(255,200,200,200));
+            smgr->drawAll();
+            driver->endScene();
+
+            int fps = driver->getFPS();
+
+            if (lastFPS != fps)
+            {
+                core::stringw str = L"Irrlicht Engine - Quake 3 Map example [";
+                str += driver->getName();
+                str += "] FPS:";
+                str += fps;
+
+                device->setWindowCaption(str.c_str());
+                lastFPS = fps;
+            }
+        }
+        else
+            device->yield();
+    }
+

In the end, delete the Irrlicht device.

+
    device->drop();
+    return 0;
+}
+

That's it. Compile and play around with the program.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example003.html b/src/others/irrlicht-1.8.1/doc/html/example003.html new file mode 100644 index 0000000..411fbff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example003.html @@ -0,0 +1,264 @@ + + + + +Irrlicht 3D Engine: Tutorial 3: Custom SceneNode + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 3: Custom SceneNode
+
+
+
+003shot.jpg +
+

This Tutorial is more advanced than the previous ones. If you are currently just playing around with the Irrlicht engine, you may want to look at other examples first. This tutorials shows how to create a custom scene node and how to use it in the engine. A custom scene node is needed if you want to implement a render technique the Irrlicht Engine currently does not support. For example, you can write an indoor portal based renderer or an advanced terrain scene node with it. By creating custom scene nodes, you can easily extend the Irrlicht Engine and adapt it to your own needs.

+

I will keep the tutorial simple: Keep everything very short, everything in one .cpp file, and I'll use the engine here as in all other tutorials.

+

To start, I include the header files, use the irr namespace, and tell the linker to link with the .lib file.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

Here comes the more sophisticated part of this tutorial: The class of our very own custom scene node. To keep it simple, our scene node will not be an indoor portal renderer nor a terrain scene node, but a simple tetraeder, a 3d object consisting of 4 connected vertices, which only draws itself and does nothing more. Note that this scenario does not require a custom scene node in Irrlicht. Instead one would create a mesh from the geometry and pass it to a irr::scene::IMeshSceneNode. This example just illustrates creation of a custom scene node in a very simple setting.

+

To let our scene node be able to be inserted into the Irrlicht Engine scene, the class we create needs to be derived from the irr::scene::ISceneNode class and has to override some methods.

+
class CSampleSceneNode : public scene::ISceneNode
+{
+

First, we declare some member variables: The bounding box, 4 vertices, and the material of the tetraeder.

+
    core::aabbox3d<f32> Box;
+    video::S3DVertex Vertices[4];
+    video::SMaterial Material;
+

The parameters of the constructor specify the parent of the scene node, a pointer to the scene manager, and an id of the scene node. In the constructor we call the parent class' constructor, set some properties of the material, and create the 4 vertices of the tetraeder we will draw later.

+
public:
+
+    CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
+        : scene::ISceneNode(parent, mgr, id)
+    {
+        Material.Wireframe = false;
+        Material.Lighting = false;
+
+        Vertices[0] = video::S3DVertex(0,0,10, 1,1,0,
+                video::SColor(255,0,255,255), 0, 1);
+        Vertices[1] = video::S3DVertex(10,0,-10, 1,0,0,
+                video::SColor(255,255,0,255), 1, 1);
+        Vertices[2] = video::S3DVertex(0,20,0, 0,1,1,
+                video::SColor(255,255,255,0), 1, 0);
+        Vertices[3] = video::S3DVertex(-10,0,-10, 0,0,1,
+                video::SColor(255,0,255,0), 0, 0);
+

The Irrlicht Engine needs to know the bounding box of a scene node. It will use it for automatic culling and other things. Hence, we need to create a bounding box from the 4 vertices we use. If you do not want the engine to use the box for automatic culling, and/or don't want to create the box, you could also call irr::scene::ISceneNode::setAutomaticCulling() with irr::scene::EAC_OFF.

+
        Box.reset(Vertices[0].Pos);
+        for (s32 i=1; i<4; ++i)
+            Box.addInternalPoint(Vertices[i].Pos);
+    }
+

Before it is drawn, the irr::scene::ISceneNode::OnRegisterSceneNode() method of every scene node in the scene is called by the scene manager. If the scene node wishes to draw itself, it may register itself in the scene manager to be drawn. This is necessary to tell the scene manager when it should call irr::scene::ISceneNode::render(). For example, normal scene nodes render their content one after another, while stencil buffer shadows would like to be drawn after all other scene nodes. And camera or light scene nodes need to be rendered before all other scene nodes (if at all). So here we simply register the scene node to render normally. If we would like to let it be rendered like cameras or light, we would have to call SceneManager->registerNodeForRendering(this, SNRT_LIGHT_AND_CAMERA); After this, we call the actual irr::scene::ISceneNode::OnRegisterSceneNode() method of the base class, which simply lets also all the child scene nodes of this node register themselves.

+
    virtual void OnRegisterSceneNode()
+    {
+        if (IsVisible)
+            SceneManager->registerNodeForRendering(this);
+
+        ISceneNode::OnRegisterSceneNode();
+    }
+

In the render() method most of the interesting stuff happens: The Scene node renders itself. We override this method and draw the tetraeder.

+
    virtual void render()
+    {
+        u16 indices[] = {   0,2,3, 2,1,3, 1,0,3, 2,0,1  };
+        video::IVideoDriver* driver = SceneManager->getVideoDriver();
+
+        driver->setMaterial(Material);
+        driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
+        driver->drawVertexPrimitiveList(&Vertices[0], 4, &indices[0], 4, video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT);
+    }
+

And finally we create three small additional methods. irr::scene::ISceneNode::getBoundingBox() returns the bounding box of this scene node, irr::scene::ISceneNode::getMaterialCount() returns the amount of materials in this scene node (our tetraeder only has one material), and irr::scene::ISceneNode::getMaterial() returns the material at an index. Because we have only one material here, we can return the only one material, assuming that no one ever calls getMaterial() with an index greater than 0.

+
    virtual const core::aabbox3d<f32>& getBoundingBox() const
+    {
+        return Box;
+    }
+
+    virtual u32 getMaterialCount() const
+    {
+        return 1;
+    }
+
+    virtual video::SMaterial& getMaterial(u32 i)
+    {
+        return Material;
+    }   
+};
+

That's it. The Scene node is done. Now we simply have to start the engine, create the scene node and a camera, and look at the result.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+
+    IrrlichtDevice *device = createDevice(driverType,
+            core::dimension2d<u32>(640, 480), 16, false);
+        
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    // create engine and camera
+
+    device->setWindowCaption(L"Custom Scene Node - Irrlicht Engine Demo");
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+
+    smgr->addCameraSceneNode(0, core::vector3df(0,-40,0), core::vector3df(0,0,0));
+

Create our scene node. I don't check the result of calling new, as it should throw an exception rather than returning 0 on failure. Because the new node will create itself with a reference count of 1, and then will have another reference added by its parent scene node when it is added to the scene, I need to drop my reference to it. Best practice is to drop it only *after* I have finished using it, regardless of what the reference count of the object is after creation.

+
    CSampleSceneNode *myNode =
+        new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
+

To animate something in this boring scene consisting only of one tetraeder, and to show that you now can use your scene node like any other scene node in the engine, we add an animator to the scene node, which rotates the node a little bit. irr::scene::ISceneManager::createRotationAnimator() could return 0, so should be checked.

+
    scene::ISceneNodeAnimator* anim =
+        smgr->createRotationAnimator(core::vector3df(0.8f, 0, 0.8f));
+
+    if(anim)
+    {
+        myNode->addAnimator(anim);
+

I'm done referring to anim, so must irr::IReferenceCounted::drop() this reference now because it was produced by a createFoo() function. As I shouldn't refer to it again, ensure that I can't by setting to 0.

+
        anim->drop();
+        anim = 0;
+    }
+

I'm done with my CSampleSceneNode object, and so must drop my reference. This won't delete the object, yet, because it is still attached to the scene graph, which prevents the deletion until the graph is deleted or the custom scene node is removed from it.

+
    myNode->drop();
+    myNode = 0; // As I shouldn't refer to it again, ensure that I can't
+

Now draw everything and finish.

+
    u32 frames=0;
+    while(device->run())
+    {
+        driver->beginScene(true, true, video::SColor(0,100,100,100));
+
+        smgr->drawAll();
+
+        driver->endScene();
+        if (++frames==100)
+        {
+            core::stringw str = L"Irrlicht Engine [";
+            str += driver->getName();
+            str += L"] FPS: ";
+            str += (s32)driver->getFPS();
+
+            device->setWindowCaption(str.c_str());
+            frames=0;
+        }
+    }
+
+    device->drop();
+    
+    return 0;
+}
+

That's it. Compile and play around with the program.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example004.html b/src/others/irrlicht-1.8.1/doc/html/example004.html new file mode 100644 index 0000000..03ee1ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example004.html @@ -0,0 +1,302 @@ + + + + +Irrlicht 3D Engine: Tutorial 4: Movement + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 4: Movement
+
+
+
+004shot.jpg +
+

This Tutorial shows how to move and animate SceneNodes. The basic concept of SceneNodeAnimators is shown as well as manual movement of nodes using the keyboard. We'll demonstrate framerate independent movement, which means moving by an amount dependent on the duration of the last run of the Irrlicht loop.

+

Example 19.MouseAndJoystick shows how to handle those kinds of input.

+

As always, I include the header files, use the irr namespace, and tell the linker to link with the .lib file.

+
#ifdef _MSC_VER
+// We'll also define this to stop MSVC complaining about sprintf().
+#define _CRT_SECURE_NO_WARNINGS
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+

To receive events like mouse and keyboard input, or GUI events like "the OK +button has been clicked", we need an object which is derived from the irr::IEventReceiver object. There is only one method to override: irr::IEventReceiver::OnEvent(). This method will be called by the engine once when an event happens. What we really want to know is whether a key is being held down, and so we will remember the current state of each key.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    // This is the one method that we have to implement
+    virtual bool OnEvent(const SEvent& event)
+    {
+        // Remember whether each key is down or up
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT)
+            KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
+
+        return false;
+    }
+
+    // This is used to check whether a key is being held down
+    virtual bool IsKeyDown(EKEY_CODE keyCode) const
+    {
+        return KeyIsDown[keyCode];
+    }
+    
+    MyEventReceiver()
+    {
+        for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
+            KeyIsDown[i] = false;
+    }
+
+private:
+    // We use this array to store the current state of each key
+    bool KeyIsDown[KEY_KEY_CODES_COUNT];
+};
+

The event receiver for keeping the pressed keys is ready, the actual responses will be made inside the render loop, right before drawing the scene. So lets just create an irr::IrrlichtDevice and the scene node we want to move. We also create some other additional scene nodes, to show that there are also some different possibilities to move and animate scene nodes.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+    MyEventReceiver receiver;
+
+    IrrlichtDevice* device = createDevice(driverType,
+            core::dimension2d<u32>(640, 480), 16, false, false, false, &receiver);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+

Create the node which will be moved with the WSAD keys. We create a sphere node, which is a built-in geometry primitive. We place the node at (0,0,30) and assign a texture to it to let it look a little bit more interesting. Because we have no dynamic lights in this scene we disable lighting for each model (otherwise the models would be black).

+
    scene::ISceneNode * node = smgr->addSphereSceneNode();
+    if (node)
+    {
+        node->setPosition(core::vector3df(0,0,30));
+        node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+        node->setMaterialFlag(video::EMF_LIGHTING, false);
+    }
+

Now we create another node, movable using a scene node animator. Scene node animators modify scene nodes and can be attached to any scene node like mesh scene nodes, billboards, lights and even camera scene nodes. Scene node animators are not only able to modify the position of a scene node, they can also animate the textures of an object for example. We create a cube scene node and attach a 'fly circle' scene node animator to it, letting this node fly around our sphere scene node.

+
    scene::ISceneNode* n = smgr->addCubeSceneNode();
+
+    if (n)
+    {
+        n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
+        n->setMaterialFlag(video::EMF_LIGHTING, false);
+        scene::ISceneNodeAnimator* anim =
+            smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);
+        if (anim)
+        {
+            n->addAnimator(anim);
+            anim->drop();
+        }
+    }
+

The last scene node we add to show possibilities of scene node animators is a b3d model, which uses a 'fly straight' animator to run between to points.

+
    scene::IAnimatedMeshSceneNode* anms =
+        smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"));
+
+    if (anms)
+    {
+        scene::ISceneNodeAnimator* anim =
+            smgr->createFlyStraightAnimator(core::vector3df(100,0,60),
+            core::vector3df(-100,0,60), 3500, true);
+        if (anim)
+        {
+            anms->addAnimator(anim);
+            anim->drop();
+        }
+

To make the model look right we disable lighting, set the frames between which the animation should loop, rotate the model around 180 degrees, and adjust the animation speed and the texture. To set the right animation (frames and speed), we would also be able to just call "anms->setMD2Animation(scene::EMAT_RUN)" for the 'run' animation instead of "setFrameLoop" and "setAnimationSpeed", but this only works with MD2 animations, and so you know how to start other animations. But a good advice is to not use hardcoded frame-numbers...

+
        anms->setMaterialFlag(video::EMF_LIGHTING, false);
+
+        anms->setFrameLoop(0, 13);
+        anms->setAnimationSpeed(15);
+//      anms->setMD2Animation(scene::EMAT_RUN);
+
+        anms->setScale(core::vector3df(2.f,2.f,2.f));
+        anms->setRotation(core::vector3df(0,-90,0));
+//      anms->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));
+
+    }
+

To be able to look at and move around in this scene, we create a first person shooter style camera and make the mouse cursor invisible.

+
    smgr->addCameraSceneNodeFPS();
+    device->getCursorControl()->setVisible(false);
+

Add a colorful irrlicht logo

+
    device->getGUIEnvironment()->addImage(
+        driver->getTexture("../../media/irrlichtlogoalpha2.tga"),
+        core::position2d<s32>(10,20));
+
+    gui::IGUIStaticText* diagnostics = device->getGUIEnvironment()->addStaticText(
+        L"", core::rect<s32>(10, 10, 400, 20));
+    diagnostics->setOverrideColor(video::SColor(255, 255, 255, 0));
+

We have done everything, so lets draw it. We also write the current frames per second and the name of the driver to the caption of the window.

+
    int lastFPS = -1;
+
+    // In order to do framerate independent movement, we have to know
+    // how long it was since the last frame
+    u32 then = device->getTimer()->getTime();
+
+    // This is the movemen speed in units per second.
+    const f32 MOVEMENT_SPEED = 5.f;
+
+    while(device->run())
+    {
+        // Work out a frame delta time.
+        const u32 now = device->getTimer()->getTime();
+        const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds
+        then = now;
+

Check if keys W, S, A or D are being held down, and move the sphere node around respectively.

+
        core::vector3df nodePosition = node->getPosition();
+
+        if(receiver.IsKeyDown(irr::KEY_KEY_W))
+            nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime;
+        else if(receiver.IsKeyDown(irr::KEY_KEY_S))
+            nodePosition.Y -= MOVEMENT_SPEED * frameDeltaTime;
+
+        if(receiver.IsKeyDown(irr::KEY_KEY_A))
+            nodePosition.X -= MOVEMENT_SPEED * frameDeltaTime;
+        else if(receiver.IsKeyDown(irr::KEY_KEY_D))
+            nodePosition.X += MOVEMENT_SPEED * frameDeltaTime;
+
+        node->setPosition(nodePosition);
+
+        driver->beginScene(true, true, video::SColor(255,113,113,133));
+
+        smgr->drawAll(); // draw the 3d scene
+        device->getGUIEnvironment()->drawAll(); // draw the gui environment (the logo)
+
+        driver->endScene();
+
+        int fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw tmp(L"Movement Example - Irrlicht Engine [");
+            tmp += driver->getName();
+            tmp += L"] fps: ";
+            tmp += fps;
+
+            device->setWindowCaption(tmp.c_str());
+            lastFPS = fps;
+        }
+    }
+

In the end, delete the Irrlicht device.

+
    device->drop();
+    
+    return 0;
+}
+

That's it. Compile and play around with the program.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example005.html b/src/others/irrlicht-1.8.1/doc/html/example005.html new file mode 100644 index 0000000..1148a3f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example005.html @@ -0,0 +1,329 @@ + + + + +Irrlicht 3D Engine: Tutorial 5: User Interface + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 5: User Interface
+
+
+
+005shot.jpg +
+

This tutorial shows how to use the built in User Interface of the Irrlicht Engine. It will give a brief overview and show how to create and use windows, buttons, scroll bars, static texts, and list boxes.

+

As always, we include the header files, and use the irrlicht namespaces. We also store a pointer to the Irrlicht device, a counter variable for changing the creation position of a window, and a pointer to a listbox.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+// Declare a structure to hold some context for the event receiver so that it
+// has it available inside its OnEvent() method.
+struct SAppContext
+{
+    IrrlichtDevice *device;
+    s32             counter;
+    IGUIListBox*    listbox;
+};
+
+// Define some values that we'll use to identify individual GUI controls.
+enum
+{
+    GUI_ID_QUIT_BUTTON = 101,
+    GUI_ID_NEW_WINDOW_BUTTON,
+    GUI_ID_FILE_OPEN_BUTTON,
+    GUI_ID_TRANSPARENCY_SCROLL_BAR
+};
+

Set the skin transparency by changing the alpha values of all skin-colors

+
void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
+{
+    for (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
+    {
+        video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);
+        col.setAlpha(alpha);
+        skin->setColor((EGUI_DEFAULT_COLOR)i, col);
+    }
+}
+

The Event Receiver is not only capable of getting keyboard and mouse input events, but also events of the graphical user interface (gui). There are events for almost everything: Button click, Listbox selection change, events that say that a element was hovered and so on. To be able to react to some of these events, we create an event receiver. We only react to gui events, and if it's such an event, we get the id of the caller (the gui element which caused the event) and get the pointer to the gui environment.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    MyEventReceiver(SAppContext & context) : Context(context) { }
+
+    virtual bool OnEvent(const SEvent& event)
+    {
+        if (event.EventType == EET_GUI_EVENT)
+        {
+            s32 id = event.GUIEvent.Caller->getID();
+            IGUIEnvironment* env = Context.device->getGUIEnvironment();
+
+            switch(event.GUIEvent.EventType)
+            {
+

If a scrollbar changed its scroll position, and it is 'our' scrollbar (the one with id GUI_ID_TRANSPARENCY_SCROLL_BAR), then we change the transparency of all gui elements. This is a very easy task: There is a skin object, in which all color settings are stored. We simply go through all colors stored in the skin and change their alpha value.

+
            case EGET_SCROLL_BAR_CHANGED:
+                if (id == GUI_ID_TRANSPARENCY_SCROLL_BAR)
+                {
+                    s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
+                    setSkinTransparency(pos, env->getSkin());
+                }
+                break;
+

If a button was clicked, it could be one of 'our' three buttons. If it is the first, we shut down the engine. If it is the second, we create a little window with some text on it. We also add a string to the list box to log what happened. And if it is the third button, we create a file open dialog, and add also this as string to the list box. That's all for the event receiver.

+
            case EGET_BUTTON_CLICKED:
+                switch(id)
+                {
+                case GUI_ID_QUIT_BUTTON:
+                    Context.device->closeDevice();
+                    return true;
+
+                case GUI_ID_NEW_WINDOW_BUTTON:
+                    {
+                    Context.listbox->addItem(L"Window created");
+                    Context.counter += 30;
+                    if (Context.counter > 200)
+                        Context.counter = 0;
+
+                    IGUIWindow* window = env->addWindow(
+                        rect<s32>(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter),
+                        false, // modal?
+                        L"Test window");
+
+                    env->addStaticText(L"Please close me",
+                        rect<s32>(35,35,140,50),
+                        true, // border?
+                        false, // wordwrap?
+                        window);
+                    }
+                    return true;
+
+                case GUI_ID_FILE_OPEN_BUTTON:
+                    Context.listbox->addItem(L"File open");
+                    // There are some options for the file open dialog
+                    // We set the title, make it a modal window, and make sure
+                    // that the working directory is restored after the dialog
+                    // is finished.
+                    env->addFileOpenDialog(L"Please choose a file.", true, 0, -1, true);
+                    return true;
+
+                default:
+                    return false;
+                }
+                break;
+
+            case EGET_FILE_SELECTED:
+                {
+                    // show the model filename, selected in the file dialog
+                    IGUIFileOpenDialog* dialog =
+                        (IGUIFileOpenDialog*)event.GUIEvent.Caller;
+                    Context.listbox->addItem(dialog->getFileName());
+                }
+                break;
+
+            default:
+                break;
+            }
+        }
+
+        return false;
+    }
+
+private:
+    SAppContext & Context;
+};
+

Ok, now for the more interesting part. First, create the Irrlicht device. As in some examples before, we ask the user which driver he wants to use for this example:

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device and exit if creation failed
+
+    IrrlichtDevice * device = createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+

The creation was successful, now we set the event receiver and store pointers to the driver and to the gui environment.

+
    device->setWindowCaption(L"Irrlicht Engine - User Interface Demo");
+    device->setResizable(true);
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    IGUIEnvironment* env = device->getGUIEnvironment();
+

To make the font a little bit nicer, we load an external font and set it as the new default font in the skin. To keep the standard font for tool tip text, we set it to the built-in font.

+
    IGUISkin* skin = env->getSkin();
+    IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+    if (font)
+        skin->setFont(font);
+
+    skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP);
+

We add three buttons. The first one closes the engine. The second creates a window and the third opens a file open dialog. The third parameter is the id of the button, with which we can easily identify the button in the event receiver.

+
    env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_QUIT_BUTTON,
+            L"Quit", L"Exits Program");
+    env->addButton(rect<s32>(10,280,110,280 + 32), 0, GUI_ID_NEW_WINDOW_BUTTON,
+            L"New Window", L"Launches a new Window");
+    env->addButton(rect<s32>(10,320,110,320 + 32), 0, GUI_ID_FILE_OPEN_BUTTON,
+            L"File Open", L"Opens a file");
+

Now, we add a static text and a scrollbar, which modifies the transparency of all gui elements. We set the maximum value of the scrollbar to 255, because that's the maximal value for a color value. Then we create an other static text and a list box.

+
    env->addStaticText(L"Transparent Control:", rect<s32>(150,20,350,40), true);
+    IGUIScrollBar* scrollbar = env->addScrollBar(true,
+            rect<s32>(150, 45, 350, 60), 0, GUI_ID_TRANSPARENCY_SCROLL_BAR);
+    scrollbar->setMax(255);
+    scrollbar->setPos(255);
+    setSkinTransparency( scrollbar->getPos(), env->getSkin());
+
+    // set scrollbar position to alpha value of an arbitrary element
+    scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha());
+
+    env->addStaticText(L"Logging ListBox:", rect<s32>(50,110,250,130), true);
+    IGUIListBox * listbox = env->addListBox(rect<s32>(50, 140, 250, 210));
+    env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100));
+
+    // Store the appropriate data in a context structure.
+    SAppContext context;
+    context.device = device;
+    context.counter = 0;
+    context.listbox = listbox;
+
+    // Then create the event receiver, giving it that context structure.
+    MyEventReceiver receiver(context);
+
+    // And tell the device to use our custom event receiver.
+    device->setEventReceiver(&receiver);
+

And at last, we create a nice Irrlicht Engine logo in the top left corner.

+
    env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+            position2d<int>(10,10));
+

That's all, we only have to draw everything.

+
    while(device->run() && driver)
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, SColor(0,200,200,200));
+
+        env->drawAll();
+    
+        driver->endScene();
+    }
+
+    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example006.html b/src/others/irrlicht-1.8.1/doc/html/example006.html new file mode 100644 index 0000000..95c2ac7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example006.html @@ -0,0 +1,219 @@ + + + + +Irrlicht 3D Engine: Tutorial 6: 2D Graphics + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 6: 2D Graphics
+
+
+
+006shot.jpg +
+

This Tutorial shows how to do 2d graphics with the Irrlicht Engine. It shows how to draw images, keycolor based sprites, transparent rectangles, and different fonts. You may consider this useful if you want to make a 2d game with the engine, or if you want to draw a cool interface or head up display for your 3d game.

+

As always, I include the header files, use the irr namespace, and tell the linker to link with the .lib file.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

At first, we let the user select the driver type, then start up the engine, set a caption, and get a pointer to the video driver.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+
+    IrrlichtDevice *device = createDevice(driverType,
+        core::dimension2d<u32>(512, 384));
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    device->setWindowCaption(L"Irrlicht Engine - 2D Graphics Demo");
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+

All 2d graphics in this example are put together into one texture, 2ddemo.png. Because we want to draw colorkey based sprites, we need to load this texture and tell the engine, which part of it should be transparent based on a colorkey.

+

In this example, we don't tell it the color directly, we just say "Hey Irrlicht Engine, you'll find the color I want at position (0,0) on the texture.". Instead, it would be also possible to call driver->makeColorKeyTexture(images, video::SColor(0,0,0,0)), to make e.g. all black pixels transparent. Please note that makeColorKeyTexture just creates an alpha channel based on the color.

+
    video::ITexture* images = driver->getTexture("../../media/2ddemo.png");
+    driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));
+

To be able to draw some text with two different fonts, we first load them. Ok, we load just one. As the first font we just use the default font which is built into the engine. Also, we define two rectangles which specify the position of the images of the red imps (little flying creatures) in the texture.

+
    gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont();
+    gui::IGUIFont* font2 =
+        device->getGUIEnvironment()->getFont("../../media/fonthaettenschweiler.bmp");
+
+    core::rect<s32> imp1(349,15,385,78);
+    core::rect<s32> imp2(387,15,423,78);
+

Prepare a nicely filtering 2d render mode for special cases.

+
    driver->getMaterial2D().TextureLayer[0].BilinearFilter=true;
+    driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC;
+

Everything is prepared, now we can draw everything in the draw loop, between the begin scene and end scene calls. In this example, we are just doing 2d graphics, but it would be no problem to mix them with 3d graphics. Just try it out, and draw some 3d vertices or set up a scene with the scene manager and draw it.

+
    while(device->run() && driver)
+    {
+        if (device->isWindowActive())
+        {
+            u32 time = device->getTimer()->getTime();
+
+            driver->beginScene(true, true, video::SColor(255,120,102,136));
+

First, we draw 3 sprites, using the alpha channel we created with makeColorKeyTexture. The last parameter specifies that the drawing method should use this alpha channel. The last-but-one parameter specifies a color, with which the sprite should be colored. (255,255,255,255) is full white, so the sprite will look like the original. The third sprite is drawn with the red channel modulated based on the time.

+
            // draw fire & dragons background world
+            driver->draw2DImage(images, core::position2d<s32>(50,50),
+                core::rect<s32>(0,0,342,224), 0,
+                video::SColor(255,255,255,255), true);
+
+            // draw flying imp
+            driver->draw2DImage(images, core::position2d<s32>(164,125),
+                (time/500 % 2) ? imp1 : imp2, 0,
+                video::SColor(255,255,255,255), true);
+
+            // draw second flying imp with colorcylce
+            driver->draw2DImage(images, core::position2d<s32>(270,105),
+                (time/500 % 2) ? imp1 : imp2, 0,
+                video::SColor(255,(time) % 255,255,255), true);
+

Drawing text is really simple. The code should be self explanatory.

+
            // draw some text
+            if (font)
+                font->draw(L"This demo shows that Irrlicht is also capable of drawing 2D graphics.",
+                    core::rect<s32>(130,10,300,50),
+                    video::SColor(255,255,255,255));
+
+            // draw some other text
+            if (font2)
+                font2->draw(L"Also mixing with 3d graphics is possible.",
+                    core::rect<s32>(130,20,300,60),
+                    video::SColor(255,time % 255,time % 255,255));
+

Next, we draw the Irrlicht Engine logo (without using a color or an alpha channel). Since we slightly scale the image we use the prepared filter mode.

+
            driver->enableMaterial2D();
+            driver->draw2DImage(images, core::rect<s32>(10,10,108,48),
+                core::rect<s32>(354,87,442,118));
+            driver->enableMaterial2D(false);
+

Finally draw a half-transparent rect under the mouse cursor.

+
            core::position2d<s32> m = device->getCursorControl()->getPosition();
+            driver->draw2DRectangle(video::SColor(100,255,255,255),
+                core::rect<s32>(m.X-20, m.Y-20, m.X+20, m.Y+20));
+
+            driver->endScene();
+        }
+    }
+
+    device->drop();
+
+    return 0;
+}
+

That's all. I hope it was not too difficult.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example007.html b/src/others/irrlicht-1.8.1/doc/html/example007.html new file mode 100644 index 0000000..e1a8577 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example007.html @@ -0,0 +1,384 @@ + + + + +Irrlicht 3D Engine: Tutorial 7: Collision + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 7: Collision
+
+
+
+007shot.jpg +
+

We will describe 2 methods: Automatic collision detection for moving through 3d worlds with stair climbing and sliding, and manual scene node and triangle picking using a ray. In this case, we will use a ray coming out from the camera, but you can use any ray.

+

To start, we take the program from tutorial 2, which loads and displays a quake 3 level. We will use the level to walk in it and to pick triangles from. In addition we'll place 3 animated models into it for triangle picking. The following code starts up the engine and loads the level, as per tutorial 2.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+enum
+{
+    // I use this ISceneNode ID to indicate a scene node that is
+    // not pickable by getSceneNodeAndCollisionPointFromRay()
+    ID_IsNotPickable = 0,
+
+    // I use this flag in ISceneNode IDs to indicate that the
+    // scene node can be picked by ray selection.
+    IDFlag_IsPickable = 1 << 0,
+
+    // I use this flag in ISceneNode IDs to indicate that the
+    // scene node can be highlighted.  In this example, the
+    // homonids can be highlighted, but the level mesh can't.
+    IDFlag_IsHighlightable = 1 << 1
+};
+
+int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+
+    IrrlichtDevice *device =
+        createDevice(driverType, core::dimension2d<u32>(640, 480), 16, false);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+
+    device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+
+    scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp");
+    scene::IMeshSceneNode* q3node = 0;
+
+    // The Quake mesh is pickable, but doesn't get highlighted.
+    if (q3levelmesh)
+        q3node = smgr->addOctreeSceneNode(q3levelmesh->getMesh(0), 0, IDFlag_IsPickable);
+

So far so good, we've loaded the quake 3 level like in tutorial 2. Now, here comes something different: We create a triangle selector. A triangle selector is a class which can fetch the triangles from scene nodes for doing different things with them, for example collision detection. There are different triangle selectors, and all can be created with the ISceneManager. In this example, we create an OctreeTriangleSelector, which optimizes the triangle output a little bit by reducing it like an octree. This is very useful for huge meshes like quake 3 levels. After we created the triangle selector, we attach it to the q3node. This is not necessary, but in this way, we do not need to care for the selector, for example dropping it after we do not need it anymore.

+
    scene::ITriangleSelector* selector = 0;
+
+    if (q3node)
+    {
+        q3node->setPosition(core::vector3df(-1350,-130,-1400));
+
+        selector = smgr->createOctreeTriangleSelector(
+                q3node->getMesh(), q3node, 128);
+        q3node->setTriangleSelector(selector);
+        // We're not done with this selector yet, so don't drop it.
+    }
+

We add a first person shooter camera to the scene so that we can see and move in the quake 3 level like in tutorial 2. But this, time, we add a special animator to the camera: A Collision Response animator. This animator modifies the scene node to which it is attached to in order to prevent it moving through walls, and to add gravity to it. The only thing we have to tell the animator is how the world looks like, how big the scene node is, how much gravity to apply and so on. After the collision response animator is attached to the camera, we do not have to do anything more for collision detection, anything is done automatically. The rest of the collision detection code below is for picking. And please note another cool feature: The collision response animator can be attached also to all other scene nodes, not only to cameras. And it can be mixed with other scene node animators. In this way, collision detection and response in the Irrlicht engine is really easy.

+

Now we'll take a closer look on the parameters of createCollisionResponseAnimator(). The first parameter is the TriangleSelector, which specifies how the world, against collision detection is done looks like. The second parameter is the scene node, which is the object, which is affected by collision detection, in our case it is the camera. The third defines how big the object is, it is the radius of an ellipsoid. Try it out and change the radius to smaller values, the camera will be able to move closer to walls after this. The next parameter is the direction and speed of gravity. We'll set it to (0, -10, 0), which approximates to realistic gravity, assuming that our units are metres. You could set it to (0,0,0) to disable gravity. And the last value is just a translation: Without this, the ellipsoid with which collision detection is done would be around the camera, and the camera would be in the middle of the ellipsoid. But as human beings, we are used to have our eyes on top of the body, with which we collide with our world, not in the middle of it. So we place the scene node 50 units over the center of the ellipsoid with this parameter. And that's it, collision detection works now.

+
    // Set a jump speed of 3 units per second, which gives a fairly realistic jump
+    // when used with the gravity of (0, -10, 0) in the collision response animator.
+    scene::ICameraSceneNode* camera =
+        smgr->addCameraSceneNodeFPS(0, 100.0f, .3f, ID_IsNotPickable, 0, 0, true, 3.f);
+    camera->setPosition(core::vector3df(50,50,-60));
+    camera->setTarget(core::vector3df(-70,30,-60));
+
+    if (selector)
+    {
+        scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+            selector, camera, core::vector3df(30,50,30),
+            core::vector3df(0,-10,0), core::vector3df(0,30,0));
+        selector->drop(); // As soon as we're done with the selector, drop it.
+        camera->addAnimator(anim);
+        anim->drop();  // And likewise, drop the animator when we're done referring to it.
+    }
+
+    // Now I create three animated characters which we can pick, a dynamic light for
+    // lighting them, and a billboard for drawing where we found an intersection.
+
+    // First, let's get rid of the mouse cursor.  We'll use a billboard to show
+    // what we're looking at.
+    device->getCursorControl()->setVisible(false);
+
+    // Add the billboard.
+    scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
+    bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+    bill->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+    bill->setMaterialFlag(video::EMF_LIGHTING, false);
+    bill->setMaterialFlag(video::EMF_ZBUFFER, false);
+    bill->setSize(core::dimension2d<f32>(20.0f, 20.0f));
+    bill->setID(ID_IsNotPickable); // This ensures that we don't accidentally ray-pick it
+

Add 3 animated hominids, which we can pick using a ray-triangle intersection. They all animate quite slowly, to make it easier to see that accurate triangle selection is being performed.

+
    scene::IAnimatedMeshSceneNode* node = 0;
+
+    video::SMaterial material;
+
+    // Add an MD2 node, which uses vertex-based animation.
+    node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/faerie.md2"),
+                        0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+    node->setPosition(core::vector3df(-90,-15,-140)); // Put its feet on the floor.
+    node->setScale(core::vector3df(1.6f)); // Make it appear realistically scaled
+    node->setMD2Animation(scene::EMAT_POINT);
+    node->setAnimationSpeed(20.f);
+    material.setTexture(0, driver->getTexture("../../media/faerie2.bmp"));
+    material.Lighting = true;
+    material.NormalizeNormals = true;
+    node->getMaterial(0) = material;
+
+    // Now create a triangle selector for it.  The selector will know that it
+    // is associated with an animated node, and will update itself as necessary.
+    selector = smgr->createTriangleSelector(node);
+    node->setTriangleSelector(selector);
+    selector->drop(); // We're done with this selector, so drop it now.
+
+    // And this B3D file uses skinned skeletal animation.
+    node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"),
+                        0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+    node->setScale(core::vector3df(10));
+    node->setPosition(core::vector3df(-75,-66,-80));
+    node->setRotation(core::vector3df(0,90,0));
+    node->setAnimationSpeed(8.f);
+    node->getMaterial(0).NormalizeNormals = true;
+    node->getMaterial(0).Lighting = true;
+    // Just do the same as we did above.
+    selector = smgr->createTriangleSelector(node);
+    node->setTriangleSelector(selector);
+    selector->drop();
+
+    // This X files uses skeletal animation, but without skinning.
+    node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"),
+                        0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+    node->setPosition(core::vector3df(-70,-66,-30)); // Put its feet on the floor.
+    node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera.
+    node->setAnimationSpeed(20.f);
+    node->getMaterial(0).Lighting = true;
+    selector = smgr->createTriangleSelector(node);
+    node->setTriangleSelector(selector);
+    selector->drop();
+
+
+    // And this mdl file uses skinned skeletal animation.
+    node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/yodan.mdl"),
+                        0, IDFlag_IsPickable | IDFlag_IsHighlightable);
+    node->setPosition(core::vector3df(-90,-25,20));
+    node->setScale(core::vector3df(0.8f));
+    node->getMaterial(0).Lighting = true;
+    node->setAnimationSpeed(20.f);
+
+    // Just do the same as we did above.
+    selector = smgr->createTriangleSelector(node);
+    node->setTriangleSelector(selector);
+    selector->drop();
+
+    material.setTexture(0, 0);
+    material.Lighting = false;
+
+    // Add a light, so that the unselected nodes aren't completely dark.
+    scene::ILightSceneNode * light = smgr->addLightSceneNode(0, core::vector3df(-60,100,400),
+        video::SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f);
+    light->setID(ID_IsNotPickable); // Make it an invalid target for selection.
+
+    // Remember which scene node is highlighted
+    scene::ISceneNode* highlightedSceneNode = 0;
+    scene::ISceneCollisionManager* collMan = smgr->getSceneCollisionManager();
+    int lastFPS = -1;
+
+    // draw the selection triangle only as wireframe
+    material.Wireframe=true;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, 0);
+        smgr->drawAll();
+
+        // Unlight any currently highlighted scene node
+        if (highlightedSceneNode)
+        {
+            highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, true);
+            highlightedSceneNode = 0;
+        }
+
+        // All intersections in this example are done with a ray cast out from the camera to
+        // a distance of 1000.  You can easily modify this to check (e.g.) a bullet
+        // trajectory or a sword's position, or create a ray from a mouse click position using
+        // ISceneCollisionManager::getRayFromScreenCoordinates()
+        core::line3d<f32> ray;
+        ray.start = camera->getPosition();
+        ray.end = ray.start + (camera->getTarget() - ray.start).normalize() * 1000.0f;
+
+        // Tracks the current intersection point with the level or a mesh
+        core::vector3df intersection;
+        // Used to show with triangle has been hit
+        core::triangle3df hitTriangle;
+
+        // This call is all you need to perform ray/triangle collision on every scene node
+        // that has a triangle selector, including the Quake level mesh.  It finds the nearest
+        // collision point/triangle, and returns the scene node containing that point.
+        // Irrlicht provides other types of selection, including ray/triangle selector,
+        // ray/box and ellipse/triangle selector, plus associated helpers.
+        // See the methods of ISceneCollisionManager
+        scene::ISceneNode * selectedSceneNode =
+            collMan->getSceneNodeAndCollisionPointFromRay(
+                    ray,
+                    intersection, // This will be the position of the collision
+                    hitTriangle, // This will be the triangle hit in the collision
+                    IDFlag_IsPickable, // This ensures that only nodes that we have
+                            // set up to be pickable are considered
+                    0); // Check the entire scene (this is actually the implicit default)
+
+        // If the ray hit anything, move the billboard to the collision position
+        // and draw the triangle that was hit.
+        if(selectedSceneNode)
+        {
+            bill->setPosition(intersection);
+
+            // We need to reset the transform before doing our own rendering.
+            driver->setTransform(video::ETS_WORLD, core::matrix4());
+            driver->setMaterial(material);
+            driver->draw3DTriangle(hitTriangle, video::SColor(0,255,0,0));
+
+            // We can check the flags for the scene node that was hit to see if it should be
+            // highlighted. The animated nodes can be highlighted, but not the Quake level mesh
+            if((selectedSceneNode->getID() & IDFlag_IsHighlightable) == IDFlag_IsHighlightable)
+            {
+                highlightedSceneNode = selectedSceneNode;
+
+                // Highlighting in this case means turning lighting OFF for this node,
+                // which means that it will be drawn with full brightness.
+                highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, false);
+            }
+        }
+
+        // We're all done drawing, so end the scene.
+        driver->endScene();
+
+        int fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Collision detection example - Irrlicht Engine [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+
+    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example008.html b/src/others/irrlicht-1.8.1/doc/html/example008.html new file mode 100644 index 0000000..82eaac4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example008.html @@ -0,0 +1,320 @@ + + + + +Irrlicht 3D Engine: Tutorial 8: SpecialFX + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 8: SpecialFX
+
+
+
+008shot.jpg +
+

This tutorials describes how to do special effects. It shows how to use stencil buffer shadows, the particle system, billboards, dynamic light, and the water surface scene node.

+

We start like in some tutorials before. Please note that this time, the 'shadows' flag in createDevice() is set to true, for we want to have a dynamic shadow casted from an animated character. If this example runs too slow, set it to false. The Irrlicht Engine checks if your hardware doesn't support the stencil buffer, and disables shadows by itself, but just in case the demo runs slow on your hardware.

+
#include <irrlicht.h>
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+int main()
+{
+    // ask if user would like shadows
+    char i;
+    printf("Please press 'y' if you want to use realtime shadows.\n");
+
+    std::cin >> i;
+
+    const bool shadows = (i == 'y');
+
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+

Create device and exit if creation failed. We make the stencil flag optional to avoid slow screen modes for runs without shadows.

+
    IrrlichtDevice *device =
+        createDevice(driverType, core::dimension2d<u32>(640, 480),
+        16, false, shadows);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+

For our environment, we load a .3ds file. It is a small room I modelled with Anim8or and exported into the 3ds format because the Irrlicht Engine does not support the .an8 format. I am a very bad 3d graphic artist, and so the texture mapping is not very nice in this model. Luckily I am a better programmer than artist, and so the Irrlicht Engine is able to create a cool texture mapping for me: Just use the mesh manipulator and create a planar texture mapping for the mesh. If you want to see the mapping I made with Anim8or, uncomment this line. I also did not figure out how to set the material right in Anim8or, it has a specular light color which I don't really like. I'll switch it off too with this code.

+
    scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/room.3ds");
+
+    smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.004f);
+
+    scene::ISceneNode* node = 0;
+
+    node = smgr->addAnimatedMeshSceneNode(mesh);
+    node->setMaterialTexture(0, driver->getTexture("../../media/wall.jpg"));
+    node->getMaterial(0).SpecularColor.set(0,0,0,0);
+

Now, for the first special effect: Animated water. It works like this: The WaterSurfaceSceneNode takes a mesh as input and makes it wave like a water surface. And if we let this scene node use a nice material like the EMT_REFLECTION_2_LAYER, it looks really cool. We are doing this with the next few lines of code. As input mesh, we create a hill plane mesh, without hills. But any other mesh could be used for this, you could even use the room.3ds (which would look really strange) if you want to.

+
    mesh = smgr->addHillPlaneMesh( "myHill",
+        core::dimension2d<f32>(20,20),
+        core::dimension2d<u32>(40,40), 0, 0,
+        core::dimension2d<f32>(0,0),
+        core::dimension2d<f32>(10,10));
+
+    node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
+    node->setPosition(core::vector3df(0,7,0));
+
+    node->setMaterialTexture(0, driver->getTexture("../../media/stones.jpg"));
+    node->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+
+    node->setMaterialType(video::EMT_REFLECTION_2_LAYER);
+

The second special effect is very basic, I bet you saw it already in some Irrlicht Engine demos: A transparent billboard combined with a dynamic light. We simply create a light scene node, let it fly around, and to make it look more cool, we attach a billboard scene node to it.

+
    // create light
+
+    node = smgr->addLightSceneNode(0, core::vector3df(0,0,0),
+        video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 800.0f);
+    scene::ISceneNodeAnimator* anim = 0;
+    anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),250.0f);
+    node->addAnimator(anim);
+    anim->drop();
+
+    // attach billboard to light
+
+    node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));
+    node->setMaterialFlag(video::EMF_LIGHTING, false);
+    node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+    node->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
+

The next special effect is a lot more interesting: A particle system. The particle system in the Irrlicht Engine is quite modular and extensible, but yet easy to use. There is a particle system scene node into which you can put a particle emitter, which makes particles come out of nothing. These emitters are quite flexible and usually have lots of parameters like direction, amount, and color of the particles they create.

+

There are different emitters, for example a point emitter which lets particles pop out at a fixed point. If the particle emitters available in the engine are not enough for you, you can easily create your own ones, you'll simply have to create a class derived from the IParticleEmitter interface and attach it to the particle system using setEmitter(). In this example we create a box particle emitter, which creates particles randomly inside a box. The parameters define the box, direction of the particles, minimal and maximal new particles per second, color, and minimal and maximal lifetime of the particles.

+

Because only with emitters particle system would be a little bit boring, there are particle affectors which modify particles while they fly around. Affectors can be added to a particle system for simulating additional effects like gravity or wind. The particle affector we use in this example is an affector which modifies the color of the particles: It lets them fade out. Like the particle emitters, additional particle affectors can also be implemented by you, simply derive a class from IParticleAffector and add it with addAffector().

+

After we set a nice material to the particle system, we have a cool looking camp fire. By adjusting material, texture, particle emitter, and affector parameters, it is also easily possible to create smoke, rain, explosions, snow, and so on.

+
    // create a particle system
+
+    scene::IParticleSystemSceneNode* ps =
+        smgr->addParticleSystemSceneNode(false);
+
+    scene::IParticleEmitter* em = ps->createBoxEmitter(
+        core::aabbox3d<f32>(-7,0,-7,7,1,7), // emitter size
+        core::vector3df(0.0f,0.06f,0.0f),   // initial direction
+        80,100,                             // emit rate
+        video::SColor(0,255,255,255),       // darkest color
+        video::SColor(0,255,255,255),       // brightest color
+        800,2000,0,                         // min and max age, angle
+        core::dimension2df(10.f,10.f),         // min size
+        core::dimension2df(20.f,20.f));        // max size
+
+    ps->setEmitter(em); // this grabs the emitter
+    em->drop(); // so we can drop it here without deleting it
+
+    scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();
+
+    ps->addAffector(paf); // same goes for the affector
+    paf->drop();
+
+    ps->setPosition(core::vector3df(-70,60,40));
+    ps->setScale(core::vector3df(2,2,2));
+    ps->setMaterialFlag(video::EMF_LIGHTING, false);
+    ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+    ps->setMaterialTexture(0, driver->getTexture("../../media/fire.bmp"));
+    ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+

Next we add a volumetric light node, which adds a glowing fake area light to the scene. Like with the billboards and particle systems we also assign a texture for the desired effect, though this time we'll use a texture animator to create the illusion of a magical glowing area effect.

+
    scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1,
+                32,                              // Subdivisions on U axis
+                32,                              // Subdivisions on V axis
+                video::SColor(0, 255, 255, 255), // foot color
+                video::SColor(0, 0, 0, 0));      // tail color
+
+    if (n)
+    {
+        n->setScale(core::vector3df(56.0f, 56.0f, 56.0f));
+        n->setPosition(core::vector3df(-120,50,40));
+
+        // load textures for animation
+        core::array<video::ITexture*> textures;
+        for (s32 g=7; g > 0; --g)
+        {
+            core::stringc tmp;
+            tmp = "../../media/portal";
+            tmp += g;
+            tmp += ".bmp";
+            video::ITexture* t = driver->getTexture( tmp.c_str() );
+            textures.push_back(t);
+        }
+
+        // create texture animator
+        scene::ISceneNodeAnimator* glow = smgr->createTextureAnimator(textures, 150);
+
+        // add the animator
+        n->addAnimator(glow);
+
+        // drop the animator because it was created with a create() function
+        glow->drop();
+    }
+

As our last special effect, we want a dynamic shadow be casted from an animated character. For this we load a DirectX .x model and place it into our world. For creating the shadow, we simply need to call addShadowVolumeSceneNode(). The color of shadows is only adjustable globally for all shadows, by calling ISceneManager::setShadowColor(). Voila, here is our dynamic shadow.

+

Because the character is a little bit too small for this scene, we make it bigger using setScale(). And because the character is lighted by a dynamic light, we need to normalize the normals to make the lighting on it correct. This is always necessary if the scale of a dynamic lighted model is not (1,1,1). Otherwise it would get too dark or too bright because the normals will be scaled too.

+
    // add animated character
+
+    mesh = smgr->getMesh("../../media/dwarf.x");
+    scene::IAnimatedMeshSceneNode* anode = 0;
+
+    anode = smgr->addAnimatedMeshSceneNode(mesh);
+    anode->setPosition(core::vector3df(-50,20,-60));
+    anode->setAnimationSpeed(15);
+
+    // add shadow
+    anode->addShadowVolumeSceneNode();
+    smgr->setShadowColor(video::SColor(150,0,0,0));
+
+    // make the model a little bit bigger and normalize its normals
+    // because of the scaling, for correct lighting
+    anode->setScale(core::vector3df(2,2,2));
+    anode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
+

Finally we simply have to draw everything, that's all.

+
    scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+    camera->setPosition(core::vector3df(-50,50,-150));
+    camera->setFarValue(10000.0f); // this increase a shadow visible range.
+
+    // disable mouse cursor
+    device->getCursorControl()->setVisible(false);
+
+    s32 lastFPS = -1;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, 0);
+
+        smgr->drawAll();
+
+        driver->endScene();
+
+        const s32 fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Irrlicht Engine - SpecialFX example [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+
+    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example009.html b/src/others/irrlicht-1.8.1/doc/html/example009.html new file mode 100644 index 0000000..5b228eb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example009.html @@ -0,0 +1,1043 @@ + + + + +Irrlicht 3D Engine: Tutorial 9: Mesh Viewer + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 9: Mesh Viewer
+
+
+
+009shot.jpg +
+

This tutorial show how to create a more complex application with the engine. We construct a simple mesh viewer using the user interface API and the scene management of Irrlicht. The tutorial show how to create and use Buttons, Windows, Toolbars, Menus, ComboBoxes, Tabcontrols, Editboxes, Images, MessageBoxes, SkyBoxes, and how to parse XML files with the integrated XML reader of the engine.

+

We start like in most other tutorials: Include all necessary header files, add a comment to let the engine be linked with the right .lib file in Visual Studio, and declare some global variables. We also add two 'using namespace' statements, so we do not need to write the whole names of all classes. In this tutorial, we use a lot stuff from the gui namespace.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+using namespace gui;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

Some global variables used later on

+
IrrlichtDevice *Device = 0;
+core::stringc StartUpModelFile;
+core::stringw MessageText;
+core::stringw Caption;
+scene::ISceneNode* Model = 0;
+scene::ISceneNode* SkyBox = 0;
+bool Octree=false;
+bool UseLight=false;
+
+scene::ICameraSceneNode* Camera[2] = {0, 0};
+
+// Values used to identify individual GUI elements
+enum
+{
+    GUI_ID_DIALOG_ROOT_WINDOW  = 0x10000,
+
+    GUI_ID_X_SCALE,
+    GUI_ID_Y_SCALE,
+    GUI_ID_Z_SCALE,
+
+    GUI_ID_OPEN_MODEL,
+    GUI_ID_SET_MODEL_ARCHIVE,
+    GUI_ID_LOAD_AS_OCTREE,
+
+    GUI_ID_SKY_BOX_VISIBLE,
+    GUI_ID_TOGGLE_DEBUG_INFO,
+
+    GUI_ID_DEBUG_OFF,
+    GUI_ID_DEBUG_BOUNDING_BOX,
+    GUI_ID_DEBUG_NORMALS,
+    GUI_ID_DEBUG_SKELETON,
+    GUI_ID_DEBUG_WIRE_OVERLAY,
+    GUI_ID_DEBUG_HALF_TRANSPARENT,
+    GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES,
+    GUI_ID_DEBUG_ALL,
+
+    GUI_ID_MODEL_MATERIAL_SOLID,
+    GUI_ID_MODEL_MATERIAL_TRANSPARENT,
+    GUI_ID_MODEL_MATERIAL_REFLECTION,
+
+    GUI_ID_CAMERA_MAYA,
+    GUI_ID_CAMERA_FIRST_PERSON,
+
+    GUI_ID_POSITION_TEXT,
+
+    GUI_ID_ABOUT,
+    GUI_ID_QUIT,
+
+    GUI_ID_TEXTUREFILTER,
+    GUI_ID_SKIN_TRANSPARENCY,
+    GUI_ID_SKIN_ANIMATION_FPS,
+
+    GUI_ID_BUTTON_SET_SCALE,
+    GUI_ID_BUTTON_SCALE_MUL10,
+    GUI_ID_BUTTON_SCALE_DIV10,
+    GUI_ID_BUTTON_OPEN_MODEL,
+    GUI_ID_BUTTON_SHOW_ABOUT,
+    GUI_ID_BUTTON_SHOW_TOOLBOX,
+    GUI_ID_BUTTON_SELECT_ARCHIVE,
+
+    GUI_ID_ANIMATION_INFO,
+
+    // And some magic numbers
+    MAX_FRAMERATE = 80,
+    DEFAULT_FRAMERATE = 30
+};
+

Toggle between various cameras

+
void setActiveCamera(scene::ICameraSceneNode* newActive)
+{
+    if (0 == Device)
+        return;
+
+    scene::ICameraSceneNode * active = Device->getSceneManager()->getActiveCamera();
+    active->setInputReceiverEnabled(false);
+
+    newActive->setInputReceiverEnabled(true);
+    Device->getSceneManager()->setActiveCamera(newActive);
+}
+

Set the skin transparency by changing the alpha values of all skin-colors

+
void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin)
+{
+    for (s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
+    {
+        video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i);
+        col.setAlpha(alpha);
+        skin->setColor((EGUI_DEFAULT_COLOR)i, col);
+    }
+}
+

Update the display of the model scaling

+
void updateScaleInfo(scene::ISceneNode* model)
+{
+    IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
+    if (!toolboxWnd)
+        return;
+    if (!model)
+    {
+        toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( L"-" );
+        toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText( L"-" );
+        toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText( L"-" );
+    }
+    else
+    {
+        core::vector3df scale = model->getScale();
+        toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( core::stringw(scale.X).c_str() );
+        toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText( core::stringw(scale.Y).c_str() );
+        toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText( core::stringw(scale.Z).c_str() );
+    }
+}
+

Function showAboutText() displays a messagebox with a caption and a message text. The texts will be stored in the MessageText and Caption variables at startup.

+
void showAboutText()
+{
+    // create modal message box with the text
+    // loaded from the xml file.
+    Device->getGUIEnvironment()->addMessageBox(
+        Caption.c_str(), MessageText.c_str());
+}
+

Function loadModel() loads a model and displays it using an addAnimatedMeshSceneNode and the scene manager. Nothing difficult. It also displays a short message box, if the model could not be loaded.

+
void loadModel(const c8* fn)
+{
+    // modify the name if it a .pk3 file
+
+    io::path filename(fn);
+
+    io::path extension;
+    core::getFileNameExtension(extension, filename);
+    extension.make_lower();
+
+    // if a texture is loaded apply it to the current model..
+    if (extension == ".jpg" || extension == ".pcx" ||
+        extension == ".png" || extension == ".ppm" ||
+        extension == ".pgm" || extension == ".pbm" ||
+        extension == ".psd" || extension == ".tga" ||
+        extension == ".bmp" || extension == ".wal" ||
+        extension == ".rgb" || extension == ".rgba")
+    {
+        video::ITexture * texture =
+            Device->getVideoDriver()->getTexture( filename );
+        if ( texture && Model )
+        {
+            // always reload texture
+            Device->getVideoDriver()->removeTexture(texture);
+            texture = Device->getVideoDriver()->getTexture( filename );
+
+            Model->setMaterialTexture(0, texture);
+        }
+        return;
+    }
+    // if a archive is loaded add it to the FileArchive..
+    else if (extension == ".pk3" || extension == ".zip" || extension == ".pak" || extension == ".npk")
+    {
+        Device->getFileSystem()->addFileArchive(filename.c_str());
+        return;
+    }
+
+    // load a model into the engine
+
+    if (Model)
+        Model->remove();
+
+    Model = 0;
+
+    if (extension==".irr")
+    {
+        core::array<scene::ISceneNode*> outNodes;
+        Device->getSceneManager()->loadScene(filename);
+        Device->getSceneManager()->getSceneNodesFromType(scene::ESNT_ANIMATED_MESH, outNodes);
+        if (outNodes.size())
+            Model = outNodes[0];
+        return;
+    }
+
+    scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh( filename.c_str() );
+
+    if (!m)
+    {
+        // model could not be loaded
+
+        if (StartUpModelFile != filename)
+            Device->getGUIEnvironment()->addMessageBox(
+            Caption.c_str(), L"The model could not be loaded. " \
+            L"Maybe it is not a supported file format.");
+        return;
+    }
+
+    // set default material properties
+
+    if (Octree)
+        Model = Device->getSceneManager()->addOctreeSceneNode(m->getMesh(0));
+    else
+    {
+        scene::IAnimatedMeshSceneNode* animModel = Device->getSceneManager()->addAnimatedMeshSceneNode(m);
+        animModel->setAnimationSpeed(30);
+        Model = animModel;
+    }
+    Model->setMaterialFlag(video::EMF_LIGHTING, UseLight);
+    Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight);
+//  Model->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false);
+    Model->setDebugDataVisible(scene::EDS_OFF);
+
+    // we need to uncheck the menu entries. would be cool to fake a menu event, but
+    // that's not so simple. so we do it brute force
+    gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_TOGGLE_DEBUG_INFO, true);
+    if (menu)
+        for(int item = 1; item < 6; ++item)
+            menu->setItemChecked(item, false);
+    updateScaleInfo(Model);
+}
+

Function createToolBox() creates a toolbox window. In this simple mesh viewer, this toolbox only contains a tab control with three edit boxes for changing the scale of the displayed model.

+
void createToolBox()
+{
+    // remove tool box if already there
+    IGUIEnvironment* env = Device->getGUIEnvironment();
+    IGUIElement* root = env->getRootGUIElement();
+    IGUIElement* e = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
+    if (e)
+        e->remove();
+
+    // create the toolbox window
+    IGUIWindow* wnd = env->addWindow(core::rect<s32>(600,45,800,480),
+        false, L"Toolset", 0, GUI_ID_DIALOG_ROOT_WINDOW);
+
+    // create tab control and tabs
+    IGUITabControl* tab = env->addTabControl(
+        core::rect<s32>(2,20,800-602,480-7), wnd, true, true);
+
+    IGUITab* t1 = tab->addTab(L"Config");
+
+    // add some edit boxes and a button to tab one
+    env->addStaticText(L"Scale:",
+            core::rect<s32>(10,20,60,45), false, false, t1);
+    env->addStaticText(L"X:", core::rect<s32>(22,48,40,66), false, false, t1);
+    env->addEditBox(L"1.0", core::rect<s32>(40,46,130,66), true, t1, GUI_ID_X_SCALE);
+    env->addStaticText(L"Y:", core::rect<s32>(22,82,40,96), false, false, t1);
+    env->addEditBox(L"1.0", core::rect<s32>(40,76,130,96), true, t1, GUI_ID_Y_SCALE);
+    env->addStaticText(L"Z:", core::rect<s32>(22,108,40,126), false, false, t1);
+    env->addEditBox(L"1.0", core::rect<s32>(40,106,130,126), true, t1, GUI_ID_Z_SCALE);
+
+    env->addButton(core::rect<s32>(10,134,85,165), t1, GUI_ID_BUTTON_SET_SCALE, L"Set");
+
+    // quick scale buttons
+    env->addButton(core::rect<s32>(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L"* 10");
+    env->addButton(core::rect<s32>(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L"* 0.1");
+
+    updateScaleInfo(Model);
+
+    // add transparency control
+    env->addStaticText(L"GUI Transparency Control:",
+            core::rect<s32>(10,200,150,225), true, false, t1);
+    IGUIScrollBar* scrollbar = env->addScrollBar(true,
+            core::rect<s32>(10,225,150,240), t1, GUI_ID_SKIN_TRANSPARENCY);
+    scrollbar->setMax(255);
+    scrollbar->setPos(255);
+
+    // add framerate control
+    env->addStaticText(L":", core::rect<s32>(10,240,150,265), true, false, t1);
+    env->addStaticText(L"Framerate:",
+            core::rect<s32>(12,240,75,265), false, false, t1);
+    // current frame info
+    env->addStaticText(L"", core::rect<s32>(75,240,200,265), false, false, t1,
+            GUI_ID_ANIMATION_INFO);
+    scrollbar = env->addScrollBar(true,
+            core::rect<s32>(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS);
+    scrollbar->setMax(MAX_FRAMERATE);
+    scrollbar->setMin(-MAX_FRAMERATE);
+    scrollbar->setPos(DEFAULT_FRAMERATE);
+    scrollbar->setSmallStep(1);
+}
+

Function updateToolBox() is called each frame to update dynamic information in the toolbox.

+
void updateToolBox()
+{
+    IGUIEnvironment* env = Device->getGUIEnvironment();
+    IGUIElement* root = env->getRootGUIElement();
+    IGUIElement* dlg = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
+    if (!dlg )
+        return;
+
+    // update the info we have about the animation of the model
+    IGUIStaticText *  aniInfo = (IGUIStaticText *)(dlg->getElementFromId(GUI_ID_ANIMATION_INFO, true));
+    if (aniInfo)
+    {
+        if ( Model && scene::ESNT_ANIMATED_MESH == Model->getType() )
+        {
+            scene::IAnimatedMeshSceneNode* animatedModel = (scene::IAnimatedMeshSceneNode*)Model;
+
+            core::stringw str( (s32)core::round_(animatedModel->getAnimationSpeed()) );
+            str += L" Frame: ";
+            str += core::stringw((s32)animatedModel->getFrameNr());
+            aniInfo->setText(str.c_str());
+        }
+        else
+            aniInfo->setText(L"");
+    }
+}
+
+void onKillFocus()
+{
+    // Avoid that the FPS-camera continues moving when the user presses alt-tab while 
+    // moving the camera. 
+    const core::list<scene::ISceneNodeAnimator*>& animators = Camera[1]->getAnimators();
+    core::list<irr::scene::ISceneNodeAnimator*>::ConstIterator iter = animators.begin();
+    while ( iter != animators.end() )
+    {
+        if ( (*iter)->getType() == scene::ESNAT_CAMERA_FPS )
+        {
+            // we send a key-down event for all keys used by this animator
+            scene::ISceneNodeAnimatorCameraFPS * fpsAnimator = static_cast<scene::ISceneNodeAnimatorCameraFPS*>(*iter);
+            const core::array<SKeyMap>& keyMap = fpsAnimator->getKeyMap();
+            for ( irr::u32 i=0; i< keyMap.size(); ++i )
+            {
+                irr::SEvent event;
+                event.EventType = EET_KEY_INPUT_EVENT;
+                event.KeyInput.Key = keyMap[i].KeyCode;
+                event.KeyInput.PressedDown = false;
+                fpsAnimator->OnEvent(event);
+            }
+        }
+        ++iter;
+    }
+}
+

Function hasModalDialog() checks if we currently have a modal dialog open.

+
bool hasModalDialog()
+{
+    if ( !Device )
+        return false;
+    IGUIEnvironment* env = Device->getGUIEnvironment();
+    IGUIElement * focused = env->getFocus();
+    while ( focused )
+    {
+        if ( focused->isVisible() && focused->hasType(EGUIET_MODAL_SCREEN) )
+            return true;
+        focused = focused->getParent();
+    }
+    return false;
+}
+

To get all the events sent by the GUI Elements, we need to create an event receiver. This one is really simple. If an event occurs, it checks the id of the caller and the event type, and starts an action based on these values. For example, if a menu item with id GUI_ID_OPEN_MODEL was selected, it opens a file-open-dialog.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    virtual bool OnEvent(const SEvent& event)
+    {
+        // Escape swaps Camera Input
+        if (event.EventType == EET_KEY_INPUT_EVENT &&
+            event.KeyInput.PressedDown == false)
+        {
+            if ( OnKeyUp(event.KeyInput.Key) )
+                return true;
+        }
+
+        if (event.EventType == EET_GUI_EVENT)
+        {
+            s32 id = event.GUIEvent.Caller->getID();
+            IGUIEnvironment* env = Device->getGUIEnvironment();
+
+            switch(event.GUIEvent.EventType)
+            {
+            case EGET_MENU_ITEM_SELECTED:
+                    // a menu item was clicked
+                    OnMenuItemSelected( (IGUIContextMenu*)event.GUIEvent.Caller );
+                break;
+
+            case EGET_FILE_SELECTED:
+                {
+                    // load the model file, selected in the file open dialog
+                    IGUIFileOpenDialog* dialog =
+                        (IGUIFileOpenDialog*)event.GUIEvent.Caller;
+                    loadModel(core::stringc(dialog->getFileName()).c_str());
+                }
+                break;
+
+            case EGET_SCROLL_BAR_CHANGED:
+
+                // control skin transparency
+                if (id == GUI_ID_SKIN_TRANSPARENCY)
+                {
+                    const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
+                    setSkinTransparency(pos, env->getSkin());
+                }
+                // control animation speed
+                else if (id == GUI_ID_SKIN_ANIMATION_FPS)
+                {
+                    const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
+                    if (scene::ESNT_ANIMATED_MESH == Model->getType())
+                        ((scene::IAnimatedMeshSceneNode*)Model)->setAnimationSpeed((f32)pos);
+                }
+                break;
+
+            case EGET_COMBO_BOX_CHANGED:
+
+                // control anti-aliasing/filtering
+                if (id == GUI_ID_TEXTUREFILTER)
+                {
+                    OnTextureFilterSelected( (IGUIComboBox*)event.GUIEvent.Caller );
+                }
+                break;
+
+            case EGET_BUTTON_CLICKED:
+
+                switch(id)
+                {
+                case GUI_ID_BUTTON_SET_SCALE:
+                    {
+                        // set scale
+                        gui::IGUIElement* root = env->getRootGUIElement();
+                        core::vector3df scale;
+                        core::stringc s;
+
+                        s = root->getElementFromId(GUI_ID_X_SCALE, true)->getText();
+                        scale.X = (f32)atof(s.c_str());
+                        s = root->getElementFromId(GUI_ID_Y_SCALE, true)->getText();
+                        scale.Y = (f32)atof(s.c_str());
+                        s = root->getElementFromId(GUI_ID_Z_SCALE, true)->getText();
+                        scale.Z = (f32)atof(s.c_str());
+
+                        if (Model)
+                            Model->setScale(scale);
+                        updateScaleInfo(Model);
+                    }
+                    break;
+                case GUI_ID_BUTTON_SCALE_MUL10:
+                    if (Model)
+                        Model->setScale(Model->getScale()*10.f);
+                    updateScaleInfo(Model);
+                    break;
+                case GUI_ID_BUTTON_SCALE_DIV10:
+                    if (Model)
+                        Model->setScale(Model->getScale()*0.1f);
+                    updateScaleInfo(Model);
+                    break;
+                case GUI_ID_BUTTON_OPEN_MODEL:
+                    env->addFileOpenDialog(L"Please select a model file to open");
+                    break;
+                case GUI_ID_BUTTON_SHOW_ABOUT:
+                    showAboutText();
+                    break;
+                case GUI_ID_BUTTON_SHOW_TOOLBOX:
+                    createToolBox();
+                    break;
+                case GUI_ID_BUTTON_SELECT_ARCHIVE:
+                    env->addFileOpenDialog(L"Please select your game archive/directory");
+                    break;
+                }
+
+                break;
+            default:
+                break;
+            }
+        }
+
+        return false;
+    }
+

Handle key-up events

+
    bool OnKeyUp(irr::EKEY_CODE keyCode)
+    {
+        // Don't handle keys if we have a modal dialog open as it would lead 
+        // to unexpected application behaviour for the user.
+        if ( hasModalDialog() )
+            return false;
+        
+        if (keyCode == irr::KEY_ESCAPE)
+        {
+            if (Device)
+            {
+                scene::ICameraSceneNode * camera =
+                    Device->getSceneManager()->getActiveCamera();
+                if (camera)
+                {
+                    camera->setInputReceiverEnabled( !camera->isInputReceiverEnabled() );
+                }
+                return true;
+            }
+        }
+        else if (keyCode == irr::KEY_F1)
+        {
+            if (Device)
+            {
+                IGUIElement* elem = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_POSITION_TEXT);
+                if (elem)
+                    elem->setVisible(!elem->isVisible());
+            }
+        }
+        else if (keyCode == irr::KEY_KEY_M)
+        {
+            if (Device)
+                Device->minimizeWindow();
+        }
+        else if (keyCode == irr::KEY_KEY_L)
+        {
+            UseLight=!UseLight;
+            if (Model)
+            {
+                Model->setMaterialFlag(video::EMF_LIGHTING, UseLight);
+                Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight);
+            }
+        }
+        return false;
+    }
+

Handle "menu item clicked" events.

+
    void OnMenuItemSelected( IGUIContextMenu* menu )
+    {
+        s32 id = menu->getItemCommandId(menu->getSelectedItem());
+        IGUIEnvironment* env = Device->getGUIEnvironment();
+
+        switch(id)
+        {
+        case GUI_ID_OPEN_MODEL: // FilOnButtonSetScalinge -> Open Model
+            env->addFileOpenDialog(L"Please select a model file to open");
+            break;
+        case GUI_ID_SET_MODEL_ARCHIVE: // File -> Set Model Archive
+            env->addFileOpenDialog(L"Please select your game archive/directory");
+            break;
+        case GUI_ID_LOAD_AS_OCTREE: // File -> LoadAsOctree
+            Octree = !Octree;
+            menu->setItemChecked(menu->getSelectedItem(), Octree);
+            break;
+        case GUI_ID_QUIT: // File -> Quit
+            Device->closeDevice();
+            break;
+        case GUI_ID_SKY_BOX_VISIBLE: // View -> Skybox
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            SkyBox->setVisible(!SkyBox->isVisible());
+            break;
+        case GUI_ID_DEBUG_OFF: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem()+1, false);
+            menu->setItemChecked(menu->getSelectedItem()+2, false);
+            menu->setItemChecked(menu->getSelectedItem()+3, false);
+            menu->setItemChecked(menu->getSelectedItem()+4, false);
+            menu->setItemChecked(menu->getSelectedItem()+5, false);
+            menu->setItemChecked(menu->getSelectedItem()+6, false);
+            if (Model)
+                Model->setDebugDataVisible(scene::EDS_OFF);
+            break;
+        case GUI_ID_DEBUG_BOUNDING_BOX: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            if (Model)
+                Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX));
+            break;
+        case GUI_ID_DEBUG_NORMALS: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            if (Model)
+                Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_NORMALS));
+            break;
+        case GUI_ID_DEBUG_SKELETON: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            if (Model)
+                Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_SKELETON));
+            break;
+        case GUI_ID_DEBUG_WIRE_OVERLAY: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            if (Model)
+                Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_MESH_WIRE_OVERLAY));
+            break;
+        case GUI_ID_DEBUG_HALF_TRANSPARENT: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            if (Model)
+                Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_HALF_TRANSPARENCY));
+            break;
+        case GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem()));
+            if (Model)
+                Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX_BUFFERS));
+            break;
+        case GUI_ID_DEBUG_ALL: // View -> Debug Information
+            menu->setItemChecked(menu->getSelectedItem()-1, true);
+            menu->setItemChecked(menu->getSelectedItem()-2, true);
+            menu->setItemChecked(menu->getSelectedItem()-3, true);
+            menu->setItemChecked(menu->getSelectedItem()-4, true);
+            menu->setItemChecked(menu->getSelectedItem()-5, true);
+            menu->setItemChecked(menu->getSelectedItem()-6, true);
+            if (Model)
+                Model->setDebugDataVisible(scene::EDS_FULL);
+            break;
+        case GUI_ID_ABOUT: // Help->About
+            showAboutText();
+            break;
+        case GUI_ID_MODEL_MATERIAL_SOLID: // View -> Material -> Solid
+            if (Model)
+                Model->setMaterialType(video::EMT_SOLID);
+            break;
+        case GUI_ID_MODEL_MATERIAL_TRANSPARENT: // View -> Material -> Transparent
+            if (Model)
+                Model->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+            break;
+        case GUI_ID_MODEL_MATERIAL_REFLECTION: // View -> Material -> Reflection
+            if (Model)
+                Model->setMaterialType(video::EMT_SPHERE_MAP);
+            break;
+
+        case GUI_ID_CAMERA_MAYA:
+            setActiveCamera(Camera[0]);
+            break;
+        case GUI_ID_CAMERA_FIRST_PERSON:
+            setActiveCamera(Camera[1]);
+            break;
+        }
+    }
+

Handle the event that one of the texture-filters was selected in the corresponding combobox.

+
    void OnTextureFilterSelected( IGUIComboBox* combo )
+    {
+        s32 pos = combo->getSelected();
+        switch (pos)
+        {
+            case 0:
+            if (Model)
+            {
+                Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
+                Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false);
+                Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false);
+            }
+            break;
+            case 1:
+            if (Model)
+            {
+                Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, true);
+                Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false);
+            }
+            break;
+            case 2:
+            if (Model)
+            {
+                Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
+                Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, true);
+            }
+            break;
+            case 3:
+            if (Model)
+            {
+                Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, true);
+            }
+            break;
+            case 4:
+            if (Model)
+            {
+                Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false);
+            }
+            break;
+        }
+    }
+};
+

Most of the hard work is done. We only need to create the Irrlicht Engine device and all the buttons, menus and toolbars. We start up the engine as usual, using createDevice(). To make our application catch events, we set our eventreceiver as parameter. As you can see, there is also a call to IrrlichtDevice::setResizeable(). This makes the render window resizeable, which is quite useful for a mesh viewer.

+
int main(int argc, char* argv[])
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device and exit if creation failed
+    MyEventReceiver receiver;
+    Device = createDevice(driverType, core::dimension2d<u32>(800, 600),
+        16, false, false, false, &receiver);
+
+    if (Device == 0)
+        return 1; // could not create selected driver.
+
+    Device->setResizable(true);
+
+    Device->setWindowCaption(L"Irrlicht Engine - Loading...");
+
+    video::IVideoDriver* driver = Device->getVideoDriver();
+    IGUIEnvironment* env = Device->getGUIEnvironment();
+    scene::ISceneManager* smgr = Device->getSceneManager();
+    smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
+
+    driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+    smgr->addLightSceneNode(0, core::vector3df(200,200,200),
+        video::SColorf(1.0f,1.0f,1.0f),2000);
+    smgr->setAmbientLight(video::SColorf(0.3f,0.3f,0.3f));
+    // add our media directory as "search path"
+    Device->getFileSystem()->addFileArchive("../../media/");
+

The next step is to read the configuration file. It is stored in the xml format and looks a little bit like this:

+
+	<?xml version="1.0"?>
+	<config>
+		<startUpModel file="some filename" />
+		<messageText caption="Irrlicht Engine Mesh Viewer">
+			Hello!
+		</messageText>
+	</config>
+	

We need the data stored in there to be written into the global variables StartUpModelFile, MessageText and Caption. This is now done using the Irrlicht Engine integrated XML parser:

+
    // read configuration from xml file
+
+    io::IXMLReader* xml = Device->getFileSystem()->createXMLReader( L"config.xml");
+
+    while(xml && xml->read())
+    {
+        switch(xml->getNodeType())
+        {
+        case io::EXN_TEXT:
+            // in this xml file, the only text which occurs is the
+            // messageText
+            MessageText = xml->getNodeData();
+            break;
+        case io::EXN_ELEMENT:
+            {
+                if (core::stringw("startUpModel") == xml->getNodeName())
+                    StartUpModelFile = xml->getAttributeValue(L"file");
+                else
+                if (core::stringw("messageText") == xml->getNodeName())
+                    Caption = xml->getAttributeValue(L"caption");
+            }
+            break;
+        default:
+            break;
+        }
+    }
+
+    if (xml)
+        xml->drop(); // don't forget to delete the xml reader
+
+    if (argc > 1)
+        StartUpModelFile = argv[1];
+

That wasn't difficult. Now we'll set a nicer font and create the Menu. It is possible to create submenus for every menu item. The call menu->addItem(L"File", -1, true, true); for example adds a new menu Item with the name "File" and the id -1. The following parameter says that the menu item should be enabled, and the last one says, that there should be a submenu. The submenu can now be accessed with menu->getSubMenu(0), because the "File" entry is the menu item with index 0.

+
    // set a nicer font
+
+    IGUISkin* skin = env->getSkin();
+    IGUIFont* font = env->getFont("fonthaettenschweiler.bmp");
+    if (font)
+        skin->setFont(font);
+
+    // create menu
+    gui::IGUIContextMenu* menu = env->addMenu();
+    menu->addItem(L"File", -1, true, true);
+    menu->addItem(L"View", -1, true, true);
+    menu->addItem(L"Camera", -1, true, true);
+    menu->addItem(L"Help", -1, true, true);
+
+    gui::IGUIContextMenu* submenu;
+    submenu = menu->getSubMenu(0);
+    submenu->addItem(L"Open Model File & Texture...", GUI_ID_OPEN_MODEL);
+    submenu->addItem(L"Set Model Archive...", GUI_ID_SET_MODEL_ARCHIVE);
+    submenu->addItem(L"Load as Octree", GUI_ID_LOAD_AS_OCTREE);
+    submenu->addSeparator();
+    submenu->addItem(L"Quit", GUI_ID_QUIT);
+
+    submenu = menu->getSubMenu(1);
+    submenu->addItem(L"sky box visible", GUI_ID_SKY_BOX_VISIBLE, true, false, true);
+    submenu->addItem(L"toggle model debug information", GUI_ID_TOGGLE_DEBUG_INFO, true, true);
+    submenu->addItem(L"model material", -1, true, true );
+
+    submenu = submenu->getSubMenu(1);
+    submenu->addItem(L"Off", GUI_ID_DEBUG_OFF);
+    submenu->addItem(L"Bounding Box", GUI_ID_DEBUG_BOUNDING_BOX);
+    submenu->addItem(L"Normals", GUI_ID_DEBUG_NORMALS);
+    submenu->addItem(L"Skeleton", GUI_ID_DEBUG_SKELETON);
+    submenu->addItem(L"Wire overlay", GUI_ID_DEBUG_WIRE_OVERLAY);
+    submenu->addItem(L"Half-Transparent", GUI_ID_DEBUG_HALF_TRANSPARENT);
+    submenu->addItem(L"Buffers bounding boxes", GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES);
+    submenu->addItem(L"All", GUI_ID_DEBUG_ALL);
+
+    submenu = menu->getSubMenu(1)->getSubMenu(2);
+    submenu->addItem(L"Solid", GUI_ID_MODEL_MATERIAL_SOLID);
+    submenu->addItem(L"Transparent", GUI_ID_MODEL_MATERIAL_TRANSPARENT);
+    submenu->addItem(L"Reflection", GUI_ID_MODEL_MATERIAL_REFLECTION);
+
+    submenu = menu->getSubMenu(2);
+    submenu->addItem(L"Maya Style", GUI_ID_CAMERA_MAYA);
+    submenu->addItem(L"First Person", GUI_ID_CAMERA_FIRST_PERSON);
+
+    submenu = menu->getSubMenu(3);
+    submenu->addItem(L"About", GUI_ID_ABOUT);
+

Below the menu we want a toolbar, onto which we can place colored buttons and important looking stuff like a senseless combobox.

+
    // create toolbar
+
+    gui::IGUIToolBar* bar = env->addToolBar();
+
+    video::ITexture* image = driver->getTexture("open.png");
+    bar->addButton(GUI_ID_BUTTON_OPEN_MODEL, 0, L"Open a model",image, 0, false, true);
+
+    image = driver->getTexture("tools.png");
+    bar->addButton(GUI_ID_BUTTON_SHOW_TOOLBOX, 0, L"Open Toolset",image, 0, false, true);
+
+    image = driver->getTexture("zip.png");
+    bar->addButton(GUI_ID_BUTTON_SELECT_ARCHIVE, 0, L"Set Model Archive",image, 0, false, true);
+
+    image = driver->getTexture("help.png");
+    bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L"Open Help", image, 0, false, true);
+
+    // create a combobox for texture filters
+
+    gui::IGUIComboBox* box = env->addComboBox(core::rect<s32>(250,4,350,23), bar, GUI_ID_TEXTUREFILTER);
+    box->addItem(L"No filtering");
+    box->addItem(L"Bilinear");
+    box->addItem(L"Trilinear");
+    box->addItem(L"Anisotropic");
+    box->addItem(L"Isotropic");
+

To make the editor look a little bit better, we disable transparent gui elements, and add an Irrlicht Engine logo. In addition, a text showing the current frames per second value is created and the window caption is changed.

+
    // disable alpha
+
+    for (s32 i=0; i<gui::EGDC_COUNT ; ++i)
+    {
+        video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
+        col.setAlpha(255);
+        env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col);
+    }
+
+    // add a tabcontrol
+
+    createToolBox();
+
+    // create fps text
+
+    IGUIStaticText* fpstext = env->addStaticText(L"",
+            core::rect<s32>(400,4,570,23), true, false, bar);
+
+    IGUIStaticText* postext = env->addStaticText(L"",
+            core::rect<s32>(10,50,470,80),false, false, 0, GUI_ID_POSITION_TEXT);
+    postext->setVisible(false);
+
+    // set window caption
+
+    Caption += " - [";
+    Caption += driver->getName();
+    Caption += "]";
+    Device->setWindowCaption(Caption.c_str());
+

That's nearly the whole application. We simply show the about message box at start up, and load the first model. To make everything look better, a skybox is created and a user controlled camera, to make the application a little bit more interactive. Finally, everything is drawn in a standard drawing loop.

+
    // show about message box and load default model
+    if (argc==1)
+        showAboutText();
+    loadModel(StartUpModelFile.c_str());
+
+    // add skybox
+
+    SkyBox = smgr->addSkyBoxSceneNode(
+        driver->getTexture("irrlicht2_up.jpg"),
+        driver->getTexture("irrlicht2_dn.jpg"),
+        driver->getTexture("irrlicht2_lf.jpg"),
+        driver->getTexture("irrlicht2_rt.jpg"),
+        driver->getTexture("irrlicht2_ft.jpg"),
+        driver->getTexture("irrlicht2_bk.jpg"));
+
+    // add a camera scene node
+    Camera[0] = smgr->addCameraSceneNodeMaya();
+    Camera[0]->setFarValue(20000.f);
+    // Maya cameras reposition themselves relative to their target, so target the location
+    // where the mesh scene node is placed.
+    Camera[0]->setTarget(core::vector3df(0,30,0));
+
+    Camera[1] = smgr->addCameraSceneNodeFPS();
+    Camera[1]->setFarValue(20000.f);
+    Camera[1]->setPosition(core::vector3df(0,0,-70));
+    Camera[1]->setTarget(core::vector3df(0,30,0));
+
+    setActiveCamera(Camera[0]);
+
+    // load the irrlicht engine logo
+    IGUIImage *img =
+        env->addImage(driver->getTexture("irrlichtlogo2.png"),
+            core::position2d<s32>(10, driver->getScreenSize().Height - 128));
+
+    // lock the logo's edges to the bottom left corner of the screen
+    img->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT,
+            EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT);
+
+    // remember state so we notice when the window does lose the focus
+    bool hasFocus = Device->isWindowFocused();
+
+    // draw everything
+
+    while(Device->run() && driver)
+    {
+        // Catch focus changes (workaround until Irrlicht has events for this)
+        bool focused = Device->isWindowFocused();
+        if ( hasFocus && !focused )
+            onKillFocus();
+        hasFocus = focused;
+
+        if (Device->isWindowActive())
+        {
+            driver->beginScene(true, true, video::SColor(150,50,50,50));
+
+            smgr->drawAll();
+            env->drawAll();
+
+            driver->endScene();
+
+            // update information about current frame-rate
+            core::stringw str(L"FPS: ");
+            str.append(core::stringw(driver->getFPS()));
+            str += L" Tris: ";
+            str.append(core::stringw(driver->getPrimitiveCountDrawn()));
+            fpstext->setText(str.c_str());
+
+            // update information about the active camera
+            scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera();
+            str = L"Pos: ";
+            str.append(core::stringw(cam->getPosition().X));
+            str += L" ";
+            str.append(core::stringw(cam->getPosition().Y));
+            str += L" ";
+            str.append(core::stringw(cam->getPosition().Z));
+            str += L" Tgt: ";
+            str.append(core::stringw(cam->getTarget().X));
+            str += L" ";
+            str.append(core::stringw(cam->getTarget().Y));
+            str += L" ";
+            str.append(core::stringw(cam->getTarget().Z));
+            postext->setText(str.c_str());
+
+            // update the tool dialog
+            updateToolBox();
+        }
+        else
+            Device->yield();
+    }
+
+    Device->drop();
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example010.html b/src/others/irrlicht-1.8.1/doc/html/example010.html new file mode 100644 index 0000000..c74a26c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example010.html @@ -0,0 +1,455 @@ + + + + +Irrlicht 3D Engine: Tutorial 10: Shaders + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 10: Shaders
+
+
+
+010shot.jpg +
+

This tutorial shows how to use shaders for D3D8, D3D9, OpenGL, and Cg with the engine and how to create new material types with them. It also shows how to disable the generation of mipmaps at texture loading, and how to use text scene nodes.

+

This tutorial does not explain how shaders work. I would recommend to read the D3D, OpenGL, or Cg documentation, to search a tutorial, or to read a book about this.

+

At first, we need to include all headers and do the stuff we always do, like in nearly all other tutorials:

+
#include <irrlicht.h>
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

Because we want to use some interesting shaders in this tutorials, we need to set some data for them to make them able to compute nice colors. In this example, we'll use a simple vertex shader which will calculate the color of the vertex based on the position of the camera. For this, the shader needs the following data: The inverted world matrix for transforming the normal, the clip matrix for transforming the position, the camera position and the world position of the object for the calculation of the angle of light, and the color of the light. To be able to tell the shader all this data every frame, we have to derive a class from the IShaderConstantSetCallBack interface and override its only method, namely OnSetConstants(). This method will be called every time the material is set. The method setVertexShaderConstant() of the IMaterialRendererServices interface is used to set the data the shader needs. If the user chose to use a High Level shader language like HLSL instead of Assembler in this example, you have to set the variable name as parameter instead of the register index.

+
IrrlichtDevice* device = 0;
+bool UseHighLevelShaders = false;
+bool UseCgShaders = false;
+
+class MyShaderCallBack : public video::IShaderConstantSetCallBack
+{
+public:
+
+    virtual void OnSetConstants(video::IMaterialRendererServices* services,
+            s32 userData)
+    {
+        video::IVideoDriver* driver = services->getVideoDriver();
+
+        // set inverted world matrix
+        // if we are using highlevel shaders (the user can select this when
+        // starting the program), we must set the constants by name.
+
+        core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
+        invWorld.makeInverse();
+
+        if (UseHighLevelShaders)
+            services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
+        else
+            services->setVertexShaderConstant(invWorld.pointer(), 0, 4);
+
+        // set clip matrix
+
+        core::matrix4 worldViewProj;
+        worldViewProj = driver->getTransform(video::ETS_PROJECTION);
+        worldViewProj *= driver->getTransform(video::ETS_VIEW);
+        worldViewProj *= driver->getTransform(video::ETS_WORLD);
+
+        if (UseHighLevelShaders)
+            services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16);
+        else
+            services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);
+
+        // set camera position
+
+        core::vector3df pos = device->getSceneManager()->
+            getActiveCamera()->getAbsolutePosition();
+
+        if (UseHighLevelShaders)
+            services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3);
+        else
+            services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1);
+
+        // set light color
+
+        video::SColorf col(0.0f,1.0f,1.0f,0.0f);
+
+        if (UseHighLevelShaders)
+            services->setVertexShaderConstant("mLightColor",
+                    reinterpret_cast<f32*>(&col), 4);
+        else
+            services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);
+
+        // set transposed world matrix
+
+        core::matrix4 world = driver->getTransform(video::ETS_WORLD);
+        world = world.getTransposed();
+
+        if (UseHighLevelShaders)
+        {
+            services->setVertexShaderConstant("mTransWorld", world.pointer(), 16);
+
+            // set texture, for textures you can use both an int and a float setPixelShaderConstant interfaces (You need it only for an OpenGL driver).
+            s32 TextureLayerID = 0;
+            if (UseHighLevelShaders)
+                services->setPixelShaderConstant("myTexture", &TextureLayerID, 1);
+        }
+        else
+            services->setVertexShaderConstant(world.pointer(), 10, 4);
+    }
+};
+

The next few lines start up the engine just like in most other tutorials before. But in addition, we ask the user if he wants to use high level shaders in this example, if he selected a driver which is capable of doing so.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // ask the user if we should use high level shaders for this example
+    if (driverType == video::EDT_DIRECT3D9 ||
+         driverType == video::EDT_OPENGL)
+    {
+        char i;
+        printf("Please press 'y' if you want to use high level shaders.\n");
+        std::cin >> i;
+        if (i == 'y')
+        {
+            UseHighLevelShaders = true;
+            printf("Please press 'y' if you want to use Cg shaders.\n");
+            std::cin >> i;
+            if (i == 'y')
+                UseCgShaders = true;
+        }
+    }
+
+    // create device
+    device = createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* gui = device->getGUIEnvironment();
+
+    // Make sure we don't try Cg without support for it
+    if (UseCgShaders && !driver->queryFeature(video::EVDF_CG))
+    {
+        printf("Warning: No Cg support, disabling.\n");
+        UseCgShaders=false;
+    }
+

Now for the more interesting parts. If we are using Direct3D, we want to load vertex and pixel shader programs, if we have OpenGL, we want to use ARB fragment and vertex programs. I wrote the corresponding programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, d3d9.vs, opengl.ps and opengl.vs. We only need the right filenames now. This is done in the following switch. Note, that it is not necessary to write the shaders into text files, like in this example. You can even write the shaders directly as strings into the cpp source file, and use later addShaderMaterial() instead of addShaderMaterialFromFiles().

+
    io::path vsFileName; // filename for the vertex shader
+    io::path psFileName; // filename for the pixel shader
+
+    switch(driverType)
+    {
+    case video::EDT_DIRECT3D8:
+        psFileName = "../../media/d3d8.psh";
+        vsFileName = "../../media/d3d8.vsh";
+        break;
+    case video::EDT_DIRECT3D9:
+        if (UseHighLevelShaders)
+        {
+            // Cg can also handle this syntax
+            psFileName = "../../media/d3d9.hlsl";
+            vsFileName = psFileName; // both shaders are in the same file
+        }
+        else
+        {
+            psFileName = "../../media/d3d9.psh";
+            vsFileName = "../../media/d3d9.vsh";
+        }
+        break;
+
+    case video::EDT_OPENGL:
+        if (UseHighLevelShaders)
+        {
+            if (!UseCgShaders)
+            {
+                psFileName = "../../media/opengl.frag";
+                vsFileName = "../../media/opengl.vert";
+            }
+            else
+            {
+                // Use HLSL syntax for Cg
+                psFileName = "../../media/d3d9.hlsl";
+                vsFileName = psFileName; // both shaders are in the same file
+            }
+        }
+        else
+        {
+            psFileName = "../../media/opengl.psh";
+            vsFileName = "../../media/opengl.vsh";
+        }
+        break;
+    }
+

In addition, we check if the hardware and the selected renderer is capable of executing the shaders we want. If not, we simply set the filename string to 0. This is not necessary, but useful in this example: For example, if the hardware is able to execute vertex shaders but not pixel shaders, we create a new material which only uses the vertex shader, and no pixel shader. Otherwise, if we would tell the engine to create this material and the engine sees that the hardware wouldn't be able to fulfill the request completely, it would not create any new material at all. So in this example you would see at least the vertex shader in action, without the pixel shader.

+
    if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&
+        !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))
+    {
+        device->getLogger()->log("WARNING: Pixel shaders disabled "\
+            "because of missing driver/hardware support.");
+        psFileName = "";
+    }
+
+    if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&
+        !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))
+    {
+        device->getLogger()->log("WARNING: Vertex shaders disabled "\
+            "because of missing driver/hardware support.");
+        vsFileName = "";
+    }
+

Now lets create the new materials. As you maybe know from previous examples, a material type in the Irrlicht engine is set by simply changing the MaterialType value in the SMaterial struct. And this value is just a simple 32 bit value, like video::EMT_SOLID. So we only need the engine to create a new value for us which we can set there. To do this, we get a pointer to the IGPUProgrammingServices and call addShaderMaterialFromFiles(), which returns such a new 32 bit value. That's all.

+

The parameters to this method are the following: First, the names of the files containing the code of the vertex and the pixel shader. If you would use addShaderMaterial() instead, you would not need file names, then you could write the code of the shader directly as string. The following parameter is a pointer to the IShaderConstantSetCallBack class we wrote at the beginning of this tutorial. If you don't want to set constants, set this to 0. The last parameter tells the engine which material it should use as base material.

+

To demonstrate this, we create two materials with a different base material, one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR.

+
    // create materials
+
+    video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();
+    s32 newMaterialType1 = 0;
+    s32 newMaterialType2 = 0;
+
+    if (gpu)
+    {
+        MyShaderCallBack* mc = new MyShaderCallBack();
+
+        // create the shaders depending on if the user wanted high level
+        // or low level shaders:
+
+        if (UseHighLevelShaders)
+        {
+            // Choose the desired shader type. Default is the native
+            // shader type for the driver, for Cg pass the special
+            // enum value EGSL_CG
+            const video::E_GPU_SHADING_LANGUAGE shadingLanguage =
+                UseCgShaders ? video::EGSL_CG:video::EGSL_DEFAULT;
+
+            // create material from high level shaders (hlsl, glsl or cg)
+
+            newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(
+                vsFileName, "vertexMain", video::EVST_VS_1_1,
+                psFileName, "pixelMain", video::EPST_PS_1_1,
+                mc, video::EMT_SOLID, 0, shadingLanguage);
+
+            newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(
+                vsFileName, "vertexMain", video::EVST_VS_1_1,
+                psFileName, "pixelMain", video::EPST_PS_1_1,
+                mc, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage);
+        }
+        else
+        {
+            // create material from low level shaders (asm or arb_asm)
+
+            newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName,
+                psFileName, mc, video::EMT_SOLID);
+
+            newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName,
+                psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR);
+        }
+
+        mc->drop();
+    }
+

Now it's time for testing the materials. We create a test cube and set the material we created. In addition, we add a text scene node to the cube and a rotation animator to make it look more interesting and important.

+
    // create test scene node 1, with the new created material type 1
+
+    scene::ISceneNode* node = smgr->addCubeSceneNode(50);
+    node->setPosition(core::vector3df(0,0,0));
+    node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+    node->setMaterialFlag(video::EMF_LIGHTING, false);
+    node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1);
+
+    smgr->addTextSceneNode(gui->getBuiltInFont(),
+            L"PS & VS & EMT_SOLID",
+            video::SColor(255,255,255,255), node);
+
+    scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(
+            core::vector3df(0,0.3f,0));
+    node->addAnimator(anim);
+    anim->drop();
+

Same for the second cube, but with the second material we created.

+
    // create test scene node 2, with the new created material type 2
+
+    node = smgr->addCubeSceneNode(50);
+    node->setPosition(core::vector3df(0,-10,50));
+    node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+    node->setMaterialFlag(video::EMF_LIGHTING, false);
+    node->setMaterialFlag(video::EMF_BLEND_OPERATION, true);
+    node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2);
+
+    smgr->addTextSceneNode(gui->getBuiltInFont(),
+            L"PS & VS & EMT_TRANSPARENT",
+            video::SColor(255,255,255,255), node);
+
+    anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0));
+    node->addAnimator(anim);
+    anim->drop();
+

Then we add a third cube without a shader on it, to be able to compare the cubes.

+
    // add a scene node with no shader
+
+    node = smgr->addCubeSceneNode(50);
+    node->setPosition(core::vector3df(0,50,25));
+    node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+    node->setMaterialFlag(video::EMF_LIGHTING, false);
+    smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER",
+        video::SColor(255,255,255,255), node);
+

And last, we add a skybox and a user controlled camera to the scene. For the skybox textures, we disable mipmap generation, because we don't need mipmaps on it.

+
    // add a nice skybox
+
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+    smgr->addSkyBoxSceneNode(
+        driver->getTexture("../../media/irrlicht2_up.jpg"),
+        driver->getTexture("../../media/irrlicht2_dn.jpg"),
+        driver->getTexture("../../media/irrlicht2_lf.jpg"),
+        driver->getTexture("../../media/irrlicht2_rt.jpg"),
+        driver->getTexture("../../media/irrlicht2_ft.jpg"),
+        driver->getTexture("../../media/irrlicht2_bk.jpg"));
+
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+    // add a camera and disable the mouse cursor
+
+    scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();
+    cam->setPosition(core::vector3df(-100,50,100));
+    cam->setTarget(core::vector3df(0,0,0));
+    device->getCursorControl()->setVisible(false);
+

Now draw everything. That's all.

+
    int lastFPS = -1;
+
+    while(device->run())
+        if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, video::SColor(255,0,0,0));
+        smgr->drawAll();
+        driver->endScene();
+
+        int fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+
+    device->drop();
+
+    return 0;
+}
+

Compile and run this, and I hope you have fun with your new little shader writing tool :).

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example011.html b/src/others/irrlicht-1.8.1/doc/html/example011.html new file mode 100644 index 0000000..bc1c8ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example011.html @@ -0,0 +1,483 @@ + + + + +Irrlicht 3D Engine: Tutorial 11: Per-Pixel Lighting + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 11: Per-Pixel Lighting
+
+
+
+011shot.jpg +
+

This tutorial shows how to use one of the built in more complex materials in irrlicht: Per pixel lighted surfaces using normal maps and parallax mapping. It will also show how to use fog and moving particle systems. And don't panic: You do not need any experience with shaders to use these materials in Irrlicht.

+

At first, we need to include all headers and do the stuff we always do, like in nearly all other tutorials.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

For this example, we need an event receiver, to make it possible for the user to switch between the three available material types. In addition, the event receiver will create some small GUI window which displays what material is currently being used. There is nothing special done in this class, so maybe you want to skip reading it.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+
+    MyEventReceiver(scene::ISceneNode* room,scene::ISceneNode* earth,
+        gui::IGUIEnvironment* env, video::IVideoDriver* driver)
+    {
+        // store pointer to room so we can change its drawing mode
+        Room = room;
+        Earth = earth;
+        Driver = driver;
+
+        // set a nicer font
+        gui::IGUISkin* skin = env->getSkin();
+        gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+        if (font)
+            skin->setFont(font);
+
+        // add window and listbox
+        gui::IGUIWindow* window = env->addWindow(
+            core::rect<s32>(460,375,630,470), false, L"Use 'E' + 'R' to change");
+
+        ListBox = env->addListBox(
+            core::rect<s32>(2,22,165,88), window);
+
+        ListBox->addItem(L"Diffuse");
+        ListBox->addItem(L"Bump mapping");
+        ListBox->addItem(L"Parallax mapping");
+        ListBox->setSelected(1);
+
+        // create problem text
+        ProblemText = env->addStaticText(
+            L"Your hardware or this renderer is not able to use the "\
+            L"needed shaders for this material. Using fall back materials.",
+            core::rect<s32>(150,20,470,80));
+
+        ProblemText->setOverrideColor(video::SColor(100,255,255,255));
+
+        // set start material (prefer parallax mapping if available)
+        video::IMaterialRenderer* renderer =
+            Driver->getMaterialRenderer(video::EMT_PARALLAX_MAP_SOLID);
+        if (renderer && renderer->getRenderCapability() == 0)
+            ListBox->setSelected(2);
+
+        // set the material which is selected in the listbox
+        setMaterial();
+    }
+
+    bool OnEvent(const SEvent& event)
+    {
+        // check if user presses the key 'E' or 'R'
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT &&
+            !event.KeyInput.PressedDown && Room && ListBox)
+        {
+            // change selected item in listbox
+
+            int sel = ListBox->getSelected();
+            if (event.KeyInput.Key == irr::KEY_KEY_R)
+                ++sel;
+            else
+            if (event.KeyInput.Key == irr::KEY_KEY_E)
+                --sel;
+            else
+                return false;
+
+            if (sel > 2) sel = 0;
+            if (sel < 0) sel = 2;
+            ListBox->setSelected(sel);
+
+            // set the material which is selected in the listbox
+            setMaterial();
+        }
+
+        return false;
+    }
+
+private:
+
+    // sets the material of the room mesh the the one set in the
+    // list box.
+    void setMaterial()
+    {
+        video::E_MATERIAL_TYPE type = video::EMT_SOLID;
+
+        // change material setting
+        switch(ListBox->getSelected())
+        {
+        case 0: type = video::EMT_SOLID;
+            break;
+        case 1: type = video::EMT_NORMAL_MAP_SOLID;
+            break;
+        case 2: type = video::EMT_PARALLAX_MAP_SOLID;
+            break;
+        }
+
+        Room->setMaterialType(type);
+
+        // change material setting
+        switch(ListBox->getSelected())
+        {
+        case 0: type = video::EMT_TRANSPARENT_VERTEX_ALPHA;
+            break;
+        case 1: type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA;
+            break;
+        case 2: type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA;
+            break;
+        }
+
+        Earth->setMaterialType(type);
+

We need to add a warning if the materials will not be able to be displayed 100% correctly. This is no problem, they will be rendered using fall back materials, but at least the user should know that it would look better on better hardware. We simply check if the material renderer is able to draw at full quality on the current hardware. The IMaterialRenderer::getRenderCapability() returns 0 if this is the case.

+
        video::IMaterialRenderer* renderer = Driver->getMaterialRenderer(type);
+
+        // display some problem text when problem
+        if (!renderer || renderer->getRenderCapability() != 0)
+            ProblemText->setVisible(true);
+        else
+            ProblemText->setVisible(false);
+    }
+
+private:
+
+    gui::IGUIStaticText* ProblemText;
+    gui::IGUIListBox* ListBox;
+
+    scene::ISceneNode* Room;
+    scene::ISceneNode* Earth;
+    video::IVideoDriver* Driver;
+};
+

Now for the real fun. We create an Irrlicht Device and start to setup the scene.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+
+    IrrlichtDevice* device = createDevice(driverType,
+            core::dimension2d<u32>(640, 480));
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+

Before we start with the interesting stuff, we do some simple things: Store pointers to the most important parts of the engine (video driver, scene manager, gui environment) to safe us from typing too much, add an irrlicht engine logo to the window and a user controlled first person shooter style camera. Also, we let the engine know that it should store all textures in 32 bit. This necessary because for parallax mapping, we need 32 bit textures.

+
    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+    driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+    // add irrlicht logo
+    env->addImage(driver->getTexture("../../media/irrlichtlogo3.png"),
+        core::position2d<s32>(10,10));
+
+    // add camera
+    scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+    camera->setPosition(core::vector3df(-200,200,-200));
+
+    // disable mouse cursor
+    device->getCursorControl()->setVisible(false);
+

Because we want the whole scene to look a little bit scarier, we add some fog to it. This is done by a call to IVideoDriver::setFog(). There you can set various fog settings. In this example, we use pixel fog, because it will work well with the materials we'll use in this example. Please note that you will have to set the material flag EMF_FOG_ENABLE to 'true' in every scene node which should be affected by this fog.

+
    driver->setFog(video::SColor(0,138,125,81), video::EFT_FOG_LINEAR, 250, 1000, .003f, true, false);
+

To be able to display something interesting, we load a mesh from a .3ds file which is a room I modeled with anim8or. It is the same room as from the specialFX example. Maybe you remember from that tutorial, I am no good modeler at all and so I totally messed up the texture mapping in this model, but we can simply repair it with the IMeshManipulator::makePlanarTextureMapping() method.

+
    scene::IAnimatedMesh* roomMesh = smgr->getMesh("../../media/room.3ds");
+    scene::ISceneNode* room = 0;
+    scene::ISceneNode* earth = 0;
+
+    if (roomMesh)
+    {
+        // The Room mesh doesn't have proper Texture Mapping on the
+        // floor, so we can recreate them on runtime
+        smgr->getMeshManipulator()->makePlanarTextureMapping(
+                roomMesh->getMesh(0), 0.003f);
+

Now for the first exciting thing: If we successfully loaded the mesh we need to apply textures to it. Because we want this room to be displayed with a very cool material, we have to do a little bit more than just set the textures. Instead of only loading a color map as usual, we also load a height map which is simply a grayscale texture. From this height map, we create a normal map which we will set as second texture of the room. If you already have a normal map, you could directly set it, but I simply didn't find a nice normal map for this texture. The normal map texture is being generated by the makeNormalMapTexture method of the VideoDriver. The second parameter specifies the height of the heightmap. If you set it to a bigger value, the map will look more rocky.

+
        video::ITexture* normalMap =
+            driver->getTexture("../../media/rockwall_height.bmp");
+
+        if (normalMap)
+            driver->makeNormalMapTexture(normalMap, 9.0f);
+

The Normal Map and the displacement map/height map in the alpha channel video::ITexture* normalMap = driver->getTexture("../../media/rockwall_NRM.tga");

+

But just setting color and normal map is not everything. The material we want to use needs some additional informations per vertex like tangents and binormals. Because we are too lazy to calculate that information now, we let Irrlicht do this for us. That's why we call IMeshManipulator::createMeshWithTangents(). It creates a mesh copy with tangents and binormals from another mesh. After we've done that, we simply create a standard mesh scene node with this mesh copy, set color and normal map and adjust some other material settings. Note that we set EMF_FOG_ENABLE to true to enable fog in the room.

+
        scene::IMesh* tangentMesh = smgr->getMeshManipulator()->
+                createMeshWithTangents(roomMesh->getMesh(0));
+
+        room = smgr->addMeshSceneNode(tangentMesh);
+        room->setMaterialTexture(0,
+                driver->getTexture("../../media/rockwall.jpg"));
+        room->setMaterialTexture(1, normalMap);
+
+        // Stones don't glitter..
+        room->getMaterial(0).SpecularColor.set(0,0,0,0);
+        room->getMaterial(0).Shininess = 0.f;
+
+        room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
+        room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
+        // adjust height for parallax effect
+        room->getMaterial(0).MaterialTypeParam = 1.f / 64.f;
+
+        // drop mesh because we created it with a create.. call.
+        tangentMesh->drop();
+    }
+

After we've created a room shaded by per pixel lighting, we add a sphere into it with the same material, but we'll make it transparent. In addition, because the sphere looks somehow like a familiar planet, we make it rotate. The procedure is similar as before. The difference is that we are loading the mesh from an .x file which already contains a color map so we do not need to load it manually. But the sphere is a little bit too small for our needs, so we scale it by the factor 50.

+
    // add earth sphere
+
+    scene::IAnimatedMesh* earthMesh = smgr->getMesh("../../media/earth.x");
+    if (earthMesh)
+    {
+        //perform various task with the mesh manipulator
+        scene::IMeshManipulator *manipulator = smgr->getMeshManipulator();
+
+        // create mesh copy with tangent informations from original earth.x mesh
+        scene::IMesh* tangentSphereMesh =
+            manipulator->createMeshWithTangents(earthMesh->getMesh(0));
+
+        // set the alpha value of all vertices to 200
+        manipulator->setVertexColorAlpha(tangentSphereMesh, 200);
+
+        // scale the mesh by factor 50
+        core::matrix4 m;
+        m.setScale ( core::vector3df(50,50,50) );
+        manipulator->transform( tangentSphereMesh, m );
+
+        earth = smgr->addMeshSceneNode(tangentSphereMesh);
+
+        earth->setPosition(core::vector3df(-70,130,45));
+
+        // load heightmap, create normal map from it and set it
+        video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg");
+        if (earthNormalMap)
+        {
+            driver->makeNormalMapTexture(earthNormalMap, 20.0f);
+            earth->setMaterialTexture(1, earthNormalMap);
+            earth->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);
+        }
+
+        // adjust material settings
+        earth->setMaterialFlag(video::EMF_FOG_ENABLE, true);
+
+        // add rotation animator
+        scene::ISceneNodeAnimator* anim =
+            smgr->createRotationAnimator(core::vector3df(0,0.1f,0));
+        earth->addAnimator(anim);
+        anim->drop();
+
+        // drop mesh because we created it with a create.. call.
+        tangentSphereMesh->drop();
+    }
+

Per pixel lighted materials only look cool when there are moving lights. So we add some. And because moving lights alone are so boring, we add billboards to them, and a whole particle system to one of them. We start with the first light which is red and has only the billboard attached.

+
    // add light 1 (more green)
+    scene::ILightSceneNode* light1 =
+        smgr->addLightSceneNode(0, core::vector3df(0,0,0),
+        video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);
+
+    light1->setDebugDataVisible ( scene::EDS_BBOX );
+
+
+    // add fly circle animator to light 1
+    scene::ISceneNodeAnimator* anim =
+        smgr->createFlyCircleAnimator (core::vector3df(50,300,0),190.0f, -0.003f);
+    light1->addAnimator(anim);
+    anim->drop();
+
+    // attach billboard to the light
+    scene::IBillboardSceneNode* bill =
+        smgr->addBillboardSceneNode(light1, core::dimension2d<f32>(60, 60));
+
+    bill->setMaterialFlag(video::EMF_LIGHTING, false);
+    bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+    bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+    bill->setMaterialTexture(0, driver->getTexture("../../media/particlegreen.jpg"));
+

Now the same again, with the second light. The difference is that we add a particle system to it too. And because the light moves, the particles of the particlesystem will follow. If you want to know more about how particle systems are created in Irrlicht, take a look at the specialFx example. Maybe you will have noticed that we only add 2 lights, this has a simple reason: The low end version of this material was written in ps1.1 and vs1.1, which doesn't allow more lights. You could add a third light to the scene, but it won't be used to shade the walls. But of course, this will change in future versions of Irrlicht where higher versions of pixel/vertex shaders will be implemented too.

+
    // add light 2 (red)
+    scene::ISceneNode* light2 =
+        smgr->addLightSceneNode(0, core::vector3df(0,0,0),
+        video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);
+
+    // add fly circle animator to light 2
+    anim = smgr->createFlyCircleAnimator(core::vector3df(0,150,0), 200.0f,
+            0.001f, core::vector3df(0.2f, 0.9f, 0.f));
+    light2->addAnimator(anim);
+    anim->drop();
+
+    // attach billboard to light
+    bill = smgr->addBillboardSceneNode(light2, core::dimension2d<f32>(120, 120));
+    bill->setMaterialFlag(video::EMF_LIGHTING, false);
+    bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+    bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+    bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
+
+    // add particle system
+    scene::IParticleSystemSceneNode* ps =
+        smgr->addParticleSystemSceneNode(false, light2);
+
+    // create and set emitter
+    scene::IParticleEmitter* em = ps->createBoxEmitter(
+        core::aabbox3d<f32>(-3,0,-3,3,1,3),
+        core::vector3df(0.0f,0.03f,0.0f),
+        80,100,
+        video::SColor(10,255,255,255), video::SColor(10,255,255,255),
+        400,1100);
+    em->setMinStartSize(core::dimension2d<f32>(30.0f, 40.0f));
+    em->setMaxStartSize(core::dimension2d<f32>(30.0f, 40.0f));
+
+    ps->setEmitter(em);
+    em->drop();
+
+    // create and set affector
+    scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();
+    ps->addAffector(paf);
+    paf->drop();
+
+    // adjust some material settings
+    ps->setMaterialFlag(video::EMF_LIGHTING, false);
+    ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+    ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
+    ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+
+    MyEventReceiver receiver(room, earth, env, driver);
+    device->setEventReceiver(&receiver);
+

Finally, draw everything. That's it.

+
    int lastFPS = -1;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, 0);
+
+        smgr->drawAll();
+        env->drawAll();
+
+        driver->endScene();
+
+        int fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Per pixel lighting example - Irrlicht Engine [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+
+    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example012.html b/src/others/irrlicht-1.8.1/doc/html/example012.html new file mode 100644 index 0000000..816ec16 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example012.html @@ -0,0 +1,339 @@ + + + + +Irrlicht 3D Engine: Tutorial 12: Terrain Rendering + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 12: Terrain Rendering
+
+
+
+012shot.jpg +
+

This tutorial will briefly show how to use the terrain renderer of Irrlicht. It will also show the terrain renderer triangle selector to be able to do collision detection with terrain.

+

Note that the Terrain Renderer in Irrlicht is based on Spintz' GeoMipMapSceneNode, lots of thanks go to him. DeusXL provided a new elegant simple solution for building larger area on small heightmaps -> terrain smoothing.

+

In the beginning there is nothing special. We include the needed header files and create an event listener to listen if the user presses a key: The 'W' key switches to wireframe mode, the 'P' key to pointcloud mode, and the 'D' key toggles between solid and detail mapped material.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+
+class MyEventReceiver : public IEventReceiver
+{
+public:
+
+    MyEventReceiver(scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) :
+        Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true), showDebug(false)
+    {
+        Skybox->setVisible(showBox);
+        Skydome->setVisible(!showBox);
+    }
+
+    bool OnEvent(const SEvent& event)
+    {
+        // check if user presses the key 'W' or 'D'
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
+        {
+            switch (event.KeyInput.Key)
+            {
+            case irr::KEY_KEY_W: // switch wire frame mode
+                Terrain->setMaterialFlag(video::EMF_WIREFRAME,
+                        !Terrain->getMaterial(0).Wireframe);
+                Terrain->setMaterialFlag(video::EMF_POINTCLOUD, false);
+                return true;
+            case irr::KEY_KEY_P: // switch wire frame mode
+                Terrain->setMaterialFlag(video::EMF_POINTCLOUD,
+                        !Terrain->getMaterial(0).PointCloud);
+                Terrain->setMaterialFlag(video::EMF_WIREFRAME, false);
+                return true;
+            case irr::KEY_KEY_D: // toggle detail map
+                Terrain->setMaterialType(
+                    Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?
+                    video::EMT_DETAIL_MAP : video::EMT_SOLID);
+                return true;
+            case irr::KEY_KEY_S: // toggle skies
+                showBox=!showBox;
+                Skybox->setVisible(showBox);
+                Skydome->setVisible(!showBox);
+                return true;
+            case irr::KEY_KEY_X: // toggle debug information
+                showDebug=!showDebug;
+                Terrain->setDebugDataVisible(showDebug?scene::EDS_BBOX_ALL:scene::EDS_OFF);
+                return true;
+            default:
+                break;
+            }
+        }
+
+        return false;
+    }
+
+private:
+    scene::ISceneNode* Terrain;
+    scene::ISceneNode* Skybox;
+    scene::ISceneNode* Skydome;
+    bool showBox;
+    bool showDebug;
+};
+

The start of the main function starts like in most other example. We ask the user for the desired renderer and start it up. This time with the advanced parameter handling.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device with full flexibility over creation parameters
+    // you can add more parameters if desired, check irr::SIrrlichtCreationParameters
+    irr::SIrrlichtCreationParameters params;
+    params.DriverType=driverType;
+    params.WindowSize=core::dimension2d<u32>(640, 480);
+    IrrlichtDevice* device = createDeviceEx(params);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+

First, we add standard stuff to the scene: A nice irrlicht engine logo, a small help text, a user controlled camera, and we disable the mouse cursor.

+
    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+    driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+    // add irrlicht logo
+    env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+        core::position2d<s32>(10,10));
+
+    //set other font
+    env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));
+
+    // add some help text
+    env->addStaticText(
+        L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome",
+        core::rect<s32>(10,421,250,475), true, true, 0, -1, true);
+
+    // add camera
+    scene::ICameraSceneNode* camera =
+        smgr->addCameraSceneNodeFPS(0,100.0f,1.2f);
+
+    camera->setPosition(core::vector3df(2700*2,255*2,2600*2));
+    camera->setTarget(core::vector3df(2397*2,343*2,2700*2));
+    camera->setFarValue(42000.0f);
+
+    // disable mouse cursor
+    device->getCursorControl()->setVisible(false);
+

Here comes the terrain renderer scene node: We add it just like any other scene node to the scene using ISceneManager::addTerrainSceneNode(). The only parameter we use is a file name to the heightmap we use. A heightmap is simply a gray scale texture. The terrain renderer loads it and creates the 3D terrain from it.

+

To make the terrain look more big, we change the scale factor of it to (40, 4.4, 40). Because we don't have any dynamic lights in the scene, we switch off the lighting, and we set the file terrain-texture.jpg as texture for the terrain and detailmap3.jpg as second texture, called detail map. At last, we set the scale values for the texture: The first texture will be repeated only one time over the whole terrain, and the second one (detail map) 20 times.

+
    // add terrain scene node
+    scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(
+        "../../media/terrain-heightmap.bmp",
+        0,                  // parent node
+        -1,                 // node id
+        core::vector3df(0.f, 0.f, 0.f),     // position
+        core::vector3df(0.f, 0.f, 0.f),     // rotation
+        core::vector3df(40.f, 4.4f, 40.f),  // scale
+        video::SColor ( 255, 255, 255, 255 ),   // vertexColor
+        5,                  // maxLOD
+        scene::ETPS_17,             // patchSize
+        4                   // smoothFactor
+        );
+
+    terrain->setMaterialFlag(video::EMF_LIGHTING, false);
+
+    terrain->setMaterialTexture(0,
+            driver->getTexture("../../media/terrain-texture.jpg"));
+    terrain->setMaterialTexture(1,
+            driver->getTexture("../../media/detailmap3.jpg"));
+    
+    terrain->setMaterialType(video::EMT_DETAIL_MAP);
+
+    terrain->scaleTexture(1.0f, 20.0f);
+

To be able to do collision with the terrain, we create a triangle selector. If you want to know what triangle selectors do, just take a look into the collision tutorial. The terrain triangle selector works together with the terrain. To demonstrate this, we create a collision response animator and attach it to the camera, so that the camera will not be able to fly through the terrain.

+
    // create triangle selector for the terrain 
+    scene::ITriangleSelector* selector
+        = smgr->createTerrainTriangleSelector(terrain, 0);
+    terrain->setTriangleSelector(selector);
+
+    // create collision response animator and attach it to the camera
+    scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+        selector, camera, core::vector3df(60,100,60),
+        core::vector3df(0,0,0),
+        core::vector3df(0,50,0));
+    selector->drop();
+    camera->addAnimator(anim);
+    anim->drop();
+

If you need access to the terrain data you can also do this directly via the following code fragment.

+
    scene::CDynamicMeshBuffer* buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);
+    terrain->getMeshBufferForLOD(*buffer, 0);
+    video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();
+    // Work on data or get the IndexBuffer with a similar call.
+    buffer->drop(); // When done drop the buffer again.
+

To make the user be able to switch between normal and wireframe mode, we create an instance of the event receiver from above and let Irrlicht know about it. In addition, we add the skybox which we already used in lots of Irrlicht examples and a skydome, which is shown mutually exclusive with the skybox by pressing 'S'.

+
    // create skybox and skydome
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+    scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode(
+        driver->getTexture("../../media/irrlicht2_up.jpg"),
+        driver->getTexture("../../media/irrlicht2_dn.jpg"),
+        driver->getTexture("../../media/irrlicht2_lf.jpg"),
+        driver->getTexture("../../media/irrlicht2_rt.jpg"),
+        driver->getTexture("../../media/irrlicht2_ft.jpg"),
+        driver->getTexture("../../media/irrlicht2_bk.jpg"));
+    scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture("../../media/skydome.jpg"),16,8,0.95f,2.0f);
+
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+    // create event receiver
+    MyEventReceiver receiver(terrain, skybox, skydome);
+    device->setEventReceiver(&receiver);
+

That's it, draw everything.

+
    int lastFPS = -1;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, 0 );
+
+        smgr->drawAll();
+        env->drawAll();
+
+        driver->endScene();
+
+        // display frames per second in window title
+        int fps = driver->getFPS();
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Terrain Renderer - Irrlicht Engine [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+            // Also print terrain height of current camera position
+            // We can use camera position because terrain is located at coordinate origin
+            str += " Height: ";
+            str += terrain->getHeight(camera->getAbsolutePosition().X,
+                    camera->getAbsolutePosition().Z);
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+
+    device->drop();
+    
+    return 0;
+}
+

Now you know how to use terrain in Irrlicht.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example013.html b/src/others/irrlicht-1.8.1/doc/html/example013.html new file mode 100644 index 0000000..e78e101 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example013.html @@ -0,0 +1,279 @@ + + + + +Irrlicht 3D Engine: Tutorial 13: Render To Texture + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 13: Render To Texture
+
+
+
+013shot.jpg +
+

This tutorial shows how to render to a texture using Irrlicht. Render to texture is a feature with which it is possible to create nice special effects. In addition, this tutorial shows how to enable specular highlights.

+

In the beginning, everything as usual. Include the needed headers, ask the user for the rendering driver, create the Irrlicht Device:

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device and exit if creation failed
+
+    IrrlichtDevice *device =
+        createDevice(driverType, core::dimension2d<u32>(640, 480),
+        16, false, false);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* env = device->getGUIEnvironment();
+

Now, we load an animated mesh to be displayed. As in most examples, we'll take the fairy md2 model. The difference here: We set the shininess of the model to a value other than 0 which is the default value. This enables specular highlights on the model if dynamic lighting is on. The value influences the size of the highlights.

+
    // load and display animated fairy mesh
+
+    scene::IAnimatedMeshSceneNode* fairy = smgr->addAnimatedMeshSceneNode(
+        smgr->getMesh("../../media/faerie.md2"));
+
+    if (fairy)
+    {
+        fairy->setMaterialTexture(0,
+                driver->getTexture("../../media/faerie2.bmp")); // set diffuse texture
+        fairy->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting
+        fairy->getMaterial(0).Shininess = 20.0f; // set size of specular highlights
+        fairy->setPosition(core::vector3df(-10,0,-100));
+        fairy->setMD2Animation ( scene::EMAT_STAND );
+    }
+

To make specular highlights appear on the model, we need a dynamic light in the scene. We add one directly in vicinity of the model. In addition, to make the model not that dark, we set the ambient light to gray.

+
    // add white light
+    smgr->addLightSceneNode(0, core::vector3df(-15,5,-105),
+            video::SColorf(1.0f, 1.0f, 1.0f));
+
+    // set ambient light
+    smgr->setAmbientLight(video::SColor(0,60,60,60));
+

The next is just some standard stuff: Add a test cube and let it rotate to make the scene more interesting. The user defined camera and cursor setup is made later on, right before the render loop.

+
    // create test cube
+    scene::ISceneNode* test = smgr->addCubeSceneNode(60);
+
+    // let the cube rotate and set some light settings
+    scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(
+        core::vector3df(0.3f, 0.3f,0));
+
+    test->setPosition(core::vector3df(-100,0,-100));
+    test->setMaterialFlag(video::EMF_LIGHTING, false); // disable dynamic lighting
+    test->addAnimator(anim);
+    anim->drop();
+
+    // set window caption
+    device->setWindowCaption(L"Irrlicht Engine - Render to Texture and Specular Highlights example");
+

To test out the render to texture feature, we need a render target texture. These are not like standard textures, but need to be created first. To create one, we call IVideoDriver::addRenderTargetTexture() and specify the size of the texture. Please don't use sizes bigger than the frame buffer for this, because the render target shares the zbuffer with the frame buffer. Because we want to render the scene not from the user camera into the texture, we add another fixed camera to the scene. But before we do all this, we check if the current running driver is able to render to textures. If it is not, we simply display a warning text.

+
    // create render target
+    video::ITexture* rt = 0;
+    scene::ICameraSceneNode* fixedCam = 0;
+    
+
+    if (driver->queryFeature(video::EVDF_RENDER_TO_TARGET))
+    {
+        rt = driver->addRenderTargetTexture(core::dimension2d<u32>(256,256), "RTT1");
+        test->setMaterialTexture(0, rt); // set material of cube to render target
+
+        // add fixed camera
+        fixedCam = smgr->addCameraSceneNode(0, core::vector3df(10,10,-80),
+            core::vector3df(-10,10,-100));
+    }
+    else
+    {
+        // create problem text
+        gui::IGUISkin* skin = env->getSkin();
+        gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+        if (font)
+            skin->setFont(font);
+
+        gui::IGUIStaticText* text = env->addStaticText(
+            L"Your hardware or this renderer is not able to use the "\
+            L"render to texture feature. RTT Disabled.",
+            core::rect<s32>(150,20,470,60));
+
+        text->setOverrideColor(video::SColor(100,255,255,255));
+    }
+    
+    // add fps camera
+    scene::ICameraSceneNode* fpsCamera = smgr->addCameraSceneNodeFPS();
+    fpsCamera->setPosition(core::vector3df(-50,50,-150));
+
+    // disable mouse cursor
+    device->getCursorControl()->setVisible(false);
+

Nearly finished. Now we need to draw everything. Every frame, we draw the scene twice. Once from the fixed camera into the render target texture and once as usual. When rendering into the render target, we need to disable the visibility of the test cube, because it has the render target texture applied to it. That's it, wasn't too complicated I hope. :)

+
    int lastFPS = -1;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, 0);
+
+        if (rt)
+        {
+            // draw scene into render target
+            
+            // set render target texture
+            driver->setRenderTarget(rt, true, true, video::SColor(0,0,0,255));
+
+            // make cube invisible and set fixed camera as active camera
+            test->setVisible(false);
+            smgr->setActiveCamera(fixedCam);
+
+            // draw whole scene into render buffer
+            smgr->drawAll();
+
+            // set back old render target
+            // The buffer might have been distorted, so clear it
+            driver->setRenderTarget(0, true, true, 0);
+
+            // make the cube visible and set the user controlled camera as active one
+            test->setVisible(true);
+            smgr->setActiveCamera(fpsCamera);
+        }
+        
+        // draw scene normally
+        smgr->drawAll();
+        env->drawAll();
+
+        driver->endScene();
+
+        // display frames per second in window title
+        int fps = driver->getFPS();
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Irrlicht Engine - Render to Texture and Specular Highlights example";
+            str += " FPS:";
+            str += fps;
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+
+    device->drop(); // drop device
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example014.html b/src/others/irrlicht-1.8.1/doc/html/example014.html new file mode 100644 index 0000000..f68bfb5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example014.html @@ -0,0 +1,317 @@ + + + + +Irrlicht 3D Engine: Tutorial 14: Win32 Window + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 14: Win32 Window
+
+
+
+014shot.jpg +
+

This example only runs under MS Windows and demonstrates that Irrlicht can render inside a win32 window. MFC and .NET Windows.Forms windows are possible, too.

+

In the beginning, we create a windows window using the windows API. I'm not going to explain this code, because it is windows specific. See the MSDN or a windows book for details.

+
#include <irrlicht.h>
+#ifndef _IRR_WINDOWS_
+#error Windows only example
+#else
+#include <windows.h> // this example only runs with windows
+#include <iostream>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#pragma comment(lib, "irrlicht.lib")
+
+HWND hOKButton;
+HWND hWnd;
+
+static LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message,
+        WPARAM wParam, LPARAM lParam)
+{
+    switch (message)
+    {
+    case WM_COMMAND:
+        {
+            HWND hwndCtl = (HWND)lParam;
+            int code = HIWORD(wParam);
+
+            if (hwndCtl == hOKButton)
+            {
+                DestroyWindow(hWnd);
+                PostQuitMessage(0);
+                return 0;
+            }
+        }
+        break;
+    case WM_DESTROY:
+        PostQuitMessage(0);
+        return 0;
+
+    }
+
+    return DefWindowProc(hWnd, message, wParam, lParam);
+}
+

Now ask for the driver and create the Windows specific window.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    printf("Select the render window (some dead window may exist too):\n"\
+        " (a) Window with button (via CreationParam)\n"\
+        " (b) Window with button (via beginScene)\n"\
+        " (c) Own Irrlicht window (default behavior)\n"\
+        " (otherKey) exit\n\n");
+
+    char key;
+    std::cin >> key;
+    if (key != 'a' && key != 'b' && key != 'c')
+        return 1;
+
+    HINSTANCE hInstance = 0;
+    // create dialog
+
+    const char* Win32ClassName = "CIrrlichtWindowsTestDialog";
+
+    WNDCLASSEX wcex;
+    wcex.cbSize         = sizeof(WNDCLASSEX);
+    wcex.style          = CS_HREDRAW | CS_VREDRAW;
+    wcex.lpfnWndProc    = (WNDPROC)CustomWndProc;
+    wcex.cbClsExtra     = 0;
+    wcex.cbWndExtra     = DLGWINDOWEXTRA;
+    wcex.hInstance      = hInstance;
+    wcex.hIcon          = NULL;
+    wcex.hCursor        = LoadCursor(NULL, IDC_ARROW);
+    wcex.hbrBackground  = (HBRUSH)(COLOR_WINDOW);
+    wcex.lpszMenuName   = 0;
+    wcex.lpszClassName  = Win32ClassName;
+    wcex.hIconSm        = 0;
+
+    RegisterClassEx(&wcex);
+
+    DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION |
+        WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX;
+
+    int windowWidth = 440;
+    int windowHeight = 380;
+
+    hWnd = CreateWindow( Win32ClassName, "Irrlicht Win32 window example",
+        style, 100, 100, windowWidth, windowHeight,
+        NULL, NULL, hInstance, NULL);
+
+    RECT clientRect;
+    GetClientRect(hWnd, &clientRect);
+    windowWidth = clientRect.right;
+    windowHeight = clientRect.bottom;
+
+    // create ok button
+
+    hOKButton = CreateWindow("BUTTON", "OK - Close", WS_CHILD | WS_VISIBLE | BS_TEXT,
+        windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, hInstance, NULL);
+
+    // create some text
+
+    CreateWindow("STATIC", "This is Irrlicht running inside a standard Win32 window.\n"\
+        "Also mixing with MFC and .NET Windows.Forms is possible.",
+        WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL);
+
+    // create window to put irrlicht in
+
+    HWND hIrrlichtWindow = CreateWindow("BUTTON", "",
+            WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,
+            50, 80, 320, 220, hWnd, NULL, hInstance, NULL);
+    video::SExposedVideoData videodata((key=='b')?hIrrlichtWindow:0);
+

So now that we have some window, we can create an Irrlicht device inside of it. We use Irrlicht createEx() function for this. We only need the handle (HWND) to that window, set it as windowsID parameter and start up the engine as usual. That's it.

+
    // create irrlicht device in the button window
+
+    irr::SIrrlichtCreationParameters param;
+    param.DriverType = driverType;
+    if (key=='a')
+        param.WindowId = reinterpret_cast<void*>(hIrrlichtWindow);
+
+    irr::IrrlichtDevice* device = irr::createDeviceEx(param);
+    if (!device)
+        return 1;
+
+    // setup a simple 3d scene
+
+    irr::scene::ISceneManager* smgr = device->getSceneManager();
+    video::IVideoDriver* driver = device->getVideoDriver();
+
+    if (driverType==video::EDT_OPENGL)
+    {
+        HDC HDc=GetDC(hIrrlichtWindow);
+        PIXELFORMATDESCRIPTOR pfd={0};
+        pfd.nSize=sizeof(PIXELFORMATDESCRIPTOR);
+        int pf = GetPixelFormat(HDc);
+        DescribePixelFormat(HDc, pf, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+        pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
+        pfd.cDepthBits=16;
+        pf = ChoosePixelFormat(HDc, &pfd);
+        SetPixelFormat(HDc, pf, &pfd);
+        videodata.OpenGLWin32.HDc = HDc;
+        videodata.OpenGLWin32.HRc=wglCreateContext(HDc);
+        wglShareLists((HGLRC)driver->getExposedVideoData().OpenGLWin32.HRc, (HGLRC)videodata.OpenGLWin32.HRc);
+    }
+    scene::ICameraSceneNode* cam = smgr->addCameraSceneNode();
+    cam->setTarget(core::vector3df(0,0,0));
+
+    scene::ISceneNodeAnimator* anim =
+        smgr->createFlyCircleAnimator(core::vector3df(0,15,0), 30.0f);
+    cam->addAnimator(anim);
+    anim->drop();
+
+    scene::ISceneNode* cube = smgr->addCubeSceneNode(20);
+
+    cube->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+    cube->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+    cube->setMaterialFlag( video::EMF_LIGHTING, false );
+    cube->setMaterialType( video::EMT_REFLECTION_2_LAYER );
+
+    smgr->addSkyBoxSceneNode(
+    driver->getTexture("../../media/irrlicht2_up.jpg"),
+    driver->getTexture("../../media/irrlicht2_dn.jpg"),
+    driver->getTexture("../../media/irrlicht2_lf.jpg"),
+    driver->getTexture("../../media/irrlicht2_rt.jpg"),
+    driver->getTexture("../../media/irrlicht2_ft.jpg"),
+    driver->getTexture("../../media/irrlicht2_bk.jpg"));
+
+    // show and execute dialog
+
+    ShowWindow(hWnd , SW_SHOW);
+    UpdateWindow(hWnd);
+
+    // do message queue
+

Now the only thing missing is the drawing loop using IrrlichtDevice::run(). We do this as usual. But instead of this, there is another possibility: You can also simply use your own message loop using GetMessage, DispatchMessage and whatever. Calling Device->run() will cause Irrlicht to dispatch messages internally too. You need not call Device->run() if you want to do your own message dispatching loop, but Irrlicht will not be able to fetch user input then and you have to do it on your own using the window messages, DirectInput, or whatever.

+
    while (device->run())
+    {
+        driver->beginScene(true, true, 0, videodata);
+        smgr->drawAll();
+        driver->endScene();
+    }
+

The alternative, own message dispatching loop without Device->run() would look like this:

+

MSG msg; while (true) { if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg);

+

if (msg.message == WM_QUIT) break; }

+

advance virtual time device->getTimer()->tick();

+

draw engine picture driver->beginScene(true, true, 0, (key=='c')?hIrrlichtWindow:0); smgr->drawAll(); driver->endScene(); }

+
    device->closeDevice();
+    device->drop();
+
+    return 0;
+}
+#endif // if windows
+

That's it, Irrlicht now runs in your own windows window.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example015.html b/src/others/irrlicht-1.8.1/doc/html/example015.html new file mode 100644 index 0000000..939c7f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example015.html @@ -0,0 +1,253 @@ + + + + +Irrlicht 3D Engine: Tutorial 15: Loading Scenes from .irr Files + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 15: Loading Scenes from .irr Files
+
+
+
+015shot.jpg +
+

Since version 1.1, Irrlicht is able to save and load the full scene graph into an .irr file, an xml based format. There is an editor available to edit those files, named irrEdit (http://www.ambiera.com/irredit) which can also be used as world and particle editor. This tutorial shows how to use .irr files.

+

Lets start: Create an Irrlicht device and setup the window.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+int main(int argc, char** argv)
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device and exit if creation failed
+
+    IrrlichtDevice* device =
+        createDevice(driverType, core::dimension2d<u32>(640, 480));
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    device->setWindowCaption(L"Load .irr file example");
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+

Now load our .irr file. .irr files can store the whole scene graph including animators, materials and particle systems. And there is also the possibility to store arbitrary user data for every scene node in that file. To keep this example simple, we are simply loading the scene here. See the documentation at ISceneManager::loadScene and ISceneManager::saveScene for more information. So to load and display a complicated huge scene, we only need a single call to loadScene().

+
    // load the scene
+    if (argc>1)
+        smgr->loadScene(argv[1]);
+    else
+        smgr->loadScene("../../media/example.irr");
+

Now we'll create a camera, and give it a collision response animator that's built from the mesh nodes in the scene we just loaded.

+
    scene::ICameraSceneNode * camera = smgr->addCameraSceneNodeFPS(0, 50.f, 0.1f);
+
+    // Create a meta triangle selector to hold several triangle selectors.
+    scene::IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector();
+

Now we will find all the nodes in the scene and create triangle selectors for all suitable nodes. Typically, you would want to make a more informed decision about which nodes to performs collision checks on; you could capture that information in the node name or Id.

+
    core::array<scene::ISceneNode *> nodes;
+    smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes); // Find all nodes
+
+    for (u32 i=0; i < nodes.size(); ++i)
+    {
+        scene::ISceneNode * node = nodes[i];
+        scene::ITriangleSelector * selector = 0;
+
+        switch(node->getType())
+        {
+        case scene::ESNT_CUBE:
+        case scene::ESNT_ANIMATED_MESH:
+            // Because the selector won't animate with the mesh,
+            // and is only being used for camera collision, we'll just use an approximate
+            // bounding box instead of ((scene::IAnimatedMeshSceneNode*)node)->getMesh(0)
+            selector = smgr->createTriangleSelectorFromBoundingBox(node);
+        break;
+
+        case scene::ESNT_MESH:
+        case scene::ESNT_SPHERE: // Derived from IMeshSceneNode
+            selector = smgr->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
+            break;
+
+        case scene::ESNT_TERRAIN:
+            selector = smgr->createTerrainTriangleSelector((scene::ITerrainSceneNode*)node);
+            break;
+
+        case scene::ESNT_OCTREE:
+            selector = smgr->createOctreeTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
+            break;
+
+        default:
+            // Don't create a selector for this node type
+            break;
+        }
+
+        if(selector)
+        {
+            // Add it to the meta selector, which will take a reference to it
+            meta->addTriangleSelector(selector);
+            // And drop my reference to it, so that the meta selector owns it.
+            selector->drop();
+        }
+    }
+

Now that the mesh scene nodes have had triangle selectors created and added to the meta selector, create a collision response animator from that meta selector.

+
    scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+        meta, camera, core::vector3df(5,5,5),
+        core::vector3df(0,0,0));
+    meta->drop(); // I'm done with the meta selector now
+
+    camera->addAnimator(anim);
+    anim->drop(); // I'm done with the animator now
+
+    // And set the camera position so that it doesn't start off stuck in the geometry
+    camera->setPosition(core::vector3df(0.f, 20.f, 0.f));
+
+    // Point the camera at the cube node, by finding the first node of type ESNT_CUBE
+    scene::ISceneNode * cube = smgr->getSceneNodeFromType(scene::ESNT_CUBE);
+    if(cube)
+        camera->setTarget(cube->getAbsolutePosition());
+

That's it. Draw everything and finish as usual.

+
    int lastFPS = -1;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, video::SColor(0,200,200,200));
+        smgr->drawAll();
+        driver->endScene();
+
+        int fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw str = L"Load Irrlicht File example - Irrlicht Engine [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+
+    }
+
+    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example016.html b/src/others/irrlicht-1.8.1/doc/html/example016.html new file mode 100644 index 0000000..52b9893 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example016.html @@ -0,0 +1,401 @@ + + + + +Irrlicht 3D Engine: Tutorial 16: Quake3 Map Shader Support + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 16: Quake3 Map Shader Support
+
+
+
+016shot.jpg +
+

This Tutorial shows how to load a Quake 3 map into the engine, create a SceneNode for optimizing the speed of rendering and how to create a user controlled camera.

+

Lets start like the HelloWorld example: We include the irrlicht header files and an additional file to be able to ask the user for a driver type using the console.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+

define which Quake3 Level should be loaded

+
#define IRRLICHT_QUAKE3_ARENA
+//#define ORIGINAL_QUAKE3_ARENA
+//#define CUSTOM_QUAKE3_ARENA
+//#define SHOW_SHADER_NAME
+
+#ifdef ORIGINAL_QUAKE3_ARENA
+    #define QUAKE3_STORAGE_FORMAT   addFolderFileArchive
+    #define QUAKE3_STORAGE_1        "/baseq3/"
+    #ifdef CUSTOM_QUAKE3_ARENA
+        #define QUAKE3_STORAGE_2    "/cf/"
+        #define QUAKE3_MAP_NAME     "maps/cf.bsp"
+    #else
+        #define QUAKE3_MAP_NAME         "maps/q3dm8.bsp"
+    #endif
+#endif
+
+#ifdef IRRLICHT_QUAKE3_ARENA
+    #define QUAKE3_STORAGE_FORMAT   addFileArchive
+    #define QUAKE3_STORAGE_1    "../../media/map-20kdm2.pk3"
+    #define QUAKE3_MAP_NAME         "maps/20kdm2.bsp"
+#endif
+
+using namespace irr;
+using namespace scene;
+

Again, to be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib:

+
#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

A class to produce a series of screenshots

+
class CScreenShotFactory : public IEventReceiver
+{
+public:
+
+    CScreenShotFactory( IrrlichtDevice *device, const c8 * templateName, ISceneNode* node )
+        : Device(device), Number(0), FilenameTemplate(templateName), Node(node)
+    {
+        FilenameTemplate.replace ( '/', '_' );
+        FilenameTemplate.replace ( '\\', '_' );
+    }
+
+    bool OnEvent(const SEvent& event)
+    {
+        // check if user presses the key F9
+        if ((event.EventType == EET_KEY_INPUT_EVENT) &&
+                event.KeyInput.PressedDown)
+        {
+            if (event.KeyInput.Key == KEY_F9)
+            {
+                video::IImage* image = Device->getVideoDriver()->createScreenShot();
+                if (image)
+                {
+                    c8 buf[256];
+                    snprintf(buf, 256, "%s_shot%04d.jpg",
+                            FilenameTemplate.c_str(),
+                            ++Number);
+                    Device->getVideoDriver()->writeImageToFile(image, buf, 85 );
+                    image->drop();
+                }
+            }
+            else
+            if (event.KeyInput.Key == KEY_F8)
+            {
+                if (Node->isDebugDataVisible())
+                    Node->setDebugDataVisible(scene::EDS_OFF);
+                else
+                    Node->setDebugDataVisible(scene::EDS_BBOX_ALL);
+            }
+        }
+        return false;
+    }
+
+private:
+    IrrlichtDevice *Device;
+    u32 Number;
+    core::stringc FilenameTemplate;
+    ISceneNode* Node;
+};
+

Ok, lets start.

+
int IRRCALLCONV main(int argc, char* argv[])
+{
+

Like in the HelloWorld example, we create an IrrlichtDevice with createDevice(). The difference now is that we ask the user to select which hardware accelerated driver to use. The Software device would be too slow to draw a huge Quake 3 map, but just for the fun of it, we make this decision possible too.

+
    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device and exit if creation failed
+    const core::dimension2du videoDim(800,600);
+
+    IrrlichtDevice *device = createDevice(driverType, videoDim, 32, false );
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    const char* mapname=0;
+    if (argc>2)
+        mapname = argv[2];
+    else
+        mapname = QUAKE3_MAP_NAME;
+

Get a pointer to the video driver and the SceneManager so that we do not always have to write device->getVideoDriver() and device->getSceneManager().

+
    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* gui = device->getGUIEnvironment();
+
+    device->getFileSystem()->addFileArchive("../../media/");
+

To display the Quake 3 map, we first need to load it. Quake 3 maps are packed into .pk3 files, which are nothing other than .zip files. So we add the .pk3 file to our FileSystem. After it was added, we are able to read from the files in that archive as they would directly be stored on disk.

+
    if (argc>2)
+        device->getFileSystem()->QUAKE3_STORAGE_FORMAT(argv[1]);
+    else
+        device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_1);
+#ifdef QUAKE3_STORAGE_2
+    device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_2);
+#endif
+
+    // Quake3 Shader controls Z-Writing
+    smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
+

Now we can load the mesh by calling getMesh(). We get a pointer returned to a IAnimatedMesh. As you know, Quake 3 maps are not really animated, they are only a huge chunk of static geometry with some materials attached. Hence the IAnimated mesh consists of only one frame, so we get the "first frame" of the "animation", which is our quake level and create an Octree scene node with it, using addOctreeSceneNode(). The Octree optimizes the scene a little bit, trying to draw only geometry which is currently visible. An alternative to the Octree would be a AnimatedMeshSceneNode, which would draw always the complete geometry of the mesh, without optimization. Try it out: Write addAnimatedMeshSceneNode instead of addOctreeSceneNode and compare the primitives drawn by the video driver. (There is a getPrimitiveCountDrawed() method in the IVideoDriver class). Note that this optimization with the Octree is only useful when drawing huge meshes consisting of lots of geometry.

+
    scene::IQ3LevelMesh* const mesh =
+        (scene::IQ3LevelMesh*) smgr->getMesh(mapname);
+

add the geometry mesh to the Scene ( polygon & patches ) The Geometry mesh is optimised for faster drawing

+
    scene::ISceneNode* node = 0;
+    if (mesh)
+    {
+        scene::IMesh * const geometry = mesh->getMesh(quake3::E_Q3_MESH_GEOMETRY);
+        node = smgr->addOctreeSceneNode(geometry, 0, -1, 4096);
+    }
+
+    // create an event receiver for making screenshots
+    CScreenShotFactory screenshotFactory(device, mapname, node);
+    device->setEventReceiver(&screenshotFactory);
+

now construct SceneNodes for each Shader The Objects are stored in the quake mesh scene::E_Q3_MESH_ITEMS and the Shader ID is stored in the MaterialParameters mostly dark looking skulls and moving lava.. or green flashing tubes?

+
    if ( mesh )
+    {
+        // the additional mesh can be quite huge and is unoptimized
+        const scene::IMesh * const additional_mesh = mesh->getMesh(quake3::E_Q3_MESH_ITEMS);
+
+#ifdef SHOW_SHADER_NAME
+        gui::IGUIFont *font = device->getGUIEnvironment()->getFont("../../media/fontlucida.png");
+        u32 count = 0;
+#endif
+
+        for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount(); ++i )
+        {
+            const IMeshBuffer* meshBuffer = additional_mesh->getMeshBuffer(i);
+            const video::SMaterial& material = meshBuffer->getMaterial();
+
+            // The ShaderIndex is stored in the material parameter
+            const s32 shaderIndex = (s32) material.MaterialTypeParam2;
+
+            // the meshbuffer can be rendered without additional support, or it has no shader
+            const quake3::IShader *shader = mesh->getShader(shaderIndex);
+            if (0 == shader)
+            {
+                continue;
+            }
+
+            // we can dump the shader to the console in its
+            // original but already parsed layout in a pretty
+            // printers way.. commented out, because the console
+            // would be full...
+            // quake3::dumpShader ( Shader );
+
+            node = smgr->addQuake3SceneNode(meshBuffer, shader);
+
+#ifdef SHOW_SHADER_NAME
+            count += 1;
+            core::stringw name( node->getName() );
+            node = smgr->addBillboardTextSceneNode(
+                    font, name.c_str(), node,
+                    core::dimension2d<f32>(80.0f, 8.0f),
+                    core::vector3df(0, 10, 0));
+#endif
+        }
+    }
+

Now we only need a Camera to look at the Quake 3 map. And we want to create a user controlled camera. There are some different cameras available in the Irrlicht engine. For example the Maya Camera which can be controlled comparable to the camera in Maya: Rotate with left mouse button pressed, Zoom with both buttons pressed, translate with right mouse button pressed. This could be created with addCameraSceneNodeMaya(). But for this example, we want to create a camera which behaves like the ones in first person shooter games (FPS).

+
    scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+

so we need a good starting Position in the level. we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" we choose a random launch

+
    if ( mesh )
+    {
+        quake3::tQ3EntityList &entityList = mesh->getEntityList();
+
+        quake3::IEntity search;
+        search.name = "info_player_deathmatch";
+
+        s32 index = entityList.binary_search(search);
+        if (index >= 0)
+        {
+            s32 notEndList;
+            do
+            {
+                const quake3::SVarGroup *group = entityList[index].getGroup(1);
+
+                u32 parsepos = 0;
+                const core::vector3df pos =
+                    quake3::getAsVector3df(group->get("origin"), parsepos);
+
+                parsepos = 0;
+                const f32 angle = quake3::getAsFloat(group->get("angle"), parsepos);
+
+                core::vector3df target(0.f, 0.f, 1.f);
+                target.rotateXZBy(angle);
+
+                camera->setPosition(pos);
+                camera->setTarget(pos + target);
+
+                ++index;
+

notEndList = ( index < (s32) entityList.size () && entityList[index].name == search.name && (device->getTimer()->getRealTime() >> 3 ) & 1 );

+
                notEndList = index == 2;
+            } while ( notEndList );
+        }
+    }
+

The mouse cursor needs not to be visible, so we make it invisible.

+
    device->getCursorControl()->setVisible(false);
+
+    // load the engine logo
+    gui->addImage(driver->getTexture("irrlichtlogo2.png"),
+            core::position2d<s32>(10, 10));
+
+    // show the driver logo
+    const core::position2di pos(videoDim.Width - 128, videoDim.Height - 64);
+
+    switch ( driverType )
+    {
+        case video::EDT_BURNINGSVIDEO:
+            gui->addImage(driver->getTexture("burninglogo.png"), pos);
+            break;
+        case video::EDT_OPENGL:
+            gui->addImage(driver->getTexture("opengllogo.png"), pos);
+            break;
+        case video::EDT_DIRECT3D8:
+        case video::EDT_DIRECT3D9:
+            gui->addImage(driver->getTexture("directxlogo.png"), pos);
+            break;
+    }
+

We have done everything, so lets draw it. We also write the current frames per second and the drawn primitives to the caption of the window. The 'if (device->isWindowActive())' line is optional, but prevents the engine render to set the position of the mouse cursor after task switching when other program are active.

+
    int lastFPS = -1;
+
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        driver->beginScene(true, true, video::SColor(255,20,20,40));
+        smgr->drawAll();
+        gui->drawAll();
+        driver->endScene();
+
+        int fps = driver->getFPS();
+        //if (lastFPS != fps)
+        {
+            io::IAttributes * const attr = smgr->getParameters();
+            core::stringw str = L"Q3 [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+#ifdef _IRR_SCENEMANAGER_DEBUG          
+            str += " Cull:";
+            str += attr->getAttributeAsInt("calls");
+            str += "/";
+            str += attr->getAttributeAsInt("culled");
+            str += " Draw: ";
+            str += attr->getAttributeAsInt("drawn_solid");
+            str += "/";
+            str += attr->getAttributeAsInt("drawn_transparent");
+            str += "/";
+            str += attr->getAttributeAsInt("drawn_transparent_effect");
+#endif
+            device->setWindowCaption(str.c_str());
+            lastFPS = fps;
+        }
+    }
+

In the end, delete the Irrlicht device.

+
    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example017.html b/src/others/irrlicht-1.8.1/doc/html/example017.html new file mode 100644 index 0000000..a326ebc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example017.html @@ -0,0 +1,544 @@ + + + + +Irrlicht 3D Engine: Tutorial 17: Helloworld mobile + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 17: Helloworld mobile
+
+
+
+017shot.jpg +
+ This example show Hello World for Windows mobile. It compiles on other platform too. The only differences between the original examples are. You need a GUI, because otherwise you can't quit the application. You need a Filesystem, which is relative based to your executable.

+
#include <irrlicht.h>
+
+#if defined ( _IRR_WINDOWS_ )
+    #include <windows.h>
+#endif
+
+using namespace irr;
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#pragma comment(lib, "Irrlicht.lib")
+
+class EventReceiver_basic : public IEventReceiver
+{
+private:
+    IrrlichtDevice *Device;
+public:
+    EventReceiver_basic ( IrrlichtDevice *device ): Device ( device ) {}
+
+    virtual bool OnEvent(const SEvent& event)
+    {
+        if (event.EventType == EET_GUI_EVENT)
+        {
+            s32 id = event.GUIEvent.Caller->getID();
+
+            switch(event.GUIEvent.EventType)
+            {
+                case EGET_BUTTON_CLICKED:
+                if (id == 2)
+                {
+                    Device->closeDevice();
+                    return true;
+                } break;
+            }
+        }
+
+        return false;
+    }
+};
+
+class CSampleSceneNode : public ISceneNode
+{
+    aabbox3d<f32> Box;
+    S3DVertex Vertices[4];
+    SMaterial Material;
+public:
+
+    CSampleSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
+        : ISceneNode(parent, mgr, id)
+    {
+        Material.Wireframe = false;
+        Material.Lighting = false;
+
+        Vertices[0] = S3DVertex(0,0,10, 1,1,0, SColor(255,0,255,255), 0, 1);
+        Vertices[1] = S3DVertex(10,0,-10, 1,0,0, SColor(255,255,0,255), 1, 1);
+        Vertices[2] = S3DVertex(0,20,0, 0,1,1, SColor(255,255,255,0), 1, 0);
+        Vertices[3] = S3DVertex(-10,0,-10, 0,0,1, SColor(255,0,255,0), 0, 0);
+        Box.reset(Vertices[0].Pos);
+        for (s32 i=1; i<4; ++i)
+            Box.addInternalPoint(Vertices[i].Pos);
+    }
+    virtual void OnRegisterSceneNode()
+    {
+        if (IsVisible)
+            SceneManager->registerNodeForRendering(this);
+
+        ISceneNode::OnRegisterSceneNode();
+    }
+
+    virtual void render()
+    {
+        u16 indices[] = {   0,2,3, 2,1,3, 1,0,3, 2,0,1  };
+        IVideoDriver* driver = SceneManager->getVideoDriver();
+
+        driver->setMaterial(Material);
+        driver->setTransform(ETS_WORLD, AbsoluteTransformation);
+        driver->drawIndexedTriangleList(&Vertices[0], 4, &indices[0], 4);
+    }
+
+    virtual const aabbox3d<f32>& getBoundingBox() const
+    {
+        return Box;
+    }
+
+    virtual u32 getMaterialCount()
+    {
+        return 1;
+    }
+
+    virtual SMaterial& getMaterial(u32 i)
+    {
+        return Material;
+    }   
+};
+

! Startup a Windows Mobile Device

+
IrrlichtDevice *startup()
+{
+    // both software and burnings video can be used
+    E_DRIVER_TYPE driverType = EDT_SOFTWARE; // EDT_BURNINGSVIDEO;
+
+    // create device
+    IrrlichtDevice *device = 0;
+
+#if defined (_IRR_USE_WINDOWS_CE_DEVICE_)
+    // set to standard mobile fullscreen 240x320
+    device = createDevice(driverType, dimension2d<u32>(240, 320), 16, true );
+#else
+    // on PC. use window mode
+    device = createDevice(driverType, dimension2d<u32>(240, 320), 16, false );
+#endif      
+    if ( 0 == device )
+        return 0;
+
+    IVideoDriver* driver = device->getVideoDriver();
+    ISceneManager* smgr = device->getSceneManager();
+    IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+    // set the filesystem relative to the executable
+#if defined (_IRR_WINDOWS_)
+    {
+        wchar_t buf[255];
+        GetModuleFileNameW ( 0, buf, 255 );
+
+        io::path base = buf;
+        base = base.subString ( 0, base.findLast ( '\\' ) + 1 );
+        device->getFileSystem()->addFileArchive ( base );
+    }
+#endif
+
+    IGUIStaticText *text = guienv->addStaticText(L"FPS: 25",
+        rect<s32>(140,15,200,30), false, false, 0, 100 );
+
+    guienv->addButton(core::rect<int>(200,10,238,30), 0, 2, L"Quit");
+
+    // add irrlicht logo
+    guienv->addImage(driver->getTexture("../../media/irrlichtlogo3.png"),
+                    core::position2d<s32>(0,-2));
+    return device;
+}
+

!

+
int run ( IrrlichtDevice *device )
+{
+    while(device->run())
+    if (device->isWindowActive())
+    {
+        device->getVideoDriver()->beginScene(true, true, SColor(0,100,100,100));
+        device->getSceneManager()->drawAll();
+        device->getGUIEnvironment()->drawAll();
+        device->getVideoDriver()->endScene ();
+
+        IGUIElement *stat = device->getGUIEnvironment()->
+            getRootGUIElement()->getElementFromId ( 100 );
+        if ( stat )
+        {
+            stringw str = L"FPS: ";
+            str += (s32)device->getVideoDriver()->getFPS();
+
+            stat->setText ( str.c_str() );
+        }
+    }
+
+    device->drop();
+    return 0;
+}
+

!

+
int example_customscenenode()
+{
+    // create device
+    IrrlichtDevice *device = startup();
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    // create engine and camera
+    EventReceiver_basic receiver(device);
+    device->setEventReceiver(&receiver);
+    
+    IVideoDriver* driver = device->getVideoDriver();
+    ISceneManager* smgr = device->getSceneManager();
+    IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+
+    smgr->addCameraSceneNode(0, vector3df(0,-40,0), vector3df(0,0,0));
+
+    CSampleSceneNode *myNode = 
+        new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
+
+    ISceneNodeAnimator* anim = 
+        smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f));
+
+    if(anim)
+    {
+        myNode->addAnimator(anim);
+        anim->drop();
+        anim = 0; // As I shouldn't refer to it again, ensure that I can't
+    }
+
+    myNode->drop();
+    myNode = 0; // As I shouldn't refer to it again, ensure that I can't
+
+    return run ( device );
+}
+
+class EventReceiver_terrain : public IEventReceiver
+{
+public:
+
+    EventReceiver_terrain(IrrlichtDevice *device, scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) :
+        Device ( device ), Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true)
+    {
+        Skybox->setVisible(true);
+        Skydome->setVisible(false);
+    }
+
+    bool OnEvent(const SEvent& event)
+    {
+        if (event.EventType == EET_GUI_EVENT)
+        {
+            s32 id = event.GUIEvent.Caller->getID();
+
+            switch(event.GUIEvent.EventType)
+            {
+                case EGET_BUTTON_CLICKED:
+                if (id == 2)
+                {
+                    Device->closeDevice();
+                    return true;
+                } break;
+            }
+        }
+
+        // check if user presses the key 'W' or 'D'
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
+        {
+            switch (event.KeyInput.Key)
+            {
+            case irr::KEY_KEY_W: // switch wire frame mode
+                Terrain->setMaterialFlag(video::EMF_WIREFRAME,
+                        !Terrain->getMaterial(0).Wireframe);
+                Terrain->setMaterialFlag(video::EMF_POINTCLOUD, false);
+                return true;
+            case irr::KEY_KEY_P: // switch wire frame mode
+                Terrain->setMaterialFlag(video::EMF_POINTCLOUD,
+                        !Terrain->getMaterial(0).PointCloud);
+                Terrain->setMaterialFlag(video::EMF_WIREFRAME, false);
+                return true;
+            case irr::KEY_KEY_D: // toggle detail map
+                Terrain->setMaterialType(
+                    Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?
+                    video::EMT_DETAIL_MAP : video::EMT_SOLID);
+                return true;
+            case irr::KEY_KEY_S: // toggle skies
+                showBox=!showBox;
+                Skybox->setVisible(showBox);
+                Skydome->setVisible(!showBox);
+                return true;
+            default:
+                break;
+            }
+        }
+
+        return false;
+    }
+
+private:
+    IrrlichtDevice *Device;
+    scene::ISceneNode* Terrain;
+    scene::ISceneNode* Skybox;
+    scene::ISceneNode* Skydome;
+    bool showBox;
+};
+

The start of the main function starts like in most other example. We ask the user for the desired renderer and start it up. This time with the advanced parameter handling.

+
int example_terrain()
+{
+    // create device
+    IrrlichtDevice *device = startup();
+    if (device == 0)
+        return 1; // could not create selected driver.
+

First, we add standard stuff to the scene: A nice irrlicht engine logo, a small help text, a user controlled camera, and we disable the mouse cursor.

+
    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+
+    //set other font
+    //env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));
+
+    // add some help text
+    env->addStaticText(
+        L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome",
+        core::rect<s32>(5,250,235,320), true, true, 0, -1, true);
+
+    // add camera
+    scene::ICameraSceneNode* camera =
+        smgr->addCameraSceneNodeFPS(0,100.0f,1.2f);
+
+    camera->setPosition(core::vector3df(2700*2,255*2,2600*2));
+    camera->setTarget(core::vector3df(2397*2,343*2,2700*2));
+    camera->setFarValue(42000.0f);
+
+    // disable mouse cursor
+    device->getCursorControl()->setVisible(false);
+

Here comes the terrain renderer scene node: We add it just like any other scene node to the scene using ISceneManager::addTerrainSceneNode(). The only parameter we use is a file name to the heightmap we use. A heightmap is simply a gray scale texture. The terrain renderer loads it and creates the 3D terrain from it.

+

To make the terrain look more big, we change the scale factor of it to (40, 4.4, 40). Because we don't have any dynamic lights in the scene, we switch off the lighting, and we set the file terrain-texture.jpg as texture for the terrain and detailmap3.jpg as second texture, called detail map. At last, we set the scale values for the texture: The first texture will be repeated only one time over the whole terrain, and the second one (detail map) 20 times.

+
    // add terrain scene node
+    scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(
+        "../../media/terrain-heightmap.bmp",
+        0,                  // parent node
+        -1,                 // node id
+        core::vector3df(0.f, 0.f, 0.f),     // position
+        core::vector3df(0.f, 0.f, 0.f),     // rotation
+        core::vector3df(40.f, 4.4f, 40.f),  // scale
+        video::SColor ( 255, 255, 255, 255 ),   // vertexColor
+        5,                  // maxLOD
+        scene::ETPS_17,             // patchSize
+        4                   // smoothFactor
+        );
+
+    if ( terrain )
+    {
+        terrain->setMaterialFlag(video::EMF_LIGHTING, false);
+
+        terrain->setMaterialTexture(0,
+                driver->getTexture("../../media/terrain-texture.jpg"));
+        terrain->setMaterialTexture(1,
+                driver->getTexture("../../media/detailmap3.jpg"));
+        
+        terrain->setMaterialType(video::EMT_DETAIL_MAP);
+
+        terrain->scaleTexture(1.0f, 20.0f);
+        //terrain->setDebugDataVisible ( true );
+

To be able to do collision with the terrain, we create a triangle selector. If you want to know what triangle selectors do, just take a look into the collision tutorial. The terrain triangle selector works together with the terrain. To demonstrate this, we create a collision response animator and attach it to the camera, so that the camera will not be able to fly through the terrain.

+
        // create triangle selector for the terrain 
+        scene::ITriangleSelector* selector
+            = smgr->createTerrainTriangleSelector(terrain, 0);
+        terrain->setTriangleSelector(selector);
+
+        // create collision response animator and attach it to the camera
+        scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
+            selector, camera, core::vector3df(60,100,60),
+            core::vector3df(0,0,0),
+            core::vector3df(0,50,0));
+        selector->drop();
+        camera->addAnimator(anim);
+        anim->drop();
+

If you need access to the terrain data you can also do this directly via the following code fragment.

+
        scene::CDynamicMeshBuffer* buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT);
+        terrain->getMeshBufferForLOD(*buffer, 0);
+        video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();
+        // Work on data or get the IndexBuffer with a similar call.
+        buffer->drop(); // When done drop the buffer again.
+    }
+

To make the user be able to switch between normal and wireframe mode, we create an instance of the event receiver from above and let Irrlicht know about it. In addition, we add the skybox which we already used in lots of Irrlicht examples and a skydome, which is shown mutually exclusive with the skybox by pressing 'S'.

+
    // create skybox and skydome
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+    scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode(
+        driver->getTexture("../../media/irrlicht2_up.jpg"),
+        driver->getTexture("../../media/irrlicht2_dn.jpg"),
+        driver->getTexture("../../media/irrlicht2_lf.jpg"),
+        driver->getTexture("../../media/irrlicht2_rt.jpg"),
+        driver->getTexture("../../media/irrlicht2_ft.jpg"),
+        driver->getTexture("../../media/irrlicht2_bk.jpg"));
+    scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture("../../media/skydome.jpg"),16,8,0.95f,2.0f);
+
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+
+    // create event receiver
+    EventReceiver_terrain receiver( device, terrain, skybox, skydome);
+    device->setEventReceiver(&receiver);
+
+    return run ( device );
+}
+
int example_helloworld()
+{
+    // create device
+    IrrlichtDevice *device = startup();
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    IVideoDriver* driver = device->getVideoDriver();
+    ISceneManager* smgr = device->getSceneManager();
+    IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+    IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
+    if (!mesh)
+    {
+        device->drop();
+        return 1;
+    }
+    IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
+

To let the mesh look a little bit nicer, we change its material. We disable lighting because we do not have a dynamic light in here, and the mesh would be totally black otherwise. Then we set the frame loop, such that the predefined STAND animation is used. And last, we apply a texture to the mesh. Without it the mesh would be drawn using only a color.

+
    if (node)
+    {
+        node->setMaterialFlag(EMF_LIGHTING, false);
+        node->setMD2Animation(scene::EMAT_STAND);
+        node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
+    }
+

To look at the mesh, we place a camera into 3d space at the position (0, 30, -40). The camera looks from there to (0,5,0), which is approximately the place where our md2 model is.

+
    smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
+
+    EventReceiver_basic receiver(device);
+    device->setEventReceiver(&receiver);
+
+    return run ( device );
+
+}
+
+#if defined (_IRR_USE_WINDOWS_CE_DEVICE_)
+    #pragma comment(linker, "/subsystem:WINDOWSCE /ENTRY:main") 
+#elif defined (_IRR_WINDOWS_)
+    #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
+#endif
+
int main()
+{
+    example_helloworld ();
+    example_customscenenode();
+    //example_terrain();
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example018.html b/src/others/irrlicht-1.8.1/doc/html/example018.html new file mode 100644 index 0000000..1992110 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example018.html @@ -0,0 +1,316 @@ + + + + +Irrlicht 3D Engine: Tutorial 18: Splitscreen + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 18: Splitscreen
+
+
+
+018shot.jpg +
+

A tutorial by Max Winkel.

+

In this tutorial we'll learn how to use splitscreen (e.g. for racing-games) with Irrlicht. We'll create a viewport divided into 4 parts, with 3 fixed cameras and one user-controlled.

+

Ok, let's start with the headers (I think there's nothing to say about it)

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+//Namespaces for the engine
+using namespace irr;
+using namespace core;
+using namespace video;
+using namespace scene;
+

Now we'll define the resolution in a constant for use in initializing the device and setting up the viewport. In addition we set up a global variable saying splitscreen is active or not.

+
//Resolution
+const int ResX=800;
+const int ResY=600;
+const bool fullScreen=false;
+
+//Use SplitScreen?
+bool SplitScreen=true;
+

Now we need four pointers to our cameras which are created later:

+
//cameras
+ICameraSceneNode *camera[4]={0,0,0,0};
+

In our event-receiver we switch the SplitScreen-variable, whenever the user press the S-key. All other events are sent to the FPS camera.

+
class MyEventReceiver : public IEventReceiver
+{
+    public:
+        virtual bool OnEvent(const SEvent& event)
+        {
+            //Key S enables/disables SplitScreen
+            if (event.EventType == irr::EET_KEY_INPUT_EVENT &&
+                event.KeyInput.Key == KEY_KEY_S && event.KeyInput.PressedDown)
+            {
+                SplitScreen = !SplitScreen;
+                return true;
+            }
+            //Send all other events to camera4
+            if (camera[3])
+                return camera[3]->OnEvent(event);
+            return false;
+        }
+};
+

Ok, now the main-function: First, we initialize the device, get the SourceManager and VideoDriver, load an animated mesh from .md2 and a map from .pk3. Because that's old stuff, I won't explain every step. Just take care of the maps position.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    //Instance of the EventReceiver
+    MyEventReceiver receiver;
+
+    //Initialise the engine
+    IrrlichtDevice *device = createDevice(driverType,
+            dimension2du(ResX,ResY), 32, fullScreen,
+            false, false, &receiver);
+    if (!device)
+        return 1;
+
+    ISceneManager *smgr = device->getSceneManager();
+    IVideoDriver *driver = device->getVideoDriver();
+
+    //Load model
+    IAnimatedMesh *model = smgr->getMesh("../../media/sydney.md2");
+    if (!model)
+        return 1;
+    IAnimatedMeshSceneNode *model_node = smgr->addAnimatedMeshSceneNode(model);
+    //Load texture
+    if (model_node)
+    {
+        ITexture *texture = driver->getTexture("../../media/sydney.bmp");
+        model_node->setMaterialTexture(0,texture);
+        model_node->setMD2Animation(scene::EMAT_RUN);
+        //Disable lighting (we've got no light)
+        model_node->setMaterialFlag(EMF_LIGHTING,false);
+    }
+
+    //Load map
+    device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3");
+    IAnimatedMesh *map = smgr->getMesh("20kdm2.bsp");
+    if (map)
+    {
+        ISceneNode *map_node = smgr->addOctreeSceneNode(map->getMesh(0));
+        //Set position
+        map_node->setPosition(vector3df(-850,-220,-850));
+    }
+

Now we create our four cameras. One is looking at the model from the front, one from the top and one from the side. In addition there's a FPS-camera which can be controlled by the user.

+
    // Create 3 fixed and one user-controlled cameras
+    //Front
+    camera[0] = smgr->addCameraSceneNode(0, vector3df(50,0,0), vector3df(0,0,0));
+    //Top
+    camera[1] = smgr->addCameraSceneNode(0, vector3df(0,50,0), vector3df(0,0,0));
+    //Left
+    camera[2] = smgr->addCameraSceneNode(0, vector3df(0,0,50), vector3df(0,0,0));
+    //User-controlled
+    camera[3] = smgr->addCameraSceneNodeFPS();
+    // don't start at sydney's position
+    if (camera[3])
+        camera[3]->setPosition(core::vector3df(-50,0,-50));
+

Create a variable for counting the fps and hide the mouse:

+
    //Hide mouse
+    device->getCursorControl()->setVisible(false);
+    //We want to count the fps
+    int lastFPS = -1;
+

There wasn't much new stuff - till now! Only by defining four cameras, the game won't be splitscreen. To do this you need several steps:

+
    +
  • Set the viewport to the whole screen
  • +
  • Begin a new scene (Clear screen)
  • +
+
    +
  • The following 3 steps are repeated for every viewport in the splitscreen
      +
    • Set the viewport to the area you wish
    • +
    • Activate the camera which should be "linked" with the viewport
    • +
    • Render all objects
    • +
    +
  • +
+
    +
  • If you have a GUI:
      +
    • Set the viewport the whole screen
    • +
    • Display the GUI
    • +
    +
  • +
  • End scene
  • +
+

Sounds a little complicated, but you'll see it isn't:

+
    while(device->run())
+    {
+        //Set the viewpoint to the whole screen and begin scene
+        driver->setViewPort(rect<s32>(0,0,ResX,ResY));
+        driver->beginScene(true,true,SColor(255,100,100,100));
+        //If SplitScreen is used
+        if (SplitScreen)
+        {
+            //Activate camera1
+            smgr->setActiveCamera(camera[0]);
+            //Set viewpoint to the first quarter (left top)
+            driver->setViewPort(rect<s32>(0,0,ResX/2,ResY/2));
+            //Draw scene
+            smgr->drawAll();
+            //Activate camera2
+            smgr->setActiveCamera(camera[1]);
+            //Set viewpoint to the second quarter (right top)
+            driver->setViewPort(rect<s32>(ResX/2,0,ResX,ResY/2));
+            //Draw scene
+            smgr->drawAll();
+            //Activate camera3
+            smgr->setActiveCamera(camera[2]);
+            //Set viewpoint to the third quarter (left bottom)
+            driver->setViewPort(rect<s32>(0,ResY/2,ResX/2,ResY));
+            //Draw scene
+            smgr->drawAll();
+            //Set viewport the last quarter (right bottom)
+            driver->setViewPort(rect<s32>(ResX/2,ResY/2,ResX,ResY));
+        }
+        //Activate camera4
+        smgr->setActiveCamera(camera[3]);
+        //Draw scene
+        smgr->drawAll();
+        driver->endScene();
+

As you can probably see, the image is rendered for every viewport separately. That means, that you'll loose much performance. Ok, if you're asking "How do I have to set the viewport + to get this or that screen?", don't panic. It's really easy: In the rect-function you define 4 coordinates:

+
    +
  • X-coordinate of the corner left top
  • +
  • Y-coordinate of the corner left top
  • +
  • X-coordinate of the corner right bottom
  • +
  • Y-coordinate of the corner right bottom
  • +
+

That means, if you want to split the screen into 2 viewports you would give the following coordinates:

+
    +
  • 1st viewport: 0,0,ResX/2,ResY
  • +
  • 2nd viewport: ResX/2,0,ResX,ResY
  • +
+

If you didn't fully understand, just play around with the example to check out what happens.

+

Now we just view the current fps and shut down the engine, when the user wants to:

+
        //Get and show fps
+        if (driver->getFPS() != lastFPS)
+        {
+            lastFPS = driver->getFPS();
+            core::stringw tmp = L"Irrlicht SplitScreen-Example (FPS: ";
+            tmp += lastFPS;
+            tmp += ")";
+            device->setWindowCaption(tmp.c_str());
+        }
+    }
+    //Delete device
+    device->drop();
+    return 0;
+}
+

That's it! Just compile and play around with the program. Note: With the S-Key you can switch between using splitscreen and not.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example019.html b/src/others/irrlicht-1.8.1/doc/html/example019.html new file mode 100644 index 0000000..6135b2f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example019.html @@ -0,0 +1,378 @@ + + + + +Irrlicht 3D Engine: Tutorial 19: Mouse and Joystick + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 19: Mouse and Joystick
+
+
+
+019shot.jpg +
+

This tutorial builds on example 04.Movement which showed how to handle keyboard events in Irrlicht. Here we'll handle mouse events and joystick events, if you have a joystick connected and a device that supports joysticks. These are currently Windows, Linux and SDL devices.

+
#ifdef _MSC_VER
+// We'll define this to stop MSVC complaining about sprintf().
+#define _CRT_SECURE_NO_WARNINGS
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+

Just as we did in example 04.Movement, we'll store the latest state of the mouse and the first joystick, updating them as we receive events.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    // We'll create a struct to record info on the mouse state
+    struct SMouseState
+    {
+        core::position2di Position;
+        bool LeftButtonDown;
+        SMouseState() : LeftButtonDown(false) { }
+    } MouseState;
+
+    // This is the one method that we have to implement
+    virtual bool OnEvent(const SEvent& event)
+    {
+        // Remember the mouse state
+        if (event.EventType == irr::EET_MOUSE_INPUT_EVENT)
+        {
+            switch(event.MouseInput.Event)
+            {
+            case EMIE_LMOUSE_PRESSED_DOWN:
+                MouseState.LeftButtonDown = true;
+                break;
+
+            case EMIE_LMOUSE_LEFT_UP:
+                MouseState.LeftButtonDown = false;
+                break;
+
+            case EMIE_MOUSE_MOVED:
+                MouseState.Position.X = event.MouseInput.X;
+                MouseState.Position.Y = event.MouseInput.Y;
+                break;
+
+            default:
+                // We won't use the wheel
+                break;
+            }
+        }
+
+        // The state of each connected joystick is sent to us
+        // once every run() of the Irrlicht device.  Store the
+        // state of the first joystick, ignoring other joysticks.
+        // This is currently only supported on Windows and Linux.
+        if (event.EventType == irr::EET_JOYSTICK_INPUT_EVENT
+            && event.JoystickEvent.Joystick == 0)
+        {
+            JoystickState = event.JoystickEvent;
+        }
+
+        return false;
+    }
+
+    const SEvent::SJoystickEvent & GetJoystickState(void) const
+    {
+        return JoystickState;
+    }
+
+    const SMouseState & GetMouseState(void) const
+    {
+        return MouseState;
+    }
+
+
+    MyEventReceiver()
+    {
+    }
+
+private:
+    SEvent::SJoystickEvent JoystickState;
+};
+

The event receiver for keeping the pressed keys is ready, the actual responses will be made inside the render loop, right before drawing the scene. So lets just create an irr::IrrlichtDevice and the scene node we want to move. We also create some other additional scene nodes, to show that there are also some different possibilities to move and animate scene nodes.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+    MyEventReceiver receiver;
+
+    IrrlichtDevice* device = createDevice(driverType,
+            core::dimension2d<u32>(640, 480), 16, false, false, false, &receiver);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+
+    core::array<SJoystickInfo> joystickInfo;
+    if(device->activateJoysticks(joystickInfo))
+    {
+        std::cout << "Joystick support is enabled and " << joystickInfo.size() << " joystick(s) are present." << std::endl;
+
+        for(u32 joystick = 0; joystick < joystickInfo.size(); ++joystick)
+        {
+            std::cout << "Joystick " << joystick << ":" << std::endl;
+            std::cout << "\tName: '" << joystickInfo[joystick].Name.c_str() << "'" << std::endl;
+            std::cout << "\tAxes: " << joystickInfo[joystick].Axes << std::endl;
+            std::cout << "\tButtons: " << joystickInfo[joystick].Buttons << std::endl;
+
+            std::cout << "\tHat is: ";
+
+            switch(joystickInfo[joystick].PovHat)
+            {
+            case SJoystickInfo::POV_HAT_PRESENT:
+                std::cout << "present" << std::endl;
+                break;
+
+            case SJoystickInfo::POV_HAT_ABSENT:
+                std::cout << "absent" << std::endl;
+                break;
+
+            case SJoystickInfo::POV_HAT_UNKNOWN:
+            default:
+                std::cout << "unknown" << std::endl;
+                break;
+            }
+        }
+    }
+    else
+    {
+        std::cout << "Joystick support is not enabled." << std::endl;
+    }
+
+    core::stringw tmp = L"Irrlicht Joystick Example (";
+    tmp += joystickInfo.size();
+    tmp += " joysticks)";
+    device->setWindowCaption(tmp.c_str());
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+

We'll create an arrow mesh and move it around either with the joystick axis/hat, or make it follow the mouse pointer.

+
    scene::ISceneNode * node = smgr->addMeshSceneNode(
+        smgr->addArrowMesh( "Arrow",
+                video::SColor(255, 255, 0, 0),
+                video::SColor(255, 0, 255, 0),
+                16,16,
+                2.f, 1.3f,
+                0.1f, 0.6f
+                )
+        );
+    node->setMaterialFlag(video::EMF_LIGHTING, false);
+
+    scene::ICameraSceneNode * camera = smgr->addCameraSceneNode();
+    camera->setPosition(core::vector3df(0, 0, -10));
+
+    // As in example 04, we'll use framerate independent movement.
+    u32 then = device->getTimer()->getTime();
+    const f32 MOVEMENT_SPEED = 5.f;
+
+    while(device->run())
+    {
+        // Work out a frame delta time.
+        const u32 now = device->getTimer()->getTime();
+        const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds
+        then = now;
+
+        bool movedWithJoystick = false;
+        core::vector3df nodePosition = node->getPosition();
+
+        if(joystickInfo.size() > 0)
+        {
+            f32 moveHorizontal = 0.f; // Range is -1.f for full left to +1.f for full right
+            f32 moveVertical = 0.f; // -1.f for full down to +1.f for full up.
+
+            const SEvent::SJoystickEvent & joystickData = receiver.GetJoystickState();
+
+            // We receive the full analog range of the axes, and so have to implement our
+            // own dead zone.  This is an empirical value, since some joysticks have more
+            // jitter or creep around the center point than others.  We'll use 5% of the
+            // range as the dead zone, but generally you would want to give the user the
+            // option to change this.
+            const f32 DEAD_ZONE = 0.05f;
+
+            moveHorizontal =
+                (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_X] / 32767.f;
+            if(fabs(moveHorizontal) < DEAD_ZONE)
+                moveHorizontal = 0.f;
+
+            moveVertical =
+                (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_Y] / -32767.f;
+            if(fabs(moveVertical) < DEAD_ZONE)
+                moveVertical = 0.f;
+
+            // POV hat info is only currently supported on Windows, but the value is
+            // guaranteed to be 65535 if it's not supported, so we can check its range.
+            const u16 povDegrees = joystickData.POV / 100;
+            if(povDegrees < 360)
+            {
+                if(povDegrees > 0 && povDegrees < 180)
+                    moveHorizontal = 1.f;
+                else if(povDegrees > 180)
+                    moveHorizontal = -1.f;
+
+                if(povDegrees > 90 && povDegrees < 270)
+                    moveVertical = -1.f;
+                else if(povDegrees > 270 || povDegrees < 90)
+                    moveVertical = +1.f;
+            }
+
+            if(!core::equals(moveHorizontal, 0.f) || !core::equals(moveVertical, 0.f))
+            {
+                nodePosition.X += MOVEMENT_SPEED * frameDeltaTime * moveHorizontal;
+                nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime * moveVertical;
+                movedWithJoystick = true;
+            }
+        }
+
+        // If the arrow node isn't being moved with the joystick, then have it follow the mouse cursor.
+        if(!movedWithJoystick)
+        {
+            // Create a ray through the mouse cursor.
+            core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(
+                receiver.GetMouseState().Position, camera);
+
+            // And intersect the ray with a plane around the node facing towards the camera.
+            core::plane3df plane(nodePosition, core::vector3df(0, 0, -1));
+            core::vector3df mousePosition;
+            if(plane.getIntersectionWithLine(ray.start, ray.getVector(), mousePosition))
+            {
+                // We now have a mouse position in 3d space; move towards it.
+                core::vector3df toMousePosition(mousePosition - nodePosition);
+                const f32 availableMovement = MOVEMENT_SPEED * frameDeltaTime;
+
+                if(toMousePosition.getLength() <= availableMovement)
+                    nodePosition = mousePosition; // Jump to the final position
+                else
+                    nodePosition += toMousePosition.normalize() * availableMovement; // Move towards it
+            }
+        }
+
+        node->setPosition(nodePosition);
+
+        // Turn lighting on and off depending on whether the left mouse button is down.
+        node->setMaterialFlag(video::EMF_LIGHTING, receiver.GetMouseState().LeftButtonDown);
+
+        driver->beginScene(true, true, video::SColor(255,113,113,133));
+        smgr->drawAll(); // draw the 3d scene
+        driver->endScene();
+    }
+

In the end, delete the Irrlicht device.

+
    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example020.html b/src/others/irrlicht-1.8.1/doc/html/example020.html new file mode 100644 index 0000000..0431cbb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example020.html @@ -0,0 +1,464 @@ + + + + +Irrlicht 3D Engine: Tutorial 20: Managed Lights + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 20: Managed Lights
+
+
+
+020shot.jpg +
+

Written by Colin MacDonald. This tutorial explains the use of the Light Manager of Irrlicht. It enables the use of more dynamic light sources than the actual hardware supports. Further applications of the Light Manager, such as per scene node callbacks, are left out for simplicity of the example.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+using namespace core;
+
+#if defined(_MSC_VER)
+#pragma comment(lib, "Irrlicht.lib")
+#endif // MSC_VER
+

Normally, you are limited to 8 dynamic lights per scene: this is a hardware limit. If you want to use more dynamic lights in your scene, then you can register an optional light manager that allows you to to turn lights on and off at specific point during rendering. You are still limited to 8 lights, but the limit is per scene node.

+

This is completely optional: if you do not register a light manager, then a default distance-based scheme will be used to prioritise hardware lights based on their distance from the active camera.

+

NO_MANAGEMENT disables the light manager and shows Irrlicht's default light behaviour. The 8 lights nearest to the camera will be turned on, and other lights will be turned off. In this example, this produces a funky looking but incoherent light display.

+

LIGHTS_NEAREST_NODE shows an implementation that turns on a limited number of lights per mesh scene node. If finds the 3 lights that are nearest to the node being rendered, and turns them on, turning all other lights off. This works, but as it operates on every light for every node, it does not scale well with many lights. The flickering you can see in this demo is due to the lights swapping their relative positions from the cubes (a deliberate demonstration of the limitations of this technique).

+

LIGHTS_IN_ZONE shows a technique for turning on lights based on a 'zone'. Each empty scene node is considered to be the parent of a zone. When nodes are rendered, they turn off all lights, then find their parent 'zone' and turn on all lights that are inside that zone, i.e. are descendents of it in the scene graph. This produces true 'local' lighting for each cube in this example. You could use a similar technique to locally light all meshes in (e.g.) a room, without the lights spilling out to other rooms.

+

This light manager is also an event receiver; this is purely for simplicity in this example, it's neither necessary nor recommended for a real application.

+
class CMyLightManager : public scene::ILightManager, public IEventReceiver
+{
+    typedef enum
+    {
+        NO_MANAGEMENT,
+        LIGHTS_NEAREST_NODE,
+        LIGHTS_IN_ZONE
+    }
+    LightManagementMode;
+
+    LightManagementMode Mode;
+    LightManagementMode RequestedMode;
+
+    // These data represent the state information that this light manager
+    // is interested in.
+    scene::ISceneManager * SceneManager;
+    core::array<scene::ISceneNode*> * SceneLightList;
+    scene::E_SCENE_NODE_RENDER_PASS CurrentRenderPass;
+    scene::ISceneNode * CurrentSceneNode;
+
+public:
+    CMyLightManager(scene::ISceneManager* sceneManager)
+        : Mode(NO_MANAGEMENT), RequestedMode(NO_MANAGEMENT),
+        SceneManager(sceneManager), SceneLightList(0),
+        CurrentRenderPass(scene::ESNRP_NONE), CurrentSceneNode(0)
+    { }
+
+    // The input receiver interface, which just switches light management strategy
+    bool OnEvent(const SEvent & event)
+    {
+        bool handled = false;
+
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT && event.KeyInput.PressedDown)
+        {
+            handled = true;
+            switch(event.KeyInput.Key)
+            {
+            case irr::KEY_KEY_1:
+                RequestedMode = NO_MANAGEMENT;
+                break;
+            case irr::KEY_KEY_2:
+                RequestedMode = LIGHTS_NEAREST_NODE;
+                break;
+            case irr::KEY_KEY_3:
+                RequestedMode = LIGHTS_IN_ZONE;
+                break;
+            default:
+                handled = false;
+                break;
+            }
+
+            if(NO_MANAGEMENT == RequestedMode)
+                SceneManager->setLightManager(0); // Show that it's safe to register the light manager
+            else
+                SceneManager->setLightManager(this);
+        }
+
+        return handled;
+    }
+
+
+    // This is called before the first scene node is rendered.
+    virtual void OnPreRender(core::array<scene::ISceneNode*> & lightList)
+    {
+        // Update the mode; changing it here ensures that it's consistent throughout a render
+        Mode = RequestedMode;
+
+        // Store the light list. I am free to alter this list until the end of OnPostRender().
+        SceneLightList = &lightList;
+    }
+
+    // Called after the last scene node is rendered.
+    virtual void OnPostRender()
+    {
+        // Since light management might be switched off in the event handler, we'll turn all
+        // lights on to ensure that they are in a consistent state. You wouldn't normally have
+        // to do this when using a light manager, since you'd continue to do light management
+        // yourself.
+        for (u32 i = 0; i < SceneLightList->size(); i++)
+            (*SceneLightList)[i]->setVisible(true);
+    }
+
+    virtual void OnRenderPassPreRender(scene::E_SCENE_NODE_RENDER_PASS renderPass)
+    {
+        // I don't have to do anything here except remember which render pass I am in.
+        CurrentRenderPass = renderPass;
+    }
+
+    virtual void OnRenderPassPostRender(scene::E_SCENE_NODE_RENDER_PASS renderPass)
+    {
+        // I only want solid nodes to be lit, so after the solid pass, turn all lights off.
+        if (scene::ESNRP_SOLID == renderPass)
+        {
+            for (u32 i = 0; i < SceneLightList->size(); ++i)
+                (*SceneLightList)[i]->setVisible(false);
+        }
+    }
+
+    // This is called before the specified scene node is rendered
+    virtual void OnNodePreRender(scene::ISceneNode* node)
+    {
+        CurrentSceneNode = node;
+
+        // This light manager only considers solid objects, but you are free to manipulate
+        // lights during any phase, depending on your requirements.
+        if (scene::ESNRP_SOLID != CurrentRenderPass)
+            return;
+
+        // And in fact for this example, I only want to consider lighting for cube scene
+        // nodes.  You will probably want to deal with lighting for (at least) mesh /
+        // animated mesh scene nodes as well.
+        if (node->getType() != scene::ESNT_CUBE)
+            return;
+
+        if (LIGHTS_NEAREST_NODE == Mode)
+        {
+            // This is a naive implementation that prioritises every light in the scene
+            // by its proximity to the node being rendered.  This produces some flickering
+            // when lights orbit closer to a cube than its 'zone' lights.
+            const vector3df nodePosition = node->getAbsolutePosition();
+
+            // Sort the light list by prioritising them based on their distance from the node
+            // that's about to be rendered.
+            array<LightDistanceElement> sortingArray;
+            sortingArray.reallocate(SceneLightList->size());
+
+            u32 i;
+            for(i = 0; i < SceneLightList->size(); ++i)
+            {
+                scene::ISceneNode* lightNode = (*SceneLightList)[i];
+                const f64 distance = lightNode->getAbsolutePosition().getDistanceFromSQ(nodePosition);
+                sortingArray.push_back(LightDistanceElement(lightNode, distance));
+            }
+
+            sortingArray.sort();
+
+            // The list is now sorted by proximity to the node.
+            // Turn on the three nearest lights, and turn the others off.
+            for(i = 0; i < sortingArray.size(); ++i)
+                sortingArray[i].node->setVisible(i < 3);
+        }
+        else if(LIGHTS_IN_ZONE == Mode)
+        {
+            // Empty scene nodes are used to represent 'zones'.  For each solid mesh that
+            // is being rendered, turn off all lights, then find its 'zone' parent, and turn
+            // on all lights that are found under that node in the scene graph.
+            // This is a general purpose algorithm that doesn't use any special
+            // knowledge of how this particular scene graph is organised.
+            for (u32 i = 0; i < SceneLightList->size(); ++i)
+            {
+                if ((*SceneLightList)[i]->getType() != scene::ESNT_LIGHT)
+                    continue;
+                scene::ILightSceneNode* lightNode = static_cast<scene::ILightSceneNode*>((*SceneLightList)[i]);
+                video::SLight & lightData = lightNode->getLightData();
+
+                if (video::ELT_DIRECTIONAL != lightData.Type)
+                    lightNode->setVisible(false);
+            }
+
+            scene::ISceneNode * parentZone = findZone(node);
+            if (parentZone)
+                turnOnZoneLights(parentZone);
+        }
+    }
+
+    // Called after the specified scene node is rendered
+    virtual void OnNodePostRender(scene::ISceneNode* node)
+    {
+        // I don't need to do any light management after individual node rendering.
+    }
+
+private:
+
+    // Find the empty scene node that is the parent of the specified node
+    scene::ISceneNode * findZone(scene::ISceneNode * node)
+    {
+        if (!node)
+            return 0;
+
+        if (node->getType() == scene::ESNT_EMPTY)
+            return node;
+
+        return findZone(node->getParent());
+    }
+
+    // Turn on all lights that are children (directly or indirectly) of the
+    // specified scene node.
+    void turnOnZoneLights(scene::ISceneNode * node)
+    {
+        core::list<scene::ISceneNode*> const & children = node->getChildren();
+        for (core::list<scene::ISceneNode*>::ConstIterator child = children.begin();
+            child != children.end(); ++child)
+        {
+            if ((*child)->getType() == scene::ESNT_LIGHT)
+                (*child)->setVisible(true);
+            else // Assume that lights don't have any children that are also lights
+                turnOnZoneLights(*child);
+        }
+    }
+
+
+    // A utility class to aid in sorting scene nodes into a distance order
+    class LightDistanceElement
+    {
+    public:
+        LightDistanceElement() {};
+
+        LightDistanceElement(scene::ISceneNode* n, f64 d)
+            : node(n), distance(d) { }
+
+        scene::ISceneNode* node;
+        f64 distance;
+
+        // Lower distance elements are sorted to the start of the array
+        bool operator < (const LightDistanceElement& other) const
+        {
+            return (distance < other.distance);
+        }
+    };
+};
+
int main(int argumentCount, char * argumentValues[])
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    IrrlichtDevice *device = createDevice(driverType,
+            dimension2d<u32>(640, 480), 32);
+
+    if(!device)
+        return -1;
+
+    f32 const lightRadius = 60.f; // Enough to reach the far side of each 'zone'
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+    gui::IGUIEnvironment* guienv = device->getGUIEnvironment();
+
+    gui::IGUISkin* skin = guienv->getSkin();
+    if (skin)
+    {
+        skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255, 255, 255, 255));
+        gui::IGUIFont* font = guienv->getFont("../../media/fontlucida.png");
+        if(font)
+            skin->setFont(font);
+    }
+
+    guienv->addStaticText(L"1 - No light management", core::rect<s32>(10,10,200,30));
+    guienv->addStaticText(L"2 - Closest 3 lights", core::rect<s32>(10,30,200,50));
+    guienv->addStaticText(L"3 - Lights in zone", core::rect<s32>(10,50,200,70));
+

Add several "zones". You could use this technique to light individual rooms, for example.

+
    for(f32 zoneX = -100.f; zoneX <= 100.f; zoneX += 50.f)
+        for(f32 zoneY = -60.f; zoneY <= 60.f; zoneY += 60.f)
+        {
+            // Start with an empty scene node, which we will use to represent a zone.
+            scene::ISceneNode * zoneRoot = smgr->addEmptySceneNode();
+            zoneRoot->setPosition(vector3df(zoneX, zoneY, 0));
+
+            // Each zone contains a rotating cube
+            scene::IMeshSceneNode * node = smgr->addCubeSceneNode(15, zoneRoot);
+            scene::ISceneNodeAnimator * rotation = smgr->createRotationAnimator(vector3df(0.25f, 0.5f, 0.75f));
+            node->addAnimator(rotation);
+            rotation->drop();
+
+            // And each cube has three lights attached to it.  The lights are attached to billboards so
+            // that we can see where they are.  The billboards are attached to the cube, so that the
+            // lights are indirect descendents of the same empty scene node as the cube.
+            scene::IBillboardSceneNode * billboard = smgr->addBillboardSceneNode(node);
+            billboard->setPosition(vector3df(0, -14, 30));
+            billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+            billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+            billboard->setMaterialFlag(video::EMF_LIGHTING, false);
+            smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(1, 0, 0), lightRadius);
+
+            billboard = smgr->addBillboardSceneNode(node);
+            billboard->setPosition(vector3df(-21, -14, -21));
+            billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+            billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+            billboard->setMaterialFlag(video::EMF_LIGHTING, false);
+            smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 1, 0), lightRadius);
+
+            billboard = smgr->addBillboardSceneNode(node);
+            billboard->setPosition(vector3df(21, -14, -21));
+            billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+            billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+            billboard->setMaterialFlag(video::EMF_LIGHTING, false);
+            smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 0, 1), lightRadius);
+
+            // Each cube also has a smaller cube rotating around it, to show that the cubes are being
+            // lit by the lights in their 'zone', not just lights that are their direct children.
+            node = smgr->addCubeSceneNode(5, node);
+            node->setPosition(vector3df(0, 21, 0));
+        }
+
+    smgr->addCameraSceneNode(0, vector3df(0,0,-130), vector3df(0,0,0));
+
+    CMyLightManager * myLightManager = new CMyLightManager(smgr);
+    smgr->setLightManager(0); // This is the default: we won't do light management until told to do it.
+    device->setEventReceiver(myLightManager);
+
+    int lastFps = -1;
+
+    while(device->run())
+    {
+        driver->beginScene(true, true, video::SColor(255,100,101,140));
+        smgr->drawAll();
+        guienv->drawAll();
+        driver->endScene();
+
+        int fps = driver->getFPS();
+        if(fps != lastFps)
+        {
+            lastFps = fps;
+            core::stringw str = L"Managed Lights [";
+            str += driver->getName();
+            str += "] FPS:";
+            str += fps;
+            device->setWindowCaption(str.c_str());
+        }
+    }
+
+    myLightManager->drop(); // Drop my implicit reference
+    device->drop();
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example021.html b/src/others/irrlicht-1.8.1/doc/html/example021.html new file mode 100644 index 0000000..8a0f3c4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example021.html @@ -0,0 +1,2190 @@ + + + + +Irrlicht 3D Engine: Tutorial 21: Quake3 Explorer + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 21: Quake3 Explorer
+
+
+
+021shot.jpg +
+

This Tutorial shows how to load different Quake 3 maps.

+

Features:

+
    +
  • Load BSP Archives at Runtime from the menu
  • +
  • Load a Map from the menu. Showing with Screenshot
  • +
  • Set the VideoDriver at runtime from menu
  • +
  • Adjust GammaLevel at runtime
  • +
  • Create SceneNodes for the Shaders
  • +
  • Load EntityList and create Entity SceneNodes
  • +
  • Create Players with Weapons and with Collision Response
  • +
  • Play music
  • +
+

You can download the Quake III Arena demo ( copyright id software ) at the following location: ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe

+

Copyright 2006-2011 Burningwater, Thomas Alten

+
#include "driverChoice.h"
+#include <irrlicht.h>
+#include "q3factory.h"
+#include "sound.h"
+

Game Data is used to hold Data which is needed to drive the game

+
struct GameData
+{
+    GameData ( const path &startupDir) :
+        retVal(0), StartupDir(startupDir), createExDevice(0), Device(0)
+    {
+        setDefault ();
+    }
+
+    void setDefault ();
+    s32 save ( const path &filename );
+    s32 load ( const path &filename );
+
+    s32 debugState;
+    s32 gravityState;
+    s32 flyTroughState;
+    s32 wireFrame;
+    s32 guiActive;
+    s32 guiInputActive;
+    f32 GammaValue;
+    s32 retVal;
+    s32 sound;
+
+    path StartupDir;
+    stringw CurrentMapName;
+    array<path> CurrentArchiveList;
+
+    vector3df PlayerPosition;
+    vector3df PlayerRotation;
+
+    tQ3EntityList Variable;
+
+    Q3LevelLoadParameter loadParam;
+    SIrrlichtCreationParameters deviceParam;
+    funcptr_createDeviceEx createExDevice;
+    IrrlichtDevice *Device;
+};
+

set default settings

+
void GameData::setDefault ()
+{
+    debugState = EDS_OFF;
+    gravityState = 1;
+    flyTroughState = 0;
+    wireFrame = 0;
+    guiActive = 1;
+    guiInputActive = 0;
+    GammaValue = 1.f;
+
+    // default deviceParam;
+#if defined ( _IRR_WINDOWS_ )
+    deviceParam.DriverType = EDT_DIRECT3D9;
+#else
+    deviceParam.DriverType = EDT_OPENGL;
+#endif
+    deviceParam.WindowSize.Width = 800;
+    deviceParam.WindowSize.Height = 600;
+    deviceParam.Fullscreen = false;
+    deviceParam.Bits = 24;
+    deviceParam.ZBufferBits = 16;
+    deviceParam.Vsync = false;
+    deviceParam.AntiAlias = false;
+
+    // default Quake3 loadParam
+    loadParam.defaultLightMapMaterial = EMT_LIGHTMAP;
+    loadParam.defaultModulate = EMFN_MODULATE_1X;
+    loadParam.defaultFilter = EMF_ANISOTROPIC_FILTER;
+    loadParam.verbose = 2;
+    loadParam.mergeShaderBuffer = 1;        // merge meshbuffers with same material
+    loadParam.cleanUnResolvedMeshes = 1;    // should unresolved meshes be cleaned. otherwise blue texture
+    loadParam.loadAllShaders = 1;           // load all scripts in the script directory
+    loadParam.loadSkyShader = 0;            // load sky Shader
+    loadParam.alpharef = 1;
+
+    sound = 0;
+
+    CurrentMapName = "";
+    CurrentArchiveList.clear ();
+
+    // Explorer Media directory
+    CurrentArchiveList.push_back ( StartupDir + "../../media/" );
+
+    // Add the original quake3 files before you load your custom map
+    // Most mods are using the original shaders, models&items&weapons
+    CurrentArchiveList.push_back("/q/baseq3/");
+
+    CurrentArchiveList.push_back(StartupDir + "../../media/map-20kdm2.pk3");
+}
+

Load the current game State from a typical quake3 cfg file

+
s32 GameData::load ( const path &filename )
+{
+    if (!Device)
+        return 0;
+
+    // the quake3 mesh loader can also handle *.shader and *.cfg file
+    IQ3LevelMesh* mesh = (IQ3LevelMesh*) Device->getSceneManager()->getMesh ( filename );
+    if (!mesh)
+        return 0;
+
+    tQ3EntityList &entityList = mesh->getEntityList ();
+
+    stringc s;
+    u32 pos;
+
+    for ( u32 e = 0; e != entityList.size (); ++e )
+    {
+        //dumpShader ( s, &entityList[e], false );
+        //printf ( s.c_str () );
+
+        for ( u32 g = 0; g != entityList[e].getGroupSize (); ++g )
+        {
+            const SVarGroup *group = entityList[e].getGroup ( g );
+
+            for ( u32 index = 0; index < group->Variable.size (); ++index )
+            {
+                const SVariable &v = group->Variable[index];
+                pos = 0;
+                if ( v.name == "playerposition" )
+                {
+                    PlayerPosition = getAsVector3df ( v.content, pos );
+                }
+                else
+                if ( v.name == "playerrotation" )
+                {
+                    PlayerRotation = getAsVector3df ( v.content, pos );
+                }
+            }
+        }
+    }
+
+    return 1;
+}
+

Store the current game State in a quake3 configuration file

+
s32 GameData::save ( const path &filename )
+{
+    return 0;
+    if (!Device)
+        return 0;
+
+    c8 buf[128];
+    u32 i;
+
+    // Store current Archive for restart
+    CurrentArchiveList.clear();
+    IFileSystem *fs = Device->getFileSystem();
+    for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+    {
+        CurrentArchiveList.push_back ( fs->getFileArchive(i)->getFileList()->getPath() );
+    }
+
+    // Store Player Position and Rotation
+    ICameraSceneNode * camera = Device->getSceneManager()->getActiveCamera ();
+    if ( camera )
+    {
+        PlayerPosition = camera->getPosition ();
+        PlayerRotation = camera->getRotation ();
+    }
+
+    IWriteFile *file = fs->createAndWriteFile ( filename );
+    if (!file)
+        return 0;
+
+    snprintf ( buf, 128, "playerposition %.f %.f %.f\nplayerrotation %.f %.f %.f\n",
+            PlayerPosition.X, PlayerPosition.Z, PlayerPosition.Y,
+            PlayerRotation.X, PlayerRotation.Z, PlayerRotation.Y);
+    file->write ( buf, (s32) strlen ( buf ) );
+    for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+    {
+        snprintf ( buf, 128, "archive %s\n",stringc ( fs->getFileArchive(i)->getFileList()->getPath() ).c_str () );
+        file->write ( buf, (s32) strlen ( buf ) );
+    }
+
+    file->drop ();
+    return 1;
+}
+

Representing a player

+
struct Q3Player : public IAnimationEndCallBack
+{
+    Q3Player ()
+    : Device(0), MapParent(0), Mesh(0), WeaponNode(0), StartPositionCurrent(0)
+    {
+        animation[0] = 0;
+        memset(Anim, 0, sizeof(TimeFire)*4);
+    }
+
+    virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node);
+
+    void create (   IrrlichtDevice *device,
+                    IQ3LevelMesh* mesh,
+                    ISceneNode *mapNode,
+                    IMetaTriangleSelector *meta
+                );
+    void shutdown ();
+    void setAnim ( const c8 *name );
+    void respawn ();
+    void setpos ( const vector3df &pos, const vector3df& rotation );
+
+    ISceneNodeAnimatorCollisionResponse * cam() { return camCollisionResponse ( Device ); }
+
+    IrrlichtDevice *Device;
+    ISceneNode* MapParent;
+    IQ3LevelMesh* Mesh;
+    IAnimatedMeshSceneNode* WeaponNode;
+    s32 StartPositionCurrent;
+    TimeFire Anim[4];
+    c8 animation[64];
+    c8 buf[64];
+};
+

End player

+
void Q3Player::shutdown ()
+{
+    setAnim ( 0 );
+
+    dropElement (WeaponNode);
+
+    if ( Device )
+    {
+        ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();
+        dropElement ( camera );
+        Device = 0;
+    }
+
+    MapParent = 0;
+    Mesh = 0;
+}
+

create a new player

+
void Q3Player::create ( IrrlichtDevice *device, IQ3LevelMesh* mesh, ISceneNode *mapNode, IMetaTriangleSelector *meta )
+{
+    setTimeFire ( Anim + 0, 200, FIRED );
+    setTimeFire ( Anim + 1, 5000 );
+
+    if (!device)
+        return;
+    // load FPS weapon to Camera
+    Device = device;
+    Mesh = mesh;
+    MapParent = mapNode;
+
+    ISceneManager *smgr = device->getSceneManager ();
+    IVideoDriver * driver = device->getVideoDriver();
+
+    ICameraSceneNode* camera = 0;
+
+    SKeyMap keyMap[10];
+    keyMap[0].Action = EKA_MOVE_FORWARD;
+    keyMap[0].KeyCode = KEY_UP;
+    keyMap[1].Action = EKA_MOVE_FORWARD;
+    keyMap[1].KeyCode = KEY_KEY_W;
+
+    keyMap[2].Action = EKA_MOVE_BACKWARD;
+    keyMap[2].KeyCode = KEY_DOWN;
+    keyMap[3].Action = EKA_MOVE_BACKWARD;
+    keyMap[3].KeyCode = KEY_KEY_S;
+
+    keyMap[4].Action = EKA_STRAFE_LEFT;
+    keyMap[4].KeyCode = KEY_LEFT;
+    keyMap[5].Action = EKA_STRAFE_LEFT;
+    keyMap[5].KeyCode = KEY_KEY_A;
+
+    keyMap[6].Action = EKA_STRAFE_RIGHT;
+    keyMap[6].KeyCode = KEY_RIGHT;
+    keyMap[7].Action = EKA_STRAFE_RIGHT;
+    keyMap[7].KeyCode = KEY_KEY_D;
+
+    keyMap[8].Action = EKA_JUMP_UP;
+    keyMap[8].KeyCode = KEY_KEY_J;
+
+    keyMap[9].Action = EKA_CROUCH;
+    keyMap[9].KeyCode = KEY_KEY_C;
+
+    camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 0.6f, -1, keyMap, 10, false, 0.6f);
+    camera->setName ( "First Person Camera" );
+    //camera->setFOV ( 100.f * core::DEGTORAD );
+    camera->setFarValue( 20000.f );
+
+    IAnimatedMeshMD2* weaponMesh = (IAnimatedMeshMD2*) smgr->getMesh("gun.md2");
+    if ( 0 == weaponMesh )
+        return;
+
+    if ( weaponMesh->getMeshType() == EAMT_MD2 )
+    {
+        s32 count = weaponMesh->getAnimationCount();
+        for ( s32 i = 0; i != count; ++i )
+        {
+            snprintf ( buf, 64, "Animation: %s", weaponMesh->getAnimationName(i) );
+            device->getLogger()->log(buf, ELL_INFORMATION);
+        }
+    }
+
+    WeaponNode = smgr->addAnimatedMeshSceneNode(
+                        weaponMesh,
+                        smgr->getActiveCamera(),
+                        10,
+                        vector3df( 0, 0, 0),
+                        vector3df(-90,-90,90)
+                        );
+    WeaponNode->setMaterialFlag(EMF_LIGHTING, false);
+    WeaponNode->setMaterialTexture(0, driver->getTexture( "gun.jpg"));
+    WeaponNode->setLoopMode ( false );
+    WeaponNode->setName ( "tommi the gun man" );
+
+    //create a collision auto response animator
+    ISceneNodeAnimator* anim =
+        smgr->createCollisionResponseAnimator( meta, camera,
+            vector3df(30,45,30),
+            getGravity ( "earth" ),
+            vector3df(0,40,0),
+            0.0005f
+        );
+
+    camera->addAnimator( anim );
+    anim->drop();
+
+    if ( meta )
+    {
+        meta->drop ();
+    }
+
+    respawn ();
+    setAnim ( "idle" );
+}
+

so we need a good starting Position in the level. we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch"

+
void Q3Player::respawn ()
+{
+    if (!Device)
+        return;
+    ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();
+
+    Device->getLogger()->log( "respawn" );
+
+    if ( StartPositionCurrent >= Q3StartPosition (
+            Mesh, camera,StartPositionCurrent++,
+            cam ()->getEllipsoidTranslation() )
+        )
+    {
+        StartPositionCurrent = 0;
+    }
+}
+

set Player position from saved coordinates

+
void Q3Player::setpos ( const vector3df &pos, const vector3df &rotation )
+{
+    if (!Device)
+        return;
+    Device->getLogger()->log( "setpos" );
+
+    ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera();
+    if ( camera )
+    {
+        camera->setPosition ( pos );
+        camera->setRotation ( rotation );
+        camera->OnAnimate ( 0 );
+    }
+}
+

set the Animation of the player and weapon

+
void Q3Player::setAnim ( const c8 *name )
+{
+    if ( name )
+    {
+        snprintf ( animation, 64, "%s", name );
+        if ( WeaponNode )
+        {
+            WeaponNode->setAnimationEndCallback ( this );
+            WeaponNode->setMD2Animation ( animation );
+        }
+    }
+    else
+    {
+        animation[0] = 0;
+        if ( WeaponNode )
+        {
+            WeaponNode->setAnimationEndCallback ( 0 );
+        }
+    }
+}
+
+
+// Callback
+void Q3Player::OnAnimationEnd(IAnimatedMeshSceneNode* node)
+{
+    setAnim ( 0 );
+}
+

GUI Elements

+
struct GUI
+{
+    GUI ()
+    {
+        memset ( this, 0, sizeof ( *this ) );
+    }
+
+    void drop()
+    {
+        dropElement ( Window );
+        dropElement ( Logo );
+    }
+
+    IGUIComboBox* VideoDriver;
+    IGUIComboBox* VideoMode;
+    IGUICheckBox* FullScreen;
+    IGUICheckBox* Bit32;
+    IGUIScrollBar* MultiSample;
+    IGUIButton* SetVideoMode;
+
+    IGUIScrollBar* Tesselation;
+    IGUIScrollBar* Gamma;
+    IGUICheckBox* Collision;
+    IGUICheckBox* Visible_Map;
+    IGUICheckBox* Visible_Shader;
+    IGUICheckBox* Visible_Fog;
+    IGUICheckBox* Visible_Unresolved;
+    IGUICheckBox* Visible_Skydome;
+    IGUIButton* Respawn;
+
+    IGUITable* ArchiveList;
+    IGUIButton* ArchiveAdd;
+    IGUIButton* ArchiveRemove;
+    IGUIFileOpenDialog* ArchiveFileOpen;
+    IGUIButton* ArchiveUp;
+    IGUIButton* ArchiveDown;
+
+    IGUIListBox* MapList;
+    IGUITreeView* SceneTree;
+    IGUIStaticText* StatusLine;
+    IGUIImage* Logo;
+    IGUIWindow* Window;
+};
+

CQuake3EventHandler controls the game

+
class CQuake3EventHandler : public IEventReceiver
+{
+public:
+
+    CQuake3EventHandler( GameData *gameData );
+    virtual ~CQuake3EventHandler ();
+
+    void Animate();
+    void Render();
+
+    void AddArchive ( const path& archiveName );
+    void LoadMap ( const stringw& mapName, s32 collision );
+    void CreatePlayers();
+    void AddSky( u32 dome, const c8 *texture );
+    Q3Player *GetPlayer ( u32 index ) { return &Player[index]; }
+
+    void CreateGUI();
+    void SetGUIActive( s32 command);
+
+    bool OnEvent(const SEvent& eve);
+
+
+private:
+
+    GameData *Game;
+
+    IQ3LevelMesh* Mesh;
+    ISceneNode* MapParent;
+    ISceneNode* ShaderParent;
+    ISceneNode* ItemParent;
+    ISceneNode* UnresolvedParent;
+    ISceneNode* BulletParent;
+    ISceneNode* FogParent;
+    ISceneNode * SkyNode;
+    IMetaTriangleSelector *Meta;
+
+    c8 buf[256];
+
+    Q3Player Player[2];
+
+    struct SParticleImpact
+    {
+        u32 when;
+        vector3df pos;
+        vector3df outVector;
+    };
+    array<SParticleImpact> Impacts;
+    void useItem( Q3Player * player);
+    void createParticleImpacts( u32 now );
+
+    void createTextures ();
+    void addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent);
+
+    GUI gui;
+    void dropMap ();
+};
+

Constructor

+
CQuake3EventHandler::CQuake3EventHandler( GameData *game )
+: Game(game), Mesh(0), MapParent(0), ShaderParent(0), ItemParent(0), UnresolvedParent(0),
+    BulletParent(0), FogParent(0), SkyNode(0), Meta(0)
+{
+    buf[0]=0;
+    // Also use 16 Bit Textures for 16 Bit RenderDevice
+    if ( Game->deviceParam.Bits == 16 )
+    {
+        game->Device->getVideoDriver()->setTextureCreationFlag(ETCF_ALWAYS_16_BIT, true);
+    }
+
+    // Quake3 Shader controls Z-Writing
+    game->Device->getSceneManager()->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
+
+    // create internal textures
+    createTextures ();
+
+    sound_init ( game->Device );
+
+    Game->Device->setEventReceiver ( this );
+}
+
+
+// destructor
+CQuake3EventHandler::~CQuake3EventHandler ()
+{
+    Player[0].shutdown ();
+    sound_shutdown ();
+
+    Game->save( "explorer.cfg" );
+
+    Game->Device->drop();
+}
+
+
+// create runtime textures smog, fog
+void CQuake3EventHandler::createTextures()
+{
+    IVideoDriver * driver = Game->Device->getVideoDriver();
+
+    dimension2du dim(64, 64);
+
+    video::IImage* image;
+    u32 i;
+    u32 x;
+    u32 y;
+    u32 * data;
+    for ( i = 0; i != 8; ++i )
+    {
+        image = driver->createImage ( video::ECF_A8R8G8B8, dim);
+        data = (u32*) image->lock ();
+        for ( y = 0; y != dim.Height; ++y )
+        {
+            for ( x = 0; x != dim.Width; ++x )
+            {
+                data [x] = 0xFFFFFFFF;
+            }
+            data = (u32*) ( (u8*) data + image->getPitch() );
+        }
+        image->unlock();
+        snprintf ( buf, 64, "smoke_%02d", i );
+        driver->addTexture( buf, image );
+        image->drop ();
+    }
+
+    // fog
+    for ( i = 0; i != 1; ++i )
+    {
+        image = driver->createImage ( video::ECF_A8R8G8B8, dim);
+        data = (u32*) image->lock ();
+        for ( y = 0; y != dim.Height; ++y )
+        {
+            for ( x = 0; x != dim.Width; ++x )
+            {
+                data [x] = 0xFFFFFFFF;
+            }
+            data = (u32*) ( (u8*) data + image->getPitch() );
+        }
+        image->unlock();
+        snprintf ( buf, 64, "fog_%02d", i );
+        driver->addTexture( buf, image );
+        image->drop ();
+    }
+}
+

create the GUI

+
void CQuake3EventHandler::CreateGUI()
+{
+
+    IGUIEnvironment *env = Game->Device->getGUIEnvironment();
+    IVideoDriver * driver = Game->Device->getVideoDriver();
+
+    gui.drop();
+
+    // set skin font
+    IGUIFont* font = env->getFont("fontlucida.png");
+    if (font)
+        env->getSkin()->setFont(font);
+    env->getSkin()->setColor ( EGDC_BUTTON_TEXT, video::SColor(240,0xAA,0xAA,0xAA) );
+    env->getSkin()->setColor ( EGDC_3D_HIGH_LIGHT, video::SColor(240,0x22,0x22,0x22) );
+    env->getSkin()->setColor ( EGDC_3D_FACE, video::SColor(240,0x44,0x44,0x44) );
+    env->getSkin()->setColor ( EGDC_EDITABLE, video::SColor(240,0x44,0x44,0x44) );
+    env->getSkin()->setColor ( EGDC_FOCUSED_EDITABLE, video::SColor(240,0x54,0x54,0x54) );
+    env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) );
+
+    // minimal gui size 800x600
+    dimension2d<u32> dim ( 800, 600 );
+    dimension2d<u32> vdim ( Game->Device->getVideoDriver()->getScreenSize() );
+
+    if ( vdim.Height >= dim.Height && vdim.Width >= dim.Width )
+    {
+        //dim = vdim;
+    }
+    else
+    {
+    }
+
+    gui.Window = env->addWindow ( rect<s32> ( 0, 0, dim.Width, dim.Height ), false, L"Quake3 Explorer" );
+    gui.Window->setToolTipText ( L"Quake3Explorer. Loads and show various BSP File Format and Shaders." );
+    gui.Window->getCloseButton()->setToolTipText ( L"Quit Quake3 Explorer" );
+
+    // add a status line help text
+    gui.StatusLine = env->addStaticText( 0, rect<s32>( 5,dim.Height - 30,dim.Width - 5,dim.Height - 10),
+                                false, false, gui.Window, -1, true
+                            );
+
+
+    env->addStaticText ( L"VideoDriver:", rect<s32>( dim.Width - 400, 24, dim.Width - 310, 40 ),false, false, gui.Window, -1, false );
+    gui.VideoDriver = env->addComboBox(rect<s32>( dim.Width - 300, 24, dim.Width - 10, 40 ),gui.Window);
+    gui.VideoDriver->addItem(L"Direct3D 9.0c", EDT_DIRECT3D9 );
+    gui.VideoDriver->addItem(L"Direct3D 8.1", EDT_DIRECT3D8 );
+    gui.VideoDriver->addItem(L"OpenGL 1.5", EDT_OPENGL);
+    gui.VideoDriver->addItem(L"Software Renderer", EDT_SOFTWARE);
+    gui.VideoDriver->addItem(L"Burning's Video (TM) Thomas Alten", EDT_BURNINGSVIDEO);
+    gui.VideoDriver->setSelected ( gui.VideoDriver->getIndexForItemData ( Game->deviceParam.DriverType ) );
+    gui.VideoDriver->setToolTipText ( L"Use a VideoDriver" );
+
+    env->addStaticText ( L"VideoMode:", rect<s32>( dim.Width - 400, 44, dim.Width - 310, 60 ),false, false, gui.Window, -1, false );
+    gui.VideoMode = env->addComboBox(rect<s32>( dim.Width - 300, 44, dim.Width - 10, 60 ),gui.Window);
+    gui.VideoMode->setToolTipText ( L"Supported Screenmodes" );
+    IVideoModeList *modeList = Game->Device->getVideoModeList();
+    if ( modeList )
+    {
+        s32 i;
+        for ( i = 0; i != modeList->getVideoModeCount (); ++i )
+        {
+            u16 d = modeList->getVideoModeDepth ( i );
+            if ( d < 16 )
+                continue;
+
+            u16 w = modeList->getVideoModeResolution ( i ).Width;
+            u16 h = modeList->getVideoModeResolution ( i ).Height;
+            u32 val = w << 16 | h;
+
+            if ( gui.VideoMode->getIndexForItemData ( val ) >= 0 )
+                continue;
+
+            f32 aspect = (f32) w / (f32) h;
+            const c8 *a = "";
+            if ( core::equals ( aspect, 1.3333333333f ) ) a = "4:3";
+            else if ( core::equals ( aspect, 1.6666666f ) ) a = "15:9 widescreen";
+            else if ( core::equals ( aspect, 1.7777777f ) ) a = "16:9 widescreen";
+            else if ( core::equals ( aspect, 1.6f ) ) a = "16:10 widescreen";
+            else if ( core::equals ( aspect, 2.133333f ) ) a = "20:9 widescreen";
+
+            snprintf ( buf, sizeof ( buf ), "%d x %d, %s",w, h, a );
+            gui.VideoMode->addItem ( stringw ( buf ).c_str(), val );
+        }
+    }
+    gui.VideoMode->setSelected ( gui.VideoMode->getIndexForItemData (
+                                    Game->deviceParam.WindowSize.Width << 16 |
+                                    Game->deviceParam.WindowSize.Height ) );
+
+    gui.FullScreen = env->addCheckBox ( Game->deviceParam.Fullscreen, rect<s32>( dim.Width - 400, 64, dim.Width - 300, 80 ), gui.Window,-1, L"Fullscreen" );
+    gui.FullScreen->setToolTipText ( L"Set Fullscreen or Window Mode" );
+
+    gui.Bit32 = env->addCheckBox ( Game->deviceParam.Bits == 32, rect<s32>( dim.Width - 300, 64, dim.Width - 240, 80 ), gui.Window,-1, L"32Bit" );
+    gui.Bit32->setToolTipText ( L"Use 16 or 32 Bit" );
+
+    env->addStaticText ( L"MultiSample:", rect<s32>( dim.Width - 235, 64, dim.Width - 150, 80 ),false, false, gui.Window, -1, false );
+    gui.MultiSample = env->addScrollBar( true, rect<s32>( dim.Width - 150, 64, dim.Width - 70, 80 ), gui.Window,-1 );
+    gui.MultiSample->setMin ( 0 );
+    gui.MultiSample->setMax ( 8 );
+    gui.MultiSample->setSmallStep ( 1 );
+    gui.MultiSample->setLargeStep ( 1 );
+    gui.MultiSample->setPos ( Game->deviceParam.AntiAlias );
+    gui.MultiSample->setToolTipText ( L"Set the MultiSample (disable, 1x, 2x, 4x, 8x )" );
+
+    gui.SetVideoMode = env->addButton (rect<s32>( dim.Width - 60, 64, dim.Width - 10, 80 ), gui.Window, -1,L"set" );
+    gui.SetVideoMode->setToolTipText ( L"Set Video Mode with current values" );
+
+    env->addStaticText ( L"Gamma:", rect<s32>( dim.Width - 400, 104, dim.Width - 310, 120 ),false, false, gui.Window, -1, false );
+    gui.Gamma = env->addScrollBar( true, rect<s32>( dim.Width - 300, 104, dim.Width - 10, 120 ), gui.Window,-1 );
+    gui.Gamma->setMin ( 50 );
+    gui.Gamma->setMax ( 350 );
+    gui.Gamma->setSmallStep ( 1 );
+    gui.Gamma->setLargeStep ( 10 );
+    gui.Gamma->setPos ( core::floor32 ( Game->GammaValue * 100.f ) );
+    gui.Gamma->setToolTipText ( L"Adjust Gamma Ramp ( 0.5 - 3.5)" );
+    Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f );
+
+
+    env->addStaticText ( L"Tesselation:", rect<s32>( dim.Width - 400, 124, dim.Width - 310, 140 ),false, false, gui.Window, -1, false );
+    gui.Tesselation = env->addScrollBar( true, rect<s32>( dim.Width - 300, 124, dim.Width - 10, 140 ), gui.Window,-1 );
+    gui.Tesselation->setMin ( 2 );
+    gui.Tesselation->setMax ( 12 );
+    gui.Tesselation->setSmallStep ( 1 );
+    gui.Tesselation->setLargeStep ( 1 );
+    gui.Tesselation->setPos ( Game->loadParam.patchTesselation );
+    gui.Tesselation->setToolTipText ( L"How smooth should curved surfaces be rendered" );
+
+    gui.Collision = env->addCheckBox ( true, rect<s32>( dim.Width - 400, 150, dim.Width - 300, 166 ), gui.Window,-1, L"Collision" );
+    gui.Collision->setToolTipText ( L"Set collision on or off ( flythrough ). \nPress F7 on your Keyboard" );
+    gui.Visible_Map = env->addCheckBox ( true, rect<s32>( dim.Width - 300, 150, dim.Width - 240, 166 ), gui.Window,-1, L"Map" );
+    gui.Visible_Map->setToolTipText ( L"Show or not show the static part the Level. \nPress F3 on your Keyboard" );
+    gui.Visible_Shader = env->addCheckBox ( true, rect<s32>( dim.Width - 240, 150, dim.Width - 170, 166 ), gui.Window,-1, L"Shader" );
+    gui.Visible_Shader->setToolTipText ( L"Show or not show the Shader Nodes. \nPress F4 on your Keyboard" );
+    gui.Visible_Fog = env->addCheckBox ( true, rect<s32>( dim.Width - 170, 150, dim.Width - 110, 166 ), gui.Window,-1, L"Fog" );
+    gui.Visible_Fog->setToolTipText ( L"Show or not show the Fog Nodes. \nPress F5 on your Keyboard" );
+    gui.Visible_Unresolved = env->addCheckBox ( true, rect<s32>( dim.Width - 110, 150, dim.Width - 10, 166 ), gui.Window,-1, L"Unresolved" );
+    gui.Visible_Unresolved->setToolTipText ( L"Show the or not show the Nodes the Engine can't handle. \nPress F6 on your Keyboard" );
+    gui.Visible_Skydome = env->addCheckBox ( true, rect<s32>( dim.Width - 110, 180, dim.Width - 10, 196 ), gui.Window,-1, L"Skydome" );
+    gui.Visible_Skydome->setToolTipText ( L"Show the or not show the Skydome." );
+
+    //Respawn = env->addButton ( rect<s32>( dim.Width - 260, 90, dim.Width - 10, 106 ), 0,-1, L"Respawn" );
+
+    env->addStaticText ( L"Archives:", rect<s32>( 5, dim.Height - 530, dim.Width - 600,dim.Height - 514 ),false, false, gui.Window, -1, false );
+
+    gui.ArchiveAdd = env->addButton ( rect<s32>( dim.Width - 725, dim.Height - 530, dim.Width - 665, dim.Height - 514 ), gui.Window,-1, L"add" );
+    gui.ArchiveAdd->setToolTipText ( L"Add an archive, usually packed zip-archives (*.pk3) to the Filesystem" );
+    gui.ArchiveRemove = env->addButton ( rect<s32>( dim.Width - 660, dim.Height - 530, dim.Width - 600, dim.Height - 514 ), gui.Window,-1, L"del" );
+    gui.ArchiveRemove->setToolTipText ( L"Remove the selected archive from the FileSystem." );
+    gui.ArchiveUp = env->addButton ( rect<s32>( dim.Width - 575, dim.Height - 530, dim.Width - 515, dim.Height - 514 ), gui.Window,-1, L"up" );
+    gui.ArchiveUp->setToolTipText ( L"Arrange Archive Look-up Hirachy. Move the selected Archive up" );
+    gui.ArchiveDown = env->addButton ( rect<s32>( dim.Width - 510, dim.Height - 530, dim.Width - 440, dim.Height - 514 ), gui.Window,-1, L"down" );
+    gui.ArchiveDown->setToolTipText ( L"Arrange Archive Look-up Hirachy. Move the selected Archive down" );
+
+
+    gui.ArchiveList = env->addTable ( rect<s32>( 5,dim.Height - 510, dim.Width - 450,dim.Height - 410 ), gui.Window  );
+    gui.ArchiveList->addColumn ( L"Type", 0 );
+    gui.ArchiveList->addColumn ( L"Real File Path", 1 );
+    gui.ArchiveList->setColumnWidth ( 0, 60 );
+    gui.ArchiveList->setColumnWidth ( 1, 284 );
+    gui.ArchiveList->setToolTipText ( L"Show the attached Archives" );
+
+
+    env->addStaticText ( L"Maps:", rect<s32>( 5, dim.Height - 400, dim.Width - 450,dim.Height - 380 ),false, false, gui.Window, -1, false );
+    gui.MapList = env->addListBox ( rect<s32>( 5,dim.Height - 380, dim.Width - 450,dim.Height - 40  ), gui.Window, -1, true  );
+    gui.MapList->setToolTipText ( L"Show the current Maps in all Archives.\n Double-Click the Map to start the level" );
+
+
+    // create a visible Scene Tree
+    env->addStaticText ( L"Scenegraph:", rect<s32>( dim.Width - 400, dim.Height - 400, dim.Width - 5,dim.Height - 380 ),false, false, gui.Window, -1, false );
+    gui.SceneTree = env->addTreeView(   rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
+                                    gui.Window, -1, true, true, false );
+    gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" );
+    gui.SceneTree->getRoot()->clearChildren();
+    addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
+
+
+    IGUIImageList* imageList = env->createImageList(    driver->getTexture ( "iconlist.png" ),
+                                        dimension2di( 32, 32 ), true );
+
+    if ( imageList )
+    {
+        gui.SceneTree->setImageList( imageList );
+        imageList->drop ();
+    }
+
+
+    // load the engine logo
+    gui.Logo = env->addImage( driver->getTexture("irrlichtlogo3.png"), position2d<s32>(5, 16 ), true, 0 );
+    gui.Logo->setToolTipText ( L"The great Irrlicht Engine" );
+
+    AddArchive ( "" );
+}
+

Add an Archive to the FileSystems and updates the GUI

+
void CQuake3EventHandler::AddArchive ( const path& archiveName )
+{
+    IFileSystem *fs = Game->Device->getFileSystem();
+    u32 i;
+
+    if ( archiveName.size () )
+    {
+        bool exists = false;
+        for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+        {
+            if ( fs->getFileArchive(i)->getFileList()->getPath() == archiveName )
+            {
+                exists = true;
+                break;
+            }
+        }
+
+        if (!exists)
+        {
+            fs->addFileArchive(archiveName, true, false);
+        }
+    }
+
+    // store the current archives in game data
+    // show the attached Archive in proper order
+    if ( gui.ArchiveList )
+    {
+        gui.ArchiveList->clearRows();
+
+        for ( i = 0; i != fs->getFileArchiveCount(); ++i )
+        {
+            IFileArchive * archive = fs->getFileArchive ( i );
+
+            u32 index = gui.ArchiveList->addRow(i);
+
+            core::stringw typeName;
+            switch(archive->getType())
+            {
+            case io::EFAT_ZIP:
+                typeName = "ZIP";
+                break;
+            case io::EFAT_GZIP:
+                typeName = "gzip";
+                break;
+            case io::EFAT_FOLDER:
+                typeName = "Mount";
+                break;
+            case io::EFAT_PAK:
+                typeName = "PAK";
+                break;
+            case io::EFAT_TAR:
+                typeName = "TAR";
+                break;
+            default:
+                typeName = "archive";
+            }
+
+            gui.ArchiveList->setCellText ( index, 0, typeName );
+            gui.ArchiveList->setCellText ( index, 1, archive->getFileList()->getPath() );
+        }
+    }
+
+
+    // browse the archives for maps
+    if ( gui.MapList )
+    {
+        gui.MapList->clear();
+
+        IGUISpriteBank *bank = Game->Device->getGUIEnvironment()->getSpriteBank("sprite_q3map");
+        if ( 0 == bank )
+            bank = Game->Device->getGUIEnvironment()->addEmptySpriteBank("sprite_q3map");
+
+        SGUISprite sprite;
+        SGUISpriteFrame frame;
+        core::rect<s32> r;
+
+        bank->getSprites().clear();
+        bank->getPositions().clear ();
+        gui.MapList->setSpriteBank ( bank );
+
+        u32 g = 0;
+        core::stringw s;
+
+        // browse the attached file system
+        fs->setFileListSystem ( FILESYSTEM_VIRTUAL );
+        fs->changeWorkingDirectoryTo ( "/maps/" );
+        IFileList *fileList = fs->createFileList ();
+        fs->setFileListSystem ( FILESYSTEM_NATIVE );
+
+        for ( i=0; i< fileList->getFileCount(); ++i)
+        {
+            s = fileList->getFullFileName(i);
+            if ( s.find ( ".bsp" ) >= 0 )
+            {
+                // get level screenshot. reformat texture to 128x128
+                path c ( s );
+                deletePathFromFilename ( c );
+                cutFilenameExtension ( c, c );
+                c = path ( "levelshots/" ) + c;
+
+                dimension2du dim ( 128, 128 );
+                IVideoDriver * driver = Game->Device->getVideoDriver();
+                IImage* image = 0;
+                ITexture *tex = 0;
+                path filename;
+
+                filename = c + ".jpg";
+                if ( fs->existFile ( filename ) )
+                    image = driver->createImageFromFile( filename );
+                if ( 0 == image )
+                {
+                    filename = c + ".tga";
+                    if ( fs->existFile ( filename ) )
+                        image = driver->createImageFromFile( filename );
+                }
+
+                if ( image )
+                {
+                    IImage* filter = driver->createImage ( video::ECF_R8G8B8, dim );
+                    image->copyToScalingBoxFilter ( filter, 0 );
+                    image->drop ();
+                    image = filter;
+                }
+
+                if ( image )
+                {
+                    tex = driver->addTexture ( filename, image );
+                    image->drop ();
+                }
+
+
+                bank->setTexture ( g, tex );
+
+                r.LowerRightCorner.X = dim.Width;
+                r.LowerRightCorner.Y = dim.Height;
+                gui.MapList->setItemHeight ( r.LowerRightCorner.Y + 4 );
+                frame.rectNumber = bank->getPositions().size();
+                frame.textureNumber = g;
+
+                bank->getPositions().push_back(r);
+
+                sprite.Frames.set_used ( 0 );
+                sprite.Frames.push_back(frame);
+                sprite.frameTime = 0;
+                bank->getSprites().push_back(sprite);
+
+                gui.MapList->addItem ( s.c_str (), g );
+                g += 1;
+            }
+        }
+        fileList->drop ();
+
+        gui.MapList->setSelected ( -1 );
+        IGUIScrollBar * bar = (IGUIScrollBar*)gui.MapList->getElementFromId( 0 );
+        if ( bar )
+            bar->setPos ( 0 );
+
+    }
+
+}
+

clears the Map in Memory

+
void CQuake3EventHandler::dropMap ()
+{
+    IVideoDriver * driver = Game->Device->getVideoDriver();
+
+    driver->removeAllHardwareBuffers ();
+    driver->removeAllTextures ();
+
+    Player[0].shutdown ();
+
+
+    dropElement ( ItemParent );
+    dropElement ( ShaderParent );
+    dropElement ( UnresolvedParent );
+    dropElement ( FogParent );
+    dropElement ( BulletParent );
+
+
+    Impacts.clear();
+
+    if ( Meta )
+    {
+        Meta = 0;
+    }
+
+    dropElement ( MapParent );
+    dropElement ( SkyNode );
+
+    // clean out meshes, because textures are invalid
+    // TODO: better texture handling;-)
+    IMeshCache *cache = Game->Device->getSceneManager ()->getMeshCache();
+    cache->clear ();
+    Mesh = 0;
+}
+

Load new map

+
void CQuake3EventHandler::LoadMap ( const stringw &mapName, s32 collision )
+{
+    if ( 0 == mapName.size() )
+        return;
+
+    dropMap ();
+
+    IFileSystem *fs = Game->Device->getFileSystem();
+    ISceneManager *smgr = Game->Device->getSceneManager ();
+
+    IReadFile* file = fs->createMemoryReadFile(&Game->loadParam,
+                sizeof(Game->loadParam), L"levelparameter.cfg", false);
+
+    // load cfg file
+    smgr->getMesh( file );
+    file->drop ();
+
+    // load the actual map
+    Mesh = (IQ3LevelMesh*) smgr->getMesh(mapName);
+    if ( 0 == Mesh )
+        return;
+

add the geometry mesh to the Scene ( polygon & patches ) The Geometry mesh is optimised for faster drawing

+
    IMesh *geometry = Mesh->getMesh(E_Q3_MESH_GEOMETRY);
+    if ( 0 == geometry || geometry->getMeshBufferCount() == 0)
+        return;
+
+    Game->CurrentMapName = mapName;
+
+    //create a collision list
+    Meta = 0;
+
+    ITriangleSelector * selector = 0;
+    if (collision)
+        Meta = smgr->createMetaTriangleSelector();
+
+    //IMeshBuffer *b0 = geometry->getMeshBuffer(0);
+    //s32 minimalNodes = b0 ? core::s32_max ( 2048, b0->getVertexCount() / 32 ) : 2048;
+    s32 minimalNodes = 2048;
+
+    MapParent = smgr->addOctreeSceneNode(geometry, 0, -1, minimalNodes);
+    MapParent->setName ( mapName );
+    if ( Meta )
+    {
+        selector = smgr->createOctreeTriangleSelector( geometry,MapParent, minimalNodes);
+        //selector = smgr->createTriangleSelector ( geometry, MapParent );
+        Meta->addTriangleSelector( selector);
+        selector->drop ();
+    }
+
+    // logical parent for the items
+    ItemParent = smgr->addEmptySceneNode();
+    if ( ItemParent )
+        ItemParent->setName ( "Item Container" );
+
+    ShaderParent = smgr->addEmptySceneNode();
+    if ( ShaderParent )
+        ShaderParent->setName ( "Shader Container" );
+
+    UnresolvedParent = smgr->addEmptySceneNode();
+    if ( UnresolvedParent )
+        UnresolvedParent->setName ( "Unresolved Container" );
+
+    FogParent = smgr->addEmptySceneNode();
+    if ( FogParent )
+        FogParent->setName ( "Fog Container" );
+
+    // logical parent for the bullets
+    BulletParent = smgr->addEmptySceneNode();
+    if ( BulletParent )
+        BulletParent->setName ( "Bullet Container" );
+

now construct SceneNodes for each Shader The Objects are stored in the quake mesh E_Q3_MESH_ITEMS and the Shader ID is stored in the MaterialParameters mostly dark looking skulls and moving lava.. or green flashing tubes?

+
    Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_ITEMS,ShaderParent, Meta, false );
+    Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_FOG,FogParent, 0, false );
+    Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_UNRESOLVED,UnresolvedParent, Meta, true );
+

Now construct Models from Entity List

+
    Q3ModelFactory ( Game->loadParam, Game->Device, Mesh, ItemParent, false );
+}
+

Adds a SceneNode with an icon to the Scene Tree

+
void CQuake3EventHandler::addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent)
+{
+    IGUITreeViewNode* node;
+    wchar_t msg[128];
+
+    s32 imageIndex;
+    list<ISceneNode*>::ConstIterator it = parent->getChildren().begin();
+    for (; it != parent->getChildren().end(); ++it)
+    {
+        switch ( (*it)->getType () )
+        {
+            case ESNT_Q3SHADER_SCENE_NODE: imageIndex = 0; break;
+            case ESNT_CAMERA: imageIndex = 1; break;
+            case ESNT_EMPTY: imageIndex = 2; break;
+            case ESNT_MESH: imageIndex = 3; break;
+            case ESNT_OCTREE: imageIndex = 3; break;
+            case ESNT_ANIMATED_MESH: imageIndex = 4; break;
+            case ESNT_SKY_BOX: imageIndex = 5; break;
+            case ESNT_BILLBOARD: imageIndex = 6; break;
+            case ESNT_PARTICLE_SYSTEM: imageIndex = 7; break;
+            case ESNT_TEXT: imageIndex = 8; break;
+            default:imageIndex = -1; break;
+        }
+
+        if ( imageIndex < 0 )
+        {
+            swprintf ( msg, 128, L"%hs,%hs",
+                Game->Device->getSceneManager ()->getSceneNodeTypeName ( (*it)->getType () ),
+                (*it)->getName()
+                );
+        }
+        else
+        {
+            swprintf ( msg, 128, L"%hs",(*it)->getName() );
+        }
+
+        node = nodeParent->addChildBack( msg, 0, imageIndex );
+
+        // Add all Animators
+        list<ISceneNodeAnimator*>::ConstIterator ait = (*it)->getAnimators().begin();
+        for (; ait != (*it)->getAnimators().end(); ++ait)
+        {
+            imageIndex = -1;
+            swprintf ( msg, 128, L"%hs",
+                Game->Device->getSceneManager ()->getAnimatorTypeName ( (*ait)->getType () )
+                );
+
+            switch ( (*ait)->getType () )
+            {
+                case ESNAT_FLY_CIRCLE:
+                case ESNAT_FLY_STRAIGHT:
+                case ESNAT_FOLLOW_SPLINE:
+                case ESNAT_ROTATION:
+                case ESNAT_TEXTURE:
+                case ESNAT_DELETION:
+                case ESNAT_COLLISION_RESPONSE:
+                case ESNAT_CAMERA_FPS:
+                case ESNAT_CAMERA_MAYA:
+                default:
+                    break;
+            }
+            node->addChildBack( msg, 0, imageIndex );
+        }
+
+        addSceneTreeItem ( *it, node );
+    }
+}
+
+
+// Adds life!
+void CQuake3EventHandler::CreatePlayers()
+{
+    Player[0].create ( Game->Device, Mesh, MapParent, Meta );
+}
+
+
+// Adds a skydome to the scene
+void CQuake3EventHandler::AddSky( u32 dome, const c8 *texture)
+{
+    ISceneManager *smgr = Game->Device->getSceneManager ();
+    IVideoDriver * driver = Game->Device->getVideoDriver();
+
+    bool oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+
+    if ( 0 == dome )
+    {
+        // irrlicht order
+        //static const c8*p[] = { "ft", "lf", "bk", "rt", "up", "dn" };
+        // quake3 order
+        static const c8*p[] = { "ft", "rt", "bk", "lf", "up", "dn" };
+
+        u32 i = 0;
+        snprintf ( buf, 64, "%s_%s.jpg", texture, p[i] );
+        SkyNode = smgr->addSkyBoxSceneNode( driver->getTexture ( buf ), 0, 0, 0, 0, 0 );
+
+        if (SkyNode)
+        {
+            for ( i = 0; i < 6; ++i )
+            {
+                snprintf ( buf, 64, "%s_%s.jpg", texture, p[i] );
+                SkyNode->getMaterial(i).setTexture ( 0, driver->getTexture ( buf ) );
+            }
+        }
+    }
+    else
+    if ( 1 == dome )
+    {
+        snprintf ( buf, 64, "%s.jpg", texture );
+        SkyNode = smgr->addSkyDomeSceneNode(
+                driver->getTexture( buf ), 32,32,
+                1.f, 1.f, 1000.f, 0, 11);
+    }
+    else
+    if ( 2 == dome )
+    {
+        snprintf ( buf, 64, "%s.jpg", texture );
+        SkyNode = smgr->addSkyDomeSceneNode(
+                driver->getTexture( buf ), 16,8,
+                0.95f, 2.f, 1000.f, 0, 11);
+    }
+
+    if (SkyNode)
+        SkyNode->setName("Skydome");
+    //SkyNode->getMaterial(0).ZBuffer = video::EMDF_DEPTH_LESS_EQUAL;
+
+    driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState);
+}
+
+
+// enable GUI elements
+void CQuake3EventHandler::SetGUIActive( s32 command)
+{
+    bool inputState = false;
+
+    ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera ();
+
+    switch ( command )
+    {
+        case 0: Game->guiActive = 0; inputState = !Game->guiActive; break;
+        case 1: Game->guiActive = 1; inputState = !Game->guiActive;;break;
+        case 2: Game->guiActive ^= 1; inputState = !Game->guiActive;break;
+        case 3:
+            if ( camera )
+                inputState = !camera->isInputReceiverEnabled();
+            break;
+    }
+
+    if ( camera )
+    {
+        camera->setInputReceiverEnabled ( inputState );
+        Game->Device->getCursorControl()->setVisible( !inputState );
+    }
+
+    if ( gui.Window )
+    {
+        gui.Window->setVisible ( Game->guiActive != 0 );
+    }
+
+    if ( Game->guiActive &&
+            gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree
+        )
+    {
+        gui.SceneTree->getRoot()->clearChildren();
+        addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
+    }
+
+    Game->Device->getGUIEnvironment()->setFocus ( Game->guiActive ? gui.Window: 0 );
+}
+

Handle game input

+
bool CQuake3EventHandler::OnEvent(const SEvent& eve)
+{
+    if ( eve.EventType == EET_LOG_TEXT_EVENT )
+    {
+        return false;
+    }
+
+    if ( Game->guiActive && eve.EventType == EET_GUI_EVENT )
+    {
+        if ( eve.GUIEvent.Caller == gui.MapList && eve.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN )
+        {
+            s32 selected = gui.MapList->getSelected();
+            if ( selected >= 0 )
+            {
+                stringw loadMap = gui.MapList->getListItem ( selected );
+                if ( 0 == MapParent || loadMap != Game->CurrentMapName )
+                {
+                    printf ( "Loading map %ls\n", loadMap.c_str() );
+                    LoadMap ( loadMap , 1 );
+                    if ( 0 == Game->loadParam.loadSkyShader )
+                    {
+                        AddSky ( 1, "skydome2" );
+                    }
+                    CreatePlayers ();
+                    CreateGUI ();
+                    SetGUIActive ( 0 );
+                    return true;
+                }
+            }
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.ArchiveRemove && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+        {
+            Game->Device->getFileSystem()->removeFileArchive( gui.ArchiveList->getSelected() );
+            Game->CurrentMapName = "";
+            AddArchive ( "" );
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.ArchiveAdd && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+        {
+            if ( 0 == gui.ArchiveFileOpen )
+            {
+                Game->Device->getFileSystem()->setFileListSystem ( FILESYSTEM_NATIVE );
+                gui.ArchiveFileOpen = Game->Device->getGUIEnvironment()->addFileOpenDialog ( L"Add Game Archive" , false,gui.Window  );
+            }
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_SELECTED )
+        {
+            AddArchive ( gui.ArchiveFileOpen->getFileName() );
+            gui.ArchiveFileOpen = 0;
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_DIRECTORY_SELECTED )
+        {
+            AddArchive ( gui.ArchiveFileOpen->getDirectoryName() );
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_CHOOSE_DIALOG_CANCELLED )
+        {
+            gui.ArchiveFileOpen = 0;
+        }
+        else
+        if ( ( eve.GUIEvent.Caller == gui.ArchiveUp || eve.GUIEvent.Caller == gui.ArchiveDown ) &&
+            eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+        {
+            s32 rel = eve.GUIEvent.Caller == gui.ArchiveUp ? -1 : 1;
+            if ( Game->Device->getFileSystem()->moveFileArchive ( gui.ArchiveList->getSelected (), rel ) )
+            {
+                s32 newIndex = core::s32_clamp ( gui.ArchiveList->getSelected() + rel, 0, gui.ArchiveList->getRowCount() - 1 );
+                AddArchive ( "" );
+                gui.ArchiveList->setSelected ( newIndex );
+                Game->CurrentMapName = "";
+            }
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.VideoDriver && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )
+        {
+            Game->deviceParam.DriverType = (E_DRIVER_TYPE) gui.VideoDriver->getItemData ( gui.VideoDriver->getSelected() );
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.VideoMode && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )
+        {
+            u32 val = gui.VideoMode->getItemData ( gui.VideoMode->getSelected() );
+            Game->deviceParam.WindowSize.Width = val >> 16;
+            Game->deviceParam.WindowSize.Height = val & 0xFFFF;
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.FullScreen && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+        {
+            Game->deviceParam.Fullscreen = gui.FullScreen->isChecked();
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Bit32 && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+        {
+            Game->deviceParam.Bits = gui.Bit32->isChecked() ? 32 : 16;
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.MultiSample && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )
+        {
+            Game->deviceParam.AntiAlias = gui.MultiSample->getPos();
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Tesselation && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )
+        {
+            Game->loadParam.patchTesselation = gui.Tesselation->getPos ();
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Gamma && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED )
+        {
+            Game->GammaValue = gui.Gamma->getPos () * 0.01f;
+            Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f );
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.SetVideoMode && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+        {
+            Game->retVal = 2;
+            Game->Device->closeDevice();
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Window && eve.GUIEvent.EventType == gui::EGET_ELEMENT_CLOSED )
+        {
+            Game->Device->closeDevice();
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Collision && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+        {
+            // set fly through active
+            Game->flyTroughState ^= 1;
+            Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 );
+
+            printf ( "collision %d\n", Game->flyTroughState == 0 );
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Visible_Map && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+        {
+            bool v = gui.Visible_Map->isChecked();
+
+            if ( MapParent )
+            {
+                printf ( "static node set visible %d\n",v );
+                MapParent->setVisible ( v );
+            }
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Visible_Shader && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+        {
+            bool v = gui.Visible_Shader->isChecked();
+
+            if ( ShaderParent )
+            {
+                printf ( "shader node set visible %d\n",v );
+                ShaderParent->setVisible ( v );
+            }
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Visible_Skydome && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED )
+        {
+            if ( SkyNode )
+            {
+                bool v = !SkyNode->isVisible();
+                printf ( "skynode set visible %d\n",v );
+                SkyNode->setVisible ( v );
+            }
+        }
+        else
+        if ( eve.GUIEvent.Caller == gui.Respawn && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+        {
+            Player[0].respawn ();
+        }
+
+        return false;
+    }
+
+    // fire
+    if ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_SPACE &&
+        eve.KeyInput.PressedDown == false) ||
+        (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)
+        )
+    {
+        ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera ();
+        if ( camera && camera->isInputReceiverEnabled () )
+        {
+            useItem( Player + 0 );
+        }
+    }
+
+    // gui active
+    if ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_F1 &&
+        eve.KeyInput.PressedDown == false) ||
+        (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_RMOUSE_LEFT_UP)
+        )
+    {
+        SetGUIActive ( 2 );
+    }
+
+    // check if user presses the key
+    if ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.PressedDown == false)
+    {
+        // Escape toggles camera Input
+        if ( eve.KeyInput.Key == irr::KEY_ESCAPE )
+        {
+            SetGUIActive ( 3 );
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F11)
+        {
+            // screenshot are taken without gamma!
+            IImage* image = Game->Device->getVideoDriver()->createScreenShot();
+            if (image)
+            {
+                core::vector3df pos;
+                core::vector3df rot;
+                ICameraSceneNode * cam = Game->Device->getSceneManager()->getActiveCamera ();
+                if ( cam )
+                {
+                    pos = cam->getPosition ();
+                    rot = cam->getRotation ();
+                }
+
+                static const c8 *dName[] = { "null", "software", "burning",
+                    "d3d8", "d3d9", "opengl" };
+
+                snprintf(buf, 256, "%s_%ls_%.0f_%.0f_%.0f_%.0f_%.0f_%.0f.jpg",
+                        dName[Game->Device->getVideoDriver()->getDriverType()],
+                        Game->CurrentMapName.c_str(),
+                        pos.X, pos.Y, pos.Z,
+                        rot.X, rot.Y, rot.Z
+                        );
+                path filename ( buf );
+                filename.replace ( '/', '_' );
+                printf ( "screenshot : %s\n", filename.c_str() );
+                Game->Device->getVideoDriver()->writeImageToFile(image, filename, 100 );
+                image->drop();
+            }
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F9)
+        {
+            s32 value = EDS_OFF;
+
+            Game->debugState = ( Game->debugState + 1 ) & 3;
+
+            switch ( Game->debugState )
+            {
+                case 1: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL; break;
+                case 2: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_SKELETON; break;
+            }
+

set debug map data on/off debugState = debugState == EDS_OFF ? EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL: EDS_OFF;

+
            if ( ItemParent )
+            {
+                list<ISceneNode*>::ConstIterator it = ItemParent->getChildren().begin();
+                for (; it != ItemParent->getChildren().end(); ++it)
+                {
+                    (*it)->setDebugDataVisible ( value );
+                }
+            }
+
+            if ( ShaderParent )
+            {
+                list<ISceneNode*>::ConstIterator it = ShaderParent->getChildren().begin();
+                for (; it != ShaderParent->getChildren().end(); ++it)
+                {
+                    (*it)->setDebugDataVisible ( value );
+                }
+            }
+
+            if ( UnresolvedParent )
+            {
+                list<ISceneNode*>::ConstIterator it = UnresolvedParent->getChildren().begin();
+                for (; it != UnresolvedParent->getChildren().end(); ++it)
+                {
+                    (*it)->setDebugDataVisible ( value );
+                }
+            }
+
+            if ( FogParent )
+            {
+                list<ISceneNode*>::ConstIterator it = FogParent->getChildren().begin();
+                for (; it != FogParent->getChildren().end(); ++it)
+                {
+                    (*it)->setDebugDataVisible ( value );
+                }
+            }
+
+            if ( SkyNode )
+            {
+                SkyNode->setDebugDataVisible ( value );
+            }
+
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F8)
+        {
+            // set gravity on/off
+            Game->gravityState ^= 1;
+            Player[0].cam()->setGravity ( getGravity ( Game->gravityState ? "earth" : "none" ) );
+            printf ( "gravity %s\n", Game->gravityState ? "earth" : "none" );
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F7)
+        {
+            // set fly through active
+            Game->flyTroughState ^= 1;
+            Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 );
+            if ( gui.Collision )
+                gui.Collision->setChecked ( Game->flyTroughState == 0 );
+
+            printf ( "collision %d\n", Game->flyTroughState == 0 );
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F2)
+        {
+            Player[0].respawn ();
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F3)
+        {
+            if ( MapParent )
+            {
+                bool v = !MapParent->isVisible ();
+                printf ( "static node set visible %d\n",v );
+                MapParent->setVisible ( v );
+                if ( gui.Visible_Map )
+                    gui.Visible_Map->setChecked ( v );
+            }
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F4)
+        {
+            if ( ShaderParent )
+            {
+                bool v = !ShaderParent->isVisible ();
+                printf ( "shader node set visible %d\n",v );
+                ShaderParent->setVisible ( v );
+                if ( gui.Visible_Shader )
+                    gui.Visible_Shader->setChecked ( v );
+            }
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F5)
+        {
+            if ( FogParent )
+            {
+                bool v = !FogParent->isVisible ();
+                printf ( "fog node set visible %d\n",v );
+                FogParent->setVisible ( v );
+                if ( gui.Visible_Fog )
+                    gui.Visible_Fog->setChecked ( v );
+            }
+
+        }
+        else
+        if (eve.KeyInput.Key == KEY_F6)
+        {
+            if ( UnresolvedParent )
+            {
+                bool v = !UnresolvedParent->isVisible ();
+                printf ( "unresolved node set visible %d\n",v );
+                UnresolvedParent->setVisible ( v );
+                if ( gui.Visible_Unresolved )
+                    gui.Visible_Unresolved->setChecked ( v );
+            }
+        }
+    }
+
+    // check if user presses the key C ( for crouch)
+    if ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_KEY_C )
+    {
+        // crouch
+        ISceneNodeAnimatorCollisionResponse *anim = Player[0].cam ();
+        if ( anim && 0 == Game->flyTroughState )
+        {
+            if ( false == eve.KeyInput.PressedDown )
+            {
+                // stand up
+                anim->setEllipsoidRadius (  vector3df(30,45,30) );
+                anim->setEllipsoidTranslation ( vector3df(0,40,0));
+
+            }
+            else
+            {
+                // on your knees
+                anim->setEllipsoidRadius (  vector3df(30,20,30) );
+                anim->setEllipsoidTranslation ( vector3df(0,20,0));
+            }
+            return true;
+        }
+    }
+    return false;
+}
+

useItem

+
void CQuake3EventHandler::useItem( Q3Player * player)
+{
+    ISceneManager* smgr = Game->Device->getSceneManager();
+    ICameraSceneNode* camera = smgr->getActiveCamera();
+
+    if (!camera)
+        return;
+
+    SParticleImpact imp;
+    imp.when = 0;
+
+    // get line of camera
+
+    vector3df start = camera->getPosition();
+
+    if ( player->WeaponNode )
+    {
+        start.X += 0.f;
+        start.Y += 0.f;
+        start.Z += 0.f;
+    }
+
+    vector3df end = (camera->getTarget() - start);
+    end.normalize();
+    start += end*20.0f;
+
+    end = start + (end * camera->getFarValue());
+
+    triangle3df triangle;
+    line3d<f32> line(start, end);
+
+    // get intersection point with map
+    scene::ISceneNode* hitNode;
+    if (smgr->getSceneCollisionManager()->getCollisionPoint(
+        line, Meta, end, triangle,hitNode))
+    {
+        // collides with wall
+        vector3df out = triangle.getNormal();
+        out.setLength(0.03f);
+
+        imp.when = 1;
+        imp.outVector = out;
+        imp.pos = end;
+
+        player->setAnim ( "pow" );
+        player->Anim[1].next += player->Anim[1].delta;
+    }
+    else
+    {
+        // doesnt collide with wall
+        vector3df start = camera->getPosition();
+        if ( player->WeaponNode )
+        {
+            //start.X += 10.f;
+            //start.Y += -5.f;
+            //start.Z += 1.f;
+        }
+
+        vector3df end = (camera->getTarget() - start);
+        end.normalize();
+        start += end*20.0f;
+        end = start + (end * camera->getFarValue());
+    }
+
+    // create fire ball
+    ISceneNode* node = 0;
+    node = smgr->addBillboardSceneNode( BulletParent,dimension2d<f32>(10,10), start);
+
+    node->setMaterialFlag(EMF_LIGHTING, false);
+    node->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture("fireball.bmp"));
+    node->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+    node->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);
+
+    f32 length = (f32)(end - start).getLength();
+    const f32 speed = 5.8f;
+    u32 time = (u32)(length / speed);
+
+    ISceneNodeAnimator* anim = 0;
+
+    // set flight line
+
+    anim = smgr->createFlyStraightAnimator(start, end, time);
+    node->addAnimator(anim);
+    anim->drop();
+
+    snprintf ( buf, 64, "bullet: %s on %.1f,%1.f,%1.f",
+                imp.when ? "hit" : "nohit", end.X, end.Y, end.Z );
+    node->setName ( buf );
+
+
+    anim = smgr->createDeleteAnimator(time);
+    node->addAnimator(anim);
+    anim->drop();
+
+    if (imp.when)
+    {
+        // create impact note
+        imp.when = Game->Device->getTimer()->getTime() +
+            (time + (s32) ( ( 1.f + Noiser::get() ) * 250.f ));
+        Impacts.push_back(imp);
+    }
+
+    // play sound
+}
+
+// rendered when bullets hit something
+void CQuake3EventHandler::createParticleImpacts( u32 now )
+{
+    ISceneManager* sm = Game->Device->getSceneManager();
+
+    struct smokeLayer
+    {
+        const c8 * texture;
+        f32 scale;
+        f32 minparticleSize;
+        f32 maxparticleSize;
+        f32 boxSize;
+        u32 minParticle;
+        u32 maxParticle;
+        u32 fadeout;
+        u32 lifetime;
+    };
+
+    smokeLayer smoke[] =
+    {
+        { "smoke2.jpg", 0.4f, 1.5f, 18.f, 20.f, 20, 50, 2000, 10000 },
+        { "smoke3.jpg", 0.2f, 1.2f, 15.f, 20.f, 10, 30, 1000, 12000 }
+    };
+
+
+    u32 i;
+    u32 g;
+    s32 factor = 1;
+    for ( g = 0; g != 2; ++g )
+    {
+        smoke[g].minParticle *= factor;
+        smoke[g].maxParticle *= factor;
+        smoke[g].lifetime *= factor;
+        smoke[g].boxSize *= Noiser::get() * 0.5f;
+    }
+
+    for ( i=0; i < Impacts.size(); ++i)
+    {
+        if (now < Impacts[i].when)
+            continue;
+
+        // create smoke particle system
+        IParticleSystemSceneNode* pas = 0;
+
+        for ( g = 0; g != 2; ++g )
+        {
+            pas = sm->addParticleSystemSceneNode(false, BulletParent, -1, Impacts[i].pos);
+
+            snprintf ( buf, 64, "bullet impact smoke at %.1f,%.1f,%1.f",
+                Impacts[i].pos.X,Impacts[i].pos.Y,Impacts[i].pos.Z);
+            pas->setName ( buf );
+
+            // create a flat smoke
+            vector3df direction = Impacts[i].outVector;
+            direction *= smoke[g].scale;
+            IParticleEmitter* em = pas->createBoxEmitter(
+                aabbox3d<f32>(-4.f,0.f,-4.f,20.f,smoke[g].minparticleSize,20.f),
+                direction,smoke[g].minParticle, smoke[g].maxParticle,
+                video::SColor(0,0,0,0),video::SColor(0,128,128,128),
+                250,4000, 60);
+
+            em->setMinStartSize (dimension2d<f32>( smoke[g].minparticleSize, smoke[g].minparticleSize));
+            em->setMaxStartSize (dimension2d<f32>( smoke[g].maxparticleSize, smoke[g].maxparticleSize));
+
+            pas->setEmitter(em);
+            em->drop();
+
+            // particles get invisible
+            IParticleAffector* paf = pas->createFadeOutParticleAffector(
+                video::SColor ( 0, 0, 0, 0 ), smoke[g].fadeout);
+            pas->addAffector(paf);
+            paf->drop();
+
+            // particle system life time
+            ISceneNodeAnimator* anim = sm->createDeleteAnimator( smoke[g].lifetime);
+            pas->addAnimator(anim);
+            anim->drop();
+
+            pas->setMaterialFlag(video::EMF_LIGHTING, false);
+            pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
+            pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+            pas->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture( smoke[g].texture ));
+        }
+
+
+        // play impact sound
+        #ifdef USE_IRRKLANG
+

if (irrKlang) { audio::ISound* sound = irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);

+

if (sound) { adjust max value a bit to make to sound of an impact louder sound->setMinDistance(400); sound->drop(); } }

+
        #endif
+
+
+        // delete entry
+        Impacts.erase(i);
+        i--;
+    }
+}
+

render

+
void CQuake3EventHandler::Render()
+{
+    IVideoDriver * driver = Game->Device->getVideoDriver();
+    if ( 0 == driver )
+        return;
+
+    // TODO: This does not work, yet.
+    const bool anaglyph=false;
+    if (anaglyph)
+    {
+        scene::ICameraSceneNode* cameraOld = Game->Device->getSceneManager()->getActiveCamera();
+        driver->beginScene(true, true, SColor(0,0,0,0));
+        driver->getOverrideMaterial().Material.ColorMask = ECP_NONE;
+        driver->getOverrideMaterial().EnableFlags  = EMF_COLOR_MASK;
+        driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX +
+                                                     ESNRP_SOLID +
+                                                     ESNRP_TRANSPARENT +
+                                                     ESNRP_TRANSPARENT_EFFECT +
+                                                     ESNRP_SHADOW;
+        Game->Device->getSceneManager()->drawAll();
+        driver->clearZBuffer();
+
+        const vector3df oldPosition = cameraOld->getPosition();
+        const vector3df oldTarget   = cameraOld->getTarget();
+        const matrix4 startMatrix   = cameraOld->getAbsoluteTransformation();
+        const vector3df focusPoint  = (oldTarget -
+                cameraOld->getAbsolutePosition()).setLength(10000) +
+                cameraOld->getAbsolutePosition() ;
+
+        scene::ICameraSceneNode* camera = cameraOld;//Game->Device->getSceneManager()->addCameraSceneNode();
+
+        //Left eye...
+        vector3df pos;
+        matrix4   move;
+
+        move.setTranslation( vector3df(-1.5f,0.0f,0.0f) );
+        pos=(startMatrix*move).getTranslation();
+
+        driver->getOverrideMaterial().Material.ColorMask = ECP_RED;
+        driver->getOverrideMaterial().EnableFlags  = EMF_COLOR_MASK;
+        driver->getOverrideMaterial().EnablePasses =
+                ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT|
+                ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW;
+
+        camera->setPosition(pos);
+        camera->setTarget(focusPoint);
+
+        Game->Device->getSceneManager()->drawAll();
+        driver->clearZBuffer();
+
+        //Right eye...
+        move.setTranslation( vector3df(1.5f,0.0f,0.0f) );
+        pos=(startMatrix*move).getTranslation();
+
+        driver->getOverrideMaterial().Material.ColorMask = ECP_GREEN + ECP_BLUE;
+        driver->getOverrideMaterial().EnableFlags  = EMF_COLOR_MASK;
+        driver->getOverrideMaterial().EnablePasses =
+                ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT|
+                ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW;
+
+        camera->setPosition(pos);
+        camera->setTarget(focusPoint);
+
+        Game->Device->getSceneManager()->drawAll();
+
+        driver->getOverrideMaterial().Material.ColorMask=ECP_ALL;
+        driver->getOverrideMaterial().EnableFlags=0;
+        driver->getOverrideMaterial().EnablePasses=0;
+
+        if (camera != cameraOld)
+        {
+            Game->Device->getSceneManager()->setActiveCamera(cameraOld);
+            camera->remove();
+        }
+        else
+        {
+            camera->setPosition(oldPosition);
+            camera->setTarget(oldTarget);
+        }
+    }
+    else
+    {
+        driver->beginScene(true, true, SColor(0,0,0,0));
+        Game->Device->getSceneManager()->drawAll();
+    }
+    Game->Device->getGUIEnvironment()->drawAll();
+    driver->endScene();
+}
+

update the generic scene node

+
void CQuake3EventHandler::Animate()
+{
+    u32 now = Game->Device->getTimer()->getTime();
+
+    Q3Player * player = Player + 0;
+
+    checkTimeFire ( player->Anim, 4, now );
+
+    // Query Scene Manager attributes
+    if ( player->Anim[0].flags & FIRED )
+    {
+        ISceneManager *smgr = Game->Device->getSceneManager ();
+        wchar_t msg[128];
+        IVideoDriver * driver = Game->Device->getVideoDriver();
+
+        IAttributes * attr = smgr->getParameters();
+#ifdef _IRR_SCENEMANAGER_DEBUG                  
+        swprintf ( msg, 128,
+            L"Q3 %s [%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)",
+            Game->CurrentMapName.c_str(),
+            driver->getName(),
+            driver->getFPS (),
+            (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ),
+            attr->getAttributeAsInt ( "culled" ),
+            attr->getAttributeAsInt ( "calls" ),
+            attr->getAttributeAsInt ( "drawn_solid" ),
+            attr->getAttributeAsInt ( "drawn_transparent" ),
+            attr->getAttributeAsInt ( "drawn_transparent_effect" )
+            );
+#else
+swprintf ( msg, 128,
+            L"Q3 %s [%ls], FPS:%03d Tri:%.03fm",
+            Game->CurrentMapName.c_str(),
+            driver->getName(),
+            driver->getFPS (),
+            (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f )
+            );      
+#endif      
+        Game->Device->setWindowCaption( msg );
+
+        swprintf ( msg, 128,
+                    L"%03d fps, F1 GUI on/off, F2 respawn, F3-F6 toggle Nodes, F7 Collision on/off"
+                    L", F8 Gravity on/off, Right Mouse Toggle GUI",
+                    Game->Device->getVideoDriver()->getFPS ()
+                );
+        if ( gui.StatusLine )
+            gui.StatusLine->setText ( msg );
+        player->Anim[0].flags &= ~FIRED;
+    }
+
+    // idle..
+    if ( player->Anim[1].flags & FIRED )
+    {
+        if ( strcmp ( player->animation, "idle" ) )
+            player->setAnim ( "idle" );
+
+        player->Anim[1].flags &= ~FIRED;
+    }
+
+    createParticleImpacts ( now );
+
+}
+

The main game states

+
void runGame ( GameData *game )
+{
+    if ( game->retVal >= 3 )
+        return;
+
+    game->Device = (*game->createExDevice) ( game->deviceParam );
+    if ( 0 == game->Device)
+    {
+        // could not create selected driver.
+        game->retVal = 0;
+        return;
+    }
+
+    // create an event receiver based on current game data
+    CQuake3EventHandler *eventHandler = new CQuake3EventHandler( game );
+
+    // load stored config
+    game->load ( "explorer.cfg" );
+
+    // add our media directory and archive to the file system
+    for ( u32 i = 0; i < game->CurrentArchiveList.size(); ++i )
+    {
+        eventHandler->AddArchive ( game->CurrentArchiveList[i] );
+    }
+
+    // Load a Map or startup to the GUI
+    if ( game->CurrentMapName.size () )
+    {
+        eventHandler->LoadMap ( game->CurrentMapName, 1 );
+        if ( 0 == game->loadParam.loadSkyShader )
+            eventHandler->AddSky ( 1, "skydome2" );
+        eventHandler->CreatePlayers ();
+        eventHandler->CreateGUI ();
+        eventHandler->SetGUIActive ( 0 );
+
+        // set player to last position on restart
+        if ( game->retVal == 2 )
+        {
+            eventHandler->GetPlayer( 0 )->setpos ( game->PlayerPosition, game->PlayerRotation );
+        }
+    }
+    else
+    {
+        // start up empty
+        eventHandler->AddSky ( 1, "skydome2" );
+        eventHandler->CreatePlayers ();
+        eventHandler->CreateGUI ();
+        eventHandler->SetGUIActive ( 1 );
+        background_music ( "IrrlichtTheme.ogg" );
+    }
+
+
+    game->retVal = 3;
+    while( game->Device->run() )
+    {
+        eventHandler->Animate ();
+        eventHandler->Render ();
+        //if ( !game->Device->isWindowActive() )
+            game->Device->yield();
+    }
+
+    game->Device->setGammaRamp ( 1.f, 1.f, 1.f, 0.f, 0.f );
+    delete eventHandler;
+}
+
+#if defined (_IRR_WINDOWS_) && 0
+    #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
+#endif
+

The main routine, doing all setup

+
int IRRCALLCONV main(int argc, char* argv[])
+{
+    path prgname(argv[0]);
+    GameData game ( deletePathFromPath ( prgname, 1 ) );
+
+    // dynamically load irrlicht
+    const c8 * dllName = argc > 1 ? argv[1] : "irrlicht.dll";
+    game.createExDevice = load_createDeviceEx ( dllName );
+    if ( 0 == game.createExDevice )
+    {
+        game.retVal = 3;
+        printf ( "Could not load %s.\n", dllName );
+        return game.retVal; // could not load dll
+    }
+
+    // start without asking for driver
+    game.retVal = 1;
+    do
+    {
+        // if driver could not created, ask for another driver
+        if ( game.retVal == 0 )
+        {
+            game.setDefault ();
+            // ask user for driver
+            game.deviceParam.DriverType=driverChoiceConsole();
+            if (game.deviceParam.DriverType==video::EDT_COUNT)
+                game.retVal = 3;
+        }
+        runGame ( &game );
+    } while ( game.retVal < 3 );
+
+    return game.retVal;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example022.html b/src/others/irrlicht-1.8.1/doc/html/example022.html new file mode 100644 index 0000000..bd1d46d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example022.html @@ -0,0 +1,1136 @@ + + + + +Irrlicht 3D Engine: Tutorial 22: Material Viewer + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 22: Material Viewer
+
+
+
+022shot.jpg +
+

This example can be used to play around with material settings and watch the results. Only the default non-shader materials are used in here.

+

You have two nodes to make it easier to see which difference your settings will make. Additionally you have one lightscenenode and you can set the global ambient values.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

Variables within the empty namespace are globals which are restricted to this file.

+
namespace
+{
+    const wchar_t* const DriverTypeNames[] =
+    {
+        L"NULL",
+        L"SOFTWARE",
+        L"BURNINGSVIDEO",
+        L"DIRECT3D8",
+        L"DIRECT3D9",
+        L"OPENGL",
+        0,
+    };
+
+    // For the gui id's
+    enum EGUI_IDS
+    {
+        GUI_ID_OPEN_TEXTURE = 1,
+        GUI_ID_QUIT,
+        GUI_ID_MAX
+    };
+
+    // Name used in texture selection to clear the textures on the node
+    const core::stringw CLEAR_TEXTURE = L"CLEAR texture";
+
+    // some useful color constants
+    const video::SColor SCOL_BLACK     = video::SColor(255, 0,   0,   0);
+    const video::SColor SCOL_BLUE      = video::SColor(255, 0,   0,  255);
+    const video::SColor SCOL_CYAN      = video::SColor(255, 0,  255, 255);
+    const video::SColor SCOL_GRAY      = video::SColor(255, 128,128, 128);
+    const video::SColor SCOL_GREEN     = video::SColor(255, 0,  255,  0);
+    const video::SColor SCOL_MAGENTA   = video::SColor(255, 255, 0,  255);
+    const video::SColor SCOL_RED       = video::SColor(255, 255, 0,   0);
+    const video::SColor SCOL_YELLOW    = video::SColor(255, 255, 255, 0);
+    const video::SColor SCOL_WHITE     = video::SColor(255, 255, 255, 255);
+};  // namespace
+

Returns a new unique number on each call.

+
s32 makeUniqueId()
+{
+    static int unique = GUI_ID_MAX;
+    ++unique;
+    return unique;
+}
+

Find out which vertex-type is needed for the given material type.

+

Custom GUI-control to edit colorvalues.

+
class CColorControl : public gui::IGUIElement
+{
+public:
+    // Constructor
+    CColorControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, IGUIElement* parent, s32 id=-1 )
+        : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect< s32 >(pos, pos+core::dimension2d<s32>(80, 75)))
+        , DirtyFlag(true)
+        , ColorStatic(0)
+        , EditAlpha(0)
+        , EditRed(0)
+        , EditGreen(0)
+        , EditBlue(0)
+    {
+        using namespace gui;
+        ButtonSetId = makeUniqueId();
+
+        const core::rect< s32 > rectControls(0,0,AbsoluteRect.getWidth(),AbsoluteRect.getHeight() );
+        IGUIStaticText * groupElement = guiEnv->addStaticText (L"", rectControls, true, false, this, -1, false);
+        groupElement->setNotClipped(true);
+
+        guiEnv->addStaticText (text, core::rect<s32>(0,0,80,15), false, false, groupElement, -1, false);
+
+        EditAlpha = addEditForNumbers(guiEnv, core::position2d<s32>(0,15), L"a", -1, groupElement );
+        EditRed = addEditForNumbers(guiEnv, core::position2d<s32>(0,30), L"r", -1, groupElement );
+        EditGreen = addEditForNumbers(guiEnv, core::position2d<s32>(0,45), L"g", -1, groupElement );
+        EditBlue = addEditForNumbers(guiEnv, core::position2d<s32>(0,60), L"b", -1, groupElement );
+
+        ColorStatic = guiEnv->addStaticText (L"", core::rect<s32>(60,15,80,75), true, false, groupElement, -1, true);
+
+        guiEnv->addButton (core::rect<s32>(60,35,80,50), groupElement, ButtonSetId, L"set");
+        SetEditsFromColor(Color);
+    }
+
+    // event receiver
+    virtual bool OnEvent(const SEvent &event)
+    {
+        if ( event.EventType != EET_GUI_EVENT )
+            return false;
+
+        if ( event.GUIEvent.Caller->getID() == ButtonSetId && event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
+        {
+            Color = GetColorFromEdits();
+            SetEditsFromColor(Color);
+        }
+
+        return false;
+    }
+
+    // set the color values
+    void setColor(const video::SColor& col)
+    {
+        DirtyFlag = true;
+        Color = col;
+        SetEditsFromColor(Color);
+    }
+
+    // get the color values
+    const video::SColor& getColor() const
+    {
+        return Color;
+    }
+
+    // To reset the dirty flag
+    void resetDirty()
+    {
+        DirtyFlag = false;
+    }
+
+    // when the color was changed the dirty flag is set
+    bool isDirty() const
+    {
+        return DirtyFlag;
+    };
+
+protected:
+
+    // Add a staticbox for a description + an editbox so users can enter numbers
+    gui::IGUIEditBox* addEditForNumbers(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t *text, s32 id, gui::IGUIElement * parent)
+    {
+        using namespace gui;
+
+        core::rect< s32 > rect(pos, pos+core::dimension2d<s32>(10, 15));
+        guiEnv->addStaticText (text, rect, false, false, parent, -1, false);
+        rect += core::position2d<s32>( 20, 0 );
+        rect.LowerRightCorner.X += 20;
+        gui::IGUIEditBox* edit = guiEnv->addEditBox(L"0", rect, true, parent, id);
+        return edit;
+    }
+
+    // Get the color value from the editfields
+    video::SColor GetColorFromEdits()
+    {
+        video::SColor col;
+
+        if (EditAlpha)
+        {
+            u32 alpha = core::strtoul10(core::stringc(EditAlpha->getText()).c_str());
+            if (alpha > 255)
+                alpha = 255;
+            col.setAlpha(alpha);
+        }
+
+        if (EditRed)
+        {
+            u32 red = core::strtoul10(core::stringc(EditRed->getText()).c_str());
+            if (red > 255)
+                red = 255;
+            col.setRed(red);
+        }
+
+        if (EditGreen)
+        {
+            u32 green = core::strtoul10(core::stringc(EditGreen->getText()).c_str());
+            if (green > 255)
+                green = 255;
+            col.setGreen(green);
+        }
+
+        if (EditBlue)
+        {
+            u32 blue = core::strtoul10(core::stringc(EditBlue->getText()).c_str());
+            if (blue > 255)
+                blue = 255;
+            col.setBlue(blue);
+        }
+
+        return col;
+    }
+
+    // Fill the editfields with the value for the given color
+    void SetEditsFromColor(video::SColor col)
+    {
+        DirtyFlag = true;
+        if ( EditAlpha )
+            EditAlpha->setText( core::stringw(col.getAlpha()).c_str() );
+        if ( EditRed )
+            EditRed->setText( core::stringw(col.getRed()).c_str() );
+        if ( EditGreen )
+            EditGreen->setText( core::stringw(col.getGreen()).c_str() );
+        if ( EditBlue )
+            EditBlue->setText( core::stringw(col.getBlue()).c_str() );
+        if ( ColorStatic )
+            ColorStatic->setBackgroundColor(col);
+    }
+
+private:
+
+    bool DirtyFlag;
+    video::SColor Color;
+    s32 ButtonSetId;
+    gui::IGUIStaticText * ColorStatic;
+    gui::IGUIEditBox * EditAlpha;
+    gui::IGUIEditBox * EditRed;
+    gui::IGUIEditBox * EditGreen;
+    gui::IGUIEditBox * EditBlue;
+};
+

Custom GUI-control for to edit all colors typically used in materials and lights

+
class CAllColorsControl : public gui::IGUIElement
+{
+public:
+    // Constructor
+    CAllColorsControl(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t * description, bool hasEmissive, IGUIElement* parent, s32 id=-1)
+        : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(60,250)))
+        , ControlAmbientColor(0), ControlDiffuseColor(0), ControlSpecularColor(0), ControlEmissiveColor(0)
+    {
+        core::rect<s32> rect(0, 0, 60, 15);
+        guiEnv->addStaticText (description, rect, false, false, this, -1, false);
+        createColorControls(guiEnv, core::position2d<s32>(0, 15), hasEmissive);
+    }
+
+    // Destructor
+    virtual ~CAllColorsControl()
+    {
+        ControlAmbientColor->drop();
+        ControlDiffuseColor->drop();
+        if ( ControlEmissiveColor )
+            ControlEmissiveColor->drop();
+        ControlSpecularColor->drop();
+    }
+
+    // Set the color values to those within the material
+    void setColorsToMaterialColors(const video::SMaterial & material)
+    {
+        ControlAmbientColor->setColor(material.AmbientColor);
+        ControlDiffuseColor->setColor(material.DiffuseColor);
+        ControlEmissiveColor->setColor(material.EmissiveColor);
+        ControlSpecularColor->setColor(material.SpecularColor);
+    }
+
+    // Update all changed colors in the material
+    void updateMaterialColors(video::SMaterial & material)
+    {
+        if ( ControlAmbientColor->isDirty() )
+            material.AmbientColor = ControlAmbientColor->getColor();
+        if ( ControlDiffuseColor->isDirty() )
+            material.DiffuseColor = ControlDiffuseColor->getColor();
+        if ( ControlEmissiveColor->isDirty() )
+            material.EmissiveColor = ControlEmissiveColor->getColor();
+        if ( ControlSpecularColor->isDirty() )
+            material.SpecularColor = ControlSpecularColor->getColor();
+    }
+
+    // Set the color values to those from the light data
+    void setColorsToLightDataColors(const video::SLight & lightData)
+    {
+        ControlAmbientColor->setColor(lightData.AmbientColor.toSColor());
+        ControlAmbientColor->setColor(lightData.DiffuseColor.toSColor());
+        ControlAmbientColor->setColor(lightData.SpecularColor.toSColor());
+    }
+
+    // Update all changed colors in the light data
+    void updateLightColors(video::SLight & lightData)
+    {
+        if ( ControlAmbientColor->isDirty() )
+            lightData.AmbientColor = video::SColorf( ControlAmbientColor->getColor() );
+        if ( ControlDiffuseColor->isDirty() )
+            lightData.DiffuseColor = video::SColorf( ControlDiffuseColor->getColor() );
+        if ( ControlSpecularColor->isDirty() )
+            lightData.SpecularColor = video::SColorf(ControlSpecularColor->getColor() );
+    }
+
+    // To reset the dirty flags
+    void resetDirty()
+    {
+        ControlAmbientColor->resetDirty();
+        ControlDiffuseColor->resetDirty();
+        ControlSpecularColor->resetDirty();
+        if ( ControlEmissiveColor )
+            ControlEmissiveColor->resetDirty();
+    }
+
+protected:
+    void createColorControls(gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, bool hasEmissive)
+    {
+        ControlAmbientColor = new CColorControl( guiEnv, pos, L"ambient", this);
+        ControlDiffuseColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 75), L"diffuse", this );
+        ControlSpecularColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 150), L"specular", this );
+        if ( hasEmissive )
+        {
+            ControlEmissiveColor = new CColorControl( guiEnv, pos + core::position2d<s32>(0, 225), L"emissive", this );
+        }
+    }
+
+private:
+    CColorControl*  ControlAmbientColor;
+    CColorControl*  ControlDiffuseColor;
+    CColorControl*  ControlSpecularColor;
+    CColorControl*  ControlEmissiveColor;
+};
+

GUI-Control to offer a selection of available textures.

+
class CTextureControl : public gui::IGUIElement
+{
+public:
+    CTextureControl(gui::IGUIEnvironment* guiEnv, video::IVideoDriver * driver, const core::position2d<s32> & pos, IGUIElement* parent, s32 id=-1)
+    : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect<s32>(pos,pos+core::dimension2d<s32>(100,15)))
+    , DirtyFlag(true), ComboTexture(0)
+    {
+        core::rect<s32> rectCombo(0, 0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight());
+        ComboTexture = guiEnv->addComboBox (rectCombo, this);
+        updateTextures(driver);
+    }
+
+    virtual bool OnEvent(const SEvent &event)
+    {
+        if ( event.EventType != EET_GUI_EVENT )
+            return false;
+
+        if ( event.GUIEvent.Caller == ComboTexture && event.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED )
+        {
+            DirtyFlag = true;
+        }
+
+        return false;
+    }
+
+    // Workaround for a problem with comboboxes.
+    // We have to get in front when the combobox wants to get in front or combobox-list might be drawn below other elements.
+    virtual bool bringToFront(IGUIElement* element)
+    {
+        bool result = gui::IGUIElement::bringToFront(element);
+        if ( Parent && element == ComboTexture )
+            result &= Parent->bringToFront(this);
+        return result;
+    }
+
+    // return selected texturename (if any, otherwise 0)
+    const wchar_t * getSelectedTextureName() const
+    {
+        s32 selected = ComboTexture->getSelected();
+        if ( selected < 0 )
+            return 0;
+        return ComboTexture->getItem(selected);
+    }
+
+    // reset the dirty flag
+    void resetDirty()
+    {
+        DirtyFlag = false;
+    }
+
+    // when the texture was changed the dirty flag is set
+    bool isDirty() const
+    {
+        return DirtyFlag;
+    };
+
+    // Put the names of all currently loaded textures in a combobox
+    void updateTextures(video::IVideoDriver * driver)
+    {
+        s32 oldSelected = ComboTexture->getSelected();
+        s32 selectNew = -1;
+        const wchar_t * oldTextureName = 0;
+        if ( oldSelected >= 0 )
+        {
+            oldTextureName = ComboTexture->getItem(oldSelected);
+        }
+        ComboTexture->clear();
+        for ( u32 i=0; i < driver->getTextureCount(); ++i )
+        {
+            video::ITexture * texture = driver->getTextureByIndex(i);
+            core::stringw name( texture->getName() );
+            ComboTexture->addItem( name.c_str() );
+            if ( oldTextureName && selectNew < 0 && name == oldTextureName )
+                selectNew = i;
+        }
+
+        // add another name which can be used to clear the texture
+        ComboTexture->addItem( CLEAR_TEXTURE.c_str() );
+        if ( CLEAR_TEXTURE == oldTextureName )
+            selectNew = ComboTexture->getItemCount()-1;
+
+        if ( selectNew >= 0 )
+            ComboTexture->setSelected(selectNew);
+
+        DirtyFlag = true;
+    }
+
+private:
+    bool DirtyFlag;
+    gui::IGUIComboBox * ComboTexture;
+};
+

Control which allows setting some of the material values for a meshscenenode

+
struct SMeshNodeControl
+{
+    // constructor
+    SMeshNodeControl()
+        : Initialized(false), Driver(0), MeshManipulator(0), SceneNode(0), SceneNode2T(0), SceneNodeTangents(0)
+        , AllColorsControl(0), ButtonLighting(0), InfoLighting(0), ComboMaterial(0), TextureControl1(0), TextureControl2(0), ControlVertexColors(0)
+    {
+    }
+
+    // Destructor
+    virtual ~SMeshNodeControl()
+    {
+        if ( TextureControl1 )
+            TextureControl1->drop();
+        if ( TextureControl2 )
+            TextureControl2->drop();
+        if ( ControlVertexColors )
+            ControlVertexColors->drop();
+        if ( AllColorsControl )
+            AllColorsControl->drop();
+    }
+
+    void init(scene::IMeshSceneNode* node, IrrlichtDevice * device, const core::position2d<s32> & pos, const wchar_t * description)
+    {
+        if ( Initialized || !node || !device) // initializing twice or with invalid data not allowed
+            return;
+
+        Driver = device->getVideoDriver ();
+        gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment();
+        scene::ISceneManager* smgr = device->getSceneManager();
+        MeshManipulator = smgr->getMeshManipulator();
+
+        SceneNode = node;
+        scene::IMeshManipulator * meshManip = smgr->getMeshManipulator();
+
+        scene::IMesh * mesh2T = meshManip->createMeshWith2TCoords(node->getMesh());
+        SceneNode2T = smgr->addMeshSceneNode(mesh2T, 0, -1, SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() );
+        mesh2T->drop();
+
+        scene::IMesh * meshTangents = meshManip->createMeshWithTangents(node->getMesh(), false, false, false);
+        SceneNodeTangents = smgr->addMeshSceneNode(meshTangents, 0, -1
+                                            , SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() );
+        meshTangents->drop();
+
+        video::SMaterial & material = SceneNode->getMaterial(0);
+        material.Lighting = true;
+        AllColorsControl = new CAllColorsControl(guiEnv, pos, description, true, guiEnv->getRootGUIElement());
+        AllColorsControl->setColorsToMaterialColors(material);
+
+        core::rect<s32> rectBtn(pos + core::position2d<s32>(0, 320), core::dimension2d<s32>(60, 15));
+        ButtonLighting = guiEnv->addButton (rectBtn, 0, -1, L"Lighting");
+        ButtonLighting->setIsPushButton(true);
+        ButtonLighting->setPressed(material.Lighting);
+        core::rect<s32> rectInfo( rectBtn.LowerRightCorner.X, rectBtn.UpperLeftCorner.Y, rectBtn.LowerRightCorner.X+40, rectBtn.UpperLeftCorner.Y+15 );
+        InfoLighting = guiEnv->addStaticText(L"", rectInfo, true, false );
+        InfoLighting->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER );
+
+        core::rect<s32> rectCombo(pos.X, rectBtn.LowerRightCorner.Y, pos.X+100, rectBtn.LowerRightCorner.Y+15);
+        ComboMaterial = guiEnv->addComboBox (rectCombo);
+        for ( int i=0; i <= (int)video::EMT_ONETEXTURE_BLEND; ++i )
+        {
+            ComboMaterial->addItem( core::stringw(video::sBuiltInMaterialTypeNames[i]).c_str() );
+        }
+        ComboMaterial->setSelected( (s32)material.MaterialType );
+
+        core::position2d<s32> posTex(rectCombo.UpperLeftCorner.X,rectCombo.LowerRightCorner.Y);
+        TextureControl1 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement());
+        posTex.Y += 15;
+        TextureControl2 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement());
+
+        core::position2d<s32> posVertexColors( posTex.X, posTex.Y + 15);
+        ControlVertexColors = new CColorControl( guiEnv, posVertexColors, L"Vertex colors", guiEnv->getRootGUIElement());
+
+        video::S3DVertex * vertices =  (video::S3DVertex *)node->getMesh()->getMeshBuffer(0)->getVertices();
+        if ( vertices )
+        {
+            ControlVertexColors->setColor(vertices[0].Color);
+        }
+
+        Initialized = true;
+    }
+
+    void update()
+    {
+        if ( !Initialized )
+            return;
+
+        video::SMaterial & material = SceneNode->getMaterial(0);
+        video::SMaterial & material2T = SceneNode2T->getMaterial(0);
+        video::SMaterial & materialTangents = SceneNodeTangents->getMaterial(0);
+
+        s32 selectedMaterial = ComboMaterial->getSelected();
+        if ( selectedMaterial >= (s32)video::EMT_SOLID && selectedMaterial <= (s32)video::EMT_ONETEXTURE_BLEND)
+        {
+            video::E_VERTEX_TYPE vertexType = getVertexTypeForMaterialType((video::E_MATERIAL_TYPE)selectedMaterial);
+            switch ( vertexType )
+            {
+                case video::EVT_STANDARD:
+                    material.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;
+                    SceneNode->setVisible(true);
+                    SceneNode2T->setVisible(false);
+                    SceneNodeTangents->setVisible(false);
+                    break;
+                case video::EVT_2TCOORDS:
+                    material2T.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;
+                    SceneNode->setVisible(false);
+                    SceneNode2T->setVisible(true);
+                    SceneNodeTangents->setVisible(false);
+                    break;
+                case video::EVT_TANGENTS:
+                    materialTangents.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial;
+                    SceneNode->setVisible(false);
+                    SceneNode2T->setVisible(false);
+                    SceneNodeTangents->setVisible(true);
+                    break;
+            }
+        }
+
+        updateMaterial(material);
+        updateMaterial(material2T);
+        updateMaterial(materialTangents);
+
+        if ( ButtonLighting->isPressed() )
+            InfoLighting->setText(L"on");
+        else
+            InfoLighting->setText(L"off");
+
+        AllColorsControl->resetDirty();
+        TextureControl1->resetDirty();
+        TextureControl2->resetDirty();
+        ControlVertexColors->resetDirty();
+    }
+
+    void updateTextures()
+    {
+        TextureControl1->updateTextures(Driver);
+        TextureControl2->updateTextures(Driver);
+    }
+
+protected:
+
+    void updateMaterial(video::SMaterial & material)
+    {
+        AllColorsControl->updateMaterialColors(material);
+        material.Lighting = ButtonLighting->isPressed();
+        if ( TextureControl1->isDirty() )
+        {
+            material.TextureLayer[0].Texture = Driver->getTexture( io::path(TextureControl1->getSelectedTextureName()) );
+        }
+        if ( TextureControl2->isDirty() )
+        {
+            material.TextureLayer[1].Texture = Driver->getTexture( io::path(TextureControl2->getSelectedTextureName()) );
+        }
+        if ( ControlVertexColors->isDirty() )
+        {
+            MeshManipulator->setVertexColors (SceneNode->getMesh(), ControlVertexColors->getColor());
+            MeshManipulator->setVertexColors (SceneNode2T->getMesh(), ControlVertexColors->getColor());
+            MeshManipulator->setVertexColors (SceneNodeTangents->getMesh(), ControlVertexColors->getColor());
+        }
+    }
+
+    bool Initialized;
+    video::IVideoDriver *       Driver;
+    scene::IMeshManipulator*    MeshManipulator;
+    scene::IMeshSceneNode*      SceneNode;
+    scene::IMeshSceneNode*      SceneNode2T;
+    scene::IMeshSceneNode*      SceneNodeTangents;
+    CAllColorsControl*          AllColorsControl;
+    gui::IGUIButton *           ButtonLighting;
+    gui::IGUIStaticText*        InfoLighting;
+    gui::IGUIComboBox *         ComboMaterial;
+    CTextureControl*            TextureControl1;
+    CTextureControl*            TextureControl2;
+    CColorControl*              ControlVertexColors;
+};
+

Control to allow setting the color values of a lightscenenode.

+
struct SLightNodeControl
+{
+    // constructor
+    SLightNodeControl() : Initialized(false), SceneNode(0), AllColorsControl(0)
+    {
+    }
+
+    virtual ~SLightNodeControl()
+    {
+        if ( AllColorsControl )
+            AllColorsControl->drop();
+    }
+
+    void init(scene::ILightSceneNode* node, gui::IGUIEnvironment* guiEnv, const core::position2d<s32> & pos, const wchar_t * description)
+    {
+        if ( Initialized || !node || !guiEnv) // initializing twice or with invalid data not allowed
+            return;
+        SceneNode = node;
+        AllColorsControl = new CAllColorsControl(guiEnv, pos, description, false, guiEnv->getRootGUIElement());
+        const video::SLight & lightData = SceneNode->getLightData();
+        AllColorsControl->setColorsToLightDataColors(lightData);
+        Initialized = true;
+    }
+
+    void update()
+    {
+        if ( !Initialized )
+            return;
+
+        video::SLight & lightData = SceneNode->getLightData();
+        AllColorsControl->updateLightColors(lightData);
+    }
+
+protected:
+    bool Initialized;
+    scene::ILightSceneNode* SceneNode;
+    CAllColorsControl* AllColorsControl;
+};
+

Application configuration

+
struct SConfig
+{
+    SConfig()
+    : RenderInBackground(true)
+    , DriverType(video::EDT_BURNINGSVIDEO)
+    , ScreenSize(640, 480)
+    {
+    }
+
+    bool RenderInBackground;
+    video::E_DRIVER_TYPE DriverType;
+    core::dimension2d<u32> ScreenSize;
+};
+

Main application class

+
class CApp : public IEventReceiver
+{
+    friend int main(int argc, char *argv[]);
+
+public:
+    // constructor
+    CApp()
+    : IsRunning(false)
+    , Device(0)
+    , Camera(0)
+    , GlobalAmbient(0)
+    {
+    }
+
+    // destructor
+    ~CApp()
+    {
+    }
+
+    // stop running - will quit at end of mainloop
+    void stopApp()
+    {
+        IsRunning = false;
+    }
+
+    // Event handler
+    virtual bool OnEvent(const SEvent &event)
+    {
+        if (event.EventType == EET_GUI_EVENT)
+        {
+            gui::IGUIEnvironment* env = Device->getGUIEnvironment();
+
+            switch(event.GUIEvent.EventType)
+            {
+                case gui::EGET_MENU_ITEM_SELECTED:
+                {
+                    gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)event.GUIEvent.Caller;
+                    s32 id = menu->getItemCommandId(menu->getSelectedItem());
+
+                    switch(id)
+                    {
+                        case GUI_ID_OPEN_TEXTURE: // File -> Open Texture
+                            env->addFileOpenDialog(L"Please select a texture file to open");
+                        break;
+                        case GUI_ID_QUIT: // File -> Quit
+                            stopApp();
+                        break;
+                    }
+                }
+                break;
+
+                case gui::EGET_FILE_SELECTED:
+                {
+                    // load the model file, selected in the file open dialog
+                    gui::IGUIFileOpenDialog* dialog =
+                        (gui::IGUIFileOpenDialog*)event.GUIEvent.Caller;
+                    loadTexture(io::path(dialog->getFileName()).c_str());
+                }
+                break;
+
+                default:
+                break;
+            }
+        }
+
+        return false;
+    }
+
+protected:
+
+    // Application initialization
+    // returns true when it was successful initialized, otherwise false.
+    bool init(int argc, char *argv[])
+    {
+        // ask user for driver
+        Config.DriverType=driverChoiceConsole();
+        if (Config.DriverType==video::EDT_COUNT)
+            return false;
+
+        // create the device with the settings from our config
+        Device = createDevice(Config.DriverType, Config.ScreenSize);
+        if (!Device)
+            return false;
+        Device->setWindowCaption( DriverTypeNames[Config.DriverType] );
+        Device->setEventReceiver(this);
+
+        scene::ISceneManager* smgr = Device->getSceneManager();
+        video::IVideoDriver * driver = Device->getVideoDriver ();
+        gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment();
+
+        // set a nicer font
+        gui::IGUISkin* skin = guiEnv->getSkin();
+        gui::IGUIFont* font = guiEnv->getFont("../../media/fonthaettenschweiler.bmp");
+        if (font)
+            skin->setFont(font);
+
+        // remove some alpha value because it makes those menus harder to read otherwise
+        video::SColor col3dHighLight( skin->getColor(gui::EGDC_APP_WORKSPACE) );
+        col3dHighLight.setAlpha(255);
+        video::SColor colHighLight( col3dHighLight );
+        skin->setColor(gui::EGDC_HIGH_LIGHT, colHighLight );
+        skin->setColor(gui::EGDC_3D_HIGH_LIGHT, col3dHighLight );
+
+        // Add some textures which are useful to test material settings
+        createDefaultTextures(driver);
+
+        // create a menu
+        gui::IGUIContextMenu * menuBar = guiEnv->addMenu();
+        menuBar->addItem(L"File", -1, true, true);
+
+        gui::IGUIContextMenu* subMenuFile = menuBar->getSubMenu(0);
+        subMenuFile->addItem(L"Open texture ...", GUI_ID_OPEN_TEXTURE);
+        subMenuFile->addSeparator();
+        subMenuFile->addItem(L"Quit", GUI_ID_QUIT);
+
+        // a static camera
+        Camera = smgr->addCameraSceneNode (0, core::vector3df(0, 0, 0),
+                                            core::vector3df(0, 0, 100),
+                                            -1);
+
+        // add the nodes which are used to show the materials
+        scene::IMeshSceneNode* nodeL = smgr->addCubeSceneNode (30.0f, 0, -1,
+                                           core::vector3df(-35, 0, 100),
+                                           core::vector3df(0, 0, 0),
+                                           core::vector3df(1.0f, 1.0f, 1.0f));
+        NodeLeft.init( nodeL, Device, core::position2d<s32>(10,20), L"left node" );
+
+        scene::IMeshSceneNode* nodeR = smgr->addCubeSceneNode (30.0f, 0, -1,
+                                           core::vector3df(35, 0, 100),
+                                           core::vector3df(0, 0, 0),
+                                           core::vector3df(1.0f, 1.0f, 1.0f));
+        NodeRight.init( nodeR, Device, core::position2d<s32>(530,20), L"right node" );
+
+        // add one light
+        scene::ILightSceneNode* nodeLight = smgr->addLightSceneNode(0, core::vector3df(0, 0, 0),
+                                                        video::SColorf(1.0f, 1.0f, 1.0f),
+                                                        100.0f);
+        LightControl.init(nodeLight, guiEnv, core::position2d<s32>(270,20), L"light" );
+
+        // one large cube around everything. That's mainly to make the light more obvious.
+        scene::IMeshSceneNode* backgroundCube = smgr->addCubeSceneNode (200.0f, 0, -1, core::vector3df(0, 0, 0),
+                                           core::vector3df(45, 0, 0),
+                                           core::vector3df(1.0f, 1.0f, 1.0f));
+        backgroundCube->getMaterial(0).BackfaceCulling = false;         // we are within the cube, so we have to disable backface culling to see it
+        backgroundCube->getMaterial(0).EmissiveColor.set(255,50,50,50); // we keep some self lighting to keep texts visible
+
+        // set the ambient light value
+        GlobalAmbient = new CColorControl( guiEnv, core::position2d<s32>(270, 300), L"global ambient", guiEnv->getRootGUIElement());
+        GlobalAmbient->setColor( smgr->getAmbientLight().toSColor() );
+
+        return true;
+    }
+
+    // Update one frame
+    bool update()
+    {
+        using namespace irr;
+
+        video::IVideoDriver* videoDriver =  Device->getVideoDriver();
+        if ( !Device->run() )
+            return false;
+
+        if ( Device->isWindowActive() || Config.RenderInBackground )
+        {
+            gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment();
+            scene::ISceneManager* smgr = Device->getSceneManager();
+            gui::IGUISkin * skin = guiEnv->getSkin();
+
+            // update our controls
+            NodeLeft.update();
+            NodeRight.update();
+            LightControl.update();
+
+            // update ambient light settings
+            if ( GlobalAmbient->isDirty() )
+            {
+                smgr->setAmbientLight( GlobalAmbient->getColor() );
+                GlobalAmbient->resetDirty();
+            }
+
+            // draw everything
+            video::SColor bkColor( skin->getColor(gui::EGDC_APP_WORKSPACE) );
+            videoDriver->beginScene(true, true, bkColor);
+
+            smgr->drawAll();
+            guiEnv->drawAll();
+
+            videoDriver->endScene();
+        }
+
+        return true;
+    }
+
+    // Run the application. Our main loop.
+    void run()
+    {
+        IsRunning = true;
+
+        if ( !Device )
+            return;
+
+        // main application loop
+        while(IsRunning)
+        {
+            if ( !update() )
+                break;
+
+            Device->sleep( 5 );
+        }
+    }
+
+    // Close down the application
+    void quit()
+    {
+        IsRunning = false;
+        GlobalAmbient->drop();
+        GlobalAmbient = NULL;
+        if ( Device )
+        {
+            Device->closeDevice();
+            Device->drop();
+            Device = NULL;
+        }
+    }
+
+    // Create some useful textures.
+    // Note that the function put readability over speed, you shouldn't use setPixel at runtime but for initialization it's nice.
+    void createDefaultTextures(video::IVideoDriver * driver)
+    {
+        const u32 width = 256;
+        const u32 height = 256;
+        video::IImage * imageA8R8G8B8 = driver->createImage (video::ECF_A8R8G8B8, core::dimension2d<u32>(width, height));
+        if ( !imageA8R8G8B8 )
+            return;
+        const u32 pitch = imageA8R8G8B8->getPitch();
+
+        // some nice square-pattern with 9 typical colors
+        for ( u32 y = 0; y < height; ++ y )
+        {
+            for ( u32 x = 0; x < pitch; ++x )
+            {
+                if ( y < height/3 )
+                {
+                    if ( x < width/3 )
+                        imageA8R8G8B8->setPixel (x, y, SCOL_BLACK);
+                    else if ( x < 2*width/3 )
+                        imageA8R8G8B8->setPixel (x, y, SCOL_BLUE);
+                    else
+                        imageA8R8G8B8->setPixel (x, y, SCOL_CYAN);
+                }
+                else if ( y < 2*height/3 )
+                {
+                    if ( x < width/3 )
+                        imageA8R8G8B8->setPixel (x, y, SCOL_GRAY);
+                    else if ( x < 2*width/3 )
+                        imageA8R8G8B8->setPixel (x, y, SCOL_GREEN);
+                    else
+                        imageA8R8G8B8->setPixel (x, y, SCOL_MAGENTA);
+                }
+                else
+                {
+                    if ( x < width/3 )
+                        imageA8R8G8B8->setPixel (x, y, SCOL_RED);
+                    else if ( x < 2*width/3 )
+                        imageA8R8G8B8->setPixel (x, y, SCOL_YELLOW);
+                    else
+                        imageA8R8G8B8->setPixel (x, y, SCOL_WHITE);
+                }
+            }
+        }
+        driver->addTexture (io::path("CARO_A8R8G8B8"), imageA8R8G8B8);
+
+        // all white
+        imageA8R8G8B8->fill(SCOL_WHITE);
+        driver->addTexture (io::path("WHITE_A8R8G8B8"), imageA8R8G8B8);
+
+        // all black
+        imageA8R8G8B8->fill(SCOL_BLACK);
+        driver->addTexture (io::path("BLACK_A8R8G8B8"), imageA8R8G8B8);
+
+        // gray-scale
+        for ( u32 y = 0; y < height; ++ y )
+        {
+            for ( u32 x = 0; x < pitch; ++x )
+            {
+                imageA8R8G8B8->setPixel (x, y, video::SColor(y, x,x,x) );
+            }
+        }
+        driver->addTexture (io::path("GRAYSCALE_A8R8G8B8"), imageA8R8G8B8);
+
+        imageA8R8G8B8->drop();
+    }
+
+    // Load a texture and make sure nodes know it when more textures are available.
+    void loadTexture(const io::path &name)
+    {
+        Device->getVideoDriver()->getTexture(name);
+        NodeLeft.updateTextures();
+        NodeRight.updateTextures();
+    }
+
+private:
+    SConfig                     Config;
+    volatile bool               IsRunning;
+    IrrlichtDevice *            Device;
+    scene::ICameraSceneNode *   Camera;
+    SMeshNodeControl            NodeLeft;
+    SMeshNodeControl            NodeRight;
+    SLightNodeControl           LightControl;
+    CColorControl *             GlobalAmbient;
+};
+

A very short main as we do everything else in classes.

+
int main(int argc, char *argv[])
+{
+    CApp APP;
+
+    if ( !APP.init(argc, argv) )
+    {
+        printf("init failed\n");
+        return 1;
+    }
+
+    APP.run();
+    APP.quit();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example023.html b/src/others/irrlicht-1.8.1/doc/html/example023.html new file mode 100644 index 0000000..4906006 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example023.html @@ -0,0 +1,502 @@ + + + + +Irrlicht 3D Engine: Tutorial 23: SMeshBufferHandling + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 23: SMeshBufferHandling
+
+
+
+023shot.jpg +
+

A tutorial by geoff.

+

In this tutorial we'll learn how to create custom meshes and deal with them with Irrlicht. We'll create an interesting heightmap with some lighting effects. With keys 1,2,3 you can choose a different mesh layout, which is put into the mesh buffers as desired. All positions, normals, etc. are updated accordingly.

+

Ok, let's start with the headers (I think there's nothing to say about it)

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+#ifdef _MSC_VER
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+//Namespaces for the engine
+using namespace irr;
+using namespace video;
+using namespace core;
+using namespace scene;
+using namespace io;
+using namespace gui;
+

This is the type of the functions which work out the colour.

+
typedef SColor colour_func(f32 x, f32 y, f32 z);
+

Here comes a set of functions which can be used for coloring the nodes while creating the mesh.

+
// Greyscale, based on the height.
+SColor grey(f32, f32, f32 z)
+{
+    u32 n = (u32)(255.f * z);
+    return SColor(255, n, n, n);
+}
+
+// Interpolation between blue and white, with red added in one
+// direction and green in the other.
+SColor yellow(f32 x, f32 y, f32)
+{
+    return SColor(255, 128 + (u32)(127.f * x), 128 + (u32)(127.f * y), 255);
+}
+
+// Pure white.
+SColor white(f32, f32, f32) { return SColor(255, 255, 255, 255); }
+

The type of the functions which generate the heightmap. x and y range between -0.5 and 0.5, and s is the scale of the heightmap.

+
typedef f32 generate_func(s16 x, s16 y, f32 s);
+
+// An interesting sample function :-)
+f32 eggbox(s16 x, s16 y, f32 s)
+{
+    const f32 r = 4.f*sqrtf((f32)(x*x + y*y))/s;
+    const f32 z = expf(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y));
+    return 0.25f+0.25f*z;
+}
+
+// A rather dumb sine function :-/
+f32 moresine(s16 x, s16 y, f32 s)
+{
+    const f32 xx=0.3f*(f32)x/s;
+    const f32 yy=12*y/s;
+    const f32 z = sinf(xx*xx+yy)*sinf(xx+yy*yy);
+    return 0.25f + 0.25f * z;
+}
+
+// A simple function
+f32 justexp(s16 x, s16 y, f32 s)
+{
+    const f32 xx=6*x/s;
+    const f32 yy=6*y/s;
+    const f32 z = (xx*xx+yy*yy);
+    return 0.3f*z*cosf(xx*yy);
+}
+

A simple class for representing heightmaps. Most of this should be obvious.

+
class HeightMap
+{
+private:
+    const u16 Width;
+    const u16 Height;
+    f32 s;
+    core::array<f32> data;
+public:
+    HeightMap(u16 _w, u16 _h) : Width(_w), Height(_h), s(0.f), data(0)
+    {
+        s = sqrtf((f32)(Width * Width + Height * Height));
+        data.set_used(Width * Height);
+    }
+
+    // Fill the heightmap with values generated from f.
+    void generate(generate_func f)
+    {
+        u32 i=0;
+        for(u16 y = 0; y < Height; ++y)
+            for(u16 x = 0; x < Width; ++x)
+                set(i++, calc(f, x, y));
+    }
+
+    u16 height() const { return Height; }
+    u16 width() const { return Width; }
+
+    f32 calc(generate_func f, u16 x, u16 y) const
+    {
+        const f32 xx = (f32)x - Width*0.5f;
+        const f32 yy = (f32)y - Height*0.5f;
+        return f((u16)xx, (u16)yy, s);
+    }
+
+    // The height at (x, y) is at position y * Width + x.
+
+    void set(u16 x, u16 y, f32 z) { data[y * Width + x] = z; }
+    void set(u32 i, f32 z) { data[i] = z; }
+    f32 get(u16 x, u16 y) const { return data[y * Width + x]; }
+

The only difficult part. This considers the normal at (x, y) to be the cross product of the vectors between the adjacent points in the horizontal and vertical directions.

+

s is a scaling factor, which is necessary if the height units are different from the coordinate units; for example, if your map has heights in metres and the coordinates are in units of a kilometer.

+
    vector3df getnormal(u16 x, u16 y, f32 s) const
+    {
+        const f32 zc = get(x, y);
+        f32 zl, zr, zu, zd;
+
+        if (x == 0)
+        {
+            zr = get(x + 1, y);
+            zl = zc + zc - zr;
+        }
+        else if (x == Width - 1)
+        {
+            zl = get(x - 1, y);
+            zr = zc + zc - zl;
+        }
+        else
+        {
+            zr = get(x + 1, y);
+            zl = get(x - 1, y);
+        }
+
+        if (y == 0)
+        {
+            zd = get(x, y + 1);
+            zu = zc + zc - zd;
+        }
+        else if (y == Height - 1)
+        {
+            zu = get(x, y - 1);
+            zd = zc + zc - zu;
+        }
+        else
+        {
+            zd = get(x, y + 1);
+            zu = get(x, y - 1);
+        }
+
+        return vector3df(s * 2 * (zl - zr), 4, s * 2 * (zd - zu)).normalize();
+    }
+};
+

A class which generates a mesh from a heightmap.

+
class TMesh
+{
+private:
+    u16 Width;
+    u16 Height;
+    f32 Scale;
+public:
+    SMesh* Mesh;
+
+    TMesh() : Mesh(0), Width(0), Height(0), Scale(1.f)
+    {
+        Mesh = new SMesh();
+    }
+
+    ~TMesh()
+    {
+        Mesh->drop();
+    }
+
+    // Unless the heightmap is small, it won't all fit into a single
+    // SMeshBuffer. This function chops it into pieces and generates a
+    // buffer from each one.
+
+    void init(const HeightMap &hm, f32 scale, colour_func cf, IVideoDriver *driver)
+    {
+        Scale = scale;
+
+        const u32 mp = driver -> getMaximalPrimitiveCount();
+        Width = hm.width();
+        Height = hm.height();
+        
+        const u32 sw = mp / (6 * Height); // the width of each piece
+
+        u32 i=0;
+        for(u32 y0 = 0; y0 < Height; y0 += sw)
+        {
+            u16 y1 = y0 + sw;
+            if (y1 >= Height)
+                y1 = Height - 1; // the last one might be narrower
+            addstrip(hm, cf, y0, y1, i);
+            ++i;
+        }
+        if (i<Mesh->getMeshBufferCount())
+        {
+            // clear the rest
+            for (u32 j=i; j<Mesh->getMeshBufferCount(); ++j)
+            {
+                Mesh->getMeshBuffer(j)->drop();
+            }
+            Mesh->MeshBuffers.erase(i,Mesh->getMeshBufferCount()-i);
+        }
+        // set dirty flag to make sure that hardware copies of this
+        // buffer are also updated, see IMesh::setHardwareMappingHint
+        Mesh->setDirty();
+        Mesh->recalculateBoundingBox();
+    }
+
+    // Generate a SMeshBuffer which represents all the vertices and
+    // indices for values of y between y0 and y1, and add it to the
+    // mesh.
+
+    void addstrip(const HeightMap &hm, colour_func cf, u16 y0, u16 y1, u32 bufNum)
+    {
+        SMeshBuffer *buf = 0;
+        if (bufNum<Mesh->getMeshBufferCount())
+        {
+            buf = (SMeshBuffer*)Mesh->getMeshBuffer(bufNum);
+        }
+        else
+        {
+            // create new buffer
+            buf = new SMeshBuffer();
+            Mesh->addMeshBuffer(buf);
+            // to simplify things we drop here but continue using buf
+            buf->drop();
+        }
+        buf->Vertices.set_used((1 + y1 - y0) * Width);
+
+        u32 i=0;
+        for (u16 y = y0; y <= y1; ++y)
+        {
+            for (u16 x = 0; x < Width; ++x)
+            {
+                const f32 z = hm.get(x, y);
+                const f32 xx = (f32)x/(f32)Width;
+                const f32 yy = (f32)y/(f32)Height;
+
+                S3DVertex& v = buf->Vertices[i++];
+                v.Pos.set(x, Scale * z, y);
+                v.Normal.set(hm.getnormal(x, y, Scale));
+                v.Color=cf(xx, yy, z);
+                v.TCoords.set(xx, yy);
+            }
+        }
+
+        buf->Indices.set_used(6 * (Width - 1) * (y1 - y0));
+        i=0;
+        for(u16 y = y0; y < y1; ++y)
+        {
+            for(u16 x = 0; x < Width - 1; ++x)
+            {
+                const u16 n = (y-y0) * Width + x;
+                buf->Indices[i]=n;
+                buf->Indices[++i]=n + Width;
+                buf->Indices[++i]=n + Width + 1;
+                buf->Indices[++i]=n + Width + 1;
+                buf->Indices[++i]=n + 1;
+                buf->Indices[++i]=n;
+                ++i;
+            }
+        }
+
+        buf->recalculateBoundingBox();
+    }
+};
+

Our event receiver implementation, taken from tutorial 4.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    // This is the one method that we have to implement
+    virtual bool OnEvent(const SEvent& event)
+    {
+        // Remember whether each key is down or up
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT)
+            KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
+
+        return false;
+    }
+
+    // This is used to check whether a key is being held down
+    virtual bool IsKeyDown(EKEY_CODE keyCode) const
+    {
+        return KeyIsDown[keyCode];
+    }
+
+    MyEventReceiver()
+    {
+        for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
+            KeyIsDown[i] = false;
+    }
+
+private:
+    // We use this array to store the current state of each key
+    bool KeyIsDown[KEY_KEY_CODES_COUNT];
+};
+

Much of this is code taken from some of the examples. We merely set up a mesh from a heightmap, light it with a moving light, and allow the user to navigate around it.

+
int main(int argc, char* argv[])
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    MyEventReceiver receiver;
+    IrrlichtDevice* device = createDevice(driverType,
+            core::dimension2du(800, 600), 32, false, false, false,
+            &receiver);
+
+    if(device == 0)
+        return 1;
+ 
+    IVideoDriver *driver = device->getVideoDriver();
+    ISceneManager *smgr = device->getSceneManager();
+    device->setWindowCaption(L"Irrlicht Example for SMesh usage.");
+

Create the custom mesh and initialize with a heightmap

+
    TMesh mesh;
+    HeightMap hm = HeightMap(255, 255);
+    hm.generate(eggbox);
+    mesh.init(hm, 50.f, grey, driver);
+
+    // Add the mesh to the scene graph
+    IMeshSceneNode* meshnode = smgr -> addMeshSceneNode(mesh.Mesh);
+    meshnode->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false);
+
+    // light is just for nice effects
+    ILightSceneNode *node = smgr->addLightSceneNode(0, vector3df(0,100,0),
+        SColorf(1.0f, 0.6f, 0.7f, 1.0f), 500.0f);
+    if (node)
+    {
+        node->getLightData().Attenuation.set(0.f, 1.f/500.f, 0.f);
+        ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator(vector3df(0,150,0),250.0f);
+        if (anim)
+        {
+            node->addAnimator(anim);
+            anim->drop();
+        }
+    }
+
+    ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+    if (camera)
+    {
+        camera->setPosition(vector3df(-20.f, 150.f, -20.f));
+        camera->setTarget(vector3df(200.f, -80.f, 150.f));
+        camera->setFarValue(20000.0f);
+    }
+

Just a usual render loop with event handling. The custom mesh is a usual part of the scene graph which gets rendered by drawAll.

+
    while(device->run())
+    {
+        if(!device->isWindowActive())
+        {
+            device->sleep(100);
+            continue;
+        }
+
+        if(receiver.IsKeyDown(irr::KEY_KEY_W))
+        {
+            meshnode->setMaterialFlag(video::EMF_WIREFRAME, !meshnode->getMaterial(0).Wireframe);
+        }
+        else if(receiver.IsKeyDown(irr::KEY_KEY_1))
+        {
+            hm.generate(eggbox);
+            mesh.init(hm, 50.f, grey, driver);
+        }
+        else if(receiver.IsKeyDown(irr::KEY_KEY_2))
+        {
+            hm.generate(moresine);
+            mesh.init(hm, 50.f, yellow, driver);
+        }
+        else if(receiver.IsKeyDown(irr::KEY_KEY_3))
+        {
+            hm.generate(justexp);
+            mesh.init(hm, 50.f, yellow, driver);
+        }
+
+        driver->beginScene(true, true, SColor(0xff000000));
+        smgr->drawAll();
+        driver->endScene();
+    }
+
+    device->drop();
+
+    return 0;
+}
+

That's it! Just compile and play around with the program.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example024.html b/src/others/irrlicht-1.8.1/doc/html/example024.html new file mode 100644 index 0000000..73773d8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example024.html @@ -0,0 +1,630 @@ + + + + +Irrlicht 3D Engine: Tutorial 24: CursorControl + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 24: CursorControl
+
+
+
+024shot.jpg +
+

Show how to modify cursors and offer some useful tool-functions for creating cursors. It can also be used for experiments with the mouse in general.

+
#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+const int DELAY_TIME = 3000;
+
+enum ETimerAction
+{
+    ETA_MOUSE_VISIBLE,
+    ETA_MOUSE_INVISIBLE,
+};
+

Structure to allow delayed execution of some actions.

+
struct TimerAction
+{
+    u32 TargetTime;
+    ETimerAction Action;
+};
+
struct SAppContext
+{
+    SAppContext()
+    : Device(0), InfoStatic(0), EventBox(0), CursorBox(0), SpriteBox(0)
+    , ButtonSetVisible(0), ButtonSetInvisible(0), ButtonSimulateBadFps(0)
+    , ButtonChangeIcon(0)
+    , SimulateBadFps(false)
+    {
+    }
+
+    void update()
+    {
+        if (!Device)
+            return;
+        u32 timeNow = Device->getTimer()->getTime();
+        for ( u32 i=0; i < TimerActions.size(); ++i )
+        {
+            if ( timeNow >= TimerActions[i].TargetTime )
+            {
+                runTimerAction(TimerActions[i]);
+                TimerActions.erase(i);
+            }
+            else
+            {
+                ++i;
+            }
+        }
+    }
+
+    void runTimerAction(const TimerAction& action)
+    {
+        if (ETA_MOUSE_VISIBLE == action.Action)
+        {
+            Device->getCursorControl()->setVisible(true);
+            ButtonSetVisible->setEnabled(true);
+        }
+        else if ( ETA_MOUSE_INVISIBLE == action.Action)
+        {
+            Device->getCursorControl()->setVisible(false);
+            ButtonSetInvisible->setEnabled(true);
+        }
+    }
+

Add another icon which the user can click and select as cursor later on.

+
    void addIcon(const stringw& name, const SCursorSprite &sprite, bool addCursor=true)
+    {
+        // Sprites are just icons - not yet cursors. They can be displayed by Irrlicht sprite functions and be used to create cursors.
+        SpriteBox->addItem(name.c_str(), sprite.SpriteId);
+        Sprites.push_back(sprite);
+
+        // create the cursor together with the icon?
+        if ( addCursor )
+        {
+

Here we create a hardware cursor from a sprite

+
            Device->getCursorControl()->addIcon(sprite);
+
+            // ... and add it to the cursors selection listbox to the other system cursors.
+            CursorBox->addItem(name.c_str());
+        }
+    }
+
+    IrrlichtDevice * Device;
+    gui::IGUIStaticText * InfoStatic;
+    gui::IGUIListBox * EventBox;
+    gui::IGUIListBox * CursorBox;
+    gui::IGUIListBox * SpriteBox;
+    gui::IGUIButton * ButtonSetVisible;
+    gui::IGUIButton * ButtonSetInvisible;
+    gui::IGUIButton * ButtonSimulateBadFps;
+    gui::IGUIButton * ButtonChangeIcon;
+    array<TimerAction> TimerActions;
+    bool SimulateBadFps;
+    array<SCursorSprite> Sprites;
+};
+

Helper function to print mouse event names into a stringw

+
void PrintMouseEventName(const SEvent& event, stringw &result)
+{
+    switch ( event.MouseInput.Event )
+    {
+        case EMIE_LMOUSE_PRESSED_DOWN:  result += stringw(L"EMIE_LMOUSE_PRESSED_DOWN"); break;
+        case EMIE_RMOUSE_PRESSED_DOWN:  result += stringw(L"EMIE_RMOUSE_PRESSED_DOWN"); break;
+        case EMIE_MMOUSE_PRESSED_DOWN:  result += stringw(L"EMIE_MMOUSE_PRESSED_DOWN"); break;
+        case EMIE_LMOUSE_LEFT_UP:       result += stringw(L"EMIE_LMOUSE_LEFT_UP"); break;
+        case EMIE_RMOUSE_LEFT_UP:       result += stringw(L"EMIE_RMOUSE_LEFT_UP"); break;
+        case EMIE_MMOUSE_LEFT_UP:       result += stringw(L"EMIE_MMOUSE_LEFT_UP"); break;
+        case EMIE_MOUSE_MOVED:          result += stringw(L"EMIE_MOUSE_MOVED"); break;
+        case EMIE_MOUSE_WHEEL:          result += stringw(L"EMIE_MOUSE_WHEEL"); break;
+        case EMIE_LMOUSE_DOUBLE_CLICK:  result += stringw(L"EMIE_LMOUSE_DOUBLE_CLICK"); break;
+        case EMIE_RMOUSE_DOUBLE_CLICK:  result += stringw(L"EMIE_RMOUSE_DOUBLE_CLICK"); break;
+        case EMIE_MMOUSE_DOUBLE_CLICK:  result += stringw(L"EMIE_MMOUSE_DOUBLE_CLICK"); break;
+        case EMIE_LMOUSE_TRIPLE_CLICK:  result += stringw(L"EMIE_LMOUSE_TRIPLE_CLICK"); break;
+        case EMIE_RMOUSE_TRIPLE_CLICK:  result += stringw(L"EMIE_RMOUSE_TRIPLE_CLICK"); break;
+        case EMIE_MMOUSE_TRIPLE_CLICK:  result += stringw(L"EMIE_MMOUSE_TRIPLE_CLICK"); break;
+        default:
+        break;
+    }
+}
+

Helper function to print all the state information which get from a mouse-event into a stringw

+
void PrintMouseState(const SEvent& event, stringw &result)
+{
+    result += stringw(L"X: ");
+    result += stringw(event.MouseInput.X);
+    result += stringw(L"\n");
+
+    result += stringw(L"Y: ");
+    result += stringw(event.MouseInput.Y);
+    result += stringw(L"\n");
+
+
+    result += stringw(L"Wheel: ");
+    result += stringw(event.MouseInput.Wheel);
+    result += stringw(L"\n");
+
+    result += stringw(L"Shift: ");
+    if ( event.MouseInput.Shift )
+        result += stringw(L"true\n");
+    else
+        result += stringw(L"false\n");
+
+    result += stringw(L"Control: ");
+    if ( event.MouseInput.Control )
+        result += stringw(L"true\n");
+    else
+        result += stringw(L"false\n");
+
+    result += stringw(L"ButtonStates: ");
+    result += stringw(event.MouseInput.ButtonStates);
+    result += stringw(L"\n");
+
+    result += stringw(L"isLeftPressed: ");
+    if ( event.MouseInput.isLeftPressed() )
+        result += stringw(L"true\n");
+    else
+        result += stringw(L"false\n");
+
+    result += stringw(L"isRightPressed: ");
+    if ( event.MouseInput.isRightPressed() )
+        result += stringw(L"true\n");
+    else
+        result += stringw(L"false\n");
+
+    result += stringw(L"isMiddlePressed: ");
+    if ( event.MouseInput.isMiddlePressed() )
+        result += stringw(L"true\n");
+    else
+        result += stringw(L"false\n");
+
+    result += stringw(L"Event: ");
+
+    PrintMouseEventName(event, result);
+
+    result += stringw(L"\n");
+}
+

A typical event receiver.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    MyEventReceiver(SAppContext & context) : Context(context) { }
+
+    virtual bool OnEvent(const SEvent& event)
+    {
+        if (event.EventType == EET_GUI_EVENT )
+        {
+            switch ( event.GUIEvent.EventType )
+            {
+                case EGET_BUTTON_CLICKED:
+                {
+                    u32 timeNow = Context.Device->getTimer()->getTime();
+                    TimerAction action;
+                    action.TargetTime = timeNow + DELAY_TIME;
+                    if ( event.GUIEvent.Caller == Context.ButtonSetVisible )
+                    {
+                        action.Action = ETA_MOUSE_VISIBLE;
+                        Context.TimerActions.push_back(action);
+                        Context.ButtonSetVisible->setEnabled(false);
+                    }
+                    else if ( event.GUIEvent.Caller == Context.ButtonSetInvisible )
+                    {
+                        action.Action = ETA_MOUSE_INVISIBLE;
+                        Context.TimerActions.push_back(action);
+                        Context.ButtonSetInvisible->setEnabled(false);
+                    }
+                    else if ( event.GUIEvent.Caller == Context.ButtonSimulateBadFps )
+                    {
+                        Context.SimulateBadFps = Context.ButtonSimulateBadFps->isPressed();
+                    }
+                    else if ( event.GUIEvent.Caller == Context.ButtonChangeIcon )
+                    {
+

Replace an existing cursor icon by another icon. The user has to select both - the icon which should be replaced and the icon which will replace it.

+
                        s32 selectedCursor = Context.CursorBox->getSelected();
+                        s32 selectedSprite = Context.SpriteBox->getSelected();
+                        if ( selectedCursor >= 0 && selectedSprite >= 0 )
+                        {
+

This does replace the icon.

+
                            Context.Device->getCursorControl()->changeIcon((ECURSOR_ICON)selectedCursor, Context.Sprites[selectedSprite] );
+

Do also show the new icon.

+
                            Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selectedCursor) );
+                        }
+                    }
+                }
+                break;
+                case EGET_LISTBOX_CHANGED:
+                case EGET_LISTBOX_SELECTED_AGAIN:
+                {
+                    if ( event.GUIEvent.Caller == Context.CursorBox )
+                    {
+

Find out which cursor the user selected

+
                        s32 selected = Context.CursorBox->getSelected();
+                        if ( selected >= 0 )
+                        {
+

Here we set the new cursor icon which will now be used within our window.

+
                            Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selected) );
+                        }
+                    }
+                }
+                break;
+                default:
+                break;
+            }
+        }
+
+        if (event.EventType == EET_MOUSE_INPUT_EVENT)
+        {
+            stringw infoText;
+            PrintMouseState(event, infoText);
+            Context.InfoStatic->setText(infoText.c_str());
+            if ( event.MouseInput.Event != EMIE_MOUSE_MOVED && event.MouseInput.Event != EMIE_MOUSE_WHEEL ) // no spam
+            {
+                infoText = L"";
+                PrintMouseEventName(event, infoText);
+                Context.EventBox->insertItem(0, infoText.c_str(), -1);
+            }
+        }
+
+        return false;
+    }
+
+private:
+    SAppContext & Context;
+};
+

Use several imagefiles as animation frames for a sprite which can be used as cursor icon. The images in those files all need to have the same size. Return sprite index on success or -1 on failure

+
s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver,  const array< io::path >& files, u32 frameTime )
+{
+    if ( !spriteBank || !driver || !files.size() )
+        return -1;
+
+    video::ITexture * tex = driver->getTexture( files[0] );
+    if ( tex )
+    {
+        array< rect<s32> >& spritePositions = spriteBank->getPositions();
+        u32 idxRect = spritePositions.size();
+        spritePositions.push_back( rect<s32>(0,0, tex->getSize().Width, tex->getSize().Height) );
+
+        SGUISprite sprite;
+        sprite.frameTime = frameTime;
+
+        array< SGUISprite >& sprites = spriteBank->getSprites();
+        u32 startIdx = spriteBank->getTextureCount();
+        for ( u32 f=0; f < files.size(); ++f )
+        {
+            tex = driver->getTexture( files[f] );
+            if ( tex )
+            {
+                spriteBank->addTexture( driver->getTexture(files[f]) );
+                gui::SGUISpriteFrame frame;
+                frame.rectNumber = idxRect;
+                frame.textureNumber = startIdx+f;
+                sprite.Frames.push_back( frame );
+            }
+        }
+
+        sprites.push_back( sprite );
+        return sprites.size()-1;
+    }
+
+    return -1;
+}
+

Use several images within one imagefile as animation frames for a sprite which can be used as cursor icon The sizes of the icons within that file all need to have the same size Return sprite index on success or -1 on failure

+
s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver,  const io::path& file, const array< rect<s32> >& rects, u32 frameTime )
+{
+    if ( !spriteBank || !driver || !rects.size() )
+        return -1;
+
+    video::ITexture * tex = driver->getTexture( file );
+    if ( tex )
+    {
+        array< rect<s32> >& spritePositions = spriteBank->getPositions();
+        u32 idxRect = spritePositions.size();
+        u32 idxTex = spriteBank->getTextureCount();
+        spriteBank->addTexture( tex );
+
+        SGUISprite sprite;
+        sprite.frameTime = frameTime;
+
+        array< SGUISprite >& sprites = spriteBank->getSprites();
+        for ( u32 i=0; i < rects.size(); ++i )
+        {
+            spritePositions.push_back( rects[i] );
+
+            gui::SGUISpriteFrame frame;
+            frame.rectNumber = idxRect+i;
+            frame.textureNumber = idxTex;
+            sprite.Frames.push_back( frame );
+        }
+
+        sprites.push_back( sprite );
+        return sprites.size()-1;
+    }
+
+    return -1;
+}
+

Create a non-animated icon from the given file and position and put it into the spritebank. We can use this icon later on in a cursor.

+
s32 AddIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver,  const io::path& file, const core::rect<s32>& rect )
+{
+    if ( !spriteBank || !driver )
+        return -1;
+
+    video::ITexture * tex = driver->getTexture( file );
+    if ( tex )
+    {
+        core::array< core::rect<irr::s32> >& spritePositions = spriteBank->getPositions();
+        spritePositions.push_back( rect );
+        array< SGUISprite >& sprites = spriteBank->getSprites();
+        spriteBank->addTexture( tex );
+
+        gui::SGUISpriteFrame frame;
+        frame.rectNumber = spritePositions.size()-1;
+        frame.textureNumber = spriteBank->getTextureCount()-1;
+
+        SGUISprite sprite;
+        sprite.frameTime = 0;
+        sprite.Frames.push_back( frame );
+
+        sprites.push_back( sprite );
+
+        return sprites.size()-1;
+    }
+
+    return -1;
+}
+
+int main()
+{
+    video::E_DRIVER_TYPE driverType = driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    IrrlichtDevice * device = createDevice(driverType, dimension2d<u32>(640, 480));
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    // It's sometimes of interest to know how the mouse behaves after a resize
+    device->setResizable(true);
+
+    device->setWindowCaption(L"Cursor control - Irrlicht engine tutorial");
+    video::IVideoDriver* driver = device->getVideoDriver();
+    IGUIEnvironment* env = device->getGUIEnvironment();
+
+    gui::IGUISpriteBank * SpriteBankIcons;
+
+    SAppContext context;
+    context.Device = device;
+
+    rect< s32 > rectInfoStatic(10,10, 200, 200);
+    env->addStaticText (L"Cursor state information", rectInfoStatic, true, true);
+    rectInfoStatic.UpperLeftCorner += dimension2di(0, 15);
+    context.InfoStatic = env->addStaticText (L"", rectInfoStatic, true, true);
+    rect< s32 > rectEventBox(10,210, 200, 400);
+    env->addStaticText (L"click events (new on top)", rectEventBox, true, true);
+    rectEventBox.UpperLeftCorner += dimension2di(0, 15);
+    context.EventBox = env->addListBox(rectEventBox);
+    rect< s32 > rectCursorBox(210,10, 400, 250);
+    env->addStaticText (L"cursors, click to set the active one", rectCursorBox, true, true);
+    rectCursorBox.UpperLeftCorner += dimension2di(0, 15);
+    context.CursorBox = env->addListBox(rectCursorBox);
+    rect< s32 > rectSpriteBox(210,260, 400, 400);
+    env->addStaticText (L"sprites", rectSpriteBox, true, true);
+    rectSpriteBox.UpperLeftCorner += dimension2di(0, 15);
+    context.SpriteBox = env->addListBox(rectSpriteBox);
+
+    context.ButtonSetVisible = env->addButton( rect<s32>( 410, 20, 560, 40 ), 0, -1, L"set visible (delayed)" );
+    context.ButtonSetInvisible = env->addButton( rect<s32>( 410, 50, 560, 70 ), 0, -1, L"set invisible (delayed)" );
+    context.ButtonSimulateBadFps = env->addButton( rect<s32>( 410, 80, 560, 100 ), 0, -1, L"simulate bad FPS" );
+    context.ButtonSimulateBadFps->setIsPushButton(true);
+    context.ButtonChangeIcon = env->addButton( rect<s32>( 410, 140, 560, 160 ), 0, -1, L"replace cursor icon\n(cursor+sprite must be selected)" );
+
+    // set the names for all the system cursors
+    for ( int i=0; i < (int)gui::ECI_COUNT; ++i )
+    {
+        context.CursorBox->addItem(stringw( GUICursorIconNames[i] ).c_str());
+    }
+

Create sprites which then can be used as cursor icons.

+
    SpriteBankIcons = env->addEmptySpriteBank(io::path("cursor_icons"));
+    context.SpriteBox->setSpriteBank(SpriteBankIcons);
+
+    // create one animated icon from several files
+    array< io::path > files;
+    files.push_back( io::path("../../media/icon_crosshairs16x16bw1.png") );
+    files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") );
+    files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") );
+    files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") );
+    files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") );
+    SCursorSprite spriteBw; // the sprite + some additional information needed for cursors
+    spriteBw.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, files, 200 );
+    spriteBw.SpriteBank = SpriteBankIcons;
+    spriteBw.HotSpot = position2d<s32>(7,7);
+    context.addIcon(L"crosshair_bw", spriteBw);
+
+    // create one animated icon from one file
+    array< rect<s32> > iconRects;
+    iconRects.push_back( rect<s32>(0,0, 16, 16) );
+    iconRects.push_back( rect<s32>(16,0, 32, 16) );
+    iconRects.push_back( rect<s32>(0,16, 16, 32) );
+    iconRects.push_back( rect<s32>(0,16, 16, 32) );
+    iconRects.push_back( rect<s32>(16,0, 32, 16) );
+    SCursorSprite spriteCol;    // the sprite + some additional information needed for cursors
+    spriteCol.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), iconRects, 200 );
+    spriteCol.HotSpot = position2d<s32>(7,7);
+    spriteCol.SpriteBank = SpriteBankIcons;
+    context.addIcon(L"crosshair_colored", spriteCol);
+
+    // Create some non-animated icons
+    rect<s32> rectIcon;
+    SCursorSprite spriteNonAnimated(SpriteBankIcons, 0, position2d<s32>(7,7));
+
+    rectIcon = rect<s32>(0,0, 16, 16);
+    spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
+    context.addIcon(L"crosshair_col1", spriteNonAnimated, false);
+
+    rectIcon = rect<s32>(16,0, 32, 16);
+    spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
+    context.addIcon(L"crosshair_col2", spriteNonAnimated, false);
+
+    rectIcon = rect<s32>(0,16, 16, 32);
+    spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon );
+    context.addIcon(L"crosshair_col3", spriteNonAnimated, false);
+
+
+    MyEventReceiver receiver(context);
+    device->setEventReceiver(&receiver);
+
+    while(device->run() && driver)
+    {
+        // if (device->isWindowActive())
+        {
+            u32 realTimeNow = device->getTimer()->getRealTime();
+
+            context.update();
+
+            driver->beginScene(true, true, SColor(0,200,200,200));
+
+            env->drawAll();
+
+            // draw custom sprite with Irrlicht functions for comparison. It should usually look the same as the cursors.
+            if ( context.SpriteBox )
+            {
+                s32 selectedSprite = context.SpriteBox->getSelected();
+                if ( selectedSprite >= 0 && context.Sprites[selectedSprite].SpriteId >= 0 )
+                {
+                    SpriteBankIcons->draw2DSprite(u32(context.Sprites[selectedSprite].SpriteId), position2di(580, 140), 0, video::SColor(255, 255, 255, 255), 0, realTimeNow);
+                }
+            }
+
+            driver->endScene();
+        }
+
+        // By simulating bad fps we can find out if hardware-support for cursors works or not. If it works the cursor will move as usual,while it otherwise will just update with 2 fps now.
+        if ( context.SimulateBadFps )
+        {
+            device->sleep(500); // 2 fps
+        }
+        else
+        {
+            device->sleep(10);
+        }
+    }
+
+    device->drop();
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example025.html b/src/others/irrlicht-1.8.1/doc/html/example025.html new file mode 100644 index 0000000..a79b0fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example025.html @@ -0,0 +1,588 @@ + + + + +Irrlicht 3D Engine: Tutorial 25: Xml Handling + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 25: Xml Handling
+
+
+
+025shot.jpg +
+

Demonstrates loading and saving of configurations via XML

+
Author:
Y.M. Bosman <yoran.bosman@gmail.com>
+

This demo features a fully usable system for configuration handling. The code can easily be integrated into own apps.

+
#include <irrlicht.h>
+
+using namespace irr;
+using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
+#ifdef _IRR_WINDOWS_
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+

SettingManager class.

+

This class loads and writes the settings and manages the options.

+

The class makes use of irrMap which is a an associative arrays using a red-black tree it allows easy mapping of a key to a value, along the way there is some information on how to use it.

+
class SettingManager
+{
+public:
+
+    // Construct setting managers and set default settings
+    SettingManager(const stringw& settings_file): SettingsFile(settings_file), NullDevice(0)
+    {
+        // Irrlicht null device, we want to load settings before we actually created our device, therefore, nulldevice
+        NullDevice = irr::createDevice(irr::video::EDT_NULL);
+
+        //DriverOptions is an irrlicht map,
+        //we can insert values in the map in two ways by calling insert(key,value) or by using the [key] operator
+        //the [] operator overrides values if they already exist
+        DriverOptions.insert(L"Software", EDT_SOFTWARE);
+        DriverOptions.insert(L"OpenGL", EDT_OPENGL);
+        DriverOptions.insert(L"Direct3D9", EDT_DIRECT3D9);
+
+        //some resolution options
+        ResolutionOptions.insert(L"640x480", dimension2du(640,480));
+        ResolutionOptions.insert(L"800x600", dimension2du(800,600));
+        ResolutionOptions.insert(L"1024x768", dimension2du(1024,768));
+
+        //our preferred defaults
+        SettingMap.insert(L"driver", L"Direct3D9");
+        SettingMap.insert(L"resolution", L"640x480");
+        SettingMap.insert(L"fullscreen", L"0"); //0 is false
+    }
+
+    // Destructor, you could store settings automatically on exit of your
+    // application if you wanted to in our case we simply drop the
+    // nulldevice
+    ~SettingManager()
+    {
+        if (NullDevice)
+        {
+            NullDevice->closeDevice();
+            NullDevice->drop();
+        }
+    };
+

Load xml from disk, overwrite default settings The xml we are trying to load has the following structure settings nested in sections nested in the root node, like so

+
+		<?xml version="1.0"?>
+		<mygame>
+			<video>
+				<setting name="driver" value="Direct3D9">
+				<setting name="fullscreen" value="0">
+				<setting name="resolution" value="1024x768">
+			</video>
+		</mygame>
+	
    bool load()
+    {
+        //if not able to create device don't attempt to load
+        if (!NullDevice)
+            return false;
+
+        irr::io::IXMLReader* xml = NullDevice->getFileSystem()->createXMLReader(SettingsFile);  //create xml reader
+        if (!xml)
+            return false;
+
+        const stringw settingTag(L"setting"); //we'll be looking for this tag in the xml
+        stringw currentSection; //keep track of our current section
+        const stringw videoTag(L"video"); //constant for videotag
+
+        //while there is more to read
+        while (xml->read())
+        {
+            //check the node type
+            switch (xml->getNodeType())
+            {
+                //we found a new element
+                case irr::io::EXN_ELEMENT:
+                {
+                    //we currently are in the empty or mygame section and find the video tag so we set our current section to video
+                    if (currentSection.empty() && videoTag.equals_ignore_case(xml->getNodeName()))
+                    {
+                        currentSection = videoTag;
+                    }
+                    //we are in the video section and we find a setting to parse
+                    else if (currentSection.equals_ignore_case(videoTag) && settingTag.equals_ignore_case(xml->getNodeName() ))
+                    {
+                        //read in the key
+                        stringw key = xml->getAttributeValueSafe(L"name");
+                        //if there actually is a key to set
+                        if (!key.empty())
+                        {
+                            //set the setting in the map to the value,
+                            //the [] operator overrides values if they already exist or inserts a new key value
+                            //pair into the settings map if it was not defined yet
+                            SettingMap[key] = xml->getAttributeValueSafe(L"value");
+                        }
+                    }
+
+                    //..
+                    // You can add your own sections and tags to read in here
+                    //..
+                }
+                break;
+
+                //we found the end of an element
+                case irr::io::EXN_ELEMENT_END:
+                    //we were at the end of the video section so we reset our tag
+                    currentSection=L"";
+                break;
+            }
+        }
+
+        // don't forget to delete the xml reader
+        xml->drop();
+
+        return true;
+    }
+
+    // Save the xml to disk. We use the nulldevice.
+    bool save()
+    {
+
+        //if not able to create device don't attempt to save
+        if (!NullDevice)
+            return false;
+
+        //create xml writer
+        irr::io::IXMLWriter* xwriter = NullDevice->getFileSystem()->createXMLWriter( SettingsFile );
+        if (!xwriter)
+            return false;
+
+        //write out the obligatory xml header. Each xml-file needs to have exactly one of those.
+        xwriter->writeXMLHeader();
+
+        //start element mygame, you replace the label "mygame" with anything you want
+        xwriter->writeElement(L"mygame");
+        xwriter->writeLineBreak();                  //new line
+
+        //start section with video settings
+        xwriter->writeElement(L"video");
+        xwriter->writeLineBreak();                  //new line
+
+        // getIterator gets us a pointer to the first node of the settings map
+        // every iteration we increase the iterator which gives us the next map node
+        // until we reach the end we write settings one by one by using the nodes key and value functions
+        map<stringw, stringw>::Iterator i = SettingMap.getIterator();
+        for(; !i.atEnd(); i++)
+        {
+            //write element as <setting name="key" value="x" />
+            //the second parameter indicates this is an empty element with no children, just attributes
+            xwriter->writeElement(L"setting",true, L"name", i->getKey().c_str(), L"value",i->getValue().c_str() );
+            xwriter->writeLineBreak();
+        }
+        xwriter->writeLineBreak();
+
+        //close video section
+        xwriter->writeClosingTag(L"video");
+        xwriter->writeLineBreak();
+
+        //..
+        // You can add writing sound settings, savegame information etc
+        //..
+
+        //close mygame section
+        xwriter->writeClosingTag(L"mygame");
+
+        //delete xml writer
+        xwriter->drop();
+
+        return true;
+    }
+
+    // Set setting in our manager
+    void setSetting(const stringw& name, const stringw& value)
+    {
+        SettingMap[name]=value;
+    }
+
+    // set setting overload to quickly assign integers to our setting map
+    void setSetting(const stringw& name, s32 value)
+    {
+        SettingMap[name]=stringw(value);
+    }
+
+    // Get setting as string
+    stringw getSetting(const stringw& key) const
+    {
+        //the find function or irrmap returns a pointer to a map Node
+        //if the key can be found, otherwise it returns null
+        //the map node has the function getValue and getKey, as we already know the key, we return node->getValue()
+        map<stringw, stringw>::Node* n = SettingMap.find(key);
+        if (n)
+            return n->getValue();
+        else
+            return L"";
+    }
+
+    //
+    bool getSettingAsBoolean(const stringw& key ) const
+    {
+        stringw s = getSetting(key);
+        if (s.empty())
+            return false;
+        return s.equals_ignore_case(L"1");
+    }
+
+    //
+    s32 getSettingAsInteger(const stringw& key) const
+    {
+        //we implicitly cast to string instead of stringw because strtol10 does not accept wide strings
+        const stringc s = getSetting(key);
+        if (s.empty())
+            return 0;
+
+        return strtol10(s.c_str());
+    }
+
+public:
+    map<stringw, s32> DriverOptions; //available options for driver config
+    map<stringw, dimension2du> ResolutionOptions; //available options for resolution config
+private:
+    SettingManager(const SettingManager& other); // defined but not implemented
+    SettingManager& operator=(const SettingManager& other); // defined but not implemented
+
+    map<stringw, stringw> SettingMap; //current config
+
+    stringw SettingsFile; // location of the xml, usually the
+    irr::IrrlichtDevice* NullDevice;
+};
+

Application context for global variables

+
struct SAppContext
+{
+    SAppContext()
+        : Device(0),Gui(0), Driver(0), Settings(0), ShouldQuit(false),
+        ButtonSave(0), ButtonExit(0), ListboxDriver(0),
+        ListboxResolution(0), CheckboxFullscreen(0)
+    {
+    }
+
+    ~SAppContext()
+    {
+        if (Settings)
+            delete Settings;
+
+        if (Device)
+        {
+            Device->closeDevice();
+            Device->drop();
+        }
+    }
+
+    IrrlichtDevice* Device;
+    IGUIEnvironment* Gui;
+    IVideoDriver* Driver;
+    SettingManager* Settings;
+    bool ShouldQuit;
+
+    //settings dialog
+    IGUIButton* ButtonSave;
+    IGUIButton* ButtonExit;
+    IGUIListBox* ListboxDriver;
+    IGUIListBox* ListboxResolution;
+    IGUICheckBox* CheckboxFullscreen;
+};
+

A typical event receiver.

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    MyEventReceiver(SAppContext & a) : App(a) { }
+
+    virtual bool OnEvent(const SEvent& event)
+    {
+        if (event.EventType == EET_GUI_EVENT )
+        {
+            switch ( event.GUIEvent.EventType )
+            {
+                //handle button click events
+                case EGET_BUTTON_CLICKED:
+                {
+                    //Our save button was called so we obtain the settings from our dialog and save them
+                    if ( event.GUIEvent.Caller == App.ButtonSave )
+                    {
+                        //if there is a selection write it
+                        if ( App.ListboxDriver->getSelected() != -1)
+                            App.Settings->setSetting(L"driver", App.ListboxDriver->getListItem(App.ListboxDriver->getSelected()));
+
+                        //if there is a selection write it
+                        if ( App.ListboxResolution->getSelected() != -1)
+                            App.Settings->setSetting(L"resolution", App.ListboxResolution->getListItem(App.ListboxResolution->getSelected()));
+
+                        App.Settings->setSetting(L"fullscreen", App.CheckboxFullscreen->isChecked());
+
+
+                        if (App.Settings->save())
+                        {
+                            App.Gui->addMessageBox(L"settings save",L"settings saved, please restart for settings to change effect","",true);
+                        }
+                    }
+                    // cancel/exit button clicked, tell the application to exit
+                    else if ( event.GUIEvent.Caller == App.ButtonExit)
+                    {
+                        App.ShouldQuit = true;
+                    }
+                }
+                break;
+            }
+        }
+
+        return false;
+    }
+
+private:
+    SAppContext & App;
+};
+

Function to create a video settings dialog This dialog shows the current settings from the configuration xml and allows them to be changed

+
void createSettingsDialog(SAppContext& app)
+{
+    // first get rid of alpha in gui
+    for (irr::s32 i=0; i<irr::gui::EGDC_COUNT ; ++i)
+    {
+        irr::video::SColor col = app.Gui->getSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i);
+        col.setAlpha(255);
+        app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col);
+    }
+
+    //create video settings windows
+    gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect<s32>(10,10,400,400),true,L"Videosettings");
+    app.Gui->addStaticText (L"Select your desired video settings", rect< s32 >(10,20, 200, 40), false, true, windowSettings);
+
+    // add listbox for driver choice
+    app.Gui->addStaticText (L"Driver", rect< s32 >(10,50, 200, 60), false, true, windowSettings);
+    app.ListboxDriver = app.Gui->addListBox(rect<s32>(10,60,220,120), windowSettings, 1,true);
+
+    //add all available options to the driver choice listbox
+    map<stringw, s32>::Iterator i = app.Settings->DriverOptions.getIterator();
+    for(; !i.atEnd(); i++)
+        app.ListboxDriver->addItem(i->getKey().c_str());
+
+    //set currently selected driver
+    app.ListboxDriver->setSelected(app.Settings->getSetting("driver").c_str());
+
+    // add listbox for resolution choice
+    app.Gui->addStaticText (L"Resolution", rect< s32 >(10,130, 200, 140), false, true, windowSettings);
+    app.ListboxResolution = app.Gui->addListBox(rect<s32>(10,140,220,200), windowSettings, 1,true);
+
+    //add all available options to the resolution listbox
+    map<stringw, dimension2du>::Iterator ri = app.Settings->ResolutionOptions.getIterator();
+    for(; !ri.atEnd(); ri++)
+        app.ListboxResolution->addItem(ri->getKey().c_str());
+
+    //set currently selected resolution
+    app.ListboxResolution->setSelected(app.Settings->getSetting("resolution").c_str());
+
+    //add checkbox to toggle fullscreen, initially set to loaded setting
+    app.CheckboxFullscreen = app.Gui->addCheckBox(
+            app.Settings->getSettingAsBoolean("fullscreen"),
+            rect<s32>(10,220,220,240), windowSettings, -1,
+            L"Fullscreen");
+
+    //last but not least add save button
+    app.ButtonSave = app.Gui->addButton(
+            rect<s32>(80,250,150,270), windowSettings, 2,
+            L"Save video settings");
+
+    //exit/cancel button
+    app.ButtonExit = app.Gui->addButton(
+            rect<s32>(160,250,240,270), windowSettings, 2,
+            L"Cancel and exit");
+}
+

The main function. Creates all objects and does the XML handling.

+
int main()
+{
+    //create new application context
+    SAppContext app;
+
+    //create device creation parameters that can get overwritten by our settings file
+    SIrrlichtCreationParameters param;
+    param.DriverType = EDT_SOFTWARE;
+    param.WindowSize.set(640,480);
+
+    // Try to load config.
+    // I leave it as an exercise of the reader to store the configuration in the local application data folder,
+    // the only logical place to store config data for games. For all other operating systems I redirect to your manuals
+    app.Settings = new SettingManager("../../media/settings.xml");
+    if ( !app.Settings->load() )
+    {
+        // ...
+        // Here add your own exception handling, for now we continue because there are defaults set in SettingManager constructor
+        // ...
+    }
+    else
+    {
+        //settings xml loaded from disk,
+
+        //map driversetting to driver type and test if the setting is valid
+        //the DriverOptions map contains string representations mapped to to irrlicht E_DRIVER_TYPE enum
+        //e.g "direct3d9" will become 4
+        //see DriverOptions in the settingmanager class for details
+        map<stringw, s32>::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting("driver") );
+
+        if (driver)
+        {
+            if ( irr::IrrlichtDevice::isDriverSupported( static_cast<E_DRIVER_TYPE>( driver->getValue() )))
+            {
+                // selected driver is supported, so we use it.
+                param.DriverType = static_cast<E_DRIVER_TYPE>( driver->getValue());
+            }
+        }
+
+        //map resolution setting to dimension in a similar way as demonstrated above
+        map<stringw, dimension2du>::Node* res = app.Settings->ResolutionOptions.find( app.Settings->getSetting("resolution") );
+        if (res)
+        {
+            param.WindowSize = res->getValue();
+        }
+
+        //get fullscreen setting from config
+        param.Fullscreen = app.Settings->getSettingAsBoolean("fullscreen");
+    }
+
+    //create the irrlicht device using the settings
+    app.Device = createDeviceEx(param);
+    if (app.Device == 0)
+    {
+        // You can add your own exception handling on driver failure
+        exit(0);
+    }
+
+    app.Device->setWindowCaption(L"Xmlhandling - Irrlicht engine tutorial");
+    app.Driver  = app.Device->getVideoDriver();
+    app.Gui     = app.Device->getGUIEnvironment();
+
+    createSettingsDialog(app);
+
+    //set event receiver so we can respond to gui events
+    MyEventReceiver receiver(app);
+    app.Device->setEventReceiver(&receiver);
+
+    //enter main loop
+    while (!app.ShouldQuit && app.Device->run())
+    {
+        if (app.Device->isWindowActive())
+        {
+            app.Driver->beginScene(true, true, SColor(0,200,200,200));
+            app.Gui->drawAll();
+            app.Driver->endScene();
+        }
+        app.Device->sleep(10);
+    }
+
+    //app destroys device in destructor
+
+    return 0;
+}
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/example026.html b/src/others/irrlicht-1.8.1/doc/html/example026.html new file mode 100644 index 0000000..9a23601 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/example026.html @@ -0,0 +1,251 @@ + + + + +Irrlicht 3D Engine: Tutorial 26: OcclusionQuery + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Tutorial 26: OcclusionQuery
+
+
+
+026shot.jpg +
+

This Tutorial shows how to speed up rendering by use of the OcclusionQuery feature. The usual rendering tries to avoid rendering of scene nodes by culling those nodes which are outside the visible area, the view frustum. However, this technique does not cope with occluded objects which are still in the line of sight, but occluded by some larger object between the object and the eye (camera). Occlusion queries check exactly that. The queries basically measure the number of pixels that a previous render left on the screen. Since those pixels cannot be recognized at the end of a rendering anymore, the pixel count is measured directly when rendering. Thus, one needs to render the occluder (the object in front) first. This object needs to write to the z-buffer in order to become a real occluder. Then the node is rendered and in case a z-pass happens, i.e. the pixel is written to the framebuffer, the pixel is counted in the query. The result of a query is the number of pixels which got through. One can, based on this number, judge if the scene node is visible enough to be rendered, or if the node should be removed in the next round. Also note that the number of pixels is a safe over approximation in general. The pixels might be overdrawn later on, and the GPU tries to avoid inaccuracies which could lead to false negatives in the queries.

+

As you might have recognized already, we had to render the node to get the numbers. So where's the benefit, you might say. There are several ways where occlusion queries can help. It is often a good idea to just render the bbox of the node instead of the actual mesh. This is really fast and is a safe over approximation. If you need a more exact render with the actual geometry, it's a good idea to render with just basic solid material. Avoid complex shaders and state changes through textures. There's no need while just doing the occlusion query. At least if the render is not used for the actual scene. This is the third way to optimize occlusion queries. Just check the queries every 5th or 10th frame, or even less frequent. This depends on the movement speed of the objects and camera.

+
#ifdef _MSC_VER
+// We'll also define this to stop MSVC complaining about sprintf().
+#define _CRT_SECURE_NO_WARNINGS
+#pragma comment(lib, "Irrlicht.lib")
+#endif
+
+#include <irrlicht.h>
+#include "driverChoice.h"
+
+using namespace irr;
+

We need keyboard input events to switch some parameters

+
class MyEventReceiver : public IEventReceiver
+{
+public:
+    // This is the one method that we have to implement
+    virtual bool OnEvent(const SEvent& event)
+    {
+        // Remember whether each key is down or up
+        if (event.EventType == irr::EET_KEY_INPUT_EVENT)
+            KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
+
+        return false;
+    }
+
+    // This is used to check whether a key is being held down
+    virtual bool IsKeyDown(EKEY_CODE keyCode) const
+    {
+        return KeyIsDown[keyCode];
+    }
+    
+    MyEventReceiver()
+    {
+        for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
+            KeyIsDown[i] = false;
+    }
+
+private:
+    // We use this array to store the current state of each key
+    bool KeyIsDown[KEY_KEY_CODES_COUNT];
+};
+

We create an irr::IrrlichtDevice and the scene nodes. One occluder, one occluded. The latter is a complex sphere, which has many triangles.

+
int main()
+{
+    // ask user for driver
+    video::E_DRIVER_TYPE driverType=driverChoiceConsole();
+    if (driverType==video::EDT_COUNT)
+        return 1;
+
+    // create device
+    MyEventReceiver receiver;
+
+    IrrlichtDevice* device = createDevice(driverType,
+            core::dimension2d<u32>(640, 480), 16, false, false, false, &receiver);
+
+    if (device == 0)
+        return 1; // could not create selected driver.
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* smgr = device->getSceneManager();
+
+    smgr->getGUIEnvironment()->addStaticText(L"Press Space to hide occluder.", core::recti(10,10, 200,50));
+

Create the node to be occluded. We create a sphere node with high poly count.

+
    scene::ISceneNode * node = smgr->addSphereSceneNode(10, 64);
+    if (node)
+    {
+        node->setPosition(core::vector3df(0,0,60));
+        node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+        node->setMaterialFlag(video::EMF_LIGHTING, false);
+    }
+

Now we create another node, the occluder. It's a simple plane.

+
    scene::ISceneNode* plane = smgr->addMeshSceneNode(smgr->addHillPlaneMesh(
+        "plane", core::dimension2df(10,10), core::dimension2du(2,2)), 0, -1,
+        core::vector3df(0,0,20), core::vector3df(270,0,0));
+
+    if (plane)
+    {
+        plane->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
+        plane->setMaterialFlag(video::EMF_LIGHTING, false);
+        plane->setMaterialFlag(video::EMF_BACK_FACE_CULLING, true);
+    }
+

Here we create the occlusion query. Because we don't have a plain mesh scene node (ESNT_MESH or ESNT_ANIMATED_MESH), we pass the base geometry as well. Instead, we could also pass a simpler mesh or the bounding box. But we will use a time based method, where the occlusion query renders to the frame buffer and in case of success (occlusion), the mesh is not drawn for several frames.

+
    driver->addOcclusionQuery(node, ((scene::IMeshSceneNode*)node)->getMesh());
+

We have done everything, just a camera and draw it. We also write the current frames per second and the name of the driver to the caption of the window to examine the render speedup. We also store the time for measuring the time since the last occlusion query ran and store whether the node should be visible in the next frames.

+
    smgr->addCameraSceneNode();
+    int lastFPS = -1;
+    u32 timeNow = device->getTimer()->getTime();
+    bool nodeVisible=true;
+
+    while(device->run())
+    {
+        plane->setVisible(!receiver.IsKeyDown(irr::KEY_SPACE));
+
+        driver->beginScene(true, true, video::SColor(255,113,113,133));
+

First, we draw the scene, possibly without the occluded element. This is necessary because we need the occluder to be drawn first. You can also use several scene managers to collect a number of possible occluders in a separately rendered scene.

+
        node->setVisible(nodeVisible);
+        smgr->drawAll();
+        smgr->getGUIEnvironment()->drawAll();
+

Once in a while, here every 100 ms, we check the visibility. We run the queries, update the pixel value, and query the result. Since we already rendered the node we render the query invisible. The update is made blocking, as we need the result immediately. If you don't need the result immediately, e.g. because you have other things to render, you can call the update non-blocking. This gives the GPU more time to pass back the results without flushing the render pipeline. If the update was called non-blocking, the result from getOcclusionQueryResult is either the previous value, or 0xffffffff if no value has been generated at all, yet. The result is taken immediately as visibility flag for the node.

+
        if (device->getTimer()->getTime()-timeNow>100)
+        {
+            driver->runAllOcclusionQueries(false);
+            driver->updateAllOcclusionQueries();
+            nodeVisible=driver->getOcclusionQueryResult(node)>0;
+            timeNow=device->getTimer()->getTime();
+        }
+
+        driver->endScene();
+
+        int fps = driver->getFPS();
+
+        if (lastFPS != fps)
+        {
+            core::stringw tmp(L"OcclusionQuery Example [");
+            tmp += driver->getName();
+            tmp += L"] fps: ";
+            tmp += fps;
+
+            device->setWindowCaption(tmp.c_str());
+            lastFPS = fps;
+        }
+    }
+

In the end, delete the Irrlicht device.

+
    device->drop();
+    
+    return 0;
+}
+

That's it. Compile and play around with the program.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/fast__atof_8h.html b/src/others/irrlicht-1.8.1/doc/html/fast__atof_8h.html new file mode 100644 index 0000000..1e598dd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/fast__atof_8h.html @@ -0,0 +1,155 @@ + + + + +Irrlicht 3D Engine: fast_atof.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
fast_atof.h File Reference
+
+
+
#include "irrMath.h"
+#include "irrString.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Functions

+
    +
  • u32 irr::core::ctoul16 (char in) +
    Convert a hex-encoded character to an unsigned integer.
  • float irr::core::fast_atof (const char *floatAsString, const char **out=0) +
    Convert a string to a floating point number.
  • const char * irr::core::fast_atof_move (const char *in, f32 &result) +
    Provides a fast function for converting a string into a float.
  • f32 irr::core::strtof10 (const char *in, const char **out=0) +
    Converts a sequence of digits into a whole positive floating point value.
  • s32 irr::core::strtol10 (const char *in, const char **out=0) +
    Convert a simple string of base 10 digits into a signed 32 bit integer.
  • u32 irr::core::strtoul10 (const char *in, const char **out=0) +
    Convert a simple string of base 10 digits into an unsigned 32 bit integer.
  • u32 irr::core::strtoul16 (const char *in, const char **out=0) +
    Convert a simple string of base 16 digits into an unsigned 32 bit integer.
  • u32 irr::core::strtoul8 (const char *in, const char **out=0) +
    Convert a simple string of base 8 digits into an unsigned 32 bit integer.
  • u32 irr::core::strtoul_prefix (const char *in, const char **out=0) +
    Convert a C-style prefixed string (hex, oct, integer) into an unsigned 32 bit integer.
+

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/fast__atof_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/fast__atof_8h_source.html new file mode 100644 index 0000000..738827d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/fast__atof_8h_source.html @@ -0,0 +1,418 @@ + + + + +Irrlicht 3D Engine: fast_atof.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
fast_atof.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h
+00004 
+00005 #ifndef __FAST_ATOF_H_INCLUDED__
+00006 #define __FAST_ATOF_H_INCLUDED__
+00007 
+00008 #include "irrMath.h"
+00009 #include "irrString.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00016     // TODO: This should probably also be used in irr::core::string, but the float-to-string code
+00017     //      used there has to be rewritten first.
+00018     IRRLICHT_API extern irr::core::stringc LOCALE_DECIMAL_POINTS;
+00019 
+00020 // we write [17] here instead of [] to work around a swig bug
+00021 const float fast_atof_table[17] = {
+00022     0.f,
+00023     0.1f,
+00024     0.01f,
+00025     0.001f,
+00026     0.0001f,
+00027     0.00001f,
+00028     0.000001f,
+00029     0.0000001f,
+00030     0.00000001f,
+00031     0.000000001f,
+00032     0.0000000001f,
+00033     0.00000000001f,
+00034     0.000000000001f,
+00035     0.0000000000001f,
+00036     0.00000000000001f,
+00037     0.000000000000001f,
+00038     0.0000000000000001f
+00039 };
+00040 
+00042 
+00049 inline u32 strtoul10(const char* in, const char** out=0)
+00050 {
+00051     if (!in)
+00052     {
+00053         if (out)
+00054             *out = in;
+00055         return 0;
+00056     }
+00057 
+00058     bool overflow=false;
+00059     u32 unsignedValue = 0;
+00060     while ( ( *in >= '0') && ( *in <= '9' ))
+00061     {
+00062         const u32 tmp = ( unsignedValue * 10 ) + ( *in - '0' );
+00063         if (tmp<unsignedValue)
+00064         {
+00065             unsignedValue=(u32)0xffffffff;
+00066             overflow=true;
+00067         }
+00068         if (!overflow)
+00069             unsignedValue = tmp;
+00070         ++in;
+00071     }
+00072 
+00073     if (out)
+00074         *out = in;
+00075 
+00076     return unsignedValue;
+00077 }
+00078 
+00080 
+00089 inline s32 strtol10(const char* in, const char** out=0)
+00090 {
+00091     if (!in)
+00092     {
+00093         if (out)
+00094             *out = in;
+00095         return 0;
+00096     }
+00097 
+00098     const bool negative = ('-' == *in);
+00099     if (negative || ('+' == *in))
+00100         ++in;
+00101 
+00102     const u32 unsignedValue = strtoul10(in,out);
+00103     if (unsignedValue > (u32)INT_MAX)
+00104     {
+00105         if (negative)
+00106             return (s32)INT_MIN;
+00107         else
+00108             return (s32)INT_MAX;
+00109     }
+00110     else
+00111     {
+00112         if (negative)
+00113             return -((s32)unsignedValue);
+00114         else
+00115             return (s32)unsignedValue;
+00116     }
+00117 }
+00118 
+00120 
+00125 inline u32 ctoul16(char in)
+00126 {
+00127     if (in >= '0' && in <= '9')
+00128         return in - '0';
+00129     else if (in >= 'a' && in <= 'f')
+00130         return 10u + in - 'a';
+00131     else if (in >= 'A' && in <= 'F')
+00132         return 10u + in - 'A';
+00133     else
+00134         return 0xffffffff;
+00135 }
+00136 
+00138 
+00146 inline u32 strtoul16(const char* in, const char** out=0)
+00147 {
+00148     if (!in)
+00149     {
+00150         if (out)
+00151             *out = in;
+00152         return 0;
+00153     }
+00154 
+00155     bool overflow=false;
+00156     u32 unsignedValue = 0;
+00157     while (true)
+00158     {
+00159         u32 tmp = 0;
+00160         if ((*in >= '0') && (*in <= '9'))
+00161             tmp = (unsignedValue << 4u) + (*in - '0');
+00162         else if ((*in >= 'A') && (*in <= 'F'))
+00163             tmp = (unsignedValue << 4u) + (*in - 'A') + 10;
+00164         else if ((*in >= 'a') && (*in <= 'f'))
+00165             tmp = (unsignedValue << 4u) + (*in - 'a') + 10;
+00166         else
+00167             break;
+00168         if (tmp<unsignedValue)
+00169         {
+00170             unsignedValue=(u32)INT_MAX;
+00171             overflow=true;
+00172         }
+00173         if (!overflow)
+00174             unsignedValue = tmp;
+00175         ++in;
+00176     }
+00177 
+00178     if (out)
+00179         *out = in;
+00180 
+00181     return unsignedValue;
+00182 }
+00183 
+00185 
+00193 inline u32 strtoul8(const char* in, const char** out=0)
+00194 {
+00195     if (!in)
+00196     {
+00197         if (out)
+00198             *out = in;
+00199         return 0;
+00200     }
+00201 
+00202     bool overflow=false;
+00203     u32 unsignedValue = 0;
+00204     while (true)
+00205     {
+00206         u32 tmp = 0;
+00207         if ((*in >= '0') && (*in <= '7'))
+00208             tmp = (unsignedValue << 3u) + (*in - '0');
+00209         else
+00210             break;
+00211         if (tmp<unsignedValue)
+00212         {
+00213             unsignedValue=(u32)INT_MAX;
+00214             overflow=true;
+00215         }
+00216         if (!overflow)
+00217             unsignedValue = tmp;
+00218         ++in;
+00219     }
+00220 
+00221     if (out)
+00222         *out = in;
+00223 
+00224     return unsignedValue;
+00225 }
+00226 
+00228 
+00236 inline u32 strtoul_prefix(const char* in, const char** out=0)
+00237 {
+00238     if (!in)
+00239     {
+00240         if (out)
+00241             *out = in;
+00242         return 0;
+00243     }
+00244     if ('0'==in[0])
+00245         return ('x'==in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out));
+00246     return strtoul10(in,out);
+00247 }
+00248 
+00250 
+00258 inline f32 strtof10(const char* in, const char** out = 0)
+00259 {
+00260     if (!in)
+00261     {
+00262         if (out)
+00263             *out = in;
+00264         return 0.f;
+00265     }
+00266 
+00267     const u32 MAX_SAFE_U32_VALUE = UINT_MAX / 10 - 10;
+00268     u32 intValue = 0;
+00269 
+00270     // Use integer arithmetic for as long as possible, for speed
+00271     // and precision.
+00272     while ( ( *in >= '0') && ( *in <= '9' ) )
+00273     {
+00274         // If it looks like we're going to overflow, bail out
+00275         // now and start using floating point.
+00276         if (intValue >= MAX_SAFE_U32_VALUE)
+00277             break;
+00278 
+00279         intValue = (intValue * 10) + (*in - '0');
+00280         ++in;
+00281     }
+00282 
+00283     f32 floatValue = (f32)intValue;
+00284 
+00285     // If there are any digits left to parse, then we need to use
+00286     // floating point arithmetic from here.
+00287     while ( ( *in >= '0') && ( *in <= '9' ) )
+00288     {
+00289         floatValue = (floatValue * 10.f) + (f32)(*in - '0');
+00290         ++in;
+00291         if (floatValue > FLT_MAX) // Just give up.
+00292             break;
+00293     }
+00294 
+00295     if (out)
+00296         *out = in;
+00297 
+00298     return floatValue;
+00299 }
+00300 
+00302 
+00309 inline const char* fast_atof_move(const char* in, f32& result)
+00310 {
+00311     // Please run the regression test when making any modifications to this function.
+00312 
+00313     result = 0.f;
+00314     if (!in)
+00315         return 0;
+00316 
+00317     const bool negative = ('-' == *in);
+00318     if (negative || ('+'==*in))
+00319         ++in;
+00320 
+00321     f32 value = strtof10(in, &in);
+00322 
+00323     if ( LOCALE_DECIMAL_POINTS.findFirst(*in) >= 0 )
+00324     {
+00325         const char* afterDecimal = ++in;
+00326         const f32 decimal = strtof10(in, &afterDecimal);
+00327         value += decimal * fast_atof_table[afterDecimal - in];
+00328         in = afterDecimal;
+00329     }
+00330 
+00331     if ('e' == *in || 'E' == *in)
+00332     {
+00333         ++in;
+00334         // Assume that the exponent is a whole number.
+00335         // strtol10() will deal with both + and - signs,
+00336         // but calculate as f32 to prevent overflow at FLT_MAX
+00337         value *= powf(10.f, (f32)strtol10(in, &in));
+00338     }
+00339 
+00340     result = negative?-value:value;
+00341     return in;
+00342 }
+00343 
+00345 
+00350 inline float fast_atof(const char* floatAsString, const char** out=0)
+00351 {
+00352     float ret;
+00353     if (out)
+00354         *out=fast_atof_move(floatAsString, ret);
+00355     else
+00356         fast_atof_move(floatAsString, ret);
+00357     return ret;
+00358 }
+00359 
+00360 } // end namespace core
+00361 } // end namespace irr
+00362 
+00363 #endif
+00364 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/files.html b/src/others/irrlicht-1.8.1/doc/html/files.html new file mode 100644 index 0000000..586e929 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/files.html @@ -0,0 +1,303 @@ + + + + +Irrlicht 3D Engine: File List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
aabbox3d.h [code]
CDynamicMeshBuffer.h [code]
CIndexBuffer.h [code]
CMeshBuffer.h [code]
coreutil.h [code]File containing useful basic utility functions
CVertexBuffer.h [code]
dimension2d.h [code]
driverChoice.h [code]
EAttributes.h [code]
ECullingTypes.h [code]
EDebugSceneTypes.h [code]
EDeviceTypes.h [code]
EDriverFeatures.h [code]
EDriverTypes.h [code]
EGUIAlignment.h [code]
EGUIElementTypes.h [code]
EHardwareBufferFlags.h [code]
EMaterialFlags.h [code]
EMaterialTypes.h [code]
EMeshWriterEnums.h [code]
EMessageBoxFlags.h [code]
EPrimitiveTypes.h [code]
ESceneNodeAnimatorTypes.h [code]
ESceneNodeTypes.h [code]
EShaderTypes.h [code]
ETerrainElements.h [code]
fast_atof.h [code]
heapsort.h [code]
IAnimatedMesh.h [code]
IAnimatedMeshMD2.h [code]
IAnimatedMeshMD3.h [code]
IAnimatedMeshSceneNode.h [code]
IAttributeExchangingObject.h [code]
IAttributes.h [code]
IBillboardSceneNode.h [code]
IBillboardTextSceneNode.h [code]
IBoneSceneNode.h [code]
ICameraSceneNode.h [code]
IColladaMeshWriter.h [code]
ICursorControl.h [code]
IDummyTransformationSceneNode.h [code]
IDynamicMeshBuffer.h [code]
IEventReceiver.h [code]
IFileArchive.h [code]
IFileList.h [code]
IFileSystem.h [code]
IGeometryCreator.h [code]
IGPUProgrammingServices.h [code]
IGUIButton.h [code]
IGUICheckBox.h [code]
IGUIColorSelectDialog.h [code]
IGUIComboBox.h [code]
IGUIContextMenu.h [code]
IGUIEditBox.h [code]
IGUIElement.h [code]
IGUIElementFactory.h [code]
IGUIEnvironment.h [code]
IGUIFileOpenDialog.h [code]
IGUIFont.h [code]
IGUIFontBitmap.h [code]
IGUIImage.h [code]
IGUIImageList.h [code]
IGUIInOutFader.h [code]
IGUIListBox.h [code]
IGUIMeshViewer.h [code]
IGUIScrollBar.h [code]
IGUISkin.h [code]
IGUISpinBox.h [code]
IGUISpriteBank.h [code]
IGUIStaticText.h [code]
IGUITabControl.h [code]
IGUITable.h [code]
IGUIToolbar.h [code]
IGUITreeView.h [code]
IGUIWindow.h [code]
IImage.h [code]
IImageLoader.h [code]
IImageWriter.h [code]
IIndexBuffer.h [code]
ILightManager.h [code]
ILightSceneNode.h [code]
ILogger.h [code]
IMaterialRenderer.h [code]
IMaterialRendererServices.h [code]
IMesh.h [code]
IMeshBuffer.h [code]
IMeshCache.h [code]
IMeshLoader.h [code]
IMeshManipulator.h [code]
IMeshSceneNode.h [code]
IMeshWriter.h [code]
IMetaTriangleSelector.h [code]
IOSOperator.h [code]
IParticleAffector.h [code]
IParticleAnimatedMeshSceneNodeEmitter.h [code]
IParticleAttractionAffector.h [code]
IParticleBoxEmitter.h [code]
IParticleCylinderEmitter.h [code]
IParticleEmitter.h [code]
IParticleFadeOutAffector.h [code]
IParticleGravityAffector.h [code]
IParticleMeshEmitter.h [code]
IParticleRingEmitter.h [code]
IParticleRotationAffector.h [code]
IParticleSphereEmitter.h [code]
IParticleSystemSceneNode.h [code]
IQ3LevelMesh.h [code]
IQ3Shader.h [code]
IRandomizer.h [code]
IReadFile.h [code]
IReferenceCounted.h [code]
irrAllocator.h [code]
irrArray.h [code]
IrrCompileConfig.h [code]
irrlicht.h [code]Main header file of the irrlicht, the only file needed to include
IrrlichtDevice.h [code]
irrList.h [code]
irrMap.h [code]
irrMath.h [code]
irrpack.h [code]
irrString.h [code]
irrTypes.h [code]
irrunpack.h [code]
irrXML.h [code]Header file of the irrXML, the Irrlicht XML parser
ISceneCollisionManager.h [code]
ISceneLoader.h [code]
ISceneManager.h [code]
ISceneNode.h [code]
ISceneNodeAnimator.h [code]
ISceneNodeAnimatorCameraFPS.h [code]
ISceneNodeAnimatorCameraMaya.h [code]
ISceneNodeAnimatorCollisionResponse.h [code]
ISceneNodeAnimatorFactory.h [code]
ISceneNodeFactory.h [code]
ISceneUserDataSerializer.h [code]
IShaderConstantSetCallBack.h [code]
IShadowVolumeSceneNode.h [code]
ISkinnedMesh.h [code]
ITerrainSceneNode.h [code]
ITextSceneNode.h [code]
ITexture.h [code]
ITimer.h [code]
ITriangleSelector.h [code]
IVertexBuffer.h [code]
IVideoDriver.h [code]
IVideoModeList.h [code]
IVolumeLightSceneNode.h [code]
IWriteFile.h [code]
IXMLReader.h [code]
IXMLWriter.h [code]
Keycodes.h [code]
line2d.h [code]
line3d.h [code]
matrix4.h [code]
path.h [code]
plane3d.h [code]
position2d.h [code]
quaternion.h [code]
rect.h [code]
S3DVertex.h [code]
SAnimatedMesh.h [code]
SceneParameters.h [code]Header file containing all scene parameters for modifying mesh loading etc
SColor.h [code]
SExposedVideoData.h [code]
SIrrCreationParameters.h [code]
SKeyMap.h [code]
SLight.h [code]
SMaterial.h [code]
SMaterialLayer.h [code]
SMesh.h [code]
SMeshBuffer.h [code]
SMeshBufferLightMap.h [code]
SMeshBufferTangents.h [code]
SParticle.h [code]
SSharedMeshBuffer.h [code]
SSkinMeshBuffer.h [code]
SVertexIndex.h [code]
SVertexManipulator.h [code]
SViewFrustum.h [code]
triangle3d.h [code]
vector2d.h [code]
vector3d.h [code]
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2blank.png b/src/others/irrlicht-1.8.1/doc/html/ftv2blank.png new file mode 100644 index 0000000..3b7a29c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2blank.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2doc.png b/src/others/irrlicht-1.8.1/doc/html/ftv2doc.png new file mode 100644 index 0000000..9d0a8b7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2doc.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2folderclosed.png b/src/others/irrlicht-1.8.1/doc/html/ftv2folderclosed.png new file mode 100644 index 0000000..42a2040 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2folderclosed.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2folderopen.png b/src/others/irrlicht-1.8.1/doc/html/ftv2folderopen.png new file mode 100644 index 0000000..2269e63 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2folderopen.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2lastnode.png b/src/others/irrlicht-1.8.1/doc/html/ftv2lastnode.png new file mode 100644 index 0000000..3b7a29c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2lastnode.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2link.png b/src/others/irrlicht-1.8.1/doc/html/ftv2link.png new file mode 100644 index 0000000..9d0a8b7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2link.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2mlastnode.png b/src/others/irrlicht-1.8.1/doc/html/ftv2mlastnode.png new file mode 100644 index 0000000..c841eeb Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2mlastnode.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2mnode.png b/src/others/irrlicht-1.8.1/doc/html/ftv2mnode.png new file mode 100644 index 0000000..c841eeb Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2mnode.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2node.png b/src/others/irrlicht-1.8.1/doc/html/ftv2node.png new file mode 100644 index 0000000..3b7a29c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2node.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2plastnode.png b/src/others/irrlicht-1.8.1/doc/html/ftv2plastnode.png new file mode 100644 index 0000000..2085d9d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2plastnode.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2pnode.png b/src/others/irrlicht-1.8.1/doc/html/ftv2pnode.png new file mode 100644 index 0000000..2085d9d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2pnode.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2splitbar.png b/src/others/irrlicht-1.8.1/doc/html/ftv2splitbar.png new file mode 100644 index 0000000..1732ad4 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2splitbar.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/ftv2vertline.png b/src/others/irrlicht-1.8.1/doc/html/ftv2vertline.png new file mode 100644 index 0000000..3b7a29c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/ftv2vertline.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/functions.html b/src/others/irrlicht-1.8.1/doc/html/functions.html new file mode 100644 index 0000000..59baca8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions.html @@ -0,0 +1,683 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x62.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x62.html new file mode 100644 index 0000000..dbfb6c3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x62.html @@ -0,0 +1,292 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- b -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x63.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x63.html new file mode 100644 index 0000000..24b3111 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x63.html @@ -0,0 +1,580 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- c -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x64.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x64.html new file mode 100644 index 0000000..fa1acd9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x64.html @@ -0,0 +1,357 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- d -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x65.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x65.html new file mode 100644 index 0000000..bc5065f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x65.html @@ -0,0 +1,301 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- e -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x66.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x66.html new file mode 100644 index 0000000..4858ebc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x66.html @@ -0,0 +1,288 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- f -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x67.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x67.html new file mode 100644 index 0000000..503c240 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x67.html @@ -0,0 +1,2017 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- g -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x68.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x68.html new file mode 100644 index 0000000..010aabc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x68.html @@ -0,0 +1,218 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- h -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x69.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x69.html new file mode 100644 index 0000000..19bf0ed --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x69.html @@ -0,0 +1,643 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- i -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x6a.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x6a.html new file mode 100644 index 0000000..c895a09 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x6a.html @@ -0,0 +1,171 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- j -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x6b.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x6b.html new file mode 100644 index 0000000..c3c34fd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x6b.html @@ -0,0 +1,170 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- k -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x6c.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x6c.html new file mode 100644 index 0000000..b154a74 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x6c.html @@ -0,0 +1,252 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- l -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x6d.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x6d.html new file mode 100644 index 0000000..1fd659f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x6d.html @@ -0,0 +1,296 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- m -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x6e.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x6e.html new file mode 100644 index 0000000..c182b8d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x6e.html @@ -0,0 +1,239 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x6f.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x6f.html new file mode 100644 index 0000000..9439cf7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x6f.html @@ -0,0 +1,508 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- o -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x70.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x70.html new file mode 100644 index 0000000..a4be736 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x70.html @@ -0,0 +1,274 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- p -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x71.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x71.html new file mode 100644 index 0000000..ee34d57 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x71.html @@ -0,0 +1,170 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- q -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x72.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x72.html new file mode 100644 index 0000000..0119917 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x72.html @@ -0,0 +1,401 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x73.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x73.html new file mode 100644 index 0000000..122eaf7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x73.html @@ -0,0 +1,1420 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- s -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x74.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x74.html new file mode 100644 index 0000000..4ac73bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x74.html @@ -0,0 +1,291 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- t -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x75.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x75.html new file mode 100644 index 0000000..811665a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x75.html @@ -0,0 +1,212 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- u -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x76.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x76.html new file mode 100644 index 0000000..0026480 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x76.html @@ -0,0 +1,242 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x77.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x77.html new file mode 100644 index 0000000..d31bf3f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x77.html @@ -0,0 +1,228 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- w -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x78.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x78.html new file mode 100644 index 0000000..f97394f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x78.html @@ -0,0 +1,182 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- x -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x79.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x79.html new file mode 100644 index 0000000..d3f52fd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x79.html @@ -0,0 +1,181 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- y -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x7a.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x7a.html new file mode 100644 index 0000000..1d07b3c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x7a.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- z -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_0x7e.html b/src/others/irrlicht-1.8.1/doc/html/functions_0x7e.html new file mode 100644 index 0000000..cf8300a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_0x7e.html @@ -0,0 +1,272 @@ + + + + +Irrlicht 3D Engine: Class Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- ~ -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_enum.html b/src/others/irrlicht-1.8.1/doc/html/functions_enum.html new file mode 100644 index 0000000..eaff1eb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_enum.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Class Members - Enumerations + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_eval.html b/src/others/irrlicht-1.8.1/doc/html/functions_eval.html new file mode 100644 index 0000000..ec2c9be --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_eval.html @@ -0,0 +1,248 @@ + + + + +Irrlicht 3D Engine: Class Members - Enumerator + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+ + +

- e -

+ + +

- n -

+ + +

- p -

+ + +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func.html b/src/others/irrlicht-1.8.1/doc/html/functions_func.html new file mode 100644 index 0000000..04e6e34 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func.html @@ -0,0 +1,589 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x62.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x62.html new file mode 100644 index 0000000..8a693f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x62.html @@ -0,0 +1,222 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- b -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x63.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x63.html new file mode 100644 index 0000000..e0ca546 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x63.html @@ -0,0 +1,508 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- c -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x64.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x64.html new file mode 100644 index 0000000..f783326 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x64.html @@ -0,0 +1,297 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- d -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x65.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x65.html new file mode 100644 index 0000000..a1960de --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x65.html @@ -0,0 +1,219 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x66.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x66.html new file mode 100644 index 0000000..c5b0e72 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x66.html @@ -0,0 +1,229 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- f -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x67.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x67.html new file mode 100644 index 0000000..778989b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x67.html @@ -0,0 +1,1997 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- g -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x68.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x68.html new file mode 100644 index 0000000..5d32039 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x68.html @@ -0,0 +1,186 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- h -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x69.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x69.html new file mode 100644 index 0000000..8643769 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x69.html @@ -0,0 +1,590 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- i -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6a.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6a.html new file mode 100644 index 0000000..c89337a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6a.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6c.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6c.html new file mode 100644 index 0000000..907c338 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6c.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- l -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6d.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6d.html new file mode 100644 index 0000000..b173f14 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6d.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- m -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6e.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6e.html new file mode 100644 index 0000000..b25e1e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6e.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6f.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6f.html new file mode 100644 index 0000000..474edb2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x6f.html @@ -0,0 +1,481 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- o -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x70.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x70.html new file mode 100644 index 0000000..cbfd685 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x70.html @@ -0,0 +1,197 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x71.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x71.html new file mode 100644 index 0000000..f3dd9cc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x71.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- q -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x72.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x72.html new file mode 100644 index 0000000..330a56f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x72.html @@ -0,0 +1,363 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x73.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x73.html new file mode 100644 index 0000000..574f169 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x73.html @@ -0,0 +1,1337 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- s -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x74.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x74.html new file mode 100644 index 0000000..8b5d4b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x74.html @@ -0,0 +1,217 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- t -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x75.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x75.html new file mode 100644 index 0000000..e9d0385 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x75.html @@ -0,0 +1,188 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- u -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x76.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x76.html new file mode 100644 index 0000000..a9ad09f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x76.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x77.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x77.html new file mode 100644 index 0000000..0fb6afd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x77.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- w -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x78.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x78.html new file mode 100644 index 0000000..85445bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x78.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- x -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x79.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x79.html new file mode 100644 index 0000000..f61a88c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x79.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- y -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_func_0x7e.html b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x7e.html new file mode 100644 index 0000000..cb73926 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_func_0x7e.html @@ -0,0 +1,270 @@ + + + + +Irrlicht 3D Engine: Class Members - Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- ~ -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_rela.html b/src/others/irrlicht-1.8.1/doc/html/functions_rela.html new file mode 100644 index 0000000..0659112 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_rela.html @@ -0,0 +1,150 @@ + + + + +Irrlicht 3D Engine: Class Members - Related Functions + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_type.html b/src/others/irrlicht-1.8.1/doc/html/functions_type.html new file mode 100644 index 0000000..b48c659 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_type.html @@ -0,0 +1,134 @@ + + + + +Irrlicht 3D Engine: Class Members - Typedefs + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars.html new file mode 100644 index 0000000..ea3f5c2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars.html @@ -0,0 +1,235 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x62.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x62.html new file mode 100644 index 0000000..b7f4a79 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x62.html @@ -0,0 +1,227 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x63.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x63.html new file mode 100644 index 0000000..4f0d065 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x63.html @@ -0,0 +1,220 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x64.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x64.html new file mode 100644 index 0000000..3f03ef1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x64.html @@ -0,0 +1,217 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x65.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x65.html new file mode 100644 index 0000000..7c99d04 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x65.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x66.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x66.html new file mode 100644 index 0000000..4c8d20c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x66.html @@ -0,0 +1,216 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x67.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x67.html new file mode 100644 index 0000000..c885c69 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x67.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- g -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x68.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x68.html new file mode 100644 index 0000000..dba3d44 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x68.html @@ -0,0 +1,189 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x69.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x69.html new file mode 100644 index 0000000..2f5f550 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x69.html @@ -0,0 +1,211 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6a.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6a.html new file mode 100644 index 0000000..adcd042 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6a.html @@ -0,0 +1,166 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- j -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6b.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6b.html new file mode 100644 index 0000000..5e91b2c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6b.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- k -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6c.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6c.html new file mode 100644 index 0000000..c667bea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6c.html @@ -0,0 +1,198 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- l -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6d.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6d.html new file mode 100644 index 0000000..c0d0b87 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6d.html @@ -0,0 +1,244 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6e.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6e.html new file mode 100644 index 0000000..55a1903 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6e.html @@ -0,0 +1,212 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6f.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6f.html new file mode 100644 index 0000000..0b3359b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x6f.html @@ -0,0 +1,180 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- o -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x70.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x70.html new file mode 100644 index 0000000..1729b4a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x70.html @@ -0,0 +1,225 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x72.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x72.html new file mode 100644 index 0000000..36fa317 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x72.html @@ -0,0 +1,196 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x73.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x73.html new file mode 100644 index 0000000..c9588c6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x73.html @@ -0,0 +1,244 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x74.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x74.html new file mode 100644 index 0000000..17bb7ba --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x74.html @@ -0,0 +1,233 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- t -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x75.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x75.html new file mode 100644 index 0000000..f17e3ac --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x75.html @@ -0,0 +1,181 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- u -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x76.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x76.html new file mode 100644 index 0000000..62d4ff8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x76.html @@ -0,0 +1,207 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x77.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x77.html new file mode 100644 index 0000000..3a94aa5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x77.html @@ -0,0 +1,189 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x78.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x78.html new file mode 100644 index 0000000..4d0a380 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x78.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x79.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x79.html new file mode 100644 index 0000000..3733e17 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x79.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x7a.html b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x7a.html new file mode 100644 index 0000000..036fe20 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/functions_vars_0x7a.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: Class Members - Variables + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/globals.html b/src/others/irrlicht-1.8.1/doc/html/globals.html new file mode 100644 index 0000000..60fc428 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/globals.html @@ -0,0 +1,495 @@ + + + + +Irrlicht 3D Engine: File Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all file members with links to the files they belong to:
+ +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- f -

+ + +

- i -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/globals_defs.html b/src/others/irrlicht-1.8.1/doc/html/globals_defs.html new file mode 100644 index 0000000..0996c5f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/globals_defs.html @@ -0,0 +1,495 @@ + + + + +Irrlicht 3D Engine: File Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- f -

+ + +

- i -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/heapsort_8h.html b/src/others/irrlicht-1.8.1/doc/html/heapsort_8h.html new file mode 100644 index 0000000..7b3b879 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/heapsort_8h.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: heapsort.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
heapsort.h File Reference
+
+
+
#include "irrTypes.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Functions

+
    +
  • template<class T > void irr::core::heapsink (T *array, s32 element, s32 max) +
    Sinks an element into the heap.
  • template<class T > void irr::core::heapsort (T *array_, s32 size) +
    Sorts an array with size 'size' using heapsort.
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/heapsort_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/heapsort_8h_source.html new file mode 100644 index 0000000..72072a5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/heapsort_8h_source.html @@ -0,0 +1,188 @@ + + + + +Irrlicht 3D Engine: heapsort.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
heapsort.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_HEAPSORT_H_INCLUDED__
+00006 #define __IRR_HEAPSORT_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace core
+00013 {
+00014 
+00016 template<class T>
+00017 inline void heapsink(T*array, s32 element, s32 max)
+00018 {
+00019     while ((element<<1) < max) // there is a left child
+00020     {
+00021         s32 j = (element<<1);
+00022 
+00023         if (j+1 < max && array[j] < array[j+1])
+00024             j = j+1; // take right child
+00025 
+00026         if (array[element] < array[j])
+00027         {
+00028             T t = array[j]; // swap elements
+00029             array[j] = array[element];
+00030             array[element] = t;
+00031             element = j;
+00032         }
+00033         else
+00034             return;
+00035     }
+00036 }
+00037 
+00038 
+00040 template<class T>
+00041 inline void heapsort(T* array_, s32 size)
+00042 {
+00043     // for heapsink we pretent this is not c++, where
+00044     // arrays start with index 0. So we decrease the array pointer,
+00045     // the maximum always +2 and the element always +1
+00046 
+00047     T* virtualArray = array_ - 1;
+00048     s32 virtualSize = size + 2;
+00049     s32 i;
+00050 
+00051     // build heap
+00052 
+00053     for (i=((size-1)/2); i>=0; --i)
+00054         heapsink(virtualArray, i+1, virtualSize-1);
+00055 
+00056     // sort array, leave out the last element (0)
+00057     for (i=size-1; i>0; --i)
+00058     {
+00059         T t = array_[0];
+00060         array_[0] = array_[i];
+00061         array_[i] = t;
+00062         heapsink(virtualArray, 1, i + 1);
+00063     }
+00064 }
+00065 
+00066 } // end namespace core
+00067 } // end namespace irr
+00068 
+00069 #endif
+00070 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/hierarchy.html b/src/others/irrlicht-1.8.1/doc/html/hierarchy.html new file mode 100644 index 0000000..4155289 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/hierarchy.html @@ -0,0 +1,445 @@ + + + + +Irrlicht 3D Engine: Class Hierarchy + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
+
+
+

o*irr::core::aabbox3d< T >

+

o*irr::core::map< KeyType, ValueType >::AccessClass

+

o*irr::core::array< T, TAlloc >

+

o*irr::core::CMatrix4< T >

+

o*irr::core::list< T >::ConstIterator

+

o*irr::core::map< KeyType, ValueType >::ConstIterator

+

o*irr::core::dimension2d< T >

+

o*irr::core::FloatIntUnion32

+

o+irr::IEventReceiver

+ +

o*irr::io::IFileReadCallBack

+

o*irr::video::IGPUProgrammingServices

+

o*irr::io::IIrrXMLReader< char_type, super_class >

+

o*irr::video::IMaterialRendererServices

+

o*irr::core::inttofloat

+

o+irr::IReferenceCounted

+
+

|o*irr::gui::ICursorControl

+

|o*irr::gui::IGUIElementFactory

+

|o*irr::gui::IGUIEnvironment

+

|o+irr::gui::IGUIFont

+ +

|o*irr::gui::IGUIImageList

+

|o*irr::gui::IGUISpriteBank

+

|o*irr::gui::IGUITreeViewNode

+

|o*irr::ILogger

+

|o*irr::io::IArchiveLoader

+

|o+irr::io::IAttributeExchangingObject

+ +

|o*irr::io::IAttributes

+

|o*irr::io::IFileArchive

+

|o*irr::io::IFileList

+

|o*irr::io::IFileSystem

+

|o*irr::io::IReadFile

+

|o*irr::io::IWriteFile

+

|o*irr::io::IXMLWriter

+

|o*irr::IOSOperator

+

|o*irr::IRandomizer

+

|o*irr::IrrlichtDevice

+

|o*irr::ITimer

+

|o*irr::scene::IAnimationEndCallBack

+

|o*irr::scene::IColladaMeshWriterNames

+

|o*irr::scene::IColladaMeshWriterProperties

+

|o*irr::scene::ICollisionCallback

+

|o*irr::scene::IGeometryCreator

+

|o+irr::scene::IIndexBuffer

+ +

|o*irr::scene::ILightManager

+

|o+irr::scene::IMesh

+ +

|o+irr::scene::IMeshBuffer

+ +

|o*irr::scene::IMeshCache

+

|o*irr::scene::IMeshLoader

+

|o*irr::scene::IMeshManipulator

+

|o+irr::scene::IMeshWriter

+ +

|o*irr::scene::ISceneCollisionManager

+

|o*irr::scene::ISceneLoader

+

|o*irr::scene::ISceneManager

+

|o*irr::scene::ISceneNodeAnimatorFactory

+

|o*irr::scene::ISceneNodeFactory

+

|o+irr::scene::ITriangleSelector

+ +

|o+irr::scene::IVertexBuffer

+ +

|o*irr::scene::quake3::IShaderManager

+

|o*irr::scene::quake3::SVarGroupList

+

|o*irr::scene::SMD3Mesh

+

|o*irr::scene::SMD3MeshBuffer

+

|o*irr::video::IImage

+

|o*irr::video::IImageLoader

+

|o*irr::video::IImageWriter

+

|o*irr::video::IMaterialRenderer

+

|o*irr::video::IShaderConstantSetCallBack

+

|o*irr::video::ITexture

+

|o*irr::video::IVideoDriver

+

|\*irr::video::IVideoModeList

+
+

o*irr::video::IRenderTarget

+

o*irr::core::irrAllocator< T >

+

o*irr::core::irrAllocatorFast< T >

+

o*irr::scene::ISceneUserDataSerializer

+

o*irr::scene::quake3::IShader

+

o*irr::core::list< T >::Iterator

+

o*irr::core::map< KeyType, ValueType >::Iterator

+

o+irr::scene::IVertexManipulator

+ +

o*irr::io::IXMLBase

+

o*irr::core::line2d< T >

+

o*irr::core::line3d< T >

+

o*irr::core::list< T >

+

o*irr::core::map< KeyType, ValueType >

+

o*irr::scene::quake3::Noiser

+

o*irr::core::map< KeyType, ValueType >::ParentFirstIterator

+

o*irr::core::map< KeyType, ValueType >::ParentLastIterator

+

o*irr::core::plane3d< T >

+

o*irr::scene::quake3::Q3LevelLoadParameter

+

o*irr::core::quaternion

+

o*irr::ITimer::RealTimeDate

+

o*irr::core::rect< T >

+

o+irr::video::S3DVertex

+ +

o*irr::io::SAttributeReadWriteOptions

+

o*irr::scene::quake3::SBlendFunc

+

o*irr::video::SColor

+

o*irr::video::SColorf

+

o*irr::video::SColorHSL

+

o*irr::gui::SCursorSprite

+

o*irr::SEvent

+

o*irr::video::SExposedVideoData

+

o*irr::SEvent::SGUIEvent

+

o*irr::gui::SGUISprite

+

o*irr::gui::SGUISpriteFrame

+

o*irr::SIrrlichtCreationParameters

+

o*irr::scene::ISkinnedMesh::SJoint

+

o*irr::SEvent::SJoystickEvent

+

o*irr::SJoystickInfo

+

o*irr::SEvent::SKeyInput

+

o*irr::SKeyMap

+

o*irr::video::SLight

+

o*irr::SEvent::SLogEvent

+

o*irr::video::SMaterial

+

o*irr::video::SMaterialLayer

+

o*irr::scene::SMD3AnimationInfo

+

o*irr::scene::SMD3Face

+

o*irr::scene::SMD3Header

+

o*irr::scene::SMD3MeshHeader

+

o*irr::scene::SMD3QuaternionTag

+

o*irr::scene::SMD3QuaternionTagList

+

o*irr::scene::SMD3TexCoord

+

o*irr::scene::SMD3Vertex

+

o*irr::scene::quake3::SModifierFunction

+

o*irr::SEvent::SMouseInput

+

o*irr::io::SNamedPath

+

o*irr::video::SOverrideMaterial

+

o*irr::scene::SParticle

+

o*irr::scene::ISkinnedMesh::SPositionKey

+

o*irr::scene::ISkinnedMesh::SRotationKey

+

o*irr::scene::ISkinnedMesh::SScaleKey

+

o*irr::core::string< T, TAlloc >

+

o*irr::SEvent::SUserEvent

+

o*irr::scene::quake3::SVarGroup

+

o*irr::scene::quake3::SVariable

+

o*irr::scene::SViewFrustum

+

o*irr::scene::ISkinnedMesh::SWeight

+

o*irr::core::triangle3d< T >

+

o*irr::core::vector2d< T >

+

o*irr::core::vector3d< T >

+

\*irr::io::xmlChar< T >

+
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/index.html b/src/others/irrlicht-1.8.1/doc/html/index.html new file mode 100644 index 0000000..2d13f7b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/index.html @@ -0,0 +1,189 @@ + + + + +Irrlicht 3D Engine: Irrlicht Engine 1.8 API documentation + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Irrlicht Engine 1.8 API documentation
+
+
+
+logobig.png +
+

+Introduction

+

Welcome to the Irrlicht Engine API documentation. Here you'll find any information you'll need to develop applications with the Irrlicht Engine. If you are looking for a tutorial on how to start, you'll find some on the homepage of the Irrlicht Engine at irrlicht.sourceforge.net or inside the SDK in the examples directory.

+

The Irrlicht Engine is intended to be an easy-to-use 3d engine, so this documentation is an important part of it. If you have any questions or suggestions, just send a email to the author of the engine, Nikolaus Gebhardt (niko (at) irrlicht3d.org).

+

+Links

+

Namespaces: A very good place to start reading the documentation.
+ Class list: List of all classes with descriptions.
+ Class members: Good place to find forgotten features.
+

+

+Short example

+

A simple application, starting up the engine, loading a Quake 2 animated model file and the corresponding texture, animating and displaying it in front of a blue background and placing a user controlable 3d camera would look like the following code. I think this example shows the usage of the engine quite well:

+
 #include <irrlicht.h>
+ using namespace irr;
+
+ int main()
+ {
+    // start up the engine
+    IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D8,
+        core::dimension2d<u32>(640,480));
+
+    video::IVideoDriver* driver = device->getVideoDriver();
+    scene::ISceneManager* scenemgr = device->getSceneManager();
+
+    device->setWindowCaption(L"Hello World!");
+
+    // load and show quake2 .md2 model
+    scene::ISceneNode* node = scenemgr->addAnimatedMeshSceneNode(
+        scenemgr->getMesh("quake2model.md2"));
+
+    // if everything worked, add a texture and disable lighting
+    if (node)
+    {
+        node->setMaterialTexture(0, driver->getTexture("texture.bmp"));
+        node->setMaterialFlag(video::EMF_LIGHTING, false);
+    }
+
+    // add a first person shooter style user controlled camera
+    scenemgr->addCameraSceneNodeFPS();
+
+    // draw everything
+    while(device->run() && driver)
+    {
+        driver->beginScene(true, true, video::SColor(255,0,0,255));
+        scenemgr->drawAll();
+        driver->endScene();
+    }
+
+    // delete device
+    device->drop();
+    return 0;
+ }
+

Irrlicht can load a lot of file formats automaticly, see irr::scene::ISceneManager::getMesh() for a detailed list. So if you would like to replace the simple blue screen background by a cool Quake 3 Map, optimized by an octree, just insert this code somewhere before the while loop:

+
    // add .pk3 archive to the file system
+    device->getFileSystem()->addZipFileArchive("quake3map.pk3");
+
+    // load .bsp file and show it using an octree
+    scenemgr->addOctreeSceneNode(
+        scenemgr->getMesh("quake3map.bsp"));
+

As you can see, the engine uses namespaces. Everything in the engine is placed into the namespace 'irr', but there are also 5 sub namespaces. You can find a list of all namespaces with descriptions at the namespaces page. This is also a good place to start reading the documentation. If you don't want to write the namespace names all the time, just use all namespaces like this:

+
 using namespace core;
+ using namespace scene;
+ using namespace video;
+ using namespace io;
+ using namespace gui;
+

There is a lot more the engine can do, but I hope this gave a short overview over the basic features of the engine. For more examples, please take a look into the examples directory of the SDK.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/installdox b/src/others/irrlicht-1.8.1/doc/html/installdox new file mode 100644 index 0000000..edf5bbf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/installdox @@ -0,0 +1,112 @@ +#!/usr/bin/perl + +%subst = ( ); +$quiet = 0; + +while ( @ARGV ) { + $_ = shift @ARGV; + if ( s/^-// ) { + if ( /^l(.*)/ ) { + $v = ($1 eq "") ? shift @ARGV : $1; + ($v =~ /\/$/) || ($v .= "/"); + $_ = $v; + if ( /(.+)\@(.+)/ ) { + if ( exists $subst{$1} ) { + $subst{$1} = $2; + } else { + print STDERR "Unknown tag file $1 given with option -l\n"; + &usage(); + } + } else { + print STDERR "Argument $_ is invalid for option -l\n"; + &usage(); + } + } + elsif ( /^q/ ) { + $quiet = 1; + } + elsif ( /^\?|^h/ ) { + &usage(); + } + else { + print STDERR "Illegal option -$_\n"; + &usage(); + } + } + else { + push (@files, $_ ); + } +} + +foreach $sub (keys %subst) +{ + if ( $subst{$sub} eq "" ) + { + print STDERR "No substitute given for tag file `$sub'\n"; + &usage(); + } + elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) + { + print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; + } +} + +if ( ! @files ) { + if (opendir(D,".")) { + foreach $file ( readdir(D) ) { + $match = ".html"; + next if ( $file =~ /^\.\.?$/ ); + ($file =~ /$match/) && (push @files, $file); + ($file =~ /\.svg/) && (push @files, $file); + ($file =~ "navtree.js") && (push @files, $file); + } + closedir(D); + } +} + +if ( ! @files ) { + print STDERR "Warning: No input files given and none found!\n"; +} + +foreach $f (@files) +{ + if ( ! $quiet ) { + print "Editing: $f...\n"; + } + $oldf = $f; + $f .= ".bak"; + unless (rename $oldf,$f) { + print STDERR "Error: cannot rename file $oldf\n"; + exit 1; + } + if (open(F,"<$f")) { + unless (open(G,">$oldf")) { + print STDERR "Error: opening file $oldf for writing\n"; + exit 1; + } + if ($oldf ne "tree.js") { + while () { + s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (xlink:href|href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; + print G "$_"; + } + } + else { + while () { + s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; + print G "$_"; + } + } + } + else { + print STDERR "Warning file $f does not exist\n"; + } + unlink $f; +} + +sub usage { + print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; + print STDERR "Options:\n"; + print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; + print STDERR " -q Quiet mode\n\n"; + exit 1; +} diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h.html new file mode 100644 index 0000000..75e85a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h.html @@ -0,0 +1,151 @@ + + + + +Irrlicht 3D Engine: irrAllocator.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrAllocator.h File Reference
+
+
+
#include "irrTypes.h"
+#include <new>
+#include <memory.h>
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h_source.html new file mode 100644 index 0000000..0b33851 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_allocator_8h_source.html @@ -0,0 +1,231 @@ + + + + +Irrlicht 3D Engine: irrAllocator.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrAllocator.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h
+00004 
+00005 #ifndef __IRR_ALLOCATOR_H_INCLUDED__
+00006 #define __IRR_ALLOCATOR_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include <new>
+00010 // necessary for older compilers
+00011 #include <memory.h>
+00012 
+00013 namespace irr
+00014 {
+00015 namespace core
+00016 {
+00017 
+00018 #ifdef DEBUG_CLIENTBLOCK
+00019 #undef DEBUG_CLIENTBLOCK
+00020 #define DEBUG_CLIENTBLOCK new
+00021 #endif
+00022 
+00024 template<typename T>
+00025 class irrAllocator
+00026 {
+00027 public:
+00028 
+00030     virtual ~irrAllocator() {}
+00031 
+00033     T* allocate(size_t cnt)
+00034     {
+00035         return (T*)internal_new(cnt* sizeof(T));
+00036     }
+00037 
+00039     void deallocate(T* ptr)
+00040     {
+00041         internal_delete(ptr);
+00042     }
+00043 
+00045     void construct(T* ptr, const T&e)
+00046     {
+00047         new ((void*)ptr) T(e);
+00048     }
+00049 
+00051     void destruct(T* ptr)
+00052     {
+00053         ptr->~T();
+00054     }
+00055 
+00056 protected:
+00057 
+00058     virtual void* internal_new(size_t cnt)
+00059     {
+00060         return operator new(cnt);
+00061     }
+00062 
+00063     virtual void internal_delete(void* ptr)
+00064     {
+00065         operator delete(ptr);
+00066     }
+00067 
+00068 };
+00069 
+00070 
+00072 
+00074 template<typename T>
+00075 class irrAllocatorFast
+00076 {
+00077 public:
+00078 
+00080     T* allocate(size_t cnt)
+00081     {
+00082         return (T*)operator new(cnt* sizeof(T));
+00083     }
+00084 
+00086     void deallocate(T* ptr)
+00087     {
+00088         operator delete(ptr);
+00089     }
+00090 
+00092     void construct(T* ptr, const T&e)
+00093     {
+00094         new ((void*)ptr) T(e);
+00095     }
+00096 
+00098     void destruct(T* ptr)
+00099     {
+00100         ptr->~T();
+00101     }
+00102 };
+00103 
+00104 
+00105 
+00106 #ifdef DEBUG_CLIENTBLOCK
+00107 #undef DEBUG_CLIENTBLOCK
+00108 #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)
+00109 #endif
+00110 
+00112 enum eAllocStrategy
+00113 {
+00114     ALLOC_STRATEGY_SAFE    = 0,
+00115     ALLOC_STRATEGY_DOUBLE  = 1,
+00116     ALLOC_STRATEGY_SQRT    = 2
+00117 };
+00118 
+00119 
+00120 } // end namespace core
+00121 } // end namespace irr
+00122 
+00123 #endif
+00124 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_array_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_array_8h.html new file mode 100644 index 0000000..3239750 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_array_8h.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: irrArray.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrArray.h File Reference
+
+
+
#include "irrTypes.h"
+#include "heapsort.h"
+#include "irrAllocator.h"
+#include "irrMath.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_array_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_array_8h_source.html new file mode 100644 index 0000000..b6e4ed9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_array_8h_source.html @@ -0,0 +1,643 @@ + + + + +Irrlicht 3D Engine: irrArray.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrArray.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h
+00004 
+00005 #ifndef __IRR_ARRAY_H_INCLUDED__
+00006 #define __IRR_ARRAY_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "heapsort.h"
+00010 #include "irrAllocator.h"
+00011 #include "irrMath.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace core
+00016 {
+00017 
+00019 
+00021 template <class T, typename TAlloc = irrAllocator<T> >
+00022 class array
+00023 {
+00024 
+00025 public:
+00026 
+00028     array()
+00029         : data(0), allocated(0), used(0),
+00030             strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true)
+00031     {
+00032     }
+00033 
+00034 
+00036 
+00037     array(u32 start_count)
+00038       : data(0), allocated(0), used(0),
+00039         strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true)
+00040     {
+00041         reallocate(start_count);
+00042     }
+00043 
+00044 
+00046     array(const array<T, TAlloc>& other) : data(0)
+00047     {
+00048         *this = other;
+00049     }
+00050 
+00051 
+00053 
+00055     ~array()
+00056     {
+00057         clear();
+00058     }
+00059 
+00060 
+00062 
+00067     void reallocate(u32 new_size, bool canShrink=true)
+00068     {
+00069         if (allocated==new_size)
+00070             return;
+00071         if (!canShrink && (new_size < allocated))
+00072             return;
+00073 
+00074         T* old_data = data;
+00075 
+00076         data = allocator.allocate(new_size); //new T[new_size];
+00077         allocated = new_size;
+00078 
+00079         // copy old data
+00080         s32 end = used < new_size ? used : new_size;
+00081 
+00082         for (s32 i=0; i<end; ++i)
+00083         {
+00084             // data[i] = old_data[i];
+00085             allocator.construct(&data[i], old_data[i]);
+00086         }
+00087 
+00088         // destruct old data
+00089         for (u32 j=0; j<used; ++j)
+00090             allocator.destruct(&old_data[j]);
+00091 
+00092         if (allocated < used)
+00093             used = allocated;
+00094 
+00095         allocator.deallocate(old_data); //delete [] old_data;
+00096     }
+00097 
+00098 
+00100 
+00103     void setAllocStrategy ( eAllocStrategy newStrategy = ALLOC_STRATEGY_DOUBLE )
+00104     {
+00105         strategy = newStrategy;
+00106     }
+00107 
+00108 
+00110 
+00112     void push_back(const T& element)
+00113     {
+00114         insert(element, used);
+00115     }
+00116 
+00117 
+00119 
+00123     void push_front(const T& element)
+00124     {
+00125         insert(element);
+00126     }
+00127 
+00128 
+00130 
+00135     void insert(const T& element, u32 index=0)
+00136     {
+00137         _IRR_DEBUG_BREAK_IF(index>used) // access violation
+00138 
+00139         if (used + 1 > allocated)
+00140         {
+00141             // this doesn't work if the element is in the same
+00142             // array. So we'll copy the element first to be sure
+00143             // we'll get no data corruption
+00144             const T e(element);
+00145 
+00146             // increase data block
+00147             u32 newAlloc;
+00148             switch ( strategy )
+00149             {
+00150                 case ALLOC_STRATEGY_DOUBLE:
+00151                     newAlloc = used + 1 + (allocated < 500 ?
+00152                             (allocated < 5 ? 5 : used) : used >> 2);
+00153                     break;
+00154                 default:
+00155                 case ALLOC_STRATEGY_SAFE:
+00156                     newAlloc = used + 1;
+00157                     break;
+00158             }
+00159             reallocate( newAlloc);
+00160 
+00161             // move array content and construct new element
+00162             // first move end one up
+00163             for (u32 i=used; i>index; --i)
+00164             {
+00165                 if (i<used)
+00166                     allocator.destruct(&data[i]);
+00167                 allocator.construct(&data[i], data[i-1]); // data[i] = data[i-1];
+00168             }
+00169             // then add new element
+00170             if (used > index)
+00171                 allocator.destruct(&data[index]);
+00172             allocator.construct(&data[index], e); // data[index] = e;
+00173         }
+00174         else
+00175         {
+00176             // element inserted not at end
+00177             if ( used > index )
+00178             {
+00179                 // create one new element at the end
+00180                 allocator.construct(&data[used], data[used-1]);
+00181 
+00182                 // move the rest of the array content
+00183                 for (u32 i=used-1; i>index; --i)
+00184                 {
+00185                     data[i] = data[i-1];
+00186                 }
+00187                 // insert the new element
+00188                 data[index] = element;
+00189             }
+00190             else
+00191             {
+00192                 // insert the new element to the end
+00193                 allocator.construct(&data[index], element);
+00194             }
+00195         }
+00196         // set to false as we don't know if we have the comparison operators
+00197         is_sorted = false;
+00198         ++used;
+00199     }
+00200 
+00201 
+00203     void clear()
+00204     {
+00205         if (free_when_destroyed)
+00206         {
+00207             for (u32 i=0; i<used; ++i)
+00208                 allocator.destruct(&data[i]);
+00209 
+00210             allocator.deallocate(data); // delete [] data;
+00211         }
+00212         data = 0;
+00213         used = 0;
+00214         allocated = 0;
+00215         is_sorted = true;
+00216     }
+00217 
+00218 
+00220 
+00228     void set_pointer(T* newPointer, u32 size, bool _is_sorted=false, bool _free_when_destroyed=true)
+00229     {
+00230         clear();
+00231         data = newPointer;
+00232         allocated = size;
+00233         used = size;
+00234         is_sorted = _is_sorted;
+00235         free_when_destroyed=_free_when_destroyed;
+00236     }
+00237 
+00238 
+00240 
+00247     void set_free_when_destroyed(bool f)
+00248     {
+00249         free_when_destroyed = f;
+00250     }
+00251 
+00252 
+00254 
+00257     void set_used(u32 usedNow)
+00258     {
+00259         if (allocated < usedNow)
+00260             reallocate(usedNow);
+00261 
+00262         used = usedNow;
+00263     }
+00264 
+00265 
+00267     const array<T, TAlloc>& operator=(const array<T, TAlloc>& other)
+00268     {
+00269         if (this == &other)
+00270             return *this;
+00271         strategy = other.strategy;
+00272 
+00273         if (data)
+00274             clear();
+00275 
+00276         //if (allocated < other.allocated)
+00277         if (other.allocated == 0)
+00278             data = 0;
+00279         else
+00280             data = allocator.allocate(other.allocated); // new T[other.allocated];
+00281 
+00282         used = other.used;
+00283         free_when_destroyed = true;
+00284         is_sorted = other.is_sorted;
+00285         allocated = other.allocated;
+00286 
+00287         for (u32 i=0; i<other.used; ++i)
+00288             allocator.construct(&data[i], other.data[i]); // data[i] = other.data[i];
+00289 
+00290         return *this;
+00291     }
+00292 
+00293 
+00295     bool operator == (const array<T, TAlloc>& other) const
+00296     {
+00297         if (used != other.used)
+00298             return false;
+00299 
+00300         for (u32 i=0; i<other.used; ++i)
+00301             if (data[i] != other[i])
+00302                 return false;
+00303         return true;
+00304     }
+00305 
+00306 
+00308     bool operator != (const array<T, TAlloc>& other) const
+00309     {
+00310         return !(*this==other);
+00311     }
+00312 
+00313 
+00315     T& operator [](u32 index)
+00316     {
+00317         _IRR_DEBUG_BREAK_IF(index>=used) // access violation
+00318 
+00319         return data[index];
+00320     }
+00321 
+00322 
+00324     const T& operator [](u32 index) const
+00325     {
+00326         _IRR_DEBUG_BREAK_IF(index>=used) // access violation
+00327 
+00328         return data[index];
+00329     }
+00330 
+00331 
+00333     T& getLast()
+00334     {
+00335         _IRR_DEBUG_BREAK_IF(!used) // access violation
+00336 
+00337         return data[used-1];
+00338     }
+00339 
+00340 
+00342     const T& getLast() const
+00343     {
+00344         _IRR_DEBUG_BREAK_IF(!used) // access violation
+00345 
+00346         return data[used-1];
+00347     }
+00348 
+00349 
+00351 
+00352     T* pointer()
+00353     {
+00354         return data;
+00355     }
+00356 
+00357 
+00359 
+00360     const T* const_pointer() const
+00361     {
+00362         return data;
+00363     }
+00364 
+00365 
+00367 
+00368     u32 size() const
+00369     {
+00370         return used;
+00371     }
+00372 
+00373 
+00375 
+00377     u32 allocated_size() const
+00378     {
+00379         return allocated;
+00380     }
+00381 
+00382 
+00384 
+00385     bool empty() const
+00386     {
+00387         return used == 0;
+00388     }
+00389 
+00390 
+00392 
+00394     void sort()
+00395     {
+00396         if (!is_sorted && used>1)
+00397             heapsort(data, used);
+00398         is_sorted = true;
+00399     }
+00400 
+00401 
+00403 
+00409     s32 binary_search(const T& element)
+00410     {
+00411         sort();
+00412         return binary_search(element, 0, used-1);
+00413     }
+00414 
+00415 
+00417 
+00422     s32 binary_search(const T& element) const
+00423     {
+00424         if (is_sorted)
+00425             return binary_search(element, 0, used-1);
+00426         else
+00427             return linear_search(element);
+00428     }
+00429 
+00430 
+00432 
+00437     s32 binary_search(const T& element, s32 left, s32 right) const
+00438     {
+00439         if (!used)
+00440             return -1;
+00441 
+00442         s32 m;
+00443 
+00444         do
+00445         {
+00446             m = (left+right)>>1;
+00447 
+00448             if (element < data[m])
+00449                 right = m - 1;
+00450             else
+00451                 left = m + 1;
+00452 
+00453         } while((element < data[m] || data[m] < element) && left<=right);
+00454         // this last line equals to:
+00455         // " while((element != array[m]) && left<=right);"
+00456         // but we only want to use the '<' operator.
+00457         // the same in next line, it is "(element == array[m])"
+00458 
+00459 
+00460         if (!(element < data[m]) && !(data[m] < element))
+00461             return m;
+00462 
+00463         return -1;
+00464     }
+00465 
+00466 
+00469 
+00475     s32 binary_search_multi(const T& element, s32 &last)
+00476     {
+00477         sort();
+00478         s32 index = binary_search(element, 0, used-1);
+00479         if ( index < 0 )
+00480             return index;
+00481 
+00482         // The search can be somewhere in the middle of the set
+00483         // look linear previous and past the index
+00484         last = index;
+00485 
+00486         while ( index > 0 && !(element < data[index - 1]) && !(data[index - 1] < element) )
+00487         {
+00488             index -= 1;
+00489         }
+00490         // look linear up
+00491         while ( last < (s32) used - 1 && !(element < data[last + 1]) && !(data[last + 1] < element) )
+00492         {
+00493             last += 1;
+00494         }
+00495 
+00496         return index;
+00497     }
+00498 
+00499 
+00501 
+00506     s32 linear_search(const T& element) const
+00507     {
+00508         for (u32 i=0; i<used; ++i)
+00509             if (element == data[i])
+00510                 return (s32)i;
+00511 
+00512         return -1;
+00513     }
+00514 
+00515 
+00517 
+00522     s32 linear_reverse_search(const T& element) const
+00523     {
+00524         for (s32 i=used-1; i>=0; --i)
+00525             if (data[i] == element)
+00526                 return i;
+00527 
+00528         return -1;
+00529     }
+00530 
+00531 
+00533 
+00536     void erase(u32 index)
+00537     {
+00538         _IRR_DEBUG_BREAK_IF(index>=used) // access violation
+00539 
+00540         for (u32 i=index+1; i<used; ++i)
+00541         {
+00542             allocator.destruct(&data[i-1]);
+00543             allocator.construct(&data[i-1], data[i]); // data[i-1] = data[i];
+00544         }
+00545 
+00546         allocator.destruct(&data[used-1]);
+00547 
+00548         --used;
+00549     }
+00550 
+00551 
+00553 
+00557     void erase(u32 index, s32 count)
+00558     {
+00559         if (index>=used || count<1)
+00560             return;
+00561         if (index+count>used)
+00562             count = used-index;
+00563 
+00564         u32 i;
+00565         for (i=index; i<index+count; ++i)
+00566             allocator.destruct(&data[i]);
+00567 
+00568         for (i=index+count; i<used; ++i)
+00569         {
+00570             if (i-count >= index+count) // not already destructed before loop
+00571                 allocator.destruct(&data[i-count]);
+00572 
+00573             allocator.construct(&data[i-count], data[i]); // data[i-count] = data[i];
+00574 
+00575             if (i >= used-count)    // those which are not overwritten
+00576                 allocator.destruct(&data[i]);
+00577         }
+00578 
+00579         used-= count;
+00580     }
+00581 
+00582 
+00584     void set_sorted(bool _is_sorted)
+00585     {
+00586         is_sorted = _is_sorted;
+00587     }
+00588 
+00589 
+00591 
+00594     void swap(array<T, TAlloc>& other)
+00595     {
+00596         core::swap(data, other.data);
+00597         core::swap(allocated, other.allocated);
+00598         core::swap(used, other.used);
+00599         core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
+00600         eAllocStrategy helper_strategy(strategy);   // can't use core::swap with bitfields
+00601         strategy = other.strategy;
+00602         other.strategy = helper_strategy;
+00603         bool helper_free_when_destroyed(free_when_destroyed);
+00604         free_when_destroyed = other.free_when_destroyed;
+00605         other.free_when_destroyed = helper_free_when_destroyed;
+00606         bool helper_is_sorted(is_sorted);
+00607         is_sorted = other.is_sorted;
+00608         other.is_sorted = helper_is_sorted;
+00609     }
+00610 
+00611 
+00612 private:
+00613     T* data;
+00614     u32 allocated;
+00615     u32 used;
+00616     TAlloc allocator;
+00617     eAllocStrategy strategy:4;
+00618     bool free_when_destroyed:1;
+00619     bool is_sorted:1;
+00620 };
+00621 
+00622 
+00623 } // end namespace core
+00624 } // end namespace irr
+00625 
+00626 #endif
+00627 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_list_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_list_8h.html new file mode 100644 index 0000000..ce5d644 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_list_8h.html @@ -0,0 +1,144 @@ + + + + +Irrlicht 3D Engine: irrList.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrList.h File Reference
+
+
+
#include "irrTypes.h"
+#include "irrAllocator.h"
+#include "irrMath.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_list_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_list_8h_source.html new file mode 100644 index 0000000..e17f13f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_list_8h_source.html @@ -0,0 +1,503 @@ + + + + +Irrlicht 3D Engine: irrList.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrList.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_LIST_H_INCLUDED__
+00006 #define __IRR_LIST_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "irrAllocator.h"
+00010 #include "irrMath.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace core
+00015 {
+00016 
+00017 
+00019 template <class T>
+00020 class list
+00021 {
+00022 private:
+00023 
+00025     struct SKListNode
+00026     {
+00027         SKListNode(const T& e) : Next(0), Prev(0), Element(e) {}
+00028 
+00029         SKListNode* Next;
+00030         SKListNode* Prev;
+00031         T Element;
+00032     };
+00033 
+00034 public:
+00035     class ConstIterator;
+00036 
+00038     class Iterator
+00039     {
+00040     public:
+00041         Iterator() : Current(0) {}
+00042 
+00043         Iterator& operator ++()    { Current = Current->Next; return *this; }
+00044         Iterator& operator --()    { Current = Current->Prev; return *this; }
+00045         Iterator  operator ++(s32) { Iterator tmp = *this; Current = Current->Next; return tmp; }
+00046         Iterator  operator --(s32) { Iterator tmp = *this; Current = Current->Prev; return tmp; }
+00047 
+00048         Iterator& operator +=(s32 num)
+00049         {
+00050             if(num > 0)
+00051             {
+00052                 while (num-- && this->Current != 0) ++(*this);
+00053             }
+00054             else
+00055             {
+00056                 while(num++ && this->Current != 0) --(*this);
+00057             }
+00058             return *this;
+00059         }
+00060 
+00061         Iterator  operator + (s32 num) const { Iterator tmp = *this; return tmp += num; }
+00062         Iterator& operator -=(s32 num) { return (*this)+=(-num); }
+00063         Iterator  operator - (s32 num) const { return (*this)+ (-num); }
+00064 
+00065         bool operator ==(const Iterator&      other) const { return Current == other.Current; }
+00066         bool operator !=(const Iterator&      other) const { return Current != other.Current; }
+00067         bool operator ==(const ConstIterator& other) const { return Current == other.Current; }
+00068         bool operator !=(const ConstIterator& other) const { return Current != other.Current; }
+00069 
+00070         #if defined (_MSC_VER) && (_MSC_VER < 1300)
+00071             #pragma warning(disable:4284) // infix notation problem when using iterator operator ->
+00072         #endif
+00073 
+00074         T & operator * () { return Current->Element; }
+00075         T * operator ->() { return &Current->Element; }
+00076 
+00077     private:
+00078         explicit Iterator(SKListNode* begin) : Current(begin) {}
+00079 
+00080         SKListNode* Current;
+00081 
+00082         friend class list<T>;
+00083         friend class ConstIterator;
+00084     };
+00085 
+00087     class ConstIterator
+00088     {
+00089     public:
+00090 
+00091         ConstIterator() : Current(0) {}
+00092         ConstIterator(const Iterator& iter) : Current(iter.Current)  {}
+00093 
+00094         ConstIterator& operator ++()    { Current = Current->Next; return *this; }
+00095         ConstIterator& operator --()    { Current = Current->Prev; return *this; }
+00096         ConstIterator  operator ++(s32) { ConstIterator tmp = *this; Current = Current->Next; return tmp; }
+00097         ConstIterator  operator --(s32) { ConstIterator tmp = *this; Current = Current->Prev; return tmp; }
+00098 
+00099         ConstIterator& operator +=(s32 num)
+00100         {
+00101             if(num > 0)
+00102             {
+00103                 while(num-- && this->Current != 0) ++(*this);
+00104             }
+00105             else
+00106             {
+00107                 while(num++ && this->Current != 0) --(*this);
+00108             }
+00109             return *this;
+00110         }
+00111 
+00112         ConstIterator  operator + (s32 num) const { ConstIterator tmp = *this; return tmp += num; }
+00113         ConstIterator& operator -=(s32 num) { return (*this)+=(-num); }
+00114         ConstIterator  operator - (s32 num) const { return (*this)+ (-num); }
+00115 
+00116         bool operator ==(const ConstIterator& other) const { return Current == other.Current; }
+00117         bool operator !=(const ConstIterator& other) const { return Current != other.Current; }
+00118         bool operator ==(const Iterator&      other) const { return Current == other.Current; }
+00119         bool operator !=(const Iterator&      other) const { return Current != other.Current; }
+00120 
+00121         const T & operator * () { return Current->Element; }
+00122         const T * operator ->() { return &Current->Element; }
+00123 
+00124         ConstIterator & operator =(const Iterator & iterator) { Current = iterator.Current; return *this; }
+00125 
+00126     private:
+00127         explicit ConstIterator(SKListNode* begin) : Current(begin) {}
+00128 
+00129         SKListNode* Current;
+00130 
+00131         friend class Iterator;
+00132         friend class list<T>;
+00133     };
+00134 
+00136     list()
+00137         : First(0), Last(0), Size(0) {}
+00138 
+00139 
+00141     list(const list<T>& other) : First(0), Last(0), Size(0)
+00142     {
+00143         *this = other;
+00144     }
+00145 
+00146 
+00148     ~list()
+00149     {
+00150         clear();
+00151     }
+00152 
+00153 
+00155     void operator=(const list<T>& other)
+00156     {
+00157         if(&other == this)
+00158         {
+00159             return;
+00160         }
+00161 
+00162         clear();
+00163 
+00164         SKListNode* node = other.First;
+00165         while(node)
+00166         {
+00167             push_back(node->Element);
+00168             node = node->Next;
+00169         }
+00170     }
+00171 
+00172 
+00174 
+00175     u32 size() const
+00176     {
+00177         return Size;
+00178     }
+00179     u32 getSize() const
+00180     {
+00181         return Size;
+00182     }
+00183 
+00184 
+00186 
+00187     void clear()
+00188     {
+00189         while(First)
+00190         {
+00191             SKListNode * next = First->Next;
+00192             allocator.destruct(First);
+00193             allocator.deallocate(First);
+00194             First = next;
+00195         }
+00196 
+00197         //First = 0; handled by loop
+00198         Last = 0;
+00199         Size = 0;
+00200     }
+00201 
+00202 
+00204 
+00205     bool empty() const
+00206     {
+00207         return (First == 0);
+00208     }
+00209 
+00210 
+00212 
+00213     void push_back(const T& element)
+00214     {
+00215         SKListNode* node = allocator.allocate(1);
+00216         allocator.construct(node, element);
+00217 
+00218         ++Size;
+00219 
+00220         if (First == 0)
+00221             First = node;
+00222 
+00223         node->Prev = Last;
+00224 
+00225         if (Last != 0)
+00226             Last->Next = node;
+00227 
+00228         Last = node;
+00229     }
+00230 
+00231 
+00233 
+00234     void push_front(const T& element)
+00235     {
+00236         SKListNode* node = allocator.allocate(1);
+00237         allocator.construct(node, element);
+00238 
+00239         ++Size;
+00240 
+00241         if (First == 0)
+00242         {
+00243             Last = node;
+00244             First = node;
+00245         }
+00246         else
+00247         {
+00248             node->Next = First;
+00249             First->Prev = node;
+00250             First = node;
+00251         }
+00252     }
+00253 
+00254 
+00256 
+00257     Iterator begin()
+00258     {
+00259         return Iterator(First);
+00260     }
+00261 
+00262 
+00264 
+00265     ConstIterator begin() const
+00266     {
+00267         return ConstIterator(First);
+00268     }
+00269 
+00270 
+00272 
+00273     Iterator end()
+00274     {
+00275         return Iterator(0);
+00276     }
+00277 
+00278 
+00280 
+00281     ConstIterator end() const
+00282     {
+00283         return ConstIterator(0);
+00284     }
+00285 
+00286 
+00288 
+00289     Iterator getLast()
+00290     {
+00291         return Iterator(Last);
+00292     }
+00293 
+00294 
+00296 
+00297     ConstIterator getLast() const
+00298     {
+00299         return ConstIterator(Last);
+00300     }
+00301 
+00302 
+00304 
+00308     void insert_after(const Iterator& it, const T& element)
+00309     {
+00310         SKListNode* node = allocator.allocate(1);
+00311         allocator.construct(node, element);
+00312 
+00313         node->Next = it.Current->Next;
+00314 
+00315         if (it.Current->Next)
+00316             it.Current->Next->Prev = node;
+00317 
+00318         node->Prev = it.Current;
+00319         it.Current->Next = node;
+00320         ++Size;
+00321 
+00322         if (it.Current == Last)
+00323             Last = node;
+00324     }
+00325 
+00326 
+00328 
+00332     void insert_before(const Iterator& it, const T& element)
+00333     {
+00334         SKListNode* node = allocator.allocate(1);
+00335         allocator.construct(node, element);
+00336 
+00337         node->Prev = it.Current->Prev;
+00338 
+00339         if (it.Current->Prev)
+00340             it.Current->Prev->Next = node;
+00341 
+00342         node->Next = it.Current;
+00343         it.Current->Prev = node;
+00344         ++Size;
+00345 
+00346         if (it.Current == First)
+00347             First = node;
+00348     }
+00349 
+00350 
+00352 
+00354     Iterator erase(Iterator& it)
+00355     {
+00356         // suggest changing this to a const Iterator& and
+00357         // working around line: it.Current = 0 (possibly with a mutable, or just let it be garbage?)
+00358 
+00359         Iterator returnIterator(it);
+00360         ++returnIterator;
+00361 
+00362         if(it.Current == First)
+00363         {
+00364             First = it.Current->Next;
+00365         }
+00366         else
+00367         {
+00368             it.Current->Prev->Next = it.Current->Next;
+00369         }
+00370 
+00371         if(it.Current == Last)
+00372         {
+00373             Last = it.Current->Prev;
+00374         }
+00375         else
+00376         {
+00377             it.Current->Next->Prev = it.Current->Prev;
+00378         }
+00379 
+00380         allocator.destruct(it.Current);
+00381         allocator.deallocate(it.Current);
+00382         it.Current = 0;
+00383         --Size;
+00384 
+00385         return returnIterator;
+00386     }
+00387 
+00389 
+00393     void swap(list<T>& other)
+00394     {
+00395         core::swap(First, other.First);
+00396         core::swap(Last, other.Last);
+00397         core::swap(Size, other.Size);
+00398         core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
+00399     }
+00400 
+00401 
+00402 private:
+00403 
+00404     SKListNode* First;
+00405     SKListNode* Last;
+00406     u32 Size;
+00407     irrAllocator<SKListNode> allocator;
+00408 
+00409 };
+00410 
+00411 
+00412 } // end namespace core
+00413 }// end namespace irr
+00414 
+00415 #endif
+00416 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_map_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_map_8h.html new file mode 100644 index 0000000..08dec53 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_map_8h.html @@ -0,0 +1,146 @@ + + + + +Irrlicht 3D Engine: irrMap.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrMap.h File Reference
+
+
+
#include "irrTypes.h"
+#include "irrMath.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_map_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_map_8h_source.html new file mode 100644 index 0000000..bf083f2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_map_8h_source.html @@ -0,0 +1,1188 @@ + + + + +Irrlicht 3D Engine: irrMap.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrMap.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2006-2012 by Kat'Oun
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_MAP_H_INCLUDED__
+00006 #define __IRR_MAP_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "irrMath.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015 
+00017 template <class KeyType, class ValueType>
+00018 class map
+00019 {
+00021     template <class KeyTypeRB, class ValueTypeRB>
+00022     class RBTree
+00023     {
+00024     public:
+00025 
+00026         RBTree(const KeyTypeRB& k, const ValueTypeRB& v)
+00027             : LeftChild(0), RightChild(0), Parent(0), Key(k),
+00028                 Value(v), IsRed(true) {}
+00029 
+00030         void setLeftChild(RBTree* p)
+00031         {
+00032             LeftChild=p;
+00033             if (p)
+00034                 p->setParent(this);
+00035         }
+00036 
+00037         void setRightChild(RBTree* p)
+00038         {
+00039             RightChild=p;
+00040             if (p)
+00041                 p->setParent(this);
+00042         }
+00043 
+00044         void setParent(RBTree* p)       { Parent=p; }
+00045 
+00046         void setValue(const ValueTypeRB& v) { Value = v; }
+00047 
+00048         void setRed()           { IsRed = true; }
+00049         void setBlack()         { IsRed = false; }
+00050 
+00051         RBTree* getLeftChild() const    { return LeftChild; }
+00052         RBTree* getRightChild() const   { return RightChild; }
+00053         RBTree* getParent() const       { return Parent; }
+00054 
+00055         const ValueTypeRB& getValue() const
+00056         {
+00057             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00058             return Value;
+00059         }
+00060 
+00061         ValueTypeRB& getValue()
+00062         {
+00063             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00064             return Value;
+00065         }
+00066 
+00067         const KeyTypeRB& getKey() const
+00068         {
+00069             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00070             return Key;
+00071         }
+00072 
+00073         bool isRoot() const
+00074         {
+00075             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00076             return Parent==0;
+00077         }
+00078 
+00079         bool isLeftChild() const
+00080         {
+00081             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00082             return (Parent != 0) && (Parent->getLeftChild()==this);
+00083         }
+00084 
+00085         bool isRightChild() const
+00086         {
+00087             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00088             return (Parent!=0) && (Parent->getRightChild()==this);
+00089         }
+00090 
+00091         bool isLeaf() const
+00092         {
+00093             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00094             return (LeftChild==0) && (RightChild==0);
+00095         }
+00096 
+00097         unsigned int getLevel() const
+00098         {
+00099             if (isRoot())
+00100                 return 1;
+00101             else
+00102                 return getParent()->getLevel() + 1;
+00103         }
+00104 
+00105 
+00106         bool isRed() const
+00107         {
+00108             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00109             return IsRed;
+00110         }
+00111 
+00112         bool isBlack() const
+00113         {
+00114             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00115             return !IsRed;
+00116         }
+00117 
+00118     private:
+00119         RBTree();
+00120 
+00121         RBTree*     LeftChild;
+00122         RBTree*     RightChild;
+00123 
+00124         RBTree*     Parent;
+00125 
+00126         KeyTypeRB   Key;
+00127         ValueTypeRB Value;
+00128 
+00129         bool IsRed;
+00130     }; // RBTree
+00131 
+00132     public:
+00133 
+00134     typedef RBTree<KeyType,ValueType> Node;
+00135     // We need the forwad declaration for the friend declaration
+00136     class ConstIterator;
+00137 
+00139     class Iterator
+00140     {
+00141         friend class ConstIterator;
+00142     public:
+00143 
+00144         Iterator() : Root(0), Cur(0) {}
+00145 
+00146         // Constructor(Node*)
+00147         Iterator(Node* root) : Root(root)
+00148         {
+00149             reset();
+00150         }
+00151 
+00152         // Copy constructor
+00153         Iterator(const Iterator& src) : Root(src.Root), Cur(src.Cur) {}
+00154 
+00155         void reset(bool atLowest=true)
+00156         {
+00157             if (atLowest)
+00158                 Cur = getMin(Root);
+00159             else
+00160                 Cur = getMax(Root);
+00161         }
+00162 
+00163         bool atEnd() const
+00164         {
+00165             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00166             return Cur==0;
+00167         }
+00168 
+00169         Node* getNode() const
+00170         {
+00171             return Cur;
+00172         }
+00173 
+00174         Iterator& operator=(const Iterator& src)
+00175         {
+00176             Root = src.Root;
+00177             Cur = src.Cur;
+00178             return (*this);
+00179         }
+00180 
+00181         void operator++(int)
+00182         {
+00183             inc();
+00184         }
+00185 
+00186         void operator--(int)
+00187         {
+00188             dec();
+00189         }
+00190 
+00191         Node* operator->()
+00192         {
+00193             return getNode();
+00194         }
+00195 
+00196         Node& operator*()
+00197         {
+00198             _IRR_DEBUG_BREAK_IF(atEnd()) // access violation
+00199 
+00200             return *Cur;
+00201         }
+00202 
+00203     private:
+00204 
+00205         Node* getMin(Node* n) const
+00206         {
+00207             while(n && n->getLeftChild())
+00208                 n = n->getLeftChild();
+00209             return n;
+00210         }
+00211 
+00212         Node* getMax(Node* n) const
+00213         {
+00214             while(n && n->getRightChild())
+00215                 n = n->getRightChild();
+00216             return n;
+00217         }
+00218 
+00219         void inc()
+00220         {
+00221             // Already at end?
+00222             if (Cur==0)
+00223                 return;
+00224 
+00225             if (Cur->getRightChild())
+00226             {
+00227                 // If current node has a right child, the next higher node is the
+00228                 // node with lowest key beneath the right child.
+00229                 Cur = getMin(Cur->getRightChild());
+00230             }
+00231             else if (Cur->isLeftChild())
+00232             {
+00233                 // No right child? Well if current node is a left child then
+00234                 // the next higher node is the parent
+00235                 Cur = Cur->getParent();
+00236             }
+00237             else
+00238             {
+00239                 // Current node neither is left child nor has a right child.
+00240                 // Ie it is either right child or root
+00241                 // The next higher node is the parent of the first non-right
+00242                 // child (ie either a left child or the root) up in the
+00243                 // hierarchy. Root's parent is 0.
+00244                 while(Cur->isRightChild())
+00245                     Cur = Cur->getParent();
+00246                 Cur = Cur->getParent();
+00247             }
+00248         }
+00249 
+00250         void dec()
+00251         {
+00252             // Already at end?
+00253             if (Cur==0)
+00254                 return;
+00255 
+00256             if (Cur->getLeftChild())
+00257             {
+00258                 // If current node has a left child, the next lower node is the
+00259                 // node with highest key beneath the left child.
+00260                 Cur = getMax(Cur->getLeftChild());
+00261             }
+00262             else if (Cur->isRightChild())
+00263             {
+00264                 // No left child? Well if current node is a right child then
+00265                 // the next lower node is the parent
+00266                 Cur = Cur->getParent();
+00267             }
+00268             else
+00269             {
+00270                 // Current node neither is right child nor has a left child.
+00271                 // Ie it is either left child or root
+00272                 // The next higher node is the parent of the first non-left
+00273                 // child (ie either a right child or the root) up in the
+00274                 // hierarchy. Root's parent is 0.
+00275 
+00276                 while(Cur->isLeftChild())
+00277                     Cur = Cur->getParent();
+00278                 Cur = Cur->getParent();
+00279             }
+00280         }
+00281 
+00282         Node* Root;
+00283         Node* Cur;
+00284     }; // Iterator
+00285 
+00287     class ConstIterator
+00288     {
+00289         friend class Iterator;
+00290     public:
+00291 
+00292         ConstIterator() : Root(0), Cur(0) {}
+00293 
+00294         // Constructor(Node*)
+00295         ConstIterator(const Node* root) : Root(root)
+00296         {
+00297             reset();
+00298         }
+00299 
+00300         // Copy constructor
+00301         ConstIterator(const ConstIterator& src) : Root(src.Root), Cur(src.Cur) {}
+00302         ConstIterator(const Iterator& src) : Root(src.Root), Cur(src.Cur) {}
+00303 
+00304         void reset(bool atLowest=true)
+00305         {
+00306             if (atLowest)
+00307                 Cur = getMin(Root);
+00308             else
+00309                 Cur = getMax(Root);
+00310         }
+00311 
+00312         bool atEnd() const
+00313         {
+00314             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00315             return Cur==0;
+00316         }
+00317 
+00318         const Node* getNode() const
+00319         {
+00320             return Cur;
+00321         }
+00322 
+00323         ConstIterator& operator=(const ConstIterator& src)
+00324         {
+00325             Root = src.Root;
+00326             Cur = src.Cur;
+00327             return (*this);
+00328         }
+00329 
+00330         void operator++(int)
+00331         {
+00332             inc();
+00333         }
+00334 
+00335         void operator--(int)
+00336         {
+00337             dec();
+00338         }
+00339 
+00340         const Node* operator->()
+00341         {
+00342             return getNode();
+00343         }
+00344 
+00345         const Node& operator*()
+00346         {
+00347             _IRR_DEBUG_BREAK_IF(atEnd()) // access violation
+00348 
+00349             return *Cur;
+00350         }
+00351 
+00352     private:
+00353 
+00354         const Node* getMin(const Node* n) const
+00355         {
+00356             while(n && n->getLeftChild())
+00357                 n = n->getLeftChild();
+00358             return n;
+00359         }
+00360 
+00361         const Node* getMax(const Node* n) const
+00362         {
+00363             while(n && n->getRightChild())
+00364                 n = n->getRightChild();
+00365             return n;
+00366         }
+00367 
+00368         void inc()
+00369         {
+00370             // Already at end?
+00371             if (Cur==0)
+00372                 return;
+00373 
+00374             if (Cur->getRightChild())
+00375             {
+00376                 // If current node has a right child, the next higher node is the
+00377                 // node with lowest key beneath the right child.
+00378                 Cur = getMin(Cur->getRightChild());
+00379             }
+00380             else if (Cur->isLeftChild())
+00381             {
+00382                 // No right child? Well if current node is a left child then
+00383                 // the next higher node is the parent
+00384                 Cur = Cur->getParent();
+00385             }
+00386             else
+00387             {
+00388                 // Current node neither is left child nor has a right child.
+00389                 // Ie it is either right child or root
+00390                 // The next higher node is the parent of the first non-right
+00391                 // child (ie either a left child or the root) up in the
+00392                 // hierarchy. Root's parent is 0.
+00393                 while(Cur->isRightChild())
+00394                     Cur = Cur->getParent();
+00395                 Cur = Cur->getParent();
+00396             }
+00397         }
+00398 
+00399         void dec()
+00400         {
+00401             // Already at end?
+00402             if (Cur==0)
+00403                 return;
+00404 
+00405             if (Cur->getLeftChild())
+00406             {
+00407                 // If current node has a left child, the next lower node is the
+00408                 // node with highest key beneath the left child.
+00409                 Cur = getMax(Cur->getLeftChild());
+00410             }
+00411             else if (Cur->isRightChild())
+00412             {
+00413                 // No left child? Well if current node is a right child then
+00414                 // the next lower node is the parent
+00415                 Cur = Cur->getParent();
+00416             }
+00417             else
+00418             {
+00419                 // Current node neither is right child nor has a left child.
+00420                 // Ie it is either left child or root
+00421                 // The next higher node is the parent of the first non-left
+00422                 // child (ie either a right child or the root) up in the
+00423                 // hierarchy. Root's parent is 0.
+00424 
+00425                 while(Cur->isLeftChild())
+00426                     Cur = Cur->getParent();
+00427                 Cur = Cur->getParent();
+00428             }
+00429         }
+00430 
+00431         const Node* Root;
+00432         const Node* Cur;
+00433     }; // ConstIterator
+00434 
+00435 
+00437 
+00441     class ParentFirstIterator
+00442     {
+00443     public:
+00444 
+00445     ParentFirstIterator() : Root(0), Cur(0) {}
+00446 
+00447     explicit ParentFirstIterator(Node* root) : Root(root), Cur(0)
+00448     {
+00449         reset();
+00450     }
+00451 
+00452     void reset()
+00453     {
+00454         Cur = Root;
+00455     }
+00456 
+00457     bool atEnd() const
+00458     {
+00459         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00460         return Cur==0;
+00461     }
+00462 
+00463     Node* getNode()
+00464     {
+00465         return Cur;
+00466     }
+00467 
+00468     ParentFirstIterator& operator=(const ParentFirstIterator& src)
+00469     {
+00470         Root = src.Root;
+00471         Cur = src.Cur;
+00472         return (*this);
+00473     }
+00474 
+00475     void operator++(int)
+00476     {
+00477         inc();
+00478     }
+00479 
+00480     Node* operator -> ()
+00481     {
+00482         return getNode();
+00483     }
+00484 
+00485     Node& operator* ()
+00486     {
+00487         _IRR_DEBUG_BREAK_IF(atEnd()) // access violation
+00488 
+00489         return *getNode();
+00490     }
+00491 
+00492     private:
+00493 
+00494     void inc()
+00495     {
+00496         // Already at end?
+00497         if (Cur==0)
+00498             return;
+00499 
+00500         // First we try down to the left
+00501         if (Cur->getLeftChild())
+00502         {
+00503             Cur = Cur->getLeftChild();
+00504         }
+00505         else if (Cur->getRightChild())
+00506         {
+00507             // No left child? The we go down to the right.
+00508             Cur = Cur->getRightChild();
+00509         }
+00510         else
+00511         {
+00512             // No children? Move up in the hierarcy until
+00513             // we either reach 0 (and are finished) or
+00514             // find a right uncle.
+00515             while (Cur!=0)
+00516             {
+00517                 // But if parent is left child and has a right "uncle" the parent
+00518                 // has already been processed but the uncle hasn't. Move to
+00519                 // the uncle.
+00520                 if (Cur->isLeftChild() && Cur->getParent()->getRightChild())
+00521                 {
+00522                     Cur = Cur->getParent()->getRightChild();
+00523                     return;
+00524                 }
+00525                 Cur = Cur->getParent();
+00526             }
+00527         }
+00528     }
+00529 
+00530     Node* Root;
+00531     Node* Cur;
+00532 
+00533     }; // ParentFirstIterator
+00534 
+00535 
+00537 
+00541     class ParentLastIterator
+00542     {
+00543     public:
+00544 
+00545         ParentLastIterator() : Root(0), Cur(0) {}
+00546 
+00547         explicit ParentLastIterator(Node* root) : Root(root), Cur(0)
+00548         {
+00549             reset();
+00550         }
+00551 
+00552         void reset()
+00553         {
+00554             Cur = getMin(Root);
+00555         }
+00556 
+00557         bool atEnd() const
+00558         {
+00559             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00560             return Cur==0;
+00561         }
+00562 
+00563         Node* getNode()
+00564         {
+00565             return Cur;
+00566         }
+00567 
+00568         ParentLastIterator& operator=(const ParentLastIterator& src)
+00569         {
+00570             Root = src.Root;
+00571             Cur = src.Cur;
+00572             return (*this);
+00573         }
+00574 
+00575         void operator++(int)
+00576         {
+00577             inc();
+00578         }
+00579 
+00580         Node* operator -> ()
+00581         {
+00582             return getNode();
+00583         }
+00584 
+00585         Node& operator* ()
+00586         {
+00587             _IRR_DEBUG_BREAK_IF(atEnd()) // access violation
+00588 
+00589             return *getNode();
+00590         }
+00591     private:
+00592 
+00593         Node* getMin(Node* n)
+00594         {
+00595             while(n!=0 && (n->getLeftChild()!=0 || n->getRightChild()!=0))
+00596             {
+00597                 if (n->getLeftChild())
+00598                     n = n->getLeftChild();
+00599                 else
+00600                     n = n->getRightChild();
+00601             }
+00602             return n;
+00603         }
+00604 
+00605         void inc()
+00606         {
+00607             // Already at end?
+00608             if (Cur==0)
+00609                 return;
+00610 
+00611             // Note: Starting point is the node as far down to the left as possible.
+00612 
+00613             // If current node has an uncle to the right, go to the
+00614             // node as far down to the left from the uncle as possible
+00615             // else just go up a level to the parent.
+00616             if (Cur->isLeftChild() && Cur->getParent()->getRightChild())
+00617             {
+00618                 Cur = getMin(Cur->getParent()->getRightChild());
+00619             }
+00620             else
+00621                 Cur = Cur->getParent();
+00622         }
+00623 
+00624         Node* Root;
+00625         Node* Cur;
+00626     }; // ParentLastIterator
+00627 
+00628 
+00629     // AccessClass is a temporary class used with the [] operator.
+00630     // It makes it possible to have different behavior in situations like:
+00631     // myTree["Foo"] = 32;
+00632     // If "Foo" already exists update its value else insert a new element.
+00633     // int i = myTree["Foo"]
+00634     // If "Foo" exists return its value.
+00635     class AccessClass
+00636     {
+00637         // Let map be the only one who can instantiate this class.
+00638         friend class map<KeyType, ValueType>;
+00639 
+00640     public:
+00641 
+00642         // Assignment operator. Handles the myTree["Foo"] = 32; situation
+00643         void operator=(const ValueType& value)
+00644         {
+00645             // Just use the Set method, it handles already exist/not exist situation
+00646             Tree.set(Key,value);
+00647         }
+00648 
+00649         // ValueType operator
+00650         operator ValueType()
+00651         {
+00652             Node* node = Tree.find(Key);
+00653 
+00654             // Not found
+00655             _IRR_DEBUG_BREAK_IF(node==0) // access violation
+00656 
+00657             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00658             return node->getValue();
+00659         }
+00660 
+00661     private:
+00662 
+00663         AccessClass(map& tree, const KeyType& key) : Tree(tree), Key(key) {}
+00664 
+00665         AccessClass();
+00666 
+00667         map& Tree;
+00668         const KeyType& Key;
+00669     }; // AccessClass
+00670 
+00671 
+00672     // Constructor.
+00673     map() : Root(0), Size(0) {}
+00674 
+00675     // Destructor
+00676     ~map()
+00677     {
+00678         clear();
+00679     }
+00680 
+00681     //------------------------------
+00682     // Public Commands
+00683     //------------------------------
+00684 
+00686 
+00689     bool insert(const KeyType& keyNew, const ValueType& v)
+00690     {
+00691         // First insert node the "usual" way (no fancy balance logic yet)
+00692         Node* newNode = new Node(keyNew,v);
+00693         if (!insert(newNode))
+00694         {
+00695             delete newNode;
+00696             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00697             return false;
+00698         }
+00699 
+00700         // Then attend a balancing party
+00701         while (!newNode->isRoot() && (newNode->getParent()->isRed()))
+00702         {
+00703             if (newNode->getParent()->isLeftChild())
+00704             {
+00705                 // If newNode is a left child, get its right 'uncle'
+00706                 Node* newNodesUncle = newNode->getParent()->getParent()->getRightChild();
+00707                 if ( newNodesUncle!=0 && newNodesUncle->isRed())
+00708                 {
+00709                     // case 1 - change the colors
+00710                     newNode->getParent()->setBlack();
+00711                     newNodesUncle->setBlack();
+00712                     newNode->getParent()->getParent()->setRed();
+00713                     // Move newNode up the tree
+00714                     newNode = newNode->getParent()->getParent();
+00715                 }
+00716                 else
+00717                 {
+00718                     // newNodesUncle is a black node
+00719                     if ( newNode->isRightChild())
+00720                     {
+00721                         // and newNode is to the right
+00722                         // case 2 - move newNode up and rotate
+00723                         newNode = newNode->getParent();
+00724                         rotateLeft(newNode);
+00725                     }
+00726                     // case 3
+00727                     newNode->getParent()->setBlack();
+00728                     newNode->getParent()->getParent()->setRed();
+00729                     rotateRight(newNode->getParent()->getParent());
+00730                 }
+00731             }
+00732             else
+00733             {
+00734                 // If newNode is a right child, get its left 'uncle'
+00735                 Node* newNodesUncle = newNode->getParent()->getParent()->getLeftChild();
+00736                 if ( newNodesUncle!=0 && newNodesUncle->isRed())
+00737                 {
+00738                     // case 1 - change the colors
+00739                     newNode->getParent()->setBlack();
+00740                     newNodesUncle->setBlack();
+00741                     newNode->getParent()->getParent()->setRed();
+00742                     // Move newNode up the tree
+00743                     newNode = newNode->getParent()->getParent();
+00744                 }
+00745                 else
+00746                 {
+00747                     // newNodesUncle is a black node
+00748                     if (newNode->isLeftChild())
+00749                     {
+00750                         // and newNode is to the left
+00751                         // case 2 - move newNode up and rotate
+00752                         newNode = newNode->getParent();
+00753                         rotateRight(newNode);
+00754                     }
+00755                     // case 3
+00756                     newNode->getParent()->setBlack();
+00757                     newNode->getParent()->getParent()->setRed();
+00758                     rotateLeft(newNode->getParent()->getParent());
+00759                 }
+00760 
+00761             }
+00762         }
+00763         // Color the root black
+00764         Root->setBlack();
+00765         return true;
+00766     }
+00767 
+00769 
+00771     void set(const KeyType& k, const ValueType& v)
+00772     {
+00773         Node* p = find(k);
+00774         if (p)
+00775             p->setValue(v);
+00776         else
+00777             insert(k,v);
+00778     }
+00779 
+00781 
+00784     Node* delink(const KeyType& k)
+00785     {
+00786         Node* p = find(k);
+00787         if (p == 0)
+00788             return 0;
+00789 
+00790         // Rotate p down to the left until it has no right child, will get there
+00791         // sooner or later.
+00792         while(p->getRightChild())
+00793         {
+00794             // "Pull up my right child and let it knock me down to the left"
+00795             rotateLeft(p);
+00796         }
+00797         // p now has no right child but might have a left child
+00798         Node* left = p->getLeftChild();
+00799 
+00800         // Let p's parent point to p's child instead of point to p
+00801         if (p->isLeftChild())
+00802             p->getParent()->setLeftChild(left);
+00803 
+00804         else if (p->isRightChild())
+00805             p->getParent()->setRightChild(left);
+00806 
+00807         else
+00808         {
+00809             // p has no parent => p is the root.
+00810             // Let the left child be the new root.
+00811             setRoot(left);
+00812         }
+00813 
+00814         // p is now gone from the tree in the sense that
+00815         // no one is pointing at it, so return it.
+00816 
+00817         --Size;
+00818         return p;
+00819     }
+00820 
+00822 
+00823     bool remove(const KeyType& k)
+00824     {
+00825         Node* p = find(k);
+00826         return remove(p);
+00827     }
+00828 
+00830 
+00831     bool remove(Node* p)
+00832     {
+00833         if (p == 0)
+00834         {
+00835             _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00836             return false;
+00837         }
+00838 
+00839         // Rotate p down to the left until it has no right child, will get there
+00840         // sooner or later.
+00841         while(p->getRightChild())
+00842         {
+00843             // "Pull up my right child and let it knock me down to the left"
+00844             rotateLeft(p);
+00845         }
+00846         // p now has no right child but might have a left child
+00847         Node* left = p->getLeftChild();
+00848 
+00849         // Let p's parent point to p's child instead of point to p
+00850         if (p->isLeftChild())
+00851             p->getParent()->setLeftChild(left);
+00852 
+00853         else if (p->isRightChild())
+00854             p->getParent()->setRightChild(left);
+00855 
+00856         else
+00857         {
+00858             // p has no parent => p is the root.
+00859             // Let the left child be the new root.
+00860             setRoot(left);
+00861         }
+00862 
+00863         // p is now gone from the tree in the sense that
+00864         // no one is pointing at it. Let's get rid of it.
+00865         delete p;
+00866 
+00867         --Size;
+00868         return true;
+00869     }
+00870 
+00872     void clear()
+00873     {
+00874         ParentLastIterator i(getParentLastIterator());
+00875 
+00876         while(!i.atEnd())
+00877         {
+00878             Node* p = i.getNode();
+00879             i++; // Increment it before it is deleted
+00880                 // else iterator will get quite confused.
+00881             delete p;
+00882         }
+00883         Root = 0;
+00884         Size= 0;
+00885     }
+00886 
+00889     bool empty() const
+00890     {
+00891         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+00892         return Root == 0;
+00893     }
+00894 
+00896     _IRR_DEPRECATED_ bool isEmpty() const
+00897     {
+00898         return empty();
+00899     }
+00900 
+00904     Node* find(const KeyType& keyToFind) const
+00905     {
+00906         Node* pNode = Root;
+00907 
+00908         while(pNode!=0)
+00909         {
+00910             const KeyType& key=pNode->getKey();
+00911 
+00912             if (keyToFind == key)
+00913                 return pNode;
+00914             else if (keyToFind < key)
+00915                 pNode = pNode->getLeftChild();
+00916             else //keyToFind > key
+00917                 pNode = pNode->getRightChild();
+00918         }
+00919 
+00920         return 0;
+00921     }
+00922 
+00926     Node* getRoot() const
+00927     {
+00928         return Root;
+00929     }
+00930 
+00932     u32 size() const
+00933     {
+00934         return Size;
+00935     }
+00936 
+00938 
+00942     void swap(map<KeyType, ValueType>& other)
+00943     {
+00944         core::swap(Root, other.Root);
+00945         core::swap(Size, other.Size);
+00946     }
+00947 
+00948     //------------------------------
+00949     // Public Iterators
+00950     //------------------------------
+00951 
+00953     Iterator getIterator() const
+00954     {
+00955         Iterator it(getRoot());
+00956         return it;
+00957     }
+00958 
+00960     ConstIterator getConstIterator() const
+00961     {
+00962         Iterator it(getRoot());
+00963         return it;
+00964     }
+00965 
+00971     ParentFirstIterator getParentFirstIterator() const
+00972     {
+00973         ParentFirstIterator it(getRoot());
+00974         return it;
+00975     }
+00976 
+00982     ParentLastIterator getParentLastIterator() const
+00983     {
+00984         ParentLastIterator it(getRoot());
+00985         return it;
+00986     }
+00987 
+00988     //------------------------------
+00989     // Public Operators
+00990     //------------------------------
+00991 
+00993 
+00994     AccessClass operator[](const KeyType& k)
+00995     {
+00996         return AccessClass(*this, k);
+00997     }
+00998     private:
+00999 
+01000     //------------------------------
+01001     // Disabled methods
+01002     //------------------------------
+01003     // Copy constructor and assignment operator deliberately
+01004     // defined but not implemented. The tree should never be
+01005     // copied, pass along references to it instead.
+01006     explicit map(const map& src);
+01007     map& operator = (const map& src);
+01008 
+01010 
+01014     void setRoot(Node* newRoot)
+01015     {
+01016         Root = newRoot;
+01017         if (Root != 0)
+01018         {
+01019             Root->setParent(0);
+01020             Root->setBlack();
+01021         }
+01022     }
+01023 
+01025 
+01026     bool insert(Node* newNode)
+01027     {
+01028         bool result=true; // Assume success
+01029 
+01030         if (Root==0)
+01031         {
+01032             setRoot(newNode);
+01033             Size = 1;
+01034         }
+01035         else
+01036         {
+01037             Node* pNode = Root;
+01038             const KeyType& keyNew = newNode->getKey();
+01039             while (pNode)
+01040             {
+01041                 const KeyType& key=pNode->getKey();
+01042 
+01043                 if (keyNew == key)
+01044                 {
+01045                     result = false;
+01046                     pNode = 0;
+01047                 }
+01048                 else if (keyNew < key)
+01049                 {
+01050                     if (pNode->getLeftChild() == 0)
+01051                     {
+01052                         pNode->setLeftChild(newNode);
+01053                         pNode = 0;
+01054                     }
+01055                     else
+01056                         pNode = pNode->getLeftChild();
+01057                 }
+01058                 else // keyNew > key
+01059                 {
+01060                     if (pNode->getRightChild()==0)
+01061                     {
+01062                         pNode->setRightChild(newNode);
+01063                         pNode = 0;
+01064                     }
+01065                     else
+01066                     {
+01067                         pNode = pNode->getRightChild();
+01068                     }
+01069                 }
+01070             }
+01071 
+01072             if (result)
+01073                 ++Size;
+01074         }
+01075 
+01076         _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
+01077         return result;
+01078     }
+01079 
+01082     void rotateLeft(Node* p)
+01083     {
+01084         Node* right = p->getRightChild();
+01085 
+01086         p->setRightChild(right->getLeftChild());
+01087 
+01088         if (p->isLeftChild())
+01089             p->getParent()->setLeftChild(right);
+01090         else if (p->isRightChild())
+01091             p->getParent()->setRightChild(right);
+01092         else
+01093             setRoot(right);
+01094 
+01095         right->setLeftChild(p);
+01096     }
+01097 
+01100     void rotateRight(Node* p)
+01101     {
+01102         Node* left = p->getLeftChild();
+01103 
+01104         p->setLeftChild(left->getRightChild());
+01105 
+01106         if (p->isLeftChild())
+01107             p->getParent()->setLeftChild(left);
+01108         else if (p->isRightChild())
+01109             p->getParent()->setRightChild(left);
+01110         else
+01111             setRoot(left);
+01112 
+01113         left->setRightChild(p);
+01114     }
+01115 
+01116     //------------------------------
+01117     // Private Members
+01118     //------------------------------
+01119     Node* Root; // The top node. 0 if empty.
+01120     u32 Size; // Number of nodes in the tree
+01121 };
+01122 
+01123 } // end namespace core
+01124 } // end namespace irr
+01125 
+01126 #endif // __IRR_MAP_H_INCLUDED__
+01127 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_math_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_math_8h.html new file mode 100644 index 0000000..5123859 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_math_8h.html @@ -0,0 +1,614 @@ + + + + +Irrlicht 3D Engine: irrMath.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrMath.h File Reference
+
+
+
#include "IrrCompileConfig.h"
+#include "irrTypes.h"
+#include <math.h>
+#include <float.h>
+#include <stdlib.h>
+#include <limits.h>
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Defines

+ +

+Functions

+ +

+Variables

+ +

Define Documentation

+ +
+
+ + + + + + + + +
#define AIR( x)   (IR(x)&0x7fffffff)
+
+
+ +

Absolute integer representation of a floating-point value.

+ +

Definition at line 357 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define F32_A_GREATER_B( a,
 
)   ((a) > (b))
+
+
+ +

Definition at line 391 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_AS_S32( f)   (*((s32 *) &(f)))
+
+
+ +

Definition at line 339 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_AS_U32( f)   (*((u32 *) &(f)))
+
+
+ +

Definition at line 340 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_AS_U32_POINTER( f)   ( ((u32 *) &(f)))
+
+
+ +

Definition at line 341 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_EQUAL_0( n)   ((n) == 0.0f)
+
+
+ +

Definition at line 390 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_EQUAL_1( n)   ((n) == 1.0f)
+
+
+ +

Definition at line 389 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
#define F32_EXPON_MANTISSA   0x7FFFFFFFU
+
+
+ +

Definition at line 346 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_GREATER_0( n)   ((n) > 0.0f)
+
+
+ +

Definition at line 387 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_GREATER_EQUAL_0( n)   ((n) >= 0.0f)
+
+
+ +

Definition at line 388 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_LOWER_0( n)   ((n) < 0.0f)
+
+
+ +

Definition at line 385 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
#define F32_LOWER_EQUAL_0( n)   ((n) <= 0.0f)
+
+ +
+ +
+
+ + + + +
#define F32_SIGN_BIT   0x80000000U
+
+
+ +

Definition at line 345 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
#define F32_VALUE_0   0x00000000
+
+
+ +

Definition at line 343 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
#define F32_VALUE_1   0x3f800000
+
+
+ +

Definition at line 344 of file irrMath.h.

+ +

Referenced by irr::core::CMatrix4< T >::isIdentity_integer_base().

+ +
+
+ +
+
+ + + + +
#define FLT_MAX   3.402823466E+38F
+
+
+ +

Definition at line 31 of file irrMath.h.

+ +

Referenced by irr::core::strtof10().

+ +
+
+ +
+
+ + + + +
#define FLT_MIN   1.17549435e-38F
+
+
+ +

Definition at line 35 of file irrMath.h.

+ +

Referenced by irr::core::CMatrix4< T >::getInverse().

+ +
+
+ +
+
+ + + + +
#define IEEE_1_0   0x3f800000
+
+
+ +

integer representation of 1.0

+ +

Definition at line 368 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
#define IEEE_255_0   0x437f0000
+
+
+ +

integer representation of 255.0

+ +

Definition at line 370 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
#define REALINLINE   inline
+
+
+ +

Definition at line 399 of file irrMath.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_math_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_math_8h_source.html new file mode 100644 index 0000000..1c15008 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_math_8h_source.html @@ -0,0 +1,802 @@ + + + + +Irrlicht 3D Engine: irrMath.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrMath.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_MATH_H_INCLUDED__
+00006 #define __IRR_MATH_H_INCLUDED__
+00007 
+00008 #include "IrrCompileConfig.h"
+00009 #include "irrTypes.h"
+00010 #include <math.h>
+00011 #include <float.h>
+00012 #include <stdlib.h> // for abs() etc.
+00013 #include <limits.h> // For INT_MAX / UINT_MAX
+00014 
+00015 #if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) || defined (_WIN32_WCE)
+00016     #define sqrtf(X) (irr::f32)sqrt((irr::f64)(X))
+00017     #define sinf(X) (irr::f32)sin((irr::f64)(X))
+00018     #define cosf(X) (irr::f32)cos((irr::f64)(X))
+00019     #define asinf(X) (irr::f32)asin((irr::f64)(X))
+00020     #define acosf(X) (irr::f32)acos((irr::f64)(X))
+00021     #define atan2f(X,Y) (irr::f32)atan2((irr::f64)(X),(irr::f64)(Y))
+00022     #define ceilf(X) (irr::f32)ceil((irr::f64)(X))
+00023     #define floorf(X) (irr::f32)floor((irr::f64)(X))
+00024     #define powf(X,Y) (irr::f32)pow((irr::f64)(X),(irr::f64)(Y))
+00025     #define fmodf(X,Y) (irr::f32)fmod((irr::f64)(X),(irr::f64)(Y))
+00026     #define fabsf(X) (irr::f32)fabs((irr::f64)(X))
+00027     #define logf(X) (irr::f32)log((irr::f64)(X))
+00028 #endif
+00029 
+00030 #ifndef FLT_MAX
+00031 #define FLT_MAX 3.402823466E+38F
+00032 #endif
+00033 
+00034 #ifndef FLT_MIN
+00035 #define FLT_MIN 1.17549435e-38F
+00036 #endif
+00037 
+00038 namespace irr
+00039 {
+00040 namespace core
+00041 {
+00042 
+00044 
+00045     const s32 ROUNDING_ERROR_S32 = 0;
+00046 #ifdef __IRR_HAS_S64
+00047     const s64 ROUNDING_ERROR_S64 = 0;
+00048 #endif
+00049     const f32 ROUNDING_ERROR_f32 = 0.000001f;
+00050     const f64 ROUNDING_ERROR_f64 = 0.00000001;
+00051 
+00052 #ifdef PI // make sure we don't collide with a define
+00053 #undef PI
+00054 #endif
+00055 
+00056     const f32 PI        = 3.14159265359f;
+00057 
+00059     const f32 RECIPROCAL_PI = 1.0f/PI;
+00060 
+00062     const f32 HALF_PI   = PI/2.0f;
+00063 
+00064 #ifdef PI64 // make sure we don't collide with a define
+00065 #undef PI64
+00066 #endif
+00067 
+00068     const f64 PI64      = 3.1415926535897932384626433832795028841971693993751;
+00069 
+00071     const f64 RECIPROCAL_PI64 = 1.0/PI64;
+00072 
+00074     const f32 DEGTORAD = PI / 180.0f;
+00075 
+00077     const f32 RADTODEG   = 180.0f / PI;
+00078 
+00080     const f64 DEGTORAD64 = PI64 / 180.0;
+00081 
+00083     const f64 RADTODEG64 = 180.0 / PI64;
+00084 
+00086 
+00089     inline f32 radToDeg(f32 radians)
+00090     {
+00091         return RADTODEG * radians;
+00092     }
+00093 
+00095 
+00098     inline f64 radToDeg(f64 radians)
+00099     {
+00100         return RADTODEG64 * radians;
+00101     }
+00102 
+00104 
+00107     inline f32 degToRad(f32 degrees)
+00108     {
+00109         return DEGTORAD * degrees;
+00110     }
+00111 
+00113 
+00116     inline f64 degToRad(f64 degrees)
+00117     {
+00118         return DEGTORAD64 * degrees;
+00119     }
+00120 
+00122     template<class T>
+00123     inline const T& min_(const T& a, const T& b)
+00124     {
+00125         return a < b ? a : b;
+00126     }
+00127 
+00129     template<class T>
+00130     inline const T& min_(const T& a, const T& b, const T& c)
+00131     {
+00132         return a < b ? min_(a, c) : min_(b, c);
+00133     }
+00134 
+00136     template<class T>
+00137     inline const T& max_(const T& a, const T& b)
+00138     {
+00139         return a < b ? b : a;
+00140     }
+00141 
+00143     template<class T>
+00144     inline const T& max_(const T& a, const T& b, const T& c)
+00145     {
+00146         return a < b ? max_(b, c) : max_(a, c);
+00147     }
+00148 
+00150     template<class T>
+00151     inline T abs_(const T& a)
+00152     {
+00153         return a < (T)0 ? -a : a;
+00154     }
+00155 
+00158     template<class T>
+00159     inline T lerp(const T& a, const T& b, const f32 t)
+00160     {
+00161         return (T)(a*(1.f-t)) + (b*t);
+00162     }
+00163 
+00165     template <class T>
+00166     inline const T clamp (const T& value, const T& low, const T& high)
+00167     {
+00168         return min_ (max_(value,low), high);
+00169     }
+00170 
+00172     // Note: We use the same trick as boost and use two template arguments to
+00173     // avoid ambiguity when swapping objects of an Irrlicht type that has not
+00174     // it's own swap overload. Otherwise we get conflicts with some compilers
+00175     // in combination with stl.
+00176     template <class T1, class T2>
+00177     inline void swap(T1& a, T2& b)
+00178     {
+00179         T1 c(a);
+00180         a = b;
+00181         b = c;
+00182     }
+00183 
+00185     inline bool equals(const f64 a, const f64 b, const f64 tolerance = ROUNDING_ERROR_f64)
+00186     {
+00187         return (a + tolerance >= b) && (a - tolerance <= b);
+00188     }
+00189 
+00191     inline bool equals(const f32 a, const f32 b, const f32 tolerance = ROUNDING_ERROR_f32)
+00192     {
+00193         return (a + tolerance >= b) && (a - tolerance <= b);
+00194     }
+00195 
+00196     union FloatIntUnion32
+00197     {
+00198         FloatIntUnion32(float f1 = 0.0f) : f(f1) {}
+00199         // Portable sign-extraction
+00200         bool sign() const { return (i >> 31) != 0; }
+00201 
+00202         irr::s32 i;
+00203         irr::f32 f;
+00204     };
+00205 
+00207     //\result true when numbers have a ULP <= maxUlpDiff AND have the same sign.
+00208     inline bool equalsByUlp(f32 a, f32 b, int maxUlpDiff)
+00209     {
+00210         // Based on the ideas and code from Bruce Dawson on
+00211         // http://www.altdevblogaday.com/2012/02/22/comparing-floating-point-numbers-2012-edition/
+00212         // When floats are interpreted as integers the two nearest possible float numbers differ just
+00213         // by one integer number. Also works the other way round, an integer of 1 interpreted as float
+00214         // is for example the smallest possible float number.
+00215 
+00216         FloatIntUnion32 fa(a);
+00217         FloatIntUnion32 fb(b);
+00218 
+00219         // Different signs, we could maybe get difference to 0, but so close to 0 using epsilons is better.
+00220         if ( fa.sign() != fb.sign() )
+00221         {
+00222             // Check for equality to make sure +0==-0
+00223             if (fa.i == fb.i)
+00224                 return true;
+00225             return false;
+00226         }
+00227 
+00228         // Find the difference in ULPs.
+00229         int ulpsDiff = abs_(fa.i- fb.i);
+00230         if (ulpsDiff <= maxUlpDiff)
+00231             return true;
+00232 
+00233         return false;
+00234     }
+00235 
+00236 #if 0
+00237 
+00238     inline bool equals(const s32 a, const s32 b)
+00239     {
+00240         return (a == b);
+00241     }
+00242 
+00244     inline bool equals(const u32 a, const u32 b)
+00245     {
+00246         return (a == b);
+00247     }
+00248 #endif
+00249 
+00250     inline bool equals(const s32 a, const s32 b, const s32 tolerance = ROUNDING_ERROR_S32)
+00251     {
+00252         return (a + tolerance >= b) && (a - tolerance <= b);
+00253     }
+00254 
+00256     inline bool equals(const u32 a, const u32 b, const s32 tolerance = ROUNDING_ERROR_S32)
+00257     {
+00258         return (a + tolerance >= b) && (a - tolerance <= b);
+00259     }
+00260 
+00261 #ifdef __IRR_HAS_S64
+00262 
+00263     inline bool equals(const s64 a, const s64 b, const s64 tolerance = ROUNDING_ERROR_S64)
+00264     {
+00265         return (a + tolerance >= b) && (a - tolerance <= b);
+00266     }
+00267 #endif
+00268 
+00270     inline bool iszero(const f64 a, const f64 tolerance = ROUNDING_ERROR_f64)
+00271     {
+00272         return fabs(a) <= tolerance;
+00273     }
+00274 
+00276     inline bool iszero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32)
+00277     {
+00278         return fabsf(a) <= tolerance;
+00279     }
+00280 
+00282     inline bool isnotzero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32)
+00283     {
+00284         return fabsf(a) > tolerance;
+00285     }
+00286 
+00288     inline bool iszero(const s32 a, const s32 tolerance = 0)
+00289     {
+00290         return ( a & 0x7ffffff ) <= tolerance;
+00291     }
+00292 
+00294     inline bool iszero(const u32 a, const u32 tolerance = 0)
+00295     {
+00296         return a <= tolerance;
+00297     }
+00298 
+00299 #ifdef __IRR_HAS_S64
+00300 
+00301     inline bool iszero(const s64 a, const s64 tolerance = 0)
+00302     {
+00303         return abs_(a) <= tolerance;
+00304     }
+00305 #endif
+00306 
+00307     inline s32 s32_min(s32 a, s32 b)
+00308     {
+00309         const s32 mask = (a - b) >> 31;
+00310         return (a & mask) | (b & ~mask);
+00311     }
+00312 
+00313     inline s32 s32_max(s32 a, s32 b)
+00314     {
+00315         const s32 mask = (a - b) >> 31;
+00316         return (b & mask) | (a & ~mask);
+00317     }
+00318 
+00319     inline s32 s32_clamp (s32 value, s32 low, s32 high)
+00320     {
+00321         return s32_min(s32_max(value,low), high);
+00322     }
+00323 
+00324     /*
+00325         float IEEE-754 bit represenation
+00326 
+00327         0      0x00000000
+00328         1.0    0x3f800000
+00329         0.5    0x3f000000
+00330         3      0x40400000
+00331         +inf   0x7f800000
+00332         -inf   0xff800000
+00333         +NaN   0x7fc00000 or 0x7ff00000
+00334         in general: number = (sign ? -1:1) * 2^(exponent) * 1.(mantissa bits)
+00335     */
+00336 
+00337     typedef union { u32 u; s32 s; f32 f; } inttofloat;
+00338 
+00339     #define F32_AS_S32(f)       (*((s32 *) &(f)))
+00340     #define F32_AS_U32(f)       (*((u32 *) &(f)))
+00341     #define F32_AS_U32_POINTER(f)   ( ((u32 *) &(f)))
+00342 
+00343     #define F32_VALUE_0     0x00000000
+00344     #define F32_VALUE_1     0x3f800000
+00345     #define F32_SIGN_BIT        0x80000000U
+00346     #define F32_EXPON_MANTISSA  0x7FFFFFFFU
+00347 
+00350 #ifdef IRRLICHT_FAST_MATH
+00351     #define IR(x)                           ((u32&)(x))
+00352 #else
+00353     inline u32 IR(f32 x) {inttofloat tmp; tmp.f=x; return tmp.u;}
+00354 #endif
+00355 
+00357     #define AIR(x)              (IR(x)&0x7fffffff)
+00358 
+00360 #ifdef IRRLICHT_FAST_MATH
+00361     #define FR(x)                           ((f32&)(x))
+00362 #else
+00363     inline f32 FR(u32 x) {inttofloat tmp; tmp.u=x; return tmp.f;}
+00364     inline f32 FR(s32 x) {inttofloat tmp; tmp.s=x; return tmp.f;}
+00365 #endif
+00366 
+00368     #define IEEE_1_0            0x3f800000
+00369 
+00370     #define IEEE_255_0          0x437f0000
+00371 
+00372 #ifdef IRRLICHT_FAST_MATH
+00373     #define F32_LOWER_0(f)      (F32_AS_U32(f) >  F32_SIGN_BIT)
+00374     #define F32_LOWER_EQUAL_0(f)    (F32_AS_S32(f) <= F32_VALUE_0)
+00375     #define F32_GREATER_0(f)    (F32_AS_S32(f) >  F32_VALUE_0)
+00376     #define F32_GREATER_EQUAL_0(f)  (F32_AS_U32(f) <= F32_SIGN_BIT)
+00377     #define F32_EQUAL_1(f)      (F32_AS_U32(f) == F32_VALUE_1)
+00378     #define F32_EQUAL_0(f)      ( (F32_AS_U32(f) & F32_EXPON_MANTISSA ) == F32_VALUE_0)
+00379 
+00380     // only same sign
+00381     #define F32_A_GREATER_B(a,b)    (F32_AS_S32((a)) > F32_AS_S32((b)))
+00382 
+00383 #else
+00384 
+00385     #define F32_LOWER_0(n)      ((n) <  0.0f)
+00386     #define F32_LOWER_EQUAL_0(n)    ((n) <= 0.0f)
+00387     #define F32_GREATER_0(n)    ((n) >  0.0f)
+00388     #define F32_GREATER_EQUAL_0(n)  ((n) >= 0.0f)
+00389     #define F32_EQUAL_1(n)      ((n) == 1.0f)
+00390     #define F32_EQUAL_0(n)      ((n) == 0.0f)
+00391     #define F32_A_GREATER_B(a,b)    ((a) > (b))
+00392 #endif
+00393 
+00394 
+00395 #ifndef REALINLINE
+00396     #ifdef _MSC_VER
+00397         #define REALINLINE __forceinline
+00398     #else
+00399         #define REALINLINE inline
+00400     #endif
+00401 #endif
+00402 
+00403 #if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+00404 
+00405     // 8-bit bools in borland builder
+00406 
+00408     REALINLINE u32 if_c_a_else_b ( const c8 condition, const u32 a, const u32 b )
+00409     {
+00410         return ( ( -condition >> 7 ) & ( a ^ b ) ) ^ b;
+00411     }
+00412 
+00414     REALINLINE u32 if_c_a_else_0 ( const c8 condition, const u32 a )
+00415     {
+00416         return ( -condition >> 31 ) & a;
+00417     }
+00418 #else
+00419 
+00421     REALINLINE u32 if_c_a_else_b ( const s32 condition, const u32 a, const u32 b )
+00422     {
+00423         return ( ( -condition >> 31 ) & ( a ^ b ) ) ^ b;
+00424     }
+00425 
+00427     REALINLINE u16 if_c_a_else_b ( const s16 condition, const u16 a, const u16 b )
+00428     {
+00429         return ( ( -condition >> 15 ) & ( a ^ b ) ) ^ b;
+00430     }
+00431 
+00433     REALINLINE u32 if_c_a_else_0 ( const s32 condition, const u32 a )
+00434     {
+00435         return ( -condition >> 31 ) & a;
+00436     }
+00437 #endif
+00438 
+00439     /*
+00440         if (condition) state |= m; else state &= ~m;
+00441     */
+00442     REALINLINE void setbit_cond ( u32 &state, s32 condition, u32 mask )
+00443     {
+00444         // 0, or any postive to mask
+00445         //s32 conmask = -condition >> 31;
+00446         state ^= ( ( -condition >> 31 ) ^ state ) & mask;
+00447     }
+00448 
+00449     inline f32 round_( f32 x )
+00450     {
+00451         return floorf( x + 0.5f );
+00452     }
+00453 
+00454     REALINLINE void clearFPUException ()
+00455     {
+00456 #ifdef IRRLICHT_FAST_MATH
+00457         return;
+00458 #ifdef feclearexcept
+00459         feclearexcept(FE_ALL_EXCEPT);
+00460 #elif defined(_MSC_VER)
+00461         __asm fnclex;
+00462 #elif defined(__GNUC__) && defined(__x86__)
+00463         __asm__ __volatile__ ("fclex \n\t");
+00464 #else
+00465 #  warn clearFPUException not supported.
+00466 #endif
+00467 #endif
+00468     }
+00469 
+00470     // calculate: sqrt ( x )
+00471     REALINLINE f32 squareroot(const f32 f)
+00472     {
+00473         return sqrtf(f);
+00474     }
+00475 
+00476     // calculate: sqrt ( x )
+00477     REALINLINE f64 squareroot(const f64 f)
+00478     {
+00479         return sqrt(f);
+00480     }
+00481 
+00482     // calculate: sqrt ( x )
+00483     REALINLINE s32 squareroot(const s32 f)
+00484     {
+00485         return static_cast<s32>(squareroot(static_cast<f32>(f)));
+00486     }
+00487 
+00488 #ifdef __IRR_HAS_S64
+00489     // calculate: sqrt ( x )
+00490     REALINLINE s64 squareroot(const s64 f)
+00491     {
+00492         return static_cast<s64>(squareroot(static_cast<f64>(f)));
+00493     }
+00494 #endif
+00495 
+00496     // calculate: 1 / sqrt ( x )
+00497     REALINLINE f64 reciprocal_squareroot(const f64 x)
+00498     {
+00499         return 1.0 / sqrt(x);
+00500     }
+00501 
+00502     // calculate: 1 / sqrtf ( x )
+00503     REALINLINE f32 reciprocal_squareroot(const f32 f)
+00504     {
+00505 #if defined ( IRRLICHT_FAST_MATH )
+00506     #if defined(_MSC_VER)
+00507         // SSE reciprocal square root estimate, accurate to 12 significant
+00508         // bits of the mantissa
+00509         f32 recsqrt;
+00510         __asm rsqrtss xmm0, f           // xmm0 = rsqrtss(f)
+00511         __asm movss recsqrt, xmm0       // return xmm0
+00512         return recsqrt;
+00513 
+00514 /*
+00515         // comes from Nvidia
+00516         u32 tmp = (u32(IEEE_1_0 << 1) + IEEE_1_0 - *(u32*)&x) >> 1;
+00517         f32 y = *(f32*)&tmp;
+00518         return y * (1.47f - 0.47f * x * y * y);
+00519 */
+00520     #else
+00521         return 1.f / sqrtf(f);
+00522     #endif
+00523 #else // no fast math
+00524         return 1.f / sqrtf(f);
+00525 #endif
+00526     }
+00527 
+00528     // calculate: 1 / sqrtf( x )
+00529     REALINLINE s32 reciprocal_squareroot(const s32 x)
+00530     {
+00531         return static_cast<s32>(reciprocal_squareroot(static_cast<f32>(x)));
+00532     }
+00533 
+00534     // calculate: 1 / x
+00535     REALINLINE f32 reciprocal( const f32 f )
+00536     {
+00537 #if defined (IRRLICHT_FAST_MATH)
+00538 
+00539         // SSE Newton-Raphson reciprocal estimate, accurate to 23 significant
+00540         // bi ts of the mantissa
+00541         // One Newtown-Raphson Iteration:
+00542         // f(i+1) = 2 * rcpss(f) - f * rcpss(f) * rcpss(f)
+00543         f32 rec;
+00544         __asm rcpss xmm0, f               // xmm0 = rcpss(f)
+00545         __asm movss xmm1, f               // xmm1 = f
+00546         __asm mulss xmm1, xmm0            // xmm1 = f * rcpss(f)
+00547         __asm mulss xmm1, xmm0            // xmm2 = f * rcpss(f) * rcpss(f)
+00548         __asm addss xmm0, xmm0            // xmm0 = 2 * rcpss(f)
+00549         __asm subss xmm0, xmm1            // xmm0 = 2 * rcpss(f)
+00550                                           //        - f * rcpss(f) * rcpss(f)
+00551         __asm movss rec, xmm0             // return xmm0
+00552         return rec;
+00553 
+00554 
+00556         // instead set f to a high value to get a return value near zero..
+00557         // -1000000000000.f.. is use minus to stay negative..
+00558         // must test's here (plane.normal dot anything ) checks on <= 0.f
+00559         //u32 x = (-(AIR(f) != 0 ) >> 31 ) & ( IR(f) ^ 0xd368d4a5 ) ^ 0xd368d4a5;
+00560         //return 1.f / FR ( x );
+00561 
+00562 #else // no fast math
+00563         return 1.f / f;
+00564 #endif
+00565     }
+00566 
+00567     // calculate: 1 / x
+00568     REALINLINE f64 reciprocal ( const f64 f )
+00569     {
+00570         return 1.0 / f;
+00571     }
+00572 
+00573 
+00574     // calculate: 1 / x, low precision allowed
+00575     REALINLINE f32 reciprocal_approxim ( const f32 f )
+00576     {
+00577 #if defined( IRRLICHT_FAST_MATH)
+00578 
+00579         // SSE Newton-Raphson reciprocal estimate, accurate to 23 significant
+00580         // bi ts of the mantissa
+00581         // One Newtown-Raphson Iteration:
+00582         // f(i+1) = 2 * rcpss(f) - f * rcpss(f) * rcpss(f)
+00583         f32 rec;
+00584         __asm rcpss xmm0, f               // xmm0 = rcpss(f)
+00585         __asm movss xmm1, f               // xmm1 = f
+00586         __asm mulss xmm1, xmm0            // xmm1 = f * rcpss(f)
+00587         __asm mulss xmm1, xmm0            // xmm2 = f * rcpss(f) * rcpss(f)
+00588         __asm addss xmm0, xmm0            // xmm0 = 2 * rcpss(f)
+00589         __asm subss xmm0, xmm1            // xmm0 = 2 * rcpss(f)
+00590                                           //        - f * rcpss(f) * rcpss(f)
+00591         __asm movss rec, xmm0             // return xmm0
+00592         return rec;
+00593 
+00594 
+00595 /*
+00596         // SSE reciprocal estimate, accurate to 12 significant bits of
+00597         f32 rec;
+00598         __asm rcpss xmm0, f             // xmm0 = rcpss(f)
+00599         __asm movss rec , xmm0          // return xmm0
+00600         return rec;
+00601 */
+00602 /*
+00603         register u32 x = 0x7F000000 - IR ( p );
+00604         const f32 r = FR ( x );
+00605         return r * (2.0f - p * r);
+00606 */
+00607 #else // no fast math
+00608         return 1.f / f;
+00609 #endif
+00610     }
+00611 
+00612 
+00613     REALINLINE s32 floor32(f32 x)
+00614     {
+00615 #ifdef IRRLICHT_FAST_MATH
+00616         const f32 h = 0.5f;
+00617 
+00618         s32 t;
+00619 
+00620 #if defined(_MSC_VER)
+00621         __asm
+00622         {
+00623             fld x
+00624             fsub    h
+00625             fistp   t
+00626         }
+00627 #elif defined(__GNUC__)
+00628         __asm__ __volatile__ (
+00629             "fsub %2 \n\t"
+00630             "fistpl %0"
+00631             : "=m" (t)
+00632             : "t" (x), "f" (h)
+00633             : "st"
+00634             );
+00635 #else
+00636 #  warn IRRLICHT_FAST_MATH not supported.
+00637         return (s32) floorf ( x );
+00638 #endif
+00639         return t;
+00640 #else // no fast math
+00641         return (s32) floorf ( x );
+00642 #endif
+00643     }
+00644 
+00645 
+00646     REALINLINE s32 ceil32 ( f32 x )
+00647     {
+00648 #ifdef IRRLICHT_FAST_MATH
+00649         const f32 h = 0.5f;
+00650 
+00651         s32 t;
+00652 
+00653 #if defined(_MSC_VER)
+00654         __asm
+00655         {
+00656             fld x
+00657             fadd    h
+00658             fistp   t
+00659         }
+00660 #elif defined(__GNUC__)
+00661         __asm__ __volatile__ (
+00662             "fadd %2 \n\t"
+00663             "fistpl %0 \n\t"
+00664             : "=m"(t)
+00665             : "t"(x), "f"(h)
+00666             : "st"
+00667             );
+00668 #else
+00669 #  warn IRRLICHT_FAST_MATH not supported.
+00670         return (s32) ceilf ( x );
+00671 #endif
+00672         return t;
+00673 #else // not fast math
+00674         return (s32) ceilf ( x );
+00675 #endif
+00676     }
+00677 
+00678 
+00679 
+00680     REALINLINE s32 round32(f32 x)
+00681     {
+00682 #if defined(IRRLICHT_FAST_MATH)
+00683         s32 t;
+00684 
+00685 #if defined(_MSC_VER)
+00686         __asm
+00687         {
+00688             fld   x
+00689             fistp t
+00690         }
+00691 #elif defined(__GNUC__)
+00692         __asm__ __volatile__ (
+00693             "fistpl %0 \n\t"
+00694             : "=m"(t)
+00695             : "t"(x)
+00696             : "st"
+00697             );
+00698 #else
+00699 #  warn IRRLICHT_FAST_MATH not supported.
+00700         return (s32) round_(x);
+00701 #endif
+00702         return t;
+00703 #else // no fast math
+00704         return (s32) round_(x);
+00705 #endif
+00706     }
+00707 
+00708     inline f32 f32_max3(const f32 a, const f32 b, const f32 c)
+00709     {
+00710         return a > b ? (a > c ? a : c) : (b > c ? b : c);
+00711     }
+00712 
+00713     inline f32 f32_min3(const f32 a, const f32 b, const f32 c)
+00714     {
+00715         return a < b ? (a < c ? a : c) : (b < c ? b : c);
+00716     }
+00717 
+00718     inline f32 fract ( f32 x )
+00719     {
+00720         return x - floorf ( x );
+00721     }
+00722 
+00723 } // end namespace core
+00724 } // end namespace irr
+00725 
+00726 #ifndef IRRLICHT_FAST_MATH
+00727     using irr::core::IR;
+00728     using irr::core::FR;
+00729 #endif
+00730 
+00731 #endif
+00732 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_string_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_string_8h.html new file mode 100644 index 0000000..65ce860 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_string_8h.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: irrString.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrString.h File Reference
+
+
+
#include "irrTypes.h"
+#include "irrAllocator.h"
+#include "irrMath.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_string_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_string_8h_source.html new file mode 100644 index 0000000..42c1b05 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_string_8h_source.html @@ -0,0 +1,1340 @@ + + + + +Irrlicht 3D Engine: irrString.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrString.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h
+00004 
+00005 #ifndef __IRR_STRING_H_INCLUDED__
+00006 #define __IRR_STRING_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "irrAllocator.h"
+00010 #include "irrMath.h"
+00011 #include <stdio.h>
+00012 #include <string.h>
+00013 #include <stdlib.h>
+00014 
+00015 namespace irr
+00016 {
+00017 namespace core
+00018 {
+00019 
+00021 
+00032 enum eLocaleID
+00033 {
+00034     IRR_LOCALE_ANSI = 0,
+00035     IRR_LOCALE_GERMAN = 1
+00036 };
+00037 
+00038 static eLocaleID locale_current = IRR_LOCALE_ANSI;
+00039 static inline void locale_set ( eLocaleID id )
+00040 {
+00041     locale_current = id;
+00042 }
+00043 
+00045 static inline u32 locale_lower ( u32 x )
+00046 {
+00047     switch ( locale_current )
+00048     {
+00049         case IRR_LOCALE_GERMAN:
+00050         case IRR_LOCALE_ANSI:
+00051             break;
+00052     }
+00053     // ansi
+00054     return x >= 'A' && x <= 'Z' ? x + 0x20 : x;
+00055 }
+00056 
+00058 static inline u32 locale_upper ( u32 x )
+00059 {
+00060     switch ( locale_current )
+00061     {
+00062         case IRR_LOCALE_GERMAN:
+00063         case IRR_LOCALE_ANSI:
+00064             break;
+00065     }
+00066 
+00067     // ansi
+00068     return x >= 'a' && x <= 'z' ? x + ( 'A' - 'a' ) : x;
+00069 }
+00070 
+00071 
+00072 template <typename T, typename TAlloc = irrAllocator<T> >
+00073 class string
+00074 {
+00075 public:
+00076 
+00077     typedef T char_type;
+00078 
+00080     string()
+00081     : array(0), allocated(1), used(1)
+00082     {
+00083         array = allocator.allocate(1); // new T[1];
+00084         array[0] = 0;
+00085     }
+00086 
+00087 
+00089     string(const string<T,TAlloc>& other)
+00090     : array(0), allocated(0), used(0)
+00091     {
+00092         *this = other;
+00093     }
+00094 
+00096     template <class B, class A>
+00097     string(const string<B, A>& other)
+00098     : array(0), allocated(0), used(0)
+00099     {
+00100         *this = other;
+00101     }
+00102 
+00103 
+00105     explicit string(const double number)
+00106     : array(0), allocated(0), used(0)
+00107     {
+00108         c8 tmpbuf[255];
+00109         snprintf(tmpbuf, 255, "%0.6f", number);
+00110         *this = tmpbuf;
+00111     }
+00112 
+00113 
+00115     explicit string(int number)
+00116     : array(0), allocated(0), used(0)
+00117     {
+00118         // store if negative and make positive
+00119 
+00120         bool negative = false;
+00121         if (number < 0)
+00122         {
+00123             number *= -1;
+00124             negative = true;
+00125         }
+00126 
+00127         // temporary buffer for 16 numbers
+00128 
+00129         c8 tmpbuf[16]={0};
+00130         u32 idx = 15;
+00131 
+00132         // special case '0'
+00133 
+00134         if (!number)
+00135         {
+00136             tmpbuf[14] = '0';
+00137             *this = &tmpbuf[14];
+00138             return;
+00139         }
+00140 
+00141         // add numbers
+00142 
+00143         while(number && idx)
+00144         {
+00145             --idx;
+00146             tmpbuf[idx] = (c8)('0' + (number % 10));
+00147             number /= 10;
+00148         }
+00149 
+00150         // add sign
+00151 
+00152         if (negative)
+00153         {
+00154             --idx;
+00155             tmpbuf[idx] = '-';
+00156         }
+00157 
+00158         *this = &tmpbuf[idx];
+00159     }
+00160 
+00161 
+00163     explicit string(unsigned int number)
+00164     : array(0), allocated(0), used(0)
+00165     {
+00166         // temporary buffer for 16 numbers
+00167 
+00168         c8 tmpbuf[16]={0};
+00169         u32 idx = 15;
+00170 
+00171         // special case '0'
+00172 
+00173         if (!number)
+00174         {
+00175             tmpbuf[14] = '0';
+00176             *this = &tmpbuf[14];
+00177             return;
+00178         }
+00179 
+00180         // add numbers
+00181 
+00182         while(number && idx)
+00183         {
+00184             --idx;
+00185             tmpbuf[idx] = (c8)('0' + (number % 10));
+00186             number /= 10;
+00187         }
+00188 
+00189         *this = &tmpbuf[idx];
+00190     }
+00191 
+00192 
+00194     explicit string(long number)
+00195     : array(0), allocated(0), used(0)
+00196     {
+00197         // store if negative and make positive
+00198 
+00199         bool negative = false;
+00200         if (number < 0)
+00201         {
+00202             number *= -1;
+00203             negative = true;
+00204         }
+00205 
+00206         // temporary buffer for 16 numbers
+00207 
+00208         c8 tmpbuf[16]={0};
+00209         u32 idx = 15;
+00210 
+00211         // special case '0'
+00212 
+00213         if (!number)
+00214         {
+00215             tmpbuf[14] = '0';
+00216             *this = &tmpbuf[14];
+00217             return;
+00218         }
+00219 
+00220         // add numbers
+00221 
+00222         while(number && idx)
+00223         {
+00224             --idx;
+00225             tmpbuf[idx] = (c8)('0' + (number % 10));
+00226             number /= 10;
+00227         }
+00228 
+00229         // add sign
+00230 
+00231         if (negative)
+00232         {
+00233             --idx;
+00234             tmpbuf[idx] = '-';
+00235         }
+00236 
+00237         *this = &tmpbuf[idx];
+00238     }
+00239 
+00240 
+00242     explicit string(unsigned long number)
+00243     : array(0), allocated(0), used(0)
+00244     {
+00245         // temporary buffer for 16 numbers
+00246 
+00247         c8 tmpbuf[16]={0};
+00248         u32 idx = 15;
+00249 
+00250         // special case '0'
+00251 
+00252         if (!number)
+00253         {
+00254             tmpbuf[14] = '0';
+00255             *this = &tmpbuf[14];
+00256             return;
+00257         }
+00258 
+00259         // add numbers
+00260 
+00261         while(number && idx)
+00262         {
+00263             --idx;
+00264             tmpbuf[idx] = (c8)('0' + (number % 10));
+00265             number /= 10;
+00266         }
+00267 
+00268         *this = &tmpbuf[idx];
+00269     }
+00270 
+00271 
+00273     template <class B>
+00274     string(const B* const c, u32 length)
+00275     : array(0), allocated(0), used(0)
+00276     {
+00277         if (!c)
+00278         {
+00279             // correctly init the string to an empty one
+00280             *this="";
+00281             return;
+00282         }
+00283 
+00284         allocated = used = length+1;
+00285         array = allocator.allocate(used); // new T[used];
+00286 
+00287         for (u32 l = 0; l<length; ++l)
+00288             array[l] = (T)c[l];
+00289 
+00290         array[length] = 0;
+00291     }
+00292 
+00293 
+00295     template <class B>
+00296     string(const B* const c)
+00297     : array(0), allocated(0), used(0)
+00298     {
+00299         *this = c;
+00300     }
+00301 
+00302 
+00304     ~string()
+00305     {
+00306         allocator.deallocate(array); // delete [] array;
+00307     }
+00308 
+00309 
+00311     string<T,TAlloc>& operator=(const string<T,TAlloc>& other)
+00312     {
+00313         if (this == &other)
+00314             return *this;
+00315 
+00316         used = other.size()+1;
+00317         if (used>allocated)
+00318         {
+00319             allocator.deallocate(array); // delete [] array;
+00320             allocated = used;
+00321             array = allocator.allocate(used); //new T[used];
+00322         }
+00323 
+00324         const T* p = other.c_str();
+00325         for (u32 i=0; i<used; ++i, ++p)
+00326             array[i] = *p;
+00327 
+00328         return *this;
+00329     }
+00330 
+00332     template <class B, class A>
+00333     string<T,TAlloc>& operator=(const string<B,A>& other)
+00334     {
+00335         *this = other.c_str();
+00336         return *this;
+00337     }
+00338 
+00339 
+00341     template <class B>
+00342     string<T,TAlloc>& operator=(const B* const c)
+00343     {
+00344         if (!c)
+00345         {
+00346             if (!array)
+00347             {
+00348                 array = allocator.allocate(1); //new T[1];
+00349                 allocated = 1;
+00350             }
+00351             used = 1;
+00352             array[0] = 0x0;
+00353             return *this;
+00354         }
+00355 
+00356         if ((void*)c == (void*)array)
+00357             return *this;
+00358 
+00359         u32 len = 0;
+00360         const B* p = c;
+00361         do
+00362         {
+00363             ++len;
+00364         } while(*p++);
+00365 
+00366         // we'll keep the old string for a while, because the new
+00367         // string could be a part of the current string.
+00368         T* oldArray = array;
+00369 
+00370         used = len;
+00371         if (used>allocated)
+00372         {
+00373             allocated = used;
+00374             array = allocator.allocate(used); //new T[used];
+00375         }
+00376 
+00377         for (u32 l = 0; l<len; ++l)
+00378             array[l] = (T)c[l];
+00379 
+00380         if (oldArray != array)
+00381             allocator.deallocate(oldArray); // delete [] oldArray;
+00382 
+00383         return *this;
+00384     }
+00385 
+00386 
+00388     string<T,TAlloc> operator+(const string<T,TAlloc>& other) const
+00389     {
+00390         string<T,TAlloc> str(*this);
+00391         str.append(other);
+00392 
+00393         return str;
+00394     }
+00395 
+00396 
+00398     template <class B>
+00399     string<T,TAlloc> operator+(const B* const c) const
+00400     {
+00401         string<T,TAlloc> str(*this);
+00402         str.append(c);
+00403 
+00404         return str;
+00405     }
+00406 
+00407 
+00409     T& operator [](const u32 index)
+00410     {
+00411         _IRR_DEBUG_BREAK_IF(index>=used) // bad index
+00412         return array[index];
+00413     }
+00414 
+00415 
+00417     const T& operator [](const u32 index) const
+00418     {
+00419         _IRR_DEBUG_BREAK_IF(index>=used) // bad index
+00420         return array[index];
+00421     }
+00422 
+00423 
+00425     bool operator==(const T* const str) const
+00426     {
+00427         if (!str)
+00428             return false;
+00429 
+00430         u32 i;
+00431         for (i=0; array[i] && str[i]; ++i)
+00432             if (array[i] != str[i])
+00433                 return false;
+00434 
+00435         return (!array[i] && !str[i]);
+00436     }
+00437 
+00438 
+00440     bool operator==(const string<T,TAlloc>& other) const
+00441     {
+00442         for (u32 i=0; array[i] && other.array[i]; ++i)
+00443             if (array[i] != other.array[i])
+00444                 return false;
+00445 
+00446         return used == other.used;
+00447     }
+00448 
+00449 
+00451     bool operator<(const string<T,TAlloc>& other) const
+00452     {
+00453         for (u32 i=0; array[i] && other.array[i]; ++i)
+00454         {
+00455             const s32 diff = array[i] - other.array[i];
+00456             if (diff)
+00457                 return (diff < 0);
+00458         }
+00459 
+00460         return (used < other.used);
+00461     }
+00462 
+00463 
+00465     bool operator!=(const T* const str) const
+00466     {
+00467         return !(*this == str);
+00468     }
+00469 
+00470 
+00472     bool operator!=(const string<T,TAlloc>& other) const
+00473     {
+00474         return !(*this == other);
+00475     }
+00476 
+00477 
+00479 
+00481     u32 size() const
+00482     {
+00483         return used-1;
+00484     }
+00485 
+00488     bool empty() const
+00489     {
+00490         return (size() == 0);
+00491     }
+00492 
+00494 
+00495     const T* c_str() const
+00496     {
+00497         return array;
+00498     }
+00499 
+00500 
+00502     string<T,TAlloc>& make_lower()
+00503     {
+00504         for (u32 i=0; array[i]; ++i)
+00505             array[i] = locale_lower ( array[i] );
+00506         return *this;
+00507     }
+00508 
+00509 
+00511     string<T,TAlloc>& make_upper()
+00512     {
+00513         for (u32 i=0; array[i]; ++i)
+00514             array[i] = locale_upper ( array[i] );
+00515         return *this;
+00516     }
+00517 
+00518 
+00520 
+00522     bool equals_ignore_case(const string<T,TAlloc>& other) const
+00523     {
+00524         for(u32 i=0; array[i] && other[i]; ++i)
+00525             if (locale_lower( array[i]) != locale_lower(other[i]))
+00526                 return false;
+00527 
+00528         return used == other.used;
+00529     }
+00530 
+00532 
+00535     bool equals_substring_ignore_case(const string<T,TAlloc>&other, const s32 sourcePos = 0 ) const
+00536     {
+00537         if ( (u32) sourcePos >= used )
+00538             return false;
+00539 
+00540         u32 i;
+00541         for( i=0; array[sourcePos + i] && other[i]; ++i)
+00542             if (locale_lower( array[sourcePos + i]) != locale_lower(other[i]))
+00543                 return false;
+00544 
+00545         return array[sourcePos + i] == 0 && other[i] == 0;
+00546     }
+00547 
+00548 
+00550 
+00552     bool lower_ignore_case(const string<T,TAlloc>& other) const
+00553     {
+00554         for(u32 i=0; array[i] && other.array[i]; ++i)
+00555         {
+00556             s32 diff = (s32) locale_lower ( array[i] ) - (s32) locale_lower ( other.array[i] );
+00557             if ( diff )
+00558                 return diff < 0;
+00559         }
+00560 
+00561         return used < other.used;
+00562     }
+00563 
+00564 
+00566 
+00569     bool equalsn(const string<T,TAlloc>& other, u32 n) const
+00570     {
+00571         u32 i;
+00572         for(i=0; array[i] && other[i] && i < n; ++i)
+00573             if (array[i] != other[i])
+00574                 return false;
+00575 
+00576         // if one (or both) of the strings was smaller then they
+00577         // are only equal if they have the same length
+00578         return (i == n) || (used == other.used);
+00579     }
+00580 
+00581 
+00583 
+00586     bool equalsn(const T* const str, u32 n) const
+00587     {
+00588         if (!str)
+00589             return false;
+00590         u32 i;
+00591         for(i=0; array[i] && str[i] && i < n; ++i)
+00592             if (array[i] != str[i])
+00593                 return false;
+00594 
+00595         // if one (or both) of the strings was smaller then they
+00596         // are only equal if they have the same length
+00597         return (i == n) || (array[i] == 0 && str[i] == 0);
+00598     }
+00599 
+00600 
+00602 
+00603     string<T,TAlloc>& append(T character)
+00604     {
+00605         if (used + 1 > allocated)
+00606             reallocate(used + 1);
+00607 
+00608         ++used;
+00609 
+00610         array[used-2] = character;
+00611         array[used-1] = 0;
+00612 
+00613         return *this;
+00614     }
+00615 
+00616 
+00618 
+00620     string<T,TAlloc>& append(const T* const other, u32 length=0xffffffff)
+00621     {
+00622         if (!other)
+00623             return *this;
+00624 
+00625         u32 len = 0;
+00626         const T* p = other;
+00627         while(*p)
+00628         {
+00629             ++len;
+00630             ++p;
+00631         }
+00632         if (len > length)
+00633             len = length;
+00634 
+00635         if (used + len > allocated)
+00636             reallocate(used + len);
+00637 
+00638         --used;
+00639         ++len;
+00640 
+00641         for (u32 l=0; l<len; ++l)
+00642             array[l+used] = *(other+l);
+00643 
+00644         used += len;
+00645 
+00646         return *this;
+00647     }
+00648 
+00649 
+00651 
+00652     string<T,TAlloc>& append(const string<T,TAlloc>& other)
+00653     {
+00654         if (other.size() == 0)
+00655             return *this;
+00656 
+00657         --used;
+00658         u32 len = other.size()+1;
+00659 
+00660         if (used + len > allocated)
+00661             reallocate(used + len);
+00662 
+00663         for (u32 l=0; l<len; ++l)
+00664             array[used+l] = other[l];
+00665 
+00666         used += len;
+00667 
+00668         return *this;
+00669     }
+00670 
+00671 
+00673 
+00675     string<T,TAlloc>& append(const string<T,TAlloc>& other, u32 length)
+00676     {
+00677         if (other.size() == 0)
+00678             return *this;
+00679 
+00680         if (other.size() < length)
+00681         {
+00682             append(other);
+00683             return *this;
+00684         }
+00685 
+00686         if (used + length > allocated)
+00687             reallocate(used + length);
+00688 
+00689         --used;
+00690 
+00691         for (u32 l=0; l<length; ++l)
+00692             array[l+used] = other[l];
+00693         used += length;
+00694 
+00695         // ensure proper termination
+00696         array[used]=0;
+00697         ++used;
+00698 
+00699         return *this;
+00700     }
+00701 
+00702 
+00704 
+00705     void reserve(u32 count)
+00706     {
+00707         if (count < allocated)
+00708             return;
+00709 
+00710         reallocate(count);
+00711     }
+00712 
+00713 
+00715 
+00718     s32 findFirst(T c) const
+00719     {
+00720         for (u32 i=0; i<used-1; ++i)
+00721             if (array[i] == c)
+00722                 return i;
+00723 
+00724         return -1;
+00725     }
+00726 
+00728 
+00734     s32 findFirstChar(const T* const c, u32 count=1) const
+00735     {
+00736         if (!c || !count)
+00737             return -1;
+00738 
+00739         for (u32 i=0; i<used-1; ++i)
+00740             for (u32 j=0; j<count; ++j)
+00741                 if (array[i] == c[j])
+00742                     return i;
+00743 
+00744         return -1;
+00745     }
+00746 
+00747 
+00749 
+00755     template <class B>
+00756     s32 findFirstCharNotInList(const B* const c, u32 count=1) const
+00757     {
+00758         if (!c || !count)
+00759             return -1;
+00760 
+00761         for (u32 i=0; i<used-1; ++i)
+00762         {
+00763             u32 j;
+00764             for (j=0; j<count; ++j)
+00765                 if (array[i] == c[j])
+00766                     break;
+00767 
+00768             if (j==count)
+00769                 return i;
+00770         }
+00771 
+00772         return -1;
+00773     }
+00774 
+00776 
+00782     template <class B>
+00783     s32 findLastCharNotInList(const B* const c, u32 count=1) const
+00784     {
+00785         if (!c || !count)
+00786             return -1;
+00787 
+00788         for (s32 i=(s32)(used-2); i>=0; --i)
+00789         {
+00790             u32 j;
+00791             for (j=0; j<count; ++j)
+00792                 if (array[i] == c[j])
+00793                     break;
+00794 
+00795             if (j==count)
+00796                 return i;
+00797         }
+00798 
+00799         return -1;
+00800     }
+00801 
+00803 
+00807     s32 findNext(T c, u32 startPos) const
+00808     {
+00809         for (u32 i=startPos; i<used-1; ++i)
+00810             if (array[i] == c)
+00811                 return i;
+00812 
+00813         return -1;
+00814     }
+00815 
+00816 
+00818 
+00822     s32 findLast(T c, s32 start = -1) const
+00823     {
+00824         start = core::clamp ( start < 0 ? (s32)(used) - 2 : start, 0, (s32)(used) - 2 );
+00825         for (s32 i=start; i>=0; --i)
+00826             if (array[i] == c)
+00827                 return i;
+00828 
+00829         return -1;
+00830     }
+00831 
+00833 
+00839     s32 findLastChar(const T* const c, u32 count=1) const
+00840     {
+00841         if (!c || !count)
+00842             return -1;
+00843 
+00844         for (s32 i=(s32)used-2; i>=0; --i)
+00845             for (u32 j=0; j<count; ++j)
+00846                 if (array[i] == c[j])
+00847                     return i;
+00848 
+00849         return -1;
+00850     }
+00851 
+00852 
+00854 
+00858     template <class B>
+00859     s32 find(const B* const str, const u32 start = 0) const
+00860     {
+00861         if (str && *str)
+00862         {
+00863             u32 len = 0;
+00864 
+00865             while (str[len])
+00866                 ++len;
+00867 
+00868             if (len > used-1)
+00869                 return -1;
+00870 
+00871             for (u32 i=start; i<used-len; ++i)
+00872             {
+00873                 u32 j=0;
+00874 
+00875                 while(str[j] && array[i+j] == str[j])
+00876                     ++j;
+00877 
+00878                 if (!str[j])
+00879                     return i;
+00880             }
+00881         }
+00882 
+00883         return -1;
+00884     }
+00885 
+00886 
+00888 
+00891     string<T> subString(u32 begin, s32 length, bool make_lower = false ) const
+00892     {
+00893         // if start after string
+00894         // or no proper substring length
+00895         if ((length <= 0) || (begin>=size()))
+00896             return string<T>("");
+00897         // clamp length to maximal value
+00898         if ((length+begin) > size())
+00899             length = size()-begin;
+00900 
+00901         string<T> o;
+00902         o.reserve(length+1);
+00903 
+00904         s32 i;
+00905         if ( !make_lower )
+00906         {
+00907             for (i=0; i<length; ++i)
+00908                 o.array[i] = array[i+begin];
+00909         }
+00910         else
+00911         {
+00912             for (i=0; i<length; ++i)
+00913                 o.array[i] = locale_lower ( array[i+begin] );
+00914         }
+00915 
+00916         o.array[length] = 0;
+00917         o.used = length + 1;
+00918 
+00919         return o;
+00920     }
+00921 
+00922 
+00924 
+00925     string<T,TAlloc>& operator += (T c)
+00926     {
+00927         append(c);
+00928         return *this;
+00929     }
+00930 
+00931 
+00933 
+00934     string<T,TAlloc>& operator += (const T* const c)
+00935     {
+00936         append(c);
+00937         return *this;
+00938     }
+00939 
+00940 
+00942 
+00943     string<T,TAlloc>& operator += (const string<T,TAlloc>& other)
+00944     {
+00945         append(other);
+00946         return *this;
+00947     }
+00948 
+00949 
+00951 
+00952     string<T,TAlloc>& operator += (const int i)
+00953     {
+00954         append(string<T,TAlloc>(i));
+00955         return *this;
+00956     }
+00957 
+00958 
+00960 
+00961     string<T,TAlloc>& operator += (const unsigned int i)
+00962     {
+00963         append(string<T,TAlloc>(i));
+00964         return *this;
+00965     }
+00966 
+00967 
+00969 
+00970     string<T,TAlloc>& operator += (const long i)
+00971     {
+00972         append(string<T,TAlloc>(i));
+00973         return *this;
+00974     }
+00975 
+00976 
+00978 
+00979     string<T,TAlloc>& operator += (const unsigned long i)
+00980     {
+00981         append(string<T,TAlloc>(i));
+00982         return *this;
+00983     }
+00984 
+00985 
+00987 
+00988     string<T,TAlloc>& operator += (const double i)
+00989     {
+00990         append(string<T,TAlloc>(i));
+00991         return *this;
+00992     }
+00993 
+00994 
+00996 
+00997     string<T,TAlloc>& operator += (const float i)
+00998     {
+00999         append(string<T,TAlloc>(i));
+01000         return *this;
+01001     }
+01002 
+01003 
+01005 
+01007     string<T,TAlloc>& replace(T toReplace, T replaceWith)
+01008     {
+01009         for (u32 i=0; i<used-1; ++i)
+01010             if (array[i] == toReplace)
+01011                 array[i] = replaceWith;
+01012         return *this;
+01013     }
+01014 
+01015 
+01017 
+01019     string<T,TAlloc>& replace(const string<T,TAlloc>& toReplace, const string<T,TAlloc>& replaceWith)
+01020     {
+01021         if (toReplace.size() == 0)
+01022             return *this;
+01023 
+01024         const T* other = toReplace.c_str();
+01025         const T* replace = replaceWith.c_str();
+01026         const u32 other_size = toReplace.size();
+01027         const u32 replace_size = replaceWith.size();
+01028 
+01029         // Determine the delta.  The algorithm will change depending on the delta.
+01030         s32 delta = replace_size - other_size;
+01031 
+01032         // A character for character replace.  The string will not shrink or grow.
+01033         if (delta == 0)
+01034         {
+01035             s32 pos = 0;
+01036             while ((pos = find(other, pos)) != -1)
+01037             {
+01038                 for (u32 i = 0; i < replace_size; ++i)
+01039                     array[pos + i] = replace[i];
+01040                 ++pos;
+01041             }
+01042             return *this;
+01043         }
+01044 
+01045         // We are going to be removing some characters.  The string will shrink.
+01046         if (delta < 0)
+01047         {
+01048             u32 i = 0;
+01049             for (u32 pos = 0; pos < used; ++i, ++pos)
+01050             {
+01051                 // Is this potentially a match?
+01052                 if (array[pos] == *other)
+01053                 {
+01054                     // Check to see if we have a match.
+01055                     u32 j;
+01056                     for (j = 0; j < other_size; ++j)
+01057                     {
+01058                         if (array[pos + j] != other[j])
+01059                             break;
+01060                     }
+01061 
+01062                     // If we have a match, replace characters.
+01063                     if (j == other_size)
+01064                     {
+01065                         for (j = 0; j < replace_size; ++j)
+01066                             array[i + j] = replace[j];
+01067                         i += replace_size - 1;
+01068                         pos += other_size - 1;
+01069                         continue;
+01070                     }
+01071                 }
+01072 
+01073                 // No match found, just copy characters.
+01074                 array[i] = array[pos];
+01075             }
+01076             array[i-1] = 0;
+01077             used = i;
+01078 
+01079             return *this;
+01080         }
+01081 
+01082         // We are going to be adding characters, so the string size will increase.
+01083         // Count the number of times toReplace exists in the string so we can allocate the new size.
+01084         u32 find_count = 0;
+01085         s32 pos = 0;
+01086         while ((pos = find(other, pos)) != -1)
+01087         {
+01088             ++find_count;
+01089             ++pos;
+01090         }
+01091 
+01092         // Re-allocate the string now, if needed.
+01093         u32 len = delta * find_count;
+01094         if (used + len > allocated)
+01095             reallocate(used + len);
+01096 
+01097         // Start replacing.
+01098         pos = 0;
+01099         while ((pos = find(other, pos)) != -1)
+01100         {
+01101             T* start = array + pos + other_size - 1;
+01102             T* ptr   = array + used - 1;
+01103             T* end   = array + delta + used -1;
+01104 
+01105             // Shift characters to make room for the string.
+01106             while (ptr != start)
+01107             {
+01108                 *end = *ptr;
+01109                 --ptr;
+01110                 --end;
+01111             }
+01112 
+01113             // Add the new string now.
+01114             for (u32 i = 0; i < replace_size; ++i)
+01115                 array[pos + i] = replace[i];
+01116 
+01117             pos += replace_size;
+01118             used += delta;
+01119         }
+01120 
+01121         return *this;
+01122     }
+01123 
+01124 
+01126 
+01127     string<T,TAlloc>& remove(T c)
+01128     {
+01129         u32 pos = 0;
+01130         u32 found = 0;
+01131         for (u32 i=0; i<used-1; ++i)
+01132         {
+01133             if (array[i] == c)
+01134             {
+01135                 ++found;
+01136                 continue;
+01137             }
+01138 
+01139             array[pos++] = array[i];
+01140         }
+01141         used -= found;
+01142         array[used-1] = 0;
+01143         return *this;
+01144     }
+01145 
+01146 
+01148 
+01149     string<T,TAlloc>& remove(const string<T,TAlloc>& toRemove)
+01150     {
+01151         u32 size = toRemove.size();
+01152         if ( size == 0 )
+01153             return *this;
+01154         u32 pos = 0;
+01155         u32 found = 0;
+01156         for (u32 i=0; i<used-1; ++i)
+01157         {
+01158             u32 j = 0;
+01159             while (j < size)
+01160             {
+01161                 if (array[i + j] != toRemove[j])
+01162                     break;
+01163                 ++j;
+01164             }
+01165             if (j == size)
+01166             {
+01167                 found += size;
+01168                 i += size - 1;
+01169                 continue;
+01170             }
+01171 
+01172             array[pos++] = array[i];
+01173         }
+01174         used -= found;
+01175         array[used-1] = 0;
+01176         return *this;
+01177     }
+01178 
+01179 
+01181 
+01182     string<T,TAlloc>& removeChars(const string<T,TAlloc> & characters)
+01183     {
+01184         if (characters.size() == 0)
+01185             return *this;
+01186 
+01187         u32 pos = 0;
+01188         u32 found = 0;
+01189         for (u32 i=0; i<used-1; ++i)
+01190         {
+01191             // Don't use characters.findFirst as it finds the \0,
+01192             // causing used to become incorrect.
+01193             bool docontinue = false;
+01194             for (u32 j=0; j<characters.size(); ++j)
+01195             {
+01196                 if (characters[j] == array[i])
+01197                 {
+01198                     ++found;
+01199                     docontinue = true;
+01200                     break;
+01201                 }
+01202             }
+01203             if (docontinue)
+01204                 continue;
+01205 
+01206             array[pos++] = array[i];
+01207         }
+01208         used -= found;
+01209         array[used-1] = 0;
+01210 
+01211         return *this;
+01212     }
+01213 
+01214 
+01216 
+01218     string<T,TAlloc>& trim(const string<T,TAlloc> & whitespace = " \t\n\r")
+01219     {
+01220         // find start and end of the substring without the specified characters
+01221         const s32 begin = findFirstCharNotInList(whitespace.c_str(), whitespace.used);
+01222         if (begin == -1)
+01223             return (*this="");
+01224 
+01225         const s32 end = findLastCharNotInList(whitespace.c_str(), whitespace.used);
+01226 
+01227         return (*this = subString(begin, (end +1) - begin));
+01228     }
+01229 
+01230 
+01232 
+01235     string<T,TAlloc>& erase(u32 index)
+01236     {
+01237         _IRR_DEBUG_BREAK_IF(index>=used) // access violation
+01238 
+01239         for (u32 i=index+1; i<used; ++i)
+01240             array[i-1] = array[i];
+01241 
+01242         --used;
+01243         return *this;
+01244     }
+01245 
+01247     string<T,TAlloc>& validate()
+01248     {
+01249         // terminate on existing null
+01250         for (u32 i=0; i<allocated; ++i)
+01251         {
+01252             if (array[i] == 0)
+01253             {
+01254                 used = i + 1;
+01255                 return *this;
+01256             }
+01257         }
+01258 
+01259         // terminate
+01260         if ( allocated > 0 )
+01261         {
+01262             used = allocated;
+01263             array[used-1] = 0;
+01264         }
+01265         else
+01266         {
+01267             used = 0;
+01268         }
+01269 
+01270         return *this;
+01271     }
+01272 
+01274     T lastChar() const
+01275     {
+01276         return used > 1 ? array[used-2] : 0;
+01277     }
+01278 
+01280 
+01297     template<class container>
+01298     u32 split(container& ret, const T* const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const
+01299     {
+01300         if (!c)
+01301             return 0;
+01302 
+01303         const u32 oldSize=ret.size();
+01304         u32 lastpos = 0;
+01305         bool lastWasSeparator = false;
+01306         for (u32 i=0; i<used; ++i)
+01307         {
+01308             bool foundSeparator = false;
+01309             for (u32 j=0; j<count; ++j)
+01310             {
+01311                 if (array[i] == c[j])
+01312                 {
+01313                     if ((!ignoreEmptyTokens || i - lastpos != 0) &&
+01314                             !lastWasSeparator)
+01315                         ret.push_back(string<T,TAlloc>(&array[lastpos], i - lastpos));
+01316                     foundSeparator = true;
+01317                     lastpos = (keepSeparators ? i : i + 1);
+01318                     break;
+01319                 }
+01320             }
+01321             lastWasSeparator = foundSeparator;
+01322         }
+01323         if ((used - 1) > lastpos)
+01324             ret.push_back(string<T,TAlloc>(&array[lastpos], (used - 1) - lastpos));
+01325         return ret.size()-oldSize;
+01326     }
+01327 
+01328 private:
+01329 
+01331     void reallocate(u32 new_size)
+01332     {
+01333         T* old_array = array;
+01334 
+01335         array = allocator.allocate(new_size); //new T[new_size];
+01336         allocated = new_size;
+01337 
+01338         u32 amount = used < new_size ? used : new_size;
+01339         for (u32 i=0; i<amount; ++i)
+01340             array[i] = old_array[i];
+01341 
+01342         if (allocated < used)
+01343             used = allocated;
+01344 
+01345         allocator.deallocate(old_array); // delete [] old_array;
+01346     }
+01347 
+01348     //--- member variables
+01349 
+01350     T* array;
+01351     u32 allocated;
+01352     u32 used;
+01353     TAlloc allocator;
+01354 };
+01355 
+01356 
+01358 typedef string<c8> stringc;
+01359 
+01361 typedef string<wchar_t> stringw;
+01362 
+01363 
+01364 } // end namespace core
+01365 } // end namespace irr
+01366 
+01367 #endif
+01368 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_types_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_types_8h.html new file mode 100644 index 0000000..9a7d058 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_types_8h.html @@ -0,0 +1,286 @@ + + + + +Irrlicht 3D Engine: irrTypes.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrTypes.h File Reference
+
+
+
#include "IrrCompileConfig.h"
+#include <wchar.h>
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
+

+Defines

+ +

+Typedefs

+
    +
  • typedef char irr::c8 +
    8 bit character variable.
  • typedef float irr::f32 +
    32 bit floating point variable.
  • typedef double irr::f64 +
    64 bit floating point variable.
  • typedef char irr::fschar_t +
    Type name for character type used by the file system.
  • typedef signed short irr::s16 +
    16 bit signed variable.
  • typedef signed int irr::s32 +
    32 bit signed variable.
  • typedef long long irr::s64 +
    64 bit signed variable.
  • typedef signed char irr::s8 +
    8 bit signed variable.
  • typedef unsigned short irr::u16 +
    16 bit unsigned variable.
  • typedef unsigned int irr::u32 +
    32 bit unsigned variable.
  • typedef unsigned long long irr::u64 +
    64 bit unsigned variable.
  • typedef unsigned char irr::u8 +
    8 bit unsigned variable.
+

Define Documentation

+ + + +
+
+ + + + +
#define _IRR_DEPRECATED_
+
+
+ +

Defines a deprecated macro which generates a warning at compile time.

+

The usage is simple For typedef: typedef _IRR_DEPRECATED_ int test1; For classes/structs: class _IRR_DEPRECATED_ test2 { ... }; For methods: class test3 { _IRR_DEPRECATED_ virtual void foo() {} }; For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {}

+ +

Definition at line 195 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
+
+ +
+ +
+
+ + + + + + + + +
#define _IRR_TEXT( X)   X
+
+
+ +

Definition at line 159 of file irrTypes.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define MAKE_IRR_ID( c0,
 c1,
 c2,
 c3 
)
+
+
+Value:
((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \
+        ((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 ))
+
+

ignore VC8 warning deprecated

+

The microsoft compiler creates four CC codes used in Irrlicht for simple ids some compilers can create those by directly writing the code like 'code', but some generate warnings so we use this macro here

+ +

Definition at line 241 of file irrTypes.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_types_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_types_8h_source.html new file mode 100644 index 0000000..93a45f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_types_8h_source.html @@ -0,0 +1,334 @@ + + + + +Irrlicht 3D Engine: irrTypes.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrTypes.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_TYPES_H_INCLUDED__
+00006 #define __IRR_TYPES_H_INCLUDED__
+00007 
+00008 #include "IrrCompileConfig.h"
+00009 
+00010 namespace irr
+00011 {
+00012 
+00014 
+00015 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00016 typedef unsigned __int8     u8;
+00017 #else
+00018 typedef unsigned char       u8;
+00019 #endif
+00020 
+00022 
+00023 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00024 typedef __int8          s8;
+00025 #else
+00026 typedef signed char     s8;
+00027 #endif
+00028 
+00030 
+00031 typedef char            c8;
+00032 
+00033 
+00034 
+00036 
+00037 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00038 typedef unsigned __int16    u16;
+00039 #else
+00040 typedef unsigned short      u16;
+00041 #endif
+00042 
+00044 
+00045 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00046 typedef __int16         s16;
+00047 #else
+00048 typedef signed short        s16;
+00049 #endif
+00050 
+00051 
+00052 
+00054 
+00055 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00056 typedef unsigned __int32    u32;
+00057 #else
+00058 typedef unsigned int        u32;
+00059 #endif
+00060 
+00062 
+00063 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00064 typedef __int32         s32;
+00065 #else
+00066 typedef signed int      s32;
+00067 #endif
+00068 
+00069 
+00070 #ifdef __IRR_HAS_S64
+00071 
+00072 
+00073 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00074 typedef unsigned __int64            u64;
+00075 #elif __GNUC__
+00076 #if __WORDSIZE == 64
+00077 typedef unsigned long int           u64;
+00078 #else
+00079 __extension__ typedef unsigned long long    u64;
+00080 #endif
+00081 #else
+00082 typedef unsigned long long          u64;
+00083 #endif
+00084 
+00086 
+00087 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
+00088 typedef __int64                 s64;
+00089 #elif __GNUC__
+00090 #if __WORDSIZE == 64
+00091 typedef long int                s64;
+00092 #else
+00093 __extension__ typedef long long         s64;
+00094 #endif
+00095 #else
+00096 typedef long long               s64;
+00097 #endif
+00098 #endif  // __IRR_HAS_S64
+00099 
+00100 
+00101 
+00103 
+00104 typedef float               f32;
+00105 
+00107 
+00108 typedef double              f64;
+00109 
+00110 
+00111 } // end namespace irr
+00112 
+00113 
+00114 #include <wchar.h>
+00115 #ifdef _IRR_WINDOWS_API_
+00116 
+00117 
+00118 
+00119 
+00120 #if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE)
+00121 #define swprintf swprintf_s
+00122 #define snprintf sprintf_s
+00123 #elif !defined(__CYGWIN__)
+00124 #define swprintf _snwprintf
+00125 #define snprintf _snprintf
+00126 #endif
+00127 
+00128 // define the wchar_t type if not already built in.
+00129 #ifdef _MSC_VER
+00130 #ifndef _WCHAR_T_DEFINED
+00131 
+00132 
+00139 typedef unsigned short wchar_t;
+00140 #define _WCHAR_T_DEFINED
+00141 #endif // wchar is not defined
+00142 #endif // microsoft compiler
+00143 #endif // _IRR_WINDOWS_API_
+00144 
+00145 namespace irr
+00146 {
+00147 
+00149 
+00154 #if defined(_IRR_WCHAR_FILESYSTEM)
+00155     typedef wchar_t fschar_t;
+00156     #define _IRR_TEXT(X) L##X
+00157 #else
+00158     typedef char fschar_t;
+00159     #define _IRR_TEXT(X) X
+00160 #endif
+00161 
+00162 } // end namespace irr
+00163 
+00165 #if defined(_DEBUG)
+00166 #if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE)
+00167   #if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
+00168   #include <crtdbg.h>
+00169   #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
+00170   #else
+00171   #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
+00172   #endif
+00173 #else
+00174 #include "assert.h"
+00175 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
+00176 #endif
+00177 #else
+00178 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
+00179 #endif
+00180 
+00182 
+00188 #if defined(IGNORE_DEPRECATED_WARNING)
+00189 #define _IRR_DEPRECATED_
+00190 #elif _MSC_VER >= 1310 //vs 2003 or higher
+00191 #define _IRR_DEPRECATED_ __declspec(deprecated)
+00192 #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // all versions above 3.0 should support this feature
+00193 #define _IRR_DEPRECATED_  __attribute__ ((deprecated))
+00194 #else
+00195 #define _IRR_DEPRECATED_
+00196 #endif
+00197 
+00199 
+00204 #if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400)
+00205 #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100
+00206 #else
+00207 #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
+00208 #endif // _IRR_MANAGED_MARSHALLING_BUGFIX
+00209 
+00210 
+00211 // memory debugging
+00212 #if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \
+00213     (_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE)
+00214 
+00215     #define CRTDBG_MAP_ALLOC
+00216     #define _CRTDBG_MAP_ALLOC
+00217     #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)
+00218     #include <stdlib.h>
+00219     #include <crtdbg.h>
+00220     #define new DEBUG_CLIENTBLOCK
+00221 #endif
+00222 
+00223 // disable truncated debug information warning in visual studio 6 by default
+00224 #if defined(_MSC_VER) && (_MSC_VER < 1300 )
+00225 #pragma warning( disable: 4786)
+00226 #endif // _MSC
+00227 
+00228 
+00230 
+00231 #if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400)
+00232     //#pragma warning( disable: 4996)
+00233     //#define _CRT_SECURE_NO_DEPRECATE 1
+00234     //#define _CRT_NONSTDC_NO_DEPRECATE 1
+00235 #endif
+00236 
+00237 
+00239 
+00241 #define MAKE_IRR_ID(c0, c1, c2, c3) \
+00242         ((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \
+00243         ((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 ))
+00244 
+00245 #if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+00246 #define _strcmpi(a,b) strcmpi(a,b)
+00247 #endif
+00248 
+00249 #endif // __IRR_TYPES_H_INCLUDED__
+00250 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h.html b/src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h.html new file mode 100644 index 0000000..cfcb4cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h.html @@ -0,0 +1,218 @@ + + + + +Irrlicht 3D Engine: irrXML.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrXML.h File Reference
+
+
+ +

Header file of the irrXML, the Irrlicht XML parser. +More...

+
#include <stdio.h>
+#include "IrrCompileConfig.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Typedefs

+ +

+Enumerations

+ +

+Functions

+
    +
  • IRRLICHT_API IrrXMLReader
    +*IRRCALLCONV irr::io::createIrrXMLReader (const char *filename) +
    Creates an instance of an UFT-8 or ASCII character xml parser.
  • IRRLICHT_API IrrXMLReader
    +*IRRCALLCONV irr::io::createIrrXMLReader (FILE *file) +
    Creates an instance of an UFT-8 or ASCII character xml parser.
  • IRRLICHT_API IrrXMLReader
    +*IRRCALLCONV irr::io::createIrrXMLReader (IFileReadCallBack *callback, bool deleteCallback=false) +
    Creates an instance of an UFT-8 or ASCII character xml parser.
  • IRRLICHT_API IrrXMLReaderUTF16
    +*IRRCALLCONV irr::io::createIrrXMLReaderUTF16 (const char *filename) +
    Creates an instance of an UFT-16 xml parser.
  • IRRLICHT_API IrrXMLReaderUTF16
    +*IRRCALLCONV irr::io::createIrrXMLReaderUTF16 (FILE *file) +
    Creates an instance of an UFT-16 xml parser.
  • IRRLICHT_API IrrXMLReaderUTF16
    +*IRRCALLCONV irr::io::createIrrXMLReaderUTF16 (IFileReadCallBack *callback, bool deleteCallback=false) +
    Creates an instance of an UFT-16 xml parser.
  • IRRLICHT_API IrrXMLReaderUTF32
    +*IRRCALLCONV irr::io::createIrrXMLReaderUTF32 (const char *filename) +
    Creates an instance of an UFT-32 xml parser.
  • IRRLICHT_API IrrXMLReaderUTF32
    +*IRRCALLCONV irr::io::createIrrXMLReaderUTF32 (FILE *file) +
    Creates an instance of an UFT-32 xml parser.
  • IRRLICHT_API IrrXMLReaderUTF32
    +*IRRCALLCONV irr::io::createIrrXMLReaderUTF32 (IFileReadCallBack *callback, bool deleteCallback=false) +
    Creates an instance of an UFT-32 xml parser.
+

Detailed Description

+

Header file of the irrXML, the Irrlicht XML parser.

+

This file includes everything needed for using irrXML, the XML parser of the Irrlicht Engine. To use irrXML, you only need to include this file in your project:

+
    #include <irrXML.h>
+

It is also common to use the two namespaces in which irrXML is included, directly after including irrXML.h:

+
    #include <irrXML.h>
+    using namespace irr;
+    using namespace io;
+
+

Definition in file irrXML.h.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h_source.html new file mode 100644 index 0000000..844d106 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irr_x_m_l_8h_source.html @@ -0,0 +1,318 @@ + + + + +Irrlicht 3D Engine: irrXML.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrXML.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h
+00004 
+00005 #ifndef __IRR_XML_H_INCLUDED__
+00006 #define __IRR_XML_H_INCLUDED__
+00007 
+00008 #include <stdio.h>
+00009 #include "IrrCompileConfig.h"
+00010 
+00153 namespace irr
+00154 {
+00155 namespace io
+00156 {
+00158     enum ETEXT_FORMAT
+00159     {
+00161         ETF_ASCII,
+00162 
+00164         ETF_UTF8,
+00165 
+00167         ETF_UTF16_BE,
+00168 
+00170         ETF_UTF16_LE,
+00171 
+00173         ETF_UTF32_BE,
+00174 
+00176         ETF_UTF32_LE
+00177     };
+00178 
+00179 
+00181     enum EXML_NODE
+00182     {
+00184         EXN_NONE,
+00185 
+00187         EXN_ELEMENT,
+00188 
+00190         EXN_ELEMENT_END,
+00191 
+00194         EXN_TEXT,
+00195 
+00197         EXN_COMMENT,
+00198 
+00200         EXN_CDATA,
+00201 
+00203         EXN_UNKNOWN
+00204     };
+00205 
+00207 
+00214     class IFileReadCallBack
+00215     {
+00216     public:
+00217 
+00219         virtual ~IFileReadCallBack() {}
+00220 
+00222 
+00225         virtual int read(void* buffer, int sizeToRead) = 0;
+00226 
+00228         virtual long getSize() const = 0;
+00229     };
+00230 
+00232 
+00237     class IXMLBase
+00238     {
+00239     };
+00240 
+00242 
+00274     template<class char_type, class super_class>
+00275     class IIrrXMLReader : public super_class
+00276     {
+00277     public:
+00278 
+00280         virtual ~IIrrXMLReader() {}
+00281 
+00283 
+00284         virtual bool read() = 0;
+00285 
+00287         virtual EXML_NODE getNodeType() const = 0;
+00288 
+00290 
+00293         virtual unsigned int getAttributeCount() const = 0;
+00294 
+00296 
+00298         virtual const char_type* getAttributeName(int idx) const = 0;
+00299 
+00301 
+00303         virtual const char_type* getAttributeValue(int idx) const = 0;
+00304 
+00306 
+00308         virtual const char_type* getAttributeValue(const char_type* name) const = 0;
+00309 
+00311 
+00315         virtual const char_type* getAttributeValueSafe(const char_type* name) const = 0;
+00316 
+00318 
+00321         virtual int getAttributeValueAsInt(const char_type* name) const = 0;
+00322 
+00324 
+00327         virtual int getAttributeValueAsInt(int idx) const = 0;
+00328 
+00330 
+00333         virtual float getAttributeValueAsFloat(const char_type* name) const = 0;
+00334 
+00336 
+00339         virtual float getAttributeValueAsFloat(int idx) const = 0;
+00340 
+00342 
+00344         virtual const char_type* getNodeName() const = 0;
+00345 
+00347 
+00349         virtual const char_type* getNodeData() const = 0;
+00350 
+00352         virtual bool isEmptyElement() const = 0;
+00353 
+00355 
+00359         virtual ETEXT_FORMAT getSourceFormat() const = 0;
+00360 
+00362 
+00366         virtual ETEXT_FORMAT getParserFormat() const = 0;
+00367     };
+00368 
+00369 
+00370     template <typename T>
+00371     struct xmlChar
+00372     {
+00373         T c;
+00374         xmlChar<T>() {}
+00375         xmlChar<T>(char in) : c(static_cast<T>(in)) {}
+00376         xmlChar<T>(wchar_t in) : c(static_cast<T>(in)) {}
+00377 #if defined(__BORLANDC__)
+00378         // Note - removing explicit for borland was to get it to even compile.
+00379         // There haven't been any kind of tests for that besides that.
+00380         xmlChar<T>(unsigned char in) : c(static_cast<T>(in)) {}
+00381         xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {}
+00382         xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {}
+00383         xmlChar<T>(unsigned long in) : c(static_cast<T>(in)) {}
+00384 #else 
+00385         explicit xmlChar<T>(unsigned char in) : c(static_cast<T>(in)) {}
+00386         explicit xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {}
+00387         explicit xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {}
+00388         explicit xmlChar<T>(unsigned long in) : c(static_cast<T>(in)) {}
+00389 #endif
+00390         operator T() const { return c; }
+00391         void operator=(int t) { c=static_cast<T>(t); }
+00392     };
+00393 
+00395 
+00397     typedef xmlChar<unsigned short> char16;
+00398 
+00400 
+00402     typedef xmlChar<unsigned int> char32;
+00403 
+00405 
+00410     typedef IIrrXMLReader<char, IXMLBase> IrrXMLReader;
+00411 
+00413 
+00418     typedef IIrrXMLReader<char16, IXMLBase> IrrXMLReaderUTF16;
+00419 
+00421 
+00426     typedef IIrrXMLReader<char32, IXMLBase> IrrXMLReaderUTF32;
+00427 
+00428 
+00430 
+00438     IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(const char* filename);
+00439 
+00441 
+00450     IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(FILE* file);
+00451 
+00453 
+00465     IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(IFileReadCallBack* callback,
+00466                                                                 bool deleteCallback = false);
+00467 
+00469 
+00478     IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(const char* filename);
+00479 
+00481 
+00490     IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(FILE* file);
+00491 
+00493 
+00505     IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(IFileReadCallBack* callback,
+00506                                                                         bool deleteCallback = false);
+00507 
+00508 
+00510 
+00518     IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(const char* filename);
+00519 
+00521 
+00530     IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(FILE* file);
+00531 
+00533 
+00546     IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(IFileReadCallBack* callback,
+00547                                                                         bool deleteCallback = false);
+00548 
+00549 
+00571 } // end namespace io
+00572 } // end namespace irr
+00573 
+00574 #endif // __IRR_XML_H_INCLUDED__
+00575 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irrlicht.png b/src/others/irrlicht-1.8.1/doc/html/irrlicht.png new file mode 100644 index 0000000..f8534cf Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/irrlicht.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/irrlicht_8h.html b/src/others/irrlicht-1.8.1/doc/html/irrlicht_8h.html new file mode 100644 index 0000000..8eddc03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irrlicht_8h.html @@ -0,0 +1,322 @@ + + + + +Irrlicht 3D Engine: irrlicht.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irrlicht.h File Reference
+
+
+ +

Main header file of the irrlicht, the only file needed to include. +More...

+
#include "IrrCompileConfig.h"
+#include "aabbox3d.h"
+#include "CDynamicMeshBuffer.h"
+#include "CIndexBuffer.h"
+#include "CMeshBuffer.h"
+#include "coreutil.h"
+#include "CVertexBuffer.h"
+#include "dimension2d.h"
+#include "ECullingTypes.h"
+#include "EDebugSceneTypes.h"
+#include "EDriverFeatures.h"
+#include "EDriverTypes.h"
+#include "EGUIAlignment.h"
+#include "EGUIElementTypes.h"
+#include "EHardwareBufferFlags.h"
+#include "EMaterialFlags.h"
+#include "EMaterialTypes.h"
+#include "EMeshWriterEnums.h"
+#include "EMessageBoxFlags.h"
+#include "ESceneNodeAnimatorTypes.h"
+#include "ESceneNodeTypes.h"
+#include "ETerrainElements.h"
+#include "fast_atof.h"
+#include "heapsort.h"
+#include "IAnimatedMesh.h"
+#include "IAnimatedMeshMD2.h"
+#include "IAnimatedMeshMD3.h"
+#include "IAnimatedMeshSceneNode.h"
+#include "IAttributeExchangingObject.h"
+#include "IAttributes.h"
+#include "IBillboardSceneNode.h"
+#include "IBillboardTextSceneNode.h"
+#include "IBoneSceneNode.h"
+#include "ICameraSceneNode.h"
+#include "ICursorControl.h"
+#include "IDummyTransformationSceneNode.h"
+#include "IDynamicMeshBuffer.h"
+#include "IEventReceiver.h"
+#include "IFileList.h"
+#include "IFileSystem.h"
+#include "IGeometryCreator.h"
+#include "IGPUProgrammingServices.h"
+#include "IGUIButton.h"
+#include "IGUICheckBox.h"
+#include "IGUIColorSelectDialog.h"
+#include "IGUIComboBox.h"
+#include "IGUIContextMenu.h"
+#include "IGUIEditBox.h"
+#include "IGUIElement.h"
+#include "IGUIElementFactory.h"
+#include "IGUIEnvironment.h"
+#include "IGUIFileOpenDialog.h"
+#include "IGUIFont.h"
+#include "IGUIFontBitmap.h"
+#include "IGUIImage.h"
+#include "IGUIInOutFader.h"
+#include "IGUIListBox.h"
+#include "IGUIMeshViewer.h"
+#include "IGUIScrollBar.h"
+#include "IGUISkin.h"
+#include "IGUISpinBox.h"
+#include "IGUISpriteBank.h"
+#include "IGUIStaticText.h"
+#include "IGUITabControl.h"
+#include "IGUITable.h"
+#include "IGUIToolbar.h"
+#include "IGUIWindow.h"
+#include "IGUITreeView.h"
+#include "IImage.h"
+#include "IImageLoader.h"
+#include "IImageWriter.h"
+#include "IIndexBuffer.h"
+#include "ILightSceneNode.h"
+#include "ILogger.h"
+#include "IMaterialRenderer.h"
+#include "IMaterialRendererServices.h"
+#include "IMesh.h"
+#include "IMeshBuffer.h"
+#include "IMeshCache.h"
+#include "IMeshLoader.h"
+#include "IMeshManipulator.h"
+#include "IMeshSceneNode.h"
+#include "IMeshWriter.h"
+#include "IColladaMeshWriter.h"
+#include "IMetaTriangleSelector.h"
+#include "IOSOperator.h"
+#include "IParticleSystemSceneNode.h"
+#include "IQ3LevelMesh.h"
+#include "IQ3Shader.h"
+#include "IReadFile.h"
+#include "IReferenceCounted.h"
+#include "irrArray.h"
+#include "IRandomizer.h"
+#include "IrrlichtDevice.h"
+#include "irrList.h"
+#include "irrMap.h"
+#include "irrMath.h"
+#include "irrString.h"
+#include "irrTypes.h"
+#include "path.h"
+#include "irrXML.h"
+#include "ISceneCollisionManager.h"
+#include "ISceneLoader.h"
+#include "ISceneManager.h"
+#include "ISceneNode.h"
+#include "ISceneNodeAnimator.h"
+#include "ISceneNodeAnimatorCameraFPS.h"
+#include "ISceneNodeAnimatorCameraMaya.h"
+#include "ISceneNodeAnimatorCollisionResponse.h"
+#include "ISceneNodeAnimatorFactory.h"
+#include "ISceneNodeFactory.h"
+#include "ISceneUserDataSerializer.h"
+#include "IShaderConstantSetCallBack.h"
+#include "IShadowVolumeSceneNode.h"
+#include "ISkinnedMesh.h"
+#include "ITerrainSceneNode.h"
+#include "ITextSceneNode.h"
+#include "ITexture.h"
+#include "ITimer.h"
+#include "ITriangleSelector.h"
+#include "IVertexBuffer.h"
+#include "IVideoDriver.h"
+#include "IVideoModeList.h"
+#include "IVolumeLightSceneNode.h"
+#include "IWriteFile.h"
+#include "IXMLReader.h"
+#include "IXMLWriter.h"
+#include "ILightManager.h"
+#include "Keycodes.h"
+#include "line2d.h"
+#include "line3d.h"
+#include "matrix4.h"
+#include "plane3d.h"
+#include "position2d.h"
+#include "quaternion.h"
+#include "rect.h"
+#include "S3DVertex.h"
+#include "SAnimatedMesh.h"
+#include "SceneParameters.h"
+#include "SColor.h"
+#include "SExposedVideoData.h"
+#include "SIrrCreationParameters.h"
+#include "SKeyMap.h"
+#include "SLight.h"
+#include "SMaterial.h"
+#include "SMesh.h"
+#include "SMeshBuffer.h"
+#include "SMeshBufferLightMap.h"
+#include "SMeshBufferTangents.h"
+#include "SParticle.h"
+#include "SSharedMeshBuffer.h"
+#include "SSkinMeshBuffer.h"
+#include "SVertexIndex.h"
+#include "SViewFrustum.h"
+#include "triangle3d.h"
+#include "vector2d.h"
+#include "vector3d.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
  • namespace irr::gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace irr::scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace irr::video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Typedefs

+
    +
  • typedef IrrlichtDevice
    +*IRRCALLCONV * irr::funcptr_createDevice (video::E_DRIVER_TYPE deviceType, const core::dimension2d< u32 > &windowSize, u32 bits, bool fullscreen, bool stencilbuffer, bool vsync, IEventReceiver *receiver) +
    typedef for Function Pointer
  • typedef IrrlichtDevice
    +*IRRCALLCONV * irr::funcptr_createDeviceEx (const SIrrlichtCreationParameters &parameters) +
    typedef for Function Pointer
+

+Functions

+
    +
  • IRRLICHT_API IrrlichtDevice
    +*IRRCALLCONV irr::createDevice (video::E_DRIVER_TYPE deviceType=video::EDT_SOFTWARE, const core::dimension2d< u32 > &windowSize=(core::dimension2d< u32 >(640, 480)), u32 bits=16, bool fullscreen=false, bool stencilbuffer=false, bool vsync=false, IEventReceiver *receiver=0) +
    Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.
  • IRRLICHT_API IrrlichtDevice
    +*IRRCALLCONV irr::createDeviceEx (const SIrrlichtCreationParameters &parameters) +
    Creates an Irrlicht device with the option to specify advanced parameters.
+

Detailed Description

+

Main header file of the irrlicht, the only file needed to include.

+ +

Definition in file irrlicht.h.

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irrlicht_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irrlicht_8h_source.html new file mode 100644 index 0000000..1f7f399 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irrlicht_8h_source.html @@ -0,0 +1,367 @@ + + + + +Irrlicht 3D Engine: irrlicht.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrlicht.h
+
+
+Go to the documentation of this file.
00001 /* irrlicht.h -- interface of the 'Irrlicht Engine'
+00002 
+00003   Copyright (C) 2002-2012 Nikolaus Gebhardt
+00004 
+00005   This software is provided 'as-is', without any express or implied
+00006   warranty.  In no event will the authors be held liable for any damages
+00007   arising from the use of this software.
+00008 
+00009   Permission is granted to anyone to use this software for any purpose,
+00010   including commercial applications, and to alter it and redistribute it
+00011   freely, subject to the following restrictions:
+00012 
+00013   1. The origin of this software must not be misrepresented; you must not
+00014      claim that you wrote the original software. If you use this software
+00015      in a product, an acknowledgment in the product documentation would be
+00016      appreciated but is not required.
+00017   2. Altered source versions must be plainly marked as such, and must not be
+00018      misrepresented as being the original software.
+00019   3. This notice may not be removed or altered from any source distribution.
+00020 
+00021   Please note that the Irrlicht Engine is based in part on the work of the
+00022   Independent JPEG Group, the zlib and the libPng. This means that if you use
+00023   the Irrlicht Engine in your product, you must acknowledge somewhere in your
+00024   documentation that you've used the IJG code. It would also be nice to mention
+00025   that you use the Irrlicht Engine, the zlib and libPng. See the README files
+00026   in the jpeglib, the zlib and libPng for further informations.
+00027 */
+00028 
+00029 #ifndef __IRRLICHT_H_INCLUDED__
+00030 #define __IRRLICHT_H_INCLUDED__
+00031 
+00032 #include "IrrCompileConfig.h"
+00033 #include "aabbox3d.h"
+00034 #include "CDynamicMeshBuffer.h"
+00035 #include "CIndexBuffer.h"
+00036 #include "CMeshBuffer.h"
+00037 #include "coreutil.h"
+00038 #include "CVertexBuffer.h"
+00039 #include "dimension2d.h"
+00040 #include "ECullingTypes.h"
+00041 #include "EDebugSceneTypes.h"
+00042 #include "EDriverFeatures.h"
+00043 #include "EDriverTypes.h"
+00044 #include "EGUIAlignment.h"
+00045 #include "EGUIElementTypes.h"
+00046 #include "EHardwareBufferFlags.h"
+00047 #include "EMaterialFlags.h"
+00048 #include "EMaterialTypes.h"
+00049 #include "EMeshWriterEnums.h"
+00050 #include "EMessageBoxFlags.h"
+00051 #include "ESceneNodeAnimatorTypes.h"
+00052 #include "ESceneNodeTypes.h"
+00053 #include "ETerrainElements.h"
+00054 #include "fast_atof.h"
+00055 #include "heapsort.h"
+00056 #include "IAnimatedMesh.h"
+00057 #include "IAnimatedMeshMD2.h"
+00058 #include "IAnimatedMeshMD3.h"
+00059 #include "IAnimatedMeshSceneNode.h"
+00060 #include "IAttributeExchangingObject.h"
+00061 #include "IAttributes.h"
+00062 #include "IBillboardSceneNode.h"
+00063 #include "IBillboardTextSceneNode.h"
+00064 #include "IBoneSceneNode.h"
+00065 #include "ICameraSceneNode.h"
+00066 #include "ICursorControl.h"
+00067 #include "IDummyTransformationSceneNode.h"
+00068 #include "IDynamicMeshBuffer.h"
+00069 #include "IEventReceiver.h"
+00070 #include "IFileList.h"
+00071 #include "IFileSystem.h"
+00072 #include "IGeometryCreator.h"
+00073 #include "IGPUProgrammingServices.h"
+00074 #include "IGUIButton.h"
+00075 #include "IGUICheckBox.h"
+00076 #include "IGUIColorSelectDialog.h"
+00077 #include "IGUIComboBox.h"
+00078 #include "IGUIContextMenu.h"
+00079 #include "IGUIEditBox.h"
+00080 #include "IGUIElement.h"
+00081 #include "IGUIElementFactory.h"
+00082 #include "IGUIEnvironment.h"
+00083 #include "IGUIFileOpenDialog.h"
+00084 #include "IGUIFont.h"
+00085 #include "IGUIFontBitmap.h"
+00086 #include "IGUIImage.h"
+00087 #include "IGUIInOutFader.h"
+00088 #include "IGUIListBox.h"
+00089 #include "IGUIMeshViewer.h"
+00090 #include "IGUIScrollBar.h"
+00091 #include "IGUISkin.h"
+00092 #include "IGUISpinBox.h"
+00093 #include "IGUISpriteBank.h"
+00094 #include "IGUIStaticText.h"
+00095 #include "IGUITabControl.h"
+00096 #include "IGUITable.h"
+00097 #include "IGUIToolbar.h"
+00098 #include "IGUIWindow.h"
+00099 #include "IGUITreeView.h"
+00100 #include "IImage.h"
+00101 #include "IImageLoader.h"
+00102 #include "IImageWriter.h"
+00103 #include "IIndexBuffer.h"
+00104 #include "ILightSceneNode.h"
+00105 #include "ILogger.h"
+00106 #include "IMaterialRenderer.h"
+00107 #include "IMaterialRendererServices.h"
+00108 #include "IMesh.h"
+00109 #include "IMeshBuffer.h"
+00110 #include "IMeshCache.h"
+00111 #include "IMeshLoader.h"
+00112 #include "IMeshManipulator.h"
+00113 #include "IMeshSceneNode.h"
+00114 #include "IMeshWriter.h"
+00115 #include "IColladaMeshWriter.h"
+00116 #include "IMetaTriangleSelector.h"
+00117 #include "IOSOperator.h"
+00118 #include "IParticleSystemSceneNode.h" // also includes all emitters and attractors
+00119 #include "IQ3LevelMesh.h"
+00120 #include "IQ3Shader.h"
+00121 #include "IReadFile.h"
+00122 #include "IReferenceCounted.h"
+00123 #include "irrArray.h"
+00124 #include "IRandomizer.h"
+00125 #include "IrrlichtDevice.h"
+00126 #include "irrList.h"
+00127 #include "irrMap.h"
+00128 #include "irrMath.h"
+00129 #include "irrString.h"
+00130 #include "irrTypes.h"
+00131 #include "path.h"
+00132 #include "irrXML.h"
+00133 #include "ISceneCollisionManager.h"
+00134 #include "ISceneLoader.h"
+00135 #include "ISceneManager.h"
+00136 #include "ISceneNode.h"
+00137 #include "ISceneNodeAnimator.h"
+00138 #include "ISceneNodeAnimatorCameraFPS.h"
+00139 #include "ISceneNodeAnimatorCameraMaya.h"
+00140 #include "ISceneNodeAnimatorCollisionResponse.h"
+00141 #include "ISceneNodeAnimatorFactory.h"
+00142 #include "ISceneNodeFactory.h"
+00143 #include "ISceneUserDataSerializer.h"
+00144 #include "IShaderConstantSetCallBack.h"
+00145 #include "IShadowVolumeSceneNode.h"
+00146 #include "ISkinnedMesh.h"
+00147 #include "ITerrainSceneNode.h"
+00148 #include "ITextSceneNode.h"
+00149 #include "ITexture.h"
+00150 #include "ITimer.h"
+00151 #include "ITriangleSelector.h"
+00152 #include "IVertexBuffer.h"
+00153 #include "IVideoDriver.h"
+00154 #include "IVideoModeList.h"
+00155 #include "IVolumeLightSceneNode.h"
+00156 #include "IWriteFile.h"
+00157 #include "IXMLReader.h"
+00158 #include "IXMLWriter.h"
+00159 #include "ILightManager.h"
+00160 #include "Keycodes.h"
+00161 #include "line2d.h"
+00162 #include "line3d.h"
+00163 #include "matrix4.h"
+00164 #include "plane3d.h"
+00165 #include "position2d.h"
+00166 #include "quaternion.h"
+00167 #include "rect.h"
+00168 #include "S3DVertex.h"
+00169 #include "SAnimatedMesh.h"
+00170 #include "SceneParameters.h"
+00171 #include "SColor.h"
+00172 #include "SExposedVideoData.h"
+00173 #include "SIrrCreationParameters.h"
+00174 #include "SKeyMap.h"
+00175 #include "SLight.h"
+00176 #include "SMaterial.h"
+00177 #include "SMesh.h"
+00178 #include "SMeshBuffer.h"
+00179 #include "SMeshBufferLightMap.h"
+00180 #include "SMeshBufferTangents.h"
+00181 #include "SParticle.h"
+00182 #include "SSharedMeshBuffer.h"
+00183 #include "SSkinMeshBuffer.h"
+00184 #include "SVertexIndex.h"
+00185 #include "SViewFrustum.h"
+00186 #include "triangle3d.h"
+00187 #include "vector2d.h"
+00188 #include "vector3d.h"
+00189 
+00301 #include "SIrrCreationParameters.h"
+00302 
+00304 namespace irr
+00305 {
+00307 
+00324     extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(
+00325         video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE,
+00326         // parantheses are necessary for some compilers
+00327         const core::dimension2d<u32>& windowSize = (core::dimension2d<u32>(640,480)),
+00328         u32 bits = 16,
+00329         bool fullscreen = false,
+00330         bool stencilbuffer = false,
+00331         bool vsync = false,
+00332         IEventReceiver* receiver = 0);
+00333 
+00335     typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )(
+00336             video::E_DRIVER_TYPE deviceType,
+00337             const core::dimension2d<u32>& windowSize,
+00338             u32 bits,
+00339             bool fullscreen,
+00340             bool stencilbuffer,
+00341             bool vsync,
+00342             IEventReceiver* receiver);
+00343 
+00344 
+00346 
+00353     extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(
+00354         const SIrrlichtCreationParameters& parameters);
+00355 
+00357     typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDeviceEx )( const SIrrlichtCreationParameters& parameters );
+00358 
+00359 
+00360     // THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES
+00361     // EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN.
+00362 
+00364     namespace core
+00365     {
+00366     }
+00367 
+00369     namespace gui
+00370     {
+00371     }
+00372 
+00374     namespace io
+00375     {
+00376     }
+00377 
+00379     namespace scene
+00380     {
+00381     }
+00382 
+00384     namespace video
+00385     {
+00386     }
+00387 }
+00388 
+00393 #endif
+00394 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irrlichtlogo.png b/src/others/irrlicht-1.8.1/doc/html/irrlichtlogo.png new file mode 100644 index 0000000..a63b3fc Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/irrlichtlogo.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/irrpack_8h.html b/src/others/irrlicht-1.8.1/doc/html/irrpack_8h.html new file mode 100644 index 0000000..77bb355 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irrpack_8h.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: irrpack.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrpack.h File Reference
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irrpack_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irrpack_8h_source.html new file mode 100644 index 0000000..c0e24bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irrpack_8h_source.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: irrpack.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrpack.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2007-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 // include this file right before the data structures to be 1-aligned
+00006 // and add to each structure the PACK_STRUCT define just like this:
+00007 // struct mystruct
+00008 // {
+00009 //  ...
+00010 // } PACK_STRUCT;
+00011 // Always include the irrunpack.h file right after the last type declared
+00012 // like this, and do not put any other types with different alignment
+00013 // in between!
+00014 
+00015 // byte-align structures
+00016 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+00017 #   pragma warning(disable: 4103)
+00018 #   pragma pack( push, packing )
+00019 #   pragma pack( 1 )
+00020 #   define PACK_STRUCT
+00021 #elif defined( __DMC__ )
+00022 #   pragma pack( push, 1 )
+00023 #   define PACK_STRUCT
+00024 #elif defined( __GNUC__ )
+00025     // Using pragma pack might work with earlier gcc versions already, but
+00026     // it started to be necessary with gcc 4.7 on mingw unless compiled with -mno-ms-bitfields.
+00027     // And I found some hints on the web that older gcc versions on the other hand had sometimes
+00028     // trouble with pragma pack while they worked with __attribute__((packed)).
+00029 #   if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7)
+00030 #       pragma pack( push, packing )
+00031 #       pragma pack( 1 )
+00032 #       define PACK_STRUCT
+00033 #   else
+00034 #       define PACK_STRUCT  __attribute__((packed))
+00035     #endif
+00036 #else
+00037 #   error compiler not supported
+00038 #endif
+00039 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irrunpack_8h.html b/src/others/irrlicht-1.8.1/doc/html/irrunpack_8h.html new file mode 100644 index 0000000..9476723 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irrunpack_8h.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: irrunpack.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrunpack.h File Reference
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/irrunpack_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/irrunpack_8h_source.html new file mode 100644 index 0000000..a16bfc2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/irrunpack_8h_source.html @@ -0,0 +1,140 @@ + + + + +Irrlicht 3D Engine: irrunpack.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irrunpack.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2007-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 // include this file to switch back to default alignment
+00006 // file belongs to irrpack.h, see there for more info
+00007 
+00008 // Default alignment
+00009 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+00010 #   pragma pack( pop, packing )
+00011 #elif defined (__DMC__)
+00012 #   pragma pack( pop )
+00013 #elif defined( __GNUC__ )
+00014 #   if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7)
+00015 #       pragma pack( pop, packing )
+00016 #   endif
+00017 #endif
+00018 
+00019 #undef PACK_STRUCT
+00020 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/jquery.js b/src/others/irrlicht-1.8.1/doc/html/jquery.js new file mode 100644 index 0000000..c052173 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/jquery.js @@ -0,0 +1,54 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) +{I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() +{G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* * jQuery UI Resizable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Resizables + * + * Depends: + * ui.core.js + */ +(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f
');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)) +{s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);; +/** + * jQuery.ScrollTo - Easy element scrolling using jQuery. + * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com + * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php). + * Date: 2/8/2008 + * @author Ariel Flesler + * @version 1.3.2 + */ +;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); + diff --git a/src/others/irrlicht-1.8.1/doc/html/line2d_8h.html b/src/others/irrlicht-1.8.1/doc/html/line2d_8h.html new file mode 100644 index 0000000..ca6e0f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/line2d_8h.html @@ -0,0 +1,147 @@ + + + + +Irrlicht 3D Engine: line2d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
line2d.h File Reference
+
+
+
#include "irrTypes.h"
+#include "vector2d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/line2d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/line2d_8h_source.html new file mode 100644 index 0000000..6c7e743 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/line2d_8h_source.html @@ -0,0 +1,363 @@ + + + + +Irrlicht 3D Engine: line2d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
line2d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_LINE_2D_H_INCLUDED__
+00006 #define __IRR_LINE_2D_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "vector2d.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015 
+00017 template <class T>
+00018 class line2d
+00019 {
+00020     public:
+00022         line2d() : start(0,0), end(1,1) {}
+00024         line2d(T xa, T ya, T xb, T yb) : start(xa, ya), end(xb, yb) {}
+00026         line2d(const vector2d<T>& start, const vector2d<T>& end) : start(start), end(end) {}
+00028         line2d(const line2d<T>& other) : start(other.start), end(other.end) {}
+00029 
+00030         // operators
+00031 
+00032         line2d<T> operator+(const vector2d<T>& point) const { return line2d<T>(start + point, end + point); }
+00033         line2d<T>& operator+=(const vector2d<T>& point) { start += point; end += point; return *this; }
+00034 
+00035         line2d<T> operator-(const vector2d<T>& point) const { return line2d<T>(start - point, end - point); }
+00036         line2d<T>& operator-=(const vector2d<T>& point) { start -= point; end -= point; return *this; }
+00037 
+00038         bool operator==(const line2d<T>& other) const
+00039         { return (start==other.start && end==other.end) || (end==other.start && start==other.end);}
+00040         bool operator!=(const line2d<T>& other) const
+00041         { return !(start==other.start && end==other.end) || (end==other.start && start==other.end);}
+00042 
+00043         // functions
+00045         void setLine(const T& xa, const T& ya, const T& xb, const T& yb){start.set(xa, ya); end.set(xb, yb);}
+00047         void setLine(const vector2d<T>& nstart, const vector2d<T>& nend){start.set(nstart); end.set(nend);}
+00049         void setLine(const line2d<T>& line){start.set(line.start); end.set(line.end);}
+00050 
+00052 
+00053         T getLength() const { return start.getDistanceFrom(end); }
+00054 
+00056 
+00057         T getLengthSQ() const { return start.getDistanceFromSQ(end); }
+00058 
+00060 
+00061         vector2d<T> getMiddle() const
+00062         {
+00063             return (start + end)/(T)2;
+00064         }
+00065 
+00067 
+00068         vector2d<T> getVector() const { return vector2d<T>(end.X - start.X, end.Y - start.Y); }
+00069 
+00071 
+00077         bool intersectWith(const line2d<T>& l, vector2d<T>& out, bool checkOnlySegments=true) const
+00078         {
+00079             // Uses the method given at:
+00080             // http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
+00081             const f32 commonDenominator = (f32)(l.end.Y - l.start.Y)*(end.X - start.X) -
+00082                                             (l.end.X - l.start.X)*(end.Y - start.Y);
+00083 
+00084             const f32 numeratorA = (f32)(l.end.X - l.start.X)*(start.Y - l.start.Y) -
+00085                                             (l.end.Y - l.start.Y)*(start.X -l.start.X);
+00086 
+00087             const f32 numeratorB = (f32)(end.X - start.X)*(start.Y - l.start.Y) -
+00088                                             (end.Y - start.Y)*(start.X -l.start.X);
+00089 
+00090             if(equals(commonDenominator, 0.f))
+00091             {
+00092                 // The lines are either coincident or parallel
+00093                 // if both numerators are 0, the lines are coincident
+00094                 if(equals(numeratorA, 0.f) && equals(numeratorB, 0.f))
+00095                 {
+00096                     // Try and find a common endpoint
+00097                     if(l.start == start || l.end == start)
+00098                         out = start;
+00099                     else if(l.end == end || l.start == end)
+00100                         out = end;
+00101                     // now check if the two segments are disjunct
+00102                     else if (l.start.X>start.X && l.end.X>start.X && l.start.X>end.X && l.end.X>end.X)
+00103                         return false;
+00104                     else if (l.start.Y>start.Y && l.end.Y>start.Y && l.start.Y>end.Y && l.end.Y>end.Y)
+00105                         return false;
+00106                     else if (l.start.X<start.X && l.end.X<start.X && l.start.X<end.X && l.end.X<end.X)
+00107                         return false;
+00108                     else if (l.start.Y<start.Y && l.end.Y<start.Y && l.start.Y<end.Y && l.end.Y<end.Y)
+00109                         return false;
+00110                     // else the lines are overlapping to some extent
+00111                     else
+00112                     {
+00113                         // find the points which are not contributing to the
+00114                         // common part
+00115                         vector2d<T> maxp;
+00116                         vector2d<T> minp;
+00117                         if ((start.X>l.start.X && start.X>l.end.X && start.X>end.X) || (start.Y>l.start.Y && start.Y>l.end.Y && start.Y>end.Y))
+00118                             maxp=start;
+00119                         else if ((end.X>l.start.X && end.X>l.end.X && end.X>start.X) || (end.Y>l.start.Y && end.Y>l.end.Y && end.Y>start.Y))
+00120                             maxp=end;
+00121                         else if ((l.start.X>start.X && l.start.X>l.end.X && l.start.X>end.X) || (l.start.Y>start.Y && l.start.Y>l.end.Y && l.start.Y>end.Y))
+00122                             maxp=l.start;
+00123                         else
+00124                             maxp=l.end;
+00125                         if (maxp != start && ((start.X<l.start.X && start.X<l.end.X && start.X<end.X) || (start.Y<l.start.Y && start.Y<l.end.Y && start.Y<end.Y)))
+00126                             minp=start;
+00127                         else if (maxp != end && ((end.X<l.start.X && end.X<l.end.X && end.X<start.X) || (end.Y<l.start.Y && end.Y<l.end.Y && end.Y<start.Y)))
+00128                             minp=end;
+00129                         else if (maxp != l.start && ((l.start.X<start.X && l.start.X<l.end.X && l.start.X<end.X) || (l.start.Y<start.Y && l.start.Y<l.end.Y && l.start.Y<end.Y)))
+00130                             minp=l.start;
+00131                         else
+00132                             minp=l.end;
+00133 
+00134                         // one line is contained in the other. Pick the center
+00135                         // of the remaining points, which overlap for sure
+00136                         out = core::vector2d<T>();
+00137                         if (start != maxp && start != minp)
+00138                             out += start;
+00139                         if (end != maxp && end != minp)
+00140                             out += end;
+00141                         if (l.start != maxp && l.start != minp)
+00142                             out += l.start;
+00143                         if (l.end != maxp && l.end != minp)
+00144                             out += l.end;
+00145                         out.X = (T)(out.X/2);
+00146                         out.Y = (T)(out.Y/2);
+00147                     }
+00148 
+00149                     return true; // coincident
+00150                 }
+00151 
+00152                 return false; // parallel
+00153             }
+00154 
+00155             // Get the point of intersection on this line, checking that
+00156             // it is within the line segment.
+00157             const f32 uA = numeratorA / commonDenominator;
+00158             if(checkOnlySegments && (uA < 0.f || uA > 1.f) )
+00159                 return false; // Outside the line segment
+00160 
+00161             const f32 uB = numeratorB / commonDenominator;
+00162             if(checkOnlySegments && (uB < 0.f || uB > 1.f))
+00163                 return false; // Outside the line segment
+00164 
+00165             // Calculate the intersection point.
+00166             out.X = (T)(start.X + uA * (end.X - start.X));
+00167             out.Y = (T)(start.Y + uA * (end.Y - start.Y));
+00168             return true;
+00169         }
+00170 
+00172 
+00173         vector2d<T> getUnitVector() const
+00174         {
+00175             T len = (T)(1.0 / getLength());
+00176             return vector2d<T>((end.X - start.X) * len, (end.Y - start.Y) * len);
+00177         }
+00178 
+00180 
+00182         f64 getAngleWith(const line2d<T>& l) const
+00183         {
+00184             vector2d<T> vect = getVector();
+00185             vector2d<T> vect2 = l.getVector();
+00186             return vect.getAngleWith(vect2);
+00187         }
+00188 
+00190 
+00192         T getPointOrientation(const vector2d<T>& point) const
+00193         {
+00194             return ( (end.X - start.X) * (point.Y - start.Y) -
+00195                     (point.X - start.X) * (end.Y - start.Y) );
+00196         }
+00197 
+00199 
+00200         bool isPointOnLine(const vector2d<T>& point) const
+00201         {
+00202             T d = getPointOrientation(point);
+00203             return (d == 0 && point.isBetweenPoints(start, end));
+00204         }
+00205 
+00207 
+00208         bool isPointBetweenStartAndEnd(const vector2d<T>& point) const
+00209         {
+00210             return point.isBetweenPoints(start, end);
+00211         }
+00212 
+00214 
+00216         vector2d<T> getClosestPoint(const vector2d<T>& point, bool checkOnlySegments=true) const
+00217         {
+00218             vector2d<f64> c((f64)(point.X-start.X), (f64)(point.Y- start.Y));
+00219             vector2d<f64> v((f64)(end.X-start.X), (f64)(end.Y-start.Y));
+00220             f64 d = v.getLength();
+00221             if ( d == 0 )   // can't tell much when the line is just a single point
+00222                 return start;
+00223             v /= d;
+00224             f64 t = v.dotProduct(c);
+00225 
+00226             if ( checkOnlySegments )
+00227             {
+00228                 if (t < 0) return vector2d<T>((T)start.X, (T)start.Y);
+00229                 if (t > d) return vector2d<T>((T)end.X, (T)end.Y);
+00230             }
+00231 
+00232             v *= t;
+00233             return vector2d<T>((T)(start.X + v.X), (T)(start.Y + v.Y));
+00234         }
+00235 
+00237         vector2d<T> start;
+00239         vector2d<T> end;
+00240 };
+00241 
+00242     // partial specialization to optimize <f32> lines (avoiding casts)
+00243     template <>
+00244     inline vector2df line2d<irr::f32>::getClosestPoint(const vector2df& point, bool checkOnlySegments) const
+00245     {
+00246         vector2df c = point - start;
+00247         vector2df v = end - start;
+00248         f32 d = (f32)v.getLength();
+00249         if ( d == 0 )   // can't tell much when the line is just a single point
+00250             return start;
+00251         v /= d;
+00252         f32 t = v.dotProduct(c);
+00253 
+00254         if ( checkOnlySegments )
+00255         {
+00256             if (t < 0) return start;
+00257             if (t > d) return end;
+00258         }
+00259 
+00260         v *= t;
+00261         return start + v;
+00262     }
+00263 
+00264 
+00266     typedef line2d<f32> line2df;
+00268     typedef line2d<s32> line2di;
+00269 
+00270 } // end namespace core
+00271 } // end namespace irr
+00272 
+00273 #endif
+00274 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/line3d_8h.html b/src/others/irrlicht-1.8.1/doc/html/line3d_8h.html new file mode 100644 index 0000000..f9ac835 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/line3d_8h.html @@ -0,0 +1,147 @@ + + + + +Irrlicht 3D Engine: line3d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
line3d.h File Reference
+
+
+
#include "irrTypes.h"
+#include "vector3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/line3d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/line3d_8h_source.html new file mode 100644 index 0000000..0bac450 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/line3d_8h_source.html @@ -0,0 +1,237 @@ + + + + +Irrlicht 3D Engine: line3d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
line3d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_LINE_3D_H_INCLUDED__
+00006 #define __IRR_LINE_3D_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "vector3d.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015 
+00017 template <class T>
+00018 class line3d
+00019 {
+00020     public:
+00021 
+00023 
+00024         line3d() : start(0,0,0), end(1,1,1) {}
+00026         line3d(T xa, T ya, T za, T xb, T yb, T zb) : start(xa, ya, za), end(xb, yb, zb) {}
+00028         line3d(const vector3d<T>& start, const vector3d<T>& end) : start(start), end(end) {}
+00029 
+00030         // operators
+00031 
+00032         line3d<T> operator+(const vector3d<T>& point) const { return line3d<T>(start + point, end + point); }
+00033         line3d<T>& operator+=(const vector3d<T>& point) { start += point; end += point; return *this; }
+00034 
+00035         line3d<T> operator-(const vector3d<T>& point) const { return line3d<T>(start - point, end - point); }
+00036         line3d<T>& operator-=(const vector3d<T>& point) { start -= point; end -= point; return *this; }
+00037 
+00038         bool operator==(const line3d<T>& other) const
+00039         { return (start==other.start && end==other.end) || (end==other.start && start==other.end);}
+00040         bool operator!=(const line3d<T>& other) const
+00041         { return !(start==other.start && end==other.end) || (end==other.start && start==other.end);}
+00042 
+00043         // functions
+00045         void setLine(const T& xa, const T& ya, const T& za, const T& xb, const T& yb, const T& zb)
+00046         {start.set(xa, ya, za); end.set(xb, yb, zb);}
+00048         void setLine(const vector3d<T>& nstart, const vector3d<T>& nend)
+00049         {start.set(nstart); end.set(nend);}
+00051         void setLine(const line3d<T>& line)
+00052         {start.set(line.start); end.set(line.end);}
+00053 
+00055 
+00056         T getLength() const { return start.getDistanceFrom(end); }
+00057 
+00059 
+00060         T getLengthSQ() const { return start.getDistanceFromSQ(end); }
+00061 
+00063 
+00064         vector3d<T> getMiddle() const
+00065         {
+00066             return (start + end)/(T)2;
+00067         }
+00068 
+00070 
+00071         vector3d<T> getVector() const
+00072         {
+00073             return end - start;
+00074         }
+00075 
+00077 
+00081         bool isPointBetweenStartAndEnd(const vector3d<T>& point) const
+00082         {
+00083             return point.isBetweenPoints(start, end);
+00084         }
+00085 
+00087 
+00089         vector3d<T> getClosestPoint(const vector3d<T>& point) const
+00090         {
+00091             vector3d<T> c = point - start;
+00092             vector3d<T> v = end - start;
+00093             T d = (T)v.getLength();
+00094             v /= d;
+00095             T t = v.dotProduct(c);
+00096 
+00097             if (t < (T)0.0)
+00098                 return start;
+00099             if (t > d)
+00100                 return end;
+00101 
+00102             v *= t;
+00103             return start + v;
+00104         }
+00105 
+00107 
+00113         bool getIntersectionWithSphere(vector3d<T> sorigin, T sradius, f64& outdistance) const
+00114         {
+00115             const vector3d<T> q = sorigin - start;
+00116             T c = q.getLength();
+00117             T v = q.dotProduct(getVector().normalize());
+00118             T d = sradius * sradius - (c*c - v*v);
+00119 
+00120             if (d < 0.0)
+00121                 return false;
+00122 
+00123             outdistance = v - core::squareroot ( d );
+00124             return true;
+00125         }
+00126 
+00127         // member variables
+00128 
+00130         vector3d<T> start;
+00132         vector3d<T> end;
+00133 };
+00134 
+00136     typedef line3d<f32> line3df;
+00138     typedef line3d<s32> line3di;
+00139 
+00140 } // end namespace core
+00141 } // end namespace irr
+00142 
+00143 #endif
+00144 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/logobig.png b/src/others/irrlicht-1.8.1/doc/html/logobig.png new file mode 100644 index 0000000..2505ecd Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/logobig.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/matrix4_8h.html b/src/others/irrlicht-1.8.1/doc/html/matrix4_8h.html new file mode 100644 index 0000000..68ff15e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/matrix4_8h.html @@ -0,0 +1,163 @@ + + + + +Irrlicht 3D Engine: matrix4.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
matrix4.h File Reference
+
+
+
#include "irrMath.h"
+#include "vector3d.h"
+#include "vector2d.h"
+#include "plane3d.h"
+#include "aabbox3d.h"
+#include "rect.h"
+#include "irrString.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +

+Functions

+
    +
  • template<class T > CMatrix4< T > irr::core::operator* (const T scalar, const CMatrix4< T > &mat) +
+

+Variables

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/matrix4_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/matrix4_8h_source.html new file mode 100644 index 0000000..c41bf13 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/matrix4_8h_source.html @@ -0,0 +1,2179 @@ + + + + +Irrlicht 3D Engine: matrix4.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
matrix4.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_MATRIX_H_INCLUDED__
+00006 #define __IRR_MATRIX_H_INCLUDED__
+00007 
+00008 #include "irrMath.h"
+00009 #include "vector3d.h"
+00010 #include "vector2d.h"
+00011 #include "plane3d.h"
+00012 #include "aabbox3d.h"
+00013 #include "rect.h"
+00014 #include "irrString.h"
+00015 
+00016 // enable this to keep track of changes to the matrix
+00017 // and make simpler identity check for seldomly changing matrices
+00018 // otherwise identity check will always compare the elements
+00019 //#define USE_MATRIX_TEST
+00020 
+00021 // this is only for debugging purposes
+00022 //#define USE_MATRIX_TEST_DEBUG
+00023 
+00024 #if defined( USE_MATRIX_TEST_DEBUG )
+00025 
+00026 struct MatrixTest
+00027 {
+00028     MatrixTest () : ID(0), Calls(0) {}
+00029     char buf[256];
+00030     int Calls;
+00031     int ID;
+00032 };
+00033 static MatrixTest MTest;
+00034 
+00035 #endif
+00036 
+00037 namespace irr
+00038 {
+00039 namespace core
+00040 {
+00041 
+00043 
+00044     template <class T>
+00045     class CMatrix4
+00046     {
+00047         public:
+00048 
+00050             enum eConstructor
+00051             {
+00052                 EM4CONST_NOTHING = 0,
+00053                 EM4CONST_COPY,
+00054                 EM4CONST_IDENTITY,
+00055                 EM4CONST_TRANSPOSED,
+00056                 EM4CONST_INVERSE,
+00057                 EM4CONST_INVERSE_TRANSPOSED
+00058             };
+00059 
+00061 
+00062             CMatrix4( eConstructor constructor = EM4CONST_IDENTITY );
+00064 
+00066             CMatrix4(const CMatrix4<T>& other, eConstructor constructor = EM4CONST_COPY);
+00067 
+00069             T& operator()(const s32 row, const s32 col)
+00070             {
+00071 #if defined ( USE_MATRIX_TEST )
+00072                 definitelyIdentityMatrix=false;
+00073 #endif
+00074                 return M[ row * 4 + col ];
+00075             }
+00076 
+00078             const T& operator()(const s32 row, const s32 col) const { return M[row * 4 + col]; }
+00079 
+00081             T& operator[](u32 index)
+00082             {
+00083 #if defined ( USE_MATRIX_TEST )
+00084                 definitelyIdentityMatrix=false;
+00085 #endif
+00086                 return M[index];
+00087             }
+00088 
+00090             const T& operator[](u32 index) const { return M[index]; }
+00091 
+00093             inline CMatrix4<T>& operator=(const CMatrix4<T> &other);
+00094 
+00096             inline CMatrix4<T>& operator=(const T& scalar);
+00097 
+00099             const T* pointer() const { return M; }
+00100             T* pointer()
+00101             {
+00102 #if defined ( USE_MATRIX_TEST )
+00103                 definitelyIdentityMatrix=false;
+00104 #endif
+00105                 return M;
+00106             }
+00107 
+00109             bool operator==(const CMatrix4<T> &other) const;
+00110 
+00112             bool operator!=(const CMatrix4<T> &other) const;
+00113 
+00115             CMatrix4<T> operator+(const CMatrix4<T>& other) const;
+00116 
+00118             CMatrix4<T>& operator+=(const CMatrix4<T>& other);
+00119 
+00121             CMatrix4<T> operator-(const CMatrix4<T>& other) const;
+00122 
+00124             CMatrix4<T>& operator-=(const CMatrix4<T>& other);
+00125 
+00127 
+00128             inline CMatrix4<T>& setbyproduct(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b );
+00129 
+00131 
+00133             CMatrix4<T>& setbyproduct_nocheck(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b );
+00134 
+00136 
+00137             CMatrix4<T> operator*(const CMatrix4<T>& other) const;
+00138 
+00140 
+00141             CMatrix4<T>& operator*=(const CMatrix4<T>& other);
+00142 
+00144             CMatrix4<T> operator*(const T& scalar) const;
+00145 
+00147             CMatrix4<T>& operator*=(const T& scalar);
+00148 
+00150             inline CMatrix4<T>& makeIdentity();
+00151 
+00153             inline bool isIdentity() const;
+00154 
+00156             inline bool isOrthogonal() const;
+00157 
+00159             bool isIdentity_integer_base () const;
+00160 
+00162             CMatrix4<T>& setTranslation( const vector3d<T>& translation );
+00163 
+00165             vector3d<T> getTranslation() const;
+00166 
+00168             CMatrix4<T>& setInverseTranslation( const vector3d<T>& translation );
+00169 
+00171             inline CMatrix4<T>& setRotationRadians( const vector3d<T>& rotation );
+00172 
+00174             CMatrix4<T>& setRotationDegrees( const vector3d<T>& rotation );
+00175 
+00177 
+00178             core::vector3d<T> getRotationDegrees() const;
+00179 
+00181 
+00182             inline CMatrix4<T>& setInverseRotationRadians( const vector3d<T>& rotation );
+00183 
+00185 
+00186             inline CMatrix4<T>& setInverseRotationDegrees( const vector3d<T>& rotation );
+00187 
+00189 
+00190             inline CMatrix4<T>& setRotationAxisRadians(const T& angle, const vector3d<T>& axis);
+00191 
+00193             CMatrix4<T>& setScale( const vector3d<T>& scale );
+00194 
+00196             CMatrix4<T>& setScale( const T scale ) { return setScale(core::vector3d<T>(scale,scale,scale)); }
+00197 
+00199             core::vector3d<T> getScale() const;
+00200 
+00202             void inverseTranslateVect( vector3df& vect ) const;
+00203 
+00205             void inverseRotateVect( vector3df& vect ) const;
+00206 
+00208             void rotateVect( vector3df& vect ) const;
+00209 
+00211             void rotateVect(core::vector3df& out, const core::vector3df& in) const;
+00212 
+00214             void rotateVect(T *out,const core::vector3df &in) const;
+00215 
+00217             void transformVect( vector3df& vect) const;
+00218 
+00220             void transformVect( vector3df& out, const vector3df& in ) const;
+00221 
+00223             void transformVect(T *out,const core::vector3df &in) const;
+00224 
+00226             void transformVec3(T *out, const T * in) const;
+00227 
+00229             void translateVect( vector3df& vect ) const;
+00230 
+00232             void transformPlane( core::plane3d<f32> &plane) const;
+00233 
+00235             void transformPlane( const core::plane3d<f32> &in, core::plane3d<f32> &out) const;
+00236 
+00238 
+00240             void transformBox(core::aabbox3d<f32>& box) const;
+00241 
+00243 
+00245             void transformBoxEx(core::aabbox3d<f32>& box) const;
+00246 
+00248             void multiplyWith1x4Matrix(T* matrix) const;
+00249 
+00251 
+00252             bool makeInverse();
+00253 
+00254 
+00256 
+00257             bool getInversePrimitive ( CMatrix4<T>& out ) const;
+00258 
+00260 
+00262             bool getInverse(CMatrix4<T>& out) const;
+00263 
+00265             CMatrix4<T>& buildProjectionMatrixPerspectiveFovRH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar);
+00266 
+00268             CMatrix4<T>& buildProjectionMatrixPerspectiveFovLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar);
+00269 
+00271             CMatrix4<T>& buildProjectionMatrixPerspectiveFovInfinityLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon=0);
+00272 
+00274             CMatrix4<T>& buildProjectionMatrixPerspectiveRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
+00275 
+00277             CMatrix4<T>& buildProjectionMatrixPerspectiveLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
+00278 
+00280             CMatrix4<T>& buildProjectionMatrixOrthoLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
+00281 
+00283             CMatrix4<T>& buildProjectionMatrixOrthoRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar);
+00284 
+00286             CMatrix4<T>& buildCameraLookAtMatrixLH(
+00287                     const vector3df& position,
+00288                     const vector3df& target,
+00289                     const vector3df& upVector);
+00290 
+00292             CMatrix4<T>& buildCameraLookAtMatrixRH(
+00293                     const vector3df& position,
+00294                     const vector3df& target,
+00295                     const vector3df& upVector);
+00296 
+00298 
+00302             CMatrix4<T>& buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point=1.0f);
+00303 
+00305 
+00306             CMatrix4<T>& buildNDCToDCMatrix( const core::rect<s32>& area, f32 zScale);
+00307 
+00309 
+00311             CMatrix4<T> interpolate(const core::CMatrix4<T>& b, f32 time) const;
+00312 
+00314             CMatrix4<T> getTransposed() const;
+00315 
+00317             inline void getTransposed( CMatrix4<T>& dest ) const;
+00318 
+00320 
+00323             CMatrix4<T>& buildRotateFromTo(const core::vector3df& from, const core::vector3df& to);
+00324 
+00326 
+00329             void setRotationCenter(const core::vector3df& center, const core::vector3df& translate);
+00330 
+00332 
+00338             void buildAxisAlignedBillboard(const core::vector3df& camPos,
+00339                         const core::vector3df& center,
+00340                         const core::vector3df& translation,
+00341                         const core::vector3df& axis,
+00342                         const core::vector3df& from);
+00343 
+00344             /*
+00345                 construct 2D Texture transformations
+00346                 rotate about center, scale, and transform.
+00347             */
+00349             CMatrix4<T>& buildTextureTransform( f32 rotateRad,
+00350                     const core::vector2df &rotatecenter,
+00351                     const core::vector2df &translate,
+00352                     const core::vector2df &scale);
+00353 
+00355 
+00359             CMatrix4<T>& setTextureRotationCenter( f32 radAngle );
+00360 
+00362 
+00366             CMatrix4<T>& setTextureTranslate( f32 x, f32 y );
+00367 
+00369 
+00373             CMatrix4<T>& setTextureTranslateTransposed( f32 x, f32 y );
+00374 
+00376 
+00380             CMatrix4<T>& setTextureScale( f32 sx, f32 sy );
+00381 
+00383 
+00387             CMatrix4<T>& setTextureScaleCenter( f32 sx, f32 sy );
+00388 
+00390             CMatrix4<T>& setM(const T* data);
+00391 
+00393             void setDefinitelyIdentityMatrix( bool isDefinitelyIdentityMatrix);
+00394 
+00396             bool getDefinitelyIdentityMatrix() const;
+00397 
+00399             bool equals(const core::CMatrix4<T>& other, const T tolerance=(T)ROUNDING_ERROR_f64) const;
+00400 
+00401         private:
+00403             T M[16];
+00404 #if defined ( USE_MATRIX_TEST )
+00405 
+00406             mutable u32 definitelyIdentityMatrix;
+00407 #endif
+00408 #if defined ( USE_MATRIX_TEST_DEBUG )
+00409             u32 id;
+00410             mutable u32 calls;
+00411 #endif
+00412 
+00413     };
+00414 
+00415     // Default constructor
+00416     template <class T>
+00417     inline CMatrix4<T>::CMatrix4( eConstructor constructor )
+00418 #if defined ( USE_MATRIX_TEST )
+00419         : definitelyIdentityMatrix(BIT_UNTESTED)
+00420 #endif
+00421 #if defined ( USE_MATRIX_TEST_DEBUG )
+00422         ,id ( MTest.ID++), calls ( 0 )
+00423 #endif
+00424     {
+00425         switch ( constructor )
+00426         {
+00427             case EM4CONST_NOTHING:
+00428             case EM4CONST_COPY:
+00429                 break;
+00430             case EM4CONST_IDENTITY:
+00431             case EM4CONST_INVERSE:
+00432             default:
+00433                 makeIdentity();
+00434                 break;
+00435         }
+00436     }
+00437 
+00438     // Copy constructor
+00439     template <class T>
+00440     inline CMatrix4<T>::CMatrix4( const CMatrix4<T>& other, eConstructor constructor)
+00441 #if defined ( USE_MATRIX_TEST )
+00442         : definitelyIdentityMatrix(BIT_UNTESTED)
+00443 #endif
+00444 #if defined ( USE_MATRIX_TEST_DEBUG )
+00445         ,id ( MTest.ID++), calls ( 0 )
+00446 #endif
+00447     {
+00448         switch ( constructor )
+00449         {
+00450             case EM4CONST_IDENTITY:
+00451                 makeIdentity();
+00452                 break;
+00453             case EM4CONST_NOTHING:
+00454                 break;
+00455             case EM4CONST_COPY:
+00456                 *this = other;
+00457                 break;
+00458             case EM4CONST_TRANSPOSED:
+00459                 other.getTransposed(*this);
+00460                 break;
+00461             case EM4CONST_INVERSE:
+00462                 if (!other.getInverse(*this))
+00463                     memset(M, 0, 16*sizeof(T));
+00464                 break;
+00465             case EM4CONST_INVERSE_TRANSPOSED:
+00466                 if (!other.getInverse(*this))
+00467                     memset(M, 0, 16*sizeof(T));
+00468                 else
+00469                     *this=getTransposed();
+00470                 break;
+00471         }
+00472     }
+00473 
+00475     template <class T>
+00476     inline CMatrix4<T> CMatrix4<T>::operator+(const CMatrix4<T>& other) const
+00477     {
+00478         CMatrix4<T> temp ( EM4CONST_NOTHING );
+00479 
+00480         temp[0] = M[0]+other[0];
+00481         temp[1] = M[1]+other[1];
+00482         temp[2] = M[2]+other[2];
+00483         temp[3] = M[3]+other[3];
+00484         temp[4] = M[4]+other[4];
+00485         temp[5] = M[5]+other[5];
+00486         temp[6] = M[6]+other[6];
+00487         temp[7] = M[7]+other[7];
+00488         temp[8] = M[8]+other[8];
+00489         temp[9] = M[9]+other[9];
+00490         temp[10] = M[10]+other[10];
+00491         temp[11] = M[11]+other[11];
+00492         temp[12] = M[12]+other[12];
+00493         temp[13] = M[13]+other[13];
+00494         temp[14] = M[14]+other[14];
+00495         temp[15] = M[15]+other[15];
+00496 
+00497         return temp;
+00498     }
+00499 
+00501     template <class T>
+00502     inline CMatrix4<T>& CMatrix4<T>::operator+=(const CMatrix4<T>& other)
+00503     {
+00504         M[0]+=other[0];
+00505         M[1]+=other[1];
+00506         M[2]+=other[2];
+00507         M[3]+=other[3];
+00508         M[4]+=other[4];
+00509         M[5]+=other[5];
+00510         M[6]+=other[6];
+00511         M[7]+=other[7];
+00512         M[8]+=other[8];
+00513         M[9]+=other[9];
+00514         M[10]+=other[10];
+00515         M[11]+=other[11];
+00516         M[12]+=other[12];
+00517         M[13]+=other[13];
+00518         M[14]+=other[14];
+00519         M[15]+=other[15];
+00520 
+00521         return *this;
+00522     }
+00523 
+00525     template <class T>
+00526     inline CMatrix4<T> CMatrix4<T>::operator-(const CMatrix4<T>& other) const
+00527     {
+00528         CMatrix4<T> temp ( EM4CONST_NOTHING );
+00529 
+00530         temp[0] = M[0]-other[0];
+00531         temp[1] = M[1]-other[1];
+00532         temp[2] = M[2]-other[2];
+00533         temp[3] = M[3]-other[3];
+00534         temp[4] = M[4]-other[4];
+00535         temp[5] = M[5]-other[5];
+00536         temp[6] = M[6]-other[6];
+00537         temp[7] = M[7]-other[7];
+00538         temp[8] = M[8]-other[8];
+00539         temp[9] = M[9]-other[9];
+00540         temp[10] = M[10]-other[10];
+00541         temp[11] = M[11]-other[11];
+00542         temp[12] = M[12]-other[12];
+00543         temp[13] = M[13]-other[13];
+00544         temp[14] = M[14]-other[14];
+00545         temp[15] = M[15]-other[15];
+00546 
+00547         return temp;
+00548     }
+00549 
+00551     template <class T>
+00552     inline CMatrix4<T>& CMatrix4<T>::operator-=(const CMatrix4<T>& other)
+00553     {
+00554         M[0]-=other[0];
+00555         M[1]-=other[1];
+00556         M[2]-=other[2];
+00557         M[3]-=other[3];
+00558         M[4]-=other[4];
+00559         M[5]-=other[5];
+00560         M[6]-=other[6];
+00561         M[7]-=other[7];
+00562         M[8]-=other[8];
+00563         M[9]-=other[9];
+00564         M[10]-=other[10];
+00565         M[11]-=other[11];
+00566         M[12]-=other[12];
+00567         M[13]-=other[13];
+00568         M[14]-=other[14];
+00569         M[15]-=other[15];
+00570 
+00571         return *this;
+00572     }
+00573 
+00575     template <class T>
+00576     inline CMatrix4<T> CMatrix4<T>::operator*(const T& scalar) const
+00577     {
+00578         CMatrix4<T> temp ( EM4CONST_NOTHING );
+00579 
+00580         temp[0] = M[0]*scalar;
+00581         temp[1] = M[1]*scalar;
+00582         temp[2] = M[2]*scalar;
+00583         temp[3] = M[3]*scalar;
+00584         temp[4] = M[4]*scalar;
+00585         temp[5] = M[5]*scalar;
+00586         temp[6] = M[6]*scalar;
+00587         temp[7] = M[7]*scalar;
+00588         temp[8] = M[8]*scalar;
+00589         temp[9] = M[9]*scalar;
+00590         temp[10] = M[10]*scalar;
+00591         temp[11] = M[11]*scalar;
+00592         temp[12] = M[12]*scalar;
+00593         temp[13] = M[13]*scalar;
+00594         temp[14] = M[14]*scalar;
+00595         temp[15] = M[15]*scalar;
+00596 
+00597         return temp;
+00598     }
+00599 
+00601     template <class T>
+00602     inline CMatrix4<T>& CMatrix4<T>::operator*=(const T& scalar)
+00603     {
+00604         M[0]*=scalar;
+00605         M[1]*=scalar;
+00606         M[2]*=scalar;
+00607         M[3]*=scalar;
+00608         M[4]*=scalar;
+00609         M[5]*=scalar;
+00610         M[6]*=scalar;
+00611         M[7]*=scalar;
+00612         M[8]*=scalar;
+00613         M[9]*=scalar;
+00614         M[10]*=scalar;
+00615         M[11]*=scalar;
+00616         M[12]*=scalar;
+00617         M[13]*=scalar;
+00618         M[14]*=scalar;
+00619         M[15]*=scalar;
+00620 
+00621         return *this;
+00622     }
+00623 
+00625     template <class T>
+00626     inline CMatrix4<T>& CMatrix4<T>::operator*=(const CMatrix4<T>& other)
+00627     {
+00628 #if defined ( USE_MATRIX_TEST )
+00629         // do checks on your own in order to avoid copy creation
+00630         if ( !other.isIdentity() )
+00631         {
+00632             if ( this->isIdentity() )
+00633             {
+00634                 return (*this = other);
+00635             }
+00636             else
+00637             {
+00638                 CMatrix4<T> temp ( *this );
+00639                 return setbyproduct_nocheck( temp, other );
+00640             }
+00641         }
+00642         return *this;
+00643 #else
+00644         CMatrix4<T> temp ( *this );
+00645         return setbyproduct_nocheck( temp, other );
+00646 #endif
+00647     }
+00648 
+00650     // set this matrix to the product of two other matrices
+00651     // goal is to reduce stack use and copy
+00652     template <class T>
+00653     inline CMatrix4<T>& CMatrix4<T>::setbyproduct_nocheck(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b )
+00654     {
+00655         const T *m1 = other_a.M;
+00656         const T *m2 = other_b.M;
+00657 
+00658         M[0] = m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3];
+00659         M[1] = m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3];
+00660         M[2] = m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3];
+00661         M[3] = m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3];
+00662 
+00663         M[4] = m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7];
+00664         M[5] = m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7];
+00665         M[6] = m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7];
+00666         M[7] = m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7];
+00667 
+00668         M[8] = m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11];
+00669         M[9] = m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11];
+00670         M[10] = m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11];
+00671         M[11] = m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11];
+00672 
+00673         M[12] = m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15];
+00674         M[13] = m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15];
+00675         M[14] = m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15];
+00676         M[15] = m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15];
+00677 #if defined ( USE_MATRIX_TEST )
+00678         definitelyIdentityMatrix=false;
+00679 #endif
+00680         return *this;
+00681     }
+00682 
+00683 
+00685     // set this matrix to the product of two other matrices
+00686     // goal is to reduce stack use and copy
+00687     template <class T>
+00688     inline CMatrix4<T>& CMatrix4<T>::setbyproduct(const CMatrix4<T>& other_a, const CMatrix4<T>& other_b )
+00689     {
+00690 #if defined ( USE_MATRIX_TEST )
+00691         if ( other_a.isIdentity () )
+00692             return (*this = other_b);
+00693         else
+00694         if ( other_b.isIdentity () )
+00695             return (*this = other_a);
+00696         else
+00697             return setbyproduct_nocheck(other_a,other_b);
+00698 #else
+00699         return setbyproduct_nocheck(other_a,other_b);
+00700 #endif
+00701     }
+00702 
+00704     template <class T>
+00705     inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
+00706     {
+00707 #if defined ( USE_MATRIX_TEST )
+00708         // Testing purpose..
+00709         if ( this->isIdentity() )
+00710             return m2;
+00711         if ( m2.isIdentity() )
+00712             return *this;
+00713 #endif
+00714 
+00715         CMatrix4<T> m3 ( EM4CONST_NOTHING );
+00716 
+00717         const T *m1 = M;
+00718 
+00719         m3[0] = m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3];
+00720         m3[1] = m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3];
+00721         m3[2] = m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3];
+00722         m3[3] = m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3];
+00723 
+00724         m3[4] = m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7];
+00725         m3[5] = m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7];
+00726         m3[6] = m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7];
+00727         m3[7] = m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7];
+00728 
+00729         m3[8] = m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11];
+00730         m3[9] = m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11];
+00731         m3[10] = m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11];
+00732         m3[11] = m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11];
+00733 
+00734         m3[12] = m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15];
+00735         m3[13] = m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15];
+00736         m3[14] = m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15];
+00737         m3[15] = m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15];
+00738         return m3;
+00739     }
+00740 
+00741 
+00742 
+00743     template <class T>
+00744     inline vector3d<T> CMatrix4<T>::getTranslation() const
+00745     {
+00746         return vector3d<T>(M[12], M[13], M[14]);
+00747     }
+00748 
+00749 
+00750     template <class T>
+00751     inline CMatrix4<T>& CMatrix4<T>::setTranslation( const vector3d<T>& translation )
+00752     {
+00753         M[12] = translation.X;
+00754         M[13] = translation.Y;
+00755         M[14] = translation.Z;
+00756 #if defined ( USE_MATRIX_TEST )
+00757         definitelyIdentityMatrix=false;
+00758 #endif
+00759         return *this;
+00760     }
+00761 
+00762     template <class T>
+00763     inline CMatrix4<T>& CMatrix4<T>::setInverseTranslation( const vector3d<T>& translation )
+00764     {
+00765         M[12] = -translation.X;
+00766         M[13] = -translation.Y;
+00767         M[14] = -translation.Z;
+00768 #if defined ( USE_MATRIX_TEST )
+00769         definitelyIdentityMatrix=false;
+00770 #endif
+00771         return *this;
+00772     }
+00773 
+00774     template <class T>
+00775     inline CMatrix4<T>& CMatrix4<T>::setScale( const vector3d<T>& scale )
+00776     {
+00777         M[0] = scale.X;
+00778         M[5] = scale.Y;
+00779         M[10] = scale.Z;
+00780 #if defined ( USE_MATRIX_TEST )
+00781         definitelyIdentityMatrix=false;
+00782 #endif
+00783         return *this;
+00784     }
+00785 
+00787 
+00794     template <class T>
+00795     inline vector3d<T> CMatrix4<T>::getScale() const
+00796     {
+00797         // See http://www.robertblum.com/articles/2005/02/14/decomposing-matrices
+00798 
+00799         // Deal with the 0 rotation case first
+00800         // Prior to Irrlicht 1.6, we always returned this value.
+00801         if(core::iszero(M[1]) && core::iszero(M[2]) &&
+00802             core::iszero(M[4]) && core::iszero(M[6]) &&
+00803             core::iszero(M[8]) && core::iszero(M[9]))
+00804             return vector3d<T>(M[0], M[5], M[10]);
+00805 
+00806         // We have to do the full calculation.
+00807         return vector3d<T>(sqrtf(M[0] * M[0] + M[1] * M[1] + M[2] * M[2]),
+00808                             sqrtf(M[4] * M[4] + M[5] * M[5] + M[6] * M[6]),
+00809                             sqrtf(M[8] * M[8] + M[9] * M[9] + M[10] * M[10]));
+00810     }
+00811 
+00812     template <class T>
+00813     inline CMatrix4<T>& CMatrix4<T>::setRotationDegrees( const vector3d<T>& rotation )
+00814     {
+00815         return setRotationRadians( rotation * core::DEGTORAD );
+00816     }
+00817 
+00818     template <class T>
+00819     inline CMatrix4<T>& CMatrix4<T>::setInverseRotationDegrees( const vector3d<T>& rotation )
+00820     {
+00821         return setInverseRotationRadians( rotation * core::DEGTORAD );
+00822     }
+00823 
+00824     template <class T>
+00825     inline CMatrix4<T>& CMatrix4<T>::setRotationRadians( const vector3d<T>& rotation )
+00826     {
+00827         const f64 cr = cos( rotation.X );
+00828         const f64 sr = sin( rotation.X );
+00829         const f64 cp = cos( rotation.Y );
+00830         const f64 sp = sin( rotation.Y );
+00831         const f64 cy = cos( rotation.Z );
+00832         const f64 sy = sin( rotation.Z );
+00833 
+00834         M[0] = (T)( cp*cy );
+00835         M[1] = (T)( cp*sy );
+00836         M[2] = (T)( -sp );
+00837 
+00838         const f64 srsp = sr*sp;
+00839         const f64 crsp = cr*sp;
+00840 
+00841         M[4] = (T)( srsp*cy-cr*sy );
+00842         M[5] = (T)( srsp*sy+cr*cy );
+00843         M[6] = (T)( sr*cp );
+00844 
+00845         M[8] = (T)( crsp*cy+sr*sy );
+00846         M[9] = (T)( crsp*sy-sr*cy );
+00847         M[10] = (T)( cr*cp );
+00848 #if defined ( USE_MATRIX_TEST )
+00849         definitelyIdentityMatrix=false;
+00850 #endif
+00851         return *this;
+00852     }
+00853 
+00854 
+00856 
+00859     template <class T>
+00860     inline core::vector3d<T> CMatrix4<T>::getRotationDegrees() const
+00861     {
+00862         const CMatrix4<T> &mat = *this;
+00863         core::vector3d<T> scale = getScale();
+00864         // we need to check for negative scale on to axes, which would bring up wrong results
+00865         if (scale.Y<0 && scale.Z<0)
+00866         {
+00867             scale.Y =-scale.Y;
+00868             scale.Z =-scale.Z;
+00869         }
+00870         else if (scale.X<0 && scale.Z<0)
+00871         {
+00872             scale.X =-scale.X;
+00873             scale.Z =-scale.Z;
+00874         }
+00875         else if (scale.X<0 && scale.Y<0)
+00876         {
+00877             scale.X =-scale.X;
+00878             scale.Y =-scale.Y;
+00879         }
+00880         const core::vector3d<f64> invScale(core::reciprocal(scale.X),core::reciprocal(scale.Y),core::reciprocal(scale.Z));
+00881 
+00882         f64 Y = -asin(core::clamp(mat[2]*invScale.X, -1.0, 1.0));
+00883         const f64 C = cos(Y);
+00884         Y *= RADTODEG64;
+00885 
+00886         f64 rotx, roty, X, Z;
+00887 
+00888         if (!core::iszero(C))
+00889         {
+00890             const f64 invC = core::reciprocal(C);
+00891             rotx = mat[10] * invC * invScale.Z;
+00892             roty = mat[6] * invC * invScale.Y;
+00893             X = atan2( roty, rotx ) * RADTODEG64;
+00894             rotx = mat[0] * invC * invScale.X;
+00895             roty = mat[1] * invC * invScale.X;
+00896             Z = atan2( roty, rotx ) * RADTODEG64;
+00897         }
+00898         else
+00899         {
+00900             X = 0.0;
+00901             rotx = mat[5] * invScale.Y;
+00902             roty = -mat[4] * invScale.Y;
+00903             Z = atan2( roty, rotx ) * RADTODEG64;
+00904         }
+00905 
+00906         // fix values that get below zero
+00907         if (X < 0.0) X += 360.0;
+00908         if (Y < 0.0) Y += 360.0;
+00909         if (Z < 0.0) Z += 360.0;
+00910 
+00911         return vector3d<T>((T)X,(T)Y,(T)Z);
+00912     }
+00913 
+00914 
+00916     template <class T>
+00917     inline CMatrix4<T>& CMatrix4<T>::setInverseRotationRadians( const vector3d<T>& rotation )
+00918     {
+00919         f64 cr = cos( rotation.X );
+00920         f64 sr = sin( rotation.X );
+00921         f64 cp = cos( rotation.Y );
+00922         f64 sp = sin( rotation.Y );
+00923         f64 cy = cos( rotation.Z );
+00924         f64 sy = sin( rotation.Z );
+00925 
+00926         M[0] = (T)( cp*cy );
+00927         M[4] = (T)( cp*sy );
+00928         M[8] = (T)( -sp );
+00929 
+00930         f64 srsp = sr*sp;
+00931         f64 crsp = cr*sp;
+00932 
+00933         M[1] = (T)( srsp*cy-cr*sy );
+00934         M[5] = (T)( srsp*sy+cr*cy );
+00935         M[9] = (T)( sr*cp );
+00936 
+00937         M[2] = (T)( crsp*cy+sr*sy );
+00938         M[6] = (T)( crsp*sy-sr*cy );
+00939         M[10] = (T)( cr*cp );
+00940 #if defined ( USE_MATRIX_TEST )
+00941         definitelyIdentityMatrix=false;
+00942 #endif
+00943         return *this;
+00944     }
+00945 
+00947     template <class T>
+00948     inline CMatrix4<T>& CMatrix4<T>::setRotationAxisRadians( const T& angle, const vector3d<T>& axis )
+00949     {
+00950         const f64 c = cos(angle);
+00951         const f64 s = sin(angle);
+00952         const f64 t = 1.0 - c;
+00953 
+00954         const f64 tx  = t * axis.X;
+00955         const f64 ty  = t * axis.Y;     
+00956         const f64 tz  = t * axis.Z;
+00957 
+00958         const f64 sx  = s * axis.X;
+00959         const f64 sy  = s * axis.Y;
+00960         const f64 sz  = s * axis.Z;
+00961         
+00962         M[0] = (T)(tx * axis.X + c);
+00963         M[1] = (T)(tx * axis.Y + sz);
+00964         M[2] = (T)(tx * axis.Z - sy);
+00965 
+00966         M[4] = (T)(ty * axis.X - sz);
+00967         M[5] = (T)(ty * axis.Y + c);
+00968         M[6] = (T)(ty * axis.Z + sx);
+00969 
+00970         M[8]  = (T)(tz * axis.X + sy);
+00971         M[9]  = (T)(tz * axis.Y - sx);
+00972         M[10] = (T)(tz * axis.Z + c);
+00973 
+00974 #if defined ( USE_MATRIX_TEST )
+00975         definitelyIdentityMatrix=false;
+00976 #endif
+00977         return *this;
+00978     }
+00979 
+00980 
+00983     template <class T>
+00984     inline CMatrix4<T>& CMatrix4<T>::makeIdentity()
+00985     {
+00986         memset(M, 0, 16*sizeof(T));
+00987         M[0] = M[5] = M[10] = M[15] = (T)1;
+00988 #if defined ( USE_MATRIX_TEST )
+00989         definitelyIdentityMatrix=true;
+00990 #endif
+00991         return *this;
+00992     }
+00993 
+00994 
+00995     /*
+00996         check identity with epsilon
+00997         solve floating range problems..
+00998     */
+00999     template <class T>
+01000     inline bool CMatrix4<T>::isIdentity() const
+01001     {
+01002 #if defined ( USE_MATRIX_TEST )
+01003         if (definitelyIdentityMatrix)
+01004             return true;
+01005 #endif
+01006         if (!core::equals( M[12], (T)0 ) || !core::equals( M[13], (T)0 ) || !core::equals( M[14], (T)0 ) || !core::equals( M[15], (T)1 ))
+01007             return false;
+01008 
+01009         if (!core::equals( M[ 0], (T)1 ) || !core::equals( M[ 1], (T)0 ) || !core::equals( M[ 2], (T)0 ) || !core::equals( M[ 3], (T)0 ))
+01010             return false;
+01011 
+01012         if (!core::equals( M[ 4], (T)0 ) || !core::equals( M[ 5], (T)1 ) || !core::equals( M[ 6], (T)0 ) || !core::equals( M[ 7], (T)0 ))
+01013             return false;
+01014 
+01015         if (!core::equals( M[ 8], (T)0 ) || !core::equals( M[ 9], (T)0 ) || !core::equals( M[10], (T)1 ) || !core::equals( M[11], (T)0 ))
+01016             return false;
+01017 /*
+01018         if (!core::equals( M[ 0], (T)1 ) ||
+01019             !core::equals( M[ 5], (T)1 ) ||
+01020             !core::equals( M[10], (T)1 ) ||
+01021             !core::equals( M[15], (T)1 ))
+01022             return false;
+01023 
+01024         for (s32 i=0; i<4; ++i)
+01025             for (s32 j=0; j<4; ++j)
+01026                 if ((j != i) && (!iszero((*this)(i,j))))
+01027                     return false;
+01028 */
+01029 #if defined ( USE_MATRIX_TEST )
+01030         definitelyIdentityMatrix=true;
+01031 #endif
+01032         return true;
+01033     }
+01034 
+01035 
+01036     /* Check orthogonality of matrix. */
+01037     template <class T>
+01038     inline bool CMatrix4<T>::isOrthogonal() const
+01039     {
+01040         T dp=M[0] * M[4 ] + M[1] * M[5 ] + M[2 ] * M[6 ] + M[3 ] * M[7 ];
+01041         if (!iszero(dp))
+01042             return false;
+01043         dp = M[0] * M[8 ] + M[1] * M[9 ] + M[2 ] * M[10] + M[3 ] * M[11];
+01044         if (!iszero(dp))
+01045             return false;
+01046         dp = M[0] * M[12] + M[1] * M[13] + M[2 ] * M[14] + M[3 ] * M[15];
+01047         if (!iszero(dp))
+01048             return false;
+01049         dp = M[4] * M[8 ] + M[5] * M[9 ] + M[6 ] * M[10] + M[7 ] * M[11];
+01050         if (!iszero(dp))
+01051             return false;
+01052         dp = M[4] * M[12] + M[5] * M[13] + M[6 ] * M[14] + M[7 ] * M[15];
+01053         if (!iszero(dp))
+01054             return false;
+01055         dp = M[8] * M[12] + M[9] * M[13] + M[10] * M[14] + M[11] * M[15];
+01056         return (iszero(dp));
+01057     }
+01058 
+01059 
+01060     /*
+01061         doesn't solve floating range problems..
+01062         but takes care on +/- 0 on translation because we are changing it..
+01063         reducing floating point branches
+01064         but it needs the floats in memory..
+01065     */
+01066     template <class T>
+01067     inline bool CMatrix4<T>::isIdentity_integer_base() const
+01068     {
+01069 #if defined ( USE_MATRIX_TEST )
+01070         if (definitelyIdentityMatrix)
+01071             return true;
+01072 #endif
+01073         if(IR(M[0])!=F32_VALUE_1)   return false;
+01074         if(IR(M[1])!=0)         return false;
+01075         if(IR(M[2])!=0)         return false;
+01076         if(IR(M[3])!=0)         return false;
+01077 
+01078         if(IR(M[4])!=0)         return false;
+01079         if(IR(M[5])!=F32_VALUE_1)   return false;
+01080         if(IR(M[6])!=0)         return false;
+01081         if(IR(M[7])!=0)         return false;
+01082 
+01083         if(IR(M[8])!=0)         return false;
+01084         if(IR(M[9])!=0)         return false;
+01085         if(IR(M[10])!=F32_VALUE_1)  return false;
+01086         if(IR(M[11])!=0)        return false;
+01087 
+01088         if(IR(M[12])!=0)        return false;
+01089         if(IR(M[13])!=0)        return false;
+01090         if(IR(M[13])!=0)        return false;
+01091         if(IR(M[15])!=F32_VALUE_1)  return false;
+01092 
+01093 #if defined ( USE_MATRIX_TEST )
+01094         definitelyIdentityMatrix=true;
+01095 #endif
+01096         return true;
+01097     }
+01098 
+01099 
+01100     template <class T>
+01101     inline void CMatrix4<T>::rotateVect( vector3df& vect ) const
+01102     {
+01103         vector3df tmp = vect;
+01104         vect.X = tmp.X*M[0] + tmp.Y*M[4] + tmp.Z*M[8];
+01105         vect.Y = tmp.X*M[1] + tmp.Y*M[5] + tmp.Z*M[9];
+01106         vect.Z = tmp.X*M[2] + tmp.Y*M[6] + tmp.Z*M[10];
+01107     }
+01108 
+01110     template <class T>
+01111     inline void CMatrix4<T>::rotateVect(core::vector3df& out, const core::vector3df& in) const
+01112     {
+01113         out.X = in.X*M[0] + in.Y*M[4] + in.Z*M[8];
+01114         out.Y = in.X*M[1] + in.Y*M[5] + in.Z*M[9];
+01115         out.Z = in.X*M[2] + in.Y*M[6] + in.Z*M[10];
+01116     }
+01117 
+01119     template <class T>
+01120     inline void CMatrix4<T>::rotateVect(T *out, const core::vector3df& in) const
+01121     {
+01122         out[0] = in.X*M[0] + in.Y*M[4] + in.Z*M[8];
+01123         out[1] = in.X*M[1] + in.Y*M[5] + in.Z*M[9];
+01124         out[2] = in.X*M[2] + in.Y*M[6] + in.Z*M[10];
+01125     }
+01126 
+01127     template <class T>
+01128     inline void CMatrix4<T>::inverseRotateVect( vector3df& vect ) const
+01129     {
+01130         vector3df tmp = vect;
+01131         vect.X = tmp.X*M[0] + tmp.Y*M[1] + tmp.Z*M[2];
+01132         vect.Y = tmp.X*M[4] + tmp.Y*M[5] + tmp.Z*M[6];
+01133         vect.Z = tmp.X*M[8] + tmp.Y*M[9] + tmp.Z*M[10];
+01134     }
+01135 
+01136     template <class T>
+01137     inline void CMatrix4<T>::transformVect( vector3df& vect) const
+01138     {
+01139         f32 vector[3];
+01140 
+01141         vector[0] = vect.X*M[0] + vect.Y*M[4] + vect.Z*M[8] + M[12];
+01142         vector[1] = vect.X*M[1] + vect.Y*M[5] + vect.Z*M[9] + M[13];
+01143         vector[2] = vect.X*M[2] + vect.Y*M[6] + vect.Z*M[10] + M[14];
+01144 
+01145         vect.X = vector[0];
+01146         vect.Y = vector[1];
+01147         vect.Z = vector[2];
+01148     }
+01149 
+01150     template <class T>
+01151     inline void CMatrix4<T>::transformVect( vector3df& out, const vector3df& in) const
+01152     {
+01153         out.X = in.X*M[0] + in.Y*M[4] + in.Z*M[8] + M[12];
+01154         out.Y = in.X*M[1] + in.Y*M[5] + in.Z*M[9] + M[13];
+01155         out.Z = in.X*M[2] + in.Y*M[6] + in.Z*M[10] + M[14];
+01156     }
+01157 
+01158 
+01159     template <class T>
+01160     inline void CMatrix4<T>::transformVect(T *out, const core::vector3df &in) const
+01161     {
+01162         out[0] = in.X*M[0] + in.Y*M[4] + in.Z*M[8] + M[12];
+01163         out[1] = in.X*M[1] + in.Y*M[5] + in.Z*M[9] + M[13];
+01164         out[2] = in.X*M[2] + in.Y*M[6] + in.Z*M[10] + M[14];
+01165         out[3] = in.X*M[3] + in.Y*M[7] + in.Z*M[11] + M[15];
+01166     }
+01167 
+01168     template <class T>
+01169     inline void CMatrix4<T>::transformVec3(T *out, const T * in) const
+01170     {
+01171         out[0] = in[0]*M[0] + in[1]*M[4] + in[2]*M[8] + M[12];
+01172         out[1] = in[0]*M[1] + in[1]*M[5] + in[2]*M[9] + M[13];
+01173         out[2] = in[0]*M[2] + in[1]*M[6] + in[2]*M[10] + M[14];
+01174     }
+01175 
+01176 
+01178     template <class T>
+01179     inline void CMatrix4<T>::transformPlane( core::plane3d<f32> &plane) const
+01180     {
+01181         vector3df member;
+01182         // Transform the plane member point, i.e. rotate, translate and scale it.
+01183         transformVect(member, plane.getMemberPoint());
+01184 
+01185         // Transform the normal by the transposed inverse of the matrix
+01186         CMatrix4<T> transposedInverse(*this, EM4CONST_INVERSE_TRANSPOSED);
+01187         vector3df normal = plane.Normal;
+01188         transposedInverse.transformVect(normal);
+01189 
+01190         plane.setPlane(member, normal);
+01191     }
+01192 
+01194     template <class T>
+01195     inline void CMatrix4<T>::transformPlane( const core::plane3d<f32> &in, core::plane3d<f32> &out) const
+01196     {
+01197         out = in;
+01198         transformPlane( out );
+01199     }
+01200 
+01202     template <class T>
+01203     inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
+01204     {
+01205 #if defined ( USE_MATRIX_TEST )
+01206         if (isIdentity())
+01207             return;
+01208 #endif
+01209 
+01210         transformVect(box.MinEdge);
+01211         transformVect(box.MaxEdge);
+01212         box.repair();
+01213     }
+01214 
+01216     template <class T>
+01217     inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
+01218     {
+01219 #if defined ( USE_MATRIX_TEST )
+01220         if (isIdentity())
+01221             return;
+01222 #endif
+01223 
+01224         const f32 Amin[3] = {box.MinEdge.X, box.MinEdge.Y, box.MinEdge.Z};
+01225         const f32 Amax[3] = {box.MaxEdge.X, box.MaxEdge.Y, box.MaxEdge.Z};
+01226 
+01227         f32 Bmin[3];
+01228         f32 Bmax[3];
+01229 
+01230         Bmin[0] = Bmax[0] = M[12];
+01231         Bmin[1] = Bmax[1] = M[13];
+01232         Bmin[2] = Bmax[2] = M[14];
+01233 
+01234         const CMatrix4<T> &m = *this;
+01235 
+01236         for (u32 i = 0; i < 3; ++i)
+01237         {
+01238             for (u32 j = 0; j < 3; ++j)
+01239             {
+01240                 const f32 a = m(j,i) * Amin[j];
+01241                 const f32 b = m(j,i) * Amax[j];
+01242 
+01243                 if (a < b)
+01244                 {
+01245                     Bmin[i] += a;
+01246                     Bmax[i] += b;
+01247                 }
+01248                 else
+01249                 {
+01250                     Bmin[i] += b;
+01251                     Bmax[i] += a;
+01252                 }
+01253             }
+01254         }
+01255 
+01256         box.MinEdge.X = Bmin[0];
+01257         box.MinEdge.Y = Bmin[1];
+01258         box.MinEdge.Z = Bmin[2];
+01259 
+01260         box.MaxEdge.X = Bmax[0];
+01261         box.MaxEdge.Y = Bmax[1];
+01262         box.MaxEdge.Z = Bmax[2];
+01263     }
+01264 
+01265 
+01267     template <class T>
+01268     inline void CMatrix4<T>::multiplyWith1x4Matrix(T* matrix) const
+01269     {
+01270         /*
+01271         0  1  2  3
+01272         4  5  6  7
+01273         8  9  10 11
+01274         12 13 14 15
+01275         */
+01276 
+01277         T mat[4];
+01278         mat[0] = matrix[0];
+01279         mat[1] = matrix[1];
+01280         mat[2] = matrix[2];
+01281         mat[3] = matrix[3];
+01282 
+01283         matrix[0] = M[0]*mat[0] + M[4]*mat[1] + M[8]*mat[2] + M[12]*mat[3];
+01284         matrix[1] = M[1]*mat[0] + M[5]*mat[1] + M[9]*mat[2] + M[13]*mat[3];
+01285         matrix[2] = M[2]*mat[0] + M[6]*mat[1] + M[10]*mat[2] + M[14]*mat[3];
+01286         matrix[3] = M[3]*mat[0] + M[7]*mat[1] + M[11]*mat[2] + M[15]*mat[3];
+01287     }
+01288 
+01289     template <class T>
+01290     inline void CMatrix4<T>::inverseTranslateVect( vector3df& vect ) const
+01291     {
+01292         vect.X = vect.X-M[12];
+01293         vect.Y = vect.Y-M[13];
+01294         vect.Z = vect.Z-M[14];
+01295     }
+01296 
+01297     template <class T>
+01298     inline void CMatrix4<T>::translateVect( vector3df& vect ) const
+01299     {
+01300         vect.X = vect.X+M[12];
+01301         vect.Y = vect.Y+M[13];
+01302         vect.Z = vect.Z+M[14];
+01303     }
+01304 
+01305 
+01306     template <class T>
+01307     inline bool CMatrix4<T>::getInverse(CMatrix4<T>& out) const
+01308     {
+01312 
+01313 #if defined ( USE_MATRIX_TEST )
+01314         if ( this->isIdentity() )
+01315         {
+01316             out=*this;
+01317             return true;
+01318         }
+01319 #endif
+01320         const CMatrix4<T> &m = *this;
+01321 
+01322         f32 d = (m(0, 0) * m(1, 1) - m(0, 1) * m(1, 0)) * (m(2, 2) * m(3, 3) - m(2, 3) * m(3, 2)) -
+01323             (m(0, 0) * m(1, 2) - m(0, 2) * m(1, 0)) * (m(2, 1) * m(3, 3) - m(2, 3) * m(3, 1)) +
+01324             (m(0, 0) * m(1, 3) - m(0, 3) * m(1, 0)) * (m(2, 1) * m(3, 2) - m(2, 2) * m(3, 1)) +
+01325             (m(0, 1) * m(1, 2) - m(0, 2) * m(1, 1)) * (m(2, 0) * m(3, 3) - m(2, 3) * m(3, 0)) -
+01326             (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) +
+01327             (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0));
+01328 
+01329         if( core::iszero ( d, FLT_MIN ) )
+01330             return false;
+01331 
+01332         d = core::reciprocal ( d );
+01333 
+01334         out(0, 0) = d * (m(1, 1) * (m(2, 2) * m(3, 3) - m(2, 3) * m(3, 2)) +
+01335                 m(1, 2) * (m(2, 3) * m(3, 1) - m(2, 1) * m(3, 3)) +
+01336                 m(1, 3) * (m(2, 1) * m(3, 2) - m(2, 2) * m(3, 1)));
+01337         out(0, 1) = d * (m(2, 1) * (m(0, 2) * m(3, 3) - m(0, 3) * m(3, 2)) +
+01338                 m(2, 2) * (m(0, 3) * m(3, 1) - m(0, 1) * m(3, 3)) +
+01339                 m(2, 3) * (m(0, 1) * m(3, 2) - m(0, 2) * m(3, 1)));
+01340         out(0, 2) = d * (m(3, 1) * (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) +
+01341                 m(3, 2) * (m(0, 3) * m(1, 1) - m(0, 1) * m(1, 3)) +
+01342                 m(3, 3) * (m(0, 1) * m(1, 2) - m(0, 2) * m(1, 1)));
+01343         out(0, 3) = d * (m(0, 1) * (m(1, 3) * m(2, 2) - m(1, 2) * m(2, 3)) +
+01344                 m(0, 2) * (m(1, 1) * m(2, 3) - m(1, 3) * m(2, 1)) +
+01345                 m(0, 3) * (m(1, 2) * m(2, 1) - m(1, 1) * m(2, 2)));
+01346         out(1, 0) = d * (m(1, 2) * (m(2, 0) * m(3, 3) - m(2, 3) * m(3, 0)) +
+01347                 m(1, 3) * (m(2, 2) * m(3, 0) - m(2, 0) * m(3, 2)) +
+01348                 m(1, 0) * (m(2, 3) * m(3, 2) - m(2, 2) * m(3, 3)));
+01349         out(1, 1) = d * (m(2, 2) * (m(0, 0) * m(3, 3) - m(0, 3) * m(3, 0)) +
+01350                 m(2, 3) * (m(0, 2) * m(3, 0) - m(0, 0) * m(3, 2)) +
+01351                 m(2, 0) * (m(0, 3) * m(3, 2) - m(0, 2) * m(3, 3)));
+01352         out(1, 2) = d * (m(3, 2) * (m(0, 0) * m(1, 3) - m(0, 3) * m(1, 0)) +
+01353                 m(3, 3) * (m(0, 2) * m(1, 0) - m(0, 0) * m(1, 2)) +
+01354                 m(3, 0) * (m(0, 3) * m(1, 2) - m(0, 2) * m(1, 3)));
+01355         out(1, 3) = d * (m(0, 2) * (m(1, 3) * m(2, 0) - m(1, 0) * m(2, 3)) +
+01356                 m(0, 3) * (m(1, 0) * m(2, 2) - m(1, 2) * m(2, 0)) +
+01357                 m(0, 0) * (m(1, 2) * m(2, 3) - m(1, 3) * m(2, 2)));
+01358         out(2, 0) = d * (m(1, 3) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0)) +
+01359                 m(1, 0) * (m(2, 1) * m(3, 3) - m(2, 3) * m(3, 1)) +
+01360                 m(1, 1) * (m(2, 3) * m(3, 0) - m(2, 0) * m(3, 3)));
+01361         out(2, 1) = d * (m(2, 3) * (m(0, 0) * m(3, 1) - m(0, 1) * m(3, 0)) +
+01362                 m(2, 0) * (m(0, 1) * m(3, 3) - m(0, 3) * m(3, 1)) +
+01363                 m(2, 1) * (m(0, 3) * m(3, 0) - m(0, 0) * m(3, 3)));
+01364         out(2, 2) = d * (m(3, 3) * (m(0, 0) * m(1, 1) - m(0, 1) * m(1, 0)) +
+01365                 m(3, 0) * (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) +
+01366                 m(3, 1) * (m(0, 3) * m(1, 0) - m(0, 0) * m(1, 3)));
+01367         out(2, 3) = d * (m(0, 3) * (m(1, 1) * m(2, 0) - m(1, 0) * m(2, 1)) +
+01368                 m(0, 0) * (m(1, 3) * m(2, 1) - m(1, 1) * m(2, 3)) +
+01369                 m(0, 1) * (m(1, 0) * m(2, 3) - m(1, 3) * m(2, 0)));
+01370         out(3, 0) = d * (m(1, 0) * (m(2, 2) * m(3, 1) - m(2, 1) * m(3, 2)) +
+01371                 m(1, 1) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) +
+01372                 m(1, 2) * (m(2, 1) * m(3, 0) - m(2, 0) * m(3, 1)));
+01373         out(3, 1) = d * (m(2, 0) * (m(0, 2) * m(3, 1) - m(0, 1) * m(3, 2)) +
+01374                 m(2, 1) * (m(0, 0) * m(3, 2) - m(0, 2) * m(3, 0)) +
+01375                 m(2, 2) * (m(0, 1) * m(3, 0) - m(0, 0) * m(3, 1)));
+01376         out(3, 2) = d * (m(3, 0) * (m(0, 2) * m(1, 1) - m(0, 1) * m(1, 2)) +
+01377                 m(3, 1) * (m(0, 0) * m(1, 2) - m(0, 2) * m(1, 0)) +
+01378                 m(3, 2) * (m(0, 1) * m(1, 0) - m(0, 0) * m(1, 1)));
+01379         out(3, 3) = d * (m(0, 0) * (m(1, 1) * m(2, 2) - m(1, 2) * m(2, 1)) +
+01380                 m(0, 1) * (m(1, 2) * m(2, 0) - m(1, 0) * m(2, 2)) +
+01381                 m(0, 2) * (m(1, 0) * m(2, 1) - m(1, 1) * m(2, 0)));
+01382 
+01383 #if defined ( USE_MATRIX_TEST )
+01384         out.definitelyIdentityMatrix = definitelyIdentityMatrix;
+01385 #endif
+01386         return true;
+01387     }
+01388 
+01389 
+01392     template <class T>
+01393     inline bool CMatrix4<T>::getInversePrimitive ( CMatrix4<T>& out ) const
+01394     {
+01395         out.M[0 ] = M[0];
+01396         out.M[1 ] = M[4];
+01397         out.M[2 ] = M[8];
+01398         out.M[3 ] = 0;
+01399 
+01400         out.M[4 ] = M[1];
+01401         out.M[5 ] = M[5];
+01402         out.M[6 ] = M[9];
+01403         out.M[7 ] = 0;
+01404 
+01405         out.M[8 ] = M[2];
+01406         out.M[9 ] = M[6];
+01407         out.M[10] = M[10];
+01408         out.M[11] = 0;
+01409 
+01410         out.M[12] = (T)-(M[12]*M[0] + M[13]*M[1] + M[14]*M[2]);
+01411         out.M[13] = (T)-(M[12]*M[4] + M[13]*M[5] + M[14]*M[6]);
+01412         out.M[14] = (T)-(M[12]*M[8] + M[13]*M[9] + M[14]*M[10]);
+01413         out.M[15] = 1;
+01414 
+01415 #if defined ( USE_MATRIX_TEST )
+01416         out.definitelyIdentityMatrix = definitelyIdentityMatrix;
+01417 #endif
+01418         return true;
+01419     }
+01420 
+01423     template <class T>
+01424     inline bool CMatrix4<T>::makeInverse()
+01425     {
+01426 #if defined ( USE_MATRIX_TEST )
+01427         if (definitelyIdentityMatrix)
+01428             return true;
+01429 #endif
+01430         CMatrix4<T> temp ( EM4CONST_NOTHING );
+01431 
+01432         if (getInverse(temp))
+01433         {
+01434             *this = temp;
+01435             return true;
+01436         }
+01437 
+01438         return false;
+01439     }
+01440 
+01441 
+01442     template <class T>
+01443     inline CMatrix4<T>& CMatrix4<T>::operator=(const CMatrix4<T> &other)
+01444     {
+01445         if (this==&other)
+01446             return *this;
+01447         memcpy(M, other.M, 16*sizeof(T));
+01448 #if defined ( USE_MATRIX_TEST )
+01449         definitelyIdentityMatrix=other.definitelyIdentityMatrix;
+01450 #endif
+01451         return *this;
+01452     }
+01453 
+01454 
+01455     template <class T>
+01456     inline CMatrix4<T>& CMatrix4<T>::operator=(const T& scalar)
+01457     {
+01458         for (s32 i = 0; i < 16; ++i)
+01459             M[i]=scalar;
+01460 
+01461 #if defined ( USE_MATRIX_TEST )
+01462         definitelyIdentityMatrix=false;
+01463 #endif
+01464         return *this;
+01465     }
+01466 
+01467 
+01468     template <class T>
+01469     inline bool CMatrix4<T>::operator==(const CMatrix4<T> &other) const
+01470     {
+01471 #if defined ( USE_MATRIX_TEST )
+01472         if (definitelyIdentityMatrix && other.definitelyIdentityMatrix)
+01473             return true;
+01474 #endif
+01475         for (s32 i = 0; i < 16; ++i)
+01476             if (M[i] != other.M[i])
+01477                 return false;
+01478 
+01479         return true;
+01480     }
+01481 
+01482 
+01483     template <class T>
+01484     inline bool CMatrix4<T>::operator!=(const CMatrix4<T> &other) const
+01485     {
+01486         return !(*this == other);
+01487     }
+01488 
+01489 
+01490     // Builds a right-handed perspective projection matrix based on a field of view
+01491     template <class T>
+01492     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovRH(
+01493             f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar)
+01494     {
+01495         const f64 h = reciprocal(tan(fieldOfViewRadians*0.5));
+01496         _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero
+01497         const T w = static_cast<T>(h / aspectRatio);
+01498 
+01499         _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
+01500         M[0] = w;
+01501         M[1] = 0;
+01502         M[2] = 0;
+01503         M[3] = 0;
+01504 
+01505         M[4] = 0;
+01506         M[5] = (T)h;
+01507         M[6] = 0;
+01508         M[7] = 0;
+01509 
+01510         M[8] = 0;
+01511         M[9] = 0;
+01512         M[10] = (T)(zFar/(zNear-zFar)); // DirectX version
+01513 //      M[10] = (T)(zFar+zNear/(zNear-zFar)); // OpenGL version
+01514         M[11] = -1;
+01515 
+01516         M[12] = 0;
+01517         M[13] = 0;
+01518         M[14] = (T)(zNear*zFar/(zNear-zFar)); // DirectX version
+01519 //      M[14] = (T)(2.0f*zNear*zFar/(zNear-zFar)); // OpenGL version
+01520         M[15] = 0;
+01521 
+01522 #if defined ( USE_MATRIX_TEST )
+01523         definitelyIdentityMatrix=false;
+01524 #endif
+01525         return *this;
+01526     }
+01527 
+01528 
+01529     // Builds a left-handed perspective projection matrix based on a field of view
+01530     template <class T>
+01531     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovLH(
+01532             f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar)
+01533     {
+01534         const f64 h = reciprocal(tan(fieldOfViewRadians*0.5));
+01535         _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero
+01536         const T w = static_cast<T>(h / aspectRatio);
+01537 
+01538         _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
+01539         M[0] = w;
+01540         M[1] = 0;
+01541         M[2] = 0;
+01542         M[3] = 0;
+01543 
+01544         M[4] = 0;
+01545         M[5] = (T)h;
+01546         M[6] = 0;
+01547         M[7] = 0;
+01548 
+01549         M[8] = 0;
+01550         M[9] = 0;
+01551         M[10] = (T)(zFar/(zFar-zNear));
+01552         M[11] = 1;
+01553 
+01554         M[12] = 0;
+01555         M[13] = 0;
+01556         M[14] = (T)(-zNear*zFar/(zFar-zNear));
+01557         M[15] = 0;
+01558 
+01559 #if defined ( USE_MATRIX_TEST )
+01560         definitelyIdentityMatrix=false;
+01561 #endif
+01562         return *this;
+01563     }
+01564 
+01565 
+01566     // Builds a left-handed perspective projection matrix based on a field of view, with far plane culling at infinity
+01567     template <class T>
+01568     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovInfinityLH(
+01569             f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon)
+01570     {
+01571         const f64 h = reciprocal(tan(fieldOfViewRadians*0.5));
+01572         _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero
+01573         const T w = static_cast<T>(h / aspectRatio);
+01574 
+01575         M[0] = w;
+01576         M[1] = 0;
+01577         M[2] = 0;
+01578         M[3] = 0;
+01579 
+01580         M[4] = 0;
+01581         M[5] = (T)h;
+01582         M[6] = 0;
+01583         M[7] = 0;
+01584 
+01585         M[8] = 0;
+01586         M[9] = 0;
+01587         M[10] = (T)(1.f-epsilon);
+01588         M[11] = 1;
+01589 
+01590         M[12] = 0;
+01591         M[13] = 0;
+01592         M[14] = (T)(zNear*(epsilon-1.f));
+01593         M[15] = 0;
+01594 
+01595 #if defined ( USE_MATRIX_TEST )
+01596         definitelyIdentityMatrix=false;
+01597 #endif
+01598         return *this;
+01599     }
+01600 
+01601 
+01602     // Builds a left-handed orthogonal projection matrix.
+01603     template <class T>
+01604     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixOrthoLH(
+01605             f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
+01606     {
+01607         _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
+01608         _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
+01609         _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
+01610         M[0] = (T)(2/widthOfViewVolume);
+01611         M[1] = 0;
+01612         M[2] = 0;
+01613         M[3] = 0;
+01614 
+01615         M[4] = 0;
+01616         M[5] = (T)(2/heightOfViewVolume);
+01617         M[6] = 0;
+01618         M[7] = 0;
+01619 
+01620         M[8] = 0;
+01621         M[9] = 0;
+01622         M[10] = (T)(1/(zFar-zNear));
+01623         M[11] = 0;
+01624 
+01625         M[12] = 0;
+01626         M[13] = 0;
+01627         M[14] = (T)(zNear/(zNear-zFar));
+01628         M[15] = 1;
+01629 
+01630 #if defined ( USE_MATRIX_TEST )
+01631         definitelyIdentityMatrix=false;
+01632 #endif
+01633         return *this;
+01634     }
+01635 
+01636 
+01637     // Builds a right-handed orthogonal projection matrix.
+01638     template <class T>
+01639     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixOrthoRH(
+01640             f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
+01641     {
+01642         _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
+01643         _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
+01644         _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
+01645         M[0] = (T)(2/widthOfViewVolume);
+01646         M[1] = 0;
+01647         M[2] = 0;
+01648         M[3] = 0;
+01649 
+01650         M[4] = 0;
+01651         M[5] = (T)(2/heightOfViewVolume);
+01652         M[6] = 0;
+01653         M[7] = 0;
+01654 
+01655         M[8] = 0;
+01656         M[9] = 0;
+01657         M[10] = (T)(1/(zNear-zFar));
+01658         M[11] = 0;
+01659 
+01660         M[12] = 0;
+01661         M[13] = 0;
+01662         M[14] = (T)(zNear/(zNear-zFar));
+01663         M[15] = 1;
+01664 
+01665 #if defined ( USE_MATRIX_TEST )
+01666         definitelyIdentityMatrix=false;
+01667 #endif
+01668         return *this;
+01669     }
+01670 
+01671 
+01672     // Builds a right-handed perspective projection matrix.
+01673     template <class T>
+01674     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveRH(
+01675             f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
+01676     {
+01677         _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
+01678         _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
+01679         _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
+01680         M[0] = (T)(2*zNear/widthOfViewVolume);
+01681         M[1] = 0;
+01682         M[2] = 0;
+01683         M[3] = 0;
+01684 
+01685         M[4] = 0;
+01686         M[5] = (T)(2*zNear/heightOfViewVolume);
+01687         M[6] = 0;
+01688         M[7] = 0;
+01689 
+01690         M[8] = 0;
+01691         M[9] = 0;
+01692         M[10] = (T)(zFar/(zNear-zFar));
+01693         M[11] = -1;
+01694 
+01695         M[12] = 0;
+01696         M[13] = 0;
+01697         M[14] = (T)(zNear*zFar/(zNear-zFar));
+01698         M[15] = 0;
+01699 
+01700 #if defined ( USE_MATRIX_TEST )
+01701         definitelyIdentityMatrix=false;
+01702 #endif
+01703         return *this;
+01704     }
+01705 
+01706 
+01707     // Builds a left-handed perspective projection matrix.
+01708     template <class T>
+01709     inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveLH(
+01710             f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
+01711     {
+01712         _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
+01713         _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
+01714         _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
+01715         M[0] = (T)(2*zNear/widthOfViewVolume);
+01716         M[1] = 0;
+01717         M[2] = 0;
+01718         M[3] = 0;
+01719 
+01720         M[4] = 0;
+01721         M[5] = (T)(2*zNear/heightOfViewVolume);
+01722         M[6] = 0;
+01723         M[7] = 0;
+01724 
+01725         M[8] = 0;
+01726         M[9] = 0;
+01727         M[10] = (T)(zFar/(zFar-zNear));
+01728         M[11] = 1;
+01729 
+01730         M[12] = 0;
+01731         M[13] = 0;
+01732         M[14] = (T)(zNear*zFar/(zNear-zFar));
+01733         M[15] = 0;
+01734 #if defined ( USE_MATRIX_TEST )
+01735         definitelyIdentityMatrix=false;
+01736 #endif
+01737         return *this;
+01738     }
+01739 
+01740 
+01741     // Builds a matrix that flattens geometry into a plane.
+01742     template <class T>
+01743     inline CMatrix4<T>& CMatrix4<T>::buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point)
+01744     {
+01745         plane.Normal.normalize();
+01746         const f32 d = plane.Normal.dotProduct(light);
+01747 
+01748         M[ 0] = (T)(-plane.Normal.X * light.X + d);
+01749         M[ 1] = (T)(-plane.Normal.X * light.Y);
+01750         M[ 2] = (T)(-plane.Normal.X * light.Z);
+01751         M[ 3] = (T)(-plane.Normal.X * point);
+01752 
+01753         M[ 4] = (T)(-plane.Normal.Y * light.X);
+01754         M[ 5] = (T)(-plane.Normal.Y * light.Y + d);
+01755         M[ 6] = (T)(-plane.Normal.Y * light.Z);
+01756         M[ 7] = (T)(-plane.Normal.Y * point);
+01757 
+01758         M[ 8] = (T)(-plane.Normal.Z * light.X);
+01759         M[ 9] = (T)(-plane.Normal.Z * light.Y);
+01760         M[10] = (T)(-plane.Normal.Z * light.Z + d);
+01761         M[11] = (T)(-plane.Normal.Z * point);
+01762 
+01763         M[12] = (T)(-plane.D * light.X);
+01764         M[13] = (T)(-plane.D * light.Y);
+01765         M[14] = (T)(-plane.D * light.Z);
+01766         M[15] = (T)(-plane.D * point + d);
+01767 #if defined ( USE_MATRIX_TEST )
+01768         definitelyIdentityMatrix=false;
+01769 #endif
+01770         return *this;
+01771     }
+01772 
+01773     // Builds a left-handed look-at matrix.
+01774     template <class T>
+01775     inline CMatrix4<T>& CMatrix4<T>::buildCameraLookAtMatrixLH(
+01776                 const vector3df& position,
+01777                 const vector3df& target,
+01778                 const vector3df& upVector)
+01779     {
+01780         vector3df zaxis = target - position;
+01781         zaxis.normalize();
+01782 
+01783         vector3df xaxis = upVector.crossProduct(zaxis);
+01784         xaxis.normalize();
+01785 
+01786         vector3df yaxis = zaxis.crossProduct(xaxis);
+01787 
+01788         M[0] = (T)xaxis.X;
+01789         M[1] = (T)yaxis.X;
+01790         M[2] = (T)zaxis.X;
+01791         M[3] = 0;
+01792 
+01793         M[4] = (T)xaxis.Y;
+01794         M[5] = (T)yaxis.Y;
+01795         M[6] = (T)zaxis.Y;
+01796         M[7] = 0;
+01797 
+01798         M[8] = (T)xaxis.Z;
+01799         M[9] = (T)yaxis.Z;
+01800         M[10] = (T)zaxis.Z;
+01801         M[11] = 0;
+01802 
+01803         M[12] = (T)-xaxis.dotProduct(position);
+01804         M[13] = (T)-yaxis.dotProduct(position);
+01805         M[14] = (T)-zaxis.dotProduct(position);
+01806         M[15] = 1;
+01807 #if defined ( USE_MATRIX_TEST )
+01808         definitelyIdentityMatrix=false;
+01809 #endif
+01810         return *this;
+01811     }
+01812 
+01813 
+01814     // Builds a right-handed look-at matrix.
+01815     template <class T>
+01816     inline CMatrix4<T>& CMatrix4<T>::buildCameraLookAtMatrixRH(
+01817                 const vector3df& position,
+01818                 const vector3df& target,
+01819                 const vector3df& upVector)
+01820     {
+01821         vector3df zaxis = position - target;
+01822         zaxis.normalize();
+01823 
+01824         vector3df xaxis = upVector.crossProduct(zaxis);
+01825         xaxis.normalize();
+01826 
+01827         vector3df yaxis = zaxis.crossProduct(xaxis);
+01828 
+01829         M[0] = (T)xaxis.X;
+01830         M[1] = (T)yaxis.X;
+01831         M[2] = (T)zaxis.X;
+01832         M[3] = 0;
+01833 
+01834         M[4] = (T)xaxis.Y;
+01835         M[5] = (T)yaxis.Y;
+01836         M[6] = (T)zaxis.Y;
+01837         M[7] = 0;
+01838 
+01839         M[8] = (T)xaxis.Z;
+01840         M[9] = (T)yaxis.Z;
+01841         M[10] = (T)zaxis.Z;
+01842         M[11] = 0;
+01843 
+01844         M[12] = (T)-xaxis.dotProduct(position);
+01845         M[13] = (T)-yaxis.dotProduct(position);
+01846         M[14] = (T)-zaxis.dotProduct(position);
+01847         M[15] = 1;
+01848 #if defined ( USE_MATRIX_TEST )
+01849         definitelyIdentityMatrix=false;
+01850 #endif
+01851         return *this;
+01852     }
+01853 
+01854 
+01855     // creates a new matrix as interpolated matrix from this and the passed one.
+01856     template <class T>
+01857     inline CMatrix4<T> CMatrix4<T>::interpolate(const core::CMatrix4<T>& b, f32 time) const
+01858     {
+01859         CMatrix4<T> mat ( EM4CONST_NOTHING );
+01860 
+01861         for (u32 i=0; i < 16; i += 4)
+01862         {
+01863             mat.M[i+0] = (T)(M[i+0] + ( b.M[i+0] - M[i+0] ) * time);
+01864             mat.M[i+1] = (T)(M[i+1] + ( b.M[i+1] - M[i+1] ) * time);
+01865             mat.M[i+2] = (T)(M[i+2] + ( b.M[i+2] - M[i+2] ) * time);
+01866             mat.M[i+3] = (T)(M[i+3] + ( b.M[i+3] - M[i+3] ) * time);
+01867         }
+01868         return mat;
+01869     }
+01870 
+01871 
+01872     // returns transposed matrix
+01873     template <class T>
+01874     inline CMatrix4<T> CMatrix4<T>::getTransposed() const
+01875     {
+01876         CMatrix4<T> t ( EM4CONST_NOTHING );
+01877         getTransposed ( t );
+01878         return t;
+01879     }
+01880 
+01881 
+01882     // returns transposed matrix
+01883     template <class T>
+01884     inline void CMatrix4<T>::getTransposed( CMatrix4<T>& o ) const
+01885     {
+01886         o[ 0] = M[ 0];
+01887         o[ 1] = M[ 4];
+01888         o[ 2] = M[ 8];
+01889         o[ 3] = M[12];
+01890 
+01891         o[ 4] = M[ 1];
+01892         o[ 5] = M[ 5];
+01893         o[ 6] = M[ 9];
+01894         o[ 7] = M[13];
+01895 
+01896         o[ 8] = M[ 2];
+01897         o[ 9] = M[ 6];
+01898         o[10] = M[10];
+01899         o[11] = M[14];
+01900 
+01901         o[12] = M[ 3];
+01902         o[13] = M[ 7];
+01903         o[14] = M[11];
+01904         o[15] = M[15];
+01905 #if defined ( USE_MATRIX_TEST )
+01906         o.definitelyIdentityMatrix=definitelyIdentityMatrix;
+01907 #endif
+01908     }
+01909 
+01910 
+01911     // used to scale <-1,-1><1,1> to viewport
+01912     template <class T>
+01913     inline CMatrix4<T>& CMatrix4<T>::buildNDCToDCMatrix( const core::rect<s32>& viewport, f32 zScale)
+01914     {
+01915         const f32 scaleX = (viewport.getWidth() - 0.75f ) * 0.5f;
+01916         const f32 scaleY = -(viewport.getHeight() - 0.75f ) * 0.5f;
+01917 
+01918         const f32 dx = -0.5f + ( (viewport.UpperLeftCorner.X + viewport.LowerRightCorner.X ) * 0.5f );
+01919         const f32 dy = -0.5f + ( (viewport.UpperLeftCorner.Y + viewport.LowerRightCorner.Y ) * 0.5f );
+01920 
+01921         makeIdentity();
+01922         M[12] = (T)dx;
+01923         M[13] = (T)dy;
+01924         return setScale(core::vector3d<T>((T)scaleX, (T)scaleY, (T)zScale));
+01925     }
+01926 
+01928 
+01933     template <class T>
+01934     inline CMatrix4<T>& CMatrix4<T>::buildRotateFromTo(const core::vector3df& from, const core::vector3df& to)
+01935     {
+01936         // unit vectors
+01937         core::vector3df f(from);
+01938         core::vector3df t(to);
+01939         f.normalize();
+01940         t.normalize();
+01941 
+01942         // axis multiplication by sin
+01943         core::vector3df vs(t.crossProduct(f));
+01944 
+01945         // axis of rotation
+01946         core::vector3df v(vs);
+01947         v.normalize();
+01948 
+01949         // cosinus angle
+01950         T ca = f.dotProduct(t);
+01951 
+01952         core::vector3df vt(v * (1 - ca));
+01953 
+01954         M[0] = vt.X * v.X + ca;
+01955         M[5] = vt.Y * v.Y + ca;
+01956         M[10] = vt.Z * v.Z + ca;
+01957 
+01958         vt.X *= v.Y;
+01959         vt.Z *= v.X;
+01960         vt.Y *= v.Z;
+01961 
+01962         M[1] = vt.X - vs.Z;
+01963         M[2] = vt.Z + vs.Y;
+01964         M[3] = 0;
+01965 
+01966         M[4] = vt.X + vs.Z;
+01967         M[6] = vt.Y - vs.X;
+01968         M[7] = 0;
+01969 
+01970         M[8] = vt.Z - vs.Y;
+01971         M[9] = vt.Y + vs.X;
+01972         M[11] = 0;
+01973 
+01974         M[12] = 0;
+01975         M[13] = 0;
+01976         M[14] = 0;
+01977         M[15] = 1;
+01978 
+01979         return *this;
+01980     }
+01981 
+01983 
+01989     template <class T>
+01990     inline void CMatrix4<T>::buildAxisAlignedBillboard(
+01991                 const core::vector3df& camPos,
+01992                 const core::vector3df& center,
+01993                 const core::vector3df& translation,
+01994                 const core::vector3df& axis,
+01995                 const core::vector3df& from)
+01996     {
+01997         // axis of rotation
+01998         core::vector3df up = axis;
+01999         up.normalize();
+02000         const core::vector3df forward = (camPos - center).normalize();
+02001         const core::vector3df right = up.crossProduct(forward).normalize();
+02002 
+02003         // correct look vector
+02004         const core::vector3df look = right.crossProduct(up);
+02005 
+02006         // rotate from to
+02007         // axis multiplication by sin
+02008         const core::vector3df vs = look.crossProduct(from);
+02009 
+02010         // cosinus angle
+02011         const f32 ca = from.dotProduct(look);
+02012 
+02013         core::vector3df vt(up * (1.f - ca));
+02014 
+02015         M[0] = static_cast<T>(vt.X * up.X + ca);
+02016         M[5] = static_cast<T>(vt.Y * up.Y + ca);
+02017         M[10] = static_cast<T>(vt.Z * up.Z + ca);
+02018 
+02019         vt.X *= up.Y;
+02020         vt.Z *= up.X;
+02021         vt.Y *= up.Z;
+02022 
+02023         M[1] = static_cast<T>(vt.X - vs.Z);
+02024         M[2] = static_cast<T>(vt.Z + vs.Y);
+02025         M[3] = 0;
+02026 
+02027         M[4] = static_cast<T>(vt.X + vs.Z);
+02028         M[6] = static_cast<T>(vt.Y - vs.X);
+02029         M[7] = 0;
+02030 
+02031         M[8] = static_cast<T>(vt.Z - vs.Y);
+02032         M[9] = static_cast<T>(vt.Y + vs.X);
+02033         M[11] = 0;
+02034 
+02035         setRotationCenter(center, translation);
+02036     }
+02037 
+02038 
+02040     template <class T>
+02041     inline void CMatrix4<T>::setRotationCenter(const core::vector3df& center, const core::vector3df& translation)
+02042     {
+02043         M[12] = -M[0]*center.X - M[4]*center.Y - M[8]*center.Z + (center.X - translation.X );
+02044         M[13] = -M[1]*center.X - M[5]*center.Y - M[9]*center.Z + (center.Y - translation.Y );
+02045         M[14] = -M[2]*center.X - M[6]*center.Y - M[10]*center.Z + (center.Z - translation.Z );
+02046         M[15] = (T) 1.0;
+02047 #if defined ( USE_MATRIX_TEST )
+02048         definitelyIdentityMatrix=false;
+02049 #endif
+02050     }
+02051 
+02064     template <class T>
+02065     inline CMatrix4<T>& CMatrix4<T>::buildTextureTransform( f32 rotateRad,
+02066             const core::vector2df &rotatecenter,
+02067             const core::vector2df &translate,
+02068             const core::vector2df &scale)
+02069     {
+02070         const f32 c = cosf(rotateRad);
+02071         const f32 s = sinf(rotateRad);
+02072 
+02073         M[0] = (T)(c * scale.X);
+02074         M[1] = (T)(s * scale.Y);
+02075         M[2] = 0;
+02076         M[3] = 0;
+02077 
+02078         M[4] = (T)(-s * scale.X);
+02079         M[5] = (T)(c * scale.Y);
+02080         M[6] = 0;
+02081         M[7] = 0;
+02082 
+02083         M[8] = (T)(c * scale.X * rotatecenter.X + -s * rotatecenter.Y + translate.X);
+02084         M[9] = (T)(s * scale.Y * rotatecenter.X +  c * rotatecenter.Y + translate.Y);
+02085         M[10] = 1;
+02086         M[11] = 0;
+02087 
+02088         M[12] = 0;
+02089         M[13] = 0;
+02090         M[14] = 0;
+02091         M[15] = 1;
+02092 #if defined ( USE_MATRIX_TEST )
+02093         definitelyIdentityMatrix=false;
+02094 #endif
+02095         return *this;
+02096     }
+02097 
+02098 
+02099     // rotate about z axis, center ( 0.5, 0.5 )
+02100     template <class T>
+02101     inline CMatrix4<T>& CMatrix4<T>::setTextureRotationCenter( f32 rotateRad )
+02102     {
+02103         const f32 c = cosf(rotateRad);
+02104         const f32 s = sinf(rotateRad);
+02105         M[0] = (T)c;
+02106         M[1] = (T)s;
+02107 
+02108         M[4] = (T)-s;
+02109         M[5] = (T)c;
+02110 
+02111         M[8] = (T)(0.5f * ( s - c) + 0.5f);
+02112         M[9] = (T)(-0.5f * ( s + c) + 0.5f);
+02113 
+02114 #if defined ( USE_MATRIX_TEST )
+02115         definitelyIdentityMatrix = definitelyIdentityMatrix && (rotateRad==0.0f);
+02116 #endif
+02117         return *this;
+02118     }
+02119 
+02120 
+02121     template <class T>
+02122     inline CMatrix4<T>& CMatrix4<T>::setTextureTranslate ( f32 x, f32 y )
+02123     {
+02124         M[8] = (T)x;
+02125         M[9] = (T)y;
+02126 
+02127 #if defined ( USE_MATRIX_TEST )
+02128         definitelyIdentityMatrix = definitelyIdentityMatrix && (x==0.0f) && (y==0.0f);
+02129 #endif
+02130         return *this;
+02131     }
+02132 
+02133 
+02134     template <class T>
+02135     inline CMatrix4<T>& CMatrix4<T>::setTextureTranslateTransposed ( f32 x, f32 y )
+02136     {
+02137         M[2] = (T)x;
+02138         M[6] = (T)y;
+02139 
+02140 #if defined ( USE_MATRIX_TEST )
+02141         definitelyIdentityMatrix = definitelyIdentityMatrix && (x==0.0f) && (y==0.0f) ;
+02142 #endif
+02143         return *this;
+02144     }
+02145 
+02146     template <class T>
+02147     inline CMatrix4<T>& CMatrix4<T>::setTextureScale ( f32 sx, f32 sy )
+02148     {
+02149         M[0] = (T)sx;
+02150         M[5] = (T)sy;
+02151 #if defined ( USE_MATRIX_TEST )
+02152         definitelyIdentityMatrix = definitelyIdentityMatrix && (sx==1.0f) && (sy==1.0f);
+02153 #endif
+02154         return *this;
+02155     }
+02156 
+02157 
+02158     template <class T>
+02159     inline CMatrix4<T>& CMatrix4<T>::setTextureScaleCenter( f32 sx, f32 sy )
+02160     {
+02161         M[0] = (T)sx;
+02162         M[5] = (T)sy;
+02163         M[8] = (T)(0.5f - 0.5f * sx);
+02164         M[9] = (T)(0.5f - 0.5f * sy);
+02165 
+02166 #if defined ( USE_MATRIX_TEST )
+02167         definitelyIdentityMatrix = definitelyIdentityMatrix && (sx==1.0f) && (sy==1.0f);
+02168 #endif
+02169         return *this;
+02170     }
+02171 
+02172 
+02173     // sets all matrix data members at once
+02174     template <class T>
+02175     inline CMatrix4<T>& CMatrix4<T>::setM(const T* data)
+02176     {
+02177         memcpy(M,data, 16*sizeof(T));
+02178 
+02179 #if defined ( USE_MATRIX_TEST )
+02180         definitelyIdentityMatrix=false;
+02181 #endif
+02182         return *this;
+02183     }
+02184 
+02185 
+02186     // sets if the matrix is definitely identity matrix
+02187     template <class T>
+02188     inline void CMatrix4<T>::setDefinitelyIdentityMatrix( bool isDefinitelyIdentityMatrix)
+02189     {
+02190 #if defined ( USE_MATRIX_TEST )
+02191         definitelyIdentityMatrix = isDefinitelyIdentityMatrix;
+02192 #endif
+02193     }
+02194 
+02195 
+02196     // gets if the matrix is definitely identity matrix
+02197     template <class T>
+02198     inline bool CMatrix4<T>::getDefinitelyIdentityMatrix() const
+02199     {
+02200 #if defined ( USE_MATRIX_TEST )
+02201         return definitelyIdentityMatrix;
+02202 #else
+02203         return false;
+02204 #endif
+02205     }
+02206 
+02207 
+02209     template <class T>
+02210     inline bool CMatrix4<T>::equals(const core::CMatrix4<T>& other, const T tolerance) const
+02211     {
+02212 #if defined ( USE_MATRIX_TEST )
+02213         if (definitelyIdentityMatrix && other.definitelyIdentityMatrix)
+02214             return true;
+02215 #endif
+02216         for (s32 i = 0; i < 16; ++i)
+02217             if (!core::equals(M[i],other.M[i], tolerance))
+02218                 return false;
+02219 
+02220         return true;
+02221     }
+02222 
+02223 
+02224     // Multiply by scalar.
+02225     template <class T>
+02226     inline CMatrix4<T> operator*(const T scalar, const CMatrix4<T>& mat)
+02227     {
+02228         return mat*scalar;
+02229     }
+02230 
+02231 
+02233     typedef CMatrix4<f32> matrix4;
+02234 
+02236     IRRLICHT_API extern const matrix4 IdentityMatrix;
+02237 
+02238 } // end namespace core
+02239 } // end namespace irr
+02240 
+02241 #endif
+02242 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr.html new file mode 100644 index 0000000..3cafe6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr.html @@ -0,0 +1,1419 @@ + + + + +Irrlicht 3D Engine: irr Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr Namespace Reference
+
+
+ +

Everything in the Irrlicht Engine can be found in this namespace. +More...

+

+Namespaces

+
    +
  • namespace core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
  • namespace gui +

    The gui namespace contains useful classes for easy creation of a graphical user interface.

    +
  • namespace io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
  • namespace scene +

    All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

    +
  • namespace video +

    The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

    +
+

+Classes

+ +

+Typedefs

+
    +
  • typedef char c8 +
    8 bit character variable.
  • typedef float f32 +
    32 bit floating point variable.
  • typedef double f64 +
    64 bit floating point variable.
  • typedef char fschar_t +
    Type name for character type used by the file system.
  • typedef IrrlichtDevice
    +*IRRCALLCONV * funcptr_createDevice (video::E_DRIVER_TYPE deviceType, const core::dimension2d< u32 > &windowSize, u32 bits, bool fullscreen, bool stencilbuffer, bool vsync, IEventReceiver *receiver) +
    typedef for Function Pointer
  • typedef IrrlichtDevice
    +*IRRCALLCONV * funcptr_createDeviceEx (const SIrrlichtCreationParameters &parameters) +
    typedef for Function Pointer
  • typedef signed short s16 +
    16 bit signed variable.
  • typedef signed int s32 +
    32 bit signed variable.
  • typedef long long s64 +
    64 bit signed variable.
  • typedef signed char s8 +
    8 bit signed variable.
  • typedef unsigned short u16 +
    16 bit unsigned variable.
  • typedef unsigned int u32 +
    32 bit unsigned variable.
  • typedef unsigned long long u64 +
    64 bit unsigned variable.
  • typedef unsigned char u8 +
    8 bit unsigned variable.
+

+Enumerations

+ +

+Functions

+ +

Detailed Description

+

Everything in the Irrlicht Engine can be found in this namespace.

+

As of Irrlicht 1.6, position2d is a synonym for vector2d.

+

You should consider position2d to be deprecated, and use vector2d by preference.

+

Typedef Documentation

+ +
+
+ + + + +
typedef char irr::c8
+
+
+ +

8 bit character variable.

+

This is a typedef for char, it ensures portability of the engine.

+ +

Definition at line 31 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef float irr::f32
+
+
+ +

32 bit floating point variable.

+

This is a typedef for float, it ensures portability of the engine.

+ +

Definition at line 104 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef double irr::f64
+
+
+ +

64 bit floating point variable.

+

This is a typedef for double, it ensures portability of the engine.

+ +

Definition at line 108 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef char irr::fschar_t
+
+
+ +

Type name for character type used by the file system.

+

Should the wide character version of the FileSystem be used it is a 16 bit character variable. Used for unicode Filesystem and unicode strings. Else it is a 8 bit character variable. Used for ansi Filesystem and non-unicode strings

+ +

Definition at line 158 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef IrrlichtDevice* IRRCALLCONV* irr::funcptr_createDevice(video::E_DRIVER_TYPE deviceType, const core::dimension2d< u32 > &windowSize, u32 bits, bool fullscreen, bool stencilbuffer, bool vsync, IEventReceiver *receiver)
+
+
+ +

typedef for Function Pointer

+ +

Definition at line 335 of file irrlicht.h.

+ +
+
+ +
+
+ + + + +
typedef IrrlichtDevice* IRRCALLCONV* irr::funcptr_createDeviceEx(const SIrrlichtCreationParameters &parameters)
+
+
+ +

typedef for Function Pointer

+ +

Definition at line 357 of file irrlicht.h.

+ +
+
+ +
+
+ + + + +
typedef signed short irr::s16
+
+
+ +

16 bit signed variable.

+

This is a typedef for signed short, it ensures portability of the engine.

+ +

Definition at line 48 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef signed int irr::s32
+
+
+ +

32 bit signed variable.

+

This is a typedef for signed int, it ensures portability of the engine.

+ +

Definition at line 66 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef long long irr::s64
+
+
+ +

64 bit signed variable.

+

This is a typedef for 64bit int, it ensures portability of the engine.

+ +

Definition at line 96 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef signed char irr::s8
+
+
+ +

8 bit signed variable.

+

This is a typedef for signed char, it ensures portability of the engine.

+ +

Definition at line 26 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef unsigned short irr::u16
+
+
+ +

16 bit unsigned variable.

+

This is a typedef for unsigned short, it ensures portability of the engine.

+ +

Definition at line 40 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef unsigned int irr::u32
+
+
+ +

32 bit unsigned variable.

+

This is a typedef for unsigned int, it ensures portability of the engine.

+ +

Definition at line 58 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef unsigned long long irr::u64
+
+
+ +

64 bit unsigned variable.

+

This is a typedef for 64bit uint, it ensures portability of the engine.

+ +

Definition at line 82 of file irrTypes.h.

+ +
+
+ +
+
+ + + + +
typedef unsigned char irr::u8
+
+
+ +

8 bit unsigned variable.

+

This is a typedef for unsigned char, it ensures portability of the engine.

+ +

Definition at line 18 of file irrTypes.h.

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum irr::E_DEVICE_TYPE
+
+
+ +

An enum for the different device types supported by the Irrlicht Engine.

+
Enumerator:
+ + + + + + + + +
EIDT_WIN32  +

A device native to Microsoft Windows.

+

This device uses the Win32 API and works in all versions of Windows.

+
EIDT_WINCE  +

A device native to Windows CE devices.

+

This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices

+
EIDT_X11  +

A device native to Unix style operating systems.

+

This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and other operating systems which support X11.

+
EIDT_OSX  +

A device native to Mac OSX.

+

This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above.

+
EIDT_SDL  +

A device which uses Simple DirectMedia Layer.

+

The SDL device works under all platforms supported by SDL but first must be compiled in by defining the IRR_USE_SDL_DEVICE macro in IrrCompileConfig.h

+
EIDT_FRAMEBUFFER  +

A device for raw framebuffer access.

+

Best used with embedded devices and mobile systems. Does not need X11 or other graphical subsystems. May support hw-acceleration via OpenGL-ES for FBDirect

+
EIDT_CONSOLE  +

A simple text only device supported by all platforms.

+

This device allows applications to run from the command line without opening a window. It can render the output of the software drivers to the console as ASCII. It only supports mouse and keyboard in Windows operating systems.

+
EIDT_BEST  +

This selection allows Irrlicht to choose the best device from the ones available.

+

If this selection is chosen then Irrlicht will try to use the IrrlichtDevice native to your operating system. If this is unavailable then the X11, SDL and then console device will be tried. This ensures that Irrlicht will run even if your platform is unsupported, although it may not be able to render anything.

+
+
+
+ +

Definition at line 12 of file EDeviceTypes.h.

+ +
+
+ +
+ +
+ +

Masks for mouse button states.

+
Enumerator:
+ + + + + + +
EMBSM_LEFT  +
EMBSM_RIGHT  +
EMBSM_MIDDLE  +
EMBSM_EXTRA1  +

currently only on windows

+
EMBSM_EXTRA2  +

currently only on windows

+
EMBSM_FORCE_32_BIT  +
+
+
+ +

Definition at line 130 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
enum irr::EEVENT_TYPE
+
+
+ +

Enumeration for all event types there are.

+
Enumerator:
+ + + + + + + +
EET_GUI_EVENT  +

An event of the graphical user interface.

+

GUI events are created by the GUI environment or the GUI elements in response to mouse or keyboard events. When a GUI element receives an event it will either process it and return true, or pass the event to its parent. If an event is not absorbed before it reaches the root element then it will then be passed to the user receiver.

+
EET_MOUSE_INPUT_EVENT  +

A mouse input event.

+

Mouse events are created by the device and passed to IrrlichtDevice::postEventFromUser in response to mouse input received from the operating system. Mouse events are first passed to the user receiver, then to the GUI environment and its elements, then finally the input receiving scene manager where it is passed to the active camera.

+
EET_KEY_INPUT_EVENT  +

A key input event.

+

Like mouse events, keyboard events are created by the device and passed to IrrlichtDevice::postEventFromUser. They take the same path as mouse events.

+
EET_JOYSTICK_INPUT_EVENT  +

A joystick (joypad, gamepad) input event.

+

Joystick events are created by polling all connected joysticks once per device run() and then passing the events to IrrlichtDevice::postEventFromUser. They take the same path as mouse events. Windows, SDL: Implemented. Linux: Implemented, with POV hat issues. MacOS / Other: Not yet implemented.

+
EET_LOG_TEXT_EVENT  +

A log event.

+

Log events are only passed to the user receiver if there is one. If they are absorbed by the user receiver then no text will be sent to the console.

+
EET_USER_EVENT  +

A user event with user data.

+

This is not used by Irrlicht and can be used to send user specific data though the system. The Irrlicht 'window handle' can be obtained from IrrlichtDevice::getExposedVideoData() The usage and behavior depends on the operating system: Windows: send a WM_USER message to the Irrlicht Window; the wParam and lParam will be used to populate the UserData1 and UserData2 members of the SUserEvent. Linux: send a ClientMessage via XSendEvent to the Irrlicht Window; the data.l[0] and data.l[1] members will be casted to s32 and used as UserData1 and UserData2. MacOS: Not yet implemented

+
EGUIET_FORCE_32_BIT  +

This enum is never used, it only forces the compiler to compile these enumeration values to 32 bit.

+
+
+
+ +

Definition at line 15 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
enum irr::EKEY_ACTION
+
+
+ +

enumeration for key actions. Used for example in the FPS Camera.

+
Enumerator:
+ + + + + + + + +
EKA_MOVE_FORWARD  +
EKA_MOVE_BACKWARD  +
EKA_STRAFE_LEFT  +
EKA_STRAFE_RIGHT  +
EKA_JUMP_UP  +
EKA_CROUCH  +
EKA_COUNT  +
EKA_FORCE_32BIT  +

This value is not used. It only forces this enumeration to compile in 32 bit.

+
+
+
+ +

Definition at line 14 of file SKeyMap.h.

+ +
+
+ +
+
+ + + + +
enum irr::EKEY_CODE
+
+
+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KEY_LBUTTON  +
KEY_RBUTTON  +
KEY_CANCEL  +
KEY_MBUTTON  +
KEY_XBUTTON1  +
KEY_XBUTTON2  +
KEY_BACK  +
KEY_TAB  +
KEY_CLEAR  +
KEY_RETURN  +
KEY_SHIFT  +
KEY_CONTROL  +
KEY_MENU  +
KEY_PAUSE  +
KEY_CAPITAL  +
KEY_KANA  +
KEY_HANGUEL  +
KEY_HANGUL  +
KEY_JUNJA  +
KEY_FINAL  +
KEY_HANJA  +
KEY_KANJI  +
KEY_ESCAPE  +
KEY_CONVERT  +
KEY_NONCONVERT  +
KEY_ACCEPT  +
KEY_MODECHANGE  +
KEY_SPACE  +
KEY_PRIOR  +
KEY_NEXT  +
KEY_END  +
KEY_HOME  +
KEY_LEFT  +
KEY_UP  +
KEY_RIGHT  +
KEY_DOWN  +
KEY_SELECT  +
KEY_PRINT  +
KEY_EXECUT  +
KEY_SNAPSHOT  +
KEY_INSERT  +
KEY_DELETE  +
KEY_HELP  +
KEY_KEY_0  +
KEY_KEY_1  +
KEY_KEY_2  +
KEY_KEY_3  +
KEY_KEY_4  +
KEY_KEY_5  +
KEY_KEY_6  +
KEY_KEY_7  +
KEY_KEY_8  +
KEY_KEY_9  +
KEY_KEY_A  +
KEY_KEY_B  +
KEY_KEY_C  +
KEY_KEY_D  +
KEY_KEY_E  +
KEY_KEY_F  +
KEY_KEY_G  +
KEY_KEY_H  +
KEY_KEY_I  +
KEY_KEY_J  +
KEY_KEY_K  +
KEY_KEY_L  +
KEY_KEY_M  +
KEY_KEY_N  +
KEY_KEY_O  +
KEY_KEY_P  +
KEY_KEY_Q  +
KEY_KEY_R  +
KEY_KEY_S  +
KEY_KEY_T  +
KEY_KEY_U  +
KEY_KEY_V  +
KEY_KEY_W  +
KEY_KEY_X  +
KEY_KEY_Y  +
KEY_KEY_Z  +
KEY_LWIN  +
KEY_RWIN  +
KEY_APPS  +
KEY_SLEEP  +
KEY_NUMPAD0  +
KEY_NUMPAD1  +
KEY_NUMPAD2  +
KEY_NUMPAD3  +
KEY_NUMPAD4  +
KEY_NUMPAD5  +
KEY_NUMPAD6  +
KEY_NUMPAD7  +
KEY_NUMPAD8  +
KEY_NUMPAD9  +
KEY_MULTIPLY  +
KEY_ADD  +
KEY_SEPARATOR  +
KEY_SUBTRACT  +
KEY_DECIMAL  +
KEY_DIVIDE  +
KEY_F1  +
KEY_F2  +
KEY_F3  +
KEY_F4  +
KEY_F5  +
KEY_F6  +
KEY_F7  +
KEY_F8  +
KEY_F9  +
KEY_F10  +
KEY_F11  +
KEY_F12  +
KEY_F13  +
KEY_F14  +
KEY_F15  +
KEY_F16  +
KEY_F17  +
KEY_F18  +
KEY_F19  +
KEY_F20  +
KEY_F21  +
KEY_F22  +
KEY_F23  +
KEY_F24  +
KEY_NUMLOCK  +
KEY_SCROLL  +
KEY_LSHIFT  +
KEY_RSHIFT  +
KEY_LCONTROL  +
KEY_RCONTROL  +
KEY_LMENU  +
KEY_RMENU  +
KEY_OEM_1  +
KEY_PLUS  +
KEY_COMMA  +
KEY_MINUS  +
KEY_PERIOD  +
KEY_OEM_2  +
KEY_OEM_3  +
KEY_OEM_4  +
KEY_OEM_5  +
KEY_OEM_6  +
KEY_OEM_7  +
KEY_OEM_8  +
KEY_OEM_AX  +
KEY_OEM_102  +
KEY_ATTN  +
KEY_CRSEL  +
KEY_EXSEL  +
KEY_EREOF  +
KEY_PLAY  +
KEY_ZOOM  +
KEY_PA1  +
KEY_OEM_CLEAR  +
KEY_KEY_CODES_COUNT  +
+
+
+ +

Definition at line 11 of file Keycodes.h.

+ +
+
+ +
+
+ + + + +
enum irr::ELOG_LEVEL
+
+
+

Possible log levels. When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE messages are never filtered and always printed.

+
Enumerator:
+ + + + + +
ELL_DEBUG  +

Used for printing information helpful in debugging.

+
ELL_INFORMATION  +

Useful information to print. For example hardware infos or something started/stopped.

+
ELL_WARNING  +

Warnings that something isn't as expected and can cause oddities.

+
ELL_ERROR  +

Something did go wrong.

+
ELL_NONE  +

Logs with ELL_NONE will never be filtered. And used as filter it will remove all logging except ELL_NONE messages.

+
+
+
+ +

Definition at line 17 of file ILogger.h.

+ +
+
+ +
+
+ + + + +
enum irr::EMOUSE_INPUT_EVENT
+
+
+ +

Enumeration for all mouse input events.

+
Enumerator:
+ + + + + + + + + + + + + + + +
EMIE_LMOUSE_PRESSED_DOWN  +

Left mouse button was pressed down.

+
EMIE_RMOUSE_PRESSED_DOWN  +

Right mouse button was pressed down.

+
EMIE_MMOUSE_PRESSED_DOWN  +

Middle mouse button was pressed down.

+
EMIE_LMOUSE_LEFT_UP  +

Left mouse button was left up.

+
EMIE_RMOUSE_LEFT_UP  +

Right mouse button was left up.

+
EMIE_MMOUSE_LEFT_UP  +

Middle mouse button was left up.

+
EMIE_MOUSE_MOVED  +

The mouse cursor changed its position.

+
EMIE_MOUSE_WHEEL  +

The mouse wheel was moved. Use Wheel value in event data to find out in what direction and how fast.

+
EMIE_LMOUSE_DOUBLE_CLICK  +

Left mouse button double click. This event is generated after the second EMIE_LMOUSE_PRESSED_DOWN event.

+
EMIE_RMOUSE_DOUBLE_CLICK  +

Right mouse button double click. This event is generated after the second EMIE_RMOUSE_PRESSED_DOWN event.

+
EMIE_MMOUSE_DOUBLE_CLICK  +

Middle mouse button double click. This event is generated after the second EMIE_MMOUSE_PRESSED_DOWN event.

+
EMIE_LMOUSE_TRIPLE_CLICK  +

Left mouse button triple click. This event is generated after the third EMIE_LMOUSE_PRESSED_DOWN event.

+
EMIE_RMOUSE_TRIPLE_CLICK  +

Right mouse button triple click. This event is generated after the third EMIE_RMOUSE_PRESSED_DOWN event.

+
EMIE_MMOUSE_TRIPLE_CLICK  +

Middle mouse button triple click. This event is generated after the third EMIE_MMOUSE_PRESSED_DOWN event.

+
EMIE_COUNT  +

No real event. Just for convenience to get number of events.

+
+
+
+ +

Definition at line 74 of file IEventReceiver.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IRRLICHT_API IrrlichtDevice* IRRCALLCONV irr::createDevice (video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE,
const core::dimension2d< u32 > & windowSize = (core::dimension2d< u32 >(640, 480)),
u32 bits = 16,
bool fullscreen = false,
bool stencilbuffer = false,
bool vsync = false,
IEventReceiver * receiver = 0 
)
+
+
+ +

Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.

+

If you need more parameters to be passed to the creation of the Irrlicht Engine device, use the createDeviceEx() function.

+
Parameters:
+ + + + + + + + +
deviceType,:Type of the device. This can currently be video::EDT_NULL, video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, video::EDT_DIRECT3D9 and video::EDT_OPENGL.
windowSize,:Size of the window or the video mode in fullscreen mode.
bits,:Bits per pixel in fullscreen mode. Ignored if windowed mode.
fullscreen,:Should be set to true if the device should run in fullscreen. Otherwise the device runs in windowed mode.
stencilbuffer,:Specifies if the stencil buffer should be enabled. Set this to true, if you want the engine be able to draw stencil buffer shadows. Note that not all devices are able to use the stencil buffer. If they don't no shadows will be drawn.
vsync,:Specifies vertical syncronisation: If set to true, the driver will wait for the vertical retrace period, otherwise not.
receiver,:A user created event receiver.
+
+
+
Returns:
Returns pointer to the created IrrlichtDevice or null if the device could not be created.
+ +
+
+ +
+
+ + + + + + + + +
IRRLICHT_API IrrlichtDevice* IRRCALLCONV irr::createDeviceEx (const SIrrlichtCreationParameters & parameters)
+
+
+ +

Creates an Irrlicht device with the option to specify advanced parameters.

+

Usually you should used createDevice() for creating an Irrlicht Engine device. Use this function only if you wish to specify advanced parameters like a window handle in which the device should be created.

+
Parameters:
+ + +
parameters,:Structure containing advanced parameters for the creation of the device. See irr::SIrrlichtCreationParameters for details.
+
+
+
Returns:
Returns pointer to the created IrrlichtDevice or null if the device could not be created.
+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1core.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1core.html new file mode 100644 index 0000000..c7b8cbe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1core.html @@ -0,0 +1,3476 @@ + + + + +Irrlicht 3D Engine: irr::core Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core Namespace Reference
+
+
+ +

Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace. +More...

+

+Classes

+ +

+Typedefs

+ +

+Enumerations

+ +

+Functions

+ +

+Variables

+ +

Detailed Description

+

Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

+

Typedef Documentation

+ +
+
+ + + + +
typedef aabbox3d<f32> irr::core::aabbox3df
+
+
+ +

Typedef for a f32 3d bounding box.

+ +

Definition at line 324 of file aabbox3d.h.

+ +
+
+ +
+
+ + + + +
typedef aabbox3d<s32> irr::core::aabbox3di
+
+
+ +

Typedef for an integer 3d bounding box.

+ +

Definition at line 326 of file aabbox3d.h.

+ +
+
+ +
+ +
+ +

Typedef for an f32 dimension.

+ +

Definition at line 210 of file dimension2d.h.

+ +
+
+ +
+ +
+ +

Typedef for an integer dimension.

+

There are few cases where negative dimensions make sense. Please consider using dimension2du instead.

+ +

Definition at line 217 of file dimension2d.h.

+ +
+
+ +
+ +
+ +

Typedef for an unsigned integer dimension.

+ +

Definition at line 212 of file dimension2d.h.

+ +
+
+ +
+
+ + + + +
typedef line2d<f32> irr::core::line2df
+
+
+ +

Typedef for an f32 line.

+ +

Definition at line 266 of file line2d.h.

+ +
+
+ +
+
+ + + + +
typedef line2d<s32> irr::core::line2di
+
+
+ +

Typedef for an integer line.

+ +

Definition at line 268 of file line2d.h.

+ +
+
+ +
+
+ + + + +
typedef line3d<f32> irr::core::line3df
+
+
+ +

Typedef for an f32 line.

+ +

Definition at line 136 of file line3d.h.

+ +
+
+ +
+
+ + + + +
typedef line3d<s32> irr::core::line3di
+
+
+ +

Typedef for an integer line.

+ +

Definition at line 138 of file line3d.h.

+ +
+
+ +
+
+ + + + +
typedef CMatrix4<f32> irr::core::matrix4
+
+
+ +

Typedef for f32 matrix.

+ +

Definition at line 2233 of file matrix4.h.

+ +
+
+ +
+
+ + + + +
typedef plane3d<f32> irr::core::plane3df
+
+
+ +

Typedef for a f32 3d plane.

+ +

Definition at line 236 of file plane3d.h.

+ +
+
+ +
+
+ + + + +
typedef plane3d<s32> irr::core::plane3di
+
+
+ +

Typedef for an integer 3d plane.

+ +

Definition at line 239 of file plane3d.h.

+ +
+
+ +
+
+ + + + +
typedef vector2d<f32> irr::core::position2df
+
+
+
Deprecated:
position2d is now a synonym for vector2d, but vector2d should be used directly.
+ +

Definition at line 21 of file position2d.h.

+ +
+
+ +
+
+ + + + +
typedef vector2d<s32> irr::core::position2di
+
+
+
Deprecated:
position2d is now a synonym for vector2d, but vector2d should be used directly.
+ +

Definition at line 24 of file position2d.h.

+ +
+
+ +
+
+ + + + +
typedef rect<f32> irr::core::rectf
+
+
+ +

Rectangle with float values.

+ +

Definition at line 271 of file rect.h.

+ +
+
+ +
+
+ + + + +
typedef rect<s32> irr::core::recti
+
+
+ +

Rectangle with int values.

+ +

Definition at line 273 of file rect.h.

+ +
+
+ +
+
+ + + + +
typedef string<c8> irr::core::stringc
+
+
+ +

Typedef for character strings.

+ +

Definition at line 1358 of file irrString.h.

+ +
+
+ +
+
+ + + + +
typedef string<wchar_t> irr::core::stringw
+
+
+ +

Typedef for wide character strings.

+ +

Definition at line 1361 of file irrString.h.

+ +
+
+ +
+
+ + + + +
typedef triangle3d<f32> irr::core::triangle3df
+
+
+ +

Typedef for a f32 3d triangle.

+ +

Definition at line 270 of file triangle3d.h.

+ +
+
+ +
+
+ + + + +
typedef triangle3d<s32> irr::core::triangle3di
+
+
+ +

Typedef for an integer 3d triangle.

+ +

Definition at line 273 of file triangle3d.h.

+ +
+
+ +
+
+ + + + +
typedef vector2d<f32> irr::core::vector2df
+
+
+ +

Typedef for f32 2d vector.

+ +

Definition at line 323 of file vector2d.h.

+ +
+
+ +
+
+ + + + +
typedef vector2d<s32> irr::core::vector2di
+
+
+ +

Typedef for integer 2d vector.

+ +

Definition at line 326 of file vector2d.h.

+ +
+
+ +
+
+ + + + +
typedef vector3d<f32> irr::core::vector3df
+
+
+ +

Typedef for a f32 3d vector.

+ +

Definition at line 445 of file vector3d.h.

+ +
+
+ +
+
+ + + + +
typedef vector3d<s32> irr::core::vector3di
+
+
+ +

Typedef for an integer 3d vector.

+ +

Definition at line 448 of file vector3d.h.

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum irr::core::eAllocStrategy
+
+
+ +

defines an allocation strategy

+
Enumerator:
+ + + +
ALLOC_STRATEGY_SAFE  +
ALLOC_STRATEGY_DOUBLE  +
ALLOC_STRATEGY_SQRT  +
+
+
+ +

Definition at line 112 of file irrAllocator.h.

+ +
+
+ +
+ +
+ +

Enumeration for intersection relations of 3d objects.

+
Enumerator:
+ + + + + +
ISREL3D_FRONT  +
ISREL3D_BACK  +
ISREL3D_PLANAR  +
ISREL3D_SPANNING  +
ISREL3D_CLIPPED  +
+
+
+ +

Definition at line 17 of file plane3d.h.

+ +
+
+ +
+
+ + + + +
enum irr::core::eLocaleID
+
+
+ +

Very simple string class with some useful features.

+

string<c8> and string<wchar_t> both accept Unicode AND ASCII/Latin-1, so you can assign Unicode to string<c8> and ASCII/Latin-1 to string<wchar_t> (and the other way round) if you want to.

+

However, note that the conversation between both is not done using any encoding. This means that c8 strings are treated as ASCII/Latin-1, not UTF-8, and are simply expanded to the equivalent wchar_t, while Unicode/wchar_t characters are truncated to 8-bit ASCII/Latin-1 characters, discarding all other information in the wchar_t.

+
Enumerator:
+ + +
IRR_LOCALE_ANSI  +
IRR_LOCALE_GERMAN  +
+
+
+ +

Definition at line 32 of file irrString.h.

+ +
+
+

Function Documentation

+ +
+
+
+template<class T >
+ + + + + + + + +
T irr::core::abs_ (const T & a) [inline]
+
+
+ +

returns abs of two values. Own implementation to get rid of STL (VS6 problems)

+ +

Definition at line 151 of file irrMath.h.

+ +

Referenced by equalsByUlp(), and iszero().

+ +
+
+ +
+
+ + + + + + + + +
REALINLINE s32 irr::core::ceil32 (f32 x)
+
+
+ +

Definition at line 646 of file irrMath.h.

+ +
+
+ + + +
+
+ + + + + + + +
REALINLINE void irr::core::clearFPUException ()
+
+
+ +

Definition at line 454 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::core::ctoul16 (char in) [inline]
+
+
+ +

Convert a hex-encoded character to an unsigned integer.

+
Parameters:
+ + +
[in]inThe digit to convert. Only digits 0 to 9 and chars A-F,a-f will be considered.
+
+
+
Returns:
The unsigned integer value of the digit. 0xffffffff if the input is not hex
+ +

Definition at line 125 of file fast_atof.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
io::path& irr::core::cutFilenameExtension (io::path & dest,
const io::path & source 
) [inline]
+
+
+ +

cut the filename extension from a source file path and store it in a dest file path

+ +

Definition at line 49 of file coreutil.h.

+ +

References irr::core::string< T, TAlloc >::findLast(), irr::core::string< T, TAlloc >::size(), and irr::core::string< T, TAlloc >::subString().

+ +

Referenced by irr::scene::quake3::getTextures().

+ +
+
+ +
+
+ + + + + + + + +
f32 irr::core::degToRad (f32 degrees) [inline]
+
+
+ +

Utility function to convert a degrees value to radians.

+

Provided as it can be clearer to write degToRad(X) than DEGTORAD * X

+
Parameters:
+ + +
degreesThe degrees value to convert to radians.
+
+
+ +

Definition at line 107 of file irrMath.h.

+ +

References DEGTORAD.

+ +
+
+ +
+
+ + + + + + + + +
f64 irr::core::degToRad (f64 degrees) [inline]
+
+
+ +

Utility function to convert a degrees value to radians.

+

Provided as it can be clearer to write degToRad(X) than DEGTORAD * X

+
Parameters:
+ + +
degreesThe degrees value to convert to radians.
+
+
+ +

Definition at line 116 of file irrMath.h.

+ +

References DEGTORAD64.

+ +
+
+ +
+
+ + + + + + + + +
io::path& irr::core::deletePathFromFilename (io::path & filename) [inline]
+
+
+ +

delete path from filename

+ +

Definition at line 68 of file coreutil.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and irr::core::string< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
io::path& irr::core::deletePathFromPath (io::path & filename,
s32 pathCount 
) [inline]
+
+
+ +

trim paths

+ +

Definition at line 87 of file coreutil.h.

+ +

References irr::core::string< T, TAlloc >::size(), and irr::core::string< T, TAlloc >::validate().

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::equals (const f32 a,
const f32 b,
const f32 tolerance = ROUNDING_ERROR_f32 
) [inline]
+
+
+ +

returns if a equals b, taking possible rounding errors into account

+ +

Definition at line 191 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::equals (const s32 a,
const s32 b,
const s32 tolerance = ROUNDING_ERROR_S32 
) [inline]
+
+
+ +

returns if a equals b, taking an explicit rounding tolerance into account

+ +

Definition at line 250 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::equals (const u32 a,
const u32 b,
const s32 tolerance = ROUNDING_ERROR_S32 
) [inline]
+
+
+ +

returns if a equals b, taking an explicit rounding tolerance into account

+ +

Definition at line 256 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::equals (const s64 a,
const s64 b,
const s64 tolerance = ROUNDING_ERROR_S64 
) [inline]
+
+
+ +

returns if a equals b, taking an explicit rounding tolerance into account

+ +

Definition at line 263 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::equalsByUlp (f32 a,
f32 b,
int maxUlpDiff 
) [inline]
+
+
+ +

We compare the difference in ULP's (spacing between floating-point numbers, aka ULP=1 means there exists no float between).

+ +

Definition at line 208 of file irrMath.h.

+ +

References abs_(), irr::core::FloatIntUnion32::i, and irr::core::FloatIntUnion32::sign().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
f32 irr::core::f32_max3 (const f32 a,
const f32 b,
const f32 c 
) [inline]
+
+
+ +

Definition at line 708 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
f32 irr::core::f32_min3 (const f32 a,
const f32 b,
const f32 c 
) [inline]
+
+
+ +

Definition at line 713 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
float irr::core::fast_atof (const char * floatAsString,
const char ** out = 0 
) [inline]
+
+
+ +

Convert a string to a floating point number.

+
Parameters:
+ + + +
floatAsStringThe string to convert.
outOptional pointer to the first character in the string that wasn't used to create the float value.
+
+
+
Returns:
Float value parsed from the input string
+ +

Definition at line 350 of file fast_atof.h.

+ +

References fast_atof_move().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
const char* irr::core::fast_atof_move (const char * in,
f32 & result 
) [inline]
+
+
+ +

Provides a fast function for converting a string into a float.

+

This is not guaranteed to be as accurate as atof(), but is approximately 6 to 8 times as fast.

+
Parameters:
+ + + +
[in]inThe string to convert.
[out]resultThe resultant float will be written here.
+
+
+
Returns:
Pointer to the first character in the string that wasn't used to create the float value.
+ +

Definition at line 309 of file fast_atof.h.

+ +

References fast_atof_table, irr::core::string< T, TAlloc >::findFirst(), LOCALE_DECIMAL_POINTS, strtof10(), and strtol10().

+ +

Referenced by fast_atof(), and irr::scene::quake3::getAsFloat().

+ +
+
+ +
+
+ + + + + + + + +
REALINLINE s32 irr::core::floor32 (f32 x)
+
+ +
+ +
+
+ + + + + + + + +
f32 irr::core::FR (u32 x) [inline]
+
+
+ +

Floating-point representation of an integer value.

+ +

Definition at line 363 of file irrMath.h.

+ +

References irr::core::inttofloat::f, and irr::core::inttofloat::u.

+ +

Referenced by irr::video::pack_textureBlendFunc().

+ +
+
+ +
+
+ + + + + + + + +
f32 irr::core::FR (s32 x) [inline]
+
+
+ +

Definition at line 364 of file irrMath.h.

+ +

References irr::core::inttofloat::f, and irr::core::inttofloat::s.

+ +
+
+ +
+
+ + + + + + + + +
f32 irr::core::fract (f32 x) [inline]
+
+
+ +

Definition at line 718 of file irrMath.h.

+ +

Referenced by irr::scene::quake3::SModifierFunction::evaluate().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
io::path& irr::core::getFileNameExtension (io::path & dest,
const io::path & source 
) [inline]
+
+
+ +

get the filename extension from a file path

+ +

Definition at line 57 of file coreutil.h.

+ +

References irr::core::string< T, TAlloc >::findLast(), irr::core::string< T, TAlloc >::size(), and irr::core::string< T, TAlloc >::subString().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool irr::core::hasFileExtension (const io::path & filename,
const io::path & ext0,
const io::path & ext1 = "",
const io::path & ext2 = "" 
) [inline]
+
+
+ +

search if a filename has a proper extension

+ +

Definition at line 40 of file coreutil.h.

+ +

References isFileExtension().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::core::heapsink (T * array,
s32 element,
s32 max 
) [inline]
+
+
+ +

Sinks an element into the heap.

+ +

Definition at line 17 of file heapsort.h.

+ +

Referenced by heapsort().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
void irr::core::heapsort (T * array_,
s32 size 
) [inline]
+
+
+ +

Sorts an array with size 'size' using heapsort.

+ +

Definition at line 41 of file heapsort.h.

+ +

References heapsink().

+ +

Referenced by irr::core::array< IMesh * >::sort().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
REALINLINE u32 irr::core::if_c_a_else_0 (const s32 condition,
const u32 a 
)
+
+
+ +

conditional set based on mask and arithmetic shift

+ +

Definition at line 433 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
REALINLINE u32 irr::core::if_c_a_else_b (const s32 condition,
const u32 a,
const u32 b 
)
+
+
+ +

conditional set based on mask and arithmetic shift

+ +

Definition at line 421 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
REALINLINE u16 irr::core::if_c_a_else_b (const s16 condition,
const u16 a,
const u16 b 
)
+
+
+ +

conditional set based on mask and arithmetic shift

+ +

Definition at line 427 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::core::IR (f32 x) [inline]
+
+
+

code is taken from IceFPU Integer representation of a floating-point value.

+ +

Definition at line 353 of file irrMath.h.

+ +

References irr::core::inttofloat::f, and irr::core::inttofloat::u.

+ +

Referenced by irr::core::CMatrix4< T >::isIdentity_integer_base(), and irr::video::unpack_textureBlendFunc().

+ +
+
+ +
+
+ + + + + + + + +
s32 irr::core::isdigit (s32 c) [inline]
+
+
+ +

some standard function ( to remove dependencies )

+ +

Definition at line 180 of file coreutil.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::core::isFileExtension (const io::path & filename,
const io::path & ext0,
const io::path & ext1,
const io::path & ext2 
) [inline]
+
+
+ +

search if a filename has a proper extension

+ +

Definition at line 23 of file coreutil.h.

+ +

References irr::core::string< T, TAlloc >::equals_substring_ignore_case(), and irr::core::string< T, TAlloc >::findLast().

+ +

Referenced by hasFileExtension().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::isInSameDirectory (const io::path & path,
const io::path & file 
) [inline]
+
+
+

looks if file is in the same directory of path. returns offset of directory. 0 means in same directory. 1 means file is direct child of path

+ +

Definition at line 115 of file coreutil.h.

+ +

References irr::core::string< T, TAlloc >::equalsn(), irr::core::string< T, TAlloc >::findNext(), and irr::core::string< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::isnotzero (const f32 a,
const f32 tolerance = ROUNDING_ERROR_f32 
) [inline]
+
+
+ +

returns if a equals not zero, taking rounding errors into account

+ +

Definition at line 282 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
s32 irr::core::isspace (s32 c) [inline]
+
+
+ +

Definition at line 181 of file coreutil.h.

+ +
+
+ +
+
+ + + + + + + + +
s32 irr::core::isupper (s32 c) [inline]
+
+
+ +

Definition at line 182 of file coreutil.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::iszero (const f64 a,
const f64 tolerance = ROUNDING_ERROR_f64 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::iszero (const f32 a,
const f32 tolerance = ROUNDING_ERROR_f32 
) [inline]
+
+
+ +

returns if a equals zero, taking rounding errors into account

+ +

Definition at line 276 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::iszero (const s32 a,
const s32 tolerance = 0 
) [inline]
+
+
+ +

returns if a equals zero, taking rounding errors into account

+ +

Definition at line 288 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::iszero (const u32 a,
const u32 tolerance = 0 
) [inline]
+
+
+ +

returns if a equals zero, taking rounding errors into account

+ +

Definition at line 294 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool irr::core::iszero (const s64 a,
const s64 tolerance = 0 
) [inline]
+
+
+ +

returns if a equals zero, taking rounding errors into account

+ +

Definition at line 301 of file irrMath.h.

+ +

References abs_().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
T irr::core::lerp (const T & a,
const T & b,
const f32 t 
) [inline]
+
+
+

returns linear interpolation of a and b with ratio t

+
Returns:
: a if t==0, b if t==1, and the linear interpolation else
+ +

Definition at line 159 of file irrMath.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
const T& irr::core::max_ (const T & a,
const T & b 
) [inline]
+
+
+ +

returns maximum of two values. Own implementation to get rid of the STL (VS6 problems)

+ +

Definition at line 137 of file irrMath.h.

+ +

Referenced by clamp(), irr::video::SColorHSL::fromRGB(), irr::video::SColor::getLightness(), and max_().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
const T& irr::core::max_ (const T & a,
const T & b,
const T & c 
) [inline]
+
+
+ +

returns maximum of three values. Own implementation to get rid of the STL (VS6 problems)

+ +

Definition at line 144 of file irrMath.h.

+ +

References max_().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
const T& irr::core::min_ (const T & a,
const T & b 
) [inline]
+
+
+ +

returns minimum of two values. Own implementation to get rid of the STL (VS6 problems)

+ +

Definition at line 123 of file irrMath.h.

+ +

Referenced by clamp(), irr::video::SColorHSL::fromRGB(), irr::video::SColor::getLightness(), min_(), and irr::video::SColor::operator+().

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
const T& irr::core::min_ (const T & a,
const T & b,
const T & c 
) [inline]
+
+
+ +

returns minimum of three values. Own implementation to get rid of the STL (VS6 problems)

+ +

Definition at line 130 of file irrMath.h.

+ +

References min_().

+ +
+
+ +
+
+
+template<class S , class T >
+ + + + + + + + + + + + + + + + + + +
vector2d<T> irr::core::operator* (const S scalar,
const vector2d< T > & vector 
)
+
+
+ +

Definition at line 329 of file vector2d.h.

+ +
+
+ +
+
+
+template<class S , class T >
+ + + + + + + + + + + + + + + + + + +
vector3d<T> irr::core::operator* (const S scalar,
const vector3d< T > & vector 
)
+
+
+ +

Function multiplying a scalar and a vector component-wise.

+ +

Definition at line 452 of file vector3d.h.

+ +
+
+ +
+
+
+template<class T >
+ + + + + + + + + + + + + + + + + + +
CMatrix4<T> irr::core::operator* (const T scalar,
const CMatrix4< T > & mat 
) [inline]
+
+
+ +

Definition at line 2226 of file matrix4.h.

+ +
+
+ +
+
+ + + + + + + + +
f32 irr::core::radToDeg (f32 radians) [inline]
+
+
+ +

Utility function to convert a radian value to degrees.

+

Provided as it can be clearer to write radToDeg(X) than RADTODEG * X

+
Parameters:
+ + +
radiansThe radians value to convert to degrees.
+
+
+ +

Definition at line 89 of file irrMath.h.

+ +

References RADTODEG.

+ +
+
+ +
+
+ + + + + + + + +
f64 irr::core::radToDeg (f64 radians) [inline]
+
+
+ +

Utility function to convert a radian value to degrees.

+

Provided as it can be clearer to write radToDeg(X) than RADTODEG * X

+
Parameters:
+ + +
radiansThe radians value to convert to degrees.
+
+
+ +

Definition at line 98 of file irrMath.h.

+ +

References RADTODEG64.

+ +
+
+ + + +
+
+ + + + + + + + +
REALINLINE f64 irr::core::reciprocal (const f64 f)
+
+
+ +

Definition at line 568 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
REALINLINE f32 irr::core::reciprocal_approxim (const f32 f)
+
+
+ +

Definition at line 575 of file irrMath.h.

+ +
+
+ + + +
+
+ + + + + + + + +
REALINLINE f32 irr::core::reciprocal_squareroot (const f32 f)
+
+
+ +

Definition at line 503 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
REALINLINE s32 irr::core::reciprocal_squareroot (const s32 x)
+
+
+ +

Definition at line 529 of file irrMath.h.

+ +

References reciprocal_squareroot().

+ +
+
+ + + +
+
+ + + + + + + + +
f32 irr::core::round_ (f32 x) [inline]
+
+
+ +

Definition at line 449 of file irrMath.h.

+ +

Referenced by round32().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
s32 irr::core::s32_clamp (s32 value,
s32 low,
s32 high 
) [inline]
+
+
+ +

Definition at line 319 of file irrMath.h.

+ +

References s32_max(), and s32_min().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::s32_max (s32 a,
s32 b 
) [inline]
+
+
+ +

Definition at line 313 of file irrMath.h.

+ +

Referenced by s32_clamp().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::s32_min (s32 a,
s32 b 
) [inline]
+
+
+ +

Definition at line 307 of file irrMath.h.

+ +

Referenced by s32_clamp().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
REALINLINE void irr::core::setbit_cond (u32 & state,
s32 condition,
u32 mask 
)
+
+
+ +

Definition at line 442 of file irrMath.h.

+ +
+
+ + + +
+
+ + + + + + + + +
REALINLINE f64 irr::core::squareroot (const f64 f)
+
+
+ +

Definition at line 477 of file irrMath.h.

+ +
+
+ +
+
+ + + + + + + + +
REALINLINE s32 irr::core::squareroot (const s32 f)
+
+
+ +

Definition at line 483 of file irrMath.h.

+ +

References squareroot().

+ +
+
+ +
+
+ + + + + + + + +
REALINLINE s64 irr::core::squareroot (const s64 f)
+
+
+ +

Definition at line 490 of file irrMath.h.

+ +

References squareroot().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
f32 irr::core::strtof10 (const char * in,
const char ** out = 0 
) [inline]
+
+
+ +

Converts a sequence of digits into a whole positive floating point value.

+

Only digits 0 to 9 are parsed. Parsing stops at any other character, including sign characters or a decimal point.

+
Parameters:
+ + + +
in,:the sequence of digits to convert.
out,:(optional) will be set to point at the first non-converted character.
+
+
+
Returns:
The whole positive floating point representation of the digit sequence.
+ +

Definition at line 258 of file fast_atof.h.

+ +

References FLT_MAX.

+ +

Referenced by fast_atof_move().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
s32 irr::core::strtol10 (const char * in,
const char ** out = 0 
) [inline]
+
+
+ +

Convert a simple string of base 10 digits into a signed 32 bit integer.

+
Parameters:
+ + + +
[in]in,:The string of digits to convert. Only a leading - or + followed by digits 0 to 9 will be considered. Parsing stops at the first non-digit.
[out]out,:(optional) If provided, it will be set to point at the first character not used in the calculation.
+
+
+
Returns:
The signed integer value of the digits. If the string specifies too many digits to encode in an s32 then +INT_MAX or -INT_MAX will be returned.
+ +

Definition at line 89 of file fast_atof.h.

+ +

References strtoul10().

+ +

Referenced by fast_atof_move().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
u32 irr::core::strtoul10 (const char * in,
const char ** out = 0 
) [inline]
+
+
+ +

Convert a simple string of base 10 digits into an unsigned 32 bit integer.

+
Parameters:
+ + + +
[in]in,:The string of digits to convert. No leading chars are allowed, only digits 0 to 9. Parsing stops at the first non-digit.
[out]out,:(optional) If provided, it will be set to point at the first character not used in the calculation.
+
+
+
Returns:
The unsigned integer value of the digits. If the string specifies too many digits to encode in an u32 then INT_MAX will be returned.
+ +

Definition at line 49 of file fast_atof.h.

+ +

Referenced by strtol10(), and strtoul_prefix().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
u32 irr::core::strtoul16 (const char * in,
const char ** out = 0 
) [inline]
+
+
+ +

Convert a simple string of base 16 digits into an unsigned 32 bit integer.

+
Parameters:
+ + + +
[in]in,:The string of digits to convert. No leading chars are allowed, only digits 0 to 9 and chars A-F,a-f are allowed. Parsing stops at the first illegal char.
[out]out,:(optional) If provided, it will be set to point at the first character not used in the calculation.
+
+
+
Returns:
The unsigned integer value of the digits. If the string specifies too many digits to encode in an u32 then INT_MAX will be returned.
+ +

Definition at line 146 of file fast_atof.h.

+ +

Referenced by strtoul_prefix().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
u32 irr::core::strtoul8 (const char * in,
const char ** out = 0 
) [inline]
+
+
+ +

Convert a simple string of base 8 digits into an unsigned 32 bit integer.

+
Parameters:
+ + + +
[in]inThe string of digits to convert. No leading chars are allowed, only digits 0 to 7 are allowed. Parsing stops at the first illegal char.
[out]out(optional) If provided, it will be set to point at the first character not used in the calculation.
+
+
+
Returns:
The unsigned integer value of the digits. If the string specifies too many digits to encode in an u32 then INT_MAX will be returned.
+ +

Definition at line 193 of file fast_atof.h.

+ +

Referenced by strtoul_prefix().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
u32 irr::core::strtoul_prefix (const char * in,
const char ** out = 0 
) [inline]
+
+
+ +

Convert a C-style prefixed string (hex, oct, integer) into an unsigned 32 bit integer.

+
Parameters:
+ + + +
[in]inThe string of digits to convert. If string starts with 0x the hex parser is used, if only leading 0 is used, oct parser is used. In all other cases, the usual unsigned parser is used.
[out]out(optional) If provided, it will be set to point at the first character not used in the calculation.
+
+
+
Returns:
The unsigned integer value of the digits. If the string specifies too many digits to encode in an u32 then INT_MAX will be returned.
+ +

Definition at line 236 of file fast_atof.h.

+ +

References strtoul10(), strtoul16(), and strtoul8().

+ +
+
+ +
+
+
+template<class T1 , class T2 >
+ + + + + + + + + + + + + + + + + + +
void irr::core::swap (T1 & a,
T2 & b 
) [inline]
+
+
+ +

swaps the content of the passed parameters

+ +

Definition at line 177 of file irrMath.h.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const f32 irr::core::DEGTORAD = PI / 180.0f
+
+
+ +

32bit Constant for converting from degrees to radians

+ +

Definition at line 74 of file irrMath.h.

+ +

Referenced by degToRad(), irr::core::CMatrix4< T >::setInverseRotationDegrees(), and irr::core::CMatrix4< T >::setRotationDegrees().

+ +
+
+ +
+
+ + + + +
const f64 irr::core::DEGTORAD64 = PI64 / 180.0
+
+
+ +

64bit constant for converting from degrees to radians (formally known as GRAD_PI2)

+ +

Definition at line 80 of file irrMath.h.

+ +

Referenced by degToRad(), irr::core::vector2d< f32 >::rotateBy(), irr::core::vector3d< f32 >::rotateXYBy(), irr::core::vector3d< f32 >::rotateXZBy(), irr::core::vector3d< f32 >::rotateYZBy(), and irr::core::vector3d< f32 >::rotationToDirection().

+ +
+
+ +
+
+ + + + +
const float irr::core::fast_atof_table[17]
+
+
+Initial value:
 {
+    0.f,
+    0.1f,
+    0.01f,
+    0.001f,
+    0.0001f,
+    0.00001f,
+    0.000001f,
+    0.0000001f,
+    0.00000001f,
+    0.000000001f,
+    0.0000000001f,
+    0.00000000001f,
+    0.000000000001f,
+    0.0000000000001f,
+    0.00000000000001f,
+    0.000000000000001f,
+    0.0000000000000001f
+}
+
+

Definition at line 21 of file fast_atof.h.

+ +

Referenced by fast_atof_move().

+ +
+
+ +
+
+ + + + +
const f32 irr::core::HALF_PI = PI/2.0f
+
+
+ +

Constant for half of PI.

+ +

Definition at line 62 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
IRRLICHT_API const matrix4 irr::core::IdentityMatrix
+
+
+ +

global const identity matrix

+ +

Referenced by irr::video::SMaterialLayer::getTextureMatrix(), and irr::video::SMaterial::getTextureMatrix().

+ +
+
+ +
+ +
+ +

Selection of characters which count as decimal point in fast_atof.

+ +

Referenced by fast_atof_move().

+ +
+
+ +
+
+ + + + +
const f32 irr::core::PI = 3.14159265359f
+
+
+ +

Constant for PI.

+ +

Definition at line 56 of file irrMath.h.

+ +

Referenced by irr::scene::quake3::SModifierFunction::evaluate(), and irr::scene::quake3::getMD3Normal().

+ +
+
+ +
+
+ + + + +
const f64 irr::core::PI64 = 3.1415926535897932384626433832795028841971693993751
+
+
+ +

Constant for 64bit PI.

+ +

Definition at line 68 of file irrMath.h.

+ +

Referenced by irr::core::quaternion::toEuler().

+ +
+
+ +
+
+ + + + +
const f32 irr::core::RADTODEG = 180.0f / PI
+
+
+ +

32bit constant for converting from radians to degrees (formally known as GRAD_PI)

+ +

Definition at line 77 of file irrMath.h.

+ +

Referenced by radToDeg().

+ +
+
+ + + +
+
+ + + + +
const f32 irr::core::RECIPROCAL_PI = 1.0f/PI
+
+
+ +

Constant for reciprocal of PI.

+ +

Definition at line 59 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
const f64 irr::core::RECIPROCAL_PI64 = 1.0/PI64
+
+
+ +

Constant for 64bit reciprocal of PI.

+ +

Definition at line 71 of file irrMath.h.

+ +
+
+ + + +
+
+ + + + +
const f64 irr::core::ROUNDING_ERROR_f64 = 0.00000001
+
+
+ +

Definition at line 50 of file irrMath.h.

+ +

Referenced by irr::core::plane3d< f32 >::getIntersectionWithPlane().

+ +
+
+ +
+
+ + + + +
const s32 irr::core::ROUNDING_ERROR_S32 = 0
+
+
+ +

Rounding error constant often used when comparing f32 values.

+ +

Definition at line 45 of file irrMath.h.

+ +
+
+ +
+
+ + + + +
const s64 irr::core::ROUNDING_ERROR_S64 = 0
+
+
+ +

Definition at line 47 of file irrMath.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1gui.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1gui.html new file mode 100644 index 0000000..a523a58 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1gui.html @@ -0,0 +1,1889 @@ + + + + +Irrlicht 3D Engine: irr::gui Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui Namespace Reference
+
+
+ +

The gui namespace contains useful classes for easy creation of a graphical user interface. +More...

+

+Classes

+ +

+Enumerations

+ +

+Variables

+ +

Detailed Description

+

The gui namespace contains useful classes for easy creation of a graphical user interface.

+

Enumeration Type Documentation

+ +
+ +
+

Close behavior. Default is ECMC_REMOVE

+
Enumerator:
+ + + +
ECMC_IGNORE  +

do nothing - menu stays open

+
ECMC_REMOVE  +

remove the gui element

+
ECMC_HIDE  +

call setVisible(false)

+
+
+
+ +

Definition at line 16 of file IGUIContextMenu.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::ECURSOR_ICON
+
+
+ +

Default icons for cursors.

+
Enumerator:
+ + + + + + + + + + + + + + +
ECI_NORMAL  +
ECI_CROSS  +
ECI_HAND  +
ECI_HELP  +
ECI_IBEAM  +
ECI_NO  +
ECI_WAIT  +
ECI_SIZEALL  +
ECI_SIZENESW  +
ECI_SIZENWSE  +
ECI_SIZENS  +
ECI_SIZEWE  +
ECI_UP  +
ECI_COUNT  +
+
+
+ +

Definition at line 20 of file ICursorControl.h.

+ +
+
+ +
+ +
+ +

platform specific behavior flags for the cursor

+
Enumerator:
+ + +
ECPB_NONE  +

default - no platform specific behavior

+
ECPB_X11_CACHE_UPDATES  +

On X11 try caching cursor updates as XQueryPointer calls can be expensive.

+

Update cursor positions only when the irrlicht timer has been updated or the timer is stopped. This means you usually get one cursor update per device->run() which will be fine in most cases. See this forum-thread for a more detailed explanation: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=45525

+
+
+
+ +

Definition at line 82 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_ALIGNMENT
+
+
+
Enumerator:
+ + + + +
EGUIA_UPPERLEFT  +

Aligned to parent's top or left side (default)

+
EGUIA_LOWERRIGHT  +

Aligned to parent's bottom or right side.

+
EGUIA_CENTER  +

Aligned to the center of parent.

+
EGUIA_SCALE  +

Stretched to fit parent.

+
+
+
+ +

Definition at line 12 of file EGUIAlignment.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_BUTTON_STATE
+
+
+
Enumerator:
+ + + + + + + +
EGBS_BUTTON_UP  +

The button is not pressed.

+
EGBS_BUTTON_DOWN  +

The button is currently pressed down.

+
EGBS_BUTTON_MOUSE_OVER  +

The mouse cursor is over the button.

+
EGBS_BUTTON_MOUSE_OFF  +

The mouse cursor is not over the button.

+
EGBS_BUTTON_FOCUSED  +

The button has the focus.

+
EGBS_BUTTON_NOT_FOCUSED  +

The button doesn't have the focus.

+
EGBS_COUNT  +

not used, counts the number of enumerated items

+
+
+
+ +

Definition at line 23 of file IGUIButton.h.

+ +
+
+ +
+ +
+ +

modes for ordering used when a column header is clicked

+
Enumerator:
+ + + + + + +
EGCO_NONE  +

Do not use ordering.

+
EGCO_CUSTOM  +

Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked.

+
EGCO_ASCENDING  +

Sort it ascending by it's ascii value like: a,b,c,...

+
EGCO_DESCENDING  +

Sort it descending by it's ascii value like: z,x,y,...

+
EGCO_FLIP_ASCENDING_DESCENDING  +

Sort it ascending on first click, descending on next, etc.

+
EGCO_COUNT  +

Not used as mode, only to get maximum value for this enum.

+
+
+
+ +

Definition at line 19 of file IGUITable.h.

+ +
+
+ +
+ +
+ +

Enumeration for skin colors.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
EGDC_3D_DARK_SHADOW  +

Dark shadow for three-dimensional display elements.

+
EGDC_3D_SHADOW  +

Shadow color for three-dimensional display elements (for edges facing away from the light source).

+
EGDC_3D_FACE  +

Face color for three-dimensional display elements and for dialog box backgrounds.

+
EGDC_3D_HIGH_LIGHT  +

Highlight color for three-dimensional display elements (for edges facing the light source.)

+
EGDC_3D_LIGHT  +

Light color for three-dimensional display elements (for edges facing the light source.)

+
EGDC_ACTIVE_BORDER  +

Active window border.

+
EGDC_ACTIVE_CAPTION  +

Active window title bar text.

+
EGDC_APP_WORKSPACE  +

Background color of multiple document interface (MDI) applications.

+
EGDC_BUTTON_TEXT  +

Text on a button.

+
EGDC_GRAY_TEXT  +

Grayed (disabled) text.

+
EGDC_HIGH_LIGHT  +

Item(s) selected in a control.

+
EGDC_HIGH_LIGHT_TEXT  +

Text of item(s) selected in a control.

+
EGDC_INACTIVE_BORDER  +

Inactive window border.

+
EGDC_INACTIVE_CAPTION  +

Inactive window caption.

+
EGDC_TOOLTIP  +

Tool tip text color.

+
EGDC_TOOLTIP_BACKGROUND  +

Tool tip background color.

+
EGDC_SCROLLBAR  +

Scrollbar gray area.

+
EGDC_WINDOW  +

Window background.

+
EGDC_WINDOW_SYMBOL  +

Window symbols like on close buttons, scroll bars and check boxes.

+
EGDC_ICON  +

Icons in a list or tree.

+
EGDC_ICON_HIGH_LIGHT  +

Selected icons in a list or tree.

+
EGDC_GRAY_WINDOW_SYMBOL  +

Grayed (disabled) window symbols like on close buttons, scroll bars and check boxes.

+
EGDC_EDITABLE  +

Window background for editable field (editbox, checkbox-field)

+
EGDC_GRAY_EDITABLE  +

Grayed (disabled) window background for editable field (editbox, checkbox-field)

+
EGDC_FOCUSED_EDITABLE  +

Show focus of window background for editable field (editbox or when checkbox-field is pressed)

+
EGDC_COUNT  +

this value is not used, it only specifies the amount of default colors available.

+
+
+
+ +

Definition at line 60 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_DEFAULT_FONT
+
+
+
Enumerator:
+ + + + + + +
EGDF_DEFAULT  +

For static text, edit boxes, lists and most other places.

+
EGDF_BUTTON  +

Font for buttons.

+
EGDF_WINDOW  +

Font for window title bars.

+
EGDF_MENU  +

Font for menu items.

+
EGDF_TOOLTIP  +

Font for tooltips.

+
EGDF_COUNT  +

this value is not used, it only specifies the amount of default fonts available.

+
+
+
+ +

Definition at line 350 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_DEFAULT_ICON
+
+
+ +

Customizable symbols for GUI.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + +
EGDI_WINDOW_MAXIMIZE  +

maximize window button

+
EGDI_WINDOW_RESTORE  +

restore window button

+
EGDI_WINDOW_CLOSE  +

close window button

+
EGDI_WINDOW_MINIMIZE  +

minimize window button

+
EGDI_WINDOW_RESIZE  +

resize icon for bottom right corner of a window

+
EGDI_CURSOR_UP  +

scroll bar up button

+
EGDI_CURSOR_DOWN  +

scroll bar down button

+
EGDI_CURSOR_LEFT  +

scroll bar left button

+
EGDI_CURSOR_RIGHT  +

scroll bar right button

+
EGDI_MENU_MORE  +

icon for menu children

+
EGDI_CHECK_BOX_CHECKED  +

tick for checkbox

+
EGDI_DROP_DOWN  +

down arrow for dropdown menus

+
EGDI_SMALL_CURSOR_UP  +

smaller up arrow

+
EGDI_SMALL_CURSOR_DOWN  +

smaller down arrow

+
EGDI_RADIO_BUTTON_CHECKED  +

selection dot in a radio button

+
EGDI_MORE_LEFT  +

<< icon indicating there is more content to the left

+
EGDI_MORE_RIGHT  +

>> icon indicating that there is more content to the right

+
EGDI_MORE_UP  +

icon indicating that there is more content above

+
EGDI_MORE_DOWN  +

icon indicating that there is more content below

+
EGDI_EXPAND  +

plus icon for trees

+
EGDI_COLLAPSE  +

minus icon for trees

+
EGDI_FILE  +

file icon for file selection

+
EGDI_DIRECTORY  +

folder icon for file selection

+
EGDI_COUNT  +

value not used, it only specifies the number of icons

+
+
+
+ +

Definition at line 267 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_DEFAULT_SIZE
+
+
+ +

Enumeration for default sizes.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + +
EGDS_SCROLLBAR_SIZE  +

default with / height of scrollbar

+
EGDS_MENU_HEIGHT  +

height of menu

+
EGDS_WINDOW_BUTTON_WIDTH  +

width of a window button

+
EGDS_CHECK_BOX_WIDTH  +

width of a checkbox check

+
EGDS_MESSAGE_BOX_WIDTH  +
Deprecated:
This may be removed by Irrlicht 1.9
+
EGDS_MESSAGE_BOX_HEIGHT  +
Deprecated:
This may be removed by Irrlicht 1.9
+
EGDS_BUTTON_WIDTH  +

width of a default button

+
EGDS_BUTTON_HEIGHT  +

height of a default button

+
EGDS_TEXT_DISTANCE_X  +

distance for text from background

+
EGDS_TEXT_DISTANCE_Y  +

distance for text from background

+
EGDS_TITLEBARTEXT_DISTANCE_X  +

distance for text in the title bar, from the left of the window rect

+
EGDS_TITLEBARTEXT_DISTANCE_Y  +

distance for text in the title bar, from the top of the window rect

+
EGDS_MESSAGE_BOX_GAP_SPACE  +

free space in a messagebox between borders and contents on all sides

+
EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH  +

minimal space to reserve for messagebox text-width

+
EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH  +

maximal space to reserve for messagebox text-width

+
EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT  +

minimal space to reserve for messagebox text-height

+
EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT  +

maximal space to reserve for messagebox text-height

+
EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X  +

pixels to move the button image to the right when a pushbutton is pressed

+
EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y  +

pixels to move the button image down when a pushbutton is pressed

+
EGDS_BUTTON_PRESSED_TEXT_OFFSET_X  +

pixels to move the button text to the right when a pushbutton is pressed

+
EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y  +

pixels to move the button text down when a pushbutton is pressed

+
EGDS_COUNT  +

this value is not used, it only specifies the amount of default sizes available.

+
+
+
+ +

Definition at line 150 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_DEFAULT_TEXT
+
+
+
Enumerator:
+ + + + + + + + + +
EGDT_MSG_BOX_OK  +

Text for the OK button on a message box.

+
EGDT_MSG_BOX_CANCEL  +

Text for the Cancel button on a message box.

+
EGDT_MSG_BOX_YES  +

Text for the Yes button on a message box.

+
EGDT_MSG_BOX_NO  +

Text for the No button on a message box.

+
EGDT_WINDOW_CLOSE  +

Tooltip text for window close button.

+
EGDT_WINDOW_MAXIMIZE  +

Tooltip text for window maximize button.

+
EGDT_WINDOW_MINIMIZE  +

Tooltip text for window minimize button.

+
EGDT_WINDOW_RESTORE  +

Tooltip text for window restore button.

+
EGDT_COUNT  +

this value is not used, it only specifies the number of default texts

+
+
+
+ +

Definition at line 229 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_ELEMENT_TYPE
+
+
+ +

List of all basic Irrlicht GUI elements.

+

An IGUIElement returns this when calling IGUIElement::getType();

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
EGUIET_BUTTON  +

A button (IGUIButton)

+
EGUIET_CHECK_BOX  +

A check box (IGUICheckBox)

+
EGUIET_COMBO_BOX  +

A combo box (IGUIComboBox)

+
EGUIET_CONTEXT_MENU  +

A context menu (IGUIContextMenu)

+
EGUIET_MENU  +

A menu (IGUIMenu)

+
EGUIET_EDIT_BOX  +

An edit box (IGUIEditBox)

+
EGUIET_FILE_OPEN_DIALOG  +

A file open dialog (IGUIFileOpenDialog)

+
EGUIET_COLOR_SELECT_DIALOG  +

A color select open dialog (IGUIColorSelectDialog)

+
EGUIET_IN_OUT_FADER  +

A in/out fader (IGUIInOutFader)

+
EGUIET_IMAGE  +

An image (IGUIImage)

+
EGUIET_LIST_BOX  +

A list box (IGUIListBox)

+
EGUIET_MESH_VIEWER  +

A mesh viewer (IGUIMeshViewer)

+
EGUIET_MESSAGE_BOX  +

A message box (IGUIWindow)

+
EGUIET_MODAL_SCREEN  +

A modal screen.

+
EGUIET_SCROLL_BAR  +

A scroll bar (IGUIScrollBar)

+
EGUIET_SPIN_BOX  +

A spin box (IGUISpinBox)

+
EGUIET_STATIC_TEXT  +

A static text (IGUIStaticText)

+
EGUIET_TAB  +

A tab (IGUITab)

+
EGUIET_TAB_CONTROL  +

A tab control.

+
EGUIET_TABLE  +

A Table.

+
EGUIET_TOOL_BAR  +

A tool bar (IGUIToolBar)

+
EGUIET_TREE_VIEW  +

A Tree View.

+
EGUIET_WINDOW  +

A window.

+
EGUIET_ELEMENT  +

Unknown type.

+
EGUIET_ROOT  +

The root of the GUI.

+
EGUIET_COUNT  +

Not an element, amount of elements in there.

+
EGUIET_FORCE_32_BIT  +

This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.

+
+
+
+ +

Definition at line 17 of file EGUIElementTypes.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_EVENT_TYPE
+
+
+ +

Enumeration for all events which are sendable by the gui system.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EGET_ELEMENT_FOCUS_LOST  +

A gui element has lost its focus.

+

GUIEvent.Caller is losing the focus to GUIEvent.Element. If the event is absorbed then the focus will not be changed.

+
EGET_ELEMENT_FOCUSED  +

A gui element has got the focus.

+

If the event is absorbed then the focus will not be changed.

+
EGET_ELEMENT_HOVERED  +

The mouse cursor hovered over a gui element.

+

If an element has sub-elements you also get this message for the subelements

+
EGET_ELEMENT_LEFT  +

The mouse cursor left the hovered element.

+

If an element has sub-elements you also get this message for the subelements

+
EGET_ELEMENT_CLOSED  +

An element would like to close.

+

Windows and context menus use this event when they would like to close, this can be cancelled by absorbing the event.

+
EGET_BUTTON_CLICKED  +

A button was clicked.

+
EGET_SCROLL_BAR_CHANGED  +

A scrollbar has changed its position.

+
EGET_CHECKBOX_CHANGED  +

A checkbox has changed its check state.

+
EGET_LISTBOX_CHANGED  +

A new item in a listbox was selected.

+

NOTE: You also get this event currently when the same item was clicked again after more than 500 ms.

+
EGET_LISTBOX_SELECTED_AGAIN  +

An item in the listbox was selected, which was already selected.

+

NOTE: You get the event currently only if the item was clicked again within 500 ms or selected by "enter" or "space".

+
EGET_FILE_SELECTED  +

A file has been selected in the file dialog.

+
EGET_DIRECTORY_SELECTED  +

A directory has been selected in the file dialog.

+
EGET_FILE_CHOOSE_DIALOG_CANCELLED  +

A file open dialog has been closed without choosing a file.

+
EGET_MESSAGEBOX_YES  +

'Yes' was clicked on a messagebox

+
EGET_MESSAGEBOX_NO  +

'No' was clicked on a messagebox

+
EGET_MESSAGEBOX_OK  +

'OK' was clicked on a messagebox

+
EGET_MESSAGEBOX_CANCEL  +

'Cancel' was clicked on a messagebox

+
EGET_EDITBOX_ENTER  +

In an editbox 'ENTER' was pressed.

+
EGET_EDITBOX_CHANGED  +

The text in an editbox was changed. This does not include automatic changes in text-breaking.

+
EGET_EDITBOX_MARKING_CHANGED  +

The marked area in an editbox was changed.

+
EGET_TAB_CHANGED  +

The tab was changed in an tab control.

+
EGET_MENU_ITEM_SELECTED  +

A menu item was selected in a (context) menu.

+
EGET_COMBO_BOX_CHANGED  +

The selection in a combo box has been changed.

+
EGET_SPINBOX_CHANGED  +

The value of a spin box has changed.

+
EGET_TABLE_CHANGED  +

A table has changed.

+
EGET_TABLE_HEADER_CHANGED  +
EGET_TABLE_SELECTED_AGAIN  +
EGET_TREEVIEW_NODE_DESELECT  +

A tree view node lost selection. See IGUITreeView::getLastEventNode().

+
EGET_TREEVIEW_NODE_SELECT  +

A tree view node was selected. See IGUITreeView::getLastEventNode().

+
EGET_TREEVIEW_NODE_EXPAND  +

A tree view node was expanded. See IGUITreeView::getLastEventNode().

+
EGET_TREEVIEW_NODE_COLLAPSE  +

A tree view node was collapsed. See IGUITreeView::getLastEventNode().

+
EGET_TREEVIEW_NODE_COLLAPS  +

deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead. This may be removed by Irrlicht 1.9

+
EGET_COUNT  +

No real event. Just for convenience to get number of events.

+
+
+
+ +

Definition at line 151 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_FONT_TYPE
+
+
+ +

An enum for the different types of GUI font.

+
Enumerator:
+ + + + +
EGFT_BITMAP  +

Bitmap fonts loaded from an XML file or a texture.

+
EGFT_VECTOR  +

Scalable vector fonts loaded from an XML file.

+

These fonts reside in system memory and use no video memory until they are displayed. These are slower than bitmap fonts but can be easily scaled and rotated.

+
EGFT_OS  +

A font which uses a the native API provided by the operating system.

+

Currently not used.

+
EGFT_CUSTOM  +

An external font type provided by the user.

+
+
+
+ +

Definition at line 19 of file IGUIFont.h.

+ +
+
+ +
+ +
+ +

Enumeration for listbox colors.

+
Enumerator:
+ + + + + +
EGUI_LBC_TEXT  +

Color of text.

+
EGUI_LBC_TEXT_HIGHLIGHT  +

Color of selected text.

+
EGUI_LBC_ICON  +

Color of icon.

+
EGUI_LBC_ICON_HIGHLIGHT  +

Color of selected icon.

+
EGUI_LBC_COUNT  +

Not used, just counts the number of available colors.

+
+
+
+ +

Definition at line 18 of file IGUIListBox.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + + +
EGOM_NONE  +

No element ordering.

+
EGOM_ASCENDING  +

Elements are ordered from the smallest to the largest.

+
EGOM_DESCENDING  +

Elements are ordered from the largest to the smallest.

+
EGOM_COUNT  +

this value is not used, it only specifies the amount of default ordering types available.

+
+
+
+ +

Definition at line 51 of file IGUITable.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EGUI_SKIN_TYPE
+
+
+ +

Enumeration of available default skins.

+

To set one of the skins, use the following code, for example to set the Windows classic skin:

+
    gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC);
+    environment->setSkin(newskin);
+    newskin->drop();
+
Enumerator:
+ + + + + +
EGST_WINDOWS_CLASSIC  +

Default windows look and feel.

+
EGST_WINDOWS_METALLIC  +

Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons.

+
EGST_BURNING_SKIN  +

Burning's skin.

+
EGST_UNKNOWN  +

An unknown skin, not serializable at present.

+
EGST_COUNT  +

this value is not used, it only specifies the number of skin types

+
+
+
+ +

Definition at line 30 of file IGUISkin.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + + +
EGTDF_ROWS  +
EGTDF_COLUMNS  +
EGTDF_ACTIVE_ROW  +
EGTDF_COUNT  +
+
+
+ +

Definition at line 75 of file IGUITable.h.

+ +
+
+ +
+
+ + + + +
enum irr::gui::EMESSAGE_BOX_FLAG
+
+
+ +

enumeration for message box layout flags

+
Enumerator:
+ + + + + +
EMBF_OK  +

Flag for the ok button.

+
EMBF_CANCEL  +

Flag for the cancel button.

+
EMBF_YES  +

Flag for the yes button.

+
EMBF_NO  +

Flag for the no button.

+
EMBF_FORCE_32BIT  +

This value is not used. It only forces this enumeration to compile in 32 bit.

+
+
+
+ +

Definition at line 14 of file EMessageBoxFlags.h.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const c8* const irr::gui::GUIAlignmentNames[]
+
+
+Initial value:
+{
+    "upperLeft",
+    "lowerRight",
+    "center",
+    "scale",
+    0
+}
+
+

Names for alignments.

+ +

Definition at line 25 of file EGUIAlignment.h.

+ +

Referenced by irr::gui::IGUIElement::deserializeAttributes(), and irr::gui::IGUIElement::serializeAttributes().

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUIButtonStateNames[]
+
+
+Initial value:
+    {
+        "buttonUp",
+        "buttonDown",
+        "buttonMouseOver",
+        "buttonMouseOff",
+        "buttonFocused",
+        "buttonNotFocused",
+        0,
+        0,
+    }
+
+

Names for gui button state icons.

+ +

Definition at line 42 of file IGUIButton.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUIColumnOrderingNames[]
+
+
+Initial value:
+    {
+        "none",
+        "custom",
+        "ascend",
+        "descend",
+        "ascend_descend",
+        0,
+    }
+
+

Names for EGUI_COLUMN_ORDERING types.

+ +

Definition at line 41 of file IGUITable.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUICursorIconNames[ECI_COUNT+1]
+
+
+Initial value:
+    {
+        "normal",
+        "cross",
+        "hand",
+        "help",
+        "ibeam",
+        "no",
+        "wait",
+        "sizeall",
+        "sizenesw",
+        "sizenwse",
+        "sizens",
+        "sizewe",
+        "sizeup",
+        0
+    }
+
+

Names for ECURSOR_ICON.

+ +

Definition at line 45 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUIElementTypeNames[]
+
+
+Initial value:
+{
+    "button",
+    "checkBox",
+    "comboBox",
+    "contextMenu",
+    "menu",
+    "editBox",
+    "fileOpenDialog",
+    "colorSelectDialog",
+    "inOutFader",
+    "image",
+    "listBox",
+    "meshViewer",
+    "messageBox",
+    "modalScreen",
+    "scrollBar",
+    "spinBox",
+    "staticText",
+    "tab",
+    "tabControl",
+    "table",
+    "toolBar",
+    "treeview",
+    "window",
+    "element",
+    "root",
+    0
+}
+
+

Names for built-in element types.

+ +

Definition at line 103 of file EGUIElementTypes.h.

+ +

Referenced by irr::gui::IGUIElement::getTypeName().

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUIOrderingModeNames[]
+
+
+Initial value:
+    {
+        "none",
+        "ascending",
+        "descending",
+        0
+    }
+
+

Definition at line 67 of file IGUITable.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUISkinColorNames[EGDC_COUNT+1]
+
+
+Initial value:
+    {
+        "3DDarkShadow",
+        "3DShadow",
+        "3DFace",
+        "3DHighlight",
+        "3DLight",
+        "ActiveBorder",
+        "ActiveCaption",
+        "AppWorkspace",
+        "ButtonText",
+        "GrayText",
+        "Highlight",
+        "HighlightText",
+        "InactiveBorder",
+        "InactiveCaption",
+        "ToolTip",
+        "ToolTipBackground",
+        "ScrollBar",
+        "Window",
+        "WindowSymbol",
+        "Icon",
+        "IconHighlight",
+        "GrayWindowSymbol",
+        "Editable",
+        "GrayEditable",
+        "FocusedEditable",
+        0,
+    }
+
+

Names for default skin colors.

+ +

Definition at line 119 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUISkinFontNames[EGDF_COUNT+1]
+
+
+Initial value:
+    {
+        "defaultFont",
+        "buttonFont",
+        "windowFont",
+        "menuFont",
+        "tooltipFont",
+        0
+    }
+
+

Definition at line 367 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUISkinIconNames[EGDI_COUNT+1]
+
+
+Initial value:
+    {
+        "windowMaximize",
+        "windowRestore",
+        "windowClose",
+        "windowMinimize",
+        "windowResize",
+        "cursorUp",
+        "cursorDown",
+        "cursorLeft",
+        "cursorRight",
+        "menuMore",
+        "checkBoxChecked",
+        "dropDown",
+        "smallCursorUp",
+        "smallCursorDown",
+        "radioButtonChecked",
+        "moreLeft",
+        "moreRight",
+        "moreUp",
+        "moreDown",
+        "expand",
+        "collapse",
+        "file",
+        "directory",
+        0
+    }
+
+

Definition at line 321 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUISkinSizeNames[EGDS_COUNT+1]
+
+
+Initial value:
+    {
+        "ScrollBarSize",
+        "MenuHeight",
+        "WindowButtonWidth",
+        "CheckBoxWidth",
+        "MessageBoxWidth",
+        "MessageBoxHeight",
+        "ButtonWidth",
+        "ButtonHeight",
+        "TextDistanceX",
+        "TextDistanceY",
+        "TitleBarTextX",
+        "TitleBarTextY",
+        "MessageBoxGapSpace",
+        "MessageBoxMinTextWidth",
+        "MessageBoxMaxTextWidth",
+        "MessageBoxMinTextHeight",
+        "MessageBoxMaxTextHeight",
+        "ButtonPressedImageOffsetX",
+        "ButtonPressedImageOffsetY"
+        "ButtonPressedTextOffsetX",
+        "ButtonPressedTextOffsetY",
+        0
+    }
+
+

Names for default skin sizes.

+ +

Definition at line 202 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUISkinTextNames[EGDT_COUNT+1]
+
+
+Initial value:
+    {
+        "MessageBoxOkay",
+        "MessageBoxCancel",
+        "MessageBoxYes",
+        "MessageBoxNo",
+        "WindowButtonClose",
+        "WindowButtonMaximize",
+        "WindowButtonMinimize",
+        "WindowButtonRestore",
+        0
+    }
+
+

Names for default skin sizes.

+ +

Definition at line 253 of file IGUISkin.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::gui::GUISkinTypeNames[EGST_COUNT+1]
+
+
+Initial value:
+    {
+        "windowsClassic",
+        "windowsMetallic",
+        "burning",
+        "unknown",
+        0,
+    }
+
+

Names for gui element types.

+ +

Definition at line 49 of file IGUISkin.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1io.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1io.html new file mode 100644 index 0000000..1998743 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1io.html @@ -0,0 +1,1082 @@ + + + + +Irrlicht 3D Engine: irr::io Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io Namespace Reference
+
+
+ +

This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ... +More...

+

+Classes

+ +

+Typedefs

+ +

+Enumerations

+ +

+Functions

+ +

Detailed Description

+

This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

+

Typedef Documentation

+ +
+
+ + + + +
typedef xmlChar<unsigned short> irr::io::char16
+
+
+ +

defines the utf-16 type.

+

Not using wchar_t for this because wchar_t has 16 bit on windows and 32 bit on other operating systems.

+ +

Definition at line 397 of file irrXML.h.

+ +
+
+ +
+
+ + + + +
typedef xmlChar<unsigned int> irr::io::char32
+
+
+ +

defines the utf-32 type.

+

Not using wchar_t for this because wchar_t has 16 bit on windows and 32 bit on other operating systems.

+ +

Definition at line 402 of file irrXML.h.

+ +
+
+ +
+
+ + + + +
typedef IIrrXMLReader<char, IXMLBase> irr::io::IrrXMLReader
+
+
+ +

A UTF-8 or ASCII character xml parser.

+

This means that all character data will be returned in 8 bit ASCII or UTF-8 by this parser. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. Create an instance of this with createIrrXMLReader(); See IIrrXMLReader for description on how to use it.

+ +

Definition at line 410 of file irrXML.h.

+ +
+
+ +
+ +
+ +

A UTF-16 xml parser.

+

This means that all character data will be returned in UTF-16 by this parser. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. Create an instance of this with createIrrXMLReaderUTF16(); See IIrrXMLReader for description on how to use it.

+ +

Definition at line 418 of file irrXML.h.

+ +
+
+ +
+ +
+ +

A UTF-32 xml parser.

+

This means that all character data will be returned in UTF-32 by this parser. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. Create an instance of this with createIrrXMLReaderUTF32(); See IIrrXMLReader for description on how to use it.

+ +

Definition at line 426 of file irrXML.h.

+ +
+
+ +
+
+ + + + +
typedef IIrrXMLReader<wchar_t, IReferenceCounted> irr::io::IXMLReader
+
+
+ +

An xml reader for wide characters, derived from IReferenceCounted.

+

This XML Parser can read any type of text files from any source Irrlicht can read. Just call IFileSystem::createXMLReader(). For more informations on how to use the parser, see IIrrXMLReader

+ +

Definition at line 19 of file IXMLReader.h.

+ +
+
+ +
+ +
+ +

An xml reader for ASCII or UTF-8 characters, derived from IReferenceCounted.

+

This XML Parser can read any type of text files from any source Irrlicht can read. Just call IFileSystem::createXMLReaderUTF8(). For more informations on how to use the parser, see IIrrXMLReader

+ +

Definition at line 25 of file IXMLReader.h.

+ +
+
+ +
+
+ + + + +
typedef core::string<fschar_t> irr::io::path
+
+
+ +

Type used for all file system related strings.

+

This type will transparently handle different file system encodings.

+ +

Definition at line 17 of file path.h.

+ +
+
+

Enumeration Type Documentation

+ +
+ +
+ +

Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object.

+
Enumerator:
+ + + +
EARWF_FOR_FILE  +

Serialization/Deserializion is done for an xml file.

+
EARWF_FOR_EDITOR  +

Serialization/Deserializion is done for an editor property box.

+
EARWF_USE_RELATIVE_PATHS  +

When writing filenames, relative paths should be used.

+
+
+
+ +

Definition at line 20 of file IAttributeExchangingObject.h.

+ +
+
+ +
+
+ + + + +
enum irr::io::E_ATTRIBUTE_TYPE
+
+
+ +

Types of attributes available for IAttributes.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
EAT_INT  +
EAT_FLOAT  +
EAT_STRING  +
EAT_BOOL  +
EAT_ENUM  +
EAT_COLOR  +
EAT_COLORF  +
EAT_VECTOR3D  +
EAT_POSITION2D  +
EAT_VECTOR2D  +
EAT_RECT  +
EAT_MATRIX  +
EAT_QUATERNION  +
EAT_BBOX  +
EAT_PLANE  +
EAT_TRIANGLE3D  +
EAT_LINE2D  +
EAT_LINE3D  +
EAT_STRINGWARRAY  +
EAT_FLOATARRAY  +
EAT_INTARRAY  +
EAT_BINARY  +
EAT_TEXTURE  +
EAT_USER_POINTER  +
EAT_DIMENSION2D  +
EAT_COUNT  +
EAT_UNKNOWN  +
+
+
+ +

Definition at line 14 of file EAttributes.h.

+ +
+
+ +
+ +
+ +

Contains the different types of archives.

+
Enumerator:
+ + + + + + + + +
EFAT_ZIP  +

A PKZIP archive.

+
EFAT_GZIP  +

A gzip archive.

+
EFAT_FOLDER  +

A virtual directory.

+
EFAT_PAK  +

An ID Software PAK archive.

+
EFAT_NPK  +

A Nebula Device archive.

+
EFAT_TAR  +

A Tape ARchive.

+
EFAT_WAD  +

A wad Archive, Quake2, Halflife.

+
EFAT_UNKNOWN  +

The type of this archive is unknown.

+
+
+
+ +

Definition at line 25 of file IFileArchive.h.

+ +
+
+ +
+
+ + + + +
enum irr::io::EFileSystemType
+
+
+ +

FileSystemType: which Filesystem should be used for e.g. browsing.

+
Enumerator:
+ + +
FILESYSTEM_NATIVE  +
FILESYSTEM_VIRTUAL  +
+
+
+ +

Definition at line 18 of file IFileArchive.h.

+ +
+
+ +
+
+ + + + +
enum irr::io::ETEXT_FORMAT
+
+
+ +

Enumeration of all supported source text file formats.

+
Enumerator:
+ + + + + + +
ETF_ASCII  +

ASCII, file without byte order mark, or not a text file.

+
ETF_UTF8  +

UTF-8 format.

+
ETF_UTF16_BE  +

UTF-16 format, big endian.

+
ETF_UTF16_LE  +

UTF-16 format, little endian.

+
ETF_UTF32_BE  +

UTF-32 format, big endian.

+
ETF_UTF32_LE  +

UTF-32 format, little endian.

+
+
+
+ +

Definition at line 158 of file irrXML.h.

+ +
+
+ +
+
+ + + + +
enum irr::io::EXML_NODE
+
+
+ +

Enumeration for all xml nodes which are parsed by IrrXMLReader.

+
Enumerator:
+ + + + + + + +
EXN_NONE  +

No xml node. This is usually the node if you did not read anything yet.

+
EXN_ELEMENT  +

An xml element such as <foo>.

+
EXN_ELEMENT_END  +

End of an xml element such as </foo>.

+
EXN_TEXT  +

Text within an xml element: <foo> this is the text. </foo> Also text between 2 xml elements: </foo> this is the text. <foo>

+
EXN_COMMENT  +

An xml comment like <!-- I am a comment --> or a DTD definition.

+
EXN_CDATA  +

An xml cdata section like <![CDATA[ this is some CDATA ]]>.

+
EXN_UNKNOWN  +

Unknown element.

+
+
+
+ +

Definition at line 181 of file irrXML.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
IRRLICHT_API IrrXMLReader* IRRCALLCONV irr::io::createIrrXMLReader (const char * filename)
+
+
+ +

Creates an instance of an UFT-8 or ASCII character xml parser.

+

This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.

+
Parameters:
+ + +
filename,:Name of file to be opened.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + +
IRRLICHT_API IrrXMLReader* IRRCALLCONV irr::io::createIrrXMLReader (FILE * file)
+
+
+ +

Creates an instance of an UFT-8 or ASCII character xml parser.

+

This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.

+
Parameters:
+ + +
file,:Pointer to opened file, must have been opened in binary mode, e.g. using fopen("foo.bar", "wb"); The file will not be closed after it has been read.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
IRRLICHT_API IrrXMLReader* IRRCALLCONV irr::io::createIrrXMLReader (IFileReadCallBack * callback,
bool deleteCallback = false 
)
+
+
+ +

Creates an instance of an UFT-8 or ASCII character xml parser.

+

This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.

+
Parameters:
+ + + +
callback,:Callback for file read abstraction. Implement your own callback to make the xml parser read in other things than just files. See IFileReadCallBack for more information about this.
deleteCallback,:if true, the callback will be deleted after the file has been read. Otherwise the caller si responsible for cleaning it up.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + +
IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV irr::io::createIrrXMLReaderUTF16 (const char * filename)
+
+
+ +

Creates an instance of an UFT-16 xml parser.

+

This means that all character data will be returned in UTF-16. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

+
Parameters:
+ + +
filename,:Name of file to be opened.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + +
IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV irr::io::createIrrXMLReaderUTF16 (FILE * file)
+
+
+ +

Creates an instance of an UFT-16 xml parser.

+

This means that all character data will be returned in UTF-16. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

+
Parameters:
+ + +
file,:Pointer to opened file, must have been opened in binary mode, e.g. using fopen("foo.bar", "wb"); The file will not be closed after it has been read.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV irr::io::createIrrXMLReaderUTF16 (IFileReadCallBack * callback,
bool deleteCallback = false 
)
+
+
+ +

Creates an instance of an UFT-16 xml parser.

+

This means that all character data will be returned in UTF-16. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

+
Parameters:
+ + + +
callback,:Callback for file read abstraction. Implement your own callback to make the xml parser read in other things than just files. See IFileReadCallBack for more information about this.
deleteCallback,:if true, the callback will be deleted after the file has been read. Otherwise the caller si responsible for cleaning it up.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + +
IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV irr::io::createIrrXMLReaderUTF32 (const char * filename)
+
+
+ +

Creates an instance of an UFT-32 xml parser.

+

This means that all character data will be returned in UTF-32. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

+
Parameters:
+ + +
filename,:Name of file to be opened.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + +
IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV irr::io::createIrrXMLReaderUTF32 (FILE * file)
+
+
+ +

Creates an instance of an UFT-32 xml parser.

+

This means that all character data will be returned in UTF-32. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. if you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

+
Parameters:
+ + +
file,:Pointer to opened file, must have been opened in binary mode, e.g. using fopen("foo.bar", "wb"); The file will not be closed after it has been read.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV irr::io::createIrrXMLReaderUTF32 (IFileReadCallBack * callback,
bool deleteCallback = false 
)
+
+
+ +

Creates an instance of an UFT-32 xml parser.

+

This means that all character data will be returned in UTF-32. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

+
Parameters:
+ + + +
callback,:Callback for file read abstraction. Implement your own callback to make the xml parser read in other things than just files. See IFileReadCallBack for more information about this.
deleteCallback,:if true, the callback will be deleted after the file has been read. Otherwise the caller si responsible for cleaning it up.
+
+
+
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IReadFile* irr::io::createLimitReadFile (const io::path & fileName,
IReadFile * alreadyOpenedFile,
long pos,
long areaSize 
)
+
+
+ +

Internal function, please do not use.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IReadFile* irr::io::createMemoryReadFile (void * memory,
long size,
const io::path & fileName,
bool deleteMemoryWhenDropped 
)
+
+
+ +

Internal function, please do not use.

+ +
+
+ +
+
+ + + + + + + + +
IReadFile* irr::io::createReadFile (const io::path & fileName)
+
+
+ +

Internal function, please do not use.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
IWriteFile* irr::io::createWriteFile (const io::path & fileName,
bool append 
)
+
+
+ +

Internal function, please do not use.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene.html new file mode 100644 index 0000000..1863b17 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene.html @@ -0,0 +1,2210 @@ + + + + +Irrlicht 3D Engine: irr::scene Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene Namespace Reference
+
+
+ +

All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ... +More...

+

+Namespaces

+ +

+Classes

+ +

+Typedefs

+ +

+Enumerations

+ +

+Variables

+ +

Detailed Description

+

All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...

+

Typedef Documentation

+ +
+ +
+ +

Definition at line 122 of file IParticleEmitter.h.

+ +
+
+ +
+ +
+ +

Typedef for list of scene node animators.

+ +

Definition at line 30 of file ISceneNode.h.

+ +
+
+ +
+ +
+ +

Typedef for list of scene nodes.

+ +

Definition at line 25 of file ISceneNode.h.

+ +
+
+ +
+ +
+ +

Standard meshbuffer.

+ +

Definition at line 291 of file CMeshBuffer.h.

+ +
+
+ +
+ +
+ +

Meshbuffer with two texture coords per vertex, e.g. for lightmaps.

+ +

Definition at line 293 of file CMeshBuffer.h.

+ +
+
+ +
+ +
+ +

Meshbuffer with vertices having tangents stored, e.g. for normal mapping.

+ +

Definition at line 295 of file CMeshBuffer.h.

+ +
+
+

Enumeration Type Documentation

+ +
+ +
+ +

Possible types of (animated) meshes.

+
Enumerator:
+ + + + + + + + + + + + +
EAMT_UNKNOWN  +

Unknown animated mesh type.

+
EAMT_MD2  +

Quake 2 MD2 model file.

+
EAMT_MD3  +

Quake 3 MD3 model file.

+
EAMT_OBJ  +

Maya .obj static model.

+
EAMT_BSP  +

Quake 3 .bsp static Map.

+
EAMT_3DS  +

3D Studio .3ds file

+
EAMT_MY3D  +

My3D Mesh, the file format by Zhuck Dimitry.

+
EAMT_LMTS  +

Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen.

+
EAMT_CSM  +

Cartography Shop .csm file. This loader was created by Saurav Mohapatra.

+
EAMT_OCT  +

.oct file for Paul Nette's FSRad or from Murphy McCauley's Blender .oct exporter.

+

The oct file format contains 3D geometry and lightmaps and can be loaded directly by Irrlicht

+
EAMT_MDL_HALFLIFE  +

Halflife MDL model file.

+
EAMT_SKINNED  +

generic skinned mesh

+
+
+
+ +

Definition at line 16 of file IAnimatedMesh.h.

+ +
+
+ +
+ +
+ +

Enumeration for different bone animation modes.

+
Enumerator:
+ + + + +
EBAM_AUTOMATIC  +

The bone is usually animated, unless it's parent is not animated.

+
EBAM_ANIMATED  +

The bone is animated by the skin, if it's parent is not animated then animation will resume from this bone onward.

+
EBAM_UNANIMATED  +

The bone is not animated by the skin.

+
EBAM_COUNT  +

Not an animation mode, just here to count the available modes.

+
+
+
+ +

Definition at line 16 of file IBoneSceneNode.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + +
EBSS_LOCAL  +

local skinning, standard

+
EBSS_GLOBAL  +

global skinning

+
EBSS_COUNT  +
+
+
+ +

Definition at line 32 of file IBoneSceneNode.h.

+ +
+
+ +
+
+ + + + +
enum irr::scene::E_BUFFER_TYPE
+
+
+
Enumerator:
+ + + + +
EBT_NONE  +

Does not change anything.

+
EBT_VERTEX  +

Change the vertex mapping.

+
EBT_INDEX  +

Change the index mapping.

+
EBT_VERTEX_AND_INDEX  +

Change both vertex and index mapping to the same value.

+
+
+
+ +

Definition at line 28 of file EHardwareBufferFlags.h.

+ +
+
+ +
+ +
+ +

Color names collada uses in it's color samplers.

+
Enumerator:
+ + + + + + +
ECCS_DIFFUSE  +
ECCS_AMBIENT  +
ECCS_EMISSIVE  +
ECCS_SPECULAR  +
ECCS_TRANSPARENT  +
ECCS_REFLECTIVE  +
+
+
+ +

Definition at line 47 of file IColladaMeshWriter.h.

+ +
+
+ +
+ +
+ +

Control when geometry elements are created.

+
Enumerator:
+ + +
ECGI_PER_MESH  +

Default - write each mesh exactly once to collada. Optimal but will not work with many tools.

+
ECGI_PER_MESH_AND_MATERIAL  +

Write each mesh as often as it's used with different materials-names in the scene. Material names which are used here are created on export, so using the IColladaMeshWriterNames interface you have some control over how many geometries are written.

+
+
+
+ +

Definition at line 80 of file IColladaMeshWriter.h.

+ +
+
+ +
+ +
+ +

Irrlicht colors which can be mapped to E_COLLADA_COLOR_SAMPLER values.

+
Enumerator:
+ + + + + + +
ECIC_NONE  +

Don't write this element at all.

+
ECIC_CUSTOM  +

Check IColladaMeshWriterProperties for custom color.

+
ECIC_DIFFUSE  +

Use SMaterial::DiffuseColor.

+
ECIC_AMBIENT  +

Use SMaterial::AmbientColor.

+
ECIC_EMISSIVE  +

Use SMaterial::EmissiveColor.

+
ECIC_SPECULAR  +

Use SMaterial::SpecularColor.

+
+
+
+ +

Definition at line 58 of file IColladaMeshWriter.h.

+ +
+
+ +
+ +
+ +

Lighting models - more or less the way Collada categorizes materials.

+
Enumerator:
+ + + + +
ECTF_BLINN  +

Blinn-phong which is default for opengl and dx fixed function pipelines. But several well-known renderers don't support it and prefer phong.

+
ECTF_PHONG  +

Phong shading, default in many external renderers.

+
ECTF_LAMBERT  +

diffuse shaded surface that is independent of lighting.

+
ECTF_CONSTANT  +
+
+
+ +

Definition at line 23 of file IColladaMeshWriter.h.

+ +
+
+ +
+ +
+ +

How to interpret the opacity in collada.

+
Enumerator:
+ + +
ECOF_A_ONE  +

default - only alpha channel of color or texture is used.

+
ECOF_RGB_ZERO  +

Alpha values for each RGB channel of color or texture are used.

+
+
+
+ +

Definition at line 37 of file IColladaMeshWriter.h.

+ +
+
+ +
+
+ + + + +
enum irr::scene::E_CULLING_TYPE
+
+
+ +

An enumeration for all types of automatic culling for built-in scene nodes.

+
Enumerator:
+ + + + + +
EAC_OFF  +
EAC_BOX  +
EAC_FRUSTUM_BOX  +
EAC_FRUSTUM_SPHERE  +
EAC_OCC_QUERY  +
+
+
+ +

Definition at line 16 of file ECullingTypes.h.

+ +
+
+ +
+ +
+ +

An enumeration for all types of debug data for built-in scene nodes (flags)

+
Enumerator:
+ + + + + + + + + +
EDS_OFF  +

No Debug Data ( Default )

+
EDS_BBOX  +

Show Bounding Boxes of SceneNode.

+
EDS_NORMALS  +

Show Vertex Normals.

+
EDS_SKELETON  +

Shows Skeleton/Tags.

+
EDS_MESH_WIRE_OVERLAY  +

Overlays Mesh Wireframe.

+
EDS_HALF_TRANSPARENCY  +

Temporary use transparency Material Type.

+
EDS_BBOX_BUFFERS  +

Show Bounding Boxes of all MeshBuffers.

+
EDS_BBOX_ALL  +

EDS_BBOX | EDS_BBOX_BUFFERS.

+
EDS_FULL  +

Show all debug infos.

+
+
+
+ +

Definition at line 14 of file EDebugSceneTypes.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + + +
EHM_NEVER  +

Don't store on the hardware.

+
EHM_STATIC  +

Rarely changed, usually stored completely on the hardware.

+
EHM_DYNAMIC  +

Sometimes changed, driver optimized placement.

+
EHM_STREAM  +

Always changed, cache optimizing on the GPU.

+
+
+
+ +

Definition at line 13 of file EHardwareBufferFlags.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + +
EIM_CONSTANT  +
EIM_LINEAR  +
EIM_COUNT  +

count of all available interpolation modes

+
+
+
+ +

Definition at line 18 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + +
EJUOR_NONE  +

do nothing

+
EJUOR_READ  +

get joints positions from the mesh (for attached nodes, etc)

+
EJUOR_CONTROL  +

control joint positions in the mesh (eg. ragdolls, or set the animation from animateJoints() )

+
+
+
+ +

Definition at line 19 of file IAnimatedMeshSceneNode.h.

+ +
+
+ +
+ +
+ +

flags configuring mesh writing

+
Enumerator:
+ + + + +
EMWF_NONE  +

no writer flags

+
EMWF_WRITE_LIGHTMAPS  +

write lightmap textures out if possible

+
EMWF_WRITE_COMPRESSED  +

write in a way that consumes less disk space

+
EMWF_WRITE_BINARY  +

write in binary format rather than text

+
+
+
+ +

Definition at line 39 of file EMeshWriterEnums.h.

+ +
+
+ +
+ +
+ +

Types of built in particle affectors.

+
Enumerator:
+ + + + + + + +
EPAT_NONE  +
EPAT_ATTRACT  +
EPAT_FADE_OUT  +
EPAT_GRAVITY  +
EPAT_ROTATE  +
EPAT_SCALE  +
EPAT_COUNT  +
+
+
+ +

Definition at line 17 of file IParticleAffector.h.

+ +
+
+ +
+ +
+ +

Types of built in particle emitters.

+
Enumerator:
+ + + + + + + + +
EPET_POINT  +
EPET_ANIMATED_MESH  +
EPET_BOX  +
EPET_CYLINDER  +
EPET_MESH  +
EPET_RING  +
EPET_SPHERE  +
EPET_COUNT  +
+
+
+ +

Definition at line 17 of file IParticleEmitter.h.

+ +
+
+ +
+ +
+ +

Enumeration for all primitive types there are.

+
Enumerator:
+ + + + + + + + + + + +
EPT_POINTS  +

All vertices are non-connected points.

+
EPT_LINE_STRIP  +

All vertices form a single connected line.

+
EPT_LINE_LOOP  +

Just as LINE_STRIP, but the last and the first vertex is also connected.

+
EPT_LINES  +

Every two vertices are connected creating n/2 lines.

+
EPT_TRIANGLE_STRIP  +

After the first two vertices each vertex defines a new triangle. Always the two last and the new one form a new triangle.

+
EPT_TRIANGLE_FAN  +

After the first two vertices each vertex defines a new triangle. All around the common first vertex.

+
EPT_TRIANGLES  +

Explicitly set all vertices for each triangle.

+
EPT_QUAD_STRIP  +

After the first two vertices each further tw vetices create a quad with the preceding two.

+
EPT_QUADS  +

Every four vertices create a quad.

+
EPT_POLYGON  +

Just as LINE_LOOP, but filled.

+
EPT_POINT_SPRITES  +

The single vertices are expanded to quad billboards on the GPU.

+
+
+
+ +

Definition at line 14 of file EPrimitiveTypes.h.

+ +
+
+ +
+ +
+ +

Enumeration for render passes.

+

A parameter passed to the registerNodeForRendering() method of the ISceneManager, specifying when the node wants to be drawn in relation to the other nodes.

+
Enumerator:
+ + + + + + + + + +
ESNRP_NONE  +

No pass currently active.

+
ESNRP_CAMERA  +

Camera pass. The active view is set up here. The very first pass.

+
ESNRP_LIGHT  +

In this pass, lights are transformed into camera space and added to the driver.

+
ESNRP_SKY_BOX  +

This is used for sky boxes.

+
ESNRP_AUTOMATIC  +

All normal objects can use this for registering themselves.

+

This value will never be returned by ISceneManager::getSceneNodeRenderPass(). The scene manager will determine by itself if an object is transparent or solid and register the object as SNRT_TRANSPARENT or SNRT_SOLD automatically if you call registerNodeForRendering with this value (which is default). Note that it will register the node only as ONE type. If your scene node has both solid and transparent material types register it twice (one time as SNRT_SOLID, the other time as SNRT_TRANSPARENT) and in the render() method call getSceneNodeRenderPass() to find out the current render pass and render only the corresponding parts of the node.

+
ESNRP_SOLID  +

Solid scene nodes or special scene nodes without materials.

+
ESNRP_TRANSPARENT  +

Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in that order.

+
ESNRP_TRANSPARENT_EFFECT  +

Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and drawn in that order.

+
ESNRP_SHADOW  +

Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes.

+
+
+
+ +

Definition at line 55 of file ISceneManager.h.

+ +
+
+ +
+ +
+ +

enumeration for patch sizes specifying the size of patches in the TerrainSceneNode

+
Enumerator:
+ + + + + +
ETPS_9  +

patch size of 9, at most, use 4 levels of detail with this patch size.

+
ETPS_17  +

patch size of 17, at most, use 5 levels of detail with this patch size.

+
ETPS_33  +

patch size of 33, at most, use 6 levels of detail with this patch size.

+
ETPS_65  +

patch size of 65, at most, use 7 levels of detail with this patch size.

+
ETPS_129  +

patch size of 129, at most, use 8 levels of detail with this patch size.

+
+
+
+ +

Definition at line 14 of file ETerrainElements.h.

+ +
+
+ +
+ +
+ +

Types of standard md2 animations.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + +
EMAT_STAND  +
EMAT_RUN  +
EMAT_ATTACK  +
EMAT_PAIN_A  +
EMAT_PAIN_B  +
EMAT_PAIN_C  +
EMAT_JUMP  +
EMAT_FLIP  +
EMAT_SALUTE  +
EMAT_FALLBACK  +
EMAT_WAVE  +
EMAT_POINT  +
EMAT_CROUCH_STAND  +
EMAT_CROUCH_WALK  +
EMAT_CROUCH_ATTACK  +
EMAT_CROUCH_PAIN  +
EMAT_CROUCH_DEATH  +
EMAT_DEATH_FALLBACK  +
EMAT_DEATH_FALLFORWARD  +
EMAT_DEATH_FALLBACKSLOW  +
EMAT_BOOM  +
EMAT_COUNT  +

Not an animation, but amount of animation types.

+
+
+
+ +

Definition at line 16 of file IAnimatedMeshMD2.h.

+ +
+
+ +
+ +
+ +

Animation list.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
EMD3_BOTH_DEATH_1  +
EMD3_BOTH_DEAD_1  +
EMD3_BOTH_DEATH_2  +
EMD3_BOTH_DEAD_2  +
EMD3_BOTH_DEATH_3  +
EMD3_BOTH_DEAD_3  +
EMD3_TORSO_GESTURE  +
EMD3_TORSO_ATTACK_1  +
EMD3_TORSO_ATTACK_2  +
EMD3_TORSO_DROP  +
EMD3_TORSO_RAISE  +
EMD3_TORSO_STAND_1  +
EMD3_TORSO_STAND_2  +
EMD3_LEGS_WALK_CROUCH  +
EMD3_LEGS_WALK  +
EMD3_LEGS_RUN  +
EMD3_LEGS_BACK  +
EMD3_LEGS_SWIM  +
EMD3_LEGS_JUMP_1  +
EMD3_LEGS_LAND_1  +
EMD3_LEGS_JUMP_2  +
EMD3_LEGS_LAND_2  +
EMD3_LEGS_IDLE  +
EMD3_LEGS_IDLE_CROUCH  +
EMD3_LEGS_TURN  +
EMD3_ANIMATION_COUNT  +

Not an animation, but amount of animation types.

+
+
+
+ +

Definition at line 27 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + +
enum irr::scene::eMD3Models
+
+
+
Enumerator:
+ + + + + +
EMD3_HEAD  +
EMD3_UPPER  +
EMD3_LOWER  +
EMD3_WEAPON  +
EMD3_NUMMODELS  +
+
+
+ +

Definition at line 17 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

An enumeration for all supported types of built-in mesh writers.

+

A scene mesh writers is represented by a four character code such as 'irrm' or 'coll' instead of simple numbers, to avoid name clashes with external mesh writers.

+
Enumerator:
+ + + + + +
EMWT_IRR_MESH  +

Irrlicht native mesh writer, for static .irrmesh files.

+
EMWT_COLLADA  +

COLLADA mesh writer for .dae and .xml files.

+
EMWT_STL  +

STL mesh writer for .stl files.

+
EMWT_OBJ  +

OBJ mesh writer for .obj files.

+
EMWT_PLY  +

PLY mesh writer for .ply files.

+
+
+
+ +

Definition at line 19 of file EMeshWriterEnums.h.

+ +
+
+ +
+ +
+ +

An enumeration for all types of built-in scene node animators.

+
Enumerator:
+ + + + + + + + + + + + +
ESNAT_FLY_CIRCLE  +

Fly circle scene node animator.

+
ESNAT_FLY_STRAIGHT  +

Fly straight scene node animator.

+
ESNAT_FOLLOW_SPLINE  +

Follow spline scene node animator.

+
ESNAT_ROTATION  +

Rotation scene node animator.

+
ESNAT_TEXTURE  +

Texture scene node animator.

+
ESNAT_DELETION  +

Deletion scene node animator.

+
ESNAT_COLLISION_RESPONSE  +

Collision respose scene node animator.

+
ESNAT_CAMERA_FPS  +

FPS camera animator.

+
ESNAT_CAMERA_MAYA  +

Maya camera animator.

+
ESNAT_COUNT  +

Amount of built-in scene node animators.

+
ESNAT_UNKNOWN  +

Unknown scene node animator.

+
ESNAT_FORCE_32_BIT  +

This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.

+
+
+
+ +

Definition at line 14 of file ESceneNodeAnimatorTypes.h.

+ +
+
+ +
+ +
+ +

An enumeration for all types of built-in scene nodes.

+

A scene node type is represented by a four character code such as 'cube' or 'mesh' instead of simple numbers, to avoid name clashes with external scene nodes.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ESNT_SCENE_MANAGER  +

of type CSceneManager (note that ISceneManager is not(!) an ISceneNode)

+
ESNT_CUBE  +

simple cube scene node

+
ESNT_SPHERE  +

Sphere scene node.

+
ESNT_TEXT  +

Text Scene Node.

+
ESNT_WATER_SURFACE  +

Water Surface Scene Node.

+
ESNT_TERRAIN  +

Terrain Scene Node.

+
ESNT_SKY_BOX  +

Sky Box Scene Node.

+
ESNT_SKY_DOME  +

Sky Dome Scene Node.

+
ESNT_SHADOW_VOLUME  +

Shadow Volume Scene Node.

+
ESNT_OCTREE  +

Octree Scene Node.

+
ESNT_MESH  +

Mesh Scene Node.

+
ESNT_LIGHT  +

Light Scene Node.

+
ESNT_EMPTY  +

Empty Scene Node.

+
ESNT_DUMMY_TRANSFORMATION  +

Dummy Transformation Scene Node.

+
ESNT_CAMERA  +

Camera Scene Node.

+
ESNT_BILLBOARD  +

Billboard Scene Node.

+
ESNT_ANIMATED_MESH  +

Animated Mesh Scene Node.

+
ESNT_PARTICLE_SYSTEM  +

Particle System Scene Node.

+
ESNT_Q3SHADER_SCENE_NODE  +

Quake3 Shader Scene Node.

+
ESNT_MD3_SCENE_NODE  +

Quake3 Model Scene Node ( has tag to link to )

+
ESNT_VOLUME_LIGHT  +

Volume Light Scene Node.

+
ESNT_CAMERA_MAYA  +

Maya Camera Scene Node.

+

Legacy, for loading version <= 1.4.x .irr files

+
ESNT_CAMERA_FPS  +

First Person Shooter Camera.

+

Legacy, for loading version <= 1.4.x .irr files

+
ESNT_UNKNOWN  +

Unknown scene node.

+
ESNT_ANY  +

Will match with any scene node when checking types.

+
+
+
+ +

Definition at line 19 of file ESceneNodeTypes.h.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const c8* const irr::scene::ALLOW_ZWRITE_ON_TRANSPARENT = "Allow_ZWrite_On_Transparent"
+
+
+ +

Name of the parameter for changing how Irrlicht handles the ZWrite flag for transparent (blending) materials.

+

The default behavior in Irrlicht is to disable writing to the z-buffer for all really transparent, i.e. blending materials. This avoids problems with intersecting faces, but can also break renderings. If transparent materials should use the SMaterial flag for ZWriteEnable just as other material types use this attribute. Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
+
+

Definition at line 30 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::AutomaticCullingNames[]
+
+
+Initial value:
+    {
+        "false",
+        "box",          
+        "frustum_box",      
+        "frustum_sphere",   
+        "occ_query",    
+        0
+    }
+
+

Names for culling type.

+ +

Definition at line 26 of file ECullingTypes.h.

+ +

Referenced by irr::scene::ISceneNode::deserializeAttributes().

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag"
+
+
+ +

Flag to ignore the b3d file's mipmapping flag.

+

Instead Irrlicht's texture creation flag is used. Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::B3D_LOADER_IGNORE_MIPMAP_FLAG, true);
+
+

Definition at line 146 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::B3D_TEXTURE_PATH = "B3D_TexturePath"
+
+
+ +

Name of the parameter for changing the texture path of the built-in b3d loader.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::B3D_TEXTURE_PATH, "path/to/your/textures");
+
+

Definition at line 154 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::BoneAnimationModeNames[]
+
+
+Initial value:
+    {
+        "automatic",
+        "animated",
+        "unanimated",
+        0,
+    }
+
+

Names for bone animation modes.

+ +

Definition at line 44 of file IBoneSceneNode.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::COLLADA_CREATE_SCENE_INSTANCES = "COLLADA_CreateSceneInstances"
+
+
+ +

Name of the parameter specifying the COLLADA mesh loading mode.

+

Specifies if the COLLADA loader should create instances of the models, lights and cameras when loading COLLADA meshes. By default, this is set to false. If this is set to true, the ISceneManager::getMesh() method will only return a pointer to a dummy mesh and create instances of all meshes and lights and cameras in the collada file by itself. Example:

+
    SceneManager->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
+
+

Definition at line 67 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::CSM_TEXTURE_PATH = "CSM_TexturePath"
+
+
+ +

Name of the parameter for changing the texture path of the built-in csm loader.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, "path/to/your/textures");
+
+

Definition at line 38 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color"
+
+
+ +

Name of the parameter for setting the color of debug normals.

+

Use it like this:

+
    SceneManager->getParameters()->setAttributeAsColor(scene::DEBUG_NORMAL_COLOR, video::SColor(255, 255, 255, 255));
+
+

Definition at line 175 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length"
+
+
+ +

Name of the parameter for setting the length of debug normals.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::DEBUG_NORMAL_LENGTH, 1.5f);
+
+

Definition at line 167 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::DMF_ALPHA_CHANNEL_REF = "DMF_AlphaRef"
+
+
+ +

Name of the parameter for setting reference value of alpha in transparent materials.

+

Use it like this:

+
    //this way you'll set alpha ref to 0.1
+    SceneManager->getParameters()->setAttribute(scene::DMF_ALPHA_CHANNEL_REF, 0.1);
+
+

Definition at line 102 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::DMF_FLIP_ALPHA_TEXTURES = "DMF_FlipAlpha"
+
+
+ +

Name of the parameter for choose to flip or not tga files.

+

Use it like this:

+
    //this way you'll choose to flip alpha textures
+    SceneManager->getParameters()->setAttribute(scene::DMF_FLIP_ALPHA_TEXTURES, true);
+
+

Definition at line 111 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir"
+
+
+ +

Name of the parameter for preserving DMF textures dir structure with built-in DMF loader.

+

If this parameter is set to true, the texture directory defined in the Deled file is ignored, and only the texture name is used to find the proper file. Otherwise, the texture path is also used, which allows to use a nicer media layout. Use it like this:

+
    //this way you won't use this setting (default)
+    SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, false);
+
    //this way you'll use this setting
+    SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, true);
+
+

Definition at line 93 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::DMF_TEXTURE_PATH = "DMF_TexturePath"
+
+
+ +

Name of the parameter for changing the texture path of the built-in DMF loader.

+

This path is prefixed to the file names defined in the Deled file when loading textures. This allows to alter the paths for a specific project setting. Use it like this:

+
    SceneManager->getStringParameters()->setAttribute(scene::DMF_TEXTURE_PATH, "path/to/your/textures");
+
+

Definition at line 77 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::IRR_SCENE_MANAGER_IS_EDITOR = "IRR_Editor"
+
+
+ +

Flag set as parameter when the scene manager is used as editor.

+

In this way special animators like deletion animators can be stopped from deleting scene nodes for example

+ +

Definition at line 159 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::LMTS_TEXTURE_PATH = "LMTS_TexturePath"
+
+
+ +

Name of the parameter for changing the texture path of the built-in lmts loader.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, "path/to/your/textures");
+
+

Definition at line 46 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::MY3D_TEXTURE_PATH = "MY3D_TexturePath"
+
+
+ +

Name of the parameter for changing the texture path of the built-in my3d loader.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, "path/to/your/textures");
+
+

Definition at line 54 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups"
+
+
+ +

Flag to avoid loading group structures in .obj files.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
+
+

Definition at line 128 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles"
+
+
+ +

Flag to avoid loading material .mtl file for .obj files.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true);
+
+

Definition at line 137 of file SceneParameters.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::OBJ_TEXTURE_PATH = "OBJ_TexturePath"
+
+
+ +

Name of the parameter for changing the texture path of the built-in obj loader.

+

Use it like this:

+
    SceneManager->getParameters()->setAttribute(scene::OBJ_TEXTURE_PATH, "path/to/your/textures");
+
+

Definition at line 120 of file SceneParameters.h.

+ +
+
+ +
+ +
+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::ParticleAffectorTypeNames[]
+
+
+Initial value:
+{
+    "None",
+    "Attract",
+    "FadeOut",
+    "Gravity",
+    "Rotate",
+    "Scale",
+    0
+}
+
+

Names for built in particle affectors.

+ +

Definition at line 29 of file IParticleAffector.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::scene::ParticleEmitterTypeNames[]
+
+
+Initial value:
+{
+    "Point",
+    "AnimatedMesh",
+    "Box",
+    "Cylinder",
+    "Mesh",
+    "Ring",
+    "Sphere",
+    0
+}
+
+

Names for built in particle emitters.

+ +

Definition at line 30 of file IParticleEmitter.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene_1_1quake3.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene_1_1quake3.html new file mode 100644 index 0000000..9400fba --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1scene_1_1quake3.html @@ -0,0 +1,810 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3 Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3 Namespace Reference
+
+
+

+Classes

+ +

+Typedefs

+ +

+Enumerations

+ +

+Functions

+ +

Typedef Documentation

+ +
+ +
+ +

Definition at line 687 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 689 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 79 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 80 of file IQ3Shader.h.

+ +
+
+

Enumeration Type Documentation

+ +
+ +
+ +

Hold the different Mesh Types used for getMesh.

+
Enumerator:
+ + + + + + +
E_Q3_MESH_GEOMETRY  +
E_Q3_MESH_ITEMS  +
E_Q3_MESH_BILLBOARD  +
E_Q3_MESH_FOG  +
E_Q3_MESH_UNRESOLVED  +
E_Q3_MESH_SIZE  +
+
+
+ +

Definition at line 24 of file IQ3Shader.h.

+ +
+
+ +
+ +
+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TCMOD  +
DEFORMVERTEXES  +
RGBGEN  +
TCGEN  +
MAP  +
ALPHAGEN  +
FUNCTION2  +
SCROLL  +
SCALE  +
ROTATE  +
STRETCH  +
TURBULENCE  +
WAVE  +
IDENTITY  +
VERTEX  +
TEXTURE  +
LIGHTMAP  +
ENVIRONMENT  +
DOLLAR_LIGHTMAP  +
BULGE  +
AUTOSPRITE  +
AUTOSPRITE2  +
TRANSFORM  +
EXACTVERTEX  +
CONSTANT  +
LIGHTINGSPECULAR  +
MOVE  +
NORMAL  +
IDENTITYLIGHTING  +
WAVE_MODIFIER_FUNCTION  +
SINUS  +
COSINUS  +
SQUARE  +
TRIANGLE  +
SAWTOOTH  +
SAWTOOTH_INVERSE  +
NOISE  +
UNKNOWN  +
+
+
+ +

Definition at line 372 of file IQ3Shader.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
core::stringc& irr::scene::quake3::dumpShader (core::stringc & dest,
const IShader * shader,
bool entity = false 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::scene::quake3::dumpVarGroup (core::stringc & dest,
const SVarGroup * group,
s32 stack 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
f32 irr::scene::quake3::getAsFloat (const core::stringc & string,
u32 & pos 
) [inline]
+
+
+ +

Definition at line 105 of file IQ3Shader.h.

+ +

References irr::core::fast_atof_move().

+ +

Referenced by getAsVector3df(), and getModifierFunc().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::scene::quake3::getAsStringList (tStringList & list,
s32 max,
const core::stringc & string,
u32 & startPos 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
core::vector3df irr::scene::quake3::getAsVector3df (const core::stringc & string,
u32 & pos 
) [inline]
+
+
+ +

get a quake3 vector translated to irrlicht position (x,-z,y )

+ +

Definition at line 115 of file IQ3Shader.h.

+ +

References getAsFloat(), irr::core::vector3d< T >::X, irr::core::vector3d< T >::Y, and irr::core::vector3d< T >::Z.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::scene::quake3::getCullingFunction (const core::stringc & cull) [inline]
+
+
+ +

Definition at line 171 of file IQ3Shader.h.

+ +

References isEqual(), and irr::core::string< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + +
u8 irr::scene::quake3::getDepthFunction (const core::stringc & string) [inline]
+
+
+ +

Definition at line 193 of file IQ3Shader.h.

+ +

References irr::video::ECFN_EQUAL, irr::video::ECFN_LESSEQUAL, and isEqual().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
core::vector3df irr::scene::quake3::getMD3Normal (u32 i,
u32 j 
) [inline]
+
+
+ +

Definition at line 510 of file IQ3Shader.h.

+ +

References irr::core::PI.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void irr::scene::quake3::getModifierFunc (SModifierFunction & fill,
const core::stringc & string,
u32 & pos 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::scene::quake3::getTextures (tTexArray & textures,
const core::stringc & name,
u32 & startPos,
io::IFileSystem * fileSystem,
video::IVideoDriver * driver 
) [inline]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
s16 irr::scene::quake3::isEqual (const core::stringc & string,
u32 & pos,
const c8 * list[],
u16 listSize 
) [inline]
+
+
+ +

Definition at line 83 of file IQ3Shader.h.

+ +

Referenced by getCullingFunction(), getDepthFunction(), and getModifierFunc().

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1video.html b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1video.html new file mode 100644 index 0000000..4bcd6bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaceirr_1_1video.html @@ -0,0 +1,2635 @@ + + + + +Irrlicht 3D Engine: irr::video Namespace Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video Namespace Reference
+
+
+ +

The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here. +More...

+

+Classes

+ +

+Enumerations

+ +

+Functions

+ +

+Variables

+ +

Detailed Description

+

The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum irr::video::E_ALPHA_SOURCE
+
+
+ +

Source of the alpha value to take.

+

This is currently only supported in EMT_ONETEXTURE_BLEND. You can use an or'ed combination of values. Alpha values are modulated (multiplicated).

+
Enumerator:
+ + + +
EAS_NONE  +

Use no alpha, somewhat redundant with other settings.

+
EAS_VERTEX_COLOR  +

Use vertex color alpha.

+
EAS_TEXTURE  +

Use texture alpha channel.

+
+
+
+ +

Definition at line 104 of file SMaterial.h.

+ +
+
+ +
+ +
+ +

These flags are used to specify the anti-aliasing and smoothing modes.

+

Techniques supported are multisampling, geometry smoothing, and alpha to coverage. Some drivers don't support a per-material setting of the anti-aliasing modes. In those cases, FSAA/multisampling is defined by the device mode chosen upon creation via irr::SIrrCreationParameters.

+
Enumerator:
+ + + + + + + +
EAAM_OFF  +

Use to turn off anti-aliasing for this material.

+
EAAM_SIMPLE  +

Default anti-aliasing mode.

+
EAAM_QUALITY  +

High-quality anti-aliasing, not always supported, automatically enables SIMPLE mode.

+
EAAM_LINE_SMOOTH  +

Line smoothing.

+
EAAM_POINT_SMOOTH  +

point smoothing, often in software and slow, only with OpenGL

+
EAAM_FULL_BASIC  +

All typical anti-alias and smooth modes.

+
EAAM_ALPHA_TO_COVERAGE  +

Enhanced anti-aliasing for transparent materials.

+

Usually used with EMT_TRANSPARENT_ALPHA_REF and multisampling.

+
+
+
+ +

Definition at line 158 of file SMaterial.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_BLEND_FACTOR
+
+
+ +

Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor.

+
Enumerator:
+ + + + + + + + + + + +
EBF_ZERO  +

src & dest (0, 0, 0, 0)

+
EBF_ONE  +

src & dest (1, 1, 1, 1)

+
EBF_DST_COLOR  +

src (destR, destG, destB, destA)

+
EBF_ONE_MINUS_DST_COLOR  +

src (1-destR, 1-destG, 1-destB, 1-destA)

+
EBF_SRC_COLOR  +

dest (srcR, srcG, srcB, srcA)

+
EBF_ONE_MINUS_SRC_COLOR  +

dest (1-srcR, 1-srcG, 1-srcB, 1-srcA)

+
EBF_SRC_ALPHA  +

src & dest (srcA, srcA, srcA, srcA)

+
EBF_ONE_MINUS_SRC_ALPHA  +

src & dest (1-srcA, 1-srcA, 1-srcA, 1-srcA)

+
EBF_DST_ALPHA  +

src & dest (destA, destA, destA, destA)

+
EBF_ONE_MINUS_DST_ALPHA  +

src & dest (1-destA, 1-destA, 1-destA, 1-destA)

+
EBF_SRC_ALPHA_SATURATE  +

src (min(srcA, 1-destA), idem, ...)

+
+
+
+ +

Definition at line 23 of file SMaterial.h.

+ +
+
+ +
+ +
+ +

Values defining the blend operation used when blend is enabled.

+
Enumerator:
+ + + + + + + + + + +
EBO_NONE  +

No blending happens.

+
EBO_ADD  +

Default blending adds the color values.

+
EBO_SUBTRACT  +

This mode subtracts the color values.

+
EBO_REVSUBTRACT  +

This modes subtracts destination from source.

+
EBO_MIN  +

Choose minimum value of each color channel.

+
EBO_MAX  +

Choose maximum value of each color channel.

+
EBO_MIN_FACTOR  +

Choose minimum value of each color channel after applying blend factors, not widely supported.

+
EBO_MAX_FACTOR  +

Choose maximum value of each color channel after applying blend factors, not widely supported.

+
EBO_MIN_ALPHA  +

Choose minimum value of each color channel based on alpha value, not widely supported.

+
EBO_MAX_ALPHA  +

Choose maximum value of each color channel based on alpha value, not widely supported.

+
+
+
+ +

Definition at line 39 of file SMaterial.h.

+ +
+
+ +
+ +
+ +

These flags allow to define the interpretation of vertex color when lighting is enabled.

+

Without lighting being enabled the vertex color is the only value defining the fragment color. Once lighting is enabled, the four values for diffuse, ambient, emissive, and specular take over. With these flags it is possible to define which lighting factor shall be defined by the vertex color instead of the lighting factor which is the same for all faces of that material. The default is to use vertex color for the diffuse value, another pretty common value is to use vertex color for both diffuse and ambient factor.

+
Enumerator:
+ + + + + + +
ECM_NONE  +

Don't use vertex color for lighting.

+
ECM_DIFFUSE  +

Use vertex color for diffuse light, this is default.

+
ECM_AMBIENT  +

Use vertex color for ambient light.

+
ECM_EMISSIVE  +

Use vertex color for emissive light.

+
ECM_SPECULAR  +

Use vertex color for specular light.

+
ECM_DIFFUSE_AND_AMBIENT  +

Use vertex color for both diffuse and ambient light.

+
+
+
+ +

Definition at line 184 of file SMaterial.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_COLOR_PLANE
+
+
+ +

Enum values for enabling/disabling color planes for rendering.

+
Enumerator:
+ + + + + + + +
ECP_NONE  +

No color enabled.

+
ECP_ALPHA  +

Alpha enabled.

+
ECP_RED  +

Red enabled.

+
ECP_GREEN  +

Green enabled.

+
ECP_BLUE  +

Blue enabled.

+
ECP_RGB  +

All colors, no alpha.

+
ECP_ALL  +

All planes enabled.

+
+
+
+ +

Definition at line 83 of file SMaterial.h.

+ +
+
+ +
+ +
+ +

Comparison function, e.g. for depth buffer test.

+
Enumerator:
+ + + + + + + + +
ECFN_NEVER  +

Test never succeeds, this equals disable.

+
ECFN_LESSEQUAL  +

<= test, default for e.g. depth test

+
ECFN_EQUAL  +

Exact equality.

+
ECFN_LESS  +

exclusive less comparison, i.e. <

+
ECFN_NOTEQUAL  +

Succeeds almost always, except for exact equality.

+
ECFN_GREATEREQUAL  +

>= test

+
ECFN_GREATER  +

inverse of <=

+
ECFN_ALWAYS  +

test succeeds always

+
+
+
+ +

Definition at line 62 of file SMaterial.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_DRIVER_TYPE
+
+
+ +

An enum for all types of drivers the Irrlicht Engine supports.

+
Enumerator:
+ + + + + + + +
EDT_NULL  +

Null driver, useful for applications to run the engine without visualisation.

+

The null device is able to load textures, but does not render and display any graphics.

+
EDT_SOFTWARE  +

The Irrlicht Engine Software renderer.

+

Runs on all platforms, with every hardware. It should only be used for 2d graphics, but it can also perform some primitive 3d functions. These 3d drawing functions are quite fast, but very inaccurate, and don't even support clipping in 3D mode.

+
EDT_BURNINGSVIDEO  +

The Burning's Software Renderer, an alternative software renderer.

+

Basically it can be described as the Irrlicht Software renderer on steroids. It rasterizes 3D geometry perfectly: It is able to perform correct 3d clipping, perspective correct texture mapping, perspective correct color mapping, and renders sub pixel correct, sub texel correct primitives. In addition, it does bilinear texel filtering and supports more materials than the EDT_SOFTWARE driver. This renderer has been written entirely by Thomas Alten, thanks a lot for this huge contribution.

+
EDT_DIRECT3D8  +

Direct3D8 device, only available on Win32 platforms.

+

Performs hardware accelerated rendering of 3D and 2D primitives.

+
EDT_DIRECT3D9  +

Direct3D 9 device, only available on Win32 platforms.

+

Performs hardware accelerated rendering of 3D and 2D primitives.

+
EDT_OPENGL  +

OpenGL device, available on most platforms.

+

Performs hardware accelerated rendering of 3D and 2D primitives.

+
EDT_COUNT  +

No driver, just for counting the elements.

+
+
+
+ +

Definition at line 14 of file EDriverTypes.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_FOG_TYPE
+
+
+ +

Enum for the types of fog distributions to choose from.

+
Enumerator:
+ + + +
EFT_FOG_EXP  +
EFT_FOG_LINEAR  +
EFT_FOG_EXP2  +
+
+
+ +

Definition at line 133 of file IVideoDriver.h.

+ +
+
+ +
+ +
+ +

Enum for supported geometry shader types.

+
Enumerator:
+ + +
EGST_GS_4_0  +
EGST_COUNT  +

This is not a type, but a value indicating how much types there are.

+
+
+
+ +

Definition at line 72 of file EShaderTypes.h.

+ +
+
+ +
+ +
+ +

Enumeration for different types of shading languages.

+
Enumerator:
+ + +
EGSL_DEFAULT  +

The default language, so HLSL for Direct3D and GLSL for OpenGL.

+
EGSL_CG  +

Cg shading language.*/.

+
+
+
+ +

Definition at line 28 of file IGPUProgrammingServices.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_INDEX_TYPE
+
+
+
Enumerator:
+ + +
EIT_16BIT  +
EIT_32BIT  +
+
+
+ +

Definition at line 15 of file SVertexIndex.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_LIGHT_TYPE
+
+
+ +

Enumeration for different types of lights.

+
Enumerator:
+ + + + +
ELT_POINT  +

point light, it has a position in space and radiates light in all directions

+
ELT_SPOT  +

spot light, it has a position in space, a direction, and a limited cone of influence

+
ELT_DIRECTIONAL  +

directional light, coming from a direction from an infinite distance

+
ELT_COUNT  +

Only used for counting the elements of this enum.

+
+
+
+ +

Definition at line 16 of file SLight.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_LOST_RESOURCE
+
+
+ +

enumeration for signaling resources which were lost after the last render cycle

+

These values can be signaled by the driver, telling the app that some resources were lost and need to be recreated. Irrlicht will sometimes recreate the actual objects, but the content needs to be recreated by the application.

+
Enumerator:
+ + + + +
ELR_DEVICE  +

The whole device/driver is lost.

+
ELR_TEXTURES  +

All texture are lost, rare problem.

+
ELR_RTTS  +

The Render Target Textures are lost, typical problem for D3D.

+
ELR_HW_BUFFERS  +

The HW buffers are lost, will be recreated automatically, but might require some more time this frame.

+
+
+
+ +

Definition at line 92 of file IVideoDriver.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_MATERIAL_FLAG
+
+
+ +

Material flags.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + +
EMF_WIREFRAME  +

Draw as wireframe or filled triangles? Default: false.

+
EMF_POINTCLOUD  +

Draw as point cloud or filled triangles? Default: false.

+
EMF_GOURAUD_SHADING  +

Flat or Gouraud shading? Default: true.

+
EMF_LIGHTING  +

Will this material be lighted? Default: true.

+
EMF_ZBUFFER  +

Is the ZBuffer enabled? Default: true.

+
EMF_ZWRITE_ENABLE  +

May be written to the zbuffer or is it readonly. Default: true.

+

This flag is ignored, if the material type is a transparent type.

+
EMF_BACK_FACE_CULLING  +

Is backface culling enabled? Default: true.

+
EMF_FRONT_FACE_CULLING  +

Is frontface culling enabled? Default: false.

+

Overrides EMF_BACK_FACE_CULLING if both are enabled.

+
EMF_BILINEAR_FILTER  +

Is bilinear filtering enabled? Default: true.

+
EMF_TRILINEAR_FILTER  +

Is trilinear filtering enabled? Default: false.

+

If the trilinear filter flag is enabled, the bilinear filtering flag is ignored.

+
EMF_ANISOTROPIC_FILTER  +

Is anisotropic filtering? Default: false.

+

In Irrlicht you can use anisotropic texture filtering in conjunction with bilinear or trilinear texture filtering to improve rendering results. Primitives will look less blurry with this flag switched on.

+
EMF_FOG_ENABLE  +

Is fog enabled? Default: false.

+
EMF_NORMALIZE_NORMALS  +

Normalizes normals. Default: false.

+

You can enable this if you need to scale a dynamic lighted model. Usually, its normals will get scaled too then and it will get darker. If you enable the EMF_NORMALIZE_NORMALS flag, the normals will be normalized again, and the model will look as bright as it should.

+
EMF_TEXTURE_WRAP  +

Access to all layers texture wrap settings. Overwrites separate layer settings.

+
EMF_ANTI_ALIASING  +

AntiAliasing mode.

+
EMF_COLOR_MASK  +

ColorMask bits, for enabling the color planes.

+
EMF_COLOR_MATERIAL  +

ColorMaterial enum for vertex color interpretation.

+
EMF_USE_MIP_MAPS  +

Flag for enabling/disabling mipmap usage.

+
EMF_BLEND_OPERATION  +

Flag for blend operation.

+
EMF_POLYGON_OFFSET  +

Flag for polygon offset.

+
+
+
+ +

Definition at line 14 of file EMaterialFlags.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_MATERIAL_TYPE
+
+
+ +

Abstracted and easy to use fixed function/programmable pipeline material modes.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + +
EMT_SOLID  +

Standard solid material.

+

Only first texture is used, which is supposed to be the diffuse material.

+
EMT_SOLID_2_LAYER  +

Solid material with 2 texture layers.

+

The second is blended onto the first using the alpha value of the vertex colors. This material is currently not implemented in OpenGL.

+
EMT_LIGHTMAP  +

Material type with standard lightmap technique.

+

There should be 2 textures: The first texture layer is a diffuse map, the second is a light map. Dynamic light is ignored.

+
EMT_LIGHTMAP_ADD  +

Material type with lightmap technique like EMT_LIGHTMAP.

+

But lightmap and diffuse texture are added instead of modulated.

+
EMT_LIGHTMAP_M2  +

Material type with standard lightmap technique.

+

There should be 2 textures: The first texture layer is a diffuse map, the second is a light map. Dynamic light is ignored. The texture colors are effectively multiplied by 2 for brightening. Like known in DirectX as D3DTOP_MODULATE2X.

+
EMT_LIGHTMAP_M4  +

Material type with standard lightmap technique.

+

There should be 2 textures: The first texture layer is a diffuse map, the second is a light map. Dynamic light is ignored. The texture colors are effectively multiplyied by 4 for brightening. Like known in DirectX as D3DTOP_MODULATE4X.

+
EMT_LIGHTMAP_LIGHTING  +

Like EMT_LIGHTMAP, but also supports dynamic lighting.

+
EMT_LIGHTMAP_LIGHTING_M2  +

Like EMT_LIGHTMAP_M2, but also supports dynamic lighting.

+
EMT_LIGHTMAP_LIGHTING_M4  +

Like EMT_LIGHTMAP_4, but also supports dynamic lighting.

+
EMT_DETAIL_MAP  +

Detail mapped material.

+

The first texture is diffuse color map, the second is added to this and usually displayed with a bigger scale value so that it adds more detail. The detail map is added to the diffuse map using ADD_SIGNED, so that it is possible to add and substract color from the diffuse map. For example a value of (127,127,127) will not change the appearance of the diffuse map at all. Often used for terrain rendering.

+
EMT_SPHERE_MAP  +

Look like a reflection of the environment around it.

+

To make this possible, a texture called 'sphere map' is used, which must be set as the first texture.

+
EMT_REFLECTION_2_LAYER  +

A reflecting material with an optional non reflecting texture layer.

+

The reflection map should be set as first texture.

+
EMT_TRANSPARENT_ADD_COLOR  +

A transparent material.

+

Only the first texture is used. The new color is calculated by simply adding the source color and the dest color. This means if for example a billboard using a texture with black background and a red circle on it is drawn with this material, the result is that only the red circle will be drawn a little bit transparent, and everything which was black is 100% transparent and not visible. This material type is useful for particle effects.

+
EMT_TRANSPARENT_ALPHA_CHANNEL  +

Makes the material transparent based on the texture alpha channel.

+

The final color is blended together from the destination color and the texture color, using the alpha channel value as blend factor. Only first texture is used. If you are using this material with small textures, it is a good idea to load the texture in 32 bit mode (video::IVideoDriver::setTextureCreationFlag()). Also, an alpha ref is used, which can be manipulated using SMaterial::MaterialTypeParam. This value controls how sharp the edges become when going from a transparent to a solid spot on the texture.

+
EMT_TRANSPARENT_ALPHA_CHANNEL_REF  +

Makes the material transparent based on the texture alpha channel.

+

If the alpha channel value is greater than 127, a pixel is written to the target, otherwise not. This material does not use alpha blending and is a lot faster than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing stuff like leafes of plants, because the borders are not blurry but sharp. Only first texture is used. If you are using this material with small textures and 3d object, it is a good idea to load the texture in 32 bit mode (video::IVideoDriver::setTextureCreationFlag()).

+
EMT_TRANSPARENT_VERTEX_ALPHA  +

Makes the material transparent based on the vertex alpha value.

+
EMT_TRANSPARENT_REFLECTION_2_LAYER  +

A transparent reflecting material with an optional additional non reflecting texture layer.

+

The reflection map should be set as first texture. The transparency depends on the alpha value in the vertex colors. A texture which will not reflect can be set as second texture. Please note that this material type is currently not 100% implemented in OpenGL.

+
EMT_NORMAL_MAP_SOLID  +

A solid normal map renderer.

+

First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen.

+
EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR  +

A transparent normal map renderer.

+

First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen.

+
EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA  +

A transparent (based on the vertex alpha value) normal map renderer.

+

First texture is the color map, the second should be the normal map. Note that you should use this material only when drawing geometry consisting of vertices of type S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into this format using IMeshManipulator::createMeshWithTangents() (See SpecialFX2 Tutorial). This shader runs on vertex shader 1.1 and pixel shader 1.1 capable hardware and falls back to a fixed function lighted material if this hardware is not available. Only two lights are supported by this shader, if there are more, the nearest two are chosen.

+
EMT_PARALLAX_MAP_SOLID  +

Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping.

+

Looks a lot more realistic. This only works when the hardware supports at least vertex shader 1.1 and pixel shader 1.4. First texture is the color map, the second should be the normal map. The normal map texture should contain the height value in the alpha component. The IVideoDriver::makeNormalMapTexture() method writes this value automatically when creating normal maps from a heightmap when using a 32 bit texture. The height scale of the material (affecting the bumpiness) is being controlled by the SMaterial::MaterialTypeParam member. If set to zero, the default value (0.02f) will be applied. Otherwise the value set in SMaterial::MaterialTypeParam is taken. This value depends on with which scale the texture is mapped on the material. Too high or low values of MaterialTypeParam can result in strange artifacts.

+
EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR  +

A material like EMT_PARALLAX_MAP_SOLID, but transparent.

+

Using EMT_TRANSPARENT_ADD_COLOR as base material.

+
EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA  +

A material like EMT_PARALLAX_MAP_SOLID, but transparent.

+

Using EMT_TRANSPARENT_VERTEX_ALPHA as base material.

+
EMT_ONETEXTURE_BLEND  +

BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC )

+

Using only first texture. Generic blending method.

+
EMT_FORCE_32BIT  +

This value is not used. It only forces this enumeration to compile to 32 bit.

+
+
+
+ +

Definition at line 14 of file EMaterialTypes.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_MODULATE_FUNC
+
+
+ +

MaterialTypeParam: e.g. DirectX: D3DTOP_MODULATE, D3DTOP_MODULATE2X, D3DTOP_MODULATE4X.

+
Enumerator:
+ + + +
EMFN_MODULATE_1X  +
EMFN_MODULATE_2X  +
EMFN_MODULATE_4X  +
+
+
+ +

Definition at line 54 of file SMaterial.h.

+ +
+
+ +
+ +
+ +

Compile target enumeration for the addHighLevelShaderMaterial() method.

+
Enumerator:
+ + + + + + + + + + + + +
EPST_PS_1_1  +
EPST_PS_1_2  +
EPST_PS_1_3  +
EPST_PS_1_4  +
EPST_PS_2_0  +
EPST_PS_2_a  +
EPST_PS_2_b  +
EPST_PS_3_0  +
EPST_PS_4_0  +
EPST_PS_4_1  +
EPST_PS_5_0  +
EPST_COUNT  +

This is not a type, but a value indicating how much types there are.

+
+
+
+ +

Definition at line 38 of file EShaderTypes.h.

+ +
+
+ +
+ +
+ +

Flags for the definition of the polygon offset feature.

+

These flags define whether the offset should be into the screen, or towards the eye.

+
Enumerator:
+ + +
EPO_BACK  +

Push pixel towards the far plane, away from the eye.

+

This is typically used for rendering inner areas.

+
EPO_FRONT  +

Pull pixels towards the camera.

+

This is typically used for polygons which should appear on top of other elements, such as decals.

+
+
+
+ +

Definition at line 202 of file SMaterial.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_RENDER_TARGET
+
+
+ +

Special render targets, which usually map to dedicated hardware.

+

These render targets (besides 0 and 1) need not be supported by gfx cards

+
Enumerator:
+ + + + + + + + + + + +
ERT_FRAME_BUFFER  +

Render target is the main color frame buffer.

+
ERT_RENDER_TEXTURE  +

Render target is a render texture.

+
ERT_MULTI_RENDER_TEXTURES  +

Multi-Render target textures.

+
ERT_STEREO_LEFT_BUFFER  +

Render target is the main color frame buffer.

+
ERT_STEREO_RIGHT_BUFFER  +

Render target is the right color buffer (left is the main buffer)

+
ERT_STEREO_BOTH_BUFFERS  +

Render to both stereo buffers at once.

+
ERT_AUX_BUFFER0  +

Auxiliary buffer 0.

+
ERT_AUX_BUFFER1  +

Auxiliary buffer 1.

+
ERT_AUX_BUFFER2  +

Auxiliary buffer 2.

+
ERT_AUX_BUFFER3  +

Auxiliary buffer 3.

+
ERT_AUX_BUFFER4  +

Auxiliary buffer 4.

+
+
+
+ +

Definition at line 106 of file IVideoDriver.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_TEXTURE_CLAMP
+
+
+ +

Texture coord clamp mode outside [0.0, 1.0].

+
Enumerator:
+ + + + + + + + +
ETC_REPEAT  +

Texture repeats.

+
ETC_CLAMP  +

Texture is clamped to the last pixel.

+
ETC_CLAMP_TO_EDGE  +

Texture is clamped to the edge pixel.

+
ETC_CLAMP_TO_BORDER  +

Texture is clamped to the border pixel (if exists)

+
ETC_MIRROR  +

Texture is alternatingly mirrored (0..1..0..1..0..)

+
ETC_MIRROR_CLAMP  +

Texture is mirrored once and then clamped (0..1..0)

+
ETC_MIRROR_CLAMP_TO_EDGE  +

Texture is mirrored once and then clamped to edge.

+
ETC_MIRROR_CLAMP_TO_BORDER  +

Texture is mirrored once and then clamped to border.

+
+
+
+ +

Definition at line 18 of file SMaterialLayer.h.

+ +
+
+ +
+ +
+ +

Enumeration flags telling the video driver in which format textures should be created.

+
Enumerator:
+ + + + + + + + +
ETCF_ALWAYS_16_BIT  +

Forces the driver to create 16 bit textures always, independent of which format the file on disk has. When choosing this you may lose some color detail, but gain much speed and memory. 16 bit textures can be transferred twice as fast as 32 bit textures and only use half of the space in memory. When using this flag, it does not make sense to use the flags ETCF_ALWAYS_32_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED at the same time.

+
ETCF_ALWAYS_32_BIT  +

Forces the driver to create 32 bit textures always, independent of which format the file on disk has. Please note that some drivers (like the software device) will ignore this, because they are only able to create and use 16 bit textures. When using this flag, it does not make sense to use the flags ETCF_ALWAYS_16_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED at the same time.

+
ETCF_OPTIMIZED_FOR_QUALITY  +

Lets the driver decide in which format the textures are created and tries to make the textures look as good as possible. Usually it simply chooses the format in which the texture was stored on disk. When using this flag, it does not make sense to use the flags ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_SPEED at the same time.

+
ETCF_OPTIMIZED_FOR_SPEED  +

Lets the driver decide in which format the textures are created and tries to create them maximizing render speed. When using this flag, it does not make sense to use the flags ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_QUALITY, at the same time.

+
ETCF_CREATE_MIP_MAPS  +

Automatically creates mip map levels for the textures.

+
ETCF_NO_ALPHA_CHANNEL  +

Discard any alpha layer and use non-alpha color format.

+
ETCF_ALLOW_NON_POWER_2  +

Allow the Driver to use Non-Power-2-Textures.

+

BurningVideo can handle Non-Power-2 Textures in 2D (GUI), but not in 3D.

+
ETCF_FORCE_32_BIT_DO_NOT_USE  +

This flag is never used, it only forces the compiler to compile these enumeration values to 32 bit.

+
+
+
+ +

Definition at line 22 of file ITexture.h.

+ +
+
+ +
+ +
+ +

Enum for the mode for texture locking. Read-Only, write-only or read/write.

+
Enumerator:
+ + + +
ETLM_READ_WRITE  +

The default mode. Texture can be read and written to.

+
ETLM_READ_ONLY  +

Read only. The texture is downloaded, but not uploaded again.

+

Often used to read back shader generated textures.

+
ETLM_WRITE_ONLY  +

Write only. The texture is not downloaded and might be uninitialised.

+

The updated texture is uploaded to the GPU. Used for initialising the shader from the CPU.

+
+
+
+ +

Definition at line 74 of file ITexture.h.

+ +
+
+ +
+ +
+ +

enumeration for geometry transformation states

+
Enumerator:
+ + + + + + + + +
ETS_VIEW  +

View transformation.

+
ETS_WORLD  +

World transformation.

+
ETS_PROJECTION  +

Projection transformation.

+
ETS_TEXTURE_0  +

Texture transformation.

+
ETS_TEXTURE_1  +

Texture transformation.

+
ETS_TEXTURE_2  +

Texture transformation.

+
ETS_TEXTURE_3  +

Texture transformation.

+
ETS_COUNT  +

Not used.

+
+
+
+ +

Definition at line 52 of file IVideoDriver.h.

+ +
+
+ +
+ +
+ +

Compile target enumeration for the addHighLevelShaderMaterial() method.

+
Enumerator:
+ + + + + + + + +
EVST_VS_1_1  +
EVST_VS_2_0  +
EVST_VS_2_a  +
EVST_VS_3_0  +
EVST_VS_4_0  +
EVST_VS_4_1  +
EVST_VS_5_0  +
EVST_COUNT  +

This is not a type, but a value indicating how much types there are.

+
+
+
+ +

Definition at line 12 of file EShaderTypes.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::E_VERTEX_TYPE
+
+
+ +

Enumeration for all vertex types there are.

+
Enumerator:
+ + + +
EVT_STANDARD  +

Standard vertex type used by the Irrlicht engine, video::S3DVertex.

+
EVT_2TCOORDS  +

Vertex with two texture coordinates, video::S3DVertex2TCoords.

+

Usually used for geometry with lightmaps or other special materials.

+
EVT_TANGENTS  +

Vertex with a tangent and binormal vector, video::S3DVertexTangents.

+

Usually used for tangent space normal mapping.

+
+
+
+ +

Definition at line 18 of file S3DVertex.h.

+ +
+
+ +
+ +
+ +

enumeration for querying features of the video driver.

+
Enumerator:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EVDF_RENDER_TO_TARGET  +

Is driver able to render to a surface?

+
EVDF_HARDWARE_TL  +

Is hardeware transform and lighting supported?

+
EVDF_MULTITEXTURE  +

Are multiple textures per material possible?

+
EVDF_BILINEAR_FILTER  +

Is driver able to render with a bilinear filter applied?

+
EVDF_MIP_MAP  +

Can the driver handle mip maps?

+
EVDF_MIP_MAP_AUTO_UPDATE  +

Can the driver update mip maps automatically?

+
EVDF_STENCIL_BUFFER  +

Are stencilbuffers switched on and does the device support stencil buffers?

+
EVDF_VERTEX_SHADER_1_1  +

Is Vertex Shader 1.1 supported?

+
EVDF_VERTEX_SHADER_2_0  +

Is Vertex Shader 2.0 supported?

+
EVDF_VERTEX_SHADER_3_0  +

Is Vertex Shader 3.0 supported?

+
EVDF_PIXEL_SHADER_1_1  +

Is Pixel Shader 1.1 supported?

+
EVDF_PIXEL_SHADER_1_2  +

Is Pixel Shader 1.2 supported?

+
EVDF_PIXEL_SHADER_1_3  +

Is Pixel Shader 1.3 supported?

+
EVDF_PIXEL_SHADER_1_4  +

Is Pixel Shader 1.4 supported?

+
EVDF_PIXEL_SHADER_2_0  +

Is Pixel Shader 2.0 supported?

+
EVDF_PIXEL_SHADER_3_0  +

Is Pixel Shader 3.0 supported?

+
EVDF_ARB_VERTEX_PROGRAM_1  +

Are ARB vertex programs v1.0 supported?

+
EVDF_ARB_FRAGMENT_PROGRAM_1  +

Are ARB fragment programs v1.0 supported?

+
EVDF_ARB_GLSL  +

Is GLSL supported?

+
EVDF_HLSL  +

Is HLSL supported?

+
EVDF_TEXTURE_NSQUARE  +

Are non-square textures supported?

+
EVDF_TEXTURE_NPOT  +

Are non-power-of-two textures supported?

+
EVDF_FRAMEBUFFER_OBJECT  +

Are framebuffer objects supported?

+
EVDF_VERTEX_BUFFER_OBJECT  +

Are vertex buffer objects supported?

+
EVDF_ALPHA_TO_COVERAGE  +

Supports Alpha To Coverage.

+
EVDF_COLOR_MASK  +

Supports Color masks (disabling color planes in output)

+
EVDF_MULTIPLE_RENDER_TARGETS  +

Supports multiple render targets at once.

+
EVDF_MRT_BLEND  +

Supports separate blend settings for multiple render targets.

+
EVDF_MRT_COLOR_MASK  +

Supports separate color masks for multiple render targets.

+
EVDF_MRT_BLEND_FUNC  +

Supports separate blend functions for multiple render targets.

+
EVDF_GEOMETRY_SHADER  +

Supports geometry shaders.

+
EVDF_OCCLUSION_QUERY  +

Supports occlusion queries.

+
EVDF_POLYGON_OFFSET  +

Supports polygon offset/depth bias for avoiding z-fighting.

+
EVDF_BLEND_OPERATIONS  +

Support for different blend functions. Without, only ADD is available.

+
EVDF_TEXTURE_MATRIX  +

Support for texture coord transformation via texture matrix.

+
EVDF_CG  +

Support for NVidia's CG shader language.

+
EVDF_COUNT  +

Only used for counting the elements of this enum.

+
+
+
+ +

Definition at line 14 of file EDriverFeatures.h.

+ +
+
+ +
+
+ + + + +
enum irr::video::ECOLOR_FORMAT
+
+
+ +

An enum for the color format of textures used by the Irrlicht Engine.

+

A color format specifies how color information is stored.

+
Enumerator:
+ + + + + + + + + + + +
ECF_A1R5G5B5  +

16 bit color format used by the software driver.

+

It is thus preferred by all other irrlicht engine video drivers. There are 5 bits for every color component, and a single bit is left for alpha information.

+
ECF_R5G6B5  +

Standard 16 bit color format.

+
ECF_R8G8B8  +

24 bit color, no alpha channel, but 8 bit for red, green and blue.

+
ECF_A8R8G8B8  +

Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.

+
ECF_R16F  +

16 bit floating point format using 16 bits for the red channel.

+

Floating Point formats. The following formats may only be used for render target textures.

+
ECF_G16R16F  +

32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel.

+
ECF_A16B16G16R16F  +

64 bit floating point format 16 bits are used for the red, green, blue and alpha channels.

+
ECF_R32F  +

32 bit floating point format using 32 bits for the red channel.

+
ECF_G32R32F  +

64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel.

+
ECF_A32B32G32R32F  +

128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels.

+
ECF_UNKNOWN  +

Unknown color format:

+
+
+
+ +

Definition at line 17 of file SColor.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
u32 irr::video::A1R5G5B5toA8R8G8B8 (u16 color) [inline]
+
+
+ +

Convert A8R8G8B8 Color from A1R5G5B5 color.

+

build a nicer 32bit Color by extending dest lower bits with source high bits.

+ +

Definition at line 117 of file SColor.h.

+ +

Referenced by irr::video::SColor::setData().

+ +
+
+ +
+
+ + + + + + + + +
u16 irr::video::A1R5G5B5toR5G6B5 (u16 color) [inline]
+
+
+ +

Returns R5G6B5 Color from A1R5G5B5 color.

+ +

Definition at line 145 of file SColor.h.

+ +
+
+ +
+
+ + + + + + + + +
u16 irr::video::A8R8G8B8toA1R5G5B5 (u32 color) [inline]
+
+
+ +

Converts a 32bit (A8R8G8B8) color to a 16bit A1R5G5B5 color.

+ +

Definition at line 97 of file SColor.h.

+ +

Referenced by irr::video::SColor::getData(), and irr::video::SColor::toA1R5G5B5().

+ +
+
+ +
+
+ + + + + + + + +
u16 irr::video::A8R8G8B8toR5G6B5 (u32 color) [inline]
+
+
+ +

Converts a 32bit (A8R8G8B8) color to a 16bit R5G6B5 color.

+ +

Definition at line 107 of file SColor.h.

+ +

Referenced by irr::video::SColor::getData().

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::video::getAlpha (u16 color) [inline]
+
+
+ +

Returns the alpha component from A1R5G5B5 color.

+

In Irrlicht, alpha refers to opacity.

+
Returns:
The alpha value of the color. 0 is transparent, 1 is opaque.
+ +

Definition at line 155 of file SColor.h.

+ +
+
+ +
+
+ + + + + + + + +
s32 irr::video::getAverage (s16 color) [inline]
+
+
+ +

Returns the average from a 16 bit A1R5G5B5 color.

+ +

Definition at line 186 of file SColor.h.

+ +

References getBlue(), getGreen(), and getRed().

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::video::getBlue (u16 color) [inline]
+
+
+ +

Returns the blue component from A1R5G5B5 color.

+

Shift left by 3 to get 8 bit value.

+ +

Definition at line 179 of file SColor.h.

+ +

Referenced by getAverage().

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::video::getGreen (u16 color) [inline]
+
+
+ +

Returns the green component from A1R5G5B5 color.

+

Shift left by 3 to get 8 bit value.

+ +

Definition at line 171 of file SColor.h.

+ +

Referenced by getAverage().

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::video::getRed (u16 color) [inline]
+
+
+ +

Returns the red component from A1R5G5B5 color.

+

Shift left by 3 to get 8 bit value.

+ +

Definition at line 163 of file SColor.h.

+ +

Referenced by getAverage().

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::video::getVertexPitchFromType (E_VERTEX_TYPE vertexType) [inline]
+
+
+ +

Definition at line 256 of file S3DVertex.h.

+ +

References EVT_2TCOORDS, and EVT_TANGENTS.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
f32 irr::video::pack_textureBlendFunc (const E_BLEND_FACTOR srcFact,
const E_BLEND_FACTOR dstFact,
const E_MODULATE_FUNC modulate = EMFN_MODULATE_1X,
const u32 alphaSource = EAS_TEXTURE 
) [inline]
+
+
+ +

EMT_ONETEXTURE_BLEND: pack srcFact, dstFact, Modulate and alpha source to MaterialTypeParam.

+

alpha source can be an OR'ed combination of E_ALPHA_SOURCE values.

+ +

Definition at line 116 of file SMaterial.h.

+ +

References irr::core::FR().

+ +
+
+ +
+
+ + + + + + + + +
u16 irr::video::R5G6B5toA1R5G5B5 (u16 color) [inline]
+
+
+ +

Returns A1R5G5B5 Color from R5G6B5 color.

+ +

Definition at line 138 of file SColor.h.

+ +
+
+ +
+
+ + + + + + + + +
u32 irr::video::R5G6B5toA8R8G8B8 (u16 color) [inline]
+
+
+ +

Returns A8R8G8B8 Color from R5G6B5 color.

+ +

Definition at line 128 of file SColor.h.

+ +

Referenced by irr::video::SColor::setData().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
u16 irr::video::RGB16 (u32 r,
u32 g,
u32 b 
) [inline]
+
+
+ +

Creates a 16 bit A1R5G5B5 color.

+ +

Definition at line 70 of file SColor.h.

+ +

References RGBA16().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
u16 irr::video::RGB16from16 (u16 r,
u16 g,
u16 b 
) [inline]
+
+
+ +

Creates a 16bit A1R5G5B5 color, based on 16bit input values.

+ +

Definition at line 77 of file SColor.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
u16 irr::video::RGBA16 (u32 r,
u32 g,
u32 b,
u32 a = 0xFF 
) [inline]
+
+
+ +

Creates a 16 bit A1R5G5B5 color.

+ +

Definition at line 60 of file SColor.h.

+ +

Referenced by RGB16().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::textureBlendFunc_hasAlpha (const E_BLEND_FACTOR factor) [inline]
+
+
+ +

EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending.

+ +

Definition at line 135 of file SMaterial.h.

+ +

References EBF_DST_ALPHA, EBF_ONE_MINUS_DST_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EBF_SRC_ALPHA, and EBF_SRC_ALPHA_SATURATE.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void irr::video::unpack_textureBlendFunc (E_BLEND_FACTOR & srcFact,
E_BLEND_FACTOR & dstFact,
E_MODULATE_FUNC & modulo,
u32 & alphaSource,
const f32 param 
) [inline]
+
+
+ +

EMT_ONETEXTURE_BLEND: unpack srcFact & dstFact and Modulo to MaterialTypeParam.

+

The fields don't use the full byte range, so we could pack even more...

+ +

Definition at line 124 of file SMaterial.h.

+ +

References irr::core::IR().

+ +
+
+ +
+
+ + + + + + + + +
u16 irr::video::X8R8G8B8toA1R5G5B5 (u32 color) [inline]
+
+
+ +

Converts a 32bit (X8R8G8B8) color to a 16bit A1R5G5B5 color.

+ +

Definition at line 87 of file SColor.h.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const c8* const irr::video::FogTypeNames[]
+
+
+Initial value:
+    {
+        "FogExp",
+        "FogLinear",
+        "FogExp2",
+        0
+    }
+
+

Definition at line 140 of file IVideoDriver.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::video::GEOMETRY_SHADER_TYPE_NAMES[]
+
+
+Initial value:
 {
+    "gs_4_0",
+    0 }
+
+

String names for supported geometry shader types.

+ +

Definition at line 81 of file EShaderTypes.h.

+ +
+
+ +
+
+ + + + +
IRRLICHT_API SMaterial irr::video::IdentityMaterial
+
+
+ +

global const identity Material

+ +

Referenced by irr::scene::ISceneNode::getMaterial().

+ +
+
+ +
+
+ + + + +
const c8* const irr::video::LightTypeNames[]
+
+
+Initial value:
+{
+    "Point",
+    "Spot",
+    "Directional",
+    0
+}
+
+

Names for light types.

+ +

Definition at line 30 of file SLight.h.

+ +
+
+ + + +
+
+ + + + +
const c8* const irr::video::PIXEL_SHADER_TYPE_NAMES[]
+
+
+Initial value:
 {
+    "ps_1_1",
+    "ps_1_2",
+    "ps_1_3",
+    "ps_1_4",
+    "ps_2_0",
+    "ps_2_a",
+    "ps_2_b",
+    "ps_3_0",
+    "ps_4_0",
+    "ps_4_1",
+    "ps_5_0",
+    0 }
+
+

Names for all pixel shader types, each entry corresponds to a E_PIXEL_SHADER_TYPE entry.

+ +

Definition at line 57 of file EShaderTypes.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::video::PolygonOffsetDirectionNames[]
+
+
+Initial value:
+    {
+        "Back",
+        "Front",
+        0
+    }
+
+

Names for polygon offset direction.

+ +

Definition at line 214 of file SMaterial.h.

+ +
+
+ +
+
+ + + + +
const char* const irr::video::sBuiltInMaterialTypeNames[]
+
+
+Initial value:
+    {
+        "solid",
+        "solid_2layer",
+        "lightmap",
+        "lightmap_add",
+        "lightmap_m2",
+        "lightmap_m4",
+        "lightmap_light",
+        "lightmap_light_m2",
+        "lightmap_light_m4",
+        "detail_map",
+        "sphere_map",
+        "reflection_2layer",
+        "trans_add",
+        "trans_alphach",
+        "trans_alphach_ref",
+        "trans_vertex_alpha",
+        "trans_reflection_2layer",
+        "normalmap_solid",
+        "normalmap_trans_add",
+        "normalmap_trans_vertexalpha",
+        "parallaxmap_solid",
+        "parallaxmap_trans_add",
+        "parallaxmap_trans_vertexalpha",
+        "onetexture_blend",
+        0
+    }
+
+

Array holding the built in material type names.

+ +

Definition at line 200 of file EMaterialTypes.h.

+ +
+
+ +
+
+ + + + +
const char* const irr::video::sBuiltInVertexTypeNames[]
+
+
+Initial value:
+{
+    "standard",
+    "2tcoords",
+    "tangents",
+    0
+}
+
+

Array holding the built in vertex type names.

+ +

Definition at line 33 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + +
const c8* const irr::video::VERTEX_SHADER_TYPE_NAMES[]
+
+
+Initial value:
 {
+    "vs_1_1",
+    "vs_2_0",
+    "vs_2_a",
+    "vs_3_0",
+    "vs_4_0",
+    "vs_4_1",
+    "vs_5_0",
+    0 }
+
+

Names for all vertex shader types, each entry corresponds to a E_VERTEX_SHADER_TYPE entry.

+ +

Definition at line 27 of file EShaderTypes.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers.html new file mode 100644 index 0000000..7e0368f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers.html @@ -0,0 +1,200 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- a -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x62.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x62.html new file mode 100644 index 0000000..6120213 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x62.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- b -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x63.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x63.html new file mode 100644 index 0000000..452d8fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x63.html @@ -0,0 +1,218 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- c -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x64.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x64.html new file mode 100644 index 0000000..1df9fa4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x64.html @@ -0,0 +1,209 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- d -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x65.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x65.html new file mode 100644 index 0000000..f3ed6ca --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x65.html @@ -0,0 +1,2707 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- e -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x66.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x66.html new file mode 100644 index 0000000..8f4ab6e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x66.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- f -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x67.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x67.html new file mode 100644 index 0000000..05f2642 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x67.html @@ -0,0 +1,239 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- g -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x68.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x68.html new file mode 100644 index 0000000..09328c4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x68.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- h -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x69.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x69.html new file mode 100644 index 0000000..b2dcfd6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x69.html @@ -0,0 +1,251 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- i -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6b.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6b.html new file mode 100644 index 0000000..92cfc2c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6b.html @@ -0,0 +1,617 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- k -

    +
  • KEY_ACCEPT +: irr +
  • +
  • KEY_ADD +: irr +
  • +
  • KEY_APPS +: irr +
  • +
  • KEY_ATTN +: irr +
  • +
  • KEY_BACK +: irr +
  • +
  • KEY_CANCEL +: irr +
  • +
  • KEY_CAPITAL +: irr +
  • +
  • KEY_CLEAR +: irr +
  • +
  • KEY_COMMA +: irr +
  • +
  • KEY_CONTROL +: irr +
  • +
  • KEY_CONVERT +: irr +
  • +
  • KEY_CRSEL +: irr +
  • +
  • KEY_DECIMAL +: irr +
  • +
  • KEY_DELETE +: irr +
  • +
  • KEY_DIVIDE +: irr +
  • +
  • KEY_DOWN +: irr +
  • +
  • KEY_END +: irr +
  • +
  • KEY_EREOF +: irr +
  • +
  • KEY_ESCAPE +: irr +
  • +
  • KEY_EXECUT +: irr +
  • +
  • KEY_EXSEL +: irr +
  • +
  • KEY_F1 +: irr +
  • +
  • KEY_F10 +: irr +
  • +
  • KEY_F11 +: irr +
  • +
  • KEY_F12 +: irr +
  • +
  • KEY_F13 +: irr +
  • +
  • KEY_F14 +: irr +
  • +
  • KEY_F15 +: irr +
  • +
  • KEY_F16 +: irr +
  • +
  • KEY_F17 +: irr +
  • +
  • KEY_F18 +: irr +
  • +
  • KEY_F19 +: irr +
  • +
  • KEY_F2 +: irr +
  • +
  • KEY_F20 +: irr +
  • +
  • KEY_F21 +: irr +
  • +
  • KEY_F22 +: irr +
  • +
  • KEY_F23 +: irr +
  • +
  • KEY_F24 +: irr +
  • +
  • KEY_F3 +: irr +
  • +
  • KEY_F4 +: irr +
  • +
  • KEY_F5 +: irr +
  • +
  • KEY_F6 +: irr +
  • +
  • KEY_F7 +: irr +
  • +
  • KEY_F8 +: irr +
  • +
  • KEY_F9 +: irr +
  • +
  • KEY_FINAL +: irr +
  • +
  • KEY_HANGUEL +: irr +
  • +
  • KEY_HANGUL +: irr +
  • +
  • KEY_HANJA +: irr +
  • +
  • KEY_HELP +: irr +
  • +
  • KEY_HOME +: irr +
  • +
  • KEY_INSERT +: irr +
  • +
  • KEY_JUNJA +: irr +
  • +
  • KEY_KANA +: irr +
  • +
  • KEY_KANJI +: irr +
  • +
  • KEY_KEY_0 +: irr +
  • +
  • KEY_KEY_1 +: irr +
  • +
  • KEY_KEY_2 +: irr +
  • +
  • KEY_KEY_3 +: irr +
  • +
  • KEY_KEY_4 +: irr +
  • +
  • KEY_KEY_5 +: irr +
  • +
  • KEY_KEY_6 +: irr +
  • +
  • KEY_KEY_7 +: irr +
  • +
  • KEY_KEY_8 +: irr +
  • +
  • KEY_KEY_9 +: irr +
  • +
  • KEY_KEY_A +: irr +
  • +
  • KEY_KEY_B +: irr +
  • +
  • KEY_KEY_C +: irr +
  • +
  • KEY_KEY_CODES_COUNT +: irr +
  • +
  • KEY_KEY_D +: irr +
  • +
  • KEY_KEY_E +: irr +
  • +
  • KEY_KEY_F +: irr +
  • +
  • KEY_KEY_G +: irr +
  • +
  • KEY_KEY_H +: irr +
  • +
  • KEY_KEY_I +: irr +
  • +
  • KEY_KEY_J +: irr +
  • +
  • KEY_KEY_K +: irr +
  • +
  • KEY_KEY_L +: irr +
  • +
  • KEY_KEY_M +: irr +
  • +
  • KEY_KEY_N +: irr +
  • +
  • KEY_KEY_O +: irr +
  • +
  • KEY_KEY_P +: irr +
  • +
  • KEY_KEY_Q +: irr +
  • +
  • KEY_KEY_R +: irr +
  • +
  • KEY_KEY_S +: irr +
  • +
  • KEY_KEY_T +: irr +
  • +
  • KEY_KEY_U +: irr +
  • +
  • KEY_KEY_V +: irr +
  • +
  • KEY_KEY_W +: irr +
  • +
  • KEY_KEY_X +: irr +
  • +
  • KEY_KEY_Y +: irr +
  • +
  • KEY_KEY_Z +: irr +
  • +
  • KEY_LBUTTON +: irr +
  • +
  • KEY_LCONTROL +: irr +
  • +
  • KEY_LEFT +: irr +
  • +
  • KEY_LMENU +: irr +
  • +
  • KEY_LSHIFT +: irr +
  • +
  • KEY_LWIN +: irr +
  • +
  • KEY_MBUTTON +: irr +
  • +
  • KEY_MENU +: irr +
  • +
  • KEY_MINUS +: irr +
  • +
  • KEY_MODECHANGE +: irr +
  • +
  • KEY_MULTIPLY +: irr +
  • +
  • KEY_NEXT +: irr +
  • +
  • KEY_NONCONVERT +: irr +
  • +
  • KEY_NUMLOCK +: irr +
  • +
  • KEY_NUMPAD0 +: irr +
  • +
  • KEY_NUMPAD1 +: irr +
  • +
  • KEY_NUMPAD2 +: irr +
  • +
  • KEY_NUMPAD3 +: irr +
  • +
  • KEY_NUMPAD4 +: irr +
  • +
  • KEY_NUMPAD5 +: irr +
  • +
  • KEY_NUMPAD6 +: irr +
  • +
  • KEY_NUMPAD7 +: irr +
  • +
  • KEY_NUMPAD8 +: irr +
  • +
  • KEY_NUMPAD9 +: irr +
  • +
  • KEY_OEM_1 +: irr +
  • +
  • KEY_OEM_102 +: irr +
  • +
  • KEY_OEM_2 +: irr +
  • +
  • KEY_OEM_3 +: irr +
  • +
  • KEY_OEM_4 +: irr +
  • +
  • KEY_OEM_5 +: irr +
  • +
  • KEY_OEM_6 +: irr +
  • +
  • KEY_OEM_7 +: irr +
  • +
  • KEY_OEM_8 +: irr +
  • +
  • KEY_OEM_AX +: irr +
  • +
  • KEY_OEM_CLEAR +: irr +
  • +
  • KEY_PA1 +: irr +
  • +
  • KEY_PAUSE +: irr +
  • +
  • KEY_PERIOD +: irr +
  • +
  • KEY_PLAY +: irr +
  • +
  • KEY_PLUS +: irr +
  • +
  • KEY_PRINT +: irr +
  • +
  • KEY_PRIOR +: irr +
  • +
  • KEY_RBUTTON +: irr +
  • +
  • KEY_RCONTROL +: irr +
  • +
  • KEY_RETURN +: irr +
  • +
  • KEY_RIGHT +: irr +
  • +
  • KEY_RMENU +: irr +
  • +
  • KEY_RSHIFT +: irr +
  • +
  • KEY_RWIN +: irr +
  • +
  • KEY_SCROLL +: irr +
  • +
  • KEY_SELECT +: irr +
  • +
  • KEY_SEPARATOR +: irr +
  • +
  • KEY_SHIFT +: irr +
  • +
  • KEY_SLEEP +: irr +
  • +
  • KEY_SNAPSHOT +: irr +
  • +
  • KEY_SPACE +: irr +
  • +
  • KEY_SUBTRACT +: irr +
  • +
  • KEY_TAB +: irr +
  • +
  • KEY_UP +: irr +
  • +
  • KEY_XBUTTON1 +: irr +
  • +
  • KEY_XBUTTON2 +: irr +
  • +
  • KEY_ZOOM +: irr +
  • +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6c.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6c.html new file mode 100644 index 0000000..92dfef7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6c.html @@ -0,0 +1,185 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- l -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6d.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6d.html new file mode 100644 index 0000000..ba6f204 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6d.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- m -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6e.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6e.html new file mode 100644 index 0000000..d9a20db --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6e.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- n -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6f.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6f.html new file mode 100644 index 0000000..d0d9f50 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x6f.html @@ -0,0 +1,167 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- o -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x70.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x70.html new file mode 100644 index 0000000..96b7624 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x70.html @@ -0,0 +1,194 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- p -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x72.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x72.html new file mode 100644 index 0000000..b6b9fa7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x72.html @@ -0,0 +1,224 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x73.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x73.html new file mode 100644 index 0000000..27fb552 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x73.html @@ -0,0 +1,245 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- s -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x74.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x74.html new file mode 100644 index 0000000..49eb249 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x74.html @@ -0,0 +1,191 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- t -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x75.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x75.html new file mode 100644 index 0000000..073692d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x75.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- u -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x76.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x76.html new file mode 100644 index 0000000..446981a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x76.html @@ -0,0 +1,173 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x77.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x77.html new file mode 100644 index 0000000..027e861 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x77.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- w -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x78.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x78.html new file mode 100644 index 0000000..caefecf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_0x78.html @@ -0,0 +1,158 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- x -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_enum.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_enum.html new file mode 100644 index 0000000..3112589 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_enum.html @@ -0,0 +1,407 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- e -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval.html new file mode 100644 index 0000000..f11ba0d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x62.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x62.html new file mode 100644 index 0000000..5b3e487 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x62.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- b -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x63.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x63.html new file mode 100644 index 0000000..6557ed3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x63.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- c -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x64.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x64.html new file mode 100644 index 0000000..e77f27b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x64.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- d -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x65.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x65.html new file mode 100644 index 0000000..03740d1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x65.html @@ -0,0 +1,2423 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- e -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x66.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x66.html new file mode 100644 index 0000000..d0db1e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x66.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- f -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x69.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x69.html new file mode 100644 index 0000000..e02b488 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x69.html @@ -0,0 +1,177 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- i -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6b.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6b.html new file mode 100644 index 0000000..96fa720 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6b.html @@ -0,0 +1,612 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- k -

    +
  • KEY_ACCEPT +: irr +
  • +
  • KEY_ADD +: irr +
  • +
  • KEY_APPS +: irr +
  • +
  • KEY_ATTN +: irr +
  • +
  • KEY_BACK +: irr +
  • +
  • KEY_CANCEL +: irr +
  • +
  • KEY_CAPITAL +: irr +
  • +
  • KEY_CLEAR +: irr +
  • +
  • KEY_COMMA +: irr +
  • +
  • KEY_CONTROL +: irr +
  • +
  • KEY_CONVERT +: irr +
  • +
  • KEY_CRSEL +: irr +
  • +
  • KEY_DECIMAL +: irr +
  • +
  • KEY_DELETE +: irr +
  • +
  • KEY_DIVIDE +: irr +
  • +
  • KEY_DOWN +: irr +
  • +
  • KEY_END +: irr +
  • +
  • KEY_EREOF +: irr +
  • +
  • KEY_ESCAPE +: irr +
  • +
  • KEY_EXECUT +: irr +
  • +
  • KEY_EXSEL +: irr +
  • +
  • KEY_F1 +: irr +
  • +
  • KEY_F10 +: irr +
  • +
  • KEY_F11 +: irr +
  • +
  • KEY_F12 +: irr +
  • +
  • KEY_F13 +: irr +
  • +
  • KEY_F14 +: irr +
  • +
  • KEY_F15 +: irr +
  • +
  • KEY_F16 +: irr +
  • +
  • KEY_F17 +: irr +
  • +
  • KEY_F18 +: irr +
  • +
  • KEY_F19 +: irr +
  • +
  • KEY_F2 +: irr +
  • +
  • KEY_F20 +: irr +
  • +
  • KEY_F21 +: irr +
  • +
  • KEY_F22 +: irr +
  • +
  • KEY_F23 +: irr +
  • +
  • KEY_F24 +: irr +
  • +
  • KEY_F3 +: irr +
  • +
  • KEY_F4 +: irr +
  • +
  • KEY_F5 +: irr +
  • +
  • KEY_F6 +: irr +
  • +
  • KEY_F7 +: irr +
  • +
  • KEY_F8 +: irr +
  • +
  • KEY_F9 +: irr +
  • +
  • KEY_FINAL +: irr +
  • +
  • KEY_HANGUEL +: irr +
  • +
  • KEY_HANGUL +: irr +
  • +
  • KEY_HANJA +: irr +
  • +
  • KEY_HELP +: irr +
  • +
  • KEY_HOME +: irr +
  • +
  • KEY_INSERT +: irr +
  • +
  • KEY_JUNJA +: irr +
  • +
  • KEY_KANA +: irr +
  • +
  • KEY_KANJI +: irr +
  • +
  • KEY_KEY_0 +: irr +
  • +
  • KEY_KEY_1 +: irr +
  • +
  • KEY_KEY_2 +: irr +
  • +
  • KEY_KEY_3 +: irr +
  • +
  • KEY_KEY_4 +: irr +
  • +
  • KEY_KEY_5 +: irr +
  • +
  • KEY_KEY_6 +: irr +
  • +
  • KEY_KEY_7 +: irr +
  • +
  • KEY_KEY_8 +: irr +
  • +
  • KEY_KEY_9 +: irr +
  • +
  • KEY_KEY_A +: irr +
  • +
  • KEY_KEY_B +: irr +
  • +
  • KEY_KEY_C +: irr +
  • +
  • KEY_KEY_CODES_COUNT +: irr +
  • +
  • KEY_KEY_D +: irr +
  • +
  • KEY_KEY_E +: irr +
  • +
  • KEY_KEY_F +: irr +
  • +
  • KEY_KEY_G +: irr +
  • +
  • KEY_KEY_H +: irr +
  • +
  • KEY_KEY_I +: irr +
  • +
  • KEY_KEY_J +: irr +
  • +
  • KEY_KEY_K +: irr +
  • +
  • KEY_KEY_L +: irr +
  • +
  • KEY_KEY_M +: irr +
  • +
  • KEY_KEY_N +: irr +
  • +
  • KEY_KEY_O +: irr +
  • +
  • KEY_KEY_P +: irr +
  • +
  • KEY_KEY_Q +: irr +
  • +
  • KEY_KEY_R +: irr +
  • +
  • KEY_KEY_S +: irr +
  • +
  • KEY_KEY_T +: irr +
  • +
  • KEY_KEY_U +: irr +
  • +
  • KEY_KEY_V +: irr +
  • +
  • KEY_KEY_W +: irr +
  • +
  • KEY_KEY_X +: irr +
  • +
  • KEY_KEY_Y +: irr +
  • +
  • KEY_KEY_Z +: irr +
  • +
  • KEY_LBUTTON +: irr +
  • +
  • KEY_LCONTROL +: irr +
  • +
  • KEY_LEFT +: irr +
  • +
  • KEY_LMENU +: irr +
  • +
  • KEY_LSHIFT +: irr +
  • +
  • KEY_LWIN +: irr +
  • +
  • KEY_MBUTTON +: irr +
  • +
  • KEY_MENU +: irr +
  • +
  • KEY_MINUS +: irr +
  • +
  • KEY_MODECHANGE +: irr +
  • +
  • KEY_MULTIPLY +: irr +
  • +
  • KEY_NEXT +: irr +
  • +
  • KEY_NONCONVERT +: irr +
  • +
  • KEY_NUMLOCK +: irr +
  • +
  • KEY_NUMPAD0 +: irr +
  • +
  • KEY_NUMPAD1 +: irr +
  • +
  • KEY_NUMPAD2 +: irr +
  • +
  • KEY_NUMPAD3 +: irr +
  • +
  • KEY_NUMPAD4 +: irr +
  • +
  • KEY_NUMPAD5 +: irr +
  • +
  • KEY_NUMPAD6 +: irr +
  • +
  • KEY_NUMPAD7 +: irr +
  • +
  • KEY_NUMPAD8 +: irr +
  • +
  • KEY_NUMPAD9 +: irr +
  • +
  • KEY_OEM_1 +: irr +
  • +
  • KEY_OEM_102 +: irr +
  • +
  • KEY_OEM_2 +: irr +
  • +
  • KEY_OEM_3 +: irr +
  • +
  • KEY_OEM_4 +: irr +
  • +
  • KEY_OEM_5 +: irr +
  • +
  • KEY_OEM_6 +: irr +
  • +
  • KEY_OEM_7 +: irr +
  • +
  • KEY_OEM_8 +: irr +
  • +
  • KEY_OEM_AX +: irr +
  • +
  • KEY_OEM_CLEAR +: irr +
  • +
  • KEY_PA1 +: irr +
  • +
  • KEY_PAUSE +: irr +
  • +
  • KEY_PERIOD +: irr +
  • +
  • KEY_PLAY +: irr +
  • +
  • KEY_PLUS +: irr +
  • +
  • KEY_PRINT +: irr +
  • +
  • KEY_PRIOR +: irr +
  • +
  • KEY_RBUTTON +: irr +
  • +
  • KEY_RCONTROL +: irr +
  • +
  • KEY_RETURN +: irr +
  • +
  • KEY_RIGHT +: irr +
  • +
  • KEY_RMENU +: irr +
  • +
  • KEY_RSHIFT +: irr +
  • +
  • KEY_RWIN +: irr +
  • +
  • KEY_SCROLL +: irr +
  • +
  • KEY_SELECT +: irr +
  • +
  • KEY_SEPARATOR +: irr +
  • +
  • KEY_SHIFT +: irr +
  • +
  • KEY_SLEEP +: irr +
  • +
  • KEY_SNAPSHOT +: irr +
  • +
  • KEY_SPACE +: irr +
  • +
  • KEY_SUBTRACT +: irr +
  • +
  • KEY_TAB +: irr +
  • +
  • KEY_UP +: irr +
  • +
  • KEY_XBUTTON1 +: irr +
  • +
  • KEY_XBUTTON2 +: irr +
  • +
  • KEY_ZOOM +: irr +
  • +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6c.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6c.html new file mode 100644 index 0000000..d88762a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6c.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- l -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6d.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6d.html new file mode 100644 index 0000000..070cb88 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6d.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- m -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6e.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6e.html new file mode 100644 index 0000000..18b2a2f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x6e.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- n -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x72.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x72.html new file mode 100644 index 0000000..b3d8209 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x72.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- r -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x73.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x73.html new file mode 100644 index 0000000..9619632 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x73.html @@ -0,0 +1,171 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- s -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x74.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x74.html new file mode 100644 index 0000000..565c1b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x74.html @@ -0,0 +1,168 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- t -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x75.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x75.html new file mode 100644 index 0000000..0791ef9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x75.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- u -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x76.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x76.html new file mode 100644 index 0000000..4f0b87e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x76.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x77.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x77.html new file mode 100644 index 0000000..ed37763 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_eval_0x77.html @@ -0,0 +1,156 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- w -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_func.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_func.html new file mode 100644 index 0000000..0b9aa91 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_func.html @@ -0,0 +1,493 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- x -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_type.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_type.html new file mode 100644 index 0000000..a7629a6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_type.html @@ -0,0 +1,362 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- f -

    +
  • f32 +: irr +
  • +
  • f64 +: irr +
  • +
  • fschar_t +: irr +
  • +
  • funcptr_createDevice +: irr +
  • +
  • funcptr_createDeviceEx +: irr +
  • +
+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespacemembers_vars.html b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_vars.html new file mode 100644 index 0000000..7a3b6f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespacemembers_vars.html @@ -0,0 +1,384 @@ + + + + +Irrlicht 3D Engine: Namespace Members + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- v -

+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/namespaces.html b/src/others/irrlicht-1.8.1/doc/html/namespaces.html new file mode 100644 index 0000000..2bb773e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/namespaces.html @@ -0,0 +1,128 @@ + + + + +Irrlicht 3D Engine: Namespace List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Namespace List
+
+
+
Here is a list of all namespaces with brief descriptions:
+ + + + + + + +
irrEverything in the Irrlicht Engine can be found in this namespace
irr::coreBasic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace
irr::guiThe gui namespace contains useful classes for easy creation of a graphical user interface
irr::ioThis namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ..
irr::sceneAll scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ..
irr::scene::quake3
irr::videoThe video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/nav_f.png b/src/others/irrlicht-1.8.1/doc/html/nav_f.png new file mode 100644 index 0000000..5f8b98d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/nav_f.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/nav_h.png b/src/others/irrlicht-1.8.1/doc/html/nav_h.png new file mode 100644 index 0000000..bd46884 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/nav_h.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/navtree.css b/src/others/irrlicht-1.8.1/doc/html/navtree.css new file mode 100644 index 0000000..287bb18 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/navtree.css @@ -0,0 +1,123 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + padding:2px; + margin:0px; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 300px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background:url("ftv2splitbar.png") repeat scroll right center transparent; + cursor:e-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9F9FC; +} + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/navtree.js b/src/others/irrlicht-1.8.1/doc/html/navtree.js new file mode 100644 index 0000000..74d1901 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/navtree.js @@ -0,0 +1,957 @@ +var NAVTREE = +[ + [ "Irrlicht 3D Engine", "index.html", [ + [ "Irrlicht Engine 1.8 API documentation", "index.html", null ], + [ "Related Pages", "pages.html", [ + [ "Tutorial 1: HelloWorld", "example001.html", null ], + [ "Tutorial 2: Quake3Map", "example002.html", null ], + [ "Tutorial 3: Custom SceneNode", "example003.html", null ], + [ "Tutorial 4: Movement", "example004.html", null ], + [ "Tutorial 5: User Interface", "example005.html", null ], + [ "Tutorial 6: 2D Graphics", "example006.html", null ], + [ "Tutorial 7: Collision", "example007.html", null ], + [ "Tutorial 8: SpecialFX", "example008.html", null ], + [ "Tutorial 9: Mesh Viewer", "example009.html", null ], + [ "Tutorial 10: Shaders", "example010.html", null ], + [ "Tutorial 11: Per-Pixel Lighting", "example011.html", null ], + [ "Tutorial 12: Terrain Rendering", "example012.html", null ], + [ "Tutorial 13: Render To Texture", "example013.html", null ], + [ "Tutorial 14: Win32 Window", "example014.html", null ], + [ "Tutorial 15: Loading Scenes from .irr Files", "example015.html", null ], + [ "Tutorial 16: Quake3 Map Shader Support", "example016.html", null ], + [ "Tutorial 17: Helloworld mobile", "example017.html", null ], + [ "Tutorial 18: Splitscreen", "example018.html", null ], + [ "Tutorial 19: Mouse and Joystick", "example019.html", null ], + [ "Tutorial 20: Managed Lights", "example020.html", null ], + [ "Tutorial 21: Quake3 Explorer", "example021.html", null ], + [ "Tutorial 22: Material Viewer", "example022.html", null ], + [ "Tutorial 23: SMeshBufferHandling", "example023.html", null ], + [ "Tutorial 24: CursorControl", "example024.html", null ], + [ "Tutorial 25: Xml Handling", "example025.html", null ], + [ "Tutorial 26: OcclusionQuery", "example026.html", null ], + [ "Deprecated List", "deprecated.html", null ] + ] ], + [ "Class List", "annotated.html", [ + [ "irr::core::aabbox3d< T >", "classirr_1_1core_1_1aabbox3d.html", null ], + [ "irr::core::map< KeyType, ValueType >::AccessClass", "classirr_1_1core_1_1map_1_1_access_class.html", null ], + [ "irr::core::array< T, TAlloc >", "classirr_1_1core_1_1array.html", null ], + [ "irr::scene::CDynamicMeshBuffer", "classirr_1_1scene_1_1_c_dynamic_mesh_buffer.html", null ], + [ "irr::scene::CIndexBuffer", "classirr_1_1scene_1_1_c_index_buffer.html", null ], + [ "irr::core::CMatrix4< T >", "classirr_1_1core_1_1_c_matrix4.html", null ], + [ "irr::scene::CMeshBuffer< T >", "classirr_1_1scene_1_1_c_mesh_buffer.html", null ], + [ "irr::core::list< T >::ConstIterator", "classirr_1_1core_1_1list_1_1_const_iterator.html", null ], + [ "irr::core::map< KeyType, ValueType >::ConstIterator", "classirr_1_1core_1_1map_1_1_const_iterator.html", null ], + [ "irr::scene::CVertexBuffer", "classirr_1_1scene_1_1_c_vertex_buffer.html", null ], + [ "irr::core::dimension2d< T >", "classirr_1_1core_1_1dimension2d.html", null ], + [ "irr::core::FloatIntUnion32", "unionirr_1_1core_1_1_float_int_union32.html", null ], + [ "irr::scene::IAnimatedMesh", "classirr_1_1scene_1_1_i_animated_mesh.html", null ], + [ "irr::scene::IAnimatedMeshMD2", "classirr_1_1scene_1_1_i_animated_mesh_m_d2.html", null ], + [ "irr::scene::IAnimatedMeshMD3", "classirr_1_1scene_1_1_i_animated_mesh_m_d3.html", null ], + [ "irr::scene::IAnimatedMeshSceneNode", "classirr_1_1scene_1_1_i_animated_mesh_scene_node.html", null ], + [ "irr::scene::IAnimationEndCallBack", "classirr_1_1scene_1_1_i_animation_end_call_back.html", null ], + [ "irr::io::IArchiveLoader", "classirr_1_1io_1_1_i_archive_loader.html", null ], + [ "irr::io::IAttributeExchangingObject", "classirr_1_1io_1_1_i_attribute_exchanging_object.html", null ], + [ "irr::io::IAttributes", "classirr_1_1io_1_1_i_attributes.html", null ], + [ "irr::scene::IBillboardSceneNode", "classirr_1_1scene_1_1_i_billboard_scene_node.html", null ], + [ "irr::scene::IBillboardTextSceneNode", "classirr_1_1scene_1_1_i_billboard_text_scene_node.html", null ], + [ "irr::scene::IBoneSceneNode", "classirr_1_1scene_1_1_i_bone_scene_node.html", null ], + [ "irr::scene::ICameraSceneNode", "classirr_1_1scene_1_1_i_camera_scene_node.html", null ], + [ "irr::scene::IColladaMeshWriter", "classirr_1_1scene_1_1_i_collada_mesh_writer.html", null ], + [ "irr::scene::IColladaMeshWriterNames", "classirr_1_1scene_1_1_i_collada_mesh_writer_names.html", null ], + [ "irr::scene::IColladaMeshWriterProperties", "classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html", null ], + [ "irr::scene::ICollisionCallback", "classirr_1_1scene_1_1_i_collision_callback.html", null ], + [ "irr::gui::ICursorControl", "classirr_1_1gui_1_1_i_cursor_control.html", null ], + [ "irr::scene::IDummyTransformationSceneNode", "classirr_1_1scene_1_1_i_dummy_transformation_scene_node.html", null ], + [ "irr::scene::IDynamicMeshBuffer", "classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html", null ], + [ "irr::IEventReceiver", "classirr_1_1_i_event_receiver.html", null ], + [ "irr::io::IFileArchive", "classirr_1_1io_1_1_i_file_archive.html", null ], + [ "irr::io::IFileList", "classirr_1_1io_1_1_i_file_list.html", null ], + [ "irr::io::IFileReadCallBack", "classirr_1_1io_1_1_i_file_read_call_back.html", null ], + [ "irr::io::IFileSystem", "classirr_1_1io_1_1_i_file_system.html", null ], + [ "irr::scene::IGeometryCreator", "classirr_1_1scene_1_1_i_geometry_creator.html", null ], + [ "irr::video::IGPUProgrammingServices", "classirr_1_1video_1_1_i_g_p_u_programming_services.html", null ], + [ "irr::gui::IGUIButton", "classirr_1_1gui_1_1_i_g_u_i_button.html", null ], + [ "irr::gui::IGUICheckBox", "classirr_1_1gui_1_1_i_g_u_i_check_box.html", null ], + [ "irr::gui::IGUIColorSelectDialog", "classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.html", null ], + [ "irr::gui::IGUIComboBox", "classirr_1_1gui_1_1_i_g_u_i_combo_box.html", null ], + [ "irr::gui::IGUIContextMenu", "classirr_1_1gui_1_1_i_g_u_i_context_menu.html", null ], + [ "irr::gui::IGUIEditBox", "classirr_1_1gui_1_1_i_g_u_i_edit_box.html", null ], + [ "irr::gui::IGUIElement", "classirr_1_1gui_1_1_i_g_u_i_element.html", null ], + [ "irr::gui::IGUIElementFactory", "classirr_1_1gui_1_1_i_g_u_i_element_factory.html", null ], + [ "irr::gui::IGUIEnvironment", "classirr_1_1gui_1_1_i_g_u_i_environment.html", null ], + [ "irr::gui::IGUIFileOpenDialog", "classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html", null ], + [ "irr::gui::IGUIFont", "classirr_1_1gui_1_1_i_g_u_i_font.html", null ], + [ "irr::gui::IGUIFontBitmap", "classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html", null ], + [ "irr::gui::IGUIImage", "classirr_1_1gui_1_1_i_g_u_i_image.html", null ], + [ "irr::gui::IGUIImageList", "classirr_1_1gui_1_1_i_g_u_i_image_list.html", null ], + [ "irr::gui::IGUIInOutFader", "classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html", null ], + [ "irr::gui::IGUIListBox", "classirr_1_1gui_1_1_i_g_u_i_list_box.html", null ], + [ "irr::gui::IGUIMeshViewer", "classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html", null ], + [ "irr::gui::IGUIScrollBar", "classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html", null ], + [ "irr::gui::IGUISkin", "classirr_1_1gui_1_1_i_g_u_i_skin.html", null ], + [ "irr::gui::IGUISpinBox", "classirr_1_1gui_1_1_i_g_u_i_spin_box.html", null ], + [ "irr::gui::IGUISpriteBank", "classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html", null ], + [ "irr::gui::IGUIStaticText", "classirr_1_1gui_1_1_i_g_u_i_static_text.html", null ], + [ "irr::gui::IGUITab", "classirr_1_1gui_1_1_i_g_u_i_tab.html", null ], + [ "irr::gui::IGUITabControl", "classirr_1_1gui_1_1_i_g_u_i_tab_control.html", null ], + [ "irr::gui::IGUITable", "classirr_1_1gui_1_1_i_g_u_i_table.html", null ], + [ "irr::gui::IGUIToolBar", "classirr_1_1gui_1_1_i_g_u_i_tool_bar.html", null ], + [ "irr::gui::IGUITreeView", "classirr_1_1gui_1_1_i_g_u_i_tree_view.html", null ], + [ "irr::gui::IGUITreeViewNode", "classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html", null ], + [ "irr::gui::IGUIWindow", "classirr_1_1gui_1_1_i_g_u_i_window.html", null ], + [ "irr::video::IImage", "classirr_1_1video_1_1_i_image.html", null ], + [ "irr::video::IImageLoader", "classirr_1_1video_1_1_i_image_loader.html", null ], + [ "irr::video::IImageWriter", "classirr_1_1video_1_1_i_image_writer.html", null ], + [ "irr::scene::IIndexBuffer", "classirr_1_1scene_1_1_i_index_buffer.html", null ], + [ "irr::io::IIrrXMLReader< char_type, super_class >", "classirr_1_1io_1_1_i_irr_x_m_l_reader.html", null ], + [ "irr::scene::ILightManager", "classirr_1_1scene_1_1_i_light_manager.html", null ], + [ "irr::scene::ILightSceneNode", "classirr_1_1scene_1_1_i_light_scene_node.html", null ], + [ "irr::ILogger", "classirr_1_1_i_logger.html", null ], + [ "irr::video::IMaterialRenderer", "classirr_1_1video_1_1_i_material_renderer.html", null ], + [ "irr::video::IMaterialRendererServices", "classirr_1_1video_1_1_i_material_renderer_services.html", null ], + [ "irr::scene::IMesh", "classirr_1_1scene_1_1_i_mesh.html", null ], + [ "irr::scene::IMeshBuffer", "classirr_1_1scene_1_1_i_mesh_buffer.html", null ], + [ "irr::scene::IMeshCache", "classirr_1_1scene_1_1_i_mesh_cache.html", null ], + [ "irr::scene::IMeshLoader", "classirr_1_1scene_1_1_i_mesh_loader.html", null ], + [ "irr::scene::IMeshManipulator", "classirr_1_1scene_1_1_i_mesh_manipulator.html", null ], + [ "irr::scene::IMeshSceneNode", "classirr_1_1scene_1_1_i_mesh_scene_node.html", null ], + [ "irr::scene::IMeshWriter", "classirr_1_1scene_1_1_i_mesh_writer.html", null ], + [ "irr::scene::IMetaTriangleSelector", "classirr_1_1scene_1_1_i_meta_triangle_selector.html", null ], + [ "irr::core::inttofloat", "unionirr_1_1core_1_1inttofloat.html", null ], + [ "irr::IOSOperator", "classirr_1_1_i_o_s_operator.html", null ], + [ "irr::scene::IParticleAffector", "classirr_1_1scene_1_1_i_particle_affector.html", null ], + [ "irr::scene::IParticleAnimatedMeshSceneNodeEmitter", "classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.html", null ], + [ "irr::scene::IParticleAttractionAffector", "classirr_1_1scene_1_1_i_particle_attraction_affector.html", null ], + [ "irr::scene::IParticleBoxEmitter", "classirr_1_1scene_1_1_i_particle_box_emitter.html", null ], + [ "irr::scene::IParticleCylinderEmitter", "classirr_1_1scene_1_1_i_particle_cylinder_emitter.html", null ], + [ "irr::scene::IParticleEmitter", "classirr_1_1scene_1_1_i_particle_emitter.html", null ], + [ "irr::scene::IParticleFadeOutAffector", "classirr_1_1scene_1_1_i_particle_fade_out_affector.html", null ], + [ "irr::scene::IParticleGravityAffector", "classirr_1_1scene_1_1_i_particle_gravity_affector.html", null ], + [ "irr::scene::IParticleMeshEmitter", "classirr_1_1scene_1_1_i_particle_mesh_emitter.html", null ], + [ "irr::scene::IParticleRingEmitter", "classirr_1_1scene_1_1_i_particle_ring_emitter.html", null ], + [ "irr::scene::IParticleRotationAffector", "classirr_1_1scene_1_1_i_particle_rotation_affector.html", null ], + [ "irr::scene::IParticleSphereEmitter", "classirr_1_1scene_1_1_i_particle_sphere_emitter.html", null ], + [ "irr::scene::IParticleSystemSceneNode", "classirr_1_1scene_1_1_i_particle_system_scene_node.html", null ], + [ "irr::scene::IQ3LevelMesh", "classirr_1_1scene_1_1_i_q3_level_mesh.html", null ], + [ "irr::IRandomizer", "classirr_1_1_i_randomizer.html", null ], + [ "irr::io::IReadFile", "classirr_1_1io_1_1_i_read_file.html", null ], + [ "irr::IReferenceCounted", "classirr_1_1_i_reference_counted.html", null ], + [ "irr::video::IRenderTarget", "structirr_1_1video_1_1_i_render_target.html", null ], + [ "irr::core::irrAllocator< T >", "classirr_1_1core_1_1irr_allocator.html", null ], + [ "irr::core::irrAllocatorFast< T >", "classirr_1_1core_1_1irr_allocator_fast.html", null ], + [ "irr::IrrlichtDevice", "classirr_1_1_irrlicht_device.html", null ], + [ "irr::scene::ISceneCollisionManager", "classirr_1_1scene_1_1_i_scene_collision_manager.html", null ], + [ "irr::scene::ISceneLoader", "classirr_1_1scene_1_1_i_scene_loader.html", null ], + [ "irr::scene::ISceneManager", "classirr_1_1scene_1_1_i_scene_manager.html", null ], + [ "irr::scene::ISceneNode", "classirr_1_1scene_1_1_i_scene_node.html", null ], + [ "irr::scene::ISceneNodeAnimator", "classirr_1_1scene_1_1_i_scene_node_animator.html", null ], + [ "irr::scene::ISceneNodeAnimatorCameraFPS", "classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.html", null ], + [ "irr::scene::ISceneNodeAnimatorCameraMaya", "classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.html", null ], + [ "irr::scene::ISceneNodeAnimatorCollisionResponse", "classirr_1_1scene_1_1_i_scene_node_animator_collision_response.html", null ], + [ "irr::scene::ISceneNodeAnimatorFactory", "classirr_1_1scene_1_1_i_scene_node_animator_factory.html", null ], + [ "irr::scene::ISceneNodeFactory", "classirr_1_1scene_1_1_i_scene_node_factory.html", null ], + [ "irr::scene::ISceneUserDataSerializer", "classirr_1_1scene_1_1_i_scene_user_data_serializer.html", null ], + [ "irr::scene::quake3::IShader", "structirr_1_1scene_1_1quake3_1_1_i_shader.html", null ], + [ "irr::video::IShaderConstantSetCallBack", "classirr_1_1video_1_1_i_shader_constant_set_call_back.html", null ], + [ "irr::scene::quake3::IShaderManager", "classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html", null ], + [ "irr::scene::IShadowVolumeSceneNode", "classirr_1_1scene_1_1_i_shadow_volume_scene_node.html", null ], + [ "irr::scene::ISkinnedMesh", "classirr_1_1scene_1_1_i_skinned_mesh.html", null ], + [ "irr::core::list< T >::Iterator", "classirr_1_1core_1_1list_1_1_iterator.html", null ], + [ "irr::core::map< KeyType, ValueType >::Iterator", "classirr_1_1core_1_1map_1_1_iterator.html", null ], + [ "irr::scene::ITerrainSceneNode", "classirr_1_1scene_1_1_i_terrain_scene_node.html", null ], + [ "irr::scene::ITextSceneNode", "classirr_1_1scene_1_1_i_text_scene_node.html", null ], + [ "irr::video::ITexture", "classirr_1_1video_1_1_i_texture.html", null ], + [ "irr::ITimer", "classirr_1_1_i_timer.html", null ], + [ "irr::scene::ITriangleSelector", "classirr_1_1scene_1_1_i_triangle_selector.html", null ], + [ "irr::scene::IVertexBuffer", "classirr_1_1scene_1_1_i_vertex_buffer.html", null ], + [ "irr::scene::IVertexManipulator", "structirr_1_1scene_1_1_i_vertex_manipulator.html", null ], + [ "irr::video::IVideoDriver", "classirr_1_1video_1_1_i_video_driver.html", null ], + [ "irr::video::IVideoModeList", "classirr_1_1video_1_1_i_video_mode_list.html", null ], + [ "irr::scene::IVolumeLightSceneNode", "classirr_1_1scene_1_1_i_volume_light_scene_node.html", null ], + [ "irr::io::IWriteFile", "classirr_1_1io_1_1_i_write_file.html", null ], + [ "irr::io::IXMLBase", "classirr_1_1io_1_1_i_x_m_l_base.html", null ], + [ "irr::io::IXMLWriter", "classirr_1_1io_1_1_i_x_m_l_writer.html", null ], + [ "irr::core::line2d< T >", "classirr_1_1core_1_1line2d.html", null ], + [ "irr::core::line3d< T >", "classirr_1_1core_1_1line3d.html", null ], + [ "irr::core::list< T >", "classirr_1_1core_1_1list.html", null ], + [ "irr::core::map< KeyType, ValueType >", "classirr_1_1core_1_1map.html", null ], + [ "irr::scene::quake3::Noiser", "structirr_1_1scene_1_1quake3_1_1_noiser.html", null ], + [ "irr::core::map< KeyType, ValueType >::ParentFirstIterator", "classirr_1_1core_1_1map_1_1_parent_first_iterator.html", null ], + [ "irr::core::map< KeyType, ValueType >::ParentLastIterator", "classirr_1_1core_1_1map_1_1_parent_last_iterator.html", null ], + [ "irr::core::plane3d< T >", "classirr_1_1core_1_1plane3d.html", null ], + [ "irr::scene::quake3::Q3LevelLoadParameter", "structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter.html", null ], + [ "irr::core::quaternion", "classirr_1_1core_1_1quaternion.html", null ], + [ "irr::ITimer::RealTimeDate", "structirr_1_1_i_timer_1_1_real_time_date.html", null ], + [ "irr::core::rect< T >", "classirr_1_1core_1_1rect.html", null ], + [ "irr::video::S3DVertex", "structirr_1_1video_1_1_s3_d_vertex.html", null ], + [ "irr::video::S3DVertex2TCoords", "structirr_1_1video_1_1_s3_d_vertex2_t_coords.html", null ], + [ "irr::video::S3DVertexTangents", "structirr_1_1video_1_1_s3_d_vertex_tangents.html", null ], + [ "irr::scene::SAnimatedMesh", "structirr_1_1scene_1_1_s_animated_mesh.html", null ], + [ "irr::io::SAttributeReadWriteOptions", "structirr_1_1io_1_1_s_attribute_read_write_options.html", null ], + [ "irr::scene::quake3::SBlendFunc", "structirr_1_1scene_1_1quake3_1_1_s_blend_func.html", null ], + [ "irr::video::SColor", "classirr_1_1video_1_1_s_color.html", null ], + [ "irr::video::SColorf", "classirr_1_1video_1_1_s_colorf.html", null ], + [ "irr::video::SColorHSL", "classirr_1_1video_1_1_s_color_h_s_l.html", null ], + [ "irr::gui::SCursorSprite", "structirr_1_1gui_1_1_s_cursor_sprite.html", null ], + [ "irr::SEvent", "structirr_1_1_s_event.html", null ], + [ "irr::video::SExposedVideoData", "structirr_1_1video_1_1_s_exposed_video_data.html", null ], + [ "irr::SEvent::SGUIEvent", "structirr_1_1_s_event_1_1_s_g_u_i_event.html", null ], + [ "irr::gui::SGUISprite", "structirr_1_1gui_1_1_s_g_u_i_sprite.html", null ], + [ "irr::gui::SGUISpriteFrame", "structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html", null ], + [ "irr::SIrrlichtCreationParameters", "structirr_1_1_s_irrlicht_creation_parameters.html", null ], + [ "irr::scene::ISkinnedMesh::SJoint", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html", null ], + [ "irr::SEvent::SJoystickEvent", "structirr_1_1_s_event_1_1_s_joystick_event.html", null ], + [ "irr::SJoystickInfo", "structirr_1_1_s_joystick_info.html", null ], + [ "irr::SEvent::SKeyInput", "structirr_1_1_s_event_1_1_s_key_input.html", null ], + [ "irr::SKeyMap", "structirr_1_1_s_key_map.html", null ], + [ "irr::video::SLight", "structirr_1_1video_1_1_s_light.html", null ], + [ "irr::SEvent::SLogEvent", "structirr_1_1_s_event_1_1_s_log_event.html", null ], + [ "irr::video::SMaterial", "classirr_1_1video_1_1_s_material.html", null ], + [ "irr::video::SMaterialLayer", "classirr_1_1video_1_1_s_material_layer.html", null ], + [ "irr::scene::SMD3AnimationInfo", "structirr_1_1scene_1_1_s_m_d3_animation_info.html", null ], + [ "irr::scene::SMD3Face", "structirr_1_1scene_1_1_s_m_d3_face.html", null ], + [ "irr::scene::SMD3Header", "structirr_1_1scene_1_1_s_m_d3_header.html", null ], + [ "irr::scene::SMD3Mesh", "structirr_1_1scene_1_1_s_m_d3_mesh.html", null ], + [ "irr::scene::SMD3MeshBuffer", "structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html", null ], + [ "irr::scene::SMD3MeshHeader", "structirr_1_1scene_1_1_s_m_d3_mesh_header.html", null ], + [ "irr::scene::SMD3QuaternionTag", "structirr_1_1scene_1_1_s_m_d3_quaternion_tag.html", null ], + [ "irr::scene::SMD3QuaternionTagList", "structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html", null ], + [ "irr::scene::SMD3TexCoord", "structirr_1_1scene_1_1_s_m_d3_tex_coord.html", null ], + [ "irr::scene::SMD3Vertex", "structirr_1_1scene_1_1_s_m_d3_vertex.html", null ], + [ "irr::scene::SMesh", "structirr_1_1scene_1_1_s_mesh.html", null ], + [ "irr::scene::quake3::SModifierFunction", "structirr_1_1scene_1_1quake3_1_1_s_modifier_function.html", null ], + [ "irr::SEvent::SMouseInput", "structirr_1_1_s_event_1_1_s_mouse_input.html", null ], + [ "irr::io::SNamedPath", "structirr_1_1io_1_1_s_named_path.html", null ], + [ "irr::video::SOverrideMaterial", "structirr_1_1video_1_1_s_override_material.html", null ], + [ "irr::scene::SParticle", "structirr_1_1scene_1_1_s_particle.html", null ], + [ "irr::scene::ISkinnedMesh::SPositionKey", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key.html", null ], + [ "irr::scene::ISkinnedMesh::SRotationKey", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key.html", null ], + [ "irr::scene::ISkinnedMesh::SScaleKey", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html", null ], + [ "irr::scene::SSharedMeshBuffer", "structirr_1_1scene_1_1_s_shared_mesh_buffer.html", null ], + [ "irr::scene::SSkinMeshBuffer", "structirr_1_1scene_1_1_s_skin_mesh_buffer.html", null ], + [ "irr::core::string< T, TAlloc >", "classirr_1_1core_1_1string.html", null ], + [ "irr::SEvent::SUserEvent", "structirr_1_1_s_event_1_1_s_user_event.html", null ], + [ "irr::scene::quake3::SVarGroup", "structirr_1_1scene_1_1quake3_1_1_s_var_group.html", null ], + [ "irr::scene::quake3::SVarGroupList", "structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html", null ], + [ "irr::scene::quake3::SVariable", "structirr_1_1scene_1_1quake3_1_1_s_variable.html", null ], + [ "irr::scene::SVertexColorBrightnessManipulator", "classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.html", null ], + [ "irr::scene::SVertexColorContrastBrightnessManipulator", "classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.html", null ], + [ "irr::scene::SVertexColorContrastManipulator", "classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.html", null ], + [ "irr::scene::SVertexColorDesaturateToAverageManipulator", "classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.html", null ], + [ "irr::scene::SVertexColorDesaturateToLightnessManipulator", "classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.html", null ], + [ "irr::scene::SVertexColorDesaturateToLuminanceManipulator", "classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.html", null ], + [ "irr::scene::SVertexColorGammaManipulator", "classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.html", null ], + [ "irr::scene::SVertexColorInterpolateLinearManipulator", "classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.html", null ], + [ "irr::scene::SVertexColorInterpolateQuadraticManipulator", "classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.html", null ], + [ "irr::scene::SVertexColorInvertManipulator", "classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.html", null ], + [ "irr::scene::SVertexColorScaleManipulator", "classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.html", null ], + [ "irr::scene::SVertexColorSetAlphaManipulator", "classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.html", null ], + [ "irr::scene::SVertexColorSetManipulator", "classirr_1_1scene_1_1_s_vertex_color_set_manipulator.html", null ], + [ "irr::scene::SVertexColorThresholdManipulator", "classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.html", null ], + [ "irr::scene::SVertexPositionScaleAlongNormalsManipulator", "classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.html", null ], + [ "irr::scene::SVertexPositionScaleManipulator", "classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.html", null ], + [ "irr::scene::SVertexPositionTransformManipulator", "classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.html", null ], + [ "irr::scene::SVertexTCoordsScaleManipulator", "classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.html", null ], + [ "irr::scene::SViewFrustum", "structirr_1_1scene_1_1_s_view_frustum.html", null ], + [ "irr::scene::ISkinnedMesh::SWeight", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html", null ], + [ "irr::core::triangle3d< T >", "classirr_1_1core_1_1triangle3d.html", null ], + [ "irr::core::vector2d< T >", "classirr_1_1core_1_1vector2d.html", null ], + [ "irr::core::vector3d< T >", "classirr_1_1core_1_1vector3d.html", null ], + [ "irr::io::xmlChar< T >", "structirr_1_1io_1_1xml_char.html", null ] + ] ], + [ "Class Index", "classes.html", null ], + [ "Class Hierarchy", "hierarchy.html", [ + [ "irr::core::aabbox3d< T >", "classirr_1_1core_1_1aabbox3d.html", null ], + [ "irr::core::map< KeyType, ValueType >::AccessClass", "classirr_1_1core_1_1map_1_1_access_class.html", null ], + [ "irr::core::array< T, TAlloc >", "classirr_1_1core_1_1array.html", null ], + [ "irr::core::CMatrix4< T >", "classirr_1_1core_1_1_c_matrix4.html", null ], + [ "irr::core::list< T >::ConstIterator", "classirr_1_1core_1_1list_1_1_const_iterator.html", null ], + [ "irr::core::map< KeyType, ValueType >::ConstIterator", "classirr_1_1core_1_1map_1_1_const_iterator.html", null ], + [ "irr::core::dimension2d< T >", "classirr_1_1core_1_1dimension2d.html", null ], + [ "irr::core::FloatIntUnion32", "unionirr_1_1core_1_1_float_int_union32.html", null ], + [ "irr::IEventReceiver", "classirr_1_1_i_event_receiver.html", [ + [ "irr::gui::IGUIElement", "classirr_1_1gui_1_1_i_g_u_i_element.html", [ + [ "irr::gui::IGUIButton", "classirr_1_1gui_1_1_i_g_u_i_button.html", null ], + [ "irr::gui::IGUICheckBox", "classirr_1_1gui_1_1_i_g_u_i_check_box.html", null ], + [ "irr::gui::IGUIColorSelectDialog", "classirr_1_1gui_1_1_i_g_u_i_color_select_dialog.html", null ], + [ "irr::gui::IGUIComboBox", "classirr_1_1gui_1_1_i_g_u_i_combo_box.html", null ], + [ "irr::gui::IGUIContextMenu", "classirr_1_1gui_1_1_i_g_u_i_context_menu.html", null ], + [ "irr::gui::IGUIEditBox", "classirr_1_1gui_1_1_i_g_u_i_edit_box.html", null ], + [ "irr::gui::IGUIFileOpenDialog", "classirr_1_1gui_1_1_i_g_u_i_file_open_dialog.html", null ], + [ "irr::gui::IGUIImage", "classirr_1_1gui_1_1_i_g_u_i_image.html", null ], + [ "irr::gui::IGUIInOutFader", "classirr_1_1gui_1_1_i_g_u_i_in_out_fader.html", null ], + [ "irr::gui::IGUIListBox", "classirr_1_1gui_1_1_i_g_u_i_list_box.html", null ], + [ "irr::gui::IGUIMeshViewer", "classirr_1_1gui_1_1_i_g_u_i_mesh_viewer.html", null ], + [ "irr::gui::IGUIScrollBar", "classirr_1_1gui_1_1_i_g_u_i_scroll_bar.html", null ], + [ "irr::gui::IGUISpinBox", "classirr_1_1gui_1_1_i_g_u_i_spin_box.html", null ], + [ "irr::gui::IGUIStaticText", "classirr_1_1gui_1_1_i_g_u_i_static_text.html", null ], + [ "irr::gui::IGUITab", "classirr_1_1gui_1_1_i_g_u_i_tab.html", null ], + [ "irr::gui::IGUITabControl", "classirr_1_1gui_1_1_i_g_u_i_tab_control.html", null ], + [ "irr::gui::IGUITable", "classirr_1_1gui_1_1_i_g_u_i_table.html", null ], + [ "irr::gui::IGUIToolBar", "classirr_1_1gui_1_1_i_g_u_i_tool_bar.html", null ], + [ "irr::gui::IGUITreeView", "classirr_1_1gui_1_1_i_g_u_i_tree_view.html", null ], + [ "irr::gui::IGUIWindow", "classirr_1_1gui_1_1_i_g_u_i_window.html", null ] + ] ], + [ "irr::scene::ICameraSceneNode", "classirr_1_1scene_1_1_i_camera_scene_node.html", null ], + [ "irr::scene::ISceneNodeAnimator", "classirr_1_1scene_1_1_i_scene_node_animator.html", [ + [ "irr::scene::ISceneNodeAnimatorCameraFPS", "classirr_1_1scene_1_1_i_scene_node_animator_camera_f_p_s.html", null ], + [ "irr::scene::ISceneNodeAnimatorCameraMaya", "classirr_1_1scene_1_1_i_scene_node_animator_camera_maya.html", null ], + [ "irr::scene::ISceneNodeAnimatorCollisionResponse", "classirr_1_1scene_1_1_i_scene_node_animator_collision_response.html", null ] + ] ] + ] ], + [ "irr::io::IFileReadCallBack", "classirr_1_1io_1_1_i_file_read_call_back.html", null ], + [ "irr::video::IGPUProgrammingServices", "classirr_1_1video_1_1_i_g_p_u_programming_services.html", null ], + [ "irr::io::IIrrXMLReader< char_type, super_class >", "classirr_1_1io_1_1_i_irr_x_m_l_reader.html", null ], + [ "irr::video::IMaterialRendererServices", "classirr_1_1video_1_1_i_material_renderer_services.html", null ], + [ "irr::core::inttofloat", "unionirr_1_1core_1_1inttofloat.html", null ], + [ "irr::IReferenceCounted", "classirr_1_1_i_reference_counted.html", [ + [ "irr::gui::ICursorControl", "classirr_1_1gui_1_1_i_cursor_control.html", null ], + [ "irr::gui::IGUIElementFactory", "classirr_1_1gui_1_1_i_g_u_i_element_factory.html", null ], + [ "irr::gui::IGUIEnvironment", "classirr_1_1gui_1_1_i_g_u_i_environment.html", null ], + [ "irr::gui::IGUIFont", "classirr_1_1gui_1_1_i_g_u_i_font.html", [ + [ "irr::gui::IGUIFontBitmap", "classirr_1_1gui_1_1_i_g_u_i_font_bitmap.html", null ] + ] ], + [ "irr::gui::IGUIImageList", "classirr_1_1gui_1_1_i_g_u_i_image_list.html", null ], + [ "irr::gui::IGUISpriteBank", "classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html", null ], + [ "irr::gui::IGUITreeViewNode", "classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html", null ], + [ "irr::ILogger", "classirr_1_1_i_logger.html", null ], + [ "irr::io::IArchiveLoader", "classirr_1_1io_1_1_i_archive_loader.html", null ], + [ "irr::io::IAttributeExchangingObject", "classirr_1_1io_1_1_i_attribute_exchanging_object.html", [ + [ "irr::gui::IGUIElement", "classirr_1_1gui_1_1_i_g_u_i_element.html", null ], + [ "irr::gui::IGUISkin", "classirr_1_1gui_1_1_i_g_u_i_skin.html", null ], + [ "irr::scene::IParticleAffector", "classirr_1_1scene_1_1_i_particle_affector.html", [ + [ "irr::scene::IParticleAttractionAffector", "classirr_1_1scene_1_1_i_particle_attraction_affector.html", null ], + [ "irr::scene::IParticleFadeOutAffector", "classirr_1_1scene_1_1_i_particle_fade_out_affector.html", null ], + [ "irr::scene::IParticleGravityAffector", "classirr_1_1scene_1_1_i_particle_gravity_affector.html", null ], + [ "irr::scene::IParticleRotationAffector", "classirr_1_1scene_1_1_i_particle_rotation_affector.html", null ] + ] ], + [ "irr::scene::IParticleEmitter", "classirr_1_1scene_1_1_i_particle_emitter.html", [ + [ "irr::scene::IParticleAnimatedMeshSceneNodeEmitter", "classirr_1_1scene_1_1_i_particle_animated_mesh_scene_node_emitter.html", null ], + [ "irr::scene::IParticleBoxEmitter", "classirr_1_1scene_1_1_i_particle_box_emitter.html", null ], + [ "irr::scene::IParticleCylinderEmitter", "classirr_1_1scene_1_1_i_particle_cylinder_emitter.html", null ], + [ "irr::scene::IParticleMeshEmitter", "classirr_1_1scene_1_1_i_particle_mesh_emitter.html", null ], + [ "irr::scene::IParticleRingEmitter", "classirr_1_1scene_1_1_i_particle_ring_emitter.html", null ], + [ "irr::scene::IParticleSphereEmitter", "classirr_1_1scene_1_1_i_particle_sphere_emitter.html", null ] + ] ], + [ "irr::scene::ISceneNode", "classirr_1_1scene_1_1_i_scene_node.html", [ + [ "irr::scene::IAnimatedMeshSceneNode", "classirr_1_1scene_1_1_i_animated_mesh_scene_node.html", null ], + [ "irr::scene::IBillboardSceneNode", "classirr_1_1scene_1_1_i_billboard_scene_node.html", [ + [ "irr::scene::IBillboardTextSceneNode", "classirr_1_1scene_1_1_i_billboard_text_scene_node.html", null ] + ] ], + [ "irr::scene::IBoneSceneNode", "classirr_1_1scene_1_1_i_bone_scene_node.html", null ], + [ "irr::scene::ICameraSceneNode", "classirr_1_1scene_1_1_i_camera_scene_node.html", null ], + [ "irr::scene::IDummyTransformationSceneNode", "classirr_1_1scene_1_1_i_dummy_transformation_scene_node.html", null ], + [ "irr::scene::ILightSceneNode", "classirr_1_1scene_1_1_i_light_scene_node.html", null ], + [ "irr::scene::IMeshSceneNode", "classirr_1_1scene_1_1_i_mesh_scene_node.html", null ], + [ "irr::scene::IParticleSystemSceneNode", "classirr_1_1scene_1_1_i_particle_system_scene_node.html", null ], + [ "irr::scene::IShadowVolumeSceneNode", "classirr_1_1scene_1_1_i_shadow_volume_scene_node.html", null ], + [ "irr::scene::ITerrainSceneNode", "classirr_1_1scene_1_1_i_terrain_scene_node.html", null ], + [ "irr::scene::ITextSceneNode", "classirr_1_1scene_1_1_i_text_scene_node.html", null ], + [ "irr::scene::IVolumeLightSceneNode", "classirr_1_1scene_1_1_i_volume_light_scene_node.html", null ] + ] ], + [ "irr::scene::ISceneNodeAnimator", "classirr_1_1scene_1_1_i_scene_node_animator.html", null ] + ] ], + [ "irr::io::IAttributes", "classirr_1_1io_1_1_i_attributes.html", null ], + [ "irr::io::IFileArchive", "classirr_1_1io_1_1_i_file_archive.html", null ], + [ "irr::io::IFileList", "classirr_1_1io_1_1_i_file_list.html", null ], + [ "irr::io::IFileSystem", "classirr_1_1io_1_1_i_file_system.html", null ], + [ "irr::io::IReadFile", "classirr_1_1io_1_1_i_read_file.html", null ], + [ "irr::io::IWriteFile", "classirr_1_1io_1_1_i_write_file.html", null ], + [ "irr::io::IXMLWriter", "classirr_1_1io_1_1_i_x_m_l_writer.html", null ], + [ "irr::IOSOperator", "classirr_1_1_i_o_s_operator.html", null ], + [ "irr::IRandomizer", "classirr_1_1_i_randomizer.html", null ], + [ "irr::IrrlichtDevice", "classirr_1_1_irrlicht_device.html", null ], + [ "irr::ITimer", "classirr_1_1_i_timer.html", null ], + [ "irr::scene::IAnimationEndCallBack", "classirr_1_1scene_1_1_i_animation_end_call_back.html", null ], + [ "irr::scene::IColladaMeshWriterNames", "classirr_1_1scene_1_1_i_collada_mesh_writer_names.html", null ], + [ "irr::scene::IColladaMeshWriterProperties", "classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html", null ], + [ "irr::scene::ICollisionCallback", "classirr_1_1scene_1_1_i_collision_callback.html", null ], + [ "irr::scene::IGeometryCreator", "classirr_1_1scene_1_1_i_geometry_creator.html", null ], + [ "irr::scene::IIndexBuffer", "classirr_1_1scene_1_1_i_index_buffer.html", [ + [ "irr::scene::CIndexBuffer", "classirr_1_1scene_1_1_c_index_buffer.html", null ] + ] ], + [ "irr::scene::ILightManager", "classirr_1_1scene_1_1_i_light_manager.html", null ], + [ "irr::scene::IMesh", "classirr_1_1scene_1_1_i_mesh.html", [ + [ "irr::scene::IAnimatedMesh", "classirr_1_1scene_1_1_i_animated_mesh.html", [ + [ "irr::scene::IAnimatedMeshMD2", "classirr_1_1scene_1_1_i_animated_mesh_m_d2.html", null ], + [ "irr::scene::IAnimatedMeshMD3", "classirr_1_1scene_1_1_i_animated_mesh_m_d3.html", null ], + [ "irr::scene::IQ3LevelMesh", "classirr_1_1scene_1_1_i_q3_level_mesh.html", null ], + [ "irr::scene::ISkinnedMesh", "classirr_1_1scene_1_1_i_skinned_mesh.html", null ], + [ "irr::scene::SAnimatedMesh", "structirr_1_1scene_1_1_s_animated_mesh.html", null ] + ] ], + [ "irr::scene::SMesh", "structirr_1_1scene_1_1_s_mesh.html", null ] + ] ], + [ "irr::scene::IMeshBuffer", "classirr_1_1scene_1_1_i_mesh_buffer.html", [ + [ "irr::scene::CMeshBuffer< T >", "classirr_1_1scene_1_1_c_mesh_buffer.html", null ], + [ "irr::scene::IDynamicMeshBuffer", "classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html", [ + [ "irr::scene::CDynamicMeshBuffer", "classirr_1_1scene_1_1_c_dynamic_mesh_buffer.html", null ] + ] ], + [ "irr::scene::SSharedMeshBuffer", "structirr_1_1scene_1_1_s_shared_mesh_buffer.html", null ], + [ "irr::scene::SSkinMeshBuffer", "structirr_1_1scene_1_1_s_skin_mesh_buffer.html", null ] + ] ], + [ "irr::scene::IMeshCache", "classirr_1_1scene_1_1_i_mesh_cache.html", null ], + [ "irr::scene::IMeshLoader", "classirr_1_1scene_1_1_i_mesh_loader.html", null ], + [ "irr::scene::IMeshManipulator", "classirr_1_1scene_1_1_i_mesh_manipulator.html", null ], + [ "irr::scene::IMeshWriter", "classirr_1_1scene_1_1_i_mesh_writer.html", [ + [ "irr::scene::IColladaMeshWriter", "classirr_1_1scene_1_1_i_collada_mesh_writer.html", null ] + ] ], + [ "irr::scene::ISceneCollisionManager", "classirr_1_1scene_1_1_i_scene_collision_manager.html", null ], + [ "irr::scene::ISceneLoader", "classirr_1_1scene_1_1_i_scene_loader.html", null ], + [ "irr::scene::ISceneManager", "classirr_1_1scene_1_1_i_scene_manager.html", null ], + [ "irr::scene::ISceneNodeAnimatorFactory", "classirr_1_1scene_1_1_i_scene_node_animator_factory.html", null ], + [ "irr::scene::ISceneNodeFactory", "classirr_1_1scene_1_1_i_scene_node_factory.html", null ], + [ "irr::scene::ITriangleSelector", "classirr_1_1scene_1_1_i_triangle_selector.html", [ + [ "irr::scene::IMetaTriangleSelector", "classirr_1_1scene_1_1_i_meta_triangle_selector.html", null ] + ] ], + [ "irr::scene::IVertexBuffer", "classirr_1_1scene_1_1_i_vertex_buffer.html", [ + [ "irr::scene::CVertexBuffer", "classirr_1_1scene_1_1_c_vertex_buffer.html", null ] + ] ], + [ "irr::scene::quake3::IShaderManager", "classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html", null ], + [ "irr::scene::quake3::SVarGroupList", "structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html", null ], + [ "irr::scene::SMD3Mesh", "structirr_1_1scene_1_1_s_m_d3_mesh.html", null ], + [ "irr::scene::SMD3MeshBuffer", "structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html", null ], + [ "irr::video::IImage", "classirr_1_1video_1_1_i_image.html", null ], + [ "irr::video::IImageLoader", "classirr_1_1video_1_1_i_image_loader.html", null ], + [ "irr::video::IImageWriter", "classirr_1_1video_1_1_i_image_writer.html", null ], + [ "irr::video::IMaterialRenderer", "classirr_1_1video_1_1_i_material_renderer.html", null ], + [ "irr::video::IShaderConstantSetCallBack", "classirr_1_1video_1_1_i_shader_constant_set_call_back.html", null ], + [ "irr::video::ITexture", "classirr_1_1video_1_1_i_texture.html", null ], + [ "irr::video::IVideoDriver", "classirr_1_1video_1_1_i_video_driver.html", null ], + [ "irr::video::IVideoModeList", "classirr_1_1video_1_1_i_video_mode_list.html", null ] + ] ], + [ "irr::video::IRenderTarget", "structirr_1_1video_1_1_i_render_target.html", null ], + [ "irr::core::irrAllocator< T >", "classirr_1_1core_1_1irr_allocator.html", null ], + [ "irr::core::irrAllocatorFast< T >", "classirr_1_1core_1_1irr_allocator_fast.html", null ], + [ "irr::scene::ISceneUserDataSerializer", "classirr_1_1scene_1_1_i_scene_user_data_serializer.html", null ], + [ "irr::scene::quake3::IShader", "structirr_1_1scene_1_1quake3_1_1_i_shader.html", null ], + [ "irr::core::list< T >::Iterator", "classirr_1_1core_1_1list_1_1_iterator.html", null ], + [ "irr::core::map< KeyType, ValueType >::Iterator", "classirr_1_1core_1_1map_1_1_iterator.html", null ], + [ "irr::scene::IVertexManipulator", "structirr_1_1scene_1_1_i_vertex_manipulator.html", [ + [ "irr::scene::SVertexColorBrightnessManipulator", "classirr_1_1scene_1_1_s_vertex_color_brightness_manipulator.html", null ], + [ "irr::scene::SVertexColorContrastBrightnessManipulator", "classirr_1_1scene_1_1_s_vertex_color_contrast_brightness_manipulator.html", null ], + [ "irr::scene::SVertexColorContrastManipulator", "classirr_1_1scene_1_1_s_vertex_color_contrast_manipulator.html", null ], + [ "irr::scene::SVertexColorDesaturateToAverageManipulator", "classirr_1_1scene_1_1_s_vertex_color_desaturate_to_average_manipulator.html", null ], + [ "irr::scene::SVertexColorDesaturateToLightnessManipulator", "classirr_1_1scene_1_1_s_vertex_color_desaturate_to_lightness_manipulator.html", null ], + [ "irr::scene::SVertexColorDesaturateToLuminanceManipulator", "classirr_1_1scene_1_1_s_vertex_color_desaturate_to_luminance_manipulator.html", null ], + [ "irr::scene::SVertexColorGammaManipulator", "classirr_1_1scene_1_1_s_vertex_color_gamma_manipulator.html", null ], + [ "irr::scene::SVertexColorInterpolateLinearManipulator", "classirr_1_1scene_1_1_s_vertex_color_interpolate_linear_manipulator.html", null ], + [ "irr::scene::SVertexColorInterpolateQuadraticManipulator", "classirr_1_1scene_1_1_s_vertex_color_interpolate_quadratic_manipulator.html", null ], + [ "irr::scene::SVertexColorInvertManipulator", "classirr_1_1scene_1_1_s_vertex_color_invert_manipulator.html", null ], + [ "irr::scene::SVertexColorScaleManipulator", "classirr_1_1scene_1_1_s_vertex_color_scale_manipulator.html", null ], + [ "irr::scene::SVertexColorSetAlphaManipulator", "classirr_1_1scene_1_1_s_vertex_color_set_alpha_manipulator.html", null ], + [ "irr::scene::SVertexColorSetManipulator", "classirr_1_1scene_1_1_s_vertex_color_set_manipulator.html", null ], + [ "irr::scene::SVertexColorThresholdManipulator", "classirr_1_1scene_1_1_s_vertex_color_threshold_manipulator.html", null ], + [ "irr::scene::SVertexPositionScaleAlongNormalsManipulator", "classirr_1_1scene_1_1_s_vertex_position_scale_along_normals_manipulator.html", null ], + [ "irr::scene::SVertexPositionScaleManipulator", "classirr_1_1scene_1_1_s_vertex_position_scale_manipulator.html", null ], + [ "irr::scene::SVertexPositionTransformManipulator", "classirr_1_1scene_1_1_s_vertex_position_transform_manipulator.html", null ], + [ "irr::scene::SVertexTCoordsScaleManipulator", "classirr_1_1scene_1_1_s_vertex_t_coords_scale_manipulator.html", null ] + ] ], + [ "irr::io::IXMLBase", "classirr_1_1io_1_1_i_x_m_l_base.html", null ], + [ "irr::core::line2d< T >", "classirr_1_1core_1_1line2d.html", null ], + [ "irr::core::line3d< T >", "classirr_1_1core_1_1line3d.html", null ], + [ "irr::core::list< T >", "classirr_1_1core_1_1list.html", null ], + [ "irr::core::map< KeyType, ValueType >", "classirr_1_1core_1_1map.html", null ], + [ "irr::scene::quake3::Noiser", "structirr_1_1scene_1_1quake3_1_1_noiser.html", null ], + [ "irr::core::map< KeyType, ValueType >::ParentFirstIterator", "classirr_1_1core_1_1map_1_1_parent_first_iterator.html", null ], + [ "irr::core::map< KeyType, ValueType >::ParentLastIterator", "classirr_1_1core_1_1map_1_1_parent_last_iterator.html", null ], + [ "irr::core::plane3d< T >", "classirr_1_1core_1_1plane3d.html", null ], + [ "irr::scene::quake3::Q3LevelLoadParameter", "structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter.html", null ], + [ "irr::core::quaternion", "classirr_1_1core_1_1quaternion.html", null ], + [ "irr::ITimer::RealTimeDate", "structirr_1_1_i_timer_1_1_real_time_date.html", null ], + [ "irr::core::rect< T >", "classirr_1_1core_1_1rect.html", null ], + [ "irr::video::S3DVertex", "structirr_1_1video_1_1_s3_d_vertex.html", [ + [ "irr::video::S3DVertex2TCoords", "structirr_1_1video_1_1_s3_d_vertex2_t_coords.html", null ], + [ "irr::video::S3DVertexTangents", "structirr_1_1video_1_1_s3_d_vertex_tangents.html", null ] + ] ], + [ "irr::io::SAttributeReadWriteOptions", "structirr_1_1io_1_1_s_attribute_read_write_options.html", null ], + [ "irr::scene::quake3::SBlendFunc", "structirr_1_1scene_1_1quake3_1_1_s_blend_func.html", null ], + [ "irr::video::SColor", "classirr_1_1video_1_1_s_color.html", null ], + [ "irr::video::SColorf", "classirr_1_1video_1_1_s_colorf.html", null ], + [ "irr::video::SColorHSL", "classirr_1_1video_1_1_s_color_h_s_l.html", null ], + [ "irr::gui::SCursorSprite", "structirr_1_1gui_1_1_s_cursor_sprite.html", null ], + [ "irr::SEvent", "structirr_1_1_s_event.html", null ], + [ "irr::video::SExposedVideoData", "structirr_1_1video_1_1_s_exposed_video_data.html", null ], + [ "irr::SEvent::SGUIEvent", "structirr_1_1_s_event_1_1_s_g_u_i_event.html", null ], + [ "irr::gui::SGUISprite", "structirr_1_1gui_1_1_s_g_u_i_sprite.html", null ], + [ "irr::gui::SGUISpriteFrame", "structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html", null ], + [ "irr::SIrrlichtCreationParameters", "structirr_1_1_s_irrlicht_creation_parameters.html", null ], + [ "irr::scene::ISkinnedMesh::SJoint", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html", null ], + [ "irr::SEvent::SJoystickEvent", "structirr_1_1_s_event_1_1_s_joystick_event.html", null ], + [ "irr::SJoystickInfo", "structirr_1_1_s_joystick_info.html", null ], + [ "irr::SEvent::SKeyInput", "structirr_1_1_s_event_1_1_s_key_input.html", null ], + [ "irr::SKeyMap", "structirr_1_1_s_key_map.html", null ], + [ "irr::video::SLight", "structirr_1_1video_1_1_s_light.html", null ], + [ "irr::SEvent::SLogEvent", "structirr_1_1_s_event_1_1_s_log_event.html", null ], + [ "irr::video::SMaterial", "classirr_1_1video_1_1_s_material.html", null ], + [ "irr::video::SMaterialLayer", "classirr_1_1video_1_1_s_material_layer.html", null ], + [ "irr::scene::SMD3AnimationInfo", "structirr_1_1scene_1_1_s_m_d3_animation_info.html", null ], + [ "irr::scene::SMD3Face", "structirr_1_1scene_1_1_s_m_d3_face.html", null ], + [ "irr::scene::SMD3Header", "structirr_1_1scene_1_1_s_m_d3_header.html", null ], + [ "irr::scene::SMD3MeshHeader", "structirr_1_1scene_1_1_s_m_d3_mesh_header.html", null ], + [ "irr::scene::SMD3QuaternionTag", "structirr_1_1scene_1_1_s_m_d3_quaternion_tag.html", null ], + [ "irr::scene::SMD3QuaternionTagList", "structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html", null ], + [ "irr::scene::SMD3TexCoord", "structirr_1_1scene_1_1_s_m_d3_tex_coord.html", null ], + [ "irr::scene::SMD3Vertex", "structirr_1_1scene_1_1_s_m_d3_vertex.html", null ], + [ "irr::scene::quake3::SModifierFunction", "structirr_1_1scene_1_1quake3_1_1_s_modifier_function.html", null ], + [ "irr::SEvent::SMouseInput", "structirr_1_1_s_event_1_1_s_mouse_input.html", null ], + [ "irr::io::SNamedPath", "structirr_1_1io_1_1_s_named_path.html", null ], + [ "irr::video::SOverrideMaterial", "structirr_1_1video_1_1_s_override_material.html", null ], + [ "irr::scene::SParticle", "structirr_1_1scene_1_1_s_particle.html", null ], + [ "irr::scene::ISkinnedMesh::SPositionKey", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key.html", null ], + [ "irr::scene::ISkinnedMesh::SRotationKey", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key.html", null ], + [ "irr::scene::ISkinnedMesh::SScaleKey", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html", null ], + [ "irr::core::string< T, TAlloc >", "classirr_1_1core_1_1string.html", null ], + [ "irr::SEvent::SUserEvent", "structirr_1_1_s_event_1_1_s_user_event.html", null ], + [ "irr::scene::quake3::SVarGroup", "structirr_1_1scene_1_1quake3_1_1_s_var_group.html", null ], + [ "irr::scene::quake3::SVariable", "structirr_1_1scene_1_1quake3_1_1_s_variable.html", null ], + [ "irr::scene::SViewFrustum", "structirr_1_1scene_1_1_s_view_frustum.html", null ], + [ "irr::scene::ISkinnedMesh::SWeight", "structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html", null ], + [ "irr::core::triangle3d< T >", "classirr_1_1core_1_1triangle3d.html", null ], + [ "irr::core::vector2d< T >", "classirr_1_1core_1_1vector2d.html", null ], + [ "irr::core::vector3d< T >", "classirr_1_1core_1_1vector3d.html", null ], + [ "irr::io::xmlChar< T >", "structirr_1_1io_1_1xml_char.html", null ] + ] ], + [ "Class Members", "functions.html", null ], + [ "Namespace List", "namespaces.html", [ + [ "irr", "namespaceirr.html", null ], + [ "irr::core", "namespaceirr_1_1core.html", null ], + [ "irr::gui", "namespaceirr_1_1gui.html", null ], + [ "irr::io", "namespaceirr_1_1io.html", null ], + [ "irr::scene", "namespaceirr_1_1scene.html", null ], + [ "irr::scene::quake3", "namespaceirr_1_1scene_1_1quake3.html", null ], + [ "irr::video", "namespaceirr_1_1video.html", null ] + ] ], + [ "Namespace Members", "namespacemembers.html", null ], + [ "File List", "files.html", [ + [ "aabbox3d.h", "aabbox3d_8h.html", null ], + [ "CDynamicMeshBuffer.h", "_c_dynamic_mesh_buffer_8h.html", null ], + [ "CIndexBuffer.h", "_c_index_buffer_8h.html", null ], + [ "CMeshBuffer.h", "_c_mesh_buffer_8h.html", null ], + [ "coreutil.h", "coreutil_8h.html", null ], + [ "CVertexBuffer.h", "_c_vertex_buffer_8h.html", null ], + [ "dimension2d.h", "dimension2d_8h.html", null ], + [ "driverChoice.h", "driver_choice_8h.html", null ], + [ "EAttributes.h", "_e_attributes_8h.html", null ], + [ "ECullingTypes.h", "_e_culling_types_8h.html", null ], + [ "EDebugSceneTypes.h", "_e_debug_scene_types_8h.html", null ], + [ "EDeviceTypes.h", "_e_device_types_8h.html", null ], + [ "EDriverFeatures.h", "_e_driver_features_8h.html", null ], + [ "EDriverTypes.h", "_e_driver_types_8h.html", null ], + [ "EGUIAlignment.h", "_e_g_u_i_alignment_8h.html", null ], + [ "EGUIElementTypes.h", "_e_g_u_i_element_types_8h.html", null ], + [ "EHardwareBufferFlags.h", "_e_hardware_buffer_flags_8h.html", null ], + [ "EMaterialFlags.h", "_e_material_flags_8h.html", null ], + [ "EMaterialTypes.h", "_e_material_types_8h.html", null ], + [ "EMeshWriterEnums.h", "_e_mesh_writer_enums_8h.html", null ], + [ "EMessageBoxFlags.h", "_e_message_box_flags_8h.html", null ], + [ "EPrimitiveTypes.h", "_e_primitive_types_8h.html", null ], + [ "ESceneNodeAnimatorTypes.h", "_e_scene_node_animator_types_8h.html", null ], + [ "ESceneNodeTypes.h", "_e_scene_node_types_8h.html", null ], + [ "EShaderTypes.h", "_e_shader_types_8h.html", null ], + [ "ETerrainElements.h", "_e_terrain_elements_8h.html", null ], + [ "fast_atof.h", "fast__atof_8h.html", null ], + [ "heapsort.h", "heapsort_8h.html", null ], + [ "IAnimatedMesh.h", "_i_animated_mesh_8h.html", null ], + [ "IAnimatedMeshMD2.h", "_i_animated_mesh_m_d2_8h.html", null ], + [ "IAnimatedMeshMD3.h", "_i_animated_mesh_m_d3_8h.html", null ], + [ "IAnimatedMeshSceneNode.h", "_i_animated_mesh_scene_node_8h.html", null ], + [ "IAttributeExchangingObject.h", "_i_attribute_exchanging_object_8h.html", null ], + [ "IAttributes.h", "_i_attributes_8h.html", null ], + [ "IBillboardSceneNode.h", "_i_billboard_scene_node_8h.html", null ], + [ "IBillboardTextSceneNode.h", "_i_billboard_text_scene_node_8h.html", null ], + [ "IBoneSceneNode.h", "_i_bone_scene_node_8h.html", null ], + [ "ICameraSceneNode.h", "_i_camera_scene_node_8h.html", null ], + [ "IColladaMeshWriter.h", "_i_collada_mesh_writer_8h.html", null ], + [ "ICursorControl.h", "_i_cursor_control_8h.html", null ], + [ "IDummyTransformationSceneNode.h", "_i_dummy_transformation_scene_node_8h.html", null ], + [ "IDynamicMeshBuffer.h", "_i_dynamic_mesh_buffer_8h.html", null ], + [ "IEventReceiver.h", "_i_event_receiver_8h.html", null ], + [ "IFileArchive.h", "_i_file_archive_8h.html", null ], + [ "IFileList.h", "_i_file_list_8h.html", null ], + [ "IFileSystem.h", "_i_file_system_8h.html", null ], + [ "IGeometryCreator.h", "_i_geometry_creator_8h.html", null ], + [ "IGPUProgrammingServices.h", "_i_g_p_u_programming_services_8h.html", null ], + [ "IGUIButton.h", "_i_g_u_i_button_8h.html", null ], + [ "IGUICheckBox.h", "_i_g_u_i_check_box_8h.html", null ], + [ "IGUIColorSelectDialog.h", "_i_g_u_i_color_select_dialog_8h.html", null ], + [ "IGUIComboBox.h", "_i_g_u_i_combo_box_8h.html", null ], + [ "IGUIContextMenu.h", "_i_g_u_i_context_menu_8h.html", null ], + [ "IGUIEditBox.h", "_i_g_u_i_edit_box_8h.html", null ], + [ "IGUIElement.h", "_i_g_u_i_element_8h.html", null ], + [ "IGUIElementFactory.h", "_i_g_u_i_element_factory_8h.html", null ], + [ "IGUIEnvironment.h", "_i_g_u_i_environment_8h.html", null ], + [ "IGUIFileOpenDialog.h", "_i_g_u_i_file_open_dialog_8h.html", null ], + [ "IGUIFont.h", "_i_g_u_i_font_8h.html", null ], + [ "IGUIFontBitmap.h", "_i_g_u_i_font_bitmap_8h.html", null ], + [ "IGUIImage.h", "_i_g_u_i_image_8h.html", null ], + [ "IGUIImageList.h", "_i_g_u_i_image_list_8h.html", null ], + [ "IGUIInOutFader.h", "_i_g_u_i_in_out_fader_8h.html", null ], + [ "IGUIListBox.h", "_i_g_u_i_list_box_8h.html", null ], + [ "IGUIMeshViewer.h", "_i_g_u_i_mesh_viewer_8h.html", null ], + [ "IGUIScrollBar.h", "_i_g_u_i_scroll_bar_8h.html", null ], + [ "IGUISkin.h", "_i_g_u_i_skin_8h.html", null ], + [ "IGUISpinBox.h", "_i_g_u_i_spin_box_8h.html", null ], + [ "IGUISpriteBank.h", "_i_g_u_i_sprite_bank_8h.html", null ], + [ "IGUIStaticText.h", "_i_g_u_i_static_text_8h.html", null ], + [ "IGUITabControl.h", "_i_g_u_i_tab_control_8h.html", null ], + [ "IGUITable.h", "_i_g_u_i_table_8h.html", null ], + [ "IGUIToolbar.h", "_i_g_u_i_toolbar_8h.html", null ], + [ "IGUITreeView.h", "_i_g_u_i_tree_view_8h.html", null ], + [ "IGUIWindow.h", "_i_g_u_i_window_8h.html", null ], + [ "IImage.h", "_i_image_8h.html", null ], + [ "IImageLoader.h", "_i_image_loader_8h.html", null ], + [ "IImageWriter.h", "_i_image_writer_8h.html", null ], + [ "IIndexBuffer.h", "_i_index_buffer_8h.html", null ], + [ "ILightManager.h", "_i_light_manager_8h.html", null ], + [ "ILightSceneNode.h", "_i_light_scene_node_8h.html", null ], + [ "ILogger.h", "_i_logger_8h.html", null ], + [ "IMaterialRenderer.h", "_i_material_renderer_8h.html", null ], + [ "IMaterialRendererServices.h", "_i_material_renderer_services_8h.html", null ], + [ "IMesh.h", "_i_mesh_8h.html", null ], + [ "IMeshBuffer.h", "_i_mesh_buffer_8h.html", null ], + [ "IMeshCache.h", "_i_mesh_cache_8h.html", null ], + [ "IMeshLoader.h", "_i_mesh_loader_8h.html", null ], + [ "IMeshManipulator.h", "_i_mesh_manipulator_8h.html", null ], + [ "IMeshSceneNode.h", "_i_mesh_scene_node_8h.html", null ], + [ "IMeshWriter.h", "_i_mesh_writer_8h.html", null ], + [ "IMetaTriangleSelector.h", "_i_meta_triangle_selector_8h.html", null ], + [ "IOSOperator.h", "_i_o_s_operator_8h.html", null ], + [ "IParticleAffector.h", "_i_particle_affector_8h.html", null ], + [ "IParticleAnimatedMeshSceneNodeEmitter.h", "_i_particle_animated_mesh_scene_node_emitter_8h.html", null ], + [ "IParticleAttractionAffector.h", "_i_particle_attraction_affector_8h.html", null ], + [ "IParticleBoxEmitter.h", "_i_particle_box_emitter_8h.html", null ], + [ "IParticleCylinderEmitter.h", "_i_particle_cylinder_emitter_8h.html", null ], + [ "IParticleEmitter.h", "_i_particle_emitter_8h.html", null ], + [ "IParticleFadeOutAffector.h", "_i_particle_fade_out_affector_8h.html", null ], + [ "IParticleGravityAffector.h", "_i_particle_gravity_affector_8h.html", null ], + [ "IParticleMeshEmitter.h", "_i_particle_mesh_emitter_8h.html", null ], + [ "IParticleRingEmitter.h", "_i_particle_ring_emitter_8h.html", null ], + [ "IParticleRotationAffector.h", "_i_particle_rotation_affector_8h.html", null ], + [ "IParticleSphereEmitter.h", "_i_particle_sphere_emitter_8h.html", null ], + [ "IParticleSystemSceneNode.h", "_i_particle_system_scene_node_8h.html", null ], + [ "IQ3LevelMesh.h", "_i_q3_level_mesh_8h.html", null ], + [ "IQ3Shader.h", "_i_q3_shader_8h.html", null ], + [ "IRandomizer.h", "_i_randomizer_8h.html", null ], + [ "IReadFile.h", "_i_read_file_8h.html", null ], + [ "IReferenceCounted.h", "_i_reference_counted_8h.html", null ], + [ "irrAllocator.h", "irr_allocator_8h.html", null ], + [ "irrArray.h", "irr_array_8h.html", null ], + [ "IrrCompileConfig.h", "_irr_compile_config_8h.html", null ], + [ "irrlicht.h", "irrlicht_8h.html", null ], + [ "IrrlichtDevice.h", "_irrlicht_device_8h.html", null ], + [ "irrList.h", "irr_list_8h.html", null ], + [ "irrMap.h", "irr_map_8h.html", null ], + [ "irrMath.h", "irr_math_8h.html", null ], + [ "irrpack.h", "irrpack_8h.html", null ], + [ "irrString.h", "irr_string_8h.html", null ], + [ "irrTypes.h", "irr_types_8h.html", null ], + [ "irrunpack.h", "irrunpack_8h.html", null ], + [ "irrXML.h", "irr_x_m_l_8h.html", null ], + [ "ISceneCollisionManager.h", "_i_scene_collision_manager_8h.html", null ], + [ "ISceneLoader.h", "_i_scene_loader_8h.html", null ], + [ "ISceneManager.h", "_i_scene_manager_8h.html", null ], + [ "ISceneNode.h", "_i_scene_node_8h.html", null ], + [ "ISceneNodeAnimator.h", "_i_scene_node_animator_8h.html", null ], + [ "ISceneNodeAnimatorCameraFPS.h", "_i_scene_node_animator_camera_f_p_s_8h.html", null ], + [ "ISceneNodeAnimatorCameraMaya.h", "_i_scene_node_animator_camera_maya_8h.html", null ], + [ "ISceneNodeAnimatorCollisionResponse.h", "_i_scene_node_animator_collision_response_8h.html", null ], + [ "ISceneNodeAnimatorFactory.h", "_i_scene_node_animator_factory_8h.html", null ], + [ "ISceneNodeFactory.h", "_i_scene_node_factory_8h.html", null ], + [ "ISceneUserDataSerializer.h", "_i_scene_user_data_serializer_8h.html", null ], + [ "IShaderConstantSetCallBack.h", "_i_shader_constant_set_call_back_8h.html", null ], + [ "IShadowVolumeSceneNode.h", "_i_shadow_volume_scene_node_8h.html", null ], + [ "ISkinnedMesh.h", "_i_skinned_mesh_8h.html", null ], + [ "ITerrainSceneNode.h", "_i_terrain_scene_node_8h.html", null ], + [ "ITextSceneNode.h", "_i_text_scene_node_8h.html", null ], + [ "ITexture.h", "_i_texture_8h.html", null ], + [ "ITimer.h", "_i_timer_8h.html", null ], + [ "ITriangleSelector.h", "_i_triangle_selector_8h.html", null ], + [ "IVertexBuffer.h", "_i_vertex_buffer_8h.html", null ], + [ "IVideoDriver.h", "_i_video_driver_8h.html", null ], + [ "IVideoModeList.h", "_i_video_mode_list_8h.html", null ], + [ "IVolumeLightSceneNode.h", "_i_volume_light_scene_node_8h.html", null ], + [ "IWriteFile.h", "_i_write_file_8h.html", null ], + [ "IXMLReader.h", "_i_x_m_l_reader_8h.html", null ], + [ "IXMLWriter.h", "_i_x_m_l_writer_8h.html", null ], + [ "Keycodes.h", "_keycodes_8h.html", null ], + [ "line2d.h", "line2d_8h.html", null ], + [ "line3d.h", "line3d_8h.html", null ], + [ "matrix4.h", "matrix4_8h.html", null ], + [ "path.h", "path_8h.html", null ], + [ "plane3d.h", "plane3d_8h.html", null ], + [ "position2d.h", "position2d_8h.html", null ], + [ "quaternion.h", "quaternion_8h.html", null ], + [ "rect.h", "rect_8h.html", null ], + [ "S3DVertex.h", "_s3_d_vertex_8h.html", null ], + [ "SAnimatedMesh.h", "_s_animated_mesh_8h.html", null ], + [ "SceneParameters.h", "_scene_parameters_8h.html", null ], + [ "SColor.h", "_s_color_8h.html", null ], + [ "SExposedVideoData.h", "_s_exposed_video_data_8h.html", null ], + [ "SIrrCreationParameters.h", "_s_irr_creation_parameters_8h.html", null ], + [ "SKeyMap.h", "_s_key_map_8h.html", null ], + [ "SLight.h", "_s_light_8h.html", null ], + [ "SMaterial.h", "_s_material_8h.html", null ], + [ "SMaterialLayer.h", "_s_material_layer_8h.html", null ], + [ "SMesh.h", "_s_mesh_8h.html", null ], + [ "SMeshBuffer.h", "_s_mesh_buffer_8h.html", null ], + [ "SMeshBufferLightMap.h", "_s_mesh_buffer_light_map_8h.html", null ], + [ "SMeshBufferTangents.h", "_s_mesh_buffer_tangents_8h.html", null ], + [ "SParticle.h", "_s_particle_8h.html", null ], + [ "SSharedMeshBuffer.h", "_s_shared_mesh_buffer_8h.html", null ], + [ "SSkinMeshBuffer.h", "_s_skin_mesh_buffer_8h.html", null ], + [ "SVertexIndex.h", "_s_vertex_index_8h.html", null ], + [ "SVertexManipulator.h", "_s_vertex_manipulator_8h.html", null ], + [ "SViewFrustum.h", "_s_view_frustum_8h.html", null ], + [ "triangle3d.h", "triangle3d_8h.html", null ], + [ "vector2d.h", "vector2d_8h.html", null ], + [ "vector3d.h", "vector3d_8h.html", null ] + ] ], + [ "File Members", "globals.html", null ] + ] ] +]; + +function createIndent(o,domNode,node,level) +{ + if (node.parentNode && node.parentNode.parentNode) + { + createIndent(o,domNode,node.parentNode,level+1); + } + var imgNode = document.createElement("img"); + if (level==0 && node.childrenData) + { + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() + { + if (node.expanded) + { + $(node.getChildrenUL()).slideUp("fast"); + if (node.isLast) + { + node.plus_img.src = node.relpath+"ftv2plastnode.png"; + } + else + { + node.plus_img.src = node.relpath+"ftv2pnode.png"; + } + node.expanded = false; + } + else + { + expandNode(o, node, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } + else + { + domNode.appendChild(imgNode); + } + if (level==0) + { + if (node.isLast) + { + if (node.childrenData) + { + imgNode.src = node.relpath+"ftv2plastnode.png"; + } + else + { + imgNode.src = node.relpath+"ftv2lastnode.png"; + domNode.appendChild(imgNode); + } + } + else + { + if (node.childrenData) + { + imgNode.src = node.relpath+"ftv2pnode.png"; + } + else + { + imgNode.src = node.relpath+"ftv2node.png"; + domNode.appendChild(imgNode); + } + } + } + else + { + if (node.isLast) + { + imgNode.src = node.relpath+"ftv2blank.png"; + } + else + { + imgNode.src = node.relpath+"ftv2vertline.png"; + } + } + imgNode.border = "0"; +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + a.appendChild(node.label); + if (link) + { + a.href = node.relpath+link; + } + else + { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + node.expanded = false; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() + { + if (!node.childrenUL) + { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); +} + +function expandNode(o, node, imm) +{ + if (node.childrenData && !node.expanded) + { + if (!node.childrenVisited) + { + getNode(o, node); + } + if (imm) + { + $(node.getChildrenUL()).show(); + } + else + { + $(node.getChildrenUL()).slideDown("fast",showRoot); + } + if (node.isLast) + { + node.plus_img.src = node.relpath+"ftv2mlastnode.png"; + } + else + { + node.plus_img.src = node.relpath+"ftv2mnode.png"; + } + node.expanded = true; + } +} + +function getNode(o, po) +{ + po.childrenVisited = true; + var l = po.childrenData.length-1; + for (var i in po.childrenData) + { + var nodeData = po.childrenData[i]; + po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], + i==l); + } +} + +function findNavTreePage(url, data) +{ + var nodes = data; + var result = null; + for (var i in nodes) + { + var d = nodes[i]; + if (d[1] == url) + { + return new Array(i); + } + else if (d[2] != null) // array of children + { + result = findNavTreePage(url, d[2]); + if (result != null) + { + return (new Array(i).concat(result)); + } + } + } + return null; +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + + getNode(o, o.node); + + o.breadcrumbs = findNavTreePage(toroot, NAVTREE); + if (o.breadcrumbs == null) + { + o.breadcrumbs = findNavTreePage("index.html",NAVTREE); + } + if (o.breadcrumbs != null && o.breadcrumbs.length>0) + { + var p = o.node; + for (var i in o.breadcrumbs) + { + var j = o.breadcrumbs[i]; + p = p.children[j]; + expandNode(o,p,true); + } + p.itemDiv.className = p.itemDiv.className + " selected"; + p.itemDiv.id = "selected"; + $(window).load(showRoot); + } +} + diff --git a/src/others/irrlicht-1.8.1/doc/html/open.png b/src/others/irrlicht-1.8.1/doc/html/open.png new file mode 100644 index 0000000..3732c64 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/open.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/pages.html b/src/others/irrlicht-1.8.1/doc/html/pages.html new file mode 100644 index 0000000..10a19dd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/pages.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: Related Pages + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/path_8h.html b/src/others/irrlicht-1.8.1/doc/html/path_8h.html new file mode 100644 index 0000000..29b4572 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/path_8h.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: path.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
path.h File Reference
+
+
+
#include "irrString.h"
+
+

Go to the source code of this file.

+

+Classes

+
    +
  • struct irr::io::SNamedPath +
    Used in places where we identify objects by a filename, but don't actually work with the real filename. More...
+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::io +

    This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...

    +
+

+Typedefs

+
    +
  • typedef core::string< fschar_t > irr::io::path +
    Type used for all file system related strings.
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/path_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/path_8h_source.html new file mode 100644 index 0000000..9ddc6cf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/path_8h_source.html @@ -0,0 +1,195 @@ + + + + +Irrlicht 3D Engine: path.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
path.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_PATH_H_INCLUDED__
+00006 #define __IRR_PATH_H_INCLUDED__
+00007 
+00008 #include "irrString.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace io
+00013 {
+00014 
+00016 
+00017 typedef core::string<fschar_t> path;
+00018 
+00020 
+00023 struct SNamedPath
+00024 {
+00026     SNamedPath() {}
+00027 
+00029     SNamedPath(const path& p) : Path(p), InternalName( PathToName(p) )
+00030     {
+00031     }
+00032 
+00034     bool operator <(const SNamedPath& other) const
+00035     {
+00036         return InternalName < other.InternalName;
+00037     }
+00038 
+00040     void setPath(const path& p)
+00041     {
+00042         Path = p;
+00043         InternalName = PathToName(p);
+00044     }
+00045 
+00047     const path& getPath() const
+00048     {
+00049         return Path;
+00050     };
+00051 
+00054     const path& getInternalName() const
+00055     {
+00056         return InternalName;
+00057     }
+00058 
+00060     operator core::stringc() const
+00061     {
+00062         return core::stringc(getPath());
+00063     }
+00065     operator core::stringw() const
+00066     {
+00067         return core::stringw(getPath());
+00068     }
+00069 
+00070 protected:
+00071     // convert the given path string to a name string.
+00072     path PathToName(const path& p) const
+00073     {
+00074         path name(p);
+00075         name.replace( '\\', '/' );
+00076         name.make_lower();
+00077         return name;
+00078     }
+00079 
+00080 private:
+00081     path Path;
+00082     path InternalName;
+00083 };
+00084 
+00085 } // io
+00086 } // irr
+00087 
+00088 #endif // __IRR_PATH_H_INCLUDED__
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/plane3d_8h.html b/src/others/irrlicht-1.8.1/doc/html/plane3d_8h.html new file mode 100644 index 0000000..f1c994d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/plane3d_8h.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: plane3d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
plane3d.h File Reference
+
+
+
#include "irrMath.h"
+#include "vector3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +

+Enumerations

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/plane3d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/plane3d_8h_source.html new file mode 100644 index 0000000..20b033f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/plane3d_8h_source.html @@ -0,0 +1,318 @@ + + + + +Irrlicht 3D Engine: plane3d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
plane3d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_PLANE_3D_H_INCLUDED__
+00006 #define __IRR_PLANE_3D_H_INCLUDED__
+00007 
+00008 #include "irrMath.h"
+00009 #include "vector3d.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015 
+00017 enum EIntersectionRelation3D
+00018 {
+00019     ISREL3D_FRONT = 0,
+00020     ISREL3D_BACK,
+00021     ISREL3D_PLANAR,
+00022     ISREL3D_SPANNING,
+00023     ISREL3D_CLIPPED
+00024 };
+00025 
+00027 
+00032 template <class T>
+00033 class plane3d
+00034 {
+00035     public:
+00036 
+00037         // Constructors
+00038 
+00039         plane3d(): Normal(0,1,0) { recalculateD(vector3d<T>(0,0,0)); }
+00040         
+00041         plane3d(const vector3d<T>& MPoint, const vector3d<T>& Normal) : Normal(Normal) { recalculateD(MPoint); }
+00042         
+00043         plane3d(T px, T py, T pz, T nx, T ny, T nz) : Normal(nx, ny, nz) { recalculateD(vector3d<T>(px, py, pz)); }
+00044         
+00045         plane3d(const vector3d<T>& point1, const vector3d<T>& point2, const vector3d<T>& point3)
+00046         { setPlane(point1, point2, point3); }
+00047         
+00048         plane3d(const vector3d<T> & normal, const T d) : Normal(normal), D(d) { }
+00049 
+00050         // operators
+00051 
+00052         inline bool operator==(const plane3d<T>& other) const { return (equals(D, other.D) && Normal==other.Normal);}
+00053 
+00054         inline bool operator!=(const plane3d<T>& other) const { return !(*this == other);}
+00055 
+00056         // functions
+00057 
+00058         void setPlane(const vector3d<T>& point, const vector3d<T>& nvector)
+00059         {
+00060             Normal = nvector;
+00061             recalculateD(point);
+00062         }
+00063 
+00064         void setPlane(const vector3d<T>& nvect, T d)
+00065         {
+00066             Normal = nvect;
+00067             D = d;
+00068         }
+00069 
+00070         void setPlane(const vector3d<T>& point1, const vector3d<T>& point2, const vector3d<T>& point3)
+00071         {
+00072             // creates the plane from 3 memberpoints
+00073             Normal = (point2 - point1).crossProduct(point3 - point1);
+00074             Normal.normalize();
+00075 
+00076             recalculateD(point1);
+00077         }
+00078 
+00079 
+00081 
+00086         bool getIntersectionWithLine(const vector3d<T>& linePoint,
+00087                 const vector3d<T>& lineVect,
+00088                 vector3d<T>& outIntersection) const
+00089         {
+00090             T t2 = Normal.dotProduct(lineVect);
+00091 
+00092             if (t2 == 0)
+00093                 return false;
+00094 
+00095             T t =- (Normal.dotProduct(linePoint) + D) / t2;
+00096             outIntersection = linePoint + (lineVect * t);
+00097             return true;
+00098         }
+00099 
+00101 
+00107         f32 getKnownIntersectionWithLine(const vector3d<T>& linePoint1,
+00108             const vector3d<T>& linePoint2) const
+00109         {
+00110             vector3d<T> vect = linePoint2 - linePoint1;
+00111             T t2 = (f32)Normal.dotProduct(vect);
+00112             return (f32)-((Normal.dotProduct(linePoint1) + D) / t2);
+00113         }
+00114 
+00116 
+00121         bool getIntersectionWithLimitedLine(
+00122                 const vector3d<T>& linePoint1,
+00123                 const vector3d<T>& linePoint2,
+00124                 vector3d<T>& outIntersection) const
+00125         {
+00126             return (getIntersectionWithLine(linePoint1, linePoint2 - linePoint1, outIntersection) &&
+00127                     outIntersection.isBetweenPoints(linePoint1, linePoint2));
+00128         }
+00129 
+00131 
+00135         EIntersectionRelation3D classifyPointRelation(const vector3d<T>& point) const
+00136         {
+00137             const T d = Normal.dotProduct(point) + D;
+00138 
+00139             if (d < -ROUNDING_ERROR_f32)
+00140                 return ISREL3D_BACK;
+00141 
+00142             if (d > ROUNDING_ERROR_f32)
+00143                 return ISREL3D_FRONT;
+00144 
+00145             return ISREL3D_PLANAR;
+00146         }
+00147 
+00149         void recalculateD(const vector3d<T>& MPoint)
+00150         {
+00151             D = - MPoint.dotProduct(Normal);
+00152         }
+00153 
+00155         vector3d<T> getMemberPoint() const
+00156         {
+00157             return Normal * -D;
+00158         }
+00159 
+00161 
+00162         bool existsIntersection(const plane3d<T>& other) const
+00163         {
+00164             vector3d<T> cross = other.Normal.crossProduct(Normal);
+00165             return cross.getLength() > core::ROUNDING_ERROR_f32;
+00166         }
+00167 
+00169 
+00173         bool getIntersectionWithPlane(const plane3d<T>& other,
+00174                 vector3d<T>& outLinePoint,
+00175                 vector3d<T>& outLineVect) const
+00176         {
+00177             const T fn00 = Normal.getLength();
+00178             const T fn01 = Normal.dotProduct(other.Normal);
+00179             const T fn11 = other.Normal.getLength();
+00180             const f64 det = fn00*fn11 - fn01*fn01;
+00181 
+00182             if (fabs(det) < ROUNDING_ERROR_f64 )
+00183                 return false;
+00184 
+00185             const f64 invdet = 1.0 / det;
+00186             const f64 fc0 = (fn11*-D + fn01*other.D) * invdet;
+00187             const f64 fc1 = (fn00*-other.D + fn01*D) * invdet;
+00188 
+00189             outLineVect = Normal.crossProduct(other.Normal);
+00190             outLinePoint = Normal*(T)fc0 + other.Normal*(T)fc1;
+00191             return true;
+00192         }
+00193 
+00195         bool getIntersectionWithPlanes(const plane3d<T>& o1,
+00196                 const plane3d<T>& o2, vector3d<T>& outPoint) const
+00197         {
+00198             vector3d<T> linePoint, lineVect;
+00199             if (getIntersectionWithPlane(o1, linePoint, lineVect))
+00200                 return o2.getIntersectionWithLine(linePoint, lineVect, outPoint);
+00201 
+00202             return false;
+00203         }
+00204 
+00206 
+00214         bool isFrontFacing(const vector3d<T>& lookDirection) const
+00215         {
+00216             const f32 d = Normal.dotProduct(lookDirection);
+00217             return F32_LOWER_EQUAL_0 ( d );
+00218         }
+00219 
+00221 
+00222         T getDistanceTo(const vector3d<T>& point) const
+00223         {
+00224             return point.dotProduct(Normal) + D;
+00225         }
+00226 
+00228         vector3d<T> Normal;
+00229 
+00231         T D;
+00232 };
+00233 
+00234 
+00236 typedef plane3d<f32> plane3df;
+00237 
+00239 typedef plane3d<s32> plane3di;
+00240 
+00241 } // end namespace core
+00242 } // end namespace irr
+00243 
+00244 #endif
+00245 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/position2d_8h.html b/src/others/irrlicht-1.8.1/doc/html/position2d_8h.html new file mode 100644 index 0000000..0886109 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/position2d_8h.html @@ -0,0 +1,162 @@ + + + + +Irrlicht 3D Engine: position2d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
position2d.h File Reference
+
+
+
#include "vector2d.h"
+
+

Go to the source code of this file.

+

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Defines

+ +

+Typedefs

+ +

Define Documentation

+ +
+
+ + + + +
#define position2d   vector2d
+
+
+ +

Definition at line 29 of file position2d.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/position2d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/position2d_8h_source.html new file mode 100644 index 0000000..8e20069 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/position2d_8h_source.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: position2d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
position2d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00006 
+00008 #ifndef __IRR_POSITION_H_INCLUDED__
+00009 #define __IRR_POSITION_H_INCLUDED__
+00010 
+00011 #include "vector2d.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace core
+00016 {
+00017 
+00018 // Use typedefs where possible as they are more explicit...
+00019 
+00021 typedef vector2d<f32> position2df;
+00022 
+00024 typedef vector2d<s32> position2di;
+00025 } // namespace core
+00026 } // namespace irr
+00027 
+00028 // ...and use a #define to catch the rest, for (e.g.) position2d<f64>
+00029 #define position2d vector2d
+00030 
+00031 #endif // __IRR_POSITION_H_INCLUDED__
+00032 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/quaternion_8h.html b/src/others/irrlicht-1.8.1/doc/html/quaternion_8h.html new file mode 100644 index 0000000..01c68bb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/quaternion_8h.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: quaternion.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
quaternion.h File Reference
+
+
+
#include "irrTypes.h"
+#include "irrMath.h"
+#include "matrix4.h"
+#include "vector3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Defines

+ +

Define Documentation

+ +
+
+ + + + +
#define IRR_TEST_BROKEN_QUATERNION_USE   0
+
+
+ +

Definition at line 16 of file quaternion.h.

+ +
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/quaternion_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/quaternion_8h_source.html new file mode 100644 index 0000000..2221a49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/quaternion_8h_source.html @@ -0,0 +1,730 @@ + + + + +Irrlicht 3D Engine: quaternion.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
quaternion.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_QUATERNION_H_INCLUDED__
+00006 #define __IRR_QUATERNION_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "irrMath.h"
+00010 #include "matrix4.h"
+00011 #include "vector3d.h"
+00012 
+00013 // Between Irrlicht 1.7 and Irrlicht 1.8 the quaternion-matrix conversions got fixed.
+00014 // This define disables all involved functions completely to allow finding all places 
+00015 // where the wrong conversions had been in use.
+00016 #define IRR_TEST_BROKEN_QUATERNION_USE 0
+00017 
+00018 namespace irr
+00019 {
+00020 namespace core
+00021 {
+00022 
+00024 
+00026 class quaternion
+00027 {
+00028     public:
+00029 
+00031         quaternion() : X(0.0f), Y(0.0f), Z(0.0f), W(1.0f) {}
+00032 
+00034         quaternion(f32 x, f32 y, f32 z, f32 w) : X(x), Y(y), Z(z), W(w) { }
+00035 
+00037         quaternion(f32 x, f32 y, f32 z);
+00038 
+00040         quaternion(const vector3df& vec);
+00041 
+00042 #if !IRR_TEST_BROKEN_QUATERNION_USE
+00043 
+00044         quaternion(const matrix4& mat);
+00045 #endif
+00046 
+00048         bool operator==(const quaternion& other) const;
+00049 
+00051         bool operator!=(const quaternion& other) const;
+00052 
+00054         inline quaternion& operator=(const quaternion& other);
+00055 
+00056 #if !IRR_TEST_BROKEN_QUATERNION_USE
+00057 
+00058         inline quaternion& operator=(const matrix4& other);
+00059 #endif
+00060 
+00062         quaternion operator+(const quaternion& other) const;
+00063 
+00065         quaternion operator*(const quaternion& other) const;
+00066 
+00068         quaternion operator*(f32 s) const;
+00069 
+00071         quaternion& operator*=(f32 s);
+00072 
+00074         vector3df operator*(const vector3df& v) const;
+00075 
+00077         quaternion& operator*=(const quaternion& other);
+00078 
+00080         inline f32 dotProduct(const quaternion& other) const;
+00081 
+00083         inline quaternion& set(f32 x, f32 y, f32 z, f32 w);
+00084 
+00086         inline quaternion& set(f32 x, f32 y, f32 z);
+00087 
+00089         inline quaternion& set(const core::vector3df& vec);
+00090 
+00092         inline quaternion& set(const core::quaternion& quat);
+00093 
+00095         inline bool equals(const quaternion& other,
+00096                 const f32 tolerance = ROUNDING_ERROR_f32 ) const;
+00097 
+00099         inline quaternion& normalize();
+00100 
+00101 #if !IRR_TEST_BROKEN_QUATERNION_USE
+00102 
+00103         matrix4 getMatrix() const;
+00104 #endif 
+00105 
+00107         void getMatrix( matrix4 &dest, const core::vector3df &translation=core::vector3df() ) const;
+00108 
+00126         void getMatrixCenter( matrix4 &dest, const core::vector3df &center, const core::vector3df &translation ) const;
+00127 
+00129         inline void getMatrix_transposed( matrix4 &dest ) const;
+00130 
+00132         quaternion& makeInverse();
+00133 
+00135 
+00141         quaternion& lerp(quaternion q1, quaternion q2, f32 time);
+00142 
+00144 
+00155         quaternion& slerp(quaternion q1, quaternion q2,
+00156                 f32 time, f32 threshold=.05f);
+00157 
+00159 
+00164         quaternion& fromAngleAxis (f32 angle, const vector3df& axis);
+00165 
+00167         void toAngleAxis (f32 &angle, core::vector3df& axis) const;
+00168 
+00170         void toEuler(vector3df& euler) const;
+00171 
+00173         quaternion& makeIdentity();
+00174 
+00176         quaternion& rotationFromTo(const vector3df& from, const vector3df& to);
+00177 
+00179         f32 X; // vectorial (imaginary) part
+00180         f32 Y;
+00181         f32 Z;
+00182         f32 W; // real part
+00183 };
+00184 
+00185 
+00186 // Constructor which converts euler angles to a quaternion
+00187 inline quaternion::quaternion(f32 x, f32 y, f32 z)
+00188 {
+00189     set(x,y,z);
+00190 }
+00191 
+00192 
+00193 // Constructor which converts euler angles to a quaternion
+00194 inline quaternion::quaternion(const vector3df& vec)
+00195 {
+00196     set(vec.X,vec.Y,vec.Z);
+00197 }
+00198 
+00199 #if !IRR_TEST_BROKEN_QUATERNION_USE
+00200 // Constructor which converts a matrix to a quaternion
+00201 inline quaternion::quaternion(const matrix4& mat)
+00202 {
+00203     (*this) = mat;
+00204 }
+00205 #endif
+00206 
+00207 // equal operator
+00208 inline bool quaternion::operator==(const quaternion& other) const
+00209 {
+00210     return ((X == other.X) &&
+00211         (Y == other.Y) &&
+00212         (Z == other.Z) &&
+00213         (W == other.W));
+00214 }
+00215 
+00216 // inequality operator
+00217 inline bool quaternion::operator!=(const quaternion& other) const
+00218 {
+00219     return !(*this == other);
+00220 }
+00221 
+00222 // assignment operator
+00223 inline quaternion& quaternion::operator=(const quaternion& other)
+00224 {
+00225     X = other.X;
+00226     Y = other.Y;
+00227     Z = other.Z;
+00228     W = other.W;
+00229     return *this;
+00230 }
+00231 
+00232 #if !IRR_TEST_BROKEN_QUATERNION_USE
+00233 // matrix assignment operator
+00234 inline quaternion& quaternion::operator=(const matrix4& m)
+00235 {
+00236     const f32 diag = m[0] + m[5] + m[10] + 1;
+00237 
+00238     if( diag > 0.0f )
+00239     {
+00240         const f32 scale = sqrtf(diag) * 2.0f; // get scale from diagonal
+00241 
+00242         // TODO: speed this up
+00243         X = (m[6] - m[9]) / scale;
+00244         Y = (m[8] - m[2]) / scale;
+00245         Z = (m[1] - m[4]) / scale;
+00246         W = 0.25f * scale;
+00247     }
+00248     else
+00249     {
+00250         if (m[0]>m[5] && m[0]>m[10])
+00251         {
+00252             // 1st element of diag is greatest value
+00253             // find scale according to 1st element, and double it
+00254             const f32 scale = sqrtf(1.0f + m[0] - m[5] - m[10]) * 2.0f;
+00255 
+00256             // TODO: speed this up
+00257             X = 0.25f * scale;
+00258             Y = (m[4] + m[1]) / scale;
+00259             Z = (m[2] + m[8]) / scale;
+00260             W = (m[6] - m[9]) / scale;
+00261         }
+00262         else if (m[5]>m[10])
+00263         {
+00264             // 2nd element of diag is greatest value
+00265             // find scale according to 2nd element, and double it
+00266             const f32 scale = sqrtf(1.0f + m[5] - m[0] - m[10]) * 2.0f;
+00267 
+00268             // TODO: speed this up
+00269             X = (m[4] + m[1]) / scale;
+00270             Y = 0.25f * scale;
+00271             Z = (m[9] + m[6]) / scale;
+00272             W = (m[8] - m[2]) / scale;
+00273         }
+00274         else
+00275         {
+00276             // 3rd element of diag is greatest value
+00277             // find scale according to 3rd element, and double it
+00278             const f32 scale = sqrtf(1.0f + m[10] - m[0] - m[5]) * 2.0f;
+00279 
+00280             // TODO: speed this up
+00281             X = (m[8] + m[2]) / scale;
+00282             Y = (m[9] + m[6]) / scale;
+00283             Z = 0.25f * scale;
+00284             W = (m[1] - m[4]) / scale;
+00285         }
+00286     }
+00287 
+00288     return normalize();
+00289 }
+00290 #endif
+00291 
+00292 
+00293 // multiplication operator
+00294 inline quaternion quaternion::operator*(const quaternion& other) const
+00295 {
+00296     quaternion tmp;
+00297 
+00298     tmp.W = (other.W * W) - (other.X * X) - (other.Y * Y) - (other.Z * Z);
+00299     tmp.X = (other.W * X) + (other.X * W) + (other.Y * Z) - (other.Z * Y);
+00300     tmp.Y = (other.W * Y) + (other.Y * W) + (other.Z * X) - (other.X * Z);
+00301     tmp.Z = (other.W * Z) + (other.Z * W) + (other.X * Y) - (other.Y * X);
+00302 
+00303     return tmp;
+00304 }
+00305 
+00306 
+00307 // multiplication operator
+00308 inline quaternion quaternion::operator*(f32 s) const
+00309 {
+00310     return quaternion(s*X, s*Y, s*Z, s*W);
+00311 }
+00312 
+00313 
+00314 // multiplication operator
+00315 inline quaternion& quaternion::operator*=(f32 s)
+00316 {
+00317     X*=s;
+00318     Y*=s;
+00319     Z*=s;
+00320     W*=s;
+00321     return *this;
+00322 }
+00323 
+00324 // multiplication operator
+00325 inline quaternion& quaternion::operator*=(const quaternion& other)
+00326 {
+00327     return (*this = other * (*this));
+00328 }
+00329 
+00330 // add operator
+00331 inline quaternion quaternion::operator+(const quaternion& b) const
+00332 {
+00333     return quaternion(X+b.X, Y+b.Y, Z+b.Z, W+b.W);
+00334 }
+00335 
+00336 #if !IRR_TEST_BROKEN_QUATERNION_USE
+00337 // Creates a matrix from this quaternion
+00338 inline matrix4 quaternion::getMatrix() const
+00339 {
+00340     core::matrix4 m;
+00341     getMatrix(m);
+00342     return m;
+00343 }
+00344 #endif
+00345 
+00349 inline void quaternion::getMatrix(matrix4 &dest,
+00350         const core::vector3df &center) const
+00351 {
+00352     dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z;
+00353     dest[1] = 2.0f*X*Y + 2.0f*Z*W;
+00354     dest[2] = 2.0f*X*Z - 2.0f*Y*W;
+00355     dest[3] = 0.0f;
+00356 
+00357     dest[4] = 2.0f*X*Y - 2.0f*Z*W;
+00358     dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z;
+00359     dest[6] = 2.0f*Z*Y + 2.0f*X*W;
+00360     dest[7] = 0.0f;
+00361 
+00362     dest[8] = 2.0f*X*Z + 2.0f*Y*W;
+00363     dest[9] = 2.0f*Z*Y - 2.0f*X*W;
+00364     dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y;
+00365     dest[11] = 0.0f;
+00366 
+00367     dest[12] = center.X;
+00368     dest[13] = center.Y;
+00369     dest[14] = center.Z;
+00370     dest[15] = 1.f;
+00371 
+00372     dest.setDefinitelyIdentityMatrix ( false );
+00373 }
+00374 
+00375 
+00388 inline void quaternion::getMatrixCenter(matrix4 &dest,
+00389                     const core::vector3df &center,
+00390                     const core::vector3df &translation) const
+00391 {
+00392     dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z;
+00393     dest[1] = 2.0f*X*Y + 2.0f*Z*W;
+00394     dest[2] = 2.0f*X*Z - 2.0f*Y*W;
+00395     dest[3] = 0.0f;
+00396 
+00397     dest[4] = 2.0f*X*Y - 2.0f*Z*W;
+00398     dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z;
+00399     dest[6] = 2.0f*Z*Y + 2.0f*X*W;
+00400     dest[7] = 0.0f;
+00401 
+00402     dest[8] = 2.0f*X*Z + 2.0f*Y*W;
+00403     dest[9] = 2.0f*Z*Y - 2.0f*X*W;
+00404     dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y;
+00405     dest[11] = 0.0f;
+00406 
+00407     dest.setRotationCenter ( center, translation );
+00408 }
+00409 
+00410 // Creates a matrix from this quaternion
+00411 inline void quaternion::getMatrix_transposed(matrix4 &dest) const
+00412 {
+00413     dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z;
+00414     dest[4] = 2.0f*X*Y + 2.0f*Z*W;
+00415     dest[8] = 2.0f*X*Z - 2.0f*Y*W;
+00416     dest[12] = 0.0f;
+00417 
+00418     dest[1] = 2.0f*X*Y - 2.0f*Z*W;
+00419     dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z;
+00420     dest[9] = 2.0f*Z*Y + 2.0f*X*W;
+00421     dest[13] = 0.0f;
+00422 
+00423     dest[2] = 2.0f*X*Z + 2.0f*Y*W;
+00424     dest[6] = 2.0f*Z*Y - 2.0f*X*W;
+00425     dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y;
+00426     dest[14] = 0.0f;
+00427 
+00428     dest[3] = 0.f;
+00429     dest[7] = 0.f;
+00430     dest[11] = 0.f;
+00431     dest[15] = 1.f;
+00432 
+00433     dest.setDefinitelyIdentityMatrix(false);
+00434 }
+00435 
+00436 
+00437 // Inverts this quaternion
+00438 inline quaternion& quaternion::makeInverse()
+00439 {
+00440     X = -X; Y = -Y; Z = -Z;
+00441     return *this;
+00442 }
+00443 
+00444 
+00445 // sets new quaternion
+00446 inline quaternion& quaternion::set(f32 x, f32 y, f32 z, f32 w)
+00447 {
+00448     X = x;
+00449     Y = y;
+00450     Z = z;
+00451     W = w;
+00452     return *this;
+00453 }
+00454 
+00455 
+00456 // sets new quaternion based on euler angles
+00457 inline quaternion& quaternion::set(f32 x, f32 y, f32 z)
+00458 {
+00459     f64 angle;
+00460 
+00461     angle = x * 0.5;
+00462     const f64 sr = sin(angle);
+00463     const f64 cr = cos(angle);
+00464 
+00465     angle = y * 0.5;
+00466     const f64 sp = sin(angle);
+00467     const f64 cp = cos(angle);
+00468 
+00469     angle = z * 0.5;
+00470     const f64 sy = sin(angle);
+00471     const f64 cy = cos(angle);
+00472 
+00473     const f64 cpcy = cp * cy;
+00474     const f64 spcy = sp * cy;
+00475     const f64 cpsy = cp * sy;
+00476     const f64 spsy = sp * sy;
+00477 
+00478     X = (f32)(sr * cpcy - cr * spsy);
+00479     Y = (f32)(cr * spcy + sr * cpsy);
+00480     Z = (f32)(cr * cpsy - sr * spcy);
+00481     W = (f32)(cr * cpcy + sr * spsy);
+00482 
+00483     return normalize();
+00484 }
+00485 
+00486 // sets new quaternion based on euler angles
+00487 inline quaternion& quaternion::set(const core::vector3df& vec)
+00488 {
+00489     return set(vec.X, vec.Y, vec.Z);
+00490 }
+00491 
+00492 // sets new quaternion based on other quaternion
+00493 inline quaternion& quaternion::set(const core::quaternion& quat)
+00494 {
+00495     return (*this=quat);
+00496 }
+00497 
+00498 
+00500 inline bool quaternion::equals(const quaternion& other, const f32 tolerance) const
+00501 {
+00502     return core::equals(X, other.X, tolerance) &&
+00503         core::equals(Y, other.Y, tolerance) &&
+00504         core::equals(Z, other.Z, tolerance) &&
+00505         core::equals(W, other.W, tolerance);
+00506 }
+00507 
+00508 
+00509 // normalizes the quaternion
+00510 inline quaternion& quaternion::normalize()
+00511 {
+00512     const f32 n = X*X + Y*Y + Z*Z + W*W;
+00513 
+00514     if (n == 1)
+00515         return *this;
+00516 
+00517     //n = 1.0f / sqrtf(n);
+00518     return (*this *= reciprocal_squareroot ( n ));
+00519 }
+00520 
+00521 
+00522 // set this quaternion to the result of the linear interpolation between two quaternions
+00523 inline quaternion& quaternion::lerp(quaternion q1, quaternion q2, f32 time)
+00524 {
+00525     const f32 scale = 1.0f - time;
+00526     return (*this = (q1*scale) + (q2*time));
+00527 }
+00528 
+00529 
+00530 // set this quaternion to the result of the interpolation between two quaternions
+00531 inline quaternion& quaternion::slerp(quaternion q1, quaternion q2, f32 time, f32 threshold)
+00532 {
+00533     f32 angle = q1.dotProduct(q2);
+00534 
+00535     // make sure we use the short rotation
+00536     if (angle < 0.0f)
+00537     {
+00538         q1 *= -1.0f;
+00539         angle *= -1.0f;
+00540     }
+00541 
+00542     if (angle <= (1-threshold)) // spherical interpolation
+00543     {
+00544         const f32 theta = acosf(angle);
+00545         const f32 invsintheta = reciprocal(sinf(theta));
+00546         const f32 scale = sinf(theta * (1.0f-time)) * invsintheta;
+00547         const f32 invscale = sinf(theta * time) * invsintheta;
+00548         return (*this = (q1*scale) + (q2*invscale));
+00549     }
+00550     else // linear interploation
+00551         return lerp(q1,q2,time);
+00552 }
+00553 
+00554 
+00555 // calculates the dot product
+00556 inline f32 quaternion::dotProduct(const quaternion& q2) const
+00557 {
+00558     return (X * q2.X) + (Y * q2.Y) + (Z * q2.Z) + (W * q2.W);
+00559 }
+00560 
+00561 
+00563 inline quaternion& quaternion::fromAngleAxis(f32 angle, const vector3df& axis)
+00564 {
+00565     const f32 fHalfAngle = 0.5f*angle;
+00566     const f32 fSin = sinf(fHalfAngle);
+00567     W = cosf(fHalfAngle);
+00568     X = fSin*axis.X;
+00569     Y = fSin*axis.Y;
+00570     Z = fSin*axis.Z;
+00571     return *this;
+00572 }
+00573 
+00574 
+00575 inline void quaternion::toAngleAxis(f32 &angle, core::vector3df &axis) const
+00576 {
+00577     const f32 scale = sqrtf(X*X + Y*Y + Z*Z);
+00578 
+00579     if (core::iszero(scale) || W > 1.0f || W < -1.0f)
+00580     {
+00581         angle = 0.0f;
+00582         axis.X = 0.0f;
+00583         axis.Y = 1.0f;
+00584         axis.Z = 0.0f;
+00585     }
+00586     else
+00587     {
+00588         const f32 invscale = reciprocal(scale);
+00589         angle = 2.0f * acosf(W);
+00590         axis.X = X * invscale;
+00591         axis.Y = Y * invscale;
+00592         axis.Z = Z * invscale;
+00593     }
+00594 }
+00595 
+00596 inline void quaternion::toEuler(vector3df& euler) const
+00597 {
+00598     const f64 sqw = W*W;
+00599     const f64 sqx = X*X;
+00600     const f64 sqy = Y*Y;
+00601     const f64 sqz = Z*Z;
+00602     const f64 test = 2.0 * (Y*W - X*Z);
+00603 
+00604     if (core::equals(test, 1.0, 0.000001))
+00605     {
+00606         // heading = rotation about z-axis
+00607         euler.Z = (f32) (-2.0*atan2(X, W));
+00608         // bank = rotation about x-axis
+00609         euler.X = 0;
+00610         // attitude = rotation about y-axis
+00611         euler.Y = (f32) (core::PI64/2.0);
+00612     }
+00613     else if (core::equals(test, -1.0, 0.000001))
+00614     {
+00615         // heading = rotation about z-axis
+00616         euler.Z = (f32) (2.0*atan2(X, W));
+00617         // bank = rotation about x-axis
+00618         euler.X = 0;
+00619         // attitude = rotation about y-axis
+00620         euler.Y = (f32) (core::PI64/-2.0);
+00621     }
+00622     else
+00623     {
+00624         // heading = rotation about z-axis
+00625         euler.Z = (f32) atan2(2.0 * (X*Y +Z*W),(sqx - sqy - sqz + sqw));
+00626         // bank = rotation about x-axis
+00627         euler.X = (f32) atan2(2.0 * (Y*Z +X*W),(-sqx - sqy + sqz + sqw));
+00628         // attitude = rotation about y-axis
+00629         euler.Y = (f32) asin( clamp(test, -1.0, 1.0) );
+00630     }
+00631 }
+00632 
+00633 
+00634 inline vector3df quaternion::operator* (const vector3df& v) const
+00635 {
+00636     // nVidia SDK implementation
+00637 
+00638     vector3df uv, uuv;
+00639     vector3df qvec(X, Y, Z);
+00640     uv = qvec.crossProduct(v);
+00641     uuv = qvec.crossProduct(uv);
+00642     uv *= (2.0f * W);
+00643     uuv *= 2.0f;
+00644 
+00645     return v + uv + uuv;
+00646 }
+00647 
+00648 // set quaternion to identity
+00649 inline core::quaternion& quaternion::makeIdentity()
+00650 {
+00651     W = 1.f;
+00652     X = 0.f;
+00653     Y = 0.f;
+00654     Z = 0.f;
+00655     return *this;
+00656 }
+00657 
+00658 inline core::quaternion& quaternion::rotationFromTo(const vector3df& from, const vector3df& to)
+00659 {
+00660     // Based on Stan Melax's article in Game Programming Gems
+00661     // Copy, since cannot modify local
+00662     vector3df v0 = from;
+00663     vector3df v1 = to;
+00664     v0.normalize();
+00665     v1.normalize();
+00666 
+00667     const f32 d = v0.dotProduct(v1);
+00668     if (d >= 1.0f) // If dot == 1, vectors are the same
+00669     {
+00670         return makeIdentity();
+00671     }
+00672     else if (d <= -1.0f) // exactly opposite
+00673     {
+00674         core::vector3df axis(1.0f, 0.f, 0.f);
+00675         axis = axis.crossProduct(v0);
+00676         if (axis.getLength()==0)
+00677         {
+00678             axis.set(0.f,1.f,0.f);
+00679             axis = axis.crossProduct(v0);
+00680         }
+00681         // same as fromAngleAxis(core::PI, axis).normalize();
+00682         return set(axis.X, axis.Y, axis.Z, 0).normalize();
+00683     }
+00684 
+00685     const f32 s = sqrtf( (1+d)*2 ); // optimize inv_sqrt
+00686     const f32 invs = 1.f / s;
+00687     const vector3df c = v0.crossProduct(v1)*invs;
+00688     return set(c.X, c.Y, c.Z, s * 0.5f).normalize();
+00689 }
+00690 
+00691 
+00692 } // end namespace core
+00693 } // end namespace irr
+00694 
+00695 #endif
+00696 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/rect_8h.html b/src/others/irrlicht-1.8.1/doc/html/rect_8h.html new file mode 100644 index 0000000..78906e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/rect_8h.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: rect.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
rect.h File Reference
+
+
+
#include "irrTypes.h"
+#include "dimension2d.h"
+#include "position2d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/rect_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/rect_8h_source.html new file mode 100644 index 0000000..5bccef3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/rect_8h_source.html @@ -0,0 +1,356 @@ + + + + +Irrlicht 3D Engine: rect.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
rect.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_RECT_H_INCLUDED__
+00006 #define __IRR_RECT_H_INCLUDED__
+00007 
+00008 #include "irrTypes.h"
+00009 #include "dimension2d.h"
+00010 #include "position2d.h"
+00011 
+00012 namespace irr
+00013 {
+00014 namespace core
+00015 {
+00016 
+00018 
+00025     template <class T>
+00026     class rect
+00027     {
+00028     public:
+00029 
+00031         rect() : UpperLeftCorner(0,0), LowerRightCorner(0,0) {}
+00032 
+00034         rect(T x, T y, T x2, T y2)
+00035             : UpperLeftCorner(x,y), LowerRightCorner(x2,y2) {}
+00036 
+00038         rect(const position2d<T>& upperLeft, const position2d<T>& lowerRight)
+00039             : UpperLeftCorner(upperLeft), LowerRightCorner(lowerRight) {}
+00040 
+00042         template <class U>
+00043         rect(const position2d<T>& pos, const dimension2d<U>& size)
+00044             : UpperLeftCorner(pos), LowerRightCorner(pos.X + size.Width, pos.Y + size.Height) {}
+00045 
+00047         rect<T> operator+(const position2d<T>& pos) const
+00048         {
+00049             rect<T> ret(*this);
+00050             return ret+=pos;
+00051         }
+00052 
+00054         rect<T>& operator+=(const position2d<T>& pos)
+00055         {
+00056             UpperLeftCorner += pos;
+00057             LowerRightCorner += pos;
+00058             return *this;
+00059         }
+00060 
+00062         rect<T> operator-(const position2d<T>& pos) const
+00063         {
+00064             rect<T> ret(*this);
+00065             return ret-=pos;
+00066         }
+00067 
+00069         rect<T>& operator-=(const position2d<T>& pos)
+00070         {
+00071             UpperLeftCorner -= pos;
+00072             LowerRightCorner -= pos;
+00073             return *this;
+00074         }
+00075 
+00077         bool operator==(const rect<T>& other) const
+00078         {
+00079             return (UpperLeftCorner == other.UpperLeftCorner &&
+00080                 LowerRightCorner == other.LowerRightCorner);
+00081         }
+00082 
+00084         bool operator!=(const rect<T>& other) const
+00085         {
+00086             return (UpperLeftCorner != other.UpperLeftCorner ||
+00087                 LowerRightCorner != other.LowerRightCorner);
+00088         }
+00089 
+00091         bool operator<(const rect<T>& other) const
+00092         {
+00093             return getArea() < other.getArea();
+00094         }
+00095 
+00097         T getArea() const
+00098         {
+00099             return getWidth() * getHeight();
+00100         }
+00101 
+00103 
+00105         bool isPointInside(const position2d<T>& pos) const
+00106         {
+00107             return (UpperLeftCorner.X <= pos.X &&
+00108                 UpperLeftCorner.Y <= pos.Y &&
+00109                 LowerRightCorner.X >= pos.X &&
+00110                 LowerRightCorner.Y >= pos.Y);
+00111         }
+00112 
+00114 
+00116         bool isRectCollided(const rect<T>& other) const
+00117         {
+00118             return (LowerRightCorner.Y > other.UpperLeftCorner.Y &&
+00119                 UpperLeftCorner.Y < other.LowerRightCorner.Y &&
+00120                 LowerRightCorner.X > other.UpperLeftCorner.X &&
+00121                 UpperLeftCorner.X < other.LowerRightCorner.X);
+00122         }
+00123 
+00125 
+00126         void clipAgainst(const rect<T>& other)
+00127         {
+00128             if (other.LowerRightCorner.X < LowerRightCorner.X)
+00129                 LowerRightCorner.X = other.LowerRightCorner.X;
+00130             if (other.LowerRightCorner.Y < LowerRightCorner.Y)
+00131                 LowerRightCorner.Y = other.LowerRightCorner.Y;
+00132 
+00133             if (other.UpperLeftCorner.X > UpperLeftCorner.X)
+00134                 UpperLeftCorner.X = other.UpperLeftCorner.X;
+00135             if (other.UpperLeftCorner.Y > UpperLeftCorner.Y)
+00136                 UpperLeftCorner.Y = other.UpperLeftCorner.Y;
+00137 
+00138             // correct possible invalid rect resulting from clipping
+00139             if (UpperLeftCorner.Y > LowerRightCorner.Y)
+00140                 UpperLeftCorner.Y = LowerRightCorner.Y;
+00141             if (UpperLeftCorner.X > LowerRightCorner.X)
+00142                 UpperLeftCorner.X = LowerRightCorner.X;
+00143         }
+00144 
+00146 
+00147         bool constrainTo(const rect<T>& other)
+00148         {
+00149             if (other.getWidth() < getWidth() || other.getHeight() < getHeight())
+00150                 return false;
+00151 
+00152             T diff = other.LowerRightCorner.X - LowerRightCorner.X;
+00153             if (diff < 0)
+00154             {
+00155                 LowerRightCorner.X += diff;
+00156                 UpperLeftCorner.X  += diff;
+00157             }
+00158 
+00159             diff = other.LowerRightCorner.Y - LowerRightCorner.Y;
+00160             if (diff < 0)
+00161             {
+00162                 LowerRightCorner.Y += diff;
+00163                 UpperLeftCorner.Y  += diff;
+00164             }
+00165 
+00166             diff = UpperLeftCorner.X - other.UpperLeftCorner.X;
+00167             if (diff < 0)
+00168             {
+00169                 UpperLeftCorner.X  -= diff;
+00170                 LowerRightCorner.X -= diff;
+00171             }
+00172 
+00173             diff = UpperLeftCorner.Y - other.UpperLeftCorner.Y;
+00174             if (diff < 0)
+00175             {
+00176                 UpperLeftCorner.Y  -= diff;
+00177                 LowerRightCorner.Y -= diff;
+00178             }
+00179 
+00180             return true;
+00181         }
+00182 
+00184         T getWidth() const
+00185         {
+00186             return LowerRightCorner.X - UpperLeftCorner.X;
+00187         }
+00188 
+00190         T getHeight() const
+00191         {
+00192             return LowerRightCorner.Y - UpperLeftCorner.Y;
+00193         }
+00194 
+00196         void repair()
+00197         {
+00198             if (LowerRightCorner.X < UpperLeftCorner.X)
+00199             {
+00200                 T t = LowerRightCorner.X;
+00201                 LowerRightCorner.X = UpperLeftCorner.X;
+00202                 UpperLeftCorner.X = t;
+00203             }
+00204 
+00205             if (LowerRightCorner.Y < UpperLeftCorner.Y)
+00206             {
+00207                 T t = LowerRightCorner.Y;
+00208                 LowerRightCorner.Y = UpperLeftCorner.Y;
+00209                 UpperLeftCorner.Y = t;
+00210             }
+00211         }
+00212 
+00214 
+00216         bool isValid() const
+00217         {
+00218             return ((LowerRightCorner.X >= UpperLeftCorner.X) &&
+00219                 (LowerRightCorner.Y >= UpperLeftCorner.Y));
+00220         }
+00221 
+00223         position2d<T> getCenter() const
+00224         {
+00225             return position2d<T>(
+00226                     (UpperLeftCorner.X + LowerRightCorner.X) / 2,
+00227                     (UpperLeftCorner.Y + LowerRightCorner.Y) / 2);
+00228         }
+00229 
+00231         dimension2d<T> getSize() const
+00232         {
+00233             return dimension2d<T>(getWidth(), getHeight());
+00234         }
+00235 
+00236 
+00238 
+00241         void addInternalPoint(const position2d<T>& p)
+00242         {
+00243             addInternalPoint(p.X, p.Y);
+00244         }
+00245 
+00247 
+00251         void addInternalPoint(T x, T y)
+00252         {
+00253             if (x>LowerRightCorner.X)
+00254                 LowerRightCorner.X = x;
+00255             if (y>LowerRightCorner.Y)
+00256                 LowerRightCorner.Y = y;
+00257 
+00258             if (x<UpperLeftCorner.X)
+00259                 UpperLeftCorner.X = x;
+00260             if (y<UpperLeftCorner.Y)
+00261                 UpperLeftCorner.Y = y;
+00262         }
+00263 
+00265         position2d<T> UpperLeftCorner;
+00267         position2d<T> LowerRightCorner;
+00268     };
+00269 
+00271     typedef rect<f32> rectf;
+00273     typedef rect<s32> recti;
+00274 
+00275 } // end namespace core
+00276 } // end namespace irr
+00277 
+00278 #endif
+00279 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/resize.js b/src/others/irrlicht-1.8.1/doc/html/resize.js new file mode 100644 index 0000000..04fa95c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/resize.js @@ -0,0 +1,81 @@ +var cookie_namespace = 'doxygen'; +var sidenav,navtree,content,header; + +function readCookie(cookie) +{ + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) + { + var index = document.cookie.indexOf(myCookie); + if (index != -1) + { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) + { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; +} + +function writeCookie(cookie, val, expiration) +{ + if (val==undefined) return; + if (expiration == null) + { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; +} + +function resizeWidth() +{ + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).width(); + content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar + writeCookie('width',sidenavWidth, null); +} + +function restoreWidth(navWidth) +{ + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+6+"px"}); + sidenav.css({width:navWidth + "px"}); +} + +function resizeHeight() +{ + var headerHeight = header.height(); + var footerHeight = footer.height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); +} + +function initResizable() +{ + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(window).resize(function() { resizeHeight(); }); + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); +} + + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_5f.html b/src/others/irrlicht-1.8.1/doc/html/search/all_5f.html new file mode 100644 index 0000000..bf6f0ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_5f.html @@ -0,0 +1,500 @@ + + + + + + + +
+
Loading...
+
+
+ __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_HAS_S64 + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_3DS_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_B3D_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BMP_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BMP_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BSP_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BURNINGSVIDEO_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BZIP2_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_COLLADA_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_COLLADA_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_CONSOLE_DEVICE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_CSM_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_DMF_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_GUI_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_IRR_MESH_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_IRR_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_JPG_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_JPG_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LIBJPEG_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LIBPNG_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LMP_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LMTS_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LWO_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LZMA_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MD2_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MD3_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MS3D_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MY3D_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OBJ_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OBJ_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OCT_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OGRE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OPENGL_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PCX_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PCX_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PLY_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PLY_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PNG_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PNG_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PPM_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PPM_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PSD_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PSD_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_RGB_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_SMF_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_SOFTWARE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_STL_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_STL_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_TGA_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_TGA_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_WAL_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_X11_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_X11_DEVICE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_X_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_ZLIB_ + IrrCompileConfig.h +
+
+
+
+ _IRR_D3D_NO_SHADER_DEBUGGING + IrrCompileConfig.h +
+
+
+
+ _IRR_DEBUG_BREAK_IF + irrTypes.h +
+
+
+
+ _IRR_DEPRECATED_ + irrTypes.h +
+
+ +
+
+ _IRR_LINUX_PLATFORM_ + IrrCompileConfig.h +
+
+
+
+ _IRR_LINUX_X11_VIDMODE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_MATERIAL_MAX_TEXTURES_ + IrrCompileConfig.h +
+
+
+
+ _IRR_OPENGL_USE_EXTPOINTER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_POSIX_API_ + IrrCompileConfig.h +
+
+
+
+ _IRR_TEXT + irrTypes.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_BZLIB_ + IrrCompileConfig.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_JPEG_LIB_ + IrrCompileConfig.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_LIB_PNG_ + IrrCompileConfig.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_ZLIB_ + IrrCompileConfig.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_61.html b/src/others/irrlicht-1.8.1/doc/html/search/all_61.html new file mode 100644 index 0000000..0140cfe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_61.html @@ -0,0 +1,1364 @@ + + + + + + + +
+
Loading...
+
+
+ a + irr::video::SColorf +
+
+
+
+ A1R5G5B5toA8R8G8B8 + irr::video +
+
+
+
+ A1R5G5B5toR5G6B5 + irr::video +
+
+
+
+ A8R8G8B8toA1R5G5B5 + irr::video +
+
+
+
+ A8R8G8B8toR5G6B5 + irr::video +
+
+
+
+ aabbox3d + irr::core +
+
+ +
+ +
+
+
+ aabbox3d< f32 > + irr::core +
+
+
+
+ aabbox3df + irr::core +
+
+
+
+ aabbox3di + irr::core +
+
+
+
+ abs_ + irr::core +
+
+
+
+ AbsoluteClippingRect + irr::gui::IGUIElement +
+
+
+
+ AbsoluteRect + irr::gui::IGUIElement +
+
+
+
+ AbsoluteTransformation + irr::scene::ISceneNode +
+
+
+
+ AccessClass + irr::core::map +
+
+
+
+ Action + irr::SKeyMap +
+
+
+
+ activateJoysticks + irr::IrrlichtDevice +
+
+
+
+ addAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ addAnimatedMeshSceneNode + irr::scene::ISceneManager +
+
+
+
+ addAnimator + irr::scene::ISceneNode +
+
+
+
+ addArchiveLoader + irr::io::IFileSystem +
+
+
+
+ addArray + irr::io::IAttributes +
+
+
+
+ addArrowMesh + irr::scene::ISceneManager +
+
+
+
+ addBillboardSceneNode + irr::scene::ISceneManager +
+
+
+
+ addBillboardTextSceneNode + irr::scene::ISceneManager +
+
+
+
+ addBinary + irr::io::IAttributes +
+
+
+
+ addBool + irr::io::IAttributes +
+
+
+
+ addBox3d + irr::io::IAttributes +
+
+ +
+
+ addCameraSceneNode + irr::scene::ISceneManager +
+
+
+
+ addCameraSceneNodeFPS + irr::scene::ISceneManager +
+
+
+
+ addCameraSceneNodeMaya + irr::scene::ISceneManager +
+
+
+
+ addCheckBox + irr::gui::IGUIEnvironment +
+
+ +
+
+ addChildBack + irr::gui::IGUITreeViewNode +
+
+
+
+ addChildFront + irr::gui::IGUITreeViewNode +
+
+
+
+ addChildToEnd + irr::gui::IGUIElement +
+
+
+
+ addColor + irr::io::IAttributes +
+
+
+
+ addColorf + irr::io::IAttributes +
+
+
+
+ addColorSelectDialog + irr::gui::IGUIEnvironment +
+
+
+
+ addColumn + irr::gui::IGUITable +
+
+
+
+ addComboBox + irr::gui::IGUIEnvironment +
+
+
+
+ addContextMenu + irr::gui::IGUIEnvironment +
+
+
+
+ addCubeSceneNode + irr::scene::ISceneManager +
+
+
+
+ addDimension2d + irr::io::IAttributes +
+
+
+
+ addDummyTransformationSceneNode + irr::scene::ISceneManager +
+
+
+
+ addDynamicLight + irr::video::IVideoDriver +
+
+
+
+ addEditBox + irr::gui::IGUIEnvironment +
+
+
+
+ addEmptySceneNode + irr::scene::ISceneManager +
+
+
+
+ addEmptySpriteBank + irr::gui::IGUIEnvironment +
+
+ +
+
+ addExternalImageLoader + irr::video::IVideoDriver +
+
+
+
+ addExternalImageWriter + irr::video::IVideoDriver +
+
+
+
+ addExternalMeshLoader + irr::scene::ISceneManager +
+
+
+
+ addExternalSceneLoader + irr::scene::ISceneManager +
+
+ +
+
+ addFileOpenDialog + irr::gui::IGUIEnvironment +
+
+
+
+ addFloat + irr::io::IAttributes +
+
+
+
+ addFolderFileArchive + irr::io::IFileSystem +
+
+
+
+ addFont + irr::gui::IGUIEnvironment +
+
+ +
+
+ addHighLevelShaderMaterial +
+ irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const c8 *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const c8 *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0 + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const c8 *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, const c8 *geometryShaderProgram=0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) +
+
+
+
+
+ addHighLevelShaderMaterialFromFiles +
+ irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const io::path &pixelShaderProgramFileName, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const io::path &geometryShaderProgramFileName, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0 + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const io::path &pixelShaderProgramFileName="", const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", const io::path &geometryShaderProgramFileName="", scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, io::IReadFile *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, io::IReadFile *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0 + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, io::IReadFile *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) +
+
+
+
+
+ addHillPlaneMesh + irr::scene::ISceneManager +
+
+
+
+ addIcon + irr::gui::ICursorControl +
+
+ +
+
+ addInOutFader + irr::gui::IGUIEnvironment +
+
+
+
+ addInt + irr::io::IAttributes +
+
+
+
+ addInternalBox + irr::core::aabbox3d +
+
+ + +
+
+ addJoint + irr::scene::ISkinnedMesh +
+
+
+
+ addLightSceneNode + irr::scene::ISceneManager +
+
+
+
+ addLine2d + irr::io::IAttributes +
+
+
+
+ addLine3d + irr::io::IAttributes +
+
+
+
+ addListBox + irr::gui::IGUIEnvironment +
+
+
+
+ addMaterialRenderer + irr::video::IVideoDriver +
+
+
+
+ addMatrix + irr::io::IAttributes +
+
+
+
+ addMenu + irr::gui::IGUIEnvironment +
+
+ + +
+
+ addMeshSceneNode + irr::scene::ISceneManager +
+
+
+
+ addMeshViewer + irr::gui::IGUIEnvironment +
+
+
+
+ addMessageBox + irr::gui::IGUIEnvironment +
+
+
+
+ addModalScreen + irr::gui::IGUIEnvironment +
+
+
+
+ addOcclusionQuery + irr::video::IVideoDriver +
+
+ + +
+
+ addPakFileArchive + irr::io::IFileSystem +
+
+
+
+ addParticleSystemSceneNode + irr::scene::ISceneManager +
+
+
+
+ addPlane3d + irr::io::IAttributes +
+
+
+
+ addPosition2d + irr::io::IAttributes +
+
+
+
+ addPositionKey + irr::scene::ISkinnedMesh +
+
+
+
+ addQuake3SceneNode + irr::scene::ISceneManager +
+
+
+
+ addQuaternion + irr::io::IAttributes +
+
+
+
+ addRect + irr::io::IAttributes +
+
+
+
+ addRenderTargetTexture + irr::video::IVideoDriver +
+
+
+
+ addRotationKey + irr::scene::ISkinnedMesh +
+
+
+
+ addRow + irr::gui::IGUITable +
+
+
+
+ addScaleKey + irr::scene::ISkinnedMesh +
+
+ +
+
+ addScrollBar + irr::gui::IGUIEnvironment +
+
+
+
+ addSeparator + irr::gui::IGUIContextMenu +
+
+
+
+ addShaderMaterial + irr::video::IGPUProgrammingServices +
+
+ + +
+
+ addSkyBoxSceneNode + irr::scene::ISceneManager +
+
+
+
+ addSkyDomeSceneNode + irr::scene::ISceneManager +
+
+
+
+ addSphereMesh + irr::scene::ISceneManager +
+
+
+
+ addSphereSceneNode + irr::scene::ISceneManager +
+
+
+
+ addSpinBox + irr::gui::IGUIEnvironment +
+
+
+
+ addStaticText + irr::gui::IGUIEnvironment +
+
+ + +
+
+ addTabControl + irr::gui::IGUIEnvironment +
+
+
+
+ addTable + irr::gui::IGUIEnvironment +
+
+
+
+ addTerrainMesh + irr::scene::ISceneManager +
+
+ +
+
+ addTextSceneNode + irr::scene::ISceneManager +
+
+ +
+
+ addTextureAsSprite + irr::gui::IGUISpriteBank +
+
+
+
+ addToDeletionQueue + irr::scene::ISceneManager +
+
+
+
+ addToolBar + irr::gui::IGUIEnvironment +
+
+
+
+ addTreeView + irr::gui::IGUIEnvironment +
+
+
+
+ addTriangle3d + irr::io::IAttributes +
+
+
+
+ addTriangleSelector + irr::scene::IMetaTriangleSelector +
+
+
+
+ addUserPointer + irr::io::IAttributes +
+
+
+
+ addVector2d + irr::io::IAttributes +
+
+
+
+ addVector3d + irr::io::IAttributes +
+
+
+
+ addVolumeLightMesh + irr::scene::ISceneManager +
+
+
+
+ addVolumeLightSceneNode + irr::scene::ISceneManager +
+
+
+
+ addWaterSurfaceSceneNode + irr::scene::ISceneManager +
+
+
+
+ addWeight + irr::scene::ISkinnedMesh +
+
+
+
+ addWindow + irr::gui::IGUIEnvironment +
+
+
+
+ addZipFileArchive + irr::io::IFileSystem +
+
+
+
+ affect + irr::scene::IParticleAffector +
+
+
+
+ AIR + irrMath.h +
+
+
+
+ AlignBottom + irr::gui::IGUIElement +
+
+
+
+ AlignLeft + irr::gui::IGUIElement +
+
+
+
+ AlignRight + irr::gui::IGUIElement +
+
+
+
+ AlignTop + irr::gui::IGUIElement +
+
+
+
+ ALLOC_STRATEGY_DOUBLE + irr::core +
+
+
+
+ ALLOC_STRATEGY_SAFE + irr::core +
+
+
+
+ ALLOC_STRATEGY_SQRT + irr::core +
+
+ + +
+
+ ALLOW_ZWRITE_ON_TRANSPARENT + irr::scene +
+
+ +
+
+ alpharef + irr::scene::quake3::Q3LevelLoadParameter +
+
+ +
+
+ amp + irr::scene::quake3::SModifierFunction +
+
+
+
+ Animatedposition + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Animatedrotation + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Animatedscale + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ animateJoints + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ animateMesh + irr::scene::ISkinnedMesh +
+
+
+
+ animateNode + irr::scene::ISceneNodeAnimator +
+
+
+
+ Animators + irr::scene::ISceneNode +
+
+
+
+ AnisotropicFilter + irr::video::SMaterialLayer +
+
+
+
+ AntiAlias + irr::SIrrlichtCreationParameters +
+
+
+
+ AntiAliasing + irr::video::SMaterial +
+
+ + +
+
+ apply_ + irr::scene::IMeshManipulator +
+
+ +
+
+ array + irr::core +
+
+
+
+ array< IMesh * > + irr::core +
+
+
+
+ array< IMeshBuffer * > + irr::core +
+
+
+
+ array< s32 > + irr::core +
+
+
+
+ array< SGUISpriteFrame > + irr::core +
+
+
+
+ array< SJoint * > + irr::core +
+
+
+
+ array< SMD3MeshBuffer * > + irr::core +
+
+
+
+ array< SMD3QuaternionTag > + irr::core +
+
+
+
+ array< SMD3TexCoord > + irr::core +
+
+
+
+ array< SMD3Vertex > + irr::core +
+
+
+
+ array< SPositionKey > + irr::core +
+
+
+
+ array< SRotationKey > + irr::core +
+
+
+
+ array< SScaleKey > + irr::core +
+
+
+
+ array< SVarGroup > + irr::core +
+
+
+
+ array< SVariable > + irr::core +
+
+
+
+ array< SWeight > + irr::core +
+
+
+
+ array< T > + irr::core +
+
+
+
+ array< u16 > + irr::core +
+
+
+
+ array< u32 > + irr::core +
+
+
+
+ array< video::S3DVertex > + irr::core +
+
+ + + +
+
+ AttachedMeshes + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Attenuation + irr::video::SLight +
+
+
+
+ AutomaticCullingNames + irr::scene +
+
+
+
+ AutomaticCullingState + irr::scene::ISceneNode +
+
+
+
+ AUTOSPRITE + irr::scene::quake3 +
+
+
+
+ AUTOSPRITE2 + irr::scene::quake3 +
+
+
+
+ Axes + irr::SJoystickInfo +
+
+
+
+ Axis + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_R + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_U + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_V + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_X + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_Y + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_Z + irr::SEvent::SJoystickEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_62.html b/src/others/irrlicht-1.8.1/doc/html/search/all_62.html new file mode 100644 index 0000000..f851c03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_62.html @@ -0,0 +1,310 @@ + + + + + + + +
+
Loading...
+
+
+ b + irr::video::SColorf +
+
+
+ +
+
+
+ B3D_TEXTURE_PATH + irr::scene +
+
+
+
+ BackfaceCulling + irr::video::SMaterial +
+
+
+
+ base + irr::scene::quake3::SModifierFunction +
+
+ +
+
+ beginScene + irr::video::IVideoDriver +
+
+
+
+ BilinearFilter + irr::video::SMaterialLayer +
+
+ +
+
+ binary_search_multi + irr::core::array +
+
+
+
+ bindTargetAndRotation + irr::scene::ICameraSceneNode +
+
+
+
+ Binormal + irr::video::S3DVertexTangents +
+
+
+
+ Bits + irr::SIrrlichtCreationParameters +
+
+
+
+ BlendFuncDst + irr::video::IRenderTarget +
+
+
+
+ BlendFuncSrc + irr::video::IRenderTarget +
+
+
+
+ BlendOp + irr::video::IRenderTarget +
+
+
+
+ BlendOperation + irr::video::SMaterial +
+
+
+
+ BoneAnimationModeNames + irr::scene +
+
+ + +
+
+ Box + irr::scene::SAnimatedMesh +
+
+
+
+ bringToFront + irr::gui::IGUIElement +
+
+
+
+ Buffer + irr::scene::SMD3Mesh +
+
+
+
+ buffer_id + irr::scene::ISkinnedMesh::SWeight +
+
+
+
+ buildAxisAlignedBillboard + irr::core::CMatrix4 +
+
+
+
+ buildCameraLookAtMatrixLH + irr::core::CMatrix4 +
+
+
+
+ buildCameraLookAtMatrixRH + irr::core::CMatrix4 +
+
+
+
+ buildNDCToDCMatrix + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixOrthoLH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixOrthoRH + irr::core::CMatrix4 +
+
+
+ +
+
+
+ buildProjectionMatrixPerspectiveFovLH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixPerspectiveFovRH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixPerspectiveLH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixPerspectiveRH + irr::core::CMatrix4 +
+
+
+
+ buildRotateFromTo + irr::core::CMatrix4 +
+
+
+
+ buildShadowMatrix + irr::core::CMatrix4 +
+
+
+
+ buildTextureTransform + irr::core::CMatrix4 +
+
+
+
+ BULGE + irr::scene::quake3 +
+
+
+
+ bulgeheight + irr::scene::quake3::SModifierFunction +
+
+
+
+ bulgespeed + irr::scene::quake3::SModifierFunction +
+
+
+
+ bulgewidth + irr::scene::quake3::SModifierFunction +
+
+
+
+ BURNINGVIDEO_RENDERER_BEAUTIFUL + IrrCompileConfig.h +
+
+
+
+ Buttons + irr::SJoystickInfo +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_63.html b/src/others/irrlicht-1.8.1/doc/html/search/all_63.html new file mode 100644 index 0000000..df28d87 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_63.html @@ -0,0 +1,1097 @@ + + + + + + + +
+
Loading...
+
+
+ c + irr::io::xmlChar +
+
+
+
+ c8 + irr +
+
+
+
+ c_str + irr::core::string +
+
+
+
+ Caller + irr::SEvent::SGUIEvent +
+
+
+
+ cameraPosition + irr::scene::SViewFrustum +
+
+
+
+ CastShadows + irr::video::SLight +
+
+
+
+ CDynamicMeshBuffer + irr::scene::CDynamicMeshBuffer +
+
+
+
+ CDynamicMeshBuffer + irr::scene +
+
+ +
+
+ ceil32 + irr::core +
+
+ + + +
+
+ changeIcon + irr::gui::ICursorControl +
+
+
+
+ changeWorkingDirectoryTo + irr::io::IFileSystem +
+
+
+
+ Char + irr::SEvent::SKeyInput +
+
+
+
+ char16 + irr::io +
+
+
+
+ char32 + irr::io +
+
+
+
+ char_type + irr::core::string +
+
+
+
+ checkDriverReset + irr::video::IVideoDriver +
+
+ +
+
+ CIndexBuffer + irr::scene +
+
+ + +
+
+ clamp + irr::core +
+
+
+
+ classifyPlaneRelation + irr::core::aabbox3d +
+
+
+
+ classifyPointRelation + irr::core::plane3d +
+
+
+
+ cleanUnResolvedMeshes + irr::scene::quake3::Q3LevelLoadParameter +
+
+ +
+
+ clearChildren + irr::gui::IGUITreeViewNode +
+
+
+
+ clearChilds + irr::gui::IGUITreeViewNode +
+
+
+
+ clearFPUException + irr::core +
+
+ +
+
+ clearParticles + irr::scene::IParticleSystemSceneNode +
+
+
+
+ clearRows + irr::gui::IGUITable +
+
+
+
+ clearSystemMessages + irr::IrrlichtDevice +
+
+
+
+ clearUnusedMeshes + irr::scene::IMeshCache +
+
+
+
+ clearZBuffer + irr::video::IVideoDriver +
+
+
+
+ clipAgainst + irr::core::rect +
+
+
+
+ clipLine + irr::scene::SViewFrustum +
+
+ + +
+
+ closeDevice + irr::IrrlichtDevice +
+
+
+
+ closestPointOnTriangle + irr::core::triangle3d +
+
+ +
+
+ CMatrix4 + irr::core +
+
+
+
+ CMeshBuffer + irr::scene +
+
+
+
+ CMeshBuffer + irr::scene::CMeshBuffer +
+
+
+ +
+
+ +
+
+
+ collisionOccurred + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + +
+
+ ColorMaterial + irr::video::SMaterial +
+
+
+
+ const_pointer + irr::core::array +
+
+
+
+ CONSTANT + irr::scene::quake3 +
+
+
+
+ ConstIterator + irr::core::list +
+
+
+
+ ConstIterator + irr::core::map +
+
+ +
+
+ constrainTo + irr::core::rect +
+
+ +
+
+ content + irr::scene::quake3::SVariable +
+
+ +
+
+ convertColor + irr::video::IVideoDriver +
+
+
+
+ convertMeshToTangents + irr::scene::ISkinnedMesh +
+
+
+
+ convertTo2TCoords + irr::scene::SSkinMeshBuffer +
+
+
+
+ convertToTangents + irr::scene::SSkinMeshBuffer +
+
+ +
+
+ copyToClipboard + irr::IOSOperator +
+
+ +
+
+ copyToScalingBoxFilter + irr::video::IImage +
+
+
+
+ copyToWithAlpha + irr::video::IImage +
+
+
+ +
+
+
+ COSINUS + irr::scene::quake3 +
+
+
+
+ count + irr::scene::quake3::SModifierFunction +
+
+ +
+
+ createAndWriteFile + irr::io::IFileSystem +
+
+
+
+ createAnimatedMesh + irr::scene::IMeshManipulator +
+
+
+
+ createAnimatedMeshSceneNodeEmitter + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ createArrowMesh + irr::scene::IGeometryCreator +
+
+
+
+ createAttractionAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createAttributesFromMaterial + irr::video::IVideoDriver +
+
+
+
+ createBoxEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createClone + irr::scene::ISceneNodeAnimator +
+
+
+
+ createCollisionResponseAnimator + irr::scene::ISceneManager +
+
+
+
+ createConeMesh + irr::scene::IGeometryCreator +
+
+
+
+ createCubeMesh + irr::scene::IGeometryCreator +
+
+
+
+ createCylinderEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createCylinderMesh + irr::scene::IGeometryCreator +
+
+
+
+ createDefaultRandomizer + irr::IrrlichtDevice +
+
+
+
+ createDeleteAnimator + irr::scene::ISceneManager +
+
+
+
+ createDevice + irr +
+
+
+
+ createDeviceEx + irr +
+
+
+
+ createEmptyAttributes + irr::io::IFileSystem +
+
+
+
+ createEmptyFileList + irr::io::IFileSystem +
+
+
+
+ createFadeOutParticleAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createFileList + irr::io::IFileSystem +
+
+
+
+ createFlyCircleAnimator + irr::scene::ISceneManager +
+
+
+
+ createFlyStraightAnimator + irr::scene::ISceneManager +
+
+
+
+ createFollowSplineAnimator + irr::scene::ISceneManager +
+
+
+
+ createForsythOptimizedMesh + irr::scene::IMeshManipulator +
+
+
+
+ createGravityAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createHillPlaneMesh + irr::scene::IGeometryCreator +
+
+ +
+
+ createImageFromData + irr::video::IVideoDriver +
+
+ +
+
+ createImageList + irr::gui::IGUIEnvironment +
+
+ + + + + +
+
+ createMemoryWriteFile + irr::io::IFileSystem +
+
+
+
+ createMesh + irr::scene::IMeshLoader +
+
+
+
+ createMeshCopy + irr::scene::IMeshManipulator +
+
+
+
+ createMeshEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createMeshUniquePrimitives + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWelded + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWith1TCoords + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWith2TCoords + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWithTangents + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWriter + irr::scene::ISceneManager +
+
+
+
+ createMetaTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createNewSceneManager + irr::scene::ISceneManager +
+
+
+
+ createOctreeTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createOctTreeTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createPlaneMesh + irr::scene::IGeometryCreator +
+
+
+
+ createPointEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createReadFile + irr::io +
+
+
+
+ createRingEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createRotationAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createRotationAnimator + irr::scene::ISceneManager +
+
+
+
+ createScaleParticleAffector + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ createScreenShot + irr::video::IVideoDriver +
+
+
+
+ createSkin + irr::gui::IGUIEnvironment +
+
+
+
+ createSkinnedMesh + irr::scene::ISceneManager +
+
+
+
+ createSphereEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createSphereMesh + irr::scene::IGeometryCreator +
+
+
+
+ createTerrainMesh + irr::scene::IGeometryCreator +
+
+
+
+ createTerrainTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createTextureAnimator + irr::scene::ISceneManager +
+
+ +
+
+ createTriangleSelectorFromBoundingBox + irr::scene::ISceneManager +
+
+
+
+ createUserData + irr::scene::ISceneUserDataSerializer +
+
+
+
+ createVolumeLightMesh + irr::scene::IGeometryCreator +
+
+
+
+ createWriteFile + irr::io +
+
+ + + +
+
+ crossProduct + irr::core::vector3d +
+
+ +
+
+ CSM_TEXTURE_PATH + irr::scene +
+
+
+
+ ctoul16 + irr::core +
+
+
+
+ cutFilenameExtension + irr::core +
+
+
+
+ CVertexBuffer + irr::scene +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_64.html b/src/others/irrlicht-1.8.1/doc/html/search/all_64.html new file mode 100644 index 0000000..6e67bc5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_64.html @@ -0,0 +1,570 @@ + + + + + + + +
+
Loading...
+
+
+ D + irr::core::plane3d +
+
+ + +
+
+ D3DDev8 + irr::video::SExposedVideoData +
+
+
+
+ D3DDev9 + irr::video::SExposedVideoData +
+
+
+
+ Day + irr::ITimer::RealTimeDate +
+
+ +
+
+ DEBUG_NORMAL_COLOR + irr::scene +
+
+
+
+ DEBUG_NORMAL_LENGTH + irr::scene +
+
+
+
+ DebugDataVisible + irr::scene::ISceneNode +
+
+
+
+ defaultFilter + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ defaultLightMapMaterial + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ defaultModulate + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ DEFORMVERTEXES + irr::scene::quake3 +
+
+ +
+
+ DEGTORAD64 + irr::core +
+
+
+
+ deleteAllDynamicLights + irr::video::IVideoDriver +
+
+
+
+ deleteChild + irr::gui::IGUITreeViewNode +
+
+
+
+ deletePathFromFilename + irr::core +
+
+
+
+ deletePathFromPath + irr::core +
+
+ + +
+
+ DesiredRect + irr::gui::IGUIElement +
+
+ +
+
+ DeviceType + irr::SIrrlichtCreationParameters +
+
+ +
+
+ dimension2d + irr::core +
+
+ +
+ +
+
+
+ dimension2d< u32 > + irr::core +
+
+
+
+ dimension2df + irr::core +
+
+
+
+ dimension2di + irr::core +
+
+
+
+ dimension2du + irr::core +
+
+
+
+ Direction + irr::video::SLight +
+
+
+
+ disableFeature + irr::video::IVideoDriver +
+
+
+
+ DisplayAdapter + irr::SIrrlichtCreationParameters +
+
+
+
+ div + irr::scene::quake3::SModifierFunction +
+
+
+
+ DMF_ALPHA_CHANNEL_REF + irr::scene +
+
+
+
+ DMF_FLIP_ALPHA_TEXTURES + irr::scene +
+
+
+
+ DMF_IGNORE_MATERIALS_DIRS + irr::scene +
+
+
+
+ DMF_TEXTURE_PATH + irr::scene +
+
+
+
+ DOLLAR_LIGHTMAP + irr::scene::quake3 +
+
+
+
+ doParticleSystem + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ Doublebuffer + irr::SIrrlichtCreationParameters +
+
+ + + +
+
+ draw2DLine + irr::video::IVideoDriver +
+
+
+
+ draw2DPolygon + irr::video::IVideoDriver +
+
+ +
+
+ draw2DRectangleOutline + irr::video::IVideoDriver +
+
+
+
+ draw2DSprite + irr::gui::IGUISpriteBank +
+
+
+
+ draw2DSpriteBatch + irr::gui::IGUISpriteBank +
+
+
+
+ draw2DVertexPrimitiveList + irr::video::IVideoDriver +
+
+
+
+ draw3DBox + irr::video::IVideoDriver +
+
+
+
+ draw3DButtonPanePressed + irr::gui::IGUISkin +
+
+
+
+ draw3DButtonPaneStandard + irr::gui::IGUISkin +
+
+
+
+ draw3DLine + irr::video::IVideoDriver +
+
+
+
+ draw3DMenuPane + irr::gui::IGUISkin +
+
+
+
+ draw3DSunkenPane + irr::gui::IGUISkin +
+
+
+
+ draw3DTabBody + irr::gui::IGUISkin +
+
+
+
+ draw3DTabButton + irr::gui::IGUISkin +
+
+
+
+ draw3DToolBar + irr::gui::IGUISkin +
+
+
+
+ draw3DTriangle + irr::video::IVideoDriver +
+
+
+
+ draw3DWindowBackground + irr::gui::IGUISkin +
+
+ +
+
+ drawIcon + irr::gui::IGUISkin +
+
+ + +
+
+ drawMeshBuffer + irr::video::IVideoDriver +
+
+
+
+ drawMeshBufferNormals + irr::video::IVideoDriver +
+
+
+
+ drawPixel + irr::video::IVideoDriver +
+
+
+
+ drawStencilShadow + irr::video::IVideoDriver +
+
+
+
+ drawStencilShadowVolume + irr::video::IVideoDriver +
+
+
+
+ drawVertexPrimitiveList + irr::video::IVideoDriver +
+
+ +
+
+ DriverMultithreaded + irr::SIrrlichtCreationParameters +
+
+
+
+ DriverType + irr::SIrrlichtCreationParameters +
+
+
+
+ drop + irr::IReferenceCounted +
+
+
+
+ dumpShader + irr::scene::quake3 +
+
+
+
+ dumpVarGroup + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_65.html b/src/others/irrlicht-1.8.1/doc/html/search/all_65.html new file mode 100644 index 0000000..39a805e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_65.html @@ -0,0 +1,5499 @@ + + + + + + + +
+
Loading...
+
+
+ E_ALPHA_SOURCE + irr::video +
+
+
+
+ E_ANIMATED_MESH_TYPE + irr::scene +
+
+
+
+ E_ANTI_ALIASING_MODE + irr::video +
+
+
+ +
+
+
+ E_ATTRIBUTE_TYPE + irr::io +
+
+
+
+ E_BLEND_FACTOR + irr::video +
+
+
+
+ E_BLEND_OPERATION + irr::video +
+
+
+
+ E_BONE_ANIMATION_MODE + irr::scene +
+
+
+
+ E_BONE_SKINNING_SPACE + irr::scene +
+
+
+
+ E_BUFFER_TYPE + irr::scene +
+
+
+
+ E_COLLADA_COLOR_SAMPLER + irr::scene +
+
+
+
+ E_COLLADA_GEOMETRY_WRITING + irr::scene +
+
+
+
+ E_COLLADA_IRR_COLOR + irr::scene +
+
+
+
+ E_COLLADA_TECHNIQUE_FX + irr::scene +
+
+
+
+ E_COLLADA_TRANSPARENT_FX + irr::scene +
+
+
+
+ E_COLOR_MATERIAL + irr::video +
+
+
+
+ E_COLOR_PLANE + irr::video +
+
+
+
+ E_COMPARISON_FUNC + irr::video +
+
+
+
+ E_CULLING_TYPE + irr::scene +
+
+
+
+ E_DEBUG_SCENE_TYPE + irr::scene +
+
+
+
+ E_DEVICE_TYPE + irr +
+
+
+
+ E_DRIVER_TYPE + irr::video +
+
+
+
+ E_FILE_ARCHIVE_TYPE + irr::io +
+
+
+
+ E_FOG_TYPE + irr::video +
+
+
+
+ E_GEOMETRY_SHADER_TYPE + irr::video +
+
+
+
+ E_GPU_SHADING_LANGUAGE + irr::video +
+
+
+
+ E_HARDWARE_MAPPING + irr::scene +
+
+
+
+ E_INDEX_TYPE + irr::video +
+
+
+
+ E_INTERPOLATION_MODE + irr::scene +
+
+
+
+ E_JOINT_UPDATE_ON_RENDER + irr::scene +
+
+
+
+ E_LIGHT_TYPE + irr::video +
+
+
+
+ E_LOST_RESOURCE + irr::video +
+
+
+
+ E_MATERIAL_FLAG + irr::video +
+
+
+
+ E_MATERIAL_TYPE + irr::video +
+
+
+
+ E_MESH_WRITER_FLAGS + irr::scene +
+
+
+
+ E_MODULATE_FUNC + irr::video +
+
+ +
+
+ E_PARTICLE_AFFECTOR_TYPE + irr::scene +
+
+
+
+ E_PARTICLE_EMITTER_TYPE + irr::scene +
+
+
+
+ E_PIXEL_SHADER_TYPE + irr::video +
+
+
+
+ E_POLYGON_OFFSET + irr::video +
+
+
+
+ E_PRIMITIVE_TYPE + irr::scene +
+
+
+
+ E_Q3_MESH_BILLBOARD + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_FOG + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_GEOMETRY + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_ITEMS + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_SIZE + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_UNRESOLVED + irr::scene::quake3 +
+
+
+
+ E_RENDER_TARGET + irr::video +
+
+
+
+ E_SCENE_NODE_RENDER_PASS + irr::scene +
+
+
+
+ E_TERRAIN_PATCH_SIZE + irr::scene +
+
+
+
+ E_TEXTURE_CLAMP + irr::video +
+
+
+
+ E_TEXTURE_CREATION_FLAG + irr::video +
+
+
+
+ E_TEXTURE_LOCK_MODE + irr::video +
+
+
+
+ E_TRANSFORMATION_STATE + irr::video +
+
+
+
+ E_VERTEX_SHADER_TYPE + irr::video +
+
+
+
+ E_VERTEX_TYPE + irr::video +
+
+
+
+ E_VIDEO_DRIVER_FEATURE + irr::video +
+
+
+
+ EAAM_ALPHA_TO_COVERAGE + irr::video +
+
+
+
+ EAAM_FULL_BASIC + irr::video +
+
+
+
+ EAAM_LINE_SMOOTH + irr::video +
+
+
+
+ EAAM_OFF + irr::video +
+
+
+
+ EAAM_POINT_SMOOTH + irr::video +
+
+
+
+ EAAM_QUALITY + irr::video +
+
+
+
+ EAAM_SIMPLE + irr::video +
+
+
+
+ EAC_BOX + irr::scene +
+
+
+
+ EAC_FRUSTUM_BOX + irr::scene +
+
+
+
+ EAC_FRUSTUM_SPHERE + irr::scene +
+
+
+
+ EAC_OCC_QUERY + irr::scene +
+
+
+
+ EAC_OFF + irr::scene +
+
+
+
+ eAllocStrategy + irr::core +
+
+
+
+ EAMT_3DS + irr::scene +
+
+
+
+ EAMT_BSP + irr::scene +
+
+
+
+ EAMT_CSM + irr::scene +
+
+
+
+ EAMT_LMTS + irr::scene +
+
+
+
+ EAMT_MD2 + irr::scene +
+
+
+
+ EAMT_MD3 + irr::scene +
+
+
+
+ EAMT_MDL_HALFLIFE + irr::scene +
+
+
+
+ EAMT_MY3D + irr::scene +
+
+
+
+ EAMT_OBJ + irr::scene +
+
+
+
+ EAMT_OCT + irr::scene +
+
+
+
+ EAMT_SKINNED + irr::scene +
+
+
+
+ EAMT_UNKNOWN + irr::scene +
+
+
+
+ EARWF_FOR_EDITOR + irr::io +
+
+
+
+ EARWF_FOR_FILE + irr::io +
+
+
+
+ EARWF_USE_RELATIVE_PATHS + irr::io +
+
+
+
+ EAS_NONE + irr::video +
+
+
+
+ EAS_TEXTURE + irr::video +
+
+
+
+ EAS_VERTEX_COLOR + irr::video +
+
+
+
+ EAT_BBOX + irr::io +
+
+
+
+ EAT_BINARY + irr::io +
+
+
+
+ EAT_BOOL + irr::io +
+
+
+
+ EAT_COLOR + irr::io +
+
+
+
+ EAT_COLORF + irr::io +
+
+
+
+ EAT_COUNT + irr::io +
+
+
+
+ EAT_DIMENSION2D + irr::io +
+
+
+
+ EAT_ENUM + irr::io +
+
+
+
+ EAT_FLOAT + irr::io +
+
+
+
+ EAT_FLOATARRAY + irr::io +
+
+
+
+ EAT_INT + irr::io +
+
+
+
+ EAT_INTARRAY + irr::io +
+
+
+
+ EAT_LINE2D + irr::io +
+
+
+
+ EAT_LINE3D + irr::io +
+
+
+
+ EAT_MATRIX + irr::io +
+
+
+
+ EAT_PLANE + irr::io +
+
+
+
+ EAT_POSITION2D + irr::io +
+
+
+
+ EAT_QUATERNION + irr::io +
+
+
+
+ EAT_RECT + irr::io +
+
+
+
+ EAT_STRING + irr::io +
+
+
+
+ EAT_STRINGWARRAY + irr::io +
+
+
+
+ EAT_TEXTURE + irr::io +
+
+
+
+ EAT_TRIANGLE3D + irr::io +
+
+
+
+ EAT_UNKNOWN + irr::io +
+
+
+
+ EAT_USER_POINTER + irr::io +
+
+
+
+ EAT_VECTOR2D + irr::io +
+
+
+
+ EAT_VECTOR3D + irr::io +
+
+
+ +
+
+
+ EBAM_ANIMATED + irr::scene +
+
+
+
+ EBAM_AUTOMATIC + irr::scene +
+
+
+
+ EBAM_COUNT + irr::scene +
+
+
+
+ EBAM_UNANIMATED + irr::scene +
+
+
+
+ EBF_DST_ALPHA + irr::video +
+
+
+
+ EBF_DST_COLOR + irr::video +
+
+
+
+ EBF_ONE + irr::video +
+
+
+
+ EBF_ONE_MINUS_DST_ALPHA + irr::video +
+
+
+
+ EBF_ONE_MINUS_DST_COLOR + irr::video +
+
+
+
+ EBF_ONE_MINUS_SRC_ALPHA + irr::video +
+
+
+
+ EBF_ONE_MINUS_SRC_COLOR + irr::video +
+
+
+
+ EBF_SRC_ALPHA + irr::video +
+
+
+
+ EBF_SRC_ALPHA_SATURATE + irr::video +
+
+
+
+ EBF_SRC_COLOR + irr::video +
+
+
+
+ EBF_ZERO + irr::video +
+
+
+
+ EBO_ADD + irr::video +
+
+
+
+ EBO_MAX + irr::video +
+
+
+
+ EBO_MAX_ALPHA + irr::video +
+
+
+
+ EBO_MAX_FACTOR + irr::video +
+
+
+
+ EBO_MIN + irr::video +
+
+
+
+ EBO_MIN_ALPHA + irr::video +
+
+
+
+ EBO_MIN_FACTOR + irr::video +
+
+
+
+ EBO_NONE + irr::video +
+
+
+
+ EBO_REVSUBTRACT + irr::video +
+
+
+
+ EBO_SUBTRACT + irr::video +
+
+
+
+ EBSS_COUNT + irr::scene +
+
+
+
+ EBSS_GLOBAL + irr::scene +
+
+
+
+ EBSS_LOCAL + irr::scene +
+
+
+
+ EBT_INDEX + irr::scene +
+
+
+
+ EBT_NONE + irr::scene +
+
+
+
+ EBT_VERTEX + irr::scene +
+
+
+
+ EBT_VERTEX_AND_INDEX + irr::scene +
+
+
+
+ ECCS_AMBIENT + irr::scene +
+
+
+
+ ECCS_DIFFUSE + irr::scene +
+
+
+
+ ECCS_EMISSIVE + irr::scene +
+
+
+
+ ECCS_REFLECTIVE + irr::scene +
+
+
+
+ ECCS_SPECULAR + irr::scene +
+
+
+
+ ECCS_TRANSPARENT + irr::scene +
+
+
+
+ ECF_A16B16G16R16F + irr::video +
+
+
+
+ ECF_A1R5G5B5 + irr::video +
+
+
+
+ ECF_A32B32G32R32F + irr::video +
+
+
+
+ ECF_A8R8G8B8 + irr::video +
+
+
+
+ ECF_G16R16F + irr::video +
+
+
+
+ ECF_G32R32F + irr::video +
+
+
+
+ ECF_R16F + irr::video +
+
+
+
+ ECF_R32F + irr::video +
+
+
+
+ ECF_R5G6B5 + irr::video +
+
+
+
+ ECF_R8G8B8 + irr::video +
+
+
+
+ ECF_UNKNOWN + irr::video +
+
+
+
+ ECFN_ALWAYS + irr::video +
+
+
+
+ ECFN_EQUAL + irr::video +
+
+
+
+ ECFN_GREATER + irr::video +
+
+
+
+ ECFN_GREATEREQUAL + irr::video +
+
+
+
+ ECFN_LESS + irr::video +
+
+
+
+ ECFN_LESSEQUAL + irr::video +
+
+
+
+ ECFN_NEVER + irr::video +
+
+
+
+ ECFN_NOTEQUAL + irr::video +
+
+
+
+ ECGI_PER_MESH + irr::scene +
+
+
+
+ ECGI_PER_MESH_AND_MATERIAL + irr::scene +
+
+
+
+ ECI_COUNT + irr::gui +
+
+
+
+ ECI_CROSS + irr::gui +
+
+
+
+ ECI_HAND + irr::gui +
+
+
+
+ ECI_HELP + irr::gui +
+
+
+
+ ECI_IBEAM + irr::gui +
+
+
+
+ ECI_NO + irr::gui +
+
+
+
+ ECI_NORMAL + irr::gui +
+
+
+
+ ECI_SIZEALL + irr::gui +
+
+
+
+ ECI_SIZENESW + irr::gui +
+
+
+
+ ECI_SIZENS + irr::gui +
+
+
+
+ ECI_SIZENWSE + irr::gui +
+
+
+
+ ECI_SIZEWE + irr::gui +
+
+
+
+ ECI_UP + irr::gui +
+
+
+
+ ECI_WAIT + irr::gui +
+
+
+
+ ECIC_AMBIENT + irr::scene +
+
+
+
+ ECIC_CUSTOM + irr::scene +
+
+
+
+ ECIC_DIFFUSE + irr::scene +
+
+
+
+ ECIC_EMISSIVE + irr::scene +
+
+
+
+ ECIC_NONE + irr::scene +
+
+
+
+ ECIC_SPECULAR + irr::scene +
+
+
+
+ ECM_AMBIENT + irr::video +
+
+
+
+ ECM_DIFFUSE + irr::video +
+
+
+
+ ECM_DIFFUSE_AND_AMBIENT + irr::video +
+
+
+
+ ECM_EMISSIVE + irr::video +
+
+
+
+ ECM_NONE + irr::video +
+
+
+
+ ECM_SPECULAR + irr::video +
+
+
+
+ ECMC_HIDE + irr::gui +
+
+
+
+ ECMC_IGNORE + irr::gui +
+
+
+
+ ECMC_REMOVE + irr::gui +
+
+
+
+ ECOF_A_ONE + irr::scene +
+
+
+
+ ECOF_RGB_ZERO + irr::scene +
+
+
+
+ ECOLOR_FORMAT + irr::video +
+
+
+
+ eConstructor + irr::core::CMatrix4 +
+
+
+
+ ECONTEXT_MENU_CLOSE + irr::gui +
+
+
+
+ ECP_ALL + irr::video +
+
+
+
+ ECP_ALPHA + irr::video +
+
+
+
+ ECP_BLUE + irr::video +
+
+
+
+ ECP_GREEN + irr::video +
+
+
+
+ ECP_NONE + irr::video +
+
+
+
+ ECP_RED + irr::video +
+
+
+
+ ECP_RGB + irr::video +
+
+
+
+ ECPB_NONE + irr::gui +
+
+
+
+ ECPB_X11_CACHE_UPDATES + irr::gui +
+
+
+
+ ECTF_BLINN + irr::scene +
+
+
+
+ ECTF_CONSTANT + irr::scene +
+
+
+
+ ECTF_LAMBERT + irr::scene +
+
+
+
+ ECTF_PHONG + irr::scene +
+
+ +
+
+ ECURSOR_ICON + irr::gui +
+
+
+
+ ECURSOR_PLATFORM_BEHAVIOR + irr::gui +
+
+ + + + +
+
+ EDS_BBOX + irr::scene +
+
+
+
+ EDS_BBOX_ALL + irr::scene +
+
+
+
+ EDS_BBOX_BUFFERS + irr::scene +
+
+
+
+ EDS_FULL + irr::scene +
+
+
+
+ EDS_HALF_TRANSPARENCY + irr::scene +
+
+
+
+ EDS_MESH_WIRE_OVERLAY + irr::scene +
+
+
+
+ EDS_NORMALS + irr::scene +
+
+
+
+ EDS_OFF + irr::scene +
+
+
+
+ EDS_SKELETON + irr::scene +
+
+
+
+ EDT_BURNINGSVIDEO + irr::video +
+
+
+
+ EDT_COUNT + irr::video +
+
+
+
+ EDT_DIRECT3D8 + irr::video +
+
+
+
+ EDT_DIRECT3D9 + irr::video +
+
+
+
+ EDT_NULL + irr::video +
+
+
+
+ EDT_OPENGL + irr::video +
+
+
+
+ EDT_SOFTWARE + irr::video +
+
+
+
+ EET_GUI_EVENT + irr +
+
+ +
+ +
+
+
+ EET_LOG_TEXT_EVENT + irr +
+
+
+ +
+
+
+ EET_USER_EVENT + irr +
+
+
+
+ EEVENT_TYPE + irr +
+
+
+
+ EFAT_FOLDER + irr::io +
+
+
+
+ EFAT_GZIP + irr::io +
+
+
+
+ EFAT_NPK + irr::io +
+
+
+
+ EFAT_PAK + irr::io +
+
+
+
+ EFAT_TAR + irr::io +
+
+
+
+ EFAT_UNKNOWN + irr::io +
+
+
+
+ EFAT_WAD + irr::io +
+
+
+
+ EFAT_ZIP + irr::io +
+
+
+
+ EFileSystemType + irr::io +
+
+
+
+ EFT_FOG_EXP + irr::video +
+
+
+
+ EFT_FOG_EXP2 + irr::video +
+
+
+
+ EFT_FOG_LINEAR + irr::video +
+
+
+
+ EGBS_BUTTON_DOWN + irr::gui +
+
+
+
+ EGBS_BUTTON_FOCUSED + irr::gui +
+
+
+
+ EGBS_BUTTON_MOUSE_OFF + irr::gui +
+
+
+
+ EGBS_BUTTON_MOUSE_OVER + irr::gui +
+
+
+
+ EGBS_BUTTON_NOT_FOCUSED + irr::gui +
+
+
+
+ EGBS_BUTTON_UP + irr::gui +
+
+
+
+ EGBS_COUNT + irr::gui +
+
+
+
+ EGCO_ASCENDING + irr::gui +
+
+
+
+ EGCO_COUNT + irr::gui +
+
+
+
+ EGCO_CUSTOM + irr::gui +
+
+
+
+ EGCO_DESCENDING + irr::gui +
+
+
+ +
+
+
+ EGCO_NONE + irr::gui +
+
+
+
+ EGDC_3D_DARK_SHADOW + irr::gui +
+
+
+
+ EGDC_3D_FACE + irr::gui +
+
+
+
+ EGDC_3D_HIGH_LIGHT + irr::gui +
+
+
+
+ EGDC_3D_LIGHT + irr::gui +
+
+
+
+ EGDC_3D_SHADOW + irr::gui +
+
+
+
+ EGDC_ACTIVE_BORDER + irr::gui +
+
+
+
+ EGDC_ACTIVE_CAPTION + irr::gui +
+
+
+
+ EGDC_APP_WORKSPACE + irr::gui +
+
+
+
+ EGDC_BUTTON_TEXT + irr::gui +
+
+
+
+ EGDC_COUNT + irr::gui +
+
+
+
+ EGDC_EDITABLE + irr::gui +
+
+
+
+ EGDC_FOCUSED_EDITABLE + irr::gui +
+
+
+
+ EGDC_GRAY_EDITABLE + irr::gui +
+
+
+
+ EGDC_GRAY_TEXT + irr::gui +
+
+
+
+ EGDC_GRAY_WINDOW_SYMBOL + irr::gui +
+
+
+
+ EGDC_HIGH_LIGHT + irr::gui +
+
+
+
+ EGDC_HIGH_LIGHT_TEXT + irr::gui +
+
+
+
+ EGDC_ICON + irr::gui +
+
+
+
+ EGDC_ICON_HIGH_LIGHT + irr::gui +
+
+
+
+ EGDC_INACTIVE_BORDER + irr::gui +
+
+
+
+ EGDC_INACTIVE_CAPTION + irr::gui +
+
+
+
+ EGDC_SCROLLBAR + irr::gui +
+
+
+
+ EGDC_TOOLTIP + irr::gui +
+
+
+
+ EGDC_TOOLTIP_BACKGROUND + irr::gui +
+
+
+
+ EGDC_WINDOW + irr::gui +
+
+
+
+ EGDC_WINDOW_SYMBOL + irr::gui +
+
+
+
+ EGDF_BUTTON + irr::gui +
+
+
+
+ EGDF_COUNT + irr::gui +
+
+
+
+ EGDF_DEFAULT + irr::gui +
+
+
+
+ EGDF_MENU + irr::gui +
+
+
+
+ EGDF_TOOLTIP + irr::gui +
+
+
+
+ EGDF_WINDOW + irr::gui +
+
+
+
+ EGDI_CHECK_BOX_CHECKED + irr::gui +
+
+
+
+ EGDI_COLLAPSE + irr::gui +
+
+
+
+ EGDI_COUNT + irr::gui +
+
+
+
+ EGDI_CURSOR_DOWN + irr::gui +
+
+
+
+ EGDI_CURSOR_LEFT + irr::gui +
+
+
+
+ EGDI_CURSOR_RIGHT + irr::gui +
+
+
+
+ EGDI_CURSOR_UP + irr::gui +
+
+
+
+ EGDI_DIRECTORY + irr::gui +
+
+
+
+ EGDI_DROP_DOWN + irr::gui +
+
+
+
+ EGDI_EXPAND + irr::gui +
+
+
+
+ EGDI_FILE + irr::gui +
+
+
+
+ EGDI_MENU_MORE + irr::gui +
+
+
+
+ EGDI_MORE_DOWN + irr::gui +
+
+
+
+ EGDI_MORE_LEFT + irr::gui +
+
+
+
+ EGDI_MORE_RIGHT + irr::gui +
+
+
+
+ EGDI_MORE_UP + irr::gui +
+
+
+
+ EGDI_RADIO_BUTTON_CHECKED + irr::gui +
+
+
+
+ EGDI_SMALL_CURSOR_DOWN + irr::gui +
+
+
+
+ EGDI_SMALL_CURSOR_UP + irr::gui +
+
+
+
+ EGDI_WINDOW_CLOSE + irr::gui +
+
+
+
+ EGDI_WINDOW_MAXIMIZE + irr::gui +
+
+
+
+ EGDI_WINDOW_MINIMIZE + irr::gui +
+
+
+
+ EGDI_WINDOW_RESIZE + irr::gui +
+
+
+
+ EGDI_WINDOW_RESTORE + irr::gui +
+
+
+
+ EGDS_BUTTON_HEIGHT + irr::gui +
+
+ + + + +
+
+ EGDS_BUTTON_WIDTH + irr::gui +
+
+
+
+ EGDS_CHECK_BOX_WIDTH + irr::gui +
+
+
+
+ EGDS_COUNT + irr::gui +
+
+
+
+ EGDS_MENU_HEIGHT + irr::gui +
+
+
+ +
+
+
+ EGDS_MESSAGE_BOX_HEIGHT + irr::gui +
+
+ + + + +
+
+ EGDS_MESSAGE_BOX_WIDTH + irr::gui +
+
+
+
+ EGDS_SCROLLBAR_SIZE + irr::gui +
+
+
+
+ EGDS_TEXT_DISTANCE_X + irr::gui +
+
+
+
+ EGDS_TEXT_DISTANCE_Y + irr::gui +
+
+
+ +
+
+ +
+
+
+ EGDS_WINDOW_BUTTON_WIDTH + irr::gui +
+
+
+
+ EGDT_COUNT + irr::gui +
+
+
+
+ EGDT_MSG_BOX_CANCEL + irr::gui +
+
+
+
+ EGDT_MSG_BOX_NO + irr::gui +
+
+
+
+ EGDT_MSG_BOX_OK + irr::gui +
+
+
+
+ EGDT_MSG_BOX_YES + irr::gui +
+
+
+
+ EGDT_WINDOW_CLOSE + irr::gui +
+
+
+
+ EGDT_WINDOW_MAXIMIZE + irr::gui +
+
+
+
+ EGDT_WINDOW_MINIMIZE + irr::gui +
+
+
+
+ EGDT_WINDOW_RESTORE + irr::gui +
+
+
+
+ EGET_BUTTON_CLICKED + irr::gui +
+
+
+
+ EGET_CHECKBOX_CHANGED + irr::gui +
+
+
+
+ EGET_COMBO_BOX_CHANGED + irr::gui +
+
+
+
+ EGET_COUNT + irr::gui +
+
+
+
+ EGET_DIRECTORY_SELECTED + irr::gui +
+
+
+
+ EGET_EDITBOX_CHANGED + irr::gui +
+
+
+
+ EGET_EDITBOX_ENTER + irr::gui +
+
+
+ +
+
+
+ EGET_ELEMENT_CLOSED + irr::gui +
+
+
+
+ EGET_ELEMENT_FOCUS_LOST + irr::gui +
+
+
+
+ EGET_ELEMENT_FOCUSED + irr::gui +
+
+
+
+ EGET_ELEMENT_HOVERED + irr::gui +
+
+
+
+ EGET_ELEMENT_LEFT + irr::gui +
+
+ +
+
+ EGET_FILE_SELECTED + irr::gui +
+
+
+
+ EGET_LISTBOX_CHANGED + irr::gui +
+
+
+ +
+
+
+ EGET_MENU_ITEM_SELECTED + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_CANCEL + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_NO + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_OK + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_YES + irr::gui +
+
+
+
+ EGET_SCROLL_BAR_CHANGED + irr::gui +
+
+
+
+ EGET_SPINBOX_CHANGED + irr::gui +
+
+
+
+ EGET_TAB_CHANGED + irr::gui +
+
+
+
+ EGET_TABLE_CHANGED + irr::gui +
+
+
+
+ EGET_TABLE_HEADER_CHANGED + irr::gui +
+
+
+
+ EGET_TABLE_SELECTED_AGAIN + irr::gui +
+
+
+ +
+
+ +
+
+ +
+
+
+ EGET_TREEVIEW_NODE_EXPAND + irr::gui +
+
+
+
+ EGET_TREEVIEW_NODE_SELECT + irr::gui +
+
+
+
+ EGFT_BITMAP + irr::gui +
+
+
+
+ EGFT_CUSTOM + irr::gui +
+
+
+
+ EGFT_OS + irr::gui +
+
+
+
+ EGFT_VECTOR + irr::gui +
+
+
+
+ EGOM_ASCENDING + irr::gui +
+
+
+
+ EGOM_COUNT + irr::gui +
+
+
+
+ EGOM_DESCENDING + irr::gui +
+
+
+
+ EGOM_NONE + irr::gui +
+
+
+
+ EGSL_CG + irr::video +
+
+
+
+ EGSL_DEFAULT + irr::video +
+
+
+
+ EGST_BURNING_SKIN + irr::gui +
+
+ +
+
+ EGST_GS_4_0 + irr::video +
+
+
+
+ EGST_UNKNOWN + irr::gui +
+
+
+
+ EGST_WINDOWS_CLASSIC + irr::gui +
+
+
+
+ EGST_WINDOWS_METALLIC + irr::gui +
+
+
+
+ EGTDF_ACTIVE_ROW + irr::gui +
+
+
+
+ EGTDF_COLUMNS + irr::gui +
+
+
+
+ EGTDF_COUNT + irr::gui +
+
+
+
+ EGTDF_ROWS + irr::gui +
+
+
+
+ EGUI_ALIGNMENT + irr::gui +
+
+
+
+ EGUI_BUTTON_STATE + irr::gui +
+
+
+
+ EGUI_COLUMN_ORDERING + irr::gui +
+
+
+
+ EGUI_DEFAULT_COLOR + irr::gui +
+
+
+
+ EGUI_DEFAULT_FONT + irr::gui +
+
+
+
+ EGUI_DEFAULT_ICON + irr::gui +
+
+
+
+ EGUI_DEFAULT_SIZE + irr::gui +
+
+
+
+ EGUI_DEFAULT_TEXT + irr::gui +
+
+
+
+ EGUI_ELEMENT_TYPE + irr::gui +
+
+
+
+ EGUI_EVENT_TYPE + irr::gui +
+
+
+
+ EGUI_FONT_TYPE + irr::gui +
+
+
+
+ EGUI_LBC_COUNT + irr::gui +
+
+
+
+ EGUI_LBC_ICON + irr::gui +
+
+
+
+ EGUI_LBC_ICON_HIGHLIGHT + irr::gui +
+
+
+
+ EGUI_LBC_TEXT + irr::gui +
+
+
+
+ EGUI_LBC_TEXT_HIGHLIGHT + irr::gui +
+
+
+
+ EGUI_LISTBOX_COLOR + irr::gui +
+
+
+
+ EGUI_ORDERING_MODE + irr::gui +
+
+
+
+ EGUI_SKIN_TYPE + irr::gui +
+
+
+
+ EGUI_TABLE_DRAW_FLAGS + irr::gui +
+
+
+
+ EGUIA_CENTER + irr::gui +
+
+
+
+ EGUIA_LOWERRIGHT + irr::gui +
+
+
+
+ EGUIA_SCALE + irr::gui +
+
+
+
+ EGUIA_UPPERLEFT + irr::gui +
+
+ + +
+
+ EGUIET_BUTTON + irr::gui +
+
+
+
+ EGUIET_CHECK_BOX + irr::gui +
+
+
+ +
+
+
+ EGUIET_COMBO_BOX + irr::gui +
+
+
+
+ EGUIET_CONTEXT_MENU + irr::gui +
+
+
+
+ EGUIET_COUNT + irr::gui +
+
+
+
+ EGUIET_EDIT_BOX + irr::gui +
+
+
+
+ EGUIET_ELEMENT + irr::gui +
+
+
+
+ EGUIET_FILE_OPEN_DIALOG + irr::gui +
+
+ +
+
+ EGUIET_IMAGE + irr::gui +
+
+
+
+ EGUIET_IN_OUT_FADER + irr::gui +
+
+
+
+ EGUIET_LIST_BOX + irr::gui +
+
+
+
+ EGUIET_MENU + irr::gui +
+
+
+
+ EGUIET_MESH_VIEWER + irr::gui +
+
+
+
+ EGUIET_MESSAGE_BOX + irr::gui +
+
+
+
+ EGUIET_MODAL_SCREEN + irr::gui +
+
+
+
+ EGUIET_ROOT + irr::gui +
+
+
+
+ EGUIET_SCROLL_BAR + irr::gui +
+
+
+
+ EGUIET_SPIN_BOX + irr::gui +
+
+
+
+ EGUIET_STATIC_TEXT + irr::gui +
+
+
+
+ EGUIET_TAB + irr::gui +
+
+
+
+ EGUIET_TAB_CONTROL + irr::gui +
+
+
+
+ EGUIET_TABLE + irr::gui +
+
+
+
+ EGUIET_TOOL_BAR + irr::gui +
+
+
+
+ EGUIET_TREE_VIEW + irr::gui +
+
+
+
+ EGUIET_WINDOW + irr::gui +
+
+ +
+
+ EHM_DYNAMIC + irr::scene +
+
+
+
+ EHM_NEVER + irr::scene +
+
+
+
+ EHM_STATIC + irr::scene +
+
+
+
+ EHM_STREAM + irr::scene +
+
+
+
+ EIDT_BEST + irr +
+
+
+
+ EIDT_CONSOLE + irr +
+
+
+
+ EIDT_FRAMEBUFFER + irr +
+
+
+
+ EIDT_OSX + irr +
+
+
+
+ EIDT_SDL + irr +
+
+
+
+ EIDT_WIN32 + irr +
+
+
+
+ EIDT_WINCE + irr +
+
+
+
+ EIDT_X11 + irr +
+
+
+
+ EIM_CONSTANT + irr::scene +
+
+
+
+ EIM_COUNT + irr::scene +
+
+
+
+ EIM_LINEAR + irr::scene +
+
+
+
+ EIntersectionRelation3D + irr::core +
+
+
+
+ EIT_16BIT + irr::video +
+
+
+
+ EIT_32BIT + irr::video +
+
+
+
+ EJUOR_CONTROL + irr::scene +
+
+
+
+ EJUOR_NONE + irr::scene +
+
+
+
+ EJUOR_READ + irr::scene +
+
+
+
+ EKA_COUNT + irr +
+
+
+
+ EKA_CROUCH + irr +
+
+
+
+ EKA_FORCE_32BIT + irr +
+
+
+
+ EKA_JUMP_UP + irr +
+
+
+
+ EKA_MOVE_BACKWARD + irr +
+
+
+
+ EKA_MOVE_FORWARD + irr +
+
+
+
+ EKA_STRAFE_LEFT + irr +
+
+
+
+ EKA_STRAFE_RIGHT + irr +
+
+
+
+ EKEY_ACTION + irr +
+
+
+
+ EKEY_CODE + irr +
+
+
+
+ Element + irr::SEvent::SGUIEvent +
+
+
+
+ ELL_DEBUG + irr +
+
+
+
+ ELL_ERROR + irr +
+
+
+
+ ELL_INFORMATION + irr +
+
+
+
+ ELL_NONE + irr +
+
+
+
+ ELL_WARNING + irr +
+
+
+
+ eLocaleID + irr::core +
+
+
+
+ ELOG_LEVEL + irr +
+
+
+
+ ELR_DEVICE + irr::video +
+
+
+
+ ELR_HW_BUFFERS + irr::video +
+
+
+
+ ELR_RTTS + irr::video +
+
+
+
+ ELR_TEXTURES + irr::video +
+
+
+
+ ELT_COUNT + irr::video +
+
+
+
+ ELT_DIRECTIONAL + irr::video +
+
+
+
+ ELT_POINT + irr::video +
+
+
+
+ ELT_SPOT + irr::video +
+
+
+
+ EM4CONST_COPY + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_IDENTITY + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_INVERSE + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_INVERSE_TRANSPOSED + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_NOTHING + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_TRANSPOSED + irr::core::CMatrix4 +
+
+
+
+ EMAT_ATTACK + irr::scene +
+
+
+
+ EMAT_BOOM + irr::scene +
+
+
+
+ EMAT_COUNT + irr::scene +
+
+
+
+ EMAT_CROUCH_ATTACK + irr::scene +
+
+
+
+ EMAT_CROUCH_DEATH + irr::scene +
+
+
+
+ EMAT_CROUCH_PAIN + irr::scene +
+
+
+
+ EMAT_CROUCH_STAND + irr::scene +
+
+
+
+ EMAT_CROUCH_WALK + irr::scene +
+
+
+
+ EMAT_DEATH_FALLBACK + irr::scene +
+
+
+
+ EMAT_DEATH_FALLBACKSLOW + irr::scene +
+
+
+
+ EMAT_DEATH_FALLFORWARD + irr::scene +
+
+
+
+ EMAT_FALLBACK + irr::scene +
+
+
+
+ EMAT_FLIP + irr::scene +
+
+
+
+ EMAT_JUMP + irr::scene +
+
+
+
+ EMAT_PAIN_A + irr::scene +
+
+
+
+ EMAT_PAIN_B + irr::scene +
+
+
+
+ EMAT_PAIN_C + irr::scene +
+
+
+
+ EMAT_POINT + irr::scene +
+
+
+
+ EMAT_RUN + irr::scene +
+
+
+
+ EMAT_SALUTE + irr::scene +
+
+
+
+ EMAT_STAND + irr::scene +
+
+
+
+ EMAT_WAVE + irr::scene +
+
+ + +
+
+ EMBF_CANCEL + irr::gui +
+
+
+
+ EMBF_FORCE_32BIT + irr::gui +
+
+
+
+ EMBF_NO + irr::gui +
+
+
+
+ EMBF_OK + irr::gui +
+
+
+
+ EMBF_YES + irr::gui +
+
+
+
+ EMBSM_EXTRA1 + irr +
+
+
+
+ EMBSM_EXTRA2 + irr +
+
+
+
+ EMBSM_FORCE_32_BIT + irr +
+
+
+
+ EMBSM_LEFT + irr +
+
+
+
+ EMBSM_MIDDLE + irr +
+
+
+
+ EMBSM_RIGHT + irr +
+
+
+
+ EMD2_ANIMATION_TYPE + irr::scene +
+
+
+
+ EMD3_ANIMATION_COUNT + irr::scene +
+
+
+
+ EMD3_ANIMATION_TYPE + irr::scene +
+
+
+
+ EMD3_BOTH_DEAD_1 + irr::scene +
+
+
+
+ EMD3_BOTH_DEAD_2 + irr::scene +
+
+
+
+ EMD3_BOTH_DEAD_3 + irr::scene +
+
+
+
+ EMD3_BOTH_DEATH_1 + irr::scene +
+
+
+
+ EMD3_BOTH_DEATH_2 + irr::scene +
+
+
+
+ EMD3_BOTH_DEATH_3 + irr::scene +
+
+
+
+ EMD3_HEAD + irr::scene +
+
+
+
+ EMD3_LEGS_BACK + irr::scene +
+
+
+
+ EMD3_LEGS_IDLE + irr::scene +
+
+
+
+ EMD3_LEGS_IDLE_CROUCH + irr::scene +
+
+
+
+ EMD3_LEGS_JUMP_1 + irr::scene +
+
+
+
+ EMD3_LEGS_JUMP_2 + irr::scene +
+
+
+
+ EMD3_LEGS_LAND_1 + irr::scene +
+
+
+
+ EMD3_LEGS_LAND_2 + irr::scene +
+
+
+
+ EMD3_LEGS_RUN + irr::scene +
+
+
+
+ EMD3_LEGS_SWIM + irr::scene +
+
+
+
+ EMD3_LEGS_TURN + irr::scene +
+
+
+
+ EMD3_LEGS_WALK + irr::scene +
+
+
+
+ EMD3_LEGS_WALK_CROUCH + irr::scene +
+
+
+
+ EMD3_LOWER + irr::scene +
+
+
+
+ EMD3_NUMMODELS + irr::scene +
+
+
+
+ EMD3_TORSO_ATTACK_1 + irr::scene +
+
+
+
+ EMD3_TORSO_ATTACK_2 + irr::scene +
+
+
+
+ EMD3_TORSO_DROP + irr::scene +
+
+
+
+ EMD3_TORSO_GESTURE + irr::scene +
+
+
+
+ EMD3_TORSO_RAISE + irr::scene +
+
+
+
+ EMD3_TORSO_STAND_1 + irr::scene +
+
+
+
+ EMD3_TORSO_STAND_2 + irr::scene +
+
+
+
+ EMD3_UPPER + irr::scene +
+
+
+
+ EMD3_WEAPON + irr::scene +
+
+
+
+ eMD3Models + irr::scene +
+
+
+
+ EMESH_WRITER_TYPE + irr::scene +
+
+ +
+
+ EMESSAGE_BOX_FLAG + irr::gui +
+
+ +
+
+ EMF_ANISOTROPIC_FILTER + irr::video +
+
+
+
+ EMF_ANTI_ALIASING + irr::video +
+
+
+
+ EMF_BACK_FACE_CULLING + irr::video +
+
+
+
+ EMF_BILINEAR_FILTER + irr::video +
+
+
+
+ EMF_BLEND_OPERATION + irr::video +
+
+
+
+ EMF_COLOR_MASK + irr::video +
+
+
+
+ EMF_COLOR_MATERIAL + irr::video +
+
+
+
+ EMF_FOG_ENABLE + irr::video +
+
+
+
+ EMF_FRONT_FACE_CULLING + irr::video +
+
+
+
+ EMF_GOURAUD_SHADING + irr::video +
+
+
+
+ EMF_LIGHTING + irr::video +
+
+
+
+ EMF_NORMALIZE_NORMALS + irr::video +
+
+
+
+ EMF_POINTCLOUD + irr::video +
+
+
+
+ EMF_POLYGON_OFFSET + irr::video +
+
+
+
+ EMF_TEXTURE_WRAP + irr::video +
+
+
+
+ EMF_TRILINEAR_FILTER + irr::video +
+
+
+
+ EMF_USE_MIP_MAPS + irr::video +
+
+
+
+ EMF_WIREFRAME + irr::video +
+
+
+
+ EMF_ZBUFFER + irr::video +
+
+
+
+ EMF_ZWRITE_ENABLE + irr::video +
+
+
+
+ EMFN_MODULATE_1X + irr::video +
+
+
+
+ EMFN_MODULATE_2X + irr::video +
+
+
+
+ EMFN_MODULATE_4X + irr::video +
+
+
+
+ EMIE_COUNT + irr +
+
+ +
+ +
+ + + +
+ +
+ + +
+
+ EMIE_MOUSE_MOVED + irr +
+
+
+
+ EMIE_MOUSE_WHEEL + irr +
+
+ +
+ +
+ + +
+
+ EmissiveColor + irr::video::SMaterial +
+
+
+
+ emitt + irr::scene::IParticleEmitter +
+
+
+
+ EMOUSE_INPUT_EVENT + irr +
+
+ +
+
+ EMT_DETAIL_MAP + irr::video +
+
+
+
+ EMT_FORCE_32BIT + irr::video +
+
+
+
+ EMT_LIGHTMAP + irr::video +
+
+
+
+ EMT_LIGHTMAP_ADD + irr::video +
+
+
+
+ EMT_LIGHTMAP_LIGHTING + irr::video +
+
+
+
+ EMT_LIGHTMAP_LIGHTING_M2 + irr::video +
+
+
+
+ EMT_LIGHTMAP_LIGHTING_M4 + irr::video +
+
+
+
+ EMT_LIGHTMAP_M2 + irr::video +
+
+
+
+ EMT_LIGHTMAP_M4 + irr::video +
+
+
+
+ EMT_NORMAL_MAP_SOLID + irr::video +
+
+ + +
+
+ EMT_ONETEXTURE_BLEND + irr::video +
+
+
+
+ EMT_PARALLAX_MAP_SOLID + irr::video +
+
+ + +
+
+ EMT_REFLECTION_2_LAYER + irr::video +
+
+
+
+ EMT_SOLID + irr::video +
+
+
+
+ EMT_SOLID_2_LAYER + irr::video +
+
+
+
+ EMT_SPHERE_MAP + irr::video +
+
+
+
+ EMT_TRANSPARENT_ADD_COLOR + irr::video +
+
+
+ +
+
+ +
+ +
+
+ EMT_TRANSPARENT_VERTEX_ALPHA + irr::video +
+
+
+
+ EMWF_NONE + irr::scene +
+
+
+
+ EMWF_WRITE_BINARY + irr::scene +
+
+
+
+ EMWF_WRITE_COMPRESSED + irr::scene +
+
+
+
+ EMWF_WRITE_LIGHTMAPS + irr::scene +
+
+
+
+ EMWT_COLLADA + irr::scene +
+
+
+
+ EMWT_IRR_MESH + irr::scene +
+
+
+
+ EMWT_OBJ + irr::scene +
+
+
+
+ EMWT_PLY + irr::scene +
+
+
+
+ EMWT_STL + irr::scene +
+
+
+
+ enableCastShadow + irr::scene::ILightSceneNode +
+
+
+
+ enableClipPlane + irr::video::IVideoDriver +
+
+ +
+
+ EnableFlags + irr::video::SOverrideMaterial +
+
+
+
+ enableMaterial2D + irr::video::IVideoDriver +
+
+ +
+
+ EnablePasses + irr::video::SOverrideMaterial +
+
+ +
+
+ endScene + irr::video::IVideoDriver +
+
+ + +
+
+ EPAT_ATTRACT + irr::scene +
+
+
+
+ EPAT_COUNT + irr::scene +
+
+
+
+ EPAT_FADE_OUT + irr::scene +
+
+
+
+ EPAT_GRAVITY + irr::scene +
+
+
+
+ EPAT_NONE + irr::scene +
+
+
+
+ EPAT_ROTATE + irr::scene +
+
+
+
+ EPAT_SCALE + irr::scene +
+
+
+
+ EPET_ANIMATED_MESH + irr::scene +
+
+
+
+ EPET_BOX + irr::scene +
+
+
+
+ EPET_COUNT + irr::scene +
+
+
+
+ EPET_CYLINDER + irr::scene +
+
+
+
+ EPET_MESH + irr::scene +
+
+
+
+ EPET_POINT + irr::scene +
+
+
+
+ EPET_RING + irr::scene +
+
+
+
+ EPET_SPHERE + irr::scene +
+
+
+
+ EPO_BACK + irr::video +
+
+
+
+ EPO_FRONT + irr::video +
+
+ +
+
+ EPST_COUNT + irr::video +
+
+
+
+ EPST_PS_1_1 + irr::video +
+
+
+
+ EPST_PS_1_2 + irr::video +
+
+
+
+ EPST_PS_1_3 + irr::video +
+
+
+
+ EPST_PS_1_4 + irr::video +
+
+
+
+ EPST_PS_2_0 + irr::video +
+
+
+
+ EPST_PS_2_a + irr::video +
+
+
+
+ EPST_PS_2_b + irr::video +
+
+
+
+ EPST_PS_3_0 + irr::video +
+
+
+
+ EPST_PS_4_0 + irr::video +
+
+
+
+ EPST_PS_4_1 + irr::video +
+
+
+
+ EPST_PS_5_0 + irr::video +
+
+
+
+ EPT_LINE_LOOP + irr::scene +
+
+
+
+ EPT_LINE_STRIP + irr::scene +
+
+
+
+ EPT_LINES + irr::scene +
+
+
+
+ EPT_POINT_SPRITES + irr::scene +
+
+
+
+ EPT_POINTS + irr::scene +
+
+
+
+ EPT_POLYGON + irr::scene +
+
+
+
+ EPT_QUAD_STRIP + irr::scene +
+
+
+
+ EPT_QUADS + irr::scene +
+
+
+
+ EPT_TRIANGLE_FAN + irr::scene +
+
+
+
+ EPT_TRIANGLE_STRIP + irr::scene +
+
+
+
+ EPT_TRIANGLES + irr::scene +
+
+
+
+ eQ3MeshIndex + irr::scene::quake3 +
+
+
+
+ eQ3ModifierFunction + irr::scene::quake3 +
+
+ +
+
+ equals_ignore_case + irr::core::string +
+
+
+
+ equals_substring_ignore_case + irr::core::string +
+
+
+
+ equalsByUlp + irr::core +
+
+ + +
+
+ ERT_AUX_BUFFER0 + irr::video +
+
+
+
+ ERT_AUX_BUFFER1 + irr::video +
+
+
+
+ ERT_AUX_BUFFER2 + irr::video +
+
+
+
+ ERT_AUX_BUFFER3 + irr::video +
+
+
+
+ ERT_AUX_BUFFER4 + irr::video +
+
+
+
+ ERT_FRAME_BUFFER + irr::video +
+
+
+
+ ERT_MULTI_RENDER_TEXTURES + irr::video +
+
+
+
+ ERT_RENDER_TEXTURE + irr::video +
+
+
+
+ ERT_STEREO_BOTH_BUFFERS + irr::video +
+
+
+
+ ERT_STEREO_LEFT_BUFFER + irr::video +
+
+
+
+ ERT_STEREO_RIGHT_BUFFER + irr::video +
+
+
+
+ ESCENE_NODE_ANIMATOR_TYPE + irr::scene +
+
+
+
+ ESCENE_NODE_TYPE + irr::scene +
+
+ + + +
+
+ ESNAT_CAMERA_FPS + irr::scene +
+
+
+
+ ESNAT_CAMERA_MAYA + irr::scene +
+
+
+
+ ESNAT_COLLISION_RESPONSE + irr::scene +
+
+
+
+ ESNAT_COUNT + irr::scene +
+
+
+
+ ESNAT_DELETION + irr::scene +
+
+
+
+ ESNAT_FLY_CIRCLE + irr::scene +
+
+
+
+ ESNAT_FLY_STRAIGHT + irr::scene +
+
+
+
+ ESNAT_FOLLOW_SPLINE + irr::scene +
+
+
+
+ ESNAT_FORCE_32_BIT + irr::scene +
+
+
+
+ ESNAT_ROTATION + irr::scene +
+
+
+
+ ESNAT_TEXTURE + irr::scene +
+
+
+
+ ESNAT_UNKNOWN + irr::scene +
+
+
+
+ ESNRP_AUTOMATIC + irr::scene +
+
+
+
+ ESNRP_CAMERA + irr::scene +
+
+
+
+ ESNRP_LIGHT + irr::scene +
+
+
+
+ ESNRP_NONE + irr::scene +
+
+
+
+ ESNRP_SHADOW + irr::scene +
+
+
+
+ ESNRP_SKY_BOX + irr::scene +
+
+
+
+ ESNRP_SOLID + irr::scene +
+
+
+
+ ESNRP_TRANSPARENT + irr::scene +
+
+
+
+ ESNRP_TRANSPARENT_EFFECT + irr::scene +
+
+
+
+ ESNT_ANIMATED_MESH + irr::scene +
+
+
+
+ ESNT_ANY + irr::scene +
+
+
+
+ ESNT_BILLBOARD + irr::scene +
+
+
+
+ ESNT_CAMERA + irr::scene +
+
+
+
+ ESNT_CAMERA_FPS + irr::scene +
+
+
+
+ ESNT_CAMERA_MAYA + irr::scene +
+
+
+
+ ESNT_CUBE + irr::scene +
+
+
+
+ ESNT_DUMMY_TRANSFORMATION + irr::scene +
+
+
+
+ ESNT_EMPTY + irr::scene +
+
+
+
+ ESNT_LIGHT + irr::scene +
+
+
+
+ ESNT_MD3_SCENE_NODE + irr::scene +
+
+
+
+ ESNT_MESH + irr::scene +
+
+
+
+ ESNT_OCTREE + irr::scene +
+
+
+
+ ESNT_PARTICLE_SYSTEM + irr::scene +
+
+
+
+ ESNT_Q3SHADER_SCENE_NODE + irr::scene +
+
+
+
+ ESNT_SCENE_MANAGER + irr::scene +
+
+
+
+ ESNT_SHADOW_VOLUME + irr::scene +
+
+
+
+ ESNT_SKY_BOX + irr::scene +
+
+
+
+ ESNT_SKY_DOME + irr::scene +
+
+
+
+ ESNT_SPHERE + irr::scene +
+
+
+
+ ESNT_TERRAIN + irr::scene +
+
+
+
+ ESNT_TEXT + irr::scene +
+
+
+
+ ESNT_UNKNOWN + irr::scene +
+
+
+
+ ESNT_VOLUME_LIGHT + irr::scene +
+
+
+
+ ESNT_WATER_SURFACE + irr::scene +
+
+
+
+ ETC_CLAMP + irr::video +
+
+
+
+ ETC_CLAMP_TO_BORDER + irr::video +
+
+
+
+ ETC_CLAMP_TO_EDGE + irr::video +
+
+
+
+ ETC_MIRROR + irr::video +
+
+
+
+ ETC_MIRROR_CLAMP + irr::video +
+
+
+
+ ETC_MIRROR_CLAMP_TO_BORDER + irr::video +
+
+
+
+ ETC_MIRROR_CLAMP_TO_EDGE + irr::video +
+
+
+
+ ETC_REPEAT + irr::video +
+
+
+
+ ETCF_ALLOW_NON_POWER_2 + irr::video +
+
+
+
+ ETCF_ALWAYS_16_BIT + irr::video +
+
+
+
+ ETCF_ALWAYS_32_BIT + irr::video +
+
+
+
+ ETCF_CREATE_MIP_MAPS + irr::video +
+
+
+
+ ETCF_FORCE_32_BIT_DO_NOT_USE + irr::video +
+
+
+
+ ETCF_NO_ALPHA_CHANNEL + irr::video +
+
+
+
+ ETCF_OPTIMIZED_FOR_QUALITY + irr::video +
+
+
+
+ ETCF_OPTIMIZED_FOR_SPEED + irr::video +
+
+ +
+
+ ETEXT_FORMAT + irr::io +
+
+
+
+ ETF_ASCII + irr::io +
+
+
+
+ ETF_UTF16_BE + irr::io +
+
+
+
+ ETF_UTF16_LE + irr::io +
+
+
+
+ ETF_UTF32_BE + irr::io +
+
+
+
+ ETF_UTF32_LE + irr::io +
+
+
+
+ ETF_UTF8 + irr::io +
+
+
+
+ ETLM_READ_ONLY + irr::video +
+
+
+
+ ETLM_READ_WRITE + irr::video +
+
+
+
+ ETLM_WRITE_ONLY + irr::video +
+
+
+
+ ETPS_129 + irr::scene +
+
+
+
+ ETPS_17 + irr::scene +
+
+
+
+ ETPS_33 + irr::scene +
+
+
+
+ ETPS_65 + irr::scene +
+
+
+
+ ETPS_9 + irr::scene +
+
+
+
+ ETS_COUNT + irr::video +
+
+
+
+ ETS_PROJECTION + irr::video +
+
+
+
+ ETS_TEXTURE_0 + irr::video +
+
+
+
+ ETS_TEXTURE_1 + irr::video +
+
+
+
+ ETS_TEXTURE_2 + irr::video +
+
+
+
+ ETS_TEXTURE_3 + irr::video +
+
+
+
+ ETS_VIEW + irr::video +
+
+
+
+ ETS_WORLD + irr::video +
+
+
+
+ evaluate + irr::scene::quake3::SModifierFunction +
+
+
+
+ EVDF_ALPHA_TO_COVERAGE + irr::video +
+
+
+
+ EVDF_ARB_FRAGMENT_PROGRAM_1 + irr::video +
+
+
+
+ EVDF_ARB_GLSL + irr::video +
+
+
+
+ EVDF_ARB_VERTEX_PROGRAM_1 + irr::video +
+
+
+
+ EVDF_BILINEAR_FILTER + irr::video +
+
+
+
+ EVDF_BLEND_OPERATIONS + irr::video +
+
+
+
+ EVDF_CG + irr::video +
+
+
+
+ EVDF_COLOR_MASK + irr::video +
+
+
+
+ EVDF_COUNT + irr::video +
+
+
+
+ EVDF_FRAMEBUFFER_OBJECT + irr::video +
+
+
+
+ EVDF_GEOMETRY_SHADER + irr::video +
+
+
+
+ EVDF_HARDWARE_TL + irr::video +
+
+
+
+ EVDF_HLSL + irr::video +
+
+
+
+ EVDF_MIP_MAP + irr::video +
+
+
+
+ EVDF_MIP_MAP_AUTO_UPDATE + irr::video +
+
+
+
+ EVDF_MRT_BLEND + irr::video +
+
+
+
+ EVDF_MRT_BLEND_FUNC + irr::video +
+
+
+
+ EVDF_MRT_COLOR_MASK + irr::video +
+
+
+
+ EVDF_MULTIPLE_RENDER_TARGETS + irr::video +
+
+
+
+ EVDF_MULTITEXTURE + irr::video +
+
+
+
+ EVDF_OCCLUSION_QUERY + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_1 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_2 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_3 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_4 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_2_0 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_3_0 + irr::video +
+
+
+
+ EVDF_POLYGON_OFFSET + irr::video +
+
+
+
+ EVDF_RENDER_TO_TARGET + irr::video +
+
+
+
+ EVDF_STENCIL_BUFFER + irr::video +
+
+
+
+ EVDF_TEXTURE_MATRIX + irr::video +
+
+
+
+ EVDF_TEXTURE_NPOT + irr::video +
+
+
+
+ EVDF_TEXTURE_NSQUARE + irr::video +
+
+
+
+ EVDF_VERTEX_BUFFER_OBJECT + irr::video +
+
+
+
+ EVDF_VERTEX_SHADER_1_1 + irr::video +
+
+
+
+ EVDF_VERTEX_SHADER_2_0 + irr::video +
+
+
+
+ EVDF_VERTEX_SHADER_3_0 + irr::video +
+
+
+
+ Event + irr::SEvent::SMouseInput +
+
+
+
+ EventReceiver + irr::SIrrlichtCreationParameters +
+
+ +
+
+ EVST_COUNT + irr::video +
+
+
+
+ EVST_VS_1_1 + irr::video +
+
+
+
+ EVST_VS_2_0 + irr::video +
+
+
+
+ EVST_VS_2_a + irr::video +
+
+
+
+ EVST_VS_3_0 + irr::video +
+
+
+
+ EVST_VS_4_0 + irr::video +
+
+
+
+ EVST_VS_4_1 + irr::video +
+
+
+
+ EVST_VS_5_0 + irr::video +
+
+
+
+ EVT_2TCOORDS + irr::video +
+
+
+
+ EVT_STANDARD + irr::video +
+
+
+
+ EVT_TANGENTS + irr::video +
+
+
+
+ EWD_FRIDAY + irr::ITimer +
+
+
+
+ EWD_MONDAY + irr::ITimer +
+
+
+
+ EWD_SATURDAY + irr::ITimer +
+
+
+
+ EWD_SUNDAY + irr::ITimer +
+
+
+
+ EWD_THURSDAY + irr::ITimer +
+
+
+
+ EWD_TUESDAY + irr::ITimer +
+
+
+
+ EWD_WEDNESDAY + irr::ITimer +
+
+
+
+ EWeekday + irr::ITimer +
+
+
+
+ EXACTVERTEX + irr::scene::quake3 +
+
+
+
+ existFile + irr::io::IFileSystem +
+
+
+
+ existsAttribute + irr::io::IAttributes +
+
+
+
+ existsIntersection + irr::core::plane3d +
+
+
+
+ EXML_NODE + irr::io +
+
+
+
+ EXN_CDATA + irr::io +
+
+
+
+ EXN_COMMENT + irr::io +
+
+
+
+ EXN_ELEMENT + irr::io +
+
+
+
+ EXN_ELEMENT_END + irr::io +
+
+
+
+ EXN_NONE + irr::io +
+
+
+
+ EXN_TEXT + irr::io +
+
+
+
+ EXN_UNKNOWN + irr::io +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_66.html b/src/others/irrlicht-1.8.1/doc/html/search/all_66.html new file mode 100644 index 0000000..be0b1e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_66.html @@ -0,0 +1,485 @@ + + + + + + + +
+
Loading...
+ +
+
+ f32 + irr +
+
+
+
+ F32_A_GREATER_B + irrMath.h +
+
+
+
+ F32_AS_S32 + irrMath.h +
+
+
+
+ F32_AS_U32 + irrMath.h +
+
+
+
+ F32_AS_U32_POINTER + irrMath.h +
+
+
+
+ F32_EQUAL_0 + irrMath.h +
+
+
+
+ F32_EQUAL_1 + irrMath.h +
+
+
+
+ F32_EXPON_MANTISSA + irrMath.h +
+
+
+
+ F32_GREATER_0 + irrMath.h +
+
+
+
+ F32_GREATER_EQUAL_0 + irrMath.h +
+
+
+
+ F32_LOWER_0 + irrMath.h +
+
+
+
+ F32_LOWER_EQUAL_0 + irrMath.h +
+
+
+
+ f32_max3 + irr::core +
+
+
+
+ f32_min3 + irr::core +
+
+
+
+ F32_SIGN_BIT + irrMath.h +
+
+
+
+ F32_VALUE_0 + irrMath.h +
+
+
+
+ F32_VALUE_1 + irrMath.h +
+
+
+
+ f64 + irr +
+
+
+
+ fadeIn + irr::gui::IGUIInOutFader +
+
+
+
+ fadeOut + irr::gui::IGUIInOutFader +
+
+
+
+ Falloff + irr::video::SLight +
+
+
+
+ fast_atof + irr::core +
+
+
+ +
+
+
+ fast_atof_move + irr::core +
+
+
+
+ fast_atof_table + irr::core +
+
+ +
+
+ fileSize + irr::scene::SMD3Header +
+
+
+
+ FILESYSTEM_NATIVE + irr::io +
+
+
+
+ FILESYSTEM_VIRTUAL + irr::io +
+
+
+
+ fill + irr::video::IImage +
+
+
+
+ fillMaterialStructureFromAttributes + irr::video::IVideoDriver +
+
+
+
+ finalize + irr::scene::ISkinnedMesh +
+
+ +
+
+ findAttribute + irr::io::IAttributes +
+
+
+
+ findFile + irr::io::IFileList +
+
+
+
+ findFirst + irr::core::string +
+
+
+
+ findFirstChar + irr::core::string +
+
+
+
+ findFirstCharNotInList + irr::core::string +
+
+
+
+ findItemWithCommandId + irr::gui::IGUIContextMenu +
+
+
+
+ findLast + irr::core::string +
+
+
+
+ findLastChar + irr::core::string +
+
+
+
+ findLastCharNotInList + irr::core::string +
+
+
+
+ findNext + irr::core::string +
+
+
+
+ findTexture + irr::video::IVideoDriver +
+
+
+
+ first + irr::scene::SMD3AnimationInfo +
+
+
+
+ Flags + irr::io::SAttributeReadWriteOptions +
+
+
+
+ flattenFilename + irr::io::IFileSystem +
+
+
+
+ flipSurfaces + irr::scene::IMeshManipulator +
+
+
+
+ FloatIntUnion32 + irr::core::FloatIntUnion32 +
+
+
+
+ FloatIntUnion32 + irr::core +
+
+
+
+ floor32 + irr::core +
+
+
+
+ FLT_MAX + irrMath.h +
+
+
+
+ FLT_MIN + irrMath.h +
+
+
+
+ FogEnable + irr::video::SMaterial +
+
+
+
+ FogTypeNames + irr::video +
+
+
+
+ fps + irr::scene::SMD3AnimationInfo +
+
+ +
+
+ fract + irr::core +
+
+ +
+
+ Frames + irr::gui::SGUISprite +
+
+
+
+ FramesPerSecond + irr::scene::SAnimatedMesh +
+
+
+
+ frameStart + irr::scene::SMD3Header +
+
+
+
+ frameTime + irr::gui::SGUISprite +
+
+
+
+ frand + irr::IRandomizer +
+
+
+
+ frequency + irr::scene::quake3::SModifierFunction +
+
+
+
+ fromAngleAxis + irr::core::quaternion +
+
+
+
+ fromRGB + irr::video::SColorHSL +
+
+
+
+ FrontfaceCulling + irr::video::SMaterial +
+
+
+
+ fschar_t + irr +
+
+
+
+ Fullscreen + irr::SIrrlichtCreationParameters +
+
+
+
+ func + irr::scene::quake3::SModifierFunction +
+
+
+ +
+
+ +
+
+
+ FUNCTION2 + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_67.html b/src/others/irrlicht-1.8.1/doc/html/search/all_67.html new file mode 100644 index 0000000..4ba8552 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_67.html @@ -0,0 +1,3961 @@ + + + + + + + +
+
Loading...
+
+
+ g + irr::video::SColorf +
+
+
+
+ GEOMETRY_SHADER_TYPE_NAMES + irr::video +
+
+ +
+
+ getAbsoluteClippingRect + irr::gui::IGUIElement +
+
+
+
+ getAbsolutePath + irr::io::IFileSystem +
+
+ +
+
+ getAbsoluteTransformation + irr::scene::ISceneNode +
+
+
+
+ getActiveCamera + irr::scene::ISceneManager +
+
+
+
+ getActiveColumn + irr::gui::IGUITable +
+
+
+
+ getActiveColumnOrdering + irr::gui::IGUITable +
+
+ +
+
+ getActiveIcon + irr::gui::ICursorControl +
+
+
+
+ getActiveTab + irr::gui::IGUITabControl +
+
+
+
+ getAffectors + irr::scene::IParticleSystemSceneNode +
+
+
+
+ getAffectX + irr::scene::IParticleAttractionAffector +
+
+
+
+ getAffectY + irr::scene::IParticleAttractionAffector +
+
+
+
+ getAffectZ + irr::scene::IParticleAttractionAffector +
+
+ + +
+
+ getAlphaMask + irr::video::IImage +
+
+ +
+
+ getAngle + irr::core::vector2d +
+
+
+
+ getAngleTrig + irr::core::vector2d +
+
+ +
+
+ getAnimatedMeshSceneNode + irr::scene::IParticleAnimatedMeshSceneNodeEmitter +
+
+
+
+ getAnimateTarget + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getAnimationCount + irr::scene::IAnimatedMeshMD2 +
+
+
+
+ getAnimationMode + irr::scene::IBoneSceneNode +
+
+
+
+ getAnimationName + irr::scene::IAnimatedMeshMD2 +
+
+ +
+
+ getAnimators + irr::scene::ISceneNode +
+
+
+
+ getAnimatorTypeName + irr::scene::ISceneManager +
+
+
+
+ getArchiveLoader + irr::io::IFileSystem +
+
+
+
+ getArchiveLoaderCount + irr::io::IFileSystem +
+
+ +
+
+ getAs3Values + irr::core::vector3d +
+
+
+
+ getAs4Values + irr::core::vector3d +
+
+
+
+ getAsFloat + irr::scene::quake3 +
+
+
+
+ getAspectRatio + irr::scene::ICameraSceneNode +
+
+
+
+ getAsStringList + irr::scene::quake3 +
+
+
+
+ getAsVector3df + irr::scene::quake3 +
+
+
+
+ getAttract + irr::scene::IParticleAttractionAffector +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ getAttributeValueSafe + irr::io::IIrrXMLReader +
+
+
+
+ getAutomaticCulling + irr::scene::ISceneNode +
+
+ + +
+
+ getBitsPerPixel + irr::video::IImage +
+
+
+
+ getBitsPerPixelFromFormat + irr::video::IImage +
+
+ +
+
+ getBlueMask + irr::video::IImage +
+
+
+
+ getBoneIndex + irr::scene::IBoneSceneNode +
+
+
+
+ getBoneName + irr::scene::IBoneSceneNode +
+
+ +
+
+ getBox + irr::scene::IParticleBoxEmitter +
+
+ +
+
+ getBuiltInFont + irr::gui::IGUIEnvironment +
+
+
+
+ getBytesPerPixel + irr::video::IImage +
+
+
+
+ getCastShadow + irr::scene::ILightSceneNode +
+
+
+
+ getCellData + irr::gui::IGUITable +
+
+
+
+ getCellText + irr::gui::IGUITable +
+
+ + + + +
+
+ getCharacterFromPos + irr::gui::IGUIFont +
+
+
+
+ getChildCount + irr::gui::IGUITreeViewNode +
+
+ +
+
+ getClientRect + irr::gui::IGUIWindow +
+
+
+
+ getCloseButton + irr::gui::IGUIWindow +
+
+
+
+ getCloseHandling + irr::gui::IGUIContextMenu +
+
+ +
+
+ getCollisionNode + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + +
+
+ getCollisionTriangle + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + +
+
+ getColorMapping + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getColumnCount + irr::gui::IGUITable +
+
+
+
+ getColumnWidth + irr::gui::IGUITable +
+
+
+
+ getConstIterator + irr::core::map +
+
+
+
+ getCreatableGUIElementTypeCount + irr::gui::IGUIElementFactory +
+
+
+
+ getCreatableSceneNodeAnimatorTypeCount + irr::scene::ISceneNodeAnimatorFactory +
+
+
+
+ getCreatableSceneNodeTypeCount + irr::scene::ISceneNodeFactory +
+
+
+
+ getCreateableGUIElementType + irr::gui::IGUIElementFactory +
+
+ +
+
+ getCreateableSceneNodeAnimatorType + irr::scene::ISceneNodeAnimatorFactory +
+
+ +
+
+ getCreateableSceneNodeType + irr::scene::ISceneNodeFactory +
+
+ +
+
+ getCullingFunction + irr::scene::quake3 +
+
+
+
+ getCurrentLODOfPatches + irr::scene::ITerrainSceneNode +
+
+
+
+ getCurrentRenderTargetSize + irr::video::IVideoDriver +
+
+
+
+ getCursorControl + irr::IrrlichtDevice +
+
+
+
+ getCustomColor + irr::scene::IColladaMeshWriterProperties +
+
+ +
+
+ getData2 + irr::gui::IGUITreeViewNode +
+
+
+
+ getDebugName + irr::IReferenceCounted +
+
+
+
+ getDefaultGUIElementFactory + irr::gui::IGUIEnvironment +
+
+
+
+ getDefaultNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ getDefaultProperties + irr::scene::IColladaMeshWriter +
+
+
+
+ getDefaultSceneNodeAnimatorFactory + irr::scene::ISceneManager +
+
+
+
+ getDefaultSceneNodeFactory + irr::scene::ISceneManager +
+
+
+
+ getDefaultText + irr::gui::IGUISkin +
+
+
+
+ getDefinitelyIdentityMatrix + irr::core::CMatrix4 +
+
+
+
+ getDepthFunction + irr::scene::quake3 +
+
+
+
+ getDesktopDepth + irr::video::IVideoModeList +
+
+
+
+ getDesktopResolution + irr::video::IVideoModeList +
+
+ +
+
+ getDirection + irr::scene::IParticleEmitter +
+
+
+
+ getDirectoryName + irr::gui::IGUIFileOpenDialog +
+
+
+
+ getDistance + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+ + +
+
+ getDistanceTo + irr::core::plane3d +
+
+
+
+ getDrawBackground + irr::gui::IGUIWindow +
+
+
+
+ getDrawFlags + irr::gui::IGUITable +
+
+
+
+ getDrawTitlebar + irr::gui::IGUIWindow +
+
+
+
+ getDriverAttributes + irr::video::IVideoDriver +
+
+ +
+
+ getDynamicLight + irr::video::IVideoDriver +
+
+
+
+ getDynamicLightCount + irr::video::IVideoDriver +
+
+
+
+ getEdges + irr::core::aabbox3d +
+
+
+
+ getEditBox + irr::gui::IGUISpinBox +
+
+
+
+ getElementFromId + irr::gui::IGUIElement +
+
+
+
+ getElementFromPoint + irr::gui::IGUIElement +
+
+
+
+ getEllipsoidRadius + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getEllipsoidTranslation + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ getEnabled + irr::scene::IParticleAffector +
+
+
+
+ getEndFrame + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getEntityList + irr::scene::IQ3LevelMesh +
+
+
+
+ getEventReceiver + irr::IrrlichtDevice +
+
+ +
+
+ getExpanded + irr::gui::IGUITreeViewNode +
+
+
+
+ getExportSMaterialsOnlyOnce + irr::scene::IColladaMeshWriter +
+
+
+
+ getExposedVideoData + irr::video::IVideoDriver +
+
+
+
+ getExtent + irr::core::aabbox3d +
+
+
+
+ getFadeOutTime + irr::scene::IParticleFadeOutAffector +
+
+
+
+ getFarLeftDown + irr::scene::SViewFrustum +
+
+
+
+ getFarLeftUp + irr::scene::SViewFrustum +
+
+
+
+ getFarRightDown + irr::scene::SViewFrustum +
+
+
+
+ getFarRightUp + irr::scene::SViewFrustum +
+
+
+
+ getFarValue + irr::scene::ICameraSceneNode +
+
+
+
+ getFileArchive + irr::io::IFileSystem +
+
+
+
+ getFileArchiveCount + irr::io::IFileSystem +
+
+
+
+ getFileBasename + irr::io::IFileSystem +
+
+
+
+ getFileCount + irr::io::IFileList +
+
+
+
+ getFileDir + irr::io::IFileSystem +
+
+
+
+ getFileList + irr::io::IFileArchive +
+
+ +
+
+ getFileNameExtension + irr::core +
+
+
+
+ getFileOffset + irr::io::IFileList +
+
+
+
+ getFileSize + irr::io::IFileList +
+
+ +
+
+ getFirstChild + irr::gui::IGUITreeViewNode +
+
+
+
+ getFlag + irr::video::SMaterial +
+
+
+
+ getFocus + irr::gui::IGUIEnvironment +
+
+
+
+ getFog + irr::video::IVideoDriver +
+
+ +
+
+ getFootColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getFOV + irr::scene::ICameraSceneNode +
+
+
+
+ getFPS + irr::video::IVideoDriver +
+
+ + +
+
+ getFrameNr + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getFullFileName + irr::io::IFileList +
+
+
+
+ getGammaRamp + irr::IrrlichtDevice +
+
+
+
+ getGeometryCreator + irr::scene::ISceneManager +
+
+
+
+ getGeometryWriting + irr::scene::IColladaMeshWriter +
+
+
+
+ getGPUProgrammingServices + irr::video::IVideoDriver +
+
+ + +
+
+ getGreenMask + irr::video::IImage +
+
+
+
+ getGroup + irr::scene::quake3::IShader +
+
+
+
+ getGroupSize + irr::scene::quake3::IShader +
+
+
+
+ getGUIElementFactory + irr::gui::IGUIEnvironment +
+
+ + + + + +
+
+ getHorizontalAngle + irr::core::vector3d +
+
+
+
+ getHovered + irr::gui::IGUIEnvironment +
+
+ + +
+
+ getImage + irr::gui::IGUIImage +
+
+
+
+ getImageCount + irr::gui::IGUIImageList +
+
+
+
+ getImageDataSizeInBytes + irr::video::IImage +
+
+
+
+ getImageDataSizeInPixels + irr::video::IImage +
+
+
+
+ getImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ getImageLeftOfIcon + irr::gui::IGUITreeView +
+
+
+
+ getImageList + irr::gui::IGUITreeView +
+
+
+
+ getImageLoader + irr::video::IVideoDriver +
+
+
+
+ getImageLoaderCount + irr::video::IVideoDriver +
+
+
+
+ getImageSize + irr::gui::IGUIImageList +
+
+
+
+ getImageWriter + irr::video::IVideoDriver +
+
+
+
+ getImageWriterCount + irr::video::IVideoDriver +
+
+ + +
+
+ getIndexForItemData + irr::gui::IGUIComboBox +
+
+
+
+ getIndexOfRefraction + irr::scene::IColladaMeshWriterProperties +
+
+ + +
+
+ getIndicesForPatch + irr::scene::ITerrainSceneNode +
+
+
+
+ getInternalName + irr::io::SNamedPath +
+
+ + +
+
+ getIntersectionOfPlaneWithLine + irr::core::triangle3d +
+
+ + +
+
+ getIntersectionWithPlane + irr::core::plane3d +
+
+
+
+ getIntersectionWithPlanes + irr::core::plane3d +
+
+
+
+ getIntersectionWithSphere + irr::core::line3d +
+
+
+
+ getInverse + irr::core::CMatrix4 +
+
+
+
+ getInversePrimitive + irr::core::CMatrix4 +
+
+
+
+ getItem + irr::gui::IGUIComboBox +
+
+
+
+ getItemAt + irr::gui::IGUIListBox +
+
+
+
+ getItemAutoChecking + irr::gui::IGUIContextMenu +
+
+
+
+ getItemCommandId + irr::gui::IGUIContextMenu +
+
+ +
+
+ getItemData + irr::gui::IGUIComboBox +
+
+
+
+ getItemDefaultColor + irr::gui::IGUIListBox +
+
+
+
+ getItemOverrideColor + irr::gui::IGUIListBox +
+
+
+
+ getItemText + irr::gui::IGUIContextMenu +
+
+
+
+ getIterator + irr::core::map +
+
+ +
+
+ getJointName + irr::scene::ISkinnedMesh +
+
+ +
+
+ getJointNumber + irr::scene::ISkinnedMesh +
+
+
+
+ getKerningHeight + irr::gui::IGUIFont +
+
+ +
+
+ getKeyMap + irr::scene::ISceneNodeAnimatorCameraFPS +
+
+
+
+ getKnownIntersectionWithLine + irr::core::plane3d +
+
+
+
+ getLargeStep + irr::gui::IGUIScrollBar +
+
+ +
+
+ getLastChild + irr::gui::IGUITreeViewNode +
+
+
+
+ getLastEventNode + irr::gui::IGUITreeView +
+
+ + +
+
+ getLevel + irr::gui::IGUITreeViewNode +
+
+ +
+
+ getLightness + irr::video::SColor +
+
+
+
+ getLightType + irr::scene::ILightSceneNode +
+
+
+
+ getLinesVisible + irr::gui::IGUITreeView +
+
+
+
+ getListItem + irr::gui::IGUIListBox +
+
+
+
+ getLogger + irr::IrrlichtDevice +
+
+
+
+ getLogLevel + irr::ILogger +
+
+
+
+ getLoopMode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getLuminance + irr::video::SColor +
+
+ +
+
+ getMaterial2D + irr::video::IVideoDriver +
+
+
+
+ getMaterialCount + irr::scene::ISceneNode +
+
+
+
+ getMaterialRenderer + irr::video::IVideoDriver +
+
+
+
+ getMaterialRendererCount + irr::video::IVideoDriver +
+
+
+
+ getMaterialRendererName + irr::video::IVideoDriver +
+
+ +
+
+ getMatrix_transposed + irr::core::quaternion +
+
+
+
+ getMatrixCenter + irr::core::quaternion +
+
+ +
+
+ getMaxAngleDegrees + irr::scene::IParticleEmitter +
+
+
+
+ getMaximalDynamicLightAmount + irr::video::IVideoDriver +
+
+
+
+ getMaximalPrimitiveCount + irr::video::IVideoDriver +
+
+
+
+ getMaximizeButton + irr::gui::IGUIWindow +
+
+
+
+ getMaxLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ getMaxParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ getMaxSelectionRows + irr::gui::IGUIComboBox +
+
+
+
+ getMaxStartColor + irr::scene::IParticleEmitter +
+
+
+
+ getMaxStartSize + irr::scene::IParticleEmitter +
+
+
+
+ getMaxTextureSize + irr::video::IVideoDriver +
+
+
+
+ getMD3Normal + irr::scene::quake3 +
+
+
+
+ getMD3TagTransformation + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getMemberPoint + irr::core::plane3d +
+
+ + + +
+
+ getMeshBufferForLOD + irr::scene::ITerrainSceneNode +
+
+
+
+ getMeshBuffers + irr::scene::ISkinnedMesh +
+
+
+
+ getMeshByFilename + irr::scene::IMeshCache +
+
+
+
+ getMeshByIndex + irr::scene::IMeshCache +
+
+
+
+ getMeshByName + irr::scene::IMeshCache +
+
+
+
+ getMeshCache + irr::scene::ISceneManager +
+
+
+
+ getMeshCount + irr::scene::IMeshCache +
+
+ +
+
+ getMeshIndex + irr::scene::IMeshCache +
+
+
+
+ getMeshLoader + irr::scene::ISceneManager +
+
+
+
+ getMeshLoaderCount + irr::scene::ISceneManager +
+
+ + + + + +
+
+ getMinimizeButton + irr::gui::IGUIWindow +
+
+
+
+ getMinLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ getMinParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ getMinStartColor + irr::scene::IParticleEmitter +
+
+
+
+ getMinStartSize + irr::scene::IParticleEmitter +
+
+
+
+ getModifierFunc + irr::scene::quake3 +
+
+ + +
+
+ getNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ getNearLeftDown + irr::scene::SViewFrustum +
+
+
+
+ getNearLeftUp + irr::scene::SViewFrustum +
+
+
+
+ getNearRightDown + irr::scene::SViewFrustum +
+
+
+
+ getNearRightUp + irr::scene::SViewFrustum +
+
+
+
+ getNearValue + irr::scene::ICameraSceneNode +
+
+
+
+ getNextElement + irr::gui::IGUIElement +
+
+
+
+ getNextSibling + irr::gui::IGUITreeViewNode +
+
+
+
+ getNextVisible + irr::gui::IGUITreeViewNode +
+
+ +
+
+ getNodeData + irr::io::IIrrXMLReader +
+
+
+
+ getNodeName + irr::io::IIrrXMLReader +
+
+
+
+ getNodeType + irr::io::IIrrXMLReader +
+
+ + +
+
+ getNumber + irr::gui::IGUITab +
+
+
+
+ getOcclusionQueryResult + irr::video::IVideoDriver +
+
+
+
+ getOperatingSystemVersion + irr::IOSOperator +
+
+
+
+ getOperationSystemVersion + irr::IOSOperator +
+
+
+
+ getOptimalSize + irr::core::dimension2d +
+
+
+
+ getOriginalMesh + irr::scene::IAnimatedMeshMD3 +
+
+
+
+ getOriginalSize + irr::video::ITexture +
+
+ +
+
+ getOutlineOnly + irr::scene::IParticleCylinderEmitter +
+
+ + +
+
+ getOverrideMaterial + irr::video::IVideoDriver +
+
+
+
+ getOwner + irr::gui::IGUITreeViewNode +
+
+
+
+ getParameters + irr::scene::ISceneManager +
+
+ +
+
+ getParentFirstIterator + irr::core::map +
+
+
+
+ getParentLastIterator + irr::core::map +
+
+
+
+ getParserFormat + irr::io::IIrrXMLReader +
+
+ + +
+
+ getPivotPoint + irr::scene::IParticleRotationAffector +
+
+
+
+ getPixel + irr::video::IImage +
+
+
+
+ getPlane + irr::core::triangle3d +
+
+
+
+ getPlatformBehavior + irr::gui::ICursorControl +
+
+
+
+ getPoint + irr::scene::IParticleAttractionAffector +
+
+
+
+ getPointOrientation + irr::core::line2d +
+
+ + + +
+
+ getPositions + irr::gui::IGUISpriteBank +
+
+
+
+ getPrevSibling + irr::gui::IGUITreeViewNode +
+
+
+
+ getPrimitiveCountDrawn + irr::video::IVideoDriver +
+
+
+
+ getProcessorSpeedMHz + irr::IOSOperator +
+
+
+
+ getProjectionMatrix + irr::scene::ICameraSceneNode +
+
+
+
+ getProperties + irr::scene::IColladaMeshWriter +
+
+ +
+
+ getRandomizer + irr::IrrlichtDevice +
+
+
+
+ getRayFromScreenCoordinates + irr::scene::ISceneCollisionManager +
+
+
+
+ getRealTime + irr::ITimer +
+
+
+
+ getRealTimeAndDate + irr::ITimer +
+
+ +
+
+ getRedMask + irr::video::IImage +
+
+
+
+ getReferenceCount + irr::IReferenceCounted +
+
+
+
+ getReflectivity + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getRegisteredGUIElementFactoryCount + irr::gui::IGUIEnvironment +
+
+
+
+ getRegisteredSceneNodeAnimatorFactoryCount + irr::scene::ISceneManager +
+
+
+
+ getRegisteredSceneNodeFactoryCount + irr::scene::ISceneManager +
+
+
+
+ getRelativeFilename + irr::io::IFileSystem +
+
+ +
+
+ getRelativeTransformation + irr::scene::ISceneNode +
+
+
+
+ getRelativeTransformationMatrix + irr::scene::IDummyTransformationSceneNode +
+
+
+
+ getRenderBuffer + irr::scene::ITerrainSceneNode +
+
+
+
+ getRenderCapability + irr::video::IMaterialRenderer +
+
+
+
+ getRingThickness + irr::scene::IParticleRingEmitter +
+
+ +
+
+ getRootGUIElement + irr::gui::IGUIEnvironment +
+
+
+
+ getRootSceneNode + irr::scene::ISceneManager +
+
+ +
+
+ getRotation + irr::scene::ISceneNode +
+
+
+
+ getRotationDegrees + irr::core::CMatrix4 +
+
+
+
+ getRowCount + irr::gui::IGUITable +
+
+ +
+
+ getSceneCollisionManager + irr::scene::ISceneManager +
+
+
+
+ getSceneLoader + irr::scene::ISceneManager +
+
+
+
+ getSceneLoaderCount + irr::scene::ISceneManager +
+
+ +
+
+ getSceneNodeAndCollisionPointFromRay + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeAnimatorFactory + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeFactory + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeForTriangle + irr::scene::ITriangleSelector +
+
+
+
+ getSceneNodeFromCameraBB + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeFromId + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeFromName + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeFromRayBB + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeFromScreenCoordinatesBB + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeFromType + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeRenderPass + irr::scene::ISceneManager +
+
+
+
+ getSceneNodesFromType + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeTypeName + irr::scene::ISceneManager +
+
+
+
+ getScreenCoordinatesFrom3DPosition + irr::scene::ISceneCollisionManager +
+
+
+
+ getScreenSize + irr::video::IVideoDriver +
+
+ +
+
+ getSelectedImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ getSelectedItem + irr::gui::IGUIContextMenu +
+
+ +
+
+ getSelectorCount + irr::scene::ITriangleSelector +
+
+ +
+
+ getShadowColor + irr::scene::ISceneManager +
+
+ +
+
+ getSkin + irr::gui::IGUIEnvironment +
+
+
+
+ getSkinningSpace + irr::scene::IBoneSceneNode +
+
+
+
+ getSmallStep + irr::gui::IGUIScrollBar +
+
+
+
+ getSourceFormat + irr::io::IIrrXMLReader +
+
+ + + +
+
+ getSpriteNoFromChar + irr::gui::IGUIFontBitmap +
+
+
+
+ getSprites + irr::gui::IGUISpriteBank +
+
+
+
+ getStartFrame + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getStepSize + irr::gui::IGUISpinBox +
+
+
+
+ getSubDivideU + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getSubDivideV + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getSubMenu + irr::gui::IGUIContextMenu +
+
+
+
+ getSupportedIconSize + irr::gui::ICursorControl +
+
+
+
+ getSystemMemory + irr::IOSOperator +
+
+
+
+ getTab + irr::gui::IGUITabControl +
+
+
+
+ getTabAt + irr::gui::IGUITabControl +
+
+
+
+ getTabCount + irr::gui::IGUITabControl +
+
+
+
+ getTabExtraWidth + irr::gui::IGUITabControl +
+
+
+
+ getTabGroup + irr::gui::IGUIElement +
+
+
+
+ getTabHeight + irr::gui::IGUITabControl +
+
+
+
+ getTabMaxWidth + irr::gui::IGUITabControl +
+
+
+
+ getTabOrder + irr::gui::IGUIElement +
+
+
+
+ getTabVerticalAlignment + irr::gui::IGUITabControl +
+
+
+
+ getTagList + irr::scene::IAnimatedMeshMD3 +
+
+
+
+ getTailColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getTarget + irr::scene::ICameraSceneNode +
+
+
+
+ getTargetAndRotationBinding + irr::scene::ICameraSceneNode +
+
+
+
+ getTargetColor + irr::scene::IParticleFadeOutAffector +
+
+
+
+ getTargetNode + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ +
+
+ getTechniqueFx + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getTerrainCenter + irr::scene::ITerrainSceneNode +
+
+ +
+
+ getTextColor + irr::gui::IGUITab +
+
+
+
+ getTextDimension + irr::gui::IGUIEditBox +
+
+
+
+ getTextFromClipboard + irr::IOSOperator +
+
+
+
+ getTextHeight + irr::gui::IGUIStaticText +
+
+ +
+
+ getTextureByIndex + irr::video::IVideoDriver +
+
+ +
+
+ getTextureCreationFlag + irr::video::IVideoDriver +
+
+
+
+ getTextureFormatFromFlags + irr::video::ITexture +
+
+
+
+ getTextureIdx + irr::scene::IColladaMeshWriterProperties +
+
+ +
+
+ getTextures + irr::scene::quake3 +
+
+
+
+ getTextWidth + irr::gui::IGUIStaticText +
+
+
+
+ getTime + irr::ITimer +
+
+
+
+ getTimeForceLost + irr::scene::IParticleGravityAffector +
+
+
+
+ getTimer + irr::IrrlichtDevice +
+
+
+
+ getToolTipText + irr::gui::IGUIElement +
+
+ +
+
+ getTransformedBoundingBox + irr::scene::ISceneNode +
+
+
+
+ getTranslation + irr::core::CMatrix4 +
+
+
+
+ getTransparency + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getTransparentFx + irr::scene::IColladaMeshWriterProperties +
+
+ +
+
+ getTriangleCount + irr::scene::ITriangleSelector +
+
+ +
+
+ getTriangleSelector + irr::scene::ISceneNode +
+
+ +
+
+ getTypeName + irr::gui::IGUIElement +
+
+
+
+ getUnitVector + irr::core::line2d +
+
+
+
+ getUpVector + irr::scene::ICameraSceneNode +
+
+
+
+ getValue + irr::gui::IGUISpinBox +
+
+ +
+
+ getVendorInfo + irr::video::IVideoDriver +
+
+
+
+ getVersion + irr::IrrlichtDevice +
+
+
+
+ getVertex + irr::scene::SSkinMeshBuffer +
+
+ + +
+
+ getVertexPitchFromType + irr::video +
+
+ + + +
+
+ getVideoModeCount + irr::video::IVideoModeList +
+
+
+
+ getVideoModeDepth + irr::video::IVideoModeList +
+
+
+
+ getVideoModeList + irr::IrrlichtDevice +
+
+ +
+
+ getViewFrustum + irr::scene::ICameraSceneNode +
+
+
+
+ getViewMatrix + irr::scene::ICameraSceneNode +
+
+
+
+ getViewMatrixAffector + irr::scene::ICameraSceneNode +
+
+
+
+ getViewPort + irr::video::IVideoDriver +
+
+
+
+ getVolume + irr::core::aabbox3d +
+
+
+
+ getWidth + irr::core::rect +
+
+
+
+ getWorkingDirectory + irr::io::IFileSystem +
+
+
+
+ getWorld + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getWriteDefaultScene + irr::scene::IColladaMeshWriter +
+
+
+
+ getWriteTextures + irr::scene::IColladaMeshWriter +
+
+
+
+ getZoomSpeed + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+
+
+ GlobalAnimatedMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ GlobalInversedMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ GlobalMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ GouraudShading + irr::video::SMaterial +
+
+
+
+ grab + irr::IReferenceCounted +
+
+
+
+ GUIAlignmentNames + irr::gui +
+
+
+
+ GUIButtonStateNames + irr::gui +
+
+
+
+ GUIColumnOrderingNames + irr::gui +
+
+
+
+ GUICursorIconNames + irr::gui +
+
+
+
+ GUIElementTypeNames + irr::gui +
+
+
+
+ GUIEvent + irr::SEvent +
+
+
+
+ GUIOrderingModeNames + irr::gui +
+
+
+
+ GUISkinColorNames + irr::gui +
+
+
+
+ GUISkinFontNames + irr::gui +
+
+
+
+ GUISkinIconNames + irr::gui +
+
+
+
+ GUISkinSizeNames + irr::gui +
+
+
+
+ GUISkinTextNames + irr::gui +
+
+
+
+ GUISkinTypeNames + irr::gui +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_68.html b/src/others/irrlicht-1.8.1/doc/html/search/all_68.html new file mode 100644 index 0000000..4b501ac --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_68.html @@ -0,0 +1,163 @@ + + + + + + + +
+
Loading...
+
+
+ HALF_PI + irr::core +
+
+
+
+ HandleSRGB + irr::SIrrlichtCreationParameters +
+
+
+
+ hasAlpha + irr::video::ITexture +
+
+
+
+ hasChildren + irr::gui::IGUITreeViewNode +
+
+
+
+ hasChilds + irr::gui::IGUITreeViewNode +
+
+
+
+ hasFileExtension + irr::core +
+
+
+
+ hasFinished + irr::scene::ISceneNodeAnimator +
+
+
+
+ hasFocus + irr::gui::IGUIEnvironment +
+
+
+
+ hasItemOverrideColor + irr::gui::IGUIListBox +
+
+
+
+ hasMipMaps + irr::video::ITexture +
+
+
+
+ hasResizableColumns + irr::gui::IGUITable +
+
+
+
+ hasType + irr::gui::IGUIElement +
+
+
+
+ HDc + irr::video::SExposedVideoData +
+
+
+
+ headerID + irr::scene::SMD3Header +
+
+
+
+ heapsink + irr::core +
+
+
+
+ heapsort + irr::core +
+
+
+ +
+
+
+ Height + irr::core::dimension2d +
+
+
+
+ HighPrecisionFPU + irr::SIrrlichtCreationParameters +
+
+
+
+ HotSpot + irr::gui::SCursorSprite +
+
+
+
+ Hour + irr::ITimer::RealTimeDate +
+
+
+
+ HRc + irr::video::SExposedVideoData +
+
+
+
+ Hue + irr::video::SColorHSL +
+
+
+
+ HWnd + irr::video::SExposedVideoData +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_69.html b/src/others/irrlicht-1.8.1/doc/html/search/all_69.html new file mode 100644 index 0000000..bfbcbe7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_69.html @@ -0,0 +1,2783 @@ + + + + + + + +
+
Loading...
+
+
+ core + irr +
+
+
+
+ gui + irr +
+
+
+
+ i + irr::core::FloatIntUnion32 +
+
+
+
+ IAnimatedMesh + irr::scene +
+
+ +
+
+ IAnimatedMeshMD2 + irr::scene +
+
+ +
+
+ IAnimatedMeshMD3 + irr::scene +
+
+ +
+
+ IAnimatedMeshSceneNode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ IAnimatedMeshSceneNode + irr::scene +
+
+ +
+
+ IAnimationEndCallBack + irr::scene +
+
+
+
+ IArchiveLoader + irr::io +
+
+
+ +
+ +
+
+ IAttributes + irr::io +
+
+
+ +
+
+
+ IBillboardSceneNode + irr::scene::IBillboardSceneNode +
+
+
+
+ IBillboardSceneNode + irr::scene +
+
+ +
+
+ IBillboardTextSceneNode + irr::scene::IBillboardTextSceneNode +
+
+
+
+ IBillboardTextSceneNode + irr::scene +
+
+ +
+
+ IBoneSceneNode + irr::scene::IBoneSceneNode +
+
+
+
+ IBoneSceneNode + irr::scene +
+
+ +
+
+ ICameraSceneNode + irr::scene::ICameraSceneNode +
+
+
+
+ ICameraSceneNode + irr::scene +
+
+ +
+
+ IColladaMeshWriter + irr::scene::IColladaMeshWriter +
+
+
+
+ IColladaMeshWriter + irr::scene +
+
+ +
+
+ IColladaMeshWriterNames + irr::scene +
+
+
+
+ IColladaMeshWriterProperties + irr::scene +
+
+
+
+ ICollisionCallback + irr::scene +
+
+
+
+ ICursorControl + irr::gui +
+
+ + +
+
+ IDENTITY + irr::scene::quake3 +
+
+
+
+ IDENTITYLIGHTING + irr::scene::quake3 +
+
+
+
+ IdentityMaterial + irr::video +
+
+
+
+ IdentityMatrix + irr::core +
+
+
+ +
+
+
+ IDummyTransformationSceneNode + irr::scene::IDummyTransformationSceneNode +
+
+ +
+
+ IDynamicMeshBuffer + irr::scene +
+
+ +
+
+ IEEE_1_0 + irrMath.h +
+
+
+
+ IEEE_255_0 + irrMath.h +
+
+
+
+ IEntity + irr::scene::quake3 +
+
+
+
+ IEventReceiver + irr +
+
+ +
+
+ if_c_a_else_0 + irr::core +
+
+ +
+
+ IFileArchive + irr::io +
+
+ +
+
+ IFileList + irr::io +
+
+
+ +
+
+
+ IFileReadCallBack + irr::io +
+
+
+
+ IFileSystem + irr::io +
+
+
+ +
+
+
+ IGeometryCreator + irr::scene +
+
+ +
+
+ IgnoreInput + irr::SIrrlichtCreationParameters +
+
+
+
+ IGPUProgrammingServices + irr::video +
+
+ +
+
+ IGUIButton + irr::gui::IGUIButton +
+
+
+
+ IGUIButton + irr::gui +
+
+
+ +
+
+
+ IGUICheckBox + irr::gui::IGUICheckBox +
+
+
+
+ IGUICheckBox + irr::gui +
+
+ +
+
+ IGUIColorSelectDialog + irr::gui::IGUIColorSelectDialog +
+
+
+
+ IGUIColorSelectDialog + irr::gui +
+
+ +
+
+ IGUIComboBox + irr::gui::IGUIComboBox +
+
+
+
+ IGUIComboBox + irr::gui +
+
+ +
+
+ IGUIContextMenu + irr::gui::IGUIContextMenu +
+
+
+
+ IGUIContextMenu + irr::gui +
+
+ +
+
+ IGUIEditBox + irr::gui +
+
+
+
+ IGUIEditBox + irr::gui::IGUIEditBox +
+
+
+ +
+
+
+ IGUIElement + irr::gui +
+
+
+
+ IGUIElement + irr::gui::IGUIElement +
+
+
+ +
+
+
+ IGUIElementFactory + irr::gui +
+
+ +
+
+ IGUIEnvironment + irr::gui +
+
+ +
+
+ IGUIFileOpenDialog + irr::gui +
+
+
+
+ IGUIFileOpenDialog + irr::gui::IGUIFileOpenDialog +
+
+ +
+
+ IGUIFont + irr::gui +
+
+
+ +
+
+
+ IGUIFontBitmap + irr::gui +
+
+ +
+
+ IGUIImage + irr::gui::IGUIImage +
+
+
+
+ IGUIImage + irr::gui +
+
+
+ +
+
+
+ IGUIImageList + irr::gui +
+
+ +
+
+ IGUIInOutFader + irr::gui::IGUIInOutFader +
+
+
+
+ IGUIInOutFader + irr::gui +
+
+ +
+
+ IGUIListBox + irr::gui::IGUIListBox +
+
+
+
+ IGUIListBox + irr::gui +
+
+
+ +
+
+
+ IGUIMeshViewer + irr::gui::IGUIMeshViewer +
+
+
+
+ IGUIMeshViewer + irr::gui +
+
+ +
+
+ IGUIScrollBar + irr::gui::IGUIScrollBar +
+
+
+
+ IGUIScrollBar + irr::gui +
+
+ +
+
+ IGUISkin + irr::gui +
+
+
+ +
+
+
+ IGUISpinBox + irr::gui::IGUISpinBox +
+
+
+
+ IGUISpinBox + irr::gui +
+
+
+ +
+
+
+ IGUISpriteBank + irr::gui +
+
+ +
+
+ IGUIStaticText + irr::gui::IGUIStaticText +
+
+
+
+ IGUIStaticText + irr::gui +
+
+ +
+
+ IGUITab + irr::gui::IGUITab +
+
+
+
+ IGUITab + irr::gui +
+
+
+
+ IGUITabControl + irr::gui::IGUITabControl +
+
+
+
+ IGUITabControl + irr::gui +
+
+ +
+
+ IGUITable + irr::gui::IGUITable +
+
+
+
+ IGUITable + irr::gui +
+
+
+ +
+
+
+ IGUIToolBar + irr::gui::IGUIToolBar +
+
+
+
+ IGUIToolBar + irr::gui +
+
+
+ +
+
+
+ IGUITreeView + irr::gui::IGUITreeView +
+
+
+
+ IGUITreeView + irr::gui +
+
+ +
+
+ IGUITreeViewNode + irr::gui +
+
+
+
+ IGUIWindow + irr::gui::IGUIWindow +
+
+
+
+ IGUIWindow + irr::gui +
+
+
+ +
+
+
+ IImage + irr::video +
+
+
+
+ IImage.h +
+
+
+
+ IImageLoader + irr::video +
+
+ +
+
+ IImageWriter + irr::video +
+
+ +
+
+ IIndexBuffer + irr::scene +
+
+ +
+
+ IIrrXMLReader + irr::io +
+
+
+
+ ILightManager + irr::scene +
+
+ +
+
+ ILightSceneNode + irr::scene::ILightSceneNode +
+
+
+
+ ILightSceneNode + irr::scene +
+
+ +
+
+ ILogger + irr +
+
+
+
+ ILogger.h +
+
+
+
+ IMaterialRenderer + irr::video +
+
+ +
+
+ IMaterialRendererServices + irr::video +
+
+ +
+
+ IMesh + irr::scene +
+
+
+
+ IMesh.h +
+
+
+
+ IMeshBuffer + irr::scene +
+
+
+ +
+
+
+ IMeshCache + irr::scene +
+
+
+ +
+
+
+ IMeshLoader + irr::scene +
+
+
+ +
+
+
+ IMeshManipulator + irr::scene +
+
+ +
+
+ IMeshSceneNode + irr::scene +
+
+
+
+ IMeshSceneNode + irr::scene::IMeshSceneNode +
+
+ +
+
+ IMeshWriter + irr::scene +
+
+
+ +
+
+
+ IMetaTriangleSelector + irr::scene +
+
+ +
+
+ Index + irr::scene::SMD3Face +
+
+ +
+
+ InnerCone + irr::video::SLight +
+
+ +
+
+ insert_after + irr::core::list +
+
+
+
+ insert_before + irr::core::list +
+
+
+
+ insertChildAfter + irr::gui::IGUITreeViewNode +
+
+
+
+ insertChildBefore + irr::gui::IGUITreeViewNode +
+
+ +
+
+ insertTab + irr::gui::IGUITabControl +
+
+
+
+ internal_delete + irr::core::irrAllocator +
+
+
+
+ internal_new + irr::core::irrAllocator +
+
+ +
+
+ intersectsWithBox + irr::core::aabbox3d +
+
+ +
+
+ intersectWith + irr::core::line2d +
+
+
+
+ inttofloat + irr::core +
+
+
+
+ inverseRotateVect + irr::core::CMatrix4 +
+
+
+
+ inverseTranslateVect + irr::core::CMatrix4 +
+
+
+
+ invert + irr::core::vector3d +
+
+
+
+ io + irr +
+
+
+
+ IOSOperator + irr +
+
+
+ +
+
+
+ IParticleAffector + irr::scene +
+
+
+
+ IParticleAffector + irr::scene::IParticleAffector +
+
+ + + +
+
+ IParticleAttractionAffector + irr::scene +
+
+ +
+
+ IParticleBoxEmitter + irr::scene +
+
+ +
+
+ IParticleCylinderEmitter + irr::scene +
+
+ +
+
+ IParticleEmitter + irr::scene +
+
+ +
+
+ IParticleFadeOutAffector + irr::scene +
+
+ +
+
+ IParticleGravityAffector + irr::scene +
+
+ +
+
+ IParticleMeshEmitter + irr::scene +
+
+ +
+
+ IParticlePointEmitter + irr::scene +
+
+
+
+ IParticleRingEmitter + irr::scene +
+
+ +
+
+ IParticleRotationAffector + irr::scene +
+
+ +
+
+ IParticleSphereEmitter + irr::scene +
+
+ +
+
+ IParticleSystemSceneNode + irr::scene +
+
+
+
+ IParticleSystemSceneNode + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ IQ3LevelMesh + irr::scene +
+
+ +
+ +
+
+
+ IR + irr::core +
+
+
+
+ IRandomizer + irr +
+
+
+ +
+
+
+ IReadFile + irr::io +
+
+
+ +
+
+
+ IReferenceCounted + irr::IReferenceCounted +
+
+
+
+ IReferenceCounted + irr +
+
+ +
+
+ IRenderTarget + irr::video +
+
+ +
+
+ irr +
+
+
+
+ IRR_LOCALE_ANSI + irr::core +
+
+
+
+ IRR_LOCALE_GERMAN + irr::core +
+
+
+
+ IRR_SCENE_MANAGER_IS_EDITOR + irr::scene +
+
+
+
+ IRR_TEST_BROKEN_QUATERNION_USE + quaternion.h +
+
+
+
+ irrAllocator + irr::core +
+
+ +
+
+ irrAllocator< fschar_t > + irr::core +
+
+
+
+ irrAllocator< IMesh * > + irr::core +
+
+
+ +
+ +
+
+ irrAllocator< s32 > + irr::core +
+
+
+ +
+
+
+ irrAllocator< SJoint * > + irr::core +
+
+
+
+ irrAllocator< SKListNode > + irr::core +
+
+ + +
+ +
+
+
+ irrAllocator< SMD3Vertex > + irr::core +
+
+
+ +
+
+ +
+
+
+ irrAllocator< SScaleKey > + irr::core +
+
+
+
+ irrAllocator< SVarGroup > + irr::core +
+
+
+
+ irrAllocator< SVariable > + irr::core +
+
+
+
+ irrAllocator< SWeight > + irr::core +
+
+
+
+ irrAllocator< u16 > + irr::core +
+
+
+
+ irrAllocator< u32 > + irr::core +
+
+ + + +
+
+ irrAllocatorFast + irr::core +
+
+
+ +
+
+
+ IRRCALLCONV + IrrCompileConfig.h +
+
+ +
+ +
+
+
+ IRRLICHT_API + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_SDK_VERSION + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_VERSION_MAJOR + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_VERSION_MINOR + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_VERSION_REVISION + IrrCompileConfig.h +
+
+
+
+ IrrlichtDevice + irr +
+
+ +
+
+ irrList.h +
+
+
+
+ irrMap.h +
+
+
+
+ irrMath.h +
+
+
+
+ irrpack.h +
+
+
+ +
+
+ +
+
+ +
+
+
+ irrXML.h +
+
+
+
+ IrrXMLReader + irr::io +
+
+
+
+ IrrXMLReaderUTF16 + irr::io +
+
+
+
+ IrrXMLReaderUTF32 + irr::io +
+
+ + + + +
+
+ isAWriteableFileExtension + irr::video::IImageWriter +
+
+ +
+
+ IsButtonPressed + irr::SEvent::SJoystickEvent +
+
+
+
+ ISceneCollisionManager + irr::scene +
+
+ +
+
+ ISceneLoader + irr::scene +
+
+ +
+
+ ISceneManager + irr::scene +
+
+ +
+
+ ISceneNode + irr::scene::ISceneNode +
+
+
+
+ ISceneNode + irr::scene +
+
+
+ +
+
+
+ ISceneNodeAnimator + irr::scene +
+
+ +
+
+ ISceneNodeAnimatorCameraFPS + irr::scene +
+
+ +
+
+ ISceneNodeAnimatorCameraMaya + irr::scene +
+
+ + + +
+
+ ISceneNodeAnimatorFactory + irr::scene +
+
+ +
+
+ ISceneNodeAnimatorList + irr::scene +
+
+
+
+ ISceneNodeFactory + irr::scene +
+
+ +
+
+ ISceneNodeList + irr::scene +
+
+
+
+ ISceneUserDataSerializer + irr::scene +
+
+ +
+
+ isChecked + irr::gui::IGUICheckBox +
+
+
+
+ isCulled + irr::scene::ISceneManager +
+
+
+
+ isDebugDataVisible + irr::scene::ISceneNode +
+
+ +
+
+ isDefined + irr::scene::quake3::SVarGroup +
+
+
+
+ isdigit + irr::core +
+
+
+
+ isDirectory + irr::io::IFileList +
+
+
+
+ isDraggable + irr::gui::IGUIWindow +
+
+
+
+ isDrawBackgroundEnabled + irr::gui::IGUIStaticText +
+
+
+
+ isDrawBorderEnabled + irr::gui::IGUIStaticText +
+
+
+
+ isDrawingBackground + irr::gui::IGUITab +
+
+
+
+ isDrawingBorder + irr::gui::IGUIButton +
+
+
+
+ isDriverSupported + irr::IrrlichtDevice +
+
+
+
+ IsDST + irr::ITimer::RealTimeDate +
+
+ +
+
+ isEmptyElement + irr::io::IIrrXMLReader +
+
+ +
+
+ isEqual + irr::scene::quake3 +
+
+
+
+ isEventReceiverEnabled + irr::scene::ISceneNodeAnimator +
+
+
+
+ isExportable + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ isFalling + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ isFileExtension + irr::core +
+
+ +
+
+ isFullInside + irr::core::aabbox3d +
+
+
+
+ isFullscreen + irr::IrrlichtDevice +
+
+
+
+ IShader + irr::scene::quake3 +
+
+
+
+ IShader + irr::scene::quake3::IShader +
+
+
+
+ IShaderConstantSetCallBack + irr::video +
+
+ +
+
+ IShaderManager + irr::scene::quake3 +
+
+
+
+ IShadowVolumeSceneNode + irr::scene +
+
+
+
+ IShadowVolumeSceneNode + irr::scene::IShadowVolumeSceneNode +
+
+ +
+
+ isIdentity + irr::core::CMatrix4 +
+
+
+
+ isIdentity_integer_base + irr::core::CMatrix4 +
+
+
+
+ isImageScaled + irr::gui::IGUIImage +
+
+
+
+ isInputReceiverEnabled + irr::scene::ICameraSceneNode +
+
+
+
+ isInSameDirectory + irr::core +
+
+
+
+ isItemChecked + irr::gui::IGUIContextMenu +
+
+
+
+ isItemEnabled + irr::gui::IGUIContextMenu +
+
+
+
+ ISkinnedMesh + irr::scene +
+
+ +
+
+ isLeftPressed + irr::SEvent::SMouseInput +
+
+
+
+ isMeshLoaded + irr::scene::IMeshCache +
+
+
+
+ isMiddlePressed + irr::SEvent::SMouseInput +
+
+
+
+ isMultiLineEnabled + irr::gui::IGUIEditBox +
+
+
+
+ isMyChild + irr::gui::IGUIElement +
+
+
+
+ isNotClipped + irr::gui::IGUIElement +
+
+
+
+ isnotzero + irr::core +
+
+ + +
+
+ isPasswordBox + irr::gui::IGUIEditBox +
+
+ + +
+
+ isPointInsideFast + irr::core::triangle3d +
+
+
+
+ isPointOnLine + irr::core::line2d +
+
+
+
+ isPointTotalInside + irr::core::aabbox3d +
+
+
+
+ isPressed + irr::gui::IGUIButton +
+
+
+
+ isPushButton + irr::gui::IGUIButton +
+
+ +
+
+ isReady + irr::gui::IGUIInOutFader +
+
+
+
+ isRectCollided + irr::core::rect +
+
+
+
+ ISREL3D_BACK + irr::core +
+
+
+
+ ISREL3D_CLIPPED + irr::core +
+
+
+
+ ISREL3D_FRONT + irr::core +
+
+
+
+ ISREL3D_PLANAR + irr::core +
+
+
+
+ ISREL3D_SPANNING + irr::core +
+
+
+
+ isRenderTarget + irr::video::ITexture +
+
+
+
+ isRenderTargetOnlyFormat + irr::video::IImage +
+
+
+
+ isRightPressed + irr::SEvent::SMouseInput +
+
+
+
+ isRightToLeft + irr::gui::IGUIStaticText +
+
+
+
+ isRoot + irr::gui::IGUITreeViewNode +
+
+
+
+ isScalingImage + irr::gui::IGUIButton +
+
+
+
+ isspace + irr::core +
+
+
+
+ isStatic + irr::scene::ISkinnedMesh +
+
+
+
+ isStopped + irr::ITimer +
+
+ + + +
+
+ isTextRestrainedInside + irr::gui::IGUIStaticText +
+
+
+
+ isTotalInsideBox + irr::core::triangle3d +
+
+
+
+ isTotalOutsideBox + irr::core::triangle3d +
+
+ +
+
+ isTrulyVisible + irr::scene::ISceneNode +
+
+
+
+ isupper + irr::core +
+
+ + + +
+
+ isWindowActive + irr::IrrlichtDevice +
+
+
+
+ isWindowFocused + irr::IrrlichtDevice +
+
+
+
+ isWindowMinimized + irr::IrrlichtDevice +
+
+ + +
+
+ Iterator + irr::core::list +
+
+
+
+ Iterator + irr::core::map +
+
+ +
+
+ ITerrainSceneNode + irr::scene::ITerrainSceneNode +
+
+
+
+ ITerrainSceneNode + irr::scene +
+
+ +
+
+ ITextSceneNode + irr::scene +
+
+
+
+ ITextSceneNode + irr::scene::ITextSceneNode +
+
+ +
+
+ ITexture + irr::video +
+
+
+
+ ITexture + irr::video::ITexture +
+
+
+ +
+
+
+ ITimer + irr +
+
+
+
+ ITimer.h +
+
+
+
+ ITriangleSelector + irr::scene +
+
+ +
+
+ IVertexBuffer + irr::scene +
+
+ +
+
+ IVertexManipulator + irr::scene +
+
+
+
+ IVideoDriver + irr::video +
+
+ +
+
+ IVideoModeList + irr::video +
+
+ +
+
+ IVolumeLightSceneNode + irr::scene +
+
+
+
+ IVolumeLightSceneNode + irr::scene::IVolumeLightSceneNode +
+
+ +
+
+ IWriteFile + irr::io +
+
+
+ +
+
+
+ IXMLBase + irr::io +
+
+
+
+ IXMLReader + irr::io +
+
+
+ +
+
+
+ IXMLReaderUTF8 + irr::io +
+
+
+
+ IXMLWriter + irr::io +
+
+
+ +
+
+
+ quake3 + irr::scene +
+
+
+
+ scene + irr +
+
+
+
+ video + irr +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_6a.html b/src/others/irrlicht-1.8.1/doc/html/search/all_6a.html new file mode 100644 index 0000000..ccd26d6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_6a.html @@ -0,0 +1,41 @@ + + + + + + + +
+
Loading...
+ +
+
+ JoystickEvent + irr::SEvent +
+
+
+
+ jump + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_6b.html b/src/others/irrlicht-1.8.1/doc/html/search/all_6b.html new file mode 100644 index 0000000..f94ffa9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_6b.html @@ -0,0 +1,967 @@ + + + + + + + +
+
Loading...
+
+
+ Key + irr::SEvent::SKeyInput +
+
+
+
+ KEY_ACCEPT + irr +
+
+
+
+ KEY_ADD + irr +
+
+
+
+ KEY_APPS + irr +
+
+
+
+ KEY_ATTN + irr +
+
+
+
+ KEY_BACK + irr +
+
+
+
+ KEY_CANCEL + irr +
+
+
+
+ KEY_CAPITAL + irr +
+
+
+
+ KEY_CLEAR + irr +
+
+
+
+ KEY_COMMA + irr +
+
+
+
+ KEY_CONTROL + irr +
+
+
+
+ KEY_CONVERT + irr +
+
+
+
+ KEY_CRSEL + irr +
+
+
+
+ KEY_DECIMAL + irr +
+
+
+
+ KEY_DELETE + irr +
+
+
+
+ KEY_DIVIDE + irr +
+
+
+
+ KEY_DOWN + irr +
+
+
+
+ KEY_END + irr +
+
+
+
+ KEY_EREOF + irr +
+
+
+
+ KEY_ESCAPE + irr +
+
+
+
+ KEY_EXECUT + irr +
+
+
+
+ KEY_EXSEL + irr +
+
+
+
+ KEY_F1 + irr +
+
+
+
+ KEY_F10 + irr +
+
+
+
+ KEY_F11 + irr +
+
+
+
+ KEY_F12 + irr +
+
+
+
+ KEY_F13 + irr +
+
+
+
+ KEY_F14 + irr +
+
+
+
+ KEY_F15 + irr +
+
+
+
+ KEY_F16 + irr +
+
+
+
+ KEY_F17 + irr +
+
+
+
+ KEY_F18 + irr +
+
+
+
+ KEY_F19 + irr +
+
+
+
+ KEY_F2 + irr +
+
+
+
+ KEY_F20 + irr +
+
+
+
+ KEY_F21 + irr +
+
+
+
+ KEY_F22 + irr +
+
+
+
+ KEY_F23 + irr +
+
+
+
+ KEY_F24 + irr +
+
+
+
+ KEY_F3 + irr +
+
+
+
+ KEY_F4 + irr +
+
+
+
+ KEY_F5 + irr +
+
+
+
+ KEY_F6 + irr +
+
+
+
+ KEY_F7 + irr +
+
+
+
+ KEY_F8 + irr +
+
+
+
+ KEY_F9 + irr +
+
+
+
+ KEY_FINAL + irr +
+
+
+
+ KEY_HANGUEL + irr +
+
+
+
+ KEY_HANGUL + irr +
+
+
+
+ KEY_HANJA + irr +
+
+
+
+ KEY_HELP + irr +
+
+
+
+ KEY_HOME + irr +
+
+
+
+ KEY_INSERT + irr +
+
+
+
+ KEY_JUNJA + irr +
+
+
+
+ KEY_KANA + irr +
+
+
+
+ KEY_KANJI + irr +
+
+
+
+ KEY_KEY_0 + irr +
+
+
+
+ KEY_KEY_1 + irr +
+
+
+
+ KEY_KEY_2 + irr +
+
+
+
+ KEY_KEY_3 + irr +
+
+
+
+ KEY_KEY_4 + irr +
+
+
+
+ KEY_KEY_5 + irr +
+
+
+
+ KEY_KEY_6 + irr +
+
+
+
+ KEY_KEY_7 + irr +
+
+
+
+ KEY_KEY_8 + irr +
+
+
+
+ KEY_KEY_9 + irr +
+
+
+
+ KEY_KEY_A + irr +
+
+
+
+ KEY_KEY_B + irr +
+
+
+
+ KEY_KEY_C + irr +
+
+
+ +
+
+
+ KEY_KEY_D + irr +
+
+
+
+ KEY_KEY_E + irr +
+
+
+
+ KEY_KEY_F + irr +
+
+
+
+ KEY_KEY_G + irr +
+
+
+
+ KEY_KEY_H + irr +
+
+
+
+ KEY_KEY_I + irr +
+
+
+
+ KEY_KEY_J + irr +
+
+
+
+ KEY_KEY_K + irr +
+
+
+
+ KEY_KEY_L + irr +
+
+
+
+ KEY_KEY_M + irr +
+
+
+
+ KEY_KEY_N + irr +
+
+
+
+ KEY_KEY_O + irr +
+
+
+
+ KEY_KEY_P + irr +
+
+
+
+ KEY_KEY_Q + irr +
+
+
+
+ KEY_KEY_R + irr +
+
+
+
+ KEY_KEY_S + irr +
+
+
+
+ KEY_KEY_T + irr +
+
+
+
+ KEY_KEY_U + irr +
+
+
+
+ KEY_KEY_V + irr +
+
+
+
+ KEY_KEY_W + irr +
+
+
+
+ KEY_KEY_X + irr +
+
+
+
+ KEY_KEY_Y + irr +
+
+
+
+ KEY_KEY_Z + irr +
+
+
+
+ KEY_LBUTTON + irr +
+
+
+
+ KEY_LCONTROL + irr +
+
+
+
+ KEY_LEFT + irr +
+
+
+
+ KEY_LMENU + irr +
+
+
+
+ KEY_LSHIFT + irr +
+
+
+
+ KEY_LWIN + irr +
+
+
+
+ KEY_MBUTTON + irr +
+
+
+
+ KEY_MENU + irr +
+
+
+
+ KEY_MINUS + irr +
+
+
+
+ KEY_MODECHANGE + irr +
+
+
+
+ KEY_MULTIPLY + irr +
+
+
+
+ KEY_NEXT + irr +
+
+
+
+ KEY_NONCONVERT + irr +
+
+
+
+ KEY_NUMLOCK + irr +
+
+
+
+ KEY_NUMPAD0 + irr +
+
+
+
+ KEY_NUMPAD1 + irr +
+
+
+
+ KEY_NUMPAD2 + irr +
+
+
+
+ KEY_NUMPAD3 + irr +
+
+
+
+ KEY_NUMPAD4 + irr +
+
+
+
+ KEY_NUMPAD5 + irr +
+
+
+
+ KEY_NUMPAD6 + irr +
+
+
+
+ KEY_NUMPAD7 + irr +
+
+
+
+ KEY_NUMPAD8 + irr +
+
+
+
+ KEY_NUMPAD9 + irr +
+
+
+
+ KEY_OEM_1 + irr +
+
+
+
+ KEY_OEM_102 + irr +
+
+
+
+ KEY_OEM_2 + irr +
+
+
+
+ KEY_OEM_3 + irr +
+
+
+
+ KEY_OEM_4 + irr +
+
+
+
+ KEY_OEM_5 + irr +
+
+
+
+ KEY_OEM_6 + irr +
+
+
+
+ KEY_OEM_7 + irr +
+
+
+
+ KEY_OEM_8 + irr +
+
+
+
+ KEY_OEM_AX + irr +
+
+
+
+ KEY_OEM_CLEAR + irr +
+
+
+
+ KEY_PA1 + irr +
+
+
+
+ KEY_PAUSE + irr +
+
+
+
+ KEY_PERIOD + irr +
+
+
+
+ KEY_PLAY + irr +
+
+
+
+ KEY_PLUS + irr +
+
+
+
+ KEY_PRINT + irr +
+
+
+
+ KEY_PRIOR + irr +
+
+
+
+ KEY_RBUTTON + irr +
+
+
+
+ KEY_RCONTROL + irr +
+
+
+
+ KEY_RETURN + irr +
+
+
+
+ KEY_RIGHT + irr +
+
+
+
+ KEY_RMENU + irr +
+
+
+
+ KEY_RSHIFT + irr +
+
+
+
+ KEY_RWIN + irr +
+
+
+
+ KEY_SCROLL + irr +
+
+
+
+ KEY_SELECT + irr +
+
+
+
+ KEY_SEPARATOR + irr +
+
+
+
+ KEY_SHIFT + irr +
+
+
+
+ KEY_SLEEP + irr +
+
+
+
+ KEY_SNAPSHOT + irr +
+
+
+
+ KEY_SPACE + irr +
+
+
+
+ KEY_SUBTRACT + irr +
+
+
+
+ KEY_TAB + irr +
+
+
+
+ KEY_UP + irr +
+
+
+
+ KEY_XBUTTON1 + irr +
+
+
+
+ KEY_XBUTTON2 + irr +
+
+
+
+ KEY_ZOOM + irr +
+
+
+
+ KeyCode + irr::SKeyMap +
+
+
+ +
+
+
+ KeyInput + irr::SEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/all_6c.html new file mode 100644 index 0000000..1bab9b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_6c.html @@ -0,0 +1,328 @@ + + + + + + + +
+
Loading...
+
+
+ lastChar + irr::core::string +
+
+
+
+ LastParentRect + irr::gui::IGUIElement +
+
+ +
+
+ Level + irr::SEvent::SLogEvent +
+
+
+
+ Lighting + irr::video::SMaterial +
+
+
+
+ LIGHTINGSPECULAR + irr::scene::quake3 +
+
+
+
+ LIGHTMAP + irr::scene::quake3 +
+
+
+
+ LightTypeNames + irr::video +
+
+
+
+ line2d + irr::core +
+
+ +
+
+ line2d.h +
+
+
+
+ line2df + irr::core +
+
+
+
+ line2di + irr::core +
+
+
+
+ line3d + irr::core +
+
+ +
+
+ line3d.h +
+
+
+
+ line3df + irr::core +
+
+
+
+ line3di + irr::core +
+
+
+
+ linear_reverse_search + irr::core::array +
+
+
+
+ linear_search + irr::core::array +
+
+ +
+
+ list + irr::core +
+
+
+
+ list< IGUIElement * > + irr::core +
+
+
+
+ list< ISceneNode * > + irr::core +
+
+
+ +
+ +
+
+ LMTS_TEXTURE_PATH + irr::scene +
+
+
+
+ loadAllShaders + irr::scene::quake3::Q3LevelLoadParameter +
+
+ +
+
+ loadHeightMap + irr::scene::ITerrainSceneNode +
+
+
+
+ loadHeightMapRAW + irr::scene::ITerrainSceneNode +
+
+
+
+ loadImage + irr::video::IImageLoader +
+
+ +
+
+ loadSkyShader + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ LocalAnimatedMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ LOCALE_DECIMAL_POINTS + irr::core +
+
+
+
+ LocalMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+ +
+
+ LODBias + irr::video::SMaterialLayer +
+
+ +
+
+ LogEvent + irr::SEvent +
+
+
+
+ LoggingLevel + irr::SIrrlichtCreationParameters +
+
+
+
+ looping + irr::scene::SMD3AnimationInfo +
+
+
+
+ lower_ignore_case + irr::core::string +
+
+
+
+ LowerRightCorner + irr::core::rect +
+
+
+
+ Luminance + irr::video::SColorHSL +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/all_6d.html new file mode 100644 index 0000000..5556762 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_6d.html @@ -0,0 +1,360 @@ + + + + + + + +
+
Loading...
+
+
+ MAKE_IRR_ID + irrTypes.h +
+
+
+
+ make_lower + irr::core::string +
+
+
+
+ make_upper + irr::core::string +
+
+ + + +
+
+ makeNormalMapTexture + irr::video::IVideoDriver +
+
+ + +
+
+ map + irr::core +
+
+
+
+ map< KeyType, ValueType > + irr::core::map::AccessClass +
+
+ + + +
+
+ MappingHintIndex + irr::scene::SSharedMeshBuffer +
+
+
+
+ MappingHintVertex + irr::scene::SSharedMeshBuffer +
+
+
+
+ masterfunc0 + irr::scene::quake3::SModifierFunction +
+
+
+
+ masterfunc1 + irr::scene::quake3::SModifierFunction +
+
+ +
+
+ MATERIAL_MAX_TEXTURES + irr::video +
+
+
+
+ MaterialType + irr::video::SMaterial +
+
+
+
+ MaterialTypeParam + irr::video::SMaterial +
+
+
+
+ MaterialTypeParam2 + irr::video::SMaterial +
+
+
+
+ matrix4 + irr::core +
+
+
+
+ matrix4.h +
+
+ +
+
+ MaxEdge + irr::core::aabbox3d +
+
+
+
+ maximizeWindow + irr::IrrlichtDevice +
+
+
+
+ MaxSize + irr::gui::IGUIElement +
+
+
+
+ MD3Header + irr::scene::SMD3Mesh +
+
+
+
+ mergeShaderBuffer + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ MeshBuffers + irr::scene::SMesh +
+
+
+
+ Meshes + irr::scene::SAnimatedMesh +
+
+
+
+ MeshHeader + irr::scene::SMD3MeshBuffer +
+
+
+
+ meshID + irr::scene::SMD3MeshHeader +
+
+
+
+ meshName + irr::scene::SMD3MeshHeader +
+
+ +
+
+ MinEdge + irr::core::aabbox3d +
+
+
+
+ minimizeWindow + irr::IrrlichtDevice +
+
+
+
+ MinSize + irr::gui::IGUIElement +
+
+
+
+ Minute + irr::ITimer::RealTimeDate +
+
+
+
+ modulate + irr::scene::quake3::SBlendFunc +
+
+
+
+ Month + irr::ITimer::RealTimeDate +
+
+
+
+ MouseInput + irr::SEvent +
+
+ +
+
+ moveChildDown + irr::gui::IGUITreeViewNode +
+
+
+
+ moveChildUp + irr::gui::IGUITreeViewNode +
+
+
+
+ moveFileArchive + irr::io::IFileSystem +
+
+
+
+ multiplyWith1x4Matrix + irr::core::CMatrix4 +
+
+
+
+ MY3D_TEXTURE_PATH + irr::scene +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_6e.html b/src/others/irrlicht-1.8.1/doc/html/search/all_6e.html new file mode 100644 index 0000000..e93d727 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_6e.html @@ -0,0 +1,173 @@ + + + + + + + +
+
Loading...
+ +
+
+ NamedPath + irr::video::ITexture +
+
+
+
+ nameForMaterial + irr::scene::IColladaMeshWriterNames +
+
+
+
+ nameForMesh + irr::scene::IColladaMeshWriterNames +
+
+
+
+ nameForNode + irr::scene::IColladaMeshWriterNames +
+
+
+
+ NoClip + irr::gui::IGUIElement +
+
+
+
+ Node + irr::core::map +
+
+
+
+ NOISE + irr::scene::quake3 +
+
+
+
+ Noiser + irr::scene::quake3 +
+
+ + +
+
+ NormalizeNormals + irr::video::SMaterial +
+
+
+
+ num + irr::scene::SMD3AnimationInfo +
+
+
+
+ NUMBER_OF_AXES + irr::SEvent::SJoystickEvent +
+
+
+
+ NUMBER_OF_BUTTONS + irr::SEvent::SJoystickEvent +
+
+ +
+
+ numMaxSkins + irr::scene::SMD3Header +
+
+
+
+ numMeshes + irr::scene::SMD3Header +
+
+
+
+ numShader + irr::scene::SMD3MeshHeader +
+
+
+
+ numTags + irr::scene::SMD3Header +
+
+
+
+ numTriangles + irr::scene::SMD3MeshHeader +
+
+
+
+ numVertices + irr::scene::SMD3MeshHeader +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_6f.html b/src/others/irrlicht-1.8.1/doc/html/search/all_6f.html new file mode 100644 index 0000000..d7b846a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_6f.html @@ -0,0 +1,632 @@ + + + + + + + +
+
Loading...
+
+
+ OBJ_LOADER_IGNORE_GROUPS + irr::scene +
+
+
+ +
+
+
+ OBJ_TEXTURE_PATH + irr::scene +
+
+
+
+ offset_end + irr::scene::SMD3MeshHeader +
+
+
+
+ offset_shaders + irr::scene::SMD3MeshHeader +
+
+
+
+ offset_st + irr::scene::SMD3MeshHeader +
+
+
+
+ offset_triangles + irr::scene::SMD3MeshHeader +
+
+ +
+
+ OnAnimationEnd + irr::scene::IAnimationEndCallBack +
+
+
+
+ onCollision + irr::scene::ICollisionCallback +
+
+
+
+ OnCreateNode + irr::scene::ISceneUserDataSerializer +
+
+ +
+
+ OnNodePostRender + irr::scene::ILightManager +
+
+
+
+ OnNodePreRender + irr::scene::ILightManager +
+
+ +
+
+ OnPreRender + irr::scene::ILightManager +
+
+
+
+ OnReadUserData + irr::scene::ISceneUserDataSerializer +
+
+
+
+ OnRegisterSceneNode + irr::scene::ISceneNode +
+
+
+
+ OnRender + irr::video::IMaterialRenderer +
+
+
+
+ OnRenderPassPostRender + irr::scene::ILightManager +
+
+
+
+ OnRenderPassPreRender + irr::scene::ILightManager +
+
+
+
+ OnResize + irr::video::IVideoDriver +
+
+
+
+ OnSetConstants + irr::video::IShaderConstantSetCallBack +
+
+ +
+
+ OnUnsetMaterial + irr::video::IMaterialRenderer +
+
+
+
+ OpenGLLinux + irr::video::SExposedVideoData +
+
+
+
+ OpenGLWin32 + irr::video::SExposedVideoData +
+
+
+
+ operator T + irr::io::xmlChar +
+
+
+
+ operator ValueType + irr::core::map::AccessClass +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ orderRows + irr::gui::IGUITable +
+
+
+
+ OuterCone + irr::video::SLight +
+
+
+
+ overrideLODDistance + irr::scene::ITerrainSceneNode +
+
+
+
+ stringc + irr::io::SNamedPath +
+
+
+
+ stringw + irr::io::SNamedPath +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_70.html b/src/others/irrlicht-1.8.1/doc/html/search/all_70.html new file mode 100644 index 0000000..43ce3a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_70.html @@ -0,0 +1,369 @@ + + + + + + + +
+
Loading...
+
+
+ PACK_STRUCT + irr::scene +
+
+
+
+ pack_textureBlendFunc + irr::video +
+
+
+
+ param0 + irr::scene::quake3::SBlendFunc +
+
+ +
+
+ ParentFirstIterator + irr::core::map +
+
+ +
+
+ ParentLastIterator + irr::core::map +
+
+ +
+
+ ParticleAffectorTypeNames + irr::scene +
+
+
+
+ ParticleEmitterTypeNames + irr::scene +
+
+
+
+ Password + irr::io::IFileArchive +
+
+
+
+ patchTesselation + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ path + irr::io +
+
+
+
+ path.h +
+
+
+
+ PathToName + irr::io::SNamedPath +
+
+
+
+ phase + irr::scene::quake3::SModifierFunction +
+
+
+
+ PI + irr::core +
+
+
+
+ PI64 + irr::core +
+
+
+
+ PIXEL_SHADER_TYPE_NAMES + irr::video +
+
+ +
+
+ plane3d + irr::core +
+
+
+
+ plane3d.h +
+
+
+
+ plane3d< f32 > + irr::core +
+
+
+
+ plane3df + irr::core +
+
+
+
+ plane3di + irr::core +
+
+
+
+ planes + irr::scene::SViewFrustum +
+
+
+
+ pointA + irr::core::triangle3d +
+
+
+
+ pointB + irr::core::triangle3d +
+
+
+
+ pointC + irr::core::triangle3d +
+
+
+
+ PointCloud + irr::video::SMaterial +
+
+ +
+
+ PolygonOffsetDirection + irr::video::SMaterial +
+
+
+
+ PolygonOffsetDirectionNames + irr::video +
+
+
+
+ PolygonOffsetFactor + irr::video::SMaterial +
+
+ + +
+
+ position2d + position2d.h +
+
+
+ +
+
+
+ position2df + irr::core +
+
+
+
+ position2di + irr::core +
+
+
+
+ positionHint + irr::scene::IBoneSceneNode +
+
+
+
+ PositionKeys + irr::scene::ISkinnedMesh::SJoint +
+
+ +
+
+ POV + irr::SEvent::SJoystickEvent +
+
+
+
+ POV_HAT_ABSENT + irr::SJoystickInfo +
+
+
+
+ POV_HAT_PRESENT + irr::SJoystickInfo +
+
+
+
+ POV_HAT_UNKNOWN + irr::SJoystickInfo +
+
+
+
+ PovHat + irr::SJoystickInfo +
+
+
+
+ PressedDown + irr::SEvent::SKeyInput +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_71.html b/src/others/irrlicht-1.8.1/doc/html/search/all_71.html new file mode 100644 index 0000000..1a01347 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_71.html @@ -0,0 +1,61 @@ + + + + + + + +
+
Loading...
+
+
+ Q3LevelLoadParameter + irr::scene::quake3 +
+
+
+
+ Q3LevelLoadParameter + irr::scene::quake3::Q3LevelLoadParameter +
+
+ +
+
+ quaternion + irr::core +
+
+
+ +
+
+
+ queryFeature + irr::video::IVideoDriver +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_72.html b/src/others/irrlicht-1.8.1/doc/html/search/all_72.html new file mode 100644 index 0000000..218b27c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_72.html @@ -0,0 +1,693 @@ + + + + + + + +
+
Loading...
+
+
+ r + irr::video::SColorf +
+
+
+
+ R5G6B5toA1R5G5B5 + irr::video +
+
+
+
+ R5G6B5toA8R8G8B8 + irr::video +
+
+
+
+ Radius + irr::video::SLight +
+
+ +
+
+ RADTODEG64 + irr::core +
+
+
+
+ rand + irr::IRandomizer +
+
+
+
+ randMax + irr::IRandomizer +
+
+ +
+
+ readGUIElement + irr::gui::IGUIEnvironment +
+
+
+
+ REALINLINE + irrMath.h +
+
+ +
+
+ RealTimeDate + irr::ITimer +
+
+
+
+ recalculateAbsolutePosition + irr::gui::IGUIElement +
+
+ +
+
+ recalculateD + irr::core::plane3d +
+
+ + + +
+
+ reciprocal_approxim + irr::core +
+
+
+
+ RECIPROCAL_PI + irr::core +
+
+
+
+ RECIPROCAL_PI64 + irr::core +
+
+ + +
+
+ rect + irr::core +
+
+
+
+ rect.h +
+
+
+
+ rect< f32 > + irr::core +
+
+
+
+ rect< s32 > + irr::core +
+
+
+
+ rectf + irr::core +
+
+
+
+ recti + irr::core +
+
+
+
+ rectNumber + irr::gui::SGUISpriteFrame +
+
+
+
+ regenerateMipMapLevels + irr::video::ITexture +
+
+
+
+ registerGUIElementFactory + irr::gui::IGUIEnvironment +
+
+
+
+ registerNodeForRendering + irr::scene::ISceneManager +
+
+
+
+ registerSceneNodeAnimatorFactory + irr::scene::ISceneManager +
+
+
+
+ registerSceneNodeFactory + irr::scene::ISceneManager +
+
+
+
+ RelativeRect + irr::gui::IGUIElement +
+
+
+
+ RelativeRotation + irr::scene::ISceneNode +
+
+
+
+ RelativeScale + irr::scene::ISceneNode +
+
+
+
+ RelativeTranslation + irr::scene::ISceneNode +
+
+ +
+
+ removeAll + irr::scene::ISceneNode +
+
+
+
+ removeAllAffectors + irr::scene::IParticleSystemSceneNode +
+
+
+
+ removeAllHardwareBuffers + irr::video::IVideoDriver +
+
+
+
+ removeAllItems + irr::gui::IGUIContextMenu +
+
+
+
+ removeAllOcclusionQueries + irr::video::IVideoDriver +
+
+
+
+ removeAllTextures + irr::video::IVideoDriver +
+
+
+
+ removeAllTriangleSelectors + irr::scene::IMetaTriangleSelector +
+
+
+
+ removeAnimator + irr::scene::ISceneNode +
+
+
+
+ removeAnimators + irr::scene::ISceneNode +
+
+
+
+ removeChars + irr::core::string +
+
+ +
+
+ removeColumn + irr::gui::IGUITable +
+
+ +
+
+ removeFocus + irr::gui::IGUIEnvironment +
+
+
+
+ removeFont + irr::gui::IGUIEnvironment +
+
+
+
+ removeHardwareBuffer + irr::video::IVideoDriver +
+
+ +
+
+ removeMesh + irr::scene::IMeshCache +
+
+
+
+ removeOcclusionQuery + irr::video::IVideoDriver +
+
+
+
+ removeRow + irr::gui::IGUITable +
+
+
+
+ removeTab + irr::gui::IGUITabControl +
+
+
+
+ removeTexture + irr::video::IVideoDriver +
+
+
+
+ removeTriangleSelector + irr::scene::IMetaTriangleSelector +
+
+ +
+
+ renameTexture + irr::video::IVideoDriver +
+
+ +
+
+ RenderTexture + irr::video::IRenderTarget +
+
+ + +
+
+ reserve + irr::core::string +
+
+ +
+
+ restoreWindow + irr::IrrlichtDevice +
+
+
+
+ RGB16 + irr::video +
+
+
+
+ RGB16from16 + irr::video +
+
+
+
+ RGBA16 + irr::video +
+
+ +
+
+ ROTATE + irr::scene::quake3 +
+
+
+
+ rotateBy + irr::core::vector2d +
+
+ +
+
+ rotateXYBy + irr::core::vector3d +
+
+
+
+ rotateXZBy + irr::core::vector3d +
+
+
+
+ rotateYZBy + irr::core::vector3d +
+
+ +
+
+ rotationFromTo + irr::core::quaternion +
+
+
+
+ rotationHint + irr::scene::IBoneSceneNode +
+
+
+
+ RotationKeys + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ rotationToDirection + irr::core::vector3d +
+
+
+
+ round32 + irr::core +
+
+
+
+ round_ + irr::core +
+
+
+
+ ROUNDING_ERROR_f32 + irr::core +
+
+
+
+ ROUNDING_ERROR_f64 + irr::core +
+
+
+
+ ROUNDING_ERROR_S32 + irr::core +
+
+
+
+ ROUNDING_ERROR_S64 + irr::core +
+
+
+
+ run + irr::IrrlichtDevice +
+
+
+
+ runAllOcclusionQueries + irr::video::IVideoDriver +
+
+
+
+ runOcclusionQuery + irr::video::IVideoDriver +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_73.html b/src/others/irrlicht-1.8.1/doc/html/search/all_73.html new file mode 100644 index 0000000..8b519e9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_73.html @@ -0,0 +1,3423 @@ + + + + + + + +
+
Loading...
+
+
+ s + irr::core::inttofloat +
+
+
+
+ s16 + irr +
+
+
+
+ s32 + irr +
+
+
+
+ s32_clamp + irr::core +
+
+
+
+ s32_max + irr::core +
+
+
+
+ s32_min + irr::core +
+
+
+
+ S3DVertex + irr::video +
+
+ +
+ +
+
+
+ S3DVertex2TCoords + irr::video +
+
+ + +
+
+ S3DVertexTangents + irr::video +
+
+
+
+ s64 + irr +
+
+
+
+ s8 + irr +
+
+
+
+ SAnimatedMesh + irr::scene +
+
+
+
+ SAnimatedMesh + irr::scene::SAnimatedMesh +
+
+ +
+ +
+
+
+ SAttributeReadWriteOptions + irr::io::SAttributeReadWriteOptions +
+
+
+
+ Saturation + irr::video::SColorHSL +
+
+ + +
+
+ SAWTOOTH + irr::scene::quake3 +
+
+
+
+ SAWTOOTH_INVERSE + irr::scene::quake3 +
+
+
+
+ SBlendFunc + irr::scene::quake3 +
+
+
+
+ SBlendFunc + irr::scene::quake3::SBlendFunc +
+
+
+
+ sBuiltInMaterialTypeNames + irr::video +
+
+
+
+ sBuiltInVertexTypeNames + irr::video +
+
+ +
+
+ scaleHint + irr::scene::IBoneSceneNode +
+
+
+
+ ScaleKeys + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ scaleMesh + irr::scene::IMeshManipulator +
+
+
+
+ ScaleRect + irr::gui::IGUIElement +
+
+ +
+
+ scaleTexture + irr::scene::ITerrainSceneNode +
+
+
+
+ SceneManager + irr::scene::ISceneNode +
+
+ + +
+
+ SColor + irr::video +
+
+
+
+ SColor.h +
+
+
+
+ SColorf + irr::video +
+
+ +
+
+ SColorHSL + irr::video +
+
+
+
+ SColorHSL + irr::video::SColorHSL +
+
+
+
+ scriptDir + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ SCROLL + irr::scene::quake3 +
+
+
+
+ SCursorSprite + irr::gui +
+
+ +
+
+ SDK_version_do_not_use + irr::SIrrlichtCreationParameters +
+
+
+
+ Second + irr::ITimer::RealTimeDate +
+
+ +
+
+ sendToBack + irr::gui::IGUIElement +
+
+ + +
+
+ set_free_when_destroyed + irr::core::array +
+
+
+
+ set_pointer + irr::core::array +
+
+
+
+ set_sorted + irr::core::array +
+
+ +
+
+ setActiveCamera + irr::scene::ISceneManager +
+
+
+
+ setActiveColumn + irr::gui::IGUITable +
+
+
+
+ setActiveIcon + irr::gui::ICursorControl +
+
+ +
+
+ setAffectX + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAffectY + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAffectZ + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAlignment + irr::gui::IGUIElement +
+
+
+
+ setAllocStrategy + irr::core::array +
+
+
+
+ setAllowZWriteOnTransparent + irr::video::IVideoDriver +
+
+
+
+ setAlpha + irr::video::SColor +
+
+ +
+
+ setAnimatedMeshSceneNode + irr::scene::IParticleAnimatedMeshSceneNodeEmitter +
+
+
+
+ setAnimateTarget + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setAnimationEndCallback + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setAnimationMode + irr::scene::IBoneSceneNode +
+
+ +
+
+ setAspectRatio + irr::scene::ICameraSceneNode +
+
+
+
+ setAttract + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAttribute +
+ irr::io::IAttributes::setAttribute(const c8 *attributeName, s32 value)=0 + irr::io::IAttributes::setAttribute(s32 index, s32 value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, f32 value)=0 + irr::io::IAttributes::setAttribute(s32 index, f32 value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const c8 *value)=0 + irr::io::IAttributes::setAttribute(s32 index, const c8 *value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const wchar_t *value)=0 + irr::io::IAttributes::setAttribute(s32 index, const wchar_t *value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, void *data, s32 dataSizeInBytes)=0 + irr::io::IAttributes::setAttribute(s32 index, void *data, s32 dataSizeInBytes)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const core::array< core::stringw > &value)=0 + irr::io::IAttributes::setAttribute(s32 index, const core::array< core::stringw > &value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, bool value)=0 + irr::io::IAttributes::setAttribute(s32 index, bool value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const c8 *enumValue, const c8 *const *enumerationLiterals)=0 + irr::io::IAttributes::setAttribute(s32 index, const c8 *enumValue, const c8 *const *enumerationLiterals)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, video::SColor color)=0 + irr::io::IAttributes::setAttribute(s32 index, video::SColor color)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, video::SColorf color)=0 + irr::io::IAttributes::setAttribute(s32 index, video::SColorf color)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::vector3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::vector3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::vector2df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::vector2df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::position2di v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::position2di v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::rect< s32 > v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::rect< s32 > v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::dimension2d< u32 > v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::dimension2d< u32 > v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const core::matrix4 &v)=0 + irr::io::IAttributes::setAttribute(s32 index, const core::matrix4 &v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::quaternion v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::quaternion v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::aabbox3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::aabbox3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::plane3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::plane3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::triangle3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::triangle3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::line2df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::line2df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::line3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::line3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, video::ITexture *texture, const io::path &filename="")=0 + irr::io::IAttributes::setAttribute(s32 index, video::ITexture *texture, const io::path &filename="")=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, void *userPointer)=0 + irr::io::IAttributes::setAttribute(s32 index, void *userPointer)=0 +
+
+
+
+
+ setAutomaticCulling + irr::scene::ISceneNode +
+
+
+
+ setAutoScroll + irr::gui::IGUIEditBox +
+
+
+
+ setAutoScrollEnabled + irr::gui::IGUIListBox +
+
+ +
+
+ setBasicRenderStates + irr::video::IMaterialRendererServices +
+
+
+
+ setbit_cond + irr::core +
+
+
+
+ setBlue + irr::video::SColor +
+
+ +
+
+ setBox + irr::scene::IParticleBoxEmitter +
+
+
+
+ setbyproduct + irr::core::CMatrix4 +
+
+
+
+ setbyproduct_nocheck + irr::core::CMatrix4 +
+
+
+
+ setCameraMovementDelta + irr::scene::ITerrainSceneNode +
+
+
+
+ setCameraRotationDelta + irr::scene::ITerrainSceneNode +
+
+
+
+ setCellColor + irr::gui::IGUITable +
+
+
+
+ setCellData + irr::gui::IGUITable +
+
+ + +
+
+ setChecked + irr::gui::IGUICheckBox +
+
+
+
+ setClipPlane + irr::video::IVideoDriver +
+
+
+
+ setCloseHandling + irr::gui::IGUIContextMenu +
+
+
+
+ setCollisionCallback + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ +
+
+ setColorComponentValue + irr::video::SColorf +
+
+
+
+ setColumnOrdering + irr::gui::IGUITable +
+
+
+
+ setColumnWidth + irr::gui::IGUITable +
+
+
+
+ setCurrentFrame + irr::scene::IAnimatedMeshSceneNode +
+
+ +
+
+ setData2 + irr::gui::IGUITreeViewNode +
+
+
+
+ setDebugDataVisible + irr::scene::ISceneNode +
+
+
+
+ setDebugName + irr::IReferenceCounted +
+
+
+
+ setDecimalPlaces + irr::gui::IGUISpinBox +
+
+
+
+ setDefaultNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ setDefaultProperties + irr::scene::IColladaMeshWriter +
+
+
+
+ setDefaultText + irr::gui::IGUISkin +
+
+
+
+ setDefinitelyIdentityMatrix + irr::core::CMatrix4 +
+
+
+
+ setDirection + irr::scene::IParticleEmitter +
+
+ +
+
+ setDistance + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+
+
+ setDraggable + irr::gui::IGUIWindow +
+
+ + +
+
+ setDrawFlags + irr::gui::IGUITable +
+
+
+
+ setDrawTitlebar + irr::gui::IGUIWindow +
+
+
+
+ setDynamicSelectorUpdate + irr::scene::ITerrainSceneNode +
+
+
+
+ setEllipsoidRadius + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setEllipsoidTranslation + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setEmitter + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ setEventParent + irr::gui::IGUIContextMenu +
+
+
+
+ setEventReceiver + irr::IrrlichtDevice +
+
+ +
+
+ setExpanded + irr::gui::IGUITreeViewNode +
+
+
+
+ setExportSMaterialsOnlyOnce + irr::scene::IColladaMeshWriter +
+
+
+
+ setFadeOutTime + irr::scene::IParticleFadeOutAffector +
+
+
+
+ setFarValue + irr::scene::ICameraSceneNode +
+
+
+
+ setFileListSystem + irr::io::IFileSystem +
+
+
+
+ setFlag + irr::video::SMaterial +
+
+
+
+ setFocus + irr::gui::IGUIEnvironment +
+
+
+
+ setFog + irr::video::IVideoDriver +
+
+
+
+ setFont + irr::gui::IGUISkin +
+
+
+
+ setFootColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setFOV + irr::scene::ICameraSceneNode +
+
+
+
+ setFrameLoop + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setFrom + irr::scene::SViewFrustum +
+
+
+
+ setGammaRamp + irr::IrrlichtDevice +
+
+
+
+ setGeometryWriting + irr::scene::IColladaMeshWriter +
+
+ +
+
+ setGreen + irr::video::SColor +
+
+ +
+
+ setHardwareSkinning + irr::scene::ISkinnedMesh +
+
+ +
+
+ setIconFont + irr::gui::IGUITreeView +
+
+ + +
+
+ setImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ setImageLeftOfIcon + irr::gui::IGUITreeView +
+
+
+
+ setImageList + irr::gui::IGUITreeView +
+
+ +
+
+ setInputReceiverEnabled + irr::scene::ICameraSceneNode +
+
+
+
+ setInputReceivingSceneManager + irr::IrrlichtDevice +
+
+
+
+ setInterpolationMode + irr::scene::ISkinnedMesh +
+
+
+
+ setInterpolationShift + irr::scene::IAnimatedMeshMD3 +
+
+
+
+ setInverseRotationDegrees + irr::core::CMatrix4 +
+
+
+
+ setInverseRotationRadians + irr::core::CMatrix4 +
+
+
+
+ setInverseTranslation + irr::core::CMatrix4 +
+
+
+
+ setInvertMouse + irr::scene::ISceneNodeAnimatorCameraFPS +
+
+
+
+ setInvisibleCharacters + irr::gui::IGUIFont +
+
+
+
+ setIsDebugObject + irr::scene::ISceneNode +
+
+
+
+ setIsPushButton + irr::gui::IGUIButton +
+
+
+
+ setItem + irr::gui::IGUIListBox +
+
+
+
+ setItemAutoChecking + irr::gui::IGUIContextMenu +
+
+
+
+ setItemChecked + irr::gui::IGUIContextMenu +
+
+
+
+ setItemCommandId + irr::gui::IGUIContextMenu +
+
+
+
+ setItemEnabled + irr::gui::IGUIContextMenu +
+
+
+
+ setItemHeight + irr::gui::IGUIListBox +
+
+ +
+
+ setItemText + irr::gui::IGUIContextMenu +
+
+
+
+ setJointMode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setKerningHeight + irr::gui::IGUIFont +
+
+
+
+ setKerningWidth + irr::gui::IGUIFont +
+
+ +
+
+ setLargeStep + irr::gui::IGUIScrollBar +
+
+ +
+
+ setLightData + irr::scene::ILightSceneNode +
+
+
+
+ setLightManager + irr::scene::ISceneManager +
+
+
+
+ setLightType + irr::scene::ILightSceneNode +
+
+ +
+
+ setLinesVisible + irr::gui::IGUITreeView +
+
+
+
+ setLODOfPatch + irr::scene::ITerrainSceneNode +
+
+
+
+ setLogLevel + irr::ILogger +
+
+
+
+ setLoopMode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setM + irr::core::CMatrix4 +
+
+ + +
+
+ setMaterialRendererName + irr::video::IVideoDriver +
+
+
+
+ setMaterialTexture + irr::scene::ISceneNode +
+
+
+
+ setMaterialType + irr::scene::ISceneNode +
+
+ +
+
+ setMaxAngleDegrees + irr::scene::IParticleEmitter +
+
+
+
+ setMaxLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ setMaxParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ setMaxSelectionRows + irr::gui::IGUIComboBox +
+
+
+
+ setMaxSize + irr::gui::IGUIElement +
+
+
+
+ setMaxStartColor + irr::scene::IParticleEmitter +
+
+
+
+ setMaxStartSize + irr::scene::IParticleEmitter +
+
+ + + +
+
+ setMin + irr::gui::IGUIScrollBar +
+
+
+
+ setMinHardwareBufferVertexCount + irr::video::IVideoDriver +
+
+
+
+ setMinLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ setMinParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ setMinSize + irr::gui::IGUIElement +
+
+
+
+ setMinStartColor + irr::scene::IParticleEmitter +
+
+
+
+ setMinStartSize + irr::scene::IParticleEmitter +
+
+ +
+
+ setMultiLine + irr::gui::IGUIEditBox +
+
+ +
+
+ setNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ setNearValue + irr::scene::ICameraSceneNode +
+
+
+
+ setNormal + irr::scene::IParticleCylinderEmitter +
+
+ +
+
+ setNotClipped + irr::gui::IGUIElement +
+
+
+
+ setOutlineOnly + irr::scene::IParticleCylinderEmitter +
+
+ + +
+
+ setParent + irr::scene::ISceneNode +
+
+
+
+ setParticlesAreGlobal + irr::scene::IParticleSystemSceneNode +
+
+
+
+ setParticleSize + irr::scene::IParticleSystemSceneNode +
+
+
+
+ setPasswordBox + irr::gui::IGUIEditBox +
+
+
+
+ setPath + irr::io::SNamedPath +
+
+
+
+ setPivotPoint + irr::scene::IParticleRotationAffector +
+
+
+
+ setPixel + irr::video::IImage +
+
+ + +
+
+ setPlatformBehavior + irr::gui::ICursorControl +
+
+
+
+ setPoint + irr::scene::IParticleAttractionAffector +
+
+
+
+ setPos + irr::gui::IGUIScrollBar +
+
+ +
+
+ setPressed + irr::gui::IGUIButton +
+
+ +
+
+ setProjectionMatrix + irr::scene::ICameraSceneNode +
+
+
+
+ setProperties + irr::scene::IColladaMeshWriter +
+
+ +
+
+ setRandomizer + irr::IrrlichtDevice +
+
+
+
+ setRange + irr::gui::IGUISpinBox +
+
+ +
+
+ setRed + irr::video::SColor +
+
+
+
+ setReferenceRect + irr::gui::ICursorControl +
+
+ +
+
+ setRelativePositionProportional + irr::gui::IGUIElement +
+
+
+
+ setRenderFromIdentity + irr::scene::IAnimatedMeshSceneNode +
+
+ +
+
+ setResizable + irr::IrrlichtDevice +
+
+
+
+ setResizableColumns + irr::gui::IGUITable +
+
+
+
+ setRightToLeft + irr::gui::IGUIStaticText +
+
+
+
+ setRingThickness + irr::scene::IParticleRingEmitter +
+
+ + +
+
+ setRotationAxisRadians + irr::core::CMatrix4 +
+
+
+
+ setRotationCenter + irr::core::CMatrix4 +
+
+
+
+ setRotationDegrees + irr::core::CMatrix4 +
+
+
+
+ setRotationRadians + irr::core::CMatrix4 +
+
+ + +
+
+ setSceneManager + irr::scene::ISceneNode +
+
+ +
+
+ setSelectedImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ setShadowColor + irr::scene::ISceneManager +
+
+
+
+ setShadowMesh + irr::scene::IShadowVolumeSceneNode +
+
+ +
+
+ setSkin + irr::gui::IGUIEnvironment +
+
+
+
+ setSkinningSpace + irr::scene::IBoneSceneNode +
+
+
+
+ setSmallStep + irr::gui::IGUIScrollBar +
+
+ +
+
+ setSprite + irr::gui::IGUIButton +
+
+ +
+
+ setStepSize + irr::gui::IGUISpinBox +
+
+
+
+ setSubDivideU + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setSubDivideV + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setSubElement + irr::gui::IGUIElement +
+
+
+
+ setTabExtraWidth + irr::gui::IGUITabControl +
+
+
+
+ setTabGroup + irr::gui::IGUIElement +
+
+
+
+ setTabHeight + irr::gui::IGUITabControl +
+
+
+
+ setTabMaxWidth + irr::gui::IGUITabControl +
+
+
+
+ setTabOrder + irr::gui::IGUIElement +
+
+
+
+ setTabStop + irr::gui::IGUIElement +
+
+
+
+ setTabVerticalAlignment + irr::gui::IGUITabControl +
+
+
+
+ setTailColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setTarget + irr::scene::ICameraSceneNode +
+
+
+
+ setTargetColor + irr::scene::IParticleFadeOutAffector +
+
+
+
+ setTargetNode + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + + +
+
+ setTextRestrainedInside + irr::gui::IGUIStaticText +
+
+ +
+
+ setTextureCreationFlag + irr::video::IVideoDriver +
+
+ +
+
+ setTextureRotationCenter + irr::core::CMatrix4 +
+
+
+
+ setTextureScale + irr::core::CMatrix4 +
+
+
+
+ setTextureScaleCenter + irr::core::CMatrix4 +
+
+
+
+ setTextureTranslate + irr::core::CMatrix4 +
+
+
+
+ setTextureTranslateTransposed + irr::core::CMatrix4 +
+
+
+
+ setTime + irr::ITimer +
+
+
+
+ setTimeForceLost + irr::scene::IParticleGravityAffector +
+
+
+
+ setto + irr::scene::SMD3QuaternionTag +
+
+
+
+ setToolTipText + irr::gui::IGUIElement +
+
+
+
+ setTransform + irr::video::IVideoDriver +
+
+
+
+ setTransitionTime + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setTranslation + irr::core::CMatrix4 +
+
+
+
+ setTriangleSelector + irr::scene::ISceneNode +
+
+ +
+
+ setUpVector + irr::scene::ICameraSceneNode +
+
+ + +
+
+ setUserEventReceiver + irr::gui::IGUIEnvironment +
+
+ + + + + +
+
+ setVerticalMovement + irr::scene::ISceneNodeAnimatorCameraFPS +
+
+
+
+ setViewMatrixAffector + irr::scene::ICameraSceneNode +
+
+
+
+ setViewPort + irr::video::IVideoDriver +
+
+ +
+
+ setWindowCaption + irr::IrrlichtDevice +
+
+ +
+
+ setWorld + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setWriteDefaultScene + irr::scene::IColladaMeshWriter +
+
+
+
+ setWriteTextures + irr::scene::IColladaMeshWriter +
+
+
+
+ setZoomSpeed + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+
+
+ SEvent + irr +
+
+
+
+ SExposedVideoData + irr::video +
+
+ + +
+
+ SGUIEvent + irr::SEvent +
+
+
+
+ SGUISprite + irr::gui::SGUISprite +
+
+
+
+ SGUISprite + irr::gui +
+
+
+
+ SGUISpriteFrame + irr::gui +
+
+
+
+ Shader + irr::scene::SMD3MeshBuffer +
+
+ +
+
+ Shininess + irr::video::SMaterial +
+
+
+
+ sign + irr::core::FloatIntUnion32 +
+
+
+
+ SINUS + irr::scene::quake3 +
+
+ + + + +
+
+ SJoint + irr::scene::ISkinnedMesh +
+
+
+
+ SJoint + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ SJoystickEvent + irr::SEvent +
+
+
+
+ SJoystickInfo + irr +
+
+
+
+ SKeyInput + irr::SEvent +
+
+
+
+ SKeyMap + irr +
+
+ +
+
+ SKeyMap.h +
+
+
+
+ skinMesh + irr::scene::ISkinnedMesh +
+
+
+
+ sleep + irr::IrrlichtDevice +
+
+
+
+ slerp + irr::core::quaternion +
+
+
+
+ SLight + irr::video::SLight +
+
+
+
+ SLight + irr::video +
+
+
+
+ SLight.h +
+
+
+
+ SLogEvent + irr::SEvent +
+
+
+
+ SMaterial + irr::video +
+
+ +
+ +
+ +
+
+ SMaterialLayer + irr::video +
+
+ +
+
+ SMD3AnimationInfo + irr::scene +
+
+
+
+ SMD3Face + irr::scene +
+
+
+
+ SMD3Header + irr::scene +
+
+
+
+ SMD3Mesh + irr::scene::SMD3Mesh +
+
+
+
+ SMD3Mesh + irr::scene +
+
+
+
+ SMD3MeshBuffer + irr::scene +
+
+
+
+ SMD3MeshHeader + irr::scene +
+
+
+
+ SMD3QuaternionTag + irr::scene +
+
+ +
+
+ SMD3QuaternionTagList + irr::scene +
+
+ +
+
+ SMD3TexCoord + irr::scene +
+
+
+
+ SMD3Vertex + irr::scene +
+
+
+
+ SMesh + irr::scene +
+
+
+
+ SMesh + irr::scene::SMesh +
+
+
+
+ SMesh.h +
+
+
+
+ SMeshBuffer + irr::scene +
+
+
+ +
+
+
+ SMeshBufferLightMap + irr::scene +
+
+ +
+
+ SMeshBufferTangents + irr::scene +
+
+ +
+
+ SModifierFunction + irr::scene::quake3 +
+
+
+
+ SModifierFunction + irr::scene::quake3::SModifierFunction +
+
+
+
+ SMouseInput + irr::SEvent +
+
+
+
+ SNamedPath + irr::io +
+
+ + +
+
+ SOverrideMaterial + irr::video +
+
+
+
+ SOverrideMaterial + irr::video::SOverrideMaterial +
+
+
+
+ SParticle + irr::scene +
+
+
+ +
+ +
+
+ split + irr::core::string +
+
+
+
+ SPositionKey + irr::scene::ISkinnedMesh +
+
+
+
+ SpriteBank + irr::gui::SCursorSprite +
+
+
+
+ SpriteId + irr::gui::SCursorSprite +
+
+
+
+ SQUARE + irr::scene::quake3 +
+
+ +
+
+ SRotationKey + irr::scene::ISkinnedMesh +
+
+
+
+ SScaleKey + irr::scene::ISkinnedMesh +
+
+ +
+
+ SSharedMeshBuffer + irr::scene +
+
+ +
+
+ SSkinMeshBuffer + irr::scene::SSkinMeshBuffer +
+
+
+
+ SSkinMeshBuffer + irr::scene +
+
+ + +
+
+ startColor + irr::scene::SParticle +
+
+
+
+ startSize + irr::scene::SParticle +
+
+ +
+
+ startVector + irr::scene::SParticle +
+
+
+
+ Stencilbuffer + irr::SIrrlichtCreationParameters +
+
+
+
+ Stereobuffer + irr::SIrrlichtCreationParameters +
+
+
+
+ stop + irr::ITimer +
+
+
+
+ strength + irr::scene::ISkinnedMesh::SWeight +
+
+
+
+ STRETCH + irr::scene::quake3 +
+
+ + +
+
+ string + irr::core +
+
+
+
+ string< fschar_t > + irr::core +
+
+
+
+ stringc + irr::core +
+
+
+
+ stringw + irr::core +
+
+
+
+ strtof10 + irr::core +
+
+
+
+ strtol10 + irr::core +
+
+
+
+ strtoul10 + irr::core +
+
+
+
+ strtoul16 + irr::core +
+
+
+
+ strtoul8 + irr::core +
+
+
+
+ strtoul_prefix + irr::core +
+
+
+
+ subString + irr::core::string +
+
+
+
+ SUserEvent + irr::SEvent +
+
+
+
+ SVarGroup + irr::scene::quake3::SVarGroup +
+
+
+
+ SVarGroup + irr::scene::quake3 +
+
+
+
+ SVarGroupList + irr::scene::quake3::SVarGroupList +
+
+
+
+ SVarGroupList + irr::scene::quake3 +
+
+
+
+ SVariable + irr::scene::quake3 +
+
+
+
+ SVariable + irr::scene::quake3::SVariable +
+
+
+
+ SVertexColorBrightnessManipulator + irr::scene::SVertexColorBrightnessManipulator +
+
+
+ +
+
+
+ SVertexColorContrastBrightnessManipulator + irr::scene::SVertexColorContrastBrightnessManipulator +
+
+ +
+ +
+
+
+ SVertexColorContrastManipulator + irr::scene::SVertexColorContrastManipulator +
+
+ + + +
+
+ SVertexColorGammaManipulator + irr::scene::SVertexColorGammaManipulator +
+
+
+
+ SVertexColorGammaManipulator + irr::scene +
+
+ +
+
+ SVertexColorInterpolateLinearManipulator + irr::scene::SVertexColorInterpolateLinearManipulator +
+
+
+
+ SVertexColorInterpolateQuadraticManipulator + irr::scene::SVertexColorInterpolateQuadraticManipulator +
+
+ +
+ +
+
+
+ SVertexColorScaleManipulator + irr::scene::SVertexColorScaleManipulator +
+
+
+
+ SVertexColorScaleManipulator + irr::scene +
+
+
+
+ SVertexColorSetAlphaManipulator + irr::scene::SVertexColorSetAlphaManipulator +
+
+
+ +
+
+
+ SVertexColorSetManipulator + irr::scene +
+
+
+
+ SVertexColorSetManipulator + irr::scene::SVertexColorSetManipulator +
+
+
+
+ SVertexColorThresholdManipulator + irr::scene::SVertexColorThresholdManipulator +
+
+
+ +
+ + +
+
+ SVertexPositionScaleAlongNormalsManipulator + irr::scene::SVertexPositionScaleAlongNormalsManipulator +
+
+ +
+ +
+
+
+ SVertexPositionScaleManipulator + irr::scene::SVertexPositionScaleManipulator +
+
+ +
+
+ SVertexPositionTransformManipulator + irr::scene::SVertexPositionTransformManipulator +
+
+
+ +
+
+
+ SVertexTCoordsScaleManipulator + irr::scene::SVertexTCoordsScaleManipulator +
+
+ +
+
+ SViewFrustum + irr::scene +
+
+ + +
+
+ swapHeader + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ swapItems + irr::gui::IGUIListBox +
+
+
+
+ swapLump + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ swapRows + irr::gui::IGUITable +
+
+
+
+ SWeight + irr::scene::ISkinnedMesh +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_74.html b/src/others/irrlicht-1.8.1/doc/html/search/all_74.html new file mode 100644 index 0000000..e9248bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_74.html @@ -0,0 +1,365 @@ + + + + + + + +
+
Loading...
+
+
+ TabOrder + irr::gui::IGUIElement +
+
+
+
+ tagEnd + irr::scene::SMD3Header +
+
+
+
+ TagList + irr::scene::SMD3Mesh +
+
+
+
+ tagStart + irr::scene::SMD3Header +
+
+
+
+ Tangent + irr::video::S3DVertexTangents +
+
+
+
+ TargetType + irr::video::IRenderTarget +
+
+ +
+
+ TCMOD + irr::scene::quake3 +
+
+
+
+ TCoords + irr::video::S3DVertex +
+
+
+
+ TCoords2 + irr::video::S3DVertex2TCoords +
+
+
+
+ Tex + irr::scene::SMD3MeshBuffer +
+
+ + +
+
+ textureBlendFunc_hasAlpha + irr::video +
+
+
+
+ TextureLayer + irr::video::SMaterial +
+
+
+
+ textureNumber + irr::gui::SGUISpriteFrame +
+
+
+
+ TextureWrapU + irr::video::SMaterialLayer +
+
+
+
+ TextureWrapV + irr::video::SMaterialLayer +
+
+
+
+ Thickness + irr::video::SMaterial +
+
+
+
+ tick + irr::ITimer +
+
+
+
+ toA1R5G5B5 + irr::video::SColor +
+
+
+
+ toAngleAxis + irr::core::quaternion +
+
+
+
+ toEuler + irr::core::quaternion +
+
+
+
+ toNCName + irr::scene::IColladaMeshWriter +
+
+
+
+ ToolTipText + irr::gui::IGUIElement +
+
+
+
+ toOpenGLColor + irr::video::SColor +
+
+
+
+ toRGB + irr::video::SColorHSL +
+
+
+
+ toSColor + irr::video::SColorf +
+
+
+
+ tQ3EntityList + irr::scene::quake3 +
+
+ +
+
+ Transformation + irr::scene::SSkinMeshBuffer +
+
+
+
+ transformBox + irr::core::CMatrix4 +
+
+
+
+ transformBoxEx + irr::core::CMatrix4 +
+
+
+
+ transformMesh + irr::scene::IMeshManipulator +
+
+ +
+
+ transformVec3 + irr::core::CMatrix4 +
+
+ +
+
+ translateVect + irr::core::CMatrix4 +
+
+
+
+ TRIANGLE + irr::scene::quake3 +
+
+ +
+
+ triangle3d + irr::core +
+
+
+ +
+
+
+ triangle3df + irr::core +
+
+
+
+ triangle3di + irr::core +
+
+
+
+ TriangleSelector + irr::scene::ISceneNode +
+
+
+
+ TrilinearFilter + irr::video::SMaterialLayer +
+
+
+
+ trim + irr::core::string +
+
+
+
+ tStringList + irr::scene::quake3 +
+
+
+
+ tTexArray + irr::scene::quake3 +
+
+
+
+ TURBULENCE + irr::scene::quake3 +
+
+
+
+ turnLightOn + irr::video::IVideoDriver +
+
+
+
+ tut.txt +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_75.html b/src/others/irrlicht-1.8.1/doc/html/search/all_75.html new file mode 100644 index 0000000..922606f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_75.html @@ -0,0 +1,161 @@ + + + + + + + +
+
Loading...
+ +
+
+ u16 + irr +
+
+
+
+ u32 + irr +
+
+
+
+ u64 + irr +
+
+
+
+ u8 + irr +
+
+
+
+ UNKNOWN + irr::scene::quake3 +
+
+ +
+
+ unpack_textureBlendFunc + irr::video +
+
+ +
+
+ updateAbsolutePositionOfAllChildren + irr::scene::IBoneSceneNode +
+
+
+
+ updateAllOcclusionQueries + irr::video::IVideoDriver +
+
+
+
+ updateNormalsWhenAnimating + irr::scene::ISkinnedMesh +
+
+
+
+ updateOcclusionQuery + irr::video::IVideoDriver +
+
+
+
+ updateShadowVolumes + irr::scene::IShadowVolumeSceneNode +
+
+
+
+ UpperLeftCorner + irr::core::rect +
+
+
+
+ useAnimationFrom + irr::scene::ISkinnedMesh +
+
+
+
+ UseMipMaps + irr::video::SMaterial +
+
+
+
+ useNodeMaterial + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ UsePerformanceTimer + irr::SIrrlichtCreationParameters +
+
+
+
+ UserData1 + irr::SEvent::SUserEvent +
+
+
+
+ UserData2 + irr::SEvent::SUserEvent +
+
+
+
+ UserEvent + irr::SEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_76.html b/src/others/irrlicht-1.8.1/doc/html/search/all_76.html new file mode 100644 index 0000000..9c29afe --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_76.html @@ -0,0 +1,262 @@ + + + + + + + +
+
Loading...
+
+
+ v + irr::scene::SMD3TexCoord +
+
+
+
+ validate + irr::core::string +
+
+
+
+ VarGroup + irr::scene::quake3::IShader +
+
+
+
+ Variable + irr::scene::quake3::SVarGroup +
+
+
+
+ VariableGroup + irr::scene::quake3::SVarGroupList +
+
+
+
+ vector + irr::scene::SParticle +
+
+
+
+ vector2d + irr::core +
+
+ +
+ +
+
+
+ vector2d< f32 > + irr::core +
+
+
+
+ vector2df + irr::core +
+
+
+
+ vector2di + irr::core +
+
+
+
+ vector3d + irr::core +
+
+ +
+ +
+
+
+ vector3d< f32 > + irr::core +
+
+
+
+ vector3df + irr::core +
+
+
+
+ vector3di + irr::core +
+
+
+
+ verbose + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ Version + irr::scene::SMD3Header +
+
+
+
+ VERTEX + irr::scene::quake3 +
+
+
+
+ vertex_id + irr::scene::ISkinnedMesh::SWeight +
+
+
+
+ VERTEX_SHADER_TYPE_NAMES + irr::video +
+
+
+
+ vertexStart + irr::scene::SMD3MeshHeader +
+
+
+
+ VertexType + irr::scene::SSkinMeshBuffer +
+
+ +
+
+ Vertices_2TCoords + irr::scene::SSkinMeshBuffer +
+
+
+
+ Vertices_Standard + irr::scene::SSkinMeshBuffer +
+
+
+
+ Vertices_Tangents + irr::scene::SSkinMeshBuffer +
+
+
+
+ VF_BOTTOM_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_FAR_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_LEFT_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_NEAR_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_PLANE_COUNT + irr::scene::SViewFrustum +
+
+
+
+ VF_RIGHT_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_TOP_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VFPLANES + irr::scene::SViewFrustum +
+
+
+
+ Vsync + irr::SIrrlichtCreationParameters +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_77.html b/src/others/irrlicht-1.8.1/doc/html/search/all_77.html new file mode 100644 index 0000000..ae6f15c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_77.html @@ -0,0 +1,170 @@ + + + + + + + +
+
Loading...
+
+
+ W + irr::core::quaternion +
+
+ +
+
+ WAVE_MODIFIER_FUNCTION + irr::scene::quake3 +
+
+
+
+ Weekday + irr::ITimer::RealTimeDate +
+
+
+
+ Weights + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Wheel + irr::SEvent::SMouseInput +
+
+
+
+ Width + irr::core::dimension2d +
+
+
+
+ WindowId + irr::SIrrlichtCreationParameters +
+
+
+
+ WindowSize + irr::SIrrlichtCreationParameters +
+
+
+
+ Wireframe + irr::video::SMaterial +
+
+
+
+ WithAlphaChannel + irr::SIrrlichtCreationParameters +
+
+ +
+
+ writeClosingTag + irr::io::IXMLWriter +
+
+
+
+ writeComment + irr::io::IXMLWriter +
+
+ +
+
+ writeGUIElement + irr::gui::IGUIEnvironment +
+
+
+
+ writeImage + irr::video::IImageWriter +
+
+ +
+
+ writeLineBreak + irr::io::IXMLWriter +
+
+
+
+ writeMesh + irr::scene::IMeshWriter +
+
+
+
+ writeScene + irr::scene::IColladaMeshWriter +
+
+
+
+ writeText + irr::io::IXMLWriter +
+
+
+
+ writeXMLHeader + irr::io::IXMLWriter +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_78.html b/src/others/irrlicht-1.8.1/doc/html/search/all_78.html new file mode 100644 index 0000000..571874b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_78.html @@ -0,0 +1,76 @@ + + + + + + + +
+
Loading...
+ +
+
+ X11Context + irr::video::SExposedVideoData +
+
+
+
+ X11Display + irr::video::SExposedVideoData +
+
+
+
+ X11Window + irr::video::SExposedVideoData +
+
+
+
+ X8R8G8B8toA1R5G5B5 + irr::video +
+
+
+
+ xmlChar + irr::io +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_79.html b/src/others/irrlicht-1.8.1/doc/html/search/all_79.html new file mode 100644 index 0000000..ae65734 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_79.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+ +
+
+ Year + irr::ITimer::RealTimeDate +
+
+
+
+ Yearday + irr::ITimer::RealTimeDate +
+
+
+
+ yield + irr::IrrlichtDevice +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_7a.html b/src/others/irrlicht-1.8.1/doc/html/search/all_7a.html new file mode 100644 index 0000000..5d5c740 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_7a.html @@ -0,0 +1,48 @@ + + + + + + + +
+
Loading...
+ +
+
+ ZBuffer + irr::video::SMaterial +
+
+
+
+ ZBufferBits + irr::SIrrlichtCreationParameters +
+
+
+
+ ZWriteEnable + irr::video::SMaterial +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/all_7e.html b/src/others/irrlicht-1.8.1/doc/html/search/all_7e.html new file mode 100644 index 0000000..10f90c9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/all_7e.html @@ -0,0 +1,242 @@ + + + + + + + +
+
Loading...
+
+
+ ~array + irr::core::array +
+
+
+
+ ~CDynamicMeshBuffer + irr::scene::CDynamicMeshBuffer +
+
+
+
+ ~CIndexBuffer + irr::scene::CIndexBuffer +
+
+
+
+ ~CVertexBuffer + irr::scene::CVertexBuffer +
+
+
+
+ ~IAnimatedMeshSceneNode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ ~IColladaMeshWriter + irr::scene::IColladaMeshWriter +
+
+
+
+ ~IColladaMeshWriterNames + irr::scene::IColladaMeshWriterNames +
+
+
+
+ ~IColladaMeshWriterProperties + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ ~IEventReceiver + irr::IEventReceiver +
+
+
+
+ ~IFileReadCallBack + irr::io::IFileReadCallBack +
+
+
+
+ ~IGPUProgrammingServices + irr::video::IGPUProgrammingServices +
+
+
+
+ ~IGUIElement + irr::gui::IGUIElement +
+
+
+
+ ~IGUIImageList + irr::gui::IGUIImageList +
+
+
+
+ ~IIrrXMLReader + irr::io::IIrrXMLReader +
+
+
+
+ ~ILogger + irr::ILogger +
+
+
+
+ ~IMaterialRendererServices + irr::video::IMaterialRendererServices +
+
+
+
+ ~IMeshCache + irr::scene::IMeshCache +
+
+
+
+ ~IMeshLoader + irr::scene::IMeshLoader +
+
+
+
+ ~IMeshWriter + irr::scene::IMeshWriter +
+
+
+
+ ~IReferenceCounted + irr::IReferenceCounted +
+
+
+
+ ~irrAllocator + irr::core::irrAllocator +
+
+
+
+ ~ISceneNode + irr::scene::ISceneNode +
+
+
+
+ ~ISceneNodeAnimatorCollisionResponse + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ ~ISceneUserDataSerializer + irr::scene::ISceneUserDataSerializer +
+
+
+
+ ~IShader + irr::scene::quake3::IShader +
+
+
+
+ ~list + irr::core::list +
+
+
+
+ ~map + irr::core::map +
+
+
+
+ ~SAnimatedMesh + irr::scene::SAnimatedMesh +
+
+
+
+ ~SMaterialLayer + irr::video::SMaterialLayer +
+
+
+
+ ~SMD3Mesh + irr::scene::SMD3Mesh +
+
+
+
+ ~SMD3QuaternionTag + irr::scene::SMD3QuaternionTag +
+
+
+
+ ~SMD3QuaternionTagList + irr::scene::SMD3QuaternionTagList +
+
+
+
+ ~SMesh + irr::scene::SMesh +
+
+
+
+ ~string + irr::core::string +
+
+
+
+ ~SVarGroup + irr::scene::quake3::SVarGroup +
+
+
+
+ ~SVarGroupList + irr::scene::quake3::SVarGroupList +
+
+
+
+ ~SVariable + irr::scene::quake3::SVariable +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_61.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_61.html new file mode 100644 index 0000000..4b8f903 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_61.html @@ -0,0 +1,170 @@ + + + + + + + +
+
Loading...
+
+
+ aabbox3d + irr::core +
+
+
+
+ aabbox3d< f32 > + irr::core +
+
+
+
+ AccessClass + irr::core::map +
+
+
+
+ array + irr::core +
+
+
+
+ array< IMesh * > + irr::core +
+
+
+
+ array< IMeshBuffer * > + irr::core +
+
+
+
+ array< s32 > + irr::core +
+
+
+
+ array< SGUISpriteFrame > + irr::core +
+
+
+
+ array< SJoint * > + irr::core +
+
+
+
+ array< SMD3MeshBuffer * > + irr::core +
+
+
+
+ array< SMD3QuaternionTag > + irr::core +
+
+
+
+ array< SMD3TexCoord > + irr::core +
+
+
+
+ array< SMD3Vertex > + irr::core +
+
+
+
+ array< SPositionKey > + irr::core +
+
+
+
+ array< SRotationKey > + irr::core +
+
+
+
+ array< SScaleKey > + irr::core +
+
+
+
+ array< SVarGroup > + irr::core +
+
+
+
+ array< SVariable > + irr::core +
+
+
+
+ array< SWeight > + irr::core +
+
+
+
+ array< T > + irr::core +
+
+
+
+ array< u16 > + irr::core +
+
+
+
+ array< u32 > + irr::core +
+
+
+
+ array< video::S3DVertex > + irr::core +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_63.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_63.html new file mode 100644 index 0000000..640b996 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_63.html @@ -0,0 +1,62 @@ + + + + + + + +
+
Loading...
+
+
+ CDynamicMeshBuffer + irr::scene +
+
+
+
+ CIndexBuffer + irr::scene +
+
+
+
+ CMatrix4 + irr::core +
+
+
+
+ CMeshBuffer + irr::scene +
+
+
+
+ ConstIterator + irr::core::list +
+
+
+
+ ConstIterator + irr::core::map +
+
+
+
+ CVertexBuffer + irr::scene +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_64.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_64.html new file mode 100644 index 0000000..733fddd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_64.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ dimension2d + irr::core +
+
+
+
+ dimension2d< u32 > + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_66.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_66.html new file mode 100644 index 0000000..44a752d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_66.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ FloatIntUnion32 + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_69.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_69.html new file mode 100644 index 0000000..65d642d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_69.html @@ -0,0 +1,920 @@ + + + + + + + +
+
Loading...
+
+
+ IAnimatedMesh + irr::scene +
+
+
+
+ IAnimatedMeshMD2 + irr::scene +
+
+
+
+ IAnimatedMeshMD3 + irr::scene +
+
+
+
+ IAnimatedMeshSceneNode + irr::scene +
+
+
+
+ IAnimationEndCallBack + irr::scene +
+
+
+
+ IArchiveLoader + irr::io +
+
+
+ +
+
+
+ IAttributes + irr::io +
+
+
+
+ IBillboardSceneNode + irr::scene +
+
+
+
+ IBillboardTextSceneNode + irr::scene +
+
+
+
+ IBoneSceneNode + irr::scene +
+
+
+
+ ICameraSceneNode + irr::scene +
+
+
+
+ IColladaMeshWriter + irr::scene +
+
+
+
+ IColladaMeshWriterNames + irr::scene +
+
+
+
+ IColladaMeshWriterProperties + irr::scene +
+
+
+
+ ICollisionCallback + irr::scene +
+
+
+
+ ICursorControl + irr::gui +
+
+
+ +
+
+
+ IDynamicMeshBuffer + irr::scene +
+
+
+
+ IEventReceiver + irr +
+
+
+
+ IFileArchive + irr::io +
+
+
+
+ IFileList + irr::io +
+
+
+
+ IFileReadCallBack + irr::io +
+
+
+
+ IFileSystem + irr::io +
+
+
+
+ IGeometryCreator + irr::scene +
+
+
+
+ IGPUProgrammingServices + irr::video +
+
+
+
+ IGUIButton + irr::gui +
+
+
+
+ IGUICheckBox + irr::gui +
+
+
+
+ IGUIColorSelectDialog + irr::gui +
+
+
+
+ IGUIComboBox + irr::gui +
+
+
+
+ IGUIContextMenu + irr::gui +
+
+
+
+ IGUIEditBox + irr::gui +
+
+
+
+ IGUIElement + irr::gui +
+
+
+
+ IGUIElementFactory + irr::gui +
+
+
+
+ IGUIEnvironment + irr::gui +
+
+
+
+ IGUIFileOpenDialog + irr::gui +
+
+
+
+ IGUIFont + irr::gui +
+
+
+
+ IGUIFontBitmap + irr::gui +
+
+
+
+ IGUIImage + irr::gui +
+
+
+
+ IGUIImageList + irr::gui +
+
+
+
+ IGUIInOutFader + irr::gui +
+
+
+
+ IGUIListBox + irr::gui +
+
+
+
+ IGUIMeshViewer + irr::gui +
+
+
+
+ IGUIScrollBar + irr::gui +
+
+
+
+ IGUISkin + irr::gui +
+
+
+
+ IGUISpinBox + irr::gui +
+
+
+
+ IGUISpriteBank + irr::gui +
+
+
+
+ IGUIStaticText + irr::gui +
+
+
+
+ IGUITab + irr::gui +
+
+
+
+ IGUITabControl + irr::gui +
+
+
+
+ IGUITable + irr::gui +
+
+
+
+ IGUIToolBar + irr::gui +
+
+
+
+ IGUITreeView + irr::gui +
+
+
+
+ IGUITreeViewNode + irr::gui +
+
+
+
+ IGUIWindow + irr::gui +
+
+
+
+ IImage + irr::video +
+
+
+
+ IImageLoader + irr::video +
+
+
+
+ IImageWriter + irr::video +
+
+
+
+ IIndexBuffer + irr::scene +
+
+
+
+ IIrrXMLReader + irr::io +
+
+
+
+ ILightManager + irr::scene +
+
+
+
+ ILightSceneNode + irr::scene +
+
+
+
+ ILogger + irr +
+
+
+
+ IMaterialRenderer + irr::video +
+
+
+
+ IMaterialRendererServices + irr::video +
+
+
+
+ IMesh + irr::scene +
+
+
+
+ IMeshBuffer + irr::scene +
+
+
+
+ IMeshCache + irr::scene +
+
+
+
+ IMeshLoader + irr::scene +
+
+
+
+ IMeshManipulator + irr::scene +
+
+
+
+ IMeshSceneNode + irr::scene +
+
+
+
+ IMeshWriter + irr::scene +
+
+
+
+ IMetaTriangleSelector + irr::scene +
+
+
+
+ inttofloat + irr::core +
+
+
+
+ IOSOperator + irr +
+
+
+
+ IParticleAffector + irr::scene +
+
+ +
+
+ IParticleAttractionAffector + irr::scene +
+
+
+
+ IParticleBoxEmitter + irr::scene +
+
+
+
+ IParticleCylinderEmitter + irr::scene +
+
+
+
+ IParticleEmitter + irr::scene +
+
+
+
+ IParticleFadeOutAffector + irr::scene +
+
+
+
+ IParticleGravityAffector + irr::scene +
+
+
+
+ IParticleMeshEmitter + irr::scene +
+
+
+
+ IParticleRingEmitter + irr::scene +
+
+
+
+ IParticleRotationAffector + irr::scene +
+
+
+
+ IParticleSphereEmitter + irr::scene +
+
+
+
+ IParticleSystemSceneNode + irr::scene +
+
+
+
+ IQ3LevelMesh + irr::scene +
+
+
+
+ IRandomizer + irr +
+
+
+
+ IReadFile + irr::io +
+
+
+
+ IReferenceCounted + irr +
+
+
+
+ IRenderTarget + irr::video +
+
+
+
+ irrAllocator + irr::core +
+
+
+
+ irrAllocator< fschar_t > + irr::core +
+
+
+
+ irrAllocator< IMesh * > + irr::core +
+
+
+ +
+ +
+
+ irrAllocator< s32 > + irr::core +
+
+
+ +
+
+
+ irrAllocator< SJoint * > + irr::core +
+
+
+
+ irrAllocator< SKListNode > + irr::core +
+
+ + +
+ +
+
+
+ irrAllocator< SMD3Vertex > + irr::core +
+
+
+ +
+
+ +
+
+
+ irrAllocator< SScaleKey > + irr::core +
+
+
+
+ irrAllocator< SVarGroup > + irr::core +
+
+
+
+ irrAllocator< SVariable > + irr::core +
+
+
+
+ irrAllocator< SWeight > + irr::core +
+
+
+
+ irrAllocator< u16 > + irr::core +
+
+
+
+ irrAllocator< u32 > + irr::core +
+
+ + + +
+
+ irrAllocatorFast + irr::core +
+
+
+
+ IrrlichtDevice + irr +
+
+
+
+ ISceneCollisionManager + irr::scene +
+
+
+
+ ISceneLoader + irr::scene +
+
+
+
+ ISceneManager + irr::scene +
+
+
+
+ ISceneNode + irr::scene +
+
+
+
+ ISceneNodeAnimator + irr::scene +
+
+
+
+ ISceneNodeAnimatorCameraFPS + irr::scene +
+
+
+
+ ISceneNodeAnimatorCameraMaya + irr::scene +
+
+ +
+
+ ISceneNodeAnimatorFactory + irr::scene +
+
+
+
+ ISceneNodeFactory + irr::scene +
+
+
+
+ ISceneUserDataSerializer + irr::scene +
+
+
+
+ IShader + irr::scene::quake3 +
+
+
+
+ IShaderConstantSetCallBack + irr::video +
+
+
+
+ IShaderManager + irr::scene::quake3 +
+
+
+
+ IShadowVolumeSceneNode + irr::scene +
+
+
+
+ ISkinnedMesh + irr::scene +
+
+
+
+ Iterator + irr::core::list +
+
+
+
+ Iterator + irr::core::map +
+
+
+
+ ITerrainSceneNode + irr::scene +
+
+
+
+ ITextSceneNode + irr::scene +
+
+
+
+ ITexture + irr::video +
+
+
+
+ ITimer + irr +
+
+
+
+ ITriangleSelector + irr::scene +
+
+
+
+ IVertexBuffer + irr::scene +
+
+
+
+ IVertexManipulator + irr::scene +
+
+
+
+ IVideoDriver + irr::video +
+
+
+
+ IVideoModeList + irr::video +
+
+
+
+ IVolumeLightSceneNode + irr::scene +
+
+
+
+ IWriteFile + irr::io +
+
+
+
+ IXMLBase + irr::io +
+
+
+
+ IXMLWriter + irr::io +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_6c.html new file mode 100644 index 0000000..516b1a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_6c.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ line2d + irr::core +
+
+
+
+ line3d + irr::core +
+
+
+
+ list + irr::core +
+
+
+
+ list< IGUIElement * > + irr::core +
+
+
+
+ list< ISceneNode * > + irr::core +
+
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_6d.html new file mode 100644 index 0000000..eb2b7a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_6d.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ map + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_6e.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_6e.html new file mode 100644 index 0000000..797d4d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_6e.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Noiser + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_70.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_70.html new file mode 100644 index 0000000..840fc9d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_70.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ ParentFirstIterator + irr::core::map +
+
+
+
+ ParentLastIterator + irr::core::map +
+
+
+
+ plane3d + irr::core +
+
+
+
+ plane3d< f32 > + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_71.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_71.html new file mode 100644 index 0000000..374ef0a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_71.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ Q3LevelLoadParameter + irr::scene::quake3 +
+
+
+
+ quaternion + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_72.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_72.html new file mode 100644 index 0000000..b15b7a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_72.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ RealTimeDate + irr::ITimer +
+
+
+
+ rect + irr::core +
+
+
+
+ rect< f32 > + irr::core +
+
+
+
+ rect< s32 > + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_73.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_73.html new file mode 100644 index 0000000..c62594e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_73.html @@ -0,0 +1,452 @@ + + + + + + + +
+
Loading...
+
+
+ S3DVertex + irr::video +
+
+
+
+ S3DVertex2TCoords + irr::video +
+
+
+
+ S3DVertexTangents + irr::video +
+
+
+
+ SAnimatedMesh + irr::scene +
+
+
+ +
+
+
+ SBlendFunc + irr::scene::quake3 +
+
+
+
+ SColor + irr::video +
+
+
+
+ SColorf + irr::video +
+
+
+
+ SColorHSL + irr::video +
+
+
+
+ SCursorSprite + irr::gui +
+
+
+
+ SEvent + irr +
+
+
+
+ SExposedVideoData + irr::video +
+
+
+
+ SGUIEvent + irr::SEvent +
+
+
+
+ SGUISprite + irr::gui +
+
+
+
+ SGUISpriteFrame + irr::gui +
+
+ +
+
+ SJoint + irr::scene::ISkinnedMesh +
+
+
+
+ SJoystickEvent + irr::SEvent +
+
+
+
+ SJoystickInfo + irr +
+
+
+
+ SKeyInput + irr::SEvent +
+
+
+
+ SKeyMap + irr +
+
+
+
+ SLight + irr::video +
+
+
+
+ SLogEvent + irr::SEvent +
+
+
+
+ SMaterial + irr::video +
+
+
+
+ SMaterialLayer + irr::video +
+
+
+
+ SMD3AnimationInfo + irr::scene +
+
+
+
+ SMD3Face + irr::scene +
+
+
+
+ SMD3Header + irr::scene +
+
+
+
+ SMD3Mesh + irr::scene +
+
+
+
+ SMD3MeshBuffer + irr::scene +
+
+
+
+ SMD3MeshHeader + irr::scene +
+
+
+
+ SMD3QuaternionTag + irr::scene +
+
+
+
+ SMD3QuaternionTagList + irr::scene +
+
+
+
+ SMD3TexCoord + irr::scene +
+
+
+
+ SMD3Vertex + irr::scene +
+
+
+
+ SMesh + irr::scene +
+
+
+
+ SModifierFunction + irr::scene::quake3 +
+
+
+
+ SMouseInput + irr::SEvent +
+
+
+
+ SNamedPath + irr::io +
+
+
+
+ SOverrideMaterial + irr::video +
+
+
+
+ SParticle + irr::scene +
+
+
+
+ SPositionKey + irr::scene::ISkinnedMesh +
+
+
+
+ SRotationKey + irr::scene::ISkinnedMesh +
+
+
+
+ SScaleKey + irr::scene::ISkinnedMesh +
+
+
+
+ SSharedMeshBuffer + irr::scene +
+
+
+
+ SSkinMeshBuffer + irr::scene +
+
+
+
+ string + irr::core +
+
+
+
+ string< fschar_t > + irr::core +
+
+
+
+ SUserEvent + irr::SEvent +
+
+
+
+ SVarGroup + irr::scene::quake3 +
+
+
+
+ SVarGroupList + irr::scene::quake3 +
+
+
+
+ SVariable + irr::scene::quake3 +
+
+
+ +
+ +
+ +
+ + + +
+
+ SVertexColorGammaManipulator + irr::scene +
+
+ + +
+ +
+
+
+ SVertexColorScaleManipulator + irr::scene +
+
+
+ +
+
+
+ SVertexColorSetManipulator + irr::scene +
+
+
+ +
+ +
+ +
+ +
+ +
+
+
+ SViewFrustum + irr::scene +
+
+
+
+ SWeight + irr::scene::ISkinnedMesh +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_74.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_74.html new file mode 100644 index 0000000..a4dbb72 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_74.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ triangle3d + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_76.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_76.html new file mode 100644 index 0000000..582c6b4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_76.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ vector2d + irr::core +
+
+
+
+ vector2d< f32 > + irr::core +
+
+
+
+ vector3d + irr::core +
+
+
+
+ vector3d< f32 > + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/classes_78.html b/src/others/irrlicht-1.8.1/doc/html/search/classes_78.html new file mode 100644 index 0000000..288d869 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/classes_78.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ xmlChar + irr::io +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/close.png b/src/others/irrlicht-1.8.1/doc/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/search/close.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_5f.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_5f.html new file mode 100644 index 0000000..bf6f0ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_5f.html @@ -0,0 +1,500 @@ + + + + + + + +
+
Loading...
+
+
+ __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ __IRR_HAS_S64 + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_3DS_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_B3D_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BMP_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BMP_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BSP_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BURNINGSVIDEO_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_BZIP2_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_COLLADA_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_COLLADA_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_CONSOLE_DEVICE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_CSM_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_DMF_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_GUI_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_IRR_MESH_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_IRR_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_JPG_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_JPG_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LIBJPEG_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LIBPNG_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LMP_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LMTS_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LWO_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_LZMA_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MD2_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MD3_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MS3D_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_MY3D_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OBJ_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OBJ_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OCT_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OGRE_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_OPENGL_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PCX_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PCX_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PLY_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PLY_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PNG_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PNG_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PPM_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PPM_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PSD_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_PSD_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_RGB_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_SMF_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_SOFTWARE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_STL_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_STL_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_TGA_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_TGA_WRITER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_WAL_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_X11_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_X11_DEVICE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_X_LOADER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ + IrrCompileConfig.h +
+
+
+
+ _IRR_COMPILE_WITH_ZLIB_ + IrrCompileConfig.h +
+
+
+
+ _IRR_D3D_NO_SHADER_DEBUGGING + IrrCompileConfig.h +
+
+
+
+ _IRR_DEBUG_BREAK_IF + irrTypes.h +
+
+
+
+ _IRR_DEPRECATED_ + irrTypes.h +
+
+ +
+
+ _IRR_LINUX_PLATFORM_ + IrrCompileConfig.h +
+
+
+
+ _IRR_LINUX_X11_VIDMODE_ + IrrCompileConfig.h +
+
+
+
+ _IRR_MATERIAL_MAX_TEXTURES_ + IrrCompileConfig.h +
+
+
+
+ _IRR_OPENGL_USE_EXTPOINTER_ + IrrCompileConfig.h +
+
+
+
+ _IRR_POSIX_API_ + IrrCompileConfig.h +
+
+
+
+ _IRR_TEXT + irrTypes.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_BZLIB_ + IrrCompileConfig.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_JPEG_LIB_ + IrrCompileConfig.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_LIB_PNG_ + IrrCompileConfig.h +
+
+
+
+ _IRR_USE_NON_SYSTEM_ZLIB_ + IrrCompileConfig.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_61.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_61.html new file mode 100644 index 0000000..c20985c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_61.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ AIR + irrMath.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_62.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_62.html new file mode 100644 index 0000000..ee49781 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_62.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ BURNINGVIDEO_RENDERER_BEAUTIFUL + IrrCompileConfig.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_66.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_66.html new file mode 100644 index 0000000..9793b78 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_66.html @@ -0,0 +1,116 @@ + + + + + + + +
+
Loading...
+
+
+ F32_A_GREATER_B + irrMath.h +
+
+
+
+ F32_AS_S32 + irrMath.h +
+
+
+
+ F32_AS_U32 + irrMath.h +
+
+
+
+ F32_AS_U32_POINTER + irrMath.h +
+
+
+
+ F32_EQUAL_0 + irrMath.h +
+
+
+
+ F32_EQUAL_1 + irrMath.h +
+
+
+
+ F32_EXPON_MANTISSA + irrMath.h +
+
+
+
+ F32_GREATER_0 + irrMath.h +
+
+
+
+ F32_GREATER_EQUAL_0 + irrMath.h +
+
+
+
+ F32_LOWER_0 + irrMath.h +
+
+
+
+ F32_LOWER_EQUAL_0 + irrMath.h +
+
+
+
+ F32_SIGN_BIT + irrMath.h +
+
+
+
+ F32_VALUE_0 + irrMath.h +
+
+
+
+ F32_VALUE_1 + irrMath.h +
+
+
+
+ FLT_MAX + irrMath.h +
+
+
+
+ FLT_MIN + irrMath.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_69.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_69.html new file mode 100644 index 0000000..8f04893 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_69.html @@ -0,0 +1,74 @@ + + + + + + + +
+
Loading...
+
+
+ IEEE_1_0 + irrMath.h +
+
+
+
+ IEEE_255_0 + irrMath.h +
+
+
+
+ IRR_TEST_BROKEN_QUATERNION_USE + quaternion.h +
+
+
+
+ IRRCALLCONV + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_API + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_SDK_VERSION + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_VERSION_MAJOR + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_VERSION_MINOR + IrrCompileConfig.h +
+
+
+
+ IRRLICHT_VERSION_REVISION + IrrCompileConfig.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_6d.html new file mode 100644 index 0000000..9946d99 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_6d.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ MAKE_IRR_ID + irrTypes.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_70.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_70.html new file mode 100644 index 0000000..06d97c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_70.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ position2d + position2d.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/defines_72.html b/src/others/irrlicht-1.8.1/doc/html/search/defines_72.html new file mode 100644 index 0000000..bd3b664 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/defines_72.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ REALINLINE + irrMath.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enums_65.html b/src/others/irrlicht-1.8.1/doc/html/search/enums_65.html new file mode 100644 index 0000000..335a324 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enums_65.html @@ -0,0 +1,578 @@ + + + + + + + +
+
Loading...
+
+
+ E_ALPHA_SOURCE + irr::video +
+
+
+
+ E_ANIMATED_MESH_TYPE + irr::scene +
+
+
+
+ E_ANTI_ALIASING_MODE + irr::video +
+
+
+ +
+
+
+ E_ATTRIBUTE_TYPE + irr::io +
+
+
+
+ E_BLEND_FACTOR + irr::video +
+
+
+
+ E_BLEND_OPERATION + irr::video +
+
+
+
+ E_BONE_ANIMATION_MODE + irr::scene +
+
+
+
+ E_BONE_SKINNING_SPACE + irr::scene +
+
+
+
+ E_BUFFER_TYPE + irr::scene +
+
+
+
+ E_COLLADA_COLOR_SAMPLER + irr::scene +
+
+
+
+ E_COLLADA_GEOMETRY_WRITING + irr::scene +
+
+
+
+ E_COLLADA_IRR_COLOR + irr::scene +
+
+
+
+ E_COLLADA_TECHNIQUE_FX + irr::scene +
+
+
+
+ E_COLLADA_TRANSPARENT_FX + irr::scene +
+
+
+
+ E_COLOR_MATERIAL + irr::video +
+
+
+
+ E_COLOR_PLANE + irr::video +
+
+
+
+ E_COMPARISON_FUNC + irr::video +
+
+
+
+ E_CULLING_TYPE + irr::scene +
+
+
+
+ E_DEBUG_SCENE_TYPE + irr::scene +
+
+
+
+ E_DEVICE_TYPE + irr +
+
+
+
+ E_DRIVER_TYPE + irr::video +
+
+
+
+ E_FILE_ARCHIVE_TYPE + irr::io +
+
+
+
+ E_FOG_TYPE + irr::video +
+
+
+
+ E_GEOMETRY_SHADER_TYPE + irr::video +
+
+
+
+ E_GPU_SHADING_LANGUAGE + irr::video +
+
+
+
+ E_HARDWARE_MAPPING + irr::scene +
+
+
+
+ E_INDEX_TYPE + irr::video +
+
+
+
+ E_INTERPOLATION_MODE + irr::scene +
+
+
+
+ E_JOINT_UPDATE_ON_RENDER + irr::scene +
+
+
+
+ E_LIGHT_TYPE + irr::video +
+
+
+
+ E_LOST_RESOURCE + irr::video +
+
+
+
+ E_MATERIAL_FLAG + irr::video +
+
+
+
+ E_MATERIAL_TYPE + irr::video +
+
+
+
+ E_MESH_WRITER_FLAGS + irr::scene +
+
+
+
+ E_MODULATE_FUNC + irr::video +
+
+ +
+
+ E_PARTICLE_AFFECTOR_TYPE + irr::scene +
+
+
+
+ E_PARTICLE_EMITTER_TYPE + irr::scene +
+
+
+
+ E_PIXEL_SHADER_TYPE + irr::video +
+
+
+
+ E_POLYGON_OFFSET + irr::video +
+
+
+
+ E_PRIMITIVE_TYPE + irr::scene +
+
+
+
+ E_RENDER_TARGET + irr::video +
+
+
+
+ E_SCENE_NODE_RENDER_PASS + irr::scene +
+
+
+
+ E_TERRAIN_PATCH_SIZE + irr::scene +
+
+
+
+ E_TEXTURE_CLAMP + irr::video +
+
+
+
+ E_TEXTURE_CREATION_FLAG + irr::video +
+
+
+
+ E_TEXTURE_LOCK_MODE + irr::video +
+
+
+
+ E_TRANSFORMATION_STATE + irr::video +
+
+
+
+ E_VERTEX_SHADER_TYPE + irr::video +
+
+
+
+ E_VERTEX_TYPE + irr::video +
+
+
+
+ E_VIDEO_DRIVER_FEATURE + irr::video +
+
+
+
+ eAllocStrategy + irr::core +
+
+
+
+ ECOLOR_FORMAT + irr::video +
+
+
+
+ eConstructor + irr::core::CMatrix4 +
+
+
+
+ ECONTEXT_MENU_CLOSE + irr::gui +
+
+
+
+ ECURSOR_ICON + irr::gui +
+
+
+
+ ECURSOR_PLATFORM_BEHAVIOR + irr::gui +
+
+
+
+ EEVENT_TYPE + irr +
+
+
+
+ EFileSystemType + irr::io +
+
+
+
+ EGUI_ALIGNMENT + irr::gui +
+
+
+
+ EGUI_BUTTON_STATE + irr::gui +
+
+
+
+ EGUI_COLUMN_ORDERING + irr::gui +
+
+
+
+ EGUI_DEFAULT_COLOR + irr::gui +
+
+
+
+ EGUI_DEFAULT_FONT + irr::gui +
+
+
+
+ EGUI_DEFAULT_ICON + irr::gui +
+
+
+
+ EGUI_DEFAULT_SIZE + irr::gui +
+
+
+
+ EGUI_DEFAULT_TEXT + irr::gui +
+
+
+
+ EGUI_ELEMENT_TYPE + irr::gui +
+
+
+
+ EGUI_EVENT_TYPE + irr::gui +
+
+
+
+ EGUI_FONT_TYPE + irr::gui +
+
+
+
+ EGUI_LISTBOX_COLOR + irr::gui +
+
+
+
+ EGUI_ORDERING_MODE + irr::gui +
+
+
+
+ EGUI_SKIN_TYPE + irr::gui +
+
+
+
+ EGUI_TABLE_DRAW_FLAGS + irr::gui +
+
+
+
+ EIntersectionRelation3D + irr::core +
+
+
+
+ EKEY_ACTION + irr +
+
+
+
+ EKEY_CODE + irr +
+
+
+
+ eLocaleID + irr::core +
+
+
+
+ ELOG_LEVEL + irr +
+
+
+
+ EMD2_ANIMATION_TYPE + irr::scene +
+
+
+
+ EMD3_ANIMATION_TYPE + irr::scene +
+
+
+
+ eMD3Models + irr::scene +
+
+
+
+ EMESH_WRITER_TYPE + irr::scene +
+
+
+
+ EMESSAGE_BOX_FLAG + irr::gui +
+
+
+
+ EMOUSE_INPUT_EVENT + irr +
+
+
+
+ eQ3MeshIndex + irr::scene::quake3 +
+
+
+
+ eQ3ModifierFunction + irr::scene::quake3 +
+
+
+
+ ESCENE_NODE_ANIMATOR_TYPE + irr::scene +
+
+
+
+ ESCENE_NODE_TYPE + irr::scene +
+
+
+
+ ETEXT_FORMAT + irr::io +
+
+
+
+ EWeekday + irr::ITimer +
+
+
+
+ EXML_NODE + irr::io +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enums_76.html b/src/others/irrlicht-1.8.1/doc/html/search/enums_76.html new file mode 100644 index 0000000..f2bacd9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enums_76.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ VFPLANES + irr::scene::SViewFrustum +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_61.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_61.html new file mode 100644 index 0000000..92a1b25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_61.html @@ -0,0 +1,92 @@ + + + + + + + +
+
Loading...
+
+
+ ALLOC_STRATEGY_DOUBLE + irr::core +
+
+
+
+ ALLOC_STRATEGY_SAFE + irr::core +
+
+
+
+ ALLOC_STRATEGY_SQRT + irr::core +
+
+
+
+ ALPHAGEN + irr::scene::quake3 +
+
+
+
+ AUTOSPRITE + irr::scene::quake3 +
+
+
+
+ AUTOSPRITE2 + irr::scene::quake3 +
+
+
+
+ AXIS_R + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_U + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_V + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_X + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_Y + irr::SEvent::SJoystickEvent +
+
+
+
+ AXIS_Z + irr::SEvent::SJoystickEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_62.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_62.html new file mode 100644 index 0000000..71f5eee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_62.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ BULGE + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_63.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_63.html new file mode 100644 index 0000000..d9b7808 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_63.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ CONSTANT + irr::scene::quake3 +
+
+
+
+ COSINUS + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_64.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_64.html new file mode 100644 index 0000000..e350fa5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_64.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ DEFORMVERTEXES + irr::scene::quake3 +
+
+
+
+ DOLLAR_LIGHTMAP + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_65.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_65.html new file mode 100644 index 0000000..6ce4e2b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_65.html @@ -0,0 +1,4646 @@ + + + + + + + +
+
Loading...
+
+
+ E_Q3_MESH_BILLBOARD + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_FOG + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_GEOMETRY + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_ITEMS + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_SIZE + irr::scene::quake3 +
+
+
+
+ E_Q3_MESH_UNRESOLVED + irr::scene::quake3 +
+
+
+
+ EAAM_ALPHA_TO_COVERAGE + irr::video +
+
+
+
+ EAAM_FULL_BASIC + irr::video +
+
+
+
+ EAAM_LINE_SMOOTH + irr::video +
+
+
+
+ EAAM_OFF + irr::video +
+
+
+
+ EAAM_POINT_SMOOTH + irr::video +
+
+
+
+ EAAM_QUALITY + irr::video +
+
+
+
+ EAAM_SIMPLE + irr::video +
+
+
+
+ EAC_BOX + irr::scene +
+
+
+
+ EAC_FRUSTUM_BOX + irr::scene +
+
+
+
+ EAC_FRUSTUM_SPHERE + irr::scene +
+
+
+
+ EAC_OCC_QUERY + irr::scene +
+
+
+
+ EAC_OFF + irr::scene +
+
+
+
+ EAMT_3DS + irr::scene +
+
+
+
+ EAMT_BSP + irr::scene +
+
+
+
+ EAMT_CSM + irr::scene +
+
+
+
+ EAMT_LMTS + irr::scene +
+
+
+
+ EAMT_MD2 + irr::scene +
+
+
+
+ EAMT_MD3 + irr::scene +
+
+
+
+ EAMT_MDL_HALFLIFE + irr::scene +
+
+
+
+ EAMT_MY3D + irr::scene +
+
+
+
+ EAMT_OBJ + irr::scene +
+
+
+
+ EAMT_OCT + irr::scene +
+
+
+
+ EAMT_SKINNED + irr::scene +
+
+
+
+ EAMT_UNKNOWN + irr::scene +
+
+
+
+ EARWF_FOR_EDITOR + irr::io +
+
+
+
+ EARWF_FOR_FILE + irr::io +
+
+
+
+ EARWF_USE_RELATIVE_PATHS + irr::io +
+
+
+
+ EAS_NONE + irr::video +
+
+
+
+ EAS_TEXTURE + irr::video +
+
+
+
+ EAS_VERTEX_COLOR + irr::video +
+
+
+
+ EAT_BBOX + irr::io +
+
+
+
+ EAT_BINARY + irr::io +
+
+
+
+ EAT_BOOL + irr::io +
+
+
+
+ EAT_COLOR + irr::io +
+
+
+
+ EAT_COLORF + irr::io +
+
+
+
+ EAT_COUNT + irr::io +
+
+
+
+ EAT_DIMENSION2D + irr::io +
+
+
+
+ EAT_ENUM + irr::io +
+
+
+
+ EAT_FLOAT + irr::io +
+
+
+
+ EAT_FLOATARRAY + irr::io +
+
+
+
+ EAT_INT + irr::io +
+
+
+
+ EAT_INTARRAY + irr::io +
+
+
+
+ EAT_LINE2D + irr::io +
+
+
+
+ EAT_LINE3D + irr::io +
+
+
+
+ EAT_MATRIX + irr::io +
+
+
+
+ EAT_PLANE + irr::io +
+
+
+
+ EAT_POSITION2D + irr::io +
+
+
+
+ EAT_QUATERNION + irr::io +
+
+
+
+ EAT_RECT + irr::io +
+
+
+
+ EAT_STRING + irr::io +
+
+
+
+ EAT_STRINGWARRAY + irr::io +
+
+
+
+ EAT_TEXTURE + irr::io +
+
+
+
+ EAT_TRIANGLE3D + irr::io +
+
+
+
+ EAT_UNKNOWN + irr::io +
+
+
+
+ EAT_USER_POINTER + irr::io +
+
+
+
+ EAT_VECTOR2D + irr::io +
+
+
+
+ EAT_VECTOR3D + irr::io +
+
+
+
+ EBAM_ANIMATED + irr::scene +
+
+
+
+ EBAM_AUTOMATIC + irr::scene +
+
+
+
+ EBAM_COUNT + irr::scene +
+
+
+
+ EBAM_UNANIMATED + irr::scene +
+
+
+
+ EBF_DST_ALPHA + irr::video +
+
+
+
+ EBF_DST_COLOR + irr::video +
+
+
+
+ EBF_ONE + irr::video +
+
+
+
+ EBF_ONE_MINUS_DST_ALPHA + irr::video +
+
+
+
+ EBF_ONE_MINUS_DST_COLOR + irr::video +
+
+
+
+ EBF_ONE_MINUS_SRC_ALPHA + irr::video +
+
+
+
+ EBF_ONE_MINUS_SRC_COLOR + irr::video +
+
+
+
+ EBF_SRC_ALPHA + irr::video +
+
+
+
+ EBF_SRC_ALPHA_SATURATE + irr::video +
+
+
+
+ EBF_SRC_COLOR + irr::video +
+
+
+
+ EBF_ZERO + irr::video +
+
+
+
+ EBO_ADD + irr::video +
+
+
+
+ EBO_MAX + irr::video +
+
+
+
+ EBO_MAX_ALPHA + irr::video +
+
+
+
+ EBO_MAX_FACTOR + irr::video +
+
+
+
+ EBO_MIN + irr::video +
+
+
+
+ EBO_MIN_ALPHA + irr::video +
+
+
+
+ EBO_MIN_FACTOR + irr::video +
+
+
+
+ EBO_NONE + irr::video +
+
+
+
+ EBO_REVSUBTRACT + irr::video +
+
+
+
+ EBO_SUBTRACT + irr::video +
+
+
+
+ EBSS_COUNT + irr::scene +
+
+
+
+ EBSS_GLOBAL + irr::scene +
+
+
+
+ EBSS_LOCAL + irr::scene +
+
+
+
+ EBT_INDEX + irr::scene +
+
+
+
+ EBT_NONE + irr::scene +
+
+
+
+ EBT_VERTEX + irr::scene +
+
+
+
+ EBT_VERTEX_AND_INDEX + irr::scene +
+
+
+
+ ECCS_AMBIENT + irr::scene +
+
+
+
+ ECCS_DIFFUSE + irr::scene +
+
+
+
+ ECCS_EMISSIVE + irr::scene +
+
+
+
+ ECCS_REFLECTIVE + irr::scene +
+
+
+
+ ECCS_SPECULAR + irr::scene +
+
+
+
+ ECCS_TRANSPARENT + irr::scene +
+
+
+
+ ECF_A16B16G16R16F + irr::video +
+
+
+
+ ECF_A1R5G5B5 + irr::video +
+
+
+
+ ECF_A32B32G32R32F + irr::video +
+
+
+
+ ECF_A8R8G8B8 + irr::video +
+
+
+
+ ECF_G16R16F + irr::video +
+
+
+
+ ECF_G32R32F + irr::video +
+
+
+
+ ECF_R16F + irr::video +
+
+
+
+ ECF_R32F + irr::video +
+
+
+
+ ECF_R5G6B5 + irr::video +
+
+
+
+ ECF_R8G8B8 + irr::video +
+
+
+
+ ECF_UNKNOWN + irr::video +
+
+
+
+ ECFN_ALWAYS + irr::video +
+
+
+
+ ECFN_EQUAL + irr::video +
+
+
+
+ ECFN_GREATER + irr::video +
+
+
+
+ ECFN_GREATEREQUAL + irr::video +
+
+
+
+ ECFN_LESS + irr::video +
+
+
+
+ ECFN_LESSEQUAL + irr::video +
+
+
+
+ ECFN_NEVER + irr::video +
+
+
+
+ ECFN_NOTEQUAL + irr::video +
+
+
+
+ ECGI_PER_MESH + irr::scene +
+
+
+
+ ECGI_PER_MESH_AND_MATERIAL + irr::scene +
+
+
+
+ ECI_COUNT + irr::gui +
+
+
+
+ ECI_CROSS + irr::gui +
+
+
+
+ ECI_HAND + irr::gui +
+
+
+
+ ECI_HELP + irr::gui +
+
+
+
+ ECI_IBEAM + irr::gui +
+
+
+
+ ECI_NO + irr::gui +
+
+
+
+ ECI_NORMAL + irr::gui +
+
+
+
+ ECI_SIZEALL + irr::gui +
+
+
+
+ ECI_SIZENESW + irr::gui +
+
+
+
+ ECI_SIZENS + irr::gui +
+
+
+
+ ECI_SIZENWSE + irr::gui +
+
+
+
+ ECI_SIZEWE + irr::gui +
+
+
+
+ ECI_UP + irr::gui +
+
+
+
+ ECI_WAIT + irr::gui +
+
+
+
+ ECIC_AMBIENT + irr::scene +
+
+
+
+ ECIC_CUSTOM + irr::scene +
+
+
+
+ ECIC_DIFFUSE + irr::scene +
+
+
+
+ ECIC_EMISSIVE + irr::scene +
+
+
+
+ ECIC_NONE + irr::scene +
+
+
+
+ ECIC_SPECULAR + irr::scene +
+
+
+
+ ECM_AMBIENT + irr::video +
+
+
+
+ ECM_DIFFUSE + irr::video +
+
+
+
+ ECM_DIFFUSE_AND_AMBIENT + irr::video +
+
+
+
+ ECM_EMISSIVE + irr::video +
+
+
+
+ ECM_NONE + irr::video +
+
+
+
+ ECM_SPECULAR + irr::video +
+
+
+
+ ECMC_HIDE + irr::gui +
+
+
+
+ ECMC_IGNORE + irr::gui +
+
+
+
+ ECMC_REMOVE + irr::gui +
+
+
+
+ ECOF_A_ONE + irr::scene +
+
+
+
+ ECOF_RGB_ZERO + irr::scene +
+
+
+
+ ECP_ALL + irr::video +
+
+
+
+ ECP_ALPHA + irr::video +
+
+
+
+ ECP_BLUE + irr::video +
+
+
+
+ ECP_GREEN + irr::video +
+
+
+
+ ECP_NONE + irr::video +
+
+
+
+ ECP_RED + irr::video +
+
+
+
+ ECP_RGB + irr::video +
+
+
+
+ ECPB_NONE + irr::gui +
+
+
+
+ ECPB_X11_CACHE_UPDATES + irr::gui +
+
+
+
+ ECTF_BLINN + irr::scene +
+
+
+
+ ECTF_CONSTANT + irr::scene +
+
+
+
+ ECTF_LAMBERT + irr::scene +
+
+
+
+ ECTF_PHONG + irr::scene +
+
+
+
+ EDS_BBOX + irr::scene +
+
+
+
+ EDS_BBOX_ALL + irr::scene +
+
+
+
+ EDS_BBOX_BUFFERS + irr::scene +
+
+
+
+ EDS_FULL + irr::scene +
+
+
+
+ EDS_HALF_TRANSPARENCY + irr::scene +
+
+
+
+ EDS_MESH_WIRE_OVERLAY + irr::scene +
+
+
+
+ EDS_NORMALS + irr::scene +
+
+
+
+ EDS_OFF + irr::scene +
+
+
+
+ EDS_SKELETON + irr::scene +
+
+
+
+ EDT_BURNINGSVIDEO + irr::video +
+
+
+
+ EDT_COUNT + irr::video +
+
+
+
+ EDT_DIRECT3D8 + irr::video +
+
+
+
+ EDT_DIRECT3D9 + irr::video +
+
+
+
+ EDT_NULL + irr::video +
+
+
+
+ EDT_OPENGL + irr::video +
+
+
+
+ EDT_SOFTWARE + irr::video +
+
+
+
+ EET_GUI_EVENT + irr +
+
+ +
+ +
+
+
+ EET_LOG_TEXT_EVENT + irr +
+
+
+ +
+
+
+ EET_USER_EVENT + irr +
+
+
+
+ EFAT_FOLDER + irr::io +
+
+
+
+ EFAT_GZIP + irr::io +
+
+
+
+ EFAT_NPK + irr::io +
+
+
+
+ EFAT_PAK + irr::io +
+
+
+
+ EFAT_TAR + irr::io +
+
+
+
+ EFAT_UNKNOWN + irr::io +
+
+
+
+ EFAT_WAD + irr::io +
+
+
+
+ EFAT_ZIP + irr::io +
+
+
+
+ EFT_FOG_EXP + irr::video +
+
+
+
+ EFT_FOG_EXP2 + irr::video +
+
+
+
+ EFT_FOG_LINEAR + irr::video +
+
+
+
+ EGBS_BUTTON_DOWN + irr::gui +
+
+
+
+ EGBS_BUTTON_FOCUSED + irr::gui +
+
+
+
+ EGBS_BUTTON_MOUSE_OFF + irr::gui +
+
+
+
+ EGBS_BUTTON_MOUSE_OVER + irr::gui +
+
+
+
+ EGBS_BUTTON_NOT_FOCUSED + irr::gui +
+
+
+
+ EGBS_BUTTON_UP + irr::gui +
+
+
+
+ EGBS_COUNT + irr::gui +
+
+
+
+ EGCO_ASCENDING + irr::gui +
+
+
+
+ EGCO_COUNT + irr::gui +
+
+
+
+ EGCO_CUSTOM + irr::gui +
+
+
+
+ EGCO_DESCENDING + irr::gui +
+
+
+ +
+
+
+ EGCO_NONE + irr::gui +
+
+
+
+ EGDC_3D_DARK_SHADOW + irr::gui +
+
+
+
+ EGDC_3D_FACE + irr::gui +
+
+
+
+ EGDC_3D_HIGH_LIGHT + irr::gui +
+
+
+
+ EGDC_3D_LIGHT + irr::gui +
+
+
+
+ EGDC_3D_SHADOW + irr::gui +
+
+
+
+ EGDC_ACTIVE_BORDER + irr::gui +
+
+
+
+ EGDC_ACTIVE_CAPTION + irr::gui +
+
+
+
+ EGDC_APP_WORKSPACE + irr::gui +
+
+
+
+ EGDC_BUTTON_TEXT + irr::gui +
+
+
+
+ EGDC_COUNT + irr::gui +
+
+
+
+ EGDC_EDITABLE + irr::gui +
+
+
+
+ EGDC_FOCUSED_EDITABLE + irr::gui +
+
+
+
+ EGDC_GRAY_EDITABLE + irr::gui +
+
+
+
+ EGDC_GRAY_TEXT + irr::gui +
+
+
+
+ EGDC_GRAY_WINDOW_SYMBOL + irr::gui +
+
+
+
+ EGDC_HIGH_LIGHT + irr::gui +
+
+
+
+ EGDC_HIGH_LIGHT_TEXT + irr::gui +
+
+
+
+ EGDC_ICON + irr::gui +
+
+
+
+ EGDC_ICON_HIGH_LIGHT + irr::gui +
+
+
+
+ EGDC_INACTIVE_BORDER + irr::gui +
+
+
+
+ EGDC_INACTIVE_CAPTION + irr::gui +
+
+
+
+ EGDC_SCROLLBAR + irr::gui +
+
+
+
+ EGDC_TOOLTIP + irr::gui +
+
+
+
+ EGDC_TOOLTIP_BACKGROUND + irr::gui +
+
+
+
+ EGDC_WINDOW + irr::gui +
+
+
+
+ EGDC_WINDOW_SYMBOL + irr::gui +
+
+
+
+ EGDF_BUTTON + irr::gui +
+
+
+
+ EGDF_COUNT + irr::gui +
+
+
+
+ EGDF_DEFAULT + irr::gui +
+
+
+
+ EGDF_MENU + irr::gui +
+
+
+
+ EGDF_TOOLTIP + irr::gui +
+
+
+
+ EGDF_WINDOW + irr::gui +
+
+
+
+ EGDI_CHECK_BOX_CHECKED + irr::gui +
+
+
+
+ EGDI_COLLAPSE + irr::gui +
+
+
+
+ EGDI_COUNT + irr::gui +
+
+
+
+ EGDI_CURSOR_DOWN + irr::gui +
+
+
+
+ EGDI_CURSOR_LEFT + irr::gui +
+
+
+
+ EGDI_CURSOR_RIGHT + irr::gui +
+
+
+
+ EGDI_CURSOR_UP + irr::gui +
+
+
+
+ EGDI_DIRECTORY + irr::gui +
+
+
+
+ EGDI_DROP_DOWN + irr::gui +
+
+
+
+ EGDI_EXPAND + irr::gui +
+
+
+
+ EGDI_FILE + irr::gui +
+
+
+
+ EGDI_MENU_MORE + irr::gui +
+
+
+
+ EGDI_MORE_DOWN + irr::gui +
+
+
+
+ EGDI_MORE_LEFT + irr::gui +
+
+
+
+ EGDI_MORE_RIGHT + irr::gui +
+
+
+
+ EGDI_MORE_UP + irr::gui +
+
+
+
+ EGDI_RADIO_BUTTON_CHECKED + irr::gui +
+
+
+
+ EGDI_SMALL_CURSOR_DOWN + irr::gui +
+
+
+
+ EGDI_SMALL_CURSOR_UP + irr::gui +
+
+
+
+ EGDI_WINDOW_CLOSE + irr::gui +
+
+
+
+ EGDI_WINDOW_MAXIMIZE + irr::gui +
+
+
+
+ EGDI_WINDOW_MINIMIZE + irr::gui +
+
+
+
+ EGDI_WINDOW_RESIZE + irr::gui +
+
+
+
+ EGDI_WINDOW_RESTORE + irr::gui +
+
+
+
+ EGDS_BUTTON_HEIGHT + irr::gui +
+
+ + + + +
+
+ EGDS_BUTTON_WIDTH + irr::gui +
+
+
+
+ EGDS_CHECK_BOX_WIDTH + irr::gui +
+
+
+
+ EGDS_COUNT + irr::gui +
+
+
+
+ EGDS_MENU_HEIGHT + irr::gui +
+
+
+ +
+
+
+ EGDS_MESSAGE_BOX_HEIGHT + irr::gui +
+
+ + + + +
+
+ EGDS_MESSAGE_BOX_WIDTH + irr::gui +
+
+
+
+ EGDS_SCROLLBAR_SIZE + irr::gui +
+
+
+
+ EGDS_TEXT_DISTANCE_X + irr::gui +
+
+
+
+ EGDS_TEXT_DISTANCE_Y + irr::gui +
+
+
+ +
+
+ +
+
+
+ EGDS_WINDOW_BUTTON_WIDTH + irr::gui +
+
+
+
+ EGDT_COUNT + irr::gui +
+
+
+
+ EGDT_MSG_BOX_CANCEL + irr::gui +
+
+
+
+ EGDT_MSG_BOX_NO + irr::gui +
+
+
+
+ EGDT_MSG_BOX_OK + irr::gui +
+
+
+
+ EGDT_MSG_BOX_YES + irr::gui +
+
+
+
+ EGDT_WINDOW_CLOSE + irr::gui +
+
+
+
+ EGDT_WINDOW_MAXIMIZE + irr::gui +
+
+
+
+ EGDT_WINDOW_MINIMIZE + irr::gui +
+
+
+
+ EGDT_WINDOW_RESTORE + irr::gui +
+
+
+
+ EGET_BUTTON_CLICKED + irr::gui +
+
+
+
+ EGET_CHECKBOX_CHANGED + irr::gui +
+
+
+
+ EGET_COMBO_BOX_CHANGED + irr::gui +
+
+
+
+ EGET_COUNT + irr::gui +
+
+
+
+ EGET_DIRECTORY_SELECTED + irr::gui +
+
+
+
+ EGET_EDITBOX_CHANGED + irr::gui +
+
+
+
+ EGET_EDITBOX_ENTER + irr::gui +
+
+
+ +
+
+
+ EGET_ELEMENT_CLOSED + irr::gui +
+
+
+
+ EGET_ELEMENT_FOCUS_LOST + irr::gui +
+
+
+
+ EGET_ELEMENT_FOCUSED + irr::gui +
+
+
+
+ EGET_ELEMENT_HOVERED + irr::gui +
+
+
+
+ EGET_ELEMENT_LEFT + irr::gui +
+
+ +
+
+ EGET_FILE_SELECTED + irr::gui +
+
+
+
+ EGET_LISTBOX_CHANGED + irr::gui +
+
+
+ +
+
+
+ EGET_MENU_ITEM_SELECTED + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_CANCEL + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_NO + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_OK + irr::gui +
+
+
+
+ EGET_MESSAGEBOX_YES + irr::gui +
+
+
+
+ EGET_SCROLL_BAR_CHANGED + irr::gui +
+
+
+
+ EGET_SPINBOX_CHANGED + irr::gui +
+
+
+
+ EGET_TAB_CHANGED + irr::gui +
+
+
+
+ EGET_TABLE_CHANGED + irr::gui +
+
+
+
+ EGET_TABLE_HEADER_CHANGED + irr::gui +
+
+
+
+ EGET_TABLE_SELECTED_AGAIN + irr::gui +
+
+
+ +
+
+ +
+
+ +
+
+
+ EGET_TREEVIEW_NODE_EXPAND + irr::gui +
+
+
+
+ EGET_TREEVIEW_NODE_SELECT + irr::gui +
+
+
+
+ EGFT_BITMAP + irr::gui +
+
+
+
+ EGFT_CUSTOM + irr::gui +
+
+
+
+ EGFT_OS + irr::gui +
+
+
+
+ EGFT_VECTOR + irr::gui +
+
+
+
+ EGOM_ASCENDING + irr::gui +
+
+
+
+ EGOM_COUNT + irr::gui +
+
+
+
+ EGOM_DESCENDING + irr::gui +
+
+
+
+ EGOM_NONE + irr::gui +
+
+
+
+ EGSL_CG + irr::video +
+
+
+
+ EGSL_DEFAULT + irr::video +
+
+
+
+ EGST_BURNING_SKIN + irr::gui +
+
+ +
+
+ EGST_GS_4_0 + irr::video +
+
+
+
+ EGST_UNKNOWN + irr::gui +
+
+
+
+ EGST_WINDOWS_CLASSIC + irr::gui +
+
+
+
+ EGST_WINDOWS_METALLIC + irr::gui +
+
+
+
+ EGTDF_ACTIVE_ROW + irr::gui +
+
+
+
+ EGTDF_COLUMNS + irr::gui +
+
+
+
+ EGTDF_COUNT + irr::gui +
+
+
+
+ EGTDF_ROWS + irr::gui +
+
+
+
+ EGUI_LBC_COUNT + irr::gui +
+
+
+
+ EGUI_LBC_ICON + irr::gui +
+
+
+
+ EGUI_LBC_ICON_HIGHLIGHT + irr::gui +
+
+
+
+ EGUI_LBC_TEXT + irr::gui +
+
+
+
+ EGUI_LBC_TEXT_HIGHLIGHT + irr::gui +
+
+
+
+ EGUIA_CENTER + irr::gui +
+
+
+
+ EGUIA_LOWERRIGHT + irr::gui +
+
+
+
+ EGUIA_SCALE + irr::gui +
+
+
+
+ EGUIA_UPPERLEFT + irr::gui +
+
+
+
+ EGUIET_BUTTON + irr::gui +
+
+
+
+ EGUIET_CHECK_BOX + irr::gui +
+
+
+ +
+
+
+ EGUIET_COMBO_BOX + irr::gui +
+
+
+
+ EGUIET_CONTEXT_MENU + irr::gui +
+
+
+
+ EGUIET_COUNT + irr::gui +
+
+
+
+ EGUIET_EDIT_BOX + irr::gui +
+
+
+
+ EGUIET_ELEMENT + irr::gui +
+
+
+
+ EGUIET_FILE_OPEN_DIALOG + irr::gui +
+
+ +
+
+ EGUIET_IMAGE + irr::gui +
+
+
+
+ EGUIET_IN_OUT_FADER + irr::gui +
+
+
+
+ EGUIET_LIST_BOX + irr::gui +
+
+
+
+ EGUIET_MENU + irr::gui +
+
+
+
+ EGUIET_MESH_VIEWER + irr::gui +
+
+
+
+ EGUIET_MESSAGE_BOX + irr::gui +
+
+
+
+ EGUIET_MODAL_SCREEN + irr::gui +
+
+
+
+ EGUIET_ROOT + irr::gui +
+
+
+
+ EGUIET_SCROLL_BAR + irr::gui +
+
+
+
+ EGUIET_SPIN_BOX + irr::gui +
+
+
+
+ EGUIET_STATIC_TEXT + irr::gui +
+
+
+
+ EGUIET_TAB + irr::gui +
+
+
+
+ EGUIET_TAB_CONTROL + irr::gui +
+
+
+
+ EGUIET_TABLE + irr::gui +
+
+
+
+ EGUIET_TOOL_BAR + irr::gui +
+
+
+
+ EGUIET_TREE_VIEW + irr::gui +
+
+
+
+ EGUIET_WINDOW + irr::gui +
+
+
+
+ EHM_DYNAMIC + irr::scene +
+
+
+
+ EHM_NEVER + irr::scene +
+
+
+
+ EHM_STATIC + irr::scene +
+
+
+
+ EHM_STREAM + irr::scene +
+
+
+
+ EIDT_BEST + irr +
+
+
+
+ EIDT_CONSOLE + irr +
+
+
+
+ EIDT_FRAMEBUFFER + irr +
+
+
+
+ EIDT_OSX + irr +
+
+
+
+ EIDT_SDL + irr +
+
+
+
+ EIDT_WIN32 + irr +
+
+
+
+ EIDT_WINCE + irr +
+
+
+
+ EIDT_X11 + irr +
+
+
+
+ EIM_CONSTANT + irr::scene +
+
+
+
+ EIM_COUNT + irr::scene +
+
+
+
+ EIM_LINEAR + irr::scene +
+
+
+
+ EIT_16BIT + irr::video +
+
+
+
+ EIT_32BIT + irr::video +
+
+
+
+ EJUOR_CONTROL + irr::scene +
+
+
+
+ EJUOR_NONE + irr::scene +
+
+
+
+ EJUOR_READ + irr::scene +
+
+
+
+ EKA_COUNT + irr +
+
+
+
+ EKA_CROUCH + irr +
+
+
+
+ EKA_FORCE_32BIT + irr +
+
+
+
+ EKA_JUMP_UP + irr +
+
+
+
+ EKA_MOVE_BACKWARD + irr +
+
+
+
+ EKA_MOVE_FORWARD + irr +
+
+
+
+ EKA_STRAFE_LEFT + irr +
+
+
+
+ EKA_STRAFE_RIGHT + irr +
+
+
+
+ ELL_DEBUG + irr +
+
+
+
+ ELL_ERROR + irr +
+
+
+
+ ELL_INFORMATION + irr +
+
+
+
+ ELL_NONE + irr +
+
+
+
+ ELL_WARNING + irr +
+
+
+
+ ELR_DEVICE + irr::video +
+
+
+
+ ELR_HW_BUFFERS + irr::video +
+
+
+
+ ELR_RTTS + irr::video +
+
+
+
+ ELR_TEXTURES + irr::video +
+
+
+
+ ELT_COUNT + irr::video +
+
+
+
+ ELT_DIRECTIONAL + irr::video +
+
+
+
+ ELT_POINT + irr::video +
+
+
+
+ ELT_SPOT + irr::video +
+
+
+
+ EM4CONST_COPY + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_IDENTITY + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_INVERSE + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_INVERSE_TRANSPOSED + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_NOTHING + irr::core::CMatrix4 +
+
+
+
+ EM4CONST_TRANSPOSED + irr::core::CMatrix4 +
+
+
+
+ EMAT_ATTACK + irr::scene +
+
+
+
+ EMAT_BOOM + irr::scene +
+
+
+
+ EMAT_COUNT + irr::scene +
+
+
+
+ EMAT_CROUCH_ATTACK + irr::scene +
+
+
+
+ EMAT_CROUCH_DEATH + irr::scene +
+
+
+
+ EMAT_CROUCH_PAIN + irr::scene +
+
+
+
+ EMAT_CROUCH_STAND + irr::scene +
+
+
+
+ EMAT_CROUCH_WALK + irr::scene +
+
+
+
+ EMAT_DEATH_FALLBACK + irr::scene +
+
+
+
+ EMAT_DEATH_FALLBACKSLOW + irr::scene +
+
+
+
+ EMAT_DEATH_FALLFORWARD + irr::scene +
+
+
+
+ EMAT_FALLBACK + irr::scene +
+
+
+
+ EMAT_FLIP + irr::scene +
+
+
+
+ EMAT_JUMP + irr::scene +
+
+
+
+ EMAT_PAIN_A + irr::scene +
+
+
+
+ EMAT_PAIN_B + irr::scene +
+
+
+
+ EMAT_PAIN_C + irr::scene +
+
+
+
+ EMAT_POINT + irr::scene +
+
+
+
+ EMAT_RUN + irr::scene +
+
+
+
+ EMAT_SALUTE + irr::scene +
+
+
+
+ EMAT_STAND + irr::scene +
+
+
+
+ EMAT_WAVE + irr::scene +
+
+
+
+ EMBF_CANCEL + irr::gui +
+
+
+
+ EMBF_FORCE_32BIT + irr::gui +
+
+
+
+ EMBF_NO + irr::gui +
+
+
+
+ EMBF_OK + irr::gui +
+
+
+
+ EMBF_YES + irr::gui +
+
+
+
+ EMBSM_EXTRA1 + irr +
+
+
+
+ EMBSM_EXTRA2 + irr +
+
+
+
+ EMBSM_FORCE_32_BIT + irr +
+
+
+
+ EMBSM_LEFT + irr +
+
+
+
+ EMBSM_MIDDLE + irr +
+
+
+
+ EMBSM_RIGHT + irr +
+
+
+
+ EMD3_ANIMATION_COUNT + irr::scene +
+
+
+
+ EMD3_BOTH_DEAD_1 + irr::scene +
+
+
+
+ EMD3_BOTH_DEAD_2 + irr::scene +
+
+
+
+ EMD3_BOTH_DEAD_3 + irr::scene +
+
+
+
+ EMD3_BOTH_DEATH_1 + irr::scene +
+
+
+
+ EMD3_BOTH_DEATH_2 + irr::scene +
+
+
+
+ EMD3_BOTH_DEATH_3 + irr::scene +
+
+
+
+ EMD3_HEAD + irr::scene +
+
+
+
+ EMD3_LEGS_BACK + irr::scene +
+
+
+
+ EMD3_LEGS_IDLE + irr::scene +
+
+
+
+ EMD3_LEGS_IDLE_CROUCH + irr::scene +
+
+
+
+ EMD3_LEGS_JUMP_1 + irr::scene +
+
+
+
+ EMD3_LEGS_JUMP_2 + irr::scene +
+
+
+
+ EMD3_LEGS_LAND_1 + irr::scene +
+
+
+
+ EMD3_LEGS_LAND_2 + irr::scene +
+
+
+
+ EMD3_LEGS_RUN + irr::scene +
+
+
+
+ EMD3_LEGS_SWIM + irr::scene +
+
+
+
+ EMD3_LEGS_TURN + irr::scene +
+
+
+
+ EMD3_LEGS_WALK + irr::scene +
+
+
+
+ EMD3_LEGS_WALK_CROUCH + irr::scene +
+
+
+
+ EMD3_LOWER + irr::scene +
+
+
+
+ EMD3_NUMMODELS + irr::scene +
+
+
+
+ EMD3_TORSO_ATTACK_1 + irr::scene +
+
+
+
+ EMD3_TORSO_ATTACK_2 + irr::scene +
+
+
+
+ EMD3_TORSO_DROP + irr::scene +
+
+
+
+ EMD3_TORSO_GESTURE + irr::scene +
+
+
+
+ EMD3_TORSO_RAISE + irr::scene +
+
+
+
+ EMD3_TORSO_STAND_1 + irr::scene +
+
+
+
+ EMD3_TORSO_STAND_2 + irr::scene +
+
+
+
+ EMD3_UPPER + irr::scene +
+
+
+
+ EMD3_WEAPON + irr::scene +
+
+
+
+ EMF_ANISOTROPIC_FILTER + irr::video +
+
+
+
+ EMF_ANTI_ALIASING + irr::video +
+
+
+
+ EMF_BACK_FACE_CULLING + irr::video +
+
+
+
+ EMF_BILINEAR_FILTER + irr::video +
+
+
+
+ EMF_BLEND_OPERATION + irr::video +
+
+
+
+ EMF_COLOR_MASK + irr::video +
+
+
+
+ EMF_COLOR_MATERIAL + irr::video +
+
+
+
+ EMF_FOG_ENABLE + irr::video +
+
+
+
+ EMF_FRONT_FACE_CULLING + irr::video +
+
+
+
+ EMF_GOURAUD_SHADING + irr::video +
+
+
+
+ EMF_LIGHTING + irr::video +
+
+
+
+ EMF_NORMALIZE_NORMALS + irr::video +
+
+
+
+ EMF_POINTCLOUD + irr::video +
+
+
+
+ EMF_POLYGON_OFFSET + irr::video +
+
+
+
+ EMF_TEXTURE_WRAP + irr::video +
+
+
+
+ EMF_TRILINEAR_FILTER + irr::video +
+
+
+
+ EMF_USE_MIP_MAPS + irr::video +
+
+
+
+ EMF_WIREFRAME + irr::video +
+
+
+
+ EMF_ZBUFFER + irr::video +
+
+
+
+ EMF_ZWRITE_ENABLE + irr::video +
+
+
+
+ EMFN_MODULATE_1X + irr::video +
+
+
+
+ EMFN_MODULATE_2X + irr::video +
+
+
+
+ EMFN_MODULATE_4X + irr::video +
+
+
+
+ EMIE_COUNT + irr +
+
+ +
+ +
+ + + +
+ +
+ + +
+
+ EMIE_MOUSE_MOVED + irr +
+
+
+
+ EMIE_MOUSE_WHEEL + irr +
+
+ +
+ +
+ + +
+
+ EMT_DETAIL_MAP + irr::video +
+
+
+
+ EMT_FORCE_32BIT + irr::video +
+
+
+
+ EMT_LIGHTMAP + irr::video +
+
+
+
+ EMT_LIGHTMAP_ADD + irr::video +
+
+
+
+ EMT_LIGHTMAP_LIGHTING + irr::video +
+
+
+
+ EMT_LIGHTMAP_LIGHTING_M2 + irr::video +
+
+
+
+ EMT_LIGHTMAP_LIGHTING_M4 + irr::video +
+
+
+
+ EMT_LIGHTMAP_M2 + irr::video +
+
+
+
+ EMT_LIGHTMAP_M4 + irr::video +
+
+
+
+ EMT_NORMAL_MAP_SOLID + irr::video +
+
+ + +
+
+ EMT_ONETEXTURE_BLEND + irr::video +
+
+
+
+ EMT_PARALLAX_MAP_SOLID + irr::video +
+
+ + +
+
+ EMT_REFLECTION_2_LAYER + irr::video +
+
+
+
+ EMT_SOLID + irr::video +
+
+
+
+ EMT_SOLID_2_LAYER + irr::video +
+
+
+
+ EMT_SPHERE_MAP + irr::video +
+
+
+
+ EMT_TRANSPARENT_ADD_COLOR + irr::video +
+
+
+ +
+
+ +
+ +
+
+ EMT_TRANSPARENT_VERTEX_ALPHA + irr::video +
+
+
+
+ EMWF_NONE + irr::scene +
+
+
+
+ EMWF_WRITE_BINARY + irr::scene +
+
+
+
+ EMWF_WRITE_COMPRESSED + irr::scene +
+
+
+
+ EMWF_WRITE_LIGHTMAPS + irr::scene +
+
+
+
+ EMWT_COLLADA + irr::scene +
+
+
+
+ EMWT_IRR_MESH + irr::scene +
+
+
+
+ EMWT_OBJ + irr::scene +
+
+
+
+ EMWT_PLY + irr::scene +
+
+
+
+ EMWT_STL + irr::scene +
+
+
+
+ ENVIRONMENT + irr::scene::quake3 +
+
+
+
+ EPAT_ATTRACT + irr::scene +
+
+
+
+ EPAT_COUNT + irr::scene +
+
+
+
+ EPAT_FADE_OUT + irr::scene +
+
+
+
+ EPAT_GRAVITY + irr::scene +
+
+
+
+ EPAT_NONE + irr::scene +
+
+
+
+ EPAT_ROTATE + irr::scene +
+
+
+
+ EPAT_SCALE + irr::scene +
+
+
+
+ EPET_ANIMATED_MESH + irr::scene +
+
+
+
+ EPET_BOX + irr::scene +
+
+
+
+ EPET_COUNT + irr::scene +
+
+
+
+ EPET_CYLINDER + irr::scene +
+
+
+
+ EPET_MESH + irr::scene +
+
+
+
+ EPET_POINT + irr::scene +
+
+
+
+ EPET_RING + irr::scene +
+
+
+
+ EPET_SPHERE + irr::scene +
+
+
+
+ EPO_BACK + irr::video +
+
+
+
+ EPO_FRONT + irr::video +
+
+
+
+ EPST_COUNT + irr::video +
+
+
+
+ EPST_PS_1_1 + irr::video +
+
+
+
+ EPST_PS_1_2 + irr::video +
+
+
+
+ EPST_PS_1_3 + irr::video +
+
+
+
+ EPST_PS_1_4 + irr::video +
+
+
+
+ EPST_PS_2_0 + irr::video +
+
+
+
+ EPST_PS_2_a + irr::video +
+
+
+
+ EPST_PS_2_b + irr::video +
+
+
+
+ EPST_PS_3_0 + irr::video +
+
+
+
+ EPST_PS_4_0 + irr::video +
+
+
+
+ EPST_PS_4_1 + irr::video +
+
+
+
+ EPST_PS_5_0 + irr::video +
+
+
+
+ EPT_LINE_LOOP + irr::scene +
+
+
+
+ EPT_LINE_STRIP + irr::scene +
+
+
+
+ EPT_LINES + irr::scene +
+
+
+
+ EPT_POINT_SPRITES + irr::scene +
+
+
+
+ EPT_POINTS + irr::scene +
+
+
+
+ EPT_POLYGON + irr::scene +
+
+
+
+ EPT_QUAD_STRIP + irr::scene +
+
+
+
+ EPT_QUADS + irr::scene +
+
+
+
+ EPT_TRIANGLE_FAN + irr::scene +
+
+
+
+ EPT_TRIANGLE_STRIP + irr::scene +
+
+
+
+ EPT_TRIANGLES + irr::scene +
+
+
+
+ ERT_AUX_BUFFER0 + irr::video +
+
+
+
+ ERT_AUX_BUFFER1 + irr::video +
+
+
+
+ ERT_AUX_BUFFER2 + irr::video +
+
+
+
+ ERT_AUX_BUFFER3 + irr::video +
+
+
+
+ ERT_AUX_BUFFER4 + irr::video +
+
+
+
+ ERT_FRAME_BUFFER + irr::video +
+
+
+
+ ERT_MULTI_RENDER_TEXTURES + irr::video +
+
+
+
+ ERT_RENDER_TEXTURE + irr::video +
+
+
+
+ ERT_STEREO_BOTH_BUFFERS + irr::video +
+
+
+
+ ERT_STEREO_LEFT_BUFFER + irr::video +
+
+
+
+ ERT_STEREO_RIGHT_BUFFER + irr::video +
+
+
+
+ ESNAT_CAMERA_FPS + irr::scene +
+
+
+
+ ESNAT_CAMERA_MAYA + irr::scene +
+
+
+
+ ESNAT_COLLISION_RESPONSE + irr::scene +
+
+
+
+ ESNAT_COUNT + irr::scene +
+
+
+
+ ESNAT_DELETION + irr::scene +
+
+
+
+ ESNAT_FLY_CIRCLE + irr::scene +
+
+
+
+ ESNAT_FLY_STRAIGHT + irr::scene +
+
+
+
+ ESNAT_FOLLOW_SPLINE + irr::scene +
+
+
+
+ ESNAT_FORCE_32_BIT + irr::scene +
+
+
+
+ ESNAT_ROTATION + irr::scene +
+
+
+
+ ESNAT_TEXTURE + irr::scene +
+
+
+
+ ESNAT_UNKNOWN + irr::scene +
+
+
+
+ ESNRP_AUTOMATIC + irr::scene +
+
+
+
+ ESNRP_CAMERA + irr::scene +
+
+
+
+ ESNRP_LIGHT + irr::scene +
+
+
+
+ ESNRP_NONE + irr::scene +
+
+
+
+ ESNRP_SHADOW + irr::scene +
+
+
+
+ ESNRP_SKY_BOX + irr::scene +
+
+
+
+ ESNRP_SOLID + irr::scene +
+
+
+
+ ESNRP_TRANSPARENT + irr::scene +
+
+
+
+ ESNRP_TRANSPARENT_EFFECT + irr::scene +
+
+
+
+ ESNT_ANIMATED_MESH + irr::scene +
+
+
+
+ ESNT_ANY + irr::scene +
+
+
+
+ ESNT_BILLBOARD + irr::scene +
+
+
+
+ ESNT_CAMERA + irr::scene +
+
+
+
+ ESNT_CAMERA_FPS + irr::scene +
+
+
+
+ ESNT_CAMERA_MAYA + irr::scene +
+
+
+
+ ESNT_CUBE + irr::scene +
+
+
+
+ ESNT_DUMMY_TRANSFORMATION + irr::scene +
+
+
+
+ ESNT_EMPTY + irr::scene +
+
+
+
+ ESNT_LIGHT + irr::scene +
+
+
+
+ ESNT_MD3_SCENE_NODE + irr::scene +
+
+
+
+ ESNT_MESH + irr::scene +
+
+
+
+ ESNT_OCTREE + irr::scene +
+
+
+
+ ESNT_PARTICLE_SYSTEM + irr::scene +
+
+
+
+ ESNT_Q3SHADER_SCENE_NODE + irr::scene +
+
+
+
+ ESNT_SCENE_MANAGER + irr::scene +
+
+
+
+ ESNT_SHADOW_VOLUME + irr::scene +
+
+
+
+ ESNT_SKY_BOX + irr::scene +
+
+
+
+ ESNT_SKY_DOME + irr::scene +
+
+
+
+ ESNT_SPHERE + irr::scene +
+
+
+
+ ESNT_TERRAIN + irr::scene +
+
+
+
+ ESNT_TEXT + irr::scene +
+
+
+
+ ESNT_UNKNOWN + irr::scene +
+
+
+
+ ESNT_VOLUME_LIGHT + irr::scene +
+
+
+
+ ESNT_WATER_SURFACE + irr::scene +
+
+
+
+ ETC_CLAMP + irr::video +
+
+
+
+ ETC_CLAMP_TO_BORDER + irr::video +
+
+
+
+ ETC_CLAMP_TO_EDGE + irr::video +
+
+
+
+ ETC_MIRROR + irr::video +
+
+
+
+ ETC_MIRROR_CLAMP + irr::video +
+
+
+
+ ETC_MIRROR_CLAMP_TO_BORDER + irr::video +
+
+
+
+ ETC_MIRROR_CLAMP_TO_EDGE + irr::video +
+
+
+
+ ETC_REPEAT + irr::video +
+
+
+
+ ETCF_ALLOW_NON_POWER_2 + irr::video +
+
+
+
+ ETCF_ALWAYS_16_BIT + irr::video +
+
+
+
+ ETCF_ALWAYS_32_BIT + irr::video +
+
+
+
+ ETCF_CREATE_MIP_MAPS + irr::video +
+
+
+
+ ETCF_FORCE_32_BIT_DO_NOT_USE + irr::video +
+
+
+
+ ETCF_NO_ALPHA_CHANNEL + irr::video +
+
+
+
+ ETCF_OPTIMIZED_FOR_QUALITY + irr::video +
+
+
+
+ ETCF_OPTIMIZED_FOR_SPEED + irr::video +
+
+
+
+ ETF_ASCII + irr::io +
+
+
+
+ ETF_UTF16_BE + irr::io +
+
+
+
+ ETF_UTF16_LE + irr::io +
+
+
+
+ ETF_UTF32_BE + irr::io +
+
+
+
+ ETF_UTF32_LE + irr::io +
+
+
+
+ ETF_UTF8 + irr::io +
+
+
+
+ ETLM_READ_ONLY + irr::video +
+
+
+
+ ETLM_READ_WRITE + irr::video +
+
+
+
+ ETLM_WRITE_ONLY + irr::video +
+
+
+
+ ETPS_129 + irr::scene +
+
+
+
+ ETPS_17 + irr::scene +
+
+
+
+ ETPS_33 + irr::scene +
+
+
+
+ ETPS_65 + irr::scene +
+
+
+
+ ETPS_9 + irr::scene +
+
+
+
+ ETS_COUNT + irr::video +
+
+
+
+ ETS_PROJECTION + irr::video +
+
+
+
+ ETS_TEXTURE_0 + irr::video +
+
+
+
+ ETS_TEXTURE_1 + irr::video +
+
+
+
+ ETS_TEXTURE_2 + irr::video +
+
+
+
+ ETS_TEXTURE_3 + irr::video +
+
+
+
+ ETS_VIEW + irr::video +
+
+
+
+ ETS_WORLD + irr::video +
+
+
+
+ EVDF_ALPHA_TO_COVERAGE + irr::video +
+
+
+
+ EVDF_ARB_FRAGMENT_PROGRAM_1 + irr::video +
+
+
+
+ EVDF_ARB_GLSL + irr::video +
+
+
+
+ EVDF_ARB_VERTEX_PROGRAM_1 + irr::video +
+
+
+
+ EVDF_BILINEAR_FILTER + irr::video +
+
+
+
+ EVDF_BLEND_OPERATIONS + irr::video +
+
+
+
+ EVDF_CG + irr::video +
+
+
+
+ EVDF_COLOR_MASK + irr::video +
+
+
+
+ EVDF_COUNT + irr::video +
+
+
+
+ EVDF_FRAMEBUFFER_OBJECT + irr::video +
+
+
+
+ EVDF_GEOMETRY_SHADER + irr::video +
+
+
+
+ EVDF_HARDWARE_TL + irr::video +
+
+
+
+ EVDF_HLSL + irr::video +
+
+
+
+ EVDF_MIP_MAP + irr::video +
+
+
+
+ EVDF_MIP_MAP_AUTO_UPDATE + irr::video +
+
+
+
+ EVDF_MRT_BLEND + irr::video +
+
+
+
+ EVDF_MRT_BLEND_FUNC + irr::video +
+
+
+
+ EVDF_MRT_COLOR_MASK + irr::video +
+
+
+
+ EVDF_MULTIPLE_RENDER_TARGETS + irr::video +
+
+
+
+ EVDF_MULTITEXTURE + irr::video +
+
+
+
+ EVDF_OCCLUSION_QUERY + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_1 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_2 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_3 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_1_4 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_2_0 + irr::video +
+
+
+
+ EVDF_PIXEL_SHADER_3_0 + irr::video +
+
+
+
+ EVDF_POLYGON_OFFSET + irr::video +
+
+
+
+ EVDF_RENDER_TO_TARGET + irr::video +
+
+
+
+ EVDF_STENCIL_BUFFER + irr::video +
+
+
+
+ EVDF_TEXTURE_MATRIX + irr::video +
+
+
+
+ EVDF_TEXTURE_NPOT + irr::video +
+
+
+
+ EVDF_TEXTURE_NSQUARE + irr::video +
+
+
+
+ EVDF_VERTEX_BUFFER_OBJECT + irr::video +
+
+
+
+ EVDF_VERTEX_SHADER_1_1 + irr::video +
+
+
+
+ EVDF_VERTEX_SHADER_2_0 + irr::video +
+
+
+
+ EVDF_VERTEX_SHADER_3_0 + irr::video +
+
+
+
+ EVST_COUNT + irr::video +
+
+
+
+ EVST_VS_1_1 + irr::video +
+
+
+
+ EVST_VS_2_0 + irr::video +
+
+
+
+ EVST_VS_2_a + irr::video +
+
+
+
+ EVST_VS_3_0 + irr::video +
+
+
+
+ EVST_VS_4_0 + irr::video +
+
+
+
+ EVST_VS_4_1 + irr::video +
+
+
+
+ EVST_VS_5_0 + irr::video +
+
+
+
+ EVT_2TCOORDS + irr::video +
+
+
+
+ EVT_STANDARD + irr::video +
+
+
+
+ EVT_TANGENTS + irr::video +
+
+
+
+ EWD_FRIDAY + irr::ITimer +
+
+
+
+ EWD_MONDAY + irr::ITimer +
+
+
+
+ EWD_SATURDAY + irr::ITimer +
+
+
+
+ EWD_SUNDAY + irr::ITimer +
+
+
+
+ EWD_THURSDAY + irr::ITimer +
+
+
+
+ EWD_TUESDAY + irr::ITimer +
+
+
+
+ EWD_WEDNESDAY + irr::ITimer +
+
+
+
+ EXACTVERTEX + irr::scene::quake3 +
+
+
+
+ EXN_CDATA + irr::io +
+
+
+
+ EXN_COMMENT + irr::io +
+
+
+
+ EXN_ELEMENT + irr::io +
+
+
+
+ EXN_ELEMENT_END + irr::io +
+
+
+
+ EXN_NONE + irr::io +
+
+
+
+ EXN_TEXT + irr::io +
+
+
+
+ EXN_UNKNOWN + irr::io +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_66.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_66.html new file mode 100644 index 0000000..cf40ab7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_66.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ FILESYSTEM_NATIVE + irr::io +
+
+
+
+ FILESYSTEM_VIRTUAL + irr::io +
+
+
+
+ FUNCTION2 + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_69.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_69.html new file mode 100644 index 0000000..042a648 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_69.html @@ -0,0 +1,74 @@ + + + + + + + +
+
Loading...
+
+
+ IDENTITY + irr::scene::quake3 +
+
+
+
+ IDENTITYLIGHTING + irr::scene::quake3 +
+
+
+
+ IRR_LOCALE_ANSI + irr::core +
+
+
+
+ IRR_LOCALE_GERMAN + irr::core +
+
+
+
+ ISREL3D_BACK + irr::core +
+
+
+
+ ISREL3D_CLIPPED + irr::core +
+
+
+
+ ISREL3D_FRONT + irr::core +
+
+
+
+ ISREL3D_PLANAR + irr::core +
+
+
+
+ ISREL3D_SPANNING + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6b.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6b.html new file mode 100644 index 0000000..0627fe8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6b.html @@ -0,0 +1,944 @@ + + + + + + + +
+
Loading...
+
+
+ KEY_ACCEPT + irr +
+
+
+
+ KEY_ADD + irr +
+
+
+
+ KEY_APPS + irr +
+
+
+
+ KEY_ATTN + irr +
+
+
+
+ KEY_BACK + irr +
+
+
+
+ KEY_CANCEL + irr +
+
+
+
+ KEY_CAPITAL + irr +
+
+
+
+ KEY_CLEAR + irr +
+
+
+
+ KEY_COMMA + irr +
+
+
+
+ KEY_CONTROL + irr +
+
+
+
+ KEY_CONVERT + irr +
+
+
+
+ KEY_CRSEL + irr +
+
+
+
+ KEY_DECIMAL + irr +
+
+
+
+ KEY_DELETE + irr +
+
+
+
+ KEY_DIVIDE + irr +
+
+
+
+ KEY_DOWN + irr +
+
+
+
+ KEY_END + irr +
+
+
+
+ KEY_EREOF + irr +
+
+
+
+ KEY_ESCAPE + irr +
+
+
+
+ KEY_EXECUT + irr +
+
+
+
+ KEY_EXSEL + irr +
+
+
+
+ KEY_F1 + irr +
+
+
+
+ KEY_F10 + irr +
+
+
+
+ KEY_F11 + irr +
+
+
+
+ KEY_F12 + irr +
+
+
+
+ KEY_F13 + irr +
+
+
+
+ KEY_F14 + irr +
+
+
+
+ KEY_F15 + irr +
+
+
+
+ KEY_F16 + irr +
+
+
+
+ KEY_F17 + irr +
+
+
+
+ KEY_F18 + irr +
+
+
+
+ KEY_F19 + irr +
+
+
+
+ KEY_F2 + irr +
+
+
+
+ KEY_F20 + irr +
+
+
+
+ KEY_F21 + irr +
+
+
+
+ KEY_F22 + irr +
+
+
+
+ KEY_F23 + irr +
+
+
+
+ KEY_F24 + irr +
+
+
+
+ KEY_F3 + irr +
+
+
+
+ KEY_F4 + irr +
+
+
+
+ KEY_F5 + irr +
+
+
+
+ KEY_F6 + irr +
+
+
+
+ KEY_F7 + irr +
+
+
+
+ KEY_F8 + irr +
+
+
+
+ KEY_F9 + irr +
+
+
+
+ KEY_FINAL + irr +
+
+
+
+ KEY_HANGUEL + irr +
+
+
+
+ KEY_HANGUL + irr +
+
+
+
+ KEY_HANJA + irr +
+
+
+
+ KEY_HELP + irr +
+
+
+
+ KEY_HOME + irr +
+
+
+
+ KEY_INSERT + irr +
+
+
+
+ KEY_JUNJA + irr +
+
+
+
+ KEY_KANA + irr +
+
+
+
+ KEY_KANJI + irr +
+
+
+
+ KEY_KEY_0 + irr +
+
+
+
+ KEY_KEY_1 + irr +
+
+
+
+ KEY_KEY_2 + irr +
+
+
+
+ KEY_KEY_3 + irr +
+
+
+
+ KEY_KEY_4 + irr +
+
+
+
+ KEY_KEY_5 + irr +
+
+
+
+ KEY_KEY_6 + irr +
+
+
+
+ KEY_KEY_7 + irr +
+
+
+
+ KEY_KEY_8 + irr +
+
+
+
+ KEY_KEY_9 + irr +
+
+
+
+ KEY_KEY_A + irr +
+
+
+
+ KEY_KEY_B + irr +
+
+
+
+ KEY_KEY_C + irr +
+
+
+ +
+
+
+ KEY_KEY_D + irr +
+
+
+
+ KEY_KEY_E + irr +
+
+
+
+ KEY_KEY_F + irr +
+
+
+
+ KEY_KEY_G + irr +
+
+
+
+ KEY_KEY_H + irr +
+
+
+
+ KEY_KEY_I + irr +
+
+
+
+ KEY_KEY_J + irr +
+
+
+
+ KEY_KEY_K + irr +
+
+
+
+ KEY_KEY_L + irr +
+
+
+
+ KEY_KEY_M + irr +
+
+
+
+ KEY_KEY_N + irr +
+
+
+
+ KEY_KEY_O + irr +
+
+
+
+ KEY_KEY_P + irr +
+
+
+
+ KEY_KEY_Q + irr +
+
+
+
+ KEY_KEY_R + irr +
+
+
+
+ KEY_KEY_S + irr +
+
+
+
+ KEY_KEY_T + irr +
+
+
+
+ KEY_KEY_U + irr +
+
+
+
+ KEY_KEY_V + irr +
+
+
+
+ KEY_KEY_W + irr +
+
+
+
+ KEY_KEY_X + irr +
+
+
+
+ KEY_KEY_Y + irr +
+
+
+
+ KEY_KEY_Z + irr +
+
+
+
+ KEY_LBUTTON + irr +
+
+
+
+ KEY_LCONTROL + irr +
+
+
+
+ KEY_LEFT + irr +
+
+
+
+ KEY_LMENU + irr +
+
+
+
+ KEY_LSHIFT + irr +
+
+
+
+ KEY_LWIN + irr +
+
+
+
+ KEY_MBUTTON + irr +
+
+
+
+ KEY_MENU + irr +
+
+
+
+ KEY_MINUS + irr +
+
+
+
+ KEY_MODECHANGE + irr +
+
+
+
+ KEY_MULTIPLY + irr +
+
+
+
+ KEY_NEXT + irr +
+
+
+
+ KEY_NONCONVERT + irr +
+
+
+
+ KEY_NUMLOCK + irr +
+
+
+
+ KEY_NUMPAD0 + irr +
+
+
+
+ KEY_NUMPAD1 + irr +
+
+
+
+ KEY_NUMPAD2 + irr +
+
+
+
+ KEY_NUMPAD3 + irr +
+
+
+
+ KEY_NUMPAD4 + irr +
+
+
+
+ KEY_NUMPAD5 + irr +
+
+
+
+ KEY_NUMPAD6 + irr +
+
+
+
+ KEY_NUMPAD7 + irr +
+
+
+
+ KEY_NUMPAD8 + irr +
+
+
+
+ KEY_NUMPAD9 + irr +
+
+
+
+ KEY_OEM_1 + irr +
+
+
+
+ KEY_OEM_102 + irr +
+
+
+
+ KEY_OEM_2 + irr +
+
+
+
+ KEY_OEM_3 + irr +
+
+
+
+ KEY_OEM_4 + irr +
+
+
+
+ KEY_OEM_5 + irr +
+
+
+
+ KEY_OEM_6 + irr +
+
+
+
+ KEY_OEM_7 + irr +
+
+
+
+ KEY_OEM_8 + irr +
+
+
+
+ KEY_OEM_AX + irr +
+
+
+
+ KEY_OEM_CLEAR + irr +
+
+
+
+ KEY_PA1 + irr +
+
+
+
+ KEY_PAUSE + irr +
+
+
+
+ KEY_PERIOD + irr +
+
+
+
+ KEY_PLAY + irr +
+
+
+
+ KEY_PLUS + irr +
+
+
+
+ KEY_PRINT + irr +
+
+
+
+ KEY_PRIOR + irr +
+
+
+
+ KEY_RBUTTON + irr +
+
+
+
+ KEY_RCONTROL + irr +
+
+
+
+ KEY_RETURN + irr +
+
+
+
+ KEY_RIGHT + irr +
+
+
+
+ KEY_RMENU + irr +
+
+
+
+ KEY_RSHIFT + irr +
+
+
+
+ KEY_RWIN + irr +
+
+
+
+ KEY_SCROLL + irr +
+
+
+
+ KEY_SELECT + irr +
+
+
+
+ KEY_SEPARATOR + irr +
+
+
+
+ KEY_SHIFT + irr +
+
+
+
+ KEY_SLEEP + irr +
+
+
+
+ KEY_SNAPSHOT + irr +
+
+
+
+ KEY_SPACE + irr +
+
+
+
+ KEY_SUBTRACT + irr +
+
+
+
+ KEY_TAB + irr +
+
+
+
+ KEY_UP + irr +
+
+
+
+ KEY_XBUTTON1 + irr +
+
+
+
+ KEY_XBUTTON2 + irr +
+
+
+
+ KEY_ZOOM + irr +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6c.html new file mode 100644 index 0000000..979f96c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6c.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ LIGHTINGSPECULAR + irr::scene::quake3 +
+
+
+
+ LIGHTMAP + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6d.html new file mode 100644 index 0000000..6a47b35 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6d.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ MAP + irr::scene::quake3 +
+
+
+
+ MOVE + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6e.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6e.html new file mode 100644 index 0000000..0c041b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_6e.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ NOISE + irr::scene::quake3 +
+
+
+
+ NORMAL + irr::scene::quake3 +
+
+
+
+ NUMBER_OF_AXES + irr::SEvent::SJoystickEvent +
+
+
+
+ NUMBER_OF_BUTTONS + irr::SEvent::SJoystickEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_70.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_70.html new file mode 100644 index 0000000..dc31fa0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_70.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ POV_HAT_ABSENT + irr::SJoystickInfo +
+
+
+
+ POV_HAT_PRESENT + irr::SJoystickInfo +
+
+
+
+ POV_HAT_UNKNOWN + irr::SJoystickInfo +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_72.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_72.html new file mode 100644 index 0000000..0ada44a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_72.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ RGBGEN + irr::scene::quake3 +
+
+
+
+ ROTATE + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_73.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_73.html new file mode 100644 index 0000000..22b1d7c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_73.html @@ -0,0 +1,62 @@ + + + + + + + +
+
Loading...
+
+
+ SAWTOOTH + irr::scene::quake3 +
+
+
+
+ SAWTOOTH_INVERSE + irr::scene::quake3 +
+
+
+
+ SCALE + irr::scene::quake3 +
+
+
+
+ SCROLL + irr::scene::quake3 +
+
+
+
+ SINUS + irr::scene::quake3 +
+
+
+
+ SQUARE + irr::scene::quake3 +
+
+
+
+ STRETCH + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_74.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_74.html new file mode 100644 index 0000000..fa86f9f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_74.html @@ -0,0 +1,56 @@ + + + + + + + +
+
Loading...
+
+
+ TCGEN + irr::scene::quake3 +
+
+
+
+ TCMOD + irr::scene::quake3 +
+
+
+
+ TEXTURE + irr::scene::quake3 +
+
+
+
+ TRANSFORM + irr::scene::quake3 +
+
+
+
+ TRIANGLE + irr::scene::quake3 +
+
+
+
+ TURBULENCE + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_75.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_75.html new file mode 100644 index 0000000..36b0505 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_75.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ UNKNOWN + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_76.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_76.html new file mode 100644 index 0000000..d4bd3ab --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_76.html @@ -0,0 +1,68 @@ + + + + + + + +
+
Loading...
+
+
+ VERTEX + irr::scene::quake3 +
+
+
+
+ VF_BOTTOM_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_FAR_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_LEFT_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_NEAR_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_PLANE_COUNT + irr::scene::SViewFrustum +
+
+
+
+ VF_RIGHT_PLANE + irr::scene::SViewFrustum +
+
+
+
+ VF_TOP_PLANE + irr::scene::SViewFrustum +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_77.html b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_77.html new file mode 100644 index 0000000..bbcf3d5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/enumvalues_77.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ WAVE + irr::scene::quake3 +
+
+
+
+ WAVE_MODIFIER_FUNCTION + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_61.html b/src/others/irrlicht-1.8.1/doc/html/search/files_61.html new file mode 100644 index 0000000..7aa7bc8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_61.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_63.html b/src/others/irrlicht-1.8.1/doc/html/search/files_63.html new file mode 100644 index 0000000..5cdfe85 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_63.html @@ -0,0 +1,45 @@ + + + + + + + +
+
Loading...
+ + +
+ +
+
+ +
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_64.html b/src/others/irrlicht-1.8.1/doc/html/search/files_64.html new file mode 100644 index 0000000..f97a9ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_64.html @@ -0,0 +1,30 @@ + + + + + + + +
+
Loading...
+
+ +
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_65.html b/src/others/irrlicht-1.8.1/doc/html/search/files_65.html new file mode 100644 index 0000000..0517c01 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_65.html @@ -0,0 +1,110 @@ + + + + + + + +
+
Loading...
+
+ +
+ + + + + + + + + + + + + + + + + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_66.html b/src/others/irrlicht-1.8.1/doc/html/search/files_66.html new file mode 100644 index 0000000..8d263ab --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_66.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_68.html b/src/others/irrlicht-1.8.1/doc/html/search/files_68.html new file mode 100644 index 0000000..c0e8d5e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_68.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_69.html b/src/others/irrlicht-1.8.1/doc/html/search/files_69.html new file mode 100644 index 0000000..0f9329c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_69.html @@ -0,0 +1,630 @@ + + + + + + + +
+
Loading...
+ + + + + +
+ +
+ + + + + + + + + + +
+ +
+
+ +
+ + +
+ +
+ + + + +
+ +
+
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+ + + +
+ +
+
+ +
+ +
+ +
+
+
+ IImage.h +
+
+ + + + + +
+
+ ILogger.h +
+
+ + +
+
+ IMesh.h +
+
+
+ +
+
+ +
+
+ +
+ + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+ + +
+ +
+ +
+ +
+ +
+
+ irrList.h +
+
+
+
+ irrMap.h +
+
+
+
+ irrMath.h +
+
+
+
+ irrpack.h +
+
+
+ +
+
+ +
+
+ +
+
+
+ irrXML.h +
+
+ + + +
+ +
+ + + + + + + + + + + + +
+ +
+
+
+ ITimer.h +
+
+ + + + + +
+ +
+
+ +
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_6b.html b/src/others/irrlicht-1.8.1/doc/html/search/files_6b.html new file mode 100644 index 0000000..7c13702 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_6b.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/files_6c.html new file mode 100644 index 0000000..4a289c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_6c.html @@ -0,0 +1,30 @@ + + + + + + + +
+
Loading...
+
+
+ line2d.h +
+
+
+
+ line3d.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/files_6d.html new file mode 100644 index 0000000..9815b0f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_6d.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+
+ matrix4.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_70.html b/src/others/irrlicht-1.8.1/doc/html/search/files_70.html new file mode 100644 index 0000000..cb298f8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_70.html @@ -0,0 +1,35 @@ + + + + + + + +
+
Loading...
+
+
+ path.h +
+
+
+
+ plane3d.h +
+
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_71.html b/src/others/irrlicht-1.8.1/doc/html/search/files_71.html new file mode 100644 index 0000000..0e6857f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_71.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_72.html b/src/others/irrlicht-1.8.1/doc/html/search/files_72.html new file mode 100644 index 0000000..88d30dc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_72.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+
+ rect.h +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_73.html b/src/others/irrlicht-1.8.1/doc/html/search/files_73.html new file mode 100644 index 0000000..9d39a33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_73.html @@ -0,0 +1,120 @@ + + + + + + + +
+
Loading...
+
+ +
+ + +
+
+ SColor.h +
+
+ + +
+
+ SKeyMap.h +
+
+
+
+ SLight.h +
+
+
+ +
+ +
+
+ SMesh.h +
+
+
+ +
+ + +
+ +
+ + + + + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_74.html b/src/others/irrlicht-1.8.1/doc/html/search/files_74.html new file mode 100644 index 0000000..1d8dac5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_74.html @@ -0,0 +1,30 @@ + + + + + + + +
+
Loading...
+
+ +
+
+
+ tut.txt +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/files_76.html b/src/others/irrlicht-1.8.1/doc/html/search/files_76.html new file mode 100644 index 0000000..20e84ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/files_76.html @@ -0,0 +1,30 @@ + + + + + + + +
+
Loading...
+
+ +
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_61.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_61.html new file mode 100644 index 0000000..65a34e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_61.html @@ -0,0 +1,957 @@ + + + + + + + +
+
Loading...
+
+
+ A1R5G5B5toA8R8G8B8 + irr::video +
+
+
+
+ A1R5G5B5toR5G6B5 + irr::video +
+
+
+
+ A8R8G8B8toA1R5G5B5 + irr::video +
+
+
+
+ A8R8G8B8toR5G6B5 + irr::video +
+
+ +
+
+ abs_ + irr::core +
+
+
+
+ activateJoysticks + irr::IrrlichtDevice +
+
+
+
+ addAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ addAnimatedMeshSceneNode + irr::scene::ISceneManager +
+
+
+
+ addAnimator + irr::scene::ISceneNode +
+
+
+
+ addArchiveLoader + irr::io::IFileSystem +
+
+
+
+ addArray + irr::io::IAttributes +
+
+
+
+ addArrowMesh + irr::scene::ISceneManager +
+
+
+
+ addBillboardSceneNode + irr::scene::ISceneManager +
+
+
+
+ addBillboardTextSceneNode + irr::scene::ISceneManager +
+
+
+
+ addBinary + irr::io::IAttributes +
+
+
+
+ addBool + irr::io::IAttributes +
+
+
+
+ addBox3d + irr::io::IAttributes +
+
+ +
+
+ addCameraSceneNode + irr::scene::ISceneManager +
+
+
+
+ addCameraSceneNodeFPS + irr::scene::ISceneManager +
+
+
+
+ addCameraSceneNodeMaya + irr::scene::ISceneManager +
+
+
+
+ addCheckBox + irr::gui::IGUIEnvironment +
+
+ +
+
+ addChildBack + irr::gui::IGUITreeViewNode +
+
+
+
+ addChildFront + irr::gui::IGUITreeViewNode +
+
+
+
+ addChildToEnd + irr::gui::IGUIElement +
+
+
+
+ addColor + irr::io::IAttributes +
+
+
+
+ addColorf + irr::io::IAttributes +
+
+
+
+ addColorSelectDialog + irr::gui::IGUIEnvironment +
+
+
+
+ addColumn + irr::gui::IGUITable +
+
+
+
+ addComboBox + irr::gui::IGUIEnvironment +
+
+
+
+ addContextMenu + irr::gui::IGUIEnvironment +
+
+
+
+ addCubeSceneNode + irr::scene::ISceneManager +
+
+
+
+ addDimension2d + irr::io::IAttributes +
+
+
+
+ addDummyTransformationSceneNode + irr::scene::ISceneManager +
+
+
+
+ addDynamicLight + irr::video::IVideoDriver +
+
+
+
+ addEditBox + irr::gui::IGUIEnvironment +
+
+
+
+ addEmptySceneNode + irr::scene::ISceneManager +
+
+
+
+ addEmptySpriteBank + irr::gui::IGUIEnvironment +
+
+ +
+
+ addExternalImageLoader + irr::video::IVideoDriver +
+
+
+
+ addExternalImageWriter + irr::video::IVideoDriver +
+
+
+
+ addExternalMeshLoader + irr::scene::ISceneManager +
+
+
+
+ addExternalSceneLoader + irr::scene::ISceneManager +
+
+ +
+
+ addFileOpenDialog + irr::gui::IGUIEnvironment +
+
+
+
+ addFloat + irr::io::IAttributes +
+
+
+
+ addFolderFileArchive + irr::io::IFileSystem +
+
+
+
+ addFont + irr::gui::IGUIEnvironment +
+
+ +
+
+ addHighLevelShaderMaterial +
+ irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const c8 *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const c8 *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0 + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const c8 *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, const c8 *geometryShaderProgram=0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) +
+
+
+
+
+ addHighLevelShaderMaterialFromFiles +
+ irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const io::path &pixelShaderProgramFileName, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const io::path &geometryShaderProgramFileName, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0 + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const io::path &pixelShaderProgramFileName="", const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", const io::path &geometryShaderProgramFileName="", scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0) + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, io::IReadFile *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, io::IReadFile *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)=0 + irr::video::IGPUProgrammingServices::addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, io::IReadFile *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0, E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) +
+
+
+
+
+ addHillPlaneMesh + irr::scene::ISceneManager +
+
+
+
+ addIcon + irr::gui::ICursorControl +
+
+ +
+
+ addInOutFader + irr::gui::IGUIEnvironment +
+
+
+
+ addInt + irr::io::IAttributes +
+
+
+
+ addInternalBox + irr::core::aabbox3d +
+
+ + +
+
+ addJoint + irr::scene::ISkinnedMesh +
+
+
+
+ addLightSceneNode + irr::scene::ISceneManager +
+
+
+
+ addLine2d + irr::io::IAttributes +
+
+
+
+ addLine3d + irr::io::IAttributes +
+
+
+
+ addListBox + irr::gui::IGUIEnvironment +
+
+
+
+ addMaterialRenderer + irr::video::IVideoDriver +
+
+
+
+ addMatrix + irr::io::IAttributes +
+
+
+
+ addMenu + irr::gui::IGUIEnvironment +
+
+ + +
+
+ addMeshSceneNode + irr::scene::ISceneManager +
+
+
+
+ addMeshViewer + irr::gui::IGUIEnvironment +
+
+
+
+ addMessageBox + irr::gui::IGUIEnvironment +
+
+
+
+ addModalScreen + irr::gui::IGUIEnvironment +
+
+
+
+ addOcclusionQuery + irr::video::IVideoDriver +
+
+ + +
+
+ addPakFileArchive + irr::io::IFileSystem +
+
+
+
+ addParticleSystemSceneNode + irr::scene::ISceneManager +
+
+
+
+ addPlane3d + irr::io::IAttributes +
+
+
+
+ addPosition2d + irr::io::IAttributes +
+
+
+
+ addPositionKey + irr::scene::ISkinnedMesh +
+
+
+
+ addQuake3SceneNode + irr::scene::ISceneManager +
+
+
+
+ addQuaternion + irr::io::IAttributes +
+
+
+
+ addRect + irr::io::IAttributes +
+
+
+
+ addRenderTargetTexture + irr::video::IVideoDriver +
+
+
+
+ addRotationKey + irr::scene::ISkinnedMesh +
+
+
+
+ addRow + irr::gui::IGUITable +
+
+
+
+ addScaleKey + irr::scene::ISkinnedMesh +
+
+ +
+
+ addScrollBar + irr::gui::IGUIEnvironment +
+
+
+
+ addSeparator + irr::gui::IGUIContextMenu +
+
+
+
+ addShaderMaterial + irr::video::IGPUProgrammingServices +
+
+ + +
+
+ addSkyBoxSceneNode + irr::scene::ISceneManager +
+
+
+
+ addSkyDomeSceneNode + irr::scene::ISceneManager +
+
+
+
+ addSphereMesh + irr::scene::ISceneManager +
+
+
+
+ addSphereSceneNode + irr::scene::ISceneManager +
+
+
+
+ addSpinBox + irr::gui::IGUIEnvironment +
+
+
+
+ addStaticText + irr::gui::IGUIEnvironment +
+
+ + +
+
+ addTabControl + irr::gui::IGUIEnvironment +
+
+
+
+ addTable + irr::gui::IGUIEnvironment +
+
+
+
+ addTerrainMesh + irr::scene::ISceneManager +
+
+ +
+
+ addTextSceneNode + irr::scene::ISceneManager +
+
+ +
+
+ addTextureAsSprite + irr::gui::IGUISpriteBank +
+
+
+
+ addToDeletionQueue + irr::scene::ISceneManager +
+
+
+
+ addToolBar + irr::gui::IGUIEnvironment +
+
+
+
+ addTreeView + irr::gui::IGUIEnvironment +
+
+
+
+ addTriangle3d + irr::io::IAttributes +
+
+
+
+ addTriangleSelector + irr::scene::IMetaTriangleSelector +
+
+
+
+ addUserPointer + irr::io::IAttributes +
+
+
+
+ addVector2d + irr::io::IAttributes +
+
+
+
+ addVector3d + irr::io::IAttributes +
+
+
+
+ addVolumeLightMesh + irr::scene::ISceneManager +
+
+
+
+ addVolumeLightSceneNode + irr::scene::ISceneManager +
+
+
+
+ addWaterSurfaceSceneNode + irr::scene::ISceneManager +
+
+
+
+ addWeight + irr::scene::ISkinnedMesh +
+
+
+
+ addWindow + irr::gui::IGUIEnvironment +
+
+
+
+ addZipFileArchive + irr::io::IFileSystem +
+
+
+
+ affect + irr::scene::IParticleAffector +
+
+ + +
+
+ animateJoints + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ animateMesh + irr::scene::ISkinnedMesh +
+
+
+
+ animateNode + irr::scene::ISceneNodeAnimator +
+
+ + +
+
+ apply_ + irr::scene::IMeshManipulator +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_62.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_62.html new file mode 100644 index 0000000..1df6287 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_62.html @@ -0,0 +1,153 @@ + + + + + + + +
+
Loading...
+ +
+
+ beginScene + irr::video::IVideoDriver +
+
+ +
+
+ binary_search_multi + irr::core::array +
+
+
+
+ bindTargetAndRotation + irr::scene::ICameraSceneNode +
+
+
+
+ boundingBoxNeedsRecalculated + irr::scene::SSkinMeshBuffer +
+
+
+
+ bringToFront + irr::gui::IGUIElement +
+
+
+
+ buildAxisAlignedBillboard + irr::core::CMatrix4 +
+
+
+
+ buildCameraLookAtMatrixLH + irr::core::CMatrix4 +
+
+
+
+ buildCameraLookAtMatrixRH + irr::core::CMatrix4 +
+
+
+
+ buildNDCToDCMatrix + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixOrthoLH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixOrthoRH + irr::core::CMatrix4 +
+
+
+ +
+
+
+ buildProjectionMatrixPerspectiveFovLH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixPerspectiveFovRH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixPerspectiveLH + irr::core::CMatrix4 +
+
+
+
+ buildProjectionMatrixPerspectiveRH + irr::core::CMatrix4 +
+
+
+
+ buildRotateFromTo + irr::core::CMatrix4 +
+
+
+
+ buildShadowMatrix + irr::core::CMatrix4 +
+
+
+
+ buildTextureTransform + irr::core::CMatrix4 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_63.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_63.html new file mode 100644 index 0000000..581836b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_63.html @@ -0,0 +1,850 @@ + + + + + + + +
+
Loading...
+
+
+ c_str + irr::core::string +
+
+
+
+ CDynamicMeshBuffer + irr::scene::CDynamicMeshBuffer +
+
+
+
+ ceil32 + irr::core +
+
+
+
+ changeIcon + irr::gui::ICursorControl +
+
+
+
+ changeWorkingDirectoryTo + irr::io::IFileSystem +
+
+
+
+ checkDriverReset + irr::video::IVideoDriver +
+
+ +
+
+ clamp + irr::core +
+
+
+
+ classifyPlaneRelation + irr::core::aabbox3d +
+
+
+
+ classifyPointRelation + irr::core::plane3d +
+
+ +
+
+ clearChildren + irr::gui::IGUITreeViewNode +
+
+
+
+ clearChilds + irr::gui::IGUITreeViewNode +
+
+
+
+ clearFPUException + irr::core +
+
+ +
+
+ clearParticles + irr::scene::IParticleSystemSceneNode +
+
+
+
+ clearRows + irr::gui::IGUITable +
+
+
+
+ clearSystemMessages + irr::IrrlichtDevice +
+
+
+
+ clearUnusedMeshes + irr::scene::IMeshCache +
+
+
+
+ clearZBuffer + irr::video::IVideoDriver +
+
+
+
+ clipAgainst + irr::core::rect +
+
+
+
+ clipLine + irr::scene::SViewFrustum +
+
+ + +
+
+ closeDevice + irr::IrrlichtDevice +
+
+
+
+ closestPointOnTriangle + irr::core::triangle3d +
+
+ +
+
+ CMeshBuffer + irr::scene::CMeshBuffer +
+
+
+
+ collisionOccurred + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ const_pointer + irr::core::array +
+
+ +
+
+ constrainTo + irr::core::rect +
+
+ +
+
+ convertColor + irr::video::IVideoDriver +
+
+
+
+ convertMeshToTangents + irr::scene::ISkinnedMesh +
+
+
+
+ convertTo2TCoords + irr::scene::SSkinMeshBuffer +
+
+
+
+ convertToTangents + irr::scene::SSkinMeshBuffer +
+
+ +
+
+ copyToClipboard + irr::IOSOperator +
+
+ +
+
+ copyToScalingBoxFilter + irr::video::IImage +
+
+
+
+ copyToWithAlpha + irr::video::IImage +
+
+ +
+
+ createAndWriteFile + irr::io::IFileSystem +
+
+
+
+ createAnimatedMesh + irr::scene::IMeshManipulator +
+
+
+
+ createAnimatedMeshSceneNodeEmitter + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ createArrowMesh + irr::scene::IGeometryCreator +
+
+
+
+ createAttractionAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createAttributesFromMaterial + irr::video::IVideoDriver +
+
+
+
+ createBoxEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createClone + irr::scene::ISceneNodeAnimator +
+
+
+
+ createCollisionResponseAnimator + irr::scene::ISceneManager +
+
+
+
+ createConeMesh + irr::scene::IGeometryCreator +
+
+
+
+ createCubeMesh + irr::scene::IGeometryCreator +
+
+
+
+ createCylinderEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createCylinderMesh + irr::scene::IGeometryCreator +
+
+
+
+ createDefaultRandomizer + irr::IrrlichtDevice +
+
+
+
+ createDeleteAnimator + irr::scene::ISceneManager +
+
+
+
+ createDevice + irr +
+
+
+
+ createDeviceEx + irr +
+
+
+
+ createEmptyAttributes + irr::io::IFileSystem +
+
+
+
+ createEmptyFileList + irr::io::IFileSystem +
+
+
+
+ createFadeOutParticleAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createFileList + irr::io::IFileSystem +
+
+
+
+ createFlyCircleAnimator + irr::scene::ISceneManager +
+
+
+
+ createFlyStraightAnimator + irr::scene::ISceneManager +
+
+
+
+ createFollowSplineAnimator + irr::scene::ISceneManager +
+
+
+
+ createForsythOptimizedMesh + irr::scene::IMeshManipulator +
+
+
+
+ createGravityAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createHillPlaneMesh + irr::scene::IGeometryCreator +
+
+ +
+
+ createImageFromData + irr::video::IVideoDriver +
+
+ +
+
+ createImageList + irr::gui::IGUIEnvironment +
+
+ + + + + +
+
+ createMemoryWriteFile + irr::io::IFileSystem +
+
+
+
+ createMesh + irr::scene::IMeshLoader +
+
+
+
+ createMeshCopy + irr::scene::IMeshManipulator +
+
+
+
+ createMeshEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createMeshUniquePrimitives + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWelded + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWith1TCoords + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWith2TCoords + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWithTangents + irr::scene::IMeshManipulator +
+
+
+
+ createMeshWriter + irr::scene::ISceneManager +
+
+
+
+ createMetaTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createNewSceneManager + irr::scene::ISceneManager +
+
+
+
+ createOctreeTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createOctTreeTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createPlaneMesh + irr::scene::IGeometryCreator +
+
+
+
+ createPointEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createReadFile + irr::io +
+
+
+
+ createRingEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createRotationAffector + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createRotationAnimator + irr::scene::ISceneManager +
+
+
+
+ createScaleParticleAffector + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ createScreenShot + irr::video::IVideoDriver +
+
+
+
+ createSkin + irr::gui::IGUIEnvironment +
+
+
+
+ createSkinnedMesh + irr::scene::ISceneManager +
+
+
+
+ createSphereEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ createSphereMesh + irr::scene::IGeometryCreator +
+
+
+
+ createTerrainMesh + irr::scene::IGeometryCreator +
+
+
+
+ createTerrainTriangleSelector + irr::scene::ISceneManager +
+
+
+
+ createTextureAnimator + irr::scene::ISceneManager +
+
+ +
+
+ createTriangleSelectorFromBoundingBox + irr::scene::ISceneManager +
+
+
+
+ createUserData + irr::scene::ISceneUserDataSerializer +
+
+
+
+ createVolumeLightMesh + irr::scene::IGeometryCreator +
+
+
+
+ createWriteFile + irr::io +
+
+ + + +
+
+ crossProduct + irr::core::vector3d +
+
+
+
+ ctoul16 + irr::core +
+
+
+
+ cutFilenameExtension + irr::core +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_64.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_64.html new file mode 100644 index 0000000..8b3aadd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_64.html @@ -0,0 +1,352 @@ + + + + + + + +
+
Loading...
+ + +
+
+ deleteAllDynamicLights + irr::video::IVideoDriver +
+
+
+
+ deleteChild + irr::gui::IGUITreeViewNode +
+
+
+
+ deletePathFromFilename + irr::core +
+
+
+
+ deletePathFromPath + irr::core +
+
+ + + + +
+
+ disableFeature + irr::video::IVideoDriver +
+
+
+
+ doParticleSystem + irr::scene::IParticleSystemSceneNode +
+
+ + + + +
+
+ draw2DLine + irr::video::IVideoDriver +
+
+
+
+ draw2DPolygon + irr::video::IVideoDriver +
+
+ +
+
+ draw2DRectangleOutline + irr::video::IVideoDriver +
+
+
+
+ draw2DSprite + irr::gui::IGUISpriteBank +
+
+
+
+ draw2DSpriteBatch + irr::gui::IGUISpriteBank +
+
+
+
+ draw2DVertexPrimitiveList + irr::video::IVideoDriver +
+
+
+
+ draw3DBox + irr::video::IVideoDriver +
+
+
+
+ draw3DButtonPanePressed + irr::gui::IGUISkin +
+
+
+
+ draw3DButtonPaneStandard + irr::gui::IGUISkin +
+
+
+
+ draw3DLine + irr::video::IVideoDriver +
+
+
+
+ draw3DMenuPane + irr::gui::IGUISkin +
+
+
+
+ draw3DSunkenPane + irr::gui::IGUISkin +
+
+
+
+ draw3DTabBody + irr::gui::IGUISkin +
+
+
+
+ draw3DTabButton + irr::gui::IGUISkin +
+
+
+
+ draw3DToolBar + irr::gui::IGUISkin +
+
+
+
+ draw3DTriangle + irr::video::IVideoDriver +
+
+
+
+ draw3DWindowBackground + irr::gui::IGUISkin +
+
+ +
+
+ drawIcon + irr::gui::IGUISkin +
+
+ + +
+
+ drawMeshBuffer + irr::video::IVideoDriver +
+
+
+
+ drawMeshBufferNormals + irr::video::IVideoDriver +
+
+
+
+ drawPixel + irr::video::IVideoDriver +
+
+
+
+ drawStencilShadow + irr::video::IVideoDriver +
+
+
+
+ drawStencilShadowVolume + irr::video::IVideoDriver +
+
+
+
+ drawVertexPrimitiveList + irr::video::IVideoDriver +
+
+
+
+ drop + irr::IReferenceCounted +
+
+
+
+ dumpShader + irr::scene::quake3 +
+
+
+
+ dumpVarGroup + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_65.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_65.html new file mode 100644 index 0000000..e421deb --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_65.html @@ -0,0 +1,157 @@ + + + + + + + +
+
Loading...
+
+
+ emitt + irr::scene::IParticleEmitter +
+
+ +
+
+ enableCastShadow + irr::scene::ILightSceneNode +
+
+
+
+ enableClipPlane + irr::video::IVideoDriver +
+
+
+
+ enableMaterial2D + irr::video::IVideoDriver +
+
+ + +
+
+ endScene + irr::video::IVideoDriver +
+
+ +
+
+ equals_ignore_case + irr::core::string +
+
+
+
+ equals_substring_ignore_case + irr::core::string +
+
+
+
+ equalsByUlp + irr::core +
+
+ + +
+
+ evaluate + irr::scene::quake3::SModifierFunction +
+
+
+
+ existFile + irr::io::IFileSystem +
+
+
+
+ existsAttribute + irr::io::IAttributes +
+
+
+
+ existsIntersection + irr::core::plane3d +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_66.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_66.html new file mode 100644 index 0000000..153dbf6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_66.html @@ -0,0 +1,206 @@ + + + + + + + +
+
Loading...
+
+
+ f32_max3 + irr::core +
+
+
+
+ f32_min3 + irr::core +
+
+
+
+ fadeIn + irr::gui::IGUIInOutFader +
+
+
+
+ fadeOut + irr::gui::IGUIInOutFader +
+
+
+
+ fast_atof + irr::core +
+
+
+
+ fast_atof_move + irr::core +
+
+
+
+ fill + irr::video::IImage +
+
+
+
+ fillMaterialStructureFromAttributes + irr::video::IVideoDriver +
+
+
+
+ finalize + irr::scene::ISkinnedMesh +
+
+ +
+
+ findAttribute + irr::io::IAttributes +
+
+
+
+ findFile + irr::io::IFileList +
+
+
+
+ findFirst + irr::core::string +
+
+
+
+ findFirstChar + irr::core::string +
+
+
+
+ findFirstCharNotInList + irr::core::string +
+
+
+
+ findItemWithCommandId + irr::gui::IGUIContextMenu +
+
+
+
+ findLast + irr::core::string +
+
+
+
+ findLastChar + irr::core::string +
+
+
+
+ findLastCharNotInList + irr::core::string +
+
+
+
+ findNext + irr::core::string +
+
+
+
+ findTexture + irr::video::IVideoDriver +
+
+
+
+ flattenFilename + irr::io::IFileSystem +
+
+
+
+ flipSurfaces + irr::scene::IMeshManipulator +
+
+
+
+ FloatIntUnion32 + irr::core::FloatIntUnion32 +
+
+
+
+ floor32 + irr::core +
+
+ +
+
+ fract + irr::core +
+
+
+
+ frand + irr::IRandomizer +
+
+
+
+ fromAngleAxis + irr::core::quaternion +
+
+
+
+ fromRGB + irr::video::SColorHSL +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_67.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_67.html new file mode 100644 index 0000000..0621cda --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_67.html @@ -0,0 +1,3847 @@ + + + + + + + +
+
Loading...
+ +
+
+ getAbsoluteClippingRect + irr::gui::IGUIElement +
+
+
+
+ getAbsolutePath + irr::io::IFileSystem +
+
+ +
+
+ getAbsoluteTransformation + irr::scene::ISceneNode +
+
+
+
+ getActiveCamera + irr::scene::ISceneManager +
+
+
+
+ getActiveColumn + irr::gui::IGUITable +
+
+
+
+ getActiveColumnOrdering + irr::gui::IGUITable +
+
+ +
+
+ getActiveIcon + irr::gui::ICursorControl +
+
+
+
+ getActiveTab + irr::gui::IGUITabControl +
+
+
+
+ getAffectors + irr::scene::IParticleSystemSceneNode +
+
+
+
+ getAffectX + irr::scene::IParticleAttractionAffector +
+
+
+
+ getAffectY + irr::scene::IParticleAttractionAffector +
+
+
+
+ getAffectZ + irr::scene::IParticleAttractionAffector +
+
+ + +
+
+ getAlphaMask + irr::video::IImage +
+
+ +
+
+ getAngle + irr::core::vector2d +
+
+
+
+ getAngleTrig + irr::core::vector2d +
+
+ +
+
+ getAnimatedMeshSceneNode + irr::scene::IParticleAnimatedMeshSceneNodeEmitter +
+
+
+
+ getAnimateTarget + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getAnimationCount + irr::scene::IAnimatedMeshMD2 +
+
+
+
+ getAnimationMode + irr::scene::IBoneSceneNode +
+
+
+
+ getAnimationName + irr::scene::IAnimatedMeshMD2 +
+
+ +
+
+ getAnimators + irr::scene::ISceneNode +
+
+
+
+ getAnimatorTypeName + irr::scene::ISceneManager +
+
+
+
+ getArchiveLoader + irr::io::IFileSystem +
+
+
+
+ getArchiveLoaderCount + irr::io::IFileSystem +
+
+ +
+
+ getAs3Values + irr::core::vector3d +
+
+
+
+ getAs4Values + irr::core::vector3d +
+
+
+
+ getAsFloat + irr::scene::quake3 +
+
+
+
+ getAspectRatio + irr::scene::ICameraSceneNode +
+
+
+
+ getAsStringList + irr::scene::quake3 +
+
+
+
+ getAsVector3df + irr::scene::quake3 +
+
+
+
+ getAttract + irr::scene::IParticleAttractionAffector +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ getAttributeValueSafe + irr::io::IIrrXMLReader +
+
+
+
+ getAutomaticCulling + irr::scene::ISceneNode +
+
+ + +
+
+ getBitsPerPixel + irr::video::IImage +
+
+
+
+ getBitsPerPixelFromFormat + irr::video::IImage +
+
+ +
+
+ getBlueMask + irr::video::IImage +
+
+
+
+ getBoneIndex + irr::scene::IBoneSceneNode +
+
+
+
+ getBoneName + irr::scene::IBoneSceneNode +
+
+ +
+
+ getBox + irr::scene::IParticleBoxEmitter +
+
+ +
+
+ getBuiltInFont + irr::gui::IGUIEnvironment +
+
+
+
+ getBytesPerPixel + irr::video::IImage +
+
+
+
+ getCastShadow + irr::scene::ILightSceneNode +
+
+
+
+ getCellData + irr::gui::IGUITable +
+
+
+
+ getCellText + irr::gui::IGUITable +
+
+ + + + +
+
+ getCharacterFromPos + irr::gui::IGUIFont +
+
+
+
+ getChildCount + irr::gui::IGUITreeViewNode +
+
+ +
+
+ getClientRect + irr::gui::IGUIWindow +
+
+
+
+ getCloseButton + irr::gui::IGUIWindow +
+
+
+
+ getCloseHandling + irr::gui::IGUIContextMenu +
+
+ +
+
+ getCollisionNode + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + +
+
+ getCollisionTriangle + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + +
+
+ getColorMapping + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getColumnCount + irr::gui::IGUITable +
+
+
+
+ getColumnWidth + irr::gui::IGUITable +
+
+
+
+ getConstIterator + irr::core::map +
+
+
+
+ getCreatableGUIElementTypeCount + irr::gui::IGUIElementFactory +
+
+
+
+ getCreatableSceneNodeAnimatorTypeCount + irr::scene::ISceneNodeAnimatorFactory +
+
+
+
+ getCreatableSceneNodeTypeCount + irr::scene::ISceneNodeFactory +
+
+
+
+ getCreateableGUIElementType + irr::gui::IGUIElementFactory +
+
+ +
+
+ getCreateableSceneNodeAnimatorType + irr::scene::ISceneNodeAnimatorFactory +
+
+ +
+
+ getCreateableSceneNodeType + irr::scene::ISceneNodeFactory +
+
+ +
+
+ getCullingFunction + irr::scene::quake3 +
+
+
+
+ getCurrentLODOfPatches + irr::scene::ITerrainSceneNode +
+
+
+
+ getCurrentRenderTargetSize + irr::video::IVideoDriver +
+
+
+
+ getCursorControl + irr::IrrlichtDevice +
+
+
+
+ getCustomColor + irr::scene::IColladaMeshWriterProperties +
+
+ +
+
+ getData2 + irr::gui::IGUITreeViewNode +
+
+
+
+ getDebugName + irr::IReferenceCounted +
+
+
+
+ getDefaultGUIElementFactory + irr::gui::IGUIEnvironment +
+
+
+
+ getDefaultNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ getDefaultProperties + irr::scene::IColladaMeshWriter +
+
+
+
+ getDefaultSceneNodeAnimatorFactory + irr::scene::ISceneManager +
+
+
+
+ getDefaultSceneNodeFactory + irr::scene::ISceneManager +
+
+
+
+ getDefaultText + irr::gui::IGUISkin +
+
+
+
+ getDefinitelyIdentityMatrix + irr::core::CMatrix4 +
+
+
+
+ getDepthFunction + irr::scene::quake3 +
+
+
+
+ getDesktopDepth + irr::video::IVideoModeList +
+
+
+
+ getDesktopResolution + irr::video::IVideoModeList +
+
+ +
+
+ getDirection + irr::scene::IParticleEmitter +
+
+
+
+ getDirectoryName + irr::gui::IGUIFileOpenDialog +
+
+
+
+ getDistance + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+ + +
+
+ getDistanceTo + irr::core::plane3d +
+
+
+
+ getDrawBackground + irr::gui::IGUIWindow +
+
+
+
+ getDrawFlags + irr::gui::IGUITable +
+
+
+
+ getDrawTitlebar + irr::gui::IGUIWindow +
+
+
+
+ getDriverAttributes + irr::video::IVideoDriver +
+
+ +
+
+ getDynamicLight + irr::video::IVideoDriver +
+
+
+
+ getDynamicLightCount + irr::video::IVideoDriver +
+
+
+
+ getEdges + irr::core::aabbox3d +
+
+
+
+ getEditBox + irr::gui::IGUISpinBox +
+
+
+
+ getElementFromId + irr::gui::IGUIElement +
+
+
+
+ getElementFromPoint + irr::gui::IGUIElement +
+
+
+
+ getEllipsoidRadius + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getEllipsoidTranslation + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getEmitter + irr::scene::IParticleSystemSceneNode +
+
+
+
+ getEnabled + irr::scene::IParticleAffector +
+
+
+
+ getEndFrame + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getEntityList + irr::scene::IQ3LevelMesh +
+
+
+
+ getEventReceiver + irr::IrrlichtDevice +
+
+ +
+
+ getExpanded + irr::gui::IGUITreeViewNode +
+
+
+
+ getExportSMaterialsOnlyOnce + irr::scene::IColladaMeshWriter +
+
+
+
+ getExposedVideoData + irr::video::IVideoDriver +
+
+
+
+ getExtent + irr::core::aabbox3d +
+
+
+
+ getFadeOutTime + irr::scene::IParticleFadeOutAffector +
+
+
+
+ getFarLeftDown + irr::scene::SViewFrustum +
+
+
+
+ getFarLeftUp + irr::scene::SViewFrustum +
+
+
+
+ getFarRightDown + irr::scene::SViewFrustum +
+
+
+
+ getFarRightUp + irr::scene::SViewFrustum +
+
+
+
+ getFarValue + irr::scene::ICameraSceneNode +
+
+
+
+ getFileArchive + irr::io::IFileSystem +
+
+
+
+ getFileArchiveCount + irr::io::IFileSystem +
+
+
+
+ getFileBasename + irr::io::IFileSystem +
+
+
+
+ getFileCount + irr::io::IFileList +
+
+
+
+ getFileDir + irr::io::IFileSystem +
+
+
+
+ getFileList + irr::io::IFileArchive +
+
+ +
+
+ getFileNameExtension + irr::core +
+
+
+
+ getFileOffset + irr::io::IFileList +
+
+
+
+ getFileSize + irr::io::IFileList +
+
+ +
+
+ getFirstChild + irr::gui::IGUITreeViewNode +
+
+
+
+ getFlag + irr::video::SMaterial +
+
+
+
+ getFocus + irr::gui::IGUIEnvironment +
+
+
+
+ getFog + irr::video::IVideoDriver +
+
+ +
+
+ getFootColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getFOV + irr::scene::ICameraSceneNode +
+
+
+
+ getFPS + irr::video::IVideoDriver +
+
+ + +
+
+ getFrameNr + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getFullFileName + irr::io::IFileList +
+
+
+
+ getGammaRamp + irr::IrrlichtDevice +
+
+
+
+ getGeometryCreator + irr::scene::ISceneManager +
+
+
+
+ getGeometryWriting + irr::scene::IColladaMeshWriter +
+
+
+
+ getGPUProgrammingServices + irr::video::IVideoDriver +
+
+ + +
+
+ getGreenMask + irr::video::IImage +
+
+
+
+ getGroup + irr::scene::quake3::IShader +
+
+
+
+ getGroupSize + irr::scene::quake3::IShader +
+
+
+
+ getGUIElementFactory + irr::gui::IGUIEnvironment +
+
+ + + + + +
+
+ getHorizontalAngle + irr::core::vector3d +
+
+
+
+ getHovered + irr::gui::IGUIEnvironment +
+
+ + +
+
+ getImage + irr::gui::IGUIImage +
+
+
+
+ getImageCount + irr::gui::IGUIImageList +
+
+
+
+ getImageDataSizeInBytes + irr::video::IImage +
+
+
+
+ getImageDataSizeInPixels + irr::video::IImage +
+
+
+
+ getImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ getImageLeftOfIcon + irr::gui::IGUITreeView +
+
+
+
+ getImageList + irr::gui::IGUITreeView +
+
+
+
+ getImageLoader + irr::video::IVideoDriver +
+
+
+
+ getImageLoaderCount + irr::video::IVideoDriver +
+
+
+
+ getImageSize + irr::gui::IGUIImageList +
+
+
+
+ getImageWriter + irr::video::IVideoDriver +
+
+
+
+ getImageWriterCount + irr::video::IVideoDriver +
+
+ + +
+
+ getIndexForItemData + irr::gui::IGUIComboBox +
+
+
+
+ getIndexOfRefraction + irr::scene::IColladaMeshWriterProperties +
+
+ + +
+
+ getIndicesForPatch + irr::scene::ITerrainSceneNode +
+
+
+
+ getInternalName + irr::io::SNamedPath +
+
+ + +
+
+ getIntersectionOfPlaneWithLine + irr::core::triangle3d +
+
+ + +
+
+ getIntersectionWithPlane + irr::core::plane3d +
+
+
+
+ getIntersectionWithPlanes + irr::core::plane3d +
+
+
+
+ getIntersectionWithSphere + irr::core::line3d +
+
+
+
+ getInverse + irr::core::CMatrix4 +
+
+
+
+ getInversePrimitive + irr::core::CMatrix4 +
+
+
+
+ getItem + irr::gui::IGUIComboBox +
+
+
+
+ getItemAt + irr::gui::IGUIListBox +
+
+
+
+ getItemAutoChecking + irr::gui::IGUIContextMenu +
+
+
+
+ getItemCommandId + irr::gui::IGUIContextMenu +
+
+ +
+
+ getItemData + irr::gui::IGUIComboBox +
+
+
+
+ getItemDefaultColor + irr::gui::IGUIListBox +
+
+
+
+ getItemOverrideColor + irr::gui::IGUIListBox +
+
+
+
+ getItemText + irr::gui::IGUIContextMenu +
+
+
+
+ getIterator + irr::core::map +
+
+ +
+
+ getJointName + irr::scene::ISkinnedMesh +
+
+ +
+
+ getJointNumber + irr::scene::ISkinnedMesh +
+
+
+
+ getKerningHeight + irr::gui::IGUIFont +
+
+ +
+
+ getKeyMap + irr::scene::ISceneNodeAnimatorCameraFPS +
+
+
+
+ getKnownIntersectionWithLine + irr::core::plane3d +
+
+
+
+ getLargeStep + irr::gui::IGUIScrollBar +
+
+ +
+
+ getLastChild + irr::gui::IGUITreeViewNode +
+
+
+
+ getLastEventNode + irr::gui::IGUITreeView +
+
+ + +
+
+ getLevel + irr::gui::IGUITreeViewNode +
+
+ +
+
+ getLightness + irr::video::SColor +
+
+
+
+ getLightType + irr::scene::ILightSceneNode +
+
+
+
+ getLinesVisible + irr::gui::IGUITreeView +
+
+
+
+ getListItem + irr::gui::IGUIListBox +
+
+
+
+ getLogger + irr::IrrlichtDevice +
+
+
+
+ getLogLevel + irr::ILogger +
+
+
+
+ getLoopMode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getLuminance + irr::video::SColor +
+
+ +
+
+ getMaterial2D + irr::video::IVideoDriver +
+
+
+
+ getMaterialCount + irr::scene::ISceneNode +
+
+
+
+ getMaterialRenderer + irr::video::IVideoDriver +
+
+
+
+ getMaterialRendererCount + irr::video::IVideoDriver +
+
+
+
+ getMaterialRendererName + irr::video::IVideoDriver +
+
+ +
+
+ getMatrix_transposed + irr::core::quaternion +
+
+
+
+ getMatrixCenter + irr::core::quaternion +
+
+ +
+
+ getMaxAngleDegrees + irr::scene::IParticleEmitter +
+
+
+
+ getMaximalDynamicLightAmount + irr::video::IVideoDriver +
+
+
+
+ getMaximalPrimitiveCount + irr::video::IVideoDriver +
+
+
+
+ getMaximizeButton + irr::gui::IGUIWindow +
+
+
+
+ getMaxLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ getMaxParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ getMaxSelectionRows + irr::gui::IGUIComboBox +
+
+
+
+ getMaxStartColor + irr::scene::IParticleEmitter +
+
+
+
+ getMaxStartSize + irr::scene::IParticleEmitter +
+
+
+
+ getMaxTextureSize + irr::video::IVideoDriver +
+
+
+
+ getMD3Normal + irr::scene::quake3 +
+
+
+
+ getMD3TagTransformation + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getMemberPoint + irr::core::plane3d +
+
+ + + +
+
+ getMeshBufferForLOD + irr::scene::ITerrainSceneNode +
+
+
+
+ getMeshBuffers + irr::scene::ISkinnedMesh +
+
+
+
+ getMeshByFilename + irr::scene::IMeshCache +
+
+
+
+ getMeshByIndex + irr::scene::IMeshCache +
+
+
+
+ getMeshByName + irr::scene::IMeshCache +
+
+
+
+ getMeshCache + irr::scene::ISceneManager +
+
+
+
+ getMeshCount + irr::scene::IMeshCache +
+
+ +
+
+ getMeshIndex + irr::scene::IMeshCache +
+
+
+
+ getMeshLoader + irr::scene::ISceneManager +
+
+
+
+ getMeshLoaderCount + irr::scene::ISceneManager +
+
+ + + + + +
+
+ getMinimizeButton + irr::gui::IGUIWindow +
+
+
+
+ getMinLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ getMinParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ getMinStartColor + irr::scene::IParticleEmitter +
+
+
+
+ getMinStartSize + irr::scene::IParticleEmitter +
+
+
+
+ getModifierFunc + irr::scene::quake3 +
+
+ + +
+
+ getNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ getNearLeftDown + irr::scene::SViewFrustum +
+
+
+
+ getNearLeftUp + irr::scene::SViewFrustum +
+
+
+
+ getNearRightDown + irr::scene::SViewFrustum +
+
+
+
+ getNearRightUp + irr::scene::SViewFrustum +
+
+
+
+ getNearValue + irr::scene::ICameraSceneNode +
+
+
+
+ getNextElement + irr::gui::IGUIElement +
+
+
+
+ getNextSibling + irr::gui::IGUITreeViewNode +
+
+
+
+ getNextVisible + irr::gui::IGUITreeViewNode +
+
+ +
+
+ getNodeData + irr::io::IIrrXMLReader +
+
+
+
+ getNodeName + irr::io::IIrrXMLReader +
+
+
+
+ getNodeType + irr::io::IIrrXMLReader +
+
+ + +
+
+ getNumber + irr::gui::IGUITab +
+
+
+
+ getOcclusionQueryResult + irr::video::IVideoDriver +
+
+
+
+ getOperatingSystemVersion + irr::IOSOperator +
+
+
+
+ getOperationSystemVersion + irr::IOSOperator +
+
+
+
+ getOptimalSize + irr::core::dimension2d +
+
+
+
+ getOriginalMesh + irr::scene::IAnimatedMeshMD3 +
+
+
+
+ getOriginalSize + irr::video::ITexture +
+
+ +
+
+ getOutlineOnly + irr::scene::IParticleCylinderEmitter +
+
+ + +
+
+ getOverrideMaterial + irr::video::IVideoDriver +
+
+
+
+ getOwner + irr::gui::IGUITreeViewNode +
+
+
+
+ getParameters + irr::scene::ISceneManager +
+
+ +
+
+ getParentFirstIterator + irr::core::map +
+
+
+
+ getParentLastIterator + irr::core::map +
+
+
+
+ getParserFormat + irr::io::IIrrXMLReader +
+
+ + +
+
+ getPivotPoint + irr::scene::IParticleRotationAffector +
+
+
+
+ getPixel + irr::video::IImage +
+
+
+
+ getPlane + irr::core::triangle3d +
+
+
+
+ getPlatformBehavior + irr::gui::ICursorControl +
+
+
+
+ getPoint + irr::scene::IParticleAttractionAffector +
+
+
+
+ getPointOrientation + irr::core::line2d +
+
+ + + +
+
+ getPositions + irr::gui::IGUISpriteBank +
+
+
+
+ getPrevSibling + irr::gui::IGUITreeViewNode +
+
+
+
+ getPrimitiveCountDrawn + irr::video::IVideoDriver +
+
+
+
+ getProcessorSpeedMHz + irr::IOSOperator +
+
+
+
+ getProjectionMatrix + irr::scene::ICameraSceneNode +
+
+
+
+ getProperties + irr::scene::IColladaMeshWriter +
+
+ +
+
+ getRandomizer + irr::IrrlichtDevice +
+
+
+
+ getRayFromScreenCoordinates + irr::scene::ISceneCollisionManager +
+
+
+
+ getRealTime + irr::ITimer +
+
+
+
+ getRealTimeAndDate + irr::ITimer +
+
+ +
+
+ getRedMask + irr::video::IImage +
+
+
+
+ getReferenceCount + irr::IReferenceCounted +
+
+
+
+ getReflectivity + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getRegisteredGUIElementFactoryCount + irr::gui::IGUIEnvironment +
+
+
+
+ getRegisteredSceneNodeAnimatorFactoryCount + irr::scene::ISceneManager +
+
+
+
+ getRegisteredSceneNodeFactoryCount + irr::scene::ISceneManager +
+
+
+
+ getRelativeFilename + irr::io::IFileSystem +
+
+ +
+
+ getRelativeTransformation + irr::scene::ISceneNode +
+
+
+
+ getRelativeTransformationMatrix + irr::scene::IDummyTransformationSceneNode +
+
+
+
+ getRenderBuffer + irr::scene::ITerrainSceneNode +
+
+
+
+ getRenderCapability + irr::video::IMaterialRenderer +
+
+
+
+ getRingThickness + irr::scene::IParticleRingEmitter +
+
+ +
+
+ getRootGUIElement + irr::gui::IGUIEnvironment +
+
+
+
+ getRootSceneNode + irr::scene::ISceneManager +
+
+ +
+
+ getRotation + irr::scene::ISceneNode +
+
+
+
+ getRotationDegrees + irr::core::CMatrix4 +
+
+
+
+ getRowCount + irr::gui::IGUITable +
+
+ +
+
+ getSceneCollisionManager + irr::scene::ISceneManager +
+
+
+
+ getSceneLoader + irr::scene::ISceneManager +
+
+
+
+ getSceneLoaderCount + irr::scene::ISceneManager +
+
+ +
+
+ getSceneNodeAndCollisionPointFromRay + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeAnimatorFactory + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeFactory + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeForTriangle + irr::scene::ITriangleSelector +
+
+
+
+ getSceneNodeFromCameraBB + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeFromId + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeFromName + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeFromRayBB + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeFromScreenCoordinatesBB + irr::scene::ISceneCollisionManager +
+
+
+
+ getSceneNodeFromType + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeRenderPass + irr::scene::ISceneManager +
+
+
+
+ getSceneNodesFromType + irr::scene::ISceneManager +
+
+
+
+ getSceneNodeTypeName + irr::scene::ISceneManager +
+
+
+
+ getScreenCoordinatesFrom3DPosition + irr::scene::ISceneCollisionManager +
+
+
+
+ getScreenSize + irr::video::IVideoDriver +
+
+ +
+
+ getSelectedImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ getSelectedItem + irr::gui::IGUIContextMenu +
+
+ +
+
+ getSelectorCount + irr::scene::ITriangleSelector +
+
+ +
+
+ getShadowColor + irr::scene::ISceneManager +
+
+ +
+
+ getSkin + irr::gui::IGUIEnvironment +
+
+
+
+ getSkinningSpace + irr::scene::IBoneSceneNode +
+
+
+
+ getSmallStep + irr::gui::IGUIScrollBar +
+
+
+
+ getSourceFormat + irr::io::IIrrXMLReader +
+
+ + + +
+
+ getSpriteNoFromChar + irr::gui::IGUIFontBitmap +
+
+
+
+ getSprites + irr::gui::IGUISpriteBank +
+
+
+
+ getStartFrame + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ getStepSize + irr::gui::IGUISpinBox +
+
+
+
+ getSubDivideU + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getSubDivideV + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getSubMenu + irr::gui::IGUIContextMenu +
+
+
+
+ getSupportedIconSize + irr::gui::ICursorControl +
+
+
+
+ getSystemMemory + irr::IOSOperator +
+
+
+
+ getTab + irr::gui::IGUITabControl +
+
+
+
+ getTabAt + irr::gui::IGUITabControl +
+
+
+
+ getTabCount + irr::gui::IGUITabControl +
+
+
+
+ getTabExtraWidth + irr::gui::IGUITabControl +
+
+
+
+ getTabGroup + irr::gui::IGUIElement +
+
+
+
+ getTabHeight + irr::gui::IGUITabControl +
+
+
+
+ getTabMaxWidth + irr::gui::IGUITabControl +
+
+
+
+ getTabOrder + irr::gui::IGUIElement +
+
+
+
+ getTabVerticalAlignment + irr::gui::IGUITabControl +
+
+
+
+ getTagList + irr::scene::IAnimatedMeshMD3 +
+
+
+
+ getTailColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ getTarget + irr::scene::ICameraSceneNode +
+
+
+
+ getTargetAndRotationBinding + irr::scene::ICameraSceneNode +
+
+
+
+ getTargetColor + irr::scene::IParticleFadeOutAffector +
+
+
+
+ getTargetNode + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ +
+
+ getTechniqueFx + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getTerrainCenter + irr::scene::ITerrainSceneNode +
+
+ +
+
+ getTextColor + irr::gui::IGUITab +
+
+
+
+ getTextDimension + irr::gui::IGUIEditBox +
+
+
+
+ getTextFromClipboard + irr::IOSOperator +
+
+
+
+ getTextHeight + irr::gui::IGUIStaticText +
+
+ +
+
+ getTextureByIndex + irr::video::IVideoDriver +
+
+ +
+
+ getTextureCreationFlag + irr::video::IVideoDriver +
+
+
+
+ getTextureFormatFromFlags + irr::video::ITexture +
+
+
+
+ getTextureIdx + irr::scene::IColladaMeshWriterProperties +
+
+ +
+
+ getTextures + irr::scene::quake3 +
+
+
+
+ getTextWidth + irr::gui::IGUIStaticText +
+
+
+
+ getTime + irr::ITimer +
+
+
+
+ getTimeForceLost + irr::scene::IParticleGravityAffector +
+
+
+
+ getTimer + irr::IrrlichtDevice +
+
+
+
+ getToolTipText + irr::gui::IGUIElement +
+
+ +
+
+ getTransformedBoundingBox + irr::scene::ISceneNode +
+
+
+
+ getTranslation + irr::core::CMatrix4 +
+
+
+
+ getTransparency + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ getTransparentFx + irr::scene::IColladaMeshWriterProperties +
+
+ +
+
+ getTriangleCount + irr::scene::ITriangleSelector +
+
+ +
+
+ getTriangleSelector + irr::scene::ISceneNode +
+
+ +
+
+ getTypeName + irr::gui::IGUIElement +
+
+
+
+ getUnitVector + irr::core::line2d +
+
+
+
+ getUpVector + irr::scene::ICameraSceneNode +
+
+
+
+ getValue + irr::gui::IGUISpinBox +
+
+ +
+
+ getVendorInfo + irr::video::IVideoDriver +
+
+
+
+ getVersion + irr::IrrlichtDevice +
+
+
+
+ getVertex + irr::scene::SSkinMeshBuffer +
+
+ + +
+
+ getVertexPitchFromType + irr::video +
+
+ + + +
+
+ getVideoModeCount + irr::video::IVideoModeList +
+
+
+
+ getVideoModeDepth + irr::video::IVideoModeList +
+
+
+
+ getVideoModeList + irr::IrrlichtDevice +
+
+ +
+
+ getViewFrustum + irr::scene::ICameraSceneNode +
+
+
+
+ getViewMatrix + irr::scene::ICameraSceneNode +
+
+
+
+ getViewMatrixAffector + irr::scene::ICameraSceneNode +
+
+
+
+ getViewPort + irr::video::IVideoDriver +
+
+
+
+ getVolume + irr::core::aabbox3d +
+
+
+
+ getWidth + irr::core::rect +
+
+
+
+ getWorkingDirectory + irr::io::IFileSystem +
+
+
+
+ getWorld + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ getWriteDefaultScene + irr::scene::IColladaMeshWriter +
+
+
+
+ getWriteTextures + irr::scene::IColladaMeshWriter +
+
+
+
+ getZoomSpeed + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+
+
+ grab + irr::IReferenceCounted +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_68.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_68.html new file mode 100644 index 0000000..f2b0bf5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_68.html @@ -0,0 +1,92 @@ + + + + + + + +
+
Loading...
+
+
+ hasAlpha + irr::video::ITexture +
+
+
+
+ hasChildren + irr::gui::IGUITreeViewNode +
+
+
+
+ hasChilds + irr::gui::IGUITreeViewNode +
+
+
+
+ hasFileExtension + irr::core +
+
+
+
+ hasFinished + irr::scene::ISceneNodeAnimator +
+
+
+
+ hasFocus + irr::gui::IGUIEnvironment +
+
+
+
+ hasItemOverrideColor + irr::gui::IGUIListBox +
+
+
+
+ hasMipMaps + irr::video::ITexture +
+
+
+
+ hasResizableColumns + irr::gui::IGUITable +
+
+
+
+ hasType + irr::gui::IGUIElement +
+
+
+
+ heapsink + irr::core +
+
+
+
+ heapsort + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_69.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_69.html new file mode 100644 index 0000000..f25a818 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_69.html @@ -0,0 +1,979 @@ + + + + + + + +
+
Loading...
+
+
+ IAnimatedMeshSceneNode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ IBillboardSceneNode + irr::scene::IBillboardSceneNode +
+
+
+
+ IBillboardTextSceneNode + irr::scene::IBillboardTextSceneNode +
+
+
+
+ IBoneSceneNode + irr::scene::IBoneSceneNode +
+
+
+
+ ICameraSceneNode + irr::scene::ICameraSceneNode +
+
+
+
+ IColladaMeshWriter + irr::scene::IColladaMeshWriter +
+
+
+
+ IDummyTransformationSceneNode + irr::scene::IDummyTransformationSceneNode +
+
+
+
+ if_c_a_else_0 + irr::core +
+
+ +
+
+ IGUIButton + irr::gui::IGUIButton +
+
+
+
+ IGUICheckBox + irr::gui::IGUICheckBox +
+
+
+
+ IGUIColorSelectDialog + irr::gui::IGUIColorSelectDialog +
+
+
+
+ IGUIComboBox + irr::gui::IGUIComboBox +
+
+
+
+ IGUIContextMenu + irr::gui::IGUIContextMenu +
+
+
+
+ IGUIEditBox + irr::gui::IGUIEditBox +
+
+
+
+ IGUIElement + irr::gui::IGUIElement +
+
+
+
+ IGUIFileOpenDialog + irr::gui::IGUIFileOpenDialog +
+
+
+
+ IGUIImage + irr::gui::IGUIImage +
+
+
+
+ IGUIInOutFader + irr::gui::IGUIInOutFader +
+
+
+
+ IGUIListBox + irr::gui::IGUIListBox +
+
+
+
+ IGUIMeshViewer + irr::gui::IGUIMeshViewer +
+
+
+
+ IGUIScrollBar + irr::gui::IGUIScrollBar +
+
+
+
+ IGUISpinBox + irr::gui::IGUISpinBox +
+
+
+
+ IGUIStaticText + irr::gui::IGUIStaticText +
+
+
+
+ IGUITab + irr::gui::IGUITab +
+
+
+
+ IGUITabControl + irr::gui::IGUITabControl +
+
+
+
+ IGUITable + irr::gui::IGUITable +
+
+
+
+ IGUIToolBar + irr::gui::IGUIToolBar +
+
+
+
+ IGUITreeView + irr::gui::IGUITreeView +
+
+
+
+ IGUIWindow + irr::gui::IGUIWindow +
+
+
+
+ ILightSceneNode + irr::scene::ILightSceneNode +
+
+
+
+ IMeshSceneNode + irr::scene::IMeshSceneNode +
+
+ +
+
+ insert_after + irr::core::list +
+
+
+
+ insert_before + irr::core::list +
+
+
+
+ insertChildAfter + irr::gui::IGUITreeViewNode +
+
+
+
+ insertChildBefore + irr::gui::IGUITreeViewNode +
+
+ +
+
+ insertTab + irr::gui::IGUITabControl +
+
+
+
+ internal_delete + irr::core::irrAllocator +
+
+
+
+ internal_new + irr::core::irrAllocator +
+
+ +
+
+ intersectsWithBox + irr::core::aabbox3d +
+
+ +
+
+ intersectWith + irr::core::line2d +
+
+
+
+ inverseRotateVect + irr::core::CMatrix4 +
+
+
+
+ inverseTranslateVect + irr::core::CMatrix4 +
+
+
+
+ invert + irr::core::vector3d +
+
+
+
+ IParticleAffector + irr::scene::IParticleAffector +
+
+
+
+ IParticleSystemSceneNode + irr::scene::IParticleSystemSceneNode +
+
+
+
+ IR + irr::core +
+
+
+
+ IReferenceCounted + irr::IReferenceCounted +
+
+ + + + + +
+
+ isAWriteableFileExtension + irr::video::IImageWriter +
+
+ +
+
+ IsButtonPressed + irr::SEvent::SJoystickEvent +
+
+
+
+ ISceneNode + irr::scene::ISceneNode +
+
+
+
+ isChecked + irr::gui::IGUICheckBox +
+
+
+
+ isCulled + irr::scene::ISceneManager +
+
+
+
+ isDebugDataVisible + irr::scene::ISceneNode +
+
+
+
+ isDebugObject + irr::scene::ISceneNode +
+
+
+
+ isDefined + irr::scene::quake3::SVarGroup +
+
+
+
+ isdigit + irr::core +
+
+
+
+ isDirectory + irr::io::IFileList +
+
+
+
+ isDraggable + irr::gui::IGUIWindow +
+
+
+
+ isDrawBackgroundEnabled + irr::gui::IGUIStaticText +
+
+
+
+ isDrawBorderEnabled + irr::gui::IGUIStaticText +
+
+
+
+ isDrawingBackground + irr::gui::IGUITab +
+
+
+
+ isDrawingBorder + irr::gui::IGUIButton +
+
+
+
+ isDriverSupported + irr::IrrlichtDevice +
+
+ +
+
+ isEmptyElement + irr::io::IIrrXMLReader +
+
+
+
+ isEnabled + irr::gui::IGUIElement +
+
+
+
+ isEqual + irr::scene::quake3 +
+
+
+
+ isEventReceiverEnabled + irr::scene::ISceneNodeAnimator +
+
+
+
+ isExportable + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ isFalling + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ isFileExtension + irr::core +
+
+ +
+
+ isFullInside + irr::core::aabbox3d +
+
+
+
+ isFullscreen + irr::IrrlichtDevice +
+
+
+
+ IShader + irr::scene::quake3::IShader +
+
+
+
+ IShadowVolumeSceneNode + irr::scene::IShadowVolumeSceneNode +
+
+
+
+ isIdentity + irr::core::CMatrix4 +
+
+
+
+ isIdentity_integer_base + irr::core::CMatrix4 +
+
+
+
+ isImageScaled + irr::gui::IGUIImage +
+
+
+
+ isInputReceiverEnabled + irr::scene::ICameraSceneNode +
+
+
+
+ isInSameDirectory + irr::core +
+
+
+
+ isItemChecked + irr::gui::IGUIContextMenu +
+
+
+
+ isItemEnabled + irr::gui::IGUIContextMenu +
+
+
+
+ isLeftPressed + irr::SEvent::SMouseInput +
+
+
+
+ isMeshLoaded + irr::scene::IMeshCache +
+
+
+
+ isMiddlePressed + irr::SEvent::SMouseInput +
+
+
+
+ isMultiLineEnabled + irr::gui::IGUIEditBox +
+
+
+
+ isMyChild + irr::gui::IGUIElement +
+
+
+
+ isNotClipped + irr::gui::IGUIElement +
+
+
+
+ isnotzero + irr::core +
+
+ + +
+
+ isPasswordBox + irr::gui::IGUIEditBox +
+
+ + +
+
+ isPointInsideFast + irr::core::triangle3d +
+
+
+
+ isPointOnLine + irr::core::line2d +
+
+
+
+ isPointTotalInside + irr::core::aabbox3d +
+
+
+
+ isPressed + irr::gui::IGUIButton +
+
+
+
+ isPushButton + irr::gui::IGUIButton +
+
+ +
+
+ isReady + irr::gui::IGUIInOutFader +
+
+
+
+ isRectCollided + irr::core::rect +
+
+
+
+ isRenderTarget + irr::video::ITexture +
+
+
+
+ isRenderTargetOnlyFormat + irr::video::IImage +
+
+
+
+ isRightPressed + irr::SEvent::SMouseInput +
+
+
+
+ isRightToLeft + irr::gui::IGUIStaticText +
+
+
+
+ isRoot + irr::gui::IGUITreeViewNode +
+
+
+
+ isScalingImage + irr::gui::IGUIButton +
+
+
+
+ isspace + irr::core +
+
+
+
+ isStatic + irr::scene::ISkinnedMesh +
+
+
+
+ isStopped + irr::ITimer +
+
+
+
+ isSubElement + irr::gui::IGUIElement +
+
+
+
+ isTabGroup + irr::gui::IGUIElement +
+
+
+
+ isTabStop + irr::gui::IGUIElement +
+
+
+
+ isTextRestrainedInside + irr::gui::IGUIStaticText +
+
+
+
+ isTotalInsideBox + irr::core::triangle3d +
+
+
+
+ isTotalOutsideBox + irr::core::triangle3d +
+
+ +
+
+ isTrulyVisible + irr::scene::ISceneNode +
+
+
+
+ isupper + irr::core +
+
+ + + +
+
+ isWindowActive + irr::IrrlichtDevice +
+
+
+
+ isWindowFocused + irr::IrrlichtDevice +
+
+
+
+ isWindowMinimized + irr::IrrlichtDevice +
+
+ + + +
+
+ ITerrainSceneNode + irr::scene::ITerrainSceneNode +
+
+
+
+ ITextSceneNode + irr::scene::ITextSceneNode +
+
+
+
+ ITexture + irr::video::ITexture +
+
+
+
+ IVolumeLightSceneNode + irr::scene::IVolumeLightSceneNode +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_6a.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_6a.html new file mode 100644 index 0000000..95d27e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_6a.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ jump + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_6c.html new file mode 100644 index 0000000..77ce717 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_6c.html @@ -0,0 +1,141 @@ + + + + + + + +
+
Loading...
+
+
+ lastChar + irr::core::string +
+
+ + + +
+
+ linear_reverse_search + irr::core::array +
+
+
+
+ linear_search + irr::core::array +
+
+ + +
+
+ loadHeightMap + irr::scene::ITerrainSceneNode +
+
+
+
+ loadHeightMapRAW + irr::scene::ITerrainSceneNode +
+
+
+
+ loadImage + irr::video::IImageLoader +
+
+ + + +
+
+ lower_ignore_case + irr::core::string +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_6d.html new file mode 100644 index 0000000..6f42f3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_6d.html @@ -0,0 +1,142 @@ + + + + + + + +
+
Loading...
+
+
+ make_lower + irr::core::string +
+
+
+
+ make_upper + irr::core::string +
+
+ + + +
+
+ makeNormalMapTexture + irr::video::IVideoDriver +
+
+ +
+
+ map + irr::core::map +
+
+ +
+
+ maximizeWindow + irr::IrrlichtDevice +
+
+ +
+
+ minimizeWindow + irr::IrrlichtDevice +
+
+
+
+ move + irr::gui::IGUIElement +
+
+
+
+ moveChildDown + irr::gui::IGUITreeViewNode +
+
+
+
+ moveChildUp + irr::gui::IGUITreeViewNode +
+
+
+
+ moveFileArchive + irr::io::IFileSystem +
+
+
+
+ multiplyWith1x4Matrix + irr::core::CMatrix4 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_6e.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_6e.html new file mode 100644 index 0000000..51ad288 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_6e.html @@ -0,0 +1,48 @@ + + + + + + + +
+
Loading...
+
+
+ nameForMaterial + irr::scene::IColladaMeshWriterNames +
+
+
+
+ nameForMesh + irr::scene::IColladaMeshWriterNames +
+
+
+
+ nameForNode + irr::scene::IColladaMeshWriterNames +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_6f.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_6f.html new file mode 100644 index 0000000..548e6b5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_6f.html @@ -0,0 +1,572 @@ + + + + + + + +
+
Loading...
+ +
+
+ OnAnimationEnd + irr::scene::IAnimationEndCallBack +
+
+
+
+ onCollision + irr::scene::ICollisionCallback +
+
+
+
+ OnCreateNode + irr::scene::ISceneUserDataSerializer +
+
+ +
+
+ OnNodePostRender + irr::scene::ILightManager +
+
+
+
+ OnNodePreRender + irr::scene::ILightManager +
+
+ +
+
+ OnPreRender + irr::scene::ILightManager +
+
+
+
+ OnReadUserData + irr::scene::ISceneUserDataSerializer +
+
+
+
+ OnRegisterSceneNode + irr::scene::ISceneNode +
+
+
+
+ OnRender + irr::video::IMaterialRenderer +
+
+
+
+ OnRenderPassPostRender + irr::scene::ILightManager +
+
+
+
+ OnRenderPassPreRender + irr::scene::ILightManager +
+
+
+
+ OnResize + irr::video::IVideoDriver +
+
+
+
+ OnSetConstants + irr::video::IShaderConstantSetCallBack +
+
+ +
+
+ OnUnsetMaterial + irr::video::IMaterialRenderer +
+
+
+
+ operator T + irr::io::xmlChar +
+
+
+
+ operator ValueType + irr::core::map::AccessClass +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ orderRows + irr::gui::IGUITable +
+
+
+
+ overrideLODDistance + irr::scene::ITerrainSceneNode +
+
+
+
+ stringc + irr::io::SNamedPath +
+
+
+
+ stringw + irr::io::SNamedPath +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_70.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_70.html new file mode 100644 index 0000000..848256d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_70.html @@ -0,0 +1,109 @@ + + + + + + + +
+
Loading...
+
+
+ pack_textureBlendFunc + irr::video +
+
+ + +
+
+ PathToName + irr::io::SNamedPath +
+
+ + + + + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_71.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_71.html new file mode 100644 index 0000000..fd19d55 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_71.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ Q3LevelLoadParameter + irr::scene::quake3::Q3LevelLoadParameter +
+
+ +
+
+ queryFeature + irr::video::IVideoDriver +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_72.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_72.html new file mode 100644 index 0000000..9df7046 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_72.html @@ -0,0 +1,519 @@ + + + + + + + +
+
Loading...
+
+
+ R5G6B5toA1R5G5B5 + irr::video +
+
+
+
+ R5G6B5toA8R8G8B8 + irr::video +
+
+ +
+
+ rand + irr::IRandomizer +
+
+
+
+ randMax + irr::IRandomizer +
+
+ +
+
+ readGUIElement + irr::gui::IGUIEnvironment +
+
+ +
+
+ recalculateAbsolutePosition + irr::gui::IGUIElement +
+
+ +
+
+ recalculateD + irr::core::plane3d +
+
+ + + +
+
+ reciprocal_approxim + irr::core +
+
+ + +
+
+ regenerateMipMapLevels + irr::video::ITexture +
+
+
+
+ registerGUIElementFactory + irr::gui::IGUIEnvironment +
+
+
+
+ registerNodeForRendering + irr::scene::ISceneManager +
+
+
+
+ registerSceneNodeAnimatorFactory + irr::scene::ISceneManager +
+
+
+
+ registerSceneNodeFactory + irr::scene::ISceneManager +
+
+ +
+
+ removeAll + irr::scene::ISceneNode +
+
+
+
+ removeAllAffectors + irr::scene::IParticleSystemSceneNode +
+
+
+
+ removeAllHardwareBuffers + irr::video::IVideoDriver +
+
+
+
+ removeAllItems + irr::gui::IGUIContextMenu +
+
+
+
+ removeAllOcclusionQueries + irr::video::IVideoDriver +
+
+
+
+ removeAllTextures + irr::video::IVideoDriver +
+
+
+
+ removeAllTriangleSelectors + irr::scene::IMetaTriangleSelector +
+
+
+
+ removeAnimator + irr::scene::ISceneNode +
+
+
+
+ removeAnimators + irr::scene::ISceneNode +
+
+
+
+ removeChars + irr::core::string +
+
+ +
+
+ removeColumn + irr::gui::IGUITable +
+
+ +
+
+ removeFocus + irr::gui::IGUIEnvironment +
+
+
+
+ removeFont + irr::gui::IGUIEnvironment +
+
+
+
+ removeHardwareBuffer + irr::video::IVideoDriver +
+
+ +
+
+ removeMesh + irr::scene::IMeshCache +
+
+
+
+ removeOcclusionQuery + irr::video::IVideoDriver +
+
+
+
+ removeRow + irr::gui::IGUITable +
+
+
+
+ removeTab + irr::gui::IGUITabControl +
+
+
+
+ removeTexture + irr::video::IVideoDriver +
+
+
+
+ removeTriangleSelector + irr::scene::IMetaTriangleSelector +
+
+ +
+
+ renameTexture + irr::video::IVideoDriver +
+
+ + + +
+
+ reserve + irr::core::string +
+
+ +
+
+ restoreWindow + irr::IrrlichtDevice +
+
+
+
+ RGB16 + irr::video +
+
+
+
+ RGB16from16 + irr::video +
+
+
+
+ RGBA16 + irr::video +
+
+
+
+ rotateBy + irr::core::vector2d +
+
+ +
+
+ rotateXYBy + irr::core::vector3d +
+
+
+
+ rotateXZBy + irr::core::vector3d +
+
+
+
+ rotateYZBy + irr::core::vector3d +
+
+
+
+ rotationFromTo + irr::core::quaternion +
+
+
+
+ rotationToDirection + irr::core::vector3d +
+
+
+
+ round32 + irr::core +
+
+
+
+ round_ + irr::core +
+
+
+
+ run + irr::IrrlichtDevice +
+
+
+
+ runAllOcclusionQueries + irr::video::IVideoDriver +
+
+
+
+ runOcclusionQuery + irr::video::IVideoDriver +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_73.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_73.html new file mode 100644 index 0000000..97b5a58 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_73.html @@ -0,0 +1,2628 @@ + + + + + + + +
+
Loading...
+
+
+ s32_clamp + irr::core +
+
+
+
+ s32_max + irr::core +
+
+
+
+ s32_min + irr::core +
+
+ + + +
+
+ SAnimatedMesh + irr::scene::SAnimatedMesh +
+
+
+
+ SAttributeReadWriteOptions + irr::io::SAttributeReadWriteOptions +
+
+ + +
+
+ SBlendFunc + irr::scene::quake3::SBlendFunc +
+
+ +
+
+ scaleMesh + irr::scene::IMeshManipulator +
+
+ +
+
+ scaleTexture + irr::scene::ITerrainSceneNode +
+
+ + +
+
+ SColorHSL + irr::video::SColorHSL +
+
+ + +
+
+ sendToBack + irr::gui::IGUIElement +
+
+ + +
+
+ set_free_when_destroyed + irr::core::array +
+
+
+
+ set_pointer + irr::core::array +
+
+
+
+ set_sorted + irr::core::array +
+
+ +
+
+ setActiveCamera + irr::scene::ISceneManager +
+
+
+
+ setActiveColumn + irr::gui::IGUITable +
+
+
+
+ setActiveIcon + irr::gui::ICursorControl +
+
+ +
+
+ setAffectX + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAffectY + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAffectZ + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAlignment + irr::gui::IGUIElement +
+
+
+
+ setAllocStrategy + irr::core::array +
+
+
+
+ setAllowZWriteOnTransparent + irr::video::IVideoDriver +
+
+
+
+ setAlpha + irr::video::SColor +
+
+ +
+
+ setAnimatedMeshSceneNode + irr::scene::IParticleAnimatedMeshSceneNodeEmitter +
+
+
+
+ setAnimateTarget + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setAnimationEndCallback + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setAnimationMode + irr::scene::IBoneSceneNode +
+
+ +
+
+ setAspectRatio + irr::scene::ICameraSceneNode +
+
+
+
+ setAttract + irr::scene::IParticleAttractionAffector +
+
+
+
+ setAttribute +
+ irr::io::IAttributes::setAttribute(const c8 *attributeName, s32 value)=0 + irr::io::IAttributes::setAttribute(s32 index, s32 value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, f32 value)=0 + irr::io::IAttributes::setAttribute(s32 index, f32 value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const c8 *value)=0 + irr::io::IAttributes::setAttribute(s32 index, const c8 *value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const wchar_t *value)=0 + irr::io::IAttributes::setAttribute(s32 index, const wchar_t *value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, void *data, s32 dataSizeInBytes)=0 + irr::io::IAttributes::setAttribute(s32 index, void *data, s32 dataSizeInBytes)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const core::array< core::stringw > &value)=0 + irr::io::IAttributes::setAttribute(s32 index, const core::array< core::stringw > &value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, bool value)=0 + irr::io::IAttributes::setAttribute(s32 index, bool value)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const c8 *enumValue, const c8 *const *enumerationLiterals)=0 + irr::io::IAttributes::setAttribute(s32 index, const c8 *enumValue, const c8 *const *enumerationLiterals)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, video::SColor color)=0 + irr::io::IAttributes::setAttribute(s32 index, video::SColor color)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, video::SColorf color)=0 + irr::io::IAttributes::setAttribute(s32 index, video::SColorf color)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::vector3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::vector3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::vector2df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::vector2df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::position2di v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::position2di v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::rect< s32 > v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::rect< s32 > v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::dimension2d< u32 > v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::dimension2d< u32 > v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, const core::matrix4 &v)=0 + irr::io::IAttributes::setAttribute(s32 index, const core::matrix4 &v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::quaternion v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::quaternion v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::aabbox3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::aabbox3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::plane3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::plane3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::triangle3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::triangle3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::line2df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::line2df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, core::line3df v)=0 + irr::io::IAttributes::setAttribute(s32 index, core::line3df v)=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, video::ITexture *texture, const io::path &filename="")=0 + irr::io::IAttributes::setAttribute(s32 index, video::ITexture *texture, const io::path &filename="")=0 + irr::io::IAttributes::setAttribute(const c8 *attributeName, void *userPointer)=0 + irr::io::IAttributes::setAttribute(s32 index, void *userPointer)=0 +
+
+
+
+
+ setAutomaticCulling + irr::scene::ISceneNode +
+
+
+
+ setAutoScroll + irr::gui::IGUIEditBox +
+
+
+
+ setAutoScrollEnabled + irr::gui::IGUIListBox +
+
+ +
+
+ setBasicRenderStates + irr::video::IMaterialRendererServices +
+
+
+
+ setbit_cond + irr::core +
+
+
+
+ setBlue + irr::video::SColor +
+
+ +
+
+ setBox + irr::scene::IParticleBoxEmitter +
+
+
+
+ setbyproduct + irr::core::CMatrix4 +
+
+
+
+ setbyproduct_nocheck + irr::core::CMatrix4 +
+
+
+
+ setCameraMovementDelta + irr::scene::ITerrainSceneNode +
+
+
+
+ setCameraRotationDelta + irr::scene::ITerrainSceneNode +
+
+
+
+ setCellColor + irr::gui::IGUITable +
+
+
+
+ setCellData + irr::gui::IGUITable +
+
+ + +
+
+ setChecked + irr::gui::IGUICheckBox +
+
+
+
+ setClipPlane + irr::video::IVideoDriver +
+
+
+
+ setCloseHandling + irr::gui::IGUIContextMenu +
+
+
+
+ setCollisionCallback + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ +
+
+ setColorComponentValue + irr::video::SColorf +
+
+
+
+ setColumnOrdering + irr::gui::IGUITable +
+
+
+
+ setColumnWidth + irr::gui::IGUITable +
+
+
+
+ setCurrentFrame + irr::scene::IAnimatedMeshSceneNode +
+
+ +
+
+ setData2 + irr::gui::IGUITreeViewNode +
+
+
+
+ setDebugDataVisible + irr::scene::ISceneNode +
+
+
+
+ setDebugName + irr::IReferenceCounted +
+
+
+
+ setDecimalPlaces + irr::gui::IGUISpinBox +
+
+
+
+ setDefaultNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ setDefaultProperties + irr::scene::IColladaMeshWriter +
+
+
+
+ setDefaultText + irr::gui::IGUISkin +
+
+
+
+ setDefinitelyIdentityMatrix + irr::core::CMatrix4 +
+
+
+
+ setDirection + irr::scene::IParticleEmitter +
+
+ +
+
+ setDistance + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+
+
+ setDraggable + irr::gui::IGUIWindow +
+
+ + +
+
+ setDrawFlags + irr::gui::IGUITable +
+
+
+
+ setDrawTitlebar + irr::gui::IGUIWindow +
+
+
+
+ setDynamicSelectorUpdate + irr::scene::ITerrainSceneNode +
+
+
+
+ setEllipsoidRadius + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setEllipsoidTranslation + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setEmitter + irr::scene::IParticleSystemSceneNode +
+
+ +
+
+ setEventParent + irr::gui::IGUIContextMenu +
+
+
+
+ setEventReceiver + irr::IrrlichtDevice +
+
+ +
+
+ setExpanded + irr::gui::IGUITreeViewNode +
+
+
+
+ setExportSMaterialsOnlyOnce + irr::scene::IColladaMeshWriter +
+
+
+
+ setFadeOutTime + irr::scene::IParticleFadeOutAffector +
+
+
+
+ setFarValue + irr::scene::ICameraSceneNode +
+
+
+
+ setFileListSystem + irr::io::IFileSystem +
+
+
+
+ setFlag + irr::video::SMaterial +
+
+
+
+ setFocus + irr::gui::IGUIEnvironment +
+
+
+
+ setFog + irr::video::IVideoDriver +
+
+
+
+ setFont + irr::gui::IGUISkin +
+
+
+
+ setFootColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setFOV + irr::scene::ICameraSceneNode +
+
+
+
+ setFrameLoop + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setFrom + irr::scene::SViewFrustum +
+
+
+
+ setGammaRamp + irr::IrrlichtDevice +
+
+
+
+ setGeometryWriting + irr::scene::IColladaMeshWriter +
+
+ +
+
+ setGreen + irr::video::SColor +
+
+ +
+
+ setHardwareSkinning + irr::scene::ISkinnedMesh +
+
+ +
+
+ setIconFont + irr::gui::IGUITreeView +
+
+ + +
+
+ setImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ setImageLeftOfIcon + irr::gui::IGUITreeView +
+
+
+
+ setImageList + irr::gui::IGUITreeView +
+
+ +
+
+ setInputReceiverEnabled + irr::scene::ICameraSceneNode +
+
+
+
+ setInputReceivingSceneManager + irr::IrrlichtDevice +
+
+
+
+ setInterpolationMode + irr::scene::ISkinnedMesh +
+
+
+
+ setInterpolationShift + irr::scene::IAnimatedMeshMD3 +
+
+
+
+ setInverseRotationDegrees + irr::core::CMatrix4 +
+
+
+
+ setInverseRotationRadians + irr::core::CMatrix4 +
+
+
+
+ setInverseTranslation + irr::core::CMatrix4 +
+
+
+
+ setInvertMouse + irr::scene::ISceneNodeAnimatorCameraFPS +
+
+
+
+ setInvisibleCharacters + irr::gui::IGUIFont +
+
+
+
+ setIsDebugObject + irr::scene::ISceneNode +
+
+
+
+ setIsPushButton + irr::gui::IGUIButton +
+
+
+
+ setItem + irr::gui::IGUIListBox +
+
+
+
+ setItemAutoChecking + irr::gui::IGUIContextMenu +
+
+
+
+ setItemChecked + irr::gui::IGUIContextMenu +
+
+
+
+ setItemCommandId + irr::gui::IGUIContextMenu +
+
+
+
+ setItemEnabled + irr::gui::IGUIContextMenu +
+
+
+
+ setItemHeight + irr::gui::IGUIListBox +
+
+ +
+
+ setItemText + irr::gui::IGUIContextMenu +
+
+
+
+ setJointMode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setKerningHeight + irr::gui::IGUIFont +
+
+
+
+ setKerningWidth + irr::gui::IGUIFont +
+
+ +
+
+ setLargeStep + irr::gui::IGUIScrollBar +
+
+ +
+
+ setLightData + irr::scene::ILightSceneNode +
+
+
+
+ setLightManager + irr::scene::ISceneManager +
+
+
+
+ setLightType + irr::scene::ILightSceneNode +
+
+ +
+
+ setLinesVisible + irr::gui::IGUITreeView +
+
+
+
+ setLODOfPatch + irr::scene::ITerrainSceneNode +
+
+
+
+ setLogLevel + irr::ILogger +
+
+
+
+ setLoopMode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setM + irr::core::CMatrix4 +
+
+ + +
+
+ setMaterialRendererName + irr::video::IVideoDriver +
+
+
+
+ setMaterialTexture + irr::scene::ISceneNode +
+
+
+
+ setMaterialType + irr::scene::ISceneNode +
+
+ +
+
+ setMaxAngleDegrees + irr::scene::IParticleEmitter +
+
+
+
+ setMaxLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ setMaxParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ setMaxSelectionRows + irr::gui::IGUIComboBox +
+
+
+
+ setMaxSize + irr::gui::IGUIElement +
+
+
+
+ setMaxStartColor + irr::scene::IParticleEmitter +
+
+
+
+ setMaxStartSize + irr::scene::IParticleEmitter +
+
+ + + +
+
+ setMin + irr::gui::IGUIScrollBar +
+
+
+
+ setMinHardwareBufferVertexCount + irr::video::IVideoDriver +
+
+
+
+ setMinLifeTime + irr::scene::IParticleEmitter +
+
+
+
+ setMinParticlesPerSecond + irr::scene::IParticleEmitter +
+
+
+
+ setMinSize + irr::gui::IGUIElement +
+
+
+
+ setMinStartColor + irr::scene::IParticleEmitter +
+
+
+
+ setMinStartSize + irr::scene::IParticleEmitter +
+
+ +
+
+ setMultiLine + irr::gui::IGUIEditBox +
+
+ +
+
+ setNameGenerator + irr::scene::IColladaMeshWriter +
+
+
+
+ setNearValue + irr::scene::ICameraSceneNode +
+
+
+
+ setNormal + irr::scene::IParticleCylinderEmitter +
+
+ +
+
+ setNotClipped + irr::gui::IGUIElement +
+
+
+
+ setOutlineOnly + irr::scene::IParticleCylinderEmitter +
+
+ + +
+
+ setParent + irr::scene::ISceneNode +
+
+
+
+ setParticlesAreGlobal + irr::scene::IParticleSystemSceneNode +
+
+
+
+ setParticleSize + irr::scene::IParticleSystemSceneNode +
+
+
+
+ setPasswordBox + irr::gui::IGUIEditBox +
+
+
+
+ setPath + irr::io::SNamedPath +
+
+
+
+ setPivotPoint + irr::scene::IParticleRotationAffector +
+
+
+
+ setPixel + irr::video::IImage +
+
+ + +
+
+ setPlatformBehavior + irr::gui::ICursorControl +
+
+
+
+ setPoint + irr::scene::IParticleAttractionAffector +
+
+
+
+ setPos + irr::gui::IGUIScrollBar +
+
+ +
+
+ setPressed + irr::gui::IGUIButton +
+
+ +
+
+ setProjectionMatrix + irr::scene::ICameraSceneNode +
+
+
+
+ setProperties + irr::scene::IColladaMeshWriter +
+
+ +
+
+ setRandomizer + irr::IrrlichtDevice +
+
+
+
+ setRange + irr::gui::IGUISpinBox +
+
+ +
+
+ setRed + irr::video::SColor +
+
+
+
+ setReferenceRect + irr::gui::ICursorControl +
+
+ +
+
+ setRelativePositionProportional + irr::gui::IGUIElement +
+
+
+
+ setRenderFromIdentity + irr::scene::IAnimatedMeshSceneNode +
+
+ +
+
+ setResizable + irr::IrrlichtDevice +
+
+
+
+ setResizableColumns + irr::gui::IGUITable +
+
+
+
+ setRightToLeft + irr::gui::IGUIStaticText +
+
+
+
+ setRingThickness + irr::scene::IParticleRingEmitter +
+
+ + +
+
+ setRotationAxisRadians + irr::core::CMatrix4 +
+
+
+
+ setRotationCenter + irr::core::CMatrix4 +
+
+
+
+ setRotationDegrees + irr::core::CMatrix4 +
+
+
+
+ setRotationRadians + irr::core::CMatrix4 +
+
+ + +
+
+ setSceneManager + irr::scene::ISceneNode +
+
+ +
+
+ setSelectedImageIndex + irr::gui::IGUITreeViewNode +
+
+
+
+ setShadowColor + irr::scene::ISceneManager +
+
+
+
+ setShadowMesh + irr::scene::IShadowVolumeSceneNode +
+
+ +
+
+ setSkin + irr::gui::IGUIEnvironment +
+
+
+
+ setSkinningSpace + irr::scene::IBoneSceneNode +
+
+
+
+ setSmallStep + irr::gui::IGUIScrollBar +
+
+ +
+
+ setSprite + irr::gui::IGUIButton +
+
+ +
+
+ setStepSize + irr::gui::IGUISpinBox +
+
+
+
+ setSubDivideU + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setSubDivideV + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setSubElement + irr::gui::IGUIElement +
+
+
+
+ setTabExtraWidth + irr::gui::IGUITabControl +
+
+
+
+ setTabGroup + irr::gui::IGUIElement +
+
+
+
+ setTabHeight + irr::gui::IGUITabControl +
+
+
+
+ setTabMaxWidth + irr::gui::IGUITabControl +
+
+
+
+ setTabOrder + irr::gui::IGUIElement +
+
+
+
+ setTabStop + irr::gui::IGUIElement +
+
+
+
+ setTabVerticalAlignment + irr::gui::IGUITabControl +
+
+
+
+ setTailColor + irr::scene::IVolumeLightSceneNode +
+
+
+
+ setTarget + irr::scene::ICameraSceneNode +
+
+
+
+ setTargetColor + irr::scene::IParticleFadeOutAffector +
+
+
+
+ setTargetNode + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+ + + +
+
+ setTextRestrainedInside + irr::gui::IGUIStaticText +
+
+ +
+
+ setTextureCreationFlag + irr::video::IVideoDriver +
+
+ +
+
+ setTextureRotationCenter + irr::core::CMatrix4 +
+
+
+
+ setTextureScale + irr::core::CMatrix4 +
+
+
+
+ setTextureScaleCenter + irr::core::CMatrix4 +
+
+
+
+ setTextureTranslate + irr::core::CMatrix4 +
+
+
+
+ setTextureTranslateTransposed + irr::core::CMatrix4 +
+
+
+
+ setTime + irr::ITimer +
+
+
+
+ setTimeForceLost + irr::scene::IParticleGravityAffector +
+
+
+
+ setto + irr::scene::SMD3QuaternionTag +
+
+
+
+ setToolTipText + irr::gui::IGUIElement +
+
+
+
+ setTransform + irr::video::IVideoDriver +
+
+
+
+ setTransitionTime + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ setTranslation + irr::core::CMatrix4 +
+
+
+
+ setTriangleSelector + irr::scene::ISceneNode +
+
+ +
+
+ setUpVector + irr::scene::ICameraSceneNode +
+
+ + +
+
+ setUserEventReceiver + irr::gui::IGUIEnvironment +
+
+ + + + + +
+
+ setVerticalMovement + irr::scene::ISceneNodeAnimatorCameraFPS +
+
+
+
+ setViewMatrixAffector + irr::scene::ICameraSceneNode +
+
+
+
+ setViewPort + irr::video::IVideoDriver +
+
+ +
+
+ setWindowCaption + irr::IrrlichtDevice +
+
+ +
+
+ setWorld + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ setWriteDefaultScene + irr::scene::IColladaMeshWriter +
+
+
+
+ setWriteTextures + irr::scene::IColladaMeshWriter +
+
+
+
+ setZoomSpeed + irr::scene::ISceneNodeAnimatorCameraMaya +
+
+ +
+
+ SGUISprite + irr::gui::SGUISprite +
+
+
+
+ sign + irr::core::FloatIntUnion32 +
+
+ + +
+
+ SJoint + irr::scene::ISkinnedMesh::SJoint +
+
+ +
+
+ skinMesh + irr::scene::ISkinnedMesh +
+
+
+
+ sleep + irr::IrrlichtDevice +
+
+
+
+ slerp + irr::core::quaternion +
+
+
+
+ SLight + irr::video::SLight +
+
+ + +
+
+ SMD3Mesh + irr::scene::SMD3Mesh +
+
+ + +
+
+ SMesh + irr::scene::SMesh +
+
+
+
+ SModifierFunction + irr::scene::quake3::SModifierFunction +
+
+ + +
+
+ SOverrideMaterial + irr::video::SOverrideMaterial +
+
+
+
+ split + irr::core::string +
+
+ + +
+
+ SSkinMeshBuffer + irr::scene::SSkinMeshBuffer +
+
+
+
+ start + irr::ITimer +
+
+
+
+ stop + irr::ITimer +
+
+ + +
+
+ strtof10 + irr::core +
+
+
+
+ strtol10 + irr::core +
+
+
+
+ strtoul10 + irr::core +
+
+
+
+ strtoul16 + irr::core +
+
+
+
+ strtoul8 + irr::core +
+
+
+
+ strtoul_prefix + irr::core +
+
+
+
+ subString + irr::core::string +
+
+
+
+ SVarGroup + irr::scene::quake3::SVarGroup +
+
+
+
+ SVarGroupList + irr::scene::quake3::SVarGroupList +
+
+
+
+ SVariable + irr::scene::quake3::SVariable +
+
+
+
+ SVertexColorBrightnessManipulator + irr::scene::SVertexColorBrightnessManipulator +
+
+
+
+ SVertexColorContrastBrightnessManipulator + irr::scene::SVertexColorContrastBrightnessManipulator +
+
+
+
+ SVertexColorContrastManipulator + irr::scene::SVertexColorContrastManipulator +
+
+
+
+ SVertexColorGammaManipulator + irr::scene::SVertexColorGammaManipulator +
+
+
+
+ SVertexColorInterpolateLinearManipulator + irr::scene::SVertexColorInterpolateLinearManipulator +
+
+
+
+ SVertexColorInterpolateQuadraticManipulator + irr::scene::SVertexColorInterpolateQuadraticManipulator +
+
+
+
+ SVertexColorScaleManipulator + irr::scene::SVertexColorScaleManipulator +
+
+
+
+ SVertexColorSetAlphaManipulator + irr::scene::SVertexColorSetAlphaManipulator +
+
+
+
+ SVertexColorSetManipulator + irr::scene::SVertexColorSetManipulator +
+
+
+
+ SVertexColorThresholdManipulator + irr::scene::SVertexColorThresholdManipulator +
+
+
+
+ SVertexPositionScaleAlongNormalsManipulator + irr::scene::SVertexPositionScaleAlongNormalsManipulator +
+
+
+
+ SVertexPositionScaleManipulator + irr::scene::SVertexPositionScaleManipulator +
+
+
+
+ SVertexPositionTransformManipulator + irr::scene::SVertexPositionTransformManipulator +
+
+
+
+ SVertexTCoordsScaleManipulator + irr::scene::SVertexTCoordsScaleManipulator +
+
+ + +
+
+ swapItems + irr::gui::IGUIListBox +
+
+
+
+ swapRows + irr::gui::IGUITable +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_74.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_74.html new file mode 100644 index 0000000..f151435 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_74.html @@ -0,0 +1,154 @@ + + + + + + + +
+
Loading...
+
+
+ textureBlendFunc_hasAlpha + irr::video +
+
+
+
+ tick + irr::ITimer +
+
+
+
+ toA1R5G5B5 + irr::video::SColor +
+
+
+
+ toAngleAxis + irr::core::quaternion +
+
+
+
+ toEuler + irr::core::quaternion +
+
+
+
+ toNCName + irr::scene::IColladaMeshWriter +
+
+
+
+ toOpenGLColor + irr::video::SColor +
+
+
+
+ toRGB + irr::video::SColorHSL +
+
+
+
+ toSColor + irr::video::SColorf +
+
+ +
+
+ transformBox + irr::core::CMatrix4 +
+
+
+
+ transformBoxEx + irr::core::CMatrix4 +
+
+
+
+ transformMesh + irr::scene::IMeshManipulator +
+
+ +
+
+ transformVec3 + irr::core::CMatrix4 +
+
+ +
+
+ translateVect + irr::core::CMatrix4 +
+
+ +
+
+ trim + irr::core::string +
+
+
+
+ turnLightOn + irr::video::IVideoDriver +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_75.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_75.html new file mode 100644 index 0000000..4465bf4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_75.html @@ -0,0 +1,86 @@ + + + + + + + +
+
Loading...
+ +
+
+ unpack_textureBlendFunc + irr::video +
+
+ +
+
+ updateAbsolutePositionOfAllChildren + irr::scene::IBoneSceneNode +
+
+
+
+ updateAllOcclusionQueries + irr::video::IVideoDriver +
+
+
+
+ updateNormalsWhenAnimating + irr::scene::ISkinnedMesh +
+
+
+
+ updateOcclusionQuery + irr::video::IVideoDriver +
+
+
+
+ updateShadowVolumes + irr::scene::IShadowVolumeSceneNode +
+
+
+
+ useAnimationFrom + irr::scene::ISkinnedMesh +
+
+
+
+ useNodeMaterial + irr::scene::IColladaMeshWriterProperties +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_76.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_76.html new file mode 100644 index 0000000..b2703ca --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_76.html @@ -0,0 +1,49 @@ + + + + + + + +
+
Loading...
+
+
+ validate + irr::core::string +
+
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_77.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_77.html new file mode 100644 index 0000000..a4c08ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_77.html @@ -0,0 +1,101 @@ + + + + + + + +
+
Loading...
+ +
+
+ writeClosingTag + irr::io::IXMLWriter +
+
+
+
+ writeComment + irr::io::IXMLWriter +
+
+ +
+
+ writeGUIElement + irr::gui::IGUIEnvironment +
+
+
+
+ writeImage + irr::video::IImageWriter +
+
+ +
+
+ writeLineBreak + irr::io::IXMLWriter +
+
+
+
+ writeMesh + irr::scene::IMeshWriter +
+
+
+
+ writeScene + irr::scene::IColladaMeshWriter +
+
+
+
+ writeText + irr::io::IXMLWriter +
+
+
+
+ writeXMLHeader + irr::io::IXMLWriter +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_78.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_78.html new file mode 100644 index 0000000..889dfba --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_78.html @@ -0,0 +1,40 @@ + + + + + + + +
+
Loading...
+
+
+ X8R8G8B8toA1R5G5B5 + irr::video +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_79.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_79.html new file mode 100644 index 0000000..5a6018f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_79.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ yield + irr::IrrlichtDevice +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/functions_7e.html b/src/others/irrlicht-1.8.1/doc/html/search/functions_7e.html new file mode 100644 index 0000000..10f90c9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/functions_7e.html @@ -0,0 +1,242 @@ + + + + + + + +
+
Loading...
+
+
+ ~array + irr::core::array +
+
+
+
+ ~CDynamicMeshBuffer + irr::scene::CDynamicMeshBuffer +
+
+
+
+ ~CIndexBuffer + irr::scene::CIndexBuffer +
+
+
+
+ ~CVertexBuffer + irr::scene::CVertexBuffer +
+
+
+
+ ~IAnimatedMeshSceneNode + irr::scene::IAnimatedMeshSceneNode +
+
+
+
+ ~IColladaMeshWriter + irr::scene::IColladaMeshWriter +
+
+
+
+ ~IColladaMeshWriterNames + irr::scene::IColladaMeshWriterNames +
+
+
+
+ ~IColladaMeshWriterProperties + irr::scene::IColladaMeshWriterProperties +
+
+
+
+ ~IEventReceiver + irr::IEventReceiver +
+
+
+
+ ~IFileReadCallBack + irr::io::IFileReadCallBack +
+
+
+
+ ~IGPUProgrammingServices + irr::video::IGPUProgrammingServices +
+
+
+
+ ~IGUIElement + irr::gui::IGUIElement +
+
+
+
+ ~IGUIImageList + irr::gui::IGUIImageList +
+
+
+
+ ~IIrrXMLReader + irr::io::IIrrXMLReader +
+
+
+
+ ~ILogger + irr::ILogger +
+
+
+
+ ~IMaterialRendererServices + irr::video::IMaterialRendererServices +
+
+
+
+ ~IMeshCache + irr::scene::IMeshCache +
+
+
+
+ ~IMeshLoader + irr::scene::IMeshLoader +
+
+
+
+ ~IMeshWriter + irr::scene::IMeshWriter +
+
+
+
+ ~IReferenceCounted + irr::IReferenceCounted +
+
+
+
+ ~irrAllocator + irr::core::irrAllocator +
+
+
+
+ ~ISceneNode + irr::scene::ISceneNode +
+
+
+
+ ~ISceneNodeAnimatorCollisionResponse + irr::scene::ISceneNodeAnimatorCollisionResponse +
+
+
+
+ ~ISceneUserDataSerializer + irr::scene::ISceneUserDataSerializer +
+
+
+
+ ~IShader + irr::scene::quake3::IShader +
+
+
+
+ ~list + irr::core::list +
+
+
+
+ ~map + irr::core::map +
+
+
+
+ ~SAnimatedMesh + irr::scene::SAnimatedMesh +
+
+
+
+ ~SMaterialLayer + irr::video::SMaterialLayer +
+
+
+
+ ~SMD3Mesh + irr::scene::SMD3Mesh +
+
+
+
+ ~SMD3QuaternionTag + irr::scene::SMD3QuaternionTag +
+
+
+
+ ~SMD3QuaternionTagList + irr::scene::SMD3QuaternionTagList +
+
+
+
+ ~SMesh + irr::scene::SMesh +
+
+
+
+ ~string + irr::core::string +
+
+
+
+ ~SVarGroup + irr::scene::quake3::SVarGroup +
+
+
+
+ ~SVarGroupList + irr::scene::quake3::SVarGroupList +
+
+
+
+ ~SVariable + irr::scene::quake3::SVariable +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/mag_sel.png b/src/others/irrlicht-1.8.1/doc/html/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/search/mag_sel.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/search/namespaces_69.html b/src/others/irrlicht-1.8.1/doc/html/search/namespaces_69.html new file mode 100644 index 0000000..119c85e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/namespaces_69.html @@ -0,0 +1,61 @@ + + + + + + + +
+
Loading...
+
+
+ core + irr +
+
+
+
+ gui + irr +
+
+
+
+ io + irr +
+
+
+
+ irr +
+
+
+
+ quake3 + irr::scene +
+
+
+
+ scene + irr +
+
+
+
+ video + irr +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/nomatches.html b/src/others/irrlicht-1.8.1/doc/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/related_63.html b/src/others/irrlicht-1.8.1/doc/html/search/related_63.html new file mode 100644 index 0000000..c8f61c5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/related_63.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+ + +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/related_69.html b/src/others/irrlicht-1.8.1/doc/html/search/related_69.html new file mode 100644 index 0000000..ed57d5e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/related_69.html @@ -0,0 +1,29 @@ + + + + + + + +
+
Loading...
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/related_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/related_6c.html new file mode 100644 index 0000000..a23dbe8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/related_6c.html @@ -0,0 +1,29 @@ + + + + + + + +
+
Loading...
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/related_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/related_6d.html new file mode 100644 index 0000000..a14cfd0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/related_6d.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ map< KeyType, ValueType > + irr::core::map::AccessClass +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/related_73.html b/src/others/irrlicht-1.8.1/doc/html/search/related_73.html new file mode 100644 index 0000000..3c65b1d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/related_73.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ SMaterial + irr::video::SMaterialLayer +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/search.css b/src/others/irrlicht-1.8.1/doc/html/search/search.css new file mode 100644 index 0000000..1b3580a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/search.css @@ -0,0 +1,233 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + position: absolute; + float: none; + display: inline; + margin-top: 8px; + right: 0px; + width: 170px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:116px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #9093CE; + background-color: #F9F9FC; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D418C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEEEF7; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #424697; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #424697; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} diff --git a/src/others/irrlicht-1.8.1/doc/html/search/search.js b/src/others/irrlicht-1.8.1/doc/html/search/search.js new file mode 100644 index 0000000..57e588c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/search.js @@ -0,0 +1,746 @@ +// Search script generated by doxygen +// Copyright (C) 2009 by Dimitri van Heesch. + +// The code in this file is loosly based on main.js, part of Natural Docs, +// which is Copyright (C) 2003-2008 Greg Valure +// Natural Docs is licensed under the GPL. + +var indexSectionsWithContent = +{ + 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010111111111111111111111111110001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101101001001110111110101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101111011011100111110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111101111111111111100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111101111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 6: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101101001001110101111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 7: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 8: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111001011110101111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 9: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001001100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + 10: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010110001001000100101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "namespaces", + 3: "files", + 4: "functions", + 5: "variables", + 6: "typedefs", + 7: "enums", + 8: "enumvalues", + 9: "related", + 10: "defines" +}; + +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var hexCode; + if (code<16) + { + hexCode="0"+code.toString(16); + } + else + { + hexCode=code.toString(16); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + { + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} diff --git a/src/others/irrlicht-1.8.1/doc/html/search/search_l.png b/src/others/irrlicht-1.8.1/doc/html/search/search_l.png new file mode 100644 index 0000000..c872f4d Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/search/search_l.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/search/search_m.png b/src/others/irrlicht-1.8.1/doc/html/search/search_m.png new file mode 100644 index 0000000..b429a16 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/search/search_m.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/search/search_r.png b/src/others/irrlicht-1.8.1/doc/html/search/search_r.png new file mode 100644 index 0000000..97ee8b4 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/search/search_r.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_61.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_61.html new file mode 100644 index 0000000..bb69d7d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_61.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ aabbox3df + irr::core +
+
+
+
+ aabbox3di + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_63.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_63.html new file mode 100644 index 0000000..0125da8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_63.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ c8 + irr +
+
+
+
+ char16 + irr::io +
+
+
+
+ char32 + irr::io +
+
+
+
+ char_type + irr::core::string +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_64.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_64.html new file mode 100644 index 0000000..8b707a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_64.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ dimension2df + irr::core +
+
+
+
+ dimension2di + irr::core +
+
+
+
+ dimension2du + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_66.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_66.html new file mode 100644 index 0000000..6822365 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_66.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+
+
+ f32 + irr +
+
+
+
+ f64 + irr +
+
+
+
+ fschar_t + irr +
+
+
+ +
+
+ +
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_69.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_69.html new file mode 100644 index 0000000..060f6a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_69.html @@ -0,0 +1,74 @@ + + + + + + + +
+
Loading...
+
+
+ IEntity + irr::scene::quake3 +
+
+
+
+ IParticlePointEmitter + irr::scene +
+
+
+
+ IrrXMLReader + irr::io +
+
+
+
+ IrrXMLReaderUTF16 + irr::io +
+
+
+
+ IrrXMLReaderUTF32 + irr::io +
+
+
+
+ ISceneNodeAnimatorList + irr::scene +
+
+
+
+ ISceneNodeList + irr::scene +
+
+
+
+ IXMLReader + irr::io +
+
+
+
+ IXMLReaderUTF8 + irr::io +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6c.html new file mode 100644 index 0000000..2a905bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6c.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ line2df + irr::core +
+
+
+
+ line2di + irr::core +
+
+
+
+ line3df + irr::core +
+
+
+
+ line3di + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6d.html new file mode 100644 index 0000000..13c63f2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6d.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ matrix4 + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6e.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6e.html new file mode 100644 index 0000000..33ad702 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_6e.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ Node + irr::core::map +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_70.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_70.html new file mode 100644 index 0000000..cad5910 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_70.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+
+
+ path + irr::io +
+
+
+
+ plane3df + irr::core +
+
+
+
+ plane3di + irr::core +
+
+
+
+ position2df + irr::core +
+
+
+
+ position2di + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_72.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_72.html new file mode 100644 index 0000000..8669bf5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_72.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ rectf + irr::core +
+
+
+
+ recti + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_73.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_73.html new file mode 100644 index 0000000..04e92ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_73.html @@ -0,0 +1,74 @@ + + + + + + + +
+
Loading...
+
+
+ s16 + irr +
+
+
+
+ s32 + irr +
+
+
+
+ s64 + irr +
+
+
+
+ s8 + irr +
+
+
+
+ SMeshBuffer + irr::scene +
+
+
+
+ SMeshBufferLightMap + irr::scene +
+
+
+
+ SMeshBufferTangents + irr::scene +
+
+
+
+ stringc + irr::core +
+
+
+
+ stringw + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_74.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_74.html new file mode 100644 index 0000000..fe07a57 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_74.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+
+
+ tQ3EntityList + irr::scene::quake3 +
+
+
+
+ triangle3df + irr::core +
+
+
+
+ triangle3di + irr::core +
+
+
+
+ tStringList + irr::scene::quake3 +
+
+
+
+ tTexArray + irr::scene::quake3 +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_75.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_75.html new file mode 100644 index 0000000..f2057e9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_75.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ u16 + irr +
+
+
+
+ u32 + irr +
+
+
+
+ u64 + irr +
+
+
+
+ u8 + irr +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/typedefs_76.html b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_76.html new file mode 100644 index 0000000..328f6bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/typedefs_76.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+
+
+ vector2df + irr::core +
+
+
+
+ vector2di + irr::core +
+
+
+
+ vector3df + irr::core +
+
+
+
+ vector3di + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_61.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_61.html new file mode 100644 index 0000000..cfb63de --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_61.html @@ -0,0 +1,185 @@ + + + + + + + +
+
Loading...
+
+
+ a + irr::video::SColorf +
+
+
+
+ AbsoluteClippingRect + irr::gui::IGUIElement +
+
+
+
+ AbsoluteRect + irr::gui::IGUIElement +
+
+
+
+ AbsoluteTransformation + irr::scene::ISceneNode +
+
+
+
+ Action + irr::SKeyMap +
+
+
+
+ AlignBottom + irr::gui::IGUIElement +
+
+
+
+ AlignLeft + irr::gui::IGUIElement +
+
+
+
+ AlignRight + irr::gui::IGUIElement +
+
+
+
+ AlignTop + irr::gui::IGUIElement +
+
+
+
+ ALLOW_ZWRITE_ON_TRANSPARENT + irr::scene +
+
+
+
+ alphagen + irr::scene::quake3::SModifierFunction +
+
+
+
+ alpharef + irr::scene::quake3::Q3LevelLoadParameter +
+
+ +
+
+ amp + irr::scene::quake3::SModifierFunction +
+
+
+
+ Animatedposition + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Animatedrotation + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Animatedscale + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Animators + irr::scene::ISceneNode +
+
+
+
+ AnisotropicFilter + irr::video::SMaterialLayer +
+
+
+
+ AntiAlias + irr::SIrrlichtCreationParameters +
+
+
+
+ AntiAliasing + irr::video::SMaterial +
+
+
+
+ AttachedMeshes + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Attenuation + irr::video::SLight +
+
+
+
+ AutomaticCullingNames + irr::scene +
+
+
+
+ AutomaticCullingState + irr::scene::ISceneNode +
+
+
+
+ Axes + irr::SJoystickInfo +
+
+
+
+ Axis + irr::SEvent::SJoystickEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_62.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_62.html new file mode 100644 index 0000000..42ad3e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_62.html @@ -0,0 +1,168 @@ + + + + + + + +
+
Loading...
+
+
+ b + irr::video::SColorf +
+
+
+ +
+
+
+ B3D_TEXTURE_PATH + irr::scene +
+
+
+
+ BackfaceCulling + irr::video::SMaterial +
+
+
+
+ base + irr::scene::quake3::SModifierFunction +
+
+
+
+ BilinearFilter + irr::video::SMaterialLayer +
+
+
+
+ Binormal + irr::video::S3DVertexTangents +
+
+
+
+ Bits + irr::SIrrlichtCreationParameters +
+
+
+
+ BlendFuncDst + irr::video::IRenderTarget +
+
+
+
+ BlendFuncSrc + irr::video::IRenderTarget +
+
+
+
+ BlendOp + irr::video::IRenderTarget +
+
+
+
+ BlendOperation + irr::video::SMaterial +
+
+
+
+ BoneAnimationModeNames + irr::scene +
+
+ +
+
+ BoundingBoxNeedsRecalculated + irr::scene::SSkinMeshBuffer +
+
+
+
+ Box + irr::scene::SAnimatedMesh +
+
+
+
+ Buffer + irr::scene::SMD3Mesh +
+
+
+
+ buffer_id + irr::scene::ISkinnedMesh::SWeight +
+
+
+
+ bulgeheight + irr::scene::quake3::SModifierFunction +
+
+
+
+ bulgespeed + irr::scene::quake3::SModifierFunction +
+
+
+
+ bulgewidth + irr::scene::quake3::SModifierFunction +
+
+
+
+ Buttons + irr::SJoystickInfo +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_63.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_63.html new file mode 100644 index 0000000..330ec8b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_63.html @@ -0,0 +1,153 @@ + + + + + + + +
+
Loading...
+
+
+ c + irr::io::xmlChar +
+
+
+
+ Caller + irr::SEvent::SGUIEvent +
+
+
+
+ cameraPosition + irr::scene::SViewFrustum +
+
+
+
+ CastShadows + irr::video::SLight +
+
+ + + +
+
+ Char + irr::SEvent::SKeyInput +
+
+ +
+
+ cleanUnResolvedMeshes + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+ +
+ + +
+
+ ColorMaterial + irr::video::SMaterial +
+
+
+
+ content + irr::scene::quake3::SVariable +
+
+ +
+
+ count + irr::scene::quake3::SModifierFunction +
+
+
+
+ CSM_TEXTURE_PATH + irr::scene +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_64.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_64.html new file mode 100644 index 0000000..575518d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_64.html @@ -0,0 +1,191 @@ + + + + + + + +
+
Loading...
+
+
+ D + irr::core::plane3d +
+
+ + +
+
+ D3DDev8 + irr::video::SExposedVideoData +
+
+
+
+ D3DDev9 + irr::video::SExposedVideoData +
+
+
+
+ Day + irr::ITimer::RealTimeDate +
+
+
+
+ DEBUG_NORMAL_COLOR + irr::scene +
+
+
+
+ DEBUG_NORMAL_LENGTH + irr::scene +
+
+
+
+ DebugDataVisible + irr::scene::ISceneNode +
+
+
+
+ defaultFilter + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ defaultLightMapMaterial + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ defaultModulate + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ DEGTORAD + irr::core +
+
+
+
+ DEGTORAD64 + irr::core +
+
+
+
+ DesiredRect + irr::gui::IGUIElement +
+
+
+
+ DeviceType + irr::SIrrlichtCreationParameters +
+
+ +
+
+ Direction + irr::video::SLight +
+
+
+
+ DisplayAdapter + irr::SIrrlichtCreationParameters +
+
+
+
+ div + irr::scene::quake3::SModifierFunction +
+
+
+
+ DMF_ALPHA_CHANNEL_REF + irr::scene +
+
+
+
+ DMF_FLIP_ALPHA_TEXTURES + irr::scene +
+
+
+
+ DMF_IGNORE_MATERIALS_DIRS + irr::scene +
+
+
+
+ DMF_TEXTURE_PATH + irr::scene +
+
+
+
+ Doublebuffer + irr::SIrrlichtCreationParameters +
+
+
+
+ DriverMultithreaded + irr::SIrrlichtCreationParameters +
+
+
+
+ DriverType + irr::SIrrlichtCreationParameters +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_65.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_65.html new file mode 100644 index 0000000..2ae670d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_65.html @@ -0,0 +1,98 @@ + + + + + + + +
+
Loading...
+
+
+ Element + irr::SEvent::SGUIEvent +
+
+
+
+ EmissiveColor + irr::video::SMaterial +
+
+ +
+
+ EnableFlags + irr::video::SOverrideMaterial +
+
+
+
+ EnablePasses + irr::video::SOverrideMaterial +
+
+ + +
+
+ Environment + irr::gui::IGUIElement +
+
+
+
+ Event + irr::SEvent::SMouseInput +
+
+
+
+ EventReceiver + irr::SIrrlichtCreationParameters +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_66.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_66.html new file mode 100644 index 0000000..bd9d388 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_66.html @@ -0,0 +1,144 @@ + + + + + + + +
+
Loading...
+ +
+
+ Falloff + irr::video::SLight +
+
+
+
+ fast_atof_table + irr::core +
+
+ +
+
+ fileSize + irr::scene::SMD3Header +
+
+
+
+ first + irr::scene::SMD3AnimationInfo +
+
+
+
+ Flags + irr::io::SAttributeReadWriteOptions +
+
+
+
+ FogEnable + irr::video::SMaterial +
+
+
+
+ FogTypeNames + irr::video +
+
+
+
+ fps + irr::scene::SMD3AnimationInfo +
+
+ +
+
+ Frames + irr::gui::SGUISprite +
+
+
+
+ FramesPerSecond + irr::scene::SAnimatedMesh +
+
+
+
+ frameStart + irr::scene::SMD3Header +
+
+
+
+ frameTime + irr::gui::SGUISprite +
+
+
+
+ frequency + irr::scene::quake3::SModifierFunction +
+
+
+
+ FrontfaceCulling + irr::video::SMaterial +
+
+
+
+ Fullscreen + irr::SIrrlichtCreationParameters +
+
+
+
+ func + irr::scene::quake3::SModifierFunction +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_67.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_67.html new file mode 100644 index 0000000..a3fed3e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_67.html @@ -0,0 +1,134 @@ + + + + + + + +
+
Loading...
+
+
+ g + irr::video::SColorf +
+
+
+
+ GEOMETRY_SHADER_TYPE_NAMES + irr::video +
+
+
+
+ GlobalAnimatedMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ GlobalInversedMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ GlobalMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ GouraudShading + irr::video::SMaterial +
+
+
+
+ GUIAlignmentNames + irr::gui +
+
+
+
+ GUIButtonStateNames + irr::gui +
+
+
+
+ GUIColumnOrderingNames + irr::gui +
+
+
+
+ GUICursorIconNames + irr::gui +
+
+
+
+ GUIElementTypeNames + irr::gui +
+
+
+
+ GUIEvent + irr::SEvent +
+
+
+
+ GUIOrderingModeNames + irr::gui +
+
+
+
+ GUISkinColorNames + irr::gui +
+
+
+
+ GUISkinFontNames + irr::gui +
+
+
+
+ GUISkinIconNames + irr::gui +
+
+
+
+ GUISkinSizeNames + irr::gui +
+
+
+
+ GUISkinTextNames + irr::gui +
+
+
+
+ GUISkinTypeNames + irr::gui +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_68.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_68.html new file mode 100644 index 0000000..2bce021 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_68.html @@ -0,0 +1,86 @@ + + + + + + + +
+
Loading...
+
+
+ HALF_PI + irr::core +
+
+
+
+ HandleSRGB + irr::SIrrlichtCreationParameters +
+
+
+
+ HDc + irr::video::SExposedVideoData +
+
+
+
+ headerID + irr::scene::SMD3Header +
+
+
+
+ Height + irr::core::dimension2d +
+
+
+
+ HighPrecisionFPU + irr::SIrrlichtCreationParameters +
+
+
+
+ HotSpot + irr::gui::SCursorSprite +
+
+
+
+ Hour + irr::ITimer::RealTimeDate +
+
+
+
+ HRc + irr::video::SExposedVideoData +
+
+
+
+ Hue + irr::video::SColorHSL +
+
+
+
+ HWnd + irr::video::SExposedVideoData +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_69.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_69.html new file mode 100644 index 0000000..43aa1e6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_69.html @@ -0,0 +1,141 @@ + + + + + + + +
+
Loading...
+
+
+ i + irr::core::FloatIntUnion32 +
+
+ +
+
+ IdentityMaterial + irr::video +
+
+
+
+ IdentityMatrix + irr::core +
+
+
+
+ IgnoreInput + irr::SIrrlichtCreationParameters +
+
+
+
+ Index + irr::scene::SMD3Face +
+
+ +
+
+ InnerCone + irr::video::SLight +
+
+
+
+ IRR_SCENE_MANAGER_IS_EDITOR + irr::scene +
+
+
+
+ IsDebugObject + irr::scene::ISceneNode +
+
+
+
+ IsDST + irr::ITimer::RealTimeDate +
+
+
+
+ IsEnabled + irr::gui::IGUIElement +
+
+
+
+ IsOrthogonal + irr::scene::ICameraSceneNode +
+
+
+
+ IsSubElement + irr::gui::IGUIElement +
+
+
+
+ IsTabGroup + irr::gui::IGUIElement +
+
+
+
+ IsTabStop + irr::gui::IGUIElement +
+
+
+
+ isTransparent + irr::scene::quake3::SBlendFunc +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_6a.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_6a.html new file mode 100644 index 0000000..b7a1111 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_6a.html @@ -0,0 +1,35 @@ + + + + + + + +
+
Loading...
+ +
+
+ JoystickEvent + irr::SEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_6b.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_6b.html new file mode 100644 index 0000000..6306a9a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_6b.html @@ -0,0 +1,38 @@ + + + + + + + +
+
Loading...
+
+
+ Key + irr::SEvent::SKeyInput +
+
+
+
+ KeyCode + irr::SKeyMap +
+
+
+
+ KeyInput + irr::SEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_6c.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_6c.html new file mode 100644 index 0000000..2bd03a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_6c.html @@ -0,0 +1,116 @@ + + + + + + + +
+
Loading...
+
+
+ LastParentRect + irr::gui::IGUIElement +
+
+
+
+ Level + irr::SEvent::SLogEvent +
+
+
+
+ Lighting + irr::video::SMaterial +
+
+
+
+ LightTypeNames + irr::video +
+
+
+
+ LMTS_TEXTURE_PATH + irr::scene +
+
+
+
+ loadAllShaders + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ loadSkyShader + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ LocalAnimatedMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ LOCALE_DECIMAL_POINTS + irr::core +
+
+
+
+ LocalMatrix + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ LODBias + irr::video::SMaterialLayer +
+
+
+
+ LogEvent + irr::SEvent +
+
+
+
+ LoggingLevel + irr::SIrrlichtCreationParameters +
+
+
+
+ looping + irr::scene::SMD3AnimationInfo +
+
+
+
+ LowerRightCorner + irr::core::rect +
+
+
+
+ Luminance + irr::video::SColorHSL +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_6d.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_6d.html new file mode 100644 index 0000000..b6c662e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_6d.html @@ -0,0 +1,203 @@ + + + + + + + +
+
Loading...
+ + + +
+
+ MappingHintIndex + irr::scene::SSharedMeshBuffer +
+
+
+
+ MappingHintVertex + irr::scene::SSharedMeshBuffer +
+
+
+
+ masterfunc0 + irr::scene::quake3::SModifierFunction +
+
+
+
+ masterfunc1 + irr::scene::quake3::SModifierFunction +
+
+ +
+
+ MATERIAL_MAX_TEXTURES + irr::video +
+
+
+
+ MaterialType + irr::video::SMaterial +
+
+
+
+ MaterialTypeParam + irr::video::SMaterial +
+
+
+
+ MaterialTypeParam2 + irr::video::SMaterial +
+
+
+
+ MaxEdge + irr::core::aabbox3d +
+
+
+
+ MaxSize + irr::gui::IGUIElement +
+
+
+
+ MD3Header + irr::scene::SMD3Mesh +
+
+
+
+ mergeShaderBuffer + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ MeshBuffers + irr::scene::SMesh +
+
+
+
+ Meshes + irr::scene::SAnimatedMesh +
+
+
+
+ MeshHeader + irr::scene::SMD3MeshBuffer +
+
+
+
+ meshID + irr::scene::SMD3MeshHeader +
+
+
+
+ meshName + irr::scene::SMD3MeshHeader +
+
+
+
+ MinEdge + irr::core::aabbox3d +
+
+
+
+ MinSize + irr::gui::IGUIElement +
+
+
+
+ Minute + irr::ITimer::RealTimeDate +
+
+
+
+ modulate + irr::scene::quake3::SBlendFunc +
+
+
+
+ Month + irr::ITimer::RealTimeDate +
+
+
+
+ MouseInput + irr::SEvent +
+
+
+
+ MY3D_TEXTURE_PATH + irr::scene +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_6e.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_6e.html new file mode 100644 index 0000000..064426f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_6e.html @@ -0,0 +1,114 @@ + + + + + + + +
+
Loading...
+ +
+
+ NamedPath + irr::video::ITexture +
+
+
+
+ NoClip + irr::gui::IGUIElement +
+
+ +
+
+ NormalizeNormals + irr::video::SMaterial +
+
+
+
+ num + irr::scene::SMD3AnimationInfo +
+
+ +
+
+ numMaxSkins + irr::scene::SMD3Header +
+
+
+
+ numMeshes + irr::scene::SMD3Header +
+
+
+
+ numShader + irr::scene::SMD3MeshHeader +
+
+
+
+ numTags + irr::scene::SMD3Header +
+
+
+
+ numTriangles + irr::scene::SMD3MeshHeader +
+
+
+
+ numVertices + irr::scene::SMD3MeshHeader +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_6f.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_6f.html new file mode 100644 index 0000000..27acd3d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_6f.html @@ -0,0 +1,80 @@ + + + + + + + +
+
Loading...
+
+
+ OBJ_LOADER_IGNORE_GROUPS + irr::scene +
+
+
+ +
+
+
+ OBJ_TEXTURE_PATH + irr::scene +
+
+
+
+ offset_end + irr::scene::SMD3MeshHeader +
+
+
+
+ offset_shaders + irr::scene::SMD3MeshHeader +
+
+
+
+ offset_st + irr::scene::SMD3MeshHeader +
+
+
+
+ offset_triangles + irr::scene::SMD3MeshHeader +
+
+
+
+ OpenGLLinux + irr::video::SExposedVideoData +
+
+
+
+ OpenGLWin32 + irr::video::SExposedVideoData +
+
+
+
+ OuterCone + irr::video::SLight +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_70.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_70.html new file mode 100644 index 0000000..4c8cb94 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_70.html @@ -0,0 +1,187 @@ + + + + + + + +
+
Loading...
+
+
+ PACK_STRUCT + irr::scene +
+
+
+
+ param0 + irr::scene::quake3::SBlendFunc +
+
+ +
+
+ ParticleAffectorTypeNames + irr::scene +
+
+
+
+ ParticleEmitterTypeNames + irr::scene +
+
+
+
+ Password + irr::io::IFileArchive +
+
+
+
+ patchTesselation + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ phase + irr::scene::quake3::SModifierFunction +
+
+
+
+ PI + irr::core +
+
+
+
+ PI64 + irr::core +
+
+
+
+ PIXEL_SHADER_TYPE_NAMES + irr::video +
+
+
+
+ planes + irr::scene::SViewFrustum +
+
+
+
+ pointA + irr::core::triangle3d +
+
+
+
+ pointB + irr::core::triangle3d +
+
+
+
+ pointC + irr::core::triangle3d +
+
+
+
+ PointCloud + irr::video::SMaterial +
+
+
+
+ PolygonOffsetDirection + irr::video::SMaterial +
+
+
+
+ PolygonOffsetDirectionNames + irr::video +
+
+
+
+ PolygonOffsetFactor + irr::video::SMaterial +
+
+ + +
+
+ positionHint + irr::scene::IBoneSceneNode +
+
+
+
+ PositionKeys + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ POV + irr::SEvent::SJoystickEvent +
+
+
+
+ PovHat + irr::SJoystickInfo +
+
+
+
+ PressedDown + irr::SEvent::SKeyInput +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_72.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_72.html new file mode 100644 index 0000000..86271d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_72.html @@ -0,0 +1,143 @@ + + + + + + + +
+
Loading...
+
+
+ r + irr::video::SColorf +
+
+
+
+ Radius + irr::video::SLight +
+
+
+
+ RADTODEG + irr::core +
+
+
+
+ RADTODEG64 + irr::core +
+
+
+
+ RECIPROCAL_PI + irr::core +
+
+
+
+ RECIPROCAL_PI64 + irr::core +
+
+
+
+ rectNumber + irr::gui::SGUISpriteFrame +
+
+
+
+ RelativeRect + irr::gui::IGUIElement +
+
+
+
+ RelativeRotation + irr::scene::ISceneNode +
+
+
+
+ RelativeScale + irr::scene::ISceneNode +
+
+
+
+ RelativeTranslation + irr::scene::ISceneNode +
+
+
+
+ RenderTexture + irr::video::IRenderTarget +
+
+
+
+ rgbgen + irr::scene::quake3::SModifierFunction +
+
+ +
+
+ rotationHint + irr::scene::IBoneSceneNode +
+
+
+
+ RotationKeys + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ ROUNDING_ERROR_f32 + irr::core +
+
+
+
+ ROUNDING_ERROR_f64 + irr::core +
+
+
+
+ ROUNDING_ERROR_S32 + irr::core +
+
+
+
+ ROUNDING_ERROR_S64 + irr::core +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_73.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_73.html new file mode 100644 index 0000000..1c03fd0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_73.html @@ -0,0 +1,206 @@ + + + + + + + +
+
Loading...
+
+
+ s + irr::core::inttofloat +
+
+
+
+ Saturation + irr::video::SColorHSL +
+
+
+
+ sBuiltInMaterialTypeNames + irr::video +
+
+
+
+ sBuiltInVertexTypeNames + irr::video +
+
+
+
+ scale + irr::scene::ISkinnedMesh::SScaleKey +
+
+
+
+ scaleHint + irr::scene::IBoneSceneNode +
+
+
+
+ ScaleKeys + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ ScaleRect + irr::gui::IGUIElement +
+
+
+
+ SceneManager + irr::scene::ISceneNode +
+
+
+
+ scriptDir + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ SDK_version_do_not_use + irr::SIrrlichtCreationParameters +
+
+
+
+ Second + irr::ITimer::RealTimeDate +
+
+
+
+ Shader + irr::scene::SMD3MeshBuffer +
+
+ +
+
+ Shininess + irr::video::SMaterial +
+
+
+
+ size + irr::scene::SParticle +
+
+ +
+
+ SpriteBank + irr::gui::SCursorSprite +
+
+
+
+ SpriteId + irr::gui::SCursorSprite +
+
+ +
+
+ startColor + irr::scene::SParticle +
+
+
+
+ startSize + irr::scene::SParticle +
+
+ +
+
+ startVector + irr::scene::SParticle +
+
+
+
+ Stencilbuffer + irr::SIrrlichtCreationParameters +
+
+
+
+ Stereobuffer + irr::SIrrlichtCreationParameters +
+
+
+
+ strength + irr::scene::ISkinnedMesh::SWeight +
+
+
+
+ swapHeader + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ swapLump + irr::scene::quake3::Q3LevelLoadParameter +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_74.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_74.html new file mode 100644 index 0000000..206069d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_74.html @@ -0,0 +1,160 @@ + + + + + + + +
+
Loading...
+
+
+ TabOrder + irr::gui::IGUIElement +
+
+
+
+ tagEnd + irr::scene::SMD3Header +
+
+
+
+ TagList + irr::scene::SMD3Mesh +
+
+
+
+ tagStart + irr::scene::SMD3Header +
+
+
+
+ Tangent + irr::video::S3DVertexTangents +
+
+
+
+ TargetType + irr::video::IRenderTarget +
+
+
+
+ tcgen + irr::scene::quake3::SModifierFunction +
+
+
+
+ TCoords + irr::video::S3DVertex +
+
+
+
+ TCoords2 + irr::video::S3DVertex2TCoords +
+
+
+
+ Tex + irr::scene::SMD3MeshBuffer +
+
+ +
+
+ Texture + irr::video::SMaterialLayer +
+
+
+
+ TextureLayer + irr::video::SMaterial +
+
+
+
+ textureNumber + irr::gui::SGUISpriteFrame +
+
+
+
+ TextureWrapU + irr::video::SMaterialLayer +
+
+
+
+ TextureWrapV + irr::video::SMaterialLayer +
+
+
+
+ Thickness + irr::video::SMaterial +
+
+
+
+ ToolTipText + irr::gui::IGUIElement +
+
+
+
+ Transformation + irr::scene::SSkinMeshBuffer +
+
+
+
+ TriangleSelector + irr::scene::ISceneNode +
+
+
+
+ TrilinearFilter + irr::video::SMaterialLayer +
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_75.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_75.html new file mode 100644 index 0000000..80ae010 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_75.html @@ -0,0 +1,65 @@ + + + + + + + +
+
Loading...
+ +
+
+ UpperLeftCorner + irr::core::rect +
+
+
+
+ UseMipMaps + irr::video::SMaterial +
+
+
+
+ UsePerformanceTimer + irr::SIrrlichtCreationParameters +
+
+
+
+ UserData1 + irr::SEvent::SUserEvent +
+
+
+
+ UserData2 + irr::SEvent::SUserEvent +
+
+
+
+ UserEvent + irr::SEvent +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_76.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_76.html new file mode 100644 index 0000000..460767e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_76.html @@ -0,0 +1,121 @@ + + + + + + + +
+
Loading...
+
+
+ v + irr::scene::SMD3TexCoord +
+
+
+
+ VarGroup + irr::scene::quake3::IShader +
+
+
+
+ Variable + irr::scene::quake3::SVarGroup +
+
+
+
+ VariableGroup + irr::scene::quake3::SVarGroupList +
+
+
+
+ vector + irr::scene::SParticle +
+
+
+
+ verbose + irr::scene::quake3::Q3LevelLoadParameter +
+
+
+
+ Version + irr::scene::SMD3Header +
+
+
+
+ vertex_id + irr::scene::ISkinnedMesh::SWeight +
+
+
+
+ VERTEX_SHADER_TYPE_NAMES + irr::video +
+
+
+
+ vertexStart + irr::scene::SMD3MeshHeader +
+
+
+
+ VertexType + irr::scene::SSkinMeshBuffer +
+
+ +
+
+ Vertices_2TCoords + irr::scene::SSkinMeshBuffer +
+
+
+
+ Vertices_Standard + irr::scene::SSkinMeshBuffer +
+
+
+
+ Vertices_Tangents + irr::scene::SSkinMeshBuffer +
+
+
+
+ Vsync + irr::SIrrlichtCreationParameters +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_77.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_77.html new file mode 100644 index 0000000..88d6b2f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_77.html @@ -0,0 +1,80 @@ + + + + + + + +
+
Loading...
+
+
+ W + irr::core::quaternion +
+
+
+
+ wave + irr::scene::quake3::SModifierFunction +
+
+
+
+ Weekday + irr::ITimer::RealTimeDate +
+
+
+
+ Weights + irr::scene::ISkinnedMesh::SJoint +
+
+
+
+ Wheel + irr::SEvent::SMouseInput +
+
+
+
+ Width + irr::core::dimension2d +
+
+
+
+ WindowId + irr::SIrrlichtCreationParameters +
+
+
+
+ WindowSize + irr::SIrrlichtCreationParameters +
+
+
+
+ Wireframe + irr::video::SMaterial +
+
+
+
+ WithAlphaChannel + irr::SIrrlichtCreationParameters +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_78.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_78.html new file mode 100644 index 0000000..1123758 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_78.html @@ -0,0 +1,50 @@ + + + + + + + +
+
Loading...
+ +
+
+ X11Context + irr::video::SExposedVideoData +
+
+
+
+ X11Display + irr::video::SExposedVideoData +
+
+
+
+ X11Window + irr::video::SExposedVideoData +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_79.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_79.html new file mode 100644 index 0000000..d8ac7be --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_79.html @@ -0,0 +1,44 @@ + + + + + + + +
+
Loading...
+ +
+
+ Year + irr::ITimer::RealTimeDate +
+
+
+
+ Yearday + irr::ITimer::RealTimeDate +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/search/variables_7a.html b/src/others/irrlicht-1.8.1/doc/html/search/variables_7a.html new file mode 100644 index 0000000..5d5c740 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/search/variables_7a.html @@ -0,0 +1,48 @@ + + + + + + + +
+
Loading...
+ +
+
+ ZBuffer + irr::video::SMaterial +
+
+
+
+ ZBufferBits + irr::SIrrlichtCreationParameters +
+
+
+
+ ZWriteEnable + irr::video::SMaterial +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date-members.html new file mode 100644 index 0000000..782829d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date.html new file mode 100644 index 0000000..abd9a20 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_i_timer_1_1_real_time_date.html @@ -0,0 +1,283 @@ + + + + +Irrlicht 3D Engine: irr::ITimer::RealTimeDate Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::ITimer::RealTimeDate Struct Reference
+
+
+ +

#include <ITimer.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 35 of file ITimer.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 48 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 38 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 54 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 40 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 46 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 42 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 50 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 44 of file ITimer.h.

+ +
+
+ +
+ +
+ +

Definition at line 52 of file ITimer.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event-members.html new file mode 100644 index 0000000..f198738 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event-members.html @@ -0,0 +1,127 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SEvent Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event.html new file mode 100644 index 0000000..534fbd1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event.html @@ -0,0 +1,282 @@ + + + + +Irrlicht 3D Engine: irr::SEvent Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent Struct Reference
+
+
+ +

SEvents hold information about an event. See irr::IEventReceiver for details on event handling. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Classes

+ +

+Public Attributes

+ +

Detailed Description

+

SEvents hold information about an event. See irr::IEventReceiver for details on event handling.

+ +

Definition at line 262 of file IEventReceiver.h.

+

Member Data Documentation

+ +
+
+ + + + +
union { ... }
+
+
+ +
+
+ +
+ +
+ +

Definition at line 414 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
struct SGUIEvent irr::SEvent::GUIEvent
+
+
+ +

Definition at line 417 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Definition at line 420 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
struct SKeyInput irr::SEvent::KeyInput
+
+
+ +

Definition at line 419 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
struct SLogEvent irr::SEvent::LogEvent
+
+
+ +

Definition at line 421 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Definition at line 418 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Definition at line 422 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event-members.html new file mode 100644 index 0000000..8ced7bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SEvent::SGUIEvent Member List
+
+
+This is the complete list of members for irr::SEvent::SGUIEvent, including all inherited members. + + + +
Callerirr::SEvent::SGUIEvent
Elementirr::SEvent::SGUIEvent
EventTypeirr::SEvent::SGUIEvent
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event.html new file mode 100644 index 0000000..42ad6bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_g_u_i_event.html @@ -0,0 +1,197 @@ + + + + +Irrlicht 3D Engine: irr::SEvent::SGUIEvent Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent::SGUIEvent Struct Reference
+
+
+ +

Any kind of GUI event. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Any kind of GUI event.

+ +

Definition at line 265 of file IEventReceiver.h.

+

Member Data Documentation

+ +
+ +
+ +

IGUIElement who called the event.

+ +

Definition at line 268 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

If the event has something to do with another element, it will be held here.

+ +

Definition at line 271 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Type of GUI Event.

+ +

Definition at line 274 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event-members.html new file mode 100644 index 0000000..17b2945 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event.html new file mode 100644 index 0000000..6c06a17 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_joystick_event.html @@ -0,0 +1,299 @@ + + + + +Irrlicht 3D Engine: irr::SEvent::SJoystickEvent Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent::SJoystickEvent Struct Reference
+
+
+ +

A joystick event. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Types

+ +

+Public Member Functions

+
    +
  • bool IsButtonPressed (u32 button) const +
    A helper function to check if a button is pressed.
+

+Public Attributes

+ +

Detailed Description

+

A joystick event.

+

Unlike other events, joystick events represent the result of polling each connected joystick once per run() of the device. Joystick events will not be generated by default. If joystick support is available for the active device, _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ is defined, and irr::IrrlichtDevice::activateJoysticks() has been called, an event of this type will be generated once per joystick per IrrlichtDevice::run() regardless of whether the state of the joystick has actually changed.

+ +

Definition at line 342 of file IEventReceiver.h.

+

Member Enumeration Documentation

+ +
+
+ + + + +
anonymous enum
+
+
+
Enumerator:
+ + + + + + + + +
NUMBER_OF_BUTTONS  +
AXIS_X  +
AXIS_Y  +
AXIS_Z  +
AXIS_R  +
AXIS_U  +
AXIS_V  +
NUMBER_OF_AXES  +
+
+
+ +

Definition at line 344 of file IEventReceiver.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool irr::SEvent::SJoystickEvent::IsButtonPressed (u32 button) const [inline]
+
+
+ +

A helper function to check if a button is pressed.

+ +

Definition at line 384 of file IEventReceiver.h.

+ +

References ButtonStates, and NUMBER_OF_BUTTONS.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
s16 irr::SEvent::SJoystickEvent::Axis[NUMBER_OF_AXES]
+
+
+

For AXIS_X, AXIS_Y, AXIS_Z, AXIS_R, AXIS_U and AXIS_V Values are in the range -32768 to 32767, with 0 representing the center position. You will receive the raw value from the joystick, and so will usually want to implement a dead zone around the center of the range. Axes not supported by this joystick will always have a value of 0. On Linux, POV hats are represented as axes, usually the last two active axis.

+ +

Definition at line 369 of file IEventReceiver.h.

+ +
+
+ +
+ +
+

A bitmap of button states. You can use IsButtonPressed() to ( check the state of each button from 0 to (NUMBER_OF_BUTTONS - 1)

+ +

Definition at line 359 of file IEventReceiver.h.

+ +

Referenced by IsButtonPressed().

+ +
+
+ +
+ +
+ +

The ID of the joystick which generated this event.

+

This is an internal Irrlicht index; it does not map directly to any particular hardware joystick.

+ +

Definition at line 381 of file IEventReceiver.h.

+ +
+
+ +
+ +
+

The POV represents the angle of the POV hat in degrees * 100, from 0 to 35,900. A value of 65535 indicates that the POV hat is centered (or not present). This value is only supported on Windows. On Linux, the POV hat will be sent as 2 axes instead.

+ +

Definition at line 376 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input-members.html new file mode 100644 index 0000000..93eea79 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input-members.html @@ -0,0 +1,125 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SEvent::SKeyInput Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input.html new file mode 100644 index 0000000..f46e086 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_key_input.html @@ -0,0 +1,233 @@ + + + + +Irrlicht 3D Engine: irr::SEvent::SKeyInput Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent::SKeyInput Struct Reference
+
+
+ +

Any kind of keyboard event. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Attributes

+
    +
  • wchar_t Char +
    Character corresponding to the key (0, if not a character)
  • bool Control:1 +
    True if ctrl was also pressed.
  • EKEY_CODE Key +
    Key which has been pressed or released.
  • bool PressedDown:1 +
    If not true, then the key was left up.
  • bool Shift:1 +
    True if shift was also pressed.
+

Detailed Description

+

Any kind of keyboard event.

+ +

Definition at line 316 of file IEventReceiver.h.

+

Member Data Documentation

+ +
+
+ + + + +
wchar_t irr::SEvent::SKeyInput::Char
+
+
+ +

Character corresponding to the key (0, if not a character)

+ +

Definition at line 319 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

True if ctrl was also pressed.

+ +

Definition at line 331 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Key which has been pressed or released.

+ +

Definition at line 322 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

If not true, then the key was left up.

+ +

Definition at line 325 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

True if shift was also pressed.

+ +

Definition at line 328 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event-members.html new file mode 100644 index 0000000..92e56d2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SEvent::SLogEvent Member List
+
+
+This is the complete list of members for irr::SEvent::SLogEvent, including all inherited members. + + +
Levelirr::SEvent::SLogEvent
Textirr::SEvent::SLogEvent
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event.html new file mode 100644 index 0000000..3fa29cf --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_log_event.html @@ -0,0 +1,179 @@ + + + + +Irrlicht 3D Engine: irr::SEvent::SLogEvent Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent::SLogEvent Struct Reference
+
+
+ +

Any kind of log event. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Attributes

+
    +
  • ELOG_LEVEL Level +
    Log level in which the text has been logged.
  • const c8 * Text +
    Pointer to text which has been logged.
+

Detailed Description

+

Any kind of log event.

+ +

Definition at line 395 of file IEventReceiver.h.

+

Member Data Documentation

+ +
+ +
+ +

Log level in which the text has been logged.

+ +

Definition at line 401 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
const c8* irr::SEvent::SLogEvent::Text
+
+
+ +

Pointer to text which has been logged.

+ +

Definition at line 398 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input-members.html new file mode 100644 index 0000000..ee5309f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input.html new file mode 100644 index 0000000..1eedc65 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_mouse_input.html @@ -0,0 +1,346 @@ + + + + +Irrlicht 3D Engine: irr::SEvent::SMouseInput Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent::SMouseInput Struct Reference
+
+
+ +

Any kind of mouse event. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Any kind of mouse event.

+ +

Definition at line 279 of file IEventReceiver.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
bool irr::SEvent::SMouseInput::isLeftPressed () const [inline]
+
+
+ +

Is the left button pressed down?

+ +

Definition at line 303 of file IEventReceiver.h.

+ +

References ButtonStates, and irr::EMBSM_LEFT.

+ +
+
+ +
+
+ + + + + + + +
bool irr::SEvent::SMouseInput::isMiddlePressed () const [inline]
+
+
+ +

Is the middle button pressed down?

+ +

Definition at line 309 of file IEventReceiver.h.

+ +

References ButtonStates, and irr::EMBSM_MIDDLE.

+ +
+
+ +
+
+ + + + + + + +
bool irr::SEvent::SMouseInput::isRightPressed () const [inline]
+
+
+ +

Is the right button pressed down?

+ +

Definition at line 306 of file IEventReceiver.h.

+ +

References ButtonStates, and irr::EMBSM_RIGHT.

+ +
+
+

Member Data Documentation

+ +
+ +
+

A bitmap of button states. You can use isButtonPressed() to determine if a button is pressed or not. Currently only valid if the event was EMIE_MOUSE_MOVED

+ +

Definition at line 300 of file IEventReceiver.h.

+ +

Referenced by isLeftPressed(), isMiddlePressed(), and isRightPressed().

+ +
+
+ +
+ +
+ +

True if ctrl was also pressed.

+ +

Definition at line 295 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Type of mouse event.

+ +

Definition at line 312 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

True if shift was also pressed.

+ +

Definition at line 292 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

mouse wheel delta, often 1.0 or -1.0, but can have other values < 0.f or > 0.f;

+

Only valid if event was EMIE_MOUSE_WHEEL

+ +

Definition at line 289 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

X position of mouse cursor.

+ +

Definition at line 282 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Y position of mouse cursor.

+ +

Definition at line 285 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event-members.html new file mode 100644 index 0000000..44420f0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SEvent::SUserEvent Member List
+
+
+This is the complete list of members for irr::SEvent::SUserEvent, including all inherited members. + + +
UserData1irr::SEvent::SUserEvent
UserData2irr::SEvent::SUserEvent
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event.html new file mode 100644 index 0000000..69a2ec0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_event_1_1_s_user_event.html @@ -0,0 +1,179 @@ + + + + +Irrlicht 3D Engine: irr::SEvent::SUserEvent Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SEvent::SUserEvent Struct Reference
+
+
+ +

Any kind of user event. + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Any kind of user event.

+ +

Definition at line 405 of file IEventReceiver.h.

+

Member Data Documentation

+ +
+ +
+ +

Some user specified data as int.

+ +

Definition at line 408 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

Another user specified data as int.

+ +

Definition at line 411 of file IEventReceiver.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters-members.html new file mode 100644 index 0000000..72c5371 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters-members.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters.html new file mode 100644 index 0000000..ffcde4b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_irrlicht_creation_parameters.html @@ -0,0 +1,700 @@ + + + + +Irrlicht 3D Engine: irr::SIrrlichtCreationParameters Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SIrrlichtCreationParameters Struct Reference
+
+
+ +

Structure for holding Irrlicht Device creation parameters. + More...

+ +

#include <SIrrCreationParameters.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Structure for holding Irrlicht Device creation parameters.

+

This structure is used in the createDeviceEx() function.

+ +

Definition at line 19 of file SIrrCreationParameters.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::SIrrlichtCreationParameters::SIrrlichtCreationParameters () [inline]
+
+
+ +

Constructs a SIrrlichtCreationParameters structure with default values.

+ +

Definition at line 22 of file SIrrCreationParameters.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::SIrrlichtCreationParameters::SIrrlichtCreationParameters (const SIrrlichtCreationParametersother) [inline]
+
+
+ +

Definition at line 52 of file SIrrCreationParameters.h.

+ +
+
+

Member Function Documentation

+ + +

Member Data Documentation

+ +
+ +
+ +

Specifies if the device should use fullscreen anti aliasing.

+

Makes sharp/pixelated edges softer, but requires more performance. Also, 2D elements might look blurred with this switched on. The resulting rendering quality also depends on the hardware and driver you are using, your program might look different on different hardware with this. So if you are writing a game/application with AntiAlias switched on, it would be a good idea to make it possible to switch this option off again by the user. The value is the maximal antialiasing factor requested for the device. The cretion method will automatically try smaller values if no window can be created with the given value. Value one is usually the same as 0 (disabled), but might be a special value on some platforms. On D3D devices it maps to NONMASKABLE. Default value: 0 - disabled

+ +

Definition at line 145 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 16.

+ +

Definition at line 106 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Type of the device.

+

This setting decides the windowing system used by the device, most device types are native to a specific operating system and so may not be available. EIDT_WIN32 is only available on Windows desktops, EIDT_WINCE is only available on Windows mobile devices, EIDT_COCOA is only available on Mac OSX, EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11, EIDT_SDL is available on most systems if compiled in, EIDT_CONSOLE is usually available but can only render to text, EIDT_BEST will select the best available device for your operating system. Default: EIDT_BEST.

+ +

Definition at line 93 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Allows to select which graphic card is used for rendering when more than one card is in the system.

+

So far only supported on D3D

+ +

Definition at line 271 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Whether the main framebuffer uses doublebuffering.

+

This should be usually enabled, in order to avoid render artifacts on the visible framebuffer. However, it might be useful to use only one buffer on very small devices. If no doublebuffering is available, the drivers will fall back to single buffers. Default value: true

+ +

Definition at line 179 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Create the driver multithreaded.

+

Default is false. Enabling this can slow down your application. Note that this does _not_ make Irrlicht threadsafe, but only the underlying driver-API for the graphiccard. So far only supported on D3D.

+ +

Definition at line 277 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Type of video driver used to render graphics.

+

This can currently be video::EDT_NULL, video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, video::EDT_DIRECT3D9, and video::EDT_OPENGL. Default: Software.

+ +

Definition at line 100 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

A user created event receiver.

+ +

Definition at line 206 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Should be set to true if the device should run in fullscreen.

+

Otherwise the device runs in windowed mode. Default: false.

+ +

Definition at line 113 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Flag to enable proper sRGB and linear color handling.

+

In most situations, it is desireable to have the color handling in non-linear sRGB color space, and only do the intermediate color calculations in linear RGB space. If this flag is enabled, the device and driver try to assure that all color input and output are color corrected and only the internal color representation is linear. This means, that the color output is properly gamma-adjusted to provide the brighter colors for monitor display. And that blending and lighting give a more natural look, due to proper conversion from non-linear colors into linear color space for blend operations. If this flag is enabled, all texture colors (which are usually in sRGB space) are correctly displayed. However vertex colors and other explicitly set values have to be manually encoded in linear color space. Default value: false.

+ +

Definition at line 160 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Specifies if the device should use high precision FPU setting.

+

This is only relevant for DirectX Devices, which switch to low FPU precision by default for performance reasons. However, this may lead to problems with the other computations of the application. In this case setting this flag to true should help

+
    +
  • on the expense of performance loss, though. Default value: false
  • +
+ +

Definition at line 203 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Specifies if the device should ignore input events.

+

This is only relevant when using external I/O handlers. External windows need to take care of this themselves. Currently only supported by X11. Default value: false

+ +

Definition at line 186 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Specifies the logging level used in the logging interface.

+

The default value is ELL_INFORMATION. You can access the ILogger interface later on from the IrrlichtDevice with getLogger() and set another level. But if you need more or less logging information already from device creation, then you have to change it here.

+ +

Definition at line 267 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Don't use or change this parameter.

+

Always set it to IRRLICHT_SDK_VERSION, which is done by default. This is needed for sdk version checks.

+ +

Definition at line 289 of file SIrrCreationParameters.h.

+ +
+
+ +
+ +
+ +

Specifies if the stencil buffer should be enabled.

+

Set this to true, if you want the engine be able to draw stencil buffer shadows. Note that not all drivers are able to use the stencil buffer, hence it can be ignored during device creation. Without the stencil buffer no shadows will be drawn. Default: false.

+ +

Definition at line 121 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Specifies if the device should use stereo buffers.

+

Some high-end gfx cards support two framebuffers for direct support of stereoscopic output devices. If this flag is set the device tries to create a stereo context. Currently only supported by OpenGL. Default value: false

+ +

Definition at line 194 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Enables use of high performance timers on Windows platform.

+

When performance timers are not used, standard GetTickCount() is used instead which usually has worse resolution, but also less problems with speed stepping and other techniques.

+ +

Definition at line 284 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Specifies vertical syncronisation.

+

If set to true, the driver will wait for the vertical retrace period, otherwise not. May be silently ignored. Default: false

+ +

Definition at line 127 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Window Id.

+

If this is set to a value other than 0, the Irrlicht Engine will be created in an already existing window. For windows, set this to the HWND of the window you want. The windowSize and FullScreen options will be ignored when using the WindowId parameter. Default this is set to 0. To make Irrlicht run inside the custom window, you still will have to draw Irrlicht on your own. You can use this loop, as usual:

+
        while (device->run())
+        {
+            driver->beginScene(true, true, 0);
+            smgr->drawAll();
+            driver->endScene();
+        }
+

Instead of this, you can also simply use your own message loop using GetMessage, DispatchMessage and whatever. Calling IrrlichtDevice::run() will cause Irrlicht to dispatch messages internally too. You need not call Device->run() if you want to do your own message dispatching loop, but Irrlicht will not be able to fetch user input then and you have to do it on your own using the window messages, DirectInput, or whatever. Also, you'll have to increment the Irrlicht timer. An alternative, own message dispatching loop without device->run() would look like this:

+
        MSG msg;
+        while (true)
+        {
+            if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+            {
+                TranslateMessage(&msg);
+                DispatchMessage(&msg);
+
+                if (msg.message == WM_QUIT)
+                    break;
+            }
+
+            // increase virtual timer time
+            device->getTimer()->tick();
+
+            // draw engine picture
+            driver->beginScene(true, true, 0);
+            smgr->drawAll();
+            driver->endScene();
+        }
+

However, there is no need to draw the picture this often. Just do it how you like.

+ +

Definition at line 259 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Size of the window or the video mode in fullscreen mode. Default: 800x600.

+ +

Definition at line 103 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Whether the main framebuffer uses an alpha channel.

+

In some situations it might be desireable to get a color buffer with an alpha channel, e.g. when rendering into a transparent window or overlay. If this flag is set the device tries to create a framebuffer with alpha channel. If this flag is set, only color buffers with alpha channel are considered. Otherwise, it depends on the actual hardware if the colorbuffer has an alpha channel or not. Default value: false

+ +

Definition at line 171 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Minimum Bits per pixel of the depth buffer. Default: 16.

+ +

Definition at line 109 of file SIrrCreationParameters.h.

+ +

Referenced by operator=().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info-members.html new file mode 100644 index 0000000..bc65b2f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info-members.html @@ -0,0 +1,128 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SJoystickInfo Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info.html new file mode 100644 index 0000000..9c968bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_joystick_info.html @@ -0,0 +1,274 @@ + + + + +Irrlicht 3D Engine: irr::SJoystickInfo Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SJoystickInfo Struct Reference
+
+
+ +

Information on a joystick, returned from irr::IrrlichtDevice::activateJoysticks() + More...

+ +

#include <IEventReceiver.h>

+ +

List of all members.

+

+Public Types

+ +

+Public Attributes

+
    +
  • u32 Axes +
    The number of axes that the joystick has, i.e. X, Y, Z, R, U, V.
  • u32 Buttons +
    The number of buttons that the joystick has.
  • u8 Joystick +
    The ID of the joystick.
  • core::stringc Name +
    The name that the joystick uses to identify itself.
  • enum irr::SJoystickInfo:: { ... } PovHat +
    An indication of whether the joystick has a POV hat.
+

Detailed Description

+

Information on a joystick, returned from irr::IrrlichtDevice::activateJoysticks()

+ +

Definition at line 451 of file IEventReceiver.h.

+

Member Enumeration Documentation

+ +
+
+ + + + +
anonymous enum
+
+
+ +

An indication of whether the joystick has a POV hat.

+

A Windows device will identify the presence or absence or the POV hat. A Linux device cannot, and will always return POV_HAT_UNKNOWN.

+
Enumerator:
+ + + +
POV_HAT_PRESENT  +

A hat is definitely present.

+
POV_HAT_ABSENT  +

A hat is definitely not present.

+
POV_HAT_UNKNOWN  +

The presence or absence of a hat cannot be determined.

+
+
+
+ +

Definition at line 473 of file IEventReceiver.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

The number of axes that the joystick has, i.e. X, Y, Z, R, U, V.

+

Note: with a Linux device, the POV hat (if any) will use two axes. These will be included in this count.

+ +

Definition at line 468 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

The number of buttons that the joystick has.

+ +

Definition at line 463 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

The ID of the joystick.

+

This is an internal Irrlicht index; it does not map directly to any particular hardware joystick. It corresponds to the irr::SJoystickEvent Joystick ID.

+ +

Definition at line 457 of file IEventReceiver.h.

+ +
+
+ +
+ +
+ +

The name that the joystick uses to identify itself.

+ +

Definition at line 460 of file IEventReceiver.h.

+ +
+
+ +
+
+ + + + +
enum { ... } irr::SJoystickInfo::PovHat
+
+
+ +

An indication of whether the joystick has a POV hat.

+

A Windows device will identify the presence or absence or the POV hat. A Linux device cannot, and will always return POV_HAT_UNKNOWN.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map-members.html new file mode 100644 index 0000000..c9d3772 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map-members.html @@ -0,0 +1,124 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::SKeyMap Member List
+
+
+This is the complete list of members for irr::SKeyMap, including all inherited members. + + + + +
Actionirr::SKeyMap
KeyCodeirr::SKeyMap
SKeyMap()irr::SKeyMap [inline]
SKeyMap(EKEY_ACTION action, EKEY_CODE keyCode)irr::SKeyMap [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map.html new file mode 100644 index 0000000..313d897 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1_s_key_map.html @@ -0,0 +1,229 @@ + + + + +Irrlicht 3D Engine: irr::SKeyMap Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::SKeyMap Struct Reference
+
+
+ +

Struct storing which key belongs to which action. + More...

+ +

#include <SKeyMap.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Struct storing which key belongs to which action.

+ +

Definition at line 29 of file SKeyMap.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::SKeyMap::SKeyMap () [inline]
+
+
+ +

Definition at line 31 of file SKeyMap.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::SKeyMap::SKeyMap (EKEY_ACTION action,
EKEY_CODE keyCode 
) [inline]
+
+
+ +

Definition at line 32 of file SKeyMap.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 34 of file SKeyMap.h.

+ +
+
+ +
+ +
+ +

Definition at line 35 of file SKeyMap.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite-members.html new file mode 100644 index 0000000..ca0b12b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite-members.html @@ -0,0 +1,125 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::SCursorSprite Member List
+
+
+This is the complete list of members for irr::gui::SCursorSprite, including all inherited members. + + + + + +
HotSpotirr::gui::SCursorSprite
SCursorSprite()irr::gui::SCursorSprite [inline]
SCursorSprite(gui::IGUISpriteBank *spriteBank, s32 spriteId, const core::position2d< s32 > &hotspot=(core::position2d< s32 >(0, 0)))irr::gui::SCursorSprite [inline]
SpriteBankirr::gui::SCursorSprite
SpriteIdirr::gui::SCursorSprite
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite.html new file mode 100644 index 0000000..9581843 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_cursor_sprite.html @@ -0,0 +1,252 @@ + + + + +Irrlicht 3D Engine: irr::gui::SCursorSprite Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::SCursorSprite Struct Reference
+
+
+ +

structure used to set sprites as cursors. + More...

+ +

#include <ICursorControl.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

structure used to set sprites as cursors.

+ +

Definition at line 64 of file ICursorControl.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::gui::SCursorSprite::SCursorSprite () [inline]
+
+
+ +

Definition at line 66 of file ICursorControl.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::gui::SCursorSprite::SCursorSprite (gui::IGUISpriteBankspriteBank,
s32 spriteId,
const core::position2d< s32 > & hotspot = (core::position2d<s32>(0,0)) 
) [inline]
+
+
+ +

Definition at line 71 of file ICursorControl.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
core::position2d<s32> irr::gui::SCursorSprite::HotSpot
+
+
+ +

Definition at line 78 of file ICursorControl.h.

+ +
+
+ +
+ +
+ +

Definition at line 76 of file ICursorControl.h.

+ +
+
+ +
+ +
+ +

Definition at line 77 of file ICursorControl.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite-members.html new file mode 100644 index 0000000..e5c1000 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::SGUISprite Member List
+
+
+This is the complete list of members for irr::gui::SGUISprite, including all inherited members. + + + +
Framesirr::gui::SGUISprite
frameTimeirr::gui::SGUISprite
SGUISprite()irr::gui::SGUISprite [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite.html new file mode 100644 index 0000000..d4972bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite.html @@ -0,0 +1,200 @@ + + + + +Irrlicht 3D Engine: irr::gui::SGUISprite Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::SGUISprite Struct Reference
+
+
+ +

A sprite composed of several frames. + More...

+ +

#include <IGUISpriteBank.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

A sprite composed of several frames.

+ +

Definition at line 32 of file IGUISpriteBank.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::gui::SGUISprite::SGUISprite () [inline]
+
+
+ +

Definition at line 34 of file IGUISpriteBank.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 36 of file IGUISpriteBank.h.

+ +
+
+ +
+ +
+ +

Definition at line 37 of file IGUISpriteBank.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame-members.html new file mode 100644 index 0000000..84a1863 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::gui::SGUISpriteFrame Member List
+
+
+This is the complete list of members for irr::gui::SGUISpriteFrame, including all inherited members. + + +
rectNumberirr::gui::SGUISpriteFrame
textureNumberirr::gui::SGUISpriteFrame
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html new file mode 100644 index 0000000..10832bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1gui_1_1_s_g_u_i_sprite_frame.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: irr::gui::SGUISpriteFrame Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::gui::SGUISpriteFrame Struct Reference
+
+
+ +

A single sprite frame. + More...

+ +

#include <IGUISpriteBank.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

A single sprite frame.

+ +

Definition at line 25 of file IGUISpriteBank.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 28 of file IGUISpriteBank.h.

+ +
+
+ +
+ +
+ +

Definition at line 27 of file IGUISpriteBank.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options-members.html new file mode 100644 index 0000000..ecc4578 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::SAttributeReadWriteOptions Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options.html new file mode 100644 index 0000000..5ae345e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_attribute_read_write_options.html @@ -0,0 +1,206 @@ + + + + +Irrlicht 3D Engine: irr::io::SAttributeReadWriteOptions Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::SAttributeReadWriteOptions Struct Reference
+
+
+ +

struct holding data describing options + More...

+ +

#include <IAttributeExchangingObject.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • const fschar_t * Filename +
    Optional filename.
  • s32 Flags +
    Combination of E_ATTRIBUTE_READ_WRITE_FLAGS or other, custom ones.
+

Detailed Description

+

struct holding data describing options

+ +

Definition at line 34 of file IAttributeExchangingObject.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::io::SAttributeReadWriteOptions::SAttributeReadWriteOptions () [inline]
+
+
+ +

Constructor.

+ +

Definition at line 37 of file IAttributeExchangingObject.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Optional filename.

+ +

Definition at line 46 of file IAttributeExchangingObject.h.

+ +
+
+ +
+ +
+ +

Combination of E_ATTRIBUTE_READ_WRITE_FLAGS or other, custom ones.

+ +

Definition at line 43 of file IAttributeExchangingObject.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path-members.html new file mode 100644 index 0000000..ae3c8d7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::SNamedPath Member List
+
+
+This is the complete list of members for irr::io::SNamedPath, including all inherited members. + + + + + + + + + +
getInternalName() const irr::io::SNamedPath [inline]
getPath() const irr::io::SNamedPath [inline]
operator core::stringc() const irr::io::SNamedPath [inline]
operator core::stringw() const irr::io::SNamedPath [inline]
operator<(const SNamedPath &other) const irr::io::SNamedPath [inline]
PathToName(const path &p) const irr::io::SNamedPath [inline, protected]
setPath(const path &p)irr::io::SNamedPath [inline]
SNamedPath()irr::io::SNamedPath [inline]
SNamedPath(const path &p)irr::io::SNamedPath [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path.html new file mode 100644 index 0000000..620eeec --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1_s_named_path.html @@ -0,0 +1,354 @@ + + + + +Irrlicht 3D Engine: irr::io::SNamedPath Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::SNamedPath Struct Reference
+
+
+ +

Used in places where we identify objects by a filename, but don't actually work with the real filename. + More...

+ +

#include <path.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Protected Member Functions

+ +

Detailed Description

+

Used in places where we identify objects by a filename, but don't actually work with the real filename.

+

Irrlicht is internally not case-sensitive when it comes to names. Also this class is a first step towards support for correctly serializing renamed objects.

+ +

Definition at line 23 of file path.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::io::SNamedPath::SNamedPath () [inline]
+
+
+ +

Constructor.

+ +

Definition at line 26 of file path.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::io::SNamedPath::SNamedPath (const pathp) [inline]
+
+
+ +

Constructor.

+ +

Definition at line 29 of file path.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const path& irr::io::SNamedPath::getInternalName () const [inline]
+
+
+

Get the name which is used to identify the file. This string is similar to the names and filenames used before Irrlicht 1.7

+ +

Definition at line 54 of file path.h.

+ +

Referenced by irr::scene::IMeshCache::getMeshFilename().

+ +
+
+ +
+
+ + + + + + + +
const path& irr::io::SNamedPath::getPath () const [inline]
+
+
+ +

Get the path.

+ +

Definition at line 47 of file path.h.

+ +

Referenced by operator core::stringc(), and operator core::stringw().

+ +
+
+ +
+
+ + + + + + + +
irr::io::SNamedPath::operator core::stringc () const [inline]
+
+
+ +

Implicit cast to io::path.

+ +

Definition at line 60 of file path.h.

+ +

References getPath().

+ +
+
+ +
+
+ + + + + + + +
irr::io::SNamedPath::operator core::stringw () const [inline]
+
+
+ +

Implicit cast to io::path.

+ +

Definition at line 65 of file path.h.

+ +

References getPath().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::io::SNamedPath::operator< (const SNamedPathother) const [inline]
+
+
+ +

Is smaller comparator.

+ +

Definition at line 34 of file path.h.

+ +
+
+ +
+
+ + + + + + + + +
path irr::io::SNamedPath::PathToName (const pathp) const [inline, protected]
+
+
+ +

Definition at line 72 of file path.h.

+ +

References irr::core::string< T, TAlloc >::make_lower(), and irr::core::string< T, TAlloc >::replace().

+ +

Referenced by setPath().

+ +
+
+ +
+
+ + + + + + + + +
void irr::io::SNamedPath::setPath (const pathp) [inline]
+
+
+ +

Set the path.

+ +

Definition at line 40 of file path.h.

+ +

References PathToName().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char-members.html new file mode 100644 index 0000000..71fea55 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::io::xmlChar< T > Member List
+
+
+This is the complete list of members for irr::io::xmlChar< T >, including all inherited members. + + + + + + + + + + +
cirr::io::xmlChar< T >
operator T() const irr::io::xmlChar< T > [inline]
operator=(int t)irr::io::xmlChar< T > [inline]
xmlChar()irr::io::xmlChar< T > [inline]
xmlChar(char in)irr::io::xmlChar< T > [inline]
xmlChar(wchar_t in)irr::io::xmlChar< T > [inline]
xmlChar(unsigned char in)irr::io::xmlChar< T > [inline, explicit]
xmlChar(unsigned short in)irr::io::xmlChar< T > [inline, explicit]
xmlChar(unsigned int in)irr::io::xmlChar< T > [inline, explicit]
xmlChar(unsigned long in)irr::io::xmlChar< T > [inline, explicit]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char.html new file mode 100644 index 0000000..968e644 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1io_1_1xml_char.html @@ -0,0 +1,369 @@ + + + + +Irrlicht 3D Engine: irr::io::xmlChar< T > Struct Template Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::io::xmlChar< T > Struct Template Reference
+
+
+ +

#include <irrXML.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • T c +
+

Detailed Description

+

template<typename T>
+struct irr::io::xmlChar< T >

+ + +

Definition at line 371 of file irrXML.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T >
+ + + + + + + +
irr::io::xmlChar< T >::xmlChar () [inline]
+
+
+ +

Definition at line 374 of file irrXML.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
irr::io::xmlChar< T >::xmlChar (char in) [inline]
+
+
+ +

Definition at line 375 of file irrXML.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
irr::io::xmlChar< T >::xmlChar (wchar_t in) [inline]
+
+
+ +

Definition at line 376 of file irrXML.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
irr::io::xmlChar< T >::xmlChar (unsigned char in) [inline, explicit]
+
+
+ +

Definition at line 385 of file irrXML.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
irr::io::xmlChar< T >::xmlChar (unsigned short in) [inline, explicit]
+
+
+ +

Definition at line 386 of file irrXML.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
irr::io::xmlChar< T >::xmlChar (unsigned int in) [inline, explicit]
+
+
+ +

Definition at line 387 of file irrXML.h.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
irr::io::xmlChar< T >::xmlChar (unsigned long in) [inline, explicit]
+
+
+ +

Definition at line 388 of file irrXML.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + + + +
irr::io::xmlChar< T >::operator T () const [inline]
+
+
+ +

Definition at line 390 of file irrXML.h.

+ +

References irr::io::xmlChar< T >::c.

+ +
+
+ +
+
+
+template<typename T >
+ + + + + + + + +
void irr::io::xmlChar< T >::operator= (int t) [inline]
+
+
+ +

Definition at line 391 of file irrXML.h.

+ +

References irr::io::xmlChar< T >::c.

+ +
+
+

Member Data Documentation

+ +
+
+
+template<typename T >
+ + + + +
T irr::io::xmlChar< T >::c
+
+
+ +

Definition at line 373 of file irrXML.h.

+ +

Referenced by irr::io::xmlChar< T >::operator T(), and irr::io::xmlChar< T >::operator=().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint-members.html new file mode 100644 index 0000000..1db64cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint-members.html @@ -0,0 +1,137 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html new file mode 100644 index 0000000..0fe73c3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_joint.html @@ -0,0 +1,451 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISkinnedMesh::SJoint Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISkinnedMesh::SJoint Struct Reference
+
+
+ +

Joints. + More...

+ +

#include <ISkinnedMesh.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

+Friends

+
    +
  • class CSkinnedMesh +
    Internal members used by CSkinnedMesh.
+

Detailed Description

+

Joints.

+ +

Definition at line 125 of file ISkinnedMesh.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::ISkinnedMesh::SJoint::SJoint () [inline]
+
+
+ +

Definition at line 127 of file ISkinnedMesh.h.

+ +
+
+

Friends And Related Function Documentation

+ +
+
+ + + + +
friend class CSkinnedMesh [friend]
+
+
+ +

Internal members used by CSkinnedMesh.

+ +

Definition at line 168 of file ISkinnedMesh.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 160 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 162 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 161 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

List of attached meshes.

+ +

Definition at line 142 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

List of child joints.

+ +

Definition at line 139 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 158 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 164 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Unnecessary for loaders, will be overwritten on finalize.

+ +

Definition at line 157 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 159 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Local matrix of this joint.

+ +

Definition at line 136 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

The name of this joint.

+ +

Definition at line 133 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Animation keys causing translation change.

+ +

Definition at line 145 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Animation keys causing rotation change.

+ +

Definition at line 151 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Animation keys causing scale change.

+ +

Definition at line 148 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Skin weights.

+ +

Definition at line 154 of file ISkinnedMesh.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key-members.html new file mode 100644 index 0000000..20a7d45 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISkinnedMesh::SPositionKey Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key.html new file mode 100644 index 0000000..11b940d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_position_key.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISkinnedMesh::SPositionKey Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISkinnedMesh::SPositionKey Struct Reference
+
+
+ +

Animation keyframe which describes a new position. + More...

+ +

#include <ISkinnedMesh.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Animation keyframe which describes a new position.

+ +

Definition at line 104 of file ISkinnedMesh.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 106 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 107 of file ISkinnedMesh.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key-members.html new file mode 100644 index 0000000..f9f2d70 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISkinnedMesh::SRotationKey Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key.html new file mode 100644 index 0000000..34da362 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_rotation_key.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISkinnedMesh::SRotationKey Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISkinnedMesh::SRotationKey Struct Reference
+
+
+ +

Animation keyframe which describes a new rotation. + More...

+ +

#include <ISkinnedMesh.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Animation keyframe which describes a new rotation.

+ +

Definition at line 118 of file ISkinnedMesh.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 120 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 121 of file ISkinnedMesh.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key-members.html new file mode 100644 index 0000000..4298a0a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISkinnedMesh::SScaleKey Member List
+
+
+This is the complete list of members for irr::scene::ISkinnedMesh::SScaleKey, including all inherited members. + + +
frameirr::scene::ISkinnedMesh::SScaleKey
scaleirr::scene::ISkinnedMesh::SScaleKey
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html new file mode 100644 index 0000000..88654c9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_scale_key.html @@ -0,0 +1,176 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISkinnedMesh::SScaleKey Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISkinnedMesh::SScaleKey Struct Reference
+
+
+ +

Animation keyframe which describes a new scale. + More...

+ +

#include <ISkinnedMesh.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Animation keyframe which describes a new scale.

+ +

Definition at line 111 of file ISkinnedMesh.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 113 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Definition at line 114 of file ISkinnedMesh.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight-members.html new file mode 100644 index 0000000..e7b6527 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight-members.html @@ -0,0 +1,124 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::ISkinnedMesh::SWeight Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html new file mode 100644 index 0000000..0cbc096 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_skinned_mesh_1_1_s_weight.html @@ -0,0 +1,222 @@ + + + + +Irrlicht 3D Engine: irr::scene::ISkinnedMesh::SWeight Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::ISkinnedMesh::SWeight Struct Reference
+
+
+ +

A vertex weight. + More...

+ +

#include <ISkinnedMesh.h>

+ +

List of all members.

+

+Public Attributes

+ +

+Friends

+
    +
  • class CSkinnedMesh +
    Internal members used by CSkinnedMesh.
+

Detailed Description

+

A vertex weight.

+ +

Definition at line 83 of file ISkinnedMesh.h.

+

Friends And Related Function Documentation

+ +
+
+ + + + +
friend class CSkinnedMesh [friend]
+
+
+ +

Internal members used by CSkinnedMesh.

+ +

Definition at line 96 of file ISkinnedMesh.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Index of the mesh buffer.

+ +

Definition at line 86 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Weight Strength/Percentage (0-1)

+ +

Definition at line 92 of file ISkinnedMesh.h.

+ +
+
+ +
+ +
+ +

Index of the vertex.

+ +

Definition at line 89 of file ISkinnedMesh.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.html new file mode 100644 index 0000000..292d071 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.html @@ -0,0 +1,163 @@ + + + + +Irrlicht 3D Engine: irr::scene::IVertexManipulator Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::IVertexManipulator Struct Reference
+
+
+ +

Interface for vertex manipulators. + More...

+ +

#include <SVertexManipulator.h>

+
+ + Inheritance diagram for irr::scene::IVertexManipulator:
+
+
+ +

Detailed Description

+

Interface for vertex manipulators.

+

You should derive your manipulator from this class if it shall be called for every vertex, getting as parameter just the vertex.

+ +

Definition at line 23 of file SVertexManipulator.h.

+

The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.png new file mode 100644 index 0000000..116f1e1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_i_vertex_manipulator.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh-members.html new file mode 100644 index 0000000..14d75b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh-members.html @@ -0,0 +1,148 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SAnimatedMesh Member List
+
+
+This is the complete list of members for irr::scene::SAnimatedMesh, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addMesh(IMesh *mesh)irr::scene::SAnimatedMesh [inline]
Boxirr::scene::SAnimatedMesh
drop() const irr::IReferenceCounted [inline]
FramesPerSecondirr::scene::SAnimatedMesh
getAnimationSpeed() const irr::scene::SAnimatedMesh [inline, virtual]
getBoundingBox() const irr::scene::SAnimatedMesh [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getFrameCount() const irr::scene::SAnimatedMesh [inline, virtual]
getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)irr::scene::SAnimatedMesh [inline, virtual]
getMeshBuffer(u32 nr) const irr::scene::SAnimatedMesh [inline, virtual]
getMeshBuffer(const video::SMaterial &material) const irr::scene::SAnimatedMesh [inline, virtual]
getMeshBufferCount() const irr::scene::SAnimatedMesh [inline, virtual]
getMeshType() const irr::scene::SAnimatedMesh [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
Meshesirr::scene::SAnimatedMesh
recalculateBoundingBox()irr::scene::SAnimatedMesh [inline]
SAnimatedMesh(scene::IMesh *mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN)irr::scene::SAnimatedMesh [inline]
setAnimationSpeed(f32 fps)irr::scene::SAnimatedMesh [inline, virtual]
setBoundingBox(const core::aabbox3df &box)irr::scene::SAnimatedMesh [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)irr::scene::SAnimatedMesh [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)irr::scene::SAnimatedMesh [inline, virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::SAnimatedMesh [inline, virtual]
Typeirr::scene::SAnimatedMesh
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~SAnimatedMesh()irr::scene::SAnimatedMesh [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.html new file mode 100644 index 0000000..15df58f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.html @@ -0,0 +1,753 @@ + + + + +Irrlicht 3D Engine: irr::scene::SAnimatedMesh Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SAnimatedMesh Struct Reference
+
+
+ +

Simple implementation of the IAnimatedMesh interface. + More...

+ +

#include <SAnimatedMesh.h>

+
+ + Inheritance diagram for irr::scene::SAnimatedMesh:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Simple implementation of the IAnimatedMesh interface.

+ +

Definition at line 19 of file SAnimatedMesh.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::SAnimatedMesh::SAnimatedMesh (scene::IMeshmesh = 0,
scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 22 of file SAnimatedMesh.h.

+ +

References addMesh(), recalculateBoundingBox(), and irr::IReferenceCounted::setDebugName().

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::SAnimatedMesh::~SAnimatedMesh () [inline, virtual]
+
+
+ +

destructor

+ +

Definition at line 32 of file SAnimatedMesh.h.

+ +

References irr::IReferenceCounted::drop(), Meshes, and irr::core::array< T, TAlloc >::size().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SAnimatedMesh::addMesh (IMeshmesh) [inline]
+
+
+ +

adds a Mesh

+ +

Definition at line 78 of file SAnimatedMesh.h.

+ +

References irr::IReferenceCounted::grab(), Meshes, and irr::core::array< T, TAlloc >::push_back().

+ +

Referenced by SAnimatedMesh().

+ +
+
+ +
+
+ + + + + + + +
virtual f32 irr::scene::SAnimatedMesh::getAnimationSpeed () const [inline, virtual]
+
+
+ +

Gets the default animation speed of the animated mesh.

+
Returns:
Amount of frames per second. If the amount is 0, it is a static, non animated mesh.
+ +

Implements irr::scene::IAnimatedMesh.

+ +

Definition at line 48 of file SAnimatedMesh.h.

+ +

References FramesPerSecond.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::SAnimatedMesh::getBoundingBox () const [inline, virtual]
+
+
+ +

Returns an axis aligned bounding box of the mesh.

+
Returns:
A bounding box of this mesh is returned.
+ +

Implements irr::scene::IMesh.

+ +

Definition at line 89 of file SAnimatedMesh.h.

+ +

References Box.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SAnimatedMesh::getFrameCount () const [inline, virtual]
+
+
+ +

Gets the frame count of the animated mesh.

+
Returns:
Amount of frames. If the amount is 1, it is a static, non animated mesh.
+ +

Implements irr::scene::IAnimatedMesh.

+ +

Definition at line 41 of file SAnimatedMesh.h.

+ +

References Meshes, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual IMesh* irr::scene::SAnimatedMesh::getMesh (s32 frame,
s32 detailLevel = 255,
s32 startFrameLoop = -1,
s32 endFrameLoop = -1 
) [inline, virtual]
+
+
+ +

Returns the IMesh interface for a frame.

+
Parameters:
+ + + + + +
frame,:Frame number as zero based index. The maximum frame number is getFrameCount() - 1;
detailLevel,:Level of detail. 0 is the lowest, 255 the highest level of detail. Most meshes will ignore the detail level.
startFrameLoop,:start frame
endFrameLoop,:end frame
+
+
+
Returns:
The animated mesh based on a detail level.
+ +

Implements irr::scene::IAnimatedMesh.

+ +

Definition at line 69 of file SAnimatedMesh.h.

+ +

References irr::core::array< T, TAlloc >::empty(), and Meshes.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshBuffer* irr::scene::SAnimatedMesh::getMeshBuffer (u32 nr) const [inline, virtual]
+
+
+ +

returns pointer to a mesh buffer

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 130 of file SAnimatedMesh.h.

+ +

References irr::core::array< T, TAlloc >::empty(), and Meshes.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshBuffer* irr::scene::SAnimatedMesh::getMeshBuffer (const video::SMaterialmaterial) const [inline, virtual]
+
+
+ +

Returns pointer to a mesh buffer which fits a material.

+
Parameters:
+ + +
material,:material to search for
+
+
+
Returns:
Returns the pointer to the mesh buffer or NULL if there is no such mesh buffer.
+ +

Implements irr::scene::IMesh.

+ +

Definition at line 142 of file SAnimatedMesh.h.

+ +

References irr::core::array< T, TAlloc >::empty(), and Meshes.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SAnimatedMesh::getMeshBufferCount () const [inline, virtual]
+
+
+ +

returns amount of mesh buffers.

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 121 of file SAnimatedMesh.h.

+ +

References irr::core::array< T, TAlloc >::empty(), and Meshes.

+ +
+
+ +
+
+ + + + + + + +
virtual E_ANIMATED_MESH_TYPE irr::scene::SAnimatedMesh::getMeshType () const [inline, virtual]
+
+
+ +

Returns the type of the animated mesh.

+ +

Reimplemented from irr::scene::IAnimatedMesh.

+ +

Definition at line 115 of file SAnimatedMesh.h.

+ +

References Type.

+ +
+
+ +
+
+ + + + + + + +
void irr::scene::SAnimatedMesh::recalculateBoundingBox () [inline]
+
+ +
+ +
+
+ + + + + + + + +
virtual void irr::scene::SAnimatedMesh::setAnimationSpeed (f32 fps) [inline, virtual]
+
+
+ +

Gets the frame count of the animated mesh.

+
Parameters:
+ + +
fpsFrames per second to play the animation with. If the amount is 0, it is not animated. The actual speed is set in the scene node the mesh is instantiated in.
+
+
+ +

Implements irr::scene::IAnimatedMesh.

+ +

Definition at line 56 of file SAnimatedMesh.h.

+ +

References FramesPerSecond.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SAnimatedMesh::setBoundingBox (const core::aabbox3dfbox) [inline, virtual]
+
+
+ +

set user axis aligned bounding box

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 95 of file SAnimatedMesh.h.

+ +

References Box.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SAnimatedMesh::setDirty (E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX) [inline, virtual]
+
+
+ +

flags the meshbuffer as changed, reloads hardware buffers

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 165 of file SAnimatedMesh.h.

+ +

References Meshes, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SAnimatedMesh::setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint,
E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX 
) [inline, virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 158 of file SAnimatedMesh.h.

+ +

References Meshes, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SAnimatedMesh::setMaterialFlag (video::E_MATERIAL_FLAG flag,
bool newvalue 
) [inline, virtual]
+
+
+ +

Set a material flag for all meshbuffers of this mesh.

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 151 of file SAnimatedMesh.h.

+ +

References Meshes, and irr::core::array< T, TAlloc >::size().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

The bounding box of this mesh.

+ +

Definition at line 175 of file SAnimatedMesh.h.

+ +

Referenced by getBoundingBox(), recalculateBoundingBox(), and setBoundingBox().

+ +
+
+ +
+ +
+ +

Default animation speed of this mesh.

+ +

Definition at line 178 of file SAnimatedMesh.h.

+ +

Referenced by getAnimationSpeed(), and setAnimationSpeed().

+ +
+
+ + + +
+ +
+ +

The type of the mesh.

+ +

Definition at line 181 of file SAnimatedMesh.h.

+ +

Referenced by getMeshType().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.png new file mode 100644 index 0000000..e1665e0 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_animated_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info-members.html new file mode 100644 index 0000000..a3b5246 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info-members.html @@ -0,0 +1,124 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3AnimationInfo Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info.html new file mode 100644 index 0000000..2da6208 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_animation_info.html @@ -0,0 +1,211 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3AnimationInfo Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3AnimationInfo Struct Reference
+
+
+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 64 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

First frame.

+ +

Definition at line 67 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Frames per second.

+ +

Definition at line 73 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Looping frames.

+ +

Definition at line 71 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Last frame.

+ +

Definition at line 69 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face-members.html new file mode 100644 index 0000000..3a815c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face-members.html @@ -0,0 +1,121 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3Face Member List
+
+
+This is the complete list of members for irr::scene::SMD3Face, including all inherited members. + +
Indexirr::scene::SMD3Face
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face.html new file mode 100644 index 0000000..529452c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_face.html @@ -0,0 +1,159 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3Face Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3Face Struct Reference
+
+
+ +

Triangle Index. + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Triangle Index.

+ +

Definition at line 130 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 132 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header-members.html new file mode 100644 index 0000000..1fb917e --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header.html new file mode 100644 index 0000000..47ed680 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_header.html @@ -0,0 +1,321 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3Header Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3Header Struct Reference
+
+
+ +

this holds the header info of the MD3 file + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

this holds the header info of the MD3 file

+ +

Definition at line 81 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 85 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 93 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 90 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 83 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 86 of file IAnimatedMeshMD3.h.

+ +

Referenced by irr::scene::SMD3Mesh::SMD3Mesh().

+ +
+
+ +
+ +
+ +

Definition at line 89 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 88 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 87 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 92 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 91 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 84 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh-members.html new file mode 100644 index 0000000..6812ab8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3Mesh Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.html new file mode 100644 index 0000000..dc53dd6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.html @@ -0,0 +1,270 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3Mesh Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3Mesh Struct Reference
+
+
+ +

Holding Frames Buffers and Tag Infos. + More...

+ +

#include <IAnimatedMeshMD3.h>

+
+ + Inheritance diagram for irr::scene::SMD3Mesh:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Holding Frames Buffers and Tag Infos.

+ +

Definition at line 265 of file IAnimatedMeshMD3.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::SMD3Mesh::SMD3Mesh () [inline]
+
+
+ +

Definition at line 267 of file IAnimatedMeshMD3.h.

+ +

References MD3Header, and irr::scene::SMD3Header::numFrames.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::SMD3Mesh::~SMD3Mesh () [inline, virtual]
+
+ +
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 279 of file IAnimatedMeshMD3.h.

+ +

Referenced by ~SMD3Mesh().

+ +
+
+ +
+ +
+ +

Definition at line 281 of file IAnimatedMeshMD3.h.

+ +

Referenced by SMD3Mesh().

+ +
+
+ +
+ +
+ +

Definition at line 278 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 280 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.png new file mode 100644 index 0000000..fb8aba7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer-members.html new file mode 100644 index 0000000..da09f33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3MeshBuffer Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html new file mode 100644 index 0000000..139a4e1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html @@ -0,0 +1,234 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3MeshBuffer Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3MeshBuffer Struct Reference
+
+
+ +

Holding Frame Data for a Mesh. + More...

+ +

#include <IAnimatedMeshMD3.h>

+
+ + Inheritance diagram for irr::scene::SMD3MeshBuffer:
+
+
+ + +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Holding Frame Data for a Mesh.

+ +

Definition at line 140 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 145 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 142 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 144 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 147 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 146 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.png new file mode 100644 index 0000000..795f8df Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header-members.html new file mode 100644 index 0000000..170f928 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header-members.html @@ -0,0 +1,131 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header.html new file mode 100644 index 0000000..7c34c85 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_mesh_header.html @@ -0,0 +1,319 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3MeshHeader Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3MeshHeader Struct Reference
+
+
+ +

this holds the header info of an MD3 mesh section + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

this holds the header info of an MD3 mesh section

+ +

Definition at line 97 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 99 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 100 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 102 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 103 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 105 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 104 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 111 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 108 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 109 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 107 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 110 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag-members.html new file mode 100644 index 0000000..b924928 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3QuaternionTag Member List
+
+
+This is the complete list of members for irr::scene::SMD3QuaternionTag, including all inherited members. + + + + + + + + + + +
Nameirr::scene::SMD3QuaternionTag
operator=(const SMD3QuaternionTag &copyMe)irr::scene::SMD3QuaternionTag [inline]
operator==(const SMD3QuaternionTag &other) const irr::scene::SMD3QuaternionTag [inline]
positionirr::scene::SMD3QuaternionTag
rotationirr::scene::SMD3QuaternionTag
setto(core::matrix4 &m)irr::scene::SMD3QuaternionTag [inline]
SMD3QuaternionTag(const SMD3QuaternionTag &copyMe)irr::scene::SMD3QuaternionTag [inline]
SMD3QuaternionTag(const core::stringc &name)irr::scene::SMD3QuaternionTag [inline]
SMD3QuaternionTag(const core::vector3df &pos, const core::vector3df &angle)irr::scene::SMD3QuaternionTag [inline]
~SMD3QuaternionTag()irr::scene::SMD3QuaternionTag [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag.html new file mode 100644 index 0000000..0a07a12 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag.html @@ -0,0 +1,362 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3QuaternionTag Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3QuaternionTag Struct Reference
+
+
+ +

hold a tag info for connecting meshes + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

hold a tag info for connecting meshes

+

Basically its an alternate way to describe a transformation.

+ +

Definition at line 152 of file IAnimatedMeshMD3.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual irr::scene::SMD3QuaternionTag::~SMD3QuaternionTag () [inline, virtual]
+
+
+ +

Definition at line 154 of file IAnimatedMeshMD3.h.

+ +

References position, and irr::core::vector3d< T >::X.

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::SMD3QuaternionTag::SMD3QuaternionTag (const SMD3QuaternionTagcopyMe) [inline]
+
+
+ +

Definition at line 160 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::SMD3QuaternionTag::SMD3QuaternionTag (const core::stringcname) [inline]
+
+
+ +

Definition at line 166 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::SMD3QuaternionTag::SMD3QuaternionTag (const core::vector3dfpos,
const core::vector3dfangle 
) [inline]
+
+
+ +

Definition at line 170 of file IAnimatedMeshMD3.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
SMD3QuaternionTag& irr::scene::SMD3QuaternionTag::operator= (const SMD3QuaternionTagcopyMe) [inline]
+
+
+ +

Definition at line 184 of file IAnimatedMeshMD3.h.

+ +

References Name, position, and rotation.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::scene::SMD3QuaternionTag::operator== (const SMD3QuaternionTagother) const [inline]
+
+
+ +

Definition at line 179 of file IAnimatedMeshMD3.h.

+ +

References Name.

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::SMD3QuaternionTag::setto (core::matrix4m) [inline]
+
+
+ +

Definition at line 174 of file IAnimatedMeshMD3.h.

+ +

References irr::core::quaternion::getMatrix(), position, and rotation.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 192 of file IAnimatedMeshMD3.h.

+ +

Referenced by operator=(), and operator==().

+ +
+
+ +
+ +
+ +

Definition at line 193 of file IAnimatedMeshMD3.h.

+ +

Referenced by operator=(), setto(), and ~SMD3QuaternionTag().

+ +
+
+ +
+ +
+ +

Definition at line 194 of file IAnimatedMeshMD3.h.

+ +

Referenced by operator=(), and setto().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list-members.html new file mode 100644 index 0000000..630f9e3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3QuaternionTagList Member List
+
+
+This is the complete list of members for irr::scene::SMD3QuaternionTagList, including all inherited members. + + + + + + + + + + +
get(const core::stringc &name)irr::scene::SMD3QuaternionTagList [inline]
operator=(const SMD3QuaternionTagList &copyMe)irr::scene::SMD3QuaternionTagList [inline]
operator[](u32 index) const irr::scene::SMD3QuaternionTagList [inline]
operator[](u32 index)irr::scene::SMD3QuaternionTagList [inline]
push_back(const SMD3QuaternionTag &other)irr::scene::SMD3QuaternionTagList [inline]
set_used(u32 new_size)irr::scene::SMD3QuaternionTagList [inline]
size() const irr::scene::SMD3QuaternionTagList [inline]
SMD3QuaternionTagList()irr::scene::SMD3QuaternionTagList [inline]
SMD3QuaternionTagList(const SMD3QuaternionTagList &copyMe)irr::scene::SMD3QuaternionTagList [inline]
~SMD3QuaternionTagList()irr::scene::SMD3QuaternionTagList [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html new file mode 100644 index 0000000..44ca1ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_quaternion_tag_list.html @@ -0,0 +1,351 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3QuaternionTagList Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3QuaternionTagList Struct Reference
+
+
+ +

holds a associative list of named quaternions + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Member Functions

+ +

Detailed Description

+

holds a associative list of named quaternions

+ +

Definition at line 198 of file IAnimatedMeshMD3.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::SMD3QuaternionTagList::SMD3QuaternionTagList () [inline]
+
+ +
+ +
+
+ + + + + + + + +
irr::scene::SMD3QuaternionTagList::SMD3QuaternionTagList (const SMD3QuaternionTagListcopyMe) [inline]
+
+
+ +

Definition at line 206 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::SMD3QuaternionTagList::~SMD3QuaternionTagList () [inline, virtual]
+
+
+ +

Definition at line 211 of file IAnimatedMeshMD3.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
SMD3QuaternionTag* irr::scene::SMD3QuaternionTagList::get (const core::stringcname) [inline]
+
+
+ +

Definition at line 213 of file IAnimatedMeshMD3.h.

+ +

References irr::core::array< T, TAlloc >::linear_search().

+ +
+
+ +
+
+ + + + + + + + +
SMD3QuaternionTagList& irr::scene::SMD3QuaternionTagList::operator= (const SMD3QuaternionTagListcopyMe) [inline]
+
+
+ +

Definition at line 253 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + + + + + +
const SMD3QuaternionTag& irr::scene::SMD3QuaternionTagList::operator[] (u32 index) const [inline]
+
+
+ +

Definition at line 238 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + + + + + +
SMD3QuaternionTag& irr::scene::SMD3QuaternionTagList::operator[] (u32 index) [inline]
+
+
+ +

Definition at line 243 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::SMD3QuaternionTagList::push_back (const SMD3QuaternionTagother) [inline]
+
+
+ +

Definition at line 248 of file IAnimatedMeshMD3.h.

+ +

References irr::core::array< T, TAlloc >::push_back().

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::SMD3QuaternionTagList::set_used (u32 new_size) [inline]
+
+ +
+ +
+
+ + + + + + + +
u32 irr::scene::SMD3QuaternionTagList::size () const [inline]
+
+
+ +

Definition at line 222 of file IAnimatedMeshMD3.h.

+ +

References irr::core::array< T, TAlloc >::size().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord-members.html new file mode 100644 index 0000000..b19c3e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3TexCoord Member List
+
+
+This is the complete list of members for irr::scene::SMD3TexCoord, including all inherited members. + + +
uirr::scene::SMD3TexCoord
virr::scene::SMD3TexCoord
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord.html new file mode 100644 index 0000000..5fca2b2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_tex_coord.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3TexCoord Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3TexCoord Struct Reference
+
+
+ +

Texture Coordinate. + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Texture Coordinate.

+ +

Definition at line 123 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 125 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 126 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex-members.html new file mode 100644 index 0000000..b43b8d9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex-members.html @@ -0,0 +1,122 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMD3Vertex Member List
+
+
+This is the complete list of members for irr::scene::SMD3Vertex, including all inherited members. + + +
normalirr::scene::SMD3Vertex
positionirr::scene::SMD3Vertex
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex.html new file mode 100644 index 0000000..a92b3b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_m_d3_vertex.html @@ -0,0 +1,175 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMD3Vertex Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMD3Vertex Struct Reference
+
+
+ +

Compressed Vertex Data. + More...

+ +

#include <IAnimatedMeshMD3.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Compressed Vertex Data.

+ +

Definition at line 116 of file IAnimatedMeshMD3.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 119 of file IAnimatedMeshMD3.h.

+ +
+
+ +
+ +
+ +

Definition at line 118 of file IAnimatedMeshMD3.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh-members.html new file mode 100644 index 0000000..484dd58 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh-members.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SMesh Member List
+
+
+This is the complete list of members for irr::scene::SMesh, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + +
addMeshBuffer(IMeshBuffer *buf)irr::scene::SMesh [inline]
BoundingBoxirr::scene::SMesh
clear()irr::scene::SMesh [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const irr::scene::SMesh [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getMeshBuffer(u32 nr) const irr::scene::SMesh [inline, virtual]
getMeshBuffer(const video::SMaterial &material) const irr::scene::SMesh [inline, virtual]
getMeshBufferCount() const irr::scene::SMesh [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
grab() const irr::IReferenceCounted [inline]
IReferenceCounted()irr::IReferenceCounted [inline]
MeshBuffersirr::scene::SMesh
recalculateBoundingBox()irr::scene::SMesh [inline]
setBoundingBox(const core::aabbox3df &box)irr::scene::SMesh [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)irr::scene::SMesh [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)irr::scene::SMesh [inline, virtual]
setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)irr::scene::SMesh [inline, virtual]
SMesh()irr::scene::SMesh [inline]
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
~SMesh()irr::scene::SMesh [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.html new file mode 100644 index 0000000..9231a86 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.html @@ -0,0 +1,547 @@ + + + + +Irrlicht 3D Engine: irr::scene::SMesh Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SMesh Struct Reference
+
+
+ +

Simple implementation of the IMesh interface. + More...

+ +

#include <SMesh.h>

+
+ + Inheritance diagram for irr::scene::SMesh:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Simple implementation of the IMesh interface.

+ +

Definition at line 18 of file SMesh.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::SMesh::SMesh () [inline]
+
+
+ +

constructor

+ +

Definition at line 21 of file SMesh.h.

+ +

References irr::IReferenceCounted::setDebugName().

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::SMesh::~SMesh () [inline, virtual]
+
+
+ +

destructor

+ +

Definition at line 29 of file SMesh.h.

+ +

References irr::IReferenceCounted::drop(), MeshBuffers, and irr::core::array< T, TAlloc >::size().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::scene::SMesh::addMeshBuffer (IMeshBufferbuf) [inline]
+
+
+ +

adds a MeshBuffer

+

The bounding box is not updated automatically.

+ +

Definition at line 98 of file SMesh.h.

+ +

References irr::IReferenceCounted::grab(), MeshBuffers, and irr::core::array< T, TAlloc >::push_back().

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::SMesh::clear () [inline, virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::SMesh::getBoundingBox () const [inline, virtual]
+
+
+ +

returns an axis aligned bounding box

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 72 of file SMesh.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshBuffer* irr::scene::SMesh::getMeshBuffer (u32 nr) const [inline, virtual]
+
+
+ +

returns pointer to a mesh buffer

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 53 of file SMesh.h.

+ +

References MeshBuffers.

+ +
+
+ +
+
+ + + + + + + + +
virtual IMeshBuffer* irr::scene::SMesh::getMeshBuffer (const video::SMaterialmaterial) const [inline, virtual]
+
+
+ +

returns a meshbuffer which fits a material

+

reverse search

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 60 of file SMesh.h.

+ +

References MeshBuffers, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SMesh::getMeshBufferCount () const [inline, virtual]
+
+
+ +

returns amount of mesh buffers.

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 47 of file SMesh.h.

+ +

References MeshBuffers, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + +
void irr::scene::SMesh::recalculateBoundingBox () [inline]
+
+
+ +

recalculates the bounding box

+ +

Definition at line 84 of file SMesh.h.

+ +

References irr::core::aabbox3d< T >::addInternalBox(), BoundingBox, MeshBuffers, irr::core::aabbox3d< T >::reset(), and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SMesh::setBoundingBox (const core::aabbox3dfbox) [inline, virtual]
+
+
+ +

set user axis aligned bounding box

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 78 of file SMesh.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SMesh::setDirty (E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX) [inline, virtual]
+
+
+ +

flags the meshbuffer as changed, reloads hardware buffers

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 122 of file SMesh.h.

+ +

References MeshBuffers, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SMesh::setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint,
E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX 
) [inline, virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 115 of file SMesh.h.

+ +

References MeshBuffers, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SMesh::setMaterialFlag (video::E_MATERIAL_FLAG flag,
bool newvalue 
) [inline, virtual]
+
+
+ +

sets a flag of all contained materials to a new value

+ +

Implements irr::scene::IMesh.

+ +

Definition at line 108 of file SMesh.h.

+ +

References MeshBuffers, and irr::core::array< T, TAlloc >::size().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

The bounding box of this mesh.

+ +

Definition at line 132 of file SMesh.h.

+ +

Referenced by clear(), getBoundingBox(), recalculateBoundingBox(), and setBoundingBox().

+ +
+
+ + +
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.png new file mode 100644 index 0000000..3fe3382 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_mesh.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle-members.html new file mode 100644 index 0000000..4e490e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle.html new file mode 100644 index 0000000..b8ec9ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_particle.html @@ -0,0 +1,309 @@ + + + + +Irrlicht 3D Engine: irr::scene::SParticle Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SParticle Struct Reference
+
+
+ +

Struct for holding particle data. + More...

+ +

#include <SParticle.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+

Struct for holding particle data.

+ +

Definition at line 17 of file SParticle.h.

+

Member Data Documentation

+ +
+ +
+ +

Current color of the particle.

+ +

Definition at line 32 of file SParticle.h.

+ +
+
+ +
+ +
+ +

End life time of the particle.

+ +

Definition at line 29 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Position of the particle.

+ +

Definition at line 20 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Scale of the particle.

+

The current scale of the particle.

+ +

Definition at line 44 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Original color of the particle.

+

That's the color of the particle it had when it was emitted.

+ +

Definition at line 36 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Original scale of the particle.

+

The scale of the particle when it was emitted.

+ +

Definition at line 48 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Start life time of the particle.

+ +

Definition at line 26 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Original direction and speed of the particle.

+

The direction and speed the particle had when it was emitted.

+ +

Definition at line 40 of file SParticle.h.

+ +
+
+ +
+ +
+ +

Direction and speed of the particle.

+ +

Definition at line 23 of file SParticle.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer-members.html new file mode 100644 index 0000000..02bfcc5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer-members.html @@ -0,0 +1,164 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SSharedMeshBuffer Member List
+
+
+This is the complete list of members for irr::scene::SSharedMeshBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)irr::scene::SSharedMeshBuffer [inline, virtual]
append(const IMeshBuffer *const other)irr::scene::SSharedMeshBuffer [inline, virtual]
BoundingBoxirr::scene::SSharedMeshBuffer
ChangedID_Indexirr::scene::SSharedMeshBuffer
ChangedID_Vertexirr::scene::SSharedMeshBuffer
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const irr::scene::SSharedMeshBuffer [inline, virtual]
getChangedID_Index() const irr::scene::SSharedMeshBuffer [inline, virtual]
getChangedID_Vertex() const irr::scene::SSharedMeshBuffer [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint_Index() const irr::scene::SSharedMeshBuffer [inline, virtual]
getHardwareMappingHint_Vertex() const irr::scene::SSharedMeshBuffer [inline, virtual]
getIndexCount() const irr::scene::SSharedMeshBuffer [inline, virtual]
getIndexType() const irr::scene::SSharedMeshBuffer [inline, virtual]
getIndices() const irr::scene::SSharedMeshBuffer [inline, virtual]
getIndices()irr::scene::SSharedMeshBuffer [inline, virtual]
getMaterial() const irr::scene::SSharedMeshBuffer [inline, virtual]
getMaterial()irr::scene::SSharedMeshBuffer [inline, virtual]
getNormal(u32 i) const irr::scene::SSharedMeshBuffer [inline, virtual]
getNormal(u32 i)irr::scene::SSharedMeshBuffer [inline, virtual]
getPosition(u32 i) const irr::scene::SSharedMeshBuffer [inline, virtual]
getPosition(u32 i)irr::scene::SSharedMeshBuffer [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTCoords(u32 i) const irr::scene::SSharedMeshBuffer [inline, virtual]
getTCoords(u32 i)irr::scene::SSharedMeshBuffer [inline, virtual]
getVertexCount() const irr::scene::SSharedMeshBuffer [inline, virtual]
getVertexType() const irr::scene::SSharedMeshBuffer [inline, virtual]
getVertices() const irr::scene::SSharedMeshBuffer [inline, virtual]
getVertices()irr::scene::SSharedMeshBuffer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
Indicesirr::scene::SSharedMeshBuffer
IReferenceCounted()irr::IReferenceCounted [inline]
MappingHintIndexirr::scene::SSharedMeshBuffer
MappingHintVertexirr::scene::SSharedMeshBuffer
Materialirr::scene::SSharedMeshBuffer
recalculateBoundingBox()irr::scene::SSharedMeshBuffer [inline, virtual]
setBoundingBox(const core::aabbox3df &box)irr::scene::SSharedMeshBuffer [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)irr::scene::SSharedMeshBuffer [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)irr::scene::SSharedMeshBuffer [inline, virtual]
SSharedMeshBuffer()irr::scene::SSharedMeshBuffer [inline]
SSharedMeshBuffer(core::array< video::S3DVertex > *vertices)irr::scene::SSharedMeshBuffer [inline]
Verticesirr::scene::SSharedMeshBuffer
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.html new file mode 100644 index 0000000..6f5f7f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.html @@ -0,0 +1,1084 @@ + + + + +Irrlicht 3D Engine: irr::scene::SSharedMeshBuffer Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SSharedMeshBuffer Struct Reference
+
+
+ +

Implementation of the IMeshBuffer interface with shared vertex list. + More...

+ +

#include <SSharedMeshBuffer.h>

+
+ + Inheritance diagram for irr::scene::SSharedMeshBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Implementation of the IMeshBuffer interface with shared vertex list.

+ +

Definition at line 16 of file SSharedMeshBuffer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::SSharedMeshBuffer::SSharedMeshBuffer () [inline]
+
+
+ +

constructor

+ +

Definition at line 19 of file SSharedMeshBuffer.h.

+ +

References irr::IReferenceCounted::setDebugName().

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::SSharedMeshBuffer::SSharedMeshBuffer (core::array< video::S3DVertex > * vertices) [inline]
+
+
+ +

constructor

+ +

Definition at line 27 of file SSharedMeshBuffer.h.

+ +

References irr::IReferenceCounted::setDebugName().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SSharedMeshBuffer::append (const void *const vertices,
u32 numVertices,
const u16 *const indices,
u32 numIndices 
) [inline, virtual]
+
+
+ +

append the vertices and indices to the current buffer

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 171 of file SSharedMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SSharedMeshBuffer::append (const IMeshBuffer *const other) [inline, virtual]
+
+
+ +

append the meshbuffer to the current buffer

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 174 of file SSharedMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::SSharedMeshBuffer::getBoundingBox () const [inline, virtual]
+
+
+ +

returns an axis aligned bounding box

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 98 of file SSharedMeshBuffer.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSharedMeshBuffer::getChangedID_Index () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 212 of file SSharedMeshBuffer.h.

+ +

References ChangedID_Index.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSharedMeshBuffer::getChangedID_Vertex () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 208 of file SSharedMeshBuffer.h.

+ +

References ChangedID_Vertex.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::getHardwareMappingHint_Index () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 183 of file SSharedMeshBuffer.h.

+ +

References MappingHintIndex.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::getHardwareMappingHint_Vertex () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 177 of file SSharedMeshBuffer.h.

+ +

References MappingHintVertex.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSharedMeshBuffer::getIndexCount () const [inline, virtual]
+
+
+ +

returns amount of indices

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 86 of file SSharedMeshBuffer.h.

+ +

References Indices, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::SSharedMeshBuffer::getIndexType () const [inline, virtual]
+
+
+ +

Get type of index data which is stored in this meshbuffer.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 92 of file SSharedMeshBuffer.h.

+ +

References irr::video::EIT_16BIT.

+ +
+
+ +
+
+ + + + + + + +
virtual const u16* irr::scene::SSharedMeshBuffer::getIndices () const [inline, virtual]
+
+
+ +

returns pointer to Indices

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 74 of file SSharedMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::const_pointer(), and Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual u16* irr::scene::SSharedMeshBuffer::getIndices () [inline, virtual]
+
+
+ +

returns pointer to Indices

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 80 of file SSharedMeshBuffer.h.

+ +

References Indices, and irr::core::array< T, TAlloc >::pointer().

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SMaterial& irr::scene::SSharedMeshBuffer::getMaterial () const [inline, virtual]
+
+
+ +

returns the material of this meshbuffer

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 35 of file SSharedMeshBuffer.h.

+ +

References Material.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SMaterial& irr::scene::SSharedMeshBuffer::getMaterial () [inline, virtual]
+
+
+ +

returns the material of this meshbuffer

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 41 of file SSharedMeshBuffer.h.

+ +

References Material.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::SSharedMeshBuffer::getNormal (u32 i) const [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 143 of file SSharedMeshBuffer.h.

+ +

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::SSharedMeshBuffer::getNormal (u32 i) [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 150 of file SSharedMeshBuffer.h.

+ +

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::SSharedMeshBuffer::getPosition (u32 i) const [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 129 of file SSharedMeshBuffer.h.

+ +

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::SSharedMeshBuffer::getPosition (u32 i) [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 136 of file SSharedMeshBuffer.h.

+ +

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector2df& irr::scene::SSharedMeshBuffer::getTCoords (u32 i) const [inline, virtual]
+
+
+ +

returns texture coord of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 157 of file SSharedMeshBuffer.h.

+ +

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector2df& irr::scene::SSharedMeshBuffer::getTCoords (u32 i) [inline, virtual]
+
+
+ +

returns texture coord of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 164 of file SSharedMeshBuffer.h.

+ +

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSharedMeshBuffer::getVertexCount () const [inline, virtual]
+
+
+ +

returns amount of vertices

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 65 of file SSharedMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::size(), and Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::SSharedMeshBuffer::getVertexType () const [inline, virtual]
+
+
+ +

returns which type of vertex data is stored.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 110 of file SSharedMeshBuffer.h.

+ +

References irr::video::EVT_STANDARD.

+ +
+
+ +
+
+ + + + + + + +
virtual const void* irr::scene::SSharedMeshBuffer::getVertices () const [inline, virtual]
+
+
+ +

returns pointer to vertices

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 47 of file SSharedMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::const_pointer(), and Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual void* irr::scene::SSharedMeshBuffer::getVertices () [inline, virtual]
+
+
+ +

returns pointer to vertices

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 56 of file SSharedMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::pointer(), and Vertices.

+ +
+
+ +
+
+ + + + + + + +
virtual void irr::scene::SSharedMeshBuffer::recalculateBoundingBox () [inline, virtual]
+
+
+ +

recalculates the bounding box. should be called if the mesh changed.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 116 of file SSharedMeshBuffer.h.

+ +

References irr::core::aabbox3d< T >::addInternalPoint(), BoundingBox, irr::core::array< T, TAlloc >::empty(), Indices, irr::core::aabbox3d< T >::reset(), irr::core::array< T, TAlloc >::size(), and Vertices.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SSharedMeshBuffer::setBoundingBox (const core::aabbox3dfbox) [inline, virtual]
+
+
+ +

set user axis aligned bounding box

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 104 of file SSharedMeshBuffer.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SSharedMeshBuffer::setDirty (E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX) [inline, virtual]
+
+
+ +

flags the mesh as changed, reloads hardware buffers

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 198 of file SSharedMeshBuffer.h.

+ +

References ChangedID_Index, ChangedID_Vertex, irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, and irr::scene::EBT_VERTEX_AND_INDEX.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SSharedMeshBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint,
E_BUFFER_TYPE buffer = EBT_VERTEX_AND_INDEX 
) [inline, virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 189 of file SSharedMeshBuffer.h.

+ +

References irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, irr::scene::EBT_VERTEX_AND_INDEX, MappingHintIndex, and MappingHintVertex.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Bounding box.

+ +

Definition at line 230 of file SSharedMeshBuffer.h.

+ +

Referenced by getBoundingBox(), recalculateBoundingBox(), and setBoundingBox().

+ +
+
+ +
+ +
+ +

ID used for hardware buffer management.

+ +

Definition at line 227 of file SSharedMeshBuffer.h.

+ +

Referenced by getChangedID_Index(), and setDirty().

+ +
+
+ +
+ +
+ +

ID used for hardware buffer management.

+ +

Definition at line 224 of file SSharedMeshBuffer.h.

+ +

Referenced by getChangedID_Vertex(), and setDirty().

+ +
+
+ +
+ +
+ +

Array of Indices.

+ +

Definition at line 221 of file SSharedMeshBuffer.h.

+ +

Referenced by getIndexCount(), getIndices(), getNormal(), getPosition(), getTCoords(), and recalculateBoundingBox().

+ +
+
+ + + +
+ +
+ +

hardware mapping hint

+ +

Definition at line 233 of file SSharedMeshBuffer.h.

+ +

Referenced by getHardwareMappingHint_Vertex(), and setHardwareMappingHint().

+ +
+
+ +
+ +
+ +

Material of this meshBuffer.

+ +

Definition at line 215 of file SSharedMeshBuffer.h.

+ +

Referenced by getMaterial().

+ +
+
+ +
+ +
+ +

Shared Array of vertices.

+ +

Definition at line 218 of file SSharedMeshBuffer.h.

+ +

Referenced by getNormal(), getPosition(), getTCoords(), getVertexCount(), getVertices(), and recalculateBoundingBox().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.png new file mode 100644 index 0000000..73e5eb9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_shared_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer-members.html new file mode 100644 index 0000000..635dd17 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer-members.html @@ -0,0 +1,172 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SSkinMeshBuffer Member List
+
+
+This is the complete list of members for irr::scene::SSkinMeshBuffer, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)irr::scene::SSkinMeshBuffer [inline, virtual]
append(const IMeshBuffer *const other)irr::scene::SSkinMeshBuffer [inline, virtual]
BoundingBoxirr::scene::SSkinMeshBuffer
boundingBoxNeedsRecalculated(void)irr::scene::SSkinMeshBuffer [inline]
BoundingBoxNeedsRecalculatedirr::scene::SSkinMeshBuffer
ChangedID_Indexirr::scene::SSkinMeshBuffer
ChangedID_Vertexirr::scene::SSkinMeshBuffer
convertTo2TCoords()irr::scene::SSkinMeshBuffer [inline, virtual]
convertToTangents()irr::scene::SSkinMeshBuffer [inline, virtual]
drop() const irr::IReferenceCounted [inline]
getBoundingBox() const irr::scene::SSkinMeshBuffer [inline, virtual]
getChangedID_Index() const irr::scene::SSkinMeshBuffer [inline, virtual]
getChangedID_Vertex() const irr::scene::SSkinMeshBuffer [inline, virtual]
getDebugName() const irr::IReferenceCounted [inline]
getHardwareMappingHint_Index() const irr::scene::SSkinMeshBuffer [inline, virtual]
getHardwareMappingHint_Vertex() const irr::scene::SSkinMeshBuffer [inline, virtual]
getIndexCount() const irr::scene::SSkinMeshBuffer [inline, virtual]
getIndexType() const irr::scene::SSkinMeshBuffer [inline, virtual]
getIndices() const irr::scene::SSkinMeshBuffer [inline, virtual]
getIndices()irr::scene::SSkinMeshBuffer [inline, virtual]
getMaterial() const irr::scene::SSkinMeshBuffer [inline, virtual]
getMaterial()irr::scene::SSkinMeshBuffer [inline, virtual]
getNormal(u32 i) const irr::scene::SSkinMeshBuffer [inline, virtual]
getNormal(u32 i)irr::scene::SSkinMeshBuffer [inline, virtual]
getPosition(u32 i) const irr::scene::SSkinMeshBuffer [inline, virtual]
getPosition(u32 i)irr::scene::SSkinMeshBuffer [inline, virtual]
getReferenceCount() const irr::IReferenceCounted [inline]
getTCoords(u32 i) const irr::scene::SSkinMeshBuffer [inline, virtual]
getTCoords(u32 i)irr::scene::SSkinMeshBuffer [inline, virtual]
getVertex(u32 index)irr::scene::SSkinMeshBuffer [inline, virtual]
getVertexCount() const irr::scene::SSkinMeshBuffer [inline, virtual]
getVertexType() const irr::scene::SSkinMeshBuffer [inline, virtual]
getVertices() const irr::scene::SSkinMeshBuffer [inline, virtual]
getVertices()irr::scene::SSkinMeshBuffer [inline, virtual]
grab() const irr::IReferenceCounted [inline]
Indicesirr::scene::SSkinMeshBuffer
IReferenceCounted()irr::IReferenceCounted [inline]
MappingHint_Indexirr::scene::SSkinMeshBuffer
MappingHint_Vertexirr::scene::SSkinMeshBuffer
Materialirr::scene::SSkinMeshBuffer
recalculateBoundingBox()irr::scene::SSkinMeshBuffer [inline, virtual]
setBoundingBox(const core::aabbox3df &box)irr::scene::SSkinMeshBuffer [inline, virtual]
setDebugName(const c8 *newName)irr::IReferenceCounted [inline, protected]
setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::SSkinMeshBuffer [inline, virtual]
setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)irr::scene::SSkinMeshBuffer [inline, virtual]
SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD)irr::scene::SSkinMeshBuffer [inline]
Transformationirr::scene::SSkinMeshBuffer
VertexTypeirr::scene::SSkinMeshBuffer
Vertices_2TCoordsirr::scene::SSkinMeshBuffer
Vertices_Standardirr::scene::SSkinMeshBuffer
Vertices_Tangentsirr::scene::SSkinMeshBuffer
~IReferenceCounted()irr::IReferenceCounted [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.html new file mode 100644 index 0000000..c80130d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.html @@ -0,0 +1,1232 @@ + + + + +Irrlicht 3D Engine: irr::scene::SSkinMeshBuffer Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SSkinMeshBuffer Struct Reference
+
+
+ +

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime. + More...

+ +

#include <SSkinMeshBuffer.h>

+
+ + Inheritance diagram for irr::scene::SSkinMeshBuffer:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime.

+ +

Definition at line 19 of file SSkinMeshBuffer.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::SSkinMeshBuffer::SSkinMeshBuffer (video::E_VERTEX_TYPE vt = video::EVT_STANDARD) [inline]
+
+
+ +

Default constructor.

+ +

Definition at line 22 of file SSkinMeshBuffer.h.

+ +

References irr::IReferenceCounted::setDebugName().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SSkinMeshBuffer::append (const void *const vertices,
u32 numVertices,
const u16 *const indices,
u32 numIndices 
) [inline, virtual]
+
+
+ +

append the vertices and indices to the current buffer

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 329 of file SSkinMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SSkinMeshBuffer::append (const IMeshBuffer *const other) [inline, virtual]
+
+
+ +

append the meshbuffer to the current buffer

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 332 of file SSkinMeshBuffer.h.

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::SSkinMeshBuffer::boundingBoxNeedsRecalculated (void ) [inline]
+
+
+ +

Call this after changing the positions of any vertex.

+ +

Definition at line 374 of file SSkinMeshBuffer.h.

+ +

References BoundingBoxNeedsRecalculated.

+ +
+
+ + + + + +
+
+ + + + + + + +
virtual const core::aabbox3d<f32>& irr::scene::SSkinMeshBuffer::getBoundingBox () const [inline, virtual]
+
+
+ +

Get bounding box.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 126 of file SSkinMeshBuffer.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSkinMeshBuffer::getChangedID_Index () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 371 of file SSkinMeshBuffer.h.

+ +

References ChangedID_Index.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSkinMeshBuffer::getChangedID_Vertex () const [inline, virtual]
+
+
+ +

Get the currently used ID for identification of changes.

+

This shouldn't be used for anything outside the VideoDriver.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 369 of file SSkinMeshBuffer.h.

+ +

References ChangedID_Vertex.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::getHardwareMappingHint_Index () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint for index buffers

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 341 of file SSkinMeshBuffer.h.

+ +

References MappingHint_Index.

+ +
+
+ +
+
+ + + + + + + +
virtual E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::getHardwareMappingHint_Vertex () const [inline, virtual]
+
+
+ +

get the current hardware mapping hint for vertex buffers

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 335 of file SSkinMeshBuffer.h.

+ +

References MappingHint_Vertex.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSkinMeshBuffer::getIndexCount () const [inline, virtual]
+
+
+ +

Get index count.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 120 of file SSkinMeshBuffer.h.

+ +

References Indices, and irr::core::array< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + +
virtual video::E_INDEX_TYPE irr::scene::SSkinMeshBuffer::getIndexType () const [inline, virtual]
+
+
+ +

Get type of index data which is stored in this meshbuffer.

+
Returns:
Index type of this buffer.
+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 102 of file SSkinMeshBuffer.h.

+ +

References irr::video::EIT_16BIT.

+ +
+
+ +
+
+ + + + + + + +
virtual const u16* irr::scene::SSkinMeshBuffer::getIndices () const [inline, virtual]
+
+
+ +

Get pointer to index array.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 108 of file SSkinMeshBuffer.h.

+ +

References irr::core::array< T, TAlloc >::const_pointer(), and Indices.

+ +
+
+ +
+
+ + + + + + + +
virtual u16* irr::scene::SSkinMeshBuffer::getIndices () [inline, virtual]
+
+
+ +

Get pointer to index array.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 114 of file SSkinMeshBuffer.h.

+ +

References Indices, and irr::core::array< T, TAlloc >::pointer().

+ +
+
+ +
+
+ + + + + + + +
virtual const video::SMaterial& irr::scene::SSkinMeshBuffer::getMaterial () const [inline, virtual]
+
+
+ +

Get Material of this buffer.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 33 of file SSkinMeshBuffer.h.

+ +

References Material.

+ +
+
+ +
+
+ + + + + + + +
virtual video::SMaterial& irr::scene::SSkinMeshBuffer::getMaterial () [inline, virtual]
+
+
+ +

Get Material of this buffer.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 39 of file SSkinMeshBuffer.h.

+ +

References Material.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::SSkinMeshBuffer::getNormal (u32 i) const [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 273 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::SSkinMeshBuffer::getNormal (u32 i) [inline, virtual]
+
+
+ +

returns normal of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 287 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector3df& irr::scene::SSkinMeshBuffer::getPosition (u32 i) const [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 245 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector3df& irr::scene::SSkinMeshBuffer::getPosition (u32 i) [inline, virtual]
+
+
+ +

returns position of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 259 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + + +
virtual const core::vector2df& irr::scene::SSkinMeshBuffer::getTCoords (u32 i) const [inline, virtual]
+
+
+ +

returns texture coords of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 301 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + + +
virtual core::vector2df& irr::scene::SSkinMeshBuffer::getTCoords (u32 i) [inline, virtual]
+
+
+ +

returns texture coords of vertex i

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 315 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + + +
virtual video::S3DVertex* irr::scene::SSkinMeshBuffer::getVertex (u32 index) [inline, virtual]
+
+
+ +

Get standard vertex at given index.

+ +

Definition at line 45 of file SSkinMeshBuffer.h.

+ +

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

+ +
+
+ +
+
+ + + + + + + +
virtual u32 irr::scene::SSkinMeshBuffer::getVertexCount () const [inline, virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual video::E_VERTEX_TYPE irr::scene::SSkinMeshBuffer::getVertexType () const [inline, virtual]
+
+
+ +

Get vertex type.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 187 of file SSkinMeshBuffer.h.

+ +

References VertexType.

+ +
+
+ +
+
+ + + + + + + +
virtual const void* irr::scene::SSkinMeshBuffer::getVertices () const [inline, virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual void* irr::scene::SSkinMeshBuffer::getVertices () [inline, virtual]
+
+ +
+ + + +
+
+ + + + + + + + +
virtual void irr::scene::SSkinMeshBuffer::setBoundingBox (const core::aabbox3dfbox) [inline, virtual]
+
+
+ +

Set bounding box.

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 132 of file SSkinMeshBuffer.h.

+ +

References BoundingBox.

+ +
+
+ +
+
+ + + + + + + + +
virtual void irr::scene::SSkinMeshBuffer::setDirty (E_BUFFER_TYPE Buffer = EBT_VERTEX_AND_INDEX) [inline, virtual]
+
+
+ +

flags the mesh as changed, reloads hardware buffers

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 361 of file SSkinMeshBuffer.h.

+ +

References ChangedID_Index, ChangedID_Vertex, irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, and irr::scene::EBT_VERTEX_AND_INDEX.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void irr::scene::SSkinMeshBuffer::setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint,
E_BUFFER_TYPE Buffer = EBT_VERTEX_AND_INDEX 
) [inline, virtual]
+
+
+ +

set the hardware mapping hint, for driver

+ +

Implements irr::scene::IMeshBuffer.

+ +

Definition at line 347 of file SSkinMeshBuffer.h.

+ +

References irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, irr::scene::EBT_VERTEX_AND_INDEX, MappingHint_Index, and MappingHint_Vertex.

+ +
+
+

Member Data Documentation

+ + + + + +
+ +
+ +

Definition at line 382 of file SSkinMeshBuffer.h.

+ +

Referenced by getChangedID_Index(), and setDirty().

+ +
+
+ +
+ +
+ +

Definition at line 381 of file SSkinMeshBuffer.h.

+ +

Referenced by getChangedID_Vertex(), and setDirty().

+ +
+
+ +
+ +
+ +

Definition at line 379 of file SSkinMeshBuffer.h.

+ +

Referenced by getIndexCount(), and getIndices().

+ +
+
+ + + + + +
+ +
+ +

Definition at line 387 of file SSkinMeshBuffer.h.

+ +

Referenced by getMaterial().

+ +
+
+ +
+ +
+ +

Definition at line 385 of file SSkinMeshBuffer.h.

+ +
+
+ + + + + + + + +
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.png new file mode 100644 index 0000000..3861eb6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_skin_mesh_buffer.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum-members.html new file mode 100644 index 0000000..455350c --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum-members.html @@ -0,0 +1,149 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::SViewFrustum Member List
+
+
+This is the complete list of members for irr::scene::SViewFrustum, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boundingBoxirr::scene::SViewFrustum
cameraPositionirr::scene::SViewFrustum
clipLine(core::line3d< f32 > &line) const irr::scene::SViewFrustum [inline]
getBoundingBox() const irr::scene::SViewFrustum [inline]
getFarLeftDown() const irr::scene::SViewFrustum [inline]
getFarLeftUp() const irr::scene::SViewFrustum [inline]
getFarRightDown() const irr::scene::SViewFrustum [inline]
getFarRightUp() const irr::scene::SViewFrustum [inline]
getNearLeftDown() const irr::scene::SViewFrustum [inline]
getNearLeftUp() const irr::scene::SViewFrustum [inline]
getNearRightDown() const irr::scene::SViewFrustum [inline]
getNearRightUp() const irr::scene::SViewFrustum [inline]
getTransform(video::E_TRANSFORMATION_STATE state)irr::scene::SViewFrustum [inline]
getTransform(video::E_TRANSFORMATION_STATE state) const irr::scene::SViewFrustum [inline]
planesirr::scene::SViewFrustum
recalculateBoundingBox()irr::scene::SViewFrustum [inline]
setFrom(const core::matrix4 &mat)irr::scene::SViewFrustum [inline]
SViewFrustum()irr::scene::SViewFrustum [inline]
SViewFrustum(const SViewFrustum &other)irr::scene::SViewFrustum [inline]
SViewFrustum(const core::matrix4 &mat)irr::scene::SViewFrustum [inline]
transform(const core::matrix4 &mat)irr::scene::SViewFrustum [inline]
VF_BOTTOM_PLANE enum valueirr::scene::SViewFrustum
VF_FAR_PLANE enum valueirr::scene::SViewFrustum
VF_LEFT_PLANE enum valueirr::scene::SViewFrustum
VF_NEAR_PLANE enum valueirr::scene::SViewFrustum
VF_PLANE_COUNT enum valueirr::scene::SViewFrustum
VF_RIGHT_PLANE enum valueirr::scene::SViewFrustum
VF_TOP_PLANE enum valueirr::scene::SViewFrustum
VFPLANES enum nameirr::scene::SViewFrustum
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum.html new file mode 100644 index 0000000..e94b734 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1_s_view_frustum.html @@ -0,0 +1,710 @@ + + + + +Irrlicht 3D Engine: irr::scene::SViewFrustum Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::SViewFrustum Struct Reference
+
+
+ +

Defines the view frustum. That's the space visible by the camera. + More...

+ +

#include <SViewFrustum.h>

+ +

List of all members.

+

+Public Types

+ +

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Defines the view frustum. That's the space visible by the camera.

+

The view frustum is enclosed by 6 planes. These six planes share eight points. A bounding box around these eight points is also stored in this structure.

+ +

Definition at line 25 of file SViewFrustum.h.

+

Member Enumeration Documentation

+ +
+ +
+
Enumerator:
+ + + + + + + +
VF_FAR_PLANE  +

Far plane of the frustum. That is the plane farest away from the eye.

+
VF_NEAR_PLANE  +

Near plane of the frustum. That is the plane nearest to the eye.

+
VF_LEFT_PLANE  +

Left plane of the frustum.

+
VF_RIGHT_PLANE  +

Right plane of the frustum.

+
VF_BOTTOM_PLANE  +

Bottom plane of the frustum.

+
VF_TOP_PLANE  +

Top plane of the frustum.

+
VF_PLANE_COUNT  +

Amount of planes enclosing the view frustum. Should be 6.

+
+
+
+ +

Definition at line 27 of file SViewFrustum.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::SViewFrustum::SViewFrustum () [inline]
+
+
+ +

Default Constructor.

+ +

Definition at line 48 of file SViewFrustum.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::SViewFrustum::SViewFrustum (const SViewFrustumother) [inline]
+
+
+ +

Copy Constructor.

+

Copy constructor ViewFrustum

+ +

Definition at line 129 of file SViewFrustum.h.

+ +

References boundingBox, cameraPosition, planes, and VF_PLANE_COUNT.

+ +
+
+ +
+
+ + + + + + + + +
irr::scene::SViewFrustum::SViewFrustum (const core::matrix4mat) [inline]
+
+
+ +

This constructor creates a view frustum based on a projection and/or view matrix.

+ +

Definition at line 142 of file SViewFrustum.h.

+ +

References setFrom().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool irr::scene::SViewFrustum::clipLine (core::line3d< f32 > & line) const [inline]
+
+
+ +

clips a line to the view frustum.

+

Clips a line to the frustum.

+
Returns:
True if the line was clipped, false if not
+ +

Definition at line 344 of file SViewFrustum.h.

+ +

References irr::core::line3d< T >::end, irr::core::plane3d< T >::getKnownIntersectionWithLine(), irr::core::ISREL3D_FRONT, planes, irr::core::line3d< T >::start, and VF_PLANE_COUNT.

+ +
+
+ +
+
+ + + + + + + +
const core::aabbox3d< f32 > & irr::scene::SViewFrustum::getBoundingBox () const [inline]
+
+
+ +

returns a bounding box enclosing the whole view frustum

+ +

Definition at line 238 of file SViewFrustum.h.

+ +

References boundingBox.

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getFarLeftDown () const [inline]
+
+
+ +

returns the point which is on the far left bottom corner inside the the view frustum.

+ +

Definition at line 168 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_BOTTOM_PLANE, VF_FAR_PLANE, and VF_LEFT_PLANE.

+ +

Referenced by recalculateBoundingBox().

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getFarLeftUp () const [inline]
+
+
+ +

returns the point which is on the far left upper corner inside the the view frustum.

+ +

Definition at line 158 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_FAR_PLANE, VF_LEFT_PLANE, and VF_TOP_PLANE.

+ +

Referenced by recalculateBoundingBox().

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getFarRightDown () const [inline]
+
+
+ +

returns the point which is on the far right bottom corner inside the the view frustum.

+ +

Definition at line 188 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_BOTTOM_PLANE, VF_FAR_PLANE, and VF_RIGHT_PLANE.

+ +

Referenced by recalculateBoundingBox().

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getFarRightUp () const [inline]
+
+
+ +

returns the point which is on the far right top corner inside the the view frustum.

+ +

Definition at line 178 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_FAR_PLANE, VF_RIGHT_PLANE, and VF_TOP_PLANE.

+ +

Referenced by recalculateBoundingBox().

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getNearLeftDown () const [inline]
+
+
+ +

returns the point which is on the near left bottom corner inside the the view frustum.

+ +

Definition at line 208 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_BOTTOM_PLANE, VF_LEFT_PLANE, and VF_NEAR_PLANE.

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getNearLeftUp () const [inline]
+
+
+ +

returns the point which is on the near left upper corner inside the the view frustum.

+ +

Definition at line 198 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_LEFT_PLANE, VF_NEAR_PLANE, and VF_TOP_PLANE.

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getNearRightDown () const [inline]
+
+
+ +

returns the point which is on the near right bottom corner inside the the view frustum.

+ +

Definition at line 228 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_BOTTOM_PLANE, VF_NEAR_PLANE, and VF_RIGHT_PLANE.

+ +
+
+ +
+
+ + + + + + + +
core::vector3df irr::scene::SViewFrustum::getNearRightUp () const [inline]
+
+
+ +

returns the point which is on the near right top corner inside the the view frustum.

+ +

Definition at line 218 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::getIntersectionWithPlanes(), planes, VF_NEAR_PLANE, VF_RIGHT_PLANE, and VF_TOP_PLANE.

+ +
+
+ +
+
+ + + + + + + + +
core::matrix4 & irr::scene::SViewFrustum::getTransform (video::E_TRANSFORMATION_STATE state) [inline]
+
+
+ +

get the given state's matrix based on frustum E_TRANSFORMATION_STATE

+

View Frustum depends on Projection & View Matrix

+ +

Definition at line 310 of file SViewFrustum.h.

+ +

References irr::video::ETS_PROJECTION, and irr::video::ETS_VIEW.

+ +
+
+ +
+
+ + + + + + + + +
const core::matrix4 & irr::scene::SViewFrustum::getTransform (video::E_TRANSFORMATION_STATE state) const [inline]
+
+
+ +

get the given state's matrix based on frustum E_TRANSFORMATION_STATE

+

View Frustum depends on Projection & View Matrix

+ +

Definition at line 328 of file SViewFrustum.h.

+ +

References irr::video::ETS_PROJECTION, and irr::video::ETS_VIEW.

+ +
+
+ +
+
+ + + + + + + +
void irr::scene::SViewFrustum::recalculateBoundingBox () [inline]
+
+
+ +

recalculates the bounding box member based on the planes

+ +

Definition at line 243 of file SViewFrustum.h.

+ +

References irr::core::aabbox3d< T >::addInternalPoint(), boundingBox, cameraPosition, getFarLeftDown(), getFarLeftUp(), getFarRightDown(), getFarRightUp(), and irr::core::aabbox3d< T >::reset().

+ +

Referenced by setFrom(), and transform().

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::SViewFrustum::setFrom (const core::matrix4mat) [inline]
+
+
+ +

This constructor creates a view frustum based on a projection and/or view matrix.

+ +

Definition at line 255 of file SViewFrustum.h.

+ +

References irr::core::plane3d< T >::D, irr::core::plane3d< T >::Normal, planes, recalculateBoundingBox(), irr::core::reciprocal_squareroot(), VF_BOTTOM_PLANE, VF_FAR_PLANE, VF_LEFT_PLANE, VF_NEAR_PLANE, VF_PLANE_COUNT, VF_RIGHT_PLANE, and VF_TOP_PLANE.

+ +

Referenced by SViewFrustum().

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::SViewFrustum::transform (const core::matrix4mat) [inline]
+
+
+ +

transforms the frustum by the matrix

+
Parameters:
+ + +
mat,:Matrix by which the view frustum is transformed.
+
+
+ +

Definition at line 148 of file SViewFrustum.h.

+ +

References cameraPosition, planes, recalculateBoundingBox(), irr::core::CMatrix4< T >::transformPlane(), irr::core::CMatrix4< T >::transformVect(), and VF_PLANE_COUNT.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

bounding box around the view frustum

+ +

Definition at line 110 of file SViewFrustum.h.

+ +

Referenced by getBoundingBox(), recalculateBoundingBox(), and SViewFrustum().

+ +
+
+ +
+ +
+ +

the position of the camera

+ +

Definition at line 104 of file SViewFrustum.h.

+ +

Referenced by recalculateBoundingBox(), SViewFrustum(), and transform().

+ +
+
+ +
+
+ + + + +
core::plane3d<f32> irr::scene::SViewFrustum::planes[VF_PLANE_COUNT]
+
+ +
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader-members.html new file mode 100644 index 0000000..9bff338 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::IShader Member List
+
+
+This is the complete list of members for irr::scene::quake3::IShader, including all inherited members. + + + + + + + + + + +
getGroup(u32 stage) const irr::scene::quake3::IShader [inline]
getGroupSize() const irr::scene::quake3::IShader [inline]
IDirr::scene::quake3::IShader
IShader()irr::scene::quake3::IShader [inline]
nameirr::scene::quake3::IShader
operator<(const IShader &other) const irr::scene::quake3::IShader [inline]
operator=(const IShader &other)irr::scene::quake3::IShader [inline]
operator==(const IShader &other) const irr::scene::quake3::IShader [inline]
VarGroupirr::scene::quake3::IShader
~IShader()irr::scene::quake3::IShader [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader.html new file mode 100644 index 0000000..24ee814 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_i_shader.html @@ -0,0 +1,352 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::IShader Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::IShader Struct Reference
+
+
+ +

A Parsed Shader Holding Variables ordered in Groups. + More...

+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

A Parsed Shader Holding Variables ordered in Groups.

+ +

Definition at line 638 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::quake3::IShader::IShader () [inline]
+
+
+ +

Definition at line 640 of file IQ3Shader.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::quake3::IShader::~IShader () [inline, virtual]
+
+
+ +

Definition at line 642 of file IQ3Shader.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
const SVarGroup* irr::scene::quake3::IShader::getGroup (u32 stage) const [inline]
+
+ +
+ +
+
+ + + + + + + +
u32 irr::scene::quake3::IShader::getGroupSize () const [inline]
+
+ +
+ +
+
+ + + + + + + + +
bool irr::scene::quake3::IShader::operator< (const IShaderother) const [inline]
+
+
+ +

Definition at line 657 of file IQ3Shader.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and name.

+ +
+
+ +
+
+ + + + + + + + +
void irr::scene::quake3::IShader::operator= (const IShaderother) [inline]
+
+
+ +

Definition at line 644 of file IQ3Shader.h.

+ +

References ID, name, and VarGroup.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::scene::quake3::IShader::operator== (const IShaderother) const [inline]
+
+
+ +

Definition at line 651 of file IQ3Shader.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and name.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 679 of file IQ3Shader.h.

+ +

Referenced by operator=().

+ +
+
+ +
+ +
+ +

Definition at line 684 of file IQ3Shader.h.

+ +

Referenced by operator<(), operator=(), and operator==().

+ +
+
+ + +
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser-members.html new file mode 100644 index 0000000..14c5317 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser-members.html @@ -0,0 +1,121 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::Noiser Member List
+
+
+This is the complete list of members for irr::scene::quake3::Noiser, including all inherited members. + +
get()irr::scene::quake3::Noiser [inline, static]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser.html new file mode 100644 index 0000000..97c344a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_noiser.html @@ -0,0 +1,161 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::Noiser Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::Noiser Struct Reference
+
+
+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Static Public Member Functions

+ +

Detailed Description

+
+

Definition at line 360 of file IQ3Shader.h.

+

Member Function Documentation

+ +
+
+ + + + + + + +
static f32 irr::scene::quake3::Noiser::get () [inline, static]
+
+
+ +

Definition at line 362 of file IQ3Shader.h.

+ +

Referenced by irr::scene::quake3::SModifierFunction::evaluate().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter-members.html new file mode 100644 index 0000000..cd2cc23 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter-members.html @@ -0,0 +1,136 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter.html new file mode 100644 index 0000000..9d82dd8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_q3_level_load_parameter.html @@ -0,0 +1,410 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::Q3LevelLoadParameter Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::Q3LevelLoadParameter Struct Reference
+
+
+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

used to customize Quake3 BSP Loader

+ +

Definition at line 37 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::quake3::Q3LevelLoadParameter::Q3LevelLoadParameter () [inline]
+
+
+ +

Definition at line 39 of file IQ3Shader.h.

+ +

References scriptDir.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 72 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 69 of file IQ3Shader.h.

+ +
+
+ + + + + + + +
+ +
+ +

Definition at line 67 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 70 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 71 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 68 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 64 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 75 of file IQ3Shader.h.

+ +

Referenced by Q3LevelLoadParameter().

+ +
+
+ +
+ +
+ +

Definition at line 66 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 74 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 73 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 65 of file IQ3Shader.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func-members.html new file mode 100644 index 0000000..0a97f28 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func-members.html @@ -0,0 +1,125 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::SBlendFunc Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func.html new file mode 100644 index 0000000..0fb2aa2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_blend_func.html @@ -0,0 +1,234 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::SBlendFunc Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::SBlendFunc Struct Reference
+
+
+ +

A blend function for a q3 shader. + More...

+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

A blend function for a q3 shader.

+ +

Definition at line 156 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::scene::quake3::SBlendFunc::SBlendFunc (video::E_MODULATE_FUNC mod) [inline]
+
+
+ +

Definition at line 158 of file IQ3Shader.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 167 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 164 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 166 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 163 of file IQ3Shader.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function-members.html new file mode 100644 index 0000000..593d91b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function-members.html @@ -0,0 +1,141 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function.html new file mode 100644 index 0000000..9dcf77d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_modifier_function.html @@ -0,0 +1,574 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::SModifierFunction Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::SModifierFunction Struct Reference
+
+
+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 420 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::quake3::SModifierFunction::SModifierFunction () [inline]
+
+
+ +

Definition at line 422 of file IQ3Shader.h.

+ +
+
+

Member Function Documentation

+ + +

Member Data Documentation

+ +
+
+ + + + +
union { ... }
+
+
+ +
+
+ +
+
+ + + + +
union { ... }
+
+
+ +
+
+ +
+
+ + + + +
union { ... }
+
+
+ +
+
+ +
+
+ + + + +
union { ... }
+
+
+ +
+
+ +
+ +
+ +

Definition at line 438 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 448 of file IQ3Shader.h.

+ +

Referenced by evaluate(), and irr::scene::quake3::getModifierFunc().

+ +
+
+ +
+ +
+ +

Definition at line 442 of file IQ3Shader.h.

+ +

Referenced by evaluate(), and irr::scene::quake3::getModifierFunc().

+ +
+
+ +
+ +
+ +

Definition at line 449 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 457 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 443 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 469 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 463 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 456 of file IQ3Shader.h.

+ +

Referenced by evaluate(), and irr::scene::quake3::getModifierFunc().

+ +
+
+ +
+ +
+ +

Definition at line 434 of file IQ3Shader.h.

+ +

Referenced by evaluate(), and irr::scene::quake3::getModifierFunc().

+ +
+
+ +
+ +
+ +

Definition at line 430 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 432 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 452 of file IQ3Shader.h.

+ +

Referenced by evaluate(), and irr::scene::quake3::getModifierFunc().

+ +
+
+ +
+ +
+ +

Definition at line 437 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 436 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 462 of file IQ3Shader.h.

+ +
+
+ +
+ +
+ +

Definition at line 466 of file IQ3Shader.h.

+ +

Referenced by evaluate().

+ +
+
+ +
+ +
+ +

Definition at line 467 of file IQ3Shader.h.

+ +

Referenced by evaluate().

+ +
+
+ +
+ +
+ +

Definition at line 468 of file IQ3Shader.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group-members.html new file mode 100644 index 0000000..73f941d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group-members.html @@ -0,0 +1,126 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::SVarGroup Member List
+
+
+This is the complete list of members for irr::scene::quake3::SVarGroup, including all inherited members. + + + + + + +
get(const c8 *name) const irr::scene::quake3::SVarGroup [inline]
isDefined(const c8 *name, const c8 *content=0) const irr::scene::quake3::SVarGroup [inline]
set(const c8 *name, const c8 *content=0)irr::scene::quake3::SVarGroup [inline]
SVarGroup()irr::scene::quake3::SVarGroup [inline]
Variableirr::scene::quake3::SVarGroup
~SVarGroup()irr::scene::quake3::SVarGroup [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group.html new file mode 100644 index 0000000..9777ecc --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group.html @@ -0,0 +1,293 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::SVarGroup Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::SVarGroup Struct Reference
+
+
+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 575 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::quake3::SVarGroup::SVarGroup () [inline]
+
+ +
+ +
+
+ + + + + + + +
virtual irr::scene::quake3::SVarGroup::~SVarGroup () [inline, virtual]
+
+
+ +

Definition at line 578 of file IQ3Shader.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
const core::stringc& irr::scene::quake3::SVarGroup::get (const c8name) const [inline]
+
+
+ +

Definition at line 596 of file IQ3Shader.h.

+ +

References irr::core::array< T, TAlloc >::linear_search(), and Variable.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
u32 irr::scene::quake3::SVarGroup::isDefined (const c8name,
const c8content = 0 
) const [inline]
+
+
+ +

Definition at line 580 of file IQ3Shader.h.

+ +

References irr::core::array< T, TAlloc >::size(), and Variable.

+ +

Referenced by set().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void irr::scene::quake3::SVarGroup::set (const c8name,
const c8content = 0 
) [inline]
+
+
+ +

Definition at line 607 of file IQ3Shader.h.

+ +

References isDefined(), irr::core::array< T, TAlloc >::push_back(), and Variable.

+ +
+
+

Member Data Documentation

+ + +
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list-members.html new file mode 100644 index 0000000..12ec4c6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list-members.html @@ -0,0 +1,130 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::SVarGroupList Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html new file mode 100644 index 0000000..bc9a0f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html @@ -0,0 +1,219 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::SVarGroupList Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::SVarGroupList Struct Reference
+
+
+ +

holding a group a variable + More...

+ +

#include <IQ3Shader.h>

+
+ + Inheritance diagram for irr::scene::quake3::SVarGroupList:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

holding a group a variable

+ +

Definition at line 625 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::scene::quake3::SVarGroupList::SVarGroupList () [inline]
+
+ +
+ +
+
+ + + + + + + +
virtual irr::scene::quake3::SVarGroupList::~SVarGroupList () [inline, virtual]
+
+
+ +

Definition at line 631 of file IQ3Shader.h.

+ +
+
+

Member Data Documentation

+ + +
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.png new file mode 100644 index 0000000..40d814c Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_var_group_list.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable-members.html new file mode 100644 index 0000000..2fe6231 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable-members.html @@ -0,0 +1,128 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::scene::quake3::SVariable Member List
+
+
+This is the complete list of members for irr::scene::quake3::SVariable, including all inherited members. + + + + + + + + +
clear()irr::scene::quake3::SVariable [inline]
contentirr::scene::quake3::SVariable
isValid() const irr::scene::quake3::SVariable [inline]
nameirr::scene::quake3::SVariable
operator<(const SVariable &other) const irr::scene::quake3::SVariable [inline]
operator==(const SVariable &other) const irr::scene::quake3::SVariable [inline]
SVariable(const c8 *n, const c8 *c=0)irr::scene::quake3::SVariable [inline]
~SVariable()irr::scene::quake3::SVariable [inline, virtual]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable.html new file mode 100644 index 0000000..6eb04d8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1scene_1_1quake3_1_1_s_variable.html @@ -0,0 +1,318 @@ + + + + +Irrlicht 3D Engine: irr::scene::quake3::SVariable Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::scene::quake3::SVariable Struct Reference
+
+
+ +

#include <IQ3Shader.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 542 of file IQ3Shader.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
irr::scene::quake3::SVariable::SVariable (const c8n,
const c8c = 0 
) [inline]
+
+
+ +

Definition at line 547 of file IQ3Shader.h.

+ +
+
+ +
+
+ + + + + + + +
virtual irr::scene::quake3::SVariable::~SVariable () [inline, virtual]
+
+
+ +

Definition at line 548 of file IQ3Shader.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
void irr::scene::quake3::SVariable::clear () [inline]
+
+
+ +

Definition at line 550 of file IQ3Shader.h.

+ +

References content, and name.

+ +
+
+ +
+
+ + + + + + + +
s32 irr::scene::quake3::SVariable::isValid () const [inline]
+
+
+ +

Definition at line 556 of file IQ3Shader.h.

+ +

References name, and irr::core::string< T, TAlloc >::size().

+ +
+
+ +
+
+ + + + + + + + +
bool irr::scene::quake3::SVariable::operator< (const SVariableother) const [inline]
+
+
+ +

Definition at line 566 of file IQ3Shader.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and name.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::scene::quake3::SVariable::operator== (const SVariableother) const [inline]
+
+
+ +

Definition at line 561 of file IQ3Shader.h.

+ +

References irr::core::string< T, TAlloc >::c_str(), and name.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 545 of file IQ3Shader.h.

+ +

Referenced by clear().

+ +
+
+ +
+ +
+ +

Definition at line 544 of file IQ3Shader.h.

+ +

Referenced by clear(), isValid(), operator<(), and operator==().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target-members.html new file mode 100644 index 0000000..f39462a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target-members.html @@ -0,0 +1,129 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::IRenderTarget Member List
+
+
+This is the complete list of members for irr::video::IRenderTarget, including all inherited members. + + + + + + + + + +
BlendFuncDstirr::video::IRenderTarget
BlendFuncSrcirr::video::IRenderTarget
BlendOpirr::video::IRenderTarget
ColorMaskirr::video::IRenderTarget
IRenderTarget(ITexture *texture, E_COLOR_PLANE colorMask=ECP_ALL, E_BLEND_FACTOR blendFuncSrc=EBF_ONE, E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA, E_BLEND_OPERATION blendOp=EBO_NONE)irr::video::IRenderTarget [inline]
IRenderTarget(E_RENDER_TARGET target, E_COLOR_PLANE colorMask=ECP_ALL, E_BLEND_FACTOR blendFuncSrc=EBF_ONE, E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA, E_BLEND_OPERATION blendOp=EBO_NONE)irr::video::IRenderTarget [inline]
operator!=(const IRenderTarget &other) const irr::video::IRenderTarget [inline]
RenderTextureirr::video::IRenderTarget
TargetTypeirr::video::IRenderTarget
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target.html new file mode 100644 index 0000000..f8daea8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_i_render_target.html @@ -0,0 +1,372 @@ + + + + +Irrlicht 3D Engine: irr::video::IRenderTarget Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::IRenderTarget Struct Reference
+
+
+ +

#include <IVideoDriver.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 211 of file IVideoDriver.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::IRenderTarget::IRenderTarget (ITexturetexture,
E_COLOR_PLANE colorMask = ECP_ALL,
E_BLEND_FACTOR blendFuncSrc = EBF_ONE,
E_BLEND_FACTOR blendFuncDst = EBF_ONE_MINUS_SRC_ALPHA,
E_BLEND_OPERATION blendOp = EBO_NONE 
) [inline]
+
+
+ +

Definition at line 213 of file IVideoDriver.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::IRenderTarget::IRenderTarget (E_RENDER_TARGET target,
E_COLOR_PLANE colorMask = ECP_ALL,
E_BLEND_FACTOR blendFuncSrc = EBF_ONE,
E_BLEND_FACTOR blendFuncDst = EBF_ONE_MINUS_SRC_ALPHA,
E_BLEND_OPERATION blendOp = EBO_NONE 
) [inline]
+
+
+ +

Definition at line 222 of file IVideoDriver.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool irr::video::IRenderTarget::operator!= (const IRenderTargetother) const [inline]
+
+
+ +

Definition at line 231 of file IVideoDriver.h.

+ +

References BlendFuncDst, BlendFuncSrc, BlendOp, ColorMask, RenderTexture, and TargetType.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 244 of file IVideoDriver.h.

+ +

Referenced by operator!=().

+ +
+
+ +
+ +
+ +

Definition at line 243 of file IVideoDriver.h.

+ +

Referenced by operator!=().

+ +
+
+ +
+ +
+ +

Definition at line 245 of file IVideoDriver.h.

+ +

Referenced by operator!=().

+ +
+
+ +
+ +
+ +

Definition at line 242 of file IVideoDriver.h.

+ +

Referenced by operator!=().

+ +
+
+ +
+ +
+ +

Definition at line 240 of file IVideoDriver.h.

+ +

Referenced by operator!=().

+ +
+
+ +
+ +
+ +

Definition at line 241 of file IVideoDriver.h.

+ +

Referenced by operator!=().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex-members.html new file mode 100644 index 0000000..4b94492 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex-members.html @@ -0,0 +1,132 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::S3DVertex Member List
+
+
+This is the complete list of members for irr::video::S3DVertex, including all inherited members. + + + + + + + + + + + + +
Colorirr::video::S3DVertex
getInterpolated(const S3DVertex &other, f32 d)irr::video::S3DVertex [inline]
getType() const irr::video::S3DVertex [inline]
Normalirr::video::S3DVertex
operator!=(const S3DVertex &other) const irr::video::S3DVertex [inline]
operator<(const S3DVertex &other) const irr::video::S3DVertex [inline]
operator==(const S3DVertex &other) const irr::video::S3DVertex [inline]
Posirr::video::S3DVertex
S3DVertex()irr::video::S3DVertex [inline]
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)irr::video::S3DVertex [inline]
S3DVertex(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)irr::video::S3DVertex [inline]
TCoordsirr::video::S3DVertex
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.html new file mode 100644 index 0000000..cf746f2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.html @@ -0,0 +1,504 @@ + + + + +Irrlicht 3D Engine: irr::video::S3DVertex Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::S3DVertex Struct Reference
+
+
+ +

standard vertex used by the Irrlicht engine. + More...

+ +

#include <S3DVertex.h>

+
+ + Inheritance diagram for irr::video::S3DVertex:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

standard vertex used by the Irrlicht engine.

+ +

Definition at line 42 of file S3DVertex.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::S3DVertex::S3DVertex () [inline]
+
+
+ +

default constructor

+ +

Definition at line 45 of file S3DVertex.h.

+ +

Referenced by getInterpolated().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex::S3DVertex (f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 48 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex::S3DVertex (const core::vector3dfpos,
const core::vector3dfnormal,
SColor color,
const core::vector2d< f32 > & tcoords 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 52 of file S3DVertex.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
S3DVertex irr::video::S3DVertex::getInterpolated (const S3DVertexother,
f32 d 
) [inline]
+
+ +
+ +
+
+ + + + + + + +
E_VERTEX_TYPE irr::video::S3DVertex::getType () const [inline]
+
+
+ +

Reimplemented in irr::video::S3DVertexTangents, and irr::video::S3DVertex2TCoords.

+ +

Definition at line 88 of file S3DVertex.h.

+ +

References irr::video::EVT_STANDARD.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertex::operator!= (const S3DVertexother) const [inline]
+
+
+ +

Definition at line 74 of file S3DVertex.h.

+ +

References Color, Normal, Pos, and TCoords.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertex::operator< (const S3DVertexother) const [inline]
+
+
+ +

Definition at line 80 of file S3DVertex.h.

+ +

References Color, Normal, Pos, and TCoords.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertex::operator== (const S3DVertexother) const [inline]
+
+
+ +

Definition at line 68 of file S3DVertex.h.

+ +

References Color, Normal, Pos, and TCoords.

+ +
+
+

Member Data Documentation

+ + + + + + + + +
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.png new file mode 100644 index 0000000..5a06708 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords-members.html new file mode 100644 index 0000000..a35a5c3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords-members.html @@ -0,0 +1,145 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::S3DVertex2TCoords Member List
+
+
+This is the complete list of members for irr::video::S3DVertex2TCoords, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + +
Colorirr::video::S3DVertex
getInterpolated(const S3DVertex2TCoords &other, f32 d)irr::video::S3DVertex2TCoords [inline]
irr::video::S3DVertex::getInterpolated(const S3DVertex &other, f32 d)irr::video::S3DVertex [inline]
getType() const irr::video::S3DVertex2TCoords [inline]
Normalirr::video::S3DVertex
operator!=(const S3DVertex2TCoords &other) const irr::video::S3DVertex2TCoords [inline]
irr::video::S3DVertex::operator!=(const S3DVertex &other) const irr::video::S3DVertex [inline]
operator<(const S3DVertex2TCoords &other) const irr::video::S3DVertex2TCoords [inline]
irr::video::S3DVertex::operator<(const S3DVertex &other) const irr::video::S3DVertex [inline]
operator==(const S3DVertex2TCoords &other) const irr::video::S3DVertex2TCoords [inline]
irr::video::S3DVertex::operator==(const S3DVertex &other) const irr::video::S3DVertex [inline]
Posirr::video::S3DVertex
S3DVertex()irr::video::S3DVertex [inline]
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)irr::video::S3DVertex [inline]
S3DVertex(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)irr::video::S3DVertex [inline]
S3DVertex2TCoords()irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(const core::vector3df &pos, SColor color, const core::vector2d< f32 > &tcoords, const core::vector2d< f32 > &tcoords2)irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, const SColor &color, const core::vector2d< f32 > &tcoords, const core::vector2d< f32 > &tcoords2)irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)irr::video::S3DVertex2TCoords [inline]
S3DVertex2TCoords(S3DVertex &o)irr::video::S3DVertex2TCoords [inline]
TCoordsirr::video::S3DVertex
TCoords2irr::video::S3DVertex2TCoords
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.html new file mode 100644 index 0000000..dc792b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.html @@ -0,0 +1,718 @@ + + + + +Irrlicht 3D Engine: irr::video::S3DVertex2TCoords Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::S3DVertex2TCoords Struct Reference
+
+
+ +

Vertex with two texture coordinates. + More...

+ +

#include <S3DVertex.h>

+
+ + Inheritance diagram for irr::video::S3DVertex2TCoords:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Vertex with two texture coordinates.

+

Usually used for geometry with lightmaps or other special materials.

+ +

Definition at line 108 of file S3DVertex.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords () [inline]
+
+
+ +

default constructor

+ +

Definition at line 111 of file S3DVertex.h.

+ +

Referenced by getInterpolated().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (f32 x,
f32 y,
f32 z,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2 
) [inline]
+
+
+ +

constructor with two different texture coords, but no normal

+ +

Definition at line 114 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (const core::vector3dfpos,
SColor color,
const core::vector2d< f32 > & tcoords,
const core::vector2d< f32 > & tcoords2 
) [inline]
+
+
+ +

constructor with two different texture coords, but no normal

+ +

Definition at line 118 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (const core::vector3dfpos,
const core::vector3dfnormal,
const SColorcolor,
const core::vector2d< f32 > & tcoords,
const core::vector2d< f32 > & tcoords2 
) [inline]
+
+
+ +

constructor with all values

+ +

Definition at line 123 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2 
) [inline]
+
+
+ +

constructor with all values

+ +

Definition at line 128 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv 
) [inline]
+
+
+ +

constructor with the same texture coords and normal

+ +

Definition at line 132 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (const core::vector3dfpos,
const core::vector3dfnormal,
SColor color,
const core::vector2d< f32 > & tcoords 
) [inline]
+
+
+ +

constructor with the same texture coords and normal

+ +

Definition at line 136 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + +
irr::video::S3DVertex2TCoords::S3DVertex2TCoords (S3DVertexo) [inline]
+
+
+ +

constructor from S3DVertex

+ +

Definition at line 141 of file S3DVertex.h.

+ +
+
+

Member Function Documentation

+ + + +
+
+ + + + + + + +
E_VERTEX_TYPE irr::video::S3DVertex2TCoords::getType () const [inline]
+
+
+ +

Reimplemented from irr::video::S3DVertex.

+ +

Definition at line 166 of file S3DVertex.h.

+ +

References irr::video::EVT_2TCOORDS.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertex2TCoords::operator!= (const S3DVertex2TCoordsother) const [inline]
+
+
+ +

Inequality operator.

+ +

Definition at line 154 of file S3DVertex.h.

+ +

References TCoords2.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertex2TCoords::operator< (const S3DVertex2TCoordsother) const [inline]
+
+
+ +

Definition at line 160 of file S3DVertex.h.

+ +

References TCoords2.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertex2TCoords::operator== (const S3DVertex2TCoordsother) const [inline]
+
+
+ +

Equality operator.

+ +

Definition at line 147 of file S3DVertex.h.

+ +

References TCoords2.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Second set of texture coordinates.

+ +

Definition at line 144 of file S3DVertex.h.

+ +

Referenced by getInterpolated(), operator!=(), irr::scene::SVertexTCoordsScaleManipulator::operator()(), operator<(), and operator==().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.png new file mode 100644 index 0000000..8ed72f6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex2_t_coords.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents-members.html new file mode 100644 index 0000000..a3ef443 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents-members.html @@ -0,0 +1,142 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::S3DVertexTangents Member List
+
+
+This is the complete list of members for irr::video::S3DVertexTangents, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + +
Binormalirr::video::S3DVertexTangents
Colorirr::video::S3DVertex
getInterpolated(const S3DVertexTangents &other, f32 d)irr::video::S3DVertexTangents [inline]
irr::video::S3DVertex::getInterpolated(const S3DVertex &other, f32 d)irr::video::S3DVertex [inline]
getType() const irr::video::S3DVertexTangents [inline]
Normalirr::video::S3DVertex
operator!=(const S3DVertexTangents &other) const irr::video::S3DVertexTangents [inline]
irr::video::S3DVertex::operator!=(const S3DVertex &other) const irr::video::S3DVertex [inline]
operator<(const S3DVertexTangents &other) const irr::video::S3DVertexTangents [inline]
irr::video::S3DVertex::operator<(const S3DVertex &other) const irr::video::S3DVertex [inline]
operator==(const S3DVertexTangents &other) const irr::video::S3DVertexTangents [inline]
irr::video::S3DVertex::operator==(const S3DVertex &other) const irr::video::S3DVertex [inline]
Posirr::video::S3DVertex
S3DVertex()irr::video::S3DVertex [inline]
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)irr::video::S3DVertex [inline]
S3DVertex(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)irr::video::S3DVertex [inline]
S3DVertexTangents()irr::video::S3DVertexTangents [inline]
S3DVertexTangents(f32 x, f32 y, f32 z, f32 nx=0.0f, f32 ny=0.0f, f32 nz=0.0f, SColor c=0xFFFFFFFF, f32 tu=0.0f, f32 tv=0.0f, f32 tanx=0.0f, f32 tany=0.0f, f32 tanz=0.0f, f32 bx=0.0f, f32 by=0.0f, f32 bz=0.0f)irr::video::S3DVertexTangents [inline]
S3DVertexTangents(const core::vector3df &pos, SColor c, const core::vector2df &tcoords)irr::video::S3DVertexTangents [inline]
S3DVertexTangents(const core::vector3df &pos, const core::vector3df &normal, SColor c, const core::vector2df &tcoords, const core::vector3df &tangent=core::vector3df(), const core::vector3df &binormal=core::vector3df())irr::video::S3DVertexTangents [inline]
Tangentirr::video::S3DVertexTangents
TCoordsirr::video::S3DVertex
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.html new file mode 100644 index 0000000..a8f7f3d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.html @@ -0,0 +1,550 @@ + + + + +Irrlicht 3D Engine: irr::video::S3DVertexTangents Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::S3DVertexTangents Struct Reference
+
+
+ +

Vertex with a tangent and binormal vector. + More...

+ +

#include <S3DVertex.h>

+
+ + Inheritance diagram for irr::video::S3DVertexTangents:
+
+
+ + +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

Vertex with a tangent and binormal vector.

+

Usually used for tangent space normal mapping.

+ +

Definition at line 185 of file S3DVertex.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::S3DVertexTangents::S3DVertexTangents () [inline]
+
+
+ +

default constructor

+ +

Definition at line 188 of file S3DVertex.h.

+ +

Referenced by getInterpolated().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertexTangents::S3DVertexTangents (f32 x,
f32 y,
f32 z,
f32 nx = 0.0f,
f32 ny = 0.0f,
f32 nz = 0.0f,
SColor c = 0xFFFFFFFF,
f32 tu = 0.0f,
f32 tv = 0.0f,
f32 tanx = 0.0f,
f32 tany = 0.0f,
f32 tanz = 0.0f,
f32 bx = 0.0f,
f32 by = 0.0f,
f32 bz = 0.0f 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 191 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertexTangents::S3DVertexTangents (const core::vector3dfpos,
SColor c,
const core::vector2dftcoords 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 198 of file S3DVertex.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
irr::video::S3DVertexTangents::S3DVertexTangents (const core::vector3dfpos,
const core::vector3dfnormal,
SColor c,
const core::vector2dftcoords,
const core::vector3dftangent = core::vector3df(),
const core::vector3dfbinormal = core::vector3df() 
) [inline]
+
+
+ +

constructor

+ +

Definition at line 203 of file S3DVertex.h.

+ +
+
+

Member Function Documentation

+ + + +
+
+ + + + + + + +
E_VERTEX_TYPE irr::video::S3DVertexTangents::getType () const [inline]
+
+
+ +

Reimplemented from irr::video::S3DVertex.

+ +

Definition at line 237 of file S3DVertex.h.

+ +

References irr::video::EVT_TANGENTS.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertexTangents::operator!= (const S3DVertexTangentsother) const [inline]
+
+
+ +

Definition at line 223 of file S3DVertex.h.

+ +

References Binormal, and Tangent.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertexTangents::operator< (const S3DVertexTangentsother) const [inline]
+
+
+ +

Definition at line 230 of file S3DVertex.h.

+ +

References Binormal, and Tangent.

+ +
+
+ +
+
+ + + + + + + + +
bool irr::video::S3DVertexTangents::operator== (const S3DVertexTangentsother) const [inline]
+
+
+ +

Definition at line 216 of file S3DVertex.h.

+ +

References Binormal, and Tangent.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Binormal vector (tangent x normal)

+ +

Definition at line 214 of file S3DVertex.h.

+ +

Referenced by getInterpolated(), operator!=(), operator<(), and operator==().

+ +
+
+ +
+ +
+ +

Tangent vector along the x-axis of the texture.

+ +

Definition at line 211 of file S3DVertex.h.

+ +

Referenced by getInterpolated(), operator!=(), operator<(), and operator==().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.png b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.png new file mode 100644 index 0000000..da98d18 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s3_d_vertex_tangents.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data-members.html new file mode 100644 index 0000000..cfaeb07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data-members.html @@ -0,0 +1,136 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data.html new file mode 100644 index 0000000..03e6e3a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_exposed_video_data.html @@ -0,0 +1,461 @@ + + + + +Irrlicht 3D Engine: irr::video::SExposedVideoData Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SExposedVideoData Struct Reference
+
+
+ +

structure for holding data describing a driver and operating system specific data. + More...

+ +

#include <SExposedVideoData.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+
    +
  • union { +
      +
    •    struct { +
        +
      •       IDirect3D8 *    D3D8 +
        Pointer to the IDirect3D8 interface.
      •       IDirect3DDevice8 *    D3DDev8 +
        Pointer to the IDirect3DDevice8 interface.
      •       void *    HWnd +
        Window handle.
      +
    •    }    D3D8 +
    •    struct { +
        +
      •       IDirect3D9 *    D3D9 +
        Pointer to the IDirect3D9 interface.
      •       IDirect3DDevice9 *    D3DDev9 +
        Pointer to the IDirect3DDevice9 interface.
      •       void *    HWnd +
        Window handle.
      +
    •    }    D3D9 +
    •    struct { + +
    •    }    OpenGLLinux +
    •    struct { +
        +
      •       void *    HDc +
        Private GDI Device Context.
      •       void *    HRc +
        Permanent Rendering Context.
      •       void *    HWnd +
        Window handle.
      +
    •    }    OpenGLWin32 +
    +
  • }; +
+

Detailed Description

+

structure for holding data describing a driver and operating system specific data.

+

This data can be retrived by IVideoDriver::getExposedVideoData(). Use this with caution. This only should be used to make it possible to extend the engine easily without modification of its source. Note that this structure does not contain any valid data, if you are using the software or the null device.

+ +

Definition at line 25 of file SExposedVideoData.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SExposedVideoData::SExposedVideoData () [inline]
+
+
+ +

Definition at line 27 of file SExposedVideoData.h.

+ +

References OpenGLWin32.

+ +
+
+ +
+
+ + + + + + + + +
irr::video::SExposedVideoData::SExposedVideoData (void * Window) [inline, explicit]
+
+
+ +

Definition at line 28 of file SExposedVideoData.h.

+ +

References OpenGLWin32.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
union { ... }
+
+
+ +
+
+ +
+
+ + + + +
IDirect3D8* irr::video::SExposedVideoData::D3D8
+
+
+ +

Pointer to the IDirect3D8 interface.

+ +

Definition at line 49 of file SExposedVideoData.h.

+ +
+
+ +
+
+ + + + +
struct { ... } irr::video::SExposedVideoData::D3D8
+
+
+ +
+
+ +
+
+ + + + +
IDirect3D9* irr::video::SExposedVideoData::D3D9
+
+
+ +

Pointer to the IDirect3D9 interface.

+ +

Definition at line 35 of file SExposedVideoData.h.

+ +
+
+ +
+
+ + + + +
struct { ... } irr::video::SExposedVideoData::D3D9
+
+
+ +
+
+ +
+
+ + + + +
IDirect3DDevice8* irr::video::SExposedVideoData::D3DDev8
+
+
+ +

Pointer to the IDirect3DDevice8 interface.

+ +

Definition at line 52 of file SExposedVideoData.h.

+ +
+
+ +
+
+ + + + +
IDirect3DDevice9* irr::video::SExposedVideoData::D3DDev9
+
+
+ +

Pointer to the IDirect3DDevice9 interface.

+ +

Definition at line 38 of file SExposedVideoData.h.

+ +
+
+ +
+ +
+ +

Private GDI Device Context.

+

Get if for example with: HDC h = reinterpret_cast<HDC>(exposedData.OpenGLWin32.HDc)

+ +

Definition at line 64 of file SExposedVideoData.h.

+ +
+
+ +
+ +
+ +

Permanent Rendering Context.

+

Get if for example with: HGLRC h = reinterpret_cast<HGLRC>(exposedData.OpenGLWin32.HRc)

+ +

Definition at line 68 of file SExposedVideoData.h.

+ +
+
+ +
+ +
+ +

Window handle.

+

Get with for example HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd)

+

Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.D3D8.HWnd)

+

Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd)

+ +

Definition at line 42 of file SExposedVideoData.h.

+ +
+
+ +
+
+ + + + +
struct { ... } irr::video::SExposedVideoData::OpenGLLinux
+
+
+ +
+
+ +
+
+ + + + +
struct { ... } irr::video::SExposedVideoData::OpenGLWin32
+
+
+ +

Referenced by SExposedVideoData().

+ +
+
+ +
+ +
+ +

Definition at line 79 of file SExposedVideoData.h.

+ +
+
+ +
+ +
+ +

Definition at line 78 of file SExposedVideoData.h.

+ +
+
+ +
+
+ + + + +
unsigned long irr::video::SExposedVideoData::X11Window
+
+
+ +

Definition at line 80 of file SExposedVideoData.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light-members.html new file mode 100644 index 0000000..9764648 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light-members.html @@ -0,0 +1,133 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light.html new file mode 100644 index 0000000..e61164a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_light.html @@ -0,0 +1,390 @@ + + + + +Irrlicht 3D Engine: irr::video::SLight Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SLight Struct Reference
+
+
+ +

structure for holding data describing a dynamic point light. + More...

+ +

#include <SLight.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+

structure for holding data describing a dynamic point light.

+

Irrlicht supports point lights, spot lights, and directional lights.

+ +

Definition at line 41 of file SLight.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SLight::SLight () [inline]
+
+
+ +

Definition at line 43 of file SLight.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Ambient color emitted by the light.

+ +

Definition at line 51 of file SLight.h.

+ +
+
+ +
+ +
+ +

Attenuation factors (constant, linear, quadratic)

+

Changes the light strength fading over distance. Can also be altered by setting the radius, Attenuation will change to (0,1.f/radius,0). Can be overridden after radius was set.

+ +

Definition at line 65 of file SLight.h.

+ +
+
+ +
+ +
+ +

Read-ONLY! Does the light cast shadows?

+ +

Definition at line 91 of file SLight.h.

+ +
+
+ +
+ +
+ +

Diffuse color emitted by the light.

+

This is the primary color you want to set.

+ +

Definition at line 55 of file SLight.h.

+ +
+
+ +
+ +
+ +

Read-ONLY! Direction of the light.

+

If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation.

+ +

Definition at line 82 of file SLight.h.

+ +
+
+ +
+ +
+ +

The light strength's decrease between Outer and Inner cone.

+ +

Definition at line 74 of file SLight.h.

+ +
+
+ +
+ +
+ +

The angle of the spot's inner cone. Ignored for other lights.

+ +

Definition at line 71 of file SLight.h.

+ +
+
+ +
+ +
+ +

The angle of the spot's outer cone. Ignored for other lights.

+ +

Definition at line 68 of file SLight.h.

+ +
+
+ +
+ +
+ +

Read-ONLY! Position of the light.

+

If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position.

+ +

Definition at line 78 of file SLight.h.

+ +
+
+ +
+ +
+ +

Read-ONLY! Radius of light. Everything within this radius will be lighted.

+ +

Definition at line 85 of file SLight.h.

+ +
+
+ +
+ +
+ +

Specular color emitted by the light.

+

For details how to use specular highlights, see SMaterial::Shininess

+ +

Definition at line 59 of file SLight.h.

+ +
+
+ +
+ +
+ +

Read-ONLY! Type of the light. Default: ELT_POINT.

+ +

Definition at line 88 of file SLight.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material-members.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material-members.html new file mode 100644 index 0000000..eb259db --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material-members.html @@ -0,0 +1,126 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::video::SOverrideMaterial Member List
+
+ +
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material.html b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material.html new file mode 100644 index 0000000..1cf0a1f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/structirr_1_1video_1_1_s_override_material.html @@ -0,0 +1,272 @@ + + + + +Irrlicht 3D Engine: irr::video::SOverrideMaterial Struct Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::video::SOverrideMaterial Struct Reference
+
+
+ +

#include <IVideoDriver.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 148 of file IVideoDriver.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
irr::video::SOverrideMaterial::SOverrideMaterial () [inline]
+
+
+ +

Default constructor.

+ +

Definition at line 164 of file IVideoDriver.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void irr::video::SOverrideMaterial::apply (SMaterialmaterial) [inline]
+
+
+ +

Apply the enabled overrides.

+ +

Definition at line 167 of file IVideoDriver.h.

+ +

References irr::video::SMaterialLayer::AnisotropicFilter, irr::video::SMaterial::AntiAliasing, irr::video::SMaterial::BackfaceCulling, irr::video::SMaterialLayer::BilinearFilter, irr::video::SMaterial::BlendOperation, irr::video::SMaterial::ColorMask, irr::video::SMaterial::ColorMaterial, irr::video::EMF_ANISOTROPIC_FILTER, irr::video::EMF_ANTI_ALIASING, irr::video::EMF_BACK_FACE_CULLING, irr::video::EMF_BILINEAR_FILTER, irr::video::EMF_BLEND_OPERATION, irr::video::EMF_COLOR_MASK, irr::video::EMF_COLOR_MATERIAL, irr::video::EMF_FOG_ENABLE, irr::video::EMF_FRONT_FACE_CULLING, irr::video::EMF_GOURAUD_SHADING, irr::video::EMF_LIGHTING, irr::video::EMF_NORMALIZE_NORMALS, irr::video::EMF_POINTCLOUD, irr::video::EMF_POLYGON_OFFSET, irr::video::EMF_TEXTURE_WRAP, irr::video::EMF_TRILINEAR_FILTER, irr::video::EMF_USE_MIP_MAPS, irr::video::EMF_WIREFRAME, irr::video::EMF_ZBUFFER, irr::video::EMF_ZWRITE_ENABLE, Enabled, EnableFlags, irr::video::SMaterial::FogEnable, irr::video::SMaterial::FrontfaceCulling, irr::video::SMaterial::GouraudShading, irr::video::SMaterial::Lighting, Material, irr::video::SMaterial::NormalizeNormals, irr::video::SMaterial::PointCloud, irr::video::SMaterial::PolygonOffsetDirection, irr::video::SMaterial::PolygonOffsetFactor, irr::video::SMaterial::TextureLayer, irr::video::SMaterialLayer::TextureWrapU, irr::video::SMaterialLayer::TextureWrapV, irr::video::SMaterialLayer::TrilinearFilter, irr::video::SMaterial::UseMipMaps, irr::video::SMaterial::Wireframe, irr::video::SMaterial::ZBuffer, and irr::video::SMaterial::ZWriteEnable.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Global enable flag, overwritten by the SceneManager in each pass.

+

The Scenemanager uses the EnablePass array and sets Enabled to true if the Override material is enabled in the current pass.

+ +

Definition at line 161 of file IVideoDriver.h.

+ +

Referenced by apply().

+ +
+
+ +
+ +
+ +

Which values are taken for override.

+

OR'ed values from E_MATERIAL_FLAGS.

+ +

Definition at line 154 of file IVideoDriver.h.

+ +

Referenced by apply().

+ +
+
+ +
+ +
+ +

Set in which render passes the material override is active.

+

OR'ed values from E_SCENE_NODE_RENDER_PASS.

+ +

Definition at line 157 of file IVideoDriver.h.

+ +
+
+ +
+ +
+ +

The Material values.

+ +

Definition at line 151 of file IVideoDriver.h.

+ +

Referenced by apply().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/tab_a.png b/src/others/irrlicht-1.8.1/doc/html/tab_a.png new file mode 100644 index 0000000..f4ed045 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/tab_a.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/tab_b.png b/src/others/irrlicht-1.8.1/doc/html/tab_b.png new file mode 100644 index 0000000..4c7f480 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/tab_b.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/tab_h.png b/src/others/irrlicht-1.8.1/doc/html/tab_h.png new file mode 100644 index 0000000..39cf875 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/tab_h.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/tab_s.png b/src/others/irrlicht-1.8.1/doc/html/tab_s.png new file mode 100644 index 0000000..466e154 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/tab_s.png differ diff --git a/src/others/irrlicht-1.8.1/doc/html/tabs.css b/src/others/irrlicht-1.8.1/doc/html/tabs.css new file mode 100644 index 0000000..1a8f11a --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/tabs.css @@ -0,0 +1,59 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #282B5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/src/others/irrlicht-1.8.1/doc/html/triangle3d_8h.html b/src/others/irrlicht-1.8.1/doc/html/triangle3d_8h.html new file mode 100644 index 0000000..930cd5d --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/triangle3d_8h.html @@ -0,0 +1,149 @@ + + + + +Irrlicht 3D Engine: triangle3d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
triangle3d.h File Reference
+
+
+
#include "vector3d.h"
+#include "line3d.h"
+#include "plane3d.h"
+#include "aabbox3d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/triangle3d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/triangle3d_8h_source.html new file mode 100644 index 0000000..1cca3cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/triangle3d_8h_source.html @@ -0,0 +1,353 @@ + + + + +Irrlicht 3D Engine: triangle3d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
triangle3d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_TRIANGLE_3D_H_INCLUDED__
+00006 #define __IRR_TRIANGLE_3D_H_INCLUDED__
+00007 
+00008 #include "vector3d.h"
+00009 #include "line3d.h"
+00010 #include "plane3d.h"
+00011 #include "aabbox3d.h"
+00012 
+00013 namespace irr
+00014 {
+00015 namespace core
+00016 {
+00017 
+00019     template <class T>
+00020     class triangle3d
+00021     {
+00022     public:
+00023 
+00025         triangle3d() {}
+00027         triangle3d(vector3d<T> v1, vector3d<T> v2, vector3d<T> v3) : pointA(v1), pointB(v2), pointC(v3) {}
+00028 
+00030         bool operator==(const triangle3d<T>& other) const
+00031         {
+00032             return other.pointA==pointA && other.pointB==pointB && other.pointC==pointC;
+00033         }
+00034 
+00036         bool operator!=(const triangle3d<T>& other) const
+00037         {
+00038             return !(*this==other);
+00039         }
+00040 
+00042 
+00044         bool isTotalInsideBox(const aabbox3d<T>& box) const
+00045         {
+00046             return (box.isPointInside(pointA) &&
+00047                 box.isPointInside(pointB) &&
+00048                 box.isPointInside(pointC));
+00049         }
+00050 
+00052 
+00054         bool isTotalOutsideBox(const aabbox3d<T>& box) const
+00055         {
+00056             return ((pointA.X > box.MaxEdge.X && pointB.X > box.MaxEdge.X && pointC.X > box.MaxEdge.X) ||
+00057 
+00058                 (pointA.Y > box.MaxEdge.Y && pointB.Y > box.MaxEdge.Y && pointC.Y > box.MaxEdge.Y) ||
+00059                 (pointA.Z > box.MaxEdge.Z && pointB.Z > box.MaxEdge.Z && pointC.Z > box.MaxEdge.Z) ||
+00060                 (pointA.X < box.MinEdge.X && pointB.X < box.MinEdge.X && pointC.X < box.MinEdge.X) ||
+00061                 (pointA.Y < box.MinEdge.Y && pointB.Y < box.MinEdge.Y && pointC.Y < box.MinEdge.Y) ||
+00062                 (pointA.Z < box.MinEdge.Z && pointB.Z < box.MinEdge.Z && pointC.Z < box.MinEdge.Z));
+00063         }
+00064 
+00066 
+00068         core::vector3d<T> closestPointOnTriangle(const core::vector3d<T>& p) const
+00069         {
+00070             const core::vector3d<T> rab = line3d<T>(pointA, pointB).getClosestPoint(p);
+00071             const core::vector3d<T> rbc = line3d<T>(pointB, pointC).getClosestPoint(p);
+00072             const core::vector3d<T> rca = line3d<T>(pointC, pointA).getClosestPoint(p);
+00073 
+00074             const T d1 = rab.getDistanceFrom(p);
+00075             const T d2 = rbc.getDistanceFrom(p);
+00076             const T d3 = rca.getDistanceFrom(p);
+00077 
+00078             if (d1 < d2)
+00079                 return d1 < d3 ? rab : rca;
+00080 
+00081             return d2 < d3 ? rbc : rca;
+00082         }
+00083 
+00085         /*
+00086         \param p Point to test. Assumes that this point is already
+00087         on the plane of the triangle.
+00088         \return True if the point is inside the triangle, otherwise false. */
+00089         bool isPointInside(const vector3d<T>& p) const
+00090         {
+00091             vector3d<f64> af64((f64)pointA.X, (f64)pointA.Y, (f64)pointA.Z);
+00092             vector3d<f64> bf64((f64)pointB.X, (f64)pointB.Y, (f64)pointB.Z);
+00093             vector3d<f64> cf64((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z);
+00094             vector3d<f64> pf64((f64)p.X, (f64)p.Y, (f64)p.Z);
+00095             return (isOnSameSide(pf64, af64, bf64, cf64) &&
+00096                 isOnSameSide(pf64, bf64, af64, cf64) &&
+00097                 isOnSameSide(pf64, cf64, af64, bf64));
+00098         }
+00099 
+00101 
+00108         bool isPointInsideFast(const vector3d<T>& p) const
+00109         {
+00110             const vector3d<T> a = pointC - pointA;
+00111             const vector3d<T> b = pointB - pointA;
+00112             const vector3d<T> c = p - pointA;
+00113 
+00114             const f64 dotAA = a.dotProduct( a);
+00115             const f64 dotAB = a.dotProduct( b);
+00116             const f64 dotAC = a.dotProduct( c);
+00117             const f64 dotBB = b.dotProduct( b);
+00118             const f64 dotBC = b.dotProduct( c);
+00119 
+00120             // get coordinates in barycentric coordinate system
+00121             const f64 invDenom =  1/(dotAA * dotBB - dotAB * dotAB);
+00122             const f64 u = (dotBB * dotAC - dotAB * dotBC) * invDenom;
+00123             const f64 v = (dotAA * dotBC - dotAB * dotAC ) * invDenom;
+00124 
+00125             // We count border-points as inside to keep downward compatibility.
+00126             // Rounding-error also needed for some test-cases.
+00127             return (u > -ROUNDING_ERROR_f32) && (v >= 0) && (u + v < 1+ROUNDING_ERROR_f32);
+00128 
+00129         }
+00130 
+00131 
+00133 
+00136         bool getIntersectionWithLimitedLine(const line3d<T>& line,
+00137             vector3d<T>& outIntersection) const
+00138         {
+00139             return getIntersectionWithLine(line.start,
+00140                 line.getVector(), outIntersection) &&
+00141                 outIntersection.isBetweenPoints(line.start, line.end);
+00142         }
+00143 
+00144 
+00146 
+00154         bool getIntersectionWithLine(const vector3d<T>& linePoint,
+00155             const vector3d<T>& lineVect, vector3d<T>& outIntersection) const
+00156         {
+00157             if (getIntersectionOfPlaneWithLine(linePoint, lineVect, outIntersection))
+00158                 return isPointInside(outIntersection);
+00159 
+00160             return false;
+00161         }
+00162 
+00163 
+00165 
+00169         bool getIntersectionOfPlaneWithLine(const vector3d<T>& linePoint,
+00170             const vector3d<T>& lineVect, vector3d<T>& outIntersection) const
+00171         {
+00172             // Work with f64 to get more precise results (makes enough difference to be worth the casts).
+00173             const vector3d<f64> linePointf64(linePoint.X, linePoint.Y, linePoint.Z);
+00174             const vector3d<f64> lineVectf64(lineVect.X, lineVect.Y, lineVect.Z);
+00175             vector3d<f64> outIntersectionf64;
+00176 
+00177             core::triangle3d<irr::f64> trianglef64(vector3d<f64>((f64)pointA.X, (f64)pointA.Y, (f64)pointA.Z)
+00178                                         ,vector3d<f64>((f64)pointB.X, (f64)pointB.Y, (f64)pointB.Z)
+00179                                         , vector3d<f64>((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z));
+00180             const vector3d<irr::f64> normalf64 = trianglef64.getNormal().normalize();
+00181             f64 t2;
+00182 
+00183             if ( core::iszero ( t2 = normalf64.dotProduct(lineVectf64) ) )
+00184                 return false;
+00185 
+00186             f64 d = trianglef64.pointA.dotProduct(normalf64);
+00187             f64 t = -(normalf64.dotProduct(linePointf64) - d) / t2;
+00188             outIntersectionf64 = linePointf64 + (lineVectf64 * t);
+00189 
+00190             outIntersection.X = (T)outIntersectionf64.X;
+00191             outIntersection.Y = (T)outIntersectionf64.Y;
+00192             outIntersection.Z = (T)outIntersectionf64.Z;
+00193             return true;
+00194         }
+00195 
+00196 
+00198 
+00199         vector3d<T> getNormal() const
+00200         {
+00201             return (pointB - pointA).crossProduct(pointC - pointA);
+00202         }
+00203 
+00205 
+00210         bool isFrontFacing(const vector3d<T>& lookDirection) const
+00211         {
+00212             const vector3d<T> n = getNormal().normalize();
+00213             const f32 d = (f32)n.dotProduct(lookDirection);
+00214             return F32_LOWER_EQUAL_0(d);
+00215         }
+00216 
+00218         plane3d<T> getPlane() const
+00219         {
+00220             return plane3d<T>(pointA, pointB, pointC);
+00221         }
+00222 
+00224         T getArea() const
+00225         {
+00226             return (pointB - pointA).crossProduct(pointC - pointA).getLength() * 0.5f;
+00227 
+00228         }
+00229 
+00231         void set(const core::vector3d<T>& a, const core::vector3d<T>& b, const core::vector3d<T>& c)
+00232         {
+00233             pointA = a;
+00234             pointB = b;
+00235             pointC = c;
+00236         }
+00237 
+00239         vector3d<T> pointA;
+00240         vector3d<T> pointB;
+00241         vector3d<T> pointC;
+00242 
+00243     private:
+00244         // Using f64 instead of <T> to avoid integer overflows when T=int (maybe also less floating point troubles).
+00245         bool isOnSameSide(const vector3d<f64>& p1, const vector3d<f64>& p2,
+00246             const vector3d<f64>& a, const vector3d<f64>& b) const
+00247         {
+00248             vector3d<f64> bminusa = b - a;
+00249             vector3d<f64> cp1 = bminusa.crossProduct(p1 - a);
+00250             vector3d<f64> cp2 = bminusa.crossProduct(p2 - a);
+00251             f64 res = cp1.dotProduct(cp2);
+00252             if ( res < 0 )
+00253             {
+00254                 // This catches some floating point troubles.
+00255                 // Unfortunately slightly expensive and we don't really know the best epsilon for iszero.
+00256                 vector3d<f64> cp1 = bminusa.normalize().crossProduct((p1 - a).normalize());
+00257                 if (    core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32)
+00258                     &&  core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32)
+00259                     &&  core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) )
+00260                 {
+00261                     res = 0.f;
+00262                 }
+00263             }
+00264             return (res >= 0.0f);
+00265         }
+00266     };
+00267 
+00268 
+00270     typedef triangle3d<f32> triangle3df;
+00271 
+00273     typedef triangle3d<s32> triangle3di;
+00274 
+00275 } // end namespace core
+00276 } // end namespace irr
+00277 
+00278 #endif
+00279 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/tut_8txt.html b/src/others/irrlicht-1.8.1/doc/html/tut_8txt.html new file mode 100644 index 0000000..ef52260 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/tut_8txt.html @@ -0,0 +1,120 @@ + + + + +Irrlicht 3D Engine: tut.txt File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
tut.txt File Reference
+
+
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32-members.html b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32-members.html new file mode 100644 index 0000000..a9ac819 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32-members.html @@ -0,0 +1,124 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::FloatIntUnion32 Member List
+
+
+This is the complete list of members for irr::core::FloatIntUnion32, including all inherited members. + + + + +
firr::core::FloatIntUnion32
FloatIntUnion32(float f1=0.0f)irr::core::FloatIntUnion32 [inline]
iirr::core::FloatIntUnion32
sign() const irr::core::FloatIntUnion32 [inline]
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32.html b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32.html new file mode 100644 index 0000000..59b0aea --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1_float_int_union32.html @@ -0,0 +1,223 @@ + + + + +Irrlicht 3D Engine: irr::core::FloatIntUnion32 Union Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::FloatIntUnion32 Union Reference
+
+
+ +

#include <irrMath.h>

+ +

List of all members.

+

+Public Member Functions

+ +

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 196 of file irrMath.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
irr::core::FloatIntUnion32::FloatIntUnion32 (float f1 = 0.0f) [inline]
+
+
+ +

Definition at line 198 of file irrMath.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool irr::core::FloatIntUnion32::sign () const [inline]
+
+
+ +

Definition at line 200 of file irrMath.h.

+ +

References i.

+ +

Referenced by irr::core::equalsByUlp().

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 203 of file irrMath.h.

+ +
+
+ +
+ +
+ +

Definition at line 202 of file irrMath.h.

+ +

Referenced by irr::core::equalsByUlp(), and sign().

+ +
+
+
The documentation for this union was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat-members.html b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat-members.html new file mode 100644 index 0000000..bc15731 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat-members.html @@ -0,0 +1,123 @@ + + + + +Irrlicht 3D Engine: Member List + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
irr::core::inttofloat Member List
+
+
+This is the complete list of members for irr::core::inttofloat, including all inherited members. + + + +
firr::core::inttofloat
sirr::core::inttofloat
uirr::core::inttofloat
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat.html b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat.html new file mode 100644 index 0000000..87428a4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/unionirr_1_1core_1_1inttofloat.html @@ -0,0 +1,193 @@ + + + + +Irrlicht 3D Engine: irr::core::inttofloat Union Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
irr::core::inttofloat Union Reference
+
+
+ +

#include <irrMath.h>

+ +

List of all members.

+

+Public Attributes

+ +

Detailed Description

+
+

Definition at line 337 of file irrMath.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 337 of file irrMath.h.

+ +

Referenced by irr::core::FR(), and irr::core::IR().

+ +
+
+ +
+ +
+ +

Definition at line 337 of file irrMath.h.

+ +

Referenced by irr::core::FR().

+ +
+
+ +
+ +
+ +

Definition at line 337 of file irrMath.h.

+ +

Referenced by irr::core::FR(), and irr::core::IR().

+ +
+
+
The documentation for this union was generated from the following file: +
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/vc6include.jpg b/src/others/irrlicht-1.8.1/doc/html/vc6include.jpg new file mode 100644 index 0000000..d3e65ea Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/vc6include.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/vc6optionsdir.jpg b/src/others/irrlicht-1.8.1/doc/html/vc6optionsdir.jpg new file mode 100644 index 0000000..c745d83 Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/vc6optionsdir.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/vcnetinclude.jpg b/src/others/irrlicht-1.8.1/doc/html/vcnetinclude.jpg new file mode 100644 index 0000000..ce37fcb Binary files /dev/null and b/src/others/irrlicht-1.8.1/doc/html/vcnetinclude.jpg differ diff --git a/src/others/irrlicht-1.8.1/doc/html/vector2d_8h.html b/src/others/irrlicht-1.8.1/doc/html/vector2d_8h.html new file mode 100644 index 0000000..66b95b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/vector2d_8h.html @@ -0,0 +1,153 @@ + + + + +Irrlicht 3D Engine: vector2d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vector2d.h File Reference
+
+
+
#include "irrMath.h"
+#include "dimension2d.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +

+Functions

+
    +
  • template<class S , class T > vector2d< T > irr::core::operator* (const S scalar, const vector2d< T > &vector) +
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html new file mode 100644 index 0000000..513699f --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html @@ -0,0 +1,404 @@ + + + + +Irrlicht 3D Engine: vector2d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vector2d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_POINT_2D_H_INCLUDED__
+00006 #define __IRR_POINT_2D_H_INCLUDED__
+00007 
+00008 #include "irrMath.h"
+00009 #include "dimension2d.h"
+00010 
+00011 namespace irr
+00012 {
+00013 namespace core
+00014 {
+00015 
+00016 
+00018 
+00020 template <class T>
+00021 class vector2d
+00022 {
+00023 public:
+00025     vector2d() : X(0), Y(0) {}
+00027     vector2d(T nx, T ny) : X(nx), Y(ny) {}
+00029     explicit vector2d(T n) : X(n), Y(n) {}
+00031     vector2d(const vector2d<T>& other) : X(other.X), Y(other.Y) {}
+00032 
+00033     vector2d(const dimension2d<T>& other) : X(other.Width), Y(other.Height) {}
+00034 
+00035     // operators
+00036 
+00037     vector2d<T> operator-() const { return vector2d<T>(-X, -Y); }
+00038 
+00039     vector2d<T>& operator=(const vector2d<T>& other) { X = other.X; Y = other.Y; return *this; }
+00040 
+00041     vector2d<T>& operator=(const dimension2d<T>& other) { X = other.Width; Y = other.Height; return *this; }
+00042 
+00043     vector2d<T> operator+(const vector2d<T>& other) const { return vector2d<T>(X + other.X, Y + other.Y); }
+00044     vector2d<T> operator+(const dimension2d<T>& other) const { return vector2d<T>(X + other.Width, Y + other.Height); }
+00045     vector2d<T>& operator+=(const vector2d<T>& other) { X+=other.X; Y+=other.Y; return *this; }
+00046     vector2d<T> operator+(const T v) const { return vector2d<T>(X + v, Y + v); }
+00047     vector2d<T>& operator+=(const T v) { X+=v; Y+=v; return *this; }
+00048     vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this;  }
+00049 
+00050     vector2d<T> operator-(const vector2d<T>& other) const { return vector2d<T>(X - other.X, Y - other.Y); }
+00051     vector2d<T> operator-(const dimension2d<T>& other) const { return vector2d<T>(X - other.Width, Y - other.Height); }
+00052     vector2d<T>& operator-=(const vector2d<T>& other) { X-=other.X; Y-=other.Y; return *this; }
+00053     vector2d<T> operator-(const T v) const { return vector2d<T>(X - v, Y - v); }
+00054     vector2d<T>& operator-=(const T v) { X-=v; Y-=v; return *this; }
+00055     vector2d<T>& operator-=(const dimension2d<T>& other) { X -= other.Width; Y -= other.Height; return *this;  }
+00056 
+00057     vector2d<T> operator*(const vector2d<T>& other) const { return vector2d<T>(X * other.X, Y * other.Y); }
+00058     vector2d<T>& operator*=(const vector2d<T>& other) { X*=other.X; Y*=other.Y; return *this; }
+00059     vector2d<T> operator*(const T v) const { return vector2d<T>(X * v, Y * v); }
+00060     vector2d<T>& operator*=(const T v) { X*=v; Y*=v; return *this; }
+00061 
+00062     vector2d<T> operator/(const vector2d<T>& other) const { return vector2d<T>(X / other.X, Y / other.Y); }
+00063     vector2d<T>& operator/=(const vector2d<T>& other) { X/=other.X; Y/=other.Y; return *this; }
+00064     vector2d<T> operator/(const T v) const { return vector2d<T>(X / v, Y / v); }
+00065     vector2d<T>& operator/=(const T v) { X/=v; Y/=v; return *this; }
+00066 
+00068     bool operator<=(const vector2d<T>&other) const
+00069     {
+00070         return  (X<other.X || core::equals(X, other.X)) ||
+00071                 (core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y)));
+00072     }
+00073 
+00075     bool operator>=(const vector2d<T>&other) const
+00076     {
+00077         return  (X>other.X || core::equals(X, other.X)) ||
+00078                 (core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y)));
+00079     }
+00080 
+00082     bool operator<(const vector2d<T>&other) const
+00083     {
+00084         return  (X<other.X && !core::equals(X, other.X)) ||
+00085                 (core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y));
+00086     }
+00087 
+00089     bool operator>(const vector2d<T>&other) const
+00090     {
+00091         return  (X>other.X && !core::equals(X, other.X)) ||
+00092                 (core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y));
+00093     }
+00094 
+00095     bool operator==(const vector2d<T>& other) const { return equals(other); }
+00096     bool operator!=(const vector2d<T>& other) const { return !equals(other); }
+00097 
+00098     // functions
+00099 
+00101 
+00104     bool equals(const vector2d<T>& other) const
+00105     {
+00106         return core::equals(X, other.X) && core::equals(Y, other.Y);
+00107     }
+00108 
+00109     vector2d<T>& set(T nx, T ny) {X=nx; Y=ny; return *this; }
+00110     vector2d<T>& set(const vector2d<T>& p) { X=p.X; Y=p.Y; return *this; }
+00111 
+00113 
+00114     T getLength() const { return core::squareroot( X*X + Y*Y ); }
+00115 
+00117 
+00119     T getLengthSQ() const { return X*X + Y*Y; }
+00120 
+00122 
+00124     T dotProduct(const vector2d<T>& other) const
+00125     {
+00126         return X*other.X + Y*other.Y;
+00127     }
+00128 
+00130 
+00133     T getDistanceFrom(const vector2d<T>& other) const
+00134     {
+00135         return vector2d<T>(X - other.X, Y - other.Y).getLength();
+00136     }
+00137 
+00139 
+00142     T getDistanceFromSQ(const vector2d<T>& other) const
+00143     {
+00144         return vector2d<T>(X - other.X, Y - other.Y).getLengthSQ();
+00145     }
+00146 
+00148 
+00151     vector2d<T>& rotateBy(f64 degrees, const vector2d<T>& center=vector2d<T>())
+00152     {
+00153         degrees *= DEGTORAD64;
+00154         const f64 cs = cos(degrees);
+00155         const f64 sn = sin(degrees);
+00156 
+00157         X -= center.X;
+00158         Y -= center.Y;
+00159 
+00160         set((T)(X*cs - Y*sn), (T)(X*sn + Y*cs));
+00161 
+00162         X += center.X;
+00163         Y += center.Y;
+00164         return *this;
+00165     }
+00166 
+00168 
+00170     vector2d<T>& normalize()
+00171     {
+00172         f32 length = (f32)(X*X + Y*Y);
+00173         if ( length == 0 )
+00174             return *this;
+00175         length = core::reciprocal_squareroot ( length );
+00176         X = (T)(X * length);
+00177         Y = (T)(Y * length);
+00178         return *this;
+00179     }
+00180 
+00182 
+00185     f64 getAngleTrig() const
+00186     {
+00187         if (Y == 0)
+00188             return X < 0 ? 180 : 0;
+00189         else
+00190         if (X == 0)
+00191             return Y < 0 ? 270 : 90;
+00192 
+00193         if ( Y > 0)
+00194             if (X > 0)
+00195                 return atan((irr::f64)Y/(irr::f64)X) * RADTODEG64;
+00196             else
+00197                 return 180.0-atan((irr::f64)Y/-(irr::f64)X) * RADTODEG64;
+00198         else
+00199             if (X > 0)
+00200                 return 360.0-atan(-(irr::f64)Y/(irr::f64)X) * RADTODEG64;
+00201             else
+00202                 return 180.0+atan(-(irr::f64)Y/-(irr::f64)X) * RADTODEG64;
+00203     }
+00204 
+00206 
+00208     inline f64 getAngle() const
+00209     {
+00210         if (Y == 0) // corrected thanks to a suggestion by Jox
+00211             return X < 0 ? 180 : 0;
+00212         else if (X == 0)
+00213             return Y < 0 ? 90 : 270;
+00214 
+00215         // don't use getLength here to avoid precision loss with s32 vectors
+00216         // avoid floating-point trouble as sqrt(y*y) is occasionally larger than y, so clamp
+00217         const f64 tmp = core::clamp(Y / sqrt((f64)(X*X + Y*Y)), -1.0, 1.0);
+00218         const f64 angle = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64;
+00219 
+00220         if (X>0 && Y>0)
+00221             return angle + 270;
+00222         else
+00223         if (X>0 && Y<0)
+00224             return angle + 90;
+00225         else
+00226         if (X<0 && Y<0)
+00227             return 90 - angle;
+00228         else
+00229         if (X<0 && Y>0)
+00230             return 270 - angle;
+00231 
+00232         return angle;
+00233     }
+00234 
+00236 
+00238     inline f64 getAngleWith(const vector2d<T>& b) const
+00239     {
+00240         f64 tmp = (f64)(X*b.X + Y*b.Y);
+00241 
+00242         if (tmp == 0.0)
+00243             return 90.0;
+00244 
+00245         tmp = tmp / core::squareroot((f64)((X*X + Y*Y) * (b.X*b.X + b.Y*b.Y)));
+00246         if (tmp < 0.0)
+00247             tmp = -tmp;
+00248         if ( tmp > 1.0 ) //   avoid floating-point trouble
+00249             tmp = 1.0;
+00250 
+00251         return atan(sqrt(1 - tmp*tmp) / tmp) * RADTODEG64;
+00252     }
+00253 
+00255 
+00259     bool isBetweenPoints(const vector2d<T>& begin, const vector2d<T>& end) const
+00260     {
+00261         if (begin.X != end.X)
+00262         {
+00263             return ((begin.X <= X && X <= end.X) ||
+00264                 (begin.X >= X && X >= end.X));
+00265         }
+00266         else
+00267         {
+00268             return ((begin.Y <= Y && Y <= end.Y) ||
+00269                 (begin.Y >= Y && Y >= end.Y));
+00270         }
+00271     }
+00272 
+00274 
+00278     vector2d<T> getInterpolated(const vector2d<T>& other, f64 d) const
+00279     {
+00280         f64 inv = 1.0f - d;
+00281         return vector2d<T>((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d));
+00282     }
+00283 
+00285 
+00290     vector2d<T> getInterpolated_quadratic(const vector2d<T>& v2, const vector2d<T>& v3, f64 d) const
+00291     {
+00292         // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d;
+00293         const f64 inv = 1.0f - d;
+00294         const f64 mul0 = inv * inv;
+00295         const f64 mul1 = 2.0f * d * inv;
+00296         const f64 mul2 = d * d;
+00297 
+00298         return vector2d<T> ( (T)(X * mul0 + v2.X * mul1 + v3.X * mul2),
+00299                     (T)(Y * mul0 + v2.Y * mul1 + v3.Y * mul2));
+00300     }
+00301 
+00303 
+00308     vector2d<T>& interpolate(const vector2d<T>& a, const vector2d<T>& b, f64 d)
+00309     {
+00310         X = (T)((f64)b.X + ( ( a.X - b.X ) * d ));
+00311         Y = (T)((f64)b.Y + ( ( a.Y - b.Y ) * d ));
+00312         return *this;
+00313     }
+00314 
+00316     T X;
+00317 
+00319     T Y;
+00320 };
+00321 
+00323     typedef vector2d<f32> vector2df;
+00324 
+00326     typedef vector2d<s32> vector2di;
+00327 
+00328     template<class S, class T>
+00329     vector2d<T> operator*(const S scalar, const vector2d<T>& vector) { return vector*scalar; }
+00330 
+00331     // These methods are declared in dimension2d, but need definitions of vector2d
+00332     template<class T>
+00333     dimension2d<T>::dimension2d(const vector2d<T>& other) : Width(other.X), Height(other.Y) { }
+00334 
+00335     template<class T>
+00336     bool dimension2d<T>::operator==(const vector2d<T>& other) const { return Width == other.X && Height == other.Y; }
+00337 
+00338 } // end namespace core
+00339 } // end namespace irr
+00340 
+00341 #endif
+00342 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/vector3d_8h.html b/src/others/irrlicht-1.8.1/doc/html/vector3d_8h.html new file mode 100644 index 0000000..3f86c25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/vector3d_8h.html @@ -0,0 +1,152 @@ + + + + +Irrlicht 3D Engine: vector3d.h File Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vector3d.h File Reference
+
+
+
#include "irrMath.h"
+
+

Go to the source code of this file.

+

+Classes

+ +

+Namespaces

+
    +
  • namespace irr +

    Everything in the Irrlicht Engine can be found in this namespace.

    +
  • namespace irr::core +

    Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.

    +
+

+Typedefs

+ +

+Functions

+
    +
  • template<class S , class T > vector3d< T > irr::core::operator* (const S scalar, const vector3d< T > &vector) +
    Function multiplying a scalar and a vector component-wise.
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/html/vector3d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/vector3d_8h_source.html new file mode 100644 index 0000000..4cabef7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/vector3d_8h_source.html @@ -0,0 +1,492 @@ + + + + +Irrlicht 3D Engine: vector3d.h Source File + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
+
Irrlicht 3D Engine + +
+ +
+ + + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vector3d.h
+
+
+Go to the documentation of this file.
00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
+00002 // This file is part of the "Irrlicht Engine".
+00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
+00004 
+00005 #ifndef __IRR_POINT_3D_H_INCLUDED__
+00006 #define __IRR_POINT_3D_H_INCLUDED__
+00007 
+00008 #include "irrMath.h"
+00009 
+00010 namespace irr
+00011 {
+00012 namespace core
+00013 {
+00014 
+00016 
+00021     template <class T>
+00022     class vector3d
+00023     {
+00024     public:
+00026         vector3d() : X(0), Y(0), Z(0) {}
+00028         vector3d(T nx, T ny, T nz) : X(nx), Y(ny), Z(nz) {}
+00030         explicit vector3d(T n) : X(n), Y(n), Z(n) {}
+00032         vector3d(const vector3d<T>& other) : X(other.X), Y(other.Y), Z(other.Z) {}
+00033 
+00034         // operators
+00035 
+00036         vector3d<T> operator-() const { return vector3d<T>(-X, -Y, -Z); }
+00037 
+00038         vector3d<T>& operator=(const vector3d<T>& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; }
+00039 
+00040         vector3d<T> operator+(const vector3d<T>& other) const { return vector3d<T>(X + other.X, Y + other.Y, Z + other.Z); }
+00041         vector3d<T>& operator+=(const vector3d<T>& other) { X+=other.X; Y+=other.Y; Z+=other.Z; return *this; }
+00042         vector3d<T> operator+(const T val) const { return vector3d<T>(X + val, Y + val, Z + val); }
+00043         vector3d<T>& operator+=(const T val) { X+=val; Y+=val; Z+=val; return *this; }
+00044 
+00045         vector3d<T> operator-(const vector3d<T>& other) const { return vector3d<T>(X - other.X, Y - other.Y, Z - other.Z); }
+00046         vector3d<T>& operator-=(const vector3d<T>& other) { X-=other.X; Y-=other.Y; Z-=other.Z; return *this; }
+00047         vector3d<T> operator-(const T val) const { return vector3d<T>(X - val, Y - val, Z - val); }
+00048         vector3d<T>& operator-=(const T val) { X-=val; Y-=val; Z-=val; return *this; }
+00049 
+00050         vector3d<T> operator*(const vector3d<T>& other) const { return vector3d<T>(X * other.X, Y * other.Y, Z * other.Z); }
+00051         vector3d<T>& operator*=(const vector3d<T>& other) { X*=other.X; Y*=other.Y; Z*=other.Z; return *this; }
+00052         vector3d<T> operator*(const T v) const { return vector3d<T>(X * v, Y * v, Z * v); }
+00053         vector3d<T>& operator*=(const T v) { X*=v; Y*=v; Z*=v; return *this; }
+00054 
+00055         vector3d<T> operator/(const vector3d<T>& other) const { return vector3d<T>(X / other.X, Y / other.Y, Z / other.Z); }
+00056         vector3d<T>& operator/=(const vector3d<T>& other) { X/=other.X; Y/=other.Y; Z/=other.Z; return *this; }
+00057         vector3d<T> operator/(const T v) const { T i=(T)1.0/v; return vector3d<T>(X * i, Y * i, Z * i); }
+00058         vector3d<T>& operator/=(const T v) { T i=(T)1.0/v; X*=i; Y*=i; Z*=i; return *this; }
+00059 
+00061         bool operator<=(const vector3d<T>&other) const
+00062         {
+00063             return  (X<other.X || core::equals(X, other.X)) ||
+00064                     (core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y))) ||
+00065                     (core::equals(X, other.X) && core::equals(Y, other.Y) && (Z<other.Z || core::equals(Z, other.Z)));
+00066         }
+00067 
+00069         bool operator>=(const vector3d<T>&other) const
+00070         {
+00071             return  (X>other.X || core::equals(X, other.X)) ||
+00072                     (core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))) ||
+00073                     (core::equals(X, other.X) && core::equals(Y, other.Y) && (Z>other.Z || core::equals(Z, other.Z)));
+00074         }
+00075 
+00077         bool operator<(const vector3d<T>&other) const
+00078         {
+00079             return  (X<other.X && !core::equals(X, other.X)) ||
+00080                     (core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y)) ||
+00081                     (core::equals(X, other.X) && core::equals(Y, other.Y) && Z<other.Z && !core::equals(Z, other.Z));
+00082         }
+00083 
+00085         bool operator>(const vector3d<T>&other) const
+00086         {
+00087             return  (X>other.X && !core::equals(X, other.X)) ||
+00088                     (core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)) ||
+00089                     (core::equals(X, other.X) && core::equals(Y, other.Y) && Z>other.Z && !core::equals(Z, other.Z));
+00090         }
+00091 
+00093         bool operator==(const vector3d<T>& other) const
+00094         {
+00095             return this->equals(other);
+00096         }
+00097 
+00098         bool operator!=(const vector3d<T>& other) const
+00099         {
+00100             return !this->equals(other);
+00101         }
+00102 
+00103         // functions
+00104 
+00106         bool equals(const vector3d<T>& other, const T tolerance = (T)ROUNDING_ERROR_f32 ) const
+00107         {
+00108             return core::equals(X, other.X, tolerance) &&
+00109                 core::equals(Y, other.Y, tolerance) &&
+00110                 core::equals(Z, other.Z, tolerance);
+00111         }
+00112 
+00113         vector3d<T>& set(const T nx, const T ny, const T nz) {X=nx; Y=ny; Z=nz; return *this;}
+00114         vector3d<T>& set(const vector3d<T>& p) {X=p.X; Y=p.Y; Z=p.Z;return *this;}
+00115 
+00117         T getLength() const { return core::squareroot( X*X + Y*Y + Z*Z ); }
+00118 
+00120 
+00122         T getLengthSQ() const { return X*X + Y*Y + Z*Z; }
+00123 
+00125         T dotProduct(const vector3d<T>& other) const
+00126         {
+00127             return X*other.X + Y*other.Y + Z*other.Z;
+00128         }
+00129 
+00131 
+00132         T getDistanceFrom(const vector3d<T>& other) const
+00133         {
+00134             return vector3d<T>(X - other.X, Y - other.Y, Z - other.Z).getLength();
+00135         }
+00136 
+00138 
+00139         T getDistanceFromSQ(const vector3d<T>& other) const
+00140         {
+00141             return vector3d<T>(X - other.X, Y - other.Y, Z - other.Z).getLengthSQ();
+00142         }
+00143 
+00145 
+00147         vector3d<T> crossProduct(const vector3d<T>& p) const
+00148         {
+00149             return vector3d<T>(Y * p.Z - Z * p.Y, Z * p.X - X * p.Z, X * p.Y - Y * p.X);
+00150         }
+00151 
+00153 
+00157         bool isBetweenPoints(const vector3d<T>& begin, const vector3d<T>& end) const
+00158         {
+00159             const T f = (end - begin).getLengthSQ();
+00160             return getDistanceFromSQ(begin) <= f &&
+00161                 getDistanceFromSQ(end) <= f;
+00162         }
+00163 
+00165 
+00168         vector3d<T>& normalize()
+00169         {
+00170             f64 length = X*X + Y*Y + Z*Z;
+00171             if (length == 0 ) // this check isn't an optimization but prevents getting NAN in the sqrt.
+00172                 return *this;
+00173             length = core::reciprocal_squareroot(length);
+00174 
+00175             X = (T)(X * length);
+00176             Y = (T)(Y * length);
+00177             Z = (T)(Z * length);
+00178             return *this;
+00179         }
+00180 
+00182         vector3d<T>& setLength(T newlength)
+00183         {
+00184             normalize();
+00185             return (*this *= newlength);
+00186         }
+00187 
+00189         vector3d<T>& invert()
+00190         {
+00191             X *= -1;
+00192             Y *= -1;
+00193             Z *= -1;
+00194             return *this;
+00195         }
+00196 
+00198 
+00200         void rotateXZBy(f64 degrees, const vector3d<T>& center=vector3d<T>())
+00201         {
+00202             degrees *= DEGTORAD64;
+00203             f64 cs = cos(degrees);
+00204             f64 sn = sin(degrees);
+00205             X -= center.X;
+00206             Z -= center.Z;
+00207             set((T)(X*cs - Z*sn), Y, (T)(X*sn + Z*cs));
+00208             X += center.X;
+00209             Z += center.Z;
+00210         }
+00211 
+00213 
+00215         void rotateXYBy(f64 degrees, const vector3d<T>& center=vector3d<T>())
+00216         {
+00217             degrees *= DEGTORAD64;
+00218             f64 cs = cos(degrees);
+00219             f64 sn = sin(degrees);
+00220             X -= center.X;
+00221             Y -= center.Y;
+00222             set((T)(X*cs - Y*sn), (T)(X*sn + Y*cs), Z);
+00223             X += center.X;
+00224             Y += center.Y;
+00225         }
+00226 
+00228 
+00230         void rotateYZBy(f64 degrees, const vector3d<T>& center=vector3d<T>())
+00231         {
+00232             degrees *= DEGTORAD64;
+00233             f64 cs = cos(degrees);
+00234             f64 sn = sin(degrees);
+00235             Z -= center.Z;
+00236             Y -= center.Y;
+00237             set(X, (T)(Y*cs - Z*sn), (T)(Y*sn + Z*cs));
+00238             Z += center.Z;
+00239             Y += center.Y;
+00240         }
+00241 
+00243 
+00247         vector3d<T> getInterpolated(const vector3d<T>& other, f64 d) const
+00248         {
+00249             const f64 inv = 1.0 - d;
+00250             return vector3d<T>((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d), (T)(other.Z*inv + Z*d));
+00251         }
+00252 
+00254 
+00259         vector3d<T> getInterpolated_quadratic(const vector3d<T>& v2, const vector3d<T>& v3, f64 d) const
+00260         {
+00261             // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d;
+00262             const f64 inv = (T) 1.0 - d;
+00263             const f64 mul0 = inv * inv;
+00264             const f64 mul1 = (T) 2.0 * d * inv;
+00265             const f64 mul2 = d * d;
+00266 
+00267             return vector3d<T> ((T)(X * mul0 + v2.X * mul1 + v3.X * mul2),
+00268                     (T)(Y * mul0 + v2.Y * mul1 + v3.Y * mul2),
+00269                     (T)(Z * mul0 + v2.Z * mul1 + v3.Z * mul2));
+00270         }
+00271 
+00273 
+00278         vector3d<T>& interpolate(const vector3d<T>& a, const vector3d<T>& b, f64 d)
+00279         {
+00280             X = (T)((f64)b.X + ( ( a.X - b.X ) * d ));
+00281             Y = (T)((f64)b.Y + ( ( a.Y - b.Y ) * d ));
+00282             Z = (T)((f64)b.Z + ( ( a.Z - b.Z ) * d ));
+00283             return *this;
+00284         }
+00285 
+00286 
+00288 
+00301         vector3d<T> getHorizontalAngle() const
+00302         {
+00303             vector3d<T> angle;
+00304 
+00305             const f64 tmp = (atan2((f64)X, (f64)Z) * RADTODEG64);
+00306             angle.Y = (T)tmp;
+00307 
+00308             if (angle.Y < 0)
+00309                 angle.Y += 360;
+00310             if (angle.Y >= 360)
+00311                 angle.Y -= 360;
+00312 
+00313             const f64 z1 = core::squareroot(X*X + Z*Z);
+00314 
+00315             angle.X = (T)(atan2((f64)z1, (f64)Y) * RADTODEG64 - 90.0);
+00316 
+00317             if (angle.X < 0)
+00318                 angle.X += 360;
+00319             if (angle.X >= 360)
+00320                 angle.X -= 360;
+00321 
+00322             return angle;
+00323         }
+00324 
+00326 
+00330         vector3d<T> getSphericalCoordinateAngles() const
+00331         {
+00332             vector3d<T> angle;
+00333             const f64 length = X*X + Y*Y + Z*Z;
+00334 
+00335             if (length)
+00336             {
+00337                 if (X!=0)
+00338                 {
+00339                     angle.Y = (T)(atan2((f64)Z,(f64)X) * RADTODEG64);
+00340                 }
+00341                 else if (Z<0)
+00342                     angle.Y=180;
+00343 
+00344                 angle.X = (T)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64);
+00345             }
+00346             return angle;
+00347         }
+00348 
+00350 
+00357         vector3d<T> rotationToDirection(const vector3d<T> & forwards = vector3d<T>(0, 0, 1)) const
+00358         {
+00359             const f64 cr = cos( core::DEGTORAD64 * X );
+00360             const f64 sr = sin( core::DEGTORAD64 * X );
+00361             const f64 cp = cos( core::DEGTORAD64 * Y );
+00362             const f64 sp = sin( core::DEGTORAD64 * Y );
+00363             const f64 cy = cos( core::DEGTORAD64 * Z );
+00364             const f64 sy = sin( core::DEGTORAD64 * Z );
+00365 
+00366             const f64 srsp = sr*sp;
+00367             const f64 crsp = cr*sp;
+00368 
+00369             const f64 pseudoMatrix[] = {
+00370                 ( cp*cy ), ( cp*sy ), ( -sp ),
+00371                 ( srsp*cy-cr*sy ), ( srsp*sy+cr*cy ), ( sr*cp ),
+00372                 ( crsp*cy+sr*sy ), ( crsp*sy-sr*cy ), ( cr*cp )};
+00373 
+00374             return vector3d<T>(
+00375                 (T)(forwards.X * pseudoMatrix[0] +
+00376                     forwards.Y * pseudoMatrix[3] +
+00377                     forwards.Z * pseudoMatrix[6]),
+00378                 (T)(forwards.X * pseudoMatrix[1] +
+00379                     forwards.Y * pseudoMatrix[4] +
+00380                     forwards.Z * pseudoMatrix[7]),
+00381                 (T)(forwards.X * pseudoMatrix[2] +
+00382                     forwards.Y * pseudoMatrix[5] +
+00383                     forwards.Z * pseudoMatrix[8]));
+00384         }
+00385 
+00387 
+00389         void getAs4Values(T* array) const
+00390         {
+00391             array[0] = X;
+00392             array[1] = Y;
+00393             array[2] = Z;
+00394             array[3] = 0;
+00395         }
+00396 
+00398 
+00399         void getAs3Values(T* array) const
+00400         {
+00401             array[0] = X;
+00402             array[1] = Y;
+00403             array[2] = Z;
+00404         }
+00405 
+00406 
+00408         T X;
+00409 
+00411         T Y;
+00412 
+00414         T Z;
+00415     };
+00416 
+00418     // Implementor note: inline keyword needed due to template specialization for s32. Otherwise put specialization into a .cpp
+00419     template <>
+00420     inline vector3d<s32> vector3d<s32>::operator /(s32 val) const {return core::vector3d<s32>(X/val,Y/val,Z/val);}
+00421     template <>
+00422     inline vector3d<s32>& vector3d<s32>::operator /=(s32 val) {X/=val;Y/=val;Z/=val; return *this;}
+00423 
+00424     template <>
+00425     inline vector3d<s32> vector3d<s32>::getSphericalCoordinateAngles() const
+00426     {
+00427         vector3d<s32> angle;
+00428         const f64 length = X*X + Y*Y + Z*Z;
+00429 
+00430         if (length)
+00431         {
+00432             if (X!=0)
+00433             {
+00434                 angle.Y = round32((f32)(atan2((f64)Z,(f64)X) * RADTODEG64));
+00435             }
+00436             else if (Z<0)
+00437                 angle.Y=180;
+00438 
+00439             angle.X = round32((f32)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64));
+00440         }
+00441         return angle;
+00442     }
+00443 
+00445     typedef vector3d<f32> vector3df;
+00446 
+00448     typedef vector3d<s32> vector3di;
+00449 
+00451     template<class S, class T>
+00452     vector3d<T> operator*(const S scalar, const vector3d<T>& vector) { return vector*scalar; }
+00453 
+00454 } // end namespace core
+00455 } // end namespace irr
+00456 
+00457 #endif
+00458 
+
+
+ + + + + diff --git a/src/others/irrlicht-1.8.1/doc/irrlicht-license.txt b/src/others/irrlicht-1.8.1/doc/irrlicht-license.txt new file mode 100644 index 0000000..19e40ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/irrlicht-license.txt @@ -0,0 +1,26 @@ +Copyright (C) 2002-2012 Nikolaus Gebhardt + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Please note that the Irrlicht Engine is based in part on the work of the + Independent JPEG Group, the zlib, libPng and aesGladman. This means that if you use + the Irrlicht Engine in your product, you must acknowledge somewhere in your + documentation that you've used the IJPG code. It would also be nice to mention + that you use the Irrlicht Engine, the zlib, libPng and aesGladman. See the + corresponding license files for further informations. It is also possible to disable + usage of those additional libraries by defines in the IrrCompileConfig.h header and + recompiling the engine. diff --git a/src/others/irrlicht-1.8.1/doc/jpglib-license.txt b/src/others/irrlicht-1.8.1/doc/jpglib-license.txt new file mode 100644 index 0000000..07bb50b --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/jpglib-license.txt @@ -0,0 +1,351 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 8d of 15-Jan-2012 +==================================== + +This distribution contains the eighth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone, +Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson, +Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers, +and other members of the Independent JPEG Group. + +IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee +(also known as JPEG, together with ITU-T SG16). + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +ACKNOWLEDGMENTS Special thanks. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.txt How to configure and install the IJG software. + usage.txt Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.txt). + wizard.txt Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.txt How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.txt Overview of the JPEG library's internal structure. + filelist.txt Road map of IJG files. + coderules.txt Coding style rules --- please read if you contribute code. + +Please read at least the files install.txt and usage.txt. Some information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image encoding, decoding, +and transcoding. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and gray-scale images. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +We have made no provision for supporting the hierarchical or lossless +processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. + +We have also included "jpegtran", a utility for lossless transcoding between +different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple +applications for inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltmain.sh). Another support script, install-sh, is copyright by X Consortium +but is also freely distributable. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + + +REFERENCES +========== + +We recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PostScript file containing a revised version of Wallace's article is +available at http://www.ijg.org/files/wallace.ps.gz. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best currently available description of JPEG is the textbook "JPEG Still +Image Data Compression Standard" by William B. Pennebaker and Joan L. +Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. +Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG +standards (DIS 10918-1 and draft DIS 10918-2). +Although this is by far the most detailed and comprehensive exposition of +JPEG publicly available, we point out that it is still missing an explanation +of the most essential properties and algorithms of the underlying DCT +technology. +If you think that you know about DCT-based JPEG after reading this book, +then you are in delusion. The real fundamentals and corresponding potential +of DCT-based JPEG are not publicly known so far, and that is the reason for +all the mistaken developments taking place in the image coding domain. + +The original JPEG standard is divided into two parts, Part 1 being the actual +specification, while Part 2 covers compliance testing methods. Part 1 is +titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. +IJG JPEG 8 introduces an implementation of the JPEG SmartScale extension +which is specified in two documents: A contributed document at ITU and ISO +with title "ITU-T JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced +Image Coding", April 2006, Geneva, Switzerland. The latest version of this +document is Revision 3. And a contributed document ISO/IEC JTC1/SC29/WG1 N +5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, revision +1.02. JFIF 1.02 has been adopted as an Ecma International Technical Report +and thus received a formal publication status. It is available as a free +download in PDF format from +http://www.ecma-international.org/publications/techreports/E-TR-098.htm. +A PostScript version of the JFIF document is available at +http://www.ijg.org/files/jfif.ps.gz. There is also a plain text version at +http://www.ijg.org/files/jfif.txt.gz, but it is missing the figures. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from +http://www.ijg.org/files/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is www.ijg.org. +The most recent released version can always be found there in +directory "files". This particular version will be archived as +http://www.ijg.org/files/jpegsrc.v8d.tar.gz, and in Windows-compatible +"zip" archive format as http://www.ijg.org/files/jpegsr8d.zip. + +The JPEG FAQ (Frequently Asked Questions) article is a source of some +general information about JPEG. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +ACKNOWLEDGMENTS +=============== + +Thank to Juergen Bruder for providing me with a copy of the common DCT +algorithm article, only to find out that I had come to the same result +in a more direct and comprehensible way with a more generative approach. + +Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the +ITU JPEG (Study Group 16) meeting in Geneva, Switzerland. + +Thank to Thomas Wiegand and Gary Sullivan for inviting me to the +Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland. + +Thank to Thomas Richter and Daniel Lee for inviting me to the +ISO/IEC JTC1/SC29/WG1 (also known as JPEG, together with ITU-T SG16) +meeting in Berlin, Germany. + +Thank to John Korejwa and Massimo Ballerini for inviting me to +fruitful consultations in Boston, MA and Milan, Italy. + +Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther +Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel +for corresponding business development. + +Thank to Nico Zschach and Dirk Stelling of the technical support team +at the Digital Images company in Halle for providing me with extra +equipment for configuration tests. + +Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful +communication about JPEG configuration in Sigma Photo Pro software. + +Thank to Andrew Finkenstadt for hosting the ijg.org site. + +Last but not least special thank to Thomas G. Lane for the original +design and development of this singular software package. + + +FILE FORMAT WARS +================ + +The ISO/IEC JTC1/SC29/WG1 standards committee (also known as JPEG, together +with ITU-T SG16) currently promotes different formats containing the name +"JPEG" which is misleading because these formats are incompatible with +original DCT-based JPEG and are based on faulty technologies. +IJG therefore does not and will not support such momentary mistakes +(see REFERENCES). +There exist also distributions under the name "OpenJPEG" promoting such +kind of formats which is misleading because they don't support original +JPEG images. +We have no sympathy for the promotion of inferior formats. Indeed, one of +the original reasons for developing this free software was to help force +convergence on common, interoperable format standards for JPEG files. +Don't use an incompatible file format! +(In any case, our decoder will remain capable of reading existing JPEG +image files indefinitely.) + +Furthermore, the ISO committee pretends to be "responsible for the popular +JPEG" in their public reports which is not true because they don't respond to +actual requirements for the maintenance of the original JPEG specification. + +There are currently distributions in circulation containing the name +"libjpeg" which claim to be a "derivative" or "fork" of the original +libjpeg, but don't have the features and are incompatible with formats +supported by actual IJG libjpeg distributions. Furthermore, they +violate the license conditions as described under LEGAL ISSUES above. +We have no sympathy for the release of misleading and illegal +distributions derived from obsolete code bases. +Don't use an obsolete code base! + + +TO DO +===== + +Version 8 is the first release of a new generation JPEG standard +to overcome the limitations of the original JPEG specification. +More features are being prepared for coming releases... + +Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org. diff --git a/src/others/irrlicht-1.8.1/doc/libpng-license.txt b/src/others/irrlicht-1.8.1/doc/libpng-license.txt new file mode 100644 index 0000000..0c92740 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/libpng-license.txt @@ -0,0 +1,111 @@ + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.5.9, February 18, 2012, are +Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +February 18, 2012 diff --git a/src/others/irrlicht-1.8.1/doc/readme.txt b/src/others/irrlicht-1.8.1/doc/readme.txt new file mode 100644 index 0000000..3485418 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/readme.txt @@ -0,0 +1,2 @@ +Linux Users: There are some tools at the web for reading .chm files (try http://xchm.sourceforge.net/). +You can find a html version of this documentation at http://irrlicht.sourceforge.net/docu/index.html \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/doc/upgrade-guide.txt b/src/others/irrlicht-1.8.1/doc/upgrade-guide.txt new file mode 100644 index 0000000..ee638b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/upgrade-guide.txt @@ -0,0 +1,2891 @@ +This file contains API changes between consecutive versions. You can get the +relevant information about all changes to the public Irrlicht API needed for +upgrading your code (esp. custom scene nodes and GUI elements) to a new Irrlicht +version. Since all changes are incremental you should skip forward to the +version you use right now and check each note until you reach the desired +version. +Please note that the changes described here do not contain functional changes, +but only syntactical ones. Also, new methods are not documented here and +have to be looked up in the API documentation instead. + +Basically, all changes have to be reflected in user code where used. Removed +and renamed methods are obviously not existant anymore. A hint is usually given +for such changes on how to remedy the situation. +Changed signatures of methods might go unnoticed. That need not be a bad thing, +e.g. for changes from s32 to u32 the parameters are usually automatically +converted by the compiler. However, one should be careful when writing custom +scene nodes or GUI elements. It might happen that the methods are not properly +chosen as candidates for virtual overloading. So always check that methods in +the user code have the proper signatures just as the interface versions. The +change hint will help to identify necessary changes. + +Changes for Version 1.2 +----------------------- +Removed compile flag (always used where available) +_IRR_LINUX_OPENGL_USE_EXTENSIONS_ + +IAnimatedMeshB3d: +Removed (no replacement available) + virtual void AddMatrixToJoint(s32 jointNumber, core::matrix4* matrix) = 0; + +IGUIElement.h +Changed signatures (made const) + IGUIElement* getParent() const + core::rect getRelativePosition() const + +IGUITabControl.h +Changed signatures (const param) + virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0; + +IImage.h +Changed signatures (made const) + virtual ECOLOR_FORMAT getColorFormat() const = 0; + +IParticleAffector.h +Changed inheritance (from irr:IUnknown) + class IParticleAffector : public virtual io::IAttributeExchangingObject + +IParticleEmitter.h +Changed inheritance (from irr:IUnknown) + class IParticleEmitter : public virtual io::IAttributeExchangingObject + +IParticleSystemSceneNode.h +Changed signatures (const param) + virtual IParticleEmitter* createPointEmitter( + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + video::SColor minStartColor = video::SColor(255,0,0,0), + virtual IParticleEmitter* createBoxEmitter( + const core::aabbox3df& box = core::aabbox3df(-10,28,-10,10,30,10), + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + video::SColor minStartColor = video::SColor(255,0,0,0), + + virtual IParticleAffector* createGravityAffector( + const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f), + u32 timeForceLost = 1000) = 0; + +ISceneManager.h +Changed signatures (additional param) + virtual ISceneNodeAnimator* createFlyCircleAnimator(const core::vector3df& center, + f32 radius, f32 speed=0.001f, const core::vector3df& direction= core::vector3df ( 0.f, 1.f, 0.f ) ) = 0; + +ITexture.h +Changed signatures (made const) + virtual ECOLOR_FORMAT getColorFormat() const = 0; + +IVideoDriver.h +Changed signatures (changed default param, use ECF_A1R5G5B5 explicitly for old behavior) + virtual ITexture* addTexture(const core::dimension2d& size, + const c8* name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0; +Changed signatures (made const) + virtual ITexture* createRenderTargetTexture(const core::dimension2d& size) = 0; + +matrix4.h +Changed signatures (swapped parameter, it was (col, row) before although the names did not represent this) + f32& operator()(s32 row, s32 col); + const f32& operator()(s32 row, s32 col) const; + +S3DVertex.h +Changed signatures (unconst param) + S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv); + S3DVertex(const core::vector3df& pos, const core::vector3df& normal, + SColor color, const core::vector2d& tcoords); + S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2); + S3DVertex2TCoords(const core::vector3df& pos, SColor color, + const core::vector2d& tcoords, const core::vector2d& tcoords2); + S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv); + S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, + SColor color, const core::vector2d& tcoords); + S3DVertexTangents(const core::vector3df& pos, + const core::vector2df& tcoords, SColor c); + +SColor.h +Changed signatures (changed param types from signed to unsigned) + inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a); + inline u16 RGB16(u32 r, u32 g, u32 b); + inline u16 X8R8G8B8toA1R5G5B5(u32 color); + inline u32 A1R5G5B5toA8R8G8B8(u32 color); + inline u32 R5G6B5toA8R8G8B8(u16 color); + inline u16 R5G6B5toA1R5G5B5(u16 color); + inline u16 A1R5G5B5toR5G6B5(u16 color); + inline u32 getAlpha(u16 color); + inline u32 getRed(u16 color); + inline u32 getGreen(u16 color); + inline u32 getBlue(u16 color); + inline u32 getLuminance(u16 color); + inline SColor (u32 a, u32 r, u32 g, u32 b); + inline SColor(u32 clr); + inline u32 getAlpha() const + inline u32 getRed() const + inline u32 getGreen() const + inline u32 getBlue() const + inline void setAlpha(u32 a); + inline void setRed(u32 r); + inline void setGreen(u32 g); + inline void setBlue(u32 b); + inline u16 toA1R5G5B5() const + inline void toOpenGLColor(u8* dest) const + inline void set(u32 a, u32 r, u32 g, u32 b); + inline void set(u32 col); +Changed signatures (const param) + inline SColor getInterpolated(const SColor &other, f32 d) const +Changed public member (type changed) + u32 color; + + +Changes for Version 1.3 +----------------------- +Globally renamed Frustrum to Frustum in all signatures and code parts + +IAnimatedMeshB3d.h +Renamed methods (small first letter) + virtual void setInterpolationMode(s32 mode) = 0; + virtual void setAnimateMode(s32 mode) = 0; + +IAnimatedMeshSceneNode.h +changed signature (changed types) + virtual void setAnimationSpeed(f32 framesPerSecond) = 0; + +ICameraSceneNode.h +Renamed methods and changed signature (changed types, frustum renaming) + virtual const SViewFrustum* getViewFrustum() const = 0; + +IFileSystem.h +Renamed method (from addUnZipFileArchive) + virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase = true, bool ignorePaths = true) = 0; + +IGUIContextMenu.h +Changed signature (added param) + virtual s32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false) = 0; + +IGUIElement.h +Changed inheritance + class IGUIElement : public virtual io::IAttributeExchangingObject, public IEventReceiver +Changed signature (made const) + core::rect getAbsolutePosition() const + +IGUIEnvironment.h +Changed signature (added param) + virtual IGUIButton* addButton(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext = 0) = 0; + +IGUIListBox.h +Removed method (Using sprite bank now) + virtual void setIconFont(IGUIFont* font) = 0; +Change signature (changed types, due to sprite bank) + virtual s32 addItem(const wchar_t* text, s32 icon) = 0; + +IGUISkin.h +Changed inheritance + class IGUISkin : public virtual io::IAttributeExchangingObject + +IGUIToolbar.h +Changed signature (Added param for tooltips) + virtual IGUIButton* addButton(s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext=0, + video::ITexture* img=0, video::ITexture* pressedimg=0, + bool isPushButton=false, bool useAlphaChannel=false) = 0; + +IImage.h +Changed signature (made const) + virtual u32 getPitch() const = 0; + +IImageWriter.h +Changed signature (additional param) + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) = 0; + +IMeshBuffer.h +Changed signature (changed return type) + virtual u32 getVertexCount() const = 0; + virtual u32 getIndexCount() const = 0; +Removed method (use setBoundingBox instead) + virtual core::aabbox3df& getBoundingBox() = 0; + +IMesh.h +Changed signature (changed types, made const) + virtual u32 getMeshBufferCount() const = 0; + virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0; +Removed method (use setBoundingBox instead) + virtual core::aabbox3d& getBoundingBox() = 0; + +IReadFile.h +Changed signature (changed types) + virtual s32 read(void* buffer, u32 sizeToRead) = 0; + +irrArray.h +Changed signature (made const) + s32 binary_search(const T& element, s32 left, s32 right) const + +irrMath.h +Constant changed + const f32 PI = 3.14159265359f; +Constants removed (use RADTODEG64 or DEGTORAD64 instead) + const f64 GRAD_PI = 180.0 / PI64; + const f64 GRAD_PI2 = PI64 / 180.0; +Changed signature (added tolerance parameter) + inline bool equals(const f32 a, const f32 b, const f32 tolerance = ROUNDING_ERROR_32) + +irrString.h +Changed signature (const param) + template string(const B* const c, u32 length); + template string(const B* const c); + template string& operator=(const B* const c); + template string operator+(const B* const c) const + bool operator ==(const T* const str) const + bool operator !=(const T* const str) const + bool equalsn(const T* const str, int len) const + void append(const T* const other); + s32 findFirstChar(const T* const c, u32 count) const + template s32 findFirstCharNotInList(const B* const c, u32 count) const + template s32 findLastCharNotInList(const B* const c, u32 count) const + template s32 find(const B* const str) const + void operator += (const T* const c); +Changed signature (changed type from signed) + T& operator [](const u32 index) const + u32 size() const + void append(const string& other, u32 length); + void reserve(u32 count); + s32 findNext(T c, u32 startPos) const + string subString(u32 begin, s32 length) const + void erase(u32 index); + void reallocate(u32 new_size); +Changed signature (added param) + s32 findLast(T c, s32 start = -1) const + +ISceneManager.h +Changed signature (changed default param from 128 minimalPolysPerNode) + virtual ISceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; + virtual ISceneNode* addOctTreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; +Changed signature (added param) + virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = 500.0f, s32 id=-1, + SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, + f32 jumpSpeed = 0.f) = 0; + + virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0, + const core::dimension2d& size = core::dimension2d(10.0f, 10.0f), + const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, + video::SColor shade_top = 0xFFFFFFFF, video::SColor shade_down = 0xFFFFFFFF) = 0; + + virtual ITerrainSceneNode* addTerrainSceneNode( + const c8* heightMapFileName, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0) = 0; + + virtual ITerrainSceneNode* addTerrainSceneNode( + io::IReadFile* heightMapFile, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0) = 0; +Changed signature (changed return type) + virtual u32 registerNodeForRendering(ISceneNode* node, + E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC) = 0; + +ISceneNodeAnimatorCollisionResponse.h +Changed signature (made const) + virtual void setEllipsoidTranslation(const core::vector3df &translation) = 0; + +ISceneNode.h +Renamed method (from OnPreRender) + virtual void OnRegisterSceneNode(); +Renamed method (from OnPostRender) + virtual void OnAnimate(u32 timeMs); +Changed signature (made const) + virtual const core::aabbox3d getTransformedBoundingBox() const + const core::matrix4& getAbsoluteTransformation() const + virtual bool isVisible() const + virtual s32 getID() const + scene::ISceneNode* getParent() const + virtual ESCENE_NODE_TYPE getType() const +Changed signature (changed type) + virtual video::SMaterial& getMaterial(u32 num); + void setMaterialTexture(u32 textureLayer, video::ITexture* texture); + void setAutomaticCulling( E_CULLING_TYPE state); + virtual void setDebugDataVisible(E_DEBUG_SCENE_TYPE visible); +Changed signature (changed return type) + virtual u32 getMaterialCount(); + virtual const core::vector3df& getRotation() const + E_CULLING_TYPE getAutomaticCulling() const +Changed signature (changed return type, made const) + E_DEBUG_SCENE_TYPE isDebugDataVisible() const + +ITerrainSceneNode.h +Changed signature (changed return type) + virtual u32 getIndexCount() = 0; + +ITexture.h +Changed signature (changed return type, made const) + virtual u32 getPitch() const = 0; +Removed method (Available in SMaterial now) + core::matrix4& getTransformation(); + +IVideoDriver.h +Changed signature (changed types) + virtual ITexture* getTextureByIndex(u32 index) = 0; + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, const u16* indexList, u32 triangleCount, E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType) = 0; + virtual void drawIndexedTriangleList(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; + virtual void drawIndexedTriangleList(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; + virtual void drawIndexedTriangleList(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; + virtual void drawIndexedTriangleFan(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; + virtual void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; + virtual const SLight& getDynamicLight(u32 idx) = 0; + virtual IMaterialRenderer* getMaterialRenderer(u32 idx) = 0; + virtual const c8* getMaterialRendererName(u32 idx) = 0; +Changed signature (const param) + virtual void drawMeshBuffer( const scene::IMeshBuffer* mb) = 0; + virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material) = 0; +Changed signature (added param) + virtual u32 getPrimitiveCountDrawn( u32 param = 0 ) = 0; + virtual bool writeImageToFile(IImage* image, const c8* filename, u32 param = 0) = 0; + virtual IImage* createImageFromData(ECOLOR_FORMAT format, + const core::dimension2d& size, void *data, + bool ownForeignMemory=false, + bool deleteMemory = true) = 0; +Changed signature (changed return types) + virtual u32 getMaximalDynamicLightAmount() = 0; + virtual u32 getDynamicLightCount() = 0; + virtual u32 getMaximalPrimitiveCount() = 0; + virtual u32 getMaterialRendererCount() = 0; + +matrix4.h +Changed signature (added param) + matrix4( eConstructor constructor = EM4CONST_IDENTITY ); +Changed signature (const param) + f32& operator()(const s32 row, const s32 col); + const f32& operator()(const s32 row, const s32 col) const +Changed signature (param order) + void transformVect( vector3df& out, const vector3df& in ) const; + +quaternion.h +Changed signature (changed return type) + void slerp( quaternion q1, const quaternion q2, f32 interpolate ); + +SColor.h +Renamed method (from getLuminance), changed types + inline s32 getAverage(s16 color); +Changed signature (changed return types) + inline f32 getLuminance() const +Changed signature (const param) + inline SColorf getInterpolated(const SColorf &other, f32 d) const + +SMaterial.h +Constant type changed + const u32 MATERIAL_MAX_TEXTURES = 4; +Type changed + class SMaterial +Public members removed (use Textures[] instead) + ITexture* Texture1; + ITexture* Texture2; + ITexture* Texture3; + ITexture* Texture4; +Public members removed (use setFlag()/getFlag() instead) + Flags[] +Public members changed (type changed) + u32 ZBuffer; +Changed signature (made const) + inline bool operator!=(const SMaterial& b) const + +SMeshBuffer.h +Changed signature (changed param) + virtual u32 getVertexCount() const + virtual u32 getIndexCount() const +Removed method (use setBoundingBox instead) + virtual core::aabbox3d& getBoundingBox(); + +SMeshBufferLightMap.h +Changed signature (changed param) + virtual u32 getVertexCount() const + virtual u32 getIndexCount() const +Removed method (use setBoundingBox instead) + virtual core::aabbox3d& getBoundingBox(); + +SMeshBufferTangents.h +Changed signature (changed param) + virtual u32 getVertexCount() const + virtual u32 getIndexCount() const +Removed method (use setBoundingBox instead) + virtual core::aabbox3d& getBoundingBox(); + +SMesh.h +Changed signature (changed param, made const) + virtual u32 getMeshBufferCount() const + virtual IMeshBuffer* getMeshBuffer(u32 nr) const +Removed method (use setBoundingBox instead); + virtual core::aabbox3d& getBoundingBox(); + +vector3d.h +Changed signature (changed return type) + T getLength() const +Changed signature (changed type) + vector3d getInterpolated(const vector3d& other, const T d) const + +Changes for Version 1.3.1 +------------------------- +Changed types: + SMeshBuffer* types are now template typedefs from CMeshBuffer + +dimension2d.h +Changed signature (const param) + dimension2d(const T& width, const T& height); + dimension2d operator/(const T& scale); + dimension2d operator*(const T& scale); + +IAnimatedMeshSceneNode.h +Changed signature (made const) + virtual s32 getFrameNr() const = 0; + virtual s32 getStartFrame() const = 0; + virtual s32 getEndFrame() const = 0; +Renamed method (from getAbsoluteTransformation) + virtual const SMD3QuaterionTag& getMD3TagTransformation( const core::stringc & tagname) = 0; + +IGUIButton.h +Renamed method (from getUseAlphaChannel) + virtual bool isAlphaChannelUsed() = 0; + +IGUIElementFactory.h +Changed signature (made const) + EGUI_ELEMENT_TYPE getType() const + virtual const c8* getTypeName() const + +IGUIEnvironment.h +Changed signature (added param) + virtual bool saveGUI(const c8* filename, IGUIElement* start=0) = 0; + virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) = 0; + virtual bool loadGUI(const c8* filename, IGUIElement* parent=0) = 0; + virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0; + +IGUIFontBitmap.h +Changed signature (made const) + virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; } + +IGUIFont.h +Changed signature (made const) + virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; } + +IGUISkin.h +Changed signature (added param) + virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0; + virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0; +Changed signature (made const) + virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; }; + +IImage.h +Changed signature (made const) + virtual const core::dimension2d& getDimension() const = 0; + virtual u32 getRedMask() const = 0; + virtual u32 getGreenMask() const = 0; + virtual u32 getBlueMask() const = 0; + virtual u32 getAlphaMask() const = 0; +Changed signature (changed return type, made const) + virtual u32 getBitsPerPixel() const = 0; + virtual u32 getBytesPerPixel() const = 0; + virtual u32 getImageDataSizeInBytes() const = 0; + virtual u32 getImageDataSizeInPixels() const = 0; +Changed signature (changed param type, made const) + virtual SColor getPixel(u32 x, u32 y) const = 0; + +IMeshCache.h +Changed signature (const param) + virtual void removeMesh(const IAnimatedMesh* const mesh) = 0; +Changed signature (const param, made const) + virtual s32 getMeshIndex(const IAnimatedMesh* const mesh) const = 0; + virtual const c8* getMeshFilename(const IAnimatedMesh* const mesh) const = 0; + virtual const c8* getMeshFilename(const IMesh* const mesh) const = 0; +Changed signature (changed return type, made const) + virtual u32 getMeshCount() const = 0; +Changed signature (changed param type) + virtual IAnimatedMesh* getMeshByIndex(u32 index) = 0; +Changed signature (made const) + virtual const c8* getMeshFilename(u32 index) const = 0; + +IParticleAffector.h +Changed signature (made const) + virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0; + +IParticleEmitter.h +Changed signature (made const) + virtual E_PARTICLE_EMITTER_TYPE getType() const = 0; + +irrString.h +Changed signature (const param) + string(const double number); +Changed signature (changed return type) + string& operator += (T c); + string& operator += (const string& other); +Changed signature (changed return type, const param) + string& operator += (const T* const c); + string& operator += (const int i); + string& operator += (const double i); + +ISceneManager.h +Changed signature (added param) + virtual ITerrainSceneNode* addTerrainSceneNode( + const c8* heightMapFileName, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, + bool addAlsoIfHeightmapEmpty = false) = 0; + virtual ITerrainSceneNode* addTerrainSceneNode( + io::IReadFile* heightMapFile, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, + bool addAlsoIfHeightmapEmpty = false) = 0; + virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0; + +ISceneNodeAnimator.h +Changed signature (made const) + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const + +ITexture.h +Changed signature (made const) + virtual bool hasMipMaps() const + +IVideoDriver.h +Changed signature (reference param) + virtual void draw3DBox(const core::aabbox3d& box, + SColor color = SColor(255,255,255,255)) = 0; +Changed signature (added defaults for param) + virtual void draw2DImage(video::ITexture* texture, + const core::position2d& pos, + const core::array >& sourceRects, + const core::array& indices, + s32 kerningWidth=0, + const core::rect* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false) = 0; +Changed signature (changed return type) + virtual const SExposedVideoData& getExposedVideoData() = 0; + +line3d.h +Changed signature (changed return type) + T getLength() const + +matrix4.h +Changed type to template class + template class CMatrix4 + typedef CMatrix4 matrix4; +Changed signature (changed return type) + T& operator()(const s32 row, const s32 col); + const T& operator()(const s32 row, const s32 col) const + T& operator[](u32 index); + const T& operator[](u32 index) const +Changed signature (changed param type) + inline CMatrix4& operator=(const T& scalar); + const T* pointer() const + T* pointer(); + CMatrix4 operator*(const T& scalar) const; + CMatrix4& operator*=(const T& scalar); + void transformVect(T *out,const core::vector3df &in) const; + void rotateVect(T *out,const core::vector3df &in) const; + void multiplyWith1x4Matrix(T* matrix) const; + CMatrix4 interpolate(const core::CMatrix4& b, f32 time) const; + +plane3d.h +Renamed method (from existsInterSection) + bool existsIntersection(const plane3d& other) const + +quaternion.h +Changed signature (unconst param) + void slerp( quaternion q1, quaternion q2, f32 interpolate ); + +SExposedVideoData.h +Removed public member (replaced by X11Display and X11Window) + OpenGLLinux.Window; + +SIrrCreationParameters.h +Changed public member (changed type for 64bit system support) + void* WindowId; + +triangle3d.h +Changed method to private + bool isOnSameSide(const vector3d& p1, const vector3d& p2, + const vector3d& a, const vector3d& b) const + +vector2d.h +Changed signature (changed return value) + T getLength() const + T getDistanceFrom(const vector2d& other) const + +vector3d.h +Changed signature (changed return value) + T getDistanceFrom(const vector3d& other) const + +Changes for Version 1.4 +----------------------- +This release had many changes in API method signatures. Many methods have been +made const, also several parameter types were changed. The two most noticeable +changes (which almost every user of the Irrlicht API will come across) are the +renaming of IUnknown to IReferenceCounted and const-ref change of the SEvent +structure of the OnEvent method. Another important change: DirectX8 support is +now by default disabled, enable the define in IrrCompileConfig.h to restore the +old behavior. + +IReferenceCounted.h +Renamed Type (from IUnknown). This changed most classes in Irrlicht + class IReferenceCounted + +IEventReceiver.h +Changed signature (made const) + virtual bool OnEvent(const SEvent& event) = 0; + +IrrCompileConfig.h +DirectX8 support is now by default disabled + +CMeshBuffer.h +Removed method + virtual u32 getVertexPitch() const + +fast_atof.h +Changed signature to allow optional second parameter + u32 strtol10(const char* in, const char** out=0) + +IAnimatedMesh.h +Changed inheritance (instead of IReferenceCounted) + class IAnimatedMesh : public IMesh +Changed signature (made const) + virtual u32 getFrameCount() const = 0; + +IAnimatedMeshSceneNode.h +Changed signature (changed param type) + virtual void setCurrentFrame(f32 frame) = 0; +Replaced methods (generalized method getJointNode available) + virtual ISceneNode* getMS3DJointNode(const c8* jointName) = 0; + virtual ISceneNode* getXJointNode(const c8* jointName) = 0; + virtual ISceneNode* getB3DJointNode(const c8* jointName) = 0; +Changed signature (changed return type) + virtual f32 getFrameNr() const = 0; +Changed signature (made const) + virtual bool isReadOnlyMaterials() const = 0; + +IAttributeExchangingObject.h +Changed signature (made const) + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {} + +IAttributes.h +Changed signature (made const, changed param type) + virtual u32 getAttributeCount() const = 0; +Changed signature (added param) + virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false, const wchar_t* elementName=0) = 0; + virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* elementName=0) = 0; +Changed signature (made const-ref param) + virtual void addMatrix(const c8* attributeName, const core::matrix4& v) = 0; + virtual void setAttribute(const c8* attributeName, const core::matrix4& v) = 0; + virtual void setAttribute(s32 index, const core::matrix4& v) = 0; + +IBillboardSceneNode.h +Changed signature (made const) + virtual const core::dimension2d& getSize() const = 0; + virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const = 0; + +ICameraSceneNode.h +Changed signature (made const) + virtual const core::matrix4& getProjectionMatrix() const = 0; + virtual const core::matrix4& getViewMatrix() const = 0; + virtual bool OnEvent(const SEvent& event) = 0; + virtual f32 getNearValue() const = 0; + virtual f32 getFarValue() const = 0; + virtual f32 getAspectRatio() const = 0; + virtual f32 getFOV() const = 0; + virtual bool isInputReceiverEnabled() const = 0; + virtual bool isOrthogonal() const + +ICursorControl.h +Changed signature (made const) + virtual bool isVisible() const = 0; + +IFileList.h +Changed signature (made const, changed param or return types) + virtual u32 getFileCount() const = 0; + virtual const c8* getFileName(u32 index) const = 0; + virtual const c8* getFullFileName(u32 index) = 0; + virtual bool isDirectory(u32 index) const = 0; + +IFileSystem.h 2007-09-17 09:53:10.000000000 +0200 +Changed signature (made const method and const-ref param) + virtual core::stringc getAbsolutePath(const core::stringc& filename) const = 0; + virtual core::stringc getFileDir(const core::stringc& filename) const = 0; +Changed signature (made const) + virtual IFileList* createFileList() const = 0; + virtual bool existFile(const c8* filename) const = 0; + +IGUIButton.h +Changed signature (made const) + virtual bool isPressed() const = 0; + virtual bool isAlphaChannelUsed() const = 0; + virtual bool isPushButton() const = 0; + virtual bool isDrawingBorder() const = 0; + +IGUICheckBox.h +Changed signature (made const) + virtual bool isChecked() const = 0; + +IGUIComboBox.h +Changed signature (made const, changed param or return types) + virtual u32 getItemCount() const = 0; + virtual const wchar_t* getItem(u32 idx) const = 0; + virtual s32 getSelected() const = 0; +Changed signature (changed param or return types) + virtual u32 addItem(const wchar_t* text) = 0; + virtual void removeItem(u32 id) = 0; + +IGUIContextMenu.h +Changed signature (changed param or return types) + virtual u32 getItemCount() const = 0; + virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, bool hasSubMenu=false, bool checked=false) = 0; + virtual void setItemText(u32 idx, const wchar_t* text) = 0; + virtual void setItemEnabled(u32 idx, bool enabled) = 0; + virtual void setItemChecked(u32 idx, bool enabled) = 0; + virtual void removeItem(u32 idx) = 0; + virtual void setItemCommandId(u32 idx, s32 id) = 0; +Changed signature (made const, changed param or return types) + virtual const wchar_t* getItemText(u32 idx) const = 0; + virtual bool isItemEnabled(u32 idx) const = 0; + virtual bool isItemChecked(u32 idx) const = 0; + virtual s32 getSelectedItem() const = 0; + virtual s32 getItemCommandId(u32 idx) const = 0; + virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0; + +IGUIEditBox.h +Changed signature (changed param or return types) + virtual void setMax(u32 max) = 0; +Changed signature (made const, changed param or return types) + virtual u32 getMax() const = 0; + +IGUIElementFactory.h +Changed signature (made const) + virtual s32 getCreatableGUIElementTypeCount() const = 0; + virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0; + virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0; + virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0; + +IGUIElement.h +Changed signature (made const) + bool isNotClipped() const + virtual bool isVisible() const + virtual bool isSubElement() const + virtual bool isEnabled() const + virtual const wchar_t* getText() const + virtual s32 getID() const + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +Changed signature (made const-ref param or return type) + virtual const core::stringw& getToolTipText() const + virtual bool OnEvent(const SEvent& event) + +IGUIEnvironment.h +Changed signature (changed return type) + virtual bool setFocus(IGUIElement* element) = 0; + virtual bool removeFocus(IGUIElement* element) = 0; +Changed signature (made const) + virtual IGUIElement* getFocus() const = 0; + virtual bool hasFocus(IGUIElement* element) const = 0; + virtual video::IVideoDriver* getVideoDriver() const = 0; + virtual io::IFileSystem* getFileSystem() const = 0; + virtual IOSOperator* getOSOperator() const = 0; + virtual IGUISkin* getSkin() const = 0; + virtual IGUIFont* getBuiltInFont() const = 0; + virtual IGUIElementFactory* getDefaultGUIElementFactory() const = 0; + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const =0; +Changed signature (made const-ref param or return type) + virtual bool postEventFromUser(const SEvent& event) = 0; +Changed signature (made const, changed param or return types) + virtual u32 getRegisteredGUIElementFactoryCount() const = 0; + virtual IGUIElementFactory* getGUIElementFactory(u32 index) const = 0; + +IGUIFileOpenDialog.h +Changed signature (made const) + virtual const wchar_t* getFileName() const = 0; + +IGUIFontBitmap.h +Changed signature (made const) + virtual IGUISpriteBank* getSpriteBank() const = 0; + virtual u32 getSpriteNoFromChar(const wchar_t *c) const = 0; + virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0; + +IGUIFont.h +Changed signature (made const) + virtual core::dimension2d getDimension(const wchar_t* text) const = 0; + virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0; + virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0; + virtual s32 getKerningHeight() const = 0; + +IGUIListBox.h +Changed signature (made const, changed param or return types) + virtual u32 getItemCount() const = 0; + virtual const wchar_t* getListItem(u32 id) const = 0; + virtual s32 getIcon(u32 index) const = 0; +Changed signature (changed param or return types) + virtual u32 addItem(const wchar_t* text) = 0; + virtual u32 addItem(const wchar_t* text, s32 icon) = 0; + virtual void removeItem(u32 index) = 0; +Changed signature (made const) + virtual s32 getSelected() const = 0; + +IGUIMeshViewer.h +Changed signature (made const) + virtual const video::SMaterial& getMaterial() const = 0; + +IGUIScrollBar.h +Changed signature (made const) + virtual s32 getMax() const = 0; + virtual s32 getSmallStep() const = 0; + virtual s32 getPos() const = 0; + +IGUISkin.h +Changed signature (made const) + virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0; + virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0; + virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0; + virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0; + virtual IGUISpriteBank* getSpriteBank() const = 0; + virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0; + +IGUISpriteBank.h +Changed signature (made const) + virtual u32 getTextureCount() const = 0; + virtual video::ITexture* getTexture(u32 index) const = 0; + +IGUIStaticText.h +Changed signature (made const) + virtual IGUIFont* getOverrideFont(void) const = 0; + virtual video::SColor const& getOverrideColor(void) const = 0; + virtual bool isOverrideColorEnabled(void) const = 0; + virtual bool isWordWrapEnabled(void) const = 0; + virtual s32 getTextHeight() const = 0; + virtual s32 getTextWidth(void) const = 0; + +IGUITabControl.h +Changed signature (made const) + virtual s32 getNumber() const = 0; + virtual s32 getTabCount() const = 0; + virtual IGUITab* getTab(s32 idx) const = 0; + virtual s32 getActiveTab() const = 0; + +IGUIWindow.h +Changed signature (made const) + virtual IGUIButton* getCloseButton() const = 0; + virtual IGUIButton* getMinimizeButton() const = 0; + virtual IGUIButton* getMaximizeButton() const = 0; + +IImageLoader.h +Changed signature (made const) + virtual bool isALoadableFileExtension(const c8* fileName) const = 0; + virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0; + virtual IImage* loadImage(io::IReadFile* file) const = 0; + +IImageWriter.h +Changed signature (made const) + virtual bool isAWriteableFileExtension(const c8* fileName) const = 0; + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0; + +ILogger.h +Changed signature (made const) + virtual ELOG_LEVEL getLogLevel() const = 0; + +IMaterialRenderer.h +Changed signature (made const-ref param) + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) {}; +Changed signature (made const) + virtual bool isTransparent() const { return false; } + virtual s32 getRenderCapability() const { return 0; } + +IMesh.h +Changed signature (made const) + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0; + +IMeshLoader.h +Changed signature (made const) + virtual bool isALoadableFileExtension(const c8* fileName) const = 0; + +IMeshManipulator.h +Removed method (now in IMeshBuffer) + virtual void recalculateBoundingBox(scene::IMeshBuffer* buffer) const + +IMeshSceneNode.h +Changed signature (made const) + virtual bool isReadOnlyMaterials() const = 0; + +IOSOperator.h +Changed signature (made const) + virtual const wchar_t* getOperationSystemVersion() const = 0; + virtual void copyToClipboard(const c8* text) const = 0; + virtual c8* getTextFromClipboard() const = 0; + virtual bool getProcessorSpeedMHz(u32* MHz) const = 0; + virtual bool getSystemMemory(u32* Total, u32* Avail) const = 0; + +IParticleAffector.h +Changed signature (made const) + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {} + +IParticleEmitter.h +Changed signature (made const) + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {} + +IParticleSystemSceneNode.h +Changed signature (changed return type, changed param types) + virtual IParticlePointEmitter* createPointEmitter( + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0) = 0; + virtual IParticleEmitter* createBoxEmitter( + const core::aabbox3df& box = core::aabbox3df(-10,28,-10,10,30,10), + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0) = 0; + virtual IParticleFadeOutAffector* createFadeOutParticleAffector( + const video::SColor& targetColor = video::SColor(0,0,0,0), + u32 timeNeededToFadeOut = 1000) = 0; + virtual IParticleGravityAffector* createGravityAffector( + const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f), + u32 timeForceLost = 1000) = 0; + +IQ3Shader.h +Removed method + bool operator < ( const SVariable &other ) const + +IReadFile.h +Changed param types (adapt the correct C-API for file positions) + virtual bool seek(long finalPos, bool relativeMovement = false) = 0; + virtual long getSize() const = 0; + virtual long getPos() const = 0; + IReadFile* createLimitReadFile(const c8* fileName, IReadFile* alreadyOpenedFile, long areaSize); + IReadFile* createMemoryReadFile(void* memory, long size, const c8* fileName, bool deleteMemoryWhenDropped); +Changed signature (made const) + virtual const c8* getFileName() const = 0; + +IrrlichtDevice.h +Changed signature (made const) + virtual bool isWindowActive() const = 0; + virtual const c8* getVersion() const = 0; +Changed signature (made const-ref param) + virtual void postEventFromUser(const SEvent& event) = 0; + +irrList.h +Changed some structures in order to incorporate a ConstIterator class. + Iterator begin() + ConstIterator begin() const + Iterator end() + ConstIterator end() const + Iterator getLast() + ConstIterator getLast() const + void insert_after(const Iterator& it, const T& element) + void insert_before(const Iterator& it, const T& element) + +irrMath.h +Changed signature (Use const references for better class handling) + inline const T& min_(const T& a, const T& b) + inline const T& min_(const T& a, const T& b, const T& c) + inline const T& max_(const T& a, const T& b) + inline const T& max_(const T& a, const T& b, const T& c) + inline T abs_(const T& a) + inline T lerp(const T& a, const T& b, const f32 t) + inline const T clamp (const T& value, const T& low, const T& high) + +irrString.h +Changed signature (made proper const method) + T& operator [](const u32 index) + const T& operator [](const u32 index) const + +irrXML.h +Changed signature (adapt the correct C-API for file positions, made const) + virtual long getSize() const = 0; +Changed signature (changed param types) + virtual unsigned int getAttributeCount() const = 0; + +ISceneManager.h +Changed signature (changed param types) + virtual IAnimatedMesh* addHillPlaneMesh(const c8* name, + const core::dimension2d& tileSize, const core::dimension2d& tileCount, + video::SMaterial* material = 0, f32 hillHeight = 0.0f, + const core::dimension2d& countHills = core::dimension2d(0.0f, 0.0f), + const core::dimension2d& textureRepeatCount = core::dimension2d(1.0f, 1.0f)) = 0; +Changed signature (changed param types and order) + virtual IAnimatedMesh* addArrowMesh(const c8* name, + video::SColor vtxColor0=0xFFFFFFFF, + video::SColor vtxColor1=0xFFFFFFFF, + u32 tesselationCylinder=4, u32 tesselationCone=8, + f32 height=1.f, f32 cylinderHeight=0.6f, + f32 width0=0.05f, f32 width1=0.3f) = 0; +Changed signature (changed param types) + virtual bool postEventFromUser(const SEvent& event) = 0; + virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0; + virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index) = 0; +Changed signature (made const) + virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0; +Changed signature (changed param types, made const) + virtual u32 getRegisteredSceneNodeFactoryCount() const = 0; + virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0; + virtual const video::SColorf& getAmbientLight() const = 0; + +ISceneNodeAnimatorCollisionResponse.h +Changed signature (made const) + virtual bool isFalling() const = 0; + +ISceneNodeAnimatorFactory.h +Changed signature (changed param types, made const) + virtual u32 getCreatableSceneNodeAnimatorTypeCount() const = 0; + virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType(u32 idx) const = 0; + virtual const c8* getCreateableSceneNodeAnimatorTypeName(u32 idx) const = 0; +Changed signature (made const) + virtual const c8* getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const = 0; + +ISceneNodeFactory.h +Changed signature (changed param types, made const) + virtual u32 getCreatableSceneNodeTypeCount() const = 0; + virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0; + virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0; +Changed signature (made const) + virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0; + +ISceneNode.h +Changed signature (made const) + virtual u32 getMaterialCount() const + bool isDebugObject() const + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const + +IShadowVolumeSceneNode.h +Changed signature (made const param) + virtual void setMeshToRenderFrom(const IMesh* mesh) = 0; + +ITerrainSceneNode.h +Changed signature (made const) + virtual u32 getIndexCount() const = 0; + virtual void getMeshBufferForLOD(SMeshBufferLightMap& mb, s32 LOD) const = 0; + virtual s32 getCurrentLODOfPatches(core::array& LODs) const = 0; + virtual f32 getHeight( f32 x, f32 y ) const = 0; +Changed signature (made const, made const-ref param) + virtual const core::vector3df& getTerrainCenter() const = 0; + +ITexture.h +Changed signature (made const) + virtual const core::dimension2d& getOriginalSize() const = 0; + virtual const core::dimension2d& getSize() const = 0; + virtual E_DRIVER_TYPE getDriverType() const = 0; + const core::stringc& getName() const { return Name; } + +ITimer.h +Changed signature (made const) + virtual u32 getRealTime() const = 0; + virtual u32 getTime() const = 0; + virtual f32 getSpeed() const = 0; + virtual bool isStopped() const = 0; + +ITriangleSelector.h +Changed signature (made const) + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::matrix4* transform=0) const = 0; + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::aabbox3d& box, + const core::matrix4* transform=0) const = 0; + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d& line, + const core::matrix4* transform=0) const = 0; + +IVideoDriver.h +Changed signature (made const, changed param type) + virtual u32 getTextureCount() const = 0; +Changed signature (made const param) in all draw2DImage methods + virtual void draw2DImage(const video::ITexture* texture, +Changed signature (made const-ref param, made const) + virtual const core::dimension2d& getScreenSize() const = 0; + virtual const core::dimension2d& getCurrentRenderTargetSize() const = 0; +Changed signature (made const) + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const = 0; + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const = 0; + virtual ITexture* createRenderTargetTexture(const core::dimension2d& size, const c8* name = 0) = 0; + virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color) const = 0; + virtual void makeColorKeyTexture(video::ITexture* texture, + core::position2d colorKeyPixelPos) const = 0; + virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const = 0; + virtual s32 getFPS() const = 0; + virtual u32 getPrimitiveCountDrawn( u32 param = 0 ) const = 0; + virtual u32 getMaximalDynamicLightAmount() const = 0; + virtual u32 getDynamicLightCount() const = 0; + virtual const SLight& getDynamicLight(u32 idx) const = 0; + virtual const wchar_t* getName() const = 0; + virtual u32 getMaximalPrimitiveCount() const = 0; + virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const = 0; + virtual u32 getMaterialRendererCount() const = 0; + virtual const c8* getMaterialRendererName(u32 idx) const = 0; + virtual E_DRIVER_TYPE getDriverType() const = 0; + +IWriteFile.h +Changed signature (changed param type) + virtual s32 write(const void* buffer, u32 sizeToWrite) = 0; + virtual bool seek(long finalPos, bool relativeMovement = false) = 0; +Changed signature (changed param type, made const) + virtual long getPos() const = 0; +Changed signature (made const) + virtual const c8* getFileName() const = 0; + +line2d.h +Changed signature (made const) + vector2d getUnitVector() const + f64 getAngleWith(const line2d& l) const + T getPointOrientation(const vector2d& point) const + bool isPointOnLine(const vector2d& point) const + +matrix4.h +Changed signature (made template param) + void setTranslation( const vector3d& translation ); + vector3d getTranslation() const; + void setInverseTranslation( const vector3d& translation ); + inline void setRotationRadians( const vector3d& rotation ); + void setRotationDegrees( const vector3d& rotation ); + core::vector3d getRotationDegrees() const; + inline void setInverseRotationRadians( const vector3d& rotation ); + void setInverseRotationDegrees( const vector3d& rotation ); + void setScale( const vector3d& scale ); + core::vector3d getScale() const; + +rect.h +Changed signature (made non-const ref param, C++ conformance) + rect& operator+=(const position2d& pos) + rect& operator-=(const position2d& pos) + +S3DVertex.h +Changed inheritance (S3DVertex is now base class of other vertex types) +struct S3DVertex2TCoords : public S3DVertex +struct S3DVertexTangents : public S3DVertex + +SAnimatedMesh.h +Changed signature (changed param type, made const) + virtual u32 getFrameCount() const + +SColor.h +Changed signature (changed param type) + inline u32 A1R5G5B5toA8R8G8B8(u16 color) + +SLight.h +Removed attribute (use LightSceneNode position instead) + core::vector3df Position; + +SMaterial.h +Changed attribute structure (texture layer properties are now in thenew TextureLayer array). This changes access to Textures, TextureMatrix, TextureWrap, and the filter settings, which are also per-layer now. + SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES]; + +vector3d.h +Changed signature (made template param) + bool equals(const vector3d& other, const T tolerance = (T)ROUNDING_ERROR_32 ) const + +Changes for Version 1.4.1 +------------------------- +Since this version is a backward compatible bugfix release, the API changes are only a few. None of them should result +in uncompilable code. Newly found warnings might point out wrongly used variables, additional casts or type changes in the +app should easily fix that. The only change which might go unnoticed by the compiler, but affect the application is the +changed initialization in SColorf. This was done to synchronize with other constructors from SColorf and SColor, though, +so the expectations are now much better met. +Also, OSX users have to adjust the defines in IrrCompileConfig, as we now also have OSX defines in Irrlicht style. It's now +even possible to build with X11 support under OSX without changes in the device code. + +SColor.h +Changed signature (SColorf is now default initialized to alpha=1.0f) + SColorf(f32 r=0.f, f32 g=0.f, f32 b=0.f, f32 a=1.f) : r(r), g(g), b(b), a(a) {} + +IrrCompileConfig.h +Split the OSX define into platform and device (from old MACOSX define) + _IRR_OSX_PLATFORM_ for Apple systems running OSX + _IRR_USE_OSX_DEVICE_ for Cocoa native windowing on OSX + +ISceneManager.h +Added new overload for getMesh with IReadFile instead of filename. + virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0; + +irrMath.h +Renamed method setbit + REALINLINE void setbit_cond ( u32 &state, s32 condition, u32 mask ) + +ISceneNode.h +Changed signature (because the debug data enum values can be OR'ed to enable multiple debug data types) + virtual void setDebugDataVisible(s32 state) + s32 isDebugDataVisible() const + s32 DebugDataVisible; + +matrix4.h +Changed signature (Added return values to some methods) + inline CMatrix4& setbyproduct(const CMatrix4& other_a,const CMatrix4& other_b ); + CMatrix4& setbyproduct_nocheck(const CMatrix4& other_a,const CMatrix4& other_b ); + inline CMatrix4& makeIdentity(); + CMatrix4& setTranslation( const vector3d& translation ); + CMatrix4& setInverseTranslation( const vector3d& translation ); + inline CMatrix4& setRotationRadians( const vector3d& rotation ); + CMatrix4& setRotationDegrees( const vector3d& rotation ); + inline CMatrix4& setInverseRotationRadians( const vector3d& rotation ); + CMatrix4& setInverseRotationDegrees( const vector3d& rotation ); + CMatrix4& setScale( const vector3d& scale ); + CMatrix4& buildProjectionMatrixPerspectiveFovRH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar); + CMatrix4& buildProjectionMatrixPerspectiveFovLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar); + CMatrix4& buildProjectionMatrixPerspectiveRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + CMatrix4& buildProjectionMatrixPerspectiveLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + CMatrix4& buildProjectionMatrixOrthoLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + CMatrix4& buildProjectionMatrixOrthoRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + CMatrix4& buildCameraLookAtMatrixLH(...) + CMatrix4& buildCameraLookAtMatrixRH(...) + CMatrix4& buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point=1.0f); + CMatrix4& buildNDCToDCMatrix( const core::rect& area, f32 zScale); + CMatrix4& setTextureScale( f32 sx, f32 sy ); + CMatrix4& setTextureRotationCenter( f32 radAngle ); + CMatrix4& setTextureScaleCenter( f32 sx, f32 sy ); + CMatrix4& setTextureTranslate( f32 x, f32 y ); + CMatrix4& setM(const T* data); +Added overload (for one scale value for all axes) + CMatrix4& setScale( const T scale ) { return setScale(core::vector3d(scale,scale,scale)); } + +S3DVertex.h +Added operator + bool operator<(const S3DVertex& other) const + bool operator<(const S3DVertex2TCoords& other) const + bool operator<(const S3DVertexTangents& other) const + +irrString.h +Changed signature (int->u32, negative length didn't make sense) + bool equalsn(const string& other, u32 n) const + bool equalsn(const T* const str, u32 n) const +New overload/missing method (completing the findLast... and find...Char methods) + s32 findLastChar(const T* const c, u32 count) const +Changed signature (Added return value) + string& trim() + +Changes for Version 1.4.2 +------------------------- +This is once more a bugfix release of the 1.4 branch, and hence pretty API-consistent and backward compatible. The major reason to publish this release is the OpenGL bug, which made several OpenGL 2.x drivers run in SW emulation. +However, we also introduced some driver consistency fixes, which might affect your application's behavior. So read through the next points thoroughly. + +SceneParameters.h (and general video driver behavior) +The way Irrlicht handles zbuffer writing with transparent materials has changed. This was an issue ever since, because the default behavior in Irrlicht is to disable writing to the z-buffer for all really transparent, i.e. blending materials. This avoids problems with intersecting faces, but can also break renderings. And this is now consistent for both OpenGL and Direct3D. +If transparent materials should use the SMaterial flag for ZWriteEnable just as other material types use the newly introduced attribute scene::ALLOW_ZWRITE_ON_TRANSPARENT like this: +SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); +All transparent materials will henceforth work as specified by the material flag, until the scenemanager attribute is set to false. + +SMaterialLayer.h +The texture matrix now uses irrAllocator for memory handling. This shouldn't be noticeable from the user application (besides fixed heap corruptions on Windows machines), but is still mentioned for completeness. + +ISceneNode.h +Documentation error. The docs said that children of a scene node are not visible if the node itself is set to visible. This is of course wrong, children inherit non-visibility of the parent and are hence invisible if the parent is. If the parent is visible, the visibility flag of the child determines its status. + +SColor.h +Removed methods (use the unsigned versions and cast in your app if necessary) + inline s32 getRedSigned(u16 color) + inline s32 getGreenSigned(u16 color) + inline s32 getBlueSigned(u16 color) + +IParticleSystemSceneNode.h +Changed default values (the old direction default was no real direction) + virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter(...) + virtual IParticleCylinderEmitter* createCylinderEmitter(...) + virtual IParticleMeshEmitter* createMeshEmitter(...) + +IBoneSceneNode.h +Changed signature (Made const) + virtual E_BONE_SKINNING_SPACE getSkinningSpace() const=0; + +IrrlichtDevice.h +Changed signature (Return value bool instead of void). Returns whether the event has been handled somewhere. + virtual bool postEventFromUser(const SEvent& event) = 0; + +Changes for Version 1.5 +----------------------- +Another major release, so expect API breaks at several places. The changes +herein are described as a difference to Irrlicht 1.4.2. + +The most noticeable changes are the speed factor of the FPS camera (now units/ms +instead of units/s, so divide the parameter by 1000.f) and the new interfaces +of the camera nodes, based on scene node animators. Custom camera nodes should +be adpated to this new scheme, although they might still work. Also, particle +sizes are now set and handled by the emitters, which requires a change of the +particle system constructor call or adaption of the setParticleSize method to +work on the emitters. A deprecation method is issued if the old scheme is used. +Light setting has also changed, the SLight struct is used in even less +situations than before, instead use methods in ILightSceneNode. + +Other changes did change major parts of the underlying structures, but might go +unnoticed on the user level. This includes 32bit indices and Vertex Buffer +Objects. However, VBOs require the user to call setDirty on Meshes or +MeshBuffers after changes to the vertex or index data. The all need only to be +done once before the next render call, but again after subsequent changes later +on. + + +All Mesh types and MeshBuffers: +New methods for VBO support. Once VBOs are enabled for a meshbuffer, changes +will only be effective after a call to setDirty(). VBOs are enabled by default +for some scene nodes. + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + +All MeshBuffers: +Due to the 32bit support, it might happen that indices are stored as 32bit integers. The actual index type can be queried from a mesh buffer. + virtual video::E_INDEX_TYPE getIndexType() const + +IrrCompileConfig.h +Some new defines for configuring Irrlicht +_IRR_USE_WINDOWS_CE_DEVICE_ for Windows CE API based device +_IRR_COMPILE_WITH_JOYSTICK_EVENTS_ to enable joystick support (enabled by default) +_IRR_COMPILE_WITH_LWO_LOADER_ to enable the LWO mesh loader (enabled by default) +_IRR_COMPILE_WITH_OBJ_WRITER_ to enable the OBJ mesh writer (enabled by default) +_IRR_COMPILE_WITH_WAL_LOADER_ to enable the WAL image loader (enabled by default) +_IRR_USE_NVIDIA_PERFHUD_ for support of the PerfHUD tool (disabled by default) + +SceneParameters.h +New parameter scene::OBJ_LOADER_IGNORE_GROUPS, which allows to ignore the group structure of obj files. It's disabled by default, meaning obj groups will be represented by separate meshbuffers. + +SColor.h +Renamed method names of the SColorHSL class + void fromRGB(const SColor &color); + void toRGB(SColor &color) const; + +ITexture.h +Added new parameter + virtual void* lock(bool readOnly = false) = 0; + +IMeshManipulator.h +Renamed methods (the old ones still exist, but are deprecated). The new methods also work on meshbuffers, not just meshes. +(renamed from scaleMesh) + virtual void scale(IMesh* mesh, const core::vector3df& factor) const = 0; +(renamed from transformMesh) + virtual void transform(IMesh* mesh, const core::matrix4& m) const = 0; +Changed signature (Added new parameters to adjust the algorithm) + virtual IMesh* createMeshWithTangents(IMesh* mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const = 0; + +IBillboardTextSceneNode.h +New interface replacing the multiple inheritance from bliiboard and text scene node previously used by the billboard text scene node. + +IParticleSystemSceneNode.h +All emitters have minStartSize and maxStartSize parameters now, since partice size is handled by the emitters now. +Default value added + virtual void setParticlesAreGlobal(bool global=true) = 0; + +fast_atof.h +Signature change (return value changed from u32) +inline s32 strtol10(const char* in, const char** out=0) +Signature change (parameter changed from float) +inline const char* fast_atof_move( const char * in, f32 & out) + +IAnimatedMeshSceneNode.h +Added new parameter (dummy node used for simplifying shadow calculation) + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0, + s32 id=-1, bool zfailmethod=true, f32 infinity=10000.0f) = 0; + +ISceneManager.h +Removed extra render passes for quake shaders +Changed scene node from ISceneNode to IMeshSceneNode + virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1, ...) + virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16, ...) +Changed default value (from 256 to 512, for efficiency on common gfx hardware) + virtual ISceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0; +Changed default value (from 500.f, to adapt the changed speed scale) + virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, s32 id=-1, ...) +Added default values + virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture, + u32 horiRes=16, u32 vertRes=8, + f64 texturePercentage=0.9, f64 spherePercentage=2.0, + ISceneNode* parent=0, s32 id=-1) = 0; +Changed return value (from ITextSceneNode, due to changed inheritance) + virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text, ...) +Changed default value (gravity, from -100.f) + virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator( + ITriangleSelector* world, ISceneNode* sceneNode, + const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30), + const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0), + const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0), + f32 slidingValue = 0.0005f) = 0; + +ISceneNodeAnimator.h +Changed inheritance (for interactive animators) + class ISceneNodeAnimator : public io::IAttributeExchangingObject, public IEventReceiver +Changed to pure virtual (bug fix) + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0) = 0; + +IVideoModeList.h +Changed return value (constification) + virtual const core::dimension2d& getDesktopResolution() const = 0; + +IBoneSceneNode.h +Deprecation: Use getName instead. + virtual const c8* getBoneName() const; + +vector3d.h +Changed return value (return *this) + vector3d& set(const T nx, const T ny, const T nz) {X=nx; Y=ny; Z=nz; return *this;} + vector3d& set(const vector3d& p) {X=p.X; Y=p.Y; Z=p.Z;return *this;} + vector3d& setLength(T newlength) + vector3d& invert() +Added default value + void rotateXZBy(f64 degrees, const vector3d& center=vector3d()) + void rotateXYBy(f64 degrees, const vector3d& center=vector3d()) + void rotateYZBy(f64 degrees, const vector3d& center=vector3d()) +Changed parameter type (interpolation factor must not be integral) + vector3d getInterpolated(const vector3d& other, f64 d) const + vector3d getInterpolated_quadratic(const vector3d& v2, const vector3d& v3, f64 d) const +Method made const + vector3d getHorizontalAngle() const + +SLight.h +Attenuation can be overridden by ILightSceneMethod setRadius() Attenuation will +change to (0,1.f/radius,0). Can be overridden after radius was set. +The following members are read-only now: + f32 Radius; + E_LIGHT_TYPE Type; + bool CastShadows; + +ITerrainSceneNode.h +Parameter type changed (diue to possible 32bit indices) + virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const =0; +Added dafault value (highest detail) + virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0) =0; + +SExposedVideoData.h +Changed member attributes (from s32, to fix 64bit architecture problems) + void* HWnd; + void* HDc; + void* HRc; + void* HWnd; + +IAnimatedMeshMD3.h +Changed return value (constification) + const SMD3QuaterionTag& operator[](u32 index) const + +IQ3Shader.h +Changed default q3 shader values (from LIGHTMAP_M2) + const video::E_MATERIAL_TYPE defaultMaterialType = video::EMT_LIGHTMAP_M4; + const video::E_MODULATE_FUNC defaultModulate = video::EMFN_MODULATE_4X; + +ISceneNode.h +Method made virtual + virtual const core::matrix4& getAbsoluteTransformation() const +Changed return value (constified) + virtual const core::vector3df& getScale() const + virtual const core::vector3df& getPosition() const + +IEventReceiver.h +Removed member from UserEvent + f32 UserData3; + +SMaterial.h +Changed member type (from u32) + char ZBuffer; + +IGUISkin.h +Added parameter (for alignment) + virtual void draw3DTabButton(IGUIElement* element, bool active, + const core::rect& rect, const core::rect* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0; + virtual void draw3DTabBody(IGUIElement* element, bool border, bool background, + const core::rect& rect, const core::rect* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0; + +quaternion.h +Renamed method (from getDotProduct) + inline f32 dotProduct(const quaternion& other) const; +Changed return value (return *this) + quaternion& set(f32 x, f32 y, f32 z, f32 w); + quaternion& set(f32 x, f32 y, f32 z); + quaternion& set(const core::vector3df& vec); + quaternion& makeInverse(); + quaternion& slerp( quaternion q1, quaternion q2, f32 interpolate ); + quaternion& fromAngleAxis (f32 angle, const vector3df& axis); + quaternion& makeIdentity(); + quaternion& rotationFromTo(const vector3df& from, const vector3df& to); + +IVideoDriver.h +Added parameters (moved from endScene) and added default values + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), void* windowId=0, + core::rect* sourceRect=0) = 0; +Removed parameter (move to beginScene) + virtual bool endScene() = 0; +Renamed method (note, also affects ReferenceCount behavior!) +Use addRenderTargetTexture instead of createRenderTargetTexture + virtual ITexture* addRenderTargetTexture(const core::dimension2d& size, + const c8* name=0) =0; +Changed parameters (for 32bit index support) + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primCount, E_VERTEX_TYPE vType, + scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) = 0; +Changed parameter (colors are const pointers now) + virtual void draw2DImage(const video::ITexture* texture, const core::rect& destRect, + const core::rect& sourceRect, const core::rect* clipRect = 0, + const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) = 0; + +IQ3LevelMesh.h +Added default value + virtual const quake3::SShader* getShader( const c8* filename, bool fileNameIsValid=true ) = 0; + +ICameraSceneNode.h +Added method parameter (required to set orthogonal together with projection to avoid inconsistencies) + virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal = false) = 0; +Removed method (use new parameter in setProjectionMatrix) + void setIsOrthogonal( bool orthogonal ) +Constified return value + virtual const core::vector3df& getTarget() const = 0; + virtual const core::vector3df& getUpVector() const = 0; + +matrix4.h +Removed method (use transformPlane) + void transformPlane_new( core::plane3d &plane) const; +Changed qulifications (to enable use under Win32 systems, too) + IRRLICHT_API extern const matrix4 IdentityMatrix; + +SIrrCreationParameters.h +Changed member attribute types + u8 Bits; + const c8* const SDK_version_do_not_use; + +IGUIElement.h +Renamed method from setRelativePosition (to distinguish rather different parameter interpretation) + void setRelativePositionProportional(const core::rect& r) + +irrString.h +Constructors made explicit (use core::stringc(var) in places where var was used before) + explicit string(const double number) + explicit string(int number) + explicit string(unsigned int number) +Added parameter (allows use of method for stringw, and other things) + string& trim(const string & whitespace = " \t\n\r") + +vector2d.h +Changed return value (return *this) + vector2d& set(T nx, T ny) {X=nx; Y=ny; return *this; } + vector2d& set(const vector2d& p) { X=p.X; Y=p.Y; return *this; } +Added default value + vector2d& rotateBy(f64 degrees, const vector2d& center=vector2d()) +Changed parameter type (interpolation factor must not be int) + vector2d getInterpolated(const vector2d& other, f64 d) const + vector2d getInterpolated_quadratic(const vector2d& v2, const vector2d& v3, f64 d) const + vector2d& interpolate(const vector2d& a, const vector2d& b, f64 d) + +Changes for Version 1.5.1 +------------------------- +This release is a pure bugfixes release, with almost no visible API changes. All changes should be backward compatible (as it's just a minor release), but you have to recompile the app due to changes in the virtual method tables. + +dimension2d.h +Fixed a bug in the operator+=, added operator-= and changed comparison to equal() method. + dimension2d& operator-=(const dimension2d& other) + +IrrCompileConfig.h +Added defines to check for the Irrlicht version in the code. + IRRLICHT_VERSION_MAJOR + IRRLICHT_VERSION_MINOR + IRRLICHT_VERSION_REVISION + IRRLICHT_VERSION_SVN // only defined if you're using a version from SVN, i.e. not officially released one + +IrrlichtDevice.h +Added static method isDriverSupported which checks the driver support of the library + static bool isDriverSupported(video::E_DRIVER_TYPE driver) + +irrMath.h +Added iszero specialization for f64 + bool iszero(const f64 a, const f64 tolerance = ROUNDING_ERROR_64) + +irrXML.h +Added deleteCallback flag for cleanup of the ReadCallback. + IrrXMLReader* createIrrXMLReader(IFileReadCallBack* callback, bool deleteCallback = false); + IrrXMLReaderUTF16* createIrrXMLReaderUTF16(IFileReadCallBack* callback, bool deleteCallback = false); + IrrXMLReaderUTF32* createIrrXMLReaderUTF32(IFileReadCallBack* callback, bool deleteCallback = false); + +ISceneNode.h +Added getSceneManager to get the currently used scene manager of the node. + ISceneManager* getSceneManager(void) const + +IVideoDriver.h +Added default values for vType, pType, and iType + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, const void* indexList, u32 primCount, + E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT) +Added method to draw 2d rectangle outline + void draw2DRectangleOutline(const core::recti& pos, SColor color=SColor(255,255,255,255)) + +matrix4.h +Added method to get transposedInverse + CMatrix4 transposedInverse(*this, EM4CONST_INVERSE_TRANSPOSED) + +rect.h +Added typedefs + typedef rect rectf; + typedef rect recti; + +SSharedMeshBuffer.h +Split hardware mapping hint into vertex and index part + E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const + E_HARDWARE_MAPPING getHardwareMappingHint_Index() const + void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) + +vector2d.h +Fix angle calculation for integer vectors + +Changes for Version 1.5.2 +------------------------- +Even less visible changes have been made in this version. Only the automatic Solaris OS recognition has changed, so make sure you have all things defined properly if you compile for Solaris. And the float parser bugfix is a visible change, though non-interfering for existing code. + +Changes for Version 1.6.0 +------------------------- +This releases has many changes in method signatures. The most obvious ones are signedness changes from s32 to u32. Since many templates won't accept both types, you need to change the types manually in your code. The other major change is from many different types of strings to the new class io::path. These changes should be transparent to the app, unless you need proper overrides in derived classes. +Finally, some deprecated methods have been removed, and some were simply renamed. Just check the API if some methods is not found anymore. + +IMeshSceneNode.h +Added default parameters for identity transformation + IMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1,1,1)) + +path.h +This is a new type, which handles stuff with UTF file systems. +typedef core::string io::path; + +ESceneNodeTypes.h +New scene node identifiers + ESNT_SKY_DOME = MAKE_IRR_ID('s','k','y','d'), + ESNT_Q3SHADER_SCENE_NODE = MAKE_IRR_ID('q','3','s','h'), + ESNT_VOLUME_LIGHT = MAKE_IRR_ID('v','o','l','l'), + +IGUIListBox.h +New methods + virtual void setSelected(const wchar_t *item) = 0; + virtual void setItemHeight( s32 height ) = 0; + virtual void setDrawBackground(bool draw) = 0; + +ITexture.h +New texture generation flag for burnings video driver + //! Allow the Driver to use Non-Power-2-Textures + ETCF_ALLOW_NON_POWER_2 = 0x00000040, +Parameter change (now using path type instead of C-strings) + ITexture(const io::path& name) +Signedness change + virtual const core::dimension2d& getOriginalSize() const = 0; + virtual const core::dimension2d& getSize() const = 0; +New method + virtual bool hasAlpha() const +Parameter change (now using path type instead of stringc) + const io::path& getName() const + +ILightManager.h +This is a new interface for the light manager + class ILightManager : public IReferenceCounted + +IGUIEditBox.h +Signedness change + virtual core::dimension2du getTextDimension() = 0; + +ITriangleSelector.h +New method + virtual const ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0; + +IMeshManipulator.h +New methods + virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const =0; + virtual void makePlanarTextureMapping(scene::IMeshBuffer* buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const =0; + virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const = 0; + +SceneParameters.h +Removed parameter + const c8* const DMF_USE_MATERIALS_DIRS = "DMF_MaterialsDir"; +New parameters + const c8* const DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir"; + const c8* const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles"; + const c8* const B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag"; + const c8* const DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length"; + const c8* const DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color"; + +SViewFrustum.h +Removed method (use getTransform) + void setTransformState( video::E_TRANSFORMATION_STATE state); +New methods + core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state); + const core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state) const; + bool clipLine(core::line3d& line) const; + +IFileList.h +Changed parameters (to io::path) + virtual const io::path& getFileName(u32 index) const = 0; + virtual const io::path& getFullFileName(u32 index) const = 0; +New methods + virtual u32 getFileSize(u32 index) const = 0; + virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0; + virtual const io::path& getPath() const = 0; + +coreutil.h +New methods + s32 isFileExtension(const io::path& filename, + const io::path& ext0, const io::path& ext1, const io::path& ext2) + bool hasFileExtension(const io::path& filename, + const io::path& ext0, const io::path& ext1 = "", const io::path& ext2 = "") + stringw& cutFilenameExtension ( stringw &dest, const stringw &source ) + core::stringw& deletePathFromFilename(core::stringw& filename) + core::stringc& deletePathFromFilename(core::stringc& filename) + io::path& deletePathFromPath(io::path& filename, s32 pathCount) + s32 isInSameDirectory ( const io::path& path, const io::path& file ) + +IGUIComboBox.h +New methods + virtual u32 getItemData(u32 idx) const = 0; + virtual s32 getIndexForItemData(u32 data ) const = 0; +New parameter + virtual u32 addItem(const wchar_t* text, u32 data = 0) = 0; + +irrArray.h +New allocation scheme member + array() +Use overload instead of different name + s32 binary_search(const T& element) const +New method + void setAllocStrategy ( eAllocStrategy newStrategy = ALLOC_STRATEGY_DOUBLE ) + s32 binary_search_multi(const T& element, s32 &last) + +IrrCompileConfig.h +New compiler flags + #define _IRR_MATERIAL_MAX_TEXTURES_ 4 + //! Define _IRR_D3D_USE_LEGACY_HLSL_COMPILER to enable the old HLSL compiler in recent DX SDKs + #define BURNINGVIDEO_RENDERER_CE + #define IGNORE_DEPRECATED_WARNING + #define _IRR_COMPILE_WITH_PLY_LOADER_ + #define _IRR_COMPILE_WITH_PLY_WRITER_ + #define _IRR_COMPILE_WITH_RGB_LOADER_ + #define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ + #define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ + #define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + #define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ + //! _IRR_WINDOWS_CE_PLATFORM_ for Windows CE + //! _IRR_COMPILE_WITH_WINDOWS_DEVICE_ for Windows API based device + //! _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ for Windows CE API based device + //! _IRR_COMPILE_WITH_OSX_DEVICE_ for Cocoa native windowing on OSX + //! _IRR_COMPILE_WITH_X11_DEVICE_ for Linux X11 based device + //! _IRR_COMPILE_WITH_SDL_DEVICE_ for platform independent SDL framework + //! _IRR_COMPILE_WITH_CONSOLE_DEVICE_ for no windowing system, used as a fallback +Removed compiler flags + //! _IRR_USE_SDL_DEVICE_ for platform independent SDL framework + //! _IRR_USE_WINDOWS_DEVICE_ for Windows API based device + //! _IRR_USE_WINDOWS_CE_DEVICE_ for Windows CE API based device + //! _IRR_USE_LINUX_DEVICE_ for X11 based device + //! _IRR_USE_OSX_DEVICE_ for Cocoa native windowing on OSX +Old compilers rejected + # error "Only Microsoft Visual Studio 7.0 and later are supported." +Force symbol export in shared libraries built with gcc. + #define IRRLICHT_API __attribute__ ((visibility("default"))) + +IGUIFileOpenDialog.h +New method + virtual const io::path& getDirectoryName() = 0; + +EDeviceTypes.h +New enum for multi-device support + enum E_DEVICE_TYPE + +IMeshLoader.h +Changed parameter to use io::path instead of C strings + virtual bool isALoadableFileExtension(const io::path& filename) const = 0; + +IAnimatedMeshSceneNode.h +Changed return value to pointer type + virtual const SMD3QuaternionTag* getMD3TagTransformation( const core::stringc & tagname) = 0; + +ISceneManager.h +New enum values and numbering + enum E_SCENE_NODE_RENDER_PASS + ESNRP_NONE =0, + ESNRP_TRANSPARENT =16, + ESNRP_TRANSPARENT_EFFECT =32, +Changed parameter to use io::path instead of C strings + virtual IAnimatedMesh* getMesh(const io::path& filename) = 0; +New methods + virtual io::IFileSystem* getFileSystem() = 0; + virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node) = 0; + virtual const c8* getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) = 0; + virtual ISkinnedMesh* createSkinnedMesh() = 0; + virtual void setLightManager(ILightManager* lightManager) = 0; + virtual const IGeometryCreator* getGeometryCreator(void) const = 0; + virtual bool isCulled(const ISceneNode* node) const =0; +Changed return type to IMeshSceneNode + virtual IMeshSceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0; + virtual IMeshSceneNode* addOctTreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; + virtual IMeshSceneNode* addQuake3SceneNode(IMeshBuffer* meshBuffer, const quake3::IShader * shader, + ISceneNode* parent=0, s32 id=-1) = 0; +New parameter invertMouse + virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1, + SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, + f32 jumpSpeed = 0.f, bool invertMouse=false) = 0; +New parameter radius + virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture, + u32 horiRes=16, u32 vertRes=8, + f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f, + ISceneNode* parent=0, s32 id=-1) = 0; +Changed to use io::path instead of C strings + virtual ITerrainSceneNode* addTerrainSceneNode( + const io::path& heightMapFileName, + ISceneNode* parent=0, s32 id=-1, + virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name, + const core::dimension2d& tileSize, const core::dimension2d& tileCount, + video::SMaterial* material = 0, f32 hillHeight = 0.0f, + const core::dimension2d& countHills = core::dimension2d(0.0f, 0.0f), + const core::dimension2d& textureRepeatCount = core::dimension2d(1.0f, 1.0f)) = 0; + virtual IAnimatedMesh* addArrowMesh(const io::path& name, + video::SColor vtxColor0=0xFFFFFFFF, + video::SColor vtxColor1=0xFFFFFFFF, + u32 tesselationCylinder=4, u32 tesselationCone=8, + virtual IAnimatedMesh* addSphereMesh(const io::path& name, + f32 radius=5.f, u32 polyCountX = 16, + u32 polyCountY = 16) = 0; + virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0; + virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0; +Changed to use io::path instead of C strings and signedness change + virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname, + video::IImage* texture, video::IImage* heightmap, + const core::dimension2d& stretchSize = core::dimension2d(10.0f,10.0f), + f32 maxHeight=200.0f, + const core::dimension2d& defaultVertexBlockSize = core::dimension2d(64,64)) = 0; +New method + virtual IAnimatedMesh* addVolumeLightMesh(const io::path& name, + const u32 SubdivideU = 32, const u32 SubdivideV = 32, + const video::SColor FootColor = video::SColor(51, 0, 230, 180), + const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0; +Constification of method + virtual ICameraSceneNode* getActiveCamera() const =0; +New parameters + virtual ISceneNodeAnimator* createFlyCircleAnimator( + const core::vector3df& center=core::vector3df(0.f,0.f,0.f), + f32 radius=100.f, f32 speed=0.001f, + const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f), + f32 startPosition = 0.f, + f32 radiusEllipsoid = 0.f) = 0; + virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint, + const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0; + +ISceneNodeAnimatorCollisionResponse.h +New interface + class ICollisionCallback : public virtual IReferenceCounted +New methods for ISceneNodeAnimatorCollisionResponse + virtual void setAnimateTarget ( bool enable ) = 0; + virtual bool getAnimateTarget () const = 0; + virtual void setTargetNode(ISceneNode * node) = 0; + virtual ISceneNode* getTargetNode(void) const = 0; + virtual bool collisionOccurred() const = 0; + virtual const core::vector3df & getCollisionPoint() const = 0; + virtual const core::triangle3df & getCollisionTriangle() const = 0; + virtual const core::vector3df & getCollisionResultPosition(void) const = 0; + virtual const ISceneNode* getCollisionNode(void) const = 0; + virtual void setCollisionCallback(ICollisionCallback* callback) = 0; + +ILightSceneNode.h +New methods + virtual void setVisible(bool isVisible) = 0; + +EMeshWriterEnums.h +New enums + EMWT_PLY = MAKE_IRR_ID('p','l','y',0) + EMWF_WRITE_BINARY = 0x4 + +ISceneNodeAnimator.h +New method + virtual bool hasFinished(void) const + +SMaterialLayer.h +Changed types + u8 TextureWrap; + bool BilinearFilter:1; + bool TrilinearFilter:1; + u8 AnisotropicFilter; +New member + s8 LODBias; + +IVideoModeList.h +Signedness change + virtual core::dimension2d getVideoModeResolution(s32 modeNumber) const = 0; + virtual core::dimension2d getVideoModeResolution(const core::dimension2d& minSize, const core::dimension2d& maxSize) const = 0; + virtual const core::dimension2d& getDesktopResolution() const = 0; + +EMaterialFlags.h +Enum values changed (all renumbered) + +ISkinnedMesh.h +Renamed methods (was create... before, but these methods grab the things they create) + virtual SSkinMeshBuffer* addMeshBuffer() = 0; + virtual SJoint* addJoint(SJoint *parent=0) = 0; + virtual SWeight* addWeight(SJoint *joint) = 0; + virtual SPositionKey* addPositionKey(SJoint *joint) = 0; + virtual SScaleKey* addScaleKey(SJoint *joint) = 0; + virtual SRotationKey* addRotationKey(SJoint *joint) = 0; + +SLight.h +Type change + bool CastShadows:1; + +IGUITreeView.h +New element +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de + class IGUITreeView : public IGUIElement + +IAnimatedMeshMD3.h +Renamed class (from SMD3QuaterionTag) + struct SMD3QuaternionTag + +IGUIEnvironment.h +New methods + virtual IGUIImageList* createImageList( video::ITexture* texture, + core::dimension2d imageSize, bool useAlphaChannel ) = 0; + virtual IGUITreeView* addTreeView(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false, + bool scrollBarVertical = true, bool scrollBarHorizontal = false) = 0; +Changed parameters to use io::path (instead of C strings) + virtual IGUIFont* getFont(const io::path& filename) = 0; + virtual IGUISpriteBank* getSpriteBank(const io::path& filename) = 0; + virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) = 0; + virtual bool saveGUI(const io::path& filename, IGUIElement* start=0) = 0; + virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) = 0; +New parameter "border" + virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect& rectangle, + bool border=true,IGUIElement* parent=0, s32 id=-1) = 0; + +IQ3Shader.h +Made non-const + static core::stringc irrEmptyStringc(""); +New enum values + enum eQ3MeshIndex + E_Q3_MESH_FOG, + E_Q3_MESH_UNRESOLVED, + +IGeometryCreator.h +New interface + class IGeometryCreator : public IReferenceCounted + +IFileArchive.h +New interfaces + class IFileArchive : public virtual IReferenceCounted + class IArchiveLoader : public virtual IReferenceCounted + +IFileSystem.h +Changed parameters to use io::path (instead of C strings/stringc) + virtual IReadFile* createAndOpenFile(const path& filename) =0; + virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0; + virtual IWriteFile* createAndWriteFile(const path& filename, bool append=false) =0; + virtual const path& getWorkingDirectory() =0; + virtual bool changeWorkingDirectoryTo(const path& newDirectory) =0; + virtual path getAbsolutePath(const path& filename) const =0; + virtual path getFileDir(const path& filename) const =0; + virtual path getFileBasename(const path& filename, bool keepExtension=true) const =0; + virtual bool existFile(const path& filename) const =0; + virtual IXMLReader* createXMLReader(const path& filename) =0; + virtual IXMLReaderUTF8* createXMLReaderUTF8(const path& filename) =0; + virtual IXMLWriter* createXMLWriter(const path& filename) =0; +New methods + virtual IReadFile* createLimitReadFile(const path& fileName, + IReadFile* alreadyOpenedFile, long pos, long areaSize) =0; + virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0; + virtual bool addFileArchive(const path& filename, bool ignoreCase=true, bool ignorePaths=true, + E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN) =0; + virtual void addArchiveLoader(IArchiveLoader* loader) =0; + virtual u32 getFileArchiveCount() const =0; + virtual bool removeFileArchive(u32 index) =0; + virtual bool removeFileArchive(const path& filename) =0; + virtual bool moveFileArchive(u32 sourceIndex, s32 relative) =0; + virtual IFileArchive* getFileArchive(u32 index) =0; + virtual path& flattenFilename(path& directory, const path& root="/") const =0; + virtual EFileSystemType setFileListSystem(EFileSystemType listType) =0; +Deprecate methods + virtual bool addZipFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) + virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) + virtual bool addPakFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) +Constification of method + virtual IFileList* createFileList() =0; + +IrrlichtDevice.h +Renamed method (from setResizeAble) + virtual void setResizable(bool resize=false) = 0; +New methods + virtual void minimizeWindow() =0; + virtual void maximizeWindow() =0; + virtual void restoreWindow() =0; + virtual bool setGammaRamp(f32 red, f32 green, f32 blue, + f32 relativebrightness, f32 relativecontrast) =0; + virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue, + f32 &brightness, f32 &contrast) =0; + virtual E_DEVICE_TYPE getType() const = 0; + +irrMath.h +Renamed from ROUNDING_ERROR_32 + const f32 ROUNDING_ERROR_f32 = 0.000001f; +Renamed from ROUNDING_ERROR_64 + const f64 ROUNDING_ERROR_f64 = 0.00000001; +New constant + const s32 ROUNDING_ERROR_S32 = 1; +New methods + bool isnotzero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32) + u16 if_c_a_else_b ( const s16 condition, const u16 a, const u16 b ) + f32 squareroot(const f32 f) + f64 squareroot(const f64 f) + s32 squareroot(const s32 f) + f64 reciprocal_squareroot(const f64 x) + s32 reciprocal_squareroot(const s32 x) + f64 reciprocal ( const f64 f ) + +IGPUProgrammingServices.h +Changed parameters to use io::path + virtual s32 addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFileName, + const c8* vertexShaderEntryPointName = "main", + E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, + const io::path& pixelShaderProgramFileName = "", + const c8* pixelShaderEntryPointName = "main", + E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, + IShaderConstantSetCallBack* callback = 0, + virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName, + const io::path& pixelShaderProgramFileName, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0) = 0; + +ISceneNode.h +New method + virtual bool isTrulyVisible() const + +IEventReceiver.h +New enum values + EMIE_MOUSE_DOUBLE_CLICK, + EMIE_MOUSE_TRIPLE_CLICK, + EGET_DIRECTORY_SELECTED, + EGET_EDITBOX_CHANGED, + EGET_EDITBOX_MARKING_CHANGED, + EGET_TREEVIEW_NODE_DESELECT, + EGET_TREEVIEW_NODE_SELECT, + EGET_TREEVIEW_NODE_EXPAND, + EGET_TREEVIEW_NODE_COLLAPS, + EGET_COUNT +New enum + enum E_MOUSE_BUTTON_STATE_MASK +New members + bool Shift:1; + bool Control:1; + u32 ButtonStates; +New methods + bool isLeftPressed() const { return 0 != ( ButtonStates & EMBSM_LEFT ); } + bool isRightPressed() const { return 0 != ( ButtonStates & EMBSM_RIGHT ); } + bool isMiddlePressed() const { return 0 != ( ButtonStates & EMBSM_MIDDLE ); } +Types changed + bool PressedDown:1; + bool Shift:1; + bool Control:1; + +IGUISpriteBank.h +New method + virtual void draw2DSpriteBatch(const core::array& indices, const core::array& pos, + const core::rect* clip=0, + const video::SColor& color= video::SColor(255,255,255,255), + u32 starttime=0, u32 currenttime=0, + bool loop=true, bool center=false) = 0; + +SMaterial.h +New enums + enum E_COMPARISON_FUNC + enum E_COLOR_PLANE + enum E_ALPHA_SOURCE + enum E_ANTI_ALIASING_MODE + enum E_COLOR_MATERIAL +New parameters + inline f32 pack_texureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE ) + inline void unpack_texureBlendFunc ( E_BLEND_FACTOR &srcFact, E_BLEND_FACTOR &dstFact, + E_MODULATE_FUNC &modulo, u32& alphaSource, const f32 param ) +New methods + inline bool textureBlendFunc_hasAlpha ( const E_BLEND_FACTOR factor ) +Default value set elsewhere now (see IrrCompileConfig.h) + const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_; +Types changed + u8 ZBuffer; + bool Wireframe:1; + bool PointCloud:1; + bool GouraudShading:1; + bool Lighting:1; + bool ZWriteEnable:1; + bool BackfaceCulling:1; + bool FrontfaceCulling:1; + bool FogEnable:1; + bool NormalizeNormals:1; +New members + u8 AntiAliasing; + u8 ColorMask:4; + u8 ColorMaterial:3; +New constant + IRRLICHT_API extern SMaterial IdentityMaterial; + +IGUISkin.h +New enum values + EGDS_TITLEBARTEXT_DISTANCE_X, + EGDS_TITLEBARTEXT_DISTANCE_Y, + +quaternion.h +New parameters + void getMatrix( matrix4 &dest, const vector3df &translation ) const; +New method + void getMatrixCenter( matrix4 &dest, const vector3df ¢er, const vector3df &translation ) const; + +ISceneNodeAnimatorCameraFPS.h +New method + virtual void setInvertMouse(bool invert) = 0; + +IImage.h +New enum values + /** Floating Point formats. The following formats may only be used for render target textures. */ + ECF_R16F, + ECF_G16R16F, + ECF_A16B16G16R16F, + ECF_R32F, + ECF_G32R32F, + ECF_A32B32G32R32F, + ECF_UNKNOWN +Signedness change + virtual const core::dimension2d& getDimension() const = 0; + virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format=ECF_A8R8G8B8, u32 pitch=0) =0; +New parameter + virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend = false ) = 0; +New method + virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false) = 0; + static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format) + static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format) + +IVideoDriver.h +New enum values (only existing if _IRR_MATERIAL_MAX_TEXTURES_ large enough) + ETS_TEXTURE_4 + ETS_TEXTURE_5 + ETS_TEXTURE_6 + ETS_TEXTURE_7 +New enums + enum E_RENDER_TARGET + enum E_FOG_TYPE +New type + struct SOverrideMaterial +New methods + virtual u32 getImageLoaderCount() const = 0; + virtual IImageLoader* getImageLoader(u32 n) = 0; + virtual u32 getImageWriterCount() const = 0; + virtual IImageWriter* getImageWriter(u32 n) = 0; + virtual bool setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true, + bool clearZBuffer=true, SColor color=video::SColor(0,0,0,0)) =0; + virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primCount, + E_VERTEX_TYPE vType=EVT_STANDARD, + scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, + E_INDEX_TYPE iType=EIT_16BIT) =0; + virtual void draw2DImageBatch(const video::ITexture* texture, + const core::array >& positions, + const core::array >& sourceRects, + const core::rect* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false) =0; + virtual void turnLightOn(s32 lightIndex, bool turnOn) =0; + virtual bool writeImageToFile(IImage* image, io::IWriteFile* file, u32 param =0) =0; + virtual IImage* createImage(ITexture* texture, + const core::position2d& pos, const core::dimension2d& size) =0; + virtual void setMinHardwareBufferVertexCount(u32 count) =0; + virtual SOverrideMaterial& getOverrideMaterial() =0; +Changed parameters to use io::path + virtual ITexture* getTexture(const io::path& filename) = 0; + virtual void renameTexture(ITexture* texture, const io::path& newName) = 0; + virtual ITexture* addTexture(const io::path& name, IImage* image) = 0; + virtual IImage* createImageFromFile(const io::path& filename) = 0; + virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0; + virtual video::ITexture* findTexture(const io::path& filename) = 0; +Changed signedness + virtual ITexture* addTexture(const core::dimension2d& size, + const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0; + virtual const core::dimension2d& getScreenSize() const =0; + virtual const core::dimension2d& getCurrentRenderTargetSize() const =0; + virtual IImage* createImageFromData(ECOLOR_FORMAT format, + const core::dimension2d& size, void *data, + bool ownForeignMemory=false, + bool deleteMemory = true) =0; + virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d& size) =0; + virtual IImage* createImage(IImage* imageToCopy, + const core::position2d& pos, + const core::dimension2d& size) =0; + virtual void OnResize(const core::dimension2d& size) =0; +Changed signedness and usage of io::path + virtual ITexture* addRenderTargetTexture(const core::dimension2d& size, + const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0; +Removed deprecated method + virtual ITexture* createRenderTargetTexture(const core::dimension2d& size, + const c8* name=0) =0; +New parameter + virtual void makeColorKeyTexture(video::ITexture* texture, + video::SColor color, bool zeroTexels = false) const =0; + virtual void makeColorKeyTexture(video::ITexture* texture, + core::position2d colorKeyPixelPos, bool zeroTexels = false) const =0; +Changed parameters + virtual void setFog(SColor color=SColor(0,255,255,255), + E_FOG_TYPE fogType=EFT_FOG_LINEAR, + f32 start=50.0f, f32 end=100.0f, f32 density=0.01f, + bool pixelFog=false, bool rangeFog=false) =0; +Changed return types + virtual s32 addDynamicLight(const SLight& light) =0; + +EDriverFeatures.h +New enum values + EVDF_ALPHA_TO_COVERAGE, + EVDF_COLOR_MASK, + +IGUIScrollBar.h +New methods + virtual void setMin(s32 max) = 0; + virtual s32 getMin() const = 0; + +IQ3LevelMesh.h +Removed method + virtual void releaseMesh(s32 index) = 0; +Made return value non-const + virtual quake3::tQ3EntityList& getEntityList() = 0; + +ISceneCollisionManager.h +New parameter + virtual bool getCollisionPoint(const core::line3d& ray, + ITriangleSelector* selector, core::vector3df& outCollisionPoint, + core::triangle3df& outTriangle, const ISceneNode*& outNode) =0; + virtual core::vector3df getCollisionResultPosition( + ITriangleSelector* selector, + const core::vector3df &ellipsoidPosition, + const core::vector3df& ellipsoidRadius, + const core::vector3df& ellipsoidDirectionAndSpeed, + core::triangle3df& triout, + core::vector3df& hitPosition, + bool& outFalling, + const ISceneNode*& outNode, + f32 slidingSpeed = 0.0005f, + const core::vector3df& gravityDirectionAndSpeed = core::vector3df(0.0f, 0.0f, 0.0f)) = 0; +Made parameter const& + virtual core::line3d getRayFromScreenCoordinates( + const core::position2d & pos, ICameraSceneNode* camera = 0) = 0; + virtual core::position2d getScreenCoordinatesFrom3DPosition( + const core::vector3df & pos, ICameraSceneNode* camera=0) = 0; +Made parameter const& and added new parameter + virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d& pos, + s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0; + virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d& ray, + s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0; +New method + virtual ISceneNode* getSceneNodeAndCollisionPointFromRay( + core::line3df ray, core::vector3df & outCollisionPoint, + core::triangle3df & outTriangle, s32 idBitMask = 0, + ISceneNode * collisionRootNode = 0, bool noDebugObjects = false) = 0; + +irrlicht.h +Changed interface of method (qualifiers and signedness) + extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice( + video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE, + // parantheses are necessary for some compilers + const core::dimension2d& windowSize = (core::dimension2d(640,480)), + u32 bits = 16, + bool fullscreen = false, + bool stencilbuffer = false, + bool vsync = false, + IEventReceiver* receiver = 0); + extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx( + const SIrrlichtCreationParameters& parameters); + +IImageLoader.h +Changed parameters to use io::path + virtual bool isALoadableFileExtension(const io::path& filename) const = 0; + +IGUIWindow.h +New methods + virtual bool isDraggable() const = 0; + virtual void setDraggable(bool draggable) = 0; + virtual void setDrawBackground(bool draw) = 0; + virtual bool getDrawBackground() const = 0; + virtual void setDrawTitlebar(bool draw) = 0; + virtual bool getDrawTitlebar() const = 0; + +ICameraSceneNode.h +New methods + virtual void setViewMatrixAffector(const core::matrix4& affector) =0; + virtual const core::matrix4& getViewMatrixAffector() const =0; + +EGUIElementTypes.h +New enum value + EGUIET_TREE_VIEW, + +IImageWriter.h +Changed parameters to use io::path + virtual bool isAWriteableFileExtension(const io::path& filename) const = 0; + +SIrrCreationParameters.h +Added members + E_DEVICE_TYPE DeviceType; + bool Doublebuffer; + bool Stereobuffer; +Changed signedness + core::dimension2d WindowSize; +Changed type (from bool) + u8 AntiAlias; + +matrix4.h +New methods + bool isOrthogonal() const; + CMatrix4& buildRotateFromTo(const core::vector3df& from, const core::vector3df& to); + void setRotationCenter(const core::vector3df& center, const core::vector3df& translate); + void buildAxisAlignedBillboard( const core::vector3df& camPos, + const core::vector3df& center, const core::vector3df& translation, + const core::vector3df& axis, const core::vector3df& from); + +IWriteFile.h +Changed parameters to use io::path + virtual const path& getFileName() const = 0; + +IGUITable.h +New methods + virtual void setSelected( s32 index ) = 0; +Changed type (from wide c string) + virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0; + virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0; + +SKeyMap.h +New enum value + EKA_CROUCH, + +IGUIFont.h +Changed type (from wide c string) + virtual void draw(const core::stringw& text, const core::rect& position, + video::SColor color, bool hcenter=false, bool vcenter=false, + const core::rect* clip=0) = 0; +Changed signedness + virtual core::dimension2d getDimension(const wchar_t* text) const = 0; +New method + virtual void setInvisibleCharacters( const wchar_t *s ) = 0; + +IMeshCache.h +Changed parameters to use io::path + virtual void addMesh(const io::path& filename, IAnimatedMesh* mesh) = 0; + virtual IAnimatedMesh* getMeshByFilename(const io::path& filename) = 0; + virtual const io::path& getMeshFilename(u32 index) const = 0; + virtual const io::path& getMeshFilename(const IAnimatedMesh* const mesh) const = 0; + virtual const io::path& getMeshFilename(const IMesh* const mesh) const = 0; + virtual bool setMeshFilename(u32 index, const io::path& filename) = 0; + virtual bool setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename) = 0; + virtual bool setMeshFilename(const IMesh* const mesh, const io::path& filename) = 0; + virtual bool isMeshLoaded(const io::path& filename) = 0; + +IGUIButton.h +Added default value + virtual void setImage(video::ITexture* image=0) = 0; + virtual void setPressedImage(video::ITexture* image=0) = 0; + virtual void setSpriteBank(IGUISpriteBank* bank=0) = 0; + virtual void setIsPushButton(bool isPushButton=true) = 0; + virtual void setPressed(bool pressed=true) = 0; + virtual void setUseAlphaChannel(bool useAlphaChannel=true) = 0; + virtual void setDrawBorder(bool border=true) = 0; +New methods + virtual void setScaleImage(bool scaleImage=true) = 0; + virtual bool isScalingImage() const = 0; + +position2d.h +Replaced by vector2d + +IGUIImageList.h +New interface + class IGUIImageList : public virtual IReferenceCounted + +rect.h +Added second template parameter to allow mismatched signedness + template + rect(const position2d& pos, const dimension2d& size) + +IParticleEmitter.h +Removed wrong overrides + virtual void serializeAttributes(io::IAttributes* out, + io::SAttributeReadWriteOptions* options=0) const {} + virtual s32 deserializeAttributes(s32 startIndex, io::IAttributes* in, + io::SAttributeReadWriteOptions* options=0) { return 0; } + +IOSOperator.h +Return const string + virtual const c8* getTextFromClipboard() const = 0; + +IGUIElement.h +Signedness change + void setMaxSize(core::dimension2du size) + void setMinSize(core::dimension2du size) + +IReadFile.h +Changed parameters to use io::path + virtual const io::path& getFileName() const = 0; + IReadFile* createReadFile(const io::path& fileName); + IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize); + IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped); + +IGUITabControl.h +New methods + virtual void setTabMaxWidth(s32 width ) = 0; + virtual s32 getTabMaxWidth() const = 0; + +IParticleAffector.h +Removed wrong overrides + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {} + virtual s32 deserializeAttributes(s32 startIndex, io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) { return 0; } + +ILogger.h +New method + virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; + +vector2d.h +New methods + vector2d(const dimension2d& other) : X(other.Width), Y(other.Height) {} + vector2d& operator=(const dimension2d& other) { X = other.Width; Y = other.Height; return *this; } + vector2d operator+(const dimension2d& other) const { return vector2d(X + other.Width, Y + other.Height); } + vector2d& operator+=(const dimension2d& other) { X += other.Width; Y += other.Height; return *this; } + vector2d operator-(const dimension2d& other) const { return vector2d(X - other.Width, Y - other.Height); } + vector2d& operator-=(const dimension2d& other) { X -= other.Width; Y -= other.Height; return *this; } + // These methods are declared in dimension2d, but need definitions of vector2d + template + dimension2d::dimension2d(const vector2d& other) : Width(other.X), Height(other.Y) { } + template + bool dimension2d::operator==(const vector2d& other) const { return Width == other.X && Height == other.Y; } + +Changes for Version 1.6.1 +------------------------- +This is again just a bugfix release. However, some minor API changes have happened. The most important one is the removal of lins anti-aliasing from SMaterial's default values. Please add that line smoothing flag to the materials you want to be smoothed. But note that this may lead to drastically reduced performance, if no multi-sampling is active. + +IFileList.h +new methods + virtual u32 getID(u32 index) const = 0; + virtual u32 addItem(const io::path& fullPath, u32 size, bool isDirectory, u32 id=0) = 0; + virtual void sort() = 0; + +IrrCompileConfig.h +Removed auto recognition of Solaris OS, please define the setting on your own if you need it + _IRR_SOLARIS_PLATFORM_ + +IGUITreeView.h +removed methods (use automatically generated versions) + IGUITreeViewNode() {} + virtual ~IGUITreeViewNode() {} + virtual ~IGUITreeView() {} + +IFileSystem.h +new method + virtual IFileList* createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths) =0; + +SMaterial.h +Removed default value (EAAM_LINE_SMOOTH from AntiAliasing) + ZBuffer(ECFN_LESSEQUAL), AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL), + +IGUISkin.h +new enum value + EGST_COUNT + + +Changes for Version 1.7 +------------------------- +This version has less API-breaking changes than the previous major changes. It has many new features, which simply add methods. All those changes, which affect old methods or structures are mostly put in parallel to the old (and now deprecated) methods. Only a few things are changed without backward compatibility: The texture wrap mode is split into separate U and V modes. The beginScene void* parameter has been replaced by an SExposedVideoData. Simply wrap the pointer with this struct and it should work again. +EMIE_LMOUSE_DOUBLE_CLICK replaces EMIE_MOUSE_DOUBLE_CLICK and EMIE_LMOUSE_TRIPLE_CLICK replaces EMIE_MOUSE_TRIPLE_CLICK +Elements used in the array container need now to have an operator= +Here comes the full list: + +path.h +New type +struct SNamedPath + +triangle3d.h +New method +bool isTotalOutsideBox(const aabbox3d& box) const + +ESceneNodeTypes.h +Changed enum value (from octt) +ESNT_OCTREE = MAKE_IRR_ID('o','c','t','r'), + +SColor.h +New method +f32 getLightness() const + +driverChoice.h +New method +static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true) + +ITexture.h +New parameter +virtual void regenerateMipMapLevels(void* mipmapData=0) = 0; +Changed return value (from io:path) +const io::SNamedPath& getName() const { return NamedPath; } + +SceneParameters.h +New scene parameters +const c8* const OBJ_TEXTURE_PATH = "OBJ_TexturePath"; +const c8* const B3D_TEXTURE_PATH = "B3D_TexturePath"; + +IMeshManipulator.h +Not virtual anymore +void setVertexColorAlpha(IMesh* mesh, s32 alpha) const +void setVertexColors(IMesh* mesh, video::SColor color) const +void scale(IMeshBuffer* buffer, const core::vector3df& factor) const +void scaleMesh(IMesh* mesh, const core::vector3df& factor) const +void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const +void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const +void transform(IMesh* mesh, const core::matrix4& m) const +void transform(IMeshBuffer* buffer, const core::matrix4& m) const +New method +template +bool apply(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate=false) const +template +bool apply(const Functor& func, IMesh* mesh, bool boundingBoxUpdate=false) const +virtual void recalculateTangents(IMesh* mesh, bool recalculateNormals=false, + bool smooth=false, bool angleWeighted=false) const=0; +void scale(IMesh* mesh, const core::vector3df& factor) const +New parameter +virtual IMesh* createMeshWithTangents(IMesh* mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false, bool recalculateTangents=true) const = 0; + +coreutil.h +Changed return type and parameters (from stringc/w) +inline io::path& cutFilenameExtension ( io::path &dest, const io::path &source ) +inline io::path& getFileNameExtension ( io::path &dest, const io::path &source ) +inline io::path& deletePathFromFilename(io::path& filename) +Fixed behavior +inline io::path& deletePathFromPath(io::path& filename, s32 pathCount) + +ICursorControl.h +Return const-ref +virtual const core::position2d& getPosition() = 0; + +irrArray.h +Fixed allocator template usage +array(const array& other) : data(0) +const array& operator=(const array& other) +bool operator == (const array& other) const +bool operator != (const array& other) const +Changed behavior for free_when_destroyed +void set_pointer(T* newPointer, u32 size, bool _is_sorted=false, bool _free_when_destroyed=true) +void set_free_when_destroyed(bool f) + +irrMap.h +Renamed method (from isEmpty) +bool empty() const +New method +void swap(map& other) + +IAnimatedMesh.h +virtual f32 getAnimationSpeed() const =0; + +IAttributes.h +Made parameters const-ref +virtual void addArray(const c8* attributeName, const core::array& value) = 0; +virtual void setAttribute(const c8* attributeName, const core::array& value) = 0; +virtual void setAttribute(s32 index, const core::array& value) = 0; + +ISceneManager.h +Renamed method (from OctTree) +virtual IMeshSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0; +virtual IMeshSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; +virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode=32) = 0; +New parameter (makeActive) +virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& lookat = core::vector3df(0,0,100), + s32 id=-1, bool makeActive=true) = 0; +virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent = 0, + f32 rotateSpeed = -1500.0f, f32 zoomSpeed = 200.0f, + f32 translationSpeed = 1500.0f, s32 id=-1, + bool makeActive=true) = 0; +virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1, + SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, + f32 jumpSpeed = 0.f, bool invertMouse=false, + bool makeActive=true) = 0; +Make parameter const +virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader, + ISceneNode* parent=0, s32 id=-1) = 0; +New parameter (loop, pingpong) +virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, + const core::array< core::vector3df >& points, + f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false) = 0; + +SMaterialLayer.h +New clamp modes +ETC_MIRROR_CLAMP, ETC_MIRROR_CLAMP_TO_EDGE, ETC_MIRROR_CLAMP_TO_BORDER +New material layer modes (replaces TextureWrap) +TextureWrapU(ETC_REPEAT), TextureWrapV(ETC_REPEAT) + +vector3d.h +Use tolerance to compare, changed order function to total order +bool operator<=(const vector3d&other) const +bool operator>=(const vector3d&other) const +bool operator<(const vector3d&other) const +bool operator>(const vector3d&other) const +New method +vector3d getSphericalCoordinateAngles() +New method specializations +template <> +inline vector3d vector3d::operator /(s32 val) const {return core::vector3d(X/val,Y/val,Z/val);} +template <> +inline vector3d& vector3d::operator /=(s32 val) {X/=val;Y/=val;Z/=val; return *this;} + +SExposedVideoData.h +New constructors +SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;} +explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;} + +IGUIEnvironment.h +New method +virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) = 0; +New parameter (image) +virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0, + bool modal = true, s32 flags = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) = 0; + +IGeometryCreator.h +New method +IMesh* createPlaneMesh(const core::dimension2d& tileSize, + const core::dimension2d& tileCount, + video::SMaterial* material, + const core::dimension2d& textureRepeatCount) const + +IFileArchive.h +New archive type +EFAT_NPK = MAKE_IRR_ID('N','P','K', 0), +New member for storing the password of AES-encrypted archives +core::stringc Password; + +IFileSystem.h +New parameter (password) +virtual bool addFileArchive(const path& filename, bool ignoreCase=true, + bool ignorePaths=true, + E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, + const core::stringc& password="") =0; + +IrrlichtDevice.h +New method +virtual void clearSystemMessages() = 0; + +irrMath.h +Changed constant (from 1) +const s32 ROUNDING_ERROR_S32 = 0; +New method +template +inline void swap(T& a, T& b) + +IGPUProgrammingServices.h +New parameters (for geometry shaders) +virtual s32 addHighLevelShaderMaterial +virtual s32 addHighLevelShaderMaterialFromFiles +virtual s32 addHighLevelShaderMaterialFromFiles +New overload (for calling with geometry shaders) +s32 addHighLevelShaderMaterial +s32 addHighLevelShaderMaterialFromFiles +s32 addHighLevelShaderMaterialFromFiles + +ISceneNode.h +New types + typedef core::list ISceneNodeList; + typedef core::list ISceneNodeAnimatorList; + +IEventReceiver.h +Renamed events (split from EMIE_MOUSE_*) +EMIE_LMOUSE_DOUBLE_CLICK, +EMIE_RMOUSE_DOUBLE_CLICK, +EMIE_MMOUSE_DOUBLE_CLICK, +EMIE_LMOUSE_TRIPLE_CLICK, +EMIE_RMOUSE_TRIPLE_CLICK, +EMIE_MMOUSE_TRIPLE_CLICK, + +IGUISpriteBank.h +New method +virtual s32 addTextureAsSprite(video::ITexture* texture) = 0; +virtual void clear() = 0; + +SMaterial.h +Changed binary packing (non-visible from user calls) +inline f32 pack_texureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE ) + +IGUISkin.h +New values +EGDS_MESSAGE_BOX_GAP_SPACE, +EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH, +EGDS_MESSAGE_BOX_MAX_TEST_WIDTH, +EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT, +EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT, +New parameter (checkClientArea) +virtual core::rect draw3DWindowBackground(IGUIElement* element, + bool drawTitleBar, video::SColor titleBarColor, + const core::rect& rect, + const core::rect* clip=0, + core::rect* checkClientArea=0) = 0; + +quaternion.h +New operator +bool operator!=(const quaternion& other) const; +New method +inline quaternion& set(const core::quaternion& quat); +inline bool equals(const quaternion& other, + const f32 tolerance = ROUNDING_ERROR_f32 ) const; + +irrList.h +New method +u32 size() const +void swap(list& other) + +IVideoDriver.h +New render targets +ERT_MULTI_RENDER_TEXTURES +New class +struct IRenderTarget +Changed parameter (from void*) +virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect* sourceRect=0) =0; +New parameter (mipmapData) +virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0; +New method +virtual bool setRenderTarget(const core::array& texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)) =0; +void drawIndexedTriangleFan(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +virtual void getFog(SColor& color, E_FOG_TYPE& fogType, + f32& start, f32& end, f32& density, + bool& pixelFog, bool& rangeFog) = 0; +virtual SMaterial& getMaterial2D() =0; +virtual void enableMaterial2D(bool enable=true) =0; +virtual core::dimension2du getMaxTextureSize() const =0; +Made non-virtual +void drawIndexedTriangleList(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleList(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleList(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleFan(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + +EDriverFeatures.h +New driver feature enums +EVDF_MULTIPLE_RENDER_TARGETS, +EVDF_MRT_BLEND, +EVDF_MRT_COLOR_MASK, +EVDF_MRT_BLEND_FUNC, +EVDF_GEOMETRY_SHADER, + +IGUIWindow.h +New method +virtual core::rect getClientRect() const = 0; + +IGUIContextMenu.h +New enum +enum ECONTEXT_MENU_CLOSE +New method +virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0; +virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0; +virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; +virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0; +virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0; +virtual bool getItemAutoChecking(u32 idx) const = 0; +virtual void setEventParent(IGUIElement *parent) = 0; +New parameter +virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; + +SIrrCreationParameters.h +New parameter (LoggingLevel) +createDevice + +matrix4.h +New method +bool equals(const core::CMatrix4& other, const T tolerance=(T)ROUNDING_ERROR_f64) const; + +SSkinMeshBuffer.h +Renamed method (from MoveTo_2TCoords) +virtual void convertTo2TCoords() +Renamed method (from MoveTo_Tangents) +virtual void convertToTangents() + +SVertexManipulator.h +New classes (for vertex manipulation) +class SVertexColorSetManipulator : public IVertexManipulator +class SVertexColorSetAlphaManipulator : public IVertexManipulator +class SVertexColorInvertManipulator : public IVertexManipulator +class SVertexColorThresholdManipulator : public IVertexManipulator +class SVertexColorBrightnessManipulator : public IVertexManipulator +class SVertexColorContrastManipulator : public IVertexManipulator +class SVertexColorContrastBrightnessManipulator : public IVertexManipulator +class SVertexColorGammaManipulator : public IVertexManipulator +; +class SVertexColorScaleManipulator : public IVertexManipulator +class SVertexColorDesaturateToLightnessManipulator : public IVertexManipulator +class SVertexColorDesaturateToAverageManipulator : public IVertexManipulator +class SVertexColorDesaturateToLuminanceManipulator : public IVertexManipulator +class SVertexColorInterpolateLinearManipulator : public IVertexManipulator +class SVertexColorInterpolateQuadraticManipulator : public IVertexManipulator +class SVertexPositionScaleManipulator : public IVertexManipulator +; +class SVertexPositionScaleAlongNormalsManipulator : public IVertexManipulator +class SVertexPositionTransformManipulator : public IVertexManipulator +class SVertexTCoordsScaleManipulator : public IVertexManipulator + +IMeshCache.h +Renamed method (from getMeshByFilename) +virtual IAnimatedMesh* getMeshByName(const io::path& name) = 0; +Renamed method and changed return type (from getMeshFilename/io::path) +virtual const io::SNamedPath& getMeshName(u32 index) const = 0; +virtual const io::SNamedPath& getMeshName(const IAnimatedMesh* const mesh) const = 0; +virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0; +Renamed method (from setMeshFilename) +virtual bool renameMesh(u32 index, const io::path& name) = 0; +virtual bool renameMesh(const IAnimatedMesh* const mesh, const io::path& name) = 0; +virtual bool renameMesh(const IMesh* const mesh, const io::path& name) = 0; + +IGUIElement.h +Changed parameter (to const-ref) + IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment* environment, IGUIElement* parent, +s32 id, const core::rect& rectangle) +New method +virtual bool hasType(EGUI_ELEMENT_TYPE type) const + +irrString.h +Changed parameter (to template with allocator) in all methods with templates +Made destructor non-virtual +~string() +Added parameter +s32 find(const B* const str, const u32 start = 0) const +New method +void remove(T c) +void remove(const string toRemove) +void removeChars(const string & characters) +template +u32 split(container& ret, const T* const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const + +vector2d.h +Use tolerance to compare, changed order function to total order +bool operator<=(const vector2d&other) const +bool operator>=(const vector2d&other) const +bool operator<(const vector2d&other) const +bool operator>(const vector2d&other) const + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.cbp b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.cbp new file mode 100644 index 0000000..bba207a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.dev b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.dev new file mode 100644 index 0000000..9de3da7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 01 HelloWorld +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput= +OverrideOutput=1 +OverrideOutputName=01.HelloWorld.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.vcproj b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.vcproj new file mode 100644 index 0000000..3a2fdb0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc10.vcxproj new file mode 100644 index 0000000..696621f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 01.HelloWorld + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9} + HelloWorld + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/HelloWorld.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/HelloWorld.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/HelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/HelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc11.vcxproj new file mode 100644 index 0000000..f5f1fae --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 01.HelloWorld + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9} + HelloWorld + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/HelloWorld.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/HelloWorld.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/HelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/HelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc8.vcproj new file mode 100644 index 0000000..ac11031 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc9.vcproj new file mode 100644 index 0000000..982d202 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/HelloWorld_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/Makefile b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/Makefile new file mode 100644 index 0000000..c834ab7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler + +# Name of the executable created (.exe will be added automatically if necessary) +Target := 01.HelloWorld +# List of source files, separated by spaces +Sources := main.cpp +# Path to Irrlicht directory, should contain include/ and lib/ +IrrlichtHome := ../.. +# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems +BinPath = ../../bin/$(SYSTEM) + +# general compiler settings (might need to be set when compiling the lib, too) +# preprocessor flags, e.g. defines and include paths +USERCPPFLAGS = +# compiler flags such as optimization flags +USERCXXFLAGS = -O3 -ffast-math +#USERCXXFLAGS = -g -Wall +# linker flags such as additional libraries and link paths +USERLDFLAGS = + +#### +#no changes necessary below this line +#### + +CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS) +CXXFLAGS = $(USERCXXFLAGS) +LDFLAGS = $(USERLDFLAGS) + +#default target is Linux +all: all_linux + +# target specific settings +all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc +all_win32 clean_win32 static_win32: SUF=.exe +static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ +all_win32: LDFLAGS += -lopengl32 -lm +static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = $(BinPath)/$(Target)$(SUF) + +all_linux all_win32 static_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 static_win32 clean clean_linux clean_win32 + +#multilib handling +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif +#solaris real-time features +ifeq ($(HOSTTYPE), sun4) +LDFLAGS += -lrt +endif + diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/main.cpp b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/main.cpp new file mode 100644 index 0000000..a53483c --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/main.cpp @@ -0,0 +1,236 @@ +/** Example 001 HelloWorld + +This Tutorial shows how to set up the IDE for using the Irrlicht Engine and how +to write a simple HelloWorld program with it. The program will show how to use +the basics of the VideoDriver, the GUIEnvironment, and the SceneManager. +Microsoft Visual Studio is used as an IDE, but you will also be able to +understand everything if you are using a different one or even another +operating system than windows. + +You have to include the header file in order to use the engine. The +header file can be found in the Irrlicht Engine SDK directory \c include. To let +the compiler find this header file, the directory where it is located has to be +specified. This is different for every IDE and compiler you use. Let's explain +shortly how to do this in Microsoft Visual Studio: + +- If you use Version 6.0, select the Menu Extras -> Options. + Select the directories tab, and select the 'Include' Item in the combo box. + Add the \c include directory of the irrlicht engine folder to the list of + directories. Now the compiler will find the Irrlicht.h header file. We also + need the irrlicht.lib to be found, so stay in that dialog, select 'Libraries' + in the combo box and add the \c lib/VisualStudio directory. + \image html "vc6optionsdir.jpg" + \image latex "vc6optionsdir.jpg" + \image html "vc6include.jpg" + \image latex "vc6include.jpg" + +- If your IDE is Visual Studio .NET, select Tools -> Options. + Select the projects entry and then select VC++ directories. Select 'show + directories for include files' in the combo box, and add the \c include + directory of the irrlicht engine folder to the list of directories. Now the + compiler will find the Irrlicht.h header file. We also need the irrlicht.lib + to be found, so stay in that dialog, select 'show directories for Library + files' and add the \c lib/VisualStudio directory. + \image html "vcnetinclude.jpg" + \image latex "vcnetinclude.jpg" + +That's it. With your IDE set up like this, you will now be able to develop +applications with the Irrlicht Engine. + +Lets start! + +After we have set up the IDE, the compiler will know where to find the Irrlicht +Engine header files so we can include it now in our code. +*/ +#include + +/* +In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if +you want to use a class of the engine, you have to write irr:: before the name +of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice. +To get rid of the irr:: in front of the name of every class, we tell the +compiler that we use that namespace from now on, and we will not have to write +irr:: anymore. +*/ +using namespace irr; + +/* +There are 5 sub namespaces in the Irrlicht Engine. Take a look at them, you can +read a detailed description of them in the documentation by clicking on the top +menu item 'Namespace List' or by using this link: +http://irrlicht.sourceforge.net/docu/namespaces.html +Like the irr namespace, we do not want these 5 sub namespaces now, to keep this +example simple. Hence, we tell the compiler again that we do not want always to +write their names. +*/ +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +/* +To be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. +We could set this option in the project settings, but to make it easy, we use a +pragma comment lib for VisualStudio. On Windows platforms, we have to get rid +of the console window, which pops up when starting a program with main(). This +is done by the second pragma. We could also use the WinMain method, though +losing platform independence then. +*/ +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") +#endif + + +/* +This is the main method. We can now use main() on every platform. +*/ +int main() +{ + /* + The most important function of the engine is the createDevice() + function. The IrrlichtDevice is created by it, which is the root + object for doing anything with the engine. createDevice() has 7 + parameters: + + - deviceType: Type of the device. This can currently be the Null-device, + one of the two software renderers, D3D8, D3D9, or OpenGL. In this + example we use EDT_SOFTWARE, but to try out, you might want to + change it to EDT_BURNINGSVIDEO, EDT_NULL, EDT_DIRECT3D8, + EDT_DIRECT3D9, or EDT_OPENGL. + + - windowSize: Size of the Window or screen in FullScreenMode to be + created. In this example we use 640x480. + + - bits: Amount of color bits per pixel. This should be 16 or 32. The + parameter is often ignored when running in windowed mode. + + - fullscreen: Specifies if we want the device to run in fullscreen mode + or not. + + - stencilbuffer: Specifies if we want to use the stencil buffer (for + drawing shadows). + + - vsync: Specifies if we want to have vsync enabled, this is only useful + in fullscreen mode. + + - eventReceiver: An object to receive events. We do not want to use this + parameter here, and set it to 0. + + Always check the return value to cope with unsupported drivers, + dimensions, etc. + */ + IrrlichtDevice *device = + createDevice( video::EDT_SOFTWARE, dimension2d(640, 480), 16, + false, false, false, 0); + + if (!device) + return 1; + + /* + Set the caption of the window to some nice text. Note that there is an + 'L' in front of the string. The Irrlicht Engine uses wide character + strings when displaying text. + */ + device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo"); + + /* + Get a pointer to the VideoDriver, the SceneManager and the graphical + user interface environment, so that we do not always have to write + device->getVideoDriver(), device->getSceneManager(), or + device->getGUIEnvironment(). + */ + IVideoDriver* driver = device->getVideoDriver(); + ISceneManager* smgr = device->getSceneManager(); + IGUIEnvironment* guienv = device->getGUIEnvironment(); + + /* + We add a hello world label to the window, using the GUI environment. + The text is placed at the position (10,10) as top left corner and + (260,22) as lower right corner. + */ + guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!", + rect(10,10,260,22), true); + + /* + To show something interesting, we load a Quake 2 model and display it. + We only have to get the Mesh from the Scene Manager with getMesh() and add + a SceneNode to display the mesh with addAnimatedMeshSceneNode(). We + check the return value of getMesh() to become aware of loading problems + and other errors. + + Instead of writing the filename sydney.md2, it would also be possible + to load a Maya object file (.obj), a complete Quake3 map (.bsp) or any + other supported file format. By the way, that cool Quake 2 model + called sydney was modelled by Brian Collins. + */ + IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2"); + if (!mesh) + { + device->drop(); + return 1; + } + IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); + + /* + To let the mesh look a little bit nicer, we change its material. We + disable lighting because we do not have a dynamic light in here, and + the mesh would be totally black otherwise. Then we set the frame loop, + such that the predefined STAND animation is used. And last, we apply a + texture to the mesh. Without it the mesh would be drawn using only a + color. + */ + if (node) + { + node->setMaterialFlag(EMF_LIGHTING, false); + node->setMD2Animation(scene::EMAT_STAND); + node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") ); + } + + /* + To look at the mesh, we place a camera into 3d space at the position + (0, 30, -40). The camera looks from there to (0,5,0), which is + approximately the place where our md2 model is. + */ + smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0)); + + /* + Ok, now we have set up the scene, lets draw everything: We run the + device in a while() loop, until the device does not want to run any + more. This would be when the user closes the window or presses ALT+F4 + (or whatever keycode closes a window). + */ + while(device->run()) + { + /* + Anything can be drawn between a beginScene() and an endScene() + call. The beginScene() call clears the screen with a color and + the depth buffer, if desired. Then we let the Scene Manager and + the GUI Environment draw their content. With the endScene() + call everything is presented on the screen. + */ + driver->beginScene(true, true, SColor(255,100,101,140)); + + smgr->drawAll(); + guienv->drawAll(); + + driver->endScene(); + } + + /* + After we are done with the render loop, we have to delete the Irrlicht + Device created before with createDevice(). In the Irrlicht Engine, you + have to delete all objects you created with a method or function which + starts with 'create'. The object is simply deleted by calling ->drop(). + See the documentation at irr::IReferenceCounted::drop() for more + information. + */ + device->drop(); + + return 0; +} + +/* +That's it. Compile and run. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/01.HelloWorld/tutorial.html b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/tutorial.html new file mode 100644 index 0000000..e46c954 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/01.HelloWorld/tutorial.html @@ -0,0 +1,394 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + + +
Tutorial 1.HelloWorld
+

This Tutorial shows how to set up the IDE for using the + Irrlicht Engine and how to write a simple HelloWorld program + with it. The program will show how to use the basics of + the VideoDriver, the GUIEnvironment and the SceneManager.
+ The result of this example will look like this:

+


+

+
+
+ + + + + + +
Setting up the + IDE
+
+

To use the engine, we will have to include + the header file <irrlicht.h>, which can be found + in the Irrlicht Engine SDK directory \include. To let + the compiler find this header file, the directory where + it is located should be specified somewhere. This is different + for every IDE and compiler. I will explain how to do this + in Microsoft Visual Studio C++ 6.0 and .NET:

+ +
+
    +
  • +
    If you use Version 6.0, select the Menu + Extras -> Options. Select the directories tab, and + select the 'Include' Item in the combo box. Add the + \include directory of the Irrlicht Engine folder to + the list of directories. Now the compiler will find + the Irrlicht.h header file. We also need the location + of irrlicht.lib to be listed, so select the 'Libraries' + tab and add the \lib\VisualStudio directory.
    +
    +   
    +  
    + +
    +
  • +
  • If your IDE is Visual Studio .NET, select Tools -> + Options. Select the Projects entry and then select VC++ + directories. Select 'show directories for include files' + in the combo box, and add the \include directory of the + Irrlicht Engine folder to the list of directories so the + compiler will find the Irrlicht.h header file. We also + need the irrlicht.lib to be found, so select 'show directories + for Library files' and add the \lib\VisualStudio directory.
    +
    + +
    +
  • +
+ +

 

+
+
+ + + + + + + + +
Lets start!
+
+
+
+

After we have set up the IDE, the compiler will know + where to find the Irrlicht Engine header files so + we can include it now into our code.

+ + + + + +
#include <irrlicht.h>
+

In the Irrlicht Engine, everything can be found in + the namespace 'irr'. So if you want to use a class + of the engine, you'll have to type an irr:: before + the name of the class. For example, to use the IrrlichtDevice, + write: irr::IrrlichtDevice. To avoid having to put + irr:: before of the name of every class, we tell the + compiler that we use that namespace.

+ + + + + +
using namespace irr;
+

There are 5 sub-namespaces in the Irrlicht Engine. + Take a look at them: you can read a detailed description + of them in the documentation by clicking on the top + menu item 'Namespace + List'. To keep this example simple, we don't want + to have to specify the name spaces, Hence:

+ + + + + +
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
+

To be able to use the Irrlicht.DLL file, we need + to link with the Irrlicht.lib. We could set this option + in the project settings, but to make it easy we use + a pragma comment:

+ + + + + +
#pragma comment(lib, "Irrlicht.lib")
+

Now the main method: to keep this example simple + we use int main(), which can be used on any platform. + However, on Windows platforms, we could also use the + WinMain method if we would want to get rid of the + console window which pops up when starting a program + with main().

+ + + + + +
int main()
{
+

The most important function of the engine is the + 'createDevice' function. The Irrlicht Device, which + is the root object for doing everything with the engine, + can be created with it. createDevice() has 7 parameters:

+
+
    +
  • + +
    deviceType: Type of the device. This can currently + be the Null device, the Software device, Direct3D8, Direct3D9, + or OpenGL. In this example we use EDT_SOFTWARE, but, to try + them out, you might want to change it to EDT_NULL, EDT_DIRECT3D8, + EDT_DIRECT3D9 or EDT_OPENGL.
    +
  • +
  • +
    windowSize: Size of the window or + full screen mode to be created. In this example + we use 512x384.
    + +
  • +
  • +
    bits: Number of bits per pixel when + in full screen mode. This should be 16 or 32. This + parameter is ignored when running in windowed mode.
    +
  • +
  • +
    fullscreen: Specifies if we want + the device to run in full screen mode or not.
    +
  • +
  • stencilbuffer: Specifies if we want to use the stencil + buffer for drawing shadows.
  • + +
  • vsync: Specifies if we want to have vsync enabled. + This is only useful in full screen mode.
  • +
  • +
    eventReceiver: An object to receive + events. We do not want to use this parameter here, + and set it to 0.
    +
  • +
+ + + + + +
IrrlichtDevice *device =
createDevice(EDT_SOFTWARE, dimension2d<s32>(512, 384), 16,
false, false, false, 0);
+

Now we set the caption of the window to some nice text. + Note that there is a 'L' in front of the string: the + Irrlicht Engine uses wide character strings when displaying + text.

+ + + + + +
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
+

Now we store a pointer to the video driver, the SceneManager, + and the graphical user interface environment so that + we do not always have to write device->getVideoDriver(), + device->getSceneManager(), and device->getGUIEnvironment().

+ + + + + +
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
+

We add a hello world label to the window using the + GUI environment. The text is placed at the position + (10,10) as top left corner and (200,22) as lower right + corner.

+ + + + + +
guienv->addStaticText(L"Hello World! This is the Irrlicht Software engine!",
rect<s32>(10,10,200,22), true);
+

To display something interesting, we load a Quake 2 + model and display it. We only have to get the Mesh from + the Scene Manager with getMesh() and add a SceneNode + to display the mesh with addAnimatedMeshSceneNode(). + Instead of loading a Quake2 file (.md2), it is also + possible to load a Maya object file (.obj), a complete + Quake3 map (.bsp), or a Milshape file (.ms3d).
+ By the way, that cool Quake 2 model called sydney.md2 + was modelled by Brian Collins.

+ + + + + +
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
+

To make the mesh look a little bit nicer, we change + its material a little bit: we disable lighting because + we do not have a dynamic light in here and the mesh + would be totally black. Then we set the frame loop so + that the animation is looped between the frames 0 and + 310. Then, at last, we apply a texture to the mesh. + Without it the mesh would be drawn using only a solid + color.

+ + + + + +
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
}
+
+

To look at the mesh, we place a camera into 3d space + at the position (0, 10, -40). The camera looks from + there to (0,5,0).

+ + + + + +
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
+

Ok. Now that we have set up the scene, let's draw everything: + we run the device in a while() loop until the device + does not want to run any more. This would be when the + user closes the window or presses ALT+F4 in Windows.

+ + + + + +
while(device->run())
{
+

Everything must be drawn between a beginScene() and + an endScene() call. The beginScene clears the screen + with a color and also the depth buffer, if desired. + Then we let the Scene Manager and the GUI environment + draw their content. With the endScene() call, everything + is presented on the screen.

+ + + + + + +
	driver->beginScene(true, true, SColor(255,100,101,140));
+ smgr->drawAll(); + guienv->drawAll();
+
	driver->endScene();
+}
+

After we are finished, we have to delete the Irrlicht + Device created earlier with createDevice(). With the + Irrlicht Engine, you should delete all objects you created + with a method or function that starts with 'create'. + The object is deleted simply by calling ->drop(). + See the documentation + for more information.

+ + + + + +
	device->drop();
return 0; +}
+

That's it. Compile and run.

+

 

+
+
+
+
+ + + + + + + +
Possible Errors + or Problems
+
+
+

Visual Studio
+ + While trying to compile the tutorial, if you get the + error:

+ + + + +
fatal + error C1083: Cannot open include file: 'irrlicht.h': + No such file or directory
+

Solution: You may have set the include directory improperly + in the Visual Studio options. See above + for information on setting it.

+ + + + + +
LINK + : LNK6004: HelloWorld.exe not found or not built + by the last incremental link; performing full link
+ LINK : fatal error LNK1104: cannot open file "Irrlicht.lib"
+ Error executing link.exe
+

Solution: You may have set the library directory improperly. + See above for information on + setting it.
+ +
+

+

Compiler independent problems
+
If the tutorial compiles successfully but gives + the error:

+ + + + + +
This + application has failed to start because Irrlicht.dll + was not found. Re-installing the application may + fix this problem
+

Solution: You may have forgotten to copy the Irrlicht.dll + file from Irrlicht\bin\VisualStudio to the directory + the tutorial's project file is in.

+ If the tutorial compiles and runs successfully but produces + errors in the console like:
+
+ + + + + +
Could + not load mesh, because file could not be opened.: + ../media/sydney.md2
+

Or:

+ + + + + +
Could + not open file of texture: stones.jpg
+
Could not load texture: stones.jpg
+

Solution: The file listed in the error message cannot + be found. Ensure that the directory specified in the + main.cpp exists and is where the file is located.
+

+
+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Makefile b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Makefile new file mode 100644 index 0000000..09953cf --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Makefile @@ -0,0 +1,40 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 02.Quake3Map +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht +static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm +static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ +static_win32 all_win32 clean_win32: SYSTEM=Win32-gcc +static_win32 all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32 static_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 static_win32 diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.cbp b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.cbp new file mode 100644 index 0000000..59f82ba --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.dev b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.dev new file mode 100644 index 0000000..3e0a69e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 02 Quake3Map +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=02.Quake3Map.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.vcproj b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.vcproj new file mode 100644 index 0000000..4416fbb --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc10.vcxproj new file mode 100644 index 0000000..da32873 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 02.Quake3Map + {D1A464A2-D479-458C-98A2-60965D823CD1} + Quake3Map + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Quake3Map.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Quake3Map.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Quake3Map.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Quake3Map.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc11.vcxproj new file mode 100644 index 0000000..579a016 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 02.Quake3Map + {D1A464A2-D479-458C-98A2-60965D823CD1} + Quake3Map + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Quake3Map.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Quake3Map.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Quake3Map.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Quake3Map.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc8.vcproj new file mode 100644 index 0000000..bae5931 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc9.vcproj new file mode 100644 index 0000000..8acc07a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/Quake3Map_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/main.cpp b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/main.cpp new file mode 100644 index 0000000..fc7461f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/main.cpp @@ -0,0 +1,206 @@ +/** Example 002 Quake3Map + +This Tutorial shows how to load a Quake 3 map into the engine, create a +SceneNode for optimizing the speed of rendering, and how to create a user +controlled camera. + +Please note that you should know the basics of the engine before starting this +tutorial. Just take a short look at the first tutorial, if you haven't done +this yet: http://irrlicht.sourceforge.net/tut001.html + +Lets start like the HelloWorld example: We include the irrlicht header files +and an additional file to be able to ask the user for a driver type using the +console. +*/ +#include +#include + +/* +As already written in the HelloWorld example, in the Irrlicht Engine everything +can be found in the namespace 'irr'. To get rid of the irr:: in front of the +name of every class, we tell the compiler that we use that namespace from now +on, and we will not have to write that 'irr::'. There are 5 other sub +namespaces 'core', 'scene', 'video', 'io' and 'gui'. Unlike in the HelloWorld +example, we do not call 'using namespace' for these 5 other namespaces, because +in this way you will see what can be found in which namespace. But if you like, +you can also include the namespaces like in the previous example. +*/ +using namespace irr; + +/* +Again, to be able to use the Irrlicht.DLL file, we need to link with the +Irrlicht.lib. We could set this option in the project settings, but to make it +easy, we use a pragma comment lib: +*/ +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +/* +Ok, lets start. Again, we use the main() method as start, not the WinMain(). +*/ +int main() +{ + /* + Like in the HelloWorld example, we create an IrrlichtDevice with + createDevice(). The difference now is that we ask the user to select + which video driver to use. The Software device might be + too slow to draw a huge Quake 3 map, but just for the fun of it, we make + this decision possible, too. + Instead of copying this whole code into your app, you can simply include + driverChoice.h from Irrlicht's include directory. The function + driverChoiceConsole does exactly the same. + */ + + // ask user for driver + + video::E_DRIVER_TYPE driverType; + + printf("Please select the driver you want for this example:\n"\ + " (a) OpenGL 1.5\n (b) Direct3D 9.0c\n (c) Direct3D 8.1\n"\ + " (d) Burning's Software Renderer\n (e) Software Renderer\n"\ + " (f) NullDevice\n (otherKey) exit\n\n"); + + char i; + std::cin >> i; + + switch(i) + { + case 'a': driverType = video::EDT_OPENGL; break; + case 'b': driverType = video::EDT_DIRECT3D9;break; + case 'c': driverType = video::EDT_DIRECT3D8;break; + case 'd': driverType = video::EDT_BURNINGSVIDEO;break; + case 'e': driverType = video::EDT_SOFTWARE; break; + case 'f': driverType = video::EDT_NULL; break; + default: return 1; + } + + // create device and exit if creation failed + + IrrlichtDevice *device = + createDevice(driverType, core::dimension2d(640, 480)); + + if (device == 0) + return 1; // could not create selected driver. + + /* + Get a pointer to the video driver and the SceneManager so that + we do not always have to call irr::IrrlichtDevice::getVideoDriver() and + irr::IrrlichtDevice::getSceneManager(). + */ + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + /* + To display the Quake 3 map, we first need to load it. Quake 3 maps + are packed into .pk3 files which are nothing else than .zip files. + So we add the .pk3 file to our irr::io::IFileSystem. After it was added, + we are able to read from the files in that archive as if they are + directly stored on the disk. + */ + device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3"); + + /* + Now we can load the mesh by calling + irr::scene::ISceneManager::getMesh(). We get a pointer returned to an + irr::scene::IAnimatedMesh. As you might know, Quake 3 maps are not + really animated, they are only a huge chunk of static geometry with + some materials attached. Hence the IAnimatedMesh consists of only one + frame, so we get the "first frame" of the "animation", which is our + quake level and create an Octree scene node with it, using + irr::scene::ISceneManager::addOctreeSceneNode(). + The Octree optimizes the scene a little bit, trying to draw only geometry + which is currently visible. An alternative to the Octree would be a + irr::scene::IMeshSceneNode, which would always draw the complete + geometry of the mesh, without optimization. Try it: Use + irr::scene::ISceneManager::addMeshSceneNode() instead of + addOctreeSceneNode() and compare the primitives drawn by the video + driver. (There is a irr::video::IVideoDriver::getPrimitiveCountDrawn() + method in the irr::video::IVideoDriver class). Note that this + optimization with the Octree is only useful when drawing huge meshes + consisting of lots of geometry. + */ + scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp"); + scene::ISceneNode* node = 0; + + if (mesh) + node = smgr->addOctreeSceneNode(mesh->getMesh(0), 0, -1, 1024); +// node = smgr->addMeshSceneNode(mesh->getMesh(0)); + + /* + Because the level was not modelled around the origin (0,0,0), we + translate the whole level a little bit. This is done on + irr::scene::ISceneNode level using the methods + irr::scene::ISceneNode::setPosition() (in this case), + irr::scene::ISceneNode::setRotation(), and + irr::scene::ISceneNode::setScale(). + */ + if (node) + node->setPosition(core::vector3df(-1300,-144,-1249)); + + /* + Now we only need a camera to look at the Quake 3 map. + We want to create a user controlled camera. There are some + cameras available in the Irrlicht engine. For example the + MayaCamera which can be controlled like the camera in Maya: + Rotate with left mouse button pressed, Zoom with both buttons pressed, + translate with right mouse button pressed. This could be created with + irr::scene::ISceneManager::addCameraSceneNodeMaya(). But for this + example, we want to create a camera which behaves like the ones in + first person shooter games (FPS) and hence use + irr::scene::ISceneManager::addCameraSceneNodeFPS(). + */ + smgr->addCameraSceneNodeFPS(); + + /* + The mouse cursor needs not be visible, so we hide it via the + irr::IrrlichtDevice::ICursorControl. + */ + device->getCursorControl()->setVisible(false); + + /* + We have done everything, so lets draw it. We also write the current + frames per second and the primitives drawn into the caption of the + window. The test for irr::IrrlichtDevice::isWindowActive() is optional, + but prevents the engine to grab the mouse cursor after task switching + when other programs are active. The call to + irr::IrrlichtDevice::yield() will avoid the busy loop to eat up all CPU + cycles when the window is not active. + */ + int lastFPS = -1; + + while(device->run()) + { + if (device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(255,200,200,200)); + smgr->drawAll(); + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw str = L"Irrlicht Engine - Quake 3 Map example ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + else + device->yield(); + } + + /* + In the end, delete the Irrlicht device. + */ + device->drop(); + return 0; +} + +/* +That's it. Compile and play around with the program. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/02.Quake3Map/tutorial.html b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/tutorial.html new file mode 100644 index 0000000..1858b86 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/02.Quake3Map/tutorial.html @@ -0,0 +1,181 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+ Tutorial 2.Quake3Map
+

This Tutorial shows how to load a Quake 3 map into the engine, create + a SceneNode for optimizing the speed of rendering and how to create + a user controlled camera. Please note that you should know the basics + of the engine before starting this tutorial, just take a short look + at the first tutorial, 1.HelloWorld, if you haven't done this yet.
+ The result of this example will look like this:

+


+

+
+
+ + + + + + + +
+ Lets start!
+

Lets start like the HelloWorld example: We include the irrlicht header + files and an additional file to be able
+ to ask the user for a driver type using the console.

+ + + + +
#include <irrlicht.h>
#include <iostream>
+

As already written in the HelloWorld example, in the Irrlicht Engine, + everything can be found in the namespace 'irr'. To get rid of the irr:: + in front of the name of every class, we tell the compiler that we use + that namespace from now on, and we will not have to write that 'irr::'.
+ There are 5 other sub namespaces 'core', 'scene', 'video', 'io' and + 'gui'. Unlike in the HelloWorld example, we do not a 'using namespace' + for these 5 other namespaces because in this way you will see what can + be found in which namespace. But if you like, you can also include the + namespaces like in the previous example. Code just like you want to.

+ + + + +
using namespace irr;
+

Again, to be able to use the Irrlicht.DLL file, we need to link with + the Irrlicht.lib. We could set this option in the project settings, + but to make it easy, we use a pragma comment lib:

+ + + + +
#pragma comment(lib, "Irrlicht.lib")
+ +
+

Ok, lets start. Again, we use the main() method as start, not the WinMain(), + because its shorter to write.

+ + + + +
int main()
{
+

Like in the HelloWorld example, we create an IrrlichtDevice with createDevice(). + The difference now is that we ask the user to select which hardware accelerated + driver to use. The Software device would be too slow to draw a huge Quake + 3 map, but just for the fun of it, we make this decision possible too.

+ + + + +
// ask user for driver

video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;

printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
+char i;
std::cin >> i;

switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
}

// create device and exit if creation failed

IrrlichtDevice *device =
createDevice(driverType, core::dimension2d<s32>(640, 480));

if (device == 0)
return 1;
+

Get a pointer to the video driver and the SceneManager so that we do + not always have to write device->getVideoDriver() and device->getSceneManager().

+ + + + +
video::IVideoDriver* driver = device->getVideoDriver();
+scene::ISceneManager* smgr = device->getSceneManager();
+

To display the Quake 3 map, we first need to load it. Quake 3 maps are + packed into .pk3 files wich are nothing other than .zip files. So we add + the .pk3 file to our FileSystem. After it was added, we are able to read + from the files in that archive as they would directly be stored on disk.

+ + + + +
device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");
+

Now we can load the mesh by calling getMesh(). We get a pointer returned + to a IAnimatedMesh. As you know, Quake 3 maps are not really animated, + they are only a huge chunk of static geometry with some materials attached. + Hence the IAnimated mesh consists of only one frame,
+ so we get the "first frame" of the "animation", which + is our quake level and create an OctTree scene node with it, using addOctTreeSceneNode(). + The OctTree optimizes the scene a little bit, trying to draw only geometry + which is currently visible. An alternative to the OctTree would be a AnimatedMeshSceneNode, + which would draw always the complete geometry of the mesh, without optimization. + Try it out: Write addAnimatedMeshSceneNode instead of addOctTreeSceneNode + and compare the primitives drawed by the video driver. (There is a getPrimitiveCountDrawed() + method in the IVideoDriver class). Note that this optimization with the + Octree is only useful when drawing huge meshes consiting of lots of geometry.

+ + + + +
scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0; + +if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
+

Because the level was modelled not around the origin (0,0,0), we translate + the whole level a little bit.

+ + + + +
if (node)
node->setPosition(core::vector3df(-1300,-144,-1249));
+

Now we only need a Camera to look at the Quake 3 map. And we want to + create a user controlled camera. There are some different cameras available + in the Irrlicht engine. For example the Maya Camera which can be controlled + compareable to the camera in Maya: Rotate with left mouse button pressed, + Zoom with both buttons pressed,
+ translate with right mouse button pressed. This could be created with + addCameraSceneNodeMaya(). But for this example, we want to create a camera + which behaves like the ones in first person shooter games (FPS):

+ + + + +
smgr->addCameraSceneNodeFPS();
+

The mouse cursor needs not to be visible, so we make it invisible.

+ + + + +
device->getCursorControl()->setVisible(false);
+

We have done everything, so lets draw it. We also write the current frames + per second and the drawn primitives to the caption of the window. The + 'if (device->isWindowActive())' line is optional, but prevents the + engine render to set the position of the mouse cursor after task switching + when other program are active.

+ + + + +
int lastFPS = -1;
+
while(device->run())
+{
+  driver->beginScene(true, true, video::SColor(0,200,200,200));
+  smgr->drawAll();
+  driver->endScene();
+
  int fps = driver->getFPS();
+
  if (lastFPS != fps)
+  {
+     core::stringw str = L"Irrlicht Engine - Quake 3 Map example [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps; + } +}
+

In the end, delete the Irrlicht device.

+ + + + +
  device->drop();
return 0;
}
+

That's it. Compile and play around with the program.

+

 

+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.cbp b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.cbp new file mode 100644 index 0000000..e68ffd3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.cbp @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.dev b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.dev new file mode 100644 index 0000000..57c5ee0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 03 Custom Scene Node +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=03.CustomSceneNode.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.vcproj b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.vcproj new file mode 100644 index 0000000..890d308 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj new file mode 100644 index 0000000..5512e23 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj @@ -0,0 +1,243 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 03.CustomSceneNode + {171CCDFA-C140-4956-8EB7-F0168F4521D3} + CustomSceneNode + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/CustomSceneNode.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/CustomSceneNode.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/CustomSceneNode.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/CustomSceneNode.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + .\Release/CustomSceneNode.pdb + Console + false + + + + + + + .\Release/CustomSceneNode.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/CustomSceneNode.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + .\Release/CustomSceneNode.pdb + Console + false + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj new file mode 100644 index 0000000..52f6ef2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc11.vcxproj @@ -0,0 +1,247 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 03.CustomSceneNode + {171CCDFA-C140-4956-8EB7-F0168F4521D3} + CustomSceneNode + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/CustomSceneNode.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/CustomSceneNode.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/CustomSceneNode.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/CustomSceneNode.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + .\Release/CustomSceneNode.pdb + Console + false + + + + + + + .\Release/CustomSceneNode.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/CustomSceneNode.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + .\Release/CustomSceneNode.pdb + Console + false + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj new file mode 100644 index 0000000..42c7879 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj new file mode 100644 index 0000000..50f0382 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/CustomSceneNode_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/Makefile b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/Makefile new file mode 100644 index 0000000..34e3d43 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 03.CustomSceneNode +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/main.cpp b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/main.cpp new file mode 100644 index 0000000..534f0d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/main.cpp @@ -0,0 +1,267 @@ +/** Example 003 Custom SceneNode + +This Tutorial is more advanced than the previous ones. +If you are currently just playing around with the Irrlicht +engine, you may want to look at other examples first. +This tutorials shows how to create a custom scene node and +how to use it in the engine. A custom scene node is needed +if you want to implement a render technique the Irrlicht +Engine currently does not support. For example, you can write +an indoor portal based renderer or an advanced terrain scene +node with it. By creating custom scene nodes, you can +easily extend the Irrlicht Engine and adapt it to your own +needs. + +I will keep the tutorial simple: Keep everything very +short, everything in one .cpp file, and I'll use the engine +here as in all other tutorials. + +To start, I include the header files, use the irr namespace, +and tell the linker to link with the .lib file. +*/ +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +/* +Here comes the more sophisticated part of this tutorial: +The class of our very own custom scene node. To keep it simple, +our scene node will not be an indoor portal renderer nor a terrain +scene node, but a simple tetraeder, a 3d object consisting of 4 +connected vertices, which only draws itself and does nothing more. +Note that this scenario does not require a custom scene node in Irrlicht. +Instead one would create a mesh from the geometry and pass it to a +irr::scene::IMeshSceneNode. This example just illustrates creation of a custom +scene node in a very simple setting. + +To let our scene node be able to be inserted into the Irrlicht +Engine scene, the class we create needs to be derived from the +irr::scene::ISceneNode class and has to override some methods. +*/ + +class CSampleSceneNode : public scene::ISceneNode +{ + + /* + First, we declare some member variables: + The bounding box, 4 vertices, and the material of the tetraeder. + */ + core::aabbox3d Box; + video::S3DVertex Vertices[4]; + video::SMaterial Material; + + /* + The parameters of the constructor specify the parent of the scene node, + a pointer to the scene manager, and an id of the scene node. + In the constructor we call the parent class' constructor, + set some properties of the material, and + create the 4 vertices of the tetraeder we will draw later. + */ + +public: + + CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id) + : scene::ISceneNode(parent, mgr, id) + { + Material.Wireframe = false; + Material.Lighting = false; + + Vertices[0] = video::S3DVertex(0,0,10, 1,1,0, + video::SColor(255,0,255,255), 0, 1); + Vertices[1] = video::S3DVertex(10,0,-10, 1,0,0, + video::SColor(255,255,0,255), 1, 1); + Vertices[2] = video::S3DVertex(0,20,0, 0,1,1, + video::SColor(255,255,255,0), 1, 0); + Vertices[3] = video::S3DVertex(-10,0,-10, 0,0,1, + video::SColor(255,0,255,0), 0, 0); + + /* + The Irrlicht Engine needs to know the bounding box of a scene node. + It will use it for automatic culling and other things. Hence, we + need to create a bounding box from the 4 vertices we use. + If you do not want the engine to use the box for automatic culling, + and/or don't want to create the box, you could also call + irr::scene::ISceneNode::setAutomaticCulling() with irr::scene::EAC_OFF. + */ + Box.reset(Vertices[0].Pos); + for (s32 i=1; i<4; ++i) + Box.addInternalPoint(Vertices[i].Pos); + } + + /* + Before it is drawn, the irr::scene::ISceneNode::OnRegisterSceneNode() + method of every scene node in the scene is called by the scene manager. + If the scene node wishes to draw itself, it may register itself in the + scene manager to be drawn. This is necessary to tell the scene manager + when it should call irr::scene::ISceneNode::render(). For + example, normal scene nodes render their content one after another, + while stencil buffer shadows would like to be drawn after all other + scene nodes. And camera or light scene nodes need to be rendered before + all other scene nodes (if at all). So here we simply register the + scene node to render normally. If we would like to let it be rendered + like cameras or light, we would have to call + SceneManager->registerNodeForRendering(this, SNRT_LIGHT_AND_CAMERA); + After this, we call the actual + irr::scene::ISceneNode::OnRegisterSceneNode() method of the base class, + which simply lets also all the child scene nodes of this node register + themselves. + */ + virtual void OnRegisterSceneNode() + { + if (IsVisible) + SceneManager->registerNodeForRendering(this); + + ISceneNode::OnRegisterSceneNode(); + } + + /* + In the render() method most of the interesting stuff happens: The + Scene node renders itself. We override this method and draw the + tetraeder. + */ + virtual void render() + { + u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 }; + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + driver->setMaterial(Material); + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + driver->drawVertexPrimitiveList(&Vertices[0], 4, &indices[0], 4, video::EVT_STANDARD, scene::EPT_TRIANGLES, video::EIT_16BIT); + } + + /* + And finally we create three small additional methods. + irr::scene::ISceneNode::getBoundingBox() returns the bounding box of + this scene node, irr::scene::ISceneNode::getMaterialCount() returns the + amount of materials in this scene node (our tetraeder only has one + material), and irr::scene::ISceneNode::getMaterial() returns the + material at an index. Because we have only one material here, we can + return the only one material, assuming that no one ever calls + getMaterial() with an index greater than 0. + */ + virtual const core::aabbox3d& getBoundingBox() const + { + return Box; + } + + virtual u32 getMaterialCount() const + { + return 1; + } + + virtual video::SMaterial& getMaterial(u32 i) + { + return Material; + } +}; + +/* +That's it. The Scene node is done. Now we simply have to start +the engine, create the scene node and a camera, and look at the result. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device + + IrrlichtDevice *device = createDevice(driverType, + core::dimension2d(640, 480), 16, false); + + if (device == 0) + return 1; // could not create selected driver. + + // create engine and camera + + device->setWindowCaption(L"Custom Scene Node - Irrlicht Engine Demo"); + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + smgr->addCameraSceneNode(0, core::vector3df(0,-40,0), core::vector3df(0,0,0)); + + /* + Create our scene node. I don't check the result of calling new, as it + should throw an exception rather than returning 0 on failure. Because + the new node will create itself with a reference count of 1, and then + will have another reference added by its parent scene node when it is + added to the scene, I need to drop my reference to it. Best practice is + to drop it only *after* I have finished using it, regardless of what + the reference count of the object is after creation. + */ + CSampleSceneNode *myNode = + new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666); + + /* + To animate something in this boring scene consisting only of one + tetraeder, and to show that you now can use your scene node like any + other scene node in the engine, we add an animator to the scene node, + which rotates the node a little bit. + irr::scene::ISceneManager::createRotationAnimator() could return 0, so + should be checked. + */ + scene::ISceneNodeAnimator* anim = + smgr->createRotationAnimator(core::vector3df(0.8f, 0, 0.8f)); + + if(anim) + { + myNode->addAnimator(anim); + + /* + I'm done referring to anim, so must + irr::IReferenceCounted::drop() this reference now because it + was produced by a createFoo() function. As I shouldn't refer to + it again, ensure that I can't by setting to 0. + */ + anim->drop(); + anim = 0; + } + + /* + I'm done with my CSampleSceneNode object, and so must drop my reference. + This won't delete the object, yet, because it is still attached to the + scene graph, which prevents the deletion until the graph is deleted or the + custom scene node is removed from it. + */ + myNode->drop(); + myNode = 0; // As I shouldn't refer to it again, ensure that I can't + + /* + Now draw everything and finish. + */ + u32 frames=0; + while(device->run()) + { + driver->beginScene(true, true, video::SColor(0,100,100,100)); + + smgr->drawAll(); + + driver->endScene(); + if (++frames==100) + { + core::stringw str = L"Irrlicht Engine ["; + str += driver->getName(); + str += L"] FPS: "; + str += (s32)driver->getFPS(); + + device->setWindowCaption(str.c_str()); + frames=0; + } + } + + device->drop(); + + return 0; +} + +/* +That's it. Compile and play around with the program. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/tutorial.html b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/tutorial.html new file mode 100644 index 0000000..becc3d7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/03.CustomSceneNode/tutorial.html @@ -0,0 +1,222 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
+
Tutorial 3.CustomSceneNode
+
+
+
+

This Tutorial is a tutorial for more advanced developers. If you are + currently just playing around with the Irrlicht engine, please look + at other examples first. This tutorial shows how to create a custom + scene node and how to use it in the engine. A custom scene node is needed, + if you want to implement a render technique, the Irrlicht Engine is + currently not supporting. For example you can write a indoor portal + based renderer or a advanced terrain scene node with it. With creating + custom scene nodes, you can easily extend the Irrlicht Engine and adapt + it to your needs.

+

I will keep the tutorial simple: Keep everything very short, everything + in one .cpp file, and I'll use the engine here as in all other tutorials. + At the end of the tutorial, the result will look like the image below. + This looks not very exciting, but it is a complete customized scene + node and a good point to start from creating you own scene nodes.

+


+

+
+
+
+ + + + + + + +
+ Lets start!
+

To start, I include the header files, use the irr namespace, and tell + the linker to link with the .lib file.

+ + + + +
#include <irrlicht.h>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
+

Here comes the most sophisticated part of this tutorial: The class + of our very own custom scene node. To keep it simple,
+ our scene node will not be an indoor portal renderer nor a terrain scene + node, but a simple tetraeder, a 3d object consiting of 4 connected vertices, + which only draws itself and does nothing more.

+

To let our scene node be able to be inserted into the Irrlicht Engine + scene, the class we create needs only be derived from the ISceneNode + class and has to override some methods.

+ + + + +
class CSampleSceneNode : public scene::ISceneNode
{
+

First, we declare some member variables, to hold data for our tetraeder: + The bounding box, 4 vertices, and
+ the material of the tetraeder.

+ + + + +
core::aabbox3d<f32> Box;
video::S3DVertex Vertices[4];
video::SMaterial Material;
+

The parameters of the constructor specify the parent of the scene node, + a pointer to the scene manager, and an id of the scene node. In the + constructor itself, we call the parent classes constructor, set some + properties of the material we use to draw the scene node and create + the 4 vertices of the tetraeder we will draw later.

+ + + + +
public:
CSampleSceneNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
+ : scene::ISceneNode(parent, mgr, id)
+{ 
+  Material.Wireframe = false;
+  Material.Lighting = false;
+
  Vertices[0] = video::S3DVertex(0,0,10, 1,1,0,video::SColor(255,0,255,255),0,1);
+  Vertices[1] = video::S3DVertex(10,0,-10, 1,0,0,video::SColor(255,255,0,255),1,1); 
+  Vertices[2] = video::S3DVertex(0,20,0, 0,1,1,video::SColor(255,255,255,0),1,0);
+  Vertices[3] = video::S3DVertex(-10,0,-10, 0,0,1,video::SColor(255,0,255,0),0,0);
+
+
+ The Irrlicht Engine needs to know the bounding box of your scene node. + It will use it for doing automatic culling and other things. Hence we + need to create a bounding box from the 4 vertices we use. If you do not + want the engine to use the box for automatic culling, and/or don't want + to create the box, you could also write
+ AutomaticCullingEnabled = false;.
+
+ + + + +
  Box.reset(Vertices[0].Pos);
for (s32 i=1; i<4; ++i)
Box.addInternalPoint(Vertices[i].Pos); +}
+
+

Before it is drawn, the OnPreRender() method of every scene node in + the scene is called by the scene manager. If the scene node wishes to + draw itself, it may register itself in the scene manager to be drawn. + This is necessary to tell the scene manager when it should call the + ::render method. For example normal scene nodes render their content + one after another, while stencil buffer shadows would like to be drawn + after all other scene nodes. And camera or light scene nodes need to + be rendered before all other scene nodes (if at all).
+ So here we simply register the scene node to get rendered normally. + If we would like to let it be rendered like cameras or light, we would + have to call SceneManager->registerNodeForRendering(this, SNRT_LIGHT_AND_CAMERA); +
+ After this, we call the OnPreRender-method of the base class ISceneNode, + which simply lets also all the child scene nodes of this node register + themselves.

+
+ + + + +
virtual void OnPreRender()
{
if (IsVisible)
SceneManager->registerNodeForRendering(this); + + ISceneNode::OnPreRender(); +}
+

In the render() method most of the interresting stuff happenes: The Scene + node renders itself. We override this method and draw the tetraeder.

+ + + + +
virtual void render()
{
u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 }; + video::IVideoDriver* driver = SceneManager->getVideoDriver();
+
  driver->setMaterial(Material);
+  driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
+  driver->drawIndexedTriangleList(&Vertices[0], 4, &indices[0], 4);
+}
+

At least, we create three small additional methods. GetBoundingBox() + returns the bounding box of this scene node,
+ GetMaterialCount() returns the amount of materials in this scene node + (our tetraeder only has one material), and getMaterial() returns the material + at an index. Because we have only one material here, we can return the + only one material, assuming that no one ever calls getMaterial() with + an index greater than 0.

+ + + + +
  virtual const core::aabbox3d<f32>& getBoundingBox() const
{
return Box;
}
  virtual u32 getMaterialCount()
+  {
+    return 1;
+  }
  virtual video::SMaterial& getMaterial(u32 i)
+  {
+    return Material;
+  } 
+};
+

That's it. The Scene node is done. Now we simply have to start the engine, + create the scene node and a camera, and look at the result.

+ + + + +
int main()
{ + IrrlichtDevice *device = + createDevice(video::EDT_OPENGL, core::dimension2d<s32>(640, 480), 16, false);
  device->setWindowCaption(L"Custom Scene Node - Irrlicht Engine Demo");
  video::IVideoDriver* driver = device->getVideoDriver();
+           scene::ISceneManager* smgr = device->getSceneManager();
+
  smgr->addCameraSceneNode(0, core::vector3df(0,-40,0), core::vector3df(0,0,0));
+                   
+

Create our scene node. Note that it is dropped (->drop()) instantly + after we create it. This is possible because the scene manager now takes + care of it. This is not nessecary, it would also be possible to drop it + at the end of the program.

+ + + + +
CSampleSceneNode *myNode = 
new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666); + +myNode->drop();
+

To animate something in this boring scene consisting only of one tetraeder, + and to show, that you now can use your scene node like any other scene + node in the engine, we add an animator to the scene node, which rotates + the node a little bit.

+ + + + +
scene::ISceneNodeAnimator* anim = 
smgr->createRotationAnimator(core::vector3df(0.8f, 0, 0.8f)); + +myNode->addAnimator(anim); +anim->drop();
+

Now draw everything and finish.

+ + + + +
  while(device->run())
{
driver->beginScene(true, true, video::SColor(0,100,100,100)); + + smgr->drawAll(); + + driver->endScene(); + } + +device->drop(); +return 0; +}
+

That's it. Compile and play around with the program.

+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Makefile b/src/others/irrlicht-1.8.1/examples/04.Movement/Makefile new file mode 100644 index 0000000..0dcd252 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 04.Movement +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.cbp b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.cbp new file mode 100644 index 0000000..0fcc4d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.dev b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.dev new file mode 100644 index 0000000..0753c10 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 04 Movement +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=04.Movement.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.vcproj b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.vcproj new file mode 100644 index 0000000..105c625 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc10.vcxproj new file mode 100644 index 0000000..7e59058 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 04.Movement + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF} + Movement + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Movement.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\04.Movement.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Movement.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\04.Movement.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Movement.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\04.Movement.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Movement.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\04.Movement.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc11.vcxproj new file mode 100644 index 0000000..7fe0339 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 04.Movement + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF} + Movement + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Movement.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\04.Movement.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Movement.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\04.Movement.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Movement.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\04.Movement.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Movement.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\04.Movement.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc8.vcproj new file mode 100644 index 0000000..8f56add --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc9.vcproj new file mode 100644 index 0000000..074fe40 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/Movement_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/main.cpp b/src/others/irrlicht-1.8.1/examples/04.Movement/main.cpp new file mode 100644 index 0000000..7bacda3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/main.cpp @@ -0,0 +1,258 @@ +/** Example 004 Movement + +This Tutorial shows how to move and animate SceneNodes. The +basic concept of SceneNodeAnimators is shown as well as manual +movement of nodes using the keyboard. We'll demonstrate framerate +independent movement, which means moving by an amount dependent +on the duration of the last run of the Irrlicht loop. + +Example 19.MouseAndJoystick shows how to handle those kinds of input. + +As always, I include the header files, use the irr namespace, +and tell the linker to link with the .lib file. +*/ +#ifdef _MSC_VER +// We'll also define this to stop MSVC complaining about sprintf(). +#define _CRT_SECURE_NO_WARNINGS +#pragma comment(lib, "Irrlicht.lib") +#endif + +#include +#include "driverChoice.h" + +using namespace irr; + +/* +To receive events like mouse and keyboard input, or GUI events like "the OK +button has been clicked", we need an object which is derived from the +irr::IEventReceiver object. There is only one method to override: +irr::IEventReceiver::OnEvent(). This method will be called by the engine once +when an event happens. What we really want to know is whether a key is being +held down, and so we will remember the current state of each key. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + // This is the one method that we have to implement + virtual bool OnEvent(const SEvent& event) + { + // Remember whether each key is down or up + if (event.EventType == irr::EET_KEY_INPUT_EVENT) + KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown; + + return false; + } + + // This is used to check whether a key is being held down + virtual bool IsKeyDown(EKEY_CODE keyCode) const + { + return KeyIsDown[keyCode]; + } + + MyEventReceiver() + { + for (u32 i=0; i(640, 480), 16, false, false, false, &receiver); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + /* + Create the node which will be moved with the WSAD keys. We create a + sphere node, which is a built-in geometry primitive. We place the node + at (0,0,30) and assign a texture to it to let it look a little bit more + interesting. Because we have no dynamic lights in this scene we disable + lighting for each model (otherwise the models would be black). + */ + scene::ISceneNode * node = smgr->addSphereSceneNode(); + if (node) + { + node->setPosition(core::vector3df(0,0,30)); + node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); + node->setMaterialFlag(video::EMF_LIGHTING, false); + } + + /* + Now we create another node, movable using a scene node animator. Scene + node animators modify scene nodes and can be attached to any scene node + like mesh scene nodes, billboards, lights and even camera scene nodes. + Scene node animators are not only able to modify the position of a + scene node, they can also animate the textures of an object for + example. We create a cube scene node and attach a 'fly circle' scene + node animator to it, letting this node fly around our sphere scene node. + */ + scene::ISceneNode* n = smgr->addCubeSceneNode(); + + if (n) + { + n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg")); + n->setMaterialFlag(video::EMF_LIGHTING, false); + scene::ISceneNodeAnimator* anim = + smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f); + if (anim) + { + n->addAnimator(anim); + anim->drop(); + } + } + + /* + The last scene node we add to show possibilities of scene node animators is + a b3d model, which uses a 'fly straight' animator to run between to points. + */ + scene::IAnimatedMeshSceneNode* anms = + smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d")); + + if (anms) + { + scene::ISceneNodeAnimator* anim = + smgr->createFlyStraightAnimator(core::vector3df(100,0,60), + core::vector3df(-100,0,60), 3500, true); + if (anim) + { + anms->addAnimator(anim); + anim->drop(); + } + + /* + To make the model look right we disable lighting, set the + frames between which the animation should loop, rotate the + model around 180 degrees, and adjust the animation speed and + the texture. To set the right animation (frames and speed), we + would also be able to just call + "anms->setMD2Animation(scene::EMAT_RUN)" for the 'run' + animation instead of "setFrameLoop" and "setAnimationSpeed", + but this only works with MD2 animations, and so you know how to + start other animations. But a good advice is to not use + hardcoded frame-numbers... + */ + anms->setMaterialFlag(video::EMF_LIGHTING, false); + + anms->setFrameLoop(0, 13); + anms->setAnimationSpeed(15); +// anms->setMD2Animation(scene::EMAT_RUN); + + anms->setScale(core::vector3df(2.f,2.f,2.f)); + anms->setRotation(core::vector3df(0,-90,0)); +// anms->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp")); + + } + + + /* + To be able to look at and move around in this scene, we create a first + person shooter style camera and make the mouse cursor invisible. + */ + smgr->addCameraSceneNodeFPS(); + device->getCursorControl()->setVisible(false); + + /* + Add a colorful irrlicht logo + */ + device->getGUIEnvironment()->addImage( + driver->getTexture("../../media/irrlichtlogoalpha2.tga"), + core::position2d(10,20)); + + gui::IGUIStaticText* diagnostics = device->getGUIEnvironment()->addStaticText( + L"", core::rect(10, 10, 400, 20)); + diagnostics->setOverrideColor(video::SColor(255, 255, 255, 0)); + + /* + We have done everything, so lets draw it. We also write the current + frames per second and the name of the driver to the caption of the + window. + */ + int lastFPS = -1; + + // In order to do framerate independent movement, we have to know + // how long it was since the last frame + u32 then = device->getTimer()->getTime(); + + // This is the movemen speed in units per second. + const f32 MOVEMENT_SPEED = 5.f; + + while(device->run()) + { + // Work out a frame delta time. + const u32 now = device->getTimer()->getTime(); + const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds + then = now; + + /* Check if keys W, S, A or D are being held down, and move the + sphere node around respectively. */ + core::vector3df nodePosition = node->getPosition(); + + if(receiver.IsKeyDown(irr::KEY_KEY_W)) + nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime; + else if(receiver.IsKeyDown(irr::KEY_KEY_S)) + nodePosition.Y -= MOVEMENT_SPEED * frameDeltaTime; + + if(receiver.IsKeyDown(irr::KEY_KEY_A)) + nodePosition.X -= MOVEMENT_SPEED * frameDeltaTime; + else if(receiver.IsKeyDown(irr::KEY_KEY_D)) + nodePosition.X += MOVEMENT_SPEED * frameDeltaTime; + + node->setPosition(nodePosition); + + driver->beginScene(true, true, video::SColor(255,113,113,133)); + + smgr->drawAll(); // draw the 3d scene + device->getGUIEnvironment()->drawAll(); // draw the gui environment (the logo) + + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw tmp(L"Movement Example - Irrlicht Engine ["); + tmp += driver->getName(); + tmp += L"] fps: "; + tmp += fps; + + device->setWindowCaption(tmp.c_str()); + lastFPS = fps; + } + } + + /* + In the end, delete the Irrlicht device. + */ + device->drop(); + + return 0; +} + +/* +That's it. Compile and play around with the program. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html b/src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html new file mode 100644 index 0000000..28b207d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html @@ -0,0 +1,188 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
+
Tutorial 4.Movement
+
+
+
+

This Tutorial shows how to move and animate SceneNodes. The basic concept + of SceneNodeAnimators is shown as well as manual movement of nodes using + the keyboard.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
+ Lets start!
+

As always, I include the header files, use the irr namespace, and tell + the linker to link with the .lib file.

+ + + + +
#include <stdio.h>
#include <wchar.h>
#include <irrlicht.h>
+
using namespace irr;
+
#pragma comment(lib, "Irrlicht.lib")
+

In this tutorial, one of our goals is to move a scene node using some + keys on the keyboard. We store a pointer to the scene node we want to + move with the keys here.
+ The other pointer is a pointer to the Irrlicht Device, which we need + int the EventReceiver to manipulate the scene node and to get the active + camera.

+ + + + +
scene::ISceneNode* node = 0;
IrrlichtDevice* device = 0;
+

To get events like mouse and keyboard input, or GUI events like "the + OK button has been clicked", we need an object wich is derived + from the IEventReceiver object. There is only one method to override: + OnEvent. This method will be called by the engine when an event happened. + We will use this input to move the scene node with the keys W and S.

+ + + + +
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(const SEvent& event)
{
+

If the key 'W' or 'S' was left up, we get the position of the scene + node, and modify the Y coordinate a little bit. So if you press 'W', + the node moves up, and if you press 'S' it moves down.

+ + + + +
if (node != 0 && event.EventType == irr::EET_KEY_INPUT_EVENT&&
!event.KeyInput.PressedDown)
{
switch(event.KeyInput.Key)
{
case KEY_KEY_W:
case KEY_KEY_S:
{
core::vector3df v = node->getPosition();
v.Y += event.KeyInput.Key == KEY_KEY_W ? 2.0f : -2.0f;
node->setPosition(v);
}
return true;
}
} return false;
}
};
+ +
+

The event receiver for moving a scene node is ready. So lets just create + an Irrlicht Device and the scene node we want to move. We also create + some other additional scene nodes, to show that there are also some different + possibilities to move and animate scene nodes.

+ + + + +
int main()
{
MyEventReceiver receiver; + + device = createDevice(video::EDT_OPENGL, core::dimension2d<s32>(640, 480), + 16, false, false, false, &receiver);
+
   video::IVideoDriver* driver = device->getVideoDriver();
+   scene::ISceneManager* smgr = device->getSceneManager();
+
+

Create the node for moving it with the 'W' and 'S' key. We create a + sphere node, which is a built in geometric primitive scene node. + We place the node at (0,0,30) and assign a texture to it to let it look + a little bit more interesting.

+ + + + +
node = smgr->addSphereSceneNode();
+node->setPosition(core::vector3df(0,0,30));
+node->setMaterialFlag(video::EMF_LIGHTING, false);
+node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+

Now we create another node, moving using a scene node animator. Scene + node animators modify scene nodes and can be attached to any scene node + like
+ mesh scene nodes, billboards, lights and even camera scene nodes. Scene + node animators are not only able to modify the position of a scene node, + they can
+ also animate the textures of an object for example. We create a test scene + node again an attach a 'fly circle' scene node to it, letting this node + fly around our first test scene node.

+ + + + +
scene::ISceneNode* n = smgr->addCubeSceneNode();
+n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
+n->setMaterialFlag(video::EMF_LIGHTING, false);
+scene::ISceneNodeAnimator* anim = 
+	smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);
+n->addAnimator(anim);
+anim->drop();
+

The last scene node we add to show possibilities of scene node animators + is a md2 model, which uses a 'fly straight' animator to run between to + points.

+ + + + +
scene::IAnimatedMeshSceneNode* anms = smgr->addAnimatedMeshSceneNode(
smgr->getMesh("../../media/sydney.md2")); + +if (n)
{
anim = smgr->createFlyStraightAnimator(core::vector3df(100,0,60),
core::vector3df(-100,0,60), 10000, true);
anms->addAnimator(anim);
anim->drop();
+
+

To make to model look right we set the frames between which + the animation should loop, rotate the model around 180 degrees, and adjust + the animation speed and the texture.
+ To set the right animation (frames and speed), we would also be able to + just call "anms->setMD2Animation(scene::EMAT_RUN)" for the + 'run' animation instead of "setFrameLoop" and "setAnimationSpeed", + but this only works with MD2 animations, and so you know how to start + other animations.

+ + + + +
   anms->setMaterialFlag(video::EMF_LIGHTING, false);
anms->setFrameLoop(320, 360); + anms->setAnimationSpeed(30);
anms->setRotation(core::vector3df(0,180.0f,0));
anms->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));
}
+

To be able to look at and move around in this scene, we create a first + person shooter style camera and make the mouse cursor invisible.

+ + + + +
smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);
device->getCursorControl()->setVisible(false);
+

We have done everything, so lets draw it. We also write the current frames + per second and the name of the driver to the caption of the window.

+ + + + +
int lastFPS = -1;
+
while(device->run())
+{
+     driver->beginScene(true, true, video::SColor(255,90,90,156));
+     smgr->drawAll();
+     driver->endScene();
+
     int fps = driver->getFPS();
+
     if (lastFPS != fps)
+     {
+        wchar_t tmp[1024];
+        swprintf(tmp, 1024, L"Movement Example - Irrlicht Engine (%ls)(fps:%d)",
driver->getName(), fps);
+
       device->setWindowCaption(tmp);
+       lastFPS = fps;
+     }
+}
+
+device->drop();
return 0;
}
+

That's it. Compile and play around with the program.

+

 

+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/Makefile b/src/others/irrlicht-1.8.1/examples/05.UserInterface/Makefile new file mode 100644 index 0000000..24cd5d4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 05.UserInterface +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.cbp b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.cbp new file mode 100644 index 0000000..0e4aebb --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.dev b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.dev new file mode 100644 index 0000000..6a32ece --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 05 User Interface +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=05.UserInterface.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.vcproj b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.vcproj new file mode 100644 index 0000000..4428169 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc10.vcxproj new file mode 100644 index 0000000..12c0501 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 05.UserInterface + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53} + UserInterface + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/UserInterface.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\05.UserInterface.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/UserInterface.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\05.UserInterface.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/UserInterface.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\05.UserInterface.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/UserInterface.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\05.UserInterface.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc11.vcxproj new file mode 100644 index 0000000..cc6561b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 05.UserInterface + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53} + UserInterface + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/UserInterface.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\05.UserInterface.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/UserInterface.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\05.UserInterface.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/UserInterface.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\05.UserInterface.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/UserInterface.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\05.UserInterface.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc8.vcproj new file mode 100644 index 0000000..fdc4fef --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc9.vcproj new file mode 100644 index 0000000..e192238 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/UserInterface_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/main.cpp b/src/others/irrlicht-1.8.1/examples/05.UserInterface/main.cpp new file mode 100644 index 0000000..98b3898 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/main.cpp @@ -0,0 +1,291 @@ +/** Example 005 User Interface + +This tutorial shows how to use the built in User Interface of +the Irrlicht Engine. It will give a brief overview and show +how to create and use windows, buttons, scroll bars, static +texts, and list boxes. + +As always, we include the header files, and use the irrlicht +namespaces. We also store a pointer to the Irrlicht device, +a counter variable for changing the creation position of a window, +and a pointer to a listbox. +*/ +#include +#include "driverChoice.h" + +using namespace irr; + +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#endif + +// Declare a structure to hold some context for the event receiver so that it +// has it available inside its OnEvent() method. +struct SAppContext +{ + IrrlichtDevice *device; + s32 counter; + IGUIListBox* listbox; +}; + +// Define some values that we'll use to identify individual GUI controls. +enum +{ + GUI_ID_QUIT_BUTTON = 101, + GUI_ID_NEW_WINDOW_BUTTON, + GUI_ID_FILE_OPEN_BUTTON, + GUI_ID_TRANSPARENCY_SCROLL_BAR +}; + +/* + Set the skin transparency by changing the alpha values of all skin-colors +*/ +void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin) +{ + for (s32 i=0; igetColor((EGUI_DEFAULT_COLOR)i); + col.setAlpha(alpha); + skin->setColor((EGUI_DEFAULT_COLOR)i, col); + } +} + +/* +The Event Receiver is not only capable of getting keyboard and +mouse input events, but also events of the graphical user interface +(gui). There are events for almost everything: Button click, +Listbox selection change, events that say that a element was hovered +and so on. To be able to react to some of these events, we create +an event receiver. +We only react to gui events, and if it's such an event, we get the +id of the caller (the gui element which caused the event) and get +the pointer to the gui environment. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + MyEventReceiver(SAppContext & context) : Context(context) { } + + virtual bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT) + { + s32 id = event.GUIEvent.Caller->getID(); + IGUIEnvironment* env = Context.device->getGUIEnvironment(); + + switch(event.GUIEvent.EventType) + { + + /* + If a scrollbar changed its scroll position, and it is + 'our' scrollbar (the one with id GUI_ID_TRANSPARENCY_SCROLL_BAR), then we change + the transparency of all gui elements. This is a very + easy task: There is a skin object, in which all color + settings are stored. We simply go through all colors + stored in the skin and change their alpha value. + */ + case EGET_SCROLL_BAR_CHANGED: + if (id == GUI_ID_TRANSPARENCY_SCROLL_BAR) + { + s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); + setSkinTransparency(pos, env->getSkin()); + } + break; + + /* + If a button was clicked, it could be one of 'our' + three buttons. If it is the first, we shut down the engine. + If it is the second, we create a little window with some + text on it. We also add a string to the list box to log + what happened. And if it is the third button, we create + a file open dialog, and add also this as string to the list box. + That's all for the event receiver. + */ + case EGET_BUTTON_CLICKED: + switch(id) + { + case GUI_ID_QUIT_BUTTON: + Context.device->closeDevice(); + return true; + + case GUI_ID_NEW_WINDOW_BUTTON: + { + Context.listbox->addItem(L"Window created"); + Context.counter += 30; + if (Context.counter > 200) + Context.counter = 0; + + IGUIWindow* window = env->addWindow( + rect(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter), + false, // modal? + L"Test window"); + + env->addStaticText(L"Please close me", + rect(35,35,140,50), + true, // border? + false, // wordwrap? + window); + } + return true; + + case GUI_ID_FILE_OPEN_BUTTON: + Context.listbox->addItem(L"File open"); + // There are some options for the file open dialog + // We set the title, make it a modal window, and make sure + // that the working directory is restored after the dialog + // is finished. + env->addFileOpenDialog(L"Please choose a file.", true, 0, -1, true); + return true; + + default: + return false; + } + break; + + case EGET_FILE_SELECTED: + { + // show the model filename, selected in the file dialog + IGUIFileOpenDialog* dialog = + (IGUIFileOpenDialog*)event.GUIEvent.Caller; + Context.listbox->addItem(dialog->getFileName()); + } + break; + + default: + break; + } + } + + return false; + } + +private: + SAppContext & Context; +}; + + +/* +Ok, now for the more interesting part. First, create the Irrlicht device. As in +some examples before, we ask the user which driver he wants to use for this +example: +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device and exit if creation failed + + IrrlichtDevice * device = createDevice(driverType, core::dimension2d(640, 480)); + + if (device == 0) + return 1; // could not create selected driver. + + /* The creation was successful, now we set the event receiver and + store pointers to the driver and to the gui environment. */ + + device->setWindowCaption(L"Irrlicht Engine - User Interface Demo"); + device->setResizable(true); + + video::IVideoDriver* driver = device->getVideoDriver(); + IGUIEnvironment* env = device->getGUIEnvironment(); + + /* + To make the font a little bit nicer, we load an external font + and set it as the new default font in the skin. + To keep the standard font for tool tip text, we set it to + the built-in font. + */ + + IGUISkin* skin = env->getSkin(); + IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp"); + if (font) + skin->setFont(font); + + skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP); + + /* + We add three buttons. The first one closes the engine. The second + creates a window and the third opens a file open dialog. The third + parameter is the id of the button, with which we can easily identify + the button in the event receiver. + */ + + env->addButton(rect(10,240,110,240 + 32), 0, GUI_ID_QUIT_BUTTON, + L"Quit", L"Exits Program"); + env->addButton(rect(10,280,110,280 + 32), 0, GUI_ID_NEW_WINDOW_BUTTON, + L"New Window", L"Launches a new Window"); + env->addButton(rect(10,320,110,320 + 32), 0, GUI_ID_FILE_OPEN_BUTTON, + L"File Open", L"Opens a file"); + + /* + Now, we add a static text and a scrollbar, which modifies the + transparency of all gui elements. We set the maximum value of + the scrollbar to 255, because that's the maximal value for + a color value. + Then we create an other static text and a list box. + */ + + env->addStaticText(L"Transparent Control:", rect(150,20,350,40), true); + IGUIScrollBar* scrollbar = env->addScrollBar(true, + rect(150, 45, 350, 60), 0, GUI_ID_TRANSPARENCY_SCROLL_BAR); + scrollbar->setMax(255); + scrollbar->setPos(255); + setSkinTransparency( scrollbar->getPos(), env->getSkin()); + + // set scrollbar position to alpha value of an arbitrary element + scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha()); + + env->addStaticText(L"Logging ListBox:", rect(50,110,250,130), true); + IGUIListBox * listbox = env->addListBox(rect(50, 140, 250, 210)); + env->addEditBox(L"Editable Text", rect(350, 80, 550, 100)); + + // Store the appropriate data in a context structure. + SAppContext context; + context.device = device; + context.counter = 0; + context.listbox = listbox; + + // Then create the event receiver, giving it that context structure. + MyEventReceiver receiver(context); + + // And tell the device to use our custom event receiver. + device->setEventReceiver(&receiver); + + + /* + And at last, we create a nice Irrlicht Engine logo in the top left corner. + */ + env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"), + position2d(10,10)); + + + /* + That's all, we only have to draw everything. + */ + + while(device->run() && driver) + if (device->isWindowActive()) + { + driver->beginScene(true, true, SColor(0,200,200,200)); + + env->drawAll(); + + driver->endScene(); + } + + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/05.UserInterface/tutorial.html b/src/others/irrlicht-1.8.1/examples/05.UserInterface/tutorial.html new file mode 100644 index 0000000..3f3614f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/05.UserInterface/tutorial.html @@ -0,0 +1,225 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
+
Tutorial 5.User Interface
+
+
+
+

This tutorial shows how to use the built in User Interface of the Irrlicht + Engine. It will give a brief overview and show how to create and use + windows, buttons, scroll bars, static texts and list boxes.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
+ Lets start!
+

As always, we include the header files (conio and curses for getting + user input from the console), and use the irrlicht namespaces. We also + store a pointer to the Irrlicht device, a counter variable for changing + the creation position of a window, and a pointer to a listbox.

+ + + + +
#include <irrlicht.h>
+#include <iostream>
+using namespace irr;
+
using namespace core;
+using namespace scene;
+using namespace video;
+using namespace io;
+using namespace gui;
+
#pragma comment(lib, "Irrlicht.lib")
+
IrrlichtDevice *device = 0;
+s32 cnt = 0;
+IGUIListBox* listbox = 0;
+
+

The Event Receiver is not only capable of getting keyboard and mouse + input events, but also events of the graphical user interface (gui). + There are events for almost everything: Button click, Listbox selection + change, events that say that a element was hovered and so on. To be + able to react to some of these events, we create
+ an event receiver. We only react to gui events, and if it's such an + event, we get the id of the caller (the gui element which caused the + event) and get the pointer to the gui environment.

+ + + + +
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(const SEvent& event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = device->getGUIEnvironment();
+
            switch(event.GUIEvent.EventType)
+            {
+
+

If a scrollbar changed its scroll position, and it is 'our' scrollbar + (the one with id 104), then we change the
+ transparency of all gui elements. This is a very easy task: There is + a skin object, in which all color settings are stored. We simply go + through all colors stored in the skin and change their alpha value. +

+ + + + +
case EGET_SCROLL_BAR_CHANGED:
if (id == 104)
{
s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();

for (s32 i=0; i<EGDC_COUNT ; ++i)
{
SColor col = env->getSkin()->getColor((EGUI_DEFAULT_COLOR)i);
col.setAlpha(pos);
env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col);
}
}
break;
+

If a button was clicked, it could be one of 'our' three buttons. If + it is the first, we shut down the engine.
+ If it is the second, we create a little window with some text on it. + We also add a string to the list box to log
+ what happened. And if it is the third button, we create a file open + dialog, and add also this as string to the list box.
+ That's all for the event receiver.

+ + + + +
+
       case EGET_BUTTON_CLICKED:
+              if (id == 101)
+              {
+                 device->closeDevice();
+                 return true;
+              }
+
              if (id == 102)
+              {
+                 listbox->addItem(L"Window created");
+                 cnt += 30;
+                 if (cnt > 200) 
+                   cnt = 0;
+
                 IGUIWindow* window = env->addWindow(
+                       rect<s32>(100 + cnt, 100 + cnt, 300 + cnt, 200 + cnt), 
false, // modal? + L"Test window");
+
                 env->addStaticText(L"Please close me", 
+                       rect<s32>(35,35,140,50),
+                       true, // border?,
+                       false, // wordwrap?
+                       window);
+
+                 return true;
+              }
+
              if (id == 103)
+              {
+                 listbox->addItem(L"File open");
+                 env->addFileOpenDialog(L"Please choose a file.");
+                 return true;
+              }
+
              break;
+          }
+       }
+       return false;
+    }
+ };
+
+

Ok, now for the more interesting part. First, create the Irrlicht device. + As in some examples before, we ask the user which driver he wants to + use for this example:

+
+ + + + +
int main()
+{
+  // ask user for driver
+  video::E_DRIVER_TYPE driverType;
+
+
+  printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;
+ switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
} + + // create device and exit if creation failed + device = createDevice(driverType, core::dimension2d<s32>(640, 480));
+ if (device == 0) + return 1; +
+
+

The creation was successful, now we set the event receiver and store + pointers to the driver and to the gui environment.

+ + + + +
MyEventReceiver receiver;
+device->setEventReceiver(&receiver);
+device->setWindowCaption(L"Irrlicht Engine - User Inferface Demo");
+
video::IVideoDriver* driver = device->getVideoDriver();
+IGUIEnvironment* env = device->getGUIEnvironment();
+
+
+

We add three buttons. The first one closes the engine. The second creates + a window and the third opens a file open dialog. The third parameter is + the id of the button, with which we can easily identify the button in + the event receiver.

+ + + + +
env->addButton(rect<s32>(10,240,100,270), 0, 101, L"Quit");
env->addButton(rect<s32>(10,280,100,320), 0, 102, L"New Window");
env->addButton(rect<s32>(10,330,100,370), 0, 103, L"File Open");
+

Now, we add a static text and a scrollbar, which modifies the transparency + of all gui elements. We set the maximum value of the scrollbar to 255, + because that's the maximal value for a color value.
+ Then we create an other static text and a list box.

+ + + + +
env->addStaticText(L"Transparent Control:", rect<s32>(150,20,350,40), true);
IGUIScrollBar* scrollbar = env->addScrollBar(true, + rect<s32>(150, 45, 350, 60), 0, 104);
scrollbar->setMax(255);
+
env->addStaticText(L"Logging ListBox:", rect<s32>(50,110,250,130), true);
+listbox = env->addListBox(rect<s32>(50, 140, 250, 210));
+
+ To make the font a little bit nicer, we load an external font and set it + as new font in the skin. An at last, we create a nice Irrlicht Engine logo + in the top left corner.
+
+ + + + +
IGUISkin* skin = env->getSkin();
IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);
+
IGUIImage* img = env->addImage(
driver->getTexture("../../media/irrlichtlogoalpha.tga"),
position2d<int>(10,10));
+

That's all, we only have to draw everything.

+ + + + +
+
  while(device->run() && driver)
if (device->isWindowActive())
{
driver->beginScene(true, true, SColor(0,122,65,171)); + env->drawAll(); + driver->endScene(); + } + + device->drop();
+
  return 0;
+}
+
+ +
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.cbp b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.cbp new file mode 100644 index 0000000..0433c93 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.dev b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.dev new file mode 100644 index 0000000..93694f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 06 2D Graphics +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=06.2DGraphics.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.vcproj b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.vcproj new file mode 100644 index 0000000..b21c351 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc10.vcxproj new file mode 100644 index 0000000..b0f184e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 06.2DGraphics + {E71B6F18-10DC-4101-A541-F6D33F71B2BD} + 2DGraphics + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/2DGraphics.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/2DGraphics.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/2DGraphics.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/2DGraphics.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc11.vcxproj new file mode 100644 index 0000000..66e7aa0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 06.2DGraphics + {E71B6F18-10DC-4101-A541-F6D33F71B2BD} + 2DGraphics + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/2DGraphics.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/2DGraphics.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/2DGraphics.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/2DGraphics.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc8.vcproj new file mode 100644 index 0000000..8a10914 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc9.vcproj new file mode 100644 index 0000000..e78f8a0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/2DGraphics_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/Makefile b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/Makefile new file mode 100644 index 0000000..6e62b2b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 06.2DGraphics +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/main.cpp b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/main.cpp new file mode 100644 index 0000000..40e311a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/main.cpp @@ -0,0 +1,166 @@ +/** Example 006 2D Graphics + +This Tutorial shows how to do 2d graphics with the Irrlicht Engine. +It shows how to draw images, keycolor based sprites, +transparent rectangles, and different fonts. You may consider +this useful if you want to make a 2d game with the engine, or if +you want to draw a cool interface or head up display for your 3d game. + +As always, I include the header files, use the irr namespace, +and tell the linker to link with the .lib file. +*/ +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +/* +At first, we let the user select the driver type, then start up the engine, set +a caption, and get a pointer to the video driver. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device + + IrrlichtDevice *device = createDevice(driverType, + core::dimension2d(512, 384)); + + if (device == 0) + return 1; // could not create selected driver. + + device->setWindowCaption(L"Irrlicht Engine - 2D Graphics Demo"); + + video::IVideoDriver* driver = device->getVideoDriver(); + + /* + All 2d graphics in this example are put together into one texture, + 2ddemo.png. Because we want to draw colorkey based sprites, we need to + load this texture and tell the engine, which part of it should be + transparent based on a colorkey. + + In this example, we don't tell it the color directly, we just say "Hey + Irrlicht Engine, you'll find the color I want at position (0,0) on the + texture.". Instead, it would be also possible to call + driver->makeColorKeyTexture(images, video::SColor(0,0,0,0)), to make + e.g. all black pixels transparent. Please note that + makeColorKeyTexture just creates an alpha channel based on the color. + */ + video::ITexture* images = driver->getTexture("../../media/2ddemo.png"); + driver->makeColorKeyTexture(images, core::position2d(0,0)); + + /* + To be able to draw some text with two different fonts, we first load + them. Ok, we load just one. As the first font we just use the default + font which is built into the engine. Also, we define two rectangles + which specify the position of the images of the red imps (little flying + creatures) in the texture. + */ + gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont(); + gui::IGUIFont* font2 = + device->getGUIEnvironment()->getFont("../../media/fonthaettenschweiler.bmp"); + + core::rect imp1(349,15,385,78); + core::rect imp2(387,15,423,78); + + /* + Prepare a nicely filtering 2d render mode for special cases. + */ + driver->getMaterial2D().TextureLayer[0].BilinearFilter=true; + driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC; + + /* + Everything is prepared, now we can draw everything in the draw loop, + between the begin scene and end scene calls. In this example, we are + just doing 2d graphics, but it would be no problem to mix them with 3d + graphics. Just try it out, and draw some 3d vertices or set up a scene + with the scene manager and draw it. + */ + while(device->run() && driver) + { + if (device->isWindowActive()) + { + u32 time = device->getTimer()->getTime(); + + driver->beginScene(true, true, video::SColor(255,120,102,136)); + + /* + First, we draw 3 sprites, using the alpha channel we + created with makeColorKeyTexture. The last parameter + specifies that the drawing method should use this alpha + channel. The last-but-one parameter specifies a + color, with which the sprite should be colored. + (255,255,255,255) is full white, so the sprite will + look like the original. The third sprite is drawn + with the red channel modulated based on the time. + */ + + // draw fire & dragons background world + driver->draw2DImage(images, core::position2d(50,50), + core::rect(0,0,342,224), 0, + video::SColor(255,255,255,255), true); + + // draw flying imp + driver->draw2DImage(images, core::position2d(164,125), + (time/500 % 2) ? imp1 : imp2, 0, + video::SColor(255,255,255,255), true); + + // draw second flying imp with colorcylce + driver->draw2DImage(images, core::position2d(270,105), + (time/500 % 2) ? imp1 : imp2, 0, + video::SColor(255,(time) % 255,255,255), true); + + /* + Drawing text is really simple. The code should be self + explanatory. + */ + + // draw some text + if (font) + font->draw(L"This demo shows that Irrlicht is also capable of drawing 2D graphics.", + core::rect(130,10,300,50), + video::SColor(255,255,255,255)); + + // draw some other text + if (font2) + font2->draw(L"Also mixing with 3d graphics is possible.", + core::rect(130,20,300,60), + video::SColor(255,time % 255,time % 255,255)); + + /* + Next, we draw the Irrlicht Engine logo (without + using a color or an alpha channel). Since we slightly scale + the image we use the prepared filter mode. + */ + driver->enableMaterial2D(); + driver->draw2DImage(images, core::rect(10,10,108,48), + core::rect(354,87,442,118)); + driver->enableMaterial2D(false); + + /* + Finally draw a half-transparent rect under the mouse cursor. + */ + core::position2d m = device->getCursorControl()->getPosition(); + driver->draw2DRectangle(video::SColor(100,255,255,255), + core::rect(m.X-20, m.Y-20, m.X+20, m.Y+20)); + + driver->endScene(); + } + } + + device->drop(); + + return 0; +} + +/* +That's all. I hope it was not too difficult. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/06.2DGraphics/tutorial.html b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/tutorial.html new file mode 100644 index 0000000..ea6291a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/06.2DGraphics/tutorial.html @@ -0,0 +1,163 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
+
Tutorial 6. 2D Graphics
+
+
+
+

This Tutorial shows how to do 2d graphics with the Irrlicht Engine. + It shows how to draw images, keycolor based sprites, transparent rectangles + and different fonts. You will may consider this useful if you want to + make a 2d game with the engine, or if you want to draw a cool interface + or head up display for your 3d game.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
+ Lets start!
+

As always, I include the header files, use the irr namespace, and tell + the linker to link with the .lib file.

+ + + + +
#include <irrlicht.h>
#include <iostream>

using namespace irr;
+
#pragma comment(lib, "Irrlicht.lib")
+               
+

At first, we let the user select the driver type, then start up the + engine, set a caption, and get a pointer to the video driver.

+ + + + +
int main()
{
// let user select driver type
video::E_DRIVER_TYPE driverType;

printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;

switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 0;
}

// create device
+
  IrrlichtDevice *device = createDevice(driverType,
+         core::dimension2d<s32>(512, 384));
+
  if (device == 0)
+      return 1;
+ 
device->setWindowCaption(L"Irrlicht Engine - 2D Graphics Demo");
+
  video::IVideoDriver* driver = device->getVideoDriver();
+

All 2d graphics in this example are put together into one texture, + 2ddemo.bmp. Because we want to draw colorkey based sprites, we need + to load this texture and tell the engine, which part of it should be + transparent based on a colorkey. In this example, we don't tell it the + color directly, we just say "Hey Irrlicht Engine, you'll find the + color I want at position (0,0) on the texture.". Instead, it would + be also possible to call driver->makeColorKeyTexture(images, + video::SColor(0,0,0,0)), to make e.g. all black pixels transparent. + Please note, that makeColorKeyTexture just creates an alpha channel + based on the color.

+ + + + +
video::ITexture* images = driver->getTexture("../../media/2ddemo.bmp");
driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));
+

To be able to draw some text with two different fonts, we load them. + Ok, we load just one, as first font we just use the default font which + is built into the engine.
+ Also, we define two rectangles, which specify the position of the images + of the red imps (little flying creatures) in the texture.

+ + + + +
gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont();
gui::IGUIFont* font2 = device->getGUIEnvironment()->getFont( + "../../media/fonthaettenschweiler.bmp");
+
core::rect<s32> imp1(349,15,385,78);
+core::rect<s32> imp2(387,15,423,78);
+

Everything is prepared, now we can draw everything in the draw loop, + between the begin scene and end scene calls. In this example, we are + just doing 2d graphics, but it would be no problem to mix them with + 3d graphics. Just try it out, and draw some 3d vertices or set up a + scene with the scene manager and draw it.

+
+ + + + +
while(device->run() && driver)
{
if (device->isWindowActive())
{
u32 time = device->getTimer()->getTime();
driver->beginScene(true, true, video::SColor(0,120,102,136)); +
+

First, we draw 3 sprites, using the alpha channel we created with makeColorKeyTexture. + The last parameter specifiys that the drawing method should use thiw alpha + channel. The parameter before the last one specifies a color, with wich + the sprite should be colored. (255,255,255,255) is full white, so the + sprite will look like the original. The third sprite is drawed colored + based on the time.

+ + + + +
// draw fire & dragons background world
driver->draw2DImage(images, core::position2d<s32>(50,50),
core::rect<s32>(0,0,342,224), 0,
video::SColor(255,255,255,255), true);
+
// draw flying imp 
+driver->draw2DImage(images, core::position2d<s32>(164,125),
+  (time/500 % 2) ? imp1 : imp2, 0, 
+   video::SColor(255,255,255,255), true);
+
// draw second flying imp with colorcylce
+driver->draw2DImage(images, core::position2d<s32>(270,105),
+  (time/500 % 2) ? imp1 : imp2, 0, 
+  video::SColor(255,(time) % 255,255,255), true);
+

Drawing text is really simple. The code should be self explanatory.

+ + + + +
// draw some text
if (font)
font->draw(L"This is some text.",
core::rect<s32>(130,10,300,50),
video::SColor(255,255,255,255));
+
// draw some other text
+if (font2)
+   font2->draw(L"This is some other text.", 
+       core::rect<s32>(130,20,300,60),
+       video::SColor(255,time % 255,time % 255,255));
+

At last, we draw the Irrlicht Engine logo (without using a color or an + alpha channel) and a transparent 2d Rectangle at the position of the mouse + cursor.

+ + + + +
    // draw logo
driver->draw2DImage(images, core::position2d<s32>(10,10),
core::rect<s32>(354,87,442,118));
+
    // draw transparent rect under cursor
+    core::position2d<s32> m = device->getCursorControl()->getPosition();
+    driver->draw2DRectangle(video::SColor(100,255,255,255),
+          core::rect<s32>(m.X-20, m.Y-20, m.X+20, m.Y+20));
+
    driver->endScene();
+  }
+}
+

That's all, it was not really difficult, I hope.

+ + + + +
   device->drop();
+   return 0;
+}
+
+

 

+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.cbp b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.cbp new file mode 100644 index 0000000..0d7f828 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.dev b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.dev new file mode 100644 index 0000000..c13a041 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 07 Collision +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=07.Collision.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.vcproj b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.vcproj new file mode 100644 index 0000000..a4e4b07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc10.vcxproj new file mode 100644 index 0000000..03a94c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 07.Collision + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E} + Collision + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Collision.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\07.Collision.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Collision.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\07.Collision.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Collision.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\07.Collision.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Collision.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\07.Collision.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc11.vcxproj new file mode 100644 index 0000000..0db4b42 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 07.Collision + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E} + Collision + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Collision.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\07.Collision.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Collision.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\07.Collision.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Collision.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\07.Collision.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Collision.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\07.Collision.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc8.vcproj new file mode 100644 index 0000000..4a2b6c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc9.vcproj new file mode 100644 index 0000000..3cca93d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Collision_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/Makefile b/src/others/irrlicht-1.8.1/examples/07.Collision/Makefile new file mode 100644 index 0000000..6698725 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 07.Collision +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/main.cpp b/src/others/irrlicht-1.8.1/examples/07.Collision/main.cpp new file mode 100644 index 0000000..8387c49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/main.cpp @@ -0,0 +1,330 @@ +/** Example 007 Collision + +We will describe 2 methods: Automatic collision detection for moving through +3d worlds with stair climbing and sliding, and manual scene node and triangle +picking using a ray. In this case, we will use a ray coming out from the +camera, but you can use any ray. + +To start, we take the program from tutorial 2, which loads and displays a +quake 3 level. We will use the level to walk in it and to pick triangles from. +In addition we'll place 3 animated models into it for triangle picking. The +following code starts up the engine and loads the level, as per tutorial 2. +*/ +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +enum +{ + // I use this ISceneNode ID to indicate a scene node that is + // not pickable by getSceneNodeAndCollisionPointFromRay() + ID_IsNotPickable = 0, + + // I use this flag in ISceneNode IDs to indicate that the + // scene node can be picked by ray selection. + IDFlag_IsPickable = 1 << 0, + + // I use this flag in ISceneNode IDs to indicate that the + // scene node can be highlighted. In this example, the + // homonids can be highlighted, but the level mesh can't. + IDFlag_IsHighlightable = 1 << 1 +}; + +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device + + IrrlichtDevice *device = + createDevice(driverType, core::dimension2d(640, 480), 16, false); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3"); + + scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp"); + scene::IMeshSceneNode* q3node = 0; + + // The Quake mesh is pickable, but doesn't get highlighted. + if (q3levelmesh) + q3node = smgr->addOctreeSceneNode(q3levelmesh->getMesh(0), 0, IDFlag_IsPickable); + + /* + So far so good, we've loaded the quake 3 level like in tutorial 2. Now, + here comes something different: We create a triangle selector. A + triangle selector is a class which can fetch the triangles from scene + nodes for doing different things with them, for example collision + detection. There are different triangle selectors, and all can be + created with the ISceneManager. In this example, we create an + OctreeTriangleSelector, which optimizes the triangle output a little + bit by reducing it like an octree. This is very useful for huge meshes + like quake 3 levels. After we created the triangle selector, we attach + it to the q3node. This is not necessary, but in this way, we do not + need to care for the selector, for example dropping it after we do not + need it anymore. + */ + + scene::ITriangleSelector* selector = 0; + + if (q3node) + { + q3node->setPosition(core::vector3df(-1350,-130,-1400)); + + selector = smgr->createOctreeTriangleSelector( + q3node->getMesh(), q3node, 128); + q3node->setTriangleSelector(selector); + // We're not done with this selector yet, so don't drop it. + } + + + /* + We add a first person shooter camera to the scene so that we can see and + move in the quake 3 level like in tutorial 2. But this, time, we add a + special animator to the camera: A Collision Response animator. This + animator modifies the scene node to which it is attached to in order to + prevent it moving through walls, and to add gravity to it. The + only thing we have to tell the animator is how the world looks like, + how big the scene node is, how much gravity to apply and so on. After the + collision response animator is attached to the camera, we do not have to do + anything more for collision detection, anything is done automatically. + The rest of the collision detection code below is for picking. And please + note another cool feature: The collision response animator can be + attached also to all other scene nodes, not only to cameras. And it can + be mixed with other scene node animators. In this way, collision + detection and response in the Irrlicht engine is really easy. + + Now we'll take a closer look on the parameters of + createCollisionResponseAnimator(). The first parameter is the + TriangleSelector, which specifies how the world, against collision + detection is done looks like. The second parameter is the scene node, + which is the object, which is affected by collision detection, in our + case it is the camera. The third defines how big the object is, it is + the radius of an ellipsoid. Try it out and change the radius to smaller + values, the camera will be able to move closer to walls after this. The + next parameter is the direction and speed of gravity. We'll set it to + (0, -10, 0), which approximates to realistic gravity, assuming that our + units are metres. You could set it to (0,0,0) to disable gravity. And the + last value is just a translation: Without this, the ellipsoid with which + collision detection is done would be around the camera, and the camera would + be in the middle of the ellipsoid. But as human beings, we are used to have our + eyes on top of the body, with which we collide with our world, not in + the middle of it. So we place the scene node 50 units over the center + of the ellipsoid with this parameter. And that's it, collision + detection works now. + */ + + // Set a jump speed of 3 units per second, which gives a fairly realistic jump + // when used with the gravity of (0, -10, 0) in the collision response animator. + scene::ICameraSceneNode* camera = + smgr->addCameraSceneNodeFPS(0, 100.0f, .3f, ID_IsNotPickable, 0, 0, true, 3.f); + camera->setPosition(core::vector3df(50,50,-60)); + camera->setTarget(core::vector3df(-70,30,-60)); + + if (selector) + { + scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator( + selector, camera, core::vector3df(30,50,30), + core::vector3df(0,-10,0), core::vector3df(0,30,0)); + selector->drop(); // As soon as we're done with the selector, drop it. + camera->addAnimator(anim); + anim->drop(); // And likewise, drop the animator when we're done referring to it. + } + + // Now I create three animated characters which we can pick, a dynamic light for + // lighting them, and a billboard for drawing where we found an intersection. + + // First, let's get rid of the mouse cursor. We'll use a billboard to show + // what we're looking at. + device->getCursorControl()->setVisible(false); + + // Add the billboard. + scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode(); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); + bill->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp")); + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialFlag(video::EMF_ZBUFFER, false); + bill->setSize(core::dimension2d(20.0f, 20.0f)); + bill->setID(ID_IsNotPickable); // This ensures that we don't accidentally ray-pick it + + /* Add 3 animated hominids, which we can pick using a ray-triangle intersection. + They all animate quite slowly, to make it easier to see that accurate triangle + selection is being performed. */ + scene::IAnimatedMeshSceneNode* node = 0; + + video::SMaterial material; + + // Add an MD2 node, which uses vertex-based animation. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/faerie.md2"), + 0, IDFlag_IsPickable | IDFlag_IsHighlightable); + node->setPosition(core::vector3df(-90,-15,-140)); // Put its feet on the floor. + node->setScale(core::vector3df(1.6f)); // Make it appear realistically scaled + node->setMD2Animation(scene::EMAT_POINT); + node->setAnimationSpeed(20.f); + material.setTexture(0, driver->getTexture("../../media/faerie2.bmp")); + material.Lighting = true; + material.NormalizeNormals = true; + node->getMaterial(0) = material; + + // Now create a triangle selector for it. The selector will know that it + // is associated with an animated node, and will update itself as necessary. + selector = smgr->createTriangleSelector(node); + node->setTriangleSelector(selector); + selector->drop(); // We're done with this selector, so drop it now. + + // And this B3D file uses skinned skeletal animation. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/ninja.b3d"), + 0, IDFlag_IsPickable | IDFlag_IsHighlightable); + node->setScale(core::vector3df(10)); + node->setPosition(core::vector3df(-75,-66,-80)); + node->setRotation(core::vector3df(0,90,0)); + node->setAnimationSpeed(8.f); + node->getMaterial(0).NormalizeNormals = true; + node->getMaterial(0).Lighting = true; + // Just do the same as we did above. + selector = smgr->createTriangleSelector(node); + node->setTriangleSelector(selector); + selector->drop(); + + // This X files uses skeletal animation, but without skinning. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/dwarf.x"), + 0, IDFlag_IsPickable | IDFlag_IsHighlightable); + node->setPosition(core::vector3df(-70,-66,-30)); // Put its feet on the floor. + node->setRotation(core::vector3df(0,-90,0)); // And turn it towards the camera. + node->setAnimationSpeed(20.f); + node->getMaterial(0).Lighting = true; + selector = smgr->createTriangleSelector(node); + node->setTriangleSelector(selector); + selector->drop(); + + + // And this mdl file uses skinned skeletal animation. + node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/yodan.mdl"), + 0, IDFlag_IsPickable | IDFlag_IsHighlightable); + node->setPosition(core::vector3df(-90,-25,20)); + node->setScale(core::vector3df(0.8f)); + node->getMaterial(0).Lighting = true; + node->setAnimationSpeed(20.f); + + // Just do the same as we did above. + selector = smgr->createTriangleSelector(node); + node->setTriangleSelector(selector); + selector->drop(); + + material.setTexture(0, 0); + material.Lighting = false; + + // Add a light, so that the unselected nodes aren't completely dark. + scene::ILightSceneNode * light = smgr->addLightSceneNode(0, core::vector3df(-60,100,400), + video::SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f); + light->setID(ID_IsNotPickable); // Make it an invalid target for selection. + + // Remember which scene node is highlighted + scene::ISceneNode* highlightedSceneNode = 0; + scene::ISceneCollisionManager* collMan = smgr->getSceneCollisionManager(); + int lastFPS = -1; + + // draw the selection triangle only as wireframe + material.Wireframe=true; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, 0); + smgr->drawAll(); + + // Unlight any currently highlighted scene node + if (highlightedSceneNode) + { + highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, true); + highlightedSceneNode = 0; + } + + // All intersections in this example are done with a ray cast out from the camera to + // a distance of 1000. You can easily modify this to check (e.g.) a bullet + // trajectory or a sword's position, or create a ray from a mouse click position using + // ISceneCollisionManager::getRayFromScreenCoordinates() + core::line3d ray; + ray.start = camera->getPosition(); + ray.end = ray.start + (camera->getTarget() - ray.start).normalize() * 1000.0f; + + // Tracks the current intersection point with the level or a mesh + core::vector3df intersection; + // Used to show with triangle has been hit + core::triangle3df hitTriangle; + + // This call is all you need to perform ray/triangle collision on every scene node + // that has a triangle selector, including the Quake level mesh. It finds the nearest + // collision point/triangle, and returns the scene node containing that point. + // Irrlicht provides other types of selection, including ray/triangle selector, + // ray/box and ellipse/triangle selector, plus associated helpers. + // See the methods of ISceneCollisionManager + scene::ISceneNode * selectedSceneNode = + collMan->getSceneNodeAndCollisionPointFromRay( + ray, + intersection, // This will be the position of the collision + hitTriangle, // This will be the triangle hit in the collision + IDFlag_IsPickable, // This ensures that only nodes that we have + // set up to be pickable are considered + 0); // Check the entire scene (this is actually the implicit default) + + // If the ray hit anything, move the billboard to the collision position + // and draw the triangle that was hit. + if(selectedSceneNode) + { + bill->setPosition(intersection); + + // We need to reset the transform before doing our own rendering. + driver->setTransform(video::ETS_WORLD, core::matrix4()); + driver->setMaterial(material); + driver->draw3DTriangle(hitTriangle, video::SColor(0,255,0,0)); + + // We can check the flags for the scene node that was hit to see if it should be + // highlighted. The animated nodes can be highlighted, but not the Quake level mesh + if((selectedSceneNode->getID() & IDFlag_IsHighlightable) == IDFlag_IsHighlightable) + { + highlightedSceneNode = selectedSceneNode; + + // Highlighting in this case means turning lighting OFF for this node, + // which means that it will be drawn with full brightness. + highlightedSceneNode->setMaterialFlag(video::EMF_LIGHTING, false); + } + } + + // We're all done drawing, so end the scene. + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw str = L"Collision detection example - Irrlicht Engine ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + device->drop(); + + return 0; +} + +/* +**/ + diff --git a/src/others/irrlicht-1.8.1/examples/07.Collision/tutorial.html b/src/others/irrlicht-1.8.1/examples/07.Collision/tutorial.html new file mode 100644 index 0000000..c04fce9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/07.Collision/tutorial.html @@ -0,0 +1,308 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
+
Tutorial 7. Collision detection + and response
+
+
+
+

In this tutorial, I will show how to collision detection with the Irrlicht + Engine. I will describe 3 methods: Automatic collision detection for + moving through 3d worlds with stair climbing and sliding, manual triangle + picking and manual scene node picking.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
+ Lets start!
+
+

To start, we take the program from tutorial 2, which loaded and displayed + a quake 3 level. We will use the level to walk in it and to pick triangles + from it. In addition we'll place 3 animated models into it for scene + node picking. The following code starts up the engine and loads a + quake 3 level. I will not explain it, because it should already be + known from tutorial 2.

+ + + + +
#include <irrlicht.h>
+#include <iostream>
+
using namespace irr; + +#pragma comment(lib, "Irrlicht.lib") + +int main() +{ + // let user select driver type +
video::E_DRIVER_TYPE driverType;

printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;

switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 0;
}
+ // create device
+
  IrrlichtDevice *device = createDevice(driverType,
+     core::dimension2d<s32>(640, 480), 16, false);
+ if (device == 0)
return 1; // could not create selected driver.

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();

device->getFileSystem()->addZipFileArchive
("../../media/map-20kdm2.pk3"); + + + scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp"); + scene::ISceneNode* q3node = 0; + + if (q3levelmesh) + q3node = smgr->addOctTreeSceneNode(q3levelmesh->getMesh(0)); +
+
+

So far so good, we've loaded the quake 3 level like in tutorial + 2. Now, here comes something different: We create a triangle selector. + A triangle selector is a class which can fetch the triangles from + scene nodes for doing different things with them, for example collision + detection. There are different triangle selectors, and all can be + created with the ISceneManager. In this example, we create an OctTreeTriangleSelector, + which optimizes the triangle output a little bit by reducing it like + an octree. This is very useful for huge meshes like quake 3 levels.
+ Afte we created the triangle selector, we attach it to the q3node. + This is not necessary, but in this way, we do not need to care for + the selector, for example dropping it after we do not need it anymore.

+ + + + +
scene::ITriangleSelector* selector = 0;
+	
+	if (q3node)
+	{		
+		q3node->setPosition(core::vector3df(-1370,-130,-1400));
+
+		selector = smgr->createOctTreeTriangleSelector(
+            q3levelmesh->getMesh(0), q3node, 128);
+		q3node->setTriangleSelector(selector);
+	}
+

We add a first person shooter camera to the scene for being able + to move in the quake 3 level like in tutorial 2. But this, time, we + add a special animator to the camera: A Collision Response animator. + This thing modifies the scene node to which it is attached to in that + way, that it may no more move through walls and is affected by gravity. + The only thing we have to tell the animator is how the world looks + like, how big the scene node is, how gravity and so on. After the + collision response animator is attached to the camera, we do not have + to do anything more for collision detection, anything is done automaticly, + all other collision detection code below is for picking. And please + note another cool feature: The collsion response animator can be attached + also to all other scene nodes, not only to cameras. And it can be + mixed with other scene node animators. In this way, collision detection + and response in the Irrlicht
+ engine is really, really easy.
+ Now we'll take a closer look on the parameters of createCollisionResponseAnimator(). + The first parameter is the TriangleSelector, which specifies how the + world, against collision detection is done looks like. The second + parameter is the scene node, which is the object, which is affected + by collision detection, in our case it is the camera. The third defines + how big the object is, it is the radius of an ellipsoid. Try it out + and change the radius to smaller values, the camera will be able to + move closer to walls after this. The next parameter is the direction + and speed of gravity. You could set it to (0,0,0) to disable gravity. + And the last value is just a translation: Without this, the ellipsoid + with which collision detection is done would be around the camera, + and the camera would be in the middle of the ellipsoid. But as human + beings, we are used to have our eyes on top of the body, with which + we collide with our world, not in the middle of it. So we place the + scene node 50 units over the center of the ellipsoid with this parameter. + And that's it, collision detection works now.
+

+ + + + +
	scene::ICameraSceneNode* camera = 	
camera = smgr->addCameraSceneNodeFPS(0,100.0f,300.0f); + camera->setPosition(core::vector3df(-100,50,-150)); + + scene::ISceneNodeAnimator* anim =
smgr->createCollisionResponseAnimator( + selector, camera, core::vector3df(30,50,30), + core::vector3df(0,-3,0), + core::vector3df(0,50,0));
+ selector->drop();
+ camera->addAnimator(anim); + anim->drop();
+

Because collision detection is no big deal in irrlicht, I'll describe + how to do two different types of picking in the next section. But + before this, I'll prepare the scene a little. I need three animated + characters which we
+ could pick later, a dynamic light for lighting them, a billboard for + drawing where we found an intersection, and, yes, I need to get rid + of this mouse cursor. :)

+ + + + +
	// disable mouse cursor
+
+	device->getCursorControl()->setVisible(false);
+
+	// add billboard
+
+	scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
+	bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
+	bill->setMaterialTexture(0, driver->getTexture(
"../../media/particle.bmp")); + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setSize(core::dimension2d<f32>(20.0f, 20.0f)); + + // add 3 animated faeries. + + video::SMaterial material; + material.Texture1 = driver->getTexture(
"../../media/faerie2.bmp"
); + material.Lighting = true; + + scene::IAnimatedMeshSceneNode* node = 0; + scene::IAnimatedMesh* faerie = smgr->getMesh(
"../../media/faerie.md2"); + + if (faerie) + { + node = smgr->addAnimatedMeshSceneNode(faerie); + node->setPosition(core::vector3df(-70,0,-90)); + node->setMD2Animation(scene::EMAT_RUN); + node->getMaterial(0) = material; + + node = smgr->addAnimatedMeshSceneNode(faerie); + node->setPosition(core::vector3df(-70,0,-30)); + node->setMD2Animation(scene::EMAT_SALUTE); + node->getMaterial(0) = material; + + node = smgr->addAnimatedMeshSceneNode(faerie); + node->setPosition(core::vector3df(-70,0,-60)); + node->setMD2Animation(scene::EMAT_JUMP); + node->getMaterial(0) = material; + } + + material.Texture1 = 0; + material.Lighting = false; + + // Add a light + + smgr->addLightSceneNode(0, core::vector3df(-60,100,400), + video::SColorf(1.0f,1.0f,1.0f,1.0f), + 600.0f);
+

For not making it to complicated, I'm doing picking inside the drawing + loop. We take two pointers for storing the current and the last selected + scene node and start the loop.

+
+ + + + +
	scene::ISceneNode* selectedSceneNode = 0;
+	scene::ISceneNode* lastSelectedSceneNode = 0;
+
+	
+	int lastFPS = -1;
+
+	while(device->run())
if (device->isWindowActive()) + { + driver->beginScene(true, true, 0); + + smgr->drawAll();
+

After we've drawn the whole scene whit smgr->drawAll(), we'll do + the first picking: We want to know which triangle of the world we are + looking at. In addition, we want the exact point of the quake 3 level + we are looking at. For this, we create a 3d line starting at the position + of the camera and going through the lookAt-target of it. Then we ask + the collision manager if this line collides with a triangle of the world + stored in the triangle selector. If yes, we draw the 3d triangle and + set the position of the billboard to the intersection point.

+ + + + +
		core::line3d<f32> line;
+		line.start = camera->getPosition();
+		line.end = line.start +
+         (camera->getTarget() - line.start).normalize() * 1000.0f;
+
+		core::vector3df intersection;
+		core::triangle3df tri;
+
+		if (smgr->getSceneCollisionManager()->getCollisionPoint(
+			line, selector, intersection, tri))
+		{
+			bill->setPosition(intersection);
+				
+			driver->setTransform(video::ETS_WORLD, core::matrix4());
+			driver->setMaterial(material);
+			driver->draw3DTriangle(tri, video::SColor(0,255,0,0));
+		}
+

Another type of picking supported by the Irrlicht Engine is scene + node picking based on bouding boxes. Every scene node has got a bounding + box, and because of that, it's very fast for example to get the scene + node which the camera looks
+ at. Again, we ask the collision manager for this, and if we've got a + scene node, we highlight it by disabling Lighting in its material, if + it is not the billboard or the quake 3 level.

+ + + + +
		selectedSceneNode = smgr->getSceneCollisionManager()->
+          getSceneNodeFromCameraBB(camera);
+
+		if (lastSelectedSceneNode)
+			lastSelectedSceneNode->setMaterialFlag(
+                video::EMF_LIGHTING, true);
+
+		if (selectedSceneNode == q3node ||
+           selectedSceneNode == bill)
+			selectedSceneNode = 0;
+
+		if (selectedSceneNode)
+			selectedSceneNode->setMaterialFlag(
+               video::EMF_LIGHTING, false);
+
+		lastSelectedSceneNode = selectedSceneNode;
+

That's it, we just have to finish drawing.

+ + + + +
		driver->endScene();
+
+		int fps = driver->getFPS();
+
+		if (lastFPS != fps)
+		{
+		  core::stringw str = L"Collision detection example - Irrlicht Engine [";
str += driver->getName();
str += "] FPS:";
str += fps;

device->setWindowCaption(str.c_str());
lastFPS = fps;
} + } + + device->drop(); + + return 0; +} + +
+

 

+

 

+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/Makefile b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/Makefile new file mode 100644 index 0000000..05b68ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 08.SpecialFX +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.cbp b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.cbp new file mode 100644 index 0000000..05243f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.cbp @@ -0,0 +1,54 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.dev b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.dev new file mode 100644 index 0000000..b2c2f26 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 08 Special Effects +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=08.SpecialFX.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.vcproj b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.vcproj new file mode 100644 index 0000000..e22266e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc10.vcxproj new file mode 100644 index 0000000..c46d1c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 08.SpecialFX + {C869BF55-B9D6-4980-BC92-60FA0CF8411A} + SpecialFX + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/SpecialFX.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/SpecialFX.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/SpecialFX.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/SpecialFX.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc11.vcxproj new file mode 100644 index 0000000..3e2e1c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 08.SpecialFX + {C869BF55-B9D6-4980-BC92-60FA0CF8411A} + SpecialFX + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/SpecialFX.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/SpecialFX.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/SpecialFX.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/SpecialFX.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc8.vcproj new file mode 100644 index 0000000..21dd96f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc9.vcproj new file mode 100644 index 0000000..29763e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/SpecialFX_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/main.cpp b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/main.cpp new file mode 100644 index 0000000..d8f32f7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/main.cpp @@ -0,0 +1,308 @@ +/** Example 008 SpecialFX + +This tutorials describes how to do special effects. It shows how to use stencil +buffer shadows, the particle system, billboards, dynamic light, and the water +surface scene node. + +We start like in some tutorials before. Please note that this time, the +'shadows' flag in createDevice() is set to true, for we want to have a dynamic +shadow casted from an animated character. If this example runs too slow, +set it to false. The Irrlicht Engine checks if your hardware doesn't support +the stencil buffer, and disables shadows by itself, but just in case the demo +runs slow on your hardware. +*/ + +#include +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +int main() +{ + // ask if user would like shadows + char i; + printf("Please press 'y' if you want to use realtime shadows.\n"); + + std::cin >> i; + + const bool shadows = (i == 'y'); + + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + + /* + Create device and exit if creation failed. We make the stencil flag + optional to avoid slow screen modes for runs without shadows. + */ + + IrrlichtDevice *device = + createDevice(driverType, core::dimension2d(640, 480), + 16, false, shadows); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + /* + For our environment, we load a .3ds file. It is a small room I modelled + with Anim8or and exported into the 3ds format because the Irrlicht + Engine does not support the .an8 format. I am a very bad 3d graphic + artist, and so the texture mapping is not very nice in this model. + Luckily I am a better programmer than artist, and so the Irrlicht + Engine is able to create a cool texture mapping for me: Just use the + mesh manipulator and create a planar texture mapping for the mesh. If + you want to see the mapping I made with Anim8or, uncomment this line. I + also did not figure out how to set the material right in Anim8or, it + has a specular light color which I don't really like. I'll switch it + off too with this code. + */ + + scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/room.3ds"); + + smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.004f); + + scene::ISceneNode* node = 0; + + node = smgr->addAnimatedMeshSceneNode(mesh); + node->setMaterialTexture(0, driver->getTexture("../../media/wall.jpg")); + node->getMaterial(0).SpecularColor.set(0,0,0,0); + + /* + Now, for the first special effect: Animated water. It works like this: + The WaterSurfaceSceneNode takes a mesh as input and makes it wave like + a water surface. And if we let this scene node use a nice material like + the EMT_REFLECTION_2_LAYER, it looks really cool. We are doing this + with the next few lines of code. As input mesh, we create a hill plane + mesh, without hills. But any other mesh could be used for this, you + could even use the room.3ds (which would look really strange) if you + want to. + */ + + mesh = smgr->addHillPlaneMesh( "myHill", + core::dimension2d(20,20), + core::dimension2d(40,40), 0, 0, + core::dimension2d(0,0), + core::dimension2d(10,10)); + + node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f); + node->setPosition(core::vector3df(0,7,0)); + + node->setMaterialTexture(0, driver->getTexture("../../media/stones.jpg")); + node->setMaterialTexture(1, driver->getTexture("../../media/water.jpg")); + + node->setMaterialType(video::EMT_REFLECTION_2_LAYER); + + /* + The second special effect is very basic, I bet you saw it already in + some Irrlicht Engine demos: A transparent billboard combined with a + dynamic light. We simply create a light scene node, let it fly around, + and to make it look more cool, we attach a billboard scene node to it. + */ + + // create light + + node = smgr->addLightSceneNode(0, core::vector3df(0,0,0), + video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 800.0f); + scene::ISceneNodeAnimator* anim = 0; + anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),250.0f); + node->addAnimator(anim); + anim->drop(); + + // attach billboard to light + + node = smgr->addBillboardSceneNode(node, core::dimension2d(50, 50)); + node->setMaterialFlag(video::EMF_LIGHTING, false); + node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + node->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp")); + + /* + The next special effect is a lot more interesting: A particle system. + The particle system in the Irrlicht Engine is quite modular and + extensible, but yet easy to use. There is a particle system scene node + into which you can put a particle emitter, which makes particles come out + of nothing. These emitters are quite flexible and usually have lots of + parameters like direction, amount, and color of the particles they + create. + + There are different emitters, for example a point emitter which lets + particles pop out at a fixed point. If the particle emitters available + in the engine are not enough for you, you can easily create your own + ones, you'll simply have to create a class derived from the + IParticleEmitter interface and attach it to the particle system using + setEmitter(). In this example we create a box particle emitter, which + creates particles randomly inside a box. The parameters define the box, + direction of the particles, minimal and maximal new particles per + second, color, and minimal and maximal lifetime of the particles. + + Because only with emitters particle system would be a little bit + boring, there are particle affectors which modify particles while + they fly around. Affectors can be added to a particle system for + simulating additional effects like gravity or wind. + The particle affector we use in this example is an affector which + modifies the color of the particles: It lets them fade out. Like the + particle emitters, additional particle affectors can also be + implemented by you, simply derive a class from IParticleAffector and + add it with addAffector(). + + After we set a nice material to the particle system, we have a cool + looking camp fire. By adjusting material, texture, particle emitter, + and affector parameters, it is also easily possible to create smoke, + rain, explosions, snow, and so on. + */ + + // create a particle system + + scene::IParticleSystemSceneNode* ps = + smgr->addParticleSystemSceneNode(false); + + scene::IParticleEmitter* em = ps->createBoxEmitter( + core::aabbox3d(-7,0,-7,7,1,7), // emitter size + core::vector3df(0.0f,0.06f,0.0f), // initial direction + 80,100, // emit rate + video::SColor(0,255,255,255), // darkest color + video::SColor(0,255,255,255), // brightest color + 800,2000,0, // min and max age, angle + core::dimension2df(10.f,10.f), // min size + core::dimension2df(20.f,20.f)); // max size + + ps->setEmitter(em); // this grabs the emitter + em->drop(); // so we can drop it here without deleting it + + scene::IParticleAffector* paf = ps->createFadeOutParticleAffector(); + + ps->addAffector(paf); // same goes for the affector + paf->drop(); + + ps->setPosition(core::vector3df(-70,60,40)); + ps->setScale(core::vector3df(2,2,2)); + ps->setMaterialFlag(video::EMF_LIGHTING, false); + ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + ps->setMaterialTexture(0, driver->getTexture("../../media/fire.bmp")); + ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + + /* + Next we add a volumetric light node, which adds a glowing fake area light to + the scene. Like with the billboards and particle systems we also assign a + texture for the desired effect, though this time we'll use a texture animator + to create the illusion of a magical glowing area effect. + */ + scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1, + 32, // Subdivisions on U axis + 32, // Subdivisions on V axis + video::SColor(0, 255, 255, 255), // foot color + video::SColor(0, 0, 0, 0)); // tail color + + if (n) + { + n->setScale(core::vector3df(56.0f, 56.0f, 56.0f)); + n->setPosition(core::vector3df(-120,50,40)); + + // load textures for animation + core::array textures; + for (s32 g=7; g > 0; --g) + { + core::stringc tmp; + tmp = "../../media/portal"; + tmp += g; + tmp += ".bmp"; + video::ITexture* t = driver->getTexture( tmp.c_str() ); + textures.push_back(t); + } + + // create texture animator + scene::ISceneNodeAnimator* glow = smgr->createTextureAnimator(textures, 150); + + // add the animator + n->addAnimator(glow); + + // drop the animator because it was created with a create() function + glow->drop(); + } + + /* + As our last special effect, we want a dynamic shadow be casted from an + animated character. For this we load a DirectX .x model and place it + into our world. For creating the shadow, we simply need to call + addShadowVolumeSceneNode(). The color of shadows is only adjustable + globally for all shadows, by calling ISceneManager::setShadowColor(). + Voila, here is our dynamic shadow. + + Because the character is a little bit too small for this scene, we make + it bigger using setScale(). And because the character is lighted by a + dynamic light, we need to normalize the normals to make the lighting on + it correct. This is always necessary if the scale of a dynamic lighted + model is not (1,1,1). Otherwise it would get too dark or too bright + because the normals will be scaled too. + */ + + // add animated character + + mesh = smgr->getMesh("../../media/dwarf.x"); + scene::IAnimatedMeshSceneNode* anode = 0; + + anode = smgr->addAnimatedMeshSceneNode(mesh); + anode->setPosition(core::vector3df(-50,20,-60)); + anode->setAnimationSpeed(15); + + // add shadow + anode->addShadowVolumeSceneNode(); + smgr->setShadowColor(video::SColor(150,0,0,0)); + + // make the model a little bit bigger and normalize its normals + // because of the scaling, for correct lighting + anode->setScale(core::vector3df(2,2,2)); + anode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); + + /* + Finally we simply have to draw everything, that's all. + */ + + scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); + camera->setPosition(core::vector3df(-50,50,-150)); + camera->setFarValue(10000.0f); // this increase a shadow visible range. + + // disable mouse cursor + device->getCursorControl()->setVisible(false); + + s32 lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, 0); + + smgr->drawAll(); + + driver->endScene(); + + const s32 fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw str = L"Irrlicht Engine - SpecialFX example ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/08.SpecialFX/tutorial.html b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/tutorial.html new file mode 100644 index 0000000..8c1fc51 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/08.SpecialFX/tutorial.html @@ -0,0 +1,278 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 8. Special Effects
+
+
+
+

This tutorials describes how to do special effects. It shows how to + use stencil buffer shadows, the particle system, billboards, dynamic + light and the water surface scene node.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
Lets start!
+
+

We start like in some tutorials before. Please note that this time, + the 'shadows' flag in createDevice() is set to true, for we want to + have a dynamic shadow casted from an animated character. If your this + example runs to slow, set it to false. The Irrlicht Engine checks + if your hardware doesn't support the stencil buffer, and disables + shadows by itself, but just in case the demo runs slow on your hardware.

+ + + + +
#include <irrlicht.h>
+#include <iostream>
+
using namespace irr; + +#pragma comment(lib, "Irrlicht.lib") + +int main() +{ + // ask user for driver
video::E_DRIVER_TYPE driverType;
+ printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;

switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
} + + // create device and exit if creation failed
IrrlichtDevice *device = createDevice(driverType, + core::dimension2d<s32>(640, 480), 16, false, true); + + if (device == 0) + return 1; + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); +
+
+

For our environment, we load a .3ds file. It is a small room I modelled + with Anim8or and exported it into the 3ds format because the Irrlicht + Engine did not support the .an8 format when I wrote this tutorial. + I am a very bad 3d graphic artist, and so the texture mapping is not + very nice in this model. Luckily I am a better programmer than artist, + and so the Irrlicht Engine is able to create a cool texture mapping + for me: Just use the mesh manipulator and create a planar texture + mapping for the mesh. If you want to see the mapping I made with Anim8or, + uncomment this line. I also did not figure out how to
+ set the material right in Anim8or, it has a specular light color + which I don't really
+ like. I'll switch it off too with this code.

+ + + + +
	scene::IAnimatedMesh* mesh = smgr->getMesh(
+		"../../media/room.3ds");
+
+	smgr->getMeshManipulator()->makePlanarTextureMapping(
+		mesh->getMesh(0), 0.008f);
+
+	scene::ISceneNode* node = 0;
+
+	node = smgr->addAnimatedMeshSceneNode(mesh);
+	node->setMaterialTexture(0,	driver->getTexture("../../media/wall.jpg"));
+	node->getMaterial(0).SpecularColor.set(0,0,0,0);
+

Now, for the first special effect: Animated water. It works like + this: The WaterSurfaceSceneNode takes a mesh as input and makes it + wave like a water surface. And if we let this scene node use a nice + material like the MT_REFLECTION_2_LAYER, it looks really cool. We + are doing this with the next few lines of code. As input mesh, we + create a hill plane mesh, without hills. But any other mesh could + be used for this, you could even use the room.3ds (which would look + really strange) if you wanted to.

+ + + + +
	mesh = smgr->addHillPlaneMesh("myHill",
+		core::dimension2d<f32>(20,20),
+		core::dimension2d<s32>(40,40), 0, 0,
+		core::dimension2d<f32>(0,0),
+		core::dimension2d<f32>(10,10));
+
+	node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
+	node->setPosition(core::vector3df(0,7,0));
+
+	node->setMaterialTexture(0,	driver->getTexture("../../media/stones.jpg"));
+	node->setMaterialTexture(1,	driver->getTexture("../../media/water.jpg"));
+
+	node->setMaterialType(video::EMT_REFLECTION_2_LAYER);
+
+

The second special effect is very basic, I bet you saw it already + in some Irrlicht Engine demos: A transparent billboard combined with + a dynamic light. We simply create a light scene node, let it fly around, + an to make it look more cool, we attach a billboard scene node to + it.

+ + + + +
	// create light
+
+	node = smgr->addLightSceneNode(0, core::vector3df(0,0,0), 
+		video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 600.0f);
+	scene::ISceneNodeAnimator* anim = 0;
+	anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),250.0f);
+	node->addAnimator(anim);
+	anim->drop();
+
+	// attach billboard to light
+
+	node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));
+	node->setMaterialFlag(video::EMF_LIGHTING, false);
+	node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+	node->setMaterialTexture(0,	driver->getTexture("../../media/particlewhite.bmp"));
+
+
+

The next special effect is a lot more interesting: A particle system. + The particle system in the Irrlicht Engine is quit modular and extensible + and yet easy to use. There is a particle system scene node into which + you can put particle emitters, which make particles come out of nothing. + These emitters are quite flexible and usually have lots of parameters + like direction, amount and color of the particles they should create.
+ There are different emitters, for example a point emitter which lets + particles pop out at a fixed point. If the particle emitters available + in the engine are not enough for you, you can easily create your own + ones, you'll simply have to create a class derived from the IParticleEmitter + interface and attach it to the particle system using setEmitter().
+ In this example we create a box particle emitter, which creates particles + randomly inside a box. The parameters define the box, direction of + the particles, minimal and maximal new particles per second, color + and minimal and maximal livetime of the particles.

+

Because only with emitters particle system would be a little bit + boring, there are particle affectors, which modify particles during + they fly around. They can be added to the particle system, simulating + additional effects like gravity or wind. The particle affector we + use in this example is an affector, which modifies the color of the + particles: It lets them fade out. Like the particle emitters, additional + particle affectors can also be implemented by you, simply derive a + class from IParticleAffector and add it with addAffector(). After + we set a nice material to the particle system, we have a cool looking + camp fire. By adjusting material, texture, particle emitter and affector + parameters, it is also easily possible to create smoke, rain, explosions, + snow, and so on.
+

+
+ + + + +
	scene::IParticleSystemSceneNode* ps = 0;
+	ps = smgr->addParticleSystemSceneNode(false);
+	ps->setPosition(core::vector3df(-70,60,40));
+	ps->setScale(core::vector3df(2,2,2));
+
+	ps->setParticleSize(core::dimension2d<f32>(20.0f, 10.0f));
+
+	scene::IParticleEmitter* em = ps->createBoxEmitter(
+		core::aabbox3d<f32>(-7,0,-7,7,1,7), 
+		core::vector3df(0.0f,0.03f,0.0f),
+		80,100, 
+		video::SColor(0,255,255,255), video::SColor(0,255,255,255),
+		800,2000);
+
+	ps->setEmitter(em);
+	em->drop();
+
+	scene::IParticleAffector* paf = 
+		ps->createFadeOutParticleAffector();
+
+	ps->addAffector(paf);
+	paf->drop();
+
+	ps->setMaterialFlag(video::EMF_LIGHTING, false);
+	ps->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+	ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
+

As our last special effect, we want a dynamic shadow be casted from + an animated character. For this we load a DirectX .x model and place + it into our world. For creating the shadow, we simply need to call addShadowVolumeSceneNode(). + The color of shadows is only adjustable globally for all shadows, by + calling ISceneManager::setShadowColor(). Voila, here is our dynamic + shadow.
+ Because the character is a little bit too small for this scene, we make + it bigger using setScale(). And because the character is lighted by + a dynamic light, we need to normalize the normals to make the lighting + on it correct. This is always necessary if the scale of a dynamic lighted + model is not (1,1,1). Otherwise it would get too dark or too bright + because the normals will be scaled too.

+ + + + +
	mesh = smgr->getMesh("../../media/dwarf.x");
+	scene::IAnimatedMeshSceneNode* anode = 0;
+
+	anode = smgr->addAnimatedMeshSceneNode(mesh);
+	anode->setPosition(core::vector3df(-50,20,-60));
+	anode->setAnimationSpeed(15);
+
+	// add shadow
+	anode->addShadowVolumeSceneNode();	
+	smgr->setShadowColor(video::SColor(220,0,0,0));
+
+	// make the model a little bit bigger and normalize its normals 
// because of this for correct lighting

anode->setScale(core::vector3df(2,2,2));
anode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);

+

Finally we simply have to draw everything, that's all.

+ + + + +
	scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
+	camera->setPosition(core::vector3df(-50,50,-150));
+
+
+	int lastFPS = -1;
+
+	while(device->run())
+	{
+		driver->beginScene(true, true, 0);
+
+		smgr->drawAll();
+
+		driver->endScene();
+
+		int fps = driver->getFPS();
+
+		if (lastFPS != fps)
+		{
+		  core::stringw str = L"Irrlicht Engine - SpecialFX example [";
str += driver->getName();
str += "] FPS:";
str += fps;

device->setWindowCaption(str.c_str());
lastFPS = fps;
} + } + + device->drop(); + + return 0; +} + +
+
+

 

+

 

+

 

+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/9.Meshviewer.rc b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/9.Meshviewer.rc new file mode 100644 index 0000000..3208583 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/9.Meshviewer.rc @@ -0,0 +1,84 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// German (Austria) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA) +#ifdef _WIN32 +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "icon.ico" +#endif // German (Austria) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Makefile b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Makefile new file mode 100644 index 0000000..99fe9d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 09.Meshviewer +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/MeshViewer.dev b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/MeshViewer.dev new file mode 100644 index 0000000..47416a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/MeshViewer.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 09 Mesh Viewer +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=09.MeshViewer.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.cbp b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.cbp new file mode 100644 index 0000000..4600ffd --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.vcproj b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.vcproj new file mode 100644 index 0000000..4077b86 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc10.vcxproj new file mode 100644 index 0000000..c9e9e97 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 09.Meshviewer + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06} + Meshviewer + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/Meshviewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Meshviewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/Meshviewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Meshviewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc11.vcxproj new file mode 100644 index 0000000..24ffe1e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 09.Meshviewer + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06} + Meshviewer + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/Meshviewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Meshviewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/Meshviewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Meshviewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc8.vcproj new file mode 100644 index 0000000..0346771 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc9.vcproj new file mode 100644 index 0000000..f6a8038 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/Meshviewer_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/icon.ico b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/icon.ico new file mode 100644 index 0000000..49f8eab Binary files /dev/null and b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/icon.ico differ diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/main.cpp b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/main.cpp new file mode 100644 index 0000000..b9dc550 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/main.cpp @@ -0,0 +1,1042 @@ +/** Example 009 Mesh Viewer + +This tutorial show how to create a more complex application with the engine. +We construct a simple mesh viewer using the user interface API and the +scene management of Irrlicht. The tutorial show how to create and use Buttons, +Windows, Toolbars, Menus, ComboBoxes, Tabcontrols, Editboxes, Images, +MessageBoxes, SkyBoxes, and how to parse XML files with the integrated XML +reader of the engine. + +We start like in most other tutorials: Include all necessary header files, add +a comment to let the engine be linked with the right .lib file in Visual +Studio, and declare some global variables. We also add two 'using namespace' +statements, so we do not need to write the whole names of all classes. In this +tutorial, we use a lot stuff from the gui namespace. +*/ +#include +#include "driverChoice.h" + +using namespace irr; +using namespace gui; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + + +/* +Some global variables used later on +*/ +IrrlichtDevice *Device = 0; +core::stringc StartUpModelFile; +core::stringw MessageText; +core::stringw Caption; +scene::ISceneNode* Model = 0; +scene::ISceneNode* SkyBox = 0; +bool Octree=false; +bool UseLight=false; + +scene::ICameraSceneNode* Camera[2] = {0, 0}; + +// Values used to identify individual GUI elements +enum +{ + GUI_ID_DIALOG_ROOT_WINDOW = 0x10000, + + GUI_ID_X_SCALE, + GUI_ID_Y_SCALE, + GUI_ID_Z_SCALE, + + GUI_ID_OPEN_MODEL, + GUI_ID_SET_MODEL_ARCHIVE, + GUI_ID_LOAD_AS_OCTREE, + + GUI_ID_SKY_BOX_VISIBLE, + GUI_ID_TOGGLE_DEBUG_INFO, + + GUI_ID_DEBUG_OFF, + GUI_ID_DEBUG_BOUNDING_BOX, + GUI_ID_DEBUG_NORMALS, + GUI_ID_DEBUG_SKELETON, + GUI_ID_DEBUG_WIRE_OVERLAY, + GUI_ID_DEBUG_HALF_TRANSPARENT, + GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES, + GUI_ID_DEBUG_ALL, + + GUI_ID_MODEL_MATERIAL_SOLID, + GUI_ID_MODEL_MATERIAL_TRANSPARENT, + GUI_ID_MODEL_MATERIAL_REFLECTION, + + GUI_ID_CAMERA_MAYA, + GUI_ID_CAMERA_FIRST_PERSON, + + GUI_ID_POSITION_TEXT, + + GUI_ID_ABOUT, + GUI_ID_QUIT, + + GUI_ID_TEXTUREFILTER, + GUI_ID_SKIN_TRANSPARENCY, + GUI_ID_SKIN_ANIMATION_FPS, + + GUI_ID_BUTTON_SET_SCALE, + GUI_ID_BUTTON_SCALE_MUL10, + GUI_ID_BUTTON_SCALE_DIV10, + GUI_ID_BUTTON_OPEN_MODEL, + GUI_ID_BUTTON_SHOW_ABOUT, + GUI_ID_BUTTON_SHOW_TOOLBOX, + GUI_ID_BUTTON_SELECT_ARCHIVE, + + GUI_ID_ANIMATION_INFO, + + // And some magic numbers + MAX_FRAMERATE = 80, + DEFAULT_FRAMERATE = 30 +}; + + +/* +Toggle between various cameras +*/ +void setActiveCamera(scene::ICameraSceneNode* newActive) +{ + if (0 == Device) + return; + + scene::ICameraSceneNode * active = Device->getSceneManager()->getActiveCamera(); + active->setInputReceiverEnabled(false); + + newActive->setInputReceiverEnabled(true); + Device->getSceneManager()->setActiveCamera(newActive); +} + +/* + Set the skin transparency by changing the alpha values of all skin-colors +*/ +void setSkinTransparency(s32 alpha, irr::gui::IGUISkin * skin) +{ + for (s32 i=0; igetColor((EGUI_DEFAULT_COLOR)i); + col.setAlpha(alpha); + skin->setColor((EGUI_DEFAULT_COLOR)i, col); + } +} + +/* + Update the display of the model scaling +*/ +void updateScaleInfo(scene::ISceneNode* model) +{ + IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true); + if (!toolboxWnd) + return; + if (!model) + { + toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( L"-" ); + toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText( L"-" ); + toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText( L"-" ); + } + else + { + core::vector3df scale = model->getScale(); + toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText( core::stringw(scale.X).c_str() ); + toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText( core::stringw(scale.Y).c_str() ); + toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText( core::stringw(scale.Z).c_str() ); + } +} + +/* +Function showAboutText() displays a messagebox with a caption and +a message text. The texts will be stored in the MessageText and Caption +variables at startup. +*/ +void showAboutText() +{ + // create modal message box with the text + // loaded from the xml file. + Device->getGUIEnvironment()->addMessageBox( + Caption.c_str(), MessageText.c_str()); +} + + +/* +Function loadModel() loads a model and displays it using an +addAnimatedMeshSceneNode and the scene manager. Nothing difficult. It also +displays a short message box, if the model could not be loaded. +*/ +void loadModel(const c8* fn) +{ + // modify the name if it a .pk3 file + + io::path filename(fn); + + io::path extension; + core::getFileNameExtension(extension, filename); + extension.make_lower(); + + // if a texture is loaded apply it to the current model.. + if (extension == ".jpg" || extension == ".pcx" || + extension == ".png" || extension == ".ppm" || + extension == ".pgm" || extension == ".pbm" || + extension == ".psd" || extension == ".tga" || + extension == ".bmp" || extension == ".wal" || + extension == ".rgb" || extension == ".rgba") + { + video::ITexture * texture = + Device->getVideoDriver()->getTexture( filename ); + if ( texture && Model ) + { + // always reload texture + Device->getVideoDriver()->removeTexture(texture); + texture = Device->getVideoDriver()->getTexture( filename ); + + Model->setMaterialTexture(0, texture); + } + return; + } + // if a archive is loaded add it to the FileArchive.. + else if (extension == ".pk3" || extension == ".zip" || extension == ".pak" || extension == ".npk") + { + Device->getFileSystem()->addFileArchive(filename.c_str()); + return; + } + + // load a model into the engine + + if (Model) + Model->remove(); + + Model = 0; + + if (extension==".irr") + { + core::array outNodes; + Device->getSceneManager()->loadScene(filename); + Device->getSceneManager()->getSceneNodesFromType(scene::ESNT_ANIMATED_MESH, outNodes); + if (outNodes.size()) + Model = outNodes[0]; + return; + } + + scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh( filename.c_str() ); + + if (!m) + { + // model could not be loaded + + if (StartUpModelFile != filename) + Device->getGUIEnvironment()->addMessageBox( + Caption.c_str(), L"The model could not be loaded. " \ + L"Maybe it is not a supported file format."); + return; + } + + // set default material properties + + if (Octree) + Model = Device->getSceneManager()->addOctreeSceneNode(m->getMesh(0)); + else + { + scene::IAnimatedMeshSceneNode* animModel = Device->getSceneManager()->addAnimatedMeshSceneNode(m); + animModel->setAnimationSpeed(30); + Model = animModel; + } + Model->setMaterialFlag(video::EMF_LIGHTING, UseLight); + Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight); +// Model->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); + Model->setDebugDataVisible(scene::EDS_OFF); + + // we need to uncheck the menu entries. would be cool to fake a menu event, but + // that's not so simple. so we do it brute force + gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_TOGGLE_DEBUG_INFO, true); + if (menu) + for(int item = 1; item < 6; ++item) + menu->setItemChecked(item, false); + updateScaleInfo(Model); +} + + +/* +Function createToolBox() creates a toolbox window. In this simple mesh +viewer, this toolbox only contains a tab control with three edit boxes for +changing the scale of the displayed model. +*/ +void createToolBox() +{ + // remove tool box if already there + IGUIEnvironment* env = Device->getGUIEnvironment(); + IGUIElement* root = env->getRootGUIElement(); + IGUIElement* e = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true); + if (e) + e->remove(); + + // create the toolbox window + IGUIWindow* wnd = env->addWindow(core::rect(600,45,800,480), + false, L"Toolset", 0, GUI_ID_DIALOG_ROOT_WINDOW); + + // create tab control and tabs + IGUITabControl* tab = env->addTabControl( + core::rect(2,20,800-602,480-7), wnd, true, true); + + IGUITab* t1 = tab->addTab(L"Config"); + + // add some edit boxes and a button to tab one + env->addStaticText(L"Scale:", + core::rect(10,20,60,45), false, false, t1); + env->addStaticText(L"X:", core::rect(22,48,40,66), false, false, t1); + env->addEditBox(L"1.0", core::rect(40,46,130,66), true, t1, GUI_ID_X_SCALE); + env->addStaticText(L"Y:", core::rect(22,82,40,96), false, false, t1); + env->addEditBox(L"1.0", core::rect(40,76,130,96), true, t1, GUI_ID_Y_SCALE); + env->addStaticText(L"Z:", core::rect(22,108,40,126), false, false, t1); + env->addEditBox(L"1.0", core::rect(40,106,130,126), true, t1, GUI_ID_Z_SCALE); + + env->addButton(core::rect(10,134,85,165), t1, GUI_ID_BUTTON_SET_SCALE, L"Set"); + + // quick scale buttons + env->addButton(core::rect(65,20,95,40), t1, GUI_ID_BUTTON_SCALE_MUL10, L"* 10"); + env->addButton(core::rect(100,20,130,40), t1, GUI_ID_BUTTON_SCALE_DIV10, L"* 0.1"); + + updateScaleInfo(Model); + + // add transparency control + env->addStaticText(L"GUI Transparency Control:", + core::rect(10,200,150,225), true, false, t1); + IGUIScrollBar* scrollbar = env->addScrollBar(true, + core::rect(10,225,150,240), t1, GUI_ID_SKIN_TRANSPARENCY); + scrollbar->setMax(255); + scrollbar->setPos(255); + + // add framerate control + env->addStaticText(L":", core::rect(10,240,150,265), true, false, t1); + env->addStaticText(L"Framerate:", + core::rect(12,240,75,265), false, false, t1); + // current frame info + env->addStaticText(L"", core::rect(75,240,200,265), false, false, t1, + GUI_ID_ANIMATION_INFO); + scrollbar = env->addScrollBar(true, + core::rect(10,265,150,280), t1, GUI_ID_SKIN_ANIMATION_FPS); + scrollbar->setMax(MAX_FRAMERATE); + scrollbar->setMin(-MAX_FRAMERATE); + scrollbar->setPos(DEFAULT_FRAMERATE); + scrollbar->setSmallStep(1); +} + +/* +Function updateToolBox() is called each frame to update dynamic information in +the toolbox. +*/ +void updateToolBox() +{ + IGUIEnvironment* env = Device->getGUIEnvironment(); + IGUIElement* root = env->getRootGUIElement(); + IGUIElement* dlg = root->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true); + if (!dlg ) + return; + + // update the info we have about the animation of the model + IGUIStaticText * aniInfo = (IGUIStaticText *)(dlg->getElementFromId(GUI_ID_ANIMATION_INFO, true)); + if (aniInfo) + { + if ( Model && scene::ESNT_ANIMATED_MESH == Model->getType() ) + { + scene::IAnimatedMeshSceneNode* animatedModel = (scene::IAnimatedMeshSceneNode*)Model; + + core::stringw str( (s32)core::round_(animatedModel->getAnimationSpeed()) ); + str += L" Frame: "; + str += core::stringw((s32)animatedModel->getFrameNr()); + aniInfo->setText(str.c_str()); + } + else + aniInfo->setText(L""); + } +} + +void onKillFocus() +{ + // Avoid that the FPS-camera continues moving when the user presses alt-tab while + // moving the camera. + const core::list& animators = Camera[1]->getAnimators(); + core::list::ConstIterator iter = animators.begin(); + while ( iter != animators.end() ) + { + if ( (*iter)->getType() == scene::ESNAT_CAMERA_FPS ) + { + // we send a key-down event for all keys used by this animator + scene::ISceneNodeAnimatorCameraFPS * fpsAnimator = static_cast(*iter); + const core::array& keyMap = fpsAnimator->getKeyMap(); + for ( irr::u32 i=0; i< keyMap.size(); ++i ) + { + irr::SEvent event; + event.EventType = EET_KEY_INPUT_EVENT; + event.KeyInput.Key = keyMap[i].KeyCode; + event.KeyInput.PressedDown = false; + fpsAnimator->OnEvent(event); + } + } + ++iter; + } +} + +/* +Function hasModalDialog() checks if we currently have a modal dialog open. +*/ +bool hasModalDialog() +{ + if ( !Device ) + return false; + IGUIEnvironment* env = Device->getGUIEnvironment(); + IGUIElement * focused = env->getFocus(); + while ( focused ) + { + if ( focused->isVisible() && focused->hasType(EGUIET_MODAL_SCREEN) ) + return true; + focused = focused->getParent(); + } + return false; +} + +/* +To get all the events sent by the GUI Elements, we need to create an event +receiver. This one is really simple. If an event occurs, it checks the id of +the caller and the event type, and starts an action based on these values. For +example, if a menu item with id GUI_ID_OPEN_MODEL was selected, it opens a file-open-dialog. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + virtual bool OnEvent(const SEvent& event) + { + // Escape swaps Camera Input + if (event.EventType == EET_KEY_INPUT_EVENT && + event.KeyInput.PressedDown == false) + { + if ( OnKeyUp(event.KeyInput.Key) ) + return true; + } + + if (event.EventType == EET_GUI_EVENT) + { + s32 id = event.GUIEvent.Caller->getID(); + IGUIEnvironment* env = Device->getGUIEnvironment(); + + switch(event.GUIEvent.EventType) + { + case EGET_MENU_ITEM_SELECTED: + // a menu item was clicked + OnMenuItemSelected( (IGUIContextMenu*)event.GUIEvent.Caller ); + break; + + case EGET_FILE_SELECTED: + { + // load the model file, selected in the file open dialog + IGUIFileOpenDialog* dialog = + (IGUIFileOpenDialog*)event.GUIEvent.Caller; + loadModel(core::stringc(dialog->getFileName()).c_str()); + } + break; + + case EGET_SCROLL_BAR_CHANGED: + + // control skin transparency + if (id == GUI_ID_SKIN_TRANSPARENCY) + { + const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); + setSkinTransparency(pos, env->getSkin()); + } + // control animation speed + else if (id == GUI_ID_SKIN_ANIMATION_FPS) + { + const s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); + if (scene::ESNT_ANIMATED_MESH == Model->getType()) + ((scene::IAnimatedMeshSceneNode*)Model)->setAnimationSpeed((f32)pos); + } + break; + + case EGET_COMBO_BOX_CHANGED: + + // control anti-aliasing/filtering + if (id == GUI_ID_TEXTUREFILTER) + { + OnTextureFilterSelected( (IGUIComboBox*)event.GUIEvent.Caller ); + } + break; + + case EGET_BUTTON_CLICKED: + + switch(id) + { + case GUI_ID_BUTTON_SET_SCALE: + { + // set scale + gui::IGUIElement* root = env->getRootGUIElement(); + core::vector3df scale; + core::stringc s; + + s = root->getElementFromId(GUI_ID_X_SCALE, true)->getText(); + scale.X = (f32)atof(s.c_str()); + s = root->getElementFromId(GUI_ID_Y_SCALE, true)->getText(); + scale.Y = (f32)atof(s.c_str()); + s = root->getElementFromId(GUI_ID_Z_SCALE, true)->getText(); + scale.Z = (f32)atof(s.c_str()); + + if (Model) + Model->setScale(scale); + updateScaleInfo(Model); + } + break; + case GUI_ID_BUTTON_SCALE_MUL10: + if (Model) + Model->setScale(Model->getScale()*10.f); + updateScaleInfo(Model); + break; + case GUI_ID_BUTTON_SCALE_DIV10: + if (Model) + Model->setScale(Model->getScale()*0.1f); + updateScaleInfo(Model); + break; + case GUI_ID_BUTTON_OPEN_MODEL: + env->addFileOpenDialog(L"Please select a model file to open"); + break; + case GUI_ID_BUTTON_SHOW_ABOUT: + showAboutText(); + break; + case GUI_ID_BUTTON_SHOW_TOOLBOX: + createToolBox(); + break; + case GUI_ID_BUTTON_SELECT_ARCHIVE: + env->addFileOpenDialog(L"Please select your game archive/directory"); + break; + } + + break; + default: + break; + } + } + + return false; + } + + + /* + Handle key-up events + */ + bool OnKeyUp(irr::EKEY_CODE keyCode) + { + // Don't handle keys if we have a modal dialog open as it would lead + // to unexpected application behaviour for the user. + if ( hasModalDialog() ) + return false; + + if (keyCode == irr::KEY_ESCAPE) + { + if (Device) + { + scene::ICameraSceneNode * camera = + Device->getSceneManager()->getActiveCamera(); + if (camera) + { + camera->setInputReceiverEnabled( !camera->isInputReceiverEnabled() ); + } + return true; + } + } + else if (keyCode == irr::KEY_F1) + { + if (Device) + { + IGUIElement* elem = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_POSITION_TEXT); + if (elem) + elem->setVisible(!elem->isVisible()); + } + } + else if (keyCode == irr::KEY_KEY_M) + { + if (Device) + Device->minimizeWindow(); + } + else if (keyCode == irr::KEY_KEY_L) + { + UseLight=!UseLight; + if (Model) + { + Model->setMaterialFlag(video::EMF_LIGHTING, UseLight); + Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, UseLight); + } + } + return false; + } + + + /* + Handle "menu item clicked" events. + */ + void OnMenuItemSelected( IGUIContextMenu* menu ) + { + s32 id = menu->getItemCommandId(menu->getSelectedItem()); + IGUIEnvironment* env = Device->getGUIEnvironment(); + + switch(id) + { + case GUI_ID_OPEN_MODEL: // FilOnButtonSetScalinge -> Open Model + env->addFileOpenDialog(L"Please select a model file to open"); + break; + case GUI_ID_SET_MODEL_ARCHIVE: // File -> Set Model Archive + env->addFileOpenDialog(L"Please select your game archive/directory"); + break; + case GUI_ID_LOAD_AS_OCTREE: // File -> LoadAsOctree + Octree = !Octree; + menu->setItemChecked(menu->getSelectedItem(), Octree); + break; + case GUI_ID_QUIT: // File -> Quit + Device->closeDevice(); + break; + case GUI_ID_SKY_BOX_VISIBLE: // View -> Skybox + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + SkyBox->setVisible(!SkyBox->isVisible()); + break; + case GUI_ID_DEBUG_OFF: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem()+1, false); + menu->setItemChecked(menu->getSelectedItem()+2, false); + menu->setItemChecked(menu->getSelectedItem()+3, false); + menu->setItemChecked(menu->getSelectedItem()+4, false); + menu->setItemChecked(menu->getSelectedItem()+5, false); + menu->setItemChecked(menu->getSelectedItem()+6, false); + if (Model) + Model->setDebugDataVisible(scene::EDS_OFF); + break; + case GUI_ID_DEBUG_BOUNDING_BOX: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + if (Model) + Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX)); + break; + case GUI_ID_DEBUG_NORMALS: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + if (Model) + Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_NORMALS)); + break; + case GUI_ID_DEBUG_SKELETON: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + if (Model) + Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_SKELETON)); + break; + case GUI_ID_DEBUG_WIRE_OVERLAY: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + if (Model) + Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_MESH_WIRE_OVERLAY)); + break; + case GUI_ID_DEBUG_HALF_TRANSPARENT: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + if (Model) + Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_HALF_TRANSPARENCY)); + break; + case GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem(), !menu->isItemChecked(menu->getSelectedItem())); + if (Model) + Model->setDebugDataVisible((scene::E_DEBUG_SCENE_TYPE)(Model->isDebugDataVisible()^scene::EDS_BBOX_BUFFERS)); + break; + case GUI_ID_DEBUG_ALL: // View -> Debug Information + menu->setItemChecked(menu->getSelectedItem()-1, true); + menu->setItemChecked(menu->getSelectedItem()-2, true); + menu->setItemChecked(menu->getSelectedItem()-3, true); + menu->setItemChecked(menu->getSelectedItem()-4, true); + menu->setItemChecked(menu->getSelectedItem()-5, true); + menu->setItemChecked(menu->getSelectedItem()-6, true); + if (Model) + Model->setDebugDataVisible(scene::EDS_FULL); + break; + case GUI_ID_ABOUT: // Help->About + showAboutText(); + break; + case GUI_ID_MODEL_MATERIAL_SOLID: // View -> Material -> Solid + if (Model) + Model->setMaterialType(video::EMT_SOLID); + break; + case GUI_ID_MODEL_MATERIAL_TRANSPARENT: // View -> Material -> Transparent + if (Model) + Model->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + break; + case GUI_ID_MODEL_MATERIAL_REFLECTION: // View -> Material -> Reflection + if (Model) + Model->setMaterialType(video::EMT_SPHERE_MAP); + break; + + case GUI_ID_CAMERA_MAYA: + setActiveCamera(Camera[0]); + break; + case GUI_ID_CAMERA_FIRST_PERSON: + setActiveCamera(Camera[1]); + break; + } + } + + /* + Handle the event that one of the texture-filters was selected in the corresponding combobox. + */ + void OnTextureFilterSelected( IGUIComboBox* combo ) + { + s32 pos = combo->getSelected(); + switch (pos) + { + case 0: + if (Model) + { + Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false); + Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false); + Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false); + } + break; + case 1: + if (Model) + { + Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, true); + Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false); + } + break; + case 2: + if (Model) + { + Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false); + Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, true); + } + break; + case 3: + if (Model) + { + Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, true); + } + break; + case 4: + if (Model) + { + Model->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false); + } + break; + } + } +}; + + +/* +Most of the hard work is done. We only need to create the Irrlicht Engine +device and all the buttons, menus and toolbars. We start up the engine as +usual, using createDevice(). To make our application catch events, we set our +eventreceiver as parameter. As you can see, there is also a call to +IrrlichtDevice::setResizeable(). This makes the render window resizeable, which +is quite useful for a mesh viewer. +*/ +int main(int argc, char* argv[]) +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device and exit if creation failed + MyEventReceiver receiver; + Device = createDevice(driverType, core::dimension2d(800, 600), + 16, false, false, false, &receiver); + + if (Device == 0) + return 1; // could not create selected driver. + + Device->setResizable(true); + + Device->setWindowCaption(L"Irrlicht Engine - Loading..."); + + video::IVideoDriver* driver = Device->getVideoDriver(); + IGUIEnvironment* env = Device->getGUIEnvironment(); + scene::ISceneManager* smgr = Device->getSceneManager(); + smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true); + + driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); + + smgr->addLightSceneNode(0, core::vector3df(200,200,200), + video::SColorf(1.0f,1.0f,1.0f),2000); + smgr->setAmbientLight(video::SColorf(0.3f,0.3f,0.3f)); + // add our media directory as "search path" + Device->getFileSystem()->addFileArchive("../../media/"); + + /* + The next step is to read the configuration file. It is stored in the xml + format and looks a little bit like this: + + @verbatim + + + + + Hello! + + + @endverbatim + + We need the data stored in there to be written into the global variables + StartUpModelFile, MessageText and Caption. This is now done using the + Irrlicht Engine integrated XML parser: + */ + + // read configuration from xml file + + io::IXMLReader* xml = Device->getFileSystem()->createXMLReader( L"config.xml"); + + while(xml && xml->read()) + { + switch(xml->getNodeType()) + { + case io::EXN_TEXT: + // in this xml file, the only text which occurs is the + // messageText + MessageText = xml->getNodeData(); + break; + case io::EXN_ELEMENT: + { + if (core::stringw("startUpModel") == xml->getNodeName()) + StartUpModelFile = xml->getAttributeValue(L"file"); + else + if (core::stringw("messageText") == xml->getNodeName()) + Caption = xml->getAttributeValue(L"caption"); + } + break; + default: + break; + } + } + + if (xml) + xml->drop(); // don't forget to delete the xml reader + + if (argc > 1) + StartUpModelFile = argv[1]; + + /* + That wasn't difficult. Now we'll set a nicer font and create the Menu. + It is possible to create submenus for every menu item. The call + menu->addItem(L"File", -1, true, true); for example adds a new menu + Item with the name "File" and the id -1. The following parameter says + that the menu item should be enabled, and the last one says, that there + should be a submenu. The submenu can now be accessed with + menu->getSubMenu(0), because the "File" entry is the menu item with + index 0. + */ + + // set a nicer font + + IGUISkin* skin = env->getSkin(); + IGUIFont* font = env->getFont("fonthaettenschweiler.bmp"); + if (font) + skin->setFont(font); + + // create menu + gui::IGUIContextMenu* menu = env->addMenu(); + menu->addItem(L"File", -1, true, true); + menu->addItem(L"View", -1, true, true); + menu->addItem(L"Camera", -1, true, true); + menu->addItem(L"Help", -1, true, true); + + gui::IGUIContextMenu* submenu; + submenu = menu->getSubMenu(0); + submenu->addItem(L"Open Model File & Texture...", GUI_ID_OPEN_MODEL); + submenu->addItem(L"Set Model Archive...", GUI_ID_SET_MODEL_ARCHIVE); + submenu->addItem(L"Load as Octree", GUI_ID_LOAD_AS_OCTREE); + submenu->addSeparator(); + submenu->addItem(L"Quit", GUI_ID_QUIT); + + submenu = menu->getSubMenu(1); + submenu->addItem(L"sky box visible", GUI_ID_SKY_BOX_VISIBLE, true, false, true); + submenu->addItem(L"toggle model debug information", GUI_ID_TOGGLE_DEBUG_INFO, true, true); + submenu->addItem(L"model material", -1, true, true ); + + submenu = submenu->getSubMenu(1); + submenu->addItem(L"Off", GUI_ID_DEBUG_OFF); + submenu->addItem(L"Bounding Box", GUI_ID_DEBUG_BOUNDING_BOX); + submenu->addItem(L"Normals", GUI_ID_DEBUG_NORMALS); + submenu->addItem(L"Skeleton", GUI_ID_DEBUG_SKELETON); + submenu->addItem(L"Wire overlay", GUI_ID_DEBUG_WIRE_OVERLAY); + submenu->addItem(L"Half-Transparent", GUI_ID_DEBUG_HALF_TRANSPARENT); + submenu->addItem(L"Buffers bounding boxes", GUI_ID_DEBUG_BUFFERS_BOUNDING_BOXES); + submenu->addItem(L"All", GUI_ID_DEBUG_ALL); + + submenu = menu->getSubMenu(1)->getSubMenu(2); + submenu->addItem(L"Solid", GUI_ID_MODEL_MATERIAL_SOLID); + submenu->addItem(L"Transparent", GUI_ID_MODEL_MATERIAL_TRANSPARENT); + submenu->addItem(L"Reflection", GUI_ID_MODEL_MATERIAL_REFLECTION); + + submenu = menu->getSubMenu(2); + submenu->addItem(L"Maya Style", GUI_ID_CAMERA_MAYA); + submenu->addItem(L"First Person", GUI_ID_CAMERA_FIRST_PERSON); + + submenu = menu->getSubMenu(3); + submenu->addItem(L"About", GUI_ID_ABOUT); + + /* + Below the menu we want a toolbar, onto which we can place colored + buttons and important looking stuff like a senseless combobox. + */ + + // create toolbar + + gui::IGUIToolBar* bar = env->addToolBar(); + + video::ITexture* image = driver->getTexture("open.png"); + bar->addButton(GUI_ID_BUTTON_OPEN_MODEL, 0, L"Open a model",image, 0, false, true); + + image = driver->getTexture("tools.png"); + bar->addButton(GUI_ID_BUTTON_SHOW_TOOLBOX, 0, L"Open Toolset",image, 0, false, true); + + image = driver->getTexture("zip.png"); + bar->addButton(GUI_ID_BUTTON_SELECT_ARCHIVE, 0, L"Set Model Archive",image, 0, false, true); + + image = driver->getTexture("help.png"); + bar->addButton(GUI_ID_BUTTON_SHOW_ABOUT, 0, L"Open Help", image, 0, false, true); + + // create a combobox for texture filters + + gui::IGUIComboBox* box = env->addComboBox(core::rect(250,4,350,23), bar, GUI_ID_TEXTUREFILTER); + box->addItem(L"No filtering"); + box->addItem(L"Bilinear"); + box->addItem(L"Trilinear"); + box->addItem(L"Anisotropic"); + box->addItem(L"Isotropic"); + + /* + To make the editor look a little bit better, we disable transparent gui + elements, and add an Irrlicht Engine logo. In addition, a text showing + the current frames per second value is created and the window caption is + changed. + */ + + // disable alpha + + for (s32 i=0; igetSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); + col.setAlpha(255); + env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); + } + + // add a tabcontrol + + createToolBox(); + + // create fps text + + IGUIStaticText* fpstext = env->addStaticText(L"", + core::rect(400,4,570,23), true, false, bar); + + IGUIStaticText* postext = env->addStaticText(L"", + core::rect(10,50,470,80),false, false, 0, GUI_ID_POSITION_TEXT); + postext->setVisible(false); + + // set window caption + + Caption += " - ["; + Caption += driver->getName(); + Caption += "]"; + Device->setWindowCaption(Caption.c_str()); + + /* + That's nearly the whole application. We simply show the about message + box at start up, and load the first model. To make everything look + better, a skybox is created and a user controlled camera, to make the + application a little bit more interactive. Finally, everything is drawn + in a standard drawing loop. + */ + + // show about message box and load default model + if (argc==1) + showAboutText(); + loadModel(StartUpModelFile.c_str()); + + // add skybox + + SkyBox = smgr->addSkyBoxSceneNode( + driver->getTexture("irrlicht2_up.jpg"), + driver->getTexture("irrlicht2_dn.jpg"), + driver->getTexture("irrlicht2_lf.jpg"), + driver->getTexture("irrlicht2_rt.jpg"), + driver->getTexture("irrlicht2_ft.jpg"), + driver->getTexture("irrlicht2_bk.jpg")); + + // add a camera scene node + Camera[0] = smgr->addCameraSceneNodeMaya(); + Camera[0]->setFarValue(20000.f); + // Maya cameras reposition themselves relative to their target, so target the location + // where the mesh scene node is placed. + Camera[0]->setTarget(core::vector3df(0,30,0)); + + Camera[1] = smgr->addCameraSceneNodeFPS(); + Camera[1]->setFarValue(20000.f); + Camera[1]->setPosition(core::vector3df(0,0,-70)); + Camera[1]->setTarget(core::vector3df(0,30,0)); + + setActiveCamera(Camera[0]); + + // load the irrlicht engine logo + IGUIImage *img = + env->addImage(driver->getTexture("irrlichtlogo2.png"), + core::position2d(10, driver->getScreenSize().Height - 128)); + + // lock the logo's edges to the bottom left corner of the screen + img->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, + EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); + + // remember state so we notice when the window does lose the focus + bool hasFocus = Device->isWindowFocused(); + + // draw everything + + while(Device->run() && driver) + { + // Catch focus changes (workaround until Irrlicht has events for this) + bool focused = Device->isWindowFocused(); + if ( hasFocus && !focused ) + onKillFocus(); + hasFocus = focused; + + if (Device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(150,50,50,50)); + + smgr->drawAll(); + env->drawAll(); + + driver->endScene(); + + // update information about current frame-rate + core::stringw str(L"FPS: "); + str.append(core::stringw(driver->getFPS())); + str += L" Tris: "; + str.append(core::stringw(driver->getPrimitiveCountDrawn())); + fpstext->setText(str.c_str()); + + // update information about the active camera + scene::ICameraSceneNode* cam = Device->getSceneManager()->getActiveCamera(); + str = L"Pos: "; + str.append(core::stringw(cam->getPosition().X)); + str += L" "; + str.append(core::stringw(cam->getPosition().Y)); + str += L" "; + str.append(core::stringw(cam->getPosition().Z)); + str += L" Tgt: "; + str.append(core::stringw(cam->getTarget().X)); + str += L" "; + str.append(core::stringw(cam->getTarget().Y)); + str += L" "; + str.append(core::stringw(cam->getTarget().Z)); + postext->setText(str.c_str()); + + // update the tool dialog + updateToolBox(); + } + else + Device->yield(); + } + + Device->drop(); + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/resource.h b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/resource.h new file mode 100644 index 0000000..a8e8616 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by 9.Meshviewer.rc +// +#define IDI_ICON1 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/src/others/irrlicht-1.8.1/examples/09.Meshviewer/tutorial.html b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/tutorial.html new file mode 100644 index 0000000..d296b6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/09.Meshviewer/tutorial.html @@ -0,0 +1,182 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 9. Mesh Viewer
+
+
+
+

This tutorial shows how to create a more complex application with + the engine. We construct a simple mesh viewer using the user interface + API and the scenemanagement of Irrlicht.
+ The tutorial shows how to create and use Buttons, Windows, Toolbars, + Menus, ComboBoxes, Tabcontrols, Editboxes, Images, MessageBoxes, SkyBoxes, + and how to parse XML files with the integrated XML reader of the engine.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
Lets start!
+
+

We start like in most other tutorials: Include all nesessary header + files, add a comment to let the engine be linked with the right .lib + file in Visual Studio, and deklare some global variables. We also + add two 'using namespece' statements, so we do not need to write the + whole names of all classes. In this tutorial, we use a lot stuff from + the gui namespace.

+ + + + +
#include <irrlicht.h>
#include <iostream>

using namespace irr;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

IrrlichtDevice *Device = 0;
core::stringc StartUpModelFile;
core::stringw MessageText;
core::stringw Caption;
scene::IAnimatedMeshSceneNode* Model = 0;
scene::ISceneNode* SkyBox = 0;
+

The three following functions do several stuff used by the mesh + viewer. The first function showAboutText() simply displays a messagebox + with a caption and a message text. The texts will be stored in the + MessageText and Caption variables at startup.

+ + + + +
void showAboutText()
{
// create modal message box with the text
// loaded from the xml file
.
Device->getGUIEnvironment()->addMessageBox(
Caption.c_str(), MessageText.c_str());
}
+

The second function loadModel() loads a model and displays it using + an addAnimatedMeshSceneNode and the scene manager. Nothing difficult. + It also displays a short message box, if the model could not be loaded. +

+ + + + +
void loadModel(const c8* filename)
{
// load a model into the engine
if (Model)
Model->remove();
Model = 0;

scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh(filename);
if (!m)
{
// model could not be loaded
if (StartUpModelFile != filename)
Device->getGUIEnvironment()->addMessageBox(
Caption.c_str(), L"The model could not be loaded. " \
L"Maybe it is not a supported file format.");
return;
}

// set default material properties
Model = Device->getSceneManager()->addAnimatedMeshSceneNode(m);
Model->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
Model->setMaterialFlag(video::EMF_LIGHTING, false);
Model->setDebugDataVisible(true);
}
+

Finally, the third function creates a toolbox window. In this simple + mesh viewer, this toolbox only contains a tab control with three edit + boxes for changing the scale of the displayed model.

+ + + + +
void createToolBox()
{
// remove tool box if already there
IGUIEnvironment* env = Device->getGUIEnvironment();
IGUIElement* root = env->getRootGUIElement();
IGUIElement* e = root->getElementFromId(5000, true);
if (e) e->remove();

// create the toolbox window
IGUIWindow* wnd = env->addWindow(core::rect<s32>(450,25,640,480),
false, L"Toolset", 0, 5000);

// create tab control and tabs
IGUITabControl* tab = env->addTabControl(
core::rect<s32>(2,20,640-452,480-7), wnd, true, true);
IGUITab* t1 = tab->addTab(L"Scale");
IGUITab* t2 = tab->addTab(L"Empty Tab");

// add some edit boxes and a button to tab one
env->addEditBox(L"1.0", core::rect<s32>(40,50,130,70), true, t1, 901);
env->addEditBox(L"1.0", core::rect<s32>(40,80,130,100), true, t1, 902);
env->addEditBox(L"1.0", core::rect<s32>(40,110,130,130), true, t1, 903);
env->addButton(core::rect<s32>(10,150,100,190), t1, 1101, L"set");

// bring irrlicht engine logo to front, because it
// now may be below the newly created toolbox
root->bringToFront(root->getElementFromId(666, true));
}
+

To get all the events sent by the GUI Elements, we need to create + an event receiver. This one is really simple. If an event occurs, + it checks the id of the caller and the event type, and starts an action + based on these values. For example, if a menu item with id 100 was + selected, if opens a file-open-dialog.

+
+ + + + +
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(const SEvent& event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = Device->getGUIEnvironment();
switch(event.GUIEvent.EventType)
{
case EGET_MENU_ITEM_SELECTED:
{
// a menu item was clicked
IGUIContextMenu* menu = (IGUIContextMenu*)event.GUIEvent.Caller;
s32 id = menu->getItemCommandId(menu->getSelectedItem());

switch(id)
{
case 100: // File -> Open Model
env->addFileOpenDialog(L"Please select a model file to open");
break;
case 200: // File -> Quit
Device->closeDevice();
break;
case 300: // View -> Skybox
SkyBox->setVisible(!SkyBox->isVisible());
break;
case 400: // View -> Debug Information
if (Model)
Model->setDebugDataVisible(!Model->isDebugDataVisible());
break;
case 500: // Help->About
showAboutText();
break;
case 610: // View -> Material -> Solid
if (Model)
Model->setMaterialType(video::EMT_SOLID);
break;
case 620: // View -> Material -> Transparent
if (Model)
Model->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
break;
case 630: // View -> Material -> Reflection
if (Model)
Model->setMaterialType(video::EMT_SPHERE_MAP);
break;
}
break;
}
case EGET_FILE_SELECTED:
{
// load the model file, selected in the file open dialog
IGUIFileOpenDialog* dialog =
(IGUIFileOpenDialog*)event.GUIEvent.Caller;
loadModel(core::stringc(dialog->getFilename()).c_str());
}
case EGET_BUTTON_CLICKED:
switch(id)
{
case 1101:
{
// set scale
gui::IGUIElement* root = env->getRootGUIElement();
core::vector3df scale;
core::stringc s;
s = root->getElementFromId(901, true)->getText();
scale.X = (f32)atof(s.c_str());
s = root->getElementFromId(902, true)->getText();
scale.Y = (f32)atof(s.c_str());
s = root->getElementFromId(903, true)->getText();
scale.Z = (f32)atof(s.c_str());
if (Model)
Model->setScale(scale);
}
break;
case 1102:
env->addFileOpenDialog(L"Please select a model file to open");
break;
case 1103:
showAboutText();
break;
case 1104:
createToolBox();
break;
}
break;
}
}
return false;
}
};
+

Most of the hard work is done. We only need to create the Irrlicht + Engine device and all the buttons, menus and toolbars. We start up the + engine as usual, using createDevice(). To make our application catch + events, we set our eventreceiver as parameter. The #ifdef WIN32 preprocessor + commands are not necesarry, but I included them to make the tutorial + use DirectX on Windows and OpenGL on all other platforms like Linux. + As you can see, there is also a unusual call to IrrlichtDevice::setResizeAble(). + This makes the render window resizeable, which is quite useful for a + mesh viewer.

+ + + + +
int main()
{
// ask user for driver +
video::E_DRIVER_TYPE driverType; +
printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char key;
std::cin >> key;

switch(key)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
} +
// create device and exit if creation failed +
MyEventReceiver receiver;
Device = createDevice(driverType, core::dimension2d<s32>(640, 480),
16, false, false, false, &receiver); +
if (Device == 0)
return 1; // could not create selected driver.

Device->setResizable(true);
Device->setWindowCaption(L"Irrlicht Engine - Loading...");

video::IVideoDriver* driver = Device->getVideoDriver();
IGUIEnvironment* env = Device->getGUIEnvironment();
scene::ISceneManager* smgr = Device->getSceneManager();
+

The next step is to read the configuration file. It is stored in the + xml format and looks a little bit like this:
+
+ <?xml version="1.0"?>
+ <config>
+ <startUpModel file="some filename" />
+ <messageText caption="Irrlicht Engine Mesh Viewer">
+ Hello!
+ </messageText>
+ </config>

+
+ We need the data stored in there to be written into the global variables + StartUpModelFile, MessageText and Caption. This is now done using the + Irrlicht Engine integrated XML parser:

+ + + + +
	// read configuration from xml file
io::IXMLReader* xml =
Device->getFileSystem()->createXMLReader("../../media/config.xml");
while(xml && xml->read())
{
switch(xml->getNodeType())
{
case io::EXN_TEXT:
// in this xml file, the only text which occurs is the messageText
MessageText = xml->getNodeData();
break;
case io::EXN_ELEMENT:
{
if (core::stringw("startUpModel") == xml->getNodeName())
StartUpModelFile = xml->getAttributeValue(L"file");
else
if (core::stringw("messageText") == xml->getNodeName())
Caption = xml->getAttributeValue(L"caption");
}
break;
}
}
if (xml)
xml->drop(); // don't forget to delete the xml reader
+
+

That wasn't difficult. Now we'll set a nicer font and create the Menu. + It is possible to create submenus for every menu item. The call menu->addItem(L"File", + -1, true, true); for example adds a new menu Item with the name "File" + and the id -1. The following parameter says that the menu item should + be enabled, and the last one says, that there should be a submenu. The + submenu can now be accessed with menu->getSubMenu(0), because the + "File" entry is the menu item with index 0.

+ + + + +
	// set a nicer font
IGUISkin* skin = env->getSkin();
IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);

// create menu
gui::IGUIContextMenu* menu = env->addMenu();
menu->addItem(L"File", -1, true, true);
menu->addItem(L"View", -1, true, true);
menu->addItem(L"Help", -1, true, true);

gui::IGUIContextMenu* submenu;
submenu = menu->getSubMenu(0);
submenu->addItem(L"Open Model File...", 100);
submenu->addSeparator();
submenu->addItem(L"Quit", 200);

submenu = menu->getSubMenu(1);
submenu->addItem(L"toggle sky box visibility", 300);
submenu->addItem(L"toggle model debug information", 400);
submenu->addItem(L"model material", -1, true, true );

submenu = submenu->getSubMenu(2);
submenu->addItem(L"Solid", 610);
submenu->addItem(L"Transparent", 620);
submenu->addItem(L"Reflection", 630);

submenu = menu->getSubMenu(2);
submenu->addItem(L"About", 500); +
+
+ We want a toolbar, onto which we can place colored buttons and important + looking stuff like a senseless combobox.
+
+ + + + +
	// create toolbar
gui::IGUIToolBar* bar = env->addToolBar();
bar->addButton(1102, 0, driver->getTexture("../../media/open.bmp"));
bar->addButton(1103, 0, driver->getTexture("../../media/help.bmp"));
bar->addButton(1104, 0, driver->getTexture("../../media/tools.bmp"));

// create a combobox with some senseless texts
gui::IGUIComboBox* box = env->addComboBox(core::rect<s32>(100,5,200,25), bar);
box->addItem(L"Bilinear");
box->addItem(L"Trilinear");
box->addItem(L"Anisotropic");
box->addItem(L"Isotropic");
box->addItem(L"Psychedelic");
box->addItem(L"No filtering");
+
+ To make the editor look a little bit better, we disable transparent gui + elements, and add a Irrlicht Engine logo. In addition, a text, which will + show the current frame per second value is created, and the window caption + changed.
+
+ + + + +
	// disable alpha
for (s32 i=0; i<gui::EGDC_COUNT ; ++i)
{
video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
col.setAlpha(255);
env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col);
}

// add a tabcontrol
createToolBox();

// add the irrlicht engine logo
IGUIImage* img = env->addImage(core::rect<s32>(22,429,108,460), 0, 666);
img->setImage(driver->getTexture("../../media/irrlichtlogoaligned.jpg"));

// create fps text
IGUIStaticText* fpstext =
env->addStaticText(L"", core::rect<s32>(210,26,270,41), true);

// set window caption
Caption += " - [";
Caption += driver->getName();
Caption += "]";
Device->setWindowCaption(Caption.c_str());
+
+ That's nearly the whole application. We simply show the about message + box at start up, and load the first model. To make everything look better, + a skybox is created and a user controled camera, to make the application + a little bit more interactive. Finally, everything is drawed in a standard + drawing loop.
+
+ + + + +
	// show about message box and load default model
showAboutText();
loadModel(StartUpModelFile.c_str());

// add skybox

SkyBox = smgr->addSkyBoxSceneNode(
driver->getTexture("../../media/irrlicht2_up.bmp"),
driver->getTexture("../../media/irrlicht2_dn.bmp"),
driver->getTexture("../../media/irrlicht2_lf.bmp"),
driver->getTexture("../../media/irrlicht2_rt.bmp"),
driver->getTexture("../../media/irrlicht2_ft.bmp"),
driver->getTexture("../../media/irrlicht2_bk.bmp"));

// add a camera scene node
smgr->addCameraSceneNodeMaya();

// draw everything
while(Device->run() && driver)
if (Device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(150,50,50,50));
smgr->drawAll();
env->drawAll();

driver->endScene();

core::stringw str = L"FPS: ";
str += driver->getFPS();
fpstext->setText(str.c_str());
}
Device->drop();
return 0;
}
+
+ Compile and run this, and you have a fully functional 3d Mesh viewer.
+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Makefile b/src/others/irrlicht-1.8.1/examples/10.Shaders/Makefile new file mode 100644 index 0000000..ff2df2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 10.Shaders +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.cbp b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.cbp new file mode 100644 index 0000000..ec37b22 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.cbp @@ -0,0 +1,56 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.dev b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.dev new file mode 100644 index 0000000..bcaa4f8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 10 Shaders +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=10.Shaders.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.vcproj b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.vcproj new file mode 100644 index 0000000..e730a2f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc10.vcxproj new file mode 100644 index 0000000..c2a526e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 10.Shaders + {27158C82-CD15-4A9B-9848-35E7065B209F} + Shaders + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Shaders.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\10.Shaders.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Shaders.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\10.Shaders.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Shaders.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\10.Shaders.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Shaders.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\10.Shaders.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc11.vcxproj new file mode 100644 index 0000000..30ae642 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 10.Shaders + {27158C82-CD15-4A9B-9848-35E7065B209F} + Shaders + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Shaders.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\10.Shaders.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Shaders.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\10.Shaders.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Shaders.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\10.Shaders.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Shaders.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\10.Shaders.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc8.vcproj new file mode 100644 index 0000000..f107140 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc9.vcproj new file mode 100644 index 0000000..d870b03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/Shaders_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/main.cpp b/src/others/irrlicht-1.8.1/examples/10.Shaders/main.cpp new file mode 100644 index 0000000..269c47f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/main.cpp @@ -0,0 +1,443 @@ +/** Example 010 Shaders + +This tutorial shows how to use shaders for D3D8, D3D9, OpenGL, and Cg with the +engine and how to create new material types with them. It also shows how to +disable the generation of mipmaps at texture loading, and how to use text scene +nodes. + +This tutorial does not explain how shaders work. I would recommend to read the +D3D, OpenGL, or Cg documentation, to search a tutorial, or to read a book about +this. + +At first, we need to include all headers and do the stuff we always do, like in +nearly all other tutorials: +*/ +#include +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +/* +Because we want to use some interesting shaders in this tutorials, we need to +set some data for them to make them able to compute nice colors. In this +example, we'll use a simple vertex shader which will calculate the color of the +vertex based on the position of the camera. +For this, the shader needs the following data: The inverted world matrix for +transforming the normal, the clip matrix for transforming the position, the +camera position and the world position of the object for the calculation of the +angle of light, and the color of the light. To be able to tell the shader all +this data every frame, we have to derive a class from the +IShaderConstantSetCallBack interface and override its only method, namely +OnSetConstants(). This method will be called every time the material is set. +The method setVertexShaderConstant() of the IMaterialRendererServices interface +is used to set the data the shader needs. If the user chose to use a High Level +shader language like HLSL instead of Assembler in this example, you have to set +the variable name as parameter instead of the register index. +*/ + +IrrlichtDevice* device = 0; +bool UseHighLevelShaders = false; +bool UseCgShaders = false; + +class MyShaderCallBack : public video::IShaderConstantSetCallBack +{ +public: + + virtual void OnSetConstants(video::IMaterialRendererServices* services, + s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + // set inverted world matrix + // if we are using highlevel shaders (the user can select this when + // starting the program), we must set the constants by name. + + core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD); + invWorld.makeInverse(); + + if (UseHighLevelShaders) + services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16); + else + services->setVertexShaderConstant(invWorld.pointer(), 0, 4); + + // set clip matrix + + core::matrix4 worldViewProj; + worldViewProj = driver->getTransform(video::ETS_PROJECTION); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + + if (UseHighLevelShaders) + services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16); + else + services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4); + + // set camera position + + core::vector3df pos = device->getSceneManager()-> + getActiveCamera()->getAbsolutePosition(); + + if (UseHighLevelShaders) + services->setVertexShaderConstant("mLightPos", reinterpret_cast(&pos), 3); + else + services->setVertexShaderConstant(reinterpret_cast(&pos), 8, 1); + + // set light color + + video::SColorf col(0.0f,1.0f,1.0f,0.0f); + + if (UseHighLevelShaders) + services->setVertexShaderConstant("mLightColor", + reinterpret_cast(&col), 4); + else + services->setVertexShaderConstant(reinterpret_cast(&col), 9, 1); + + // set transposed world matrix + + core::matrix4 world = driver->getTransform(video::ETS_WORLD); + world = world.getTransposed(); + + if (UseHighLevelShaders) + { + services->setVertexShaderConstant("mTransWorld", world.pointer(), 16); + + // set texture, for textures you can use both an int and a float setPixelShaderConstant interfaces (You need it only for an OpenGL driver). + s32 TextureLayerID = 0; + if (UseHighLevelShaders) + services->setPixelShaderConstant("myTexture", &TextureLayerID, 1); + } + else + services->setVertexShaderConstant(world.pointer(), 10, 4); + } +}; + +/* +The next few lines start up the engine just like in most other tutorials +before. But in addition, we ask the user if he wants to use high level shaders +in this example, if he selected a driver which is capable of doing so. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // ask the user if we should use high level shaders for this example + if (driverType == video::EDT_DIRECT3D9 || + driverType == video::EDT_OPENGL) + { + char i; + printf("Please press 'y' if you want to use high level shaders.\n"); + std::cin >> i; + if (i == 'y') + { + UseHighLevelShaders = true; + printf("Please press 'y' if you want to use Cg shaders.\n"); + std::cin >> i; + if (i == 'y') + UseCgShaders = true; + } + } + + // create device + device = createDevice(driverType, core::dimension2d(640, 480)); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* gui = device->getGUIEnvironment(); + + // Make sure we don't try Cg without support for it + if (UseCgShaders && !driver->queryFeature(video::EVDF_CG)) + { + printf("Warning: No Cg support, disabling.\n"); + UseCgShaders=false; + } + + /* + Now for the more interesting parts. If we are using Direct3D, we want + to load vertex and pixel shader programs, if we have OpenGL, we want to + use ARB fragment and vertex programs. I wrote the corresponding + programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, d3d9.vs, + opengl.ps and opengl.vs. We only need the right filenames now. This is + done in the following switch. Note, that it is not necessary to write + the shaders into text files, like in this example. You can even write + the shaders directly as strings into the cpp source file, and use later + addShaderMaterial() instead of addShaderMaterialFromFiles(). + */ + + io::path vsFileName; // filename for the vertex shader + io::path psFileName; // filename for the pixel shader + + switch(driverType) + { + case video::EDT_DIRECT3D8: + psFileName = "../../media/d3d8.psh"; + vsFileName = "../../media/d3d8.vsh"; + break; + case video::EDT_DIRECT3D9: + if (UseHighLevelShaders) + { + // Cg can also handle this syntax + psFileName = "../../media/d3d9.hlsl"; + vsFileName = psFileName; // both shaders are in the same file + } + else + { + psFileName = "../../media/d3d9.psh"; + vsFileName = "../../media/d3d9.vsh"; + } + break; + + case video::EDT_OPENGL: + if (UseHighLevelShaders) + { + if (!UseCgShaders) + { + psFileName = "../../media/opengl.frag"; + vsFileName = "../../media/opengl.vert"; + } + else + { + // Use HLSL syntax for Cg + psFileName = "../../media/d3d9.hlsl"; + vsFileName = psFileName; // both shaders are in the same file + } + } + else + { + psFileName = "../../media/opengl.psh"; + vsFileName = "../../media/opengl.vsh"; + } + break; + } + + /* + In addition, we check if the hardware and the selected renderer is + capable of executing the shaders we want. If not, we simply set the + filename string to 0. This is not necessary, but useful in this + example: For example, if the hardware is able to execute vertex shaders + but not pixel shaders, we create a new material which only uses the + vertex shader, and no pixel shader. Otherwise, if we would tell the + engine to create this material and the engine sees that the hardware + wouldn't be able to fulfill the request completely, it would not + create any new material at all. So in this example you would see at + least the vertex shader in action, without the pixel shader. + */ + + if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) && + !driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1)) + { + device->getLogger()->log("WARNING: Pixel shaders disabled "\ + "because of missing driver/hardware support."); + psFileName = ""; + } + + if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) && + !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) + { + device->getLogger()->log("WARNING: Vertex shaders disabled "\ + "because of missing driver/hardware support."); + vsFileName = ""; + } + + /* + Now lets create the new materials. As you maybe know from previous + examples, a material type in the Irrlicht engine is set by simply + changing the MaterialType value in the SMaterial struct. And this value + is just a simple 32 bit value, like video::EMT_SOLID. So we only need + the engine to create a new value for us which we can set there. To do + this, we get a pointer to the IGPUProgrammingServices and call + addShaderMaterialFromFiles(), which returns such a new 32 bit value. + That's all. + + The parameters to this method are the following: First, the names of + the files containing the code of the vertex and the pixel shader. If + you would use addShaderMaterial() instead, you would not need file + names, then you could write the code of the shader directly as string. + The following parameter is a pointer to the IShaderConstantSetCallBack + class we wrote at the beginning of this tutorial. If you don't want to + set constants, set this to 0. The last parameter tells the engine which + material it should use as base material. + + To demonstrate this, we create two materials with a different base + material, one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR. + */ + + // create materials + + video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices(); + s32 newMaterialType1 = 0; + s32 newMaterialType2 = 0; + + if (gpu) + { + MyShaderCallBack* mc = new MyShaderCallBack(); + + // create the shaders depending on if the user wanted high level + // or low level shaders: + + if (UseHighLevelShaders) + { + // Choose the desired shader type. Default is the native + // shader type for the driver, for Cg pass the special + // enum value EGSL_CG + const video::E_GPU_SHADING_LANGUAGE shadingLanguage = + UseCgShaders ? video::EGSL_CG:video::EGSL_DEFAULT; + + // create material from high level shaders (hlsl, glsl or cg) + + newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles( + vsFileName, "vertexMain", video::EVST_VS_1_1, + psFileName, "pixelMain", video::EPST_PS_1_1, + mc, video::EMT_SOLID, 0, shadingLanguage); + + newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles( + vsFileName, "vertexMain", video::EVST_VS_1_1, + psFileName, "pixelMain", video::EPST_PS_1_1, + mc, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage); + } + else + { + // create material from low level shaders (asm or arb_asm) + + newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName, + psFileName, mc, video::EMT_SOLID); + + newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName, + psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR); + } + + mc->drop(); + } + + /* + Now it's time for testing the materials. We create a test cube and set + the material we created. In addition, we add a text scene node to the + cube and a rotation animator to make it look more interesting and + important. + */ + + // create test scene node 1, with the new created material type 1 + + scene::ISceneNode* node = smgr->addCubeSceneNode(50); + node->setPosition(core::vector3df(0,0,0)); + node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); + node->setMaterialFlag(video::EMF_LIGHTING, false); + node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1); + + smgr->addTextSceneNode(gui->getBuiltInFont(), + L"PS & VS & EMT_SOLID", + video::SColor(255,255,255,255), node); + + scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator( + core::vector3df(0,0.3f,0)); + node->addAnimator(anim); + anim->drop(); + + /* + Same for the second cube, but with the second material we created. + */ + + // create test scene node 2, with the new created material type 2 + + node = smgr->addCubeSceneNode(50); + node->setPosition(core::vector3df(0,-10,50)); + node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); + node->setMaterialFlag(video::EMF_LIGHTING, false); + node->setMaterialFlag(video::EMF_BLEND_OPERATION, true); + node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2); + + smgr->addTextSceneNode(gui->getBuiltInFont(), + L"PS & VS & EMT_TRANSPARENT", + video::SColor(255,255,255,255), node); + + anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0)); + node->addAnimator(anim); + anim->drop(); + + /* + Then we add a third cube without a shader on it, to be able to compare + the cubes. + */ + + // add a scene node with no shader + + node = smgr->addCubeSceneNode(50); + node->setPosition(core::vector3df(0,50,25)); + node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); + node->setMaterialFlag(video::EMF_LIGHTING, false); + smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER", + video::SColor(255,255,255,255), node); + + /* + And last, we add a skybox and a user controlled camera to the scene. + For the skybox textures, we disable mipmap generation, because we don't + need mipmaps on it. + */ + + // add a nice skybox + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + smgr->addSkyBoxSceneNode( + driver->getTexture("../../media/irrlicht2_up.jpg"), + driver->getTexture("../../media/irrlicht2_dn.jpg"), + driver->getTexture("../../media/irrlicht2_lf.jpg"), + driver->getTexture("../../media/irrlicht2_rt.jpg"), + driver->getTexture("../../media/irrlicht2_ft.jpg"), + driver->getTexture("../../media/irrlicht2_bk.jpg")); + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); + + // add a camera and disable the mouse cursor + + scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(); + cam->setPosition(core::vector3df(-100,50,100)); + cam->setTarget(core::vector3df(0,0,0)); + device->getCursorControl()->setVisible(false); + + /* + Now draw everything. That's all. + */ + + int lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(255,0,0,0)); + smgr->drawAll(); + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + device->drop(); + + return 0; +} + +/* +Compile and run this, and I hope you have fun with your new little shader +writing tool :). +**/ diff --git a/src/others/irrlicht-1.8.1/examples/10.Shaders/tutorial.html b/src/others/irrlicht-1.8.1/examples/10.Shaders/tutorial.html new file mode 100644 index 0000000..05c4f08 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/10.Shaders/tutorial.html @@ -0,0 +1,566 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 10. Shaders
+
+
+
+

This tutorial shows how to use shaders for D3D8, D3D9 and OpenGL with + the engine and how to create new material types with them. It also shows + how to disable the generation of mipmaps at texture loading, and how + to use text scene nodes.

+

This tutorial does not explain how shaders work. I would recommend + to read the D3D or OpenGL documentation, to search a tutorial, or to + read a book about this.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
Lets start!
+
+

At first, we need to include all headers and do the stuff we always + do, like in nearly all other tutorials:

+ + + + +
#include <irrlicht.h>
#include <iostream>

using namespace irr;

#pragma comment(lib, "Irrlicht.lib")
+

Because we want to use some interesting shaders in this tutorials, + we need to set some data for them to make them able to compute nice + colors. In this example, we'll use a simple vertex shader which will + calculate the color of the vertex based on the position of the camera. + For this, the shader needs the following data: The inverted world + matrix for transforming the normal, the clip matrix for transforming + the position, the camera position and the world position of the object + for the calculation of the angle of light, and the color of the light. + To be able to tell the shader all this data every frame, we have to + derive a class from the IShaderConstantSetCallBack interface and override + its only method, namely OnSetConstants(). This method will be called + every time the material is set.
+ The method setVertexShaderConstant() of the IMaterialRendererServices + interface is used to set the data the shader needs. If the user chose + to use a High Level shader language like HLSL instead of Assembler + in this example, you have to set the variable name as parameter instead + of the register index.

+ + + + +
IrrlichtDevice* device = 0;
bool UseHighLevelShaders = false;

class MyShaderCallBack : public video::IShaderConstantSetCallBack
{
public: +
virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)
{
video::IVideoDriver* driver = services->getVideoDriver();

// set inverted world matrix
// if we are using highlevel shaders (the user can select this when
// starting the program), we must set the constants by name.

core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
invWorld.makeInverse();

if (UseHighLevelShaders)
services->setVertexShaderConstant("mInvWorld", &invWorld.M[0], 16);
else
services->setVertexShaderConstant(&invWorld.M[0], 0, 4);

// set clip matrix
core::matrix4 worldViewProj;
worldViewProj = driver->getTransform(video::ETS_PROJECTION);
worldViewProj *= driver->getTransform(video::ETS_VIEW);
worldViewProj *= driver->getTransform(video::ETS_WORLD);

if (UseHighLevelShaders)
services->setVertexShaderConstant("mWorldViewProj", &worldViewProj.M[0], 16);
else
services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4);

// set camera position
core::vector3df pos = device->getSceneManager()->
getActiveCamera()->getAbsolutePosition();

if (UseHighLevelShaders)
services->setVertexShaderConstant("mLightPos", reinterpret_cast<f32*>(&pos), 3);
else
services->setVertexShaderConstant(reinterpret_cast<f32*>(&pos), 8, 1);

// set light color
video::SColorf col(0.0f,1.0f,1.0f,0.0f);

if (UseHighLevelShaders)
services->setVertexShaderConstant("mLightColor", reinterpret_cast<f32*>(&col), 4);
else
services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);

// set transposed world matrix
core::matrix4 world = driver->getTransform(video::ETS_WORLD);
world = world.getTransposed();

if (UseHighLevelShaders)
services->setVertexShaderConstant("mTransWorld", &world.M[0], 16);
else
services->setVertexShaderConstant(&world.M[0], 10, 4);
}
};
+

The next few lines start up the engine. Just like in most other + tutorials before. But in addition, we ask the user if he wants this + example to use high level shaders if he selected a driver which is + capable of doing so.

+ + + + +
int main()
{
// let user select driver type

video::E_DRIVER_TYPE driverType = video::EDT_DIRECTX9;

printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;

switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
}

// ask the user if we should use high level shaders for this example
if (driverType == video::EDT_DIRECT3D9 ||
driverType == video::EDT_OPENGL) + {
printf("Please press 'y' if you want to use high level shaders.\n");
std::cin >> i;
if (i == 'y')
UseHighLevelShaders = true;
}

// create device

device = createDevice(driverType, core::dimension2d<s32>(640, 480));

if (device == 0)
{
printf("\nWas not able to create driver.\n"\
"Please restart and select another driver.\n"
);
getch();
return 1;
}

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
gui::IGUIEnvironment* gui = device->getGUIEnvironment();
+

Now for the more interesting parts. If we are using Direct3D, we + want to load vertex and pixel shader programs, if we have
+ OpenGL, we want to use ARB fragment and vertex programs. I wrote the + corresponding programs down into the files d3d8.ps, d3d8.vs, d3d9.ps, + d3d9.vs, opengl.ps and opengl.vs. We only need the right filenames + now. This is done in the following switch. Note, that it is not necessary + to write the shaders into text files, like in this example. You can + even write the shaders directly as strings into the cpp source file, + and use later addShaderMaterial() instead of addShaderMaterialFromFiles().

+ + + + +
	c8* vsFileName = 0; // filename for the vertex shader
c8* psFileName = 0; // filename for the pixel shader

switch(driverType)
{
case video::EDT_DIRECT3D8:
psFileName = "../../media/d3d8.psh";
vsFileName = "../../media/d3d8.vsh";
break;
case video::EDT_DIRECT3D9:
if (UseHighLevelShaders)
{
psFileName = "../../media/d3d9.hlsl";
vsFileName = psFileName; // both shaders are in the same file
}
else
{
psFileName = "../../media/d3d9.psh";
vsFileName = "../../media/d3d9.vsh";
}
break;
case video::EDT_OPENGL:
if (UseHighLevelShaders)
{
psFileName = "../../media/opengl.frag";
vsFileName = "../../media/opengl.vert";
}
else
{
psFileName = "../../media/opengl.psh";
vsFileName = "../../media/opengl.vsh";
}
break;
}
+
+

In addition, we check if the hardware and the selected renderer + is capable of executing the shaders we want. If not, we simply set + the filename string to 0. This is not necessary, but useful in this + example: For example, if the hardware is able to execute vertex shaders + but not pixel shaders, we create a new material which only uses the + vertex shader, and no pixel shader. Otherwise, if we would tell the + engine to create this material and the engine sees that the hardware + wouldn't be able to fullfill the request completely,
+ it would not create any new material at all. So in this example you + would see at least the vertex shader in action, without the pixel + shader.

+
+ + + + +
	if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&
!driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))
{
device->getLogger()->log("WARNING: Pixel shaders disabled "\
"because of missing driver/hardware support.");
psFileName = 0;
}

if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&
!driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))
{
device->getLogger()->log("WARNING: Vertex shaders disabled "\
"because of missing driver/hardware support.");
vsFileName = 0;
}
+

Now lets create the new materials.
+ As you maybe know from previous examples, a material type in the Irrlicht + engine is set by simply changing the MaterialType value in the SMaterial + struct. And this value is just a simple 32 bit value, like video::EMT_SOLID. + So we only need the engine to create a new value for us which we can + set there. To do this, we get a pointer to the IGPUProgrammingServices + and call addShaderMaterialFromFiles(), which returns such a new 32 bit + value. That's all.
+ The parameters to this method are the following: First, the names of + the files containing the code of the vertex and the pixel shader.
+ If you would use addShaderMaterial() instead, you would not need file + names, then you could write the code of the shader directly as string. + The following parameter is a pointer to the IShaderConstantSetCallBack + class we wrote at the beginning of this tutorial. If you don't want + to set constants, set this to 0. The last paramter tells the engine + which material it should use as base material.
+ To demonstrate this, we create two materials with a different base material, + one with EMT_SOLID and one with EMT_TRANSPARENT_ADD_COLOR.

+ + + + +
	// create materials

video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();

s32 newMaterialType1 = 0;
s32 newMaterialType2 = 0;

if (gpu)
{
MyShaderCallBack* mc = new MyShaderCallBack();
+ // create the shaders depending on if the user wanted high level
// or low level shaders:


if (UseHighLevelShaders)
{
// create material from high level shaders (hlsl or glsl)

newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(
vsFileName, "vertexMain", video::EVST_VS_1_1,
psFileName, "pixelMain", video::EPST_PS_1_1,
mc, video::EMT_SOLID);

newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(
vsFileName, "vertexMain", video::EVST_VS_1_1,
psFileName, "pixelMain", video::EPST_PS_1_1,
mc, video::EMT_TRANSPARENT_ADD_COLOR);
}
else
{
// create material from low level shaders (asm or arb_asm)

newMaterialType1 = gpu->addShaderMaterialFromFiles(vsFileName,
psFileName, mc, video::EMT_SOLID);

newMaterialType2 = gpu->addShaderMaterialFromFiles(vsFileName,
psFileName, mc, video::EMT_TRANSPARENT_ADD_COLOR);
}

mc->drop();
}
+

Now its time for testing out the materials. We create a test cube + and set the material we created. In addition, we add a text scene node + to the cube and a rotatation animator, to make it look more interesting + and important.

+ + + + +

+	// create test scene node 1, with the new created material type 1
+
+	scene::ISceneNode* node = smgr->addCubeSceneNode(50);
+	node->setPosition(core::vector3df(0,0,0));
+	node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+	node->setMaterialFlag(video::EMF_LIGHTING, false);
+	node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1);
+
+	smgr->addTextSceneNode(gui->getBuiltInFont(),
+			L"PS & VS & EMT_SOLID",
+			video::SColor(255,255,255,255),	node);
+
+	scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(
+			core::vector3df(0,0.3f,0));
+	node->addAnimator(anim);
+	anim->drop();
+

Same for the second cube, but with the second material we created.

+ + + + +
	// create test scene node 2, with the new created material type 2
+
+	node = smgr->addCubeSceneNode(50);
+	node->setPosition(core::vector3df(0,-10,50));
+	node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+	node->setMaterialFlag(video::EMF_LIGHTING, false);
+	node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2);
+
+	smgr->addTextSceneNode(gui->getBuiltInFont(),
+			L"PS & VS & EMT_TRANSPARENT",
+			video::SColor(255,255,255,255),	node);
+
+	anim = smgr->createRotationAnimator(core::vector3df(0,0.3f,0));
+	node->addAnimator(anim);
+	anim->drop();
+
+ Then we add a third cube without a shader on it, to be able to compare + the cubes.
+
+ + + + +
	// add a scene node with no shader 
+
+	node = smgr->addCubeSceneNode(50);
+	node->setPosition(core::vector3df(0,50,25));
+	node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+	node->setMaterialFlag(video::EMF_LIGHTING, false);
+	smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER",
+		video::SColor(255,255,255,255), node);
+            
+
+ And last, we add a skybox and a user controlled camera to the scene. For + the skybox textures, we disable mipmap generation, because we don't need + mipmaps on it.
+
+ + + + +
	// add a nice skybox

driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);

smgr->addSkyBoxSceneNode(
driver->getTexture("../../media/irrlicht2_up.jpg"),
driver->getTexture("../../media/irrlicht2_dn.jpg"),
driver->getTexture("../../media/irrlicht2_lf.jpg"),
driver->getTexture("../../media/irrlicht2_rt.jpg"),
driver->getTexture("../../media/irrlicht2_ft.jpg"),
driver->getTexture("../../media/irrlicht2_bk.jpg"));

driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);

// add a camera and disable the mouse cursor

scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);
cam->setPosition(core::vector3df(-100,50,100));
cam->setTarget(core::vector3df(0,0,0));
device->getCursorControl()->setVisible(false);
+
+ Now draw everything. That's all.
+
+ + + + +
	int lastFPS = -1;

while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(255,0,0,0));
smgr->drawAll();
driver->endScene();

int fps = driver->getFPS();

if (lastFPS != fps)
{
core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}

device->drop();

return 0;
+
+ Compile and run this, and I hope you have fun with your new little shader + writing tool :).
+
+
+
+ + + + + + + +
Shader files
+
+

The files containing the shaders can be found in the media directory + of the SDK. However, they look like this:

+ + + + + + + +
D3D9.HLSL
+
+// part of the Irrlicht Engine Shader example.
+// These simple Direct3D9 pixel and vertex shaders will be loaded by the shaders
+// example. Please note that these example shaders don't do anything really useful. 
+// They only demonstrate that shaders can be used in Irrlicht.
+
+//-----------------------------------------------------------------------------
+// Global variables
+//-----------------------------------------------------------------------------
+float4x4 mWorldViewProj;  // World * View * Projection transformation
+float4x4 mInvWorld;       // Inverted world matrix
+float4x4 mTransWorld;     // Transposed world matrix
+float3 mLightPos;         // Light position
+float4 mLightColor;       // Light color
+
+
+// Vertex shader output structure
+struct VS_OUTPUT
+{
+	float4 Position   : POSITION;   // vertex position 
+	float4 Diffuse    : COLOR0;     // vertex diffuse color
+	float2 TexCoord   : TEXCOORD0;  // tex coords
+};
+
+
+VS_OUTPUT vertexMain( in float4 vPosition : POSITION,
+                      in float3 vNormal   : NORMAL,
+                      float2 texCoord     : TEXCOORD0 )
+{
+	VS_OUTPUT Output;
+
+	// transform position to clip space 
+	Output.Position = mul(vPosition, mWorldViewProj);
+	
+	// transform normal 
+	float3 normal = mul(vNormal, mInvWorld);
+	
+	// renormalize normal 
+	normal = normalize(normal);
+	
+	// position in world coodinates
+	float3 worldpos = mul(mTransWorld, vPosition);
+	
+	// calculate light vector, vtxpos - lightpos
+	float3 lightVector = worldpos - mLightPos;
+	
+	// normalize light vector 
+	lightVector = normalize(lightVector);
+	
+	// calculate light color 
+	float3 tmp = dot(-lightVector, normal);
+	tmp = lit(tmp.x, tmp.y, 1.0);
+	
+	tmp = mLightColor * tmp.y;
+	Output.Diffuse = float4(tmp.x, tmp.y, tmp.z, 0);
+	Output.TexCoord = texCoord;
+	
+	return Output;
+}
+
+
+
+// Pixel shader output structure
+struct PS_OUTPUT
+{
+    float4 RGBColor : COLOR0;  // Pixel color    
+};
+
+
+sampler2D tex0;
+	
+PS_OUTPUT pixelMain( float2 TexCoord : TEXCOORD0,
+                     float4 Position : POSITION,
+                     float4 Diffuse  : COLOR0 ) 
+{ 
+	PS_OUTPUT Output;
+
+	float4 col = tex2D( tex0, TexCoord );  // sample color map
+	
+	// multiply with diffuse and do other senseless operations
+	Output.RGBColor = Diffuse * col;
+	Output.RGBColor *= 4.0;
+
+	return Output;
+}
+
+ + + + + + + +
D3D9.VSH
+; part of the Irrlicht Engine Shader example.
+; This Direct3D9 vertex shader will be loaded by the engine.
+; Please note that these example shaders don't do anything really useful. 
+; They only demonstrate that shaders can be used in Irrlicht.
+vs.1.1 + +dcl_position v0; ; declare position +dcl_normal v1; ; declare normal +dcl_color v2; ; declare color +dcl_texcoord0 v3; ; declare texture coordinate
+; transpose and transform position to clip space +mul r0, v0.x, c4 +mad r0, v0.y, c5, r0 +mad r0, v0.z, c6, r0 +add oPos, c7, r0 + +; transform normal +dp3 r1.x, v1, c0 +dp3 r1.y, v1, c1 +dp3 r1.z, v1, c2 + +; renormalize normal +dp3 r1.w, r1, r1 +rsq r1.w, r1.w +mul r1, r1, r1.w + +; calculate light vector +m4x4 r6, v0, c10 ; vertex into world position +add r2, c8, -r6 ; vtxpos - lightpos + +; normalize light vector +dp3 r2.w, r2, r2 +rsq r2.w, r2.w +mul r2, r2, r2.w + +; calculate light color +dp3 r3, r1, r2 ; dp3 with negative light vector +lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y +mul oD0, r5.y, c9 ; ouput diffuse color +mov oT0, v3 ; store texture coordinates
+
+ + + + + + + +
D3D9.PSH
+; part of the Irrlicht Engine Shader example.
+; This simple Direct3D9 pixel shader will be loaded by the engine.
+; Please note that these example shaders don't do anything really useful. 
+; They only demonstrate that shaders can be used in Irrlicht.
+ps.1.1 + +tex t0 ; sample color map +add r0, v0, v0 ; mulitply with color +mul t0, t0, r0 ; mulitply with color +add r0, t0, t0 ; make it brighter and store result +
+
+ + + + + + + +
D3D8.VSH
+; part of the Irrlicht Engine Shader example.
+; This Direct3D9 vertex shader will be loaded by the engine.
+; Please note that these example shaders don't do anything really useful. 
+; They only demonstrate that shaders can be used in Irrlicht.
+vs.1.1 + +; transpose and transform position to clip space +mul r0, v0.x, c4 +mad r0, v0.y, c5, r0 +mad r0, v0.z, c6, r0 +add oPos, c7, r0 + +; transform normal +dp3 r1.x, v1, c0 +dp3 r1.y, v1, c1 +dp3 r1.z, v1, c2 + +; renormalize normal +dp3 r1.w, r1, r1 +rsq r1.w, r1.w +mul r1, r1, r1.w + +; calculate light vector +m4x4 r6, v0, c10 ; vertex into world position +add r2, c8, -r6 ; vtxpos - lightpos + +; normalize light vector +dp3 r2.w, r2, r2 +rsq r2.w, r2.w +mul r2, r2, r2.w + +; calculate light color +dp3 r3, r1, r2 ; dp3 with negative light vector +lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y +mul oD0, r5.y, c9 ; ouput diffuse color +mov oT0, v3 ; store texture coordinates
+
+ + + + + + + +
D3D8.PSH
+; part of the Irrlicht Engine Shader example.
+; This simple Direct3D9 pixel shader will be loaded by the engine.
+; Please note that these example shaders don't do anything really useful. 
+; They only demonstrate that shaders can be used in Irrlicht.
+ps.1.1 + +tex t0 ; sample color map +mul_x2 t0, t0, v0 ; mulitply with color +add r0, t0, t0 ; make it brighter and store result
+
+ + + + + + + +
OPENGL.VSH
+!!ARBvp1.0
+# part of the Irrlicht Engine Shader example.
+# Please note that these example shaders don't do anything really useful. 
+# They only demonstrate that shaders can be used in Irrlicht.
+#input +ATTRIB InPos = vertex.position; +ATTRIB InColor = vertex.color; +ATTRIB InNormal = vertex.normal; +ATTRIB InTexCoord = vertex.texcoord; + +#output +OUTPUT OutPos = result.position; +OUTPUT OutColor = result.color; +OUTPUT OutTexCoord = result.texcoord; + +PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix. +TEMP Temp; +TEMP TempColor; +TEMP TempNormal; +TEMP TempPos; + +#transform position to clip space +DP4 Temp.x, MVP[0], InPos; +DP4 Temp.y, MVP[1], InPos; +DP4 Temp.z, MVP[2], InPos; +DP4 Temp.w, MVP[3], InPos; + +#transform normal +DP3 TempNormal.x, InNormal.x, program.local[0]; +DP3 TempNormal.y, InNormal.y, program.local[1]; +DP3 TempNormal.z, InNormal.z, program.local[2]; + +#renormalize normal +DP3 TempNormal.w, TempNormal, TempNormal; +RSQ TempNormal.w, TempNormal.w; +MUL TempNormal, TempNormal, TempNormal.w; + +# calculate light vector +DP4 TempPos.x, InPos, program.local[10]; # vertex into world position +DP4 TempPos.y, InPos, program.local[11]; +DP4 TempPos.z, InPos, program.local[12]; +DP4 TempPos.w, InPos, program.local[13]; + +ADD TempPos, program.local[8], -TempPos; # vtxpos - lightpos + +# normalize light vector +DP3 TempPos.w, TempPos, TempPos; +RSQ TempPos.w, TempPos.w; +MUL TempPos, TempPos, TempPos.w; + +# calculate light color +DP3 TempColor, TempNormal, TempPos; # dp3 with negative light vector +LIT OutColor, TempColor; # clamp to zero if r3 < 0, r5 has diffuce component in r5.y +MUL OutColor, TempColor.y, program.local[9]; # ouput diffuse color +MOV OutColor.w, 1.0; # we want alpha to be always 1 +MOV OutTexCoord, InTexCoord; # store texture coordinate +MOV OutPos, Temp; + +END
+
+ + + + + + + +
OPENGL.PSH
+!!ARBfp1.0
+# part of the Irrlicht Engine Shader example.
+# Please note that these example shaders don't do anything really useful. 
+# They only demonstrate that shaders can be used in Irrlicht.
+#Input +ATTRIB inTexCoord = fragment.texcoord; # texture coordinates +ATTRIB inColor = fragment.color.primary; # interpolated diffuse color + +#Output +OUTPUT outColor = result.color; + +TEMP texelColor; +TEMP tmp; +TXP texelColor, inTexCoord, texture, 2D; + +ADD tmp, inColor, inColor; # mulitply with color +MUL texelColor, texelColor, tmp; # mulitply with color +ADD outColor, texelColor, texelColor; # make it brighter and store result + +END
+

 

+
+
+

 

+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/Makefile b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/Makefile new file mode 100644 index 0000000..affdc02 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 11.PerPixelLighting +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.cbp b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.cbp new file mode 100644 index 0000000..2cb49da --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.cbp @@ -0,0 +1,56 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.dev b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.dev new file mode 100644 index 0000000..c83a502 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 11 Per-Pixel Lighting +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=11.PerPixelLighting.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.vcproj b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.vcproj new file mode 100644 index 0000000..94d7e6a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj new file mode 100644 index 0000000..267ded9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 11.PerPixelLighting + {C4B42409-542D-4EFC-9E6B-44713FD47A33} + PerPixelLighting + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/PerPixelLighting.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/PerPixelLighting.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/PerPixelLighting.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/PerPixelLighting.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj new file mode 100644 index 0000000..06fce8f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 11.PerPixelLighting + {C4B42409-542D-4EFC-9E6B-44713FD47A33} + PerPixelLighting + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/PerPixelLighting.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/PerPixelLighting.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/PerPixelLighting.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/PerPixelLighting.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj new file mode 100644 index 0000000..b6830db --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj new file mode 100644 index 0000000..c9ed033 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/PerPixelLighting_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/main.cpp b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/main.cpp new file mode 100644 index 0000000..227aa97 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/main.cpp @@ -0,0 +1,487 @@ +/** Example 011 Per-Pixel Lighting + +This tutorial shows how to use one of the built in more complex materials in +irrlicht: Per pixel lighted surfaces using normal maps and parallax mapping. It +will also show how to use fog and moving particle systems. And don't panic: You +do not need any experience with shaders to use these materials in Irrlicht. + +At first, we need to include all headers and do the stuff we always do, like in +nearly all other tutorials. +*/ +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +/* +For this example, we need an event receiver, to make it possible for the user +to switch between the three available material types. In addition, the event +receiver will create some small GUI window which displays what material is +currently being used. There is nothing special done in this class, so maybe you +want to skip reading it. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + + MyEventReceiver(scene::ISceneNode* room,scene::ISceneNode* earth, + gui::IGUIEnvironment* env, video::IVideoDriver* driver) + { + // store pointer to room so we can change its drawing mode + Room = room; + Earth = earth; + Driver = driver; + + // set a nicer font + gui::IGUISkin* skin = env->getSkin(); + gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp"); + if (font) + skin->setFont(font); + + // add window and listbox + gui::IGUIWindow* window = env->addWindow( + core::rect(460,375,630,470), false, L"Use 'E' + 'R' to change"); + + ListBox = env->addListBox( + core::rect(2,22,165,88), window); + + ListBox->addItem(L"Diffuse"); + ListBox->addItem(L"Bump mapping"); + ListBox->addItem(L"Parallax mapping"); + ListBox->setSelected(1); + + // create problem text + ProblemText = env->addStaticText( + L"Your hardware or this renderer is not able to use the "\ + L"needed shaders for this material. Using fall back materials.", + core::rect(150,20,470,80)); + + ProblemText->setOverrideColor(video::SColor(100,255,255,255)); + + // set start material (prefer parallax mapping if available) + video::IMaterialRenderer* renderer = + Driver->getMaterialRenderer(video::EMT_PARALLAX_MAP_SOLID); + if (renderer && renderer->getRenderCapability() == 0) + ListBox->setSelected(2); + + // set the material which is selected in the listbox + setMaterial(); + } + + bool OnEvent(const SEvent& event) + { + // check if user presses the key 'E' or 'R' + if (event.EventType == irr::EET_KEY_INPUT_EVENT && + !event.KeyInput.PressedDown && Room && ListBox) + { + // change selected item in listbox + + int sel = ListBox->getSelected(); + if (event.KeyInput.Key == irr::KEY_KEY_R) + ++sel; + else + if (event.KeyInput.Key == irr::KEY_KEY_E) + --sel; + else + return false; + + if (sel > 2) sel = 0; + if (sel < 0) sel = 2; + ListBox->setSelected(sel); + + // set the material which is selected in the listbox + setMaterial(); + } + + return false; + } + +private: + + // sets the material of the room mesh the the one set in the + // list box. + void setMaterial() + { + video::E_MATERIAL_TYPE type = video::EMT_SOLID; + + // change material setting + switch(ListBox->getSelected()) + { + case 0: type = video::EMT_SOLID; + break; + case 1: type = video::EMT_NORMAL_MAP_SOLID; + break; + case 2: type = video::EMT_PARALLAX_MAP_SOLID; + break; + } + + Room->setMaterialType(type); + + // change material setting + switch(ListBox->getSelected()) + { + case 0: type = video::EMT_TRANSPARENT_VERTEX_ALPHA; + break; + case 1: type = video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA; + break; + case 2: type = video::EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA; + break; + } + + Earth->setMaterialType(type); + + /* + We need to add a warning if the materials will not be able to + be displayed 100% correctly. This is no problem, they will be + rendered using fall back materials, but at least the user + should know that it would look better on better hardware. We + simply check if the material renderer is able to draw at full + quality on the current hardware. The + IMaterialRenderer::getRenderCapability() returns 0 if this is + the case. + */ + video::IMaterialRenderer* renderer = Driver->getMaterialRenderer(type); + + // display some problem text when problem + if (!renderer || renderer->getRenderCapability() != 0) + ProblemText->setVisible(true); + else + ProblemText->setVisible(false); + } + +private: + + gui::IGUIStaticText* ProblemText; + gui::IGUIListBox* ListBox; + + scene::ISceneNode* Room; + scene::ISceneNode* Earth; + video::IVideoDriver* Driver; +}; + + +/* +Now for the real fun. We create an Irrlicht Device and start to setup the scene. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device + + IrrlichtDevice* device = createDevice(driverType, + core::dimension2d(640, 480)); + + if (device == 0) + return 1; // could not create selected driver. + + /* + Before we start with the interesting stuff, we do some simple things: + Store pointers to the most important parts of the engine (video driver, + scene manager, gui environment) to safe us from typing too much, add an + irrlicht engine logo to the window and a user controlled first person + shooter style camera. Also, we let the engine know that it should store + all textures in 32 bit. This necessary because for parallax mapping, we + need 32 bit textures. + */ + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* env = device->getGUIEnvironment(); + + driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); + + // add irrlicht logo + env->addImage(driver->getTexture("../../media/irrlichtlogo3.png"), + core::position2d(10,10)); + + // add camera + scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); + camera->setPosition(core::vector3df(-200,200,-200)); + + // disable mouse cursor + device->getCursorControl()->setVisible(false); + + /* + Because we want the whole scene to look a little bit scarier, we add + some fog to it. This is done by a call to IVideoDriver::setFog(). There + you can set various fog settings. In this example, we use pixel fog, + because it will work well with the materials we'll use in this example. + Please note that you will have to set the material flag EMF_FOG_ENABLE + to 'true' in every scene node which should be affected by this fog. + */ + driver->setFog(video::SColor(0,138,125,81), video::EFT_FOG_LINEAR, 250, 1000, .003f, true, false); + + /* + To be able to display something interesting, we load a mesh from a .3ds + file which is a room I modeled with anim8or. It is the same room as + from the specialFX example. Maybe you remember from that tutorial, I am + no good modeler at all and so I totally messed up the texture mapping + in this model, but we can simply repair it with the + IMeshManipulator::makePlanarTextureMapping() method. + */ + + scene::IAnimatedMesh* roomMesh = smgr->getMesh("../../media/room.3ds"); + scene::ISceneNode* room = 0; + scene::ISceneNode* earth = 0; + + if (roomMesh) + { + // The Room mesh doesn't have proper Texture Mapping on the + // floor, so we can recreate them on runtime + smgr->getMeshManipulator()->makePlanarTextureMapping( + roomMesh->getMesh(0), 0.003f); + + /* + Now for the first exciting thing: If we successfully loaded the + mesh we need to apply textures to it. Because we want this room + to be displayed with a very cool material, we have to do a + little bit more than just set the textures. Instead of only + loading a color map as usual, we also load a height map which + is simply a grayscale texture. From this height map, we create + a normal map which we will set as second texture of the room. + If you already have a normal map, you could directly set it, + but I simply didn't find a nice normal map for this texture. + The normal map texture is being generated by the + makeNormalMapTexture method of the VideoDriver. The second + parameter specifies the height of the heightmap. If you set it + to a bigger value, the map will look more rocky. + */ + + video::ITexture* normalMap = + driver->getTexture("../../media/rockwall_height.bmp"); + + if (normalMap) + driver->makeNormalMapTexture(normalMap, 9.0f); +/* + // The Normal Map and the displacement map/height map in the alpha channel + video::ITexture* normalMap = + driver->getTexture("../../media/rockwall_NRM.tga"); +*/ + /* + But just setting color and normal map is not everything. The + material we want to use needs some additional informations per + vertex like tangents and binormals. Because we are too lazy to + calculate that information now, we let Irrlicht do this for us. + That's why we call IMeshManipulator::createMeshWithTangents(). + It creates a mesh copy with tangents and binormals from another + mesh. After we've done that, we simply create a standard + mesh scene node with this mesh copy, set color and normal map + and adjust some other material settings. Note that we set + EMF_FOG_ENABLE to true to enable fog in the room. + */ + + scene::IMesh* tangentMesh = smgr->getMeshManipulator()-> + createMeshWithTangents(roomMesh->getMesh(0)); + + room = smgr->addMeshSceneNode(tangentMesh); + room->setMaterialTexture(0, + driver->getTexture("../../media/rockwall.jpg")); + room->setMaterialTexture(1, normalMap); + + // Stones don't glitter.. + room->getMaterial(0).SpecularColor.set(0,0,0,0); + room->getMaterial(0).Shininess = 0.f; + + room->setMaterialFlag(video::EMF_FOG_ENABLE, true); + room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID); + // adjust height for parallax effect + room->getMaterial(0).MaterialTypeParam = 1.f / 64.f; + + // drop mesh because we created it with a create.. call. + tangentMesh->drop(); + } + + /* + After we've created a room shaded by per pixel lighting, we add a + sphere into it with the same material, but we'll make it transparent. + In addition, because the sphere looks somehow like a familiar planet, + we make it rotate. The procedure is similar as before. The difference + is that we are loading the mesh from an .x file which already contains + a color map so we do not need to load it manually. But the sphere is a + little bit too small for our needs, so we scale it by the factor 50. + */ + + // add earth sphere + + scene::IAnimatedMesh* earthMesh = smgr->getMesh("../../media/earth.x"); + if (earthMesh) + { + //perform various task with the mesh manipulator + scene::IMeshManipulator *manipulator = smgr->getMeshManipulator(); + + // create mesh copy with tangent informations from original earth.x mesh + scene::IMesh* tangentSphereMesh = + manipulator->createMeshWithTangents(earthMesh->getMesh(0)); + + // set the alpha value of all vertices to 200 + manipulator->setVertexColorAlpha(tangentSphereMesh, 200); + + // scale the mesh by factor 50 + core::matrix4 m; + m.setScale ( core::vector3df(50,50,50) ); + manipulator->transform( tangentSphereMesh, m ); + + earth = smgr->addMeshSceneNode(tangentSphereMesh); + + earth->setPosition(core::vector3df(-70,130,45)); + + // load heightmap, create normal map from it and set it + video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg"); + if (earthNormalMap) + { + driver->makeNormalMapTexture(earthNormalMap, 20.0f); + earth->setMaterialTexture(1, earthNormalMap); + earth->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA); + } + + // adjust material settings + earth->setMaterialFlag(video::EMF_FOG_ENABLE, true); + + // add rotation animator + scene::ISceneNodeAnimator* anim = + smgr->createRotationAnimator(core::vector3df(0,0.1f,0)); + earth->addAnimator(anim); + anim->drop(); + + // drop mesh because we created it with a create.. call. + tangentSphereMesh->drop(); + } + + /* + Per pixel lighted materials only look cool when there are moving + lights. So we add some. And because moving lights alone are so boring, + we add billboards to them, and a whole particle system to one of them. + We start with the first light which is red and has only the billboard + attached. + */ + + // add light 1 (more green) + scene::ILightSceneNode* light1 = + smgr->addLightSceneNode(0, core::vector3df(0,0,0), + video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f); + + light1->setDebugDataVisible ( scene::EDS_BBOX ); + + + // add fly circle animator to light 1 + scene::ISceneNodeAnimator* anim = + smgr->createFlyCircleAnimator (core::vector3df(50,300,0),190.0f, -0.003f); + light1->addAnimator(anim); + anim->drop(); + + // attach billboard to the light + scene::IBillboardSceneNode* bill = + smgr->addBillboardSceneNode(light1, core::dimension2d(60, 60)); + + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + bill->setMaterialTexture(0, driver->getTexture("../../media/particlegreen.jpg")); + + /* + Now the same again, with the second light. The difference is that we + add a particle system to it too. And because the light moves, the + particles of the particlesystem will follow. If you want to know more + about how particle systems are created in Irrlicht, take a look at the + specialFx example. Maybe you will have noticed that we only add 2 + lights, this has a simple reason: The low end version of this material + was written in ps1.1 and vs1.1, which doesn't allow more lights. You + could add a third light to the scene, but it won't be used to shade the + walls. But of course, this will change in future versions of Irrlicht + where higher versions of pixel/vertex shaders will be implemented too. + */ + + // add light 2 (red) + scene::ISceneNode* light2 = + smgr->addLightSceneNode(0, core::vector3df(0,0,0), + video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f); + + // add fly circle animator to light 2 + anim = smgr->createFlyCircleAnimator(core::vector3df(0,150,0), 200.0f, + 0.001f, core::vector3df(0.2f, 0.9f, 0.f)); + light2->addAnimator(anim); + anim->drop(); + + // attach billboard to light + bill = smgr->addBillboardSceneNode(light2, core::dimension2d(120, 120)); + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp")); + + // add particle system + scene::IParticleSystemSceneNode* ps = + smgr->addParticleSystemSceneNode(false, light2); + + // create and set emitter + scene::IParticleEmitter* em = ps->createBoxEmitter( + core::aabbox3d(-3,0,-3,3,1,3), + core::vector3df(0.0f,0.03f,0.0f), + 80,100, + video::SColor(10,255,255,255), video::SColor(10,255,255,255), + 400,1100); + em->setMinStartSize(core::dimension2d(30.0f, 40.0f)); + em->setMaxStartSize(core::dimension2d(30.0f, 40.0f)); + + ps->setEmitter(em); + em->drop(); + + // create and set affector + scene::IParticleAffector* paf = ps->createFadeOutParticleAffector(); + ps->addAffector(paf); + paf->drop(); + + // adjust some material settings + ps->setMaterialFlag(video::EMF_LIGHTING, false); + ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp")); + ps->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + + MyEventReceiver receiver(room, earth, env, driver); + device->setEventReceiver(&receiver); + + /* + Finally, draw everything. That's it. + */ + + int lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, 0); + + smgr->drawAll(); + env->drawAll(); + + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw str = L"Per pixel lighting example - Irrlicht Engine ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/tutorial.html b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/tutorial.html new file mode 100644 index 0000000..89e87bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/11.PerPixelLighting/tutorial.html @@ -0,0 +1,502 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 11. Per pixel lighting
+
+
+
+

This tutorial shows how to use one of the built in more complex materials + in irrlicht: Per pixel lighted surfaces using normal maps and parallax + mapping. It will also show how to use fog and moving particle systems. + And don't panic: You dont need any experience with shaders to use these + materials in Irrlicht.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
Lets start!
+
+

At first, we need to include all headers and do the stuff we always + do, like in nearly all other tutorials.

+ + + + +
#include <irrlicht.h>
#include <iostream>

using namespace irr;

#pragma comment(lib, "Irrlicht.lib")
+

For this example, we need an event receiver, to make it possible + for the user to switch between the three available material types. + In addition, the event receiver will create some small GUI window + which displays what material is currently being used. There is nothing + special done in this class, so maybe you want to skip reading it.

+ + + + +
class MyEventReceiver : public IEventReceiver
+{
+public:
+
+	MyEventReceiver(scene::ISceneNode* room, 
+		gui::IGUIEnvironment* env, video::IVideoDriver* driver)
+	{
+		// store pointer to room so we can change its drawing mode
+		Room = room;
+		Driver = driver;
+
+		// set a nicer font
+		gui::IGUISkin* skin = env->getSkin();
+		gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+		if (font)
+			skin->setFont(font);
+
+		// add window and listbox
+		gui::IGUIWindow* window = env->addWindow(
+			core::rect(490,390,630,470), false, L"Use 'E' + 'R' to change");
+
+		ListBox = env->addListBox(
+			core::rect(2,22,135,78), window);
+
+		ListBox->addItem(L"Diffuse");
+		ListBox->addItem(L"Bump mapping");
+		ListBox->addItem(L"Parallax mapping");
+		ListBox->setSelected(1);
+
+		// create problem text
+		ProblemText = env->addStaticText(
+			L"Your hardware or this renderer is not able to use the "\
+			L"needed shaders for this material. Using fall back materials.",
+			core::rect(150,20,470,60));
+
+		ProblemText->setOverrideColor(video::SColor(100,255,255,255));
+
+		// set start material (prefer parallax mapping if available)
+		video::IMaterialRenderer* renderer = 
+			Driver->getMaterialRenderer(video::EMT_PARALLAX_MAP_SOLID);
+		if (renderer && renderer->getRenderCapability() == 0)
+			ListBox->setSelected(2);
+
+		// set the material which is selected in the listbox
+		setMaterial();
+	}
+
+	bool OnEvent(const SEvent& event)
+	{
+		// check if user presses the key 'E' or 'R'
+		if (event.EventType == irr::EET_KEY_INPUT_EVENT &&
+			!event.KeyInput.PressedDown && Room && ListBox)
+		{
+			// change selected item in listbox 
+
+			int sel = ListBox->getSelected();
+			if (event.KeyInput.Key == irr::KEY_KEY_R)
+				++sel;
+			else
+			if (event.KeyInput.Key == irr::KEY_KEY_E)
+				--sel;
+			else 
+				return false;
+
+			if (sel > 2) sel = 0;
+			if (sel < 0) sel = 2;
+			ListBox->setSelected(sel);
+			
+			// set the material which is selected in the listbox
+			setMaterial();
+		}
+
+		return false;
+	}
+
+private:
+
+	// sets the material of the room mesh the the one set in the 
+	// list box.
+	void setMaterial()
+	{
+		video::E_MATERIAL_TYPE type = video::EMT_SOLID;
+
+		// change material setting
+		switch(ListBox->getSelected())
+		{
+		case 0: type = video::EMT_SOLID;
+			break;
+		case 1: type = video::EMT_NORMAL_MAP_SOLID;
+			break;
+		case 2: type = video::EMT_PARALLAX_MAP_SOLID;
+			break;
+		}
+
+		Room->setMaterialType(type);
+
+

We need to add a warning if the materials will not be able to be + displayed 100% correctly. This is no problem, they will be renderered + using fall back materials, but at least the user should know that + it would look better on better hardware. We simply check if the material + renderer is able to draw at full quality on the current hardware. + The IMaterialRenderer::getRenderCapability() returns 0 if this is + the case.
+

+ + + + +
video::IMaterialRenderer* renderer = Driver->getMaterialRenderer(type);
+
+		// display some problem text when problem
+		if (!renderer || renderer->getRenderCapability() != 0)
+			ProblemText->setVisible(true);
+		else
+			ProblemText->setVisible(false);
+	}
+
+private:
+
+	gui::IGUIStaticText* ProblemText;
+	gui::IGUIListBox* ListBox;
+
+	scene::ISceneNode* Room;	
+	video::IVideoDriver* Driver;
+};
+


+ Now for the real fun. We create an Irrlicht Device and start to setup + the scene.
+

+ + + + +
int main()
+{
+	// let user select driver type
+
+	video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
+
printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
+ char i; + std::cin >> i; + + switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 0;
} + + // create device + + IrrlichtDevice* device = createDevice(driverType, core::dimension2d(640, 480)); + + if (device == 0) + return 1; // could not create selected driver. +
+
+ Before we start with the interesting stuff, we do some simple things: + Store pointers to the most important parts of the engine (video driver,
+ scene manager, gui environment) to safe us from typing too much, add + an irrlicht engine logo to the window and a user controlled first person + shooter style camera. Also, we let the engine now that it should store + all textures in 32 bit. This necessary because for parallax mapping, + we need 32 bit textures.
+
+ + + + +
+	video::IVideoDriver* driver = device->getVideoDriver();
+	scene::ISceneManager* smgr = device->getSceneManager();
+	gui::IGUIEnvironment* env = device->getGUIEnvironment();
+
+	driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
+
+	// add irrlicht logo
+	env->addImage(driver->getTexture("../../media/irrlichtlogoalpha.tga"),
+		core::position2d(10,10));
+		
+	// add camera
+	scene::ICameraSceneNode* camera = 
+		smgr->addCameraSceneNodeFPS(0,100.0f,300.0f);
+	camera->setPosition(core::vector3df(-200,200,-200));
+
+	// disable mouse cursor
+	device->getCursorControl()->setVisible(false);
+
+ Because we want the whole scene to look a little bit scarier, we add + some fog to it. This is done by a call to IVideoDriver::setFog(). There + you can set
+ various fog settings. In this example, we use pixel fog, because it + will work well with the materials we'll use in this example. Please + note that you will have to set the material flag EMF_FOG_ENABLE to 'true' + in every scene node which should be affected by this fog.
+
+ + + + +
driver->setFog(video::SColor(0,138,125,81), true, 250, 1000, 0, true);
+
+ To be able to display something interesting, we load a mesh from a .3ds + file which is a room I modeled with anim8or. It is the same room as +
+ from the specialFX example. Maybe you remember from that tutorial, I + am no good modeler at all and so I totally messed up the texture mapping + in this model, but we can simply repair it with the IMeshManipulator::makePlanarTextureMapping() + method.
+
+ + + + +
	scene::IAnimatedMesh* roomMesh = smgr->getMesh(
+		"../../media/room.3ds");
+	scene::ISceneNode* room = 0;
+
+	if (roomMesh)
+	{
+		smgr->getMeshManipulator()->makePlanarTextureMapping(
+				roomMesh->getMesh(0), 0.003f);
+
+ Now for the first exciting thing: If we successfully loaded the mesh + we need to apply textures to it. Because we want this room to be displayed + with a very cool material, we have to do a little bit more than just + set the textures. Instead of only loading a color map as usual, we also + load a height map which is simply a grayscale texture. From this height + map, we create a normal map which we will set as second texture of the + room. If you already have a normal map, you could directly set it, but + I simply didn´t find a nice normal map for this texture. The normal + map texture is being generated by the makeNormalMapTexture method
+ of the VideoDriver. The second parameter specifies the height of the + heightmap. If you set it to a bigger value, the map will look more rocky.
+
+ + + + +
		video::ITexture* colorMap = driver->getTexture("../../media/rockwall.bmp");
+		video::ITexture* normalMap = driver->getTexture("../../media/rockwall_height.bmp");
+		
+		driver->makeNormalMapTexture(normalMap, 9.0f);
+
+ But just setting color and normal map is not everything. The material + we want to use needs some additional informations per vertex like tangents + and binormals.
+ Because we are too lazy to calculate that information now, we let Irrlicht + do this for us. That's why we call IMeshManipulator::createMeshWithTangents(). + It
+ creates a mesh copy with tangents and binormals from any other mesh. + After we've done that, we simply create a standard mesh scene node with + this
+ mesh copy, set color and normal map and adjust some other material settings. + Note that we set EMF_FOG_ENABLE to true to enable fog in the room.
+
+ + + + +
scene::IMesh* tangentMesh = smgr->getMeshManipulator()->createMeshWithTangents(
roomMesh->getMesh(0));

room = smgr->addMeshSceneNode(tangentMesh);
room->setMaterialTexture(0, colorMap);
room->setMaterialTexture(1, normalMap);
room->getMaterial(0).SpecularColor.set(0,0,0,0);
room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
room->getMaterial(0).MaterialTypeParam = 0.02f; // adjust height for parallax effect
// drop mesh because we created it with a create.. call.
tangentMesh->drop();
}
+
+ After we've created a room shaded by per pixel lighting, we add a sphere + into it with the same material, but we'll make it transparent. In addition,
+ because the sphere looks somehow like a familiar planet, we make it + rotate. The procedure is similar as before. The difference is that we + are loading
+ the mesh from an .x file which already contains a color map so we do + not need to load it manually. But the sphere is a little bit too small + for our needs, so we scale it by the factor 50.
+
+ + + + +
// add earth sphere
+
+	scene::IAnimatedMesh* earthMesh = smgr->getMesh("../../media/earth.x");
+	if (earthMesh)
+	{
+		// create mesh copy with tangent informations from original earth.x mesh
+		scene::IMesh* tangentSphereMesh = 
+			smgr->getMeshManipulator()->createMeshWithTangents(earthMesh->getMesh(0));
+
+		// set the alpha value of all vertices to 200
+		smgr->getMeshManipulator()->setVertexColorAlpha(tangentSphereMesh, 200);
+		
+		// scale the mesh by factor 50
+		smgr->getMeshManipulator()->scaleMesh(
+			tangentSphereMesh, core::vector3df(50,50,50));
+
+		// create mesh scene node
+		scene::ISceneNode* sphere = smgr->addMeshSceneNode(tangentSphereMesh);
+		sphere->setPosition(core::vector3df(-70,130,45));
+
+		// load heightmap, create normal map from it and set it
+		video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.bmp");
+		driver->makeNormalMapTexture(earthNormalMap, 20.0f);
+		sphere->setMaterialTexture(1, earthNormalMap);
+
+		// adjust material settings
+		sphere->setMaterialFlag(video::EMF_FOG_ENABLE, true);
+		sphere->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA); 
+
+		// add rotation animator
+		scene::ISceneNodeAnimator* anim =
+			smgr->createRotationAnimator(core::vector3df(0,0.1f,0));	
+		sphere->addAnimator(anim);
+		anim->drop();
+
+		// drop mesh because we created it with a create.. call.
+		tangentSphereMesh->drop();
+	}
+
+ Per pixel lighted materials only look cool when there are moving lights. + So we add some. And because moving lights alone are so boring, we add + billboards
+ to them, and a whole particle system to one of them. We start with the + first light which is red and has only the billboard attached.
+
+ + + + +
// add light 1 (nearly red)
+	scene::ILightSceneNode* light1 = 
+		smgr->addLightSceneNode(0, core::vector3df(0,0,0), 
+		video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 200.0f);
+
+	// add fly circle animator to light 1
+	scene::ISceneNodeAnimator* anim = 
+		smgr->createFlyCircleAnimator (core::vector3df(50,300,0),190.0f, -0.003f);
+	light1->addAnimator(anim);
+	anim->drop();
+
+	// attach billboard to the light
+	scene::ISceneNode* bill = 
+		smgr->addBillboardSceneNode(light1, core::dimension2d(60, 60));
+
+	bill->setMaterialFlag(video::EMF_LIGHTING, false);
+	bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+	bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
+
+ Now the same again, with the second light. The difference is that we + add a particle system to it too. And because the light moves, the particles + of the particlesystem will follow. If you want to know more about how + particle systems are created in Irrlicht, take a look at the specialFx + example.
+ Maybe you will have noticed that we only add 2 lights, this has a simple + reason: The low end version of this material was written in ps1.1 and + vs1.1, which doesn't allow more lights. You could add a third light + to the scene, but it won't be used to shade the walls. But of course, + this will change in future versions of Irrlicht were higher versions + of pixel/vertex shaders will be implemented too.
+
+ + + + +
// add light 2 (gray)
+	scene::ISceneNode* light2 = 
+		smgr->addLightSceneNode(0, core::vector3df(0,0,0), 
+		video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 200.0f);
+
+	// add fly circle animator to light 2
+	anim = smgr->createFlyCircleAnimator (core::vector3df(0,150,0),200.0f); 
+	light2->addAnimator(anim);
+	anim->drop();
+
+	// attach billboard to light
+	bill = smgr->addBillboardSceneNode(light2, core::dimension2d(120, 120));
+	bill->setMaterialFlag(video::EMF_LIGHTING, false);
+	bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
+	bill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
+
+	// add particle system
+	scene::IParticleSystemSceneNode* ps = 
+		smgr->addParticleSystemSceneNode(false, light2);
+
+	ps->setParticleSize(core::dimension2d(30.0f, 40.0f));
+
+	// create and set emitter
+	scene::IParticleEmitter* em = ps->createBoxEmitter(
+		core::aabbox3d(-3,0,-3,3,1,3), 
+		core::vector3df(0.0f,0.03f,0.0f),
+		80,100, 
+		video::SColor(0,255,255,255), video::SColor(0,255,255,255),
+		400,1100);
+	ps->setEmitter(em);
+	em->drop();
+
+	// create and set affector
+	scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();
+	ps->addAffector(paf);
+	paf->drop();
+
+	// adjust some material settings
+	ps->setMaterialFlag(video::EMF_LIGHTING, false);
+	ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
+	ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
+
+
+	MyEventReceiver receiver(room, env, driver);
+	device->setEventReceiver(&receiver);
+
+ Finally, draw everything. That's it.
+
+ + + + +
int lastFPS = -1;
+
+	while(device->run())
+	if (device->isWindowActive())
+	{
+		driver->beginScene(true, true, 0);
+
+		smgr->drawAll();
+		env->drawAll();
+
+		driver->endScene();
+
+		int fps = driver->getFPS();
+
+		if (lastFPS != fps)
+		{
+		  core::stringw str = L"Per pixel lighting example - Irrlicht Engine [";
+		  str += driver->getName();
+		  str += "] FPS:";
+		  str += fps;
+
+		  device->setWindowCaption(str.c_str());
+		  lastFPS = fps;
+		}
+	}
+
+	device->drop();
+	
+	return 0;
+}
+
+
+
+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/Makefile b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/Makefile new file mode 100644 index 0000000..92b529f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 12.TerrainRendering +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.cbp b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.cbp new file mode 100644 index 0000000..a0c93b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.cbp @@ -0,0 +1,56 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.dev b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.dev new file mode 100644 index 0000000..678e536 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 12 Terrain Rendering +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=12.TerrainRendering.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.vcproj b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.vcproj new file mode 100644 index 0000000..2200562 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj new file mode 100644 index 0000000..c68f9ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 12.TerrainRendering + {3A5B74E5-6390-43B0-A459-2793B81FFD31} + TerrainRendering + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/TerrainRendering.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/TerrainRendering.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/TerrainRendering.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/TerrainRendering.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj new file mode 100644 index 0000000..d91cb76 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 12.TerrainRendering + {3A5B74E5-6390-43B0-A459-2793B81FFD31} + TerrainRendering + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/TerrainRendering.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/TerrainRendering.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/TerrainRendering.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/TerrainRendering.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj new file mode 100644 index 0000000..757e2f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj new file mode 100644 index 0000000..8a7f2f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/TerrainRendering_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/main.cpp b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/main.cpp new file mode 100644 index 0000000..d829244 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/main.cpp @@ -0,0 +1,285 @@ +/** Example 012 Terrain Rendering + +This tutorial will briefly show how to use the terrain renderer of Irrlicht. It +will also show the terrain renderer triangle selector to be able to do +collision detection with terrain. + +Note that the Terrain Renderer in Irrlicht is based on Spintz' +GeoMipMapSceneNode, lots of thanks go to him. DeusXL provided a new elegant +simple solution for building larger area on small heightmaps -> terrain +smoothing. + +In the beginning there is nothing special. We include the needed header files +and create an event listener to listen if the user presses a key: The 'W' key +switches to wireframe mode, the 'P' key to pointcloud mode, and the 'D' key +toggles between solid and detail mapped material. +*/ +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + + +class MyEventReceiver : public IEventReceiver +{ +public: + + MyEventReceiver(scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) : + Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true), showDebug(false) + { + Skybox->setVisible(showBox); + Skydome->setVisible(!showBox); + } + + bool OnEvent(const SEvent& event) + { + // check if user presses the key 'W' or 'D' + if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown) + { + switch (event.KeyInput.Key) + { + case irr::KEY_KEY_W: // switch wire frame mode + Terrain->setMaterialFlag(video::EMF_WIREFRAME, + !Terrain->getMaterial(0).Wireframe); + Terrain->setMaterialFlag(video::EMF_POINTCLOUD, false); + return true; + case irr::KEY_KEY_P: // switch wire frame mode + Terrain->setMaterialFlag(video::EMF_POINTCLOUD, + !Terrain->getMaterial(0).PointCloud); + Terrain->setMaterialFlag(video::EMF_WIREFRAME, false); + return true; + case irr::KEY_KEY_D: // toggle detail map + Terrain->setMaterialType( + Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ? + video::EMT_DETAIL_MAP : video::EMT_SOLID); + return true; + case irr::KEY_KEY_S: // toggle skies + showBox=!showBox; + Skybox->setVisible(showBox); + Skydome->setVisible(!showBox); + return true; + case irr::KEY_KEY_X: // toggle debug information + showDebug=!showDebug; + Terrain->setDebugDataVisible(showDebug?scene::EDS_BBOX_ALL:scene::EDS_OFF); + return true; + default: + break; + } + } + + return false; + } + +private: + scene::ISceneNode* Terrain; + scene::ISceneNode* Skybox; + scene::ISceneNode* Skydome; + bool showBox; + bool showDebug; +}; + + +/* +The start of the main function starts like in most other example. We ask the +user for the desired renderer and start it up. This time with the advanced +parameter handling. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device with full flexibility over creation parameters + // you can add more parameters if desired, check irr::SIrrlichtCreationParameters + irr::SIrrlichtCreationParameters params; + params.DriverType=driverType; + params.WindowSize=core::dimension2d(640, 480); + IrrlichtDevice* device = createDeviceEx(params); + + if (device == 0) + return 1; // could not create selected driver. + + + /* + First, we add standard stuff to the scene: A nice irrlicht engine + logo, a small help text, a user controlled camera, and we disable + the mouse cursor. + */ + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* env = device->getGUIEnvironment(); + + driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); + + // add irrlicht logo + env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"), + core::position2d(10,10)); + + //set other font + env->getSkin()->setFont(env->getFont("../../media/fontlucida.png")); + + // add some help text + env->addStaticText( + L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome", + core::rect(10,421,250,475), true, true, 0, -1, true); + + // add camera + scene::ICameraSceneNode* camera = + smgr->addCameraSceneNodeFPS(0,100.0f,1.2f); + + camera->setPosition(core::vector3df(2700*2,255*2,2600*2)); + camera->setTarget(core::vector3df(2397*2,343*2,2700*2)); + camera->setFarValue(42000.0f); + + // disable mouse cursor + device->getCursorControl()->setVisible(false); + + /* + Here comes the terrain renderer scene node: We add it just like any + other scene node to the scene using + ISceneManager::addTerrainSceneNode(). The only parameter we use is a + file name to the heightmap we use. A heightmap is simply a gray scale + texture. The terrain renderer loads it and creates the 3D terrain from + it. + + To make the terrain look more big, we change the scale factor of + it to (40, 4.4, 40). Because we don't have any dynamic lights in the + scene, we switch off the lighting, and we set the file + terrain-texture.jpg as texture for the terrain and detailmap3.jpg as + second texture, called detail map. At last, we set the scale values for + the texture: The first texture will be repeated only one time over the + whole terrain, and the second one (detail map) 20 times. + */ + + // add terrain scene node + scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode( + "../../media/terrain-heightmap.bmp", + 0, // parent node + -1, // node id + core::vector3df(0.f, 0.f, 0.f), // position + core::vector3df(0.f, 0.f, 0.f), // rotation + core::vector3df(40.f, 4.4f, 40.f), // scale + video::SColor ( 255, 255, 255, 255 ), // vertexColor + 5, // maxLOD + scene::ETPS_17, // patchSize + 4 // smoothFactor + ); + + terrain->setMaterialFlag(video::EMF_LIGHTING, false); + + terrain->setMaterialTexture(0, + driver->getTexture("../../media/terrain-texture.jpg")); + terrain->setMaterialTexture(1, + driver->getTexture("../../media/detailmap3.jpg")); + + terrain->setMaterialType(video::EMT_DETAIL_MAP); + + terrain->scaleTexture(1.0f, 20.0f); + + /* + To be able to do collision with the terrain, we create a triangle selector. + If you want to know what triangle selectors do, just take a look into the + collision tutorial. The terrain triangle selector works together with the + terrain. To demonstrate this, we create a collision response animator + and attach it to the camera, so that the camera will not be able to fly + through the terrain. + */ + + // create triangle selector for the terrain + scene::ITriangleSelector* selector + = smgr->createTerrainTriangleSelector(terrain, 0); + terrain->setTriangleSelector(selector); + + // create collision response animator and attach it to the camera + scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator( + selector, camera, core::vector3df(60,100,60), + core::vector3df(0,0,0), + core::vector3df(0,50,0)); + selector->drop(); + camera->addAnimator(anim); + anim->drop(); + + /* If you need access to the terrain data you can also do this directly via the following code fragment. + */ + scene::CDynamicMeshBuffer* buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT); + terrain->getMeshBufferForLOD(*buffer, 0); + video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData(); + // Work on data or get the IndexBuffer with a similar call. + buffer->drop(); // When done drop the buffer again. + + /* + To make the user be able to switch between normal and wireframe mode, + we create an instance of the event receiver from above and let Irrlicht + know about it. In addition, we add the skybox which we already used in + lots of Irrlicht examples and a skydome, which is shown mutually + exclusive with the skybox by pressing 'S'. + */ + + // create skybox and skydome + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode( + driver->getTexture("../../media/irrlicht2_up.jpg"), + driver->getTexture("../../media/irrlicht2_dn.jpg"), + driver->getTexture("../../media/irrlicht2_lf.jpg"), + driver->getTexture("../../media/irrlicht2_rt.jpg"), + driver->getTexture("../../media/irrlicht2_ft.jpg"), + driver->getTexture("../../media/irrlicht2_bk.jpg")); + scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture("../../media/skydome.jpg"),16,8,0.95f,2.0f); + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); + + // create event receiver + MyEventReceiver receiver(terrain, skybox, skydome); + device->setEventReceiver(&receiver); + + /* + That's it, draw everything. + */ + + int lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, 0 ); + + smgr->drawAll(); + env->drawAll(); + + driver->endScene(); + + // display frames per second in window title + int fps = driver->getFPS(); + if (lastFPS != fps) + { + core::stringw str = L"Terrain Renderer - Irrlicht Engine ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + // Also print terrain height of current camera position + // We can use camera position because terrain is located at coordinate origin + str += " Height: "; + str += terrain->getHeight(camera->getAbsolutePosition().X, + camera->getAbsolutePosition().Z); + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + device->drop(); + + return 0; +} + +/* +Now you know how to use terrain in Irrlicht. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/tutorial.html b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/tutorial.html new file mode 100644 index 0000000..f3d765f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/12.TerrainRendering/tutorial.html @@ -0,0 +1,122 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 12. Terrain Rendering
+
+
+
+

This tutorial will briefly show how to use the terrain renderer of + Irrlicht. It will also show the terrain renderer triangle selector to + be able to do collision detection with terrain.

+

The program which is described here will look like this:

+

+


+ Note that the terrain renderer in Irrlicht is based the terrain renderer + by Soconne and the GeoMipMapSceneNode developed by Spinz, lots of thanks + go to them.

+
+
+
+ + + + + + + +
Lets start!
+
+

In the beginning there is nothing special. We include the needed + header files and create an event listener to listen if the user presses + the 'W' key so we can switch to wireframe mode and if he presses 'D' + we toggle to material between solid and detail mapped.

+ + + + +
#include <irrlicht.h>
#include <iostream>
using namespace irr;

#pragma comment(lib, "Irrlicht.lib")

class MyEventReceiver : public IEventReceiver
{
public:
MyEventReceiver(scene::ISceneNode* terrain)
{
// store pointer to terrain so we can change its drawing mode
Terrain = terrain;
}

bool OnEvent(const SEvent& event)
{
// check if user presses the key 'W' or 'D'
if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
{
switch (event.KeyInput.Key)
{
case irr::KEY_KEY_W: // switch wire frame mode
Terrain->setMaterialFlag(video::EMF_WIREFRAME, !Terrain->getMaterial(0).Wireframe);
return true;
case irr::KEY_KEY_D: // toggle detail map
Terrain->setMaterialType(
Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?
video::EMT_DETAIL_MAP : video::EMT_SOLID);
return true;
}
}
return false;
}

private:
scene::ISceneNode* Terrain;
};

+

The start of the main function starts like in most other example. + We ask the user for the desired renderer and start it up.

+ + + + +
int main()
{
// let user select driver type

video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;

printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;

switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
}

// create device
IrrlichtDevice* device = createDevice(driverType, core::dimension2d<s32>(640, 480));

if (device == 0)
return 1; // could not create selected driver.
+

First, we add standard stuff to the scene: A nice irrlicht engine + logo, a small help text, a user controlled camera, and we disable + the mouse cursor.

+ + + + +
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
gui::IGUIEnvironment* env = device->getGUIEnvironment();

driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);

// add irrlicht logo
env->addImage(driver->getTexture("../../media/irrlichtlogoalpha.tga"),
core::position2d<s32>(10,10));
+// add some help text
gui::IGUIStaticText* text = env->addStaticText(
L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map",
core::rect<s32>(10,453,200,475), true, true, 0, -1, true);
+// add camera
scene::ICameraSceneNode* camera =
smgr->addCameraSceneNodeFPS(0,100.0f,1200.0f);
camera->setPosition(core::vector3df(1900*2,255*2,3700*2));
camera->setTarget(core::vector3df(2397*2,343*2,2700*2));
camera->setFarValue(12000.0f);

// disable mouse cursor
device->getCursorControl()->setVisible(false);
+

Here comes the terrain renderer scene node: We add it just like + any other scene node to the scene using ISceneManager::addTerrainSceneNode(). + The only parameter we use is a file name to the heightmap we use. + A heightmap is simply a gray scale texture. The terrain renderer loads + it and creates the 3D terrain from it.
+ To make the terrain look more big, we change the scale factor of it + to (40, 4.4, 40). Because we don't have any dynamic lights in the + scene, we switch off the lighting, and we set the file terrain-texture.jpg + as texture for the terrain and detailmap3.jpg as second texture, called + detail map. At last, we set the scale values for the texture: The + first texture will be repeated only one time over the whole terrain, + and the second one (detail map) 20 times.

+ + + + +
// add terrain scene node
scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(
"../../media/terrain-heightmap.bmp");

terrain->setScale(core::vector3df(40, 4.4f, 40));
terrain->setMaterialFlag(video::EMF_LIGHTING, false);

terrain->setMaterialTexture(0, driver->getTexture("../../media/terrain-texture.jpg"));
terrain->setMaterialTexture(1, driver->getTexture("../../media/detailmap3.jpg"));

terrain->setMaterialType(video::EMT_DETAIL_MAP);
terrain->scaleTexture(1.0f, 20.0f);
+

To be able to do collision with the terrain, we create a triangle + selector. If you want to know what triangle selectors do, just take + a look into the collision tutorial. The terrain triangle selector + works together with the terrain. To demonstrate this, we create a + collision response animator and attach it to the camera, so that the + camera will not be able to fly through the terrain.

+
+ + + + +
// create triangle selector for the terrain	
scene::ITriangleSelector* selector =
smgr->createTerrainTriangleSelector(terrain, 0);
terrain->setTriangleSelector(selector);

// create collision response animator and attach it to the camera
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(60,100,60),
core::vector3df(0,0,0),
core::vector3df(0,50,0));
selector->drop();
camera->addAnimator(anim);
anim->drop();
+

To make the user be able to switch between normal and wireframe mode, + we create an instance of the event reciever from above and let Irrlicht + know about it. In addition, we add the skybox which we already used + in lots of Irrlicht examples.

+ + + + +
// create event receiver
MyEventReceiver receiver(terrain);
device->setEventReceiver(&receiver);

// create skybox
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);

smgr->addSkyBoxSceneNode(
driver->getTexture("../../media/irrlicht2_up.jpg"),
driver->getTexture("../../media/irrlicht2_dn.jpg"),
driver->getTexture("../../media/irrlicht2_lf.jpg"),
driver->getTexture("../../media/irrlicht2_rt.jpg"),
driver->getTexture("../../media/irrlicht2_ft.jpg"),
driver->getTexture("../../media/irrlicht2_bk.jpg"));
+driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
+

That's it, draw everything. Now you know how to use terrain in Irrlicht.

+ + + + +
	int lastFPS = -1;

while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, 0 );

smgr->drawAll();
env->drawAll();

driver->endScene(); +
// display frames per second in window title + int fps = driver->getFPS();

if (lastFPS != fps)
{
core::stringw str = L"Terrain Renderer - Irrlicht Engine [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}

device->drop();

return 0;
}
+

 

+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/Makefile b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/Makefile new file mode 100644 index 0000000..7888648 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 13.RenderToTexture +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.cbp b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.cbp new file mode 100644 index 0000000..db3911e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.dev b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.dev new file mode 100644 index 0000000..0ebdf28 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 13 Render To Texture +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=13.RenderToTexture.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.vcproj b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.vcproj new file mode 100644 index 0000000..8fd8e6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj new file mode 100644 index 0000000..e376054 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 13.RenderToTexture + {0914E5C8-5352-467B-8421-C9EB35BD5596} + RenderToTexture + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/RenderToTexture.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/RenderToTexture.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/RenderToTexture.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/RenderToTexture.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj new file mode 100644 index 0000000..f80b7c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 13.RenderToTexture + {0914E5C8-5352-467B-8421-C9EB35BD5596} + RenderToTexture + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/RenderToTexture.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/RenderToTexture.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/RenderToTexture.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/RenderToTexture.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj new file mode 100644 index 0000000..dc2840c --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj new file mode 100644 index 0000000..7ee213b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/RenderToTexture_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/main.cpp b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/main.cpp new file mode 100644 index 0000000..35ea009 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/main.cpp @@ -0,0 +1,211 @@ +/** Example 013 Render To Texture + +This tutorial shows how to render to a texture using Irrlicht. Render to +texture is a feature with which it is possible to create nice special effects. +In addition, this tutorial shows how to enable specular highlights. + +In the beginning, everything as usual. Include the needed headers, ask the user +for the rendering driver, create the Irrlicht Device: +*/ + +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device and exit if creation failed + + IrrlichtDevice *device = + createDevice(driverType, core::dimension2d(640, 480), + 16, false, false); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* env = device->getGUIEnvironment(); + + /* + Now, we load an animated mesh to be displayed. As in most examples, + we'll take the fairy md2 model. The difference here: We set the + shininess of the model to a value other than 0 which is the default + value. This enables specular highlights on the model if dynamic + lighting is on. The value influences the size of the highlights. + */ + + // load and display animated fairy mesh + + scene::IAnimatedMeshSceneNode* fairy = smgr->addAnimatedMeshSceneNode( + smgr->getMesh("../../media/faerie.md2")); + + if (fairy) + { + fairy->setMaterialTexture(0, + driver->getTexture("../../media/faerie2.bmp")); // set diffuse texture + fairy->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting + fairy->getMaterial(0).Shininess = 20.0f; // set size of specular highlights + fairy->setPosition(core::vector3df(-10,0,-100)); + fairy->setMD2Animation ( scene::EMAT_STAND ); + } + + /* + To make specular highlights appear on the model, we need a dynamic + light in the scene. We add one directly in vicinity of the model. In + addition, to make the model not that dark, we set the ambient light to + gray. + */ + + // add white light + smgr->addLightSceneNode(0, core::vector3df(-15,5,-105), + video::SColorf(1.0f, 1.0f, 1.0f)); + + // set ambient light + smgr->setAmbientLight(video::SColor(0,60,60,60)); + + /* + The next is just some standard stuff: Add a test cube and let it rotate + to make the scene more interesting. The user defined camera and cursor + setup is made later on, right before the render loop. + */ + + // create test cube + scene::ISceneNode* test = smgr->addCubeSceneNode(60); + + // let the cube rotate and set some light settings + scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator( + core::vector3df(0.3f, 0.3f,0)); + + test->setPosition(core::vector3df(-100,0,-100)); + test->setMaterialFlag(video::EMF_LIGHTING, false); // disable dynamic lighting + test->addAnimator(anim); + anim->drop(); + + // set window caption + device->setWindowCaption(L"Irrlicht Engine - Render to Texture and Specular Highlights example"); + + /* + To test out the render to texture feature, we need a render target + texture. These are not like standard textures, but need to be created + first. To create one, we call IVideoDriver::addRenderTargetTexture() + and specify the size of the texture. Please don't use sizes bigger than + the frame buffer for this, because the render target shares the zbuffer + with the frame buffer. + Because we want to render the scene not from the user camera into the + texture, we add another fixed camera to the scene. But before we do all + this, we check if the current running driver is able to render to + textures. If it is not, we simply display a warning text. + */ + + // create render target + video::ITexture* rt = 0; + scene::ICameraSceneNode* fixedCam = 0; + + + if (driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) + { + rt = driver->addRenderTargetTexture(core::dimension2d(256,256), "RTT1"); + test->setMaterialTexture(0, rt); // set material of cube to render target + + // add fixed camera + fixedCam = smgr->addCameraSceneNode(0, core::vector3df(10,10,-80), + core::vector3df(-10,10,-100)); + } + else + { + // create problem text + gui::IGUISkin* skin = env->getSkin(); + gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp"); + if (font) + skin->setFont(font); + + gui::IGUIStaticText* text = env->addStaticText( + L"Your hardware or this renderer is not able to use the "\ + L"render to texture feature. RTT Disabled.", + core::rect(150,20,470,60)); + + text->setOverrideColor(video::SColor(100,255,255,255)); + } + + // add fps camera + scene::ICameraSceneNode* fpsCamera = smgr->addCameraSceneNodeFPS(); + fpsCamera->setPosition(core::vector3df(-50,50,-150)); + + // disable mouse cursor + device->getCursorControl()->setVisible(false); + + /* + Nearly finished. Now we need to draw everything. Every frame, we draw + the scene twice. Once from the fixed camera into the render target + texture and once as usual. When rendering into the render target, we + need to disable the visibility of the test cube, because it has the + render target texture applied to it. That's it, wasn't too complicated + I hope. :) + */ + + int lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, 0); + + if (rt) + { + // draw scene into render target + + // set render target texture + driver->setRenderTarget(rt, true, true, video::SColor(0,0,0,255)); + + // make cube invisible and set fixed camera as active camera + test->setVisible(false); + smgr->setActiveCamera(fixedCam); + + // draw whole scene into render buffer + smgr->drawAll(); + + // set back old render target + // The buffer might have been distorted, so clear it + driver->setRenderTarget(0, true, true, 0); + + // make the cube visible and set the user controlled camera as active one + test->setVisible(true); + smgr->setActiveCamera(fpsCamera); + } + + // draw scene normally + smgr->drawAll(); + env->drawAll(); + + driver->endScene(); + + // display frames per second in window title + int fps = driver->getFPS(); + if (lastFPS != fps) + { + core::stringw str = L"Irrlicht Engine - Render to Texture and Specular Highlights example"; + str += " FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + device->drop(); // drop device + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/tutorial.html b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/tutorial.html new file mode 100644 index 0000000..26340a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/13.RenderToTexture/tutorial.html @@ -0,0 +1,244 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 13. Render to Texture
+
+
+
+

This tutorial shows how to render to a texture using Irrlicht. Render + to texture is a feature with which it is possible to create nice special + effects. In addition, this tutorial shows how to enable specular highlights.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
Lets start!
+
+

In the beginning, everything as usual. Include the needed headers, + ask the user for the rendering driver, create the Irrlicht Device:

+ + + + +
#include <irrlicht.h>
+#include <iostream>
+
+using namespace irr;
+
+#pragma comment(lib, "Irrlicht.lib")
+
+int main()
+{
+	// let user select driver type
+
+	video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
+
+	printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n"); + + char i; + std::cin >> i; + + switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
} + + // create device and exit if creation failed + + IrrlichtDevice *device = + createDevice(driverType, core::dimension2d(640, 480), + 16, false, false); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* env = device->getGUIEnvironment();
+

Now, we load an animated mesh to be displayed. As in most examples, + we'll take the fairy md2 model. The difference here: We set the shininess
+ of the model to a value other than 0 which is the default value. This + enables specular highlights on the model if dynamic lighting is on. + The value influences the size of the highlights.

+ + + + +
// load and display animated fairy mesh
+
+	scene::IAnimatedMeshSceneNode* fairy = smgr->addAnimatedMeshSceneNode(
+		smgr->getMesh("../../media/faerie.md2"));
+
+	if (fairy)
+	{
+		fairy->setMaterialTexture(0, driver->getTexture("../../media/faerie2.bmp")); // set diffuse texture
+		fairy->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting
+		fairy->getMaterial(0).Shininess = 20.0f; // set size of specular highlights
+		fairy->setPosition(core::vector3df(-10,0,-100));
+	}
+

To make specular highlights appear on the model, we need a dynamic + light in the scene. We add one directly in vicinity of the model. + In addition, to make the model not that dark, we set the ambient light + to gray.

+ + + + +
+	// add white light
+	scene::ILightSceneNode* light = smgr->addLightSceneNode(0,
+		core::vector3df(-15,5,-105), video::SColorf(1.0f, 1.0f, 1.0f));
+
+	// set ambient light
+	driver->setAmbientLight(video::SColor(0,60,60,60));
+

The next is just some standard stuff: Add a user controlled camera + to the scene, disable mouse cursor, and add a test cube and let it + rotate to make the scene more interesting.

+ + + + +
+	// add fps camera
+	scene::ICameraSceneNode* fpsCamera = smgr->addCameraSceneNodeFPS();
+	fpsCamera->setPosition(core::vector3df(-50,50,-150));
+
+	// disable mouse cursor
+	device->getCursorControl()->setVisible(false);
+
+	// create test cube
+	scene::ISceneNode* test = smgr->addCubeSceneNode(60);
+
+	// let the cube rotate and set some light settings
+	scene::ISceneNodeAnimator* anim = smgr->createRotationAnimator(
+		core::vector3df(0.3f, 0.3f,0));
+
+	test->setPosition(core::vector3df(-100,0,-100));
+	test->setMaterialFlag(video::EMF_LIGHTING, false); // disable dynamic lighting
+	test->addAnimator(anim);
+	anim->drop();
+
+	// set window caption
+	device->setWindowCaption(L"Irrlicht Engine - Render to Texture and Specular Highlights example");
+

To test out the render to texture feature, we need a render target + texture. These are not like standard textures, but need to be created + first. To create one, we call IVideoDriver::createRenderTargetTexture() + and specify the size of the texture. Please don't use sizes bigger + than the frame buffer for this, because the render target shares the + zbuffer with the frame buffer. And because we want to render the scene + not from the user camera into the texture, we add another, fixed camera + to the scene. But before we do all this, we check if the current running + driver is able to render to textures. If it is not, we simply display + a warning text.

+ + + + +
// create render target
+	video::ITexture* rt = 0;
+	scene::ICameraSceneNode* fixedCam = 0;
+	
+
+	if (driver->queryFeature(video::EVDF_RENDER_TO_TARGET))
+	{
+		rt = driver->createRenderTargetTexture(core::dimension2d(256,256));
+		test->setMaterialTexture(0, rt); // set material of cube to render target
+
+		// add fixed camera
+		fixedCam = smgr->addCameraSceneNode(0, core::vector3df(10,10,-80),
+			core::vector3df(-10,10,-100));
+	}
+	else
+	{
+		// create problem text
+		gui::IGUISkin* skin = env->getSkin();
+		gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+		if (font)
+			skin->setFont(font);
+
+		gui::IGUIStaticText* text = env->addStaticText(
+			L"Your hardware or this renderer is not able to use the "\
+			L"render to texture feature. RTT Disabled.",
+			core::rect(150,20,470,60));
+
+		text->setOverrideColor(video::SColor(100,255,255,255));
+	}
+

Nearly finished. Now we need to draw everything. Every frame, we + draw the scene twice. Once from the fixed camera into the render target + texture and once as usual. When rendering into the render target, + we need to disable the visibilty of the test cube, because it has + the render target texture applied to it.
+ That's, wasn't quite complicated I hope. :)

+ + + + +
while(device->run())
+	if (device->isWindowActive())
+	{
+		driver->beginScene(true, true, 0);
+
+		if (rt)
+		{
+			// draw scene into render target
+			
+			// set render target texture
+			driver->setRenderTarget(rt, true, true, video::SColor(0,0,0,255));     
+
+			// make cube invisible and set fixed camera as active camera
+			test->setVisible(false);
+			smgr->setActiveCamera(fixedCam);
+
+			// draw whole scene into render buffer
+			smgr->drawAll();                 
+
+			// set back old render target
+			driver->setRenderTarget(0);      
+
+			// make the cube visible and set the user controlled camera as active one
+			test->setVisible(true);
+			smgr->setActiveCamera(fpsCamera);
+		}
+		
+		// draw scene normally
+		smgr->drawAll(); 
+		env->drawAll();
+
+		driver->endScene();
+	}
+
+	if (rt)
+		rt->drop(); // drop render target because we created if with a create() method
+
+	device->drop(); // drop device
+	return 0;
+}
+
+ +

 

+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Makefile b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Makefile new file mode 100644 index 0000000..e76f2ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 14.Win32Window +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.cbp b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.cbp new file mode 100644 index 0000000..06f310b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.cbp @@ -0,0 +1,43 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.dev b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.dev new file mode 100644 index 0000000..6192563 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 14 Win32 Window +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=14.Win32Window.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.vcproj b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.vcproj new file mode 100644 index 0000000..c8576c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window.vcproj @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc10.vcxproj new file mode 100644 index 0000000..f18c583 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc10.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 14.Win32Window + {772FBE05-D05A-467B-9842-BEC409EEA8D0} + Win32Window + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Win32Window.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\14.Win32Window.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Win32Window.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win64-VisualStudio\14.Win32Window.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Win32Window.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\14.Win32Window.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Win32Window.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win64-VisualStudio\14.Win32Window.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc11.vcxproj new file mode 100644 index 0000000..07a2fce --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc11.vcxproj @@ -0,0 +1,239 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 14.Win32Window + {772FBE05-D05A-467B-9842-BEC409EEA8D0} + Win32Window + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/Win32Window.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\14.Win32Window.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/Win32Window.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win64-VisualStudio\14.Win32Window.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Win32Window.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\14.Win32Window.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/Win32Window.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win64-VisualStudio\14.Win32Window.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc8.vcproj new file mode 100644 index 0000000..efbf43d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc8.vcproj @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc9.vcproj new file mode 100644 index 0000000..2902fba --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/Win32Window_vc9.vcproj @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/main.cpp b/src/others/irrlicht-1.8.1/examples/14.Win32Window/main.cpp new file mode 100644 index 0000000..33d111e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/main.cpp @@ -0,0 +1,251 @@ +/** Example 014 Win32 Window + +This example only runs under MS Windows and demonstrates that Irrlicht can +render inside a win32 window. MFC and .NET Windows.Forms windows are possible, +too. + +In the beginning, we create a windows window using the windows API. I'm not +going to explain this code, because it is windows specific. See the MSDN or a +windows book for details. +*/ + +#include +#ifndef _IRR_WINDOWS_ +#error Windows only example +#else +#include // this example only runs with windows +#include +#include "driverChoice.h" + +using namespace irr; + +#pragma comment(lib, "irrlicht.lib") + +HWND hOKButton; +HWND hWnd; + +static LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message, + WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_COMMAND: + { + HWND hwndCtl = (HWND)lParam; + int code = HIWORD(wParam); + + if (hwndCtl == hOKButton) + { + DestroyWindow(hWnd); + PostQuitMessage(0); + return 0; + } + } + break; + case WM_DESTROY: + PostQuitMessage(0); + return 0; + + } + + return DefWindowProc(hWnd, message, wParam, lParam); +} + + +/* + Now ask for the driver and create the Windows specific window. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + printf("Select the render window (some dead window may exist too):\n"\ + " (a) Window with button (via CreationParam)\n"\ + " (b) Window with button (via beginScene)\n"\ + " (c) Own Irrlicht window (default behavior)\n"\ + " (otherKey) exit\n\n"); + + char key; + std::cin >> key; + if (key != 'a' && key != 'b' && key != 'c') + return 1; + + HINSTANCE hInstance = 0; + // create dialog + + const char* Win32ClassName = "CIrrlichtWindowsTestDialog"; + + WNDCLASSEX wcex; + wcex.cbSize = sizeof(WNDCLASSEX); + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = (WNDPROC)CustomWndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = DLGWINDOWEXTRA; + wcex.hInstance = hInstance; + wcex.hIcon = NULL; + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW); + wcex.lpszMenuName = 0; + wcex.lpszClassName = Win32ClassName; + wcex.hIconSm = 0; + + RegisterClassEx(&wcex); + + DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION | + WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX; + + int windowWidth = 440; + int windowHeight = 380; + + hWnd = CreateWindow( Win32ClassName, "Irrlicht Win32 window example", + style, 100, 100, windowWidth, windowHeight, + NULL, NULL, hInstance, NULL); + + RECT clientRect; + GetClientRect(hWnd, &clientRect); + windowWidth = clientRect.right; + windowHeight = clientRect.bottom; + + // create ok button + + hOKButton = CreateWindow("BUTTON", "OK - Close", WS_CHILD | WS_VISIBLE | BS_TEXT, + windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, hInstance, NULL); + + // create some text + + CreateWindow("STATIC", "This is Irrlicht running inside a standard Win32 window.\n"\ + "Also mixing with MFC and .NET Windows.Forms is possible.", + WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL); + + // create window to put irrlicht in + + HWND hIrrlichtWindow = CreateWindow("BUTTON", "", + WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, + 50, 80, 320, 220, hWnd, NULL, hInstance, NULL); + video::SExposedVideoData videodata((key=='b')?hIrrlichtWindow:0); + + /* + So now that we have some window, we can create an Irrlicht device + inside of it. We use Irrlicht createEx() function for this. We only + need the handle (HWND) to that window, set it as windowsID parameter + and start up the engine as usual. That's it. + */ + // create irrlicht device in the button window + + irr::SIrrlichtCreationParameters param; + param.DriverType = driverType; + if (key=='a') + param.WindowId = reinterpret_cast(hIrrlichtWindow); + + irr::IrrlichtDevice* device = irr::createDeviceEx(param); + if (!device) + return 1; + + // setup a simple 3d scene + + irr::scene::ISceneManager* smgr = device->getSceneManager(); + video::IVideoDriver* driver = device->getVideoDriver(); + + if (driverType==video::EDT_OPENGL) + { + HDC HDc=GetDC(hIrrlichtWindow); + PIXELFORMATDESCRIPTOR pfd={0}; + pfd.nSize=sizeof(PIXELFORMATDESCRIPTOR); + int pf = GetPixelFormat(HDc); + DescribePixelFormat(HDc, pf, sizeof(PIXELFORMATDESCRIPTOR), &pfd); + pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW; + pfd.cDepthBits=16; + pf = ChoosePixelFormat(HDc, &pfd); + SetPixelFormat(HDc, pf, &pfd); + videodata.OpenGLWin32.HDc = HDc; + videodata.OpenGLWin32.HRc=wglCreateContext(HDc); + wglShareLists((HGLRC)driver->getExposedVideoData().OpenGLWin32.HRc, (HGLRC)videodata.OpenGLWin32.HRc); + } + scene::ICameraSceneNode* cam = smgr->addCameraSceneNode(); + cam->setTarget(core::vector3df(0,0,0)); + + scene::ISceneNodeAnimator* anim = + smgr->createFlyCircleAnimator(core::vector3df(0,15,0), 30.0f); + cam->addAnimator(anim); + anim->drop(); + + scene::ISceneNode* cube = smgr->addCubeSceneNode(20); + + cube->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); + cube->setMaterialTexture(1, driver->getTexture("../../media/water.jpg")); + cube->setMaterialFlag( video::EMF_LIGHTING, false ); + cube->setMaterialType( video::EMT_REFLECTION_2_LAYER ); + + smgr->addSkyBoxSceneNode( + driver->getTexture("../../media/irrlicht2_up.jpg"), + driver->getTexture("../../media/irrlicht2_dn.jpg"), + driver->getTexture("../../media/irrlicht2_lf.jpg"), + driver->getTexture("../../media/irrlicht2_rt.jpg"), + driver->getTexture("../../media/irrlicht2_ft.jpg"), + driver->getTexture("../../media/irrlicht2_bk.jpg")); + + // show and execute dialog + + ShowWindow(hWnd , SW_SHOW); + UpdateWindow(hWnd); + + // do message queue + + /* + Now the only thing missing is the drawing loop using + IrrlichtDevice::run(). We do this as usual. But instead of this, there + is another possibility: You can also simply use your own message loop + using GetMessage, DispatchMessage and whatever. Calling + Device->run() will cause Irrlicht to dispatch messages internally too. + You need not call Device->run() if you want to do your own message + dispatching loop, but Irrlicht will not be able to fetch user input + then and you have to do it on your own using the window messages, + DirectInput, or whatever. + */ + + while (device->run()) + { + driver->beginScene(true, true, 0, videodata); + smgr->drawAll(); + driver->endScene(); + } + + /* + The alternative, own message dispatching loop without Device->run() + would look like this: + */ + + /*MSG msg; + while (true) + { + if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + + if (msg.message == WM_QUIT) + break; + } + + // advance virtual time + device->getTimer()->tick(); + + // draw engine picture + driver->beginScene(true, true, 0, (key=='c')?hIrrlichtWindow:0); + smgr->drawAll(); + driver->endScene(); + }*/ + + device->closeDevice(); + device->drop(); + + return 0; +} +#endif // if windows + +/* +That's it, Irrlicht now runs in your own windows window. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/14.Win32Window/tutorial.html b/src/others/irrlicht-1.8.1/examples/14.Win32Window/tutorial.html new file mode 100644 index 0000000..6c5d5ba --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/14.Win32Window/tutorial.html @@ -0,0 +1,247 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+
+
Tutorial 14. Win32 Window
+
+
+
+

This example only runs in Windows and demonstrates that Irrlicht can + run inside a win32 window. MFC and .NET Windows.Forms windows are possible + too.

+

The program which is described here will look like this:

+


+

+
+
+
+ + + + + + + +
Lets start!
+
+

In the begining, we create a windows window using the windows API. + I'm not going to explain this code, because it is windows specific. + See the MSDN or a windows book for details.

+ + + + +
#include <irrlicht.h>
+#include <windows.h> // this example only runs with windows
+
+using namespace irr;
+
+#pragma comment(lib, "irrlicht.lib")
+
+HWND hOKButton;
+HWND hWnd;
+
+static LRESULT CALLBACK CustomWndProc(HWND hWnd, UINT message,
+    WPARAM wParam, LPARAM lParam)
+{
+	switch (message) 
+	{
+	case WM_COMMAND:
+		{
+			HWND hwndCtl = (HWND)lParam;
+			int code = HIWORD(wParam);
+
+			if (hwndCtl == hOKButton)
+			{
+				DestroyWindow(hWnd);
+				PostQuitMessage(0);
+				return 0;
+			}		
+		}
+		break;
+	case WM_DESTROY:
+		PostQuitMessage(0);
+		return 0;
+
+	}
+
+	return DefWindowProc(hWnd, message, wParam, lParam);
+}
+
+int main()
+//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hpre, LPSTR cmd, int cc)
+{
+	HINSTANCE hInstance = 0;
+	// create dialog
+
+	const char* Win32ClassName = "CIrrlichtWindowsTestDialog";
+
+	WNDCLASSEX wcex;
+	wcex.cbSize			= sizeof(WNDCLASSEX); 
+	wcex.style			= CS_HREDRAW | CS_VREDRAW;
+	wcex.lpfnWndProc	= (WNDPROC)CustomWndProc;
+	wcex.cbClsExtra		= 0;
+	wcex.cbWndExtra		= DLGWINDOWEXTRA; 
+	wcex.hInstance		= hInstance;
+	wcex.hIcon			= NULL;
+	wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
+	wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW);
+	wcex.lpszMenuName	= 0;
+	wcex.lpszClassName	= Win32ClassName;
+	wcex.hIconSm		= 0;
+
+	RegisterClassEx(&wcex);
+
+	DWORD style = WS_SYSMENU | WS_BORDER | WS_CAPTION | 
+		WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX
+		| WS_MINIMIZEBOX | WS_SIZEBOX;
+
+	int windowWidth = 440;
+	int windowHeight = 380;
+
+	hWnd = CreateWindow( Win32ClassName, "Irrlicht Win32 window example",
+		style, 100, 100, windowWidth, windowHeight,
+		NULL, NULL, hInstance, NULL);
+
+	RECT clientRect;
+	GetClientRect(hWnd, &clientRect);
+	windowWidth = clientRect.right;
+	windowHeight = clientRect.bottom;
+
+	// create ok button
+
+	hOKButton = CreateWindow(
+	    "BUTTON", "OK - Close", WS_CHILD | WS_VISIBLE | BS_TEXT, 
+		windowWidth - 160, windowHeight - 40, 150, 30, hWnd, NULL, 
+		hInstance, NULL);
+
+	// create some text
+	
+	CreateWindow("STATIC", 
+        "This is Irrlicht running inside a standard Win32 window.\n"\
+		"Also mixing with MFC and .NET Windows.Forms is possible.",
+		WS_CHILD | WS_VISIBLE, 20, 20, 400, 40, hWnd, NULL, hInstance, NULL);
+
+	// create window to put irrlicht in
+
+	HWND hIrrlichtWindow =
CreateWindow("BUTTON", "", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, + 50, 80, 320, 220, hWnd, NULL, hInstance, NULL); + +
+

So now that we have some window, we can create an Irrlicht device + inside of it. We use Irrlicht createEx() function for this. We only + need the handle (HWND) to that window, set it as windowsID parameter + and start up the engine as usual. That's it.

+ + + + +
	// create irrlicht device in the button window
+
+	irr::SIrrlichtCreationParameters param;
+	param.WindowId = reinterpret_cast(hIrrlichtWindow); // hColorButton
+	param.DriverType = video::EDT_OPENGL;
+
+	irr::IrrlichtDevice* device = irr::createDeviceEx(param);
+	
+	// setup a simple 3d scene
+
+	irr::scene::ISceneManager* smgr = device->getSceneManager();
+	video::IVideoDriver* driver = device->getVideoDriver();
+
+	scene::ICameraSceneNode* cam = smgr->addCameraSceneNode();
+	cam->setTarget(core::vector3df(0,0,0));
+
+	scene::ISceneNodeAnimator* anim =
+	   smgr->createFlyCircleAnimator(core::vector3df(0,10,0), 30.0f);
+	cam->addAnimator(anim);
+	anim->drop();
+
+	scene::ISceneNode* cube = smgr->addCubeSceneNode(25);
+	cube->setMaterialFlag(video::EMF_LIGHTING, false);
+	
+	cube->setMaterialTexture(0, driver->getTexture("../../media/rockwall.bmp"));
+
+	smgr->addSkyBoxSceneNode(
+	driver->getTexture("../../media/irrlicht2_up.jpg"),
+	driver->getTexture("../../media/irrlicht2_dn.jpg"),
+	driver->getTexture("../../media/irrlicht2_lf.jpg"),
+	driver->getTexture("../../media/irrlicht2_rt.jpg"),
+	driver->getTexture("../../media/irrlicht2_ft.jpg"),
+	driver->getTexture("../../media/irrlicht2_bk.jpg"));
+
+	// show and execute dialog
+
+	ShowWindow(hWnd , SW_SHOW);
+	UpdateWindow(hWnd);
+
+

Now the only thing missing is the drawing loop using IrrlichtDevice::run(). + We do this as usual. But instead of this, there is another possibility: + You can also simply use your own message loop using GetMessage, DispatchMessage + and whatever. Calling
+ Device->run() will cause Irrlicht to dispatch messages internally + too. You need not call Device->run() if you want to do your own + message dispatching loop, but Irrlicht will not be able to fetch user + input then and you have to do it on your own using the window messages, + DirectInput, or whatever.

+ + + + +
	while (device->run())
+	{
+		driver->beginScene(true, true, 0);
+		smgr->drawAll();
+		driver->endScene();
+	}
+
+	// the alternative, own message dispatching loop without Device->run() would
+	// look like this:
+
+	/*MSG msg;
+	while (true)
+	{
+		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+		{
+			TranslateMessage(&msg);
+			DispatchMessage(&msg);
+
+			if (msg.message == WM_QUIT)
+				break;
+		}
+		
+		// advance virtual time
+		device->getTimer()->tick();
+
+		// draw engine picture
+		driver->beginScene(true, true, 0);
+		smgr->drawAll();
+		driver->endScene();
+	}*/
+
+	device->closeDevice();
+	device->drop();
+
+	return 0;
+}
+

That's it, Irrlicht now runs in your own windows window.

+
+
+
+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.cbp b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.cbp new file mode 100644 index 0000000..edb64dc --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.cbp @@ -0,0 +1,54 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.dev b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.dev new file mode 100644 index 0000000..b43fe68 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 15 Load .irr File +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=15.LoadIrrFile.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.vcproj b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.vcproj new file mode 100644 index 0000000..fef4626 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj new file mode 100644 index 0000000..ffc91ed --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 15.LoadIrrFile + {78C9F424-523C-49AC-94B7-823AA4A26BF9} + LoadIrrFile + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/LoadIrrFile.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/LoadIrrFile.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/LoadIrrFile.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/LoadIrrFile.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj new file mode 100644 index 0000000..4230696 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 15.LoadIrrFile + {78C9F424-523C-49AC-94B7-823AA4A26BF9} + LoadIrrFile + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/LoadIrrFile.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/LoadIrrFile.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/LoadIrrFile.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/LoadIrrFile.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj new file mode 100644 index 0000000..d78a263 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj new file mode 100644 index 0000000..a7bea1b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/LoadIrrFile_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/Makefile b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/Makefile new file mode 100644 index 0000000..f00e494 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 15.LoadIrrFile +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/main.cpp b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/main.cpp new file mode 100644 index 0000000..42327cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/main.cpp @@ -0,0 +1,173 @@ +/** Example 015 Loading Scenes from .irr Files + +Since version 1.1, Irrlicht is able to save and load +the full scene graph into an .irr file, an xml based +format. There is an editor available to edit +those files, named irrEdit (http://www.ambiera.com/irredit) +which can also be used as world and particle editor. +This tutorial shows how to use .irr files. + +Lets start: Create an Irrlicht device and setup the window. +*/ + +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +int main(int argc, char** argv) +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device and exit if creation failed + + IrrlichtDevice* device = + createDevice(driverType, core::dimension2d(640, 480)); + + if (device == 0) + return 1; // could not create selected driver. + + device->setWindowCaption(L"Load .irr file example"); + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + /* + Now load our .irr file. + .irr files can store the whole scene graph including animators, + materials and particle systems. And there is also the possibility to + store arbitrary user data for every scene node in that file. To keep + this example simple, we are simply loading the scene here. See the + documentation at ISceneManager::loadScene and ISceneManager::saveScene + for more information. So to load and display a complicated huge scene, + we only need a single call to loadScene(). + */ + + // load the scene + if (argc>1) + smgr->loadScene(argv[1]); + else + smgr->loadScene("../../media/example.irr"); + + /* + Now we'll create a camera, and give it a collision response animator + that's built from the mesh nodes in the scene we just loaded. + */ + scene::ICameraSceneNode * camera = smgr->addCameraSceneNodeFPS(0, 50.f, 0.1f); + + // Create a meta triangle selector to hold several triangle selectors. + scene::IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector(); + + /* + Now we will find all the nodes in the scene and create triangle + selectors for all suitable nodes. Typically, you would want to make a + more informed decision about which nodes to performs collision checks + on; you could capture that information in the node name or Id. + */ + core::array nodes; + smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes); // Find all nodes + + for (u32 i=0; i < nodes.size(); ++i) + { + scene::ISceneNode * node = nodes[i]; + scene::ITriangleSelector * selector = 0; + + switch(node->getType()) + { + case scene::ESNT_CUBE: + case scene::ESNT_ANIMATED_MESH: + // Because the selector won't animate with the mesh, + // and is only being used for camera collision, we'll just use an approximate + // bounding box instead of ((scene::IAnimatedMeshSceneNode*)node)->getMesh(0) + selector = smgr->createTriangleSelectorFromBoundingBox(node); + break; + + case scene::ESNT_MESH: + case scene::ESNT_SPHERE: // Derived from IMeshSceneNode + selector = smgr->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node); + break; + + case scene::ESNT_TERRAIN: + selector = smgr->createTerrainTriangleSelector((scene::ITerrainSceneNode*)node); + break; + + case scene::ESNT_OCTREE: + selector = smgr->createOctreeTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node); + break; + + default: + // Don't create a selector for this node type + break; + } + + if(selector) + { + // Add it to the meta selector, which will take a reference to it + meta->addTriangleSelector(selector); + // And drop my reference to it, so that the meta selector owns it. + selector->drop(); + } + } + + /* + Now that the mesh scene nodes have had triangle selectors created and added + to the meta selector, create a collision response animator from that meta selector. + */ + scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator( + meta, camera, core::vector3df(5,5,5), + core::vector3df(0,0,0)); + meta->drop(); // I'm done with the meta selector now + + camera->addAnimator(anim); + anim->drop(); // I'm done with the animator now + + // And set the camera position so that it doesn't start off stuck in the geometry + camera->setPosition(core::vector3df(0.f, 20.f, 0.f)); + + // Point the camera at the cube node, by finding the first node of type ESNT_CUBE + scene::ISceneNode * cube = smgr->getSceneNodeFromType(scene::ESNT_CUBE); + if(cube) + camera->setTarget(cube->getAbsolutePosition()); + + /* + That's it. Draw everything and finish as usual. + */ + + int lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(0,200,200,200)); + smgr->drawAll(); + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw str = L"Load Irrlicht File example - Irrlicht Engine ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + + } + + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html new file mode 100644 index 0000000..e3e4a6b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html @@ -0,0 +1,129 @@ + + +Irrlicht Engine Tutorial + + + + +
+ + + + + + + + +
+ Tutorial 15. Load .irr File
+

Since version 1.1, Irrlicht is able to save and load the full scene + graph into an .irr file, an xml based format. There is also an editor + available to edit those files, named irrEdit on http://www.ambiera.com/irredit, + which can also be used as world and particle editor. This tutorial shows + how to use .irr files.

+


+

+
+
+ + + + + + + +
+ Lets start!
+

Lets start: Create an Irrlicht device and setup the window.

+ + + + +
#include 
+#include 
+using namespace irr;
+
+#pragma comment(lib, "Irrlicht.lib")
+
+int main()
+{
+	// ask user for driver
+
+	video::E_DRIVER_TYPE driverType;
+
+	printf("Please select the driver you want for this example:\n"\
+		" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+		" (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
+		" (f) NullDevice\n (otherKey) exit\n\n");
+
+	char i;
+	std::cin >> i;
+
+	switch(i)
+	{
+		case 'a': driverType = video::EDT_DIRECT3D9;break;
+		case 'b': driverType = video::EDT_DIRECT3D8;break;
+		case 'c': driverType = video::EDT_OPENGL;   break;
+		case 'd': driverType = video::EDT_SOFTWARE; break;
+		case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
+		case 'f': driverType = video::EDT_NULL;     break;
+		default: return 1;
+	}	
+
+	// create device and exit if creation failed
+
+	IrrlichtDevice* device =
+		createDevice(driverType, core::dimension2d(640, 480));
+
+	if (device == 0)
+		return 1; // could not create selected driver.
+
+	device->setWindowCaption(L"Load .irr file example");
+
+	video::IVideoDriver* driver = device->getVideoDriver();
+	scene::ISceneManager* smgr = device->getSceneManager();
+
+

Now load our .irr file. .irr files can store the whole scene graph + including animators, materials and particle systems. And there is also + the possibility to store arbitrary user data for every scene node in + that file. To keep this example simple, we are simply loading the scene + here. See the documentation at ISceneManager::loadScene and ISceneManager::saveScene + for more information. So to load and display a complicated huge scene, + we only need a single call to loadScene().

+ + + + +
// load the scene
smgr->loadScene("../../media/example.irr");
+

That was it already. Now add a camera and draw the scene.

+ + + + +
	// add a user controlled camera
+
+	smgr->addCameraSceneNodeFPS();
+
+	// and draw everything.
+	
+	while(device->run())
+	if (device->isWindowActive())
+	{
+		driver->beginScene(true, true, video::SColor(0,200,200,200));
+		smgr->drawAll();
+		driver->endScene();
+	}
+
+	device->drop();
+	
+	return 0;
+}
+
+ +
+

 

+
+

 

+

 

+ + diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Makefile b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Makefile new file mode 100644 index 0000000..952b309 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 16.Quake3MapShader +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.cbp b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.cbp new file mode 100644 index 0000000..6fc6bb3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.cbp @@ -0,0 +1,56 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.dev b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.dev new file mode 100644 index 0000000..14ebb42 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 16 Quake3 Map Shader +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=16.Quake3MapShader.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.vcproj b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.vcproj new file mode 100644 index 0000000..de658b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader.vcproj @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj new file mode 100644 index 0000000..ea09774 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj @@ -0,0 +1,190 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 16.Quake3MapShader + {EB3B38EA-5CE7-4983-845B-880661E69D09} + 16.Quake3MapShader + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + Cdecl + + + ..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + Cdecl + + + ..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj new file mode 100644 index 0000000..1bd3735 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc11.vcxproj @@ -0,0 +1,194 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 16.Quake3MapShader + {EB3B38EA-5CE7-4983-845B-880661E69D09} + 16.Quake3MapShader + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + Cdecl + + + ..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + Cdecl + + + ..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj new file mode 100644 index 0000000..65fc83c --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc8.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj new file mode 100644 index 0000000..a533ce0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/Quake3MapShader_vc9.vcproj @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/main.cpp b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/main.cpp new file mode 100644 index 0000000..6391705 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/16.Quake3MapShader/main.cpp @@ -0,0 +1,389 @@ +/** Example 016 Quake3 Map Shader Support + +This Tutorial shows how to load a Quake 3 map into the +engine, create a SceneNode for optimizing the speed of +rendering and how to create a user controlled camera. + +Lets start like the HelloWorld example: We include +the irrlicht header files and an additional file to be able +to ask the user for a driver type using the console. +*/ +#include +#include "driverChoice.h" + +/* + define which Quake3 Level should be loaded +*/ +#define IRRLICHT_QUAKE3_ARENA +//#define ORIGINAL_QUAKE3_ARENA +//#define CUSTOM_QUAKE3_ARENA +//#define SHOW_SHADER_NAME + +#ifdef ORIGINAL_QUAKE3_ARENA + #define QUAKE3_STORAGE_FORMAT addFolderFileArchive + #define QUAKE3_STORAGE_1 "/baseq3/" + #ifdef CUSTOM_QUAKE3_ARENA + #define QUAKE3_STORAGE_2 "/cf/" + #define QUAKE3_MAP_NAME "maps/cf.bsp" + #else + #define QUAKE3_MAP_NAME "maps/q3dm8.bsp" + #endif +#endif + +#ifdef IRRLICHT_QUAKE3_ARENA + #define QUAKE3_STORAGE_FORMAT addFileArchive + #define QUAKE3_STORAGE_1 "../../media/map-20kdm2.pk3" + #define QUAKE3_MAP_NAME "maps/20kdm2.bsp" +#endif + +using namespace irr; +using namespace scene; + +/* +Again, to be able to use the Irrlicht.DLL file, we need to link with the +Irrlicht.lib. We could set this option in the project settings, but +to make it easy, we use a pragma comment lib: +*/ +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + + +/* +A class to produce a series of screenshots +*/ +class CScreenShotFactory : public IEventReceiver +{ +public: + + CScreenShotFactory( IrrlichtDevice *device, const c8 * templateName, ISceneNode* node ) + : Device(device), Number(0), FilenameTemplate(templateName), Node(node) + { + FilenameTemplate.replace ( '/', '_' ); + FilenameTemplate.replace ( '\\', '_' ); + } + + bool OnEvent(const SEvent& event) + { + // check if user presses the key F9 + if ((event.EventType == EET_KEY_INPUT_EVENT) && + event.KeyInput.PressedDown) + { + if (event.KeyInput.Key == KEY_F9) + { + video::IImage* image = Device->getVideoDriver()->createScreenShot(); + if (image) + { + c8 buf[256]; + snprintf(buf, 256, "%s_shot%04d.jpg", + FilenameTemplate.c_str(), + ++Number); + Device->getVideoDriver()->writeImageToFile(image, buf, 85 ); + image->drop(); + } + } + else + if (event.KeyInput.Key == KEY_F8) + { + if (Node->isDebugDataVisible()) + Node->setDebugDataVisible(scene::EDS_OFF); + else + Node->setDebugDataVisible(scene::EDS_BBOX_ALL); + } + } + return false; + } + +private: + IrrlichtDevice *Device; + u32 Number; + core::stringc FilenameTemplate; + ISceneNode* Node; +}; + + +/* +Ok, lets start. +*/ + +int IRRCALLCONV main(int argc, char* argv[]) +{ + /* + Like in the HelloWorld example, we create an IrrlichtDevice with + createDevice(). The difference now is that we ask the user to select + which hardware accelerated driver to use. The Software device would be + too slow to draw a huge Quake 3 map, but just for the fun of it, we make + this decision possible too. + */ + + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device and exit if creation failed + const core::dimension2du videoDim(800,600); + + IrrlichtDevice *device = createDevice(driverType, videoDim, 32, false ); + + if (device == 0) + return 1; // could not create selected driver. + + const char* mapname=0; + if (argc>2) + mapname = argv[2]; + else + mapname = QUAKE3_MAP_NAME; + + /* + Get a pointer to the video driver and the SceneManager so that + we do not always have to write device->getVideoDriver() and + device->getSceneManager(). + */ + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* gui = device->getGUIEnvironment(); + + //! add our private media directory to the file system + device->getFileSystem()->addFileArchive("../../media/"); + + /* + To display the Quake 3 map, we first need to load it. Quake 3 maps + are packed into .pk3 files, which are nothing other than .zip files. + So we add the .pk3 file to our FileSystem. After it was added, + we are able to read from the files in that archive as they would + directly be stored on disk. + */ + if (argc>2) + device->getFileSystem()->QUAKE3_STORAGE_FORMAT(argv[1]); + else + device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_1); +#ifdef QUAKE3_STORAGE_2 + device->getFileSystem()->QUAKE3_STORAGE_FORMAT(QUAKE3_STORAGE_2); +#endif + + // Quake3 Shader controls Z-Writing + smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); + + /* + Now we can load the mesh by calling getMesh(). We get a pointer returned + to a IAnimatedMesh. As you know, Quake 3 maps are not really animated, + they are only a huge chunk of static geometry with some materials + attached. Hence the IAnimated mesh consists of only one frame, + so we get the "first frame" of the "animation", which is our quake level + and create an Octree scene node with it, using addOctreeSceneNode(). + The Octree optimizes the scene a little bit, trying to draw only geometry + which is currently visible. An alternative to the Octree would be a + AnimatedMeshSceneNode, which would draw always the complete geometry of + the mesh, without optimization. Try it out: Write addAnimatedMeshSceneNode + instead of addOctreeSceneNode and compare the primitives drawn by the + video driver. (There is a getPrimitiveCountDrawed() method in the + IVideoDriver class). Note that this optimization with the Octree is only + useful when drawing huge meshes consisting of lots of geometry. + */ + scene::IQ3LevelMesh* const mesh = + (scene::IQ3LevelMesh*) smgr->getMesh(mapname); + + /* + add the geometry mesh to the Scene ( polygon & patches ) + The Geometry mesh is optimised for faster drawing + */ + scene::ISceneNode* node = 0; + if (mesh) + { + scene::IMesh * const geometry = mesh->getMesh(quake3::E_Q3_MESH_GEOMETRY); + node = smgr->addOctreeSceneNode(geometry, 0, -1, 4096); + } + + // create an event receiver for making screenshots + CScreenShotFactory screenshotFactory(device, mapname, node); + device->setEventReceiver(&screenshotFactory); + + /* + now construct SceneNodes for each Shader + The Objects are stored in the quake mesh scene::E_Q3_MESH_ITEMS + and the Shader ID is stored in the MaterialParameters + mostly dark looking skulls and moving lava.. or green flashing tubes? + */ + if ( mesh ) + { + // the additional mesh can be quite huge and is unoptimized + const scene::IMesh * const additional_mesh = mesh->getMesh(quake3::E_Q3_MESH_ITEMS); + +#ifdef SHOW_SHADER_NAME + gui::IGUIFont *font = device->getGUIEnvironment()->getFont("../../media/fontlucida.png"); + u32 count = 0; +#endif + + for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount(); ++i ) + { + const IMeshBuffer* meshBuffer = additional_mesh->getMeshBuffer(i); + const video::SMaterial& material = meshBuffer->getMaterial(); + + // The ShaderIndex is stored in the material parameter + const s32 shaderIndex = (s32) material.MaterialTypeParam2; + + // the meshbuffer can be rendered without additional support, or it has no shader + const quake3::IShader *shader = mesh->getShader(shaderIndex); + if (0 == shader) + { + continue; + } + + // we can dump the shader to the console in its + // original but already parsed layout in a pretty + // printers way.. commented out, because the console + // would be full... + // quake3::dumpShader ( Shader ); + + node = smgr->addQuake3SceneNode(meshBuffer, shader); + +#ifdef SHOW_SHADER_NAME + count += 1; + core::stringw name( node->getName() ); + node = smgr->addBillboardTextSceneNode( + font, name.c_str(), node, + core::dimension2d(80.0f, 8.0f), + core::vector3df(0, 10, 0)); +#endif + } + } + + /* + Now we only need a Camera to look at the Quake 3 map. And we want to + create a user controlled camera. There are some different cameras + available in the Irrlicht engine. For example the Maya Camera which can + be controlled comparable to the camera in Maya: Rotate with left mouse + button pressed, Zoom with both buttons pressed, translate with right + mouse button pressed. This could be created with + addCameraSceneNodeMaya(). But for this example, we want to create a + camera which behaves like the ones in first person shooter games (FPS). + */ + + scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); + + /* + so we need a good starting Position in the level. + we can ask the Quake3 Loader for all entities with class_name + "info_player_deathmatch" + we choose a random launch + */ + if ( mesh ) + { + quake3::tQ3EntityList &entityList = mesh->getEntityList(); + + quake3::IEntity search; + search.name = "info_player_deathmatch"; + + s32 index = entityList.binary_search(search); + if (index >= 0) + { + s32 notEndList; + do + { + const quake3::SVarGroup *group = entityList[index].getGroup(1); + + u32 parsepos = 0; + const core::vector3df pos = + quake3::getAsVector3df(group->get("origin"), parsepos); + + parsepos = 0; + const f32 angle = quake3::getAsFloat(group->get("angle"), parsepos); + + core::vector3df target(0.f, 0.f, 1.f); + target.rotateXZBy(angle); + + camera->setPosition(pos); + camera->setTarget(pos + target); + + ++index; +/* + notEndList = ( index < (s32) entityList.size () && + entityList[index].name == search.name && + (device->getTimer()->getRealTime() >> 3 ) & 1 + ); +*/ + notEndList = index == 2; + } while ( notEndList ); + } + } + + /* + The mouse cursor needs not to be visible, so we make it invisible. + */ + + device->getCursorControl()->setVisible(false); + + // load the engine logo + gui->addImage(driver->getTexture("irrlichtlogo2.png"), + core::position2d(10, 10)); + + // show the driver logo + const core::position2di pos(videoDim.Width - 128, videoDim.Height - 64); + + switch ( driverType ) + { + case video::EDT_BURNINGSVIDEO: + gui->addImage(driver->getTexture("burninglogo.png"), pos); + break; + case video::EDT_OPENGL: + gui->addImage(driver->getTexture("opengllogo.png"), pos); + break; + case video::EDT_DIRECT3D8: + case video::EDT_DIRECT3D9: + gui->addImage(driver->getTexture("directxlogo.png"), pos); + break; + } + + /* + We have done everything, so lets draw it. We also write the current + frames per second and the drawn primitives to the caption of the + window. The 'if (device->isWindowActive())' line is optional, but + prevents the engine render to set the position of the mouse cursor + after task switching when other program are active. + */ + int lastFPS = -1; + + while(device->run()) + if (device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(255,20,20,40)); + smgr->drawAll(); + gui->drawAll(); + driver->endScene(); + + int fps = driver->getFPS(); + //if (lastFPS != fps) + { + io::IAttributes * const attr = smgr->getParameters(); + core::stringw str = L"Q3 ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; +#ifdef _IRR_SCENEMANAGER_DEBUG + str += " Cull:"; + str += attr->getAttributeAsInt("calls"); + str += "/"; + str += attr->getAttributeAsInt("culled"); + str += " Draw: "; + str += attr->getAttributeAsInt("drawn_solid"); + str += "/"; + str += attr->getAttributeAsInt("drawn_transparent"); + str += "/"; + str += attr->getAttributeAsInt("drawn_transparent_effect"); +#endif + device->setWindowCaption(str.c_str()); + lastFPS = fps; + } + } + + /* + In the end, delete the Irrlicht device. + */ + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj new file mode 100644 index 0000000..be07354 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v8.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj new file mode 100644 index 0000000..acdc249 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_v9.vcproj @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj new file mode 100644 index 0000000..e46cb0c --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 17.HelloWorld_Mobile + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B} + My17HelloWorldforWindowsMobileonPC + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj new file mode 100644 index 0000000..27b8ed4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc11.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 17.HelloWorld_Mobile + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B} + My17HelloWorldforWindowsMobileonPC + Win32Proj + + + + Application + Unicode + true + v110 + + + Application + Unicode + true + v110 + + + Application + Unicode + v110 + + + Application + Unicode + v110 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln new file mode 100644 index 0000000..31932b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.sln @@ -0,0 +1,33 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_mobile", "HelloWorld_mobile.vcproj", "{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\..\source\Irrlicht\Irrlicht_mobile6.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj new file mode 100644 index 0000000..dcaca9e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/HelloWorld_mobile.vcproj @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/main.cpp b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/main.cpp new file mode 100644 index 0000000..4fc15cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/17.HelloWorld_Mobile/main.cpp @@ -0,0 +1,503 @@ +/** Example 017 Helloworld mobile + This example show Hello World for Windows mobile. + It compiles on other platform too. The only differences between the original + examples are. You need a GUI, because otherwise you can't quit the application. + You need a Filesystem, which is relative based to your executable. +*/ + +#include + +#if defined ( _IRR_WINDOWS_ ) + #include +#endif + +using namespace irr; +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#pragma comment(lib, "Irrlicht.lib") + +class EventReceiver_basic : public IEventReceiver +{ +private: + IrrlichtDevice *Device; +public: + EventReceiver_basic ( IrrlichtDevice *device ): Device ( device ) {} + + virtual bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT) + { + s32 id = event.GUIEvent.Caller->getID(); + + switch(event.GUIEvent.EventType) + { + case EGET_BUTTON_CLICKED: + if (id == 2) + { + Device->closeDevice(); + return true; + } break; + } + } + + return false; + } +}; + +class CSampleSceneNode : public ISceneNode +{ + aabbox3d Box; + S3DVertex Vertices[4]; + SMaterial Material; +public: + + CSampleSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) + : ISceneNode(parent, mgr, id) + { + Material.Wireframe = false; + Material.Lighting = false; + + Vertices[0] = S3DVertex(0,0,10, 1,1,0, SColor(255,0,255,255), 0, 1); + Vertices[1] = S3DVertex(10,0,-10, 1,0,0, SColor(255,255,0,255), 1, 1); + Vertices[2] = S3DVertex(0,20,0, 0,1,1, SColor(255,255,255,0), 1, 0); + Vertices[3] = S3DVertex(-10,0,-10, 0,0,1, SColor(255,0,255,0), 0, 0); + Box.reset(Vertices[0].Pos); + for (s32 i=1; i<4; ++i) + Box.addInternalPoint(Vertices[i].Pos); + } + virtual void OnRegisterSceneNode() + { + if (IsVisible) + SceneManager->registerNodeForRendering(this); + + ISceneNode::OnRegisterSceneNode(); + } + + virtual void render() + { + u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 }; + IVideoDriver* driver = SceneManager->getVideoDriver(); + + driver->setMaterial(Material); + driver->setTransform(ETS_WORLD, AbsoluteTransformation); + driver->drawIndexedTriangleList(&Vertices[0], 4, &indices[0], 4); + } + + virtual const aabbox3d& getBoundingBox() const + { + return Box; + } + + virtual u32 getMaterialCount() + { + return 1; + } + + virtual SMaterial& getMaterial(u32 i) + { + return Material; + } +}; + +/*! + Startup a Windows Mobile Device +*/ +IrrlichtDevice *startup() +{ + // both software and burnings video can be used + E_DRIVER_TYPE driverType = EDT_SOFTWARE; // EDT_BURNINGSVIDEO; + + // create device + IrrlichtDevice *device = 0; + +#if defined (_IRR_USE_WINDOWS_CE_DEVICE_) + // set to standard mobile fullscreen 240x320 + device = createDevice(driverType, dimension2d(240, 320), 16, true ); +#else + // on PC. use window mode + device = createDevice(driverType, dimension2d(240, 320), 16, false ); +#endif + if ( 0 == device ) + return 0; + + IVideoDriver* driver = device->getVideoDriver(); + ISceneManager* smgr = device->getSceneManager(); + IGUIEnvironment* guienv = device->getGUIEnvironment(); + + // set the filesystem relative to the executable +#if defined (_IRR_WINDOWS_) + { + wchar_t buf[255]; + GetModuleFileNameW ( 0, buf, 255 ); + + io::path base = buf; + base = base.subString ( 0, base.findLast ( '\\' ) + 1 ); + device->getFileSystem()->addFileArchive ( base ); + } +#endif + + IGUIStaticText *text = guienv->addStaticText(L"FPS: 25", + rect(140,15,200,30), false, false, 0, 100 ); + + guienv->addButton(core::rect(200,10,238,30), 0, 2, L"Quit"); + + // add irrlicht logo + guienv->addImage(driver->getTexture("../../media/irrlichtlogo3.png"), + core::position2d(0,-2)); + return device; +} + +/*! +*/ +int run ( IrrlichtDevice *device ) +{ + while(device->run()) + if (device->isWindowActive()) + { + device->getVideoDriver()->beginScene(true, true, SColor(0,100,100,100)); + device->getSceneManager()->drawAll(); + device->getGUIEnvironment()->drawAll(); + device->getVideoDriver()->endScene (); + + IGUIElement *stat = device->getGUIEnvironment()-> + getRootGUIElement()->getElementFromId ( 100 ); + if ( stat ) + { + stringw str = L"FPS: "; + str += (s32)device->getVideoDriver()->getFPS(); + + stat->setText ( str.c_str() ); + } + } + + device->drop(); + return 0; +} + +/*! +*/ +int example_customscenenode() +{ + // create device + IrrlichtDevice *device = startup(); + if (device == 0) + return 1; // could not create selected driver. + + // create engine and camera + EventReceiver_basic receiver(device); + device->setEventReceiver(&receiver); + + IVideoDriver* driver = device->getVideoDriver(); + ISceneManager* smgr = device->getSceneManager(); + IGUIEnvironment* guienv = device->getGUIEnvironment(); + + + smgr->addCameraSceneNode(0, vector3df(0,-40,0), vector3df(0,0,0)); + + CSampleSceneNode *myNode = + new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666); + + ISceneNodeAnimator* anim = + smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f)); + + if(anim) + { + myNode->addAnimator(anim); + anim->drop(); + anim = 0; // As I shouldn't refer to it again, ensure that I can't + } + + myNode->drop(); + myNode = 0; // As I shouldn't refer to it again, ensure that I can't + + return run ( device ); +} + +class EventReceiver_terrain : public IEventReceiver +{ +public: + + EventReceiver_terrain(IrrlichtDevice *device, scene::ISceneNode* terrain, scene::ISceneNode* skybox, scene::ISceneNode* skydome) : + Device ( device ), Terrain(terrain), Skybox(skybox), Skydome(skydome), showBox(true) + { + Skybox->setVisible(true); + Skydome->setVisible(false); + } + + bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT) + { + s32 id = event.GUIEvent.Caller->getID(); + + switch(event.GUIEvent.EventType) + { + case EGET_BUTTON_CLICKED: + if (id == 2) + { + Device->closeDevice(); + return true; + } break; + } + } + + // check if user presses the key 'W' or 'D' + if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown) + { + switch (event.KeyInput.Key) + { + case irr::KEY_KEY_W: // switch wire frame mode + Terrain->setMaterialFlag(video::EMF_WIREFRAME, + !Terrain->getMaterial(0).Wireframe); + Terrain->setMaterialFlag(video::EMF_POINTCLOUD, false); + return true; + case irr::KEY_KEY_P: // switch wire frame mode + Terrain->setMaterialFlag(video::EMF_POINTCLOUD, + !Terrain->getMaterial(0).PointCloud); + Terrain->setMaterialFlag(video::EMF_WIREFRAME, false); + return true; + case irr::KEY_KEY_D: // toggle detail map + Terrain->setMaterialType( + Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ? + video::EMT_DETAIL_MAP : video::EMT_SOLID); + return true; + case irr::KEY_KEY_S: // toggle skies + showBox=!showBox; + Skybox->setVisible(showBox); + Skydome->setVisible(!showBox); + return true; + default: + break; + } + } + + return false; + } + +private: + IrrlichtDevice *Device; + scene::ISceneNode* Terrain; + scene::ISceneNode* Skybox; + scene::ISceneNode* Skydome; + bool showBox; +}; + + +/* +The start of the main function starts like in most other example. We ask the user +for the desired renderer and start it up. This time with the advanced parameter handling. +*/ +int example_terrain() +{ + // create device + IrrlichtDevice *device = startup(); + if (device == 0) + return 1; // could not create selected driver. + + /* + First, we add standard stuff to the scene: A nice irrlicht engine + logo, a small help text, a user controlled camera, and we disable + the mouse cursor. + */ + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* env = device->getGUIEnvironment(); + + + //set other font + //env->getSkin()->setFont(env->getFont("../../media/fontlucida.png")); + + // add some help text + env->addStaticText( + L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map\nPress 'S' to toggle skybox/skydome", + core::rect(5,250,235,320), true, true, 0, -1, true); + + // add camera + scene::ICameraSceneNode* camera = + smgr->addCameraSceneNodeFPS(0,100.0f,1.2f); + + camera->setPosition(core::vector3df(2700*2,255*2,2600*2)); + camera->setTarget(core::vector3df(2397*2,343*2,2700*2)); + camera->setFarValue(42000.0f); + + // disable mouse cursor + device->getCursorControl()->setVisible(false); + + /* + Here comes the terrain renderer scene node: We add it just like any + other scene node to the scene using + ISceneManager::addTerrainSceneNode(). The only parameter we use is a + file name to the heightmap we use. A heightmap is simply a gray scale + texture. The terrain renderer loads it and creates the 3D terrain from + it. + + To make the terrain look more big, we change the scale factor of + it to (40, 4.4, 40). Because we don't have any dynamic lights in the + scene, we switch off the lighting, and we set the file + terrain-texture.jpg as texture for the terrain and detailmap3.jpg as + second texture, called detail map. At last, we set the scale values for + the texture: The first texture will be repeated only one time over the + whole terrain, and the second one (detail map) 20 times. + */ + + // add terrain scene node + scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode( + "../../media/terrain-heightmap.bmp", + 0, // parent node + -1, // node id + core::vector3df(0.f, 0.f, 0.f), // position + core::vector3df(0.f, 0.f, 0.f), // rotation + core::vector3df(40.f, 4.4f, 40.f), // scale + video::SColor ( 255, 255, 255, 255 ), // vertexColor + 5, // maxLOD + scene::ETPS_17, // patchSize + 4 // smoothFactor + ); + + if ( terrain ) + { + terrain->setMaterialFlag(video::EMF_LIGHTING, false); + + terrain->setMaterialTexture(0, + driver->getTexture("../../media/terrain-texture.jpg")); + terrain->setMaterialTexture(1, + driver->getTexture("../../media/detailmap3.jpg")); + + terrain->setMaterialType(video::EMT_DETAIL_MAP); + + terrain->scaleTexture(1.0f, 20.0f); + //terrain->setDebugDataVisible ( true ); + + /* + To be able to do collision with the terrain, we create a triangle selector. + If you want to know what triangle selectors do, just take a look into the + collision tutorial. The terrain triangle selector works together with the + terrain. To demonstrate this, we create a collision response animator + and attach it to the camera, so that the camera will not be able to fly + through the terrain. + */ + + // create triangle selector for the terrain + scene::ITriangleSelector* selector + = smgr->createTerrainTriangleSelector(terrain, 0); + terrain->setTriangleSelector(selector); + + // create collision response animator and attach it to the camera + scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator( + selector, camera, core::vector3df(60,100,60), + core::vector3df(0,0,0), + core::vector3df(0,50,0)); + selector->drop(); + camera->addAnimator(anim); + anim->drop(); + + /* If you need access to the terrain data you can also do this directly via the following code fragment. + */ + scene::CDynamicMeshBuffer* buffer = new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT); + terrain->getMeshBufferForLOD(*buffer, 0); + video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData(); + // Work on data or get the IndexBuffer with a similar call. + buffer->drop(); // When done drop the buffer again. + } + + /* + To make the user be able to switch between normal and wireframe mode, + we create an instance of the event receiver from above and let Irrlicht + know about it. In addition, we add the skybox which we already used in + lots of Irrlicht examples and a skydome, which is shown mutually + exclusive with the skybox by pressing 'S'. + */ + + // create skybox and skydome + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + scene::ISceneNode* skybox=smgr->addSkyBoxSceneNode( + driver->getTexture("../../media/irrlicht2_up.jpg"), + driver->getTexture("../../media/irrlicht2_dn.jpg"), + driver->getTexture("../../media/irrlicht2_lf.jpg"), + driver->getTexture("../../media/irrlicht2_rt.jpg"), + driver->getTexture("../../media/irrlicht2_ft.jpg"), + driver->getTexture("../../media/irrlicht2_bk.jpg")); + scene::ISceneNode* skydome=smgr->addSkyDomeSceneNode(driver->getTexture("../../media/skydome.jpg"),16,8,0.95f,2.0f); + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); + + // create event receiver + EventReceiver_terrain receiver( device, terrain, skybox, skydome); + device->setEventReceiver(&receiver); + + return run ( device ); +} + +/* +*/ +int example_helloworld() +{ + // create device + IrrlichtDevice *device = startup(); + if (device == 0) + return 1; // could not create selected driver. + + IVideoDriver* driver = device->getVideoDriver(); + ISceneManager* smgr = device->getSceneManager(); + IGUIEnvironment* guienv = device->getGUIEnvironment(); + + IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2"); + if (!mesh) + { + device->drop(); + return 1; + } + IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); + + /* + To let the mesh look a little bit nicer, we change its material. We + disable lighting because we do not have a dynamic light in here, and + the mesh would be totally black otherwise. Then we set the frame loop, + such that the predefined STAND animation is used. And last, we apply a + texture to the mesh. Without it the mesh would be drawn using only a + color. + */ + if (node) + { + node->setMaterialFlag(EMF_LIGHTING, false); + node->setMD2Animation(scene::EMAT_STAND); + node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") ); + } + + /* + To look at the mesh, we place a camera into 3d space at the position + (0, 30, -40). The camera looks from there to (0,5,0), which is + approximately the place where our md2 model is. + */ + smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0)); + + EventReceiver_basic receiver(device); + device->setEventReceiver(&receiver); + + return run ( device ); + +} + +#if defined (_IRR_USE_WINDOWS_CE_DEVICE_) + #pragma comment(linker, "/subsystem:WINDOWSCE /ENTRY:main") +#elif defined (_IRR_WINDOWS_) + #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") +#endif + +/* +*/ +int main() +{ + example_helloworld (); + example_customscenenode(); + //example_terrain(); +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/Makefile b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/Makefile new file mode 100644 index 0000000..5ad6913 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 18.SplitScreen +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.cbp b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.cbp new file mode 100644 index 0000000..93ff1d8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.dev b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.dev new file mode 100644 index 0000000..cd843c6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 18 SplitScreen +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=18.SplitScreen.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.vcproj b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.vcproj new file mode 100644 index 0000000..46cb6b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc10.vcxproj new file mode 100644 index 0000000..7db11fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc10.vcxproj @@ -0,0 +1,190 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 18.SplitScreen + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0} + 18.SplitScreen + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SplitScreen.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SplitScreen.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc11.vcxproj new file mode 100644 index 0000000..954ace3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc11.vcxproj @@ -0,0 +1,194 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 18.SplitScreen + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0} + 18.SplitScreen + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SplitScreen.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SplitScreen.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc8.vcproj new file mode 100644 index 0000000..906b950 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc8.vcproj @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc9.vcproj new file mode 100644 index 0000000..86f6552 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/SplitScreen_vc9.vcproj @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/18.SplitScreen/main.cpp b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/main.cpp new file mode 100644 index 0000000..32266c5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/18.SplitScreen/main.cpp @@ -0,0 +1,244 @@ +/** Example 018 Splitscreen + +A tutorial by Max Winkel. + +In this tutorial we'll learn how to use splitscreen (e.g. for racing-games) +with Irrlicht. We'll create a viewport divided +into 4 parts, with 3 fixed cameras and one user-controlled. + +Ok, let's start with the headers (I think there's +nothing to say about it) +*/ + +#include +#include "driverChoice.h" + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +//Namespaces for the engine +using namespace irr; +using namespace core; +using namespace video; +using namespace scene; + +/* +Now we'll define the resolution in a constant for use in +initializing the device and setting up the viewport. In addition +we set up a global variable saying splitscreen is active or not. +*/ +//Resolution +const int ResX=800; +const int ResY=600; +const bool fullScreen=false; + +//Use SplitScreen? +bool SplitScreen=true; + +/* +Now we need four pointers to our cameras which are created later: +*/ +//cameras +ICameraSceneNode *camera[4]={0,0,0,0}; +/* +In our event-receiver we switch the SplitScreen-variable, +whenever the user press the S-key. All other events are sent +to the FPS camera. +*/ + +class MyEventReceiver : public IEventReceiver +{ + public: + virtual bool OnEvent(const SEvent& event) + { + //Key S enables/disables SplitScreen + if (event.EventType == irr::EET_KEY_INPUT_EVENT && + event.KeyInput.Key == KEY_KEY_S && event.KeyInput.PressedDown) + { + SplitScreen = !SplitScreen; + return true; + } + //Send all other events to camera4 + if (camera[3]) + return camera[3]->OnEvent(event); + return false; + } +}; + +/* +Ok, now the main-function: +First, we initialize the device, get the SourceManager and +VideoDriver, load an animated mesh from .md2 and a map from +.pk3. Because that's old stuff, I won't explain every step. +Just take care of the maps position. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + //Instance of the EventReceiver + MyEventReceiver receiver; + + //Initialise the engine + IrrlichtDevice *device = createDevice(driverType, + dimension2du(ResX,ResY), 32, fullScreen, + false, false, &receiver); + if (!device) + return 1; + + ISceneManager *smgr = device->getSceneManager(); + IVideoDriver *driver = device->getVideoDriver(); + + //Load model + IAnimatedMesh *model = smgr->getMesh("../../media/sydney.md2"); + if (!model) + return 1; + IAnimatedMeshSceneNode *model_node = smgr->addAnimatedMeshSceneNode(model); + //Load texture + if (model_node) + { + ITexture *texture = driver->getTexture("../../media/sydney.bmp"); + model_node->setMaterialTexture(0,texture); + model_node->setMD2Animation(scene::EMAT_RUN); + //Disable lighting (we've got no light) + model_node->setMaterialFlag(EMF_LIGHTING,false); + } + + //Load map + device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3"); + IAnimatedMesh *map = smgr->getMesh("20kdm2.bsp"); + if (map) + { + ISceneNode *map_node = smgr->addOctreeSceneNode(map->getMesh(0)); + //Set position + map_node->setPosition(vector3df(-850,-220,-850)); + } + +/* +Now we create our four cameras. One is looking at the model +from the front, one from the top and one from the side. In +addition there's a FPS-camera which can be controlled by the +user. +*/ + // Create 3 fixed and one user-controlled cameras + //Front + camera[0] = smgr->addCameraSceneNode(0, vector3df(50,0,0), vector3df(0,0,0)); + //Top + camera[1] = smgr->addCameraSceneNode(0, vector3df(0,50,0), vector3df(0,0,0)); + //Left + camera[2] = smgr->addCameraSceneNode(0, vector3df(0,0,50), vector3df(0,0,0)); + //User-controlled + camera[3] = smgr->addCameraSceneNodeFPS(); + // don't start at sydney's position + if (camera[3]) + camera[3]->setPosition(core::vector3df(-50,0,-50)); + +/* +Create a variable for counting the fps and hide the mouse: +*/ + //Hide mouse + device->getCursorControl()->setVisible(false); + //We want to count the fps + int lastFPS = -1; + +/* +There wasn't much new stuff - till now! +Only by defining four cameras, the game won't be splitscreen. +To do this you need several steps: + - Set the viewport to the whole screen + - Begin a new scene (Clear screen) + + - The following 3 steps are repeated for every viewport in the splitscreen + - Set the viewport to the area you wish + - Activate the camera which should be "linked" with the viewport + - Render all objects + + - If you have a GUI: + - Set the viewport the whole screen + - Display the GUI + - End scene + +Sounds a little complicated, but you'll see it isn't: +*/ + + while(device->run()) + { + //Set the viewpoint to the whole screen and begin scene + driver->setViewPort(rect(0,0,ResX,ResY)); + driver->beginScene(true,true,SColor(255,100,100,100)); + //If SplitScreen is used + if (SplitScreen) + { + //Activate camera1 + smgr->setActiveCamera(camera[0]); + //Set viewpoint to the first quarter (left top) + driver->setViewPort(rect(0,0,ResX/2,ResY/2)); + //Draw scene + smgr->drawAll(); + //Activate camera2 + smgr->setActiveCamera(camera[1]); + //Set viewpoint to the second quarter (right top) + driver->setViewPort(rect(ResX/2,0,ResX,ResY/2)); + //Draw scene + smgr->drawAll(); + //Activate camera3 + smgr->setActiveCamera(camera[2]); + //Set viewpoint to the third quarter (left bottom) + driver->setViewPort(rect(0,ResY/2,ResX/2,ResY)); + //Draw scene + smgr->drawAll(); + //Set viewport the last quarter (right bottom) + driver->setViewPort(rect(ResX/2,ResY/2,ResX,ResY)); + } + //Activate camera4 + smgr->setActiveCamera(camera[3]); + //Draw scene + smgr->drawAll(); + driver->endScene(); + + /* + As you can probably see, the image is rendered for every + viewport separately. That means, that you'll loose much performance. + Ok, if you're asking "How do I have to set the viewport + to get this or that screen?", don't panic. It's really + easy: In the rect-function you define 4 coordinates: + - X-coordinate of the corner left top + - Y-coordinate of the corner left top + - X-coordinate of the corner right bottom + - Y-coordinate of the corner right bottom + + That means, if you want to split the screen into 2 viewports + you would give the following coordinates: + - 1st viewport: 0,0,ResX/2,ResY + - 2nd viewport: ResX/2,0,ResX,ResY + + If you didn't fully understand, just play around with the example + to check out what happens. + + Now we just view the current fps and shut down the engine, + when the user wants to: + */ + //Get and show fps + if (driver->getFPS() != lastFPS) + { + lastFPS = driver->getFPS(); + core::stringw tmp = L"Irrlicht SplitScreen-Example (FPS: "; + tmp += lastFPS; + tmp += ")"; + device->setWindowCaption(tmp.c_str()); + } + } + //Delete device + device->drop(); + return 0; +} +/* +That's it! Just compile and play around with the program. +Note: With the S-Key you can switch between using splitscreen +and not. +**/ + diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/Makefile b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/Makefile new file mode 100644 index 0000000..2462ea8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 19.MouseAndJoystick +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +#CXXFLAGS = -O3 -ffast-math +CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.cbp b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.cbp new file mode 100644 index 0000000..808c0a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.cbp @@ -0,0 +1,56 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.dev b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.dev new file mode 100644 index 0000000..cac8418 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 04 MouseAndJoystick +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=19.MouseAndJoystick.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj new file mode 100644 index 0000000..84d8396 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj new file mode 100644 index 0000000..aaa8027 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj @@ -0,0 +1,227 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 19.MouseAndJoystick + {FE853A36-E0D1-4AC5-A792-B643E70D2953} + MouseAndJoystick + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/MouseAndJoystick.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/MouseAndJoystick.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/MouseAndJoystick.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/MouseAndJoystick.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj new file mode 100644 index 0000000..44c2b07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc11.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 19.MouseAndJoystick + {FE853A36-E0D1-4AC5-A792-B643E70D2953} + MouseAndJoystick + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/MouseAndJoystick.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/MouseAndJoystick.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/MouseAndJoystick.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/MouseAndJoystick.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj new file mode 100644 index 0000000..51b7fac --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj new file mode 100644 index 0000000..e121452 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/MouseAndJoystick_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/main.cpp b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/main.cpp new file mode 100644 index 0000000..4563278 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/19.MouseAndJoystick/main.cpp @@ -0,0 +1,285 @@ +/** Example 019 Mouse and Joystick + +This tutorial builds on example 04.Movement which showed how to +handle keyboard events in Irrlicht. Here we'll handle mouse events +and joystick events, if you have a joystick connected and a device +that supports joysticks. These are currently Windows, Linux and SDL +devices. +*/ + +#ifdef _MSC_VER +// We'll define this to stop MSVC complaining about sprintf(). +#define _CRT_SECURE_NO_WARNINGS +#pragma comment(lib, "Irrlicht.lib") +#endif + +#include +#include "driverChoice.h" + +using namespace irr; + +/* +Just as we did in example 04.Movement, we'll store the latest state of the +mouse and the first joystick, updating them as we receive events. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + // We'll create a struct to record info on the mouse state + struct SMouseState + { + core::position2di Position; + bool LeftButtonDown; + SMouseState() : LeftButtonDown(false) { } + } MouseState; + + // This is the one method that we have to implement + virtual bool OnEvent(const SEvent& event) + { + // Remember the mouse state + if (event.EventType == irr::EET_MOUSE_INPUT_EVENT) + { + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + MouseState.LeftButtonDown = true; + break; + + case EMIE_LMOUSE_LEFT_UP: + MouseState.LeftButtonDown = false; + break; + + case EMIE_MOUSE_MOVED: + MouseState.Position.X = event.MouseInput.X; + MouseState.Position.Y = event.MouseInput.Y; + break; + + default: + // We won't use the wheel + break; + } + } + + // The state of each connected joystick is sent to us + // once every run() of the Irrlicht device. Store the + // state of the first joystick, ignoring other joysticks. + // This is currently only supported on Windows and Linux. + if (event.EventType == irr::EET_JOYSTICK_INPUT_EVENT + && event.JoystickEvent.Joystick == 0) + { + JoystickState = event.JoystickEvent; + } + + return false; + } + + const SEvent::SJoystickEvent & GetJoystickState(void) const + { + return JoystickState; + } + + const SMouseState & GetMouseState(void) const + { + return MouseState; + } + + + MyEventReceiver() + { + } + +private: + SEvent::SJoystickEvent JoystickState; +}; + + +/* +The event receiver for keeping the pressed keys is ready, the actual responses +will be made inside the render loop, right before drawing the scene. So lets +just create an irr::IrrlichtDevice and the scene node we want to move. We also +create some other additional scene nodes, to show that there are also some +different possibilities to move and animate scene nodes. +*/ +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + // create device + MyEventReceiver receiver; + + IrrlichtDevice* device = createDevice(driverType, + core::dimension2d(640, 480), 16, false, false, false, &receiver); + + if (device == 0) + return 1; // could not create selected driver. + + + core::array joystickInfo; + if(device->activateJoysticks(joystickInfo)) + { + std::cout << "Joystick support is enabled and " << joystickInfo.size() << " joystick(s) are present." << std::endl; + + for(u32 joystick = 0; joystick < joystickInfo.size(); ++joystick) + { + std::cout << "Joystick " << joystick << ":" << std::endl; + std::cout << "\tName: '" << joystickInfo[joystick].Name.c_str() << "'" << std::endl; + std::cout << "\tAxes: " << joystickInfo[joystick].Axes << std::endl; + std::cout << "\tButtons: " << joystickInfo[joystick].Buttons << std::endl; + + std::cout << "\tHat is: "; + + switch(joystickInfo[joystick].PovHat) + { + case SJoystickInfo::POV_HAT_PRESENT: + std::cout << "present" << std::endl; + break; + + case SJoystickInfo::POV_HAT_ABSENT: + std::cout << "absent" << std::endl; + break; + + case SJoystickInfo::POV_HAT_UNKNOWN: + default: + std::cout << "unknown" << std::endl; + break; + } + } + } + else + { + std::cout << "Joystick support is not enabled." << std::endl; + } + + core::stringw tmp = L"Irrlicht Joystick Example ("; + tmp += joystickInfo.size(); + tmp += " joysticks)"; + device->setWindowCaption(tmp.c_str()); + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + /* + We'll create an arrow mesh and move it around either with the joystick axis/hat, + or make it follow the mouse pointer. */ + scene::ISceneNode * node = smgr->addMeshSceneNode( + smgr->addArrowMesh( "Arrow", + video::SColor(255, 255, 0, 0), + video::SColor(255, 0, 255, 0), + 16,16, + 2.f, 1.3f, + 0.1f, 0.6f + ) + ); + node->setMaterialFlag(video::EMF_LIGHTING, false); + + scene::ICameraSceneNode * camera = smgr->addCameraSceneNode(); + camera->setPosition(core::vector3df(0, 0, -10)); + + // As in example 04, we'll use framerate independent movement. + u32 then = device->getTimer()->getTime(); + const f32 MOVEMENT_SPEED = 5.f; + + while(device->run()) + { + // Work out a frame delta time. + const u32 now = device->getTimer()->getTime(); + const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds + then = now; + + bool movedWithJoystick = false; + core::vector3df nodePosition = node->getPosition(); + + if(joystickInfo.size() > 0) + { + f32 moveHorizontal = 0.f; // Range is -1.f for full left to +1.f for full right + f32 moveVertical = 0.f; // -1.f for full down to +1.f for full up. + + const SEvent::SJoystickEvent & joystickData = receiver.GetJoystickState(); + + // We receive the full analog range of the axes, and so have to implement our + // own dead zone. This is an empirical value, since some joysticks have more + // jitter or creep around the center point than others. We'll use 5% of the + // range as the dead zone, but generally you would want to give the user the + // option to change this. + const f32 DEAD_ZONE = 0.05f; + + moveHorizontal = + (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_X] / 32767.f; + if(fabs(moveHorizontal) < DEAD_ZONE) + moveHorizontal = 0.f; + + moveVertical = + (f32)joystickData.Axis[SEvent::SJoystickEvent::AXIS_Y] / -32767.f; + if(fabs(moveVertical) < DEAD_ZONE) + moveVertical = 0.f; + + // POV hat info is only currently supported on Windows, but the value is + // guaranteed to be 65535 if it's not supported, so we can check its range. + const u16 povDegrees = joystickData.POV / 100; + if(povDegrees < 360) + { + if(povDegrees > 0 && povDegrees < 180) + moveHorizontal = 1.f; + else if(povDegrees > 180) + moveHorizontal = -1.f; + + if(povDegrees > 90 && povDegrees < 270) + moveVertical = -1.f; + else if(povDegrees > 270 || povDegrees < 90) + moveVertical = +1.f; + } + + if(!core::equals(moveHorizontal, 0.f) || !core::equals(moveVertical, 0.f)) + { + nodePosition.X += MOVEMENT_SPEED * frameDeltaTime * moveHorizontal; + nodePosition.Y += MOVEMENT_SPEED * frameDeltaTime * moveVertical; + movedWithJoystick = true; + } + } + + // If the arrow node isn't being moved with the joystick, then have it follow the mouse cursor. + if(!movedWithJoystick) + { + // Create a ray through the mouse cursor. + core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates( + receiver.GetMouseState().Position, camera); + + // And intersect the ray with a plane around the node facing towards the camera. + core::plane3df plane(nodePosition, core::vector3df(0, 0, -1)); + core::vector3df mousePosition; + if(plane.getIntersectionWithLine(ray.start, ray.getVector(), mousePosition)) + { + // We now have a mouse position in 3d space; move towards it. + core::vector3df toMousePosition(mousePosition - nodePosition); + const f32 availableMovement = MOVEMENT_SPEED * frameDeltaTime; + + if(toMousePosition.getLength() <= availableMovement) + nodePosition = mousePosition; // Jump to the final position + else + nodePosition += toMousePosition.normalize() * availableMovement; // Move towards it + } + } + + node->setPosition(nodePosition); + + // Turn lighting on and off depending on whether the left mouse button is down. + node->setMaterialFlag(video::EMF_LIGHTING, receiver.GetMouseState().LeftButtonDown); + + driver->beginScene(true, true, video::SColor(255,113,113,133)); + smgr->drawAll(); // draw the 3d scene + driver->endScene(); + } + + /* + In the end, delete the Irrlicht device. + */ + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/Makefile b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/Makefile new file mode 100644 index 0000000..1a40866 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 20.ManagedLights +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +#CXXFLAGS = -O3 -ffast-math +CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.cbp b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.cbp new file mode 100644 index 0000000..7ec0427 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.cbp @@ -0,0 +1,57 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.dev b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.dev new file mode 100644 index 0000000..9804fee --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 20 ManagedLights +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=20.ManagedLights.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.vcproj b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.vcproj new file mode 100644 index 0000000..850a8d2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc10.vcxproj new file mode 100644 index 0000000..0144522 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc10.vcxproj @@ -0,0 +1,230 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 20.ManagedLights + {16007FE2-142B-47F8-93E1-519BA3F39E71} + ManagedLights + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/ManagedLights.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\Lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/ManagedLights.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\bin\Win64-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/ManagedLights.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/ManagedLights.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc11.vcxproj new file mode 100644 index 0000000..7a86129 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc11.vcxproj @@ -0,0 +1,234 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 20.ManagedLights + {16007FE2-142B-47F8-93E1-519BA3F39E71} + ManagedLights + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug/ManagedLights.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\Lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug/ManagedLights.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\bin\Win64-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/ManagedLights.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release/ManagedLights.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc8.vcproj new file mode 100644 index 0000000..2f37f63 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc9.vcproj new file mode 100644 index 0000000..736faa6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/ManagedLights_vc9.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/20.ManagedLights/main.cpp b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/main.cpp new file mode 100644 index 0000000..f67337a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/20.ManagedLights/main.cpp @@ -0,0 +1,386 @@ +/** Example 020 Managed Lights + +Written by Colin MacDonald. This tutorial explains the use of the Light Manager +of Irrlicht. It enables the use of more dynamic light sources than the actual +hardware supports. Further applications of the Light Manager, such as per scene +node callbacks, are left out for simplicity of the example. +*/ + +#include +#include "driverChoice.h" + +using namespace irr; +using namespace core; + +#if defined(_MSC_VER) +#pragma comment(lib, "Irrlicht.lib") +#endif // MSC_VER + +/* + Normally, you are limited to 8 dynamic lights per scene: this is a hardware limit. If you + want to use more dynamic lights in your scene, then you can register an optional light + manager that allows you to to turn lights on and off at specific point during rendering. + You are still limited to 8 lights, but the limit is per scene node. + + This is completely optional: if you do not register a light manager, then a default + distance-based scheme will be used to prioritise hardware lights based on their distance + from the active camera. + + NO_MANAGEMENT disables the light manager and shows Irrlicht's default light behaviour. + The 8 lights nearest to the camera will be turned on, and other lights will be turned off. + In this example, this produces a funky looking but incoherent light display. + + LIGHTS_NEAREST_NODE shows an implementation that turns on a limited number of lights + per mesh scene node. If finds the 3 lights that are nearest to the node being rendered, + and turns them on, turning all other lights off. This works, but as it operates on every + light for every node, it does not scale well with many lights. The flickering you can see + in this demo is due to the lights swapping their relative positions from the cubes + (a deliberate demonstration of the limitations of this technique). + + LIGHTS_IN_ZONE shows a technique for turning on lights based on a 'zone'. Each empty scene + node is considered to be the parent of a zone. When nodes are rendered, they turn off all + lights, then find their parent 'zone' and turn on all lights that are inside that zone, i.e. + are descendents of it in the scene graph. This produces true 'local' lighting for each cube + in this example. You could use a similar technique to locally light all meshes in (e.g.) + a room, without the lights spilling out to other rooms. + + This light manager is also an event receiver; this is purely for simplicity in this example, + it's neither necessary nor recommended for a real application. +*/ +class CMyLightManager : public scene::ILightManager, public IEventReceiver +{ + typedef enum + { + NO_MANAGEMENT, + LIGHTS_NEAREST_NODE, + LIGHTS_IN_ZONE + } + LightManagementMode; + + LightManagementMode Mode; + LightManagementMode RequestedMode; + + // These data represent the state information that this light manager + // is interested in. + scene::ISceneManager * SceneManager; + core::array * SceneLightList; + scene::E_SCENE_NODE_RENDER_PASS CurrentRenderPass; + scene::ISceneNode * CurrentSceneNode; + +public: + CMyLightManager(scene::ISceneManager* sceneManager) + : Mode(NO_MANAGEMENT), RequestedMode(NO_MANAGEMENT), + SceneManager(sceneManager), SceneLightList(0), + CurrentRenderPass(scene::ESNRP_NONE), CurrentSceneNode(0) + { } + + // The input receiver interface, which just switches light management strategy + bool OnEvent(const SEvent & event) + { + bool handled = false; + + if (event.EventType == irr::EET_KEY_INPUT_EVENT && event.KeyInput.PressedDown) + { + handled = true; + switch(event.KeyInput.Key) + { + case irr::KEY_KEY_1: + RequestedMode = NO_MANAGEMENT; + break; + case irr::KEY_KEY_2: + RequestedMode = LIGHTS_NEAREST_NODE; + break; + case irr::KEY_KEY_3: + RequestedMode = LIGHTS_IN_ZONE; + break; + default: + handled = false; + break; + } + + if(NO_MANAGEMENT == RequestedMode) + SceneManager->setLightManager(0); // Show that it's safe to register the light manager + else + SceneManager->setLightManager(this); + } + + return handled; + } + + + // This is called before the first scene node is rendered. + virtual void OnPreRender(core::array & lightList) + { + // Update the mode; changing it here ensures that it's consistent throughout a render + Mode = RequestedMode; + + // Store the light list. I am free to alter this list until the end of OnPostRender(). + SceneLightList = &lightList; + } + + // Called after the last scene node is rendered. + virtual void OnPostRender() + { + // Since light management might be switched off in the event handler, we'll turn all + // lights on to ensure that they are in a consistent state. You wouldn't normally have + // to do this when using a light manager, since you'd continue to do light management + // yourself. + for (u32 i = 0; i < SceneLightList->size(); i++) + (*SceneLightList)[i]->setVisible(true); + } + + virtual void OnRenderPassPreRender(scene::E_SCENE_NODE_RENDER_PASS renderPass) + { + // I don't have to do anything here except remember which render pass I am in. + CurrentRenderPass = renderPass; + } + + virtual void OnRenderPassPostRender(scene::E_SCENE_NODE_RENDER_PASS renderPass) + { + // I only want solid nodes to be lit, so after the solid pass, turn all lights off. + if (scene::ESNRP_SOLID == renderPass) + { + for (u32 i = 0; i < SceneLightList->size(); ++i) + (*SceneLightList)[i]->setVisible(false); + } + } + + // This is called before the specified scene node is rendered + virtual void OnNodePreRender(scene::ISceneNode* node) + { + CurrentSceneNode = node; + + // This light manager only considers solid objects, but you are free to manipulate + // lights during any phase, depending on your requirements. + if (scene::ESNRP_SOLID != CurrentRenderPass) + return; + + // And in fact for this example, I only want to consider lighting for cube scene + // nodes. You will probably want to deal with lighting for (at least) mesh / + // animated mesh scene nodes as well. + if (node->getType() != scene::ESNT_CUBE) + return; + + if (LIGHTS_NEAREST_NODE == Mode) + { + // This is a naive implementation that prioritises every light in the scene + // by its proximity to the node being rendered. This produces some flickering + // when lights orbit closer to a cube than its 'zone' lights. + const vector3df nodePosition = node->getAbsolutePosition(); + + // Sort the light list by prioritising them based on their distance from the node + // that's about to be rendered. + array sortingArray; + sortingArray.reallocate(SceneLightList->size()); + + u32 i; + for(i = 0; i < SceneLightList->size(); ++i) + { + scene::ISceneNode* lightNode = (*SceneLightList)[i]; + const f64 distance = lightNode->getAbsolutePosition().getDistanceFromSQ(nodePosition); + sortingArray.push_back(LightDistanceElement(lightNode, distance)); + } + + sortingArray.sort(); + + // The list is now sorted by proximity to the node. + // Turn on the three nearest lights, and turn the others off. + for(i = 0; i < sortingArray.size(); ++i) + sortingArray[i].node->setVisible(i < 3); + } + else if(LIGHTS_IN_ZONE == Mode) + { + // Empty scene nodes are used to represent 'zones'. For each solid mesh that + // is being rendered, turn off all lights, then find its 'zone' parent, and turn + // on all lights that are found under that node in the scene graph. + // This is a general purpose algorithm that doesn't use any special + // knowledge of how this particular scene graph is organised. + for (u32 i = 0; i < SceneLightList->size(); ++i) + { + if ((*SceneLightList)[i]->getType() != scene::ESNT_LIGHT) + continue; + scene::ILightSceneNode* lightNode = static_cast((*SceneLightList)[i]); + video::SLight & lightData = lightNode->getLightData(); + + if (video::ELT_DIRECTIONAL != lightData.Type) + lightNode->setVisible(false); + } + + scene::ISceneNode * parentZone = findZone(node); + if (parentZone) + turnOnZoneLights(parentZone); + } + } + + // Called after the specified scene node is rendered + virtual void OnNodePostRender(scene::ISceneNode* node) + { + // I don't need to do any light management after individual node rendering. + } + +private: + + // Find the empty scene node that is the parent of the specified node + scene::ISceneNode * findZone(scene::ISceneNode * node) + { + if (!node) + return 0; + + if (node->getType() == scene::ESNT_EMPTY) + return node; + + return findZone(node->getParent()); + } + + // Turn on all lights that are children (directly or indirectly) of the + // specified scene node. + void turnOnZoneLights(scene::ISceneNode * node) + { + core::list const & children = node->getChildren(); + for (core::list::ConstIterator child = children.begin(); + child != children.end(); ++child) + { + if ((*child)->getType() == scene::ESNT_LIGHT) + (*child)->setVisible(true); + else // Assume that lights don't have any children that are also lights + turnOnZoneLights(*child); + } + } + + + // A utility class to aid in sorting scene nodes into a distance order + class LightDistanceElement + { + public: + LightDistanceElement() {}; + + LightDistanceElement(scene::ISceneNode* n, f64 d) + : node(n), distance(d) { } + + scene::ISceneNode* node; + f64 distance; + + // Lower distance elements are sorted to the start of the array + bool operator < (const LightDistanceElement& other) const + { + return (distance < other.distance); + } + }; +}; + + +/* +*/ +int main(int argumentCount, char * argumentValues[]) +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + IrrlichtDevice *device = createDevice(driverType, + dimension2d(640, 480), 32); + + if(!device) + return -1; + + f32 const lightRadius = 60.f; // Enough to reach the far side of each 'zone' + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* guienv = device->getGUIEnvironment(); + + gui::IGUISkin* skin = guienv->getSkin(); + if (skin) + { + skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255, 255, 255, 255)); + gui::IGUIFont* font = guienv->getFont("../../media/fontlucida.png"); + if(font) + skin->setFont(font); + } + + guienv->addStaticText(L"1 - No light management", core::rect(10,10,200,30)); + guienv->addStaticText(L"2 - Closest 3 lights", core::rect(10,30,200,50)); + guienv->addStaticText(L"3 - Lights in zone", core::rect(10,50,200,70)); + +/* +Add several "zones". You could use this technique to light individual rooms, for example. +*/ + for(f32 zoneX = -100.f; zoneX <= 100.f; zoneX += 50.f) + for(f32 zoneY = -60.f; zoneY <= 60.f; zoneY += 60.f) + { + // Start with an empty scene node, which we will use to represent a zone. + scene::ISceneNode * zoneRoot = smgr->addEmptySceneNode(); + zoneRoot->setPosition(vector3df(zoneX, zoneY, 0)); + + // Each zone contains a rotating cube + scene::IMeshSceneNode * node = smgr->addCubeSceneNode(15, zoneRoot); + scene::ISceneNodeAnimator * rotation = smgr->createRotationAnimator(vector3df(0.25f, 0.5f, 0.75f)); + node->addAnimator(rotation); + rotation->drop(); + + // And each cube has three lights attached to it. The lights are attached to billboards so + // that we can see where they are. The billboards are attached to the cube, so that the + // lights are indirect descendents of the same empty scene node as the cube. + scene::IBillboardSceneNode * billboard = smgr->addBillboardSceneNode(node); + billboard->setPosition(vector3df(0, -14, 30)); + billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); + billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp")); + billboard->setMaterialFlag(video::EMF_LIGHTING, false); + smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(1, 0, 0), lightRadius); + + billboard = smgr->addBillboardSceneNode(node); + billboard->setPosition(vector3df(-21, -14, -21)); + billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); + billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp")); + billboard->setMaterialFlag(video::EMF_LIGHTING, false); + smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 1, 0), lightRadius); + + billboard = smgr->addBillboardSceneNode(node); + billboard->setPosition(vector3df(21, -14, -21)); + billboard->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); + billboard->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp")); + billboard->setMaterialFlag(video::EMF_LIGHTING, false); + smgr->addLightSceneNode(billboard, vector3df(0, 0, 0), video::SColorf(0, 0, 1), lightRadius); + + // Each cube also has a smaller cube rotating around it, to show that the cubes are being + // lit by the lights in their 'zone', not just lights that are their direct children. + node = smgr->addCubeSceneNode(5, node); + node->setPosition(vector3df(0, 21, 0)); + } + + smgr->addCameraSceneNode(0, vector3df(0,0,-130), vector3df(0,0,0)); + + CMyLightManager * myLightManager = new CMyLightManager(smgr); + smgr->setLightManager(0); // This is the default: we won't do light management until told to do it. + device->setEventReceiver(myLightManager); + + int lastFps = -1; + + while(device->run()) + { + driver->beginScene(true, true, video::SColor(255,100,101,140)); + smgr->drawAll(); + guienv->drawAll(); + driver->endScene(); + + int fps = driver->getFPS(); + if(fps != lastFps) + { + lastFps = fps; + core::stringw str = L"Managed Lights ["; + str += driver->getName(); + str += "] FPS:"; + str += fps; + device->setWindowCaption(str.c_str()); + } + } + + myLightManager->drop(); // Drop my implicit reference + device->drop(); + return 0; +} + +/* +**/ + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Makefile b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Makefile new file mode 100644 index 0000000..b2c6927 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 21.Quake3Explorer +Sources = main.cpp sound.cpp q3factory.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +#CXXFLAGS = -O3 -ffast-math +CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.cbp b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.cbp new file mode 100644 index 0000000..af962e2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.cbp @@ -0,0 +1,59 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.dev b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.dev new file mode 100644 index 0000000..193c6bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.dev @@ -0,0 +1,99 @@ +[Project] +FileName=Quake3Explorer.dev +Name=Irrlicht Example 21 Quake3 Explorer +UnitCount=5 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=21.Quake3Explorer.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + +[Unit2] +FileName=q3factory.cpp +CompileCpp=1 +Folder=Irrlicht Example 21 Quake3 Explorer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=q3factory.h +CompileCpp=1 +Folder=Irrlicht Example 21 Quake3 Explorer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=sound.cpp +CompileCpp=1 +Folder=Irrlicht Example 21 Quake3 Explorer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=sound.h +CompileCpp=1 +Folder=Irrlicht Example 21 Quake3 Explorer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.vcproj b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.vcproj new file mode 100644 index 0000000..b869cc4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj new file mode 100644 index 0000000..8ba3e72 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj @@ -0,0 +1,196 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 21.Quake3Explorer + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD} + 21.Quake3Explorer + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)Quake3MapShader.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)Quake3MapShader.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + FastCall + + + ..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + FastCall + + + ..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj new file mode 100644 index 0000000..d0c29b2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc11.vcxproj @@ -0,0 +1,200 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 21.Quake3Explorer + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD} + 21.Quake3Explorer + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)Quake3MapShader.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)Quake3MapShader.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + FastCall + + + ..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + FastCall + + + ..\..\bin\Win64-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj new file mode 100644 index 0000000..9045027 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc8.vcproj @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj new file mode 100644 index 0000000..36aee41 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/Quake3Explorer_vc9.vcproj @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/main.cpp b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/main.cpp new file mode 100644 index 0000000..b2277e6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/main.cpp @@ -0,0 +1,2188 @@ +/** Example 021 Quake3 Explorer + +This Tutorial shows how to load different Quake 3 maps. + +Features: + - Load BSP Archives at Runtime from the menu + - Load a Map from the menu. Showing with Screenshot + - Set the VideoDriver at runtime from menu + - Adjust GammaLevel at runtime + - Create SceneNodes for the Shaders + - Load EntityList and create Entity SceneNodes + - Create Players with Weapons and with Collision Response + - Play music + +You can download the Quake III Arena demo ( copyright id software ) +at the following location: +ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe + +Copyright 2006-2011 Burningwater, Thomas Alten +*/ + +#include "driverChoice.h" +#include +#include "q3factory.h" +#include "sound.h" + +/* + Game Data is used to hold Data which is needed to drive the game +*/ +struct GameData +{ + GameData ( const path &startupDir) : + retVal(0), StartupDir(startupDir), createExDevice(0), Device(0) + { + setDefault (); + } + + void setDefault (); + s32 save ( const path &filename ); + s32 load ( const path &filename ); + + s32 debugState; + s32 gravityState; + s32 flyTroughState; + s32 wireFrame; + s32 guiActive; + s32 guiInputActive; + f32 GammaValue; + s32 retVal; + s32 sound; + + path StartupDir; + stringw CurrentMapName; + array CurrentArchiveList; + + vector3df PlayerPosition; + vector3df PlayerRotation; + + tQ3EntityList Variable; + + Q3LevelLoadParameter loadParam; + SIrrlichtCreationParameters deviceParam; + funcptr_createDeviceEx createExDevice; + IrrlichtDevice *Device; +}; + +/* + set default settings +*/ +void GameData::setDefault () +{ + debugState = EDS_OFF; + gravityState = 1; + flyTroughState = 0; + wireFrame = 0; + guiActive = 1; + guiInputActive = 0; + GammaValue = 1.f; + + // default deviceParam; +#if defined ( _IRR_WINDOWS_ ) + deviceParam.DriverType = EDT_DIRECT3D9; +#else + deviceParam.DriverType = EDT_OPENGL; +#endif + deviceParam.WindowSize.Width = 800; + deviceParam.WindowSize.Height = 600; + deviceParam.Fullscreen = false; + deviceParam.Bits = 24; + deviceParam.ZBufferBits = 16; + deviceParam.Vsync = false; + deviceParam.AntiAlias = false; + + // default Quake3 loadParam + loadParam.defaultLightMapMaterial = EMT_LIGHTMAP; + loadParam.defaultModulate = EMFN_MODULATE_1X; + loadParam.defaultFilter = EMF_ANISOTROPIC_FILTER; + loadParam.verbose = 2; + loadParam.mergeShaderBuffer = 1; // merge meshbuffers with same material + loadParam.cleanUnResolvedMeshes = 1; // should unresolved meshes be cleaned. otherwise blue texture + loadParam.loadAllShaders = 1; // load all scripts in the script directory + loadParam.loadSkyShader = 0; // load sky Shader + loadParam.alpharef = 1; + + sound = 0; + + CurrentMapName = ""; + CurrentArchiveList.clear (); + + // Explorer Media directory + CurrentArchiveList.push_back ( StartupDir + "../../media/" ); + + // Add the original quake3 files before you load your custom map + // Most mods are using the original shaders, models&items&weapons + CurrentArchiveList.push_back("/q/baseq3/"); + + CurrentArchiveList.push_back(StartupDir + "../../media/map-20kdm2.pk3"); +} + +/* + Load the current game State from a typical quake3 cfg file +*/ +s32 GameData::load ( const path &filename ) +{ + if (!Device) + return 0; + + // the quake3 mesh loader can also handle *.shader and *.cfg file + IQ3LevelMesh* mesh = (IQ3LevelMesh*) Device->getSceneManager()->getMesh ( filename ); + if (!mesh) + return 0; + + tQ3EntityList &entityList = mesh->getEntityList (); + + stringc s; + u32 pos; + + for ( u32 e = 0; e != entityList.size (); ++e ) + { + //dumpShader ( s, &entityList[e], false ); + //printf ( s.c_str () ); + + for ( u32 g = 0; g != entityList[e].getGroupSize (); ++g ) + { + const SVarGroup *group = entityList[e].getGroup ( g ); + + for ( u32 index = 0; index < group->Variable.size (); ++index ) + { + const SVariable &v = group->Variable[index]; + pos = 0; + if ( v.name == "playerposition" ) + { + PlayerPosition = getAsVector3df ( v.content, pos ); + } + else + if ( v.name == "playerrotation" ) + { + PlayerRotation = getAsVector3df ( v.content, pos ); + } + } + } + } + + return 1; +} + +/* + Store the current game State in a quake3 configuration file +*/ +s32 GameData::save ( const path &filename ) +{ + return 0; + if (!Device) + return 0; + + c8 buf[128]; + u32 i; + + // Store current Archive for restart + CurrentArchiveList.clear(); + IFileSystem *fs = Device->getFileSystem(); + for ( i = 0; i != fs->getFileArchiveCount(); ++i ) + { + CurrentArchiveList.push_back ( fs->getFileArchive(i)->getFileList()->getPath() ); + } + + // Store Player Position and Rotation + ICameraSceneNode * camera = Device->getSceneManager()->getActiveCamera (); + if ( camera ) + { + PlayerPosition = camera->getPosition (); + PlayerRotation = camera->getRotation (); + } + + IWriteFile *file = fs->createAndWriteFile ( filename ); + if (!file) + return 0; + + snprintf ( buf, 128, "playerposition %.f %.f %.f\nplayerrotation %.f %.f %.f\n", + PlayerPosition.X, PlayerPosition.Z, PlayerPosition.Y, + PlayerRotation.X, PlayerRotation.Z, PlayerRotation.Y); + file->write ( buf, (s32) strlen ( buf ) ); + for ( i = 0; i != fs->getFileArchiveCount(); ++i ) + { + snprintf ( buf, 128, "archive %s\n",stringc ( fs->getFileArchive(i)->getFileList()->getPath() ).c_str () ); + file->write ( buf, (s32) strlen ( buf ) ); + } + + file->drop (); + return 1; +} + +/* + Representing a player +*/ +struct Q3Player : public IAnimationEndCallBack +{ + Q3Player () + : Device(0), MapParent(0), Mesh(0), WeaponNode(0), StartPositionCurrent(0) + { + animation[0] = 0; + memset(Anim, 0, sizeof(TimeFire)*4); + } + + virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node); + + void create ( IrrlichtDevice *device, + IQ3LevelMesh* mesh, + ISceneNode *mapNode, + IMetaTriangleSelector *meta + ); + void shutdown (); + void setAnim ( const c8 *name ); + void respawn (); + void setpos ( const vector3df &pos, const vector3df& rotation ); + + ISceneNodeAnimatorCollisionResponse * cam() { return camCollisionResponse ( Device ); } + + IrrlichtDevice *Device; + ISceneNode* MapParent; + IQ3LevelMesh* Mesh; + IAnimatedMeshSceneNode* WeaponNode; + s32 StartPositionCurrent; + TimeFire Anim[4]; + c8 animation[64]; + c8 buf[64]; +}; + + +/* End player +*/ +void Q3Player::shutdown () +{ + setAnim ( 0 ); + + dropElement (WeaponNode); + + if ( Device ) + { + ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera(); + dropElement ( camera ); + Device = 0; + } + + MapParent = 0; + Mesh = 0; +} + + +/* create a new player +*/ +void Q3Player::create ( IrrlichtDevice *device, IQ3LevelMesh* mesh, ISceneNode *mapNode, IMetaTriangleSelector *meta ) +{ + setTimeFire ( Anim + 0, 200, FIRED ); + setTimeFire ( Anim + 1, 5000 ); + + if (!device) + return; + // load FPS weapon to Camera + Device = device; + Mesh = mesh; + MapParent = mapNode; + + ISceneManager *smgr = device->getSceneManager (); + IVideoDriver * driver = device->getVideoDriver(); + + ICameraSceneNode* camera = 0; + + SKeyMap keyMap[10]; + keyMap[0].Action = EKA_MOVE_FORWARD; + keyMap[0].KeyCode = KEY_UP; + keyMap[1].Action = EKA_MOVE_FORWARD; + keyMap[1].KeyCode = KEY_KEY_W; + + keyMap[2].Action = EKA_MOVE_BACKWARD; + keyMap[2].KeyCode = KEY_DOWN; + keyMap[3].Action = EKA_MOVE_BACKWARD; + keyMap[3].KeyCode = KEY_KEY_S; + + keyMap[4].Action = EKA_STRAFE_LEFT; + keyMap[4].KeyCode = KEY_LEFT; + keyMap[5].Action = EKA_STRAFE_LEFT; + keyMap[5].KeyCode = KEY_KEY_A; + + keyMap[6].Action = EKA_STRAFE_RIGHT; + keyMap[6].KeyCode = KEY_RIGHT; + keyMap[7].Action = EKA_STRAFE_RIGHT; + keyMap[7].KeyCode = KEY_KEY_D; + + keyMap[8].Action = EKA_JUMP_UP; + keyMap[8].KeyCode = KEY_KEY_J; + + keyMap[9].Action = EKA_CROUCH; + keyMap[9].KeyCode = KEY_KEY_C; + + camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 0.6f, -1, keyMap, 10, false, 0.6f); + camera->setName ( "First Person Camera" ); + //camera->setFOV ( 100.f * core::DEGTORAD ); + camera->setFarValue( 20000.f ); + + IAnimatedMeshMD2* weaponMesh = (IAnimatedMeshMD2*) smgr->getMesh("gun.md2"); + if ( 0 == weaponMesh ) + return; + + if ( weaponMesh->getMeshType() == EAMT_MD2 ) + { + s32 count = weaponMesh->getAnimationCount(); + for ( s32 i = 0; i != count; ++i ) + { + snprintf ( buf, 64, "Animation: %s", weaponMesh->getAnimationName(i) ); + device->getLogger()->log(buf, ELL_INFORMATION); + } + } + + WeaponNode = smgr->addAnimatedMeshSceneNode( + weaponMesh, + smgr->getActiveCamera(), + 10, + vector3df( 0, 0, 0), + vector3df(-90,-90,90) + ); + WeaponNode->setMaterialFlag(EMF_LIGHTING, false); + WeaponNode->setMaterialTexture(0, driver->getTexture( "gun.jpg")); + WeaponNode->setLoopMode ( false ); + WeaponNode->setName ( "tommi the gun man" ); + + //create a collision auto response animator + ISceneNodeAnimator* anim = + smgr->createCollisionResponseAnimator( meta, camera, + vector3df(30,45,30), + getGravity ( "earth" ), + vector3df(0,40,0), + 0.0005f + ); + + camera->addAnimator( anim ); + anim->drop(); + + if ( meta ) + { + meta->drop (); + } + + respawn (); + setAnim ( "idle" ); +} + + +/* + so we need a good starting Position in the level. + we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" +*/ +void Q3Player::respawn () +{ + if (!Device) + return; + ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera(); + + Device->getLogger()->log( "respawn" ); + + if ( StartPositionCurrent >= Q3StartPosition ( + Mesh, camera,StartPositionCurrent++, + cam ()->getEllipsoidTranslation() ) + ) + { + StartPositionCurrent = 0; + } +} + +/* + set Player position from saved coordinates +*/ +void Q3Player::setpos ( const vector3df &pos, const vector3df &rotation ) +{ + if (!Device) + return; + Device->getLogger()->log( "setpos" ); + + ICameraSceneNode* camera = Device->getSceneManager()->getActiveCamera(); + if ( camera ) + { + camera->setPosition ( pos ); + camera->setRotation ( rotation ); + //! New. FPSCamera and animators catches reset on animate 0 + camera->OnAnimate ( 0 ); + } +} + +/* set the Animation of the player and weapon +*/ +void Q3Player::setAnim ( const c8 *name ) +{ + if ( name ) + { + snprintf ( animation, 64, "%s", name ); + if ( WeaponNode ) + { + WeaponNode->setAnimationEndCallback ( this ); + WeaponNode->setMD2Animation ( animation ); + } + } + else + { + animation[0] = 0; + if ( WeaponNode ) + { + WeaponNode->setAnimationEndCallback ( 0 ); + } + } +} + + +// Callback +void Q3Player::OnAnimationEnd(IAnimatedMeshSceneNode* node) +{ + setAnim ( 0 ); +} + + + +/* GUI Elements +*/ +struct GUI +{ + GUI () + { + memset ( this, 0, sizeof ( *this ) ); + } + + void drop() + { + dropElement ( Window ); + dropElement ( Logo ); + } + + IGUIComboBox* VideoDriver; + IGUIComboBox* VideoMode; + IGUICheckBox* FullScreen; + IGUICheckBox* Bit32; + IGUIScrollBar* MultiSample; + IGUIButton* SetVideoMode; + + IGUIScrollBar* Tesselation; + IGUIScrollBar* Gamma; + IGUICheckBox* Collision; + IGUICheckBox* Visible_Map; + IGUICheckBox* Visible_Shader; + IGUICheckBox* Visible_Fog; + IGUICheckBox* Visible_Unresolved; + IGUICheckBox* Visible_Skydome; + IGUIButton* Respawn; + + IGUITable* ArchiveList; + IGUIButton* ArchiveAdd; + IGUIButton* ArchiveRemove; + IGUIFileOpenDialog* ArchiveFileOpen; + IGUIButton* ArchiveUp; + IGUIButton* ArchiveDown; + + IGUIListBox* MapList; + IGUITreeView* SceneTree; + IGUIStaticText* StatusLine; + IGUIImage* Logo; + IGUIWindow* Window; +}; + + +/* + CQuake3EventHandler controls the game +*/ +class CQuake3EventHandler : public IEventReceiver +{ +public: + + CQuake3EventHandler( GameData *gameData ); + virtual ~CQuake3EventHandler (); + + void Animate(); + void Render(); + + void AddArchive ( const path& archiveName ); + void LoadMap ( const stringw& mapName, s32 collision ); + void CreatePlayers(); + void AddSky( u32 dome, const c8 *texture ); + Q3Player *GetPlayer ( u32 index ) { return &Player[index]; } + + void CreateGUI(); + void SetGUIActive( s32 command); + + bool OnEvent(const SEvent& eve); + + +private: + + GameData *Game; + + IQ3LevelMesh* Mesh; + ISceneNode* MapParent; + ISceneNode* ShaderParent; + ISceneNode* ItemParent; + ISceneNode* UnresolvedParent; + ISceneNode* BulletParent; + ISceneNode* FogParent; + ISceneNode * SkyNode; + IMetaTriangleSelector *Meta; + + c8 buf[256]; + + Q3Player Player[2]; + + struct SParticleImpact + { + u32 when; + vector3df pos; + vector3df outVector; + }; + array Impacts; + void useItem( Q3Player * player); + void createParticleImpacts( u32 now ); + + void createTextures (); + void addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent); + + GUI gui; + void dropMap (); +}; + +/* Constructor +*/ +CQuake3EventHandler::CQuake3EventHandler( GameData *game ) +: Game(game), Mesh(0), MapParent(0), ShaderParent(0), ItemParent(0), UnresolvedParent(0), + BulletParent(0), FogParent(0), SkyNode(0), Meta(0) +{ + buf[0]=0; + // Also use 16 Bit Textures for 16 Bit RenderDevice + if ( Game->deviceParam.Bits == 16 ) + { + game->Device->getVideoDriver()->setTextureCreationFlag(ETCF_ALWAYS_16_BIT, true); + } + + // Quake3 Shader controls Z-Writing + game->Device->getSceneManager()->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); + + // create internal textures + createTextures (); + + sound_init ( game->Device ); + + Game->Device->setEventReceiver ( this ); +} + + +// destructor +CQuake3EventHandler::~CQuake3EventHandler () +{ + Player[0].shutdown (); + sound_shutdown (); + + Game->save( "explorer.cfg" ); + + Game->Device->drop(); +} + + +// create runtime textures smog, fog +void CQuake3EventHandler::createTextures() +{ + IVideoDriver * driver = Game->Device->getVideoDriver(); + + dimension2du dim(64, 64); + + video::IImage* image; + u32 i; + u32 x; + u32 y; + u32 * data; + for ( i = 0; i != 8; ++i ) + { + image = driver->createImage ( video::ECF_A8R8G8B8, dim); + data = (u32*) image->lock (); + for ( y = 0; y != dim.Height; ++y ) + { + for ( x = 0; x != dim.Width; ++x ) + { + data [x] = 0xFFFFFFFF; + } + data = (u32*) ( (u8*) data + image->getPitch() ); + } + image->unlock(); + snprintf ( buf, 64, "smoke_%02d", i ); + driver->addTexture( buf, image ); + image->drop (); + } + + // fog + for ( i = 0; i != 1; ++i ) + { + image = driver->createImage ( video::ECF_A8R8G8B8, dim); + data = (u32*) image->lock (); + for ( y = 0; y != dim.Height; ++y ) + { + for ( x = 0; x != dim.Width; ++x ) + { + data [x] = 0xFFFFFFFF; + } + data = (u32*) ( (u8*) data + image->getPitch() ); + } + image->unlock(); + snprintf ( buf, 64, "fog_%02d", i ); + driver->addTexture( buf, image ); + image->drop (); + } +} + + +/* + create the GUI +*/ +void CQuake3EventHandler::CreateGUI() +{ + + IGUIEnvironment *env = Game->Device->getGUIEnvironment(); + IVideoDriver * driver = Game->Device->getVideoDriver(); + + gui.drop(); + + // set skin font + IGUIFont* font = env->getFont("fontlucida.png"); + if (font) + env->getSkin()->setFont(font); + env->getSkin()->setColor ( EGDC_BUTTON_TEXT, video::SColor(240,0xAA,0xAA,0xAA) ); + env->getSkin()->setColor ( EGDC_3D_HIGH_LIGHT, video::SColor(240,0x22,0x22,0x22) ); + env->getSkin()->setColor ( EGDC_3D_FACE, video::SColor(240,0x44,0x44,0x44) ); + env->getSkin()->setColor ( EGDC_EDITABLE, video::SColor(240,0x44,0x44,0x44) ); + env->getSkin()->setColor ( EGDC_FOCUSED_EDITABLE, video::SColor(240,0x54,0x54,0x54) ); + env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) ); + + // minimal gui size 800x600 + dimension2d dim ( 800, 600 ); + dimension2d vdim ( Game->Device->getVideoDriver()->getScreenSize() ); + + if ( vdim.Height >= dim.Height && vdim.Width >= dim.Width ) + { + //dim = vdim; + } + else + { + } + + gui.Window = env->addWindow ( rect ( 0, 0, dim.Width, dim.Height ), false, L"Quake3 Explorer" ); + gui.Window->setToolTipText ( L"Quake3Explorer. Loads and show various BSP File Format and Shaders." ); + gui.Window->getCloseButton()->setToolTipText ( L"Quit Quake3 Explorer" ); + + // add a status line help text + gui.StatusLine = env->addStaticText( 0, rect( 5,dim.Height - 30,dim.Width - 5,dim.Height - 10), + false, false, gui.Window, -1, true + ); + + + env->addStaticText ( L"VideoDriver:", rect( dim.Width - 400, 24, dim.Width - 310, 40 ),false, false, gui.Window, -1, false ); + gui.VideoDriver = env->addComboBox(rect( dim.Width - 300, 24, dim.Width - 10, 40 ),gui.Window); + gui.VideoDriver->addItem(L"Direct3D 9.0c", EDT_DIRECT3D9 ); + gui.VideoDriver->addItem(L"Direct3D 8.1", EDT_DIRECT3D8 ); + gui.VideoDriver->addItem(L"OpenGL 1.5", EDT_OPENGL); + gui.VideoDriver->addItem(L"Software Renderer", EDT_SOFTWARE); + gui.VideoDriver->addItem(L"Burning's Video (TM) Thomas Alten", EDT_BURNINGSVIDEO); + gui.VideoDriver->setSelected ( gui.VideoDriver->getIndexForItemData ( Game->deviceParam.DriverType ) ); + gui.VideoDriver->setToolTipText ( L"Use a VideoDriver" ); + + env->addStaticText ( L"VideoMode:", rect( dim.Width - 400, 44, dim.Width - 310, 60 ),false, false, gui.Window, -1, false ); + gui.VideoMode = env->addComboBox(rect( dim.Width - 300, 44, dim.Width - 10, 60 ),gui.Window); + gui.VideoMode->setToolTipText ( L"Supported Screenmodes" ); + IVideoModeList *modeList = Game->Device->getVideoModeList(); + if ( modeList ) + { + s32 i; + for ( i = 0; i != modeList->getVideoModeCount (); ++i ) + { + u16 d = modeList->getVideoModeDepth ( i ); + if ( d < 16 ) + continue; + + u16 w = modeList->getVideoModeResolution ( i ).Width; + u16 h = modeList->getVideoModeResolution ( i ).Height; + u32 val = w << 16 | h; + + if ( gui.VideoMode->getIndexForItemData ( val ) >= 0 ) + continue; + + f32 aspect = (f32) w / (f32) h; + const c8 *a = ""; + if ( core::equals ( aspect, 1.3333333333f ) ) a = "4:3"; + else if ( core::equals ( aspect, 1.6666666f ) ) a = "15:9 widescreen"; + else if ( core::equals ( aspect, 1.7777777f ) ) a = "16:9 widescreen"; + else if ( core::equals ( aspect, 1.6f ) ) a = "16:10 widescreen"; + else if ( core::equals ( aspect, 2.133333f ) ) a = "20:9 widescreen"; + + snprintf ( buf, sizeof ( buf ), "%d x %d, %s",w, h, a ); + gui.VideoMode->addItem ( stringw ( buf ).c_str(), val ); + } + } + gui.VideoMode->setSelected ( gui.VideoMode->getIndexForItemData ( + Game->deviceParam.WindowSize.Width << 16 | + Game->deviceParam.WindowSize.Height ) ); + + gui.FullScreen = env->addCheckBox ( Game->deviceParam.Fullscreen, rect( dim.Width - 400, 64, dim.Width - 300, 80 ), gui.Window,-1, L"Fullscreen" ); + gui.FullScreen->setToolTipText ( L"Set Fullscreen or Window Mode" ); + + gui.Bit32 = env->addCheckBox ( Game->deviceParam.Bits == 32, rect( dim.Width - 300, 64, dim.Width - 240, 80 ), gui.Window,-1, L"32Bit" ); + gui.Bit32->setToolTipText ( L"Use 16 or 32 Bit" ); + + env->addStaticText ( L"MultiSample:", rect( dim.Width - 235, 64, dim.Width - 150, 80 ),false, false, gui.Window, -1, false ); + gui.MultiSample = env->addScrollBar( true, rect( dim.Width - 150, 64, dim.Width - 70, 80 ), gui.Window,-1 ); + gui.MultiSample->setMin ( 0 ); + gui.MultiSample->setMax ( 8 ); + gui.MultiSample->setSmallStep ( 1 ); + gui.MultiSample->setLargeStep ( 1 ); + gui.MultiSample->setPos ( Game->deviceParam.AntiAlias ); + gui.MultiSample->setToolTipText ( L"Set the MultiSample (disable, 1x, 2x, 4x, 8x )" ); + + gui.SetVideoMode = env->addButton (rect( dim.Width - 60, 64, dim.Width - 10, 80 ), gui.Window, -1,L"set" ); + gui.SetVideoMode->setToolTipText ( L"Set Video Mode with current values" ); + + env->addStaticText ( L"Gamma:", rect( dim.Width - 400, 104, dim.Width - 310, 120 ),false, false, gui.Window, -1, false ); + gui.Gamma = env->addScrollBar( true, rect( dim.Width - 300, 104, dim.Width - 10, 120 ), gui.Window,-1 ); + gui.Gamma->setMin ( 50 ); + gui.Gamma->setMax ( 350 ); + gui.Gamma->setSmallStep ( 1 ); + gui.Gamma->setLargeStep ( 10 ); + gui.Gamma->setPos ( core::floor32 ( Game->GammaValue * 100.f ) ); + gui.Gamma->setToolTipText ( L"Adjust Gamma Ramp ( 0.5 - 3.5)" ); + Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f ); + + + env->addStaticText ( L"Tesselation:", rect( dim.Width - 400, 124, dim.Width - 310, 140 ),false, false, gui.Window, -1, false ); + gui.Tesselation = env->addScrollBar( true, rect( dim.Width - 300, 124, dim.Width - 10, 140 ), gui.Window,-1 ); + gui.Tesselation->setMin ( 2 ); + gui.Tesselation->setMax ( 12 ); + gui.Tesselation->setSmallStep ( 1 ); + gui.Tesselation->setLargeStep ( 1 ); + gui.Tesselation->setPos ( Game->loadParam.patchTesselation ); + gui.Tesselation->setToolTipText ( L"How smooth should curved surfaces be rendered" ); + + gui.Collision = env->addCheckBox ( true, rect( dim.Width - 400, 150, dim.Width - 300, 166 ), gui.Window,-1, L"Collision" ); + gui.Collision->setToolTipText ( L"Set collision on or off ( flythrough ). \nPress F7 on your Keyboard" ); + gui.Visible_Map = env->addCheckBox ( true, rect( dim.Width - 300, 150, dim.Width - 240, 166 ), gui.Window,-1, L"Map" ); + gui.Visible_Map->setToolTipText ( L"Show or not show the static part the Level. \nPress F3 on your Keyboard" ); + gui.Visible_Shader = env->addCheckBox ( true, rect( dim.Width - 240, 150, dim.Width - 170, 166 ), gui.Window,-1, L"Shader" ); + gui.Visible_Shader->setToolTipText ( L"Show or not show the Shader Nodes. \nPress F4 on your Keyboard" ); + gui.Visible_Fog = env->addCheckBox ( true, rect( dim.Width - 170, 150, dim.Width - 110, 166 ), gui.Window,-1, L"Fog" ); + gui.Visible_Fog->setToolTipText ( L"Show or not show the Fog Nodes. \nPress F5 on your Keyboard" ); + gui.Visible_Unresolved = env->addCheckBox ( true, rect( dim.Width - 110, 150, dim.Width - 10, 166 ), gui.Window,-1, L"Unresolved" ); + gui.Visible_Unresolved->setToolTipText ( L"Show the or not show the Nodes the Engine can't handle. \nPress F6 on your Keyboard" ); + gui.Visible_Skydome = env->addCheckBox ( true, rect( dim.Width - 110, 180, dim.Width - 10, 196 ), gui.Window,-1, L"Skydome" ); + gui.Visible_Skydome->setToolTipText ( L"Show the or not show the Skydome." ); + + //Respawn = env->addButton ( rect( dim.Width - 260, 90, dim.Width - 10, 106 ), 0,-1, L"Respawn" ); + + env->addStaticText ( L"Archives:", rect( 5, dim.Height - 530, dim.Width - 600,dim.Height - 514 ),false, false, gui.Window, -1, false ); + + gui.ArchiveAdd = env->addButton ( rect( dim.Width - 725, dim.Height - 530, dim.Width - 665, dim.Height - 514 ), gui.Window,-1, L"add" ); + gui.ArchiveAdd->setToolTipText ( L"Add an archive, usually packed zip-archives (*.pk3) to the Filesystem" ); + gui.ArchiveRemove = env->addButton ( rect( dim.Width - 660, dim.Height - 530, dim.Width - 600, dim.Height - 514 ), gui.Window,-1, L"del" ); + gui.ArchiveRemove->setToolTipText ( L"Remove the selected archive from the FileSystem." ); + gui.ArchiveUp = env->addButton ( rect( dim.Width - 575, dim.Height - 530, dim.Width - 515, dim.Height - 514 ), gui.Window,-1, L"up" ); + gui.ArchiveUp->setToolTipText ( L"Arrange Archive Look-up Hirachy. Move the selected Archive up" ); + gui.ArchiveDown = env->addButton ( rect( dim.Width - 510, dim.Height - 530, dim.Width - 440, dim.Height - 514 ), gui.Window,-1, L"down" ); + gui.ArchiveDown->setToolTipText ( L"Arrange Archive Look-up Hirachy. Move the selected Archive down" ); + + + gui.ArchiveList = env->addTable ( rect( 5,dim.Height - 510, dim.Width - 450,dim.Height - 410 ), gui.Window ); + gui.ArchiveList->addColumn ( L"Type", 0 ); + gui.ArchiveList->addColumn ( L"Real File Path", 1 ); + gui.ArchiveList->setColumnWidth ( 0, 60 ); + gui.ArchiveList->setColumnWidth ( 1, 284 ); + gui.ArchiveList->setToolTipText ( L"Show the attached Archives" ); + + + env->addStaticText ( L"Maps:", rect( 5, dim.Height - 400, dim.Width - 450,dim.Height - 380 ),false, false, gui.Window, -1, false ); + gui.MapList = env->addListBox ( rect( 5,dim.Height - 380, dim.Width - 450,dim.Height - 40 ), gui.Window, -1, true ); + gui.MapList->setToolTipText ( L"Show the current Maps in all Archives.\n Double-Click the Map to start the level" ); + + + // create a visible Scene Tree + env->addStaticText ( L"Scenegraph:", rect( dim.Width - 400, dim.Height - 400, dim.Width - 5,dim.Height - 380 ),false, false, gui.Window, -1, false ); + gui.SceneTree = env->addTreeView( rect( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ), + gui.Window, -1, true, true, false ); + gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" ); + gui.SceneTree->getRoot()->clearChildren(); + addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() ); + + + IGUIImageList* imageList = env->createImageList( driver->getTexture ( "iconlist.png" ), + dimension2di( 32, 32 ), true ); + + if ( imageList ) + { + gui.SceneTree->setImageList( imageList ); + imageList->drop (); + } + + + // load the engine logo + gui.Logo = env->addImage( driver->getTexture("irrlichtlogo3.png"), position2d(5, 16 ), true, 0 ); + gui.Logo->setToolTipText ( L"The great Irrlicht Engine" ); + + AddArchive ( "" ); +} + + +/* + Add an Archive to the FileSystems and updates the GUI +*/ +void CQuake3EventHandler::AddArchive ( const path& archiveName ) +{ + IFileSystem *fs = Game->Device->getFileSystem(); + u32 i; + + if ( archiveName.size () ) + { + bool exists = false; + for ( i = 0; i != fs->getFileArchiveCount(); ++i ) + { + if ( fs->getFileArchive(i)->getFileList()->getPath() == archiveName ) + { + exists = true; + break; + } + } + + if (!exists) + { + fs->addFileArchive(archiveName, true, false); + } + } + + // store the current archives in game data + // show the attached Archive in proper order + if ( gui.ArchiveList ) + { + gui.ArchiveList->clearRows(); + + for ( i = 0; i != fs->getFileArchiveCount(); ++i ) + { + IFileArchive * archive = fs->getFileArchive ( i ); + + u32 index = gui.ArchiveList->addRow(i); + + core::stringw typeName; + switch(archive->getType()) + { + case io::EFAT_ZIP: + typeName = "ZIP"; + break; + case io::EFAT_GZIP: + typeName = "gzip"; + break; + case io::EFAT_FOLDER: + typeName = "Mount"; + break; + case io::EFAT_PAK: + typeName = "PAK"; + break; + case io::EFAT_TAR: + typeName = "TAR"; + break; + default: + typeName = "archive"; + } + + gui.ArchiveList->setCellText ( index, 0, typeName ); + gui.ArchiveList->setCellText ( index, 1, archive->getFileList()->getPath() ); + } + } + + + // browse the archives for maps + if ( gui.MapList ) + { + gui.MapList->clear(); + + IGUISpriteBank *bank = Game->Device->getGUIEnvironment()->getSpriteBank("sprite_q3map"); + if ( 0 == bank ) + bank = Game->Device->getGUIEnvironment()->addEmptySpriteBank("sprite_q3map"); + + SGUISprite sprite; + SGUISpriteFrame frame; + core::rect r; + + bank->getSprites().clear(); + bank->getPositions().clear (); + gui.MapList->setSpriteBank ( bank ); + + u32 g = 0; + core::stringw s; + + // browse the attached file system + fs->setFileListSystem ( FILESYSTEM_VIRTUAL ); + fs->changeWorkingDirectoryTo ( "/maps/" ); + IFileList *fileList = fs->createFileList (); + fs->setFileListSystem ( FILESYSTEM_NATIVE ); + + for ( i=0; i< fileList->getFileCount(); ++i) + { + s = fileList->getFullFileName(i); + if ( s.find ( ".bsp" ) >= 0 ) + { + // get level screenshot. reformat texture to 128x128 + path c ( s ); + deletePathFromFilename ( c ); + cutFilenameExtension ( c, c ); + c = path ( "levelshots/" ) + c; + + dimension2du dim ( 128, 128 ); + IVideoDriver * driver = Game->Device->getVideoDriver(); + IImage* image = 0; + ITexture *tex = 0; + path filename; + + filename = c + ".jpg"; + if ( fs->existFile ( filename ) ) + image = driver->createImageFromFile( filename ); + if ( 0 == image ) + { + filename = c + ".tga"; + if ( fs->existFile ( filename ) ) + image = driver->createImageFromFile( filename ); + } + + if ( image ) + { + IImage* filter = driver->createImage ( video::ECF_R8G8B8, dim ); + image->copyToScalingBoxFilter ( filter, 0 ); + image->drop (); + image = filter; + } + + if ( image ) + { + tex = driver->addTexture ( filename, image ); + image->drop (); + } + + + bank->setTexture ( g, tex ); + + r.LowerRightCorner.X = dim.Width; + r.LowerRightCorner.Y = dim.Height; + gui.MapList->setItemHeight ( r.LowerRightCorner.Y + 4 ); + frame.rectNumber = bank->getPositions().size(); + frame.textureNumber = g; + + bank->getPositions().push_back(r); + + sprite.Frames.set_used ( 0 ); + sprite.Frames.push_back(frame); + sprite.frameTime = 0; + bank->getSprites().push_back(sprite); + + gui.MapList->addItem ( s.c_str (), g ); + g += 1; + } + } + fileList->drop (); + + gui.MapList->setSelected ( -1 ); + IGUIScrollBar * bar = (IGUIScrollBar*)gui.MapList->getElementFromId( 0 ); + if ( bar ) + bar->setPos ( 0 ); + + } + +} + +/* + clears the Map in Memory +*/ +void CQuake3EventHandler::dropMap () +{ + IVideoDriver * driver = Game->Device->getVideoDriver(); + + driver->removeAllHardwareBuffers (); + driver->removeAllTextures (); + + Player[0].shutdown (); + + + dropElement ( ItemParent ); + dropElement ( ShaderParent ); + dropElement ( UnresolvedParent ); + dropElement ( FogParent ); + dropElement ( BulletParent ); + + + Impacts.clear(); + + if ( Meta ) + { + Meta = 0; + } + + dropElement ( MapParent ); + dropElement ( SkyNode ); + + // clean out meshes, because textures are invalid + // TODO: better texture handling;-) + IMeshCache *cache = Game->Device->getSceneManager ()->getMeshCache(); + cache->clear (); + Mesh = 0; +} + +/* Load new map +*/ +void CQuake3EventHandler::LoadMap ( const stringw &mapName, s32 collision ) +{ + if ( 0 == mapName.size() ) + return; + + dropMap (); + + IFileSystem *fs = Game->Device->getFileSystem(); + ISceneManager *smgr = Game->Device->getSceneManager (); + + IReadFile* file = fs->createMemoryReadFile(&Game->loadParam, + sizeof(Game->loadParam), L"levelparameter.cfg", false); + + // load cfg file + smgr->getMesh( file ); + file->drop (); + + // load the actual map + Mesh = (IQ3LevelMesh*) smgr->getMesh(mapName); + if ( 0 == Mesh ) + return; + + /* + add the geometry mesh to the Scene ( polygon & patches ) + The Geometry mesh is optimised for faster drawing + */ + + IMesh *geometry = Mesh->getMesh(E_Q3_MESH_GEOMETRY); + if ( 0 == geometry || geometry->getMeshBufferCount() == 0) + return; + + Game->CurrentMapName = mapName; + + //create a collision list + Meta = 0; + + ITriangleSelector * selector = 0; + if (collision) + Meta = smgr->createMetaTriangleSelector(); + + //IMeshBuffer *b0 = geometry->getMeshBuffer(0); + //s32 minimalNodes = b0 ? core::s32_max ( 2048, b0->getVertexCount() / 32 ) : 2048; + s32 minimalNodes = 2048; + + MapParent = smgr->addOctreeSceneNode(geometry, 0, -1, minimalNodes); + MapParent->setName ( mapName ); + if ( Meta ) + { + selector = smgr->createOctreeTriangleSelector( geometry,MapParent, minimalNodes); + //selector = smgr->createTriangleSelector ( geometry, MapParent ); + Meta->addTriangleSelector( selector); + selector->drop (); + } + + // logical parent for the items + ItemParent = smgr->addEmptySceneNode(); + if ( ItemParent ) + ItemParent->setName ( "Item Container" ); + + ShaderParent = smgr->addEmptySceneNode(); + if ( ShaderParent ) + ShaderParent->setName ( "Shader Container" ); + + UnresolvedParent = smgr->addEmptySceneNode(); + if ( UnresolvedParent ) + UnresolvedParent->setName ( "Unresolved Container" ); + + FogParent = smgr->addEmptySceneNode(); + if ( FogParent ) + FogParent->setName ( "Fog Container" ); + + // logical parent for the bullets + BulletParent = smgr->addEmptySceneNode(); + if ( BulletParent ) + BulletParent->setName ( "Bullet Container" ); + + /* + now construct SceneNodes for each Shader + The Objects are stored in the quake mesh E_Q3_MESH_ITEMS + and the Shader ID is stored in the MaterialParameters + mostly dark looking skulls and moving lava.. or green flashing tubes? + */ + Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_ITEMS,ShaderParent, Meta, false ); + Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_FOG,FogParent, 0, false ); + Q3ShaderFactory ( Game->loadParam, Game->Device, Mesh, E_Q3_MESH_UNRESOLVED,UnresolvedParent, Meta, true ); + + /* + Now construct Models from Entity List + */ + Q3ModelFactory ( Game->loadParam, Game->Device, Mesh, ItemParent, false ); +} + +/* + Adds a SceneNode with an icon to the Scene Tree +*/ +void CQuake3EventHandler::addSceneTreeItem( ISceneNode * parent, IGUITreeViewNode* nodeParent) +{ + IGUITreeViewNode* node; + wchar_t msg[128]; + + s32 imageIndex; + list::ConstIterator it = parent->getChildren().begin(); + for (; it != parent->getChildren().end(); ++it) + { + switch ( (*it)->getType () ) + { + case ESNT_Q3SHADER_SCENE_NODE: imageIndex = 0; break; + case ESNT_CAMERA: imageIndex = 1; break; + case ESNT_EMPTY: imageIndex = 2; break; + case ESNT_MESH: imageIndex = 3; break; + case ESNT_OCTREE: imageIndex = 3; break; + case ESNT_ANIMATED_MESH: imageIndex = 4; break; + case ESNT_SKY_BOX: imageIndex = 5; break; + case ESNT_BILLBOARD: imageIndex = 6; break; + case ESNT_PARTICLE_SYSTEM: imageIndex = 7; break; + case ESNT_TEXT: imageIndex = 8; break; + default:imageIndex = -1; break; + } + + if ( imageIndex < 0 ) + { + swprintf ( msg, 128, L"%hs,%hs", + Game->Device->getSceneManager ()->getSceneNodeTypeName ( (*it)->getType () ), + (*it)->getName() + ); + } + else + { + swprintf ( msg, 128, L"%hs",(*it)->getName() ); + } + + node = nodeParent->addChildBack( msg, 0, imageIndex ); + + // Add all Animators + list::ConstIterator ait = (*it)->getAnimators().begin(); + for (; ait != (*it)->getAnimators().end(); ++ait) + { + imageIndex = -1; + swprintf ( msg, 128, L"%hs", + Game->Device->getSceneManager ()->getAnimatorTypeName ( (*ait)->getType () ) + ); + + switch ( (*ait)->getType () ) + { + case ESNAT_FLY_CIRCLE: + case ESNAT_FLY_STRAIGHT: + case ESNAT_FOLLOW_SPLINE: + case ESNAT_ROTATION: + case ESNAT_TEXTURE: + case ESNAT_DELETION: + case ESNAT_COLLISION_RESPONSE: + case ESNAT_CAMERA_FPS: + case ESNAT_CAMERA_MAYA: + default: + break; + } + node->addChildBack( msg, 0, imageIndex ); + } + + addSceneTreeItem ( *it, node ); + } +} + + +// Adds life! +void CQuake3EventHandler::CreatePlayers() +{ + Player[0].create ( Game->Device, Mesh, MapParent, Meta ); +} + + +// Adds a skydome to the scene +void CQuake3EventHandler::AddSky( u32 dome, const c8 *texture) +{ + ISceneManager *smgr = Game->Device->getSceneManager (); + IVideoDriver * driver = Game->Device->getVideoDriver(); + + bool oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + if ( 0 == dome ) + { + // irrlicht order + //static const c8*p[] = { "ft", "lf", "bk", "rt", "up", "dn" }; + // quake3 order + static const c8*p[] = { "ft", "rt", "bk", "lf", "up", "dn" }; + + u32 i = 0; + snprintf ( buf, 64, "%s_%s.jpg", texture, p[i] ); + SkyNode = smgr->addSkyBoxSceneNode( driver->getTexture ( buf ), 0, 0, 0, 0, 0 ); + + if (SkyNode) + { + for ( i = 0; i < 6; ++i ) + { + snprintf ( buf, 64, "%s_%s.jpg", texture, p[i] ); + SkyNode->getMaterial(i).setTexture ( 0, driver->getTexture ( buf ) ); + } + } + } + else + if ( 1 == dome ) + { + snprintf ( buf, 64, "%s.jpg", texture ); + SkyNode = smgr->addSkyDomeSceneNode( + driver->getTexture( buf ), 32,32, + 1.f, 1.f, 1000.f, 0, 11); + } + else + if ( 2 == dome ) + { + snprintf ( buf, 64, "%s.jpg", texture ); + SkyNode = smgr->addSkyDomeSceneNode( + driver->getTexture( buf ), 16,8, + 0.95f, 2.f, 1000.f, 0, 11); + } + + if (SkyNode) + SkyNode->setName("Skydome"); + //SkyNode->getMaterial(0).ZBuffer = video::EMDF_DEPTH_LESS_EQUAL; + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); +} + + +// enable GUI elements +void CQuake3EventHandler::SetGUIActive( s32 command) +{ + bool inputState = false; + + ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera (); + + switch ( command ) + { + case 0: Game->guiActive = 0; inputState = !Game->guiActive; break; + case 1: Game->guiActive = 1; inputState = !Game->guiActive;;break; + case 2: Game->guiActive ^= 1; inputState = !Game->guiActive;break; + case 3: + if ( camera ) + inputState = !camera->isInputReceiverEnabled(); + break; + } + + if ( camera ) + { + camera->setInputReceiverEnabled ( inputState ); + Game->Device->getCursorControl()->setVisible( !inputState ); + } + + if ( gui.Window ) + { + gui.Window->setVisible ( Game->guiActive != 0 ); + } + + if ( Game->guiActive && + gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree + ) + { + gui.SceneTree->getRoot()->clearChildren(); + addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() ); + } + + Game->Device->getGUIEnvironment()->setFocus ( Game->guiActive ? gui.Window: 0 ); +} + + +/* + Handle game input +*/ +bool CQuake3EventHandler::OnEvent(const SEvent& eve) +{ + if ( eve.EventType == EET_LOG_TEXT_EVENT ) + { + return false; + } + + if ( Game->guiActive && eve.EventType == EET_GUI_EVENT ) + { + if ( eve.GUIEvent.Caller == gui.MapList && eve.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN ) + { + s32 selected = gui.MapList->getSelected(); + if ( selected >= 0 ) + { + stringw loadMap = gui.MapList->getListItem ( selected ); + if ( 0 == MapParent || loadMap != Game->CurrentMapName ) + { + printf ( "Loading map %ls\n", loadMap.c_str() ); + LoadMap ( loadMap , 1 ); + if ( 0 == Game->loadParam.loadSkyShader ) + { + AddSky ( 1, "skydome2" ); + } + CreatePlayers (); + CreateGUI (); + SetGUIActive ( 0 ); + return true; + } + } + } + else + if ( eve.GUIEvent.Caller == gui.ArchiveRemove && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + Game->Device->getFileSystem()->removeFileArchive( gui.ArchiveList->getSelected() ); + Game->CurrentMapName = ""; + AddArchive ( "" ); + } + else + if ( eve.GUIEvent.Caller == gui.ArchiveAdd && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + if ( 0 == gui.ArchiveFileOpen ) + { + Game->Device->getFileSystem()->setFileListSystem ( FILESYSTEM_NATIVE ); + gui.ArchiveFileOpen = Game->Device->getGUIEnvironment()->addFileOpenDialog ( L"Add Game Archive" , false,gui.Window ); + } + } + else + if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_SELECTED ) + { + AddArchive ( gui.ArchiveFileOpen->getFileName() ); + gui.ArchiveFileOpen = 0; + } + else + if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_DIRECTORY_SELECTED ) + { + AddArchive ( gui.ArchiveFileOpen->getDirectoryName() ); + } + else + if ( eve.GUIEvent.Caller == gui.ArchiveFileOpen && eve.GUIEvent.EventType == gui::EGET_FILE_CHOOSE_DIALOG_CANCELLED ) + { + gui.ArchiveFileOpen = 0; + } + else + if ( ( eve.GUIEvent.Caller == gui.ArchiveUp || eve.GUIEvent.Caller == gui.ArchiveDown ) && + eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + s32 rel = eve.GUIEvent.Caller == gui.ArchiveUp ? -1 : 1; + if ( Game->Device->getFileSystem()->moveFileArchive ( gui.ArchiveList->getSelected (), rel ) ) + { + s32 newIndex = core::s32_clamp ( gui.ArchiveList->getSelected() + rel, 0, gui.ArchiveList->getRowCount() - 1 ); + AddArchive ( "" ); + gui.ArchiveList->setSelected ( newIndex ); + Game->CurrentMapName = ""; + } + } + else + if ( eve.GUIEvent.Caller == gui.VideoDriver && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED ) + { + Game->deviceParam.DriverType = (E_DRIVER_TYPE) gui.VideoDriver->getItemData ( gui.VideoDriver->getSelected() ); + } + else + if ( eve.GUIEvent.Caller == gui.VideoMode && eve.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED ) + { + u32 val = gui.VideoMode->getItemData ( gui.VideoMode->getSelected() ); + Game->deviceParam.WindowSize.Width = val >> 16; + Game->deviceParam.WindowSize.Height = val & 0xFFFF; + } + else + if ( eve.GUIEvent.Caller == gui.FullScreen && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + { + Game->deviceParam.Fullscreen = gui.FullScreen->isChecked(); + } + else + if ( eve.GUIEvent.Caller == gui.Bit32 && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + { + Game->deviceParam.Bits = gui.Bit32->isChecked() ? 32 : 16; + } + else + if ( eve.GUIEvent.Caller == gui.MultiSample && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED ) + { + Game->deviceParam.AntiAlias = gui.MultiSample->getPos(); + } + else + if ( eve.GUIEvent.Caller == gui.Tesselation && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED ) + { + Game->loadParam.patchTesselation = gui.Tesselation->getPos (); + } + else + if ( eve.GUIEvent.Caller == gui.Gamma && eve.GUIEvent.EventType == gui::EGET_SCROLL_BAR_CHANGED ) + { + Game->GammaValue = gui.Gamma->getPos () * 0.01f; + Game->Device->setGammaRamp ( Game->GammaValue, Game->GammaValue, Game->GammaValue, 0.f, 0.f ); + } + else + if ( eve.GUIEvent.Caller == gui.SetVideoMode && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + Game->retVal = 2; + Game->Device->closeDevice(); + } + else + if ( eve.GUIEvent.Caller == gui.Window && eve.GUIEvent.EventType == gui::EGET_ELEMENT_CLOSED ) + { + Game->Device->closeDevice(); + } + else + if ( eve.GUIEvent.Caller == gui.Collision && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + { + // set fly through active + Game->flyTroughState ^= 1; + Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 ); + + printf ( "collision %d\n", Game->flyTroughState == 0 ); + } + else + if ( eve.GUIEvent.Caller == gui.Visible_Map && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + { + bool v = gui.Visible_Map->isChecked(); + + if ( MapParent ) + { + printf ( "static node set visible %d\n",v ); + MapParent->setVisible ( v ); + } + } + else + if ( eve.GUIEvent.Caller == gui.Visible_Shader && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + { + bool v = gui.Visible_Shader->isChecked(); + + if ( ShaderParent ) + { + printf ( "shader node set visible %d\n",v ); + ShaderParent->setVisible ( v ); + } + } + else + if ( eve.GUIEvent.Caller == gui.Visible_Skydome && eve.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + { + if ( SkyNode ) + { + bool v = !SkyNode->isVisible(); + printf ( "skynode set visible %d\n",v ); + SkyNode->setVisible ( v ); + } + } + else + if ( eve.GUIEvent.Caller == gui.Respawn && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + Player[0].respawn (); + } + + return false; + } + + // fire + if ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_SPACE && + eve.KeyInput.PressedDown == false) || + (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_LMOUSE_LEFT_UP) + ) + { + ICameraSceneNode * camera = Game->Device->getSceneManager()->getActiveCamera (); + if ( camera && camera->isInputReceiverEnabled () ) + { + useItem( Player + 0 ); + } + } + + // gui active + if ((eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_F1 && + eve.KeyInput.PressedDown == false) || + (eve.EventType == EET_MOUSE_INPUT_EVENT && eve.MouseInput.Event == EMIE_RMOUSE_LEFT_UP) + ) + { + SetGUIActive ( 2 ); + } + + // check if user presses the key + if ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.PressedDown == false) + { + // Escape toggles camera Input + if ( eve.KeyInput.Key == irr::KEY_ESCAPE ) + { + SetGUIActive ( 3 ); + } + else + if (eve.KeyInput.Key == KEY_F11) + { + // screenshot are taken without gamma! + IImage* image = Game->Device->getVideoDriver()->createScreenShot(); + if (image) + { + core::vector3df pos; + core::vector3df rot; + ICameraSceneNode * cam = Game->Device->getSceneManager()->getActiveCamera (); + if ( cam ) + { + pos = cam->getPosition (); + rot = cam->getRotation (); + } + + static const c8 *dName[] = { "null", "software", "burning", + "d3d8", "d3d9", "opengl" }; + + snprintf(buf, 256, "%s_%ls_%.0f_%.0f_%.0f_%.0f_%.0f_%.0f.jpg", + dName[Game->Device->getVideoDriver()->getDriverType()], + Game->CurrentMapName.c_str(), + pos.X, pos.Y, pos.Z, + rot.X, rot.Y, rot.Z + ); + path filename ( buf ); + filename.replace ( '/', '_' ); + printf ( "screenshot : %s\n", filename.c_str() ); + Game->Device->getVideoDriver()->writeImageToFile(image, filename, 100 ); + image->drop(); + } + } + else + if (eve.KeyInput.Key == KEY_F9) + { + s32 value = EDS_OFF; + + Game->debugState = ( Game->debugState + 1 ) & 3; + + switch ( Game->debugState ) + { + case 1: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL; break; + case 2: value = EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_SKELETON; break; + } +/* + // set debug map data on/off + debugState = debugState == EDS_OFF ? + EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL: + EDS_OFF; +*/ + if ( ItemParent ) + { + list::ConstIterator it = ItemParent->getChildren().begin(); + for (; it != ItemParent->getChildren().end(); ++it) + { + (*it)->setDebugDataVisible ( value ); + } + } + + if ( ShaderParent ) + { + list::ConstIterator it = ShaderParent->getChildren().begin(); + for (; it != ShaderParent->getChildren().end(); ++it) + { + (*it)->setDebugDataVisible ( value ); + } + } + + if ( UnresolvedParent ) + { + list::ConstIterator it = UnresolvedParent->getChildren().begin(); + for (; it != UnresolvedParent->getChildren().end(); ++it) + { + (*it)->setDebugDataVisible ( value ); + } + } + + if ( FogParent ) + { + list::ConstIterator it = FogParent->getChildren().begin(); + for (; it != FogParent->getChildren().end(); ++it) + { + (*it)->setDebugDataVisible ( value ); + } + } + + if ( SkyNode ) + { + SkyNode->setDebugDataVisible ( value ); + } + + } + else + if (eve.KeyInput.Key == KEY_F8) + { + // set gravity on/off + Game->gravityState ^= 1; + Player[0].cam()->setGravity ( getGravity ( Game->gravityState ? "earth" : "none" ) ); + printf ( "gravity %s\n", Game->gravityState ? "earth" : "none" ); + } + else + if (eve.KeyInput.Key == KEY_F7) + { + // set fly through active + Game->flyTroughState ^= 1; + Player[0].cam()->setAnimateTarget ( Game->flyTroughState == 0 ); + if ( gui.Collision ) + gui.Collision->setChecked ( Game->flyTroughState == 0 ); + + printf ( "collision %d\n", Game->flyTroughState == 0 ); + } + else + if (eve.KeyInput.Key == KEY_F2) + { + Player[0].respawn (); + } + else + if (eve.KeyInput.Key == KEY_F3) + { + if ( MapParent ) + { + bool v = !MapParent->isVisible (); + printf ( "static node set visible %d\n",v ); + MapParent->setVisible ( v ); + if ( gui.Visible_Map ) + gui.Visible_Map->setChecked ( v ); + } + } + else + if (eve.KeyInput.Key == KEY_F4) + { + if ( ShaderParent ) + { + bool v = !ShaderParent->isVisible (); + printf ( "shader node set visible %d\n",v ); + ShaderParent->setVisible ( v ); + if ( gui.Visible_Shader ) + gui.Visible_Shader->setChecked ( v ); + } + } + else + if (eve.KeyInput.Key == KEY_F5) + { + if ( FogParent ) + { + bool v = !FogParent->isVisible (); + printf ( "fog node set visible %d\n",v ); + FogParent->setVisible ( v ); + if ( gui.Visible_Fog ) + gui.Visible_Fog->setChecked ( v ); + } + + } + else + if (eve.KeyInput.Key == KEY_F6) + { + if ( UnresolvedParent ) + { + bool v = !UnresolvedParent->isVisible (); + printf ( "unresolved node set visible %d\n",v ); + UnresolvedParent->setVisible ( v ); + if ( gui.Visible_Unresolved ) + gui.Visible_Unresolved->setChecked ( v ); + } + } + } + + // check if user presses the key C ( for crouch) + if ( eve.EventType == EET_KEY_INPUT_EVENT && eve.KeyInput.Key == KEY_KEY_C ) + { + // crouch + ISceneNodeAnimatorCollisionResponse *anim = Player[0].cam (); + if ( anim && 0 == Game->flyTroughState ) + { + if ( false == eve.KeyInput.PressedDown ) + { + // stand up + anim->setEllipsoidRadius ( vector3df(30,45,30) ); + anim->setEllipsoidTranslation ( vector3df(0,40,0)); + + } + else + { + // on your knees + anim->setEllipsoidRadius ( vector3df(30,20,30) ); + anim->setEllipsoidTranslation ( vector3df(0,20,0)); + } + return true; + } + } + return false; +} + + + +/* + useItem +*/ +void CQuake3EventHandler::useItem( Q3Player * player) +{ + ISceneManager* smgr = Game->Device->getSceneManager(); + ICameraSceneNode* camera = smgr->getActiveCamera(); + + if (!camera) + return; + + SParticleImpact imp; + imp.when = 0; + + // get line of camera + + vector3df start = camera->getPosition(); + + if ( player->WeaponNode ) + { + start.X += 0.f; + start.Y += 0.f; + start.Z += 0.f; + } + + vector3df end = (camera->getTarget() - start); + end.normalize(); + start += end*20.0f; + + end = start + (end * camera->getFarValue()); + + triangle3df triangle; + line3d line(start, end); + + // get intersection point with map + scene::ISceneNode* hitNode; + if (smgr->getSceneCollisionManager()->getCollisionPoint( + line, Meta, end, triangle,hitNode)) + { + // collides with wall + vector3df out = triangle.getNormal(); + out.setLength(0.03f); + + imp.when = 1; + imp.outVector = out; + imp.pos = end; + + player->setAnim ( "pow" ); + player->Anim[1].next += player->Anim[1].delta; + } + else + { + // doesnt collide with wall + vector3df start = camera->getPosition(); + if ( player->WeaponNode ) + { + //start.X += 10.f; + //start.Y += -5.f; + //start.Z += 1.f; + } + + vector3df end = (camera->getTarget() - start); + end.normalize(); + start += end*20.0f; + end = start + (end * camera->getFarValue()); + } + + // create fire ball + ISceneNode* node = 0; + node = smgr->addBillboardSceneNode( BulletParent,dimension2d(10,10), start); + + node->setMaterialFlag(EMF_LIGHTING, false); + node->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture("fireball.bmp")); + node->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + node->setMaterialType(EMT_TRANSPARENT_ADD_COLOR); + + f32 length = (f32)(end - start).getLength(); + const f32 speed = 5.8f; + u32 time = (u32)(length / speed); + + ISceneNodeAnimator* anim = 0; + + // set flight line + + anim = smgr->createFlyStraightAnimator(start, end, time); + node->addAnimator(anim); + anim->drop(); + + snprintf ( buf, 64, "bullet: %s on %.1f,%1.f,%1.f", + imp.when ? "hit" : "nohit", end.X, end.Y, end.Z ); + node->setName ( buf ); + + + anim = smgr->createDeleteAnimator(time); + node->addAnimator(anim); + anim->drop(); + + if (imp.when) + { + // create impact note + imp.when = Game->Device->getTimer()->getTime() + + (time + (s32) ( ( 1.f + Noiser::get() ) * 250.f )); + Impacts.push_back(imp); + } + + // play sound +} + +// rendered when bullets hit something +void CQuake3EventHandler::createParticleImpacts( u32 now ) +{ + ISceneManager* sm = Game->Device->getSceneManager(); + + struct smokeLayer + { + const c8 * texture; + f32 scale; + f32 minparticleSize; + f32 maxparticleSize; + f32 boxSize; + u32 minParticle; + u32 maxParticle; + u32 fadeout; + u32 lifetime; + }; + + smokeLayer smoke[] = + { + { "smoke2.jpg", 0.4f, 1.5f, 18.f, 20.f, 20, 50, 2000, 10000 }, + { "smoke3.jpg", 0.2f, 1.2f, 15.f, 20.f, 10, 30, 1000, 12000 } + }; + + + u32 i; + u32 g; + s32 factor = 1; + for ( g = 0; g != 2; ++g ) + { + smoke[g].minParticle *= factor; + smoke[g].maxParticle *= factor; + smoke[g].lifetime *= factor; + smoke[g].boxSize *= Noiser::get() * 0.5f; + } + + for ( i=0; i < Impacts.size(); ++i) + { + if (now < Impacts[i].when) + continue; + + // create smoke particle system + IParticleSystemSceneNode* pas = 0; + + for ( g = 0; g != 2; ++g ) + { + pas = sm->addParticleSystemSceneNode(false, BulletParent, -1, Impacts[i].pos); + + snprintf ( buf, 64, "bullet impact smoke at %.1f,%.1f,%1.f", + Impacts[i].pos.X,Impacts[i].pos.Y,Impacts[i].pos.Z); + pas->setName ( buf ); + + // create a flat smoke + vector3df direction = Impacts[i].outVector; + direction *= smoke[g].scale; + IParticleEmitter* em = pas->createBoxEmitter( + aabbox3d(-4.f,0.f,-4.f,20.f,smoke[g].minparticleSize,20.f), + direction,smoke[g].minParticle, smoke[g].maxParticle, + video::SColor(0,0,0,0),video::SColor(0,128,128,128), + 250,4000, 60); + + em->setMinStartSize (dimension2d( smoke[g].minparticleSize, smoke[g].minparticleSize)); + em->setMaxStartSize (dimension2d( smoke[g].maxparticleSize, smoke[g].maxparticleSize)); + + pas->setEmitter(em); + em->drop(); + + // particles get invisible + IParticleAffector* paf = pas->createFadeOutParticleAffector( + video::SColor ( 0, 0, 0, 0 ), smoke[g].fadeout); + pas->addAffector(paf); + paf->drop(); + + // particle system life time + ISceneNodeAnimator* anim = sm->createDeleteAnimator( smoke[g].lifetime); + pas->addAnimator(anim); + anim->drop(); + + pas->setMaterialFlag(video::EMF_LIGHTING, false); + pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); + pas->setMaterialTexture(0, Game->Device->getVideoDriver()->getTexture( smoke[g].texture )); + } + + + // play impact sound + #ifdef USE_IRRKLANG +/* + if (irrKlang) + { + audio::ISound* sound = + irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true); + + if (sound) + { + // adjust max value a bit to make to sound of an impact louder + sound->setMinDistance(400); + sound->drop(); + } + } +*/ + #endif + + + // delete entry + Impacts.erase(i); + i--; + } +} + +/* + render +*/ +void CQuake3EventHandler::Render() +{ + IVideoDriver * driver = Game->Device->getVideoDriver(); + if ( 0 == driver ) + return; + + // TODO: This does not work, yet. + const bool anaglyph=false; + if (anaglyph) + { + scene::ICameraSceneNode* cameraOld = Game->Device->getSceneManager()->getActiveCamera(); + driver->beginScene(true, true, SColor(0,0,0,0)); + driver->getOverrideMaterial().Material.ColorMask = ECP_NONE; + driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK; + driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX + + ESNRP_SOLID + + ESNRP_TRANSPARENT + + ESNRP_TRANSPARENT_EFFECT + + ESNRP_SHADOW; + Game->Device->getSceneManager()->drawAll(); + driver->clearZBuffer(); + + const vector3df oldPosition = cameraOld->getPosition(); + const vector3df oldTarget = cameraOld->getTarget(); + const matrix4 startMatrix = cameraOld->getAbsoluteTransformation(); + const vector3df focusPoint = (oldTarget - + cameraOld->getAbsolutePosition()).setLength(10000) + + cameraOld->getAbsolutePosition() ; + + scene::ICameraSceneNode* camera = cameraOld;//Game->Device->getSceneManager()->addCameraSceneNode(); + + //Left eye... + vector3df pos; + matrix4 move; + + move.setTranslation( vector3df(-1.5f,0.0f,0.0f) ); + pos=(startMatrix*move).getTranslation(); + + driver->getOverrideMaterial().Material.ColorMask = ECP_RED; + driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK; + driver->getOverrideMaterial().EnablePasses = + ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT| + ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW; + + camera->setPosition(pos); + camera->setTarget(focusPoint); + + Game->Device->getSceneManager()->drawAll(); + driver->clearZBuffer(); + + //Right eye... + move.setTranslation( vector3df(1.5f,0.0f,0.0f) ); + pos=(startMatrix*move).getTranslation(); + + driver->getOverrideMaterial().Material.ColorMask = ECP_GREEN + ECP_BLUE; + driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK; + driver->getOverrideMaterial().EnablePasses = + ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT| + ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW; + + camera->setPosition(pos); + camera->setTarget(focusPoint); + + Game->Device->getSceneManager()->drawAll(); + + driver->getOverrideMaterial().Material.ColorMask=ECP_ALL; + driver->getOverrideMaterial().EnableFlags=0; + driver->getOverrideMaterial().EnablePasses=0; + + if (camera != cameraOld) + { + Game->Device->getSceneManager()->setActiveCamera(cameraOld); + camera->remove(); + } + else + { + camera->setPosition(oldPosition); + camera->setTarget(oldTarget); + } + } + else + { + driver->beginScene(true, true, SColor(0,0,0,0)); + Game->Device->getSceneManager()->drawAll(); + } + Game->Device->getGUIEnvironment()->drawAll(); + driver->endScene(); +} + +/* + update the generic scene node +*/ +void CQuake3EventHandler::Animate() +{ + u32 now = Game->Device->getTimer()->getTime(); + + Q3Player * player = Player + 0; + + checkTimeFire ( player->Anim, 4, now ); + + // Query Scene Manager attributes + if ( player->Anim[0].flags & FIRED ) + { + ISceneManager *smgr = Game->Device->getSceneManager (); + wchar_t msg[128]; + IVideoDriver * driver = Game->Device->getVideoDriver(); + + IAttributes * attr = smgr->getParameters(); +#ifdef _IRR_SCENEMANAGER_DEBUG + swprintf ( msg, 128, + L"Q3 %s [%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)", + Game->CurrentMapName.c_str(), + driver->getName(), + driver->getFPS (), + (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ), + attr->getAttributeAsInt ( "culled" ), + attr->getAttributeAsInt ( "calls" ), + attr->getAttributeAsInt ( "drawn_solid" ), + attr->getAttributeAsInt ( "drawn_transparent" ), + attr->getAttributeAsInt ( "drawn_transparent_effect" ) + ); +#else +swprintf ( msg, 128, + L"Q3 %s [%ls], FPS:%03d Tri:%.03fm", + Game->CurrentMapName.c_str(), + driver->getName(), + driver->getFPS (), + (f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ) + ); +#endif + Game->Device->setWindowCaption( msg ); + + swprintf ( msg, 128, + L"%03d fps, F1 GUI on/off, F2 respawn, F3-F6 toggle Nodes, F7 Collision on/off" + L", F8 Gravity on/off, Right Mouse Toggle GUI", + Game->Device->getVideoDriver()->getFPS () + ); + if ( gui.StatusLine ) + gui.StatusLine->setText ( msg ); + player->Anim[0].flags &= ~FIRED; + } + + // idle.. + if ( player->Anim[1].flags & FIRED ) + { + if ( strcmp ( player->animation, "idle" ) ) + player->setAnim ( "idle" ); + + player->Anim[1].flags &= ~FIRED; + } + + createParticleImpacts ( now ); + +} + + +/* The main game states +*/ +void runGame ( GameData *game ) +{ + if ( game->retVal >= 3 ) + return; + + game->Device = (*game->createExDevice) ( game->deviceParam ); + if ( 0 == game->Device) + { + // could not create selected driver. + game->retVal = 0; + return; + } + + // create an event receiver based on current game data + CQuake3EventHandler *eventHandler = new CQuake3EventHandler( game ); + + // load stored config + game->load ( "explorer.cfg" ); + + // add our media directory and archive to the file system + for ( u32 i = 0; i < game->CurrentArchiveList.size(); ++i ) + { + eventHandler->AddArchive ( game->CurrentArchiveList[i] ); + } + + // Load a Map or startup to the GUI + if ( game->CurrentMapName.size () ) + { + eventHandler->LoadMap ( game->CurrentMapName, 1 ); + if ( 0 == game->loadParam.loadSkyShader ) + eventHandler->AddSky ( 1, "skydome2" ); + eventHandler->CreatePlayers (); + eventHandler->CreateGUI (); + eventHandler->SetGUIActive ( 0 ); + + // set player to last position on restart + if ( game->retVal == 2 ) + { + eventHandler->GetPlayer( 0 )->setpos ( game->PlayerPosition, game->PlayerRotation ); + } + } + else + { + // start up empty + eventHandler->AddSky ( 1, "skydome2" ); + eventHandler->CreatePlayers (); + eventHandler->CreateGUI (); + eventHandler->SetGUIActive ( 1 ); + background_music ( "IrrlichtTheme.ogg" ); + } + + + game->retVal = 3; + while( game->Device->run() ) + { + eventHandler->Animate (); + eventHandler->Render (); + //if ( !game->Device->isWindowActive() ) + game->Device->yield(); + } + + game->Device->setGammaRamp ( 1.f, 1.f, 1.f, 0.f, 0.f ); + delete eventHandler; +} + +#if defined (_IRR_WINDOWS_) && 0 + #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") +#endif + + +/* The main routine, doing all setup +*/ +int IRRCALLCONV main(int argc, char* argv[]) +{ + path prgname(argv[0]); + GameData game ( deletePathFromPath ( prgname, 1 ) ); + + // dynamically load irrlicht + const c8 * dllName = argc > 1 ? argv[1] : "irrlicht.dll"; + game.createExDevice = load_createDeviceEx ( dllName ); + if ( 0 == game.createExDevice ) + { + game.retVal = 3; + printf ( "Could not load %s.\n", dllName ); + return game.retVal; // could not load dll + } + + // start without asking for driver + game.retVal = 1; + do + { + // if driver could not created, ask for another driver + if ( game.retVal == 0 ) + { + game.setDefault (); + // ask user for driver + game.deviceParam.DriverType=driverChoiceConsole(); + if (game.deviceParam.DriverType==video::EDT_COUNT) + game.retVal = 3; + } + runGame ( &game ); + } while ( game.retVal < 3 ); + + return game.retVal; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.cpp b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.cpp new file mode 100644 index 0000000..d0f09b2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.cpp @@ -0,0 +1,824 @@ +/*! + Model Factory. + create the additional scenenodes for ( bullets, health... ) + + Defines the Entities for Quake3 +*/ + +#include +#include "q3factory.h" +#include "sound.h" + +using namespace irr; +using namespace scene; +using namespace gui; +using namespace video; +using namespace core; +using namespace quake3; + +//! This list is based on the original quake3. +static const SItemElement Quake3ItemElement [] = { +{ "item_health", + {"models/powerups/health/medium_cross.md3", + "models/powerups/health/medium_sphere.md3"}, + "sound/items/n_health.wav", + "icons/iconh_yellow", + "25 Health", + 25, + HEALTH, + SUB_NONE, + SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1 +}, +{ "item_health_large", + "models/powerups/health/large_cross.md3", + "models/powerups/health/large_sphere.md3", + "sound/items/l_health.wav", + "icons/iconh_red", + "50 Health", + 50, + HEALTH, + SUB_NONE, + SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1 +}, +{ + "item_health_mega", + "models/powerups/health/mega_cross.md3", + "models/powerups/health/mega_sphere.md3", + "sound/items/m_health.wav", + "icons/iconh_mega", + "Mega Health", + 100, + HEALTH, + SUB_NONE, + SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1 +}, +{ + "item_health_small", + "models/powerups/health/small_cross.md3", + "models/powerups/health/small_sphere.md3", + "sound/items/s_health.wav", + "icons/iconh_green", + "5 Health", + 5, + HEALTH, + SUB_NONE, + SPECIAL_SFX_BOUNCE | SPECIAL_SFX_ROTATE_1 +}, +{ "ammo_bullets", + "models/powerups/ammo/machinegunam.md3", + "", + "sound/misc/am_pkup.wav", + "icons/icona_machinegun", + "Bullets", + 50, + AMMO, + MACHINEGUN, + SPECIAL_SFX_BOUNCE, +}, +{ + "ammo_cells", + "models/powerups/ammo/plasmaam.md3", + "", + "sound/misc/am_pkup.wav", + "icons/icona_plasma", + "Cells", + 30, + AMMO, + PLASMAGUN, + SPECIAL_SFX_BOUNCE +}, +{ "ammo_rockets", + "models/powerups/ammo/rocketam.md3", + "", + "", + "icons/icona_rocket", + "Rockets", + 5, + AMMO, + ROCKET_LAUNCHER, + SPECIAL_SFX_ROTATE +}, +{ + "ammo_shells", + "models/powerups/ammo/shotgunam.md3", + "", + "sound/misc/am_pkup.wav", + "icons/icona_shotgun", + "Shells", + 10, + AMMO, + SHOTGUN, + SPECIAL_SFX_ROTATE +}, +{ + "ammo_slugs", + "models/powerups/ammo/railgunam.md3", + "", + "sound/misc/am_pkup.wav", + "icons/icona_railgun", + "Slugs", + 10, + AMMO, + RAILGUN, + SPECIAL_SFX_ROTATE +}, +{ + "item_armor_body", + "models/powerups/armor/armor_red.md3", + "", + "sound/misc/ar2_pkup.wav", + "icons/iconr_red", + "Heavy Armor", + 100, + ARMOR, + SUB_NONE, + SPECIAL_SFX_ROTATE +}, +{ + "item_armor_combat", + "models/powerups/armor/armor_yel.md3", + "", + "sound/misc/ar2_pkup.wav", + "icons/iconr_yellow", + "Armor", + 50, + ARMOR, + SUB_NONE, + SPECIAL_SFX_ROTATE +}, +{ + "item_armor_shard", + "models/powerups/armor/shard.md3", + "", + "sound/misc/ar1_pkup.wav", + "icons/iconr_shard", + "Armor Shared", + 5, + ARMOR, + SUB_NONE, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_gauntlet", + "models/weapons2/gauntlet/gauntlet.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_gauntlet", + "Gauntlet", + 0, + WEAPON, + GAUNTLET, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_shotgun", + "models/weapons2/shotgun/shotgun.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_shotgun", + "Shotgun", + 10, + WEAPON, + SHOTGUN, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_machinegun", + "models/weapons2/machinegun/machinegun.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_machinegun", + "Machinegun", + 40, + WEAPON, + MACHINEGUN, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_grenadelauncher", + "models/weapons2/grenadel/grenadel.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_grenade", + "Grenade Launcher", + 10, + WEAPON, + GRENADE_LAUNCHER, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_rocketlauncher", + "models/weapons2/rocketl/rocketl.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_rocket", + "Rocket Launcher", + 10, + WEAPON, + ROCKET_LAUNCHER, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_lightning", + "models/weapons2/lightning/lightning.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_lightning", + "Lightning Gun", + 100, + WEAPON, + LIGHTNING, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_railgun", + "models/weapons2/railgun/railgun.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_railgun", + "Railgun", + 10, + WEAPON, + RAILGUN, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_plasmagun", + "models/weapons2/plasma/plasma.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_plasma", + "Plasma Gun", + 50, + WEAPON, + PLASMAGUN, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_bfg", + "models/weapons2/bfg/bfg.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_bfg", + "BFG10K", + 20, + WEAPON, + BFG, + SPECIAL_SFX_ROTATE +}, +{ + "weapon_grapplinghook", + "models/weapons2/grapple/grapple.md3", + "", + "sound/misc/w_pkup.wav", + "icons/iconw_grapple", + "Grappling Hook", + 0, + WEAPON, + GRAPPLING_HOOK, + SPECIAL_SFX_ROTATE +}, +{ + 0 +} + +}; + + +/*! +*/ +const SItemElement * getItemElement ( const stringc& key ) +{ + const SItemElement *item = Quake3ItemElement; + + while ( item->key ) + { + if ( 0 == strcmp ( key.c_str(), item->key ) ) + return item; + item += 1; + } + return 0; +} + +/*! + Quake3 Model Factory. + Takes the mesh buffers and creates scenenodes for their associated shaders +*/ +void Q3ShaderFactory ( Q3LevelLoadParameter &loadParam, + IrrlichtDevice *device, + IQ3LevelMesh* mesh, + eQ3MeshIndex meshIndex, + ISceneNode *parent, + IMetaTriangleSelector *meta, + bool showShaderName ) +{ + if ( 0 == mesh || 0 == device ) + return; + + IMeshSceneNode* node = 0; + ISceneManager* smgr = device->getSceneManager(); + ITriangleSelector * selector = 0; + + // the additional mesh can be quite huge and is unoptimized + // Save to cast to SMesh + SMesh * additional_mesh = (SMesh*) mesh->getMesh ( meshIndex ); + if ( 0 == additional_mesh || additional_mesh->getMeshBufferCount() == 0) + return; + + char buf[128]; + if ( loadParam.verbose > 0 ) + { + loadParam.startTime = device->getTimer()->getRealTime(); + if ( loadParam.verbose > 1 ) + { + snprintf(buf, 128, "q3shaderfactory start" ); + device->getLogger()->log( buf, ELL_INFORMATION); + } + } + + IGUIFont *font = 0; + if ( showShaderName ) + font = device->getGUIEnvironment()->getFont("fontlucida.png"); + + IVideoDriver *driver = device->getVideoDriver(); + + // create helper textures + if ( 1 ) + { + tTexArray tex; + u32 pos = 0; + getTextures ( tex, "$redimage $blueimage $whiteimage $checkerimage", pos, + device->getFileSystem(), driver ); + } + + s32 sceneNodeID = 0; + for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount (); ++i ) + { + IMeshBuffer *meshBuffer = additional_mesh->getMeshBuffer ( i ); + const SMaterial &material = meshBuffer->getMaterial(); + + //! The ShaderIndex is stored in the second material parameter + s32 shaderIndex = (s32) material.MaterialTypeParam2; + + // the meshbuffer can be rendered without additional support, or it has no shader + IShader *shader = (IShader *) mesh->getShader ( shaderIndex ); + + // no shader, or mapped to existing material + if ( 0 == shader ) + { + +#if 1 + // clone mesh + SMesh * m = new SMesh (); + m->addMeshBuffer ( meshBuffer ); + SMaterial &mat = m->getMeshBuffer( 0 )->getMaterial(); + if ( mat.getTexture( 0 ) == 0 ) + mat.setTexture ( 0, driver->getTexture ( "$blueimage" ) ); + if ( mat.getTexture( 1 ) == 0 ) + mat.setTexture ( 1, driver->getTexture ( "$redimage" ) ); + + IMesh * store = smgr->getMeshManipulator ()->createMeshWith2TCoords ( m ); + m->drop(); + + node = smgr->addMeshSceneNode ( store, parent, sceneNodeID ); + node->setAutomaticCulling ( scene::EAC_OFF ); + store->drop (); + sceneNodeID += 1; +#endif + } + else if ( 1 ) + { +/* + stringc s; + dumpShader ( s, shader ); + printf ( s.c_str () ); +*/ + // create sceneNode + node = smgr->addQuake3SceneNode ( meshBuffer, shader, parent, sceneNodeID ); + node->setAutomaticCulling ( scene::EAC_FRUSTUM_BOX ); + sceneNodeID += 1; + } + + // show Debug Shader Name + if ( showShaderName && node ) + { + swprintf ( (wchar_t*) buf, 64, L"%hs:%d", node->getName(),node->getID() ); + smgr->addBillboardTextSceneNode( + font, + (wchar_t*) buf, + node, + dimension2d(80.0f, 8.0f), + vector3df(0, 10, 0), + sceneNodeID); + sceneNodeID += 1; + } + + // create Portal Rendertargets + if ( shader ) + { + const SVarGroup *group = shader->getGroup(1); + if ( group->isDefined( "surfaceparm", "portal" ) ) + { + } + + } + + + // add collision + // find out if shader is marked as nonsolid + u8 doCreate = meta !=0 ; + + if ( shader ) + { + const SVarGroup *group = shader->getGroup(1); + if ( group->isDefined( "surfaceparm", "trans" ) + // || group->isDefined( "surfaceparm", "sky" ) + // || group->isDefined( "surfaceparm", "nonsolid" ) + ) + { + if ( !group->isDefined( "surfaceparm", "metalsteps" ) ) + { + doCreate = 0; + } + } + } + + if ( doCreate ) + { + IMesh *m = 0; + + //! controls if triangles are modified by the scenenode during runtime + bool takeOriginal = true; + + if ( takeOriginal ) + { + m = new SMesh (); + ((SMesh*) m )->addMeshBuffer (meshBuffer); + } + else + { + m = node->getMesh(); + } + + //selector = smgr->createOctreeTriangleSelector ( m, 0, 128 ); + selector = smgr->createTriangleSelector ( m, 0 ); + meta->addTriangleSelector ( selector ); + selector->drop (); + + if ( takeOriginal ) + { + delete m; + } + } + + } + +#if 0 + if ( meta ) + { + selector = smgr->createOctreeTriangleSelector ( additional_mesh, 0 ); + meta->addTriangleSelector ( selector ); + selector->drop (); + } +#endif + + if ( loadParam.verbose > 0 ) + { + loadParam.endTime = device->getTimer()->getRealTime (); + snprintf(buf, 128, "q3shaderfactory needed %04d ms to create %d shader nodes", + loadParam.endTime - loadParam.startTime, + sceneNodeID + ); + device->getLogger()->log(buf, ELL_INFORMATION); + } + +} + + +/*! + create Items from Entity +*/ +void Q3ModelFactory ( Q3LevelLoadParameter &loadParam, + IrrlichtDevice *device, + IQ3LevelMesh* masterMesh, + ISceneNode *parent, + bool showShaderName + ) +{ + if ( 0 == masterMesh ) + return; + + tQ3EntityList &entity = masterMesh->getEntityList (); + ISceneManager* smgr = device->getSceneManager(); + + + char buf[128]; + const SVarGroup *group; + IEntity search; + s32 index; + s32 lastIndex; + +/* + stringc s; + FILE *f = 0; + f = fopen ( "entity.txt", "wb" ); + for ( index = 0; (u32) index < entityList.size (); ++index ) + { + const IEntity *entity = &entityList[ index ]; + s = entity->name; + dumpShader ( s, entity ); + fwrite ( s.c_str(), 1, s.size(), f ); + } + fclose ( f ); +*/ + IAnimatedMeshMD3* model; + SMD3Mesh * mesh; + const SMD3MeshBuffer *meshBuffer; + IMeshSceneNode* node; + ISceneNodeAnimator* anim; + const IShader *shader; + u32 pos; + vector3df p; + u32 nodeCount = 0; + tTexArray textureArray; + + IGUIFont *font = 0; + if ( showShaderName ) + font = device->getGUIEnvironment()->getFont("fontlucida.png"); + + const SItemElement *itemElement; + + // walk list + for ( index = 0; (u32) index < entity.size(); ++index ) + { + itemElement = getItemElement ( entity[index].name ); + if ( 0 == itemElement ) + continue; + + pos = 0; + p = getAsVector3df ( entity[index].getGroup(1)->get ( "origin" ), pos ); + + nodeCount += 1; + for ( u32 g = 0; g < 2; ++g ) + { + if ( 0 == itemElement->model[g] || itemElement->model[g][0] == 0 ) + continue; + model = (IAnimatedMeshMD3*) smgr->getMesh( itemElement->model[g] ); + if ( 0 == model ) + continue; + + mesh = model->getOriginalMesh(); + for ( u32 j = 0; j != mesh->Buffer.size (); ++j ) + { + meshBuffer = mesh->Buffer[j]; + if ( 0 == meshBuffer ) + continue; + + shader = masterMesh->getShader ( meshBuffer->Shader.c_str(), false ); + IMeshBuffer *final = model->getMesh(0)->getMeshBuffer(j); + if ( shader ) + { + //!TODO: Hack don't modify the vertexbuffer. make it better;-) + final->getMaterial().ColorMask = 0; + node = smgr->addQuake3SceneNode ( final, shader, parent ); + final->getMaterial().ColorMask = 15; + } + else + { + // clone mesh + SMesh * m = new SMesh (); + m->addMeshBuffer ( final ); + node = smgr->addMeshSceneNode ( m, parent ); + m->drop(); + } + + if ( 0 == node ) + { + snprintf ( buf, 128, "q3ModelFactory shader %s failed", meshBuffer->Shader.c_str() ); + device->getLogger()->log ( buf ); + continue; + } + + // node was maybe centered by shaderscenenode + node->setPosition ( p ); + node->setName ( meshBuffer->Shader ); + node->setAutomaticCulling ( scene::EAC_BOX ); + + // add special effects to node + if ( itemElement->special & SPECIAL_SFX_ROTATE || + (g == 0 && itemElement->special & SPECIAL_SFX_ROTATE_1) + ) + { + anim = smgr->createRotationAnimator ( vector3df ( 0.f, + 2.f, 0.f ) ); + node->addAnimator ( anim ); + anim->drop (); + } + + if ( itemElement->special & SPECIAL_SFX_BOUNCE ) + { + //anim = smgr->createFlyStraightAnimator ( + // p, p + vector3df ( 0.f, 60.f, 0.f ), 1000, true, true ); + anim = smgr->createFlyCircleAnimator ( + p + vector3df( 0.f, 20.f, 0.f ), + 20.f, + 0.005f, + vector3df ( 1.f, 0.f, 0.f ), + core::fract ( nodeCount * 0.05f ), + 1.f + ); + node->addAnimator ( anim ); + anim->drop (); + } + } + } + // show name + if ( showShaderName ) + { + swprintf ( (wchar_t*) buf, sizeof(buf) / 2, L"%hs", itemElement->key ); + smgr->addBillboardTextSceneNode( + font, + (wchar_t*) buf, + parent, + dimension2d(80.0f, 8.0f), + p + vector3df(0, 30, 0), + 0); + } + } + + // music + search.name = "worldspawn"; + index = entity.binary_search_multi ( search, lastIndex ); + + if ( index >= 0 ) + { + group = entity[ index ].getGroup(1); + background_music ( group->get ( "music" ).c_str () ); + } + + // music + search.name = "worldspawn"; + index = entity.binary_search_multi ( search, lastIndex ); + + if ( index >= 0 ) + { + group = entity[ index ].getGroup(1); + background_music ( group->get ( "music" ).c_str () ); + } + + //IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2"); + //IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); + +} + +/*! + so we need a good starting Position in the level. + we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" +*/ +s32 Q3StartPosition ( IQ3LevelMesh* mesh, + ICameraSceneNode* camera, + s32 startposIndex, + const vector3df &translation + ) +{ + if ( 0 == mesh ) + return 0; + + tQ3EntityList &entityList = mesh->getEntityList (); + + IEntity search; + search.name = "info_player_start"; // "info_player_deathmatch"; + + // find all entities in the multi-list + s32 lastIndex; + s32 index = entityList.binary_search_multi ( search, lastIndex ); + + if ( index < 0 ) + { + search.name = "info_player_deathmatch"; + index = entityList.binary_search_multi ( search, lastIndex ); + } + + if ( index < 0 ) + return 0; + + index += core::clamp ( startposIndex, 0, lastIndex - index ); + + u32 parsepos; + + const SVarGroup *group; + group = entityList[ index ].getGroup(1); + + parsepos = 0; + vector3df pos = getAsVector3df ( group->get ( "origin" ), parsepos ); + pos += translation; + + parsepos = 0; + f32 angle = getAsFloat ( group->get ( "angle"), parsepos ); + + vector3df target ( 0.f, 0.f, 1.f ); + target.rotateXZBy ( angle - 90.f, vector3df () ); + + if ( camera ) + { + camera->setPosition ( pos ); + camera->setTarget ( pos + target ); + //! New. FPSCamera and animators catches reset on animate 0 + camera->OnAnimate ( 0 ); + } + return lastIndex - index + 1; +} + + +/*! + gets a accumulated force on a given surface +*/ +vector3df getGravity ( const c8 * surface ) +{ + if ( 0 == strcmp ( surface, "earth" ) ) return vector3df ( 0.f, -90.f, 0.f ); + if ( 0 == strcmp ( surface, "moon" ) ) return vector3df ( 0.f, -6.f / 100.f, 0.f ); + if ( 0 == strcmp ( surface, "water" ) ) return vector3df ( 0.1f / 100.f, -2.f / 100.f, 0.f ); + if ( 0 == strcmp ( surface, "ice" ) ) return vector3df ( 0.2f / 100.f, -9.f / 100.f, 0.3f / 100.f ); + + return vector3df ( 0.f, 0.f, 0.f ); +} + + + +/* + Dynamically load the Irrlicht Library +*/ + +#if defined(_IRR_WINDOWS_API_) +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +#include + +funcptr_createDevice load_createDevice ( const c8 * filename) +{ + return (funcptr_createDevice) GetProcAddress ( LoadLibrary ( filename ), "createDevice" ); +} + +funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename) +{ + return (funcptr_createDeviceEx) GetProcAddress ( LoadLibrary ( filename ), "createDeviceEx" ); +} + +#else + +// TODO: Dynamic Loading for other os +funcptr_createDevice load_createDevice ( const c8 * filename) +{ + return createDevice; +} + +funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename) +{ + return createDeviceEx; +} + +#endif + +/* + get the current collision response camera animator +*/ +ISceneNodeAnimatorCollisionResponse* camCollisionResponse( IrrlichtDevice * device ) +{ + ICameraSceneNode *camera = device->getSceneManager()->getActiveCamera(); + ISceneNodeAnimatorCollisionResponse *a = 0; + + list::ConstIterator it = camera->getAnimators().begin(); + for (; it != camera->getAnimators().end(); ++it) + { + a = (ISceneNodeAnimatorCollisionResponse*) (*it); + if ( a->getType() == ESNAT_COLLISION_RESPONSE ) + return a; + } + + return 0; +} + + +//! internal Animation +void setTimeFire ( TimeFire *t, u32 delta, u32 flags ) +{ + t->flags = flags; + t->next = 0; + t->delta = delta; +} + + +void checkTimeFire ( TimeFire *t, u32 listSize, u32 now ) +{ + u32 i; + for ( i = 0; i < listSize; ++i ) + { + if ( now < t[i].next ) + continue; + + t[i].next = core::max_ ( now + t[i].delta, t[i].next + t[i].delta ); + t[i].flags |= FIRED; + } +} diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.h b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.h new file mode 100644 index 0000000..d9606ed --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/q3factory.h @@ -0,0 +1,149 @@ +/*! + Model Factory. + create the additional scenenodes for ( bullets, health... ) + + Defines the Entities for Quake3 +*/ +#ifndef __QUAKE3_FACTORY__H_INCLUDED__ +#define __QUAKE3_FACTORY__H_INCLUDED__ + +using namespace irr; +using namespace scene; +using namespace gui; +using namespace video; +using namespace core; +using namespace quake3; +using namespace io; + + + +//! Defines to which group the entities belong +enum eItemGroup +{ + WEAPON, + AMMO, + ARMOR, + HEALTH, + POWERUP +}; + +//! define a supgroup for the item. for e.q the Weapons +enum eItemSubGroup +{ + SUB_NONE = 0, + GAUNTLET, + MACHINEGUN, + SHOTGUN, + GRENADE_LAUNCHER, + ROCKET_LAUNCHER, + LIGHTNING, + RAILGUN, + PLASMAGUN, + BFG, + GRAPPLING_HOOK, + NAILGUN, + PROX_LAUNCHER, + CHAINGUN, +}; + +//! aplly a special effect to the shader +enum eItemSpecialEffect +{ + SPECIAL_SFX_NONE = 0, + SPECIAL_SFX_ROTATE = 1, + SPECIAL_SFX_BOUNCE = 2, + SPECIAL_SFX_ROTATE_1 = 4, +}; + +// a List for defining a model +struct SItemElement +{ + const c8 *key; + const c8 *model[2]; + const c8 *sound; + const c8 *icon; + const c8 *pickup; + s32 value; + eItemGroup group; + eItemSubGroup sub; + u32 special; +}; + + +//! Get's an entity based on it's key +const SItemElement * getItemElement ( const stringc& key ); + +/*! + Quake3 Model Factory. + Takes the mesh buffers and creates scenenodes for their associated shaders +*/ +void Q3ShaderFactory ( Q3LevelLoadParameter &loadParam, + IrrlichtDevice *device, + IQ3LevelMesh* mesh, + eQ3MeshIndex meshIndex, + ISceneNode *parent, + IMetaTriangleSelector *meta, + bool showShaderName + ); + + +/*! + Creates Model based on the entity list +*/ +void Q3ModelFactory ( Q3LevelLoadParameter &loadParam, + IrrlichtDevice *device, + IQ3LevelMesh* masterMesh, + ISceneNode *parent, + bool showShaderName + ); + +/*! + so we need a good starting Position in the level. + we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" +*/ +s32 Q3StartPosition ( IQ3LevelMesh* mesh, + ICameraSceneNode* camera, + s32 startposIndex, + const vector3df &translation + ); +/*! + gets a accumulated force on a given surface +*/ +vector3df getGravity ( const c8 * surface ); + + +/* + Dynamically load the Irrlicht Library +*/ +funcptr_createDevice load_createDevice ( const c8 * filename); +funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename); + + +//! Macro for save Dropping an Element +#define dropElement(x) if (x) { x->remove(); x = 0; } + + +/* + get the current collision respone camera animator +*/ +ISceneNodeAnimatorCollisionResponse* camCollisionResponse( IrrlichtDevice * device ); + +//! internal Animation +enum eTimeFireFlag +{ + FIRED = 1, +}; + +struct TimeFire +{ + u32 flags; + u32 next; + u32 delta; +}; + +void setTimeFire ( TimeFire *t, u32 delta, u32 flags = 0 ); +void checkTimeFire ( TimeFire *t, u32 listSize, u32 now ); + +#endif // __QUAKE3_FACTORY__H_INCLUDED__ + + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.cpp b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.cpp new file mode 100644 index 0000000..75615c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.cpp @@ -0,0 +1,98 @@ +/*! + Sound Factory. + provides a sound interface + +*/ + +#include "sound.h" + + +//#define USE_IRRKLANG + +#ifdef USE_IRRKLANG + +#include +#ifdef _IRR_WINDOWS_ + #pragma comment (lib, "irrKlang.lib") +#endif + +using namespace irrklang; + +struct soundfile: public IFileReader +{ + soundfile ( io::IReadFile* f ): file (f ) {} + virtual ~soundfile () { file->drop (); } + + virtual ik_s32 read(void* buffer, ik_u32 sizeToRead) { return file->read ( buffer, sizeToRead ); } + virtual bool seek(ik_s32 finalPos, bool relativeMovement = false) { return file->seek ( finalPos, relativeMovement ); } + virtual ik_s32 getSize(){ return file->getSize (); } + virtual ik_s32 getPos() {return file->getPos (); } + virtual const ik_c8* getFileName() { return file->getFileName (); } + io::IReadFile* file; +}; + +struct klangFactory : public irrklang::IFileFactory +{ + klangFactory ( IrrlichtDevice *device ) { Device = device; } + + virtual irrklang::IFileReader* createFileReader(const ik_c8* filename) + { + io::IReadFile* file = Device->getFileSystem()->createAndOpenFile(filename); + if ( 0 == file ) + return 0; + + return new soundfile ( file ); + } + + IrrlichtDevice *Device; +}; + +ISoundEngine *engine = 0; +ISound *backMusic = 0; + +void sound_init ( IrrlichtDevice *device ) +{ + engine = createIrrKlangDevice (); + if ( 0 == engine ) + return; + + klangFactory *f = new klangFactory ( device ); + engine->addFileFactory ( f ); +} + +void sound_shutdown () +{ + if ( backMusic ) + backMusic->drop (); + + if ( engine ) + engine->drop (); +} + +void background_music ( const c8 * file ) +{ + if ( 0 == engine ) + return; + + if ( backMusic ) + { + backMusic->stop (); + backMusic->drop (); + } + + backMusic = engine->play2D ( file, true, false, true ); + + if ( backMusic ) + { + backMusic->setVolume ( 0.5f ); + } +} + +#else + +void sound_init ( IrrlichtDevice *device ) {} +void sound_shutdown () {} +void background_music ( const c8 * file ) {} + +#endif + diff --git a/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.h b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.h new file mode 100644 index 0000000..033e9bb --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/21.Quake3Explorer/sound.h @@ -0,0 +1,18 @@ +/*! + Sound Factory. + provides a sound interface + +*/ +#ifndef __QUAKE3_SOUND__H_INCLUDED__ +#define __QUAKE3_SOUND__H_INCLUDED__ + +#include + +using namespace irr; + +void sound_init ( IrrlichtDevice *device ); +void sound_shutdown (); +void background_music ( const c8 * file ); + + +#endif // __QUAKE3_SOUND__H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/Makefile b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/Makefile new file mode 100644 index 0000000..8016988 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 22.MaterialViewer +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +#CXXFLAGS = -O3 -ffast-math +CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp new file mode 100644 index 0000000..3626d10 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev new file mode 100644 index 0000000..dfd9d4d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 22 Material Viewer +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=22.MaterialViewer.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj new file mode 100644 index 0000000..7419359 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer.vcproj @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj new file mode 100644 index 0000000..6a8b5c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 22.MaterialViewer + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA} + MaterialViewer + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/MaterialViewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + .\Release/MaterialViewer.pdb + Console + + + + + + + .\Release/MaterialViewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + .\Release/MaterialViewer.pdb + Console + + + + + + + .\Debug/MaterialViewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + .\Debug/MaterialViewer.pdb + Console + + + + + + + .\Debug/MaterialViewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + .\Debug/MaterialViewer.pdb + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj new file mode 100644 index 0000000..6ea9a2b --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 22.MaterialViewer + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA} + MaterialViewer + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Release/MaterialViewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + .\Release/MaterialViewer.pdb + Console + + + + + + + .\Release/MaterialViewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + .\Release/MaterialViewer.pdb + Console + + + + + + + .\Debug/MaterialViewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + .\Debug/MaterialViewer.pdb + Console + + + + + + + .\Debug/MaterialViewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + .\Debug/MaterialViewer.pdb + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj new file mode 100644 index 0000000..1e7c0db --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj new file mode 100644 index 0000000..8ce9803 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/MaterialViewer_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp new file mode 100644 index 0000000..5dcab19 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/22.MaterialViewer/main.cpp @@ -0,0 +1,1057 @@ +/** Example 022 Material Viewer + +This example can be used to play around with material settings and watch the results. +Only the default non-shader materials are used in here. + +You have two nodes to make it easier to see which difference your settings will make. +Additionally you have one lightscenenode and you can set the global ambient values. +*/ + +#include +#include "driverChoice.h" + +using namespace irr; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +/* + Variables within the empty namespace are globals which are restricted to this file. +*/ +namespace +{ + const wchar_t* const DriverTypeNames[] = + { + L"NULL", + L"SOFTWARE", + L"BURNINGSVIDEO", + L"DIRECT3D8", + L"DIRECT3D9", + L"OPENGL", + 0, + }; + + // For the gui id's + enum EGUI_IDS + { + GUI_ID_OPEN_TEXTURE = 1, + GUI_ID_QUIT, + GUI_ID_MAX + }; + + // Name used in texture selection to clear the textures on the node + const core::stringw CLEAR_TEXTURE = L"CLEAR texture"; + + // some useful color constants + const video::SColor SCOL_BLACK = video::SColor(255, 0, 0, 0); + const video::SColor SCOL_BLUE = video::SColor(255, 0, 0, 255); + const video::SColor SCOL_CYAN = video::SColor(255, 0, 255, 255); + const video::SColor SCOL_GRAY = video::SColor(255, 128,128, 128); + const video::SColor SCOL_GREEN = video::SColor(255, 0, 255, 0); + const video::SColor SCOL_MAGENTA = video::SColor(255, 255, 0, 255); + const video::SColor SCOL_RED = video::SColor(255, 255, 0, 0); + const video::SColor SCOL_YELLOW = video::SColor(255, 255, 255, 0); + const video::SColor SCOL_WHITE = video::SColor(255, 255, 255, 255); +}; // namespace + +/* + Returns a new unique number on each call. +*/ +s32 makeUniqueId() +{ + static int unique = GUI_ID_MAX; + ++unique; + return unique; +} + +/* + Find out which vertex-type is needed for the given material type. +*/ +video::E_VERTEX_TYPE getVertexTypeForMaterialType(video::E_MATERIAL_TYPE materialType) +{ + using namespace video; + + switch ( materialType ) + { + case EMT_SOLID: + return EVT_STANDARD; + + case EMT_SOLID_2_LAYER: + return EVT_STANDARD; + + case EMT_LIGHTMAP: + case EMT_LIGHTMAP_ADD: + case EMT_LIGHTMAP_M2: + case EMT_LIGHTMAP_M4: + case EMT_LIGHTMAP_LIGHTING: + case EMT_LIGHTMAP_LIGHTING_M2: + case EMT_LIGHTMAP_LIGHTING_M4: + return EVT_2TCOORDS; + + case EMT_DETAIL_MAP: + return EVT_2TCOORDS; + + case EMT_SPHERE_MAP: + return EVT_STANDARD; + + case EMT_REFLECTION_2_LAYER: + return EVT_2TCOORDS; + + case EMT_TRANSPARENT_ADD_COLOR: + return EVT_STANDARD; + + case EMT_TRANSPARENT_ALPHA_CHANNEL: + return EVT_STANDARD; + + case EMT_TRANSPARENT_ALPHA_CHANNEL_REF: + return EVT_STANDARD; + + case EMT_TRANSPARENT_VERTEX_ALPHA: + return EVT_STANDARD; + + case EMT_TRANSPARENT_REFLECTION_2_LAYER: + return EVT_2TCOORDS; + + case EMT_NORMAL_MAP_SOLID: + case EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR: + case EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA: + case EMT_PARALLAX_MAP_SOLID: + case EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR: + case EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA: + return EVT_TANGENTS; + + case EMT_ONETEXTURE_BLEND: + return EVT_STANDARD; + + case EMT_FORCE_32BIT: + return EVT_STANDARD; + } + return EVT_STANDARD; +} + +/* + Custom GUI-control to edit colorvalues. +*/ +class CColorControl : public gui::IGUIElement +{ +public: + // Constructor + CColorControl(gui::IGUIEnvironment* guiEnv, const core::position2d & pos, const wchar_t *text, IGUIElement* parent, s32 id=-1 ) + : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect< s32 >(pos, pos+core::dimension2d(80, 75))) + , DirtyFlag(true) + , ColorStatic(0) + , EditAlpha(0) + , EditRed(0) + , EditGreen(0) + , EditBlue(0) + { + using namespace gui; + ButtonSetId = makeUniqueId(); + + const core::rect< s32 > rectControls(0,0,AbsoluteRect.getWidth(),AbsoluteRect.getHeight() ); + IGUIStaticText * groupElement = guiEnv->addStaticText (L"", rectControls, true, false, this, -1, false); + groupElement->setNotClipped(true); + + guiEnv->addStaticText (text, core::rect(0,0,80,15), false, false, groupElement, -1, false); + + EditAlpha = addEditForNumbers(guiEnv, core::position2d(0,15), L"a", -1, groupElement ); + EditRed = addEditForNumbers(guiEnv, core::position2d(0,30), L"r", -1, groupElement ); + EditGreen = addEditForNumbers(guiEnv, core::position2d(0,45), L"g", -1, groupElement ); + EditBlue = addEditForNumbers(guiEnv, core::position2d(0,60), L"b", -1, groupElement ); + + ColorStatic = guiEnv->addStaticText (L"", core::rect(60,15,80,75), true, false, groupElement, -1, true); + + guiEnv->addButton (core::rect(60,35,80,50), groupElement, ButtonSetId, L"set"); + SetEditsFromColor(Color); + } + + // event receiver + virtual bool OnEvent(const SEvent &event) + { + if ( event.EventType != EET_GUI_EVENT ) + return false; + + if ( event.GUIEvent.Caller->getID() == ButtonSetId && event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + Color = GetColorFromEdits(); + SetEditsFromColor(Color); + } + + return false; + } + + // set the color values + void setColor(const video::SColor& col) + { + DirtyFlag = true; + Color = col; + SetEditsFromColor(Color); + } + + // get the color values + const video::SColor& getColor() const + { + return Color; + } + + // To reset the dirty flag + void resetDirty() + { + DirtyFlag = false; + } + + // when the color was changed the dirty flag is set + bool isDirty() const + { + return DirtyFlag; + }; + +protected: + + // Add a staticbox for a description + an editbox so users can enter numbers + gui::IGUIEditBox* addEditForNumbers(gui::IGUIEnvironment* guiEnv, const core::position2d & pos, const wchar_t *text, s32 id, gui::IGUIElement * parent) + { + using namespace gui; + + core::rect< s32 > rect(pos, pos+core::dimension2d(10, 15)); + guiEnv->addStaticText (text, rect, false, false, parent, -1, false); + rect += core::position2d( 20, 0 ); + rect.LowerRightCorner.X += 20; + gui::IGUIEditBox* edit = guiEnv->addEditBox(L"0", rect, true, parent, id); + return edit; + } + + // Get the color value from the editfields + video::SColor GetColorFromEdits() + { + video::SColor col; + + if (EditAlpha) + { + u32 alpha = core::strtoul10(core::stringc(EditAlpha->getText()).c_str()); + if (alpha > 255) + alpha = 255; + col.setAlpha(alpha); + } + + if (EditRed) + { + u32 red = core::strtoul10(core::stringc(EditRed->getText()).c_str()); + if (red > 255) + red = 255; + col.setRed(red); + } + + if (EditGreen) + { + u32 green = core::strtoul10(core::stringc(EditGreen->getText()).c_str()); + if (green > 255) + green = 255; + col.setGreen(green); + } + + if (EditBlue) + { + u32 blue = core::strtoul10(core::stringc(EditBlue->getText()).c_str()); + if (blue > 255) + blue = 255; + col.setBlue(blue); + } + + return col; + } + + // Fill the editfields with the value for the given color + void SetEditsFromColor(video::SColor col) + { + DirtyFlag = true; + if ( EditAlpha ) + EditAlpha->setText( core::stringw(col.getAlpha()).c_str() ); + if ( EditRed ) + EditRed->setText( core::stringw(col.getRed()).c_str() ); + if ( EditGreen ) + EditGreen->setText( core::stringw(col.getGreen()).c_str() ); + if ( EditBlue ) + EditBlue->setText( core::stringw(col.getBlue()).c_str() ); + if ( ColorStatic ) + ColorStatic->setBackgroundColor(col); + } + +private: + + bool DirtyFlag; + video::SColor Color; + s32 ButtonSetId; + gui::IGUIStaticText * ColorStatic; + gui::IGUIEditBox * EditAlpha; + gui::IGUIEditBox * EditRed; + gui::IGUIEditBox * EditGreen; + gui::IGUIEditBox * EditBlue; +}; + +/* + Custom GUI-control for to edit all colors typically used in materials and lights +*/ +class CAllColorsControl : public gui::IGUIElement +{ +public: + // Constructor + CAllColorsControl(gui::IGUIEnvironment* guiEnv, const core::position2d & pos, const wchar_t * description, bool hasEmissive, IGUIElement* parent, s32 id=-1) + : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect(pos,pos+core::dimension2d(60,250))) + , ControlAmbientColor(0), ControlDiffuseColor(0), ControlSpecularColor(0), ControlEmissiveColor(0) + { + core::rect rect(0, 0, 60, 15); + guiEnv->addStaticText (description, rect, false, false, this, -1, false); + createColorControls(guiEnv, core::position2d(0, 15), hasEmissive); + } + + // Destructor + virtual ~CAllColorsControl() + { + ControlAmbientColor->drop(); + ControlDiffuseColor->drop(); + if ( ControlEmissiveColor ) + ControlEmissiveColor->drop(); + ControlSpecularColor->drop(); + } + + // Set the color values to those within the material + void setColorsToMaterialColors(const video::SMaterial & material) + { + ControlAmbientColor->setColor(material.AmbientColor); + ControlDiffuseColor->setColor(material.DiffuseColor); + ControlEmissiveColor->setColor(material.EmissiveColor); + ControlSpecularColor->setColor(material.SpecularColor); + } + + // Update all changed colors in the material + void updateMaterialColors(video::SMaterial & material) + { + if ( ControlAmbientColor->isDirty() ) + material.AmbientColor = ControlAmbientColor->getColor(); + if ( ControlDiffuseColor->isDirty() ) + material.DiffuseColor = ControlDiffuseColor->getColor(); + if ( ControlEmissiveColor->isDirty() ) + material.EmissiveColor = ControlEmissiveColor->getColor(); + if ( ControlSpecularColor->isDirty() ) + material.SpecularColor = ControlSpecularColor->getColor(); + } + + // Set the color values to those from the light data + void setColorsToLightDataColors(const video::SLight & lightData) + { + ControlAmbientColor->setColor(lightData.AmbientColor.toSColor()); + ControlAmbientColor->setColor(lightData.DiffuseColor.toSColor()); + ControlAmbientColor->setColor(lightData.SpecularColor.toSColor()); + } + + // Update all changed colors in the light data + void updateLightColors(video::SLight & lightData) + { + if ( ControlAmbientColor->isDirty() ) + lightData.AmbientColor = video::SColorf( ControlAmbientColor->getColor() ); + if ( ControlDiffuseColor->isDirty() ) + lightData.DiffuseColor = video::SColorf( ControlDiffuseColor->getColor() ); + if ( ControlSpecularColor->isDirty() ) + lightData.SpecularColor = video::SColorf(ControlSpecularColor->getColor() ); + } + + // To reset the dirty flags + void resetDirty() + { + ControlAmbientColor->resetDirty(); + ControlDiffuseColor->resetDirty(); + ControlSpecularColor->resetDirty(); + if ( ControlEmissiveColor ) + ControlEmissiveColor->resetDirty(); + } + +protected: + void createColorControls(gui::IGUIEnvironment* guiEnv, const core::position2d & pos, bool hasEmissive) + { + ControlAmbientColor = new CColorControl( guiEnv, pos, L"ambient", this); + ControlDiffuseColor = new CColorControl( guiEnv, pos + core::position2d(0, 75), L"diffuse", this ); + ControlSpecularColor = new CColorControl( guiEnv, pos + core::position2d(0, 150), L"specular", this ); + if ( hasEmissive ) + { + ControlEmissiveColor = new CColorControl( guiEnv, pos + core::position2d(0, 225), L"emissive", this ); + } + } + +private: + CColorControl* ControlAmbientColor; + CColorControl* ControlDiffuseColor; + CColorControl* ControlSpecularColor; + CColorControl* ControlEmissiveColor; +}; + +/* + GUI-Control to offer a selection of available textures. +*/ +class CTextureControl : public gui::IGUIElement +{ +public: + CTextureControl(gui::IGUIEnvironment* guiEnv, video::IVideoDriver * driver, const core::position2d & pos, IGUIElement* parent, s32 id=-1) + : gui::IGUIElement(gui::EGUIET_ELEMENT, guiEnv, parent,id, core::rect(pos,pos+core::dimension2d(100,15))) + , DirtyFlag(true), ComboTexture(0) + { + core::rect rectCombo(0, 0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight()); + ComboTexture = guiEnv->addComboBox (rectCombo, this); + updateTextures(driver); + } + + virtual bool OnEvent(const SEvent &event) + { + if ( event.EventType != EET_GUI_EVENT ) + return false; + + if ( event.GUIEvent.Caller == ComboTexture && event.GUIEvent.EventType == gui::EGET_COMBO_BOX_CHANGED ) + { + DirtyFlag = true; + } + + return false; + } + + // Workaround for a problem with comboboxes. + // We have to get in front when the combobox wants to get in front or combobox-list might be drawn below other elements. + virtual bool bringToFront(IGUIElement* element) + { + bool result = gui::IGUIElement::bringToFront(element); + if ( Parent && element == ComboTexture ) + result &= Parent->bringToFront(this); + return result; + } + + // return selected texturename (if any, otherwise 0) + const wchar_t * getSelectedTextureName() const + { + s32 selected = ComboTexture->getSelected(); + if ( selected < 0 ) + return 0; + return ComboTexture->getItem(selected); + } + + // reset the dirty flag + void resetDirty() + { + DirtyFlag = false; + } + + // when the texture was changed the dirty flag is set + bool isDirty() const + { + return DirtyFlag; + }; + + // Put the names of all currently loaded textures in a combobox + void updateTextures(video::IVideoDriver * driver) + { + s32 oldSelected = ComboTexture->getSelected(); + s32 selectNew = -1; + const wchar_t * oldTextureName = 0; + if ( oldSelected >= 0 ) + { + oldTextureName = ComboTexture->getItem(oldSelected); + } + ComboTexture->clear(); + for ( u32 i=0; i < driver->getTextureCount(); ++i ) + { + video::ITexture * texture = driver->getTextureByIndex(i); + core::stringw name( texture->getName() ); + ComboTexture->addItem( name.c_str() ); + if ( oldTextureName && selectNew < 0 && name == oldTextureName ) + selectNew = i; + } + + // add another name which can be used to clear the texture + ComboTexture->addItem( CLEAR_TEXTURE.c_str() ); + if ( CLEAR_TEXTURE == oldTextureName ) + selectNew = ComboTexture->getItemCount()-1; + + if ( selectNew >= 0 ) + ComboTexture->setSelected(selectNew); + + DirtyFlag = true; + } + +private: + bool DirtyFlag; + gui::IGUIComboBox * ComboTexture; +}; + +/* + Control which allows setting some of the material values for a meshscenenode +*/ +struct SMeshNodeControl +{ + // constructor + SMeshNodeControl() + : Initialized(false), Driver(0), MeshManipulator(0), SceneNode(0), SceneNode2T(0), SceneNodeTangents(0) + , AllColorsControl(0), ButtonLighting(0), InfoLighting(0), ComboMaterial(0), TextureControl1(0), TextureControl2(0), ControlVertexColors(0) + { + } + + // Destructor + virtual ~SMeshNodeControl() + { + if ( TextureControl1 ) + TextureControl1->drop(); + if ( TextureControl2 ) + TextureControl2->drop(); + if ( ControlVertexColors ) + ControlVertexColors->drop(); + if ( AllColorsControl ) + AllColorsControl->drop(); + } + + void init(scene::IMeshSceneNode* node, IrrlichtDevice * device, const core::position2d & pos, const wchar_t * description) + { + if ( Initialized || !node || !device) // initializing twice or with invalid data not allowed + return; + + Driver = device->getVideoDriver (); + gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment(); + scene::ISceneManager* smgr = device->getSceneManager(); + MeshManipulator = smgr->getMeshManipulator(); + + SceneNode = node; + scene::IMeshManipulator * meshManip = smgr->getMeshManipulator(); + + scene::IMesh * mesh2T = meshManip->createMeshWith2TCoords(node->getMesh()); + SceneNode2T = smgr->addMeshSceneNode(mesh2T, 0, -1, SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() ); + mesh2T->drop(); + + scene::IMesh * meshTangents = meshManip->createMeshWithTangents(node->getMesh(), false, false, false); + SceneNodeTangents = smgr->addMeshSceneNode(meshTangents, 0, -1 + , SceneNode->getPosition(), SceneNode->getRotation(), SceneNode->getScale() ); + meshTangents->drop(); + + video::SMaterial & material = SceneNode->getMaterial(0); + material.Lighting = true; + AllColorsControl = new CAllColorsControl(guiEnv, pos, description, true, guiEnv->getRootGUIElement()); + AllColorsControl->setColorsToMaterialColors(material); + + core::rect rectBtn(pos + core::position2d(0, 320), core::dimension2d(60, 15)); + ButtonLighting = guiEnv->addButton (rectBtn, 0, -1, L"Lighting"); + ButtonLighting->setIsPushButton(true); + ButtonLighting->setPressed(material.Lighting); + core::rect rectInfo( rectBtn.LowerRightCorner.X, rectBtn.UpperLeftCorner.Y, rectBtn.LowerRightCorner.X+40, rectBtn.UpperLeftCorner.Y+15 ); + InfoLighting = guiEnv->addStaticText(L"", rectInfo, true, false ); + InfoLighting->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER ); + + core::rect rectCombo(pos.X, rectBtn.LowerRightCorner.Y, pos.X+100, rectBtn.LowerRightCorner.Y+15); + ComboMaterial = guiEnv->addComboBox (rectCombo); + for ( int i=0; i <= (int)video::EMT_ONETEXTURE_BLEND; ++i ) + { + ComboMaterial->addItem( core::stringw(video::sBuiltInMaterialTypeNames[i]).c_str() ); + } + ComboMaterial->setSelected( (s32)material.MaterialType ); + + core::position2d posTex(rectCombo.UpperLeftCorner.X,rectCombo.LowerRightCorner.Y); + TextureControl1 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement()); + posTex.Y += 15; + TextureControl2 = new CTextureControl(guiEnv, Driver, posTex, guiEnv->getRootGUIElement()); + + core::position2d posVertexColors( posTex.X, posTex.Y + 15); + ControlVertexColors = new CColorControl( guiEnv, posVertexColors, L"Vertex colors", guiEnv->getRootGUIElement()); + + video::S3DVertex * vertices = (video::S3DVertex *)node->getMesh()->getMeshBuffer(0)->getVertices(); + if ( vertices ) + { + ControlVertexColors->setColor(vertices[0].Color); + } + + Initialized = true; + } + + void update() + { + if ( !Initialized ) + return; + + video::SMaterial & material = SceneNode->getMaterial(0); + video::SMaterial & material2T = SceneNode2T->getMaterial(0); + video::SMaterial & materialTangents = SceneNodeTangents->getMaterial(0); + + s32 selectedMaterial = ComboMaterial->getSelected(); + if ( selectedMaterial >= (s32)video::EMT_SOLID && selectedMaterial <= (s32)video::EMT_ONETEXTURE_BLEND) + { + video::E_VERTEX_TYPE vertexType = getVertexTypeForMaterialType((video::E_MATERIAL_TYPE)selectedMaterial); + switch ( vertexType ) + { + case video::EVT_STANDARD: + material.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial; + SceneNode->setVisible(true); + SceneNode2T->setVisible(false); + SceneNodeTangents->setVisible(false); + break; + case video::EVT_2TCOORDS: + material2T.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial; + SceneNode->setVisible(false); + SceneNode2T->setVisible(true); + SceneNodeTangents->setVisible(false); + break; + case video::EVT_TANGENTS: + materialTangents.MaterialType = (video::E_MATERIAL_TYPE)selectedMaterial; + SceneNode->setVisible(false); + SceneNode2T->setVisible(false); + SceneNodeTangents->setVisible(true); + break; + } + } + + updateMaterial(material); + updateMaterial(material2T); + updateMaterial(materialTangents); + + if ( ButtonLighting->isPressed() ) + InfoLighting->setText(L"on"); + else + InfoLighting->setText(L"off"); + + AllColorsControl->resetDirty(); + TextureControl1->resetDirty(); + TextureControl2->resetDirty(); + ControlVertexColors->resetDirty(); + } + + void updateTextures() + { + TextureControl1->updateTextures(Driver); + TextureControl2->updateTextures(Driver); + } + +protected: + + void updateMaterial(video::SMaterial & material) + { + AllColorsControl->updateMaterialColors(material); + material.Lighting = ButtonLighting->isPressed(); + if ( TextureControl1->isDirty() ) + { + material.TextureLayer[0].Texture = Driver->getTexture( io::path(TextureControl1->getSelectedTextureName()) ); + } + if ( TextureControl2->isDirty() ) + { + material.TextureLayer[1].Texture = Driver->getTexture( io::path(TextureControl2->getSelectedTextureName()) ); + } + if ( ControlVertexColors->isDirty() ) + { + MeshManipulator->setVertexColors (SceneNode->getMesh(), ControlVertexColors->getColor()); + MeshManipulator->setVertexColors (SceneNode2T->getMesh(), ControlVertexColors->getColor()); + MeshManipulator->setVertexColors (SceneNodeTangents->getMesh(), ControlVertexColors->getColor()); + } + } + + bool Initialized; + video::IVideoDriver * Driver; + scene::IMeshManipulator* MeshManipulator; + scene::IMeshSceneNode* SceneNode; + scene::IMeshSceneNode* SceneNode2T; + scene::IMeshSceneNode* SceneNodeTangents; + CAllColorsControl* AllColorsControl; + gui::IGUIButton * ButtonLighting; + gui::IGUIStaticText* InfoLighting; + gui::IGUIComboBox * ComboMaterial; + CTextureControl* TextureControl1; + CTextureControl* TextureControl2; + CColorControl* ControlVertexColors; +}; + +/* + Control to allow setting the color values of a lightscenenode. +*/ +struct SLightNodeControl +{ + // constructor + SLightNodeControl() : Initialized(false), SceneNode(0), AllColorsControl(0) + { + } + + virtual ~SLightNodeControl() + { + if ( AllColorsControl ) + AllColorsControl->drop(); + } + + void init(scene::ILightSceneNode* node, gui::IGUIEnvironment* guiEnv, const core::position2d & pos, const wchar_t * description) + { + if ( Initialized || !node || !guiEnv) // initializing twice or with invalid data not allowed + return; + SceneNode = node; + AllColorsControl = new CAllColorsControl(guiEnv, pos, description, false, guiEnv->getRootGUIElement()); + const video::SLight & lightData = SceneNode->getLightData(); + AllColorsControl->setColorsToLightDataColors(lightData); + Initialized = true; + } + + void update() + { + if ( !Initialized ) + return; + + video::SLight & lightData = SceneNode->getLightData(); + AllColorsControl->updateLightColors(lightData); + } + +protected: + bool Initialized; + scene::ILightSceneNode* SceneNode; + CAllColorsControl* AllColorsControl; +}; + +/* + Application configuration +*/ +struct SConfig +{ + SConfig() + : RenderInBackground(true) + , DriverType(video::EDT_BURNINGSVIDEO) + , ScreenSize(640, 480) + { + } + + bool RenderInBackground; + video::E_DRIVER_TYPE DriverType; + core::dimension2d ScreenSize; +}; + +/* + Main application class +*/ +class CApp : public IEventReceiver +{ + friend int main(int argc, char *argv[]); + +public: + // constructor + CApp() + : IsRunning(false) + , Device(0) + , Camera(0) + , GlobalAmbient(0) + { + } + + // destructor + ~CApp() + { + } + + // stop running - will quit at end of mainloop + void stopApp() + { + IsRunning = false; + } + + // Event handler + virtual bool OnEvent(const SEvent &event) + { + if (event.EventType == EET_GUI_EVENT) + { + gui::IGUIEnvironment* env = Device->getGUIEnvironment(); + + switch(event.GUIEvent.EventType) + { + case gui::EGET_MENU_ITEM_SELECTED: + { + gui::IGUIContextMenu* menu = (gui::IGUIContextMenu*)event.GUIEvent.Caller; + s32 id = menu->getItemCommandId(menu->getSelectedItem()); + + switch(id) + { + case GUI_ID_OPEN_TEXTURE: // File -> Open Texture + env->addFileOpenDialog(L"Please select a texture file to open"); + break; + case GUI_ID_QUIT: // File -> Quit + stopApp(); + break; + } + } + break; + + case gui::EGET_FILE_SELECTED: + { + // load the model file, selected in the file open dialog + gui::IGUIFileOpenDialog* dialog = + (gui::IGUIFileOpenDialog*)event.GUIEvent.Caller; + loadTexture(io::path(dialog->getFileName()).c_str()); + } + break; + + default: + break; + } + } + + return false; + } + +protected: + + // Application initialization + // returns true when it was successful initialized, otherwise false. + bool init(int argc, char *argv[]) + { + // ask user for driver + Config.DriverType=driverChoiceConsole(); + if (Config.DriverType==video::EDT_COUNT) + return false; + + // create the device with the settings from our config + Device = createDevice(Config.DriverType, Config.ScreenSize); + if (!Device) + return false; + Device->setWindowCaption( DriverTypeNames[Config.DriverType] ); + Device->setEventReceiver(this); + + scene::ISceneManager* smgr = Device->getSceneManager(); + video::IVideoDriver * driver = Device->getVideoDriver (); + gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment(); + + // set a nicer font + gui::IGUISkin* skin = guiEnv->getSkin(); + gui::IGUIFont* font = guiEnv->getFont("../../media/fonthaettenschweiler.bmp"); + if (font) + skin->setFont(font); + + // remove some alpha value because it makes those menus harder to read otherwise + video::SColor col3dHighLight( skin->getColor(gui::EGDC_APP_WORKSPACE) ); + col3dHighLight.setAlpha(255); + video::SColor colHighLight( col3dHighLight ); + skin->setColor(gui::EGDC_HIGH_LIGHT, colHighLight ); + skin->setColor(gui::EGDC_3D_HIGH_LIGHT, col3dHighLight ); + + // Add some textures which are useful to test material settings + createDefaultTextures(driver); + + // create a menu + gui::IGUIContextMenu * menuBar = guiEnv->addMenu(); + menuBar->addItem(L"File", -1, true, true); + + gui::IGUIContextMenu* subMenuFile = menuBar->getSubMenu(0); + subMenuFile->addItem(L"Open texture ...", GUI_ID_OPEN_TEXTURE); + subMenuFile->addSeparator(); + subMenuFile->addItem(L"Quit", GUI_ID_QUIT); + + // a static camera + Camera = smgr->addCameraSceneNode (0, core::vector3df(0, 0, 0), + core::vector3df(0, 0, 100), + -1); + + // add the nodes which are used to show the materials + scene::IMeshSceneNode* nodeL = smgr->addCubeSceneNode (30.0f, 0, -1, + core::vector3df(-35, 0, 100), + core::vector3df(0, 0, 0), + core::vector3df(1.0f, 1.0f, 1.0f)); + NodeLeft.init( nodeL, Device, core::position2d(10,20), L"left node" ); + + scene::IMeshSceneNode* nodeR = smgr->addCubeSceneNode (30.0f, 0, -1, + core::vector3df(35, 0, 100), + core::vector3df(0, 0, 0), + core::vector3df(1.0f, 1.0f, 1.0f)); + NodeRight.init( nodeR, Device, core::position2d(530,20), L"right node" ); + + // add one light + scene::ILightSceneNode* nodeLight = smgr->addLightSceneNode(0, core::vector3df(0, 0, 0), + video::SColorf(1.0f, 1.0f, 1.0f), + 100.0f); + LightControl.init(nodeLight, guiEnv, core::position2d(270,20), L"light" ); + + // one large cube around everything. That's mainly to make the light more obvious. + scene::IMeshSceneNode* backgroundCube = smgr->addCubeSceneNode (200.0f, 0, -1, core::vector3df(0, 0, 0), + core::vector3df(45, 0, 0), + core::vector3df(1.0f, 1.0f, 1.0f)); + backgroundCube->getMaterial(0).BackfaceCulling = false; // we are within the cube, so we have to disable backface culling to see it + backgroundCube->getMaterial(0).EmissiveColor.set(255,50,50,50); // we keep some self lighting to keep texts visible + + // set the ambient light value + GlobalAmbient = new CColorControl( guiEnv, core::position2d(270, 300), L"global ambient", guiEnv->getRootGUIElement()); + GlobalAmbient->setColor( smgr->getAmbientLight().toSColor() ); + + return true; + } + + // Update one frame + bool update() + { + using namespace irr; + + video::IVideoDriver* videoDriver = Device->getVideoDriver(); + if ( !Device->run() ) + return false; + + if ( Device->isWindowActive() || Config.RenderInBackground ) + { + gui::IGUIEnvironment* guiEnv = Device->getGUIEnvironment(); + scene::ISceneManager* smgr = Device->getSceneManager(); + gui::IGUISkin * skin = guiEnv->getSkin(); + + // update our controls + NodeLeft.update(); + NodeRight.update(); + LightControl.update(); + + // update ambient light settings + if ( GlobalAmbient->isDirty() ) + { + smgr->setAmbientLight( GlobalAmbient->getColor() ); + GlobalAmbient->resetDirty(); + } + + // draw everything + video::SColor bkColor( skin->getColor(gui::EGDC_APP_WORKSPACE) ); + videoDriver->beginScene(true, true, bkColor); + + smgr->drawAll(); + guiEnv->drawAll(); + + videoDriver->endScene(); + } + + return true; + } + + // Run the application. Our main loop. + void run() + { + IsRunning = true; + + if ( !Device ) + return; + + // main application loop + while(IsRunning) + { + if ( !update() ) + break; + + Device->sleep( 5 ); + } + } + + // Close down the application + void quit() + { + IsRunning = false; + GlobalAmbient->drop(); + GlobalAmbient = NULL; + if ( Device ) + { + Device->closeDevice(); + Device->drop(); + Device = NULL; + } + } + + // Create some useful textures. + // Note that the function put readability over speed, you shouldn't use setPixel at runtime but for initialization it's nice. + void createDefaultTextures(video::IVideoDriver * driver) + { + const u32 width = 256; + const u32 height = 256; + video::IImage * imageA8R8G8B8 = driver->createImage (video::ECF_A8R8G8B8, core::dimension2d(width, height)); + if ( !imageA8R8G8B8 ) + return; + const u32 pitch = imageA8R8G8B8->getPitch(); + + // some nice square-pattern with 9 typical colors + for ( u32 y = 0; y < height; ++ y ) + { + for ( u32 x = 0; x < pitch; ++x ) + { + if ( y < height/3 ) + { + if ( x < width/3 ) + imageA8R8G8B8->setPixel (x, y, SCOL_BLACK); + else if ( x < 2*width/3 ) + imageA8R8G8B8->setPixel (x, y, SCOL_BLUE); + else + imageA8R8G8B8->setPixel (x, y, SCOL_CYAN); + } + else if ( y < 2*height/3 ) + { + if ( x < width/3 ) + imageA8R8G8B8->setPixel (x, y, SCOL_GRAY); + else if ( x < 2*width/3 ) + imageA8R8G8B8->setPixel (x, y, SCOL_GREEN); + else + imageA8R8G8B8->setPixel (x, y, SCOL_MAGENTA); + } + else + { + if ( x < width/3 ) + imageA8R8G8B8->setPixel (x, y, SCOL_RED); + else if ( x < 2*width/3 ) + imageA8R8G8B8->setPixel (x, y, SCOL_YELLOW); + else + imageA8R8G8B8->setPixel (x, y, SCOL_WHITE); + } + } + } + driver->addTexture (io::path("CARO_A8R8G8B8"), imageA8R8G8B8); + + // all white + imageA8R8G8B8->fill(SCOL_WHITE); + driver->addTexture (io::path("WHITE_A8R8G8B8"), imageA8R8G8B8); + + // all black + imageA8R8G8B8->fill(SCOL_BLACK); + driver->addTexture (io::path("BLACK_A8R8G8B8"), imageA8R8G8B8); + + // gray-scale + for ( u32 y = 0; y < height; ++ y ) + { + for ( u32 x = 0; x < pitch; ++x ) + { + imageA8R8G8B8->setPixel (x, y, video::SColor(y, x,x,x) ); + } + } + driver->addTexture (io::path("GRAYSCALE_A8R8G8B8"), imageA8R8G8B8); + + imageA8R8G8B8->drop(); + } + + // Load a texture and make sure nodes know it when more textures are available. + void loadTexture(const io::path &name) + { + Device->getVideoDriver()->getTexture(name); + NodeLeft.updateTextures(); + NodeRight.updateTextures(); + } + +private: + SConfig Config; + volatile bool IsRunning; + IrrlichtDevice * Device; + scene::ICameraSceneNode * Camera; + SMeshNodeControl NodeLeft; + SMeshNodeControl NodeRight; + SLightNodeControl LightControl; + CColorControl * GlobalAmbient; +}; + +/* + A very short main as we do everything else in classes. +*/ +int main(int argc, char *argv[]) +{ + CApp APP; + + if ( !APP.init(argc, argv) ) + { + printf("init failed\n"); + return 1; + } + + APP.run(); + APP.quit(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile new file mode 100644 index 0000000..eab5060 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 23.SMeshHandling +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp new file mode 100644 index 0000000..2fbcfe2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.cbp @@ -0,0 +1,44 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev new file mode 100644 index 0000000..94043f3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 23 SMeshHandling +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=23.SMeshHandling.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj new file mode 100644 index 0000000..a63d583 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj new file mode 100644 index 0000000..51a6f9e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj @@ -0,0 +1,188 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 23.SMeshHandling + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7} + 23.SMeshHandling + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SMeshHandling.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SMeshHandling.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj new file mode 100644 index 0000000..7f2a781 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc11.vcxproj @@ -0,0 +1,192 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 23.SMeshHandling + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7} + 23.SMeshHandling + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + true + true + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SMeshHandling.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SMeshHandling.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj new file mode 100644 index 0000000..ecc9135 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc8.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj new file mode 100644 index 0000000..b1b921e --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/SMeshHandling_vc9.vcproj @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp new file mode 100644 index 0000000..c3c2ccf --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/23.SMeshHandling/main.cpp @@ -0,0 +1,426 @@ +/** Example 023 SMeshBufferHandling + +A tutorial by geoff. + +In this tutorial we'll learn how to create custom meshes and deal with them +with Irrlicht. We'll create an interesting heightmap with some lighting effects. +With keys 1,2,3 you can choose a different mesh layout, which is put into the +mesh buffers as desired. All positions, normals, etc. are updated accordingly. + +Ok, let's start with the headers (I think there's nothing to say about it) +*/ + +#include +#include "driverChoice.h" + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +//Namespaces for the engine +using namespace irr; +using namespace video; +using namespace core; +using namespace scene; +using namespace io; +using namespace gui; + +/* This is the type of the functions which work out the colour. */ +typedef SColor colour_func(f32 x, f32 y, f32 z); + +/* Here comes a set of functions which can be used for coloring the nodes while +creating the mesh. */ + +// Greyscale, based on the height. +SColor grey(f32, f32, f32 z) +{ + u32 n = (u32)(255.f * z); + return SColor(255, n, n, n); +} + +// Interpolation between blue and white, with red added in one +// direction and green in the other. +SColor yellow(f32 x, f32 y, f32) +{ + return SColor(255, 128 + (u32)(127.f * x), 128 + (u32)(127.f * y), 255); +} + +// Pure white. +SColor white(f32, f32, f32) { return SColor(255, 255, 255, 255); } + +/* The type of the functions which generate the heightmap. x and y +range between -0.5 and 0.5, and s is the scale of the heightmap. */ + +typedef f32 generate_func(s16 x, s16 y, f32 s); + +// An interesting sample function :-) +f32 eggbox(s16 x, s16 y, f32 s) +{ + const f32 r = 4.f*sqrtf((f32)(x*x + y*y))/s; + const f32 z = expf(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y)); + return 0.25f+0.25f*z; +} + +// A rather dumb sine function :-/ +f32 moresine(s16 x, s16 y, f32 s) +{ + const f32 xx=0.3f*(f32)x/s; + const f32 yy=12*y/s; + const f32 z = sinf(xx*xx+yy)*sinf(xx+yy*yy); + return 0.25f + 0.25f * z; +} + +// A simple function +f32 justexp(s16 x, s16 y, f32 s) +{ + const f32 xx=6*x/s; + const f32 yy=6*y/s; + const f32 z = (xx*xx+yy*yy); + return 0.3f*z*cosf(xx*yy); +} + +/* A simple class for representing heightmaps. Most of this should be obvious. */ + +class HeightMap +{ +private: + const u16 Width; + const u16 Height; + f32 s; + core::array data; +public: + HeightMap(u16 _w, u16 _h) : Width(_w), Height(_h), s(0.f), data(0) + { + s = sqrtf((f32)(Width * Width + Height * Height)); + data.set_used(Width * Height); + } + + // Fill the heightmap with values generated from f. + void generate(generate_func f) + { + u32 i=0; + for(u16 y = 0; y < Height; ++y) + for(u16 x = 0; x < Width; ++x) + set(i++, calc(f, x, y)); + } + + u16 height() const { return Height; } + u16 width() const { return Width; } + + f32 calc(generate_func f, u16 x, u16 y) const + { + const f32 xx = (f32)x - Width*0.5f; + const f32 yy = (f32)y - Height*0.5f; + return f((u16)xx, (u16)yy, s); + } + + // The height at (x, y) is at position y * Width + x. + + void set(u16 x, u16 y, f32 z) { data[y * Width + x] = z; } + void set(u32 i, f32 z) { data[i] = z; } + f32 get(u16 x, u16 y) const { return data[y * Width + x]; } + + /* The only difficult part. This considers the normal at (x, y) to + be the cross product of the vectors between the adjacent points + in the horizontal and vertical directions. + + s is a scaling factor, which is necessary if the height units are + different from the coordinate units; for example, if your map has + heights in metres and the coordinates are in units of a + kilometer. */ + + vector3df getnormal(u16 x, u16 y, f32 s) const + { + const f32 zc = get(x, y); + f32 zl, zr, zu, zd; + + if (x == 0) + { + zr = get(x + 1, y); + zl = zc + zc - zr; + } + else if (x == Width - 1) + { + zl = get(x - 1, y); + zr = zc + zc - zl; + } + else + { + zr = get(x + 1, y); + zl = get(x - 1, y); + } + + if (y == 0) + { + zd = get(x, y + 1); + zu = zc + zc - zd; + } + else if (y == Height - 1) + { + zu = get(x, y - 1); + zd = zc + zc - zu; + } + else + { + zd = get(x, y + 1); + zu = get(x, y - 1); + } + + return vector3df(s * 2 * (zl - zr), 4, s * 2 * (zd - zu)).normalize(); + } +}; + +/* A class which generates a mesh from a heightmap. */ +class TMesh +{ +private: + u16 Width; + u16 Height; + f32 Scale; +public: + SMesh* Mesh; + + TMesh() : Mesh(0), Width(0), Height(0), Scale(1.f) + { + Mesh = new SMesh(); + } + + ~TMesh() + { + Mesh->drop(); + } + + // Unless the heightmap is small, it won't all fit into a single + // SMeshBuffer. This function chops it into pieces and generates a + // buffer from each one. + + void init(const HeightMap &hm, f32 scale, colour_func cf, IVideoDriver *driver) + { + Scale = scale; + + const u32 mp = driver -> getMaximalPrimitiveCount(); + Width = hm.width(); + Height = hm.height(); + + const u32 sw = mp / (6 * Height); // the width of each piece + + u32 i=0; + for(u32 y0 = 0; y0 < Height; y0 += sw) + { + u16 y1 = y0 + sw; + if (y1 >= Height) + y1 = Height - 1; // the last one might be narrower + addstrip(hm, cf, y0, y1, i); + ++i; + } + if (igetMeshBufferCount()) + { + // clear the rest + for (u32 j=i; jgetMeshBufferCount(); ++j) + { + Mesh->getMeshBuffer(j)->drop(); + } + Mesh->MeshBuffers.erase(i,Mesh->getMeshBufferCount()-i); + } + // set dirty flag to make sure that hardware copies of this + // buffer are also updated, see IMesh::setHardwareMappingHint + Mesh->setDirty(); + Mesh->recalculateBoundingBox(); + } + + // Generate a SMeshBuffer which represents all the vertices and + // indices for values of y between y0 and y1, and add it to the + // mesh. + + void addstrip(const HeightMap &hm, colour_func cf, u16 y0, u16 y1, u32 bufNum) + { + SMeshBuffer *buf = 0; + if (bufNumgetMeshBufferCount()) + { + buf = (SMeshBuffer*)Mesh->getMeshBuffer(bufNum); + } + else + { + // create new buffer + buf = new SMeshBuffer(); + Mesh->addMeshBuffer(buf); + // to simplify things we drop here but continue using buf + buf->drop(); + } + buf->Vertices.set_used((1 + y1 - y0) * Width); + + u32 i=0; + for (u16 y = y0; y <= y1; ++y) + { + for (u16 x = 0; x < Width; ++x) + { + const f32 z = hm.get(x, y); + const f32 xx = (f32)x/(f32)Width; + const f32 yy = (f32)y/(f32)Height; + + S3DVertex& v = buf->Vertices[i++]; + v.Pos.set(x, Scale * z, y); + v.Normal.set(hm.getnormal(x, y, Scale)); + v.Color=cf(xx, yy, z); + v.TCoords.set(xx, yy); + } + } + + buf->Indices.set_used(6 * (Width - 1) * (y1 - y0)); + i=0; + for(u16 y = y0; y < y1; ++y) + { + for(u16 x = 0; x < Width - 1; ++x) + { + const u16 n = (y-y0) * Width + x; + buf->Indices[i]=n; + buf->Indices[++i]=n + Width; + buf->Indices[++i]=n + Width + 1; + buf->Indices[++i]=n + Width + 1; + buf->Indices[++i]=n + 1; + buf->Indices[++i]=n; + ++i; + } + } + + buf->recalculateBoundingBox(); + } +}; + +/* +Our event receiver implementation, taken from tutorial 4. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + // This is the one method that we have to implement + virtual bool OnEvent(const SEvent& event) + { + // Remember whether each key is down or up + if (event.EventType == irr::EET_KEY_INPUT_EVENT) + KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown; + + return false; + } + + // This is used to check whether a key is being held down + virtual bool IsKeyDown(EKEY_CODE keyCode) const + { + return KeyIsDown[keyCode]; + } + + MyEventReceiver() + { + for (u32 i=0; igetVideoDriver(); + ISceneManager *smgr = device->getSceneManager(); + device->setWindowCaption(L"Irrlicht Example for SMesh usage."); + + /* + Create the custom mesh and initialize with a heightmap + */ + TMesh mesh; + HeightMap hm = HeightMap(255, 255); + hm.generate(eggbox); + mesh.init(hm, 50.f, grey, driver); + + // Add the mesh to the scene graph + IMeshSceneNode* meshnode = smgr -> addMeshSceneNode(mesh.Mesh); + meshnode->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); + + // light is just for nice effects + ILightSceneNode *node = smgr->addLightSceneNode(0, vector3df(0,100,0), + SColorf(1.0f, 0.6f, 0.7f, 1.0f), 500.0f); + if (node) + { + node->getLightData().Attenuation.set(0.f, 1.f/500.f, 0.f); + ISceneNodeAnimator* anim = smgr->createFlyCircleAnimator(vector3df(0,150,0),250.0f); + if (anim) + { + node->addAnimator(anim); + anim->drop(); + } + } + + ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); + if (camera) + { + camera->setPosition(vector3df(-20.f, 150.f, -20.f)); + camera->setTarget(vector3df(200.f, -80.f, 150.f)); + camera->setFarValue(20000.0f); + } + + /* + Just a usual render loop with event handling. The custom mesh is + a usual part of the scene graph which gets rendered by drawAll. + */ + while(device->run()) + { + if(!device->isWindowActive()) + { + device->sleep(100); + continue; + } + + if(receiver.IsKeyDown(irr::KEY_KEY_W)) + { + meshnode->setMaterialFlag(video::EMF_WIREFRAME, !meshnode->getMaterial(0).Wireframe); + } + else if(receiver.IsKeyDown(irr::KEY_KEY_1)) + { + hm.generate(eggbox); + mesh.init(hm, 50.f, grey, driver); + } + else if(receiver.IsKeyDown(irr::KEY_KEY_2)) + { + hm.generate(moresine); + mesh.init(hm, 50.f, yellow, driver); + } + else if(receiver.IsKeyDown(irr::KEY_KEY_3)) + { + hm.generate(justexp); + mesh.init(hm, 50.f, yellow, driver); + } + + driver->beginScene(true, true, SColor(0xff000000)); + smgr->drawAll(); + driver->endScene(); + } + + device->drop(); + + return 0; +} + +/* +That's it! Just compile and play around with the program. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.cbp b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.cbp new file mode 100644 index 0000000..6d1b92a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.cbp @@ -0,0 +1,56 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.vcproj b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.vcproj new file mode 100644 index 0000000..1bc2f53 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc10.vcxproj new file mode 100644 index 0000000..9912eda --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc10.vcxproj @@ -0,0 +1,184 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 24.CursorControl + {02B67A37-50E1-49DB-BECF-905BC029C2FE} + 24.CursorControl + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\24.CursorControl.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)CursorControl.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\24.CursorControl.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)CursorControl.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\24.CursorControl.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\24.CursorControl.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc11.vcxproj new file mode 100644 index 0000000..362f064 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc11.vcxproj @@ -0,0 +1,188 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 24.CursorControl + {02B67A37-50E1-49DB-BECF-905BC029C2FE} + 24.CursorControl + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\24.CursorControl.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)CursorControl.pdb + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\bin\Win64-VisualStudio\24.CursorControl.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)CursorControl.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\24.CursorControl.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win64-VisualStudio\24.CursorControl.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc8.vcproj new file mode 100644 index 0000000..6148942 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc8.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc9.vcproj new file mode 100644 index 0000000..90ebf1f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/CursorControl_vc9.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/Makefile b/src/others/irrlicht-1.8.1/examples/24.CursorControl/Makefile new file mode 100644 index 0000000..bc2a137 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler + +# Name of the executable created (.exe will be added automatically if necessary) +Target := 24.CursorControl +# List of source files, separated by spaces +Sources := main.cpp +# Path to Irrlicht directory, should contain include/ and lib/ +IrrlichtHome := ../.. +# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems +BinPath = ../../bin/$(SYSTEM) + +# general compiler settings (might need to be set when compiling the lib, too) +# preprocessor flags, e.g. defines and include paths +USERCPPFLAGS = +# compiler flags such as optimization flags +USERCXXFLAGS = -O3 -ffast-math +#USERCXXFLAGS = -g -Wall +# linker flags such as additional libraries and link paths +USERLDFLAGS = + +#### +#no changes necessary below this line +#### + +CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS) +CXXFLAGS = $(USERCXXFLAGS) +LDFLAGS = $(USERLDFLAGS) + +#default target is Linux +all: all_linux + +# target specific settings +all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc +all_win32 clean_win32 static_win32: SUF=.exe +static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ +all_win32: LDFLAGS += -lopengl32 -lm +static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = $(BinPath)/$(Target)$(SUF) + +all_linux all_win32 static_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 static_win32 clean clean_linux clean_win32 + +#multilib handling +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif +#solaris real-time features +ifeq ($(HOSTTYPE), sun4) +LDFLAGS += -lrt +endif + diff --git a/src/others/irrlicht-1.8.1/examples/24.CursorControl/main.cpp b/src/others/irrlicht-1.8.1/examples/24.CursorControl/main.cpp new file mode 100644 index 0000000..ff7c16f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/24.CursorControl/main.cpp @@ -0,0 +1,563 @@ +/** Example 024 CursorControl + +Show how to modify cursors and offer some useful tool-functions for creating cursors. +It can also be used for experiments with the mouse in general. +*/ + +#include +#include "driverChoice.h" + +using namespace irr; +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#endif + +const int DELAY_TIME = 3000; + +enum ETimerAction +{ + ETA_MOUSE_VISIBLE, + ETA_MOUSE_INVISIBLE, +}; + +/* + Structure to allow delayed execution of some actions. +*/ +struct TimerAction +{ + u32 TargetTime; + ETimerAction Action; +}; + +/* +*/ +struct SAppContext +{ + SAppContext() + : Device(0), InfoStatic(0), EventBox(0), CursorBox(0), SpriteBox(0) + , ButtonSetVisible(0), ButtonSetInvisible(0), ButtonSimulateBadFps(0) + , ButtonChangeIcon(0) + , SimulateBadFps(false) + { + } + + void update() + { + if (!Device) + return; + u32 timeNow = Device->getTimer()->getTime(); + for ( u32 i=0; i < TimerActions.size(); ++i ) + { + if ( timeNow >= TimerActions[i].TargetTime ) + { + runTimerAction(TimerActions[i]); + TimerActions.erase(i); + } + else + { + ++i; + } + } + } + + void runTimerAction(const TimerAction& action) + { + if (ETA_MOUSE_VISIBLE == action.Action) + { + Device->getCursorControl()->setVisible(true); + ButtonSetVisible->setEnabled(true); + } + else if ( ETA_MOUSE_INVISIBLE == action.Action) + { + Device->getCursorControl()->setVisible(false); + ButtonSetInvisible->setEnabled(true); + } + } + + /* + Add another icon which the user can click and select as cursor later on. + */ + void addIcon(const stringw& name, const SCursorSprite &sprite, bool addCursor=true) + { + // Sprites are just icons - not yet cursors. They can be displayed by Irrlicht sprite functions and be used to create cursors. + SpriteBox->addItem(name.c_str(), sprite.SpriteId); + Sprites.push_back(sprite); + + // create the cursor together with the icon? + if ( addCursor ) + { + /* Here we create a hardware cursor from a sprite */ + Device->getCursorControl()->addIcon(sprite); + + // ... and add it to the cursors selection listbox to the other system cursors. + CursorBox->addItem(name.c_str()); + } + } + + IrrlichtDevice * Device; + gui::IGUIStaticText * InfoStatic; + gui::IGUIListBox * EventBox; + gui::IGUIListBox * CursorBox; + gui::IGUIListBox * SpriteBox; + gui::IGUIButton * ButtonSetVisible; + gui::IGUIButton * ButtonSetInvisible; + gui::IGUIButton * ButtonSimulateBadFps; + gui::IGUIButton * ButtonChangeIcon; + array TimerActions; + bool SimulateBadFps; + array Sprites; +}; + +/* + Helper function to print mouse event names into a stringw +*/ +void PrintMouseEventName(const SEvent& event, stringw &result) +{ + switch ( event.MouseInput.Event ) + { + case EMIE_LMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_LMOUSE_PRESSED_DOWN"); break; + case EMIE_RMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_RMOUSE_PRESSED_DOWN"); break; + case EMIE_MMOUSE_PRESSED_DOWN: result += stringw(L"EMIE_MMOUSE_PRESSED_DOWN"); break; + case EMIE_LMOUSE_LEFT_UP: result += stringw(L"EMIE_LMOUSE_LEFT_UP"); break; + case EMIE_RMOUSE_LEFT_UP: result += stringw(L"EMIE_RMOUSE_LEFT_UP"); break; + case EMIE_MMOUSE_LEFT_UP: result += stringw(L"EMIE_MMOUSE_LEFT_UP"); break; + case EMIE_MOUSE_MOVED: result += stringw(L"EMIE_MOUSE_MOVED"); break; + case EMIE_MOUSE_WHEEL: result += stringw(L"EMIE_MOUSE_WHEEL"); break; + case EMIE_LMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_LMOUSE_DOUBLE_CLICK"); break; + case EMIE_RMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_RMOUSE_DOUBLE_CLICK"); break; + case EMIE_MMOUSE_DOUBLE_CLICK: result += stringw(L"EMIE_MMOUSE_DOUBLE_CLICK"); break; + case EMIE_LMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_LMOUSE_TRIPLE_CLICK"); break; + case EMIE_RMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_RMOUSE_TRIPLE_CLICK"); break; + case EMIE_MMOUSE_TRIPLE_CLICK: result += stringw(L"EMIE_MMOUSE_TRIPLE_CLICK"); break; + default: + break; + } +} + +/* + Helper function to print all the state information which get from a mouse-event into a stringw +*/ +void PrintMouseState(const SEvent& event, stringw &result) +{ + result += stringw(L"X: "); + result += stringw(event.MouseInput.X); + result += stringw(L"\n"); + + result += stringw(L"Y: "); + result += stringw(event.MouseInput.Y); + result += stringw(L"\n"); + + + result += stringw(L"Wheel: "); + result += stringw(event.MouseInput.Wheel); + result += stringw(L"\n"); + + result += stringw(L"Shift: "); + if ( event.MouseInput.Shift ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"Control: "); + if ( event.MouseInput.Control ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"ButtonStates: "); + result += stringw(event.MouseInput.ButtonStates); + result += stringw(L"\n"); + + result += stringw(L"isLeftPressed: "); + if ( event.MouseInput.isLeftPressed() ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"isRightPressed: "); + if ( event.MouseInput.isRightPressed() ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"isMiddlePressed: "); + if ( event.MouseInput.isMiddlePressed() ) + result += stringw(L"true\n"); + else + result += stringw(L"false\n"); + + result += stringw(L"Event: "); + + PrintMouseEventName(event, result); + + result += stringw(L"\n"); +} + +/* + A typical event receiver. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + MyEventReceiver(SAppContext & context) : Context(context) { } + + virtual bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT ) + { + switch ( event.GUIEvent.EventType ) + { + case EGET_BUTTON_CLICKED: + { + u32 timeNow = Context.Device->getTimer()->getTime(); + TimerAction action; + action.TargetTime = timeNow + DELAY_TIME; + if ( event.GUIEvent.Caller == Context.ButtonSetVisible ) + { + action.Action = ETA_MOUSE_VISIBLE; + Context.TimerActions.push_back(action); + Context.ButtonSetVisible->setEnabled(false); + } + else if ( event.GUIEvent.Caller == Context.ButtonSetInvisible ) + { + action.Action = ETA_MOUSE_INVISIBLE; + Context.TimerActions.push_back(action); + Context.ButtonSetInvisible->setEnabled(false); + } + else if ( event.GUIEvent.Caller == Context.ButtonSimulateBadFps ) + { + Context.SimulateBadFps = Context.ButtonSimulateBadFps->isPressed(); + } + else if ( event.GUIEvent.Caller == Context.ButtonChangeIcon ) + { + /* + Replace an existing cursor icon by another icon. + The user has to select both - the icon which should be replaced and the icon which will replace it. + */ + s32 selectedCursor = Context.CursorBox->getSelected(); + s32 selectedSprite = Context.SpriteBox->getSelected(); + if ( selectedCursor >= 0 && selectedSprite >= 0 ) + { + /* + This does replace the icon. + */ + Context.Device->getCursorControl()->changeIcon((ECURSOR_ICON)selectedCursor, Context.Sprites[selectedSprite] ); + + /* + Do also show the new icon. + */ + Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selectedCursor) ); + } + } + } + break; + case EGET_LISTBOX_CHANGED: + case EGET_LISTBOX_SELECTED_AGAIN: + { + if ( event.GUIEvent.Caller == Context.CursorBox ) + { + /* + Find out which cursor the user selected + */ + s32 selected = Context.CursorBox->getSelected(); + if ( selected >= 0 ) + { + /* + Here we set the new cursor icon which will now be used within our window. + */ + Context.Device->getCursorControl()->setActiveIcon( ECURSOR_ICON(selected) ); + } + } + } + break; + default: + break; + } + } + + if (event.EventType == EET_MOUSE_INPUT_EVENT) + { + stringw infoText; + PrintMouseState(event, infoText); + Context.InfoStatic->setText(infoText.c_str()); + if ( event.MouseInput.Event != EMIE_MOUSE_MOVED && event.MouseInput.Event != EMIE_MOUSE_WHEEL ) // no spam + { + infoText = L""; + PrintMouseEventName(event, infoText); + Context.EventBox->insertItem(0, infoText.c_str(), -1); + } + } + + return false; + } + +private: + SAppContext & Context; +}; + +/* + Use several imagefiles as animation frames for a sprite which can be used as cursor icon. + The images in those files all need to have the same size. + Return sprite index on success or -1 on failure +*/ +s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const array< io::path >& files, u32 frameTime ) +{ + if ( !spriteBank || !driver || !files.size() ) + return -1; + + video::ITexture * tex = driver->getTexture( files[0] ); + if ( tex ) + { + array< rect >& spritePositions = spriteBank->getPositions(); + u32 idxRect = spritePositions.size(); + spritePositions.push_back( rect(0,0, tex->getSize().Width, tex->getSize().Height) ); + + SGUISprite sprite; + sprite.frameTime = frameTime; + + array< SGUISprite >& sprites = spriteBank->getSprites(); + u32 startIdx = spriteBank->getTextureCount(); + for ( u32 f=0; f < files.size(); ++f ) + { + tex = driver->getTexture( files[f] ); + if ( tex ) + { + spriteBank->addTexture( driver->getTexture(files[f]) ); + gui::SGUISpriteFrame frame; + frame.rectNumber = idxRect; + frame.textureNumber = startIdx+f; + sprite.Frames.push_back( frame ); + } + } + + sprites.push_back( sprite ); + return sprites.size()-1; + } + + return -1; +} + +/* + Use several images within one imagefile as animation frames for a sprite which can be used as cursor icon + The sizes of the icons within that file all need to have the same size + Return sprite index on success or -1 on failure +*/ +s32 AddAnimatedIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const array< rect >& rects, u32 frameTime ) +{ + if ( !spriteBank || !driver || !rects.size() ) + return -1; + + video::ITexture * tex = driver->getTexture( file ); + if ( tex ) + { + array< rect >& spritePositions = spriteBank->getPositions(); + u32 idxRect = spritePositions.size(); + u32 idxTex = spriteBank->getTextureCount(); + spriteBank->addTexture( tex ); + + SGUISprite sprite; + sprite.frameTime = frameTime; + + array< SGUISprite >& sprites = spriteBank->getSprites(); + for ( u32 i=0; i < rects.size(); ++i ) + { + spritePositions.push_back( rects[i] ); + + gui::SGUISpriteFrame frame; + frame.rectNumber = idxRect+i; + frame.textureNumber = idxTex; + sprite.Frames.push_back( frame ); + } + + sprites.push_back( sprite ); + return sprites.size()-1; + } + + return -1; +} + +/* + Create a non-animated icon from the given file and position and put it into the spritebank. + We can use this icon later on in a cursor. +*/ +s32 AddIconToSpriteBank( gui::IGUISpriteBank * spriteBank, video::IVideoDriver* driver, const io::path& file, const core::rect& rect ) +{ + if ( !spriteBank || !driver ) + return -1; + + video::ITexture * tex = driver->getTexture( file ); + if ( tex ) + { + core::array< core::rect >& spritePositions = spriteBank->getPositions(); + spritePositions.push_back( rect ); + array< SGUISprite >& sprites = spriteBank->getSprites(); + spriteBank->addTexture( tex ); + + gui::SGUISpriteFrame frame; + frame.rectNumber = spritePositions.size()-1; + frame.textureNumber = spriteBank->getTextureCount()-1; + + SGUISprite sprite; + sprite.frameTime = 0; + sprite.Frames.push_back( frame ); + + sprites.push_back( sprite ); + + return sprites.size()-1; + } + + return -1; +} + +int main() +{ + video::E_DRIVER_TYPE driverType = driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + IrrlichtDevice * device = createDevice(driverType, dimension2d(640, 480)); + if (device == 0) + return 1; // could not create selected driver. + + // It's sometimes of interest to know how the mouse behaves after a resize + device->setResizable(true); + + device->setWindowCaption(L"Cursor control - Irrlicht engine tutorial"); + video::IVideoDriver* driver = device->getVideoDriver(); + IGUIEnvironment* env = device->getGUIEnvironment(); + + gui::IGUISpriteBank * SpriteBankIcons; + + SAppContext context; + context.Device = device; + + rect< s32 > rectInfoStatic(10,10, 200, 200); + env->addStaticText (L"Cursor state information", rectInfoStatic, true, true); + rectInfoStatic.UpperLeftCorner += dimension2di(0, 15); + context.InfoStatic = env->addStaticText (L"", rectInfoStatic, true, true); + rect< s32 > rectEventBox(10,210, 200, 400); + env->addStaticText (L"click events (new on top)", rectEventBox, true, true); + rectEventBox.UpperLeftCorner += dimension2di(0, 15); + context.EventBox = env->addListBox(rectEventBox); + rect< s32 > rectCursorBox(210,10, 400, 250); + env->addStaticText (L"cursors, click to set the active one", rectCursorBox, true, true); + rectCursorBox.UpperLeftCorner += dimension2di(0, 15); + context.CursorBox = env->addListBox(rectCursorBox); + rect< s32 > rectSpriteBox(210,260, 400, 400); + env->addStaticText (L"sprites", rectSpriteBox, true, true); + rectSpriteBox.UpperLeftCorner += dimension2di(0, 15); + context.SpriteBox = env->addListBox(rectSpriteBox); + + context.ButtonSetVisible = env->addButton( rect( 410, 20, 560, 40 ), 0, -1, L"set visible (delayed)" ); + context.ButtonSetInvisible = env->addButton( rect( 410, 50, 560, 70 ), 0, -1, L"set invisible (delayed)" ); + context.ButtonSimulateBadFps = env->addButton( rect( 410, 80, 560, 100 ), 0, -1, L"simulate bad FPS" ); + context.ButtonSimulateBadFps->setIsPushButton(true); + context.ButtonChangeIcon = env->addButton( rect( 410, 140, 560, 160 ), 0, -1, L"replace cursor icon\n(cursor+sprite must be selected)" ); + + // set the names for all the system cursors + for ( int i=0; i < (int)gui::ECI_COUNT; ++i ) + { + context.CursorBox->addItem(stringw( GUICursorIconNames[i] ).c_str()); + } + + /* + Create sprites which then can be used as cursor icons. + */ + SpriteBankIcons = env->addEmptySpriteBank(io::path("cursor_icons")); + context.SpriteBox->setSpriteBank(SpriteBankIcons); + + // create one animated icon from several files + array< io::path > files; + files.push_back( io::path("../../media/icon_crosshairs16x16bw1.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw3.png") ); + files.push_back( io::path("../../media/icon_crosshairs16x16bw2.png") ); + SCursorSprite spriteBw; // the sprite + some additional information needed for cursors + spriteBw.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, files, 200 ); + spriteBw.SpriteBank = SpriteBankIcons; + spriteBw.HotSpot = position2d(7,7); + context.addIcon(L"crosshair_bw", spriteBw); + + // create one animated icon from one file + array< rect > iconRects; + iconRects.push_back( rect(0,0, 16, 16) ); + iconRects.push_back( rect(16,0, 32, 16) ); + iconRects.push_back( rect(0,16, 16, 32) ); + iconRects.push_back( rect(0,16, 16, 32) ); + iconRects.push_back( rect(16,0, 32, 16) ); + SCursorSprite spriteCol; // the sprite + some additional information needed for cursors + spriteCol.SpriteId = AddAnimatedIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), iconRects, 200 ); + spriteCol.HotSpot = position2d(7,7); + spriteCol.SpriteBank = SpriteBankIcons; + context.addIcon(L"crosshair_colored", spriteCol); + + // Create some non-animated icons + rect rectIcon; + SCursorSprite spriteNonAnimated(SpriteBankIcons, 0, position2d(7,7)); + + rectIcon = rect(0,0, 16, 16); + spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon ); + context.addIcon(L"crosshair_col1", spriteNonAnimated, false); + + rectIcon = rect(16,0, 32, 16); + spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon ); + context.addIcon(L"crosshair_col2", spriteNonAnimated, false); + + rectIcon = rect(0,16, 16, 32); + spriteNonAnimated.SpriteId = AddIconToSpriteBank( SpriteBankIcons, driver, io::path("../../media/icon_crosshairs16x16col.png"), rectIcon ); + context.addIcon(L"crosshair_col3", spriteNonAnimated, false); + + + MyEventReceiver receiver(context); + device->setEventReceiver(&receiver); + + while(device->run() && driver) + { + // if (device->isWindowActive()) + { + u32 realTimeNow = device->getTimer()->getRealTime(); + + context.update(); + + driver->beginScene(true, true, SColor(0,200,200,200)); + + env->drawAll(); + + // draw custom sprite with Irrlicht functions for comparison. It should usually look the same as the cursors. + if ( context.SpriteBox ) + { + s32 selectedSprite = context.SpriteBox->getSelected(); + if ( selectedSprite >= 0 && context.Sprites[selectedSprite].SpriteId >= 0 ) + { + SpriteBankIcons->draw2DSprite(u32(context.Sprites[selectedSprite].SpriteId), position2di(580, 140), 0, video::SColor(255, 255, 255, 255), 0, realTimeNow); + } + } + + driver->endScene(); + } + + // By simulating bad fps we can find out if hardware-support for cursors works or not. If it works the cursor will move as usual,while it otherwise will just update with 2 fps now. + if ( context.SimulateBadFps ) + { + device->sleep(500); // 2 fps + } + else + { + device->sleep(10); + } + } + + device->drop(); + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/Makefile b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/Makefile new file mode 100644 index 0000000..92f5655 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler + +# Name of the executable created (.exe will be added automatically if necessary) +Target := 25.XmlHandling +# List of source files, separated by spaces +Sources := main.cpp +# Path to Irrlicht directory, should contain include/ and lib/ +IrrlichtHome := ../.. +# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems +BinPath = ../../bin/$(SYSTEM) + +# general compiler settings (might need to be set when compiling the lib, too) +# preprocessor flags, e.g. defines and include paths +USERCPPFLAGS = +# compiler flags such as optimization flags +USERCXXFLAGS = -O3 -ffast-math +#USERCXXFLAGS = -g -Wall +# linker flags such as additional libraries and link paths +USERLDFLAGS = + +#### +#no changes necessary below this line +#### + +CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS) +CXXFLAGS = $(USERCXXFLAGS) +LDFLAGS = $(USERLDFLAGS) + +#default target is Linux +all: all_linux + +# target specific settings +all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc +all_win32 clean_win32 static_win32: SUF=.exe +static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ +all_win32: LDFLAGS += -lopengl32 -lm +static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = $(BinPath)/$(Target)$(SUF) + +all_linux all_win32 static_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 static_win32 clean clean_linux clean_win32 + +#multilib handling +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif +#solaris real-time features +ifeq ($(HOSTTYPE), sun4) +LDFLAGS += -lrt +endif + diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.cbp b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.cbp new file mode 100644 index 0000000..3ecf5a2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.vcproj b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.vcproj new file mode 100644 index 0000000..152a415 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling.vcproj @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc10.vcxproj new file mode 100644 index 0000000..2f550a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc10.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 25.XmlHandling + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E} + 25.XmlHandling + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Level3 + + + Cdecl + + + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Level3 + + + Cdecl + + + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc11.vcxproj new file mode 100644 index 0000000..b150b95 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc11.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 25.XmlHandling + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E} + 25.XmlHandling + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Level3 + + + Cdecl + + + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Level3 + + + Cdecl + + + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc8.vcproj new file mode 100644 index 0000000..0831ba9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc8.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc9.vcproj new file mode 100644 index 0000000..79a1048 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/XmlHandling_vc9.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/25.XmlHandling/main.cpp b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/main.cpp new file mode 100644 index 0000000..3eb261d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/25.XmlHandling/main.cpp @@ -0,0 +1,505 @@ +/** Example 025 Xml Handling + +Demonstrates loading and saving of configurations via XML + +@author Y.M. Bosman \ + +This demo features a fully usable system for configuration handling. The code +can easily be integrated into own apps. + +*/ + +#include + +using namespace irr; +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#endif + + +/* SettingManager class. + +This class loads and writes the settings and manages the options. + +The class makes use of irrMap which is a an associative arrays using a +red-black tree it allows easy mapping of a key to a value, along the way there +is some information on how to use it. +*/ + +class SettingManager +{ +public: + + // Construct setting managers and set default settings + SettingManager(const stringw& settings_file): SettingsFile(settings_file), NullDevice(0) + { + // Irrlicht null device, we want to load settings before we actually created our device, therefore, nulldevice + NullDevice = irr::createDevice(irr::video::EDT_NULL); + + //DriverOptions is an irrlicht map, + //we can insert values in the map in two ways by calling insert(key,value) or by using the [key] operator + //the [] operator overrides values if they already exist + DriverOptions.insert(L"Software", EDT_SOFTWARE); + DriverOptions.insert(L"OpenGL", EDT_OPENGL); + DriverOptions.insert(L"Direct3D9", EDT_DIRECT3D9); + + //some resolution options + ResolutionOptions.insert(L"640x480", dimension2du(640,480)); + ResolutionOptions.insert(L"800x600", dimension2du(800,600)); + ResolutionOptions.insert(L"1024x768", dimension2du(1024,768)); + + //our preferred defaults + SettingMap.insert(L"driver", L"Direct3D9"); + SettingMap.insert(L"resolution", L"640x480"); + SettingMap.insert(L"fullscreen", L"0"); //0 is false + } + + // Destructor, you could store settings automatically on exit of your + // application if you wanted to in our case we simply drop the + // nulldevice + ~SettingManager() + { + if (NullDevice) + { + NullDevice->closeDevice(); + NullDevice->drop(); + } + }; + + /* + Load xml from disk, overwrite default settings + The xml we are trying to load has the following structure + settings nested in sections nested in the root node, like so +
+		
+		
+			
+		
+	
+ */ + bool load() + { + //if not able to create device don't attempt to load + if (!NullDevice) + return false; + + irr::io::IXMLReader* xml = NullDevice->getFileSystem()->createXMLReader(SettingsFile); //create xml reader + if (!xml) + return false; + + const stringw settingTag(L"setting"); //we'll be looking for this tag in the xml + stringw currentSection; //keep track of our current section + const stringw videoTag(L"video"); //constant for videotag + + //while there is more to read + while (xml->read()) + { + //check the node type + switch (xml->getNodeType()) + { + //we found a new element + case irr::io::EXN_ELEMENT: + { + //we currently are in the empty or mygame section and find the video tag so we set our current section to video + if (currentSection.empty() && videoTag.equals_ignore_case(xml->getNodeName())) + { + currentSection = videoTag; + } + //we are in the video section and we find a setting to parse + else if (currentSection.equals_ignore_case(videoTag) && settingTag.equals_ignore_case(xml->getNodeName() )) + { + //read in the key + stringw key = xml->getAttributeValueSafe(L"name"); + //if there actually is a key to set + if (!key.empty()) + { + //set the setting in the map to the value, + //the [] operator overrides values if they already exist or inserts a new key value + //pair into the settings map if it was not defined yet + SettingMap[key] = xml->getAttributeValueSafe(L"value"); + } + } + + //.. + // You can add your own sections and tags to read in here + //.. + } + break; + + //we found the end of an element + case irr::io::EXN_ELEMENT_END: + //we were at the end of the video section so we reset our tag + currentSection=L""; + break; + } + } + + // don't forget to delete the xml reader + xml->drop(); + + return true; + } + + // Save the xml to disk. We use the nulldevice. + bool save() + { + + //if not able to create device don't attempt to save + if (!NullDevice) + return false; + + //create xml writer + irr::io::IXMLWriter* xwriter = NullDevice->getFileSystem()->createXMLWriter( SettingsFile ); + if (!xwriter) + return false; + + //write out the obligatory xml header. Each xml-file needs to have exactly one of those. + xwriter->writeXMLHeader(); + + //start element mygame, you replace the label "mygame" with anything you want + xwriter->writeElement(L"mygame"); + xwriter->writeLineBreak(); //new line + + //start section with video settings + xwriter->writeElement(L"video"); + xwriter->writeLineBreak(); //new line + + // getIterator gets us a pointer to the first node of the settings map + // every iteration we increase the iterator which gives us the next map node + // until we reach the end we write settings one by one by using the nodes key and value functions + map::Iterator i = SettingMap.getIterator(); + for(; !i.atEnd(); i++) + { + //write element as + //the second parameter indicates this is an empty element with no children, just attributes + xwriter->writeElement(L"setting",true, L"name", i->getKey().c_str(), L"value",i->getValue().c_str() ); + xwriter->writeLineBreak(); + } + xwriter->writeLineBreak(); + + //close video section + xwriter->writeClosingTag(L"video"); + xwriter->writeLineBreak(); + + //.. + // You can add writing sound settings, savegame information etc + //.. + + //close mygame section + xwriter->writeClosingTag(L"mygame"); + + //delete xml writer + xwriter->drop(); + + return true; + } + + // Set setting in our manager + void setSetting(const stringw& name, const stringw& value) + { + SettingMap[name]=value; + } + + // set setting overload to quickly assign integers to our setting map + void setSetting(const stringw& name, s32 value) + { + SettingMap[name]=stringw(value); + } + + // Get setting as string + stringw getSetting(const stringw& key) const + { + //the find function or irrmap returns a pointer to a map Node + //if the key can be found, otherwise it returns null + //the map node has the function getValue and getKey, as we already know the key, we return node->getValue() + map::Node* n = SettingMap.find(key); + if (n) + return n->getValue(); + else + return L""; + } + + // + bool getSettingAsBoolean(const stringw& key ) const + { + stringw s = getSetting(key); + if (s.empty()) + return false; + return s.equals_ignore_case(L"1"); + } + + // + s32 getSettingAsInteger(const stringw& key) const + { + //we implicitly cast to string instead of stringw because strtol10 does not accept wide strings + const stringc s = getSetting(key); + if (s.empty()) + return 0; + + return strtol10(s.c_str()); + } + +public: + map DriverOptions; //available options for driver config + map ResolutionOptions; //available options for resolution config +private: + SettingManager(const SettingManager& other); // defined but not implemented + SettingManager& operator=(const SettingManager& other); // defined but not implemented + + map SettingMap; //current config + + stringw SettingsFile; // location of the xml, usually the + irr::IrrlichtDevice* NullDevice; +}; + +/* +Application context for global variables +*/ +struct SAppContext +{ + SAppContext() + : Device(0),Gui(0), Driver(0), Settings(0), ShouldQuit(false), + ButtonSave(0), ButtonExit(0), ListboxDriver(0), + ListboxResolution(0), CheckboxFullscreen(0) + { + } + + ~SAppContext() + { + if (Settings) + delete Settings; + + if (Device) + { + Device->closeDevice(); + Device->drop(); + } + } + + IrrlichtDevice* Device; + IGUIEnvironment* Gui; + IVideoDriver* Driver; + SettingManager* Settings; + bool ShouldQuit; + + //settings dialog + IGUIButton* ButtonSave; + IGUIButton* ButtonExit; + IGUIListBox* ListboxDriver; + IGUIListBox* ListboxResolution; + IGUICheckBox* CheckboxFullscreen; +}; + +/* + A typical event receiver. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + MyEventReceiver(SAppContext & a) : App(a) { } + + virtual bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT ) + { + switch ( event.GUIEvent.EventType ) + { + //handle button click events + case EGET_BUTTON_CLICKED: + { + //Our save button was called so we obtain the settings from our dialog and save them + if ( event.GUIEvent.Caller == App.ButtonSave ) + { + //if there is a selection write it + if ( App.ListboxDriver->getSelected() != -1) + App.Settings->setSetting(L"driver", App.ListboxDriver->getListItem(App.ListboxDriver->getSelected())); + + //if there is a selection write it + if ( App.ListboxResolution->getSelected() != -1) + App.Settings->setSetting(L"resolution", App.ListboxResolution->getListItem(App.ListboxResolution->getSelected())); + + App.Settings->setSetting(L"fullscreen", App.CheckboxFullscreen->isChecked()); + + + if (App.Settings->save()) + { + App.Gui->addMessageBox(L"settings save",L"settings saved, please restart for settings to change effect","",true); + } + } + // cancel/exit button clicked, tell the application to exit + else if ( event.GUIEvent.Caller == App.ButtonExit) + { + App.ShouldQuit = true; + } + } + break; + } + } + + return false; + } + +private: + SAppContext & App; +}; + + +/* +Function to create a video settings dialog +This dialog shows the current settings from the configuration xml and allows them to be changed +*/ +void createSettingsDialog(SAppContext& app) +{ + // first get rid of alpha in gui + for (irr::s32 i=0; igetSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i); + col.setAlpha(255); + app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col); + } + + //create video settings windows + gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect(10,10,400,400),true,L"Videosettings"); + app.Gui->addStaticText (L"Select your desired video settings", rect< s32 >(10,20, 200, 40), false, true, windowSettings); + + // add listbox for driver choice + app.Gui->addStaticText (L"Driver", rect< s32 >(10,50, 200, 60), false, true, windowSettings); + app.ListboxDriver = app.Gui->addListBox(rect(10,60,220,120), windowSettings, 1,true); + + //add all available options to the driver choice listbox + map::Iterator i = app.Settings->DriverOptions.getIterator(); + for(; !i.atEnd(); i++) + app.ListboxDriver->addItem(i->getKey().c_str()); + + //set currently selected driver + app.ListboxDriver->setSelected(app.Settings->getSetting("driver").c_str()); + + // add listbox for resolution choice + app.Gui->addStaticText (L"Resolution", rect< s32 >(10,130, 200, 140), false, true, windowSettings); + app.ListboxResolution = app.Gui->addListBox(rect(10,140,220,200), windowSettings, 1,true); + + //add all available options to the resolution listbox + map::Iterator ri = app.Settings->ResolutionOptions.getIterator(); + for(; !ri.atEnd(); ri++) + app.ListboxResolution->addItem(ri->getKey().c_str()); + + //set currently selected resolution + app.ListboxResolution->setSelected(app.Settings->getSetting("resolution").c_str()); + + //add checkbox to toggle fullscreen, initially set to loaded setting + app.CheckboxFullscreen = app.Gui->addCheckBox( + app.Settings->getSettingAsBoolean("fullscreen"), + rect(10,220,220,240), windowSettings, -1, + L"Fullscreen"); + + //last but not least add save button + app.ButtonSave = app.Gui->addButton( + rect(80,250,150,270), windowSettings, 2, + L"Save video settings"); + + //exit/cancel button + app.ButtonExit = app.Gui->addButton( + rect(160,250,240,270), windowSettings, 2, + L"Cancel and exit"); +} + +/* +The main function. Creates all objects and does the XML handling. +*/ +int main() +{ + //create new application context + SAppContext app; + + //create device creation parameters that can get overwritten by our settings file + SIrrlichtCreationParameters param; + param.DriverType = EDT_SOFTWARE; + param.WindowSize.set(640,480); + + // Try to load config. + // I leave it as an exercise of the reader to store the configuration in the local application data folder, + // the only logical place to store config data for games. For all other operating systems I redirect to your manuals + app.Settings = new SettingManager("../../media/settings.xml"); + if ( !app.Settings->load() ) + { + // ... + // Here add your own exception handling, for now we continue because there are defaults set in SettingManager constructor + // ... + } + else + { + //settings xml loaded from disk, + + //map driversetting to driver type and test if the setting is valid + //the DriverOptions map contains string representations mapped to to irrlicht E_DRIVER_TYPE enum + //e.g "direct3d9" will become 4 + //see DriverOptions in the settingmanager class for details + map::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting("driver") ); + + if (driver) + { + if ( irr::IrrlichtDevice::isDriverSupported( static_cast( driver->getValue() ))) + { + // selected driver is supported, so we use it. + param.DriverType = static_cast( driver->getValue()); + } + } + + //map resolution setting to dimension in a similar way as demonstrated above + map::Node* res = app.Settings->ResolutionOptions.find( app.Settings->getSetting("resolution") ); + if (res) + { + param.WindowSize = res->getValue(); + } + + //get fullscreen setting from config + param.Fullscreen = app.Settings->getSettingAsBoolean("fullscreen"); + } + + //create the irrlicht device using the settings + app.Device = createDeviceEx(param); + if (app.Device == 0) + { + // You can add your own exception handling on driver failure + exit(0); + } + + app.Device->setWindowCaption(L"Xmlhandling - Irrlicht engine tutorial"); + app.Driver = app.Device->getVideoDriver(); + app.Gui = app.Device->getGUIEnvironment(); + + createSettingsDialog(app); + + //set event receiver so we can respond to gui events + MyEventReceiver receiver(app); + app.Device->setEventReceiver(&receiver); + + //enter main loop + while (!app.ShouldQuit && app.Device->run()) + { + if (app.Device->isWindowActive()) + { + app.Driver->beginScene(true, true, SColor(0,200,200,200)); + app.Gui->drawAll(); + app.Driver->endScene(); + } + app.Device->sleep(10); + } + + //app destroys device in destructor + + return 0; +} + +/* +**/ diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/Makefile b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/Makefile new file mode 100644 index 0000000..87e37e4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/Makefile @@ -0,0 +1,39 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = 26.OcclusionQuery +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm +all_win32: CPPFLAGS += -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.cbp b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.cbp new file mode 100644 index 0000000..8872705 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.cbp @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.dev b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.dev new file mode 100644 index 0000000..e9d7c04 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.dev @@ -0,0 +1,59 @@ +[Project] +FileName=example.dev +Name=Irrlicht Example 26 OcclusionQuery +UnitCount=1 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=26.OcclusionQuery.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.vcproj b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.vcproj new file mode 100644 index 0000000..602f2d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery.vcproj @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj new file mode 100644 index 0000000..d56f995 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc10.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 26.OcclusionQuery + {5CE0E2E7-879D-4152-B61D-24E7D0707B45} + OcclusionQuery + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug\OcclusionQuery.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug\OcclusionQuery.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release\OcclusionQuery.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release\OcclusionQuery.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj new file mode 100644 index 0000000..fb8b7a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc11.vcxproj @@ -0,0 +1,235 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 26.OcclusionQuery + {5CE0E2E7-879D-4152-B61D-24E7D0707B45} + OcclusionQuery + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + .\Debug\OcclusionQuery.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Debug\OcclusionQuery.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release\OcclusionQuery.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Release\OcclusionQuery.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win64-VisualStudio\26.OcclusionQuery.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj new file mode 100644 index 0000000..faa137f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc8.vcproj @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj new file mode 100644 index 0000000..c15a527 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/OcclusionQuery_vc9.vcproj @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/main.cpp b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/main.cpp new file mode 100644 index 0000000..17f64b2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/26.OcclusionQuery/main.cpp @@ -0,0 +1,213 @@ +/** Example 026 OcclusionQuery + +This Tutorial shows how to speed up rendering by use of the +OcclusionQuery feature. The usual rendering tries to avoid rendering of +scene nodes by culling those nodes which are outside the visible area, the +view frustum. However, this technique does not cope with occluded objects +which are still in the line of sight, but occluded by some larger object +between the object and the eye (camera). Occlusion queries check exactly that. +The queries basically measure the number of pixels that a previous render +left on the screen. +Since those pixels cannot be recognized at the end of a rendering anymore, +the pixel count is measured directly when rendering. Thus, one needs to render +the occluder (the object in front) first. This object needs to write to the +z-buffer in order to become a real occluder. Then the node is rendered and in +case a z-pass happens, i.e. the pixel is written to the framebuffer, the pixel +is counted in the query. +The result of a query is the number of pixels which got through. One can, based +on this number, judge if the scene node is visible enough to be rendered, or if +the node should be removed in the next round. Also note that the number of +pixels is a safe over approximation in general. The pixels might be overdrawn +later on, and the GPU tries to avoid inaccuracies which could lead to false +negatives in the queries. + +As you might have recognized already, we had to render the node to get the +numbers. So where's the benefit, you might say. There are several ways where +occlusion queries can help. It is often a good idea to just render the bbox +of the node instead of the actual mesh. This is really fast and is a safe over +approximation. If you need a more exact render with the actual geometry, it's +a good idea to render with just basic solid material. Avoid complex shaders +and state changes through textures. There's no need while just doing the +occlusion query. At least if the render is not used for the actual scene. This +is the third way to optimize occlusion queries. Just check the queries every +5th or 10th frame, or even less frequent. This depends on the movement speed +of the objects and camera. +*/ + +#ifdef _MSC_VER +// We'll also define this to stop MSVC complaining about sprintf(). +#define _CRT_SECURE_NO_WARNINGS +#pragma comment(lib, "Irrlicht.lib") +#endif + +#include +#include "driverChoice.h" + +using namespace irr; + +/* +We need keyboard input events to switch some parameters +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + // This is the one method that we have to implement + virtual bool OnEvent(const SEvent& event) + { + // Remember whether each key is down or up + if (event.EventType == irr::EET_KEY_INPUT_EVENT) + KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown; + + return false; + } + + // This is used to check whether a key is being held down + virtual bool IsKeyDown(EKEY_CODE keyCode) const + { + return KeyIsDown[keyCode]; + } + + MyEventReceiver() + { + for (u32 i=0; i(640, 480), 16, false, false, false, &receiver); + + if (device == 0) + return 1; // could not create selected driver. + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + + smgr->getGUIEnvironment()->addStaticText(L"Press Space to hide occluder.", core::recti(10,10, 200,50)); + + /* + Create the node to be occluded. We create a sphere node with high poly count. + */ + scene::ISceneNode * node = smgr->addSphereSceneNode(10, 64); + if (node) + { + node->setPosition(core::vector3df(0,0,60)); + node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp")); + node->setMaterialFlag(video::EMF_LIGHTING, false); + } + + /* + Now we create another node, the occluder. It's a simple plane. + */ + scene::ISceneNode* plane = smgr->addMeshSceneNode(smgr->addHillPlaneMesh( + "plane", core::dimension2df(10,10), core::dimension2du(2,2)), 0, -1, + core::vector3df(0,0,20), core::vector3df(270,0,0)); + + if (plane) + { + plane->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg")); + plane->setMaterialFlag(video::EMF_LIGHTING, false); + plane->setMaterialFlag(video::EMF_BACK_FACE_CULLING, true); + } + + /* + Here we create the occlusion query. Because we don't have a plain mesh scene node + (ESNT_MESH or ESNT_ANIMATED_MESH), we pass the base geometry as well. Instead, + we could also pass a simpler mesh or the bounding box. But we will use a time + based method, where the occlusion query renders to the frame buffer and in case + of success (occlusion), the mesh is not drawn for several frames. + */ + driver->addOcclusionQuery(node, ((scene::IMeshSceneNode*)node)->getMesh()); + + /* + We have done everything, just a camera and draw it. We also write the + current frames per second and the name of the driver to the caption of the + window to examine the render speedup. + We also store the time for measuring the time since the last occlusion query ran + and store whether the node should be visible in the next frames. + */ + smgr->addCameraSceneNode(); + int lastFPS = -1; + u32 timeNow = device->getTimer()->getTime(); + bool nodeVisible=true; + + while(device->run()) + { + plane->setVisible(!receiver.IsKeyDown(irr::KEY_SPACE)); + + driver->beginScene(true, true, video::SColor(255,113,113,133)); + /* + First, we draw the scene, possibly without the occluded element. This is necessary + because we need the occluder to be drawn first. You can also use several scene + managers to collect a number of possible occluders in a separately rendered + scene. + */ + node->setVisible(nodeVisible); + smgr->drawAll(); + smgr->getGUIEnvironment()->drawAll(); + + /* + Once in a while, here every 100 ms, we check the visibility. We run the queries, + update the pixel value, and query the result. Since we already rendered the node + we render the query invisible. The update is made blocking, as we need the result + immediately. If you don't need the result immediately, e.g. because you have other + things to render, you can call the update non-blocking. This gives the GPU more + time to pass back the results without flushing the render pipeline. + If the update was called non-blocking, the result from getOcclusionQueryResult is + either the previous value, or 0xffffffff if no value has been generated at all, yet. + The result is taken immediately as visibility flag for the node. + */ + if (device->getTimer()->getTime()-timeNow>100) + { + driver->runAllOcclusionQueries(false); + driver->updateAllOcclusionQueries(); + nodeVisible=driver->getOcclusionQueryResult(node)>0; + timeNow=device->getTimer()->getTime(); + } + + driver->endScene(); + + int fps = driver->getFPS(); + + if (lastFPS != fps) + { + core::stringw tmp(L"OcclusionQuery Example ["); + tmp += driver->getName(); + tmp += L"] fps: "; + tmp += fps; + + device->setWindowCaption(tmp.c_str()); + lastFPS = fps; + } + } + + /* + In the end, delete the Irrlicht device. + */ + device->drop(); + + return 0; +} + +/* +That's it. Compile and play around with the program. +**/ diff --git a/src/others/irrlicht-1.8.1/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist b/src/others/irrlicht-1.8.1/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist new file mode 100644 index 0000000..a754c7f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/BuildAllExamples.MacOSX/DemoApp-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.irrlicht.${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + IRRL + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/src/others/irrlicht-1.8.1/examples/BuildAllExamples.workspace b/src/others/irrlicht-1.8.1/examples/BuildAllExamples.workspace new file mode 100644 index 0000000..56933c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/BuildAllExamples.workspace @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/BuildAllExamples_v8.sln b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_v8.sln new file mode 100644 index 0000000..4368378 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_v8.sln @@ -0,0 +1,236 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc8", "01.HelloWorld\HelloWorld_vc8.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map_vc8", "02.Quake3Map\Quake3Map_vc8.vcproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode_vc8", "03.CustomSceneNode\CustomSceneNode_vc8.vcproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement_vc8", "04.Movement\Movement_vc8.vcproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc8", "05.UserInterface\UserInterface_vc8.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics_vc8", "06.2DGraphics\2DGraphics_vc8.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision_vc8", "07.Collision\Collision_vc8.vcproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX_vc8", "08.SpecialFX\SpecialFX_vc8.vcproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer_vc8", "09.Meshviewer\Meshviewer_vc8.vcproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders_vc8", "10.Shaders\Shaders_vc8.vcproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting_vc8", "11.PerPixelLighting\PerPixelLighting_vc8.vcproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering_vc8", "12.TerrainRendering\TerrainRendering_vc8.vcproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture_vc8", "13.RenderToTexture\RenderToTexture_vc8.vcproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window_vc8", "14.Win32Window\Win32Window_vc8.vcproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile_vc8", "15.LoadIrrFile\LoadIrrFile_vc8.vcproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc8", "20.ManagedLights\ManagedLights_vc8.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc8", "21.Quake3Explorer\Quake3Explorer_vc8.vcproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc8", "22.MaterialViewer\MaterialViewer_vc8.vcproj", "{2856AB41-9BC5-4716-9B35-762A65F6F5D1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc8", "23.SMeshHandling\SMeshHandling_vc8.vcproj", "{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc8", "24.CursorControl\CursorControl_vc8.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc8", "Demo\Demo_vc8.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Debug|Win32.Build.0 = Debug|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.ActiveCfg = Release|Win32 + {2856AB41-9BC5-4716-9B35-762A65F6F5D1}.Release|Win32.Build.0 = Release|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Debug|Win32.Build.0 = Debug|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.ActiveCfg = Release|Win32 + {08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/examples/BuildAllExamples_v9.sln b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_v9.sln new file mode 100644 index 0000000..61ebb1f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_v9.sln @@ -0,0 +1,284 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc9", "01.HelloWorld\HelloWorld_vc9.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map_vc9", "02.Quake3Map\Quake3Map_vc9.vcproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode_vc9", "03.CustomSceneNode\CustomSceneNode_vc9.vcproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement_vc9", "04.Movement\Movement_vc9.vcproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc8", "05.UserInterface\UserInterface_vc9.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics_vc9", "06.2DGraphics\2DGraphics_vc9.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision_vc9", "07.Collision\Collision_vc9.vcproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX_vc9", "08.SpecialFX\SpecialFX_vc9.vcproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer_vc9", "09.Meshviewer\Meshviewer_vc9.vcproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders_vc9", "10.Shaders\Shaders_vc9.vcproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting_vc9", "11.PerPixelLighting\PerPixelLighting_vc9.vcproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering_vc9", "12.TerrainRendering\TerrainRendering_vc9.vcproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture_vc9", "13.RenderToTexture\RenderToTexture_vc9.vcproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window_vc9", "14.Win32Window\Win32Window_vc9.vcproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile_vc9", "15.LoadIrrFile\LoadIrrFile_vc9.vcproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht9.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc9", "Demo\Demo_vc9.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc9", "16.Quake3MapShader\Quake3MapShader_vc9.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile_v9", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen_vc9", "18.SplitScreen\SplitScreen_vc9.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc9", "19.MouseAndJoystick\MouseAndJoystick_vc9.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc9", "20.ManagedLights\ManagedLights_vc9.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc9", "21.Quake3Explorer\Quake3Explorer_vc9.vcproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc9", "22.MaterialViewer\MaterialViewer_vc9.vcproj", "{F4C8112D-57A8-4D01-BB62-BAC6A09A6902}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc9", "23.SMeshHandling\SMeshHandling_vc9.vcproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "24.CursorControl\CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "..\tools\GUIEditor\GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "..\tools\IrrFontTool\newFontTool\irrFontTool_v9.vcproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mesh Converter", "..\tools\MeshConverter\MeshConverter_v9.vcproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling_vc9", "25.XmlHandling\XmlHandling_vc9.vcproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery_vc9", "26.OcclusionQuery\OcclusionQuery_vc9.vcproj", "{9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32 + {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Debug|Win32.Build.0 = Debug|Win32 + {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Release|Win32.ActiveCfg = Release|Win32 + {F4C8112D-57A8-4D01-BB62-BAC6A09A6902}.Release|Win32.Build.0 = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32 + {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Debug|Win32.ActiveCfg = Debug|Win32 + {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Debug|Win32.Build.0 = Debug|Win32 + {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Release|Win32.ActiveCfg = Release|Win32 + {9A859369-0A56-4DAB-9E0C-9F93C91CF0F2}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc10.sln b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc10.sln new file mode 100644 index 0000000..11190a6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc10.sln @@ -0,0 +1,409 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld_vc10.vcxproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map_vc10.vcxproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode_vc10.vcxproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement_vc10.vcxproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface_vc10.vcxproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics_vc10.vcxproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision_vc10.vcxproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX", "08.SpecialFX\SpecialFX_vc10.vcxproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer", "09.Meshviewer\Meshviewer_vc10.vcxproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders_vc10.vcxproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting_vc10.vcxproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering_vc10.vcxproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture_vc10.vcxproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window_vc10.vcxproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile_vc10.vcxproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader_vc10.vcxproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_vc10.vcxproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen_vc10.vcxproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick_vc10.vcxproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights_vc10.vcxproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc10.vcxproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer_vc10.vcxproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling_vc10.vcxproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "24.CursorControl\CursorControl_vc10.vcxproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo_vc10.vcxproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIEditor", "..\tools\GUIEditor\GUI Editor_vc10.vcxproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTool", "..\tools\IrrFontTool\newFontTool\irrFontTool_vc10.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshConverter", "..\tools\MeshConverter\MeshConverter_vc10.vcxproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery", "26.OcclusionQuery\OcclusionQuery_vc10.vcxproj", "{5CE0E2E7-879D-4152-B61D-24E7D0707B45}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling", "25.XmlHandling\XmlHandling_vc10.vcxproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.2 = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.4 = SDL-Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.ActiveCfg = Debug|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.Build.0 = Debug|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.ActiveCfg = Release|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.Build.0 = Release|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.ActiveCfg = Debug|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.Build.0 = Debug|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.ActiveCfg = Release|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.Build.0 = Release|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.ActiveCfg = Debug|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.Build.0 = Debug|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.ActiveCfg = Release|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.Build.0 = Release|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.ActiveCfg = Debug|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.Build.0 = Debug|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.ActiveCfg = Release|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.Build.0 = Release|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.ActiveCfg = Debug|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.Build.0 = Debug|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.ActiveCfg = Release|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.Build.0 = Release|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.ActiveCfg = Debug|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.Build.0 = Debug|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.ActiveCfg = Release|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.Build.0 = Release|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.ActiveCfg = Debug|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.Build.0 = Debug|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.ActiveCfg = Release|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.Build.0 = Release|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.ActiveCfg = Debug|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.Build.0 = Debug|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.ActiveCfg = Release|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.Build.0 = Release|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.ActiveCfg = Debug|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.Build.0 = Debug|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.ActiveCfg = Release|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.Build.0 = Release|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.ActiveCfg = Debug|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.Build.0 = Debug|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.ActiveCfg = Release|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.Build.0 = Release|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.ActiveCfg = Debug|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.Build.0 = Debug|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.ActiveCfg = Release|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.Build.0 = Release|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.ActiveCfg = Debug|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.Build.0 = Debug|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.ActiveCfg = Release|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.Build.0 = Release|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.ActiveCfg = Debug|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.Build.0 = Debug|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.ActiveCfg = Release|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.Build.0 = Release|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.ActiveCfg = Debug|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.Build.0 = Debug|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.ActiveCfg = Release|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.Build.0 = Release|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.ActiveCfg = Debug|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.Build.0 = Debug|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.ActiveCfg = Release|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.Build.0 = Release|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.ActiveCfg = Debug|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.Build.0 = Debug|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.ActiveCfg = Release|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.Build.0 = Release|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.ActiveCfg = Debug|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.Build.0 = Debug|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.ActiveCfg = Release|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.Build.0 = Release|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.ActiveCfg = Debug|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.Build.0 = Debug|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.ActiveCfg = Release|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.Build.0 = Release|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.ActiveCfg = Debug|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.Build.0 = Debug|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.ActiveCfg = Release|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.Build.0 = Release|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.ActiveCfg = Debug|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.Build.0 = Debug|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.ActiveCfg = Release|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.Build.0 = Release|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.ActiveCfg = Debug|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.Build.0 = Debug|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.ActiveCfg = Release|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.Build.0 = Release|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.ActiveCfg = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.Build.0 = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.ActiveCfg = Debug|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.Build.0 = Debug|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.ActiveCfg = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.Build.0 = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.ActiveCfg = Release|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.Build.0 = Release|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.ActiveCfg = Debug|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.Build.0 = Debug|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.ActiveCfg = Release|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.Build.0 = Release|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.ActiveCfg = Debug|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.Build.0 = Debug|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.ActiveCfg = Release|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.Build.0 = Release|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.ActiveCfg = Debug|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.Build.0 = Debug|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.ActiveCfg = Release|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.Build.0 = Release|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.ActiveCfg = Debug|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.Build.0 = Debug|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.ActiveCfg = Release|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.Build.0 = Release|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.ActiveCfg = Debug|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.Build.0 = Debug|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.ActiveCfg = Release|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.Build.0 = Release|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.ActiveCfg = Debug|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.Build.0 = Debug|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.ActiveCfg = Release|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.Build.0 = Release|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.ActiveCfg = Debug|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.Build.0 = Debug|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.ActiveCfg = Debug|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.Build.0 = Debug|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.ActiveCfg = Release|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.Build.0 = Release|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.ActiveCfg = Release|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.Build.0 = Release|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.ActiveCfg = Debug|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.Build.0 = Debug|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.ActiveCfg = Release|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc11.sln b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc11.sln new file mode 100644 index 0000000..50ac646 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/BuildAllExamples_vc11.sln @@ -0,0 +1,409 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht11.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld_vc11.vcxproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map_vc11.vcxproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode_vc11.vcxproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement_vc11.vcxproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface_vc11.vcxproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics_vc11.vcxproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision_vc11.vcxproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX", "08.SpecialFX\SpecialFX_vc11.vcxproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer", "09.Meshviewer\Meshviewer_vc11.vcxproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders_vc11.vcxproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting_vc11.vcxproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering_vc11.vcxproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture_vc11.vcxproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window_vc11.vcxproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile_vc11.vcxproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader_vc11.vcxproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_vc11.vcxproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen_vc11.vcxproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick_vc11.vcxproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights_vc11.vcxproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc11.vcxproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer_vc11.vcxproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling_vc11.vcxproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "24.CursorControl\CursorControl_vc11.vcxproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo_vc11.vcxproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIEditor", "..\tools\GUIEditor\GUI Editor_vc11.vcxproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTool", "..\tools\IrrFontTool\newFontTool\irrFontTool_vc11.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshConverter", "..\tools\MeshConverter\MeshConverter_vc11.vcxproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26.OcclusionQuery", "26.OcclusionQuery\OcclusionQuery_vc11.vcxproj", "{5CE0E2E7-879D-4152-B61D-24E7D0707B45}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "25.XmlHandling", "25.XmlHandling\XmlHandling_vc11.vcxproj", "{8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.2 = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.4 = SDL-Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.ActiveCfg = Debug|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|x64.Build.0 = Debug|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.ActiveCfg = Release|x64 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|x64.Build.0 = Release|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.ActiveCfg = Debug|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|x64.Build.0 = Debug|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.ActiveCfg = Release|x64 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|x64.Build.0 = Release|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.ActiveCfg = Debug|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|x64.Build.0 = Debug|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.ActiveCfg = Release|x64 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|x64.Build.0 = Release|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.ActiveCfg = Debug|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|x64.Build.0 = Debug|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.ActiveCfg = Release|x64 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|x64.Build.0 = Release|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.ActiveCfg = Debug|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|x64.Build.0 = Debug|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.ActiveCfg = Release|x64 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|x64.Build.0 = Release|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.ActiveCfg = Debug|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|x64.Build.0 = Debug|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.ActiveCfg = Release|x64 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|x64.Build.0 = Release|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.ActiveCfg = Debug|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|x64.Build.0 = Debug|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.ActiveCfg = Release|x64 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|x64.Build.0 = Release|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.ActiveCfg = Debug|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|x64.Build.0 = Debug|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.ActiveCfg = Release|x64 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|x64.Build.0 = Release|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.ActiveCfg = Debug|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|x64.Build.0 = Debug|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.ActiveCfg = Release|x64 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|x64.Build.0 = Release|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.ActiveCfg = Debug|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|x64.Build.0 = Debug|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.ActiveCfg = Release|x64 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|x64.Build.0 = Release|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.ActiveCfg = Debug|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|x64.Build.0 = Debug|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.ActiveCfg = Release|x64 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|x64.Build.0 = Release|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.ActiveCfg = Debug|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|x64.Build.0 = Debug|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.ActiveCfg = Release|x64 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|x64.Build.0 = Release|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.ActiveCfg = Debug|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|x64.Build.0 = Debug|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.ActiveCfg = Release|x64 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|x64.Build.0 = Release|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.ActiveCfg = Debug|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|x64.Build.0 = Debug|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.ActiveCfg = Release|x64 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|x64.Build.0 = Release|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.ActiveCfg = Debug|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|x64.Build.0 = Debug|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.ActiveCfg = Release|x64 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|x64.Build.0 = Release|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.ActiveCfg = Debug|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|x64.Build.0 = Debug|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.ActiveCfg = Release|x64 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|x64.Build.0 = Release|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.ActiveCfg = Debug|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|x64.Build.0 = Debug|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.ActiveCfg = Release|x64 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|x64.Build.0 = Release|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.ActiveCfg = Debug|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|x64.Build.0 = Debug|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.ActiveCfg = Release|x64 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|x64.Build.0 = Release|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.ActiveCfg = Debug|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|x64.Build.0 = Debug|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.ActiveCfg = Release|x64 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|x64.Build.0 = Release|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.ActiveCfg = Debug|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|x64.Build.0 = Debug|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.ActiveCfg = Release|x64 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|x64.Build.0 = Release|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.ActiveCfg = Debug|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|x64.Build.0 = Debug|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.ActiveCfg = Release|x64 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|x64.Build.0 = Release|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.ActiveCfg = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.Build.0 = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.ActiveCfg = Debug|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|x64.Build.0 = Debug|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.ActiveCfg = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.Build.0 = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.ActiveCfg = Release|x64 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|x64.Build.0 = Release|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.ActiveCfg = Debug|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|x64.Build.0 = Debug|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.ActiveCfg = Release|x64 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|x64.Build.0 = Release|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.ActiveCfg = Debug|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|x64.Build.0 = Debug|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.ActiveCfg = Release|x64 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|x64.Build.0 = Release|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.ActiveCfg = Debug|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|x64.Build.0 = Debug|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.ActiveCfg = Release|x64 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|x64.Build.0 = Release|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.ActiveCfg = Debug|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|x64.Build.0 = Debug|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.ActiveCfg = Release|x64 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|x64.Build.0 = Release|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.ActiveCfg = Debug|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|x64.Build.0 = Debug|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.ActiveCfg = Release|x64 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|x64.Build.0 = Release|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.ActiveCfg = Debug|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|x64.Build.0 = Debug|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.ActiveCfg = Release|x64 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|x64.Build.0 = Release|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.ActiveCfg = Debug|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|Win32.Build.0 = Debug|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.ActiveCfg = Debug|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Debug|x64.Build.0 = Debug|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.ActiveCfg = Release|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|Win32.Build.0 = Release|Win32 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.ActiveCfg = Release|x64 + {5CE0E2E7-879D-4152-B61D-24E7D0707B45}.Release|x64.Build.0 = Release|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|Win32.Build.0 = Debug|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.ActiveCfg = Debug|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Debug|x64.Build.0 = Debug|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.ActiveCfg = Release|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|Win32.Build.0 = Release|Win32 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.ActiveCfg = Release|x64 + {8FDA260E-EF27-4F8C-8720-7AF707DD0D9E}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/examples/Demo/CDemo.cpp b/src/others/irrlicht-1.8.1/examples/Demo/CDemo.cpp new file mode 100644 index 0000000..1ce72a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/CDemo.cpp @@ -0,0 +1,815 @@ +// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt. +// This file is not documented. + +#include "CDemo.h" + +CDemo::CDemo(bool f, bool m, bool s, bool a, bool v, bool fsaa, video::E_DRIVER_TYPE d) +: fullscreen(f), music(m), shadows(s), additive(a), vsync(v), aa(fsaa), + driverType(d), device(0), +#ifdef USE_IRRKLANG + irrKlang(0), ballSound(0), impactSound(0), +#endif +#ifdef USE_SDL_MIXER + stream(0), ballSound(0), impactSound(0), +#endif + currentScene(-2), backColor(0), statusText(0), inOutFader(0), + quakeLevelMesh(0), quakeLevelNode(0), skyboxNode(0), model1(0), model2(0), + campFire(0), metaSelector(0), mapSelector(0), sceneStartTime(0), + timeForThisScene(0) +{ +} + + +CDemo::~CDemo() +{ + if (mapSelector) + mapSelector->drop(); + + if (metaSelector) + metaSelector->drop(); + +#ifdef USE_IRRKLANG + if (irrKlang) + irrKlang->drop(); +#endif +} + + +void CDemo::run() +{ + core::dimension2d resolution ( 800, 600 ); + + if ( driverType == video::EDT_BURNINGSVIDEO || driverType == video::EDT_SOFTWARE ) + { + resolution.Width = 640; + resolution.Height = 480; + } + + irr::SIrrlichtCreationParameters params; + params.DriverType=driverType; + params.WindowSize=resolution; + params.Bits=32; + params.Fullscreen=fullscreen; + params.Stencilbuffer=shadows; + params.Vsync=vsync; + params.AntiAlias=aa; + params.EventReceiver=this; + + device = createDeviceEx(params); + if (!device) + return; + + if (device->getFileSystem()->existFile("irrlicht.dat")) + device->getFileSystem()->addFileArchive("irrlicht.dat"); + else + device->getFileSystem()->addFileArchive("../../media/irrlicht.dat"); + if (device->getFileSystem()->existFile("map-20kdm2.pk3")) + device->getFileSystem()->addFileArchive("map-20kdm2.pk3"); + else + device->getFileSystem()->addFileArchive("../../media/map-20kdm2.pk3"); + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment* guienv = device->getGUIEnvironment(); + + device->setWindowCaption(L"Irrlicht Engine Demo"); + + // set ambient light + smgr->setAmbientLight ( video::SColorf ( 0x00c0c0c0 ) ); + + wchar_t tmp[255]; + + // draw everything + + s32 now = 0; + s32 lastfps = 0; + sceneStartTime = device->getTimer()->getTime(); + while(device->run() && driver) + { + if (device->isWindowActive()) + { + #ifdef USE_IRRKLANG + // update 3D position for sound engine + scene::ICameraSceneNode* cam = smgr->getActiveCamera(); + if (cam && irrKlang) + irrKlang->setListenerPosition(cam->getAbsolutePosition(), cam->getTarget()); + #endif + + // load next scene if necessary + now = device->getTimer()->getTime(); + if (now - sceneStartTime > timeForThisScene && timeForThisScene!=-1) + switchToNextScene(); + + createParticleImpacts(); + + driver->beginScene(timeForThisScene != -1, true, backColor); + + smgr->drawAll(); + guienv->drawAll(); + driver->endScene(); + + // write statistics + const s32 nowfps = driver->getFPS(); + + swprintf(tmp, 255, L"%ls fps:%3d triangles:%0.3f mio/s", + driver->getName(), driver->getFPS(), + driver->getPrimitiveCountDrawn(1) * (1.f / 1000000.f)); + + statusText->setText(tmp); + if ( nowfps != lastfps ) + { + device->setWindowCaption(tmp); + lastfps = nowfps; + } + } + } + + device->drop(); +} + + +bool CDemo::OnEvent(const SEvent& event) +{ + if (!device) + return false; + + if (event.EventType == EET_KEY_INPUT_EVENT && + event.KeyInput.Key == KEY_ESCAPE && + event.KeyInput.PressedDown == false) + { + // user wants to quit. + if (currentScene < 3) + timeForThisScene = 0; + else + device->closeDevice(); + } + else + if (((event.EventType == EET_KEY_INPUT_EVENT && + event.KeyInput.Key == KEY_SPACE && + event.KeyInput.PressedDown == false) || + (event.EventType == EET_MOUSE_INPUT_EVENT && + event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)) && + currentScene == 3) + { + // shoot + shoot(); + } + else + if (event.EventType == EET_KEY_INPUT_EVENT && + event.KeyInput.Key == KEY_F9 && + event.KeyInput.PressedDown == false) + { + video::IImage* image = device->getVideoDriver()->createScreenShot(); + if (image) + { + device->getVideoDriver()->writeImageToFile(image, "screenshot.bmp"); + device->getVideoDriver()->writeImageToFile(image, "screenshot.png"); + device->getVideoDriver()->writeImageToFile(image, "screenshot.tga"); + device->getVideoDriver()->writeImageToFile(image, "screenshot.ppm"); + device->getVideoDriver()->writeImageToFile(image, "screenshot.jpg"); + device->getVideoDriver()->writeImageToFile(image, "screenshot.pcx"); + image->drop(); + } + } + else + if (device->getSceneManager()->getActiveCamera()) + { + device->getSceneManager()->getActiveCamera()->OnEvent(event); + return true; + } + + return false; +} + + +void CDemo::switchToNextScene() +{ + currentScene++; + if (currentScene > 3) + currentScene = 1; + + scene::ISceneManager* sm = device->getSceneManager(); + scene::ISceneNodeAnimator* sa = 0; + scene::ICameraSceneNode* camera = 0; + + camera = sm->getActiveCamera(); + if (camera) + { + sm->setActiveCamera(0); + camera->remove(); + camera = 0; + } + + switch(currentScene) + { + case -1: // loading screen + timeForThisScene = 0; + createLoadingScreen(); + break; + + case 0: // load scene + timeForThisScene = 0; + loadSceneData(); + break; + + case 1: // panorama camera + { + currentScene += 1; + //camera = sm->addCameraSceneNode(0, core::vector3df(0,0,0), core::vector3df(-586,708,52)); + //camera->setTarget(core::vector3df(0,400,0)); + + core::array points; + + points.push_back(core::vector3df(-931.473755f, 138.300003f, 987.279114f)); // -49873 + points.push_back(core::vector3df(-847.902222f, 136.757553f, 915.792725f)); // -50559 + points.push_back(core::vector3df(-748.680420f, 152.254501f, 826.418945f)); // -51964 + points.push_back(core::vector3df(-708.428406f, 213.569580f, 784.466675f)); // -53251 + points.push_back(core::vector3df(-686.217651f, 288.141174f, 762.965576f)); // -54015 + points.push_back(core::vector3df(-679.685059f, 365.095612f, 756.551453f)); // -54733 + points.push_back(core::vector3df(-671.317871f, 447.360107f, 749.394592f)); // -55588 + points.push_back(core::vector3df(-669.468445f, 583.335632f, 747.711853f)); // -56178 + points.push_back(core::vector3df(-667.611267f, 727.313232f, 746.018250f)); // -56757 + points.push_back(core::vector3df(-665.853210f, 862.791931f, 744.436096f)); // -57859 + points.push_back(core::vector3df(-642.649597f, 1026.047607f, 724.259827f)); // -59705 + points.push_back(core::vector3df(-517.793884f, 838.396790f, 490.326050f)); // -60983 + points.push_back(core::vector3df(-474.387299f, 715.691467f, 344.639984f)); // -61629 + points.push_back(core::vector3df(-444.600250f, 601.155701f, 180.938095f)); // -62319 + points.push_back(core::vector3df(-414.808899f, 479.691406f, 4.866660f)); // -63048 + points.push_back(core::vector3df(-410.418945f, 429.642242f, -134.332687f)); // -63757 + points.push_back(core::vector3df(-399.837585f, 411.498383f, -349.350983f)); // -64418 + points.push_back(core::vector3df(-390.756653f, 403.970093f, -524.454407f)); // -65005 + points.push_back(core::vector3df(-334.864227f, 350.065491f, -732.397400f)); // -65701 + points.push_back(core::vector3df(-195.253387f, 349.577209f, -812.475891f)); // -66335 + points.push_back(core::vector3df(16.255573f, 363.743134f, -833.800415f)); // -67170 + points.push_back(core::vector3df(234.940964f, 352.957825f, -820.150696f)); // -67939 + points.push_back(core::vector3df(436.797668f, 349.236450f, -816.914185f)); // -68596 + points.push_back(core::vector3df(575.236206f, 356.244812f, -719.788513f)); // -69166 + points.push_back(core::vector3df(594.131042f, 387.173828f, -609.675598f)); // -69744 + points.push_back(core::vector3df(617.615234f, 412.002899f, -326.174072f)); // -70640 + points.push_back(core::vector3df(606.456848f, 403.221954f, -104.179291f)); // -71390 + points.push_back(core::vector3df(610.958252f, 407.037750f, 117.209778f)); // -72085 + points.push_back(core::vector3df(597.956909f, 395.167877f, 345.942200f)); // -72817 + points.push_back(core::vector3df(587.383118f, 391.444519f, 566.098633f)); // -73477 + points.push_back(core::vector3df(559.572449f, 371.991333f, 777.689453f)); // -74124 + points.push_back(core::vector3df(423.753204f, 329.990051f, 925.859741f)); // -74941 + points.push_back(core::vector3df(247.520050f, 252.818954f, 935.311829f)); // -75651 + points.push_back(core::vector3df(114.756012f, 199.799759f, 805.014160f)); + points.push_back(core::vector3df(96.783348f, 181.639481f, 648.188110f)); + points.push_back(core::vector3df(97.865623f, 138.905975f, 484.812561f)); + points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); + points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); + points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); + + timeForThisScene = (points.size()-3)* 1000; + + camera = sm->addCameraSceneNode(0, points[0], core::vector3df(0 ,400,0)); + //camera->setTarget(core::vector3df(0,400,0)); + + sa = sm->createFollowSplineAnimator(device->getTimer()->getTime(), + points); + camera->addAnimator(sa); + sa->drop(); + + model1->setVisible(false); + model2->setVisible(false); + campFire->setVisible(false); + inOutFader->fadeIn(7000); + } + break; + + case 2: // down fly anim camera + camera = sm->addCameraSceneNode(0, core::vector3df(100,40,-80), core::vector3df(844,670,-885)); + sa = sm->createFlyStraightAnimator(core::vector3df(94, 1002, 127), + core::vector3df(108, 15, -60), 10000, true); + camera->addAnimator(sa); + timeForThisScene = 9900; + model1->setVisible(true); + model2->setVisible(false); + campFire->setVisible(false); + sa->drop(); + break; + + case 3: // interactive, go around + { + model1->setVisible(true); + model2->setVisible(true); + campFire->setVisible(true); + timeForThisScene = -1; + + SKeyMap keyMap[9]; + keyMap[0].Action = EKA_MOVE_FORWARD; + keyMap[0].KeyCode = KEY_UP; + keyMap[1].Action = EKA_MOVE_FORWARD; + keyMap[1].KeyCode = KEY_KEY_W; + + keyMap[2].Action = EKA_MOVE_BACKWARD; + keyMap[2].KeyCode = KEY_DOWN; + keyMap[3].Action = EKA_MOVE_BACKWARD; + keyMap[3].KeyCode = KEY_KEY_S; + + keyMap[4].Action = EKA_STRAFE_LEFT; + keyMap[4].KeyCode = KEY_LEFT; + keyMap[5].Action = EKA_STRAFE_LEFT; + keyMap[5].KeyCode = KEY_KEY_A; + + keyMap[6].Action = EKA_STRAFE_RIGHT; + keyMap[6].KeyCode = KEY_RIGHT; + keyMap[7].Action = EKA_STRAFE_RIGHT; + keyMap[7].KeyCode = KEY_KEY_D; + + keyMap[8].Action = EKA_JUMP_UP; + keyMap[8].KeyCode = KEY_KEY_J; + + camera = sm->addCameraSceneNodeFPS(0, 100.0f, .4f, -1, keyMap, 9, false, 3.f); + camera->setPosition(core::vector3df(108,140,-140)); + camera->setFarValue(5000.0f); + + scene::ISceneNodeAnimatorCollisionResponse* collider = + sm->createCollisionResponseAnimator( + metaSelector, camera, core::vector3df(25,50,25), + core::vector3df(0, quakeLevelMesh ? -10.f : 0.0f,0), + core::vector3df(0,45,0), 0.005f); + + camera->addAnimator(collider); + collider->drop(); + } + break; + } + + sceneStartTime = device->getTimer()->getTime(); +} + + +void CDemo::loadSceneData() +{ + // load quake level + + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* sm = device->getSceneManager(); + + // Quake3 Shader controls Z-Writing + sm->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); + + quakeLevelMesh = (scene::IQ3LevelMesh*) sm->getMesh("maps/20kdm2.bsp"); + + if (quakeLevelMesh) + { + u32 i; + + //move all quake level meshes (non-realtime) + core::matrix4 m; + m.setTranslation(core::vector3df(-1300,-70,-1249)); + + for ( i = 0; i != scene::quake3::E_Q3_MESH_SIZE; ++i ) + sm->getMeshManipulator()->transform(quakeLevelMesh->getMesh(i), m); + + quakeLevelNode = sm->addOctreeSceneNode( + quakeLevelMesh->getMesh( scene::quake3::E_Q3_MESH_GEOMETRY)); + if (quakeLevelNode) + { + //quakeLevelNode->setPosition(core::vector3df(-1300,-70,-1249)); + quakeLevelNode->setVisible(true); + + // create map triangle selector + mapSelector = sm->createOctreeTriangleSelector(quakeLevelMesh->getMesh(0), + quakeLevelNode, 128); + + // if not using shader and no gamma it's better to use more lighting, because + // quake3 level are usually dark + quakeLevelNode->setMaterialType ( video::EMT_LIGHTMAP_M4 ); + + // set additive blending if wanted + if (additive) + quakeLevelNode->setMaterialType(video::EMT_LIGHTMAP_ADD); + } + + // the additional mesh can be quite huge and is unoptimized + scene::IMesh * additional_mesh = quakeLevelMesh->getMesh ( scene::quake3::E_Q3_MESH_ITEMS ); + + for ( i = 0; i!= additional_mesh->getMeshBufferCount (); ++i ) + { + scene::IMeshBuffer *meshBuffer = additional_mesh->getMeshBuffer ( i ); + const video::SMaterial &material = meshBuffer->getMaterial(); + + //! The ShaderIndex is stored in the material parameter + s32 shaderIndex = (s32) material.MaterialTypeParam2; + + // the meshbuffer can be rendered without additional support, or it has no shader + const scene::quake3::IShader *shader = quakeLevelMesh->getShader ( shaderIndex ); + if ( 0 == shader ) + { + continue; + } + // Now add the MeshBuffer(s) with the current Shader to the Manager + sm->addQuake3SceneNode ( meshBuffer, shader ); + } + } + + // load sydney model and create 2 instances + + scene::IAnimatedMesh* mesh = 0; + mesh = sm->getMesh("../../media/sydney.md2"); + if (mesh) + { + model1 = sm->addAnimatedMeshSceneNode(mesh); + if (model1) + { + model1->setMaterialTexture(0, driver->getTexture("../../media/spheremap.jpg")); + model1->setPosition(core::vector3df(100,40,-80)); + model1->setScale(core::vector3df(2,2,2)); + model1->setMD2Animation(scene::EMAT_STAND); + model1->setMaterialFlag(video::EMF_LIGHTING, false); + model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); + model1->setMaterialType(video::EMT_SPHERE_MAP); + model1->addShadowVolumeSceneNode(); + } + + model2 = sm->addAnimatedMeshSceneNode(mesh); + if (model2) + { + model2->setPosition(core::vector3df(180,15,-60)); + model2->setScale(core::vector3df(2,2,2)); + model2->setMD2Animation(scene::EMAT_RUN); + model2->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/sydney.bmp")); + model2->setMaterialFlag(video::EMF_LIGHTING, true); + model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); + model2->addShadowVolumeSceneNode(); + } + } + + scene::ISceneNodeAnimator* anim = 0; + + // create sky box + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + skyboxNode = sm->addSkyBoxSceneNode( + driver->getTexture("../../media/irrlicht2_up.jpg"), + driver->getTexture("../../media/irrlicht2_dn.jpg"), + driver->getTexture("../../media/irrlicht2_lf.jpg"), + driver->getTexture("../../media/irrlicht2_rt.jpg"), + driver->getTexture("../../media/irrlicht2_ft.jpg"), + driver->getTexture("../../media/irrlicht2_bk.jpg")); + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); + + // create walk-between-portals animation + + core::vector3df waypoint[2]; + waypoint[0].set(-150,40,100); + waypoint[1].set(350,40,100); + + if (model2) + { + anim = device->getSceneManager()->createFlyStraightAnimator( + waypoint[0], waypoint[1], 2000, true); + model2->addAnimator(anim); + anim->drop(); + } + + // create animation for portals; + + core::array textures; + for (s32 g=1; g<8; ++g) + { + core::stringc tmp("../../media/portal"); + tmp += g; + tmp += ".bmp"; + video::ITexture* t = driver->getTexture( tmp ); + textures.push_back(t); + } + + anim = sm->createTextureAnimator(textures, 100); + + // create portals + + scene::IBillboardSceneNode* bill = 0; + + for (int r=0; r<2; ++r) + { + bill = sm->addBillboardSceneNode(0, core::dimension2d(100,100), + waypoint[r]+ core::vector3df(0,20,0)); + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialTexture(0, driver->getTexture("../../media/portal1.bmp")); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + bill->addAnimator(anim); + } + + anim->drop(); + + // create cirlce flying dynamic light with transparent billboard attached + + scene::ILightSceneNode* light = 0; + + light = sm->addLightSceneNode(0, + core::vector3df(0,0,0), video::SColorf(1.0f, 1.0f, 1.f, 1.0f), 500.f); + + anim = sm->createFlyCircleAnimator( + core::vector3df(100,150,80), 80.0f, 0.0005f); + + light->addAnimator(anim); + anim->drop(); + + bill = device->getSceneManager()->addBillboardSceneNode( + light, core::dimension2d(40,40)); + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp")); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + + // create meta triangle selector with all triangles selectors in it. + metaSelector = sm->createMetaTriangleSelector(); + metaSelector->addTriangleSelector(mapSelector); + + // create camp fire + + campFire = sm->addParticleSystemSceneNode(false); + campFire->setPosition(core::vector3df(100,120,600)); + campFire->setScale(core::vector3df(2,2,2)); + + scene::IParticleEmitter* em = campFire->createBoxEmitter( + core::aabbox3d(-7,0,-7,7,1,7), + core::vector3df(0.0f,0.06f,0.0f), + 80,100, video::SColor(1,255,255,255),video::SColor(1,255,255,255), 800,2000); + + em->setMinStartSize(core::dimension2d(20.0f, 10.0f)); + em->setMaxStartSize(core::dimension2d(20.0f, 10.0f)); + campFire->setEmitter(em); + em->drop(); + + scene::IParticleAffector* paf = campFire->createFadeOutParticleAffector(); + campFire->addAffector(paf); + paf->drop(); + + campFire->setMaterialFlag(video::EMF_LIGHTING, false); + campFire->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + campFire->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp")); + campFire->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + + // load music + + #ifdef USE_IRRKLANG + if (music) + startIrrKlang(); + #endif + #ifdef USE_SDL_MIXER + if (music) + startSound(); + #endif +} + + +void CDemo::createLoadingScreen() +{ + core::dimension2d size = device->getVideoDriver()->getScreenSize(); + + device->getCursorControl()->setVisible(false); + + // setup loading screen + + backColor.set(255,90,90,156); + + // create in fader + + inOutFader = device->getGUIEnvironment()->addInOutFader(); + inOutFader->setColor(backColor, video::SColor ( 0, 230, 230, 230 )); + + // irrlicht logo + device->getGUIEnvironment()->addImage(device->getVideoDriver()->getTexture("../../media/irrlichtlogo2.png"), + core::position2d(5,5)); + + // loading text + + const int lwidth = size.Width - 20; + const int lheight = 16; + + core::rect pos(10, size.Height-lheight-10, 10+lwidth, size.Height-10); + + device->getGUIEnvironment()->addImage(pos); + statusText = device->getGUIEnvironment()->addStaticText(L"Loading...", pos, true); + statusText->setOverrideColor(video::SColor(255,205,200,200)); + + // load bigger font + + device->getGUIEnvironment()->getSkin()->setFont( + device->getGUIEnvironment()->getFont("../../media/fonthaettenschweiler.bmp")); + + // set new font color + + device->getGUIEnvironment()->getSkin()->setColor(gui::EGDC_BUTTON_TEXT, + video::SColor(255,100,100,100)); +} + + +void CDemo::shoot() +{ + scene::ISceneManager* sm = device->getSceneManager(); + scene::ICameraSceneNode* camera = sm->getActiveCamera(); + + if (!camera || !mapSelector) + return; + + SParticleImpact imp; + imp.when = 0; + + // get line of camera + + core::vector3df start = camera->getPosition(); + core::vector3df end = (camera->getTarget() - start); + end.normalize(); + start += end*8.0f; + end = start + (end * camera->getFarValue()); + + core::triangle3df triangle; + + core::line3d line(start, end); + + // get intersection point with map + scene::ISceneNode* hitNode; + if (sm->getSceneCollisionManager()->getCollisionPoint( + line, mapSelector, end, triangle, hitNode)) + { + // collides with wall + core::vector3df out = triangle.getNormal(); + out.setLength(0.03f); + + imp.when = 1; + imp.outVector = out; + imp.pos = end; + } + else + { + // doesnt collide with wall + core::vector3df start = camera->getPosition(); + core::vector3df end = (camera->getTarget() - start); + end.normalize(); + start += end*8.0f; + end = start + (end * camera->getFarValue()); + } + + // create fire ball + scene::ISceneNode* node = 0; + node = sm->addBillboardSceneNode(0, + core::dimension2d(25,25), start); + + node->setMaterialFlag(video::EMF_LIGHTING, false); + node->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/fireball.bmp")); + node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + + f32 length = (f32)(end - start).getLength(); + const f32 speed = 0.6f; + u32 time = (u32)(length / speed); + + scene::ISceneNodeAnimator* anim = 0; + + // set flight line + + anim = sm->createFlyStraightAnimator(start, end, time); + node->addAnimator(anim); + anim->drop(); + + anim = sm->createDeleteAnimator(time); + node->addAnimator(anim); + anim->drop(); + + if (imp.when) + { + // create impact note + imp.when = device->getTimer()->getTime() + (time - 100); + Impacts.push_back(imp); + } + + // play sound + #ifdef USE_IRRKLANG + if (ballSound) + irrKlang->play2D(ballSound); + #endif + #ifdef USE_SDL_MIXER + if (ballSound) + playSound(ballSound); + #endif +} + + +void CDemo::createParticleImpacts() +{ + u32 now = device->getTimer()->getTime(); + scene::ISceneManager* sm = device->getSceneManager(); + + for (s32 i=0; i<(s32)Impacts.size(); ++i) + if (now > Impacts[i].when) + { + // create smoke particle system + scene::IParticleSystemSceneNode* pas = 0; + + pas = sm->addParticleSystemSceneNode(false, 0, -1, Impacts[i].pos); + + pas->setParticleSize(core::dimension2d(10.0f, 10.0f)); + + scene::IParticleEmitter* em = pas->createBoxEmitter( + core::aabbox3d(-5,-5,-5,5,5,5), + Impacts[i].outVector, 20,40, video::SColor(50,255,255,255),video::SColor(50,255,255,255), + 1200,1600, 20); + + pas->setEmitter(em); + em->drop(); + + scene::IParticleAffector* paf = campFire->createFadeOutParticleAffector(); + pas->addAffector(paf); + paf->drop(); + + pas->setMaterialFlag(video::EMF_LIGHTING, false); + pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); + pas->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/smoke.bmp")); + pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + + scene::ISceneNodeAnimator* anim = sm->createDeleteAnimator(2000); + pas->addAnimator(anim); + anim->drop(); + + // play impact sound + #ifdef USE_IRRKLANG + if (irrKlang) + { + irrklang::ISound* sound = + irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true); + + if (sound) + { + // adjust max value a bit to make to sound of an impact louder + sound->setMinDistance(400); + sound->drop(); + } + } + #endif + + #ifdef USE_SDL_MIXER + if (impactSound) + playSound(impactSound); + #endif + + // delete entry + Impacts.erase(i); + i--; + } +} + + +#ifdef USE_IRRKLANG +void CDemo::startIrrKlang() +{ + irrKlang = irrklang::createIrrKlangDevice(); + + if (!irrKlang) + return; + + // play music + + irrklang::ISound* snd = irrKlang->play2D("../../media/IrrlichtTheme.ogg", true, false, true); + if ( !snd ) + snd = irrKlang->play2D("IrrlichtTheme.ogg", true, false, true); + + if (snd) + { + snd->setVolume(0.5f); // 50% volume + snd->drop(); + } + + // preload both sound effects + + ballSound = irrKlang->getSoundSource("../../media/ball.wav"); + impactSound = irrKlang->getSoundSource("../../media/impact.wav"); +} +#endif + + +#ifdef USE_SDL_MIXER +void CDemo::startSound() +{ + stream = NULL; + ballSound = NULL; + impactSound = NULL; + + SDL_Init(SDL_INIT_AUDIO); + + if (Mix_OpenAudio(22050, AUDIO_S16, 2, 128)) + return; + + stream = Mix_LoadMUS("../../media/IrrlichtTheme.ogg"); + if (stream) + Mix_PlayMusic(stream, -1); + + ballSound = Mix_LoadWAV("../../media/ball.wav"); + impactSound = Mix_LoadWAV("../../media/impact.wav"); +} + +void CDemo::playSound(Mix_Chunk *sample) +{ + if (sample) + Mix_PlayChannel(-1, sample, 0); +} + +void CDemo::pollSound(void) +{ + SDL_Event event; + + while (SDL_PollEvent(&event)) + ; +} +#endif diff --git a/src/others/irrlicht-1.8.1/examples/Demo/CDemo.h b/src/others/irrlicht-1.8.1/examples/Demo/CDemo.h new file mode 100644 index 0000000..e2c564d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/CDemo.h @@ -0,0 +1,110 @@ +// This is a Demo of the Irrlicht Engine (c) 2006 by N.Gebhardt. +// This file is not documented. + +#ifndef __C_DEMO_H_INCLUDED__ +#define __C_DEMO_H_INCLUDED__ + +//#define USE_IRRKLANG +//#define USE_SDL_MIXER + +#include + +#ifdef _IRR_WINDOWS_ +#include +#endif + +using namespace irr; + +// audio support + +#ifdef USE_IRRKLANG + #include // problem here? go to http://www.ambiera.com/irrklang and download + // the irrKlang library or undefine USE_IRRKLANG at the beginning + // of this file. + #ifdef _IRR_WINDOWS_ + #pragma comment (lib, "irrKlang.lib") + #endif +#endif +#ifdef USE_SDL_MIXER + # include + # include +#endif + +const int CAMERA_COUNT = 7; + +class CDemo : public IEventReceiver +{ +public: + + CDemo(bool fullscreen, bool music, bool shadows, bool additive, bool vsync, bool aa, video::E_DRIVER_TYPE driver); + + ~CDemo(); + + void run(); + + virtual bool OnEvent(const SEvent& event); + +private: + + void createLoadingScreen(); + void loadSceneData(); + void switchToNextScene(); + void shoot(); + void createParticleImpacts(); + + bool fullscreen; + bool music; + bool shadows; + bool additive; + bool vsync; + bool aa; + video::E_DRIVER_TYPE driverType; + IrrlichtDevice *device; + +#ifdef USE_IRRKLANG + void startIrrKlang(); + irrklang::ISoundEngine* irrKlang; + irrklang::ISoundSource* ballSound; + irrklang::ISoundSource* impactSound; +#endif + +#ifdef USE_SDL_MIXER + void startSound(); + void playSound(Mix_Chunk *); + void pollSound(); + Mix_Music *stream; + Mix_Chunk *ballSound; + Mix_Chunk *impactSound; +#endif + + struct SParticleImpact + { + u32 when; + core::vector3df pos; + core::vector3df outVector; + }; + + int currentScene; + video::SColor backColor; + + gui::IGUIStaticText* statusText; + gui::IGUIInOutFader* inOutFader; + + scene::IQ3LevelMesh* quakeLevelMesh; + scene::ISceneNode* quakeLevelNode; + scene::ISceneNode* skyboxNode; + scene::IAnimatedMeshSceneNode* model1; + scene::IAnimatedMeshSceneNode* model2; + scene::IParticleSystemSceneNode* campFire; + + scene::IMetaTriangleSelector* metaSelector; + scene::ITriangleSelector* mapSelector; + + s32 sceneStartTime; + s32 timeForThisScene; + + core::array Impacts; +}; + +#endif + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.cpp b/src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.cpp new file mode 100644 index 0000000..aa963e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.cpp @@ -0,0 +1,378 @@ +// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt. +// This file is not documented. + +#include "CMainMenu.h" + + + +CMainMenu::CMainMenu() +: startButton(0), MenuDevice(0), selected(2), start(false), fullscreen(true), + music(true), shadows(false), additive(false), transparent(true), vsync(false), aa(false) +{ +} + + +bool CMainMenu::run(bool& outFullscreen, bool& outMusic, bool& outShadows, + bool& outAdditive, bool& outVSync, bool& outAA, + video::E_DRIVER_TYPE& outDriver) +{ + //video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9; + //video::E_DRIVER_TYPE driverType = video::EDT_OPENGL; + video::E_DRIVER_TYPE driverType = video::EDT_BURNINGSVIDEO; + //video::E_DRIVER_TYPE driverType = video::EDT_SOFTWARE; + + MenuDevice = createDevice(driverType, + core::dimension2d(512, 384), 16, false, false, false, this); + + if (MenuDevice->getFileSystem()->existFile("irrlicht.dat")) + MenuDevice->getFileSystem()->addFileArchive("irrlicht.dat"); + else + MenuDevice->getFileSystem()->addFileArchive("../../media/irrlicht.dat"); + + video::IVideoDriver* driver = MenuDevice->getVideoDriver(); + scene::ISceneManager* smgr = MenuDevice->getSceneManager(); + gui::IGUIEnvironment* guienv = MenuDevice->getGUIEnvironment(); + + core::stringw str = "Irrlicht Engine Demo v"; + str += MenuDevice->getVersion(); + MenuDevice->setWindowCaption(str.c_str()); + + // set new Skin + gui::IGUISkin* newskin = guienv->createSkin(gui::EGST_BURNING_SKIN); + guienv->setSkin(newskin); + newskin->drop(); + + // load font + gui::IGUIFont* font = guienv->getFont("../../media/fonthaettenschweiler.bmp"); + if (font) + guienv->getSkin()->setFont(font); + + // add images + + const s32 leftX = 260; + + // add tab control + gui::IGUITabControl* tabctrl = guienv->addTabControl(core::rect(leftX,10,512-10,384-10), + 0, true, true); + gui::IGUITab* optTab = tabctrl->addTab(L"Demo"); + gui::IGUITab* aboutTab = tabctrl->addTab(L"About"); + + // add list box + + gui::IGUIListBox* box = guienv->addListBox(core::rect(10,10,220,120), optTab, 1); + box->addItem(L"OpenGL 1.5"); + box->addItem(L"Direct3D 8.1"); + box->addItem(L"Direct3D 9.0c"); + box->addItem(L"Burning's Video 0.47"); + box->addItem(L"Irrlicht Software Renderer 1.0"); + box->setSelected(selected); + + // add button + + startButton = guienv->addButton(core::rect(30,295,200,324), optTab, 2, L"Start Demo"); + + // add checkbox + + const s32 d = 50; + + guienv->addCheckBox(fullscreen, core::rect(20,85+d,130,110+d), + optTab, 3, L"Fullscreen"); + guienv->addCheckBox(music, core::rect(135,85+d,245,110+d), + optTab, 4, L"Music & Sfx"); + guienv->addCheckBox(shadows, core::rect(20,110+d,135,135+d), + optTab, 5, L"Realtime shadows"); + guienv->addCheckBox(additive, core::rect(20,135+d,230,160+d), + optTab, 6, L"Old HW compatible blending"); + guienv->addCheckBox(vsync, core::rect(20,160+d,230,185+d), + optTab, 7, L"Vertical synchronisation"); + guienv->addCheckBox(aa, core::rect(20,185+d,230,210+d), + optTab, 8, L"Antialiasing"); + + // add about text + + const wchar_t* text2 = L"This is the tech demo of the Irrlicht engine. To start, "\ + L"select a video driver which works best with your hardware and press 'Start Demo'.\n"\ + L"What you currently see is displayed using the Burning Software Renderer (Thomas Alten).\n"\ + L"The Irrlicht Engine was written by me, Nikolaus Gebhardt. The models, "\ + L"maps and textures were placed at my disposal by B.Collins, M.Cook and J.Marton. The music was created by "\ + L"M.Rohde and is played back by irrKlang.\n"\ + L"For more informations, please visit the homepage of the Irrlicht engine:\nhttp://irrlicht.sourceforge.net"; + + guienv->addStaticText(text2, core::rect(10, 10, 230, 320), + true, true, aboutTab); + + // add md2 model + + scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/faerie.md2"); + scene::IAnimatedMeshSceneNode* modelNode = smgr->addAnimatedMeshSceneNode(mesh); + if (modelNode) + { + modelNode->setPosition( core::vector3df(0.f, 0.f, -5.f) ); + modelNode->setMaterialTexture(0, driver->getTexture("../../media/faerie2.bmp")); + modelNode->setMaterialFlag(video::EMF_LIGHTING, true); + modelNode->getMaterial(0).Shininess = 50.f; + modelNode->getMaterial(0).NormalizeNormals = true; + modelNode->setMD2Animation(scene::EMAT_STAND); + } + + // set ambient light (no sun light in the catacombs) + smgr->setAmbientLight( video::SColorf(0.2f, 0.2f, 0.2f) ); + + scene::ILightSceneNode *light; + scene::ISceneNodeAnimator* anim; + scene::ISceneNode* bill; + + enum eLightParticle + { + LIGHT_NONE, + LIGHT_GLOBAL, + LIGHT_RED, + LIGHT_BLUE + }; + core::vector3df lightDir[2] = { + core::vector3df(0.f, 0.1f, 0.4f), + core::vector3df(0.f, 0.1f, -0.4f), + }; + + struct SLightParticle + { + eLightParticle type; + u32 dir; + }; + const SLightParticle lightParticle[] = + { + //LIGHT_GLOBAL,0, + {LIGHT_RED,0}, + {LIGHT_BLUE,0}, + {LIGHT_RED,1}, + {LIGHT_BLUE,1}, + {LIGHT_NONE,0} + }; + + const SLightParticle *l = lightParticle; + while ( l->type != LIGHT_NONE ) + { + switch ( l->type ) + { + case LIGHT_GLOBAL: + // add illumination from the background + light = smgr->addLightSceneNode(0, core::vector3df(10.f,40.f,-5.f), + video::SColorf(0.2f, 0.2f, 0.2f), 90.f); + break; + case LIGHT_RED: + // add light nearly red + light = smgr->addLightSceneNode(0, core::vector3df(0,1,0), + video::SColorf(0.8f, 0.f, 0.f, 0.0f), 30.0f); + // attach red billboard to the light + bill = smgr->addBillboardSceneNode(light, core::dimension2d(10, 10)); + if ( bill ) + { + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp")); + } + // add fly circle animator to the light + anim = smgr->createFlyCircleAnimator(core::vector3df(0.f,0.f,-5.f),20.f, + 0.002f, lightDir [l->dir] ); + light->addAnimator(anim); + anim->drop(); + break; + case LIGHT_BLUE: + // add light nearly blue + light = smgr->addLightSceneNode(0, core::vector3df(0,1,0), + video::SColorf(0.f, 0.0f, 0.8f, 0.0f), 30.0f); + // attach blue billboard to the light + bill = smgr->addBillboardSceneNode(light, core::dimension2d(10, 10)); + if (bill) + { + bill->setMaterialFlag(video::EMF_LIGHTING, false); + bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + bill->setMaterialTexture(0, driver->getTexture("../../media/portal1.bmp")); + } + // add fly circle animator to the light + anim = smgr->createFlyCircleAnimator(core::vector3df(0.f,0.f,-5.f),20.f, + -0.002f, lightDir [l->dir], 0.5f); + light->addAnimator(anim); + anim->drop(); + break; + case LIGHT_NONE: + break; + } + l += 1; + } + + // create a fixed camera + smgr->addCameraSceneNode(0, core::vector3df(45,0,0), core::vector3df(0,0,10)); + + + // irrlicht logo and background + // add irrlicht logo + bool oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + guienv->addImage(driver->getTexture("../../media/irrlichtlogo3.png"), + core::position2d(5,5)); + + video::ITexture* irrlichtBack = driver->getTexture("../../media/demoback.jpg"); + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); + + // query original skin color + getOriginalSkinColor(); + + // set transparency + setTransparency(); + + // draw all + + while(MenuDevice->run()) + { + if (MenuDevice->isWindowActive()) + { + driver->beginScene(false, true, video::SColor(0,0,0,0)); + + if (irrlichtBack) + driver->draw2DImage(irrlichtBack, + core::position2d(0,0)); + + smgr->drawAll(); + guienv->drawAll(); + driver->endScene(); + } + } + + MenuDevice->drop(); + + outFullscreen = fullscreen; + outMusic = music; + outShadows = shadows; + outAdditive = additive; + outVSync = vsync; + outAA = aa; + + switch(selected) + { + case 0: outDriver = video::EDT_OPENGL; break; + case 1: outDriver = video::EDT_DIRECT3D8; break; + case 2: outDriver = video::EDT_DIRECT3D9; break; + case 3: outDriver = video::EDT_BURNINGSVIDEO; break; + case 4: outDriver = video::EDT_SOFTWARE; break; + } + + return start; +} + + +bool CMainMenu::OnEvent(const SEvent& event) +{ + if (event.EventType == EET_KEY_INPUT_EVENT && + event.KeyInput.Key == KEY_F9 && + event.KeyInput.PressedDown == false) + { + video::IImage* image = MenuDevice->getVideoDriver()->createScreenShot(); + if (image) + { + MenuDevice->getVideoDriver()->writeImageToFile(image, "screenshot_main.jpg"); + image->drop(); + } + } + else + if (event.EventType == irr::EET_MOUSE_INPUT_EVENT && + event.MouseInput.Event == EMIE_RMOUSE_LEFT_UP ) + { + core::rect r(event.MouseInput.X, event.MouseInput.Y, 0, 0); + gui::IGUIContextMenu* menu = MenuDevice->getGUIEnvironment()->addContextMenu(r, 0, 45); + menu->addItem(L"transparent menus", 666, transparent == false); + menu->addItem(L"solid menus", 666, transparent == true); + menu->addSeparator(); + menu->addItem(L"Cancel"); + } + else + if (event.EventType == EET_GUI_EVENT) + { + s32 id = event.GUIEvent.Caller->getID(); + switch(id) + { + case 45: // context menu + if (event.GUIEvent.EventType == gui::EGET_MENU_ITEM_SELECTED) + { + s32 s = ((gui::IGUIContextMenu*)event.GUIEvent.Caller)->getSelectedItem(); + if (s == 0 || s == 1) + { + transparent = !transparent; + setTransparency(); + } + } + break; + case 1: + if (event.GUIEvent.EventType == gui::EGET_LISTBOX_CHANGED || + event.GUIEvent.EventType == gui::EGET_LISTBOX_SELECTED_AGAIN) + { + selected = ((gui::IGUIListBox*)event.GUIEvent.Caller)->getSelected(); + //startButton->setEnabled(selected != 4); + startButton->setEnabled(true); + } + break; + case 2: + if (event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED ) + { + MenuDevice->closeDevice(); + start = true; + } + case 3: + if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + fullscreen = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); + break; + case 4: + if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + music = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); + break; + case 5: + if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + shadows = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); + break; + case 6: + if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + additive = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); + break; + case 7: + if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + vsync = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); + break; + case 8: + if (event.GUIEvent.EventType == gui::EGET_CHECKBOX_CHANGED ) + aa = ((gui::IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); + break; + } + } + + return false; +} + + +void CMainMenu::getOriginalSkinColor() +{ + irr::gui::IGUISkin * skin = MenuDevice->getGUIEnvironment()->getSkin(); + for (s32 i=0; igetColor( (gui::EGUI_DEFAULT_COLOR)i ); + } + +} + + +void CMainMenu::setTransparency() +{ + irr::gui::IGUISkin * skin = MenuDevice->getGUIEnvironment()->getSkin(); + + for (u32 i=0; isetColor((gui::EGUI_DEFAULT_COLOR)i, col); + } +} + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.h b/src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.h new file mode 100644 index 0000000..06a0d04 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/CMainMenu.h @@ -0,0 +1,48 @@ +// This is a Demo of the Irrlicht Engine (c) 2005 by N.Gebhardt. +// This file is not documentated. + +#ifndef __C_MAIN_MENU_H_INCLUDED__ +#define __C_MAIN_MENU_H_INCLUDED__ + +#include + +using namespace irr; + +class CMainMenu : public IEventReceiver +{ +public: + + CMainMenu(); + + bool run(bool& outFullscreen, bool& outMusic, bool& outShadows, + bool& outAdditive, bool &outVSync, bool& outAA, + video::E_DRIVER_TYPE& outDriver); + + virtual bool OnEvent(const SEvent& event); + +private: + + void setTransparency(); + + gui::IGUIButton* startButton; + IrrlichtDevice *MenuDevice; + s32 selected; + bool start; + bool fullscreen; + bool music; + bool shadows; + bool additive; + bool transparent; + bool vsync; + bool aa; + + scene::IAnimatedMesh* quakeLevel; + scene::ISceneNode* lightMapNode; + scene::ISceneNode* dynamicNode; + + video::SColor SkinColor [ gui::EGDC_COUNT ]; + void getOriginalSkinColor(); +}; + +#endif + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/Demo.vcproj b/src/others/irrlicht-1.8.1/examples/Demo/Demo.vcproj new file mode 100644 index 0000000..fe55b37 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/Demo.vcproj @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc10.vcxproj b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc10.vcxproj new file mode 100644 index 0000000..73b5a2f --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc10.vcxproj @@ -0,0 +1,279 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6F076455-D955-45D4-9C68-4AD4E45F2D47} + Demo + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/Demo.tlb + + + + + MaxSpeed + Default + false + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\Demo.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Windows + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/Demo.tlb + + + + + MaxSpeed + Default + false + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\Demo.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Windows + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/Demo.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Windows + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/Demo.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Windows + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc11.vcxproj b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc11.vcxproj new file mode 100644 index 0000000..ecb5f33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc11.vcxproj @@ -0,0 +1,283 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6F076455-D955-45D4-9C68-4AD4E45F2D47} + Demo + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/Demo.tlb + + + + + MaxSpeed + Default + false + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\Demo.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Windows + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/Demo.tlb + + + + + MaxSpeed + Default + false + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\Demo.exe + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + Windows + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/Demo.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Windows + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/Demo.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories) + true + Windows + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc8.vcproj b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc8.vcproj new file mode 100644 index 0000000..5504310 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc8.vcproj @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc9.vcproj b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc9.vcproj new file mode 100644 index 0000000..e0052aa --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/Demo_vc9.vcproj @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/Makefile b/src/others/irrlicht-1.8.1/examples/Demo/Makefile new file mode 100644 index 0000000..1577ac9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/Makefile @@ -0,0 +1,43 @@ +# Irrlicht Engine Demo Makefile +Target = Demo +Sources = CDemo.cpp CMainMenu.cpp main.cpp + +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -Wall -O3 -ffast-math + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +all: all_linux + +# target specific settings +all_linux: SYSTEM=Linux +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor + +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm + +# if you enable sound add the proper library for linking +#LDFLAGS += -lIrrKlang +#LDFLAGS += -laudiere +#LDFLAGS += -lSDL_mixer -lSDL + +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +OBJ = $(Sources:.cpp=.o) + +all_linux all_win32: $(OBJ) + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + @$(RM) $(OBJ) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/examples/Demo/demo.cbp b/src/others/irrlicht-1.8.1/examples/Demo/demo.cbp new file mode 100644 index 0000000..4e58305 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/demo.cbp @@ -0,0 +1,68 @@ + + + + + + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/demo.dev b/src/others/irrlicht-1.8.1/examples/Demo/demo.dev new file mode 100644 index 0000000..9e1b4c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/demo.dev @@ -0,0 +1,99 @@ +[Project] +FileName=demo.dev +Name=Irrlicht Tech Demo +UnitCount=5 +Type=1 +Ver=1 +ObjFiles= +Includes=..\..\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../lib/Win32-gcc/libIrrlicht.a_@@_ +IsCpp=1 +Icon= +ExeOutput=../../bin/Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=Demo.exe +HostApplication= +Folders= +CommandLine= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 +UseCustomMakefile=0 +CustomMakefile= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder=Projekt1 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Irrlicht Engine example compiled using DevCpp and gcc +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + +[Unit2] +FileName=CDemo.h +CompileCpp=1 +Folder=Irrlicht Tech Demo +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=CMainMenu.cpp +CompileCpp=1 +Folder=Irrlicht Tech Demo +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=CMainMenu.h +CompileCpp=1 +Folder=Irrlicht Tech Demo +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=CDemo.cpp +CompileCpp=1 +Folder=Irrlicht Tech Demo +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/icon.ico b/src/others/irrlicht-1.8.1/examples/Demo/icon.ico new file mode 100644 index 0000000..49f8eab Binary files /dev/null and b/src/others/irrlicht-1.8.1/examples/Demo/icon.ico differ diff --git a/src/others/irrlicht-1.8.1/examples/Demo/main.cpp b/src/others/irrlicht-1.8.1/examples/Demo/main.cpp new file mode 100644 index 0000000..3d26999 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/main.cpp @@ -0,0 +1,49 @@ +// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt. +// This file is not documented. + +#include +#ifdef _IRR_WINDOWS_ +#include +#endif + +#include + +#include "CMainMenu.h" +#include "CDemo.h" + +using namespace irr; + +#ifdef _WIN32 + +#pragma comment(lib, "Irrlicht.lib") +INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT ) +#else +int main(int argc, char* argv[]) +#endif +{ + bool fullscreen = false; + bool music = true; + bool shadows = false; + bool additive = false; + bool vsync = false; + bool aa = false; + +#ifndef _IRR_WINDOWS_ + video::E_DRIVER_TYPE driverType = video::EDT_OPENGL; +#else + video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9; +#endif + + CMainMenu menu; + +//#ifndef _DEBUG + if (menu.run(fullscreen, music, shadows, additive, vsync, aa, driverType)) +//#endif + { + CDemo demo(fullscreen, music, shadows, additive, vsync, aa, driverType); + demo.run(); + } + + return 0; +} + diff --git a/src/others/irrlicht-1.8.1/examples/Demo/resource.h b/src/others/irrlicht-1.8.1/examples/Demo/resource.h new file mode 100644 index 0000000..eb3b976 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by resscript.rc +// +#define IDI_ICON1 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/src/others/irrlicht-1.8.1/examples/Demo/resscript.rc b/src/others/irrlicht-1.8.1/examples/Demo/resscript.rc new file mode 100644 index 0000000..be12eb7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Demo/resscript.rc @@ -0,0 +1,72 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Deutsch (sterreich) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA) +#ifdef _WIN32 +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON DISCARDABLE "icon.ico" +#endif // Deutsch (sterreich) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/others/irrlicht-1.8.1/examples/Makefile b/src/others/irrlicht-1.8.1/examples/Makefile new file mode 100644 index 0000000..da65881 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/Makefile @@ -0,0 +1,8 @@ +DIRS = $(wildcard [012]* Demo) + +all: $(DIRS) + +$(DIRS): + -@cd $@ && make clean && make + +.PHONY: $(DIRS) diff --git a/src/others/irrlicht-1.8.1/examples/buildAllExamples.sh b/src/others/irrlicht-1.8.1/examples/buildAllExamples.sh new file mode 100755 index 0000000..272a329 --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/buildAllExamples.sh @@ -0,0 +1,8 @@ +#! /bin/bash +[ -z $1 ] || TARGET=$1 +[ -z $TARGET ] && TARGET=all +for i in [012]* Demo; do + echo "Building $i"; + pushd $i && make clean $TARGET; + popd; +done diff --git a/src/others/irrlicht-1.8.1/examples/whereAreTheBinaries.txt b/src/others/irrlicht-1.8.1/examples/whereAreTheBinaries.txt new file mode 100644 index 0000000..d9f7d6a --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/whereAreTheBinaries.txt @@ -0,0 +1,7 @@ +If you are searching for executeables of the examples and the demo, +you'll find some for Windows in the directory +/bin/win32-VisualStudio. + +For Linux, just go into the directory of the example you want and +execute a simple 'make' after you made the engine from source/Irrlicht. + diff --git a/src/others/irrlicht-1.8.1/include/CDynamicMeshBuffer.h b/src/others/irrlicht-1.8.1/include/CDynamicMeshBuffer.h new file mode 100644 index 0000000..9b08f36 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/CDynamicMeshBuffer.h @@ -0,0 +1,116 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DYNAMIC_MESHBUFFER_H_INCLUDED__ +#define __C_DYNAMIC_MESHBUFFER_H_INCLUDED__ + +#include "IDynamicMeshBuffer.h" + +#include "CVertexBuffer.h" +#include "CIndexBuffer.h" + +namespace irr +{ +namespace scene +{ + + class CDynamicMeshBuffer: public IDynamicMeshBuffer + { + public: + //! constructor + CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType) + { + VertexBuffer=new CVertexBuffer(vertexType); + IndexBuffer=new CIndexBuffer(indexType); + } + + //! destructor + virtual ~CDynamicMeshBuffer() + { + if (VertexBuffer) + VertexBuffer->drop(); + if (IndexBuffer) + IndexBuffer->drop(); + } + + virtual IVertexBuffer& getVertexBuffer() const + { + return *VertexBuffer; + } + + virtual IIndexBuffer& getIndexBuffer() const + { + return *IndexBuffer; + } + + virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer) + { + if (newVertexBuffer) + newVertexBuffer->grab(); + if (VertexBuffer) + VertexBuffer->drop(); + + VertexBuffer=newVertexBuffer; + } + + virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer) + { + if (newIndexBuffer) + newIndexBuffer->grab(); + if (IndexBuffer) + IndexBuffer->drop(); + + IndexBuffer=newIndexBuffer; + } + + //! Get Material of this buffer. + virtual const video::SMaterial& getMaterial() const + { + return Material; + } + + //! Get Material of this buffer. + virtual video::SMaterial& getMaterial() + { + return Material; + } + + //! Get bounding box + virtual const core::aabbox3d& getBoundingBox() const + { + return BoundingBox; + } + + //! Set bounding box + virtual void setBoundingBox( const core::aabbox3df& box) + { + BoundingBox = box; + } + + //! Recalculate bounding box + virtual void recalculateBoundingBox() + { + if (!getVertexBuffer().size()) + BoundingBox.reset(0,0,0); + else + { + BoundingBox.reset(getVertexBuffer()[0].Pos); + for (u32 i=1; i BoundingBox; + private: + IVertexBuffer *VertexBuffer; + IIndexBuffer *IndexBuffer; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/CIndexBuffer.h b/src/others/irrlicht-1.8.1/include/CIndexBuffer.h new file mode 100644 index 0000000..b0bb436 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/CIndexBuffer.h @@ -0,0 +1,226 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_INDEX_BUFFER_H_INCLUDED__ +#define __C_INDEX_BUFFER_H_INCLUDED__ + +#include "IIndexBuffer.h" + +namespace irr +{ +namespace scene +{ + + class CIndexBuffer : public IIndexBuffer + { + + class IIndexList + { + public: + virtual ~IIndexList(){}; + + virtual u32 stride() const =0; + virtual u32 size() const =0; + virtual void push_back(const u32 &element) =0; + virtual u32 operator [](u32 index) const =0; + virtual u32 getLast() =0; + virtual void setValue(u32 index, u32 value) =0; + virtual void set_used(u32 usedNow) =0; + virtual void reallocate(u32 new_size) =0; + virtual u32 allocated_size() const =0; + virtual void* pointer() =0; + virtual video::E_INDEX_TYPE getType() const =0; + }; + + template + class CSpecificIndexList : public IIndexList + { + public: + core::array Indices; + + virtual u32 stride() const {return sizeof(T);} + + virtual u32 size() const {return Indices.size();} + + virtual void push_back(const u32 &element) + { + // push const ref due to compiler problem with gcc 4.6, big endian + Indices.push_back((const T&)element); + } + + virtual u32 operator [](u32 index) const + { + return (u32)(Indices[index]); + } + + virtual u32 getLast() {return (u32)Indices.getLast();} + + virtual void setValue(u32 index, u32 value) + { + Indices[index]=(T)value; + } + + virtual void set_used(u32 usedNow) + { + Indices.set_used(usedNow); + } + + virtual void reallocate(u32 new_size) + { + Indices.reallocate(new_size); + } + + virtual u32 allocated_size() const + { + return Indices.allocated_size(); + } + + virtual void* pointer() {return Indices.pointer();} + + virtual video::E_INDEX_TYPE getType() const + { + if (sizeof(T)==sizeof(u16)) + return video::EIT_16BIT; + else + return video::EIT_32BIT; + } + }; + + public: + IIndexList *Indices; + + CIndexBuffer(video::E_INDEX_TYPE IndexType) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1) + { + setType(IndexType); + } + + CIndexBuffer(const IIndexBuffer &IndexBufferCopy) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1) + { + setType(IndexBufferCopy.getType()); + reallocate(IndexBufferCopy.size()); + + for (u32 n=0;n; + break; + } + case video::EIT_32BIT: + { + NewIndices=new CSpecificIndexList; + break; + } + } + + if (Indices) + { + NewIndices->reallocate( Indices->size() ); + + for(u32 n=0;nsize();++n) + NewIndices->push_back((*Indices)[n]); + + delete Indices; + } + + Indices=NewIndices; + } + + virtual void* getData() {return Indices->pointer();} + + virtual video::E_INDEX_TYPE getType() const {return Indices->getType();} + + virtual u32 stride() const {return Indices->stride();} + + virtual u32 size() const + { + return Indices->size(); + } + + virtual void push_back(const u32 &element) + { + Indices->push_back(element); + } + + virtual u32 operator [](u32 index) const + { + return (*Indices)[index]; + } + + virtual u32 getLast() + { + return Indices->getLast(); + } + + virtual void setValue(u32 index, u32 value) + { + Indices->setValue(index, value); + } + + virtual void set_used(u32 usedNow) + { + Indices->set_used(usedNow); + } + + virtual void reallocate(u32 new_size) + { + Indices->reallocate(new_size); + } + + virtual u32 allocated_size() const + { + return Indices->allocated_size(); + } + + virtual void* pointer() + { + return Indices->pointer(); + } + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint() const + { + return MappingHint; + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) + { + MappingHint=NewMappingHint; + } + + //! flags the mesh as changed, reloads hardware buffers + virtual void setDirty() + { + ++ChangedID; + } + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID() const {return ChangedID;} + + E_HARDWARE_MAPPING MappingHint; + u32 ChangedID; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/CMeshBuffer.h b/src/others/irrlicht-1.8.1/include/CMeshBuffer.h new file mode 100644 index 0000000..7512a38 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/CMeshBuffer.h @@ -0,0 +1,301 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __T_MESH_BUFFER_H_INCLUDED__ +#define __T_MESH_BUFFER_H_INCLUDED__ + +#include "irrArray.h" +#include "IMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + //! Template implementation of the IMeshBuffer interface + template + class CMeshBuffer : public IMeshBuffer + { + public: + //! Default constructor for empty meshbuffer + CMeshBuffer():ChangedID_Vertex(1),ChangedID_Index(1),MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER) + { + #ifdef _DEBUG + setDebugName("SMeshBuffer"); + #endif + } + + + //! Get material of this meshbuffer + /** \return Material of this buffer */ + virtual const video::SMaterial& getMaterial() const + { + return Material; + } + + + //! Get material of this meshbuffer + /** \return Material of this buffer */ + virtual video::SMaterial& getMaterial() + { + return Material; + } + + + //! Get pointer to vertices + /** \return Pointer to vertices. */ + virtual const void* getVertices() const + { + return Vertices.const_pointer(); + } + + + //! Get pointer to vertices + /** \return Pointer to vertices. */ + virtual void* getVertices() + { + return Vertices.pointer(); + } + + + //! Get number of vertices + /** \return Number of vertices. */ + virtual u32 getVertexCount() const + { + return Vertices.size(); + } + + //! Get type of index data which is stored in this meshbuffer. + /** \return Index type of this buffer. */ + virtual video::E_INDEX_TYPE getIndexType() const + { + return video::EIT_16BIT; + } + + //! Get pointer to indices + /** \return Pointer to indices. */ + virtual const u16* getIndices() const + { + return Indices.const_pointer(); + } + + + //! Get pointer to indices + /** \return Pointer to indices. */ + virtual u16* getIndices() + { + return Indices.pointer(); + } + + + //! Get number of indices + /** \return Number of indices. */ + virtual u32 getIndexCount() const + { + return Indices.size(); + } + + + //! Get the axis aligned bounding box + /** \return Axis aligned bounding box of this buffer. */ + virtual const core::aabbox3d& getBoundingBox() const + { + return BoundingBox; + } + + + //! Set the axis aligned bounding box + /** \param box New axis aligned bounding box for this buffer. */ + //! set user axis aligned bounding box + virtual void setBoundingBox(const core::aabbox3df& box) + { + BoundingBox = box; + } + + + //! Recalculate the bounding box. + /** should be called if the mesh changed. */ + virtual void recalculateBoundingBox() + { + if (Vertices.empty()) + BoundingBox.reset(0,0,0); + else + { + BoundingBox.reset(Vertices[0].Pos); + for (u32 i=1; i(vertices)[i]); + BoundingBox.addInternalPoint(reinterpret_cast(vertices)[i].Pos); + } + + Indices.reallocate(getIndexCount()+numIndices); + for (i=0; igetVertexCount()); + for (i=0; igetVertexCount(); ++i) + { + Vertices.push_back(reinterpret_cast(other->getVertices())[i]); + } + + Indices.reallocate(getIndexCount()+other->getIndexCount()); + for (i=0; igetIndexCount(); ++i) + { + Indices.push_back(other->getIndices()[i]+vertexCount); + } + BoundingBox.addInternalBox(other->getBoundingBox()); + */ + } + + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const + { + return MappingHint_Vertex; + } + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const + { + return MappingHint_Index; + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) + { + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) + MappingHint_Vertex=NewMappingHint; + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) + MappingHint_Index=NewMappingHint; + } + + + //! flags the mesh as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) + { + if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX) + ++ChangedID_Vertex; + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) + ++ChangedID_Index; + } + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;} + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID_Index() const {return ChangedID_Index;} + + u32 ChangedID_Vertex; + u32 ChangedID_Index; + + //! hardware mapping hint + E_HARDWARE_MAPPING MappingHint_Vertex; + E_HARDWARE_MAPPING MappingHint_Index; + + //! Material for this meshbuffer. + video::SMaterial Material; + //! Vertices of this buffer + core::array Vertices; + //! Indices into the vertices of this buffer. + core::array Indices; + //! Bounding box of this meshbuffer. + core::aabbox3d BoundingBox; + }; + + //! Standard meshbuffer + typedef CMeshBuffer SMeshBuffer; + //! Meshbuffer with two texture coords per vertex, e.g. for lightmaps + typedef CMeshBuffer SMeshBufferLightMap; + //! Meshbuffer with vertices having tangents stored, e.g. for normal mapping + typedef CMeshBuffer SMeshBufferTangents; +} // end namespace scene +} // end namespace irr + +#endif + + diff --git a/src/others/irrlicht-1.8.1/include/CVertexBuffer.h b/src/others/irrlicht-1.8.1/include/CVertexBuffer.h new file mode 100644 index 0000000..c721419 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/CVertexBuffer.h @@ -0,0 +1,210 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_VERTEX_BUFFER_H_INCLUDED__ +#define __C_VERTEX_BUFFER_H_INCLUDED__ + +#include "IVertexBuffer.h" + + +namespace irr +{ +namespace scene +{ + + class CVertexBuffer : public IVertexBuffer + { + class IVertexList + { + public: + virtual ~IVertexList(){}; + + virtual u32 stride() const =0; + + virtual u32 size() const =0; + + virtual void push_back (const video::S3DVertex &element) =0; + virtual video::S3DVertex& operator [](const u32 index) const =0; + virtual video::S3DVertex& getLast() =0; + virtual void set_used(u32 usedNow) =0; + virtual void reallocate(u32 new_size) =0; + virtual u32 allocated_size() const =0; + virtual video::S3DVertex* pointer() =0; + virtual video::E_VERTEX_TYPE getType() const =0; + }; + + template + class CSpecificVertexList : public IVertexList + { + public: + core::array Vertices; + + virtual u32 stride() const {return sizeof(T);} + + virtual u32 size() const {return Vertices.size();} + + virtual void push_back (const video::S3DVertex &element) + {Vertices.push_back((T&)element);} + + virtual video::S3DVertex& operator [](const u32 index) const + {return (video::S3DVertex&)Vertices[index];} + + virtual video::S3DVertex& getLast() + {return (video::S3DVertex&)Vertices.getLast();} + + virtual void set_used(u32 usedNow) + {Vertices.set_used(usedNow);} + + virtual void reallocate(u32 new_size) + {Vertices.reallocate(new_size);} + + virtual u32 allocated_size() const + { + return Vertices.allocated_size(); + } + + virtual video::S3DVertex* pointer() {return Vertices.pointer();} + + virtual video::E_VERTEX_TYPE getType() const {return T().getType();} + }; + + public: + IVertexList *Vertices; + + CVertexBuffer(video::E_VERTEX_TYPE vertexType) : Vertices(0), + MappingHint(EHM_NEVER), ChangedID(1) + { + setType(vertexType); + } + + CVertexBuffer(const IVertexBuffer &VertexBufferCopy) : + Vertices(0), MappingHint(EHM_NEVER), + ChangedID(1) + { + setType(VertexBufferCopy.getType()); + reallocate(VertexBufferCopy.size()); + + for (u32 n=0;n; + break; + } + case video::EVT_2TCOORDS: + { + NewVertices=new CSpecificVertexList; + break; + } + case video::EVT_TANGENTS: + { + NewVertices=new CSpecificVertexList; + break; + } + } + if (Vertices) + { + NewVertices->reallocate( Vertices->size() ); + + for(u32 n=0;nsize();++n) + NewVertices->push_back((*Vertices)[n]); + + delete Vertices; + } + + Vertices=NewVertices; + } + + virtual void* getData() {return Vertices->pointer();} + + virtual video::E_VERTEX_TYPE getType() const {return Vertices->getType();} + + virtual u32 stride() const {return Vertices->stride();} + + virtual u32 size() const + { + return Vertices->size(); + } + + virtual void push_back (const video::S3DVertex &element) + { + Vertices->push_back(element); + } + + virtual video::S3DVertex& operator [](const u32 index) const + { + return (*Vertices)[index]; + } + + virtual video::S3DVertex& getLast() + { + return Vertices->getLast(); + } + + virtual void set_used(u32 usedNow) + { + Vertices->set_used(usedNow); + } + + virtual void reallocate(u32 new_size) + { + Vertices->reallocate(new_size); + } + + virtual u32 allocated_size() const + { + return Vertices->allocated_size(); + } + + virtual video::S3DVertex* pointer() + { + return Vertices->pointer(); + } + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint() const + { + return MappingHint; + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) + { + MappingHint=NewMappingHint; + } + + //! flags the mesh as changed, reloads hardware buffers + virtual void setDirty() + { + ++ChangedID; + } + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID() const {return ChangedID;} + + E_HARDWARE_MAPPING MappingHint; + u32 ChangedID; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/EAttributes.h b/src/others/irrlicht-1.8.1/include/EAttributes.h new file mode 100644 index 0000000..51f102b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EAttributes.h @@ -0,0 +1,101 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_ATTRIBUTES_H_INCLUDED__ +#define __E_ATTRIBUTES_H_INCLUDED__ + +namespace irr +{ +namespace io +{ + +//! Types of attributes available for IAttributes +enum E_ATTRIBUTE_TYPE +{ + // integer attribute + EAT_INT = 0, + + // float attribute + EAT_FLOAT, + + // string attribute + EAT_STRING, + + // boolean attribute + EAT_BOOL, + + // enumeration attribute + EAT_ENUM, + + // color attribute + EAT_COLOR, + + // floating point color attribute + EAT_COLORF, + + // 3d vector attribute + EAT_VECTOR3D, + + // 2d position attribute + EAT_POSITION2D, + + // vector 2d attribute + EAT_VECTOR2D, + + // rectangle attribute + EAT_RECT, + + // matrix attribute + EAT_MATRIX, + + // quaternion attribute + EAT_QUATERNION, + + // 3d bounding box + EAT_BBOX, + + // plane + EAT_PLANE, + + // 3d triangle + EAT_TRIANGLE3D, + + // line 2d + EAT_LINE2D, + + // line 3d + EAT_LINE3D, + + // array of stringws attribute + EAT_STRINGWARRAY, + + // array of float + EAT_FLOATARRAY, + + // array of int + EAT_INTARRAY, + + // binary data attribute + EAT_BINARY, + + // texture reference attribute + EAT_TEXTURE, + + // user pointer void* + EAT_USER_POINTER, + + // dimension attribute + EAT_DIMENSION2D, + + // known attribute type count + EAT_COUNT, + + // unknown attribute + EAT_UNKNOWN +}; + +} // end namespace io +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/ECullingTypes.h b/src/others/irrlicht-1.8.1/include/ECullingTypes.h new file mode 100644 index 0000000..4a562a4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ECullingTypes.h @@ -0,0 +1,41 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_CULLING_TYPES_H_INCLUDED__ +#define __E_CULLING_TYPES_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace scene +{ + + //! An enumeration for all types of automatic culling for built-in scene nodes + enum E_CULLING_TYPE + { + EAC_OFF = 0, + EAC_BOX = 1, + EAC_FRUSTUM_BOX = 2, + EAC_FRUSTUM_SPHERE = 4, + EAC_OCC_QUERY = 8 + }; + + //! Names for culling type + const c8* const AutomaticCullingNames[] = + { + "false", + "box", // camera box against node box + "frustum_box", // camera frustum against node box + "frustum_sphere", // camera frustum against node sphere + "occ_query", // occlusion query + 0 + }; + +} // end namespace scene +} // end namespace irr + + +#endif // __E_CULLING_TYPES_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EDebugSceneTypes.h b/src/others/irrlicht-1.8.1/include/EDebugSceneTypes.h new file mode 100644 index 0000000..987b790 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EDebugSceneTypes.h @@ -0,0 +1,50 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_DEBUG_SCENE_TYPES_H_INCLUDED__ +#define __E_DEBUG_SCENE_TYPES_H_INCLUDED__ + +namespace irr +{ +namespace scene +{ + + //! An enumeration for all types of debug data for built-in scene nodes (flags) + enum E_DEBUG_SCENE_TYPE + { + //! No Debug Data ( Default ) + EDS_OFF = 0, + + //! Show Bounding Boxes of SceneNode + EDS_BBOX = 1, + + //! Show Vertex Normals + EDS_NORMALS = 2, + + //! Shows Skeleton/Tags + EDS_SKELETON = 4, + + //! Overlays Mesh Wireframe + EDS_MESH_WIRE_OVERLAY = 8, + + //! Temporary use transparency Material Type + EDS_HALF_TRANSPARENCY = 16, + + //! Show Bounding Boxes of all MeshBuffers + EDS_BBOX_BUFFERS = 32, + + //! EDS_BBOX | EDS_BBOX_BUFFERS + EDS_BBOX_ALL = EDS_BBOX | EDS_BBOX_BUFFERS, + + //! Show all debug infos + EDS_FULL = 0xffffffff + }; + + +} // end namespace scene +} // end namespace irr + + +#endif // __E_DEBUG_SCENE_TYPES_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EDeviceTypes.h b/src/others/irrlicht-1.8.1/include/EDeviceTypes.h new file mode 100644 index 0000000..44b0094 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EDeviceTypes.h @@ -0,0 +1,60 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_DEVICE_TYPES_H_INCLUDED__ +#define __E_DEVICE_TYPES_H_INCLUDED__ + +namespace irr +{ + + //! An enum for the different device types supported by the Irrlicht Engine. + enum E_DEVICE_TYPE + { + + //! A device native to Microsoft Windows + /** This device uses the Win32 API and works in all versions of Windows. */ + EIDT_WIN32, + + //! A device native to Windows CE devices + /** This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices */ + EIDT_WINCE, + + //! A device native to Unix style operating systems. + /** This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and + other operating systems which support X11. */ + EIDT_X11, + + //! A device native to Mac OSX + /** This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above. */ + EIDT_OSX, + + //! A device which uses Simple DirectMedia Layer + /** The SDL device works under all platforms supported by SDL but first must be compiled + in by defining the IRR_USE_SDL_DEVICE macro in IrrCompileConfig.h */ + EIDT_SDL, + + //! A device for raw framebuffer access + /** Best used with embedded devices and mobile systems. + Does not need X11 or other graphical subsystems. + May support hw-acceleration via OpenGL-ES for FBDirect */ + EIDT_FRAMEBUFFER, + + //! A simple text only device supported by all platforms. + /** This device allows applications to run from the command line without opening a window. + It can render the output of the software drivers to the console as ASCII. It only supports + mouse and keyboard in Windows operating systems. */ + EIDT_CONSOLE, + + //! This selection allows Irrlicht to choose the best device from the ones available. + /** If this selection is chosen then Irrlicht will try to use the IrrlichtDevice native + to your operating system. If this is unavailable then the X11, SDL and then console device + will be tried. This ensures that Irrlicht will run even if your platform is unsupported, + although it may not be able to render anything. */ + EIDT_BEST + }; + +} // end namespace irr + +#endif // __E_DEVICE_TYPES_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EDriverFeatures.h b/src/others/irrlicht-1.8.1/include/EDriverFeatures.h new file mode 100644 index 0000000..a0bf307 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EDriverFeatures.h @@ -0,0 +1,133 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_DRIVER_FEATURES_H_INCLUDED__ +#define __E_DRIVER_FEATURES_H_INCLUDED__ + +namespace irr +{ +namespace video +{ + + //! enumeration for querying features of the video driver. + enum E_VIDEO_DRIVER_FEATURE + { + //! Is driver able to render to a surface? + EVDF_RENDER_TO_TARGET = 0, + + //! Is hardeware transform and lighting supported? + EVDF_HARDWARE_TL, + + //! Are multiple textures per material possible? + EVDF_MULTITEXTURE, + + //! Is driver able to render with a bilinear filter applied? + EVDF_BILINEAR_FILTER, + + //! Can the driver handle mip maps? + EVDF_MIP_MAP, + + //! Can the driver update mip maps automatically? + EVDF_MIP_MAP_AUTO_UPDATE, + + //! Are stencilbuffers switched on and does the device support stencil buffers? + EVDF_STENCIL_BUFFER, + + //! Is Vertex Shader 1.1 supported? + EVDF_VERTEX_SHADER_1_1, + + //! Is Vertex Shader 2.0 supported? + EVDF_VERTEX_SHADER_2_0, + + //! Is Vertex Shader 3.0 supported? + EVDF_VERTEX_SHADER_3_0, + + //! Is Pixel Shader 1.1 supported? + EVDF_PIXEL_SHADER_1_1, + + //! Is Pixel Shader 1.2 supported? + EVDF_PIXEL_SHADER_1_2, + + //! Is Pixel Shader 1.3 supported? + EVDF_PIXEL_SHADER_1_3, + + //! Is Pixel Shader 1.4 supported? + EVDF_PIXEL_SHADER_1_4, + + //! Is Pixel Shader 2.0 supported? + EVDF_PIXEL_SHADER_2_0, + + //! Is Pixel Shader 3.0 supported? + EVDF_PIXEL_SHADER_3_0, + + //! Are ARB vertex programs v1.0 supported? + EVDF_ARB_VERTEX_PROGRAM_1, + + //! Are ARB fragment programs v1.0 supported? + EVDF_ARB_FRAGMENT_PROGRAM_1, + + //! Is GLSL supported? + EVDF_ARB_GLSL, + + //! Is HLSL supported? + EVDF_HLSL, + + //! Are non-square textures supported? + EVDF_TEXTURE_NSQUARE, + + //! Are non-power-of-two textures supported? + EVDF_TEXTURE_NPOT, + + //! Are framebuffer objects supported? + EVDF_FRAMEBUFFER_OBJECT, + + //! Are vertex buffer objects supported? + EVDF_VERTEX_BUFFER_OBJECT, + + //! Supports Alpha To Coverage + EVDF_ALPHA_TO_COVERAGE, + + //! Supports Color masks (disabling color planes in output) + EVDF_COLOR_MASK, + + //! Supports multiple render targets at once + EVDF_MULTIPLE_RENDER_TARGETS, + + //! Supports separate blend settings for multiple render targets + EVDF_MRT_BLEND, + + //! Supports separate color masks for multiple render targets + EVDF_MRT_COLOR_MASK, + + //! Supports separate blend functions for multiple render targets + EVDF_MRT_BLEND_FUNC, + + //! Supports geometry shaders + EVDF_GEOMETRY_SHADER, + + //! Supports occlusion queries + EVDF_OCCLUSION_QUERY, + + //! Supports polygon offset/depth bias for avoiding z-fighting + EVDF_POLYGON_OFFSET, + + //! Support for different blend functions. Without, only ADD is available + EVDF_BLEND_OPERATIONS, + + //! Support for texture coord transformation via texture matrix + EVDF_TEXTURE_MATRIX, + + //! Support for NVidia's CG shader language + EVDF_CG, + + //! Only used for counting the elements of this enum + EVDF_COUNT + }; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/EDriverTypes.h b/src/others/irrlicht-1.8.1/include/EDriverTypes.h new file mode 100644 index 0000000..25237b9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EDriverTypes.h @@ -0,0 +1,64 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_DRIVER_TYPES_H_INCLUDED__ +#define __E_DRIVER_TYPES_H_INCLUDED__ + +namespace irr +{ +namespace video +{ + + //! An enum for all types of drivers the Irrlicht Engine supports. + enum E_DRIVER_TYPE + { + //! Null driver, useful for applications to run the engine without visualisation. + /** The null device is able to load textures, but does not + render and display any graphics. */ + EDT_NULL, + + //! The Irrlicht Engine Software renderer. + /** Runs on all platforms, with every hardware. It should only + be used for 2d graphics, but it can also perform some primitive + 3d functions. These 3d drawing functions are quite fast, but + very inaccurate, and don't even support clipping in 3D mode. */ + EDT_SOFTWARE, + + //! The Burning's Software Renderer, an alternative software renderer + /** Basically it can be described as the Irrlicht Software + renderer on steroids. It rasterizes 3D geometry perfectly: It + is able to perform correct 3d clipping, perspective correct + texture mapping, perspective correct color mapping, and renders + sub pixel correct, sub texel correct primitives. In addition, + it does bilinear texel filtering and supports more materials + than the EDT_SOFTWARE driver. This renderer has been written + entirely by Thomas Alten, thanks a lot for this huge + contribution. */ + EDT_BURNINGSVIDEO, + + //! Direct3D8 device, only available on Win32 platforms. + /** Performs hardware accelerated rendering of 3D and 2D + primitives. */ + EDT_DIRECT3D8, + + //! Direct3D 9 device, only available on Win32 platforms. + /** Performs hardware accelerated rendering of 3D and 2D + primitives. */ + EDT_DIRECT3D9, + + //! OpenGL device, available on most platforms. + /** Performs hardware accelerated rendering of 3D and 2D + primitives. */ + EDT_OPENGL, + + //! No driver, just for counting the elements + EDT_COUNT + }; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/EGUIAlignment.h b/src/others/irrlicht-1.8.1/include/EGUIAlignment.h new file mode 100644 index 0000000..85f81b4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EGUIAlignment.h @@ -0,0 +1,38 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_GUI_ALIGNMENT_H_INCLUDED__ +#define __E_GUI_ALIGNMENT_H_INCLUDED__ + +namespace irr +{ +namespace gui +{ +enum EGUI_ALIGNMENT +{ + //! Aligned to parent's top or left side (default) + EGUIA_UPPERLEFT=0, + //! Aligned to parent's bottom or right side + EGUIA_LOWERRIGHT, + //! Aligned to the center of parent + EGUIA_CENTER, + //! Stretched to fit parent + EGUIA_SCALE +}; + +//! Names for alignments +const c8* const GUIAlignmentNames[] = +{ + "upperLeft", + "lowerRight", + "center", + "scale", + 0 +}; + +} // namespace gui +} // namespace irr + +#endif // __E_GUI_ALIGNMENT_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EGUIElementTypes.h b/src/others/irrlicht-1.8.1/include/EGUIElementTypes.h new file mode 100644 index 0000000..a02afad --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EGUIElementTypes.h @@ -0,0 +1,140 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_GUI_ELEMENT_TYPES_H_INCLUDED__ +#define __E_GUI_ELEMENT_TYPES_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace gui +{ + +//! List of all basic Irrlicht GUI elements. +/** An IGUIElement returns this when calling IGUIElement::getType(); */ +enum EGUI_ELEMENT_TYPE +{ + //! A button (IGUIButton) + EGUIET_BUTTON = 0, + + //! A check box (IGUICheckBox) + EGUIET_CHECK_BOX, + + //! A combo box (IGUIComboBox) + EGUIET_COMBO_BOX, + + //! A context menu (IGUIContextMenu) + EGUIET_CONTEXT_MENU, + + //! A menu (IGUIMenu) + EGUIET_MENU, + + //! An edit box (IGUIEditBox) + EGUIET_EDIT_BOX, + + //! A file open dialog (IGUIFileOpenDialog) + EGUIET_FILE_OPEN_DIALOG, + + //! A color select open dialog (IGUIColorSelectDialog) + EGUIET_COLOR_SELECT_DIALOG, + + //! A in/out fader (IGUIInOutFader) + EGUIET_IN_OUT_FADER, + + //! An image (IGUIImage) + EGUIET_IMAGE, + + //! A list box (IGUIListBox) + EGUIET_LIST_BOX, + + //! A mesh viewer (IGUIMeshViewer) + EGUIET_MESH_VIEWER, + + //! A message box (IGUIWindow) + EGUIET_MESSAGE_BOX, + + //! A modal screen + EGUIET_MODAL_SCREEN, + + //! A scroll bar (IGUIScrollBar) + EGUIET_SCROLL_BAR, + + //! A spin box (IGUISpinBox) + EGUIET_SPIN_BOX, + + //! A static text (IGUIStaticText) + EGUIET_STATIC_TEXT, + + //! A tab (IGUITab) + EGUIET_TAB, + + //! A tab control + EGUIET_TAB_CONTROL, + + //! A Table + EGUIET_TABLE, + + //! A tool bar (IGUIToolBar) + EGUIET_TOOL_BAR, + + //! A Tree View + EGUIET_TREE_VIEW, + + //! A window + EGUIET_WINDOW, + + //! Unknown type. + EGUIET_ELEMENT, + + //! The root of the GUI + EGUIET_ROOT, + + //! Not an element, amount of elements in there + EGUIET_COUNT, + + //! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit. + EGUIET_FORCE_32_BIT = 0x7fffffff + +}; + +//! Names for built-in element types +const c8* const GUIElementTypeNames[] = +{ + "button", + "checkBox", + "comboBox", + "contextMenu", + "menu", + "editBox", + "fileOpenDialog", + "colorSelectDialog", + "inOutFader", + "image", + "listBox", + "meshViewer", + "messageBox", + "modalScreen", + "scrollBar", + "spinBox", + "staticText", + "tab", + "tabControl", + "table", + "toolBar", + "treeview", + "window", + "element", + "root", + 0 +}; + +} // end namespace gui +} // end namespace irr + +#endif + + + + diff --git a/src/others/irrlicht-1.8.1/include/EHardwareBufferFlags.h b/src/others/irrlicht-1.8.1/include/EHardwareBufferFlags.h new file mode 100644 index 0000000..d759455 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EHardwareBufferFlags.h @@ -0,0 +1,44 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_HARDWARE_BUFFER_FLAGS_INCLUDED__ +#define __E_HARDWARE_BUFFER_FLAGS_INCLUDED__ + +namespace irr +{ +namespace scene +{ + + enum E_HARDWARE_MAPPING + { + //! Don't store on the hardware + EHM_NEVER=0, + + //! Rarely changed, usually stored completely on the hardware + EHM_STATIC, + + //! Sometimes changed, driver optimized placement + EHM_DYNAMIC, + + //! Always changed, cache optimizing on the GPU + EHM_STREAM + }; + + enum E_BUFFER_TYPE + { + //! Does not change anything + EBT_NONE=0, + //! Change the vertex mapping + EBT_VERTEX, + //! Change the index mapping + EBT_INDEX, + //! Change both vertex and index mapping to the same value + EBT_VERTEX_AND_INDEX + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/EMaterialFlags.h b/src/others/irrlicht-1.8.1/include/EMaterialFlags.h new file mode 100644 index 0000000..0adc702 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EMaterialFlags.h @@ -0,0 +1,95 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_MATERIAL_FLAGS_H_INCLUDED__ +#define __E_MATERIAL_FLAGS_H_INCLUDED__ + +namespace irr +{ +namespace video +{ + + //! Material flags + enum E_MATERIAL_FLAG + { + //! Draw as wireframe or filled triangles? Default: false + EMF_WIREFRAME = 0x1, + + //! Draw as point cloud or filled triangles? Default: false + EMF_POINTCLOUD = 0x2, + + //! Flat or Gouraud shading? Default: true + EMF_GOURAUD_SHADING = 0x4, + + //! Will this material be lighted? Default: true + EMF_LIGHTING = 0x8, + + //! Is the ZBuffer enabled? Default: true + EMF_ZBUFFER = 0x10, + + //! May be written to the zbuffer or is it readonly. Default: true + /** This flag is ignored, if the material type is a transparent type. */ + EMF_ZWRITE_ENABLE = 0x20, + + //! Is backface culling enabled? Default: true + EMF_BACK_FACE_CULLING = 0x40, + + //! Is frontface culling enabled? Default: false + /** Overrides EMF_BACK_FACE_CULLING if both are enabled. */ + EMF_FRONT_FACE_CULLING = 0x80, + + //! Is bilinear filtering enabled? Default: true + EMF_BILINEAR_FILTER = 0x100, + + //! Is trilinear filtering enabled? Default: false + /** If the trilinear filter flag is enabled, + the bilinear filtering flag is ignored. */ + EMF_TRILINEAR_FILTER = 0x200, + + //! Is anisotropic filtering? Default: false + /** In Irrlicht you can use anisotropic texture filtering in + conjunction with bilinear or trilinear texture filtering + to improve rendering results. Primitives will look less + blurry with this flag switched on. */ + EMF_ANISOTROPIC_FILTER = 0x400, + + //! Is fog enabled? Default: false + EMF_FOG_ENABLE = 0x800, + + //! Normalizes normals. Default: false + /** You can enable this if you need to scale a dynamic lighted + model. Usually, its normals will get scaled too then and it + will get darker. If you enable the EMF_NORMALIZE_NORMALS flag, + the normals will be normalized again, and the model will look + as bright as it should. */ + EMF_NORMALIZE_NORMALS = 0x1000, + + //! Access to all layers texture wrap settings. Overwrites separate layer settings. + EMF_TEXTURE_WRAP = 0x2000, + + //! AntiAliasing mode + EMF_ANTI_ALIASING = 0x4000, + + //! ColorMask bits, for enabling the color planes + EMF_COLOR_MASK = 0x8000, + + //! ColorMaterial enum for vertex color interpretation + EMF_COLOR_MATERIAL = 0x10000, + + //! Flag for enabling/disabling mipmap usage + EMF_USE_MIP_MAPS = 0x20000, + + //! Flag for blend operation + EMF_BLEND_OPERATION = 0x40000, + + //! Flag for polygon offset + EMF_POLYGON_OFFSET = 0x80000 + }; + +} // end namespace video +} // end namespace irr + + +#endif // __E_MATERIAL_FLAGS_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EMaterialTypes.h b/src/others/irrlicht-1.8.1/include/EMaterialTypes.h new file mode 100644 index 0000000..086ca34 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EMaterialTypes.h @@ -0,0 +1,234 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_MATERIAL_TYPES_H_INCLUDED__ +#define __E_MATERIAL_TYPES_H_INCLUDED__ + +namespace irr +{ +namespace video +{ + + //! Abstracted and easy to use fixed function/programmable pipeline material modes. + enum E_MATERIAL_TYPE + { + //! Standard solid material. + /** Only first texture is used, which is supposed to be the + diffuse material. */ + EMT_SOLID = 0, + + //! Solid material with 2 texture layers. + /** The second is blended onto the first using the alpha value + of the vertex colors. This material is currently not implemented in OpenGL. + */ + EMT_SOLID_2_LAYER, + + //! Material type with standard lightmap technique + /** There should be 2 textures: The first texture layer is a + diffuse map, the second is a light map. Dynamic light is + ignored. */ + EMT_LIGHTMAP, + + //! Material type with lightmap technique like EMT_LIGHTMAP. + /** But lightmap and diffuse texture are added instead of modulated. */ + EMT_LIGHTMAP_ADD, + + //! Material type with standard lightmap technique + /** There should be 2 textures: The first texture layer is a + diffuse map, the second is a light map. Dynamic light is + ignored. The texture colors are effectively multiplied by 2 + for brightening. Like known in DirectX as D3DTOP_MODULATE2X. */ + EMT_LIGHTMAP_M2, + + //! Material type with standard lightmap technique + /** There should be 2 textures: The first texture layer is a + diffuse map, the second is a light map. Dynamic light is + ignored. The texture colors are effectively multiplyied by 4 + for brightening. Like known in DirectX as D3DTOP_MODULATE4X. */ + EMT_LIGHTMAP_M4, + + //! Like EMT_LIGHTMAP, but also supports dynamic lighting. + EMT_LIGHTMAP_LIGHTING, + + //! Like EMT_LIGHTMAP_M2, but also supports dynamic lighting. + EMT_LIGHTMAP_LIGHTING_M2, + + //! Like EMT_LIGHTMAP_4, but also supports dynamic lighting. + EMT_LIGHTMAP_LIGHTING_M4, + + //! Detail mapped material. + /** The first texture is diffuse color map, the second is added + to this and usually displayed with a bigger scale value so that + it adds more detail. The detail map is added to the diffuse map + using ADD_SIGNED, so that it is possible to add and substract + color from the diffuse map. For example a value of + (127,127,127) will not change the appearance of the diffuse map + at all. Often used for terrain rendering. */ + EMT_DETAIL_MAP, + + //! Look like a reflection of the environment around it. + /** To make this possible, a texture called 'sphere map' is + used, which must be set as the first texture. */ + EMT_SPHERE_MAP, + + //! A reflecting material with an optional non reflecting texture layer. + /** The reflection map should be set as first texture. */ + EMT_REFLECTION_2_LAYER, + + //! A transparent material. + /** Only the first texture is used. The new color is calculated + by simply adding the source color and the dest color. This + means if for example a billboard using a texture with black + background and a red circle on it is drawn with this material, + the result is that only the red circle will be drawn a little + bit transparent, and everything which was black is 100% + transparent and not visible. This material type is useful for + particle effects. */ + EMT_TRANSPARENT_ADD_COLOR, + + //! Makes the material transparent based on the texture alpha channel. + /** The final color is blended together from the destination + color and the texture color, using the alpha channel value as + blend factor. Only first texture is used. If you are using + this material with small textures, it is a good idea to load + the texture in 32 bit mode + (video::IVideoDriver::setTextureCreationFlag()). Also, an alpha + ref is used, which can be manipulated using + SMaterial::MaterialTypeParam. This value controls how sharp the + edges become when going from a transparent to a solid spot on + the texture. */ + EMT_TRANSPARENT_ALPHA_CHANNEL, + + //! Makes the material transparent based on the texture alpha channel. + /** If the alpha channel value is greater than 127, a + pixel is written to the target, otherwise not. This + material does not use alpha blending and is a lot faster + than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing + stuff like leafes of plants, because the borders are not + blurry but sharp. Only first texture is used. If you are + using this material with small textures and 3d object, it + is a good idea to load the texture in 32 bit mode + (video::IVideoDriver::setTextureCreationFlag()). */ + EMT_TRANSPARENT_ALPHA_CHANNEL_REF, + + //! Makes the material transparent based on the vertex alpha value. + EMT_TRANSPARENT_VERTEX_ALPHA, + + //! A transparent reflecting material with an optional additional non reflecting texture layer. + /** The reflection map should be set as first texture. The + transparency depends on the alpha value in the vertex colors. A + texture which will not reflect can be set as second texture. + Please note that this material type is currently not 100% + implemented in OpenGL. */ + EMT_TRANSPARENT_REFLECTION_2_LAYER, + + //! A solid normal map renderer. + /** First texture is the color map, the second should be the + normal map. Note that you should use this material only when + drawing geometry consisting of vertices of type + S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into + this format using IMeshManipulator::createMeshWithTangents() + (See SpecialFX2 Tutorial). This shader runs on vertex shader + 1.1 and pixel shader 1.1 capable hardware and falls back to a + fixed function lighted material if this hardware is not + available. Only two lights are supported by this shader, if + there are more, the nearest two are chosen. */ + EMT_NORMAL_MAP_SOLID, + + //! A transparent normal map renderer. + /** First texture is the color map, the second should be the + normal map. Note that you should use this material only when + drawing geometry consisting of vertices of type + S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into + this format using IMeshManipulator::createMeshWithTangents() + (See SpecialFX2 Tutorial). This shader runs on vertex shader + 1.1 and pixel shader 1.1 capable hardware and falls back to a + fixed function lighted material if this hardware is not + available. Only two lights are supported by this shader, if + there are more, the nearest two are chosen. */ + EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR, + + //! A transparent (based on the vertex alpha value) normal map renderer. + /** First texture is the color map, the second should be the + normal map. Note that you should use this material only when + drawing geometry consisting of vertices of type + S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into + this format using IMeshManipulator::createMeshWithTangents() + (See SpecialFX2 Tutorial). This shader runs on vertex shader + 1.1 and pixel shader 1.1 capable hardware and falls back to a + fixed function lighted material if this hardware is not + available. Only two lights are supported by this shader, if + there are more, the nearest two are chosen. */ + EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA, + + //! Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping. + /** Looks a lot more realistic. This only works when the + hardware supports at least vertex shader 1.1 and pixel shader + 1.4. First texture is the color map, the second should be the + normal map. The normal map texture should contain the height + value in the alpha component. The + IVideoDriver::makeNormalMapTexture() method writes this value + automatically when creating normal maps from a heightmap when + using a 32 bit texture. The height scale of the material + (affecting the bumpiness) is being controlled by the + SMaterial::MaterialTypeParam member. If set to zero, the + default value (0.02f) will be applied. Otherwise the value set + in SMaterial::MaterialTypeParam is taken. This value depends on + with which scale the texture is mapped on the material. Too + high or low values of MaterialTypeParam can result in strange + artifacts. */ + EMT_PARALLAX_MAP_SOLID, + + //! A material like EMT_PARALLAX_MAP_SOLID, but transparent. + /** Using EMT_TRANSPARENT_ADD_COLOR as base material. */ + EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR, + + //! A material like EMT_PARALLAX_MAP_SOLID, but transparent. + /** Using EMT_TRANSPARENT_VERTEX_ALPHA as base material. */ + EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, + + //! BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC ) + /** Using only first texture. Generic blending method. */ + EMT_ONETEXTURE_BLEND, + + //! This value is not used. It only forces this enumeration to compile to 32 bit. + EMT_FORCE_32BIT = 0x7fffffff + }; + + //! Array holding the built in material type names + const char* const sBuiltInMaterialTypeNames[] = + { + "solid", + "solid_2layer", + "lightmap", + "lightmap_add", + "lightmap_m2", + "lightmap_m4", + "lightmap_light", + "lightmap_light_m2", + "lightmap_light_m4", + "detail_map", + "sphere_map", + "reflection_2layer", + "trans_add", + "trans_alphach", + "trans_alphach_ref", + "trans_vertex_alpha", + "trans_reflection_2layer", + "normalmap_solid", + "normalmap_trans_add", + "normalmap_trans_vertexalpha", + "parallaxmap_solid", + "parallaxmap_trans_add", + "parallaxmap_trans_vertexalpha", + "onetexture_blend", + 0 + }; + +} // end namespace video +} // end namespace irr + + +#endif // __E_MATERIAL_TYPES_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EMeshWriterEnums.h b/src/others/irrlicht-1.8.1/include/EMeshWriterEnums.h new file mode 100644 index 0000000..fb2cfa4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EMeshWriterEnums.h @@ -0,0 +1,59 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_MESH_WRITER_ENUMS_H_INCLUDED__ +#define __E_MESH_WRITER_ENUMS_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace scene +{ + + //! An enumeration for all supported types of built-in mesh writers + /** A scene mesh writers is represented by a four character code + such as 'irrm' or 'coll' instead of simple numbers, to avoid + name clashes with external mesh writers.*/ + enum EMESH_WRITER_TYPE + { + //! Irrlicht native mesh writer, for static .irrmesh files. + EMWT_IRR_MESH = MAKE_IRR_ID('i','r','r','m'), + + //! COLLADA mesh writer for .dae and .xml files + EMWT_COLLADA = MAKE_IRR_ID('c','o','l','l'), + + //! STL mesh writer for .stl files + EMWT_STL = MAKE_IRR_ID('s','t','l',0), + + //! OBJ mesh writer for .obj files + EMWT_OBJ = MAKE_IRR_ID('o','b','j',0), + + //! PLY mesh writer for .ply files + EMWT_PLY = MAKE_IRR_ID('p','l','y',0) + }; + + + //! flags configuring mesh writing + enum E_MESH_WRITER_FLAGS + { + //! no writer flags + EMWF_NONE = 0, + + //! write lightmap textures out if possible + EMWF_WRITE_LIGHTMAPS = 0x1, + + //! write in a way that consumes less disk space + EMWF_WRITE_COMPRESSED = 0x2, + + //! write in binary format rather than text + EMWF_WRITE_BINARY = 0x4 + }; + +} // end namespace scene +} // end namespace irr + + +#endif // __E_MESH_WRITER_ENUMS_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/EMessageBoxFlags.h b/src/others/irrlicht-1.8.1/include/EMessageBoxFlags.h new file mode 100644 index 0000000..878db7f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EMessageBoxFlags.h @@ -0,0 +1,36 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_MESSAGE_BOX_FLAGS_H_INCLUDED__ +#define __E_MESSAGE_BOX_FLAGS_H_INCLUDED__ + +namespace irr +{ +namespace gui +{ + +//! enumeration for message box layout flags +enum EMESSAGE_BOX_FLAG +{ + //! Flag for the ok button + EMBF_OK = 0x1, + + //! Flag for the cancel button + EMBF_CANCEL = 0x2, + + //! Flag for the yes button + EMBF_YES = 0x4, + + //! Flag for the no button + EMBF_NO = 0x8, + + //! This value is not used. It only forces this enumeration to compile in 32 bit. + EMBF_FORCE_32BIT = 0x7fffffff +}; + +} // namespace gui +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/EPrimitiveTypes.h b/src/others/irrlicht-1.8.1/include/EPrimitiveTypes.h new file mode 100644 index 0000000..6b082c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EPrimitiveTypes.h @@ -0,0 +1,56 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_PRIMITIVE_TYPES_H_INCLUDED__ +#define __E_PRIMITIVE_TYPES_H_INCLUDED__ + +namespace irr +{ +namespace scene +{ + + //! Enumeration for all primitive types there are. + enum E_PRIMITIVE_TYPE + { + //! All vertices are non-connected points. + EPT_POINTS=0, + + //! All vertices form a single connected line. + EPT_LINE_STRIP, + + //! Just as LINE_STRIP, but the last and the first vertex is also connected. + EPT_LINE_LOOP, + + //! Every two vertices are connected creating n/2 lines. + EPT_LINES, + + //! After the first two vertices each vertex defines a new triangle. + //! Always the two last and the new one form a new triangle. + EPT_TRIANGLE_STRIP, + + //! After the first two vertices each vertex defines a new triangle. + //! All around the common first vertex. + EPT_TRIANGLE_FAN, + + //! Explicitly set all vertices for each triangle. + EPT_TRIANGLES, + + //! After the first two vertices each further tw vetices create a quad with the preceding two. + EPT_QUAD_STRIP, + + //! Every four vertices create a quad. + EPT_QUADS, + + //! Just as LINE_LOOP, but filled. + EPT_POLYGON, + + //! The single vertices are expanded to quad billboards on the GPU. + EPT_POINT_SPRITES + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h b/src/others/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h new file mode 100644 index 0000000..d3e0936 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h @@ -0,0 +1,58 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_SCENE_NODE_ANIMATOR_TYPES_H_INCLUDED__ +#define __E_SCENE_NODE_ANIMATOR_TYPES_H_INCLUDED__ + +namespace irr +{ +namespace scene +{ + + //! An enumeration for all types of built-in scene node animators + enum ESCENE_NODE_ANIMATOR_TYPE + { + //! Fly circle scene node animator + ESNAT_FLY_CIRCLE = 0, + + //! Fly straight scene node animator + ESNAT_FLY_STRAIGHT, + + //! Follow spline scene node animator + ESNAT_FOLLOW_SPLINE, + + //! Rotation scene node animator + ESNAT_ROTATION, + + //! Texture scene node animator + ESNAT_TEXTURE, + + //! Deletion scene node animator + ESNAT_DELETION, + + //! Collision respose scene node animator + ESNAT_COLLISION_RESPONSE, + + //! FPS camera animator + ESNAT_CAMERA_FPS, + + //! Maya camera animator + ESNAT_CAMERA_MAYA, + + //! Amount of built-in scene node animators + ESNAT_COUNT, + + //! Unknown scene node animator + ESNAT_UNKNOWN, + + //! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit. + ESNAT_FORCE_32_BIT = 0x7fffffff + }; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ESceneNodeTypes.h b/src/others/irrlicht-1.8.1/include/ESceneNodeTypes.h new file mode 100644 index 0000000..a0d5aa4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ESceneNodeTypes.h @@ -0,0 +1,106 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_SCENE_NODE_TYPES_H_INCLUDED__ +#define __E_SCENE_NODE_TYPES_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace scene +{ + + //! An enumeration for all types of built-in scene nodes + /** A scene node type is represented by a four character code + such as 'cube' or 'mesh' instead of simple numbers, to avoid + name clashes with external scene nodes.*/ + enum ESCENE_NODE_TYPE + { + //! of type CSceneManager (note that ISceneManager is not(!) an ISceneNode) + ESNT_SCENE_MANAGER = MAKE_IRR_ID('s','m','n','g'), + + //! simple cube scene node + ESNT_CUBE = MAKE_IRR_ID('c','u','b','e'), + + //! Sphere scene node + ESNT_SPHERE = MAKE_IRR_ID('s','p','h','r'), + + //! Text Scene Node + ESNT_TEXT = MAKE_IRR_ID('t','e','x','t'), + + //! Water Surface Scene Node + ESNT_WATER_SURFACE = MAKE_IRR_ID('w','a','t','r'), + + //! Terrain Scene Node + ESNT_TERRAIN = MAKE_IRR_ID('t','e','r','r'), + + //! Sky Box Scene Node + ESNT_SKY_BOX = MAKE_IRR_ID('s','k','y','_'), + + //! Sky Dome Scene Node + ESNT_SKY_DOME = MAKE_IRR_ID('s','k','y','d'), + + //! Shadow Volume Scene Node + ESNT_SHADOW_VOLUME = MAKE_IRR_ID('s','h','d','w'), + + //! Octree Scene Node + ESNT_OCTREE = MAKE_IRR_ID('o','c','t','r'), + + //! Mesh Scene Node + ESNT_MESH = MAKE_IRR_ID('m','e','s','h'), + + //! Light Scene Node + ESNT_LIGHT = MAKE_IRR_ID('l','g','h','t'), + + //! Empty Scene Node + ESNT_EMPTY = MAKE_IRR_ID('e','m','t','y'), + + //! Dummy Transformation Scene Node + ESNT_DUMMY_TRANSFORMATION = MAKE_IRR_ID('d','m','m','y'), + + //! Camera Scene Node + ESNT_CAMERA = MAKE_IRR_ID('c','a','m','_'), + + //! Billboard Scene Node + ESNT_BILLBOARD = MAKE_IRR_ID('b','i','l','l'), + + //! Animated Mesh Scene Node + ESNT_ANIMATED_MESH = MAKE_IRR_ID('a','m','s','h'), + + //! Particle System Scene Node + ESNT_PARTICLE_SYSTEM = MAKE_IRR_ID('p','t','c','l'), + + //! Quake3 Shader Scene Node + ESNT_Q3SHADER_SCENE_NODE = MAKE_IRR_ID('q','3','s','h'), + + //! Quake3 Model Scene Node ( has tag to link to ) + ESNT_MD3_SCENE_NODE = MAKE_IRR_ID('m','d','3','_'), + + //! Volume Light Scene Node + ESNT_VOLUME_LIGHT = MAKE_IRR_ID('v','o','l','l'), + + //! Maya Camera Scene Node + /** Legacy, for loading version <= 1.4.x .irr files */ + ESNT_CAMERA_MAYA = MAKE_IRR_ID('c','a','m','M'), + + //! First Person Shooter Camera + /** Legacy, for loading version <= 1.4.x .irr files */ + ESNT_CAMERA_FPS = MAKE_IRR_ID('c','a','m','F'), + + //! Unknown scene node + ESNT_UNKNOWN = MAKE_IRR_ID('u','n','k','n'), + + //! Will match with any scene node when checking types + ESNT_ANY = MAKE_IRR_ID('a','n','y','_') + }; + + + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/EShaderTypes.h b/src/others/irrlicht-1.8.1/include/EShaderTypes.h new file mode 100644 index 0000000..29eef56 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/EShaderTypes.h @@ -0,0 +1,90 @@ +#ifndef __E_SHADER_TYPES_H_INCLUDED__ +#define __E_SHADER_TYPES_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace video +{ + +//! Compile target enumeration for the addHighLevelShaderMaterial() method. +enum E_VERTEX_SHADER_TYPE +{ + EVST_VS_1_1 = 0, + EVST_VS_2_0, + EVST_VS_2_a, + EVST_VS_3_0, + EVST_VS_4_0, + EVST_VS_4_1, + EVST_VS_5_0, + + //! This is not a type, but a value indicating how much types there are. + EVST_COUNT +}; + +//! Names for all vertex shader types, each entry corresponds to a E_VERTEX_SHADER_TYPE entry. +const c8* const VERTEX_SHADER_TYPE_NAMES[] = { + "vs_1_1", + "vs_2_0", + "vs_2_a", + "vs_3_0", + "vs_4_0", + "vs_4_1", + "vs_5_0", + 0 }; + +//! Compile target enumeration for the addHighLevelShaderMaterial() method. +enum E_PIXEL_SHADER_TYPE +{ + EPST_PS_1_1 = 0, + EPST_PS_1_2, + EPST_PS_1_3, + EPST_PS_1_4, + EPST_PS_2_0, + EPST_PS_2_a, + EPST_PS_2_b, + EPST_PS_3_0, + EPST_PS_4_0, + EPST_PS_4_1, + EPST_PS_5_0, + + //! This is not a type, but a value indicating how much types there are. + EPST_COUNT +}; + +//! Names for all pixel shader types, each entry corresponds to a E_PIXEL_SHADER_TYPE entry. +const c8* const PIXEL_SHADER_TYPE_NAMES[] = { + "ps_1_1", + "ps_1_2", + "ps_1_3", + "ps_1_4", + "ps_2_0", + "ps_2_a", + "ps_2_b", + "ps_3_0", + "ps_4_0", + "ps_4_1", + "ps_5_0", + 0 }; + +//! Enum for supported geometry shader types +enum E_GEOMETRY_SHADER_TYPE +{ + EGST_GS_4_0 = 0, + + //! This is not a type, but a value indicating how much types there are. + EGST_COUNT +}; + +//! String names for supported geometry shader types +const c8* const GEOMETRY_SHADER_TYPE_NAMES[] = { + "gs_4_0", + 0 }; + + +} // end namespace video +} // end namespace irr + +#endif // __E_SHADER_TYPES_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/ETerrainElements.h b/src/others/irrlicht-1.8.1/include/ETerrainElements.h new file mode 100644 index 0000000..5bb48c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ETerrainElements.h @@ -0,0 +1,36 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_TERRAIN_ELEMENTS_H__ +#define __E_TERRAIN_ELEMENTS_H__ + +namespace irr +{ +namespace scene +{ + + //! enumeration for patch sizes specifying the size of patches in the TerrainSceneNode + enum E_TERRAIN_PATCH_SIZE + { + //! patch size of 9, at most, use 4 levels of detail with this patch size. + ETPS_9 = 9, + + //! patch size of 17, at most, use 5 levels of detail with this patch size. + ETPS_17 = 17, + + //! patch size of 33, at most, use 6 levels of detail with this patch size. + ETPS_33 = 33, + + //! patch size of 65, at most, use 7 levels of detail with this patch size. + ETPS_65 = 65, + + //! patch size of 129, at most, use 8 levels of detail with this patch size. + ETPS_129 = 129 + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IAnimatedMesh.h b/src/others/irrlicht-1.8.1/include/IAnimatedMesh.h new file mode 100644 index 0000000..3e08528 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IAnimatedMesh.h @@ -0,0 +1,115 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ANIMATED_MESH_H_INCLUDED__ +#define __I_ANIMATED_MESH_H_INCLUDED__ + +#include "aabbox3d.h" +#include "IMesh.h" + +namespace irr +{ +namespace scene +{ + //! Possible types of (animated) meshes. + enum E_ANIMATED_MESH_TYPE + { + //! Unknown animated mesh type. + EAMT_UNKNOWN = 0, + + //! Quake 2 MD2 model file + EAMT_MD2, + + //! Quake 3 MD3 model file + EAMT_MD3, + + //! Maya .obj static model + EAMT_OBJ, + + //! Quake 3 .bsp static Map + EAMT_BSP, + + //! 3D Studio .3ds file + EAMT_3DS, + + //! My3D Mesh, the file format by Zhuck Dimitry + EAMT_MY3D, + + //! Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen + EAMT_LMTS, + + //! Cartography Shop .csm file. This loader was created by Saurav Mohapatra. + EAMT_CSM, + + //! .oct file for Paul Nette's FSRad or from Murphy McCauley's Blender .oct exporter. + /** The oct file format contains 3D geometry and lightmaps and + can be loaded directly by Irrlicht */ + EAMT_OCT, + + //! Halflife MDL model file + EAMT_MDL_HALFLIFE, + + //! generic skinned mesh + EAMT_SKINNED + }; + + //! Interface for an animated mesh. + /** There are already simple implementations of this interface available so + you don't have to implement this interface on your own if you need to: + You might want to use irr::scene::SAnimatedMesh, irr::scene::SMesh, + irr::scene::SMeshBuffer etc. */ + class IAnimatedMesh : public IMesh + { + public: + + //! Gets the frame count of the animated mesh. + /** \return The amount of frames. If the amount is 1, + it is a static, non animated mesh. */ + virtual u32 getFrameCount() const = 0; + + //! Gets the animation speed of the animated mesh. + /** \return The number of frames per second to play the + animation with by default. If the amount is 0, + it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const = 0; + + //! Sets the animation speed of the animated mesh. + /** \param fps Number of frames per second to play the + animation with by default. If the amount is 0, + it is not animated. The actual speed is set in the + scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps) =0; + + //! Returns the IMesh interface for a frame. + /** \param frame: Frame number as zero based index. The maximum + frame number is getFrameCount() - 1; + \param detailLevel: Level of detail. 0 is the lowest, 255 the + highest level of detail. Most meshes will ignore the detail level. + \param startFrameLoop: Because some animated meshes (.MD2) are + blended between 2 static frames, and maybe animated in a loop, + the startFrameLoop and the endFrameLoop have to be defined, to + prevent the animation to be blended between frames which are + outside of this loop. + If startFrameLoop and endFrameLoop are both -1, they are ignored. + \param endFrameLoop: see startFrameLoop. + \return Returns the animated mesh based on a detail level. */ + virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0; + + //! Returns the type of the animated mesh. + /** In most cases it is not neccessary to use this method. + This is useful for making a safe downcast. For example, + if getMeshType() returns EAMT_MD2 it's safe to cast the + IAnimatedMesh to IAnimatedMeshMD2. + \returns Type of the mesh. */ + virtual E_ANIMATED_MESH_TYPE getMeshType() const + { + return EAMT_UNKNOWN; + } + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IAnimatedMeshMD2.h b/src/others/irrlicht-1.8.1/include/IAnimatedMeshMD2.h new file mode 100644 index 0000000..6830f37 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IAnimatedMeshMD2.h @@ -0,0 +1,79 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ANIMATED_MESH_MD2_H_INCLUDED__ +#define __I_ANIMATED_MESH_MD2_H_INCLUDED__ + +#include "IAnimatedMesh.h" + +namespace irr +{ +namespace scene +{ + + //! Types of standard md2 animations + enum EMD2_ANIMATION_TYPE + { + EMAT_STAND = 0, + EMAT_RUN, + EMAT_ATTACK, + EMAT_PAIN_A, + EMAT_PAIN_B, + EMAT_PAIN_C, + EMAT_JUMP, + EMAT_FLIP, + EMAT_SALUTE, + EMAT_FALLBACK, + EMAT_WAVE, + EMAT_POINT, + EMAT_CROUCH_STAND, + EMAT_CROUCH_WALK, + EMAT_CROUCH_ATTACK, + EMAT_CROUCH_PAIN, + EMAT_CROUCH_DEATH, + EMAT_DEATH_FALLBACK, + EMAT_DEATH_FALLFORWARD, + EMAT_DEATH_FALLBACKSLOW, + EMAT_BOOM, + + //! Not an animation, but amount of animation types. + EMAT_COUNT + }; + + //! Interface for using some special functions of MD2 meshes + class IAnimatedMeshMD2 : public IAnimatedMesh + { + public: + + //! Get frame loop data for a default MD2 animation type. + /** \param l The EMD2_ANIMATION_TYPE to get the frames for. + \param outBegin The returned beginning frame for animation type specified. + \param outEnd The returned ending frame for the animation type specified. + \param outFPS The number of frames per second, this animation should be played at. + \return beginframe, endframe and frames per second for a default MD2 animation type. */ + virtual void getFrameLoop(EMD2_ANIMATION_TYPE l, s32& outBegin, + s32& outEnd, s32& outFPS) const = 0; + + //! Get frame loop data for a special MD2 animation type, identified by name. + /** \param name Name of the animation. + \param outBegin The returned beginning frame for animation type specified. + \param outEnd The returned ending frame for the animation type specified. + \param outFPS The number of frames per second, this animation should be played at. + \return beginframe, endframe and frames per second for a special MD2 animation type. */ + virtual bool getFrameLoop(const c8* name, + s32& outBegin, s32& outEnd, s32& outFPS) const = 0; + + //! Get amount of md2 animations in this file. + virtual s32 getAnimationCount() const = 0; + + //! Get name of md2 animation. + /** \param nr: Zero based index of animation. */ + virtual const c8* getAnimationName(s32 nr) const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IAnimatedMeshMD3.h b/src/others/irrlicht-1.8.1/include/IAnimatedMeshMD3.h new file mode 100644 index 0000000..35c1c97 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IAnimatedMeshMD3.h @@ -0,0 +1,304 @@ +// Copyright (C) 2007-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ANIMATED_MESH_MD3_H_INCLUDED__ +#define __I_ANIMATED_MESH_MD3_H_INCLUDED__ + +#include "IAnimatedMesh.h" +#include "IQ3Shader.h" +#include "quaternion.h" + +namespace irr +{ +namespace scene +{ + + enum eMD3Models + { + EMD3_HEAD = 0, + EMD3_UPPER, + EMD3_LOWER, + EMD3_WEAPON, + EMD3_NUMMODELS + }; + + //! Animation list + enum EMD3_ANIMATION_TYPE + { + // Animations for both lower and upper parts of the player + EMD3_BOTH_DEATH_1 = 0, + EMD3_BOTH_DEAD_1, + EMD3_BOTH_DEATH_2, + EMD3_BOTH_DEAD_2, + EMD3_BOTH_DEATH_3, + EMD3_BOTH_DEAD_3, + + // Animations for the upper part + EMD3_TORSO_GESTURE, + EMD3_TORSO_ATTACK_1, + EMD3_TORSO_ATTACK_2, + EMD3_TORSO_DROP, + EMD3_TORSO_RAISE, + EMD3_TORSO_STAND_1, + EMD3_TORSO_STAND_2, + + // Animations for the lower part + EMD3_LEGS_WALK_CROUCH, + EMD3_LEGS_WALK, + EMD3_LEGS_RUN, + EMD3_LEGS_BACK, + EMD3_LEGS_SWIM, + EMD3_LEGS_JUMP_1, + EMD3_LEGS_LAND_1, + EMD3_LEGS_JUMP_2, + EMD3_LEGS_LAND_2, + EMD3_LEGS_IDLE, + EMD3_LEGS_IDLE_CROUCH, + EMD3_LEGS_TURN, + + //! Not an animation, but amount of animation types. + EMD3_ANIMATION_COUNT + }; + + struct SMD3AnimationInfo + { + //! First frame + s32 first; + //! Last frame + s32 num; + //! Looping frames + s32 looping; + //! Frames per second + s32 fps; + }; + + +// byte-align structures +#include "irrpack.h" + + //! this holds the header info of the MD3 file + struct SMD3Header + { + c8 headerID[4]; //id of file, always "IDP3" + s32 Version; //this is a version number, always 15 + s8 fileName[68]; //sometimes left Blank... 65 chars, 32bit aligned == 68 chars + s32 numFrames; //number of KeyFrames + s32 numTags; //number of 'tags' per frame + s32 numMeshes; //number of meshes/skins + s32 numMaxSkins; //maximum number of unique skins used in md3 file. artefact md2 + s32 frameStart; //starting position of frame-structur + s32 tagStart; //starting position of tag-structures + s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures + s32 fileSize; + } PACK_STRUCT; + + //! this holds the header info of an MD3 mesh section + struct SMD3MeshHeader + { + c8 meshID[4]; //id, must be IDP3 + c8 meshName[68]; //name of mesh 65 chars, 32 bit aligned == 68 chars + + s32 numFrames; //number of meshframes in mesh + s32 numShader; //number of skins in mesh + s32 numVertices; //number of vertices + s32 numTriangles; //number of Triangles + + s32 offset_triangles; //starting position of Triangle data, relative to start of Mesh_Header + s32 offset_shaders; //size of header + s32 offset_st; //starting position of texvector data, relative to start of Mesh_Header + s32 vertexStart; //starting position of vertex data,relative to start of Mesh_Header + s32 offset_end; + } PACK_STRUCT; + + + //! Compressed Vertex Data + struct SMD3Vertex + { + s16 position[3]; + u8 normal[2]; + } PACK_STRUCT; + + //! Texture Coordinate + struct SMD3TexCoord + { + f32 u; + f32 v; + } PACK_STRUCT; + + //! Triangle Index + struct SMD3Face + { + s32 Index[3]; + } PACK_STRUCT; + + +// Default alignment +#include "irrunpack.h" + + //! Holding Frame Data for a Mesh + struct SMD3MeshBuffer : public IReferenceCounted + { + SMD3MeshHeader MeshHeader; + + core::stringc Shader; + core::array < s32 > Indices; + core::array < SMD3Vertex > Vertices; + core::array < SMD3TexCoord > Tex; + }; + + //! hold a tag info for connecting meshes + /** Basically its an alternate way to describe a transformation. */ + struct SMD3QuaternionTag + { + virtual ~SMD3QuaternionTag() + { + position.X = 0.f; + } + + // construct copy constructor + SMD3QuaternionTag( const SMD3QuaternionTag & copyMe ) + { + *this = copyMe; + } + + // construct for searching + SMD3QuaternionTag( const core::stringc& name ) + : Name ( name ) {} + + // construct from a position and euler angles in degrees + SMD3QuaternionTag ( const core::vector3df &pos, const core::vector3df &angle ) + : position(pos), rotation(angle * core::DEGTORAD) {} + + // set to matrix + void setto ( core::matrix4 &m ) + { + rotation.getMatrix ( m, position ); + } + + bool operator == ( const SMD3QuaternionTag &other ) const + { + return Name == other.Name; + } + + SMD3QuaternionTag & operator=( const SMD3QuaternionTag & copyMe ) + { + Name = copyMe.Name; + position = copyMe.position; + rotation = copyMe.rotation; + return *this; + } + + core::stringc Name; + core::vector3df position; + core::quaternion rotation; + }; + + //! holds a associative list of named quaternions + struct SMD3QuaternionTagList + { + SMD3QuaternionTagList() + { + Container.setAllocStrategy(core::ALLOC_STRATEGY_SAFE); + } + + // construct copy constructor + SMD3QuaternionTagList(const SMD3QuaternionTagList& copyMe) + { + *this = copyMe; + } + + virtual ~SMD3QuaternionTagList() {} + + SMD3QuaternionTag* get(const core::stringc& name) + { + SMD3QuaternionTag search ( name ); + s32 index = Container.linear_search ( search ); + if ( index >= 0 ) + return &Container[index]; + return 0; + } + + u32 size () const + { + return Container.size(); + } + + void set_used(u32 new_size) + { + s32 diff = (s32) new_size - (s32) Container.allocated_size(); + if ( diff > 0 ) + { + SMD3QuaternionTag e(""); + for ( s32 i = 0; i < diff; ++i ) + Container.push_back(e); + } + } + + const SMD3QuaternionTag& operator[](u32 index) const + { + return Container[index]; + } + + SMD3QuaternionTag& operator[](u32 index) + { + return Container[index]; + } + + void push_back(const SMD3QuaternionTag& other) + { + Container.push_back(other); + } + + SMD3QuaternionTagList& operator = (const SMD3QuaternionTagList & copyMe) + { + Container = copyMe.Container; + return *this; + } + + private: + core::array < SMD3QuaternionTag > Container; + }; + + + //! Holding Frames Buffers and Tag Infos + struct SMD3Mesh: public IReferenceCounted + { + SMD3Mesh () + { + MD3Header.numFrames = 0; + } + + virtual ~SMD3Mesh() + { + for (u32 i=0; idrop(); + } + + core::stringc Name; + core::array Buffer; + SMD3QuaternionTagList TagList; + SMD3Header MD3Header; + }; + + + //! Interface for using some special functions of MD3 meshes + class IAnimatedMeshMD3 : public IAnimatedMesh + { + public: + + //! tune how many frames you want to render inbetween. + virtual void setInterpolationShift(u32 shift, u32 loopMode) =0; + + //! get the tag list of the mesh. + virtual SMD3QuaternionTagList* getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) =0; + + //! get the original md3 mesh. + virtual SMD3Mesh* getOriginalMesh() =0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h b/src/others/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h new file mode 100644 index 0000000..84d25a2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h @@ -0,0 +1,228 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ +#define __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "IBoneSceneNode.h" +#include "IAnimatedMeshMD2.h" +#include "IAnimatedMeshMD3.h" + +namespace irr +{ +namespace scene +{ + class IShadowVolumeSceneNode; + + enum E_JOINT_UPDATE_ON_RENDER + { + //! do nothing + EJUOR_NONE = 0, + + //! get joints positions from the mesh (for attached nodes, etc) + EJUOR_READ, + + //! control joint positions in the mesh (eg. ragdolls, or set the animation from animateJoints() ) + EJUOR_CONTROL + }; + + + class IAnimatedMeshSceneNode; + + //! Callback interface for catching events of ended animations. + /** Implement this interface and use + IAnimatedMeshSceneNode::setAnimationEndCallback to be able to + be notified if an animation playback has ended. + **/ + class IAnimationEndCallBack : public virtual IReferenceCounted + { + public: + + //! Will be called when the animation playback has ended. + /** See IAnimatedMeshSceneNode::setAnimationEndCallback for + more informations. + \param node: Node of which the animation has ended. */ + virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0; + }; + + //! Scene node capable of displaying an animated mesh and its shadow. + /** The shadow is optional: If a shadow should be displayed too, just + invoke the IAnimatedMeshSceneNode::createShadowVolumeSceneNode().*/ + class IAnimatedMeshSceneNode : public ISceneNode + { + public: + + //! Constructor + IAnimatedMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) + : ISceneNode(parent, mgr, id, position, rotation, scale) {} + + //! Destructor + virtual ~IAnimatedMeshSceneNode() {} + + //! Sets the current frame number. + /** From now on the animation is played from this frame. + \param frame: Number of the frame to let the animation be started from. + The frame number must be a valid frame number of the IMesh used by this + scene node. Set IAnimatedMesh::getMesh() for details. */ + virtual void setCurrentFrame(f32 frame) = 0; + + //! Sets the frame numbers between the animation is looped. + /** The default is 0 - MaximalFrameCount of the mesh. + \param begin: Start frame number of the loop. + \param end: End frame number of the loop. + \return True if successful, false if not. */ + virtual bool setFrameLoop(s32 begin, s32 end) = 0; + + //! Sets the speed with which the animation is played. + /** \param framesPerSecond: Frames per second played. */ + virtual void setAnimationSpeed(f32 framesPerSecond) = 0; + + //! Gets the speed with which the animation is played. + /** \return Frames per second played. */ + virtual f32 getAnimationSpeed() const =0; + + //! Creates shadow volume scene node as child of this node. + /** The shadow can be rendered using the ZPass or the zfail + method. ZPass is a little bit faster because the shadow volume + creation is easier, but with this method there occur ugly + looking artifacs when the camera is inside the shadow volume. + These error do not occur with the ZFail method. + \param shadowMesh: Optional custom mesh for shadow volume. + \param id: Id of the shadow scene node. This id can be used to + identify the node later. + \param zfailmethod: If set to true, the shadow will use the + zfail method, if not, zpass is used. + \param infinity: Value used by the shadow volume algorithm to + scale the shadow volume (for zfail shadow volume we support only + finite shadows, so camera zfar must be larger than shadow back cap, + which is depend on infinity parameter). + \return Pointer to the created shadow scene node. This pointer + should not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0, + s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0; + + + //! Get a pointer to a joint in the mesh (if the mesh is a bone based mesh). + /** With this method it is possible to attach scene nodes to + joints for example possible to attach a weapon to the left hand + of an animated model. This example shows how: + \code + ISceneNode* hand = + yourAnimatedMeshSceneNode->getJointNode("LeftHand"); + hand->addChild(weaponSceneNode); + \endcode + Please note that the joint returned by this method may not exist + before this call and the joints in the node were created by it. + \param jointName: Name of the joint. + \return Pointer to the scene node which represents the joint + with the specified name. Returns 0 if the contained mesh is not + an skinned mesh or the name of the joint could not be found. */ + virtual IBoneSceneNode* getJointNode(const c8* jointName)=0; + + //! same as getJointNode(const c8* jointName), but based on id + virtual IBoneSceneNode* getJointNode(u32 jointID) = 0; + + //! Gets joint count. + /** \return Amount of joints in the mesh. */ + virtual u32 getJointCount() const = 0; + + //! Starts a default MD2 animation. + /** With this method it is easily possible to start a Run, + Attack, Die or whatever animation, if the mesh contained in + this scene node is an md2 mesh. Otherwise, nothing happens. + \param anim: An MD2 animation type, which should be played, for + example EMAT_STAND for the standing animation. + \return True if successful, and false if not, for example if + the mesh in the scene node is not a md2 mesh. */ + virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim) = 0; + + //! Starts a special MD2 animation. + /** With this method it is easily possible to start a Run, + Attack, Die or whatever animation, if the mesh contained in + this scene node is an md2 mesh. Otherwise, nothing happens. + This method uses a character string to identify the animation. + If the animation is a standard md2 animation, you might want to + start this animation with the EMD2_ANIMATION_TYPE enumeration + instead. + \param animationName: Name of the animation which should be + played. + \return Returns true if successful, and false if not, for + example if the mesh in the scene node is not an md2 mesh, or no + animation with this name could be found. */ + virtual bool setMD2Animation(const c8* animationName) = 0; + + //! Returns the currently displayed frame number. + virtual f32 getFrameNr() const = 0; + //! Returns the current start frame number. + virtual s32 getStartFrame() const = 0; + //! Returns the current end frame number. + virtual s32 getEndFrame() const = 0; + + //! Sets looping mode which is on by default. + /** If set to false, animations will not be played looped. */ + virtual void setLoopMode(bool playAnimationLooped) = 0; + + //! returns the current loop mode + /** When true the animations are played looped */ + virtual bool getLoopMode() const = 0; + + //! Sets a callback interface which will be called if an animation playback has ended. + /** Set this to 0 to disable the callback again. + Please note that this will only be called when in non looped + mode, see IAnimatedMeshSceneNode::setLoopMode(). */ + virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0) = 0; + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + /** In this way it is possible to change the materials a mesh + causing all mesh scene nodes referencing this mesh to change + too. */ + virtual void setReadOnlyMaterials(bool readonly) = 0; + + //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style + virtual bool isReadOnlyMaterials() const = 0; + + //! Sets a new mesh + virtual void setMesh(IAnimatedMesh* mesh) = 0; + + //! Returns the current mesh + virtual IAnimatedMesh* getMesh(void) = 0; + + //! Get the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, or the absolutetransformation if it's a normal scenenode + virtual const SMD3QuaternionTag* getMD3TagTransformation( const core::stringc & tagname) = 0; + + //! Set how the joints should be updated on render + virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0; + + //! Sets the transition time in seconds + /** Note: This needs to enable joints, and setJointmode set to + EJUOR_CONTROL. You must call animateJoints(), or the mesh will + not animate. */ + virtual void setTransitionTime(f32 Time) =0; + + //! animates the joints in the mesh based on the current frame. + /** Also takes in to account transitions. */ + virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0; + + //! render mesh ignoring its transformation. + /** Culling is unaffected. */ + virtual void setRenderFromIdentity( bool On )=0; + + //! Creates a clone of this scene node and its children. + /** \param newParent An optional new parent. + \param newManager An optional new scene manager. + \return The newly created clone of this node. */ + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) = 0; + + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IAttributeExchangingObject.h b/src/others/irrlicht-1.8.1/include/IAttributeExchangingObject.h new file mode 100644 index 0000000..5b13cdb --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IAttributeExchangingObject.h @@ -0,0 +1,71 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__ +#define __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__ + +#include "IReferenceCounted.h" + + +namespace irr +{ + +namespace io +{ + +class IAttributes; + +//! Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object +enum E_ATTRIBUTE_READ_WRITE_FLAGS +{ + //! Serialization/Deserializion is done for an xml file + EARWF_FOR_FILE = 0x00000001, + + //! Serialization/Deserializion is done for an editor property box + EARWF_FOR_EDITOR = 0x00000002, + + //! When writing filenames, relative paths should be used + EARWF_USE_RELATIVE_PATHS = 0x00000004 +}; + + +//! struct holding data describing options +struct SAttributeReadWriteOptions +{ + //! Constructor + SAttributeReadWriteOptions() + : Flags(0), Filename(0) + { + } + + //! Combination of E_ATTRIBUTE_READ_WRITE_FLAGS or other, custom ones + s32 Flags; + + //! Optional filename + const fschar_t* Filename; +}; + + +//! An object which is able to serialize and deserialize its attributes into an attributes object +class IAttributeExchangingObject : virtual public IReferenceCounted +{ +public: + + //! Writes attributes of the object. + /** Implement this to expose the attributes of your scene node animator for + scripting languages, editors, debuggers or xml serialization purposes. */ + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {} + + //! Reads attributes of the object. + /** Implement this to set the attributes of your scene node animator for + scripting languages, editors, debuggers or xml deserialization purposes. */ + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) {} + +}; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IAttributes.h b/src/others/irrlicht-1.8.1/include/IAttributes.h new file mode 100644 index 0000000..f137635 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IAttributes.h @@ -0,0 +1,738 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ATTRIBUTES_H_INCLUDED__ +#define __I_ATTRIBUTES_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "SColor.h" +#include "vector3d.h" +#include "vector2d.h" +#include "line2d.h" +#include "line3d.h" +#include "triangle3d.h" +#include "position2d.h" +#include "rect.h" +#include "dimension2d.h" +#include "matrix4.h" +#include "quaternion.h" +#include "plane3d.h" +#include "triangle3d.h" +#include "line2d.h" +#include "line3d.h" +#include "irrString.h" +#include "irrArray.h" +#include "IXMLReader.h" +#include "EAttributes.h" +#include "path.h" + +namespace irr +{ +namespace video +{ + class ITexture; +} // end namespace video +namespace io +{ + class IXMLWriter; + +//! Provides a generic interface for attributes and their values and the possiblity to serialize them +class IAttributes : public virtual IReferenceCounted +{ +public: + + //! Returns amount of attributes in this collection of attributes. + virtual u32 getAttributeCount() const = 0; + + //! Returns attribute name by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual const c8* getAttributeName(s32 index) = 0; + + //! Returns the type of an attribute + //! \param attributeName: Name for the attribute + virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) = 0; + + //! Returns attribute type by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) = 0; + + //! Returns the type string of the attribute + //! \param attributeName: String for the attribute type + virtual const wchar_t* getAttributeTypeString(const c8* attributeName) = 0; + + //! Returns the type string of the attribute by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual const wchar_t* getAttributeTypeString(s32 index) = 0; + + //! Returns if an attribute with a name exists + virtual bool existsAttribute(const c8* attributeName) = 0; + + //! Returns attribute index from name, -1 if not found + virtual s32 findAttribute(const c8* attributeName) const =0; + + //! Removes all attributes + virtual void clear() = 0; + + //! Reads attributes from a xml file. + //! \param reader The XML reader to read from + //! \param readCurrentElementOnly If set to true, reading only works if current element has the name 'attributes' or + //! the name specified using elementName. + //! \param elementName The surrounding element name. If it is null, the default one, "attributes" will be taken. + //! If set to false, the first appearing list of attributes are read. + virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false, const wchar_t* elementName=0) = 0; + + //! Write these attributes into a xml file + //! \param writer: The XML writer to write to + //! \param writeXMLHeader: Writes a header to the XML file, required if at the beginning of the file + //! \param elementName: The surrounding element name. If it is null, the default one, "attributes" will be taken. + virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* elementName=0) = 0; + + + /* + + Integer Attribute + + */ + + //! Adds an attribute as integer + virtual void addInt(const c8* attributeName, s32 value) = 0; + + //! Sets an attribute as integer value + virtual void setAttribute(const c8* attributeName, s32 value) = 0; + + //! Gets an attribute as integer value + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual s32 getAttributeAsInt(const c8* attributeName) const =0; + + //! Gets an attribute as integer value + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual s32 getAttributeAsInt(s32 index) const =0; + + //! Sets an attribute as integer value + virtual void setAttribute(s32 index, s32 value) = 0; + + /* + + Float Attribute + + */ + + //! Adds an attribute as float + virtual void addFloat(const c8* attributeName, f32 value) = 0; + + //! Sets a attribute as float value + virtual void setAttribute(const c8* attributeName, f32 value) = 0; + + //! Gets an attribute as float value + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual f32 getAttributeAsFloat(const c8* attributeName) = 0; + + //! Gets an attribute as float value + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual f32 getAttributeAsFloat(s32 index) = 0; + + //! Sets an attribute as float value + virtual void setAttribute(s32 index, f32 value) = 0; + + /* + + String Attribute + + */ + + //! Adds an attribute as string + virtual void addString(const c8* attributeName, const c8* value) = 0; + + //! Sets an attribute value as string. + //! \param attributeName: Name for the attribute + //! \param value: Value for the attribute. Set this to 0 to delete the attribute + virtual void setAttribute(const c8* attributeName, const c8* value) = 0; + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + //! or 0 if attribute is not set. + virtual core::stringc getAttributeAsString(const c8* attributeName) = 0; + + //! Gets an attribute as string. + //! \param attributeName Name of the attribute to get. + //! \param target Buffer where the string is copied to. + virtual void getAttributeAsString(const c8* attributeName, c8* target) = 0; + + //! Returns attribute value as string by index. + //! \param index Index value, must be between 0 and getAttributeCount()-1. + virtual core::stringc getAttributeAsString(s32 index) = 0; + + //! Sets an attribute value as string. + //! \param index Index value, must be between 0 and getAttributeCount()-1. + //! \param value String to which the attribute is set. + virtual void setAttribute(s32 index, const c8* value) = 0; + + // wide strings + + //! Adds an attribute as string + virtual void addString(const c8* attributeName, const wchar_t* value) = 0; + + //! Sets an attribute value as string. + //! \param attributeName: Name for the attribute + //! \param value: Value for the attribute. Set this to 0 to delete the attribute + virtual void setAttribute(const c8* attributeName, const wchar_t* value) = 0; + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + //! or 0 if attribute is not set. + virtual core::stringw getAttributeAsStringW(const c8* attributeName) = 0; + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \param target: Buffer where the string is copied to. + virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) = 0; + + //! Returns attribute value as string by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::stringw getAttributeAsStringW(s32 index) = 0; + + //! Sets an attribute value as string. + //! \param index Index value, must be between 0 and getAttributeCount()-1. + //! \param value String to which the attribute is set. + virtual void setAttribute(s32 index, const wchar_t* value) = 0; + + /* + + Binary Data Attribute + + */ + + //! Adds an attribute as binary data + virtual void addBinary(const c8* attributeName, void* data, s32 dataSizeInBytes) = 0; + + //! Sets an attribute as binary data + virtual void setAttribute(const c8* attributeName, void* data, s32 dataSizeInBytes ) = 0; + + //! Gets an attribute as binary data + /** \param attributeName: Name of the attribute to get. + \param outData Pointer to buffer where data shall be stored. + \param maxSizeInBytes Maximum number of bytes to write into outData. + */ + virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) = 0; + + //! Gets an attribute as binary data + /** \param index: Index value, must be between 0 and getAttributeCount()-1. + \param outData Pointer to buffer where data shall be stored. + \param maxSizeInBytes Maximum number of bytes to write into outData. + */ + virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) = 0; + + //! Sets an attribute as binary data + virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes ) = 0; + + + /* + Array Attribute + */ + + //! Adds an attribute as wide string array + virtual void addArray(const c8* attributeName, const core::array& value) = 0; + + //! Sets an attribute value as a wide string array. + //! \param attributeName: Name for the attribute + //! \param value: Value for the attribute. Set this to 0 to delete the attribute + virtual void setAttribute(const c8* attributeName, const core::array& value) = 0; + + //! Gets an attribute as an array of wide strings. + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + //! or 0 if attribute is not set. + virtual core::array getAttributeAsArray(const c8* attributeName) = 0; + + //! Returns attribute value as an array of wide strings by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::array getAttributeAsArray(s32 index) = 0; + + //! Sets an attribute as an array of wide strings + virtual void setAttribute(s32 index, const core::array& value) = 0; + + + /* + + Bool Attribute + + */ + + //! Adds an attribute as bool + virtual void addBool(const c8* attributeName, bool value) = 0; + + //! Sets an attribute as boolean value + virtual void setAttribute(const c8* attributeName, bool value) = 0; + + //! Gets an attribute as boolean value + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual bool getAttributeAsBool(const c8* attributeName) = 0; + + //! Gets an attribute as boolean value + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual bool getAttributeAsBool(s32 index) = 0; + + //! Sets an attribute as boolean value + virtual void setAttribute(s32 index, bool value) = 0; + + /* + + Enumeration Attribute + + */ + + //! Adds an attribute as enum + virtual void addEnum(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals) = 0; + + //! Adds an attribute as enum + virtual void addEnum(const c8* attributeName, s32 enumValue, const c8* const* enumerationLiterals) = 0; + + //! Sets an attribute as enumeration + virtual void setAttribute(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals) = 0; + + //! Gets an attribute as enumeration + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual const c8* getAttributeAsEnumeration(const c8* attributeName) = 0; + + //! Gets an attribute as enumeration + /** \param attributeName: Name of the attribute to get. + \param enumerationLiteralsToUse: Use these enumeration literals to get + the index value instead of the set ones. This is useful when the + attribute list maybe was read from an xml file, and only contains the + enumeration string, but no information about its index. + \return Returns value of the attribute previously set by setAttribute() + */ + virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) = 0; + + //! Gets an attribute as enumeration + /** \param index: Index value, must be between 0 and getAttributeCount()-1. + \param enumerationLiteralsToUse: Use these enumeration literals to get + the index value instead of the set ones. This is useful when the + attribute list maybe was read from an xml file, and only contains the + enumeration string, but no information about its index. + \return Returns value of the attribute previously set by setAttribute() + */ + virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) = 0; + + //! Gets an attribute as enumeration + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual const c8* getAttributeAsEnumeration(s32 index) = 0; + + //! Gets the list of enumeration literals of an enumeration attribute + //! \param attributeName Name of the attribute to get. + //! \param outLiterals Set of strings to choose the enum name from. + virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array& outLiterals) = 0; + + //! Gets the list of enumeration literals of an enumeration attribute + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + //! \param outLiterals Set of strings to choose the enum name from. + virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array& outLiterals) = 0; + + //! Sets an attribute as enumeration + virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals) = 0; + + + /* + + SColor Attribute + + */ + + //! Adds an attribute as color + virtual void addColor(const c8* attributeName, video::SColor value) = 0; + + + //! Sets a attribute as color + virtual void setAttribute(const c8* attributeName, video::SColor color) = 0; + + //! Gets an attribute as color + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual video::SColor getAttributeAsColor(const c8* attributeName) = 0; + + //! Gets an attribute as color + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual video::SColor getAttributeAsColor(s32 index) = 0; + + //! Sets an attribute as color + virtual void setAttribute(s32 index, video::SColor color) = 0; + + /* + + SColorf Attribute + + */ + + //! Adds an attribute as floating point color + virtual void addColorf(const c8* attributeName, video::SColorf value) = 0; + + //! Sets a attribute as floating point color + virtual void setAttribute(const c8* attributeName, video::SColorf color) = 0; + + //! Gets an attribute as floating point color + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual video::SColorf getAttributeAsColorf(const c8* attributeName) = 0; + + //! Gets an attribute as floating point color + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual video::SColorf getAttributeAsColorf(s32 index) = 0; + + //! Sets an attribute as floating point color + virtual void setAttribute(s32 index, video::SColorf color) = 0; + + + /* + + Vector3d Attribute + + */ + + //! Adds an attribute as 3d vector + virtual void addVector3d(const c8* attributeName, core::vector3df value) = 0; + + //! Sets a attribute as 3d vector + virtual void setAttribute(const c8* attributeName, core::vector3df v) = 0; + + //! Gets an attribute as 3d vector + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::vector3df getAttributeAsVector3d(const c8* attributeName) = 0; + + //! Gets an attribute as 3d vector + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::vector3df getAttributeAsVector3d(s32 index) = 0; + + //! Sets an attribute as vector + virtual void setAttribute(s32 index, core::vector3df v) = 0; + + /* + + Vector2d Attribute + + */ + + //! Adds an attribute as 2d vector + virtual void addVector2d(const c8* attributeName, core::vector2df value) = 0; + + //! Sets a attribute as 2d vector + virtual void setAttribute(const c8* attributeName, core::vector2df v) = 0; + + //! Gets an attribute as vector + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::vector2df getAttributeAsVector2d(const c8* attributeName) = 0; + + //! Gets an attribute as position + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::vector2df getAttributeAsVector2d(s32 index) = 0; + + //! Sets an attribute as 2d vector + virtual void setAttribute(s32 index, core::vector2df v) = 0; + + /* + + Position2d Attribute + + */ + + //! Adds an attribute as 2d position + virtual void addPosition2d(const c8* attributeName, core::position2di value) = 0; + + //! Sets a attribute as 2d position + virtual void setAttribute(const c8* attributeName, core::position2di v) = 0; + + //! Gets an attribute as position + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::position2di getAttributeAsPosition2d(const c8* attributeName) = 0; + + //! Gets an attribute as position + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::position2di getAttributeAsPosition2d(s32 index) = 0; + + //! Sets an attribute as 2d position + virtual void setAttribute(s32 index, core::position2di v) = 0; + + /* + + Rectangle Attribute + + */ + + //! Adds an attribute as rectangle + virtual void addRect(const c8* attributeName, core::rect value) = 0; + + //! Sets an attribute as rectangle + virtual void setAttribute(const c8* attributeName, core::rect v) = 0; + + //! Gets an attribute as rectangle + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::rect getAttributeAsRect(const c8* attributeName) = 0; + + //! Gets an attribute as rectangle + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::rect getAttributeAsRect(s32 index) = 0; + + //! Sets an attribute as rectangle + virtual void setAttribute(s32 index, core::rect v) = 0; + + + /* + + Dimension2d Attribute + + */ + + //! Adds an attribute as dimension2d + virtual void addDimension2d(const c8* attributeName, core::dimension2d value) = 0; + + //! Sets an attribute as dimension2d + virtual void setAttribute(const c8* attributeName, core::dimension2d v) = 0; + + //! Gets an attribute as dimension2d + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::dimension2d getAttributeAsDimension2d(const c8* attributeName) = 0; + + //! Gets an attribute as dimension2d + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::dimension2d getAttributeAsDimension2d(s32 index) = 0; + + //! Sets an attribute as dimension2d + virtual void setAttribute(s32 index, core::dimension2d v) = 0; + + + /* + matrix attribute + */ + + //! Adds an attribute as matrix + virtual void addMatrix(const c8* attributeName, const core::matrix4& v) = 0; + + //! Sets an attribute as matrix + virtual void setAttribute(const c8* attributeName, const core::matrix4& v) = 0; + + //! Gets an attribute as a matrix4 + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName) = 0; + + //! Gets an attribute as matrix + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::matrix4 getAttributeAsMatrix(s32 index) = 0; + + //! Sets an attribute as matrix + virtual void setAttribute(s32 index, const core::matrix4& v) = 0; + + /* + quaternion attribute + + */ + + //! Adds an attribute as quaternion + virtual void addQuaternion(const c8* attributeName, core::quaternion v) = 0; + + //! Sets an attribute as quaternion + virtual void setAttribute(const c8* attributeName, core::quaternion v) = 0; + + //! Gets an attribute as a quaternion + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName) = 0; + + //! Gets an attribute as quaternion + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::quaternion getAttributeAsQuaternion(s32 index) = 0; + + //! Sets an attribute as quaternion + virtual void setAttribute(s32 index, core::quaternion v) = 0; + + /* + + 3d bounding box + + */ + + //! Adds an attribute as axis aligned bounding box + virtual void addBox3d(const c8* attributeName, core::aabbox3df v) = 0; + + //! Sets an attribute as axis aligned bounding box + virtual void setAttribute(const c8* attributeName, core::aabbox3df v) = 0; + + //! Gets an attribute as a axis aligned bounding box + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName) = 0; + + //! Gets an attribute as axis aligned bounding box + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::aabbox3df getAttributeAsBox3d(s32 index) = 0; + + //! Sets an attribute as axis aligned bounding box + virtual void setAttribute(s32 index, core::aabbox3df v) = 0; + + /* + + plane + + */ + + //! Adds an attribute as 3d plane + virtual void addPlane3d(const c8* attributeName, core::plane3df v) = 0; + + //! Sets an attribute as 3d plane + virtual void setAttribute(const c8* attributeName, core::plane3df v) = 0; + + //! Gets an attribute as a 3d plane + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName) = 0; + + //! Gets an attribute as 3d plane + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::plane3df getAttributeAsPlane3d(s32 index) = 0; + + //! Sets an attribute as 3d plane + virtual void setAttribute(s32 index, core::plane3df v) = 0; + + + /* + + 3d triangle + + */ + + //! Adds an attribute as 3d triangle + virtual void addTriangle3d(const c8* attributeName, core::triangle3df v) = 0; + + //! Sets an attribute as 3d trianle + virtual void setAttribute(const c8* attributeName, core::triangle3df v) = 0; + + //! Gets an attribute as a 3d triangle + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::triangle3df getAttributeAsTriangle3d(const c8* attributeName) = 0; + + //! Gets an attribute as 3d triangle + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::triangle3df getAttributeAsTriangle3d(s32 index) = 0; + + //! Sets an attribute as 3d triangle + virtual void setAttribute(s32 index, core::triangle3df v) = 0; + + + /* + + line 2d + + */ + + //! Adds an attribute as a 2d line + virtual void addLine2d(const c8* attributeName, core::line2df v) = 0; + + //! Sets an attribute as a 2d line + virtual void setAttribute(const c8* attributeName, core::line2df v) = 0; + + //! Gets an attribute as a 2d line + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::line2df getAttributeAsLine2d(const c8* attributeName) = 0; + + //! Gets an attribute as a 2d line + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::line2df getAttributeAsLine2d(s32 index) = 0; + + //! Sets an attribute as a 2d line + virtual void setAttribute(s32 index, core::line2df v) = 0; + + + /* + + line 3d + + */ + + //! Adds an attribute as a 3d line + virtual void addLine3d(const c8* attributeName, core::line3df v) = 0; + + //! Sets an attribute as a 3d line + virtual void setAttribute(const c8* attributeName, core::line3df v) = 0; + + //! Gets an attribute as a 3d line + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::line3df getAttributeAsLine3d(const c8* attributeName) = 0; + + //! Gets an attribute as a 3d line + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::line3df getAttributeAsLine3d(s32 index) = 0; + + //! Sets an attribute as a 3d line + virtual void setAttribute(s32 index, core::line3df v) = 0; + + + /* + + Texture Attribute + + */ + + //! Adds an attribute as texture reference + virtual void addTexture(const c8* attributeName, video::ITexture* texture, const io::path& filename = "") = 0; + + //! Sets an attribute as texture reference + virtual void setAttribute(const c8* attributeName, video::ITexture* texture, const io::path& filename = "") = 0; + + //! Gets an attribute as texture reference + //! \param attributeName: Name of the attribute to get. + virtual video::ITexture* getAttributeAsTexture(const c8* attributeName) = 0; + + //! Gets an attribute as texture reference + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual video::ITexture* getAttributeAsTexture(s32 index) = 0; + + //! Sets an attribute as texture reference + virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = "") = 0; + + + /* + + User Pointer Attribute + + */ + + //! Adds an attribute as user pointner + virtual void addUserPointer(const c8* attributeName, void* userPointer) = 0; + + //! Sets an attribute as user pointer + virtual void setAttribute(const c8* attributeName, void* userPointer) = 0; + + //! Gets an attribute as user pointer + //! \param attributeName: Name of the attribute to get. + virtual void* getAttributeAsUserPointer(const c8* attributeName) = 0; + + //! Gets an attribute as user pointer + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual void* getAttributeAsUserPointer(s32 index) = 0; + + //! Sets an attribute as user pointer + virtual void setAttribute(s32 index, void* userPointer) = 0; + +}; + +} // end namespace io +} // end namespace irr + +#endif + + + diff --git a/src/others/irrlicht-1.8.1/include/IBillboardSceneNode.h b/src/others/irrlicht-1.8.1/include/IBillboardSceneNode.h new file mode 100644 index 0000000..7776532 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IBillboardSceneNode.h @@ -0,0 +1,75 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_BILLBOARD_SCENE_NODE_H_INCLUDED__ +#define __I_BILLBOARD_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! A billboard scene node. +/** A billboard is like a 3d sprite: A 2d element, +which always looks to the camera. It is usually used for explosions, fire, +lensflares, particles and things like that. +*/ +class IBillboardSceneNode : public ISceneNode +{ +public: + + //! Constructor + IBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0)) + : ISceneNode(parent, mgr, id, position) {} + + //! Sets the size of the billboard, making it rectangular. + virtual void setSize(const core::dimension2d& size) = 0; + + //! Sets the size of the billboard with independent widths of the bottom and top edges. + /** \param[in] height The height of the billboard. + \param[in] bottomEdgeWidth The width of the bottom edge of the billboard. + \param[in] topEdgeWidth The width of the top edge of the billboard. + */ + virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) = 0; + + //! Returns the size of the billboard. + /** This will return the width of the bottom edge of the billboard. + Use getWidths() to retrieve the bottom and top edges independently. + \return Size of the billboard. + */ + virtual const core::dimension2d& getSize() const = 0; + + //! Gets the size of the the billboard and handles independent top and bottom edge widths correctly. + /** \param[out] height The height of the billboard. + \param[out] bottomEdgeWidth The width of the bottom edge of the billboard. + \param[out] topEdgeWidth The width of the top edge of the billboard. + */ + virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const =0; + + //! Set the color of all vertices of the billboard + /** \param[in] overallColor Color to set */ + virtual void setColor(const video::SColor& overallColor) = 0; + + //! Set the color of the top and bottom vertices of the billboard + /** \param[in] topColor Color to set the top vertices + \param[in] bottomColor Color to set the bottom vertices */ + virtual void setColor(const video::SColor& topColor, + const video::SColor& bottomColor) = 0; + + //! Gets the color of the top and bottom vertices of the billboard + /** \param[out] topColor Stores the color of the top vertices + \param[out] bottomColor Stores the color of the bottom vertices */ + virtual void getColor(video::SColor& topColor, + video::SColor& bottomColor) const = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IBillboardTextSceneNode.h b/src/others/irrlicht-1.8.1/include/IBillboardTextSceneNode.h new file mode 100644 index 0000000..b7f2359 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IBillboardTextSceneNode.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__ +#define __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__ + +#include "IBillboardSceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! A billboard text scene node. +/** Acts like a billboard which displays the currently set text. + Due to the exclusion of RTTI in Irrlicht we have to avoid multiple + inheritance. Hence, changes to the ITextSceneNode interface have + to be copied here manually. +*/ +class IBillboardTextSceneNode : public IBillboardSceneNode +{ +public: + + //! Constructor + IBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0)) + : IBillboardSceneNode(parent, mgr, id, position) {} + + //! Sets the size of the billboard. + virtual void setSize(const core::dimension2d& size) = 0; + + //! Returns the size of the billboard. + virtual const core::dimension2d& getSize() const = 0; + + //! Set the color of all vertices of the billboard + /** \param overallColor: the color to set */ + virtual void setColor(const video::SColor & overallColor) = 0; + + //! Set the color of the top and bottom vertices of the billboard + /** \param topColor: the color to set the top vertices + \param bottomColor: the color to set the bottom vertices */ + virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) = 0; + + //! Gets the color of the top and bottom vertices of the billboard + /** \param topColor: stores the color of the top vertices + \param bottomColor: stores the color of the bottom vertices */ + virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const = 0; + + //! sets the text string + virtual void setText(const wchar_t* text) = 0; + + //! sets the color of the text + virtual void setTextColor(video::SColor color) = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IBoneSceneNode.h b/src/others/irrlicht-1.8.1/include/IBoneSceneNode.h new file mode 100644 index 0000000..6342668 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IBoneSceneNode.h @@ -0,0 +1,108 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_BONE_SCENE_NODE_H_INCLUDED__ +#define __I_BONE_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + + //! Enumeration for different bone animation modes + enum E_BONE_ANIMATION_MODE + { + //! The bone is usually animated, unless it's parent is not animated + EBAM_AUTOMATIC=0, + + //! The bone is animated by the skin, if it's parent is not animated then animation will resume from this bone onward + EBAM_ANIMATED, + + //! The bone is not animated by the skin + EBAM_UNANIMATED, + + //! Not an animation mode, just here to count the available modes + EBAM_COUNT + + }; + + enum E_BONE_SKINNING_SPACE + { + //! local skinning, standard + EBSS_LOCAL=0, + + //! global skinning + EBSS_GLOBAL, + + EBSS_COUNT + }; + + //! Names for bone animation modes + const c8* const BoneAnimationModeNames[] = + { + "automatic", + "animated", + "unanimated", + 0, + }; + + + //! Interface for bones used for skeletal animation. + /** Used with ISkinnedMesh and IAnimatedMeshSceneNode. */ + class IBoneSceneNode : public ISceneNode + { + public: + + IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) : + ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { } + + //! Get the name of the bone + /** \deprecated Use getName instead. This method may be removed by Irrlicht 1.9 */ + _IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); } + + //! Get the index of the bone + virtual u32 getBoneIndex() const = 0; + + //! Sets the animation mode of the bone. + /** \return True if successful. (Unused) */ + virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0; + + //! Gets the current animation mode of the bone + virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0; + + //! Get the axis aligned bounding box of this node + virtual const core::aabbox3d& getBoundingBox() const = 0; + + //! Returns the relative transformation of the scene node. + //virtual core::matrix4 getRelativeTransformation() const = 0; + + //! The animation method. + virtual void OnAnimate(u32 timeMs) =0; + + //! The render method. + /** Does nothing as bones are not visible. */ + virtual void render() { } + + //! How the relative transformation of the bone is used + virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0; + + //! How the relative transformation of the bone is used + virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0; + + //! Updates the absolute position based on the relative and the parents position + virtual void updateAbsolutePositionOfAllChildren()=0; + + s32 positionHint; + s32 scaleHint; + s32 rotationHint; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ICameraSceneNode.h b/src/others/irrlicht-1.8.1/include/ICameraSceneNode.h new file mode 100644 index 0000000..a71eb95 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ICameraSceneNode.h @@ -0,0 +1,207 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_CAMERA_SCENE_NODE_H_INCLUDED__ +#define __I_CAMERA_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "IEventReceiver.h" + +namespace irr +{ +namespace scene +{ + struct SViewFrustum; + + //! Scene Node which is a (controlable) camera. + /** The whole scene will be rendered from the cameras point of view. + Because the ICameraScenNode is a SceneNode, it can be attached to any + other scene node, and will follow its parents movement, rotation and so + on. + */ + class ICameraSceneNode : public ISceneNode, public IEventReceiver + { + public: + + //! Constructor + ICameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f)) + : ISceneNode(parent, mgr, id, position, rotation, scale), IsOrthogonal(false) {} + + //! Sets the projection matrix of the camera. + /** The core::matrix4 class has some methods to build a + projection matrix. e.g: + core::matrix4::buildProjectionMatrixPerspectiveFovLH. + Note that the matrix will only stay as set by this method until + one of the following Methods are called: setNearValue, + setFarValue, setAspectRatio, setFOV. + \param projection The new projection matrix of the camera. + \param isOrthogonal Set this to true if the matrix is an + orthogonal one (e.g. from matrix4::buildProjectionMatrixOrtho). + */ + virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal=false) =0; + + //! Gets the current projection matrix of the camera. + /** \return The current projection matrix of the camera. */ + virtual const core::matrix4& getProjectionMatrix() const =0; + + //! Gets the current view matrix of the camera. + /** \return The current view matrix of the camera. */ + virtual const core::matrix4& getViewMatrix() const =0; + + //! Sets a custom view matrix affector. + /** The matrix passed here, will be multiplied with the view + matrix when it gets updated. This allows for custom camera + setups like, for example, a reflection camera. + \param affector The affector matrix. */ + virtual void setViewMatrixAffector(const core::matrix4& affector) =0; + + //! Get the custom view matrix affector. + /** \return The affector matrix. */ + virtual const core::matrix4& getViewMatrixAffector() const =0; + + //! It is possible to send mouse and key events to the camera. + /** Most cameras may ignore this input, but camera scene nodes + which are created for example with + ISceneManager::addCameraSceneNodeMaya or + ISceneManager::addCameraSceneNodeFPS, may want to get + this input for changing their position, look at target or + whatever. */ + virtual bool OnEvent(const SEvent& event) =0; + + //! Sets the look at target of the camera + /** If the camera's target and rotation are bound ( @see + bindTargetAndRotation() ) then calling this will also change + the camera's scene node rotation to match the target. + Note that setTarget uses the current absolute position + internally, so if you changed setPosition since last rendering you must + call updateAbsolutePosition before using this function. + \param pos Look at target of the camera, in world co-ordinates. */ + virtual void setTarget(const core::vector3df& pos) =0; + + //! Sets the rotation of the node. + /** This only modifies the relative rotation of the node. + If the camera's target and rotation are bound ( @see + bindTargetAndRotation() ) then calling this will also change + the camera's target to match the rotation. + \param rotation New rotation of the node in degrees. */ + virtual void setRotation(const core::vector3df& rotation) =0; + + //! Gets the current look at target of the camera + /** \return The current look at target of the camera, in world co-ordinates */ + virtual const core::vector3df& getTarget() const =0; + + //! Sets the up vector of the camera. + /** \param pos: New upvector of the camera. */ + virtual void setUpVector(const core::vector3df& pos) =0; + + //! Gets the up vector of the camera. + /** \return The up vector of the camera, in world space. */ + virtual const core::vector3df& getUpVector() const =0; + + //! Gets the value of the near plane of the camera. + /** \return The value of the near plane of the camera. */ + virtual f32 getNearValue() const =0; + + //! Gets the value of the far plane of the camera. + /** \return The value of the far plane of the camera. */ + virtual f32 getFarValue() const =0; + + //! Gets the aspect ratio of the camera. + /** \return The aspect ratio of the camera. */ + virtual f32 getAspectRatio() const =0; + + //! Gets the field of view of the camera. + /** \return The field of view of the camera in radians. */ + virtual f32 getFOV() const =0; + + //! Sets the value of the near clipping plane. (default: 1.0f) + /** \param zn: New z near value. */ + virtual void setNearValue(f32 zn) =0; + + //! Sets the value of the far clipping plane (default: 2000.0f) + /** \param zf: New z far value. */ + virtual void setFarValue(f32 zf) =0; + + //! Sets the aspect ratio (default: 4.0f / 3.0f) + /** \param aspect: New aspect ratio. */ + virtual void setAspectRatio(f32 aspect) =0; + + //! Sets the field of view (Default: PI / 2.5f) + /** \param fovy: New field of view in radians. */ + virtual void setFOV(f32 fovy) =0; + + //! Get the view frustum. + /** Needed sometimes by bspTree or LOD render nodes. + \return The current view frustum. */ + virtual const SViewFrustum* getViewFrustum() const =0; + + //! Disables or enables the camera to get key or mouse inputs. + /** If this is set to true, the camera will respond to key + inputs otherwise not. */ + virtual void setInputReceiverEnabled(bool enabled) =0; + + //! Checks if the input receiver of the camera is currently enabled. + virtual bool isInputReceiverEnabled() const =0; + + //! Checks if a camera is orthogonal. + virtual bool isOrthogonal() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsOrthogonal; + } + + //! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them. + /** When bound, calling setRotation() will update the camera's + target position to be along its +Z axis, and likewise calling + setTarget() will update its rotation so that its +Z axis will + point at the target point. FPS camera use this binding by + default; other cameras do not. + \param bound True to bind the camera's scene node rotation + and targetting, false to unbind them. + @see getTargetAndRotationBinding() */ + virtual void bindTargetAndRotation(bool bound) =0; + + //! Queries if the camera scene node's rotation and its target position are bound together. + /** @see bindTargetAndRotation() */ + virtual bool getTargetAndRotationBinding(void) const =0; + + //! Writes attributes of the camera node + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const + { + ISceneNode::serializeAttributes(out, options); + + if (!out) + return; + out->addBool ("IsOrthogonal", IsOrthogonal ); + } + + //! Reads attributes of the camera node + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) + { + ISceneNode::deserializeAttributes(in, options); + if (!in) + return; + + if ( in->findAttribute("IsOrthogonal") ) + IsOrthogonal = in->getAttributeAsBool("IsOrthogonal"); + } + + protected: + + void cloneMembers(ICameraSceneNode* toCopyFrom) + { + IsOrthogonal = toCopyFrom->IsOrthogonal; + } + + bool IsOrthogonal; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IColladaMeshWriter.h b/src/others/irrlicht-1.8.1/include/IColladaMeshWriter.h new file mode 100644 index 0000000..e3f48a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IColladaMeshWriter.h @@ -0,0 +1,405 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__ +#define __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__ + +#include "IMeshWriter.h" +#include "ISceneNode.h" +#include "IAnimatedMesh.h" +#include "SMaterial.h" + +namespace irr +{ +namespace io +{ + class IWriteFile; +} // end namespace io + +namespace scene +{ + //! Lighting models - more or less the way Collada categorizes materials + enum E_COLLADA_TECHNIQUE_FX + { + //! Blinn-phong which is default for opengl and dx fixed function pipelines. + //! But several well-known renderers don't support it and prefer phong. + ECTF_BLINN, + //! Phong shading, default in many external renderers. + ECTF_PHONG, + //! diffuse shaded surface that is independent of lighting. + ECTF_LAMBERT, + // constantly shaded surface that is independent of lighting. + ECTF_CONSTANT + }; + + //! How to interpret the opacity in collada + enum E_COLLADA_TRANSPARENT_FX + { + //! default - only alpha channel of color or texture is used. + ECOF_A_ONE = 0, + + //! Alpha values for each RGB channel of color or texture are used. + ECOF_RGB_ZERO = 1 + }; + + //! Color names collada uses in it's color samplers + enum E_COLLADA_COLOR_SAMPLER + { + ECCS_DIFFUSE, + ECCS_AMBIENT, + ECCS_EMISSIVE, + ECCS_SPECULAR, + ECCS_TRANSPARENT, + ECCS_REFLECTIVE + }; + + //! Irrlicht colors which can be mapped to E_COLLADA_COLOR_SAMPLER values + enum E_COLLADA_IRR_COLOR + { + //! Don't write this element at all + ECIC_NONE, + + //! Check IColladaMeshWriterProperties for custom color + ECIC_CUSTOM, + + //! Use SMaterial::DiffuseColor + ECIC_DIFFUSE, + + //! Use SMaterial::AmbientColor + ECIC_AMBIENT, + + //! Use SMaterial::EmissiveColor + ECIC_EMISSIVE, + + //! Use SMaterial::SpecularColor + ECIC_SPECULAR + }; + + //! Control when geometry elements are created + enum E_COLLADA_GEOMETRY_WRITING + { + //! Default - write each mesh exactly once to collada. Optimal but will not work with many tools. + ECGI_PER_MESH, + + //! Write each mesh as often as it's used with different materials-names in the scene. + //! Material names which are used here are created on export, so using the IColladaMeshWriterNames + //! interface you have some control over how many geometries are written. + ECGI_PER_MESH_AND_MATERIAL + }; + + //! Callback interface for properties which can be used to influence collada writing + class IColladaMeshWriterProperties : public virtual IReferenceCounted + { + public: + virtual ~IColladaMeshWriterProperties () {} + + //! Which lighting model should be used in the technique (FX) section when exporting effects (materials) + virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx(const video::SMaterial& material) const = 0; + + //! Which texture index should be used when writing the texture of the given sampler color. + /** \return the index to the texture-layer or -1 if that texture should never be exported + Note: for ECCS_TRANSPARENT by default the alpha channel is used, if you want to use RGB you have to set + also the ECOF_RGB_ZERO flag in getTransparentFx. */ + virtual s32 getTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; + + //! Return which color from Irrlicht should be used for the color requested by collada + /** Note that collada allows exporting either texture or color, not both. + So color mapping is only checked if we have no valid texture already. + By default we try to return best fits when possible. For example ECCS_DIFFUSE is mapped to ECIC_DIFFUSE. + When ECIC_CUSTOM is returned then the result of getCustomColor will be used. */ + virtual E_COLLADA_IRR_COLOR getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; + + //! Return custom colors for certain color types requested by collada. + /** Only used when getColorMapping returns ECIC_CUSTOM for the same paramters. */ + virtual video::SColor getCustomColor(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; + + //! Return the transparence color interpretation. + /** Not this is only about ECCS_TRANSPARENT and does not affect getTransparency. */ + virtual E_COLLADA_TRANSPARENT_FX getTransparentFx(const video::SMaterial& material) const = 0; + + //! Transparency value for that material. + /** This value is additional to transparent settings, if both are set they will be multiplicated. + \return 1.0 for fully transparent, 0.0 for not transparent and not written at all when < 0.f */ + virtual f32 getTransparency(const video::SMaterial& material) const = 0; + + //! Reflectivity value for that material + /** The amount of perfect mirror reflection to be added to the reflected light + \return 0.0 - 1.0 for reflectivity and element is not written at all when < 0.f */ + virtual f32 getReflectivity(const video::SMaterial& material) const = 0; + + //! Return index of refraction for that material + /** By default we don't write that. + \return a value greater equal 0.f to write \ when it is lesser than 0 nothing will be written */ + virtual f32 getIndexOfRefraction(const video::SMaterial& material) const = 0; + + //! Should node be used in scene export? (only needed for scene-writing, ignored in mesh-writing) + //! By default all visible nodes are exported. + virtual bool isExportable(const irr::scene::ISceneNode * node) const = 0; + + //! Return the mesh for the given node. If it has no mesh or shouldn't export it's mesh + //! you can return 0 in which case only the transformation matrix of the node will be used. + // Note: Function is not const because there is no const getMesh() function. + virtual IMesh* getMesh(irr::scene::ISceneNode * node) = 0; + + //! Return if the node has it's own material overwriting the mesh-materials + /** Usually true except for mesh-nodes which have isReadOnlyMaterials set. + This is mostly important for naming (as ISceneNode::getMaterial() already returns the correct material). + You have to override it when exporting custom scenenodes with own materials. + \return true => The node's own material is used, false => ignore node material and use the one from the mesh */ + virtual bool useNodeMaterial(const scene::ISceneNode* node) const = 0; + + }; + + //! Callback interface to use custom names on collada writing. + /** You can either modify names and id's written to collada or you can use + this interface to just find out which names are used on writing. + */ + class IColladaMeshWriterNames : public virtual IReferenceCounted + { + public: + + virtual ~IColladaMeshWriterNames () {} + + //! Return a unique name for the given mesh + /** Note that names really must be unique here per mesh-pointer, so + mostly it's a good idea to return the nameForMesh from + IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow + the xs::NCName standard to be valid, you can run them through + IColladaMeshWriter::toNCName to ensure that. + \param mesh Pointer to the mesh which needs a name + \param instance When E_COLLADA_GEOMETRY_WRITING is not ECGI_PER_MESH then + several instances of the same mesh can be written and this counts them. + */ + virtual irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance) = 0; + + //! Return a unique name for the given node + /** Note that names really must be unique here per node-pointer, so + mostly it's a good idea to return the nameForNode from + IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow + the xs::NCName standard to be valid, you can run them through + IColladaMeshWriter::toNCName to ensure that. + */ + virtual irr::core::stringw nameForNode(const scene::ISceneNode* node) = 0; + + //! Return a name for the material + /** There is one material created in the writer for each unique name. + So you can use this to control the number of materials which get written. + For example Irrlicht does by default write one material for each material + instanced by a node. So if you know that in your application material + instances per node are identical between different nodes you can reduce + the number of exported materials using that knowledge by using identical + names for such shared materials. + Names must follow the xs::NCName standard to be valid, you can run them + through IColladaMeshWriter::toNCName to ensure that. + */ + virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) = 0; + }; + + + //! Interface for writing meshes + class IColladaMeshWriter : public IMeshWriter + { + public: + + IColladaMeshWriter() + : Properties(0), DefaultProperties(0), NameGenerator(0), DefaultNameGenerator(0) + , WriteTextures(true), WriteDefaultScene(true), ExportSMaterialOnce(true) + , AmbientLight(0.f, 0.f, 0.f, 1.f) + , GeometryWriting(ECGI_PER_MESH) + { + } + + //! Destructor + virtual ~IColladaMeshWriter() + { + if ( Properties ) + Properties->drop(); + if ( DefaultProperties ) + DefaultProperties->drop(); + if ( NameGenerator ) + NameGenerator->drop(); + if ( DefaultNameGenerator ) + DefaultNameGenerator->drop(); + } + + //! writes a scene starting with the given node + virtual bool writeScene(io::IWriteFile* file, scene::ISceneNode* root) = 0; + + + //! Set if texture information should be written + virtual void setWriteTextures(bool write) + { + WriteTextures = write; + } + + //! Get if texture information should be written + virtual bool getWriteTextures() const + { + return WriteTextures; + } + + //! Set if a default scene should be written when writing meshes. + /** Many collada readers fail to read a mesh if the collada files doesn't contain a scene as well. + The scene is doing an instantiation of the mesh. + When using writeScene this flag is ignored (as we have scene there already) + */ + virtual void setWriteDefaultScene(bool write) + { + WriteDefaultScene = write; + } + + //! Get if a default scene should be written + virtual bool getWriteDefaultScene() const + { + return WriteDefaultScene; + } + + //! Sets ambient color of the scene to write + virtual void setAmbientLight(const video::SColorf &ambientColor) + { + AmbientLight = ambientColor; + } + + //! Return ambient light of the scene which is written + virtual video::SColorf getAmbientLight() const + { + return AmbientLight; + } + + //! Control when and how often a mesh is written + /** Optimally ECGI_PER_MESH would be always sufficent - writing geometry once per mesh. + Unfortunately many tools (at the time of writing this nearly all of them) have trouble + on import when different materials are used per node. So when you override materials + per node and importing the resuling collada has materials problems in other tools try + using other values here. + \param writeStyle One of the E_COLLADA_GEOMETRY_WRITING settings. + */ + virtual void setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle) + { + GeometryWriting = writeStyle; + } + + //! Get the current style of geometry writing. + virtual E_COLLADA_GEOMETRY_WRITING getGeometryWriting() const + { + return GeometryWriting; + } + + //! Make certain there is only one collada material generated per Irrlicht material + /** Checks before creating a collada material-name if an identical + irr:::video::SMaterial has been exported already. If so don't export it with + another name. This is set by default and leads to way smaller .dae files. + Note that if you need to disable this flag for some reason you can still + get a similar effect using the IColladaMeshWriterNames::nameForMaterial + by returning identical names for identical materials there. + */ + virtual void setExportSMaterialsOnlyOnce(bool exportOnce) + { + ExportSMaterialOnce = exportOnce; + } + + virtual bool getExportSMaterialsOnlyOnce() const + { + return ExportSMaterialOnce; + } + + //! Set properties to use by the meshwriter instead of it's default properties. + /** Overloading properties with an own class allows modifying the writing process in certain ways. + By default properties are set to the DefaultProperties. */ + virtual void setProperties(IColladaMeshWriterProperties * p) + { + if ( p == Properties ) + return; + if ( p ) + p->grab(); + if ( Properties ) + Properties->drop(); + Properties = p; + } + + //! Get properties which are currently used. + virtual IColladaMeshWriterProperties * getProperties() const + { + return Properties; + } + + //! Return the original default properties of the writer. + /** You can use this pointer in your own properties to access and return default values. */ + IColladaMeshWriterProperties * getDefaultProperties() const + { + return DefaultProperties; + } + + //! Install a generator to create custom names on export. + virtual void setNameGenerator(IColladaMeshWriterNames * nameGenerator) + { + if ( nameGenerator == NameGenerator ) + return; + if ( nameGenerator ) + nameGenerator->grab(); + if ( NameGenerator ) + NameGenerator->drop(); + NameGenerator = nameGenerator; + } + + //! Get currently used name generator + virtual IColladaMeshWriterNames * getNameGenerator() const + { + return NameGenerator; + } + + //! Return the original default name generator of the writer. + /** You can use this pointer in your own generator to access and return default values. */ + IColladaMeshWriterNames * getDefaultNameGenerator() const + { + return DefaultNameGenerator; + } + + //! Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix. + /** A tool function to help when using a custom name generator to generative valid names for collada names and id's. */ + virtual irr::core::stringw toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix=irr::core::stringw(L"_NC_")) const = 0; + + + protected: + // NOTE: You usually should also call setProperties with the same paraemter when using setDefaultProperties + virtual void setDefaultProperties(IColladaMeshWriterProperties * p) + { + if ( p == DefaultProperties ) + return; + if ( p ) + p->grab(); + if ( DefaultProperties ) + DefaultProperties->drop(); + DefaultProperties = p; + } + + // NOTE: You usually should also call setNameGenerator with the same paraemter when using setDefaultProperties + virtual void setDefaultNameGenerator(IColladaMeshWriterNames * p) + { + if ( p == DefaultNameGenerator ) + return; + if ( p ) + p->grab(); + if ( DefaultNameGenerator ) + DefaultNameGenerator->drop(); + DefaultNameGenerator = p; + } + + private: + IColladaMeshWriterProperties * Properties; + IColladaMeshWriterProperties * DefaultProperties; + IColladaMeshWriterNames * NameGenerator; + IColladaMeshWriterNames * DefaultNameGenerator; + bool WriteTextures; + bool WriteDefaultScene; + bool ExportSMaterialOnce; + video::SColorf AmbientLight; + E_COLLADA_GEOMETRY_WRITING GeometryWriting; + }; + + +} // end namespace +} // end namespace + +#endif diff --git a/src/others/irrlicht-1.8.1/include/ICursorControl.h b/src/others/irrlicht-1.8.1/include/ICursorControl.h new file mode 100644 index 0000000..6295781 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ICursorControl.h @@ -0,0 +1,192 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_CURSOR_CONTROL_H_INCLUDED__ +#define __I_CURSOR_CONTROL_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "position2d.h" +#include "rect.h" + +namespace irr +{ +namespace gui +{ + + class IGUISpriteBank; + + //! Default icons for cursors + enum ECURSOR_ICON + { + // Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far. + ECI_NORMAL, // arrow + ECI_CROSS, // Crosshair + ECI_HAND, // Hand + ECI_HELP, // Arrow and question mark + ECI_IBEAM, // typical text-selection cursor + ECI_NO, // should not click icon + ECI_WAIT, // hourclass + ECI_SIZEALL, // arrow in all directions + ECI_SIZENESW, // resizes in direction north-east or south-west + ECI_SIZENWSE, // resizes in direction north-west or south-east + ECI_SIZENS, // resizes in direction north or south + ECI_SIZEWE, // resizes in direction west or east + ECI_UP, // up-arrow + + // Implementer note: Should we add system specific cursors, which use guaranteed the system icons, + // then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those + // additionally. + + ECI_COUNT // maximal of defined cursors. Note that higher values can be created at runtime + }; + + //! Names for ECURSOR_ICON + const c8* const GUICursorIconNames[ECI_COUNT+1] = + { + "normal", + "cross", + "hand", + "help", + "ibeam", + "no", + "wait", + "sizeall", + "sizenesw", + "sizenwse", + "sizens", + "sizewe", + "sizeup", + 0 + }; + + //! structure used to set sprites as cursors. + struct SCursorSprite + { + SCursorSprite() + : SpriteBank(0), SpriteId(-1) + { + } + + SCursorSprite( gui::IGUISpriteBank * spriteBank, s32 spriteId, const core::position2d &hotspot=(core::position2d(0,0)) ) + : SpriteBank(spriteBank), SpriteId(spriteId), HotSpot(hotspot) + { + } + + IGUISpriteBank * SpriteBank; + s32 SpriteId; + core::position2d HotSpot; + }; + + //! platform specific behavior flags for the cursor + enum ECURSOR_PLATFORM_BEHAVIOR + { + //! default - no platform specific behavior + ECPB_NONE = 0, + + //! On X11 try caching cursor updates as XQueryPointer calls can be expensive. + /** Update cursor positions only when the irrlicht timer has been updated or the timer is stopped. + This means you usually get one cursor update per device->run() which will be fine in most cases. + See this forum-thread for a more detailed explanation: + http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=45525 + */ + ECPB_X11_CACHE_UPDATES = 1 + }; + + //! Interface to manipulate the mouse cursor. + class ICursorControl : public virtual IReferenceCounted + { + public: + + //! Changes the visible state of the mouse cursor. + /** \param visible: The new visible state. If true, the cursor will be visible, + if false, it will be invisible. */ + virtual void setVisible(bool visible) = 0; + + //! Returns if the cursor is currently visible. + /** \return True if the cursor is visible, false if not. */ + virtual bool isVisible() const = 0; + + //! Sets the new position of the cursor. + /** The position must be + between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is + the top left corner and (1.0f, 1.0f) is the bottom right corner of the + render window. + \param pos New position of the cursor. */ + virtual void setPosition(const core::position2d &pos) = 0; + + //! Sets the new position of the cursor. + /** The position must be + between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is + the top left corner and (1.0f, 1.0f) is the bottom right corner of the + render window. + \param x New x-coord of the cursor. + \param y New x-coord of the cursor. */ + virtual void setPosition(f32 x, f32 y) = 0; + + //! Sets the new position of the cursor. + /** \param pos: New position of the cursor. The coordinates are pixel units. */ + virtual void setPosition(const core::position2d &pos) = 0; + + //! Sets the new position of the cursor. + /** \param x New x-coord of the cursor. The coordinates are pixel units. + \param y New y-coord of the cursor. The coordinates are pixel units. */ + virtual void setPosition(s32 x, s32 y) = 0; + + //! Returns the current position of the mouse cursor. + /** \return Returns the current position of the cursor. The returned position + is the position of the mouse cursor in pixel units. */ + virtual const core::position2d& getPosition() = 0; + + //! Returns the current position of the mouse cursor. + /** \return Returns the current position of the cursor. The returned position + is a value between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is + the top left corner and (1.0f, 1.0f) is the bottom right corner of the + render window. */ + virtual core::position2d getRelativePosition() = 0; + + //! Sets an absolute reference rect for setting and retrieving the cursor position. + /** If this rect is set, the cursor position is not being calculated relative to + the rendering window but to this rect. You can set the rect pointer to 0 to disable + this feature again. This feature is useful when rendering into parts of foreign windows + for example in an editor. + \param rect: A pointer to an reference rectangle or 0 to disable the reference rectangle.*/ + virtual void setReferenceRect(core::rect* rect=0) = 0; + + + //! Sets the active cursor icon + /** Setting cursor icons is so far only supported on Win32 and Linux */ + virtual void setActiveIcon(ECURSOR_ICON iconId) {} + + //! Gets the currently active icon + virtual ECURSOR_ICON getActiveIcon() const { return gui::ECI_NORMAL; } + + //! Add a custom sprite as cursor icon. + /** \return Identification for the icon */ + virtual ECURSOR_ICON addIcon(const gui::SCursorSprite& icon) { return gui::ECI_NORMAL; } + + //! replace a cursor icon. + /** Changing cursor icons is so far only supported on Win32 and Linux + Note that this only changes the icons within your application, system cursors outside your + application will not be affected. + */ + virtual void changeIcon(ECURSOR_ICON iconId, const gui::SCursorSprite& sprite) {} + + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + virtual core::dimension2di getSupportedIconSize() const { return core::dimension2di(0,0); } + + //! Set platform specific behavior flags. + virtual void setPlatformBehavior(ECURSOR_PLATFORM_BEHAVIOR behavior) {} + + //! Return platform specific behavior. + /** \return Behavior set by setPlatformBehavior or ECPB_NONE for platforms not implementing specific behaviors. + */ + virtual ECURSOR_PLATFORM_BEHAVIOR getPlatformBehavior() const { return ECPB_NONE; } + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h b/src/others/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h new file mode 100644 index 0000000..60dfe20 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h @@ -0,0 +1,42 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__ +#define __I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! Dummy scene node for adding additional transformations to the scene graph. +/** This scene node does not render itself, and does not respond to set/getPosition, +set/getRotation and set/getScale. Its just a simple scene node that takes a +matrix as relative transformation, making it possible to insert any transformation +anywhere into the scene graph. +This scene node is for example used by the IAnimatedMeshSceneNode for emulating +joint scene nodes when playing skeletal animations. +*/ +class IDummyTransformationSceneNode : public ISceneNode +{ +public: + + //! Constructor + IDummyTransformationSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) + : ISceneNode(parent, mgr, id) {} + + //! Returns a reference to the current relative transformation matrix. + /** This is the matrix, this scene node uses instead of scale, translation + and rotation. */ + virtual core::matrix4& getRelativeTransformationMatrix() = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IDynamicMeshBuffer.h b/src/others/irrlicht-1.8.1/include/IDynamicMeshBuffer.h new file mode 100644 index 0000000..72f2036 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IDynamicMeshBuffer.h @@ -0,0 +1,211 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__ +#define __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__ + +#include "IMeshBuffer.h" +#include "IVertexBuffer.h" +#include "IIndexBuffer.h" + +namespace irr +{ +namespace scene +{ + + /** a dynamic meshBuffer */ + class IDynamicMeshBuffer : public IMeshBuffer + { + public: + virtual IVertexBuffer &getVertexBuffer() const =0; + virtual IIndexBuffer &getIndexBuffer() const =0; + + virtual void setVertexBuffer(IVertexBuffer *vertexBuffer) =0; + virtual void setIndexBuffer(IIndexBuffer *indexBuffer) =0; + + //! Get the material of this meshbuffer + /** \return Material of this buffer. */ + virtual video::SMaterial& getMaterial() =0; + + //! Get the material of this meshbuffer + /** \return Material of this buffer. */ + virtual const video::SMaterial& getMaterial() const =0; + + //! Get the axis aligned bounding box of this meshbuffer. + /** \return Axis aligned bounding box of this buffer. */ + virtual const core::aabbox3df& getBoundingBox() const =0; + + //! Set axis aligned bounding box + /** \param box User defined axis aligned bounding box to use + for this buffer. */ + virtual void setBoundingBox(const core::aabbox3df& box) =0; + + //! Recalculates the bounding box. Should be called if the mesh changed. + virtual void recalculateBoundingBox() =0; + + //! Append the vertices and indices to the current buffer + /** Only works for compatible vertex types. + \param vertices Pointer to a vertex array. + \param numVertices Number of vertices in the array. + \param indices Pointer to index array. + \param numIndices Number of indices in array. */ + virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) + { + + } + + //! Append the meshbuffer to the current buffer + /** Only works for compatible vertex types + \param other Buffer to append to this one. */ + virtual void append(const IMeshBuffer* const other) + { + + } + + // ------------------- To be removed? ------------------- // + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const + { + return getVertexBuffer().getHardwareMappingHint(); + } + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const + { + return getIndexBuffer().getHardwareMappingHint(); + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) + { + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) + getVertexBuffer().setHardwareMappingHint(NewMappingHint); + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) + getIndexBuffer().setHardwareMappingHint(NewMappingHint); + } + + //! flags the mesh as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) + { + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) + getVertexBuffer().setDirty(); + if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) + getIndexBuffer().setDirty(); + } + + virtual u32 getChangedID_Vertex() const + { + return getVertexBuffer().getChangedID(); + } + + virtual u32 getChangedID_Index() const + { + return getIndexBuffer().getChangedID(); + } + + // ------------------- Old interface ------------------- // + + //! Get type of vertex data which is stored in this meshbuffer. + /** \return Vertex type of this buffer. */ + virtual video::E_VERTEX_TYPE getVertexType() const + { + return getVertexBuffer().getType(); + } + + //! Get access to vertex data. The data is an array of vertices. + /** Which vertex type is used can be determined by getVertexType(). + \return Pointer to array of vertices. */ + virtual const void* getVertices() const + { + return getVertexBuffer().getData(); + } + + //! Get access to vertex data. The data is an array of vertices. + /** Which vertex type is used can be determined by getVertexType(). + \return Pointer to array of vertices. */ + virtual void* getVertices() + { + return getVertexBuffer().getData(); + } + + //! Get amount of vertices in meshbuffer. + /** \return Number of vertices in this buffer. */ + virtual u32 getVertexCount() const + { + return getVertexBuffer().size(); + } + + //! Get type of index data which is stored in this meshbuffer. + /** \return Index type of this buffer. */ + virtual video::E_INDEX_TYPE getIndexType() const + { + return getIndexBuffer().getType(); + } + + //! Get access to Indices. + /** \return Pointer to indices array. */ + virtual const u16* getIndices() const + { + return (u16*)getIndexBuffer().getData(); + } + + //! Get access to Indices. + /** \return Pointer to indices array. */ + virtual u16* getIndices() + { + return (u16*)getIndexBuffer().getData(); + } + + //! Get amount of indices in this meshbuffer. + /** \return Number of indices in this buffer. */ + virtual u32 getIndexCount() const + { + return getIndexBuffer().size(); + } + + //! returns position of vertex i + virtual const core::vector3df& getPosition(u32 i) const + { + return getVertexBuffer()[i].Pos; + } + + //! returns position of vertex i + virtual core::vector3df& getPosition(u32 i) + { + return getVertexBuffer()[i].Pos; + } + + //! returns texture coords of vertex i + virtual const core::vector2df& getTCoords(u32 i) const + { + return getVertexBuffer()[i].TCoords; + } + + //! returns texture coords of vertex i + virtual core::vector2df& getTCoords(u32 i) + { + return getVertexBuffer()[i].TCoords; + } + + //! returns normal of vertex i + virtual const core::vector3df& getNormal(u32 i) const + { + return getVertexBuffer()[i].Normal; + } + + //! returns normal of vertex i + virtual core::vector3df& getNormal(u32 i) + { + return getVertexBuffer()[i].Normal; + } + }; + + +} // end namespace scene +} // end namespace irr + +#endif + + diff --git a/src/others/irrlicht-1.8.1/include/IEventReceiver.h b/src/others/irrlicht-1.8.1/include/IEventReceiver.h new file mode 100644 index 0000000..419ded7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IEventReceiver.h @@ -0,0 +1,490 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_EVENT_RECEIVER_H_INCLUDED__ +#define __I_EVENT_RECEIVER_H_INCLUDED__ + +#include "ILogger.h" +#include "Keycodes.h" +#include "irrString.h" + +namespace irr +{ + //! Enumeration for all event types there are. + enum EEVENT_TYPE + { + //! An event of the graphical user interface. + /** GUI events are created by the GUI environment or the GUI elements in response + to mouse or keyboard events. When a GUI element receives an event it will either + process it and return true, or pass the event to its parent. If an event is not absorbed + before it reaches the root element then it will then be passed to the user receiver. */ + EET_GUI_EVENT = 0, + + //! A mouse input event. + /** Mouse events are created by the device and passed to IrrlichtDevice::postEventFromUser + in response to mouse input received from the operating system. + Mouse events are first passed to the user receiver, then to the GUI environment and its elements, + then finally the input receiving scene manager where it is passed to the active camera. + */ + EET_MOUSE_INPUT_EVENT, + + //! A key input event. + /** Like mouse events, keyboard events are created by the device and passed to + IrrlichtDevice::postEventFromUser. They take the same path as mouse events. */ + EET_KEY_INPUT_EVENT, + + //! A joystick (joypad, gamepad) input event. + /** Joystick events are created by polling all connected joysticks once per + device run() and then passing the events to IrrlichtDevice::postEventFromUser. + They take the same path as mouse events. + Windows, SDL: Implemented. + Linux: Implemented, with POV hat issues. + MacOS / Other: Not yet implemented. + */ + EET_JOYSTICK_INPUT_EVENT, + + //! A log event + /** Log events are only passed to the user receiver if there is one. If they are absorbed by the + user receiver then no text will be sent to the console. */ + EET_LOG_TEXT_EVENT, + + //! A user event with user data. + /** This is not used by Irrlicht and can be used to send user + specific data though the system. The Irrlicht 'window handle' + can be obtained from IrrlichtDevice::getExposedVideoData() + The usage and behavior depends on the operating system: + Windows: send a WM_USER message to the Irrlicht Window; the + wParam and lParam will be used to populate the + UserData1 and UserData2 members of the SUserEvent. + Linux: send a ClientMessage via XSendEvent to the Irrlicht + Window; the data.l[0] and data.l[1] members will be + casted to s32 and used as UserData1 and UserData2. + MacOS: Not yet implemented + */ + EET_USER_EVENT, + + //! This enum is never used, it only forces the compiler to + //! compile these enumeration values to 32 bit. + EGUIET_FORCE_32_BIT = 0x7fffffff + + }; + + //! Enumeration for all mouse input events + enum EMOUSE_INPUT_EVENT + { + //! Left mouse button was pressed down. + EMIE_LMOUSE_PRESSED_DOWN = 0, + + //! Right mouse button was pressed down. + EMIE_RMOUSE_PRESSED_DOWN, + + //! Middle mouse button was pressed down. + EMIE_MMOUSE_PRESSED_DOWN, + + //! Left mouse button was left up. + EMIE_LMOUSE_LEFT_UP, + + //! Right mouse button was left up. + EMIE_RMOUSE_LEFT_UP, + + //! Middle mouse button was left up. + EMIE_MMOUSE_LEFT_UP, + + //! The mouse cursor changed its position. + EMIE_MOUSE_MOVED, + + //! The mouse wheel was moved. Use Wheel value in event data to find out + //! in what direction and how fast. + EMIE_MOUSE_WHEEL, + + //! Left mouse button double click. + //! This event is generated after the second EMIE_LMOUSE_PRESSED_DOWN event. + EMIE_LMOUSE_DOUBLE_CLICK, + + //! Right mouse button double click. + //! This event is generated after the second EMIE_RMOUSE_PRESSED_DOWN event. + EMIE_RMOUSE_DOUBLE_CLICK, + + //! Middle mouse button double click. + //! This event is generated after the second EMIE_MMOUSE_PRESSED_DOWN event. + EMIE_MMOUSE_DOUBLE_CLICK, + + //! Left mouse button triple click. + //! This event is generated after the third EMIE_LMOUSE_PRESSED_DOWN event. + EMIE_LMOUSE_TRIPLE_CLICK, + + //! Right mouse button triple click. + //! This event is generated after the third EMIE_RMOUSE_PRESSED_DOWN event. + EMIE_RMOUSE_TRIPLE_CLICK, + + //! Middle mouse button triple click. + //! This event is generated after the third EMIE_MMOUSE_PRESSED_DOWN event. + EMIE_MMOUSE_TRIPLE_CLICK, + + //! No real event. Just for convenience to get number of events + EMIE_COUNT + }; + + //! Masks for mouse button states + enum E_MOUSE_BUTTON_STATE_MASK + { + EMBSM_LEFT = 0x01, + EMBSM_RIGHT = 0x02, + EMBSM_MIDDLE = 0x04, + + //! currently only on windows + EMBSM_EXTRA1 = 0x08, + + //! currently only on windows + EMBSM_EXTRA2 = 0x10, + + EMBSM_FORCE_32_BIT = 0x7fffffff + }; + + namespace gui + { + + class IGUIElement; + + //! Enumeration for all events which are sendable by the gui system + enum EGUI_EVENT_TYPE + { + //! A gui element has lost its focus. + /** GUIEvent.Caller is losing the focus to GUIEvent.Element. + If the event is absorbed then the focus will not be changed. */ + EGET_ELEMENT_FOCUS_LOST = 0, + + //! A gui element has got the focus. + /** If the event is absorbed then the focus will not be changed. */ + EGET_ELEMENT_FOCUSED, + + //! The mouse cursor hovered over a gui element. + /** If an element has sub-elements you also get this message for the subelements */ + EGET_ELEMENT_HOVERED, + + //! The mouse cursor left the hovered element. + /** If an element has sub-elements you also get this message for the subelements */ + EGET_ELEMENT_LEFT, + + //! An element would like to close. + /** Windows and context menus use this event when they would like to close, + this can be cancelled by absorbing the event. */ + EGET_ELEMENT_CLOSED, + + //! A button was clicked. + EGET_BUTTON_CLICKED, + + //! A scrollbar has changed its position. + EGET_SCROLL_BAR_CHANGED, + + //! A checkbox has changed its check state. + EGET_CHECKBOX_CHANGED, + + //! A new item in a listbox was selected. + /** NOTE: You also get this event currently when the same item was clicked again after more than 500 ms. */ + EGET_LISTBOX_CHANGED, + + //! An item in the listbox was selected, which was already selected. + /** NOTE: You get the event currently only if the item was clicked again within 500 ms or selected by "enter" or "space". */ + EGET_LISTBOX_SELECTED_AGAIN, + + //! A file has been selected in the file dialog + EGET_FILE_SELECTED, + + //! A directory has been selected in the file dialog + EGET_DIRECTORY_SELECTED, + + //! A file open dialog has been closed without choosing a file + EGET_FILE_CHOOSE_DIALOG_CANCELLED, + + //! 'Yes' was clicked on a messagebox + EGET_MESSAGEBOX_YES, + + //! 'No' was clicked on a messagebox + EGET_MESSAGEBOX_NO, + + //! 'OK' was clicked on a messagebox + EGET_MESSAGEBOX_OK, + + //! 'Cancel' was clicked on a messagebox + EGET_MESSAGEBOX_CANCEL, + + //! In an editbox 'ENTER' was pressed + EGET_EDITBOX_ENTER, + + //! The text in an editbox was changed. This does not include automatic changes in text-breaking. + EGET_EDITBOX_CHANGED, + + //! The marked area in an editbox was changed. + EGET_EDITBOX_MARKING_CHANGED, + + //! The tab was changed in an tab control + EGET_TAB_CHANGED, + + //! A menu item was selected in a (context) menu + EGET_MENU_ITEM_SELECTED, + + //! The selection in a combo box has been changed + EGET_COMBO_BOX_CHANGED, + + //! The value of a spin box has changed + EGET_SPINBOX_CHANGED, + + //! A table has changed + EGET_TABLE_CHANGED, + EGET_TABLE_HEADER_CHANGED, + EGET_TABLE_SELECTED_AGAIN, + + //! A tree view node lost selection. See IGUITreeView::getLastEventNode(). + EGET_TREEVIEW_NODE_DESELECT, + + //! A tree view node was selected. See IGUITreeView::getLastEventNode(). + EGET_TREEVIEW_NODE_SELECT, + + //! A tree view node was expanded. See IGUITreeView::getLastEventNode(). + EGET_TREEVIEW_NODE_EXPAND, + + //! A tree view node was collapsed. See IGUITreeView::getLastEventNode(). + EGET_TREEVIEW_NODE_COLLAPSE, + + //! deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead. This + //! may be removed by Irrlicht 1.9 + EGET_TREEVIEW_NODE_COLLAPS = EGET_TREEVIEW_NODE_COLLAPSE, + + //! No real event. Just for convenience to get number of events + EGET_COUNT + }; + } // end namespace gui + + +//! SEvents hold information about an event. See irr::IEventReceiver for details on event handling. +struct SEvent +{ + //! Any kind of GUI event. + struct SGUIEvent + { + //! IGUIElement who called the event + gui::IGUIElement* Caller; + + //! If the event has something to do with another element, it will be held here. + gui::IGUIElement* Element; + + //! Type of GUI Event + gui::EGUI_EVENT_TYPE EventType; + + }; + + //! Any kind of mouse event. + struct SMouseInput + { + //! X position of mouse cursor + s32 X; + + //! Y position of mouse cursor + s32 Y; + + //! mouse wheel delta, often 1.0 or -1.0, but can have other values < 0.f or > 0.f; + /** Only valid if event was EMIE_MOUSE_WHEEL */ + f32 Wheel; + + //! True if shift was also pressed + bool Shift:1; + + //! True if ctrl was also pressed + bool Control:1; + + //! A bitmap of button states. You can use isButtonPressed() to determine + //! if a button is pressed or not. + //! Currently only valid if the event was EMIE_MOUSE_MOVED + u32 ButtonStates; + + //! Is the left button pressed down? + bool isLeftPressed() const { return 0 != ( ButtonStates & EMBSM_LEFT ); } + + //! Is the right button pressed down? + bool isRightPressed() const { return 0 != ( ButtonStates & EMBSM_RIGHT ); } + + //! Is the middle button pressed down? + bool isMiddlePressed() const { return 0 != ( ButtonStates & EMBSM_MIDDLE ); } + + //! Type of mouse event + EMOUSE_INPUT_EVENT Event; + }; + + //! Any kind of keyboard event. + struct SKeyInput + { + //! Character corresponding to the key (0, if not a character) + wchar_t Char; + + //! Key which has been pressed or released + EKEY_CODE Key; + + //! If not true, then the key was left up + bool PressedDown:1; + + //! True if shift was also pressed + bool Shift:1; + + //! True if ctrl was also pressed + bool Control:1; + }; + + //! A joystick event. + /** Unlike other events, joystick events represent the result of polling + * each connected joystick once per run() of the device. Joystick events will + * not be generated by default. If joystick support is available for the + * active device, _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ is defined, and + * @ref irr::IrrlichtDevice::activateJoysticks() has been called, an event of + * this type will be generated once per joystick per @ref IrrlichtDevice::run() + * regardless of whether the state of the joystick has actually changed. */ + struct SJoystickEvent + { + enum + { + NUMBER_OF_BUTTONS = 32, + + AXIS_X = 0, // e.g. analog stick 1 left to right + AXIS_Y, // e.g. analog stick 1 top to bottom + AXIS_Z, // e.g. throttle, or analog 2 stick 2 left to right + AXIS_R, // e.g. rudder, or analog 2 stick 2 top to bottom + AXIS_U, + AXIS_V, + NUMBER_OF_AXES + }; + + /** A bitmap of button states. You can use IsButtonPressed() to + ( check the state of each button from 0 to (NUMBER_OF_BUTTONS - 1) */ + u32 ButtonStates; + + /** For AXIS_X, AXIS_Y, AXIS_Z, AXIS_R, AXIS_U and AXIS_V + * Values are in the range -32768 to 32767, with 0 representing + * the center position. You will receive the raw value from the + * joystick, and so will usually want to implement a dead zone around + * the center of the range. Axes not supported by this joystick will + * always have a value of 0. On Linux, POV hats are represented as axes, + * usually the last two active axis. + */ + s16 Axis[NUMBER_OF_AXES]; + + /** The POV represents the angle of the POV hat in degrees * 100, + * from 0 to 35,900. A value of 65535 indicates that the POV hat + * is centered (or not present). + * This value is only supported on Windows. On Linux, the POV hat + * will be sent as 2 axes instead. */ + u16 POV; + + //! The ID of the joystick which generated this event. + /** This is an internal Irrlicht index; it does not map directly + * to any particular hardware joystick. */ + u8 Joystick; + + //! A helper function to check if a button is pressed. + bool IsButtonPressed(u32 button) const + { + if(button >= (u32)NUMBER_OF_BUTTONS) + return false; + + return (ButtonStates & (1 << button)) ? true : false; + } + }; + + + //! Any kind of log event. + struct SLogEvent + { + //! Pointer to text which has been logged + const c8* Text; + + //! Log level in which the text has been logged + ELOG_LEVEL Level; + }; + + //! Any kind of user event. + struct SUserEvent + { + //! Some user specified data as int + s32 UserData1; + + //! Another user specified data as int + s32 UserData2; + }; + + EEVENT_TYPE EventType; + union + { + struct SGUIEvent GUIEvent; + struct SMouseInput MouseInput; + struct SKeyInput KeyInput; + struct SJoystickEvent JoystickEvent; + struct SLogEvent LogEvent; + struct SUserEvent UserEvent; + }; + +}; + +//! Interface of an object which can receive events. +/** Many of the engine's classes inherit IEventReceiver so they are able to +process events. Events usually start at a postEventFromUser function and are +passed down through a chain of event receivers until OnEvent returns true. See +irr::EEVENT_TYPE for a description of where each type of event starts, and the +path it takes through the system. */ +class IEventReceiver +{ +public: + + //! Destructor + virtual ~IEventReceiver() {} + + //! Called if an event happened. + /** Please take care that you should only return 'true' when you want to _prevent_ Irrlicht + * from processing the event any further. So 'true' does mean that an event is completely done. + * Therefore your return value for all unprocessed events should be 'false'. + \return True if the event was processed. + */ + virtual bool OnEvent(const SEvent& event) = 0; +}; + + +//! Information on a joystick, returned from @ref irr::IrrlichtDevice::activateJoysticks() +struct SJoystickInfo +{ + //! The ID of the joystick + /** This is an internal Irrlicht index; it does not map directly + * to any particular hardware joystick. It corresponds to the + * irr::SJoystickEvent Joystick ID. */ + u8 Joystick; + + //! The name that the joystick uses to identify itself. + core::stringc Name; + + //! The number of buttons that the joystick has. + u32 Buttons; + + //! The number of axes that the joystick has, i.e. X, Y, Z, R, U, V. + /** Note: with a Linux device, the POV hat (if any) will use two axes. These + * will be included in this count. */ + u32 Axes; + + //! An indication of whether the joystick has a POV hat. + /** A Windows device will identify the presence or absence or the POV hat. A + * Linux device cannot, and will always return POV_HAT_UNKNOWN. */ + enum + { + //! A hat is definitely present. + POV_HAT_PRESENT, + + //! A hat is definitely not present. + POV_HAT_ABSENT, + + //! The presence or absence of a hat cannot be determined. + POV_HAT_UNKNOWN + } PovHat; +}; // struct SJoystickInfo + + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IFileArchive.h b/src/others/irrlicht-1.8.1/include/IFileArchive.h new file mode 100644 index 0000000..a2e02a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IFileArchive.h @@ -0,0 +1,132 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt/ Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_FILE_ARCHIVE_H_INCLUDED__ +#define __I_FILE_ARCHIVE_H_INCLUDED__ + +#include "IReadFile.h" +#include "IFileList.h" + +namespace irr +{ + +namespace io +{ + +//! FileSystemType: which Filesystem should be used for e.g. browsing +enum EFileSystemType +{ + FILESYSTEM_NATIVE = 0, // Native OS FileSystem + FILESYSTEM_VIRTUAL // Virtual FileSystem +}; + +//! Contains the different types of archives +enum E_FILE_ARCHIVE_TYPE +{ + //! A PKZIP archive + EFAT_ZIP = MAKE_IRR_ID('Z','I','P', 0), + + //! A gzip archive + EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'), + + //! A virtual directory + EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'), + + //! An ID Software PAK archive + EFAT_PAK = MAKE_IRR_ID('P','A','K', 0), + + //! A Nebula Device archive + EFAT_NPK = MAKE_IRR_ID('N','P','K', 0), + + //! A Tape ARchive + EFAT_TAR = MAKE_IRR_ID('T','A','R', 0), + + //! A wad Archive, Quake2, Halflife + EFAT_WAD = MAKE_IRR_ID('W','A','D', 0), + + //! The type of this archive is unknown + EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n') +}; + +//! The FileArchive manages archives and provides access to files inside them. +class IFileArchive : public virtual IReferenceCounted +{ +public: + + //! Opens a file based on its name + /** Creates and returns a new IReadFile for a file in the archive. + \param filename The file to open + \return Returns A pointer to the created file on success, + or 0 on failure. */ + virtual IReadFile* createAndOpenFile(const path& filename) =0; + + //! Opens a file based on its position in the file list. + /** Creates and returns + \param index The zero based index of the file. + \return Returns a pointer to the created file on success, or 0 on failure. */ + virtual IReadFile* createAndOpenFile(u32 index) =0; + + //! Returns the complete file tree + /** \return Returns the complete directory tree for the archive, + including all files and folders */ + virtual const IFileList* getFileList() const =0; + + //! get the archive type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; } + + //! An optionally used password string + /** This variable is publicly accessible from the interface in order to + avoid single access patterns to this place, and hence allow some more + obscurity. + */ + core::stringc Password; +}; + +//! Class which is able to create an archive from a file. +/** If you want the Irrlicht Engine be able to load archives of +currently unsupported file formats (e.g .wad), then implement +this and add your new Archive loader with +IFileSystem::addArchiveLoader() to the engine. */ +class IArchiveLoader : public virtual IReferenceCounted +{ +public: + //! Check if the file might be loaded by this class + /** Check based on the file extension (e.g. ".zip") + \param filename Name of file to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(const path& filename) const =0; + + //! Check if the file might be loaded by this class + /** This check may look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const =0; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0; + + //! Creates an archive from the filename + /** \param filename File to use. + \param ignoreCase Searching is performed without regarding the case + \param ignorePaths Files are searched for without checking for the directories + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0; + + //! Creates an archive from the file + /** \param file File handle to use. + \param ignoreCase Searching is performed without regarding the case + \param ignorePaths Files are searched for without checking for the directories + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const =0; +}; + + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IFileList.h b/src/others/irrlicht-1.8.1/include/IFileList.h new file mode 100644 index 0000000..4c2f8ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IFileList.h @@ -0,0 +1,94 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_FILE_LIST_H_INCLUDED__ +#define __I_FILE_LIST_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "path.h" + +namespace irr +{ +namespace io +{ + +//! Provides a list of files and folders. +/** File lists usually contain a list of all files in a given folder, +but can also contain a complete directory structure. */ +class IFileList : public virtual IReferenceCounted +{ +public: + //! Get the number of files in the filelist. + /** \return Amount of files and directories in the file list. */ + virtual u32 getFileCount() const = 0; + + //! Gets the name of a file in the list, based on an index. + /** The path is not included in this name. Use getFullFileName for this. + \param index is the zero based index of the file which name should + be returned. The index must be less than the amount getFileCount() returns. + \return File name of the file. Returns 0, if an error occured. */ + virtual const io::path& getFileName(u32 index) const = 0; + + //! Gets the full name of a file in the list including the path, based on an index. + /** \param index is the zero based index of the file which name should + be returned. The index must be less than the amount getFileCount() returns. + \return File name of the file. Returns 0 if an error occured. */ + virtual const io::path& getFullFileName(u32 index) const = 0; + + //! Returns the size of a file in the file list, based on an index. + /** \param index is the zero based index of the file which should be returned. + The index must be less than the amount getFileCount() returns. + \return The size of the file in bytes. */ + virtual u32 getFileSize(u32 index) const = 0; + + //! Returns the file offset of a file in the file list, based on an index. + /** \param index is the zero based index of the file which should be returned. + The index must be less than the amount getFileCount() returns. + \return The offset of the file in bytes. */ + virtual u32 getFileOffset(u32 index) const = 0; + + //! Returns the ID of a file in the file list, based on an index. + /** This optional ID can be used to link the file list entry to information held + elsewhere. For example this could be an index in an IFileArchive, linking the entry + to its data offset, uncompressed size and CRC. + \param index is the zero based index of the file which should be returned. + The index must be less than the amount getFileCount() returns. + \return The ID of the file. */ + virtual u32 getID(u32 index) const = 0; + + //! Check if the file is a directory + /** \param index The zero based index which will be checked. The index + must be less than the amount getFileCount() returns. + \return True if the file is a directory, else false. */ + virtual bool isDirectory(u32 index) const = 0; + + //! Searches for a file or folder in the list + /** Searches for a file by name + \param filename The name of the file to search for. + \param isFolder True if you are searching for a directory path, false if you are searching for a file + \return Returns the index of the file in the file list, or -1 if + no matching name name was found. */ + virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0; + + //! Returns the base path of the file list + virtual const io::path& getPath() const = 0; + + //! Add as a file or folder to the list + /** \param fullPath The file name including path, from the root of the file list. + \param isDirectory True if this is a directory rather than a file. + \param offset The file offset inside an archive + \param size The size of the file in bytes. + \param id The ID of the file in the archive which owns it */ + virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0) = 0; + + //! Sorts the file list. You should call this after adding any items to the file list + virtual void sort() = 0; +}; + +} // end namespace irr +} // end namespace io + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IFileSystem.h b/src/others/irrlicht-1.8.1/include/IFileSystem.h new file mode 100644 index 0000000..f158363 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IFileSystem.h @@ -0,0 +1,385 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_FILE_SYSTEM_H_INCLUDED__ +#define __I_FILE_SYSTEM_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "IXMLReader.h" +#include "IFileArchive.h" + +namespace irr +{ +namespace video +{ + class IVideoDriver; +} // end namespace video +namespace io +{ + +class IReadFile; +class IWriteFile; +class IFileList; +class IXMLWriter; +class IAttributes; + + +//! The FileSystem manages files and archives and provides access to them. +/** It manages where files are, so that modules which use the the IO do not +need to know where every file is located. A file could be in a .zip-Archive or +as file on disk, using the IFileSystem makes no difference to this. */ +class IFileSystem : public virtual IReferenceCounted +{ +public: + + //! Opens a file for read access. + /** \param filename: Name of file to open. + \return Pointer to the created file interface. + The returned pointer should be dropped when no longer needed. + See IReferenceCounted::drop() for more information. */ + virtual IReadFile* createAndOpenFile(const path& filename) =0; + + //! Creates an IReadFile interface for accessing memory like a file. + /** This allows you to use a pointer to memory where an IReadFile is requested. + \param memory: A pointer to the start of the file in memory + \param len: The length of the memory in bytes + \param fileName: The name given to this file + \param deleteMemoryWhenDropped: True if the memory should be deleted + along with the IReadFile when it is dropped. + \return Pointer to the created file interface. + The returned pointer should be dropped when no longer needed. + See IReferenceCounted::drop() for more information. + */ + virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0; + + //! Creates an IReadFile interface for accessing files inside files. + /** This is useful e.g. for archives. + \param fileName: The name given to this file + \param alreadyOpenedFile: Pointer to the enclosing file + \param pos: Start of the file inside alreadyOpenedFile + \param areaSize: The length of the file + \return A pointer to the created file interface. + The returned pointer should be dropped when no longer needed. + See IReferenceCounted::drop() for more information. + */ + virtual IReadFile* createLimitReadFile(const path& fileName, + IReadFile* alreadyOpenedFile, long pos, long areaSize) =0; + + //! Creates an IWriteFile interface for accessing memory like a file. + /** This allows you to use a pointer to memory where an IWriteFile is requested. + You are responsible for allocating enough memory. + \param memory: A pointer to the start of the file in memory (allocated by you) + \param len: The length of the memory in bytes + \param fileName: The name given to this file + \param deleteMemoryWhenDropped: True if the memory should be deleted + along with the IWriteFile when it is dropped. + \return Pointer to the created file interface. + The returned pointer should be dropped when no longer needed. + See IReferenceCounted::drop() for more information. + */ + virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0; + + + //! Opens a file for write access. + /** \param filename: Name of file to open. + \param append: If the file already exist, all write operations are + appended to the file. + \return Pointer to the created file interface. 0 is returned, if the + file could not created or opened for writing. + The returned pointer should be dropped when no longer needed. + See IReferenceCounted::drop() for more information. */ + virtual IWriteFile* createAndWriteFile(const path& filename, bool append=false) =0; + + //! Adds an archive to the file system. + /** After calling this, the Irrlicht Engine will also search and open + files directly from this archive. This is useful for hiding data from + the end user, speeding up file access and making it possible to access + for example Quake3 .pk3 files, which are just renamed .zip files. By + default Irrlicht supports ZIP, PAK, TAR, PNK, and directories as + archives. You can provide your own archive types by implementing + IArchiveLoader and passing an instance to addArchiveLoader. + Irrlicht supports AES-encrypted zip files, and the advanced compression + techniques lzma and bzip2. + \param filename: Filename of the archive to add to the file system. + \param ignoreCase: If set to true, files in the archive can be accessed without + writing all letters in the right case. + \param ignorePaths: If set to true, files in the added archive can be accessed + without its complete path. + \param archiveType: If no specific E_FILE_ARCHIVE_TYPE is selected then + the type of archive will depend on the extension of the file name. If + you use a different extension then you can use this parameter to force + a specific type of archive. + \param password An optional password, which is used in case of encrypted archives. + \param retArchive A pointer that will be set to the archive that is added. + \return True if the archive was added successfully, false if not. */ + virtual bool addFileArchive(const path& filename, bool ignoreCase=true, + bool ignorePaths=true, + E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, + const core::stringc& password="", + IFileArchive** retArchive=0) =0; + + //! Adds an archive to the file system. + /** After calling this, the Irrlicht Engine will also search and open + files directly from this archive. This is useful for hiding data from + the end user, speeding up file access and making it possible to access + for example Quake3 .pk3 files, which are just renamed .zip files. By + default Irrlicht supports ZIP, PAK, TAR, PNK, and directories as + archives. You can provide your own archive types by implementing + IArchiveLoader and passing an instance to addArchiveLoader. + Irrlicht supports AES-encrypted zip files, and the advanced compression + techniques lzma and bzip2. + If you want to add a directory as an archive, prefix its name with a + slash in order to let Irrlicht recognize it as a folder mount (mypath/). + Using this technique one can build up a search order, because archives + are read first, and can be used more easily with relative filenames. + \param file: Archive to add to the file system. + \param ignoreCase: If set to true, files in the archive can be accessed without + writing all letters in the right case. + \param ignorePaths: If set to true, files in the added archive can be accessed + without its complete path. + \param archiveType: If no specific E_FILE_ARCHIVE_TYPE is selected then + the type of archive will depend on the extension of the file name. If + you use a different extension then you can use this parameter to force + a specific type of archive. + \param password An optional password, which is used in case of encrypted archives. + \param retArchive A pointer that will be set to the archive that is added. + \return True if the archive was added successfully, false if not. */ + virtual bool addFileArchive(IReadFile* file, bool ignoreCase=true, + bool ignorePaths=true, + E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, + const core::stringc& password="", + IFileArchive** retArchive=0) =0; + + //! Adds an archive to the file system. + /** \param archive: The archive to add to the file system. + \return True if the archive was added successfully, false if not. */ + virtual bool addFileArchive(IFileArchive* archive) =0; + + //! Get the number of archives currently attached to the file system + virtual u32 getFileArchiveCount() const =0; + + //! Removes an archive from the file system. + /** This will close the archive and free any file handles, but will not + close resources which have already been loaded and are now cached, for + example textures and meshes. + \param index: The index of the archive to remove + \return True on success, false on failure */ + virtual bool removeFileArchive(u32 index) =0; + + //! Removes an archive from the file system. + /** This will close the archive and free any file handles, but will not + close resources which have already been loaded and are now cached, for + example textures and meshes. Note that a relative filename might be + interpreted differently on each call, depending on the current working + directory. In case you want to remove an archive that was added using + a relative path name, you have to change to the same working directory + again. This means, that the filename given on creation is not an + identifier for the archive, but just a usual filename that is used for + locating the archive to work with. + \param filename The archive pointed to by the name will be removed + \return True on success, false on failure */ + virtual bool removeFileArchive(const path& filename) =0; + + //! Removes an archive from the file system. + /** This will close the archive and free any file handles, but will not + close resources which have already been loaded and are now cached, for + example textures and meshes. + \param archive The archive to remove. + \return True on success, false on failure */ + virtual bool removeFileArchive(const IFileArchive* archive) =0; + + //! Changes the search order of attached archives. + /** + \param sourceIndex: The index of the archive to change + \param relative: The relative change in position, archives with a lower index are searched first */ + virtual bool moveFileArchive(u32 sourceIndex, s32 relative) =0; + + //! Get the archive at a given index. + virtual IFileArchive* getFileArchive(u32 index) =0; + + //! Adds an external archive loader to the engine. + /** Use this function to add support for new archive types to the + engine, for example proprietary or encrypted file storage. */ + virtual void addArchiveLoader(IArchiveLoader* loader) =0; + + //! Gets the number of archive loaders currently added + virtual u32 getArchiveLoaderCount() const = 0; + + //! Retrieve the given archive loader + /** \param index The index of the loader to retrieve. This parameter is an 0-based + array index. + \return A pointer to the specified loader, 0 if the index is incorrect. */ + virtual IArchiveLoader* getArchiveLoader(u32 index) const = 0; + + //! Adds a zip archive to the file system. + /** \deprecated This function is provided for compatibility + with older versions of Irrlicht and may be removed in Irrlicht 1.9, + you should use addFileArchive instead. + After calling this, the Irrlicht Engine will search and open files directly from this archive too. + This is useful for hiding data from the end user, speeding up file access and making it possible to + access for example Quake3 .pk3 files, which are no different than .zip files. + \param filename: Filename of the zip archive to add to the file system. + \param ignoreCase: If set to true, files in the archive can be accessed without + writing all letters in the right case. + \param ignorePaths: If set to true, files in the added archive can be accessed + without its complete path. + \return True if the archive was added successfully, false if not. */ + _IRR_DEPRECATED_ virtual bool addZipFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) + { + return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_ZIP); + } + + //! Adds an unzipped archive (or basedirectory with subdirectories..) to the file system. + /** \deprecated This function is provided for compatibility + with older versions of Irrlicht and may be removed in Irrlicht 1.9, + you should use addFileArchive instead. + Useful for handling data which will be in a zip file + \param filename: Filename of the unzipped zip archive base directory to add to the file system. + \param ignoreCase: If set to true, files in the archive can be accessed without + writing all letters in the right case. + \param ignorePaths: If set to true, files in the added archive can be accessed + without its complete path. + \return True if the archive was added successful, false if not. */ + _IRR_DEPRECATED_ virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) + { + return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_FOLDER); + } + + //! Adds a pak archive to the file system. + /** \deprecated This function is provided for compatibility + with older versions of Irrlicht and may be removed in Irrlicht 1.9, + you should use addFileArchive instead. + After calling this, the Irrlicht Engine will search and open files directly from this archive too. + This is useful for hiding data from the end user, speeding up file access and making it possible to + access for example Quake2/KingPin/Hexen2 .pak files + \param filename: Filename of the pak archive to add to the file system. + \param ignoreCase: If set to true, files in the archive can be accessed without + writing all letters in the right case. + \param ignorePaths: If set to true, files in the added archive can be accessed + without its complete path.(should not use with Quake2 paks + \return True if the archive was added successful, false if not. */ + _IRR_DEPRECATED_ virtual bool addPakFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) + { + return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_PAK); + } + + //! Get the current working directory. + /** \return Current working directory as a string. */ + virtual const path& getWorkingDirectory() =0; + + //! Changes the current working directory. + /** \param newDirectory: A string specifying the new working directory. + The string is operating system dependent. Under Windows it has + the form ":\\\<..>". An example would be: "C:\Windows\" + \return True if successful, otherwise false. */ + virtual bool changeWorkingDirectoryTo(const path& newDirectory) =0; + + //! Converts a relative path to an absolute (unique) path, resolving symbolic links if required + /** \param filename Possibly relative file or directory name to query. + \result Absolute filename which points to the same file. */ + virtual path getAbsolutePath(const path& filename) const =0; + + //! Get the directory a file is located in. + /** \param filename: The file to get the directory from. + \return String containing the directory of the file. */ + virtual path getFileDir(const path& filename) const =0; + + //! Get the base part of a filename, i.e. the name without the directory part. + /** If no directory is prefixed, the full name is returned. + \param filename: The file to get the basename from + \param keepExtension True if filename with extension is returned otherwise everything + after the final '.' is removed as well. */ + virtual path getFileBasename(const path& filename, bool keepExtension=true) const =0; + + //! flatten a path and file name for example: "/you/me/../." becomes "/you" + virtual path& flattenFilename(path& directory, const path& root="/") const =0; + + //! Get the relative filename, relative to the given directory + virtual path getRelativeFilename(const path& filename, const path& directory) const =0; + + //! Creates a list of files and directories in the current working directory and returns it. + /** \return a Pointer to the created IFileList is returned. After the list has been used + it has to be deleted using its IFileList::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IFileList* createFileList() =0; + + //! Creates an empty filelist + /** \return a Pointer to the created IFileList is returned. After the list has been used + it has to be deleted using its IFileList::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IFileList* createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths) =0; + + //! Set the active type of file system. + virtual EFileSystemType setFileListSystem(EFileSystemType listType) =0; + + //! Determines if a file exists and could be opened. + /** \param filename is the string identifying the file which should be tested for existence. + \return True if file exists, and false if it does not exist or an error occured. */ + virtual bool existFile(const path& filename) const =0; + + //! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*). + /** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for + more information on how to use the parser. + \return 0, if file could not be opened, otherwise a pointer to the created + IXMLReader is returned. After use, the reader + has to be deleted using its IXMLReader::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IXMLReader* createXMLReader(const path& filename) =0; + + //! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*). + /** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for + more information on how to use the parser. + \return 0, if file could not be opened, otherwise a pointer to the created + IXMLReader is returned. After use, the reader + has to be deleted using its IXMLReader::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IXMLReader* createXMLReader(IReadFile* file) =0; + + //! Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*). + /** Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for + more information on how to use the parser. + \return 0, if file could not be opened, otherwise a pointer to the created + IXMLReader is returned. After use, the reader + has to be deleted using its IXMLReaderUTF8::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IXMLReaderUTF8* createXMLReaderUTF8(const path& filename) =0; + + //! Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*). + /** Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for + more information on how to use the parser. + \return 0, if file could not be opened, otherwise a pointer to the created + IXMLReader is returned. After use, the reader + has to be deleted using its IXMLReaderUTF8::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IXMLReaderUTF8* createXMLReaderUTF8(IReadFile* file) =0; + + //! Creates a XML Writer from a file. + /** \return 0, if file could not be opened, otherwise a pointer to the created + IXMLWriter is returned. After use, the reader + has to be deleted using its IXMLWriter::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IXMLWriter* createXMLWriter(const path& filename) =0; + + //! Creates a XML Writer from a file. + /** \return 0, if file could not be opened, otherwise a pointer to the created + IXMLWriter is returned. After use, the reader + has to be deleted using its IXMLWriter::drop() method. + See IReferenceCounted::drop() for more information. */ + virtual IXMLWriter* createXMLWriter(IWriteFile* file) =0; + + //! Creates a new empty collection of attributes, usable for serialization and more. + /** \param driver: Video driver to be used to load textures when specified as attribute values. + Can be null to prevent automatic texture loading by attributes. + \return Pointer to the created object. + If you no longer need the object, you should call IAttributes::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IAttributes* createEmptyAttributes(video::IVideoDriver* driver=0) =0; +}; + + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGPUProgrammingServices.h b/src/others/irrlicht-1.8.1/include/IGPUProgrammingServices.h new file mode 100644 index 0000000..596f094 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGPUProgrammingServices.h @@ -0,0 +1,474 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GPU_PROGRAMMING_SERVICES_H_INCLUDED__ +#define __I_GPU_PROGRAMMING_SERVICES_H_INCLUDED__ + +#include "EShaderTypes.h" +#include "EMaterialTypes.h" +#include "EPrimitiveTypes.h" +#include "path.h" + +namespace irr +{ + +namespace io +{ + class IReadFile; +} // end namespace io + +namespace video +{ + +class IVideoDriver; +class IShaderConstantSetCallBack; + +//! Enumeration for different types of shading languages +enum E_GPU_SHADING_LANGUAGE +{ + //! The default language, so HLSL for Direct3D and GLSL for OpenGL. + EGSL_DEFAULT = 0, + + //! Cg shading language.*/ + EGSL_CG +}; + +//! Interface making it possible to create and use programs running on the GPU. +class IGPUProgrammingServices +{ +public: + + //! Destructor + virtual ~IGPUProgrammingServices() {} + + //! Adds a new high-level shading material renderer to the VideoDriver. + /** Currently only HLSL/D3D9 and GLSL/OpenGL are supported. + \param vertexShaderProgram String containing the source of the vertex + shader program. This can be 0 if no vertex program shall be used. + \param vertexShaderEntryPointName Name of the entry function of the + vertexShaderProgram (p.e. "main") + \param vsCompileTarget Vertex shader version the high level shader + shall be compiled to. + \param pixelShaderProgram String containing the source of the pixel + shader program. This can be 0 if no pixel shader shall be used. + \param pixelShaderEntryPointName Entry name of the function of the + pixelShaderProgram (p.e. "main") + \param psCompileTarget Pixel shader version the high level shader + shall be compiled to. + \param geometryShaderProgram String containing the source of the + geometry shader program. This can be 0 if no geometry shader shall be + used. + \param geometryShaderEntryPointName Entry name of the function of the + geometryShaderProgram (p.e. "main") + \param gsCompileTarget Geometry shader version the high level shader + shall be compiled to. + \param inType Type of vertices passed to geometry shader + \param outType Type of vertices created by geometry shader + \param verticesOut Maximal number of vertices created by geometry + shader. If 0, maximal number supported is assumed. + \param callback Pointer to an implementation of + IShaderConstantSetCallBack in which you can set the needed vertex, + pixel, and geometry shader program constants. Set this to 0 if you + don't need this. + \param baseMaterial Base material which renderstates will be used to + shade the material. + \param userData a user data int. This int can be set to any value and + will be set as parameter in the callback method when calling + OnSetConstants(). In this way it is easily possible to use the same + callback method for multiple materials and distinguish between them + during the call. + \param shaderLang a type of shading language used in current shader. + \return Number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if an error + occured, e.g. if a shader program could not be compiled or a compile + target is not reachable. The error strings are then printed to the + error log and can be catched with a custom event receiver. */ + virtual s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0; + + //! convenience function for use without geometry shaders + s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName="main", + E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, + const c8* pixelShaderProgram=0, + const c8* pixelShaderEntryPointName="main", + E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, + IShaderConstantSetCallBack* callback=0, + E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, + s32 userData=0, + E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) + { + return addHighLevelShaderMaterial( + vertexShaderProgram, vertexShaderEntryPointName, + vsCompileTarget, pixelShaderProgram, + pixelShaderEntryPointName, psCompileTarget, + 0, "main", EGST_GS_4_0, + scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, + callback, baseMaterial, userData, shadingLang); + } + + //! convenience function for use with many defaults, without geometry shader + /** All shader names are set to "main" and compile targets are shader + type 1.1. + */ + s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* pixelShaderProgram=0, + IShaderConstantSetCallBack* callback=0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData=0) + { + return addHighLevelShaderMaterial( + vertexShaderProgram, "main", + EVST_VS_1_1, pixelShaderProgram, + "main", EPST_PS_1_1, + 0, "main", EGST_GS_4_0, + scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, + callback, baseMaterial, userData); + } + + //! convenience function for use with many defaults, with geometry shader + /** All shader names are set to "main" and compile targets are shader + type 1.1 and geometry shader 4.0. + */ + s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* pixelShaderProgram = 0, + const c8* geometryShaderProgram = 0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0 ) + { + return addHighLevelShaderMaterial( + vertexShaderProgram, "main", + EVST_VS_1_1, pixelShaderProgram, + "main", EPST_PS_1_1, + geometryShaderProgram, "main", EGST_GS_4_0, + inType, outType, verticesOut, + callback, baseMaterial, userData); + } + + //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. + /** \param vertexShaderProgramFileName Text file containing the source + of the vertex shader program. Set to empty string if no vertex shader + shall be created. + \param vertexShaderEntryPointName Name of the entry function of the + vertexShaderProgram (p.e. "main") + \param vsCompileTarget Vertex shader version the high level shader + shall be compiled to. + \param pixelShaderProgramFileName Text file containing the source of + the pixel shader program. Set to empty string if no pixel shader shall + be created. + \param pixelShaderEntryPointName Entry name of the function of the + pixelShaderProgram (p.e. "main") + \param psCompileTarget Pixel shader version the high level shader + shall be compiled to. + \param geometryShaderProgramFileName Name of the source of + the geometry shader program. Set to empty string if no geometry shader + shall be created. + \param geometryShaderEntryPointName Entry name of the function of the + geometryShaderProgram (p.e. "main") + \param gsCompileTarget Geometry shader version the high level shader + shall be compiled to. + \param inType Type of vertices passed to geometry shader + \param outType Type of vertices created by geometry shader + \param verticesOut Maximal number of vertices created by geometry + shader. If 0, maximal number supported is assumed. + \param callback Pointer to an implementation of + IShaderConstantSetCallBack in which you can set the needed vertex, + pixel, and geometry shader program constants. Set this to 0 if you + don't need this. + \param baseMaterial Base material which renderstates will be used to + shade the material. + \param userData a user data int. This int can be set to any value and + will be set as parameter in the callback method when calling + OnSetConstants(). In this way it is easily possible to use the same + callback method for multiple materials and distinguish between them + during the call. + \param shaderLang a type of shading language used in current shader. + \return Number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if an error + occured, e.g. if a shader program could not be compiled or a compile + target is not reachable. The error strings are then printed to the + error log and can be catched with a custom event receiver. */ + virtual s32 addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFileName, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const io::path& pixelShaderProgramFileName, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const io::path& geometryShaderProgramFileName, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0; + + //! convenience function for use without geometry shaders + s32 addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFileName, + const c8* vertexShaderEntryPointName = "main", + E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, + const io::path& pixelShaderProgramFileName = "", + const c8* pixelShaderEntryPointName = "main", + E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) + { + return addHighLevelShaderMaterialFromFiles( + vertexShaderProgramFileName, vertexShaderEntryPointName, + vsCompileTarget, pixelShaderProgramFileName, + pixelShaderEntryPointName, psCompileTarget, + "", "main", EGST_GS_4_0, + scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, + callback, baseMaterial, userData, shadingLang); + } + + //! convenience function for use with many defaults, without geometry shader + /** All shader names are set to "main" and compile targets are shader + type 1.1. + */ + s32 addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFileName, + const io::path& pixelShaderProgramFileName = "", + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0 ) + { + return addHighLevelShaderMaterialFromFiles( + vertexShaderProgramFileName, "main", + EVST_VS_1_1, pixelShaderProgramFileName, + "main", EPST_PS_1_1, + "", "main", EGST_GS_4_0, + scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, + callback, baseMaterial, userData); + } + + //! convenience function for use with many defaults, with geometry shader + /** All shader names are set to "main" and compile targets are shader + type 1.1 and geometry shader 4.0. + */ + s32 addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFileName, + const io::path& pixelShaderProgramFileName = "", + const io::path& geometryShaderProgramFileName = "", + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0 ) + { + return addHighLevelShaderMaterialFromFiles( + vertexShaderProgramFileName, "main", + EVST_VS_1_1, pixelShaderProgramFileName, + "main", EPST_PS_1_1, + geometryShaderProgramFileName, "main", EGST_GS_4_0, + inType, outType, verticesOut, + callback, baseMaterial, userData); + } + + //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. + /** \param vertexShaderProgram Text file handle containing the source + of the vertex shader program. Set to 0 if no vertex shader shall be + created. + \param vertexShaderEntryPointName Name of the entry function of the + vertexShaderProgram + \param vsCompileTarget Vertex shader version the high level shader + shall be compiled to. + \param pixelShaderProgram Text file handle containing the source of + the pixel shader program. Set to 0 if no pixel shader shall be created. + \param pixelShaderEntryPointName Entry name of the function of the + pixelShaderProgram (p.e. "main") + \param psCompileTarget Pixel shader version the high level shader + shall be compiled to. + \param geometryShaderProgram Text file handle containing the source of + the geometry shader program. Set to 0 if no geometry shader shall be + created. + \param geometryShaderEntryPointName Entry name of the function of the + geometryShaderProgram (p.e. "main") + \param gsCompileTarget Geometry shader version the high level shader + shall be compiled to. + \param inType Type of vertices passed to geometry shader + \param outType Type of vertices created by geometry shader + \param verticesOut Maximal number of vertices created by geometry + shader. If 0, maximal number supported is assumed. + \param callback Pointer to an implementation of + IShaderConstantSetCallBack in which you can set the needed vertex and + pixel shader program constants. Set this to 0 if you don't need this. + \param baseMaterial Base material which renderstates will be used to + shade the material. + \param userData a user data int. This int can be set to any value and + will be set as parameter in the callback method when calling + OnSetConstants(). In this way it is easily possible to use the same + callback method for multiple materials and distinguish between them + during the call. + \param shaderLang a type of shading language used in current shader. + \return Number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if an + error occured, e.g. if a shader program could not be compiled or a + compile target is not reachable. The error strings are then printed to + the error log and can be catched with a custom event receiver. */ + virtual s32 addHighLevelShaderMaterialFromFiles( + io::IReadFile* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + io::IReadFile* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + io::IReadFile* geometryShaderProgram, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0; + + //! convenience function for use without geometry shaders + s32 addHighLevelShaderMaterialFromFiles( + io::IReadFile* vertexShaderProgram, + const c8* vertexShaderEntryPointName = "main", + E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, + io::IReadFile* pixelShaderProgram = 0, + const c8* pixelShaderEntryPointName = "main", + E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) + { + return addHighLevelShaderMaterialFromFiles( + vertexShaderProgram, vertexShaderEntryPointName, + vsCompileTarget, pixelShaderProgram, + pixelShaderEntryPointName, psCompileTarget, + 0, "main", EGST_GS_4_0, + scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, + callback, baseMaterial, userData, shadingLang); + } + + //! Adds a new ASM shader material renderer to the VideoDriver + /** Note that it is a good idea to call IVideoDriver::queryFeature() in + advance to check if the IVideoDriver supports the vertex and/or pixel + shader version your are using. + + The material is added to the VideoDriver like with + IVideoDriver::addMaterialRenderer() and can be used like it had been + added with that method. + \param vertexShaderProgram String containing the source of the vertex + shader program. This can be 0 if no vertex program shall be used. + + For DX8 programs, the will always input registers look like this: v0: + position, v1: normal, v2: color, v3: texture cooridnates, v4: texture + coordinates 2 if available. + + For DX9 programs, you can manually set the registers using the dcl_ + statements. + \param pixelShaderProgram String containing the source of the pixel + shader program. This can be 0 if you don't want to use a pixel shader. + \param callback Pointer to an implementation of + IShaderConstantSetCallBack in which you can set the needed vertex and + pixel shader program constants. Set this to 0 if you don't need this. + \param baseMaterial Base material which renderstates will be used to + shade the material. + \param userData a user data int. This int can be set to any value and + will be set as parameter in the callback method when calling + OnSetConstants(). In this way it is easily possible to use the same + callback method for multiple materials and distinguish between them + during the call. + \return Returns the number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if an + error occured. -1 is returned for example if a vertex or pixel shader + program could not be compiled, the error strings are then printed out + into the error log, and can be catched with a custom event receiver. */ + virtual s32 addShaderMaterial(const c8* vertexShaderProgram = 0, + const c8* pixelShaderProgram = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0) = 0; + + //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. + /** \param vertexShaderProgram Text file containing the source of the + vertex shader program. Set to 0 if no shader shall be created. + \param pixelShaderProgram Text file containing the source of the pixel + shader program. Set to 0 if no shader shall be created. + \param callback Pointer to an IShaderConstantSetCallback object to + which the OnSetConstants function is called. + \param baseMaterial baseMaterial + \param userData a user data int. This int can be set to any value and + will be set as parameter in the callback method when calling + OnSetConstants(). In this way it is easily possible to use the same + callback method for multiple materials and distinguish between them + during the call. + \return Returns the number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if an + error occured. -1 is returned for example if a vertex or pixel shader + program could not be compiled, the error strings are then printed out + into the error log, and can be catched with a custom event receiver. */ + virtual s32 addShaderMaterialFromFiles(io::IReadFile* vertexShaderProgram, + io::IReadFile* pixelShaderProgram, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0) = 0; + + //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. + /** \param vertexShaderProgramFileName Text file name containing the + source of the vertex shader program. Set to 0 if no shader shall be + created. + \param pixelShaderProgramFileName Text file name containing the source + of the pixel shader program. Set to 0 if no shader shall be created. + \param callback Pointer to an IShaderConstantSetCallback object on + which the OnSetConstants function is called. + \param baseMaterial baseMaterial + \param userData a user data int. This int can be set to any value and + will be set as parameter in the callback method when calling + OnSetConstants(). In this way it is easily possible to use the same + callback method for multiple materials and distinguish between them + during the call. + \return Returns the number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if an + error occured. -1 is returned for example if a vertex or pixel shader + program could not be compiled, the error strings are then printed out + into the error log, and can be catched with a custom event receiver. */ + virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName, + const io::path& pixelShaderProgramFileName, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0) = 0; +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIButton.h b/src/others/irrlicht-1.8.1/include/IGUIButton.h new file mode 100644 index 0000000..1da880e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIButton.h @@ -0,0 +1,151 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_BUTTON_H_INCLUDED__ +#define __I_GUI_BUTTON_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ + +namespace video +{ + class ITexture; +} // end namespace video + +namespace gui +{ + class IGUIFont; + class IGUISpriteBank; + + enum EGUI_BUTTON_STATE + { + //! The button is not pressed + EGBS_BUTTON_UP=0, + //! The button is currently pressed down + EGBS_BUTTON_DOWN, + //! The mouse cursor is over the button + EGBS_BUTTON_MOUSE_OVER, + //! The mouse cursor is not over the button + EGBS_BUTTON_MOUSE_OFF, + //! The button has the focus + EGBS_BUTTON_FOCUSED, + //! The button doesn't have the focus + EGBS_BUTTON_NOT_FOCUSED, + //! not used, counts the number of enumerated items + EGBS_COUNT + }; + + //! Names for gui button state icons + const c8* const GUIButtonStateNames[] = + { + "buttonUp", + "buttonDown", + "buttonMouseOver", + "buttonMouseOff", + "buttonFocused", + "buttonNotFocused", + 0, + 0, + }; + + //! GUI Button interface. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_BUTTON_CLICKED + */ + class IGUIButton : public IGUIElement + { + public: + + //! constructor + IGUIButton(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_BUTTON, environment, parent, id, rectangle) {} + + //! Sets another skin independent font. + /** If this is set to zero, the button uses the font of the skin. + \param font: New font to set. */ + virtual void setOverrideFont(IGUIFont* font=0) = 0; + + //! Gets the override font (if any) + /** \return The override font (may be 0) */ + virtual IGUIFont* getOverrideFont(void) const = 0; + + //! Get the font which is used right now for drawing + /** Currently this is the override font when one is set and the + font of the active skin otherwise */ + virtual IGUIFont* getActiveFont() const = 0; + + //! Sets an image which should be displayed on the button when it is in normal state. + /** \param image: Image to be displayed */ + virtual void setImage(video::ITexture* image=0) = 0; + + //! Sets a background image for the button when it is in normal state. + /** \param image: Texture containing the image to be displayed + \param pos: Position in the texture, where the image is located */ + virtual void setImage(video::ITexture* image, const core::rect& pos) = 0; + + //! Sets a background image for the button when it is in pressed state. + /** If no images is specified for the pressed state via + setPressedImage(), this image is also drawn in pressed state. + \param image: Image to be displayed */ + virtual void setPressedImage(video::ITexture* image=0) = 0; + + //! Sets an image which should be displayed on the button when it is in pressed state. + /** \param image: Texture containing the image to be displayed + \param pos: Position in the texture, where the image is located */ + virtual void setPressedImage(video::ITexture* image, const core::rect& pos) = 0; + + //! Sets the sprite bank used by the button + virtual void setSpriteBank(IGUISpriteBank* bank=0) = 0; + + //! Sets the animated sprite for a specific button state + /** \param index: Number of the sprite within the sprite bank, use -1 for no sprite + \param state: State of the button to set the sprite for + \param index: The sprite number from the current sprite bank + \param color: The color of the sprite + \param loop: True if the animation should loop, false if not + */ + virtual void setSprite(EGUI_BUTTON_STATE state, s32 index, + video::SColor color=video::SColor(255,255,255,255), bool loop=false) = 0; + + //! Sets if the button should behave like a push button. + /** Which means it can be in two states: Normal or Pressed. With a click on the button, + the user can change the state of the button. */ + virtual void setIsPushButton(bool isPushButton=true) = 0; + + //! Sets the pressed state of the button if this is a pushbutton + virtual void setPressed(bool pressed=true) = 0; + + //! Returns if the button is currently pressed + virtual bool isPressed() const = 0; + + //! Sets if the alpha channel should be used for drawing background images on the button (default is false) + virtual void setUseAlphaChannel(bool useAlphaChannel=true) = 0; + + //! Returns if the alpha channel should be used for drawing background images on the button + virtual bool isAlphaChannelUsed() const = 0; + + //! Returns whether the button is a push button + virtual bool isPushButton() const = 0; + + //! Sets if the button should use the skin to draw its border and button face (default is true) + virtual void setDrawBorder(bool border=true) = 0; + + //! Returns if the border and button face are being drawn using the skin + virtual bool isDrawingBorder() const = 0; + + //! Sets if the button should scale the button images to fit + virtual void setScaleImage(bool scaleImage=true) = 0; + + //! Checks whether the button scales the used images + virtual bool isScalingImage() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUICheckBox.h b/src/others/irrlicht-1.8.1/include/IGUICheckBox.h new file mode 100644 index 0000000..5dec952 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUICheckBox.h @@ -0,0 +1,38 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_CHECKBOX_H_INCLUDED__ +#define __I_GUI_CHECKBOX_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + + //! GUI Check box interface. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_CHECKBOX_CHANGED + */ + class IGUICheckBox : public IGUIElement + { + public: + + //! constructor + IGUICheckBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_CHECK_BOX, environment, parent, id, rectangle) {} + + //! Set if box is checked. + virtual void setChecked(bool checked) = 0; + + //! Returns true if box is checked. + virtual bool isChecked() const = 0; + }; + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIColorSelectDialog.h b/src/others/irrlicht-1.8.1/include/IGUIColorSelectDialog.h new file mode 100644 index 0000000..3d0357b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIColorSelectDialog.h @@ -0,0 +1,30 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ +#define __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + + //! Standard color chooser dialog. + class IGUIColorSelectDialog : public IGUIElement + { + public: + + //! constructor + IGUIColorSelectDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_COLOR_SELECT_DIALOG, environment, parent, id, rectangle) {} + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIComboBox.h b/src/others/irrlicht-1.8.1/include/IGUIComboBox.h new file mode 100644 index 0000000..72c4187 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIComboBox.h @@ -0,0 +1,74 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_COMBO_BOX_H_INCLUDED__ +#define __I_GUI_COMBO_BOX_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + + //! Combobox widget + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_COMBO_BOX_CHANGED + */ + class IGUIComboBox : public IGUIElement + { + public: + + //! constructor + IGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_COMBO_BOX, environment, parent, id, rectangle) {} + + //! Returns amount of items in box + virtual u32 getItemCount() const = 0; + + //! Returns string of an item. the idx may be a value from 0 to itemCount-1 + virtual const wchar_t* getItem(u32 idx) const = 0; + + //! Returns item data of an item. the idx may be a value from 0 to itemCount-1 + virtual u32 getItemData(u32 idx) const = 0; + + //! Returns index based on item data + virtual s32 getIndexForItemData(u32 data ) const = 0; + + //! Adds an item and returns the index of it + virtual u32 addItem(const wchar_t* text, u32 data = 0) = 0; + + //! Removes an item from the combo box. + /** Warning. This will change the index of all following items */ + virtual void removeItem(u32 idx) = 0; + + //! Deletes all items in the combo box + virtual void clear() = 0; + + //! Returns id of selected item. returns -1 if no item is selected. + virtual s32 getSelected() const = 0; + + //! Sets the selected item. Set this to -1 if no item should be selected + virtual void setSelected(s32 idx) = 0; + + //! Sets text justification of the text area + /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), + EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text. + \param vertical: EGUIA_UPPERLEFT to align with top edge, + EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ + virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; + + //! Set the maximal number of rows for the selection listbox + virtual void setMaxSelectionRows(u32 max) = 0; + + //! Get the maximimal number of rows for the selection listbox + virtual u32 getMaxSelectionRows() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIContextMenu.h b/src/others/irrlicht-1.8.1/include/IGUIContextMenu.h new file mode 100644 index 0000000..c9a0659 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIContextMenu.h @@ -0,0 +1,162 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__ +#define __I_GUI_CONTEXT_MENU_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + //! Close behavior. + //! Default is ECMC_REMOVE + enum ECONTEXT_MENU_CLOSE + { + //! do nothing - menu stays open + ECMC_IGNORE = 0, + + //! remove the gui element + ECMC_REMOVE = 1, + + //! call setVisible(false) + ECMC_HIDE = 2 + + // note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags. + }; + + //! GUI Context menu interface. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_ELEMENT_CLOSED + \li EGET_MENU_ITEM_SELECTED + */ + class IGUIContextMenu : public IGUIElement + { + public: + + //! constructor + IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {} + + //! set behavior when menus are closed + virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0; + + //! get current behavior when the menu will be closed + virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0; + + //! Get amount of menu items + virtual u32 getItemCount() const = 0; + + //! Adds a menu item. + /** \param text: Text of menu item. Set this to 0 to create + an separator instead of a real item, which is the same like + calling addSeparator(); + \param commandId: Command id of menu item, a simple id you may + set to whatever you want. + \param enabled: Specifies if the menu item should be enabled. + \param hasSubMenu: Set this to true if there should be a submenu + at this item. You can access this submenu via getSubMenu(). + \param checked: Specifies if the menu item should be initially checked. + \param autoChecking: Specifies if the item should be checked by clicking + \return Returns the index of the new item */ + virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; + + //! Insert a menu item at specified position. + /** \param idx: Position to insert the new element, + should be smaller than itemcount otherwise the item is added to the end. + \param text: Text of menu item. Set this to 0 to create + an separator instead of a real item, which is the same like + calling addSeparator(); + \param commandId: Command id of menu item, a simple id you may + set to whatever you want. + \param enabled: Specifies if the menu item should be enabled. + \param hasSubMenu: Set this to true if there should be a submenu + at this item. You can access this submenu via getSubMenu(). + \param checked: Specifies if the menu item should be initially checked. + \param autoChecking: Specifies if the item should be checked by clicking + \return Returns the index of the new item */ + virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; + + //! Find an item by it's CommandID + /** + \param commandId: We are looking for the first item which has this commandID + \param idxStartSearch: Start searching from this index. + \return Returns the index of the item when found or otherwise -1. */ + virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0; + + //! Adds a separator item to the menu + virtual void addSeparator() = 0; + + //! Get text of the menu item. + /** \param idx: Zero based index of the menu item */ + virtual const wchar_t* getItemText(u32 idx) const = 0; + + //! Sets text of the menu item. + /** \param idx: Zero based index of the menu item + \param text: New text of the item. */ + virtual void setItemText(u32 idx, const wchar_t* text) = 0; + + //! Check if a menu item is enabled + /** \param idx: Zero based index of the menu item */ + virtual bool isItemEnabled(u32 idx) const = 0; + + //! Sets if the menu item should be enabled. + /** \param idx: Zero based index of the menu item + \param enabled: True if it is enabled, otherwise false. */ + virtual void setItemEnabled(u32 idx, bool enabled) = 0; + + //! Sets if the menu item should be checked. + /** \param idx: Zero based index of the menu item + \param enabled: True if it is enabled, otherwise false. */ + virtual void setItemChecked(u32 idx, bool enabled) = 0; + + //! Check if a menu item is checked + /** \param idx: Zero based index of the menu item */ + virtual bool isItemChecked(u32 idx) const = 0; + + //! Removes a menu item + /** \param idx: Zero based index of the menu item */ + virtual void removeItem(u32 idx) = 0; + + //! Removes all menu items + virtual void removeAllItems() = 0; + + //! Get the selected item in the menu + /** \return Index of the selected item, -1 if none selected. */ + virtual s32 getSelectedItem() const = 0; + + //! Get the command id of a menu item + /** \param idx: Zero based index of the menu item */ + virtual s32 getItemCommandId(u32 idx) const = 0; + + //! Sets the command id of a menu item + /** \param idx: Zero based index of the menu item + \param id: Command id of menu item, a simple id you may + set to whatever you want. */ + virtual void setItemCommandId(u32 idx, s32 id) = 0; + + //! Get a pointer to the submenu of an item. + /** 0 is returned if there is no submenu + \param idx: Zero based index of the menu item + \return Returns a pointer to the submenu of an item. */ + virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0; + + //! should the element change the checked status on clicking + virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0; + + //! does the element change the checked status on clicking + virtual bool getItemAutoChecking(u32 idx) const = 0; + + //! When an eventparent is set it receives events instead of the usual parent element + virtual void setEventParent(IGUIElement *parent) = 0; + }; + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIEditBox.h b/src/others/irrlicht-1.8.1/include/IGUIEditBox.h new file mode 100644 index 0000000..e7b637e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIEditBox.h @@ -0,0 +1,135 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_EDIT_BOX_H_INCLUDED__ +#define __I_GUI_EDIT_BOX_H_INCLUDED__ + +#include "IGUIElement.h" +#include "SColor.h" + +namespace irr +{ +namespace gui +{ + class IGUIFont; + + //! Single line edit box for editing simple text. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_EDITBOX_ENTER + \li EGET_EDITBOX_CHANGED + \li EGET_EDITBOX_MARKING_CHANGED + */ + class IGUIEditBox : public IGUIElement + { + public: + + //! constructor + IGUIEditBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_EDIT_BOX, environment, parent, id, rectangle) {} + + //! Sets another skin independent font. + /** If this is set to zero, the button uses the font of the skin. + \param font: New font to set. */ + virtual void setOverrideFont(IGUIFont* font=0) = 0; + + //! Gets the override font (if any) + /** \return The override font (may be 0) */ + virtual IGUIFont* getOverrideFont() const = 0; + + //! Get the font which is used right now for drawing + /** Currently this is the override font when one is set and the + font of the active skin otherwise */ + virtual IGUIFont* getActiveFont() const = 0; + + //! Sets another color for the text. + /** If set, the edit box does not use the EGDC_BUTTON_TEXT color defined + in the skin, but the set color instead. You don't need to call + IGUIEditBox::enableOverrrideColor(true) after this, this is done + by this function. + If you set a color, and you want the text displayed with the color + of the skin again, call IGUIEditBox::enableOverrideColor(false); + \param color: New color of the text. */ + virtual void setOverrideColor(video::SColor color) = 0; + + //! Gets the override color + virtual video::SColor getOverrideColor() const = 0; + + //! Sets if the text should use the override color or the color in the gui skin. + /** \param enable: If set to true, the override color, which can be set + with IGUIEditBox::setOverrideColor is used, otherwise the + EGDC_BUTTON_TEXT color of the skin. */ + virtual void enableOverrideColor(bool enable) = 0; + + //! Checks if an override color is enabled + /** \return true if the override color is enabled, false otherwise */ + virtual bool isOverrideColorEnabled(void) const = 0; + + //! Sets whether to draw the background + virtual void setDrawBackground(bool draw) = 0; + + //! Turns the border on or off + /** \param border: true if you want the border to be drawn, false if not */ + virtual void setDrawBorder(bool border) = 0; + + //! Sets text justification mode + /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), + EGUIA_LOWERRIGHT for right justified, or EGUIA_CENTER for centered text. + \param vertical: EGUIA_UPPERLEFT to align with top edge, + EGUIA_LOWERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ + virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; + + //! Enables or disables word wrap. + /** \param enable: If set to true, words going over one line are + broken to the next line. */ + virtual void setWordWrap(bool enable) = 0; + + //! Checks if word wrap is enabled + /** \return true if word wrap is enabled, false otherwise */ + virtual bool isWordWrapEnabled() const = 0; + + //! Enables or disables newlines. + /** \param enable: If set to true, the EGET_EDITBOX_ENTER event will not be fired, + instead a newline character will be inserted. */ + virtual void setMultiLine(bool enable) = 0; + + //! Checks if multi line editing is enabled + /** \return true if multi-line is enabled, false otherwise */ + virtual bool isMultiLineEnabled() const = 0; + + //! Enables or disables automatic scrolling with cursor position + /** \param enable: If set to true, the text will move around with the cursor position */ + virtual void setAutoScroll(bool enable) = 0; + + //! Checks to see if automatic scrolling is enabled + /** \return true if automatic scrolling is enabled, false if not */ + virtual bool isAutoScrollEnabled() const = 0; + + //! Sets whether the edit box is a password box. Setting this to true will + /** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x + \param passwordBox: true to enable password, false to disable + \param passwordChar: the character that is displayed instead of letters */ + virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') = 0; + + //! Returns true if the edit box is currently a password box. + virtual bool isPasswordBox() const = 0; + + //! Gets the size area of the text in the edit box + /** \return The size in pixels of the text */ + virtual core::dimension2du getTextDimension() = 0; + + //! Sets the maximum amount of characters which may be entered in the box. + /** \param max: Maximum amount of characters. If 0, the character amount is + infinity. */ + virtual void setMax(u32 max) = 0; + + //! Returns maximum amount of characters, previously set by setMax(); + virtual u32 getMax() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIElement.h b/src/others/irrlicht-1.8.1/include/IGUIElement.h new file mode 100644 index 0000000..40df446 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIElement.h @@ -0,0 +1,1037 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_ELEMENT_H_INCLUDED__ +#define __I_GUI_ELEMENT_H_INCLUDED__ + +#include "IAttributeExchangingObject.h" +#include "irrList.h" +#include "rect.h" +#include "irrString.h" +#include "IEventReceiver.h" +#include "EGUIElementTypes.h" +#include "EGUIAlignment.h" +#include "IAttributes.h" + +namespace irr +{ +namespace gui +{ + +class IGUIEnvironment; + +//! Base class of all GUI elements. +class IGUIElement : public virtual io::IAttributeExchangingObject, public IEventReceiver +{ +public: + + //! Constructor + IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment* environment, IGUIElement* parent, + s32 id, const core::rect& rectangle) + : Parent(0), RelativeRect(rectangle), AbsoluteRect(rectangle), + AbsoluteClippingRect(rectangle), DesiredRect(rectangle), + MaxSize(0,0), MinSize(1,1), IsVisible(true), IsEnabled(true), + IsSubElement(false), NoClip(false), ID(id), IsTabStop(false), TabOrder(-1), IsTabGroup(false), + AlignLeft(EGUIA_UPPERLEFT), AlignRight(EGUIA_UPPERLEFT), AlignTop(EGUIA_UPPERLEFT), AlignBottom(EGUIA_UPPERLEFT), + Environment(environment), Type(type) + { + #ifdef _DEBUG + setDebugName("IGUIElement"); + #endif + + // if we were given a parent to attach to + if (parent) + { + parent->addChildToEnd(this); + recalculateAbsolutePosition(true); + } + } + + + //! Destructor + virtual ~IGUIElement() + { + // delete all children + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + (*it)->Parent = 0; + (*it)->drop(); + } + } + + + //! Returns parent of this element. + IGUIElement* getParent() const + { + return Parent; + } + + + //! Returns the relative rectangle of this element. + core::rect getRelativePosition() const + { + return RelativeRect; + } + + + //! Sets the relative rectangle of this element. + /** \param r The absolute position to set */ + void setRelativePosition(const core::rect& r) + { + if (Parent) + { + const core::rect& r2 = Parent->getAbsolutePosition(); + + core::dimension2df d((f32)(r2.getSize().Width), (f32)(r2.getSize().Height)); + + if (AlignLeft == EGUIA_SCALE) + ScaleRect.UpperLeftCorner.X = (f32)r.UpperLeftCorner.X / d.Width; + if (AlignRight == EGUIA_SCALE) + ScaleRect.LowerRightCorner.X = (f32)r.LowerRightCorner.X / d.Width; + if (AlignTop == EGUIA_SCALE) + ScaleRect.UpperLeftCorner.Y = (f32)r.UpperLeftCorner.Y / d.Height; + if (AlignBottom == EGUIA_SCALE) + ScaleRect.LowerRightCorner.Y = (f32)r.LowerRightCorner.Y / d.Height; + } + + DesiredRect = r; + updateAbsolutePosition(); + } + + //! Sets the relative rectangle of this element, maintaining its current width and height + /** \param position The new relative position to set. Width and height will not be changed. */ + void setRelativePosition(const core::position2di & position) + { + const core::dimension2di mySize = RelativeRect.getSize(); + const core::rect rectangle(position.X, position.Y, + position.X + mySize.Width, position.Y + mySize.Height); + setRelativePosition(rectangle); + } + + + //! Sets the relative rectangle of this element as a proportion of its parent's area. + /** \note This method used to be 'void setRelativePosition(const core::rect& r)' + \param r The rectangle to set, interpreted as a proportion of the parent's area. + Meaningful values are in the range [0...1], unless you intend this element to spill + outside its parent. */ + void setRelativePositionProportional(const core::rect& r) + { + if (!Parent) + return; + + const core::dimension2di& d = Parent->getAbsolutePosition().getSize(); + + DesiredRect = core::rect( + core::floor32((f32)d.Width * r.UpperLeftCorner.X), + core::floor32((f32)d.Height * r.UpperLeftCorner.Y), + core::floor32((f32)d.Width * r.LowerRightCorner.X), + core::floor32((f32)d.Height * r.LowerRightCorner.Y)); + + ScaleRect = r; + + updateAbsolutePosition(); + } + + + //! Gets the absolute rectangle of this element + core::rect getAbsolutePosition() const + { + return AbsoluteRect; + } + + + //! Returns the visible area of the element. + core::rect getAbsoluteClippingRect() const + { + return AbsoluteClippingRect; + } + + + //! Sets whether the element will ignore its parent's clipping rectangle + /** \param noClip If true, the element will not be clipped by its parent's clipping rectangle. */ + void setNotClipped(bool noClip) + { + NoClip = noClip; + updateAbsolutePosition(); + } + + + //! Gets whether the element will ignore its parent's clipping rectangle + /** \return true if the element is not clipped by its parent's clipping rectangle. */ + bool isNotClipped() const + { + return NoClip; + } + + + //! Sets the maximum size allowed for this element + /** If set to 0,0, there is no maximum size */ + void setMaxSize(core::dimension2du size) + { + MaxSize = size; + updateAbsolutePosition(); + } + + + //! Sets the minimum size allowed for this element + void setMinSize(core::dimension2du size) + { + MinSize = size; + if (MinSize.Width < 1) + MinSize.Width = 1; + if (MinSize.Height < 1) + MinSize.Height = 1; + updateAbsolutePosition(); + } + + + //! The alignment defines how the borders of this element will be positioned when the parent element is resized. + void setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom) + { + AlignLeft = left; + AlignRight = right; + AlignTop = top; + AlignBottom = bottom; + + if (Parent) + { + core::rect r(Parent->getAbsolutePosition()); + + core::dimension2df d((f32)r.getSize().Width, (f32)r.getSize().Height); + + if (AlignLeft == EGUIA_SCALE) + ScaleRect.UpperLeftCorner.X = (f32)DesiredRect.UpperLeftCorner.X / d.Width; + if (AlignRight == EGUIA_SCALE) + ScaleRect.LowerRightCorner.X = (f32)DesiredRect.LowerRightCorner.X / d.Width; + if (AlignTop == EGUIA_SCALE) + ScaleRect.UpperLeftCorner.Y = (f32)DesiredRect.UpperLeftCorner.Y / d.Height; + if (AlignBottom == EGUIA_SCALE) + ScaleRect.LowerRightCorner.Y = (f32)DesiredRect.LowerRightCorner.Y / d.Height; + } + } + + + //! Updates the absolute position. + virtual void updateAbsolutePosition() + { + recalculateAbsolutePosition(false); + + // update all children + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + (*it)->updateAbsolutePosition(); + } + } + + + //! Returns the topmost GUI element at the specific position. + /** + This will check this GUI element and all of its descendants, so it + may return this GUI element. To check all GUI elements, call this + function on device->getGUIEnvironment()->getRootGUIElement(). Note + that the root element is the size of the screen, so doing so (with + an on-screen point) will always return the root element if no other + element is above it at that point. + \param point: The point at which to find a GUI element. + \return The topmost GUI element at that point, or 0 if there are + no candidate elements at this point. + */ + IGUIElement* getElementFromPoint(const core::position2d& point) + { + IGUIElement* target = 0; + + // we have to search from back to front, because later children + // might be drawn over the top of earlier ones. + + core::list::Iterator it = Children.getLast(); + + if (isVisible()) + { + while(it != Children.end()) + { + target = (*it)->getElementFromPoint(point); + if (target) + return target; + + --it; + } + } + + if (isVisible() && isPointInside(point)) + target = this; + + return target; + } + + + //! Returns true if a point is within this element. + /** Elements with a shape other than a rectangle should override this method */ + virtual bool isPointInside(const core::position2d& point) const + { + return AbsoluteClippingRect.isPointInside(point); + } + + + //! Adds a GUI element as new child of this element. + virtual void addChild(IGUIElement* child) + { + addChildToEnd(child); + if (child) + { + child->updateAbsolutePosition(); + } + } + + //! Removes a child. + virtual void removeChild(IGUIElement* child) + { + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + if ((*it) == child) + { + (*it)->Parent = 0; + (*it)->drop(); + Children.erase(it); + return; + } + } + + + //! Removes this element from its parent. + virtual void remove() + { + if (Parent) + Parent->removeChild(this); + } + + + //! Draws the element and its children. + virtual void draw() + { + if ( isVisible() ) + { + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + (*it)->draw(); + } + } + + + //! animate the element and its children. + virtual void OnPostRender(u32 timeMs) + { + if ( isVisible() ) + { + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + (*it)->OnPostRender( timeMs ); + } + } + + + //! Moves this element. + virtual void move(core::position2d absoluteMovement) + { + setRelativePosition(DesiredRect + absoluteMovement); + } + + + //! Returns true if element is visible. + virtual bool isVisible() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsVisible; + } + + + //! Sets the visible state of this element. + virtual void setVisible(bool visible) + { + IsVisible = visible; + } + + + //! Returns true if this element was created as part of its parent control + virtual bool isSubElement() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsSubElement; + } + + + //! Sets whether this control was created as part of its parent. + /** For example, it is true when a scrollbar is part of a listbox. + SubElements are not saved to disk when calling guiEnvironment->saveGUI() */ + virtual void setSubElement(bool subElement) + { + IsSubElement = subElement; + } + + + //! If set to true, the focus will visit this element when using the tab key to cycle through elements. + /** If this element is a tab group (see isTabGroup/setTabGroup) then + ctrl+tab will be used instead. */ + void setTabStop(bool enable) + { + IsTabStop = enable; + } + + + //! Returns true if this element can be focused by navigating with the tab key + bool isTabStop() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsTabStop; + } + + + //! Sets the priority of focus when using the tab key to navigate between a group of elements. + /** See setTabGroup, isTabGroup and getTabGroup for information on tab groups. + Elements with a lower number are focused first */ + void setTabOrder(s32 index) + { + // negative = autonumber + if (index < 0) + { + TabOrder = 0; + IGUIElement *el = getTabGroup(); + while (IsTabGroup && el && el->Parent) + el = el->Parent; + + IGUIElement *first=0, *closest=0; + if (el) + { + // find the highest element number + el->getNextElement(-1, true, IsTabGroup, first, closest, true); + if (first) + { + TabOrder = first->getTabOrder() + 1; + } + } + + } + else + TabOrder = index; + } + + + //! Returns the number in the tab order sequence + s32 getTabOrder() const + { + return TabOrder; + } + + + //! Sets whether this element is a container for a group of elements which can be navigated using the tab key. + /** For example, windows are tab groups. + Groups can be navigated using ctrl+tab, providing isTabStop is true. */ + void setTabGroup(bool isGroup) + { + IsTabGroup = isGroup; + } + + + //! Returns true if this element is a tab group. + bool isTabGroup() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsTabGroup; + } + + + //! Returns the container element which holds all elements in this element's tab group. + IGUIElement* getTabGroup() + { + IGUIElement *ret=this; + + while (ret && !ret->isTabGroup()) + ret = ret->getParent(); + + return ret; + } + + + //! Returns true if element is enabled + /** Currently elements do _not_ care about parent-states. + So if you want to affect childs you have to enable/disable them all. + The only exception to this are sub-elements which also check their parent. + */ + virtual bool isEnabled() const + { + if ( isSubElement() && IsEnabled && getParent() ) + return getParent()->isEnabled(); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsEnabled; + } + + + //! Sets the enabled state of this element. + virtual void setEnabled(bool enabled) + { + IsEnabled = enabled; + } + + + //! Sets the new caption of this element. + virtual void setText(const wchar_t* text) + { + Text = text; + } + + + //! Returns caption of this element. + virtual const wchar_t* getText() const + { + return Text.c_str(); + } + + + //! Sets the new caption of this element. + virtual void setToolTipText(const wchar_t* text) + { + ToolTipText = text; + } + + + //! Returns caption of this element. + virtual const core::stringw& getToolTipText() const + { + return ToolTipText; + } + + + //! Returns id. Can be used to identify the element. + virtual s32 getID() const + { + return ID; + } + + + //! Sets the id of this element + virtual void setID(s32 id) + { + ID = id; + } + + + //! Called if an event happened. + virtual bool OnEvent(const SEvent& event) + { + return Parent ? Parent->OnEvent(event) : false; + } + + + //! Brings a child to front + /** \return True if successful, false if not. */ + virtual bool bringToFront(IGUIElement* element) + { + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + if (element == (*it)) + { + Children.erase(it); + Children.push_back(element); + return true; + } + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + + //! Moves a child to the back, so it's siblings are drawn on top of it + /** \return True if successful, false if not. */ + virtual bool sendToBack(IGUIElement* child) + { + core::list::Iterator it = Children.begin(); + if (child == (*it)) // already there + return true; + for (; it != Children.end(); ++it) + { + if (child == (*it)) + { + Children.erase(it); + Children.push_front(child); + return true; + } + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + //! Returns list with children of this element + virtual const core::list& getChildren() const + { + return Children; + } + + + //! Finds the first element with the given id. + /** \param id: Id to search for. + \param searchchildren: Set this to true, if also children of this + element may contain the element with the searched id and they + should be searched too. + \return Returns the first element with the given id. If no element + with this id was found, 0 is returned. */ + virtual IGUIElement* getElementFromId(s32 id, bool searchchildren=false) const + { + IGUIElement* e = 0; + + core::list::ConstIterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + if ((*it)->getID() == id) + return (*it); + + if (searchchildren) + e = (*it)->getElementFromId(id, true); + + if (e) + return e; + } + + return e; + } + + + //! returns true if the given element is a child of this one. + //! \param child: The child element to check + bool isMyChild(IGUIElement* child) const + { + if (!child) + return false; + do + { + if (child->Parent) + child = child->Parent; + + } while (child->Parent && child != this); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return child == this; + } + + + //! searches elements to find the closest next element to tab to + /** \param startOrder: The TabOrder of the current element, -1 if none + \param reverse: true if searching for a lower number + \param group: true if searching for a higher one + \param first: element with the highest/lowest known tab order depending on search direction + \param closest: the closest match, depending on tab order and direction + \param includeInvisible: includes invisible elements in the search (default=false) + \return true if successfully found an element, false to continue searching/fail */ + bool getNextElement(s32 startOrder, bool reverse, bool group, + IGUIElement*& first, IGUIElement*& closest, bool includeInvisible=false) const + { + // we'll stop searching if we find this number + s32 wanted = startOrder + ( reverse ? -1 : 1 ); + if (wanted==-2) + wanted = 1073741824; // maximum s32 + + core::list::ConstIterator it = Children.begin(); + + s32 closestOrder, currentOrder; + + while(it != Children.end()) + { + // ignore invisible elements and their children + if ( ( (*it)->isVisible() || includeInvisible ) && + (group == true || (*it)->isTabGroup() == false) ) + { + // only check tab stops and those with the same group status + if ((*it)->isTabStop() && ((*it)->isTabGroup() == group)) + { + currentOrder = (*it)->getTabOrder(); + + // is this what we're looking for? + if (currentOrder == wanted) + { + closest = *it; + return true; + } + + // is it closer than the current closest? + if (closest) + { + closestOrder = closest->getTabOrder(); + if ( ( reverse && currentOrder > closestOrder && currentOrder < startOrder) + ||(!reverse && currentOrder < closestOrder && currentOrder > startOrder)) + { + closest = *it; + } + } + else + if ( (reverse && currentOrder < startOrder) || (!reverse && currentOrder > startOrder) ) + { + closest = *it; + } + + // is it before the current first? + if (first) + { + closestOrder = first->getTabOrder(); + + if ( (reverse && closestOrder < currentOrder) || (!reverse && closestOrder > currentOrder) ) + { + first = *it; + } + } + else + { + first = *it; + } + } + // search within children + if ((*it)->getNextElement(startOrder, reverse, group, first, closest)) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return true; + } + } + ++it; + } + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + + //! Returns the type of the gui element. + /** This is needed for the .NET wrapper but will be used + later for serializing and deserializing. + If you wrote your own GUIElements, you need to set the type for your element as first parameter + in the constructor of IGUIElement. For own (=unknown) elements, simply use EGUIET_ELEMENT as type */ + EGUI_ELEMENT_TYPE getType() const + { + return Type; + } + + //! Returns true if the gui element supports the given type. + /** This is mostly used to check if you can cast a gui element to the class that goes with the type. + Most gui elements will only support their own type, but if you derive your own classes from interfaces + you can overload this function and add a check for the type of the base-class additionally. + This allows for checks comparable to the dynamic_cast of c++ with enabled rtti. + Note that you can't do that by calling BaseClass::hasType(type), but you have to do an explicit + comparison check, because otherwise the base class usually just checks for the membervariable + Type which contains the type of your derived class. + */ + virtual bool hasType(EGUI_ELEMENT_TYPE type) const + { + return type == Type; + } + + + //! Returns the type name of the gui element. + /** This is needed serializing elements. For serializing your own elements, override this function + and return your own type name which is created by your IGUIElementFactory */ + virtual const c8* getTypeName() const + { + return GUIElementTypeNames[Type]; + } + + //! Returns the name of the element. + /** \return Name as character string. */ + virtual const c8* getName() const + { + return Name.c_str(); + } + + + //! Sets the name of the element. + /** \param name New name of the gui element. */ + virtual void setName(const c8* name) + { + Name = name; + } + + + //! Sets the name of the element. + /** \param name New name of the gui element. */ + virtual void setName(const core::stringc& name) + { + Name = name; + } + + + //! Writes attributes of the scene node. + /** Implement this to expose the attributes of your scene node for + scripting languages, editors, debuggers or xml serialization purposes. */ + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const + { + out->addString("Name", Name.c_str()); + out->addInt("Id", ID ); + out->addString("Caption", getText()); + out->addRect("Rect", DesiredRect); + out->addPosition2d("MinSize", core::position2di(MinSize.Width, MinSize.Height)); + out->addPosition2d("MaxSize", core::position2di(MaxSize.Width, MaxSize.Height)); + out->addEnum("LeftAlign", AlignLeft, GUIAlignmentNames); + out->addEnum("RightAlign", AlignRight, GUIAlignmentNames); + out->addEnum("TopAlign", AlignTop, GUIAlignmentNames); + out->addEnum("BottomAlign", AlignBottom, GUIAlignmentNames); + out->addBool("Visible", IsVisible); + out->addBool("Enabled", IsEnabled); + out->addBool("TabStop", IsTabStop); + out->addBool("TabGroup", IsTabGroup); + out->addInt("TabOrder", TabOrder); + out->addBool("NoClip", NoClip); + } + + + //! Reads attributes of the scene node. + /** Implement this to set the attributes of your scene node for + scripting languages, editors, debuggers or xml deserialization purposes. */ + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) + { + setName(in->getAttributeAsString("Name")); + setID(in->getAttributeAsInt("Id")); + setText(in->getAttributeAsStringW("Caption").c_str()); + setVisible(in->getAttributeAsBool("Visible")); + setEnabled(in->getAttributeAsBool("Enabled")); + IsTabStop = in->getAttributeAsBool("TabStop"); + IsTabGroup = in->getAttributeAsBool("TabGroup"); + TabOrder = in->getAttributeAsInt("TabOrder"); + + core::position2di p = in->getAttributeAsPosition2d("MaxSize"); + setMaxSize(core::dimension2du(p.X,p.Y)); + + p = in->getAttributeAsPosition2d("MinSize"); + setMinSize(core::dimension2du(p.X,p.Y)); + + setAlignment((EGUI_ALIGNMENT) in->getAttributeAsEnumeration("LeftAlign", GUIAlignmentNames), + (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("RightAlign", GUIAlignmentNames), + (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("TopAlign", GUIAlignmentNames), + (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("BottomAlign", GUIAlignmentNames)); + + setRelativePosition(in->getAttributeAsRect("Rect")); + + setNotClipped(in->getAttributeAsBool("NoClip")); + } + +protected: + // not virtual because needed in constructor + void addChildToEnd(IGUIElement* child) + { + if (child) + { + child->grab(); // prevent destruction when removed + child->remove(); // remove from old parent + child->LastParentRect = getAbsolutePosition(); + child->Parent = this; + Children.push_back(child); + } + } + + // not virtual because needed in constructor + void recalculateAbsolutePosition(bool recursive) + { + core::rect parentAbsolute(0,0,0,0); + core::rect parentAbsoluteClip; + f32 fw=0.f, fh=0.f; + + if (Parent) + { + parentAbsolute = Parent->AbsoluteRect; + + if (NoClip) + { + IGUIElement* p=this; + while (p && p->Parent) + p = p->Parent; + parentAbsoluteClip = p->AbsoluteClippingRect; + } + else + parentAbsoluteClip = Parent->AbsoluteClippingRect; + } + + const s32 diffx = parentAbsolute.getWidth() - LastParentRect.getWidth(); + const s32 diffy = parentAbsolute.getHeight() - LastParentRect.getHeight(); + + if (AlignLeft == EGUIA_SCALE || AlignRight == EGUIA_SCALE) + fw = (f32)parentAbsolute.getWidth(); + + if (AlignTop == EGUIA_SCALE || AlignBottom == EGUIA_SCALE) + fh = (f32)parentAbsolute.getHeight(); + + switch (AlignLeft) + { + case EGUIA_UPPERLEFT: + break; + case EGUIA_LOWERRIGHT: + DesiredRect.UpperLeftCorner.X += diffx; + break; + case EGUIA_CENTER: + DesiredRect.UpperLeftCorner.X += diffx/2; + break; + case EGUIA_SCALE: + DesiredRect.UpperLeftCorner.X = core::round32(ScaleRect.UpperLeftCorner.X * fw); + break; + } + + switch (AlignRight) + { + case EGUIA_UPPERLEFT: + break; + case EGUIA_LOWERRIGHT: + DesiredRect.LowerRightCorner.X += diffx; + break; + case EGUIA_CENTER: + DesiredRect.LowerRightCorner.X += diffx/2; + break; + case EGUIA_SCALE: + DesiredRect.LowerRightCorner.X = core::round32(ScaleRect.LowerRightCorner.X * fw); + break; + } + + switch (AlignTop) + { + case EGUIA_UPPERLEFT: + break; + case EGUIA_LOWERRIGHT: + DesiredRect.UpperLeftCorner.Y += diffy; + break; + case EGUIA_CENTER: + DesiredRect.UpperLeftCorner.Y += diffy/2; + break; + case EGUIA_SCALE: + DesiredRect.UpperLeftCorner.Y = core::round32(ScaleRect.UpperLeftCorner.Y * fh); + break; + } + + switch (AlignBottom) + { + case EGUIA_UPPERLEFT: + break; + case EGUIA_LOWERRIGHT: + DesiredRect.LowerRightCorner.Y += diffy; + break; + case EGUIA_CENTER: + DesiredRect.LowerRightCorner.Y += diffy/2; + break; + case EGUIA_SCALE: + DesiredRect.LowerRightCorner.Y = core::round32(ScaleRect.LowerRightCorner.Y * fh); + break; + } + + RelativeRect = DesiredRect; + + const s32 w = RelativeRect.getWidth(); + const s32 h = RelativeRect.getHeight(); + + // make sure the desired rectangle is allowed + if (w < (s32)MinSize.Width) + RelativeRect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + MinSize.Width; + if (h < (s32)MinSize.Height) + RelativeRect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + MinSize.Height; + if (MaxSize.Width && w > (s32)MaxSize.Width) + RelativeRect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + MaxSize.Width; + if (MaxSize.Height && h > (s32)MaxSize.Height) + RelativeRect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + MaxSize.Height; + + RelativeRect.repair(); + + AbsoluteRect = RelativeRect + parentAbsolute.UpperLeftCorner; + + if (!Parent) + parentAbsoluteClip = AbsoluteRect; + + AbsoluteClippingRect = AbsoluteRect; + AbsoluteClippingRect.clipAgainst(parentAbsoluteClip); + + LastParentRect = parentAbsolute; + + if ( recursive ) + { + // update all children + core::list::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + (*it)->recalculateAbsolutePosition(recursive); + } + } + } + +protected: + + //! List of all children of this element + core::list Children; + + //! Pointer to the parent + IGUIElement* Parent; + + //! relative rect of element + core::rect RelativeRect; + + //! absolute rect of element + core::rect AbsoluteRect; + + //! absolute clipping rect of element + core::rect AbsoluteClippingRect; + + //! the rectangle the element would prefer to be, + //! if it was not constrained by parent or max/min size + core::rect DesiredRect; + + //! for calculating the difference when resizing parent + core::rect LastParentRect; + + //! relative scale of the element inside its parent + core::rect ScaleRect; + + //! maximum and minimum size of the element + core::dimension2du MaxSize, MinSize; + + //! is visible? + bool IsVisible; + + //! is enabled? + bool IsEnabled; + + //! is a part of a larger whole and should not be serialized? + bool IsSubElement; + + //! does this element ignore its parent's clipping rectangle? + bool NoClip; + + //! caption + core::stringw Text; + + //! tooltip + core::stringw ToolTipText; + + //! users can set this for identificating the element by string + core::stringc Name; + + //! users can set this for identificating the element by integer + s32 ID; + + //! tab stop like in windows + bool IsTabStop; + + //! tab order + s32 TabOrder; + + //! tab groups are containers like windows, use ctrl+tab to navigate + bool IsTabGroup; + + //! tells the element how to act when its parent is resized + EGUI_ALIGNMENT AlignLeft, AlignRight, AlignTop, AlignBottom; + + //! GUI Environment + IGUIEnvironment* Environment; + + //! type of element + EGUI_ELEMENT_TYPE Type; +}; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIElementFactory.h b/src/others/irrlicht-1.8.1/include/IGUIElementFactory.h new file mode 100644 index 0000000..348038a --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIElementFactory.h @@ -0,0 +1,66 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ +#define __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "EGUIElementTypes.h" + +namespace irr +{ + +namespace gui +{ + class IGUIElement; + + //! Interface making it possible to dynamically create GUI elements + /** To be able to add custom elements to Irrlicht and to make it possible for the + scene manager to save and load them, simply implement this interface and register it + in your gui environment via IGUIEnvironment::registerGUIElementFactory. + Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to + increase the reference counter of the environment. This is not necessary because the + it will grab() the factory anyway, and otherwise cyclic references will be created. + */ + class IGUIElementFactory : public virtual IReferenceCounted + { + public: + + //! adds an element to the gui environment based on its type id + /** \param type: Type of the element to add. + \param parent: Parent scene node of the new element, can be null to add to the root. + \return Pointer to the new element or null if not successful. */ + virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) = 0; + + //! adds a GUI element to the GUI Environment based on its type name + /** \param typeName: Type name of the element to add. + \param parent: Parent scene node of the new element, can be null to add it to the root. + \return Pointer to the new element or null if not successful. */ + virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0) = 0; + + //! Get amount of GUI element types this factory is able to create + virtual s32 getCreatableGUIElementTypeCount() const = 0; + + //! Get type of a createable element type + /** \param idx: Index of the element type in this factory. Must be a value between 0 and + getCreatableGUIElementTypeCount() */ + virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0; + + //! Get type name of a createable GUI element type by index + /** \param idx: Index of the type in this factory. Must be a value between 0 and + getCreatableGUIElementTypeCount() */ + virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0; + + //! returns type name of a createable GUI element + /** \param type: Type of GUI element. + \return Name of the type if this factory can create the type, otherwise 0. */ + virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IGUIEnvironment.h b/src/others/irrlicht-1.8.1/include/IGUIEnvironment.h new file mode 100644 index 0000000..0291107 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIEnvironment.h @@ -0,0 +1,620 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_ENVIRONMENT_H_INCLUDED__ +#define __I_GUI_ENVIRONMENT_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "IGUISkin.h" +#include "rect.h" +#include "EMessageBoxFlags.h" +#include "IEventReceiver.h" +#include "IXMLReader.h" +#include "path.h" + +namespace irr +{ + class IOSOperator; + class IEventReceiver; + + namespace io + { + class IXMLWriter; + class IReadFile; + class IWriteFile; + class IFileSystem; + } // end namespace io + namespace video + { + class IVideoDriver; + class ITexture; + } // end namespace video + +namespace gui +{ + +class IGUIElement; +class IGUIFont; +class IGUISpriteBank; +class IGUIScrollBar; +class IGUIImage; +class IGUIMeshViewer; +class IGUICheckBox; +class IGUIListBox; +class IGUITreeView; +class IGUIImageList; +class IGUIFileOpenDialog; +class IGUIColorSelectDialog; +class IGUIInOutFader; +class IGUIStaticText; +class IGUIEditBox; +class IGUISpinBox; +class IGUITabControl; +class IGUITab; +class IGUITable; +class IGUIContextMenu; +class IGUIComboBox; +class IGUIToolBar; +class IGUIButton; +class IGUIWindow; +class IGUIElementFactory; + +//! GUI Environment. Used as factory and manager of all other GUI elements. +/** \par This element can create the following events of type EGUI_EVENT_TYPE (which are passed on to focused sub-elements): +\li EGET_ELEMENT_FOCUS_LOST +\li EGET_ELEMENT_FOCUSED +\li EGET_ELEMENT_LEFT +\li EGET_ELEMENT_HOVERED +*/ +class IGUIEnvironment : public virtual IReferenceCounted +{ +public: + + //! Draws all gui elements by traversing the GUI environment starting at the root node. + virtual void drawAll() = 0; + + //! Sets the focus to an element. + /** Causes a EGET_ELEMENT_FOCUS_LOST event followed by a + EGET_ELEMENT_FOCUSED event. If someone absorbed either of the events, + then the focus will not be changed. + \param element Pointer to the element which shall get the focus. + \return True on success, false on failure */ + virtual bool setFocus(IGUIElement* element) = 0; + + //! Returns the element which holds the focus. + /** \return Pointer to the element with focus. */ + virtual IGUIElement* getFocus() const = 0; + + //! Returns the element which was last under the mouse cursor + /** NOTE: This information is updated _after_ the user-eventreceiver + received it's mouse-events. To find the hovered element while catching + mouse events you have to use instead: + IGUIEnvironment::getRootGUIElement()->getElementFromPoint(mousePos); + \return Pointer to the element under the mouse. */ + virtual IGUIElement* getHovered() const = 0; + + //! Removes the focus from an element. + /** Causes a EGET_ELEMENT_FOCUS_LOST event. If the event is absorbed + then the focus will not be changed. + \param element Pointer to the element which shall lose the focus. + \return True on success, false on failure */ + virtual bool removeFocus(IGUIElement* element) = 0; + + //! Returns whether the element has focus + /** \param element Pointer to the element which is tested. + \return True if the element has focus, else false. */ + virtual bool hasFocus(IGUIElement* element) const = 0; + + //! Returns the current video driver. + /** \return Pointer to the video driver. */ + virtual video::IVideoDriver* getVideoDriver() const = 0; + + //! Returns the file system. + /** \return Pointer to the file system. */ + virtual io::IFileSystem* getFileSystem() const = 0; + + //! returns a pointer to the OS operator + /** \return Pointer to the OS operator. */ + virtual IOSOperator* getOSOperator() const = 0; + + //! Removes all elements from the environment. + virtual void clear() = 0; + + //! Posts an input event to the environment. + /** Usually you do not have to + use this method, it is used by the engine internally. + \param event The event to post. + \return True if succeeded, else false. */ + virtual bool postEventFromUser(const SEvent& event) = 0; + + //! This sets a new event receiver for gui events. + /** Usually you do not have to + use this method, it is used by the engine internally. + \param evr Pointer to the new receiver. */ + virtual void setUserEventReceiver(IEventReceiver* evr) = 0; + + //! Returns pointer to the current gui skin. + /** \return Pointer to the GUI skin. */ + virtual IGUISkin* getSkin() const = 0; + + //! Sets a new GUI Skin + /** You can use this to change the appearance of the whole GUI + Environment. You can set one of the built-in skins or implement your + own class derived from IGUISkin and enable it using this method. + To set for example the built-in Windows classic skin, use the following + code: + \code + gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC); + environment->setSkin(newskin); + newskin->drop(); + \endcode + \param skin New skin to use. + */ + virtual void setSkin(IGUISkin* skin) = 0; + + //! Creates a new GUI Skin based on a template. + /** Use setSkin() to set the created skin. + \param type The type of the new skin. + \return Pointer to the created skin. + If you no longer need it, you should call IGUISkin::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type) = 0; + + + //! Creates the image list from the given texture. + /** \param texture Texture to split into images + \param imageSize Dimension of each image + \param useAlphaChannel Flag whether alpha channel of the texture should be honored. + \return Pointer to the font. Returns 0 if the font could not be loaded. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIImageList* createImageList( video::ITexture* texture, + core::dimension2d imageSize, + bool useAlphaChannel ) = 0; + + //! Returns pointer to the font with the specified filename. + /** Loads the font if it was not loaded before. + \param filename Filename of the Font. + \return Pointer to the font. Returns 0 if the font could not be loaded. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIFont* getFont(const io::path& filename) = 0; + + //! Adds an externally loaded font to the font list. + /** This method allows to attach an already loaded font to the list of + existing fonts. The font is grabbed if non-null and adding was successful. + \param name Name the font should be stored as. + \param font Pointer to font to add. + \return Pointer to the font stored. This can differ from given parameter if the name previously existed. */ + virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) = 0; + + //! remove loaded font + virtual void removeFont(IGUIFont* font) = 0; + + //! Returns the default built-in font. + /** \return Pointer to the default built-in font. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIFont* getBuiltInFont() const = 0; + + //! Returns pointer to the sprite bank with the specified file name. + /** Loads the bank if it was not loaded before. + \param filename Filename of the sprite bank's origin. + \return Pointer to the sprite bank. Returns 0 if it could not be loaded. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IGUISpriteBank* getSpriteBank(const io::path& filename) = 0; + + //! Adds an empty sprite bank to the manager + /** \param name Name of the new sprite bank. + \return Pointer to the sprite bank. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) = 0; + + //! Returns the root gui element. + /** This is the first gui element, the (direct or indirect) parent of all + other gui elements. It is a valid IGUIElement, with dimensions the same + size as the screen. + \return Pointer to the root element of the GUI. The returned pointer + should not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual IGUIElement* getRootGUIElement() = 0; + + //! Adds a button element. + /** \param rectangle Rectangle specifying the borders of the button. + \param parent Parent gui element of the button. + \param id Id with which the gui element can be identified. + \param text Text displayed on the button. + \param tooltiptext Text displayed in the tooltip. + \return Pointer to the created button. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIButton* addButton(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext = 0) = 0; + + //! Adds an empty window element. + /** \param rectangle Rectangle specifying the borders of the window. + \param modal Defines if the dialog is modal. This means, that all other + gui elements which were created before the window cannot be used until + it is removed. + \param text Text displayed as the window title. + \param parent Parent gui element of the window. + \param id Id with which the gui element can be identified. + \return Pointer to the created window. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIWindow* addWindow(const core::rect& rectangle, bool modal = false, + const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a modal screen. + /** This control stops its parent's members from being able to receive + input until its last child is removed, it then deletes itself. + \param parent Parent gui element of the modal. + \return Pointer to the created modal. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIElement* addModalScreen(IGUIElement* parent) = 0; + + //! Adds a message box. + /** \param caption Text to be displayed the title of the message box. + \param text Text to be displayed in the body of the message box. + \param modal Defines if the dialog is modal. This means, that all other + gui elements which were created before the message box cannot be used + until this messagebox is removed. + \param flags Flags specifying the layout of the message box. For example + to create a message box with an OK and a CANCEL button on it, set this + to (EMBF_OK | EMBF_CANCEL). + \param parent Parent gui element of the message box. + \param id Id with which the gui element can be identified. + \param image Optional texture which will be displayed beside the text as an image + \return Pointer to the created message box. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0, + bool modal = true, s32 flags = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) = 0; + + //! Adds a scrollbar. + /** \param horizontal Specifies if the scroll bar is drawn horizontal + or vertical. + \param rectangle Rectangle specifying the borders of the scrollbar. + \param parent Parent gui element of the scroll bar. + \param id Id to identify the gui element. + \return Pointer to the created scrollbar. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIScrollBar* addScrollBar(bool horizontal, const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds an image element. + /** \param image Image to be displayed. + \param pos Position of the image. The width and height of the image is + taken from the image. + \param useAlphaChannel Sets if the image should use the alpha channel + of the texture to draw itself. + \param parent Parent gui element of the image. + \param id Id to identify the gui element. + \param text Title text of the image. + \return Pointer to the created image element. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIImage* addImage(video::ITexture* image, core::position2d pos, + bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; + + //! Adds an image element. + /** Use IGUIImage::setImage later to set the image to be displayed. + \param rectangle Rectangle specifying the borders of the image. + \param parent Parent gui element of the image. + \param id Id to identify the gui element. + \param text Title text of the image. + \param useAlphaChannel Sets if the image should use the alpha channel + of the texture to draw itself. + \return Pointer to the created image element. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIImage* addImage(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) = 0; + + //! Adds a checkbox element. + /** \param checked Define the initial state of the check box. + \param rectangle Rectangle specifying the borders of the check box. + \param parent Parent gui element of the check box. + \param id Id to identify the gui element. + \param text Title text of the check box. + \return Pointer to the created check box. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUICheckBox* addCheckBox(bool checked, const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; + + //! Adds a list box element. + /** \param rectangle Rectangle specifying the borders of the list box. + \param parent Parent gui element of the list box. + \param id Id to identify the gui element. + \param drawBackground Flag whether the background should be drawn. + \return Pointer to the created list box. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIListBox* addListBox(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0; + + //! Adds a tree view element. + /** \param rectangle Position and dimension of list box. + \param parent Parent gui element of the list box. + \param id Id to identify the gui element. + \param drawBackground Flag whether the background should be drawn. + \param scrollBarVertical Flag whether a vertical scrollbar should be used + \param scrollBarHorizontal Flag whether a horizontal scrollbar should be used + \return Pointer to the created list box. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUITreeView* addTreeView(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false, + bool scrollBarVertical = true, bool scrollBarHorizontal = false) = 0; + + //! Adds a mesh viewer. Not 100% implemented yet. + /** \param rectangle Rectangle specifying the borders of the mesh viewer. + \param parent Parent gui element of the mesh viewer. + \param id Id to identify the gui element. + \param text Title text of the mesh viewer. + \return Pointer to the created mesh viewer. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIMeshViewer* addMeshViewer(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; + + //! Adds a file open dialog. + /** \param title Text to be displayed as the title of the dialog. + \param modal Defines if the dialog is modal. This means, that all other + gui elements which were created before the message box cannot be used + until this messagebox is removed. + \param parent Parent gui element of the dialog. + \param id Id to identify the gui element. + \param restoreCWD If set to true, the current workingn directory will be + restored after the dialog is closed in some way. Otherwise the working + directory will be the one that the file dialog was last showing. + \param startDir Optional path for which the file dialog will be opened. + \return Pointer to the created file open dialog. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIFileOpenDialog* addFileOpenDialog(const wchar_t* title=0, + bool modal=true, IGUIElement* parent=0, s32 id=-1, + bool restoreCWD=false, io::path::char_type* startDir=0) = 0; + + //! Adds a color select dialog. + /** \param title The title of the dialog. + \param modal Defines if the dialog is modal. This means, that all other + gui elements which were created before the dialog cannot be used + until it is removed. + \param parent The parent of the dialog. + \param id The ID of the dialog. + \return Pointer to the created file open dialog. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIColorSelectDialog* addColorSelectDialog(const wchar_t* title = 0, + bool modal=true, IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a static text. + /** \param text Text to be displayed. Can be altered after creation by SetText(). + \param rectangle Rectangle specifying the borders of the static text + \param border Set to true if the static text should have a 3d border. + \param wordWrap Enable if the text should wrap into multiple lines. + \param parent Parent item of the element, e.g. a window. + \param id The ID of the element. + \param fillBackground Enable if the background shall be filled. + Defaults to false. + \return Pointer to the created static text. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIStaticText* addStaticText(const wchar_t* text, const core::rect& rectangle, + bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, + bool fillBackground = false) = 0; + + //! Adds an edit box. + /** Supports unicode input from every keyboard around the world, + scrolling, copying and pasting (exchanging data with the clipboard + directly), maximum character amount, marking, and all shortcuts like + ctrl+X, ctrl+V, ctrl+C, shift+Left, shift+Right, Home, End, and so on. + \param text Text to be displayed. Can be altered after creation + by setText(). + \param rectangle Rectangle specifying the borders of the edit box. + \param border Set to true if the edit box should have a 3d border. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the edit box directly in the environment. + \param id The ID of the element. + \return Pointer to the created edit box. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect& rectangle, + bool border=true, IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a spin box. + /** An edit box with up and down buttons + \param text Text to be displayed. Can be altered after creation by setText(). + \param rectangle Rectangle specifying the borders of the spin box. + \param border Set to true if the spin box should have a 3d border. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the spin box directly in the environment. + \param id The ID of the element. + \return Pointer to the created spin box. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect& rectangle, + bool border=true,IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds an element for fading in or out. + /** \param rectangle Rectangle specifying the borders of the fader. + If the pointer is NULL, the whole screen is used. + \param parent Parent item of the element, e.g. a window. + \param id An identifier for the fader. + \return Pointer to the created in-out-fader. Returns 0 if an error + occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIInOutFader* addInOutFader(const core::rect* rectangle=0, IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a tab control to the environment. + /** \param rectangle Rectangle specifying the borders of the tab control. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the tab control directly in the environment. + \param fillbackground Specifies if the background of the tab control + should be drawn. + \param border Specifies if a flat 3d border should be drawn. This is + usually not necessary unless you place the control directly into + the environment without a window as parent. + \param id An identifier for the tab control. + \return Pointer to the created tab control element. Returns 0 if an + error occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUITabControl* addTabControl(const core::rect& rectangle, + IGUIElement* parent=0, bool fillbackground=false, + bool border=true, s32 id=-1) = 0; + + //! Adds tab to the environment. + /** You can use this element to group other elements. This is not used + for creating tabs on tab controls, please use IGUITabControl::addTab() + for this instead. + \param rectangle Rectangle specifying the borders of the tab. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the tab directly in the environment. + \param id An identifier for the tab. + \return Pointer to the created tab. Returns 0 if an + error occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUITab* addTab(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a context menu to the environment. + /** \param rectangle Rectangle specifying the borders of the menu. + Note that the menu is resizing itself based on what items you add. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the menu directly in the environment. + \param id An identifier for the menu. + \return Pointer to the created context menu. Returns 0 if an + error occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIContextMenu* addContextMenu(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a menu to the environment. + /** This is like the menu you can find on top of most windows in modern + graphical user interfaces. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the menu directly in the environment. + \param id An identifier for the menu. + \return Pointer to the created menu. Returns 0 if an + error occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIContextMenu* addMenu(IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a toolbar to the environment. + /** It is like a menu that is always placed on top of its parent, and + contains buttons. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the tool bar directly in the environment. + \param id An identifier for the tool bar. + \return Pointer to the created tool bar. Returns 0 if an + error occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a combo box to the environment. + /** \param rectangle Rectangle specifying the borders of the combo box. + \param parent Parent item of the element, e.g. a window. + Set it to 0 to place the combo box directly in the environment. + \param id An identifier for the combo box. + \return Pointer to the created combo box. Returns 0 if an + error occurred. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IGUIComboBox* addComboBox(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1) = 0; + + //! Adds a table to the environment + /** \param rectangle Rectangle specifying the borders of the table. + \param parent Parent item of the element, e.g. a window. Set it to 0 + to place the element directly in the environment. + \param id An identifier for the table. + \param drawBackground Flag whether the background should be drawn. + \return Pointer to the created table. Returns 0 if an error occurred. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUITable* addTable(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) =0; + + //! Get the default element factory which can create all built-in elements + /** \return Pointer to the factory. + This pointer should not be dropped. See IReferenceCounted::drop() for + more information. */ + virtual IGUIElementFactory* getDefaultGUIElementFactory() const = 0; + + //! Adds an element factory to the gui environment. + /** Use this to extend the gui environment with new element types which + it should be able to create automatically, for example when loading + data from xml files. + \param factoryToAdd Pointer to new factory. */ + virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd) = 0; + + //! Get amount of registered gui element factories. + /** \return Amount of registered gui element factories. */ + virtual u32 getRegisteredGUIElementFactoryCount() const = 0; + + //! Get a gui element factory by index + /** \param index Index of the factory. + \return Factory at given index, or 0 if no such factory exists. */ + virtual IGUIElementFactory* getGUIElementFactory(u32 index) const = 0; + + //! Adds a GUI element by its name + /** Each factory is checked if it can create an element of the given + name. The first match will be created. + \param elementName Name of the element to be created. + \param parent Parent of the new element, if not 0. + \return New GUI element, or 0 if no such element exists. */ + virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0) = 0; + + //! Saves the current gui into a file. + /** \param filename Name of the file. + \param start The GUIElement to start with. Root if 0. + \return True if saving succeeded, else false. */ + virtual bool saveGUI(const io::path& filename, IGUIElement* start=0) = 0; + + //! Saves the current gui into a file. + /** \param file The file to write to. + \param start The GUIElement to start with. Root if 0. + \return True if saving succeeded, else false. */ + virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) = 0; + + //! Loads the gui. Note that the current gui is not cleared before. + /** When a parent is set the elements will be added below the parent, the parent itself does not deserialize. + When the file contains skin-settings from the gui-environment those are always serialized into the + guienvironment independent of the parent setting. + \param filename Name of the file. + \param parent Parent for the loaded GUI, root if 0. + \return True if loading succeeded, else false. */ + virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) = 0; + + //! Loads the gui. Note that the current gui is not cleared before. + /** When a parent is set the elements will be added below the parent, the parent itself does not deserialize. + When the file contains skin-settings from the gui-environment those are always serialized into the + guienvironment independent of the parent setting. + \param file The file to load from. + \param parent Parent for the loaded GUI, root if 0. + \return True if loading succeeded, else false. */ + virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0; + + //! Writes attributes of the gui environment + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const =0; + + //! Reads attributes of the gui environment + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)=0; + + //! writes an element + virtual void writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) =0; + + //! reads an element + virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0; +}; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIFileOpenDialog.h b/src/others/irrlicht-1.8.1/include/IGUIFileOpenDialog.h new file mode 100644 index 0000000..2384038 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIFileOpenDialog.h @@ -0,0 +1,44 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ +#define __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ + +#include "IGUIElement.h" +#include "path.h" + +namespace irr +{ +namespace gui +{ + + //! Standard file chooser dialog. + /** \warning When the user selects a folder this does change the current working directory + + \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_DIRECTORY_SELECTED + \li EGET_FILE_SELECTED + \li EGET_FILE_CHOOSE_DIALOG_CANCELLED + */ + class IGUIFileOpenDialog : public IGUIElement + { + public: + + //! constructor + IGUIFileOpenDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_FILE_OPEN_DIALOG, environment, parent, id, rectangle) {} + + //! Returns the filename of the selected file. Returns NULL, if no file was selected. + virtual const wchar_t* getFileName() const = 0; + + //! Returns the directory of the selected file. Returns NULL, if no directory was selected. + virtual const io::path& getDirectoryName() = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIFont.h b/src/others/irrlicht-1.8.1/include/IGUIFont.h new file mode 100644 index 0000000..4746c81 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIFont.h @@ -0,0 +1,104 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_FONT_H_INCLUDED__ +#define __I_GUI_FONT_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "SColor.h" +#include "rect.h" +#include "irrString.h" + +namespace irr +{ +namespace gui +{ + +//! An enum for the different types of GUI font. +enum EGUI_FONT_TYPE +{ + //! Bitmap fonts loaded from an XML file or a texture. + EGFT_BITMAP = 0, + + //! Scalable vector fonts loaded from an XML file. + /** These fonts reside in system memory and use no video memory + until they are displayed. These are slower than bitmap fonts + but can be easily scaled and rotated. */ + EGFT_VECTOR, + + //! A font which uses a the native API provided by the operating system. + /** Currently not used. */ + EGFT_OS, + + //! An external font type provided by the user. + EGFT_CUSTOM +}; + +//! Font interface. +class IGUIFont : public virtual IReferenceCounted +{ +public: + + //! Draws some text and clips it to the specified rectangle if wanted. + /** \param text: Text to draw + \param position: Rectangle specifying position where to draw the text. + \param color: Color of the text + \param hcenter: Specifies if the text should be centered horizontally into the rectangle. + \param vcenter: Specifies if the text should be centered vertically into the rectangle. + \param clip: Optional pointer to a rectangle against which the text will be clipped. + If the pointer is null, no clipping will be done. */ + virtual void draw(const core::stringw& text, const core::rect& position, + video::SColor color, bool hcenter=false, bool vcenter=false, + const core::rect* clip=0) = 0; + + //! Calculates the width and height of a given string of text. + /** \return Returns width and height of the area covered by the text if + it would be drawn. */ + virtual core::dimension2d getDimension(const wchar_t* text) const = 0; + + //! Calculates the index of the character in the text which is on a specific position. + /** \param text: Text string. + \param pixel_x: X pixel position of which the index of the character will be returned. + \return Returns zero based index of the character in the text, and -1 if no no character + is on this position. (=the text is too short). */ + virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0; + + //! Returns the type of this font + virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; } + + //! Sets global kerning width for the font. + virtual void setKerningWidth (s32 kerning) = 0; + + //! Sets global kerning height for the font. + virtual void setKerningHeight (s32 kerning) = 0; + + //! Gets kerning values (distance between letters) for the font. If no parameters are provided, + /** the global kerning distance is returned. + \param thisLetter: If this parameter is provided, the left side kerning + for this letter is added to the global kerning value. For example, a + space might only be one pixel wide, but it may be displayed as several + pixels. + \param previousLetter: If provided, kerning is calculated for both + letters and added to the global kerning value. For example, in a font + which supports kerning pairs a string such as 'Wo' may have the 'o' + tucked neatly under the 'W'. + */ + virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0; + + //! Returns the distance between letters + virtual s32 getKerningHeight() const = 0; + + //! Define which characters should not be drawn by the font. + /** For example " " would not draw any space which is usually blank in + most fonts. + \param s String of symbols which are not send down to the videodriver + */ + virtual void setInvisibleCharacters( const wchar_t *s ) = 0; +}; + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIFontBitmap.h b/src/others/irrlicht-1.8.1/include/IGUIFontBitmap.h new file mode 100644 index 0000000..36ae37e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIFontBitmap.h @@ -0,0 +1,46 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_FONT_BITMAP_H_INCLUDED__ +#define __I_GUI_FONT_BITMAP_H_INCLUDED__ + +#include "IGUIFont.h" + +namespace irr +{ +namespace gui +{ + class IGUISpriteBank; + +//! Font interface. +class IGUIFontBitmap : public IGUIFont +{ +public: + + //! Returns the type of this font + virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; } + + //! returns the parsed Symbol Information + virtual IGUISpriteBank* getSpriteBank() const = 0; + + //! returns the sprite number from a given character + virtual u32 getSpriteNoFromChar(const wchar_t *c) const = 0; + + //! Gets kerning values (distance between letters) for the font. If no parameters are provided, + /** the global kerning distance is returned. + \param thisLetter: If this parameter is provided, the left side kerning for this letter is added + to the global kerning value. For example, a space might only be one pixel wide, but it may + be displayed as several pixels. + \param previousLetter: If provided, kerning is calculated for both letters and added to the global + kerning value. For example, EGFT_BITMAP will add the right kerning value of previousLetter to the + left side kerning value of thisLetter, then add the global value. + */ + virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0; +}; + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIImage.h b/src/others/irrlicht-1.8.1/include/IGUIImage.h new file mode 100644 index 0000000..9bca201 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIImage.h @@ -0,0 +1,58 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_IMAGE_H_INCLUDED__ +#define __I_GUI_IMAGE_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace video +{ + class ITexture; +} +namespace gui +{ + + //! GUI element displaying an image. + class IGUIImage : public IGUIElement + { + public: + + //! constructor + IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {} + + //! Sets an image texture + virtual void setImage(video::ITexture* image) = 0; + + //! Gets the image texture + virtual video::ITexture* getImage() const = 0; + + //! Sets the color of the image + virtual void setColor(video::SColor color) = 0; + + //! Sets if the image should scale to fit the element + virtual void setScaleImage(bool scale) = 0; + + //! Sets if the image should use its alpha channel to draw itself + virtual void setUseAlphaChannel(bool use) = 0; + + //! Gets the color of the image + virtual video::SColor getColor() const = 0; + + //! Returns true if the image is scaled to fit, false if not + virtual bool isImageScaled() const = 0; + + //! Returns true if the image is using the alpha channel, false if not + virtual bool isAlphaChannelUsed() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIImageList.h b/src/others/irrlicht-1.8.1/include/IGUIImageList.h new file mode 100644 index 0000000..f1f50c1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIImageList.h @@ -0,0 +1,45 @@ +// This file is part of the "Irrlicht Engine". +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de + +#ifndef __I_GUI_IMAGE_LIST_H_INCLUDED__ +#define __I_GUI_IMAGE_LIST_H_INCLUDED__ + +#include "IGUIElement.h" +#include "rect.h" +#include "irrTypes.h" + +namespace irr +{ +namespace gui +{ + +//! Font interface. +class IGUIImageList : public virtual IReferenceCounted +{ +public: + + //! Destructor + virtual ~IGUIImageList() {}; + + //! Draws an image and clips it to the specified rectangle if wanted + //! \param index: Index of the image + //! \param destPos: Position of the image to draw + //! \param clip: Optional pointer to a rectalgle against which the text will be clipped. + //! If the pointer is null, no clipping will be done. + virtual void draw(s32 index, const core::position2d& destPos, + const core::rect* clip = 0) = 0; + + //! Returns the count of Images in the list. + //! \return Returns the count of Images in the list. + virtual s32 getImageCount() const = 0; + + //! Returns the size of the images in the list. + //! \return Returns the size of the images in the list. + virtual core::dimension2d getImageSize() const = 0; +}; + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIInOutFader.h b/src/others/irrlicht-1.8.1/include/IGUIInOutFader.h new file mode 100644 index 0000000..a89f615 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIInOutFader.h @@ -0,0 +1,67 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_IN_OUT_FADER_H_INCLUDED__ +#define __I_GUI_IN_OUT_FADER_H_INCLUDED__ + +#include "IGUIElement.h" +#include "SColor.h" + +namespace irr +{ +namespace gui +{ + + //! Element for fading out or in + /** Here is a small example on how the class is used. In this example we fade + in from a total red screen in the beginning. As you can see, the fader is not + only useful for dramatic in and out fading, but also to show that the player + is hit in a first person shooter game for example. + \code + gui::IGUIInOutFader* fader = device->getGUIEnvironment()->addInOutFader(); + fader->setColor(video::SColor(0,255,0,0)); + fader->fadeIn(4000); + \endcode + */ + class IGUIInOutFader : public IGUIElement + { + public: + + //! constructor + IGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_IN_OUT_FADER, environment, parent, id, rectangle) {} + + //! Gets the color to fade out to or to fade in from. + virtual video::SColor getColor() const = 0; + + //! Sets the color to fade out to or to fade in from. + /** \param color: Color to where it is faded out od from it is faded in. */ + virtual void setColor(video::SColor color) = 0; + virtual void setColor(video::SColor source, video::SColor dest) = 0; + + //! Starts the fade in process. + /** In the beginning the whole rect is drawn by the set color + (black by default) and at the end of the overgiven time the + color has faded out. + \param time: Time specifying how long it should need to fade in, + in milliseconds. */ + virtual void fadeIn(u32 time) = 0; + + //! Starts the fade out process. + /** In the beginning everything is visible, and at the end of + the time only the set color (black by the fault) will be drawn. + \param time: Time specifying how long it should need to fade out, + in milliseconds. */ + virtual void fadeOut(u32 time) = 0; + + //! Returns if the fade in or out process is done. + virtual bool isReady() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIListBox.h b/src/others/irrlicht-1.8.1/include/IGUIListBox.h new file mode 100644 index 0000000..0af7d7c --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIListBox.h @@ -0,0 +1,138 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_LIST_BOX_H_INCLUDED__ +#define __I_GUI_LIST_BOX_H_INCLUDED__ + +#include "IGUIElement.h" +#include "SColor.h" + +namespace irr +{ +namespace gui +{ + class IGUISpriteBank; + + //! Enumeration for listbox colors + enum EGUI_LISTBOX_COLOR + { + //! Color of text + EGUI_LBC_TEXT=0, + //! Color of selected text + EGUI_LBC_TEXT_HIGHLIGHT, + //! Color of icon + EGUI_LBC_ICON, + //! Color of selected icon + EGUI_LBC_ICON_HIGHLIGHT, + //! Not used, just counts the number of available colors + EGUI_LBC_COUNT + }; + + + //! Default list box GUI element. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_LISTBOX_CHANGED + \li EGET_LISTBOX_SELECTED_AGAIN + */ + class IGUIListBox : public IGUIElement + { + public: + //! constructor + IGUIListBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_LIST_BOX, environment, parent, id, rectangle) {} + + //! returns amount of list items + virtual u32 getItemCount() const = 0; + + //! returns string of a list item. the may id be a value from 0 to itemCount-1 + virtual const wchar_t* getListItem(u32 id) const = 0; + + //! adds an list item, returns id of item + virtual u32 addItem(const wchar_t* text) = 0; + + //! adds an list item with an icon + /** \param text Text of list entry + \param icon Sprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon + \return The id of the new created item */ + virtual u32 addItem(const wchar_t* text, s32 icon) = 0; + + //! Removes an item from the list + virtual void removeItem(u32 index) = 0; + + //! get the the id of the item at the given absolute coordinates + /** \return The id of the listitem or -1 when no item is at those coordinates*/ + virtual s32 getItemAt(s32 xpos, s32 ypos) const = 0; + + //! Returns the icon of an item + virtual s32 getIcon(u32 index) const = 0; + + //! Sets the sprite bank which should be used to draw list icons. + /** This font is set to the sprite bank of the built-in-font by + default. A sprite can be displayed in front of every list item. + An icon is an index within the icon sprite bank. Several + default icons are available in the skin through getIcon. */ + virtual void setSpriteBank(IGUISpriteBank* bank) = 0; + + //! clears the list, deletes all items in the listbox + virtual void clear() = 0; + + //! returns id of selected item. returns -1 if no item is selected. + virtual s32 getSelected() const = 0; + + //! sets the selected item. Set this to -1 if no item should be selected + virtual void setSelected(s32 index) = 0; + + //! sets the selected item. Set this to 0 if no item should be selected + virtual void setSelected(const wchar_t *item) = 0; + + //! set whether the listbox should scroll to newly selected items + virtual void setAutoScrollEnabled(bool scroll) = 0; + + //! returns true if automatic scrolling is enabled, false if not. + virtual bool isAutoScrollEnabled() const = 0; + + //! set all item colors at given index to color + virtual void setItemOverrideColor(u32 index, video::SColor color) = 0; + + //! set all item colors of specified type at given index to color + virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) = 0; + + //! clear all item colors at index + virtual void clearItemOverrideColor(u32 index) = 0; + + //! clear item color at index for given colortype + virtual void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) = 0; + + //! has the item at index its color overwritten? + virtual bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0; + + //! return the overwrite color at given item index. + virtual video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0; + + //! return the default color which is used for the given colorType + virtual video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const = 0; + + //! set the item at the given index + virtual void setItem(u32 index, const wchar_t* text, s32 icon) = 0; + + //! Insert the item at the given index + /** \return The index on success or -1 on failure. */ + virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon) = 0; + + //! Swap the items at the given indices + virtual void swapItems(u32 index1, u32 index2) = 0; + + //! set global itemHeight + virtual void setItemHeight( s32 height ) = 0; + + //! Sets whether to draw the background + virtual void setDrawBackground(bool draw) = 0; +}; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIMeshViewer.h b/src/others/irrlicht-1.8.1/include/IGUIMeshViewer.h new file mode 100644 index 0000000..3255f4e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIMeshViewer.h @@ -0,0 +1,53 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_MESH_VIEWER_H_INCLUDED__ +#define __I_GUI_MESH_VIEWER_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ + +namespace video +{ + class SMaterial; +} // end namespace video + +namespace scene +{ + class IAnimatedMesh; +} // end namespace scene + +namespace gui +{ + + //! 3d mesh viewing GUI element. + class IGUIMeshViewer : public IGUIElement + { + public: + + //! constructor + IGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_MESH_VIEWER, environment, parent, id, rectangle) {} + + //! Sets the mesh to be shown + virtual void setMesh(scene::IAnimatedMesh* mesh) = 0; + + //! Gets the displayed mesh + virtual scene::IAnimatedMesh* getMesh() const = 0; + + //! Sets the material + virtual void setMaterial(const video::SMaterial& material) = 0; + + //! Gets the material + virtual const video::SMaterial& getMaterial() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIScrollBar.h b/src/others/irrlicht-1.8.1/include/IGUIScrollBar.h new file mode 100644 index 0000000..c75900e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIScrollBar.h @@ -0,0 +1,65 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_SCROLL_BAR_H_INCLUDED__ +#define __I_GUI_SCROLL_BAR_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + + //! Default scroll bar GUI element. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_SCROLL_BAR_CHANGED + */ + class IGUIScrollBar : public IGUIElement + { + public: + + //! constructor + IGUIScrollBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_SCROLL_BAR, environment, parent, id, rectangle) {} + + //! sets the maximum value of the scrollbar. + virtual void setMax(s32 max) = 0; + //! gets the maximum value of the scrollbar. + virtual s32 getMax() const = 0; + + //! sets the minimum value of the scrollbar. + virtual void setMin(s32 min) = 0; + //! gets the minimum value of the scrollbar. + virtual s32 getMin() const = 0; + + //! gets the small step value + virtual s32 getSmallStep() const = 0; + + //! Sets the small step + /** That is the amount that the value changes by when clicking + on the buttons or using the cursor keys. */ + virtual void setSmallStep(s32 step) = 0; + + //! gets the large step value + virtual s32 getLargeStep() const = 0; + + //! Sets the large step + /** That is the amount that the value changes by when clicking + in the tray, or using the page up and page down keys. */ + virtual void setLargeStep(s32 step) = 0; + + //! gets the current position of the scrollbar + virtual s32 getPos() const = 0; + + //! sets the current position of the scrollbar + virtual void setPos(s32 pos) = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUISkin.h b/src/others/irrlicht-1.8.1/include/IGUISkin.h new file mode 100644 index 0000000..d3bf337 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUISkin.h @@ -0,0 +1,574 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_SKIN_H_INCLUDED__ +#define __I_GUI_SKIN_H_INCLUDED__ + +#include "IAttributeExchangingObject.h" +#include "EGUIAlignment.h" +#include "SColor.h" +#include "rect.h" + +namespace irr +{ +namespace gui +{ + class IGUIFont; + class IGUISpriteBank; + class IGUIElement; + + //! Enumeration of available default skins. + /** To set one of the skins, use the following code, for example to set + the Windows classic skin: + \code + gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC); + environment->setSkin(newskin); + newskin->drop(); + \endcode + */ + enum EGUI_SKIN_TYPE + { + //! Default windows look and feel + EGST_WINDOWS_CLASSIC=0, + + //! Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons + EGST_WINDOWS_METALLIC, + + //! Burning's skin + EGST_BURNING_SKIN, + + //! An unknown skin, not serializable at present + EGST_UNKNOWN, + + //! this value is not used, it only specifies the number of skin types + EGST_COUNT + }; + + //! Names for gui element types + const c8* const GUISkinTypeNames[EGST_COUNT+1] = + { + "windowsClassic", + "windowsMetallic", + "burning", + "unknown", + 0, + }; + + + //! Enumeration for skin colors + enum EGUI_DEFAULT_COLOR + { + //! Dark shadow for three-dimensional display elements. + EGDC_3D_DARK_SHADOW = 0, + //! Shadow color for three-dimensional display elements (for edges facing away from the light source). + EGDC_3D_SHADOW, + //! Face color for three-dimensional display elements and for dialog box backgrounds. + EGDC_3D_FACE, + //! Highlight color for three-dimensional display elements (for edges facing the light source.) + EGDC_3D_HIGH_LIGHT, + //! Light color for three-dimensional display elements (for edges facing the light source.) + EGDC_3D_LIGHT, + //! Active window border. + EGDC_ACTIVE_BORDER, + //! Active window title bar text. + EGDC_ACTIVE_CAPTION, + //! Background color of multiple document interface (MDI) applications. + EGDC_APP_WORKSPACE, + //! Text on a button + EGDC_BUTTON_TEXT, + //! Grayed (disabled) text. + EGDC_GRAY_TEXT, + //! Item(s) selected in a control. + EGDC_HIGH_LIGHT, + //! Text of item(s) selected in a control. + EGDC_HIGH_LIGHT_TEXT, + //! Inactive window border. + EGDC_INACTIVE_BORDER, + //! Inactive window caption. + EGDC_INACTIVE_CAPTION, + //! Tool tip text color + EGDC_TOOLTIP, + //! Tool tip background color + EGDC_TOOLTIP_BACKGROUND, + //! Scrollbar gray area + EGDC_SCROLLBAR, + //! Window background + EGDC_WINDOW, + //! Window symbols like on close buttons, scroll bars and check boxes + EGDC_WINDOW_SYMBOL, + //! Icons in a list or tree + EGDC_ICON, + //! Selected icons in a list or tree + EGDC_ICON_HIGH_LIGHT, + //! Grayed (disabled) window symbols like on close buttons, scroll bars and check boxes + EGDC_GRAY_WINDOW_SYMBOL, + //! Window background for editable field (editbox, checkbox-field) + EGDC_EDITABLE, + //! Grayed (disabled) window background for editable field (editbox, checkbox-field) + EGDC_GRAY_EDITABLE, + //! Show focus of window background for editable field (editbox or when checkbox-field is pressed) + EGDC_FOCUSED_EDITABLE, + + //! this value is not used, it only specifies the amount of default colors + //! available. + EGDC_COUNT + }; + + //! Names for default skin colors + const c8* const GUISkinColorNames[EGDC_COUNT+1] = + { + "3DDarkShadow", + "3DShadow", + "3DFace", + "3DHighlight", + "3DLight", + "ActiveBorder", + "ActiveCaption", + "AppWorkspace", + "ButtonText", + "GrayText", + "Highlight", + "HighlightText", + "InactiveBorder", + "InactiveCaption", + "ToolTip", + "ToolTipBackground", + "ScrollBar", + "Window", + "WindowSymbol", + "Icon", + "IconHighlight", + "GrayWindowSymbol", + "Editable", + "GrayEditable", + "FocusedEditable", + 0, + }; + + //! Enumeration for default sizes. + enum EGUI_DEFAULT_SIZE + { + //! default with / height of scrollbar + EGDS_SCROLLBAR_SIZE = 0, + //! height of menu + EGDS_MENU_HEIGHT, + //! width of a window button + EGDS_WINDOW_BUTTON_WIDTH, + //! width of a checkbox check + EGDS_CHECK_BOX_WIDTH, + //! \deprecated This may be removed by Irrlicht 1.9 + EGDS_MESSAGE_BOX_WIDTH, + //! \deprecated This may be removed by Irrlicht 1.9 + EGDS_MESSAGE_BOX_HEIGHT, + //! width of a default button + EGDS_BUTTON_WIDTH, + //! height of a default button + EGDS_BUTTON_HEIGHT, + //! distance for text from background + EGDS_TEXT_DISTANCE_X, + //! distance for text from background + EGDS_TEXT_DISTANCE_Y, + //! distance for text in the title bar, from the left of the window rect + EGDS_TITLEBARTEXT_DISTANCE_X, + //! distance for text in the title bar, from the top of the window rect + EGDS_TITLEBARTEXT_DISTANCE_Y, + //! free space in a messagebox between borders and contents on all sides + EGDS_MESSAGE_BOX_GAP_SPACE, + //! minimal space to reserve for messagebox text-width + EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH, + //! maximal space to reserve for messagebox text-width + EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH, + //! minimal space to reserve for messagebox text-height + EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT, + //! maximal space to reserve for messagebox text-height + EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT, + //! pixels to move the button image to the right when a pushbutton is pressed + EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X, + //! pixels to move the button image down when a pushbutton is pressed + EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y, + //! pixels to move the button text to the right when a pushbutton is pressed + EGDS_BUTTON_PRESSED_TEXT_OFFSET_X, + //! pixels to move the button text down when a pushbutton is pressed + EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y, + + //! this value is not used, it only specifies the amount of default sizes + //! available. + EGDS_COUNT + }; + + + //! Names for default skin sizes + const c8* const GUISkinSizeNames[EGDS_COUNT+1] = + { + "ScrollBarSize", + "MenuHeight", + "WindowButtonWidth", + "CheckBoxWidth", + "MessageBoxWidth", + "MessageBoxHeight", + "ButtonWidth", + "ButtonHeight", + "TextDistanceX", + "TextDistanceY", + "TitleBarTextX", + "TitleBarTextY", + "MessageBoxGapSpace", + "MessageBoxMinTextWidth", + "MessageBoxMaxTextWidth", + "MessageBoxMinTextHeight", + "MessageBoxMaxTextHeight", + "ButtonPressedImageOffsetX", + "ButtonPressedImageOffsetY" + "ButtonPressedTextOffsetX", + "ButtonPressedTextOffsetY", + 0 + }; + + + enum EGUI_DEFAULT_TEXT + { + //! Text for the OK button on a message box + EGDT_MSG_BOX_OK = 0, + //! Text for the Cancel button on a message box + EGDT_MSG_BOX_CANCEL, + //! Text for the Yes button on a message box + EGDT_MSG_BOX_YES, + //! Text for the No button on a message box + EGDT_MSG_BOX_NO, + //! Tooltip text for window close button + EGDT_WINDOW_CLOSE, + //! Tooltip text for window maximize button + EGDT_WINDOW_MAXIMIZE, + //! Tooltip text for window minimize button + EGDT_WINDOW_MINIMIZE, + //! Tooltip text for window restore button + EGDT_WINDOW_RESTORE, + + //! this value is not used, it only specifies the number of default texts + EGDT_COUNT + }; + + //! Names for default skin sizes + const c8* const GUISkinTextNames[EGDT_COUNT+1] = + { + "MessageBoxOkay", + "MessageBoxCancel", + "MessageBoxYes", + "MessageBoxNo", + "WindowButtonClose", + "WindowButtonMaximize", + "WindowButtonMinimize", + "WindowButtonRestore", + 0 + }; + + //! Customizable symbols for GUI + enum EGUI_DEFAULT_ICON + { + //! maximize window button + EGDI_WINDOW_MAXIMIZE = 0, + //! restore window button + EGDI_WINDOW_RESTORE, + //! close window button + EGDI_WINDOW_CLOSE, + //! minimize window button + EGDI_WINDOW_MINIMIZE, + //! resize icon for bottom right corner of a window + EGDI_WINDOW_RESIZE, + //! scroll bar up button + EGDI_CURSOR_UP, + //! scroll bar down button + EGDI_CURSOR_DOWN, + //! scroll bar left button + EGDI_CURSOR_LEFT, + //! scroll bar right button + EGDI_CURSOR_RIGHT, + //! icon for menu children + EGDI_MENU_MORE, + //! tick for checkbox + EGDI_CHECK_BOX_CHECKED, + //! down arrow for dropdown menus + EGDI_DROP_DOWN, + //! smaller up arrow + EGDI_SMALL_CURSOR_UP, + //! smaller down arrow + EGDI_SMALL_CURSOR_DOWN, + //! selection dot in a radio button + EGDI_RADIO_BUTTON_CHECKED, + //! << icon indicating there is more content to the left + EGDI_MORE_LEFT, + //! >> icon indicating that there is more content to the right + EGDI_MORE_RIGHT, + //! icon indicating that there is more content above + EGDI_MORE_UP, + //! icon indicating that there is more content below + EGDI_MORE_DOWN, + //! plus icon for trees + EGDI_EXPAND, + + //! minus icon for trees + EGDI_COLLAPSE, + //! file icon for file selection + EGDI_FILE, + //! folder icon for file selection + EGDI_DIRECTORY, + + //! value not used, it only specifies the number of icons + EGDI_COUNT + }; + + const c8* const GUISkinIconNames[EGDI_COUNT+1] = + { + "windowMaximize", + "windowRestore", + "windowClose", + "windowMinimize", + "windowResize", + "cursorUp", + "cursorDown", + "cursorLeft", + "cursorRight", + "menuMore", + "checkBoxChecked", + "dropDown", + "smallCursorUp", + "smallCursorDown", + "radioButtonChecked", + "moreLeft", + "moreRight", + "moreUp", + "moreDown", + "expand", + "collapse", + "file", + "directory", + 0 + }; + + // Customizable fonts + enum EGUI_DEFAULT_FONT + { + //! For static text, edit boxes, lists and most other places + EGDF_DEFAULT=0, + //! Font for buttons + EGDF_BUTTON, + //! Font for window title bars + EGDF_WINDOW, + //! Font for menu items + EGDF_MENU, + //! Font for tooltips + EGDF_TOOLTIP, + //! this value is not used, it only specifies the amount of default fonts + //! available. + EGDF_COUNT + }; + + const c8* const GUISkinFontNames[EGDF_COUNT+1] = + { + "defaultFont", + "buttonFont", + "windowFont", + "menuFont", + "tooltipFont", + 0 + }; + + //! A skin modifies the look of the GUI elements. + class IGUISkin : public virtual io::IAttributeExchangingObject + { + public: + + //! returns default color + virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0; + + //! sets a default color + virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) = 0; + + //! returns size for the given size type + virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0; + + //! Returns a default text. + /** For example for Message box button captions: + "OK", "Cancel", "Yes", "No" and so on. */ + virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0; + + //! Sets a default text. + /** For example for Message box button captions: + "OK", "Cancel", "Yes", "No" and so on. */ + virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) = 0; + + //! sets a default size + virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0; + + //! returns the default font + virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0; + + //! sets a default font + virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0; + + //! returns the sprite bank + virtual IGUISpriteBank* getSpriteBank() const = 0; + + //! sets the sprite bank + virtual void setSpriteBank(IGUISpriteBank* bank) = 0; + + //! Returns a default icon + /** Returns the sprite index within the sprite bank */ + virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0; + + //! Sets a default icon + /** Sets the sprite index used for drawing icons like arrows, + close buttons and ticks in checkboxes + \param icon: Enum specifying which icon to change + \param index: The sprite index used to draw this icon */ + virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index) = 0; + + //! draws a standard 3d button pane + /** Used for drawing for example buttons in normal state. + It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and + EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DButtonPaneStandard(IGUIElement* element, + const core::rect& rect, + const core::rect* clip=0) = 0; + + //! draws a pressed 3d button pane + /** Used for drawing for example buttons in pressed state. + It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and + EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DButtonPanePressed(IGUIElement* element, + const core::rect& rect, + const core::rect* clip=0) = 0; + + //! draws a sunken 3d pane + /** Used for drawing the background of edit, combo or check boxes. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param bgcolor: Background color. + \param flat: Specifies if the sunken pane should be flat or displayed as sunken + deep into the ground. + \param fillBackGround: Specifies if the background should be filled with the background + color or not be drawn at all. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DSunkenPane(IGUIElement* element, + video::SColor bgcolor, bool flat, bool fillBackGround, + const core::rect& rect, + const core::rect* clip=0) = 0; + + //! draws a window background + /** Used for drawing the background of dialogs and windows. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param titleBarColor: Title color. + \param drawTitleBar: True to enable title drawing. + \param rect: Defining area where to draw. + \param clip: Clip area. + \param checkClientArea: When set to non-null the function will not draw anything, + but will instead return the clientArea which can be used for drawing by the calling window. + That is the area without borders and without titlebar. + \return Returns rect where it would be good to draw title bar text. This will + work even when checkClientArea is set to a non-null value.*/ + virtual core::rect draw3DWindowBackground(IGUIElement* element, + bool drawTitleBar, video::SColor titleBarColor, + const core::rect& rect, + const core::rect* clip=0, + core::rect* checkClientArea=0) = 0; + + //! draws a standard 3d menu pane + /** Used for drawing for menus and context menus. + It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and + EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DMenuPane(IGUIElement* element, + const core::rect& rect, + const core::rect* clip=0) = 0; + + //! draws a standard 3d tool bar + /** Used for drawing for toolbars and menus. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DToolBar(IGUIElement* element, + const core::rect& rect, + const core::rect* clip=0) = 0; + + //! draws a tab button + /** Used for drawing for tab buttons on top of tabs. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param active: Specifies if the tab is currently active. + \param rect: Defining area where to draw. + \param clip: Clip area. + \param alignment Alignment of GUI element. */ + virtual void draw3DTabButton(IGUIElement* element, bool active, + const core::rect& rect, const core::rect* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0; + + //! draws a tab control body + /** \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by IGUISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param border: Specifies if the border should be drawn. + \param background: Specifies if the background should be drawn. + \param rect: Defining area where to draw. + \param clip: Clip area. + \param tabHeight Height of tab. + \param alignment Alignment of GUI element. */ + virtual void draw3DTabBody(IGUIElement* element, bool border, bool background, + const core::rect& rect, const core::rect* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0; + + //! draws an icon, usually from the skin's sprite bank + /** \param element: Pointer to the element which wishes to draw this icon. + This parameter is usually not used by IGUISkin, but can be used for example + by more complex implementations to find out how to draw the part exactly. + \param icon: Specifies the icon to be drawn. + \param position: The position to draw the icon + \param starttime: The time at the start of the animation + \param currenttime: The present time, used to calculate the frame number + \param loop: Whether the animation should loop or not + \param clip: Clip area. */ + virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, + const core::position2di position, u32 starttime=0, u32 currenttime=0, + bool loop=false, const core::rect* clip=0) = 0; + + //! draws a 2d rectangle. + /** \param element: Pointer to the element which wishes to draw this icon. + This parameter is usually not used by IGUISkin, but can be used for example + by more complex implementations to find out how to draw the part exactly. + \param color: Color of the rectangle to draw. The alpha component specifies how + transparent the rectangle will be. + \param pos: Position of the rectangle. + \param clip: Pointer to rectangle against which the rectangle will be clipped. + If the pointer is null, no clipping will be performed. */ + virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color, + const core::rect& pos, const core::rect* clip = 0) = 0; + + //! get the type of this skin + virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; } + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUISpinBox.h b/src/others/irrlicht-1.8.1/include/IGUISpinBox.h new file mode 100644 index 0000000..bef139d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUISpinBox.h @@ -0,0 +1,69 @@ +// Copyright (C) 2006-2012 Michael Zeilfelder +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_SPIN_BOX_H_INCLUDED__ +#define __I_GUI_SPIN_BOX_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + class IGUIEditBox; + + //! Single line edit box + spin buttons + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_SPINBOX_CHANGED + */ + class IGUISpinBox : public IGUIElement + { + public: + + //! constructor + IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect rectangle) + : IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {} + + //! Access the edit box used in the spin control + virtual IGUIEditBox* getEditBox() const = 0; + + //! set the current value of the spinbox + /** \param val: value to be set in the spinbox */ + virtual void setValue(f32 val) = 0; + + //! Get the current value of the spinbox + virtual f32 getValue() const = 0; + + //! set the range of values which can be used in the spinbox + /** \param min: minimum value + \param max: maximum value */ + virtual void setRange(f32 min, f32 max) = 0; + + //! get the minimum value which can be used in the spinbox + virtual f32 getMin() const = 0; + + //! get the maximum value which can be used in the spinbox + virtual f32 getMax() const = 0; + + //! Step size by which values are changed when pressing the spinbuttons + /** The step size also determines the number of decimal places to display + \param step: stepsize used for value changes when pressing spinbuttons */ + virtual void setStepSize(f32 step=1.f) = 0; + + //! Sets the number of decimal places to display. + //! Note that this also rounds the range to the same number of decimal places. + /** \param places: The number of decimal places to display, use -1 to reset */ + virtual void setDecimalPlaces(s32 places) = 0; + + //! get the current step size + virtual f32 getStepSize() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // __I_GUI_SPIN_BOX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IGUISpriteBank.h b/src/others/irrlicht-1.8.1/include/IGUISpriteBank.h new file mode 100644 index 0000000..4a2b5f5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUISpriteBank.h @@ -0,0 +1,95 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_SPRITE_BANK_H_INCLUDED__ +#define __I_GUI_SPRITE_BANK_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrArray.h" +#include "SColor.h" +#include "rect.h" + +namespace irr +{ + +namespace video +{ + class ITexture; +} // end namespace video + +namespace gui +{ + +//! A single sprite frame. +struct SGUISpriteFrame +{ + u32 textureNumber; + u32 rectNumber; +}; + +//! A sprite composed of several frames. +struct SGUISprite +{ + SGUISprite() : Frames(), frameTime(0) {} + + core::array Frames; + u32 frameTime; +}; + + +//! Sprite bank interface. +/** See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank +* for more information how to use the spritebank. +*/ +class IGUISpriteBank : public virtual IReferenceCounted +{ +public: + + //! Returns the list of rectangles held by the sprite bank + virtual core::array< core::rect >& getPositions() = 0; + + //! Returns the array of animated sprites within the sprite bank + virtual core::array< SGUISprite >& getSprites() = 0; + + //! Returns the number of textures held by the sprite bank + virtual u32 getTextureCount() const = 0; + + //! Gets the texture with the specified index + virtual video::ITexture* getTexture(u32 index) const = 0; + + //! Adds a texture to the sprite bank + virtual void addTexture(video::ITexture* texture) = 0; + + //! Changes one of the textures in the sprite bank + virtual void setTexture(u32 index, video::ITexture* texture) = 0; + + //! Add the texture and use it for a single non-animated sprite. + //! The texture and the corresponding rectangle and sprite will all be added to the end of each array. + //! returns the index of the sprite or -1 on failure + virtual s32 addTextureAsSprite(video::ITexture* texture) = 0; + + //! clears sprites, rectangles and textures + virtual void clear() = 0; + + //! Draws a sprite in 2d with position and color + virtual void draw2DSprite(u32 index, const core::position2di& pos, + const core::rect* clip=0, + const video::SColor& color= video::SColor(255,255,255,255), + u32 starttime=0, u32 currenttime=0, + bool loop=true, bool center=false) = 0; + + //! Draws a sprite batch in 2d using an array of positions and a color + virtual void draw2DSpriteBatch(const core::array& indices, const core::array& pos, + const core::rect* clip=0, + const video::SColor& color= video::SColor(255,255,255,255), + u32 starttime=0, u32 currenttime=0, + bool loop=true, bool center=false) = 0; +}; + + +} // end namespace gui +} // end namespace irr + +#endif // __I_GUI_SPRITE_BANK_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IGUIStaticText.h b/src/others/irrlicht-1.8.1/include/IGUIStaticText.h new file mode 100644 index 0000000..30325bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIStaticText.h @@ -0,0 +1,135 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_STATIC_TEXT_H_INCLUDED__ +#define __I_GUI_STATIC_TEXT_H_INCLUDED__ + +#include "IGUIElement.h" +#include "SColor.h" + +namespace irr +{ +namespace gui +{ + class IGUIFont; + + //! Multi or single line text label. + class IGUIStaticText : public IGUIElement + { + public: + + //! constructor + IGUIStaticText(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_STATIC_TEXT, environment, parent, id, rectangle) {} + + //! Sets another skin independent font. + /** If this is set to zero, the button uses the font of the skin. + \param font: New font to set. */ + virtual void setOverrideFont(IGUIFont* font=0) = 0; + + //! Gets the override font (if any) + /** \return The override font (may be 0) */ + virtual IGUIFont* getOverrideFont(void) const = 0; + + //! Get the font which is used right now for drawing + /** Currently this is the override font when one is set and the + font of the active skin otherwise */ + virtual IGUIFont* getActiveFont() const = 0; + + //! Sets another color for the text. + /** If set, the static text does not use the EGDC_BUTTON_TEXT color defined + in the skin, but the set color instead. You don't need to call + IGUIStaticText::enableOverrrideColor(true) after this, this is done + by this function. + If you set a color, and you want the text displayed with the color + of the skin again, call IGUIStaticText::enableOverrideColor(false); + \param color: New color of the text. */ + virtual void setOverrideColor(video::SColor color) = 0; + + //! Gets the override color + /** \return: The override color */ + virtual video::SColor getOverrideColor(void) const = 0; + + //! Sets if the static text should use the overide color or the color in the gui skin. + /** \param enable: If set to true, the override color, which can be set + with IGUIStaticText::setOverrideColor is used, otherwise the + EGDC_BUTTON_TEXT color of the skin. */ + virtual void enableOverrideColor(bool enable) = 0; + + //! Checks if an override color is enabled + /** \return true if the override color is enabled, false otherwise */ + virtual bool isOverrideColorEnabled(void) const = 0; + + //! Sets another color for the background. + virtual void setBackgroundColor(video::SColor color) = 0; + + //! Sets whether to draw the background + virtual void setDrawBackground(bool draw) = 0; + + //! Gets the background color + /** \return: The background color */ + virtual video::SColor getBackgroundColor() const = 0; + + //! Checks if background drawing is enabled + /** \return true if background drawing is enabled, false otherwise */ + virtual bool isDrawBackgroundEnabled() const = 0; + + //! Sets whether to draw the border + virtual void setDrawBorder(bool draw) = 0; + + //! Checks if border drawing is enabled + /** \return true if border drawing is enabled, false otherwise */ + virtual bool isDrawBorderEnabled() const = 0; + + //! Sets text justification mode + /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), + EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text. + \param vertical: EGUIA_UPPERLEFT to align with top edge, + EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ + virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; + + //! Enables or disables word wrap for using the static text as multiline text control. + /** \param enable: If set to true, words going over one line are + broken on to the next line. */ + virtual void setWordWrap(bool enable) = 0; + + //! Checks if word wrap is enabled + /** \return true if word wrap is enabled, false otherwise */ + virtual bool isWordWrapEnabled(void) const = 0; + + //! Returns the height of the text in pixels when it is drawn. + /** This is useful for adjusting the layout of gui elements based on the height + of the multiline text in this element. + \return Height of text in pixels. */ + virtual s32 getTextHeight() const = 0; + + //! Returns the width of the current text, in the current font + /** If the text is broken, this returns the width of the widest line + \return The width of the text, or the widest broken line. */ + virtual s32 getTextWidth(void) const = 0; + + //! Set whether the text in this label should be clipped if it goes outside bounds + virtual void setTextRestrainedInside(bool restrainedInside) = 0; + + //! Checks if the text in this label should be clipped if it goes outside bounds + virtual bool isTextRestrainedInside() const = 0; + + //! Set whether the string should be interpreted as right-to-left (RTL) text + /** \note This component does not implement the Unicode bidi standard, the + text of the component should be already RTL if you call this. The + main difference when RTL is enabled is that the linebreaks for multiline + elements are performed starting from the end. + */ + virtual void setRightToLeft(bool rtl) = 0; + + //! Checks whether the text in this element should be interpreted as right-to-left + virtual bool isRightToLeft() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUITabControl.h b/src/others/irrlicht-1.8.1/include/IGUITabControl.h new file mode 100644 index 0000000..660c4d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUITabControl.h @@ -0,0 +1,136 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_TAB_CONTROL_H_INCLUDED__ +#define __I_GUI_TAB_CONTROL_H_INCLUDED__ + +#include "IGUIElement.h" +#include "SColor.h" +#include "IGUISkin.h" + +namespace irr +{ +namespace gui +{ + //! A tab-page, onto which other gui elements could be added. + /** IGUITab refers to the page itself, not to the tab in the tabbar of an IGUITabControl. */ + class IGUITab : public IGUIElement + { + public: + + //! constructor + IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {} + + //! Returns zero based index of tab if in tabcontrol. + /** Can be accessed later IGUITabControl::getTab() by this number. + Note that this number can change when other tabs are inserted or removed . + */ + virtual s32 getNumber() const = 0; + + //! sets if the tab should draw its background + virtual void setDrawBackground(bool draw=true) = 0; + + //! sets the color of the background, if it should be drawn. + virtual void setBackgroundColor(video::SColor c) = 0; + + //! returns true if the tab is drawing its background, false if not + virtual bool isDrawingBackground() const = 0; + + //! returns the color of the background + virtual video::SColor getBackgroundColor() const = 0; + + //! sets the color of the text + virtual void setTextColor(video::SColor c) = 0; + + //! gets the color of the text + virtual video::SColor getTextColor() const = 0; + }; + + //! A standard tab control + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_TAB_CHANGED + */ + class IGUITabControl : public IGUIElement + { + public: + + //! constructor + IGUITabControl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_TAB_CONTROL, environment, parent, id, rectangle) {} + + //! Adds a tab + virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0; + + //! Insert the tab at the given index + /** \return The tab on success or NULL on failure. */ + virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1) = 0; + + //! Removes a tab from the tabcontrol + virtual void removeTab(s32 idx) = 0; + + //! Clears the tabcontrol removing all tabs + virtual void clear() = 0; + + //! Returns amount of tabs in the tabcontrol + virtual s32 getTabCount() const = 0; + + //! Returns a tab based on zero based index + /** \param idx: zero based index of tab. Is a value betwenn 0 and getTabcount()-1; + \return Returns pointer to the Tab. Returns 0 if no tab + is corresponding to this tab. */ + virtual IGUITab* getTab(s32 idx) const = 0; + + //! Brings a tab to front. + /** \param idx: number of the tab. + \return Returns true if successful. */ + virtual bool setActiveTab(s32 idx) = 0; + + //! Brings a tab to front. + /** \param tab: pointer to the tab. + \return Returns true if successful. */ + virtual bool setActiveTab(IGUITab *tab) = 0; + + //! Returns which tab is currently active + virtual s32 getActiveTab() const = 0; + + //! get the the id of the tab at the given absolute coordinates + /** \return The id of the tab or -1 when no tab is at those coordinates*/ + virtual s32 getTabAt(s32 xpos, s32 ypos) const = 0; + + //! Set the height of the tabs + virtual void setTabHeight( s32 height ) = 0; + + //! Get the height of the tabs + /** return Returns the height of the tabs */ + virtual s32 getTabHeight() const = 0; + + //! set the maximal width of a tab. Per default width is 0 which means "no width restriction". + virtual void setTabMaxWidth(s32 width ) = 0; + + //! get the maximal width of a tab + virtual s32 getTabMaxWidth() const = 0; + + //! Set the alignment of the tabs + /** Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT */ + virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0; + + //! Get the alignment of the tabs + /** return Returns the alignment of the tabs */ + virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const = 0; + + //! Set the extra width added to tabs on each side of the text + virtual void setTabExtraWidth( s32 extraWidth ) = 0; + + //! Get the extra width added to tabs on each side of the text + /** return Returns the extra width of the tabs */ + virtual s32 getTabExtraWidth() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUITable.h b/src/others/irrlicht-1.8.1/include/IGUITable.h new file mode 100644 index 0000000..4f271a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUITable.h @@ -0,0 +1,205 @@ +// Copyright (C) 2003-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_TABLE_H_INCLUDED__ +#define __I_GUI_TABLE_H_INCLUDED__ + +#include "IGUIElement.h" +#include "irrTypes.h" +#include "SColor.h" +#include "IGUISkin.h" + +namespace irr +{ +namespace gui +{ + + //! modes for ordering used when a column header is clicked + enum EGUI_COLUMN_ORDERING + { + //! Do not use ordering + EGCO_NONE, + + //! Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked. + EGCO_CUSTOM, + + //! Sort it ascending by it's ascii value like: a,b,c,... + EGCO_ASCENDING, + + //! Sort it descending by it's ascii value like: z,x,y,... + EGCO_DESCENDING, + + //! Sort it ascending on first click, descending on next, etc + EGCO_FLIP_ASCENDING_DESCENDING, + + //! Not used as mode, only to get maximum value for this enum + EGCO_COUNT + }; + + //! Names for EGUI_COLUMN_ORDERING types + const c8* const GUIColumnOrderingNames[] = + { + "none", + "custom", + "ascend", + "descend", + "ascend_descend", + 0, + }; + + enum EGUI_ORDERING_MODE + { + //! No element ordering + EGOM_NONE, + + //! Elements are ordered from the smallest to the largest. + EGOM_ASCENDING, + + //! Elements are ordered from the largest to the smallest. + EGOM_DESCENDING, + + //! this value is not used, it only specifies the amount of default ordering types + //! available. + EGOM_COUNT + }; + + const c8* const GUIOrderingModeNames[] = + { + "none", + "ascending", + "descending", + 0 + }; + + enum EGUI_TABLE_DRAW_FLAGS + { + EGTDF_ROWS = 1, + EGTDF_COLUMNS = 2, + EGTDF_ACTIVE_ROW = 4, + EGTDF_COUNT + }; + + //! Default list box GUI element. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_TABLE_CHANGED + \li EGET_TABLE_SELECTED_AGAIN + \li EGET_TABLE_HEADER_CHANGED + */ + class IGUITable : public IGUIElement + { + public: + //! constructor + IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {} + + //! Adds a column + /** If columnIndex is outside the current range, do push new colum at the end */ + virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0; + + //! remove a column from the table + virtual void removeColumn(u32 columnIndex) = 0; + + //! Returns the number of columns in the table control + virtual s32 getColumnCount() const = 0; + + //! Makes a column active. This will trigger an ordering process. + /** \param idx: The id of the column to make active. + \param doOrder: Do also the ordering which depending on mode for active column + \return True if successful. */ + virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0; + + //! Returns which header is currently active + virtual s32 getActiveColumn() const = 0; + + //! Returns the ordering used by the currently active column + virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0; + + //! Set the width of a column + virtual void setColumnWidth(u32 columnIndex, u32 width) = 0; + + //! Get the width of a column + virtual u32 getColumnWidth(u32 columnIndex) const = 0; + + //! columns can be resized by drag 'n drop + virtual void setResizableColumns(bool resizable) = 0; + + //! can columns be resized by dran 'n drop? + virtual bool hasResizableColumns() const = 0; + + //! This tells the table control which ordering mode should be used when a column header is clicked. + /** \param columnIndex The index of the column header. + \param mode: One of the modes defined in EGUI_COLUMN_ORDERING */ + virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0; + + //! Returns which row is currently selected + virtual s32 getSelected() const = 0; + + //! set wich row is currently selected + virtual void setSelected( s32 index ) = 0; + + //! Get amount of rows in the tabcontrol + virtual s32 getRowCount() const = 0; + + //! adds a row to the table + /** \param rowIndex Zero based index of rows. The row will be + inserted at this position, if a row already exist there, it + will be placed after it. If the row is larger than the actual + number of row by more than one, it won't be created. Note that + if you create a row that's not at the end, there might be + performance issues. + \return index of inserted row. */ + virtual u32 addRow(u32 rowIndex) = 0; + + //! Remove a row from the table + virtual void removeRow(u32 rowIndex) = 0; + + //! clears the table rows, but keeps the columns intact + virtual void clearRows() = 0; + + //! Swap two row positions. + virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0; + + //! This tells the table to start ordering all the rows. + /** You need to explicitly tell the table to re order the rows + when a new row is added or the cells data is changed. This + makes the system more flexible and doesn't make you pay the + cost of ordering when adding a lot of rows. + \param columnIndex: When set to -1 the active column is used. + \param mode Ordering mode of the rows. */ + virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0; + + //! Set the text of a cell + virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0; + + //! Set the text of a cell, and set a color of this cell. + virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0; + + //! Set the data of a cell + virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0; + + //! Set the color of a cell text + virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0; + + //! Get the text of a cell + virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0; + + //! Get the data of a cell + virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0; + + //! clears the table, deletes all items in the table + virtual void clear() = 0; + + //! Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout + virtual void setDrawFlags(s32 flags) = 0; + + //! Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout + virtual s32 getDrawFlags() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIToolbar.h b/src/others/irrlicht-1.8.1/include/IGUIToolbar.h new file mode 100644 index 0000000..58796bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIToolbar.h @@ -0,0 +1,40 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_TOOL_BAR_H_INCLUDED__ +#define __I_GUI_TOOL_BAR_H_INCLUDED__ + +#include "IGUIElement.h" + +namespace irr +{ +namespace video +{ + class ITexture; +} // end namespace video +namespace gui +{ + class IGUIButton; + + //! Stays at the top of its parent like the menu bar and contains tool buttons + class IGUIToolBar : public IGUIElement + { + public: + + //! constructor + IGUIToolBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_TOOL_BAR, environment, parent, id, rectangle) {} + + //! Adds a button to the tool bar + virtual IGUIButton* addButton(s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext=0, + video::ITexture* img=0, video::ITexture* pressedimg=0, + bool isPushButton=false, bool useAlphaChannel=false) = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUITreeView.h b/src/others/irrlicht-1.8.1/include/IGUITreeView.h new file mode 100644 index 0000000..4552b29 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUITreeView.h @@ -0,0 +1,278 @@ +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_TREE_VIEW_H_INCLUDED__ +#define __I_GUI_TREE_VIEW_H_INCLUDED__ + +#include "IGUIElement.h" +#include "IGUIImageList.h" +#include "irrTypes.h" + +namespace irr +{ +namespace gui +{ + class IGUIFont; + class IGUITreeView; + + + //! Node for gui tree view + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_TREEVIEW_NODE_EXPAND + \li EGET_TREEVIEW_NODE_COLLAPS + \li EGET_TREEVIEW_NODE_DESELECT + \li EGET_TREEVIEW_NODE_SELECT + */ + class IGUITreeViewNode : public IReferenceCounted + { + public: + //! returns the owner (tree view) of this node + virtual IGUITreeView* getOwner() const = 0; + + //! Returns the parent node of this node. + /** For the root node this will return 0. */ + virtual IGUITreeViewNode* getParent() const = 0; + + //! returns the text of the node + virtual const wchar_t* getText() const = 0; + + //! sets the text of the node + virtual void setText( const wchar_t* text ) = 0; + + //! returns the icon text of the node + virtual const wchar_t* getIcon() const = 0; + + //! sets the icon text of the node + virtual void setIcon( const wchar_t* icon ) = 0; + + //! returns the image index of the node + virtual u32 getImageIndex() const = 0; + + //! sets the image index of the node + virtual void setImageIndex( u32 imageIndex ) = 0; + + //! returns the image index of the node + virtual u32 getSelectedImageIndex() const = 0; + + //! sets the image index of the node + virtual void setSelectedImageIndex( u32 imageIndex ) = 0; + + //! returns the user data (void*) of this node + virtual void* getData() const = 0; + + //! sets the user data (void*) of this node + virtual void setData( void* data ) = 0; + + //! returns the user data2 (IReferenceCounted) of this node + virtual IReferenceCounted* getData2() const = 0; + + //! sets the user data2 (IReferenceCounted) of this node + virtual void setData2( IReferenceCounted* data ) = 0; + + //! returns the child item count + virtual u32 getChildCount() const = 0; + + //! removes all children (recursive) from this node + virtual void clearChildren() = 0; + + //! removes all children (recursive) from this node + /** \deprecated Deprecated in 1.8, use clearChildren() instead. + This method may be removed by Irrlicht 1.9 */ + _IRR_DEPRECATED_ void clearChilds() + { + return clearChildren(); + } + + //! returns true if this node has child nodes + virtual bool hasChildren() const = 0; + + //! returns true if this node has child nodes + /** \deprecated Deprecated in 1.8, use hasChildren() instead. + This method may be removed by Irrlicht 1.9 */ + _IRR_DEPRECATED_ bool hasChilds() const + { + return hasChildren(); + } + + //! Adds a new node behind the last child node. + /** \param text text of the new node + \param icon icon text of the new node + \param imageIndex index of the image for the new node (-1 = none) + \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + \param data user data (void*) of the new node + \param data2 user data2 (IReferenceCounted*) of the new node + \return The new node + */ + virtual IGUITreeViewNode* addChildBack( + const wchar_t* text, const wchar_t* icon = 0, + s32 imageIndex=-1, s32 selectedImageIndex=-1, + void* data=0, IReferenceCounted* data2=0) =0; + + //! Adds a new node before the first child node. + /** \param text text of the new node + \param icon icon text of the new node + \param imageIndex index of the image for the new node (-1 = none) + \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + \param data user data (void*) of the new node + \param data2 user data2 (IReferenceCounted*) of the new node + \return The new node + */ + virtual IGUITreeViewNode* addChildFront( + const wchar_t* text, const wchar_t* icon = 0, + s32 imageIndex=-1, s32 selectedImageIndex=-1, + void* data=0, IReferenceCounted* data2=0 ) =0; + + //! Adds a new node behind the other node. + /** The other node has also te be a child node from this node. + \param other Node to insert after + \param text text of the new node + \param icon icon text of the new node + \param imageIndex index of the image for the new node (-1 = none) + \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + \param data user data (void*) of the new node + \param data2 user data2 (IReferenceCounted*) of the new node + \return The new node or 0 if other is no child node from this + */ + virtual IGUITreeViewNode* insertChildAfter( + IGUITreeViewNode* other, + const wchar_t* text, const wchar_t* icon = 0, + s32 imageIndex=-1, s32 selectedImageIndex=-1, + void* data=0, IReferenceCounted* data2=0) =0; + + //! Adds a new node before the other node. + /** The other node has also te be a child node from this node. + \param other Node to insert before + \param text text of the new node + \param icon icon text of the new node + \param imageIndex index of the image for the new node (-1 = none) + \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + \param data user data (void*) of the new node + \param data2 user data2 (IReferenceCounted*) of the new node + \return The new node or 0 if other is no child node from this + */ + virtual IGUITreeViewNode* insertChildBefore( + IGUITreeViewNode* other, + const wchar_t* text, const wchar_t* icon = 0, + s32 imageIndex=-1, s32 selectedImageIndex=-1, + void* data=0, IReferenceCounted* data2=0) = 0; + + //! Return the first child node from this node. + /** \return The first child node or 0 if this node has no children. */ + virtual IGUITreeViewNode* getFirstChild() const = 0; + + //! Return the last child node from this node. + /** \return The last child node or 0 if this node has no children. */ + virtual IGUITreeViewNode* getLastChild() const = 0; + + //! Returns the previous sibling node from this node. + /** \return The previous sibling node from this node or 0 if this is + the first node from the parent node. + */ + virtual IGUITreeViewNode* getPrevSibling() const = 0; + + //! Returns the next sibling node from this node. + /** \return The next sibling node from this node or 0 if this is + the last node from the parent node. + */ + virtual IGUITreeViewNode* getNextSibling() const = 0; + + //! Returns the next visible (expanded, may be out of scrolling) node from this node. + /** \return The next visible node from this node or 0 if this is + the last visible node. */ + virtual IGUITreeViewNode* getNextVisible() const = 0; + + //! Deletes a child node. + /** \return Returns true if the node was found as a child and is deleted. */ + virtual bool deleteChild( IGUITreeViewNode* child ) = 0; + + //! Moves a child node one position up. + /** \return True if the node was found as achild node and was not already the first child. */ + virtual bool moveChildUp( IGUITreeViewNode* child ) = 0; + + //! Moves a child node one position down. + /** \return True if the node was found as achild node and was not already the last child. */ + virtual bool moveChildDown( IGUITreeViewNode* child ) = 0; + + //! Returns true if the node is expanded (children are visible). + virtual bool getExpanded() const = 0; + + //! Sets if the node is expanded. + virtual void setExpanded( bool expanded ) = 0; + + //! Returns true if the node is currently selected. + virtual bool getSelected() const = 0; + + //! Sets this node as selected. + virtual void setSelected( bool selected ) = 0; + + //! Returns true if this node is the root node. + virtual bool isRoot() const = 0; + + //! Returns the level of this node. + /** The root node has level 0. Direct children of the root has level 1 ... */ + virtual s32 getLevel() const = 0; + + //! Returns true if this node is visible (all parents are expanded). + virtual bool isVisible() const = 0; + }; + + + //! Default tree view GUI element. + /** Displays a windows like tree buttons to expand/collaps the child + nodes of an node and optional tree lines. Each node consits of an + text, an icon text and a void pointer for user data. */ + class IGUITreeView : public IGUIElement + { + public: + //! constructor + IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect rectangle) + : IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {} + + //! returns the root node (not visible) from the tree. + virtual IGUITreeViewNode* getRoot() const = 0; + + //! returns the selected node of the tree or 0 if none is selected + virtual IGUITreeViewNode* getSelected() const = 0; + + //! returns true if the tree lines are visible + virtual bool getLinesVisible() const = 0; + + //! sets if the tree lines are visible + /** \param visible true for visible, false for invisible */ + virtual void setLinesVisible( bool visible ) = 0; + + //! Sets the font which should be used as icon font. + /** This font is set to the Irrlicht engine built-in-font by + default. Icons can be displayed in front of every list item. + An icon is a string, displayed with the icon font. When using + the build-in-font of the Irrlicht engine as icon font, the icon + strings defined in GUIIcons.h can be used. + */ + virtual void setIconFont( IGUIFont* font ) = 0; + + //! Sets the image list which should be used for the image and selected image of every node. + /** The default is 0 (no images). */ + virtual void setImageList( IGUIImageList* imageList ) = 0; + + //! Returns the image list which is used for the nodes. + virtual IGUIImageList* getImageList() const = 0; + + //! Sets if the image is left of the icon. Default is true. + virtual void setImageLeftOfIcon( bool bLeftOf ) = 0; + + //! Returns if the Image is left of the icon. Default is true. + virtual bool getImageLeftOfIcon() const = 0; + + //! Returns the node which is associated to the last event. + /** This pointer is only valid inside the OnEvent call! */ + virtual IGUITreeViewNode* getLastEventNode() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGUIWindow.h b/src/others/irrlicht-1.8.1/include/IGUIWindow.h new file mode 100644 index 0000000..6383bf0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGUIWindow.h @@ -0,0 +1,74 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GUI_WINDOW_H_INCLUDED__ +#define __I_GUI_WINDOW_H_INCLUDED__ + +#include "IGUIElement.h" +#include "EMessageBoxFlags.h" + +namespace irr +{ +namespace gui +{ + class IGUIButton; + + //! Default moveable window GUI element with border, caption and close icons. + /** \par This element can create the following events of type EGUI_EVENT_TYPE: + \li EGET_ELEMENT_CLOSED + */ + class IGUIWindow : public IGUIElement + { + public: + + //! constructor + IGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) + : IGUIElement(EGUIET_WINDOW, environment, parent, id, rectangle) {} + + //! Returns pointer to the close button + /** You can hide the button by calling setVisible(false) on the result. */ + virtual IGUIButton* getCloseButton() const = 0; + + //! Returns pointer to the minimize button + /** You can hide the button by calling setVisible(false) on the result. */ + virtual IGUIButton* getMinimizeButton() const = 0; + + //! Returns pointer to the maximize button + /** You can hide the button by calling setVisible(false) on the result. */ + virtual IGUIButton* getMaximizeButton() const = 0; + + //! Returns true if the window can be dragged with the mouse, false if not + virtual bool isDraggable() const = 0; + + //! Sets whether the window can be dragged by the mouse + virtual void setDraggable(bool draggable) = 0; + + //! Set if the window background will be drawn + virtual void setDrawBackground(bool draw) = 0; + + //! Get if the window background will be drawn + virtual bool getDrawBackground() const = 0; + + //! Set if the window titlebar will be drawn + //! Note: If the background is not drawn, then the titlebar is automatically also not drawn + virtual void setDrawTitlebar(bool draw) = 0; + + //! Get if the window titlebar will be drawn + virtual bool getDrawTitlebar() const = 0; + + //! Returns the rectangle of the drawable area (without border and without titlebar) + /** The coordinates are given relative to the top-left position of the gui element.
+ So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.
+ To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner. + Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract + the menu area additionally. */ + virtual core::rect getClientRect() const = 0; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IGeometryCreator.h b/src/others/irrlicht-1.8.1/include/IGeometryCreator.h new file mode 100644 index 0000000..164e94b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IGeometryCreator.h @@ -0,0 +1,177 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_GEOMETRY_CREATOR_H_INCLUDED__ +#define __I_GEOMETRY_CREATOR_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "IMesh.h" +#include "IImage.h" + +namespace irr +{ +namespace video +{ + class IVideoDriver; + class SMaterial; +} + +namespace scene +{ + +//! Helper class for creating geometry on the fly. +/** You can get an instance of this class through ISceneManager::getGeometryCreator() */ +class IGeometryCreator : public IReferenceCounted +{ +public: + + //! Creates a simple cube mesh. + /** + \param size Dimensions of the cube. + \return Generated mesh. + */ + virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0; + + //! Create a pseudo-random mesh representing a hilly terrain. + /** + \param tileSize The size of each tile. + \param tileCount The number of tiles in each dimension. + \param material The material to apply to the mesh. + \param hillHeight The maximum height of the hills. + \param countHills The number of hills along each dimension. + \param textureRepeatCount The number of times to repeat the material texture along each dimension. + \return Generated mesh. + */ + virtual IMesh* createHillPlaneMesh( + const core::dimension2d& tileSize, + const core::dimension2d& tileCount, + video::SMaterial* material, f32 hillHeight, + const core::dimension2d& countHills, + const core::dimension2d& textureRepeatCount) const =0; + + //! Create a simple rectangular textured plane mesh. + /** + \param tileSize The size of each tile. + \param tileCount The number of tiles in each dimension. + \param material The material to apply to the mesh. + \param textureRepeatCount The number of times to repeat the material texture along each dimension. + \return Generated mesh. + */ + IMesh* createPlaneMesh( + const core::dimension2d& tileSize, + const core::dimension2d& tileCount=core::dimension2du(1,1), + video::SMaterial* material=0, + const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const + { + return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount); + } + + //! Create a terrain mesh from an image representing a heightfield. + /** + \param texture The texture to apply to the terrain. + \param heightmap An image that will be interpreted as a heightmap. The + brightness (average color) of each pixel is interpreted as a height, + with a 255 brightness pixel producing the maximum height. + \param stretchSize The size that each pixel will produce, i.e. a + 512x512 heightmap + and a stretchSize of (10.f, 20.f) will produce a mesh of size + 5120.f x 10240.f + \param maxHeight The maximum height of the terrain. + \param driver The current video driver. + \param defaultVertexBlockSize (to be documented) + \param debugBorders (to be documented) + \return Generated mesh. + */ + virtual IMesh* createTerrainMesh(video::IImage* texture, + video::IImage* heightmap, + const core::dimension2d& stretchSize, + f32 maxHeight, video::IVideoDriver* driver, + const core::dimension2d& defaultVertexBlockSize, + bool debugBorders=false) const =0; + + //! Create an arrow mesh, composed of a cylinder and a cone. + /** + \param tesselationCylinder Number of quads composing the cylinder. + \param tesselationCone Number of triangles composing the cone's roof. + \param height Total height of the arrow + \param cylinderHeight Total height of the cylinder, should be lesser + than total height + \param widthCylinder Diameter of the cylinder + \param widthCone Diameter of the cone's base, should be not smaller + than the cylinder's diameter + \param colorCylinder color of the cylinder + \param colorCone color of the cone + \return Generated mesh. + */ + virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4, + const u32 tesselationCone = 8, const f32 height = 1.f, + const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f, + const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF, + const video::SColor colorCone = 0xFFFFFFFF) const =0; + + + //! Create a sphere mesh. + /** + \param radius Radius of the sphere + \param polyCountX Number of quads used for the horizontal tiling + \param polyCountY Number of quads used for the vertical tiling + \return Generated mesh. + */ + virtual IMesh* createSphereMesh(f32 radius = 5.f, + u32 polyCountX = 16, u32 polyCountY = 16) const =0; + + //! Create a cylinder mesh. + /** + \param radius Radius of the cylinder. + \param length Length of the cylinder. + \param tesselation Number of quads around the circumference of the cylinder. + \param color The color of the cylinder. + \param closeTop If true, close the ends of the cylinder, otherwise leave them open. + \param oblique (to be documented) + \return Generated mesh. + */ + virtual IMesh* createCylinderMesh(f32 radius, f32 length, + u32 tesselation, + const video::SColor& color=video::SColor(0xffffffff), + bool closeTop=true, f32 oblique=0.f) const =0; + + //! Create a cone mesh. + /** + \param radius Radius of the cone. + \param length Length of the cone. + \param tesselation Number of quads around the circumference of the cone. + \param colorTop The color of the top of the cone. + \param colorBottom The color of the bottom of the cone. + \param oblique (to be documented) + \return Generated mesh. + */ + virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation, + const video::SColor& colorTop=video::SColor(0xffffffff), + const video::SColor& colorBottom=video::SColor(0xffffffff), + f32 oblique=0.f) const =0; + + //! Create a volume light mesh. + /** + \param subdivideU Horizontal patch count. + \param subdivideV Vertical patch count. + \param footColor Color at the bottom of the light. + \param tailColor Color at the mid of the light. + \param lpDistance Virtual distance of the light point for normals. + \param lightDim Dimensions of the light. + \return Generated mesh. + */ + virtual IMesh* createVolumeLightMesh( + const u32 subdivideU=32, const u32 subdivideV=32, + const video::SColor footColor = 0xffffffff, + const video::SColor tailColor = 0xffffffff, + const f32 lpDistance = 8.f, + const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0; +}; + + +} // end namespace scene +} // end namespace irr + +#endif // __I_GEOMETRY_CREATOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IImage.h b/src/others/irrlicht-1.8.1/include/IImage.h new file mode 100644 index 0000000..2cb1f8c --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IImage.h @@ -0,0 +1,155 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_IMAGE_H_INCLUDED__ +#define __I_IMAGE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "position2d.h" +#include "rect.h" +#include "SColor.h" + +namespace irr +{ +namespace video +{ + +//! Interface for software image data. +/** Image loaders create these images from files. IVideoDrivers convert +these images into their (hardware) textures. +*/ +class IImage : public virtual IReferenceCounted +{ +public: + + //! Lock function. Use this to get a pointer to the image data. + /** After you don't need the pointer anymore, you must call unlock(). + \return Pointer to the image data. What type of data is pointed to + depends on the color format of the image. For example if the color + format is ECF_A8R8G8B8, it is of u32. Be sure to call unlock() after + you don't need the pointer any more. */ + virtual void* lock() = 0; + + //! Unlock function. + /** Should be called after the pointer received by lock() is not + needed anymore. */ + virtual void unlock() = 0; + + //! Returns width and height of image data. + virtual const core::dimension2d& getDimension() const = 0; + + //! Returns bits per pixel. + virtual u32 getBitsPerPixel() const = 0; + + //! Returns bytes per pixel + virtual u32 getBytesPerPixel() const = 0; + + //! Returns image data size in bytes + virtual u32 getImageDataSizeInBytes() const = 0; + + //! Returns image data size in pixels + virtual u32 getImageDataSizeInPixels() const = 0; + + //! Returns a pixel + virtual SColor getPixel(u32 x, u32 y) const = 0; + + //! Sets a pixel + virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend = false ) = 0; + + //! Returns the color format + virtual ECOLOR_FORMAT getColorFormat() const = 0; + + //! Returns mask for red value of a pixel + virtual u32 getRedMask() const = 0; + + //! Returns mask for green value of a pixel + virtual u32 getGreenMask() const = 0; + + //! Returns mask for blue value of a pixel + virtual u32 getBlueMask() const = 0; + + //! Returns mask for alpha value of a pixel + virtual u32 getAlphaMask() const = 0; + + //! Returns pitch of image + virtual u32 getPitch() const =0; + + //! Copies the image into the target, scaling the image to fit + virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format=ECF_A8R8G8B8, u32 pitch=0) =0; + + //! Copies the image into the target, scaling the image to fit + virtual void copyToScaling(IImage* target) =0; + + //! copies this surface into another + virtual void copyTo(IImage* target, const core::position2d& pos=core::position2d(0,0)) =0; + + //! copies this surface into another + virtual void copyTo(IImage* target, const core::position2d& pos, const core::rect& sourceRect, const core::rect* clipRect=0) =0; + + //! copies this surface into another, using the alpha mask and cliprect and a color to add with + virtual void copyToWithAlpha(IImage* target, const core::position2d& pos, + const core::rect& sourceRect, const SColor &color, + const core::rect* clipRect = 0) =0; + + //! copies this surface into another, scaling it to fit, appyling a box filter + virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false) = 0; + + //! fills the surface with given color + virtual void fill(const SColor &color) =0; + + //! get the amount of Bits per Pixel of the given color format + static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format) + { + switch(format) + { + case ECF_A1R5G5B5: + return 16; + case ECF_R5G6B5: + return 16; + case ECF_R8G8B8: + return 24; + case ECF_A8R8G8B8: + return 32; + case ECF_R16F: + return 16; + case ECF_G16R16F: + return 32; + case ECF_A16B16G16R16F: + return 64; + case ECF_R32F: + return 32; + case ECF_G32R32F: + return 64; + case ECF_A32B32G32R32F: + return 128; + default: + return 0; + } + } + + //! test if the color format is only viable for RenderTarget textures + /** Since we don't have support for e.g. floating point IImage formats + one should test if the color format can be used for arbitrary usage, or + if it is restricted to RTTs. */ + static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format) + { + switch(format) + { + case ECF_A1R5G5B5: + case ECF_R5G6B5: + case ECF_R8G8B8: + case ECF_A8R8G8B8: + return false; + default: + return true; + } + } + +}; + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IImageLoader.h b/src/others/irrlicht-1.8.1/include/IImageLoader.h new file mode 100644 index 0000000..5ff091d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IImageLoader.h @@ -0,0 +1,53 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SURFACE_LOADER_H_INCLUDED__ +#define __I_SURFACE_LOADER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "IImage.h" +#include "path.h" + +namespace irr +{ +namespace io +{ + class IReadFile; +} // end namespace io +namespace video +{ + +//! Class which is able to create a image from a file. +/** If you want the Irrlicht Engine be able to load textures of +currently unsupported file formats (e.g .gif), then implement +this and add your new Surface loader with +IVideoDriver::addExternalImageLoader() to the engine. */ +class IImageLoader : public virtual IReferenceCounted +{ +public: + + //! Check if the file might be loaded by this class + /** Check is based on the file extension (e.g. ".tga") + \param filename Name of file to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileExtension(const io::path& filename) const = 0; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0; + + //! Creates a surface from the file + /** \param file File handle to check. + \return Pointer to newly created image, or 0 upon error. */ + virtual IImage* loadImage(io::IReadFile* file) const = 0; +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IImageWriter.h b/src/others/irrlicht-1.8.1/include/IImageWriter.h new file mode 100644 index 0000000..884a488 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IImageWriter.h @@ -0,0 +1,45 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _I_IMAGE_WRITER_H_INCLUDED__ +#define _I_IMAGE_WRITER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrString.h" +#include "coreutil.h" + +namespace irr +{ +namespace io +{ + class IWriteFile; +} // end namespace io + +namespace video +{ + class IImage; + + +//! Interface for writing software image data. +class IImageWriter : public IReferenceCounted +{ +public: + //! Check if this writer can write a file with the given extension + /** \param filename Name of the file to check. + \return True if file extension specifies a writable type. */ + virtual bool isAWriteableFileExtension(const io::path& filename) const = 0; + + //! Write image to file + /** \param file File handle to write to. + \param image Image to write into file. + \param param Writer specific parameter, influencing e.g. quality. + \return True if image was successfully written. */ + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0; +}; + +} // namespace video +} // namespace irr + +#endif // _I_IMAGE_WRITER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IIndexBuffer.h b/src/others/irrlicht-1.8.1/include/IIndexBuffer.h new file mode 100644 index 0000000..5599b0f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IIndexBuffer.h @@ -0,0 +1,65 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_INDEX_BUFFER_H_INCLUDED__ +#define __I_INDEX_BUFFER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrArray.h" + +#include "SVertexIndex.h" + +namespace irr +{ + +namespace video +{ + +} + +namespace scene +{ + + class IIndexBuffer : public virtual IReferenceCounted + { + public: + + virtual void* getData() =0; + + virtual video::E_INDEX_TYPE getType() const =0; + virtual void setType(video::E_INDEX_TYPE IndexType) =0; + + virtual u32 stride() const =0; + + virtual u32 size() const =0; + virtual void push_back (const u32 &element) =0; + virtual u32 operator [](u32 index) const =0; + virtual u32 getLast() =0; + virtual void setValue(u32 index, u32 value) =0; + virtual void set_used(u32 usedNow) =0; + virtual void reallocate(u32 new_size) =0; + virtual u32 allocated_size() const=0; + + virtual void* pointer() =0; + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0; + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0; + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty() = 0; + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID() const = 0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ILightManager.h b/src/others/irrlicht-1.8.1/include/ILightManager.h new file mode 100644 index 0000000..ff66798 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ILightManager.h @@ -0,0 +1,62 @@ +// Written by Colin MacDonald - all rights assigned to Nikolaus Gebhardt +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_LIGHT_MANAGER_H_INCLUDED__ +#define __I_LIGHT_MANAGER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + class ILightSceneNode; + + //! ILightManager provides an interface for user applications to manipulate the list of lights in the scene. + /** The light list can be trimmed or re-ordered before device/ hardware + lights are created, and/or individual lights can be switched on and off + before or after each scene node is rendered. It is assumed that the + ILightManager implementation will store any data that it wishes to + retain, i.e. the ISceneManager to which it is assigned, the lightList, + the current render pass, and the current scene node. */ + class ILightManager : public IReferenceCounted + { + public: + //! Called after the scene's light list has been built, but before rendering has begun. + /** As actual device/hardware lights are not created until the + ESNRP_LIGHT render pass, this provides an opportunity for the + light manager to trim or re-order the light list, before any + device/hardware lights have actually been created. + \param lightList: the Scene Manager's light list, which + the light manager may modify. This reference will remain valid + until OnPostRender(). + */ + virtual void OnPreRender(core::array & lightList) = 0; + + //! Called after the last scene node is rendered. + /** After this call returns, the lightList passed to OnPreRender() becomes invalid. */ + virtual void OnPostRender(void) = 0; + + //! Called before a render pass begins + /** \param renderPass: the render pass that's about to begin */ + virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0; + + //! Called after the render pass specified in OnRenderPassPreRender() ends + /** \param[in] renderPass: the render pass that has finished */ + virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0; + + //! Called before the given scene node is rendered + /** \param[in] node: the scene node that's about to be rendered */ + virtual void OnNodePreRender(ISceneNode* node) = 0; + + //! Called after the the node specified in OnNodePreRender() has been rendered + /** \param[in] node: the scene node that has just been rendered */ + virtual void OnNodePostRender(ISceneNode* node) = 0; + }; +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/ILightSceneNode.h b/src/others/irrlicht-1.8.1/include/ILightSceneNode.h new file mode 100644 index 0000000..445ee2d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ILightSceneNode.h @@ -0,0 +1,86 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_LIGHT_SCENE_NODE_H_INCLUDED__ +#define __I_LIGHT_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "SLight.h" + +namespace irr +{ +namespace scene +{ + +//! Scene node which is a dynamic light. +/** You can switch the light on and off by making it visible or not. It can be +animated by ordinary scene node animators. If the light type is directional or +spot, the direction of the light source is defined by the rotation of the scene +node (assuming (0,0,1) as the local direction of the light). +*/ +class ILightSceneNode : public ISceneNode +{ +public: + + //! constructor + ILightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0)) + : ISceneNode(parent, mgr, id, position) {} + + //! Sets the light data associated with this ILightSceneNode + /** \param light The new light data. */ + virtual void setLightData(const video::SLight& light) = 0; + + //! Gets the light data associated with this ILightSceneNode + /** \return The light data. */ + virtual const video::SLight& getLightData() const = 0; + + //! Gets the light data associated with this ILightSceneNode + /** \return The light data. */ + virtual video::SLight& getLightData() = 0; + + //! Sets if the node should be visible or not. + /** All children of this node won't be visible either, when set + to true. + \param isVisible If the node shall be visible. */ + virtual void setVisible(bool isVisible) = 0; + + //! Sets the light's radius of influence. + /** Outside this radius the light won't lighten geometry and cast no + shadows. Setting the radius will also influence the attenuation, setting + it to (0,1/radius,0). If you want to override this behavior, set the + attenuation after the radius. + \param radius The new radius. */ + virtual void setRadius(f32 radius) = 0; + + //! Gets the light's radius of influence. + /** \return The current radius. */ + virtual f32 getRadius() const = 0; + + //! Sets the light type. + /** \param type The new type. */ + virtual void setLightType(video::E_LIGHT_TYPE type) = 0; + + //! Gets the light type. + /** \return The current light type. */ + virtual video::E_LIGHT_TYPE getLightType() const = 0; + + //! Sets whether this light casts shadows. + /** Enabling this flag won't automatically cast shadows, the meshes + will still need shadow scene nodes attached. But one can enable or + disable distinct lights for shadow casting for performance reasons. + \param shadow True if this light shall cast shadows. */ + virtual void enableCastShadow(bool shadow=true) = 0; + + //! Check whether this light casts shadows. + /** \return True if light would cast shadows, else false. */ + virtual bool getCastShadow() const = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ILogger.h b/src/others/irrlicht-1.8.1/include/ILogger.h new file mode 100644 index 0000000..b6c9f6f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ILogger.h @@ -0,0 +1,102 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_LOGGER_H_INCLUDED__ +#define __I_LOGGER_H_INCLUDED__ + +#include "IReferenceCounted.h" + +namespace irr +{ + +//! Possible log levels. +//! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. +//! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE +//! messages are never filtered and always printed. +enum ELOG_LEVEL +{ + //! Used for printing information helpful in debugging + ELL_DEBUG, + + //! Useful information to print. For example hardware infos or something started/stopped. + ELL_INFORMATION, + + //! Warnings that something isn't as expected and can cause oddities + ELL_WARNING, + + //! Something did go wrong. + ELL_ERROR, + + //! Logs with ELL_NONE will never be filtered. + //! And used as filter it will remove all logging except ELL_NONE messages. + ELL_NONE +}; + + +//! Interface for logging messages, warnings and errors +class ILogger : public virtual IReferenceCounted +{ +public: + + //! Destructor + virtual ~ILogger() {} + + //! Returns the current set log level. + virtual ELOG_LEVEL getLogLevel() const = 0; + + //! Sets a new log level. + /** With this value, texts which are sent to the logger are filtered + out. For example setting this value to ELL_WARNING, only warnings and + errors are printed out. Setting it to ELL_INFORMATION, which is the + default setting, warnings, errors and informational texts are printed + out. + \param ll: new log level filter value. */ + virtual void setLogLevel(ELOG_LEVEL ll) = 0; + + //! Prints out a text into the log + /** \param text: Text to print out. + \param ll: Log level of the text. If the text is an error, set + it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it + is just an informational text, set it to ELL_INFORMATION. Texts are + filtered with these levels. If you want to be a text displayed, + independent on what level filter is set, use ELL_NONE. */ + virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; + + //! Prints out a text into the log + /** \param text: Text to print out. + \param hint: Additional info. This string is added after a " :" to the + string. + \param ll: Log level of the text. If the text is an error, set + it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it + is just an informational text, set it to ELL_INFORMATION. Texts are + filtered with these levels. If you want to be a text displayed, + independent on what level filter is set, use ELL_NONE. */ + virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; + virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; + + //! Prints out a text into the log + /** \param text: Text to print out. + \param hint: Additional info. This string is added after a " :" to the + string. + \param ll: Log level of the text. If the text is an error, set + it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it + is just an informational text, set it to ELL_INFORMATION. Texts are + filtered with these levels. If you want to be a text displayed, + independent on what level filter is set, use ELL_NONE. */ + virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; + + //! Prints out a text into the log + /** \param text: Text to print out. + \param ll: Log level of the text. If the text is an error, set + it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it + is just an informational text, set it to ELL_INFORMATION. Texts are + filtered with these levels. If you want to be a text displayed, + independent on what level filter is set, use ELL_NONE. */ + virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; +}; + +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMaterialRenderer.h b/src/others/irrlicht-1.8.1/include/IMaterialRenderer.h new file mode 100644 index 0000000..1828a71 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMaterialRenderer.h @@ -0,0 +1,101 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MATERIAL_RENDERER_H_INCLUDED__ +#define __I_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "SMaterial.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace video +{ + +class IVideoDriver; +class IMaterialRendererServices; + +//! Interface for material rendering. +/** Can be used to extend the engine with new materials. Refer to +IVideoDriver::addMaterialRenderer() for more informations on how to extend the +engine with new materials. */ +class IMaterialRenderer : public virtual IReferenceCounted +{ +public: + + //! Called by the IVideoDriver implementation the let the renderer set its needed render states. + /** This is called during the IVideoDriver::setMaterial() call. + When overriding this, you can set some renderstates or for example a + vertex or pixel shader if you like. + \param material: The new material parameters to be set. The renderer + may change the material flags in this material. For example if this + material does not accept the zbuffer = true, it can set it to false. + This is useful, because in the next lastMaterial will be just the + material in this call. + \param lastMaterial: The material parameters which have been set before + this material. + \param resetAllRenderstates: True if all renderstates should really be + reset. This is usually true if the last rendering mode was not a usual + 3d rendering mode, but for example a 2d rendering mode. + You should reset really all renderstates if this is true, no matter if + the lastMaterial had some similar settings. This is used because in + most cases, some common renderstates are not changed if they are + already there, for example bilinear filtering, wireframe, + gouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and + fogenable. + \param services: Interface providing some methods for changing + advanced, internal states of a IVideoDriver. */ + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) {} + + //! Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call. + /** OnSetMaterial should normally only be called if the renderer decides + that the renderstates should be changed, it won't be called if for + example two drawIndexedTriangleList() will be called with the same + material set. This method will be called every time. This is useful for + example for materials with shaders, which don't only set new + renderstates but also shader constants. + \param service: Pointer to interface providing methos for setting + constants and other things. + \param vtxtype: Vertex type with which the next rendering will be done. + This can be used by the material renderer to set some specific + optimized shaders or if this is an incompatible vertex type for this + renderer, to refuse rendering for example. + \return Returns true if everything is ok, and false if nothing should + be rendered. The material renderer can choose to return false for + example if he doesn't support the specified vertex type. This is + actually done in D3D8 and D3D9 when using a normal mapped material with + a vertex type other than EVT_TANGENTS. */ + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) { return true; } + + //! Called by the IVideoDriver to unset this material. + /** Called during the IVideoDriver::setMaterial() call before the new + material will get the OnSetMaterial() call. */ + virtual void OnUnsetMaterial() {} + + //! Returns if the material is transparent. + /** The scene managment needs to know this + for being able to sort the materials by opaque and transparent. */ + virtual bool isTransparent() const { return false; } + + //! Returns the render capability of the material. + /** Because some more complex materials + are implemented in multiple ways and need special hardware capabilities, it is possible + to query how the current material renderer is performing on the current hardware with this + function. + \return Returns 0 if everything is running fine. Any other value is material renderer + specific and means for example that the renderer switched back to a fall back material because + it cannot use the latest shaders. More specific examples: + Fixed function pipeline materials should return 0 in most cases, parallax mapped + material will only return 0 when at least pixel shader 1.4 is available on that machine. */ + virtual s32 getRenderCapability() const { return 0; } +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMaterialRendererServices.h b/src/others/irrlicht-1.8.1/include/IMaterialRendererServices.h new file mode 100644 index 0000000..9f045b5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMaterialRendererServices.h @@ -0,0 +1,115 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__ +#define __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__ + +#include "SMaterial.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace video +{ + +class IVideoDriver; + + +//! Interface providing some methods for changing advanced, internal states of a IVideoDriver. +class IMaterialRendererServices +{ +public: + + //! Destructor + virtual ~IMaterialRendererServices() {} + + //! Can be called by an IMaterialRenderer to make its work easier. + /** Sets all basic renderstates if needed. + Basic render states are diffuse, ambient, specular, and emissive color, + specular power, bilinear and trilinear filtering, wireframe mode, + grouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and + fog enabling. + \param material The new material to be used. + \param lastMaterial The material used until now. + \param resetAllRenderstates Set to true if all renderstates should be + set, regardless of their current state. */ + virtual void setBasicRenderStates(const SMaterial& material, + const SMaterial& lastMaterial, + bool resetAllRenderstates) = 0; + + //! Sets a constant for the vertex shader based on a name. + /** This can be used if you used a high level shader language like GLSL + or HLSL to create a shader. Example: If you created a shader which has + variables named 'mWorldViewProj' (containing the WorldViewProjection + matrix) and another one named 'fTime' containing one float, you can set + them in your IShaderConstantSetCallBack derived class like this: + \code + virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + f32 time = (f32)os::Timer::getTime()/100000.0f; + services->setVertexShaderConstant("fTime", &time, 1); + + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16); + } + \endcode + \param name Name of the variable + \param floats Pointer to array of floats + \param count Amount of floats in array. + \return True if successful. + */ + virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count) = 0; + + //! Bool interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count) = 0; + + //! Int interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count) = 0; + + //! Sets a vertex shader constant. + /** Can be used if you created a shader using pixel/vertex shader + assembler or ARB_fragment_program or ARB_vertex_program. + \param data: Data to be set in the constants + \param startRegister: First register to be set + \param constantAmount: Amount of registers to be set. One register consists of 4 floats. */ + virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0; + + //! Sets a constant for the pixel shader based on a name. + /** This can be used if you used a high level shader language like GLSL + or HLSL to create a shader. See setVertexShaderConstant() for an + example on how to use this. + \param name Name of the variable + \param floats Pointer to array of floats + \param count Amount of floats in array. + \return True if successful. */ + virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count) = 0; + + //! Bool interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count) = 0; + + //! Int interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count) = 0; + + //! Sets a pixel shader constant. + /** Can be used if you created a shader using pixel/vertex shader + assembler or ARB_fragment_program or ARB_vertex_program. + \param data Data to be set in the constants + \param startRegister First register to be set. + \param constantAmount Amount of registers to be set. One register consists of 4 floats. */ + virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0; + + //! Get pointer to the IVideoDriver interface + /** \return Pointer to the IVideoDriver interface */ + virtual IVideoDriver* getVideoDriver() = 0; +}; + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMesh.h b/src/others/irrlicht-1.8.1/include/IMesh.h new file mode 100644 index 0000000..8e0bcc2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMesh.h @@ -0,0 +1,75 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MESH_H_INCLUDED__ +#define __I_MESH_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "SMaterial.h" +#include "EHardwareBufferFlags.h" + +namespace irr +{ +namespace scene +{ + class IMeshBuffer; + + //! Class which holds the geometry of an object. + /** An IMesh is nothing more than a collection of some mesh buffers + (IMeshBuffer). SMesh is a simple implementation of an IMesh. + A mesh is usually added to an IMeshSceneNode in order to be rendered. + */ + class IMesh : public virtual IReferenceCounted + { + public: + + //! Get the amount of mesh buffers. + /** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */ + virtual u32 getMeshBufferCount() const = 0; + + //! Get pointer to a mesh buffer. + /** \param nr: Zero based index of the mesh buffer. The maximum value is + getMeshBufferCount() - 1; + \return Pointer to the mesh buffer or 0 if there is no such + mesh buffer. */ + virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0; + + //! Get pointer to a mesh buffer which fits a material + /** \param material: material to search for + \return Pointer to the mesh buffer or 0 if there is no such + mesh buffer. */ + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0; + + //! Get an axis aligned bounding box of the mesh. + /** \return Bounding box of this mesh. */ + virtual const core::aabbox3d& getBoundingBox() const = 0; + + //! Set user-defined axis aligned bounding box + /** \param box New bounding box to use for the mesh. */ + virtual void setBoundingBox( const core::aabbox3df& box) = 0; + + //! Sets a flag of all contained materials to a new value. + /** \param flag: Flag to set in all materials. + \param newvalue: New value to set in all materials. */ + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0; + + //! Set the hardware mapping hint + /** This methods allows to define optimization hints for the + hardware. This enables, e.g., the use of hardware buffers on + pltforms that support this feature. This can lead to noticeable + performance gains. */ + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; + + //! Flag the meshbuffer as changed, reloads hardware buffers + /** This method has to be called every time the vertices or + indices have changed. Otherwise, changes won't be updated + on the GPU in the next render cycle. */ + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMeshBuffer.h b/src/others/irrlicht-1.8.1/include/IMeshBuffer.h new file mode 100644 index 0000000..44b865b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMeshBuffer.h @@ -0,0 +1,154 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MESH_BUFFER_H_INCLUDED__ +#define __I_MESH_BUFFER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "SMaterial.h" +#include "aabbox3d.h" +#include "S3DVertex.h" +#include "SVertexIndex.h" +#include "EHardwareBufferFlags.h" +#include "EPrimitiveTypes.h" + +namespace irr +{ +namespace scene +{ + //! Struct for holding a mesh with a single material. + /** A part of an IMesh which has the same material on each face of that + group. Logical groups of an IMesh need not be put into separate mesh + buffers, but can be. Separately animated parts of the mesh must be put + into separate mesh buffers. + Some mesh buffer implementations have limitations on the number of + vertices the buffer can hold. In that case, logical grouping can help. + Moreover, the number of vertices should be optimized for the GPU upload, + which often depends on the type of gfx card. Typial figures are + 1000-10000 vertices per buffer. + SMeshBuffer is a simple implementation of a MeshBuffer, which supports + up to 65535 vertices. + + Since meshbuffers are used for drawing, and hence will be exposed + to the driver, chances are high that they are grab()'ed from somewhere. + It's therefore required to dynamically allocate meshbuffers which are + passed to a video driver and only drop the buffer once it's not used in + the current code block anymore. + */ + class IMeshBuffer : public virtual IReferenceCounted + { + public: + + //! Get the material of this meshbuffer + /** \return Material of this buffer. */ + virtual video::SMaterial& getMaterial() = 0; + + //! Get the material of this meshbuffer + /** \return Material of this buffer. */ + virtual const video::SMaterial& getMaterial() const = 0; + + //! Get type of vertex data which is stored in this meshbuffer. + /** \return Vertex type of this buffer. */ + virtual video::E_VERTEX_TYPE getVertexType() const = 0; + + //! Get access to vertex data. The data is an array of vertices. + /** Which vertex type is used can be determined by getVertexType(). + \return Pointer to array of vertices. */ + virtual const void* getVertices() const = 0; + + //! Get access to vertex data. The data is an array of vertices. + /** Which vertex type is used can be determined by getVertexType(). + \return Pointer to array of vertices. */ + virtual void* getVertices() = 0; + + //! Get amount of vertices in meshbuffer. + /** \return Number of vertices in this buffer. */ + virtual u32 getVertexCount() const = 0; + + //! Get type of index data which is stored in this meshbuffer. + /** \return Index type of this buffer. */ + virtual video::E_INDEX_TYPE getIndexType() const =0; + + //! Get access to Indices. + /** \return Pointer to indices array. */ + virtual const u16* getIndices() const = 0; + + //! Get access to Indices. + /** \return Pointer to indices array. */ + virtual u16* getIndices() = 0; + + //! Get amount of indices in this meshbuffer. + /** \return Number of indices in this buffer. */ + virtual u32 getIndexCount() const = 0; + + //! Get the axis aligned bounding box of this meshbuffer. + /** \return Axis aligned bounding box of this buffer. */ + virtual const core::aabbox3df& getBoundingBox() const = 0; + + //! Set axis aligned bounding box + /** \param box User defined axis aligned bounding box to use + for this buffer. */ + virtual void setBoundingBox(const core::aabbox3df& box) = 0; + + //! Recalculates the bounding box. Should be called if the mesh changed. + virtual void recalculateBoundingBox() = 0; + + //! returns position of vertex i + virtual const core::vector3df& getPosition(u32 i) const = 0; + + //! returns position of vertex i + virtual core::vector3df& getPosition(u32 i) = 0; + + //! returns normal of vertex i + virtual const core::vector3df& getNormal(u32 i) const = 0; + + //! returns normal of vertex i + virtual core::vector3df& getNormal(u32 i) = 0; + + //! returns texture coord of vertex i + virtual const core::vector2df& getTCoords(u32 i) const = 0; + + //! returns texture coord of vertex i + virtual core::vector2df& getTCoords(u32 i) = 0; + + //! Append the vertices and indices to the current buffer + /** Only works for compatible vertex types. + \param vertices Pointer to a vertex array. + \param numVertices Number of vertices in the array. + \param indices Pointer to index array. + \param numIndices Number of indices in array. */ + virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) = 0; + + //! Append the meshbuffer to the current buffer + /** Only works for compatible vertex types + \param other Buffer to append to this one. */ + virtual void append(const IMeshBuffer* const other) = 0; + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0; + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0; + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) = 0; + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID_Vertex() const = 0; + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID_Index() const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + + diff --git a/src/others/irrlicht-1.8.1/include/IMeshCache.h b/src/others/irrlicht-1.8.1/include/IMeshCache.h new file mode 100644 index 0000000..083fc5b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMeshCache.h @@ -0,0 +1,177 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MESH_CACHE_H_INCLUDED__ +#define __I_MESH_CACHE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "path.h" + +namespace irr +{ + +namespace scene +{ + class IMesh; + class IAnimatedMesh; + class IAnimatedMeshSceneNode; + class IMeshLoader; + + //! The mesh cache stores already loaded meshes and provides an interface to them. + /** You can access it using ISceneManager::getMeshCache(). All existing + scene managers will return a pointer to the same mesh cache, because it + is shared between them. With this interface, it is possible to manually + add new loaded meshes (if ISceneManager::getMesh() is not sufficient), + to remove them and to iterate through already loaded meshes. */ + class IMeshCache : public virtual IReferenceCounted + { + public: + + //! Destructor + virtual ~IMeshCache() {} + + //! Adds a mesh to the internal list of loaded meshes. + /** Usually, ISceneManager::getMesh() is called to load a mesh + from a file. That method searches the list of loaded meshes if + a mesh has already been loaded and returns a pointer to if it + is in that list and already in memory. Otherwise it loads the + mesh. With IMeshCache::addMesh(), it is possible to pretend + that a mesh already has been loaded. This method can be used + for example by mesh loaders who need to load more than one mesh + with one call. They can add additional meshes with this method + to the scene manager. The COLLADA loader for example uses this + method. + \param name Name of the mesh. When calling + ISceneManager::getMesh() with this name it will return the mesh + set by this method. + \param mesh Pointer to a mesh which will now be referenced by + this name. */ + virtual void addMesh(const io::path& name, IAnimatedMesh* mesh) = 0; + + //! Removes the mesh from the cache. + /** After loading a mesh with getMesh(), the mesh can be + removed from the cache using this method, freeing a lot of + memory. + \param mesh Pointer to the mesh which shall be removed. */ + virtual void removeMesh(const IMesh* const mesh) = 0; + + //! Returns amount of loaded meshes in the cache. + /** You can load new meshes into the cache using getMesh() and + addMesh(). If you ever need to access the internal mesh cache, + you can do this using removeMesh(), getMeshNumber(), + getMeshByIndex() and getMeshName(). + \return Number of meshes in cache. */ + virtual u32 getMeshCount() const = 0; + + //! Returns current index number of the mesh or -1 when not found. + /** \param mesh Pointer to the mesh to search for. + \return Index of the mesh in the cache, or -1 if not found. */ + virtual s32 getMeshIndex(const IMesh* const mesh) const = 0; + + //! Returns a mesh based on its index number. + /** \param index: Index of the mesh, number between 0 and + getMeshCount()-1. + Note that this number is only valid until a new mesh is loaded + or removed. + \return Pointer to the mesh or 0 if there is none with this + number. */ + virtual IAnimatedMesh* getMeshByIndex(u32 index) = 0; + + //! Returns a mesh based on its name (often a filename). + /** \deprecated Use getMeshByName() instead. This method may be removed by + Irrlicht 1.9 */ + _IRR_DEPRECATED_ IAnimatedMesh* getMeshByFilename(const io::path& filename) + { + return getMeshByName(filename); + } + + //! Get the name of a loaded mesh, based on its index. (Name is often identical to the filename). + /** \deprecated Use getMeshName() instead. This method may be removed by + Irrlicht 1.9 */ + _IRR_DEPRECATED_ const io::path& getMeshFilename(u32 index) const + { + return getMeshName(index).getInternalName(); + } + + //! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename). + /** \deprecated Use getMeshName() instead. This method may be removed by + Irrlicht 1.9 */ + _IRR_DEPRECATED_ const io::path& getMeshFilename(const IMesh* const mesh) const + { + return getMeshName(mesh).getInternalName(); + } + + //! Renames a loaded mesh. + /** \deprecated Use renameMesh() instead. This method may be removed by + Irrlicht 1.9 */ + _IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename) + { + return renameMesh(index, filename); + } + + //! Renames a loaded mesh. + /** \deprecated Use renameMesh() instead. This method may be removed by + Irrlicht 1.9 */ + _IRR_DEPRECATED_ bool setMeshFilename(const IMesh* const mesh, const io::path& filename) + { + return renameMesh(mesh, filename); + } + + //! Returns a mesh based on its name. + /** \param name Name of the mesh. Usually a filename. + \return Pointer to the mesh or 0 if there is none with this number. */ + virtual IAnimatedMesh* getMeshByName(const io::path& name) = 0; + + //! Get the name of a loaded mesh, based on its index. + /** \param index: Index of the mesh, number between 0 and getMeshCount()-1. + \return The name if mesh was found and has a name, else the path is empty. */ + virtual const io::SNamedPath& getMeshName(u32 index) const = 0; + + //! Get the name of the loaded mesh if there is any. + /** \param mesh Pointer to mesh to query. + \return The name if mesh was found and has a name, else the path is empty. */ + virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0; + + //! Renames a loaded mesh. + /** Note that renaming meshes might change the ordering of the + meshes, and so the index of the meshes as returned by + getMeshIndex() or taken by some methods will change. + \param index The index of the mesh in the cache. + \param name New name for the mesh. + \return True if mesh was renamed. */ + virtual bool renameMesh(u32 index, const io::path& name) = 0; + + //! Renames the loaded mesh + /** Note that renaming meshes might change the ordering of the + meshes, and so the index of the meshes as returned by + getMeshIndex() or taken by some methods will change. + \param mesh Mesh to be renamed. + \param name New name for the mesh. + \return True if mesh was renamed. */ + virtual bool renameMesh(const IMesh* const mesh, const io::path& name) = 0; + + //! Check if a mesh was already loaded. + /** \param name Name of the mesh. Usually a filename. + \return True if the mesh has been loaded, else false. */ + virtual bool isMeshLoaded(const io::path& name) = 0; + + //! Clears the whole mesh cache, removing all meshes. + /** All meshes will be reloaded completely when using ISceneManager::getMesh() + after calling this method. + Warning: If you have pointers to meshes that were loaded with ISceneManager::getMesh() + and you did not grab them, then they may become invalid. */ + virtual void clear() = 0; + + //! Clears all meshes that are held in the mesh cache but not used anywhere else. + /** Warning: If you have pointers to meshes that were loaded with ISceneManager::getMesh() + and you did not grab them, then they may become invalid. */ + virtual void clearUnusedMeshes() = 0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMeshLoader.h b/src/others/irrlicht-1.8.1/include/IMeshLoader.h new file mode 100644 index 0000000..7f874c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMeshLoader.h @@ -0,0 +1,53 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MESH_LOADER_H_INCLUDED__ +#define __I_MESH_LOADER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "path.h" + +namespace irr +{ +namespace io +{ + class IReadFile; +} // end namespace io +namespace scene +{ + class IAnimatedMesh; + +//! Class which is able to load an animated mesh from a file. +/** If you want Irrlicht be able to load meshes of +currently unsupported file formats (e.g. .cob), then implement +this and add your new Meshloader with +ISceneManager::addExternalMeshLoader() to the engine. */ +class IMeshLoader : public virtual IReferenceCounted +{ +public: + + //! Destructor + virtual ~IMeshLoader() {} + + //! Returns true if the file might be loaded by this class. + /** This decision should be based on the file extension (e.g. ".cob") + only. + \param filename Name of the file to test. + \return True if the file might be loaded by this class. */ + virtual bool isALoadableFileExtension(const io::path& filename) const = 0; + + //! Creates/loads an animated mesh from the file. + /** \param file File handler to load the file from. + \return Pointer to the created mesh. Returns 0 if loading failed. + If you no longer need the mesh, you should call IAnimatedMesh::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh* createMesh(io::IReadFile* file) = 0; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMeshManipulator.h b/src/others/irrlicht-1.8.1/include/IMeshManipulator.h new file mode 100644 index 0000000..3476c57 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMeshManipulator.h @@ -0,0 +1,393 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MESH_MANIPULATOR_H_INCLUDED__ +#define __I_MESH_MANIPULATOR_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "vector3d.h" +#include "aabbox3d.h" +#include "matrix4.h" +#include "IAnimatedMesh.h" +#include "IMeshBuffer.h" +#include "SVertexManipulator.h" + +namespace irr +{ +namespace scene +{ + + struct SMesh; + + //! An interface for easy manipulation of meshes. + /** Scale, set alpha value, flip surfaces, and so on. This exists for + fixing problems with wrong imported or exported meshes quickly after + loading. It is not intended for doing mesh modifications and/or + animations during runtime. + */ + class IMeshManipulator : public virtual IReferenceCounted + { + public: + + //! Flips the direction of surfaces. + /** Changes backfacing triangles to frontfacing + triangles and vice versa. + \param mesh Mesh on which the operation is performed. */ + virtual void flipSurfaces(IMesh* mesh) const = 0; + + //! Sets the alpha vertex color value of the whole mesh to a new value. + /** \param mesh Mesh on which the operation is performed. + \param alpha New alpha value. Must be a value between 0 and 255. */ + void setVertexColorAlpha(IMesh* mesh, s32 alpha) const + { + apply(scene::SVertexColorSetAlphaManipulator(alpha), mesh); + } + + //! Sets the alpha vertex color value of the whole mesh to a new value. + /** \param buffer Meshbuffer on which the operation is performed. + \param alpha New alpha value. Must be a value between 0 and 255. */ + void setVertexColorAlpha(IMeshBuffer* buffer, s32 alpha) const + { + apply(scene::SVertexColorSetAlphaManipulator(alpha), buffer); + } + + //! Sets the colors of all vertices to one color + /** \param mesh Mesh on which the operation is performed. + \param color New color. */ + void setVertexColors(IMesh* mesh, video::SColor color) const + { + apply(scene::SVertexColorSetManipulator(color), mesh); + } + + //! Sets the colors of all vertices to one color + /** \param buffer Meshbuffer on which the operation is performed. + \param color New color. */ + void setVertexColors(IMeshBuffer* buffer, video::SColor color) const + { + apply(scene::SVertexColorSetManipulator(color), buffer); + } + + //! Recalculates all normals of the mesh. + /** \param mesh: Mesh on which the operation is performed. + \param smooth: If the normals shall be smoothed. + \param angleWeighted: If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. */ + virtual void recalculateNormals(IMesh* mesh, bool smooth = false, + bool angleWeighted = false) const=0; + + //! Recalculates all normals of the mesh buffer. + /** \param buffer: Mesh buffer on which the operation is performed. + \param smooth: If the normals shall be smoothed. + \param angleWeighted: If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. */ + virtual void recalculateNormals(IMeshBuffer* buffer, + bool smooth = false, bool angleWeighted = false) const=0; + + //! Recalculates tangents, requires a tangent mesh + /** \param mesh Mesh on which the operation is performed. + \param recalculateNormals If the normals shall be recalculated, otherwise original normals of the mesh are used unchanged. + \param smooth If the normals shall be smoothed. + \param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. + */ + virtual void recalculateTangents(IMesh* mesh, + bool recalculateNormals=false, bool smooth=false, + bool angleWeighted=false) const=0; + + //! Recalculates tangents, requires a tangent mesh buffer + /** \param buffer Meshbuffer on which the operation is performed. + \param recalculateNormals If the normals shall be recalculated, otherwise original normals of the buffer are used unchanged. + \param smooth If the normals shall be smoothed. + \param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. + */ + virtual void recalculateTangents(IMeshBuffer* buffer, + bool recalculateNormals=false, bool smooth=false, + bool angleWeighted=false) const=0; + + //! Scales the actual mesh, not a scene node. + /** \param mesh Mesh on which the operation is performed. + \param factor Scale factor for each axis. */ + void scale(IMesh* mesh, const core::vector3df& factor) const + { + apply(SVertexPositionScaleManipulator(factor), mesh, true); + } + + //! Scales the actual meshbuffer, not a scene node. + /** \param buffer Meshbuffer on which the operation is performed. + \param factor Scale factor for each axis. */ + void scale(IMeshBuffer* buffer, const core::vector3df& factor) const + { + apply(SVertexPositionScaleManipulator(factor), buffer, true); + } + + //! Scales the actual mesh, not a scene node. + /** \deprecated Use scale() instead. This method may be removed by Irrlicht 1.9 + \param mesh Mesh on which the operation is performed. + \param factor Scale factor for each axis. */ + _IRR_DEPRECATED_ void scaleMesh(IMesh* mesh, const core::vector3df& factor) const {return scale(mesh,factor);} + + //! Scale the texture coords of a mesh. + /** \param mesh Mesh on which the operation is performed. + \param factor Vector which defines the scale for each axis. + \param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */ + void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const + { + apply(SVertexTCoordsScaleManipulator(factor, level), mesh); + } + + //! Scale the texture coords of a meshbuffer. + /** \param buffer Meshbuffer on which the operation is performed. + \param factor Vector which defines the scale for each axis. + \param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */ + void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const + { + apply(SVertexTCoordsScaleManipulator(factor, level), buffer); + } + + //! Applies a transformation to a mesh + /** \param mesh Mesh on which the operation is performed. + \param m transformation matrix. */ + void transform(IMesh* mesh, const core::matrix4& m) const + { + apply(SVertexPositionTransformManipulator(m), mesh, true); + } + + //! Applies a transformation to a meshbuffer + /** \param buffer Meshbuffer on which the operation is performed. + \param m transformation matrix. */ + void transform(IMeshBuffer* buffer, const core::matrix4& m) const + { + apply(SVertexPositionTransformManipulator(m), buffer, true); + } + + //! Applies a transformation to a mesh + /** \deprecated Use transform() instead. This method may be removed by Irrlicht 1.9 + \param mesh Mesh on which the operation is performed. + \param m transformation matrix. */ + _IRR_DEPRECATED_ virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const {return transform(mesh,m);} + + //! Creates a planar texture mapping on the mesh + /** \param mesh: Mesh on which the operation is performed. + \param resolution: resolution of the planar mapping. This is + the value specifying which is the relation between world space + and texture coordinate space. */ + virtual void makePlanarTextureMapping(IMesh* mesh, f32 resolution=0.001f) const=0; + + //! Creates a planar texture mapping on the meshbuffer + /** \param meshbuffer: Buffer on which the operation is performed. + \param resolution: resolution of the planar mapping. This is + the value specifying which is the relation between world space + and texture coordinate space. */ + virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const=0; + + //! Creates a planar texture mapping on the buffer + /** This method is currently implemented towards the LWO planar mapping. A more general biasing might be required. + \param mesh Mesh on which the operation is performed. + \param resolutionS Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space. + \param resolutionT Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space. + \param axis The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z). + \param offset Vector added to the vertex positions (in object coordinates). + */ + virtual void makePlanarTextureMapping(scene::IMesh* mesh, + f32 resolutionS, f32 resolutionT, + u8 axis, const core::vector3df& offset) const=0; + + //! Creates a planar texture mapping on the meshbuffer + /** This method is currently implemented towards the LWO planar mapping. A more general biasing might be required. + \param buffer Buffer on which the operation is performed. + \param resolutionS Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space. + \param resolutionT Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space. + \param axis The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z). + \param offset Vector added to the vertex positions (in object coordinates). + */ + virtual void makePlanarTextureMapping(scene::IMeshBuffer* buffer, + f32 resolutionS, f32 resolutionT, + u8 axis, const core::vector3df& offset) const=0; + + //! Clones a static IMesh into a modifiable SMesh. + /** All meshbuffers in the returned SMesh + are of type SMeshBuffer or SMeshBufferLightMap. + \param mesh Mesh to copy. + \return Cloned mesh. If you no longer need the + cloned mesh, you should call SMesh::drop(). See + IReferenceCounted::drop() for more information. */ + virtual SMesh* createMeshCopy(IMesh* mesh) const = 0; + + //! Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. + /** This is useful if you want to draw tangent space normal + mapped geometry because it calculates the tangent and binormal + data which is needed there. + \param mesh Input mesh + \param recalculateNormals The normals are recalculated if set, + otherwise the original ones are kept. Note that keeping the + normals may introduce inaccurate tangents if the normals are + very different to those calculated from the faces. + \param smooth The normals/tangents are smoothed across the + meshbuffer's faces if this flag is set. + \param angleWeighted Improved smoothing calculation used + \param recalculateTangents Whether are actually calculated, or just the mesh with proper type is created. + \return Mesh consisting only of S3DVertexTangents vertices. If + you no longer need the cloned mesh, you should call + IMesh::drop(). See IReferenceCounted::drop() for more + information. */ + virtual IMesh* createMeshWithTangents(IMesh* mesh, + bool recalculateNormals=false, bool smooth=false, + bool angleWeighted=false, bool recalculateTangents=true) const=0; + + //! Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices. + /** \param mesh Input mesh + \return Mesh consisting only of S3DVertex2TCoord vertices. If + you no longer need the cloned mesh, you should call + IMesh::drop(). See IReferenceCounted::drop() for more + information. */ + virtual IMesh* createMeshWith2TCoords(IMesh* mesh) const = 0; + + //! Creates a copy of the mesh, which will only consist of S3DVertex vertices. + /** \param mesh Input mesh + \return Mesh consisting only of S3DVertex vertices. If + you no longer need the cloned mesh, you should call + IMesh::drop(). See IReferenceCounted::drop() for more + information. */ + virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const = 0; + + //! Creates a copy of a mesh with all vertices unwelded + /** \param mesh Input mesh + \return Mesh consisting only of unique faces. All vertices + which were previously shared are now duplicated. If you no + longer need the cloned mesh, you should call IMesh::drop(). See + IReferenceCounted::drop() for more information. */ + virtual IMesh* createMeshUniquePrimitives(IMesh* mesh) const = 0; + + //! Creates a copy of a mesh with vertices welded + /** \param mesh Input mesh + \param tolerance The threshold for vertex comparisons. + \return Mesh without redundant vertices. If you no longer need + the cloned mesh, you should call IMesh::drop(). See + IReferenceCounted::drop() for more information. */ + virtual IMesh* createMeshWelded(IMesh* mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const = 0; + + //! Get amount of polygons in mesh. + /** \param mesh Input mesh + \return Number of polygons in mesh. */ + virtual s32 getPolyCount(IMesh* mesh) const = 0; + + //! Get amount of polygons in mesh. + /** \param mesh Input mesh + \return Number of polygons in mesh. */ + virtual s32 getPolyCount(IAnimatedMesh* mesh) const = 0; + + //! Create a new AnimatedMesh and adds the mesh to it + /** \param mesh Input mesh + \param type The type of the animated mesh to create. + \return Newly created animated mesh with mesh as its only + content. When you don't need the animated mesh anymore, you + should call IAnimatedMesh::drop(). See + IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh, + scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0; + + //! Vertex cache optimization according to the Forsyth paper + /** More information can be found at + http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html + + The function is thread-safe (read: you can optimize several + meshes in different threads). + + \param mesh Source mesh for the operation. + \return A new mesh optimized for the vertex cache. */ + virtual IMesh* createForsythOptimizedMesh(const IMesh *mesh) const = 0; + + //! Apply a manipulator on the Meshbuffer + /** \param func A functor defining the mesh manipulation. + \param buffer The Meshbuffer to apply the manipulator to. + \param boundingBoxUpdate Specifies if the bounding box should be updated during manipulation. + \return True if the functor was successfully applied, else false. */ + template + bool apply(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate=false) const + { + return apply_(func, buffer, boundingBoxUpdate, func); + } + + + //! Apply a manipulator on the Mesh + /** \param func A functor defining the mesh manipulation. + \param mesh The Mesh to apply the manipulator to. + \param boundingBoxUpdate Specifies if the bounding box should be updated during manipulation. + \return True if the functor was successfully applied, else false. */ + template + bool apply(const Functor& func, IMesh* mesh, bool boundingBoxUpdate=false) const + { + if (!mesh) + return true; + bool result = true; + core::aabbox3df bufferbox; + for (u32 i=0; igetMeshBufferCount(); ++i) + { + result &= apply(func, mesh->getMeshBuffer(i), boundingBoxUpdate); + if (boundingBoxUpdate) + { + if (0==i) + bufferbox.reset(mesh->getMeshBuffer(i)->getBoundingBox()); + else + bufferbox.addInternalBox(mesh->getMeshBuffer(i)->getBoundingBox()); + } + } + if (boundingBoxUpdate) + mesh->setBoundingBox(bufferbox); + return result; + } + +protected: + //! Apply a manipulator based on the type of the functor + /** \param func A functor defining the mesh manipulation. + \param buffer The Meshbuffer to apply the manipulator to. + \param boundingBoxUpdate Specifies if the bounding box should be updated during manipulation. + \param typeTest Unused parameter, which handles the proper call selection based on the type of the Functor which is passed in two times. + \return True if the functor was successfully applied, else false. */ + template + bool apply_(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate, const IVertexManipulator& typeTest) const + { + if (!buffer) + return true; + + core::aabbox3df bufferbox; + for (u32 i=0; igetVertexCount(); ++i) + { + switch (buffer->getVertexType()) + { + case video::EVT_STANDARD: + { + video::S3DVertex* verts = (video::S3DVertex*)buffer->getVertices(); + func(verts[i]); + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* verts = (video::S3DVertex2TCoords*)buffer->getVertices(); + func(verts[i]); + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents* verts = (video::S3DVertexTangents*)buffer->getVertices(); + func(verts[i]); + } + break; + } + if (boundingBoxUpdate) + { + if (0==i) + bufferbox.reset(buffer->getPosition(0)); + else + bufferbox.addInternalPoint(buffer->getPosition(i)); + } + } + if (boundingBoxUpdate) + buffer->setBoundingBox(bufferbox); + return true; + } +}; + +} // end namespace scene +} // end namespace irr + + +#endif diff --git a/src/others/irrlicht-1.8.1/include/IMeshSceneNode.h b/src/others/irrlicht-1.8.1/include/IMeshSceneNode.h new file mode 100644 index 0000000..fdffc03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMeshSceneNode.h @@ -0,0 +1,79 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_MESH_SCENE_NODE_H_INCLUDED__ +#define __I_MESH_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + +class IShadowVolumeSceneNode; +class IMesh; + + +//! A scene node displaying a static mesh +class IMeshSceneNode : public ISceneNode +{ +public: + + //! Constructor + /** Use setMesh() to set the mesh to display. + */ + IMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1,1,1)) + : ISceneNode(parent, mgr, id, position, rotation, scale) {} + + //! Sets a new mesh to display + /** \param mesh Mesh to display. */ + virtual void setMesh(IMesh* mesh) = 0; + + //! Get the currently defined mesh for display. + /** \return Pointer to mesh which is displayed by this node. */ + virtual IMesh* getMesh(void) = 0; + + //! Creates shadow volume scene node as child of this node. + /** The shadow can be rendered using the ZPass or the zfail + method. ZPass is a little bit faster because the shadow volume + creation is easier, but with this method there occur ugly + looking artifacs when the camera is inside the shadow volume. + These error do not occur with the ZFail method. + \param shadowMesh: Optional custom mesh for shadow volume. + \param id: Id of the shadow scene node. This id can be used to + identify the node later. + \param zfailmethod: If set to true, the shadow will use the + zfail method, if not, zpass is used. + \param infinity: Value used by the shadow volume algorithm to + scale the shadow volume (for zfail shadow volume we support only + finite shadows, so camera zfar must be larger than shadow back cap, + which is depend on infinity parameter). + \return Pointer to the created shadow scene node. This pointer + should not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0, + s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0; + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + /** In this way it is possible to change the materials of a mesh + causing all mesh scene nodes referencing this mesh to change, too. + \param readonly Flag if the materials shall be read-only. */ + virtual void setReadOnlyMaterials(bool readonly) = 0; + + //! Check if the scene node should not copy the materials of the mesh but use them in a read only style + /** This flag can be set by setReadOnlyMaterials(). + \return Whether the materials are read-only. */ + virtual bool isReadOnlyMaterials() const = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMeshWriter.h b/src/others/irrlicht-1.8.1/include/IMeshWriter.h new file mode 100644 index 0000000..555a798 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMeshWriter.h @@ -0,0 +1,58 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_I_MESH_WRITER_H_INCLUDED__ +#define __IRR_I_MESH_WRITER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "EMeshWriterEnums.h" + +namespace irr +{ +namespace io +{ + class IWriteFile; +} // end namespace io + +namespace scene +{ + class IMesh; + + //! Interface for writing meshes + class IMeshWriter : public virtual IReferenceCounted + { + public: + + //! Destructor + virtual ~IMeshWriter() {} + + //! Get the type of the mesh writer + /** For own implementations, use MAKE_IRR_ID as shown in the + EMESH_WRITER_TYPE enumeration to return your own unique mesh + type id. + \return Type of the mesh writer. */ + virtual EMESH_WRITER_TYPE getType() const = 0; + + //! Write a static mesh. + /** \param file File handle to write the mesh to. + \param mesh Pointer to mesh to be written. + \param flags Optional flags to set properties of the writer. + \return True if sucessful */ + virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, + s32 flags=EMWF_NONE) = 0; + + // Writes an animated mesh + // for future use, no writer is able to write animated meshes currently + /* \return Returns true if sucessful */ + //virtual bool writeAnimatedMesh(io::IWriteFile* file, + // scene::IAnimatedMesh* mesh, + // s32 flags=EMWF_NONE) = 0; + }; + + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IMetaTriangleSelector.h b/src/others/irrlicht-1.8.1/include/IMetaTriangleSelector.h new file mode 100644 index 0000000..2cbb385 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IMetaTriangleSelector.h @@ -0,0 +1,43 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_META_TRIANGLE_SELECTOR_H_INCLUDED__ +#define __I_META_TRIANGLE_SELECTOR_H_INCLUDED__ + +#include "ITriangleSelector.h" + +namespace irr +{ +namespace scene +{ + +//! Interface for making multiple triangle selectors work as one big selector. +/** This is nothing more than a collection of one or more triangle selectors +providing together the interface of one triangle selector. In this way, +collision tests can be done with different triangle soups in one pass. +*/ +class IMetaTriangleSelector : public ITriangleSelector +{ +public: + + //! Adds a triangle selector to the collection of triangle selectors. + /** \param toAdd: Pointer to an triangle selector to add to the list. */ + virtual void addTriangleSelector(ITriangleSelector* toAdd) = 0; + + //! Removes a specific triangle selector from the collection. + /** \param toRemove: Pointer to an triangle selector which is in the + list but will be removed. + \return True if successful, false if not. */ + virtual bool removeTriangleSelector(ITriangleSelector* toRemove) = 0; + + //! Removes all triangle selectors from the collection. + virtual void removeAllTriangleSelectors() = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IOSOperator.h b/src/others/irrlicht-1.8.1/include/IOSOperator.h new file mode 100644 index 0000000..22fb691 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IOSOperator.h @@ -0,0 +1,50 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_OS_OPERATOR_H_INCLUDED__ +#define __I_OS_OPERATOR_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrString.h" + +namespace irr +{ + +//! The Operating system operator provides operation system specific methods and informations. +class IOSOperator : public virtual IReferenceCounted +{ +public: + //! Get the current operation system version as string. + virtual const core::stringc& getOperatingSystemVersion() const = 0; + + //! Get the current operation system version as string. + /** \deprecated Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9. */ + _IRR_DEPRECATED_ const wchar_t* getOperationSystemVersion() const + { + return core::stringw(getOperatingSystemVersion()).c_str(); + } + + //! Copies text to the clipboard + virtual void copyToClipboard(const c8* text) const = 0; + + //! Get text from the clipboard + /** \return Returns 0 if no string is in there. */ + virtual const c8* getTextFromClipboard() const = 0; + + //! Get the processor speed in megahertz + /** \param MHz The integer variable to store the speed in. + \return True if successful, false if not */ + virtual bool getProcessorSpeedMHz(u32* MHz) const = 0; + + //! Get the total and available system RAM + /** \param Total: will contain the total system memory + \param Avail: will contain the available memory + \return True if successful, false if not */ + virtual bool getSystemMemory(u32* Total, u32* Avail) const = 0; + +}; + +} // end namespace + +#endif diff --git a/src/others/irrlicht-1.8.1/include/IParticleAffector.h b/src/others/irrlicht-1.8.1/include/IParticleAffector.h new file mode 100644 index 0000000..e2b83e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleAffector.h @@ -0,0 +1,72 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_AFFECTOR_H_INCLUDED__ +#define __I_PARTICLE_AFFECTOR_H_INCLUDED__ + +#include "IAttributeExchangingObject.h" +#include "SParticle.h" + +namespace irr +{ +namespace scene +{ + +//! Types of built in particle affectors +enum E_PARTICLE_AFFECTOR_TYPE +{ + EPAT_NONE = 0, + EPAT_ATTRACT, + EPAT_FADE_OUT, + EPAT_GRAVITY, + EPAT_ROTATE, + EPAT_SCALE, + EPAT_COUNT +}; + +//! Names for built in particle affectors +const c8* const ParticleAffectorTypeNames[] = +{ + "None", + "Attract", + "FadeOut", + "Gravity", + "Rotate", + "Scale", + 0 +}; + +//! A particle affector modifies particles. +class IParticleAffector : public virtual io::IAttributeExchangingObject +{ +public: + + //! constructor + IParticleAffector() : Enabled(true) {} + + //! Affects an array of particles. + /** \param now Current time. (Same as ITimer::getTime() would return) + \param particlearray Array of particles. + \param count Amount of particles in array. */ + virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0; + + //! Sets whether or not the affector is currently enabled. + virtual void setEnabled(bool enabled) { Enabled = enabled; } + + //! Gets whether or not the affector is currently enabled. + virtual bool getEnabled() const { return Enabled; } + + //! Get emitter type + virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0; + +protected: + bool Enabled; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h new file mode 100644 index 0000000..9be329d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h @@ -0,0 +1,54 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" +#include "IAnimatedMeshSceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! A particle emitter which emits particles from mesh vertices. +class IParticleAnimatedMeshSceneNodeEmitter : public IParticleEmitter +{ +public: + + //! Set Mesh to emit particles from + virtual void setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ) = 0; + + //! Set whether to use vertex normal for direction, or direction specified + virtual void setUseNormalDirection( bool useNormalDirection = true ) = 0; + + //! Set the amount that the normal is divided by for getting a particles direction + virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) = 0; + + //! Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices + virtual void setEveryMeshVertex( bool everyMeshVertex = true ) = 0; + + //! Get mesh we're emitting particles from + virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const = 0; + + //! Get whether to use vertex normal for direction, or direction specified + virtual bool isUsingNormalDirection() const = 0; + + //! Get the amount that the normal is divided by for getting a particles direction + virtual f32 getNormalDirectionModifier() const = 0; + + //! Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices + virtual bool getEveryMeshVertex() const = 0; + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_ANIMATED_MESH; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IParticleAttractionAffector.h b/src/others/irrlicht-1.8.1/include/IParticleAttractionAffector.h new file mode 100644 index 0000000..6f9d8ab --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleAttractionAffector.h @@ -0,0 +1,59 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ +#define __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ + +#include "IParticleAffector.h" + +namespace irr +{ +namespace scene +{ + +//! A particle affector which attracts or detracts particles. +class IParticleAttractionAffector : public IParticleAffector +{ +public: + + //! Set the point that particles will attract to + virtual void setPoint( const core::vector3df& point ) = 0; + + //! Set whether or not the particles are attracting or detracting + virtual void setAttract( bool attract ) = 0; + + //! Set whether or not this will affect particles in the X direction + virtual void setAffectX( bool affect ) = 0; + + //! Set whether or not this will affect particles in the Y direction + virtual void setAffectY( bool affect ) = 0; + + //! Set whether or not this will affect particles in the Z direction + virtual void setAffectZ( bool affect ) = 0; + + //! Get the point that particles are attracted to + virtual const core::vector3df& getPoint() const = 0; + + //! Get whether or not the particles are attracting or detracting + virtual bool getAttract() const = 0; + + //! Get whether or not the particles X position are affected + virtual bool getAffectX() const = 0; + + //! Get whether or not the particles Y position are affected + virtual bool getAffectY() const = 0; + + //! Get whether or not the particles Z position are affected + virtual bool getAffectZ() const = 0; + + //! Get emitter type + virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ATTRACT; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IParticleBoxEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleBoxEmitter.h new file mode 100644 index 0000000..d359272 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleBoxEmitter.h @@ -0,0 +1,36 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_BOX_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_BOX_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" +#include "aabbox3d.h" + +namespace irr +{ +namespace scene +{ + +//! A particle emitter which emits particles from a box shaped space +class IParticleBoxEmitter : public IParticleEmitter +{ +public: + + //! Set the box shape + virtual void setBox( const core::aabbox3df& box ) = 0; + + //! Get the box shape set + virtual const core::aabbox3df& getBox() const = 0; + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_BOX; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleCylinderEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleCylinderEmitter.h new file mode 100644 index 0000000..dac5ebe --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleCylinderEmitter.h @@ -0,0 +1,59 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" + +namespace irr +{ +namespace scene +{ + +//! A particle emitter which emits from a cylindrically shaped space. +class IParticleCylinderEmitter : public IParticleEmitter +{ +public: + + //! Set the center of the radius for the cylinder, at one end of the cylinder + virtual void setCenter( const core::vector3df& center ) = 0; + + //! Set the normal of the cylinder + virtual void setNormal( const core::vector3df& normal ) = 0; + + //! Set the radius of the cylinder + virtual void setRadius( f32 radius ) = 0; + + //! Set the length of the cylinder + virtual void setLength( f32 length ) = 0; + + //! Set whether or not to draw points inside the cylinder + virtual void setOutlineOnly( bool outlineOnly = true ) = 0; + + //! Get the center of the cylinder + virtual const core::vector3df& getCenter() const = 0; + + //! Get the normal of the cylinder + virtual const core::vector3df& getNormal() const = 0; + + //! Get the radius of the cylinder + virtual f32 getRadius() const = 0; + + //! Get the center of the cylinder + virtual f32 getLength() const = 0; + + //! Get whether or not to draw points inside the cylinder + virtual bool getOutlineOnly() const = 0; + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_CYLINDER; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleEmitter.h new file mode 100644 index 0000000..4b88266 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleEmitter.h @@ -0,0 +1,129 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_EMITTER_H_INCLUDED__ + +#include "IAttributeExchangingObject.h" +#include "SParticle.h" + +namespace irr +{ +namespace scene +{ + +//! Types of built in particle emitters +enum E_PARTICLE_EMITTER_TYPE +{ + EPET_POINT = 0, + EPET_ANIMATED_MESH, + EPET_BOX, + EPET_CYLINDER, + EPET_MESH, + EPET_RING, + EPET_SPHERE, + EPET_COUNT +}; + +//! Names for built in particle emitters +const c8* const ParticleEmitterTypeNames[] = +{ + "Point", + "AnimatedMesh", + "Box", + "Cylinder", + "Mesh", + "Ring", + "Sphere", + 0 +}; + +//! A particle emitter for using with particle systems. +/** A Particle emitter emitts new particles into a particle system. +*/ +class IParticleEmitter : public virtual io::IAttributeExchangingObject +{ +public: + + //! Prepares an array with new particles to emitt into the system + /** \param now Current time. + \param timeSinceLastCall Time elapsed since last call, in milliseconds. + \param outArray Pointer which will point to the array with the new + particles to add into the system. + \return Amount of new particles in the array. Can be 0. */ + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0; + + //! Set direction the emitter emits particles + virtual void setDirection( const core::vector3df& newDirection ) = 0; + + //! Set minimum number of particles the emitter emits per second + virtual void setMinParticlesPerSecond( u32 minPPS ) = 0; + + //! Set maximum number of particles the emitter emits per second + virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0; + + //! Set minimum starting color for particles + virtual void setMinStartColor( const video::SColor& color ) = 0; + + //! Set maximum starting color for particles + virtual void setMaxStartColor( const video::SColor& color ) = 0; + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) = 0; + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) = 0; + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) = 0; + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0; + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0; + + //! Get direction the emitter emits particles + virtual const core::vector3df& getDirection() const = 0; + + //! Get the minimum number of particles the emitter emits per second + virtual u32 getMinParticlesPerSecond() const = 0; + + //! Get the maximum number of particles the emitter emits per second + virtual u32 getMaxParticlesPerSecond() const = 0; + + //! Get the minimum starting color for particles + virtual const video::SColor& getMinStartColor() const = 0; + + //! Get the maximum starting color for particles + virtual const video::SColor& getMaxStartColor() const = 0; + + //! Get the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const = 0; + + //! Get the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const = 0; + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const = 0; + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const = 0; + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const = 0; + + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; } +}; + +typedef IParticleEmitter IParticlePointEmitter; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleFadeOutAffector.h b/src/others/irrlicht-1.8.1/include/IParticleFadeOutAffector.h new file mode 100644 index 0000000..759ba58 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleFadeOutAffector.h @@ -0,0 +1,41 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ +#define __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ + +#include "IParticleAffector.h" + +namespace irr +{ +namespace scene +{ + +//! A particle affector which fades out the particles. +class IParticleFadeOutAffector : public IParticleAffector +{ +public: + + //! Sets the targetColor, i.e. the color the particles will interpolate to over time. + virtual void setTargetColor( const video::SColor& targetColor ) = 0; + + //! Sets the time in milliseconds it takes for each particle to fade out (minimal 1 ms) + virtual void setFadeOutTime( u32 fadeOutTime ) = 0; + + //! Gets the targetColor, i.e. the color the particles will interpolate to over time. + virtual const video::SColor& getTargetColor() const = 0; + + //! Gets the time in milliseconds it takes for each particle to fade out. + virtual u32 getFadeOutTime() const = 0; + + //! Get emitter type + virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_FADE_OUT; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IParticleGravityAffector.h b/src/others/irrlicht-1.8.1/include/IParticleGravityAffector.h new file mode 100644 index 0000000..4113888 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleGravityAffector.h @@ -0,0 +1,42 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ +#define __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ + +#include "IParticleAffector.h" + +namespace irr +{ +namespace scene +{ + +//! A particle affector which applies gravity to particles. +class IParticleGravityAffector : public IParticleAffector +{ +public: + + //! Set the time in milliseconds when the gravity force is totally lost + /** At that point the particle does not move any more. */ + virtual void setTimeForceLost( f32 timeForceLost ) = 0; + + //! Set the direction and force of gravity in all 3 dimensions. + virtual void setGravity( const core::vector3df& gravity ) = 0; + + //! Get the time in milliseconds when the gravity force is totally lost + virtual f32 getTimeForceLost() const = 0; + + //! Get the direction and force of gravity. + virtual const core::vector3df& getGravity() const = 0; + + //! Get emitter type + virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_GRAVITY; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IParticleMeshEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleMeshEmitter.h new file mode 100644 index 0000000..6550d24 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleMeshEmitter.h @@ -0,0 +1,54 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_MESH_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_MESH_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" +#include "IMesh.h" + +namespace irr +{ +namespace scene +{ + +//! A particle emitter which emits from vertices of a mesh +class IParticleMeshEmitter : public IParticleEmitter +{ +public: + + //! Set Mesh to emit particles from + virtual void setMesh( IMesh* mesh ) = 0; + + //! Set whether to use vertex normal for direction, or direction specified + virtual void setUseNormalDirection( bool useNormalDirection = true ) = 0; + + //! Set the amount that the normal is divided by for getting a particles direction + virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) = 0; + + //! Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices + virtual void setEveryMeshVertex( bool everyMeshVertex = true ) = 0; + + //! Get Mesh we're emitting particles from + virtual const IMesh* getMesh() const = 0; + + //! Get whether to use vertex normal for direction, or direction specified + virtual bool isUsingNormalDirection() const = 0; + + //! Get the amount that the normal is divided by for getting a particles direction + virtual f32 getNormalDirectionModifier() const = 0; + + //! Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices + virtual bool getEveryMeshVertex() const = 0; + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_MESH; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleRingEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleRingEmitter.h new file mode 100644 index 0000000..089b2ae --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleRingEmitter.h @@ -0,0 +1,47 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_RING_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_RING_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" + +namespace irr +{ +namespace scene +{ + +//! A particle emitter which emits particles along a ring shaped area. +class IParticleRingEmitter : public IParticleEmitter +{ +public: + + //! Set the center of the ring + virtual void setCenter( const core::vector3df& center ) = 0; + + //! Set the radius of the ring + virtual void setRadius( f32 radius ) = 0; + + //! Set the thickness of the ring + virtual void setRingThickness( f32 ringThickness ) = 0; + + //! Get the center of the ring + virtual const core::vector3df& getCenter() const = 0; + + //! Get the radius of the ring + virtual f32 getRadius() const = 0; + + //! Get the thickness of the ring + virtual f32 getRingThickness() const = 0; + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_RING; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleRotationAffector.h b/src/others/irrlicht-1.8.1/include/IParticleRotationAffector.h new file mode 100644 index 0000000..d7d4cce --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleRotationAffector.h @@ -0,0 +1,41 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ +#define __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ + +#include "IParticleAffector.h" + +namespace irr +{ +namespace scene +{ + +//! A particle affector which rotates the particle system. +class IParticleRotationAffector : public IParticleAffector +{ +public: + + //! Set the point that particles will rotate around + virtual void setPivotPoint( const core::vector3df& point ) = 0; + + //! Set the speed in degrees per second in all 3 dimensions + virtual void setSpeed( const core::vector3df& speed ) = 0; + + //! Get the point that particles are attracted to + virtual const core::vector3df& getPivotPoint() const = 0; + + //! Get the speed in degrees per second in all 3 dimensions + virtual const core::vector3df& getSpeed() const = 0; + + //! Get emitter type + virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ROTATE; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IParticleSphereEmitter.h b/src/others/irrlicht-1.8.1/include/IParticleSphereEmitter.h new file mode 100644 index 0000000..75c14a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleSphereEmitter.h @@ -0,0 +1,41 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_SPHERE_EMITTER_H_INCLUDED__ +#define __I_PARTICLE_SPHERE_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" + +namespace irr +{ +namespace scene +{ + +//! A particle emitter which emits from a spherical space. +class IParticleSphereEmitter : public IParticleEmitter +{ +public: + + //! Set the center of the sphere for particle emissions + virtual void setCenter( const core::vector3df& center ) = 0; + + //! Set the radius of the sphere for particle emissions + virtual void setRadius( f32 radius ) = 0; + + //! Get the center of the sphere for particle emissions + virtual const core::vector3df& getCenter() const = 0; + + //! Get the radius of the sphere for particle emissions + virtual f32 getRadius() const = 0; + + //! Get emitter type + virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_SPHERE; } +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IParticleSystemSceneNode.h b/src/others/irrlicht-1.8.1/include/IParticleSystemSceneNode.h new file mode 100644 index 0000000..adb2050 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IParticleSystemSceneNode.h @@ -0,0 +1,512 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__ +#define __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "IParticleAnimatedMeshSceneNodeEmitter.h" +#include "IParticleBoxEmitter.h" +#include "IParticleCylinderEmitter.h" +#include "IParticleMeshEmitter.h" +#include "IParticleRingEmitter.h" +#include "IParticleSphereEmitter.h" +#include "IParticleAttractionAffector.h" +#include "IParticleFadeOutAffector.h" +#include "IParticleGravityAffector.h" +#include "IParticleRotationAffector.h" +#include "dimension2d.h" + +namespace irr +{ +namespace scene +{ + +//! A particle system scene node for creating snow, fire, exlosions, smoke... +/** A scene node controlling a particle System. The behavior of the particles +can be controlled by setting the right particle emitters and affectors. +You can for example easily create a campfire by doing this: + +\code + scene::IParticleSystemSceneNode* p = scenemgr->addParticleSystemSceneNode(); + p->setParticleSize(core::dimension2d(20.0f, 10.0f)); + scene::IParticleEmitter* em = p->createBoxEmitter( + core::aabbox3d(-5,0,-5,5,1,5), + core::vector3df(0.0f,0.03f,0.0f), + 40,80, video::SColor(0,255,255,255),video::SColor(0,255,255,255), 1100,2000); + p->setEmitter(em); + em->drop(); + scene::IParticleAffector* paf = p->createFadeOutParticleAffector(); + p->addAffector(paf); + paf->drop(); +\endcode + +*/ +class IParticleSystemSceneNode : public ISceneNode +{ +public: + + //! Constructor + IParticleSystemSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) + : ISceneNode(parent, mgr, id, position, rotation, scale) {} + + //! Sets the size of all particles. + virtual void setParticleSize( + const core::dimension2d &size = core::dimension2d(5.0f, 5.0f)) = 0; + + //! Sets if the particles should be global. + /** If they are, the particles are affected by the movement of the + particle system scene node too, otherwise they completely ignore it. + Default is true. */ + virtual void setParticlesAreGlobal(bool global=true) = 0; + + //! Remove all currently visible particles + virtual void clearParticles() = 0; + + //! Do manually update the particles. + //! This should only be called when you want to render the node outside the scenegraph, + //! as the node will care about this otherwise automatically. + virtual void doParticleSystem(u32 time) = 0; + + //! Gets the particle emitter, which creates the particles. + /** \return The particle emitter. Can be 0 if none is set. */ + virtual IParticleEmitter* getEmitter() =0; + + //! Sets the particle emitter, which creates the particles. + /** A particle emitter can be created using one of the createEmitter + methods. For example to create and use a simple PointEmitter, call + IParticleEmitter* p = createPointEmitter(); setEmitter(p); p->drop(); + \param emitter: Sets the particle emitter. You can set this to 0 for + removing the current emitter and stopping the particle system emitting + new particles. */ + virtual void setEmitter(IParticleEmitter* emitter) = 0; + + //! Adds new particle effector to the particle system. + /** A particle affector modifies the particles. For example, the FadeOut + affector lets all particles fade out after some time. It is created and + used in this way: + \code + IParticleAffector* p = createFadeOutParticleAffector(); + addAffector(p); + p->drop(); + \endcode + Please note that an affector is not necessary for the particle system to + work. + \param affector: New affector. */ + virtual void addAffector(IParticleAffector* affector) = 0; + + //! Get a list of all particle affectors. + /** \return The list of particle affectors attached to this node. */ + virtual const core::list& getAffectors() const = 0; + + //! Removes all particle affectors in the particle system. + virtual void removeAllAffectors() = 0; + + //! Creates a particle emitter for an animated mesh scene node + /** \param node: Pointer to the animated mesh scene node to emit + particles from + \param useNormalDirection: If true, the direction of each particle + created will be the normal of the vertex that it's emitting from. The + normal is divided by the normalDirectionModifier parameter, which + defaults to 100.0f. + \param direction: Direction and speed of particle emission. + \param normalDirectionModifier: If the emitter is using the normal + direction then the normal of the vertex that is being emitted from is + divided by this number. + \param mbNumber: This allows you to specify a specific meshBuffer for + the IMesh* to emit particles from. The default value is -1, which + means a random meshBuffer picked from all of the meshes meshBuffers + will be selected to pick a random vertex from. If the value is 0 or + greater, it will only pick random vertices from the meshBuffer + specified by this value. + \param everyMeshVertex: If true, the emitter will emit between min/max + particles every second, for every vertex in the mesh, if false, it will + emit between min/max particles from random vertices in the mesh. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter( + scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, + bool everyMeshVertex = false, + u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a box particle emitter. + /** \param box: The box for the emitter. + \param direction: Direction and speed of particle emission. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleBoxEmitter* createBoxEmitter( + const core::aabbox3df& box = core::aabbox3df(-10,28,-10,10,30,10), + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a particle emitter for emitting from a cylinder + /** \param center: The center of the circle at the base of the cylinder + \param radius: The thickness of the cylinder + \param normal: Direction of the length of the cylinder + \param length: The length of the the cylinder + \param outlineOnly: Whether or not to put points inside the cylinder or + on the outline only + \param direction: Direction and speed of particle emission. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleCylinderEmitter* createCylinderEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& normal, f32 length, + bool outlineOnly = false, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a mesh particle emitter. + /** \param mesh: Pointer to mesh to emit particles from + \param useNormalDirection: If true, the direction of each particle + created will be the normal of the vertex that it's emitting from. The + normal is divided by the normalDirectionModifier parameter, which + defaults to 100.0f. + \param direction: Direction and speed of particle emission. + \param normalDirectionModifier: If the emitter is using the normal + direction then the normal of the vertex that is being emitted from is + divided by this number. + \param mbNumber: This allows you to specify a specific meshBuffer for + the IMesh* to emit particles from. The default value is -1, which + means a random meshBuffer picked from all of the meshes meshBuffers + will be selected to pick a random vertex from. If the value is 0 or + greater, it will only pick random vertices from the meshBuffer + specified by this value. + \param everyMeshVertex: If true, the emitter will emit between min/max + particles every second, for every vertex in the mesh, if false, it will + emit between min/max particles from random vertices in the mesh. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleMeshEmitter* createMeshEmitter( + scene::IMesh* mesh, bool useNormalDirection = true, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, + bool everyMeshVertex = false, + u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a point particle emitter. + /** \param direction: Direction and speed of particle emission. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticlePointEmitter* createPointEmitter( + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a ring particle emitter. + /** \param center: Center of ring + \param radius: Distance of points from center, points will be rotated + around the Y axis at a random 360 degrees and will then be shifted by + the provided ringThickness values in each axis. + \param ringThickness : thickness of the ring or how wide the ring is + \param direction: Direction and speed of particle emission. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleRingEmitter* createRingEmitter( + const core::vector3df& center, f32 radius, f32 ringThickness, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a sphere particle emitter. + /** \param center: Center of sphere + \param radius: Radius of sphere + \param direction: Direction and speed of particle emission. + \param minParticlesPerSecond: Minimal amount of particles emitted per + second. + \param maxParticlesPerSecond: Maximal amount of particles emitted per + second. + \param minStartColor: Minimal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param maxStartColor: Maximal initial start color of a particle. The + real color of every particle is calculated as random interpolation + between minStartColor and maxStartColor. + \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. + \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. + \param maxAngleDegrees: Maximal angle in degrees, the emitting + direction of the particle will differ from the original direction. + \param minStartSize: Minimal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \param maxStartSize: Maximal initial start size of a particle. The + real size of every particle is calculated as random interpolation + between minStartSize and maxStartSize. + \return Pointer to the created particle emitter. To set this emitter + as new emitter of this particle system, just call setEmitter(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleSphereEmitter* createSphereEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; + + //! Creates a point attraction affector. + /** This affector modifies the positions of the particles and attracts + them to a specified point at a specified speed per second. + \param point: Point to attract particles to. + \param speed: Speed in units per second, to attract to the specified + point. + \param attract: Whether the particles attract or detract from this + point. + \param affectX: Whether or not this will affect the X position of the + particle. + \param affectY: Whether or not this will affect the Y position of the + particle. + \param affectZ: Whether or not this will affect the Z position of the + particle. + \return Pointer to the created particle affector. To add this affector + as new affector of this particle system, just call addAffector(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleAttractionAffector* createAttractionAffector( + const core::vector3df& point, f32 speed = 1.0f, bool attract = true, + bool affectX = true, bool affectY = true, bool affectZ = true) = 0; + + //! Creates a scale particle affector. + /** This affector scales the particle to the a multiple of its size defined + by the scaleTo variable. + \param scaleTo: multiple of the size which the particle will be scaled to until deletion + \return Pointer to the created particle affector. + To add this affector as new affector of this particle system, + just call addAffector(). Note that you'll have to drop() the + returned pointer, after you don't need it any more, see + IReferenceCounted::drop() for more information. */ + virtual IParticleAffector* createScaleParticleAffector(const core::dimension2df& scaleTo = core::dimension2df(1.0f, 1.0f)) = 0; + + //! Creates a fade out particle affector. + /** This affector modifies the color of every particle and and reaches + the final color when the particle dies. This affector looks really + good, if the EMT_TRANSPARENT_ADD_COLOR material is used and the + targetColor is video::SColor(0,0,0,0): Particles are fading out into + void with this setting. + \param targetColor: Color whereto the color of the particle is changed. + \param timeNeededToFadeOut: How much time in milli seconds should the + affector need to change the color to the targetColor. + \return Pointer to the created particle affector. To add this affector + as new affector of this particle system, just call addAffector(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleFadeOutAffector* createFadeOutParticleAffector( + const video::SColor& targetColor = video::SColor(0,0,0,0), + u32 timeNeededToFadeOut = 1000) = 0; + + //! Creates a gravity affector. + /** This affector modifies the direction of the particle. It assumes + that the particle is fired out of the emitter with huge force, but is + loosing this after some time and is catched by the gravity then. This + affector is ideal for creating things like fountains. + \param gravity: Direction and force of gravity. + \param timeForceLost: Time in milli seconds when the force of the + emitter is totally lost and the particle does not move any more. This + is the time where gravity fully affects the particle. + \return Pointer to the created particle affector. To add this affector + as new affector of this particle system, just call addAffector(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleGravityAffector* createGravityAffector( + const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f), + u32 timeForceLost = 1000) = 0; + + //! Creates a rotation affector. + /** This affector modifies the positions of the particles and attracts + them to a specified point at a specified speed per second. + \param speed: Rotation in degrees per second + \param pivotPoint: Point to rotate the particles around + \return Pointer to the created particle affector. To add this affector + as new affector of this particle system, just call addAffector(). Note + that you'll have to drop() the returned pointer, after you don't need + it any more, see IReferenceCounted::drop() for more informations. */ + virtual IParticleRotationAffector* createRotationAffector( + const core::vector3df& speed = core::vector3df(5.0f,5.0f,5.0f), + const core::vector3df& pivotPoint = core::vector3df(0.0f,0.0f,0.0f) ) = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IQ3LevelMesh.h b/src/others/irrlicht-1.8.1/include/IQ3LevelMesh.h new file mode 100644 index 0000000..62feffc --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IQ3LevelMesh.h @@ -0,0 +1,46 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_Q3_LEVEL_MESH_H_INCLUDED__ +#define __I_Q3_LEVEL_MESH_H_INCLUDED__ + +#include "IAnimatedMesh.h" +#include "IQ3Shader.h" + +namespace irr +{ +namespace scene +{ + //! Interface for a Mesh which can be loaded directly from a Quake3 .bsp-file. + /** The Mesh tries to load all textures of the map.*/ + class IQ3LevelMesh : public IAnimatedMesh + { + public: + + //! loads the shader definition from file + /** \param filename Name of the shaderfile, defaults to /scripts if fileNameIsValid is false. + \param fileNameIsValid Specifies whether the filename is valid in the current situation. */ + virtual const quake3::IShader* getShader( const c8* filename, bool fileNameIsValid=true ) = 0; + + //! returns a already loaded Shader + virtual const quake3::IShader* getShader(u32 index) const = 0; + + //! get's an interface to the entities + virtual quake3::tQ3EntityList& getEntityList() = 0; + + //! returns the requested brush entity + /** \param num The number from the model key of the entity. + + Use this interface if you parse the entities yourself.*/ + virtual IMesh* getBrushEntityMesh(s32 num) const = 0; + + //! returns the requested brush entity + virtual IMesh* getBrushEntityMesh(quake3::IEntity &ent) const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IQ3Shader.h b/src/others/irrlicht-1.8.1/include/IQ3Shader.h new file mode 100644 index 0000000..7dc15e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IQ3Shader.h @@ -0,0 +1,885 @@ +// Copyright (C) 2006-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_Q3_LEVEL_SHADER_H_INCLUDED__ +#define __I_Q3_LEVEL_SHADER_H_INCLUDED__ + +#include "irrArray.h" +#include "fast_atof.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "coreutil.h" + +namespace irr +{ +namespace scene +{ +namespace quake3 +{ + + static core::stringc irrEmptyStringc(""); + + //! Hold the different Mesh Types used for getMesh + enum eQ3MeshIndex + { + E_Q3_MESH_GEOMETRY = 0, + E_Q3_MESH_ITEMS, + E_Q3_MESH_BILLBOARD, + E_Q3_MESH_FOG, + E_Q3_MESH_UNRESOLVED, + E_Q3_MESH_SIZE + }; + + /*! used to customize Quake3 BSP Loader + */ + + struct Q3LevelLoadParameter + { + Q3LevelLoadParameter () + :defaultLightMapMaterial ( video::EMT_LIGHTMAP_M4 ), + defaultModulate ( video::EMFN_MODULATE_4X ), + defaultFilter ( video::EMF_BILINEAR_FILTER ), + patchTesselation ( 8 ), + verbose ( 0 ), + startTime ( 0 ), endTime ( 0 ), + mergeShaderBuffer ( 1 ), + cleanUnResolvedMeshes ( 1 ), + loadAllShaders ( 0 ), + loadSkyShader ( 0 ), + alpharef ( 1 ), + swapLump ( 0 ), + #ifdef __BIG_ENDIAN__ + swapHeader ( 1 ) + #else + swapHeader ( 0 ) + #endif + { + memcpy ( scriptDir, "scripts\x0", 8 ); + } + + video::E_MATERIAL_TYPE defaultLightMapMaterial; + video::E_MODULATE_FUNC defaultModulate; + video::E_MATERIAL_FLAG defaultFilter; + s32 patchTesselation; + s32 verbose; + u32 startTime; + u32 endTime; + s32 mergeShaderBuffer; + s32 cleanUnResolvedMeshes; + s32 loadAllShaders; + s32 loadSkyShader; + s32 alpharef; + s32 swapLump; + s32 swapHeader; + c8 scriptDir [ 64 ]; + }; + + // some useful typedefs + typedef core::array< core::stringc > tStringList; + typedef core::array< video::ITexture* > tTexArray; + + // string helper.. TODO: move to generic files + inline s16 isEqual ( const core::stringc &string, u32 &pos, const c8 *list[], u16 listSize ) + { + const char * in = string.c_str () + pos; + + for ( u16 i = 0; i != listSize; ++i ) + { + if (string.size() < pos) + return -2; + u32 len = (u32) strlen ( list[i] ); + if (string.size() < pos+len) + continue; + if ( in [len] != 0 && in [len] != ' ' ) + continue; + if ( strncmp ( in, list[i], len ) ) + continue; + + pos += len + 1; + return (s16) i; + } + return -2; + } + + inline f32 getAsFloat ( const core::stringc &string, u32 &pos ) + { + const char * in = string.c_str () + pos; + + f32 value = 0.f; + pos += (u32) ( core::fast_atof_move ( in, value ) - in ) + 1; + return value; + } + + //! get a quake3 vector translated to irrlicht position (x,-z,y ) + inline core::vector3df getAsVector3df ( const core::stringc &string, u32 &pos ) + { + core::vector3df v; + + v.X = getAsFloat ( string, pos ); + v.Z = getAsFloat ( string, pos ); + v.Y = getAsFloat ( string, pos ); + + return v; + } + + + /* + extract substrings + */ + inline void getAsStringList ( tStringList &list, s32 max, const core::stringc &string, u32 &startPos ) + { + list.clear (); + + s32 finish = 0; + s32 endPos; + do + { + endPos = string.findNext ( ' ', startPos ); + if ( endPos == -1 ) + { + finish = 1; + endPos = string.size(); + } + + list.push_back ( string.subString ( startPos, endPos - startPos ) ); + startPos = endPos + 1; + + if ( list.size() >= (u32) max ) + finish = 1; + + } while ( !finish ); + + } + + //! A blend function for a q3 shader. + struct SBlendFunc + { + SBlendFunc ( video::E_MODULATE_FUNC mod ) + : type ( video::EMT_SOLID ), modulate ( mod ), + param0( 0.f ), + isTransparent ( 0 ) {} + + video::E_MATERIAL_TYPE type; + video::E_MODULATE_FUNC modulate; + + f32 param0; + u32 isTransparent; + }; + + // parses the content of Variable cull + inline bool getCullingFunction ( const core::stringc &cull ) + { + if ( cull.size() == 0 ) + return true; + + bool ret = true; + static const c8 * funclist[] = { "none", "disable", "twosided" }; + + u32 pos = 0; + switch ( isEqual ( cull, pos, funclist, 3 ) ) + { + case 0: + case 1: + case 2: + ret = false; + break; + } + return ret; + } + + // parses the content of Variable depthfunc + // return a z-test + inline u8 getDepthFunction ( const core::stringc &string ) + { + u8 ret = video::ECFN_LESSEQUAL; + + if ( string.size() == 0 ) + return ret; + + static const c8 * funclist[] = { "lequal","equal" }; + + u32 pos = 0; + switch ( isEqual ( string, pos, funclist, 2 ) ) + { + case 0: + ret = video::ECFN_LESSEQUAL; + break; + case 1: + ret = video::ECFN_EQUAL; + break; + } + return ret; + } + + + /*! + parses the content of Variable blendfunc,alphafunc + it also make a hint for rendering as transparent or solid node. + + we assume a typical quake scene would look like this.. + 1) Big Static Mesh ( solid ) + 2) static scene item ( may use transparency ) but rendered in the solid pass + 3) additional transparency item in the transparent pass + + it's not 100% accurate! it just empirical.. + */ + inline static void getBlendFunc ( const core::stringc &string, SBlendFunc &blendfunc ) + { + if ( string.size() == 0 ) + return; + + // maps to E_BLEND_FACTOR + static const c8 * funclist[] = + { + "gl_zero", + "gl_one", + "gl_dst_color", + "gl_one_minus_dst_color", + "gl_src_color", + "gl_one_minus_src_color", + "gl_src_alpha", + "gl_one_minus_src_alpha", + "gl_dst_alpha", + "gl_one_minus_dst_alpha", + "gl_src_alpha_sat", + + "add", + "filter", + "blend", + + "ge128", + "gt0", + }; + + + u32 pos = 0; + s32 srcFact = isEqual ( string, pos, funclist, 16 ); + + if ( srcFact < 0 ) + return; + + u32 resolved = 0; + s32 dstFact = isEqual ( string, pos, funclist, 16 ); + + switch ( srcFact ) + { + case video::EBF_ZERO: + switch ( dstFact ) + { + // gl_zero gl_src_color == gl_dst_color gl_zero + case video::EBF_SRC_COLOR: + blendfunc.type = video::EMT_ONETEXTURE_BLEND; + blendfunc.param0 = video::pack_textureBlendFunc ( video::EBF_DST_COLOR, video::EBF_ZERO, blendfunc.modulate ); + blendfunc.isTransparent = 1; + resolved = 1; + break; + } break; + + case video::EBF_ONE: + switch ( dstFact ) + { + // gl_one gl_zero + case video::EBF_ZERO: + blendfunc.type = video::EMT_SOLID; + blendfunc.isTransparent = 0; + resolved = 1; + break; + + // gl_one gl_one + case video::EBF_ONE: + blendfunc.type = video::EMT_TRANSPARENT_ADD_COLOR; + blendfunc.isTransparent = 1; + resolved = 1; + break; + } break; + + case video::EBF_SRC_ALPHA: + switch ( dstFact ) + { + // gl_src_alpha gl_one_minus_src_alpha + case video::EBF_ONE_MINUS_SRC_ALPHA: + blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + blendfunc.param0 = 1.f/255.f; + blendfunc.isTransparent = 1; + resolved = 1; + break; + } break; + + case 11: + // add + blendfunc.type = video::EMT_TRANSPARENT_ADD_COLOR; + blendfunc.isTransparent = 1; + resolved = 1; + break; + case 12: + // filter = gl_dst_color gl_zero or gl_zero gl_src_color + blendfunc.type = video::EMT_ONETEXTURE_BLEND; + blendfunc.param0 = video::pack_textureBlendFunc ( video::EBF_DST_COLOR, video::EBF_ZERO, blendfunc.modulate ); + blendfunc.isTransparent = 1; + resolved = 1; + break; + case 13: + // blend = gl_src_alpha gl_one_minus_src_alpha + blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + blendfunc.param0 = 1.f/255.f; + blendfunc.isTransparent = 1; + resolved = 1; + break; + case 14: + // alphafunc ge128 + blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + blendfunc.param0 = 0.5f; + blendfunc.isTransparent = 1; + resolved = 1; + break; + case 15: + // alphafunc gt0 + blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + blendfunc.param0 = 1.f / 255.f; + blendfunc.isTransparent = 1; + resolved = 1; + break; + + } + + // use the generic blender + if ( 0 == resolved ) + { + blendfunc.type = video::EMT_ONETEXTURE_BLEND; + blendfunc.param0 = video::pack_textureBlendFunc ( + (video::E_BLEND_FACTOR) srcFact, + (video::E_BLEND_FACTOR) dstFact, + blendfunc.modulate); + + blendfunc.isTransparent = 1; + } + } + + // random noise [-1;1] + struct Noiser + { + static f32 get () + { + static u32 RandomSeed = 0x69666966; + RandomSeed = (RandomSeed * 3631 + 1); + + f32 value = ( (f32) (RandomSeed & 0x7FFF ) * (1.0f / (f32)(0x7FFF >> 1) ) ) - 1.f; + return value; + } + }; + + enum eQ3ModifierFunction + { + TCMOD = 0, + DEFORMVERTEXES = 1, + RGBGEN = 2, + TCGEN = 3, + MAP = 4, + ALPHAGEN = 5, + + FUNCTION2 = 0x10, + SCROLL = FUNCTION2 + 1, + SCALE = FUNCTION2 + 2, + ROTATE = FUNCTION2 + 3, + STRETCH = FUNCTION2 + 4, + TURBULENCE = FUNCTION2 + 5, + WAVE = FUNCTION2 + 6, + + IDENTITY = FUNCTION2 + 7, + VERTEX = FUNCTION2 + 8, + TEXTURE = FUNCTION2 + 9, + LIGHTMAP = FUNCTION2 + 10, + ENVIRONMENT = FUNCTION2 + 11, + DOLLAR_LIGHTMAP = FUNCTION2 + 12, + BULGE = FUNCTION2 + 13, + AUTOSPRITE = FUNCTION2 + 14, + AUTOSPRITE2 = FUNCTION2 + 15, + TRANSFORM = FUNCTION2 + 16, + EXACTVERTEX = FUNCTION2 + 17, + CONSTANT = FUNCTION2 + 18, + LIGHTINGSPECULAR = FUNCTION2 + 19, + MOVE = FUNCTION2 + 20, + NORMAL = FUNCTION2 + 21, + IDENTITYLIGHTING = FUNCTION2 + 22, + + WAVE_MODIFIER_FUNCTION = 0x30, + SINUS = WAVE_MODIFIER_FUNCTION + 1, + COSINUS = WAVE_MODIFIER_FUNCTION + 2, + SQUARE = WAVE_MODIFIER_FUNCTION + 3, + TRIANGLE = WAVE_MODIFIER_FUNCTION + 4, + SAWTOOTH = WAVE_MODIFIER_FUNCTION + 5, + SAWTOOTH_INVERSE = WAVE_MODIFIER_FUNCTION + 6, + NOISE = WAVE_MODIFIER_FUNCTION + 7, + + + UNKNOWN = -2 + + }; + + struct SModifierFunction + { + SModifierFunction () + : masterfunc0 ( UNKNOWN ), masterfunc1( UNKNOWN ), func ( SINUS ), + tcgen( TEXTURE ), rgbgen ( IDENTITY ), alphagen ( UNKNOWN ), + base ( 0 ), amp ( 1 ), phase ( 0 ), frequency ( 1 ), + wave ( 1 ), + x ( 0 ), y ( 0 ), z( 0 ), count( 0 ) {} + + // "tcmod","deformvertexes","rgbgen", "tcgen" + eQ3ModifierFunction masterfunc0; + // depends + eQ3ModifierFunction masterfunc1; + // depends + eQ3ModifierFunction func; + + eQ3ModifierFunction tcgen; + eQ3ModifierFunction rgbgen; + eQ3ModifierFunction alphagen; + + union + { + f32 base; + f32 bulgewidth; + }; + + union + { + f32 amp; + f32 bulgeheight; + }; + + f32 phase; + + union + { + f32 frequency; + f32 bulgespeed; + }; + + union + { + f32 wave; + f32 div; + }; + + f32 x; + f32 y; + f32 z; + u32 count; + + f32 evaluate ( f32 dt ) const + { + // phase in 0 and 1.. + f32 x = core::fract( (dt + phase ) * frequency ); + f32 y = 0.f; + + switch ( func ) + { + case SINUS: + y = sinf ( x * core::PI * 2.f ); + break; + case COSINUS: + y = cosf ( x * core::PI * 2.f ); + break; + case SQUARE: + y = x < 0.5f ? 1.f : -1.f; + break; + case TRIANGLE: + y = x < 0.5f ? ( 4.f * x ) - 1.f : ( -4.f * x ) + 3.f; + break; + case SAWTOOTH: + y = x; + break; + case SAWTOOTH_INVERSE: + y = 1.f - x; + break; + case NOISE: + y = Noiser::get(); + break; + default: + break; + } + + return base + ( y * amp ); + } + + + }; + + inline core::vector3df getMD3Normal ( u32 i, u32 j ) + { + const f32 lng = i * 2.0f * core::PI / 255.0f; + const f32 lat = j * 2.0f * core::PI / 255.0f; + return core::vector3df(cosf ( lat ) * sinf ( lng ), + sinf ( lat ) * sinf ( lng ), + cosf ( lng )); + } + + // + inline void getModifierFunc ( SModifierFunction& fill, const core::stringc &string, u32 &pos ) + { + if ( string.size() == 0 ) + return; + + static const c8 * funclist[] = + { + "sin","cos","square", + "triangle", "sawtooth","inversesawtooth", "noise" + }; + + fill.func = (eQ3ModifierFunction) isEqual ( string,pos, funclist,7 ); + fill.func = fill.func == UNKNOWN ? SINUS : (eQ3ModifierFunction) ((u32) fill.func + WAVE_MODIFIER_FUNCTION + 1); + + fill.base = getAsFloat ( string, pos ); + fill.amp = getAsFloat ( string, pos ); + fill.phase = getAsFloat ( string, pos ); + fill.frequency = getAsFloat ( string, pos ); + } + + + // name = "a b c .." + struct SVariable + { + core::stringc name; + core::stringc content; + + SVariable ( const c8 * n, const c8 *c = 0 ) : name ( n ), content (c) {} + virtual ~SVariable () {} + + void clear () + { + name = ""; + content = ""; + } + + s32 isValid () const + { + return name.size(); + } + + bool operator == ( const SVariable &other ) const + { + return 0 == strcmp ( name.c_str(), other.name.c_str () ); + } + + bool operator < ( const SVariable &other ) const + { + return 0 > strcmp ( name.c_str(), other.name.c_str () ); + } + + }; + + + // string database. "a" = "Hello", "b" = "1234.6" + struct SVarGroup + { + SVarGroup () { Variable.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); } + virtual ~SVarGroup () {} + + u32 isDefined ( const c8 * name, const c8 * content = 0 ) const + { + for ( u32 i = 0; i != Variable.size (); ++i ) + { + if ( 0 == strcmp ( Variable[i].name.c_str(), name ) && + ( 0 == content || strstr ( Variable[i].content.c_str(), content ) ) + ) + { + return i + 1; + } + } + return 0; + } + + // searches for Variable name and returns is content + // if Variable is not found a reference to an Empty String is returned + const core::stringc &get( const c8 * name ) const + { + SVariable search ( name ); + s32 index = Variable.linear_search ( search ); + if ( index < 0 ) + return irrEmptyStringc; + + return Variable [ index ].content; + } + + // set the Variable name + void set ( const c8 * name, const c8 * content = 0 ) + { + u32 index = isDefined ( name, 0 ); + if ( 0 == index ) + { + Variable.push_back ( SVariable ( name, content ) ); + } + else + { + Variable [ index ].content = content; + } + } + + + core::array < SVariable > Variable; + }; + + //! holding a group a variable + struct SVarGroupList: public IReferenceCounted + { + SVarGroupList () + { + VariableGroup.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); + } + virtual ~SVarGroupList () {} + + core::array < SVarGroup > VariableGroup; + }; + + + //! A Parsed Shader Holding Variables ordered in Groups + struct IShader + { + IShader () + : ID ( 0 ), VarGroup ( 0 ) {} + virtual ~IShader () {} + + void operator = (const IShader &other ) + { + ID = other.ID; + VarGroup = other.VarGroup; + name = other.name; + } + + bool operator == (const IShader &other ) const + { + return 0 == strcmp ( name.c_str(), other.name.c_str () ); + //return name == other.name; + } + + bool operator < (const IShader &other ) const + { + return strcmp ( name.c_str(), other.name.c_str () ) < 0; + //return name < other.name; + } + + u32 getGroupSize () const + { + if ( 0 == VarGroup ) + return 0; + return VarGroup->VariableGroup.size (); + } + + const SVarGroup * getGroup ( u32 stage ) const + { + if ( 0 == VarGroup || stage >= VarGroup->VariableGroup.size () ) + return 0; + + return &VarGroup->VariableGroup [ stage ]; + } + + // id + s32 ID; + SVarGroupList *VarGroup; // reference + + // Shader: shader name ( also first variable in first Vargroup ) + // Entity: classname ( variable in Group(1) ) + core::stringc name; + }; + + typedef IShader IEntity; + + typedef core::array < IEntity > tQ3EntityList; + + /* + dump shader like original layout, regardless of internal data holding + no recursive folding.. + */ + inline void dumpVarGroup ( core::stringc &dest, const SVarGroup * group, s32 stack ) + { + core::stringc buf; + s32 i; + + + if ( stack > 0 ) + { + buf = ""; + for ( i = 0; i < stack - 1; ++i ) + buf += '\t'; + + buf += "{\n"; + dest.append ( buf ); + } + + for ( u32 g = 0; g != group->Variable.size(); ++g ) + { + buf = ""; + for ( i = 0; i < stack; ++i ) + buf += '\t'; + + buf += group->Variable[g].name; + buf += " "; + buf += group->Variable[g].content; + buf += "\n"; + dest.append ( buf ); + } + + if ( stack > 1 ) + { + buf = ""; + for ( i = 0; i < stack - 1; ++i ) + buf += '\t'; + + buf += "}\n"; + dest.append ( buf ); + } + + } + + /*! + dump a Shader or an Entity + */ + inline core::stringc & dumpShader ( core::stringc &dest, const IShader * shader, bool entity = false ) + { + if ( 0 == shader ) + return dest; + + const SVarGroup * group; + + const u32 size = shader->VarGroup->VariableGroup.size (); + for ( u32 i = 0; i != size; ++i ) + { + group = &shader->VarGroup->VariableGroup[ i ]; + dumpVarGroup ( dest, group, core::clamp( (int)i, 0, 2 ) ); + } + + if ( !entity ) + { + if ( size <= 1 ) + { + dest.append ( "{\n" ); + } + dest.append ( "}\n" ); + } + return dest; + } + + + /* + quake3 doesn't care much about tga & jpg + load one or multiple files stored in name started at startPos to the texture array textures + if texture is not loaded 0 will be added ( to find missing textures easier) + */ + inline void getTextures(tTexArray &textures, + const core::stringc &name, u32 &startPos, + io::IFileSystem *fileSystem, + video::IVideoDriver* driver) + { + static const char* extension[] = + { + ".jpg", + ".jpeg", + ".png", + ".dds", + ".tga", + ".bmp", + ".pcx" + }; + + tStringList stringList; + getAsStringList(stringList, -1, name, startPos); + + textures.clear(); + + io::path loadFile; + for ( u32 i = 0; i!= stringList.size (); ++i ) + { + video::ITexture* texture = 0; + for (u32 g = 0; g != 7 ; ++g) + { + core::cutFilenameExtension ( loadFile, stringList[i] ); + + if ( loadFile == "$whiteimage" ) + { + texture = driver->getTexture( "$whiteimage" ); + if ( 0 == texture ) + { + core::dimension2du s ( 2, 2 ); + u32 image[4] = { 0xFFFFFFFF, 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF }; + video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); + texture = driver->addTexture( "$whiteimage", w ); + w->drop (); + } + + } + else + if ( loadFile == "$redimage" ) + { + texture = driver->getTexture( "$redimage" ); + if ( 0 == texture ) + { + core::dimension2du s ( 2, 2 ); + u32 image[4] = { 0xFFFF0000, 0xFFFF0000,0xFFFF0000,0xFFFF0000 }; + video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); + texture = driver->addTexture( "$redimage", w ); + w->drop (); + } + } + else + if ( loadFile == "$blueimage" ) + { + texture = driver->getTexture( "$blueimage" ); + if ( 0 == texture ) + { + core::dimension2du s ( 2, 2 ); + u32 image[4] = { 0xFF0000FF, 0xFF0000FF,0xFF0000FF,0xFF0000FF }; + video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); + texture = driver->addTexture( "$blueimage", w ); + w->drop (); + } + } + else + if ( loadFile == "$checkerimage" ) + { + texture = driver->getTexture( "$checkerimage" ); + if ( 0 == texture ) + { + core::dimension2du s ( 2, 2 ); + u32 image[4] = { 0xFFFFFFFF, 0xFF000000,0xFF000000,0xFFFFFFFF }; + video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); + texture = driver->addTexture( "$checkerimage", w ); + w->drop (); + } + } + else + if ( loadFile == "$lightmap" ) + { + texture = 0; + } + else + { + loadFile.append ( extension[g] ); + } + + if ( fileSystem->existFile ( loadFile ) ) + { + texture = driver->getTexture( loadFile ); + if ( texture ) + break; + texture = 0; + } + } + // take 0 Texture + textures.push_back(texture); + } + } + + + //! Manages various Quake3 Shader Styles + class IShaderManager : public IReferenceCounted + { + }; + +} // end namespace quake3 +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IRandomizer.h b/src/others/irrlicht-1.8.1/include/IRandomizer.h new file mode 100644 index 0000000..a0c0730 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IRandomizer.h @@ -0,0 +1,33 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_RANDOMIZER_H_INCLUDED__ +#define __I_RANDOMIZER_H_INCLUDED__ + +#include "IReferenceCounted.h" + +namespace irr +{ + +//! Interface for generating random numbers +class IRandomizer : public virtual IReferenceCounted +{ +public: + //! resets the randomizer + /** \param value Initialization value (seed) */ + virtual void reset(s32 value=0x0f0f0f0f) =0; + + //! generates a pseudo random number in the range 0..randMax() + virtual s32 rand() const =0; + + //! generates a pseudo random number in the range 0..1 + virtual f32 frand() const =0; + + //! get maxmimum number generated by rand() + virtual s32 randMax() const =0; +}; + +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/IReadFile.h b/src/others/irrlicht-1.8.1/include/IReadFile.h new file mode 100644 index 0000000..e925690 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IReadFile.h @@ -0,0 +1,58 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_READ_FILE_H_INCLUDED__ +#define __I_READ_FILE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "coreutil.h" + +namespace irr +{ +namespace io +{ + + //! Interface providing read acess to a file. + class IReadFile : public virtual IReferenceCounted + { + public: + //! Reads an amount of bytes from the file. + /** \param buffer Pointer to buffer where read bytes are written to. + \param sizeToRead Amount of bytes to read from the file. + \return How many bytes were read. */ + virtual s32 read(void* buffer, u32 sizeToRead) = 0; + + //! Changes position in file + /** \param finalPos Destination position in the file. + \param relativeMovement If set to true, the position in the file is + changed relative to current position. Otherwise the position is changed + from beginning of file. + \return True if successful, otherwise false. */ + virtual bool seek(long finalPos, bool relativeMovement = false) = 0; + + //! Get size of file. + /** \return Size of the file in bytes. */ + virtual long getSize() const = 0; + + //! Get the current position in the file. + /** \return Current position in the file in bytes. */ + virtual long getPos() const = 0; + + //! Get name of file. + /** \return File name as zero terminated character string. */ + virtual const io::path& getFileName() const = 0; + }; + + //! Internal function, please do not use. + IReadFile* createReadFile(const io::path& fileName); + //! Internal function, please do not use. + IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize); + //! Internal function, please do not use. + IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped); + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IReferenceCounted.h b/src/others/irrlicht-1.8.1/include/IReferenceCounted.h new file mode 100644 index 0000000..8a551e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IReferenceCounted.h @@ -0,0 +1,170 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_IREFERENCE_COUNTED_H_INCLUDED__ +#define __I_IREFERENCE_COUNTED_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ + + //! Base class of most objects of the Irrlicht Engine. + /** This class provides reference counting through the methods grab() and drop(). + It also is able to store a debug string for every instance of an object. + Most objects of the Irrlicht + Engine are derived from IReferenceCounted, and so they are reference counted. + + When you create an object in the Irrlicht engine, calling a method + which starts with 'create', an object is created, and you get a pointer + to the new object. If you no longer need the object, you have + to call drop(). This will destroy the object, if grab() was not called + in another part of you program, because this part still needs the object. + Note, that you only need to call drop() to the object, if you created it, + and the method had a 'create' in it. + + A simple example: + + If you want to create a texture, you may want to call an imaginable method + IDriver::createTexture. You call + ITexture* texture = driver->createTexture(dimension2d(128, 128)); + If you no longer need the texture, call texture->drop(). + + If you want to load a texture, you may want to call imaginable method + IDriver::loadTexture. You do this like + ITexture* texture = driver->loadTexture("example.jpg"); + You will not have to drop the pointer to the loaded texture, because + the name of the method does not start with 'create'. The texture + is stored somewhere by the driver. + */ + class IReferenceCounted + { + public: + + //! Constructor. + IReferenceCounted() + : DebugName(0), ReferenceCounter(1) + { + } + + //! Destructor. + virtual ~IReferenceCounted() + { + } + + //! Grabs the object. Increments the reference counter by one. + /** Someone who calls grab() to an object, should later also + call drop() to it. If an object never gets as much drop() as + grab() calls, it will never be destroyed. The + IReferenceCounted class provides a basic reference counting + mechanism with its methods grab() and drop(). Most objects of + the Irrlicht Engine are derived from IReferenceCounted, and so + they are reference counted. + + When you create an object in the Irrlicht engine, calling a + method which starts with 'create', an object is created, and + you get a pointer to the new object. If you no longer need the + object, you have to call drop(). This will destroy the object, + if grab() was not called in another part of you program, + because this part still needs the object. Note, that you only + need to call drop() to the object, if you created it, and the + method had a 'create' in it. + + A simple example: + + If you want to create a texture, you may want to call an + imaginable method IDriver::createTexture. You call + ITexture* texture = driver->createTexture(dimension2d(128, 128)); + If you no longer need the texture, call texture->drop(). + If you want to load a texture, you may want to call imaginable + method IDriver::loadTexture. You do this like + ITexture* texture = driver->loadTexture("example.jpg"); + You will not have to drop the pointer to the loaded texture, + because the name of the method does not start with 'create'. + The texture is stored somewhere by the driver. */ + void grab() const { ++ReferenceCounter; } + + //! Drops the object. Decrements the reference counter by one. + /** The IReferenceCounted class provides a basic reference + counting mechanism with its methods grab() and drop(). Most + objects of the Irrlicht Engine are derived from + IReferenceCounted, and so they are reference counted. + + When you create an object in the Irrlicht engine, calling a + method which starts with 'create', an object is created, and + you get a pointer to the new object. If you no longer need the + object, you have to call drop(). This will destroy the object, + if grab() was not called in another part of you program, + because this part still needs the object. Note, that you only + need to call drop() to the object, if you created it, and the + method had a 'create' in it. + + A simple example: + + If you want to create a texture, you may want to call an + imaginable method IDriver::createTexture. You call + ITexture* texture = driver->createTexture(dimension2d(128, 128)); + If you no longer need the texture, call texture->drop(). + If you want to load a texture, you may want to call imaginable + method IDriver::loadTexture. You do this like + ITexture* texture = driver->loadTexture("example.jpg"); + You will not have to drop the pointer to the loaded texture, + because the name of the method does not start with 'create'. + The texture is stored somewhere by the driver. + \return True, if the object was deleted. */ + bool drop() const + { + // someone is doing bad reference counting. + _IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0) + + --ReferenceCounter; + if (!ReferenceCounter) + { + delete this; + return true; + } + + return false; + } + + //! Get the reference count. + /** \return Current value of the reference counter. */ + s32 getReferenceCount() const + { + return ReferenceCounter; + } + + //! Returns the debug name of the object. + /** The Debugname may only be set and changed by the object + itself. This method should only be used in Debug mode. + \return Returns a string, previously set by setDebugName(); */ + const c8* getDebugName() const + { + return DebugName; + } + + protected: + + //! Sets the debug name of the object. + /** The Debugname may only be set and changed by the object + itself. This method should only be used in Debug mode. + \param newName: New debug name to set. */ + void setDebugName(const c8* newName) + { + DebugName = newName; + } + + private: + + //! The debug name. + const c8* DebugName; + + //! The reference counter. Mutable to do reference counting on const objects. + mutable s32 ReferenceCounter; + }; + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneCollisionManager.h b/src/others/irrlicht-1.8.1/include/ISceneCollisionManager.h new file mode 100644 index 0000000..5da7d9f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneCollisionManager.h @@ -0,0 +1,205 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_COLLISION_MANAGER_H_INCLUDED__ +#define __I_SCENE_COLLISION_MANAGER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "vector3d.h" +#include "triangle3d.h" +#include "position2d.h" +#include "line3d.h" + +namespace irr +{ + +namespace scene +{ + class ISceneNode; + class ICameraSceneNode; + class ITriangleSelector; + + //! The Scene Collision Manager provides methods for performing collision tests and picking on scene nodes. + class ISceneCollisionManager : public virtual IReferenceCounted + { + public: + + //! Finds the nearest collision point of a line and lots of triangles, if there is one. + /** \param ray: Line with which collisions are tested. + \param selector: TriangleSelector containing the triangles. It + can be created for example using + ISceneManager::createTriangleSelector() or + ISceneManager::createTriangleOctreeSelector(). + \param outCollisionPoint: If a collision is detected, this will + contain the position of the nearest collision to the line-start. + \param outTriangle: If a collision is detected, this will + contain the triangle with which the ray collided. + \param outNode: If a collision is detected, this will contain + the scene node associated with the triangle that was hit. + \return True if a collision was detected and false if not. */ + virtual bool getCollisionPoint(const core::line3d& ray, + ITriangleSelector* selector, core::vector3df& outCollisionPoint, + core::triangle3df& outTriangle, ISceneNode*& outNode) =0; + + //! Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid. + /** This can be used for moving a character in a 3d world: The + character will slide at walls and is able to walk up stairs. + The method used how to calculate the collision result position + is based on the paper "Improved Collision detection and + Response" by Kasper Fauerby. + \param selector: TriangleSelector containing the triangles of + the world. It can be created for example using + ISceneManager::createTriangleSelector() or + ISceneManager::createTriangleOctreeSelector(). + \param ellipsoidPosition: Position of the ellipsoid. + \param ellipsoidRadius: Radius of the ellipsoid. + \param ellipsoidDirectionAndSpeed: Direction and speed of the + movement of the ellipsoid. + \param triout: Optional parameter where the last triangle + causing a collision is stored, if there is a collision. + \param hitPosition: Return value for the position of the collision + \param outFalling: Is set to true if the ellipsoid is falling + down, caused by gravity. + \param outNode: the node with which the ellipoid collided (if any) + \param slidingSpeed: DOCUMENTATION NEEDED. + \param gravityDirectionAndSpeed: Direction and force of gravity. + \return New position of the ellipsoid. */ + virtual core::vector3df getCollisionResultPosition( + ITriangleSelector* selector, + const core::vector3df &ellipsoidPosition, + const core::vector3df& ellipsoidRadius, + const core::vector3df& ellipsoidDirectionAndSpeed, + core::triangle3df& triout, + core::vector3df& hitPosition, + bool& outFalling, + ISceneNode*& outNode, + f32 slidingSpeed = 0.0005f, + const core::vector3df& gravityDirectionAndSpeed + = core::vector3df(0.0f, 0.0f, 0.0f)) = 0; + + //! Returns a 3d ray which would go through the 2d screen coodinates. + /** \param pos: Screen coordinates in pixels. + \param camera: Camera from which the ray starts. If null, the + active camera is used. + \return Ray starting from the position of the camera and ending + at a length of the far value of the camera at a position which + would be behind the 2d screen coodinates. */ + virtual core::line3d getRayFromScreenCoordinates( + const core::position2d& pos, ICameraSceneNode* camera = 0) = 0; + + //! Calculates 2d screen position from a 3d position. + /** \param pos: 3D position in world space to be transformed + into 2d. + \param camera: Camera to be used. If null, the currently active + camera is used. + \param useViewPort: Calculate screen coordinates relative to + the current view port. Please note that unless the driver does + not take care of the view port, it is usually best to get the + result in absolute screen coordinates (flag=false). + \return 2d screen coordinates which a object in the 3d world + would have if it would be rendered to the screen. If the 3d + position is behind the camera, it is set to (-1000,-1000). In + most cases you can ignore this fact, because if you use this + method for drawing a decorator over a 3d object, it will be + clipped by the screen borders. */ + virtual core::position2d getScreenCoordinatesFrom3DPosition( + const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0; + + //! Gets the scene node, which is currently visible under the given screencoordinates, viewed from the currently active camera. + /** The collision tests are done using a bounding box for each + scene node. You can limit the recursive search so just all children of the specified root are tested. + \param pos: Position in pixel screen coordinates, under which + the returned scene node will be. + \param idBitMask: Only scene nodes with an id with bits set + like in this mask will be tested. If the BitMask is 0, this + feature is disabled. + Please note that the default node id of -1 will match with + every bitmask != 0 + \param bNoDebugObjects: Doesn't take debug objects into account + when true. These are scene nodes with IsDebugObject() = true. + \param root If different from 0, the search is limited to the children of this node. + \return Visible scene node under screen coordinates with + matching bits in its id. If there is no scene node under this + position, 0 is returned. */ + virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d& pos, + s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0; + + //! Returns the nearest scene node which collides with a 3d ray and whose id matches a bitmask. + /** The collision tests are done using a bounding box for each + scene node. The recursive search can be limited be specifying a scene node. + \param ray Line with which collisions are tested. + \param idBitMask Only scene nodes with an id which matches at + least one of the bits contained in this mask will be tested. + However, if this parameter is 0, then all nodes are checked. + \param bNoDebugObjects: Doesn't take debug objects into account when true. These + are scene nodes with IsDebugObject() = true. + \param root If different from 0, the search is limited to the children of this node. + \return Scene node nearest to ray.start, which collides with + the ray and matches the idBitMask, if the mask is not null. If + no scene node is found, 0 is returned. */ + virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d& ray, + s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0; + + //! Get the scene node, which the given camera is looking at and whose id matches the bitmask. + /** A ray is simply casted from the position of the camera to + the view target position, and all scene nodes are tested + against this ray. The collision tests are done using a bounding + box for each scene node. + \param camera: Camera from which the ray is casted. + \param idBitMask: Only scene nodes with an id which matches at least one of the + bits contained in this mask will be tested. However, if this parameter is 0, then + all nodes are checked. + feature is disabled. + Please note that the default node id of -1 will match with + every bitmask != 0 + \param bNoDebugObjects: Doesn't take debug objects into account + when true. These are scene nodes with IsDebugObject() = true. + \return Scene node nearest to the camera, which collides with + the ray and matches the idBitMask, if the mask is not null. If + no scene node is found, 0 is returned. */ + virtual ISceneNode* getSceneNodeFromCameraBB(ICameraSceneNode* camera, + s32 idBitMask=0, bool bNoDebugObjects = false) = 0; + + //! Perform a ray/box and ray/triangle collision check on a heirarchy of scene nodes. + /** This checks all scene nodes under the specified one, first by ray/bounding + box, and then by accurate ray/triangle collision, finding the nearest collision, + and the scene node containg it. It returns the node hit, and (via output + parameters) the position of the collision, and the triangle that was hit. + + All scene nodes in the hierarchy tree under the specified node are checked. Only + nodes that are visible, with an ID that matches at least one bit in the supplied + bitmask, and which have a triangle selector are considered as candidates for being hit. + You do not have to build a meta triangle selector; the individual triangle selectors + of each candidate scene node are used automatically. + + \param ray: Line with which collisions are tested. + \param outCollisionPoint: If a collision is detected, this will contain the + position of the nearest collision. + \param outTriangle: If a collision is detected, this will contain the triangle + with which the ray collided. + \param idBitMask: Only scene nodes with an id which matches at least one of the + bits contained in this mask will be tested. However, if this parameter is 0, then + all nodes are checked. + \param collisionRootNode: the scene node at which to begin checking. Only this + node and its children will be checked. If you want to check the entire scene, + pass 0, and the root scene node will be used (this is the default). + \param noDebugObjects: when true, debug objects are not considered viable targets. + Debug objects are scene nodes with IsDebugObject() = true. + \return Returns the scene node containing the hit triangle nearest to ray.start. + If no collision is detected, then 0 is returned. */ + virtual ISceneNode* getSceneNodeAndCollisionPointFromRay( + core::line3df ray, + core::vector3df & outCollisionPoint, + core::triangle3df & outTriangle, + s32 idBitMask = 0, + ISceneNode * collisionRootNode = 0, + bool noDebugObjects = false) = 0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneLoader.h b/src/others/irrlicht-1.8.1/include/ISceneLoader.h new file mode 100644 index 0000000..c71c15d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneLoader.h @@ -0,0 +1,62 @@ +// Copyright (C) 2010-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_LOADER_H_INCLUDED__ +#define __I_SCENE_LOADER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "path.h" + +namespace irr +{ +namespace io +{ + class IReadFile; +} // end namespace io +namespace scene +{ + class ISceneNode; + class ISceneUserDataSerializer; + +//! Class which can load a scene into the scene manager. +/** If you want Irrlicht to be able to load currently unsupported +scene file formats (e.g. .vrml), then implement this and add your +new Sceneloader to the engine with ISceneManager::addExternalSceneLoader(). */ +class ISceneLoader : public virtual IReferenceCounted +{ +public: + + //! Returns true if the class might be able to load this file. + /** This decision should be based on the file extension (e.g. ".vrml") + only. + \param filename Name of the file to test. + \return True if the extension is a recognised type. */ + virtual bool isALoadableFileExtension(const io::path& filename) const = 0; + + //! Returns true if the class might be able to load this file. + /** This decision will be based on a quick look at the contents of the file. + \param file The file to test. + \return True if the extension is a recognised type. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0; + + //! Loads the scene into the scene manager. + /** \param file File which contains the scene. + \param userDataSerializer: If you want to load user data which may be attached + to some some scene nodes in the file, implement the ISceneUserDataSerializer + interface and provide it as parameter here. Otherwise, simply specify 0 as this + parameter. + \param rootNode The node to load the scene into, if none is provided then the + scene will be loaded into the root node. + \return Returns true on success, false on failure. Returns 0 if loading failed. */ + virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, + ISceneNode* rootNode=0) = 0; + +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneManager.h b/src/others/irrlicht-1.8.1/include/ISceneManager.h new file mode 100644 index 0000000..d0b14a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneManager.h @@ -0,0 +1,1663 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_MANAGER_H_INCLUDED__ +#define __I_SCENE_MANAGER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrArray.h" +#include "irrString.h" +#include "path.h" +#include "vector3d.h" +#include "dimension2d.h" +#include "SColor.h" +#include "ETerrainElements.h" +#include "ESceneNodeTypes.h" +#include "ESceneNodeAnimatorTypes.h" +#include "EMeshWriterEnums.h" +#include "SceneParameters.h" +#include "IGeometryCreator.h" +#include "ISkinnedMesh.h" + +namespace irr +{ + struct SKeyMap; + struct SEvent; + +namespace io +{ + class IReadFile; + class IAttributes; + class IWriteFile; + class IFileSystem; +} // end namespace io + +namespace gui +{ + class IGUIFont; + class IGUIEnvironment; +} // end namespace gui + +namespace video +{ + class IVideoDriver; + class SMaterial; + class IImage; + class ITexture; +} // end namespace video + +namespace scene +{ + //! Enumeration for render passes. + /** A parameter passed to the registerNodeForRendering() method of the ISceneManager, + specifying when the node wants to be drawn in relation to the other nodes. */ + enum E_SCENE_NODE_RENDER_PASS + { + //! No pass currently active + ESNRP_NONE =0, + + //! Camera pass. The active view is set up here. The very first pass. + ESNRP_CAMERA =1, + + //! In this pass, lights are transformed into camera space and added to the driver + ESNRP_LIGHT =2, + + //! This is used for sky boxes. + ESNRP_SKY_BOX =4, + + //! All normal objects can use this for registering themselves. + /** This value will never be returned by + ISceneManager::getSceneNodeRenderPass(). The scene manager + will determine by itself if an object is transparent or solid + and register the object as SNRT_TRANSPARENT or SNRT_SOLD + automatically if you call registerNodeForRendering with this + value (which is default). Note that it will register the node + only as ONE type. If your scene node has both solid and + transparent material types register it twice (one time as + SNRT_SOLID, the other time as SNRT_TRANSPARENT) and in the + render() method call getSceneNodeRenderPass() to find out the + current render pass and render only the corresponding parts of + the node. */ + ESNRP_AUTOMATIC =24, + + //! Solid scene nodes or special scene nodes without materials. + ESNRP_SOLID =8, + + //! Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in that order. + ESNRP_TRANSPARENT =16, + + //! Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and drawn in that order. + ESNRP_TRANSPARENT_EFFECT =32, + + //! Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes + ESNRP_SHADOW =64 + }; + + class IAnimatedMesh; + class IAnimatedMeshSceneNode; + class IBillboardSceneNode; + class IBillboardTextSceneNode; + class ICameraSceneNode; + class IDummyTransformationSceneNode; + class ILightManager; + class ILightSceneNode; + class IMesh; + class IMeshBuffer; + class IMeshCache; + class IMeshLoader; + class IMeshManipulator; + class IMeshSceneNode; + class IMeshWriter; + class IMetaTriangleSelector; + class IParticleSystemSceneNode; + class ISceneCollisionManager; + class ISceneLoader; + class ISceneNode; + class ISceneNodeAnimator; + class ISceneNodeAnimatorCollisionResponse; + class ISceneNodeAnimatorFactory; + class ISceneNodeFactory; + class ISceneUserDataSerializer; + class ITerrainSceneNode; + class ITextSceneNode; + class ITriangleSelector; + class IVolumeLightSceneNode; + + namespace quake3 + { + struct IShader; + } // end namespace quake3 + + //! The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff. + /** All Scene nodes can be created only here. There is a always growing + list of scene nodes for lots of purposes: Indoor rendering scene nodes + like the Octree (addOctreeSceneNode()) or the terrain renderer + (addTerrainSceneNode()), different Camera scene nodes + (addCameraSceneNode(), addCameraSceneNodeMaya()), scene nodes for Light + (addLightSceneNode()), Billboards (addBillboardSceneNode()) and so on. + A scene node is a node in the hierachical scene graph. Every scene node + may have children, which are other scene nodes. Children move relative + the their parents position. If the parent of a node is not visible, its + children won't be visible, too. In this way, it is for example easily + possible to attach a light to a moving car or to place a walking + character on a moving platform on a moving ship. + The SceneManager is also able to load 3d mesh files of different + formats. Take a look at getMesh() to find out what formats are + supported. If these formats are not enough, use + addExternalMeshLoader() to add new formats to the engine. + */ + class ISceneManager : public virtual IReferenceCounted + { + public: + + //! Get pointer to an animateable mesh. Loads the file if not loaded already. + /** + * If you want to remove a loaded mesh from the cache again, use removeMesh(). + * Currently there are the following mesh formats supported: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
FormatDescription
3D Studio (.3ds)Loader for 3D-Studio files which lots of 3D packages + * are able to export. Only static meshes are currently + * supported by this importer.
3D World Studio (.smf)Loader for Leadwerks SMF mesh files, a simple mesh format + * containing static geometry for games. The proprietary .STF texture format + * is not supported yet. This loader was originally written by Joseph Ellis.
Bliz Basic B3D (.b3d)Loader for blitz basic files, developed by Mark + * Sibly. This is the ideal animated mesh format for game + * characters as it is both rigidly defined and widely + * supported by modeling and animation software. + * As this format supports skeletal animations, an + * ISkinnedMesh will be returned by this importer.
Cartography shop 4 (.csm)Cartography Shop is a modeling program for creating + * architecture and calculating lighting. Irrlicht can + * directly import .csm files thanks to the IrrCSM library + * created by Saurav Mohapatra which is now integrated + * directly in Irrlicht. If you are using this loader, + * please note that you'll have to set the path of the + * textures before loading .csm files. You can do this + * using + * SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, + * "path/to/your/textures");
COLLADA (.dae, .xml)COLLADA is an open Digital Asset Exchange Schema for + * the interactive 3D industry. There are exporters and + * importers for this format available for most of the + * big 3d packagesat http://collada.org. Irrlicht can + * import COLLADA files by using the + * ISceneManager::getMesh() method. COLLADA files need + * not contain only one single mesh but multiple meshes + * and a whole scene setup with lights, cameras and mesh + * instances, this loader can set up a scene as + * described by the COLLADA file instead of loading and + * returning one single mesh. By default, this loader + * behaves like the other loaders and does not create + * instances, but it can be switched into this mode by + * using + * SceneManager->getParameters()->setAttribute(COLLADA_CREATE_SCENE_INSTANCES, true); + * Created scene nodes will be named as the names of the + * nodes in the COLLADA file. The returned mesh is just + * a dummy object in this mode. Meshes included in the + * scene will be added into the scene manager with the + * following naming scheme: + * "path/to/file/file.dea#meshname". The loading of such + * meshes is logged. Currently, this loader is able to + + + * create meshes (made of only polygons), lights, and + * cameras. Materials and animations are currently not + * supported but this will change with future releases. + *
Delgine DeleD (.dmf)DeleD (delgine.com) is a 3D editor and level-editor + * combined into one and is specifically designed for 3D + * game-development. With this loader, it is possible to + * directly load all geometry is as well as textures and + * lightmaps from .dmf files. To set texture and + * material paths, see scene::DMF_USE_MATERIALS_DIRS and + * scene::DMF_TEXTURE_PATH. It is also possible to flip + * the alpha texture by setting + * scene::DMF_FLIP_ALPHA_TEXTURES to true and to set the + * material transparent reference value by setting + * scene::DMF_ALPHA_CHANNEL_REF to a float between 0 and + * 1. The loader is based on Salvatore Russo's .dmf + * loader, I just changed some parts of it. Thanks to + * Salvatore for his work and for allowing me to use his + * code in Irrlicht and put it under Irrlicht's license. + * For newer and more enchanced versions of the loader, + * take a look at delgine.com. + *
DirectX (.x)Platform independent importer (so not D3D-only) for + * .x files. Most 3D packages can export these natively + * and there are several tools for them available, e.g. + * the Maya exporter included in the DX SDK. + * .x files can include skeletal animations and Irrlicht + * is able to play and display them, users can manipulate + * the joints via the ISkinnedMesh interface. Currently, + * Irrlicht only supports uncompressed .x files.
Half-Life model (.mdl)This loader opens Half-life 1 models, it was contributed + * by Fabio Concas and adapted by Thomas Alten.
Irrlicht Mesh (.irrMesh)This is a static mesh format written in XML, native + * to Irrlicht and written by the irr mesh writer. + * This format is exported by the CopperCube engine's + * lightmapper.
LightWave (.lwo)Native to NewTek's LightWave 3D, the LWO format is well + * known and supported by many exporters. This loader will + * import LWO2 models including lightmaps, bumpmaps and + * reflection textures.
Maya (.obj)Most 3D software can create .obj files which contain + * static geometry without material data. The material + * files .mtl are also supported. This importer for + * Irrlicht can load them directly.
Milkshape (.ms3d).MS3D files contain models and sometimes skeletal + * animations from the Milkshape 3D modeling and animation + * software. Like the other skeletal mesh loaders, oints + * are exposed via the ISkinnedMesh animated mesh type.
My3D (.my3d).my3D is a flexible 3D file format. The My3DTools + * contains plug-ins to export .my3D files from several + * 3D packages. With this built-in importer, Irrlicht + * can read and display those files directly. This + * loader was written by Zhuck Dimitry who also created + * the whole My3DTools package. If you are using this + * loader, please note that you can set the path of the + * textures before loading .my3d files. You can do this + * using + * SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, + * "path/to/your/textures"); + *
OCT (.oct)The oct file format contains 3D geometry and + * lightmaps and can be loaded directly by Irrlicht. OCT + * files
can be created by FSRad, Paul Nette's + * radiosity processor or exported from Blender using + * OCTTools which can be found in the exporters/OCTTools + * directory of the SDK. Thanks to Murphy McCauley for + * creating all this.
OGRE Meshes (.mesh)Ogre .mesh files contain 3D data for the OGRE 3D + * engine. Irrlicht can read and display them directly + * with this importer. To define materials for the mesh, + * copy a .material file named like the corresponding + * .mesh file where the .mesh file is. (For example + * ogrehead.material for ogrehead.mesh). Thanks to + * Christian Stehno who wrote and contributed this + * loader.
Pulsar LMTools (.lmts)LMTools is a set of tools (Windows & Linux) for + * creating lightmaps. Irrlicht can directly read .lmts + * files thanks to
the importer created by Jonas + * Petersen. If you are using this loader, please note + * that you can set the path of the textures before + * loading .lmts files. You can do this using + * SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, + * "path/to/your/textures"); + * Notes for
this version of the loader:
+ * - It does not recognise/support user data in the + * *.lmts files.
+ * - The TGAs generated by LMTools don't work in + * Irrlicht for some reason (the textures are upside + * down). Opening and resaving them in a graphics app + * will solve the problem.
Quake 3 levels (.bsp)Quake 3 is a popular game by IDSoftware, and .pk3 + * files contain .bsp files and textures/lightmaps + * describing huge prelighted levels. Irrlicht can read + * .pk3 and .bsp files directly and thus render Quake 3 + * levels directly. Written by Nikolaus Gebhardt + * enhanced by Dean P. Macri with the curved surfaces + * feature.
Quake 2 models (.md2)Quake 2 models are characters with morph target + * animation. Irrlicht can read, display and animate + * them directly with this importer.
Quake 3 models (.md3)Quake 3 models are characters with morph target + * animation, they contain mount points for weapons and body + * parts and are typically made of several sections which are + * manually joined together.
Stanford Triangle (.ply)Invented by Stanford University and known as the native + * format of the infamous "Stanford Bunny" model, this is a + * popular static mesh format used by 3D scanning hardware + * and software. This loader supports extremely large models + * in both ASCII and binary format, but only has rudimentary + * material support in the form of vertex colors and texture + * coordinates.
Stereolithography (.stl)The STL format is used for rapid prototyping and + * computer-aided manufacturing, thus has no support for + * materials.
+ * + * To load and display a mesh quickly, just do this: + * \code + * SceneManager->addAnimatedMeshSceneNode( + * SceneManager->getMesh("yourmesh.3ds")); + * \endcode + * If you would like to implement and add your own file format loader to Irrlicht, + * see addExternalMeshLoader(). + * \param filename: Filename of the mesh to load. + * \return Null if failed, otherwise pointer to the mesh. + * This pointer should not be dropped. See IReferenceCounted::drop() for more information. + **/ + virtual IAnimatedMesh* getMesh(const io::path& filename) = 0; + + //! Get pointer to an animateable mesh. Loads the file if not loaded already. + /** Works just as getMesh(const char* filename). If you want to + remove a loaded mesh from the cache again, use removeMesh(). + \param file File handle of the mesh to load. + \return NULL if failed and pointer to the mesh if successful. + This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0; + + //! Get interface to the mesh cache which is shared beween all existing scene managers. + /** With this interface, it is possible to manually add new loaded + meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate + through already loaded meshes. */ + virtual IMeshCache* getMeshCache() = 0; + + //! Get the video driver. + /** \return Pointer to the video Driver. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual video::IVideoDriver* getVideoDriver() = 0; + + //! Get the active GUIEnvironment + /** \return Pointer to the GUIEnvironment + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual gui::IGUIEnvironment* getGUIEnvironment() = 0; + + //! Get the active FileSystem + /** \return Pointer to the FileSystem + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual io::IFileSystem* getFileSystem() = 0; + + //! adds Volume Lighting Scene Node. + /** Example Usage: + scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1, + 32, 32, //Subdivide U/V + video::SColor(0, 180, 180, 180), //foot color + video::SColor(0, 0, 0, 0) //tail color + ); + if (n) + { + n->setScale(core::vector3df(46.0f, 45.0f, 46.0f)); + n->getMaterial(0).setTexture(0, smgr->getVideoDriver()->getTexture("lightFalloff.png")); + } + \return Pointer to the volumeLight if successful, otherwise NULL. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1, + const u32 subdivU = 32, const u32 subdivV = 32, + const video::SColor foot = video::SColor(51, 0, 230, 180), + const video::SColor tail = video::SColor(0, 0, 0, 0), + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; + + //! Adds a cube scene node + /** \param size: Size of the cube, uniformly in each dimension. + \param parent: Parent of the scene node. Can be 0 if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: Position of the space relative to its parent + where the scene node will be placed. + \param rotation: Initital rotation of the scene node. + \param scale: Initial scale of the scene node. + \return Pointer to the created test scene node. This + pointer should not be dropped. See IReferenceCounted::drop() + for more information. */ + virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; + + //! Adds a sphere scene node of the given radius and detail + /** \param radius: Radius of the sphere. + \param polyCount: The number of vertices in horizontal and + vertical direction. The total polyCount of the sphere is + polyCount*polyCount. This parameter must be less than 256 to + stay within the 16-bit limit of the indices of a meshbuffer. + \param parent: Parent of the scene node. Can be 0 if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: Position of the space relative to its parent + where the scene node will be placed. + \param rotation: Initital rotation of the scene node. + \param scale: Initial scale of the scene node. + \return Pointer to the created test scene node. This + pointer should not be dropped. See IReferenceCounted::drop() + for more information. */ + virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; + + //! Adds a scene node for rendering an animated mesh model. + /** \param mesh: Pointer to the loaded animated mesh to be displayed. + \param parent: Parent of the scene node. Can be NULL if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: Position of the space relative to its parent where the + scene node will be placed. + \param rotation: Initital rotation of the scene node. + \param scale: Initial scale of the scene node. + \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. + \return Pointer to the created scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f), + bool alsoAddIfMeshPointerZero=false) = 0; + + //! Adds a scene node for rendering a static mesh. + /** \param mesh: Pointer to the loaded static mesh to be displayed. + \param parent: Parent of the scene node. Can be NULL if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: Position of the space relative to its parent where the + scene node will be placed. + \param rotation: Initital rotation of the scene node. + \param scale: Initial scale of the scene node. + \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. + \return Pointer to the created scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f), + bool alsoAddIfMeshPointerZero=false) = 0; + + //! Adds a scene node for rendering a animated water surface mesh. + /** Looks really good when the Material type EMT_TRANSPARENT_REFLECTION + is used. + \param waveHeight: Height of the water waves. + \param waveSpeed: Speed of the water waves. + \param waveLength: Lenght of a water wave. + \param mesh: Pointer to the loaded static mesh to be displayed with water waves on it. + \param parent: Parent of the scene node. Can be NULL if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: Position of the space relative to its parent where the + scene node will be placed. + \param rotation: Initital rotation of the scene node. + \param scale: Initial scale of the scene node. + \return Pointer to the created scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addWaterSurfaceSceneNode(IMesh* mesh, + f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; + + + //! Adds a scene node for rendering using a octree to the scene graph. + /** This a good method for rendering + scenes with lots of geometry. The Octree is built on the fly from the mesh. + \param mesh: The mesh containing all geometry from which the octree will be build. + If this animated mesh has more than one frames in it, the first frame is taken. + \param parent: Parent node of the octree node. + \param id: id of the node. This id can be used to identify the node. + \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node. + If a node gets less polys than this value it will not be split into + smaller nodes. + \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. + \return Pointer to the Octree if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IMeshSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0; + + //! Adds a scene node for rendering using a octree to the scene graph. + /** \deprecated Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9. */ + _IRR_DEPRECATED_ IMeshSceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) + { + return addOctreeSceneNode(mesh, parent, id, minimalPolysPerNode, alsoAddIfMeshPointerZero); + } + + //! Adds a scene node for rendering using a octree to the scene graph. + /** This a good method for rendering scenes with lots of + geometry. The Octree is built on the fly from the mesh, much + faster then a bsp tree. + \param mesh: The mesh containing all geometry from which the octree will be build. + \param parent: Parent node of the octree node. + \param id: id of the node. This id can be used to identify the node. + \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node. + If a node gets less polys than this value it will not be split into + smaller nodes. + \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. + \return Pointer to the octree if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IMeshSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; + + //! Adds a scene node for rendering using a octree to the scene graph. + /** \deprecated Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9. */ + _IRR_DEPRECATED_ IMeshSceneNode* addOctTreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) + { + return addOctreeSceneNode(mesh, parent, id, minimalPolysPerNode, alsoAddIfMeshPointerZero); + } + + //! Adds a camera scene node to the scene graph and sets it as active camera. + /** This camera does not react on user input like for example the one created with + addCameraSceneNodeFPS(). If you want to move or animate it, use animators or the + ISceneNode::setPosition(), ICameraSceneNode::setTarget() etc methods. + By default, a camera's look at position (set with setTarget()) and its scene node + rotation (set with setRotation()) are independent. If you want to be able to + control the direction that the camera looks by using setRotation() then call + ICameraSceneNode::bindTargetAndRotation(true) on it. + \param position: Position of the space relative to its parent where the camera will be placed. + \param lookat: Position where the camera will look at. Also known as target. + \param parent: Parent scene node of the camera. Can be null. If the parent moves, + the camera will move too. + \param id: id of the camera. This id can be used to identify the camera. + \param makeActive Flag whether this camera should become the active one. + Make sure you always have one active camera. + \return Pointer to interface to camera if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& lookat = core::vector3df(0,0,100), + s32 id=-1, bool makeActive=true) = 0; + + //! Adds a maya style user controlled camera scene node to the scene graph. + /** This is a standard camera with an animator that provides mouse control similar + to camera in the 3D Software Maya by Alias Wavefront. + The camera does not react on setPosition anymore after applying this animator. Instead + use setTarget, to fix the target the camera the camera hovers around. And setDistance + to set the current distance from that target, i.e. the radius of the orbit the camera + hovers on. + \param parent: Parent scene node of the camera. Can be null. + \param rotateSpeed: Rotation speed of the camera. + \param zoomSpeed: Zoom speed of the camera. + \param translationSpeed: TranslationSpeed of the camera. + \param id: id of the camera. This id can be used to identify the camera. + \param distance Initial distance of the camera from the object + \param makeActive Flag whether this camera should become the active one. + Make sure you always have one active camera. + \return Returns a pointer to the interface of the camera if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent=0, + f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f, + f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f, + bool makeActive=true) =0; + + //! Adds a camera scene node with an animator which provides mouse and keyboard control appropriate for first person shooters (FPS). + /** This FPS camera is intended to provide a demonstration of a + camera that behaves like a typical First Person Shooter. It is + useful for simple demos and prototyping but is not intended to + provide a full solution for a production quality game. It binds + the camera scene node rotation to the look-at target; @see + ICameraSceneNode::bindTargetAndRotation(). With this camera, + you look with the mouse, and move with cursor keys. If you want + to change the key layout, you can specify your own keymap. For + example to make the camera be controlled by the cursor keys AND + the keys W,A,S, and D, do something like this: + \code + SKeyMap keyMap[8]; + keyMap[0].Action = EKA_MOVE_FORWARD; + keyMap[0].KeyCode = KEY_UP; + keyMap[1].Action = EKA_MOVE_FORWARD; + keyMap[1].KeyCode = KEY_KEY_W; + + keyMap[2].Action = EKA_MOVE_BACKWARD; + keyMap[2].KeyCode = KEY_DOWN; + keyMap[3].Action = EKA_MOVE_BACKWARD; + keyMap[3].KeyCode = KEY_KEY_S; + + keyMap[4].Action = EKA_STRAFE_LEFT; + keyMap[4].KeyCode = KEY_LEFT; + keyMap[5].Action = EKA_STRAFE_LEFT; + keyMap[5].KeyCode = KEY_KEY_A; + + keyMap[6].Action = EKA_STRAFE_RIGHT; + keyMap[6].KeyCode = KEY_RIGHT; + keyMap[7].Action = EKA_STRAFE_RIGHT; + keyMap[7].KeyCode = KEY_KEY_D; + + camera = sceneManager->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8); + \endcode + \param parent: Parent scene node of the camera. Can be null. + \param rotateSpeed: Speed in degress with which the camera is + rotated. This can be done only with the mouse. + \param moveSpeed: Speed in units per millisecond with which + the camera is moved. Movement is done with the cursor keys. + \param id: id of the camera. This id can be used to identify + the camera. + \param keyMapArray: Optional pointer to an array of a keymap, + specifying what keys should be used to move the camera. If this + is null, the default keymap is used. You can define actions + more then one time in the array, to bind multiple keys to the + same action. + \param keyMapSize: Amount of items in the keymap array. + \param noVerticalMovement: Setting this to true makes the + camera only move within a horizontal plane, and disables + vertical movement as known from most ego shooters. Default is + 'false', with which it is possible to fly around in space, if + no gravity is there. + \param jumpSpeed: Speed with which the camera is moved when + jumping. + \param invertMouse: Setting this to true makes the camera look + up when the mouse is moved down and down when the mouse is + moved up, the default is 'false' which means it will follow the + movement of the mouse cursor. + \param makeActive Flag whether this camera should become the active one. + Make sure you always have one active camera. + \return Pointer to the interface of the camera if successful, + otherwise 0. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1, + SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, + f32 jumpSpeed = 0.f, bool invertMouse=false, + bool makeActive=true) = 0; + + //! Adds a dynamic light scene node to the scene graph. + /** The light will cast dynamic light on all + other scene nodes in the scene, which have the material flag video::MTF_LIGHTING + turned on. (This is the default setting in most scene nodes). + \param parent: Parent scene node of the light. Can be null. If the parent moves, + the light will move too. + \param position: Position of the space relative to its parent where the light will be placed. + \param color: Diffuse color of the light. Ambient or Specular colors can be set manually with + the ILightSceneNode::getLightData() method. + \param radius: Radius of the light. + \param id: id of the node. This id can be used to identify the node. + \return Pointer to the interface of the light if successful, otherwise NULL. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0, + const core::vector3df& position = core::vector3df(0,0,0), + video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f), + f32 radius=100.0f, s32 id=-1) = 0; + + //! Adds a billboard scene node to the scene graph. + /** A billboard is like a 3d sprite: A 2d element, + which always looks to the camera. It is usually used for things + like explosions, fire, lensflares and things like that. + \param parent Parent scene node of the billboard. Can be null. + If the parent moves, the billboard will move too. + \param size Size of the billboard. This size is 2 dimensional + because a billboard only has width and height. + \param position Position of the space relative to its parent + where the billboard will be placed. + \param id An id of the node. This id can be used to identify + the node. + \param colorTop The color of the vertices at the top of the + billboard (default: white). + \param colorBottom The color of the vertices at the bottom of + the billboard (default: white). + \return Pointer to the billboard if successful, otherwise NULL. + This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0, + const core::dimension2d& size = core::dimension2d(10.0f, 10.0f), + const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, + video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0; + + //! Adds a skybox scene node to the scene graph. + /** A skybox is a big cube with 6 textures on it and + is drawn around the camera position. + \param top: Texture for the top plane of the box. + \param bottom: Texture for the bottom plane of the box. + \param left: Texture for the left plane of the box. + \param right: Texture for the right plane of the box. + \param front: Texture for the front plane of the box. + \param back: Texture for the back plane of the box. + \param parent: Parent scene node of the skybox. A skybox usually has no parent, + so this should be null. Note: If a parent is set to the skybox, the box will not + change how it is drawn. + \param id: An id of the node. This id can be used to identify the node. + \return Pointer to the sky box if successful, otherwise NULL. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom, + video::ITexture* left, video::ITexture* right, video::ITexture* front, + video::ITexture* back, ISceneNode* parent = 0, s32 id=-1) = 0; + + //! Adds a skydome scene node to the scene graph. + /** A skydome is a large (half-) sphere with a panoramic texture + on the inside and is drawn around the camera position. + \param texture: Texture for the dome. + \param horiRes: Number of vertices of a horizontal layer of the sphere. + \param vertRes: Number of vertices of a vertical layer of the sphere. + \param texturePercentage: How much of the height of the + texture is used. Should be between 0 and 1. + \param spherePercentage: How much of the sphere is drawn. + Value should be between 0 and 2, where 1 is an exact + half-sphere and 2 is a full sphere. + \param radius The Radius of the sphere + \param parent: Parent scene node of the dome. A dome usually has no parent, + so this should be null. Note: If a parent is set, the dome will not + change how it is drawn. + \param id: An id of the node. This id can be used to identify the node. + \return Pointer to the sky dome if successful, otherwise NULL. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture, + u32 horiRes=16, u32 vertRes=8, + f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f, + ISceneNode* parent=0, s32 id=-1) = 0; + + //! Adds a particle system scene node to the scene graph. + /** \param withDefaultEmitter: Creates a default working point emitter + which emitts some particles. Set this to true to see a particle system + in action. If set to false, you'll have to set the emitter you want by + calling IParticleSystemSceneNode::setEmitter(). + \param parent: Parent of the scene node. Can be NULL if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: Position of the space relative to its parent where the + scene node will be placed. + \param rotation: Initital rotation of the scene node. + \param scale: Initial scale of the scene node. + \return Pointer to the created scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IParticleSystemSceneNode* addParticleSystemSceneNode( + bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; + + //! Adds a terrain scene node to the scene graph. + /** This node implements is a simple terrain renderer which uses + a technique known as geo mip mapping + for reducing the detail of triangle blocks which are far away. + The code for the TerrainSceneNode is based on the terrain + renderer by Soconne and the GeoMipMapSceneNode developed by + Spintz. They made their code available for Irrlicht and allowed + it to be distributed under this licence. I only modified some + parts. A lot of thanks go to them. + + This scene node is capable of loading terrains and updating + the indices at runtime to enable viewing very large terrains + very quickly. It uses a CLOD (Continuous Level of Detail) + algorithm which updates the indices for each patch based on + a LOD (Level of Detail) which is determined based on a patch's + distance from the camera. + + The patch size of the terrain must always be a size of 2^N+1, + i.e. 8+1(9), 16+1(17), etc. + The MaxLOD available is directly dependent on the patch size + of the terrain. LOD 0 contains all of the indices to draw all + the triangles at the max detail for a patch. As each LOD goes + up by 1 the step taken, in generating indices increases by + -2^LOD, so for LOD 1, the step taken is 2, for LOD 2, the step + taken is 4, LOD 3 - 8, etc. The step can be no larger than + the size of the patch, so having a LOD of 8, with a patch size + of 17, is asking the algoritm to generate indices every 2^8 ( + 256 ) vertices, which is not possible with a patch size of 17. + The maximum LOD for a patch size of 17 is 2^4 ( 16 ). So, + with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 ( + every 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every + 8 vertices ) and LOD 4 ( every 16 vertices ). + \param heightMapFileName: The name of the file on disk, to read vertex data from. This should + be a gray scale bitmap. + \param parent: Parent of the scene node. Can be 0 if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: The absolute position of this node. + \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED ) + \param scale: The scale factor for the terrain. If you're + using a heightmap of size 129x129 and would like your terrain + to be 12900x12900 in game units, then use a scale factor of ( + core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y + scaling factor of 0.0f, then your terrain will be flat. + \param vertexColor: The default color of all the vertices. If no texture is associated + with the scene node, then all vertices will be this color. Defaults to white. + \param maxLOD: The maximum LOD (level of detail) for the node. Only change if you + know what you are doing, this might lead to strange behavior. + \param patchSize: patch size of the terrain. Only change if you + know what you are doing, this might lead to strange behavior. + \param smoothFactor: The number of times the vertices are smoothed. + \param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap. + \return Pointer to the created scene node. Can be null + if the terrain could not be created, for example because the + heightmap could not be loaded. The returned pointer should + not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual ITerrainSceneNode* addTerrainSceneNode( + const io::path& heightMapFileName, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, + bool addAlsoIfHeightmapEmpty = false) = 0; + + //! Adds a terrain scene node to the scene graph. + /** Just like the other addTerrainSceneNode() method, but takes an IReadFile + pointer as parameter for the heightmap. For more informations take a look + at the other function. + \param heightMapFile: The file handle to read vertex data from. This should + be a gray scale bitmap. + \param parent: Parent of the scene node. Can be 0 if no parent. + \param id: Id of the node. This id can be used to identify the scene node. + \param position: The absolute position of this node. + \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED ) + \param scale: The scale factor for the terrain. If you're + using a heightmap of size 129x129 and would like your terrain + to be 12900x12900 in game units, then use a scale factor of ( + core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y + scaling factor of 0.0f, then your terrain will be flat. + \param vertexColor: The default color of all the vertices. If no texture is associated + with the scene node, then all vertices will be this color. Defaults to white. + \param maxLOD: The maximum LOD (level of detail) for the node. Only change if you + know what you are doing, this might lead to strange behavior. + \param patchSize: patch size of the terrain. Only change if you + know what you are doing, this might lead to strange behavior. + \param smoothFactor: The number of times the vertices are smoothed. + \param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap. + \return Pointer to the created scene node. Can be null + if the terrain could not be created, for example because the + heightmap could not be loaded. The returned pointer should + not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual ITerrainSceneNode* addTerrainSceneNode( + io::IReadFile* heightMapFile, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, + bool addAlsoIfHeightmapEmpty = false) = 0; + + //! Adds a quake3 scene node to the scene graph. + /** A Quake3 Scene renders multiple meshes for a specific HighLanguage Shader (Quake3 Style ) + \return Pointer to the quake3 scene node if successful, otherwise NULL. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader, + ISceneNode* parent=0, s32 id=-1 + ) = 0; + + + //! Adds an empty scene node to the scene graph. + /** Can be used for doing advanced transformations + or structuring the scene graph. + \return Pointer to the created scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0; + + //! Adds a dummy transformation scene node to the scene graph. + /** This scene node does not render itself, and does not respond to set/getPosition, + set/getRotation and set/getScale. Its just a simple scene node that takes a + matrix as relative transformation, making it possible to insert any transformation + anywhere into the scene graph. + \return Pointer to the created scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IDummyTransformationSceneNode* addDummyTransformationSceneNode( + ISceneNode* parent=0, s32 id=-1) = 0; + + //! Adds a text scene node, which is able to display 2d text at a position in three dimensional space + virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text, + video::SColor color=video::SColor(100,255,255,255), + ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0), + s32 id=-1) = 0; + + //! Adds a text scene node, which uses billboards. The node, and the text on it, will scale with distance. + /** + \param font The font to use on the billboard. Pass 0 to use the GUI environment's default font. + \param text The text to display on the billboard. + \param parent The billboard's parent. Pass 0 to use the root scene node. + \param size The billboard's width and height. + \param position The billboards position relative to its parent. + \param id: An id of the node. This id can be used to identify the node. + \param colorTop: The color of the vertices at the top of the billboard (default: white). + \param colorBottom: The color of the vertices at the bottom of the billboard (default: white). + \return Pointer to the billboard if successful, otherwise NULL. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text, + ISceneNode* parent = 0, + const core::dimension2d& size = core::dimension2d(10.0f, 10.0f), + const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, + video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0; + + //! Adds a Hill Plane mesh to the mesh pool. + /** The mesh is generated on the fly + and looks like a plane with some hills on it. It is uses mostly for quick + tests of the engine only. You can specify how many hills there should be + on the plane and how high they should be. Also you must specify a name for + the mesh, because the mesh is added to the mesh pool, and can be retrieved + again using ISceneManager::getMesh() with the name as parameter. + \param name: The name of this mesh which must be specified in order + to be able to retrieve the mesh later with ISceneManager::getMesh(). + \param tileSize: Size of a tile of the mesh. (10.0f, 10.0f) would be a + good value to start, for example. + \param tileCount: Specifies how much tiles there will be. If you specifiy + for example that a tile has the size (10.0f, 10.0f) and the tileCount is + (10,10), than you get a field of 100 tiles which has the dimension 100.0fx100.0f. + \param material: Material of the hill mesh. + \param hillHeight: Height of the hills. If you specify a negative value + you will get holes instead of hills. If the height is 0, no hills will be + created. + \param countHills: Amount of hills on the plane. There will be countHills.X + hills along the X axis and countHills.Y along the Y axis. So in total there + will be countHills.X * countHills.Y hills. + \param textureRepeatCount: Defines how often the texture will be repeated in + x and y direction. + return Null if the creation failed. The reason could be that you + specified some invalid parameters or that a mesh with that name already + exists. If successful, a pointer to the mesh is returned. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name, + const core::dimension2d& tileSize, const core::dimension2d& tileCount, + video::SMaterial* material = 0, f32 hillHeight = 0.0f, + const core::dimension2d& countHills = core::dimension2d(0.0f, 0.0f), + const core::dimension2d& textureRepeatCount = core::dimension2d(1.0f, 1.0f)) = 0; + + //! Adds a static terrain mesh to the mesh pool. + /** The mesh is generated on the fly + from a texture file and a height map file. Both files may be huge + (8000x8000 pixels would be no problem) because the generator splits the + files into smaller textures if necessary. + You must specify a name for the mesh, because the mesh is added to the mesh pool, + and can be retrieved again using ISceneManager::getMesh() with the name as parameter. + \param meshname: The name of this mesh which must be specified in order + to be able to retrieve the mesh later with ISceneManager::getMesh(). + \param texture: Texture for the terrain. Please note that this is not a + hardware texture as usual (ITexture), but an IImage software texture. + You can load this texture with IVideoDriver::createImageFromFile(). + \param heightmap: A grayscaled heightmap image. Like the texture, + it can be created with IVideoDriver::createImageFromFile(). The amount + of triangles created depends on the size of this texture, so use a small + heightmap to increase rendering speed. + \param stretchSize: Parameter defining how big a is pixel on the heightmap. + \param maxHeight: Defines how high a white pixel on the heighmap is. + \param defaultVertexBlockSize: Defines the initial dimension between vertices. + \return Null if the creation failed. The reason could be that you + specified some invalid parameters, that a mesh with that name already + exists, or that a texture could not be found. If successful, a pointer to the mesh is returned. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname, + video::IImage* texture, video::IImage* heightmap, + const core::dimension2d& stretchSize = core::dimension2d(10.0f,10.0f), + f32 maxHeight=200.0f, + const core::dimension2d& defaultVertexBlockSize = core::dimension2d(64,64)) = 0; + + //! add a static arrow mesh to the meshpool + /** \param name Name of the mesh + \param vtxColorCylinder color of the cylinder + \param vtxColorCone color of the cone + \param tesselationCylinder Number of quads the cylinder side consists of + \param tesselationCone Number of triangles the cone's roof consits of + \param height Total height of the arrow + \param cylinderHeight Total height of the cylinder, should be lesser than total height + \param widthCylinder Diameter of the cylinder + \param widthCone Diameter of the cone's base, should be not smaller than the cylinder's diameter + \return Pointer to the arrow mesh if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh* addArrowMesh(const io::path& name, + video::SColor vtxColorCylinder=0xFFFFFFFF, + video::SColor vtxColorCone=0xFFFFFFFF, + u32 tesselationCylinder=4, u32 tesselationCone=8, + f32 height=1.f, f32 cylinderHeight=0.6f, + f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0; + + //! add a static sphere mesh to the meshpool + /** \param name Name of the mesh + \param radius Radius of the sphere + \param polyCountX Number of quads used for the horizontal tiling + \param polyCountY Number of quads used for the vertical tiling + \return Pointer to the sphere mesh if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IAnimatedMesh* addSphereMesh(const io::path& name, + f32 radius=5.f, u32 polyCountX = 16, + u32 polyCountY = 16) = 0; + + //! Add a volume light mesh to the meshpool + /** \param name Name of the mesh + \param SubdivideU Horizontal subdivision count + \param SubdivideV Vertical subdivision count + \param FootColor Color of the bottom of the light + \param TailColor Color of the top of the light + \return Pointer to the volume light mesh if successful, otherwise 0. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. + */ + virtual IAnimatedMesh* addVolumeLightMesh(const io::path& name, + const u32 SubdivideU = 32, const u32 SubdivideV = 32, + const video::SColor FootColor = video::SColor(51, 0, 230, 180), + const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0; + + //! Gets the root scene node. + /** This is the scene node which is parent + of all scene nodes. The root scene node is a special scene node which + only exists to manage all scene nodes. It will not be rendered and cannot + be removed from the scene. + \return Pointer to the root scene node. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* getRootSceneNode() = 0; + + //! Get the first scene node with the specified id. + /** \param id: The id to search for + \param start: Scene node to start from. All children of this scene + node are searched. If null is specified, the root scene node is + taken. + \return Pointer to the first scene node with this id, + and null if no scene node could be found. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0; + + //! Get the first scene node with the specified name. + /** \param name: The name to search for + \param start: Scene node to start from. All children of this scene + node are searched. If null is specified, the root scene node is + taken. + \return Pointer to the first scene node with this id, + and null if no scene node could be found. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0; + + //! Get the first scene node with the specified type. + /** \param type: The type to search for + \param start: Scene node to start from. All children of this scene + node are searched. If null is specified, the root scene node is + taken. + \return Pointer to the first scene node with this type, + and null if no scene node could be found. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start=0) = 0; + + //! Get scene nodes by type. + /** \param type: Type of scene node to find (ESNT_ANY will return all child nodes). + \param outNodes: array to be filled with results. + \param start: Scene node to start from. All children of this scene + node are searched. If null is specified, the root scene node is + taken. */ + virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type, + core::array& outNodes, + ISceneNode* start=0) = 0; + + //! Get the current active camera. + /** \return The active camera is returned. Note that this can + be NULL, if there was no camera created yet. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ICameraSceneNode* getActiveCamera() const =0; + + //! Sets the currently active camera. + /** The previous active camera will be deactivated. + \param camera: The new camera which should be active. */ + virtual void setActiveCamera(ICameraSceneNode* camera) = 0; + + //! Sets the color of stencil buffers shadows drawn by the scene manager. + virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0; + + //! Get the current color of shadows. + virtual video::SColor getShadowColor() const = 0; + + //! Registers a node for rendering it at a specific time. + /** This method should only be used by SceneNodes when they get a + ISceneNode::OnRegisterSceneNode() call. + \param node: Node to register for drawing. Usually scene nodes would set 'this' + as parameter here because they want to be drawn. + \param pass: Specifies when the node wants to be drawn in relation to the other nodes. + For example, if the node is a shadow, it usually wants to be drawn after all other nodes + and will use ESNRP_SHADOW for this. See scene::E_SCENE_NODE_RENDER_PASS for details. + \return scene will be rendered ( passed culling ) */ + virtual u32 registerNodeForRendering(ISceneNode* node, + E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC) = 0; + + //! Draws all the scene nodes. + /** This can only be invoked between + IVideoDriver::beginScene() and IVideoDriver::endScene(). Please note that + the scene is not only drawn when calling this, but also animated + by existing scene node animators, culling of scene nodes is done, etc. */ + virtual void drawAll() = 0; + + //! Creates a rotation animator, which rotates the attached scene node around itself. + /** \param rotationSpeed Specifies the speed of the animation in degree per 10 milliseconds. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + and the animator will animate it. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationSpeed) = 0; + + //! Creates a fly circle animator, which lets the attached scene node fly around a center. + /** \param center: Center of the circle. + \param radius: Radius of the circle. + \param speed: The orbital speed, in radians per millisecond. + \param direction: Specifies the upvector used for alignment of the mesh. + \param startPosition: The position on the circle where the animator will + begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase) + \param radiusEllipsoid: if radiusEllipsoid != 0 then radius2 froms a ellipsoid + begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase) + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + and the animator will animate it. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimator* createFlyCircleAnimator( + const core::vector3df& center=core::vector3df(0.f,0.f,0.f), + f32 radius=100.f, f32 speed=0.001f, + const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f), + f32 startPosition = 0.f, + f32 radiusEllipsoid = 0.f) = 0; + + //! Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points. + /** \param startPoint: Start point of the line. + \param endPoint: End point of the line. + \param timeForWay: Time in milli seconds how long the node should need to + move from the start point to the end point. + \param loop: If set to false, the node stops when the end point is reached. + If loop is true, the node begins again at the start. + \param pingpong Flag to set whether the animator should fly + back from end to start again. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + and the animator will animate it. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint, + const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0; + + //! Creates a texture animator, which switches the textures of the target scene node based on a list of textures. + /** \param textures: List of textures to use. + \param timePerFrame: Time in milliseconds, how long any texture in the list + should be visible. + \param loop: If set to to false, the last texture remains set, and the animation + stops. If set to true, the animation restarts with the first texture. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + and the animator will animate it. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimator* createTextureAnimator(const core::array& textures, + s32 timePerFrame, bool loop=true) = 0; + + //! Creates a scene node animator, which deletes the scene node after some time automatically. + /** \param timeMs: Time in milliseconds, after when the node will be deleted. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + and the animator will animate it. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMs) = 0; + + //! Creates a special scene node animator for doing automatic collision detection and response. + /** See ISceneNodeAnimatorCollisionResponse for details. + \param world: Triangle selector holding all triangles of the world with which + the scene node may collide. You can create a triangle selector with + ISceneManager::createTriangleSelector(); + \param sceneNode: SceneNode which should be manipulated. After you added this animator + to the scene node, the scene node will not be able to move through walls and is + affected by gravity. If you need to teleport the scene node to a new position without + it being effected by the collision geometry, then call sceneNode->setPosition(); then + animator->setTargetNode(sceneNode); + \param ellipsoidRadius: Radius of the ellipsoid with which collision detection and + response is done. If you have got a scene node, and you are unsure about + how big the radius should be, you could use the following code to determine + it: + \code + const core::aabbox3d& box = yourSceneNode->getBoundingBox(); + core::vector3df radius = box.MaxEdge - box.getCenter(); + \endcode + \param gravityPerSecond: Sets the gravity of the environment, as an acceleration in + units per second per second. If your units are equivalent to metres, then + core::vector3df(0,-10.0f,0) would give an approximately realistic gravity. + You can disable gravity by setting it to core::vector3df(0,0,0). + \param ellipsoidTranslation: By default, the ellipsoid for collision detection is created around + the center of the scene node, which means that the ellipsoid surrounds + it completely. If this is not what you want, you may specify a translation + for the ellipsoid. + \param slidingValue: DOCUMENTATION NEEDED. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + and the animator will cause it to do collision detection and response. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator( + ITriangleSelector* world, ISceneNode* sceneNode, + const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30), + const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0), + const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0), + f32 slidingValue = 0.0005f) = 0; + + //! Creates a follow spline animator. + /** The animator modifies the position of + the attached scene node to make it follow a hermite spline. + It uses a subset of hermite splines: either cardinal splines + (tightness != 0.5) or catmull-rom-splines (tightness == 0.5). + The animator moves from one control point to the next in + 1/speed seconds. This code was sent in by Matthias Gall. + If you no longer need the animator, you should call ISceneNodeAnimator::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, + const core::array< core::vector3df >& points, + f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false) = 0; + + //! Creates a simple ITriangleSelector, based on a mesh. + /** Triangle selectors + can be used for doing collision detection. Don't use this selector + for a huge amount of triangles like in Quake3 maps. + Instead, use for example ISceneManager::createOctreeTriangleSelector(). + Please note that the created triangle selector is not automaticly attached + to the scene node. You will have to call ISceneNode::setTriangleSelector() + for this. To create and attach a triangle selector is done like this: + \code + ITriangleSelector* s = sceneManager->createTriangleSelector(yourMesh, + yourSceneNode); + yourSceneNode->setTriangleSelector(s); + s->drop(); + \endcode + \param mesh: Mesh of which the triangles are taken. + \param node: Scene node of which visibility and transformation is used. + \return The selector, or null if not successful. + If you no longer need the selector, you should call ITriangleSelector::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node) = 0; + + //! Creates a simple ITriangleSelector, based on an animated mesh scene node. + /** Details of the mesh associated with the node will be extracted internally. + Call ITriangleSelector::update() to have the triangle selector updated based + on the current frame of the animated mesh scene node. + \param node The animated mesh scene node from which to build the selector + */ + virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node) = 0; + + + //! Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box. + /** Triangle selectors + can be used for doing collision detection. Every time when triangles are + queried, the triangle selector gets the bounding box of the scene node, + an creates new triangles. In this way, it works good with animated scene nodes. + \param node: Scene node of which the bounding box, visibility and transformation is used. + \return The selector, or null if not successful. + If you no longer need the selector, you should call ITriangleSelector::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ITriangleSelector* createTriangleSelectorFromBoundingBox(ISceneNode* node) = 0; + + //! Creates a Triangle Selector, optimized by an octree. + /** Triangle selectors + can be used for doing collision detection. This triangle selector is + optimized for huge amounts of triangle, it organizes them in an octree. + Please note that the created triangle selector is not automaticly attached + to the scene node. You will have to call ISceneNode::setTriangleSelector() + for this. To create and attach a triangle selector is done like this: + \code + ITriangleSelector* s = sceneManager->createOctreeTriangleSelector(yourMesh, + yourSceneNode); + yourSceneNode->setTriangleSelector(s); + s->drop(); + \endcode + For more informations and examples on this, take a look at the collision + tutorial in the SDK. + \param mesh: Mesh of which the triangles are taken. + \param node: Scene node of which visibility and transformation is used. + \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node. + If a node gets less polys the this value, it will not be splitted into + smaller nodes. + \return The selector, or null if not successful. + If you no longer need the selector, you should call ITriangleSelector::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode=32) = 0; + + //! //! Creates a Triangle Selector, optimized by an octree. + /** \deprecated Use createOctreeTriangleSelector instead. This method may be removed by Irrlicht 1.9. */ + _IRR_DEPRECATED_ ITriangleSelector* createOctTreeTriangleSelector(IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode=32) + { + return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode); + } + + //! Creates a meta triangle selector. + /** A meta triangle selector is nothing more than a + collection of one or more triangle selectors providing together + the interface of one triangle selector. In this way, + collision tests can be done with different triangle soups in one pass. + \return The selector, or null if not successful. + If you no longer need the selector, you should call ITriangleSelector::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IMetaTriangleSelector* createMetaTriangleSelector() = 0; + + //! Creates a triangle selector which can select triangles from a terrain scene node. + /** \param node: Pointer to the created terrain scene node + \param LOD: Level of detail, 0 for highest detail. + \return The selector, or null if not successful. + If you no longer need the selector, you should call ITriangleSelector::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ITriangleSelector* createTerrainTriangleSelector( + ITerrainSceneNode* node, s32 LOD=0) = 0; + + //! Adds an external mesh loader for extending the engine with new file formats. + /** If you want the engine to be extended with + file formats it currently is not able to load (e.g. .cob), just implement + the IMeshLoader interface in your loading class and add it with this method. + Using this method it is also possible to override built-in mesh loaders with + newer or updated versions without the need to recompile the engine. + \param externalLoader: Implementation of a new mesh loader. */ + virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0; + + //! Returns the number of mesh loaders supported by Irrlicht at this time + virtual u32 getMeshLoaderCount() const = 0; + + //! Retrieve the given mesh loader + /** \param index The index of the loader to retrieve. This parameter is an 0-based + array index. + \return A pointer to the specified loader, 0 if the index is incorrect. */ + virtual IMeshLoader* getMeshLoader(u32 index) const = 0; + + //! Adds an external scene loader for extending the engine with new file formats. + /** If you want the engine to be extended with + file formats it currently is not able to load (e.g. .vrml), just implement + the ISceneLoader interface in your loading class and add it with this method. + Using this method it is also possible to override the built-in scene loaders + with newer or updated versions without the need to recompile the engine. + \param externalLoader: Implementation of a new mesh loader. */ + virtual void addExternalSceneLoader(ISceneLoader* externalLoader) = 0; + + //! Returns the number of scene loaders supported by Irrlicht at this time + virtual u32 getSceneLoaderCount() const = 0; + + //! Retrieve the given scene loader + /** \param index The index of the loader to retrieve. This parameter is an 0-based + array index. + \return A pointer to the specified loader, 0 if the index is incorrect. */ + virtual ISceneLoader* getSceneLoader(u32 index) const = 0; + + //! Get pointer to the scene collision manager. + /** \return Pointer to the collision manager + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneCollisionManager* getSceneCollisionManager() = 0; + + //! Get pointer to the mesh manipulator. + /** \return Pointer to the mesh manipulator + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual IMeshManipulator* getMeshManipulator() = 0; + + //! Adds a scene node to the deletion queue. + /** The scene node is immediatly + deleted when it's secure. Which means when the scene node does not + execute animators and things like that. This method is for example + used for deleting scene nodes by their scene node animators. In + most other cases, a ISceneNode::remove() call is enough, using this + deletion queue is not necessary. + See ISceneManager::createDeleteAnimator() for details. + \param node: Node to detete. */ + virtual void addToDeletionQueue(ISceneNode* node) = 0; + + //! Posts an input event to the environment. + /** Usually you do not have to + use this method, it is used by the internal engine. */ + virtual bool postEventFromUser(const SEvent& event) = 0; + + //! Clears the whole scene. + /** All scene nodes are removed. */ + virtual void clear() = 0; + + //! Get interface to the parameters set in this scene. + /** String parameters can be used by plugins and mesh loaders. + For example the CMS and LMTS loader want a parameter named 'CSM_TexturePath' + and 'LMTS_TexturePath' set to the path were attached textures can be found. See + CSM_TEXTURE_PATH, LMTS_TEXTURE_PATH, MY3D_TEXTURE_PATH, + COLLADA_CREATE_SCENE_INSTANCES, DMF_TEXTURE_PATH and DMF_USE_MATERIALS_DIRS*/ + virtual io::IAttributes* getParameters() = 0; + + //! Get current render pass. + /** All scene nodes are being rendered in a specific order. + First lights, cameras, sky boxes, solid geometry, and then transparent + stuff. During the rendering process, scene nodes may want to know what the scene + manager is rendering currently, because for example they registered for rendering + twice, once for transparent geometry and once for solid. When knowing what rendering + pass currently is active they can render the correct part of their geometry. */ + virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0; + + //! Get the default scene node factory which can create all built in scene nodes + /** \return Pointer to the default scene node factory + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeFactory* getDefaultSceneNodeFactory() = 0; + + //! Adds a scene node factory to the scene manager. + /** Use this to extend the scene manager with new scene node types which it should be + able to create automaticly, for example when loading data from xml files. */ + virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0; + + //! Get amount of registered scene node factories. + virtual u32 getRegisteredSceneNodeFactoryCount() const = 0; + + //! Get a scene node factory by index + /** \return Pointer to the requested scene node factory, or 0 if it does not exist. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0; + + //! Get the default scene node animator factory which can create all built-in scene node animators + /** \return Pointer to the default scene node animator factory + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimatorFactory* getDefaultSceneNodeAnimatorFactory() = 0; + + //! Adds a scene node animator factory to the scene manager. + /** Use this to extend the scene manager with new scene node animator types which it should be + able to create automaticly, for example when loading data from xml files. */ + virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) = 0; + + //! Get amount of registered scene node animator factories. + virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0; + + //! Get scene node animator factory by index + /** \return Pointer to the requested scene node animator factory, or 0 if it does not exist. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index) = 0; + + //! Get typename from a scene node type or null if not found + virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0; + + //! Returns a typename from a scene node animator type or null if not found + virtual const c8* getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) = 0; + + //! Adds a scene node to the scene by name + /** \return Pointer to the scene node added by a factory + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0; + + //! creates a scene node animator based on its type name + /** \param typeName: Type of the scene node animator to add. + \param target: Target scene node of the new animator. + \return Returns pointer to the new scene node animator or null if not successful. You need to + drop this pointer after calling this, see IReferenceCounted::drop() for details. */ + virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0) = 0; + + //! Creates a new scene manager. + /** This can be used to easily draw and/or store two + independent scenes at the same time. The mesh cache will be + shared between all existing scene managers, which means if you + load a mesh in the original scene manager using for example + getMesh(), the mesh will be available in all other scene + managers too, without loading. + The original/main scene manager will still be there and + accessible via IrrlichtDevice::getSceneManager(). If you need + input event in this new scene manager, for example for FPS + cameras, you'll need to forward input to this manually: Just + implement an IEventReceiver and call + yourNewSceneManager->postEventFromUser(), and return true so + that the original scene manager doesn't get the event. + Otherwise, all input will go to the main scene manager + automatically. + If you no longer need the new scene manager, you should call + ISceneManager::drop(). + See IReferenceCounted::drop() for more information. */ + virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0; + + //! Saves the current scene into a file. + /** Scene nodes with the option isDebugObject set to true are + not being saved. The scene is usually written to an .irr file, + an xml based format. .irr files can Be edited with the Irrlicht + Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To + load .irr files again, see ISceneManager::loadScene(). + \param filename Name of the file. + \param userDataSerializer If you want to save some user data + for every scene node into the file, implement the + ISceneUserDataSerializer interface and provide it as parameter + here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the top node of the scene. + This node and all of its descendants are saved into the scene + file. Pass 0 or the scene manager to save the full scene (which + is also the default). + \return True if successful. */ + virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; + + //! Saves the current scene into a file. + /** Scene nodes with the option isDebugObject set to true are + not being saved. The scene is usually written to an .irr file, + an xml based format. .irr files can Be edited with the Irrlicht + Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To + load .irr files again, see ISceneManager::loadScene(). + \param file File where the scene is saved into. + \param userDataSerializer If you want to save some user data + for every scene node into the file, implement the + ISceneUserDataSerializer interface and provide it as parameter + here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the top node of the scene. + This node and all of its descendants are saved into the scene + file. Pass 0 or the scene manager to save the full scene (which + is also the default). + \return True if successful. */ + virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; + + //! Saves the current scene into a file. + /** Scene nodes with the option isDebugObject set to true are + not being saved. The scene is usually written to an .irr file, + an xml based format. .irr files can Be edited with the Irrlicht + Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To + load .irr files again, see ISceneManager::loadScene(). + \param writer XMLWriter with which the scene is saved. + \param currentPath Path which is used for relative file names. + Usually the directory of the file written into. + \param userDataSerializer If you want to save some user data + for every scene node into the file, implement the + ISceneUserDataSerializer interface and provide it as parameter + here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the top node of the scene. + This node and all of its descendants are saved into the scene + file. Pass 0 or the scene manager to save the full scene (which + is also the default). + \return True if successful. */ + virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; + + //! Loads a scene. Note that the current scene is not cleared before. + /** The scene is usually loaded from an .irr file, an xml based + format, but other scene formats can be added to the engine via + ISceneManager::addExternalSceneLoader. .irr files can Be edited + with the Irrlicht Engine Editor, irrEdit + (http://www.ambiera.com/irredit/) or saved directly by the engine + using ISceneManager::saveScene(). + \param filename Name of the file to load from. + \param userDataSerializer If you want to load user data + possibily saved in that file for some scene nodes in the file, + implement the ISceneUserDataSerializer interface and provide it + as parameter here. Otherwise, simply specify 0 as this + parameter. + \param rootNode Node which is taken as the root node of the + scene. Pass 0 to add the scene directly to the scene manager + (which is also the default). + \return True if successful. */ + virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0; + + //! Loads a scene. Note that the current scene is not cleared before. + /** The scene is usually loaded from an .irr file, an xml based + format, but other scene formats can be added to the engine via + ISceneManager::addExternalSceneLoader. .irr files can Be edited + with the Irrlicht Engine Editor, irrEdit + (http://www.ambiera.com/irredit/) or saved directly by the engine + using ISceneManager::saveScene(). + \param file File where the scene is loaded from. + \param userDataSerializer If you want to load user data + possibily saved in that file for some scene nodes in the file, + implement the ISceneUserDataSerializer interface and provide it + as parameter here. Otherwise, simply specify 0 as this + parameter. + \param rootNode Node which is taken as the root node of the + scene. Pass 0 to add the scene directly to the scene manager + (which is also the default). + \return True if successful. */ + virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0; + + //! Get a mesh writer implementation if available + /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() + for details. */ + virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0; + + //! Get a skinned mesh, which is not available as header-only code + /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() + for details. */ + virtual ISkinnedMesh* createSkinnedMesh() = 0; + + //! Sets ambient color of the scene + virtual void setAmbientLight(const video::SColorf &ambientColor) = 0; + + //! Get ambient color of the scene + virtual const video::SColorf& getAmbientLight() const = 0; + + //! Register a custom callbacks manager which gets callbacks during scene rendering. + /** \param[in] lightManager: the new callbacks manager. You may pass 0 to remove the + current callbacks manager and restore the default behavior. */ + virtual void setLightManager(ILightManager* lightManager) = 0; + + //! Get an instance of a geometry creator. + /** The geometry creator provides some helper methods to create various types of + basic geometry. This can be useful for custom scene nodes. */ + virtual const IGeometryCreator* getGeometryCreator(void) const = 0; + + //! Check if node is culled in current view frustum + /** Please note that depending on the used culling method this + check can be rather coarse, or slow. A positive result is + correct, though, i.e. if this method returns true the node is + positively not visible. The node might still be invisible even + if this method returns false. + \param node The scene node which is checked for culling. + \return True if node is not visible in the current scene, else + false. */ + virtual bool isCulled(const ISceneNode* node) const =0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNode.h b/src/others/irrlicht-1.8.1/include/ISceneNode.h new file mode 100644 index 0000000..ecaad4a --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNode.h @@ -0,0 +1,858 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_H_INCLUDED__ +#define __I_SCENE_NODE_H_INCLUDED__ + +#include "IAttributeExchangingObject.h" +#include "ESceneNodeTypes.h" +#include "ECullingTypes.h" +#include "EDebugSceneTypes.h" +#include "ISceneNodeAnimator.h" +#include "ITriangleSelector.h" +#include "SMaterial.h" +#include "irrString.h" +#include "aabbox3d.h" +#include "matrix4.h" +#include "irrList.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + class ISceneManager; + + //! Typedef for list of scene nodes + typedef core::list ISceneNodeList; + //! Typedef for list of scene node animators + typedef core::list ISceneNodeAnimatorList; + + //! Scene node interface. + /** A scene node is a node in the hierarchical scene graph. Every scene + node may have children, which are also scene nodes. Children move + relative to their parent's position. If the parent of a node is not + visible, its children won't be visible either. In this way, it is for + example easily possible to attach a light to a moving car, or to place + a walking character on a moving platform on a moving ship. + */ + class ISceneNode : virtual public io::IAttributeExchangingObject + { + public: + + //! Constructor + ISceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) + : RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale), + Parent(0), SceneManager(mgr), TriangleSelector(0), ID(id), + AutomaticCullingState(EAC_BOX), DebugDataVisible(EDS_OFF), + IsVisible(true), IsDebugObject(false) + { + if (parent) + parent->addChild(this); + + updateAbsolutePosition(); + } + + + //! Destructor + virtual ~ISceneNode() + { + // delete all children + removeAll(); + + // delete all animators + ISceneNodeAnimatorList::Iterator ait = Animators.begin(); + for (; ait != Animators.end(); ++ait) + (*ait)->drop(); + + if (TriangleSelector) + TriangleSelector->drop(); + } + + + //! This method is called just before the rendering process of the whole scene. + /** Nodes may register themselves in the render pipeline during this call, + precalculate the geometry which should be renderered, and prevent their + children from being able to register themselves if they are clipped by simply + not calling their OnRegisterSceneNode method. + If you are implementing your own scene node, you should overwrite this method + with an implementation code looking like this: + \code + if (IsVisible) + SceneManager->registerNodeForRendering(this); + + ISceneNode::OnRegisterSceneNode(); + \endcode + */ + virtual void OnRegisterSceneNode() + { + if (IsVisible) + { + ISceneNodeList::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + (*it)->OnRegisterSceneNode(); + } + } + + + //! OnAnimate() is called just before rendering the whole scene. + /** Nodes may calculate or store animations here, and may do other useful things, + depending on what they are. Also, OnAnimate() should be called for all + child scene nodes here. This method will be called once per frame, independent + of whether the scene node is visible or not. + \param timeMs Current time in milliseconds. */ + virtual void OnAnimate(u32 timeMs) + { + if (IsVisible) + { + // animate this node with all animators + + ISceneNodeAnimatorList::Iterator ait = Animators.begin(); + while (ait != Animators.end()) + { + // continue to the next node before calling animateNode() + // so that the animator may remove itself from the scene + // node without the iterator becoming invalid + ISceneNodeAnimator* anim = *ait; + ++ait; + anim->animateNode(this, timeMs); + } + + // update absolute position + updateAbsolutePosition(); + + // perform the post render process on all children + + ISceneNodeList::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + (*it)->OnAnimate(timeMs); + } + } + + + //! Renders the node. + virtual void render() = 0; + + + //! Returns the name of the node. + /** \return Name as character string. */ + virtual const c8* getName() const + { + return Name.c_str(); + } + + + //! Sets the name of the node. + /** \param name New name of the scene node. */ + virtual void setName(const c8* name) + { + Name = name; + } + + + //! Sets the name of the node. + /** \param name New name of the scene node. */ + virtual void setName(const core::stringc& name) + { + Name = name; + } + + + //! Get the axis aligned, not transformed bounding box of this node. + /** This means that if this node is an animated 3d character, + moving in a room, the bounding box will always be around the + origin. To get the box in real world coordinates, just + transform it with the matrix you receive with + getAbsoluteTransformation() or simply use + getTransformedBoundingBox(), which does the same. + \return The non-transformed bounding box. */ + virtual const core::aabbox3d& getBoundingBox() const = 0; + + + //! Get the axis aligned, transformed and animated absolute bounding box of this node. + /** \return The transformed bounding box. */ + virtual const core::aabbox3d getTransformedBoundingBox() const + { + core::aabbox3d box = getBoundingBox(); + AbsoluteTransformation.transformBoxEx(box); + return box; + } + + + //! Get the absolute transformation of the node. Is recalculated every OnAnimate()-call. + /** NOTE: For speed reasons the absolute transformation is not + automatically recalculated on each change of the relative + transformation or by a transformation change of an parent. Instead the + update usually happens once per frame in OnAnimate. You can enforce + an update with updateAbsolutePosition(). + \return The absolute transformation matrix. */ + virtual const core::matrix4& getAbsoluteTransformation() const + { + return AbsoluteTransformation; + } + + + //! Returns the relative transformation of the scene node. + /** The relative transformation is stored internally as 3 + vectors: translation, rotation and scale. To get the relative + transformation matrix, it is calculated from these values. + \return The relative transformation matrix. */ + virtual core::matrix4 getRelativeTransformation() const + { + core::matrix4 mat; + mat.setRotationDegrees(RelativeRotation); + mat.setTranslation(RelativeTranslation); + + if (RelativeScale != core::vector3df(1.f,1.f,1.f)) + { + core::matrix4 smat; + smat.setScale(RelativeScale); + mat *= smat; + } + + return mat; + } + + + //! Returns whether the node should be visible (if all of its parents are visible). + /** This is only an option set by the user, but has nothing to + do with geometry culling + \return The requested visibility of the node, true means + visible (if all parents are also visible). */ + virtual bool isVisible() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsVisible; + } + + //! Check whether the node is truly visible, taking into accounts its parents' visibility + /** \return true if the node and all its parents are visible, + false if this or any parent node is invisible. */ + virtual bool isTrulyVisible() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + if(!IsVisible) + return false; + + if(!Parent) + return true; + + return Parent->isTrulyVisible(); + } + + //! Sets if the node should be visible or not. + /** All children of this node won't be visible either, when set + to false. Invisible nodes are not valid candidates for selection by + collision manager bounding box methods. + \param isVisible If the node shall be visible. */ + virtual void setVisible(bool isVisible) + { + IsVisible = isVisible; + } + + + //! Get the id of the scene node. + /** This id can be used to identify the node. + \return The id. */ + virtual s32 getID() const + { + return ID; + } + + + //! Sets the id of the scene node. + /** This id can be used to identify the node. + \param id The new id. */ + virtual void setID(s32 id) + { + ID = id; + } + + + //! Adds a child to this scene node. + /** If the scene node already has a parent it is first removed + from the other parent. + \param child A pointer to the new child. */ + virtual void addChild(ISceneNode* child) + { + if (child && (child != this)) + { + // Change scene manager? + if (SceneManager != child->SceneManager) + child->setSceneManager(SceneManager); + + child->grab(); + child->remove(); // remove from old parent + Children.push_back(child); + child->Parent = this; + } + } + + + //! Removes a child from this scene node. + /** If found in the children list, the child pointer is also + dropped and might be deleted if no other grab exists. + \param child A pointer to the child which shall be removed. + \return True if the child was removed, and false if not, + e.g. because it couldn't be found in the children list. */ + virtual bool removeChild(ISceneNode* child) + { + ISceneNodeList::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + if ((*it) == child) + { + (*it)->Parent = 0; + (*it)->drop(); + Children.erase(it); + return true; + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + + //! Removes all children of this scene node + /** The scene nodes found in the children list are also dropped + and might be deleted if no other grab exists on them. + */ + virtual void removeAll() + { + ISceneNodeList::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + (*it)->Parent = 0; + (*it)->drop(); + } + + Children.clear(); + } + + + //! Removes this scene node from the scene + /** If no other grab exists for this node, it will be deleted. + */ + virtual void remove() + { + if (Parent) + Parent->removeChild(this); + } + + + //! Adds an animator which should animate this node. + /** \param animator A pointer to the new animator. */ + virtual void addAnimator(ISceneNodeAnimator* animator) + { + if (animator) + { + Animators.push_back(animator); + animator->grab(); + } + } + + + //! Get a list of all scene node animators. + /** \return The list of animators attached to this node. */ + const core::list& getAnimators() const + { + return Animators; + } + + + //! Removes an animator from this scene node. + /** If the animator is found, it is also dropped and might be + deleted if not other grab exists for it. + \param animator A pointer to the animator to be deleted. */ + virtual void removeAnimator(ISceneNodeAnimator* animator) + { + ISceneNodeAnimatorList::Iterator it = Animators.begin(); + for (; it != Animators.end(); ++it) + { + if ((*it) == animator) + { + (*it)->drop(); + Animators.erase(it); + return; + } + } + } + + + //! Removes all animators from this scene node. + /** The animators might also be deleted if no other grab exists + for them. */ + virtual void removeAnimators() + { + ISceneNodeAnimatorList::Iterator it = Animators.begin(); + for (; it != Animators.end(); ++it) + (*it)->drop(); + + Animators.clear(); + } + + + //! Returns the material based on the zero based index i. + /** To get the amount of materials used by this scene node, use + getMaterialCount(). This function is needed for inserting the + node into the scene hierarchy at an optimal position for + minimizing renderstate changes, but can also be used to + directly modify the material of a scene node. + \param num Zero based index. The maximal value is getMaterialCount() - 1. + \return The material at that index. */ + virtual video::SMaterial& getMaterial(u32 num) + { + return video::IdentityMaterial; + } + + + //! Get amount of materials used by this scene node. + /** \return Current amount of materials of this scene node. */ + virtual u32 getMaterialCount() const + { + return 0; + } + + + //! Sets all material flags at once to a new value. + /** Useful, for example, if you want the whole mesh to be + affected by light. + \param flag Which flag of all materials to be set. + \param newvalue New value of that flag. */ + void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) + { + for (u32 i=0; i= video::MATERIAL_MAX_TEXTURES) + return; + + for (u32 i=0; i& getChildren() const + { + return Children; + } + + + //! Changes the parent of the scene node. + /** \param newParent The new parent to be used. */ + virtual void setParent(ISceneNode* newParent) + { + grab(); + remove(); + + Parent = newParent; + + if (Parent) + Parent->addChild(this); + + drop(); + } + + + //! Returns the triangle selector attached to this scene node. + /** The Selector can be used by the engine for doing collision + detection. You can create a TriangleSelector with + ISceneManager::createTriangleSelector() or + ISceneManager::createOctreeTriangleSelector and set it with + ISceneNode::setTriangleSelector(). If a scene node got no triangle + selector, but collision tests should be done with it, a triangle + selector is created using the bounding box of the scene node. + \return A pointer to the TriangleSelector or 0, if there + is none. */ + virtual ITriangleSelector* getTriangleSelector() const + { + return TriangleSelector; + } + + + //! Sets the triangle selector of the scene node. + /** The Selector can be used by the engine for doing collision + detection. You can create a TriangleSelector with + ISceneManager::createTriangleSelector() or + ISceneManager::createOctreeTriangleSelector(). Some nodes may + create their own selector by default, so it would be good to + check if there is already a selector in this node by calling + ISceneNode::getTriangleSelector(). + \param selector New triangle selector for this scene node. */ + virtual void setTriangleSelector(ITriangleSelector* selector) + { + if (TriangleSelector != selector) + { + if (TriangleSelector) + TriangleSelector->drop(); + + TriangleSelector = selector; + if (TriangleSelector) + TriangleSelector->grab(); + } + } + + + //! Updates the absolute position based on the relative and the parents position + /** Note: This does not recursively update the parents absolute positions, so if you have a deeper + hierarchy you might want to update the parents first.*/ + virtual void updateAbsolutePosition() + { + if (Parent) + { + AbsoluteTransformation = + Parent->getAbsoluteTransformation() * getRelativeTransformation(); + } + else + AbsoluteTransformation = getRelativeTransformation(); + } + + + //! Returns the parent of this scene node + /** \return A pointer to the parent. */ + scene::ISceneNode* getParent() const + { + return Parent; + } + + + //! Returns type of the scene node + /** \return The type of this node. */ + virtual ESCENE_NODE_TYPE getType() const + { + return ESNT_UNKNOWN; + } + + + //! Writes attributes of the scene node. + /** Implement this to expose the attributes of your scene node + for scripting languages, editors, debuggers or xml + serialization purposes. + \param out The attribute container to write into. + \param options Additional options which might influence the + serialization. */ + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const + { + if (!out) + return; + out->addString ("Name", Name.c_str()); + out->addInt ("Id", ID ); + + out->addVector3d("Position", getPosition() ); + out->addVector3d("Rotation", getRotation() ); + out->addVector3d("Scale", getScale() ); + + out->addBool ("Visible", IsVisible ); + out->addInt ("AutomaticCulling", AutomaticCullingState); + out->addInt ("DebugDataVisible", DebugDataVisible ); + out->addBool ("IsDebugObject", IsDebugObject ); + } + + + //! Reads attributes of the scene node. + /** Implement this to set the attributes of your scene node for + scripting languages, editors, debuggers or xml deserialization + purposes. + \param in The attribute container to read from. + \param options Additional options which might influence the + deserialization. */ + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) + { + if (!in) + return; + Name = in->getAttributeAsString("Name"); + ID = in->getAttributeAsInt("Id"); + + setPosition(in->getAttributeAsVector3d("Position")); + setRotation(in->getAttributeAsVector3d("Rotation")); + setScale(in->getAttributeAsVector3d("Scale")); + + IsVisible = in->getAttributeAsBool("Visible"); + s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling", + scene::AutomaticCullingNames); + if (tmpState != -1) + AutomaticCullingState = (u32)tmpState; + else + AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling"); + + DebugDataVisible = in->getAttributeAsInt("DebugDataVisible"); + IsDebugObject = in->getAttributeAsBool("IsDebugObject"); + + updateAbsolutePosition(); + } + + //! Creates a clone of this scene node and its children. + /** \param newParent An optional new parent. + \param newManager An optional new scene manager. + \return The newly created clone of this node. */ + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) + { + return 0; // to be implemented by derived classes + } + + //! Retrieve the scene manager for this node. + /** \return The node's scene manager. */ + virtual ISceneManager* getSceneManager(void) const { return SceneManager; } + + protected: + + //! A clone function for the ISceneNode members. + /** This method can be used by clone() implementations of + derived classes + \param toCopyFrom The node from which the values are copied + \param newManager The new scene manager. */ + void cloneMembers(ISceneNode* toCopyFrom, ISceneManager* newManager) + { + Name = toCopyFrom->Name; + AbsoluteTransformation = toCopyFrom->AbsoluteTransformation; + RelativeTranslation = toCopyFrom->RelativeTranslation; + RelativeRotation = toCopyFrom->RelativeRotation; + RelativeScale = toCopyFrom->RelativeScale; + ID = toCopyFrom->ID; + setTriangleSelector(toCopyFrom->TriangleSelector); + AutomaticCullingState = toCopyFrom->AutomaticCullingState; + DebugDataVisible = toCopyFrom->DebugDataVisible; + IsVisible = toCopyFrom->IsVisible; + IsDebugObject = toCopyFrom->IsDebugObject; + + if (newManager) + SceneManager = newManager; + else + SceneManager = toCopyFrom->SceneManager; + + // clone children + + ISceneNodeList::Iterator it = toCopyFrom->Children.begin(); + for (; it != toCopyFrom->Children.end(); ++it) + (*it)->clone(this, newManager); + + // clone animators + + ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin(); + for (; ait != toCopyFrom->Animators.end(); ++ait) + { + ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager); + if (anim) + { + addAnimator(anim); + anim->drop(); + } + } + } + + //! Sets the new scene manager for this node and all children. + //! Called by addChild when moving nodes between scene managers + void setSceneManager(ISceneManager* newManager) + { + SceneManager = newManager; + + ISceneNodeList::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + (*it)->setSceneManager(newManager); + } + + //! Name of the scene node. + core::stringc Name; + + //! Absolute transformation of the node. + core::matrix4 AbsoluteTransformation; + + //! Relative translation of the scene node. + core::vector3df RelativeTranslation; + + //! Relative rotation of the scene node. + core::vector3df RelativeRotation; + + //! Relative scale of the scene node. + core::vector3df RelativeScale; + + //! Pointer to the parent + ISceneNode* Parent; + + //! List of all children of this node + core::list Children; + + //! List of all animator nodes + core::list Animators; + + //! Pointer to the scene manager + ISceneManager* SceneManager; + + //! Pointer to the triangle selector + ITriangleSelector* TriangleSelector; + + //! ID of the node. + s32 ID; + + //! Automatic culling state + u32 AutomaticCullingState; + + //! Flag if debug data should be drawn, such as Bounding Boxes. + u32 DebugDataVisible; + + //! Is the node visible? + bool IsVisible; + + //! Is debug object? + bool IsDebugObject; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h new file mode 100644 index 0000000..e03d975 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimator.h @@ -0,0 +1,78 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "vector3d.h" +#include "ESceneNodeAnimatorTypes.h" +#include "IAttributeExchangingObject.h" +#include "IEventReceiver.h" + +namespace irr +{ +namespace io +{ + class IAttributes; +} // end namespace io +namespace scene +{ + class ISceneNode; + class ISceneManager; + + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimator : public io::IAttributeExchangingObject, public IEventReceiver + { + public: + //! Animates a scene node. + /** \param node Node to animate. + \param timeMs Current time in milli seconds. */ + virtual void animateNode(ISceneNode* node, u32 timeMs) =0; + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, + ISceneManager* newManager=0) =0; + + //! Returns true if this animator receives events. + /** When attached to an active camera, this animator will be + able to respond to events such as mouse and keyboard events. */ + virtual bool isEventReceiverEnabled() const + { + return false; + } + + //! Event receiver, override this function for camera controlling animators + virtual bool OnEvent(const SEvent& event) + { + return false; + } + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const + { + return ESNAT_UNKNOWN; + } + + //! Returns if the animator has finished. + /** This is only valid for non-looping animators with a discrete end state. + \return true if the animator has finished, false if it is still running. */ + virtual bool hasFinished(void) const + { + return false; + } + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h new file mode 100644 index 0000000..7b7a867 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h @@ -0,0 +1,69 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" +#include "IEventReceiver.h" +#include "irrArray.h" + +namespace irr +{ + struct SKeyMap; + +namespace scene +{ + + //! Special scene node animator for FPS cameras + /** This scene node animator can be attached to a camera to make it act + like a first person shooter + */ + class ISceneNodeAnimatorCameraFPS : public ISceneNodeAnimator + { + public: + + //! Returns the speed of movement in units per millisecond + virtual f32 getMoveSpeed() const = 0; + + //! Sets the speed of movement in units per millisecond + virtual void setMoveSpeed(f32 moveSpeed) = 0; + + //! Returns the rotation speed in degrees + /** The degrees are equivalent to a half screen movement of the mouse, + i.e. if the mouse cursor had been moved to the border of the screen since + the last animation. */ + virtual f32 getRotateSpeed() const = 0; + + //! Set the rotation speed in degrees + virtual void setRotateSpeed(f32 rotateSpeed) = 0; + + //! Sets the keyboard mapping for this animator (old style) + /** \param map Array of keyboard mappings, see irr::SKeyMap + \param count Size of the keyboard map array. */ + virtual void setKeyMap(SKeyMap *map, u32 count) = 0; + + //! Sets the keyboard mapping for this animator + //! \param keymap The new keymap array + virtual void setKeyMap(const core::array& keymap) = 0; + + //! Gets the keyboard mapping for this animator + virtual const core::array& getKeyMap() const = 0; + + //! Sets whether vertical movement should be allowed. + /** If vertical movement is enabled then the camera may fight with + gravity causing camera shake. Disable this if the camera has + a collision animator with gravity enabled. */ + virtual void setVerticalMovement(bool allow) = 0; + + //! Sets whether the Y axis of the mouse should be inverted. + /** If enabled then moving the mouse down will cause + the camera to look up. It is disabled by default. */ + virtual void setInvertMouse(bool invert) = 0; + }; +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h new file mode 100644 index 0000000..94bd2e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h @@ -0,0 +1,58 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" + +namespace irr +{ + +namespace scene +{ + + //! Special scene node animator for Maya-style cameras + /** This scene node animator can be attached to a camera to make it act like a 3d + modelling tool. + The camera is moving relative to the target with the mouse, by pressing either + of the three buttons. + In order to move the camera, set a new target for the camera. The distance defines + the current orbit radius the camera moves on. Distance can be changed via the setter + or by mouse events. + */ + class ISceneNodeAnimatorCameraMaya : public ISceneNodeAnimator + { + public: + + //! Returns the speed of movement + virtual f32 getMoveSpeed() const = 0; + + //! Sets the speed of movement + virtual void setMoveSpeed(f32 moveSpeed) = 0; + + //! Returns the rotation speed + virtual f32 getRotateSpeed() const = 0; + + //! Set the rotation speed + virtual void setRotateSpeed(f32 rotateSpeed) = 0; + + //! Returns the zoom speed + virtual f32 getZoomSpeed() const = 0; + + //! Set the zoom speed + virtual void setZoomSpeed(f32 zoomSpeed) = 0; + + //! Returns the current distance, i.e. orbit radius + virtual f32 getDistance() const = 0; + + //! Set the distance + virtual void setDistance(f32 distance) = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h new file mode 100644 index 0000000..299c0a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h @@ -0,0 +1,171 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + + class ISceneNodeAnimatorCollisionResponse; + + //! Callback interface for catching events of collisions. + /** Implement this interface and use + ISceneNodeAnimatorCollisionResponse::setCollisionCallback to be able to + be notified if a collision has occurred. + **/ + class ICollisionCallback : public virtual IReferenceCounted + { + public: + + //! Will be called when a collision occurrs. + /** See ISceneNodeAnimatorCollisionResponse::setCollisionCallback for more information. + \param animator: Collision response animator in which the collision occurred. You can call + this animator's methods to find the node, collisionPoint and/or collision triangle. + \retval true if the collision was handled in the animator. The animator's target + node will *not* be stopped at the collision point, but will instead move fully + to the location that triggered the collision check. + \retval false if the collision was not handled in the animator. The animator's + target node will be moved to the collision position. + */ + virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) = 0; + }; + + //! Special scene node animator for doing automatic collision detection and response. + /** This scene node animator can be attached to any single scene node + and will then prevent it from moving through specified collision geometry + (e.g. walls and floors of the) world, as well as having it fall under gravity. + This animator provides a simple implementation of first person shooter cameras. + Attach it to a camera, and the camera will behave as the player control in a + first person shooter game: The camera stops and slides at walls, walks up stairs, + falls down if there is no floor under it, and so on. + + The animator will treat any change in the position of its target scene + node as movement, including a setPosition(), as movement. If you want to + teleport the target scene node manually to a location without it being effected + by collision geometry, then call setTargetNode(node) after calling node->setPosition(). + */ + class ISceneNodeAnimatorCollisionResponse : public ISceneNodeAnimator + { + public: + + //! Destructor + virtual ~ISceneNodeAnimatorCollisionResponse() {} + + //! Check if the attached scene node is falling. + /** Falling means that there is no blocking wall from the scene + node in the direction of the gravity. The implementation of + this method is very fast, no collision detection is done when + invoking it. + \return True if the scene node is falling, false if not. */ + virtual bool isFalling() const = 0; + + //! Sets the radius of the ellipsoid for collision detection and response. + /** If you have a scene node, and you are unsure about how big + the radius should be, you could use the following code to + determine it: + \code + core::aabbox box = yourSceneNode->getBoundingBox(); + core::vector3df radius = box.MaxEdge - box.getCenter(); + \endcode + \param radius: New radius of the ellipsoid. */ + virtual void setEllipsoidRadius(const core::vector3df& radius) = 0; + + //! Returns the radius of the ellipsoid for collision detection and response. + /** \return Radius of the ellipsoid. */ + virtual core::vector3df getEllipsoidRadius() const = 0; + + //! Sets the gravity of the environment. + /** A good example value would be core::vector3df(0,-100.0f,0) + for letting gravity affect all object to fall down. For bigger + gravity, make increase the length of the vector. You can + disable gravity by setting it to core::vector3df(0,0,0); + \param gravity: New gravity vector. */ + virtual void setGravity(const core::vector3df& gravity) = 0; + + //! Get current vector of gravity. + //! \return Gravity vector. */ + virtual core::vector3df getGravity() const = 0; + + //! 'Jump' the animator, by adding a jump speed opposite to its gravity + /** \param jumpSpeed The initial speed of the jump; the velocity will be opposite + to this animator's gravity vector. */ + virtual void jump(f32 jumpSpeed) = 0; + + //! Should the Target react on collision ( default = true ) + virtual void setAnimateTarget ( bool enable ) = 0; + virtual bool getAnimateTarget () const = 0; + + //! Set translation of the collision ellipsoid. + /** By default, the ellipsoid for collision detection is + created around the center of the scene node, which means that + the ellipsoid surrounds it completely. If this is not what you + want, you may specify a translation for the ellipsoid. + \param translation: Translation of the ellipsoid relative + to the position of the scene node. */ + virtual void setEllipsoidTranslation(const core::vector3df &translation) = 0; + + //! Get the translation of the ellipsoid for collision detection. + /** See + ISceneNodeAnimatorCollisionResponse::setEllipsoidTranslation() + for more details. + \return Translation of the ellipsoid relative to the position + of the scene node. */ + virtual core::vector3df getEllipsoidTranslation() const = 0; + + //! Sets a triangle selector holding all triangles of the world with which the scene node may collide. + /** \param newWorld: New triangle selector containing triangles + to let the scene node collide with. */ + virtual void setWorld(ITriangleSelector* newWorld) = 0; + + //! Get the current triangle selector containing all triangles for collision detection. + virtual ITriangleSelector* getWorld() const = 0; + + //! Set the single node that this animator will act on. + /** \param node The new target node. Setting this will force the animator to update + its last target position for the node, allowing setPosition() to teleport + the node through collision geometry. */ + virtual void setTargetNode(ISceneNode * node) = 0; + + //! Gets the single node that this animator is acting on. + /** \return The node that this animator is acting on. */ + virtual ISceneNode* getTargetNode(void) const = 0; + + //! Returns true if a collision occurred during the last animateNode() + virtual bool collisionOccurred() const = 0; + + //! Returns the last point of collision. + virtual const core::vector3df & getCollisionPoint() const = 0; + + //! Returns the last triangle that caused a collision + virtual const core::triangle3df & getCollisionTriangle() const = 0; + + //! Returns the position that the target node will be moved to, unless the collision is consumed in a callback. + /** + If you have a collision callback registered, and it consumes the collision, then the + node will ignore the collision and will not stop at this position. Instead, it will + move fully to the position that caused the collision to occur. */ + virtual const core::vector3df & getCollisionResultPosition(void) const = 0; + + //! Returns the node that was collided with. + virtual ISceneNode* getCollisionNode(void) const = 0; + + //! Sets a callback interface which will be called if a collision occurs. + /** \param callback: collision callback handler that will be called when a collision + occurs. Set this to 0 to disable the callback. + */ + virtual void setCollisionCallback(ICollisionCallback* callback) = 0; + + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h new file mode 100644 index 0000000..c3f5b3c --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h @@ -0,0 +1,69 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "ESceneNodeAnimatorTypes.h" + +namespace irr +{ +namespace scene +{ + class ISceneNode; + class ISceneNodeAnimator; + + //! Interface for dynamic creation of scene node animators + /** To be able to add custom scene node animators to Irrlicht and to make it possible for the + scene manager to save and load those external animators, simply implement this + interface and register it in you scene manager via ISceneManager::registerSceneNodeAnimatorFactory. + Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to + increase the reference counter of the scene node manager. This is not necessary because the + scene node manager will grab() the factory anyway, and otherwise cyclic references will + be created and the scene manager and all its nodes won't get deallocated. + */ + class ISceneNodeAnimatorFactory : public virtual IReferenceCounted + { + public: + + //! creates a scene node animator based on its type id + /** \param type: Type of the scene node animator to add. + \param target: Target scene node of the new animator. + \return Returns pointer to the new scene node animator or null if not successful. You need to + drop this pointer after calling this, see IReferenceCounted::drop() for details. */ + virtual ISceneNodeAnimator* createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target) = 0; + + //! creates a scene node animator based on its type name + /** \param typeName: Type of the scene node animator to add. + \param target: Target scene node of the new animator. + \return Returns pointer to the new scene node animator or null if not successful. You need to + drop this pointer after calling this, see IReferenceCounted::drop() for details. */ + virtual ISceneNodeAnimator* createSceneNodeAnimator(const c8* typeName, ISceneNode* target) = 0; + + //! returns amount of scene node animator types this factory is able to create + virtual u32 getCreatableSceneNodeAnimatorTypeCount() const = 0; + + //! returns type of a createable scene node animator type + /** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and + getCreatableSceneNodeTypeCount() */ + virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType(u32 idx) const = 0; + + //! returns type name of a createable scene node animator type + /** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and + getCreatableSceneNodeAnimatorTypeCount() */ + virtual const c8* getCreateableSceneNodeAnimatorTypeName(u32 idx) const = 0; + + //! returns type name of a createable scene node animator type + /** \param type: Type of scene node animator. + \return: Returns name of scene node animator type if this factory can create the type, otherwise 0. */ + virtual const c8* getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const = 0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneNodeFactory.h b/src/others/irrlicht-1.8.1/include/ISceneNodeFactory.h new file mode 100644 index 0000000..5359d2b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneNodeFactory.h @@ -0,0 +1,68 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_FACTORY_H_INCLUDED__ +#define __I_SCENE_NODE_FACTORY_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "ESceneNodeTypes.h" + +namespace irr +{ + +namespace scene +{ + class ISceneNode; + + //! Interface for dynamic creation of scene nodes + /** To be able to add custom scene nodes to Irrlicht and to make it possible for the + scene manager to save and load those external scene nodes, simply implement this + interface and register it in you scene manager via ISceneManager::registerSceneNodeFactory. + Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to + increase the reference counter of the scene node manager. This is not necessary because the + scene node manager will grab() the factory anyway, and otherwise cyclic references will + be created and the scene manager and all its nodes won't get deallocated. + */ + class ISceneNodeFactory : public virtual IReferenceCounted + { + public: + //! adds a scene node to the scene graph based on its type id + /** \param type: Type of the scene node to add. + \param parent: Parent scene node of the new node, can be null to add the scene node to the root. + \return Returns pointer to the new scene node or null if not successful. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0) = 0; + + //! adds a scene node to the scene graph based on its type name + /** \param typeName: Type name of the scene node to add. + \param parent: Parent scene node of the new node, can be null to add the scene node to the root. + \return Returns pointer to the new scene node or null if not successful. + This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ + virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0) = 0; + + //! returns amount of scene node types this factory is able to create + virtual u32 getCreatableSceneNodeTypeCount() const = 0; + + //! returns type of a createable scene node type + /** \param idx: Index of scene node type in this factory. Must be a value between 0 and + getCreatableSceneNodeTypeCount() */ + virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0; + + //! returns type name of a createable scene node type by index + /** \param idx: Index of scene node type in this factory. Must be a value between 0 and + getCreatableSceneNodeTypeCount() */ + virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0; + + //! returns type name of a createable scene node type + /** \param type: Type of scene node. + \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ + virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISceneUserDataSerializer.h b/src/others/irrlicht-1.8.1/include/ISceneUserDataSerializer.h new file mode 100644 index 0000000..309443b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISceneUserDataSerializer.h @@ -0,0 +1,51 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ +#define __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ + +#include "IReferenceCounted.h" + +namespace irr +{ +namespace io +{ + class IAttributes; +} // end namespace io +namespace scene +{ + class ISceneNode; + +//! Interface to read and write user data to and from .irr files. +/** This interface is to be implemented by the user, to make it possible to read +and write user data when reading or writing .irr files via ISceneManager. +To be used with ISceneManager::loadScene() and ISceneManager::saveScene() */ +class ISceneUserDataSerializer +{ +public: + + virtual ~ISceneUserDataSerializer() {} + + //! Called when the scene manager create a scene node while loading a file. + virtual void OnCreateNode(ISceneNode* node) = 0; + + //! Called when the scene manager read a scene node while loading a file. + /** The userData pointer contains a list of attributes with userData which + were attached to the scene node in the read scene file.*/ + virtual void OnReadUserData(ISceneNode* forSceneNode, io::IAttributes* userData) = 0; + + //! Called when the scene manager is writing a scene node to an xml file for example. + /** Implement this method and return a list of attributes containing the user data + you want to be saved together with the scene node. Return 0 if no user data should + be added. Please note that the scene manager will call drop() to the returned pointer + after it no longer needs it, so if you didn't create a new object for the return value + and returning a longer existing IAttributes object, simply call grab() before returning it. */ + virtual io::IAttributes* createUserData(ISceneNode* forSceneNode) = 0; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h b/src/others/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h new file mode 100644 index 0000000..fdf9e9a --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h @@ -0,0 +1,85 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SHADER_CONSTANT_SET_CALLBACT_H_INCLUDED__ +#define __I_SHADER_CONSTANT_SET_CALLBACT_H_INCLUDED__ + +#include "IReferenceCounted.h" + +namespace irr +{ +namespace video +{ + class IMaterialRendererServices; + class SMaterial; + +//! Interface making it possible to set constants for gpu programs every frame. +/** Implement this interface in an own class and pass a pointer to it to one of +the methods in IGPUProgrammingServices when creating a shader. The +OnSetConstants method will be called every frame now. */ +class IShaderConstantSetCallBack : public virtual IReferenceCounted +{ +public: + + //! Called to let the callBack know the used material (optional method) + /** + \code + class MyCallBack : public IShaderConstantSetCallBack + { + const video::SMaterial *UsedMaterial; + + OnSetMaterial(const video::SMaterial& material) + { + UsedMaterial=&material; + } + + OnSetConstants(IMaterialRendererServices* services, s32 userData) + { + services->setVertexShaderConstant("myColor", reinterpret_cast(&UsedMaterial->color), 4); + } + } + \endcode + */ + virtual void OnSetMaterial(const SMaterial& material) { } + + //! Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set. + /** + Implement the IShaderConstantSetCallBack in an own class and implement your own + OnSetConstants method using the given IMaterialRendererServices interface. + Pass a pointer to this class to one of the methods in IGPUProgrammingServices + when creating a shader. The OnSetConstants method will now be called every time + before geometry is being drawn using your shader material. A sample implementation + would look like this: + \code + virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + // set clip matrix at register 4 + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4); + // for high level shading languages, this would be another solution: + //services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16); + + // set some light color at register 9 + video::SColorf col(0.0f,1.0f,1.0f,0.0f); + services->setVertexShaderConstant(reinterpret_cast(&col), 9, 1); + // for high level shading languages, this would be another solution: + //services->setVertexShaderConstant("myColor", reinterpret_cast(&col), 4); + } + \endcode + \param services: Pointer to an interface providing methods to set the constants for the shader. + \param userData: Userdata int which can be specified when creating the shader. + */ + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData) = 0; +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h b/src/others/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h new file mode 100644 index 0000000..82c2ad3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h @@ -0,0 +1,38 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__ +#define __I_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + class IMesh; + + //! Scene node for rendering a shadow volume into a stencil buffer. + class IShadowVolumeSceneNode : public ISceneNode + { + public: + + //! constructor + IShadowVolumeSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) + : ISceneNode(parent, mgr, id) {} + + //! Sets the mesh from which the shadow volume should be generated. + /** To optimize shadow rendering, use a simpler mesh for shadows. + */ + virtual void setShadowMesh(const IMesh* mesh) = 0; + + //! Updates the shadow volumes for current light positions. + virtual void updateShadowVolumes() = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ISkinnedMesh.h b/src/others/irrlicht-1.8.1/include/ISkinnedMesh.h new file mode 100644 index 0000000..03f5016 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ISkinnedMesh.h @@ -0,0 +1,219 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SKINNED_MESH_H_INCLUDED__ +#define __I_SKINNED_MESH_H_INCLUDED__ + +#include "irrArray.h" +#include "IBoneSceneNode.h" +#include "IAnimatedMesh.h" +#include "SSkinMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + + enum E_INTERPOLATION_MODE + { + // constant does use the current key-values without interpolation + EIM_CONSTANT = 0, + + // linear interpolation + EIM_LINEAR, + + //! count of all available interpolation modes + EIM_COUNT + }; + + + //! Interface for using some special functions of Skinned meshes + class ISkinnedMesh : public IAnimatedMesh + { + public: + + //! Gets joint count. + /** \return Amount of joints in the skeletal animated mesh. */ + virtual u32 getJointCount() const = 0; + + //! Gets the name of a joint. + /** \param number: Zero based index of joint. The last joint + has the number getJointCount()-1; + \return Name of joint and null if an error happened. */ + virtual const c8* getJointName(u32 number) const = 0; + + //! Gets a joint number from its name + /** \param name: Name of the joint. + \return Number of the joint or -1 if not found. */ + virtual s32 getJointNumber(const c8* name) const = 0; + + //! Use animation from another mesh + /** The animation is linked (not copied) based on joint names + so make sure they are unique. + \return True if all joints in this mesh were + matched up (empty names will not be matched, and it's case + sensitive). Unmatched joints will not be animated. */ + virtual bool useAnimationFrom(const ISkinnedMesh *mesh) = 0; + + //! Update Normals when Animating + /** \param on If false don't animate, which is faster. + Else update normals, which allows for proper lighting of + animated meshes. */ + virtual void updateNormalsWhenAnimating(bool on) = 0; + + //! Sets Interpolation Mode + virtual void setInterpolationMode(E_INTERPOLATION_MODE mode) = 0; + + //! Animates this mesh's joints based on frame input + virtual void animateMesh(f32 frame, f32 blend)=0; + + //! Preforms a software skin on this mesh based of joint positions + virtual void skinMesh() = 0; + + //! converts the vertex type of all meshbuffers to tangents. + /** E.g. used for bump mapping. */ + virtual void convertMeshToTangents() = 0; + + //! Allows to enable hardware skinning. + /* This feature is not implementated in Irrlicht yet */ + virtual bool setHardwareSkinning(bool on) = 0; + + //! A vertex weight + struct SWeight + { + //! Index of the mesh buffer + u16 buffer_id; //I doubt 32bits is needed + + //! Index of the vertex + u32 vertex_id; //Store global ID here + + //! Weight Strength/Percentage (0-1) + f32 strength; + + private: + //! Internal members used by CSkinnedMesh + friend class CSkinnedMesh; + bool *Moved; + core::vector3df StaticPos; + core::vector3df StaticNormal; + }; + + + //! Animation keyframe which describes a new position + struct SPositionKey + { + f32 frame; + core::vector3df position; + }; + + //! Animation keyframe which describes a new scale + struct SScaleKey + { + f32 frame; + core::vector3df scale; + }; + + //! Animation keyframe which describes a new rotation + struct SRotationKey + { + f32 frame; + core::quaternion rotation; + }; + + //! Joints + struct SJoint + { + SJoint() : UseAnimationFrom(0), GlobalSkinningSpace(false), + positionHint(-1),scaleHint(-1),rotationHint(-1) + { + } + + //! The name of this joint + core::stringc Name; + + //! Local matrix of this joint + core::matrix4 LocalMatrix; + + //! List of child joints + core::array Children; + + //! List of attached meshes + core::array AttachedMeshes; + + //! Animation keys causing translation change + core::array PositionKeys; + + //! Animation keys causing scale change + core::array ScaleKeys; + + //! Animation keys causing rotation change + core::array RotationKeys; + + //! Skin weights + core::array Weights; + + //! Unnecessary for loaders, will be overwritten on finalize + core::matrix4 GlobalMatrix; + core::matrix4 GlobalAnimatedMatrix; + core::matrix4 LocalAnimatedMatrix; + core::vector3df Animatedposition; + core::vector3df Animatedscale; + core::quaternion Animatedrotation; + + core::matrix4 GlobalInversedMatrix; //the x format pre-calculates this + + private: + //! Internal members used by CSkinnedMesh + friend class CSkinnedMesh; + + SJoint *UseAnimationFrom; + bool GlobalSkinningSpace; + + s32 positionHint; + s32 scaleHint; + s32 rotationHint; + }; + + + //Interface for the mesh loaders (finalize should lock these functions, and they should have some prefix like loader_ + + //these functions will use the needed arrays, set values, etc to help the loaders + + //! exposed for loaders: to add mesh buffers + virtual core::array& getMeshBuffers() = 0; + + //! exposed for loaders: joints list + virtual core::array& getAllJoints() = 0; + + //! exposed for loaders: joints list + virtual const core::array& getAllJoints() const = 0; + + //! loaders should call this after populating the mesh + virtual void finalize() = 0; + + //! Adds a new meshbuffer to the mesh, access it as last one + virtual SSkinMeshBuffer* addMeshBuffer() = 0; + + //! Adds a new joint to the mesh, access it as last one + virtual SJoint* addJoint(SJoint *parent=0) = 0; + + //! Adds a new weight to the mesh, access it as last one + virtual SWeight* addWeight(SJoint *joint) = 0; + + //! Adds a new position key to the mesh, access it as last one + virtual SPositionKey* addPositionKey(SJoint *joint) = 0; + //! Adds a new scale key to the mesh, access it as last one + virtual SScaleKey* addScaleKey(SJoint *joint) = 0; + //! Adds a new rotation key to the mesh, access it as last one + virtual SRotationKey* addRotationKey(SJoint *joint) = 0; + + //! Check if the mesh is non-animated + virtual bool isStatic()=0; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ITerrainSceneNode.h b/src/others/irrlicht-1.8.1/include/ITerrainSceneNode.h new file mode 100644 index 0000000..0706709 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ITerrainSceneNode.h @@ -0,0 +1,182 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// The code for the TerrainSceneNode is based on the terrain renderer by +// Soconne and the GeoMipMapSceneNode developed by Spintz. They made their +// code available for Irrlicht and allowed it to be distributed under this +// licence. I only modified some parts. A lot of thanks go to them. + +#ifndef __I_TERRAIN_SCENE_NODE_H__ +#define __I_TERRAIN_SCENE_NODE_H__ + +#include "ETerrainElements.h" +#include "ISceneNode.h" +#include "IDynamicMeshBuffer.h" +#include "irrArray.h" + +namespace irr +{ +namespace io +{ + class IReadFile; +} // end namespace io +namespace scene +{ + class IMesh; + + //! A scene node for displaying terrain using the geo mip map algorithm. + /** The code for the TerrainSceneNode is based on the Terrain renderer by Soconne and + * the GeoMipMapSceneNode developed by Spintz. They made their code available for Irrlicht + * and allowed it to be distributed under this licence. I only modified some parts. + * A lot of thanks go to them. + * + * This scene node is capable of very quickly loading + * terrains and updating the indices at runtime to enable viewing very large terrains. It uses a + * CLOD (Continuous Level of Detail) algorithm which updates the indices for each patch based on + * a LOD (Level of Detail) which is determined based on a patch's distance from the camera. + * + * The Patch Size of the terrain must always be a size of ( 2^N+1, i.e. 8+1(9), 16+1(17), etc. ). + * The MaxLOD available is directly dependent on the patch size of the terrain. LOD 0 contains all + * of the indices to draw all the triangles at the max detail for a patch. As each LOD goes up by 1 + * the step taken, in generating indices increases by - 2^LOD, so for LOD 1, the step taken is 2, for + * LOD 2, the step taken is 4, LOD 3 - 8, etc. The step can be no larger than the size of the patch, + * so having a LOD of 8, with a patch size of 17, is asking the algoritm to generate indices every + * 2^8 ( 256 ) vertices, which is not possible with a patch size of 17. The maximum LOD for a patch + * size of 17 is 2^4 ( 16 ). So, with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 ( every + * 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every 8 vertices ) and LOD 4 ( every 16 vertices ). + **/ + class ITerrainSceneNode : public ISceneNode + { + public: + //! Constructor + ITerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0.0f, 0.0f, 0.0f), + const core::vector3df& rotation = core::vector3df(0.0f, 0.0f, 0.0f), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f) ) + : ISceneNode (parent, mgr, id, position, rotation, scale) {} + + //! Get the bounding box of the terrain. + /** \return The bounding box of the entire terrain. */ + virtual const core::aabbox3d& getBoundingBox() const =0; + + //! Get the bounding box of a patch + /** \return The bounding box of the chosen patch. */ + virtual const core::aabbox3d& getBoundingBox(s32 patchX, s32 patchZ) const =0; + + //! Get the number of indices currently in the meshbuffer + /** \return The index count. */ + virtual u32 getIndexCount() const =0; + + //! Get pointer to the mesh + /** \return Pointer to the mesh. */ + virtual IMesh* getMesh() =0; + + //! Get pointer to the buffer used by the terrain (most users will not need this) + virtual IMeshBuffer* getRenderBuffer() =0; + + + //! Gets the meshbuffer data based on a specified level of detail. + /** \param mb A reference to an IDynamicMeshBuffer object + \param LOD The level of detail you want the indices from. */ + virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const =0; + + //! Gets the indices for a specified patch at a specified Level of Detail. + /** \param indices A reference to an array of u32 indices. + \param patchX Patch x coordinate. + \param patchZ Patch z coordinate. + \param LOD The level of detail to get for that patch. If -1, + then get the CurrentLOD. If the CurrentLOD is set to -1, + meaning it's not shown, then it will retrieve the triangles at + the highest LOD (0). + \return Number of indices put into the buffer. */ + virtual s32 getIndicesForPatch(core::array& indices, + s32 patchX, s32 patchZ, s32 LOD=0) =0; + + //! Populates an array with the CurrentLOD of each patch. + /** \param LODs A reference to a core::array to hold the + values + \return Number of elements in the array */ + virtual s32 getCurrentLODOfPatches(core::array& LODs) const =0; + + //! Manually sets the LOD of a patch + /** \param patchX Patch x coordinate. + \param patchZ Patch z coordinate. + \param LOD The level of detail to set the patch to. */ + virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0) =0; + + //! Get center of terrain. + virtual const core::vector3df& getTerrainCenter() const =0; + + //! Get height of a point of the terrain. + virtual f32 getHeight(f32 x, f32 y) const =0; + + //! Sets the movement camera threshold. + /** It is used to determine when to recalculate + indices for the scene node. The default value is 10.0f. */ + virtual void setCameraMovementDelta(f32 delta) =0; + + //! Sets the rotation camera threshold. + /** It is used to determine when to recalculate + indices for the scene node. The default value is 1.0f. */ + virtual void setCameraRotationDelta(f32 delta) =0; + + //! Sets whether or not the node should dynamically update its associated selector when the geomipmap data changes. + /** \param bVal: Boolean value representing whether or not to update selector dynamically. */ + virtual void setDynamicSelectorUpdate(bool bVal) =0; + + //! Override the default generation of distance thresholds. + /** For determining the LOD a patch is rendered at. If any LOD + is overridden, then the scene node will no longer apply scaling + factors to these values. If you override these distances, and + then apply a scale to the scene node, it is your responsibility + to update the new distances to work best with your new terrain + size. */ + virtual bool overrideLODDistance(s32 LOD, f64 newDistance) =0; + + //! Scales the base texture, similar to makePlanarTextureMapping. + /** \param scale The scaling amount. Values above 1.0 + increase the number of time the texture is drawn on the + terrain. Values below 0 will decrease the number of times the + texture is drawn on the terrain. Using negative values will + flip the texture, as well as still scaling it. + \param scale2 If set to 0 (default value), this will set the + second texture coordinate set to the same values as in the + first set. If this is another value than zero, it will scale + the second texture coordinate set by this value. */ + virtual void scaleTexture(f32 scale = 1.0f, f32 scale2=0.0f) =0; + + //! Initializes the terrain data. Loads the vertices from the heightMapFile. + /** The file must contain a loadable image of the heightmap. The heightmap + must be square. + \param file The file to read the image from. File is not rewinded. + \param vertexColor Color of all vertices. + \param smoothFactor Number of smoothing passes. */ + virtual bool loadHeightMap(io::IReadFile* file, + video::SColor vertexColor=video::SColor(255,255,255,255), + s32 smoothFactor=0) =0; + + //! Initializes the terrain data. Loads the vertices from the heightMapFile. + /** The data is interpreted as (signed) integers of the given bit size or + floats (with 32bits, signed). Allowed bitsizes for integers are + 8, 16, and 32. The heightmap must be square. + \param file The file to read the RAW data from. File is not rewinded. + \param bitsPerPixel Size of data if integers used, for floats always use 32. + \param signedData Whether we use signed or unsigned ints, ignored for floats. + \param floatVals Whether the data is float or int. + \param width Width (and also Height, as it must be square) of the heightmap. Use 0 for autocalculating from the filesize. + \param vertexColor Color of all vertices. + \param smoothFactor Number of smoothing passes. */ + virtual bool loadHeightMapRAW(io::IReadFile* file, s32 bitsPerPixel=16, + bool signedData=false, bool floatVals=false, s32 width=0, + video::SColor vertexColor=video::SColor(255,255,255,255), + s32 smoothFactor=0) =0; + + }; + +} // end namespace scene +} // end namespace irr + + +#endif // __I_TERRAIN_SCENE_NODE_H__ + diff --git a/src/others/irrlicht-1.8.1/include/ITextSceneNode.h b/src/others/irrlicht-1.8.1/include/ITextSceneNode.h new file mode 100644 index 0000000..540d7b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ITextSceneNode.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_TEXT_SCENE_NODE_H_INCLUDED__ +#define __I_TEXT_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! A scene node for displaying 2d text at a position in three dimensional space +class ITextSceneNode : public ISceneNode +{ +public: + + //! constructor + ITextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0)) + : ISceneNode(parent, mgr, id, position) {} + + //! sets the text string + virtual void setText(const wchar_t* text) = 0; + + //! sets the color of the text + virtual void setTextColor(video::SColor color) = 0; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ITexture.h b/src/others/irrlicht-1.8.1/include/ITexture.h new file mode 100644 index 0000000..2f54437 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ITexture.h @@ -0,0 +1,219 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_TEXTURE_H_INCLUDED__ +#define __I_TEXTURE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "IImage.h" +#include "dimension2d.h" +#include "EDriverTypes.h" +#include "path.h" +#include "matrix4.h" + +namespace irr +{ +namespace video +{ + + +//! Enumeration flags telling the video driver in which format textures should be created. +enum E_TEXTURE_CREATION_FLAG +{ + /** Forces the driver to create 16 bit textures always, independent of + which format the file on disk has. When choosing this you may lose + some color detail, but gain much speed and memory. 16 bit textures can + be transferred twice as fast as 32 bit textures and only use half of + the space in memory. + When using this flag, it does not make sense to use the flags + ETCF_ALWAYS_32_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or + ETCF_OPTIMIZED_FOR_SPEED at the same time. */ + ETCF_ALWAYS_16_BIT = 0x00000001, + + /** Forces the driver to create 32 bit textures always, independent of + which format the file on disk has. Please note that some drivers (like + the software device) will ignore this, because they are only able to + create and use 16 bit textures. + When using this flag, it does not make sense to use the flags + ETCF_ALWAYS_16_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or + ETCF_OPTIMIZED_FOR_SPEED at the same time. */ + ETCF_ALWAYS_32_BIT = 0x00000002, + + /** Lets the driver decide in which format the textures are created and + tries to make the textures look as good as possible. Usually it simply + chooses the format in which the texture was stored on disk. + When using this flag, it does not make sense to use the flags + ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_SPEED at + the same time. */ + ETCF_OPTIMIZED_FOR_QUALITY = 0x00000004, + + /** Lets the driver decide in which format the textures are created and + tries to create them maximizing render speed. + When using this flag, it does not make sense to use the flags + ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_QUALITY, + at the same time. */ + ETCF_OPTIMIZED_FOR_SPEED = 0x00000008, + + /** Automatically creates mip map levels for the textures. */ + ETCF_CREATE_MIP_MAPS = 0x00000010, + + /** Discard any alpha layer and use non-alpha color format. */ + ETCF_NO_ALPHA_CHANNEL = 0x00000020, + + //! Allow the Driver to use Non-Power-2-Textures + /** BurningVideo can handle Non-Power-2 Textures in 2D (GUI), but not in 3D. */ + ETCF_ALLOW_NON_POWER_2 = 0x00000040, + + /** This flag is never used, it only forces the compiler to compile + these enumeration values to 32 bit. */ + ETCF_FORCE_32_BIT_DO_NOT_USE = 0x7fffffff +}; + +//! Enum for the mode for texture locking. Read-Only, write-only or read/write. +enum E_TEXTURE_LOCK_MODE +{ + //! The default mode. Texture can be read and written to. + ETLM_READ_WRITE = 0, + + //! Read only. The texture is downloaded, but not uploaded again. + /** Often used to read back shader generated textures. */ + ETLM_READ_ONLY, + + //! Write only. The texture is not downloaded and might be uninitialised. + /** The updated texture is uploaded to the GPU. + Used for initialising the shader from the CPU. */ + ETLM_WRITE_ONLY +}; + +//! Interface of a Video Driver dependent Texture. +/** An ITexture is created by an IVideoDriver by using IVideoDriver::addTexture +or IVideoDriver::getTexture. After that, the texture may only be used by this +VideoDriver. As you can imagine, textures of the DirectX and the OpenGL device +will, e.g., not be compatible. An exception is the Software device and the +NULL device, their textures are compatible. If you try to use a texture +created by one device with an other device, the device will refuse to do that +and write a warning or an error message to the output buffer. +*/ +class ITexture : public virtual IReferenceCounted +{ +public: + + //! constructor + ITexture(const io::path& name) : NamedPath(name) + { + } + + //! Lock function. + /** Locks the Texture and returns a pointer to access the + pixels. After lock() has been called and all operations on the pixels + are done, you must call unlock(). + Locks are not accumulating, hence one unlock will do for an arbitrary + number of previous locks. You should avoid locking different levels without + unlocking inbetween, though, because only the last level locked will be + unlocked. + The size of the i-th mipmap level is defined as max(getSize().Width>>i,1) + and max(getSize().Height>>i,1) + \param mode Specifies what kind of changes to the locked texture are + allowed. Unspecified behavior will arise if texture is written in read + only mode or read from in write only mode. + Support for this feature depends on the driver, so don't rely on the + texture being write-protected when locking with read-only, etc. + \param mipmapLevel Number of the mipmapLevel to lock. 0 is main texture. + Non-existing levels will silently fail and return 0. + \return Returns a pointer to the pixel data. The format of the pixel can + be determined by using getColorFormat(). 0 is returned, if + the texture cannot be locked. */ + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) = 0; + + //! Unlock function. Must be called after a lock() to the texture. + /** One should avoid to call unlock more than once before another lock. + The last locked mip level will be unlocked. */ + virtual void unlock() = 0; + + //! Get original size of the texture. + /** The texture is usually scaled, if it was created with an unoptimal + size. For example if the size was not a power of two. This method + returns the size of the texture it had before it was scaled. Can be + useful when drawing 2d images on the screen, which should have the + exact size of the original texture. Use ITexture::getSize() if you want + to know the real size it has now stored in the system. + \return The original size of the texture. */ + virtual const core::dimension2d& getOriginalSize() const = 0; + + //! Get dimension (=size) of the texture. + /** \return The size of the texture. */ + virtual const core::dimension2d& getSize() const = 0; + + //! Get driver type of texture. + /** This is the driver, which created the texture. This method is used + internally by the video devices, to check, if they may use a texture + because textures may be incompatible between different devices. + \return Driver type of texture. */ + virtual E_DRIVER_TYPE getDriverType() const = 0; + + //! Get the color format of texture. + /** \return The color format of texture. */ + virtual ECOLOR_FORMAT getColorFormat() const = 0; + + //! Get pitch of the main texture (in bytes). + /** The pitch is the amount of bytes used for a row of pixels in a + texture. + \return Pitch of texture in bytes. */ + virtual u32 getPitch() const = 0; + + //! Check whether the texture has MipMaps + /** \return True if texture has MipMaps, else false. */ + virtual bool hasMipMaps() const { return false; } + + //! Returns if the texture has an alpha channel + virtual bool hasAlpha() const { + return getColorFormat () == video::ECF_A8R8G8B8 || getColorFormat () == video::ECF_A1R5G5B5; + } + + //! Regenerates the mip map levels of the texture. + /** Required after modifying the texture, usually after calling unlock(). + \param mipmapData Optional parameter to pass in image data which will be + used instead of the previously stored or automatically generated mipmap + data. The data has to be a continuous pixel data for all mipmaps until + 1x1 pixel. Each mipmap has to be half the width and height of the previous + level. At least one pixel will be always kept.*/ + virtual void regenerateMipMapLevels(void* mipmapData=0) = 0; + + //! Check whether the texture is a render target + /** Render targets can be set as such in the video driver, in order to + render a scene into the texture. Once unbound as render target, they can + be used just as usual textures again. + \return True if this is a render target, otherwise false. */ + virtual bool isRenderTarget() const { return false; } + + //! Get name of texture (in most cases this is the filename) + const io::SNamedPath& getName() const { return NamedPath; } + +protected: + + //! Helper function, helps to get the desired texture creation format from the flags. + /** \return Either ETCF_ALWAYS_32_BIT, ETCF_ALWAYS_16_BIT, + ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED. */ + inline E_TEXTURE_CREATION_FLAG getTextureFormatFromFlags(u32 flags) + { + if (flags & ETCF_OPTIMIZED_FOR_SPEED) + return ETCF_OPTIMIZED_FOR_SPEED; + if (flags & ETCF_ALWAYS_16_BIT) + return ETCF_ALWAYS_16_BIT; + if (flags & ETCF_ALWAYS_32_BIT) + return ETCF_ALWAYS_32_BIT; + if (flags & ETCF_OPTIMIZED_FOR_QUALITY) + return ETCF_OPTIMIZED_FOR_QUALITY; + return ETCF_OPTIMIZED_FOR_SPEED; + } + + io::SNamedPath NamedPath; +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/ITimer.h b/src/others/irrlicht-1.8.1/include/ITimer.h new file mode 100644 index 0000000..815ebd6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ITimer.h @@ -0,0 +1,103 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_TIMER_H_INCLUDED__ +#define __I_TIMER_H_INCLUDED__ + +#include "IReferenceCounted.h" + +namespace irr +{ + +//! Interface for getting and manipulating the virtual time +class ITimer : public virtual IReferenceCounted +{ +public: + //! Returns current real time in milliseconds of the system. + /** This value does not start with 0 when the application starts. + For example in one implementation the value returned could be the + amount of milliseconds which have elapsed since the system was started. + */ + virtual u32 getRealTime() const = 0; + + enum EWeekday + { + EWD_SUNDAY=0, + EWD_MONDAY, + EWD_TUESDAY, + EWD_WEDNESDAY, + EWD_THURSDAY, + EWD_FRIDAY, + EWD_SATURDAY + }; + + struct RealTimeDate + { + // Hour of the day, from 0 to 23 + u32 Hour; + // Minute of the hour, from 0 to 59 + u32 Minute; + // Second of the minute, due to extra seconds from 0 to 61 + u32 Second; + // Year of the gregorian calender + s32 Year; + // Month of the year, from 1 to 12 + u32 Month; + // Day of the month, from 1 to 31 + u32 Day; + // Weekday for the current day + EWeekday Weekday; + // Day of the year, from 1 to 366 + u32 Yearday; + // Whether daylight saving is on + bool IsDST; + }; + + virtual RealTimeDate getRealTimeAndDate() const = 0; + + //! Returns current virtual time in milliseconds. + /** This value starts with 0 and can be manipulated using setTime(), + stopTimer(), startTimer(), etc. This value depends on the set speed of + the timer if the timer is stopped, etc. If you need the system time, + use getRealTime() */ + virtual u32 getTime() const = 0; + + //! sets current virtual time + virtual void setTime(u32 time) = 0; + + //! Stops the virtual timer. + /** The timer is reference counted, which means everything which calls + stop() will also have to call start(), otherwise the timer may not + start/stop correctly again. */ + virtual void stop() = 0; + + //! Starts the virtual timer. + /** The timer is reference counted, which means everything which calls + stop() will also have to call start(), otherwise the timer may not + start/stop correctly again. */ + virtual void start() = 0; + + //! Sets the speed of the timer + /** The speed is the factor with which the time is running faster or + slower then the real system time. */ + virtual void setSpeed(f32 speed = 1.0f) = 0; + + //! Returns current speed of the timer + /** The speed is the factor with which the time is running faster or + slower then the real system time. */ + virtual f32 getSpeed() const = 0; + + //! Returns if the virtual timer is currently stopped + virtual bool isStopped() const = 0; + + //! Advances the virtual time + /** Makes the virtual timer update the time value based on the real + time. This is called automatically when calling IrrlichtDevice::run(), + but you can call it manually if you don't use this method. */ + virtual void tick() = 0; +}; + +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/ITriangleSelector.h b/src/others/irrlicht-1.8.1/include/ITriangleSelector.h new file mode 100644 index 0000000..e2a2256 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/ITriangleSelector.h @@ -0,0 +1,131 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_TRIANGLE_SELECTOR_H_INCLUDED__ +#define __I_TRIANGLE_SELECTOR_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "triangle3d.h" +#include "aabbox3d.h" +#include "matrix4.h" +#include "line3d.h" + +namespace irr +{ +namespace scene +{ + +class ISceneNode; + +//! Interface to return triangles with specific properties. +/** Every ISceneNode may have a triangle selector, available with +ISceneNode::getTriangleScelector() or ISceneManager::createTriangleSelector. +This is used for doing collision detection: For example if you know, that a +collision may have happened in the area between (1,1,1) and (10,10,10), you +can get all triangles of the scene node in this area with the +ITriangleSelector easily and check every triangle if it collided. */ +class ITriangleSelector : public virtual IReferenceCounted +{ +public: + + //! Get amount of all available triangles in this selector + virtual s32 getTriangleCount() const = 0; + + //! Gets the triangles for one associated node. + /** + This returns all triangles for one scene node associated with this + selector. If there is more than one scene node associated (e.g. for + an IMetaTriangleSelector) this this function may be called multiple + times to retrieve all triangles. + \param triangles Array where the resulting triangles will be + written to. + \param arraySize Size of the target array. + \param outTriangleCount: Amount of triangles which have been written + into the array. + \param transform Pointer to matrix for transforming the triangles + before they are returned. Useful for example to scale all triangles + down into an ellipsoid space. If this pointer is null, no + transformation will be done. */ + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::matrix4* transform=0) const = 0; + + //! Gets the triangles for one associated node which may lie within a specific bounding box. + /** + This returns all triangles for one scene node associated with this + selector. If there is more than one scene node associated (e.g. for + an IMetaTriangleSelector) this this function may be called multiple + times to retrieve all triangles. + + This method will return at least the triangles that intersect the box, + but may return other triangles as well. + \param triangles Array where the resulting triangles will be written + to. + \param arraySize Size of the target array. + \param outTriangleCount Amount of triangles which have been written + into the array. + \param box Only triangles which are in this axis aligned bounding box + will be written into the array. + \param transform Pointer to matrix for transforming the triangles + before they are returned. Useful for example to scale all triangles + down into an ellipsoid space. If this pointer is null, no + transformation will be done. */ + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::aabbox3d& box, + const core::matrix4* transform=0) const = 0; + + //! Gets the triangles for one associated node which have or may have contact with a 3d line. + /** + This returns all triangles for one scene node associated with this + selector. If there is more than one scene node associated (e.g. for + an IMetaTriangleSelector) this this function may be called multiple + times to retrieve all triangles. + + Please note that unoptimized triangle selectors also may return + triangles which are not in contact at all with the 3d line. + \param triangles Array where the resulting triangles will be written + to. + \param arraySize Size of the target array. + \param outTriangleCount Amount of triangles which have been written + into the array. + \param line Only triangles which may be in contact with this 3d line + will be written into the array. + \param transform Pointer to matrix for transforming the triangles + before they are returned. Useful for example to scale all triangles + down into an ellipsoid space. If this pointer is null, no + transformation will be done. */ + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d& line, + const core::matrix4* transform=0) const = 0; + + //! Get scene node associated with a given triangle. + /** + This allows to find which scene node (potentially of several) is + associated with a specific triangle. + + \param triangleIndex: the index of the triangle for which you want to find + the associated scene node. + \return The scene node associated with that triangle. + */ + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0; + + //! Get number of TriangleSelectors that are part of this one + /** Only useful for MetaTriangleSelector, others return 1 + */ + virtual u32 getSelectorCount() const = 0; + + //! Get TriangleSelector based on index based on getSelectorCount + /** Only useful for MetaTriangleSelector, others return 'this' or 0 + */ + virtual ITriangleSelector* getSelector(u32 index) = 0; + + //! Get TriangleSelector based on index based on getSelectorCount + /** Only useful for MetaTriangleSelector, others return 'this' or 0 + */ + virtual const ITriangleSelector* getSelector(u32 index) const = 0; +}; + +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/IVertexBuffer.h b/src/others/irrlicht-1.8.1/include/IVertexBuffer.h new file mode 100644 index 0000000..87603de --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IVertexBuffer.h @@ -0,0 +1,52 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_VERTEX_BUFFER_H_INCLUDED__ +#define __I_VERTEX_BUFFER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrArray.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace scene +{ + + class IVertexBuffer : public virtual IReferenceCounted + { + public: + virtual void* getData() =0; + virtual video::E_VERTEX_TYPE getType() const =0; + virtual void setType(video::E_VERTEX_TYPE vertexType) =0; + virtual u32 stride() const =0; + virtual u32 size() const =0; + virtual void push_back(const video::S3DVertex &element) =0; + virtual video::S3DVertex& operator [](const u32 index) const =0; + virtual video::S3DVertex& getLast() =0; + virtual void set_used(u32 usedNow) =0; + virtual void reallocate(u32 new_size) =0; + virtual u32 allocated_size() const =0; + virtual video::S3DVertex* pointer() =0; + + //! get the current hardware mapping hint + virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0; + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0; + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty() =0; + + //! Get the currently used ID for identification of changes. + /** This shouldn't be used for anything outside the VideoDriver. */ + virtual u32 getChangedID() const = 0; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IVideoDriver.h b/src/others/irrlicht-1.8.1/include/IVideoDriver.h new file mode 100644 index 0000000..8af6607 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IVideoDriver.h @@ -0,0 +1,1471 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_I_VIDEO_DRIVER_H_INCLUDED__ +#define __IRR_I_VIDEO_DRIVER_H_INCLUDED__ + +#include "rect.h" +#include "SColor.h" +#include "ITexture.h" +#include "irrArray.h" +#include "matrix4.h" +#include "plane3d.h" +#include "dimension2d.h" +#include "position2d.h" +#include "SMaterial.h" +#include "IMeshBuffer.h" +#include "triangle3d.h" +#include "EDriverTypes.h" +#include "EDriverFeatures.h" +#include "SExposedVideoData.h" + +namespace irr +{ +namespace io +{ + class IAttributes; + struct SAttributeReadWriteOptions; + class IReadFile; + class IWriteFile; +} // end namespace io +namespace scene +{ + class IMeshBuffer; + class IMesh; + class IMeshManipulator; + class ISceneNode; +} // end namespace scene + +namespace video +{ + struct S3DVertex; + struct S3DVertex2TCoords; + struct S3DVertexTangents; + struct SLight; + class IImageLoader; + class IImageWriter; + class IMaterialRenderer; + class IGPUProgrammingServices; + + //! enumeration for geometry transformation states + enum E_TRANSFORMATION_STATE + { + //! View transformation + ETS_VIEW = 0, + //! World transformation + ETS_WORLD, + //! Projection transformation + ETS_PROJECTION, + //! Texture transformation + ETS_TEXTURE_0, + //! Texture transformation + ETS_TEXTURE_1, + //! Texture transformation + ETS_TEXTURE_2, + //! Texture transformation + ETS_TEXTURE_3, +#if _IRR_MATERIAL_MAX_TEXTURES_>4 + //! Texture transformation + ETS_TEXTURE_4, +#if _IRR_MATERIAL_MAX_TEXTURES_>5 + //! Texture transformation + ETS_TEXTURE_5, +#if _IRR_MATERIAL_MAX_TEXTURES_>6 + //! Texture transformation + ETS_TEXTURE_6, +#if _IRR_MATERIAL_MAX_TEXTURES_>7 + //! Texture transformation + ETS_TEXTURE_7, +#endif +#endif +#endif +#endif + //! Not used + ETS_COUNT + }; + + //! enumeration for signaling resources which were lost after the last render cycle + /** These values can be signaled by the driver, telling the app that some resources + were lost and need to be recreated. Irrlicht will sometimes recreate the actual objects, + but the content needs to be recreated by the application. */ + enum E_LOST_RESOURCE + { + //! The whole device/driver is lost + ELR_DEVICE = 1, + //! All texture are lost, rare problem + ELR_TEXTURES = 2, + //! The Render Target Textures are lost, typical problem for D3D + ELR_RTTS = 4, + //! The HW buffers are lost, will be recreated automatically, but might require some more time this frame + ELR_HW_BUFFERS = 8 + }; + + //! Special render targets, which usually map to dedicated hardware + /** These render targets (besides 0 and 1) need not be supported by gfx cards */ + enum E_RENDER_TARGET + { + //! Render target is the main color frame buffer + ERT_FRAME_BUFFER=0, + //! Render target is a render texture + ERT_RENDER_TEXTURE, + //! Multi-Render target textures + ERT_MULTI_RENDER_TEXTURES, + //! Render target is the main color frame buffer + ERT_STEREO_LEFT_BUFFER, + //! Render target is the right color buffer (left is the main buffer) + ERT_STEREO_RIGHT_BUFFER, + //! Render to both stereo buffers at once + ERT_STEREO_BOTH_BUFFERS, + //! Auxiliary buffer 0 + ERT_AUX_BUFFER0, + //! Auxiliary buffer 1 + ERT_AUX_BUFFER1, + //! Auxiliary buffer 2 + ERT_AUX_BUFFER2, + //! Auxiliary buffer 3 + ERT_AUX_BUFFER3, + //! Auxiliary buffer 4 + ERT_AUX_BUFFER4 + }; + + //! Enum for the types of fog distributions to choose from + enum E_FOG_TYPE + { + EFT_FOG_EXP=0, + EFT_FOG_LINEAR, + EFT_FOG_EXP2 + }; + + const c8* const FogTypeNames[] = + { + "FogExp", + "FogLinear", + "FogExp2", + 0 + }; + + struct SOverrideMaterial + { + //! The Material values + SMaterial Material; + //! Which values are taken for override + /** OR'ed values from E_MATERIAL_FLAGS. */ + u32 EnableFlags; + //! Set in which render passes the material override is active. + /** OR'ed values from E_SCENE_NODE_RENDER_PASS. */ + u16 EnablePasses; + //! Global enable flag, overwritten by the SceneManager in each pass + /** The Scenemanager uses the EnablePass array and sets Enabled to + true if the Override material is enabled in the current pass. */ + bool Enabled; + + //! Default constructor + SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) {} + + //! Apply the enabled overrides + void apply(SMaterial& material) + { + if (Enabled) + { + for (u32 i=0; i<32; ++i) + { + const u32 num=(1<* sourceRect=0) =0; + + //! Presents the rendered image to the screen. + /** Applications must call this method after performing any + rendering. + \return False if failed and true if succeeded. */ + virtual bool endScene() =0; + + //! Queries the features of the driver. + /** Returns true if a feature is available + \param feature Feature to query. + \return True if the feature is available, false if not. */ + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const =0; + + //! Disable a feature of the driver. + /** Can also be used to enable the features again. It is not + possible to enable unsupported features this way, though. + \param feature Feature to disable. + \param flag When true the feature is disabled, otherwise it is enabled. */ + virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) =0; + + //! Get attributes of the actual video driver + /** The following names can be queried for the given types: + MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. + MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. + MaxLights (int) Number of hardware lights supported in the fixed function pipieline of the driver, typically 6-8. Use light manager or deferred shading for more. + MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. + MaxUserClipPlanes (int) Number of additional clip planes, which can be set by the user via dedicated driver methods. + MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL + MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. + MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer). + MaxTextureSize (int) Dimension that a texture may have, both in width and height. + MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far. + MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems. + Version (int) Version of the driver. Should be Major*100+Minor + ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor. + AntiAlias (int) Number of Samples the driver uses for each pixel. 0 and 1 means anti aliasing is off, typical values are 2,4,8,16,32 + */ + virtual const io::IAttributes& getDriverAttributes() const=0; + + //! Check if the driver was recently reset. + /** For d3d devices you will need to recreate the RTTs if the + driver was reset. Should be queried right after beginScene(). + */ + virtual bool checkDriverReset() =0; + + //! Sets transformation matrices. + /** \param state Transformation type to be set, e.g. view, + world, or projection. + \param mat Matrix describing the transformation. */ + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) =0; + + //! Returns the transformation set by setTransform + /** \param state Transformation type to query + \return Matrix describing the transformation. */ + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const =0; + + //! Retrieve the number of image loaders + /** \return Number of image loaders */ + virtual u32 getImageLoaderCount() const = 0; + + //! Retrieve the given image loader + /** \param n The index of the loader to retrieve. This parameter is an 0-based + array index. + \return A pointer to the specified loader, 0 if the index is incorrect. */ + virtual IImageLoader* getImageLoader(u32 n) = 0; + + //! Retrieve the number of image writers + /** \return Number of image writers */ + virtual u32 getImageWriterCount() const = 0; + + //! Retrieve the given image writer + /** \param n The index of the writer to retrieve. This parameter is an 0-based + array index. + \return A pointer to the specified writer, 0 if the index is incorrect. */ + virtual IImageWriter* getImageWriter(u32 n) = 0; + + //! Sets a material. + /** All 3d drawing functions will draw geometry using this material thereafter. + \param material: Material to be used from now on. */ + virtual void setMaterial(const SMaterial& material) =0; + + //! Get access to a named texture. + /** Loads the texture from disk if it is not + already loaded and generates mipmap levels if desired. + Texture loading can be influenced using the + setTextureCreationFlag() method. The texture can be in several + imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD. + \param filename Filename of the texture to be loaded. + \return Pointer to the texture, or 0 if the texture + could not be loaded. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual ITexture* getTexture(const io::path& filename) = 0; + + //! Get access to a named texture. + /** Loads the texture from disk if it is not + already loaded and generates mipmap levels if desired. + Texture loading can be influenced using the + setTextureCreationFlag() method. The texture can be in several + imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD. + \param file Pointer to an already opened file. + \return Pointer to the texture, or 0 if the texture + could not be loaded. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual ITexture* getTexture(io::IReadFile* file) =0; + + //! Returns a texture by index + /** \param index: Index of the texture, must be smaller than + getTextureCount() Please note that this index might change when + adding or removing textures + \return Pointer to the texture, or 0 if the texture was not + set or index is out of bounds. This pointer should not be + dropped. See IReferenceCounted::drop() for more information. */ + virtual ITexture* getTextureByIndex(u32 index) =0; + + //! Returns amount of textures currently loaded + /** \return Amount of textures currently loaded */ + virtual u32 getTextureCount() const = 0; + + //! Renames a texture + /** \param texture Pointer to the texture to rename. + \param newName New name for the texture. This should be a unique name. */ + virtual void renameTexture(ITexture* texture, const io::path& newName) = 0; + + //! Creates an empty texture of specified size. + /** \param size: Size of the texture. + \param name A name for the texture. Later calls to + getTexture() with this name will return this texture + \param format Desired color format of the texture. Please note + that the driver may choose to create the texture in another + color format. + \return Pointer to the newly created texture. This pointer + should not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual ITexture* addTexture(const core::dimension2d& size, + const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0; + + //! Creates a texture from an IImage. + /** \param name A name for the texture. Later calls of + getTexture() with this name will return this texture + \param image Image the texture is created from. + \param mipmapData Optional pointer to a set of images which + build up the whole mipmap set. Must be images of the same color + type as image. If this parameter is not given, the mipmaps are + derived from image. + \return Pointer to the newly created texture. This pointer + should not be dropped. See IReferenceCounted::drop() for more + information. */ + virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0; + + //! Adds a new render target texture to the texture cache. + /** \param size Size of the texture, in pixels. Width and + height should be a power of two (e.g. 64, 128, 256, 512, ...) + and it should not be bigger than the backbuffer, because it + shares the zbuffer with the screen buffer. + \param name An optional name for the RTT. + \param format The color format of the render target. Floating point formats are supported. + \return Pointer to the created texture or 0 if the texture + could not be created. This pointer should not be dropped. See + IReferenceCounted::drop() for more information. */ + virtual ITexture* addRenderTargetTexture(const core::dimension2d& size, + const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0; + + //! Removes a texture from the texture cache and deletes it. + /** This method can free a lot of memory! + Please note that after calling this, the pointer to the + ITexture may no longer be valid, if it was not grabbed before + by other parts of the engine for storing it longer. So it is a + good idea to set all materials which are using this texture to + 0 or another texture first. + \param texture Texture to delete from the engine cache. */ + virtual void removeTexture(ITexture* texture) =0; + + //! Removes all textures from the texture cache and deletes them. + /** This method can free a lot of memory! + Please note that after calling this, the pointer to the + ITexture may no longer be valid, if it was not grabbed before + by other parts of the engine for storing it longer. So it is a + good idea to set all materials which are using this texture to + 0 or another texture first. */ + virtual void removeAllTextures() =0; + + //! Remove hardware buffer + virtual void removeHardwareBuffer(const scene::IMeshBuffer* mb) =0; + + //! Remove all hardware buffers + virtual void removeAllHardwareBuffers() =0; + + //! Create occlusion query. + /** Use node for identification and mesh for occlusion test. */ + virtual void addOcclusionQuery(scene::ISceneNode* node, + const scene::IMesh* mesh=0) =0; + + //! Remove occlusion query. + virtual void removeOcclusionQuery(scene::ISceneNode* node) =0; + + //! Remove all occlusion queries. + virtual void removeAllOcclusionQueries() =0; + + //! Run occlusion query. Draws mesh stored in query. + /** If the mesh shall not be rendered visible, use + overrideMaterial to disable the color and depth buffer. */ + virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false) =0; + + //! Run all occlusion queries. Draws all meshes stored in queries. + /** If the meshes shall not be rendered visible, use + overrideMaterial to disable the color and depth buffer. */ + virtual void runAllOcclusionQueries(bool visible=false) =0; + + //! Update occlusion query. Retrieves results from GPU. + /** If the query shall not block, set the flag to false. + Update might not occur in this case, though */ + virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true) =0; + + //! Update all occlusion queries. Retrieves results from GPU. + /** If the query shall not block, set the flag to false. + Update might not occur in this case, though */ + virtual void updateAllOcclusionQueries(bool block=true) =0; + + //! Return query result. + /** Return value is the number of visible pixels/fragments. + The value is a safe approximation, i.e. can be larger than the + actual value of pixels. */ + virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const =0; + + //! Sets a boolean alpha channel on the texture based on a color key. + /** This makes the texture fully transparent at the texels where + this color key can be found when using for example draw2DImage + with useAlphachannel==true. The alpha of other texels is not modified. + \param texture Texture whose alpha channel is modified. + \param color Color key color. Every texel with this color will + become fully transparent as described above. Please note that the + colors of a texture may be converted when loading it, so the + color values may not be exactly the same in the engine and for + example in picture edit programs. To avoid this problem, you + could use the makeColorKeyTexture method, which takes the + position of a pixel instead a color value. + \param zeroTexels \deprecated If set to true, then any texels that match + the color key will have their color, as well as their alpha, set to zero + (i.e. black). This behavior matches the legacy (buggy) behavior prior + to release 1.5 and is provided for backwards compatibility only. + This parameter may be removed by Irrlicht 1.9. */ + virtual void makeColorKeyTexture(video::ITexture* texture, + video::SColor color, + bool zeroTexels = false) const =0; + + //! Sets a boolean alpha channel on the texture based on the color at a position. + /** This makes the texture fully transparent at the texels where + the color key can be found when using for example draw2DImage + with useAlphachannel==true. The alpha of other texels is not modified. + \param texture Texture whose alpha channel is modified. + \param colorKeyPixelPos Position of a pixel with the color key + color. Every texel with this color will become fully transparent as + described above. + \param zeroTexels \deprecated If set to true, then any texels that match + the color key will have their color, as well as their alpha, set to zero + (i.e. black). This behavior matches the legacy (buggy) behavior prior + to release 1.5 and is provided for backwards compatibility only. + This parameter may be removed by Irrlicht 1.9. */ + virtual void makeColorKeyTexture(video::ITexture* texture, + core::position2d colorKeyPixelPos, + bool zeroTexels = false) const =0; + + //! Creates a normal map from a height map texture. + /** If the target texture has 32 bit, the height value is + stored in the alpha component of the texture as addition. This + value is used by the video::EMT_PARALLAX_MAP_SOLID material and + similar materials. + \param texture Texture whose alpha channel is modified. + \param amplitude Constant value by which the height + information is multiplied.*/ + virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const =0; + + //! Sets a new render target. + /** This will only work if the driver supports the + EVDF_RENDER_TO_TARGET feature, which can be queried with + queryFeature(). Usually, rendering to textures is done in this + way: + \code + // create render target + ITexture* target = driver->addRenderTargetTexture(core::dimension2d(128,128), "rtt1"); + + // ... + + driver->setRenderTarget(target); // set render target + // .. draw stuff here + driver->setRenderTarget(0); // set previous render target + \endcode + Please note that you cannot render 3D or 2D geometry with a + render target as texture on it when you are rendering the scene + into this render target at the same time. It is usually only + possible to render into a texture between the + IVideoDriver::beginScene() and endScene() method calls. + \param texture New render target. Must be a texture created with + IVideoDriver::addRenderTargetTexture(). If set to 0, it sets + the previous render target which was set before the last + setRenderTarget() call. + \param clearBackBuffer Clears the backbuffer of the render + target with the color parameter + \param clearZBuffer Clears the zBuffer of the rendertarget. + Note that because the frame buffer may share the zbuffer with + the rendertarget, its zbuffer might be partially cleared too + by this. + \param color The background color for the render target. + \return True if sucessful and false if not. */ + virtual bool setRenderTarget(video::ITexture* texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)) =0; + + //! set or reset special render targets + /** This method enables access to special color buffers such as + stereoscopic buffers or auxiliary buffers. + \param target Enum value for the render target + \param clearTarget Clears the target buffer with the color + parameter + \param clearZBuffer Clears the zBuffer of the rendertarget. + Note that because the main frame buffer may share the zbuffer with + the rendertarget, its zbuffer might be partially cleared too + by this. + \param color The background color for the render target. + \return True if sucessful and false if not. */ + virtual bool setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true, + bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)) =0; + + //! Sets new multiple render targets. + virtual bool setRenderTarget(const core::array& texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)) =0; + + //! Sets a new viewport. + /** Every rendering operation is done into this new area. + \param area: Rectangle defining the new area of rendering + operations. */ + virtual void setViewPort(const core::rect& area) =0; + + //! Gets the area of the current viewport. + /** \return Rectangle of the current viewport. */ + virtual const core::rect& getViewPort() const =0; + + //! Draws a vertex primitive list + /** Note that, depending on the index type, some vertices might be not + accessible through the index list. The limit is at 65535 vertices for 16bit + indices. Please note that currently not all primitives are available for + all drivers, and some might be emulated via triangle renders. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. These define the vertices used + for each primitive. Depending on the pType, indices are interpreted as single + objects (for point like primitives), pairs (for lines), triplets (for + triangles), or quads. + \param primCount Amount of Primitives + \param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex. + \param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan. + \param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */ + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primCount, + E_VERTEX_TYPE vType=EVT_STANDARD, + scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, + E_INDEX_TYPE iType=EIT_16BIT) =0; + + //! Draws a vertex primitive list in 2d + /** Compared to the general (3d) version of this method, this + one sets up a 2d render mode, and uses only x and y of vectors. + Note that, depending on the index type, some vertices might be + not accessible through the index list. The limit is at 65535 + vertices for 16bit indices. Please note that currently not all + primitives are available for all drivers, and some might be + emulated via triangle renders. This function is not available + for the sw drivers. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. These define the + vertices used for each primitive. Depending on the pType, + indices are interpreted as single objects (for point like + primitives), pairs (for lines), triplets (for triangles), or + quads. + \param primCount Amount of Primitives + \param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex. + \param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan. + \param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */ + virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primCount, + E_VERTEX_TYPE vType=EVT_STANDARD, + scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, + E_INDEX_TYPE iType=EIT_16BIT) =0; + + //! Draws an indexed triangle list. + /** Note that there may be at maximum 65536 vertices, because + the index list is an array of 16 bit values each with a maximum + value of 65536. If there are more than 65536 vertices in the + list, results of this operation are not defined. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. + \param triangleCount Amount of Triangles. Usually amount of indices / 3. */ + void drawIndexedTriangleList(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + { + drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT); + } + + //! Draws an indexed triangle list. + /** Note that there may be at maximum 65536 vertices, because + the index list is an array of 16 bit values each with a maximum + value of 65536. If there are more than 65536 vertices in the + list, results of this operation are not defined. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. + \param triangleCount Amount of Triangles. Usually amount of indices / 3. */ + void drawIndexedTriangleList(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + { + drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT); + } + + //! Draws an indexed triangle list. + /** Note that there may be at maximum 65536 vertices, because + the index list is an array of 16 bit values each with a maximum + value of 65536. If there are more than 65536 vertices in the + list, results of this operation are not defined. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. + \param triangleCount Amount of Triangles. Usually amount of indices / 3. */ + void drawIndexedTriangleList(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + { + drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT); + } + + //! Draws an indexed triangle fan. + /** Note that there may be at maximum 65536 vertices, because + the index list is an array of 16 bit values each with a maximum + value of 65536. If there are more than 65536 vertices in the + list, results of this operation are not defined. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. + \param triangleCount Amount of Triangles. Usually amount of indices - 2. */ + void drawIndexedTriangleFan(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + { + drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT); + } + + //! Draws an indexed triangle fan. + /** Note that there may be at maximum 65536 vertices, because + the index list is an array of 16 bit values each with a maximum + value of 65536. If there are more than 65536 vertices in the + list, results of this operation are not defined. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. + \param triangleCount Amount of Triangles. Usually amount of indices - 2. */ + void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + { + drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT); + } + + //! Draws an indexed triangle fan. + /** Note that there may be at maximum 65536 vertices, because + the index list is an array of 16 bit values each with a maximum + value of 65536. If there are more than 65536 vertices in the + list, results of this operation are not defined. + \param vertices Pointer to array of vertices. + \param vertexCount Amount of vertices in the array. + \param indexList Pointer to array of indices. + \param triangleCount Amount of Triangles. Usually amount of indices - 2. */ + void drawIndexedTriangleFan(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + { + drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT); + } + + //! Draws a 3d line. + /** For some implementations, this method simply calls + drawVertexPrimitiveList for some triangles. + Note that the line is drawn using the current transformation + matrix and material. So if you need to draw the 3D line + independently of the current transformation, use + \code + driver->setMaterial(someMaterial); + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); + \endcode + for some properly set up material before drawing the line. + Some drivers support line thickness set in the material. + \param start Start of the 3d line. + \param end End of the 3d line. + \param color Color of the line. */ + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color = SColor(255,255,255,255)) =0; + + //! Draws a 3d triangle. + /** This method calls drawVertexPrimitiveList for some triangles. + This method works with all drivers because it simply calls + drawVertexPrimitiveList, but it is hence not very fast. + Note that the triangle is drawn using the current + transformation matrix and material. So if you need to draw it + independently of the current transformation, use + \code + driver->setMaterial(someMaterial); + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); + \endcode + for some properly set up material before drawing the triangle. + \param triangle The triangle to draw. + \param color Color of the line. */ + virtual void draw3DTriangle(const core::triangle3df& triangle, + SColor color = SColor(255,255,255,255)) =0; + + //! Draws a 3d axis aligned box. + /** This method simply calls draw3DLine for the edges of the + box. Note that the box is drawn using the current transformation + matrix and material. So if you need to draw it independently of + the current transformation, use + \code + driver->setMaterial(someMaterial); + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); + \endcode + for some properly set up material before drawing the box. + \param box The axis aligned box to draw + \param color Color to use while drawing the box. */ + virtual void draw3DBox(const core::aabbox3d& box, + SColor color = SColor(255,255,255,255)) =0; + + //! Draws a 2d image without any special effects + /** \param texture Pointer to texture to use. + \param destPos Upper left 2d destination position where the + image will be drawn. */ + virtual void draw2DImage(const video::ITexture* texture, + const core::position2d& destPos) =0; + + //! Draws a 2d image using a color + /** (if color is other than + Color(255,255,255,255)) and the alpha channel of the texture. + \param texture Texture to be drawn. + \param destPos Upper left 2d destination position where the + image will be drawn. + \param sourceRect Source rectangle in the image. + \param clipRect Pointer to rectangle on the screen where the + image is clipped to. + If this pointer is NULL the image is not clipped. + \param color Color with which the image is drawn. If the color + equals Color(255,255,255,255) it is ignored. Note that the + alpha component is used: If alpha is other than 255, the image + will be transparent. + \param useAlphaChannelOfTexture: If true, the alpha channel of + the texture is used to draw the image.*/ + virtual void draw2DImage(const video::ITexture* texture, const core::position2d& destPos, + const core::rect& sourceRect, const core::rect* clipRect =0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0; + + //! Draws a set of 2d images, using a color and the alpha channel of the texture. + /** The images are drawn beginning at pos and concatenated in + one line. All drawings are clipped against clipRect (if != 0). + The subtextures are defined by the array of sourceRects and are + chosen by the indices given. + \param texture Texture to be drawn. + \param pos Upper left 2d destination position where the image + will be drawn. + \param sourceRects Source rectangles of the image. + \param indices List of indices which choose the actual + rectangle used each time. + \param kerningWidth Offset to Position on X + \param clipRect Pointer to rectangle on the screen where the + image is clipped to. + If this pointer is 0 then the image is not clipped. + \param color Color with which the image is drawn. + Note that the alpha component is used. If alpha is other than + 255, the image will be transparent. + \param useAlphaChannelOfTexture: If true, the alpha channel of + the texture is used to draw the image. */ + virtual void draw2DImageBatch(const video::ITexture* texture, + const core::position2d& pos, + const core::array >& sourceRects, + const core::array& indices, + s32 kerningWidth=0, + const core::rect* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false) =0; + + //! Draws a set of 2d images, using a color and the alpha channel of the texture. + /** All drawings are clipped against clipRect (if != 0). + The subtextures are defined by the array of sourceRects and are + positioned using the array of positions. + \param texture Texture to be drawn. + \param positions Array of upper left 2d destinations where the + images will be drawn. + \param sourceRects Source rectangles of the image. + \param clipRect Pointer to rectangle on the screen where the + images are clipped to. + If this pointer is 0 then the image is not clipped. + \param color Color with which the image is drawn. + Note that the alpha component is used. If alpha is other than + 255, the image will be transparent. + \param useAlphaChannelOfTexture: If true, the alpha channel of + the texture is used to draw the image. */ + virtual void draw2DImageBatch(const video::ITexture* texture, + const core::array >& positions, + const core::array >& sourceRects, + const core::rect* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false) =0; + + //! Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used. + /** Suggested and first implemented by zola. + \param texture The texture to draw from + \param destRect The rectangle to draw into + \param sourceRect The rectangle denoting a part of the texture + \param clipRect Clips the destination rectangle (may be 0) + \param colors Array of 4 colors denoting the color values of + the corners of the destRect + \param useAlphaChannelOfTexture True if alpha channel will be + blended. */ + virtual void draw2DImage(const video::ITexture* texture, const core::rect& destRect, + const core::rect& sourceRect, const core::rect* clipRect =0, + const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) =0; + + //! Draws a 2d rectangle. + /** \param color Color of the rectangle to draw. The alpha + component will not be ignored and specifies how transparent the + rectangle will be. + \param pos Position of the rectangle. + \param clip Pointer to rectangle against which the rectangle + will be clipped. If the pointer is null, no clipping will be + performed. */ + virtual void draw2DRectangle(SColor color, const core::rect& pos, + const core::rect* clip =0) =0; + + //! Draws a 2d rectangle with a gradient. + /** \param colorLeftUp Color of the upper left corner to draw. + The alpha component will not be ignored and specifies how + transparent the rectangle will be. + \param colorRightUp Color of the upper right corner to draw. + The alpha component will not be ignored and specifies how + transparent the rectangle will be. + \param colorLeftDown Color of the lower left corner to draw. + The alpha component will not be ignored and specifies how + transparent the rectangle will be. + \param colorRightDown Color of the lower right corner to draw. + The alpha component will not be ignored and specifies how + transparent the rectangle will be. + \param pos Position of the rectangle. + \param clip Pointer to rectangle against which the rectangle + will be clipped. If the pointer is null, no clipping will be + performed. */ + virtual void draw2DRectangle(const core::rect& pos, + SColor colorLeftUp, SColor colorRightUp, + SColor colorLeftDown, SColor colorRightDown, + const core::rect* clip =0) =0; + + //! Draws the outline of a 2D rectangle. + /** \param pos Position of the rectangle. + \param color Color of the rectangle to draw. The alpha component + specifies how transparent the rectangle outline will be. */ + virtual void draw2DRectangleOutline(const core::recti& pos, + SColor color=SColor(255,255,255,255)) =0; + + //! Draws a 2d line. Both start and end will be included in coloring. + /** \param start Screen coordinates of the start of the line + in pixels. + \param end Screen coordinates of the start of the line in + pixels. + \param color Color of the line to draw. */ + virtual void draw2DLine(const core::position2d& start, + const core::position2d& end, + SColor color=SColor(255,255,255,255)) =0; + + //! Draws a pixel. + /** \param x The x-position of the pixel. + \param y The y-position of the pixel. + \param color Color of the pixel to draw. */ + virtual void drawPixel(u32 x, u32 y, const SColor& color) =0; + + //! Draws a non filled concyclic regular 2d polyon. + /** This method can be used to draw circles, but also + triangles, tetragons, pentagons, hexagons, heptagons, octagons, + enneagons, decagons, hendecagons, dodecagon, triskaidecagons, + etc. I think you'll got it now. And all this by simply + specifying the vertex count. Welcome to the wonders of + geometry. + \param center Position of center of circle (pixels). + \param radius Radius of circle in pixels. + \param color Color of the circle. + \param vertexCount Amount of vertices of the polygon. Specify 2 + to draw a line, 3 to draw a triangle, 4 for tetragons and a lot + (>10) for nearly a circle. */ + virtual void draw2DPolygon(core::position2d center, + f32 radius, + video::SColor color=SColor(100,255,255,255), + s32 vertexCount=10) =0; + + //! Draws a shadow volume into the stencil buffer. + /** To draw a stencil shadow, do this: First, draw all geometry. + Then use this method, to draw the shadow volume. Then, use + IVideoDriver::drawStencilShadow() to visualize the shadow. + Please note that the code for the opengl version of the method + is based on free code sent in by Philipp Dortmann, lots of + thanks go to him! + \param triangles Array of 3d vectors, specifying the shadow + volume. + \param zfail If set to true, zfail method is used, otherwise + zpass. + \param debugDataVisible The debug data that is enabled for this + shadow node + */ + virtual void drawStencilShadowVolume(const core::array& triangles, bool zfail=true, u32 debugDataVisible=0) =0; + + //! Fills the stencil shadow with color. + /** After the shadow volume has been drawn into the stencil + buffer using IVideoDriver::drawStencilShadowVolume(), use this + to draw the color of the shadow. + Please note that the code for the opengl version of the method + is based on free code sent in by Philipp Dortmann, lots of + thanks go to him! + \param clearStencilBuffer Set this to false, if you want to + draw every shadow with the same color, and only want to call + drawStencilShadow() once after all shadow volumes have been + drawn. Set this to true, if you want to paint every shadow with + its own color. + \param leftUpEdge Color of the shadow in the upper left corner + of screen. + \param rightUpEdge Color of the shadow in the upper right + corner of screen. + \param leftDownEdge Color of the shadow in the lower left + corner of screen. + \param rightDownEdge Color of the shadow in the lower right + corner of screen. */ + virtual void drawStencilShadow(bool clearStencilBuffer=false, + video::SColor leftUpEdge = video::SColor(255,0,0,0), + video::SColor rightUpEdge = video::SColor(255,0,0,0), + video::SColor leftDownEdge = video::SColor(255,0,0,0), + video::SColor rightDownEdge = video::SColor(255,0,0,0)) =0; + + //! Draws a mesh buffer + /** \param mb Buffer to draw */ + virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) =0; + + //! Draws normals of a mesh buffer + /** \param mb Buffer to draw the normals of + \param length length scale factor of the normals + \param color Color the normals are rendered with + */ + virtual void drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length=10.f, SColor color=0xffffffff) =0; + + //! Sets the fog mode. + /** These are global values attached to each 3d object rendered, + which has the fog flag enabled in its material. + \param color Color of the fog + \param fogType Type of fog used + \param start Only used in linear fog mode (linearFog=true). + Specifies where fog starts. + \param end Only used in linear fog mode (linearFog=true). + Specifies where fog ends. + \param density Only used in exponential fog mode + (linearFog=false). Must be a value between 0 and 1. + \param pixelFog Set this to false for vertex fog, and true if + you want per-pixel fog. + \param rangeFog Set this to true to enable range-based vertex + fog. The distance from the viewer is used to compute the fog, + not the z-coordinate. This is better, but slower. This might not + be available with all drivers and fog settings. */ + virtual void setFog(SColor color=SColor(0,255,255,255), + E_FOG_TYPE fogType=EFT_FOG_LINEAR, + f32 start=50.0f, f32 end=100.0f, f32 density=0.01f, + bool pixelFog=false, bool rangeFog=false) =0; + + //! Gets the fog mode. + virtual void getFog(SColor& color, E_FOG_TYPE& fogType, + f32& start, f32& end, f32& density, + bool& pixelFog, bool& rangeFog) = 0; + + //! Get the current color format of the color buffer + /** \return Color format of the color buffer. */ + virtual ECOLOR_FORMAT getColorFormat() const =0; + + //! Get the size of the screen or render window. + /** \return Size of screen or render window. */ + virtual const core::dimension2d& getScreenSize() const =0; + + //! Get the size of the current render target + /** This method will return the screen size if the driver + doesn't support render to texture, or if the current render + target is the screen. + \return Size of render target or screen/window */ + virtual const core::dimension2d& getCurrentRenderTargetSize() const =0; + + //! Returns current frames per second value. + /** This value is updated approximately every 1.5 seconds and + is only intended to provide a rough guide to the average frame + rate. It is not suitable for use in performing timing + calculations or framerate independent movement. + \return Approximate amount of frames per second drawn. */ + virtual s32 getFPS() const =0; + + //! Returns amount of primitives (mostly triangles) which were drawn in the last frame. + /** Together with getFPS() very useful method for statistics. + \param mode Defines if the primitives drawn are accumulated or + counted per frame. + \return Amount of primitives drawn in the last frame. */ + virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0; + + //! Deletes all dynamic lights which were previously added with addDynamicLight(). + virtual void deleteAllDynamicLights() =0; + + //! adds a dynamic light, returning an index to the light + //! \param light: the light data to use to create the light + //! \return An index to the light, or -1 if an error occurs + virtual s32 addDynamicLight(const SLight& light) =0; + + //! Returns the maximal amount of dynamic lights the device can handle + /** \return Maximal amount of dynamic lights. */ + virtual u32 getMaximalDynamicLightAmount() const =0; + + //! Returns amount of dynamic lights currently set + /** \return Amount of dynamic lights currently set */ + virtual u32 getDynamicLightCount() const =0; + + //! Returns light data which was previously set by IVideoDriver::addDynamicLight(). + /** \param idx Zero based index of the light. Must be 0 or + greater and smaller than IVideoDriver::getDynamicLightCount. + \return Light data. */ + virtual const SLight& getDynamicLight(u32 idx) const =0; + + //! Turns a dynamic light on or off + //! \param lightIndex: the index returned by addDynamicLight + //! \param turnOn: true to turn the light on, false to turn it off + virtual void turnLightOn(s32 lightIndex, bool turnOn) =0; + + //! Gets name of this video driver. + /** \return Returns the name of the video driver, e.g. in case + of the Direct3D8 driver, it would return "Direct3D 8.1". */ + virtual const wchar_t* getName() const =0; + + //! Adds an external image loader to the engine. + /** This is useful if the Irrlicht Engine should be able to load + textures of currently unsupported file formats (e.g. gif). The + IImageLoader only needs to be implemented for loading this file + format. A pointer to the implementation can be passed to the + engine using this method. + \param loader Pointer to the external loader created. */ + virtual void addExternalImageLoader(IImageLoader* loader) =0; + + //! Adds an external image writer to the engine. + /** This is useful if the Irrlicht Engine should be able to + write textures of currently unsupported file formats (e.g + .gif). The IImageWriter only needs to be implemented for + writing this file format. A pointer to the implementation can + be passed to the engine using this method. + \param writer: Pointer to the external writer created. */ + virtual void addExternalImageWriter(IImageWriter* writer) =0; + + //! Returns the maximum amount of primitives + /** (mostly vertices) which the device is able to render with + one drawVertexPrimitiveList call. + \return Maximum amount of primitives. */ + virtual u32 getMaximalPrimitiveCount() const =0; + + //! Enables or disables a texture creation flag. + /** These flags define how textures should be created. By + changing this value, you can influence for example the speed of + rendering a lot. But please note that the video drivers take + this value only as recommendation. It could happen that you + enable the ETCF_ALWAYS_16_BIT mode, but the driver still creates + 32 bit textures. + \param flag Texture creation flag. + \param enabled Specifies if the given flag should be enabled or + disabled. */ + virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true) =0; + + //! Returns if a texture creation flag is enabled or disabled. + /** You can change this value using setTextureCreationFlag(). + \param flag Texture creation flag. + \return The current texture creation flag enabled mode. */ + virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const =0; + + //! Creates a software image from a file. + /** No hardware texture will be created for this image. This + method is useful for example if you want to read a heightmap + for a terrain renderer. + \param filename Name of the file from which the image is + created. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IImage* createImageFromFile(const io::path& filename) = 0; + + //! Creates a software image from a file. + /** No hardware texture will be created for this image. This + method is useful for example if you want to read a heightmap + for a terrain renderer. + \param file File from which the image is created. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IImage* createImageFromFile(io::IReadFile* file) =0; + + //! Writes the provided image to a file. + /** Requires that there is a suitable image writer registered + for writing the image. + \param image Image to write. + \param filename Name of the file to write. + \param param Control parameter for the backend (e.g. compression + level). + \return True on successful write. */ + virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0; + + //! Writes the provided image to a file. + /** Requires that there is a suitable image writer registered + for writing the image. + \param image Image to write. + \param file An already open io::IWriteFile object. The name + will be used to determine the appropriate image writer to use. + \param param Control parameter for the backend (e.g. compression + level). + \return True on successful write. */ + virtual bool writeImageToFile(IImage* image, io::IWriteFile* file, u32 param =0) =0; + + //! Creates a software image from a byte array. + /** No hardware texture will be created for this image. This + method is useful for example if you want to read a heightmap + for a terrain renderer. + \param format Desired color format of the texture + \param size Desired size of the image + \param data A byte array with pixel color information + \param ownForeignMemory If true, the image will use the data + pointer directly and own it afterwards. If false, the memory + will by copied internally. + \param deleteMemory Whether the memory is deallocated upon + destruction. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IImage* createImageFromData(ECOLOR_FORMAT format, + const core::dimension2d& size, void *data, + bool ownForeignMemory=false, + bool deleteMemory = true) =0; + + //! Creates an empty software image. + /** + \param format Desired color format of the image. + \param size Size of the image to create. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d& size) =0; + + //! Creates a software image by converting it to given format from another image. + /** \deprecated Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9. + \param format Desired color format of the image. + \param imageToCopy Image to copy to the new image. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + _IRR_DEPRECATED_ virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) =0; + + //! Creates a software image from a part of another image. + /** \deprecated Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9. + \param imageToCopy Image to copy to the new image in part. + \param pos Position of rectangle to copy. + \param size Extents of rectangle to copy. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + _IRR_DEPRECATED_ virtual IImage* createImage(IImage* imageToCopy, + const core::position2d& pos, + const core::dimension2d& size) =0; + + //! Creates a software image from a part of a texture. + /** + \param texture Texture to copy to the new image in part. + \param pos Position of rectangle to copy. + \param size Extents of rectangle to copy. + \return The created image. + If you no longer need the image, you should call IImage::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IImage* createImage(ITexture* texture, + const core::position2d& pos, + const core::dimension2d& size) =0; + + //! Event handler for resize events. Only used by the engine internally. + /** Used to notify the driver that the window was resized. + Usually, there is no need to call this method. */ + virtual void OnResize(const core::dimension2d& size) =0; + + //! Adds a new material renderer to the video device. + /** Use this method to extend the VideoDriver with new material + types. To extend the engine using this method do the following: + Derive a class from IMaterialRenderer and override the methods + you need. For setting the right renderstates, you can try to + get a pointer to the real rendering device using + IVideoDriver::getExposedVideoData(). Add your class with + IVideoDriver::addMaterialRenderer(). To use an object being + displayed with your new material, set the MaterialType member of + the SMaterial struct to the value returned by this method. + If you simply want to create a new material using vertex and/or + pixel shaders it would be easier to use the + video::IGPUProgrammingServices interface which you can get + using the getGPUProgrammingServices() method. + \param renderer A pointer to the new renderer. + \param name Optional name for the material renderer entry. + \return The number of the material type which can be set in + SMaterial::MaterialType to use the renderer. -1 is returned if + an error occured. For example if you tried to add an material + renderer to the software renderer or the null device, which do + not accept material renderers. */ + virtual s32 addMaterialRenderer(IMaterialRenderer* renderer, const c8* name =0) =0; + + //! Get access to a material renderer by index. + /** \param idx Id of the material renderer. Can be a value of + the E_MATERIAL_TYPE enum or a value which was returned by + addMaterialRenderer(). + \return Pointer to material renderer or null if not existing. */ + virtual IMaterialRenderer* getMaterialRenderer(u32 idx) =0; + + //! Get amount of currently available material renderers. + /** \return Amount of currently available material renderers. */ + virtual u32 getMaterialRendererCount() const =0; + + //! Get name of a material renderer + /** This string can, e.g., be used to test if a specific + renderer already has been registered/created, or use this + string to store data about materials: This returned name will + be also used when serializing materials. + \param idx Id of the material renderer. Can be a value of the + E_MATERIAL_TYPE enum or a value which was returned by + addMaterialRenderer(). + \return String with the name of the renderer, or 0 if not + exisiting */ + virtual const c8* getMaterialRendererName(u32 idx) const =0; + + //! Sets the name of a material renderer. + /** Will have no effect on built-in material renderers. + \param idx: Id of the material renderer. Can be a value of the + E_MATERIAL_TYPE enum or a value which was returned by + addMaterialRenderer(). + \param name: New name of the material renderer. */ + virtual void setMaterialRendererName(s32 idx, const c8* name) =0; + + //! Creates material attributes list from a material + /** This method is useful for serialization and more. + Please note that the video driver will use the material + renderer names from getMaterialRendererName() to write out the + material type name, so they should be set before. + \param material The material to serialize. + \param options Additional options which might influence the + serialization. + \return The io::IAttributes container holding the material + properties. */ + virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material, + io::SAttributeReadWriteOptions* options=0) =0; + + //! Fills an SMaterial structure from attributes. + /** Please note that for setting material types of the + material, the video driver will need to query the material + renderers for their names, so all non built-in materials must + have been created before calling this method. + \param outMaterial The material to set the properties for. + \param attributes The attributes to read from. */ + virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes) =0; + + //! Returns driver and operating system specific data about the IVideoDriver. + /** This method should only be used if the engine should be + extended without having to modify the source of the engine. + \return Collection of device dependent pointers. */ + virtual const SExposedVideoData& getExposedVideoData() =0; + + //! Get type of video driver + /** \return Type of driver. */ + virtual E_DRIVER_TYPE getDriverType() const =0; + + //! Gets the IGPUProgrammingServices interface. + /** \return Pointer to the IGPUProgrammingServices. Returns 0 + if the video driver does not support this. For example the + Software driver and the Null driver will always return 0. */ + virtual IGPUProgrammingServices* getGPUProgrammingServices() =0; + + //! Returns a pointer to the mesh manipulator. + virtual scene::IMeshManipulator* getMeshManipulator() =0; + + //! Clears the ZBuffer. + /** Note that you usually need not to call this method, as it + is automatically done in IVideoDriver::beginScene() or + IVideoDriver::setRenderTarget() if you enable zBuffer. But if + you have to render some special things, you can clear the + zbuffer during the rendering process with this method any time. + */ + virtual void clearZBuffer() =0; + + //! Make a screenshot of the last rendered frame. + /** \return An image created from the last rendered frame. */ + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER) =0; + + //! Check if the image is already loaded. + /** Works similar to getTexture(), but does not load the texture + if it is not currently loaded. + \param filename Name of the texture. + \return Pointer to loaded texture, or 0 if not found. */ + virtual video::ITexture* findTexture(const io::path& filename) = 0; + + //! Set or unset a clipping plane. + /** There are at least 6 clipping planes available for the user + to set at will. + \param index The plane index. Must be between 0 and + MaxUserClipPlanes. + \param plane The plane itself. + \param enable If true, enable the clipping plane else disable + it. + \return True if the clipping plane is usable. */ + virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false) =0; + + //! Enable or disable a clipping plane. + /** There are at least 6 clipping planes available for the user + to set at will. + \param index The plane index. Must be between 0 and + MaxUserClipPlanes. + \param enable If true, enable the clipping plane else disable + it. */ + virtual void enableClipPlane(u32 index, bool enable) =0; + + //! Set the minimum number of vertices for which a hw buffer will be created + /** \param count Number of vertices to set as minimum. */ + virtual void setMinHardwareBufferVertexCount(u32 count) =0; + + //! Get the global Material, which might override local materials. + /** Depending on the enable flags, values from this Material + are used to override those of local materials of some + meshbuffer being rendered. + \return Reference to the Override Material. */ + virtual SOverrideMaterial& getOverrideMaterial() =0; + + //! Get the 2d override material for altering its values + /** The 2d override materual allows to alter certain render + states of the 2d methods. Not all members of SMaterial are + honored, especially not MaterialType and Textures. Moreover, + the zbuffer is always ignored, and lighting is always off. All + other flags can be changed, though some might have to effect + in most cases. + Please note that you have to enable/disable this effect with + enableInitMaterial2D(). This effect is costly, as it increases + the number of state changes considerably. Always reset the + values when done. + \return Material reference which should be altered to reflect + the new settings. + */ + virtual SMaterial& getMaterial2D() =0; + + //! Enable the 2d override material + /** \param enable Flag which tells whether the material shall be + enabled or disabled. */ + virtual void enableMaterial2D(bool enable=true) =0; + + //! Get the graphics card vendor name. + virtual core::stringc getVendorInfo() =0; + + //! Only used by the engine internally. + /** The ambient color is set in the scene manager, see + scene::ISceneManager::setAmbientLight(). + \param color New color of the ambient light. */ + virtual void setAmbientLight(const SColorf& color) =0; + + //! Only used by the engine internally. + /** Passes the global material flag AllowZWriteOnTransparent. + Use the SceneManager attribute to set this value from your app. + \param flag Default behavior is to disable ZWrite, i.e. false. */ + virtual void setAllowZWriteOnTransparent(bool flag) =0; + + //! Get the maximum texture size supported. + virtual core::dimension2du getMaxTextureSize() const =0; + + //! Color conversion convenience function + /** Convert an image (as array of pixels) from source to destination + array, thereby converting the color format. The pixel size is + determined by the color formats. + \param sP Pointer to source + \param sF Color format of source + \param sN Number of pixels to convert, both array must be large enough + \param dP Pointer to destination + \param dF Color format of destination + */ + virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN, + void* dP, ECOLOR_FORMAT dF) const =0; + }; + +} // end namespace video +} // end namespace irr + + +#endif diff --git a/src/others/irrlicht-1.8.1/include/IVideoModeList.h b/src/others/irrlicht-1.8.1/include/IVideoModeList.h new file mode 100644 index 0000000..4fe2e69 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IVideoModeList.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__ +#define __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "dimension2d.h" + +namespace irr +{ +namespace video +{ + + //! A list of all available video modes. + /** You can get a list via IrrlichtDevice::getVideoModeList(). If you are confused + now, because you think you have to create an Irrlicht Device with a video + mode before being able to get the video mode list, let me tell you that + there is no need to start up an Irrlicht Device with EDT_DIRECT3D8, EDT_OPENGL or + EDT_SOFTWARE: For this (and for lots of other reasons) the null device, + EDT_NULL exists.*/ + class IVideoModeList : public virtual IReferenceCounted + { + public: + + //! Gets amount of video modes in the list. + /** \return Returns amount of video modes. */ + virtual s32 getVideoModeCount() const = 0; + + //! Get the screen size of a video mode in pixels. + /** \param modeNumber: zero based index of the video mode. + \return Size of screen in pixels of the specified video mode. */ + virtual core::dimension2d getVideoModeResolution(s32 modeNumber) const = 0; + + //! Get a supported screen size with certain constraints. + /** \param minSize: Minimum dimensions required. + \param maxSize: Maximum dimensions allowed. + \return Size of screen in pixels which matches the requirements. + as good as possible. */ + virtual core::dimension2d getVideoModeResolution(const core::dimension2d& minSize, const core::dimension2d& maxSize) const = 0; + + //! Get the pixel depth of a video mode in bits. + /** \param modeNumber: zero based index of the video mode. + \return Size of each pixel of the specified video mode in bits. */ + virtual s32 getVideoModeDepth(s32 modeNumber) const = 0; + + //! Get current desktop screen resolution. + /** \return Size of screen in pixels of the current desktop video mode. */ + virtual const core::dimension2d& getDesktopResolution() const = 0; + + //! Get the pixel depth of a video mode in bits. + /** \return Size of each pixel of the current desktop video mode in bits. */ + virtual s32 getDesktopDepth() const = 0; + }; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IVolumeLightSceneNode.h b/src/others/irrlicht-1.8.1/include/IVolumeLightSceneNode.h new file mode 100644 index 0000000..6386112 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IVolumeLightSceneNode.h @@ -0,0 +1,60 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// created by Dean Wadsworth aka Varmint Dec 31 2007 + +#ifndef __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ +#define __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + class IMeshBuffer; + + class IVolumeLightSceneNode : public ISceneNode + { + public: + + //! constructor + IVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, + const core::vector3df& rotation, + const core::vector3df& scale) + : ISceneNode(parent, mgr, id, position, rotation, scale) {}; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; } + + //! Sets the number of segments across the U axis + virtual void setSubDivideU(const u32 inU) =0; + + //! Sets the number of segments across the V axis + virtual void setSubDivideV(const u32 inV) =0; + + //! Returns the number of segments across the U axis + virtual u32 getSubDivideU() const =0; + + //! Returns the number of segments across the V axis + virtual u32 getSubDivideV() const =0; + + //! Sets the color of the base of the light + virtual void setFootColor(const video::SColor inColor) =0; + + //! Sets the color of the tip of the light + virtual void setTailColor(const video::SColor inColor) =0; + + //! Returns the color of the base of the light + virtual video::SColor getFootColor() const =0; + + //! Returns the color of the tip of the light + virtual video::SColor getTailColor() const =0; + }; + +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/IWriteFile.h b/src/others/irrlicht-1.8.1/include/IWriteFile.h new file mode 100644 index 0000000..5944318 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IWriteFile.h @@ -0,0 +1,50 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_WRITE_FILE_H_INCLUDED__ +#define __I_WRITE_FILE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "path.h" + +namespace irr +{ +namespace io +{ + + //! Interface providing write access to a file. + class IWriteFile : public virtual IReferenceCounted + { + public: + //! Writes an amount of bytes to the file. + /** \param buffer Pointer to buffer of bytes to write. + \param sizeToWrite Amount of bytes to write to the file. + \return How much bytes were written. */ + virtual s32 write(const void* buffer, u32 sizeToWrite) = 0; + + //! Changes position in file + /** \param finalPos Destination position in the file. + \param relativeMovement If set to true, the position in the file is + changed relative to current position. Otherwise the position is changed + from begin of file. + \return True if successful, otherwise false. */ + virtual bool seek(long finalPos, bool relativeMovement = false) = 0; + + //! Get the current position in the file. + /** \return Current position in the file in bytes. */ + virtual long getPos() const = 0; + + //! Get name of file. + /** \return File name as zero terminated character string. */ + virtual const path& getFileName() const = 0; + }; + + //! Internal function, please do not use. + IWriteFile* createWriteFile(const io::path& fileName, bool append); + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IXMLReader.h b/src/others/irrlicht-1.8.1/include/IXMLReader.h new file mode 100644 index 0000000..3f34cb8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IXMLReader.h @@ -0,0 +1,31 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_XML_READER_H_INCLUDED__ +#define __I_XML_READER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrXML.h" + +namespace irr +{ +namespace io +{ + //! An xml reader for wide characters, derived from IReferenceCounted. + /** This XML Parser can read any type of text files from any source + Irrlicht can read. Just call IFileSystem::createXMLReader(). For more + informations on how to use the parser, see IIrrXMLReader */ + typedef IIrrXMLReader IXMLReader; + + //! An xml reader for ASCII or UTF-8 characters, derived from IReferenceCounted. + /** This XML Parser can read any type of text files from any source + Irrlicht can read. Just call IFileSystem::createXMLReaderUTF8(). For + more informations on how to use the parser, see IIrrXMLReader */ + typedef IIrrXMLReader IXMLReaderUTF8; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IXMLWriter.h b/src/others/irrlicht-1.8.1/include/IXMLWriter.h new file mode 100644 index 0000000..bb6901e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IXMLWriter.h @@ -0,0 +1,77 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_XML_WRITER_H_INCLUDED__ +#define __I_XML_WRITER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "irrArray.h" +#include "irrString.h" + +namespace irr +{ +namespace io +{ + + //! Interface providing methods for making it easier to write XML files. + /** This XML Writer writes xml files using in the platform dependent + wchar_t format and sets the xml-encoding correspondingly. */ + class IXMLWriter : public virtual IReferenceCounted + { + public: + //! Writes an xml 1.0 header. + /** Looks like <?xml version="1.0"?>. This should always + be called before writing anything other, because also the text + file header for unicode texts is written out with this method. */ + virtual void writeXMLHeader() = 0; + + //! Writes an xml element with maximal 5 attributes like "" or + //! <foo optAttr="value" />. + /** The element can be empty or not. + \param name: Name of the element + \param empty: Specifies if the element should be empty. Like + "". If You set this to false, something like this is + written instead: "". + \param attr1Name: 1st attributes name + \param attr1Value: 1st attributes value + \param attr2Name: 2nd attributes name + \param attr2Value: 2nd attributes value + \param attr3Name: 3rd attributes name + \param attr3Value: 3rd attributes value + \param attr4Name: 4th attributes name + \param attr4Value: 4th attributes value + \param attr5Name: 5th attributes name + \param attr5Value: 5th attributes value */ + virtual void writeElement(const wchar_t* name, bool empty=false, + const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0, + const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0, + const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0, + const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0, + const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0) = 0; + + //! Writes an xml element with any number of attributes + virtual void writeElement(const wchar_t* name, bool empty, + core::array &names, core::array &values) = 0; + + //! Writes a comment into the xml file + virtual void writeComment(const wchar_t* comment) = 0; + + //! Writes the closing tag for an element. Like "" + virtual void writeClosingTag(const wchar_t* name) = 0; + + //! Writes a text into the file. + /** All occurrences of special characters such as + & (&), < (<), > (>), and " (") are automaticly + replaced. */ + virtual void writeText(const wchar_t* text) = 0; + + //! Writes a line break + virtual void writeLineBreak() = 0; + }; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/IrrCompileConfig.h b/src/others/irrlicht-1.8.1/include/IrrCompileConfig.h new file mode 100644 index 0000000..2fa2423 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IrrCompileConfig.h @@ -0,0 +1,832 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_COMPILE_CONFIG_H_INCLUDED__ +#define __IRR_COMPILE_CONFIG_H_INCLUDED__ + +//! Irrlicht SDK Version +#define IRRLICHT_VERSION_MAJOR 1 +#define IRRLICHT_VERSION_MINOR 8 +#define IRRLICHT_VERSION_REVISION 1 +// This flag will be defined only in SVN, the official release code will have +// it undefined +//#define IRRLICHT_VERSION_SVN -alpha +#define IRRLICHT_SDK_VERSION "1.8.1" + +#include // TODO: Although included elsewhere this is required at least for mingw + +//! The defines for different operating system are: +//! _IRR_XBOX_PLATFORM_ for XBox +//! _IRR_WINDOWS_ for all irrlicht supported Windows versions +//! _IRR_WINDOWS_CE_PLATFORM_ for Windows CE +//! _IRR_WINDOWS_API_ for Windows or XBox +//! _IRR_LINUX_PLATFORM_ for Linux (it is defined here if no other os is defined) +//! _IRR_SOLARIS_PLATFORM_ for Solaris +//! _IRR_OSX_PLATFORM_ for Apple systems running OSX +//! _IRR_POSIX_API_ for Posix compatible systems +//! Note: PLATFORM defines the OS specific layer, API can group several platforms + +//! DEVICE is the windowing system used, several PLATFORMs support more than one DEVICE +//! Irrlicht can be compiled with more than one device +//! _IRR_COMPILE_WITH_WINDOWS_DEVICE_ for Windows API based device +//! _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ for Windows CE API based device +//! _IRR_COMPILE_WITH_OSX_DEVICE_ for Cocoa native windowing on OSX +//! _IRR_COMPILE_WITH_X11_DEVICE_ for Linux X11 based device +//! _IRR_COMPILE_WITH_SDL_DEVICE_ for platform independent SDL framework +//! _IRR_COMPILE_WITH_CONSOLE_DEVICE_ for no windowing system, used as a fallback +//! _IRR_COMPILE_WITH_FB_DEVICE_ for framebuffer systems + +//! Passing defines to the compiler which have NO in front of the _IRR definename is an alternative +//! way which can be used to disable defines (instead of outcommenting them in this header). +//! So defines can be controlled from Makefiles or Projectfiles which allows building +//! different library versions without having to change the sources. +//! Example: NO_IRR_COMPILE_WITH_X11_ would disable X11 + + +//! Uncomment this line to compile with the SDL device +//#define _IRR_COMPILE_WITH_SDL_DEVICE_ +#ifdef NO_IRR_COMPILE_WITH_SDL_DEVICE_ +#undef _IRR_COMPILE_WITH_SDL_DEVICE_ +#endif + +//! Comment this line to compile without the fallback console device. +#define _IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#ifdef NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#undef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#endif + +//! WIN32 for Windows32 +//! WIN64 for Windows64 +// The windows platform and API support SDL and WINDOW device +#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) +#define _IRR_WINDOWS_ +#define _IRR_WINDOWS_API_ +#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_ +#endif + +//! WINCE is a very restricted environment for mobile devices +#if defined(_WIN32_WCE) +#define _IRR_WINDOWS_ +#define _IRR_WINDOWS_API_ +#define _IRR_WINDOWS_CE_PLATFORM_ +#define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ +#endif + +#if defined(_MSC_VER) && (_MSC_VER < 1300) +# error "Only Microsoft Visual Studio 7.0 and later are supported." +#endif + +// XBox only suppots the native Window stuff +#if defined(_XBOX) + #undef _IRR_WINDOWS_ + #define _IRR_XBOX_PLATFORM_ + #define _IRR_WINDOWS_API_ + //#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + #undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + //#define _IRR_COMPILE_WITH_SDL_DEVICE_ + + #include +#endif + +#if defined(__APPLE__) || defined(MACOSX) +#if !defined(MACOSX) +#define MACOSX // legacy support +#endif +#define _IRR_OSX_PLATFORM_ +#define _IRR_COMPILE_WITH_OSX_DEVICE_ +#endif + +#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_) +#ifndef _IRR_SOLARIS_PLATFORM_ +#define _IRR_LINUX_PLATFORM_ +#endif +#define _IRR_POSIX_API_ +#define _IRR_COMPILE_WITH_X11_DEVICE_ +#endif + + +//! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events. +#define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#ifdef NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#endif + + +//! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht. +#define _IRR_MATERIAL_MAX_TEXTURES_ 4 + +//! Define _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_ to +//! compile the Irrlicht engine with Direct3D8 and/or DIRECT3D9. +/** If you only want to use the software device or opengl you can disable those defines. +This switch is mostly disabled because people do not get the g++ compiler compile +directX header files, and directX is only available on Windows platforms. If you +are using Dev-Cpp, and want to compile this using a DX dev pack, you can define +_IRR_COMPILE_WITH_DX9_DEV_PACK_. So you simply need to add something like this +to the compiler settings: -DIRR_COMPILE_WITH_DX9_DEV_PACK +and this to the linker settings: -ld3dx9 -ld3dx8 + +Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and +so D3D8 support is now disabled by default. If you really want to build +with D3D8 support, then you will have to source a DXSDK with the appropriate +headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one. +*/ +#if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK)) + +//! Define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ if you want to use DirectInput for joystick handling. +/** This only applies to Windows devices, currently only supported under Win32 device. +If not defined, Windows Multimedia library is used, which offers also broad support for joystick devices. */ +#define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ +#ifdef NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ +#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ +#endif +// can't get this to compile currently under borland, can be removed if someone has a better solution +#if defined(__BORLANDC__) +#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ +#endif + +//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004 +// #define _IRR_COMPILE_WITH_DIRECT3D_8_ +#define _IRR_COMPILE_WITH_DIRECT3D_9_ + +#ifdef NO_IRR_COMPILE_WITH_DIRECT3D_8_ +#undef _IRR_COMPILE_WITH_DIRECT3D_8_ +#endif +#ifdef NO_IRR_COMPILE_WITH_DIRECT3D_9_ +#undef _IRR_COMPILE_WITH_DIRECT3D_9_ +#endif + +#endif + +//! Define _IRR_COMPILE_WITH_OPENGL_ to compile the Irrlicht engine with OpenGL. +/** If you do not wish the engine to be compiled with OpenGL, comment this +define out. */ +#define _IRR_COMPILE_WITH_OPENGL_ +#ifdef NO_IRR_COMPILE_WITH_OPENGL_ +#undef _IRR_COMPILE_WITH_OPENGL_ +#endif + +//! Define _IRR_COMPILE_WITH_SOFTWARE_ to compile the Irrlicht engine with software driver +/** If you do not need the software driver, or want to use Burning's Video instead, +comment this define out */ +#define _IRR_COMPILE_WITH_SOFTWARE_ +#ifdef NO_IRR_COMPILE_WITH_SOFTWARE_ +#undef _IRR_COMPILE_WITH_SOFTWARE_ +#endif + +//! Define _IRR_COMPILE_WITH_BURNINGSVIDEO_ to compile the Irrlicht engine with Burning's video driver +/** If you do not need this software driver, you can comment this define out. */ +#define _IRR_COMPILE_WITH_BURNINGSVIDEO_ +#ifdef NO_IRR_COMPILE_WITH_BURNINGSVIDEO_ +#undef _IRR_COMPILE_WITH_BURNINGSVIDEO_ +#endif + +//! Define _IRR_COMPILE_WITH_X11_ to compile the Irrlicht engine with X11 support. +/** If you do not wish the engine to be compiled with X11, comment this +define out. */ +// Only used in LinuxDevice. +#define _IRR_COMPILE_WITH_X11_ +#ifdef NO_IRR_COMPILE_WITH_X11_ +#undef _IRR_COMPILE_WITH_X11_ +#endif + +//! Define _IRR_OPENGL_USE_EXTPOINTER_ if the OpenGL renderer should use OpenGL extensions via function pointers. +/** On some systems there is no support for the dynamic extension of OpenGL + via function pointers such that this has to be undef'ed. */ +#if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_) +#define _IRR_OPENGL_USE_EXTPOINTER_ +#endif + +//! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags +//! to remove the dependencies such that Irrlicht will compile on those systems, too. +//! If you don't need colored cursors you can also disable the Xcursor extension +#if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_) +#define _IRR_LINUX_X11_VIDMODE_ +//#define _IRR_LINUX_X11_RANDR_ +#ifdef NO_IRR_LINUX_X11_VIDMODE_ +#undef _IRR_LINUX_X11_VIDMODE_ +#endif +#ifdef NO_IRR_LINUX_X11_RANDR_ +#undef _IRR_LINUX_X11_RANDR_ +#endif + +//! X11 has by default only monochrome cursors, but using the Xcursor library we can also get color cursor support. +//! If you have the need for custom color cursors on X11 then enable this and make sure you also link +//! to the Xcursor library in your Makefile/Projectfile. +//#define _IRR_LINUX_XCURSOR_ +#ifdef NO_IRR_LINUX_XCURSOR_ +#undef _IRR_LINUX_XCURSOR_ +#endif + +#endif + +//! Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI +/** Disable this if you are using an external library to draw the GUI. If you disable this then +you will not be able to use anything provided by the GUI Environment, including loading fonts. */ +#define _IRR_COMPILE_WITH_GUI_ +#ifdef NO_IRR_COMPILE_WITH_GUI_ +#undef _IRR_COMPILE_WITH_GUI_ +#endif + +//! Define _IRR_WCHAR_FILESYSTEM to enable unicode filesystem support for the engine. +/** This enables the engine to read/write from unicode filesystem. If you +disable this feature, the engine behave as before (ansi). This is currently only supported +for Windows based systems. You also have to set #define UNICODE for this to compile. +*/ +//#define _IRR_WCHAR_FILESYSTEM +#ifdef NO_IRR_WCHAR_FILESYSTEM +#undef _IRR_WCHAR_FILESYSTEM +#endif + +//! Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg. +/** This enables the engine to read jpeg images. If you comment this out, +the engine will no longer read .jpeg images. */ +#define _IRR_COMPILE_WITH_LIBJPEG_ +#ifdef NO_IRR_COMPILE_WITH_LIBJPEG_ +#undef _IRR_COMPILE_WITH_LIBJPEG_ +#endif + +//! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht. +/** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system. + This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */ +#define _IRR_USE_NON_SYSTEM_JPEG_LIB_ +#ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ +#undef _IRR_USE_NON_SYSTEM_JPEG_LIB_ +#endif + +//! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng. +/** This enables the engine to read png images. If you comment this out, +the engine will no longer read .png images. */ +#define _IRR_COMPILE_WITH_LIBPNG_ +#ifdef NO_IRR_COMPILE_WITH_LIBPNG_ +#undef _IRR_COMPILE_WITH_LIBPNG_ +#endif + +//! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht. +/** If this is commented out, Irrlicht will try to compile using the libpng installed in the system. + This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */ +#define _IRR_USE_NON_SYSTEM_LIB_PNG_ +#ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_ +#undef _IRR_USE_NON_SYSTEM_LIB_PNG_ +#endif + +//! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9 +/** If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h, +it is possible to debug all D3D9 shaders in VisualStudio. All shaders +(which have been generated in memory or read from archives for example) will be emitted +into a temporary file at runtime for this purpose. To debug your shaders, choose +Debug->Direct3D->StartWithDirect3DDebugging in Visual Studio, and for every shader a +file named 'irr_dbg_shader_%%.vsh' or 'irr_dbg_shader_%%.psh' will be created. Drag'n'drop +the file you want to debug into visual studio. That's it. You can now set breakpoints and +watch registers, variables etc. This works with ASM, HLSL, and both with pixel and vertex shaders. +Note that the engine will run in D3D REF for this, which is a lot slower than HAL. */ +#define _IRR_D3D_NO_SHADER_DEBUGGING +#ifdef NO_IRR_D3D_NO_SHADER_DEBUGGING +#undef _IRR_D3D_NO_SHADER_DEBUGGING +#endif + +//! Define _IRR_D3D_USE_LEGACY_HLSL_COMPILER to enable the old HLSL compiler in recent DX SDKs +/** This enables support for ps_1_x shaders for recent DX SDKs. Otherwise, support +for this shader model is not available anymore in SDKs after Oct2006. You need to +distribute the OCT2006_d3dx9_31_x86.cab or OCT2006_d3dx9_31_x64.cab though, in order +to provide the user with the proper DLL. That's why it's disabled by default. */ +//#define _IRR_D3D_USE_LEGACY_HLSL_COMPILER +#ifdef NO_IRR_D3D_USE_LEGACY_HLSL_COMPILER +#undef _IRR_D3D_USE_LEGACY_HLSL_COMPILER +#endif + +//! Define _IRR_COMPILE_WITH_CG_ to enable Cg Shading Language support +//#define _IRR_COMPILE_WITH_CG_ +#ifdef NO_IRR_COMPILE_WITH_CG_ +#undef _IRR_COMPILE_WITH_CG_ +#endif +#if !defined(_IRR_COMPILE_WITH_OPENGL_) && !defined(_IRR_COMPILE_WITH_DIRECT3D_9_) +#undef _IRR_COMPILE_WITH_CG_ +#endif + +//! Define _IRR_USE_NVIDIA_PERFHUD_ to opt-in to using the nVidia PerHUD tool +/** Enable, by opting-in, to use the nVidia PerfHUD performance analysis driver +tool . */ +#undef _IRR_USE_NVIDIA_PERFHUD_ + +//! Define one of the three setting for Burning's Video Software Rasterizer +/** So if we were marketing guys we could say Irrlicht has 4 Software-Rasterizers. + In a Nutshell: + All Burnings Rasterizers use 32 Bit Backbuffer, 32Bit Texture & 32 Bit Z or WBuffer, + 16 Bit/32 Bit can be adjusted on a global flag. + + BURNINGVIDEO_RENDERER_BEAUTIFUL + 32 Bit + Vertexcolor + Lighting + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + + Bilinear Texturefiltering + WBuffer + + BURNINGVIDEO_RENDERER_FAST + 32 Bit + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + WBuffer + + Bilinear Dithering TextureFiltering + WBuffer + + BURNINGVIDEO_RENDERER_ULTRA_FAST + 16Bit + SubPixel/SubTexel Correct + ZBuffer +*/ + +#define BURNINGVIDEO_RENDERER_BEAUTIFUL +//#define BURNINGVIDEO_RENDERER_FAST +//#define BURNINGVIDEO_RENDERER_ULTRA_FAST +//#define BURNINGVIDEO_RENDERER_CE + +//! Uncomment the following line if you want to ignore the deprecated warnings +//#define IGNORE_DEPRECATED_WARNING + +//! Define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ if you want to be able to load +/** .irr scenes using ISceneManager::loadScene */ +#define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_ +#undef _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ +#endif + +//! Define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ if you want to use bone based +/** animated meshes. If you compile without this, you will be unable to load +B3D, MS3D or X meshes */ +#define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#ifdef NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#undef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#endif + +#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +//! Define _IRR_COMPILE_WITH_B3D_LOADER_ if you want to use Blitz3D files +#define _IRR_COMPILE_WITH_B3D_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_B3D_LOADER_ +#undef _IRR_COMPILE_WITH_B3D_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_MS3D_LOADER_ if you want to Milkshape files +#define _IRR_COMPILE_WITH_MS3D_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MS3D_LOADER_ +#undef _IRR_COMPILE_WITH_MS3D_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_X_LOADER_ if you want to use Microsoft X files +#define _IRR_COMPILE_WITH_X_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_X_LOADER_ +#undef _IRR_COMPILE_WITH_X_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_OGRE_LOADER_ if you want to load Ogre 3D files +#define _IRR_COMPILE_WITH_OGRE_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_OGRE_LOADER_ +#undef _IRR_COMPILE_WITH_OGRE_LOADER_ +#endif +#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + +//! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files +#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ if you want to load Halflife animated files +#define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#undef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files +#define _IRR_COMPILE_WITH_MD2_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MD2_LOADER_ +#undef _IRR_COMPILE_WITH_MD2_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files +#define _IRR_COMPILE_WITH_MD3_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MD3_LOADER_ +#undef _IRR_COMPILE_WITH_MD3_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files +#define _IRR_COMPILE_WITH_3DS_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_3DS_LOADER_ +#undef _IRR_COMPILE_WITH_3DS_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files +#define _IRR_COMPILE_WITH_COLLADA_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_COLLADA_LOADER_ +#undef _IRR_COMPILE_WITH_COLLADA_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_CSM_LOADER_ if you want to load Cartography Shop files +#define _IRR_COMPILE_WITH_CSM_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_CSM_LOADER_ +#undef _IRR_COMPILE_WITH_CSM_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_BSP_LOADER_ if you want to load Quake 3 BSP files +#define _IRR_COMPILE_WITH_BSP_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_BSP_LOADER_ +#undef _IRR_COMPILE_WITH_BSP_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_DMF_LOADER_ if you want to load DeleD files +#define _IRR_COMPILE_WITH_DMF_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_DMF_LOADER_ +#undef _IRR_COMPILE_WITH_DMF_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_LMTS_LOADER_ if you want to load LMTools files +#define _IRR_COMPILE_WITH_LMTS_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_LMTS_LOADER_ +#undef _IRR_COMPILE_WITH_LMTS_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_MY3D_LOADER_ if you want to load MY3D files +#define _IRR_COMPILE_WITH_MY3D_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MY3D_LOADER_ +#undef _IRR_COMPILE_WITH_MY3D_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_OBJ_LOADER_ if you want to load Wavefront OBJ files +#define _IRR_COMPILE_WITH_OBJ_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_OBJ_LOADER_ +#undef _IRR_COMPILE_WITH_OBJ_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_OCT_LOADER_ if you want to load FSRad OCT files +#define _IRR_COMPILE_WITH_OCT_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_OCT_LOADER_ +#undef _IRR_COMPILE_WITH_OCT_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_LWO_LOADER_ if you want to load Lightwave3D files +#define _IRR_COMPILE_WITH_LWO_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_LWO_LOADER_ +#undef _IRR_COMPILE_WITH_LWO_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_STL_LOADER_ if you want to load stereolithography files +#define _IRR_COMPILE_WITH_STL_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_STL_LOADER_ +#undef _IRR_COMPILE_WITH_STL_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_PLY_LOADER_ if you want to load Polygon (Stanford Triangle) files +#define _IRR_COMPILE_WITH_PLY_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PLY_LOADER_ +#undef _IRR_COMPILE_WITH_PLY_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_SMF_LOADER_ if you want to load 3D World Studio mesh files +#define _IRR_COMPILE_WITH_SMF_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_SMF_LOADER_ +#undef _IRR_COMPILE_WITH_SMF_LOADER_ +#endif + +//! Define _IRR_COMPILE_WITH_IRR_WRITER_ if you want to write static .irrMesh files +#define _IRR_COMPILE_WITH_IRR_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_IRR_WRITER_ +#undef _IRR_COMPILE_WITH_IRR_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_COLLADA_WRITER_ if you want to write Collada files +#define _IRR_COMPILE_WITH_COLLADA_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_COLLADA_WRITER_ +#undef _IRR_COMPILE_WITH_COLLADA_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_STL_WRITER_ if you want to write .stl files +#define _IRR_COMPILE_WITH_STL_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_STL_WRITER_ +#undef _IRR_COMPILE_WITH_STL_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_OBJ_WRITER_ if you want to write .obj files +#define _IRR_COMPILE_WITH_OBJ_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_OBJ_WRITER_ +#undef _IRR_COMPILE_WITH_OBJ_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_PLY_WRITER_ if you want to write .ply files +#define _IRR_COMPILE_WITH_PLY_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PLY_WRITER_ +#undef _IRR_COMPILE_WITH_PLY_WRITER_ +#endif + +//! Define _IRR_COMPILE_WITH_BMP_LOADER_ if you want to load .bmp files +//! Disabling this loader will also disable the built-in font +#define _IRR_COMPILE_WITH_BMP_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_BMP_LOADER_ +#undef _IRR_COMPILE_WITH_BMP_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files +#define _IRR_COMPILE_WITH_JPG_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_JPG_LOADER_ +#undef _IRR_COMPILE_WITH_JPG_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_PCX_LOADER_ if you want to load .pcx files +#define _IRR_COMPILE_WITH_PCX_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PCX_LOADER_ +#undef _IRR_COMPILE_WITH_PCX_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_PNG_LOADER_ if you want to load .png files +#define _IRR_COMPILE_WITH_PNG_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PNG_LOADER_ +#undef _IRR_COMPILE_WITH_PNG_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_PPM_LOADER_ if you want to load .ppm/.pgm/.pbm files +#define _IRR_COMPILE_WITH_PPM_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PPM_LOADER_ +#undef _IRR_COMPILE_WITH_PPM_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files +#define _IRR_COMPILE_WITH_PSD_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PSD_LOADER_ +#undef _IRR_COMPILE_WITH_PSD_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load .dds files +// Outcommented because +// a) it doesn't compile on 64-bit currently +// b) anyone enabling it should be aware that S3TC compression algorithm which might be used in that loader +// is patented in the US by S3 and they do collect license fees when it's used in applications. +// So if you are unfortunate enough to develop applications for US market and their broken patent system be careful. +// #define _IRR_COMPILE_WITH_DDS_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_DDS_LOADER_ +#undef _IRR_COMPILE_WITH_DDS_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files +#define _IRR_COMPILE_WITH_TGA_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_TGA_LOADER_ +#undef _IRR_COMPILE_WITH_TGA_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files +#define _IRR_COMPILE_WITH_WAL_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_WAL_LOADER_ +#undef _IRR_COMPILE_WITH_WAL_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_LMP_LOADER_ if you want to load .lmp files +#define _IRR_COMPILE_WITH_LMP_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_LMP_LOADER_ +#undef _IRR_COMPILE_WITH_LMP_LOADER_ +#endif +//! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files +#define _IRR_COMPILE_WITH_RGB_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_RGB_LOADER_ +#undef _IRR_COMPILE_WITH_RGB_LOADER_ +#endif + +//! Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files +#define _IRR_COMPILE_WITH_BMP_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_BMP_WRITER_ +#undef _IRR_COMPILE_WITH_BMP_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_JPG_WRITER_ if you want to write .jpg files +#define _IRR_COMPILE_WITH_JPG_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_JPG_WRITER_ +#undef _IRR_COMPILE_WITH_JPG_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_PCX_WRITER_ if you want to write .pcx files +#define _IRR_COMPILE_WITH_PCX_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PCX_WRITER_ +#undef _IRR_COMPILE_WITH_PCX_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_PNG_WRITER_ if you want to write .png files +#define _IRR_COMPILE_WITH_PNG_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PNG_WRITER_ +#undef _IRR_COMPILE_WITH_PNG_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_PPM_WRITER_ if you want to write .ppm files +#define _IRR_COMPILE_WITH_PPM_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PPM_WRITER_ +#undef _IRR_COMPILE_WITH_PPM_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_PSD_WRITER_ if you want to write .psd files +#define _IRR_COMPILE_WITH_PSD_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PSD_WRITER_ +#undef _IRR_COMPILE_WITH_PSD_WRITER_ +#endif +//! Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files +#define _IRR_COMPILE_WITH_TGA_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_TGA_WRITER_ +#undef _IRR_COMPILE_WITH_TGA_WRITER_ +#endif + +//! Define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ if you want to open ZIP and GZIP archives +/** ZIP reading has several more options below to configure. */ +#define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#endif +#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +//! Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib. +/** This enables the engine to read from compressed .zip archives. If you +disable this feature, the engine can still read archives, but only uncompressed +ones. */ +#define _IRR_COMPILE_WITH_ZLIB_ +#ifdef NO_IRR_COMPILE_WITH_ZLIB_ +#undef _IRR_COMPILE_WITH_ZLIB_ +#endif +//! Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht. +/** If this is commented out, Irrlicht will try to compile using the zlib +installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is +defined. */ +#define _IRR_USE_NON_SYSTEM_ZLIB_ +#ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_ +#undef _IRR_USE_NON_SYSTEM_ZLIB_ +#endif +//! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives +#define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ +#ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_ +#undef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ +#endif +//! Define _IRR_COMPILE_WITH_BZIP2_ if you want to support bzip2 compressed zip archives +/** bzip2 is superior to the original zip file compression modes, but requires +a certain amount of memory for decompression and adds several files to the +library. */ +#define _IRR_COMPILE_WITH_BZIP2_ +#ifdef NO_IRR_COMPILE_WITH_BZIP2_ +#undef _IRR_COMPILE_WITH_BZIP2_ +#endif +//! Define _IRR_USE_NON_SYSTEM_BZLIB_ to let irrlicht use the bzlib which comes with irrlicht. +/** If this is commented out, Irrlicht will try to compile using the bzlib +installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is +defined. */ +#define _IRR_USE_NON_SYSTEM_BZLIB_ +#ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_ +#undef _IRR_USE_NON_SYSTEM_BZLIB_ +#endif +//! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files. +/** LZMA is a very efficient compression code, known from 7zip. Irrlicht +currently only supports zip archives, though. */ +#define _IRR_COMPILE_WITH_LZMA_ +#ifdef NO_IRR_COMPILE_WITH_LZMA_ +#undef _IRR_COMPILE_WITH_LZMA_ +#endif +#endif + +//! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives +#define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#endif +//! Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives +#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ +#endif +//! Define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ if you want to open Nebula Device NPK archives +#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ +#endif +//! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives +#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#endif +//! Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives +#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ +#endif + +//! Set FPU settings +/** Irrlicht should use approximate float and integer fpu techniques +precision will be lower but speed higher. currently X86 only +*/ +#if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_) + //#define IRRLICHT_FAST_MATH + #ifdef NO_IRRLICHT_FAST_MATH + #undef IRRLICHT_FAST_MATH + #endif +#endif + +// Some cleanup and standard stuff + +#ifdef _IRR_WINDOWS_API_ + +// To build Irrlicht as a static library, you must define _IRR_STATIC_LIB_ in both the +// Irrlicht build, *and* in the user application, before #including +#ifndef _IRR_STATIC_LIB_ +#ifdef IRRLICHT_EXPORTS +#define IRRLICHT_API __declspec(dllexport) +#else +#define IRRLICHT_API __declspec(dllimport) +#endif // IRRLICHT_EXPORT +#else +#define IRRLICHT_API +#endif // _IRR_STATIC_LIB_ + +// Declare the calling convention. +#if defined(_STDCALL_SUPPORTED) +#define IRRCALLCONV __stdcall +#else +#define IRRCALLCONV __cdecl +#endif // STDCALL_SUPPORTED + +#else // _IRR_WINDOWS_API_ + +// Force symbol export in shared libraries built with gcc. +#if (__GNUC__ >= 4) && !defined(_IRR_STATIC_LIB_) && defined(IRRLICHT_EXPORTS) +#define IRRLICHT_API __attribute__ ((visibility("default"))) +#else +#define IRRLICHT_API +#endif + +#define IRRCALLCONV + +#endif // _IRR_WINDOWS_API_ + +// We need to disable DIRECT3D9 support for Visual Studio 6.0 because +// those $%&$!! disabled support for it since Dec. 2004 and users are complaining +// about linker errors. Comment this out only if you are knowing what you are +// doing. (Which means you have an old DX9 SDK and VisualStudio6). +#ifdef _MSC_VER +#if (_MSC_VER < 1300 && !defined(__GNUC__)) +#undef _IRR_COMPILE_WITH_DIRECT3D_9_ +#pragma message("Compiling Irrlicht with Visual Studio 6.0, support for DX9 is disabled.") +#endif +#endif + +// XBox does not have OpenGL or DirectX9 +#if defined(_IRR_XBOX_PLATFORM_) + #undef _IRR_COMPILE_WITH_OPENGL_ + #undef _IRR_COMPILE_WITH_DIRECT3D_9_ +#endif + +//! WinCE does not have OpenGL or DirectX9. use minimal loaders +#if defined(_WIN32_WCE) + #undef _IRR_COMPILE_WITH_OPENGL_ + #undef _IRR_COMPILE_WITH_DIRECT3D_8_ + #undef _IRR_COMPILE_WITH_DIRECT3D_9_ + + #undef BURNINGVIDEO_RENDERER_BEAUTIFUL + #undef BURNINGVIDEO_RENDERER_FAST + #undef BURNINGVIDEO_RENDERER_ULTRA_FAST + #define BURNINGVIDEO_RENDERER_CE + + #undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + #define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ + //#define _IRR_WCHAR_FILESYSTEM + + #undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ + //#undef _IRR_COMPILE_WITH_MD2_LOADER_ + #undef _IRR_COMPILE_WITH_MD3_LOADER_ + #undef _IRR_COMPILE_WITH_3DS_LOADER_ + #undef _IRR_COMPILE_WITH_COLLADA_LOADER_ + #undef _IRR_COMPILE_WITH_CSM_LOADER_ + #undef _IRR_COMPILE_WITH_BSP_LOADER_ + #undef _IRR_COMPILE_WITH_DMF_LOADER_ + #undef _IRR_COMPILE_WITH_LMTS_LOADER_ + #undef _IRR_COMPILE_WITH_MY3D_LOADER_ + #undef _IRR_COMPILE_WITH_OBJ_LOADER_ + #undef _IRR_COMPILE_WITH_OCT_LOADER_ + #undef _IRR_COMPILE_WITH_OGRE_LOADER_ + #undef _IRR_COMPILE_WITH_LWO_LOADER_ + #undef _IRR_COMPILE_WITH_STL_LOADER_ + #undef _IRR_COMPILE_WITH_IRR_WRITER_ + #undef _IRR_COMPILE_WITH_COLLADA_WRITER_ + #undef _IRR_COMPILE_WITH_STL_WRITER_ + #undef _IRR_COMPILE_WITH_OBJ_WRITER_ + //#undef _IRR_COMPILE_WITH_BMP_LOADER_ + //#undef _IRR_COMPILE_WITH_JPG_LOADER_ + #undef _IRR_COMPILE_WITH_PCX_LOADER_ + //#undef _IRR_COMPILE_WITH_PNG_LOADER_ + #undef _IRR_COMPILE_WITH_PPM_LOADER_ + #undef _IRR_COMPILE_WITH_PSD_LOADER_ + //#undef _IRR_COMPILE_WITH_TGA_LOADER_ + #undef _IRR_COMPILE_WITH_WAL_LOADER_ + #undef _IRR_COMPILE_WITH_BMP_WRITER_ + #undef _IRR_COMPILE_WITH_JPG_WRITER_ + #undef _IRR_COMPILE_WITH_PCX_WRITER_ + #undef _IRR_COMPILE_WITH_PNG_WRITER_ + #undef _IRR_COMPILE_WITH_PPM_WRITER_ + #undef _IRR_COMPILE_WITH_PSD_WRITER_ + #undef _IRR_COMPILE_WITH_TGA_WRITER_ + +#endif + +#ifndef _IRR_WINDOWS_API_ + #undef _IRR_WCHAR_FILESYSTEM +#endif + +#if defined(__sparc__) || defined(__sun__) +#define __BIG_ENDIAN__ +#endif + +#if defined(_IRR_SOLARIS_PLATFORM_) + #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#endif + +//! Define __IRR_HAS_S64 if the irr::s64 type should be enable (needs long long, available on most platforms, but not part of ISO C++ 98) +#define __IRR_HAS_S64 +#ifdef NO__IRR_HAS_S64 +#undef __IRR_HAS_S64 +#endif + +#if defined(__BORLANDC__) + #include + + // Borland 5.5.1 does not have _strcmpi defined + #if __BORLANDC__ == 0x551 + // #define _strcmpi strcmpi + #undef _tfinddata_t + #undef _tfindfirst + #undef _tfindnext + + #define _tfinddata_t __tfinddata_t + #define _tfindfirst __tfindfirst + #define _tfindnext __tfindnext + typedef long intptr_t; + #endif + +#endif + +#ifdef _DEBUG + //! A few attributes are written in CSceneManager when _IRR_SCENEMANAGER_DEBUG is enabled + // NOTE: Those attributes were used always until 1.8.0 and became a global define for 1.8.1 + // which is only enabled in debug because it had a large (sometimes >5%) impact on speed. + // A better solution in the long run is to break the interface and remove _all_ attribute + // access in functions like CSceneManager::drawAll and instead put that information in some + // own struct/class or in CSceneManager. + // See http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion. + #define _IRR_SCENEMANAGER_DEBUG + #ifdef NO_IRR_SCENEMANAGER_DEBUG + #undef _IRR_SCENEMANAGER_DEBUG + #endif +#endif + +#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/IrrlichtDevice.h b/src/others/irrlicht-1.8.1/include/IrrlichtDevice.h new file mode 100644 index 0000000..9d4031e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/IrrlichtDevice.h @@ -0,0 +1,322 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__ +#define __I_IRRLICHT_DEVICE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "dimension2d.h" +#include "IVideoDriver.h" +#include "EDriverTypes.h" +#include "EDeviceTypes.h" +#include "IEventReceiver.h" +#include "ICursorControl.h" +#include "IVideoModeList.h" +#include "ITimer.h" +#include "IOSOperator.h" + +namespace irr +{ + class ILogger; + class IEventReceiver; + class IRandomizer; + + namespace io { + class IFileSystem; + } // end namespace io + + namespace gui { + class IGUIEnvironment; + } // end namespace gui + + namespace scene { + class ISceneManager; + } // end namespace scene + + //! The Irrlicht device. You can create it with createDevice() or createDeviceEx(). + /** This is the most important class of the Irrlicht Engine. You can + access everything in the engine if you have a pointer to an instance of + this class. There should be only one instance of this class at any + time. + */ + class IrrlichtDevice : public virtual IReferenceCounted + { + public: + + //! Runs the device. + /** Also increments the virtual timer by calling + ITimer::tick();. You can prevent this + by calling ITimer::stop(); before and ITimer::start() after + calling IrrlichtDevice::run(). Returns false if device wants + to be deleted. Use it in this way: + \code + while(device->run()) + { + // draw everything here + } + \endcode + If you want the device to do nothing if the window is inactive + (recommended), use the slightly enhanced code shown at isWindowActive(). + + Note if you are running Irrlicht inside an external, custom + created window: Calling Device->run() will cause Irrlicht to + dispatch windows messages internally. + If you are running Irrlicht in your own custom window, you can + also simply use your own message loop using GetMessage, + DispatchMessage and whatever and simply don't use this method. + But note that Irrlicht will not be able to fetch user input + then. See irr::SIrrlichtCreationParameters::WindowId for more + informations and example code. + */ + virtual bool run() = 0; + + //! Cause the device to temporarily pause execution and let other processes run. + /** This should bring down processor usage without major + performance loss for Irrlicht */ + virtual void yield() = 0; + + //! Pause execution and let other processes to run for a specified amount of time. + /** It may not wait the full given time, as sleep may be interrupted + \param timeMs: Time to sleep for in milisecs. + \param pauseTimer: If true, pauses the device timer while sleeping + */ + virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0; + + //! Provides access to the video driver for drawing 3d and 2d geometry. + /** \return Pointer the video driver. */ + virtual video::IVideoDriver* getVideoDriver() = 0; + + //! Provides access to the virtual file system. + /** \return Pointer to the file system. */ + virtual io::IFileSystem* getFileSystem() = 0; + + //! Provides access to the 2d user interface environment. + /** \return Pointer to the gui environment. */ + virtual gui::IGUIEnvironment* getGUIEnvironment() = 0; + + //! Provides access to the scene manager. + /** \return Pointer to the scene manager. */ + virtual scene::ISceneManager* getSceneManager() = 0; + + //! Provides access to the cursor control. + /** \return Pointer to the mouse cursor control interface. */ + virtual gui::ICursorControl* getCursorControl() = 0; + + //! Provides access to the message logger. + /** \return Pointer to the logger. */ + virtual ILogger* getLogger() = 0; + + //! Gets a list with all video modes available. + /** If you are confused now, because you think you have to + create an Irrlicht Device with a video mode before being able + to get the video mode list, let me tell you that there is no + need to start up an Irrlicht Device with EDT_DIRECT3D8, + EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other + reasons) the null driver, EDT_NULL exists. + \return Pointer to a list with all video modes supported + by the gfx adapter. */ + virtual video::IVideoModeList* getVideoModeList() = 0; + + //! Provides access to the operation system operator object. + /** The OS operator provides methods for + getting system specific informations and doing system + specific operations, such as exchanging data with the clipboard + or reading the operation system version. + \return Pointer to the OS operator. */ + virtual IOSOperator* getOSOperator() = 0; + + //! Provides access to the engine's timer. + /** The system time can be retrieved by it as + well as the virtual time, which also can be manipulated. + \return Pointer to the ITimer object. */ + virtual ITimer* getTimer() = 0; + + //! Provides access to the engine's currently set randomizer. + /** \return Pointer to the IRandomizer object. */ + virtual IRandomizer* getRandomizer() const =0; + + //! Sets a new randomizer. + /** \param r Pointer to the new IRandomizer object. This object is + grab()'ed by the engine and will be released upon the next setRandomizer + call or upon device destruction. */ + virtual void setRandomizer(IRandomizer* r) =0; + + //! Creates a new default randomizer. + /** The default randomizer provides the random sequence known from previous + Irrlicht versions and is the initial randomizer set on device creation. + \return Pointer to the default IRandomizer object. */ + virtual IRandomizer* createDefaultRandomizer() const =0; + + //! Sets the caption of the window. + /** \param text: New text of the window caption. */ + virtual void setWindowCaption(const wchar_t* text) = 0; + + //! Returns if the window is active. + /** If the window is inactive, + nothing needs to be drawn. So if you don't want to draw anything + when the window is inactive, create your drawing loop this way: + \code + while(device->run()) + { + if (device->isWindowActive()) + { + // draw everything here + } + else + device->yield(); + } + \endcode + \return True if window is active. */ + virtual bool isWindowActive() const = 0; + + //! Checks if the Irrlicht window has focus + /** \return True if window has focus. */ + virtual bool isWindowFocused() const = 0; + + //! Checks if the Irrlicht window is minimized + /** \return True if window is minimized. */ + virtual bool isWindowMinimized() const = 0; + + //! Checks if the Irrlicht window is running in fullscreen mode + /** \return True if window is fullscreen. */ + virtual bool isFullscreen() const = 0; + + //! Get the current color format of the window + /** \return Color format of the window. */ + virtual video::ECOLOR_FORMAT getColorFormat() const = 0; + + //! Notifies the device that it should close itself. + /** IrrlichtDevice::run() will always return false after closeDevice() was called. */ + virtual void closeDevice() = 0; + + //! Get the version of the engine. + /** The returned string + will look like this: "1.2.3" or this: "1.2". + \return String which contains the version. */ + virtual const c8* getVersion() const = 0; + + //! Sets a new user event receiver which will receive events from the engine. + /** Return true in IEventReceiver::OnEvent to prevent the event from continuing along + the chain of event receivers. The path that an event takes through the system depends + on its type. See irr::EEVENT_TYPE for details. + \param receiver New receiver to be used. */ + virtual void setEventReceiver(IEventReceiver* receiver) = 0; + + //! Provides access to the current event receiver. + /** \return Pointer to the current event receiver. Returns 0 if there is none. */ + virtual IEventReceiver* getEventReceiver() = 0; + + //! Sends a user created event to the engine. + /** Is is usually not necessary to use this. However, if you + are using an own input library for example for doing joystick + input, you can use this to post key or mouse input events to + the engine. Internally, this method only delegates the events + further to the scene manager and the GUI environment. */ + virtual bool postEventFromUser(const SEvent& event) = 0; + + //! Sets the input receiving scene manager. + /** If set to null, the main scene manager (returned by + GetSceneManager()) will receive the input + \param sceneManager New scene manager to be used. */ + virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0; + + //! Sets if the window should be resizable in windowed mode. + /** The default is false. This method only works in windowed + mode. + \param resize Flag whether the window should be resizable. */ + virtual void setResizable(bool resize=false) = 0; + + //! Minimizes the window if possible. + virtual void minimizeWindow() =0; + + //! Maximizes the window if possible. + virtual void maximizeWindow() =0; + + //! Restore the window to normal size if possible. + virtual void restoreWindow() =0; + + //! Activate any joysticks, and generate events for them. + /** Irrlicht contains support for joysticks, but does not generate joystick events by default, + as this would consume joystick info that 3rd party libraries might rely on. Call this method to + activate joystick support in Irrlicht and to receive irr::SJoystickEvent events. + \param joystickInfo On return, this will contain an array of each joystick that was found and activated. + \return true if joysticks are supported on this device and _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + is defined, false if joysticks are not supported or support is compiled out. + */ + virtual bool activateJoysticks(core::array& joystickInfo) =0; + + //! Set the current Gamma Value for the Display + virtual bool setGammaRamp(f32 red, f32 green, f32 blue, + f32 relativebrightness, f32 relativecontrast) =0; + + //! Get the current Gamma Value for the Display + virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue, + f32 &brightness, f32 &contrast) =0; + + //! Remove messages pending in the system message loop + /** This function is usually used after messages have been buffered for a longer time, for example + when loading a large scene. Clearing the message loop prevents that mouse- or buttonclicks which users + have pressed in the meantime will now trigger unexpected actions in the gui.
+ So far the following messages are cleared:
+ Win32: All keyboard and mouse messages
+ Linux: All keyboard and mouse messages
+ All other devices are not yet supported here.
+ The function is still somewhat experimental, as the kind of messages we clear is based on just a few use-cases. + If you think further messages should be cleared, or some messages should not be cleared here, then please tell us. */ + virtual void clearSystemMessages() = 0; + + //! Get the type of the device. + /** This allows the user to check which windowing system is currently being + used. */ + virtual E_DEVICE_TYPE getType() const = 0; + + //! Check if a driver type is supported by the engine. + /** Even if true is returned the driver may not be available + for a configuration requested when creating the device. */ + static bool isDriverSupported(video::E_DRIVER_TYPE driver) + { + switch (driver) + { + case video::EDT_NULL: + return true; + case video::EDT_SOFTWARE: +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return true; +#else + return false; +#endif + case video::EDT_BURNINGSVIDEO: +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return true; +#else + return false; +#endif + case video::EDT_DIRECT3D8: +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + return true; +#else + return false; +#endif + case video::EDT_DIRECT3D9: +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + return true; +#else + return false; +#endif + case video::EDT_OPENGL: +#ifdef _IRR_COMPILE_WITH_OPENGL_ + return true; +#else + return false; +#endif + default: + return false; + } + } + }; + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/Keycodes.h b/src/others/irrlicht-1.8.1/include/Keycodes.h new file mode 100644 index 0000000..2e95c8c --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/Keycodes.h @@ -0,0 +1,173 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_KEY_CODES_H_INCLUDED__ +#define __IRR_KEY_CODES_H_INCLUDED__ + +namespace irr +{ + + enum EKEY_CODE + { + KEY_LBUTTON = 0x01, // Left mouse button + KEY_RBUTTON = 0x02, // Right mouse button + KEY_CANCEL = 0x03, // Control-break processing + KEY_MBUTTON = 0x04, // Middle mouse button (three-button mouse) + KEY_XBUTTON1 = 0x05, // Windows 2000/XP: X1 mouse button + KEY_XBUTTON2 = 0x06, // Windows 2000/XP: X2 mouse button + KEY_BACK = 0x08, // BACKSPACE key + KEY_TAB = 0x09, // TAB key + KEY_CLEAR = 0x0C, // CLEAR key + KEY_RETURN = 0x0D, // ENTER key + KEY_SHIFT = 0x10, // SHIFT key + KEY_CONTROL = 0x11, // CTRL key + KEY_MENU = 0x12, // ALT key + KEY_PAUSE = 0x13, // PAUSE key + KEY_CAPITAL = 0x14, // CAPS LOCK key + KEY_KANA = 0x15, // IME Kana mode + KEY_HANGUEL = 0x15, // IME Hanguel mode (maintained for compatibility use KEY_HANGUL) + KEY_HANGUL = 0x15, // IME Hangul mode + KEY_JUNJA = 0x17, // IME Junja mode + KEY_FINAL = 0x18, // IME final mode + KEY_HANJA = 0x19, // IME Hanja mode + KEY_KANJI = 0x19, // IME Kanji mode + KEY_ESCAPE = 0x1B, // ESC key + KEY_CONVERT = 0x1C, // IME convert + KEY_NONCONVERT = 0x1D, // IME nonconvert + KEY_ACCEPT = 0x1E, // IME accept + KEY_MODECHANGE = 0x1F, // IME mode change request + KEY_SPACE = 0x20, // SPACEBAR + KEY_PRIOR = 0x21, // PAGE UP key + KEY_NEXT = 0x22, // PAGE DOWN key + KEY_END = 0x23, // END key + KEY_HOME = 0x24, // HOME key + KEY_LEFT = 0x25, // LEFT ARROW key + KEY_UP = 0x26, // UP ARROW key + KEY_RIGHT = 0x27, // RIGHT ARROW key + KEY_DOWN = 0x28, // DOWN ARROW key + KEY_SELECT = 0x29, // SELECT key + KEY_PRINT = 0x2A, // PRINT key + KEY_EXECUT = 0x2B, // EXECUTE key + KEY_SNAPSHOT = 0x2C, // PRINT SCREEN key + KEY_INSERT = 0x2D, // INS key + KEY_DELETE = 0x2E, // DEL key + KEY_HELP = 0x2F, // HELP key + KEY_KEY_0 = 0x30, // 0 key + KEY_KEY_1 = 0x31, // 1 key + KEY_KEY_2 = 0x32, // 2 key + KEY_KEY_3 = 0x33, // 3 key + KEY_KEY_4 = 0x34, // 4 key + KEY_KEY_5 = 0x35, // 5 key + KEY_KEY_6 = 0x36, // 6 key + KEY_KEY_7 = 0x37, // 7 key + KEY_KEY_8 = 0x38, // 8 key + KEY_KEY_9 = 0x39, // 9 key + KEY_KEY_A = 0x41, // A key + KEY_KEY_B = 0x42, // B key + KEY_KEY_C = 0x43, // C key + KEY_KEY_D = 0x44, // D key + KEY_KEY_E = 0x45, // E key + KEY_KEY_F = 0x46, // F key + KEY_KEY_G = 0x47, // G key + KEY_KEY_H = 0x48, // H key + KEY_KEY_I = 0x49, // I key + KEY_KEY_J = 0x4A, // J key + KEY_KEY_K = 0x4B, // K key + KEY_KEY_L = 0x4C, // L key + KEY_KEY_M = 0x4D, // M key + KEY_KEY_N = 0x4E, // N key + KEY_KEY_O = 0x4F, // O key + KEY_KEY_P = 0x50, // P key + KEY_KEY_Q = 0x51, // Q key + KEY_KEY_R = 0x52, // R key + KEY_KEY_S = 0x53, // S key + KEY_KEY_T = 0x54, // T key + KEY_KEY_U = 0x55, // U key + KEY_KEY_V = 0x56, // V key + KEY_KEY_W = 0x57, // W key + KEY_KEY_X = 0x58, // X key + KEY_KEY_Y = 0x59, // Y key + KEY_KEY_Z = 0x5A, // Z key + KEY_LWIN = 0x5B, // Left Windows key (Microsoft Natural keyboard) + KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard) + KEY_APPS = 0x5D, // Applications key (Natural keyboard) + KEY_SLEEP = 0x5F, // Computer Sleep key + KEY_NUMPAD0 = 0x60, // Numeric keypad 0 key + KEY_NUMPAD1 = 0x61, // Numeric keypad 1 key + KEY_NUMPAD2 = 0x62, // Numeric keypad 2 key + KEY_NUMPAD3 = 0x63, // Numeric keypad 3 key + KEY_NUMPAD4 = 0x64, // Numeric keypad 4 key + KEY_NUMPAD5 = 0x65, // Numeric keypad 5 key + KEY_NUMPAD6 = 0x66, // Numeric keypad 6 key + KEY_NUMPAD7 = 0x67, // Numeric keypad 7 key + KEY_NUMPAD8 = 0x68, // Numeric keypad 8 key + KEY_NUMPAD9 = 0x69, // Numeric keypad 9 key + KEY_MULTIPLY = 0x6A, // Multiply key + KEY_ADD = 0x6B, // Add key + KEY_SEPARATOR = 0x6C, // Separator key + KEY_SUBTRACT = 0x6D, // Subtract key + KEY_DECIMAL = 0x6E, // Decimal key + KEY_DIVIDE = 0x6F, // Divide key + KEY_F1 = 0x70, // F1 key + KEY_F2 = 0x71, // F2 key + KEY_F3 = 0x72, // F3 key + KEY_F4 = 0x73, // F4 key + KEY_F5 = 0x74, // F5 key + KEY_F6 = 0x75, // F6 key + KEY_F7 = 0x76, // F7 key + KEY_F8 = 0x77, // F8 key + KEY_F9 = 0x78, // F9 key + KEY_F10 = 0x79, // F10 key + KEY_F11 = 0x7A, // F11 key + KEY_F12 = 0x7B, // F12 key + KEY_F13 = 0x7C, // F13 key + KEY_F14 = 0x7D, // F14 key + KEY_F15 = 0x7E, // F15 key + KEY_F16 = 0x7F, // F16 key + KEY_F17 = 0x80, // F17 key + KEY_F18 = 0x81, // F18 key + KEY_F19 = 0x82, // F19 key + KEY_F20 = 0x83, // F20 key + KEY_F21 = 0x84, // F21 key + KEY_F22 = 0x85, // F22 key + KEY_F23 = 0x86, // F23 key + KEY_F24 = 0x87, // F24 key + KEY_NUMLOCK = 0x90, // NUM LOCK key + KEY_SCROLL = 0x91, // SCROLL LOCK key + KEY_LSHIFT = 0xA0, // Left SHIFT key + KEY_RSHIFT = 0xA1, // Right SHIFT key + KEY_LCONTROL = 0xA2, // Left CONTROL key + KEY_RCONTROL = 0xA3, // Right CONTROL key + KEY_LMENU = 0xA4, // Left MENU key + KEY_RMENU = 0xA5, // Right MENU key + KEY_OEM_1 = 0xBA, // for US ";:" + KEY_PLUS = 0xBB, // Plus Key "+" + KEY_COMMA = 0xBC, // Comma Key "," + KEY_MINUS = 0xBD, // Minus Key "-" + KEY_PERIOD = 0xBE, // Period Key "." + KEY_OEM_2 = 0xBF, // for US "/?" + KEY_OEM_3 = 0xC0, // for US "`~" + KEY_OEM_4 = 0xDB, // for US "[{" + KEY_OEM_5 = 0xDC, // for US "\|" + KEY_OEM_6 = 0xDD, // for US "]}" + KEY_OEM_7 = 0xDE, // for US "'"" + KEY_OEM_8 = 0xDF, // None + KEY_OEM_AX = 0xE1, // for Japan "AX" + KEY_OEM_102 = 0xE2, // "<>" or "\|" + KEY_ATTN = 0xF6, // Attn key + KEY_CRSEL = 0xF7, // CrSel key + KEY_EXSEL = 0xF8, // ExSel key + KEY_EREOF = 0xF9, // Erase EOF key + KEY_PLAY = 0xFA, // Play key + KEY_ZOOM = 0xFB, // Zoom key + KEY_PA1 = 0xFD, // PA1 key + KEY_OEM_CLEAR = 0xFE, // Clear key + + KEY_KEY_CODES_COUNT = 0xFF // this is not a key, but the amount of keycodes there are. + }; + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/S3DVertex.h b/src/others/irrlicht-1.8.1/include/S3DVertex.h new file mode 100644 index 0000000..bf0fd5b --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/S3DVertex.h @@ -0,0 +1,274 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_3D_VERTEX_H_INCLUDED__ +#define __S_3D_VERTEX_H_INCLUDED__ + +#include "vector3d.h" +#include "vector2d.h" +#include "SColor.h" + +namespace irr +{ +namespace video +{ + +//! Enumeration for all vertex types there are. +enum E_VERTEX_TYPE +{ + //! Standard vertex type used by the Irrlicht engine, video::S3DVertex. + EVT_STANDARD = 0, + + //! Vertex with two texture coordinates, video::S3DVertex2TCoords. + /** Usually used for geometry with lightmaps or other special materials. */ + EVT_2TCOORDS, + + //! Vertex with a tangent and binormal vector, video::S3DVertexTangents. + /** Usually used for tangent space normal mapping. */ + EVT_TANGENTS +}; + +//! Array holding the built in vertex type names +const char* const sBuiltInVertexTypeNames[] = +{ + "standard", + "2tcoords", + "tangents", + 0 +}; + +//! standard vertex used by the Irrlicht engine. +struct S3DVertex +{ + //! default constructor + S3DVertex() {} + + //! constructor + S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv) + : Pos(x,y,z), Normal(nx,ny,nz), Color(c), TCoords(tu,tv) {} + + //! constructor + S3DVertex(const core::vector3df& pos, const core::vector3df& normal, + SColor color, const core::vector2d& tcoords) + : Pos(pos), Normal(normal), Color(color), TCoords(tcoords) {} + + //! Position + core::vector3df Pos; + + //! Normal vector + core::vector3df Normal; + + //! Color + SColor Color; + + //! Texture coordinates + core::vector2d TCoords; + + bool operator==(const S3DVertex& other) const + { + return ((Pos == other.Pos) && (Normal == other.Normal) && + (Color == other.Color) && (TCoords == other.TCoords)); + } + + bool operator!=(const S3DVertex& other) const + { + return ((Pos != other.Pos) || (Normal != other.Normal) || + (Color != other.Color) || (TCoords != other.TCoords)); + } + + bool operator<(const S3DVertex& other) const + { + return ((Pos < other.Pos) || + ((Pos == other.Pos) && (Normal < other.Normal)) || + ((Pos == other.Pos) && (Normal == other.Normal) && (Color < other.Color)) || + ((Pos == other.Pos) && (Normal == other.Normal) && (Color == other.Color) && (TCoords < other.TCoords))); + } + + E_VERTEX_TYPE getType() const + { + return EVT_STANDARD; + } + + S3DVertex getInterpolated(const S3DVertex& other, f32 d) + { + d = core::clamp(d, 0.0f, 1.0f); + return S3DVertex(Pos.getInterpolated(other.Pos, d), + Normal.getInterpolated(other.Normal, d), + Color.getInterpolated(other.Color, d), + TCoords.getInterpolated(other.TCoords, d)); + } +}; + + +//! Vertex with two texture coordinates. +/** Usually used for geometry with lightmaps +or other special materials. +*/ +struct S3DVertex2TCoords : public S3DVertex +{ + //! default constructor + S3DVertex2TCoords() : S3DVertex() {} + + //! constructor with two different texture coords, but no normal + S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2) + : S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv), TCoords2(tu2,tv2) {} + + //! constructor with two different texture coords, but no normal + S3DVertex2TCoords(const core::vector3df& pos, SColor color, + const core::vector2d& tcoords, const core::vector2d& tcoords2) + : S3DVertex(pos, core::vector3df(), color, tcoords), TCoords2(tcoords2) {} + + //! constructor with all values + S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, const SColor& color, + const core::vector2d& tcoords, const core::vector2d& tcoords2) + : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords2) {} + + //! constructor with all values + S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2) + : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu2,tv2) {} + + //! constructor with the same texture coords and normal + S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv) + : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu,tv) {} + + //! constructor with the same texture coords and normal + S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, + SColor color, const core::vector2d& tcoords) + : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords) {} + + //! constructor from S3DVertex + S3DVertex2TCoords(S3DVertex& o) : S3DVertex(o) {} + + //! Second set of texture coordinates + core::vector2d TCoords2; + + //! Equality operator + bool operator==(const S3DVertex2TCoords& other) const + { + return ((static_cast(*this)==other) && + (TCoords2 == other.TCoords2)); + } + + //! Inequality operator + bool operator!=(const S3DVertex2TCoords& other) const + { + return ((static_cast(*this)!=other) || + (TCoords2 != other.TCoords2)); + } + + bool operator<(const S3DVertex2TCoords& other) const + { + return ((static_cast(*this) < other) || + ((static_cast(*this) == other) && (TCoords2 < other.TCoords2))); + } + + E_VERTEX_TYPE getType() const + { + return EVT_2TCOORDS; + } + + S3DVertex2TCoords getInterpolated(const S3DVertex2TCoords& other, f32 d) + { + d = core::clamp(d, 0.0f, 1.0f); + return S3DVertex2TCoords(Pos.getInterpolated(other.Pos, d), + Normal.getInterpolated(other.Normal, d), + Color.getInterpolated(other.Color, d), + TCoords.getInterpolated(other.TCoords, d), + TCoords2.getInterpolated(other.TCoords2, d)); + } +}; + + +//! Vertex with a tangent and binormal vector. +/** Usually used for tangent space normal mapping. */ +struct S3DVertexTangents : public S3DVertex +{ + //! default constructor + S3DVertexTangents() : S3DVertex() { } + + //! constructor + S3DVertexTangents(f32 x, f32 y, f32 z, f32 nx=0.0f, f32 ny=0.0f, f32 nz=0.0f, + SColor c = 0xFFFFFFFF, f32 tu=0.0f, f32 tv=0.0f, + f32 tanx=0.0f, f32 tany=0.0f, f32 tanz=0.0f, + f32 bx=0.0f, f32 by=0.0f, f32 bz=0.0f) + : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), Tangent(tanx,tany,tanz), Binormal(bx,by,bz) { } + + //! constructor + S3DVertexTangents(const core::vector3df& pos, SColor c, + const core::vector2df& tcoords) + : S3DVertex(pos, core::vector3df(), c, tcoords) { } + + //! constructor + S3DVertexTangents(const core::vector3df& pos, + const core::vector3df& normal, SColor c, + const core::vector2df& tcoords, + const core::vector3df& tangent=core::vector3df(), + const core::vector3df& binormal=core::vector3df()) + : S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { } + + //! Tangent vector along the x-axis of the texture + core::vector3df Tangent; + + //! Binormal vector (tangent x normal) + core::vector3df Binormal; + + bool operator==(const S3DVertexTangents& other) const + { + return ((static_cast(*this)==other) && + (Tangent == other.Tangent) && + (Binormal == other.Binormal)); + } + + bool operator!=(const S3DVertexTangents& other) const + { + return ((static_cast(*this)!=other) || + (Tangent != other.Tangent) || + (Binormal != other.Binormal)); + } + + bool operator<(const S3DVertexTangents& other) const + { + return ((static_cast(*this) < other) || + ((static_cast(*this) == other) && (Tangent < other.Tangent)) || + ((static_cast(*this) == other) && (Tangent == other.Tangent) && (Binormal < other.Binormal))); + } + + E_VERTEX_TYPE getType() const + { + return EVT_TANGENTS; + } + + S3DVertexTangents getInterpolated(const S3DVertexTangents& other, f32 d) + { + d = core::clamp(d, 0.0f, 1.0f); + return S3DVertexTangents(Pos.getInterpolated(other.Pos, d), + Normal.getInterpolated(other.Normal, d), + Color.getInterpolated(other.Color, d), + TCoords.getInterpolated(other.TCoords, d), + Tangent.getInterpolated(other.Tangent, d), + Binormal.getInterpolated(other.Binormal, d)); + } +}; + + + +inline u32 getVertexPitchFromType(E_VERTEX_TYPE vertexType) +{ + switch (vertexType) + { + case video::EVT_2TCOORDS: + return sizeof(video::S3DVertex2TCoords); + case video::EVT_TANGENTS: + return sizeof(video::S3DVertexTangents); + default: + return sizeof(video::S3DVertex); + } +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SAnimatedMesh.h b/src/others/irrlicht-1.8.1/include/SAnimatedMesh.h new file mode 100644 index 0000000..ced4060 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SAnimatedMesh.h @@ -0,0 +1,189 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_ANIMATED_MESH_H_INCLUDED__ +#define __S_ANIMATED_MESH_H_INCLUDED__ + +#include "IAnimatedMesh.h" +#include "IMesh.h" +#include "aabbox3d.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + + //! Simple implementation of the IAnimatedMesh interface. + struct SAnimatedMesh : public IAnimatedMesh + { + //! constructor + SAnimatedMesh(scene::IMesh* mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) : IAnimatedMesh(), FramesPerSecond(25.f), Type(type) + { + #ifdef _DEBUG + setDebugName("SAnimatedMesh"); + #endif + addMesh(mesh); + recalculateBoundingBox(); + } + + //! destructor + virtual ~SAnimatedMesh() + { + // drop meshes + for (u32 i=0; idrop(); + } + + //! Gets the frame count of the animated mesh. + /** \return Amount of frames. If the amount is 1, it is a static, non animated mesh. */ + virtual u32 getFrameCount() const + { + return Meshes.size(); + } + + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const + { + return FramesPerSecond; + } + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps) + { + FramesPerSecond=fps; + } + + //! Returns the IMesh interface for a frame. + /** \param frame: Frame number as zero based index. The maximum frame number is + getFrameCount() - 1; + \param detailLevel: Level of detail. 0 is the lowest, + 255 the highest level of detail. Most meshes will ignore the detail level. + \param startFrameLoop: start frame + \param endFrameLoop: end frame + \return The animated mesh based on a detail level. */ + virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) + { + if (Meshes.empty()) + return 0; + + return Meshes[frame]; + } + + //! adds a Mesh + void addMesh(IMesh* mesh) + { + if (mesh) + { + mesh->grab(); + Meshes.push_back(mesh); + } + } + + //! Returns an axis aligned bounding box of the mesh. + /** \return A bounding box of this mesh is returned. */ + virtual const core::aabbox3d& getBoundingBox() const + { + return Box; + } + + //! set user axis aligned bounding box + virtual void setBoundingBox(const core::aabbox3df& box) + { + Box = box; + } + + //! Recalculates the bounding box. + void recalculateBoundingBox() + { + Box.reset(0,0,0); + + if (Meshes.empty()) + return; + + Box = Meshes[0]->getBoundingBox(); + + for (u32 i=1; igetBoundingBox()); + } + + //! Returns the type of the animated mesh. + virtual E_ANIMATED_MESH_TYPE getMeshType() const + { + return Type; + } + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const + { + if (Meshes.empty()) + return 0; + + return Meshes[0]->getMeshBufferCount(); + } + + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const + { + if (Meshes.empty()) + return 0; + + return Meshes[0]->getMeshBuffer(nr); + } + + //! Returns pointer to a mesh buffer which fits a material + /** \param material: material to search for + \return Returns the pointer to the mesh buffer or + NULL if there is no such mesh buffer. */ + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const + { + if (Meshes.empty()) + return 0; + + return Meshes[0]->getMeshBuffer(material); + } + + //! Set a material flag for all meshbuffers of this mesh. + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) + { + for (u32 i=0; isetMaterialFlag(flag, newvalue); + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) + { + for (u32 i=0; isetHardwareMappingHint(newMappingHint, buffer); + } + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) + { + for (u32 i=0; isetDirty(buffer); + } + + //! All meshes defining the animated mesh + core::array Meshes; + + //! The bounding box of this mesh + core::aabbox3d Box; + + //! Default animation speed of this mesh. + f32 FramesPerSecond; + + //! The type of the mesh. + E_ANIMATED_MESH_TYPE Type; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SColor.h b/src/others/irrlicht-1.8.1/include/SColor.h new file mode 100644 index 0000000..b61bbef --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SColor.h @@ -0,0 +1,697 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __COLOR_H_INCLUDED__ +#define __COLOR_H_INCLUDED__ + +#include "irrTypes.h" +#include "irrMath.h" + +namespace irr +{ +namespace video +{ + //! An enum for the color format of textures used by the Irrlicht Engine. + /** A color format specifies how color information is stored. */ + enum ECOLOR_FORMAT + { + //! 16 bit color format used by the software driver. + /** It is thus preferred by all other irrlicht engine video drivers. + There are 5 bits for every color component, and a single bit is left + for alpha information. */ + ECF_A1R5G5B5 = 0, + + //! Standard 16 bit color format. + ECF_R5G6B5, + + //! 24 bit color, no alpha channel, but 8 bit for red, green and blue. + ECF_R8G8B8, + + //! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha. + ECF_A8R8G8B8, + + /** Floating Point formats. The following formats may only be used for render target textures. */ + + //! 16 bit floating point format using 16 bits for the red channel. + ECF_R16F, + + //! 32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel. + ECF_G16R16F, + + //! 64 bit floating point format 16 bits are used for the red, green, blue and alpha channels. + ECF_A16B16G16R16F, + + //! 32 bit floating point format using 32 bits for the red channel. + ECF_R32F, + + //! 64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel. + ECF_G32R32F, + + //! 128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels. + ECF_A32B32G32R32F, + + //! Unknown color format: + ECF_UNKNOWN + }; + + + //! Creates a 16 bit A1R5G5B5 color + inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a=0xFF) + { + return (u16)((a & 0x80) << 8 | + (r & 0xF8) << 7 | + (g & 0xF8) << 2 | + (b & 0xF8) >> 3); + } + + + //! Creates a 16 bit A1R5G5B5 color + inline u16 RGB16(u32 r, u32 g, u32 b) + { + return RGBA16(r,g,b); + } + + + //! Creates a 16bit A1R5G5B5 color, based on 16bit input values + inline u16 RGB16from16(u16 r, u16 g, u16 b) + { + return (0x8000 | + (r & 0x1F) << 10 | + (g & 0x1F) << 5 | + (b & 0x1F)); + } + + + //! Converts a 32bit (X8R8G8B8) color to a 16bit A1R5G5B5 color + inline u16 X8R8G8B8toA1R5G5B5(u32 color) + { + return (u16)(0x8000 | + ( color & 0x00F80000) >> 9 | + ( color & 0x0000F800) >> 6 | + ( color & 0x000000F8) >> 3); + } + + + //! Converts a 32bit (A8R8G8B8) color to a 16bit A1R5G5B5 color + inline u16 A8R8G8B8toA1R5G5B5(u32 color) + { + return (u16)(( color & 0x80000000) >> 16| + ( color & 0x00F80000) >> 9 | + ( color & 0x0000F800) >> 6 | + ( color & 0x000000F8) >> 3); + } + + + //! Converts a 32bit (A8R8G8B8) color to a 16bit R5G6B5 color + inline u16 A8R8G8B8toR5G6B5(u32 color) + { + return (u16)(( color & 0x00F80000) >> 8 | + ( color & 0x0000FC00) >> 5 | + ( color & 0x000000F8) >> 3); + } + + + //! Convert A8R8G8B8 Color from A1R5G5B5 color + /** build a nicer 32bit Color by extending dest lower bits with source high bits. */ + inline u32 A1R5G5B5toA8R8G8B8(u16 color) + { + return ( (( -( (s32) color & 0x00008000 ) >> (s32) 31 ) & 0xFF000000 ) | + (( color & 0x00007C00 ) << 9) | (( color & 0x00007000 ) << 4) | + (( color & 0x000003E0 ) << 6) | (( color & 0x00000380 ) << 1) | + (( color & 0x0000001F ) << 3) | (( color & 0x0000001C ) >> 2) + ); + } + + + //! Returns A8R8G8B8 Color from R5G6B5 color + inline u32 R5G6B5toA8R8G8B8(u16 color) + { + return 0xFF000000 | + ((color & 0xF800) << 8)| + ((color & 0x07E0) << 5)| + ((color & 0x001F) << 3); + } + + + //! Returns A1R5G5B5 Color from R5G6B5 color + inline u16 R5G6B5toA1R5G5B5(u16 color) + { + return 0x8000 | (((color & 0xFFC0) >> 1) | (color & 0x1F)); + } + + + //! Returns R5G6B5 Color from A1R5G5B5 color + inline u16 A1R5G5B5toR5G6B5(u16 color) + { + return (((color & 0x7FE0) << 1) | (color & 0x1F)); + } + + + + //! Returns the alpha component from A1R5G5B5 color + /** In Irrlicht, alpha refers to opacity. + \return The alpha value of the color. 0 is transparent, 1 is opaque. */ + inline u32 getAlpha(u16 color) + { + return ((color >> 15)&0x1); + } + + + //! Returns the red component from A1R5G5B5 color. + /** Shift left by 3 to get 8 bit value. */ + inline u32 getRed(u16 color) + { + return ((color >> 10)&0x1F); + } + + + //! Returns the green component from A1R5G5B5 color + /** Shift left by 3 to get 8 bit value. */ + inline u32 getGreen(u16 color) + { + return ((color >> 5)&0x1F); + } + + + //! Returns the blue component from A1R5G5B5 color + /** Shift left by 3 to get 8 bit value. */ + inline u32 getBlue(u16 color) + { + return (color & 0x1F); + } + + + //! Returns the average from a 16 bit A1R5G5B5 color + inline s32 getAverage(s16 color) + { + return ((getRed(color)<<3) + (getGreen(color)<<3) + (getBlue(color)<<3)) / 3; + } + + + //! Class representing a 32 bit ARGB color. + /** The color values for alpha, red, green, and blue are + stored in a single u32. So all four values may be between 0 and 255. + Alpha in Irrlicht is opacity, so 0 is fully transparent, 255 is fully opaque (solid). + This class is used by most parts of the Irrlicht Engine + to specify a color. Another way is using the class SColorf, which + stores the color values in 4 floats. + This class must consist of only one u32 and must not use virtual functions. + */ + class SColor + { + public: + + //! Constructor of the Color. Does nothing. + /** The color value is not initialized to save time. */ + SColor() {} + + //! Constructs the color from 4 values representing the alpha, red, green and blue component. + /** Must be values between 0 and 255. */ + SColor (u32 a, u32 r, u32 g, u32 b) + : color(((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff)) {} + + //! Constructs the color from a 32 bit value. Could be another color. + SColor(u32 clr) + : color(clr) {} + + //! Returns the alpha component of the color. + /** The alpha component defines how opaque a color is. + \return The alpha value of the color. 0 is fully transparent, 255 is fully opaque. */ + u32 getAlpha() const { return color>>24; } + + //! Returns the red component of the color. + /** \return Value between 0 and 255, specifying how red the color is. + 0 means no red, 255 means full red. */ + u32 getRed() const { return (color>>16) & 0xff; } + + //! Returns the green component of the color. + /** \return Value between 0 and 255, specifying how green the color is. + 0 means no green, 255 means full green. */ + u32 getGreen() const { return (color>>8) & 0xff; } + + //! Returns the blue component of the color. + /** \return Value between 0 and 255, specifying how blue the color is. + 0 means no blue, 255 means full blue. */ + u32 getBlue() const { return color & 0xff; } + + //! Get lightness of the color in the range [0,255] + f32 getLightness() const + { + return 0.5f*(core::max_(core::max_(getRed(),getGreen()),getBlue())+core::min_(core::min_(getRed(),getGreen()),getBlue())); + } + + //! Get luminance of the color in the range [0,255]. + f32 getLuminance() const + { + return 0.3f*getRed() + 0.59f*getGreen() + 0.11f*getBlue(); + } + + //! Get average intensity of the color in the range [0,255]. + u32 getAverage() const + { + return ( getRed() + getGreen() + getBlue() ) / 3; + } + + //! Sets the alpha component of the Color. + /** The alpha component defines how transparent a color should be. + \param a The alpha value of the color. 0 is fully transparent, 255 is fully opaque. */ + void setAlpha(u32 a) { color = ((a & 0xff)<<24) | (color & 0x00ffffff); } + + //! Sets the red component of the Color. + /** \param r: Has to be a value between 0 and 255. + 0 means no red, 255 means full red. */ + void setRed(u32 r) { color = ((r & 0xff)<<16) | (color & 0xff00ffff); } + + //! Sets the green component of the Color. + /** \param g: Has to be a value between 0 and 255. + 0 means no green, 255 means full green. */ + void setGreen(u32 g) { color = ((g & 0xff)<<8) | (color & 0xffff00ff); } + + //! Sets the blue component of the Color. + /** \param b: Has to be a value between 0 and 255. + 0 means no blue, 255 means full blue. */ + void setBlue(u32 b) { color = (b & 0xff) | (color & 0xffffff00); } + + //! Calculates a 16 bit A1R5G5B5 value of this color. + /** \return 16 bit A1R5G5B5 value of this color. */ + u16 toA1R5G5B5() const { return A8R8G8B8toA1R5G5B5(color); } + + //! Converts color to OpenGL color format + /** From ARGB to RGBA in 4 byte components for endian aware + passing to OpenGL + \param dest: address where the 4x8 bit OpenGL color is stored. */ + void toOpenGLColor(u8* dest) const + { + *dest = (u8)getRed(); + *++dest = (u8)getGreen(); + *++dest = (u8)getBlue(); + *++dest = (u8)getAlpha(); + } + + //! Sets all four components of the color at once. + /** Constructs the color from 4 values representing the alpha, + red, green and blue components of the color. Must be values + between 0 and 255. + \param a: Alpha component of the color. The alpha component + defines how transparent a color should be. Has to be a value + between 0 and 255. 255 means not transparent (opaque), 0 means + fully transparent. + \param r: Sets the red component of the Color. Has to be a + value between 0 and 255. 0 means no red, 255 means full red. + \param g: Sets the green component of the Color. Has to be a + value between 0 and 255. 0 means no green, 255 means full + green. + \param b: Sets the blue component of the Color. Has to be a + value between 0 and 255. 0 means no blue, 255 means full blue. */ + void set(u32 a, u32 r, u32 g, u32 b) + { + color = (((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff)); + } + void set(u32 col) { color = col; } + + //! Compares the color to another color. + /** \return True if the colors are the same, and false if not. */ + bool operator==(const SColor& other) const { return other.color == color; } + + //! Compares the color to another color. + /** \return True if the colors are different, and false if they are the same. */ + bool operator!=(const SColor& other) const { return other.color != color; } + + //! comparison operator + /** \return True if this color is smaller than the other one */ + bool operator<(const SColor& other) const { return (color < other.color); } + + //! Adds two colors, result is clamped to 0..255 values + /** \param other Color to add to this color + \return Addition of the two colors, clamped to 0..255 values */ + SColor operator+(const SColor& other) const + { + return SColor(core::min_(getAlpha() + other.getAlpha(), 255u), + core::min_(getRed() + other.getRed(), 255u), + core::min_(getGreen() + other.getGreen(), 255u), + core::min_(getBlue() + other.getBlue(), 255u)); + } + + //! Interpolates the color with a f32 value to another color + /** \param other: Other color + \param d: value between 0.0f and 1.0f + \return Interpolated color. */ + SColor getInterpolated(const SColor &other, f32 d) const + { + d = core::clamp(d, 0.f, 1.f); + const f32 inv = 1.0f - d; + return SColor((u32)core::round32(other.getAlpha()*inv + getAlpha()*d), + (u32)core::round32(other.getRed()*inv + getRed()*d), + (u32)core::round32(other.getGreen()*inv + getGreen()*d), + (u32)core::round32(other.getBlue()*inv + getBlue()*d)); + } + + //! Returns interpolated color. ( quadratic ) + /** \param c1: first color to interpolate with + \param c2: second color to interpolate with + \param d: value between 0.0f and 1.0f. */ + SColor getInterpolated_quadratic(const SColor& c1, const SColor& c2, f32 d) const + { + // this*(1-d)*(1-d) + 2 * c1 * (1-d) + c2 * d * d; + d = core::clamp(d, 0.f, 1.f); + const f32 inv = 1.f - d; + const f32 mul0 = inv * inv; + const f32 mul1 = 2.f * d * inv; + const f32 mul2 = d * d; + + return SColor( + core::clamp( core::floor32( + getAlpha() * mul0 + c1.getAlpha() * mul1 + c2.getAlpha() * mul2 ), 0, 255 ), + core::clamp( core::floor32( + getRed() * mul0 + c1.getRed() * mul1 + c2.getRed() * mul2 ), 0, 255 ), + core::clamp ( core::floor32( + getGreen() * mul0 + c1.getGreen() * mul1 + c2.getGreen() * mul2 ), 0, 255 ), + core::clamp ( core::floor32( + getBlue() * mul0 + c1.getBlue() * mul1 + c2.getBlue() * mul2 ), 0, 255 )); + } + + //! set the color by expecting data in the given format + /** \param data: must point to valid memory containing color information in the given format + \param format: tells the format in which data is available + */ + void setData(const void *data, ECOLOR_FORMAT format) + { + switch (format) + { + case ECF_A1R5G5B5: + color = A1R5G5B5toA8R8G8B8(*(u16*)data); + break; + case ECF_R5G6B5: + color = R5G6B5toA8R8G8B8(*(u16*)data); + break; + case ECF_A8R8G8B8: + color = *(u32*)data; + break; + case ECF_R8G8B8: + { + u8* p = (u8*)data; + set(255, p[0],p[1],p[2]); + } + break; + default: + color = 0xffffffff; + break; + } + } + + //! Write the color to data in the defined format + /** \param data: target to write the color. Must contain sufficiently large memory to receive the number of bytes neede for format + \param format: tells the format used to write the color into data + */ + void getData(void *data, ECOLOR_FORMAT format) + { + switch(format) + { + case ECF_A1R5G5B5: + { + u16 * dest = (u16*)data; + *dest = video::A8R8G8B8toA1R5G5B5( color ); + } + break; + + case ECF_R5G6B5: + { + u16 * dest = (u16*)data; + *dest = video::A8R8G8B8toR5G6B5( color ); + } + break; + + case ECF_R8G8B8: + { + u8* dest = (u8*)data; + dest[0] = (u8)getRed(); + dest[1] = (u8)getGreen(); + dest[2] = (u8)getBlue(); + } + break; + + case ECF_A8R8G8B8: + { + u32 * dest = (u32*)data; + *dest = color; + } + break; + + default: + break; + } + } + + //! color in A8R8G8B8 Format + u32 color; + }; + + + //! Class representing a color with four floats. + /** The color values for red, green, blue + and alpha are each stored in a 32 bit floating point variable. + So all four values may be between 0.0f and 1.0f. + Another, faster way to define colors is using the class SColor, which + stores the color values in a single 32 bit integer. + */ + class SColorf + { + public: + //! Default constructor for SColorf. + /** Sets red, green and blue to 0.0f and alpha to 1.0f. */ + SColorf() : r(0.0f), g(0.0f), b(0.0f), a(1.0f) {} + + //! Constructs a color from up to four color values: red, green, blue, and alpha. + /** \param r: Red color component. Should be a value between + 0.0f meaning no red and 1.0f, meaning full red. + \param g: Green color component. Should be a value between 0.0f + meaning no green and 1.0f, meaning full green. + \param b: Blue color component. Should be a value between 0.0f + meaning no blue and 1.0f, meaning full blue. + \param a: Alpha color component of the color. The alpha + component defines how transparent a color should be. Has to be + a value between 0.0f and 1.0f, 1.0f means not transparent + (opaque), 0.0f means fully transparent. */ + SColorf(f32 r, f32 g, f32 b, f32 a = 1.0f) : r(r), g(g), b(b), a(a) {} + + //! Constructs a color from 32 bit Color. + /** \param c: 32 bit color from which this SColorf class is + constructed from. */ + SColorf(SColor c) + { + const f32 inv = 1.0f / 255.0f; + r = c.getRed() * inv; + g = c.getGreen() * inv; + b = c.getBlue() * inv; + a = c.getAlpha() * inv; + } + + //! Converts this color to a SColor without floats. + SColor toSColor() const + { + return SColor((u32)core::round32(a*255.0f), (u32)core::round32(r*255.0f), (u32)core::round32(g*255.0f), (u32)core::round32(b*255.0f)); + } + + //! Sets three color components to new values at once. + /** \param rr: Red color component. Should be a value between 0.0f meaning + no red (=black) and 1.0f, meaning full red. + \param gg: Green color component. Should be a value between 0.0f meaning + no green (=black) and 1.0f, meaning full green. + \param bb: Blue color component. Should be a value between 0.0f meaning + no blue (=black) and 1.0f, meaning full blue. */ + void set(f32 rr, f32 gg, f32 bb) {r = rr; g =gg; b = bb; } + + //! Sets all four color components to new values at once. + /** \param aa: Alpha component. Should be a value between 0.0f meaning + fully transparent and 1.0f, meaning opaque. + \param rr: Red color component. Should be a value between 0.0f meaning + no red and 1.0f, meaning full red. + \param gg: Green color component. Should be a value between 0.0f meaning + no green and 1.0f, meaning full green. + \param bb: Blue color component. Should be a value between 0.0f meaning + no blue and 1.0f, meaning full blue. */ + void set(f32 aa, f32 rr, f32 gg, f32 bb) {a = aa; r = rr; g =gg; b = bb; } + + //! Interpolates the color with a f32 value to another color + /** \param other: Other color + \param d: value between 0.0f and 1.0f + \return Interpolated color. */ + SColorf getInterpolated(const SColorf &other, f32 d) const + { + d = core::clamp(d, 0.f, 1.f); + const f32 inv = 1.0f - d; + return SColorf(other.r*inv + r*d, + other.g*inv + g*d, other.b*inv + b*d, other.a*inv + a*d); + } + + //! Returns interpolated color. ( quadratic ) + /** \param c1: first color to interpolate with + \param c2: second color to interpolate with + \param d: value between 0.0f and 1.0f. */ + inline SColorf getInterpolated_quadratic(const SColorf& c1, const SColorf& c2, + f32 d) const + { + d = core::clamp(d, 0.f, 1.f); + // this*(1-d)*(1-d) + 2 * c1 * (1-d) + c2 * d * d; + const f32 inv = 1.f - d; + const f32 mul0 = inv * inv; + const f32 mul1 = 2.f * d * inv; + const f32 mul2 = d * d; + + return SColorf (r * mul0 + c1.r * mul1 + c2.r * mul2, + g * mul0 + c1.g * mul1 + c2.g * mul2, + b * mul0 + c1.b * mul1 + c2.b * mul2, + a * mul0 + c1.a * mul1 + c2.a * mul2); + } + + + //! Sets a color component by index. R=0, G=1, B=2, A=3 + void setColorComponentValue(s32 index, f32 value) + { + switch(index) + { + case 0: r = value; break; + case 1: g = value; break; + case 2: b = value; break; + case 3: a = value; break; + } + } + + //! Returns the alpha component of the color in the range 0.0 (transparent) to 1.0 (opaque) + f32 getAlpha() const { return a; } + + //! Returns the red component of the color in the range 0.0 to 1.0 + f32 getRed() const { return r; } + + //! Returns the green component of the color in the range 0.0 to 1.0 + f32 getGreen() const { return g; } + + //! Returns the blue component of the color in the range 0.0 to 1.0 + f32 getBlue() const { return b; } + + //! red color component + f32 r; + + //! green color component + f32 g; + + //! blue component + f32 b; + + //! alpha color component + f32 a; + }; + + + //! Class representing a color in HSL format + /** The color values for hue, saturation, luminance + are stored in 32bit floating point variables. Hue is in range [0,360], + Luminance and Saturation are in percent [0,100] + */ + class SColorHSL + { + public: + SColorHSL ( f32 h = 0.f, f32 s = 0.f, f32 l = 0.f ) + : Hue ( h ), Saturation ( s ), Luminance ( l ) {} + + void fromRGB(const SColorf &color); + void toRGB(SColorf &color) const; + + f32 Hue; + f32 Saturation; + f32 Luminance; + + private: + inline f32 toRGB1(f32 rm1, f32 rm2, f32 rh) const; + + }; + + inline void SColorHSL::fromRGB(const SColorf &color) + { + const f32 maxVal = core::max_(color.getRed(), color.getGreen(), color.getBlue()); + const f32 minVal = (f32)core::min_(color.getRed(), color.getGreen(), color.getBlue()); + Luminance = (maxVal+minVal)*50; + if (core::equals(maxVal, minVal)) + { + Hue=0.f; + Saturation=0.f; + return; + } + + const f32 delta = maxVal-minVal; + if ( Luminance <= 50 ) + { + Saturation = (delta)/(maxVal+minVal); + } + else + { + Saturation = (delta)/(2-maxVal-minVal); + } + Saturation *= 100; + + if (core::equals(maxVal, color.getRed())) + Hue = (color.getGreen()-color.getBlue())/delta; + else if (core::equals(maxVal, color.getGreen())) + Hue = 2+((color.getBlue()-color.getRed())/delta); + else // blue is max + Hue = 4+((color.getRed()-color.getGreen())/delta); + + Hue *= 60.0f; + while ( Hue < 0.f ) + Hue += 360; + } + + + inline void SColorHSL::toRGB(SColorf &color) const + { + const f32 l = Luminance/100; + if (core::iszero(Saturation)) // grey + { + color.set(l, l, l); + return; + } + + f32 rm2; + + if ( Luminance <= 50 ) + { + rm2 = l + l * (Saturation/100); + } + else + { + rm2 = l + (1 - l) * (Saturation/100); + } + + const f32 rm1 = 2.0f * l - rm2; + + const f32 h = Hue / 360.0f; + color.set( toRGB1(rm1, rm2, h + 1.f/3.f), + toRGB1(rm1, rm2, h), + toRGB1(rm1, rm2, h - 1.f/3.f) + ); + } + + + // algorithm from Foley/Van-Dam + inline f32 SColorHSL::toRGB1(f32 rm1, f32 rm2, f32 rh) const + { + if (rh<0) + rh += 1; + if (rh>1) + rh -= 1; + + if (rh < 1.f/6.f) + rm1 = rm1 + (rm2 - rm1) * rh*6.f; + else if (rh < 0.5f) + rm1 = rm2; + else if (rh < 2.f/3.f) + rm1 = rm1 + (rm2 - rm1) * ((2.f/3.f)-rh)*6.f; + + return rm1; + } + +} // end namespace video +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/SExposedVideoData.h b/src/others/irrlicht-1.8.1/include/SExposedVideoData.h new file mode 100644 index 0000000..c30f4a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SExposedVideoData.h @@ -0,0 +1,90 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_EXPOSED_VIDEO_DATA_H_INCLUDED__ +#define __S_EXPOSED_VIDEO_DATA_H_INCLUDED__ + +// forward declarations for internal pointers +struct IDirect3D9; +struct IDirect3DDevice9; +struct IDirect3D8; +struct IDirect3DDevice8; + +namespace irr +{ +namespace video +{ + +//! structure for holding data describing a driver and operating system specific data. +/** This data can be retrived by IVideoDriver::getExposedVideoData(). Use this with caution. +This only should be used to make it possible to extend the engine easily without +modification of its source. Note that this structure does not contain any valid data, if +you are using the software or the null device. +*/ +struct SExposedVideoData +{ + SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;} + explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;} + + union + { + struct + { + //! Pointer to the IDirect3D9 interface + IDirect3D9* D3D9; + + //! Pointer to the IDirect3DDevice9 interface + IDirect3DDevice9* D3DDev9; + + //! Window handle. + /** Get with for example HWND h = reinterpret_cast(exposedData.D3D9.HWnd) */ + void* HWnd; + + } D3D9; + + struct + { + //! Pointer to the IDirect3D8 interface + IDirect3D8* D3D8; + + //! Pointer to the IDirect3DDevice8 interface + IDirect3DDevice8* D3DDev8; + + //! Window handle. + /** Get with for example with: HWND h = reinterpret_cast(exposedData.D3D8.HWnd) */ + void* HWnd; + + } D3D8; + + struct + { + //! Private GDI Device Context. + /** Get if for example with: HDC h = reinterpret_cast(exposedData.OpenGLWin32.HDc) */ + void* HDc; + + //! Permanent Rendering Context. + /** Get if for example with: HGLRC h = reinterpret_cast(exposedData.OpenGLWin32.HRc) */ + void* HRc; + + //! Window handle. + /** Get with for example with: HWND h = reinterpret_cast(exposedData.OpenGLWin32.HWnd) */ + void* HWnd; + } OpenGLWin32; + + struct + { + // XWindow handles + void* X11Display; + void* X11Context; + unsigned long X11Window; + } OpenGLLinux; + }; +}; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h b/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h new file mode 100644 index 0000000..ec642c2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h @@ -0,0 +1,308 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__ +#define __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__ + +#include "EDriverTypes.h" +#include "EDeviceTypes.h" +#include "dimension2d.h" +#include "ILogger.h" +// onefang changes start +#include "SExposedVideoData.h" +// onefang changes end + +namespace irr +{ + class IEventReceiver; + + //! Structure for holding Irrlicht Device creation parameters. + /** This structure is used in the createDeviceEx() function. */ + struct SIrrlichtCreationParameters + { + //! Constructs a SIrrlichtCreationParameters structure with default values. + SIrrlichtCreationParameters() : + DeviceType(EIDT_BEST), + DriverType(video::EDT_BURNINGSVIDEO), + WindowSize(core::dimension2d(800, 600)), + Bits(16), + ZBufferBits(16), + Fullscreen(false), + Stencilbuffer(false), + Vsync(false), + AntiAlias(0), + HandleSRGB(false), + WithAlphaChannel(false), + Doublebuffer(true), + IgnoreInput(false), + Stereobuffer(false), + HighPrecisionFPU(false), + EventReceiver(0), + WindowId(0), +// onefang changes start + VideoData(0), +// onefang changes end +#ifdef _DEBUG + LoggingLevel(ELL_DEBUG), +#else + LoggingLevel(ELL_INFORMATION), +#endif + DisplayAdapter(0), + DriverMultithreaded(false), + UsePerformanceTimer(true), + SDK_version_do_not_use(IRRLICHT_SDK_VERSION) + { + } + + SIrrlichtCreationParameters(const SIrrlichtCreationParameters& other) : + SDK_version_do_not_use(IRRLICHT_SDK_VERSION) + {*this = other;} + + SIrrlichtCreationParameters& operator=(const SIrrlichtCreationParameters& other) + { + DeviceType = other.DeviceType; + DriverType = other.DriverType; + WindowSize = other.WindowSize; + Bits = other.Bits; + ZBufferBits = other.ZBufferBits; + Fullscreen = other.Fullscreen; + Stencilbuffer = other.Stencilbuffer; + Vsync = other.Vsync; + AntiAlias = other.AntiAlias; + HandleSRGB = other.HandleSRGB; + WithAlphaChannel = other.WithAlphaChannel; + Doublebuffer = other.Doublebuffer; + IgnoreInput = other.IgnoreInput; + Stereobuffer = other.Stereobuffer; + HighPrecisionFPU = other.HighPrecisionFPU; + EventReceiver = other.EventReceiver; + WindowId = other.WindowId; +// onefang changes start + VideoData = other.VideoData; +// onefang changes end + LoggingLevel = other.LoggingLevel; + DriverMultithreaded = other.DriverMultithreaded; + DisplayAdapter = other.DisplayAdapter; + UsePerformanceTimer = other.UsePerformanceTimer; + return *this; + } + + //! Type of the device. + /** This setting decides the windowing system used by the device, most device types are native + to a specific operating system and so may not be available. + EIDT_WIN32 is only available on Windows desktops, + EIDT_WINCE is only available on Windows mobile devices, + EIDT_COCOA is only available on Mac OSX, + EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11, + EIDT_SDL is available on most systems if compiled in, + EIDT_CONSOLE is usually available but can only render to text, + EIDT_BEST will select the best available device for your operating system. + Default: EIDT_BEST. */ + E_DEVICE_TYPE DeviceType; + + //! Type of video driver used to render graphics. + /** This can currently be video::EDT_NULL, video::EDT_SOFTWARE, + video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, + video::EDT_DIRECT3D9, and video::EDT_OPENGL. + Default: Software. */ + video::E_DRIVER_TYPE DriverType; + + //! Size of the window or the video mode in fullscreen mode. Default: 800x600 + core::dimension2d WindowSize; + + //! Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 16. + u8 Bits; + + //! Minimum Bits per pixel of the depth buffer. Default: 16. + u8 ZBufferBits; + + //! Should be set to true if the device should run in fullscreen. + /** Otherwise the device runs in windowed mode. Default: false. */ + bool Fullscreen; + + //! Specifies if the stencil buffer should be enabled. + /** Set this to true, if you want the engine be able to draw + stencil buffer shadows. Note that not all drivers are able to + use the stencil buffer, hence it can be ignored during device + creation. Without the stencil buffer no shadows will be drawn. + Default: false. */ + bool Stencilbuffer; + + //! Specifies vertical syncronisation. + /** If set to true, the driver will wait for the vertical + retrace period, otherwise not. May be silently ignored. + Default: false */ + bool Vsync; + + //! Specifies if the device should use fullscreen anti aliasing + /** Makes sharp/pixelated edges softer, but requires more + performance. Also, 2D elements might look blurred with this + switched on. The resulting rendering quality also depends on + the hardware and driver you are using, your program might look + different on different hardware with this. So if you are + writing a game/application with AntiAlias switched on, it would + be a good idea to make it possible to switch this option off + again by the user. + The value is the maximal antialiasing factor requested for + the device. The cretion method will automatically try smaller + values if no window can be created with the given value. + Value one is usually the same as 0 (disabled), but might be a + special value on some platforms. On D3D devices it maps to + NONMASKABLE. + Default value: 0 - disabled */ + u8 AntiAlias; + + //! Flag to enable proper sRGB and linear color handling + /** In most situations, it is desireable to have the color handling in + non-linear sRGB color space, and only do the intermediate color + calculations in linear RGB space. If this flag is enabled, the device and + driver try to assure that all color input and output are color corrected + and only the internal color representation is linear. This means, that + the color output is properly gamma-adjusted to provide the brighter + colors for monitor display. And that blending and lighting give a more + natural look, due to proper conversion from non-linear colors into linear + color space for blend operations. If this flag is enabled, all texture colors + (which are usually in sRGB space) are correctly displayed. However vertex colors + and other explicitly set values have to be manually encoded in linear color space. + Default value: false. */ + bool HandleSRGB; + + //! Whether the main framebuffer uses an alpha channel. + /** In some situations it might be desireable to get a color + buffer with an alpha channel, e.g. when rendering into a + transparent window or overlay. If this flag is set the device + tries to create a framebuffer with alpha channel. + If this flag is set, only color buffers with alpha channel + are considered. Otherwise, it depends on the actual hardware + if the colorbuffer has an alpha channel or not. + Default value: false */ + bool WithAlphaChannel; + + //! Whether the main framebuffer uses doublebuffering. + /** This should be usually enabled, in order to avoid render + artifacts on the visible framebuffer. However, it might be + useful to use only one buffer on very small devices. If no + doublebuffering is available, the drivers will fall back to + single buffers. Default value: true */ + bool Doublebuffer; + + //! Specifies if the device should ignore input events + /** This is only relevant when using external I/O handlers. + External windows need to take care of this themselves. + Currently only supported by X11. + Default value: false */ + bool IgnoreInput; + + //! Specifies if the device should use stereo buffers + /** Some high-end gfx cards support two framebuffers for direct + support of stereoscopic output devices. If this flag is set the + device tries to create a stereo context. + Currently only supported by OpenGL. + Default value: false */ + bool Stereobuffer; + + //! Specifies if the device should use high precision FPU setting + /** This is only relevant for DirectX Devices, which switch to + low FPU precision by default for performance reasons. However, + this may lead to problems with the other computations of the + application. In this case setting this flag to true should help + - on the expense of performance loss, though. + Default value: false */ + bool HighPrecisionFPU; + + //! A user created event receiver. + IEventReceiver* EventReceiver; + + //! Window Id. + /** If this is set to a value other than 0, the Irrlicht Engine + will be created in an already existing window. For windows, set + this to the HWND of the window you want. The windowSize and + FullScreen options will be ignored when using the WindowId + parameter. Default this is set to 0. + To make Irrlicht run inside the custom window, you still will + have to draw Irrlicht on your own. You can use this loop, as + usual: + \code + while (device->run()) + { + driver->beginScene(true, true, 0); + smgr->drawAll(); + driver->endScene(); + } + \endcode + Instead of this, you can also simply use your own message loop + using GetMessage, DispatchMessage and whatever. Calling + IrrlichtDevice::run() will cause Irrlicht to dispatch messages + internally too. You need not call Device->run() if you want to + do your own message dispatching loop, but Irrlicht will not be + able to fetch user input then and you have to do it on your own + using the window messages, DirectInput, or whatever. Also, + you'll have to increment the Irrlicht timer. + An alternative, own message dispatching loop without + device->run() would look like this: + \code + MSG msg; + while (true) + { + if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + + if (msg.message == WM_QUIT) + break; + } + + // increase virtual timer time + device->getTimer()->tick(); + + // draw engine picture + driver->beginScene(true, true, 0); + smgr->drawAll(); + driver->endScene(); + } + \endcode + However, there is no need to draw the picture this often. Just + do it how you like. */ + void* WindowId; +// onefang changes start + video::SExposedVideoData *VideoData; +// onefang changes end + + //! Specifies the logging level used in the logging interface. + /** The default value is ELL_INFORMATION. You can access the ILogger interface + later on from the IrrlichtDevice with getLogger() and set another level. + But if you need more or less logging information already from device creation, + then you have to change it here. + */ + ELOG_LEVEL LoggingLevel; + + //! Allows to select which graphic card is used for rendering when more than one card is in the system. + /** So far only supported on D3D */ + u32 DisplayAdapter; + + //! Create the driver multithreaded. + /** Default is false. Enabling this can slow down your application. + Note that this does _not_ make Irrlicht threadsafe, but only the underlying driver-API for the graphiccard. + So far only supported on D3D. */ + bool DriverMultithreaded; + + //! Enables use of high performance timers on Windows platform. + /** When performance timers are not used, standard GetTickCount() + is used instead which usually has worse resolution, but also less + problems with speed stepping and other techniques. + */ + bool UsePerformanceTimer; + + //! Don't use or change this parameter. + /** Always set it to IRRLICHT_SDK_VERSION, which is done by default. + This is needed for sdk version checks. */ + const c8* const SDK_version_do_not_use; + }; + + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SKeyMap.h b/src/others/irrlicht-1.8.1/include/SKeyMap.h new file mode 100644 index 0000000..793cd98 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SKeyMap.h @@ -0,0 +1,41 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_KEY_MAP_H_INCLUDED__ +#define __S_KEY_MAP_H_INCLUDED__ + +#include "Keycodes.h" + +namespace irr +{ + + //! enumeration for key actions. Used for example in the FPS Camera. + enum EKEY_ACTION + { + EKA_MOVE_FORWARD = 0, + EKA_MOVE_BACKWARD, + EKA_STRAFE_LEFT, + EKA_STRAFE_RIGHT, + EKA_JUMP_UP, + EKA_CROUCH, + EKA_COUNT, + + //! This value is not used. It only forces this enumeration to compile in 32 bit. + EKA_FORCE_32BIT = 0x7fffffff + }; + + //! Struct storing which key belongs to which action. + struct SKeyMap + { + SKeyMap() {} + SKeyMap(EKEY_ACTION action, EKEY_CODE keyCode) : Action(action), KeyCode(keyCode) {} + + EKEY_ACTION Action; + EKEY_CODE KeyCode; + }; + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SLight.h b/src/others/irrlicht-1.8.1/include/SLight.h new file mode 100644 index 0000000..f809d2e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SLight.h @@ -0,0 +1,98 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_LIGHT_H_INCLUDED__ +#define __S_LIGHT_H_INCLUDED__ + +#include "SColor.h" + +namespace irr +{ +namespace video +{ + +//! Enumeration for different types of lights +enum E_LIGHT_TYPE +{ + //! point light, it has a position in space and radiates light in all directions + ELT_POINT, + //! spot light, it has a position in space, a direction, and a limited cone of influence + ELT_SPOT, + //! directional light, coming from a direction from an infinite distance + ELT_DIRECTIONAL, + + //! Only used for counting the elements of this enum + ELT_COUNT +}; + +//! Names for light types +const c8* const LightTypeNames[] = +{ + "Point", + "Spot", + "Directional", + 0 +}; + +//! structure for holding data describing a dynamic point light. +/** Irrlicht supports point lights, spot lights, and directional lights. +*/ +struct SLight +{ + SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f), + SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f), + OuterCone(45.f), InnerCone(0.f), Falloff(2.f), + Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f), + Radius(100.f), Type(ELT_POINT), CastShadows(true) + {} + + //! Ambient color emitted by the light + SColorf AmbientColor; + + //! Diffuse color emitted by the light. + /** This is the primary color you want to set. */ + SColorf DiffuseColor; + + //! Specular color emitted by the light. + /** For details how to use specular highlights, see SMaterial::Shininess */ + SColorf SpecularColor; + + //! Attenuation factors (constant, linear, quadratic) + /** Changes the light strength fading over distance. + Can also be altered by setting the radius, Attenuation will change to + (0,1.f/radius,0). Can be overridden after radius was set. */ + core::vector3df Attenuation; + + //! The angle of the spot's outer cone. Ignored for other lights. + f32 OuterCone; + + //! The angle of the spot's inner cone. Ignored for other lights. + f32 InnerCone; + + //! The light strength's decrease between Outer and Inner cone. + f32 Falloff; + + //! Read-ONLY! Position of the light. + /** If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position. */ + core::vector3df Position; + + //! Read-ONLY! Direction of the light. + /** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */ + core::vector3df Direction; + + //! Read-ONLY! Radius of light. Everything within this radius will be lighted. + f32 Radius; + + //! Read-ONLY! Type of the light. Default: ELT_POINT + E_LIGHT_TYPE Type; + + //! Read-ONLY! Does the light cast shadows? + bool CastShadows:1; +}; + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SMaterial.h b/src/others/irrlicht-1.8.1/include/SMaterial.h new file mode 100644 index 0000000..3172241 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SMaterial.h @@ -0,0 +1,685 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_MATERIAL_H_INCLUDED__ +#define __S_MATERIAL_H_INCLUDED__ + +#include "SColor.h" +#include "matrix4.h" +#include "irrArray.h" +#include "irrMath.h" +#include "EMaterialTypes.h" +#include "EMaterialFlags.h" +#include "SMaterialLayer.h" + +namespace irr +{ +namespace video +{ + class ITexture; + + //! Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor + enum E_BLEND_FACTOR + { + EBF_ZERO = 0, //!< src & dest (0, 0, 0, 0) + EBF_ONE, //!< src & dest (1, 1, 1, 1) + EBF_DST_COLOR, //!< src (destR, destG, destB, destA) + EBF_ONE_MINUS_DST_COLOR, //!< src (1-destR, 1-destG, 1-destB, 1-destA) + EBF_SRC_COLOR, //!< dest (srcR, srcG, srcB, srcA) + EBF_ONE_MINUS_SRC_COLOR, //!< dest (1-srcR, 1-srcG, 1-srcB, 1-srcA) + EBF_SRC_ALPHA, //!< src & dest (srcA, srcA, srcA, srcA) + EBF_ONE_MINUS_SRC_ALPHA, //!< src & dest (1-srcA, 1-srcA, 1-srcA, 1-srcA) + EBF_DST_ALPHA, //!< src & dest (destA, destA, destA, destA) + EBF_ONE_MINUS_DST_ALPHA, //!< src & dest (1-destA, 1-destA, 1-destA, 1-destA) + EBF_SRC_ALPHA_SATURATE //!< src (min(srcA, 1-destA), idem, ...) + }; + + //! Values defining the blend operation used when blend is enabled + enum E_BLEND_OPERATION + { + EBO_NONE = 0, //!< No blending happens + EBO_ADD, //!< Default blending adds the color values + EBO_SUBTRACT, //!< This mode subtracts the color values + EBO_REVSUBTRACT,//!< This modes subtracts destination from source + EBO_MIN, //!< Choose minimum value of each color channel + EBO_MAX, //!< Choose maximum value of each color channel + EBO_MIN_FACTOR, //!< Choose minimum value of each color channel after applying blend factors, not widely supported + EBO_MAX_FACTOR, //!< Choose maximum value of each color channel after applying blend factors, not widely supported + EBO_MIN_ALPHA, //!< Choose minimum value of each color channel based on alpha value, not widely supported + EBO_MAX_ALPHA //!< Choose maximum value of each color channel based on alpha value, not widely supported + }; + + //! MaterialTypeParam: e.g. DirectX: D3DTOP_MODULATE, D3DTOP_MODULATE2X, D3DTOP_MODULATE4X + enum E_MODULATE_FUNC + { + EMFN_MODULATE_1X = 1, + EMFN_MODULATE_2X = 2, + EMFN_MODULATE_4X = 4 + }; + + //! Comparison function, e.g. for depth buffer test + enum E_COMPARISON_FUNC + { + //! Test never succeeds, this equals disable + ECFN_NEVER=0, + //! <= test, default for e.g. depth test + ECFN_LESSEQUAL=1, + //! Exact equality + ECFN_EQUAL=2, + //! exclusive less comparison, i.e. < + ECFN_LESS, + //! Succeeds almost always, except for exact equality + ECFN_NOTEQUAL, + //! >= test + ECFN_GREATEREQUAL, + //! inverse of <= + ECFN_GREATER, + //! test succeeds always + ECFN_ALWAYS + }; + + //! Enum values for enabling/disabling color planes for rendering + enum E_COLOR_PLANE + { + //! No color enabled + ECP_NONE=0, + //! Alpha enabled + ECP_ALPHA=1, + //! Red enabled + ECP_RED=2, + //! Green enabled + ECP_GREEN=4, + //! Blue enabled + ECP_BLUE=8, + //! All colors, no alpha + ECP_RGB=14, + //! All planes enabled + ECP_ALL=15 + }; + + //! Source of the alpha value to take + /** This is currently only supported in EMT_ONETEXTURE_BLEND. You can use an + or'ed combination of values. Alpha values are modulated (multiplicated). */ + enum E_ALPHA_SOURCE + { + //! Use no alpha, somewhat redundant with other settings + EAS_NONE=0, + //! Use vertex color alpha + EAS_VERTEX_COLOR, + //! Use texture alpha channel + EAS_TEXTURE + }; + + //! EMT_ONETEXTURE_BLEND: pack srcFact, dstFact, Modulate and alpha source to MaterialTypeParam + /** alpha source can be an OR'ed combination of E_ALPHA_SOURCE values. */ + inline f32 pack_textureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE ) + { + const u32 tmp = (alphaSource << 12) | (modulate << 8) | (srcFact << 4) | dstFact; + return FR(tmp); + } + + //! EMT_ONETEXTURE_BLEND: unpack srcFact & dstFact and Modulo to MaterialTypeParam + /** The fields don't use the full byte range, so we could pack even more... */ + inline void unpack_textureBlendFunc ( E_BLEND_FACTOR &srcFact, E_BLEND_FACTOR &dstFact, + E_MODULATE_FUNC &modulo, u32& alphaSource, const f32 param ) + { + const u32 state = IR(param); + alphaSource = (state & 0x0000F000) >> 12; + modulo = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 ); + srcFact = E_BLEND_FACTOR ( ( state & 0x000000F0 ) >> 4 ); + dstFact = E_BLEND_FACTOR ( ( state & 0x0000000F ) ); + } + + //! EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending + inline bool textureBlendFunc_hasAlpha ( const E_BLEND_FACTOR factor ) + { + switch ( factor ) + { + case EBF_SRC_ALPHA: + case EBF_ONE_MINUS_SRC_ALPHA: + case EBF_DST_ALPHA: + case EBF_ONE_MINUS_DST_ALPHA: + case EBF_SRC_ALPHA_SATURATE: + return true; + default: + return false; + } + } + + + //! These flags are used to specify the anti-aliasing and smoothing modes + /** Techniques supported are multisampling, geometry smoothing, and alpha + to coverage. + Some drivers don't support a per-material setting of the anti-aliasing + modes. In those cases, FSAA/multisampling is defined by the device mode + chosen upon creation via irr::SIrrCreationParameters. + */ + enum E_ANTI_ALIASING_MODE + { + //! Use to turn off anti-aliasing for this material + EAAM_OFF=0, + //! Default anti-aliasing mode + EAAM_SIMPLE=1, + //! High-quality anti-aliasing, not always supported, automatically enables SIMPLE mode + EAAM_QUALITY=3, + //! Line smoothing + EAAM_LINE_SMOOTH=4, + //! point smoothing, often in software and slow, only with OpenGL + EAAM_POINT_SMOOTH=8, + //! All typical anti-alias and smooth modes + EAAM_FULL_BASIC=15, + //! Enhanced anti-aliasing for transparent materials + /** Usually used with EMT_TRANSPARENT_ALPHA_REF and multisampling. */ + EAAM_ALPHA_TO_COVERAGE=16 + }; + + //! These flags allow to define the interpretation of vertex color when lighting is enabled + /** Without lighting being enabled the vertex color is the only value defining the fragment color. + Once lighting is enabled, the four values for diffuse, ambient, emissive, and specular take over. + With these flags it is possible to define which lighting factor shall be defined by the vertex color + instead of the lighting factor which is the same for all faces of that material. + The default is to use vertex color for the diffuse value, another pretty common value is to use + vertex color for both diffuse and ambient factor. */ + enum E_COLOR_MATERIAL + { + //! Don't use vertex color for lighting + ECM_NONE=0, + //! Use vertex color for diffuse light, this is default + ECM_DIFFUSE, + //! Use vertex color for ambient light + ECM_AMBIENT, + //! Use vertex color for emissive light + ECM_EMISSIVE, + //! Use vertex color for specular light + ECM_SPECULAR, + //! Use vertex color for both diffuse and ambient light + ECM_DIFFUSE_AND_AMBIENT + }; + + //! Flags for the definition of the polygon offset feature + /** These flags define whether the offset should be into the screen, or towards the eye. */ + enum E_POLYGON_OFFSET + { + //! Push pixel towards the far plane, away from the eye + /** This is typically used for rendering inner areas. */ + EPO_BACK=0, + //! Pull pixels towards the camera. + /** This is typically used for polygons which should appear on top + of other elements, such as decals. */ + EPO_FRONT=1 + }; + + //! Names for polygon offset direction + const c8* const PolygonOffsetDirectionNames[] = + { + "Back", + "Front", + 0 + }; + + + //! Maximum number of texture an SMaterial can have. + const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_; + + //! Struct for holding parameters for a material renderer + class SMaterial + { + public: + //! Default constructor. Creates a solid, lit material with white colors + SMaterial() + : MaterialType(EMT_SOLID), AmbientColor(255,255,255,255), DiffuseColor(255,255,255,255), + EmissiveColor(0,0,0,0), SpecularColor(255,255,255,255), + Shininess(0.0f), MaterialTypeParam(0.0f), MaterialTypeParam2(0.0f), Thickness(1.0f), + ZBuffer(ECFN_LESSEQUAL), AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL), + ColorMaterial(ECM_DIFFUSE), BlendOperation(EBO_NONE), + PolygonOffsetFactor(0), PolygonOffsetDirection(EPO_FRONT), + Wireframe(false), PointCloud(false), GouraudShading(true), + Lighting(true), ZWriteEnable(true), BackfaceCulling(true), FrontfaceCulling(false), + FogEnable(false), NormalizeNormals(false), UseMipMaps(true) + { } + + //! Copy constructor + /** \param other Material to copy from. */ + SMaterial(const SMaterial& other) + { + // These pointers are checked during assignment + for (u32 i=0; igetMaterial(0).Shininess = 20.0f; + \endcode + + You can change the color of the highlights using + \code + sceneNode->getMaterial(0).SpecularColor.set(255,255,255,255); + \endcode + + The specular color of the dynamic lights + (SLight::SpecularColor) will influence the the highlight color + too, but they are set to a useful value by default when + creating the light scene node. Here is a simple example on how + to use specular highlights: + \code + // load and display mesh + scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( + smgr->getMesh("data/faerie.md2")); + node->setMaterialTexture(0, driver->getTexture("data/Faerie2.pcx")); // set diffuse texture + node->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting + node->getMaterial(0).Shininess = 20.0f; // set size of specular highlights + + // add white light + scene::ILightSceneNode* light = smgr->addLightSceneNode(0, + core::vector3df(5,5,5), video::SColorf(1.0f, 1.0f, 1.0f)); + \endcode */ + f32 Shininess; + + //! Free parameter, dependent on the material type. + /** Mostly ignored, used for example in EMT_PARALLAX_MAP_SOLID + and EMT_TRANSPARENT_ALPHA_CHANNEL. */ + f32 MaterialTypeParam; + + //! Second free parameter, dependent on the material type. + /** Mostly ignored. */ + f32 MaterialTypeParam2; + + //! Thickness of non-3dimensional elements such as lines and points. + f32 Thickness; + + //! Is the ZBuffer enabled? Default: ECFN_LESSEQUAL + /** Values are from E_COMPARISON_FUNC. */ + u8 ZBuffer; + + //! Sets the antialiasing mode + /** Values are chosen from E_ANTI_ALIASING_MODE. Default is + EAAM_SIMPLE|EAAM_LINE_SMOOTH, i.e. simple multi-sample + anti-aliasing and lime smoothing is enabled. */ + u8 AntiAliasing; + + //! Defines the enabled color planes + /** Values are defined as or'ed values of the E_COLOR_PLANE enum. + Only enabled color planes will be rendered to the current render + target. Typical use is to disable all colors when rendering only to + depth or stencil buffer, or using Red and Green for Stereo rendering. */ + u8 ColorMask:4; + + //! Defines the interpretation of vertex color in the lighting equation + /** Values should be chosen from E_COLOR_MATERIAL. + When lighting is enabled, vertex color can be used instead of the + material values for light modulation. This allows to easily change e.g. the + diffuse light behavior of each face. The default, ECM_DIFFUSE, will result in + a very similar rendering as with lighting turned off, just with light shading. */ + u8 ColorMaterial:3; + + //! Store the blend operation of choice + /** Values to be chosen from E_BLEND_OPERATION. The actual way to use this value + is not yet determined, so ignore it for now. */ + E_BLEND_OPERATION BlendOperation:4; + + //! Factor specifying how far the polygon offset should be made + /** Specifying 0 disables the polygon offset. The direction is specified spearately. + The factor can be from 0 to 7.*/ + u8 PolygonOffsetFactor:3; + + //! Flag defining the direction the polygon offset is applied to. + /** Can be to front or to back, specififed by values from E_POLYGON_OFFSET. */ + E_POLYGON_OFFSET PolygonOffsetDirection:1; + + //! Draw as wireframe or filled triangles? Default: false + /** The user can access a material flag using + \code material.Wireframe=true \endcode + or \code material.setFlag(EMF_WIREFRAME, true); \endcode */ + bool Wireframe:1; + + //! Draw as point cloud or filled triangles? Default: false + bool PointCloud:1; + + //! Flat or Gouraud shading? Default: true + bool GouraudShading:1; + + //! Will this material be lighted? Default: true + bool Lighting:1; + + //! Is the zbuffer writeable or is it read-only. Default: true. + /** This flag is forced to false if the MaterialType is a + transparent type and the scene parameter + ALLOW_ZWRITE_ON_TRANSPARENT is not set. */ + bool ZWriteEnable:1; + + //! Is backface culling enabled? Default: true + bool BackfaceCulling:1; + + //! Is frontface culling enabled? Default: false + bool FrontfaceCulling:1; + + //! Is fog enabled? Default: false + bool FogEnable:1; + + //! Should normals be normalized? + /** Always use this if the mesh lit and scaled. Default: false */ + bool NormalizeNormals:1; + + //! Shall mipmaps be used if available + /** Sometimes, disabling mipmap usage can be useful. Default: true */ + bool UseMipMaps:1; + + //! Gets the texture transformation matrix for level i + /** \param i The desired level. Must not be larger than MATERIAL_MAX_TEXTURES. + \return Texture matrix for texture level i. */ + core::matrix4& getTextureMatrix(u32 i) + { + return TextureLayer[i].getTextureMatrix(); + } + + //! Gets the immutable texture transformation matrix for level i + /** \param i The desired level. + \return Texture matrix for texture level i, or identity matrix for levels larger than MATERIAL_MAX_TEXTURES. */ + const core::matrix4& getTextureMatrix(u32 i) const + { + if (i=MATERIAL_MAX_TEXTURES) + return; + TextureLayer[i].setTextureMatrix(mat); + } + + //! Gets the i-th texture + /** \param i The desired level. + \return Texture for texture level i, if defined, else 0. */ + ITexture* getTexture(u32 i) const + { + return i < MATERIAL_MAX_TEXTURES ? TextureLayer[i].Texture : 0; + } + + //! Sets the i-th texture + /** If i>=MATERIAL_MAX_TEXTURES this setting will be ignored. + \param i The desired level. + \param tex Texture for texture level i. */ + void setTexture(u32 i, ITexture* tex) + { + if (i>=MATERIAL_MAX_TEXTURES) + return; + TextureLayer[i].Texture = tex; + } + + //! Sets the Material flag to the given value + /** \param flag The flag to be set. + \param value The new value for the flag. */ + void setFlag(E_MATERIAL_FLAG flag, bool value) + { + switch (flag) + { + case EMF_WIREFRAME: + Wireframe = value; break; + case EMF_POINTCLOUD: + PointCloud = value; break; + case EMF_GOURAUD_SHADING: + GouraudShading = value; break; + case EMF_LIGHTING: + Lighting = value; break; + case EMF_ZBUFFER: + ZBuffer = value; break; + case EMF_ZWRITE_ENABLE: + ZWriteEnable = value; break; + case EMF_BACK_FACE_CULLING: + BackfaceCulling = value; break; + case EMF_FRONT_FACE_CULLING: + FrontfaceCulling = value; break; + case EMF_BILINEAR_FILTER: + { + for (u32 i=0; i MatrixAllocator; + + //! Texture Matrix + /** Do not access this element directly as the internal + ressource management has to cope with Null pointers etc. */ + core::matrix4* TextureMatrix; + }; + +} // end namespace video +} // end namespace irr + +#endif // __S_MATERIAL_LAYER_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/include/SMesh.h b/src/others/irrlicht-1.8.1/include/SMesh.h new file mode 100644 index 0000000..77a695d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SMesh.h @@ -0,0 +1,140 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_MESH_H_INCLUDED__ +#define __S_MESH_H_INCLUDED__ + +#include "IMesh.h" +#include "IMeshBuffer.h" +#include "aabbox3d.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + //! Simple implementation of the IMesh interface. + struct SMesh : public IMesh + { + //! constructor + SMesh() + { + #ifdef _DEBUG + setDebugName("SMesh"); + #endif + } + + //! destructor + virtual ~SMesh() + { + // drop buffers + for (u32 i=0; idrop(); + } + + //! clean mesh + virtual void clear() + { + for (u32 i=0; idrop(); + MeshBuffers.clear(); + BoundingBox.reset ( 0.f, 0.f, 0.f ); + } + + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const + { + return MeshBuffers.size(); + } + + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const + { + return MeshBuffers[nr]; + } + + //! returns a meshbuffer which fits a material + /** reverse search */ + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial & material) const + { + for (s32 i = (s32)MeshBuffers.size()-1; i >= 0; --i) + { + if ( material == MeshBuffers[i]->getMaterial()) + return MeshBuffers[i]; + } + + return 0; + } + + //! returns an axis aligned bounding box + virtual const core::aabbox3d& getBoundingBox() const + { + return BoundingBox; + } + + //! set user axis aligned bounding box + virtual void setBoundingBox( const core::aabbox3df& box) + { + BoundingBox = box; + } + + //! recalculates the bounding box + void recalculateBoundingBox() + { + if (MeshBuffers.size()) + { + BoundingBox = MeshBuffers[0]->getBoundingBox(); + for (u32 i=1; igetBoundingBox()); + } + else + BoundingBox.reset(0.0f, 0.0f, 0.0f); + } + + //! adds a MeshBuffer + /** The bounding box is not updated automatically. */ + void addMeshBuffer(IMeshBuffer* buf) + { + if (buf) + { + buf->grab(); + MeshBuffers.push_back(buf); + } + } + + //! sets a flag of all contained materials to a new value + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) + { + for (u32 i=0; igetMaterial().setFlag(flag, newvalue); + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) + { + for (u32 i=0; isetHardwareMappingHint(newMappingHint, buffer); + } + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) + { + for (u32 i=0; isetDirty(buffer); + } + + //! The meshbuffers of this mesh + core::array MeshBuffers; + + //! The bounding box of this mesh + core::aabbox3d BoundingBox; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SMeshBuffer.h b/src/others/irrlicht-1.8.1/include/SMeshBuffer.h new file mode 100644 index 0000000..03b441f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SMeshBuffer.h @@ -0,0 +1,7 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// replaced by template +#include "CMeshBuffer.h" + diff --git a/src/others/irrlicht-1.8.1/include/SMeshBufferLightMap.h b/src/others/irrlicht-1.8.1/include/SMeshBufferLightMap.h new file mode 100644 index 0000000..03b441f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SMeshBufferLightMap.h @@ -0,0 +1,7 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// replaced by template +#include "CMeshBuffer.h" + diff --git a/src/others/irrlicht-1.8.1/include/SMeshBufferTangents.h b/src/others/irrlicht-1.8.1/include/SMeshBufferTangents.h new file mode 100644 index 0000000..03b441f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SMeshBufferTangents.h @@ -0,0 +1,7 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// replaced by template +#include "CMeshBuffer.h" + diff --git a/src/others/irrlicht-1.8.1/include/SParticle.h b/src/others/irrlicht-1.8.1/include/SParticle.h new file mode 100644 index 0000000..d1507a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SParticle.h @@ -0,0 +1,56 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_PARTICLE_H_INCLUDED__ +#define __S_PARTICLE_H_INCLUDED__ + +#include "vector3d.h" +#include "dimension2d.h" +#include "SColor.h" + +namespace irr +{ +namespace scene +{ + //! Struct for holding particle data + struct SParticle + { + //! Position of the particle + core::vector3df pos; + + //! Direction and speed of the particle + core::vector3df vector; + + //! Start life time of the particle + u32 startTime; + + //! End life time of the particle + u32 endTime; + + //! Current color of the particle + video::SColor color; + + //! Original color of the particle. + /** That's the color of the particle it had when it was emitted. */ + video::SColor startColor; + + //! Original direction and speed of the particle. + /** The direction and speed the particle had when it was emitted. */ + core::vector3df startVector; + + //! Scale of the particle. + /** The current scale of the particle. */ + core::dimension2df size; + + //! Original scale of the particle. + /** The scale of the particle when it was emitted. */ + core::dimension2df startSize; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SSharedMeshBuffer.h b/src/others/irrlicht-1.8.1/include/SSharedMeshBuffer.h new file mode 100644 index 0000000..b9ee07a --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SSharedMeshBuffer.h @@ -0,0 +1,242 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_SHARED_MESH_BUFFER_H_INCLUDED__ +#define __S_SHARED_MESH_BUFFER_H_INCLUDED__ + +#include "irrArray.h" +#include "IMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + //! Implementation of the IMeshBuffer interface with shared vertex list + struct SSharedMeshBuffer : public IMeshBuffer + { + //! constructor + SSharedMeshBuffer() : IMeshBuffer(), Vertices(0), ChangedID_Vertex(1), ChangedID_Index(1), MappingHintVertex(EHM_NEVER), MappingHintIndex(EHM_NEVER) + { + #ifdef _DEBUG + setDebugName("SSharedMeshBuffer"); + #endif + } + + //! constructor + SSharedMeshBuffer(core::array *vertices) : IMeshBuffer(), Vertices(vertices) + { + #ifdef _DEBUG + setDebugName("SSharedMeshBuffer"); + #endif + } + + //! returns the material of this meshbuffer + virtual const video::SMaterial& getMaterial() const + { + return Material; + } + + //! returns the material of this meshbuffer + virtual video::SMaterial& getMaterial() + { + return Material; + } + + //! returns pointer to vertices + virtual const void* getVertices() const + { + if (Vertices) + return Vertices->const_pointer(); + else + return 0; + } + + //! returns pointer to vertices + virtual void* getVertices() + { + if (Vertices) + return Vertices->pointer(); + else + return 0; + } + + //! returns amount of vertices + virtual u32 getVertexCount() const + { + if (Vertices) + return Vertices->size(); + else + return 0; + } + + //! returns pointer to Indices + virtual const u16* getIndices() const + { + return Indices.const_pointer(); + } + + //! returns pointer to Indices + virtual u16* getIndices() + { + return Indices.pointer(); + } + + //! returns amount of indices + virtual u32 getIndexCount() const + { + return Indices.size(); + } + + //! Get type of index data which is stored in this meshbuffer. + virtual video::E_INDEX_TYPE getIndexType() const + { + return video::EIT_16BIT; + } + + //! returns an axis aligned bounding box + virtual const core::aabbox3d& getBoundingBox() const + { + return BoundingBox; + } + + //! set user axis aligned bounding box + virtual void setBoundingBox( const core::aabbox3df& box) + { + BoundingBox = box; + } + + //! returns which type of vertex data is stored. + virtual video::E_VERTEX_TYPE getVertexType() const + { + return video::EVT_STANDARD; + } + + //! recalculates the bounding box. should be called if the mesh changed. + virtual void recalculateBoundingBox() + { + if (!Vertices || Vertices->empty() || Indices.empty()) + BoundingBox.reset(0,0,0); + else + { + BoundingBox.reset((*Vertices)[Indices[0]].Pos); + for (u32 i=1; i *Vertices; + + //! Array of Indices + core::array Indices; + + //! ID used for hardware buffer management + u32 ChangedID_Vertex; + + //! ID used for hardware buffer management + u32 ChangedID_Index; + + //! Bounding box + core::aabbox3df BoundingBox; + + //! hardware mapping hint + E_HARDWARE_MAPPING MappingHintVertex; + E_HARDWARE_MAPPING MappingHintIndex; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SSkinMeshBuffer.h b/src/others/irrlicht-1.8.1/include/SSkinMeshBuffer.h new file mode 100644 index 0000000..4582b80 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SSkinMeshBuffer.h @@ -0,0 +1,404 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SKIN_MESH_BUFFER_H_INCLUDED__ +#define __I_SKIN_MESH_BUFFER_H_INCLUDED__ + +#include "IMeshBuffer.h" +#include "S3DVertex.h" + + +namespace irr +{ +namespace scene +{ + + +//! A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime +struct SSkinMeshBuffer : public IMeshBuffer +{ + //! Default constructor + SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) : + ChangedID_Vertex(1), ChangedID_Index(1), VertexType(vt), + MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER), + BoundingBoxNeedsRecalculated(true) + { + #ifdef _DEBUG + setDebugName("SSkinMeshBuffer"); + #endif + } + + //! Get Material of this buffer. + virtual const video::SMaterial& getMaterial() const + { + return Material; + } + + //! Get Material of this buffer. + virtual video::SMaterial& getMaterial() + { + return Material; + } + + //! Get standard vertex at given index + virtual video::S3DVertex *getVertex(u32 index) + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return (video::S3DVertex*)&Vertices_2TCoords[index]; + case video::EVT_TANGENTS: + return (video::S3DVertex*)&Vertices_Tangents[index]; + default: + return &Vertices_Standard[index]; + } + } + + //! Get pointer to vertex array + virtual const void* getVertices() const + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return Vertices_2TCoords.const_pointer(); + case video::EVT_TANGENTS: + return Vertices_Tangents.const_pointer(); + default: + return Vertices_Standard.const_pointer(); + } + } + + //! Get pointer to vertex array + virtual void* getVertices() + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return Vertices_2TCoords.pointer(); + case video::EVT_TANGENTS: + return Vertices_Tangents.pointer(); + default: + return Vertices_Standard.pointer(); + } + } + + //! Get vertex count + virtual u32 getVertexCount() const + { + switch (VertexType) + { + case video::EVT_2TCOORDS: + return Vertices_2TCoords.size(); + case video::EVT_TANGENTS: + return Vertices_Tangents.size(); + default: + return Vertices_Standard.size(); + } + } + + //! Get type of index data which is stored in this meshbuffer. + /** \return Index type of this buffer. */ + virtual video::E_INDEX_TYPE getIndexType() const + { + return video::EIT_16BIT; + } + + //! Get pointer to index array + virtual const u16* getIndices() const + { + return Indices.const_pointer(); + } + + //! Get pointer to index array + virtual u16* getIndices() + { + return Indices.pointer(); + } + + //! Get index count + virtual u32 getIndexCount() const + { + return Indices.size(); + } + + //! Get bounding box + virtual const core::aabbox3d& getBoundingBox() const + { + return BoundingBox; + } + + //! Set bounding box + virtual void setBoundingBox( const core::aabbox3df& box) + { + BoundingBox = box; + } + + //! Recalculate bounding box + virtual void recalculateBoundingBox() + { + if(!BoundingBoxNeedsRecalculated) + return; + + BoundingBoxNeedsRecalculated = false; + + switch (VertexType) + { + case video::EVT_STANDARD: + { + if (Vertices_Standard.empty()) + BoundingBox.reset(0,0,0); + else + { + BoundingBox.reset(Vertices_Standard[0].Pos); + for (u32 i=1; i Vertices_Tangents; + core::array Vertices_2TCoords; + core::array Vertices_Standard; + core::array Indices; + + u32 ChangedID_Vertex; + u32 ChangedID_Index; + + //ISkinnedMesh::SJoint *AttachedJoint; + core::matrix4 Transformation; + + video::SMaterial Material; + video::E_VERTEX_TYPE VertexType; + + core::aabbox3d BoundingBox; + + // hardware mapping hint + E_HARDWARE_MAPPING MappingHint_Vertex:3; + E_HARDWARE_MAPPING MappingHint_Index:3; + + bool BoundingBoxNeedsRecalculated:1; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SVertexIndex.h b/src/others/irrlicht-1.8.1/include/SVertexIndex.h new file mode 100644 index 0000000..d6837dc --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SVertexIndex.h @@ -0,0 +1,79 @@ +// Copyright (C) 2008-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_VERTEX_INDEX_H_INCLUDED__ +#define __S_VERTEX_INDEX_H_INCLUDED__ + +#include "irrTypes.h" + + +namespace irr +{ +namespace video +{ +enum E_INDEX_TYPE +{ + EIT_16BIT = 0, + EIT_32BIT +}; + + +/* +//! vertex index used by the Irrlicht engine. +template +struct SSpecificVertexIndex +{ + T Index; + + //! default constructor + SSpecificVertexIndex() {} + + //! constructor + SSpecificVertexIndex(u32 _index) :Index(_index) {} + + bool operator==(const SSpecificVertexIndex& other) const + { + return (Index == other.Index); + } + + bool operator!=(const SSpecificVertexIndex& other) const + { + return (Index != other.Index); + } + + bool operator<(const SSpecificVertexIndex& other) const + { + return (Index < other.Index); + } + + SSpecificVertexIndex operator+(const u32& other) const + { + return SSpecificVertexIndex(Index + other); + } + + operator const u32() const + { + return (const u32)Index; + } + + E_INDEX_TYPE getType() const + { + if (sizeof(T)==sizeof(u16)) + return video::EIT_16BIT; + return video::EIT_32BIT; + } + +}; + +//typedef SSpecificVertexIndex SVertexIndex; + +typedef u32 SVertexIndex; +*/ + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SVertexManipulator.h b/src/others/irrlicht-1.8.1/include/SVertexManipulator.h new file mode 100644 index 0000000..6696ad0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SVertexManipulator.h @@ -0,0 +1,292 @@ +// Copyright (C) 2009-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_VERTEX_MANIPULATOR_H_INCLUDED__ +#define __S_VERTEX_MANIPULATOR_H_INCLUDED__ + +#include "S3DVertex.h" +#include "SColor.h" + +namespace irr +{ +namespace scene +{ + + class IMesh; + class IMeshBuffer; + struct SMesh; + + //! Interface for vertex manipulators. + /** You should derive your manipulator from this class if it shall be called for every vertex, getting as parameter just the vertex. + */ + struct IVertexManipulator + { + }; + //! Vertex manipulator to set color to a fixed color for all vertices + class SVertexColorSetManipulator : public IVertexManipulator + { + public: + SVertexColorSetManipulator(video::SColor color) : Color(color) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color=Color; + } + private: + video::SColor Color; + }; + //! Vertex manipulator to set the alpha value of the vertex color to a fixed value + class SVertexColorSetAlphaManipulator : public IVertexManipulator + { + public: + SVertexColorSetAlphaManipulator(u32 alpha) : Alpha(alpha) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setAlpha(Alpha); + } + private: + u32 Alpha; + }; + //! Vertex manipulator which invertes the RGB values + class SVertexColorInvertManipulator : public IVertexManipulator + { + public: + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setRed(255-vertex.Color.getRed()); + vertex.Color.setGreen(255-vertex.Color.getGreen()); + vertex.Color.setBlue(255-vertex.Color.getBlue()); + } + }; + //! Vertex manipulator to set vertex color to one of two values depending on a given threshold + /** If average of the color value is >Threshold the High color is chosen, else Low. */ + class SVertexColorThresholdManipulator : public IVertexManipulator + { + public: + SVertexColorThresholdManipulator(u8 threshold, video::SColor low, + video::SColor high) : Threshold(threshold), Low(low), High(high) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color = ((u8)vertex.Color.getAverage()>Threshold)?High:Low; + } + private: + u8 Threshold; + video::SColor Low; + video::SColor High; + }; + //! Vertex manipulator which adjusts the brightness by the given amount + /** A positive value increases brightness, a negative value darkens the colors. */ + class SVertexColorBrightnessManipulator : public IVertexManipulator + { + public: + SVertexColorBrightnessManipulator(s32 amount) : Amount(amount) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setRed(core::clamp(vertex.Color.getRed()+Amount, 0u, 255u)); + vertex.Color.setGreen(core::clamp(vertex.Color.getGreen()+Amount, 0u, 255u)); + vertex.Color.setBlue(core::clamp(vertex.Color.getBlue()+Amount, 0u, 255u)); + } + private: + s32 Amount; + }; + //! Vertex manipulator which adjusts the contrast by the given factor + /** Factors over 1 increase contrast, below 1 reduce it. */ + class SVertexColorContrastManipulator : public IVertexManipulator + { + public: + SVertexColorContrastManipulator(f32 factor) : Factor(factor) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+128, 0, 255)); + vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+128, 0, 255)); + vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+128, 0, 255)); + } + private: + f32 Factor; + }; + //! Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount. + /** Factors over 1 increase contrast, below 1 reduce it. + A positive amount increases brightness, a negative one darkens the colors. */ + class SVertexColorContrastBrightnessManipulator : public IVertexManipulator + { + public: + SVertexColorContrastBrightnessManipulator(f32 factor, s32 amount) : Factor(factor), Amount(amount+128) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+Amount, 0, 255)); + vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+Amount, 0, 255)); + vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+Amount, 0, 255)); + } + private: + f32 Factor; + s32 Amount; + }; + //! Vertex manipulator which adjusts the brightness by a gamma operation + /** A value over one increases brightness, one below darkens the colors. */ + class SVertexColorGammaManipulator : public IVertexManipulator + { + public: + SVertexColorGammaManipulator(f32 gamma) : Gamma(1.f) + { + if (gamma != 0.f) + Gamma = 1.f/gamma; + } + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setRed(core::clamp(core::round32(powf((f32)(vertex.Color.getRed()),Gamma)), 0, 255)); + vertex.Color.setGreen(core::clamp(core::round32(powf((f32)(vertex.Color.getGreen()),Gamma)), 0, 255)); + vertex.Color.setBlue(core::clamp(core::round32(powf((f32)(vertex.Color.getBlue()),Gamma)), 0, 255)); + } + private: + f32 Gamma; + }; + //! Vertex manipulator which scales the color values + /** Can e.g be used for white balance, factor would be 255.f/brightest color. */ + class SVertexColorScaleManipulator : public IVertexManipulator + { + public: + SVertexColorScaleManipulator(f32 factor) : Factor(factor) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color.setRed(core::clamp(core::round32(vertex.Color.getRed()*Factor), 0, 255)); + vertex.Color.setGreen(core::clamp(core::round32(vertex.Color.getGreen()*Factor), 0, 255)); + vertex.Color.setBlue(core::clamp(core::round32(vertex.Color.getBlue()*Factor), 0, 255)); + } + private: + f32 Factor; + }; + //! Vertex manipulator which desaturates the color values + /** Uses the lightness value of the color. */ + class SVertexColorDesaturateToLightnessManipulator : public IVertexManipulator + { + public: + void operator()(video::S3DVertex& vertex) const + { + vertex.Color=core::round32(vertex.Color.getLightness()); + } + }; + //! Vertex manipulator which desaturates the color values + /** Uses the average value of the color. */ + class SVertexColorDesaturateToAverageManipulator : public IVertexManipulator + { + public: + void operator()(video::S3DVertex& vertex) const + { + vertex.Color=vertex.Color.getAverage(); + } + }; + //! Vertex manipulator which desaturates the color values + /** Uses the luminance value of the color. */ + class SVertexColorDesaturateToLuminanceManipulator : public IVertexManipulator + { + public: + void operator()(video::S3DVertex& vertex) const + { + vertex.Color=core::round32(vertex.Color.getLuminance()); + } + }; + //! Vertex manipulator which interpolates the color values + /** Uses linear interpolation. */ + class SVertexColorInterpolateLinearManipulator : public IVertexManipulator + { + public: + SVertexColorInterpolateLinearManipulator(video::SColor color, f32 factor) : + Color(color), Factor(factor) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color=vertex.Color.getInterpolated(Color, Factor); + } + private: + video::SColor Color; + f32 Factor; + }; + //! Vertex manipulator which interpolates the color values + /** Uses linear interpolation. */ + class SVertexColorInterpolateQuadraticManipulator : public IVertexManipulator + { + public: + SVertexColorInterpolateQuadraticManipulator(video::SColor color1, video::SColor color2, f32 factor) : + Color1(color1), Color2(color2), Factor(factor) {} + void operator()(video::S3DVertex& vertex) const + { + vertex.Color=vertex.Color.getInterpolated_quadratic(Color1, Color2, Factor); + } + private: + video::SColor Color1; + video::SColor Color2; + f32 Factor; + }; + + //! Vertex manipulator which scales the position of the vertex + class SVertexPositionScaleManipulator : public IVertexManipulator + { + public: + SVertexPositionScaleManipulator(const core::vector3df& factor) : Factor(factor) {} + template + void operator()(VType& vertex) const + { + vertex.Pos *= Factor; + } + private: + core::vector3df Factor; + }; + + //! Vertex manipulator which scales the position of the vertex along the normals + /** This can look more pleasing than the usual Scale operator, but + depends on the mesh geometry. + */ + class SVertexPositionScaleAlongNormalsManipulator : public IVertexManipulator + { + public: + SVertexPositionScaleAlongNormalsManipulator(const core::vector3df& factor) : Factor(factor) {} + template + void operator()(VType& vertex) const + { + vertex.Pos += vertex.Normal*Factor; + } + private: + core::vector3df Factor; + }; + + //! Vertex manipulator which transforms the position of the vertex + class SVertexPositionTransformManipulator : public IVertexManipulator + { + public: + SVertexPositionTransformManipulator(const core::matrix4& m) : Transformation(m) {} + template + void operator()(VType& vertex) const + { + Transformation.transformVect(vertex.Pos); + } + private: + core::matrix4 Transformation; + }; + + //! Vertex manipulator which scales the TCoords of the vertex + class SVertexTCoordsScaleManipulator : public IVertexManipulator + { + public: + SVertexTCoordsScaleManipulator(const core::vector2df& factor, u32 uvSet=1) : Factor(factor), UVSet(uvSet) {} + void operator()(video::S3DVertex2TCoords& vertex) const + { + if (1==UVSet) + vertex.TCoords *= Factor; + else if (2==UVSet) + vertex.TCoords2 *= Factor; + } + template + void operator()(VType& vertex) const + { + if (1==UVSet) + vertex.TCoords *= Factor; + } + private: + core::vector2df Factor; + u32 UVSet; + }; + +} // end namespace scene +} // end namespace irr + + +#endif diff --git a/src/others/irrlicht-1.8.1/include/SViewFrustum.h b/src/others/irrlicht-1.8.1/include/SViewFrustum.h new file mode 100644 index 0000000..88d7e2e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SViewFrustum.h @@ -0,0 +1,370 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_VIEW_FRUSTUM_H_INCLUDED__ +#define __S_VIEW_FRUSTUM_H_INCLUDED__ + +#include "plane3d.h" +#include "vector3d.h" +#include "line3d.h" +#include "aabbox3d.h" +#include "matrix4.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace scene +{ + + //! Defines the view frustum. That's the space visible by the camera. + /** The view frustum is enclosed by 6 planes. These six planes share + eight points. A bounding box around these eight points is also stored in + this structure. + */ + struct SViewFrustum + { + enum VFPLANES + { + //! Far plane of the frustum. That is the plane farest away from the eye. + VF_FAR_PLANE = 0, + //! Near plane of the frustum. That is the plane nearest to the eye. + VF_NEAR_PLANE, + //! Left plane of the frustum. + VF_LEFT_PLANE, + //! Right plane of the frustum. + VF_RIGHT_PLANE, + //! Bottom plane of the frustum. + VF_BOTTOM_PLANE, + //! Top plane of the frustum. + VF_TOP_PLANE, + + //! Amount of planes enclosing the view frustum. Should be 6. + VF_PLANE_COUNT + }; + + + //! Default Constructor + SViewFrustum() {} + + //! Copy Constructor + SViewFrustum(const SViewFrustum& other); + + //! This constructor creates a view frustum based on a projection and/or view matrix. + SViewFrustum(const core::matrix4& mat); + + //! This constructor creates a view frustum based on a projection and/or view matrix. + inline void setFrom(const core::matrix4& mat); + + //! transforms the frustum by the matrix + /** \param mat: Matrix by which the view frustum is transformed.*/ + void transform(const core::matrix4& mat); + + //! returns the point which is on the far left upper corner inside the the view frustum. + core::vector3df getFarLeftUp() const; + + //! returns the point which is on the far left bottom corner inside the the view frustum. + core::vector3df getFarLeftDown() const; + + //! returns the point which is on the far right top corner inside the the view frustum. + core::vector3df getFarRightUp() const; + + //! returns the point which is on the far right bottom corner inside the the view frustum. + core::vector3df getFarRightDown() const; + + //! returns the point which is on the near left upper corner inside the the view frustum. + core::vector3df getNearLeftUp() const; + + //! returns the point which is on the near left bottom corner inside the the view frustum. + core::vector3df getNearLeftDown() const; + + //! returns the point which is on the near right top corner inside the the view frustum. + core::vector3df getNearRightUp() const; + + //! returns the point which is on the near right bottom corner inside the the view frustum. + core::vector3df getNearRightDown() const; + + //! returns a bounding box enclosing the whole view frustum + const core::aabbox3d &getBoundingBox() const; + + //! recalculates the bounding box member based on the planes + inline void recalculateBoundingBox(); + + //! get the given state's matrix based on frustum E_TRANSFORMATION_STATE + core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state); + + //! get the given state's matrix based on frustum E_TRANSFORMATION_STATE + const core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state) const; + + //! clips a line to the view frustum. + /** \return True if the line was clipped, false if not */ + bool clipLine(core::line3d& line) const; + + //! the position of the camera + core::vector3df cameraPosition; + + //! all planes enclosing the view frustum. + core::plane3d planes[VF_PLANE_COUNT]; + + //! bounding box around the view frustum + core::aabbox3d boundingBox; + + private: + //! Hold a copy of important transform matrices + enum E_TRANSFORMATION_STATE_FRUSTUM + { + ETS_VIEW = 0, + ETS_PROJECTION = 1, + ETS_COUNT_FRUSTUM + }; + + //! Hold a copy of important transform matrices + core::matrix4 Matrices[ETS_COUNT_FRUSTUM]; + }; + + + /*! + Copy constructor ViewFrustum + */ + inline SViewFrustum::SViewFrustum(const SViewFrustum& other) + { + cameraPosition=other.cameraPosition; + boundingBox=other.boundingBox; + + u32 i; + for (i=0; i &SViewFrustum::getBoundingBox() const + { + return boundingBox; + } + + inline void SViewFrustum::recalculateBoundingBox() + { + boundingBox.reset ( cameraPosition ); + + boundingBox.addInternalPoint(getFarLeftUp()); + boundingBox.addInternalPoint(getFarRightUp()); + boundingBox.addInternalPoint(getFarLeftDown()); + boundingBox.addInternalPoint(getFarRightDown()); + } + + //! This constructor creates a view frustum based on a projection + //! and/or view matrix. + inline void SViewFrustum::setFrom(const core::matrix4& mat) + { + // left clipping plane + planes[VF_LEFT_PLANE].Normal.X = mat[3 ] + mat[0]; + planes[VF_LEFT_PLANE].Normal.Y = mat[7 ] + mat[4]; + planes[VF_LEFT_PLANE].Normal.Z = mat[11] + mat[8]; + planes[VF_LEFT_PLANE].D = mat[15] + mat[12]; + + // right clipping plane + planes[VF_RIGHT_PLANE].Normal.X = mat[3 ] - mat[0]; + planes[VF_RIGHT_PLANE].Normal.Y = mat[7 ] - mat[4]; + planes[VF_RIGHT_PLANE].Normal.Z = mat[11] - mat[8]; + planes[VF_RIGHT_PLANE].D = mat[15] - mat[12]; + + // top clipping plane + planes[VF_TOP_PLANE].Normal.X = mat[3 ] - mat[1]; + planes[VF_TOP_PLANE].Normal.Y = mat[7 ] - mat[5]; + planes[VF_TOP_PLANE].Normal.Z = mat[11] - mat[9]; + planes[VF_TOP_PLANE].D = mat[15] - mat[13]; + + // bottom clipping plane + planes[VF_BOTTOM_PLANE].Normal.X = mat[3 ] + mat[1]; + planes[VF_BOTTOM_PLANE].Normal.Y = mat[7 ] + mat[5]; + planes[VF_BOTTOM_PLANE].Normal.Z = mat[11] + mat[9]; + planes[VF_BOTTOM_PLANE].D = mat[15] + mat[13]; + + // far clipping plane + planes[VF_FAR_PLANE].Normal.X = mat[3 ] - mat[2]; + planes[VF_FAR_PLANE].Normal.Y = mat[7 ] - mat[6]; + planes[VF_FAR_PLANE].Normal.Z = mat[11] - mat[10]; + planes[VF_FAR_PLANE].D = mat[15] - mat[14]; + + // near clipping plane + planes[VF_NEAR_PLANE].Normal.X = mat[2]; + planes[VF_NEAR_PLANE].Normal.Y = mat[6]; + planes[VF_NEAR_PLANE].Normal.Z = mat[10]; + planes[VF_NEAR_PLANE].D = mat[14]; + + // normalize normals + u32 i; + for ( i=0; i != VF_PLANE_COUNT; ++i) + { + const f32 len = -core::reciprocal_squareroot( + planes[i].Normal.getLengthSQ()); + planes[i].Normal *= len; + planes[i].D *= len; + } + + // make bounding box + recalculateBoundingBox(); + } + + /*! + View Frustum depends on Projection & View Matrix + */ + inline core::matrix4& SViewFrustum::getTransform(video::E_TRANSFORMATION_STATE state ) + { + u32 index = 0; + switch ( state ) + { + case video::ETS_PROJECTION: + index = SViewFrustum::ETS_PROJECTION; break; + case video::ETS_VIEW: + index = SViewFrustum::ETS_VIEW; break; + default: + break; + } + return Matrices [ index ]; + } + + /*! + View Frustum depends on Projection & View Matrix + */ + inline const core::matrix4& SViewFrustum::getTransform(video::E_TRANSFORMATION_STATE state ) const + { + u32 index = 0; + switch ( state ) + { + case video::ETS_PROJECTION: + index = SViewFrustum::ETS_PROJECTION; break; + case video::ETS_VIEW: + index = SViewFrustum::ETS_VIEW; break; + default: + break; + } + return Matrices [ index ]; + } + + //! Clips a line to the frustum + inline bool SViewFrustum::clipLine(core::line3d& line) const + { + bool wasClipped = false; + for (u32 i=0; i < VF_PLANE_COUNT; ++i) + { + if (planes[i].classifyPointRelation(line.start) == core::ISREL3D_FRONT) + { + line.start = line.start.getInterpolated(line.end, + planes[i].getKnownIntersectionWithLine(line.start, line.end)); + wasClipped = true; + } + if (planes[i].classifyPointRelation(line.end) == core::ISREL3D_FRONT) + { + line.end = line.start.getInterpolated(line.end, + planes[i].getKnownIntersectionWithLine(line.start, line.end)); + wasClipped = true; + } + } + return wasClipped; + } + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/SceneParameters.h b/src/others/irrlicht-1.8.1/include/SceneParameters.h new file mode 100644 index 0000000..699e2ac --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/SceneParameters.h @@ -0,0 +1,182 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_PARAMETERS_H_INCLUDED__ +#define __I_SCENE_PARAMETERS_H_INCLUDED__ + +/*! \file SceneParameters.h + \brief Header file containing all scene parameters for modifying mesh loading etc. + + This file includes all parameter names which can be set using ISceneManager::getParameters() + to modify the behavior of plugins and mesh loaders. +*/ + +namespace irr +{ +namespace scene +{ + //! Name of the parameter for changing how Irrlicht handles the ZWrite flag for transparent (blending) materials + /** The default behavior in Irrlicht is to disable writing to the + z-buffer for all really transparent, i.e. blending materials. This + avoids problems with intersecting faces, but can also break renderings. + If transparent materials should use the SMaterial flag for ZWriteEnable + just as other material types use this attribute. + Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); + \endcode + **/ + const c8* const ALLOW_ZWRITE_ON_TRANSPARENT = "Allow_ZWrite_On_Transparent"; + + //! Name of the parameter for changing the texture path of the built-in csm loader. + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, "path/to/your/textures"); + \endcode + **/ + const c8* const CSM_TEXTURE_PATH = "CSM_TexturePath"; + + //! Name of the parameter for changing the texture path of the built-in lmts loader. + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, "path/to/your/textures"); + \endcode + **/ + const c8* const LMTS_TEXTURE_PATH = "LMTS_TexturePath"; + + //! Name of the parameter for changing the texture path of the built-in my3d loader. + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, "path/to/your/textures"); + \endcode + **/ + const c8* const MY3D_TEXTURE_PATH = "MY3D_TexturePath"; + + //! Name of the parameter specifying the COLLADA mesh loading mode + /** + Specifies if the COLLADA loader should create instances of the models, lights and + cameras when loading COLLADA meshes. By default, this is set to false. If this is + set to true, the ISceneManager::getMesh() method will only return a pointer to a + dummy mesh and create instances of all meshes and lights and cameras in the collada + file by itself. Example: + \code + SceneManager->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true); + \endcode + */ + const c8* const COLLADA_CREATE_SCENE_INSTANCES = "COLLADA_CreateSceneInstances"; + + //! Name of the parameter for changing the texture path of the built-in DMF loader. + /** This path is prefixed to the file names defined in the Deled file when loading + textures. This allows to alter the paths for a specific project setting. + Use it like this: + \code + SceneManager->getStringParameters()->setAttribute(scene::DMF_TEXTURE_PATH, "path/to/your/textures"); + \endcode + **/ + const c8* const DMF_TEXTURE_PATH = "DMF_TexturePath"; + + //! Name of the parameter for preserving DMF textures dir structure with built-in DMF loader. + /** If this parameter is set to true, the texture directory defined in the Deled file + is ignored, and only the texture name is used to find the proper file. Otherwise, the + texture path is also used, which allows to use a nicer media layout. + Use it like this: + \code + //this way you won't use this setting (default) + SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, false); + \endcode + \code + //this way you'll use this setting + SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, true); + \endcode + **/ + const c8* const DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir"; + + //! Name of the parameter for setting reference value of alpha in transparent materials. + /** Use it like this: + \code + //this way you'll set alpha ref to 0.1 + SceneManager->getParameters()->setAttribute(scene::DMF_ALPHA_CHANNEL_REF, 0.1); + \endcode + **/ + const c8* const DMF_ALPHA_CHANNEL_REF = "DMF_AlphaRef"; + + //! Name of the parameter for choose to flip or not tga files. + /** Use it like this: + \code + //this way you'll choose to flip alpha textures + SceneManager->getParameters()->setAttribute(scene::DMF_FLIP_ALPHA_TEXTURES, true); + \endcode + **/ + const c8* const DMF_FLIP_ALPHA_TEXTURES = "DMF_FlipAlpha"; + + + //! Name of the parameter for changing the texture path of the built-in obj loader. + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::OBJ_TEXTURE_PATH, "path/to/your/textures"); + \endcode + **/ + const c8* const OBJ_TEXTURE_PATH = "OBJ_TexturePath"; + + //! Flag to avoid loading group structures in .obj files + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true); + \endcode + **/ + const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups"; + + + //! Flag to avoid loading material .mtl file for .obj files + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true); + \endcode + **/ + const c8* const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles"; + + + //! Flag to ignore the b3d file's mipmapping flag + /** Instead Irrlicht's texture creation flag is used. Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::B3D_LOADER_IGNORE_MIPMAP_FLAG, true); + \endcode + **/ + const c8* const B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag"; + + //! Name of the parameter for changing the texture path of the built-in b3d loader. + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::B3D_TEXTURE_PATH, "path/to/your/textures"); + \endcode + **/ + const c8* const B3D_TEXTURE_PATH = "B3D_TexturePath"; + + //! Flag set as parameter when the scene manager is used as editor + /** In this way special animators like deletion animators can be stopped from + deleting scene nodes for example */ + const c8* const IRR_SCENE_MANAGER_IS_EDITOR = "IRR_Editor"; + + //! Name of the parameter for setting the length of debug normals. + /** Use it like this: + \code + SceneManager->getParameters()->setAttribute(scene::DEBUG_NORMAL_LENGTH, 1.5f); + \endcode + **/ + const c8* const DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length"; + + //! Name of the parameter for setting the color of debug normals. + /** Use it like this: + \code + SceneManager->getParameters()->setAttributeAsColor(scene::DEBUG_NORMAL_COLOR, video::SColor(255, 255, 255, 255)); + \endcode + **/ + const c8* const DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color"; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/aabbox3d.h b/src/others/irrlicht-1.8.1/include/aabbox3d.h new file mode 100644 index 0000000..afaf12d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/aabbox3d.h @@ -0,0 +1,332 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_AABBOX_3D_H_INCLUDED__ +#define __IRR_AABBOX_3D_H_INCLUDED__ + +#include "irrMath.h" +#include "plane3d.h" +#include "line3d.h" + +namespace irr +{ +namespace core +{ + +//! Axis aligned bounding box in 3d dimensional space. +/** Has some useful methods used with occlusion culling or clipping. +*/ +template +class aabbox3d +{ + public: + + //! Default Constructor. + aabbox3d(): MinEdge(-1,-1,-1), MaxEdge(1,1,1) {} + //! Constructor with min edge and max edge. + aabbox3d(const vector3d& min, const vector3d& max): MinEdge(min), MaxEdge(max) {} + //! Constructor with only one point. + aabbox3d(const vector3d& init): MinEdge(init), MaxEdge(init) {} + //! Constructor with min edge and max edge as single values, not vectors. + aabbox3d(T minx, T miny, T minz, T maxx, T maxy, T maxz): MinEdge(minx, miny, minz), MaxEdge(maxx, maxy, maxz) {} + + // operators + //! Equality operator + /** \param other box to compare with. + \return True if both boxes are equal, else false. */ + inline bool operator==(const aabbox3d& other) const { return (MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);} + //! Inequality operator + /** \param other box to compare with. + \return True if both boxes are different, else false. */ + inline bool operator!=(const aabbox3d& other) const { return !(MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);} + + // functions + + //! Resets the bounding box to a one-point box. + /** \param x X coord of the point. + \param y Y coord of the point. + \param z Z coord of the point. */ + void reset(T x, T y, T z) + { + MaxEdge.set(x,y,z); + MinEdge = MaxEdge; + } + + //! Resets the bounding box. + /** \param initValue New box to set this one to. */ + void reset(const aabbox3d& initValue) + { + *this = initValue; + } + + //! Resets the bounding box to a one-point box. + /** \param initValue New point. */ + void reset(const vector3d& initValue) + { + MaxEdge = initValue; + MinEdge = initValue; + } + + //! Adds a point to the bounding box + /** The box grows bigger, if point was outside of the box. + \param p: Point to add into the box. */ + void addInternalPoint(const vector3d& p) + { + addInternalPoint(p.X, p.Y, p.Z); + } + + //! Adds another bounding box + /** The box grows bigger, if the new box was outside of the box. + \param b: Other bounding box to add into this box. */ + void addInternalBox(const aabbox3d& b) + { + addInternalPoint(b.MaxEdge); + addInternalPoint(b.MinEdge); + } + + //! Adds a point to the bounding box + /** The box grows bigger, if point is outside of the box. + \param x X coordinate of the point to add to this box. + \param y Y coordinate of the point to add to this box. + \param z Z coordinate of the point to add to this box. */ + void addInternalPoint(T x, T y, T z) + { + if (x>MaxEdge.X) MaxEdge.X = x; + if (y>MaxEdge.Y) MaxEdge.Y = y; + if (z>MaxEdge.Z) MaxEdge.Z = z; + + if (x getCenter() const + { + return (MinEdge + MaxEdge) / 2; + } + + //! Get extent of the box (maximal distance of two points in the box) + /** \return Extent of the bounding box. */ + vector3d getExtent() const + { + return MaxEdge - MinEdge; + } + + //! Check if the box is empty. + /** This means that there is no space between the min and max edge. + \return True if box is empty, else false. */ + bool isEmpty() const + { + return MinEdge.equals ( MaxEdge ); + } + + //! Get the volume enclosed by the box in cubed units + T getVolume() const + { + const vector3d e = getExtent(); + return e.X * e.Y * e.Z; + } + + //! Get the surface area of the box in squared units + T getArea() const + { + const vector3d e = getExtent(); + return 2*(e.X*e.Y + e.X*e.Z + e.Y*e.Z); + } + + //! Stores all 8 edges of the box into an array + /** \param edges: Pointer to array of 8 edges. */ + void getEdges(vector3d *edges) const + { + const core::vector3d middle = getCenter(); + const core::vector3d diag = middle - MaxEdge; + + /* + Edges are stored in this way: + Hey, am I an ascii artist, or what? :) niko. + /3--------/7 + / | / | + / | / | + 1---------5 | + | /2- - -|- -6 + | / | / + |/ | / + 0---------4/ + */ + + edges[0].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z + diag.Z); + edges[1].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z + diag.Z); + edges[2].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z - diag.Z); + edges[3].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z - diag.Z); + edges[4].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z + diag.Z); + edges[5].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z + diag.Z); + edges[6].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z - diag.Z); + edges[7].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z - diag.Z); + } + + //! Repairs the box. + /** Necessary if for example MinEdge and MaxEdge are swapped. */ + void repair() + { + T t; + + if (MinEdge.X > MaxEdge.X) + { t=MinEdge.X; MinEdge.X = MaxEdge.X; MaxEdge.X=t; } + if (MinEdge.Y > MaxEdge.Y) + { t=MinEdge.Y; MinEdge.Y = MaxEdge.Y; MaxEdge.Y=t; } + if (MinEdge.Z > MaxEdge.Z) + { t=MinEdge.Z; MinEdge.Z = MaxEdge.Z; MaxEdge.Z=t; } + } + + //! Calculates a new interpolated bounding box. + /** d=0 returns other, d=1 returns this, all other values blend between + the two boxes. + \param other Other box to interpolate between + \param d Value between 0.0f and 1.0f. + \return Interpolated box. */ + aabbox3d getInterpolated(const aabbox3d& other, f32 d) const + { + f32 inv = 1.0f - d; + return aabbox3d((other.MinEdge*inv) + (MinEdge*d), + (other.MaxEdge*inv) + (MaxEdge*d)); + } + + //! Determines if a point is within this box. + /** Border is included (IS part of the box)! + \param p: Point to check. + \return True if the point is within the box and false if not */ + bool isPointInside(const vector3d& p) const + { + return (p.X >= MinEdge.X && p.X <= MaxEdge.X && + p.Y >= MinEdge.Y && p.Y <= MaxEdge.Y && + p.Z >= MinEdge.Z && p.Z <= MaxEdge.Z); + } + + //! Determines if a point is within this box and not its borders. + /** Border is excluded (NOT part of the box)! + \param p: Point to check. + \return True if the point is within the box and false if not. */ + bool isPointTotalInside(const vector3d& p) const + { + return (p.X > MinEdge.X && p.X < MaxEdge.X && + p.Y > MinEdge.Y && p.Y < MaxEdge.Y && + p.Z > MinEdge.Z && p.Z < MaxEdge.Z); + } + + //! Check if this box is completely inside the 'other' box. + /** \param other: Other box to check against. + \return True if this box is completly inside the other box, + otherwise false. */ + bool isFullInside(const aabbox3d& other) const + { + return (MinEdge.X >= other.MinEdge.X && MinEdge.Y >= other.MinEdge.Y && MinEdge.Z >= other.MinEdge.Z && + MaxEdge.X <= other.MaxEdge.X && MaxEdge.Y <= other.MaxEdge.Y && MaxEdge.Z <= other.MaxEdge.Z); + } + + //! Determines if the axis-aligned box intersects with another axis-aligned box. + /** \param other: Other box to check a intersection with. + \return True if there is an intersection with the other box, + otherwise false. */ + bool intersectsWithBox(const aabbox3d& other) const + { + return (MinEdge.X <= other.MaxEdge.X && MinEdge.Y <= other.MaxEdge.Y && MinEdge.Z <= other.MaxEdge.Z && + MaxEdge.X >= other.MinEdge.X && MaxEdge.Y >= other.MinEdge.Y && MaxEdge.Z >= other.MinEdge.Z); + } + + //! Tests if the box intersects with a line + /** \param line: Line to test intersection with. + \return True if there is an intersection , else false. */ + bool intersectsWithLine(const line3d& line) const + { + return intersectsWithLine(line.getMiddle(), line.getVector().normalize(), + (T)(line.getLength() * 0.5)); + } + + //! Tests if the box intersects with a line + /** \param linemiddle Center of the line. + \param linevect Vector of the line. + \param halflength Half length of the line. + \return True if there is an intersection, else false. */ + bool intersectsWithLine(const vector3d& linemiddle, + const vector3d& linevect, T halflength) const + { + const vector3d e = getExtent() * (T)0.5; + const vector3d t = getCenter() - linemiddle; + + if ((fabs(t.X) > e.X + halflength * fabs(linevect.X)) || + (fabs(t.Y) > e.Y + halflength * fabs(linevect.Y)) || + (fabs(t.Z) > e.Z + halflength * fabs(linevect.Z)) ) + return false; + + T r = e.Y * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.Y); + if (fabs(t.Y*linevect.Z - t.Z*linevect.Y) > r ) + return false; + + r = e.X * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.X); + if (fabs(t.Z*linevect.X - t.X*linevect.Z) > r ) + return false; + + r = e.X * (T)fabs(linevect.Y) + e.Y * (T)fabs(linevect.X); + if (fabs(t.X*linevect.Y - t.Y*linevect.X) > r) + return false; + + return true; + } + + //! Classifies a relation with a plane. + /** \param plane Plane to classify relation to. + \return Returns ISREL3D_FRONT if the box is in front of the plane, + ISREL3D_BACK if the box is behind the plane, and + ISREL3D_CLIPPED if it is on both sides of the plane. */ + EIntersectionRelation3D classifyPlaneRelation(const plane3d& plane) const + { + vector3d nearPoint(MaxEdge); + vector3d farPoint(MinEdge); + + if (plane.Normal.X > (T)0) + { + nearPoint.X = MinEdge.X; + farPoint.X = MaxEdge.X; + } + + if (plane.Normal.Y > (T)0) + { + nearPoint.Y = MinEdge.Y; + farPoint.Y = MaxEdge.Y; + } + + if (plane.Normal.Z > (T)0) + { + nearPoint.Z = MinEdge.Z; + farPoint.Z = MaxEdge.Z; + } + + if (plane.Normal.dotProduct(nearPoint) + plane.D > (T)0) + return ISREL3D_FRONT; + + if (plane.Normal.dotProduct(farPoint) + plane.D > (T)0) + return ISREL3D_CLIPPED; + + return ISREL3D_BACK; + } + + //! The near edge + vector3d MinEdge; + + //! The far edge + vector3d MaxEdge; +}; + + //! Typedef for a f32 3d bounding box. + typedef aabbox3d aabbox3df; + //! Typedef for an integer 3d bounding box. + typedef aabbox3d aabbox3di; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/coreutil.h b/src/others/irrlicht-1.8.1/include/coreutil.h new file mode 100644 index 0000000..2ab4855 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/coreutil.h @@ -0,0 +1,188 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_CORE_UTIL_H_INCLUDED__ +#define __IRR_CORE_UTIL_H_INCLUDED__ + +#include "irrString.h" +#include "path.h" + +namespace irr +{ +namespace core +{ + +/*! \file coreutil.h + \brief File containing useful basic utility functions +*/ + +// ----------- some basic quite often used string functions ----------------- + +//! search if a filename has a proper extension +inline s32 isFileExtension ( const io::path& filename, + const io::path& ext0, + const io::path& ext1, + const io::path& ext2) +{ + s32 extPos = filename.findLast ( '.' ); + if ( extPos < 0 ) + return 0; + + extPos += 1; + if ( filename.equals_substring_ignore_case ( ext0, extPos ) ) return 1; + if ( filename.equals_substring_ignore_case ( ext1, extPos ) ) return 2; + if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3; + return 0; +} + +//! search if a filename has a proper extension +inline bool hasFileExtension ( const io::path& filename, + const io::path& ext0, + const io::path& ext1 = "", + const io::path& ext2 = "") +{ + return isFileExtension ( filename, ext0, ext1, ext2 ) > 0; +} + +//! cut the filename extension from a source file path and store it in a dest file path +inline io::path& cutFilenameExtension ( io::path &dest, const io::path &source ) +{ + s32 endPos = source.findLast ( '.' ); + dest = source.subString ( 0, endPos < 0 ? source.size () : endPos ); + return dest; +} + +//! get the filename extension from a file path +inline io::path& getFileNameExtension ( io::path &dest, const io::path &source ) +{ + s32 endPos = source.findLast ( '.' ); + if ( endPos < 0 ) + dest = ""; + else + dest = source.subString ( endPos, source.size () ); + return dest; +} + +//! delete path from filename +inline io::path& deletePathFromFilename(io::path& filename) +{ + // delete path from filename + const fschar_t* s = filename.c_str(); + const fschar_t* p = s + filename.size(); + + // search for path separator or beginning + while ( *p != '/' && *p != '\\' && p != s ) + p--; + + if ( p != s ) + { + ++p; + filename = p; + } + return filename; +} + +//! trim paths +inline io::path& deletePathFromPath(io::path& filename, s32 pathCount) +{ + // delete path from filename + s32 i = filename.size(); + + // search for path separator or beginning + while ( i>=0 ) + { + if ( filename[i] == '/' || filename[i] == '\\' ) + { + if ( --pathCount <= 0 ) + break; + } + --i; + } + + if ( i>0 ) + { + filename [ i + 1 ] = 0; + filename.validate(); + } + else + filename=""; + return filename; +} + +//! looks if file is in the same directory of path. returns offset of directory. +//! 0 means in same directory. 1 means file is direct child of path +inline s32 isInSameDirectory ( const io::path& path, const io::path& file ) +{ + s32 subA = 0; + s32 subB = 0; + s32 pos; + + if ( path.size() && !path.equalsn ( file, path.size() ) ) + return -1; + + pos = 0; + while ( (pos = path.findNext ( '/', pos )) >= 0 ) + { + subA += 1; + pos += 1; + } + + pos = 0; + while ( (pos = file.findNext ( '/', pos )) >= 0 ) + { + subB += 1; + pos += 1; + } + + return subB - subA; +} + +// splits a path into components +static inline void splitFilename(const io::path &name, io::path* path=0, + io::path* filename=0, io::path* extension=0, bool make_lower=false) +{ + s32 i = name.size(); + s32 extpos = i; + + // search for path separator or beginning + while ( i >= 0 ) + { + if ( name[i] == '.' ) + { + extpos = i; + if ( extension ) + *extension = name.subString ( extpos + 1, name.size() - (extpos + 1), make_lower ); + } + else + if ( name[i] == '/' || name[i] == '\\' ) + { + if ( filename ) + *filename = name.subString ( i + 1, extpos - (i + 1), make_lower ); + if ( path ) + { + *path = name.subString ( 0, i + 1, make_lower ); + path->replace ( '\\', '/' ); + } + return; + } + i -= 1; + } + if ( filename ) + *filename = name.subString ( 0, extpos, make_lower ); +} + + +//! some standard function ( to remove dependencies ) +#undef isdigit +#undef isspace +#undef isupper +inline s32 isdigit(s32 c) { return c >= '0' && c <= '9'; } +inline s32 isspace(s32 c) { return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; } +inline s32 isupper(s32 c) { return c >= 'A' && c <= 'Z'; } + + +} // end namespace core +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/dimension2d.h b/src/others/irrlicht-1.8.1/include/dimension2d.h new file mode 100644 index 0000000..13addb4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/dimension2d.h @@ -0,0 +1,224 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_DIMENSION2D_H_INCLUDED__ +#define __IRR_DIMENSION2D_H_INCLUDED__ + +#include "irrTypes.h" +#include "irrMath.h" // for irr::core::equals() + +namespace irr +{ +namespace core +{ + template + class vector2d; + + //! Specifies a 2 dimensional size. + template + class dimension2d + { + public: + //! Default constructor for empty dimension + dimension2d() : Width(0), Height(0) {} + //! Constructor with width and height + dimension2d(const T& width, const T& height) + : Width(width), Height(height) {} + + dimension2d(const vector2d& other); // Defined in vector2d.h + + //! Use this constructor only where you are sure that the conversion is valid. + template + explicit dimension2d(const dimension2d& other) : + Width((T)other.Width), Height((T)other.Height) { } + + template + dimension2d& operator=(const dimension2d& other) + { + Width = (T) other.Width; + Height = (T) other.Height; + return *this; + } + + + //! Equality operator + bool operator==(const dimension2d& other) const + { + return core::equals(Width, other.Width) && + core::equals(Height, other.Height); + } + + //! Inequality operator + bool operator!=(const dimension2d& other) const + { + return ! (*this == other); + } + + bool operator==(const vector2d& other) const; // Defined in vector2d.h + + bool operator!=(const vector2d& other) const + { + return !(*this == other); + } + + //! Set to new values + dimension2d& set(const T& width, const T& height) + { + Width = width; + Height = height; + return *this; + } + + //! Divide width and height by scalar + dimension2d& operator/=(const T& scale) + { + Width /= scale; + Height /= scale; + return *this; + } + + //! Divide width and height by scalar + dimension2d operator/(const T& scale) const + { + return dimension2d(Width/scale, Height/scale); + } + + //! Multiply width and height by scalar + dimension2d& operator*=(const T& scale) + { + Width *= scale; + Height *= scale; + return *this; + } + + //! Multiply width and height by scalar + dimension2d operator*(const T& scale) const + { + return dimension2d(Width*scale, Height*scale); + } + + //! Add another dimension to this one. + dimension2d& operator+=(const dimension2d& other) + { + Width += other.Width; + Height += other.Height; + return *this; + } + + //! Add two dimensions + dimension2d operator+(const dimension2d& other) const + { + return dimension2d(Width+other.Width, Height+other.Height); + } + + //! Subtract a dimension from this one + dimension2d& operator-=(const dimension2d& other) + { + Width -= other.Width; + Height -= other.Height; + return *this; + } + + //! Subtract one dimension from another + dimension2d operator-(const dimension2d& other) const + { + return dimension2d(Width-other.Width, Height-other.Height); + } + + //! Get area + T getArea() const + { + return Width*Height; + } + + //! Get the optimal size according to some properties + /** This is a function often used for texture dimension + calculations. The function returns the next larger or + smaller dimension which is a power-of-two dimension + (2^n,2^m) and/or square (Width=Height). + \param requirePowerOfTwo Forces the result to use only + powers of two as values. + \param requireSquare Makes width==height in the result + \param larger Choose whether the result is larger or + smaller than the current dimension. If one dimension + need not be changed it is kept with any value of larger. + \param maxValue Maximum texturesize. if value > 0 size is + clamped to maxValue + \return The optimal dimension under the given + constraints. */ + dimension2d getOptimalSize( + bool requirePowerOfTwo=true, + bool requireSquare=false, + bool larger=true, + u32 maxValue = 0) const + { + u32 i=1; + u32 j=1; + if (requirePowerOfTwo) + { + while (i<(u32)Width) + i<<=1; + if (!larger && i!=1 && i!=(u32)Width) + i>>=1; + while (j<(u32)Height) + j<<=1; + if (!larger && j!=1 && j!=(u32)Height) + j>>=1; + } + else + { + i=(u32)Width; + j=(u32)Height; + } + + if (requireSquare) + { + if ((larger && (i>j)) || (!larger && (i 0 && i > maxValue) + i = maxValue; + + if ( maxValue > 0 && j > maxValue) + j = maxValue; + + return dimension2d((T)i,(T)j); + } + + //! Get the interpolated dimension + /** \param other Other dimension to interpolate with. + \param d Value between 0.0f and 1.0f. + \return Interpolated dimension. */ + dimension2d getInterpolated(const dimension2d& other, f32 d) const + { + f32 inv = (1.0f - d); + return dimension2d( (T)(other.Width*inv + Width*d), (T)(other.Height*inv + Height*d)); + } + + + //! Width of the dimension. + T Width; + //! Height of the dimension. + T Height; + }; + + //! Typedef for an f32 dimension. + typedef dimension2d dimension2df; + //! Typedef for an unsigned integer dimension. + typedef dimension2d dimension2du; + + //! Typedef for an integer dimension. + /** There are few cases where negative dimensions make sense. Please consider using + dimension2du instead. */ + typedef dimension2d dimension2di; + + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/driverChoice.h b/src/others/irrlicht-1.8.1/include/driverChoice.h new file mode 100644 index 0000000..d418ba8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/driverChoice.h @@ -0,0 +1,45 @@ +// Copyright (C) 2009-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __E_DRIVER_CHOICE_H_INCLUDED__ +#define __E_DRIVER_CHOICE_H_INCLUDED__ + +#include +#include +#include "EDriverTypes.h" +#include "irrTypes.h" +#include "IrrlichtDevice.h" + +namespace irr +{ + +//! ask user for driver +static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true) +{ + const char* const names[] = {"NullDriver","Software Renderer","Burning's Video","Direct3D 8.1","Direct3D 9.0c","OpenGL 1.x/2.x/3.x"}; + printf("Please select the driver you want:\n"); + irr::u32 i=0; + for (i=irr::video::EDT_COUNT; i>0; --i) + { + if (allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1)))) + printf(" (%c) %s\n", 'a'+irr::video::EDT_COUNT-i, names[i-1]); + } + + char c; + std::cin >> c; + c = irr::video::EDT_COUNT+'a'-c; + + for (i=irr::video::EDT_COUNT; i>0; --i) + { + if (!(allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1))))) + --c; + if ((char)i==c) + return irr::video::E_DRIVER_TYPE(i-1); + } + return irr::video::EDT_COUNT; +} + +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/include/fast_atof.h b/src/others/irrlicht-1.8.1/include/fast_atof.h new file mode 100644 index 0000000..7d4917a --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/fast_atof.h @@ -0,0 +1,364 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h + +#ifndef __FAST_ATOF_H_INCLUDED__ +#define __FAST_ATOF_H_INCLUDED__ + +#include "irrMath.h" +#include "irrString.h" + +namespace irr +{ +namespace core +{ + //! Selection of characters which count as decimal point in fast_atof + // TODO: This should probably also be used in irr::core::string, but the float-to-string code + // used there has to be rewritten first. + IRRLICHT_API extern irr::core::stringc LOCALE_DECIMAL_POINTS; + +// we write [17] here instead of [] to work around a swig bug +const float fast_atof_table[17] = { + 0.f, + 0.1f, + 0.01f, + 0.001f, + 0.0001f, + 0.00001f, + 0.000001f, + 0.0000001f, + 0.00000001f, + 0.000000001f, + 0.0000000001f, + 0.00000000001f, + 0.000000000001f, + 0.0000000000001f, + 0.00000000000001f, + 0.000000000000001f, + 0.0000000000000001f +}; + +//! Convert a simple string of base 10 digits into an unsigned 32 bit integer. +/** \param[in] in: The string of digits to convert. No leading chars are + allowed, only digits 0 to 9. Parsing stops at the first non-digit. + \param[out] out: (optional) If provided, it will be set to point at the + first character not used in the calculation. + \return The unsigned integer value of the digits. If the string specifies + too many digits to encode in an u32 then INT_MAX will be returned. +*/ +inline u32 strtoul10(const char* in, const char** out=0) +{ + if (!in) + { + if (out) + *out = in; + return 0; + } + + bool overflow=false; + u32 unsignedValue = 0; + while ( ( *in >= '0') && ( *in <= '9' )) + { + const u32 tmp = ( unsignedValue * 10 ) + ( *in - '0' ); + if (tmp (u32)INT_MAX) + { + if (negative) + return (s32)INT_MIN; + else + return (s32)INT_MAX; + } + else + { + if (negative) + return -((s32)unsignedValue); + else + return (s32)unsignedValue; + } +} + +//! Convert a hex-encoded character to an unsigned integer. +/** \param[in] in The digit to convert. Only digits 0 to 9 and chars A-F,a-f + will be considered. + \return The unsigned integer value of the digit. 0xffffffff if the input is + not hex +*/ +inline u32 ctoul16(char in) +{ + if (in >= '0' && in <= '9') + return in - '0'; + else if (in >= 'a' && in <= 'f') + return 10u + in - 'a'; + else if (in >= 'A' && in <= 'F') + return 10u + in - 'A'; + else + return 0xffffffff; +} + +//! Convert a simple string of base 16 digits into an unsigned 32 bit integer. +/** \param[in] in: The string of digits to convert. No leading chars are + allowed, only digits 0 to 9 and chars A-F,a-f are allowed. Parsing stops + at the first illegal char. + \param[out] out: (optional) If provided, it will be set to point at the + first character not used in the calculation. + \return The unsigned integer value of the digits. If the string specifies + too many digits to encode in an u32 then INT_MAX will be returned. +*/ +inline u32 strtoul16(const char* in, const char** out=0) +{ + if (!in) + { + if (out) + *out = in; + return 0; + } + + bool overflow=false; + u32 unsignedValue = 0; + while (true) + { + u32 tmp = 0; + if ((*in >= '0') && (*in <= '9')) + tmp = (unsignedValue << 4u) + (*in - '0'); + else if ((*in >= 'A') && (*in <= 'F')) + tmp = (unsignedValue << 4u) + (*in - 'A') + 10; + else if ((*in >= 'a') && (*in <= 'f')) + tmp = (unsignedValue << 4u) + (*in - 'a') + 10; + else + break; + if (tmp= '0') && (*in <= '7')) + tmp = (unsignedValue << 3u) + (*in - '0'); + else + break; + if (tmp= '0') && ( *in <= '9' ) ) + { + // If it looks like we're going to overflow, bail out + // now and start using floating point. + if (intValue >= MAX_SAFE_U32_VALUE) + break; + + intValue = (intValue * 10) + (*in - '0'); + ++in; + } + + f32 floatValue = (f32)intValue; + + // If there are any digits left to parse, then we need to use + // floating point arithmetic from here. + while ( ( *in >= '0') && ( *in <= '9' ) ) + { + floatValue = (floatValue * 10.f) + (f32)(*in - '0'); + ++in; + if (floatValue > FLT_MAX) // Just give up. + break; + } + + if (out) + *out = in; + + return floatValue; +} + +//! Provides a fast function for converting a string into a float. +/** This is not guaranteed to be as accurate as atof(), but is + approximately 6 to 8 times as fast. + \param[in] in The string to convert. + \param[out] result The resultant float will be written here. + \return Pointer to the first character in the string that wasn't used + to create the float value. +*/ +inline const char* fast_atof_move(const char* in, f32& result) +{ + // Please run the regression test when making any modifications to this function. + + result = 0.f; + if (!in) + return 0; + + const bool negative = ('-' == *in); + if (negative || ('+'==*in)) + ++in; + + f32 value = strtof10(in, &in); + + if ( LOCALE_DECIMAL_POINTS.findFirst(*in) >= 0 ) + { + const char* afterDecimal = ++in; + const f32 decimal = strtof10(in, &afterDecimal); + value += decimal * fast_atof_table[afterDecimal - in]; + in = afterDecimal; + } + + if ('e' == *in || 'E' == *in) + { + ++in; + // Assume that the exponent is a whole number. + // strtol10() will deal with both + and - signs, + // but calculate as f32 to prevent overflow at FLT_MAX + value *= powf(10.f, (f32)strtol10(in, &in)); + } + + result = negative?-value:value; + return in; +} + +//! Convert a string to a floating point number +/** \param floatAsString The string to convert. + \param out Optional pointer to the first character in the string that + wasn't used to create the float value. + \result Float value parsed from the input string +*/ +inline float fast_atof(const char* floatAsString, const char** out=0) +{ + float ret; + if (out) + *out=fast_atof_move(floatAsString, ret); + else + fast_atof_move(floatAsString, ret); + return ret; +} + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/heapsort.h b/src/others/irrlicht-1.8.1/include/heapsort.h new file mode 100644 index 0000000..6f87665 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/heapsort.h @@ -0,0 +1,70 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_HEAPSORT_H_INCLUDED__ +#define __IRR_HEAPSORT_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace core +{ + +//! Sinks an element into the heap. +template +inline void heapsink(T*array, s32 element, s32 max) +{ + while ((element<<1) < max) // there is a left child + { + s32 j = (element<<1); + + if (j+1 < max && array[j] < array[j+1]) + j = j+1; // take right child + + if (array[element] < array[j]) + { + T t = array[j]; // swap elements + array[j] = array[element]; + array[element] = t; + element = j; + } + else + return; + } +} + + +//! Sorts an array with size 'size' using heapsort. +template +inline void heapsort(T* array_, s32 size) +{ + // for heapsink we pretent this is not c++, where + // arrays start with index 0. So we decrease the array pointer, + // the maximum always +2 and the element always +1 + + T* virtualArray = array_ - 1; + s32 virtualSize = size + 2; + s32 i; + + // build heap + + for (i=((size-1)/2); i>=0; --i) + heapsink(virtualArray, i+1, virtualSize-1); + + // sort array, leave out the last element (0) + for (i=size-1; i>0; --i) + { + T t = array_[0]; + array_[0] = array_[i]; + array_[i] = t; + heapsink(virtualArray, 1, i + 1); + } +} + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrAllocator.h b/src/others/irrlicht-1.8.1/include/irrAllocator.h new file mode 100644 index 0000000..648c410 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrAllocator.h @@ -0,0 +1,124 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h + +#ifndef __IRR_ALLOCATOR_H_INCLUDED__ +#define __IRR_ALLOCATOR_H_INCLUDED__ + +#include "irrTypes.h" +#include +// necessary for older compilers +#include + +namespace irr +{ +namespace core +{ + +#ifdef DEBUG_CLIENTBLOCK +#undef DEBUG_CLIENTBLOCK +#define DEBUG_CLIENTBLOCK new +#endif + +//! Very simple allocator implementation, containers using it can be used across dll boundaries +template +class irrAllocator +{ +public: + + //! Destructor + virtual ~irrAllocator() {} + + //! Allocate memory for an array of objects + T* allocate(size_t cnt) + { + return (T*)internal_new(cnt* sizeof(T)); + } + + //! Deallocate memory for an array of objects + void deallocate(T* ptr) + { + internal_delete(ptr); + } + + //! Construct an element + void construct(T* ptr, const T&e) + { + new ((void*)ptr) T(e); + } + + //! Destruct an element + void destruct(T* ptr) + { + ptr->~T(); + } + +protected: + + virtual void* internal_new(size_t cnt) + { + return operator new(cnt); + } + + virtual void internal_delete(void* ptr) + { + operator delete(ptr); + } + +}; + + +//! Fast allocator, only to be used in containers inside the same memory heap. +/** Containers using it are NOT able to be used it across dll boundaries. Use this +when using in an internal class or function or when compiled into a static lib */ +template +class irrAllocatorFast +{ +public: + + //! Allocate memory for an array of objects + T* allocate(size_t cnt) + { + return (T*)operator new(cnt* sizeof(T)); + } + + //! Deallocate memory for an array of objects + void deallocate(T* ptr) + { + operator delete(ptr); + } + + //! Construct an element + void construct(T* ptr, const T&e) + { + new ((void*)ptr) T(e); + } + + //! Destruct an element + void destruct(T* ptr) + { + ptr->~T(); + } +}; + + + +#ifdef DEBUG_CLIENTBLOCK +#undef DEBUG_CLIENTBLOCK +#define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) +#endif + +//! defines an allocation strategy +enum eAllocStrategy +{ + ALLOC_STRATEGY_SAFE = 0, + ALLOC_STRATEGY_DOUBLE = 1, + ALLOC_STRATEGY_SQRT = 2 +}; + + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrArray.h b/src/others/irrlicht-1.8.1/include/irrArray.h new file mode 100644 index 0000000..7dab593 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrArray.h @@ -0,0 +1,627 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h + +#ifndef __IRR_ARRAY_H_INCLUDED__ +#define __IRR_ARRAY_H_INCLUDED__ + +#include "irrTypes.h" +#include "heapsort.h" +#include "irrAllocator.h" +#include "irrMath.h" + +namespace irr +{ +namespace core +{ + +//! Self reallocating template array (like stl vector) with additional features. +/** Some features are: Heap sorting, binary search methods, easier debugging. +*/ +template > +class array +{ + +public: + + //! Default constructor for empty array. + array() + : data(0), allocated(0), used(0), + strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true) + { + } + + + //! Constructs an array and allocates an initial chunk of memory. + /** \param start_count Amount of elements to pre-allocate. */ + array(u32 start_count) + : data(0), allocated(0), used(0), + strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true) + { + reallocate(start_count); + } + + + //! Copy constructor + array(const array& other) : data(0) + { + *this = other; + } + + + //! Destructor. + /** Frees allocated memory, if set_free_when_destroyed was not set to + false by the user before. */ + ~array() + { + clear(); + } + + + //! Reallocates the array, make it bigger or smaller. + /** \param new_size New size of array. + \param canShrink Specifies whether the array is reallocated even if + enough space is available. Setting this flag to false can speed up + array usage, but may use more memory than required by the data. + */ + void reallocate(u32 new_size, bool canShrink=true) + { + if (allocated==new_size) + return; + if (!canShrink && (new_size < allocated)) + return; + + T* old_data = data; + + data = allocator.allocate(new_size); //new T[new_size]; + allocated = new_size; + + // copy old data + s32 end = used < new_size ? used : new_size; + + for (s32 i=0; iused) // access violation + + if (used + 1 > allocated) + { + // this doesn't work if the element is in the same + // array. So we'll copy the element first to be sure + // we'll get no data corruption + const T e(element); + + // increase data block + u32 newAlloc; + switch ( strategy ) + { + case ALLOC_STRATEGY_DOUBLE: + newAlloc = used + 1 + (allocated < 500 ? + (allocated < 5 ? 5 : used) : used >> 2); + break; + default: + case ALLOC_STRATEGY_SAFE: + newAlloc = used + 1; + break; + } + reallocate( newAlloc); + + // move array content and construct new element + // first move end one up + for (u32 i=used; i>index; --i) + { + if (i index) + allocator.destruct(&data[index]); + allocator.construct(&data[index], e); // data[index] = e; + } + else + { + // element inserted not at end + if ( used > index ) + { + // create one new element at the end + allocator.construct(&data[used], data[used-1]); + + // move the rest of the array content + for (u32 i=used-1; i>index; --i) + { + data[i] = data[i-1]; + } + // insert the new element + data[index] = element; + } + else + { + // insert the new element to the end + allocator.construct(&data[index], element); + } + } + // set to false as we don't know if we have the comparison operators + is_sorted = false; + ++used; + } + + + //! Clears the array and deletes all allocated memory. + void clear() + { + if (free_when_destroyed) + { + for (u32 i=0; i& operator=(const array& other) + { + if (this == &other) + return *this; + strategy = other.strategy; + + if (data) + clear(); + + //if (allocated < other.allocated) + if (other.allocated == 0) + data = 0; + else + data = allocator.allocate(other.allocated); // new T[other.allocated]; + + used = other.used; + free_when_destroyed = true; + is_sorted = other.is_sorted; + allocated = other.allocated; + + for (u32 i=0; i& other) const + { + if (used != other.used) + return false; + + for (u32 i=0; i& other) const + { + return !(*this==other); + } + + + //! Direct access operator + T& operator [](u32 index) + { + _IRR_DEBUG_BREAK_IF(index>=used) // access violation + + return data[index]; + } + + + //! Direct const access operator + const T& operator [](u32 index) const + { + _IRR_DEBUG_BREAK_IF(index>=used) // access violation + + return data[index]; + } + + + //! Gets last element. + T& getLast() + { + _IRR_DEBUG_BREAK_IF(!used) // access violation + + return data[used-1]; + } + + + //! Gets last element + const T& getLast() const + { + _IRR_DEBUG_BREAK_IF(!used) // access violation + + return data[used-1]; + } + + + //! Gets a pointer to the array. + /** \return Pointer to the array. */ + T* pointer() + { + return data; + } + + + //! Gets a const pointer to the array. + /** \return Pointer to the array. */ + const T* const_pointer() const + { + return data; + } + + + //! Get number of occupied elements of the array. + /** \return Size of elements in the array which are actually occupied. */ + u32 size() const + { + return used; + } + + + //! Get amount of memory allocated. + /** \return Amount of memory allocated. The amount of bytes + allocated would be allocated_size() * sizeof(ElementTypeUsed); */ + u32 allocated_size() const + { + return allocated; + } + + + //! Check if array is empty. + /** \return True if the array is empty false if not. */ + bool empty() const + { + return used == 0; + } + + + //! Sorts the array using heapsort. + /** There is no additional memory waste and the algorithm performs + O(n*log n) in worst case. */ + void sort() + { + if (!is_sorted && used>1) + heapsort(data, used); + is_sorted = true; + } + + + //! Performs a binary search for an element, returns -1 if not found. + /** The array will be sorted before the binary search if it is not + already sorted. Caution is advised! Be careful not to call this on + unsorted const arrays, or the slower method will be used. + \param element Element to search for. + \return Position of the searched element if it was found, + otherwise -1 is returned. */ + s32 binary_search(const T& element) + { + sort(); + return binary_search(element, 0, used-1); + } + + + //! Performs a binary search for an element if possible, returns -1 if not found. + /** This method is for const arrays and so cannot call sort(), if the array is + not sorted then linear_search will be used instead. Potentially very slow! + \param element Element to search for. + \return Position of the searched element if it was found, + otherwise -1 is returned. */ + s32 binary_search(const T& element) const + { + if (is_sorted) + return binary_search(element, 0, used-1); + else + return linear_search(element); + } + + + //! Performs a binary search for an element, returns -1 if not found. + /** \param element: Element to search for. + \param left First left index + \param right Last right index. + \return Position of the searched element if it was found, otherwise -1 + is returned. */ + s32 binary_search(const T& element, s32 left, s32 right) const + { + if (!used) + return -1; + + s32 m; + + do + { + m = (left+right)>>1; + + if (element < data[m]) + right = m - 1; + else + left = m + 1; + + } while((element < data[m] || data[m] < element) && left<=right); + // this last line equals to: + // " while((element != array[m]) && left<=right);" + // but we only want to use the '<' operator. + // the same in next line, it is "(element == array[m])" + + + if (!(element < data[m]) && !(data[m] < element)) + return m; + + return -1; + } + + + //! Performs a binary search for an element, returns -1 if not found. + //! it is used for searching a multiset + /** The array will be sorted before the binary search if it is not + already sorted. + \param element Element to search for. + \param &last return lastIndex of equal elements + \return Position of the first searched element if it was found, + otherwise -1 is returned. */ + s32 binary_search_multi(const T& element, s32 &last) + { + sort(); + s32 index = binary_search(element, 0, used-1); + if ( index < 0 ) + return index; + + // The search can be somewhere in the middle of the set + // look linear previous and past the index + last = index; + + while ( index > 0 && !(element < data[index - 1]) && !(data[index - 1] < element) ) + { + index -= 1; + } + // look linear up + while ( last < (s32) used - 1 && !(element < data[last + 1]) && !(data[last + 1] < element) ) + { + last += 1; + } + + return index; + } + + + //! Finds an element in linear time, which is very slow. + /** Use binary_search for faster finding. Only works if ==operator is + implemented. + \param element Element to search for. + \return Position of the searched element if it was found, otherwise -1 + is returned. */ + s32 linear_search(const T& element) const + { + for (u32 i=0; i=0; --i) + if (data[i] == element) + return i; + + return -1; + } + + + //! Erases an element from the array. + /** May be slow, because all elements following after the erased + element have to be copied. + \param index: Index of element to be erased. */ + void erase(u32 index) + { + _IRR_DEBUG_BREAK_IF(index>=used) // access violation + + for (u32 i=index+1; i=used || count<1) + return; + if (index+count>used) + count = used-index; + + u32 i; + for (i=index; i= index+count) // not already destructed before loop + allocator.destruct(&data[i-count]); + + allocator.construct(&data[i-count], data[i]); // data[i-count] = data[i]; + + if (i >= used-count) // those which are not overwritten + allocator.destruct(&data[i]); + } + + used-= count; + } + + + //! Sets if the array is sorted + void set_sorted(bool _is_sorted) + { + is_sorted = _is_sorted; + } + + + //! Swap the content of this array container with the content of another array + /** Afterwards this object will contain the content of the other object and the other + object will contain the content of this object. + \param other Swap content with this object */ + void swap(array& other) + { + core::swap(data, other.data); + core::swap(allocated, other.allocated); + core::swap(used, other.used); + core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation + eAllocStrategy helper_strategy(strategy); // can't use core::swap with bitfields + strategy = other.strategy; + other.strategy = helper_strategy; + bool helper_free_when_destroyed(free_when_destroyed); + free_when_destroyed = other.free_when_destroyed; + other.free_when_destroyed = helper_free_when_destroyed; + bool helper_is_sorted(is_sorted); + is_sorted = other.is_sorted; + other.is_sorted = helper_is_sorted; + } + + +private: + T* data; + u32 allocated; + u32 used; + TAlloc allocator; + eAllocStrategy strategy:4; + bool free_when_destroyed:1; + bool is_sorted:1; +}; + + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrList.h b/src/others/irrlicht-1.8.1/include/irrList.h new file mode 100644 index 0000000..54eed83 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrList.h @@ -0,0 +1,416 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_LIST_H_INCLUDED__ +#define __IRR_LIST_H_INCLUDED__ + +#include "irrTypes.h" +#include "irrAllocator.h" +#include "irrMath.h" + +namespace irr +{ +namespace core +{ + + +//! Doubly linked list template. +template +class list +{ +private: + + //! List element node with pointer to previous and next element in the list. + struct SKListNode + { + SKListNode(const T& e) : Next(0), Prev(0), Element(e) {} + + SKListNode* Next; + SKListNode* Prev; + T Element; + }; + +public: + class ConstIterator; + + //! List iterator. + class Iterator + { + public: + Iterator() : Current(0) {} + + Iterator& operator ++() { Current = Current->Next; return *this; } + Iterator& operator --() { Current = Current->Prev; return *this; } + Iterator operator ++(s32) { Iterator tmp = *this; Current = Current->Next; return tmp; } + Iterator operator --(s32) { Iterator tmp = *this; Current = Current->Prev; return tmp; } + + Iterator& operator +=(s32 num) + { + if(num > 0) + { + while (num-- && this->Current != 0) ++(*this); + } + else + { + while(num++ && this->Current != 0) --(*this); + } + return *this; + } + + Iterator operator + (s32 num) const { Iterator tmp = *this; return tmp += num; } + Iterator& operator -=(s32 num) { return (*this)+=(-num); } + Iterator operator - (s32 num) const { return (*this)+ (-num); } + + bool operator ==(const Iterator& other) const { return Current == other.Current; } + bool operator !=(const Iterator& other) const { return Current != other.Current; } + bool operator ==(const ConstIterator& other) const { return Current == other.Current; } + bool operator !=(const ConstIterator& other) const { return Current != other.Current; } + + #if defined (_MSC_VER) && (_MSC_VER < 1300) + #pragma warning(disable:4284) // infix notation problem when using iterator operator -> + #endif + + T & operator * () { return Current->Element; } + T * operator ->() { return &Current->Element; } + + private: + explicit Iterator(SKListNode* begin) : Current(begin) {} + + SKListNode* Current; + + friend class list; + friend class ConstIterator; + }; + + //! List iterator for const access. + class ConstIterator + { + public: + + ConstIterator() : Current(0) {} + ConstIterator(const Iterator& iter) : Current(iter.Current) {} + + ConstIterator& operator ++() { Current = Current->Next; return *this; } + ConstIterator& operator --() { Current = Current->Prev; return *this; } + ConstIterator operator ++(s32) { ConstIterator tmp = *this; Current = Current->Next; return tmp; } + ConstIterator operator --(s32) { ConstIterator tmp = *this; Current = Current->Prev; return tmp; } + + ConstIterator& operator +=(s32 num) + { + if(num > 0) + { + while(num-- && this->Current != 0) ++(*this); + } + else + { + while(num++ && this->Current != 0) --(*this); + } + return *this; + } + + ConstIterator operator + (s32 num) const { ConstIterator tmp = *this; return tmp += num; } + ConstIterator& operator -=(s32 num) { return (*this)+=(-num); } + ConstIterator operator - (s32 num) const { return (*this)+ (-num); } + + bool operator ==(const ConstIterator& other) const { return Current == other.Current; } + bool operator !=(const ConstIterator& other) const { return Current != other.Current; } + bool operator ==(const Iterator& other) const { return Current == other.Current; } + bool operator !=(const Iterator& other) const { return Current != other.Current; } + + const T & operator * () { return Current->Element; } + const T * operator ->() { return &Current->Element; } + + ConstIterator & operator =(const Iterator & iterator) { Current = iterator.Current; return *this; } + + private: + explicit ConstIterator(SKListNode* begin) : Current(begin) {} + + SKListNode* Current; + + friend class Iterator; + friend class list; + }; + + //! Default constructor for empty list. + list() + : First(0), Last(0), Size(0) {} + + + //! Copy constructor. + list(const list& other) : First(0), Last(0), Size(0) + { + *this = other; + } + + + //! Destructor + ~list() + { + clear(); + } + + + //! Assignment operator + void operator=(const list& other) + { + if(&other == this) + { + return; + } + + clear(); + + SKListNode* node = other.First; + while(node) + { + push_back(node->Element); + node = node->Next; + } + } + + + //! Returns amount of elements in list. + /** \return Amount of elements in the list. */ + u32 size() const + { + return Size; + } + u32 getSize() const + { + return Size; + } + + + //! Clears the list, deletes all elements in the list. + /** All existing iterators of this list will be invalid. */ + void clear() + { + while(First) + { + SKListNode * next = First->Next; + allocator.destruct(First); + allocator.deallocate(First); + First = next; + } + + //First = 0; handled by loop + Last = 0; + Size = 0; + } + + + //! Checks for empty list. + /** \return True if the list is empty and false if not. */ + bool empty() const + { + return (First == 0); + } + + + //! Adds an element at the end of the list. + /** \param element Element to add to the list. */ + void push_back(const T& element) + { + SKListNode* node = allocator.allocate(1); + allocator.construct(node, element); + + ++Size; + + if (First == 0) + First = node; + + node->Prev = Last; + + if (Last != 0) + Last->Next = node; + + Last = node; + } + + + //! Adds an element at the begin of the list. + /** \param element: Element to add to the list. */ + void push_front(const T& element) + { + SKListNode* node = allocator.allocate(1); + allocator.construct(node, element); + + ++Size; + + if (First == 0) + { + Last = node; + First = node; + } + else + { + node->Next = First; + First->Prev = node; + First = node; + } + } + + + //! Gets first node. + /** \return A list iterator pointing to the beginning of the list. */ + Iterator begin() + { + return Iterator(First); + } + + + //! Gets first node. + /** \return A const list iterator pointing to the beginning of the list. */ + ConstIterator begin() const + { + return ConstIterator(First); + } + + + //! Gets end node. + /** \return List iterator pointing to null. */ + Iterator end() + { + return Iterator(0); + } + + + //! Gets end node. + /** \return Const list iterator pointing to null. */ + ConstIterator end() const + { + return ConstIterator(0); + } + + + //! Gets last element. + /** \return List iterator pointing to the last element of the list. */ + Iterator getLast() + { + return Iterator(Last); + } + + + //! Gets last element. + /** \return Const list iterator pointing to the last element of the list. */ + ConstIterator getLast() const + { + return ConstIterator(Last); + } + + + //! Inserts an element after an element. + /** \param it Iterator pointing to element after which the new element + should be inserted. + \param element The new element to be inserted into the list. + */ + void insert_after(const Iterator& it, const T& element) + { + SKListNode* node = allocator.allocate(1); + allocator.construct(node, element); + + node->Next = it.Current->Next; + + if (it.Current->Next) + it.Current->Next->Prev = node; + + node->Prev = it.Current; + it.Current->Next = node; + ++Size; + + if (it.Current == Last) + Last = node; + } + + + //! Inserts an element before an element. + /** \param it Iterator pointing to element before which the new element + should be inserted. + \param element The new element to be inserted into the list. + */ + void insert_before(const Iterator& it, const T& element) + { + SKListNode* node = allocator.allocate(1); + allocator.construct(node, element); + + node->Prev = it.Current->Prev; + + if (it.Current->Prev) + it.Current->Prev->Next = node; + + node->Next = it.Current; + it.Current->Prev = node; + ++Size; + + if (it.Current == First) + First = node; + } + + + //! Erases an element. + /** \param it Iterator pointing to the element which shall be erased. + \return Iterator pointing to next element. */ + Iterator erase(Iterator& it) + { + // suggest changing this to a const Iterator& and + // working around line: it.Current = 0 (possibly with a mutable, or just let it be garbage?) + + Iterator returnIterator(it); + ++returnIterator; + + if(it.Current == First) + { + First = it.Current->Next; + } + else + { + it.Current->Prev->Next = it.Current->Next; + } + + if(it.Current == Last) + { + Last = it.Current->Prev; + } + else + { + it.Current->Next->Prev = it.Current->Prev; + } + + allocator.destruct(it.Current); + allocator.deallocate(it.Current); + it.Current = 0; + --Size; + + return returnIterator; + } + + //! Swap the content of this list container with the content of another list + /** Afterwards this object will contain the content of the other object and the other + object will contain the content of this object. Iterators will afterwards be valid for + the swapped object. + \param other Swap content with this object */ + void swap(list& other) + { + core::swap(First, other.First); + core::swap(Last, other.Last); + core::swap(Size, other.Size); + core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation + } + + +private: + + SKListNode* First; + SKListNode* Last; + u32 Size; + irrAllocator allocator; + +}; + + +} // end namespace core +}// end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrMap.h b/src/others/irrlicht-1.8.1/include/irrMap.h new file mode 100644 index 0000000..9e9ae73 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrMap.h @@ -0,0 +1,1127 @@ +// Copyright (C) 2006-2012 by Kat'Oun +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_MAP_H_INCLUDED__ +#define __IRR_MAP_H_INCLUDED__ + +#include "irrTypes.h" +#include "irrMath.h" + +namespace irr +{ +namespace core +{ + +//! map template for associative arrays using a red-black tree +template +class map +{ + //! red/black tree for map + template + class RBTree + { + public: + + RBTree(const KeyTypeRB& k, const ValueTypeRB& v) + : LeftChild(0), RightChild(0), Parent(0), Key(k), + Value(v), IsRed(true) {} + + void setLeftChild(RBTree* p) + { + LeftChild=p; + if (p) + p->setParent(this); + } + + void setRightChild(RBTree* p) + { + RightChild=p; + if (p) + p->setParent(this); + } + + void setParent(RBTree* p) { Parent=p; } + + void setValue(const ValueTypeRB& v) { Value = v; } + + void setRed() { IsRed = true; } + void setBlack() { IsRed = false; } + + RBTree* getLeftChild() const { return LeftChild; } + RBTree* getRightChild() const { return RightChild; } + RBTree* getParent() const { return Parent; } + + const ValueTypeRB& getValue() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Value; + } + + ValueTypeRB& getValue() + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Value; + } + + const KeyTypeRB& getKey() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Key; + } + + bool isRoot() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Parent==0; + } + + bool isLeftChild() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return (Parent != 0) && (Parent->getLeftChild()==this); + } + + bool isRightChild() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return (Parent!=0) && (Parent->getRightChild()==this); + } + + bool isLeaf() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return (LeftChild==0) && (RightChild==0); + } + + unsigned int getLevel() const + { + if (isRoot()) + return 1; + else + return getParent()->getLevel() + 1; + } + + + bool isRed() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsRed; + } + + bool isBlack() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return !IsRed; + } + + private: + RBTree(); + + RBTree* LeftChild; + RBTree* RightChild; + + RBTree* Parent; + + KeyTypeRB Key; + ValueTypeRB Value; + + bool IsRed; + }; // RBTree + + public: + + typedef RBTree Node; + // We need the forwad declaration for the friend declaration + class ConstIterator; + + //! Normal Iterator + class Iterator + { + friend class ConstIterator; + public: + + Iterator() : Root(0), Cur(0) {} + + // Constructor(Node*) + Iterator(Node* root) : Root(root) + { + reset(); + } + + // Copy constructor + Iterator(const Iterator& src) : Root(src.Root), Cur(src.Cur) {} + + void reset(bool atLowest=true) + { + if (atLowest) + Cur = getMin(Root); + else + Cur = getMax(Root); + } + + bool atEnd() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Cur==0; + } + + Node* getNode() const + { + return Cur; + } + + Iterator& operator=(const Iterator& src) + { + Root = src.Root; + Cur = src.Cur; + return (*this); + } + + void operator++(int) + { + inc(); + } + + void operator--(int) + { + dec(); + } + + Node* operator->() + { + return getNode(); + } + + Node& operator*() + { + _IRR_DEBUG_BREAK_IF(atEnd()) // access violation + + return *Cur; + } + + private: + + Node* getMin(Node* n) const + { + while(n && n->getLeftChild()) + n = n->getLeftChild(); + return n; + } + + Node* getMax(Node* n) const + { + while(n && n->getRightChild()) + n = n->getRightChild(); + return n; + } + + void inc() + { + // Already at end? + if (Cur==0) + return; + + if (Cur->getRightChild()) + { + // If current node has a right child, the next higher node is the + // node with lowest key beneath the right child. + Cur = getMin(Cur->getRightChild()); + } + else if (Cur->isLeftChild()) + { + // No right child? Well if current node is a left child then + // the next higher node is the parent + Cur = Cur->getParent(); + } + else + { + // Current node neither is left child nor has a right child. + // Ie it is either right child or root + // The next higher node is the parent of the first non-right + // child (ie either a left child or the root) up in the + // hierarchy. Root's parent is 0. + while(Cur->isRightChild()) + Cur = Cur->getParent(); + Cur = Cur->getParent(); + } + } + + void dec() + { + // Already at end? + if (Cur==0) + return; + + if (Cur->getLeftChild()) + { + // If current node has a left child, the next lower node is the + // node with highest key beneath the left child. + Cur = getMax(Cur->getLeftChild()); + } + else if (Cur->isRightChild()) + { + // No left child? Well if current node is a right child then + // the next lower node is the parent + Cur = Cur->getParent(); + } + else + { + // Current node neither is right child nor has a left child. + // Ie it is either left child or root + // The next higher node is the parent of the first non-left + // child (ie either a right child or the root) up in the + // hierarchy. Root's parent is 0. + + while(Cur->isLeftChild()) + Cur = Cur->getParent(); + Cur = Cur->getParent(); + } + } + + Node* Root; + Node* Cur; + }; // Iterator + + //! Const Iterator + class ConstIterator + { + friend class Iterator; + public: + + ConstIterator() : Root(0), Cur(0) {} + + // Constructor(Node*) + ConstIterator(const Node* root) : Root(root) + { + reset(); + } + + // Copy constructor + ConstIterator(const ConstIterator& src) : Root(src.Root), Cur(src.Cur) {} + ConstIterator(const Iterator& src) : Root(src.Root), Cur(src.Cur) {} + + void reset(bool atLowest=true) + { + if (atLowest) + Cur = getMin(Root); + else + Cur = getMax(Root); + } + + bool atEnd() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Cur==0; + } + + const Node* getNode() const + { + return Cur; + } + + ConstIterator& operator=(const ConstIterator& src) + { + Root = src.Root; + Cur = src.Cur; + return (*this); + } + + void operator++(int) + { + inc(); + } + + void operator--(int) + { + dec(); + } + + const Node* operator->() + { + return getNode(); + } + + const Node& operator*() + { + _IRR_DEBUG_BREAK_IF(atEnd()) // access violation + + return *Cur; + } + + private: + + const Node* getMin(const Node* n) const + { + while(n && n->getLeftChild()) + n = n->getLeftChild(); + return n; + } + + const Node* getMax(const Node* n) const + { + while(n && n->getRightChild()) + n = n->getRightChild(); + return n; + } + + void inc() + { + // Already at end? + if (Cur==0) + return; + + if (Cur->getRightChild()) + { + // If current node has a right child, the next higher node is the + // node with lowest key beneath the right child. + Cur = getMin(Cur->getRightChild()); + } + else if (Cur->isLeftChild()) + { + // No right child? Well if current node is a left child then + // the next higher node is the parent + Cur = Cur->getParent(); + } + else + { + // Current node neither is left child nor has a right child. + // Ie it is either right child or root + // The next higher node is the parent of the first non-right + // child (ie either a left child or the root) up in the + // hierarchy. Root's parent is 0. + while(Cur->isRightChild()) + Cur = Cur->getParent(); + Cur = Cur->getParent(); + } + } + + void dec() + { + // Already at end? + if (Cur==0) + return; + + if (Cur->getLeftChild()) + { + // If current node has a left child, the next lower node is the + // node with highest key beneath the left child. + Cur = getMax(Cur->getLeftChild()); + } + else if (Cur->isRightChild()) + { + // No left child? Well if current node is a right child then + // the next lower node is the parent + Cur = Cur->getParent(); + } + else + { + // Current node neither is right child nor has a left child. + // Ie it is either left child or root + // The next higher node is the parent of the first non-left + // child (ie either a right child or the root) up in the + // hierarchy. Root's parent is 0. + + while(Cur->isLeftChild()) + Cur = Cur->getParent(); + Cur = Cur->getParent(); + } + } + + const Node* Root; + const Node* Cur; + }; // ConstIterator + + + //! Parent First Iterator. + /** Traverses the tree from top to bottom. Typical usage is + when storing the tree structure, because when reading it + later (and inserting elements) the tree structure will + be the same. */ + class ParentFirstIterator + { + public: + + ParentFirstIterator() : Root(0), Cur(0) {} + + explicit ParentFirstIterator(Node* root) : Root(root), Cur(0) + { + reset(); + } + + void reset() + { + Cur = Root; + } + + bool atEnd() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Cur==0; + } + + Node* getNode() + { + return Cur; + } + + ParentFirstIterator& operator=(const ParentFirstIterator& src) + { + Root = src.Root; + Cur = src.Cur; + return (*this); + } + + void operator++(int) + { + inc(); + } + + Node* operator -> () + { + return getNode(); + } + + Node& operator* () + { + _IRR_DEBUG_BREAK_IF(atEnd()) // access violation + + return *getNode(); + } + + private: + + void inc() + { + // Already at end? + if (Cur==0) + return; + + // First we try down to the left + if (Cur->getLeftChild()) + { + Cur = Cur->getLeftChild(); + } + else if (Cur->getRightChild()) + { + // No left child? The we go down to the right. + Cur = Cur->getRightChild(); + } + else + { + // No children? Move up in the hierarcy until + // we either reach 0 (and are finished) or + // find a right uncle. + while (Cur!=0) + { + // But if parent is left child and has a right "uncle" the parent + // has already been processed but the uncle hasn't. Move to + // the uncle. + if (Cur->isLeftChild() && Cur->getParent()->getRightChild()) + { + Cur = Cur->getParent()->getRightChild(); + return; + } + Cur = Cur->getParent(); + } + } + } + + Node* Root; + Node* Cur; + + }; // ParentFirstIterator + + + //! Parent Last Iterator + /** Traverse the tree from bottom to top. + Typical usage is when deleting all elements in the tree + because you must delete the children before you delete + their parent. */ + class ParentLastIterator + { + public: + + ParentLastIterator() : Root(0), Cur(0) {} + + explicit ParentLastIterator(Node* root) : Root(root), Cur(0) + { + reset(); + } + + void reset() + { + Cur = getMin(Root); + } + + bool atEnd() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Cur==0; + } + + Node* getNode() + { + return Cur; + } + + ParentLastIterator& operator=(const ParentLastIterator& src) + { + Root = src.Root; + Cur = src.Cur; + return (*this); + } + + void operator++(int) + { + inc(); + } + + Node* operator -> () + { + return getNode(); + } + + Node& operator* () + { + _IRR_DEBUG_BREAK_IF(atEnd()) // access violation + + return *getNode(); + } + private: + + Node* getMin(Node* n) + { + while(n!=0 && (n->getLeftChild()!=0 || n->getRightChild()!=0)) + { + if (n->getLeftChild()) + n = n->getLeftChild(); + else + n = n->getRightChild(); + } + return n; + } + + void inc() + { + // Already at end? + if (Cur==0) + return; + + // Note: Starting point is the node as far down to the left as possible. + + // If current node has an uncle to the right, go to the + // node as far down to the left from the uncle as possible + // else just go up a level to the parent. + if (Cur->isLeftChild() && Cur->getParent()->getRightChild()) + { + Cur = getMin(Cur->getParent()->getRightChild()); + } + else + Cur = Cur->getParent(); + } + + Node* Root; + Node* Cur; + }; // ParentLastIterator + + + // AccessClass is a temporary class used with the [] operator. + // It makes it possible to have different behavior in situations like: + // myTree["Foo"] = 32; + // If "Foo" already exists update its value else insert a new element. + // int i = myTree["Foo"] + // If "Foo" exists return its value. + class AccessClass + { + // Let map be the only one who can instantiate this class. + friend class map; + + public: + + // Assignment operator. Handles the myTree["Foo"] = 32; situation + void operator=(const ValueType& value) + { + // Just use the Set method, it handles already exist/not exist situation + Tree.set(Key,value); + } + + // ValueType operator + operator ValueType() + { + Node* node = Tree.find(Key); + + // Not found + _IRR_DEBUG_BREAK_IF(node==0) // access violation + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return node->getValue(); + } + + private: + + AccessClass(map& tree, const KeyType& key) : Tree(tree), Key(key) {} + + AccessClass(); + + map& Tree; + const KeyType& Key; + }; // AccessClass + + + // Constructor. + map() : Root(0), Size(0) {} + + // Destructor + ~map() + { + clear(); + } + + //------------------------------ + // Public Commands + //------------------------------ + + //! Inserts a new node into the tree + /** \param keyNew: the index for this value + \param v: the value to insert + \return True if successful, false if it fails (already exists) */ + bool insert(const KeyType& keyNew, const ValueType& v) + { + // First insert node the "usual" way (no fancy balance logic yet) + Node* newNode = new Node(keyNew,v); + if (!insert(newNode)) + { + delete newNode; + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + // Then attend a balancing party + while (!newNode->isRoot() && (newNode->getParent()->isRed())) + { + if (newNode->getParent()->isLeftChild()) + { + // If newNode is a left child, get its right 'uncle' + Node* newNodesUncle = newNode->getParent()->getParent()->getRightChild(); + if ( newNodesUncle!=0 && newNodesUncle->isRed()) + { + // case 1 - change the colors + newNode->getParent()->setBlack(); + newNodesUncle->setBlack(); + newNode->getParent()->getParent()->setRed(); + // Move newNode up the tree + newNode = newNode->getParent()->getParent(); + } + else + { + // newNodesUncle is a black node + if ( newNode->isRightChild()) + { + // and newNode is to the right + // case 2 - move newNode up and rotate + newNode = newNode->getParent(); + rotateLeft(newNode); + } + // case 3 + newNode->getParent()->setBlack(); + newNode->getParent()->getParent()->setRed(); + rotateRight(newNode->getParent()->getParent()); + } + } + else + { + // If newNode is a right child, get its left 'uncle' + Node* newNodesUncle = newNode->getParent()->getParent()->getLeftChild(); + if ( newNodesUncle!=0 && newNodesUncle->isRed()) + { + // case 1 - change the colors + newNode->getParent()->setBlack(); + newNodesUncle->setBlack(); + newNode->getParent()->getParent()->setRed(); + // Move newNode up the tree + newNode = newNode->getParent()->getParent(); + } + else + { + // newNodesUncle is a black node + if (newNode->isLeftChild()) + { + // and newNode is to the left + // case 2 - move newNode up and rotate + newNode = newNode->getParent(); + rotateRight(newNode); + } + // case 3 + newNode->getParent()->setBlack(); + newNode->getParent()->getParent()->setRed(); + rotateLeft(newNode->getParent()->getParent()); + } + + } + } + // Color the root black + Root->setBlack(); + return true; + } + + //! Replaces the value if the key already exists, otherwise inserts a new element. + /** \param k The index for this value + \param v The new value of */ + void set(const KeyType& k, const ValueType& v) + { + Node* p = find(k); + if (p) + p->setValue(v); + else + insert(k,v); + } + + //! Removes a node from the tree and returns it. + /** The returned node must be deleted by the user + \param k the key to remove + \return A pointer to the node, or 0 if not found */ + Node* delink(const KeyType& k) + { + Node* p = find(k); + if (p == 0) + return 0; + + // Rotate p down to the left until it has no right child, will get there + // sooner or later. + while(p->getRightChild()) + { + // "Pull up my right child and let it knock me down to the left" + rotateLeft(p); + } + // p now has no right child but might have a left child + Node* left = p->getLeftChild(); + + // Let p's parent point to p's child instead of point to p + if (p->isLeftChild()) + p->getParent()->setLeftChild(left); + + else if (p->isRightChild()) + p->getParent()->setRightChild(left); + + else + { + // p has no parent => p is the root. + // Let the left child be the new root. + setRoot(left); + } + + // p is now gone from the tree in the sense that + // no one is pointing at it, so return it. + + --Size; + return p; + } + + //! Removes a node from the tree and deletes it. + /** \return True if the node was found and deleted */ + bool remove(const KeyType& k) + { + Node* p = find(k); + return remove(p); + } + + //! Removes a node from the tree and deletes it. + /** \return True if the node was found and deleted */ + bool remove(Node* p) + { + if (p == 0) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + // Rotate p down to the left until it has no right child, will get there + // sooner or later. + while(p->getRightChild()) + { + // "Pull up my right child and let it knock me down to the left" + rotateLeft(p); + } + // p now has no right child but might have a left child + Node* left = p->getLeftChild(); + + // Let p's parent point to p's child instead of point to p + if (p->isLeftChild()) + p->getParent()->setLeftChild(left); + + else if (p->isRightChild()) + p->getParent()->setRightChild(left); + + else + { + // p has no parent => p is the root. + // Let the left child be the new root. + setRoot(left); + } + + // p is now gone from the tree in the sense that + // no one is pointing at it. Let's get rid of it. + delete p; + + --Size; + return true; + } + + //! Clear the entire tree + void clear() + { + ParentLastIterator i(getParentLastIterator()); + + while(!i.atEnd()) + { + Node* p = i.getNode(); + i++; // Increment it before it is deleted + // else iterator will get quite confused. + delete p; + } + Root = 0; + Size= 0; + } + + //! Is the tree empty? + //! \return Returns true if empty, false if not + bool empty() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Root == 0; + } + + //! \deprecated Use empty() instead. This method may be removed by Irrlicht 1.9 + _IRR_DEPRECATED_ bool isEmpty() const + { + return empty(); + } + + //! Search for a node with the specified key. + //! \param keyToFind: The key to find + //! \return Returns 0 if node couldn't be found. + Node* find(const KeyType& keyToFind) const + { + Node* pNode = Root; + + while(pNode!=0) + { + const KeyType& key=pNode->getKey(); + + if (keyToFind == key) + return pNode; + else if (keyToFind < key) + pNode = pNode->getLeftChild(); + else //keyToFind > key + pNode = pNode->getRightChild(); + } + + return 0; + } + + //! Gets the root element. + //! \return Returns a pointer to the root node, or + //! 0 if the tree is empty. + Node* getRoot() const + { + return Root; + } + + //! Returns the number of nodes in the tree. + u32 size() const + { + return Size; + } + + //! Swap the content of this map container with the content of another map + /** Afterwards this object will contain the content of the other object and the other + object will contain the content of this object. Iterators will afterwards be valid for + the swapped object. + \param other Swap content with this object */ + void swap(map& other) + { + core::swap(Root, other.Root); + core::swap(Size, other.Size); + } + + //------------------------------ + // Public Iterators + //------------------------------ + + //! Returns an iterator + Iterator getIterator() const + { + Iterator it(getRoot()); + return it; + } + + //! Returns a Constiterator + ConstIterator getConstIterator() const + { + Iterator it(getRoot()); + return it; + } + + //! Returns a ParentFirstIterator. + //! Traverses the tree from top to bottom. Typical usage is + //! when storing the tree structure, because when reading it + //! later (and inserting elements) the tree structure will + //! be the same. + ParentFirstIterator getParentFirstIterator() const + { + ParentFirstIterator it(getRoot()); + return it; + } + + //! Returns a ParentLastIterator to traverse the tree from + //! bottom to top. + //! Typical usage is when deleting all elements in the tree + //! because you must delete the children before you delete + //! their parent. + ParentLastIterator getParentLastIterator() const + { + ParentLastIterator it(getRoot()); + return it; + } + + //------------------------------ + // Public Operators + //------------------------------ + + //! operator [] for access to elements + /** for example myMap["key"] */ + AccessClass operator[](const KeyType& k) + { + return AccessClass(*this, k); + } + private: + + //------------------------------ + // Disabled methods + //------------------------------ + // Copy constructor and assignment operator deliberately + // defined but not implemented. The tree should never be + // copied, pass along references to it instead. + explicit map(const map& src); + map& operator = (const map& src); + + //! Set node as new root. + /** The node will be set to black, otherwise core dumps may arise + (patch provided by rogerborg). + \param newRoot Node which will be the new root + */ + void setRoot(Node* newRoot) + { + Root = newRoot; + if (Root != 0) + { + Root->setParent(0); + Root->setBlack(); + } + } + + //! Insert a node into the tree without using any fancy balancing logic. + /** \return false if that key already exist in the tree. */ + bool insert(Node* newNode) + { + bool result=true; // Assume success + + if (Root==0) + { + setRoot(newNode); + Size = 1; + } + else + { + Node* pNode = Root; + const KeyType& keyNew = newNode->getKey(); + while (pNode) + { + const KeyType& key=pNode->getKey(); + + if (keyNew == key) + { + result = false; + pNode = 0; + } + else if (keyNew < key) + { + if (pNode->getLeftChild() == 0) + { + pNode->setLeftChild(newNode); + pNode = 0; + } + else + pNode = pNode->getLeftChild(); + } + else // keyNew > key + { + if (pNode->getRightChild()==0) + { + pNode->setRightChild(newNode); + pNode = 0; + } + else + { + pNode = pNode->getRightChild(); + } + } + } + + if (result) + ++Size; + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return result; + } + + //! Rotate left. + //! Pull up node's right child and let it knock node down to the left + void rotateLeft(Node* p) + { + Node* right = p->getRightChild(); + + p->setRightChild(right->getLeftChild()); + + if (p->isLeftChild()) + p->getParent()->setLeftChild(right); + else if (p->isRightChild()) + p->getParent()->setRightChild(right); + else + setRoot(right); + + right->setLeftChild(p); + } + + //! Rotate right. + //! Pull up node's left child and let it knock node down to the right + void rotateRight(Node* p) + { + Node* left = p->getLeftChild(); + + p->setLeftChild(left->getRightChild()); + + if (p->isLeftChild()) + p->getParent()->setLeftChild(left); + else if (p->isRightChild()) + p->getParent()->setRightChild(left); + else + setRoot(left); + + left->setRightChild(p); + } + + //------------------------------ + // Private Members + //------------------------------ + Node* Root; // The top node. 0 if empty. + u32 Size; // Number of nodes in the tree +}; + +} // end namespace core +} // end namespace irr + +#endif // __IRR_MAP_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/irrMath.h b/src/others/irrlicht-1.8.1/include/irrMath.h new file mode 100644 index 0000000..3852932 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrMath.h @@ -0,0 +1,732 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_MATH_H_INCLUDED__ +#define __IRR_MATH_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#include "irrTypes.h" +#include +#include +#include // for abs() etc. +#include // For INT_MAX / UINT_MAX + +#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) || defined (_WIN32_WCE) + #define sqrtf(X) (irr::f32)sqrt((irr::f64)(X)) + #define sinf(X) (irr::f32)sin((irr::f64)(X)) + #define cosf(X) (irr::f32)cos((irr::f64)(X)) + #define asinf(X) (irr::f32)asin((irr::f64)(X)) + #define acosf(X) (irr::f32)acos((irr::f64)(X)) + #define atan2f(X,Y) (irr::f32)atan2((irr::f64)(X),(irr::f64)(Y)) + #define ceilf(X) (irr::f32)ceil((irr::f64)(X)) + #define floorf(X) (irr::f32)floor((irr::f64)(X)) + #define powf(X,Y) (irr::f32)pow((irr::f64)(X),(irr::f64)(Y)) + #define fmodf(X,Y) (irr::f32)fmod((irr::f64)(X),(irr::f64)(Y)) + #define fabsf(X) (irr::f32)fabs((irr::f64)(X)) + #define logf(X) (irr::f32)log((irr::f64)(X)) +#endif + +#ifndef FLT_MAX +#define FLT_MAX 3.402823466E+38F +#endif + +#ifndef FLT_MIN +#define FLT_MIN 1.17549435e-38F +#endif + +namespace irr +{ +namespace core +{ + + //! Rounding error constant often used when comparing f32 values. + + const s32 ROUNDING_ERROR_S32 = 0; +#ifdef __IRR_HAS_S64 + const s64 ROUNDING_ERROR_S64 = 0; +#endif + const f32 ROUNDING_ERROR_f32 = 0.000001f; + const f64 ROUNDING_ERROR_f64 = 0.00000001; + +#ifdef PI // make sure we don't collide with a define +#undef PI +#endif + //! Constant for PI. + const f32 PI = 3.14159265359f; + + //! Constant for reciprocal of PI. + const f32 RECIPROCAL_PI = 1.0f/PI; + + //! Constant for half of PI. + const f32 HALF_PI = PI/2.0f; + +#ifdef PI64 // make sure we don't collide with a define +#undef PI64 +#endif + //! Constant for 64bit PI. + const f64 PI64 = 3.1415926535897932384626433832795028841971693993751; + + //! Constant for 64bit reciprocal of PI. + const f64 RECIPROCAL_PI64 = 1.0/PI64; + + //! 32bit Constant for converting from degrees to radians + const f32 DEGTORAD = PI / 180.0f; + + //! 32bit constant for converting from radians to degrees (formally known as GRAD_PI) + const f32 RADTODEG = 180.0f / PI; + + //! 64bit constant for converting from degrees to radians (formally known as GRAD_PI2) + const f64 DEGTORAD64 = PI64 / 180.0; + + //! 64bit constant for converting from radians to degrees + const f64 RADTODEG64 = 180.0 / PI64; + + //! Utility function to convert a radian value to degrees + /** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X + \param radians The radians value to convert to degrees. + */ + inline f32 radToDeg(f32 radians) + { + return RADTODEG * radians; + } + + //! Utility function to convert a radian value to degrees + /** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X + \param radians The radians value to convert to degrees. + */ + inline f64 radToDeg(f64 radians) + { + return RADTODEG64 * radians; + } + + //! Utility function to convert a degrees value to radians + /** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X + \param degrees The degrees value to convert to radians. + */ + inline f32 degToRad(f32 degrees) + { + return DEGTORAD * degrees; + } + + //! Utility function to convert a degrees value to radians + /** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X + \param degrees The degrees value to convert to radians. + */ + inline f64 degToRad(f64 degrees) + { + return DEGTORAD64 * degrees; + } + + //! returns minimum of two values. Own implementation to get rid of the STL (VS6 problems) + template + inline const T& min_(const T& a, const T& b) + { + return a < b ? a : b; + } + + //! returns minimum of three values. Own implementation to get rid of the STL (VS6 problems) + template + inline const T& min_(const T& a, const T& b, const T& c) + { + return a < b ? min_(a, c) : min_(b, c); + } + + //! returns maximum of two values. Own implementation to get rid of the STL (VS6 problems) + template + inline const T& max_(const T& a, const T& b) + { + return a < b ? b : a; + } + + //! returns maximum of three values. Own implementation to get rid of the STL (VS6 problems) + template + inline const T& max_(const T& a, const T& b, const T& c) + { + return a < b ? max_(b, c) : max_(a, c); + } + + //! returns abs of two values. Own implementation to get rid of STL (VS6 problems) + template + inline T abs_(const T& a) + { + return a < (T)0 ? -a : a; + } + + //! returns linear interpolation of a and b with ratio t + //! \return: a if t==0, b if t==1, and the linear interpolation else + template + inline T lerp(const T& a, const T& b, const f32 t) + { + return (T)(a*(1.f-t)) + (b*t); + } + + //! clamps a value between low and high + template + inline const T clamp (const T& value, const T& low, const T& high) + { + return min_ (max_(value,low), high); + } + + //! swaps the content of the passed parameters + // Note: We use the same trick as boost and use two template arguments to + // avoid ambiguity when swapping objects of an Irrlicht type that has not + // it's own swap overload. Otherwise we get conflicts with some compilers + // in combination with stl. + template + inline void swap(T1& a, T2& b) + { + T1 c(a); + a = b; + b = c; + } + + //! returns if a equals b, taking possible rounding errors into account + inline bool equals(const f64 a, const f64 b, const f64 tolerance = ROUNDING_ERROR_f64) + { + return (a + tolerance >= b) && (a - tolerance <= b); + } + + //! returns if a equals b, taking possible rounding errors into account + inline bool equals(const f32 a, const f32 b, const f32 tolerance = ROUNDING_ERROR_f32) + { + return (a + tolerance >= b) && (a - tolerance <= b); + } + + union FloatIntUnion32 + { + FloatIntUnion32(float f1 = 0.0f) : f(f1) {} + // Portable sign-extraction + bool sign() const { return (i >> 31) != 0; } + + irr::s32 i; + irr::f32 f; + }; + + //! We compare the difference in ULP's (spacing between floating-point numbers, aka ULP=1 means there exists no float between). + //\result true when numbers have a ULP <= maxUlpDiff AND have the same sign. + inline bool equalsByUlp(f32 a, f32 b, int maxUlpDiff) + { + // Based on the ideas and code from Bruce Dawson on + // http://www.altdevblogaday.com/2012/02/22/comparing-floating-point-numbers-2012-edition/ + // When floats are interpreted as integers the two nearest possible float numbers differ just + // by one integer number. Also works the other way round, an integer of 1 interpreted as float + // is for example the smallest possible float number. + + FloatIntUnion32 fa(a); + FloatIntUnion32 fb(b); + + // Different signs, we could maybe get difference to 0, but so close to 0 using epsilons is better. + if ( fa.sign() != fb.sign() ) + { + // Check for equality to make sure +0==-0 + if (fa.i == fb.i) + return true; + return false; + } + + // Find the difference in ULPs. + int ulpsDiff = abs_(fa.i- fb.i); + if (ulpsDiff <= maxUlpDiff) + return true; + + return false; + } + +#if 0 + //! returns if a equals b, not using any rounding tolerance + inline bool equals(const s32 a, const s32 b) + { + return (a == b); + } + + //! returns if a equals b, not using any rounding tolerance + inline bool equals(const u32 a, const u32 b) + { + return (a == b); + } +#endif + //! returns if a equals b, taking an explicit rounding tolerance into account + inline bool equals(const s32 a, const s32 b, const s32 tolerance = ROUNDING_ERROR_S32) + { + return (a + tolerance >= b) && (a - tolerance <= b); + } + + //! returns if a equals b, taking an explicit rounding tolerance into account + inline bool equals(const u32 a, const u32 b, const s32 tolerance = ROUNDING_ERROR_S32) + { + return (a + tolerance >= b) && (a - tolerance <= b); + } + +#ifdef __IRR_HAS_S64 + //! returns if a equals b, taking an explicit rounding tolerance into account + inline bool equals(const s64 a, const s64 b, const s64 tolerance = ROUNDING_ERROR_S64) + { + return (a + tolerance >= b) && (a - tolerance <= b); + } +#endif + + //! returns if a equals zero, taking rounding errors into account + inline bool iszero(const f64 a, const f64 tolerance = ROUNDING_ERROR_f64) + { + return fabs(a) <= tolerance; + } + + //! returns if a equals zero, taking rounding errors into account + inline bool iszero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32) + { + return fabsf(a) <= tolerance; + } + + //! returns if a equals not zero, taking rounding errors into account + inline bool isnotzero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32) + { + return fabsf(a) > tolerance; + } + + //! returns if a equals zero, taking rounding errors into account + inline bool iszero(const s32 a, const s32 tolerance = 0) + { + return ( a & 0x7ffffff ) <= tolerance; + } + + //! returns if a equals zero, taking rounding errors into account + inline bool iszero(const u32 a, const u32 tolerance = 0) + { + return a <= tolerance; + } + +#ifdef __IRR_HAS_S64 + //! returns if a equals zero, taking rounding errors into account + inline bool iszero(const s64 a, const s64 tolerance = 0) + { + return abs_(a) <= tolerance; + } +#endif + + inline s32 s32_min(s32 a, s32 b) + { + const s32 mask = (a - b) >> 31; + return (a & mask) | (b & ~mask); + } + + inline s32 s32_max(s32 a, s32 b) + { + const s32 mask = (a - b) >> 31; + return (b & mask) | (a & ~mask); + } + + inline s32 s32_clamp (s32 value, s32 low, s32 high) + { + return s32_min(s32_max(value,low), high); + } + + /* + float IEEE-754 bit represenation + + 0 0x00000000 + 1.0 0x3f800000 + 0.5 0x3f000000 + 3 0x40400000 + +inf 0x7f800000 + -inf 0xff800000 + +NaN 0x7fc00000 or 0x7ff00000 + in general: number = (sign ? -1:1) * 2^(exponent) * 1.(mantissa bits) + */ + + typedef union { u32 u; s32 s; f32 f; } inttofloat; + + #define F32_AS_S32(f) (*((s32 *) &(f))) + #define F32_AS_U32(f) (*((u32 *) &(f))) + #define F32_AS_U32_POINTER(f) ( ((u32 *) &(f))) + + #define F32_VALUE_0 0x00000000 + #define F32_VALUE_1 0x3f800000 + #define F32_SIGN_BIT 0x80000000U + #define F32_EXPON_MANTISSA 0x7FFFFFFFU + + //! code is taken from IceFPU + //! Integer representation of a floating-point value. +#ifdef IRRLICHT_FAST_MATH + #define IR(x) ((u32&)(x)) +#else + inline u32 IR(f32 x) {inttofloat tmp; tmp.f=x; return tmp.u;} +#endif + + //! Absolute integer representation of a floating-point value + #define AIR(x) (IR(x)&0x7fffffff) + + //! Floating-point representation of an integer value. +#ifdef IRRLICHT_FAST_MATH + #define FR(x) ((f32&)(x)) +#else + inline f32 FR(u32 x) {inttofloat tmp; tmp.u=x; return tmp.f;} + inline f32 FR(s32 x) {inttofloat tmp; tmp.s=x; return tmp.f;} +#endif + + //! integer representation of 1.0 + #define IEEE_1_0 0x3f800000 + //! integer representation of 255.0 + #define IEEE_255_0 0x437f0000 + +#ifdef IRRLICHT_FAST_MATH + #define F32_LOWER_0(f) (F32_AS_U32(f) > F32_SIGN_BIT) + #define F32_LOWER_EQUAL_0(f) (F32_AS_S32(f) <= F32_VALUE_0) + #define F32_GREATER_0(f) (F32_AS_S32(f) > F32_VALUE_0) + #define F32_GREATER_EQUAL_0(f) (F32_AS_U32(f) <= F32_SIGN_BIT) + #define F32_EQUAL_1(f) (F32_AS_U32(f) == F32_VALUE_1) + #define F32_EQUAL_0(f) ( (F32_AS_U32(f) & F32_EXPON_MANTISSA ) == F32_VALUE_0) + + // only same sign + #define F32_A_GREATER_B(a,b) (F32_AS_S32((a)) > F32_AS_S32((b))) + +#else + + #define F32_LOWER_0(n) ((n) < 0.0f) + #define F32_LOWER_EQUAL_0(n) ((n) <= 0.0f) + #define F32_GREATER_0(n) ((n) > 0.0f) + #define F32_GREATER_EQUAL_0(n) ((n) >= 0.0f) + #define F32_EQUAL_1(n) ((n) == 1.0f) + #define F32_EQUAL_0(n) ((n) == 0.0f) + #define F32_A_GREATER_B(a,b) ((a) > (b)) +#endif + + +#ifndef REALINLINE + #ifdef _MSC_VER + #define REALINLINE __forceinline + #else + #define REALINLINE inline + #endif +#endif + +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) + + // 8-bit bools in borland builder + + //! conditional set based on mask and arithmetic shift + REALINLINE u32 if_c_a_else_b ( const c8 condition, const u32 a, const u32 b ) + { + return ( ( -condition >> 7 ) & ( a ^ b ) ) ^ b; + } + + //! conditional set based on mask and arithmetic shift + REALINLINE u32 if_c_a_else_0 ( const c8 condition, const u32 a ) + { + return ( -condition >> 31 ) & a; + } +#else + + //! conditional set based on mask and arithmetic shift + REALINLINE u32 if_c_a_else_b ( const s32 condition, const u32 a, const u32 b ) + { + return ( ( -condition >> 31 ) & ( a ^ b ) ) ^ b; + } + + //! conditional set based on mask and arithmetic shift + REALINLINE u16 if_c_a_else_b ( const s16 condition, const u16 a, const u16 b ) + { + return ( ( -condition >> 15 ) & ( a ^ b ) ) ^ b; + } + + //! conditional set based on mask and arithmetic shift + REALINLINE u32 if_c_a_else_0 ( const s32 condition, const u32 a ) + { + return ( -condition >> 31 ) & a; + } +#endif + + /* + if (condition) state |= m; else state &= ~m; + */ + REALINLINE void setbit_cond ( u32 &state, s32 condition, u32 mask ) + { + // 0, or any postive to mask + //s32 conmask = -condition >> 31; + state ^= ( ( -condition >> 31 ) ^ state ) & mask; + } + + inline f32 round_( f32 x ) + { + return floorf( x + 0.5f ); + } + + REALINLINE void clearFPUException () + { +#ifdef IRRLICHT_FAST_MATH + return; +#ifdef feclearexcept + feclearexcept(FE_ALL_EXCEPT); +#elif defined(_MSC_VER) + __asm fnclex; +#elif defined(__GNUC__) && defined(__x86__) + __asm__ __volatile__ ("fclex \n\t"); +#else +# warn clearFPUException not supported. +#endif +#endif + } + + // calculate: sqrt ( x ) + REALINLINE f32 squareroot(const f32 f) + { + return sqrtf(f); + } + + // calculate: sqrt ( x ) + REALINLINE f64 squareroot(const f64 f) + { + return sqrt(f); + } + + // calculate: sqrt ( x ) + REALINLINE s32 squareroot(const s32 f) + { + return static_cast(squareroot(static_cast(f))); + } + +#ifdef __IRR_HAS_S64 + // calculate: sqrt ( x ) + REALINLINE s64 squareroot(const s64 f) + { + return static_cast(squareroot(static_cast(f))); + } +#endif + + // calculate: 1 / sqrt ( x ) + REALINLINE f64 reciprocal_squareroot(const f64 x) + { + return 1.0 / sqrt(x); + } + + // calculate: 1 / sqrtf ( x ) + REALINLINE f32 reciprocal_squareroot(const f32 f) + { +#if defined ( IRRLICHT_FAST_MATH ) + #if defined(_MSC_VER) + // SSE reciprocal square root estimate, accurate to 12 significant + // bits of the mantissa + f32 recsqrt; + __asm rsqrtss xmm0, f // xmm0 = rsqrtss(f) + __asm movss recsqrt, xmm0 // return xmm0 + return recsqrt; + +/* + // comes from Nvidia + u32 tmp = (u32(IEEE_1_0 << 1) + IEEE_1_0 - *(u32*)&x) >> 1; + f32 y = *(f32*)&tmp; + return y * (1.47f - 0.47f * x * y * y); +*/ + #else + return 1.f / sqrtf(f); + #endif +#else // no fast math + return 1.f / sqrtf(f); +#endif + } + + // calculate: 1 / sqrtf( x ) + REALINLINE s32 reciprocal_squareroot(const s32 x) + { + return static_cast(reciprocal_squareroot(static_cast(x))); + } + + // calculate: 1 / x + REALINLINE f32 reciprocal( const f32 f ) + { +#if defined (IRRLICHT_FAST_MATH) + + // SSE Newton-Raphson reciprocal estimate, accurate to 23 significant + // bi ts of the mantissa + // One Newtown-Raphson Iteration: + // f(i+1) = 2 * rcpss(f) - f * rcpss(f) * rcpss(f) + f32 rec; + __asm rcpss xmm0, f // xmm0 = rcpss(f) + __asm movss xmm1, f // xmm1 = f + __asm mulss xmm1, xmm0 // xmm1 = f * rcpss(f) + __asm mulss xmm1, xmm0 // xmm2 = f * rcpss(f) * rcpss(f) + __asm addss xmm0, xmm0 // xmm0 = 2 * rcpss(f) + __asm subss xmm0, xmm1 // xmm0 = 2 * rcpss(f) + // - f * rcpss(f) * rcpss(f) + __asm movss rec, xmm0 // return xmm0 + return rec; + + + //! i do not divide through 0.. (fpu expection) + // instead set f to a high value to get a return value near zero.. + // -1000000000000.f.. is use minus to stay negative.. + // must test's here (plane.normal dot anything ) checks on <= 0.f + //u32 x = (-(AIR(f) != 0 ) >> 31 ) & ( IR(f) ^ 0xd368d4a5 ) ^ 0xd368d4a5; + //return 1.f / FR ( x ); + +#else // no fast math + return 1.f / f; +#endif + } + + // calculate: 1 / x + REALINLINE f64 reciprocal ( const f64 f ) + { + return 1.0 / f; + } + + + // calculate: 1 / x, low precision allowed + REALINLINE f32 reciprocal_approxim ( const f32 f ) + { +#if defined( IRRLICHT_FAST_MATH) + + // SSE Newton-Raphson reciprocal estimate, accurate to 23 significant + // bi ts of the mantissa + // One Newtown-Raphson Iteration: + // f(i+1) = 2 * rcpss(f) - f * rcpss(f) * rcpss(f) + f32 rec; + __asm rcpss xmm0, f // xmm0 = rcpss(f) + __asm movss xmm1, f // xmm1 = f + __asm mulss xmm1, xmm0 // xmm1 = f * rcpss(f) + __asm mulss xmm1, xmm0 // xmm2 = f * rcpss(f) * rcpss(f) + __asm addss xmm0, xmm0 // xmm0 = 2 * rcpss(f) + __asm subss xmm0, xmm1 // xmm0 = 2 * rcpss(f) + // - f * rcpss(f) * rcpss(f) + __asm movss rec, xmm0 // return xmm0 + return rec; + + +/* + // SSE reciprocal estimate, accurate to 12 significant bits of + f32 rec; + __asm rcpss xmm0, f // xmm0 = rcpss(f) + __asm movss rec , xmm0 // return xmm0 + return rec; +*/ +/* + register u32 x = 0x7F000000 - IR ( p ); + const f32 r = FR ( x ); + return r * (2.0f - p * r); +*/ +#else // no fast math + return 1.f / f; +#endif + } + + + REALINLINE s32 floor32(f32 x) + { +#ifdef IRRLICHT_FAST_MATH + const f32 h = 0.5f; + + s32 t; + +#if defined(_MSC_VER) + __asm + { + fld x + fsub h + fistp t + } +#elif defined(__GNUC__) + __asm__ __volatile__ ( + "fsub %2 \n\t" + "fistpl %0" + : "=m" (t) + : "t" (x), "f" (h) + : "st" + ); +#else +# warn IRRLICHT_FAST_MATH not supported. + return (s32) floorf ( x ); +#endif + return t; +#else // no fast math + return (s32) floorf ( x ); +#endif + } + + + REALINLINE s32 ceil32 ( f32 x ) + { +#ifdef IRRLICHT_FAST_MATH + const f32 h = 0.5f; + + s32 t; + +#if defined(_MSC_VER) + __asm + { + fld x + fadd h + fistp t + } +#elif defined(__GNUC__) + __asm__ __volatile__ ( + "fadd %2 \n\t" + "fistpl %0 \n\t" + : "=m"(t) + : "t"(x), "f"(h) + : "st" + ); +#else +# warn IRRLICHT_FAST_MATH not supported. + return (s32) ceilf ( x ); +#endif + return t; +#else // not fast math + return (s32) ceilf ( x ); +#endif + } + + + + REALINLINE s32 round32(f32 x) + { +#if defined(IRRLICHT_FAST_MATH) + s32 t; + +#if defined(_MSC_VER) + __asm + { + fld x + fistp t + } +#elif defined(__GNUC__) + __asm__ __volatile__ ( + "fistpl %0 \n\t" + : "=m"(t) + : "t"(x) + : "st" + ); +#else +# warn IRRLICHT_FAST_MATH not supported. + return (s32) round_(x); +#endif + return t; +#else // no fast math + return (s32) round_(x); +#endif + } + + inline f32 f32_max3(const f32 a, const f32 b, const f32 c) + { + return a > b ? (a > c ? a : c) : (b > c ? b : c); + } + + inline f32 f32_min3(const f32 a, const f32 b, const f32 c) + { + return a < b ? (a < c ? a : c) : (b < c ? b : c); + } + + inline f32 fract ( f32 x ) + { + return x - floorf ( x ); + } + +} // end namespace core +} // end namespace irr + +#ifndef IRRLICHT_FAST_MATH + using irr::core::IR; + using irr::core::FR; +#endif + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrString.h b/src/others/irrlicht-1.8.1/include/irrString.h new file mode 100644 index 0000000..43557cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrString.h @@ -0,0 +1,1368 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h + +#ifndef __IRR_STRING_H_INCLUDED__ +#define __IRR_STRING_H_INCLUDED__ + +#include "irrTypes.h" +#include "irrAllocator.h" +#include "irrMath.h" +#include +#include +#include + +namespace irr +{ +namespace core +{ + +//! Very simple string class with some useful features. +/** string and string both accept Unicode AND ASCII/Latin-1, +so you can assign Unicode to string and ASCII/Latin-1 to string +(and the other way round) if you want to. + +However, note that the conversation between both is not done using any encoding. +This means that c8 strings are treated as ASCII/Latin-1, not UTF-8, and +are simply expanded to the equivalent wchar_t, while Unicode/wchar_t +characters are truncated to 8-bit ASCII/Latin-1 characters, discarding all +other information in the wchar_t. +*/ + +enum eLocaleID +{ + IRR_LOCALE_ANSI = 0, + IRR_LOCALE_GERMAN = 1 +}; + +static eLocaleID locale_current = IRR_LOCALE_ANSI; +static inline void locale_set ( eLocaleID id ) +{ + locale_current = id; +} + +//! Returns a character converted to lower case +static inline u32 locale_lower ( u32 x ) +{ + switch ( locale_current ) + { + case IRR_LOCALE_GERMAN: + case IRR_LOCALE_ANSI: + break; + } + // ansi + return x >= 'A' && x <= 'Z' ? x + 0x20 : x; +} + +//! Returns a character converted to upper case +static inline u32 locale_upper ( u32 x ) +{ + switch ( locale_current ) + { + case IRR_LOCALE_GERMAN: + case IRR_LOCALE_ANSI: + break; + } + + // ansi + return x >= 'a' && x <= 'z' ? x + ( 'A' - 'a' ) : x; +} + + +template > +class string +{ +public: + + typedef T char_type; + + //! Default constructor + string() + : array(0), allocated(1), used(1) + { + array = allocator.allocate(1); // new T[1]; + array[0] = 0; + } + + + //! Constructor + string(const string& other) + : array(0), allocated(0), used(0) + { + *this = other; + } + + //! Constructor from other string types + template + string(const string& other) + : array(0), allocated(0), used(0) + { + *this = other; + } + + + //! Constructs a string from a float + explicit string(const double number) + : array(0), allocated(0), used(0) + { + c8 tmpbuf[255]; + snprintf(tmpbuf, 255, "%0.6f", number); + *this = tmpbuf; + } + + + //! Constructs a string from an int + explicit string(int number) + : array(0), allocated(0), used(0) + { + // store if negative and make positive + + bool negative = false; + if (number < 0) + { + number *= -1; + negative = true; + } + + // temporary buffer for 16 numbers + + c8 tmpbuf[16]={0}; + u32 idx = 15; + + // special case '0' + + if (!number) + { + tmpbuf[14] = '0'; + *this = &tmpbuf[14]; + return; + } + + // add numbers + + while(number && idx) + { + --idx; + tmpbuf[idx] = (c8)('0' + (number % 10)); + number /= 10; + } + + // add sign + + if (negative) + { + --idx; + tmpbuf[idx] = '-'; + } + + *this = &tmpbuf[idx]; + } + + + //! Constructs a string from an unsigned int + explicit string(unsigned int number) + : array(0), allocated(0), used(0) + { + // temporary buffer for 16 numbers + + c8 tmpbuf[16]={0}; + u32 idx = 15; + + // special case '0' + + if (!number) + { + tmpbuf[14] = '0'; + *this = &tmpbuf[14]; + return; + } + + // add numbers + + while(number && idx) + { + --idx; + tmpbuf[idx] = (c8)('0' + (number % 10)); + number /= 10; + } + + *this = &tmpbuf[idx]; + } + + + //! Constructs a string from a long + explicit string(long number) + : array(0), allocated(0), used(0) + { + // store if negative and make positive + + bool negative = false; + if (number < 0) + { + number *= -1; + negative = true; + } + + // temporary buffer for 16 numbers + + c8 tmpbuf[16]={0}; + u32 idx = 15; + + // special case '0' + + if (!number) + { + tmpbuf[14] = '0'; + *this = &tmpbuf[14]; + return; + } + + // add numbers + + while(number && idx) + { + --idx; + tmpbuf[idx] = (c8)('0' + (number % 10)); + number /= 10; + } + + // add sign + + if (negative) + { + --idx; + tmpbuf[idx] = '-'; + } + + *this = &tmpbuf[idx]; + } + + + //! Constructs a string from an unsigned long + explicit string(unsigned long number) + : array(0), allocated(0), used(0) + { + // temporary buffer for 16 numbers + + c8 tmpbuf[16]={0}; + u32 idx = 15; + + // special case '0' + + if (!number) + { + tmpbuf[14] = '0'; + *this = &tmpbuf[14]; + return; + } + + // add numbers + + while(number && idx) + { + --idx; + tmpbuf[idx] = (c8)('0' + (number % 10)); + number /= 10; + } + + *this = &tmpbuf[idx]; + } + + + //! Constructor for copying a string from a pointer with a given length + template + string(const B* const c, u32 length) + : array(0), allocated(0), used(0) + { + if (!c) + { + // correctly init the string to an empty one + *this=""; + return; + } + + allocated = used = length+1; + array = allocator.allocate(used); // new T[used]; + + for (u32 l = 0; l + string(const B* const c) + : array(0), allocated(0), used(0) + { + *this = c; + } + + + //! Destructor + ~string() + { + allocator.deallocate(array); // delete [] array; + } + + + //! Assignment operator + string& operator=(const string& other) + { + if (this == &other) + return *this; + + used = other.size()+1; + if (used>allocated) + { + allocator.deallocate(array); // delete [] array; + allocated = used; + array = allocator.allocate(used); //new T[used]; + } + + const T* p = other.c_str(); + for (u32 i=0; i + string& operator=(const string& other) + { + *this = other.c_str(); + return *this; + } + + + //! Assignment operator for strings, ascii and unicode + template + string& operator=(const B* const c) + { + if (!c) + { + if (!array) + { + array = allocator.allocate(1); //new T[1]; + allocated = 1; + } + used = 1; + array[0] = 0x0; + return *this; + } + + if ((void*)c == (void*)array) + return *this; + + u32 len = 0; + const B* p = c; + do + { + ++len; + } while(*p++); + + // we'll keep the old string for a while, because the new + // string could be a part of the current string. + T* oldArray = array; + + used = len; + if (used>allocated) + { + allocated = used; + array = allocator.allocate(used); //new T[used]; + } + + for (u32 l = 0; l operator+(const string& other) const + { + string str(*this); + str.append(other); + + return str; + } + + + //! Append operator for strings, ascii and unicode + template + string operator+(const B* const c) const + { + string str(*this); + str.append(c); + + return str; + } + + + //! Direct access operator + T& operator [](const u32 index) + { + _IRR_DEBUG_BREAK_IF(index>=used) // bad index + return array[index]; + } + + + //! Direct access operator + const T& operator [](const u32 index) const + { + _IRR_DEBUG_BREAK_IF(index>=used) // bad index + return array[index]; + } + + + //! Equality operator + bool operator==(const T* const str) const + { + if (!str) + return false; + + u32 i; + for (i=0; array[i] && str[i]; ++i) + if (array[i] != str[i]) + return false; + + return (!array[i] && !str[i]); + } + + + //! Equality operator + bool operator==(const string& other) const + { + for (u32 i=0; array[i] && other.array[i]; ++i) + if (array[i] != other.array[i]) + return false; + + return used == other.used; + } + + + //! Is smaller comparator + bool operator<(const string& other) const + { + for (u32 i=0; array[i] && other.array[i]; ++i) + { + const s32 diff = array[i] - other.array[i]; + if (diff) + return (diff < 0); + } + + return (used < other.used); + } + + + //! Inequality operator + bool operator!=(const T* const str) const + { + return !(*this == str); + } + + + //! Inequality operator + bool operator!=(const string& other) const + { + return !(*this == other); + } + + + //! Returns length of the string's content + /** \return Length of the string's content in characters, excluding + the trailing NUL. */ + u32 size() const + { + return used-1; + } + + //! Informs if the string is empty or not. + //! \return True if the string is empty, false if not. + bool empty() const + { + return (size() == 0); + } + + //! Returns character string + /** \return pointer to C-style NUL terminated string. */ + const T* c_str() const + { + return array; + } + + + //! Makes the string lower case. + string& make_lower() + { + for (u32 i=0; array[i]; ++i) + array[i] = locale_lower ( array[i] ); + return *this; + } + + + //! Makes the string upper case. + string& make_upper() + { + for (u32 i=0; array[i]; ++i) + array[i] = locale_upper ( array[i] ); + return *this; + } + + + //! Compares the strings ignoring case. + /** \param other: Other string to compare. + \return True if the strings are equal ignoring case. */ + bool equals_ignore_case(const string& other) const + { + for(u32 i=0; array[i] && other[i]; ++i) + if (locale_lower( array[i]) != locale_lower(other[i])) + return false; + + return used == other.used; + } + + //! Compares the strings ignoring case. + /** \param other: Other string to compare. + \param sourcePos: where to start to compare in the string + \return True if the strings are equal ignoring case. */ + bool equals_substring_ignore_case(const string&other, const s32 sourcePos = 0 ) const + { + if ( (u32) sourcePos >= used ) + return false; + + u32 i; + for( i=0; array[sourcePos + i] && other[i]; ++i) + if (locale_lower( array[sourcePos + i]) != locale_lower(other[i])) + return false; + + return array[sourcePos + i] == 0 && other[i] == 0; + } + + + //! Compares the strings ignoring case. + /** \param other: Other string to compare. + \return True if this string is smaller ignoring case. */ + bool lower_ignore_case(const string& other) const + { + for(u32 i=0; array[i] && other.array[i]; ++i) + { + s32 diff = (s32) locale_lower ( array[i] ) - (s32) locale_lower ( other.array[i] ); + if ( diff ) + return diff < 0; + } + + return used < other.used; + } + + + //! compares the first n characters of the strings + /** \param other Other string to compare. + \param n Number of characters to compare + \return True if the n first characters of both strings are equal. */ + bool equalsn(const string& other, u32 n) const + { + u32 i; + for(i=0; array[i] && other[i] && i < n; ++i) + if (array[i] != other[i]) + return false; + + // if one (or both) of the strings was smaller then they + // are only equal if they have the same length + return (i == n) || (used == other.used); + } + + + //! compares the first n characters of the strings + /** \param str Other string to compare. + \param n Number of characters to compare + \return True if the n first characters of both strings are equal. */ + bool equalsn(const T* const str, u32 n) const + { + if (!str) + return false; + u32 i; + for(i=0; array[i] && str[i] && i < n; ++i) + if (array[i] != str[i]) + return false; + + // if one (or both) of the strings was smaller then they + // are only equal if they have the same length + return (i == n) || (array[i] == 0 && str[i] == 0); + } + + + //! Appends a character to this string + /** \param character: Character to append. */ + string& append(T character) + { + if (used + 1 > allocated) + reallocate(used + 1); + + ++used; + + array[used-2] = character; + array[used-1] = 0; + + return *this; + } + + + //! Appends a char string to this string + /** \param other: Char string to append. */ + /** \param length: The length of the string to append. */ + string& append(const T* const other, u32 length=0xffffffff) + { + if (!other) + return *this; + + u32 len = 0; + const T* p = other; + while(*p) + { + ++len; + ++p; + } + if (len > length) + len = length; + + if (used + len > allocated) + reallocate(used + len); + + --used; + ++len; + + for (u32 l=0; l& append(const string& other) + { + if (other.size() == 0) + return *this; + + --used; + u32 len = other.size()+1; + + if (used + len > allocated) + reallocate(used + len); + + for (u32 l=0; l& append(const string& other, u32 length) + { + if (other.size() == 0) + return *this; + + if (other.size() < length) + { + append(other); + return *this; + } + + if (used + length > allocated) + reallocate(used + length); + + --used; + + for (u32 l=0; l + s32 findFirstCharNotInList(const B* const c, u32 count=1) const + { + if (!c || !count) + return -1; + + for (u32 i=0; i + s32 findLastCharNotInList(const B* const c, u32 count=1) const + { + if (!c || !count) + return -1; + + for (s32 i=(s32)(used-2); i>=0; --i) + { + u32 j; + for (j=0; j=0; --i) + if (array[i] == c) + return i; + + return -1; + } + + //! finds last occurrence of a character of a list in string + /** \param c: List of strings to find. For example if the method + should find the last occurrence of 'a' or 'b', this parameter should be "ab". + \param count: Amount of characters in the list. Usually, + this should be strlen(c) + \return Position where one of the characters has been found, + or -1 if not found. */ + s32 findLastChar(const T* const c, u32 count=1) const + { + if (!c || !count) + return -1; + + for (s32 i=(s32)used-2; i>=0; --i) + for (u32 j=0; j + s32 find(const B* const str, const u32 start = 0) const + { + if (str && *str) + { + u32 len = 0; + + while (str[len]) + ++len; + + if (len > used-1) + return -1; + + for (u32 i=start; i subString(u32 begin, s32 length, bool make_lower = false ) const + { + // if start after string + // or no proper substring length + if ((length <= 0) || (begin>=size())) + return string(""); + // clamp length to maximal value + if ((length+begin) > size()) + length = size()-begin; + + string o; + o.reserve(length+1); + + s32 i; + if ( !make_lower ) + { + for (i=0; i& operator += (T c) + { + append(c); + return *this; + } + + + //! Appends a char string to this string + /** \param c Char string to append. */ + string& operator += (const T* const c) + { + append(c); + return *this; + } + + + //! Appends a string to this string + /** \param other String to append. */ + string& operator += (const string& other) + { + append(other); + return *this; + } + + + //! Appends a string representation of a number to this string + /** \param i Number to append. */ + string& operator += (const int i) + { + append(string(i)); + return *this; + } + + + //! Appends a string representation of a number to this string + /** \param i Number to append. */ + string& operator += (const unsigned int i) + { + append(string(i)); + return *this; + } + + + //! Appends a string representation of a number to this string + /** \param i Number to append. */ + string& operator += (const long i) + { + append(string(i)); + return *this; + } + + + //! Appends a string representation of a number to this string + /** \param i Number to append. */ + string& operator += (const unsigned long i) + { + append(string(i)); + return *this; + } + + + //! Appends a string representation of a number to this string + /** \param i Number to append. */ + string& operator += (const double i) + { + append(string(i)); + return *this; + } + + + //! Appends a string representation of a number to this string + /** \param i Number to append. */ + string& operator += (const float i) + { + append(string(i)); + return *this; + } + + + //! Replaces all characters of a special type with another one + /** \param toReplace Character to replace. + \param replaceWith Character replacing the old one. */ + string& replace(T toReplace, T replaceWith) + { + for (u32 i=0; i& replace(const string& toReplace, const string& replaceWith) + { + if (toReplace.size() == 0) + return *this; + + const T* other = toReplace.c_str(); + const T* replace = replaceWith.c_str(); + const u32 other_size = toReplace.size(); + const u32 replace_size = replaceWith.size(); + + // Determine the delta. The algorithm will change depending on the delta. + s32 delta = replace_size - other_size; + + // A character for character replace. The string will not shrink or grow. + if (delta == 0) + { + s32 pos = 0; + while ((pos = find(other, pos)) != -1) + { + for (u32 i = 0; i < replace_size; ++i) + array[pos + i] = replace[i]; + ++pos; + } + return *this; + } + + // We are going to be removing some characters. The string will shrink. + if (delta < 0) + { + u32 i = 0; + for (u32 pos = 0; pos < used; ++i, ++pos) + { + // Is this potentially a match? + if (array[pos] == *other) + { + // Check to see if we have a match. + u32 j; + for (j = 0; j < other_size; ++j) + { + if (array[pos + j] != other[j]) + break; + } + + // If we have a match, replace characters. + if (j == other_size) + { + for (j = 0; j < replace_size; ++j) + array[i + j] = replace[j]; + i += replace_size - 1; + pos += other_size - 1; + continue; + } + } + + // No match found, just copy characters. + array[i] = array[pos]; + } + array[i-1] = 0; + used = i; + + return *this; + } + + // We are going to be adding characters, so the string size will increase. + // Count the number of times toReplace exists in the string so we can allocate the new size. + u32 find_count = 0; + s32 pos = 0; + while ((pos = find(other, pos)) != -1) + { + ++find_count; + ++pos; + } + + // Re-allocate the string now, if needed. + u32 len = delta * find_count; + if (used + len > allocated) + reallocate(used + len); + + // Start replacing. + pos = 0; + while ((pos = find(other, pos)) != -1) + { + T* start = array + pos + other_size - 1; + T* ptr = array + used - 1; + T* end = array + delta + used -1; + + // Shift characters to make room for the string. + while (ptr != start) + { + *end = *ptr; + --ptr; + --end; + } + + // Add the new string now. + for (u32 i = 0; i < replace_size; ++i) + array[pos + i] = replace[i]; + + pos += replace_size; + used += delta; + } + + return *this; + } + + + //! Removes characters from a string. + /** \param c: Character to remove. */ + string& remove(T c) + { + u32 pos = 0; + u32 found = 0; + for (u32 i=0; i& remove(const string& toRemove) + { + u32 size = toRemove.size(); + if ( size == 0 ) + return *this; + u32 pos = 0; + u32 found = 0; + for (u32 i=0; i& removeChars(const string & characters) + { + if (characters.size() == 0) + return *this; + + u32 pos = 0; + u32 found = 0; + for (u32 i=0; i& trim(const string & whitespace = " \t\n\r") + { + // find start and end of the substring without the specified characters + const s32 begin = findFirstCharNotInList(whitespace.c_str(), whitespace.used); + if (begin == -1) + return (*this=""); + + const s32 end = findLastCharNotInList(whitespace.c_str(), whitespace.used); + + return (*this = subString(begin, (end +1) - begin)); + } + + + //! Erases a character from the string. + /** May be slow, because all elements + following after the erased element have to be copied. + \param index: Index of element to be erased. */ + string& erase(u32 index) + { + _IRR_DEBUG_BREAK_IF(index>=used) // access violation + + for (u32 i=index+1; i& validate() + { + // terminate on existing null + for (u32 i=0; i 0 ) + { + used = allocated; + array[used-1] = 0; + } + else + { + used = 0; + } + + return *this; + } + + //! gets the last char of a string or null + T lastChar() const + { + return used > 1 ? array[used-2] : 0; + } + + //! split string into parts. + /** This method will split a string at certain delimiter characters + into the container passed in as reference. The type of the container + has to be given as template parameter. It must provide a push_back and + a size method. + \param ret The result container + \param c C-style string of delimiter characters + \param count Number of delimiter characters + \param ignoreEmptyTokens Flag to avoid empty substrings in the result + container. If two delimiters occur without a character in between, an + empty substring would be placed in the result. If this flag is set, + only non-empty strings are stored. + \param keepSeparators Flag which allows to add the separator to the + result string. If this flag is true, the concatenation of the + substrings results in the original string. Otherwise, only the + characters between the delimiters are returned. + \return The number of resulting substrings + */ + template + u32 split(container& ret, const T* const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const + { + if (!c) + return 0; + + const u32 oldSize=ret.size(); + u32 lastpos = 0; + bool lastWasSeparator = false; + for (u32 i=0; i(&array[lastpos], i - lastpos)); + foundSeparator = true; + lastpos = (keepSeparators ? i : i + 1); + break; + } + } + lastWasSeparator = foundSeparator; + } + if ((used - 1) > lastpos) + ret.push_back(string(&array[lastpos], (used - 1) - lastpos)); + return ret.size()-oldSize; + } + +private: + + //! Reallocate the array, make it bigger or smaller + void reallocate(u32 new_size) + { + T* old_array = array; + + array = allocator.allocate(new_size); //new T[new_size]; + allocated = new_size; + + u32 amount = used < new_size ? used : new_size; + for (u32 i=0; i stringc; + +//! Typedef for wide character strings +typedef string stringw; + + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrTypes.h b/src/others/irrlicht-1.8.1/include/irrTypes.h new file mode 100644 index 0000000..403f890 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrTypes.h @@ -0,0 +1,250 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_TYPES_H_INCLUDED__ +#define __IRR_TYPES_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +namespace irr +{ + +//! 8 bit unsigned variable. +/** This is a typedef for unsigned char, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef unsigned __int8 u8; +#else +typedef unsigned char u8; +#endif + +//! 8 bit signed variable. +/** This is a typedef for signed char, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef __int8 s8; +#else +typedef signed char s8; +#endif + +//! 8 bit character variable. +/** This is a typedef for char, it ensures portability of the engine. */ +typedef char c8; + + + +//! 16 bit unsigned variable. +/** This is a typedef for unsigned short, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef unsigned __int16 u16; +#else +typedef unsigned short u16; +#endif + +//! 16 bit signed variable. +/** This is a typedef for signed short, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef __int16 s16; +#else +typedef signed short s16; +#endif + + + +//! 32 bit unsigned variable. +/** This is a typedef for unsigned int, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef unsigned __int32 u32; +#else +typedef unsigned int u32; +#endif + +//! 32 bit signed variable. +/** This is a typedef for signed int, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef __int32 s32; +#else +typedef signed int s32; +#endif + + +#ifdef __IRR_HAS_S64 +//! 64 bit unsigned variable. +/** This is a typedef for 64bit uint, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef unsigned __int64 u64; +#elif __GNUC__ +#if __WORDSIZE == 64 +typedef unsigned long int u64; +#else +__extension__ typedef unsigned long long u64; +#endif +#else +typedef unsigned long long u64; +#endif + +//! 64 bit signed variable. +/** This is a typedef for 64bit int, it ensures portability of the engine. */ +#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) +typedef __int64 s64; +#elif __GNUC__ +#if __WORDSIZE == 64 +typedef long int s64; +#else +__extension__ typedef long long s64; +#endif +#else +typedef long long s64; +#endif +#endif // __IRR_HAS_S64 + + + +//! 32 bit floating point variable. +/** This is a typedef for float, it ensures portability of the engine. */ +typedef float f32; + +//! 64 bit floating point variable. +/** This is a typedef for double, it ensures portability of the engine. */ +typedef double f64; + + +} // end namespace irr + + +#include +#ifdef _IRR_WINDOWS_API_ +//! Defines for s{w,n}printf because these methods do not match the ISO C +//! standard on Windows platforms, but it does on all others. +//! These should be int snprintf(char *str, size_t size, const char *format, ...); +//! and int swprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, ...); +#if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE) +#define swprintf swprintf_s +#define snprintf sprintf_s +#elif !defined(__CYGWIN__) +#define swprintf _snwprintf +#define snprintf _snprintf +#endif + +// define the wchar_t type if not already built in. +#ifdef _MSC_VER +#ifndef _WCHAR_T_DEFINED +//! A 16 bit wide character type. +/** + Defines the wchar_t-type. + In VS6, its not possible to tell + the standard compiler to treat wchar_t as a built-in type, and + sometimes we just don't want to include the huge stdlib.h or wchar.h, + so we'll use this. +*/ +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif // wchar is not defined +#endif // microsoft compiler +#endif // _IRR_WINDOWS_API_ + +namespace irr +{ + +//! Type name for character type used by the file system. +/** Should the wide character version of the FileSystem be used it is a +16 bit character variable. Used for unicode Filesystem and unicode strings. +Else it is a 8 bit character variable. Used for ansi Filesystem and non-unicode +strings +*/ +#if defined(_IRR_WCHAR_FILESYSTEM) + typedef wchar_t fschar_t; + #define _IRR_TEXT(X) L##X +#else + typedef char fschar_t; + #define _IRR_TEXT(X) X +#endif + +} // end namespace irr + +//! define a break macro for debugging. +#if defined(_DEBUG) +#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE) + #if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration + #include + #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();} + #else + #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3} + #endif +#else +#include "assert.h" +#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) ); +#endif +#else +#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) +#endif + +//! Defines a deprecated macro which generates a warning at compile time +/** The usage is simple +For typedef: typedef _IRR_DEPRECATED_ int test1; +For classes/structs: class _IRR_DEPRECATED_ test2 { ... }; +For methods: class test3 { _IRR_DEPRECATED_ virtual void foo() {} }; +For functions: template _IRR_DEPRECATED_ void test4(void) {} +**/ +#if defined(IGNORE_DEPRECATED_WARNING) +#define _IRR_DEPRECATED_ +#elif _MSC_VER >= 1310 //vs 2003 or higher +#define _IRR_DEPRECATED_ __declspec(deprecated) +#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // all versions above 3.0 should support this feature +#define _IRR_DEPRECATED_ __attribute__ ((deprecated)) +#else +#define _IRR_DEPRECATED_ +#endif + +//! Defines a small statement to work around a microsoft compiler bug. +/** The microsoft compiler 7.0 - 7.1 has a bug: +When you call unmanaged code that returns a bool type value of false from managed code, +the return value may appear as true. See +http://support.microsoft.com/default.aspx?kbid=823071 for details. +Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/ +#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400) +#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100 +#else +#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX +#endif // _IRR_MANAGED_MARSHALLING_BUGFIX + + +// memory debugging +#if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \ + (_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE) + + #define CRTDBG_MAP_ALLOC + #define _CRTDBG_MAP_ALLOC + #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) + #include + #include + #define new DEBUG_CLIENTBLOCK +#endif + +// disable truncated debug information warning in visual studio 6 by default +#if defined(_MSC_VER) && (_MSC_VER < 1300 ) +#pragma warning( disable: 4786) +#endif // _MSC + + +//! ignore VC8 warning deprecated +/** The microsoft compiler */ +#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400) + //#pragma warning( disable: 4996) + //#define _CRT_SECURE_NO_DEPRECATE 1 + //#define _CRT_NONSTDC_NO_DEPRECATE 1 +#endif + + +//! creates four CC codes used in Irrlicht for simple ids +/** some compilers can create those by directly writing the +code like 'code', but some generate warnings so we use this macro here */ +#define MAKE_IRR_ID(c0, c1, c2, c3) \ + ((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \ + ((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 )) + +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#define _strcmpi(a,b) strcmpi(a,b) +#endif + +#endif // __IRR_TYPES_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/irrXML.h b/src/others/irrlicht-1.8.1/include/irrXML.h new file mode 100644 index 0000000..dd55b1a --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrXML.h @@ -0,0 +1,575 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h + +#ifndef __IRR_XML_H_INCLUDED__ +#define __IRR_XML_H_INCLUDED__ + +#include +#include "IrrCompileConfig.h" + +/** \mainpage irrXML 1.2 API documentation +
+ + \section intro Introduction + + Welcome to the irrXML API documentation. + Here you'll find any information you'll need to develop applications with + irrXML. If you look for a tutorial on how to start, take a look at the \ref irrxmlexample, + at the homepage of irrXML at www.ambiera.com/irrxml/ + or into the SDK in the directory example. + + irrXML is intended to be a high speed and easy-to-use XML Parser for C++, and + this documentation is an important part of it. If you have any questions or + suggestions, just send a email to the author of the engine, Nikolaus Gebhardt + (niko (at) irrlicht3d.org). For more informations about this parser, see \ref history. + + \section features Features + + irrXML provides forward-only, read-only + access to a stream of non validated XML data. It was fully implemented by + Nikolaus Gebhardt. Its current features are: + + - It it fast as lighting and has very low memory usage. It was + developed with the intention of being used in 3D games, as it already has been. + - irrXML is very small: It only consists of 60 KB of code and can be added easily + to your existing project. + - Of course, it is platform independent and works with lots of compilers. + - It is able to parse ASCII, UTF-8, UTF-16 and UTF-32 text files, both in + little and big endian format. + - Independent of the input file format, the parser can return all strings in ASCII, UTF-8, + UTF-16 and UTF-32 format. + - With its optional file access abstraction it has the advantage that it can read not + only from files but from any type of data (memory, network, ...). For example when + used with the Irrlicht Engine, it directly reads from compressed .zip files. + - Just like the Irrlicht Engine for which it was originally created, it is extremely easy + to use. + - It has no external dependencies, it does not even need the STL. + + Although irrXML has some strenghts, it currently also has the following limitations: + + - The input xml file is not validated and assumed to be correct. + + \section irrxmlexample Example + + The following code demonstrates the basic usage of irrXML. A simple xml + file like this is parsed: + \code + + + + + + Welcome to the Mesh Viewer of the "Irrlicht Engine". + + + \endcode + + The code for parsing this file would look like this: + \code + #include + using namespace irr; // irrXML is located in the namespace irr::io + using namespace io; + + #include // we use STL strings to store data in this example + + void main() + { + // create the reader using one of the factory functions + + IrrXMLReader* xml = createIrrXMLReader("config.xml"); + + // strings for storing the data we want to get out of the file + std::string modelFile; + std::string messageText; + std::string caption; + + // parse the file until end reached + + while(xml && xml->read()) + { + switch(xml->getNodeType()) + { + case EXN_TEXT: + // in this xml file, the only text which occurs is the messageText + messageText = xml->getNodeData(); + break; + case EXN_ELEMENT: + { + if (!strcmp("model", xml->getNodeName())) + modelFile = xml->getAttributeValue("file"); + else + if (!strcmp("messageText", xml->getNodeName())) + caption = xml->getAttributeValue("caption"); + } + break; + } + } + + // delete the xml parser after usage + delete xml; + } + \endcode + + \section howto How to use + + Simply add the source files in the /src directory of irrXML to your project. Done. + + \section license License + + The irrXML license is based on the zlib license. Basicly, this means you can do with + irrXML whatever you want: + + Copyright (C) 2002-2012 Nikolaus Gebhardt + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + + \section history History + + As lots of references in this documentation and the source show, this xml + parser has originally been a part of the + Irrlicht Engine. But because + the parser has become very useful with the latest release, people asked for a + separate version of it, to be able to use it in non Irrlicht projects. With + irrXML 1.0, this has now been done. +*/ + +namespace irr +{ +namespace io +{ + //! Enumeration of all supported source text file formats + enum ETEXT_FORMAT + { + //! ASCII, file without byte order mark, or not a text file + ETF_ASCII, + + //! UTF-8 format + ETF_UTF8, + + //! UTF-16 format, big endian + ETF_UTF16_BE, + + //! UTF-16 format, little endian + ETF_UTF16_LE, + + //! UTF-32 format, big endian + ETF_UTF32_BE, + + //! UTF-32 format, little endian + ETF_UTF32_LE + }; + + + //! Enumeration for all xml nodes which are parsed by IrrXMLReader + enum EXML_NODE + { + //! No xml node. This is usually the node if you did not read anything yet. + EXN_NONE, + + //! An xml element such as <foo> + EXN_ELEMENT, + + //! End of an xml element such as </foo> + EXN_ELEMENT_END, + + //! Text within an xml element: <foo> this is the text. </foo> + //! Also text between 2 xml elements: </foo> this is the text. <foo> + EXN_TEXT, + + //! An xml comment like <!-- I am a comment --> or a DTD definition. + EXN_COMMENT, + + //! An xml cdata section like <![CDATA[ this is some CDATA ]]> + EXN_CDATA, + + //! Unknown element. + EXN_UNKNOWN + }; + + //! Callback class for file read abstraction. + /** With this, it is possible to make the xml parser read in other + things than just files. The Irrlicht engine is using this for example to + read xml from compressed .zip files. To make the parser read in + any other data, derive a class from this interface, implement the + two methods to read your data and give a pointer to an instance of + your implementation when calling createIrrXMLReader(), + createIrrXMLReaderUTF16() or createIrrXMLReaderUTF32() */ + class IFileReadCallBack + { + public: + + //! Destructor + virtual ~IFileReadCallBack() {} + + //! Reads an amount of bytes from the file. + /** \param buffer: Pointer to buffer where to read bytes will be written to. + \param sizeToRead: Amount of bytes to read from the file. + \return Returns how much bytes were read. */ + virtual int read(void* buffer, int sizeToRead) = 0; + + //! Returns size of file in bytes + virtual long getSize() const = 0; + }; + + //! Empty class to be used as parent class for IrrXMLReader. + /** If you need another class as base class for the xml reader, you can do this by creating + the reader using for example new CXMLReaderImpl(yourcallback); + The Irrlicht Engine for example needs IReferenceCounted as base class for every object to + let it automaticly reference countend, hence it replaces IXMLBase with IReferenceCounted. + See irrXML.cpp on how this can be done in detail. */ + class IXMLBase + { + }; + + //! Interface providing easy read access to a XML file. + /** You can create an instance of this reader using one of the factory functions + createIrrXMLReader(), createIrrXMLReaderUTF16() and createIrrXMLReaderUTF32(). + If using the parser from the Irrlicht Engine, please use IFileSystem::createXMLReader() + instead. + For a detailed intro how to use the parser, see \ref irrxmlexample and \ref features. + + The typical usage of this parser looks like this: + \code + #include + using namespace irr; // irrXML is located in the namespace irr::io + using namespace io; + + void main() + { + // create the reader using one of the factory functions + IrrXMLReader* xml = createIrrXMLReader("config.xml"); + + if (xml == 0) + return; // file could not be opened + + // parse the file until end reached + while(xml->read()) + { + // based on xml->getNodeType(), do something. + } + + // delete the xml parser after usage + delete xml; + } + \endcode + See \ref irrxmlexample for a more detailed example. + */ + template + class IIrrXMLReader : public super_class + { + public: + + //! Destructor + virtual ~IIrrXMLReader() {} + + //! Reads forward to the next xml node. + /** \return Returns false, if there was no further node. */ + virtual bool read() = 0; + + //! Returns the type of the current XML node. + virtual EXML_NODE getNodeType() const = 0; + + //! Returns attribute count of the current XML node. + /** This is usually + non null if the current node is EXN_ELEMENT, and the element has attributes. + \return Returns amount of attributes of this xml node. */ + virtual unsigned int getAttributeCount() const = 0; + + //! Returns name of an attribute. + /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. + \return Name of the attribute, 0 if an attribute with this index does not exist. */ + virtual const char_type* getAttributeName(int idx) const = 0; + + //! Returns the value of an attribute. + /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. + \return Value of the attribute, 0 if an attribute with this index does not exist. */ + virtual const char_type* getAttributeValue(int idx) const = 0; + + //! Returns the value of an attribute. + /** \param name: Name of the attribute. + \return Value of the attribute, 0 if an attribute with this name does not exist. */ + virtual const char_type* getAttributeValue(const char_type* name) const = 0; + + //! Returns the value of an attribute in a safe way. + /** Like getAttributeValue(), but does not + return 0 if the attribute does not exist. An empty string ("") is returned then. + \param name: Name of the attribute. + \return Value of the attribute, and "" if an attribute with this name does not exist */ + virtual const char_type* getAttributeValueSafe(const char_type* name) const = 0; + + //! Returns the value of an attribute as integer. + /** \param name Name of the attribute. + \return Value of the attribute as integer, and 0 if an attribute with this name does not exist or + the value could not be interpreted as integer. */ + virtual int getAttributeValueAsInt(const char_type* name) const = 0; + + //! Returns the value of an attribute as integer. + /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. + \return Value of the attribute as integer, and 0 if an attribute with this index does not exist or + the value could not be interpreted as integer. */ + virtual int getAttributeValueAsInt(int idx) const = 0; + + //! Returns the value of an attribute as float. + /** \param name: Name of the attribute. + \return Value of the attribute as float, and 0 if an attribute with this name does not exist or + the value could not be interpreted as float. */ + virtual float getAttributeValueAsFloat(const char_type* name) const = 0; + + //! Returns the value of an attribute as float. + /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. + \return Value of the attribute as float, and 0 if an attribute with this index does not exist or + the value could not be interpreted as float. */ + virtual float getAttributeValueAsFloat(int idx) const = 0; + + //! Returns the name of the current node. + /** Only valid, if the node type is EXN_ELEMENT. + \return Name of the current node or 0 if the node has no name. */ + virtual const char_type* getNodeName() const = 0; + + //! Returns data of the current node. + /** Only valid if the node has some + data and it is of type EXN_TEXT, EXN_COMMENT, EXN_CDATA or EXN_UNKNOWN. */ + virtual const char_type* getNodeData() const = 0; + + //! Returns if an element is an empty element, like <foo /> + virtual bool isEmptyElement() const = 0; + + //! Returns format of the source xml file. + /** It is not necessary to use + this method because the parser will convert the input file format + to the format wanted by the user when creating the parser. This + method is useful to get/display additional informations. */ + virtual ETEXT_FORMAT getSourceFormat() const = 0; + + //! Returns format of the strings returned by the parser. + /** This will be UTF8 for example when you created a parser with + IrrXMLReaderUTF8() and UTF32 when it has been created using + IrrXMLReaderUTF32. It should not be necessary to call this + method and only exists for informational purposes. */ + virtual ETEXT_FORMAT getParserFormat() const = 0; + }; + + + template + struct xmlChar + { + T c; + xmlChar() {} + xmlChar(char in) : c(static_cast(in)) {} + xmlChar(wchar_t in) : c(static_cast(in)) {} +#if defined(__BORLANDC__) + // Note - removing explicit for borland was to get it to even compile. + // There haven't been any kind of tests for that besides that. + xmlChar(unsigned char in) : c(static_cast(in)) {} + xmlChar(unsigned short in) : c(static_cast(in)) {} + xmlChar(unsigned int in) : c(static_cast(in)) {} + xmlChar(unsigned long in) : c(static_cast(in)) {} +#else + explicit xmlChar(unsigned char in) : c(static_cast(in)) {} + explicit xmlChar(unsigned short in) : c(static_cast(in)) {} + explicit xmlChar(unsigned int in) : c(static_cast(in)) {} + explicit xmlChar(unsigned long in) : c(static_cast(in)) {} +#endif + operator T() const { return c; } + void operator=(int t) { c=static_cast(t); } + }; + + //! defines the utf-16 type. + /** Not using wchar_t for this because + wchar_t has 16 bit on windows and 32 bit on other operating systems. */ + typedef xmlChar char16; + + //! defines the utf-32 type. + /** Not using wchar_t for this because + wchar_t has 16 bit on windows and 32 bit on other operating systems. */ + typedef xmlChar char32; + + //! A UTF-8 or ASCII character xml parser. + /** This means that all character data will be returned in 8 bit ASCII or UTF-8 by this parser. + The file to read can be in any format, it will be converted to UTF-8 if it is not + in this format. + Create an instance of this with createIrrXMLReader(); + See IIrrXMLReader for description on how to use it. */ + typedef IIrrXMLReader IrrXMLReader; + + //! A UTF-16 xml parser. + /** This means that all character data will be returned in UTF-16 by this parser. + The file to read can be in any format, it will be converted to UTF-16 if it is not + in this format. + Create an instance of this with createIrrXMLReaderUTF16(); + See IIrrXMLReader for description on how to use it. */ + typedef IIrrXMLReader IrrXMLReaderUTF16; + + //! A UTF-32 xml parser. + /** This means that all character data will be returned in UTF-32 by this parser. + The file to read can be in any format, it will be converted to UTF-32 if it is not + in this format. + Create an instance of this with createIrrXMLReaderUTF32(); + See IIrrXMLReader for description on how to use it. */ + typedef IIrrXMLReader IrrXMLReaderUTF32; + + + //! Creates an instance of an UFT-8 or ASCII character xml parser. + /** This means that all character data will be returned in 8 bit ASCII or UTF-8. + The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReaderUTF8() instead. + \param filename: Name of file to be opened. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(const char* filename); + + //! Creates an instance of an UFT-8 or ASCII character xml parser. + /** This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can + be in any format, it will be converted to UTF-8 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReaderUTF8() instead. + \param file: Pointer to opened file, must have been opened in binary mode, e.g. + using fopen("foo.bar", "wb"); The file will not be closed after it has been read. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(FILE* file); + + //! Creates an instance of an UFT-8 or ASCII character xml parser. + /** This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can + be in any format, it will be converted to UTF-8 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReaderUTF8() instead. + \param callback: Callback for file read abstraction. Implement your own + callback to make the xml parser read in other things than just files. See + IFileReadCallBack for more information about this. + \param deleteCallback: if true, the callback will be deleted after the file + has been read. Otherwise the caller si responsible for cleaning it up. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(IFileReadCallBack* callback, + bool deleteCallback = false); + + //! Creates an instance of an UFT-16 xml parser. + /** This means that + all character data will be returned in UTF-16. The file to read can + be in any format, it will be converted to UTF-16 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReader() instead. + \param filename: Name of file to be opened. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(const char* filename); + + //! Creates an instance of an UFT-16 xml parser. + /** This means that all character data will be returned in UTF-16. The file to read can + be in any format, it will be converted to UTF-16 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReader() instead. + \param file: Pointer to opened file, must have been opened in binary mode, e.g. + using fopen("foo.bar", "wb"); The file will not be closed after it has been read. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(FILE* file); + + //! Creates an instance of an UFT-16 xml parser. + /** This means that all character data will be returned in UTF-16. The file to read can + be in any format, it will be converted to UTF-16 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReader() instead. + \param callback: Callback for file read abstraction. Implement your own + callback to make the xml parser read in other things than just files. See + IFileReadCallBack for more information about this. + \param deleteCallback: if true, the callback will be deleted after the file + has been read. Otherwise the caller si responsible for cleaning it up. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(IFileReadCallBack* callback, + bool deleteCallback = false); + + + //! Creates an instance of an UFT-32 xml parser. + /** This means that all character data will be returned in UTF-32. The file to read can + be in any format, it will be converted to UTF-32 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReader() instead. + \param filename: Name of file to be opened. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(const char* filename); + + //! Creates an instance of an UFT-32 xml parser. + /** This means that all character data will be returned in UTF-32. The file to read can + be in any format, it will be converted to UTF-32 if it is not in this format. + if you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReader() instead. + \param file: Pointer to opened file, must have been opened in binary mode, e.g. + using fopen("foo.bar", "wb"); The file will not be closed after it has been read. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(FILE* file); + + //! Creates an instance of an UFT-32 xml parser. + /** This means that + all character data will be returned in UTF-32. The file to read can + be in any format, it will be converted to UTF-32 if it is not in this format. + If you are using the Irrlicht Engine, it is better not to use this function but + IFileSystem::createXMLReader() instead. + \param callback: Callback for file read abstraction. Implement your own + callback to make the xml parser read in other things than just files. See + IFileReadCallBack for more information about this. + \param deleteCallback: if true, the callback will be deleted after the file + has been read. Otherwise the caller si responsible for cleaning it up. + \return Returns a pointer to the created xml parser. This pointer should be + deleted using 'delete' after no longer needed. Returns 0 if an error occured + and the file could not be opened. */ + IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(IFileReadCallBack* callback, + bool deleteCallback = false); + + + /*! \file irrXML.h + \brief Header file of the irrXML, the Irrlicht XML parser. + + This file includes everything needed for using irrXML, + the XML parser of the Irrlicht Engine. To use irrXML, + you only need to include this file in your project: + + \code + #include + \endcode + + It is also common to use the two namespaces in which irrXML is included, + directly after including irrXML.h: + + \code + #include + using namespace irr; + using namespace io; + \endcode + */ + +} // end namespace io +} // end namespace irr + +#endif // __IRR_XML_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/irrlicht.h b/src/others/irrlicht-1.8.1/include/irrlicht.h new file mode 100644 index 0000000..74783ce --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrlicht.h @@ -0,0 +1,394 @@ +/* irrlicht.h -- interface of the 'Irrlicht Engine' + + Copyright (C) 2002-2012 Nikolaus Gebhardt + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Please note that the Irrlicht Engine is based in part on the work of the + Independent JPEG Group, the zlib and the libPng. This means that if you use + the Irrlicht Engine in your product, you must acknowledge somewhere in your + documentation that you've used the IJG code. It would also be nice to mention + that you use the Irrlicht Engine, the zlib and libPng. See the README files + in the jpeglib, the zlib and libPng for further informations. +*/ + +#ifndef __IRRLICHT_H_INCLUDED__ +#define __IRRLICHT_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#include "aabbox3d.h" +#include "CDynamicMeshBuffer.h" +#include "CIndexBuffer.h" +#include "CMeshBuffer.h" +#include "coreutil.h" +#include "CVertexBuffer.h" +#include "dimension2d.h" +#include "ECullingTypes.h" +#include "EDebugSceneTypes.h" +#include "EDriverFeatures.h" +#include "EDriverTypes.h" +#include "EGUIAlignment.h" +#include "EGUIElementTypes.h" +#include "EHardwareBufferFlags.h" +#include "EMaterialFlags.h" +#include "EMaterialTypes.h" +#include "EMeshWriterEnums.h" +#include "EMessageBoxFlags.h" +#include "ESceneNodeAnimatorTypes.h" +#include "ESceneNodeTypes.h" +#include "ETerrainElements.h" +#include "fast_atof.h" +#include "heapsort.h" +#include "IAnimatedMesh.h" +#include "IAnimatedMeshMD2.h" +#include "IAnimatedMeshMD3.h" +#include "IAnimatedMeshSceneNode.h" +#include "IAttributeExchangingObject.h" +#include "IAttributes.h" +#include "IBillboardSceneNode.h" +#include "IBillboardTextSceneNode.h" +#include "IBoneSceneNode.h" +#include "ICameraSceneNode.h" +#include "ICursorControl.h" +#include "IDummyTransformationSceneNode.h" +#include "IDynamicMeshBuffer.h" +#include "IEventReceiver.h" +#include "IFileList.h" +#include "IFileSystem.h" +#include "IGeometryCreator.h" +#include "IGPUProgrammingServices.h" +#include "IGUIButton.h" +#include "IGUICheckBox.h" +#include "IGUIColorSelectDialog.h" +#include "IGUIComboBox.h" +#include "IGUIContextMenu.h" +#include "IGUIEditBox.h" +#include "IGUIElement.h" +#include "IGUIElementFactory.h" +#include "IGUIEnvironment.h" +#include "IGUIFileOpenDialog.h" +#include "IGUIFont.h" +#include "IGUIFontBitmap.h" +#include "IGUIImage.h" +#include "IGUIInOutFader.h" +#include "IGUIListBox.h" +#include "IGUIMeshViewer.h" +#include "IGUIScrollBar.h" +#include "IGUISkin.h" +#include "IGUISpinBox.h" +#include "IGUISpriteBank.h" +#include "IGUIStaticText.h" +#include "IGUITabControl.h" +#include "IGUITable.h" +#include "IGUIToolbar.h" +#include "IGUIWindow.h" +#include "IGUITreeView.h" +#include "IImage.h" +#include "IImageLoader.h" +#include "IImageWriter.h" +#include "IIndexBuffer.h" +#include "ILightSceneNode.h" +#include "ILogger.h" +#include "IMaterialRenderer.h" +#include "IMaterialRendererServices.h" +#include "IMesh.h" +#include "IMeshBuffer.h" +#include "IMeshCache.h" +#include "IMeshLoader.h" +#include "IMeshManipulator.h" +#include "IMeshSceneNode.h" +#include "IMeshWriter.h" +#include "IColladaMeshWriter.h" +#include "IMetaTriangleSelector.h" +#include "IOSOperator.h" +#include "IParticleSystemSceneNode.h" // also includes all emitters and attractors +#include "IQ3LevelMesh.h" +#include "IQ3Shader.h" +#include "IReadFile.h" +#include "IReferenceCounted.h" +#include "irrArray.h" +#include "IRandomizer.h" +#include "IrrlichtDevice.h" +#include "irrList.h" +#include "irrMap.h" +#include "irrMath.h" +#include "irrString.h" +#include "irrTypes.h" +#include "path.h" +#include "irrXML.h" +#include "ISceneCollisionManager.h" +#include "ISceneLoader.h" +#include "ISceneManager.h" +#include "ISceneNode.h" +#include "ISceneNodeAnimator.h" +#include "ISceneNodeAnimatorCameraFPS.h" +#include "ISceneNodeAnimatorCameraMaya.h" +#include "ISceneNodeAnimatorCollisionResponse.h" +#include "ISceneNodeAnimatorFactory.h" +#include "ISceneNodeFactory.h" +#include "ISceneUserDataSerializer.h" +#include "IShaderConstantSetCallBack.h" +#include "IShadowVolumeSceneNode.h" +#include "ISkinnedMesh.h" +#include "ITerrainSceneNode.h" +#include "ITextSceneNode.h" +#include "ITexture.h" +#include "ITimer.h" +#include "ITriangleSelector.h" +#include "IVertexBuffer.h" +#include "IVideoDriver.h" +#include "IVideoModeList.h" +#include "IVolumeLightSceneNode.h" +#include "IWriteFile.h" +#include "IXMLReader.h" +#include "IXMLWriter.h" +#include "ILightManager.h" +#include "Keycodes.h" +#include "line2d.h" +#include "line3d.h" +#include "matrix4.h" +#include "plane3d.h" +#include "position2d.h" +#include "quaternion.h" +#include "rect.h" +#include "S3DVertex.h" +#include "SAnimatedMesh.h" +#include "SceneParameters.h" +#include "SColor.h" +#include "SExposedVideoData.h" +#include "SIrrCreationParameters.h" +#include "SKeyMap.h" +#include "SLight.h" +#include "SMaterial.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "SMeshBufferLightMap.h" +#include "SMeshBufferTangents.h" +#include "SParticle.h" +#include "SSharedMeshBuffer.h" +#include "SSkinMeshBuffer.h" +#include "SVertexIndex.h" +#include "SViewFrustum.h" +#include "triangle3d.h" +#include "vector2d.h" +#include "vector3d.h" + +/*! \mainpage Irrlicht Engine 1.8 API documentation + * + *
+ * + * \section intro Introduction + * + * Welcome to the Irrlicht Engine API documentation. + * Here you'll find any information you'll need to develop applications with + * the Irrlicht Engine. If you are looking for a tutorial on how to start, you'll + * find some on the homepage of the Irrlicht Engine at + * irrlicht.sourceforge.net + * or inside the SDK in the examples directory. + * + * The Irrlicht Engine is intended to be an easy-to-use 3d engine, so + * this documentation is an important part of it. If you have any questions or + * suggestions, just send a email to the author of the engine, Nikolaus Gebhardt + * (niko (at) irrlicht3d.org). + * + * + * \section links Links + * + * Namespaces: A very good place to start reading + * the documentation.
+ * Class list: List of all classes with descriptions.
+ * Class members: Good place to find forgotten features.
+ * + * \section irrexample Short example + * + * A simple application, starting up the engine, loading a Quake 2 animated + * model file and the corresponding texture, animating and displaying it + * in front of a blue background and placing a user controlable 3d camera + * would look like the following code. I think this example shows the usage + * of the engine quite well: + * + * \code + * #include + * using namespace irr; + * + * int main() + * { + * // start up the engine + * IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D8, + * core::dimension2d(640,480)); + * + * video::IVideoDriver* driver = device->getVideoDriver(); + * scene::ISceneManager* scenemgr = device->getSceneManager(); + * + * device->setWindowCaption(L"Hello World!"); + * + * // load and show quake2 .md2 model + * scene::ISceneNode* node = scenemgr->addAnimatedMeshSceneNode( + * scenemgr->getMesh("quake2model.md2")); + * + * // if everything worked, add a texture and disable lighting + * if (node) + * { + * node->setMaterialTexture(0, driver->getTexture("texture.bmp")); + * node->setMaterialFlag(video::EMF_LIGHTING, false); + * } + * + * // add a first person shooter style user controlled camera + * scenemgr->addCameraSceneNodeFPS(); + * + * // draw everything + * while(device->run() && driver) + * { + * driver->beginScene(true, true, video::SColor(255,0,0,255)); + * scenemgr->drawAll(); + * driver->endScene(); + * } + * + * // delete device + * device->drop(); + * return 0; + * } + * \endcode + * + * Irrlicht can load a lot of file formats automaticly, see irr::scene::ISceneManager::getMesh() + * for a detailed list. So if you would like to replace the simple blue screen background by + * a cool Quake 3 Map, optimized by an octree, just insert this code + * somewhere before the while loop: + * + * \code + * // add .pk3 archive to the file system + * device->getFileSystem()->addZipFileArchive("quake3map.pk3"); + * + * // load .bsp file and show it using an octree + * scenemgr->addOctreeSceneNode( + * scenemgr->getMesh("quake3map.bsp")); + * \endcode + * + * As you can see, the engine uses namespaces. Everything in the engine is + * placed into the namespace 'irr', but there are also 5 sub namespaces. + * You can find a list of all namespaces with descriptions at the + * namespaces page. + * This is also a good place to start reading the documentation. If you + * don't want to write the namespace names all the time, just use all namespaces like + * this: + * \code + * using namespace core; + * using namespace scene; + * using namespace video; + * using namespace io; + * using namespace gui; + * \endcode + * + * There is a lot more the engine can do, but I hope this gave a short + * overview over the basic features of the engine. For more examples, please take + * a look into the examples directory of the SDK. + */ + +#include "SIrrCreationParameters.h" + +//! Everything in the Irrlicht Engine can be found in this namespace. +namespace irr +{ + //! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine. + /** If you need more parameters to be passed to the creation of the Irrlicht Engine device, + use the createDeviceEx() function. + \param deviceType: Type of the device. This can currently be video::EDT_NULL, + video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, video::EDT_DIRECT3D9 and video::EDT_OPENGL. + \param windowSize: Size of the window or the video mode in fullscreen mode. + \param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode. + \param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise + the device runs in windowed mode. + \param stencilbuffer: Specifies if the stencil buffer should be enabled. Set this to true, + if you want the engine be able to draw stencil buffer shadows. Note that not all + devices are able to use the stencil buffer. If they don't no shadows will be drawn. + \param vsync: Specifies vertical syncronisation: If set to true, the driver will wait + for the vertical retrace period, otherwise not. + \param receiver: A user created event receiver. + \return Returns pointer to the created IrrlichtDevice or null if the + device could not be created. + */ + extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice( + video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE, + // parantheses are necessary for some compilers + const core::dimension2d& windowSize = (core::dimension2d(640,480)), + u32 bits = 16, + bool fullscreen = false, + bool stencilbuffer = false, + bool vsync = false, + IEventReceiver* receiver = 0); + + //! typedef for Function Pointer + typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )( + video::E_DRIVER_TYPE deviceType, + const core::dimension2d& windowSize, + u32 bits, + bool fullscreen, + bool stencilbuffer, + bool vsync, + IEventReceiver* receiver); + + + //! Creates an Irrlicht device with the option to specify advanced parameters. + /** Usually you should used createDevice() for creating an Irrlicht Engine device. + Use this function only if you wish to specify advanced parameters like a window + handle in which the device should be created. + \param parameters: Structure containing advanced parameters for the creation of the device. + See irr::SIrrlichtCreationParameters for details. + \return Returns pointer to the created IrrlichtDevice or null if the + device could not be created. */ + extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx( + const SIrrlichtCreationParameters& parameters); + + //! typedef for Function Pointer + typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDeviceEx )( const SIrrlichtCreationParameters& parameters ); + + + // THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES + // EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN. + + //! Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace. + namespace core + { + } + + //! The gui namespace contains useful classes for easy creation of a graphical user interface. + namespace gui + { + } + + //! This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ... + namespace io + { + } + + //! All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ... + namespace scene + { + } + + //! The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here. + namespace video + { + } +} + +/*! \file irrlicht.h + \brief Main header file of the irrlicht, the only file needed to include. +*/ + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrpack.h b/src/others/irrlicht-1.8.1/include/irrpack.h new file mode 100644 index 0000000..3cf643f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrpack.h @@ -0,0 +1,39 @@ +// Copyright (C) 2007-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// include this file right before the data structures to be 1-aligned +// and add to each structure the PACK_STRUCT define just like this: +// struct mystruct +// { +// ... +// } PACK_STRUCT; +// Always include the irrunpack.h file right after the last type declared +// like this, and do not put any other types with different alignment +// in between! + +// byte-align structures +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma warning(disable: 4103) +# pragma pack( push, packing ) +# pragma pack( 1 ) +# define PACK_STRUCT +#elif defined( __DMC__ ) +# pragma pack( push, 1 ) +# define PACK_STRUCT +#elif defined( __GNUC__ ) + // Using pragma pack might work with earlier gcc versions already, but + // it started to be necessary with gcc 4.7 on mingw unless compiled with -mno-ms-bitfields. + // And I found some hints on the web that older gcc versions on the other hand had sometimes + // trouble with pragma pack while they worked with __attribute__((packed)). +# if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7) +# pragma pack( push, packing ) +# pragma pack( 1 ) +# define PACK_STRUCT +# else +# define PACK_STRUCT __attribute__((packed)) + #endif +#else +# error compiler not supported +#endif + diff --git a/src/others/irrlicht-1.8.1/include/irrunpack.h b/src/others/irrlicht-1.8.1/include/irrunpack.h new file mode 100644 index 0000000..b42398d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/irrunpack.h @@ -0,0 +1,20 @@ +// Copyright (C) 2007-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// include this file to switch back to default alignment +// file belongs to irrpack.h, see there for more info + +// Default alignment +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +# pragma pack( pop, packing ) +#elif defined (__DMC__) +# pragma pack( pop ) +#elif defined( __GNUC__ ) +# if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7) +# pragma pack( pop, packing ) +# endif +#endif + +#undef PACK_STRUCT + diff --git a/src/others/irrlicht-1.8.1/include/line2d.h b/src/others/irrlicht-1.8.1/include/line2d.h new file mode 100644 index 0000000..2a0dee4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/line2d.h @@ -0,0 +1,274 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_LINE_2D_H_INCLUDED__ +#define __IRR_LINE_2D_H_INCLUDED__ + +#include "irrTypes.h" +#include "vector2d.h" + +namespace irr +{ +namespace core +{ + +//! 2D line between two points with intersection methods. +template +class line2d +{ + public: + //! Default constructor for line going from (0,0) to (1,1). + line2d() : start(0,0), end(1,1) {} + //! Constructor for line between the two points. + line2d(T xa, T ya, T xb, T yb) : start(xa, ya), end(xb, yb) {} + //! Constructor for line between the two points given as vectors. + line2d(const vector2d& start, const vector2d& end) : start(start), end(end) {} + //! Copy constructor. + line2d(const line2d& other) : start(other.start), end(other.end) {} + + // operators + + line2d operator+(const vector2d& point) const { return line2d(start + point, end + point); } + line2d& operator+=(const vector2d& point) { start += point; end += point; return *this; } + + line2d operator-(const vector2d& point) const { return line2d(start - point, end - point); } + line2d& operator-=(const vector2d& point) { start -= point; end -= point; return *this; } + + bool operator==(const line2d& other) const + { return (start==other.start && end==other.end) || (end==other.start && start==other.end);} + bool operator!=(const line2d& other) const + { return !(start==other.start && end==other.end) || (end==other.start && start==other.end);} + + // functions + //! Set this line to new line going through the two points. + void setLine(const T& xa, const T& ya, const T& xb, const T& yb){start.set(xa, ya); end.set(xb, yb);} + //! Set this line to new line going through the two points. + void setLine(const vector2d& nstart, const vector2d& nend){start.set(nstart); end.set(nend);} + //! Set this line to new line given as parameter. + void setLine(const line2d& line){start.set(line.start); end.set(line.end);} + + //! Get length of line + /** \return Length of the line. */ + T getLength() const { return start.getDistanceFrom(end); } + + //! Get squared length of the line + /** \return Squared length of line. */ + T getLengthSQ() const { return start.getDistanceFromSQ(end); } + + //! Get middle of the line + /** \return center of the line. */ + vector2d getMiddle() const + { + return (start + end)/(T)2; + } + + //! Get the vector of the line. + /** \return The vector of the line. */ + vector2d getVector() const { return vector2d(end.X - start.X, end.Y - start.Y); } + + //! Tests if this line intersects with another line. + /** \param l: Other line to test intersection with. + \param checkOnlySegments: Default is to check intersection between the begin and endpoints. + When set to false the function will check for the first intersection point when extending the lines. + \param out: If there is an intersection, the location of the + intersection will be stored in this vector. + \return True if there is an intersection, false if not. */ + bool intersectWith(const line2d& l, vector2d& out, bool checkOnlySegments=true) const + { + // Uses the method given at: + // http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ + const f32 commonDenominator = (f32)(l.end.Y - l.start.Y)*(end.X - start.X) - + (l.end.X - l.start.X)*(end.Y - start.Y); + + const f32 numeratorA = (f32)(l.end.X - l.start.X)*(start.Y - l.start.Y) - + (l.end.Y - l.start.Y)*(start.X -l.start.X); + + const f32 numeratorB = (f32)(end.X - start.X)*(start.Y - l.start.Y) - + (end.Y - start.Y)*(start.X -l.start.X); + + if(equals(commonDenominator, 0.f)) + { + // The lines are either coincident or parallel + // if both numerators are 0, the lines are coincident + if(equals(numeratorA, 0.f) && equals(numeratorB, 0.f)) + { + // Try and find a common endpoint + if(l.start == start || l.end == start) + out = start; + else if(l.end == end || l.start == end) + out = end; + // now check if the two segments are disjunct + else if (l.start.X>start.X && l.end.X>start.X && l.start.X>end.X && l.end.X>end.X) + return false; + else if (l.start.Y>start.Y && l.end.Y>start.Y && l.start.Y>end.Y && l.end.Y>end.Y) + return false; + else if (l.start.X maxp; + vector2d minp; + if ((start.X>l.start.X && start.X>l.end.X && start.X>end.X) || (start.Y>l.start.Y && start.Y>l.end.Y && start.Y>end.Y)) + maxp=start; + else if ((end.X>l.start.X && end.X>l.end.X && end.X>start.X) || (end.Y>l.start.Y && end.Y>l.end.Y && end.Y>start.Y)) + maxp=end; + else if ((l.start.X>start.X && l.start.X>l.end.X && l.start.X>end.X) || (l.start.Y>start.Y && l.start.Y>l.end.Y && l.start.Y>end.Y)) + maxp=l.start; + else + maxp=l.end; + if (maxp != start && ((start.X(); + if (start != maxp && start != minp) + out += start; + if (end != maxp && end != minp) + out += end; + if (l.start != maxp && l.start != minp) + out += l.start; + if (l.end != maxp && l.end != minp) + out += l.end; + out.X = (T)(out.X/2); + out.Y = (T)(out.Y/2); + } + + return true; // coincident + } + + return false; // parallel + } + + // Get the point of intersection on this line, checking that + // it is within the line segment. + const f32 uA = numeratorA / commonDenominator; + if(checkOnlySegments && (uA < 0.f || uA > 1.f) ) + return false; // Outside the line segment + + const f32 uB = numeratorB / commonDenominator; + if(checkOnlySegments && (uB < 0.f || uB > 1.f)) + return false; // Outside the line segment + + // Calculate the intersection point. + out.X = (T)(start.X + uA * (end.X - start.X)); + out.Y = (T)(start.Y + uA * (end.Y - start.Y)); + return true; + } + + //! Get unit vector of the line. + /** \return Unit vector of this line. */ + vector2d getUnitVector() const + { + T len = (T)(1.0 / getLength()); + return vector2d((end.X - start.X) * len, (end.Y - start.Y) * len); + } + + //! Get angle between this line and given line. + /** \param l Other line for test. + \return Angle in degrees. */ + f64 getAngleWith(const line2d& l) const + { + vector2d vect = getVector(); + vector2d vect2 = l.getVector(); + return vect.getAngleWith(vect2); + } + + //! Tells us if the given point lies to the left, right, or on the line. + /** \return 0 if the point is on the line + <0 if to the left, or >0 if to the right. */ + T getPointOrientation(const vector2d& point) const + { + return ( (end.X - start.X) * (point.Y - start.Y) - + (point.X - start.X) * (end.Y - start.Y) ); + } + + //! Check if the given point is a member of the line + /** \return True if point is between start and end, else false. */ + bool isPointOnLine(const vector2d& point) const + { + T d = getPointOrientation(point); + return (d == 0 && point.isBetweenPoints(start, end)); + } + + //! Check if the given point is between start and end of the line. + /** Assumes that the point is already somewhere on the line. */ + bool isPointBetweenStartAndEnd(const vector2d& point) const + { + return point.isBetweenPoints(start, end); + } + + //! Get the closest point on this line to a point + /** \param checkOnlySegments: Default (true) is to return a point on the line-segment (between begin and end) of the line. + When set to false the function will check for the first the closest point on the the line even when outside the segment. */ + vector2d getClosestPoint(const vector2d& point, bool checkOnlySegments=true) const + { + vector2d c((f64)(point.X-start.X), (f64)(point.Y- start.Y)); + vector2d v((f64)(end.X-start.X), (f64)(end.Y-start.Y)); + f64 d = v.getLength(); + if ( d == 0 ) // can't tell much when the line is just a single point + return start; + v /= d; + f64 t = v.dotProduct(c); + + if ( checkOnlySegments ) + { + if (t < 0) return vector2d((T)start.X, (T)start.Y); + if (t > d) return vector2d((T)end.X, (T)end.Y); + } + + v *= t; + return vector2d((T)(start.X + v.X), (T)(start.Y + v.Y)); + } + + //! Start point of the line. + vector2d start; + //! End point of the line. + vector2d end; +}; + + // partial specialization to optimize lines (avoiding casts) + template <> + inline vector2df line2d::getClosestPoint(const vector2df& point, bool checkOnlySegments) const + { + vector2df c = point - start; + vector2df v = end - start; + f32 d = (f32)v.getLength(); + if ( d == 0 ) // can't tell much when the line is just a single point + return start; + v /= d; + f32 t = v.dotProduct(c); + + if ( checkOnlySegments ) + { + if (t < 0) return start; + if (t > d) return end; + } + + v *= t; + return start + v; + } + + + //! Typedef for an f32 line. + typedef line2d line2df; + //! Typedef for an integer line. + typedef line2d line2di; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/line3d.h b/src/others/irrlicht-1.8.1/include/line3d.h new file mode 100644 index 0000000..6ec4e70 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/line3d.h @@ -0,0 +1,144 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_LINE_3D_H_INCLUDED__ +#define __IRR_LINE_3D_H_INCLUDED__ + +#include "irrTypes.h" +#include "vector3d.h" + +namespace irr +{ +namespace core +{ + +//! 3D line between two points with intersection methods. +template +class line3d +{ + public: + + //! Default constructor + /** line from (0,0,0) to (1,1,1) */ + line3d() : start(0,0,0), end(1,1,1) {} + //! Constructor with two points + line3d(T xa, T ya, T za, T xb, T yb, T zb) : start(xa, ya, za), end(xb, yb, zb) {} + //! Constructor with two points as vectors + line3d(const vector3d& start, const vector3d& end) : start(start), end(end) {} + + // operators + + line3d operator+(const vector3d& point) const { return line3d(start + point, end + point); } + line3d& operator+=(const vector3d& point) { start += point; end += point; return *this; } + + line3d operator-(const vector3d& point) const { return line3d(start - point, end - point); } + line3d& operator-=(const vector3d& point) { start -= point; end -= point; return *this; } + + bool operator==(const line3d& other) const + { return (start==other.start && end==other.end) || (end==other.start && start==other.end);} + bool operator!=(const line3d& other) const + { return !(start==other.start && end==other.end) || (end==other.start && start==other.end);} + + // functions + //! Set this line to a new line going through the two points. + void setLine(const T& xa, const T& ya, const T& za, const T& xb, const T& yb, const T& zb) + {start.set(xa, ya, za); end.set(xb, yb, zb);} + //! Set this line to a new line going through the two points. + void setLine(const vector3d& nstart, const vector3d& nend) + {start.set(nstart); end.set(nend);} + //! Set this line to new line given as parameter. + void setLine(const line3d& line) + {start.set(line.start); end.set(line.end);} + + //! Get length of line + /** \return Length of line. */ + T getLength() const { return start.getDistanceFrom(end); } + + //! Get squared length of line + /** \return Squared length of line. */ + T getLengthSQ() const { return start.getDistanceFromSQ(end); } + + //! Get middle of line + /** \return Center of line. */ + vector3d getMiddle() const + { + return (start + end)/(T)2; + } + + //! Get vector of line + /** \return vector of line. */ + vector3d getVector() const + { + return end - start; + } + + //! Check if the given point is between start and end of the line. + /** Assumes that the point is already somewhere on the line. + \param point The point to test. + \return True if point is on the line between start and end, else false. + */ + bool isPointBetweenStartAndEnd(const vector3d& point) const + { + return point.isBetweenPoints(start, end); + } + + //! Get the closest point on this line to a point + /** \param point The point to compare to. + \return The nearest point which is part of the line. */ + vector3d getClosestPoint(const vector3d& point) const + { + vector3d c = point - start; + vector3d v = end - start; + T d = (T)v.getLength(); + v /= d; + T t = v.dotProduct(c); + + if (t < (T)0.0) + return start; + if (t > d) + return end; + + v *= t; + return start + v; + } + + //! Check if the line intersects with a shpere + /** \param sorigin: Origin of the shpere. + \param sradius: Radius of the sphere. + \param outdistance: The distance to the first intersection point. + \return True if there is an intersection. + If there is one, the distance to the first intersection point + is stored in outdistance. */ + bool getIntersectionWithSphere(vector3d sorigin, T sradius, f64& outdistance) const + { + const vector3d q = sorigin - start; + T c = q.getLength(); + T v = q.dotProduct(getVector().normalize()); + T d = sradius * sradius - (c*c - v*v); + + if (d < 0.0) + return false; + + outdistance = v - core::squareroot ( d ); + return true; + } + + // member variables + + //! Start point of line + vector3d start; + //! End point of line + vector3d end; +}; + + //! Typedef for an f32 line. + typedef line3d line3df; + //! Typedef for an integer line. + typedef line3d line3di; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/matrix4.h b/src/others/irrlicht-1.8.1/include/matrix4.h new file mode 100644 index 0000000..df1e4ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/matrix4.h @@ -0,0 +1,2242 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_MATRIX_H_INCLUDED__ +#define __IRR_MATRIX_H_INCLUDED__ + +#include "irrMath.h" +#include "vector3d.h" +#include "vector2d.h" +#include "plane3d.h" +#include "aabbox3d.h" +#include "rect.h" +#include "irrString.h" + +// enable this to keep track of changes to the matrix +// and make simpler identity check for seldomly changing matrices +// otherwise identity check will always compare the elements +//#define USE_MATRIX_TEST + +// this is only for debugging purposes +//#define USE_MATRIX_TEST_DEBUG + +#if defined( USE_MATRIX_TEST_DEBUG ) + +struct MatrixTest +{ + MatrixTest () : ID(0), Calls(0) {} + char buf[256]; + int Calls; + int ID; +}; +static MatrixTest MTest; + +#endif + +namespace irr +{ +namespace core +{ + + //! 4x4 matrix. Mostly used as transformation matrix for 3d calculations. + /** The matrix is a D3D style matrix, row major with translations in the 4th row. */ + template + class CMatrix4 + { + public: + + //! Constructor Flags + enum eConstructor + { + EM4CONST_NOTHING = 0, + EM4CONST_COPY, + EM4CONST_IDENTITY, + EM4CONST_TRANSPOSED, + EM4CONST_INVERSE, + EM4CONST_INVERSE_TRANSPOSED + }; + + //! Default constructor + /** \param constructor Choose the initialization style */ + CMatrix4( eConstructor constructor = EM4CONST_IDENTITY ); + //! Copy constructor + /** \param other Other matrix to copy from + \param constructor Choose the initialization style */ + CMatrix4(const CMatrix4& other, eConstructor constructor = EM4CONST_COPY); + + //! Simple operator for directly accessing every element of the matrix. + T& operator()(const s32 row, const s32 col) + { +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return M[ row * 4 + col ]; + } + + //! Simple operator for directly accessing every element of the matrix. + const T& operator()(const s32 row, const s32 col) const { return M[row * 4 + col]; } + + //! Simple operator for linearly accessing every element of the matrix. + T& operator[](u32 index) + { +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return M[index]; + } + + //! Simple operator for linearly accessing every element of the matrix. + const T& operator[](u32 index) const { return M[index]; } + + //! Sets this matrix equal to the other matrix. + inline CMatrix4& operator=(const CMatrix4 &other); + + //! Sets all elements of this matrix to the value. + inline CMatrix4& operator=(const T& scalar); + + //! Returns pointer to internal array + const T* pointer() const { return M; } + T* pointer() + { +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return M; + } + + //! Returns true if other matrix is equal to this matrix. + bool operator==(const CMatrix4 &other) const; + + //! Returns true if other matrix is not equal to this matrix. + bool operator!=(const CMatrix4 &other) const; + + //! Add another matrix. + CMatrix4 operator+(const CMatrix4& other) const; + + //! Add another matrix. + CMatrix4& operator+=(const CMatrix4& other); + + //! Subtract another matrix. + CMatrix4 operator-(const CMatrix4& other) const; + + //! Subtract another matrix. + CMatrix4& operator-=(const CMatrix4& other); + + //! set this matrix to the product of two matrices + /** Calculate b*a */ + inline CMatrix4& setbyproduct(const CMatrix4& other_a,const CMatrix4& other_b ); + + //! Set this matrix to the product of two matrices + /** Calculate b*a, no optimization used, + use it if you know you never have a identity matrix */ + CMatrix4& setbyproduct_nocheck(const CMatrix4& other_a,const CMatrix4& other_b ); + + //! Multiply by another matrix. + /** Calculate other*this */ + CMatrix4 operator*(const CMatrix4& other) const; + + //! Multiply by another matrix. + /** Calculate and return other*this */ + CMatrix4& operator*=(const CMatrix4& other); + + //! Multiply by scalar. + CMatrix4 operator*(const T& scalar) const; + + //! Multiply by scalar. + CMatrix4& operator*=(const T& scalar); + + //! Set matrix to identity. + inline CMatrix4& makeIdentity(); + + //! Returns true if the matrix is the identity matrix + inline bool isIdentity() const; + + //! Returns true if the matrix is orthogonal + inline bool isOrthogonal() const; + + //! Returns true if the matrix is the identity matrix + bool isIdentity_integer_base () const; + + //! Set the translation of the current matrix. Will erase any previous values. + CMatrix4& setTranslation( const vector3d& translation ); + + //! Gets the current translation + vector3d getTranslation() const; + + //! Set the inverse translation of the current matrix. Will erase any previous values. + CMatrix4& setInverseTranslation( const vector3d& translation ); + + //! Make a rotation matrix from Euler angles. The 4th row and column are unmodified. + inline CMatrix4& setRotationRadians( const vector3d& rotation ); + + //! Make a rotation matrix from Euler angles. The 4th row and column are unmodified. + CMatrix4& setRotationDegrees( const vector3d& rotation ); + + //! Returns the rotation, as set by setRotation(). + /** This code was orginally written by by Chev. */ + core::vector3d getRotationDegrees() const; + + //! Make an inverted rotation matrix from Euler angles. + /** The 4th row and column are unmodified. */ + inline CMatrix4& setInverseRotationRadians( const vector3d& rotation ); + + //! Make an inverted rotation matrix from Euler angles. + /** The 4th row and column are unmodified. */ + inline CMatrix4& setInverseRotationDegrees( const vector3d& rotation ); + + //! Make a rotation matrix from angle and axis, assuming left handed rotation. + /** The 4th row and column are unmodified. */ + inline CMatrix4& setRotationAxisRadians(const T& angle, const vector3d& axis); + + //! Set Scale + CMatrix4& setScale( const vector3d& scale ); + + //! Set Scale + CMatrix4& setScale( const T scale ) { return setScale(core::vector3d(scale,scale,scale)); } + + //! Get Scale + core::vector3d getScale() const; + + //! Translate a vector by the inverse of the translation part of this matrix. + void inverseTranslateVect( vector3df& vect ) const; + + //! Rotate a vector by the inverse of the rotation part of this matrix. + void inverseRotateVect( vector3df& vect ) const; + + //! Rotate a vector by the rotation part of this matrix. + void rotateVect( vector3df& vect ) const; + + //! An alternate transform vector method, writing into a second vector + void rotateVect(core::vector3df& out, const core::vector3df& in) const; + + //! An alternate transform vector method, writing into an array of 3 floats + void rotateVect(T *out,const core::vector3df &in) const; + + //! Transforms the vector by this matrix + void transformVect( vector3df& vect) const; + + //! Transforms input vector by this matrix and stores result in output vector + void transformVect( vector3df& out, const vector3df& in ) const; + + //! An alternate transform vector method, writing into an array of 4 floats + void transformVect(T *out,const core::vector3df &in) const; + + //! An alternate transform vector method, reading from and writing to an array of 3 floats + void transformVec3(T *out, const T * in) const; + + //! Translate a vector by the translation part of this matrix. + void translateVect( vector3df& vect ) const; + + //! Transforms a plane by this matrix + void transformPlane( core::plane3d &plane) const; + + //! Transforms a plane by this matrix + void transformPlane( const core::plane3d &in, core::plane3d &out) const; + + //! Transforms a axis aligned bounding box + /** The result box of this operation may not be accurate at all. For + correct results, use transformBoxEx() */ + void transformBox(core::aabbox3d& box) const; + + //! Transforms a axis aligned bounding box + /** The result box of this operation should by accurate, but this operation + is slower than transformBox(). */ + void transformBoxEx(core::aabbox3d& box) const; + + //! Multiplies this matrix by a 1x4 matrix + void multiplyWith1x4Matrix(T* matrix) const; + + //! Calculates inverse of matrix. Slow. + /** \return Returns false if there is no inverse matrix.*/ + bool makeInverse(); + + + //! Inverts a primitive matrix which only contains a translation and a rotation + /** \param out: where result matrix is written to. */ + bool getInversePrimitive ( CMatrix4& out ) const; + + //! Gets the inversed matrix of this one + /** \param out: where result matrix is written to. + \return Returns false if there is no inverse matrix. */ + bool getInverse(CMatrix4& out) const; + + //! Builds a right-handed perspective projection matrix based on a field of view + CMatrix4& buildProjectionMatrixPerspectiveFovRH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar); + + //! Builds a left-handed perspective projection matrix based on a field of view + CMatrix4& buildProjectionMatrixPerspectiveFovLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar); + + //! Builds a left-handed perspective projection matrix based on a field of view, with far plane at infinity + CMatrix4& buildProjectionMatrixPerspectiveFovInfinityLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon=0); + + //! Builds a right-handed perspective projection matrix. + CMatrix4& buildProjectionMatrixPerspectiveRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + + //! Builds a left-handed perspective projection matrix. + CMatrix4& buildProjectionMatrixPerspectiveLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + + //! Builds a left-handed orthogonal projection matrix. + CMatrix4& buildProjectionMatrixOrthoLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + + //! Builds a right-handed orthogonal projection matrix. + CMatrix4& buildProjectionMatrixOrthoRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); + + //! Builds a left-handed look-at matrix. + CMatrix4& buildCameraLookAtMatrixLH( + const vector3df& position, + const vector3df& target, + const vector3df& upVector); + + //! Builds a right-handed look-at matrix. + CMatrix4& buildCameraLookAtMatrixRH( + const vector3df& position, + const vector3df& target, + const vector3df& upVector); + + //! Builds a matrix that flattens geometry into a plane. + /** \param light: light source + \param plane: plane into which the geometry if flattened into + \param point: value between 0 and 1, describing the light source. + If this is 1, it is a point light, if it is 0, it is a directional light. */ + CMatrix4& buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point=1.0f); + + //! Builds a matrix which transforms a normalized Device Coordinate to Device Coordinates. + /** Used to scale <-1,-1><1,1> to viewport, for example from <-1,-1> <1,1> to the viewport <0,0><0,640> */ + CMatrix4& buildNDCToDCMatrix( const core::rect& area, f32 zScale); + + //! Creates a new matrix as interpolated matrix from two other ones. + /** \param b: other matrix to interpolate with + \param time: Must be a value between 0 and 1. */ + CMatrix4 interpolate(const core::CMatrix4& b, f32 time) const; + + //! Gets transposed matrix + CMatrix4 getTransposed() const; + + //! Gets transposed matrix + inline void getTransposed( CMatrix4& dest ) const; + + //! Builds a matrix that rotates from one vector to another + /** \param from: vector to rotate from + \param to: vector to rotate to + */ + CMatrix4& buildRotateFromTo(const core::vector3df& from, const core::vector3df& to); + + //! Builds a combined matrix which translates to a center before rotation and translates from origin afterwards + /** \param center Position to rotate around + \param translate Translation applied after the rotation + */ + void setRotationCenter(const core::vector3df& center, const core::vector3df& translate); + + //! Builds a matrix which rotates a source vector to a look vector over an arbitrary axis + /** \param camPos: viewer position in world coo + \param center: object position in world-coo and rotation pivot + \param translation: object final translation from center + \param axis: axis to rotate about + \param from: source vector to rotate from + */ + void buildAxisAlignedBillboard(const core::vector3df& camPos, + const core::vector3df& center, + const core::vector3df& translation, + const core::vector3df& axis, + const core::vector3df& from); + + /* + construct 2D Texture transformations + rotate about center, scale, and transform. + */ + //! Set to a texture transformation matrix with the given parameters. + CMatrix4& buildTextureTransform( f32 rotateRad, + const core::vector2df &rotatecenter, + const core::vector2df &translate, + const core::vector2df &scale); + + //! Set texture transformation rotation + /** Rotate about z axis, recenter at (0.5,0.5). + Doesn't clear other elements than those affected + \param radAngle Angle in radians + \return Altered matrix */ + CMatrix4& setTextureRotationCenter( f32 radAngle ); + + //! Set texture transformation translation + /** Doesn't clear other elements than those affected. + \param x Offset on x axis + \param y Offset on y axis + \return Altered matrix */ + CMatrix4& setTextureTranslate( f32 x, f32 y ); + + //! Set texture transformation translation, using a transposed representation + /** Doesn't clear other elements than those affected. + \param x Offset on x axis + \param y Offset on y axis + \return Altered matrix */ + CMatrix4& setTextureTranslateTransposed( f32 x, f32 y ); + + //! Set texture transformation scale + /** Doesn't clear other elements than those affected. + \param sx Scale factor on x axis + \param sy Scale factor on y axis + \return Altered matrix. */ + CMatrix4& setTextureScale( f32 sx, f32 sy ); + + //! Set texture transformation scale, and recenter at (0.5,0.5) + /** Doesn't clear other elements than those affected. + \param sx Scale factor on x axis + \param sy Scale factor on y axis + \return Altered matrix. */ + CMatrix4& setTextureScaleCenter( f32 sx, f32 sy ); + + //! Sets all matrix data members at once + CMatrix4& setM(const T* data); + + //! Sets if the matrix is definitely identity matrix + void setDefinitelyIdentityMatrix( bool isDefinitelyIdentityMatrix); + + //! Gets if the matrix is definitely identity matrix + bool getDefinitelyIdentityMatrix() const; + + //! Compare two matrices using the equal method + bool equals(const core::CMatrix4& other, const T tolerance=(T)ROUNDING_ERROR_f64) const; + + private: + //! Matrix data, stored in row-major order + T M[16]; +#if defined ( USE_MATRIX_TEST ) + //! Flag is this matrix is identity matrix + mutable u32 definitelyIdentityMatrix; +#endif +#if defined ( USE_MATRIX_TEST_DEBUG ) + u32 id; + mutable u32 calls; +#endif + + }; + + // Default constructor + template + inline CMatrix4::CMatrix4( eConstructor constructor ) +#if defined ( USE_MATRIX_TEST ) + : definitelyIdentityMatrix(BIT_UNTESTED) +#endif +#if defined ( USE_MATRIX_TEST_DEBUG ) + ,id ( MTest.ID++), calls ( 0 ) +#endif + { + switch ( constructor ) + { + case EM4CONST_NOTHING: + case EM4CONST_COPY: + break; + case EM4CONST_IDENTITY: + case EM4CONST_INVERSE: + default: + makeIdentity(); + break; + } + } + + // Copy constructor + template + inline CMatrix4::CMatrix4( const CMatrix4& other, eConstructor constructor) +#if defined ( USE_MATRIX_TEST ) + : definitelyIdentityMatrix(BIT_UNTESTED) +#endif +#if defined ( USE_MATRIX_TEST_DEBUG ) + ,id ( MTest.ID++), calls ( 0 ) +#endif + { + switch ( constructor ) + { + case EM4CONST_IDENTITY: + makeIdentity(); + break; + case EM4CONST_NOTHING: + break; + case EM4CONST_COPY: + *this = other; + break; + case EM4CONST_TRANSPOSED: + other.getTransposed(*this); + break; + case EM4CONST_INVERSE: + if (!other.getInverse(*this)) + memset(M, 0, 16*sizeof(T)); + break; + case EM4CONST_INVERSE_TRANSPOSED: + if (!other.getInverse(*this)) + memset(M, 0, 16*sizeof(T)); + else + *this=getTransposed(); + break; + } + } + + //! Add another matrix. + template + inline CMatrix4 CMatrix4::operator+(const CMatrix4& other) const + { + CMatrix4 temp ( EM4CONST_NOTHING ); + + temp[0] = M[0]+other[0]; + temp[1] = M[1]+other[1]; + temp[2] = M[2]+other[2]; + temp[3] = M[3]+other[3]; + temp[4] = M[4]+other[4]; + temp[5] = M[5]+other[5]; + temp[6] = M[6]+other[6]; + temp[7] = M[7]+other[7]; + temp[8] = M[8]+other[8]; + temp[9] = M[9]+other[9]; + temp[10] = M[10]+other[10]; + temp[11] = M[11]+other[11]; + temp[12] = M[12]+other[12]; + temp[13] = M[13]+other[13]; + temp[14] = M[14]+other[14]; + temp[15] = M[15]+other[15]; + + return temp; + } + + //! Add another matrix. + template + inline CMatrix4& CMatrix4::operator+=(const CMatrix4& other) + { + M[0]+=other[0]; + M[1]+=other[1]; + M[2]+=other[2]; + M[3]+=other[3]; + M[4]+=other[4]; + M[5]+=other[5]; + M[6]+=other[6]; + M[7]+=other[7]; + M[8]+=other[8]; + M[9]+=other[9]; + M[10]+=other[10]; + M[11]+=other[11]; + M[12]+=other[12]; + M[13]+=other[13]; + M[14]+=other[14]; + M[15]+=other[15]; + + return *this; + } + + //! Subtract another matrix. + template + inline CMatrix4 CMatrix4::operator-(const CMatrix4& other) const + { + CMatrix4 temp ( EM4CONST_NOTHING ); + + temp[0] = M[0]-other[0]; + temp[1] = M[1]-other[1]; + temp[2] = M[2]-other[2]; + temp[3] = M[3]-other[3]; + temp[4] = M[4]-other[4]; + temp[5] = M[5]-other[5]; + temp[6] = M[6]-other[6]; + temp[7] = M[7]-other[7]; + temp[8] = M[8]-other[8]; + temp[9] = M[9]-other[9]; + temp[10] = M[10]-other[10]; + temp[11] = M[11]-other[11]; + temp[12] = M[12]-other[12]; + temp[13] = M[13]-other[13]; + temp[14] = M[14]-other[14]; + temp[15] = M[15]-other[15]; + + return temp; + } + + //! Subtract another matrix. + template + inline CMatrix4& CMatrix4::operator-=(const CMatrix4& other) + { + M[0]-=other[0]; + M[1]-=other[1]; + M[2]-=other[2]; + M[3]-=other[3]; + M[4]-=other[4]; + M[5]-=other[5]; + M[6]-=other[6]; + M[7]-=other[7]; + M[8]-=other[8]; + M[9]-=other[9]; + M[10]-=other[10]; + M[11]-=other[11]; + M[12]-=other[12]; + M[13]-=other[13]; + M[14]-=other[14]; + M[15]-=other[15]; + + return *this; + } + + //! Multiply by scalar. + template + inline CMatrix4 CMatrix4::operator*(const T& scalar) const + { + CMatrix4 temp ( EM4CONST_NOTHING ); + + temp[0] = M[0]*scalar; + temp[1] = M[1]*scalar; + temp[2] = M[2]*scalar; + temp[3] = M[3]*scalar; + temp[4] = M[4]*scalar; + temp[5] = M[5]*scalar; + temp[6] = M[6]*scalar; + temp[7] = M[7]*scalar; + temp[8] = M[8]*scalar; + temp[9] = M[9]*scalar; + temp[10] = M[10]*scalar; + temp[11] = M[11]*scalar; + temp[12] = M[12]*scalar; + temp[13] = M[13]*scalar; + temp[14] = M[14]*scalar; + temp[15] = M[15]*scalar; + + return temp; + } + + //! Multiply by scalar. + template + inline CMatrix4& CMatrix4::operator*=(const T& scalar) + { + M[0]*=scalar; + M[1]*=scalar; + M[2]*=scalar; + M[3]*=scalar; + M[4]*=scalar; + M[5]*=scalar; + M[6]*=scalar; + M[7]*=scalar; + M[8]*=scalar; + M[9]*=scalar; + M[10]*=scalar; + M[11]*=scalar; + M[12]*=scalar; + M[13]*=scalar; + M[14]*=scalar; + M[15]*=scalar; + + return *this; + } + + //! Multiply by another matrix. + template + inline CMatrix4& CMatrix4::operator*=(const CMatrix4& other) + { +#if defined ( USE_MATRIX_TEST ) + // do checks on your own in order to avoid copy creation + if ( !other.isIdentity() ) + { + if ( this->isIdentity() ) + { + return (*this = other); + } + else + { + CMatrix4 temp ( *this ); + return setbyproduct_nocheck( temp, other ); + } + } + return *this; +#else + CMatrix4 temp ( *this ); + return setbyproduct_nocheck( temp, other ); +#endif + } + + //! multiply by another matrix + // set this matrix to the product of two other matrices + // goal is to reduce stack use and copy + template + inline CMatrix4& CMatrix4::setbyproduct_nocheck(const CMatrix4& other_a,const CMatrix4& other_b ) + { + const T *m1 = other_a.M; + const T *m2 = other_b.M; + + M[0] = m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3]; + M[1] = m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3]; + M[2] = m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3]; + M[3] = m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3]; + + M[4] = m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7]; + M[5] = m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7]; + M[6] = m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7]; + M[7] = m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7]; + + M[8] = m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11]; + M[9] = m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11]; + M[10] = m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11]; + M[11] = m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11]; + + M[12] = m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15]; + M[13] = m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15]; + M[14] = m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15]; + M[15] = m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15]; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + //! multiply by another matrix + // set this matrix to the product of two other matrices + // goal is to reduce stack use and copy + template + inline CMatrix4& CMatrix4::setbyproduct(const CMatrix4& other_a, const CMatrix4& other_b ) + { +#if defined ( USE_MATRIX_TEST ) + if ( other_a.isIdentity () ) + return (*this = other_b); + else + if ( other_b.isIdentity () ) + return (*this = other_a); + else + return setbyproduct_nocheck(other_a,other_b); +#else + return setbyproduct_nocheck(other_a,other_b); +#endif + } + + //! multiply by another matrix + template + inline CMatrix4 CMatrix4::operator*(const CMatrix4& m2) const + { +#if defined ( USE_MATRIX_TEST ) + // Testing purpose.. + if ( this->isIdentity() ) + return m2; + if ( m2.isIdentity() ) + return *this; +#endif + + CMatrix4 m3 ( EM4CONST_NOTHING ); + + const T *m1 = M; + + m3[0] = m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3]; + m3[1] = m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3]; + m3[2] = m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3]; + m3[3] = m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3]; + + m3[4] = m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7]; + m3[5] = m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7]; + m3[6] = m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7]; + m3[7] = m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7]; + + m3[8] = m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11]; + m3[9] = m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11]; + m3[10] = m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11]; + m3[11] = m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11]; + + m3[12] = m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15]; + m3[13] = m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15]; + m3[14] = m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15]; + m3[15] = m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15]; + return m3; + } + + + + template + inline vector3d CMatrix4::getTranslation() const + { + return vector3d(M[12], M[13], M[14]); + } + + + template + inline CMatrix4& CMatrix4::setTranslation( const vector3d& translation ) + { + M[12] = translation.X; + M[13] = translation.Y; + M[14] = translation.Z; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + template + inline CMatrix4& CMatrix4::setInverseTranslation( const vector3d& translation ) + { + M[12] = -translation.X; + M[13] = -translation.Y; + M[14] = -translation.Z; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + template + inline CMatrix4& CMatrix4::setScale( const vector3d& scale ) + { + M[0] = scale.X; + M[5] = scale.Y; + M[10] = scale.Z; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + //! Returns the absolute values of the scales of the matrix. + /** + Note that this returns the absolute (positive) values unless only scale is set. + Unfortunately it does not appear to be possible to extract any original negative + values. The best that we could do would be to arbitrarily make one scale + negative if one or three of them were negative. + FIXME - return the original values. + */ + template + inline vector3d CMatrix4::getScale() const + { + // See http://www.robertblum.com/articles/2005/02/14/decomposing-matrices + + // Deal with the 0 rotation case first + // Prior to Irrlicht 1.6, we always returned this value. + if(core::iszero(M[1]) && core::iszero(M[2]) && + core::iszero(M[4]) && core::iszero(M[6]) && + core::iszero(M[8]) && core::iszero(M[9])) + return vector3d(M[0], M[5], M[10]); + + // We have to do the full calculation. + return vector3d(sqrtf(M[0] * M[0] + M[1] * M[1] + M[2] * M[2]), + sqrtf(M[4] * M[4] + M[5] * M[5] + M[6] * M[6]), + sqrtf(M[8] * M[8] + M[9] * M[9] + M[10] * M[10])); + } + + template + inline CMatrix4& CMatrix4::setRotationDegrees( const vector3d& rotation ) + { + return setRotationRadians( rotation * core::DEGTORAD ); + } + + template + inline CMatrix4& CMatrix4::setInverseRotationDegrees( const vector3d& rotation ) + { + return setInverseRotationRadians( rotation * core::DEGTORAD ); + } + + template + inline CMatrix4& CMatrix4::setRotationRadians( const vector3d& rotation ) + { + const f64 cr = cos( rotation.X ); + const f64 sr = sin( rotation.X ); + const f64 cp = cos( rotation.Y ); + const f64 sp = sin( rotation.Y ); + const f64 cy = cos( rotation.Z ); + const f64 sy = sin( rotation.Z ); + + M[0] = (T)( cp*cy ); + M[1] = (T)( cp*sy ); + M[2] = (T)( -sp ); + + const f64 srsp = sr*sp; + const f64 crsp = cr*sp; + + M[4] = (T)( srsp*cy-cr*sy ); + M[5] = (T)( srsp*sy+cr*cy ); + M[6] = (T)( sr*cp ); + + M[8] = (T)( crsp*cy+sr*sy ); + M[9] = (T)( crsp*sy-sr*cy ); + M[10] = (T)( cr*cp ); +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + //! Returns a rotation that is equivalent to that set by setRotationDegrees(). + /** This code was sent in by Chev. Note that it does not necessarily return + the *same* Euler angles as those set by setRotationDegrees(), but the rotation will + be equivalent, i.e. will have the same result when used to rotate a vector or node. */ + template + inline core::vector3d CMatrix4::getRotationDegrees() const + { + const CMatrix4 &mat = *this; + core::vector3d scale = getScale(); + // we need to check for negative scale on to axes, which would bring up wrong results + if (scale.Y<0 && scale.Z<0) + { + scale.Y =-scale.Y; + scale.Z =-scale.Z; + } + else if (scale.X<0 && scale.Z<0) + { + scale.X =-scale.X; + scale.Z =-scale.Z; + } + else if (scale.X<0 && scale.Y<0) + { + scale.X =-scale.X; + scale.Y =-scale.Y; + } + const core::vector3d invScale(core::reciprocal(scale.X),core::reciprocal(scale.Y),core::reciprocal(scale.Z)); + + f64 Y = -asin(core::clamp(mat[2]*invScale.X, -1.0, 1.0)); + const f64 C = cos(Y); + Y *= RADTODEG64; + + f64 rotx, roty, X, Z; + + if (!core::iszero(C)) + { + const f64 invC = core::reciprocal(C); + rotx = mat[10] * invC * invScale.Z; + roty = mat[6] * invC * invScale.Y; + X = atan2( roty, rotx ) * RADTODEG64; + rotx = mat[0] * invC * invScale.X; + roty = mat[1] * invC * invScale.X; + Z = atan2( roty, rotx ) * RADTODEG64; + } + else + { + X = 0.0; + rotx = mat[5] * invScale.Y; + roty = -mat[4] * invScale.Y; + Z = atan2( roty, rotx ) * RADTODEG64; + } + + // fix values that get below zero + if (X < 0.0) X += 360.0; + if (Y < 0.0) Y += 360.0; + if (Z < 0.0) Z += 360.0; + + return vector3d((T)X,(T)Y,(T)Z); + } + + + //! Sets matrix to rotation matrix of inverse angles given as parameters + template + inline CMatrix4& CMatrix4::setInverseRotationRadians( const vector3d& rotation ) + { + f64 cr = cos( rotation.X ); + f64 sr = sin( rotation.X ); + f64 cp = cos( rotation.Y ); + f64 sp = sin( rotation.Y ); + f64 cy = cos( rotation.Z ); + f64 sy = sin( rotation.Z ); + + M[0] = (T)( cp*cy ); + M[4] = (T)( cp*sy ); + M[8] = (T)( -sp ); + + f64 srsp = sr*sp; + f64 crsp = cr*sp; + + M[1] = (T)( srsp*cy-cr*sy ); + M[5] = (T)( srsp*sy+cr*cy ); + M[9] = (T)( sr*cp ); + + M[2] = (T)( crsp*cy+sr*sy ); + M[6] = (T)( crsp*sy-sr*cy ); + M[10] = (T)( cr*cp ); +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + //! Sets matrix to rotation matrix defined by axis and angle, assuming LH rotation + template + inline CMatrix4& CMatrix4::setRotationAxisRadians( const T& angle, const vector3d& axis ) + { + const f64 c = cos(angle); + const f64 s = sin(angle); + const f64 t = 1.0 - c; + + const f64 tx = t * axis.X; + const f64 ty = t * axis.Y; + const f64 tz = t * axis.Z; + + const f64 sx = s * axis.X; + const f64 sy = s * axis.Y; + const f64 sz = s * axis.Z; + + M[0] = (T)(tx * axis.X + c); + M[1] = (T)(tx * axis.Y + sz); + M[2] = (T)(tx * axis.Z - sy); + + M[4] = (T)(ty * axis.X - sz); + M[5] = (T)(ty * axis.Y + c); + M[6] = (T)(ty * axis.Z + sx); + + M[8] = (T)(tz * axis.X + sy); + M[9] = (T)(tz * axis.Y - sx); + M[10] = (T)(tz * axis.Z + c); + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + /*! + */ + template + inline CMatrix4& CMatrix4::makeIdentity() + { + memset(M, 0, 16*sizeof(T)); + M[0] = M[5] = M[10] = M[15] = (T)1; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=true; +#endif + return *this; + } + + + /* + check identity with epsilon + solve floating range problems.. + */ + template + inline bool CMatrix4::isIdentity() const + { +#if defined ( USE_MATRIX_TEST ) + if (definitelyIdentityMatrix) + return true; +#endif + if (!core::equals( M[12], (T)0 ) || !core::equals( M[13], (T)0 ) || !core::equals( M[14], (T)0 ) || !core::equals( M[15], (T)1 )) + return false; + + if (!core::equals( M[ 0], (T)1 ) || !core::equals( M[ 1], (T)0 ) || !core::equals( M[ 2], (T)0 ) || !core::equals( M[ 3], (T)0 )) + return false; + + if (!core::equals( M[ 4], (T)0 ) || !core::equals( M[ 5], (T)1 ) || !core::equals( M[ 6], (T)0 ) || !core::equals( M[ 7], (T)0 )) + return false; + + if (!core::equals( M[ 8], (T)0 ) || !core::equals( M[ 9], (T)0 ) || !core::equals( M[10], (T)1 ) || !core::equals( M[11], (T)0 )) + return false; +/* + if (!core::equals( M[ 0], (T)1 ) || + !core::equals( M[ 5], (T)1 ) || + !core::equals( M[10], (T)1 ) || + !core::equals( M[15], (T)1 )) + return false; + + for (s32 i=0; i<4; ++i) + for (s32 j=0; j<4; ++j) + if ((j != i) && (!iszero((*this)(i,j)))) + return false; +*/ +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=true; +#endif + return true; + } + + + /* Check orthogonality of matrix. */ + template + inline bool CMatrix4::isOrthogonal() const + { + T dp=M[0] * M[4 ] + M[1] * M[5 ] + M[2 ] * M[6 ] + M[3 ] * M[7 ]; + if (!iszero(dp)) + return false; + dp = M[0] * M[8 ] + M[1] * M[9 ] + M[2 ] * M[10] + M[3 ] * M[11]; + if (!iszero(dp)) + return false; + dp = M[0] * M[12] + M[1] * M[13] + M[2 ] * M[14] + M[3 ] * M[15]; + if (!iszero(dp)) + return false; + dp = M[4] * M[8 ] + M[5] * M[9 ] + M[6 ] * M[10] + M[7 ] * M[11]; + if (!iszero(dp)) + return false; + dp = M[4] * M[12] + M[5] * M[13] + M[6 ] * M[14] + M[7 ] * M[15]; + if (!iszero(dp)) + return false; + dp = M[8] * M[12] + M[9] * M[13] + M[10] * M[14] + M[11] * M[15]; + return (iszero(dp)); + } + + + /* + doesn't solve floating range problems.. + but takes care on +/- 0 on translation because we are changing it.. + reducing floating point branches + but it needs the floats in memory.. + */ + template + inline bool CMatrix4::isIdentity_integer_base() const + { +#if defined ( USE_MATRIX_TEST ) + if (definitelyIdentityMatrix) + return true; +#endif + if(IR(M[0])!=F32_VALUE_1) return false; + if(IR(M[1])!=0) return false; + if(IR(M[2])!=0) return false; + if(IR(M[3])!=0) return false; + + if(IR(M[4])!=0) return false; + if(IR(M[5])!=F32_VALUE_1) return false; + if(IR(M[6])!=0) return false; + if(IR(M[7])!=0) return false; + + if(IR(M[8])!=0) return false; + if(IR(M[9])!=0) return false; + if(IR(M[10])!=F32_VALUE_1) return false; + if(IR(M[11])!=0) return false; + + if(IR(M[12])!=0) return false; + if(IR(M[13])!=0) return false; + if(IR(M[13])!=0) return false; + if(IR(M[15])!=F32_VALUE_1) return false; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=true; +#endif + return true; + } + + + template + inline void CMatrix4::rotateVect( vector3df& vect ) const + { + vector3df tmp = vect; + vect.X = tmp.X*M[0] + tmp.Y*M[4] + tmp.Z*M[8]; + vect.Y = tmp.X*M[1] + tmp.Y*M[5] + tmp.Z*M[9]; + vect.Z = tmp.X*M[2] + tmp.Y*M[6] + tmp.Z*M[10]; + } + + //! An alternate transform vector method, writing into a second vector + template + inline void CMatrix4::rotateVect(core::vector3df& out, const core::vector3df& in) const + { + out.X = in.X*M[0] + in.Y*M[4] + in.Z*M[8]; + out.Y = in.X*M[1] + in.Y*M[5] + in.Z*M[9]; + out.Z = in.X*M[2] + in.Y*M[6] + in.Z*M[10]; + } + + //! An alternate transform vector method, writing into an array of 3 floats + template + inline void CMatrix4::rotateVect(T *out, const core::vector3df& in) const + { + out[0] = in.X*M[0] + in.Y*M[4] + in.Z*M[8]; + out[1] = in.X*M[1] + in.Y*M[5] + in.Z*M[9]; + out[2] = in.X*M[2] + in.Y*M[6] + in.Z*M[10]; + } + + template + inline void CMatrix4::inverseRotateVect( vector3df& vect ) const + { + vector3df tmp = vect; + vect.X = tmp.X*M[0] + tmp.Y*M[1] + tmp.Z*M[2]; + vect.Y = tmp.X*M[4] + tmp.Y*M[5] + tmp.Z*M[6]; + vect.Z = tmp.X*M[8] + tmp.Y*M[9] + tmp.Z*M[10]; + } + + template + inline void CMatrix4::transformVect( vector3df& vect) const + { + f32 vector[3]; + + vector[0] = vect.X*M[0] + vect.Y*M[4] + vect.Z*M[8] + M[12]; + vector[1] = vect.X*M[1] + vect.Y*M[5] + vect.Z*M[9] + M[13]; + vector[2] = vect.X*M[2] + vect.Y*M[6] + vect.Z*M[10] + M[14]; + + vect.X = vector[0]; + vect.Y = vector[1]; + vect.Z = vector[2]; + } + + template + inline void CMatrix4::transformVect( vector3df& out, const vector3df& in) const + { + out.X = in.X*M[0] + in.Y*M[4] + in.Z*M[8] + M[12]; + out.Y = in.X*M[1] + in.Y*M[5] + in.Z*M[9] + M[13]; + out.Z = in.X*M[2] + in.Y*M[6] + in.Z*M[10] + M[14]; + } + + + template + inline void CMatrix4::transformVect(T *out, const core::vector3df &in) const + { + out[0] = in.X*M[0] + in.Y*M[4] + in.Z*M[8] + M[12]; + out[1] = in.X*M[1] + in.Y*M[5] + in.Z*M[9] + M[13]; + out[2] = in.X*M[2] + in.Y*M[6] + in.Z*M[10] + M[14]; + out[3] = in.X*M[3] + in.Y*M[7] + in.Z*M[11] + M[15]; + } + + template + inline void CMatrix4::transformVec3(T *out, const T * in) const + { + out[0] = in[0]*M[0] + in[1]*M[4] + in[2]*M[8] + M[12]; + out[1] = in[0]*M[1] + in[1]*M[5] + in[2]*M[9] + M[13]; + out[2] = in[0]*M[2] + in[1]*M[6] + in[2]*M[10] + M[14]; + } + + + //! Transforms a plane by this matrix + template + inline void CMatrix4::transformPlane( core::plane3d &plane) const + { + vector3df member; + // Transform the plane member point, i.e. rotate, translate and scale it. + transformVect(member, plane.getMemberPoint()); + + // Transform the normal by the transposed inverse of the matrix + CMatrix4 transposedInverse(*this, EM4CONST_INVERSE_TRANSPOSED); + vector3df normal = plane.Normal; + transposedInverse.transformVect(normal); + + plane.setPlane(member, normal); + } + + //! Transforms a plane by this matrix + template + inline void CMatrix4::transformPlane( const core::plane3d &in, core::plane3d &out) const + { + out = in; + transformPlane( out ); + } + + //! Transforms a axis aligned bounding box + template + inline void CMatrix4::transformBox(core::aabbox3d& box) const + { +#if defined ( USE_MATRIX_TEST ) + if (isIdentity()) + return; +#endif + + transformVect(box.MinEdge); + transformVect(box.MaxEdge); + box.repair(); + } + + //! Transforms a axis aligned bounding box more accurately than transformBox() + template + inline void CMatrix4::transformBoxEx(core::aabbox3d& box) const + { +#if defined ( USE_MATRIX_TEST ) + if (isIdentity()) + return; +#endif + + const f32 Amin[3] = {box.MinEdge.X, box.MinEdge.Y, box.MinEdge.Z}; + const f32 Amax[3] = {box.MaxEdge.X, box.MaxEdge.Y, box.MaxEdge.Z}; + + f32 Bmin[3]; + f32 Bmax[3]; + + Bmin[0] = Bmax[0] = M[12]; + Bmin[1] = Bmax[1] = M[13]; + Bmin[2] = Bmax[2] = M[14]; + + const CMatrix4 &m = *this; + + for (u32 i = 0; i < 3; ++i) + { + for (u32 j = 0; j < 3; ++j) + { + const f32 a = m(j,i) * Amin[j]; + const f32 b = m(j,i) * Amax[j]; + + if (a < b) + { + Bmin[i] += a; + Bmax[i] += b; + } + else + { + Bmin[i] += b; + Bmax[i] += a; + } + } + } + + box.MinEdge.X = Bmin[0]; + box.MinEdge.Y = Bmin[1]; + box.MinEdge.Z = Bmin[2]; + + box.MaxEdge.X = Bmax[0]; + box.MaxEdge.Y = Bmax[1]; + box.MaxEdge.Z = Bmax[2]; + } + + + //! Multiplies this matrix by a 1x4 matrix + template + inline void CMatrix4::multiplyWith1x4Matrix(T* matrix) const + { + /* + 0 1 2 3 + 4 5 6 7 + 8 9 10 11 + 12 13 14 15 + */ + + T mat[4]; + mat[0] = matrix[0]; + mat[1] = matrix[1]; + mat[2] = matrix[2]; + mat[3] = matrix[3]; + + matrix[0] = M[0]*mat[0] + M[4]*mat[1] + M[8]*mat[2] + M[12]*mat[3]; + matrix[1] = M[1]*mat[0] + M[5]*mat[1] + M[9]*mat[2] + M[13]*mat[3]; + matrix[2] = M[2]*mat[0] + M[6]*mat[1] + M[10]*mat[2] + M[14]*mat[3]; + matrix[3] = M[3]*mat[0] + M[7]*mat[1] + M[11]*mat[2] + M[15]*mat[3]; + } + + template + inline void CMatrix4::inverseTranslateVect( vector3df& vect ) const + { + vect.X = vect.X-M[12]; + vect.Y = vect.Y-M[13]; + vect.Z = vect.Z-M[14]; + } + + template + inline void CMatrix4::translateVect( vector3df& vect ) const + { + vect.X = vect.X+M[12]; + vect.Y = vect.Y+M[13]; + vect.Z = vect.Z+M[14]; + } + + + template + inline bool CMatrix4::getInverse(CMatrix4& out) const + { + /// Calculates the inverse of this Matrix + /// The inverse is calculated using Cramers rule. + /// If no inverse exists then 'false' is returned. + +#if defined ( USE_MATRIX_TEST ) + if ( this->isIdentity() ) + { + out=*this; + return true; + } +#endif + const CMatrix4 &m = *this; + + f32 d = (m(0, 0) * m(1, 1) - m(0, 1) * m(1, 0)) * (m(2, 2) * m(3, 3) - m(2, 3) * m(3, 2)) - + (m(0, 0) * m(1, 2) - m(0, 2) * m(1, 0)) * (m(2, 1) * m(3, 3) - m(2, 3) * m(3, 1)) + + (m(0, 0) * m(1, 3) - m(0, 3) * m(1, 0)) * (m(2, 1) * m(3, 2) - m(2, 2) * m(3, 1)) + + (m(0, 1) * m(1, 2) - m(0, 2) * m(1, 1)) * (m(2, 0) * m(3, 3) - m(2, 3) * m(3, 0)) - + (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) + + (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0)); + + if( core::iszero ( d, FLT_MIN ) ) + return false; + + d = core::reciprocal ( d ); + + out(0, 0) = d * (m(1, 1) * (m(2, 2) * m(3, 3) - m(2, 3) * m(3, 2)) + + m(1, 2) * (m(2, 3) * m(3, 1) - m(2, 1) * m(3, 3)) + + m(1, 3) * (m(2, 1) * m(3, 2) - m(2, 2) * m(3, 1))); + out(0, 1) = d * (m(2, 1) * (m(0, 2) * m(3, 3) - m(0, 3) * m(3, 2)) + + m(2, 2) * (m(0, 3) * m(3, 1) - m(0, 1) * m(3, 3)) + + m(2, 3) * (m(0, 1) * m(3, 2) - m(0, 2) * m(3, 1))); + out(0, 2) = d * (m(3, 1) * (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) + + m(3, 2) * (m(0, 3) * m(1, 1) - m(0, 1) * m(1, 3)) + + m(3, 3) * (m(0, 1) * m(1, 2) - m(0, 2) * m(1, 1))); + out(0, 3) = d * (m(0, 1) * (m(1, 3) * m(2, 2) - m(1, 2) * m(2, 3)) + + m(0, 2) * (m(1, 1) * m(2, 3) - m(1, 3) * m(2, 1)) + + m(0, 3) * (m(1, 2) * m(2, 1) - m(1, 1) * m(2, 2))); + out(1, 0) = d * (m(1, 2) * (m(2, 0) * m(3, 3) - m(2, 3) * m(3, 0)) + + m(1, 3) * (m(2, 2) * m(3, 0) - m(2, 0) * m(3, 2)) + + m(1, 0) * (m(2, 3) * m(3, 2) - m(2, 2) * m(3, 3))); + out(1, 1) = d * (m(2, 2) * (m(0, 0) * m(3, 3) - m(0, 3) * m(3, 0)) + + m(2, 3) * (m(0, 2) * m(3, 0) - m(0, 0) * m(3, 2)) + + m(2, 0) * (m(0, 3) * m(3, 2) - m(0, 2) * m(3, 3))); + out(1, 2) = d * (m(3, 2) * (m(0, 0) * m(1, 3) - m(0, 3) * m(1, 0)) + + m(3, 3) * (m(0, 2) * m(1, 0) - m(0, 0) * m(1, 2)) + + m(3, 0) * (m(0, 3) * m(1, 2) - m(0, 2) * m(1, 3))); + out(1, 3) = d * (m(0, 2) * (m(1, 3) * m(2, 0) - m(1, 0) * m(2, 3)) + + m(0, 3) * (m(1, 0) * m(2, 2) - m(1, 2) * m(2, 0)) + + m(0, 0) * (m(1, 2) * m(2, 3) - m(1, 3) * m(2, 2))); + out(2, 0) = d * (m(1, 3) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0)) + + m(1, 0) * (m(2, 1) * m(3, 3) - m(2, 3) * m(3, 1)) + + m(1, 1) * (m(2, 3) * m(3, 0) - m(2, 0) * m(3, 3))); + out(2, 1) = d * (m(2, 3) * (m(0, 0) * m(3, 1) - m(0, 1) * m(3, 0)) + + m(2, 0) * (m(0, 1) * m(3, 3) - m(0, 3) * m(3, 1)) + + m(2, 1) * (m(0, 3) * m(3, 0) - m(0, 0) * m(3, 3))); + out(2, 2) = d * (m(3, 3) * (m(0, 0) * m(1, 1) - m(0, 1) * m(1, 0)) + + m(3, 0) * (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) + + m(3, 1) * (m(0, 3) * m(1, 0) - m(0, 0) * m(1, 3))); + out(2, 3) = d * (m(0, 3) * (m(1, 1) * m(2, 0) - m(1, 0) * m(2, 1)) + + m(0, 0) * (m(1, 3) * m(2, 1) - m(1, 1) * m(2, 3)) + + m(0, 1) * (m(1, 0) * m(2, 3) - m(1, 3) * m(2, 0))); + out(3, 0) = d * (m(1, 0) * (m(2, 2) * m(3, 1) - m(2, 1) * m(3, 2)) + + m(1, 1) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) + + m(1, 2) * (m(2, 1) * m(3, 0) - m(2, 0) * m(3, 1))); + out(3, 1) = d * (m(2, 0) * (m(0, 2) * m(3, 1) - m(0, 1) * m(3, 2)) + + m(2, 1) * (m(0, 0) * m(3, 2) - m(0, 2) * m(3, 0)) + + m(2, 2) * (m(0, 1) * m(3, 0) - m(0, 0) * m(3, 1))); + out(3, 2) = d * (m(3, 0) * (m(0, 2) * m(1, 1) - m(0, 1) * m(1, 2)) + + m(3, 1) * (m(0, 0) * m(1, 2) - m(0, 2) * m(1, 0)) + + m(3, 2) * (m(0, 1) * m(1, 0) - m(0, 0) * m(1, 1))); + out(3, 3) = d * (m(0, 0) * (m(1, 1) * m(2, 2) - m(1, 2) * m(2, 1)) + + m(0, 1) * (m(1, 2) * m(2, 0) - m(1, 0) * m(2, 2)) + + m(0, 2) * (m(1, 0) * m(2, 1) - m(1, 1) * m(2, 0))); + +#if defined ( USE_MATRIX_TEST ) + out.definitelyIdentityMatrix = definitelyIdentityMatrix; +#endif + return true; + } + + + //! Inverts a primitive matrix which only contains a translation and a rotation + //! \param out: where result matrix is written to. + template + inline bool CMatrix4::getInversePrimitive ( CMatrix4& out ) const + { + out.M[0 ] = M[0]; + out.M[1 ] = M[4]; + out.M[2 ] = M[8]; + out.M[3 ] = 0; + + out.M[4 ] = M[1]; + out.M[5 ] = M[5]; + out.M[6 ] = M[9]; + out.M[7 ] = 0; + + out.M[8 ] = M[2]; + out.M[9 ] = M[6]; + out.M[10] = M[10]; + out.M[11] = 0; + + out.M[12] = (T)-(M[12]*M[0] + M[13]*M[1] + M[14]*M[2]); + out.M[13] = (T)-(M[12]*M[4] + M[13]*M[5] + M[14]*M[6]); + out.M[14] = (T)-(M[12]*M[8] + M[13]*M[9] + M[14]*M[10]); + out.M[15] = 1; + +#if defined ( USE_MATRIX_TEST ) + out.definitelyIdentityMatrix = definitelyIdentityMatrix; +#endif + return true; + } + + /*! + */ + template + inline bool CMatrix4::makeInverse() + { +#if defined ( USE_MATRIX_TEST ) + if (definitelyIdentityMatrix) + return true; +#endif + CMatrix4 temp ( EM4CONST_NOTHING ); + + if (getInverse(temp)) + { + *this = temp; + return true; + } + + return false; + } + + + template + inline CMatrix4& CMatrix4::operator=(const CMatrix4 &other) + { + if (this==&other) + return *this; + memcpy(M, other.M, 16*sizeof(T)); +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=other.definitelyIdentityMatrix; +#endif + return *this; + } + + + template + inline CMatrix4& CMatrix4::operator=(const T& scalar) + { + for (s32 i = 0; i < 16; ++i) + M[i]=scalar; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + template + inline bool CMatrix4::operator==(const CMatrix4 &other) const + { +#if defined ( USE_MATRIX_TEST ) + if (definitelyIdentityMatrix && other.definitelyIdentityMatrix) + return true; +#endif + for (s32 i = 0; i < 16; ++i) + if (M[i] != other.M[i]) + return false; + + return true; + } + + + template + inline bool CMatrix4::operator!=(const CMatrix4 &other) const + { + return !(*this == other); + } + + + // Builds a right-handed perspective projection matrix based on a field of view + template + inline CMatrix4& CMatrix4::buildProjectionMatrixPerspectiveFovRH( + f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar) + { + const f64 h = reciprocal(tan(fieldOfViewRadians*0.5)); + _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero + const T w = static_cast(h / aspectRatio); + + _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero + M[0] = w; + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)h; + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(zFar/(zNear-zFar)); // DirectX version +// M[10] = (T)(zFar+zNear/(zNear-zFar)); // OpenGL version + M[11] = -1; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(zNear*zFar/(zNear-zFar)); // DirectX version +// M[14] = (T)(2.0f*zNear*zFar/(zNear-zFar)); // OpenGL version + M[15] = 0; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a left-handed perspective projection matrix based on a field of view + template + inline CMatrix4& CMatrix4::buildProjectionMatrixPerspectiveFovLH( + f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar) + { + const f64 h = reciprocal(tan(fieldOfViewRadians*0.5)); + _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero + const T w = static_cast(h / aspectRatio); + + _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero + M[0] = w; + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)h; + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(zFar/(zFar-zNear)); + M[11] = 1; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(-zNear*zFar/(zFar-zNear)); + M[15] = 0; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a left-handed perspective projection matrix based on a field of view, with far plane culling at infinity + template + inline CMatrix4& CMatrix4::buildProjectionMatrixPerspectiveFovInfinityLH( + f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon) + { + const f64 h = reciprocal(tan(fieldOfViewRadians*0.5)); + _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero + const T w = static_cast(h / aspectRatio); + + M[0] = w; + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)h; + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(1.f-epsilon); + M[11] = 1; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(zNear*(epsilon-1.f)); + M[15] = 0; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a left-handed orthogonal projection matrix. + template + inline CMatrix4& CMatrix4::buildProjectionMatrixOrthoLH( + f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) + { + _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero + M[0] = (T)(2/widthOfViewVolume); + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)(2/heightOfViewVolume); + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(1/(zFar-zNear)); + M[11] = 0; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(zNear/(zNear-zFar)); + M[15] = 1; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a right-handed orthogonal projection matrix. + template + inline CMatrix4& CMatrix4::buildProjectionMatrixOrthoRH( + f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) + { + _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero + M[0] = (T)(2/widthOfViewVolume); + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)(2/heightOfViewVolume); + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(1/(zNear-zFar)); + M[11] = 0; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(zNear/(zNear-zFar)); + M[15] = 1; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a right-handed perspective projection matrix. + template + inline CMatrix4& CMatrix4::buildProjectionMatrixPerspectiveRH( + f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) + { + _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero + M[0] = (T)(2*zNear/widthOfViewVolume); + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)(2*zNear/heightOfViewVolume); + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(zFar/(zNear-zFar)); + M[11] = -1; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(zNear*zFar/(zNear-zFar)); + M[15] = 0; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a left-handed perspective projection matrix. + template + inline CMatrix4& CMatrix4::buildProjectionMatrixPerspectiveLH( + f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) + { + _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero + _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero + M[0] = (T)(2*zNear/widthOfViewVolume); + M[1] = 0; + M[2] = 0; + M[3] = 0; + + M[4] = 0; + M[5] = (T)(2*zNear/heightOfViewVolume); + M[6] = 0; + M[7] = 0; + + M[8] = 0; + M[9] = 0; + M[10] = (T)(zFar/(zFar-zNear)); + M[11] = 1; + + M[12] = 0; + M[13] = 0; + M[14] = (T)(zNear*zFar/(zNear-zFar)); + M[15] = 0; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a matrix that flattens geometry into a plane. + template + inline CMatrix4& CMatrix4::buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point) + { + plane.Normal.normalize(); + const f32 d = plane.Normal.dotProduct(light); + + M[ 0] = (T)(-plane.Normal.X * light.X + d); + M[ 1] = (T)(-plane.Normal.X * light.Y); + M[ 2] = (T)(-plane.Normal.X * light.Z); + M[ 3] = (T)(-plane.Normal.X * point); + + M[ 4] = (T)(-plane.Normal.Y * light.X); + M[ 5] = (T)(-plane.Normal.Y * light.Y + d); + M[ 6] = (T)(-plane.Normal.Y * light.Z); + M[ 7] = (T)(-plane.Normal.Y * point); + + M[ 8] = (T)(-plane.Normal.Z * light.X); + M[ 9] = (T)(-plane.Normal.Z * light.Y); + M[10] = (T)(-plane.Normal.Z * light.Z + d); + M[11] = (T)(-plane.Normal.Z * point); + + M[12] = (T)(-plane.D * light.X); + M[13] = (T)(-plane.D * light.Y); + M[14] = (T)(-plane.D * light.Z); + M[15] = (T)(-plane.D * point + d); +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + // Builds a left-handed look-at matrix. + template + inline CMatrix4& CMatrix4::buildCameraLookAtMatrixLH( + const vector3df& position, + const vector3df& target, + const vector3df& upVector) + { + vector3df zaxis = target - position; + zaxis.normalize(); + + vector3df xaxis = upVector.crossProduct(zaxis); + xaxis.normalize(); + + vector3df yaxis = zaxis.crossProduct(xaxis); + + M[0] = (T)xaxis.X; + M[1] = (T)yaxis.X; + M[2] = (T)zaxis.X; + M[3] = 0; + + M[4] = (T)xaxis.Y; + M[5] = (T)yaxis.Y; + M[6] = (T)zaxis.Y; + M[7] = 0; + + M[8] = (T)xaxis.Z; + M[9] = (T)yaxis.Z; + M[10] = (T)zaxis.Z; + M[11] = 0; + + M[12] = (T)-xaxis.dotProduct(position); + M[13] = (T)-yaxis.dotProduct(position); + M[14] = (T)-zaxis.dotProduct(position); + M[15] = 1; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // Builds a right-handed look-at matrix. + template + inline CMatrix4& CMatrix4::buildCameraLookAtMatrixRH( + const vector3df& position, + const vector3df& target, + const vector3df& upVector) + { + vector3df zaxis = position - target; + zaxis.normalize(); + + vector3df xaxis = upVector.crossProduct(zaxis); + xaxis.normalize(); + + vector3df yaxis = zaxis.crossProduct(xaxis); + + M[0] = (T)xaxis.X; + M[1] = (T)yaxis.X; + M[2] = (T)zaxis.X; + M[3] = 0; + + M[4] = (T)xaxis.Y; + M[5] = (T)yaxis.Y; + M[6] = (T)zaxis.Y; + M[7] = 0; + + M[8] = (T)xaxis.Z; + M[9] = (T)yaxis.Z; + M[10] = (T)zaxis.Z; + M[11] = 0; + + M[12] = (T)-xaxis.dotProduct(position); + M[13] = (T)-yaxis.dotProduct(position); + M[14] = (T)-zaxis.dotProduct(position); + M[15] = 1; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // creates a new matrix as interpolated matrix from this and the passed one. + template + inline CMatrix4 CMatrix4::interpolate(const core::CMatrix4& b, f32 time) const + { + CMatrix4 mat ( EM4CONST_NOTHING ); + + for (u32 i=0; i < 16; i += 4) + { + mat.M[i+0] = (T)(M[i+0] + ( b.M[i+0] - M[i+0] ) * time); + mat.M[i+1] = (T)(M[i+1] + ( b.M[i+1] - M[i+1] ) * time); + mat.M[i+2] = (T)(M[i+2] + ( b.M[i+2] - M[i+2] ) * time); + mat.M[i+3] = (T)(M[i+3] + ( b.M[i+3] - M[i+3] ) * time); + } + return mat; + } + + + // returns transposed matrix + template + inline CMatrix4 CMatrix4::getTransposed() const + { + CMatrix4 t ( EM4CONST_NOTHING ); + getTransposed ( t ); + return t; + } + + + // returns transposed matrix + template + inline void CMatrix4::getTransposed( CMatrix4& o ) const + { + o[ 0] = M[ 0]; + o[ 1] = M[ 4]; + o[ 2] = M[ 8]; + o[ 3] = M[12]; + + o[ 4] = M[ 1]; + o[ 5] = M[ 5]; + o[ 6] = M[ 9]; + o[ 7] = M[13]; + + o[ 8] = M[ 2]; + o[ 9] = M[ 6]; + o[10] = M[10]; + o[11] = M[14]; + + o[12] = M[ 3]; + o[13] = M[ 7]; + o[14] = M[11]; + o[15] = M[15]; +#if defined ( USE_MATRIX_TEST ) + o.definitelyIdentityMatrix=definitelyIdentityMatrix; +#endif + } + + + // used to scale <-1,-1><1,1> to viewport + template + inline CMatrix4& CMatrix4::buildNDCToDCMatrix( const core::rect& viewport, f32 zScale) + { + const f32 scaleX = (viewport.getWidth() - 0.75f ) * 0.5f; + const f32 scaleY = -(viewport.getHeight() - 0.75f ) * 0.5f; + + const f32 dx = -0.5f + ( (viewport.UpperLeftCorner.X + viewport.LowerRightCorner.X ) * 0.5f ); + const f32 dy = -0.5f + ( (viewport.UpperLeftCorner.Y + viewport.LowerRightCorner.Y ) * 0.5f ); + + makeIdentity(); + M[12] = (T)dx; + M[13] = (T)dy; + return setScale(core::vector3d((T)scaleX, (T)scaleY, (T)zScale)); + } + + //! Builds a matrix that rotates from one vector to another + /** \param from: vector to rotate from + \param to: vector to rotate to + + http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm + */ + template + inline CMatrix4& CMatrix4::buildRotateFromTo(const core::vector3df& from, const core::vector3df& to) + { + // unit vectors + core::vector3df f(from); + core::vector3df t(to); + f.normalize(); + t.normalize(); + + // axis multiplication by sin + core::vector3df vs(t.crossProduct(f)); + + // axis of rotation + core::vector3df v(vs); + v.normalize(); + + // cosinus angle + T ca = f.dotProduct(t); + + core::vector3df vt(v * (1 - ca)); + + M[0] = vt.X * v.X + ca; + M[5] = vt.Y * v.Y + ca; + M[10] = vt.Z * v.Z + ca; + + vt.X *= v.Y; + vt.Z *= v.X; + vt.Y *= v.Z; + + M[1] = vt.X - vs.Z; + M[2] = vt.Z + vs.Y; + M[3] = 0; + + M[4] = vt.X + vs.Z; + M[6] = vt.Y - vs.X; + M[7] = 0; + + M[8] = vt.Z - vs.Y; + M[9] = vt.Y + vs.X; + M[11] = 0; + + M[12] = 0; + M[13] = 0; + M[14] = 0; + M[15] = 1; + + return *this; + } + + //! Builds a matrix which rotates a source vector to a look vector over an arbitrary axis + /** \param camPos: viewer position in world coord + \param center: object position in world-coord, rotation pivot + \param translation: object final translation from center + \param axis: axis to rotate about + \param from: source vector to rotate from + */ + template + inline void CMatrix4::buildAxisAlignedBillboard( + const core::vector3df& camPos, + const core::vector3df& center, + const core::vector3df& translation, + const core::vector3df& axis, + const core::vector3df& from) + { + // axis of rotation + core::vector3df up = axis; + up.normalize(); + const core::vector3df forward = (camPos - center).normalize(); + const core::vector3df right = up.crossProduct(forward).normalize(); + + // correct look vector + const core::vector3df look = right.crossProduct(up); + + // rotate from to + // axis multiplication by sin + const core::vector3df vs = look.crossProduct(from); + + // cosinus angle + const f32 ca = from.dotProduct(look); + + core::vector3df vt(up * (1.f - ca)); + + M[0] = static_cast(vt.X * up.X + ca); + M[5] = static_cast(vt.Y * up.Y + ca); + M[10] = static_cast(vt.Z * up.Z + ca); + + vt.X *= up.Y; + vt.Z *= up.X; + vt.Y *= up.Z; + + M[1] = static_cast(vt.X - vs.Z); + M[2] = static_cast(vt.Z + vs.Y); + M[3] = 0; + + M[4] = static_cast(vt.X + vs.Z); + M[6] = static_cast(vt.Y - vs.X); + M[7] = 0; + + M[8] = static_cast(vt.Z - vs.Y); + M[9] = static_cast(vt.Y + vs.X); + M[11] = 0; + + setRotationCenter(center, translation); + } + + + //! Builds a combined matrix which translate to a center before rotation and translate afterwards + template + inline void CMatrix4::setRotationCenter(const core::vector3df& center, const core::vector3df& translation) + { + M[12] = -M[0]*center.X - M[4]*center.Y - M[8]*center.Z + (center.X - translation.X ); + M[13] = -M[1]*center.X - M[5]*center.Y - M[9]*center.Z + (center.Y - translation.Y ); + M[14] = -M[2]*center.X - M[6]*center.Y - M[10]*center.Z + (center.Z - translation.Z ); + M[15] = (T) 1.0; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + } + + /*! + Generate texture coordinates as linear functions so that: + u = Ux*x + Uy*y + Uz*z + Uw + v = Vx*x + Vy*y + Vz*z + Vw + The matrix M for this case is: + Ux Vx 0 0 + Uy Vy 0 0 + Uz Vz 0 0 + Uw Vw 0 0 + */ + + + template + inline CMatrix4& CMatrix4::buildTextureTransform( f32 rotateRad, + const core::vector2df &rotatecenter, + const core::vector2df &translate, + const core::vector2df &scale) + { + const f32 c = cosf(rotateRad); + const f32 s = sinf(rotateRad); + + M[0] = (T)(c * scale.X); + M[1] = (T)(s * scale.Y); + M[2] = 0; + M[3] = 0; + + M[4] = (T)(-s * scale.X); + M[5] = (T)(c * scale.Y); + M[6] = 0; + M[7] = 0; + + M[8] = (T)(c * scale.X * rotatecenter.X + -s * rotatecenter.Y + translate.X); + M[9] = (T)(s * scale.Y * rotatecenter.X + c * rotatecenter.Y + translate.Y); + M[10] = 1; + M[11] = 0; + + M[12] = 0; + M[13] = 0; + M[14] = 0; + M[15] = 1; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // rotate about z axis, center ( 0.5, 0.5 ) + template + inline CMatrix4& CMatrix4::setTextureRotationCenter( f32 rotateRad ) + { + const f32 c = cosf(rotateRad); + const f32 s = sinf(rotateRad); + M[0] = (T)c; + M[1] = (T)s; + + M[4] = (T)-s; + M[5] = (T)c; + + M[8] = (T)(0.5f * ( s - c) + 0.5f); + M[9] = (T)(-0.5f * ( s + c) + 0.5f); + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix = definitelyIdentityMatrix && (rotateRad==0.0f); +#endif + return *this; + } + + + template + inline CMatrix4& CMatrix4::setTextureTranslate ( f32 x, f32 y ) + { + M[8] = (T)x; + M[9] = (T)y; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix = definitelyIdentityMatrix && (x==0.0f) && (y==0.0f); +#endif + return *this; + } + + + template + inline CMatrix4& CMatrix4::setTextureTranslateTransposed ( f32 x, f32 y ) + { + M[2] = (T)x; + M[6] = (T)y; + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix = definitelyIdentityMatrix && (x==0.0f) && (y==0.0f) ; +#endif + return *this; + } + + template + inline CMatrix4& CMatrix4::setTextureScale ( f32 sx, f32 sy ) + { + M[0] = (T)sx; + M[5] = (T)sy; +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix = definitelyIdentityMatrix && (sx==1.0f) && (sy==1.0f); +#endif + return *this; + } + + + template + inline CMatrix4& CMatrix4::setTextureScaleCenter( f32 sx, f32 sy ) + { + M[0] = (T)sx; + M[5] = (T)sy; + M[8] = (T)(0.5f - 0.5f * sx); + M[9] = (T)(0.5f - 0.5f * sy); + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix = definitelyIdentityMatrix && (sx==1.0f) && (sy==1.0f); +#endif + return *this; + } + + + // sets all matrix data members at once + template + inline CMatrix4& CMatrix4::setM(const T* data) + { + memcpy(M,data, 16*sizeof(T)); + +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix=false; +#endif + return *this; + } + + + // sets if the matrix is definitely identity matrix + template + inline void CMatrix4::setDefinitelyIdentityMatrix( bool isDefinitelyIdentityMatrix) + { +#if defined ( USE_MATRIX_TEST ) + definitelyIdentityMatrix = isDefinitelyIdentityMatrix; +#endif + } + + + // gets if the matrix is definitely identity matrix + template + inline bool CMatrix4::getDefinitelyIdentityMatrix() const + { +#if defined ( USE_MATRIX_TEST ) + return definitelyIdentityMatrix; +#else + return false; +#endif + } + + + //! Compare two matrices using the equal method + template + inline bool CMatrix4::equals(const core::CMatrix4& other, const T tolerance) const + { +#if defined ( USE_MATRIX_TEST ) + if (definitelyIdentityMatrix && other.definitelyIdentityMatrix) + return true; +#endif + for (s32 i = 0; i < 16; ++i) + if (!core::equals(M[i],other.M[i], tolerance)) + return false; + + return true; + } + + + // Multiply by scalar. + template + inline CMatrix4 operator*(const T scalar, const CMatrix4& mat) + { + return mat*scalar; + } + + + //! Typedef for f32 matrix + typedef CMatrix4 matrix4; + + //! global const identity matrix + IRRLICHT_API extern const matrix4 IdentityMatrix; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/path.h b/src/others/irrlicht-1.8.1/include/path.h new file mode 100644 index 0000000..b537987 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/path.h @@ -0,0 +1,88 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_PATH_H_INCLUDED__ +#define __IRR_PATH_H_INCLUDED__ + +#include "irrString.h" + +namespace irr +{ +namespace io +{ + +//! Type used for all file system related strings. +/** This type will transparently handle different file system encodings. */ +typedef core::string path; + +//! Used in places where we identify objects by a filename, but don't actually work with the real filename +/** Irrlicht is internally not case-sensitive when it comes to names. + Also this class is a first step towards support for correctly serializing renamed objects. +*/ +struct SNamedPath +{ + //! Constructor + SNamedPath() {} + + //! Constructor + SNamedPath(const path& p) : Path(p), InternalName( PathToName(p) ) + { + } + + //! Is smaller comparator + bool operator <(const SNamedPath& other) const + { + return InternalName < other.InternalName; + } + + //! Set the path. + void setPath(const path& p) + { + Path = p; + InternalName = PathToName(p); + } + + //! Get the path. + const path& getPath() const + { + return Path; + }; + + //! Get the name which is used to identify the file. + //! This string is similar to the names and filenames used before Irrlicht 1.7 + const path& getInternalName() const + { + return InternalName; + } + + //! Implicit cast to io::path + operator core::stringc() const + { + return core::stringc(getPath()); + } + //! Implicit cast to io::path + operator core::stringw() const + { + return core::stringw(getPath()); + } + +protected: + // convert the given path string to a name string. + path PathToName(const path& p) const + { + path name(p); + name.replace( '\\', '/' ); + name.make_lower(); + return name; + } + +private: + path Path; + path InternalName; +}; + +} // io +} // irr + +#endif // __IRR_PATH_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/include/plane3d.h b/src/others/irrlicht-1.8.1/include/plane3d.h new file mode 100644 index 0000000..9056dcd --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/plane3d.h @@ -0,0 +1,245 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_PLANE_3D_H_INCLUDED__ +#define __IRR_PLANE_3D_H_INCLUDED__ + +#include "irrMath.h" +#include "vector3d.h" + +namespace irr +{ +namespace core +{ + +//! Enumeration for intersection relations of 3d objects +enum EIntersectionRelation3D +{ + ISREL3D_FRONT = 0, + ISREL3D_BACK, + ISREL3D_PLANAR, + ISREL3D_SPANNING, + ISREL3D_CLIPPED +}; + +//! Template plane class with some intersection testing methods. +/** It has to be ensured, that the normal is always normalized. The constructors + and setters of this class will not ensure this automatically. So any normal + passed in has to be normalized in advance. No change to the normal will be + made by any of the class methods. +*/ +template +class plane3d +{ + public: + + // Constructors + + plane3d(): Normal(0,1,0) { recalculateD(vector3d(0,0,0)); } + + plane3d(const vector3d& MPoint, const vector3d& Normal) : Normal(Normal) { recalculateD(MPoint); } + + plane3d(T px, T py, T pz, T nx, T ny, T nz) : Normal(nx, ny, nz) { recalculateD(vector3d(px, py, pz)); } + + plane3d(const vector3d& point1, const vector3d& point2, const vector3d& point3) + { setPlane(point1, point2, point3); } + + plane3d(const vector3d & normal, const T d) : Normal(normal), D(d) { } + + // operators + + inline bool operator==(const plane3d& other) const { return (equals(D, other.D) && Normal==other.Normal);} + + inline bool operator!=(const plane3d& other) const { return !(*this == other);} + + // functions + + void setPlane(const vector3d& point, const vector3d& nvector) + { + Normal = nvector; + recalculateD(point); + } + + void setPlane(const vector3d& nvect, T d) + { + Normal = nvect; + D = d; + } + + void setPlane(const vector3d& point1, const vector3d& point2, const vector3d& point3) + { + // creates the plane from 3 memberpoints + Normal = (point2 - point1).crossProduct(point3 - point1); + Normal.normalize(); + + recalculateD(point1); + } + + + //! Get an intersection with a 3d line. + /** \param lineVect Vector of the line to intersect with. + \param linePoint Point of the line to intersect with. + \param outIntersection Place to store the intersection point, if there is one. + \return True if there was an intersection, false if there was not. + */ + bool getIntersectionWithLine(const vector3d& linePoint, + const vector3d& lineVect, + vector3d& outIntersection) const + { + T t2 = Normal.dotProduct(lineVect); + + if (t2 == 0) + return false; + + T t =- (Normal.dotProduct(linePoint) + D) / t2; + outIntersection = linePoint + (lineVect * t); + return true; + } + + //! Get percentage of line between two points where an intersection with this plane happens. + /** Only useful if known that there is an intersection. + \param linePoint1 Point1 of the line to intersect with. + \param linePoint2 Point2 of the line to intersect with. + \return Where on a line between two points an intersection with this plane happened. + For example, 0.5 is returned if the intersection happened exactly in the middle of the two points. + */ + f32 getKnownIntersectionWithLine(const vector3d& linePoint1, + const vector3d& linePoint2) const + { + vector3d vect = linePoint2 - linePoint1; + T t2 = (f32)Normal.dotProduct(vect); + return (f32)-((Normal.dotProduct(linePoint1) + D) / t2); + } + + //! Get an intersection with a 3d line, limited between two 3d points. + /** \param linePoint1 Point 1 of the line. + \param linePoint2 Point 2 of the line. + \param outIntersection Place to store the intersection point, if there is one. + \return True if there was an intersection, false if there was not. + */ + bool getIntersectionWithLimitedLine( + const vector3d& linePoint1, + const vector3d& linePoint2, + vector3d& outIntersection) const + { + return (getIntersectionWithLine(linePoint1, linePoint2 - linePoint1, outIntersection) && + outIntersection.isBetweenPoints(linePoint1, linePoint2)); + } + + //! Classifies the relation of a point to this plane. + /** \param point Point to classify its relation. + \return ISREL3D_FRONT if the point is in front of the plane, + ISREL3D_BACK if the point is behind of the plane, and + ISREL3D_PLANAR if the point is within the plane. */ + EIntersectionRelation3D classifyPointRelation(const vector3d& point) const + { + const T d = Normal.dotProduct(point) + D; + + if (d < -ROUNDING_ERROR_f32) + return ISREL3D_BACK; + + if (d > ROUNDING_ERROR_f32) + return ISREL3D_FRONT; + + return ISREL3D_PLANAR; + } + + //! Recalculates the distance from origin by applying a new member point to the plane. + void recalculateD(const vector3d& MPoint) + { + D = - MPoint.dotProduct(Normal); + } + + //! Gets a member point of the plane. + vector3d getMemberPoint() const + { + return Normal * -D; + } + + //! Tests if there is an intersection with the other plane + /** \return True if there is a intersection. */ + bool existsIntersection(const plane3d& other) const + { + vector3d cross = other.Normal.crossProduct(Normal); + return cross.getLength() > core::ROUNDING_ERROR_f32; + } + + //! Intersects this plane with another. + /** \param other Other plane to intersect with. + \param outLinePoint Base point of intersection line. + \param outLineVect Vector of intersection. + \return True if there is a intersection, false if not. */ + bool getIntersectionWithPlane(const plane3d& other, + vector3d& outLinePoint, + vector3d& outLineVect) const + { + const T fn00 = Normal.getLength(); + const T fn01 = Normal.dotProduct(other.Normal); + const T fn11 = other.Normal.getLength(); + const f64 det = fn00*fn11 - fn01*fn01; + + if (fabs(det) < ROUNDING_ERROR_f64 ) + return false; + + const f64 invdet = 1.0 / det; + const f64 fc0 = (fn11*-D + fn01*other.D) * invdet; + const f64 fc1 = (fn00*-other.D + fn01*D) * invdet; + + outLineVect = Normal.crossProduct(other.Normal); + outLinePoint = Normal*(T)fc0 + other.Normal*(T)fc1; + return true; + } + + //! Get the intersection point with two other planes if there is one. + bool getIntersectionWithPlanes(const plane3d& o1, + const plane3d& o2, vector3d& outPoint) const + { + vector3d linePoint, lineVect; + if (getIntersectionWithPlane(o1, linePoint, lineVect)) + return o2.getIntersectionWithLine(linePoint, lineVect, outPoint); + + return false; + } + + //! Test if the triangle would be front or backfacing from any point. + /** Thus, this method assumes a camera position from + which the triangle is definitely visible when looking into + the given direction. + Note that this only works if the normal is Normalized. + Do not use this method with points as it will give wrong results! + \param lookDirection: Look direction. + \return True if the plane is front facing and + false if it is backfacing. */ + bool isFrontFacing(const vector3d& lookDirection) const + { + const f32 d = Normal.dotProduct(lookDirection); + return F32_LOWER_EQUAL_0 ( d ); + } + + //! Get the distance to a point. + /** Note that this only works if the normal is normalized. */ + T getDistanceTo(const vector3d& point) const + { + return point.dotProduct(Normal) + D; + } + + //! Normal vector of the plane. + vector3d Normal; + + //! Distance from origin. + T D; +}; + + +//! Typedef for a f32 3d plane. +typedef plane3d plane3df; + +//! Typedef for an integer 3d plane. +typedef plane3d plane3di; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/position2d.h b/src/others/irrlicht-1.8.1/include/position2d.h new file mode 100644 index 0000000..63275d2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/position2d.h @@ -0,0 +1,32 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +//! As of Irrlicht 1.6, position2d is a synonym for vector2d. +/** You should consider position2d to be deprecated, and use vector2d by preference. */ + +#ifndef __IRR_POSITION_H_INCLUDED__ +#define __IRR_POSITION_H_INCLUDED__ + +#include "vector2d.h" + +namespace irr +{ +namespace core +{ + +// Use typedefs where possible as they are more explicit... + +//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly. +typedef vector2d position2df; + +//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly. +typedef vector2d position2di; +} // namespace core +} // namespace irr + +// ...and use a #define to catch the rest, for (e.g.) position2d +#define position2d vector2d + +#endif // __IRR_POSITION_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/include/quaternion.h b/src/others/irrlicht-1.8.1/include/quaternion.h new file mode 100644 index 0000000..f2e3921 --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/quaternion.h @@ -0,0 +1,696 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_QUATERNION_H_INCLUDED__ +#define __IRR_QUATERNION_H_INCLUDED__ + +#include "irrTypes.h" +#include "irrMath.h" +#include "matrix4.h" +#include "vector3d.h" + +// Between Irrlicht 1.7 and Irrlicht 1.8 the quaternion-matrix conversions got fixed. +// This define disables all involved functions completely to allow finding all places +// where the wrong conversions had been in use. +#define IRR_TEST_BROKEN_QUATERNION_USE 0 + +namespace irr +{ +namespace core +{ + +//! Quaternion class for representing rotations. +/** It provides cheap combinations and avoids gimbal locks. +Also useful for interpolations. */ +class quaternion +{ + public: + + //! Default Constructor + quaternion() : X(0.0f), Y(0.0f), Z(0.0f), W(1.0f) {} + + //! Constructor + quaternion(f32 x, f32 y, f32 z, f32 w) : X(x), Y(y), Z(z), W(w) { } + + //! Constructor which converts euler angles (radians) to a quaternion + quaternion(f32 x, f32 y, f32 z); + + //! Constructor which converts euler angles (radians) to a quaternion + quaternion(const vector3df& vec); + +#if !IRR_TEST_BROKEN_QUATERNION_USE + //! Constructor which converts a matrix to a quaternion + quaternion(const matrix4& mat); +#endif + + //! Equalilty operator + bool operator==(const quaternion& other) const; + + //! inequality operator + bool operator!=(const quaternion& other) const; + + //! Assignment operator + inline quaternion& operator=(const quaternion& other); + +#if !IRR_TEST_BROKEN_QUATERNION_USE + //! Matrix assignment operator + inline quaternion& operator=(const matrix4& other); +#endif + + //! Add operator + quaternion operator+(const quaternion& other) const; + + //! Multiplication operator + quaternion operator*(const quaternion& other) const; + + //! Multiplication operator with scalar + quaternion operator*(f32 s) const; + + //! Multiplication operator with scalar + quaternion& operator*=(f32 s); + + //! Multiplication operator + vector3df operator*(const vector3df& v) const; + + //! Multiplication operator + quaternion& operator*=(const quaternion& other); + + //! Calculates the dot product + inline f32 dotProduct(const quaternion& other) const; + + //! Sets new quaternion + inline quaternion& set(f32 x, f32 y, f32 z, f32 w); + + //! Sets new quaternion based on euler angles (radians) + inline quaternion& set(f32 x, f32 y, f32 z); + + //! Sets new quaternion based on euler angles (radians) + inline quaternion& set(const core::vector3df& vec); + + //! Sets new quaternion from other quaternion + inline quaternion& set(const core::quaternion& quat); + + //! returns if this quaternion equals the other one, taking floating point rounding errors into account + inline bool equals(const quaternion& other, + const f32 tolerance = ROUNDING_ERROR_f32 ) const; + + //! Normalizes the quaternion + inline quaternion& normalize(); + +#if !IRR_TEST_BROKEN_QUATERNION_USE + //! Creates a matrix from this quaternion + matrix4 getMatrix() const; +#endif + + //! Creates a matrix from this quaternion + void getMatrix( matrix4 &dest, const core::vector3df &translation=core::vector3df() ) const; + + /*! + Creates a matrix from this quaternion + Rotate about a center point + shortcut for + core::quaternion q; + q.rotationFromTo ( vin[i].Normal, forward ); + q.getMatrixCenter ( lookat, center, newPos ); + + core::matrix4 m2; + m2.setInverseTranslation ( center ); + lookat *= m2; + + core::matrix4 m3; + m2.setTranslation ( newPos ); + lookat *= m3; + + */ + void getMatrixCenter( matrix4 &dest, const core::vector3df ¢er, const core::vector3df &translation ) const; + + //! Creates a matrix from this quaternion + inline void getMatrix_transposed( matrix4 &dest ) const; + + //! Inverts this quaternion + quaternion& makeInverse(); + + //! Set this quaternion to the linear interpolation between two quaternions + /** \param q1 First quaternion to be interpolated. + \param q2 Second quaternion to be interpolated. + \param time Progress of interpolation. For time=0 the result is + q1, for time=1 the result is q2. Otherwise interpolation + between q1 and q2. + */ + quaternion& lerp(quaternion q1, quaternion q2, f32 time); + + //! Set this quaternion to the result of the spherical interpolation between two quaternions + /** \param q1 First quaternion to be interpolated. + \param q2 Second quaternion to be interpolated. + \param time Progress of interpolation. For time=0 the result is + q1, for time=1 the result is q2. Otherwise interpolation + between q1 and q2. + \param threshold To avoid inaccuracies at the end (time=1) the + interpolation switches to linear interpolation at some point. + This value defines how much of the remaining interpolation will + be calculated with lerp. Everything from 1-threshold up will be + linear interpolation. + */ + quaternion& slerp(quaternion q1, quaternion q2, + f32 time, f32 threshold=.05f); + + //! Create quaternion from rotation angle and rotation axis. + /** Axis must be unit length. + The quaternion representing the rotation is + q = cos(A/2)+sin(A/2)*(x*i+y*j+z*k). + \param angle Rotation Angle in radians. + \param axis Rotation axis. */ + quaternion& fromAngleAxis (f32 angle, const vector3df& axis); + + //! Fills an angle (radians) around an axis (unit vector) + void toAngleAxis (f32 &angle, core::vector3df& axis) const; + + //! Output this quaternion to an euler angle (radians) + void toEuler(vector3df& euler) const; + + //! Set quaternion to identity + quaternion& makeIdentity(); + + //! Set quaternion to represent a rotation from one vector to another. + quaternion& rotationFromTo(const vector3df& from, const vector3df& to); + + //! Quaternion elements. + f32 X; // vectorial (imaginary) part + f32 Y; + f32 Z; + f32 W; // real part +}; + + +// Constructor which converts euler angles to a quaternion +inline quaternion::quaternion(f32 x, f32 y, f32 z) +{ + set(x,y,z); +} + + +// Constructor which converts euler angles to a quaternion +inline quaternion::quaternion(const vector3df& vec) +{ + set(vec.X,vec.Y,vec.Z); +} + +#if !IRR_TEST_BROKEN_QUATERNION_USE +// Constructor which converts a matrix to a quaternion +inline quaternion::quaternion(const matrix4& mat) +{ + (*this) = mat; +} +#endif + +// equal operator +inline bool quaternion::operator==(const quaternion& other) const +{ + return ((X == other.X) && + (Y == other.Y) && + (Z == other.Z) && + (W == other.W)); +} + +// inequality operator +inline bool quaternion::operator!=(const quaternion& other) const +{ + return !(*this == other); +} + +// assignment operator +inline quaternion& quaternion::operator=(const quaternion& other) +{ + X = other.X; + Y = other.Y; + Z = other.Z; + W = other.W; + return *this; +} + +#if !IRR_TEST_BROKEN_QUATERNION_USE +// matrix assignment operator +inline quaternion& quaternion::operator=(const matrix4& m) +{ + const f32 diag = m[0] + m[5] + m[10] + 1; + + if( diag > 0.0f ) + { + const f32 scale = sqrtf(diag) * 2.0f; // get scale from diagonal + + // TODO: speed this up + X = (m[6] - m[9]) / scale; + Y = (m[8] - m[2]) / scale; + Z = (m[1] - m[4]) / scale; + W = 0.25f * scale; + } + else + { + if (m[0]>m[5] && m[0]>m[10]) + { + // 1st element of diag is greatest value + // find scale according to 1st element, and double it + const f32 scale = sqrtf(1.0f + m[0] - m[5] - m[10]) * 2.0f; + + // TODO: speed this up + X = 0.25f * scale; + Y = (m[4] + m[1]) / scale; + Z = (m[2] + m[8]) / scale; + W = (m[6] - m[9]) / scale; + } + else if (m[5]>m[10]) + { + // 2nd element of diag is greatest value + // find scale according to 2nd element, and double it + const f32 scale = sqrtf(1.0f + m[5] - m[0] - m[10]) * 2.0f; + + // TODO: speed this up + X = (m[4] + m[1]) / scale; + Y = 0.25f * scale; + Z = (m[9] + m[6]) / scale; + W = (m[8] - m[2]) / scale; + } + else + { + // 3rd element of diag is greatest value + // find scale according to 3rd element, and double it + const f32 scale = sqrtf(1.0f + m[10] - m[0] - m[5]) * 2.0f; + + // TODO: speed this up + X = (m[8] + m[2]) / scale; + Y = (m[9] + m[6]) / scale; + Z = 0.25f * scale; + W = (m[1] - m[4]) / scale; + } + } + + return normalize(); +} +#endif + + +// multiplication operator +inline quaternion quaternion::operator*(const quaternion& other) const +{ + quaternion tmp; + + tmp.W = (other.W * W) - (other.X * X) - (other.Y * Y) - (other.Z * Z); + tmp.X = (other.W * X) + (other.X * W) + (other.Y * Z) - (other.Z * Y); + tmp.Y = (other.W * Y) + (other.Y * W) + (other.Z * X) - (other.X * Z); + tmp.Z = (other.W * Z) + (other.Z * W) + (other.X * Y) - (other.Y * X); + + return tmp; +} + + +// multiplication operator +inline quaternion quaternion::operator*(f32 s) const +{ + return quaternion(s*X, s*Y, s*Z, s*W); +} + + +// multiplication operator +inline quaternion& quaternion::operator*=(f32 s) +{ + X*=s; + Y*=s; + Z*=s; + W*=s; + return *this; +} + +// multiplication operator +inline quaternion& quaternion::operator*=(const quaternion& other) +{ + return (*this = other * (*this)); +} + +// add operator +inline quaternion quaternion::operator+(const quaternion& b) const +{ + return quaternion(X+b.X, Y+b.Y, Z+b.Z, W+b.W); +} + +#if !IRR_TEST_BROKEN_QUATERNION_USE +// Creates a matrix from this quaternion +inline matrix4 quaternion::getMatrix() const +{ + core::matrix4 m; + getMatrix(m); + return m; +} +#endif + +/*! + Creates a matrix from this quaternion +*/ +inline void quaternion::getMatrix(matrix4 &dest, + const core::vector3df ¢er) const +{ + dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z; + dest[1] = 2.0f*X*Y + 2.0f*Z*W; + dest[2] = 2.0f*X*Z - 2.0f*Y*W; + dest[3] = 0.0f; + + dest[4] = 2.0f*X*Y - 2.0f*Z*W; + dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z; + dest[6] = 2.0f*Z*Y + 2.0f*X*W; + dest[7] = 0.0f; + + dest[8] = 2.0f*X*Z + 2.0f*Y*W; + dest[9] = 2.0f*Z*Y - 2.0f*X*W; + dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y; + dest[11] = 0.0f; + + dest[12] = center.X; + dest[13] = center.Y; + dest[14] = center.Z; + dest[15] = 1.f; + + dest.setDefinitelyIdentityMatrix ( false ); +} + + +/*! + Creates a matrix from this quaternion + Rotate about a center point + shortcut for + core::quaternion q; + q.rotationFromTo(vin[i].Normal, forward); + q.getMatrix(lookat, center); + + core::matrix4 m2; + m2.setInverseTranslation(center); + lookat *= m2; +*/ +inline void quaternion::getMatrixCenter(matrix4 &dest, + const core::vector3df ¢er, + const core::vector3df &translation) const +{ + dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z; + dest[1] = 2.0f*X*Y + 2.0f*Z*W; + dest[2] = 2.0f*X*Z - 2.0f*Y*W; + dest[3] = 0.0f; + + dest[4] = 2.0f*X*Y - 2.0f*Z*W; + dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z; + dest[6] = 2.0f*Z*Y + 2.0f*X*W; + dest[7] = 0.0f; + + dest[8] = 2.0f*X*Z + 2.0f*Y*W; + dest[9] = 2.0f*Z*Y - 2.0f*X*W; + dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y; + dest[11] = 0.0f; + + dest.setRotationCenter ( center, translation ); +} + +// Creates a matrix from this quaternion +inline void quaternion::getMatrix_transposed(matrix4 &dest) const +{ + dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z; + dest[4] = 2.0f*X*Y + 2.0f*Z*W; + dest[8] = 2.0f*X*Z - 2.0f*Y*W; + dest[12] = 0.0f; + + dest[1] = 2.0f*X*Y - 2.0f*Z*W; + dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z; + dest[9] = 2.0f*Z*Y + 2.0f*X*W; + dest[13] = 0.0f; + + dest[2] = 2.0f*X*Z + 2.0f*Y*W; + dest[6] = 2.0f*Z*Y - 2.0f*X*W; + dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y; + dest[14] = 0.0f; + + dest[3] = 0.f; + dest[7] = 0.f; + dest[11] = 0.f; + dest[15] = 1.f; + + dest.setDefinitelyIdentityMatrix(false); +} + + +// Inverts this quaternion +inline quaternion& quaternion::makeInverse() +{ + X = -X; Y = -Y; Z = -Z; + return *this; +} + + +// sets new quaternion +inline quaternion& quaternion::set(f32 x, f32 y, f32 z, f32 w) +{ + X = x; + Y = y; + Z = z; + W = w; + return *this; +} + + +// sets new quaternion based on euler angles +inline quaternion& quaternion::set(f32 x, f32 y, f32 z) +{ + f64 angle; + + angle = x * 0.5; + const f64 sr = sin(angle); + const f64 cr = cos(angle); + + angle = y * 0.5; + const f64 sp = sin(angle); + const f64 cp = cos(angle); + + angle = z * 0.5; + const f64 sy = sin(angle); + const f64 cy = cos(angle); + + const f64 cpcy = cp * cy; + const f64 spcy = sp * cy; + const f64 cpsy = cp * sy; + const f64 spsy = sp * sy; + + X = (f32)(sr * cpcy - cr * spsy); + Y = (f32)(cr * spcy + sr * cpsy); + Z = (f32)(cr * cpsy - sr * spcy); + W = (f32)(cr * cpcy + sr * spsy); + + return normalize(); +} + +// sets new quaternion based on euler angles +inline quaternion& quaternion::set(const core::vector3df& vec) +{ + return set(vec.X, vec.Y, vec.Z); +} + +// sets new quaternion based on other quaternion +inline quaternion& quaternion::set(const core::quaternion& quat) +{ + return (*this=quat); +} + + +//! returns if this quaternion equals the other one, taking floating point rounding errors into account +inline bool quaternion::equals(const quaternion& other, const f32 tolerance) const +{ + return core::equals(X, other.X, tolerance) && + core::equals(Y, other.Y, tolerance) && + core::equals(Z, other.Z, tolerance) && + core::equals(W, other.W, tolerance); +} + + +// normalizes the quaternion +inline quaternion& quaternion::normalize() +{ + const f32 n = X*X + Y*Y + Z*Z + W*W; + + if (n == 1) + return *this; + + //n = 1.0f / sqrtf(n); + return (*this *= reciprocal_squareroot ( n )); +} + + +// set this quaternion to the result of the linear interpolation between two quaternions +inline quaternion& quaternion::lerp(quaternion q1, quaternion q2, f32 time) +{ + const f32 scale = 1.0f - time; + return (*this = (q1*scale) + (q2*time)); +} + + +// set this quaternion to the result of the interpolation between two quaternions +inline quaternion& quaternion::slerp(quaternion q1, quaternion q2, f32 time, f32 threshold) +{ + f32 angle = q1.dotProduct(q2); + + // make sure we use the short rotation + if (angle < 0.0f) + { + q1 *= -1.0f; + angle *= -1.0f; + } + + if (angle <= (1-threshold)) // spherical interpolation + { + const f32 theta = acosf(angle); + const f32 invsintheta = reciprocal(sinf(theta)); + const f32 scale = sinf(theta * (1.0f-time)) * invsintheta; + const f32 invscale = sinf(theta * time) * invsintheta; + return (*this = (q1*scale) + (q2*invscale)); + } + else // linear interploation + return lerp(q1,q2,time); +} + + +// calculates the dot product +inline f32 quaternion::dotProduct(const quaternion& q2) const +{ + return (X * q2.X) + (Y * q2.Y) + (Z * q2.Z) + (W * q2.W); +} + + +//! axis must be unit length, angle in radians +inline quaternion& quaternion::fromAngleAxis(f32 angle, const vector3df& axis) +{ + const f32 fHalfAngle = 0.5f*angle; + const f32 fSin = sinf(fHalfAngle); + W = cosf(fHalfAngle); + X = fSin*axis.X; + Y = fSin*axis.Y; + Z = fSin*axis.Z; + return *this; +} + + +inline void quaternion::toAngleAxis(f32 &angle, core::vector3df &axis) const +{ + const f32 scale = sqrtf(X*X + Y*Y + Z*Z); + + if (core::iszero(scale) || W > 1.0f || W < -1.0f) + { + angle = 0.0f; + axis.X = 0.0f; + axis.Y = 1.0f; + axis.Z = 0.0f; + } + else + { + const f32 invscale = reciprocal(scale); + angle = 2.0f * acosf(W); + axis.X = X * invscale; + axis.Y = Y * invscale; + axis.Z = Z * invscale; + } +} + +inline void quaternion::toEuler(vector3df& euler) const +{ + const f64 sqw = W*W; + const f64 sqx = X*X; + const f64 sqy = Y*Y; + const f64 sqz = Z*Z; + const f64 test = 2.0 * (Y*W - X*Z); + + if (core::equals(test, 1.0, 0.000001)) + { + // heading = rotation about z-axis + euler.Z = (f32) (-2.0*atan2(X, W)); + // bank = rotation about x-axis + euler.X = 0; + // attitude = rotation about y-axis + euler.Y = (f32) (core::PI64/2.0); + } + else if (core::equals(test, -1.0, 0.000001)) + { + // heading = rotation about z-axis + euler.Z = (f32) (2.0*atan2(X, W)); + // bank = rotation about x-axis + euler.X = 0; + // attitude = rotation about y-axis + euler.Y = (f32) (core::PI64/-2.0); + } + else + { + // heading = rotation about z-axis + euler.Z = (f32) atan2(2.0 * (X*Y +Z*W),(sqx - sqy - sqz + sqw)); + // bank = rotation about x-axis + euler.X = (f32) atan2(2.0 * (Y*Z +X*W),(-sqx - sqy + sqz + sqw)); + // attitude = rotation about y-axis + euler.Y = (f32) asin( clamp(test, -1.0, 1.0) ); + } +} + + +inline vector3df quaternion::operator* (const vector3df& v) const +{ + // nVidia SDK implementation + + vector3df uv, uuv; + vector3df qvec(X, Y, Z); + uv = qvec.crossProduct(v); + uuv = qvec.crossProduct(uv); + uv *= (2.0f * W); + uuv *= 2.0f; + + return v + uv + uuv; +} + +// set quaternion to identity +inline core::quaternion& quaternion::makeIdentity() +{ + W = 1.f; + X = 0.f; + Y = 0.f; + Z = 0.f; + return *this; +} + +inline core::quaternion& quaternion::rotationFromTo(const vector3df& from, const vector3df& to) +{ + // Based on Stan Melax's article in Game Programming Gems + // Copy, since cannot modify local + vector3df v0 = from; + vector3df v1 = to; + v0.normalize(); + v1.normalize(); + + const f32 d = v0.dotProduct(v1); + if (d >= 1.0f) // If dot == 1, vectors are the same + { + return makeIdentity(); + } + else if (d <= -1.0f) // exactly opposite + { + core::vector3df axis(1.0f, 0.f, 0.f); + axis = axis.crossProduct(v0); + if (axis.getLength()==0) + { + axis.set(0.f,1.f,0.f); + axis = axis.crossProduct(v0); + } + // same as fromAngleAxis(core::PI, axis).normalize(); + return set(axis.X, axis.Y, axis.Z, 0).normalize(); + } + + const f32 s = sqrtf( (1+d)*2 ); // optimize inv_sqrt + const f32 invs = 1.f / s; + const vector3df c = v0.crossProduct(v1)*invs; + return set(c.X, c.Y, c.Z, s * 0.5f).normalize(); +} + + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/rect.h b/src/others/irrlicht-1.8.1/include/rect.h new file mode 100644 index 0000000..3f3883e --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/rect.h @@ -0,0 +1,279 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_RECT_H_INCLUDED__ +#define __IRR_RECT_H_INCLUDED__ + +#include "irrTypes.h" +#include "dimension2d.h" +#include "position2d.h" + +namespace irr +{ +namespace core +{ + + //! Rectangle template. + /** Mostly used by 2D GUI elements and for 2D drawing methods. + It has 2 positions instead of position and dimension and a fast + method for collision detection with other rectangles and points. + + Coordinates are (0,0) for top-left corner, and increasing to the right + and to the bottom. + */ + template + class rect + { + public: + + //! Default constructor creating empty rectangle at (0,0) + rect() : UpperLeftCorner(0,0), LowerRightCorner(0,0) {} + + //! Constructor with two corners + rect(T x, T y, T x2, T y2) + : UpperLeftCorner(x,y), LowerRightCorner(x2,y2) {} + + //! Constructor with two corners + rect(const position2d& upperLeft, const position2d& lowerRight) + : UpperLeftCorner(upperLeft), LowerRightCorner(lowerRight) {} + + //! Constructor with upper left corner and dimension + template + rect(const position2d& pos, const dimension2d& size) + : UpperLeftCorner(pos), LowerRightCorner(pos.X + size.Width, pos.Y + size.Height) {} + + //! move right by given numbers + rect operator+(const position2d& pos) const + { + rect ret(*this); + return ret+=pos; + } + + //! move right by given numbers + rect& operator+=(const position2d& pos) + { + UpperLeftCorner += pos; + LowerRightCorner += pos; + return *this; + } + + //! move left by given numbers + rect operator-(const position2d& pos) const + { + rect ret(*this); + return ret-=pos; + } + + //! move left by given numbers + rect& operator-=(const position2d& pos) + { + UpperLeftCorner -= pos; + LowerRightCorner -= pos; + return *this; + } + + //! equality operator + bool operator==(const rect& other) const + { + return (UpperLeftCorner == other.UpperLeftCorner && + LowerRightCorner == other.LowerRightCorner); + } + + //! inequality operator + bool operator!=(const rect& other) const + { + return (UpperLeftCorner != other.UpperLeftCorner || + LowerRightCorner != other.LowerRightCorner); + } + + //! compares size of rectangles + bool operator<(const rect& other) const + { + return getArea() < other.getArea(); + } + + //! Returns size of rectangle + T getArea() const + { + return getWidth() * getHeight(); + } + + //! Returns if a 2d point is within this rectangle. + /** \param pos Position to test if it lies within this rectangle. + \return True if the position is within the rectangle, false if not. */ + bool isPointInside(const position2d& pos) const + { + return (UpperLeftCorner.X <= pos.X && + UpperLeftCorner.Y <= pos.Y && + LowerRightCorner.X >= pos.X && + LowerRightCorner.Y >= pos.Y); + } + + //! Check if the rectangle collides with another rectangle. + /** \param other Rectangle to test collision with + \return True if the rectangles collide. */ + bool isRectCollided(const rect& other) const + { + return (LowerRightCorner.Y > other.UpperLeftCorner.Y && + UpperLeftCorner.Y < other.LowerRightCorner.Y && + LowerRightCorner.X > other.UpperLeftCorner.X && + UpperLeftCorner.X < other.LowerRightCorner.X); + } + + //! Clips this rectangle with another one. + /** \param other Rectangle to clip with */ + void clipAgainst(const rect& other) + { + if (other.LowerRightCorner.X < LowerRightCorner.X) + LowerRightCorner.X = other.LowerRightCorner.X; + if (other.LowerRightCorner.Y < LowerRightCorner.Y) + LowerRightCorner.Y = other.LowerRightCorner.Y; + + if (other.UpperLeftCorner.X > UpperLeftCorner.X) + UpperLeftCorner.X = other.UpperLeftCorner.X; + if (other.UpperLeftCorner.Y > UpperLeftCorner.Y) + UpperLeftCorner.Y = other.UpperLeftCorner.Y; + + // correct possible invalid rect resulting from clipping + if (UpperLeftCorner.Y > LowerRightCorner.Y) + UpperLeftCorner.Y = LowerRightCorner.Y; + if (UpperLeftCorner.X > LowerRightCorner.X) + UpperLeftCorner.X = LowerRightCorner.X; + } + + //! Moves this rectangle to fit inside another one. + /** \return True on success, false if not possible */ + bool constrainTo(const rect& other) + { + if (other.getWidth() < getWidth() || other.getHeight() < getHeight()) + return false; + + T diff = other.LowerRightCorner.X - LowerRightCorner.X; + if (diff < 0) + { + LowerRightCorner.X += diff; + UpperLeftCorner.X += diff; + } + + diff = other.LowerRightCorner.Y - LowerRightCorner.Y; + if (diff < 0) + { + LowerRightCorner.Y += diff; + UpperLeftCorner.Y += diff; + } + + diff = UpperLeftCorner.X - other.UpperLeftCorner.X; + if (diff < 0) + { + UpperLeftCorner.X -= diff; + LowerRightCorner.X -= diff; + } + + diff = UpperLeftCorner.Y - other.UpperLeftCorner.Y; + if (diff < 0) + { + UpperLeftCorner.Y -= diff; + LowerRightCorner.Y -= diff; + } + + return true; + } + + //! Get width of rectangle. + T getWidth() const + { + return LowerRightCorner.X - UpperLeftCorner.X; + } + + //! Get height of rectangle. + T getHeight() const + { + return LowerRightCorner.Y - UpperLeftCorner.Y; + } + + //! If the lower right corner of the rect is smaller then the upper left, the points are swapped. + void repair() + { + if (LowerRightCorner.X < UpperLeftCorner.X) + { + T t = LowerRightCorner.X; + LowerRightCorner.X = UpperLeftCorner.X; + UpperLeftCorner.X = t; + } + + if (LowerRightCorner.Y < UpperLeftCorner.Y) + { + T t = LowerRightCorner.Y; + LowerRightCorner.Y = UpperLeftCorner.Y; + UpperLeftCorner.Y = t; + } + } + + //! Returns if the rect is valid to draw. + /** It would be invalid if the UpperLeftCorner is lower or more + right than the LowerRightCorner. */ + bool isValid() const + { + return ((LowerRightCorner.X >= UpperLeftCorner.X) && + (LowerRightCorner.Y >= UpperLeftCorner.Y)); + } + + //! Get the center of the rectangle + position2d getCenter() const + { + return position2d( + (UpperLeftCorner.X + LowerRightCorner.X) / 2, + (UpperLeftCorner.Y + LowerRightCorner.Y) / 2); + } + + //! Get the dimensions of the rectangle + dimension2d getSize() const + { + return dimension2d(getWidth(), getHeight()); + } + + + //! Adds a point to the rectangle + /** Causes the rectangle to grow bigger if point is outside of + the box + \param p Point to add to the box. */ + void addInternalPoint(const position2d& p) + { + addInternalPoint(p.X, p.Y); + } + + //! Adds a point to the bounding rectangle + /** Causes the rectangle to grow bigger if point is outside of + the box + \param x X-Coordinate of the point to add to this box. + \param y Y-Coordinate of the point to add to this box. */ + void addInternalPoint(T x, T y) + { + if (x>LowerRightCorner.X) + LowerRightCorner.X = x; + if (y>LowerRightCorner.Y) + LowerRightCorner.Y = y; + + if (x UpperLeftCorner; + //! Lower right corner + position2d LowerRightCorner; + }; + + //! Rectangle with float values + typedef rect rectf; + //! Rectangle with int values + typedef rect recti; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/triangle3d.h b/src/others/irrlicht-1.8.1/include/triangle3d.h new file mode 100644 index 0000000..2f5a36c --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/triangle3d.h @@ -0,0 +1,279 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_TRIANGLE_3D_H_INCLUDED__ +#define __IRR_TRIANGLE_3D_H_INCLUDED__ + +#include "vector3d.h" +#include "line3d.h" +#include "plane3d.h" +#include "aabbox3d.h" + +namespace irr +{ +namespace core +{ + + //! 3d triangle template class for doing collision detection and other things. + template + class triangle3d + { + public: + + //! Constructor for an all 0 triangle + triangle3d() {} + //! Constructor for triangle with given three vertices + triangle3d(vector3d v1, vector3d v2, vector3d v3) : pointA(v1), pointB(v2), pointC(v3) {} + + //! Equality operator + bool operator==(const triangle3d& other) const + { + return other.pointA==pointA && other.pointB==pointB && other.pointC==pointC; + } + + //! Inequality operator + bool operator!=(const triangle3d& other) const + { + return !(*this==other); + } + + //! Determines if the triangle is totally inside a bounding box. + /** \param box Box to check. + \return True if triangle is within the box, otherwise false. */ + bool isTotalInsideBox(const aabbox3d& box) const + { + return (box.isPointInside(pointA) && + box.isPointInside(pointB) && + box.isPointInside(pointC)); + } + + //! Determines if the triangle is totally outside a bounding box. + /** \param box Box to check. + \return True if triangle is outside the box, otherwise false. */ + bool isTotalOutsideBox(const aabbox3d& box) const + { + return ((pointA.X > box.MaxEdge.X && pointB.X > box.MaxEdge.X && pointC.X > box.MaxEdge.X) || + + (pointA.Y > box.MaxEdge.Y && pointB.Y > box.MaxEdge.Y && pointC.Y > box.MaxEdge.Y) || + (pointA.Z > box.MaxEdge.Z && pointB.Z > box.MaxEdge.Z && pointC.Z > box.MaxEdge.Z) || + (pointA.X < box.MinEdge.X && pointB.X < box.MinEdge.X && pointC.X < box.MinEdge.X) || + (pointA.Y < box.MinEdge.Y && pointB.Y < box.MinEdge.Y && pointC.Y < box.MinEdge.Y) || + (pointA.Z < box.MinEdge.Z && pointB.Z < box.MinEdge.Z && pointC.Z < box.MinEdge.Z)); + } + + //! Get the closest point on a triangle to a point on the same plane. + /** \param p Point which must be on the same plane as the triangle. + \return The closest point of the triangle */ + core::vector3d closestPointOnTriangle(const core::vector3d& p) const + { + const core::vector3d rab = line3d(pointA, pointB).getClosestPoint(p); + const core::vector3d rbc = line3d(pointB, pointC).getClosestPoint(p); + const core::vector3d rca = line3d(pointC, pointA).getClosestPoint(p); + + const T d1 = rab.getDistanceFrom(p); + const T d2 = rbc.getDistanceFrom(p); + const T d3 = rca.getDistanceFrom(p); + + if (d1 < d2) + return d1 < d3 ? rab : rca; + + return d2 < d3 ? rbc : rca; + } + + //! Check if a point is inside the triangle (border-points count also as inside) + /* + \param p Point to test. Assumes that this point is already + on the plane of the triangle. + \return True if the point is inside the triangle, otherwise false. */ + bool isPointInside(const vector3d& p) const + { + vector3d af64((f64)pointA.X, (f64)pointA.Y, (f64)pointA.Z); + vector3d bf64((f64)pointB.X, (f64)pointB.Y, (f64)pointB.Z); + vector3d cf64((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z); + vector3d pf64((f64)p.X, (f64)p.Y, (f64)p.Z); + return (isOnSameSide(pf64, af64, bf64, cf64) && + isOnSameSide(pf64, bf64, af64, cf64) && + isOnSameSide(pf64, cf64, af64, bf64)); + } + + //! Check if a point is inside the triangle (border-points count also as inside) + /** This method uses a barycentric coordinate system. + It is faster than isPointInside but is more susceptible to floating point rounding + errors. This will especially be noticable when the FPU is in single precision mode + (which is for example set on default by Direct3D). + \param p Point to test. Assumes that this point is already + on the plane of the triangle. + \return True if point is inside the triangle, otherwise false. */ + bool isPointInsideFast(const vector3d& p) const + { + const vector3d a = pointC - pointA; + const vector3d b = pointB - pointA; + const vector3d c = p - pointA; + + const f64 dotAA = a.dotProduct( a); + const f64 dotAB = a.dotProduct( b); + const f64 dotAC = a.dotProduct( c); + const f64 dotBB = b.dotProduct( b); + const f64 dotBC = b.dotProduct( c); + + // get coordinates in barycentric coordinate system + const f64 invDenom = 1/(dotAA * dotBB - dotAB * dotAB); + const f64 u = (dotBB * dotAC - dotAB * dotBC) * invDenom; + const f64 v = (dotAA * dotBC - dotAB * dotAC ) * invDenom; + + // We count border-points as inside to keep downward compatibility. + // Rounding-error also needed for some test-cases. + return (u > -ROUNDING_ERROR_f32) && (v >= 0) && (u + v < 1+ROUNDING_ERROR_f32); + + } + + + //! Get an intersection with a 3d line. + /** \param line Line to intersect with. + \param outIntersection Place to store the intersection point, if there is one. + \return True if there was an intersection, false if not. */ + bool getIntersectionWithLimitedLine(const line3d& line, + vector3d& outIntersection) const + { + return getIntersectionWithLine(line.start, + line.getVector(), outIntersection) && + outIntersection.isBetweenPoints(line.start, line.end); + } + + + //! Get an intersection with a 3d line. + /** Please note that also points are returned as intersection which + are on the line, but not between the start and end point of the line. + If you want the returned point be between start and end + use getIntersectionWithLimitedLine(). + \param linePoint Point of the line to intersect with. + \param lineVect Vector of the line to intersect with. + \param outIntersection Place to store the intersection point, if there is one. + \return True if there was an intersection, false if there was not. */ + bool getIntersectionWithLine(const vector3d& linePoint, + const vector3d& lineVect, vector3d& outIntersection) const + { + if (getIntersectionOfPlaneWithLine(linePoint, lineVect, outIntersection)) + return isPointInside(outIntersection); + + return false; + } + + + //! Calculates the intersection between a 3d line and the plane the triangle is on. + /** \param lineVect Vector of the line to intersect with. + \param linePoint Point of the line to intersect with. + \param outIntersection Place to store the intersection point, if there is one. + \return True if there was an intersection, else false. */ + bool getIntersectionOfPlaneWithLine(const vector3d& linePoint, + const vector3d& lineVect, vector3d& outIntersection) const + { + // Work with f64 to get more precise results (makes enough difference to be worth the casts). + const vector3d linePointf64(linePoint.X, linePoint.Y, linePoint.Z); + const vector3d lineVectf64(lineVect.X, lineVect.Y, lineVect.Z); + vector3d outIntersectionf64; + + core::triangle3d trianglef64(vector3d((f64)pointA.X, (f64)pointA.Y, (f64)pointA.Z) + ,vector3d((f64)pointB.X, (f64)pointB.Y, (f64)pointB.Z) + , vector3d((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z)); + const vector3d normalf64 = trianglef64.getNormal().normalize(); + f64 t2; + + if ( core::iszero ( t2 = normalf64.dotProduct(lineVectf64) ) ) + return false; + + f64 d = trianglef64.pointA.dotProduct(normalf64); + f64 t = -(normalf64.dotProduct(linePointf64) - d) / t2; + outIntersectionf64 = linePointf64 + (lineVectf64 * t); + + outIntersection.X = (T)outIntersectionf64.X; + outIntersection.Y = (T)outIntersectionf64.Y; + outIntersection.Z = (T)outIntersectionf64.Z; + return true; + } + + + //! Get the normal of the triangle. + /** Please note: The normal is not always normalized. */ + vector3d getNormal() const + { + return (pointB - pointA).crossProduct(pointC - pointA); + } + + //! Test if the triangle would be front or backfacing from any point. + /** Thus, this method assumes a camera position from which the + triangle is definitely visible when looking at the given direction. + Do not use this method with points as it will give wrong results! + \param lookDirection Look direction. + \return True if the plane is front facing and false if it is backfacing. */ + bool isFrontFacing(const vector3d& lookDirection) const + { + const vector3d n = getNormal().normalize(); + const f32 d = (f32)n.dotProduct(lookDirection); + return F32_LOWER_EQUAL_0(d); + } + + //! Get the plane of this triangle. + plane3d getPlane() const + { + return plane3d(pointA, pointB, pointC); + } + + //! Get the area of the triangle + T getArea() const + { + return (pointB - pointA).crossProduct(pointC - pointA).getLength() * 0.5f; + + } + + //! sets the triangle's points + void set(const core::vector3d& a, const core::vector3d& b, const core::vector3d& c) + { + pointA = a; + pointB = b; + pointC = c; + } + + //! the three points of the triangle + vector3d pointA; + vector3d pointB; + vector3d pointC; + + private: + // Using f64 instead of to avoid integer overflows when T=int (maybe also less floating point troubles). + bool isOnSameSide(const vector3d& p1, const vector3d& p2, + const vector3d& a, const vector3d& b) const + { + vector3d bminusa = b - a; + vector3d cp1 = bminusa.crossProduct(p1 - a); + vector3d cp2 = bminusa.crossProduct(p2 - a); + f64 res = cp1.dotProduct(cp2); + if ( res < 0 ) + { + // This catches some floating point troubles. + // Unfortunately slightly expensive and we don't really know the best epsilon for iszero. + vector3d cp1 = bminusa.normalize().crossProduct((p1 - a).normalize()); + if ( core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32) + && core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32) + && core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) ) + { + res = 0.f; + } + } + return (res >= 0.0f); + } + }; + + + //! Typedef for a f32 3d triangle. + typedef triangle3d triangle3df; + + //! Typedef for an integer 3d triangle. + typedef triangle3d triangle3di; + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/vector2d.h b/src/others/irrlicht-1.8.1/include/vector2d.h new file mode 100644 index 0000000..360da8f --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/vector2d.h @@ -0,0 +1,342 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_POINT_2D_H_INCLUDED__ +#define __IRR_POINT_2D_H_INCLUDED__ + +#include "irrMath.h" +#include "dimension2d.h" + +namespace irr +{ +namespace core +{ + + +//! 2d vector template class with lots of operators and methods. +/** As of Irrlicht 1.6, this class supercedes position2d, which should + be considered deprecated. */ +template +class vector2d +{ +public: + //! Default constructor (null vector) + vector2d() : X(0), Y(0) {} + //! Constructor with two different values + vector2d(T nx, T ny) : X(nx), Y(ny) {} + //! Constructor with the same value for both members + explicit vector2d(T n) : X(n), Y(n) {} + //! Copy constructor + vector2d(const vector2d& other) : X(other.X), Y(other.Y) {} + + vector2d(const dimension2d& other) : X(other.Width), Y(other.Height) {} + + // operators + + vector2d operator-() const { return vector2d(-X, -Y); } + + vector2d& operator=(const vector2d& other) { X = other.X; Y = other.Y; return *this; } + + vector2d& operator=(const dimension2d& other) { X = other.Width; Y = other.Height; return *this; } + + vector2d operator+(const vector2d& other) const { return vector2d(X + other.X, Y + other.Y); } + vector2d operator+(const dimension2d& other) const { return vector2d(X + other.Width, Y + other.Height); } + vector2d& operator+=(const vector2d& other) { X+=other.X; Y+=other.Y; return *this; } + vector2d operator+(const T v) const { return vector2d(X + v, Y + v); } + vector2d& operator+=(const T v) { X+=v; Y+=v; return *this; } + vector2d& operator+=(const dimension2d& other) { X += other.Width; Y += other.Height; return *this; } + + vector2d operator-(const vector2d& other) const { return vector2d(X - other.X, Y - other.Y); } + vector2d operator-(const dimension2d& other) const { return vector2d(X - other.Width, Y - other.Height); } + vector2d& operator-=(const vector2d& other) { X-=other.X; Y-=other.Y; return *this; } + vector2d operator-(const T v) const { return vector2d(X - v, Y - v); } + vector2d& operator-=(const T v) { X-=v; Y-=v; return *this; } + vector2d& operator-=(const dimension2d& other) { X -= other.Width; Y -= other.Height; return *this; } + + vector2d operator*(const vector2d& other) const { return vector2d(X * other.X, Y * other.Y); } + vector2d& operator*=(const vector2d& other) { X*=other.X; Y*=other.Y; return *this; } + vector2d operator*(const T v) const { return vector2d(X * v, Y * v); } + vector2d& operator*=(const T v) { X*=v; Y*=v; return *this; } + + vector2d operator/(const vector2d& other) const { return vector2d(X / other.X, Y / other.Y); } + vector2d& operator/=(const vector2d& other) { X/=other.X; Y/=other.Y; return *this; } + vector2d operator/(const T v) const { return vector2d(X / v, Y / v); } + vector2d& operator/=(const T v) { X/=v; Y/=v; return *this; } + + //! sort in order X, Y. Equality with rounding tolerance. + bool operator<=(const vector2d&other) const + { + return (X=(const vector2d&other) const + { + return (X>other.X || core::equals(X, other.X)) || + (core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))); + } + + //! sort in order X, Y. Difference must be above rounding tolerance. + bool operator<(const vector2d&other) const + { + return (X(const vector2d&other) const + { + return (X>other.X && !core::equals(X, other.X)) || + (core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)); + } + + bool operator==(const vector2d& other) const { return equals(other); } + bool operator!=(const vector2d& other) const { return !equals(other); } + + // functions + + //! Checks if this vector equals the other one. + /** Takes floating point rounding errors into account. + \param other Vector to compare with. + \return True if the two vector are (almost) equal, else false. */ + bool equals(const vector2d& other) const + { + return core::equals(X, other.X) && core::equals(Y, other.Y); + } + + vector2d& set(T nx, T ny) {X=nx; Y=ny; return *this; } + vector2d& set(const vector2d& p) { X=p.X; Y=p.Y; return *this; } + + //! Gets the length of the vector. + /** \return The length of the vector. */ + T getLength() const { return core::squareroot( X*X + Y*Y ); } + + //! Get the squared length of this vector + /** This is useful because it is much faster than getLength(). + \return The squared length of the vector. */ + T getLengthSQ() const { return X*X + Y*Y; } + + //! Get the dot product of this vector with another. + /** \param other Other vector to take dot product with. + \return The dot product of the two vectors. */ + T dotProduct(const vector2d& other) const + { + return X*other.X + Y*other.Y; + } + + //! Gets distance from another point. + /** Here, the vector is interpreted as a point in 2-dimensional space. + \param other Other vector to measure from. + \return Distance from other point. */ + T getDistanceFrom(const vector2d& other) const + { + return vector2d(X - other.X, Y - other.Y).getLength(); + } + + //! Returns squared distance from another point. + /** Here, the vector is interpreted as a point in 2-dimensional space. + \param other Other vector to measure from. + \return Squared distance from other point. */ + T getDistanceFromSQ(const vector2d& other) const + { + return vector2d(X - other.X, Y - other.Y).getLengthSQ(); + } + + //! rotates the point anticlockwise around a center by an amount of degrees. + /** \param degrees Amount of degrees to rotate by, anticlockwise. + \param center Rotation center. + \return This vector after transformation. */ + vector2d& rotateBy(f64 degrees, const vector2d& center=vector2d()) + { + degrees *= DEGTORAD64; + const f64 cs = cos(degrees); + const f64 sn = sin(degrees); + + X -= center.X; + Y -= center.Y; + + set((T)(X*cs - Y*sn), (T)(X*sn + Y*cs)); + + X += center.X; + Y += center.Y; + return *this; + } + + //! Normalize the vector. + /** The null vector is left untouched. + \return Reference to this vector, after normalization. */ + vector2d& normalize() + { + f32 length = (f32)(X*X + Y*Y); + if ( length == 0 ) + return *this; + length = core::reciprocal_squareroot ( length ); + X = (T)(X * length); + Y = (T)(Y * length); + return *this; + } + + //! Calculates the angle of this vector in degrees in the trigonometric sense. + /** 0 is to the right (3 o'clock), values increase counter-clockwise. + This method has been suggested by Pr3t3nd3r. + \return Returns a value between 0 and 360. */ + f64 getAngleTrig() const + { + if (Y == 0) + return X < 0 ? 180 : 0; + else + if (X == 0) + return Y < 0 ? 270 : 90; + + if ( Y > 0) + if (X > 0) + return atan((irr::f64)Y/(irr::f64)X) * RADTODEG64; + else + return 180.0-atan((irr::f64)Y/-(irr::f64)X) * RADTODEG64; + else + if (X > 0) + return 360.0-atan(-(irr::f64)Y/(irr::f64)X) * RADTODEG64; + else + return 180.0+atan(-(irr::f64)Y/-(irr::f64)X) * RADTODEG64; + } + + //! Calculates the angle of this vector in degrees in the counter trigonometric sense. + /** 0 is to the right (3 o'clock), values increase clockwise. + \return Returns a value between 0 and 360. */ + inline f64 getAngle() const + { + if (Y == 0) // corrected thanks to a suggestion by Jox + return X < 0 ? 180 : 0; + else if (X == 0) + return Y < 0 ? 90 : 270; + + // don't use getLength here to avoid precision loss with s32 vectors + // avoid floating-point trouble as sqrt(y*y) is occasionally larger than y, so clamp + const f64 tmp = core::clamp(Y / sqrt((f64)(X*X + Y*Y)), -1.0, 1.0); + const f64 angle = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64; + + if (X>0 && Y>0) + return angle + 270; + else + if (X>0 && Y<0) + return angle + 90; + else + if (X<0 && Y<0) + return 90 - angle; + else + if (X<0 && Y>0) + return 270 - angle; + + return angle; + } + + //! Calculates the angle between this vector and another one in degree. + /** \param b Other vector to test with. + \return Returns a value between 0 and 90. */ + inline f64 getAngleWith(const vector2d& b) const + { + f64 tmp = (f64)(X*b.X + Y*b.Y); + + if (tmp == 0.0) + return 90.0; + + tmp = tmp / core::squareroot((f64)((X*X + Y*Y) * (b.X*b.X + b.Y*b.Y))); + if (tmp < 0.0) + tmp = -tmp; + if ( tmp > 1.0 ) // avoid floating-point trouble + tmp = 1.0; + + return atan(sqrt(1 - tmp*tmp) / tmp) * RADTODEG64; + } + + //! Returns if this vector interpreted as a point is on a line between two other points. + /** It is assumed that the point is on the line. + \param begin Beginning vector to compare between. + \param end Ending vector to compare between. + \return True if this vector is between begin and end, false if not. */ + bool isBetweenPoints(const vector2d& begin, const vector2d& end) const + { + if (begin.X != end.X) + { + return ((begin.X <= X && X <= end.X) || + (begin.X >= X && X >= end.X)); + } + else + { + return ((begin.Y <= Y && Y <= end.Y) || + (begin.Y >= Y && Y >= end.Y)); + } + } + + //! Creates an interpolated vector between this vector and another vector. + /** \param other The other vector to interpolate with. + \param d Interpolation value between 0.0f (all the other vector) and 1.0f (all this vector). + Note that this is the opposite direction of interpolation to getInterpolated_quadratic() + \return An interpolated vector. This vector is not modified. */ + vector2d getInterpolated(const vector2d& other, f64 d) const + { + f64 inv = 1.0f - d; + return vector2d((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d)); + } + + //! Creates a quadratically interpolated vector between this and two other vectors. + /** \param v2 Second vector to interpolate with. + \param v3 Third vector to interpolate with (maximum at 1.0f) + \param d Interpolation value between 0.0f (all this vector) and 1.0f (all the 3rd vector). + Note that this is the opposite direction of interpolation to getInterpolated() and interpolate() + \return An interpolated vector. This vector is not modified. */ + vector2d getInterpolated_quadratic(const vector2d& v2, const vector2d& v3, f64 d) const + { + // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d; + const f64 inv = 1.0f - d; + const f64 mul0 = inv * inv; + const f64 mul1 = 2.0f * d * inv; + const f64 mul2 = d * d; + + return vector2d ( (T)(X * mul0 + v2.X * mul1 + v3.X * mul2), + (T)(Y * mul0 + v2.Y * mul1 + v3.Y * mul2)); + } + + //! Sets this vector to the linearly interpolated vector between a and b. + /** \param a first vector to interpolate with, maximum at 1.0f + \param b second vector to interpolate with, maximum at 0.0f + \param d Interpolation value between 0.0f (all vector b) and 1.0f (all vector a) + Note that this is the opposite direction of interpolation to getInterpolated_quadratic() + */ + vector2d& interpolate(const vector2d& a, const vector2d& b, f64 d) + { + X = (T)((f64)b.X + ( ( a.X - b.X ) * d )); + Y = (T)((f64)b.Y + ( ( a.Y - b.Y ) * d )); + return *this; + } + + //! X coordinate of vector. + T X; + + //! Y coordinate of vector. + T Y; +}; + + //! Typedef for f32 2d vector. + typedef vector2d vector2df; + + //! Typedef for integer 2d vector. + typedef vector2d vector2di; + + template + vector2d operator*(const S scalar, const vector2d& vector) { return vector*scalar; } + + // These methods are declared in dimension2d, but need definitions of vector2d + template + dimension2d::dimension2d(const vector2d& other) : Width(other.X), Height(other.Y) { } + + template + bool dimension2d::operator==(const vector2d& other) const { return Width == other.X && Height == other.Y; } + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/include/vector3d.h b/src/others/irrlicht-1.8.1/include/vector3d.h new file mode 100644 index 0000000..fd6c50d --- /dev/null +++ b/src/others/irrlicht-1.8.1/include/vector3d.h @@ -0,0 +1,458 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_POINT_3D_H_INCLUDED__ +#define __IRR_POINT_3D_H_INCLUDED__ + +#include "irrMath.h" + +namespace irr +{ +namespace core +{ + + //! 3d vector template class with lots of operators and methods. + /** The vector3d class is used in Irrlicht for three main purposes: + 1) As a direction vector (most of the methods assume this). + 2) As a position in 3d space (which is synonymous with a direction vector from the origin to this position). + 3) To hold three Euler rotations, where X is pitch, Y is yaw and Z is roll. + */ + template + class vector3d + { + public: + //! Default constructor (null vector). + vector3d() : X(0), Y(0), Z(0) {} + //! Constructor with three different values + vector3d(T nx, T ny, T nz) : X(nx), Y(ny), Z(nz) {} + //! Constructor with the same value for all elements + explicit vector3d(T n) : X(n), Y(n), Z(n) {} + //! Copy constructor + vector3d(const vector3d& other) : X(other.X), Y(other.Y), Z(other.Z) {} + + // operators + + vector3d operator-() const { return vector3d(-X, -Y, -Z); } + + vector3d& operator=(const vector3d& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; } + + vector3d operator+(const vector3d& other) const { return vector3d(X + other.X, Y + other.Y, Z + other.Z); } + vector3d& operator+=(const vector3d& other) { X+=other.X; Y+=other.Y; Z+=other.Z; return *this; } + vector3d operator+(const T val) const { return vector3d(X + val, Y + val, Z + val); } + vector3d& operator+=(const T val) { X+=val; Y+=val; Z+=val; return *this; } + + vector3d operator-(const vector3d& other) const { return vector3d(X - other.X, Y - other.Y, Z - other.Z); } + vector3d& operator-=(const vector3d& other) { X-=other.X; Y-=other.Y; Z-=other.Z; return *this; } + vector3d operator-(const T val) const { return vector3d(X - val, Y - val, Z - val); } + vector3d& operator-=(const T val) { X-=val; Y-=val; Z-=val; return *this; } + + vector3d operator*(const vector3d& other) const { return vector3d(X * other.X, Y * other.Y, Z * other.Z); } + vector3d& operator*=(const vector3d& other) { X*=other.X; Y*=other.Y; Z*=other.Z; return *this; } + vector3d operator*(const T v) const { return vector3d(X * v, Y * v, Z * v); } + vector3d& operator*=(const T v) { X*=v; Y*=v; Z*=v; return *this; } + + vector3d operator/(const vector3d& other) const { return vector3d(X / other.X, Y / other.Y, Z / other.Z); } + vector3d& operator/=(const vector3d& other) { X/=other.X; Y/=other.Y; Z/=other.Z; return *this; } + vector3d operator/(const T v) const { T i=(T)1.0/v; return vector3d(X * i, Y * i, Z * i); } + vector3d& operator/=(const T v) { T i=(T)1.0/v; X*=i; Y*=i; Z*=i; return *this; } + + //! sort in order X, Y, Z. Equality with rounding tolerance. + bool operator<=(const vector3d&other) const + { + return (X=(const vector3d&other) const + { + return (X>other.X || core::equals(X, other.X)) || + (core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))) || + (core::equals(X, other.X) && core::equals(Y, other.Y) && (Z>other.Z || core::equals(Z, other.Z))); + } + + //! sort in order X, Y, Z. Difference must be above rounding tolerance. + bool operator<(const vector3d&other) const + { + return (X(const vector3d&other) const + { + return (X>other.X && !core::equals(X, other.X)) || + (core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)) || + (core::equals(X, other.X) && core::equals(Y, other.Y) && Z>other.Z && !core::equals(Z, other.Z)); + } + + //! use weak float compare + bool operator==(const vector3d& other) const + { + return this->equals(other); + } + + bool operator!=(const vector3d& other) const + { + return !this->equals(other); + } + + // functions + + //! returns if this vector equals the other one, taking floating point rounding errors into account + bool equals(const vector3d& other, const T tolerance = (T)ROUNDING_ERROR_f32 ) const + { + return core::equals(X, other.X, tolerance) && + core::equals(Y, other.Y, tolerance) && + core::equals(Z, other.Z, tolerance); + } + + vector3d& set(const T nx, const T ny, const T nz) {X=nx; Y=ny; Z=nz; return *this;} + vector3d& set(const vector3d& p) {X=p.X; Y=p.Y; Z=p.Z;return *this;} + + //! Get length of the vector. + T getLength() const { return core::squareroot( X*X + Y*Y + Z*Z ); } + + //! Get squared length of the vector. + /** This is useful because it is much faster than getLength(). + \return Squared length of the vector. */ + T getLengthSQ() const { return X*X + Y*Y + Z*Z; } + + //! Get the dot product with another vector. + T dotProduct(const vector3d& other) const + { + return X*other.X + Y*other.Y + Z*other.Z; + } + + //! Get distance from another point. + /** Here, the vector is interpreted as point in 3 dimensional space. */ + T getDistanceFrom(const vector3d& other) const + { + return vector3d(X - other.X, Y - other.Y, Z - other.Z).getLength(); + } + + //! Returns squared distance from another point. + /** Here, the vector is interpreted as point in 3 dimensional space. */ + T getDistanceFromSQ(const vector3d& other) const + { + return vector3d(X - other.X, Y - other.Y, Z - other.Z).getLengthSQ(); + } + + //! Calculates the cross product with another vector. + /** \param p Vector to multiply with. + \return Crossproduct of this vector with p. */ + vector3d crossProduct(const vector3d& p) const + { + return vector3d(Y * p.Z - Z * p.Y, Z * p.X - X * p.Z, X * p.Y - Y * p.X); + } + + //! Returns if this vector interpreted as a point is on a line between two other points. + /** It is assumed that the point is on the line. + \param begin Beginning vector to compare between. + \param end Ending vector to compare between. + \return True if this vector is between begin and end, false if not. */ + bool isBetweenPoints(const vector3d& begin, const vector3d& end) const + { + const T f = (end - begin).getLengthSQ(); + return getDistanceFromSQ(begin) <= f && + getDistanceFromSQ(end) <= f; + } + + //! Normalizes the vector. + /** In case of the 0 vector the result is still 0, otherwise + the length of the vector will be 1. + \return Reference to this vector after normalization. */ + vector3d& normalize() + { + f64 length = X*X + Y*Y + Z*Z; + if (length == 0 ) // this check isn't an optimization but prevents getting NAN in the sqrt. + return *this; + length = core::reciprocal_squareroot(length); + + X = (T)(X * length); + Y = (T)(Y * length); + Z = (T)(Z * length); + return *this; + } + + //! Sets the length of the vector to a new value + vector3d& setLength(T newlength) + { + normalize(); + return (*this *= newlength); + } + + //! Inverts the vector. + vector3d& invert() + { + X *= -1; + Y *= -1; + Z *= -1; + return *this; + } + + //! Rotates the vector by a specified number of degrees around the Y axis and the specified center. + /** \param degrees Number of degrees to rotate around the Y axis. + \param center The center of the rotation. */ + void rotateXZBy(f64 degrees, const vector3d& center=vector3d()) + { + degrees *= DEGTORAD64; + f64 cs = cos(degrees); + f64 sn = sin(degrees); + X -= center.X; + Z -= center.Z; + set((T)(X*cs - Z*sn), Y, (T)(X*sn + Z*cs)); + X += center.X; + Z += center.Z; + } + + //! Rotates the vector by a specified number of degrees around the Z axis and the specified center. + /** \param degrees: Number of degrees to rotate around the Z axis. + \param center: The center of the rotation. */ + void rotateXYBy(f64 degrees, const vector3d& center=vector3d()) + { + degrees *= DEGTORAD64; + f64 cs = cos(degrees); + f64 sn = sin(degrees); + X -= center.X; + Y -= center.Y; + set((T)(X*cs - Y*sn), (T)(X*sn + Y*cs), Z); + X += center.X; + Y += center.Y; + } + + //! Rotates the vector by a specified number of degrees around the X axis and the specified center. + /** \param degrees: Number of degrees to rotate around the X axis. + \param center: The center of the rotation. */ + void rotateYZBy(f64 degrees, const vector3d& center=vector3d()) + { + degrees *= DEGTORAD64; + f64 cs = cos(degrees); + f64 sn = sin(degrees); + Z -= center.Z; + Y -= center.Y; + set(X, (T)(Y*cs - Z*sn), (T)(Y*sn + Z*cs)); + Z += center.Z; + Y += center.Y; + } + + //! Creates an interpolated vector between this vector and another vector. + /** \param other The other vector to interpolate with. + \param d Interpolation value between 0.0f (all the other vector) and 1.0f (all this vector). + Note that this is the opposite direction of interpolation to getInterpolated_quadratic() + \return An interpolated vector. This vector is not modified. */ + vector3d getInterpolated(const vector3d& other, f64 d) const + { + const f64 inv = 1.0 - d; + return vector3d((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d), (T)(other.Z*inv + Z*d)); + } + + //! Creates a quadratically interpolated vector between this and two other vectors. + /** \param v2 Second vector to interpolate with. + \param v3 Third vector to interpolate with (maximum at 1.0f) + \param d Interpolation value between 0.0f (all this vector) and 1.0f (all the 3rd vector). + Note that this is the opposite direction of interpolation to getInterpolated() and interpolate() + \return An interpolated vector. This vector is not modified. */ + vector3d getInterpolated_quadratic(const vector3d& v2, const vector3d& v3, f64 d) const + { + // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d; + const f64 inv = (T) 1.0 - d; + const f64 mul0 = inv * inv; + const f64 mul1 = (T) 2.0 * d * inv; + const f64 mul2 = d * d; + + return vector3d ((T)(X * mul0 + v2.X * mul1 + v3.X * mul2), + (T)(Y * mul0 + v2.Y * mul1 + v3.Y * mul2), + (T)(Z * mul0 + v2.Z * mul1 + v3.Z * mul2)); + } + + //! Sets this vector to the linearly interpolated vector between a and b. + /** \param a first vector to interpolate with, maximum at 1.0f + \param b second vector to interpolate with, maximum at 0.0f + \param d Interpolation value between 0.0f (all vector b) and 1.0f (all vector a) + Note that this is the opposite direction of interpolation to getInterpolated_quadratic() + */ + vector3d& interpolate(const vector3d& a, const vector3d& b, f64 d) + { + X = (T)((f64)b.X + ( ( a.X - b.X ) * d )); + Y = (T)((f64)b.Y + ( ( a.Y - b.Y ) * d )); + Z = (T)((f64)b.Z + ( ( a.Z - b.Z ) * d )); + return *this; + } + + + //! Get the rotations that would make a (0,0,1) direction vector point in the same direction as this direction vector. + /** Thanks to Arras on the Irrlicht forums for this method. This utility method is very useful for + orienting scene nodes towards specific targets. For example, if this vector represents the difference + between two scene nodes, then applying the result of getHorizontalAngle() to one scene node will point + it at the other one. + Example code: + // Where target and seeker are of type ISceneNode* + const vector3df toTarget(target->getAbsolutePosition() - seeker->getAbsolutePosition()); + const vector3df requiredRotation = toTarget.getHorizontalAngle(); + seeker->setRotation(requiredRotation); + + \return A rotation vector containing the X (pitch) and Y (raw) rotations (in degrees) that when applied to a + +Z (e.g. 0, 0, 1) direction vector would make it point in the same direction as this vector. The Z (roll) rotation + is always 0, since two Euler rotations are sufficient to point in any given direction. */ + vector3d getHorizontalAngle() const + { + vector3d angle; + + const f64 tmp = (atan2((f64)X, (f64)Z) * RADTODEG64); + angle.Y = (T)tmp; + + if (angle.Y < 0) + angle.Y += 360; + if (angle.Y >= 360) + angle.Y -= 360; + + const f64 z1 = core::squareroot(X*X + Z*Z); + + angle.X = (T)(atan2((f64)z1, (f64)Y) * RADTODEG64 - 90.0); + + if (angle.X < 0) + angle.X += 360; + if (angle.X >= 360) + angle.X -= 360; + + return angle; + } + + //! Get the spherical coordinate angles + /** This returns Euler degrees for the point represented by + this vector. The calculation assumes the pole at (0,1,0) and + returns the angles in X and Y. + */ + vector3d getSphericalCoordinateAngles() const + { + vector3d angle; + const f64 length = X*X + Y*Y + Z*Z; + + if (length) + { + if (X!=0) + { + angle.Y = (T)(atan2((f64)Z,(f64)X) * RADTODEG64); + } + else if (Z<0) + angle.Y=180; + + angle.X = (T)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64); + } + return angle; + } + + //! Builds a direction vector from (this) rotation vector. + /** This vector is assumed to be a rotation vector composed of 3 Euler angle rotations, in degrees. + The implementation performs the same calculations as using a matrix to do the rotation. + + \param[in] forwards The direction representing "forwards" which will be rotated by this vector. + If you do not provide a direction, then the +Z axis (0, 0, 1) will be assumed to be forwards. + \return A direction vector calculated by rotating the forwards direction by the 3 Euler angles + (in degrees) represented by this vector. */ + vector3d rotationToDirection(const vector3d & forwards = vector3d(0, 0, 1)) const + { + const f64 cr = cos( core::DEGTORAD64 * X ); + const f64 sr = sin( core::DEGTORAD64 * X ); + const f64 cp = cos( core::DEGTORAD64 * Y ); + const f64 sp = sin( core::DEGTORAD64 * Y ); + const f64 cy = cos( core::DEGTORAD64 * Z ); + const f64 sy = sin( core::DEGTORAD64 * Z ); + + const f64 srsp = sr*sp; + const f64 crsp = cr*sp; + + const f64 pseudoMatrix[] = { + ( cp*cy ), ( cp*sy ), ( -sp ), + ( srsp*cy-cr*sy ), ( srsp*sy+cr*cy ), ( sr*cp ), + ( crsp*cy+sr*sy ), ( crsp*sy-sr*cy ), ( cr*cp )}; + + return vector3d( + (T)(forwards.X * pseudoMatrix[0] + + forwards.Y * pseudoMatrix[3] + + forwards.Z * pseudoMatrix[6]), + (T)(forwards.X * pseudoMatrix[1] + + forwards.Y * pseudoMatrix[4] + + forwards.Z * pseudoMatrix[7]), + (T)(forwards.X * pseudoMatrix[2] + + forwards.Y * pseudoMatrix[5] + + forwards.Z * pseudoMatrix[8])); + } + + //! Fills an array of 4 values with the vector data (usually floats). + /** Useful for setting in shader constants for example. The fourth value + will always be 0. */ + void getAs4Values(T* array) const + { + array[0] = X; + array[1] = Y; + array[2] = Z; + array[3] = 0; + } + + //! Fills an array of 3 values with the vector data (usually floats). + /** Useful for setting in shader constants for example.*/ + void getAs3Values(T* array) const + { + array[0] = X; + array[1] = Y; + array[2] = Z; + } + + + //! X coordinate of the vector + T X; + + //! Y coordinate of the vector + T Y; + + //! Z coordinate of the vector + T Z; + }; + + //! partial specialization for integer vectors + // Implementor note: inline keyword needed due to template specialization for s32. Otherwise put specialization into a .cpp + template <> + inline vector3d vector3d::operator /(s32 val) const {return core::vector3d(X/val,Y/val,Z/val);} + template <> + inline vector3d& vector3d::operator /=(s32 val) {X/=val;Y/=val;Z/=val; return *this;} + + template <> + inline vector3d vector3d::getSphericalCoordinateAngles() const + { + vector3d angle; + const f64 length = X*X + Y*Y + Z*Z; + + if (length) + { + if (X!=0) + { + angle.Y = round32((f32)(atan2((f64)Z,(f64)X) * RADTODEG64)); + } + else if (Z<0) + angle.Y=180; + + angle.X = round32((f32)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64)); + } + return angle; + } + + //! Typedef for a f32 3d vector. + typedef vector3d vector3df; + + //! Typedef for an integer 3d vector. + typedef vector3d vector3di; + + //! Function multiplying a scalar and a vector component-wise. + template + vector3d operator*(const S scalar, const vector3d& vector) { return vector*scalar; } + +} // end namespace core +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/lib/Win64-visualStudio/readme.txt b/src/others/irrlicht-1.8.1/lib/Win64-visualStudio/readme.txt new file mode 100644 index 0000000..7260e14 --- /dev/null +++ b/src/others/irrlicht-1.8.1/lib/Win64-visualStudio/readme.txt @@ -0,0 +1,11 @@ +We don't provide a procompiled dll for Win64. + +Visual Studio Express does not come with a 64-bit compiler by default. +You'll have to download the Windows Platform SDK- + +http://msdn.microsoft.com/en-us/windows/bb980924.aspx + +When installing the platform SDK, make sure you install the x64 and +IA64 compilers from Developer Tools -> Visual C++ Compilers. +If you're using VC Express you will only be able to compile from the +command line. \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/media/001shot.jpg b/src/others/irrlicht-1.8.1/media/001shot.jpg new file mode 100644 index 0000000..b7438d6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/001shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/002shot.jpg b/src/others/irrlicht-1.8.1/media/002shot.jpg new file mode 100644 index 0000000..a8659aa Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/002shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/003shot.jpg b/src/others/irrlicht-1.8.1/media/003shot.jpg new file mode 100644 index 0000000..c4865f1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/003shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/004shot.jpg b/src/others/irrlicht-1.8.1/media/004shot.jpg new file mode 100644 index 0000000..20091c2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/004shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/005shot.jpg b/src/others/irrlicht-1.8.1/media/005shot.jpg new file mode 100644 index 0000000..9d1c975 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/005shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/006shot.jpg b/src/others/irrlicht-1.8.1/media/006shot.jpg new file mode 100644 index 0000000..8044e07 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/006shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/007shot.jpg b/src/others/irrlicht-1.8.1/media/007shot.jpg new file mode 100644 index 0000000..24ce868 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/007shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/008shot.jpg b/src/others/irrlicht-1.8.1/media/008shot.jpg new file mode 100644 index 0000000..529174b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/008shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/009shot.jpg b/src/others/irrlicht-1.8.1/media/009shot.jpg new file mode 100644 index 0000000..9bfa195 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/009shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/010shot.jpg b/src/others/irrlicht-1.8.1/media/010shot.jpg new file mode 100644 index 0000000..0e798d3 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/010shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/011shot.jpg b/src/others/irrlicht-1.8.1/media/011shot.jpg new file mode 100644 index 0000000..840a599 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/011shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/012shot.jpg b/src/others/irrlicht-1.8.1/media/012shot.jpg new file mode 100644 index 0000000..aefd261 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/012shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/013shot.jpg b/src/others/irrlicht-1.8.1/media/013shot.jpg new file mode 100644 index 0000000..4964019 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/013shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/014shot.jpg b/src/others/irrlicht-1.8.1/media/014shot.jpg new file mode 100644 index 0000000..af6b7c6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/014shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/015shot.jpg b/src/others/irrlicht-1.8.1/media/015shot.jpg new file mode 100644 index 0000000..9de0f8b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/015shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/016shot.jpg b/src/others/irrlicht-1.8.1/media/016shot.jpg new file mode 100644 index 0000000..58f450f Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/016shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/017shot.jpg b/src/others/irrlicht-1.8.1/media/017shot.jpg new file mode 100644 index 0000000..0ff80d2 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/017shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/018shot.jpg b/src/others/irrlicht-1.8.1/media/018shot.jpg new file mode 100644 index 0000000..0cba94c Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/018shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/019shot.jpg b/src/others/irrlicht-1.8.1/media/019shot.jpg new file mode 100644 index 0000000..8faa915 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/019shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/020shot.jpg b/src/others/irrlicht-1.8.1/media/020shot.jpg new file mode 100644 index 0000000..da5d98b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/020shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/021shot.jpg b/src/others/irrlicht-1.8.1/media/021shot.jpg new file mode 100644 index 0000000..48b28d7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/021shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/022shot.jpg b/src/others/irrlicht-1.8.1/media/022shot.jpg new file mode 100644 index 0000000..c282197 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/022shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/023shot.jpg b/src/others/irrlicht-1.8.1/media/023shot.jpg new file mode 100644 index 0000000..2be47ce Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/023shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/024shot.jpg b/src/others/irrlicht-1.8.1/media/024shot.jpg new file mode 100644 index 0000000..9cfc0d1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/024shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/025shot.jpg b/src/others/irrlicht-1.8.1/media/025shot.jpg new file mode 100644 index 0000000..91c8116 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/025shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/026shot.jpg b/src/others/irrlicht-1.8.1/media/026shot.jpg new file mode 100644 index 0000000..b2acfcf Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/026shot.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/2ddemo.png b/src/others/irrlicht-1.8.1/media/2ddemo.png new file mode 100644 index 0000000..5084114 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/2ddemo.png differ diff --git a/src/others/irrlicht-1.8.1/media/Faerie5.BMP b/src/others/irrlicht-1.8.1/media/Faerie5.BMP new file mode 100644 index 0000000..2a85c5a Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/Faerie5.BMP differ diff --git a/src/others/irrlicht-1.8.1/media/IrrlichtTheme.ogg b/src/others/irrlicht-1.8.1/media/IrrlichtTheme.ogg new file mode 100644 index 0000000..27d028f Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/IrrlichtTheme.ogg differ diff --git a/src/others/irrlicht-1.8.1/media/Particle.tga b/src/others/irrlicht-1.8.1/media/Particle.tga new file mode 100644 index 0000000..aec0607 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/Particle.tga differ diff --git a/src/others/irrlicht-1.8.1/media/axe.jpg b/src/others/irrlicht-1.8.1/media/axe.jpg new file mode 100644 index 0000000..2222cc9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/axe.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/ball.wav b/src/others/irrlicht-1.8.1/media/ball.wav new file mode 100644 index 0000000..24094ee Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/ball.wav differ diff --git a/src/others/irrlicht-1.8.1/media/bigfont.png b/src/others/irrlicht-1.8.1/media/bigfont.png new file mode 100644 index 0000000..ca8d948 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/bigfont.png differ diff --git a/src/others/irrlicht-1.8.1/media/burninglogo.png b/src/others/irrlicht-1.8.1/media/burninglogo.png new file mode 100644 index 0000000..19cf8b3 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/burninglogo.png differ diff --git a/src/others/irrlicht-1.8.1/media/config.xml b/src/others/irrlicht-1.8.1/media/config.xml new file mode 100644 index 0000000..d8ff5e0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/config.xml @@ -0,0 +1,29 @@ + + + + +Welcome to the Mesh Viewer of the "Irrlicht Engine"!. +This program is able to load and display all 3D geometry and models the Irrlicht Engine can. +Controls: Left mouse to rotate, right mouse to move, both buttons to zoom. Escape to Stop FPS Camera + +Supported formats are: +- Irrlicht scene and mesh formats (.irr, .irrmesh, .xml) +- 3D Studio (.3ds) +- Blitz3D (.b3d) +- COLLADA 1.2/1.3 (.dae, .xml) +- Cartography shop 4 (.csm) +- DirectX (.x) +- DeleD (.dmf) +- Maya (.obj) +- Milkshape (.ms3d) +- My3D (.my3D) +- OCT (.oct) +- Ogre3d (.mesh) +- Pulsar LMTools (.lmts) +- Quake 3 levels (.bsp) +- Quake 2 models (.md2) +- Stanford Triangle (.ply) +- Stereolithography format (.stl) + + + diff --git a/src/others/irrlicht-1.8.1/media/d3d8.psh b/src/others/irrlicht-1.8.1/media/d3d8.psh new file mode 100644 index 0000000..d38a3d6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/d3d8.psh @@ -0,0 +1,10 @@ +; part of the Irrlicht Engine Shader example. +; This simple Direct3D9 pixel shader will be loaded by the engine. +; Please note that these example shaders don't do anything really useful. +; They only demonstrate that shaders can be used in Irrlicht. + +ps.1.1 + +tex t0 ; sample color map +mul_x2 t0, t0, v0 ; mulitply with color +add r0, t0, t0 ; make it brighter and store result diff --git a/src/others/irrlicht-1.8.1/media/d3d8.vsh b/src/others/irrlicht-1.8.1/media/d3d8.vsh new file mode 100644 index 0000000..e0c24f7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/d3d8.vsh @@ -0,0 +1,37 @@ +; part of the Irrlicht Engine Shader example. +; This Direct3D9 vertex shader will be loaded by the engine. +; Please note that these example shaders don't do anything really useful. +; They only demonstrate that shaders can be used in Irrlicht. + +vs.1.1 + +; transpose and transform position to clip space +mul r0, v0.x, c4 +mad r0, v0.y, c5, r0 +mad r0, v0.z, c6, r0 +add oPos, c7, r0 + +; transform normal +dp3 r1.x, v1, c0 +dp3 r1.y, v1, c1 +dp3 r1.z, v1, c2 + +; renormalize normal +dp3 r1.w, r1, r1 +rsq r1.w, r1.w +mul r1, r1, r1.w + +; calculate light vector +m4x4 r6, v0, c10 ; vertex into world position +add r2, c8, -r6 ; vtxpos - lightpos + +; normalize light vector +dp3 r2.w, r2, r2 +rsq r2.w, r2.w +mul r2, r2, r2.w + +; calculate light color +dp3 r3, r1, r2 ; dp3 with negative light vector +lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y +mul oD0, r5.y, c9 ; ouput diffuse color +mov oT0, v3 ; store texture coordinates diff --git a/src/others/irrlicht-1.8.1/media/d3d9.hlsl b/src/others/irrlicht-1.8.1/media/d3d9.hlsl new file mode 100644 index 0000000..e3f3e42 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/d3d9.hlsl @@ -0,0 +1,84 @@ +// part of the Irrlicht Engine Shader example. +// These simple Direct3D9 pixel and vertex shaders will be loaded by the shaders +// example. Please note that these example shaders don't do anything really useful. +// They only demonstrate that shaders can be used in Irrlicht. + +//----------------------------------------------------------------------------- +// Global variables +//----------------------------------------------------------------------------- +float4x4 mWorldViewProj; // World * View * Projection transformation +float4x4 mInvWorld; // Inverted world matrix +float4x4 mTransWorld; // Transposed world matrix +float3 mLightPos; // Light position +float4 mLightColor; // Light color + + +// Vertex shader output structure +struct VS_OUTPUT +{ + float4 Position : POSITION; // vertex position + float4 Diffuse : COLOR0; // vertex diffuse color + float2 TexCoord : TEXCOORD0; // tex coords +}; + + +VS_OUTPUT vertexMain(in float4 vPosition : POSITION, + in float3 vNormal : NORMAL, + float2 texCoord : TEXCOORD0 ) +{ + VS_OUTPUT Output; + + // transform position to clip space + Output.Position = mul(vPosition, mWorldViewProj); + + // transform normal + float3 normal = mul(float4(vNormal,0.0), mInvWorld); + + // renormalize normal + normal = normalize(normal); + + // position in world coodinates + float3 worldpos = mul(mTransWorld, vPosition); + + // calculate light vector, vtxpos - lightpos + float3 lightVector = worldpos - mLightPos; + + // normalize light vector + lightVector = normalize(lightVector); + + // calculate light color + float3 tmp = dot(-lightVector, normal); + tmp = lit(tmp.x, tmp.y, 1.0); + + tmp = mLightColor * tmp.y; + Output.Diffuse = float4(tmp.x, tmp.y, tmp.z, 0); + Output.TexCoord = texCoord; + + return Output; +} + + +// Pixel shader output structure +struct PS_OUTPUT +{ + float4 RGBColor : COLOR0; // Pixel color +}; + + +sampler2D myTexture; + +PS_OUTPUT pixelMain(float2 TexCoord : TEXCOORD0, + float4 Position : POSITION, + float4 Diffuse : COLOR0 ) +{ + PS_OUTPUT Output; + + float4 col = tex2D( myTexture, TexCoord ); // sample color map + + // multiply with diffuse and do other senseless operations + Output.RGBColor = Diffuse * col; + Output.RGBColor *= 4.0; + + return Output; +} + diff --git a/src/others/irrlicht-1.8.1/media/d3d9.psh b/src/others/irrlicht-1.8.1/media/d3d9.psh new file mode 100644 index 0000000..8286eb8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/d3d9.psh @@ -0,0 +1,11 @@ +; part of the Irrlicht Engine Shader example. +; This simple Direct3D9 pixel shader will be loaded by the engine. +; Please note that these example shaders don't do anything really useful. +; They only demonstrate that shaders can be used in Irrlicht. + +ps.1.1 + +tex t0 ; sample color map +add r0, v0, v0 ; mulitply with color +mul t0, t0, r0 ; mulitply with color +add r0, t0, t0 ; make it brighter and store result diff --git a/src/others/irrlicht-1.8.1/media/d3d9.vsh b/src/others/irrlicht-1.8.1/media/d3d9.vsh new file mode 100644 index 0000000..0d1dfe9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/d3d9.vsh @@ -0,0 +1,42 @@ +; part of the Irrlicht Engine Shader example. +; This Direct3D9 vertex shader will be loaded by the engine. +; Please note that these example shaders don't do anything really useful. +; They only demonstrate that shaders can be used in Irrlicht. + +vs.1.1 + +dcl_position v0; ; declare position +dcl_normal v1; ; declare normal +dcl_color v2; ; declare color +dcl_texcoord0 v3; ; declare texture coordinate + +; transpose and transform position to clip space +mul r0, v0.x, c4 +mad r0, v0.y, c5, r0 +mad r0, v0.z, c6, r0 +add oPos, c7, r0 + +; transform normal +dp3 r1.x, v1, c0 +dp3 r1.y, v1, c1 +dp3 r1.z, v1, c2 + +; renormalize normal +dp3 r1.w, r1, r1 +rsq r1.w, r1.w +mul r1, r1, r1.w + +; calculate light vector +m4x4 r6, v0, c10 ; vertex into world position +add r2, c8, -r6 ; vtxpos - lightpos + +; normalize light vector +dp3 r2.w, r2, r2 +rsq r2.w, r2.w +mul r2, r2, r2.w + +; calculate light color +dp3 r3, r1, r2 ; dp3 with negative light vector +lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y +mul oD0, r5.y, c9 ; ouput diffuse color +mov oT0, v3 ; store texture coordinates \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/media/demoback.jpg b/src/others/irrlicht-1.8.1/media/demoback.jpg new file mode 100644 index 0000000..dec609c Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/demoback.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/detailmap3.jpg b/src/others/irrlicht-1.8.1/media/detailmap3.jpg new file mode 100644 index 0000000..acf5f41 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/detailmap3.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/directxlogo.png b/src/others/irrlicht-1.8.1/media/directxlogo.png new file mode 100644 index 0000000..db5eff7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/directxlogo.png differ diff --git a/src/others/irrlicht-1.8.1/media/dotnetback.jpg b/src/others/irrlicht-1.8.1/media/dotnetback.jpg new file mode 100644 index 0000000..9ac13cf Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/dotnetback.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/dwarf-Read-Me.txt b/src/others/irrlicht-1.8.1/media/dwarf-Read-Me.txt new file mode 100644 index 0000000..ad15837 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/dwarf-Read-Me.txt @@ -0,0 +1,51 @@ +Dwarf lowpoly model Pack +Copyright 2004, Psionic Design +e-mail: psionic@blueyonder.co.uk + + + +INSTALLATION INSTRUCTIONS: + +To install, simply unzip to your hard drive with the "Use Folder Names" option turned on. And that's it you're ready to go! + + + +USAGE INFORMATION: + +Each zip contains the models, textures and animation info for that particular format! + +Please Read the "animationinfo.txt" file included in each zip for the exact frames of animation to use + +Credits to me "Psionic" are really appreciated but are not essential ;-) + +Any questions, screenshots of him in use etc drop by my site or email me at:- + +website: http://www.psionic3d.co.uk +email: psionic@blueyonder.co.uk + + + + +WHAT'S INCLUDED IN THE ZIP: + +ReadMe.txt - This file +b3d.zip - Blitz 3D Format models and textures +ms3d.zip - Milkshape 3D Format models and textures +x.zip - DarkBasic Direct X 8 Format models and textures + + + +RESTRICTIONS: + +This model pack is available for use in freeware, shareware, commercial games/software with the following restrictions:- + +**You may not sell/re-sell this model pack or claim it as your own. +***You may not redistribute this pack in some other model pack through a website or on a compilation CD of any kind, without my written consent. + + +Psi +http://www.psionic3d.co.uk + + + + diff --git a/src/others/irrlicht-1.8.1/media/dwarf.jpg b/src/others/irrlicht-1.8.1/media/dwarf.jpg new file mode 100644 index 0000000..430d83e Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/dwarf.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/dwarf.x b/src/others/irrlicht-1.8.1/media/dwarf.x new file mode 100644 index 0000000..c10769b --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/dwarf.x @@ -0,0 +1,18468 @@ +xof 0303txt 0032 + +// DirectX - from MilkShape3D + +template XSkinMeshHeader +{ + <3CF169CE-FF7C-44AB-93C0-F78F62D172E2> + WORD nMaxSkinWeightsPerVertex; + WORD nMaxSkinWeightsPerFace; + WORD nBones; +} + +template VertexDuplicationIndices +{ + + DWORD nIndices; + DWORD nOriginalVertices; + array DWORD indices[nIndices]; +} + +template SkinWeights +{ + <6F0D123B-BAD2-4167-A0D0-80224F25FABB> + CSTRING transformNodeName; + DWORD nWeights; + array DWORD vertexIndices[nWeights]; + array FLOAT weights[nWeights]; + Matrix4x4 matrixOffset; +} + +Frame base +{ + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.011608,-0.015192,0.000000,1.000000;; + } + + Frame middle + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.173034,30.221760,0.000000,1.000000;; + } + + Frame lhip + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -5.191007,-3.469861,0.000000,1.000000;; + } + + Frame lknee + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -1.903369,-8.817497,0.000000,1.000000;; + } + + Frame lankle + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -1.557302,-12.873290,3.507543,1.000000;; + } + + Frame ltoe + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.083542,-2.837912,-5.268192,1.000000;; + } + } + } + } + } + + Frame rhip + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 5.883141,-2.951185,0.000000,1.000000;; + } + + Frame rknee + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 1.557302,-9.681957,0.000000,1.000000;; + } + + Frame rankle + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 1.038201,-13.046183,3.507543,1.000000;; + } + + Frame rtoe + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.161076,-2.268395,-5.055357,1.000000;; + } + } + } + } + } + + Frame spine2 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.008257,4.071795,0.000000,1.000000;; + } + + Frame Joint75 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.007980,5.843795,0.000000,1.000000;; + } + + Frame Joint76 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.033215,5.642583,0.000000,1.000000;; + } + + Frame spine1 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.057544,3.129822,0.000000,1.000000;; + } + + Frame head + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.000000,4.183402,0.000000,1.000000;; + } + + Frame Joint36 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 2.351048,-2.969238,-5.128667,1.000000;; + } + + Frame Joint39 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 2.521163,-4.102684,-2.779583,1.000000;; + } + + Frame Joint40 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 1.543145,-3.721243,-0.884647,1.000000;; + } + + Frame Joint41 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.857303,-3.157324,-0.940437,1.000000;; + } + } + } + } + } + + Frame Joint37 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -2.844125,-3.130046,-5.128667,1.000000;; + } + + Frame Joint38 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -2.314107,-4.198860,-2.779583,1.000000;; + } + + Frame Joint42 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -1.200224,-3.209697,-0.885387,1.000000;; + } + + Frame Joint43 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -1.285954,-3.696030,-0.939697,1.000000;; + } + } + } + } + } + + Frame top + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.311274,14.438549,-1.107615,1.000000;; + } + } + } + + Frame pad2 + { + FrameTransformMatrix + { + 0.986286,0.165048,0.000000,0.000000, + -0.159424,0.952679,0.258819,0.000000, + 0.042717,-0.255270,0.965926,0.000000, + -6.280235,3.399014,0.000000,1.000000;; + } + } + + Frame pad1 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 5.233529,3.529747,0.000000,1.000000;; + } + } + + Frame lsholda + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -10.711074,-1.732187,3.529744,1.000000;; + } + + Frame lelbo + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -6.541911,-5.098517,0.705949,1.000000;; + } + + Frame lwrist + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -7.850295,-6.405833,0.000000,1.000000;; + } + + Frame Joint17 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -3.663469,-3.660475,0.000000,1.000000;; + } + + Frame Joint18 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -1.046706,-2.091701,0.000000,1.000000;; + } + + Frame Joint19 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.130838,-3.137549,0.000000,1.000000;; + } + } + } + } + + Frame Joint20 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.261676,-4.314132,-3.481931,1.000000;; + } + + Frame Joint21 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -1.046704,-2.483894,0.000000,1.000000;; + } + } + } + } + } + } + + Frame rsholda + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 9.986465,-1.438042,3.529744,1.000000;; + } + + Frame relbo + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 6.803588,-5.359982,0.705949,1.000000;; + } + + Frame rwrist + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 8.373647,-6.798027,0.000000,1.000000;; + } + + Frame Joint25 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 3.663469,-3.137551,0.000000,1.000000;; + } + + Frame Joint26 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 1.046706,-2.353162,0.000000,1.000000;; + } + + Frame Joint27 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.261676,-2.876088,0.000000,1.000000;; + } + } + } + } + + Frame Joint28 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.785030,-4.183402,-2.034320,1.000000;; + } + + Frame Joint29 + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.261676,-2.483894,0.000000,1.000000;; + } + } + } + + Frame weapon + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 1.700897,-4.837056,0.000000,1.000000;; + } + + Frame end + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.179647,0.498486,-36.421711,1.000000;; + } + + Frame hit + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 9.751877,-17.324219,-0.896412,1.000000;; + } + } + } + } + } + } + } + } + } + } + } + } + + Frame Body + { + FrameTransformMatrix + { + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 0.000000,0.000000,0.000000,1.000000;; + } + + Mesh test2Mesh + { + 1479; + 9.163393;52.592094;5.311051;, + 9.238389;48.717903;7.829298;, + 4.414237;48.688927;8.841169;, + 3.635573;52.340664;5.854128;, + 9.163393;53.140781;0.434684;, + 4.689968;52.717564;0.392938;, + 9.088393;49.163322;-4.030602;, + 4.688091;48.439060;-3.863904;, + 9.163393;53.331882;5.609362;, + 9.238389;49.283154;8.325875;, + 11.722147;50.016842;7.103333;, + 14.414900;52.402100;5.129919;, + 9.163393;53.906952;0.104077;, + 14.609170;52.948395;0.154898;, + 9.088393;49.657726;-4.596818;, + 12.538961;51.131771;-3.441837;, + 11.743780;49.455685;6.606065;, + 3.657926;53.078899;6.152925;, + 4.392604;49.250080;9.338439;, + 14.392547;51.663868;4.831122;, + 4.714078;53.482971;0.062556;, + 14.585064;52.182983;0.485280;, + 4.665834;48.929771;-4.430783;, + 12.561217;50.641060;-2.874957;, + -3.841073;48.688927;8.841169;, + -8.665230;48.717903;7.829298;, + -8.590232;52.592094;5.311051;, + -3.062412;52.340664;5.854128;, + -8.590232;53.140781;0.434684;, + -4.116807;52.717564;0.392938;, + -8.515234;49.163322;-4.030602;, + -4.114926;48.439060;-3.863904;, + -11.148983;50.016842;7.103333;, + -8.665230;49.283154;8.325875;, + -8.590232;53.331882;5.609362;, + -13.841740;52.402100;5.129919;, + -8.590232;53.906952;0.104077;, + -14.036011;52.948395;0.154898;, + -8.515234;49.657726;-4.596818;, + -11.965799;51.131771;-3.441837;, + -11.170617;49.455685;6.606065;, + -3.084766;53.078899;6.152925;, + -3.819439;49.250080;9.338439;, + -13.819386;51.663868;4.831122;, + -4.140916;53.482971;0.062556;, + -14.011902;52.182983;0.485280;, + -4.092670;48.929771;-4.430783;, + -11.988054;50.641060;-2.874957;, + 4.242009;58.884743;2.570855;, + 1.719232;58.884743;4.326951;, + 1.719237;56.180134;3.868141;, + 4.136295;56.180134;2.112046;, + 4.610723;58.899246;1.076627;, + 4.437895;58.255383;1.427657;, + 5.073560;57.831852;-0.831290;, + 5.188532;58.921978;-0.146142;, + 2.365810;57.220150;-5.311353;, + 2.389302;57.854408;-5.411583;, + 3.446397;57.361095;-4.919837;, + 1.418339;57.462894;-5.428807;, + 1.960295;58.125488;-6.407607;, + 3.297620;58.189804;-5.624568;, + 0.916452;57.514851;-5.702876;, + 0.196953;57.775261;-6.329302;, + 0.196953;58.155617;-6.759973;, + 0.564816;57.560535;-6.329302;, + 0.196953;56.507580;-7.229795;, + 0.708737;56.429287;-6.994888;, + 4.421278;57.862228;-4.019349;, + 1.112585;56.335316;-6.608064;, + 0.196953;55.849838;-7.151498;, + 0.582964;55.818516;-6.994890;, + 0.896177;55.674747;-6.525379;, + 1.417937;56.238544;-6.527757;, + 1.563801;56.421631;-5.875276;, + 1.501053;55.516430;-5.925784;, + 1.252991;55.717010;-6.405910;, + 1.410475;56.510334;-5.864188;, + 3.431264;58.838142;-5.428817;, + 4.623211;58.867786;-3.862747;, + 1.890343;58.877293;-6.329304;, + 0.196953;58.892124;-6.759975;, + 0.196953;55.386570;-6.432980;, + 1.338982;55.451138;-5.933945;, + 0.777895;55.360485;-5.945277;, + 1.571026;56.366024;-5.339862;, + 1.571026;55.436707;-5.446356;, + 1.861757;55.585438;-5.471374;, + 1.884718;56.220394;-5.389740;, + 2.329635;56.396385;-5.213789;, + 2.469955;55.050526;-5.128000;, + 3.372011;56.456528;-4.812878;, + 3.374272;54.561684;-4.943109;, + 4.306293;56.502014;-3.484852;, + 3.994818;55.254379;-3.108994;, + 4.901477;58.929310;-2.285047;, + 4.795761;57.729420;-2.282111;, + 4.617773;56.512859;-2.432453;, + 1.247561;54.160404;-6.036166;, + 1.628837;53.851963;-5.425615;, + 1.488684;53.503712;-5.567427;, + 1.076976;53.568111;-6.080726;, + 0.196953;54.323627;-6.546213;, + 0.196953;53.731537;-6.538884;, + 0.196953;55.284870;-6.817455;, + 0.951778;55.293880;-6.407505;, + 1.324306;54.522755;-6.402828;, + 0.196953;54.639961;-6.854869;, + 1.651121;55.311077;-5.924803;, + 1.872430;54.120838;-6.092515;, + 2.486549;54.906082;-5.613785;, + 1.896263;53.393780;-5.016593;, + 3.004211;54.377865;-5.643836;, + 2.416372;53.485512;-6.018716;, + 4.294228;53.059486;-5.110569;, + 4.603637;53.194355;-4.556661;, + 3.353439;52.269436;-6.323624;, + 3.164008;52.026455;-5.518155;, + 2.831037;52.120289;-6.667702;, + 1.427815;53.126896;-6.581466;, + 0.196953;53.319347;-7.071489;, + 4.258074;51.279964;-6.929201;, + 0.196953;51.218552;-7.671501;, + 1.286211;51.037498;-7.819720;, + 0.196953;48.516830;-4.831125;, + 0.906312;47.223148;-6.323102;, + 2.390713;50.135826;-8.501509;, + 5.147715;49.761192;-2.113228;, + 5.483280;49.024506;-7.912204;, + 3.519759;47.640644;-8.922348;, + 2.230943;45.983410;-6.837262;, + 5.862195;46.566502;-7.827096;, + 6.063165;47.270485;-4.336467;, + 5.817128;46.143192;-6.768289;, + 4.771815;46.200104;-8.748175;, + 4.112585;45.550518;-7.827313;, + 5.082815;53.401516;-0.452015;, + 5.082815;55.802074;-0.757885;, + 6.278196;45.850166;-8.067322;, + 6.233131;45.426857;-7.008514;, + 5.187818;45.483761;-8.988400;, + 4.528587;44.834175;-8.067539;, + 7.751843;45.219013;-8.465691;, + 7.664405;44.397705;-6.411367;, + 5.636263;44.508118;-10.252790;, + 4.357210;43.247772;-8.466115;, + 7.991459;42.205650;-8.873802;, + 7.938428;41.592506;-7.636380;, + 6.708311;41.659477;-9.966291;, + 5.932536;40.895046;-8.882633;, + 7.677983;38.542618;-9.851732;, + 0.196953;58.884743;4.326951;, + 0.196953;56.180134;3.868141;, + 4.401065;56.646732;1.280575;, + 4.430346;55.772125;0.639352;, + 0.196953;53.862251;5.027995;, + 2.420499;53.751408;4.068233;, + 4.104025;53.089230;2.761263;, + 4.926210;51.548302;1.105534;, + 0.196953;51.306179;5.766455;, + 2.537956;50.579800;4.794079;, + 4.280571;49.732357;3.256207;, + 5.337671;48.582260;0.821585;, + 5.337671;47.371635;-1.636148;, + 0.196953;59.059555;4.940836;, + 1.877897;59.059555;4.940958;, + 5.022821;59.059555;2.991112;, + 5.431325;59.075630;1.332422;, + 6.073157;59.100891;-0.026047;, + 5.753413;59.109047;-2.406004;, + 5.444712;59.040668;-4.160086;, + 4.124426;59.007809;-5.896048;, + 2.070525;59.051250;-6.894945;, + 0.196953;59.067738;-7.373756;, + 0.196953;60.034519;4.932486;, + 1.875382;60.034519;4.933323;, + 5.012119;60.034527;2.990359;, + 5.413950;60.050449;1.339854;, + 6.055133;60.075699;-0.018468;, + 5.730547;60.083881;-2.419671;, + 5.424481;60.015327;-4.181113;, + 4.127413;59.982983;-5.894018;, + 2.082769;60.026131;-6.883855;, + 0.196953;60.042675;-7.364650;, + 0.196953;61.891335;4.474140;, + 2.119642;61.891335;4.476328;, + 4.312335;61.891335;2.701971;, + 4.631948;61.891903;1.199314;, + 5.159706;61.892818;-0.050380;, + 4.883253;61.893120;-2.302159;, + 4.635466;61.890621;-3.937706;, + 3.606839;61.889484;-5.468257;, + 2.316901;61.891026;-6.361181;, + 0.196953;61.891628;-6.807594;, + 0.196953;63.485386;2.934556;, + 1.273063;63.485386;2.936174;, + 2.932324;63.485386;1.646364;, + 3.173945;63.485817;0.554150;, + 3.573367;63.486504;-0.354457;, + 3.363917;63.486732;-1.992494;, + 3.176482;63.484837;-3.181942;, + 2.398919;63.483986;-4.293848;, + 1.422985;63.485149;-4.942707;, + 0.196953;63.485607;-5.267362;, + 0.196953;64.502686;-1.390165;, + -1.325331;58.884743;4.326951;, + -3.848105;58.884743;2.570855;, + -3.742393;56.180134;2.112046;, + -1.325334;56.180134;3.868141;, + -4.043993;58.255383;1.427657;, + -4.216822;58.899246;1.076627;, + -4.794626;58.921978;-0.146142;, + -4.679657;57.831852;-0.831290;, + -3.052497;57.361095;-4.919837;, + -1.995399;57.854408;-5.411583;, + -1.971910;57.220150;-5.311353;, + -1.024434;57.462894;-5.428807;, + -2.903716;58.189804;-5.624568;, + -1.566390;58.125488;-6.407607;, + -0.522547;57.514851;-5.702876;, + -0.170911;57.560535;-6.329302;, + -0.314837;56.429287;-6.994888;, + -4.027374;57.862228;-4.019349;, + -0.718680;56.335316;-6.608064;, + -0.189061;55.818516;-6.994890;, + -0.502274;55.674747;-6.525379;, + -1.169898;56.421631;-5.875276;, + -1.024032;56.238544;-6.527757;, + -0.859088;55.717010;-6.405910;, + -1.107148;55.516430;-5.925784;, + -1.016574;56.510334;-5.864188;, + -4.229308;58.867786;-3.862747;, + -3.037360;58.838142;-5.428817;, + -1.496442;58.877293;-6.329304;, + -0.383995;55.360485;-5.945277;, + -0.945081;55.451138;-5.933945;, + -1.177125;55.436707;-5.446356;, + -1.177123;56.366024;-5.339862;, + -1.490817;56.220394;-5.389740;, + -1.467852;55.585438;-5.471374;, + -1.935732;56.396385;-5.213789;, + -2.076050;55.050526;-5.128000;, + -2.978111;56.456528;-4.812878;, + -2.980371;54.561684;-4.943109;, + -3.912392;56.502014;-3.484852;, + -3.600917;55.254379;-3.108994;, + -4.507572;58.929310;-2.285047;, + -4.401859;57.729420;-2.282111;, + -4.223874;56.512859;-2.432453;, + -1.234934;53.851963;-5.425615;, + -0.853661;54.160404;-6.036166;, + -0.683076;53.568111;-6.080726;, + -1.094784;53.503712;-5.567427;, + -0.557873;55.293880;-6.407505;, + -0.930401;54.522755;-6.402828;, + -1.257221;55.311077;-5.924803;, + -1.478527;54.120838;-6.092515;, + -2.092644;54.906082;-5.613785;, + -1.502358;53.393780;-5.016593;, + -2.022469;53.485512;-6.018716;, + -2.610310;54.377865;-5.643836;, + -3.900326;53.059486;-5.110569;, + -4.209735;53.194355;-4.556661;, + -2.959539;52.269436;-6.323624;, + -2.770105;52.026455;-5.518155;, + -1.033910;53.126896;-6.581466;, + -2.437134;52.120289;-6.667702;, + -3.864171;51.279964;-6.929201;, + -0.892305;51.037498;-7.819720;, + -0.512412;47.223148;-6.323102;, + -1.996812;50.135826;-8.501509;, + -4.753813;49.761192;-2.113228;, + -5.089376;49.024506;-7.912204;, + -3.125859;47.640644;-8.922348;, + -1.837040;45.983410;-6.837262;, + -5.468292;46.566502;-7.827096;, + -5.423228;46.143192;-6.768289;, + -5.669262;47.270485;-4.336467;, + -4.377913;46.200104;-8.748175;, + -3.718686;45.550518;-7.827313;, + -4.688914;53.401516;-0.452015;, + -4.688914;55.802074;-0.757885;, + -5.884295;45.850166;-8.067322;, + -5.839230;45.426857;-7.008514;, + -4.793914;45.483761;-8.988400;, + -4.134687;44.834175;-8.067539;, + -7.357939;45.219013;-8.465691;, + -7.270504;44.397705;-6.411367;, + -5.242361;44.508118;-10.252790;, + -3.963310;43.247772;-8.466115;, + -7.597560;42.205650;-8.873802;, + -7.544526;41.592506;-7.636380;, + -6.314410;41.659477;-9.966291;, + -5.538635;40.895046;-8.882633;, + -7.284081;38.542618;-9.851732;, + -4.036447;55.772125;0.639352;, + -4.007164;56.646732;1.280575;, + -2.026598;53.751408;4.068233;, + -4.532308;51.548302;1.105534;, + -3.710120;53.089230;2.761263;, + -2.144051;50.579800;4.794079;, + -3.886670;49.732357;3.256207;, + -4.943766;48.582260;0.821585;, + -4.943766;47.371635;-1.636148;, + -1.483993;59.059555;4.940958;, + -4.628918;59.059555;2.991112;, + -5.037425;59.075630;1.332422;, + -5.679255;59.100891;-0.026047;, + -5.359512;59.109047;-2.406004;, + -5.050810;59.040668;-4.160086;, + -3.730523;59.007809;-5.896048;, + -1.676620;59.051250;-6.894945;, + -1.481479;60.034519;4.933323;, + -4.618215;60.034527;2.990359;, + -5.020047;60.050449;1.339854;, + -5.661230;60.075699;-0.018468;, + -5.336645;60.083881;-2.419671;, + -5.030577;60.015327;-4.181113;, + -3.733512;59.982983;-5.894018;, + -1.688867;60.026131;-6.883855;, + -1.725740;61.891335;4.476328;, + -3.918436;61.891335;2.701971;, + -4.238046;61.891903;1.199314;, + -4.765804;61.892818;-0.050380;, + -4.489351;61.893120;-2.302159;, + -4.241562;61.890621;-3.937706;, + -3.212934;61.889484;-5.468257;, + -1.923000;61.891026;-6.361181;, + -0.879161;63.485386;2.936174;, + -2.538420;63.485386;1.646364;, + -2.780046;63.485817;0.554150;, + -3.179467;63.486504;-0.354457;, + -2.970013;63.486732;-1.992494;, + -2.782579;63.484837;-3.181942;, + -2.005019;63.483986;-4.293848;, + -1.029080;63.485149;-4.942707;, + -0.192284;65.158386;-0.267689;, + -0.617771;65.158386;-1.004657;, + -0.014429;64.035477;-1.004657;, + 0.109390;64.035477;-0.790199;, + 0.234013;67.669022;-1.022976;, + 0.658695;65.158386;-0.267689;, + 0.357023;64.035477;-0.790199;, + 1.084181;65.158386;-1.004657;, + 0.480839;64.035477;-1.004657;, + 0.658695;65.158386;-1.741625;, + 0.357023;64.035477;-1.219115;, + -0.192284;65.158386;-1.741625;, + 0.109390;64.035477;-1.219115;, + 7.321572;63.560955;-0.055478;, + 7.050604;63.754948;-1.851895;, + 2.748468;63.025620;-1.582111;, + 2.822511;62.793049;0.228580;, + 7.863518;62.050617;0.503212;, + 2.702447;60.765869;0.971560;, + 8.134492;60.734272;-0.734516;, + 2.776194;59.416355;-0.247001;, + 7.863518;60.928257;-2.530933;, + 2.702447;59.647991;-2.050448;, + 7.321572;62.438591;-3.089625;, + 2.822511;61.670685;-2.805565;, + 9.181485;64.333855;-2.066042;, + 9.632345;64.462769;-1.100490;, + 10.534081;64.061180;-0.951941;, + 10.984941;63.530704;-1.768948;, + 10.534077;63.401791;-2.734500;, + 9.632351;63.803379;-2.883049;, + 10.870568;67.072159;-2.811351;, + 11.125603;67.210205;-2.340091;, + 11.635665;67.146370;-2.316478;, + 11.890695;66.944496;-2.764128;, + 11.635665;66.806458;-3.235387;, + 11.125603;66.870285;-3.259001;, + 10.770185;70.864441;-4.091156;, + -2.175307;63.025620;-1.582111;, + -6.477442;63.754936;-1.851895;, + -6.748413;63.560955;-0.055478;, + -2.249351;62.793049;0.228580;, + -7.290359;62.050617;0.503212;, + -2.129283;60.765858;0.971560;, + -7.561328;60.734272;-0.734516;, + -2.203030;59.416344;-0.247001;, + -7.290359;60.928257;-2.530933;, + -2.129283;59.647991;-2.050448;, + -6.748413;62.438591;-3.089625;, + -2.249351;61.670685;-2.805565;, + -8.608323;64.333855;-2.066042;, + -9.059186;64.462769;-1.100490;, + -9.960917;64.061180;-0.951941;, + -10.411779;63.530704;-1.768948;, + -9.960917;63.401791;-2.734500;, + -9.059186;63.803379;-2.883049;, + -10.297409;67.072159;-2.811351;, + -10.552441;67.210205;-2.340091;, + -11.062504;67.146370;-2.316479;, + -11.317535;66.944496;-2.764129;, + -11.062504;66.806458;-3.235389;, + -10.552441;66.870285;-3.259001;, + -10.197022;70.864441;-4.091156;, + 9.278677;42.422218;6.029630;, + 3.269274;42.720932;10.305261;, + 3.727235;37.106018;10.305261;, + 8.567321;37.947166;6.627038;, + 3.076538;53.204800;4.651457;, + 0.063876;53.173985;0.844661;, + 1.636344;53.091850;6.132280;, + 10.371579;42.720932;0.675551;, + 10.590998;38.832512;-0.519268;, + 4.213577;53.047283;0.988064;, + 8.567321;42.720932;-4.893595;, + 8.567321;40.015377;-5.275937;, + 3.118487;52.304691;-0.871308;, + 3.269272;42.644463;-8.265944;, + 3.269272;40.303337;-8.724752;, + 1.678248;51.885815;-2.496562;, + 0.063876;40.303337;-8.724752;, + 0.063876;42.644463;-8.265944;, + 8.092727;46.706837;7.085848;, + 4.030234;47.533649;9.387641;, + 7.498330;46.932663;-3.808702;, + 9.269650;46.553898;-0.745430;, + 2.860954;47.304241;-6.201300;, + 0.063876;47.304241;-6.201299;, + 6.308704;51.898582;5.810977;, + 2.260517;51.022770;7.858276;, + 6.308704;51.061012;-1.528991;, + 7.708933;51.749233;0.002558;, + 2.260515;49.875748;-3.830782;, + 0.063876;53.091850;6.132280;, + 0.063876;51.405113;7.858276;, + 0.063876;42.720932;10.305261;, + 0.063876;37.106018;10.305261;, + 0.063876;51.885815;-2.496561;, + 0.063876;47.533646;9.378681;, + 0.063876;49.952217;-4.021954;, + 9.563355;51.572124;5.130688;, + 10.424463;51.137897;0.771196;, + -3.599484;37.106018;10.305261;, + -3.141526;42.720932;10.305261;, + -9.150930;42.422218;6.029630;, + -8.439575;37.947166;6.627038;, + -1.508598;53.091850;6.132280;, + -2.948791;53.204800;4.651457;, + -10.243833;42.720932;0.675551;, + -10.463250;38.832512;-0.519268;, + -4.085828;53.047283;0.988064;, + -8.439575;42.720932;-4.893595;, + -8.439575;40.015377;-5.275937;, + -2.990738;52.304691;-0.871308;, + -3.141523;42.644463;-8.265944;, + -3.141523;40.303337;-8.724752;, + -1.550497;51.885815;-2.496562;, + -3.902486;47.533649;9.387641;, + -7.964980;46.706837;7.085848;, + -9.141901;46.553898;-0.745430;, + -7.370583;46.932663;-3.808702;, + -2.733205;47.304241;-6.201300;, + -2.132767;51.022770;7.858276;, + -6.180955;51.898582;5.810977;, + -7.581183;51.749233;0.002558;, + -6.180955;51.061012;-1.528991;, + -2.132767;49.875748;-3.830782;, + -9.435607;51.572124;5.130688;, + -10.296713;51.137897;0.771196;, + 26.442608;31.439417;2.804749;, + 27.750952;33.479103;1.464946;, + 28.644909;31.793991;1.543602;, + 27.650051;30.546118;1.966592;, + 27.962191;30.422531;4.730635;, + 25.291662;35.616783;6.993527;, + 23.804535;33.790108;6.865523;, + 28.113920;30.947910;7.563584;, + 29.418135;32.175655;7.563584;, + 26.276403;37.035873;5.267626;, + 29.144712;26.626286;4.498936;, + 30.605154;26.898275;4.811452;, + 30.184065;26.943773;6.619426;, + 29.278811;26.812195;6.619426;, + 23.970884;33.278522;4.380921;, + 26.921537;36.568802;3.461252;, + 25.464495;35.399422;1.973382;, + 29.121349;26.822264;2.423525;, + 29.903082;27.052881;2.157598;, + 23.995649;32.729515;1.987316;, + 25.637072;33.964241;0.536960;, + 25.396690;32.550930;-0.123384;, + 24.000338;31.858027;1.237716;, + 24.161800;33.391464;3.241510;, + 29.999184;32.499008;5.227734;, + 26.998781;32.694099;1.064689;, + 25.652718;30.935171;2.198134;, + 25.432625;28.413658;0.334064;, + 26.032991;29.244349;-0.349298;, + 26.852461;29.841438;0.779249;, + 26.386019;28.977617;1.267885;, + 26.512205;31.188791;1.184134;, + 25.206884;31.094601;-0.305392;, + 23.991529;30.626995;0.930952;, + 30.933636;29.712465;5.072928;, + 30.310335;29.777977;7.264207;, + 28.988699;28.980301;7.299366;, + 28.432882;29.246729;4.638216;, + 29.648125;29.915192;1.703345;, + 28.309542;29.520292;2.073250;, + 6.755167;0.046006;8.013719;, + 5.431096;0.088037;3.223917;, + 12.250779;0.088037;3.300384;, + 5.309235;0.894232;2.923214;, + 12.009439;0.731735;2.923214;, + 4.846424;0.413626;-6.580339;, + 7.194882;0.034675;-8.202744;, + 10.442262;0.175008;-8.276375;, + 5.897818;0.168155;0.023152;, + 11.833355;0.047754;-6.787080;, + 12.240962;0.175049;0.374328;, + 6.753324;1.573865;7.859301;, + 5.310324;1.516512;3.522007;, + 10.324868;0.327974;8.243123;, + 10.323023;1.855839;8.088705;, + 12.010524;1.354014;3.522007;, + 7.195130;0.874356;-8.201875;, + 10.442509;1.014684;-8.275504;, + 4.846746;1.253311;-6.580090;, + 11.833675;0.887438;-6.786831;, + 5.898684;1.007790;0.014234;, + 12.241827;1.014688;0.365411;, + 8.078106;3.698104;-7.581497;, + 11.428559;3.021991;-6.440265;, + 5.468536;3.167656;-5.998088;, + 5.238337;3.089141;-2.541014;, + 11.932255;2.791543;-3.152129;, + 8.602904;5.932668;-0.505548;, + 11.133778;5.817454;1.389889;, + 8.140334;4.399764;-4.469068;, + 8.224634;5.036399;-2.774021;, + 11.898876;5.830766;3.514578;, + 5.863575;5.809277;1.057280;, + 4.953313;5.817947;3.744911;, + 5.601276;5.822373;6.464175;, + 7.258355;5.792872;6.393783;, + 10.561975;5.836313;6.220846;, + 3.714457;19.327164;5.891222;, + 2.395580;19.017778;1.623937;, + 2.663392;17.355799;1.982380;, + 3.977465;17.241997;5.800620;, + 6.098813;19.432480;7.503632;, + 6.110166;17.147745;7.382187;, + 9.150031;20.134617;6.603466;, + 9.390180;17.139515;5.800619;, + 12.296237;20.290672;1.623937;, + 12.022444;17.723486;1.982380;, + 9.151049;19.982052;-2.746684;, + 9.045196;17.139517;-1.835862;, + 6.099829;19.279917;-4.705683;, + 6.618869;17.147745;-3.417428;, + 3.568517;19.174599;-2.746683;, + 3.743971;17.241997;-1.835860;, + 2.744522;21.981775;7.255371;, + 0.781750;21.713270;1.998527;, + 5.311180;23.393459;9.200554;, + 8.947892;24.840387;7.668663;, + 12.009036;25.446686;1.982380;, + 8.947892;24.362463;-3.649055;, + 5.311180;22.915539;-6.179790;, + 2.633436;21.656416;-3.632905;, + 1.563167;23.850784;8.223292;, + 0.063876;23.353767;1.793407;, + 9.435429;28.020374;7.743168;, + 8.477934;28.887068;-4.569030;, + 11.027375;30.391527;0.493318;, + 3.810796;27.047464;-6.897249;, + 0.063876;24.272585;-4.193496;, + 13.090539;50.522636;1.384549;, + 13.041045;50.467754;5.078930;, + 15.039926;48.268642;5.106739;, + 15.654872;48.436718;2.094133;, + 9.371727;37.438923;7.067486;, + 4.033619;36.444157;10.870089;, + 11.587032;38.454742;-0.613277;, + 9.381097;39.704651;-5.891787;, + 3.585032;40.004971;-9.656940;, + 0.063876;40.004971;-9.656940;, + 8.947521;33.780930;6.792171;, + 4.207292;33.892616;11.120209;, + 11.152753;32.194057;-0.597313;, + 9.604399;31.258600;-5.890305;, + 3.468354;30.257090;-9.461814;, + 0.063876;30.257090;-9.461814;, + 8.336151;33.208889;6.506425;, + 3.972105;33.252815;10.523578;, + 10.880808;31.578617;-0.480340;, + 8.391865;30.899374;-5.411129;, + 3.229546;29.783400;-8.733105;, + 0.063876;29.783400;-8.733105;, + 8.763739;31.230478;7.043343;, + 0.063876;25.862223;-6.032537;, + 0.063876;36.444157;10.870090;, + 0.063876;33.892616;11.120211;, + 0.063876;33.252815;10.523581;, + 0.063876;24.095449;8.763750;, + 0.063876;25.246412;10.275227;, + 0.063876;31.503160;10.970792;, + 4.717443;31.494150;10.284621;, + 0.063876;27.969845;11.631809;, + 5.059318;27.174917;10.768083;, + 3.292733;13.614117;8.688048;, + 2.012897;13.266646;2.479012;, + 7.391886;13.045812;9.537921;, + 9.592052;13.108393;8.535723;, + 13.927161;13.699846;2.063019;, + 11.253488;12.661762;-3.185383;, + 7.687788;12.915033;-4.890432;, + 3.292731;13.091016;-3.337706;, + 4.909685;14.315273;6.833395;, + 3.449045;14.019177;2.395389;, + 7.335181;13.898731;7.254448;, + 8.640161;14.192272;6.638759;, + 12.054080;14.385403;1.847208;, + 10.983072;13.852963;-1.636501;, + 7.731716;13.866605;-2.741714;, + 4.956770;13.926673;-1.904490;, + 4.622008;12.070519;7.351222;, + 3.704210;12.065571;2.885277;, + 7.193317;12.063840;7.696905;, + 9.864344;12.084161;6.936748;, + 12.660480;12.906409;2.302423;, + 11.551223;11.698577;-0.567342;, + 7.725829;10.867992;-1.832680;, + 5.002745;10.862820;-0.929778;, + 12.585479;45.664989;7.008708;, + 12.874625;45.344864;-1.512470;, + 15.109089;43.486977;7.253585;, + 13.087454;40.435127;5.464614;, + 13.795866;40.778912;1.743529;, + 15.452188;43.225502;-0.514091;, + 16.849886;45.784691;5.345008;, + 17.423424;46.063019;2.332403;, + 16.609575;42.436638;6.842184;, + 14.607471;39.414421;5.619863;, + 15.315888;39.758205;1.898780;, + 16.952673;42.175163;0.809246;, + 18.329708;44.705509;5.492955;, + 18.903246;44.983837;2.480351;, + 18.144800;40.845119;8.897065;, + 14.914027;35.968437;6.910757;, + 16.068686;36.528782;0.845695;, + 18.704021;40.418938;-0.936131;, + 20.914110;44.495216;6.691762;, + 21.848928;44.948868;1.781464;, + 18.167065;40.766296;8.049853;, + 15.450755;36.687752;6.384915;, + 16.415583;37.133137;1.422668;, + 18.616444;40.429634;-0.082681;, + 20.535810;43.903175;6.157079;, + 21.299704;44.256214;2.222467;, + 20.548147;39.083851;7.840796;, + 18.160057;35.498848;6.365007;, + 19.018757;35.895241;1.948607;, + 20.948095;38.784222;0.303311;, + 22.625053;41.832062;6.150033;, + 23.304918;42.146267;2.648228;, + 23.432049;37.018097;6.817175;, + 21.932474;34.767567;5.880031;, + 23.302208;36.315411;2.154666;, + 22.480751;35.020664;3.060161;, + 24.731340;38.735447;5.732314;, + 25.165438;38.936066;3.496411;, + 23.626654;36.826782;1.797030;, + -28.517160;31.793991;1.543602;, + -27.623203;33.479103;1.464946;, + -26.314863;31.439417;2.804749;, + -27.522303;30.546118;1.966592;, + -27.834438;30.422531;4.730635;, + -27.986174;30.947910;7.563584;, + -23.676790;33.790108;6.865523;, + -25.163914;35.616783;6.993527;, + -29.290388;32.175655;7.563584;, + -26.148655;37.035873;5.267626;, + -30.056318;26.943773;6.619426;, + -30.477406;26.898275;4.811452;, + -29.016966;26.626286;4.498936;, + -29.151058;26.812195;6.619426;, + -23.843136;33.278522;4.380921;, + -25.336742;35.399422;1.973382;, + -26.793785;36.568802;3.461252;, + -29.775337;27.052881;2.157598;, + -28.993601;26.822264;2.423525;, + -25.268938;32.550930;-0.123384;, + -25.509323;33.964241;0.536960;, + -23.867901;32.729515;1.987316;, + -23.872589;31.858027;1.237716;, + -24.034052;33.391464;3.241510;, + -29.871441;32.499008;5.227734;, + -26.871038;32.694099;1.064689;, + -25.524969;30.935171;2.198134;, + -26.724709;29.841438;0.779249;, + -25.905239;29.244349;-0.349298;, + -25.304882;28.413658;0.334064;, + -26.258276;28.977617;1.267885;, + -25.079140;31.094601;-0.305392;, + -26.384459;31.188791;1.184134;, + -23.863787;30.626995;0.930952;, + -30.805887;29.712465;5.072928;, + -30.182587;29.777977;7.264207;, + -28.860950;28.980301;7.299366;, + -28.305138;29.246729;4.638216;, + -29.520382;29.915192;1.703345;, + -28.181793;29.520292;2.073250;, + -12.123036;0.088037;3.300384;, + -5.303345;0.088037;3.223917;, + -6.627419;0.046006;8.013719;, + -11.881689;0.731735;2.923214;, + -5.181487;0.894232;2.923214;, + -10.314516;0.175008;-8.276375;, + -7.067134;0.034675;-8.202744;, + -4.718675;0.413626;-6.580339;, + -11.705606;0.047754;-6.787080;, + -5.770067;0.168155;0.023152;, + -12.113213;0.175049;0.374328;, + -5.182574;1.516512;3.522007;, + -6.625576;1.573865;7.859301;, + -10.195277;1.855839;8.088705;, + -10.197120;0.327974;8.243123;, + -11.882777;1.354014;3.522007;, + -10.314760;1.014684;-8.275504;, + -7.067381;0.874356;-8.201875;, + -4.718995;1.253311;-6.580090;, + -11.705929;0.887438;-6.786831;, + -5.770934;1.007790;0.014234;, + -12.114079;1.014688;0.365411;, + -11.300814;3.021991;-6.440265;, + -7.950356;3.698104;-7.581497;, + -5.340785;3.167656;-5.998088;, + -5.110586;3.089141;-2.541014;, + -11.804509;2.791543;-3.152129;, + -11.006028;5.817454;1.389889;, + -8.475157;5.932668;-0.505548;, + -8.096884;5.036399;-2.774021;, + -8.012587;4.399764;-4.469068;, + -11.771126;5.830766;3.514578;, + -5.735826;5.809277;1.057280;, + -4.825563;5.817947;3.744911;, + -5.473527;5.822373;6.464175;, + -7.130609;5.792872;6.393783;, + -10.434228;5.836313;6.220846;, + -2.535641;17.355799;1.982380;, + -2.267831;19.017778;1.623937;, + -3.586708;19.327164;5.891222;, + -3.849715;17.241997;5.800620;, + -5.971066;19.432480;7.503632;, + -5.982419;17.147745;7.382187;, + -9.022285;20.134617;6.603466;, + -9.262430;17.139515;5.800619;, + -12.168489;20.290672;1.623937;, + -11.894694;17.723486;1.982380;, + -9.023302;19.982052;-2.746684;, + -8.917446;17.139517;-1.835862;, + -5.972082;19.279917;-4.705683;, + -6.491119;17.147745;-3.417428;, + -3.440768;19.174599;-2.746683;, + -3.616219;17.241997;-1.835860;, + -0.653999;21.713270;1.998527;, + -2.616775;21.981775;7.255371;, + -5.183431;23.393459;9.200554;, + -8.820147;24.840387;7.668663;, + -11.881289;25.446686;1.982380;, + -8.820147;24.362463;-3.649055;, + -5.183429;22.915539;-6.179790;, + -2.505685;21.656416;-3.632905;, + -1.435419;23.850784;8.223292;, + -9.307683;28.020374;7.743168;, + -10.899626;30.391527;0.493318;, + -8.350187;28.887068;-4.569030;, + -3.683043;27.047464;-6.897249;, + -14.912179;48.268642;5.106739;, + -12.913298;50.467754;5.078930;, + -12.962790;50.522636;1.384549;, + -15.527129;48.436718;2.094133;, + -9.243979;37.438923;7.067486;, + -3.905869;36.444157;10.870089;, + -11.459283;38.454742;-0.613277;, + -9.253351;39.704651;-5.891787;, + -3.457279;40.004971;-9.656940;, + -8.819773;33.780930;6.792171;, + -4.079543;33.892616;11.120209;, + -11.025005;32.194057;-0.597313;, + -9.476652;31.258600;-5.890305;, + -3.340604;30.257090;-9.461814;, + -8.208400;33.208889;6.506425;, + -3.844355;33.252815;10.523578;, + -10.753060;31.578617;-0.480340;, + -8.264114;30.899374;-5.411129;, + -3.101796;29.783400;-8.733105;, + -8.635990;31.230478;7.043343;, + -4.589693;31.494150;10.284621;, + -4.931572;27.174917;10.768083;, + -3.164983;13.614117;8.688048;, + -1.885150;13.266646;2.479012;, + -7.264134;13.045812;9.537921;, + -9.464302;13.108393;8.535723;, + -13.799416;13.699846;2.063019;, + -11.125739;12.661762;-3.185383;, + -7.560040;12.915033;-4.890432;, + -3.164983;13.091016;-3.337706;, + -4.781938;14.315273;6.833395;, + -3.321296;14.019177;2.395389;, + -7.207436;13.898731;7.254448;, + -8.512415;14.192272;6.638759;, + -11.926332;14.385403;1.847208;, + -10.855326;13.852963;-1.636501;, + -7.603969;13.866605;-2.741714;, + -4.829021;13.926673;-1.904490;, + -4.494260;12.070519;7.351222;, + -3.576463;12.065571;2.885277;, + -7.065567;12.063840;7.696905;, + -9.736598;12.084161;6.936748;, + -12.532731;12.906409;2.302423;, + -11.423474;11.698577;-0.567342;, + -7.598082;10.867992;-1.832680;, + -4.874997;10.862820;-0.929778;, + -12.457731;45.664989;7.008708;, + -12.746877;45.344864;-1.512470;, + -14.981347;43.486977;7.253585;, + -12.959704;40.435127;5.464614;, + -13.668120;40.778912;1.743529;, + -15.324445;43.225502;-0.514091;, + -16.722143;45.784691;5.345008;, + -17.295679;46.063019;2.332403;, + -16.481831;42.436638;6.842184;, + -14.479725;39.414421;5.619863;, + -15.188142;39.758205;1.898780;, + -16.824930;42.175163;0.809246;, + -18.201963;44.705509;5.492955;, + -18.775501;44.983837;2.480351;, + -18.017056;40.845119;8.897065;, + -14.786280;35.968437;6.910757;, + -15.940937;36.528782;0.845695;, + -18.576277;40.418938;-0.936131;, + -20.786366;44.495216;6.691762;, + -21.721182;44.948868;1.781464;, + -18.039320;40.766296;8.049853;, + -15.323012;36.687752;6.384915;, + -16.287840;37.133137;1.422668;, + -18.488697;40.429634;-0.082681;, + -20.408064;43.903175;6.157079;, + -21.171957;44.256214;2.222467;, + -20.420401;39.083851;7.840796;, + -18.032312;35.498848;6.365007;, + -18.891008;35.895241;1.948607;, + -20.820349;38.784222;0.303311;, + -22.497307;41.832062;6.150033;, + -23.177174;42.146267;2.648228;, + -23.304302;37.018097;6.817175;, + -21.804729;34.767567;5.880031;, + -22.353006;35.020664;3.060161;, + -23.174463;36.315411;2.154666;, + -24.603598;38.735447;5.732314;, + -25.037689;38.936066;3.496411;, + -23.498907;36.826782;1.797030;, + 32.573399;20.998508;-13.993474;, + 31.347282;21.510612;-18.896196;, + 32.212158;19.942856;-22.086969;, + 34.386311;17.725908;-19.577688;, + 32.721909;19.000187;-25.473017;, + 35.309505;16.038933;-24.075357;, + 32.861069;18.711260;-28.951471;, + 35.487915;15.668485;-28.535112;, + 32.625397;19.084837;-32.416637;, + 35.185760;16.147453;-32.977818;, + 32.022045;20.109577;-35.763229;, + 34.412201;17.461275;-37.268509;, + 31.069363;21.754337;-38.889565;, + 33.190762;19.570044;-41.276810;, + 30.172787;23.316404;-40.686150;, + 30.727213;23.864517;-46.026169;, + 26.799459;29.484686;-23.919806;, + 26.588755;29.721081;-34.907444;, + 28.314373;26.659443;-35.908363;, + 28.665804;26.196402;-23.140169;, + 29.684425;24.219271;-37.460514;, + 30.009434;23.747953;-29.136843;, + 30.314682;23.305275;-21.319128;, + 33.628345;20.744303;-22.096889;, + 32.763477;22.312052;-18.906120;, + 34.138103;19.801640;-25.482931;, + 34.277260;19.512701;-28.961386;, + 34.041592;19.886280;-32.426556;, + 33.438240;20.911032;-35.773148;, + 32.485558;22.555790;-38.899498;, + 31.588987;24.117847;-40.696075;, + 29.730568;27.460878;-35.918262;, + 28.004946;30.522528;-34.917355;, + 28.215664;30.286123;-23.929716;, + 30.082003;26.997847;-23.150089;, + 31.425623;24.549398;-29.146767;, + 31.100611;25.020727;-37.470440;, + 31.730875;24.106718;-21.329044;, + 28.887688;30.497171;16.516956;, + 28.264534;31.576502;16.538700;, + 27.273039;30.284517;16.527586;, + 28.868330;30.531387;14.265285;, + 28.245173;31.610723;14.287043;, + 28.430216;31.305752;-36.706051;, + 26.815575;31.093081;-36.695400;, + 27.807066;32.385075;-36.684288;, + 28.565001;29.293274;16.501442;, + 28.545649;29.327480;14.249776;, + 28.107540;30.101837;-36.721565;, + 27.485502;28.670019;16.501251;, + 27.466146;28.704229;14.249575;, + 27.028032;29.478594;-36.721748;, + 26.281548;28.992525;16.516499;, + 26.262192;29.026735;14.264828;, + 25.824083;29.801088;-36.706490;, + 25.658390;30.071863;16.538246;, + 25.639032;30.106077;14.286580;, + 25.200922;30.880438;-36.684742;, + 25.981071;31.275770;16.553751;, + 25.961720;31.309975;14.302090;, + 25.523605;32.084339;-36.669224;, + 27.060581;31.899025;16.553940;, + 27.041225;31.933235;14.302281;, + 26.603115;32.707592;-36.669060;, + 28.548414;31.096832;-22.954752;, + 27.925262;32.176163;-22.932991;, + 28.111961;31.846174;-1.211521;, + 28.735117;30.766836;-1.233276;, + 28.225733;29.892931;-22.970266;, + 28.412436;29.562933;-1.248788;, + 27.146231;29.269676;-22.970453;, + 27.332933;28.939684;-1.248984;, + 25.942278;29.592182;-22.955206;, + 26.128983;29.262184;-1.233739;, + 25.319118;30.671524;-22.933453;, + 25.505823;30.341524;-1.211982;, + 25.641800;31.875427;-22.917944;, + 25.828506;31.545427;-1.196465;, + 26.721312;32.498676;-22.917738;, + 26.908014;32.168686;-1.196282;, + 29.272268;30.830444;-0.798965;, + 28.443258;32.266331;-0.770020;, + 28.568949;32.044174;13.852868;, + 29.397957;30.608292;13.823928;, + 28.842997;29.228819;-0.819599;, + 28.968679;29.006672;13.803288;, + 27.406893;28.399687;-0.819852;, + 27.532579;28.177542;13.803031;, + 25.805210;28.828726;-0.799567;, + 25.930891;28.606585;13.823323;, + 24.976185;30.264614;-0.770632;, + 25.101870;30.042463;13.852263;, + 25.405474;31.866238;-0.749988;, + 25.531157;31.644094;13.872904;, + 26.841581;32.695370;-0.749732;, + 26.967262;32.473228;13.873165;, + 27.815252;32.370605;-35.731056;, + 28.438414;31.291262;-35.752815;, + 28.115726;30.087366;-35.768326;, + 27.036226;29.464113;-35.768520;, + 25.832272;29.786617;-35.753273;, + 25.209120;30.865946;-35.731510;, + 25.531799;32.069855;-35.715992;, + 26.611311;32.693104;-35.715794;, + 29.151377;31.385166;-35.757492;, + 28.253050;32.941086;-35.726151;, + 28.363062;32.746647;-22.928093;, + 29.261381;31.190737;-22.959444;, + 28.686214;29.649672;-35.779873;, + 28.796217;29.455244;-22.981829;, + 27.130047;28.751215;-35.780151;, + 27.240047;28.556789;-22.982094;, + 25.394470;29.216141;-35.758179;, + 25.504477;29.021709;-22.960121;, + 24.496161;30.772045;-35.726803;, + 24.606161;30.577616;-22.928751;, + 24.961311;32.507545;-35.704453;, + 25.071318;32.313114;-22.906395;, + 26.517492;33.405987;-35.704166;, + 26.627487;33.211575;-22.906115;, + 4.623211;58.867786;-3.862747;, + 4.421278;57.862228;-4.019349;, + 4.306293;56.502014;-3.484852;, + 3.994818;55.254379;-3.108994;, + 5.147715;49.761192;-2.113228;, + 6.278196;45.850166;-8.067322;, + 6.233131;45.426857;-7.008514;, + 7.751843;45.219013;-8.465691;, + 4.528587;44.834175;-8.067539;, + 5.187818;45.483761;-8.988400;, + 5.636263;44.508118;-10.252790;, + 7.664405;44.397705;-6.411367;, + 4.357210;43.247772;-8.466115;, + 7.991459;42.205650;-8.873802;, + 6.708311;41.659477;-9.966291;, + 7.938428;41.592506;-7.636380;, + 5.932536;40.895046;-8.882633;, + 7.677983;38.542618;-9.851732;, + 7.677983;38.542618;-9.851732;, + 4.401065;56.646732;1.280575;, + 4.437895;58.255383;1.427657;, + 4.430346;55.772125;0.639352;, + 5.337671;47.371635;-1.636148;, + 4.610723;58.899246;1.076627;, + 0.196953;58.884743;4.326951;, + 1.719232;58.884743;4.326951;, + 4.242009;58.884743;2.570855;, + 4.610723;58.899246;1.076627;, + 5.188532;58.921978;-0.146142;, + 4.901477;58.929310;-2.285047;, + 4.623211;58.867786;-3.862747;, + 3.431264;58.838142;-5.428817;, + 1.890343;58.877293;-6.329304;, + 0.196953;58.892124;-6.759975;, + 0.196953;61.891335;4.474140;, + 2.119642;61.891335;4.476328;, + 4.312335;61.891335;2.701971;, + 4.631948;61.891903;1.199314;, + 5.159706;61.892818;-0.050380;, + 4.883253;61.893120;-2.302159;, + 4.635466;61.890621;-3.937706;, + 3.606839;61.889484;-5.468257;, + 2.316901;61.891026;-6.361181;, + 0.196953;61.891628;-6.807594;, + -4.753813;49.761192;-2.113228;, + -5.884295;45.850166;-8.067322;, + -5.839230;45.426857;-7.008514;, + -7.357939;45.219013;-8.465691;, + -4.134687;44.834175;-8.067539;, + -5.242361;44.508118;-10.252790;, + -4.793914;45.483761;-8.988400;, + -7.270504;44.397705;-6.411367;, + -3.963310;43.247772;-8.466115;, + -7.597560;42.205650;-8.873802;, + -6.314410;41.659477;-9.966291;, + -7.544526;41.592506;-7.636380;, + -5.538635;40.895046;-8.882633;, + -7.284081;38.542618;-9.851732;, + -7.284081;38.542618;-9.851732;, + -4.043993;58.255383;1.427657;, + -4.007164;56.646732;1.280575;, + -4.036447;55.772125;0.639352;, + -4.943766;47.371635;-1.636148;, + -4.216822;58.899246;1.076627;, + 0.196953;58.884743;4.326951;, + 0.196953;59.059555;4.940836;, + -1.325331;58.884743;4.326951;, + -3.848105;58.884743;2.570855;, + -4.216822;58.899246;1.076627;, + -4.794626;58.921978;-0.146142;, + -4.507572;58.929310;-2.285047;, + -4.229308;58.867786;-3.862747;, + -3.037360;58.838142;-5.428817;, + -1.496442;58.877293;-6.329304;, + 0.196953;60.034519;4.932486;, + 0.196953;61.891335;4.474140;, + -1.725740;61.891335;4.476328;, + -3.918436;61.891335;2.701971;, + -4.238046;61.891903;1.199314;, + -4.765804;61.892818;-0.050380;, + -4.489351;61.893120;-2.302159;, + -4.241562;61.890621;-3.937706;, + -3.212934;61.889484;-5.468257;, + -1.923000;61.891026;-6.361181;, + -0.192284;65.158386;-0.267689;, + 0.109390;64.035477;-0.790199;, + 0.234013;67.669022;-1.022976;, + 0.658695;65.158386;-0.267689;, + 0.357023;64.035477;-0.790199;, + 0.658695;65.158386;-1.741625;, + 0.357023;64.035477;-1.219115;, + -0.192284;65.158386;-1.741625;, + 0.234013;67.669022;-1.022976;, + 7.050604;63.754948;-1.851895;, + 2.748468;63.025620;-1.582111;, + 9.181485;64.333855;-2.066042;, + 10.870568;67.072159;-2.811351;, + -6.477442;63.754936;-1.851895;, + -2.175307;63.025620;-1.582111;, + -8.608323;64.333855;-2.066042;, + -10.297409;67.072159;-2.811351;, + 9.278677;42.422218;6.029630;, + 8.567321;37.947166;6.627038;, + 10.371579;42.720932;0.675551;, + 10.590998;38.832512;-0.519268;, + 0.063876;53.173985;0.844661;, + 4.213577;53.047283;0.988064;, + 9.269650;46.553898;-0.745430;, + 6.308704;51.061012;-1.528991;, + 7.708933;51.749233;0.002558;, + 7.708933;51.749233;0.002558;, + 6.308704;51.898582;5.810977;, + 8.092727;46.706837;7.085848;, + 0.063876;53.173985;0.844661;, + -8.439575;37.947166;6.627038;, + -9.150930;42.422218;6.029630;, + -10.463250;38.832512;-0.519268;, + -10.243833;42.720932;0.675551;, + -4.085828;53.047283;0.988064;, + -9.141901;46.553898;-0.745430;, + -6.180955;51.061012;-1.528991;, + 0.063876;51.405113;7.858276;, + 0.063876;53.091850;6.132280;, + -7.581183;51.749233;0.002558;, + -7.581183;51.749233;0.002558;, + 0.063876;42.720932;10.305261;, + 0.063876;37.106018;10.305261;, + 0.063876;47.533646;9.378681;, + -7.964980;46.706837;7.085848;, + -6.180955;51.898582;5.810977;, + 26.442608;31.439417;2.804749;, + 28.644909;31.793991;1.543602;, + 27.650051;30.546118;1.966592;, + 29.418135;32.175655;7.563584;, + 25.291662;35.616783;6.993527;, + 28.113920;30.947910;7.563584;, + 23.804535;33.790108;6.865523;, + 23.995649;32.729515;1.987316;, + 24.161800;33.391464;3.241510;, + 25.464495;35.399422;1.973382;, + 30.310335;29.777977;7.264207;, + 28.988699;28.980301;7.299366;, + 29.648125;29.915192;1.703345;, + 28.309542;29.520292;2.073250;, + 30.184065;26.943773;6.619426;, + 29.278811;26.812195;6.619426;, + 29.121349;26.822264;2.423525;, + 29.903082;27.052881;2.157598;, + 6.755167;0.046006;8.013719;, + 12.250779;0.088037;3.300384;, + 12.009439;0.731735;2.923214;, + 5.309235;0.894232;2.923214;, + 5.431096;0.088037;3.223917;, + 7.194882;0.034675;-8.202744;, + 4.846424;0.413626;-6.580339;, + 10.442262;0.175008;-8.276375;, + 5.897818;0.168155;0.023152;, + 11.833355;0.047754;-6.787080;, + 12.240962;0.175049;0.374328;, + 10.442509;1.014684;-8.275504;, + 4.846746;1.253311;-6.580090;, + 7.195130;0.874356;-8.201875;, + 5.468536;3.167656;-5.998088;, + 4.846746;1.253311;-6.580090;, + 11.428559;3.021991;-6.440265;, + 12.241827;1.014688;0.365411;, + 11.833675;0.887438;-6.786831;, + 11.932255;2.791543;-3.152129;, + 11.133778;5.817454;1.389889;, + 12.010524;1.354014;3.522007;, + 5.898684;1.007790;0.014234;, + 5.310324;1.516512;3.522007;, + 6.753324;1.573865;7.859301;, + 5.601276;5.822373;6.464175;, + 10.323023;1.855839;8.088705;, + 5.238337;3.089141;-2.541014;, + 5.863575;5.809277;1.057280;, + 2.395580;19.017778;1.623937;, + 2.663392;17.355799;1.982380;, + 0.781750;21.713270;1.998527;, + 0.063876;23.353767;1.793407;, + 8.567321;37.947166;6.627038;, + 3.727235;37.106018;10.305261;, + 10.590998;38.832512;-0.519268;, + 8.567321;40.015377;-5.275937;, + 3.269272;40.303337;-8.724752;, + 0.063876;40.303337;-8.724752;, + 10.880808;31.578617;-0.480340;, + 8.336151;33.208889;6.506425;, + 8.391865;30.899374;-5.411129;, + 3.229546;29.783400;-8.733105;, + 0.063876;29.783400;-8.733105;, + 0.063876;37.106018;10.305261;, + 3.972105;33.252815;10.523578;, + 0.063876;33.252815;10.523581;, + 3.977465;17.241997;5.800620;, + 2.663392;17.355799;1.982380;, + 6.110166;17.147745;7.382187;, + 9.390180;17.139515;5.800619;, + 6.110166;17.147745;7.382187;, + 7.391886;13.045812;9.537921;, + 12.022444;17.723486;1.982380;, + 9.045196;17.139517;-1.835862;, + 6.618869;17.147745;-3.417428;, + 3.743971;17.241997;-1.835860;, + 3.743971;17.241997;-1.835860;, + 3.292731;13.091016;-3.337706;, + 7.335181;13.898731;7.254448;, + 4.956770;13.926673;-1.904490;, + 4.909685;14.315273;6.833395;, + 3.449045;14.019177;2.395389;, + 7.335181;13.898731;7.254448;, + 4.909685;14.315273;6.833395;, + 4.622008;12.070519;7.351222;, + 8.640161;14.192272;6.638759;, + 12.054080;14.385403;1.847208;, + 8.640161;14.192272;6.638759;, + 9.864344;12.084161;6.936748;, + 10.983072;13.852963;-1.636501;, + 7.731716;13.866605;-2.741714;, + 10.983072;13.852963;-1.636501;, + 11.551223;11.698577;-0.567342;, + 4.956770;13.926673;-1.904490;, + 4.956770;13.926673;-1.904490;, + 5.002745;10.862820;-0.929778;, + 5.601276;5.822373;6.464175;, + 7.258355;5.792872;6.393783;, + 10.561975;5.836313;6.220846;, + 11.898876;5.830766;3.514578;, + 11.133778;5.817454;1.389889;, + 8.602904;5.932668;-0.505548;, + 4.953313;5.817947;3.744911;, + 8.078106;3.698104;-7.581497;, + 5.468536;3.167656;-5.998088;, + 10.323023;1.855839;8.088705;, + 10.561975;5.836313;6.220846;, + 11.428559;3.021991;-6.440265;, + 10.324868;0.327974;8.243123;, + 11.833675;0.887438;-6.786831;, + 6.753324;1.573865;7.859301;, + 5.601276;5.822373;6.464175;, + 10.561975;5.836313;6.220846;, + 11.133778;5.817454;1.389889;, + 10.371579;42.720932;0.675551;, + 9.278677;42.422218;6.029630;, + 10.371579;42.720932;0.675551;, + 13.795866;40.778912;1.743529;, + 15.315888;39.758205;1.898780;, + 16.609575;42.436638;6.842184;, + 14.607471;39.414421;5.619863;, + 15.315888;39.758205;1.898780;, + 16.952673;42.175163;0.809246;, + 14.914027;35.968437;6.910757;, + 14.607471;39.414421;5.619863;, + 18.329708;44.705509;5.492955;, + 18.144800;40.845119;8.897065;, + 18.903246;44.983837;2.480351;, + 15.450755;36.687752;6.384915;, + 18.167065;40.766296;8.049853;, + 18.160057;35.498848;6.365007;, + 21.932474;34.767567;5.880031;, + 25.291662;35.616783;6.993527;, + 23.804535;33.790108;6.865523;, + 23.970884;33.278522;4.380921;, + 23.804535;33.790108;6.865523;, + 26.276403;37.035873;5.267626;, + 26.921537;36.568802;3.461252;, + -25.163914;35.616783;6.993527;, + -29.290388;32.175655;7.563584;, + -23.676790;33.790108;6.865523;, + -27.986174;30.947910;7.563584;, + -25.336742;35.399422;1.973382;, + -24.034052;33.391464;3.241510;, + -23.867901;32.729515;1.987316;, + -30.182587;29.777977;7.264207;, + -28.860950;28.980301;7.299366;, + -30.056318;26.943773;6.619426;, + -29.151058;26.812195;6.619426;, + -6.627419;0.046006;8.013719;, + -12.123036;0.088037;3.300384;, + -11.881689;0.731735;2.923214;, + -5.303345;0.088037;3.223917;, + -5.181487;0.894232;2.923214;, + -7.067134;0.034675;-8.202744;, + -4.718675;0.413626;-6.580339;, + -10.314516;0.175008;-8.276375;, + -5.770067;0.168155;0.023152;, + -11.705606;0.047754;-6.787080;, + -12.113213;0.175049;0.374328;, + -10.314760;1.014684;-8.275504;, + -7.067381;0.874356;-8.201875;, + -4.718995;1.253311;-6.580090;, + -4.718995;1.253311;-6.580090;, + -5.340785;3.167656;-5.998088;, + -12.114079;1.014688;0.365411;, + -11.300814;3.021991;-6.440265;, + -11.705929;0.887438;-6.786831;, + -11.804509;2.791543;-3.152129;, + -11.882777;1.354014;3.522007;, + -11.006028;5.817454;1.389889;, + -5.770934;1.007790;0.014234;, + -5.182574;1.516512;3.522007;, + -5.473527;5.822373;6.464175;, + -6.625576;1.573865;7.859301;, + -10.195277;1.855839;8.088705;, + -5.735826;5.809277;1.057280;, + -5.110586;3.089141;-2.541014;, + -2.267831;19.017778;1.623937;, + -2.535641;17.355799;1.982380;, + -0.653999;21.713270;1.998527;, + -3.599484;37.106018;10.305261;, + -8.439575;37.947166;6.627038;, + -10.463250;38.832512;-0.519268;, + -8.439575;40.015377;-5.275937;, + -3.141523;40.303337;-8.724752;, + -8.208400;33.208889;6.506425;, + -10.753060;31.578617;-0.480340;, + -8.264114;30.899374;-5.411129;, + -3.101796;29.783400;-8.733105;, + -3.844355;33.252815;10.523578;, + -2.535641;17.355799;1.982380;, + -3.849715;17.241997;5.800620;, + -5.982419;17.147745;7.382187;, + -5.982419;17.147745;7.382187;, + -9.262430;17.139515;5.800619;, + -7.264134;13.045812;9.537921;, + -11.894694;17.723486;1.982380;, + -8.917446;17.139517;-1.835862;, + -6.491119;17.147745;-3.417428;, + -3.616219;17.241997;-1.835860;, + -3.616219;17.241997;-1.835860;, + -3.164983;13.091016;-3.337706;, + -7.207436;13.898731;7.254448;, + -4.829021;13.926673;-1.904490;, + -3.321296;14.019177;2.395389;, + -4.781938;14.315273;6.833395;, + -4.781938;14.315273;6.833395;, + -7.207436;13.898731;7.254448;, + -4.494260;12.070519;7.351222;, + -8.512415;14.192272;6.638759;, + -8.512415;14.192272;6.638759;, + -11.926332;14.385403;1.847208;, + -9.736598;12.084161;6.936748;, + -10.855326;13.852963;-1.636501;, + -10.855326;13.852963;-1.636501;, + -7.603969;13.866605;-2.741714;, + -11.423474;11.698577;-0.567342;, + -4.829021;13.926673;-1.904490;, + -4.829021;13.926673;-1.904490;, + -4.874997;10.862820;-0.929778;, + -5.473527;5.822373;6.464175;, + -7.130609;5.792872;6.393783;, + -10.434228;5.836313;6.220846;, + -11.771126;5.830766;3.514578;, + -11.006028;5.817454;1.389889;, + -8.475157;5.932668;-0.505548;, + -4.825563;5.817947;3.744911;, + -5.340785;3.167656;-5.998088;, + -7.950356;3.698104;-7.581497;, + -10.434228;5.836313;6.220846;, + -10.195277;1.855839;8.088705;, + -11.300814;3.021991;-6.440265;, + -10.197120;0.327974;8.243123;, + -11.705929;0.887438;-6.786831;, + -6.625576;1.573865;7.859301;, + -5.473527;5.822373;6.464175;, + -10.434228;5.836313;6.220846;, + -11.006028;5.817454;1.389889;, + -10.243833;42.720932;0.675551;, + -9.150930;42.422218;6.029630;, + -10.243833;42.720932;0.675551;, + -13.668120;40.778912;1.743529;, + -15.188142;39.758205;1.898780;, + -14.479725;39.414421;5.619863;, + -16.481831;42.436638;6.842184;, + -16.824930;42.175163;0.809246;, + -15.188142;39.758205;1.898780;, + -14.479725;39.414421;5.619863;, + -14.786280;35.968437;6.910757;, + -18.201963;44.705509;5.492955;, + -18.017056;40.845119;8.897065;, + -18.775501;44.983837;2.480351;, + -15.323012;36.687752;6.384915;, + -18.039320;40.766296;8.049853;, + -18.032312;35.498848;6.365007;, + -21.804729;34.767567;5.880031;, + -25.163914;35.616783;6.993527;, + -23.676790;33.790108;6.865523;, + -23.676790;33.790108;6.865523;, + -23.843136;33.278522;4.380921;, + -26.148655;37.035873;5.267626;, + -26.793785;36.568802;3.461252;, + 32.763477;22.312052;-18.906120;, + 31.347282;21.510612;-18.896196;, + 32.573399;20.998508;-13.993474;, + 31.588987;24.117847;-40.696075;, + 30.727213;23.864517;-46.026169;, + 30.172787;23.316404;-40.686150;, + 28.004946;30.522528;-34.917355;, + 26.588755;29.721081;-34.907444;, + 26.799459;29.484686;-23.919806;, + 28.215664;30.286123;-23.929716;, + 29.730568;27.460878;-35.918262;, + 28.314373;26.659443;-35.908363;, + 28.665804;26.196402;-23.140169;, + 30.082003;26.997847;-23.150089;, + 31.100611;25.020727;-37.470440;, + 29.684425;24.219271;-37.460514;, + 30.314682;23.305275;-21.319128;, + 31.730875;24.106718;-21.329044;, + 28.264534;31.576502;16.538700;, + 28.887688;30.497171;16.516956;, + 28.565001;29.293274;16.501442;, + 27.485502;28.670019;16.501251;, + 26.281548;28.992525;16.516499;, + 25.658390;30.071863;16.538246;, + 25.981071;31.275770;16.553751;, + 25.961720;31.309975;14.302090;, + 25.981071;31.275770;16.553751;, + 27.060581;31.899025;16.553940;, + 25.641800;31.875427;-22.917944;, + 25.828506;31.545427;-1.196465;, + 25.405474;31.866238;-0.749988;, + 25.531157;31.644094;13.872904;, + 28.430216;31.305752;-36.706051;, + 27.807066;32.385075;-36.684288;, + 28.107540;30.101837;-36.721565;, + 27.028032;29.478594;-36.721748;, + 25.824083;29.801088;-36.706490;, + 25.200922;30.880438;-36.684742;, + 25.523605;32.084339;-36.669224;, + 26.603115;32.707592;-36.669060;, + 25.523605;32.084339;-36.669224;, + 25.531799;32.069855;-35.715992;, + 24.961311;32.507545;-35.704453;, + 25.071318;32.313114;-22.906395;, + 29.151377;31.385166;-35.757492;, + 28.438414;31.291262;-35.752815;, + 27.815252;32.370605;-35.731056;, + 28.253050;32.941086;-35.726151;, + 28.363062;32.746647;-22.928093;, + 27.925262;32.176163;-22.932991;, + 28.548414;31.096832;-22.954752;, + 29.261381;31.190737;-22.959444;, + 28.686214;29.649672;-35.779873;, + 28.115726;30.087366;-35.768326;, + 28.225733;29.892931;-22.970266;, + 28.796217;29.455244;-22.981829;, + 27.130047;28.751215;-35.780151;, + 27.036226;29.464113;-35.768520;, + 27.146231;29.269676;-22.970453;, + 27.240047;28.556789;-22.982094;, + 25.394470;29.216141;-35.758179;, + 25.832272;29.786617;-35.753273;, + 25.942278;29.592182;-22.955206;, + 25.504477;29.021709;-22.960121;, + 24.496161;30.772045;-35.726803;, + 25.209120;30.865946;-35.731510;, + 25.319118;30.671524;-22.933453;, + 24.606161;30.577616;-22.928751;, + 24.961311;32.507545;-35.704453;, + 25.531799;32.069855;-35.715992;, + 25.641800;31.875427;-22.917944;, + 25.071318;32.313114;-22.906395;, + 26.517492;33.405987;-35.704166;, + 26.611311;32.693104;-35.715794;, + 26.721312;32.498676;-22.917738;, + 26.627487;33.211575;-22.906115;, + 29.272268;30.830444;-0.798965;, + 28.735117;30.766836;-1.233276;, + 28.111961;31.846174;-1.211521;, + 28.443258;32.266331;-0.770020;, + 28.568949;32.044174;13.852868;, + 28.245173;31.610723;14.287043;, + 28.868330;30.531387;14.265285;, + 29.397957;30.608292;13.823928;, + 28.842997;29.228819;-0.819599;, + 28.412436;29.562933;-1.248788;, + 28.545649;29.327480;14.249776;, + 28.968679;29.006672;13.803288;, + 27.406893;28.399687;-0.819852;, + 27.332933;28.939684;-1.248984;, + 27.466146;28.704229;14.249575;, + 27.532579;28.177542;13.803031;, + 25.805210;28.828726;-0.799567;, + 26.128983;29.262184;-1.233739;, + 26.262192;29.026735;14.264828;, + 25.930891;28.606585;13.823323;, + 24.976185;30.264614;-0.770632;, + 25.505823;30.341524;-1.211982;, + 25.639032;30.106077;14.286580;, + 25.101870;30.042463;13.852263;, + 25.405474;31.866238;-0.749988;, + 25.828506;31.545427;-1.196465;, + 25.961720;31.309975;14.302090;, + 25.531157;31.644094;13.872904;, + 26.841581;32.695370;-0.749732;, + 26.908014;32.168686;-1.196282;, + 27.041225;31.933235;14.302281;, + 26.967262;32.473228;13.873165;; + 1896; + 3;0,1,2;, + 3;3,0,2;, + 3;4,0,3;, + 3;5,4,3;, + 3;6,4,5;, + 3;7,6,5;, + 3;8,9,10;, + 3;11,8,10;, + 3;12,8,11;, + 3;13,12,11;, + 3;14,12,13;, + 3;15,14,13;, + 3;9,1,16;, + 3;10,9,16;, + 3;17,3,2;, + 3;18,17,2;, + 3;10,16,19;, + 3;11,10,19;, + 3;20,5,3;, + 3;17,20,3;, + 3;11,19,21;, + 3;13,11,21;, + 3;22,7,5;, + 3;20,22,5;, + 3;14,6,7;, + 3;22,14,7;, + 3;13,21,23;, + 3;15,13,23;, + 3;19,16,1;, + 3;0,19,1;, + 3;21,19,0;, + 3;4,21,0;, + 3;23,21,4;, + 3;6,23,4;, + 3;17,18,9;, + 3;8,17,9;, + 3;20,17,8;, + 3;12,20,8;, + 3;22,20,12;, + 3;14,22,12;, + 3;18,2,1;, + 3;9,18,1;, + 3;15,23,6;, + 3;14,15,6;, + 3;24,25,26;, + 3;24,26,27;, + 3;27,26,28;, + 3;27,28,29;, + 3;29,28,30;, + 3;29,30,31;, + 3;32,33,34;, + 3;32,34,35;, + 3;35,34,36;, + 3;35,36,37;, + 3;37,36,38;, + 3;37,38,39;, + 3;40,25,33;, + 3;40,33,32;, + 3;24,27,41;, + 3;24,41,42;, + 3;43,40,32;, + 3;43,32,35;, + 3;27,29,44;, + 3;27,44,41;, + 3;45,43,35;, + 3;45,35,37;, + 3;29,31,46;, + 3;29,46,44;, + 3;31,30,38;, + 3;31,38,46;, + 3;47,45,37;, + 3;47,37,39;, + 3;25,40,43;, + 3;25,43,26;, + 3;26,43,45;, + 3;26,45,28;, + 3;28,45,47;, + 3;28,47,30;, + 3;33,42,41;, + 3;33,41,34;, + 3;34,41,44;, + 3;34,44,36;, + 3;36,44,46;, + 3;36,46,38;, + 3;25,24,42;, + 3;25,42,33;, + 3;30,47,39;, + 3;30,39,38;, + 3;48,49,50;, + 3;51,48,50;, + 3;52,53,54;, + 3;55,52,54;, + 3;56,57,58;, + 3;59,57,56;, + 3;57,60,61;, + 3;62,60,57;, + 3;59,62,57;, + 3;63,64,65;, + 3;65,60,62;, + 3;64,60,65;, + 3;66,63,65;, + 3;67,66,65;, + 3;61,68,58;, + 3;67,65,62;, + 3;69,67,62;, + 3;70,66,67;, + 3;71,70,67;, + 3;67,69,72;, + 3;71,67,72;, + 3;73,74,75;, + 3;76,73,75;, + 3;62,77,69;, + 3;78,79,68;, + 3;61,78,68;, + 3;80,78,61;, + 3;60,80,61;, + 3;64,81,80;, + 3;71,72,82;, + 3;70,71,82;, + 3;83,84,82;, + 3;72,83,82;, + 3;72,69,73;, + 3;76,72,73;, + 3;69,77,74;, + 3;73,69,74;, + 3;85,86,87;, + 3;88,85,87;, + 3;86,83,75;, + 3;87,86,75;, + 3;59,56,89;, + 3;85,59,89;, + 3;85,89,90;, + 3;86,85,90;, + 3;89,56,58;, + 3;91,89,58;, + 3;90,89,91;, + 3;92,90,91;, + 3;74,88,87;, + 3;75,74,87;, + 3;59,85,77;, + 3;62,59,77;, + 3;84,83,86;, + 3;77,85,88;, + 3;74,77,88;, + 3;83,72,76;, + 3;75,83,76;, + 3;91,58,68;, + 3;93,91,68;, + 3;92,91,93;, + 3;94,92,93;, + 3;979,95,96;, + 3;980,979,96;, + 3;980,96,97;, + 3;981,980,97;, + 3;981,97,982;, + 3;61,58,57;, + 3;98,99,100;, + 3;101,98,100;, + 3;102,98,101;, + 3;103,102,101;, + 3;104,105,106;, + 3;107,104,106;, + 3;105,108,109;, + 3;106,105,109;, + 3;108,110,109;, + 3;100,99,111;, + 3;109,110,112;, + 3;113,109,112;, + 3;104,82,84;, + 3;105,104,84;, + 3;106,98,102;, + 3;107,106,102;, + 3;105,84,86;, + 3;108,105,86;, + 3;109,99,98;, + 3;106,109,98;, + 3;108,86,90;, + 3;110,108,90;, + 3;110,90,92;, + 3;112,110,92;, + 3;113,111,99;, + 3;109,113,99;, + 3;114,112,92;, + 3;115,114,92;, + 3;116,113,112;, + 3;114,116,112;, + 3;117,111,113;, + 3;116,117,113;, + 3;92,94,115;, + 3;111,117,118;, + 3;119,111,118;, + 3;100,111,119;, + 3;101,100,119;, + 3;103,101,119;, + 3;120,103,119;, + 3;117,116,121;, + 3;118,117,121;, + 3;122,120,119;, + 3;123,122,119;, + 3;124,122,123;, + 3;125,124,123;, + 3;119,118,123;, + 3;126,123,118;, + 3;121,126,118;, + 3;125,123,126;, + 3;114,115,127;, + 3;116,114,127;, + 3;121,116,127;, + 3;128,121,127;, + 3;126,121,128;, + 3;129,126,128;, + 3;125,126,129;, + 3;130,125,129;, + 3;131,128,132;, + 3;133,131,132;, + 3;134,129,128;, + 3;131,134,128;, + 3;135,130,129;, + 3;134,135,129;, + 3;133,132,130;, + 3;135,133,130;, + 3;127,132,128;, + 3;127,115,94;, + 3;136,983,982;, + 3;95,55,54;, + 3;96,95,54;, + 3;96,54,137;, + 3;97,96,137;, + 3;97,137,136;, + 3;982,97,136;, + 3;138,131,133;, + 3;139,138,133;, + 3;140,134,131;, + 3;138,140,131;, + 3;141,135,134;, + 3;140,141,134;, + 3;139,133,135;, + 3;141,139,135;, + 3;142,984,985;, + 3;143,142,985;, + 3;144,140,138;, + 3;986,144,138;, + 3;145,987,988;, + 3;989,145,988;, + 3;990,139,141;, + 3;991,990,141;, + 3;146,142,143;, + 3;147,146,143;, + 3;148,144,986;, + 3;992,148,986;, + 3;149,145,989;, + 3;993,149,989;, + 3;994,990,991;, + 3;995,994,991;, + 3;150,146,147;, + 3;996,148,992;, + 3;997,149,993;, + 3;996,994,995;, + 3;50,49,151;, + 3;152,50,151;, + 3;153,154,137;, + 3;54,153,137;, + 3;998,999,48;, + 3;51,998,48;, + 3;51,50,155;, + 3;156,51,155;, + 3;156,1000,51;, + 3;136,137,157;, + 3;158,136,157;, + 3;983,136,158;, + 3;50,152,155;, + 3;156,155,159;, + 3;160,156,159;, + 3;157,156,160;, + 3;161,157,160;, + 3;158,157,161;, + 3;162,158,161;, + 3;983,158,162;, + 3;163,983,162;, + 3;132,127,1001;, + 3;999,1002,48;, + 3;1000,998,51;, + 3;53,153,54;, + 3;157,137,154;, + 3;156,157,1000;, + 3;164,1003,1004;, + 3;165,164,1004;, + 3;165,1004,1005;, + 3;166,165,1005;, + 3;166,1005,1006;, + 3;167,166,1006;, + 3;167,1006,1007;, + 3;168,167,1007;, + 3;168,1007,1008;, + 3;169,168,1008;, + 3;169,1008,1009;, + 3;170,169,1009;, + 3;170,1009,1010;, + 3;171,170,1010;, + 3;171,1010,1011;, + 3;172,171,1011;, + 3;172,1011,1012;, + 3;173,172,1012;, + 3;174,164,165;, + 3;175,174,165;, + 3;175,165,166;, + 3;176,175,166;, + 3;176,166,167;, + 3;177,176,167;, + 3;177,167,168;, + 3;178,177,168;, + 3;178,168,169;, + 3;179,178,169;, + 3;179,169,170;, + 3;180,179,170;, + 3;180,170,171;, + 3;181,180,171;, + 3;181,171,172;, + 3;182,181,172;, + 3;182,172,173;, + 3;183,182,173;, + 3;184,174,175;, + 3;185,184,175;, + 3;185,175,176;, + 3;186,185,176;, + 3;186,176,177;, + 3;187,186,177;, + 3;187,177,178;, + 3;188,187,178;, + 3;188,178,179;, + 3;189,188,179;, + 3;189,179,180;, + 3;190,189,180;, + 3;190,180,181;, + 3;191,190,181;, + 3;191,181,182;, + 3;192,191,182;, + 3;192,182,183;, + 3;193,192,183;, + 3;194,1013,1014;, + 3;195,194,1014;, + 3;195,1014,1015;, + 3;196,195,1015;, + 3;196,1015,1016;, + 3;197,196,1016;, + 3;197,1016,1017;, + 3;198,197,1017;, + 3;198,1017,1018;, + 3;199,198,1018;, + 3;199,1018,1019;, + 3;200,199,1019;, + 3;200,1019,1020;, + 3;201,200,1020;, + 3;201,1020,1021;, + 3;202,201,1021;, + 3;202,1021,1022;, + 3;203,202,1022;, + 3;204,194,195;, + 3;204,195,196;, + 3;204,196,197;, + 3;204,197,198;, + 3;204,198,199;, + 3;204,199,200;, + 3;204,200,201;, + 3;204,201,202;, + 3;204,202,203;, + 3;80,60,64;, + 3;205,206,207;, + 3;208,205,207;, + 3;209,210,211;, + 3;212,209,211;, + 3;213,214,215;, + 3;215,214,216;, + 3;217,218,214;, + 3;218,219,216;, + 3;214,218,216;, + 3;220,64,63;, + 3;219,218,220;, + 3;220,218,64;, + 3;63,66,221;, + 3;220,63,221;, + 3;213,222,217;, + 3;220,221,223;, + 3;219,220,223;, + 3;66,70,224;, + 3;221,66,224;, + 3;223,221,224;, + 3;225,223,224;, + 3;226,227,228;, + 3;229,226,228;, + 3;223,230,219;, + 3;231,232,217;, + 3;222,231,217;, + 3;232,233,218;, + 3;217,232,218;, + 3;233,81,64;, + 3;82,225,224;, + 3;82,224,70;, + 3;234,235,225;, + 3;82,234,225;, + 3;223,225,228;, + 3;227,223,228;, + 3;230,223,227;, + 3;226,230,227;, + 3;236,237,238;, + 3;239,236,238;, + 3;235,236,239;, + 3;229,235,239;, + 3;215,216,237;, + 3;240,215,237;, + 3;240,237,236;, + 3;241,240,236;, + 3;215,240,242;, + 3;213,215,242;, + 3;240,241,243;, + 3;242,240,243;, + 3;238,226,229;, + 3;239,238,229;, + 3;230,237,216;, + 3;230,216,219;, + 3;236,235,234;, + 3;237,230,226;, + 3;238,237,226;, + 3;225,235,229;, + 3;228,225,229;, + 3;213,242,244;, + 3;222,213,244;, + 3;242,243,245;, + 3;244,242,245;, + 3;246,231,222;, + 3;247,246,222;, + 3;247,222,244;, + 3;248,247,244;, + 3;245,248,244;, + 3;214,213,217;, + 3;249,250,251;, + 3;252,249,251;, + 3;250,102,103;, + 3;251,250,103;, + 3;253,104,107;, + 3;254,253,107;, + 3;255,253,254;, + 3;256,255,254;, + 3;256,257,255;, + 3;258,249,252;, + 3;257,256,259;, + 3;260,257,259;, + 3;82,104,253;, + 3;234,82,253;, + 3;250,254,107;, + 3;102,250,107;, + 3;234,253,255;, + 3;236,234,255;, + 3;249,256,254;, + 3;250,249,254;, + 3;236,255,257;, + 3;241,236,257;, + 3;241,257,260;, + 3;243,241,260;, + 3;258,259,256;, + 3;249,258,256;, + 3;260,261,262;, + 3;243,260,262;, + 3;259,263,261;, + 3;260,259,261;, + 3;258,264,263;, + 3;259,258,263;, + 3;262,245,243;, + 3;264,258,265;, + 3;266,264,265;, + 3;265,258,252;, + 3;265,252,251;, + 3;251,103,120;, + 3;265,251,120;, + 3;267,263,264;, + 3;267,264,266;, + 3;120,122,268;, + 3;265,120,268;, + 3;122,124,269;, + 3;268,122,269;, + 3;268,266,265;, + 3;268,270,267;, + 3;266,268,267;, + 3;270,268,269;, + 3;271,262,261;, + 3;261,263,267;, + 3;271,261,267;, + 3;271,267,272;, + 3;267,270,273;, + 3;272,267,273;, + 3;270,269,274;, + 3;273,270,274;, + 3;272,275,276;, + 3;277,272,276;, + 3;273,278,275;, + 3;272,273,275;, + 3;274,279,278;, + 3;273,274,278;, + 3;277,276,279;, + 3;274,277,279;, + 3;272,277,271;, + 3;1023,280,245;, + 3;245,262,271;, + 3;211,246,247;, + 3;212,211,247;, + 3;212,247,248;, + 3;281,212,248;, + 3;281,248,245;, + 3;280,281,245;, + 3;275,282,283;, + 3;276,275,283;, + 3;278,284,282;, + 3;275,278,282;, + 3;279,285,284;, + 3;278,279,284;, + 3;276,283,285;, + 3;279,276,285;, + 3;1024,286,287;, + 3;1025,1024,287;, + 3;284,288,1026;, + 3;282,284,1026;, + 3;1027,289,1028;, + 3;1029,1027,1028;, + 3;283,1030,1031;, + 3;285,283,1031;, + 3;286,290,291;, + 3;287,286,291;, + 3;288,292,1032;, + 3;1026,288,1032;, + 3;289,293,1033;, + 3;1028,289,1033;, + 3;1030,1034,1035;, + 3;1031,1030,1035;, + 3;291,290,294;, + 3;1032,292,1036;, + 3;1033,293,1037;, + 3;1035,1034,1036;, + 3;205,208,152;, + 3;151,205,152;, + 3;295,296,212;, + 3;281,295,212;, + 3;1038,1039,207;, + 3;206,1038,207;, + 3;208,207,297;, + 3;155,208,297;, + 3;207,1040,297;, + 3;281,280,298;, + 3;299,281,298;, + 3;298,280,1023;, + 3;155,152,208;, + 3;155,297,300;, + 3;159,155,300;, + 3;297,299,301;, + 3;300,297,301;, + 3;299,298,302;, + 3;301,299,302;, + 3;302,298,1023;, + 3;302,1023,303;, + 3;1041,271,277;, + 3;206,1042,1038;, + 3;207,1039,1040;, + 3;212,296,209;, + 3;295,281,299;, + 3;1040,299,297;, + 3;1043,1044,304;, + 3;1045,1043,304;, + 3;1045,304,305;, + 3;1046,1045,305;, + 3;1046,305,306;, + 3;1047,1046,306;, + 3;1047,306,307;, + 3;1048,1047,307;, + 3;1048,307,308;, + 3;1049,1048,308;, + 3;1049,308,309;, + 3;1050,1049,309;, + 3;1050,309,310;, + 3;1051,1050,310;, + 3;1051,310,311;, + 3;1052,1051,311;, + 3;1052,311,173;, + 3;1012,1052,173;, + 3;1044,1053,312;, + 3;304,1044,312;, + 3;304,312,313;, + 3;305,304,313;, + 3;305,313,314;, + 3;306,305,314;, + 3;306,314,315;, + 3;307,306,315;, + 3;307,315,316;, + 3;308,307,316;, + 3;308,316,317;, + 3;309,308,317;, + 3;309,317,318;, + 3;310,309,318;, + 3;310,318,319;, + 3;311,310,319;, + 3;311,319,183;, + 3;173,311,183;, + 3;1053,1054,320;, + 3;312,1053,320;, + 3;312,320,321;, + 3;313,312,321;, + 3;313,321,322;, + 3;314,313,322;, + 3;314,322,323;, + 3;315,314,323;, + 3;315,323,324;, + 3;316,315,324;, + 3;316,324,325;, + 3;317,316,325;, + 3;317,325,326;, + 3;318,317,326;, + 3;318,326,327;, + 3;319,318,327;, + 3;319,327,193;, + 3;183,319,193;, + 3;1013,194,328;, + 3;1055,1013,328;, + 3;1055,328,329;, + 3;1056,1055,329;, + 3;1056,329,330;, + 3;1057,1056,330;, + 3;1057,330,331;, + 3;1058,1057,331;, + 3;1058,331,332;, + 3;1059,1058,332;, + 3;1059,332,333;, + 3;1060,1059,333;, + 3;1060,333,334;, + 3;1061,1060,334;, + 3;1061,334,335;, + 3;1062,1061,335;, + 3;1062,335,203;, + 3;1022,1062,203;, + 3;328,194,204;, + 3;329,328,204;, + 3;330,329,204;, + 3;331,330,204;, + 3;332,331,204;, + 3;333,332,204;, + 3;334,333,204;, + 3;335,334,204;, + 3;203,335,204;, + 3;64,218,233;, + 3;336,337,338;, + 3;339,336,338;, + 3;336,340,337;, + 3;341,1063,1064;, + 3;342,341,1064;, + 3;341,1065,1063;, + 3;343,1066,1067;, + 3;344,343,1067;, + 3;343,340,1066;, + 3;345,343,344;, + 3;346,345,344;, + 3;345,340,343;, + 3;347,1068,1069;, + 3;348,1070,346;, + 3;347,1071,1068;, + 3;337,1070,348;, + 3;338,337,348;, + 3;337,340,1070;, + 3;349,350,351;, + 3;352,349,351;, + 3;353,349,352;, + 3;354,353,352;, + 3;355,353,354;, + 3;356,355,354;, + 3;357,355,356;, + 3;358,357,356;, + 3;359,357,358;, + 3;360,359,358;, + 3;1072,359,360;, + 3;1073,1072,360;, + 3;361,350,349;, + 3;362,361,349;, + 3;362,349,353;, + 3;363,362,353;, + 3;363,353,355;, + 3;364,363,355;, + 3;364,355,357;, + 3;365,364,357;, + 3;365,357,359;, + 3;366,365,359;, + 3;366,359,1072;, + 3;1074,366,1072;, + 3;367,361,362;, + 3;368,367,362;, + 3;368,362,363;, + 3;369,368,363;, + 3;369,363,364;, + 3;370,369,364;, + 3;370,364,365;, + 3;371,370,365;, + 3;371,365,366;, + 3;372,371,366;, + 3;372,366,1074;, + 3;1075,372,1074;, + 3;373,367,368;, + 3;373,368,369;, + 3;373,369,370;, + 3;373,370,371;, + 3;373,371,372;, + 3;373,372,1075;, + 3;374,375,376;, + 3;374,376,377;, + 3;377,376,378;, + 3;377,378,379;, + 3;379,378,380;, + 3;379,380,381;, + 3;381,380,382;, + 3;381,382,383;, + 3;383,382,384;, + 3;383,384,385;, + 3;385,384,1076;, + 3;385,1076,1077;, + 3;376,375,386;, + 3;376,386,387;, + 3;378,376,387;, + 3;378,387,388;, + 3;380,378,388;, + 3;380,388,389;, + 3;382,380,389;, + 3;382,389,390;, + 3;384,382,390;, + 3;384,390,391;, + 3;1076,384,391;, + 3;1076,391,1078;, + 3;387,386,392;, + 3;387,392,393;, + 3;388,387,393;, + 3;388,393,394;, + 3;389,388,394;, + 3;389,394,395;, + 3;390,389,395;, + 3;390,395,396;, + 3;391,390,396;, + 3;391,396,397;, + 3;1078,391,397;, + 3;1078,397,1079;, + 3;393,392,398;, + 3;394,393,398;, + 3;395,394,398;, + 3;396,395,398;, + 3;397,396,398;, + 3;1079,397,398;, + 3;399,400,401;, + 3;402,399,401;, + 3;403,404,405;, + 3;406,1080,1081;, + 3;407,406,1081;, + 3;408,404,403;, + 3;409,1082,1083;, + 3;410,409,1083;, + 3;411,1084,1085;, + 3;412,409,410;, + 3;413,412,410;, + 3;414,1084,411;, + 3;415,416,412;, + 3;413,415,412;, + 3;417,418,400;, + 3;399,417,400;, + 3;419,420,1082;, + 3;409,419,1082;, + 3;421,419,409;, + 3;412,421,409;, + 3;416,422,421;, + 3;412,416,421;, + 3;423,424,418;, + 3;417,423,418;, + 3;425,426,1086;, + 3;419,1087,420;, + 3;427,1087,419;, + 3;421,427,419;, + 3;428,429,424;, + 3;405,428,424;, + 3;405,424,423;, + 3;403,405,423;, + 3;403,423,1088;, + 3;408,403,1088;, + 3;1085,1089,1087;, + 3;411,1085,1087;, + 3;411,1087,427;, + 3;414,411,427;, + 3;401,400,430;, + 3;431,401,430;, + 3;404,428,405;, + 3;432,1084,414;, + 3;400,418,433;, + 3;430,400,433;, + 3;418,424,429;, + 3;433,418,429;, + 3;434,432,414;, + 3;427,434,414;, + 3;422,434,427;, + 3;421,422,427;, + 3;435,1090,1091;, + 3;436,426,1090;, + 3;435,436,1090;, + 3;437,438,439;, + 3;437,439,440;, + 3;441,1092,442;, + 3;1093,1094,443;, + 3;1093,443,444;, + 3;442,1092,445;, + 3;1095,1096,446;, + 3;1095,446,447;, + 3;1097,1084,448;, + 3;447,446,449;, + 3;447,449,450;, + 3;448,1084,451;, + 3;449,416,415;, + 3;449,415,450;, + 3;438,452,453;, + 3;438,453,439;, + 3;1096,454,455;, + 3;1096,455,446;, + 3;446,455,456;, + 3;446,456,449;, + 3;456,422,416;, + 3;456,416,449;, + 3;452,457,458;, + 3;452,458,453;, + 3;1098,459,460;, + 3;454,1099,455;, + 3;455,1099,461;, + 3;455,461,456;, + 3;457,1100,1101;, + 3;457,1101,441;, + 3;458,457,441;, + 3;458,441,442;, + 3;1102,458,442;, + 3;1102,442,445;, + 3;1099,1103,1097;, + 3;1099,1097,448;, + 3;461,1099,448;, + 3;461,448,451;, + 3;1104,438,437;, + 3;1104,437,1105;, + 3;441,1101,1092;, + 3;451,1084,432;, + 3;1106,452,438;, + 3;1106,438,1104;, + 3;1100,457,452;, + 3;1100,452,1106;, + 3;451,432,434;, + 3;451,434,461;, + 3;461,434,422;, + 3;461,422,456;, + 3;1107,1108,462;, + 3;1108,459,463;, + 3;1108,463,462;, + 3;463,459,1098;, + 3;464,465,466;, + 3;467,1109,1110;, + 3;468,464,1111;, + 3;469,470,471;, + 3;472,469,471;, + 3;1112,473,1113;, + 3;474,475,476;, + 3;477,474,476;, + 3;1114,1115,478;, + 3;468,1114,478;, + 3;479,465,480;, + 3;481,482,475;, + 3;474,481,475;, + 3;483,484,485;, + 3;486,483,485;, + 3;478,487,464;, + 3;468,478,464;, + 3;488,466,465;, + 3;479,488,465;, + 3;484,489,485;, + 3;1116,1117,1118;, + 3;487,490,464;, + 3;490,489,465;, + 3;464,490,465;, + 3;480,465,489;, + 3;484,480,489;, + 3;483,486,490;, + 3;487,483,490;, + 3;491,492,493;, + 3;494,491,493;, + 3;495,496,485;, + 3;489,495,485;, + 3;496,497,486;, + 3;485,496,486;, + 3;486,497,490;, + 3;490,495,489;, + 3;493,492,496;, + 3;495,493,496;, + 3;492,491,497;, + 3;496,492,497;, + 3;491,494,490;, + 3;497,491,490;, + 3;494,493,495;, + 3;490,494,495;, + 3;498,488,1112;, + 3;499,498,1112;, + 3;500,1114,468;, + 3;501,500,468;, + 3;1119,472,471;, + 3;1120,1119,471;, + 3;502,466,488;, + 3;498,502,488;, + 3;503,467,1110;, + 3;1121,503,1110;, + 3;501,468,1111;, + 3;1122,501,1111;, + 3;475,498,499;, + 3;476,475,499;, + 3;477,500,501;, + 3;474,477,501;, + 3;1123,1119,1120;, + 3;1124,1123,1120;, + 3;482,502,498;, + 3;475,482,498;, + 3;1125,503,1121;, + 3;1126,1125,1121;, + 3;474,501,1122;, + 3;481,474,1122;, + 3;504,505,506;, + 3;507,508,506;, + 3;509,510,511;, + 3;512,509,513;, + 3;507,512,514;, + 3;1127,515,516;, + 3;517,518,515;, + 3;1128,519,518;, + 3;1128,1129,519;, + 3;1130,1131,516;, + 3;1132,520,521;, + 3;1133,522,520;, + 3;1134,521,523;, + 3;1135,524,522;, + 3;1136,523,525;, + 3;1130,516,524;, + 3;1137,525,519;, + 3;1138,526,527;, + 3;1139,528,1140;, + 3;529,1141,1142;, + 3;1143,530,1144;, + 3;1138,527,1145;, + 3;1146,531,532;, + 3;533,534,1146;, + 3;1147,535,1148;, + 3;530,1147,1144;, + 3;1149,536,529;, + 3;537,536,1149;, + 3;538,537,1150;, + 3;1151,539,1152;, + 3;535,540,1153;, + 3;1154,1155,531;, + 3;541,542,543;, + 3;544,541,543;, + 3;545,541,544;, + 3;546,545,544;, + 3;547,545,546;, + 3;548,547,546;, + 3;549,547,548;, + 3;550,549,548;, + 3;551,549,550;, + 3;552,551,550;, + 3;553,551,552;, + 3;554,553,552;, + 3;555,553,554;, + 3;556,555,554;, + 3;1156,555,556;, + 3;1157,1156,556;, + 3;557,558,542;, + 3;541,557,542;, + 3;559,557,541;, + 3;545,559,541;, + 3;560,559,545;, + 3;547,560,545;, + 3;561,560,547;, + 3;549,561,547;, + 3;562,561,549;, + 3;551,562,549;, + 3;563,562,551;, + 3;553,563,551;, + 3;564,563,553;, + 3;555,564,553;, + 3;1158,564,555;, + 3;1156,1158,555;, + 3;565,566,558;, + 3;557,565,558;, + 3;561,567,560;, + 3;568,569,561;, + 3;562,568,561;, + 3;570,568,562;, + 3;563,570,562;, + 3;571,570,563;, + 3;1159,571,564;, + 3;1158,1159,564;, + 3;572,573,574;, + 3;575,572,574;, + 3;436,435,573;, + 3;572,436,573;, + 3;576,1160,1161;, + 3;577,576,1161;, + 3;578,1162,1160;, + 3;576,578,1160;, + 3;579,1163,1162;, + 3;578,579,1162;, + 3;580,1164,1163;, + 3;579,580,1163;, + 3;581,1165,1164;, + 3;580,581,1164;, + 3;582,576,577;, + 3;583,582,577;, + 3;584,578,576;, + 3;582,584,576;, + 3;585,579,578;, + 3;584,585,578;, + 3;586,580,579;, + 3;585,586,579;, + 3;587,581,580;, + 3;586,587,580;, + 3;588,582,583;, + 3;589,588,583;, + 3;590,584,582;, + 3;588,590,582;, + 3;591,585,584;, + 3;590,591,584;, + 3;592,586,585;, + 3;591,592,585;, + 3;593,587,586;, + 3;592,593,586;, + 3;569,1166,1167;, + 3;594,569,1167;, + 3;568,1168,1166;, + 3;569,568,1166;, + 3;570,1169,1168;, + 3;568,570,1168;, + 3;595,1170,1169;, + 3;570,595,1169;, + 3;571,595,570;, + 3;577,1161,1171;, + 3;596,577,1171;, + 3;583,577,596;, + 3;597,583,596;, + 3;589,583,597;, + 3;598,589,597;, + 3;566,565,599;, + 3;599,565,600;, + 3;1172,1173,601;, + 3;602,1172,601;, + 3;1167,1172,602;, + 3;594,1167,602;, + 3;557,559,565;, + 3;602,601,603;, + 3;604,602,603;, + 3;569,594,567;, + 3;561,569,567;, + 3;594,602,604;, + 3;567,594,604;, + 3;560,567,604;, + 3;559,604,565;, + 3;604,603,600;, + 3;605,1174,1175;, + 3;606,605,1175;, + 3;607,1176,1174;, + 3;605,607,1174;, + 3;608,1177,1178;, + 3;1179,608,1178;, + 3;609,1180,1177;, + 3;608,609,1177;, + 3;610,1181,1180;, + 3;609,610,1180;, + 3;611,1182,1181;, + 3;610,611,1181;, + 3;612,1183,1182;, + 3;611,612,1182;, + 3;606,1175,1184;, + 3;1185,606,1184;, + 3;613,605,606;, + 3;614,613,606;, + 3;615,607,605;, + 3;613,615,605;, + 3;616,608,1179;, + 3;1186,616,1179;, + 3;617,609,608;, + 3;616,617,608;, + 3;618,610,609;, + 3;617,618,609;, + 3;619,611,610;, + 3;618,619,610;, + 3;620,612,611;, + 3;619,620,611;, + 3;614,606,1185;, + 3;1187,614,1185;, + 3;621,1188,1189;, + 3;622,621,1189;, + 3;623,1190,1191;, + 3;1192,623,1191;, + 3;624,1193,1190;, + 3;623,624,1190;, + 3;625,1194,1195;, + 3;1196,625,1195;, + 3;626,1197,1194;, + 3;625,626,1194;, + 3;627,1198,1199;, + 3;1200,627,1199;, + 3;628,1201,1198;, + 3;627,628,1198;, + 3;622,1189,1202;, + 3;1203,622,1202;, + 3;1204,621,622;, + 3;1205,623,1192;, + 3;1206,624,623;, + 3;1207,625,1196;, + 3;1208,626,625;, + 3;1209,627,1200;, + 3;1155,628,627;, + 3;1210,622,1203;, + 3;564,571,563;, + 3;565,604,600;, + 3;533,1211,1212;, + 3;1213,1214,539;, + 3;1151,1213,539;, + 3;531,534,1154;, + 3;1140,528,526;, + 3;1138,1140,526;, + 3;534,533,1154;, + 3;1211,533,1215;, + 3;531,1146,534;, + 3;1216,504,506;, + 3;505,507,506;, + 3;513,509,511;, + 3;514,512,513;, + 3;508,507,514;, + 3;1131,1127,516;, + 3;1127,517,515;, + 3;517,1128,518;, + 3;1134,1132,521;, + 3;1132,1133,520;, + 3;1136,1134,523;, + 3;1133,1135,522;, + 3;1137,1136,525;, + 3;1135,1130,524;, + 3;1129,1137,519;, + 3;1149,529,1142;, + 3;1217,1143,1144;, + 3;1215,533,1146;, + 3;1144,1147,1148;, + 3;1150,537,1149;, + 3;1218,538,1150;, + 3;1148,535,1153;, + 3;1210,1204,622;, + 3;1219,1205,1192;, + 3;1205,1206,623;, + 3;1220,1207,1196;, + 3;1207,1208,625;, + 3;1221,1209,1200;, + 3;1209,1155,627;, + 3;1155,1210,1203;, + 3;1154,533,1212;, + 3;604,559,560;, + 3;573,629,574;, + 3;1086,630,1222;, + 3;573,435,1091;, + 3;436,572,1086;, + 3;1091,1223,629;, + 3;573,1091,629;, + 3;572,575,630;, + 3;1086,572,630;, + 3;631,629,1223;, + 3;632,631,1223;, + 3;633,1222,630;, + 3;634,633,630;, + 3;632,1223,1224;, + 3;1225,632,1224;, + 3;635,574,629;, + 3;631,635,629;, + 3;636,575,574;, + 3;635,636,574;, + 3;634,630,575;, + 3;636,634,575;, + 3;637,631,632;, + 3;638,637,632;, + 3;639,633,634;, + 3;640,639,634;, + 3;638,632,1225;, + 3;1226,638,1225;, + 3;641,635,631;, + 3;637,641,631;, + 3;642,636,635;, + 3;641,642,635;, + 3;640,634,636;, + 3;642,640,636;, + 3;643,1227,1228;, + 3;644,643,1228;, + 3;645,1229,1230;, + 3;646,645,1230;, + 3;1231,1232,1229;, + 3;645,1231,1229;, + 3;647,1233,1227;, + 3;1234,647,1227;, + 3;648,1235,1233;, + 3;647,648,1233;, + 3;646,1230,1235;, + 3;648,646,1235;, + 3;649,643,644;, + 3;650,649,644;, + 3;651,645,646;, + 3;652,651,646;, + 3;1236,1231,645;, + 3;651,1236,645;, + 3;653,647,1234;, + 3;1237,653,1234;, + 3;654,648,647;, + 3;653,654,647;, + 3;652,646,648;, + 3;654,652,648;, + 3;655,649,650;, + 3;656,655,650;, + 3;657,651,652;, + 3;658,657,652;, + 3;1238,1236,651;, + 3;657,1238,651;, + 3;659,653,1237;, + 3;655,659,1237;, + 3;660,654,653;, + 3;659,660,653;, + 3;658,652,654;, + 3;660,658,654;, + 3;661,655,656;, + 3;662,661,656;, + 3;657,663,664;, + 3;1239,1238,657;, + 3;664,1239,657;, + 3;665,659,655;, + 3;661,665,655;, + 3;666,660,659;, + 3;665,666,659;, + 3;667,658,660;, + 3;666,667,660;, + 3;1240,661,662;, + 3;1241,1240,662;, + 3;1118,663,667;, + 3;1239,1242,1243;, + 3;1244,665,661;, + 3;1240,1244,661;, + 3;1245,666,665;, + 3;1244,1245,665;, + 3;1118,667,666;, + 3;1245,1118,666;, + 3;1086,426,436;, + 3;488,479,473;, + 3;1112,488,473;, + 3;658,667,663;, + 3;657,658,663;, + 3;1117,664,663;, + 3;1118,1117,663;, + 3;664,1117,1242;, + 3;1239,664,1242;, + 3;484,483,480;, + 3;668,669,670;, + 3;668,670,671;, + 3;671,670,672;, + 3;673,674,675;, + 3;673,675,676;, + 3;1246,677,1247;, + 3;678,679,680;, + 3;678,680,681;, + 3;682,1248,1249;, + 3;682,1249,672;, + 3;683,669,684;, + 3;679,685,686;, + 3;679,686,680;, + 3;687,688,689;, + 3;687,689,690;, + 3;670,691,682;, + 3;670,682,672;, + 3;669,668,692;, + 3;669,692,684;, + 3;687,693,688;, + 3;1250,1251,1252;, + 3;670,694,691;, + 3;669,693,694;, + 3;669,694,670;, + 3;693,669,683;, + 3;693,683,688;, + 3;694,690,689;, + 3;694,689,691;, + 3;695,696,697;, + 3;695,697,698;, + 3;687,699,700;, + 3;687,700,693;, + 3;690,701,699;, + 3;690,699,687;, + 3;694,701,690;, + 3;693,700,694;, + 3;699,696,695;, + 3;699,695,700;, + 3;701,697,696;, + 3;701,696,699;, + 3;694,698,697;, + 3;694,697,701;, + 3;700,695,698;, + 3;700,698,694;, + 3;1247,692,702;, + 3;1247,702,703;, + 3;672,1249,704;, + 3;672,704,705;, + 3;673,676,1253;, + 3;673,1253,1254;, + 3;692,668,706;, + 3;692,706,702;, + 3;668,671,707;, + 3;668,707,706;, + 3;671,672,705;, + 3;671,705,707;, + 3;703,702,679;, + 3;703,679,678;, + 3;705,704,681;, + 3;705,681,680;, + 3;1254,1253,1255;, + 3;1254,1255,1256;, + 3;702,706,685;, + 3;702,685,679;, + 3;706,707,686;, + 3;706,686,685;, + 3;707,705,680;, + 3;707,680,686;, + 3;708,709,710;, + 3;708,711,712;, + 3;713,714,715;, + 3;716,715,717;, + 3;718,717,712;, + 3;719,720,1257;, + 3;720,721,722;, + 3;721,723,1258;, + 3;723,1259,1258;, + 3;719,1260,1261;, + 3;724,725,1262;, + 3;725,726,1263;, + 3;727,724,1264;, + 3;726,728,1265;, + 3;729,727,1266;, + 3;728,719,1261;, + 3;723,729,1267;, + 3;730,731,1268;, + 3;1269,732,1270;, + 3;1271,1272,733;, + 3;1273,734,1274;, + 3;1275,730,1268;, + 3;735,736,1276;, + 3;1276,737,738;, + 3;1277,739,1278;, + 3;1273,1278,734;, + 3;733,740,1279;, + 3;1279,740,741;, + 3;1280,741,742;, + 3;1281,743,1282;, + 3;1283,744,739;, + 3;736,1284,1285;, + 3;745,746,747;, + 3;745,747,748;, + 3;748,747,749;, + 3;748,749,750;, + 3;750,749,751;, + 3;750,751,752;, + 3;752,751,753;, + 3;752,753,754;, + 3;754,753,755;, + 3;754,755,756;, + 3;756,755,757;, + 3;756,757,758;, + 3;758,757,759;, + 3;758,759,760;, + 3;760,759,1286;, + 3;760,1286,1287;, + 3;746,761,762;, + 3;746,762,747;, + 3;747,762,763;, + 3;747,763,749;, + 3;749,763,764;, + 3;749,764,751;, + 3;751,764,765;, + 3;751,765,753;, + 3;753,765,766;, + 3;753,766,755;, + 3;755,766,767;, + 3;755,767,757;, + 3;757,767,768;, + 3;757,768,759;, + 3;759,768,1288;, + 3;759,1288,1286;, + 3;761,566,769;, + 3;761,769,762;, + 3;764,770,765;, + 3;765,771,772;, + 3;765,772,766;, + 3;766,772,773;, + 3;766,773,767;, + 3;767,773,571;, + 3;768,571,1159;, + 3;768,1159,1288;, + 3;774,775,776;, + 3;774,776,777;, + 3;775,462,463;, + 3;775,463,776;, + 3;1289,1290,778;, + 3;1289,778,779;, + 3;1290,1291,780;, + 3;1290,780,778;, + 3;1291,1292,781;, + 3;1291,781,780;, + 3;1292,1293,782;, + 3;1292,782,781;, + 3;1293,1165,581;, + 3;1293,581,782;, + 3;779,778,783;, + 3;779,783,784;, + 3;778,780,785;, + 3;778,785,783;, + 3;780,781,786;, + 3;780,786,785;, + 3;781,782,787;, + 3;781,787,786;, + 3;782,581,587;, + 3;782,587,787;, + 3;784,783,788;, + 3;784,788,789;, + 3;783,785,790;, + 3;783,790,788;, + 3;785,786,791;, + 3;785,791,790;, + 3;786,787,792;, + 3;786,792,791;, + 3;787,587,593;, + 3;787,593,792;, + 3;1294,1295,771;, + 3;1294,771,793;, + 3;1295,1296,772;, + 3;1295,772,771;, + 3;1296,1297,773;, + 3;1296,773,772;, + 3;1297,1170,595;, + 3;1297,595,773;, + 3;773,595,571;, + 3;1171,1289,779;, + 3;1171,779,596;, + 3;596,779,784;, + 3;596,784,597;, + 3;597,784,789;, + 3;597,789,598;, + 3;599,769,566;, + 3;600,769,599;, + 3;601,1173,1298;, + 3;601,1298,794;, + 3;794,1298,1294;, + 3;794,1294,793;, + 3;769,763,762;, + 3;603,601,794;, + 3;603,794,795;, + 3;770,793,771;, + 3;770,771,765;, + 3;795,794,793;, + 3;795,793,770;, + 3;795,770,764;, + 3;769,795,763;, + 3;600,603,795;, + 3;1299,1300,796;, + 3;1299,796,797;, + 3;1300,1301,798;, + 3;1300,798,796;, + 3;1302,1303,799;, + 3;1302,799,1304;, + 3;1303,1305,800;, + 3;1303,800,799;, + 3;1305,1306,801;, + 3;1305,801,800;, + 3;1306,1307,802;, + 3;1306,802,801;, + 3;1307,1308,803;, + 3;1307,803,802;, + 3;1309,1299,797;, + 3;1309,797,1310;, + 3;797,796,804;, + 3;797,804,805;, + 3;796,798,806;, + 3;796,806,804;, + 3;1304,799,807;, + 3;1304,807,1311;, + 3;799,800,808;, + 3;799,808,807;, + 3;800,801,809;, + 3;800,809,808;, + 3;801,802,810;, + 3;801,810,809;, + 3;802,803,811;, + 3;802,811,810;, + 3;1310,797,805;, + 3;1310,805,1312;, + 3;1313,1314,812;, + 3;1313,812,813;, + 3;1315,1316,814;, + 3;1315,814,1317;, + 3;1316,1318,815;, + 3;1316,815,814;, + 3;1319,1320,816;, + 3;1319,816,1321;, + 3;1320,1322,817;, + 3;1320,817,816;, + 3;1323,1324,818;, + 3;1323,818,1325;, + 3;1324,1326,819;, + 3;1324,819,818;, + 3;1327,1313,813;, + 3;1327,813,1328;, + 3;813,812,1329;, + 3;1317,814,1330;, + 3;814,815,1331;, + 3;1321,816,1332;, + 3;816,817,1333;, + 3;1325,818,1334;, + 3;818,819,1284;, + 3;1328,813,1335;, + 3;767,571,768;, + 3;600,795,769;, + 3;1336,1337,738;, + 3;743,1338,1339;, + 3;743,1339,1282;, + 3;1285,737,736;, + 3;731,732,1269;, + 3;731,1269,1268;, + 3;1285,738,737;, + 3;1340,738,1337;, + 3;737,1276,736;, + 3;708,710,1341;, + 3;708,712,709;, + 3;713,715,716;, + 3;716,717,718;, + 3;718,712,711;, + 3;719,1257,1260;, + 3;720,722,1257;, + 3;721,1258,722;, + 3;724,1262,1264;, + 3;725,1263,1262;, + 3;727,1264,1266;, + 3;726,1265,1263;, + 3;729,1266,1267;, + 3;728,1261,1265;, + 3;723,1267,1259;, + 3;1271,733,1279;, + 3;1273,1274,1342;, + 3;1276,738,1340;, + 3;1277,1278,1273;, + 3;1279,741,1280;, + 3;1280,742,1343;, + 3;1283,739,1277;, + 3;813,1329,1335;, + 3;1317,1330,1344;, + 3;814,1331,1330;, + 3;1321,1332,1345;, + 3;816,1333,1332;, + 3;1325,1334,1346;, + 3;818,1284,1334;, + 3;1328,1335,1284;, + 3;1336,738,1285;, + 3;764,763,795;, + 3;774,820,775;, + 3;1347,821,1098;, + 3;1107,462,775;, + 3;1098,776,463;, + 3;820,1348,1107;, + 3;820,1107,775;, + 3;821,777,776;, + 3;821,776,1098;, + 3;1348,820,822;, + 3;1348,822,823;, + 3;821,1347,824;, + 3;821,824,825;, + 3;1349,1348,823;, + 3;1349,823,1350;, + 3;820,774,826;, + 3;820,826,822;, + 3;774,777,827;, + 3;774,827,826;, + 3;777,821,825;, + 3;777,825,827;, + 3;823,822,828;, + 3;823,828,829;, + 3;825,824,830;, + 3;825,830,831;, + 3;1350,823,829;, + 3;1350,829,1351;, + 3;822,826,832;, + 3;822,832,828;, + 3;826,827,833;, + 3;826,833,832;, + 3;827,825,831;, + 3;827,831,833;, + 3;1352,1353,834;, + 3;1352,834,835;, + 3;1354,1355,836;, + 3;1354,836,837;, + 3;1355,1356,1357;, + 3;1355,1357,836;, + 3;1353,1358,838;, + 3;1353,838,1359;, + 3;1358,1360,839;, + 3;1358,839,838;, + 3;1360,1354,837;, + 3;1360,837,839;, + 3;835,834,840;, + 3;835,840,841;, + 3;837,836,842;, + 3;837,842,843;, + 3;836,1357,1361;, + 3;836,1361,842;, + 3;1359,838,844;, + 3;1359,844,1362;, + 3;838,839,845;, + 3;838,845,844;, + 3;839,837,843;, + 3;839,843,845;, + 3;841,840,846;, + 3;841,846,847;, + 3;843,842,848;, + 3;843,848,849;, + 3;842,1361,1363;, + 3;842,1363,848;, + 3;1362,844,850;, + 3;1362,850,846;, + 3;844,845,851;, + 3;844,851,850;, + 3;845,843,849;, + 3;845,849,851;, + 3;847,846,852;, + 3;847,852,853;, + 3;854,855,848;, + 3;848,1363,1364;, + 3;848,1364,854;, + 3;846,850,856;, + 3;846,856,852;, + 3;850,851,857;, + 3;850,857,856;, + 3;851,849,858;, + 3;851,858,857;, + 3;853,852,1365;, + 3;853,1365,1366;, + 3;858,855,1250;, + 3;1367,1368,1364;, + 3;852,856,1369;, + 3;852,1369,1365;, + 3;856,857,1370;, + 3;856,1370,1369;, + 3;857,858,1250;, + 3;857,1250,1370;, + 3;677,684,692;, + 3;677,692,1247;, + 3;855,858,849;, + 3;855,849,848;, + 3;855,854,1251;, + 3;855,1251,1250;, + 3;1368,1251,854;, + 3;1368,854,1364;, + 3;683,689,688;, + 3;859,860,861;, + 3;862,859,861;, + 3;862,861,863;, + 3;864,862,863;, + 3;864,863,865;, + 3;866,864,865;, + 3;866,865,867;, + 3;868,866,867;, + 3;868,867,869;, + 3;870,868,869;, + 3;870,869,871;, + 3;872,870,871;, + 3;872,871,873;, + 3;874,872,873;, + 3;875,876,877;, + 3;878,875,877;, + 3;879,880,877;, + 3;880,881,878;, + 3;880,878,877;, + 3;880,863,861;, + 3;879,873,871;, + 3;879,871,869;, + 3;880,879,869;, + 3;880,869,867;, + 3;880,867,865;, + 3;880,865,863;, + 3;880,861,881;, + 3;881,861,860;, + 3;882,883,859;, + 3;862,882,859;, + 3;884,882,862;, + 3;864,884,862;, + 3;885,884,864;, + 3;866,885,864;, + 3;886,885,866;, + 3;868,886,866;, + 3;887,886,868;, + 3;870,887,868;, + 3;888,887,870;, + 3;872,888,870;, + 3;889,888,872;, + 3;874,889,872;, + 3;890,891,892;, + 3;893,890,892;, + 3;890,894,895;, + 3;893,896,894;, + 3;890,893,894;, + 3;882,884,894;, + 3;888,889,895;, + 3;887,888,895;, + 3;894,887,895;, + 3;886,887,894;, + 3;885,886,894;, + 3;884,885,894;, + 3;896,882,894;, + 3;883,882,896;, + 3;1371,1372,1373;, + 3;1374,1375,1376;, + 3;1377,1378,1379;, + 3;1380,1377,1379;, + 3;1381,1382,1378;, + 3;1377,1381,1378;, + 3;1380,1379,1383;, + 3;1384,1380,1383;, + 3;1385,1386,1382;, + 3;1381,1385,1382;, + 3;1384,1383,1387;, + 3;1388,1384,1387;, + 3;1374,1376,1386;, + 3;1385,1374,1386;, + 3;1388,1387,1372;, + 3;1371,1388,1372;, + 3;897,898,899;, + 3;900,901,1389;, + 3;1390,900,1389;, + 3;902,903,904;, + 3;905,897,899;, + 3;906,900,1390;, + 3;1391,906,1390;, + 3;907,903,902;, + 3;908,905,899;, + 3;909,906,1391;, + 3;1392,909,1391;, + 3;910,903,907;, + 3;911,908,899;, + 3;912,909,1392;, + 3;1393,912,1392;, + 3;913,903,910;, + 3;914,911,899;, + 3;915,912,1393;, + 3;1394,915,1393;, + 3;916,903,913;, + 3;917,914,899;, + 3;918,915,1394;, + 3;1395,918,1394;, + 3;919,903,916;, + 3;920,917,899;, + 3;921,1396,1397;, + 3;1398,921,1397;, + 3;922,903,919;, + 3;898,920,899;, + 3;901,921,1398;, + 3;1389,901,1398;, + 3;904,903,922;, + 3;923,924,925;, + 3;926,923,925;, + 3;927,923,926;, + 3;928,927,926;, + 3;929,927,928;, + 3;930,929,928;, + 3;931,929,930;, + 3;932,931,930;, + 3;933,931,932;, + 3;934,933,932;, + 3;935,933,934;, + 3;936,935,934;, + 3;937,1399,1400;, + 3;938,937,1400;, + 3;924,937,938;, + 3;925,924,938;, + 3;939,940,941;, + 3;942,939,941;, + 3;943,939,942;, + 3;944,943,942;, + 3;945,943,944;, + 3;946,945,944;, + 3;947,945,946;, + 3;948,947,946;, + 3;949,947,948;, + 3;950,949,948;, + 3;951,949,950;, + 3;952,951,950;, + 3;953,1401,1402;, + 3;954,953,1402;, + 3;940,953,954;, + 3;941,940,954;, + 3;1403,1404,955;, + 3;956,1403,955;, + 3;1405,1403,956;, + 3;957,1405,956;, + 3;1406,1405,957;, + 3;958,1406,957;, + 3;1407,1406,958;, + 3;959,1407,958;, + 3;1408,1407,959;, + 3;960,1408,959;, + 3;1409,1408,960;, + 3;961,1409,960;, + 3;1410,1411,1412;, + 3;962,1410,1412;, + 3;1404,1410,962;, + 3;955,1404,962;, + 3;963,964,965;, + 3;966,963,965;, + 3;967,963,966;, + 3;968,967,966;, + 3;969,967,968;, + 3;970,969,968;, + 3;971,969,970;, + 3;972,971,970;, + 3;973,971,972;, + 3;974,973,972;, + 3;975,973,974;, + 3;976,975,974;, + 3;977,1413,1414;, + 3;978,977,1414;, + 3;964,977,978;, + 3;965,964,978;, + 3;1415,1416,1417;, + 3;1418,1415,1417;, + 3;1419,1420,1421;, + 3;1422,1419,1421;, + 3;1423,1424,1416;, + 3;1415,1423,1416;, + 3;1422,1421,1425;, + 3;1426,1422,1425;, + 3;1427,1428,1424;, + 3;1423,1427,1424;, + 3;1426,1425,1429;, + 3;1430,1426,1429;, + 3;1431,1432,1428;, + 3;1427,1431,1428;, + 3;1430,1429,1433;, + 3;1434,1430,1433;, + 3;1435,1436,1432;, + 3;1431,1435,1432;, + 3;1434,1433,1437;, + 3;1438,1434,1437;, + 3;1439,1440,1436;, + 3;1435,1439,1436;, + 3;1438,1437,1441;, + 3;1442,1438,1441;, + 3;1443,1444,1440;, + 3;1439,1443,1440;, + 3;1442,1441,1445;, + 3;1446,1442,1445;, + 3;1418,1417,1444;, + 3;1443,1418,1444;, + 3;1446,1445,1420;, + 3;1419,1446,1420;, + 3;1447,1448,1449;, + 3;1450,1447,1449;, + 3;1451,1452,1453;, + 3;1454,1451,1453;, + 3;1455,1456,1448;, + 3;1447,1455,1448;, + 3;1454,1453,1457;, + 3;1458,1454,1457;, + 3;1459,1460,1456;, + 3;1455,1459,1456;, + 3;1458,1457,1461;, + 3;1462,1458,1461;, + 3;1463,1464,1460;, + 3;1459,1463,1460;, + 3;1462,1461,1465;, + 3;1466,1462,1465;, + 3;1467,1468,1464;, + 3;1463,1467,1464;, + 3;1466,1465,1469;, + 3;1470,1466,1469;, + 3;1471,1472,1468;, + 3;1467,1471,1468;, + 3;1470,1469,1473;, + 3;1474,1470,1473;, + 3;1475,1476,1472;, + 3;1471,1475,1472;, + 3;1474,1473,1477;, + 3;1478,1474,1477;, + 3;1450,1449,1476;, + 3;1475,1450,1476;, + 3;1478,1477,1452;, + 3;1451,1478,1452;; + + MeshNormals + { + 979; + -0.129816;-0.852990;-0.505525;, + 0.036964;-0.991876;-0.121718;, + -0.698699;-0.688078;-0.195877;, + -0.708337;-0.651960;-0.270567;, + -0.006954;-0.960460;0.278330;, + -0.700324;-0.650018;0.294997;, + 0.302430;-0.952051;0.046201;, + -0.276584;-0.929242;-0.244971;, + 0.094428;0.853934;0.511742;, + 0.336283;-0.009104;0.941717;, + 0.556489;-0.055914;0.828972;, + 0.759730;0.498962;0.416950;, + 0.034747;0.947415;-0.318114;, + 0.731470;0.541587;-0.414288;, + 0.105400;0.061590;-0.992521;, + 0.621131;-0.303408;-0.722592;, + 0.541167;-0.749736;0.380833;, + -0.709843;0.544304;0.447052;, + -0.207902;-0.308447;0.928244;, + 0.546967;-0.813260;-0.198582;, + -0.735620;0.642658;-0.214135;, + 0.607416;-0.793959;-0.025956;, + -0.702457;0.230287;-0.673440;, + 0.609483;-0.790811;-0.056108;, + 0.698700;-0.688078;-0.195877;, + -0.036964;-0.991876;-0.121718;, + 0.129816;-0.852990;-0.505525;, + 0.708337;-0.651961;-0.270567;, + 0.006954;-0.960460;0.278330;, + 0.700323;-0.650018;0.294997;, + -0.302430;-0.952051;0.046201;, + 0.276584;-0.929242;-0.244970;, + -0.556488;-0.055914;0.828972;, + -0.336283;-0.009104;0.941717;, + -0.094428;0.853934;0.511742;, + -0.759730;0.498962;0.416950;, + -0.034747;0.947415;-0.318114;, + -0.731472;0.541585;-0.414288;, + -0.105400;0.061590;-0.992521;, + -0.621131;-0.303409;-0.722592;, + -0.541168;-0.749736;0.380833;, + 0.709843;0.544305;0.447052;, + 0.207903;-0.308447;0.928244;, + -0.546967;-0.813260;-0.198581;, + 0.735620;0.642658;-0.214134;, + -0.607415;-0.793960;-0.025956;, + 0.702458;0.230287;-0.673439;, + -0.609482;-0.790812;-0.056107;, + 0.715168;-0.546642;0.435566;, + 0.174589;-0.765639;0.619125;, + 0.311507;-0.029519;0.949785;, + 0.802549;-0.063801;0.593165;, + 0.674954;-0.705769;0.215238;, + 0.965425;-0.079199;0.248359;, + 0.989682;-0.086167;0.114472;, + 0.589572;-0.802548;0.091222;, + 0.222087;-0.142281;-0.964590;, + 0.239432;-0.628781;-0.739802;, + 0.451846;-0.276668;-0.848110;, + 0.400719;-0.107309;-0.909895;, + 0.345620;-0.589510;-0.730086;, + 0.552622;-0.313025;-0.772414;, + 0.714052;-0.151501;-0.683504;, + -0.111976;0.059755;-0.991913;, + 0.000000;-0.303073;-0.952967;, + 0.408905;-0.168156;-0.896951;, + -0.008987;0.245821;-0.969274;, + 0.637596;0.116274;-0.761545;, + 0.862761;-0.168404;-0.476742;, + 0.607110;0.434795;-0.665110;, + 0.093622;-0.452750;-0.886709;, + 0.454447;-0.542535;-0.706493;, + 0.433850;-0.537110;-0.723386;, + 0.668027;-0.011998;-0.744040;, + 0.770806;0.495623;-0.400270;, + 0.695970;-0.572016;-0.434078;, + 0.452755;-0.608582;-0.651645;, + 0.678173;0.659980;-0.323276;, + 0.561443;-0.626268;-0.540898;, + 0.695491;-0.680703;-0.230080;, + 0.320057;-0.465858;-0.824948;, + 0.015522;-0.721373;-0.692373;, + 0.025936;-0.639799;-0.768104;, + 0.267999;-0.896130;-0.353734;, + 0.429871;0.677744;-0.596552;, + 0.870887;0.286101;-0.399627;, + 0.899576;0.029925;-0.435739;, + 0.877351;-0.421108;0.230049;, + 0.727191;0.647472;0.227974;, + 0.251564;-0.085554;-0.964052;, + 0.443688;0.461641;-0.768133;, + 0.574683;-0.083305;-0.814125;, + 0.736077;0.391009;-0.552541;, + 0.899391;-0.211232;-0.382723;, + 0.958834;0.021238;-0.283171;, + 0.746330;-0.655766;-0.113851;, + 0.972458;-0.091984;-0.214160;, + 0.939346;-0.154664;-0.306116;, + 0.394895;-0.519206;-0.757947;, + 0.079536;-0.698997;-0.710688;, + 0.793478;0.264078;-0.548321;, + 0.593612;0.315377;-0.740379;, + 0.122186;-0.410372;-0.903696;, + -0.025452;0.456614;-0.889301;, + 0.117224;0.694033;-0.710336;, + 0.364145;0.733069;-0.574464;, + 0.345959;-0.296498;-0.890169;, + -0.135622;-0.348879;-0.927303;, + 0.466699;0.709807;-0.527604;, + 0.226468;-0.163193;-0.960250;, + 0.506498;0.620402;-0.598799;, + 0.485375;0.342365;-0.804486;, + 0.470753;0.400109;-0.786323;, + -0.507537;-0.402332;-0.761929;, + 0.800830;0.191458;-0.567463;, + 0.889577;0.287018;-0.355350;, + 0.266019;0.013318;-0.963876;, + -0.642198;0.006037;-0.766515;, + 0.425486;0.746189;-0.512018;, + 0.409779;0.681736;-0.606067;, + -0.058171;0.604638;-0.794374;, + 0.508624;0.701385;-0.499359;, + 0.286727;-0.054946;-0.956435;, + -0.316097;0.145690;-0.937474;, + -0.114483;-0.612880;-0.781838;, + -0.732130;-0.218041;-0.645325;, + -0.077040;0.341658;-0.936662;, + 0.982790;0.168633;-0.075412;, + 0.736791;0.340065;-0.584375;, + -0.327315;-0.220940;-0.918722;, + -0.356933;-0.916762;-0.179292;, + 0.858059;0.295560;-0.419974;, + 0.982755;-0.116030;0.143980;, + 0.686546;-0.436660;0.581362;, + -0.114684;-0.032216;-0.992880;, + -0.610499;-0.792017;0.000055;, + 0.997650;0.023444;-0.064385;, + 0.994914;-0.019735;0.098779;, + 0.607825;0.764607;-0.214302;, + 0.169187;0.272448;0.947179;, + -0.308242;0.468162;-0.828137;, + -0.945384;-0.259556;0.197182;, + 0.724385;0.622190;-0.296892;, + 0.338665;0.069750;0.938318;, + -0.281176;0.325935;-0.902611;, + -0.944702;-0.225837;0.237773;, + 0.943751;0.081290;-0.320510;, + 0.309733;-0.452451;0.836274;, + 0.122451;-0.025404;-0.992149;, + -0.820495;-0.556147;-0.132241;, + 0.521386;-0.621684;-0.584522;, + 0.000004;-0.667404;0.744696;, + 0.000000;0.082569;0.996585;, + 0.955176;-0.093355;0.280935;, + 0.907373;-0.032566;0.419063;, + 0.017997;0.304606;0.952308;, + 0.611072;0.197838;0.766453;, + 0.839507;0.190096;0.509010;, + 0.969844;0.099854;0.222331;, + 0.141318;0.262440;0.954544;, + 0.596370;0.185083;0.781081;, + 0.866160;0.114817;0.486400;, + 0.988906;0.103392;0.106655;, + 0.988842;0.100552;0.109915;, + 0.000104;-0.599228;0.800578;, + 0.173663;-0.620057;0.765095;, + 0.570753;-0.654192;0.496260;, + 0.741579;-0.628361;0.234997;, + 0.750948;-0.640212;0.161879;, + 0.775887;-0.622672;-0.101386;, + 0.726861;-0.637107;-0.256451;, + 0.518488;-0.628231;-0.580083;, + 0.282637;-0.599455;-0.748846;, + 0.039464;-0.606899;-0.793799;, + 0.000173;0.124733;0.992190;, + 0.273998;0.111428;0.955253;, + 0.810070;0.159410;0.564247;, + 0.923389;0.204059;0.325134;, + 0.963267;0.228823;0.140559;, + 0.961478;0.230312;-0.150056;, + 0.893601;0.214711;-0.394178;, + 0.628384;0.178155;-0.757228;, + 0.365227;0.121643;-0.922937;, + -0.008183;0.142392;-0.989776;, + 0.000103;0.483720;0.875223;, + 0.277107;0.511871;0.813142;, + 0.698315;0.579992;0.419483;, + 0.784868;0.562838;0.259223;, + 0.803441;0.586284;0.103699;, + 0.816344;0.565091;-0.119395;, + 0.765667;0.558811;-0.318567;, + 0.582400;0.519613;-0.625150;, + 0.339503;0.496872;-0.798658;, + -0.010072;0.503689;-0.863826;, + -0.000170;0.838829;0.544394;, + 0.209122;0.860779;0.464035;, + 0.472183;0.850685;0.231037;, + 0.524210;0.831400;0.184332;, + 0.548334;0.835391;0.038098;, + 0.560725;0.823931;-0.082001;, + 0.493044;0.839080;-0.229897;, + 0.356599;0.845126;-0.398246;, + 0.193906;0.838344;-0.509490;, + -0.030005;0.838012;-0.544826;, + 0.000000;0.999889;-0.014920;, + -0.247610;-0.617187;0.746839;, + -0.640144;-0.698513;0.319837;, + -0.845216;-0.109792;0.523025;, + -0.332309;0.120583;0.935431;, + -0.951232;-0.100313;0.291711;, + -0.607708;-0.765854;0.210140;, + -0.794975;-0.601716;0.077149;, + -0.992358;-0.084286;0.090118;, + -0.540786;-0.310747;-0.781657;, + -0.243635;-0.604159;-0.758705;, + -0.239575;-0.129408;-0.962215;, + -0.457699;-0.311417;-0.832785;, + -0.601820;-0.346641;-0.719481;, + -0.372432;-0.542919;-0.752685;, + -0.727575;-0.138985;-0.671802;, + -0.462077;-0.172950;-0.869812;, + -0.526055;0.267394;-0.807321;, + -0.889688;-0.200487;-0.410196;, + -0.661906;0.183020;-0.726900;, + -0.482780;-0.428287;-0.763868;, + -0.368326;-0.722170;-0.585497;, + -0.844542;0.459938;-0.274236;, + -0.681525;0.387393;-0.620847;, + -0.605303;-0.397304;-0.689752;, + -0.673388;-0.491201;-0.552514;, + -0.657816;0.645924;-0.387376;, + -0.662135;-0.671377;-0.332913;, + -0.486791;-0.582794;-0.650681;, + -0.258785;-0.568614;-0.780839;, + -0.513083;0.131989;-0.848130;, + -0.297505;-0.905023;-0.304014;, + -0.895981;0.262607;-0.358127;, + -0.675033;0.466963;-0.571206;, + -0.901019;0.266881;0.341965;, + -0.680425;-0.732688;-0.013786;, + -0.259518;-0.023921;-0.965442;, + -0.514018;0.532502;-0.672478;, + -0.645404;-0.118674;-0.754566;, + -0.641496;0.340399;-0.687468;, + -0.875472;-0.233593;-0.423064;, + -0.941780;-0.006383;-0.336169;, + -0.729762;-0.674587;-0.111267;, + -0.974729;-0.092161;-0.203496;, + -0.948685;-0.159768;-0.272894;, + -0.413516;-0.551069;-0.724795;, + -0.452430;-0.424111;-0.784497;, + -0.633631;0.387785;-0.669429;, + -0.759347;0.388122;-0.522258;, + -0.349670;0.699505;-0.623236;, + -0.367983;-0.326177;-0.870745;, + -0.426287;0.691018;-0.583758;, + 0.024608;-0.361630;-0.931997;, + -0.506095;0.593595;-0.625710;, + 0.205299;-0.327376;-0.922321;, + -0.019213;0.001677;-0.999814;, + -0.592122;0.499030;-0.632740;, + -0.705863;0.322617;-0.630616;, + -0.858342;0.333085;-0.390262;, + 0.520378;-0.115323;-0.846113;, + -0.098311;0.739985;-0.665400;, + -0.505485;0.718564;-0.477651;, + -0.429291;0.753222;-0.498363;, + -0.436628;0.579844;-0.687850;, + -0.018955;0.315468;-0.948747;, + 0.628680;-0.297343;-0.718574;, + 0.340473;0.081313;-0.936732;, + -0.987372;0.150062;-0.050767;, + -0.879193;0.307819;-0.363685;, + -0.071334;0.098893;-0.992538;, + 0.552973;-0.594293;-0.583984;, + -0.838304;0.391818;-0.379111;, + -0.660024;-0.355125;0.662008;, + -0.878202;-0.379715;0.290821;, + 0.063977;0.037528;-0.997245;, + 0.565936;-0.819042;-0.094270;, + -0.991440;0.023648;-0.128400;, + -0.999073;0.010052;0.041867;, + -0.576121;0.786004;-0.224237;, + -0.253102;0.252826;0.933819;, + 0.335569;0.443367;-0.831155;, + 0.943943;-0.232201;0.234638;, + -0.746213;0.592914;-0.302686;, + -0.189845;0.217076;0.957516;, + 0.237934;0.300377;-0.923667;, + 0.932614;-0.306696;0.190181;, + -0.854338;0.099672;-0.510071;, + -0.759448;-0.294301;0.580194;, + 0.213648;-0.150954;-0.965177;, + 0.739086;-0.584441;0.334935;, + -0.521385;-0.621686;-0.584521;, + -0.921296;-0.000592;0.388863;, + -0.962588;-0.092104;0.254837;, + -0.643832;0.151144;0.750091;, + -0.980272;0.070344;0.184714;, + -0.849418;0.188211;0.493017;, + -0.517473;0.220460;0.826812;, + -0.775120;0.146862;0.614508;, + -0.979260;0.103055;0.174438;, + -0.988842;0.100551;0.109916;, + -0.257131;-0.613480;0.746677;, + -0.655025;-0.643192;0.396543;, + -0.729698;-0.628342;0.269680;, + -0.767211;-0.638569;0.060144;, + -0.773397;-0.623118;-0.116540;, + -0.694093;-0.641310;-0.327041;, + -0.455929;-0.638307;-0.620236;, + -0.253991;-0.603628;-0.755726;, + -0.290181;0.120439;0.949363;, + -0.790874;0.202403;0.577539;, + -0.923458;0.210735;0.320651;, + -0.959298;0.234558;0.157257;, + -0.963277;0.224319;-0.147576;, + -0.900844;0.202218;-0.384172;, + -0.646321;0.146493;-0.748871;, + -0.336180;0.122826;-0.933754;, + -0.268545;0.501480;0.822436;, + -0.701566;0.531626;0.474529;, + -0.791663;0.556265;0.252664;, + -0.805765;0.578042;0.128881;, + -0.812528;0.571712;-0.113773;, + -0.760729;0.577526;-0.296236;, + -0.589180;0.554444;-0.587757;, + -0.331045;0.502521;-0.798675;, + -0.118111;0.855986;0.503326;, + -0.413323;0.856582;0.308919;, + -0.532739;0.831452;0.157727;, + -0.535078;0.837140;0.113529;, + -0.562623;0.823042;-0.077821;, + -0.522170;0.835158;-0.172769;, + -0.396124;0.843506;-0.362744;, + -0.243647;0.844427;-0.477053;, + -0.585560;-0.168913;0.792836;, + -0.979025;-0.171040;-0.110706;, + -0.868505;-0.466650;0.167143;, + -0.289501;-0.466650;0.835720;, + 0.000148;0.999994;-0.003359;, + 0.394045;-0.169028;0.903414;, + 0.579005;-0.466650;0.668574;, + 0.979037;-0.171271;0.110238;, + 0.868506;-0.466648;-0.167143;, + 0.584817;-0.173401;-0.792415;, + 0.289503;-0.466649;-0.835719;, + -0.393644;-0.173286;-0.902783;, + -0.579003;-0.466649;-0.668576;, + -0.130098;0.890443;0.436104;, + -0.236889;0.850100;-0.470334;, + -0.175642;0.968564;-0.176161;, + -0.060805;0.637960;0.767665;, + 0.235836;0.103418;0.966274;, + 0.172266;-0.360525;0.916704;, + 0.503507;-0.734161;0.455509;, + 0.250506;-0.953163;0.169488;, + 0.379678;-0.782095;-0.494138;, + 0.086510;-0.635228;-0.767464;, + -0.026852;0.043388;-0.998697;, + -0.120815;0.369417;-0.921377;, + -0.615710;0.743650;-0.260549;, + -0.318016;0.682023;0.658567;, + 0.454590;0.074146;0.887610;, + 0.872061;-0.456119;0.177383;, + 0.544687;-0.374159;-0.750547;, + -0.205593;0.244510;-0.947600;, + -0.947918;0.318514;-0.000749;, + -0.382719;0.448240;0.807841;, + 0.611759;0.246959;0.751507;, + 0.993888;-0.069640;-0.085659;, + 0.432662;-0.176959;-0.884019;, + -0.548317;0.022330;-0.835973;, + -0.007283;0.942541;-0.334010;, + 0.175641;0.968564;-0.176163;, + 0.236889;0.850100;-0.470334;, + 0.130099;0.890443;0.436103;, + 0.060805;0.637960;0.767665;, + -0.235836;0.103418;0.966274;, + -0.172267;-0.360525;0.916704;, + -0.503507;-0.734161;0.455508;, + -0.250507;-0.953164;0.169486;, + -0.379678;-0.782095;-0.494138;, + -0.086509;-0.635227;-0.767465;, + 0.026852;0.043389;-0.998697;, + 0.120815;0.369418;-0.921376;, + 0.615711;0.743650;-0.260548;, + 0.318016;0.682023;0.658567;, + -0.454590;0.074146;0.887609;, + -0.872061;-0.456119;0.177385;, + -0.544687;-0.374159;-0.750547;, + 0.205595;0.244511;-0.947600;, + 0.947918;0.318513;-0.000749;, + 0.382720;0.448240;0.807841;, + -0.611758;0.246959;0.751507;, + -0.993888;-0.069640;-0.085659;, + -0.432660;-0.176959;-0.884020;, + 0.548319;0.022332;-0.835971;, + 0.007296;0.942541;-0.334010;, + 0.326102;-0.301915;0.895826;, + 0.290390;0.081714;0.953413;, + 0.282586;0.359266;0.889423;, + 0.732955;0.505070;0.455721;, + 0.196255;0.976233;0.091942;, + 0.000000;0.983658;-0.180048;, + 0.092154;0.912052;0.399586;, + 0.685876;-0.491759;-0.536421;, + 0.803250;0.595471;-0.014278;, + 0.173689;0.943714;-0.281490;, + 0.755928;0.238778;-0.609556;, + 0.573852;0.647817;-0.501026;, + 0.218078;0.832084;-0.509980;, + 0.273387;0.254330;-0.927672;, + 0.177185;0.758963;-0.626563;, + 0.152142;0.771846;-0.617338;, + 0.000000;0.507928;-0.861399;, + -0.000000;0.336033;-0.941850;, + 0.302092;0.176073;0.936877;, + 0.240533;0.336563;0.910422;, + 0.663467;0.421496;-0.618184;, + 0.427727;0.228952;-0.874432;, + 0.230252;0.500003;-0.834854;, + 0.000000;0.578617;-0.815600;, + 0.307879;0.805978;0.505580;, + 0.145346;0.598582;0.787765;, + 0.405591;0.657823;-0.634638;, + 0.402621;0.826286;-0.393887;, + 0.226398;0.640557;-0.733779;, + 0.000000;0.846676;0.532109;, + 0.000000;0.512865;0.858469;, + 0.000000;0.063273;0.997996;, + 0.000000;0.457798;0.889057;, + -0.000000;0.804821;-0.593518;, + -0.000000;0.248350;0.968670;, + 0.000000;0.609069;-0.793118;, + 0.227767;0.807947;0.543456;, + 0.281507;0.877647;-0.387930;, + -0.282586;0.359266;0.889423;, + -0.290390;0.081714;0.953413;, + -0.326102;-0.301915;0.895826;, + -0.732955;0.505070;0.455721;, + -0.092154;0.912052;0.399586;, + -0.196255;0.976233;0.091942;, + -0.685876;-0.491759;-0.536421;, + -0.803250;0.595471;-0.014278;, + -0.173689;0.943714;-0.281490;, + -0.755928;0.238778;-0.609556;, + -0.573852;0.647817;-0.501026;, + -0.218077;0.832084;-0.509980;, + -0.273387;0.254330;-0.927672;, + -0.177185;0.758963;-0.626563;, + -0.152141;0.771846;-0.617338;, + -0.240533;0.336564;0.910422;, + -0.302092;0.176073;0.936877;, + -0.427727;0.228952;-0.874432;, + -0.663467;0.421497;-0.618184;, + -0.230252;0.500003;-0.834854;, + -0.145346;0.598582;0.787765;, + -0.307879;0.805978;0.505580;, + -0.402622;0.826286;-0.393887;, + -0.405591;0.657823;-0.634638;, + -0.226397;0.640557;-0.733779;, + -0.227767;0.807947;0.543456;, + -0.281507;0.877647;-0.387931;, + -0.519282;-0.801856;-0.295590;, + 0.628811;0.048486;-0.776045;, + 0.075597;0.061964;-0.995211;, + -0.768733;-0.464430;-0.439722;, + -0.776444;-0.621408;0.104819;, + -0.008636;0.241742;0.970302;, + -0.519681;-0.462756;0.718184;, + -0.392286;-0.395655;0.830403;, + 0.606488;0.362636;0.707578;, + 0.634201;0.590890;0.498637;, + -0.532226;-0.846074;0.029908;, + 0.733299;-0.679627;0.019472;, + 0.395655;-0.688028;0.608338;, + -0.626298;-0.623654;0.467767;, + -0.615564;-0.788001;-0.011651;, + 0.737398;0.614678;-0.280025;, + -0.020657;0.352402;-0.935621;, + -0.283460;-0.739558;-0.610496;, + 0.671011;-0.430239;-0.603853;, + -0.978692;0.134618;-0.155050;, + -0.093467;0.573633;-0.813763;, + -0.077464;0.247205;-0.965862;, + -0.990913;0.025340;-0.132096;, + -0.772378;-0.597866;-0.214449;, + 0.872971;0.472486;-0.121157;, + 0.815150;0.020096;-0.578901;, + -0.017212;-0.667549;0.744367;, + -0.025443;-0.997470;0.066387;, + 0.063832;-0.326004;-0.943211;, + 0.938699;-0.157979;-0.306408;, + 0.658994;-0.420980;0.623300;, + 0.999001;-0.033016;-0.030116;, + 0.005130;0.183809;-0.982949;, + -0.933054;-0.303730;-0.192764;, + 0.991412;0.128365;-0.025012;, + 0.649195;-0.068635;0.757519;, + -0.555420;-0.356113;0.751460;, + -0.937074;-0.338487;0.085549;, + 0.447515;0.045262;-0.893130;, + -0.705682;-0.354669;-0.613370;, + -0.592644;-0.622931;0.510618;, + -0.752771;-0.619673;-0.222128;, + 0.720371;-0.617368;-0.316104;, + -0.683253;-0.627919;-0.372670;, + 0.769514;-0.558111;-0.310419;, + -0.562589;-0.760251;-0.324828;, + -0.204878;-0.344714;-0.916077;, + 0.446447;-0.607871;-0.656642;, + -0.711056;-0.698405;0.081424;, + 0.643951;-0.736522;-0.207031;, + 0.686779;-0.713298;0.139789;, + -0.413593;0.147648;0.898410;, + -0.990075;-0.050814;0.131034;, + 0.321552;-0.282128;0.903885;, + 0.624392;0.208123;0.752874;, + 0.996072;0.072527;0.050800;, + -0.386575;0.167860;-0.906853;, + 0.318836;0.181672;-0.930236;, + -0.965362;0.116386;-0.233516;, + 0.885875;0.093258;-0.454453;, + -0.998737;-0.000577;-0.050239;, + 0.997215;0.069558;-0.026922;, + -0.059927;0.707805;-0.703861;, + 0.750455;0.543429;-0.376168;, + -0.617940;0.665192;-0.419130;, + -0.803206;0.582659;-0.123972;, + 0.704325;0.662368;-0.255334;, + 0.082622;0.499858;-0.862158;, + 0.931934;0.103939;-0.347414;, + -0.027959;0.981500;-0.189407;, + -0.050360;0.933873;-0.354042;, + 0.981209;0.015725;0.192306;, + -0.827387;-0.039311;-0.560255;, + -0.986340;-0.131712;-0.098922;, + -0.787094;-0.082947;0.611231;, + -0.006351;0.094118;0.995541;, + 0.498810;0.079278;0.863078;, + -0.740122;-0.312903;0.595240;, + -0.938230;-0.345002;0.026413;, + -0.993493;0.048503;0.103045;, + -0.673953;0.185181;0.715189;, + -0.108392;-0.207274;0.972260;, + 0.051154;0.195171;0.979434;, + 0.639562;-0.102929;0.761818;, + 0.704736;0.180554;0.686111;, + 0.998869;-0.047538;-0.000576;, + 0.958935;0.173981;-0.223994;, + 0.698266;-0.181001;-0.692577;, + 0.620972;0.089948;-0.778655;, + 0.016398;-0.443063;-0.896341;, + -0.144390;-0.065290;-0.987365;, + -0.728851;-0.441912;-0.522963;, + -0.871827;-0.033825;-0.488645;, + -0.626805;-0.572093;0.528985;, + -0.871386;-0.490489;0.010370;, + -0.076929;-0.452265;0.888559;, + 0.626649;-0.191510;0.755404;, + 0.998179;0.029379;0.052680;, + 0.721135;-0.035727;-0.691873;, + 0.076054;-0.310273;-0.947600;, + -0.686595;-0.525811;-0.502105;, + -0.330716;-0.736732;0.589791;, + -0.000000;-0.999826;-0.018662;, + 0.814386;0.118924;0.568007;, + 0.793032;-0.131439;-0.594831;, + 0.983958;0.171788;0.048122;, + 0.282352;-0.374795;-0.883066;, + -0.000000;-0.704137;-0.710064;, + 0.479848;0.732180;-0.483382;, + 0.372803;0.739708;0.560223;, + 0.661563;0.611093;0.434626;, + 0.699606;0.569916;-0.430984;, + 0.710696;0.422097;0.562801;, + 0.295926;0.387851;0.872926;, + 0.837365;0.545835;0.029727;, + 0.634042;0.611621;-0.473192;, + 0.202625;0.600191;-0.773766;, + 0.000000;0.760465;-0.649379;, + 0.746427;-0.359817;0.559803;, + 0.315278;-0.350053;0.882078;, + 0.925014;-0.373716;0.068452;, + 0.702484;-0.584123;-0.406592;, + 0.277977;-0.495656;-0.822833;, + 0.000000;-0.326323;-0.945258;, + 0.788118;-0.183645;0.587491;, + 0.253204;-0.328259;0.910019;, + 0.953596;-0.298213;-0.041519;, + 0.649818;-0.613601;-0.448587;, + 0.213921;-0.752172;-0.623277;, + 0.000000;-0.760910;-0.648858;, + 0.750713;0.268051;0.603803;, + 0.000000;-0.632247;-0.774767;, + 0.000000;0.293377;0.955997;, + 0.000000;-0.458024;0.888940;, + 0.000000;-0.247527;0.968881;, + -0.000000;-0.929061;0.369927;, + 0.000000;-0.674749;0.738047;, + 0.000000;0.121068;0.992644;, + 0.413319;0.153508;0.897554;, + 0.000000;-0.048684;0.998814;, + 0.333509;-0.199190;0.921464;, + -0.715206;-0.667542;0.207047;, + -0.578980;-0.808463;-0.105693;, + -0.254152;-0.724281;0.640955;, + 0.350123;-0.705733;0.615918;, + 0.521829;-0.685532;0.507681;, + 0.582105;-0.748288;-0.318149;, + 0.259672;-0.758109;-0.598199;, + -0.324676;-0.788502;-0.522351;, + -0.164580;-0.761217;0.627266;, + -0.489043;-0.865249;0.110364;, + 0.147015;-0.759744;0.633384;, + 0.605120;-0.686438;0.403277;, + 0.602435;-0.766434;-0.222825;, + 0.157318;-0.949324;-0.272095;, + -0.166899;-0.916412;-0.363778;, + -0.427237;-0.891048;-0.153303;, + -0.649900;-0.035036;0.759212;, + -0.985761;-0.163298;-0.040116;, + 0.036046;0.034905;0.998740;, + 0.608077;0.178337;0.773588;, + 0.981662;0.163987;0.097203;, + 0.740908;-0.121535;-0.660519;, + -0.006847;-0.316355;-0.948616;, + -0.687977;-0.293549;-0.663714;, + 0.152727;0.197261;0.968381;, + 0.101821;-0.074160;-0.992035;, + 0.114730;0.027382;0.993019;, + -0.400147;-0.785877;0.471465;, + -0.373140;-0.766605;-0.522573;, + 0.346292;-0.166438;-0.923244;, + 0.519780;0.635299;0.571160;, + 0.747186;0.566650;-0.347307;, + -0.236063;0.200824;0.950760;, + -0.838795;-0.373110;0.396500;, + -0.651438;-0.450605;-0.610396;, + -0.031669;0.154102;-0.987547;, + 0.201281;0.810006;0.550796;, + 0.239147;0.872811;-0.425453;, + 0.299406;-0.276504;0.913182;, + -0.090325;-0.956867;0.276130;, + 0.102216;-0.745525;-0.658593;, + 0.569936;-0.148382;-0.808181;, + 0.711459;0.196812;0.674605;, + 0.934562;0.328093;-0.137656;, + 0.670078;-0.315307;0.671995;, + 0.433905;-0.762868;0.479331;, + 0.392697;-0.891971;-0.224004;, + 0.619791;-0.530830;-0.577995;, + 0.937105;-0.010824;0.348879;, + 0.942842;-0.125596;-0.308665;, + 0.179838;-0.052199;0.982310;, + -0.225765;-0.835864;0.500361;, + -0.124005;-0.775689;-0.618813;, + 0.254434;-0.153439;-0.954840;, + 0.632262;0.479231;0.608755;, + 0.779351;0.507865;-0.366995;, + 0.211083;-0.007310;0.977441;, + -0.425351;-0.766520;0.481169;, + -0.099996;-0.506703;-0.856302;, + -0.397481;-0.777098;-0.487983;, + 0.691760;0.435659;0.575908;, + 0.783622;0.512593;-0.350976;, + 0.312687;-0.071199;-0.947184;, + -0.075596;0.061964;-0.995211;, + -0.628811;0.048486;-0.776045;, + 0.519283;-0.801855;-0.295591;, + 0.768732;-0.464431;-0.439721;, + 0.776443;-0.621410;0.104818;, + 0.392286;-0.395655;0.830403;, + 0.519681;-0.462756;0.718184;, + 0.008636;0.241742;0.970302;, + -0.606488;0.362636;0.707579;, + -0.634201;0.590890;0.498637;, + -0.395655;-0.688028;0.608338;, + -0.733299;-0.679627;0.019472;, + 0.532226;-0.846074;0.029908;, + 0.626299;-0.623654;0.467766;, + 0.615564;-0.788001;-0.011651;, + 0.020657;0.352402;-0.935621;, + -0.737398;0.614678;-0.280026;, + -0.671012;-0.430239;-0.603852;, + 0.283460;-0.739558;-0.610496;, + 0.077465;0.247205;-0.965862;, + 0.093468;0.573633;-0.813762;, + 0.978692;0.134617;-0.155050;, + 0.990913;0.025337;-0.132097;, + 0.772378;-0.597866;-0.214449;, + -0.872971;0.472486;-0.121157;, + -0.815150;0.020096;-0.578901;, + 0.017212;-0.667549;0.744367;, + -0.938699;-0.157978;-0.306411;, + -0.063832;-0.326003;-0.943211;, + 0.025442;-0.997470;0.066384;, + -0.658998;-0.420978;0.623297;, + -0.005131;0.183808;-0.982949;, + -0.999001;-0.033016;-0.030117;, + 0.933054;-0.303731;-0.192763;, + -0.991412;0.128365;-0.025011;, + -0.649195;-0.068635;0.757519;, + 0.555420;-0.356114;0.751459;, + 0.937074;-0.338488;0.085548;, + -0.447516;0.045263;-0.893130;, + 0.705682;-0.354669;-0.613370;, + -0.720371;-0.617367;-0.316106;, + 0.752772;-0.619672;-0.222130;, + 0.592644;-0.622930;0.510618;, + -0.769512;-0.558113;-0.310422;, + 0.683253;-0.627918;-0.372671;, + -0.446447;-0.607871;-0.656642;, + 0.204878;-0.344714;-0.916077;, + 0.562588;-0.760251;-0.324828;, + -0.643951;-0.736523;-0.207031;, + 0.711056;-0.698405;0.081424;, + -0.686777;-0.713299;0.139789;, + 0.990075;-0.050814;0.131033;, + 0.413593;0.147648;0.898410;, + -0.624392;0.208124;0.752874;, + -0.321551;-0.282128;0.903885;, + -0.996072;0.072527;0.050799;, + -0.318836;0.181672;-0.930236;, + 0.386574;0.167859;-0.906854;, + 0.965362;0.116386;-0.233516;, + -0.885875;0.093257;-0.454453;, + 0.998737;-0.000577;-0.050239;, + -0.997215;0.069557;-0.026922;, + -0.750455;0.543429;-0.376168;, + 0.059927;0.707805;-0.703862;, + 0.617939;0.665192;-0.419130;, + 0.803206;0.582659;-0.123972;, + -0.704325;0.662368;-0.255334;, + -0.931934;0.103939;-0.347414;, + -0.082622;0.499858;-0.862158;, + 0.050360;0.933873;-0.354042;, + 0.027959;0.981500;-0.189407;, + -0.981209;0.015725;0.192306;, + 0.827387;-0.039311;-0.560255;, + 0.986340;-0.131712;-0.098922;, + 0.787094;-0.082947;0.611231;, + 0.006351;0.094118;0.995541;, + -0.498810;0.079278;0.863078;, + 0.993493;0.048503;0.103045;, + 0.938231;-0.345001;0.026413;, + 0.740122;-0.312902;0.595241;, + 0.673953;0.185182;0.715189;, + 0.108392;-0.207274;0.972260;, + -0.051154;0.195171;0.979434;, + -0.639562;-0.102930;0.761817;, + -0.704736;0.180553;0.686111;, + -0.998869;-0.047539;-0.000576;, + -0.958935;0.173981;-0.223994;, + -0.698266;-0.181001;-0.692577;, + -0.620972;0.089947;-0.778655;, + -0.016398;-0.443063;-0.896341;, + 0.144390;-0.065289;-0.987365;, + 0.728851;-0.441912;-0.522963;, + 0.871827;-0.033824;-0.488645;, + 0.871385;-0.490489;0.010371;, + 0.626805;-0.572093;0.528985;, + 0.076929;-0.452265;0.888559;, + -0.626649;-0.191510;0.755404;, + -0.998179;0.029379;0.052679;, + -0.721134;-0.035727;-0.691873;, + -0.076054;-0.310273;-0.947600;, + 0.686595;-0.525811;-0.502105;, + 0.330715;-0.736732;0.589791;, + -0.814386;0.118924;0.568007;, + -0.983958;0.171789;0.048122;, + -0.793032;-0.131439;-0.594831;, + -0.282352;-0.374795;-0.883067;, + -0.661563;0.611093;0.434626;, + -0.372803;0.739708;0.560223;, + -0.479848;0.732180;-0.483382;, + -0.699606;0.569916;-0.430984;, + -0.710696;0.422097;0.562801;, + -0.295926;0.387851;0.872926;, + -0.837365;0.545835;0.029728;, + -0.634042;0.611621;-0.473192;, + -0.202625;0.600190;-0.773766;, + -0.746426;-0.359818;0.559803;, + -0.315278;-0.350053;0.882078;, + -0.925014;-0.373716;0.068452;, + -0.702484;-0.584123;-0.406592;, + -0.277977;-0.495656;-0.822833;, + -0.788117;-0.183645;0.587491;, + -0.253204;-0.328259;0.910019;, + -0.953596;-0.298213;-0.041519;, + -0.649818;-0.613601;-0.448587;, + -0.213921;-0.752172;-0.623277;, + -0.750713;0.268052;0.603803;, + -0.413319;0.153508;0.897554;, + -0.333508;-0.199190;0.921464;, + 0.715206;-0.667542;0.207047;, + 0.578979;-0.808463;-0.105693;, + 0.254151;-0.724281;0.640956;, + -0.350122;-0.705733;0.615918;, + -0.521829;-0.685532;0.507682;, + -0.582105;-0.748288;-0.318149;, + -0.259672;-0.758109;-0.598199;, + 0.324675;-0.788502;-0.522351;, + 0.164580;-0.761216;0.627266;, + 0.489043;-0.865250;0.110364;, + -0.147015;-0.759744;0.633384;, + -0.605120;-0.686438;0.403277;, + -0.602435;-0.766434;-0.222825;, + -0.157318;-0.949324;-0.272095;, + 0.166899;-0.916412;-0.363778;, + 0.427237;-0.891048;-0.153303;, + 0.649900;-0.035037;0.759212;, + 0.985761;-0.163298;-0.040116;, + -0.036046;0.034905;0.998740;, + -0.608077;0.178337;0.773588;, + -0.981662;0.163987;0.097202;, + -0.740908;-0.121535;-0.660518;, + 0.006847;-0.316355;-0.948616;, + 0.687977;-0.293549;-0.663714;, + -0.152727;0.197261;0.968381;, + -0.101821;-0.074160;-0.992035;, + -0.114730;0.027382;0.993019;, + 0.400147;-0.785877;0.471465;, + 0.373140;-0.766605;-0.522573;, + -0.346292;-0.166438;-0.923244;, + -0.519779;0.635300;0.571160;, + -0.747186;0.566650;-0.347306;, + 0.236063;0.200824;0.950760;, + 0.838795;-0.373110;0.396500;, + 0.651438;-0.450605;-0.610396;, + 0.031669;0.154102;-0.987547;, + -0.201281;0.810006;0.550796;, + -0.239147;0.872811;-0.425453;, + -0.299406;-0.276504;0.913182;, + 0.090326;-0.956866;0.276132;, + -0.102213;-0.745525;-0.658593;, + -0.569935;-0.148383;-0.808181;, + -0.711459;0.196812;0.674605;, + -0.934562;0.328093;-0.137655;, + -0.670077;-0.315307;0.671995;, + -0.433903;-0.762869;0.479331;, + -0.392695;-0.891971;-0.224004;, + -0.619791;-0.530830;-0.577995;, + -0.937105;-0.010824;0.348879;, + -0.942842;-0.125596;-0.308665;, + -0.179838;-0.052199;0.982310;, + 0.225766;-0.835864;0.500361;, + 0.124006;-0.775689;-0.618813;, + -0.254434;-0.153439;-0.954840;, + -0.632263;0.479231;0.608754;, + -0.779351;0.507865;-0.366995;, + -0.211083;-0.007311;0.977441;, + 0.425351;-0.766520;0.481169;, + 0.397482;-0.777098;-0.487983;, + 0.099996;-0.506703;-0.856302;, + -0.691761;0.435659;0.575907;, + -0.783623;0.512593;-0.350976;, + -0.312688;-0.071199;-0.947184;, + -0.158440;0.272260;0.949090;, + -0.826805;0.300613;0.475422;, + -0.818240;-0.572323;0.054124;, + 0.443455;-0.793006;0.417718;, + -0.807686;-0.588428;0.037363;, + 0.478308;-0.856915;0.192140;, + -0.806374;-0.591350;0.008141;, + 0.485289;-0.872612;-0.055172;, + -0.805965;-0.591697;-0.017746;, + 0.466843;-0.842931;-0.267441;, + -0.819948;-0.571396;-0.034540;, + 0.428416;-0.777562;-0.460280;, + -0.815220;-0.575410;-0.065729;, + 0.362499;-0.663593;-0.654400;, + -0.987557;-0.002703;-0.157237;, + -0.465064;0.808835;-0.359864;, + -0.895193;0.296505;0.332738;, + -0.621376;0.321019;-0.714730;, + -0.823363;-0.179475;-0.538388;, + -0.717959;-0.165741;0.676065;, + -0.954361;0.021745;-0.297862;, + -0.870287;-0.492508;0.006093;, + -0.818024;0.006369;0.575148;, + 0.915007;0.400877;0.045386;, + 0.362063;0.859195;0.361516;, + 0.923704;0.382121;0.027477;, + 0.925341;0.379116;-0.003806;, + 0.925113;0.378382;-0.031514;, + 0.914133;0.402378;-0.049520;, + 0.914701;0.395544;-0.082872;, + 0.318704;0.921135;-0.223467;, + 0.592761;0.573307;-0.565644;, + -0.096115;0.933726;-0.344844;, + 0.336545;0.702533;0.627045;, + 0.486292;0.591434;0.643216;, + 0.870287;0.492508;-0.006093;, + 0.516008;0.743904;-0.424667;, + 0.388701;0.765725;0.512422;, + 0.818479;-0.013906;0.574368;, + 0.583881;0.562753;0.585143;, + 0.008591;-0.015184;0.999848;, + 0.871568;0.231819;0.432006;, + 0.448861;0.775548;0.443902;, + 0.779452;0.224370;-0.584904;, + -0.008598;0.015187;-0.999848;, + 0.397356;0.715862;-0.574151;, + 0.576552;-0.587596;0.567732;, + 0.785924;-0.451591;0.422360;, + 0.702038;-0.393393;-0.593620;, + -0.000186;-0.822252;0.569124;, + 0.242090;-0.874344;0.420613;, + 0.210446;-0.775533;-0.595199;, + -0.573887;-0.580416;0.577729;, + -0.441362;-0.788795;0.427788;, + -0.407347;-0.698201;-0.588713;, + -0.808485;-0.003753;0.588505;, + -0.864073;-0.245059;0.439687;, + -0.789452;-0.206700;-0.577963;, + -0.566558;0.569931;0.595139;, + -0.778428;0.438345;0.449336;, + -0.712039;0.411053;-0.569242;, + 0.010185;0.804586;0.593749;, + -0.234597;0.861095;0.451087;, + -0.220443;0.793196;-0.567667;, + 0.663953;0.169591;0.728289;, + 0.343613;0.581657;0.737296;, + 0.636660;0.638950;-0.431748;, + 0.896190;0.001007;-0.443670;, + 0.599051;-0.348328;0.720975;, + 0.628552;-0.633648;-0.451012;, + 0.186915;-0.668706;0.719650;, + -0.009479;-0.893246;-0.449468;, + -0.331041;-0.603875;0.725084;, + -0.644150;-0.625711;-0.439950;, + -0.651388;-0.191809;0.734100;, + -0.903681;0.012237;-0.428031;, + -0.586482;0.326109;0.741412;, + -0.636045;0.646893;-0.420685;, + -0.174343;0.646491;0.742734;, + 0.001989;0.906490;-0.422223;, + 0.864073;0.245061;-0.439686;, + 0.441363;0.788793;-0.427789;, + 0.644155;0.625710;0.439944;, + 0.903685;-0.012232;0.428023;, + 0.778430;-0.438345;-0.449333;, + 0.636046;-0.646894;0.420683;, + 0.234598;-0.861099;-0.451080;, + -0.001986;-0.906489;0.422225;, + -0.448852;-0.775554;-0.443902;, + -0.636655;-0.638956;0.431746;, + -0.871564;-0.231820;-0.432014;, + -0.896188;-0.001007;0.443673;, + -0.785920;0.451591;-0.422368;, + -0.628551;0.633646;0.451017;, + -0.242090;0.874344;-0.420613;, + 0.009483;0.893244;0.449471;, + 0.479045;0.490319;-0.728082;, + 0.675735;0.006858;-0.737113;, + 0.472902;-0.474122;-0.742679;, + -0.010626;-0.670850;-0.741517;, + -0.491614;-0.468095;-0.734304;, + -0.688295;0.015361;-0.725268;, + -0.485460;0.496332;-0.719711;, + -0.001936;0.693063;-0.720874;, + 0.651394;0.191812;-0.734094;, + 0.331038;0.603871;-0.725089;, + 0.491611;0.468102;0.734302;, + 0.688292;-0.015363;0.725271;, + 0.586489;-0.326107;-0.741407;, + 0.485471;-0.496336;0.719700;, + 0.174344;-0.646489;-0.742736;, + 0.001936;-0.693068;0.720870;, + -0.343609;-0.581653;-0.737301;, + -0.479044;-0.490321;0.728081;, + -0.663957;-0.169592;-0.728286;, + -0.675725;-0.006857;0.737122;, + -0.599047;0.348320;-0.720982;, + -0.472901;0.474118;0.742682;, + -0.186907;0.668699;-0.719658;, + 0.010630;0.670854;0.741513;; + 1896; + 3;0,1,2;, + 3;3,0,2;, + 3;4,0,3;, + 3;5,4,3;, + 3;6,4,5;, + 3;7,6,5;, + 3;8,9,10;, + 3;11,8,10;, + 3;12,8,11;, + 3;13,12,11;, + 3;14,12,13;, + 3;15,14,13;, + 3;9,1,16;, + 3;10,9,16;, + 3;17,3,2;, + 3;18,17,2;, + 3;10,16,19;, + 3;11,10,19;, + 3;20,5,3;, + 3;17,20,3;, + 3;11,19,21;, + 3;13,11,21;, + 3;22,7,5;, + 3;20,22,5;, + 3;14,6,7;, + 3;22,14,7;, + 3;13,21,23;, + 3;15,13,23;, + 3;19,16,1;, + 3;0,19,1;, + 3;21,19,0;, + 3;4,21,0;, + 3;23,21,4;, + 3;6,23,4;, + 3;17,18,9;, + 3;8,17,9;, + 3;20,17,8;, + 3;12,20,8;, + 3;22,20,12;, + 3;14,22,12;, + 3;18,2,1;, + 3;9,18,1;, + 3;15,23,6;, + 3;14,15,6;, + 3;24,25,26;, + 3;24,26,27;, + 3;27,26,28;, + 3;27,28,29;, + 3;29,28,30;, + 3;29,30,31;, + 3;32,33,34;, + 3;32,34,35;, + 3;35,34,36;, + 3;35,36,37;, + 3;37,36,38;, + 3;37,38,39;, + 3;40,25,33;, + 3;40,33,32;, + 3;24,27,41;, + 3;24,41,42;, + 3;43,40,32;, + 3;43,32,35;, + 3;27,29,44;, + 3;27,44,41;, + 3;45,43,35;, + 3;45,35,37;, + 3;29,31,46;, + 3;29,46,44;, + 3;31,30,38;, + 3;31,38,46;, + 3;47,45,37;, + 3;47,37,39;, + 3;25,40,43;, + 3;25,43,26;, + 3;26,43,45;, + 3;26,45,28;, + 3;28,45,47;, + 3;28,47,30;, + 3;33,42,41;, + 3;33,41,34;, + 3;34,41,44;, + 3;34,44,36;, + 3;36,44,46;, + 3;36,46,38;, + 3;25,24,42;, + 3;25,42,33;, + 3;30,47,39;, + 3;30,39,38;, + 3;48,49,50;, + 3;51,48,50;, + 3;52,53,54;, + 3;55,52,54;, + 3;56,57,58;, + 3;59,57,56;, + 3;57,60,61;, + 3;62,60,57;, + 3;59,62,57;, + 3;63,64,65;, + 3;65,60,62;, + 3;64,60,65;, + 3;66,63,65;, + 3;67,66,65;, + 3;61,68,58;, + 3;67,65,62;, + 3;69,67,62;, + 3;70,66,67;, + 3;71,70,67;, + 3;67,69,72;, + 3;71,67,72;, + 3;73,74,75;, + 3;76,73,75;, + 3;62,77,69;, + 3;78,79,68;, + 3;61,78,68;, + 3;80,78,61;, + 3;60,80,61;, + 3;64,81,80;, + 3;71,72,82;, + 3;70,71,82;, + 3;83,84,82;, + 3;72,83,82;, + 3;72,69,73;, + 3;76,72,73;, + 3;69,77,74;, + 3;73,69,74;, + 3;85,86,87;, + 3;88,85,87;, + 3;86,83,75;, + 3;87,86,75;, + 3;59,56,89;, + 3;85,59,89;, + 3;85,89,90;, + 3;86,85,90;, + 3;89,56,58;, + 3;91,89,58;, + 3;90,89,91;, + 3;92,90,91;, + 3;74,88,87;, + 3;75,74,87;, + 3;59,85,77;, + 3;62,59,77;, + 3;84,83,86;, + 3;77,85,88;, + 3;74,77,88;, + 3;83,72,76;, + 3;75,83,76;, + 3;91,58,68;, + 3;93,91,68;, + 3;92,91,93;, + 3;94,92,93;, + 3;79,95,96;, + 3;68,79,96;, + 3;68,96,97;, + 3;93,68,97;, + 3;93,97,94;, + 3;61,58,57;, + 3;98,99,100;, + 3;101,98,100;, + 3;102,98,101;, + 3;103,102,101;, + 3;104,105,106;, + 3;107,104,106;, + 3;105,108,109;, + 3;106,105,109;, + 3;108,110,109;, + 3;100,99,111;, + 3;109,110,112;, + 3;113,109,112;, + 3;104,82,84;, + 3;105,104,84;, + 3;106,98,102;, + 3;107,106,102;, + 3;105,84,86;, + 3;108,105,86;, + 3;109,99,98;, + 3;106,109,98;, + 3;108,86,90;, + 3;110,108,90;, + 3;110,90,92;, + 3;112,110,92;, + 3;113,111,99;, + 3;109,113,99;, + 3;114,112,92;, + 3;115,114,92;, + 3;116,113,112;, + 3;114,116,112;, + 3;117,111,113;, + 3;116,117,113;, + 3;92,94,115;, + 3;111,117,118;, + 3;119,111,118;, + 3;100,111,119;, + 3;101,100,119;, + 3;103,101,119;, + 3;120,103,119;, + 3;117,116,121;, + 3;118,117,121;, + 3;122,120,119;, + 3;123,122,119;, + 3;124,122,123;, + 3;125,124,123;, + 3;119,118,123;, + 3;126,123,118;, + 3;121,126,118;, + 3;125,123,126;, + 3;114,115,127;, + 3;116,114,127;, + 3;121,116,127;, + 3;128,121,127;, + 3;126,121,128;, + 3;129,126,128;, + 3;125,126,129;, + 3;130,125,129;, + 3;131,128,132;, + 3;133,131,132;, + 3;134,129,128;, + 3;131,134,128;, + 3;135,130,129;, + 3;134,135,129;, + 3;133,132,130;, + 3;135,133,130;, + 3;127,132,128;, + 3;127,115,94;, + 3;136,127,94;, + 3;95,55,54;, + 3;96,95,54;, + 3;96,54,137;, + 3;97,96,137;, + 3;97,137,136;, + 3;94,97,136;, + 3;138,131,133;, + 3;139,138,133;, + 3;140,134,131;, + 3;138,140,131;, + 3;141,135,134;, + 3;140,141,134;, + 3;139,133,135;, + 3;141,139,135;, + 3;142,138,139;, + 3;143,142,139;, + 3;144,140,138;, + 3;142,144,138;, + 3;145,141,140;, + 3;144,145,140;, + 3;143,139,141;, + 3;145,143,141;, + 3;146,142,143;, + 3;147,146,143;, + 3;148,144,142;, + 3;146,148,142;, + 3;149,145,144;, + 3;148,149,144;, + 3;147,143,145;, + 3;149,147,145;, + 3;150,146,147;, + 3;150,148,146;, + 3;150,149,148;, + 3;150,147,149;, + 3;50,49,151;, + 3;152,50,151;, + 3;153,154,137;, + 3;54,153,137;, + 3;153,53,48;, + 3;51,153,48;, + 3;51,50,155;, + 3;156,51,155;, + 3;156,154,51;, + 3;136,137,157;, + 3;158,136,157;, + 3;127,136,158;, + 3;50,152,155;, + 3;156,155,159;, + 3;160,156,159;, + 3;157,156,160;, + 3;161,157,160;, + 3;158,157,161;, + 3;162,158,161;, + 3;127,158,162;, + 3;163,127,162;, + 3;132,127,163;, + 3;53,52,48;, + 3;154,153,51;, + 3;53,153,54;, + 3;157,137,154;, + 3;156,157,154;, + 3;164,151,49;, + 3;165,164,49;, + 3;165,49,48;, + 3;166,165,48;, + 3;166,48,52;, + 3;167,166,52;, + 3;167,52,55;, + 3;168,167,55;, + 3;168,55,95;, + 3;169,168,95;, + 3;169,95,79;, + 3;170,169,79;, + 3;170,79,78;, + 3;171,170,78;, + 3;171,78,80;, + 3;172,171,80;, + 3;172,80,81;, + 3;173,172,81;, + 3;174,164,165;, + 3;175,174,165;, + 3;175,165,166;, + 3;176,175,166;, + 3;176,166,167;, + 3;177,176,167;, + 3;177,167,168;, + 3;178,177,168;, + 3;178,168,169;, + 3;179,178,169;, + 3;179,169,170;, + 3;180,179,170;, + 3;180,170,171;, + 3;181,180,171;, + 3;181,171,172;, + 3;182,181,172;, + 3;182,172,173;, + 3;183,182,173;, + 3;184,174,175;, + 3;185,184,175;, + 3;185,175,176;, + 3;186,185,176;, + 3;186,176,177;, + 3;187,186,177;, + 3;187,177,178;, + 3;188,187,178;, + 3;188,178,179;, + 3;189,188,179;, + 3;189,179,180;, + 3;190,189,180;, + 3;190,180,181;, + 3;191,190,181;, + 3;191,181,182;, + 3;192,191,182;, + 3;192,182,183;, + 3;193,192,183;, + 3;194,184,185;, + 3;195,194,185;, + 3;195,185,186;, + 3;196,195,186;, + 3;196,186,187;, + 3;197,196,187;, + 3;197,187,188;, + 3;198,197,188;, + 3;198,188,189;, + 3;199,198,189;, + 3;199,189,190;, + 3;200,199,190;, + 3;200,190,191;, + 3;201,200,191;, + 3;201,191,192;, + 3;202,201,192;, + 3;202,192,193;, + 3;203,202,193;, + 3;204,194,195;, + 3;204,195,196;, + 3;204,196,197;, + 3;204,197,198;, + 3;204,198,199;, + 3;204,199,200;, + 3;204,200,201;, + 3;204,201,202;, + 3;204,202,203;, + 3;80,60,64;, + 3;205,206,207;, + 3;208,205,207;, + 3;209,210,211;, + 3;212,209,211;, + 3;213,214,215;, + 3;215,214,216;, + 3;217,218,214;, + 3;218,219,216;, + 3;214,218,216;, + 3;220,64,63;, + 3;219,218,220;, + 3;220,218,64;, + 3;63,66,221;, + 3;220,63,221;, + 3;213,222,217;, + 3;220,221,223;, + 3;219,220,223;, + 3;66,70,224;, + 3;221,66,224;, + 3;223,221,224;, + 3;225,223,224;, + 3;226,227,228;, + 3;229,226,228;, + 3;223,230,219;, + 3;231,232,217;, + 3;222,231,217;, + 3;232,233,218;, + 3;217,232,218;, + 3;233,81,64;, + 3;82,225,224;, + 3;82,224,70;, + 3;234,235,225;, + 3;82,234,225;, + 3;223,225,228;, + 3;227,223,228;, + 3;230,223,227;, + 3;226,230,227;, + 3;236,237,238;, + 3;239,236,238;, + 3;235,236,239;, + 3;229,235,239;, + 3;215,216,237;, + 3;240,215,237;, + 3;240,237,236;, + 3;241,240,236;, + 3;215,240,242;, + 3;213,215,242;, + 3;240,241,243;, + 3;242,240,243;, + 3;238,226,229;, + 3;239,238,229;, + 3;230,237,216;, + 3;230,216,219;, + 3;236,235,234;, + 3;237,230,226;, + 3;238,237,226;, + 3;225,235,229;, + 3;228,225,229;, + 3;213,242,244;, + 3;222,213,244;, + 3;242,243,245;, + 3;244,242,245;, + 3;246,231,222;, + 3;247,246,222;, + 3;247,222,244;, + 3;248,247,244;, + 3;245,248,244;, + 3;214,213,217;, + 3;249,250,251;, + 3;252,249,251;, + 3;250,102,103;, + 3;251,250,103;, + 3;253,104,107;, + 3;254,253,107;, + 3;255,253,254;, + 3;256,255,254;, + 3;256,257,255;, + 3;258,249,252;, + 3;257,256,259;, + 3;260,257,259;, + 3;82,104,253;, + 3;234,82,253;, + 3;250,254,107;, + 3;102,250,107;, + 3;234,253,255;, + 3;236,234,255;, + 3;249,256,254;, + 3;250,249,254;, + 3;236,255,257;, + 3;241,236,257;, + 3;241,257,260;, + 3;243,241,260;, + 3;258,259,256;, + 3;249,258,256;, + 3;260,261,262;, + 3;243,260,262;, + 3;259,263,261;, + 3;260,259,261;, + 3;258,264,263;, + 3;259,258,263;, + 3;262,245,243;, + 3;264,258,265;, + 3;266,264,265;, + 3;265,258,252;, + 3;265,252,251;, + 3;251,103,120;, + 3;265,251,120;, + 3;267,263,264;, + 3;267,264,266;, + 3;120,122,268;, + 3;265,120,268;, + 3;122,124,269;, + 3;268,122,269;, + 3;268,266,265;, + 3;268,270,267;, + 3;266,268,267;, + 3;270,268,269;, + 3;271,262,261;, + 3;261,263,267;, + 3;271,261,267;, + 3;271,267,272;, + 3;267,270,273;, + 3;272,267,273;, + 3;270,269,274;, + 3;273,270,274;, + 3;272,275,276;, + 3;277,272,276;, + 3;273,278,275;, + 3;272,273,275;, + 3;274,279,278;, + 3;273,274,278;, + 3;277,276,279;, + 3;274,277,279;, + 3;272,277,271;, + 3;271,280,245;, + 3;245,262,271;, + 3;211,246,247;, + 3;212,211,247;, + 3;212,247,248;, + 3;281,212,248;, + 3;281,248,245;, + 3;280,281,245;, + 3;275,282,283;, + 3;276,275,283;, + 3;278,284,282;, + 3;275,278,282;, + 3;279,285,284;, + 3;278,279,284;, + 3;276,283,285;, + 3;279,276,285;, + 3;282,286,287;, + 3;283,282,287;, + 3;284,288,286;, + 3;282,284,286;, + 3;285,289,288;, + 3;284,285,288;, + 3;283,287,289;, + 3;285,283,289;, + 3;286,290,291;, + 3;287,286,291;, + 3;288,292,290;, + 3;286,288,290;, + 3;289,293,292;, + 3;288,289,292;, + 3;287,291,293;, + 3;289,287,293;, + 3;291,290,294;, + 3;290,292,294;, + 3;292,293,294;, + 3;293,291,294;, + 3;205,208,152;, + 3;151,205,152;, + 3;295,296,212;, + 3;281,295,212;, + 3;209,296,207;, + 3;206,209,207;, + 3;208,207,297;, + 3;155,208,297;, + 3;207,295,297;, + 3;281,280,298;, + 3;299,281,298;, + 3;298,280,271;, + 3;155,152,208;, + 3;155,297,300;, + 3;159,155,300;, + 3;297,299,301;, + 3;300,297,301;, + 3;299,298,302;, + 3;301,299,302;, + 3;302,298,271;, + 3;302,271,303;, + 3;303,271,277;, + 3;206,210,209;, + 3;207,296,295;, + 3;212,296,209;, + 3;295,281,299;, + 3;295,299,297;, + 3;151,164,304;, + 3;205,151,304;, + 3;205,304,305;, + 3;206,205,305;, + 3;206,305,306;, + 3;210,206,306;, + 3;210,306,307;, + 3;211,210,307;, + 3;211,307,308;, + 3;246,211,308;, + 3;246,308,309;, + 3;231,246,309;, + 3;231,309,310;, + 3;232,231,310;, + 3;232,310,311;, + 3;233,232,311;, + 3;233,311,173;, + 3;81,233,173;, + 3;164,174,312;, + 3;304,164,312;, + 3;304,312,313;, + 3;305,304,313;, + 3;305,313,314;, + 3;306,305,314;, + 3;306,314,315;, + 3;307,306,315;, + 3;307,315,316;, + 3;308,307,316;, + 3;308,316,317;, + 3;309,308,317;, + 3;309,317,318;, + 3;310,309,318;, + 3;310,318,319;, + 3;311,310,319;, + 3;311,319,183;, + 3;173,311,183;, + 3;174,184,320;, + 3;312,174,320;, + 3;312,320,321;, + 3;313,312,321;, + 3;313,321,322;, + 3;314,313,322;, + 3;314,322,323;, + 3;315,314,323;, + 3;315,323,324;, + 3;316,315,324;, + 3;316,324,325;, + 3;317,316,325;, + 3;317,325,326;, + 3;318,317,326;, + 3;318,326,327;, + 3;319,318,327;, + 3;319,327,193;, + 3;183,319,193;, + 3;184,194,328;, + 3;320,184,328;, + 3;320,328,329;, + 3;321,320,329;, + 3;321,329,330;, + 3;322,321,330;, + 3;322,330,331;, + 3;323,322,331;, + 3;323,331,332;, + 3;324,323,332;, + 3;324,332,333;, + 3;325,324,333;, + 3;325,333,334;, + 3;326,325,334;, + 3;326,334,335;, + 3;327,326,335;, + 3;327,335,203;, + 3;193,327,203;, + 3;328,194,204;, + 3;329,328,204;, + 3;330,329,204;, + 3;331,330,204;, + 3;332,331,204;, + 3;333,332,204;, + 3;334,333,204;, + 3;335,334,204;, + 3;203,335,204;, + 3;64,218,233;, + 3;336,337,338;, + 3;339,336,338;, + 3;336,340,337;, + 3;341,336,339;, + 3;342,341,339;, + 3;341,340,336;, + 3;343,341,342;, + 3;344,343,342;, + 3;343,340,341;, + 3;345,343,344;, + 3;346,345,344;, + 3;345,340,343;, + 3;347,345,346;, + 3;348,347,346;, + 3;347,340,345;, + 3;337,347,348;, + 3;338,337,348;, + 3;337,340,347;, + 3;349,350,351;, + 3;352,349,351;, + 3;353,349,352;, + 3;354,353,352;, + 3;355,353,354;, + 3;356,355,354;, + 3;357,355,356;, + 3;358,357,356;, + 3;359,357,358;, + 3;360,359,358;, + 3;350,359,360;, + 3;351,350,360;, + 3;361,350,349;, + 3;362,361,349;, + 3;362,349,353;, + 3;363,362,353;, + 3;363,353,355;, + 3;364,363,355;, + 3;364,355,357;, + 3;365,364,357;, + 3;365,357,359;, + 3;366,365,359;, + 3;366,359,350;, + 3;361,366,350;, + 3;367,361,362;, + 3;368,367,362;, + 3;368,362,363;, + 3;369,368,363;, + 3;369,363,364;, + 3;370,369,364;, + 3;370,364,365;, + 3;371,370,365;, + 3;371,365,366;, + 3;372,371,366;, + 3;372,366,361;, + 3;367,372,361;, + 3;373,367,368;, + 3;373,368,369;, + 3;373,369,370;, + 3;373,370,371;, + 3;373,371,372;, + 3;373,372,367;, + 3;374,375,376;, + 3;374,376,377;, + 3;377,376,378;, + 3;377,378,379;, + 3;379,378,380;, + 3;379,380,381;, + 3;381,380,382;, + 3;381,382,383;, + 3;383,382,384;, + 3;383,384,385;, + 3;385,384,375;, + 3;385,375,374;, + 3;376,375,386;, + 3;376,386,387;, + 3;378,376,387;, + 3;378,387,388;, + 3;380,378,388;, + 3;380,388,389;, + 3;382,380,389;, + 3;382,389,390;, + 3;384,382,390;, + 3;384,390,391;, + 3;375,384,391;, + 3;375,391,386;, + 3;387,386,392;, + 3;387,392,393;, + 3;388,387,393;, + 3;388,393,394;, + 3;389,388,394;, + 3;389,394,395;, + 3;390,389,395;, + 3;390,395,396;, + 3;391,390,396;, + 3;391,396,397;, + 3;386,391,397;, + 3;386,397,392;, + 3;393,392,398;, + 3;394,393,398;, + 3;395,394,398;, + 3;396,395,398;, + 3;397,396,398;, + 3;392,397,398;, + 3;399,400,401;, + 3;402,399,401;, + 3;403,404,405;, + 3;406,399,402;, + 3;407,406,402;, + 3;408,404,403;, + 3;409,406,407;, + 3;410,409,407;, + 3;411,404,408;, + 3;412,409,410;, + 3;413,412,410;, + 3;414,404,411;, + 3;415,416,412;, + 3;413,415,412;, + 3;417,418,400;, + 3;399,417,400;, + 3;419,420,406;, + 3;409,419,406;, + 3;421,419,409;, + 3;412,421,409;, + 3;416,422,421;, + 3;412,416,421;, + 3;423,424,418;, + 3;417,423,418;, + 3;425,426,420;, + 3;419,425,420;, + 3;427,425,419;, + 3;421,427,419;, + 3;428,429,424;, + 3;405,428,424;, + 3;405,424,423;, + 3;403,405,423;, + 3;403,423,426;, + 3;408,403,426;, + 3;408,426,425;, + 3;411,408,425;, + 3;411,425,427;, + 3;414,411,427;, + 3;401,400,430;, + 3;431,401,430;, + 3;404,428,405;, + 3;432,404,414;, + 3;400,418,433;, + 3;430,400,433;, + 3;418,424,429;, + 3;433,418,429;, + 3;434,432,414;, + 3;427,434,414;, + 3;422,434,427;, + 3;421,422,427;, + 3;435,423,417;, + 3;436,426,423;, + 3;435,436,423;, + 3;437,438,439;, + 3;437,439,440;, + 3;441,404,442;, + 3;440,439,443;, + 3;440,443,444;, + 3;442,404,445;, + 3;444,443,446;, + 3;444,446,447;, + 3;445,404,448;, + 3;447,446,449;, + 3;447,449,450;, + 3;448,404,451;, + 3;449,416,415;, + 3;449,415,450;, + 3;438,452,453;, + 3;438,453,439;, + 3;443,454,455;, + 3;443,455,446;, + 3;446,455,456;, + 3;446,456,449;, + 3;456,422,416;, + 3;456,416,449;, + 3;452,457,458;, + 3;452,458,453;, + 3;454,459,460;, + 3;454,460,455;, + 3;455,460,461;, + 3;455,461,456;, + 3;457,429,428;, + 3;457,428,441;, + 3;458,457,441;, + 3;458,441,442;, + 3;459,458,442;, + 3;459,442,445;, + 3;460,459,445;, + 3;460,445,448;, + 3;461,460,448;, + 3;461,448,451;, + 3;430,438,437;, + 3;430,437,431;, + 3;441,428,404;, + 3;451,404,432;, + 3;433,452,438;, + 3;433,438,430;, + 3;429,457,452;, + 3;429,452,433;, + 3;451,432,434;, + 3;451,434,461;, + 3;461,434,422;, + 3;461,422,456;, + 3;453,458,462;, + 3;458,459,463;, + 3;458,463,462;, + 3;463,459,454;, + 3;464,465,466;, + 3;467,464,466;, + 3;468,464,467;, + 3;469,470,471;, + 3;472,469,471;, + 3;472,473,469;, + 3;474,475,476;, + 3;477,474,476;, + 3;471,470,478;, + 3;468,471,478;, + 3;479,465,480;, + 3;481,482,475;, + 3;474,481,475;, + 3;483,484,485;, + 3;486,483,485;, + 3;478,487,464;, + 3;468,478,464;, + 3;488,466,465;, + 3;479,488,465;, + 3;484,489,485;, + 3;483,487,480;, + 3;487,490,464;, + 3;490,489,465;, + 3;464,490,465;, + 3;480,465,489;, + 3;484,480,489;, + 3;483,486,490;, + 3;487,483,490;, + 3;491,492,493;, + 3;494,491,493;, + 3;495,496,485;, + 3;489,495,485;, + 3;496,497,486;, + 3;485,496,486;, + 3;486,497,490;, + 3;490,495,489;, + 3;493,492,496;, + 3;495,493,496;, + 3;492,491,497;, + 3;496,492,497;, + 3;491,494,490;, + 3;497,491,490;, + 3;494,493,495;, + 3;490,494,495;, + 3;498,488,472;, + 3;499,498,472;, + 3;500,471,468;, + 3;501,500,468;, + 3;499,472,471;, + 3;500,499,471;, + 3;502,466,488;, + 3;498,502,488;, + 3;503,467,466;, + 3;502,503,466;, + 3;501,468,467;, + 3;503,501,467;, + 3;475,498,499;, + 3;476,475,499;, + 3;477,500,501;, + 3;474,477,501;, + 3;476,499,500;, + 3;477,476,500;, + 3;482,502,498;, + 3;475,482,498;, + 3;481,503,502;, + 3;482,481,502;, + 3;474,501,503;, + 3;481,474,503;, + 3;504,505,506;, + 3;507,508,506;, + 3;509,510,511;, + 3;512,509,513;, + 3;507,512,514;, + 3;504,515,516;, + 3;517,518,515;, + 3;506,519,518;, + 3;506,508,519;, + 3;507,505,516;, + 3;510,520,521;, + 3;509,522,520;, + 3;511,521,523;, + 3;512,524,522;, + 3;513,523,525;, + 3;507,516,524;, + 3;514,525,519;, + 3;521,526,527;, + 3;522,528,520;, + 3;529,528,522;, + 3;527,530,525;, + 3;521,527,523;, + 3;530,531,532;, + 3;533,534,530;, + 3;532,535,519;, + 3;530,532,525;, + 3;524,536,529;, + 3;537,536,524;, + 3;538,537,516;, + 3;515,539,538;, + 3;535,540,518;, + 3;529,536,531;, + 3;541,542,543;, + 3;544,541,543;, + 3;545,541,544;, + 3;546,545,544;, + 3;547,545,546;, + 3;548,547,546;, + 3;549,547,548;, + 3;550,549,548;, + 3;551,549,550;, + 3;552,551,550;, + 3;553,551,552;, + 3;554,553,552;, + 3;555,553,554;, + 3;556,555,554;, + 3;542,555,556;, + 3;543,542,556;, + 3;557,558,542;, + 3;541,557,542;, + 3;559,557,541;, + 3;545,559,541;, + 3;560,559,545;, + 3;547,560,545;, + 3;561,560,547;, + 3;549,561,547;, + 3;562,561,549;, + 3;551,562,549;, + 3;563,562,551;, + 3;553,563,551;, + 3;564,563,553;, + 3;555,564,553;, + 3;558,564,555;, + 3;542,558,555;, + 3;565,566,558;, + 3;557,565,558;, + 3;561,567,560;, + 3;568,569,561;, + 3;562,568,561;, + 3;570,568,562;, + 3;563,570,562;, + 3;571,570,563;, + 3;566,571,564;, + 3;558,566,564;, + 3;572,573,574;, + 3;575,572,574;, + 3;436,435,573;, + 3;572,436,573;, + 3;576,402,401;, + 3;577,576,401;, + 3;578,407,402;, + 3;576,578,402;, + 3;579,410,407;, + 3;578,579,407;, + 3;580,413,410;, + 3;579,580,410;, + 3;581,415,413;, + 3;580,581,413;, + 3;582,576,577;, + 3;583,582,577;, + 3;584,578,576;, + 3;582,584,576;, + 3;585,579,578;, + 3;584,585,578;, + 3;586,580,579;, + 3;585,586,579;, + 3;587,581,580;, + 3;586,587,580;, + 3;588,582,583;, + 3;589,588,583;, + 3;590,584,582;, + 3;588,590,582;, + 3;591,585,584;, + 3;590,591,584;, + 3;592,586,585;, + 3;591,592,585;, + 3;593,587,586;, + 3;592,593,586;, + 3;569,590,588;, + 3;594,569,588;, + 3;568,591,590;, + 3;569,568,590;, + 3;570,592,591;, + 3;568,570,591;, + 3;595,593,592;, + 3;570,595,592;, + 3;571,595,570;, + 3;577,401,431;, + 3;596,577,431;, + 3;583,577,596;, + 3;597,583,596;, + 3;589,583,597;, + 3;598,589,597;, + 3;566,565,599;, + 3;599,565,600;, + 3;589,598,601;, + 3;602,589,601;, + 3;588,589,602;, + 3;594,588,602;, + 3;557,559,565;, + 3;602,601,603;, + 3;604,602,603;, + 3;569,594,567;, + 3;561,569,567;, + 3;594,602,604;, + 3;567,594,604;, + 3;560,567,604;, + 3;559,604,565;, + 3;604,603,600;, + 3;605,544,543;, + 3;606,605,543;, + 3;607,546,544;, + 3;605,607,544;, + 3;608,548,546;, + 3;607,608,546;, + 3;609,550,548;, + 3;608,609,548;, + 3;610,552,550;, + 3;609,610,550;, + 3;611,554,552;, + 3;610,611,552;, + 3;612,556,554;, + 3;611,612,554;, + 3;606,543,556;, + 3;612,606,556;, + 3;613,605,606;, + 3;614,613,606;, + 3;615,607,605;, + 3;613,615,605;, + 3;616,608,607;, + 3;615,616,607;, + 3;617,609,608;, + 3;616,617,608;, + 3;618,610,609;, + 3;617,618,609;, + 3;619,611,610;, + 3;618,619,610;, + 3;620,612,611;, + 3;619,620,611;, + 3;614,606,612;, + 3;620,614,612;, + 3;621,613,614;, + 3;622,621,614;, + 3;623,615,613;, + 3;621,623,613;, + 3;624,616,615;, + 3;623,624,615;, + 3;625,617,616;, + 3;624,625,616;, + 3;626,618,617;, + 3;625,626,617;, + 3;627,619,618;, + 3;626,627,618;, + 3;628,620,619;, + 3;627,628,619;, + 3;622,614,620;, + 3;628,622,620;, + 3;538,621,622;, + 3;539,623,621;, + 3;540,624,623;, + 3;535,625,624;, + 3;532,626,625;, + 3;531,627,626;, + 3;536,628,627;, + 3;537,622,628;, + 3;564,571,563;, + 3;565,604,600;, + 3;533,526,528;, + 3;518,540,539;, + 3;515,518,539;, + 3;531,534,529;, + 3;520,528,526;, + 3;521,520,526;, + 3;534,533,529;, + 3;526,533,527;, + 3;531,530,534;, + 3;517,504,506;, + 3;505,507,506;, + 3;513,509,511;, + 3;514,512,513;, + 3;508,507,514;, + 3;505,504,516;, + 3;504,517,515;, + 3;517,506,518;, + 3;511,510,521;, + 3;510,509,520;, + 3;513,511,523;, + 3;509,512,522;, + 3;514,513,525;, + 3;512,507,524;, + 3;508,514,519;, + 3;524,529,522;, + 3;523,527,525;, + 3;527,533,530;, + 3;525,532,519;, + 3;516,537,524;, + 3;515,538,516;, + 3;519,535,518;, + 3;537,538,622;, + 3;538,539,621;, + 3;539,540,623;, + 3;540,535,624;, + 3;535,532,625;, + 3;532,531,626;, + 3;531,536,627;, + 3;536,537,628;, + 3;529,533,528;, + 3;604,559,560;, + 3;573,629,574;, + 3;420,630,406;, + 3;573,435,417;, + 3;436,572,420;, + 3;417,399,629;, + 3;573,417,629;, + 3;572,575,630;, + 3;420,572,630;, + 3;631,629,399;, + 3;632,631,399;, + 3;633,406,630;, + 3;634,633,630;, + 3;632,399,406;, + 3;633,632,406;, + 3;635,574,629;, + 3;631,635,629;, + 3;636,575,574;, + 3;635,636,574;, + 3;634,630,575;, + 3;636,634,575;, + 3;637,631,632;, + 3;638,637,632;, + 3;639,633,634;, + 3;640,639,634;, + 3;638,632,633;, + 3;639,638,633;, + 3;641,635,631;, + 3;637,641,631;, + 3;642,636,635;, + 3;641,642,635;, + 3;640,634,636;, + 3;642,640,636;, + 3;643,637,638;, + 3;644,643,638;, + 3;645,639,640;, + 3;646,645,640;, + 3;644,638,639;, + 3;645,644,639;, + 3;647,641,637;, + 3;643,647,637;, + 3;648,642,641;, + 3;647,648,641;, + 3;646,640,642;, + 3;648,646,642;, + 3;649,643,644;, + 3;650,649,644;, + 3;651,645,646;, + 3;652,651,646;, + 3;650,644,645;, + 3;651,650,645;, + 3;653,647,643;, + 3;649,653,643;, + 3;654,648,647;, + 3;653,654,647;, + 3;652,646,648;, + 3;654,652,648;, + 3;655,649,650;, + 3;656,655,650;, + 3;657,651,652;, + 3;658,657,652;, + 3;656,650,651;, + 3;657,656,651;, + 3;659,653,649;, + 3;655,659,649;, + 3;660,654,653;, + 3;659,660,653;, + 3;658,652,654;, + 3;660,658,654;, + 3;661,655,656;, + 3;662,661,656;, + 3;657,663,664;, + 3;662,656,657;, + 3;664,662,657;, + 3;665,659,655;, + 3;661,665,655;, + 3;666,660,659;, + 3;665,666,659;, + 3;667,658,660;, + 3;666,667,660;, + 3;469,661,662;, + 3;470,469,662;, + 3;480,663,667;, + 3;662,478,470;, + 3;473,665,661;, + 3;469,473,661;, + 3;479,666,665;, + 3;473,479,665;, + 3;480,667,666;, + 3;479,480,666;, + 3;420,426,436;, + 3;488,479,473;, + 3;472,488,473;, + 3;658,667,663;, + 3;657,658,663;, + 3;487,664,663;, + 3;480,487,663;, + 3;664,487,478;, + 3;662,664,478;, + 3;484,483,480;, + 3;668,669,670;, + 3;668,670,671;, + 3;671,670,672;, + 3;673,674,675;, + 3;673,675,676;, + 3;675,677,676;, + 3;678,679,680;, + 3;678,680,681;, + 3;682,674,673;, + 3;682,673,672;, + 3;683,669,684;, + 3;679,685,686;, + 3;679,686,680;, + 3;687,688,689;, + 3;687,689,690;, + 3;670,691,682;, + 3;670,682,672;, + 3;669,668,692;, + 3;669,692,684;, + 3;687,693,688;, + 3;683,691,689;, + 3;670,694,691;, + 3;669,693,694;, + 3;669,694,670;, + 3;693,669,683;, + 3;693,683,688;, + 3;694,690,689;, + 3;694,689,691;, + 3;695,696,697;, + 3;695,697,698;, + 3;687,699,700;, + 3;687,700,693;, + 3;690,701,699;, + 3;690,699,687;, + 3;694,701,690;, + 3;693,700,694;, + 3;699,696,695;, + 3;699,695,700;, + 3;701,697,696;, + 3;701,696,699;, + 3;694,698,697;, + 3;694,697,701;, + 3;700,695,698;, + 3;700,698,694;, + 3;676,692,702;, + 3;676,702,703;, + 3;672,673,704;, + 3;672,704,705;, + 3;673,676,703;, + 3;673,703,704;, + 3;692,668,706;, + 3;692,706,702;, + 3;668,671,707;, + 3;668,707,706;, + 3;671,672,705;, + 3;671,705,707;, + 3;703,702,679;, + 3;703,679,678;, + 3;705,704,681;, + 3;705,681,680;, + 3;704,703,678;, + 3;704,678,681;, + 3;702,706,685;, + 3;702,685,679;, + 3;706,707,686;, + 3;706,686,685;, + 3;707,705,680;, + 3;707,680,686;, + 3;708,709,710;, + 3;708,711,712;, + 3;713,714,715;, + 3;716,715,717;, + 3;718,717,712;, + 3;719,720,710;, + 3;720,721,722;, + 3;721,723,708;, + 3;723,711,708;, + 3;719,709,712;, + 3;724,725,714;, + 3;725,726,715;, + 3;727,724,713;, + 3;726,728,717;, + 3;729,727,716;, + 3;728,719,712;, + 3;723,729,718;, + 3;730,731,724;, + 3;725,732,726;, + 3;726,732,733;, + 3;729,734,730;, + 3;727,730,724;, + 3;735,736,734;, + 3;734,737,738;, + 3;723,739,735;, + 3;729,735,734;, + 3;733,740,728;, + 3;728,740,741;, + 3;719,741,742;, + 3;742,743,720;, + 3;721,744,739;, + 3;736,740,733;, + 3;745,746,747;, + 3;745,747,748;, + 3;748,747,749;, + 3;748,749,750;, + 3;750,749,751;, + 3;750,751,752;, + 3;752,751,753;, + 3;752,753,754;, + 3;754,753,755;, + 3;754,755,756;, + 3;756,755,757;, + 3;756,757,758;, + 3;758,757,759;, + 3;758,759,760;, + 3;760,759,746;, + 3;760,746,745;, + 3;746,761,762;, + 3;746,762,747;, + 3;747,762,763;, + 3;747,763,749;, + 3;749,763,764;, + 3;749,764,751;, + 3;751,764,765;, + 3;751,765,753;, + 3;753,765,766;, + 3;753,766,755;, + 3;755,766,767;, + 3;755,767,757;, + 3;757,767,768;, + 3;757,768,759;, + 3;759,768,761;, + 3;759,761,746;, + 3;761,566,769;, + 3;761,769,762;, + 3;764,770,765;, + 3;765,771,772;, + 3;765,772,766;, + 3;766,772,773;, + 3;766,773,767;, + 3;767,773,571;, + 3;768,571,566;, + 3;768,566,761;, + 3;774,775,776;, + 3;774,776,777;, + 3;775,462,463;, + 3;775,463,776;, + 3;437,440,778;, + 3;437,778,779;, + 3;440,444,780;, + 3;440,780,778;, + 3;444,447,781;, + 3;444,781,780;, + 3;447,450,782;, + 3;447,782,781;, + 3;450,415,581;, + 3;450,581,782;, + 3;779,778,783;, + 3;779,783,784;, + 3;778,780,785;, + 3;778,785,783;, + 3;780,781,786;, + 3;780,786,785;, + 3;781,782,787;, + 3;781,787,786;, + 3;782,581,587;, + 3;782,587,787;, + 3;784,783,788;, + 3;784,788,789;, + 3;783,785,790;, + 3;783,790,788;, + 3;785,786,791;, + 3;785,791,790;, + 3;786,787,792;, + 3;786,792,791;, + 3;787,587,593;, + 3;787,593,792;, + 3;788,790,771;, + 3;788,771,793;, + 3;790,791,772;, + 3;790,772,771;, + 3;791,792,773;, + 3;791,773,772;, + 3;792,593,595;, + 3;792,595,773;, + 3;773,595,571;, + 3;431,437,779;, + 3;431,779,596;, + 3;596,779,784;, + 3;596,784,597;, + 3;597,784,789;, + 3;597,789,598;, + 3;599,769,566;, + 3;600,769,599;, + 3;601,598,789;, + 3;601,789,794;, + 3;794,789,788;, + 3;794,788,793;, + 3;769,763,762;, + 3;603,601,794;, + 3;603,794,795;, + 3;770,793,771;, + 3;770,771,765;, + 3;795,794,793;, + 3;795,793,770;, + 3;795,770,764;, + 3;769,795,763;, + 3;600,603,795;, + 3;745,748,796;, + 3;745,796,797;, + 3;748,750,798;, + 3;748,798,796;, + 3;750,752,799;, + 3;750,799,798;, + 3;752,754,800;, + 3;752,800,799;, + 3;754,756,801;, + 3;754,801,800;, + 3;756,758,802;, + 3;756,802,801;, + 3;758,760,803;, + 3;758,803,802;, + 3;760,745,797;, + 3;760,797,803;, + 3;797,796,804;, + 3;797,804,805;, + 3;796,798,806;, + 3;796,806,804;, + 3;798,799,807;, + 3;798,807,806;, + 3;799,800,808;, + 3;799,808,807;, + 3;800,801,809;, + 3;800,809,808;, + 3;801,802,810;, + 3;801,810,809;, + 3;802,803,811;, + 3;802,811,810;, + 3;803,797,805;, + 3;803,805,811;, + 3;805,804,812;, + 3;805,812,813;, + 3;804,806,814;, + 3;804,814,812;, + 3;806,807,815;, + 3;806,815,814;, + 3;807,808,816;, + 3;807,816,815;, + 3;808,809,817;, + 3;808,817,816;, + 3;809,810,818;, + 3;809,818,817;, + 3;810,811,819;, + 3;810,819,818;, + 3;811,805,813;, + 3;811,813,819;, + 3;813,812,742;, + 3;812,814,743;, + 3;814,815,744;, + 3;815,816,739;, + 3;816,817,735;, + 3;817,818,736;, + 3;818,819,740;, + 3;819,813,741;, + 3;767,571,768;, + 3;600,795,769;, + 3;732,731,738;, + 3;743,744,721;, + 3;743,721,720;, + 3;733,737,736;, + 3;731,732,725;, + 3;731,725,724;, + 3;733,738,737;, + 3;730,738,731;, + 3;737,734,736;, + 3;708,710,722;, + 3;708,712,709;, + 3;713,715,716;, + 3;716,717,718;, + 3;718,712,711;, + 3;719,710,709;, + 3;720,722,710;, + 3;721,708,722;, + 3;724,714,713;, + 3;725,715,714;, + 3;727,713,716;, + 3;726,717,715;, + 3;729,716,718;, + 3;728,712,717;, + 3;723,718,711;, + 3;726,733,728;, + 3;729,730,727;, + 3;734,738,730;, + 3;723,735,729;, + 3;728,741,719;, + 3;719,742,720;, + 3;721,739,723;, + 3;813,742,741;, + 3;812,743,742;, + 3;814,744,743;, + 3;815,739,744;, + 3;816,735,739;, + 3;817,736,735;, + 3;818,740,736;, + 3;819,741,740;, + 3;732,738,733;, + 3;764,763,795;, + 3;774,820,775;, + 3;443,821,454;, + 3;453,462,775;, + 3;454,776,463;, + 3;820,439,453;, + 3;820,453,775;, + 3;821,777,776;, + 3;821,776,454;, + 3;439,820,822;, + 3;439,822,823;, + 3;821,443,824;, + 3;821,824,825;, + 3;443,439,823;, + 3;443,823,824;, + 3;820,774,826;, + 3;820,826,822;, + 3;774,777,827;, + 3;774,827,826;, + 3;777,821,825;, + 3;777,825,827;, + 3;823,822,828;, + 3;823,828,829;, + 3;825,824,830;, + 3;825,830,831;, + 3;824,823,829;, + 3;824,829,830;, + 3;822,826,832;, + 3;822,832,828;, + 3;826,827,833;, + 3;826,833,832;, + 3;827,825,831;, + 3;827,831,833;, + 3;829,828,834;, + 3;829,834,835;, + 3;831,830,836;, + 3;831,836,837;, + 3;830,829,835;, + 3;830,835,836;, + 3;828,832,838;, + 3;828,838,834;, + 3;832,833,839;, + 3;832,839,838;, + 3;833,831,837;, + 3;833,837,839;, + 3;835,834,840;, + 3;835,840,841;, + 3;837,836,842;, + 3;837,842,843;, + 3;836,835,841;, + 3;836,841,842;, + 3;834,838,844;, + 3;834,844,840;, + 3;838,839,845;, + 3;838,845,844;, + 3;839,837,843;, + 3;839,843,845;, + 3;841,840,846;, + 3;841,846,847;, + 3;843,842,848;, + 3;843,848,849;, + 3;842,841,847;, + 3;842,847,848;, + 3;840,844,850;, + 3;840,850,846;, + 3;844,845,851;, + 3;844,851,850;, + 3;845,843,849;, + 3;845,849,851;, + 3;847,846,852;, + 3;847,852,853;, + 3;854,855,848;, + 3;848,847,853;, + 3;848,853,854;, + 3;846,850,856;, + 3;846,856,852;, + 3;850,851,857;, + 3;850,857,856;, + 3;851,849,858;, + 3;851,858,857;, + 3;853,852,675;, + 3;853,675,674;, + 3;858,855,683;, + 3;674,682,853;, + 3;852,856,677;, + 3;852,677,675;, + 3;856,857,684;, + 3;856,684,677;, + 3;857,858,683;, + 3;857,683,684;, + 3;677,684,692;, + 3;677,692,676;, + 3;855,858,849;, + 3;855,849,848;, + 3;855,854,691;, + 3;855,691,683;, + 3;682,691,854;, + 3;682,854,853;, + 3;683,689,688;, + 3;859,860,861;, + 3;862,859,861;, + 3;862,861,863;, + 3;864,862,863;, + 3;864,863,865;, + 3;866,864,865;, + 3;866,865,867;, + 3;868,866,867;, + 3;868,867,869;, + 3;870,868,869;, + 3;870,869,871;, + 3;872,870,871;, + 3;872,871,873;, + 3;874,872,873;, + 3;875,876,877;, + 3;878,875,877;, + 3;879,880,877;, + 3;880,881,878;, + 3;880,878,877;, + 3;880,863,861;, + 3;879,873,871;, + 3;879,871,869;, + 3;880,879,869;, + 3;880,869,867;, + 3;880,867,865;, + 3;880,865,863;, + 3;880,861,881;, + 3;881,861,860;, + 3;882,883,859;, + 3;862,882,859;, + 3;884,882,862;, + 3;864,884,862;, + 3;885,884,864;, + 3;866,885,864;, + 3;886,885,866;, + 3;868,886,866;, + 3;887,886,868;, + 3;870,887,868;, + 3;888,887,870;, + 3;872,888,870;, + 3;889,888,872;, + 3;874,889,872;, + 3;890,891,892;, + 3;893,890,892;, + 3;890,894,895;, + 3;893,896,894;, + 3;890,893,894;, + 3;882,884,894;, + 3;888,889,895;, + 3;887,888,895;, + 3;894,887,895;, + 3;886,887,894;, + 3;885,886,894;, + 3;884,885,894;, + 3;896,882,894;, + 3;883,882,896;, + 3;883,860,859;, + 3;889,874,873;, + 3;891,876,875;, + 3;892,891,875;, + 3;890,877,876;, + 3;891,890,876;, + 3;892,875,878;, + 3;893,892,878;, + 3;895,879,877;, + 3;890,895,877;, + 3;893,878,881;, + 3;896,893,881;, + 3;889,873,879;, + 3;895,889,879;, + 3;896,881,860;, + 3;883,896,860;, + 3;897,898,899;, + 3;900,901,898;, + 3;897,900,898;, + 3;902,903,904;, + 3;905,897,899;, + 3;906,900,897;, + 3;905,906,897;, + 3;907,903,902;, + 3;908,905,899;, + 3;909,906,905;, + 3;908,909,905;, + 3;910,903,907;, + 3;911,908,899;, + 3;912,909,908;, + 3;911,912,908;, + 3;913,903,910;, + 3;914,911,899;, + 3;915,912,911;, + 3;914,915,911;, + 3;916,903,913;, + 3;917,914,899;, + 3;918,915,914;, + 3;917,918,914;, + 3;919,903,916;, + 3;920,917,899;, + 3;921,918,917;, + 3;920,921,917;, + 3;922,903,919;, + 3;898,920,899;, + 3;901,921,920;, + 3;898,901,920;, + 3;904,903,922;, + 3;923,924,925;, + 3;926,923,925;, + 3;927,923,926;, + 3;928,927,926;, + 3;929,927,928;, + 3;930,929,928;, + 3;931,929,930;, + 3;932,931,930;, + 3;933,931,932;, + 3;934,933,932;, + 3;935,933,934;, + 3;936,935,934;, + 3;937,935,936;, + 3;938,937,936;, + 3;924,937,938;, + 3;925,924,938;, + 3;939,940,941;, + 3;942,939,941;, + 3;943,939,942;, + 3;944,943,942;, + 3;945,943,944;, + 3;946,945,944;, + 3;947,945,946;, + 3;948,947,946;, + 3;949,947,948;, + 3;950,949,948;, + 3;951,949,950;, + 3;952,951,950;, + 3;953,951,952;, + 3;954,953,952;, + 3;940,953,954;, + 3;941,940,954;, + 3;902,904,955;, + 3;956,902,955;, + 3;907,902,956;, + 3;957,907,956;, + 3;910,907,957;, + 3;958,910,957;, + 3;913,910,958;, + 3;959,913,958;, + 3;916,913,959;, + 3;960,916,959;, + 3;919,916,960;, + 3;961,919,960;, + 3;922,919,961;, + 3;962,922,961;, + 3;904,922,962;, + 3;955,904,962;, + 3;963,964,965;, + 3;966,963,965;, + 3;967,963,966;, + 3;968,967,966;, + 3;969,967,968;, + 3;970,969,968;, + 3;971,969,970;, + 3;972,971,970;, + 3;973,971,972;, + 3;974,973,972;, + 3;975,973,974;, + 3;976,975,974;, + 3;977,975,976;, + 3;978,977,976;, + 3;964,977,978;, + 3;965,964,978;, + 3;963,956,955;, + 3;964,963,955;, + 3;965,924,923;, + 3;966,965,923;, + 3;967,957,956;, + 3;963,967,956;, + 3;966,923,927;, + 3;968,966,927;, + 3;969,958,957;, + 3;967,969,957;, + 3;968,927,929;, + 3;970,968,929;, + 3;971,959,958;, + 3;969,971,958;, + 3;970,929,931;, + 3;972,970,931;, + 3;973,960,959;, + 3;971,973,959;, + 3;972,931,933;, + 3;974,972,933;, + 3;975,961,960;, + 3;973,975,960;, + 3;974,933,935;, + 3;976,974,935;, + 3;977,962,961;, + 3;975,977,961;, + 3;976,935,937;, + 3;978,976,937;, + 3;964,955,962;, + 3;977,964,962;, + 3;978,937,924;, + 3;965,978,924;, + 3;939,926,925;, + 3;940,939,925;, + 3;941,901,900;, + 3;942,941,900;, + 3;943,928,926;, + 3;939,943,926;, + 3;942,900,906;, + 3;944,942,906;, + 3;945,930,928;, + 3;943,945,928;, + 3;944,906,909;, + 3;946,944,909;, + 3;947,932,930;, + 3;945,947,930;, + 3;946,909,912;, + 3;948,946,912;, + 3;949,934,932;, + 3;947,949,932;, + 3;948,912,915;, + 3;950,948,915;, + 3;951,936,934;, + 3;949,951,934;, + 3;950,915,918;, + 3;952,950,918;, + 3;953,938,936;, + 3;951,953,936;, + 3;952,918,921;, + 3;954,952,921;, + 3;940,925,938;, + 3;953,940,938;, + 3;954,921,901;, + 3;941,954,901;; + } + + MeshTextureCoords + { + 1479; + 0.280615;0.558309;, + 0.352344;0.554924;, + 0.369747;0.634334;, + 0.289371;0.647432;, + 0.201996;0.558309;, + 0.201322;0.630433;, + 0.106905;0.558899;, + 0.111895;0.631083;, + 0.285424;0.558309;, + 0.345657;0.555196;, + 0.330844;0.522226;, + 0.271138;0.475430;, + 0.196666;0.558309;, + 0.197484;0.478011;, + 0.117133;0.559519;, + 0.134823;0.506295;, + 0.334255;0.513986;, + 0.294188;0.647073;, + 0.355995;0.630874;, + 0.277231;0.467783;, + 0.195995;0.630044;, + 0.198470;0.465449;, + 0.120283;0.629581;, + 0.129080;0.494225;, + 0.369747;0.634334;, + 0.352344;0.554924;, + 0.280615;0.558309;, + 0.289371;0.647432;, + 0.201996;0.558309;, + 0.201322;0.630433;, + 0.106905;0.558899;, + 0.111895;0.631083;, + 0.330844;0.522226;, + 0.345657;0.555196;, + 0.285424;0.558309;, + 0.271138;0.475430;, + 0.196666;0.558309;, + 0.197484;0.478011;, + 0.117133;0.559519;, + 0.134823;0.506295;, + 0.334255;0.513986;, + 0.294188;0.647073;, + 0.355995;0.630874;, + 0.277231;0.467783;, + 0.195995;0.630044;, + 0.198470;0.465449;, + 0.120283;0.629581;, + 0.129080;0.494225;, + 0.883088;0.082413;, + 0.952602;0.082413;, + 0.952602;0.124822;, + 0.886670;0.125688;, + 0.845982;0.082413;, + 0.853762;0.092854;, + 0.803697;0.099653;, + 0.818882;0.082413;, + 0.550187;0.108550;, + 0.549541;0.099912;, + 0.521198;0.108242;, + 0.570984;0.105166;, + 0.559898;0.090185;, + 0.524569;0.093462;, + 0.590036;0.104329;, + 0.609816;0.100136;, + 0.609816;0.094012;, + 0.599702;0.103594;, + 0.609816;0.120548;, + 0.595746;0.121809;, + 0.488608;0.098736;, + 0.584643;0.123322;, + 0.609816;0.131139;, + 0.599203;0.131643;, + 0.590592;0.133959;, + 0.576247;0.124880;, + 0.572237;0.121932;, + 0.573963;0.136508;, + 0.580782;0.133278;, + 0.576453;0.120504;, + 0.520895;0.082413;, + 0.488125;0.082413;, + 0.563259;0.082413;, + 0.609816;0.082413;, + 0.609816;0.138599;, + 0.578418;0.137559;, + 0.593845;0.139019;, + 0.572039;0.122828;, + 0.572039;0.137791;, + 0.564045;0.135397;, + 0.563414;0.125172;, + 0.551182;0.122339;, + 0.547324;0.144010;, + 0.522523;0.121370;, + 0.522461;0.151881;, + 0.491771;0.120638;, + 0.485200;0.143898;, + 0.771477;0.082413;, + 0.771542;0.101298;, + 0.768210;0.120830;, + 0.580931;0.158343;, + 0.570449;0.163309;, + 0.574303;0.168917;, + 0.585622;0.167880;, + 0.609816;0.155714;, + 0.609816;0.165248;, + 0.609816;0.140236;, + 0.589064;0.140091;, + 0.578822;0.152508;, + 0.609816;0.150620;, + 0.569837;0.139814;, + 0.563751;0.158980;, + 0.546868;0.146335;, + 0.563096;0.170687;, + 0.532636;0.154841;, + 0.548798;0.169209;, + 0.497169;0.176069;, + 0.488662;0.173898;, + 0.525106;0.183955;, + 0.528242;0.192703;, + 0.537397;0.191192;, + 0.575976;0.174984;, + 0.609816;0.171885;, + 0.502307;0.209559;, + 0.609816;0.205712;, + 0.579870;0.208627;, + 0.609816;0.249215;, + 0.590314;0.270046;, + 0.549502;0.223146;, + 0.443436;0.224306;, + 0.480367;0.239659;, + 0.518461;0.263323;, + 0.553895;0.290008;, + 0.454060;0.280620;, + 0.433337;0.267212;, + 0.451713;0.279666;, + 0.484038;0.286519;, + 0.502163;0.296979;, + 0.812102;0.170782;, + 0.805323;0.132241;, + 0.442623;0.287970;, + 0.444460;0.290005;, + 0.472601;0.298053;, + 0.490726;0.308513;, + 0.820616;0.294451;, + 0.872608;0.298270;, + 0.460271;0.313764;, + 0.865127;0.329289;, + 0.830969;0.345938;, + 0.863058;0.350187;, + 0.430798;0.359632;, + 0.855289;0.369545;, + 0.832614;0.410798;, + 0.977253;0.082413;, + 0.977253;0.124822;, + 0.850503;0.118681;, + 0.836291;0.132722;, + 0.977253;0.162733;, + 0.937459;0.164546;, + 0.893619;0.175809;, + 0.846623;0.200535;, + 0.977253;0.204540;, + 0.934116;0.216421;, + 0.894289;0.229689;, + 0.840330;0.248155;, + 0.785859;0.267591;, + 0.488679;0.064671;, + 0.509745;0.064671;, + 0.558410;0.064671;, + 0.577029;0.064671;, + 0.597051;0.064671;, + 0.629523;0.064671;, + 0.653262;0.064671;, + 0.681827;0.064671;, + 0.711831;0.064671;, + 0.737024;0.064671;, + 0.488679;0.034046;, + 0.509740;0.034046;, + 0.558329;0.034046;, + 0.576834;0.034046;, + 0.596904;0.034046;, + 0.629776;0.034046;, + 0.653633;0.034046;, + 0.681781;0.034046;, + 0.711631;0.034046;, + 0.737024;0.034046;, + 0.488679;0.004105;, + 0.514426;0.004105;, + 0.554945;0.004105;, + 0.573423;0.004093;, + 0.594608;0.004075;, + 0.630847;0.004069;, + 0.656329;0.004118;, + 0.683589;0.004140;, + 0.706125;0.004111;, + 0.737024;0.004098;, + 0.611020;0.319170;, + 0.589653;0.319147;, + 0.556708;0.337698;, + 0.551911;0.353407;, + 0.543980;0.366476;, + 0.548138;0.390036;, + 0.551860;0.407144;, + 0.567299;0.423136;, + 0.586676;0.432468;, + 0.611020;0.437138;, + 0.611020;0.381372;, + 0.952552;0.082413;, + 0.883037;0.082413;, + 0.886620;0.125688;, + 0.952552;0.124822;, + 0.853762;0.092854;, + 0.845982;0.082413;, + 0.818882;0.082413;, + 0.803697;0.099653;, + 0.698437;0.106805;, + 0.668654;0.099194;, + 0.669447;0.108550;, + 0.650225;0.105166;, + 0.695064;0.093462;, + 0.656860;0.093779;, + 0.629597;0.104329;, + 0.619931;0.103594;, + 0.623887;0.121809;, + 0.733040;0.099166;, + 0.634991;0.123322;, + 0.620430;0.131643;, + 0.629041;0.133959;, + 0.647396;0.121932;, + 0.643386;0.124880;, + 0.638851;0.133278;, + 0.645671;0.136508;, + 0.643180;0.120504;, + 0.736511;0.082413;, + 0.698740;0.082413;, + 0.656374;0.082413;, + 0.625788;0.139019;, + 0.641215;0.137559;, + 0.647594;0.137791;, + 0.647594;0.122828;, + 0.656219;0.125172;, + 0.655588;0.135397;, + 0.665576;0.120182;, + 0.672309;0.144010;, + 0.692798;0.120651;, + 0.697172;0.151881;, + 0.731433;0.119786;, + 0.744808;0.142253;, + 0.771477;0.082413;, + 0.771542;0.101298;, + 0.768210;0.120830;, + 0.649184;0.163309;, + 0.638702;0.158343;, + 0.634011;0.167880;, + 0.645330;0.168917;, + 0.630569;0.140091;, + 0.640811;0.152508;, + 0.649796;0.139814;, + 0.655882;0.158980;, + 0.672766;0.146335;, + 0.656537;0.170687;, + 0.670836;0.169209;, + 0.686998;0.154841;, + 0.720784;0.179724;, + 0.729290;0.177552;, + 0.696600;0.188791;, + 0.691392;0.192703;, + 0.643657;0.174984;, + 0.682237;0.191192;, + 0.710804;0.204162;, + 0.639763;0.208627;, + 0.629319;0.270046;, + 0.670131;0.223146;, + 0.774517;0.229178;, + 0.739679;0.241380;, + 0.711278;0.259955;, + 0.665739;0.290008;, + 0.766770;0.280022;, + 0.760151;0.282057;, + 0.771099;0.269284;, + 0.735595;0.286519;, + 0.717471;0.296979;, + 0.812102;0.170782;, + 0.805323;0.132241;, + 0.775600;0.289980;, + 0.771064;0.292089;, + 0.747034;0.300317;, + 0.728909;0.308513;, + 0.820616;0.294451;, + 0.872608;0.298270;, + 0.759362;0.313764;, + 0.865127;0.329289;, + 0.830969;0.345938;, + 0.863058;0.350187;, + 0.788837;0.359632;, + 0.855289;0.369545;, + 0.832614;0.410798;, + 0.836291;0.132722;, + 0.850503;0.118681;, + 0.937408;0.164546;, + 0.846623;0.200535;, + 0.893619;0.175809;, + 0.934066;0.216421;, + 0.894289;0.229689;, + 0.840330;0.248155;, + 0.785859;0.267591;, + 0.964301;0.064671;, + 0.917764;0.064671;, + 0.897016;0.064671;, + 0.876995;0.064671;, + 0.844523;0.064671;, + 0.820785;0.064671;, + 0.792219;0.064671;, + 0.762215;0.064671;, + 0.964306;0.034046;, + 0.917844;0.034046;, + 0.897212;0.034046;, + 0.877141;0.034046;, + 0.844270;0.034046;, + 0.820414;0.034046;, + 0.792265;0.034046;, + 0.762416;0.034046;, + 0.959620;0.004105;, + 0.921228;0.004105;, + 0.900623;0.004093;, + 0.879437;0.004075;, + 0.843198;0.004069;, + 0.817717;0.004118;, + 0.790457;0.004140;, + 0.767920;0.004111;, + 0.632386;0.319147;, + 0.665331;0.337698;, + 0.670129;0.353407;, + 0.678059;0.366476;, + 0.673901;0.390036;, + 0.670179;0.407144;, + 0.654740;0.423136;, + 0.635362;0.432468;, + 0.391029;0.473726;, + 0.369726;0.473726;, + 0.369726;0.506185;, + 0.375924;0.506185;, + 0.369196;0.401156;, + 0.348048;0.473726;, + 0.363152;0.506185;, + 0.369726;0.473726;, + 0.369726;0.506185;, + 0.348424;0.473726;, + 0.363527;0.506185;, + 0.389704;0.473726;, + 0.363527;0.506185;, + 0.371565;0.129504;, + 0.355624;0.129504;, + 0.355624;0.175198;, + 0.368648;0.175198;, + 0.386154;0.129504;, + 0.386565;0.175198;, + 0.401455;0.129504;, + 0.401455;0.175198;, + 0.416757;0.129504;, + 0.416346;0.175198;, + 0.431346;0.129504;, + 0.434263;0.175198;, + 0.355624;0.086776;, + 0.369098;0.086776;, + 0.383421;0.086776;, + 0.397779;0.086776;, + 0.416817;0.086776;, + 0.431140;0.086776;, + 0.355571;0.048160;, + 0.371528;0.048160;, + 0.383328;0.048160;, + 0.398025;0.048160;, + 0.411409;0.048160;, + 0.429026;0.048160;, + 0.400607;0.010969;, + 0.355624;0.175198;, + 0.355624;0.129504;, + 0.371565;0.129504;, + 0.368648;0.175198;, + 0.386154;0.129504;, + 0.386565;0.175198;, + 0.401455;0.129504;, + 0.401455;0.175198;, + 0.416757;0.129504;, + 0.416346;0.175198;, + 0.431346;0.129504;, + 0.434263;0.175198;, + 0.355624;0.086776;, + 0.369098;0.086776;, + 0.383421;0.086776;, + 0.397779;0.086776;, + 0.416817;0.086776;, + 0.431140;0.086776;, + 0.355571;0.048160;, + 0.371528;0.048160;, + 0.383328;0.048160;, + 0.398025;0.048160;, + 0.411409;0.048160;, + 0.429026;0.048160;, + 0.400607;0.010969;, + 0.517951;0.890433;, + 0.427137;0.883950;, + 0.435186;0.982633;, + 0.510383;0.975251;, + 0.415278;0.689727;, + 0.370135;0.659013;, + 0.391969;0.701679;, + 0.572844;0.892869;, + 0.567696;0.972005;, + 0.425793;0.670568;, + 0.625334;0.894379;, + 0.629035;0.955158;, + 0.715766;0.705303;, + 0.712791;0.895888;, + 0.712791;0.942076;, + 0.744180;0.713567;, + 0.777555;0.942076;, + 0.777555;0.895888;, + 0.503275;0.813897;, + 0.440512;0.799365;, + 0.629357;0.811287;, + 0.584542;0.818759;, + 0.720847;0.803956;, + 0.777555;0.803956;, + 0.480556;0.722650;, + 0.402939;0.738043;, + 0.900980;0.491809;, + 0.873420;0.492783;, + 0.732693;0.753223;, + 0.370135;0.701679;, + 0.370135;0.731323;, + 0.370135;0.883950;, + 0.370135;0.982633;, + 0.777555;0.713567;, + 0.370135;0.799365;, + 0.777555;0.751715;, + 0.836156;0.510838;, + 0.873268;0.519740;, + 0.305207;0.982633;, + 0.313256;0.883950;, + 0.222442;0.890433;, + 0.230010;0.975251;, + 0.343249;0.701679;, + 0.325115;0.689727;, + 0.176734;0.894092;, + 0.180046;0.971166;, + 0.314600;0.670568;, + 0.935726;0.894379;, + 0.942692;0.955158;, + 0.838894;0.705303;, + 0.841869;0.895888;, + 0.841869;0.942076;, + 0.810480;0.713567;, + 0.299881;0.799365;, + 0.237118;0.813897;, + 0.970118;0.818759;, + 0.914636;0.811287;, + 0.833813;0.803956;, + 0.332279;0.738043;, + 0.259837;0.722650;, + 0.873420;0.492783;, + 0.900980;0.491809;, + 0.821967;0.753223;, + 0.836156;0.510838;, + 0.873268;0.519740;, + 0.918959;0.405681;, + 0.898498;0.429269;, + 0.894966;0.400969;, + 0.990199;0.426294;, + 0.947165;0.384354;, + 0.971267;0.413782;, + 0.956838;0.417097;, + 0.967154;0.447736;, + 0.978365;0.446699;, + 0.955778;0.486085;, + 0.940586;0.319616;, + 0.944732;0.317124;, + 0.975241;0.318740;, + 0.975564;0.320794;, + 0.943364;0.442528;, + 0.928589;0.476796;, + 0.906900;0.466579;, + 0.904555;0.321383;, + 0.903345;0.321307;, + 0.907629;0.434826;, + 0.885399;0.445480;, + 0.875628;0.426406;, + 0.896440;0.422435;, + 0.926290;0.443429;, + 0.953860;0.405111;, + 0.892791;0.421365;, + 0.910186;0.401974;, + 0.882443;0.367108;, + 0.872030;0.376435;, + 0.888582;0.381286;, + 0.896041;0.370924;, + 0.894747;0.401967;, + 0.872978;0.406447;, + 0.891864;0.404921;, + 0.951217;0.361266;, + 0.986172;0.364345;, + 0.987166;0.358691;, + 0.945619;0.365525;, + 0.896655;0.370095;, + 0.987594;0.438274;, + 0.063348;0.627819;, + 0.077953;0.584320;, + 0.011718;0.584154;, + 0.079060;0.581589;, + 0.013910;0.580729;, + 0.080683;0.486679;, + 0.059355;0.473666;, + 0.029863;0.472997;, + 0.071135;0.548371;, + 0.009488;0.486523;, + 0.010087;0.551560;, + 0.100741;0.470991;, + 0.097934;0.479430;, + 0.107691;0.470245;, + 0.107687;0.470545;, + 0.110970;0.479430;, + 0.101601;0.502242;, + 0.107919;0.502385;, + 0.097032;0.499086;, + 0.110626;0.499488;, + 0.099079;0.486255;, + 0.111420;0.485572;, + 0.106250;0.421203;, + 0.078698;0.426763;, + 0.127709;0.425565;, + 0.172089;0.424328;, + 0.166487;0.427056;, + 0.050569;0.412161;, + 0.035610;0.406526;, + 0.052377;0.444396;, + 0.051832;0.429629;, + 0.227606;0.399193;, + 0.205078;0.399390;, + 0.229717;0.399311;, + 0.254647;0.399270;, + 0.272080;0.399407;, + 0.252416;0.399142;, + 0.070362;0.287393;, + 0.016046;0.293476;, + 0.016046;0.324669;, + 0.072292;0.324669;, + 0.113194;0.285322;, + 0.113279;0.324669;, + 0.158180;0.271515;, + 0.163873;0.324669;, + 0.206640;0.268446;, + 0.206640;0.324669;, + 0.247941;0.274515;, + 0.242835;0.324669;, + 0.283810;0.288322;, + 0.278594;0.324669;, + 0.311221;0.290393;, + 0.315308;0.324669;, + 0.068945;0.235193;, + 0.016046;0.240473;, + 0.108219;0.207433;, + 0.152927;0.178981;, + 0.206640;0.167059;, + 0.252867;0.175304;, + 0.288891;0.212805;, + 0.318162;0.231991;, + 0.065705;0.198441;, + 0.016046;0.208214;, + 0.155878;0.116450;, + 0.260626;0.086608;, + 0.206640;0.069824;, + 0.297131;0.129663;, + 0.334772;0.190121;, + 0.877720;0.549659;, + 0.835118;0.546998;, + 0.835052;0.586744;, + 0.876715;0.589598;, + 0.068252;0.887184;, + 0.089066;0.958830;, + 0.046998;0.832490;, + 0.029357;0.785551;, + 0.023073;0.712469;, + 0.023073;0.674844;, + 0.145853;0.888391;, + 0.143516;0.958116;, + 0.177991;0.831961;, + 0.197564;0.786458;, + 0.213185;0.711950;, + 0.215318;0.674844;, + 0.157821;0.890682;, + 0.156902;0.959254;, + 0.190868;0.832283;, + 0.205079;0.782164;, + 0.223096;0.710534;, + 0.225229;0.674844;, + 0.153638;0.053327;, + 0.334772;0.160303;, + 0.086938;0.892203;, + 0.143516;0.891840;, + 0.156902;0.892732;, + 0.055189;0.189485;, + 0.065223;0.170997;, + 0.067039;0.047965;, + 0.105565;0.048142;, + 0.068508;0.117444;, + 0.107800;0.133075;, + 0.343109;0.380090;, + 0.323832;0.383288;, + 0.355057;0.385320;, + 0.206829;0.384744;, + 0.234567;0.382514;, + 0.257187;0.388855;, + 0.276919;0.382594;, + 0.298064;0.380974;, + 0.344860;0.373637;, + 0.325680;0.376362;, + 0.354260;0.377471;, + 0.204463;0.374769;, + 0.233180;0.376205;, + 0.251611;0.377892;, + 0.277423;0.373836;, + 0.298171;0.373284;, + 0.140035;0.355838;, + 0.100853;0.355882;, + 0.154296;0.355147;, + 0.169423;0.354964;, + 0.097884;0.347432;, + 0.078303;0.359102;, + 0.054330;0.360424;, + 0.076810;0.360458;, + 0.784640;0.576144;, + 0.931041;0.562636;, + 0.783145;0.623006;, + 0.702517;0.610617;, + 0.985871;0.600609;, + 0.931288;0.605739;, + 0.844017;0.627798;, + 0.881038;0.614886;, + 0.782830;0.648292;, + 0.697657;0.637050;, + 0.985871;0.627042;, + 0.929760;0.623529;, + 0.843533;0.654056;, + 0.883177;0.641144;, + 0.454991;0.524293;, + 0.410274;0.510212;, + 0.603777;0.507259;, + 0.564440;0.512230;, + 0.487397;0.524067;, + 0.520078;0.523358;, + 0.455289;0.523505;, + 0.409861;0.511667;, + 0.604047;0.509031;, + 0.564126;0.512622;, + 0.488686;0.521909;, + 0.523239;0.524440;, + 0.449119;0.565596;, + 0.407333;0.554503;, + 0.605049;0.554831;, + 0.569952;0.558712;, + 0.492583;0.572056;, + 0.526891;0.572306;, + 0.436540;0.611713;, + 0.402027;0.604724;, + 0.585826;0.605834;, + 0.606428;0.604934;, + 0.491624;0.615716;, + 0.535771;0.615875;, + 0.577581;0.606189;, + 0.894966;0.400969;, + 0.898498;0.429269;, + 0.918959;0.405681;, + 0.902644;0.387762;, + 0.947165;0.384354;, + 0.969630;0.436914;, + 0.966359;0.469649;, + 0.985675;0.467648;, + 0.988300;0.434689;, + 0.955778;0.486085;, + 0.975241;0.318740;, + 0.944732;0.317124;, + 0.940586;0.319616;, + 0.975564;0.320794;, + 0.943364;0.442528;, + 0.906900;0.466579;, + 0.928589;0.476796;, + 0.903345;0.321307;, + 0.903853;0.322786;, + 0.875628;0.426406;, + 0.885399;0.445480;, + 0.907629;0.434826;, + 0.896440;0.422435;, + 0.926290;0.443429;, + 0.953860;0.405111;, + 0.892791;0.421365;, + 0.910186;0.401974;, + 0.888582;0.381286;, + 0.872030;0.376435;, + 0.882443;0.367108;, + 0.896041;0.370924;, + 0.872978;0.406447;, + 0.894747;0.401967;, + 0.891864;0.404921;, + 0.951217;0.361266;, + 0.986172;0.364345;, + 0.987166;0.358691;, + 0.945619;0.365525;, + 0.896655;0.370095;, + 0.899278;0.370234;, + 0.011718;0.584154;, + 0.077953;0.584320;, + 0.063348;0.627819;, + 0.013910;0.580729;, + 0.079060;0.581589;, + 0.029863;0.472997;, + 0.059355;0.473666;, + 0.080683;0.486679;, + 0.009488;0.486523;, + 0.071135;0.548371;, + 0.010087;0.551560;, + 0.097961;0.479430;, + 0.100768;0.470991;, + 0.107714;0.470545;, + 0.107717;0.470245;, + 0.110997;0.479430;, + 0.107946;0.502385;, + 0.101628;0.502242;, + 0.097059;0.499086;, + 0.110653;0.499488;, + 0.099105;0.486255;, + 0.111447;0.485572;, + 0.078698;0.426763;, + 0.106250;0.421203;, + 0.127709;0.425565;, + 0.172089;0.424328;, + 0.166487;0.427056;, + 0.035610;0.406526;, + 0.050569;0.412161;, + 0.051832;0.429629;, + 0.052377;0.444396;, + 0.227606;0.399193;, + 0.205078;0.399390;, + 0.229717;0.399311;, + 0.254647;0.399270;, + 0.272080;0.399407;, + 0.252416;0.399142;, + 0.016046;0.324669;, + 0.016046;0.293476;, + 0.070362;0.287393;, + 0.072292;0.324669;, + 0.113194;0.285322;, + 0.113279;0.324669;, + 0.158180;0.271515;, + 0.163873;0.324669;, + 0.206640;0.268446;, + 0.206640;0.324669;, + 0.247941;0.274515;, + 0.242835;0.324669;, + 0.283810;0.288322;, + 0.278594;0.324669;, + 0.311221;0.290393;, + 0.315308;0.324669;, + 0.016046;0.240473;, + 0.068945;0.235193;, + 0.108219;0.207433;, + 0.152927;0.178981;, + 0.206640;0.167059;, + 0.252867;0.175304;, + 0.288891;0.212805;, + 0.318162;0.231991;, + 0.065705;0.198441;, + 0.155878;0.116450;, + 0.206640;0.069824;, + 0.260626;0.086608;, + 0.297131;0.129663;, + 0.835052;0.586744;, + 0.835118;0.546998;, + 0.877720;0.549659;, + 0.876715;0.589598;, + 0.068252;0.887184;, + 0.089066;0.958830;, + 0.046998;0.832490;, + 0.029357;0.785551;, + 0.023073;0.712469;, + 0.145853;0.888391;, + 0.143516;0.958116;, + 0.177991;0.831961;, + 0.197564;0.786458;, + 0.213185;0.711950;, + 0.157821;0.890682;, + 0.156902;0.959254;, + 0.190868;0.832283;, + 0.205079;0.782164;, + 0.223096;0.710534;, + 0.153638;0.053327;, + 0.105565;0.048142;, + 0.107800;0.133075;, + 0.343109;0.380090;, + 0.323832;0.383288;, + 0.355057;0.385320;, + 0.206829;0.384744;, + 0.234567;0.382514;, + 0.257187;0.388855;, + 0.276919;0.382594;, + 0.298064;0.380974;, + 0.344860;0.373637;, + 0.325680;0.376362;, + 0.354260;0.377471;, + 0.204463;0.374769;, + 0.233180;0.376205;, + 0.251611;0.377892;, + 0.277423;0.373836;, + 0.298171;0.373284;, + 0.140035;0.355838;, + 0.100853;0.355882;, + 0.154296;0.355147;, + 0.169423;0.354964;, + 0.097884;0.347432;, + 0.078303;0.359102;, + 0.054330;0.360424;, + 0.076810;0.360458;, + 0.784640;0.576144;, + 0.931041;0.562636;, + 0.783145;0.623006;, + 0.702517;0.610617;, + 0.985871;0.600609;, + 0.931288;0.605739;, + 0.844017;0.627798;, + 0.881038;0.614886;, + 0.782830;0.648292;, + 0.697657;0.637050;, + 0.985871;0.627042;, + 0.929760;0.623529;, + 0.843533;0.654056;, + 0.883177;0.641144;, + 0.454991;0.524293;, + 0.410274;0.510212;, + 0.603777;0.507259;, + 0.564440;0.512230;, + 0.487397;0.524067;, + 0.520078;0.523358;, + 0.455289;0.523505;, + 0.409861;0.511667;, + 0.604047;0.509031;, + 0.564126;0.512622;, + 0.488686;0.521909;, + 0.523239;0.524440;, + 0.449119;0.565596;, + 0.407333;0.554503;, + 0.605049;0.554831;, + 0.569952;0.558712;, + 0.492583;0.572056;, + 0.526891;0.572306;, + 0.436540;0.611713;, + 0.402027;0.604724;, + 0.606428;0.604934;, + 0.585826;0.605834;, + 0.491624;0.615716;, + 0.535771;0.615875;, + 0.577581;0.606189;, + 0.225629;0.906647;, + 0.257118;0.770403;, + 0.196806;0.682930;, + 0.100224;0.753850;, + 0.159871;0.589702;, + 0.034839;0.630259;, + 0.147435;0.493553;, + 0.018893;0.506986;, + 0.159871;0.397404;, + 0.034839;0.383712;, + 0.196806;0.304177;, + 0.082196;0.264183;, + 0.257118;0.216703;, + 0.159520;0.152032;, + 0.314932;0.166093;, + 0.318555;0.018152;, + 0.554152;0.626886;, + 0.557998;0.322535;, + 0.442610;0.296521;, + 0.431074;0.650296;, + 0.350303;0.254902;, + 0.336420;0.485623;, + 0.323379;0.702323;, + 0.196806;0.682655;, + 0.257118;0.770128;, + 0.159871;0.589427;, + 0.147435;0.493278;, + 0.159871;0.397130;, + 0.196806;0.303901;, + 0.257118;0.216428;, + 0.314932;0.165818;, + 0.442610;0.296246;, + 0.557998;0.322260;, + 0.554152;0.626611;, + 0.431074;0.650021;, + 0.336420;0.485348;, + 0.350303;0.254627;, + 0.323379;0.702048;, + 0.438450;0.893948;, + 0.393391;0.912613;, + 0.393391;0.848889;, + 0.731679;0.669200;, + 0.682021;0.669200;, + 0.496696;0.202288;, + 0.450065;0.155657;, + 0.450065;0.221604;, + 0.457115;0.848889;, + 0.781335;0.669200;, + 0.516012;0.155657;, + 0.438450;0.803826;, + 0.830993;0.669200;, + 0.496696;0.109022;, + 0.393391;0.785161;, + 0.880650;0.669200;, + 0.450065;0.089706;, + 0.348331;0.803826;, + 0.930304;0.669200;, + 0.403431;0.109022;, + 0.329666;0.848889;, + 0.979961;0.669200;, + 0.384118;0.155657;, + 0.348331;0.893948;, + 0.632365;0.669200;, + 0.403431;0.202288;, + 0.731679;0.199240;, + 0.682021;0.199240;, + 0.682021;0.474517;, + 0.731679;0.474517;, + 0.781335;0.199240;, + 0.781335;0.474517;, + 0.830993;0.199240;, + 0.830993;0.474517;, + 0.880650;0.199240;, + 0.880650;0.474517;, + 0.930304;0.199240;, + 0.930304;0.474517;, + 0.979961;0.199240;, + 0.979961;0.474517;, + 0.632365;0.199240;, + 0.632365;0.474517;, + 0.731679;0.480018;, + 0.682021;0.480018;, + 0.682021;0.663701;, + 0.731679;0.663701;, + 0.781335;0.480018;, + 0.781335;0.663701;, + 0.830993;0.480018;, + 0.830993;0.663701;, + 0.880650;0.480018;, + 0.880650;0.663701;, + 0.930304;0.480018;, + 0.930304;0.663701;, + 0.979961;0.480018;, + 0.979961;0.663701;, + 0.632365;0.480018;, + 0.632365;0.663701;, + 0.682021;0.038480;, + 0.731679;0.038480;, + 0.781335;0.038480;, + 0.830993;0.038480;, + 0.880650;0.038480;, + 0.930304;0.038480;, + 0.979961;0.038480;, + 0.632365;0.038480;, + 0.731679;0.038480;, + 0.682021;0.038480;, + 0.682021;0.199240;, + 0.731679;0.199240;, + 0.781335;0.038480;, + 0.781335;0.199240;, + 0.830993;0.038480;, + 0.830993;0.199240;, + 0.880650;0.038480;, + 0.880650;0.199240;, + 0.930304;0.038480;, + 0.930304;0.199240;, + 0.979961;0.038480;, + 0.979961;0.199240;, + 0.632365;0.038480;, + 0.632365;0.199240;, + 0.736511;0.082413;, + 0.733040;0.099166;, + 0.731433;0.119786;, + 0.744808;0.142253;, + 0.775285;0.229227;, + 0.825553;0.282190;, + 0.852349;0.284159;, + 0.402107;0.302317;, + 0.874543;0.302145;, + 0.852790;0.291030;, + 0.822925;0.307724;, + 0.404511;0.315541;, + 0.495438;0.334057;, + 0.395519;0.350837;, + 0.829692;0.356466;, + 0.396977;0.360710;, + 0.452126;0.371941;, + 0.404138;0.409819;, + 0.832399;0.409796;, + 0.850805;0.118056;, + 0.854157;0.093477;, + 0.836994;0.132361;, + 0.426443;0.264001;, + 0.846071;0.082413;, + 0.488679;0.071330;, + 0.509864;0.071330;, + 0.561990;0.071330;, + 0.574974;0.071330;, + 0.596153;0.071330;, + 0.630507;0.071330;, + 0.655447;0.071330;, + 0.685261;0.071330;, + 0.711741;0.071330;, + 0.737024;0.071330;, + 0.611020;0.297027;, + 0.572843;0.296995;, + 0.529308;0.322515;, + 0.522962;0.344128;, + 0.512484;0.362103;, + 0.517972;0.394490;, + 0.522892;0.418014;, + 0.543315;0.440027;, + 0.568927;0.452870;, + 0.611020;0.459291;, + 0.775285;0.229227;, + 0.825553;0.282190;, + 0.852349;0.284159;, + 0.817527;0.302317;, + 0.874543;0.302145;, + 0.822925;0.307724;, + 0.852790;0.291030;, + 0.815123;0.315541;, + 0.724198;0.334057;, + 0.824114;0.350837;, + 0.829692;0.356466;, + 0.822656;0.360710;, + 0.767508;0.371941;, + 0.815497;0.409819;, + 0.832399;0.409796;, + 0.854106;0.093477;, + 0.850754;0.118056;, + 0.836944;0.132361;, + 0.784785;0.267655;, + 0.846020;0.082413;, + 0.985368;0.071330;, + 0.985368;0.064671;, + 0.964181;0.071330;, + 0.920566;0.071330;, + 0.899072;0.071330;, + 0.877892;0.071330;, + 0.843538;0.071330;, + 0.818598;0.071330;, + 0.788785;0.071330;, + 0.762305;0.071330;, + 0.985368;0.034046;, + 0.985368;0.004105;, + 0.649194;0.296995;, + 0.692732;0.322515;, + 0.699077;0.344128;, + 0.709556;0.362103;, + 0.704068;0.394490;, + 0.699148;0.418014;, + 0.678724;0.440027;, + 0.653112;0.452870;, + 0.348048;0.473726;, + 0.363152;0.506185;, + 0.369880;0.401156;, + 0.391029;0.473726;, + 0.375924;0.506185;, + 0.389704;0.473726;, + 0.374601;0.506185;, + 0.348424;0.473726;, + 0.368932;0.401156;, + 0.452400;0.129504;, + 0.452400;0.175198;, + 0.452400;0.086776;, + 0.452347;0.048160;, + 0.452400;0.129504;, + 0.452400;0.175198;, + 0.452400;0.086776;, + 0.452347;0.048160;, + 0.517436;0.890028;, + 0.510531;0.976844;, + 0.572671;0.894379;, + 0.568342;0.971093;, + 0.777555;0.678284;, + 0.694161;0.680784;, + 0.930651;0.528982;, + 0.636790;0.729840;, + 0.497690;0.695873;, + 0.625202;0.706393;, + 0.829864;0.489448;, + 0.791888;0.522384;, + 0.370258;0.659013;, + 0.230175;0.975238;, + 0.222812;0.890877;, + 0.990199;0.971093;, + 0.985870;0.894379;, + 0.860499;0.680784;, + 0.930651;0.528982;, + 0.917870;0.729840;, + 0.370258;0.731323;, + 0.370258;0.701679;, + 0.242703;0.695873;, + 0.929458;0.706393;, + 0.370258;0.883950;, + 0.370258;0.982633;, + 0.370258;0.799365;, + 0.791888;0.522384;, + 0.829864;0.489448;, + 0.986396;0.412257;, + 0.975310;0.418268;, + 0.902644;0.387762;, + 0.994669;0.402101;, + 0.981890;0.469917;, + 0.995134;0.390231;, + 0.984220;0.450300;, + 0.603782;0.643446;, + 0.609341;0.643446;, + 0.582531;0.643446;, + 0.973521;0.462071;, + 0.963886;0.460904;, + 0.973851;0.440898;, + 0.899278;0.370234;, + 0.961957;0.475718;, + 0.956964;0.472868;, + 0.985692;0.467093;, + 0.973104;0.465610;, + 0.100745;0.470691;, + 0.111438;0.479862;, + 0.110968;0.480595;, + 0.097932;0.480595;, + 0.098169;0.480010;, + 0.101601;0.502243;, + 0.097031;0.499087;, + 0.107919;0.502387;, + 0.099077;0.486238;, + 0.110626;0.499489;, + 0.111419;0.485555;, + 0.086807;0.443269;, + 0.132822;0.441307;, + 0.113511;0.444424;, + 0.140395;0.423608;, + 0.135060;0.441158;, + 0.136342;0.424943;, + 0.198735;0.443346;, + 0.075366;0.444316;, + 0.027868;0.432074;, + 0.208127;0.399315;, + 0.227674;0.440235;, + 0.195515;0.443409;, + 0.227674;0.438745;, + 0.267237;0.439863;, + 0.256190;0.399124;, + 0.269540;0.435635;, + 0.071134;0.428124;, + 0.066616;0.410202;, + 0.367433;0.293476;, + 0.367433;0.324669;, + 0.367433;0.240473;, + 0.367433;0.208214;, + 0.057618;0.889801;, + 0.075217;0.960259;, + 0.039094;0.831536;, + 0.022855;0.783300;, + 0.016830;0.710664;, + 0.016830;0.674844;, + 0.206640;0.029904;, + 0.152154;0.014424;, + 0.263299;0.059838;, + 0.297418;0.072112;, + 0.334772;0.081782;, + 0.073089;0.893078;, + 0.101798;0.013560;, + 0.065925;0.013560;, + 0.339698;0.346140;, + 0.322500;0.345093;, + 0.349771;0.347008;, + 0.206286;0.347083;, + 0.187234;0.346447;, + 0.192520;0.385320;, + 0.233624;0.344280;, + 0.264945;0.347083;, + 0.283942;0.347008;, + 0.302605;0.346140;, + 0.302349;0.346140;, + 0.297808;0.380974;, + 0.191723;0.377471;, + 0.297916;0.373284;, + 0.141389;0.337516;, + 0.096555;0.337516;, + 0.155781;0.337516;, + 0.141143;0.337516;, + 0.139486;0.355087;, + 0.169423;0.337516;, + 0.094962;0.337516;, + 0.139682;0.337516;, + 0.139079;0.356255;, + 0.070832;0.337516;, + 0.059451;0.337516;, + 0.037745;0.337516;, + 0.034063;0.355263;, + 0.069376;0.337516;, + 0.070089;0.337516;, + 0.078341;0.360000;, + 0.140295;0.410202;, + 0.154671;0.410202;, + 0.169423;0.410202;, + 0.106374;0.410202;, + 0.066616;0.410202;, + 0.050267;0.412054;, + 0.108395;0.410202;, + 0.052779;0.459751;, + 0.069646;0.449516;, + 0.301467;0.437159;, + 0.303759;0.398990;, + 0.031124;0.452374;, + 0.027488;0.628182;, + 0.133164;0.444513;, + 0.267437;0.438220;, + 0.140673;0.410202;, + 0.138160;0.410202;, + 0.035715;0.406444;, + 0.983283;0.552269;, + 0.717768;0.549735;, + 0.665848;0.551563;, + 0.665848;0.603961;, + 0.665848;0.624999;, + 0.465080;0.495146;, + 0.416895;0.485971;, + 0.596048;0.486003;, + 0.554443;0.490049;, + 0.648116;0.507207;, + 0.653986;0.485971;, + 0.495199;0.500632;, + 0.453668;0.524293;, + 0.520895;0.500658;, + 0.647703;0.508662;, + 0.453966;0.523505;, + 0.644424;0.554503;, + 0.639118;0.604724;, + 0.427648;0.643446;, + 0.408566;0.643446;, + 0.620138;0.643446;, + 0.645657;0.643446;, + 0.510273;0.643446;, + 0.560244;0.643446;, + 0.981890;0.469917;, + 0.994669;0.402101;, + 0.984220;0.450300;, + 0.995134;0.390231;, + 0.582531;0.643446;, + 0.609341;0.643446;, + 0.603782;0.643446;, + 0.987227;0.416442;, + 0.963436;0.423164;, + 0.960557;0.404342;, + 0.955628;0.408440;, + 0.100772;0.470691;, + 0.111465;0.479862;, + 0.110995;0.480595;, + 0.098196;0.480010;, + 0.097958;0.480595;, + 0.101627;0.502243;, + 0.097058;0.499087;, + 0.107946;0.502387;, + 0.099104;0.486238;, + 0.110652;0.499489;, + 0.111445;0.485555;, + 0.086807;0.443269;, + 0.113511;0.444424;, + 0.132822;0.441307;, + 0.135060;0.441158;, + 0.140395;0.423608;, + 0.198735;0.443346;, + 0.136342;0.424943;, + 0.075366;0.444316;, + 0.027868;0.432074;, + 0.227674;0.440235;, + 0.208127;0.399315;, + 0.195515;0.443409;, + 0.227674;0.438745;, + 0.256190;0.399124;, + 0.267237;0.439863;, + 0.269540;0.435635;, + 0.066616;0.410202;, + 0.071134;0.428124;, + 0.367433;0.293476;, + 0.367433;0.324669;, + 0.367433;0.240473;, + 0.075217;0.960259;, + 0.057618;0.889801;, + 0.039094;0.831536;, + 0.022855;0.783300;, + 0.016830;0.710664;, + 0.152154;0.014424;, + 0.206640;0.029904;, + 0.263299;0.059838;, + 0.297418;0.072112;, + 0.101798;0.013560;, + 0.322500;0.345093;, + 0.339698;0.346140;, + 0.349771;0.347008;, + 0.187234;0.346447;, + 0.206286;0.347083;, + 0.192520;0.385320;, + 0.233624;0.344280;, + 0.264945;0.347083;, + 0.283942;0.347008;, + 0.302605;0.346140;, + 0.302349;0.346140;, + 0.297808;0.380974;, + 0.191723;0.377471;, + 0.297916;0.373284;, + 0.096555;0.337516;, + 0.141389;0.337516;, + 0.141143;0.337516;, + 0.155781;0.337516;, + 0.139486;0.355087;, + 0.169423;0.337516;, + 0.139682;0.337516;, + 0.094962;0.337516;, + 0.139079;0.356255;, + 0.070832;0.337516;, + 0.037745;0.337516;, + 0.059451;0.337516;, + 0.034063;0.355263;, + 0.069376;0.337516;, + 0.070089;0.337516;, + 0.078341;0.360000;, + 0.140295;0.410202;, + 0.154671;0.410202;, + 0.169423;0.410202;, + 0.106374;0.410202;, + 0.066616;0.410202;, + 0.050267;0.412054;, + 0.108395;0.410202;, + 0.069646;0.449516;, + 0.052779;0.459751;, + 0.303759;0.398990;, + 0.301467;0.437159;, + 0.031124;0.452374;, + 0.027488;0.628182;, + 0.133164;0.444513;, + 0.267437;0.438220;, + 0.140673;0.410202;, + 0.138160;0.410202;, + 0.035715;0.406444;, + 0.983283;0.552269;, + 0.717768;0.549735;, + 0.665848;0.551563;, + 0.665848;0.603961;, + 0.665848;0.624999;, + 0.416895;0.485971;, + 0.465080;0.495146;, + 0.554443;0.490049;, + 0.596048;0.486003;, + 0.653986;0.485971;, + 0.648116;0.507207;, + 0.495199;0.500632;, + 0.453668;0.524293;, + 0.520895;0.500658;, + 0.647703;0.508662;, + 0.453966;0.523505;, + 0.644424;0.554503;, + 0.639118;0.604724;, + 0.427648;0.643446;, + 0.408566;0.643446;, + 0.645657;0.643446;, + 0.620138;0.643446;, + 0.510273;0.643446;, + 0.560244;0.643446;, + 0.664199;0.736052;, + 0.664199;0.796555;, + 0.531908;0.770624;, + 0.708835;0.738811;, + 0.532529;0.770158;, + 0.708835;0.799314;, + 0.971027;0.739715;, + 0.971027;0.800221;, + 0.967319;0.797731;, + 0.967319;0.737225;, + 0.859756;0.739928;, + 0.859756;0.800434;, + 0.848628;0.797539;, + 0.848628;0.737033;, + 0.768886;0.740271;, + 0.768886;0.800774;, + 0.716979;0.794925;, + 0.716979;0.734422;, + 0.682021;0.697485;, + 0.731679;0.697485;, + 0.781335;0.697485;, + 0.830993;0.697485;, + 0.880650;0.697485;, + 0.930304;0.697485;, + 0.979961;0.697485;, + 0.582708;0.669200;, + 0.582708;0.697485;, + 0.632365;0.697485;, + 0.582708;0.199240;, + 0.582708;0.474517;, + 0.582708;0.480018;, + 0.582708;0.663701;, + 0.731679;0.028928;, + 0.682021;0.028928;, + 0.781335;0.028928;, + 0.830993;0.028928;, + 0.880650;0.028928;, + 0.930304;0.028928;, + 0.979961;0.028928;, + 0.632365;0.028928;, + 0.582708;0.028928;, + 0.582708;0.038480;, + 0.582708;0.038480;, + 0.582708;0.199240;, + 0.525596;0.231189;, + 0.496696;0.202288;, + 0.450065;0.221604;, + 0.450065;0.262474;, + 0.393391;0.955706;, + 0.393391;0.912613;, + 0.438450;0.893948;, + 0.468922;0.924421;, + 0.556881;0.155657;, + 0.516012;0.155657;, + 0.457115;0.848889;, + 0.500207;0.848889;, + 0.525596;0.080125;, + 0.496696;0.109022;, + 0.438450;0.803826;, + 0.468922;0.773357;, + 0.450065;0.048836;, + 0.450065;0.089706;, + 0.393391;0.785161;, + 0.393391;0.742068;, + 0.374533;0.080125;, + 0.403431;0.109022;, + 0.348331;0.803826;, + 0.317859;0.773357;, + 0.343249;0.155657;, + 0.384118;0.155657;, + 0.329666;0.848889;, + 0.286574;0.848889;, + 0.374533;0.231189;, + 0.403431;0.202288;, + 0.348331;0.893948;, + 0.317859;0.924421;, + 0.519767;0.225363;, + 0.496696;0.202288;, + 0.450065;0.221604;, + 0.450065;0.254234;, + 0.393391;0.947466;, + 0.393391;0.912613;, + 0.438450;0.893948;, + 0.463096;0.918595;, + 0.548641;0.155657;, + 0.516012;0.155657;, + 0.457115;0.848889;, + 0.491967;0.848889;, + 0.519767;0.085951;, + 0.496696;0.109022;, + 0.438450;0.803826;, + 0.463096;0.779183;, + 0.450065;0.057076;, + 0.450065;0.089706;, + 0.393391;0.785161;, + 0.393391;0.750308;, + 0.380359;0.085951;, + 0.403431;0.109022;, + 0.348331;0.803826;, + 0.323688;0.779183;, + 0.351488;0.155657;, + 0.384118;0.155657;, + 0.329666;0.848889;, + 0.294813;0.848889;, + 0.380359;0.225363;, + 0.403431;0.202288;, + 0.348331;0.893948;, + 0.323688;0.918595;; + } + + VertexDuplicationIndices + { + 1479; + 979; + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, + 386, + 387, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, + 420, + 421, + 422, + 423, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 431, + 432, + 433, + 434, + 435, + 436, + 437, + 438, + 439, + 440, + 441, + 442, + 443, + 444, + 445, + 446, + 447, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 458, + 459, + 460, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 477, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 496, + 497, + 498, + 499, + 500, + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520, + 521, + 522, + 523, + 524, + 525, + 526, + 527, + 528, + 529, + 530, + 531, + 532, + 533, + 534, + 535, + 536, + 537, + 538, + 539, + 540, + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 564, + 565, + 566, + 567, + 568, + 569, + 570, + 571, + 572, + 573, + 574, + 575, + 576, + 577, + 578, + 579, + 580, + 581, + 582, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 592, + 593, + 594, + 595, + 596, + 597, + 598, + 599, + 600, + 601, + 602, + 603, + 604, + 605, + 606, + 607, + 608, + 609, + 610, + 611, + 612, + 613, + 614, + 615, + 616, + 617, + 618, + 619, + 620, + 621, + 622, + 623, + 624, + 625, + 626, + 627, + 628, + 629, + 630, + 631, + 632, + 633, + 634, + 635, + 636, + 637, + 638, + 639, + 640, + 641, + 642, + 643, + 644, + 645, + 646, + 647, + 648, + 649, + 650, + 651, + 652, + 653, + 654, + 655, + 656, + 657, + 658, + 659, + 660, + 661, + 662, + 663, + 664, + 665, + 666, + 667, + 668, + 669, + 670, + 671, + 672, + 673, + 674, + 675, + 676, + 677, + 678, + 679, + 680, + 681, + 682, + 683, + 684, + 685, + 686, + 687, + 688, + 689, + 690, + 691, + 692, + 693, + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978; + 79, + 68, + 93, + 94, + 127, + 138, + 139, + 142, + 141, + 140, + 144, + 143, + 145, + 146, + 148, + 147, + 149, + 150, + 150, + 153, + 53, + 154, + 163, + 52, + 151, + 49, + 48, + 52, + 55, + 95, + 79, + 78, + 80, + 81, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 271, + 282, + 283, + 286, + 285, + 288, + 284, + 287, + 289, + 290, + 292, + 291, + 293, + 294, + 294, + 209, + 296, + 295, + 303, + 210, + 151, + 164, + 205, + 206, + 210, + 211, + 246, + 231, + 232, + 233, + 174, + 184, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 336, + 339, + 340, + 341, + 342, + 345, + 346, + 347, + 340, + 350, + 351, + 361, + 367, + 375, + 374, + 386, + 392, + 399, + 402, + 406, + 407, + 404, + 408, + 420, + 425, + 426, + 426, + 423, + 417, + 404, + 440, + 439, + 444, + 443, + 445, + 454, + 460, + 429, + 428, + 459, + 459, + 430, + 431, + 433, + 453, + 458, + 464, + 466, + 467, + 472, + 469, + 471, + 470, + 483, + 487, + 480, + 499, + 500, + 502, + 503, + 476, + 477, + 481, + 482, + 504, + 506, + 508, + 507, + 505, + 510, + 509, + 511, + 512, + 513, + 514, + 521, + 522, + 520, + 528, + 522, + 527, + 525, + 523, + 530, + 532, + 519, + 524, + 516, + 515, + 538, + 518, + 529, + 536, + 542, + 543, + 558, + 566, + 402, + 401, + 407, + 410, + 413, + 415, + 590, + 588, + 591, + 592, + 593, + 431, + 589, + 598, + 544, + 543, + 546, + 548, + 546, + 607, + 550, + 552, + 554, + 556, + 556, + 612, + 615, + 620, + 613, + 614, + 615, + 613, + 621, + 616, + 617, + 616, + 624, + 618, + 619, + 618, + 626, + 620, + 620, + 628, + 538, + 539, + 540, + 535, + 532, + 531, + 537, + 526, + 528, + 518, + 540, + 527, + 517, + 523, + 515, + 538, + 540, + 532, + 406, + 399, + 406, + 633, + 639, + 637, + 638, + 639, + 640, + 644, + 638, + 641, + 643, + 642, + 650, + 649, + 656, + 662, + 469, + 470, + 478, + 470, + 473, + 479, + 675, + 676, + 674, + 673, + 683, + 691, + 689, + 703, + 704, + 678, + 681, + 710, + 708, + 711, + 709, + 712, + 714, + 715, + 713, + 717, + 716, + 718, + 724, + 725, + 726, + 726, + 732, + 729, + 730, + 727, + 734, + 723, + 735, + 728, + 719, + 742, + 720, + 721, + 740, + 733, + 746, + 745, + 761, + 437, + 440, + 444, + 447, + 450, + 788, + 790, + 791, + 792, + 789, + 745, + 748, + 750, + 750, + 752, + 798, + 754, + 756, + 758, + 760, + 760, + 803, + 806, + 811, + 805, + 804, + 804, + 806, + 812, + 807, + 807, + 808, + 815, + 809, + 809, + 810, + 817, + 811, + 811, + 819, + 742, + 743, + 744, + 739, + 735, + 736, + 741, + 732, + 731, + 744, + 721, + 730, + 722, + 727, + 720, + 742, + 744, + 735, + 443, + 439, + 443, + 824, + 830, + 829, + 828, + 831, + 830, + 829, + 835, + 832, + 834, + 833, + 841, + 840, + 847, + 853, + 675, + 674, + 674, + 682, + 677, + 684, + 883, + 860, + 859, + 889, + 874, + 873, + 891, + 876, + 875, + 892, + 890, + 877, + 878, + 893, + 895, + 879, + 881, + 896, + 898, + 897, + 905, + 908, + 911, + 914, + 917, + 918, + 917, + 920, + 935, + 936, + 951, + 952, + 902, + 904, + 907, + 910, + 913, + 916, + 919, + 922, + 919, + 961, + 975, + 976, + 963, + 956, + 955, + 964, + 965, + 924, + 923, + 966, + 967, + 957, + 927, + 968, + 969, + 958, + 929, + 970, + 971, + 959, + 931, + 972, + 973, + 960, + 933, + 974, + 975, + 961, + 935, + 976, + 977, + 962, + 937, + 978, + 939, + 926, + 925, + 940, + 941, + 901, + 900, + 942, + 943, + 928, + 906, + 944, + 945, + 930, + 909, + 946, + 947, + 932, + 912, + 948, + 949, + 934, + 915, + 950, + 951, + 936, + 918, + 952, + 953, + 938, + 921, + 954; + } + + MeshMaterialList + { + 2; + 1896; + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0; + + Material Material0 + { + 0.800000;0.800000;0.800000;1.000000;; + 0.000000; + 0.000000;0.000000;0.000000;; + 0.364706;0.364706;0.364706;; + + TextureFileName + { + "axe.jpg"; + } + } + + Material Material1 + { + 0.800000;0.800000;0.800000;1.000000;; + 0.000000; + 0.000000;0.000000;0.000000;; + 0.305882;0.305882;0.305882;; + + TextureFileName + { + "dwarf.jpg"; + } + } + + } + + XSkinMeshHeader + { + 1; + 3; + 40; + } + + SkinWeights + { + "middle"; + 19; + 565, + 566, + 567, + 568, + 569, + 570, + 571, + 595, + 599, + 600, + 603, + 604, + 769, + 770, + 771, + 772, + 773, + 795, + 1159; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.184641,-30.206568,0.000000,1.000000;; + } + + SkinWeights + { + "lhip"; + 18; + 746, + 747, + 749, + 751, + 753, + 755, + 757, + 759, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 1286, + 1288; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 5.006365,-26.736708,0.000000,1.000000;; + } + + SkinWeights + { + "lknee"; + 85; + 735, + 736, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 748, + 750, + 752, + 754, + 756, + 758, + 760, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 1278, + 1281, + 1284, + 1287, + 1299, + 1300, + 1301, + 1302, + 1303, + 1304, + 1305, + 1306, + 1307, + 1308, + 1309, + 1310, + 1311, + 1312, + 1313, + 1314, + 1315, + 1316, + 1317, + 1318, + 1319, + 1320, + 1321, + 1322, + 1323, + 1324, + 1325, + 1326, + 1327, + 1328, + 1329, + 1330, + 1331, + 1332, + 1333, + 1334, + 1335, + 1338, + 1344, + 1345, + 1346; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 6.909735,-17.919210,0.000000,1.000000;; + } + + SkinWeights + { + "lankle"; + 30; + 708, + 709, + 710, + 711, + 712, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 728, + 729, + 1257, + 1258, + 1259, + 1260, + 1261, + 1265, + 1267, + 1273, + 1277, + 1279, + 1280, + 1282, + 1283, + 1339, + 1341, + 1343; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 8.467036,-5.045920,-3.507543,1.000000;; + } + + SkinWeights + { + "ltoe"; + 32; + 713, + 714, + 715, + 716, + 724, + 725, + 726, + 727, + 730, + 731, + 732, + 733, + 734, + 737, + 738, + 1262, + 1263, + 1264, + 1266, + 1268, + 1269, + 1270, + 1271, + 1272, + 1274, + 1275, + 1276, + 1285, + 1336, + 1337, + 1340, + 1342; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 8.550578,-2.208009,1.760649,1.000000;; + } + + SkinWeights + { + "rhip"; + 37; + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 564, + 1156, + 1157, + 1158, + 1174, + 1175, + 1176, + 1177, + 1178, + 1180, + 1181, + 1182, + 1183, + 1184; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -6.067782,-27.255383,0.000000,1.000000;; + } + + SkinWeights + { + "rknee"; + 66; + 531, + 532, + 535, + 536, + 537, + 538, + 539, + 540, + 605, + 606, + 607, + 608, + 609, + 610, + 611, + 612, + 613, + 614, + 615, + 616, + 617, + 618, + 619, + 620, + 621, + 622, + 623, + 624, + 625, + 626, + 627, + 628, + 1147, + 1152, + 1155, + 1179, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1214, + 1219, + 1220, + 1221; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -7.625084,-17.573425,0.000000,1.000000;; + } + + SkinWeights + { + "rankle"; + 30; + 504, + 505, + 506, + 507, + 508, + 512, + 514, + 515, + 516, + 517, + 518, + 519, + 524, + 525, + 1127, + 1128, + 1129, + 1130, + 1131, + 1135, + 1137, + 1144, + 1148, + 1149, + 1150, + 1151, + 1153, + 1213, + 1216, + 1218; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -8.663285,-4.527243,-3.507543,1.000000;; + } + + SkinWeights + { + "rtoe"; + 32; + 509, + 510, + 511, + 513, + 520, + 521, + 522, + 523, + 526, + 527, + 528, + 529, + 530, + 533, + 534, + 1132, + 1133, + 1134, + 1136, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1145, + 1146, + 1154, + 1211, + 1212, + 1215, + 1217; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -8.824361,-2.258848,1.547814,1.000000;; + } + + SkinWeights + { + "spine2"; + 82; + 401, + 402, + 407, + 410, + 413, + 415, + 431, + 437, + 440, + 444, + 447, + 450, + 576, + 577, + 578, + 579, + 580, + 581, + 582, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 592, + 593, + 594, + 596, + 597, + 598, + 601, + 602, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 1081, + 1083, + 1093, + 1095, + 1105, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1289, + 1290, + 1291, + 1292, + 1293, + 1294, + 1295, + 1296, + 1297, + 1298; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.176384,-34.278362,0.000000,1.000000;; + } + + SkinWeights + { + "Joint76"; + 23; + 399, + 400, + 406, + 409, + 412, + 416, + 430, + 438, + 439, + 443, + 446, + 449, + 1080, + 1082, + 1094, + 1096, + 1104, + 1222, + 1223, + 1224, + 1347, + 1348, + 1349; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.135189,-45.764740,0.000000,1.000000;; + } + + SkinWeights + { + "spine1"; + 58; + 403, + 404, + 405, + 408, + 411, + 414, + 417, + 418, + 419, + 420, + 421, + 422, + 423, + 424, + 425, + 426, + 427, + 428, + 429, + 432, + 433, + 434, + 441, + 442, + 445, + 448, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 458, + 459, + 460, + 461, + 462, + 463, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1106, + 1107, + 1108; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.077645,-48.894562,0.000000,1.000000;; + } + + SkinWeights + { + "head"; + 372; + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 127, + 136, + 137, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 271, + 280, + 281, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, + 386, + 387, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 979, + 980, + 981, + 982, + 983, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -0.077645,-53.077965,0.000000,1.000000;; + } + + SkinWeights + { + "Joint36"; + 9; + 121, + 122, + 123, + 124, + 125, + 126, + 128, + 129, + 132; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -2.428693,-50.108727,5.128667,1.000000;; + } + + SkinWeights + { + "Joint39"; + 19; + 130, + 131, + 133, + 134, + 135, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 984, + 985, + 986, + 987, + 988, + 989, + 990; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -4.949857,-46.006042,7.908250,1.000000;; + } + + SkinWeights + { + "Joint40"; + 10; + 145, + 146, + 147, + 148, + 149, + 991, + 992, + 993, + 994, + 995; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -6.493002,-42.284798,8.792897,1.000000;; + } + + SkinWeights + { + "Joint41"; + 3; + 150, + 996, + 997; + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -7.350305,-39.127472,9.733334,1.000000;; + } + + SkinWeights + { + "Joint37"; + 6; + 267, + 268, + 269, + 270, + 272, + 277; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 2.766480,-49.947918,5.128667,1.000000;; + } + + SkinWeights + { + "Joint38"; + 20; + 273, + 274, + 275, + 276, + 278, + 279, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 5.080586,-45.749058,7.908250,1.000000;; + } + + SkinWeights + { + "Joint42"; + 10; + 289, + 290, + 291, + 292, + 293, + 1031, + 1032, + 1033, + 1034, + 1035; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 6.280811,-42.539360,8.793637,1.000000;; + } + + SkinWeights + { + "Joint43"; + 3; + 294, + 1036, + 1037; + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 7.566765,-38.843330,9.733334,1.000000;; + } + + SkinWeights + { + "pad2"; + 24; + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 0.986286,-0.159424,0.042717,0.000000, + 0.165048,0.952679,-0.255270,0.000000, + 0.000000,0.258819,0.965926,0.000000, + -2.513408,-50.807816,13.613914,1.000000;; + } + + SkinWeights + { + "pad1"; + 24; + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -5.311174,-52.424309,0.000000,1.000000;; + } + + SkinWeights + { + "lsholda"; + 13; + 774, + 775, + 776, + 777, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 1350; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 10.633429,-47.162376,-3.529744,1.000000;; + } + + SkinWeights + { + "lelbo"; + 62; + 674, + 675, + 677, + 682, + 683, + 684, + 691, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 1246, + 1248, + 1250, + 1251, + 1351, + 1352, + 1353, + 1354, + 1355, + 1356, + 1357, + 1358, + 1359, + 1360, + 1361, + 1362, + 1363, + 1364, + 1365, + 1366, + 1367, + 1368, + 1369, + 1370; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 17.175339,-42.063858,-4.235693,1.000000;; + } + + SkinWeights + { + "lwrist"; + 2; + 669, + 670; + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 25.025633,-35.658024,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint17"; + 8; + 668, + 671, + 672, + 673, + 676, + 692, + 1247, + 1249; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 28.689102,-31.997549,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint18"; + 8; + 702, + 703, + 704, + 705, + 706, + 707, + 1253, + 1254; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 29.735809,-29.905848,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint19"; + 8; + 678, + 679, + 680, + 681, + 685, + 686, + 1255, + 1256; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 29.866648,-26.768299,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint20"; + 10; + 687, + 688, + 689, + 690, + 693, + 694, + 699, + 700, + 701, + 1252; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 25.287310,-31.343891,-0.753762,1.000000;; + } + + SkinWeights + { + "Joint21"; + 4; + 695, + 696, + 697, + 698; + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + 26.334013,-28.859997,-0.753762,1.000000;; + } + + SkinWeights + { + "rsholda"; + 15; + 435, + 436, + 572, + 573, + 574, + 575, + 629, + 630, + 631, + 632, + 633, + 634, + 635, + 636, + 1225; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -10.064111,-47.456520,-3.529744,1.000000;; + } + + SkinWeights + { + "relbo"; + 62; + 469, + 470, + 473, + 478, + 479, + 480, + 487, + 637, + 638, + 639, + 640, + 641, + 642, + 643, + 644, + 645, + 646, + 647, + 648, + 649, + 650, + 651, + 652, + 653, + 654, + 655, + 656, + 657, + 658, + 659, + 660, + 661, + 662, + 663, + 664, + 665, + 666, + 667, + 1113, + 1115, + 1117, + 1118, + 1226, + 1227, + 1228, + 1229, + 1230, + 1231, + 1232, + 1233, + 1234, + 1235, + 1236, + 1237, + 1238, + 1239, + 1240, + 1241, + 1242, + 1243, + 1244, + 1245; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -16.867699,-42.096539,-4.235693,1.000000;; + } + + SkinWeights + { + "rwrist"; + 3; + 464, + 465, + 1109; + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -25.241344,-35.298512,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint25"; + 10; + 466, + 467, + 468, + 471, + 472, + 488, + 1110, + 1111, + 1112, + 1114; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -28.904814,-32.160961,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint26"; + 10; + 498, + 499, + 500, + 501, + 502, + 503, + 1119, + 1120, + 1121, + 1122; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -29.951521,-29.807800,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint27"; + 10; + 474, + 475, + 476, + 477, + 481, + 482, + 1123, + 1124, + 1125, + 1126; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -29.689844,-26.931713,-4.235693,1.000000;; + } + + SkinWeights + { + "Joint28"; + 7; + 483, + 484, + 485, + 486, + 489, + 490, + 1116; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -24.456314,-31.115110,-2.201373,1.000000;; + } + + SkinWeights + { + "Joint29"; + 7; + 491, + 492, + 493, + 494, + 495, + 496, + 497; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -24.717991,-28.631216,-2.201373,1.000000;; + } + + SkinWeights + { + "weapon"; + 228; + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 1371, + 1372, + 1373, + 1374, + 1375, + 1376, + 1377, + 1378, + 1379, + 1380, + 1381, + 1382, + 1383, + 1384, + 1385, + 1386, + 1387, + 1388, + 1389, + 1390, + 1391, + 1392, + 1393, + 1394, + 1395, + 1396, + 1397, + 1398, + 1399, + 1400, + 1401, + 1402, + 1403, + 1404, + 1405, + 1406, + 1407, + 1408, + 1409, + 1410, + 1411, + 1412, + 1413, + 1414, + 1415, + 1416, + 1417, + 1418, + 1419, + 1420, + 1421, + 1422, + 1423, + 1424, + 1425, + 1426, + 1427, + 1428, + 1429, + 1430, + 1431, + 1432, + 1433, + 1434, + 1435, + 1436, + 1437, + 1438, + 1439, + 1440, + 1441, + 1442, + 1443, + 1444, + 1445, + 1446, + 1447, + 1448, + 1449, + 1450, + 1451, + 1452, + 1453, + 1454, + 1455, + 1456, + 1457, + 1458, + 1459, + 1460, + 1461, + 1462, + 1463, + 1464, + 1465, + 1466, + 1467, + 1468, + 1469, + 1470, + 1471, + 1472, + 1473, + 1474, + 1475, + 1476, + 1477, + 1478; + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000, + 1.000000; + 1.000000,0.000000,0.000000,0.000000, + 0.000000,1.000000,0.000000,0.000000, + 0.000000,0.000000,1.000000,0.000000, + -26.942242,-30.461456,-4.235693,1.000000;; + } + } + } +} + +AnimationSet AnimationSet0 +{ + Animation baseAnimation + { + {base} + + AnimationKey + { + 2; + 23; + 0;3;0.011608,-0.015192,0.000000;;, + 1;3;0.011608,-0.015192,0.000000;;, + 2;3;0.011608,-0.015192,0.000000;;, + 3;3;0.011608,-0.015192,0.000000;;, + 4;3;0.011608,-0.015192,0.000000;;, + 5;3;0.011608,-0.015192,0.000000;;, + 12;3;0.011608,-0.015192,0.000000;;, + 14;3;0.011608,-0.015192,0.000000;;, + 15;3;0.011608,-0.015192,0.000000;;, + 16;3;0.011608,-0.015192,0.000000;;, + 17;3;0.011608,-0.015192,0.000000;;, + 18;3;0.011608,-0.015192,0.000000;;, + 19;3;0.011608,-0.015192,0.000000;;, + 20;3;0.011608,-0.015192,0.000000;;, + 27;3;0.011608,-0.015192,0.000000;;, + 33;3;0.011608,-0.015192,0.000000;;, + 34;3;0.011608,-0.015192,0.000000;;, + 35;3;0.011608,-0.015192,0.000000;;, + 41;3;0.011608,-0.015192,0.000000;;, + 43;3;0.011608,-0.015192,0.000000;;, + 50;3;0.011608,-0.015192,0.000000;;, + 53;3;0.011608,-0.015192,0.000000;;, + 55;3;0.011608,-0.015192,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation middleAnimation + { + {middle} + + AnimationKey + { + 2; + 25; + 0;3;0.173034,30.221760,0.000000;;, + 1;3;0.173034,30.221760,0.000000;;, + 2;3;0.173034,27.773420,0.372200;;, + 3;3;0.173034,24.919014,0.806130;;, + 4;3;0.173034,22.482626,1.176512;;, + 5;3;0.173034,22.482626,1.176512;;, + 12;3;0.173034,22.482626,1.176512;;, + 14;3;0.173034,22.482626,1.176512;;, + 15;3;0.173034,22.482626,1.176512;;, + 16;3;0.173034,24.272297,0.904444;;, + 17;3;0.173034,26.344128,0.589482;;, + 18;3;0.173034,28.455601,0.268494;;, + 19;3;0.173034,30.221760,0.000000;;, + 20;3;0.173034,30.221760,0.000000;;, + 24;3;0.173034,29.353209,0.000000;;, + 27;3;0.173034,29.520485,0.000000;;, + 33;3;0.173034,30.221760,0.000000;;, + 34;3;0.173034,30.221760,0.000000;;, + 35;3;0.173034,30.221760,0.000000;;, + 41;3;0.173034,28.753119,0.000000;;, + 43;3;0.173034,28.285614,0.000000;;, + 45;3;0.173034,28.050383,0.000000;;, + 50;3;0.173034,28.889324,0.000000;;, + 53;3;0.173034,29.697077,0.000000;;, + 55;3;0.173034,30.221760,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 25; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 24;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 45;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation lhipAnimation + { + {lhip} + + AnimationKey + { + 2; + 23; + 0;3;-5.191007,-3.469861,0.000000;;, + 1;3;-5.191007,-3.469861,0.000000;;, + 2;3;-5.191007,-3.469861,0.000000;;, + 3;3;-5.191007,-3.469861,0.000000;;, + 4;3;-5.191007,-3.469861,0.000000;;, + 5;3;-5.191007,-3.469861,0.000000;;, + 12;3;-5.191007,-3.469861,0.000000;;, + 14;3;-5.191007,-3.469861,0.000000;;, + 15;3;-5.191007,-3.469861,0.000000;;, + 16;3;-5.191007,-3.469861,0.000000;;, + 17;3;-5.191007,-3.469861,0.000000;;, + 18;3;-5.191007,-3.469861,0.000000;;, + 19;3;-5.191007,-3.469861,0.000000;;, + 20;3;-5.191007,-3.469861,0.000000;;, + 27;3;-5.191007,-3.469861,0.000000;;, + 33;3;-5.191007,-3.469861,0.000000;;, + 34;3;-5.191007,-3.469861,0.000000;;, + 35;3;-5.191007,-3.469861,0.000000;;, + 41;3;-5.191007,-3.469861,0.000000;;, + 43;3;-5.191007,-3.469861,0.000000;;, + 50;3;-5.191007,-3.469861,0.000000;;, + 53;3;-5.191007,-3.469861,0.000000;;, + 55;3;-5.191007,-3.469861,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.933591,-0.357025,0.029033,0.009857;;, + 3;4;0.833984,-0.551409,0.020009,0.004259;;, + 4;4;0.751840,-0.659346,0.000000,0.000000;;, + 5;4;0.751840,-0.659346,0.000000,0.000000;;, + 12;4;0.751840,-0.659346,0.000000,0.000000;;, + 14;4;0.751840,-0.659346,0.000000,0.000000;;, + 15;4;0.751840,-0.659346,0.000000,0.000000;;, + 16;4;0.815325,-0.578790,0.015233,0.003854;;, + 17;4;0.880134,-0.473717,0.030180,0.006729;;, + 18;4;0.961855,-0.272346,0.024861,0.006633;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation lkneeAnimation + { + {lknee} + + AnimationKey + { + 2; + 25; + 0;3;-1.903369,-8.817497,0.000000;;, + 1;3;-1.903369,-8.817497,0.000000;;, + 2;3;-1.903369,-8.817497,0.000000;;, + 3;3;-1.903369,-8.817497,0.000000;;, + 4;3;-1.903369,-8.817497,0.000000;;, + 5;3;-1.903369,-8.817497,0.000000;;, + 12;3;-1.903369,-8.817497,0.000000;;, + 14;3;-1.903369,-8.817497,0.000000;;, + 15;3;-1.903369,-8.817497,0.000000;;, + 16;3;-1.903369,-8.817497,0.000000;;, + 17;3;-1.903369,-8.817497,0.000000;;, + 18;3;-1.903369,-8.817497,0.000000;;, + 19;3;-1.903369,-8.817497,0.000000;;, + 20;3;-1.903369,-8.817497,0.000000;;, + 24;3;-1.903369,-8.527980,0.000000;;, + 27;3;-1.903369,-8.583739,0.000000;;, + 33;3;-1.903369,-8.817497,0.000000;;, + 34;3;-1.903369,-8.817497,0.000000;;, + 35;3;-1.903369,-8.817497,0.000000;;, + 41;3;-1.903369,-8.034223,0.000000;;, + 43;3;-1.903369,-7.784886,0.000000;;, + 45;3;-1.903369,-7.659429,0.000000;;, + 50;3;-1.903369,-8.106865,0.000000;;, + 53;3;-1.903369,-8.537666,0.000000;;, + 55;3;-1.903369,-8.817497,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 25; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.936175,0.350946,-0.020210,-0.002106;;, + 3;4;0.832879,0.553271,-0.014218,0.001102;;, + 4;4;0.754710,0.656059,0.000000,0.000000;;, + 5;4;0.754710,0.656059,0.000000,0.000000;;, + 12;4;0.754709,0.656059,0.000000,0.000000;;, + 14;4;0.754710,0.656059,0.000000,0.000000;;, + 15;4;0.754710,0.656059,0.000000,0.000000;;, + 16;4;0.817547,0.575786,-0.009196,0.001689;;, + 17;4;0.867357,0.497283,-0.018216,0.008324;;, + 18;4;0.954530,0.297619,-0.015169,0.008102;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 24;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 45;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation lankleAnimation + { + {lankle} + + AnimationKey + { + 2; + 25; + 0;3;-1.557302,-12.873290,3.507543;;, + 1;3;-1.557302,-12.873290,3.507543;;, + 2;3;-1.557302,-12.873290,3.507543;;, + 3;3;-1.557302,-12.873290,3.507543;;, + 4;3;-1.557302,-12.873290,3.507543;;, + 5;3;-1.557302,-12.873290,3.507543;;, + 12;3;-1.557302,-12.873290,3.507543;;, + 14;3;-1.557302,-12.873290,3.507543;;, + 15;3;-1.557302,-12.873290,3.507543;;, + 16;3;-1.557302,-12.873290,3.507543;;, + 17;3;-1.557302,-12.873290,3.507543;;, + 18;3;-1.557302,-12.873290,3.507543;;, + 19;3;-1.557302,-12.873290,3.507543;;, + 20;3;-1.557302,-12.873290,3.507543;;, + 24;3;-1.557302,-12.294256,3.507543;;, + 27;3;-1.557302,-12.405774,3.507543;;, + 33;3;-1.557302,-12.873290,3.507543;;, + 34;3;-1.557302,-12.873290,3.507543;;, + 35;3;-1.557302,-12.873290,3.507543;;, + 41;3;-1.557302,-12.187924,3.507543;;, + 43;3;-1.557302,-11.969755,3.507543;;, + 45;3;-1.557302,-11.859981,3.507543;;, + 50;3;-1.557302,-12.251487,3.507543;;, + 53;3;-1.557302,-12.628438,3.507543;;, + 55;3;-1.557302,-12.873290,3.507543;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 25; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;0.999476,-0.032322,0.001562,-0.000284;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 24;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 45;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation ltoeAnimation + { + {ltoe} + + AnimationKey + { + 2; + 23; + 0;3;-0.083542,-2.837912,-5.268192;;, + 1;3;-0.083542,-2.837912,-5.268192;;, + 2;3;-0.083542,-2.837912,-5.268192;;, + 3;3;-0.083542,-2.837912,-5.268192;;, + 4;3;-0.083542,-2.837912,-5.268192;;, + 5;3;-0.083542,-2.837912,-5.268192;;, + 12;3;-0.083542,-2.837912,-5.268192;;, + 14;3;-0.083542,-2.837912,-5.268192;;, + 15;3;-0.083542,-2.837912,-5.268192;;, + 16;3;-0.083542,-2.837912,-5.268192;;, + 17;3;-0.083542,-2.837912,-5.268192;;, + 18;3;-0.083542,-2.837912,-5.268192;;, + 19;3;-0.083542,-2.837912,-5.268192;;, + 20;3;-0.083542,-2.837912,-5.268192;;, + 27;3;-0.083542,-2.837912,-5.268192;;, + 33;3;-0.083542,-2.837912,-5.268192;;, + 34;3;-0.083542,-2.837912,-5.268192;;, + 35;3;-0.083542,-2.837912,-5.268192;;, + 41;3;-0.083542,-2.837912,-5.268192;;, + 43;3;-0.083542,-2.837912,-5.268192;;, + 50;3;-0.083542,-2.837912,-5.268192;;, + 53;3;-0.083542,-2.837912,-5.268192;;, + 55;3;-0.083542,-2.837912,-5.268192;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation rhipAnimation + { + {rhip} + + AnimationKey + { + 2; + 23; + 0;3;5.883141,-2.951185,0.000000;;, + 1;3;5.883141,-2.951185,0.000000;;, + 2;3;5.883141,-2.951185,0.000000;;, + 3;3;5.883141,-2.951185,0.000000;;, + 4;3;5.883141,-2.951185,0.000000;;, + 5;3;5.883141,-2.951185,0.000000;;, + 12;3;5.883141,-2.951185,0.000000;;, + 14;3;5.883141,-2.951185,0.000000;;, + 15;3;5.883141,-2.951185,0.000000;;, + 16;3;5.883141,-2.951185,0.000000;;, + 17;3;5.883141,-2.951185,0.000000;;, + 18;3;5.883141,-2.951185,0.000000;;, + 19;3;5.883141,-2.951185,0.000000;;, + 20;3;5.883141,-2.951185,0.000000;;, + 27;3;5.883141,-2.951185,0.000000;;, + 33;3;5.883141,-2.951185,0.000000;;, + 34;3;5.883141,-2.951185,0.000000;;, + 35;3;5.883141,-2.951185,0.000000;;, + 41;3;5.883141,-2.951185,0.000000;;, + 43;3;5.883141,-2.951185,0.000000;;, + 50;3;5.883141,-2.951185,0.000000;;, + 53;3;5.883141,-2.951185,0.000000;;, + 55;3;5.883141,-2.951185,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.997921,0.064448,0.000411,-0.000559;;, + 3;4;0.990580,0.136931,0.000703,-0.000957;;, + 4;4;0.982450,0.186524,0.000000,0.000000;;, + 5;4;0.982450,0.186524,0.000000,0.000000;;, + 12;4;0.982450,0.186524,0.000000,0.000000;;, + 14;4;0.982450,0.186524,0.000000,0.000000;;, + 15;4;0.982450,0.186524,0.000000,0.000000;;, + 16;4;0.988892,0.148634,-0.000027,-0.001179;;, + 17;4;0.995206,0.097793,-0.000021,-0.000940;;, + 18;4;0.999001,0.044690,-0.000010,-0.000451;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation rkneeAnimation + { + {rknee} + + AnimationKey + { + 2; + 25; + 0;3;1.557302,-9.681957,0.000000;;, + 1;3;1.557302,-9.681957,0.000000;;, + 2;3;1.557302,-9.681957,0.000000;;, + 3;3;1.557302,-9.681957,0.000000;;, + 4;3;1.557302,-9.681957,0.000000;;, + 5;3;1.557302,-9.681957,0.000000;;, + 12;3;1.557302,-9.681957,0.000000;;, + 14;3;1.557302,-9.681957,0.000000;;, + 15;3;1.557302,-9.681957,0.000000;;, + 16;3;1.557302,-9.681957,0.000000;;, + 17;3;1.557302,-9.681957,0.000000;;, + 18;3;1.557302,-9.681957,0.000000;;, + 19;3;1.557302,-9.681957,0.000000;;, + 20;3;1.557302,-9.681957,0.000000;;, + 24;3;1.557302,-9.392440,0.000000;;, + 27;3;1.557302,-9.448199,0.000000;;, + 33;3;1.557302,-9.681957,0.000000;;, + 34;3;1.557302,-9.681957,0.000000;;, + 35;3;1.557302,-9.681957,0.000000;;, + 41;3;1.557302,-8.898683,0.000000;;, + 43;3;1.557302,-8.649346,0.000000;;, + 45;3;1.557302,-8.523890,0.000000;;, + 50;3;1.557302,-8.971325,0.000000;;, + 53;3;1.557302,-9.402126,0.000000;;, + 55;3;1.557302,-9.681957,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 25; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.963221,0.268544,0.008625,-0.003828;;, + 3;4;0.881291,0.472453,0.010177,-0.003199;;, + 4;4;0.859406,0.511293,0.000000,0.000000;;, + 5;4;0.859406,0.511293,0.000000,0.000000;;, + 12;4;0.859406,0.511293,0.000000,0.000000;;, + 14;4;0.859406,0.511293,0.000000,0.000000;;, + 15;4;0.859406,0.511293,0.000000,0.000000;;, + 16;4;0.882421,0.470414,0.005475,-0.003796;;, + 17;4;0.936363,0.350938,0.006628,-0.004836;;, + 18;4;0.982689,0.185165,0.005005,-0.003385;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 24;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 45;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation rankleAnimation + { + {rankle} + + AnimationKey + { + 2; + 25; + 0;3;1.038201,-13.046183,3.507543;;, + 1;3;1.038201,-13.046183,3.507543;;, + 2;3;1.038201,-13.046183,3.507543;;, + 3;3;1.038201,-13.046183,3.507543;;, + 4;3;1.038201,-13.046183,3.507543;;, + 5;3;1.038201,-13.046183,3.507543;;, + 12;3;1.038201,-13.046183,3.507543;;, + 14;3;1.038201,-13.046183,3.507543;;, + 15;3;1.038201,-13.046183,3.507543;;, + 16;3;1.038201,-13.046183,3.507543;;, + 17;3;1.038201,-13.046183,3.507543;;, + 18;3;1.038201,-13.046183,3.507543;;, + 19;3;1.038201,-13.046183,3.507543;;, + 20;3;1.038201,-13.046183,3.507543;;, + 24;3;1.038201,-12.467149,3.507543;;, + 27;3;1.038201,-12.578667,3.507543;;, + 33;3;1.038201,-13.046183,3.507543;;, + 34;3;1.038201,-13.046183,3.507543;;, + 35;3;1.038201,-13.046183,3.507543;;, + 41;3;1.038201,-12.360817,3.507543;;, + 43;3;1.038201,-12.142648,3.507543;;, + 45;3;1.038201,-12.032873,3.507543;;, + 50;3;1.038201,-12.424379,3.507543;;, + 53;3;1.038201,-12.801331,3.507543;;, + 55;3;1.038201,-13.046183,3.507543;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 25; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.978731,-0.205059,-0.003273,-0.005028;;, + 3;4;0.979297,-0.202354,-0.000456,-0.005571;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;0.981401,-0.191782,-0.008166,-0.002302;;, + 17;4;0.967608,-0.252304,-0.007780,-0.004084;;, + 18;4;0.984134,-0.177321,-0.005444,-0.002966;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 24;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 45;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation rtoeAnimation + { + {rtoe} + + AnimationKey + { + 2; + 23; + 0;3;0.161076,-2.268395,-5.055357;;, + 1;3;0.161076,-2.268395,-5.055357;;, + 2;3;0.161076,-2.268395,-5.055357;;, + 3;3;0.161076,-2.268395,-5.055357;;, + 4;3;0.161076,-2.268395,-5.055357;;, + 5;3;0.161076,-2.268395,-5.055357;;, + 12;3;0.161076,-2.268395,-5.055357;;, + 14;3;0.161076,-2.268395,-5.055357;;, + 15;3;0.161076,-2.268395,-5.055357;;, + 16;3;0.161076,-2.268395,-5.055357;;, + 17;3;0.161076,-2.268395,-5.055357;;, + 18;3;0.161076,-2.268395,-5.055357;;, + 19;3;0.161076,-2.268395,-5.055357;;, + 20;3;0.161076,-2.268395,-5.055357;;, + 27;3;0.161076,-2.268395,-5.055357;;, + 33;3;0.161076,-2.268395,-5.055357;;, + 34;3;0.161076,-2.268395,-5.055357;;, + 35;3;0.161076,-2.268395,-5.055357;;, + 41;3;0.161076,-2.268395,-5.055357;;, + 43;3;0.161076,-2.268395,-5.055357;;, + 50;3;0.161076,-2.268395,-5.055357;;, + 53;3;0.161076,-2.268395,-5.055357;;, + 55;3;0.161076,-2.268395,-5.055357;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation spine2Animation + { + {spine2} + + AnimationKey + { + 2; + 23; + 0;3;-0.008257,4.071795,0.000000;;, + 1;3;-0.008257,4.071795,0.000000;;, + 2;3;-0.008257,4.071795,0.000000;;, + 3;3;-0.008257,4.071795,0.000000;;, + 4;3;-0.008257,4.071795,0.000000;;, + 5;3;-0.008257,4.071795,0.000000;;, + 12;3;-0.008257,4.071795,0.000000;;, + 14;3;-0.008257,4.071795,0.000000;;, + 15;3;-0.008257,4.071795,0.000000;;, + 16;3;-0.008257,4.071795,0.000000;;, + 17;3;-0.008257,4.071795,0.000000;;, + 18;3;-0.008257,4.071795,0.000000;;, + 19;3;-0.008257,4.071795,0.000000;;, + 20;3;-0.008257,4.071795,0.000000;;, + 27;3;-0.008257,4.071795,0.000000;;, + 33;3;-0.008257,4.071795,0.000000;;, + 34;3;-0.008257,4.071795,0.000000;;, + 35;3;-0.008257,4.071795,0.000000;;, + 41;3;-0.008257,4.071795,0.000000;;, + 43;3;-0.008257,4.071795,0.000000;;, + 50;3;-0.008257,4.071795,0.000000;;, + 53;3;-0.008257,4.071795,0.000000;;, + 55;3;-0.008257,4.071795,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.999391,0.000000,0.034899,0.000000;;, + 43;4;0.999406,0.000000,0.034456,0.000000;;, + 50;4;0.999888,0.000000,0.014985,0.000000;;, + 53;4;0.999982,0.000000,0.005995,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint75Animation + { + {Joint75} + + AnimationKey + { + 2; + 23; + 0;3;-0.007980,5.843795,0.000000;;, + 1;3;-0.007980,5.843795,0.000000;;, + 2;3;-0.007980,5.625298,-0.076575;;, + 3;3;-0.007980,5.370562,-0.165850;;, + 4;3;-0.007980,5.153131,-0.242051;;, + 5;3;-0.007980,5.153131,-0.242051;;, + 12;3;-0.007980,5.153131,-0.242051;;, + 14;3;-0.007980,5.153131,-0.242051;;, + 15;3;-0.007980,5.153131,-0.242051;;, + 16;3;-0.007980,5.312847,-0.186077;;, + 17;3;-0.007980,5.497743,-0.121278;;, + 18;3;-0.007980,5.686178,-0.055239;;, + 19;3;-0.007980,5.843795,0.000000;;, + 20;3;-0.007980,5.843795,0.000000;;, + 27;3;-0.007980,5.843795,0.000000;;, + 33;3;-0.007980,5.843795,0.000000;;, + 34;3;-0.007980,5.843795,0.000000;;, + 35;3;-0.007980,5.843795,0.000000;;, + 41;3;-0.007980,5.843795,0.000000;;, + 43;3;-0.007980,5.975956,-0.018574;;, + 50;3;-0.007980,6.482687,-0.089789;;, + 53;3;-0.007980,6.140066,-0.041637;;, + 55;3;-0.007980,5.843795,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.997564,0.069757,0.000000,0.000000;;, + 1;4;0.997564,0.069757,0.000000,0.000000;;, + 2;4;0.997564,0.069755,0.000000,0.000000;;, + 3;4;0.997564,0.069755,0.000000,0.000000;;, + 4;4;0.997564,0.069757,0.000000,0.000000;;, + 5;4;0.997564,0.069757,0.000000,0.000000;;, + 12;4;0.997564,0.069755,0.000000,0.000000;;, + 14;4;0.997564,0.069757,0.000000,0.000000;;, + 15;4;0.997564,0.069757,0.000000,0.000000;;, + 16;4;0.997564,0.069755,0.000000,0.000000;;, + 17;4;0.997564,0.069755,0.000000,0.000000;;, + 18;4;0.997564,0.069755,0.000000,0.000000;;, + 19;4;0.997564,0.069757,0.000000,0.000000;;, + 20;4;0.997564,0.069757,0.000000,0.000000;;, + 27;4;0.990866,0.134849,0.000000,0.000000;;, + 33;4;0.997564,0.069757,0.000000,0.000000;;, + 34;4;0.997564,0.069757,0.000000,0.000000;;, + 35;4;0.997564,0.069757,0.000000,0.000000;;, + 41;4;0.993768,0.069490,0.086944,-0.006080;;, + 43;4;0.995824,0.069634,0.058902,-0.004119;;, + 50;4;0.993213,0.069451,-0.093073,0.006508;;, + 53;4;0.996487,0.069680,-0.046335,0.003240;;, + 55;4;0.997564,0.069757,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint76Animation + { + {Joint76} + + AnimationKey + { + 2; + 23; + 0;3;-0.033215,5.642583,0.000000;;, + 1;3;-0.033215,5.642583,0.000000;;, + 2;3;-0.033215,5.390897,-0.199987;;, + 3;3;-0.033215,5.097469,-0.433143;;, + 4;3;-0.033215,4.847012,-0.632154;;, + 5;3;-0.033215,4.847012,-0.632154;;, + 12;3;-0.033215,4.847012,-0.632154;;, + 14;3;-0.033215,4.847012,-0.632154;;, + 15;3;-0.033215,4.847012,-0.632154;;, + 16;3;-0.033215,5.030987,-0.485969;;, + 17;3;-0.033215,5.243968,-0.316736;;, + 18;3;-0.033215,5.461024,-0.144265;;, + 19;3;-0.033215,5.642583,0.000000;;, + 20;3;-0.033215,5.642583,0.000000;;, + 27;3;-0.033215,5.642583,0.000000;;, + 33;3;-0.033215,5.642583,0.000000;;, + 34;3;-0.033215,5.642583,0.000000;;, + 35;3;-0.033215,5.642583,0.000000;;, + 41;3;-0.033215,5.642583,0.000000;;, + 43;3;-0.033215,5.642583,0.000000;;, + 50;3;-0.033215,5.642583,0.000000;;, + 53;3;-0.033215,5.642583,0.000000;;, + 55;3;-0.033215,5.642583,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.999391,0.034899,0.000000,0.000000;;, + 1;4;0.999391,0.034899,0.000000,0.000000;;, + 2;4;0.999391,0.034899,0.000000,0.000000;;, + 3;4;0.999391,0.034899,0.000000,0.000000;;, + 4;4;0.999391,0.034899,0.000000,0.000000;;, + 5;4;0.999391,0.034899,0.000000,0.000000;;, + 12;4;0.999381,0.034899,0.004361,-0.000152;;, + 14;4;0.999391,0.034899,0.000000,0.000000;;, + 15;4;0.999391,0.034899,0.000000,0.000000;;, + 16;4;0.999391,0.034899,0.000000,0.000000;;, + 17;4;0.999391,0.034899,0.000000,0.000000;;, + 18;4;0.999391,0.034899,0.000000,0.000000;;, + 19;4;0.999391,0.034899,0.000000,0.000000;;, + 20;4;0.999391,0.034899,0.000000,0.000000;;, + 27;4;0.999391,0.034899,0.000000,0.000000;;, + 33;4;0.999391,0.034899,0.000000,0.000000;;, + 34;4;0.999391,0.034899,0.000000,0.000000;;, + 35;4;0.999391,0.034899,0.000000,0.000000;;, + 41;4;0.996956,0.034814,0.069714,-0.002434;;, + 43;4;0.998051,0.034853,0.051723,-0.001806;;, + 50;4;0.997991,0.034850,-0.052875,0.001846;;, + 53;4;0.999025,0.034886,-0.027035,0.000944;;, + 55;4;0.999391,0.034899,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation spine1Animation + { + {spine1} + + AnimationKey + { + 2; + 23; + 0;3;-0.057544,3.129822,0.000000;;, + 1;3;-0.057544,3.129822,0.000000;;, + 2;3;-0.057544,3.129822,0.000000;;, + 3;3;-0.057544,3.129822,0.000000;;, + 4;3;-0.057544,3.129822,0.000000;;, + 5;3;-0.057544,3.129822,0.000000;;, + 12;3;-0.057544,3.129822,0.000000;;, + 14;3;-0.057544,3.129822,0.000000;;, + 15;3;-0.057544,3.129822,0.000000;;, + 16;3;-0.057544,3.129822,0.000000;;, + 17;3;-0.057544,3.129822,0.000000;;, + 18;3;-0.057544,3.129822,0.000000;;, + 19;3;-0.057544,3.129822,0.000000;;, + 20;3;-0.057544,3.129822,0.000000;;, + 27;3;-0.057544,3.129822,0.000000;;, + 33;3;-0.057544,3.129822,0.000000;;, + 34;3;-0.057544,3.129822,0.000000;;, + 35;3;-0.057544,3.129822,0.000000;;, + 41;3;-0.057544,3.129822,0.000000;;, + 43;3;-0.057544,3.129822,0.000000;;, + 50;3;-0.057544,3.129822,0.000000;;, + 53;3;-0.057544,3.129822,0.000000;;, + 55;3;-0.057544,3.129822,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;0.999229,0.039260,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.999229,0.000000,0.039260,0.000000;;, + 43;4;0.999248,0.000000,0.038762,0.000000;;, + 50;4;0.999858,0.000000,0.016858,0.000000;;, + 53;4;0.999977,0.000000,0.006743,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation headAnimation + { + {head} + + AnimationKey + { + 2; + 27; + 0;3;0.000000,4.183402,0.000000;;, + 1;3;0.000000,4.183402,0.000000;;, + 2;3;0.000000,4.191365,-0.387104;;, + 3;3;0.000000,4.200649,-0.838410;;, + 4;3;0.000000,4.208574,-1.223624;;, + 5;3;0.000000,4.208574,-1.223624;;, + 7;3;0.000000,4.208574,-1.223624;;, + 12;3;0.000000,4.208574,-1.223624;;, + 14;3;0.000000,4.208574,-1.223624;;, + 15;3;0.000000,4.208574,-1.223624;;, + 16;3;0.000000,4.202753,-0.940661;;, + 17;3;0.000000,4.196014,-0.613087;;, + 18;3;0.000000,4.189146,-0.279245;;, + 19;3;0.000000,4.183402,0.000000;;, + 20;3;0.000000,4.183402,0.000000;;, + 23;3;0.000000,4.183402,0.000000;;, + 27;3;0.000000,4.183402,0.000000;;, + 29;3;0.000000,4.183402,0.000000;;, + 33;3;0.000000,4.183402,0.000000;;, + 34;3;0.000000,4.183402,0.000000;;, + 35;3;0.000000,4.183402,0.000000;;, + 41;3;0.000000,4.183402,0.000000;;, + 43;3;0.000000,4.183402,0.000000;;, + 45;3;0.000000,4.183402,0.000000;;, + 50;3;0.000000,4.183402,0.000000;;, + 53;3;0.000000,4.183402,0.000000;;, + 55;3;0.000000,4.183402,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 27; + 0;4;0.998392,-0.056693,0.000000,0.000000;;, + 1;4;0.998392,-0.056693,0.000000,0.000000;;, + 2;4;0.998178,-0.056679,0.001174,-0.020671;;, + 3;4;0.997388,-0.056635,0.002542,-0.044758;;, + 4;4;0.996254,-0.056570,0.003708,-0.065298;;, + 5;4;0.996254,-0.056570,0.003708,-0.065298;;, + 7;4;0.995518,-0.058815,0.038474,-0.063284;;, + 12;4;0.996114,-0.057445,0.017139,-0.064530;;, + 14;4;0.996254,-0.056570,0.003708,-0.065298;;, + 15;4;0.996254,-0.056570,0.003708,-0.065298;;, + 16;4;0.997128,-0.056620,0.002851,-0.050213;;, + 17;4;0.997855,-0.056661,0.001859,-0.032735;;, + 18;4;0.998280,-0.056685,0.000847,-0.014912;;, + 19;4;0.998392,-0.056693,0.000000,0.000000;;, + 20;4;0.998392,-0.056693,0.000000,0.000000;;, + 23;4;0.993540,-0.095666,0.060767,0.005851;;, + 27;4;0.992410,-0.122909,0.003406,-0.001945;;, + 29;4;0.992114,-0.123201,-0.022487,-0.005039;;, + 33;4;0.998392,-0.056693,0.000000,0.000000;;, + 34;4;0.998392,-0.056693,0.000000,0.000000;;, + 35;4;0.998392,-0.056693,0.000000,0.000000;;, + 41;4;0.994963,-0.056497,0.082675,0.004695;;, + 43;4;0.996303,-0.056573,0.064552,0.003665;;, + 45;4;0.985311,-0.055949,-0.161087,-0.009147;;, + 50;4;0.997274,-0.056628,-0.047219,-0.002681;;, + 53;4;0.994336,-0.056461,0.089900,0.005105;;, + 55;4;0.998392,-0.056693,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint36Animation + { + {Joint36} + + AnimationKey + { + 2; + 23; + 0;3;2.351048,-2.969238,-5.128667;;, + 1;3;2.351048,-2.969238,-5.128667;;, + 2;3;2.351048,-2.969238,-5.128667;;, + 3;3;2.351048,-2.969238,-5.128667;;, + 4;3;2.351048,-2.969238,-5.128667;;, + 5;3;2.351048,-2.969238,-5.128667;;, + 12;3;2.351048,-2.969238,-5.128667;;, + 14;3;2.351048,-2.969238,-5.128667;;, + 15;3;2.351048,-2.969238,-5.128667;;, + 16;3;2.351048,-2.969238,-5.128667;;, + 17;3;2.351048,-2.969238,-5.128667;;, + 18;3;2.351048,-2.969238,-5.128667;;, + 19;3;2.351048,-2.969238,-5.128667;;, + 20;3;2.351048,-2.969238,-5.128667;;, + 27;3;2.351048,-2.969238,-5.128667;;, + 33;3;2.351048,-2.969238,-5.128667;;, + 34;3;2.351048,-2.969238,-5.128667;;, + 35;3;2.351048,-2.969238,-5.128667;;, + 41;3;2.351048,-2.969238,-5.128667;;, + 43;3;2.351048,-2.969238,-5.128667;;, + 50;3;2.351048,-2.969238,-5.128667;;, + 53;3;2.351048,-2.969238,-5.128667;;, + 55;3;2.351048,-2.969238,-5.128667;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.999936,0.006365,-0.001014,0.009261;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;0.999825,0.002850,-0.006074,0.017471;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint39Animation + { + {Joint39} + + AnimationKey + { + 2; + 23; + 0;3;2.521163,-4.102684,-2.779583;;, + 1;3;2.521163,-4.102684,-2.779583;;, + 2;3;2.521163,-4.102684,-2.779583;;, + 3;3;2.521163,-4.102684,-2.779583;;, + 4;3;2.521163,-4.102684,-2.779583;;, + 5;3;2.521163,-4.102684,-2.779583;;, + 12;3;2.521163,-4.102684,-2.779583;;, + 14;3;2.521163,-4.102684,-2.779583;;, + 15;3;2.521163,-4.102684,-2.779583;;, + 16;3;2.521163,-4.102684,-2.779583;;, + 17;3;2.521163,-4.102684,-2.779583;;, + 18;3;2.521163,-4.102684,-2.779583;;, + 19;3;2.521163,-4.102684,-2.779583;;, + 20;3;2.521163,-4.102684,-2.779583;;, + 27;3;2.521163,-4.102684,-2.779583;;, + 33;3;2.521163,-4.102684,-2.779583;;, + 34;3;2.521163,-4.102684,-2.779583;;, + 35;3;2.521163,-4.102684,-2.779583;;, + 41;3;2.521163,-4.102684,-2.779583;;, + 43;3;2.521163,-4.102684,-2.779583;;, + 50;3;2.521163,-4.102684,-2.779583;;, + 53;3;2.521163,-4.102684,-2.779583;;, + 55;3;2.521163,-4.102684,-2.779583;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.999181,0.023935,-0.000402,0.032630;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;0.993880,0.004998,-0.009988,0.109898;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint40Animation + { + {Joint40} + + AnimationKey + { + 2; + 23; + 0;3;1.543145,-3.721243,-0.884647;;, + 1;3;1.543145,-3.721243,-0.884647;;, + 2;3;1.543145,-3.721243,-0.884647;;, + 3;3;1.543145,-3.721243,-0.884647;;, + 4;3;1.543145,-3.721243,-0.884647;;, + 5;3;1.543145,-3.721243,-0.884647;;, + 12;3;1.543145,-3.721243,-0.884647;;, + 14;3;1.543145,-3.721243,-0.884647;;, + 15;3;1.543145,-3.721243,-0.884647;;, + 16;3;1.543145,-3.721243,-0.884647;;, + 17;3;1.543145,-3.721243,-0.884647;;, + 18;3;1.543145,-3.721243,-0.884647;;, + 19;3;1.543145,-3.721243,-0.884647;;, + 20;3;1.543145,-3.721243,-0.884647;;, + 27;3;1.543145,-3.721243,-0.884647;;, + 33;3;1.543145,-3.721243,-0.884647;;, + 34;3;1.543145,-3.721243,-0.884647;;, + 35;3;1.543145,-3.721243,-0.884647;;, + 41;3;1.543145,-3.721243,-0.884647;;, + 43;3;1.543145,-3.721243,-0.884647;;, + 50;3;1.543145,-3.721243,-0.884647;;, + 53;3;1.543145,-3.721243,-0.884647;;, + 55;3;1.543145,-3.721243,-0.884647;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.997151,0.043421,-0.006512,0.061340;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;0.991531,0.009387,-0.014839,0.128675;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint41Animation + { + {Joint41} + + AnimationKey + { + 2; + 23; + 0;3;0.857303,-3.157324,-0.940437;;, + 1;3;0.857303,-3.157324,-0.940437;;, + 2;3;0.857303,-3.157324,-0.940437;;, + 3;3;0.857303,-3.157324,-0.940437;;, + 4;3;0.857303,-3.157324,-0.940437;;, + 5;3;0.857303,-3.157324,-0.940437;;, + 12;3;0.857303,-3.157324,-0.940437;;, + 14;3;0.857303,-3.157324,-0.940437;;, + 15;3;0.857303,-3.157324,-0.940437;;, + 16;3;0.857303,-3.157324,-0.940437;;, + 17;3;0.857303,-3.157324,-0.940437;;, + 18;3;0.857303,-3.157324,-0.940437;;, + 19;3;0.857303,-3.157324,-0.940437;;, + 20;3;0.857303,-3.157324,-0.940437;;, + 27;3;0.857303,-3.157324,-0.940437;;, + 33;3;0.857303,-3.157324,-0.940437;;, + 34;3;0.857303,-3.157324,-0.940437;;, + 35;3;0.857303,-3.157324,-0.940437;;, + 41;3;0.857303,-3.157324,-0.940437;;, + 43;3;0.857303,-3.157324,-0.940437;;, + 50;3;0.857303,-3.157324,-0.940437;;, + 53;3;0.857303,-3.157324,-0.940437;;, + 55;3;0.857303,-3.157324,-0.940437;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint37Animation + { + {Joint37} + + AnimationKey + { + 2; + 23; + 0;3;-2.844125,-3.130046,-5.128667;;, + 1;3;-2.844125,-3.130046,-5.128667;;, + 2;3;-2.844125,-3.130046,-5.128667;;, + 3;3;-2.844125,-3.130046,-5.128667;;, + 4;3;-2.844125,-3.130046,-5.128667;;, + 5;3;-2.844125,-3.130046,-5.128667;;, + 12;3;-2.844125,-3.130046,-5.128667;;, + 14;3;-2.844125,-3.130046,-5.128667;;, + 15;3;-2.844125,-3.130046,-5.128667;;, + 16;3;-2.844125,-3.130046,-5.128667;;, + 17;3;-2.844125,-3.130046,-5.128667;;, + 18;3;-2.844125,-3.130046,-5.128667;;, + 19;3;-2.844125,-3.130046,-5.128667;;, + 20;3;-2.844125,-3.130046,-5.128667;;, + 27;3;-2.844125,-3.130046,-5.128667;;, + 33;3;-2.844125,-3.130046,-5.128667;;, + 34;3;-2.844125,-3.130046,-5.128667;;, + 35;3;-2.844125,-3.130046,-5.128667;;, + 41;3;-2.844125,-3.130046,-5.128667;;, + 43;3;-2.844125,-3.130046,-5.128667;;, + 50;3;-2.844125,-3.130046,-5.128667;;, + 53;3;-2.844125,-3.130046,-5.128667;;, + 55;3;-2.844125,-3.130046,-5.128667;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.999521,0.014638,-0.017367,0.021010;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;0.996793,0.039942,-0.049084,0.048974;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint38Animation + { + {Joint38} + + AnimationKey + { + 2; + 23; + 0;3;-2.314107,-4.198860,-2.779583;;, + 1;3;-2.314107,-4.198860,-2.779583;;, + 2;3;-2.314107,-4.198860,-2.779583;;, + 3;3;-2.314107,-4.198860,-2.779583;;, + 4;3;-2.314107,-4.198860,-2.779583;;, + 5;3;-2.314107,-4.198860,-2.779583;;, + 12;3;-2.314107,-4.198860,-2.779583;;, + 14;3;-2.314107,-4.198860,-2.779583;;, + 15;3;-2.314107,-4.198860,-2.779583;;, + 16;3;-2.314107,-4.198860,-2.779583;;, + 17;3;-2.314107,-4.198860,-2.779583;;, + 18;3;-2.314107,-4.198860,-2.779583;;, + 19;3;-2.314107,-4.198860,-2.779583;;, + 20;3;-2.314107,-4.198860,-2.779583;;, + 27;3;-2.314107,-4.198860,-2.779583;;, + 33;3;-2.314107,-4.198860,-2.779583;;, + 34;3;-2.314107,-4.198860,-2.779583;;, + 35;3;-2.314107,-4.198860,-2.779583;;, + 41;3;-2.314107,-4.198860,-2.779583;;, + 43;3;-2.314107,-4.198860,-2.779583;;, + 50;3;-2.314107,-4.198860,-2.779583;;, + 53;3;-2.314107,-4.198860,-2.779583;;, + 55;3;-2.314107,-4.198860,-2.779583;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.997118,0.039292,-0.030553,0.057264;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;0.991578,-0.066684,-0.003497,0.110966;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint42Animation + { + {Joint42} + + AnimationKey + { + 2; + 23; + 0;3;-1.200224,-3.209697,-0.885387;;, + 1;3;-1.200224,-3.209697,-0.885387;;, + 2;3;-1.200224,-3.209697,-0.885387;;, + 3;3;-1.200224,-3.209697,-0.885387;;, + 4;3;-1.200224,-3.209697,-0.885387;;, + 5;3;-1.200224,-3.209697,-0.885387;;, + 12;3;-1.200224,-3.209697,-0.885387;;, + 14;3;-1.200224,-3.209697,-0.885387;;, + 15;3;-1.200224,-3.209697,-0.885387;;, + 16;3;-1.200224,-3.209697,-0.885387;;, + 17;3;-1.200224,-3.209697,-0.885387;;, + 18;3;-1.200224,-3.209697,-0.885387;;, + 19;3;-1.200224,-3.209697,-0.885387;;, + 20;3;-1.200224,-3.209697,-0.885387;;, + 27;3;-1.200224,-3.209697,-0.885387;;, + 33;3;-1.200224,-3.209697,-0.885387;;, + 34;3;-1.200224,-3.209697,-0.885387;;, + 35;3;-1.200224,-3.209697,-0.885387;;, + 41;3;-1.200224,-3.209697,-0.885387;;, + 43;3;-1.200224,-3.209697,-0.885387;;, + 50;3;-1.200224,-3.209697,-0.885387;;, + 53;3;-1.200224,-3.209697,-0.885387;;, + 55;3;-1.200224,-3.209697,-0.885387;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint43Animation + { + {Joint43} + + AnimationKey + { + 2; + 23; + 0;3;-1.285954,-3.696030,-0.939697;;, + 1;3;-1.285954,-3.696030,-0.939697;;, + 2;3;-1.285954,-3.696030,-0.939697;;, + 3;3;-1.285954,-3.696030,-0.939697;;, + 4;3;-1.285954,-3.696030,-0.939697;;, + 5;3;-1.285954,-3.696030,-0.939697;;, + 12;3;-1.285954,-3.696030,-0.939697;;, + 14;3;-1.285954,-3.696030,-0.939697;;, + 15;3;-1.285954,-3.696030,-0.939697;;, + 16;3;-1.285954,-3.696030,-0.939697;;, + 17;3;-1.285954,-3.696030,-0.939697;;, + 18;3;-1.285954,-3.696030,-0.939697;;, + 19;3;-1.285954,-3.696030,-0.939697;;, + 20;3;-1.285954,-3.696030,-0.939697;;, + 27;3;-1.285954,-3.696030,-0.939697;;, + 33;3;-1.285954,-3.696030,-0.939697;;, + 34;3;-1.285954,-3.696030,-0.939697;;, + 35;3;-1.285954,-3.696030,-0.939697;;, + 41;3;-1.285954,-3.696030,-0.939697;;, + 43;3;-1.285954,-3.696030,-0.939697;;, + 50;3;-1.285954,-3.696030,-0.939697;;, + 53;3;-1.285954,-3.696030,-0.939697;;, + 55;3;-1.285954,-3.696030,-0.939697;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation topAnimation + { + {top} + + AnimationKey + { + 2; + 23; + 0;3;-0.311274,14.438549,-1.107615;;, + 1;3;-0.311274,14.438549,-1.107615;;, + 2;3;-0.311274,14.438549,-1.107615;;, + 3;3;-0.311274,14.438549,-1.107615;;, + 4;3;-0.311274,14.438549,-1.107615;;, + 5;3;-0.311274,14.438549,-1.107615;;, + 12;3;-0.311274,14.438549,-1.107615;;, + 14;3;-0.311274,14.438549,-1.107615;;, + 15;3;-0.311274,14.438549,-1.107615;;, + 16;3;-0.311274,14.438549,-1.107615;;, + 17;3;-0.311274,14.438549,-1.107615;;, + 18;3;-0.311274,14.438549,-1.107615;;, + 19;3;-0.311274,14.438549,-1.107615;;, + 20;3;-0.311274,14.438549,-1.107615;;, + 27;3;-0.311274,14.438549,-1.107615;;, + 33;3;-0.311274,14.438549,-1.107615;;, + 34;3;-0.311274,14.438549,-1.107615;;, + 35;3;-0.311274,14.438549,-1.107615;;, + 41;3;-0.311274,14.438549,-1.107615;;, + 43;3;-0.311274,14.438549,-1.107615;;, + 50;3;-0.311274,14.438549,-1.107615;;, + 53;3;-0.311274,14.438549,-1.107615;;, + 55;3;-0.311274,14.438549,-1.107615;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation pad2Animation + { + {pad2} + + AnimationKey + { + 2; + 23; + 0;3;-6.280235,3.399014,0.000000;;, + 1;3;-6.280235,3.399014,0.000000;;, + 2;3;-6.280235,3.399014,0.000000;;, + 3;3;-6.280235,3.399014,0.000000;;, + 4;3;-6.280235,3.399014,0.000000;;, + 5;3;-6.280235,3.399014,0.000000;;, + 12;3;-6.280235,3.399014,0.000000;;, + 14;3;-6.280235,3.399014,0.000000;;, + 15;3;-6.280235,3.399014,0.000000;;, + 16;3;-6.280235,3.399014,0.000000;;, + 17;3;-6.280235,3.399014,0.000000;;, + 18;3;-6.280235,3.399014,0.000000;;, + 19;3;-6.280235,3.399014,0.000000;;, + 20;3;-6.280235,3.399014,0.000000;;, + 27;3;-6.280235,3.399014,0.000000;;, + 33;3;-6.280235,3.399014,0.000000;;, + 34;3;-6.280235,3.399014,0.000000;;, + 35;3;-6.280235,3.399014,0.000000;;, + 41;3;-6.280235,3.399014,0.000000;;, + 43;3;-6.280235,3.399014,0.000000;;, + 50;3;-6.280235,3.399014,0.000000;;, + 53;3;-6.280235,3.399014,0.000000;;, + 55;3;-6.280235,3.399014,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 1;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 2;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 3;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 4;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 5;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 12;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 14;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 15;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 16;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 17;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 18;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 19;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 20;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 27;4;0.989850,-0.129750,-0.014210,-0.056208;;, + 33;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 34;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 35;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 41;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 43;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 50;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 53;4;0.988040,-0.130078,-0.010809,-0.082100;;, + 55;4;0.988040,-0.130078,-0.010809,-0.082100;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation pad1Animation + { + {pad1} + + AnimationKey + { + 2; + 23; + 0;3;5.233529,3.529747,0.000000;;, + 1;3;5.233529,3.529747,0.000000;;, + 2;3;5.233529,3.529747,0.000000;;, + 3;3;5.233529,3.529747,0.000000;;, + 4;3;5.233529,3.529747,0.000000;;, + 5;3;5.233529,3.529747,0.000000;;, + 12;3;5.233529,3.529747,0.000000;;, + 14;3;5.233529,3.529747,0.000000;;, + 15;3;5.233529,3.529747,0.000000;;, + 16;3;5.233529,3.529747,0.000000;;, + 17;3;5.233529,3.529747,0.000000;;, + 18;3;5.233529,3.529747,0.000000;;, + 19;3;5.233529,3.529747,0.000000;;, + 20;3;5.233529,3.529747,0.000000;;, + 27;3;5.233529,3.529747,0.000000;;, + 33;3;5.233529,3.529747,0.000000;;, + 34;3;5.233529,3.529747,0.000000;;, + 35;3;5.233529,3.529747,0.000000;;, + 41;3;5.233529,3.529747,0.000000;;, + 43;3;5.233529,3.529747,0.000000;;, + 50;3;5.233529,3.529747,0.000000;;, + 53;3;5.233529,3.529747,0.000000;;, + 55;3;5.233529,3.529747,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;0.998135,0.000000,0.000000,-0.061049;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation lsholdaAnimation + { + {lsholda} + + AnimationKey + { + 2; + 23; + 0;3;-10.711074,-1.732187,3.529744;;, + 1;3;-10.711074,-1.732187,3.529744;;, + 2;3;-10.711074,-1.732187,3.529744;;, + 3;3;-10.711074,-1.732187,3.529744;;, + 4;3;-10.711074,-1.732187,3.529744;;, + 5;3;-10.711074,-1.732187,3.529744;;, + 12;3;-10.711074,-1.732187,3.529744;;, + 14;3;-10.711074,-1.732187,3.529744;;, + 15;3;-10.711074,-1.732187,3.529744;;, + 16;3;-10.711074,-1.732187,3.529744;;, + 17;3;-10.711074,-1.732187,3.529744;;, + 18;3;-10.711074,-1.732187,3.529744;;, + 19;3;-10.711074,-1.732187,3.529744;;, + 20;3;-10.711074,-1.732187,3.529744;;, + 27;3;-10.711074,-1.732187,3.529744;;, + 33;3;-10.711074,-1.732187,3.529744;;, + 34;3;-10.711074,-1.732187,3.529744;;, + 35;3;-10.711074,-1.732187,3.529744;;, + 41;3;-10.711074,-1.732187,3.529744;;, + 43;3;-10.711074,-1.732187,3.529744;;, + 50;3;-10.711074,-1.732187,3.529744;;, + 53;3;-10.711074,-1.732187,3.529744;;, + 55;3;-10.711074,-1.732187,3.529744;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 1;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 2;4;0.984948,-0.092375,0.080710,-0.121780;;, + 3;4;0.957969,-0.193544,0.176588,-0.116845;;, + 4;4;0.919617,-0.276885,0.255679,-0.110761;;, + 5;4;0.919617,-0.276885,0.255679,-0.110761;;, + 12;4;0.919617,-0.276885,0.255679,-0.110761;;, + 14;4;0.919617,-0.276885,0.255679,-0.110761;;, + 15;4;0.919617,-0.276885,0.255679,-0.110761;;, + 16;4;0.949143,-0.215995,0.197884,-0.115394;;, + 17;4;0.973899,-0.143396,0.129045,-0.119611;;, + 18;4;0.988465,-0.067843,0.057481,-0.122598;;, + 19;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 20;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 27;4;0.980361,0.117258,0.064506,-0.144851;;, + 33;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 34;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 35;4;0.992262,-0.004035,-0.002900,-0.124058;;, + 41;4;0.987041,-0.061321,0.042727,-0.142002;;, + 43;4;0.984145,-0.079780,0.057436,-0.147634;;, + 50;4;0.975443,-0.121280,0.090521,-0.160025;;, + 53;4;0.987695,-0.056533,0.038912,-0.140529;;, + 55;4;0.992262,-0.004035,-0.002900,-0.124058;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation lelboAnimation + { + {lelbo} + + AnimationKey + { + 2; + 23; + 0;3;-6.541911,-5.098517,0.705949;;, + 1;3;-6.541911,-5.098517,0.705949;;, + 2;3;-6.541911,-5.098517,0.705949;;, + 3;3;-6.541911,-5.098517,0.705949;;, + 4;3;-6.541911,-5.098517,0.705949;;, + 5;3;-6.541911,-5.098517,0.705949;;, + 12;3;-6.541911,-5.098517,0.705949;;, + 14;3;-6.541911,-5.098517,0.705949;;, + 15;3;-6.541911,-5.098517,0.705949;;, + 16;3;-6.541911,-5.098517,0.705949;;, + 17;3;-6.541911,-5.098517,0.705949;;, + 18;3;-6.541911,-5.098517,0.705949;;, + 19;3;-6.541911,-5.098517,0.705949;;, + 20;3;-6.541911,-5.098517,0.705949;;, + 27;3;-6.541911,-5.098517,0.705949;;, + 33;3;-6.541911,-5.098517,0.705949;;, + 34;3;-6.541911,-5.098517,0.705949;;, + 35;3;-6.541911,-5.098517,0.705949;;, + 41;3;-6.541911,-5.098517,0.705949;;, + 43;3;-6.541911,-5.098517,0.705949;;, + 50;3;-6.541911,-5.098517,0.705949;;, + 53;3;-6.541911,-5.098517,0.705949;;, + 55;3;-6.541911,-5.098517,0.705949;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.938931,-0.301990,0.116244,-0.117037;;, + 1;4;0.938931,-0.301990,0.116244,-0.117037;;, + 2;4;0.939499,-0.269250,0.068390,-0.200421;;, + 3;4;0.927931,-0.227598,0.011743,-0.294966;;, + 4;4;0.907758,-0.189498,-0.036768,-0.372443;;, + 5;4;0.907758,-0.189498,-0.036768,-0.372443;;, + 12;4;0.907815,-0.196434,-0.033361,-0.369017;;, + 14;4;0.907758,-0.189498,-0.036768,-0.372443;;, + 15;4;0.907758,-0.189498,-0.036768,-0.372443;;, + 16;4;0.923494,-0.217696,-0.001142,-0.315858;;, + 17;4;0.935347,-0.248829,0.040096,-0.248198;;, + 18;4;0.940317,-0.278666,0.081816,-0.177359;;, + 19;4;0.938931,-0.301990,0.116244,-0.117037;;, + 20;4;0.938931,-0.301990,0.116244,-0.117037;;, + 27;4;0.969755,-0.235046,0.020216,-0.062603;;, + 33;4;0.938931,-0.301990,0.116244,-0.117037;;, + 34;4;0.938931,-0.301990,0.116244,-0.117037;;, + 35;4;0.938931,-0.301990,0.116244,-0.117037;;, + 41;4;0.907794,-0.355022,0.176137,-0.137281;;, + 43;4;0.896205,-0.371593,0.195226,-0.143604;;, + 50;4;0.867362,-0.407890,0.237736,-0.157448;;, + 53;4;0.910675,-0.350682,0.171168,-0.135625;;, + 55;4;0.938931,-0.301990,0.116244,-0.117037;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation lwristAnimation + { + {lwrist} + + AnimationKey + { + 2; + 23; + 0;3;-7.850295,-6.405833,0.000000;;, + 1;3;-7.850295,-6.405833,0.000000;;, + 2;3;-7.850295,-6.405833,0.000000;;, + 3;3;-7.850295,-6.405833,0.000000;;, + 4;3;-7.850295,-6.405833,0.000000;;, + 5;3;-7.850295,-6.405833,0.000000;;, + 12;3;-7.850295,-6.405833,0.000000;;, + 14;3;-7.850295,-6.405833,0.000000;;, + 15;3;-7.850295,-6.405833,0.000000;;, + 16;3;-7.850295,-6.405833,0.000000;;, + 17;3;-7.850295,-6.405833,0.000000;;, + 18;3;-7.850295,-6.405833,0.000000;;, + 19;3;-7.850295,-6.405833,0.000000;;, + 20;3;-7.850295,-6.405833,0.000000;;, + 27;3;-7.850295,-6.405833,0.000000;;, + 33;3;-7.850295,-6.405833,0.000000;;, + 34;3;-7.850295,-6.405833,0.000000;;, + 35;3;-7.850295,-6.405833,0.000000;;, + 41;3;-7.850295,-6.405833,0.000000;;, + 43;3;-7.850295,-6.405833,0.000000;;, + 50;3;-7.850295,-6.405833,0.000000;;, + 53;3;-7.850295,-6.405833,0.000000;;, + 55;3;-7.850295,-6.405833,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint17Animation + { + {Joint17} + + AnimationKey + { + 2; + 23; + 0;3;-3.663469,-3.660475,0.000000;;, + 1;3;-3.663469,-3.660475,0.000000;;, + 2;3;-3.663469,-3.660475,0.000000;;, + 3;3;-3.663469,-3.660475,0.000000;;, + 4;3;-3.663469,-3.660475,0.000000;;, + 5;3;-3.663469,-3.660475,0.000000;;, + 12;3;-3.663469,-3.660475,0.000000;;, + 14;3;-3.663469,-3.660475,0.000000;;, + 15;3;-3.663469,-3.660475,0.000000;;, + 16;3;-3.663469,-3.660475,0.000000;;, + 17;3;-3.663469,-3.660475,0.000000;;, + 18;3;-3.663469,-3.660475,0.000000;;, + 19;3;-3.663469,-3.660475,0.000000;;, + 20;3;-3.663469,-3.660475,0.000000;;, + 27;3;-3.663469,-3.660475,0.000000;;, + 33;3;-3.663469,-3.660475,0.000000;;, + 34;3;-3.663469,-3.660475,0.000000;;, + 35;3;-3.663469,-3.660475,0.000000;;, + 41;3;-3.663469,-3.660475,0.000000;;, + 43;3;-3.663469,-3.660475,0.000000;;, + 50;3;-3.663469,-3.660475,0.000000;;, + 53;3;-3.663469,-3.660475,0.000000;;, + 55;3;-3.663469,-3.660475,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint18Animation + { + {Joint18} + + AnimationKey + { + 2; + 23; + 0;3;-1.046706,-2.091701,0.000000;;, + 1;3;-1.046706,-2.091701,0.000000;;, + 2;3;-1.046706,-2.091701,0.000000;;, + 3;3;-1.046706,-2.091701,0.000000;;, + 4;3;-1.046706,-2.091701,0.000000;;, + 5;3;-1.046706,-2.091701,0.000000;;, + 12;3;-1.046706,-2.091701,0.000000;;, + 14;3;-1.046706,-2.091701,0.000000;;, + 15;3;-1.046706,-2.091701,0.000000;;, + 16;3;-1.046706,-2.091701,0.000000;;, + 17;3;-1.046706,-2.091701,0.000000;;, + 18;3;-1.046706,-2.091701,0.000000;;, + 19;3;-1.046706,-2.091701,0.000000;;, + 20;3;-1.046706,-2.091701,0.000000;;, + 27;3;-1.046706,-2.091701,0.000000;;, + 33;3;-1.046706,-2.091701,0.000000;;, + 34;3;-1.046706,-2.091701,0.000000;;, + 35;3;-1.046706,-2.091701,0.000000;;, + 41;3;-1.046706,-2.091701,0.000000;;, + 43;3;-1.046706,-2.091701,0.000000;;, + 50;3;-1.046706,-2.091701,0.000000;;, + 53;3;-1.046706,-2.091701,0.000000;;, + 55;3;-1.046706,-2.091701,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.938191,0.000000,0.000000,-0.346117;;, + 1;4;0.938191,0.000000,0.000000,-0.346117;;, + 2;4;0.938191,0.000000,0.000000,-0.346117;;, + 3;4;0.938191,0.000000,0.000000,-0.346117;;, + 4;4;0.938191,0.000000,0.000000,-0.346117;;, + 5;4;0.938191,0.000000,0.000000,-0.346117;;, + 12;4;0.938191,0.000000,0.000000,-0.346117;;, + 14;4;0.938191,0.000000,0.000000,-0.346117;;, + 15;4;0.938191,0.000000,0.000000,-0.346117;;, + 16;4;0.938191,0.000000,0.000000,-0.346117;;, + 17;4;0.938191,0.000000,0.000000,-0.346117;;, + 18;4;0.938191,0.000000,0.000000,-0.346117;;, + 19;4;0.938191,0.000000,0.000000,-0.346117;;, + 20;4;0.938191,0.000000,0.000000,-0.346117;;, + 27;4;0.938191,0.000000,0.000000,-0.346117;;, + 33;4;0.938191,0.000000,0.000000,-0.346117;;, + 34;4;0.938191,0.000000,0.000000,-0.346117;;, + 35;4;0.938191,0.000000,0.000000,-0.346117;;, + 41;4;0.938191,0.000000,0.000000,-0.346117;;, + 43;4;0.938191,0.000000,0.000000,-0.346117;;, + 50;4;0.938191,0.000000,0.000000,-0.346117;;, + 53;4;0.938191,0.000000,0.000000,-0.346117;;, + 55;4;0.938191,0.000000,0.000000,-0.346117;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint19Animation + { + {Joint19} + + AnimationKey + { + 2; + 23; + 0;3;-0.130838,-3.137549,0.000000;;, + 1;3;-0.130838,-3.137549,0.000000;;, + 2;3;-0.130838,-3.137549,0.000000;;, + 3;3;-0.130838,-3.137549,0.000000;;, + 4;3;-0.130838,-3.137549,0.000000;;, + 5;3;-0.130838,-3.137549,0.000000;;, + 12;3;-0.130838,-3.137549,0.000000;;, + 14;3;-0.130838,-3.137549,0.000000;;, + 15;3;-0.130838,-3.137549,0.000000;;, + 16;3;-0.130838,-3.137549,0.000000;;, + 17;3;-0.130838,-3.137549,0.000000;;, + 18;3;-0.130838,-3.137549,0.000000;;, + 19;3;-0.130838,-3.137549,0.000000;;, + 20;3;-0.130838,-3.137549,0.000000;;, + 27;3;-0.130838,-3.137549,0.000000;;, + 33;3;-0.130838,-3.137549,0.000000;;, + 34;3;-0.130838,-3.137549,0.000000;;, + 35;3;-0.130838,-3.137549,0.000000;;, + 41;3;-0.130838,-3.137549,0.000000;;, + 43;3;-0.130838,-3.137549,0.000000;;, + 50;3;-0.130838,-3.137549,0.000000;;, + 53;3;-0.130838,-3.137549,0.000000;;, + 55;3;-0.130838,-3.137549,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint20Animation + { + {Joint20} + + AnimationKey + { + 2; + 23; + 0;3;-1.416095,-4.359032,-3.203176;;, + 1;3;-1.416095,-4.359032,-3.203176;;, + 2;3;-1.416095,-4.359032,-3.203176;;, + 3;3;-1.416095,-4.359032,-3.203176;;, + 4;3;-1.416095,-4.359032,-3.203176;;, + 5;3;-1.416095,-4.359032,-3.203176;;, + 12;3;-1.416095,-4.359032,-3.203176;;, + 14;3;-1.416095,-4.359032,-3.203176;;, + 15;3;-1.416095,-4.359032,-3.203176;;, + 16;3;-1.416095,-4.359032,-3.203176;;, + 17;3;-1.416095,-4.359032,-3.203176;;, + 18;3;-1.416095,-4.359032,-3.203176;;, + 19;3;-1.416095,-4.359032,-3.203176;;, + 20;3;-1.416095,-4.359032,-3.203176;;, + 27;3;-1.416095,-4.359032,-3.203176;;, + 33;3;-1.416095,-4.359032,-3.203176;;, + 34;3;-1.416095,-4.359032,-3.203176;;, + 35;3;-1.416095,-4.359032,-3.203176;;, + 41;3;-1.416095,-4.359032,-3.203176;;, + 43;3;-1.416095,-4.359032,-3.203176;;, + 50;3;-1.416095,-4.359032,-3.203176;;, + 53;3;-1.416095,-4.359032,-3.203176;;, + 55;3;-1.416095,-4.359032,-3.203176;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint21Animation + { + {Joint21} + + AnimationKey + { + 2; + 23; + 0;3;-1.046704,-2.483894,0.000000;;, + 1;3;-1.046704,-2.483894,0.000000;;, + 2;3;-1.046704,-2.483894,0.000000;;, + 3;3;-1.046704,-2.483894,0.000000;;, + 4;3;-1.046704,-2.483894,0.000000;;, + 5;3;-1.046704,-2.483894,0.000000;;, + 12;3;-1.046704,-2.483894,0.000000;;, + 14;3;-1.046704,-2.483894,0.000000;;, + 15;3;-1.046704,-2.483894,0.000000;;, + 16;3;-1.046704,-2.483894,0.000000;;, + 17;3;-1.046704,-2.483894,0.000000;;, + 18;3;-1.046704,-2.483894,0.000000;;, + 19;3;-1.046704,-2.483894,0.000000;;, + 20;3;-1.046704,-2.483894,0.000000;;, + 27;3;-1.046704,-2.483894,0.000000;;, + 33;3;-1.046704,-2.483894,0.000000;;, + 34;3;-1.046704,-2.483894,0.000000;;, + 35;3;-1.046704,-2.483894,0.000000;;, + 41;3;-1.046704,-2.483894,0.000000;;, + 43;3;-1.046704,-2.483894,0.000000;;, + 50;3;-1.046704,-2.483894,0.000000;;, + 53;3;-1.046704,-2.483894,0.000000;;, + 55;3;-1.046704,-2.483894,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation rsholdaAnimation + { + {rsholda} + + AnimationKey + { + 2; + 23; + 0;3;9.986465,-1.438042,3.529744;;, + 1;3;9.986465,-1.438042,3.529744;;, + 2;3;9.986465,-1.438042,3.529744;;, + 3;3;9.986465,-1.438042,3.529744;;, + 4;3;9.986465,-1.438042,3.529744;;, + 5;3;9.986465,-1.438042,3.529744;;, + 12;3;9.986465,-1.438042,3.529744;;, + 14;3;9.986465,-1.438042,3.529744;;, + 15;3;9.986465,-1.438042,3.529744;;, + 16;3;9.986465,-1.438042,3.529744;;, + 17;3;9.986465,-1.438042,3.529744;;, + 18;3;9.986465,-1.438042,3.529744;;, + 19;3;9.986465,-1.438042,3.529744;;, + 20;3;9.986465,-1.438042,3.529744;;, + 27;3;9.986465,-1.438042,3.529744;;, + 33;3;9.986465,-1.438042,3.529744;;, + 34;3;9.986465,-1.438042,3.529744;;, + 35;3;9.986465,-1.438042,3.529744;;, + 41;3;9.986465,-1.438042,3.529744;;, + 43;3;9.986465,-1.438042,3.529744;;, + 50;3;9.986465,-1.438042,3.529744;;, + 53;3;9.986465,-1.438042,3.529744;;, + 55;3;9.986465,-1.438042,3.529744;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.993880,-0.002269,0.003388,0.110387;;, + 1;4;0.993880,-0.002269,0.003388,0.110387;;, + 2;4;0.993765,-0.003650,0.000223,0.111434;;, + 3;4;0.993637,-0.005031,-0.002942,0.112479;;, + 4;4;0.993496,-0.006413,-0.006107,0.113522;;, + 5;4;0.993496,-0.006413,-0.006107,0.113522;;, + 12;4;0.993496,-0.006413,-0.006107,0.113523;;, + 14;4;0.993496,-0.006413,-0.006107,0.113522;;, + 15;4;0.993496,-0.006413,-0.006107,0.113522;;, + 16;4;0.993603,-0.005377,-0.003733,0.112740;;, + 17;4;0.993703,-0.004341,-0.001359,0.111957;;, + 18;4;0.993795,-0.003305,0.001014,0.111173;;, + 19;4;0.993880,-0.002269,0.003388,0.110387;;, + 20;4;0.993880,-0.002269,0.003388,0.110387;;, + 27;4;0.973729,-0.204525,0.026684,0.096484;;, + 33;4;0.993880,-0.002269,0.003388,0.110387;;, + 34;4;0.993880,-0.002269,0.003388,0.110387;;, + 35;4;0.993880,-0.002269,0.003388,0.110387;;, + 41;4;0.994023,-0.003923,0.001453,0.109093;;, + 43;4;0.993957,-0.002996,-0.000780,0.109727;;, + 50;4;0.993678,0.000249,-0.008594,0.111941;;, + 53;4;0.993801,-0.001051,-0.002101,0.111149;;, + 55;4;0.993880,-0.002269,0.003388,0.110387;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation relboAnimation + { + {relbo} + + AnimationKey + { + 2; + 23; + 0;3;6.803588,-5.359982,0.705949;;, + 1;3;6.803588,-5.359982,0.705949;;, + 2;3;6.803588,-5.359982,0.705949;;, + 3;3;6.803588,-5.359982,0.705949;;, + 4;3;6.803588,-5.359982,0.705949;;, + 5;3;6.803588,-5.359982,0.705949;;, + 12;3;6.803588,-5.359982,0.705949;;, + 14;3;6.803588,-5.359982,0.705949;;, + 15;3;6.803588,-5.359982,0.705949;;, + 16;3;6.803588,-5.359982,0.705949;;, + 17;3;6.803588,-5.359982,0.705949;;, + 18;3;6.803588,-5.359982,0.705949;;, + 19;3;6.803588,-5.359982,0.705949;;, + 20;3;6.803588,-5.359982,0.705949;;, + 27;3;6.803588,-5.359982,0.705949;;, + 33;3;6.803588,-5.359982,0.705949;;, + 34;3;6.803588,-5.359982,0.705949;;, + 35;3;6.803588,-5.359982,0.705949;;, + 41;3;6.803588,-5.359982,0.705949;;, + 43;3;6.803588,-5.359982,0.705949;;, + 50;3;6.803588,-5.359982,0.705949;;, + 53;3;6.803588,-5.359982,0.705949;;, + 55;3;6.803588,-5.359982,0.705949;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.959847,-0.255150,-0.080990,0.083865;;, + 1;4;0.959847,-0.255150,-0.080990,0.083865;;, + 2;4;0.962470,-0.246054,-0.075922,0.085704;;, + 3;4;0.965384,-0.235411,-0.070003,0.087834;;, + 4;4;0.967748,-0.226298,-0.064941,0.089641;;, + 5;4;0.967748,-0.226298,-0.064941,0.089641;;, + 12;4;0.967748,-0.226298,-0.064941,0.089641;;, + 14;4;0.967748,-0.226298,-0.064941,0.089641;;, + 15;4;0.967748,-0.226298,-0.064941,0.089641;;, + 16;4;0.966023,-0.232995,-0.068660,0.088315;;, + 17;4;0.964039,-0.240399,-0.072776,0.086838;;, + 18;4;0.961805,-0.248399,-0.077228,0.085231;;, + 19;4;0.959847,-0.255150,-0.080990,0.083865;;, + 20;4;0.959847,-0.255150,-0.080990,0.083865;;, + 27;4;0.959350,-0.261136,-0.082412,0.068295;;, + 33;4;0.959847,-0.255150,-0.080990,0.083865;;, + 34;4;0.959847,-0.255150,-0.080990,0.083865;;, + 35;4;0.959847,-0.255150,-0.080990,0.083865;;, + 41;4;0.958063,-0.263775,-0.077544,0.080776;;, + 43;4;0.957289,-0.265983,-0.080054,0.080258;;, + 50;4;0.955168,-0.270038,-0.091428,0.079837;;, + 53;4;0.957785,-0.261756,-0.085958,0.082112;;, + 55;4;0.959847,-0.255150,-0.080990,0.083865;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation rwristAnimation + { + {rwrist} + + AnimationKey + { + 2; + 24; + 0;3;8.373647,-6.798027,0.000000;;, + 1;3;8.373647,-6.798027,0.000000;;, + 2;3;8.373647,-6.798027,0.000000;;, + 3;3;8.373647,-6.798027,0.000000;;, + 4;3;8.373647,-6.798027,0.000000;;, + 5;3;8.373647,-6.798027,0.000000;;, + 12;3;8.373647,-6.798027,0.000000;;, + 14;3;8.373647,-6.798027,0.000000;;, + 15;3;8.373647,-6.798027,0.000000;;, + 16;3;8.373647,-6.798027,0.000000;;, + 17;3;8.373647,-6.798027,0.000000;;, + 18;3;8.373647,-6.798027,0.000000;;, + 19;3;8.373647,-6.798027,0.000000;;, + 20;3;8.373647,-6.798027,0.000000;;, + 27;3;8.373647,-6.798027,0.000000;;, + 29;3;8.373647,-6.798027,0.000000;;, + 33;3;8.373647,-6.798027,0.000000;;, + 34;3;8.373647,-6.798027,0.000000;;, + 35;3;8.373647,-6.798027,0.000000;;, + 41;3;8.373647,-6.798027,0.000000;;, + 43;3;8.373647,-6.798027,0.000000;;, + 50;3;8.373647,-6.798027,0.000000;;, + 53;3;8.373647,-6.798027,0.000000;;, + 55;3;8.373647,-6.798027,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 24; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.999709,0.020471,0.012692,-0.001586;;, + 3;4;0.998633,0.044321,0.027480,-0.003434;;, + 4;4;0.997090,0.064652,0.040085,-0.005009;;, + 5;4;0.997090,0.064652,0.040085,-0.005009;;, + 12;4;0.997090,0.064652,0.040085,-0.005009;;, + 14;4;0.997090,0.064652,0.040085,-0.005009;;, + 15;4;0.997090,0.064652,0.040085,-0.005009;;, + 16;4;0.998280,0.049721,0.030828,-0.003852;;, + 17;4;0.999269,0.032417,0.020099,-0.002511;;, + 18;4;0.999848,0.014768,0.009157,-0.001144;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;0.996917,0.078459,0.000000,0.000000;;, + 29;4;0.992822,0.119601,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.999329,-0.002870,0.035216,-0.009610;;, + 43;4;0.999253,-0.000181,0.037154,-0.010592;;, + 50;4;0.999533,0.011592,0.026653,-0.009464;;, + 53;4;0.999915,0.005480,0.011096,-0.004044;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint25Animation + { + {Joint25} + + AnimationKey + { + 2; + 23; + 0;3;3.663469,-3.137551,0.000000;;, + 1;3;3.663469,-3.137551,0.000000;;, + 2;3;3.663469,-3.137551,0.000000;;, + 3;3;3.663469,-3.137551,0.000000;;, + 4;3;3.663469,-3.137551,0.000000;;, + 5;3;3.663469,-3.137551,0.000000;;, + 12;3;3.663469,-3.137551,0.000000;;, + 14;3;3.663469,-3.137551,0.000000;;, + 15;3;3.663469,-3.137551,0.000000;;, + 16;3;3.663469,-3.137551,0.000000;;, + 17;3;3.663469,-3.137551,0.000000;;, + 18;3;3.663469,-3.137551,0.000000;;, + 19;3;3.663469,-3.137551,0.000000;;, + 20;3;3.663469,-3.137551,0.000000;;, + 27;3;3.663469,-3.137551,0.000000;;, + 33;3;3.663469,-3.137551,0.000000;;, + 34;3;3.663469,-3.137551,0.000000;;, + 35;3;3.663469,-3.137551,0.000000;;, + 41;3;3.663469,-3.137551,0.000000;;, + 43;3;3.663469,-3.137551,0.000000;;, + 50;3;3.663469,-3.137551,0.000000;;, + 53;3;3.663469,-3.137551,0.000000;;, + 55;3;3.663469,-3.137551,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint26Animation + { + {Joint26} + + AnimationKey + { + 2; + 23; + 0;3;1.046706,-2.353162,0.000000;;, + 1;3;1.046706,-2.353162,0.000000;;, + 2;3;1.046706,-2.353162,0.000000;;, + 3;3;1.046706,-2.353162,0.000000;;, + 4;3;1.046706,-2.353162,0.000000;;, + 5;3;1.046706,-2.353162,0.000000;;, + 12;3;1.046706,-2.353162,0.000000;;, + 14;3;1.046706,-2.353162,0.000000;;, + 15;3;1.046706,-2.353162,0.000000;;, + 16;3;1.046706,-2.353162,0.000000;;, + 17;3;1.046706,-2.353162,0.000000;;, + 18;3;1.046706,-2.353162,0.000000;;, + 19;3;1.046706,-2.353162,0.000000;;, + 20;3;1.046706,-2.353162,0.000000;;, + 27;3;1.046706,-2.353162,0.000000;;, + 33;3;1.046706,-2.353162,0.000000;;, + 34;3;1.046706,-2.353162,0.000000;;, + 35;3;1.046706,-2.353162,0.000000;;, + 41;3;1.046706,-2.353162,0.000000;;, + 43;3;1.046706,-2.353162,0.000000;;, + 50;3;1.046706,-2.353162,0.000000;;, + 53;3;1.046706,-2.353162,0.000000;;, + 55;3;1.046706,-2.353162,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.878817,0.000000,0.000000,0.477159;;, + 1;4;0.878817,0.000000,0.000000,0.477159;;, + 2;4;0.878817,0.000000,0.000000,0.477159;;, + 3;4;0.878817,0.000000,0.000000,0.477159;;, + 4;4;0.878817,0.000000,0.000000,0.477159;;, + 5;4;0.878817,0.000000,0.000000,0.477159;;, + 12;4;0.878817,0.000000,0.000000,0.477159;;, + 14;4;0.878817,0.000000,0.000000,0.477159;;, + 15;4;0.878817,0.000000,0.000000,0.477159;;, + 16;4;0.878817,0.000000,0.000000,0.477159;;, + 17;4;0.878817,0.000000,0.000000,0.477159;;, + 18;4;0.878817,0.000000,0.000000,0.477159;;, + 19;4;0.878817,0.000000,0.000000,0.477159;;, + 20;4;0.878817,0.000000,0.000000,0.477159;;, + 27;4;0.878817,0.000000,0.000000,0.477159;;, + 33;4;0.878817,0.000000,0.000000,0.477159;;, + 34;4;0.878817,0.000000,0.000000,0.477159;;, + 35;4;0.878817,0.000000,0.000000,0.477159;;, + 41;4;0.878817,0.000000,0.000000,0.477159;;, + 43;4;0.878817,0.000000,0.000000,0.477159;;, + 50;4;0.878817,0.000000,0.000000,0.477159;;, + 53;4;0.878817,0.000000,0.000000,0.477159;;, + 55;4;0.878817,0.000000,0.000000,0.477159;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint27Animation + { + {Joint27} + + AnimationKey + { + 2; + 23; + 0;3;-0.261676,-2.876088,0.000000;;, + 1;3;-0.261676,-2.876088,0.000000;;, + 2;3;-0.261676,-2.876088,0.000000;;, + 3;3;-0.261676,-2.876088,0.000000;;, + 4;3;-0.261676,-2.876088,0.000000;;, + 5;3;-0.261676,-2.876088,0.000000;;, + 12;3;-0.261676,-2.876088,0.000000;;, + 14;3;-0.261676,-2.876088,0.000000;;, + 15;3;-0.261676,-2.876088,0.000000;;, + 16;3;-0.261676,-2.876088,0.000000;;, + 17;3;-0.261676,-2.876088,0.000000;;, + 18;3;-0.261676,-2.876088,0.000000;;, + 19;3;-0.261676,-2.876088,0.000000;;, + 20;3;-0.261676,-2.876088,0.000000;;, + 27;3;-0.261676,-2.876088,0.000000;;, + 33;3;-0.261676,-2.876088,0.000000;;, + 34;3;-0.261676,-2.876088,0.000000;;, + 35;3;-0.261676,-2.876088,0.000000;;, + 41;3;-0.261676,-2.876088,0.000000;;, + 43;3;-0.261676,-2.876088,0.000000;;, + 50;3;-0.261676,-2.876088,0.000000;;, + 53;3;-0.261676,-2.876088,0.000000;;, + 55;3;-0.261676,-2.876088,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint28Animation + { + {Joint28} + + AnimationKey + { + 2; + 23; + 0;3;-0.785030,-4.183402,-2.034320;;, + 1;3;-0.785030,-4.183402,-2.034320;;, + 2;3;-0.785030,-4.183402,-2.034320;;, + 3;3;-0.785030,-4.183402,-2.034320;;, + 4;3;-0.785030,-4.183402,-2.034320;;, + 5;3;-0.785030,-4.183402,-2.034320;;, + 12;3;-0.785030,-4.183402,-2.034320;;, + 14;3;-0.785030,-4.183402,-2.034320;;, + 15;3;-0.785030,-4.183402,-2.034320;;, + 16;3;-0.785030,-4.183402,-2.034320;;, + 17;3;-0.785030,-4.183402,-2.034320;;, + 18;3;-0.785030,-4.183402,-2.034320;;, + 19;3;-0.785030,-4.183402,-2.034320;;, + 20;3;-0.785030,-4.183402,-2.034320;;, + 27;3;-0.785030,-4.183402,-2.034320;;, + 33;3;-0.785030,-4.183402,-2.034320;;, + 34;3;-0.785030,-4.183402,-2.034320;;, + 35;3;-0.785030,-4.183402,-2.034320;;, + 41;3;-0.785030,-4.183402,-2.034320;;, + 43;3;-0.785030,-4.183402,-2.034320;;, + 50;3;-0.785030,-4.183402,-2.034320;;, + 53;3;-0.785030,-4.183402,-2.034320;;, + 55;3;-0.785030,-4.183402,-2.034320;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;0.971342,0.000000,0.000000,0.237686;;, + 1;4;0.971342,0.000000,0.000000,0.237686;;, + 2;4;0.971342,0.000000,0.000000,0.237686;;, + 3;4;0.971342,0.000000,0.000000,0.237686;;, + 4;4;0.971342,0.000000,0.000000,0.237686;;, + 5;4;0.971342,0.000000,0.000000,0.237686;;, + 12;4;0.971342,0.000000,0.000000,0.237686;;, + 14;4;0.971342,0.000000,0.000000,0.237686;;, + 15;4;0.971342,0.000000,0.000000,0.237686;;, + 16;4;0.971342,0.000000,0.000000,0.237686;;, + 17;4;0.971342,0.000000,0.000000,0.237686;;, + 18;4;0.971342,0.000000,0.000000,0.237686;;, + 19;4;0.971342,0.000000,0.000000,0.237686;;, + 20;4;0.971342,0.000000,0.000000,0.237686;;, + 27;4;0.971342,0.000000,0.000000,0.237686;;, + 33;4;0.971342,0.000000,0.000000,0.237686;;, + 34;4;0.971342,0.000000,0.000000,0.237686;;, + 35;4;0.971342,0.000000,0.000000,0.237686;;, + 41;4;0.971342,0.000000,0.000000,0.237686;;, + 43;4;0.971342,0.000000,0.000000,0.237686;;, + 50;4;0.971342,0.000000,0.000000,0.237686;;, + 53;4;0.971342,0.000000,0.000000,0.237686;;, + 55;4;0.971342,0.000000,0.000000,0.237686;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation Joint29Animation + { + {Joint29} + + AnimationKey + { + 2; + 23; + 0;3;0.261676,-2.483894,0.000000;;, + 1;3;0.261676,-2.483894,0.000000;;, + 2;3;0.261676,-2.483894,0.000000;;, + 3;3;0.261676,-2.483894,0.000000;;, + 4;3;0.261676,-2.483894,0.000000;;, + 5;3;0.261676,-2.483894,0.000000;;, + 12;3;0.261676,-2.483894,0.000000;;, + 14;3;0.261676,-2.483894,0.000000;;, + 15;3;0.261676,-2.483894,0.000000;;, + 16;3;0.261676,-2.483894,0.000000;;, + 17;3;0.261676,-2.483894,0.000000;;, + 18;3;0.261676,-2.483894,0.000000;;, + 19;3;0.261676,-2.483894,0.000000;;, + 20;3;0.261676,-2.483894,0.000000;;, + 27;3;0.261676,-2.483894,0.000000;;, + 33;3;0.261676,-2.483894,0.000000;;, + 34;3;0.261676,-2.483894,0.000000;;, + 35;3;0.261676,-2.483894,0.000000;;, + 41;3;0.261676,-2.483894,0.000000;;, + 43;3;0.261676,-2.483894,0.000000;;, + 50;3;0.261676,-2.483894,0.000000;;, + 53;3;0.261676,-2.483894,0.000000;;, + 55;3;0.261676,-2.483894,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation weaponAnimation + { + {weapon} + + AnimationKey + { + 2; + 23; + 0;3;1.700897,-4.837056,0.000000;;, + 1;3;1.700897,-4.837056,0.000000;;, + 2;3;1.700897,-4.837056,0.000000;;, + 3;3;1.700897,-4.837056,0.000000;;, + 4;3;1.700897,-4.837056,0.000000;;, + 5;3;1.700897,-4.837056,0.000000;;, + 12;3;1.700897,-4.837056,0.000000;;, + 14;3;1.700897,-4.837056,0.000000;;, + 15;3;1.700897,-4.837056,0.000000;;, + 16;3;1.700897,-4.837056,0.000000;;, + 17;3;1.700897,-4.837056,0.000000;;, + 18;3;1.700897,-4.837056,0.000000;;, + 19;3;1.700897,-4.837056,0.000000;;, + 20;3;1.700897,-4.837056,0.000000;;, + 27;3;1.700897,-4.837056,0.000000;;, + 33;3;1.700897,-4.837056,0.000000;;, + 34;3;1.700897,-4.837056,0.000000;;, + 35;3;1.700897,-4.837056,0.000000;;, + 41;3;1.700897,-4.837056,0.000000;;, + 43;3;1.700897,-4.837056,0.000000;;, + 50;3;1.700897,-4.837056,0.000000;;, + 53;3;1.700897,-4.837056,0.000000;;, + 55;3;1.700897,-4.837056,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;0.999743,0.021683,0.006609,-0.000572;;, + 3;4;0.998794,0.046948,0.014309,-0.001238;;, + 4;4;0.997432,0.068488,0.020874,-0.001806;;, + 5;4;0.997432,0.068488,0.020874,-0.001806;;, + 12;4;0.997432,0.068488,0.020874,-0.001806;;, + 14;4;0.997432,0.068488,0.020874,-0.001806;;, + 15;4;0.997432,0.068488,0.020874,-0.001806;;, + 16;4;0.998482,0.052668,0.016052,-0.001389;;, + 17;4;0.999355,0.034337,0.010465,-0.000906;;, + 18;4;0.999866,0.015644,0.004768,-0.000413;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;0.991577,-0.013382,0.128747,-0.004423;;, + 43;4;0.988533,-0.009191,0.150627,-0.005432;;, + 50;4;0.995744,0.045103,0.080265,-0.004060;;, + 53;4;0.999255,0.021677,0.031875,-0.001700;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation endAnimation + { + {end} + + AnimationKey + { + 2; + 23; + 0;3;0.179647,0.498486,-36.421711;;, + 1;3;0.179647,0.498486,-36.421711;;, + 2;3;0.179647,0.498486,-36.421711;;, + 3;3;0.179647,0.498486,-36.421711;;, + 4;3;0.179647,0.498486,-36.421711;;, + 5;3;0.179647,0.498486,-36.421711;;, + 12;3;0.179647,0.498486,-36.421711;;, + 14;3;0.179647,0.498486,-36.421711;;, + 15;3;0.179647,0.498486,-36.421711;;, + 16;3;0.179647,0.498486,-36.421711;;, + 17;3;0.179647,0.498486,-36.421711;;, + 18;3;0.179647,0.498486,-36.421711;;, + 19;3;0.179647,0.498486,-36.421711;;, + 20;3;0.179647,0.498486,-36.421711;;, + 27;3;0.179647,0.498486,-36.421711;;, + 33;3;0.179647,0.498486,-36.421711;;, + 34;3;0.179647,0.498486,-36.421711;;, + 35;3;0.179647,0.498486,-36.421711;;, + 41;3;0.179647,0.498486,-36.421711;;, + 43;3;0.179647,0.498486,-36.421711;;, + 50;3;0.179647,0.498486,-36.421711;;, + 53;3;0.179647,0.498486,-36.421711;;, + 55;3;0.179647,0.498486,-36.421711;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } + + Animation hitAnimation + { + {hit} + + AnimationKey + { + 2; + 23; + 0;3;9.751877,-17.324219,-0.896412;;, + 1;3;9.751877,-17.324219,-0.896412;;, + 2;3;9.751877,-17.324219,-0.896412;;, + 3;3;9.751877,-17.324219,-0.896412;;, + 4;3;9.751877,-17.324219,-0.896412;;, + 5;3;9.751877,-17.324219,-0.896412;;, + 12;3;9.751877,-17.324219,-0.896412;;, + 14;3;9.751877,-17.324219,-0.896412;;, + 15;3;9.751877,-17.324219,-0.896412;;, + 16;3;9.751877,-17.324219,-0.896412;;, + 17;3;9.751877,-17.324219,-0.896412;;, + 18;3;9.751877,-17.324219,-0.896412;;, + 19;3;9.751877,-17.324219,-0.896412;;, + 20;3;9.751877,-17.324219,-0.896412;;, + 27;3;9.751877,-17.324219,-0.896412;;, + 33;3;9.751877,-17.324219,-0.896412;;, + 34;3;9.751877,-17.324219,-0.896412;;, + 35;3;9.751877,-17.324219,-0.896412;;, + 41;3;9.751877,-17.324219,-0.896412;;, + 43;3;9.751877,-17.324219,-0.896412;;, + 50;3;9.751877,-17.324219,-0.896412;;, + 53;3;9.751877,-17.324219,-0.896412;;, + 55;3;9.751877,-17.324219,-0.896412;;; + } + + AnimationOptions + { + 1; + 1; + } + + AnimationKey + { + 0; + 23; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationOptions + { + 1; + 1; + } + } +} diff --git a/src/others/irrlicht-1.8.1/media/earth.jpg b/src/others/irrlicht-1.8.1/media/earth.jpg new file mode 100644 index 0000000..df0e9aa Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/earth.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/earth.x b/src/others/irrlicht-1.8.1/media/earth.x new file mode 100644 index 0000000..01f2827 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/earth.x @@ -0,0 +1,20711 @@ +xof 0303txt 0032 + +Frame Frame_SCENE_ROOT { + + + FrameTransformMatrix { + 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;; + } + + Frame Frame1_sphere_lwo_layer1 { + + + FrameTransformMatrix { + 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;; + } + + Mesh Mesh_sphere_lwo_Layer1 { + 2307; + -0.032702;0.997859;-0.056641;, + -0.039815;0.997859;-0.051888;, + 0.000000;1.000000;0.000000;, + -0.065263;0.991445;-0.113039;, + -0.079459;0.991445;-0.103553;, + -0.046247;0.997859;-0.046247;, + 0.000000;1.000000;0.000000;, + -0.025029;0.997859;-0.060425;, + -0.049950;0.991445;-0.120590;, + -0.074658;0.980785;-0.180240;, + -0.097545;0.980785;-0.168953;, + -0.118763;0.980785;-0.154776;, + -0.092296;0.991445;-0.092296;, + -0.016928;0.997859;-0.063175;, + -0.033783;0.991445;-0.126079;, + -0.050493;0.980785;-0.188443;, + -0.066987;0.965926;-0.250000;, + -0.099046;0.965926;-0.239118;, + -0.129410;0.965926;-0.224144;, + -0.008537;0.997859;-0.064844;, + -0.017037;0.991445;-0.129410;, + -0.025464;0.980785;-0.193421;, + -0.033783;0.965926;-0.256605;, + -0.041956;0.946930;-0.318689;, + -0.083195;0.946930;-0.310487;, + 0.000000;0.997859;-0.065403;, + 0.000000;0.991445;-0.130526;, + 0.000000;0.980785;-0.195090;, + 0.000000;0.965926;-0.258819;, + 0.000000;0.946930;-0.321439;, + 0.008537;0.997859;-0.064844;, + 0.017037;0.991445;-0.129410;, + 0.025464;0.980785;-0.193421;, + 0.033783;0.965926;-0.256605;, + 0.041956;0.946930;-0.318689;, + 0.000000;0.923880;-0.382683;, + 0.016928;0.997859;-0.063175;, + 0.033783;0.991445;-0.126079;, + 0.050493;0.980785;-0.188443;, + 0.066987;0.965926;-0.250000;, + 0.083195;0.946930;-0.310487;, + 0.049950;0.923880;-0.379410;, + 0.025029;0.997859;-0.060425;, + 0.049950;0.991445;-0.120590;, + 0.074658;0.980785;-0.180240;, + 0.099046;0.965926;-0.239118;, + 0.123010;0.946930;-0.296971;, + 0.099046;0.923880;-0.369644;, + 0.032702;0.997859;-0.056641;, + 0.065263;0.991445;-0.113039;, + 0.097545;0.980785;-0.168953;, + 0.129410;0.965926;-0.224144;, + 0.160720;0.946930;-0.278375;, + 0.146447;0.923880;-0.353553;, + 0.039815;0.997859;-0.051888;, + 0.079459;0.991445;-0.103553;, + 0.118763;0.980785;-0.154776;, + 0.157559;0.965926;-0.205335;, + 0.195680;0.946930;-0.255015;, + 0.191342;0.923880;-0.331414;, + 0.046247;0.997859;-0.046247;, + 0.092296;0.991445;-0.092296;, + 0.137950;0.980785;-0.137950;, + 0.183013;0.965926;-0.183013;, + 0.227292;0.946930;-0.227292;, + 0.232963;0.923880;-0.303603;, + 0.051888;0.997859;-0.039815;, + 0.103553;0.991445;-0.079459;, + 0.154776;0.980785;-0.118763;, + 0.205335;0.965926;-0.157559;, + 0.255015;0.946930;-0.195680;, + 0.270598;0.923880;-0.270598;, + 0.056641;0.997859;-0.032702;, + 0.113039;0.991445;-0.065263;, + 0.168953;0.980785;-0.097545;, + 0.224144;0.965926;-0.129410;, + 0.278375;0.946930;-0.160720;, + 0.303603;0.923880;-0.232963;, + 0.060425;0.997859;-0.025029;, + 0.120590;0.991445;-0.049950;, + 0.180240;0.980785;-0.074658;, + 0.239118;0.965926;-0.099046;, + 0.296971;0.946930;-0.123010;, + 0.331414;0.923880;-0.191342;, + 0.063175;0.997859;-0.016928;, + 0.126079;0.991445;-0.033783;, + 0.188443;0.980785;-0.050493;, + 0.250000;0.965926;-0.066987;, + 0.310487;0.946930;-0.083195;, + 0.353553;0.923880;-0.146447;, + 0.064844;0.997859;-0.008537;, + 0.129410;0.991445;-0.017037;, + 0.193421;0.980785;-0.025464;, + 0.256605;0.965926;-0.033783;, + 0.318689;0.946930;-0.041956;, + 0.369644;0.923880;-0.099046;, + 0.065403;0.997859;0.000000;, + 0.130526;0.991445;0.000000;, + 0.195090;0.980785;0.000000;, + 0.258819;0.965926;0.000000;, + 0.321439;0.946930;0.000000;, + 0.379410;0.923880;-0.049950;, + 0.064844;0.997859;0.008537;, + 0.129410;0.991445;0.017037;, + 0.193421;0.980785;0.025464;, + 0.256605;0.965926;0.033783;, + 0.318689;0.946930;0.041956;, + 0.382683;0.923880;0.000000;, + 0.063175;0.997859;0.016928;, + 0.126079;0.991445;0.033783;, + 0.188443;0.980785;0.050493;, + 0.250000;0.965926;0.066987;, + 0.310487;0.946930;0.083195;, + 0.379410;0.923880;0.049950;, + 0.060425;0.997859;0.025029;, + 0.120590;0.991445;0.049950;, + 0.180240;0.980785;0.074658;, + 0.239118;0.965926;0.099046;, + 0.296971;0.946930;0.123010;, + 0.369644;0.923880;0.099046;, + 0.056641;0.997859;0.032702;, + 0.113039;0.991445;0.065263;, + 0.168953;0.980785;0.097545;, + 0.224144;0.965926;0.129410;, + 0.278375;0.946930;0.160720;, + 0.353553;0.923880;0.146447;, + 0.051888;0.997859;0.039815;, + 0.103553;0.991445;0.079459;, + 0.154776;0.980785;0.118763;, + 0.205335;0.965926;0.157559;, + 0.255015;0.946930;0.195680;, + 0.331414;0.923880;0.191342;, + 0.046247;0.997859;0.046247;, + 0.092296;0.991445;0.092296;, + 0.137950;0.980785;0.137950;, + 0.183013;0.965926;0.183013;, + 0.227292;0.946930;0.227292;, + 0.303603;0.923880;0.232963;, + 0.039815;0.997859;0.051888;, + 0.079459;0.991445;0.103553;, + 0.118763;0.980785;0.154776;, + 0.157559;0.965926;0.205335;, + 0.195680;0.946930;0.255015;, + 0.270598;0.923880;0.270598;, + 0.032702;0.997859;0.056641;, + 0.065263;0.991445;0.113039;, + 0.097545;0.980785;0.168953;, + 0.129410;0.965926;0.224144;, + 0.160720;0.946930;0.278375;, + 0.232963;0.923880;0.303603;, + 0.025029;0.997859;0.060425;, + 0.049950;0.991445;0.120590;, + 0.074658;0.980785;0.180240;, + 0.099046;0.965926;0.239118;, + 0.123010;0.946930;0.296971;, + 0.191342;0.923880;0.331414;, + 0.016928;0.997859;0.063175;, + 0.033783;0.991445;0.126079;, + 0.050493;0.980785;0.188443;, + 0.066987;0.965926;0.250000;, + 0.083195;0.946930;0.310487;, + 0.146447;0.923880;0.353553;, + 0.008537;0.997859;0.064844;, + 0.017037;0.991445;0.129410;, + 0.025464;0.980785;0.193421;, + 0.033783;0.965926;0.256605;, + 0.041956;0.946930;0.318689;, + 0.099046;0.923880;0.369644;, + 0.000000;0.997859;0.065403;, + 0.000000;0.991445;0.130526;, + 0.000000;0.980785;0.195090;, + 0.000000;0.965926;0.258819;, + 0.000000;0.946930;0.321439;, + 0.049950;0.923880;0.379410;, + 0.114473;0.896873;0.427218;, + 0.169257;0.896873;0.408621;, + 0.221144;0.896873;0.383033;, + 0.000000;0.923880;0.382683;, + 0.057730;0.896873;0.438505;, + 0.129410;0.866025;0.482963;, + 0.191342;0.866025;0.461940;, + 0.250000;0.866025;0.433013;, + 0.304381;0.866025;0.396677;, + 0.269248;0.896873;0.350891;, + 0.000000;0.896873;0.442289;, + 0.065263;0.866025;0.495722;, + 0.143792;0.831470;0.536640;, + 0.212608;0.831470;0.513280;, + 0.277785;0.831470;0.481138;, + 0.338210;0.831470;0.440764;, + 0.000000;0.866025;0.500000;, + 0.072516;0.831470;0.550817;, + 0.157559;0.793353;0.588018;, + 0.232963;0.793353;0.562422;, + 0.304381;0.793353;0.527203;, + 0.370590;0.793353;0.482963;, + 0.000000;0.831470;0.555570;, + 0.079459;0.793353;0.603553;, + 0.170651;0.751840;0.636879;, + 0.252321;0.751840;0.609156;, + 0.329673;0.751840;0.571010;, + 0.401384;0.751840;0.523094;, + 0.000000;0.793353;0.608761;, + 0.086062;0.751840;0.653705;, + 0.183013;0.707107;0.683013;, + 0.270598;0.707107;0.653282;, + 0.353553;0.707107;0.612372;, + 0.430459;0.707107;0.560986;, + 0.000000;0.751840;0.659346;, + 0.092296;0.707107;0.701057;, + 0.194590;0.659346;0.726222;, + 0.287717;0.659346;0.694609;, + 0.375920;0.659346;0.651112;, + 0.457691;0.659346;0.596475;, + 0.000000;0.707107;0.707107;, + 0.098135;0.659346;0.745408;, + 0.205335;0.608761;0.766320;, + 0.303603;0.608761;0.732963;, + 0.396677;0.608761;0.687064;, + 0.482963;0.608761;0.629410;, + 0.000000;0.659346;0.751840;, + 0.103553;0.608761;0.786566;, + 0.215200;0.555570;0.803138;, + 0.318190;0.555570;0.768178;, + 0.415735;0.555570;0.720074;, + 0.506167;0.555570;0.659649;, + 0.000000;0.608761;0.793353;, + 0.108529;0.555570;0.824356;, + 0.224144;0.500000;0.836516;, + 0.331414;0.500000;0.800103;, + 0.433013;0.500000;0.750000;, + 0.527203;0.500000;0.687064;, + 0.000000;0.555570;0.831470;, + 0.113039;0.500000;0.858616;, + 0.232128;0.442289;0.866313;, + 0.343218;0.442289;0.828602;, + 0.448436;0.442289;0.776715;, + 0.545982;0.442289;0.711537;, + 0.000000;0.500000;0.866025;, + 0.117065;0.442289;0.889200;, + 0.239118;0.382683;0.892399;, + 0.353553;0.382683;0.853553;, + 0.461940;0.382683;0.800103;, + 0.562422;0.382683;0.732963;, + 0.000000;0.442289;0.896873;, + 0.120590;0.382683;0.915976;, + 0.245084;0.321439;0.914664;, + 0.362374;0.321439;0.874849;, + 0.473465;0.321439;0.820066;, + 0.576455;0.321439;0.751250;, + 0.000000;0.382683;0.923880;, + 0.123599;0.321439;0.938829;, + 0.250000;0.258819;0.933013;, + 0.369644;0.258819;0.892399;, + 0.482963;0.258819;0.836516;, + 0.588018;0.258819;0.766320;, + 0.000000;0.321439;0.946930;, + 0.126079;0.258819;0.957662;, + 0.253846;0.195090;0.947366;, + 0.375330;0.195090;0.906127;, + 0.490393;0.195090;0.849385;, + 0.597064;0.195090;0.778109;, + 0.000000;0.258819;0.965926;, + 0.128018;0.195090;0.972395;, + 0.256605;0.130526;0.957662;, + 0.379410;0.130526;0.915976;, + 0.495722;0.130526;0.858616;, + 0.603553;0.130526;0.786566;, + 0.000000;0.195090;0.980785;, + 0.129410;0.130526;0.982963;, + 0.258265;0.065403;0.963858;, + 0.381864;0.065403;0.921901;, + 0.498929;0.065403;0.864171;, + 0.607458;0.065403;0.791655;, + 0.000000;0.130526;0.991445;, + 0.130247;0.065403;0.989322;, + 0.258819;0.000000;0.965926;, + 0.382683;0.000000;0.923880;, + 0.500000;0.000000;0.866025;, + 0.608761;0.000000;0.793353;, + 0.000000;0.065403;0.997859;, + 0.130526;0.000000;0.991445;, + 0.258265;-0.065403;0.963858;, + 0.381864;-0.065403;0.921901;, + 0.498929;-0.065403;0.864171;, + 0.607458;-0.065403;0.791655;, + 0.000000;0.000000;1.000000;, + 0.130247;-0.065403;0.989322;, + 0.256605;-0.130526;0.957662;, + 0.379410;-0.130526;0.915976;, + 0.495722;-0.130526;0.858616;, + 0.603553;-0.130526;0.786566;, + 0.000000;-0.065403;0.997859;, + 0.129410;-0.130526;0.982963;, + 0.253846;-0.195090;0.947366;, + 0.375330;-0.195090;0.906127;, + 0.490393;-0.195090;0.849385;, + 0.597064;-0.195090;0.778109;, + 0.000000;-0.130526;0.991445;, + 0.128018;-0.195090;0.972395;, + 0.250000;-0.258819;0.933013;, + 0.369644;-0.258819;0.892399;, + 0.482963;-0.258819;0.836516;, + 0.588018;-0.258819;0.766320;, + 0.000000;-0.195090;0.980785;, + 0.126079;-0.258819;0.957662;, + 0.245084;-0.321439;0.914664;, + 0.362374;-0.321439;0.874849;, + 0.473465;-0.321439;0.820066;, + 0.576455;-0.321439;0.751250;, + 0.000000;-0.258819;0.965926;, + 0.123599;-0.321439;0.938829;, + 0.239118;-0.382683;0.892399;, + 0.353553;-0.382683;0.853553;, + 0.461940;-0.382683;0.800103;, + 0.562422;-0.382683;0.732963;, + 0.000000;-0.321439;0.946930;, + 0.120590;-0.382683;0.915976;, + 0.232128;-0.442289;0.866313;, + 0.343218;-0.442289;0.828602;, + 0.448436;-0.442289;0.776715;, + 0.545982;-0.442289;0.711537;, + 0.000000;-0.382683;0.923880;, + 0.117065;-0.442289;0.889200;, + 0.224144;-0.500000;0.836516;, + 0.331414;-0.500000;0.800103;, + 0.433013;-0.500000;0.750000;, + 0.527203;-0.500000;0.687064;, + 0.000000;-0.442289;0.896873;, + 0.113039;-0.500000;0.858616;, + 0.215200;-0.555570;0.803138;, + 0.318190;-0.555570;0.768178;, + 0.415735;-0.555570;0.720074;, + 0.506167;-0.555570;0.659649;, + 0.000000;-0.500000;0.866025;, + 0.108529;-0.555570;0.824356;, + 0.205335;-0.608761;0.766320;, + 0.303603;-0.608761;0.732963;, + 0.396677;-0.608761;0.687064;, + 0.482963;-0.608761;0.629410;, + 0.000000;-0.555570;0.831470;, + 0.103553;-0.608761;0.786566;, + 0.194590;-0.659346;0.726222;, + 0.287717;-0.659346;0.694609;, + 0.375920;-0.659346;0.651112;, + 0.457691;-0.659346;0.596475;, + 0.000000;-0.608761;0.793353;, + 0.098135;-0.659346;0.745408;, + 0.183013;-0.707107;0.683013;, + 0.270598;-0.707107;0.653282;, + 0.353553;-0.707107;0.612372;, + 0.430459;-0.707107;0.560986;, + 0.000000;-0.659346;0.751840;, + 0.092296;-0.707107;0.701057;, + 0.170651;-0.751840;0.636879;, + 0.252321;-0.751840;0.609156;, + 0.329673;-0.751840;0.571010;, + 0.401384;-0.751840;0.523094;, + 0.000000;-0.707107;0.707107;, + 0.086062;-0.751840;0.653705;, + 0.157559;-0.793353;0.588018;, + 0.232963;-0.793353;0.562422;, + 0.304381;-0.793353;0.527203;, + 0.370590;-0.793353;0.482963;, + 0.000000;-0.751840;0.659346;, + 0.079459;-0.793353;0.603553;, + 0.143792;-0.831470;0.536640;, + 0.212608;-0.831470;0.513280;, + 0.277785;-0.831470;0.481138;, + 0.338210;-0.831470;0.440764;, + 0.000000;-0.793353;0.608761;, + 0.072516;-0.831470;0.550817;, + 0.129410;-0.866025;0.482963;, + 0.191342;-0.866025;0.461940;, + 0.250000;-0.866025;0.433013;, + 0.304381;-0.866025;0.396677;, + 0.000000;-0.831470;0.555570;, + 0.065263;-0.866025;0.495722;, + 0.114473;-0.896873;0.427218;, + 0.169257;-0.896873;0.408621;, + 0.221144;-0.896873;0.383033;, + 0.269248;-0.896873;0.350891;, + 0.000000;-0.866025;0.500000;, + 0.057730;-0.896873;0.438505;, + 0.099046;-0.923880;0.369644;, + 0.146447;-0.923880;0.353553;, + 0.191342;-0.923880;0.331414;, + 0.232963;-0.923880;0.303603;, + 0.000000;-0.896873;0.442289;, + 0.049950;-0.923880;0.379410;, + 0.083195;-0.946930;0.310487;, + 0.123010;-0.946930;0.296971;, + 0.160720;-0.946930;0.278375;, + 0.195680;-0.946930;0.255015;, + 0.000000;-0.923880;0.382683;, + 0.041956;-0.946930;0.318689;, + 0.066987;-0.965926;0.250000;, + 0.099046;-0.965926;0.239118;, + 0.129410;-0.965926;0.224144;, + 0.157559;-0.965926;0.205335;, + 0.000000;-0.946930;0.321439;, + 0.033783;-0.965926;0.256605;, + 0.050493;-0.980785;0.188443;, + 0.074658;-0.980785;0.180240;, + 0.097545;-0.980785;0.168953;, + 0.118763;-0.980785;0.154776;, + 0.000000;-0.965926;0.258819;, + 0.025464;-0.980785;0.193421;, + 0.033783;-0.991445;0.126079;, + 0.049950;-0.991445;0.120590;, + 0.065263;-0.991445;0.113039;, + 0.079459;-0.991445;0.103553;, + 0.000000;-0.980785;0.195090;, + 0.017037;-0.991445;0.129410;, + 0.016928;-0.997859;0.063175;, + 0.025029;-0.997859;0.060425;, + 0.032702;-0.997859;0.056641;, + 0.039815;-0.997859;0.051888;, + 0.000000;-0.991445;0.130526;, + 0.008537;-0.997859;0.064844;, + 0.000000;-1.000000;0.000000;, + 0.046247;-0.997859;0.046247;, + 0.092296;-0.991445;0.092296;, + 0.000000;-0.997859;0.065403;, + 0.137950;-0.980785;0.137950;, + 0.103553;-0.991445;0.079459;, + 0.154776;-0.980785;0.118763;, + 0.183013;-0.965926;0.183013;, + 0.051888;-0.997859;0.039815;, + 0.056641;-0.997859;0.032702;, + 0.113039;-0.991445;0.065263;, + 0.168953;-0.980785;0.097545;, + 0.205335;-0.965926;0.157559;, + 0.060425;-0.997859;0.025029;, + 0.120590;-0.991445;0.049950;, + 0.180240;-0.980785;0.074658;, + 0.224144;-0.965926;0.129410;, + 0.255015;-0.946930;0.195680;, + 0.227292;-0.946930;0.227292;, + 0.063175;-0.997859;0.016928;, + 0.126079;-0.991445;0.033783;, + 0.188443;-0.980785;0.050493;, + 0.239118;-0.965926;0.099046;, + 0.278375;-0.946930;0.160720;, + 0.064844;-0.997859;0.008537;, + 0.129410;-0.991445;0.017037;, + 0.193421;-0.980785;0.025464;, + 0.250000;-0.965926;0.066987;, + 0.296971;-0.946930;0.123010;, + 0.065403;-0.997859;0.000000;, + 0.130526;-0.991445;0.000000;, + 0.195090;-0.980785;0.000000;, + 0.256605;-0.965926;0.033783;, + 0.310487;-0.946930;0.083195;, + 0.064844;-0.997859;-0.008537;, + 0.129410;-0.991445;-0.017037;, + 0.193421;-0.980785;-0.025464;, + 0.258819;-0.965926;0.000000;, + 0.318689;-0.946930;0.041956;, + 0.063175;-0.997859;-0.016928;, + 0.126079;-0.991445;-0.033783;, + 0.188443;-0.980785;-0.050493;, + 0.256605;-0.965926;-0.033783;, + 0.321439;-0.946930;0.000000;, + 0.060425;-0.997859;-0.025029;, + 0.120590;-0.991445;-0.049950;, + 0.180240;-0.980785;-0.074658;, + 0.250000;-0.965926;-0.066987;, + 0.318689;-0.946930;-0.041956;, + 0.056641;-0.997859;-0.032702;, + 0.113039;-0.991445;-0.065263;, + 0.168953;-0.980785;-0.097545;, + 0.239118;-0.965926;-0.099046;, + 0.310487;-0.946930;-0.083195;, + 0.051888;-0.997859;-0.039815;, + 0.103553;-0.991445;-0.079459;, + 0.154776;-0.980785;-0.118763;, + 0.224144;-0.965926;-0.129410;, + 0.296971;-0.946930;-0.123010;, + 0.046247;-0.997859;-0.046247;, + 0.092296;-0.991445;-0.092296;, + 0.137950;-0.980785;-0.137950;, + 0.205335;-0.965926;-0.157559;, + 0.278375;-0.946930;-0.160720;, + 0.039815;-0.997859;-0.051888;, + 0.079459;-0.991445;-0.103553;, + 0.118763;-0.980785;-0.154776;, + 0.183013;-0.965926;-0.183013;, + 0.255015;-0.946930;-0.195680;, + 0.032702;-0.997859;-0.056641;, + 0.065263;-0.991445;-0.113039;, + 0.097545;-0.980785;-0.168953;, + 0.157559;-0.965926;-0.205335;, + 0.227292;-0.946930;-0.227292;, + 0.025029;-0.997859;-0.060425;, + 0.049950;-0.991445;-0.120590;, + 0.074658;-0.980785;-0.180240;, + 0.129410;-0.965926;-0.224144;, + 0.195680;-0.946930;-0.255015;, + 0.016928;-0.997859;-0.063175;, + 0.033783;-0.991445;-0.126079;, + 0.050493;-0.980785;-0.188443;, + 0.099046;-0.965926;-0.239118;, + 0.160720;-0.946930;-0.278375;, + 0.008537;-0.997859;-0.064844;, + 0.017037;-0.991445;-0.129410;, + 0.025464;-0.980785;-0.193421;, + 0.066987;-0.965926;-0.250000;, + 0.123010;-0.946930;-0.296971;, + 0.000000;-0.997859;-0.065403;, + 0.000000;-0.991445;-0.130526;, + 0.000000;-0.980785;-0.195090;, + 0.033783;-0.965926;-0.256605;, + 0.083195;-0.946930;-0.310487;, + 0.146447;-0.923880;-0.353553;, + 0.191342;-0.923880;-0.331414;, + -0.017037;-0.991445;-0.129410;, + -0.025464;-0.980785;-0.193421;, + -0.033783;-0.965926;-0.256605;, + 0.000000;-0.965926;-0.258819;, + 0.041956;-0.946930;-0.318689;, + 0.099046;-0.923880;-0.369644;, + -0.008537;-0.997859;-0.064844;, + -0.033783;-0.991445;-0.126079;, + -0.050493;-0.980785;-0.188443;, + -0.066987;-0.965926;-0.250000;, + -0.083195;-0.946930;-0.310487;, + -0.041956;-0.946930;-0.318689;, + 0.000000;-1.000000;0.000000;, + -0.016928;-0.997859;-0.063175;, + -0.049950;-0.991445;-0.120590;, + -0.074658;-0.980785;-0.180240;, + -0.099046;-0.965926;-0.239118;, + -0.123010;-0.946930;-0.296971;, + -0.025029;-0.997859;-0.060425;, + -0.065263;-0.991445;-0.113039;, + -0.097545;-0.980785;-0.168953;, + -0.129410;-0.965926;-0.224144;, + -0.160720;-0.946930;-0.278375;, + -0.032702;-0.997859;-0.056641;, + -0.079459;-0.991445;-0.103553;, + -0.118763;-0.980785;-0.154776;, + -0.157559;-0.965926;-0.205335;, + -0.195680;-0.946930;-0.255015;, + -0.039815;-0.997859;-0.051888;, + -0.092296;-0.991445;-0.092296;, + -0.137950;-0.980785;-0.137950;, + -0.183013;-0.965926;-0.183013;, + -0.227292;-0.946930;-0.227292;, + -0.046247;-0.997859;-0.046247;, + -0.103553;-0.991445;-0.079459;, + -0.154776;-0.980785;-0.118763;, + -0.205335;-0.965926;-0.157559;, + -0.255015;-0.946930;-0.195680;, + -0.051888;-0.997859;-0.039815;, + -0.113039;-0.991445;-0.065263;, + -0.168953;-0.980785;-0.097545;, + -0.224144;-0.965926;-0.129410;, + -0.278375;-0.946930;-0.160720;, + -0.056641;-0.997859;-0.032702;, + -0.120590;-0.991445;-0.049950;, + -0.180240;-0.980785;-0.074658;, + -0.239118;-0.965926;-0.099046;, + -0.296971;-0.946930;-0.123010;, + -0.060425;-0.997859;-0.025029;, + -0.126079;-0.991445;-0.033783;, + -0.188443;-0.980785;-0.050493;, + -0.250000;-0.965926;-0.066987;, + -0.310487;-0.946930;-0.083195;, + -0.063175;-0.997859;-0.016928;, + -0.129410;-0.991445;-0.017037;, + -0.193421;-0.980785;-0.025464;, + -0.256605;-0.965926;-0.033783;, + -0.318689;-0.946930;-0.041956;, + -0.064844;-0.997859;-0.008537;, + -0.130526;-0.991445;0.000000;, + -0.195090;-0.980785;0.000000;, + -0.258819;-0.965926;0.000000;, + -0.321439;-0.946930;0.000000;, + -0.065403;-0.997859;0.000000;, + -0.129410;-0.991445;0.017037;, + -0.193421;-0.980785;0.025464;, + -0.256605;-0.965926;0.033783;, + -0.318689;-0.946930;0.041956;, + -0.064844;-0.997859;0.008537;, + -0.126079;-0.991445;0.033783;, + -0.188443;-0.980785;0.050493;, + -0.250000;-0.965926;0.066987;, + -0.310487;-0.946930;0.083195;, + -0.063175;-0.997859;0.016928;, + -0.120590;-0.991445;0.049950;, + -0.180240;-0.980785;0.074658;, + -0.239118;-0.965926;0.099046;, + -0.296971;-0.946930;0.123010;, + -0.060425;-0.997859;0.025029;, + -0.113039;-0.991445;0.065263;, + -0.168953;-0.980785;0.097545;, + -0.224144;-0.965926;0.129410;, + -0.278375;-0.946930;0.160720;, + -0.056641;-0.997859;0.032702;, + -0.103553;-0.991445;0.079459;, + -0.154776;-0.980785;0.118763;, + -0.205335;-0.965926;0.157559;, + -0.255015;-0.946930;0.195680;, + -0.051888;-0.997859;0.039815;, + -0.092296;-0.991445;0.092296;, + -0.137950;-0.980785;0.137950;, + -0.183013;-0.965926;0.183013;, + -0.227292;-0.946930;0.227292;, + -0.046247;-0.997859;0.046247;, + -0.079459;-0.991445;0.103553;, + -0.118763;-0.980785;0.154776;, + -0.157559;-0.965926;0.205335;, + -0.195680;-0.946930;0.255015;, + -0.039815;-0.997859;0.051888;, + -0.065263;-0.991445;0.113039;, + -0.097545;-0.980785;0.168953;, + -0.129410;-0.965926;0.224144;, + -0.160720;-0.946930;0.278375;, + -0.032702;-0.997859;0.056641;, + -0.049950;-0.991445;0.120590;, + -0.074658;-0.980785;0.180240;, + -0.099046;-0.965926;0.239118;, + -0.123010;-0.946930;0.296971;, + -0.025029;-0.997859;0.060425;, + -0.033783;-0.991445;0.126079;, + -0.050493;-0.980785;0.188443;, + -0.066987;-0.965926;0.250000;, + -0.083195;-0.946930;0.310487;, + -0.016928;-0.997859;0.063175;, + -0.017037;-0.991445;0.129410;, + -0.025464;-0.980785;0.193421;, + -0.033783;-0.965926;0.256605;, + -0.041956;-0.946930;0.318689;, + -0.008537;-0.997859;0.064844;, + 0.000000;-0.991445;0.130526;, + 0.000000;-0.980785;0.195090;, + 0.000000;-0.965926;0.258819;, + 0.000000;-0.946930;0.321439;, + 0.000000;-0.997859;0.065403;, + 0.000000;-0.923880;0.382683;, + -0.049950;-0.923880;0.379410;, + -0.099046;-0.923880;0.369644;, + -0.146447;-0.923880;0.353553;, + 0.000000;-0.896873;0.442289;, + -0.057730;-0.896873;0.438505;, + -0.114473;-0.896873;0.427218;, + -0.169257;-0.896873;0.408621;, + -0.191342;-0.923880;0.331414;, + -0.232963;-0.923880;0.303603;, + 0.000000;-0.866025;0.500000;, + -0.065263;-0.866025;0.495722;, + -0.129410;-0.866025;0.482963;, + -0.191342;-0.866025;0.461940;, + -0.221144;-0.896873;0.383033;, + -0.269248;-0.896873;0.350891;, + -0.270598;-0.923880;0.270598;, + 0.000000;-0.831470;0.555570;, + -0.072516;-0.831470;0.550817;, + -0.143792;-0.831470;0.536640;, + -0.212608;-0.831470;0.513280;, + -0.250000;-0.866025;0.433013;, + -0.304381;-0.866025;0.396677;, + -0.312745;-0.896873;0.312745;, + 0.000000;-0.793353;0.608761;, + -0.079459;-0.793353;0.603553;, + -0.157559;-0.793353;0.588018;, + -0.232963;-0.793353;0.562422;, + -0.277785;-0.831470;0.481138;, + -0.338210;-0.831470;0.440764;, + -0.353553;-0.866025;0.353553;, + 0.000000;-0.751840;0.659346;, + -0.086062;-0.751840;0.653705;, + -0.170651;-0.751840;0.636879;, + -0.252321;-0.751840;0.609156;, + -0.304381;-0.793353;0.527203;, + -0.370590;-0.793353;0.482963;, + -0.392847;-0.831470;0.392847;, + 0.000000;-0.707107;0.707107;, + -0.092296;-0.707107;0.701057;, + -0.183013;-0.707107;0.683013;, + -0.270598;-0.707107;0.653282;, + -0.329673;-0.751840;0.571010;, + -0.401384;-0.751840;0.523094;, + -0.430459;-0.793353;0.430459;, + 0.000000;-0.659346;0.751840;, + -0.098135;-0.659346;0.745408;, + -0.194590;-0.659346;0.726222;, + -0.287717;-0.659346;0.694609;, + -0.353553;-0.707107;0.612372;, + -0.430459;-0.707107;0.560986;, + -0.466228;-0.751840;0.466228;, + 0.000000;-0.608761;0.793353;, + -0.103553;-0.608761;0.786566;, + -0.205335;-0.608761;0.766320;, + -0.303603;-0.608761;0.732963;, + -0.375920;-0.659346;0.651112;, + -0.457691;-0.659346;0.596475;, + -0.500000;-0.707107;0.500000;, + 0.000000;-0.555570;0.831470;, + -0.108529;-0.555570;0.824356;, + -0.215200;-0.555570;0.803138;, + -0.318190;-0.555570;0.768178;, + -0.396677;-0.608761;0.687064;, + -0.482963;-0.608761;0.629410;, + -0.531631;-0.659346;0.531631;, + 0.000000;-0.500000;0.866025;, + -0.113039;-0.500000;0.858616;, + -0.224144;-0.500000;0.836516;, + -0.331414;-0.500000;0.800103;, + -0.415735;-0.555570;0.720074;, + -0.506167;-0.555570;0.659649;, + -0.560986;-0.608761;0.560986;, + 0.000000;-0.442289;0.896873;, + -0.117065;-0.442289;0.889200;, + -0.232128;-0.442289;0.866313;, + -0.343218;-0.442289;0.828602;, + -0.433013;-0.500000;0.750000;, + -0.527203;-0.500000;0.687064;, + -0.587938;-0.555570;0.587938;, + 0.000000;-0.382683;0.923880;, + -0.120590;-0.382683;0.915976;, + -0.239118;-0.382683;0.892399;, + -0.353553;-0.382683;0.853553;, + -0.448436;-0.442289;0.776715;, + -0.545982;-0.442289;0.711537;, + -0.612372;-0.500000;0.612372;, + 0.000000;-0.321439;0.946930;, + -0.123599;-0.321439;0.938829;, + -0.245084;-0.321439;0.914664;, + -0.362374;-0.321439;0.874849;, + -0.461940;-0.382683;0.800103;, + -0.562422;-0.382683;0.732963;, + -0.634185;-0.442289;0.634185;, + 0.000000;-0.258819;0.965926;, + -0.126079;-0.258819;0.957662;, + -0.250000;-0.258819;0.933013;, + -0.369644;-0.258819;0.892399;, + -0.473465;-0.321439;0.820066;, + -0.576455;-0.321439;0.751250;, + -0.653282;-0.382683;0.653282;, + 0.000000;-0.195090;0.980785;, + -0.128018;-0.195090;0.972395;, + -0.253846;-0.195090;0.947366;, + -0.375330;-0.195090;0.906127;, + -0.482963;-0.258819;0.836516;, + -0.588018;-0.258819;0.766320;, + -0.669581;-0.321439;0.669581;, + 0.000000;-0.130526;0.991445;, + -0.129410;-0.130526;0.982963;, + -0.256605;-0.130526;0.957662;, + -0.379410;-0.130526;0.915976;, + -0.490393;-0.195090;0.849385;, + -0.597064;-0.195090;0.778109;, + -0.683013;-0.258819;0.683013;, + 0.000000;-0.065403;0.997859;, + -0.130247;-0.065403;0.989322;, + -0.258265;-0.065403;0.963858;, + -0.381864;-0.065403;0.921901;, + -0.495722;-0.130526;0.858616;, + -0.603553;-0.130526;0.786566;, + -0.693520;-0.195090;0.693520;, + 0.000000;0.000000;1.000000;, + -0.130526;0.000000;0.991445;, + -0.258819;0.000000;0.965926;, + -0.382683;0.000000;0.923880;, + -0.498929;-0.065403;0.864171;, + -0.607458;-0.065403;0.791655;, + -0.701057;-0.130526;0.701057;, + 0.000000;0.065403;0.997859;, + -0.130247;0.065403;0.989322;, + -0.258265;0.065403;0.963858;, + -0.381864;0.065403;0.921901;, + -0.500000;0.000000;0.866025;, + -0.608761;0.000000;0.793353;, + -0.705593;-0.065403;0.705593;, + 0.000000;0.130526;0.991445;, + -0.129410;0.130526;0.982963;, + -0.256605;0.130526;0.957662;, + -0.379410;0.130526;0.915976;, + -0.498929;0.065403;0.864171;, + -0.607458;0.065403;0.791655;, + -0.707107;0.000000;0.707107;, + 0.000000;0.195090;0.980785;, + -0.128018;0.195090;0.972395;, + -0.253846;0.195090;0.947366;, + -0.375330;0.195090;0.906127;, + -0.495722;0.130526;0.858616;, + -0.603553;0.130526;0.786566;, + -0.705593;0.065403;0.705593;, + 0.000000;0.258819;0.965926;, + -0.126079;0.258819;0.957662;, + -0.250000;0.258819;0.933013;, + -0.369644;0.258819;0.892399;, + -0.490393;0.195090;0.849385;, + -0.597064;0.195090;0.778109;, + -0.701057;0.130526;0.701057;, + 0.000000;0.321439;0.946930;, + -0.123599;0.321439;0.938829;, + -0.245084;0.321439;0.914664;, + -0.362374;0.321439;0.874849;, + -0.482963;0.258819;0.836516;, + -0.588018;0.258819;0.766320;, + -0.693520;0.195090;0.693520;, + 0.000000;0.382683;0.923880;, + -0.120590;0.382683;0.915976;, + -0.239118;0.382683;0.892399;, + -0.353553;0.382683;0.853553;, + -0.473465;0.321439;0.820066;, + -0.576455;0.321439;0.751250;, + -0.683013;0.258819;0.683013;, + 0.000000;0.442289;0.896873;, + -0.117065;0.442289;0.889200;, + -0.232128;0.442289;0.866313;, + -0.343218;0.442289;0.828602;, + -0.461940;0.382683;0.800103;, + -0.562422;0.382683;0.732963;, + -0.669581;0.321439;0.669581;, + 0.000000;0.500000;0.866025;, + -0.113039;0.500000;0.858616;, + -0.224144;0.500000;0.836516;, + -0.331414;0.500000;0.800103;, + -0.448436;0.442289;0.776715;, + -0.545982;0.442289;0.711537;, + -0.653282;0.382683;0.653282;, + 0.000000;0.555570;0.831470;, + -0.108529;0.555570;0.824356;, + -0.215200;0.555570;0.803138;, + -0.318190;0.555570;0.768178;, + -0.433013;0.500000;0.750000;, + -0.527203;0.500000;0.687064;, + -0.634185;0.442289;0.634185;, + 0.000000;0.608761;0.793353;, + -0.103553;0.608761;0.786566;, + -0.205335;0.608761;0.766320;, + -0.303603;0.608761;0.732963;, + -0.415735;0.555570;0.720074;, + -0.506167;0.555570;0.659649;, + -0.612372;0.500000;0.612372;, + 0.000000;0.659346;0.751840;, + -0.098135;0.659346;0.745408;, + -0.194590;0.659346;0.726222;, + -0.287717;0.659346;0.694609;, + -0.396677;0.608761;0.687064;, + -0.482963;0.608761;0.629410;, + -0.587938;0.555570;0.587938;, + 0.000000;0.707107;0.707107;, + -0.092296;0.707107;0.701057;, + -0.183013;0.707107;0.683013;, + -0.270598;0.707107;0.653282;, + -0.375920;0.659346;0.651112;, + -0.457691;0.659346;0.596475;, + -0.560986;0.608761;0.560986;, + 0.000000;0.751840;0.659346;, + -0.086062;0.751840;0.653705;, + -0.170651;0.751840;0.636879;, + -0.252321;0.751840;0.609156;, + -0.353553;0.707107;0.612372;, + -0.430459;0.707107;0.560986;, + -0.531631;0.659346;0.531631;, + 0.000000;0.793353;0.608761;, + -0.079459;0.793353;0.603553;, + -0.157559;0.793353;0.588018;, + -0.232963;0.793353;0.562422;, + -0.329673;0.751840;0.571010;, + -0.401384;0.751840;0.523094;, + -0.500000;0.707107;0.500000;, + 0.000000;0.831470;0.555570;, + -0.072516;0.831470;0.550817;, + -0.143792;0.831470;0.536640;, + -0.212608;0.831470;0.513280;, + -0.304381;0.793353;0.527203;, + -0.370590;0.793353;0.482963;, + -0.466228;0.751840;0.466228;, + 0.000000;0.866025;0.500000;, + -0.065263;0.866025;0.495722;, + -0.129410;0.866025;0.482963;, + -0.191342;0.866025;0.461940;, + -0.277785;0.831470;0.481138;, + -0.338210;0.831470;0.440764;, + -0.430459;0.793353;0.430459;, + 0.000000;0.896873;0.442289;, + -0.057730;0.896873;0.438505;, + -0.114473;0.896873;0.427218;, + -0.169257;0.896873;0.408621;, + -0.250000;0.866025;0.433013;, + -0.304381;0.866025;0.396677;, + -0.392847;0.831470;0.392847;, + 0.000000;0.923880;0.382683;, + -0.049950;0.923880;0.379410;, + -0.099046;0.923880;0.369644;, + -0.146447;0.923880;0.353553;, + -0.221144;0.896873;0.383033;, + -0.269248;0.896873;0.350891;, + -0.353553;0.866025;0.353553;, + 0.000000;0.946930;0.321439;, + -0.041956;0.946930;0.318689;, + -0.083195;0.946930;0.310487;, + -0.123010;0.946930;0.296971;, + -0.191342;0.923880;0.331414;, + -0.232963;0.923880;0.303603;, + -0.312745;0.896873;0.312745;, + 0.000000;0.965926;0.258819;, + -0.033783;0.965926;0.256605;, + -0.066987;0.965926;0.250000;, + -0.099046;0.965926;0.239118;, + -0.160720;0.946930;0.278375;, + -0.195680;0.946930;0.255015;, + -0.270598;0.923880;0.270598;, + 0.000000;0.980785;0.195090;, + -0.025464;0.980785;0.193421;, + -0.050493;0.980785;0.188443;, + -0.074658;0.980785;0.180240;, + -0.129410;0.965926;0.224144;, + -0.157559;0.965926;0.205335;, + -0.227292;0.946930;0.227292;, + 0.000000;0.991445;0.130526;, + -0.017037;0.991445;0.129410;, + -0.033783;0.991445;0.126079;, + -0.049950;0.991445;0.120590;, + -0.097545;0.980785;0.168953;, + -0.118763;0.980785;0.154776;, + -0.183013;0.965926;0.183013;, + 0.000000;0.997859;0.065403;, + -0.008537;0.997859;0.064844;, + -0.016928;0.997859;0.063175;, + -0.025029;0.997859;0.060425;, + -0.065263;0.991445;0.113039;, + -0.079459;0.991445;0.103553;, + -0.137950;0.980785;0.137950;, + -0.032702;0.997859;0.056641;, + -0.039815;0.997859;0.051888;, + -0.092296;0.991445;0.092296;, + -0.154776;0.980785;0.118763;, + -0.205335;0.965926;0.157559;, + -0.046247;0.997859;0.046247;, + -0.103553;0.991445;0.079459;, + -0.168953;0.980785;0.097545;, + -0.224144;0.965926;0.129410;, + -0.278375;0.946930;0.160720;, + -0.255015;0.946930;0.195680;, + -0.051888;0.997859;0.039815;, + -0.113039;0.991445;0.065263;, + -0.180240;0.980785;0.074658;, + -0.239118;0.965926;0.099046;, + -0.296971;0.946930;0.123010;, + -0.056641;0.997859;0.032702;, + -0.120590;0.991445;0.049950;, + -0.188443;0.980785;0.050493;, + -0.250000;0.965926;0.066987;, + -0.310487;0.946930;0.083195;, + -0.060425;0.997859;0.025029;, + -0.126079;0.991445;0.033783;, + -0.193421;0.980785;0.025464;, + -0.256605;0.965926;0.033783;, + -0.318689;0.946930;0.041956;, + -0.063175;0.997859;0.016928;, + -0.129410;0.991445;0.017037;, + -0.195090;0.980785;0.000000;, + -0.258819;0.965926;0.000000;, + -0.321439;0.946930;0.000000;, + -0.064844;0.997859;0.008537;, + -0.130526;0.991445;0.000000;, + -0.193421;0.980785;-0.025464;, + -0.256605;0.965926;-0.033783;, + -0.318689;0.946930;-0.041956;, + -0.065403;0.997859;0.000000;, + -0.129410;0.991445;-0.017037;, + -0.188443;0.980785;-0.050493;, + -0.250000;0.965926;-0.066987;, + -0.310487;0.946930;-0.083195;, + -0.064844;0.997859;-0.008537;, + -0.126079;0.991445;-0.033783;, + -0.180240;0.980785;-0.074658;, + -0.239118;0.965926;-0.099046;, + -0.296971;0.946930;-0.123010;, + -0.063175;0.997859;-0.016928;, + -0.120590;0.991445;-0.049950;, + -0.168953;0.980785;-0.097545;, + -0.224144;0.965926;-0.129410;, + -0.278375;0.946930;-0.160720;, + -0.060425;0.997859;-0.025029;, + -0.113039;0.991445;-0.065263;, + -0.154776;0.980785;-0.118763;, + -0.205335;0.965926;-0.157559;, + -0.255015;0.946930;-0.195680;, + -0.056641;0.997859;-0.032702;, + -0.103553;0.991445;-0.079459;, + -0.137950;0.980785;-0.137950;, + -0.183013;0.965926;-0.183013;, + -0.227292;0.946930;-0.227292;, + -0.051888;0.997859;-0.039815;, + -0.157559;0.965926;-0.205335;, + -0.195680;0.946930;-0.255015;, + -0.160720;0.946930;-0.278375;, + -0.191342;0.923880;-0.331414;, + -0.232963;0.923880;-0.303603;, + -0.270598;0.923880;-0.270598;, + -0.123010;0.946930;-0.296971;, + -0.146447;0.923880;-0.353553;, + -0.169257;0.896873;-0.408621;, + -0.221144;0.896873;-0.383033;, + -0.269248;0.896873;-0.350891;, + -0.099046;0.923880;-0.369644;, + -0.114473;0.896873;-0.427218;, + -0.129410;0.866025;-0.482963;, + -0.191342;0.866025;-0.461940;, + -0.250000;0.866025;-0.433013;, + -0.049950;0.923880;-0.379410;, + -0.057730;0.896873;-0.438505;, + -0.065263;0.866025;-0.495722;, + -0.072516;0.831470;-0.550817;, + -0.143792;0.831470;-0.536640;, + -0.212608;0.831470;-0.513280;, + 0.000000;0.896873;-0.442289;, + 0.000000;0.866025;-0.500000;, + 0.000000;0.831470;-0.555570;, + 0.000000;0.793353;-0.608761;, + -0.079459;0.793353;-0.603553;, + -0.157559;0.793353;-0.588018;, + 0.057730;0.896873;-0.438505;, + 0.065263;0.866025;-0.495722;, + 0.072516;0.831470;-0.550817;, + 0.079459;0.793353;-0.603553;, + 0.000000;0.751840;-0.659346;, + -0.086062;0.751840;-0.653705;, + 0.114473;0.896873;-0.427218;, + 0.129410;0.866025;-0.482963;, + 0.143792;0.831470;-0.536640;, + 0.157559;0.793353;-0.588018;, + 0.086062;0.751840;-0.653705;, + 0.000000;0.707107;-0.707107;, + 0.169257;0.896873;-0.408621;, + 0.191342;0.866025;-0.461940;, + 0.212608;0.831470;-0.513280;, + 0.232963;0.793353;-0.562422;, + 0.170651;0.751840;-0.636879;, + 0.092296;0.707107;-0.701057;, + 0.221144;0.896873;-0.383033;, + 0.250000;0.866025;-0.433013;, + 0.277785;0.831470;-0.481138;, + 0.304381;0.793353;-0.527203;, + 0.252321;0.751840;-0.609156;, + 0.183013;0.707107;-0.683013;, + 0.269248;0.896873;-0.350891;, + 0.304381;0.866025;-0.396677;, + 0.338210;0.831470;-0.440764;, + 0.370590;0.793353;-0.482963;, + 0.329673;0.751840;-0.571010;, + 0.270598;0.707107;-0.653282;, + 0.312745;0.896873;-0.312745;, + 0.353553;0.866025;-0.353553;, + 0.392847;0.831470;-0.392847;, + 0.430459;0.793353;-0.430459;, + 0.401384;0.751840;-0.523094;, + 0.353553;0.707107;-0.612372;, + 0.350891;0.896873;-0.269248;, + 0.396677;0.866025;-0.304381;, + 0.440764;0.831470;-0.338210;, + 0.482963;0.793353;-0.370590;, + 0.466228;0.751840;-0.466228;, + 0.430459;0.707107;-0.560986;, + 0.383033;0.896873;-0.221144;, + 0.433013;0.866025;-0.250000;, + 0.481138;0.831470;-0.277785;, + 0.527203;0.793353;-0.304381;, + 0.523094;0.751840;-0.401384;, + 0.500000;0.707107;-0.500000;, + 0.408621;0.896873;-0.169257;, + 0.461940;0.866025;-0.191342;, + 0.513280;0.831470;-0.212608;, + 0.562422;0.793353;-0.232963;, + 0.571010;0.751840;-0.329673;, + 0.560986;0.707107;-0.430459;, + 0.427218;0.896873;-0.114473;, + 0.482963;0.866025;-0.129410;, + 0.536640;0.831470;-0.143792;, + 0.588018;0.793353;-0.157559;, + 0.609156;0.751840;-0.252321;, + 0.612372;0.707107;-0.353553;, + 0.438505;0.896873;-0.057730;, + 0.495722;0.866025;-0.065263;, + 0.550817;0.831470;-0.072516;, + 0.603553;0.793353;-0.079459;, + 0.636879;0.751840;-0.170651;, + 0.653282;0.707107;-0.270598;, + 0.442289;0.896873;0.000000;, + 0.500000;0.866025;0.000000;, + 0.555570;0.831470;0.000000;, + 0.608761;0.793353;0.000000;, + 0.653705;0.751840;-0.086062;, + 0.683013;0.707107;-0.183013;, + 0.438505;0.896873;0.057730;, + 0.495722;0.866025;0.065263;, + 0.550817;0.831470;0.072516;, + 0.603553;0.793353;0.079459;, + 0.659346;0.751840;0.000000;, + 0.701057;0.707107;-0.092296;, + 0.427218;0.896873;0.114473;, + 0.482963;0.866025;0.129410;, + 0.536640;0.831470;0.143792;, + 0.588018;0.793353;0.157559;, + 0.653705;0.751840;0.086062;, + 0.707107;0.707107;0.000000;, + 0.408621;0.896873;0.169257;, + 0.461940;0.866025;0.191342;, + 0.513280;0.831470;0.212608;, + 0.562422;0.793353;0.232963;, + 0.636879;0.751840;0.170651;, + 0.701057;0.707107;0.092296;, + 0.383033;0.896873;0.221144;, + 0.433013;0.866025;0.250000;, + 0.481138;0.831470;0.277785;, + 0.527203;0.793353;0.304381;, + 0.609156;0.751840;0.252321;, + 0.683013;0.707107;0.183013;, + 0.350891;0.896873;0.269248;, + 0.396677;0.866025;0.304381;, + 0.440764;0.831470;0.338210;, + 0.482963;0.793353;0.370590;, + 0.571010;0.751840;0.329673;, + 0.653282;0.707107;0.270598;, + 0.312745;0.896873;0.312745;, + 0.353553;0.866025;0.353553;, + 0.392847;0.831470;0.392847;, + 0.430459;0.793353;0.430459;, + 0.523094;0.751840;0.401384;, + 0.612372;0.707107;0.353553;, + 0.466228;0.751840;0.466228;, + 0.560986;0.707107;0.430459;, + 0.651112;0.659346;0.375920;, + 0.694609;0.659346;0.287717;, + 0.726222;0.659346;0.194590;, + 0.500000;0.707107;0.500000;, + 0.596475;0.659346;0.457691;, + 0.687064;0.608761;0.396677;, + 0.732963;0.608761;0.303603;, + 0.766320;0.608761;0.205335;, + 0.531631;0.659346;0.531631;, + 0.629410;0.608761;0.482963;, + 0.720074;0.555570;0.415735;, + 0.768178;0.555570;0.318190;, + 0.803138;0.555570;0.215200;, + 0.560986;0.608761;0.560986;, + 0.659649;0.555570;0.506167;, + 0.750000;0.500000;0.433013;, + 0.800103;0.500000;0.331414;, + 0.836516;0.500000;0.224144;, + 0.587938;0.555570;0.587938;, + 0.687064;0.500000;0.527203;, + 0.776715;0.442289;0.448436;, + 0.828602;0.442289;0.343218;, + 0.866313;0.442289;0.232128;, + 0.612372;0.500000;0.612372;, + 0.711537;0.442289;0.545982;, + 0.800103;0.382683;0.461940;, + 0.853553;0.382683;0.353553;, + 0.892399;0.382683;0.239118;, + 0.634185;0.442289;0.634185;, + 0.732963;0.382683;0.562422;, + 0.820066;0.321439;0.473465;, + 0.874849;0.321439;0.362374;, + 0.914664;0.321439;0.245084;, + 0.653282;0.382683;0.653282;, + 0.751250;0.321439;0.576455;, + 0.836516;0.258819;0.482963;, + 0.892399;0.258819;0.369644;, + 0.933013;0.258819;0.250000;, + 0.669581;0.321439;0.669581;, + 0.766320;0.258819;0.588018;, + 0.849385;0.195090;0.490393;, + 0.906127;0.195090;0.375330;, + 0.947366;0.195090;0.253846;, + 0.683013;0.258819;0.683013;, + 0.778109;0.195090;0.597064;, + 0.858616;0.130526;0.495722;, + 0.915976;0.130526;0.379410;, + 0.957662;0.130526;0.256605;, + 0.693520;0.195090;0.693520;, + 0.786566;0.130526;0.603553;, + 0.864171;0.065403;0.498929;, + 0.921901;0.065403;0.381864;, + 0.963858;0.065403;0.258265;, + 0.701057;0.130526;0.701057;, + 0.791655;0.065403;0.607458;, + 0.866025;0.000000;0.500000;, + 0.923880;0.000000;0.382683;, + 0.965926;0.000000;0.258819;, + 0.705593;0.065403;0.705593;, + 0.793353;0.000000;0.608761;, + 0.864171;-0.065403;0.498929;, + 0.921901;-0.065403;0.381864;, + 0.963858;-0.065403;0.258265;, + 0.707107;0.000000;0.707107;, + 0.791655;-0.065403;0.607458;, + 0.858616;-0.130526;0.495722;, + 0.915976;-0.130526;0.379410;, + 0.957662;-0.130526;0.256605;, + 0.705593;-0.065403;0.705593;, + 0.786566;-0.130526;0.603553;, + 0.849385;-0.195090;0.490393;, + 0.906127;-0.195090;0.375330;, + 0.947366;-0.195090;0.253846;, + 0.701057;-0.130526;0.701057;, + 0.778109;-0.195090;0.597064;, + 0.836516;-0.258819;0.482963;, + 0.892399;-0.258819;0.369644;, + 0.933013;-0.258819;0.250000;, + 0.693520;-0.195090;0.693520;, + 0.766320;-0.258819;0.588018;, + 0.820066;-0.321439;0.473465;, + 0.874849;-0.321439;0.362374;, + 0.914664;-0.321439;0.245084;, + 0.683013;-0.258819;0.683013;, + 0.751250;-0.321439;0.576455;, + 0.800103;-0.382683;0.461940;, + 0.853553;-0.382683;0.353553;, + 0.892399;-0.382683;0.239118;, + 0.669581;-0.321439;0.669581;, + 0.732963;-0.382683;0.562422;, + 0.776715;-0.442289;0.448436;, + 0.828602;-0.442289;0.343218;, + 0.866313;-0.442289;0.232128;, + 0.653282;-0.382683;0.653282;, + 0.711537;-0.442289;0.545982;, + 0.750000;-0.500000;0.433013;, + 0.800103;-0.500000;0.331414;, + 0.836516;-0.500000;0.224144;, + 0.634185;-0.442289;0.634185;, + 0.687064;-0.500000;0.527203;, + 0.720074;-0.555570;0.415735;, + 0.768178;-0.555570;0.318190;, + 0.803138;-0.555570;0.215200;, + 0.612372;-0.500000;0.612372;, + 0.659649;-0.555570;0.506167;, + 0.687064;-0.608761;0.396677;, + 0.732963;-0.608761;0.303603;, + 0.766320;-0.608761;0.205335;, + 0.587938;-0.555570;0.587938;, + 0.629410;-0.608761;0.482963;, + 0.651112;-0.659346;0.375920;, + 0.694609;-0.659346;0.287717;, + 0.726222;-0.659346;0.194590;, + 0.560986;-0.608761;0.560986;, + 0.596475;-0.659346;0.457691;, + 0.612372;-0.707107;0.353553;, + 0.653282;-0.707107;0.270598;, + 0.683013;-0.707107;0.183013;, + 0.531631;-0.659346;0.531631;, + 0.560986;-0.707107;0.430459;, + 0.571010;-0.751840;0.329673;, + 0.609156;-0.751840;0.252321;, + 0.636879;-0.751840;0.170651;, + 0.500000;-0.707107;0.500000;, + 0.523094;-0.751840;0.401384;, + 0.527203;-0.793353;0.304381;, + 0.562422;-0.793353;0.232963;, + 0.588018;-0.793353;0.157559;, + 0.466228;-0.751840;0.466228;, + 0.482963;-0.793353;0.370590;, + 0.481138;-0.831470;0.277785;, + 0.513280;-0.831470;0.212608;, + 0.536640;-0.831470;0.143792;, + 0.430459;-0.793353;0.430459;, + 0.440764;-0.831470;0.338210;, + 0.433013;-0.866025;0.250000;, + 0.461940;-0.866025;0.191342;, + 0.482963;-0.866025;0.129410;, + 0.392847;-0.831470;0.392847;, + 0.396677;-0.866025;0.304381;, + 0.383033;-0.896873;0.221144;, + 0.408621;-0.896873;0.169257;, + 0.427218;-0.896873;0.114473;, + 0.353553;-0.866025;0.353553;, + 0.350891;-0.896873;0.269248;, + 0.331414;-0.923880;0.191342;, + 0.353553;-0.923880;0.146447;, + 0.369644;-0.923880;0.099046;, + 0.312745;-0.896873;0.312745;, + 0.303603;-0.923880;0.232963;, + 0.270598;-0.923880;0.270598;, + 0.379410;-0.923880;0.049950;, + 0.438505;-0.896873;0.057730;, + 0.495722;-0.866025;0.065263;, + 0.382683;-0.923880;0.000000;, + 0.442289;-0.896873;0.000000;, + 0.500000;-0.866025;0.000000;, + 0.550817;-0.831470;0.072516;, + 0.603553;-0.793353;0.079459;, + 0.379410;-0.923880;-0.049950;, + 0.438505;-0.896873;-0.057730;, + 0.495722;-0.866025;-0.065263;, + 0.555570;-0.831470;0.000000;, + 0.608761;-0.793353;0.000000;, + 0.653705;-0.751840;0.086062;, + 0.369644;-0.923880;-0.099046;, + 0.427218;-0.896873;-0.114473;, + 0.482963;-0.866025;-0.129410;, + 0.550817;-0.831470;-0.072516;, + 0.603553;-0.793353;-0.079459;, + 0.659346;-0.751840;0.000000;, + 0.353553;-0.923880;-0.146447;, + 0.408621;-0.896873;-0.169257;, + 0.461940;-0.866025;-0.191342;, + 0.536640;-0.831470;-0.143792;, + 0.588018;-0.793353;-0.157559;, + 0.653705;-0.751840;-0.086062;, + 0.331414;-0.923880;-0.191342;, + 0.383033;-0.896873;-0.221144;, + 0.433013;-0.866025;-0.250000;, + 0.513280;-0.831470;-0.212608;, + 0.562422;-0.793353;-0.232963;, + 0.636879;-0.751840;-0.170651;, + 0.303603;-0.923880;-0.232963;, + 0.350891;-0.896873;-0.269248;, + 0.396677;-0.866025;-0.304381;, + 0.481138;-0.831470;-0.277785;, + 0.527203;-0.793353;-0.304381;, + 0.609156;-0.751840;-0.252321;, + 0.270598;-0.923880;-0.270598;, + 0.312745;-0.896873;-0.312745;, + 0.353553;-0.866025;-0.353553;, + 0.440764;-0.831470;-0.338210;, + 0.482963;-0.793353;-0.370590;, + 0.571010;-0.751840;-0.329673;, + 0.232963;-0.923880;-0.303603;, + 0.269248;-0.896873;-0.350891;, + 0.304381;-0.866025;-0.396677;, + 0.392847;-0.831470;-0.392847;, + 0.430459;-0.793353;-0.430459;, + 0.523094;-0.751840;-0.401384;, + 0.221144;-0.896873;-0.383033;, + 0.250000;-0.866025;-0.433013;, + 0.338210;-0.831470;-0.440764;, + 0.370590;-0.793353;-0.482963;, + 0.466228;-0.751840;-0.466228;, + 0.169257;-0.896873;-0.408621;, + 0.191342;-0.866025;-0.461940;, + 0.277785;-0.831470;-0.481138;, + 0.304381;-0.793353;-0.527203;, + 0.401384;-0.751840;-0.523094;, + 0.114473;-0.896873;-0.427218;, + 0.129410;-0.866025;-0.482963;, + 0.212608;-0.831470;-0.513280;, + 0.232963;-0.793353;-0.562422;, + 0.329673;-0.751840;-0.571010;, + 0.049950;-0.923880;-0.379410;, + 0.057730;-0.896873;-0.438505;, + 0.065263;-0.866025;-0.495722;, + 0.143792;-0.831470;-0.536640;, + 0.157559;-0.793353;-0.588018;, + 0.252321;-0.751840;-0.609156;, + 0.000000;-0.946930;-0.321439;, + 0.000000;-0.923880;-0.382683;, + 0.000000;-0.896873;-0.442289;, + 0.000000;-0.866025;-0.500000;, + 0.072516;-0.831470;-0.550817;, + -0.049950;-0.923880;-0.379410;, + -0.057730;-0.896873;-0.438505;, + -0.065263;-0.866025;-0.495722;, + -0.072516;-0.831470;-0.550817;, + 0.000000;-0.831470;-0.555570;, + 0.079459;-0.793353;-0.603553;, + -0.099046;-0.923880;-0.369644;, + -0.114473;-0.896873;-0.427218;, + -0.129410;-0.866025;-0.482963;, + -0.143792;-0.831470;-0.536640;, + -0.157559;-0.793353;-0.588018;, + -0.079459;-0.793353;-0.603553;, + -0.146447;-0.923880;-0.353553;, + -0.169257;-0.896873;-0.408621;, + -0.191342;-0.866025;-0.461940;, + -0.212608;-0.831470;-0.513280;, + -0.232963;-0.793353;-0.562422;, + -0.191342;-0.923880;-0.331414;, + -0.221144;-0.896873;-0.383033;, + -0.250000;-0.866025;-0.433013;, + -0.277785;-0.831470;-0.481138;, + -0.304381;-0.793353;-0.527203;, + -0.232963;-0.923880;-0.303603;, + -0.269248;-0.896873;-0.350891;, + -0.304381;-0.866025;-0.396677;, + -0.338210;-0.831470;-0.440764;, + -0.370590;-0.793353;-0.482963;, + -0.270598;-0.923880;-0.270598;, + -0.312745;-0.896873;-0.312745;, + -0.353553;-0.866025;-0.353553;, + -0.392847;-0.831470;-0.392847;, + -0.430459;-0.793353;-0.430459;, + -0.303603;-0.923880;-0.232963;, + -0.350891;-0.896873;-0.269248;, + -0.396677;-0.866025;-0.304381;, + -0.440764;-0.831470;-0.338210;, + -0.482963;-0.793353;-0.370590;, + -0.331414;-0.923880;-0.191342;, + -0.383033;-0.896873;-0.221144;, + -0.433013;-0.866025;-0.250000;, + -0.481138;-0.831470;-0.277785;, + -0.527203;-0.793353;-0.304381;, + -0.353553;-0.923880;-0.146447;, + -0.408621;-0.896873;-0.169257;, + -0.461940;-0.866025;-0.191342;, + -0.513280;-0.831470;-0.212608;, + -0.562422;-0.793353;-0.232963;, + -0.369644;-0.923880;-0.099046;, + -0.427218;-0.896873;-0.114473;, + -0.482963;-0.866025;-0.129410;, + -0.536640;-0.831470;-0.143792;, + -0.588018;-0.793353;-0.157559;, + -0.379410;-0.923880;-0.049950;, + -0.438505;-0.896873;-0.057730;, + -0.495722;-0.866025;-0.065263;, + -0.550817;-0.831470;-0.072516;, + -0.603553;-0.793353;-0.079459;, + -0.382683;-0.923880;0.000000;, + -0.442289;-0.896873;0.000000;, + -0.500000;-0.866025;0.000000;, + -0.555570;-0.831470;0.000000;, + -0.608761;-0.793353;0.000000;, + -0.379410;-0.923880;0.049950;, + -0.438505;-0.896873;0.057730;, + -0.495722;-0.866025;0.065263;, + -0.550817;-0.831470;0.072516;, + -0.603553;-0.793353;0.079459;, + -0.369644;-0.923880;0.099046;, + -0.427218;-0.896873;0.114473;, + -0.482963;-0.866025;0.129410;, + -0.536640;-0.831470;0.143792;, + -0.588018;-0.793353;0.157559;, + -0.353553;-0.923880;0.146447;, + -0.408621;-0.896873;0.169257;, + -0.461940;-0.866025;0.191342;, + -0.513280;-0.831470;0.212608;, + -0.562422;-0.793353;0.232963;, + -0.331414;-0.923880;0.191342;, + -0.383033;-0.896873;0.221144;, + -0.433013;-0.866025;0.250000;, + -0.481138;-0.831470;0.277785;, + -0.527203;-0.793353;0.304381;, + -0.303603;-0.923880;0.232963;, + -0.350891;-0.896873;0.269248;, + -0.396677;-0.866025;0.304381;, + -0.440764;-0.831470;0.338210;, + -0.482963;-0.793353;0.370590;, + -0.523094;-0.751840;0.401384;, + -0.571010;-0.751840;0.329673;, + -0.609156;-0.751840;0.252321;, + -0.560986;-0.707107;0.430459;, + -0.612372;-0.707107;0.353553;, + -0.653282;-0.707107;0.270598;, + -0.636879;-0.751840;0.170651;, + -0.653705;-0.751840;0.086062;, + -0.596475;-0.659346;0.457691;, + -0.651112;-0.659346;0.375920;, + -0.694609;-0.659346;0.287717;, + -0.683013;-0.707107;0.183013;, + -0.701057;-0.707107;0.092296;, + -0.659346;-0.751840;0.000000;, + -0.629410;-0.608761;0.482963;, + -0.687064;-0.608761;0.396677;, + -0.732963;-0.608761;0.303603;, + -0.726222;-0.659346;0.194590;, + -0.745408;-0.659346;0.098135;, + -0.707107;-0.707107;0.000000;, + -0.659649;-0.555570;0.506167;, + -0.720074;-0.555570;0.415735;, + -0.768178;-0.555570;0.318190;, + -0.766320;-0.608761;0.205335;, + -0.786566;-0.608761;0.103553;, + -0.751840;-0.659346;0.000000;, + -0.687064;-0.500000;0.527203;, + -0.750000;-0.500000;0.433013;, + -0.800103;-0.500000;0.331414;, + -0.803138;-0.555570;0.215200;, + -0.824356;-0.555570;0.108529;, + -0.793353;-0.608761;0.000000;, + -0.711537;-0.442289;0.545982;, + -0.776715;-0.442289;0.448436;, + -0.828602;-0.442289;0.343218;, + -0.836516;-0.500000;0.224144;, + -0.858616;-0.500000;0.113039;, + -0.831470;-0.555570;0.000000;, + -0.732963;-0.382683;0.562422;, + -0.800103;-0.382683;0.461940;, + -0.853553;-0.382683;0.353553;, + -0.866313;-0.442289;0.232128;, + -0.889200;-0.442289;0.117065;, + -0.866025;-0.500000;0.000000;, + -0.751250;-0.321439;0.576455;, + -0.820066;-0.321439;0.473465;, + -0.874849;-0.321439;0.362374;, + -0.892399;-0.382683;0.239118;, + -0.915976;-0.382683;0.120590;, + -0.896873;-0.442289;0.000000;, + -0.766320;-0.258819;0.588018;, + -0.836516;-0.258819;0.482963;, + -0.892399;-0.258819;0.369644;, + -0.914664;-0.321439;0.245084;, + -0.938829;-0.321439;0.123599;, + -0.923880;-0.382683;0.000000;, + -0.778109;-0.195090;0.597064;, + -0.849385;-0.195090;0.490393;, + -0.906127;-0.195090;0.375330;, + -0.933013;-0.258819;0.250000;, + -0.957662;-0.258819;0.126079;, + -0.946930;-0.321439;0.000000;, + -0.786566;-0.130526;0.603553;, + -0.858616;-0.130526;0.495722;, + -0.915976;-0.130526;0.379410;, + -0.947366;-0.195090;0.253846;, + -0.972395;-0.195090;0.128018;, + -0.965926;-0.258819;0.000000;, + -0.791655;-0.065403;0.607458;, + -0.864171;-0.065403;0.498929;, + -0.921901;-0.065403;0.381864;, + -0.957662;-0.130526;0.256605;, + -0.982963;-0.130526;0.129410;, + -0.980785;-0.195090;0.000000;, + -0.793353;0.000000;0.608761;, + -0.866025;0.000000;0.500000;, + -0.923880;0.000000;0.382683;, + -0.963858;-0.065403;0.258265;, + -0.989322;-0.065403;0.130247;, + -0.991445;-0.130526;0.000000;, + -0.791655;0.065403;0.607458;, + -0.864171;0.065403;0.498929;, + -0.921901;0.065403;0.381864;, + -0.965926;0.000000;0.258819;, + -0.991445;0.000000;0.130526;, + -0.997859;-0.065403;0.000000;, + -0.786566;0.130526;0.603553;, + -0.858616;0.130526;0.495722;, + -0.915976;0.130526;0.379410;, + -0.963858;0.065403;0.258265;, + -0.989322;0.065403;0.130247;, + -1.000000;0.000000;0.000000;, + -0.778109;0.195090;0.597064;, + -0.849385;0.195090;0.490393;, + -0.906127;0.195090;0.375330;, + -0.957662;0.130526;0.256605;, + -0.982963;0.130526;0.129410;, + -0.997859;0.065403;0.000000;, + -0.766320;0.258819;0.588018;, + -0.836516;0.258819;0.482963;, + -0.892399;0.258819;0.369644;, + -0.947366;0.195090;0.253846;, + -0.972395;0.195090;0.128018;, + -0.991445;0.130526;0.000000;, + -0.751250;0.321439;0.576455;, + -0.820066;0.321439;0.473465;, + -0.874849;0.321439;0.362374;, + -0.933013;0.258819;0.250000;, + -0.957662;0.258819;0.126079;, + -0.980785;0.195090;0.000000;, + -0.732963;0.382683;0.562422;, + -0.800103;0.382683;0.461940;, + -0.853553;0.382683;0.353553;, + -0.914664;0.321439;0.245084;, + -0.938829;0.321439;0.123599;, + -0.965926;0.258819;0.000000;, + -0.711537;0.442289;0.545982;, + -0.776715;0.442289;0.448436;, + -0.828602;0.442289;0.343218;, + -0.892399;0.382683;0.239118;, + -0.915976;0.382683;0.120590;, + -0.946930;0.321439;0.000000;, + -0.687064;0.500000;0.527203;, + -0.750000;0.500000;0.433013;, + -0.800103;0.500000;0.331414;, + -0.866313;0.442289;0.232128;, + -0.889200;0.442289;0.117065;, + -0.923880;0.382683;0.000000;, + -0.659649;0.555570;0.506167;, + -0.720074;0.555570;0.415735;, + -0.768178;0.555570;0.318190;, + -0.836516;0.500000;0.224144;, + -0.858616;0.500000;0.113039;, + -0.896873;0.442289;0.000000;, + -0.629410;0.608761;0.482963;, + -0.687064;0.608761;0.396677;, + -0.732963;0.608761;0.303603;, + -0.803138;0.555570;0.215200;, + -0.824356;0.555570;0.108529;, + -0.866025;0.500000;0.000000;, + -0.596475;0.659346;0.457691;, + -0.651112;0.659346;0.375920;, + -0.694609;0.659346;0.287717;, + -0.766320;0.608761;0.205335;, + -0.786566;0.608761;0.103553;, + -0.831470;0.555570;0.000000;, + -0.560986;0.707107;0.430459;, + -0.612372;0.707107;0.353553;, + -0.653282;0.707107;0.270598;, + -0.726222;0.659346;0.194590;, + -0.745408;0.659346;0.098135;, + -0.793353;0.608761;0.000000;, + -0.523094;0.751840;0.401384;, + -0.571010;0.751840;0.329673;, + -0.609156;0.751840;0.252321;, + -0.683013;0.707107;0.183013;, + -0.701057;0.707107;0.092296;, + -0.751840;0.659346;0.000000;, + -0.482963;0.793353;0.370590;, + -0.527203;0.793353;0.304381;, + -0.562422;0.793353;0.232963;, + -0.636879;0.751840;0.170651;, + -0.653705;0.751840;0.086062;, + -0.707107;0.707107;0.000000;, + -0.440764;0.831470;0.338210;, + -0.481138;0.831470;0.277785;, + -0.513280;0.831470;0.212608;, + -0.588018;0.793353;0.157559;, + -0.603553;0.793353;0.079459;, + -0.659346;0.751840;0.000000;, + -0.396677;0.866025;0.304381;, + -0.433013;0.866025;0.250000;, + -0.461940;0.866025;0.191342;, + -0.536640;0.831470;0.143792;, + -0.550817;0.831470;0.072516;, + -0.608761;0.793353;0.000000;, + -0.350891;0.896873;0.269248;, + -0.383033;0.896873;0.221144;, + -0.408621;0.896873;0.169257;, + -0.482963;0.866025;0.129410;, + -0.495722;0.866025;0.065263;, + -0.555570;0.831470;0.000000;, + -0.303603;0.923880;0.232963;, + -0.331414;0.923880;0.191342;, + -0.353553;0.923880;0.146447;, + -0.427218;0.896873;0.114473;, + -0.438505;0.896873;0.057730;, + -0.500000;0.866025;0.000000;, + -0.369644;0.923880;0.099046;, + -0.379410;0.923880;0.049950;, + -0.442289;0.896873;0.000000;, + -0.495722;0.866025;-0.065263;, + -0.550817;0.831470;-0.072516;, + -0.382683;0.923880;0.000000;, + -0.438505;0.896873;-0.057730;, + -0.482963;0.866025;-0.129410;, + -0.536640;0.831470;-0.143792;, + -0.588018;0.793353;-0.157559;, + -0.603553;0.793353;-0.079459;, + -0.379410;0.923880;-0.049950;, + -0.427218;0.896873;-0.114473;, + -0.461940;0.866025;-0.191342;, + -0.513280;0.831470;-0.212608;, + -0.562422;0.793353;-0.232963;, + -0.369644;0.923880;-0.099046;, + -0.408621;0.896873;-0.169257;, + -0.433013;0.866025;-0.250000;, + -0.481138;0.831470;-0.277785;, + -0.527203;0.793353;-0.304381;, + -0.353553;0.923880;-0.146447;, + -0.383033;0.896873;-0.221144;, + -0.396677;0.866025;-0.304381;, + -0.440764;0.831470;-0.338210;, + -0.482963;0.793353;-0.370590;, + -0.331414;0.923880;-0.191342;, + -0.350891;0.896873;-0.269248;, + -0.353553;0.866025;-0.353553;, + -0.392847;0.831470;-0.392847;, + -0.430459;0.793353;-0.430459;, + -0.303603;0.923880;-0.232963;, + -0.312745;0.896873;-0.312745;, + -0.304381;0.866025;-0.396677;, + -0.338210;0.831470;-0.440764;, + -0.370590;0.793353;-0.482963;, + -0.277785;0.831470;-0.481138;, + -0.304381;0.793353;-0.527203;, + -0.329673;0.751840;-0.571010;, + -0.401384;0.751840;-0.523094;, + -0.466228;0.751840;-0.466228;, + -0.232963;0.793353;-0.562422;, + -0.252321;0.751840;-0.609156;, + -0.270598;0.707107;-0.653282;, + -0.353553;0.707107;-0.612372;, + -0.430459;0.707107;-0.560986;, + -0.170651;0.751840;-0.636879;, + -0.183013;0.707107;-0.683013;, + -0.194590;0.659346;-0.726222;, + -0.287717;0.659346;-0.694609;, + -0.375920;0.659346;-0.651112;, + -0.092296;0.707107;-0.701057;, + -0.098135;0.659346;-0.745408;, + -0.103553;0.608761;-0.786566;, + -0.205335;0.608761;-0.766320;, + -0.303603;0.608761;-0.732963;, + 0.000000;0.659346;-0.751840;, + 0.000000;0.608761;-0.793353;, + 0.000000;0.555570;-0.831470;, + -0.108529;0.555570;-0.824356;, + -0.215200;0.555570;-0.803138;, + 0.098135;0.659346;-0.745408;, + 0.103553;0.608761;-0.786566;, + 0.108529;0.555570;-0.824356;, + 0.000000;0.500000;-0.866025;, + -0.113039;0.500000;-0.858616;, + 0.194590;0.659346;-0.726222;, + 0.205335;0.608761;-0.766320;, + 0.215200;0.555570;-0.803138;, + 0.113039;0.500000;-0.858616;, + 0.000000;0.442289;-0.896873;, + 0.287717;0.659346;-0.694609;, + 0.303603;0.608761;-0.732963;, + 0.318190;0.555570;-0.768178;, + 0.224144;0.500000;-0.836516;, + 0.117065;0.442289;-0.889200;, + 0.375920;0.659346;-0.651112;, + 0.396677;0.608761;-0.687064;, + 0.415735;0.555570;-0.720074;, + 0.331414;0.500000;-0.800103;, + 0.232128;0.442289;-0.866313;, + 0.457691;0.659346;-0.596475;, + 0.482963;0.608761;-0.629410;, + 0.506167;0.555570;-0.659649;, + 0.433013;0.500000;-0.750000;, + 0.343218;0.442289;-0.828602;, + 0.531631;0.659346;-0.531631;, + 0.560986;0.608761;-0.560986;, + 0.587938;0.555570;-0.587938;, + 0.527203;0.500000;-0.687064;, + 0.448436;0.442289;-0.776715;, + 0.596475;0.659346;-0.457691;, + 0.629410;0.608761;-0.482963;, + 0.659649;0.555570;-0.506167;, + 0.612372;0.500000;-0.612372;, + 0.545982;0.442289;-0.711537;, + 0.651112;0.659346;-0.375920;, + 0.687064;0.608761;-0.396677;, + 0.720074;0.555570;-0.415735;, + 0.687064;0.500000;-0.527203;, + 0.634185;0.442289;-0.634185;, + 0.694609;0.659346;-0.287717;, + 0.732963;0.608761;-0.303603;, + 0.768178;0.555570;-0.318190;, + 0.750000;0.500000;-0.433013;, + 0.711537;0.442289;-0.545982;, + 0.726222;0.659346;-0.194590;, + 0.766320;0.608761;-0.205335;, + 0.803138;0.555570;-0.215200;, + 0.800103;0.500000;-0.331414;, + 0.776715;0.442289;-0.448436;, + 0.745408;0.659346;-0.098135;, + 0.786566;0.608761;-0.103553;, + 0.824356;0.555570;-0.108529;, + 0.836516;0.500000;-0.224144;, + 0.828602;0.442289;-0.343218;, + 0.751840;0.659346;0.000000;, + 0.793353;0.608761;0.000000;, + 0.831470;0.555570;0.000000;, + 0.858616;0.500000;-0.113039;, + 0.866313;0.442289;-0.232128;, + 0.745408;0.659346;0.098135;, + 0.786566;0.608761;0.103553;, + 0.824356;0.555570;0.108529;, + 0.866025;0.500000;0.000000;, + 0.889200;0.442289;-0.117065;, + 0.858616;0.500000;0.113039;, + 0.896873;0.442289;0.000000;, + 0.915976;0.382683;-0.120590;, + 0.892399;0.382683;-0.239118;, + 0.853553;0.382683;-0.353553;, + 0.889200;0.442289;0.117065;, + 0.923880;0.382683;0.000000;, + 0.938829;0.321439;-0.123599;, + 0.914664;0.321439;-0.245084;, + 0.874849;0.321439;-0.362374;, + 0.915976;0.382683;0.120590;, + 0.946930;0.321439;0.000000;, + 0.957662;0.258819;-0.126079;, + 0.933013;0.258819;-0.250000;, + 0.892399;0.258819;-0.369644;, + 0.938829;0.321439;0.123599;, + 0.965926;0.258819;0.000000;, + 0.972395;0.195090;-0.128018;, + 0.947366;0.195090;-0.253846;, + 0.906127;0.195090;-0.375330;, + 0.957662;0.258819;0.126079;, + 0.980785;0.195090;0.000000;, + 0.982963;0.130526;-0.129410;, + 0.957662;0.130526;-0.256605;, + 0.915976;0.130526;-0.379410;, + 0.972395;0.195090;0.128018;, + 0.991445;0.130526;0.000000;, + 0.989322;0.065403;-0.130247;, + 0.963858;0.065403;-0.258265;, + 0.921901;0.065403;-0.381864;, + 0.982963;0.130526;0.129410;, + 0.997859;0.065403;0.000000;, + 0.991445;0.000000;-0.130526;, + 0.965926;0.000000;-0.258819;, + 0.923880;0.000000;-0.382683;, + 0.989322;0.065403;0.130247;, + 1.000000;0.000000;0.000000;, + 0.989322;-0.065403;-0.130247;, + 0.963858;-0.065403;-0.258265;, + 0.921901;-0.065403;-0.381864;, + 0.991445;0.000000;0.130526;, + 0.997859;-0.065403;0.000000;, + 0.982963;-0.130526;-0.129410;, + 0.957662;-0.130526;-0.256605;, + 0.915976;-0.130526;-0.379410;, + 0.989322;-0.065403;0.130247;, + 0.991445;-0.130526;0.000000;, + 0.972395;-0.195090;-0.128018;, + 0.947366;-0.195090;-0.253846;, + 0.906127;-0.195090;-0.375330;, + 0.982963;-0.130526;0.129410;, + 0.980785;-0.195090;0.000000;, + 0.957662;-0.258819;-0.126079;, + 0.933013;-0.258819;-0.250000;, + 0.892399;-0.258819;-0.369644;, + 0.972395;-0.195090;0.128018;, + 0.965926;-0.258819;0.000000;, + 0.938829;-0.321439;-0.123599;, + 0.914664;-0.321439;-0.245084;, + 0.874849;-0.321439;-0.362374;, + 0.957662;-0.258819;0.126079;, + 0.946930;-0.321439;0.000000;, + 0.915976;-0.382683;-0.120590;, + 0.892399;-0.382683;-0.239118;, + 0.853553;-0.382683;-0.353553;, + 0.938829;-0.321439;0.123599;, + 0.923880;-0.382683;0.000000;, + 0.889200;-0.442289;-0.117065;, + 0.866313;-0.442289;-0.232128;, + 0.828602;-0.442289;-0.343218;, + 0.915976;-0.382683;0.120590;, + 0.896873;-0.442289;0.000000;, + 0.858616;-0.500000;-0.113039;, + 0.836516;-0.500000;-0.224144;, + 0.800103;-0.500000;-0.331414;, + 0.889200;-0.442289;0.117065;, + 0.866025;-0.500000;0.000000;, + 0.824356;-0.555570;-0.108529;, + 0.803138;-0.555570;-0.215200;, + 0.768178;-0.555570;-0.318190;, + 0.858616;-0.500000;0.113039;, + 0.831470;-0.555570;0.000000;, + 0.786566;-0.608761;-0.103553;, + 0.766320;-0.608761;-0.205335;, + 0.732963;-0.608761;-0.303603;, + 0.824356;-0.555570;0.108529;, + 0.793353;-0.608761;0.000000;, + 0.745408;-0.659346;-0.098135;, + 0.726222;-0.659346;-0.194590;, + 0.694609;-0.659346;-0.287717;, + 0.786566;-0.608761;0.103553;, + 0.751840;-0.659346;0.000000;, + 0.701057;-0.707107;-0.092296;, + 0.683013;-0.707107;-0.183013;, + 0.653282;-0.707107;-0.270598;, + 0.745408;-0.659346;0.098135;, + 0.707107;-0.707107;0.000000;, + 0.701057;-0.707107;0.092296;, + 0.612372;-0.707107;-0.353553;, + 0.651112;-0.659346;-0.375920;, + 0.687064;-0.608761;-0.396677;, + 0.560986;-0.707107;-0.430459;, + 0.596475;-0.659346;-0.457691;, + 0.629410;-0.608761;-0.482963;, + 0.720074;-0.555570;-0.415735;, + 0.750000;-0.500000;-0.433013;, + 0.500000;-0.707107;-0.500000;, + 0.531631;-0.659346;-0.531631;, + 0.560986;-0.608761;-0.560986;, + 0.659649;-0.555570;-0.506167;, + 0.687064;-0.500000;-0.527203;, + 0.776715;-0.442289;-0.448436;, + 0.430459;-0.707107;-0.560986;, + 0.457691;-0.659346;-0.596475;, + 0.482963;-0.608761;-0.629410;, + 0.587938;-0.555570;-0.587938;, + 0.612372;-0.500000;-0.612372;, + 0.711537;-0.442289;-0.545982;, + 0.353553;-0.707107;-0.612372;, + 0.375920;-0.659346;-0.651112;, + 0.396677;-0.608761;-0.687064;, + 0.506167;-0.555570;-0.659649;, + 0.527203;-0.500000;-0.687064;, + 0.634185;-0.442289;-0.634185;, + 0.270598;-0.707107;-0.653282;, + 0.287717;-0.659346;-0.694609;, + 0.303603;-0.608761;-0.732963;, + 0.415735;-0.555570;-0.720074;, + 0.433013;-0.500000;-0.750000;, + 0.545982;-0.442289;-0.711537;, + 0.170651;-0.751840;-0.636879;, + 0.183013;-0.707107;-0.683013;, + 0.194590;-0.659346;-0.726222;, + 0.205335;-0.608761;-0.766320;, + 0.318190;-0.555570;-0.768178;, + 0.086062;-0.751840;-0.653705;, + 0.092296;-0.707107;-0.701057;, + 0.098135;-0.659346;-0.745408;, + 0.103553;-0.608761;-0.786566;, + 0.215200;-0.555570;-0.803138;, + 0.331414;-0.500000;-0.800103;, + 0.000000;-0.793353;-0.608761;, + 0.000000;-0.751840;-0.659346;, + 0.000000;-0.707107;-0.707107;, + 0.000000;-0.659346;-0.751840;, + 0.000000;-0.608761;-0.793353;, + 0.108529;-0.555570;-0.824356;, + -0.086062;-0.751840;-0.653705;, + -0.092296;-0.707107;-0.701057;, + -0.098135;-0.659346;-0.745408;, + -0.103553;-0.608761;-0.786566;, + -0.108529;-0.555570;-0.824356;, + 0.000000;-0.555570;-0.831470;, + -0.170651;-0.751840;-0.636879;, + -0.183013;-0.707107;-0.683013;, + -0.194590;-0.659346;-0.726222;, + -0.205335;-0.608761;-0.766320;, + -0.215200;-0.555570;-0.803138;, + -0.252321;-0.751840;-0.609156;, + -0.270598;-0.707107;-0.653282;, + -0.287717;-0.659346;-0.694609;, + -0.303603;-0.608761;-0.732963;, + -0.318190;-0.555570;-0.768178;, + -0.329673;-0.751840;-0.571010;, + -0.353553;-0.707107;-0.612372;, + -0.375920;-0.659346;-0.651112;, + -0.396677;-0.608761;-0.687064;, + -0.415735;-0.555570;-0.720074;, + -0.401384;-0.751840;-0.523094;, + -0.430459;-0.707107;-0.560986;, + -0.457691;-0.659346;-0.596475;, + -0.482963;-0.608761;-0.629410;, + -0.506167;-0.555570;-0.659649;, + -0.466228;-0.751840;-0.466228;, + -0.500000;-0.707107;-0.500000;, + -0.531631;-0.659346;-0.531631;, + -0.560986;-0.608761;-0.560986;, + -0.587938;-0.555570;-0.587938;, + -0.523094;-0.751840;-0.401384;, + -0.560986;-0.707107;-0.430459;, + -0.596475;-0.659346;-0.457691;, + -0.629410;-0.608761;-0.482963;, + -0.659649;-0.555570;-0.506167;, + -0.571010;-0.751840;-0.329673;, + -0.612372;-0.707107;-0.353553;, + -0.651112;-0.659346;-0.375920;, + -0.687064;-0.608761;-0.396677;, + -0.720074;-0.555570;-0.415735;, + -0.609156;-0.751840;-0.252321;, + -0.653282;-0.707107;-0.270598;, + -0.694609;-0.659346;-0.287717;, + -0.732963;-0.608761;-0.303603;, + -0.768178;-0.555570;-0.318190;, + -0.636879;-0.751840;-0.170651;, + -0.683013;-0.707107;-0.183013;, + -0.726222;-0.659346;-0.194590;, + -0.766320;-0.608761;-0.205335;, + -0.803138;-0.555570;-0.215200;, + -0.653705;-0.751840;-0.086062;, + -0.701057;-0.707107;-0.092296;, + -0.745408;-0.659346;-0.098135;, + -0.786566;-0.608761;-0.103553;, + -0.824356;-0.555570;-0.108529;, + -0.858616;-0.500000;-0.113039;, + -0.836516;-0.500000;-0.224144;, + -0.800103;-0.500000;-0.331414;, + -0.889200;-0.442289;-0.117065;, + -0.866313;-0.442289;-0.232128;, + -0.828602;-0.442289;-0.343218;, + -0.750000;-0.500000;-0.433013;, + -0.687064;-0.500000;-0.527203;, + -0.915976;-0.382683;-0.120590;, + -0.892399;-0.382683;-0.239118;, + -0.853553;-0.382683;-0.353553;, + -0.776715;-0.442289;-0.448436;, + -0.711537;-0.442289;-0.545982;, + -0.612372;-0.500000;-0.612372;, + -0.938829;-0.321439;-0.123599;, + -0.914664;-0.321439;-0.245084;, + -0.874849;-0.321439;-0.362374;, + -0.800103;-0.382683;-0.461940;, + -0.732963;-0.382683;-0.562422;, + -0.634185;-0.442289;-0.634185;, + -0.957662;-0.258819;-0.126079;, + -0.933013;-0.258819;-0.250000;, + -0.892399;-0.258819;-0.369644;, + -0.820066;-0.321439;-0.473465;, + -0.751250;-0.321439;-0.576455;, + -0.653282;-0.382683;-0.653282;, + -0.972395;-0.195090;-0.128018;, + -0.947366;-0.195090;-0.253846;, + -0.906127;-0.195090;-0.375330;, + -0.836516;-0.258819;-0.482963;, + -0.766320;-0.258819;-0.588018;, + -0.669581;-0.321439;-0.669581;, + -0.982963;-0.130526;-0.129410;, + -0.957662;-0.130526;-0.256605;, + -0.915976;-0.130526;-0.379410;, + -0.849385;-0.195090;-0.490393;, + -0.778109;-0.195090;-0.597064;, + -0.683013;-0.258819;-0.683013;, + -0.989322;-0.065403;-0.130247;, + -0.963858;-0.065403;-0.258265;, + -0.921901;-0.065403;-0.381864;, + -0.858616;-0.130526;-0.495722;, + -0.786566;-0.130526;-0.603553;, + -0.693520;-0.195090;-0.693520;, + -0.991445;0.000000;-0.130526;, + -0.965926;0.000000;-0.258819;, + -0.923880;0.000000;-0.382683;, + -0.864171;-0.065403;-0.498929;, + -0.791655;-0.065403;-0.607458;, + -0.701057;-0.130526;-0.701057;, + -0.989322;0.065403;-0.130247;, + -0.963858;0.065403;-0.258265;, + -0.921901;0.065403;-0.381864;, + -0.866025;0.000000;-0.500000;, + -0.793353;0.000000;-0.608761;, + -0.705593;-0.065403;-0.705593;, + -0.982963;0.130526;-0.129410;, + -0.957662;0.130526;-0.256605;, + -0.915976;0.130526;-0.379410;, + -0.864171;0.065403;-0.498929;, + -0.791655;0.065403;-0.607458;, + -0.707107;0.000000;-0.707107;, + -0.972395;0.195090;-0.128018;, + -0.947366;0.195090;-0.253846;, + -0.906127;0.195090;-0.375330;, + -0.858616;0.130526;-0.495722;, + -0.786566;0.130526;-0.603553;, + -0.705593;0.065403;-0.705593;, + -0.957662;0.258819;-0.126079;, + -0.933013;0.258819;-0.250000;, + -0.892399;0.258819;-0.369644;, + -0.849385;0.195090;-0.490393;, + -0.778109;0.195090;-0.597064;, + -0.701057;0.130526;-0.701057;, + -0.938829;0.321439;-0.123599;, + -0.914664;0.321439;-0.245084;, + -0.874849;0.321439;-0.362374;, + -0.836516;0.258819;-0.482963;, + -0.766320;0.258819;-0.588018;, + -0.693520;0.195090;-0.693520;, + -0.915976;0.382683;-0.120590;, + -0.892399;0.382683;-0.239118;, + -0.853553;0.382683;-0.353553;, + -0.820066;0.321439;-0.473465;, + -0.751250;0.321439;-0.576455;, + -0.683013;0.258819;-0.683013;, + -0.889200;0.442289;-0.117065;, + -0.866313;0.442289;-0.232128;, + -0.828602;0.442289;-0.343218;, + -0.800103;0.382683;-0.461940;, + -0.732963;0.382683;-0.562422;, + -0.669581;0.321439;-0.669581;, + -0.858616;0.500000;-0.113039;, + -0.836516;0.500000;-0.224144;, + -0.800103;0.500000;-0.331414;, + -0.776715;0.442289;-0.448436;, + -0.711537;0.442289;-0.545982;, + -0.653282;0.382683;-0.653282;, + -0.824356;0.555570;-0.108529;, + -0.803138;0.555570;-0.215200;, + -0.768178;0.555570;-0.318190;, + -0.750000;0.500000;-0.433013;, + -0.687064;0.500000;-0.527203;, + -0.634185;0.442289;-0.634185;, + -0.786566;0.608761;-0.103553;, + -0.766320;0.608761;-0.205335;, + -0.732963;0.608761;-0.303603;, + -0.720074;0.555570;-0.415735;, + -0.659649;0.555570;-0.506167;, + -0.612372;0.500000;-0.612372;, + -0.745408;0.659346;-0.098135;, + -0.726222;0.659346;-0.194590;, + -0.694609;0.659346;-0.287717;, + -0.687064;0.608761;-0.396677;, + -0.629410;0.608761;-0.482963;, + -0.587938;0.555570;-0.587938;, + -0.701057;0.707107;-0.092296;, + -0.683013;0.707107;-0.183013;, + -0.653282;0.707107;-0.270598;, + -0.651112;0.659346;-0.375920;, + -0.596475;0.659346;-0.457691;, + -0.560986;0.608761;-0.560986;, + -0.653705;0.751840;-0.086062;, + -0.636879;0.751840;-0.170651;, + -0.609156;0.751840;-0.252321;, + -0.612372;0.707107;-0.353553;, + -0.560986;0.707107;-0.430459;, + -0.531631;0.659346;-0.531631;, + -0.571010;0.751840;-0.329673;, + -0.523094;0.751840;-0.401384;, + -0.500000;0.707107;-0.500000;, + -0.457691;0.659346;-0.596475;, + -0.482963;0.608761;-0.629410;, + -0.396677;0.608761;-0.687064;, + -0.415735;0.555570;-0.720074;, + -0.506167;0.555570;-0.659649;, + -0.527203;0.500000;-0.687064;, + -0.318190;0.555570;-0.768178;, + -0.331414;0.500000;-0.800103;, + -0.433013;0.500000;-0.750000;, + -0.448436;0.442289;-0.776715;, + -0.545982;0.442289;-0.711537;, + -0.224144;0.500000;-0.836516;, + -0.232128;0.442289;-0.866313;, + -0.343218;0.442289;-0.828602;, + -0.353553;0.382683;-0.853553;, + -0.461940;0.382683;-0.800103;, + -0.562422;0.382683;-0.732963;, + -0.117065;0.442289;-0.889200;, + -0.120590;0.382683;-0.915976;, + -0.239118;0.382683;-0.892399;, + -0.245084;0.321439;-0.914664;, + -0.362374;0.321439;-0.874849;, + -0.473465;0.321439;-0.820066;, + 0.000000;0.382683;-0.923880;, + 0.000000;0.321439;-0.946930;, + -0.123599;0.321439;-0.938829;, + -0.126079;0.258819;-0.957662;, + -0.250000;0.258819;-0.933013;, + -0.369644;0.258819;-0.892399;, + 0.120590;0.382683;-0.915976;, + 0.123599;0.321439;-0.938829;, + 0.000000;0.258819;-0.965926;, + 0.000000;0.195090;-0.980785;, + -0.128018;0.195090;-0.972395;, + -0.253846;0.195090;-0.947366;, + 0.239118;0.382683;-0.892399;, + 0.245084;0.321439;-0.914664;, + 0.126079;0.258819;-0.957662;, + 0.128018;0.195090;-0.972395;, + 0.000000;0.130526;-0.991445;, + -0.129410;0.130526;-0.982963;, + 0.353553;0.382683;-0.853553;, + 0.362374;0.321439;-0.874849;, + 0.250000;0.258819;-0.933013;, + 0.253846;0.195090;-0.947366;, + 0.129410;0.130526;-0.982963;, + 0.000000;0.065403;-0.997859;, + 0.461940;0.382683;-0.800103;, + 0.473465;0.321439;-0.820066;, + 0.369644;0.258819;-0.892399;, + 0.375330;0.195090;-0.906127;, + 0.256605;0.130526;-0.957662;, + 0.130247;0.065403;-0.989322;, + 0.562422;0.382683;-0.732963;, + 0.576455;0.321439;-0.751250;, + 0.482963;0.258819;-0.836516;, + 0.490393;0.195090;-0.849385;, + 0.379410;0.130526;-0.915976;, + 0.258265;0.065403;-0.963858;, + 0.653282;0.382683;-0.653282;, + 0.669581;0.321439;-0.669581;, + 0.588018;0.258819;-0.766320;, + 0.597064;0.195090;-0.778109;, + 0.495722;0.130526;-0.858616;, + 0.381864;0.065403;-0.921901;, + 0.732963;0.382683;-0.562422;, + 0.751250;0.321439;-0.576455;, + 0.683013;0.258819;-0.683013;, + 0.693520;0.195090;-0.693520;, + 0.603553;0.130526;-0.786566;, + 0.498929;0.065403;-0.864171;, + 0.800103;0.382683;-0.461940;, + 0.820066;0.321439;-0.473465;, + 0.766320;0.258819;-0.588018;, + 0.778109;0.195090;-0.597064;, + 0.701057;0.130526;-0.701057;, + 0.607458;0.065403;-0.791655;, + 0.836516;0.258819;-0.482963;, + 0.849385;0.195090;-0.490393;, + 0.786566;0.130526;-0.603553;, + 0.705593;0.065403;-0.705593;, + 0.608761;0.000000;-0.793353;, + 0.500000;0.000000;-0.866025;, + 0.858616;0.130526;-0.495722;, + 0.791655;0.065403;-0.607458;, + 0.707107;0.000000;-0.707107;, + 0.607458;-0.065403;-0.791655;, + 0.498929;-0.065403;-0.864171;, + 0.864171;0.065403;-0.498929;, + 0.793353;0.000000;-0.608761;, + 0.705593;-0.065403;-0.705593;, + 0.603553;-0.130526;-0.786566;, + 0.495722;-0.130526;-0.858616;, + 0.866025;0.000000;-0.500000;, + 0.791655;-0.065403;-0.607458;, + 0.701057;-0.130526;-0.701057;, + 0.597064;-0.195090;-0.778109;, + 0.490393;-0.195090;-0.849385;, + 0.864171;-0.065403;-0.498929;, + 0.786566;-0.130526;-0.603553;, + 0.693520;-0.195090;-0.693520;, + 0.588018;-0.258819;-0.766320;, + 0.482963;-0.258819;-0.836516;, + 0.858616;-0.130526;-0.495722;, + 0.778109;-0.195090;-0.597064;, + 0.683013;-0.258819;-0.683013;, + 0.576455;-0.321439;-0.751250;, + 0.473465;-0.321439;-0.820066;, + 0.849385;-0.195090;-0.490393;, + 0.766320;-0.258819;-0.588018;, + 0.669581;-0.321439;-0.669581;, + 0.562422;-0.382683;-0.732963;, + 0.461940;-0.382683;-0.800103;, + 0.836516;-0.258819;-0.482963;, + 0.751250;-0.321439;-0.576455;, + 0.653282;-0.382683;-0.653282;, + 0.448436;-0.442289;-0.776715;, + 0.820066;-0.321439;-0.473465;, + 0.732963;-0.382683;-0.562422;, + 0.800103;-0.382683;-0.461940;, + 0.343218;-0.442289;-0.828602;, + 0.353553;-0.382683;-0.853553;, + 0.362374;-0.321439;-0.874849;, + 0.224144;-0.500000;-0.836516;, + 0.232128;-0.442289;-0.866313;, + 0.239118;-0.382683;-0.892399;, + 0.245084;-0.321439;-0.914664;, + 0.369644;-0.258819;-0.892399;, + 0.113039;-0.500000;-0.858616;, + 0.117065;-0.442289;-0.889200;, + 0.120590;-0.382683;-0.915976;, + 0.123599;-0.321439;-0.938829;, + 0.250000;-0.258819;-0.933013;, + 0.375330;-0.195090;-0.906127;, + 0.000000;-0.500000;-0.866025;, + 0.000000;-0.442289;-0.896873;, + 0.000000;-0.382683;-0.923880;, + 0.000000;-0.321439;-0.946930;, + 0.126079;-0.258819;-0.957662;, + 0.253846;-0.195090;-0.947366;, + -0.113039;-0.500000;-0.858616;, + -0.117065;-0.442289;-0.889200;, + -0.120590;-0.382683;-0.915976;, + -0.123599;-0.321439;-0.938829;, + -0.126079;-0.258819;-0.957662;, + 0.000000;-0.258819;-0.965926;, + -0.224144;-0.500000;-0.836516;, + -0.232128;-0.442289;-0.866313;, + -0.239118;-0.382683;-0.892399;, + -0.245084;-0.321439;-0.914664;, + -0.250000;-0.258819;-0.933013;, + -0.331414;-0.500000;-0.800103;, + -0.343218;-0.442289;-0.828602;, + -0.353553;-0.382683;-0.853553;, + -0.362374;-0.321439;-0.874849;, + -0.369644;-0.258819;-0.892399;, + -0.433013;-0.500000;-0.750000;, + -0.448436;-0.442289;-0.776715;, + -0.461940;-0.382683;-0.800103;, + -0.473465;-0.321439;-0.820066;, + -0.482963;-0.258819;-0.836516;, + -0.527203;-0.500000;-0.687064;, + -0.545982;-0.442289;-0.711537;, + -0.562422;-0.382683;-0.732963;, + -0.576455;-0.321439;-0.751250;, + -0.588018;-0.258819;-0.766320;, + -0.597064;-0.195090;-0.778109;, + -0.490393;-0.195090;-0.849385;, + -0.375330;-0.195090;-0.906127;, + -0.603553;-0.130526;-0.786566;, + -0.495722;-0.130526;-0.858616;, + -0.379410;-0.130526;-0.915976;, + -0.253846;-0.195090;-0.947366;, + -0.128018;-0.195090;-0.972395;, + -0.607458;-0.065403;-0.791655;, + -0.498929;-0.065403;-0.864171;, + -0.381864;-0.065403;-0.921901;, + -0.256605;-0.130526;-0.957662;, + -0.129410;-0.130526;-0.982963;, + 0.000000;-0.195090;-0.980785;, + -0.608761;0.000000;-0.793353;, + -0.500000;0.000000;-0.866025;, + -0.382683;0.000000;-0.923880;, + -0.258265;-0.065403;-0.963858;, + -0.130247;-0.065403;-0.989322;, + 0.000000;-0.130526;-0.991445;, + -0.607458;0.065403;-0.791655;, + -0.498929;0.065403;-0.864171;, + -0.381864;0.065403;-0.921901;, + -0.258819;0.000000;-0.965926;, + -0.130526;0.000000;-0.991445;, + 0.000000;-0.065403;-0.997859;, + -0.603553;0.130526;-0.786566;, + -0.495722;0.130526;-0.858616;, + -0.379410;0.130526;-0.915976;, + -0.258265;0.065403;-0.963858;, + -0.130247;0.065403;-0.989322;, + 0.000000;0.000000;-1.000000;, + -0.597064;0.195090;-0.778109;, + -0.490393;0.195090;-0.849385;, + -0.375330;0.195090;-0.906127;, + -0.256605;0.130526;-0.957662;, + -0.588018;0.258819;-0.766320;, + -0.482963;0.258819;-0.836516;, + -0.576455;0.321439;-0.751250;, + 0.130526;0.000000;-0.991445;, + 0.130247;-0.065403;-0.989322;, + 0.129410;-0.130526;-0.982963;, + 0.258819;0.000000;-0.965926;, + 0.258265;-0.065403;-0.963858;, + 0.256605;-0.130526;-0.957662;, + 0.128018;-0.195090;-0.972395;, + 0.382683;0.000000;-0.923880;, + 0.381864;-0.065403;-0.921901;, + 0.379410;-0.130526;-0.915976;; + 4512; + 3;0,1,2;, + 3;3,1,0;, + 3;3,4,1;, + 3;4,5,1;, + 3;1,5,6;, + 3;7,0,2;, + 3;8,0,7;, + 3;8,3,0;, + 3;9,3,8;, + 3;9,10,3;, + 3;10,4,3;, + 3;10,11,4;, + 3;11,12,4;, + 3;4,12,5;, + 3;13,7,2;, + 3;14,7,13;, + 3;14,8,7;, + 3;15,8,14;, + 3;15,9,8;, + 3;16,9,15;, + 3;16,17,9;, + 3;17,10,9;, + 3;17,18,10;, + 3;18,11,10;, + 3;19,13,2;, + 3;20,13,19;, + 3;20,14,13;, + 3;21,14,20;, + 3;21,15,14;, + 3;22,15,21;, + 3;22,16,15;, + 3;23,16,22;, + 3;23,24,16;, + 3;24,17,16;, + 3;25,19,2;, + 3;26,19,25;, + 3;26,20,19;, + 3;27,20,26;, + 3;27,21,20;, + 3;28,21,27;, + 3;28,22,21;, + 3;29,22,28;, + 3;29,23,22;, + 3;25,2,30;, + 3;26,25,30;, + 3;26,30,31;, + 3;27,26,31;, + 3;27,31,32;, + 3;28,27,32;, + 3;28,32,33;, + 3;29,28,33;, + 3;29,33,34;, + 3;35,29,34;, + 3;35,23,29;, + 3;30,2,36;, + 3;31,30,36;, + 3;31,36,37;, + 3;32,31,37;, + 3;32,37,38;, + 3;33,32,38;, + 3;33,38,39;, + 3;34,33,39;, + 3;34,39,40;, + 3;41,34,40;, + 3;35,34,41;, + 3;36,2,42;, + 3;37,36,42;, + 3;37,42,43;, + 3;38,37,43;, + 3;38,43,44;, + 3;39,38,44;, + 3;39,44,45;, + 3;40,39,45;, + 3;40,45,46;, + 3;47,40,46;, + 3;41,40,47;, + 3;42,2,48;, + 3;43,42,48;, + 3;43,48,49;, + 3;44,43,49;, + 3;44,49,50;, + 3;45,44,50;, + 3;45,50,51;, + 3;46,45,51;, + 3;46,51,52;, + 3;53,46,52;, + 3;47,46,53;, + 3;48,2,54;, + 3;49,48,54;, + 3;49,54,55;, + 3;50,49,55;, + 3;50,55,56;, + 3;51,50,56;, + 3;51,56,57;, + 3;52,51,57;, + 3;52,57,58;, + 3;59,52,58;, + 3;53,52,59;, + 3;54,2,60;, + 3;55,54,60;, + 3;55,60,61;, + 3;56,55,61;, + 3;56,61,62;, + 3;57,56,62;, + 3;57,62,63;, + 3;58,57,63;, + 3;58,63,64;, + 3;65,58,64;, + 3;59,58,65;, + 3;60,2,66;, + 3;61,60,66;, + 3;61,66,67;, + 3;62,61,67;, + 3;62,67,68;, + 3;63,62,68;, + 3;63,68,69;, + 3;64,63,69;, + 3;64,69,70;, + 3;71,64,70;, + 3;65,64,71;, + 3;66,2,72;, + 3;67,66,72;, + 3;67,72,73;, + 3;68,67,73;, + 3;68,73,74;, + 3;69,68,74;, + 3;69,74,75;, + 3;70,69,75;, + 3;70,75,76;, + 3;77,70,76;, + 3;71,70,77;, + 3;72,2,78;, + 3;73,72,78;, + 3;73,78,79;, + 3;74,73,79;, + 3;74,79,80;, + 3;75,74,80;, + 3;75,80,81;, + 3;76,75,81;, + 3;76,81,82;, + 3;83,76,82;, + 3;77,76,83;, + 3;78,2,84;, + 3;79,78,84;, + 3;79,84,85;, + 3;80,79,85;, + 3;80,85,86;, + 3;81,80,86;, + 3;81,86,87;, + 3;82,81,87;, + 3;82,87,88;, + 3;89,82,88;, + 3;83,82,89;, + 3;84,2,90;, + 3;85,84,90;, + 3;85,90,91;, + 3;86,85,91;, + 3;86,91,92;, + 3;87,86,92;, + 3;87,92,93;, + 3;88,87,93;, + 3;88,93,94;, + 3;95,88,94;, + 3;89,88,95;, + 3;90,2,96;, + 3;91,90,96;, + 3;91,96,97;, + 3;92,91,97;, + 3;92,97,98;, + 3;93,92,98;, + 3;93,98,99;, + 3;94,93,99;, + 3;94,99,100;, + 3;101,94,100;, + 3;95,94,101;, + 3;96,2,102;, + 3;97,96,102;, + 3;97,102,103;, + 3;98,97,103;, + 3;98,103,104;, + 3;99,98,104;, + 3;99,104,105;, + 3;100,99,105;, + 3;100,105,106;, + 3;107,100,106;, + 3;101,100,107;, + 3;102,2,108;, + 3;103,102,108;, + 3;103,108,109;, + 3;104,103,109;, + 3;104,109,110;, + 3;105,104,110;, + 3;105,110,111;, + 3;106,105,111;, + 3;106,111,112;, + 3;113,106,112;, + 3;107,106,113;, + 3;108,2,114;, + 3;109,108,114;, + 3;109,114,115;, + 3;110,109,115;, + 3;110,115,116;, + 3;111,110,116;, + 3;111,116,117;, + 3;112,111,117;, + 3;112,117,118;, + 3;119,112,118;, + 3;113,112,119;, + 3;114,2,120;, + 3;115,114,120;, + 3;115,120,121;, + 3;116,115,121;, + 3;116,121,122;, + 3;117,116,122;, + 3;117,122,123;, + 3;118,117,123;, + 3;118,123,124;, + 3;125,118,124;, + 3;119,118,125;, + 3;120,2,126;, + 3;121,120,126;, + 3;121,126,127;, + 3;122,121,127;, + 3;122,127,128;, + 3;123,122,128;, + 3;123,128,129;, + 3;124,123,129;, + 3;124,129,130;, + 3;131,124,130;, + 3;125,124,131;, + 3;126,2,132;, + 3;127,126,132;, + 3;127,132,133;, + 3;128,127,133;, + 3;128,133,134;, + 3;129,128,134;, + 3;129,134,135;, + 3;130,129,135;, + 3;130,135,136;, + 3;137,130,136;, + 3;131,130,137;, + 3;132,2,138;, + 3;133,132,138;, + 3;133,138,139;, + 3;134,133,139;, + 3;134,139,140;, + 3;135,134,140;, + 3;135,140,141;, + 3;136,135,141;, + 3;136,141,142;, + 3;143,136,142;, + 3;137,136,143;, + 3;138,2,144;, + 3;139,138,144;, + 3;139,144,145;, + 3;140,139,145;, + 3;140,145,146;, + 3;141,140,146;, + 3;141,146,147;, + 3;142,141,147;, + 3;142,147,148;, + 3;149,142,148;, + 3;143,142,149;, + 3;144,2,150;, + 3;145,144,150;, + 3;145,150,151;, + 3;146,145,151;, + 3;146,151,152;, + 3;147,146,152;, + 3;147,152,153;, + 3;148,147,153;, + 3;148,153,154;, + 3;155,148,154;, + 3;149,148,155;, + 3;150,2,156;, + 3;151,150,156;, + 3;151,156,157;, + 3;152,151,157;, + 3;152,157,158;, + 3;153,152,158;, + 3;153,158,159;, + 3;154,153,159;, + 3;154,159,160;, + 3;161,154,160;, + 3;155,154,161;, + 3;156,2,162;, + 3;157,156,162;, + 3;157,162,163;, + 3;158,157,163;, + 3;158,163,164;, + 3;159,158,164;, + 3;159,164,165;, + 3;160,159,165;, + 3;160,165,166;, + 3;167,160,166;, + 3;161,160,167;, + 3;162,2,168;, + 3;163,162,168;, + 3;163,168,169;, + 3;164,163,169;, + 3;164,169,170;, + 3;165,164,170;, + 3;165,170,171;, + 3;166,165,171;, + 3;166,171,172;, + 3;173,166,172;, + 3;167,166,173;, + 3;174,167,173;, + 3;175,167,174;, + 3;175,161,167;, + 3;176,161,175;, + 3;176,155,161;, + 3;173,172,177;, + 3;178,173,177;, + 3;174,173,178;, + 3;179,174,178;, + 3;180,174,179;, + 3;180,175,174;, + 3;181,175,180;, + 3;181,176,175;, + 3;182,176,181;, + 3;182,183,176;, + 3;183,155,176;, + 3;183,149,155;, + 3;178,177,184;, + 3;185,178,184;, + 3;179,178,185;, + 3;186,179,185;, + 3;187,179,186;, + 3;187,180,179;, + 3;188,180,187;, + 3;188,181,180;, + 3;189,181,188;, + 3;189,182,181;, + 3;185,184,190;, + 3;191,185,190;, + 3;186,185,191;, + 3;192,186,191;, + 3;193,186,192;, + 3;193,187,186;, + 3;194,187,193;, + 3;194,188,187;, + 3;195,188,194;, + 3;195,189,188;, + 3;191,190,196;, + 3;197,191,196;, + 3;192,191,197;, + 3;198,192,197;, + 3;199,192,198;, + 3;199,193,192;, + 3;200,193,199;, + 3;200,194,193;, + 3;201,194,200;, + 3;201,195,194;, + 3;197,196,202;, + 3;203,197,202;, + 3;198,197,203;, + 3;204,198,203;, + 3;205,198,204;, + 3;205,199,198;, + 3;206,199,205;, + 3;206,200,199;, + 3;207,200,206;, + 3;207,201,200;, + 3;203,202,208;, + 3;209,203,208;, + 3;204,203,209;, + 3;210,204,209;, + 3;211,204,210;, + 3;211,205,204;, + 3;212,205,211;, + 3;212,206,205;, + 3;213,206,212;, + 3;213,207,206;, + 3;209,208,214;, + 3;215,209,214;, + 3;210,209,215;, + 3;216,210,215;, + 3;217,210,216;, + 3;217,211,210;, + 3;218,211,217;, + 3;218,212,211;, + 3;219,212,218;, + 3;219,213,212;, + 3;215,214,220;, + 3;221,215,220;, + 3;216,215,221;, + 3;222,216,221;, + 3;223,216,222;, + 3;223,217,216;, + 3;224,217,223;, + 3;224,218,217;, + 3;225,218,224;, + 3;225,219,218;, + 3;221,220,226;, + 3;227,221,226;, + 3;222,221,227;, + 3;228,222,227;, + 3;229,222,228;, + 3;229,223,222;, + 3;230,223,229;, + 3;230,224,223;, + 3;231,224,230;, + 3;231,225,224;, + 3;227,226,232;, + 3;233,227,232;, + 3;228,227,233;, + 3;234,228,233;, + 3;235,228,234;, + 3;235,229,228;, + 3;236,229,235;, + 3;236,230,229;, + 3;237,230,236;, + 3;237,231,230;, + 3;233,232,238;, + 3;239,233,238;, + 3;234,233,239;, + 3;240,234,239;, + 3;241,234,240;, + 3;241,235,234;, + 3;242,235,241;, + 3;242,236,235;, + 3;243,236,242;, + 3;243,237,236;, + 3;239,238,244;, + 3;245,239,244;, + 3;240,239,245;, + 3;246,240,245;, + 3;247,240,246;, + 3;247,241,240;, + 3;248,241,247;, + 3;248,242,241;, + 3;249,242,248;, + 3;249,243,242;, + 3;245,244,250;, + 3;251,245,250;, + 3;246,245,251;, + 3;252,246,251;, + 3;253,246,252;, + 3;253,247,246;, + 3;254,247,253;, + 3;254,248,247;, + 3;255,248,254;, + 3;255,249,248;, + 3;251,250,256;, + 3;257,251,256;, + 3;252,251,257;, + 3;258,252,257;, + 3;259,252,258;, + 3;259,253,252;, + 3;260,253,259;, + 3;260,254,253;, + 3;261,254,260;, + 3;261,255,254;, + 3;257,256,262;, + 3;263,257,262;, + 3;258,257,263;, + 3;264,258,263;, + 3;265,258,264;, + 3;265,259,258;, + 3;266,259,265;, + 3;266,260,259;, + 3;267,260,266;, + 3;267,261,260;, + 3;263,262,268;, + 3;269,263,268;, + 3;264,263,269;, + 3;270,264,269;, + 3;271,264,270;, + 3;271,265,264;, + 3;272,265,271;, + 3;272,266,265;, + 3;273,266,272;, + 3;273,267,266;, + 3;269,268,274;, + 3;275,269,274;, + 3;270,269,275;, + 3;276,270,275;, + 3;277,270,276;, + 3;277,271,270;, + 3;278,271,277;, + 3;278,272,271;, + 3;279,272,278;, + 3;279,273,272;, + 3;275,274,280;, + 3;281,275,280;, + 3;276,275,281;, + 3;282,276,281;, + 3;283,276,282;, + 3;283,277,276;, + 3;284,277,283;, + 3;284,278,277;, + 3;285,278,284;, + 3;285,279,278;, + 3;281,280,286;, + 3;287,281,286;, + 3;282,281,287;, + 3;288,282,287;, + 3;289,282,288;, + 3;289,283,282;, + 3;290,283,289;, + 3;290,284,283;, + 3;291,284,290;, + 3;291,285,284;, + 3;287,286,292;, + 3;293,287,292;, + 3;288,287,293;, + 3;294,288,293;, + 3;295,288,294;, + 3;295,289,288;, + 3;296,289,295;, + 3;296,290,289;, + 3;297,290,296;, + 3;297,291,290;, + 3;293,292,298;, + 3;299,293,298;, + 3;294,293,299;, + 3;300,294,299;, + 3;301,294,300;, + 3;301,295,294;, + 3;302,295,301;, + 3;302,296,295;, + 3;303,296,302;, + 3;303,297,296;, + 3;299,298,304;, + 3;305,299,304;, + 3;300,299,305;, + 3;306,300,305;, + 3;307,300,306;, + 3;307,301,300;, + 3;308,301,307;, + 3;308,302,301;, + 3;309,302,308;, + 3;309,303,302;, + 3;305,304,310;, + 3;311,305,310;, + 3;306,305,311;, + 3;312,306,311;, + 3;313,306,312;, + 3;313,307,306;, + 3;314,307,313;, + 3;314,308,307;, + 3;315,308,314;, + 3;315,309,308;, + 3;311,310,316;, + 3;317,311,316;, + 3;312,311,317;, + 3;318,312,317;, + 3;319,312,318;, + 3;319,313,312;, + 3;320,313,319;, + 3;320,314,313;, + 3;321,314,320;, + 3;321,315,314;, + 3;317,316,322;, + 3;323,317,322;, + 3;318,317,323;, + 3;324,318,323;, + 3;325,318,324;, + 3;325,319,318;, + 3;326,319,325;, + 3;326,320,319;, + 3;327,320,326;, + 3;327,321,320;, + 3;323,322,328;, + 3;329,323,328;, + 3;324,323,329;, + 3;330,324,329;, + 3;331,324,330;, + 3;331,325,324;, + 3;332,325,331;, + 3;332,326,325;, + 3;333,326,332;, + 3;333,327,326;, + 3;329,328,334;, + 3;335,329,334;, + 3;330,329,335;, + 3;336,330,335;, + 3;337,330,336;, + 3;337,331,330;, + 3;338,331,337;, + 3;338,332,331;, + 3;339,332,338;, + 3;339,333,332;, + 3;335,334,340;, + 3;341,335,340;, + 3;336,335,341;, + 3;342,336,341;, + 3;343,336,342;, + 3;343,337,336;, + 3;344,337,343;, + 3;344,338,337;, + 3;345,338,344;, + 3;345,339,338;, + 3;341,340,346;, + 3;347,341,346;, + 3;342,341,347;, + 3;348,342,347;, + 3;349,342,348;, + 3;349,343,342;, + 3;350,343,349;, + 3;350,344,343;, + 3;351,344,350;, + 3;351,345,344;, + 3;347,346,352;, + 3;353,347,352;, + 3;348,347,353;, + 3;354,348,353;, + 3;355,348,354;, + 3;355,349,348;, + 3;356,349,355;, + 3;356,350,349;, + 3;357,350,356;, + 3;357,351,350;, + 3;353,352,358;, + 3;359,353,358;, + 3;354,353,359;, + 3;360,354,359;, + 3;361,354,360;, + 3;361,355,354;, + 3;362,355,361;, + 3;362,356,355;, + 3;363,356,362;, + 3;363,357,356;, + 3;359,358,364;, + 3;365,359,364;, + 3;360,359,365;, + 3;366,360,365;, + 3;367,360,366;, + 3;367,361,360;, + 3;368,361,367;, + 3;368,362,361;, + 3;369,362,368;, + 3;369,363,362;, + 3;365,364,370;, + 3;371,365,370;, + 3;366,365,371;, + 3;372,366,371;, + 3;373,366,372;, + 3;373,367,366;, + 3;374,367,373;, + 3;374,368,367;, + 3;375,368,374;, + 3;375,369,368;, + 3;371,370,376;, + 3;377,371,376;, + 3;372,371,377;, + 3;378,372,377;, + 3;379,372,378;, + 3;379,373,372;, + 3;380,373,379;, + 3;380,374,373;, + 3;381,374,380;, + 3;381,375,374;, + 3;377,376,382;, + 3;383,377,382;, + 3;378,377,383;, + 3;384,378,383;, + 3;385,378,384;, + 3;385,379,378;, + 3;386,379,385;, + 3;386,380,379;, + 3;387,380,386;, + 3;387,381,380;, + 3;383,382,388;, + 3;389,383,388;, + 3;384,383,389;, + 3;390,384,389;, + 3;391,384,390;, + 3;391,385,384;, + 3;392,385,391;, + 3;392,386,385;, + 3;393,386,392;, + 3;393,387,386;, + 3;389,388,394;, + 3;395,389,394;, + 3;390,389,395;, + 3;396,390,395;, + 3;397,390,396;, + 3;397,391,390;, + 3;398,391,397;, + 3;398,392,391;, + 3;399,392,398;, + 3;399,393,392;, + 3;395,394,400;, + 3;401,395,400;, + 3;396,395,401;, + 3;402,396,401;, + 3;403,396,402;, + 3;403,397,396;, + 3;404,397,403;, + 3;404,398,397;, + 3;405,398,404;, + 3;405,399,398;, + 3;401,400,406;, + 3;407,401,406;, + 3;402,401,407;, + 3;408,402,407;, + 3;409,402,408;, + 3;409,403,402;, + 3;410,403,409;, + 3;410,404,403;, + 3;411,404,410;, + 3;411,405,404;, + 3;407,406,412;, + 3;413,407,412;, + 3;408,407,413;, + 3;414,408,413;, + 3;415,408,414;, + 3;415,409,408;, + 3;416,409,415;, + 3;416,410,409;, + 3;417,410,416;, + 3;417,411,410;, + 3;413,412,418;, + 3;419,413,418;, + 3;414,413,419;, + 3;420,414,419;, + 3;420,415,414;, + 3;420,416,415;, + 3;420,417,416;, + 3;420,421,417;, + 3;421,411,417;, + 3;421,422,411;, + 3;422,405,411;, + 3;419,418,423;, + 3;420,419,423;, + 3;422,424,405;, + 3;425,424,422;, + 3;425,426,424;, + 3;426,427,424;, + 3;424,427,399;, + 3;424,399,405;, + 3;428,425,422;, + 3;429,425,428;, + 3;429,430,425;, + 3;430,426,425;, + 3;430,431,426;, + 3;431,432,426;, + 3;426,432,427;, + 3;428,422,421;, + 3;420,428,421;, + 3;420,429,428;, + 3;420,433,429;, + 3;433,430,429;, + 3;433,434,430;, + 3;434,431,430;, + 3;434,435,431;, + 3;435,436,431;, + 3;431,436,432;, + 3;436,437,432;, + 3;432,437,438;, + 3;432,438,427;, + 3;420,439,433;, + 3;439,434,433;, + 3;439,440,434;, + 3;440,435,434;, + 3;440,441,435;, + 3;441,442,435;, + 3;435,442,436;, + 3;442,443,436;, + 3;436,443,437;, + 3;420,444,439;, + 3;444,440,439;, + 3;444,445,440;, + 3;445,441,440;, + 3;445,446,441;, + 3;446,447,441;, + 3;441,447,442;, + 3;447,448,442;, + 3;442,448,443;, + 3;420,449,444;, + 3;449,445,444;, + 3;449,450,445;, + 3;450,446,445;, + 3;450,451,446;, + 3;451,452,446;, + 3;446,452,447;, + 3;452,453,447;, + 3;447,453,448;, + 3;420,454,449;, + 3;454,450,449;, + 3;454,455,450;, + 3;455,451,450;, + 3;455,456,451;, + 3;456,457,451;, + 3;451,457,452;, + 3;457,458,452;, + 3;452,458,453;, + 3;420,459,454;, + 3;459,455,454;, + 3;459,460,455;, + 3;460,456,455;, + 3;460,461,456;, + 3;461,462,456;, + 3;456,462,457;, + 3;462,463,457;, + 3;457,463,458;, + 3;420,464,459;, + 3;464,460,459;, + 3;464,465,460;, + 3;465,461,460;, + 3;465,466,461;, + 3;466,467,461;, + 3;461,467,462;, + 3;467,468,462;, + 3;462,468,463;, + 3;420,469,464;, + 3;469,465,464;, + 3;469,470,465;, + 3;470,466,465;, + 3;470,471,466;, + 3;471,472,466;, + 3;466,472,467;, + 3;472,473,467;, + 3;467,473,468;, + 3;420,474,469;, + 3;474,470,469;, + 3;474,475,470;, + 3;475,471,470;, + 3;475,476,471;, + 3;476,477,471;, + 3;471,477,472;, + 3;477,478,472;, + 3;472,478,473;, + 3;420,479,474;, + 3;479,475,474;, + 3;479,480,475;, + 3;480,476,475;, + 3;480,481,476;, + 3;481,482,476;, + 3;476,482,477;, + 3;482,483,477;, + 3;477,483,478;, + 3;420,484,479;, + 3;484,480,479;, + 3;484,485,480;, + 3;485,481,480;, + 3;485,486,481;, + 3;486,487,481;, + 3;481,487,482;, + 3;487,488,482;, + 3;482,488,483;, + 3;420,489,484;, + 3;489,485,484;, + 3;489,490,485;, + 3;490,486,485;, + 3;490,491,486;, + 3;491,492,486;, + 3;486,492,487;, + 3;492,493,487;, + 3;487,493,488;, + 3;420,494,489;, + 3;494,490,489;, + 3;494,495,490;, + 3;495,491,490;, + 3;495,496,491;, + 3;496,497,491;, + 3;491,497,492;, + 3;497,498,492;, + 3;492,498,493;, + 3;420,499,494;, + 3;499,495,494;, + 3;499,500,495;, + 3;500,496,495;, + 3;500,501,496;, + 3;501,502,496;, + 3;496,502,497;, + 3;502,503,497;, + 3;497,503,498;, + 3;420,504,499;, + 3;504,500,499;, + 3;504,505,500;, + 3;505,501,500;, + 3;505,506,501;, + 3;506,507,501;, + 3;501,507,502;, + 3;507,508,502;, + 3;502,508,503;, + 3;420,509,504;, + 3;509,505,504;, + 3;509,510,505;, + 3;510,506,505;, + 3;510,511,506;, + 3;511,512,506;, + 3;506,512,507;, + 3;512,513,507;, + 3;507,513,508;, + 3;513,514,508;, + 3;508,514,515;, + 3;508,515,503;, + 3;509,516,510;, + 3;510,516,517;, + 3;510,517,511;, + 3;511,517,518;, + 3;511,518,519;, + 3;511,519,512;, + 3;519,520,512;, + 3;512,520,513;, + 3;520,521,513;, + 3;513,521,514;, + 3;509,522,516;, + 3;522,523,516;, + 3;516,523,524;, + 3;516,524,517;, + 3;517,524,525;, + 3;517,525,518;, + 3;518,525,526;, + 3;518,526,527;, + 3;519,518,527;, + 3;528,522,509;, + 3;528,529,522;, + 3;522,529,523;, + 3;529,530,523;, + 3;523,530,531;, + 3;523,531,524;, + 3;524,531,532;, + 3;524,532,525;, + 3;525,532,533;, + 3;525,533,526;, + 3;528,534,529;, + 3;529,534,530;, + 3;534,535,530;, + 3;530,535,536;, + 3;530,536,531;, + 3;531,536,537;, + 3;531,537,532;, + 3;532,537,538;, + 3;532,538,533;, + 3;528,539,534;, + 3;534,539,535;, + 3;539,540,535;, + 3;535,540,541;, + 3;535,541,536;, + 3;536,541,542;, + 3;536,542,537;, + 3;537,542,543;, + 3;537,543,538;, + 3;528,544,539;, + 3;539,544,540;, + 3;544,545,540;, + 3;540,545,546;, + 3;540,546,541;, + 3;541,546,547;, + 3;541,547,542;, + 3;542,547,548;, + 3;542,548,543;, + 3;528,549,544;, + 3;544,549,545;, + 3;549,550,545;, + 3;545,550,551;, + 3;545,551,546;, + 3;546,551,552;, + 3;546,552,547;, + 3;547,552,553;, + 3;547,553,548;, + 3;528,554,549;, + 3;549,554,550;, + 3;554,555,550;, + 3;550,555,556;, + 3;550,556,551;, + 3;551,556,557;, + 3;551,557,552;, + 3;552,557,558;, + 3;552,558,553;, + 3;528,559,554;, + 3;554,559,555;, + 3;559,560,555;, + 3;555,560,561;, + 3;555,561,556;, + 3;556,561,562;, + 3;556,562,557;, + 3;557,562,563;, + 3;557,563,558;, + 3;528,564,559;, + 3;559,564,560;, + 3;564,565,560;, + 3;560,565,566;, + 3;560,566,561;, + 3;561,566,567;, + 3;561,567,562;, + 3;562,567,568;, + 3;562,568,563;, + 3;528,569,564;, + 3;564,569,565;, + 3;569,570,565;, + 3;565,570,571;, + 3;565,571,566;, + 3;566,571,572;, + 3;566,572,567;, + 3;567,572,573;, + 3;567,573,568;, + 3;528,574,569;, + 3;569,574,570;, + 3;574,575,570;, + 3;570,575,576;, + 3;570,576,571;, + 3;571,576,577;, + 3;571,577,572;, + 3;572,577,578;, + 3;572,578,573;, + 3;528,579,574;, + 3;574,579,575;, + 3;579,580,575;, + 3;575,580,581;, + 3;575,581,576;, + 3;576,581,582;, + 3;576,582,577;, + 3;577,582,583;, + 3;577,583,578;, + 3;528,584,579;, + 3;579,584,580;, + 3;584,585,580;, + 3;580,585,586;, + 3;580,586,581;, + 3;581,586,587;, + 3;581,587,582;, + 3;582,587,588;, + 3;582,588,583;, + 3;528,589,584;, + 3;584,589,585;, + 3;589,590,585;, + 3;585,590,591;, + 3;585,591,586;, + 3;586,591,592;, + 3;586,592,587;, + 3;587,592,593;, + 3;587,593,588;, + 3;528,594,589;, + 3;589,594,590;, + 3;594,595,590;, + 3;590,595,596;, + 3;590,596,591;, + 3;591,596,597;, + 3;591,597,592;, + 3;592,597,598;, + 3;592,598,593;, + 3;528,599,594;, + 3;594,599,595;, + 3;599,600,595;, + 3;595,600,601;, + 3;595,601,596;, + 3;596,601,602;, + 3;596,602,597;, + 3;597,602,603;, + 3;597,603,598;, + 3;528,604,599;, + 3;599,604,600;, + 3;604,605,600;, + 3;600,605,606;, + 3;600,606,601;, + 3;601,606,607;, + 3;601,607,602;, + 3;602,607,608;, + 3;602,608,603;, + 3;528,609,604;, + 3;604,609,605;, + 3;609,610,605;, + 3;605,610,611;, + 3;605,611,606;, + 3;606,611,612;, + 3;606,612,607;, + 3;607,612,613;, + 3;607,613,608;, + 3;528,614,609;, + 3;609,614,610;, + 3;614,615,610;, + 3;610,615,616;, + 3;610,616,611;, + 3;611,616,617;, + 3;611,617,612;, + 3;612,617,618;, + 3;612,618,613;, + 3;528,619,614;, + 3;614,619,615;, + 3;619,620,615;, + 3;615,620,621;, + 3;615,621,616;, + 3;616,621,622;, + 3;616,622,617;, + 3;617,622,623;, + 3;617,623,618;, + 3;528,624,619;, + 3;619,624,620;, + 3;624,625,620;, + 3;620,625,626;, + 3;620,626,621;, + 3;621,626,627;, + 3;621,627,622;, + 3;622,627,628;, + 3;622,628,623;, + 3;528,629,624;, + 3;624,629,625;, + 3;629,630,625;, + 3;625,630,631;, + 3;625,631,626;, + 3;626,631,632;, + 3;626,632,627;, + 3;627,632,633;, + 3;627,633,628;, + 3;528,634,629;, + 3;629,634,630;, + 3;634,635,630;, + 3;630,635,636;, + 3;630,636,631;, + 3;631,636,637;, + 3;631,637,632;, + 3;632,637,638;, + 3;632,638,633;, + 3;528,639,634;, + 3;634,639,635;, + 3;633,638,640;, + 3;633,640,641;, + 3;628,633,641;, + 3;628,641,642;, + 3;623,628,642;, + 3;623,642,643;, + 3;618,623,643;, + 3;641,640,644;, + 3;641,644,645;, + 3;642,641,645;, + 3;642,645,646;, + 3;643,642,646;, + 3;643,646,647;, + 3;648,643,647;, + 3;618,643,648;, + 3;613,618,648;, + 3;613,648,649;, + 3;608,613,649;, + 3;645,644,650;, + 3;645,650,651;, + 3;646,645,651;, + 3;646,651,652;, + 3;647,646,652;, + 3;647,652,653;, + 3;654,647,653;, + 3;648,647,654;, + 3;649,648,654;, + 3;649,654,655;, + 3;656,649,655;, + 3;608,649,656;, + 3;603,608,656;, + 3;651,650,657;, + 3;651,657,658;, + 3;652,651,658;, + 3;652,658,659;, + 3;653,652,659;, + 3;653,659,660;, + 3;661,653,660;, + 3;654,653,661;, + 3;655,654,661;, + 3;655,661,662;, + 3;663,655,662;, + 3;656,655,663;, + 3;658,657,664;, + 3;658,664,665;, + 3;659,658,665;, + 3;659,665,666;, + 3;660,659,666;, + 3;660,666,667;, + 3;668,660,667;, + 3;661,660,668;, + 3;662,661,668;, + 3;662,668,669;, + 3;670,662,669;, + 3;663,662,670;, + 3;665,664,671;, + 3;665,671,672;, + 3;666,665,672;, + 3;666,672,673;, + 3;667,666,673;, + 3;667,673,674;, + 3;675,667,674;, + 3;668,667,675;, + 3;669,668,675;, + 3;669,675,676;, + 3;677,669,676;, + 3;670,669,677;, + 3;672,671,678;, + 3;672,678,679;, + 3;673,672,679;, + 3;673,679,680;, + 3;674,673,680;, + 3;674,680,681;, + 3;682,674,681;, + 3;675,674,682;, + 3;676,675,682;, + 3;676,682,683;, + 3;684,676,683;, + 3;677,676,684;, + 3;679,678,685;, + 3;679,685,686;, + 3;680,679,686;, + 3;680,686,687;, + 3;681,680,687;, + 3;681,687,688;, + 3;689,681,688;, + 3;682,681,689;, + 3;683,682,689;, + 3;683,689,690;, + 3;691,683,690;, + 3;684,683,691;, + 3;686,685,692;, + 3;686,692,693;, + 3;687,686,693;, + 3;687,693,694;, + 3;688,687,694;, + 3;688,694,695;, + 3;696,688,695;, + 3;689,688,696;, + 3;690,689,696;, + 3;690,696,697;, + 3;698,690,697;, + 3;691,690,698;, + 3;693,692,699;, + 3;693,699,700;, + 3;694,693,700;, + 3;694,700,701;, + 3;695,694,701;, + 3;695,701,702;, + 3;703,695,702;, + 3;696,695,703;, + 3;697,696,703;, + 3;697,703,704;, + 3;705,697,704;, + 3;698,697,705;, + 3;700,699,706;, + 3;700,706,707;, + 3;701,700,707;, + 3;701,707,708;, + 3;702,701,708;, + 3;702,708,709;, + 3;710,702,709;, + 3;703,702,710;, + 3;704,703,710;, + 3;704,710,711;, + 3;712,704,711;, + 3;705,704,712;, + 3;707,706,713;, + 3;707,713,714;, + 3;708,707,714;, + 3;708,714,715;, + 3;709,708,715;, + 3;709,715,716;, + 3;717,709,716;, + 3;710,709,717;, + 3;711,710,717;, + 3;711,717,718;, + 3;719,711,718;, + 3;712,711,719;, + 3;714,713,720;, + 3;714,720,721;, + 3;715,714,721;, + 3;715,721,722;, + 3;716,715,722;, + 3;716,722,723;, + 3;724,716,723;, + 3;717,716,724;, + 3;718,717,724;, + 3;718,724,725;, + 3;726,718,725;, + 3;719,718,726;, + 3;721,720,727;, + 3;721,727,728;, + 3;722,721,728;, + 3;722,728,729;, + 3;723,722,729;, + 3;723,729,730;, + 3;731,723,730;, + 3;724,723,731;, + 3;725,724,731;, + 3;725,731,732;, + 3;733,725,732;, + 3;726,725,733;, + 3;728,727,734;, + 3;728,734,735;, + 3;729,728,735;, + 3;729,735,736;, + 3;730,729,736;, + 3;730,736,737;, + 3;738,730,737;, + 3;731,730,738;, + 3;732,731,738;, + 3;732,738,739;, + 3;740,732,739;, + 3;733,732,740;, + 3;735,734,741;, + 3;735,741,742;, + 3;736,735,742;, + 3;736,742,743;, + 3;737,736,743;, + 3;737,743,744;, + 3;745,737,744;, + 3;738,737,745;, + 3;739,738,745;, + 3;739,745,746;, + 3;747,739,746;, + 3;740,739,747;, + 3;742,741,748;, + 3;742,748,749;, + 3;743,742,749;, + 3;743,749,750;, + 3;744,743,750;, + 3;744,750,751;, + 3;752,744,751;, + 3;745,744,752;, + 3;746,745,752;, + 3;746,752,753;, + 3;754,746,753;, + 3;747,746,754;, + 3;749,748,755;, + 3;749,755,756;, + 3;750,749,756;, + 3;750,756,757;, + 3;751,750,757;, + 3;751,757,758;, + 3;759,751,758;, + 3;752,751,759;, + 3;753,752,759;, + 3;753,759,760;, + 3;761,753,760;, + 3;754,753,761;, + 3;756,755,762;, + 3;756,762,763;, + 3;757,756,763;, + 3;757,763,764;, + 3;758,757,764;, + 3;758,764,765;, + 3;766,758,765;, + 3;759,758,766;, + 3;760,759,766;, + 3;760,766,767;, + 3;768,760,767;, + 3;761,760,768;, + 3;763,762,769;, + 3;763,769,770;, + 3;764,763,770;, + 3;764,770,771;, + 3;765,764,771;, + 3;765,771,772;, + 3;773,765,772;, + 3;766,765,773;, + 3;767,766,773;, + 3;767,773,774;, + 3;775,767,774;, + 3;768,767,775;, + 3;770,769,776;, + 3;770,776,777;, + 3;771,770,777;, + 3;771,777,778;, + 3;772,771,778;, + 3;772,778,779;, + 3;780,772,779;, + 3;773,772,780;, + 3;774,773,780;, + 3;774,780,781;, + 3;782,774,781;, + 3;775,774,782;, + 3;777,776,783;, + 3;777,783,784;, + 3;778,777,784;, + 3;778,784,785;, + 3;779,778,785;, + 3;779,785,786;, + 3;787,779,786;, + 3;780,779,787;, + 3;781,780,787;, + 3;781,787,788;, + 3;789,781,788;, + 3;782,781,789;, + 3;784,783,790;, + 3;784,790,791;, + 3;785,784,791;, + 3;785,791,792;, + 3;786,785,792;, + 3;786,792,793;, + 3;794,786,793;, + 3;787,786,794;, + 3;788,787,794;, + 3;788,794,795;, + 3;796,788,795;, + 3;789,788,796;, + 3;791,790,797;, + 3;791,797,798;, + 3;792,791,798;, + 3;792,798,799;, + 3;793,792,799;, + 3;793,799,800;, + 3;801,793,800;, + 3;794,793,801;, + 3;795,794,801;, + 3;795,801,802;, + 3;803,795,802;, + 3;796,795,803;, + 3;798,797,804;, + 3;798,804,805;, + 3;799,798,805;, + 3;799,805,806;, + 3;800,799,806;, + 3;800,806,807;, + 3;808,800,807;, + 3;801,800,808;, + 3;802,801,808;, + 3;802,808,809;, + 3;810,802,809;, + 3;803,802,810;, + 3;805,804,811;, + 3;805,811,812;, + 3;806,805,812;, + 3;806,812,813;, + 3;807,806,813;, + 3;807,813,814;, + 3;815,807,814;, + 3;808,807,815;, + 3;809,808,815;, + 3;809,815,816;, + 3;817,809,816;, + 3;810,809,817;, + 3;812,811,818;, + 3;812,818,819;, + 3;813,812,819;, + 3;813,819,820;, + 3;814,813,820;, + 3;814,820,821;, + 3;822,814,821;, + 3;815,814,822;, + 3;816,815,822;, + 3;816,822,823;, + 3;824,816,823;, + 3;817,816,824;, + 3;819,818,825;, + 3;819,825,826;, + 3;820,819,826;, + 3;820,826,827;, + 3;821,820,827;, + 3;821,827,828;, + 3;829,821,828;, + 3;822,821,829;, + 3;823,822,829;, + 3;823,829,830;, + 3;831,823,830;, + 3;824,823,831;, + 3;826,825,832;, + 3;826,832,833;, + 3;827,826,833;, + 3;827,833,834;, + 3;828,827,834;, + 3;828,834,835;, + 3;836,828,835;, + 3;829,828,836;, + 3;830,829,836;, + 3;830,836,837;, + 3;838,830,837;, + 3;831,830,838;, + 3;833,832,839;, + 3;833,839,840;, + 3;834,833,840;, + 3;834,840,841;, + 3;835,834,841;, + 3;835,841,842;, + 3;843,835,842;, + 3;836,835,843;, + 3;837,836,843;, + 3;837,843,844;, + 3;845,837,844;, + 3;838,837,845;, + 3;840,839,846;, + 3;840,846,847;, + 3;841,840,847;, + 3;841,847,848;, + 3;842,841,848;, + 3;842,848,849;, + 3;850,842,849;, + 3;843,842,850;, + 3;844,843,850;, + 3;844,850,851;, + 3;852,844,851;, + 3;845,844,852;, + 3;847,846,853;, + 3;847,853,854;, + 3;848,847,854;, + 3;848,854,855;, + 3;849,848,855;, + 3;849,855,856;, + 3;857,849,856;, + 3;850,849,857;, + 3;851,850,857;, + 3;851,857,858;, + 3;859,851,858;, + 3;852,851,859;, + 3;854,853,860;, + 3;854,860,861;, + 3;855,854,861;, + 3;855,861,862;, + 3;856,855,862;, + 3;856,862,863;, + 3;864,856,863;, + 3;857,856,864;, + 3;858,857,864;, + 3;858,864,865;, + 3;866,858,865;, + 3;859,858,866;, + 3;861,860,867;, + 3;861,867,868;, + 3;862,861,868;, + 3;862,868,869;, + 3;863,862,869;, + 3;863,869,870;, + 3;871,863,870;, + 3;864,863,871;, + 3;865,864,871;, + 3;865,871,872;, + 3;873,865,872;, + 3;866,865,873;, + 3;868,867,874;, + 3;868,874,875;, + 3;869,868,875;, + 3;869,875,876;, + 3;870,869,876;, + 3;870,876,877;, + 3;878,870,877;, + 3;871,870,878;, + 3;872,871,878;, + 3;872,878,879;, + 3;880,872,879;, + 3;873,872,880;, + 3;875,874,881;, + 3;875,881,882;, + 3;876,875,882;, + 3;876,882,883;, + 3;877,876,883;, + 3;877,883,884;, + 3;885,877,884;, + 3;878,877,885;, + 3;879,878,885;, + 3;879,885,886;, + 3;887,879,886;, + 3;880,879,887;, + 3;882,881,888;, + 3;882,888,889;, + 3;883,882,889;, + 3;883,889,890;, + 3;884,883,890;, + 3;884,890,891;, + 3;892,884,891;, + 3;885,884,892;, + 3;886,885,892;, + 3;886,892,893;, + 3;894,886,893;, + 3;887,886,894;, + 3;889,888,895;, + 3;889,895,896;, + 3;890,889,896;, + 3;890,896,897;, + 3;891,890,897;, + 3;891,897,898;, + 3;899,891,898;, + 3;892,891,899;, + 3;893,892,899;, + 3;893,899,900;, + 3;901,893,900;, + 3;894,893,901;, + 3;896,895,902;, + 3;896,902,903;, + 3;897,896,903;, + 3;897,903,904;, + 3;898,897,904;, + 3;898,904,905;, + 3;906,898,905;, + 3;899,898,906;, + 3;900,899,906;, + 3;900,906,907;, + 3;908,900,907;, + 3;901,900,908;, + 3;903,902,909;, + 3;903,909,910;, + 3;904,903,910;, + 3;904,910,911;, + 3;905,904,911;, + 3;905,911,912;, + 3;913,905,912;, + 3;906,905,913;, + 3;907,906,913;, + 3;907,913,914;, + 3;915,907,914;, + 3;908,907,915;, + 3;910,909,916;, + 3;910,916,917;, + 3;911,910,917;, + 3;911,917,918;, + 3;912,911,918;, + 3;912,918,919;, + 3;920,912,919;, + 3;913,912,920;, + 3;914,913,920;, + 3;914,920,921;, + 3;922,914,921;, + 3;915,914,922;, + 3;917,916,923;, + 3;917,923,924;, + 3;918,917,924;, + 3;918,924,925;, + 3;919,918,925;, + 3;919,925,926;, + 3;927,919,926;, + 3;920,919,927;, + 3;921,920,927;, + 3;921,927,928;, + 3;929,921,928;, + 3;922,921,929;, + 3;924,923,6;, + 3;925,924,6;, + 3;926,925,6;, + 3;930,926,6;, + 3;927,926,930;, + 3;928,927,930;, + 3;928,930,931;, + 3;932,928,931;, + 3;929,928,932;, + 3;933,929,932;, + 3;934,929,933;, + 3;934,922,929;, + 3;931,930,6;, + 3;935,931,6;, + 3;932,931,935;, + 3;936,932,935;, + 3;933,932,936;, + 3;937,933,936;, + 3;938,933,937;, + 3;938,934,933;, + 3;939,934,938;, + 3;939,940,934;, + 3;940,922,934;, + 3;940,915,922;, + 3;941,935,6;, + 3;936,935,941;, + 3;942,936,941;, + 3;937,936,942;, + 3;943,937,942;, + 3;944,937,943;, + 3;944,938,937;, + 3;945,938,944;, + 3;945,939,938;, + 3;946,941,6;, + 3;942,941,946;, + 3;947,942,946;, + 3;943,942,947;, + 3;948,943,947;, + 3;949,943,948;, + 3;949,944,943;, + 3;950,944,949;, + 3;950,945,944;, + 3;951,946,6;, + 3;947,946,951;, + 3;952,947,951;, + 3;948,947,952;, + 3;953,948,952;, + 3;954,948,953;, + 3;954,949,948;, + 3;955,949,954;, + 3;955,950,949;, + 3;956,951,6;, + 3;952,951,956;, + 3;957,952,956;, + 3;953,952,957;, + 3;958,953,957;, + 3;959,953,958;, + 3;959,954,953;, + 3;960,954,959;, + 3;960,955,954;, + 3;961,956,6;, + 3;957,956,961;, + 3;962,957,961;, + 3;958,957,962;, + 3;963,958,962;, + 3;964,958,963;, + 3;964,959,958;, + 3;965,959,964;, + 3;965,960,959;, + 3;966,961,6;, + 3;962,961,966;, + 3;967,962,966;, + 3;963,962,967;, + 3;968,963,967;, + 3;969,963,968;, + 3;969,964,963;, + 3;970,964,969;, + 3;970,965,964;, + 3;971,966,6;, + 3;967,966,971;, + 3;972,967,971;, + 3;968,967,972;, + 3;973,968,972;, + 3;974,968,973;, + 3;974,969,968;, + 3;975,969,974;, + 3;975,970,969;, + 3;976,971,6;, + 3;972,971,976;, + 3;977,972,976;, + 3;973,972,977;, + 3;978,973,977;, + 3;979,973,978;, + 3;979,974,973;, + 3;980,974,979;, + 3;980,975,974;, + 3;981,976,6;, + 3;977,976,981;, + 3;982,977,981;, + 3;978,977,982;, + 3;983,978,982;, + 3;984,978,983;, + 3;984,979,978;, + 3;985,979,984;, + 3;985,980,979;, + 3;986,981,6;, + 3;982,981,986;, + 3;987,982,986;, + 3;983,982,987;, + 3;988,983,987;, + 3;989,983,988;, + 3;989,984,983;, + 3;990,984,989;, + 3;990,985,984;, + 3;991,986,6;, + 3;987,986,991;, + 3;12,987,991;, + 3;988,987,12;, + 3;11,988,12;, + 3;992,988,11;, + 3;992,989,988;, + 3;993,989,992;, + 3;993,990,989;, + 3;5,991,6;, + 3;12,991,5;, + 3;18,992,11;, + 3;994,992,18;, + 3;994,993,992;, + 3;995,993,994;, + 3;995,996,993;, + 3;996,990,993;, + 3;996,997,990;, + 3;997,985,990;, + 3;998,994,18;, + 3;999,994,998;, + 3;999,995,994;, + 3;1000,995,999;, + 3;1000,1001,995;, + 3;1001,996,995;, + 3;1001,1002,996;, + 3;1002,997,996;, + 3;998,18,17;, + 3;24,998,17;, + 3;1003,998,24;, + 3;1003,999,998;, + 3;1004,999,1003;, + 3;1004,1000,999;, + 3;1005,1000,1004;, + 3;1005,1006,1000;, + 3;1006,1001,1000;, + 3;1006,1007,1001;, + 3;1007,1002,1001;, + 3;1008,1003,24;, + 3;1009,1003,1008;, + 3;1009,1004,1003;, + 3;1010,1004,1009;, + 3;1010,1005,1004;, + 3;1011,1005,1010;, + 3;1011,1012,1005;, + 3;1012,1006,1005;, + 3;1012,1013,1006;, + 3;1013,1007,1006;, + 3;1008,24,23;, + 3;35,1008,23;, + 3;1014,1008,35;, + 3;1014,1009,1008;, + 3;1015,1009,1014;, + 3;1015,1010,1009;, + 3;1016,1010,1015;, + 3;1016,1011,1010;, + 3;1017,1011,1016;, + 3;1017,1018,1011;, + 3;1018,1012,1011;, + 3;1018,1019,1012;, + 3;1019,1013,1012;, + 3;1014,35,41;, + 3;1014,41,1020;, + 3;1015,1014,1020;, + 3;1015,1020,1021;, + 3;1016,1015,1021;, + 3;1016,1021,1022;, + 3;1017,1016,1022;, + 3;1017,1022,1023;, + 3;1024,1017,1023;, + 3;1024,1018,1017;, + 3;1024,1025,1018;, + 3;1025,1019,1018;, + 3;1020,41,47;, + 3;1020,47,1026;, + 3;1021,1020,1026;, + 3;1021,1026,1027;, + 3;1022,1021,1027;, + 3;1022,1027,1028;, + 3;1023,1022,1028;, + 3;1023,1028,1029;, + 3;1030,1023,1029;, + 3;1024,1023,1030;, + 3;1031,1024,1030;, + 3;1031,1025,1024;, + 3;1026,47,53;, + 3;1026,53,1032;, + 3;1027,1026,1032;, + 3;1027,1032,1033;, + 3;1028,1027,1033;, + 3;1028,1033,1034;, + 3;1029,1028,1034;, + 3;1029,1034,1035;, + 3;1036,1029,1035;, + 3;1030,1029,1036;, + 3;1037,1030,1036;, + 3;1031,1030,1037;, + 3;1032,53,59;, + 3;1032,59,1038;, + 3;1033,1032,1038;, + 3;1033,1038,1039;, + 3;1034,1033,1039;, + 3;1034,1039,1040;, + 3;1035,1034,1040;, + 3;1035,1040,1041;, + 3;1042,1035,1041;, + 3;1036,1035,1042;, + 3;1043,1036,1042;, + 3;1037,1036,1043;, + 3;1038,59,65;, + 3;1038,65,1044;, + 3;1039,1038,1044;, + 3;1039,1044,1045;, + 3;1040,1039,1045;, + 3;1040,1045,1046;, + 3;1041,1040,1046;, + 3;1041,1046,1047;, + 3;1048,1041,1047;, + 3;1042,1041,1048;, + 3;1049,1042,1048;, + 3;1043,1042,1049;, + 3;1044,65,71;, + 3;1044,71,1050;, + 3;1045,1044,1050;, + 3;1045,1050,1051;, + 3;1046,1045,1051;, + 3;1046,1051,1052;, + 3;1047,1046,1052;, + 3;1047,1052,1053;, + 3;1054,1047,1053;, + 3;1048,1047,1054;, + 3;1055,1048,1054;, + 3;1049,1048,1055;, + 3;1050,71,77;, + 3;1050,77,1056;, + 3;1051,1050,1056;, + 3;1051,1056,1057;, + 3;1052,1051,1057;, + 3;1052,1057,1058;, + 3;1053,1052,1058;, + 3;1053,1058,1059;, + 3;1060,1053,1059;, + 3;1054,1053,1060;, + 3;1061,1054,1060;, + 3;1055,1054,1061;, + 3;1056,77,83;, + 3;1056,83,1062;, + 3;1057,1056,1062;, + 3;1057,1062,1063;, + 3;1058,1057,1063;, + 3;1058,1063,1064;, + 3;1059,1058,1064;, + 3;1059,1064,1065;, + 3;1066,1059,1065;, + 3;1060,1059,1066;, + 3;1067,1060,1066;, + 3;1061,1060,1067;, + 3;1062,83,89;, + 3;1062,89,1068;, + 3;1063,1062,1068;, + 3;1063,1068,1069;, + 3;1064,1063,1069;, + 3;1064,1069,1070;, + 3;1065,1064,1070;, + 3;1065,1070,1071;, + 3;1072,1065,1071;, + 3;1066,1065,1072;, + 3;1073,1066,1072;, + 3;1067,1066,1073;, + 3;1068,89,95;, + 3;1068,95,1074;, + 3;1069,1068,1074;, + 3;1069,1074,1075;, + 3;1070,1069,1075;, + 3;1070,1075,1076;, + 3;1071,1070,1076;, + 3;1071,1076,1077;, + 3;1078,1071,1077;, + 3;1072,1071,1078;, + 3;1079,1072,1078;, + 3;1073,1072,1079;, + 3;1074,95,101;, + 3;1074,101,1080;, + 3;1075,1074,1080;, + 3;1075,1080,1081;, + 3;1076,1075,1081;, + 3;1076,1081,1082;, + 3;1077,1076,1082;, + 3;1077,1082,1083;, + 3;1084,1077,1083;, + 3;1078,1077,1084;, + 3;1085,1078,1084;, + 3;1079,1078,1085;, + 3;1080,101,107;, + 3;1080,107,1086;, + 3;1081,1080,1086;, + 3;1081,1086,1087;, + 3;1082,1081,1087;, + 3;1082,1087,1088;, + 3;1083,1082,1088;, + 3;1083,1088,1089;, + 3;1090,1083,1089;, + 3;1084,1083,1090;, + 3;1091,1084,1090;, + 3;1085,1084,1091;, + 3;1086,107,113;, + 3;1086,113,1092;, + 3;1087,1086,1092;, + 3;1087,1092,1093;, + 3;1088,1087,1093;, + 3;1088,1093,1094;, + 3;1089,1088,1094;, + 3;1089,1094,1095;, + 3;1096,1089,1095;, + 3;1090,1089,1096;, + 3;1097,1090,1096;, + 3;1091,1090,1097;, + 3;1092,113,119;, + 3;1092,119,1098;, + 3;1093,1092,1098;, + 3;1093,1098,1099;, + 3;1094,1093,1099;, + 3;1094,1099,1100;, + 3;1095,1094,1100;, + 3;1095,1100,1101;, + 3;1102,1095,1101;, + 3;1096,1095,1102;, + 3;1103,1096,1102;, + 3;1097,1096,1103;, + 3;1098,119,125;, + 3;1098,125,1104;, + 3;1099,1098,1104;, + 3;1099,1104,1105;, + 3;1100,1099,1105;, + 3;1100,1105,1106;, + 3;1101,1100,1106;, + 3;1101,1106,1107;, + 3;1108,1101,1107;, + 3;1102,1101,1108;, + 3;1109,1102,1108;, + 3;1103,1102,1109;, + 3;1104,125,131;, + 3;1104,131,1110;, + 3;1105,1104,1110;, + 3;1105,1110,1111;, + 3;1106,1105,1111;, + 3;1106,1111,1112;, + 3;1107,1106,1112;, + 3;1107,1112,1113;, + 3;1114,1107,1113;, + 3;1108,1107,1114;, + 3;1115,1108,1114;, + 3;1109,1108,1115;, + 3;1110,131,137;, + 3;1110,137,1116;, + 3;1111,1110,1116;, + 3;1111,1116,1117;, + 3;1112,1111,1117;, + 3;1112,1117,1118;, + 3;1113,1112,1118;, + 3;1113,1118,1119;, + 3;1120,1113,1119;, + 3;1114,1113,1120;, + 3;1121,1114,1120;, + 3;1115,1114,1121;, + 3;1116,137,143;, + 3;1116,143,1122;, + 3;1117,1116,1122;, + 3;1117,1122,1123;, + 3;1118,1117,1123;, + 3;1118,1123,1124;, + 3;1119,1118,1124;, + 3;1119,1124,1125;, + 3;1126,1119,1125;, + 3;1120,1119,1126;, + 3;1127,1120,1126;, + 3;1121,1120,1127;, + 3;1122,143,149;, + 3;1122,149,183;, + 3;1123,1122,183;, + 3;1123,183,182;, + 3;1124,1123,182;, + 3;1124,182,189;, + 3;1125,1124,189;, + 3;1125,189,195;, + 3;1128,1125,195;, + 3;1126,1125,1128;, + 3;1129,1126,1128;, + 3;1127,1126,1129;, + 3;1130,1127,1129;, + 3;1131,1127,1130;, + 3;1131,1121,1127;, + 3;1132,1121,1131;, + 3;1132,1115,1121;, + 3;1128,195,201;, + 3;1133,1128,201;, + 3;1129,1128,1133;, + 3;1134,1129,1133;, + 3;1130,1129,1134;, + 3;1135,1130,1134;, + 3;1136,1130,1135;, + 3;1136,1131,1130;, + 3;1137,1131,1136;, + 3;1137,1132,1131;, + 3;1133,201,207;, + 3;1138,1133,207;, + 3;1134,1133,1138;, + 3;1139,1134,1138;, + 3;1135,1134,1139;, + 3;1140,1135,1139;, + 3;1141,1135,1140;, + 3;1141,1136,1135;, + 3;1142,1136,1141;, + 3;1142,1137,1136;, + 3;1138,207,213;, + 3;1143,1138,213;, + 3;1139,1138,1143;, + 3;1144,1139,1143;, + 3;1140,1139,1144;, + 3;1145,1140,1144;, + 3;1146,1140,1145;, + 3;1146,1141,1140;, + 3;1147,1141,1146;, + 3;1147,1142,1141;, + 3;1143,213,219;, + 3;1148,1143,219;, + 3;1144,1143,1148;, + 3;1149,1144,1148;, + 3;1145,1144,1149;, + 3;1150,1145,1149;, + 3;1151,1145,1150;, + 3;1151,1146,1145;, + 3;1152,1146,1151;, + 3;1152,1147,1146;, + 3;1148,219,225;, + 3;1153,1148,225;, + 3;1149,1148,1153;, + 3;1154,1149,1153;, + 3;1150,1149,1154;, + 3;1155,1150,1154;, + 3;1156,1150,1155;, + 3;1156,1151,1150;, + 3;1157,1151,1156;, + 3;1157,1152,1151;, + 3;1153,225,231;, + 3;1158,1153,231;, + 3;1154,1153,1158;, + 3;1159,1154,1158;, + 3;1155,1154,1159;, + 3;1160,1155,1159;, + 3;1161,1155,1160;, + 3;1161,1156,1155;, + 3;1162,1156,1161;, + 3;1162,1157,1156;, + 3;1158,231,237;, + 3;1163,1158,237;, + 3;1159,1158,1163;, + 3;1164,1159,1163;, + 3;1160,1159,1164;, + 3;1165,1160,1164;, + 3;1166,1160,1165;, + 3;1166,1161,1160;, + 3;1167,1161,1166;, + 3;1167,1162,1161;, + 3;1163,237,243;, + 3;1168,1163,243;, + 3;1164,1163,1168;, + 3;1169,1164,1168;, + 3;1165,1164,1169;, + 3;1170,1165,1169;, + 3;1171,1165,1170;, + 3;1171,1166,1165;, + 3;1172,1166,1171;, + 3;1172,1167,1166;, + 3;1168,243,249;, + 3;1173,1168,249;, + 3;1169,1168,1173;, + 3;1174,1169,1173;, + 3;1170,1169,1174;, + 3;1175,1170,1174;, + 3;1176,1170,1175;, + 3;1176,1171,1170;, + 3;1177,1171,1176;, + 3;1177,1172,1171;, + 3;1173,249,255;, + 3;1178,1173,255;, + 3;1174,1173,1178;, + 3;1179,1174,1178;, + 3;1175,1174,1179;, + 3;1180,1175,1179;, + 3;1181,1175,1180;, + 3;1181,1176,1175;, + 3;1182,1176,1181;, + 3;1182,1177,1176;, + 3;1178,255,261;, + 3;1183,1178,261;, + 3;1179,1178,1183;, + 3;1184,1179,1183;, + 3;1180,1179,1184;, + 3;1185,1180,1184;, + 3;1186,1180,1185;, + 3;1186,1181,1180;, + 3;1187,1181,1186;, + 3;1187,1182,1181;, + 3;1183,261,267;, + 3;1188,1183,267;, + 3;1184,1183,1188;, + 3;1189,1184,1188;, + 3;1185,1184,1189;, + 3;1190,1185,1189;, + 3;1191,1185,1190;, + 3;1191,1186,1185;, + 3;1192,1186,1191;, + 3;1192,1187,1186;, + 3;1188,267,273;, + 3;1193,1188,273;, + 3;1189,1188,1193;, + 3;1194,1189,1193;, + 3;1190,1189,1194;, + 3;1195,1190,1194;, + 3;1196,1190,1195;, + 3;1196,1191,1190;, + 3;1197,1191,1196;, + 3;1197,1192,1191;, + 3;1193,273,279;, + 3;1198,1193,279;, + 3;1194,1193,1198;, + 3;1199,1194,1198;, + 3;1195,1194,1199;, + 3;1200,1195,1199;, + 3;1201,1195,1200;, + 3;1201,1196,1195;, + 3;1202,1196,1201;, + 3;1202,1197,1196;, + 3;1198,279,285;, + 3;1203,1198,285;, + 3;1199,1198,1203;, + 3;1204,1199,1203;, + 3;1200,1199,1204;, + 3;1205,1200,1204;, + 3;1206,1200,1205;, + 3;1206,1201,1200;, + 3;1207,1201,1206;, + 3;1207,1202,1201;, + 3;1203,285,291;, + 3;1208,1203,291;, + 3;1204,1203,1208;, + 3;1209,1204,1208;, + 3;1205,1204,1209;, + 3;1210,1205,1209;, + 3;1211,1205,1210;, + 3;1211,1206,1205;, + 3;1212,1206,1211;, + 3;1212,1207,1206;, + 3;1208,291,297;, + 3;1213,1208,297;, + 3;1209,1208,1213;, + 3;1214,1209,1213;, + 3;1210,1209,1214;, + 3;1215,1210,1214;, + 3;1216,1210,1215;, + 3;1216,1211,1210;, + 3;1217,1211,1216;, + 3;1217,1212,1211;, + 3;1213,297,303;, + 3;1218,1213,303;, + 3;1214,1213,1218;, + 3;1219,1214,1218;, + 3;1215,1214,1219;, + 3;1220,1215,1219;, + 3;1221,1215,1220;, + 3;1221,1216,1215;, + 3;1222,1216,1221;, + 3;1222,1217,1216;, + 3;1218,303,309;, + 3;1223,1218,309;, + 3;1219,1218,1223;, + 3;1224,1219,1223;, + 3;1220,1219,1224;, + 3;1225,1220,1224;, + 3;1226,1220,1225;, + 3;1226,1221,1220;, + 3;1227,1221,1226;, + 3;1227,1222,1221;, + 3;1223,309,315;, + 3;1228,1223,315;, + 3;1224,1223,1228;, + 3;1229,1224,1228;, + 3;1225,1224,1229;, + 3;1230,1225,1229;, + 3;1231,1225,1230;, + 3;1231,1226,1225;, + 3;1232,1226,1231;, + 3;1232,1227,1226;, + 3;1228,315,321;, + 3;1233,1228,321;, + 3;1229,1228,1233;, + 3;1234,1229,1233;, + 3;1230,1229,1234;, + 3;1235,1230,1234;, + 3;1236,1230,1235;, + 3;1236,1231,1230;, + 3;1237,1231,1236;, + 3;1237,1232,1231;, + 3;1233,321,327;, + 3;1238,1233,327;, + 3;1234,1233,1238;, + 3;1239,1234,1238;, + 3;1235,1234,1239;, + 3;1240,1235,1239;, + 3;1241,1235,1240;, + 3;1241,1236,1235;, + 3;1242,1236,1241;, + 3;1242,1237,1236;, + 3;1238,327,333;, + 3;1243,1238,333;, + 3;1239,1238,1243;, + 3;1244,1239,1243;, + 3;1240,1239,1244;, + 3;1245,1240,1244;, + 3;1246,1240,1245;, + 3;1246,1241,1240;, + 3;1247,1241,1246;, + 3;1247,1242,1241;, + 3;1243,333,339;, + 3;1248,1243,339;, + 3;1244,1243,1248;, + 3;1249,1244,1248;, + 3;1245,1244,1249;, + 3;1250,1245,1249;, + 3;1251,1245,1250;, + 3;1251,1246,1245;, + 3;1252,1246,1251;, + 3;1252,1247,1246;, + 3;1248,339,345;, + 3;1253,1248,345;, + 3;1249,1248,1253;, + 3;1254,1249,1253;, + 3;1250,1249,1254;, + 3;1255,1250,1254;, + 3;1256,1250,1255;, + 3;1256,1251,1250;, + 3;1257,1251,1256;, + 3;1257,1252,1251;, + 3;1253,345,351;, + 3;1258,1253,351;, + 3;1254,1253,1258;, + 3;1259,1254,1258;, + 3;1255,1254,1259;, + 3;1260,1255,1259;, + 3;1261,1255,1260;, + 3;1261,1256,1255;, + 3;1262,1256,1261;, + 3;1262,1257,1256;, + 3;1258,351,357;, + 3;1263,1258,357;, + 3;1259,1258,1263;, + 3;1264,1259,1263;, + 3;1260,1259,1264;, + 3;1265,1260,1264;, + 3;1266,1260,1265;, + 3;1266,1261,1260;, + 3;1267,1261,1266;, + 3;1267,1262,1261;, + 3;1263,357,363;, + 3;1268,1263,363;, + 3;1264,1263,1268;, + 3;1269,1264,1268;, + 3;1265,1264,1269;, + 3;1270,1265,1269;, + 3;1271,1265,1270;, + 3;1271,1266,1265;, + 3;1272,1266,1271;, + 3;1272,1267,1266;, + 3;1268,363,369;, + 3;1273,1268,369;, + 3;1269,1268,1273;, + 3;1274,1269,1273;, + 3;1270,1269,1274;, + 3;1275,1270,1274;, + 3;1276,1270,1275;, + 3;1276,1271,1270;, + 3;1277,1271,1276;, + 3;1277,1272,1271;, + 3;1273,369,375;, + 3;1278,1273,375;, + 3;1274,1273,1278;, + 3;1279,1274,1278;, + 3;1275,1274,1279;, + 3;443,1275,1279;, + 3;448,1275,443;, + 3;448,1276,1275;, + 3;453,1276,448;, + 3;453,1277,1276;, + 3;1278,375,381;, + 3;1280,1278,381;, + 3;1279,1278,1280;, + 3;437,1279,1280;, + 3;443,1279,437;, + 3;1280,381,387;, + 3;438,1280,387;, + 3;437,1280,438;, + 3;438,387,393;, + 3;427,438,393;, + 3;427,393,399;, + 3;458,1277,453;, + 3;458,1281,1277;, + 3;1281,1272,1277;, + 3;1281,1282,1272;, + 3;1282,1267,1272;, + 3;1282,1283,1267;, + 3;1283,1262,1267;, + 3;463,1281,458;, + 3;463,1284,1281;, + 3;1284,1282,1281;, + 3;1284,1285,1282;, + 3;1285,1283,1282;, + 3;1285,1286,1283;, + 3;1286,1287,1283;, + 3;1283,1287,1262;, + 3;1287,1257,1262;, + 3;1287,1288,1257;, + 3;1288,1252,1257;, + 3;468,1284,463;, + 3;468,1289,1284;, + 3;1289,1285,1284;, + 3;1289,1290,1285;, + 3;1290,1286,1285;, + 3;1290,1291,1286;, + 3;1291,1292,1286;, + 3;1286,1292,1287;, + 3;1292,1288,1287;, + 3;1292,1293,1288;, + 3;1293,1294,1288;, + 3;1288,1294,1252;, + 3;1294,1247,1252;, + 3;473,1289,468;, + 3;473,1295,1289;, + 3;1295,1290,1289;, + 3;1295,1296,1290;, + 3;1296,1291,1290;, + 3;1296,1297,1291;, + 3;1297,1298,1291;, + 3;1291,1298,1292;, + 3;1298,1293,1292;, + 3;1298,1299,1293;, + 3;1299,1300,1293;, + 3;1293,1300,1294;, + 3;478,1295,473;, + 3;478,1301,1295;, + 3;1301,1296,1295;, + 3;1301,1302,1296;, + 3;1302,1297,1296;, + 3;1302,1303,1297;, + 3;1303,1304,1297;, + 3;1297,1304,1298;, + 3;1304,1299,1298;, + 3;1304,1305,1299;, + 3;1305,1306,1299;, + 3;1299,1306,1300;, + 3;483,1301,478;, + 3;483,1307,1301;, + 3;1307,1302,1301;, + 3;1307,1308,1302;, + 3;1308,1303,1302;, + 3;1308,1309,1303;, + 3;1309,1310,1303;, + 3;1303,1310,1304;, + 3;1310,1305,1304;, + 3;1310,1311,1305;, + 3;1311,1312,1305;, + 3;1305,1312,1306;, + 3;488,1307,483;, + 3;488,1313,1307;, + 3;1313,1308,1307;, + 3;1313,1314,1308;, + 3;1314,1309,1308;, + 3;1314,1315,1309;, + 3;1315,1316,1309;, + 3;1309,1316,1310;, + 3;1316,1311,1310;, + 3;1316,1317,1311;, + 3;1317,1318,1311;, + 3;1311,1318,1312;, + 3;493,1313,488;, + 3;493,1319,1313;, + 3;1319,1314,1313;, + 3;1319,1320,1314;, + 3;1320,1315,1314;, + 3;1320,1321,1315;, + 3;1321,1322,1315;, + 3;1315,1322,1316;, + 3;1322,1317,1316;, + 3;1322,1323,1317;, + 3;1323,1324,1317;, + 3;1317,1324,1318;, + 3;498,1319,493;, + 3;498,1325,1319;, + 3;1325,1320,1319;, + 3;1325,1326,1320;, + 3;1326,1321,1320;, + 3;1326,1327,1321;, + 3;1327,1328,1321;, + 3;1321,1328,1322;, + 3;1328,1323,1322;, + 3;1328,1329,1323;, + 3;1329,1330,1323;, + 3;1323,1330,1324;, + 3;503,1325,498;, + 3;503,515,1325;, + 3;515,1326,1325;, + 3;515,1331,1326;, + 3;1331,1327,1326;, + 3;1331,1332,1327;, + 3;1332,1333,1327;, + 3;1327,1333,1328;, + 3;1333,1329,1328;, + 3;1333,1334,1329;, + 3;1334,1335,1329;, + 3;1329,1335,1330;, + 3;514,1331,515;, + 3;514,1336,1331;, + 3;1336,1332,1331;, + 3;1336,1337,1332;, + 3;1337,1338,1332;, + 3;1332,1338,1333;, + 3;1338,1334,1333;, + 3;1338,1339,1334;, + 3;1339,1340,1334;, + 3;1334,1340,1335;, + 3;521,1336,514;, + 3;521,1341,1336;, + 3;1341,1337,1336;, + 3;1341,1342,1337;, + 3;1342,1343,1337;, + 3;1337,1343,1338;, + 3;1343,1339,1338;, + 3;1343,1344,1339;, + 3;1344,1345,1339;, + 3;1339,1345,1340;, + 3;1346,1341,521;, + 3;1346,1347,1341;, + 3;1347,1342,1341;, + 3;1347,1348,1342;, + 3;1348,1349,1342;, + 3;1342,1349,1343;, + 3;1349,1344,1343;, + 3;1349,1350,1344;, + 3;1350,1351,1344;, + 3;1344,1351,1345;, + 3;520,1346,521;, + 3;1352,1346,520;, + 3;1352,1353,1346;, + 3;1353,1347,1346;, + 3;1353,1354,1347;, + 3;1354,1348,1347;, + 3;1354,1355,1348;, + 3;1355,1356,1348;, + 3;1348,1356,1349;, + 3;1356,1350,1349;, + 3;519,1352,520;, + 3;519,527,1352;, + 3;1352,527,1357;, + 3;1352,1357,1353;, + 3;1353,1357,1358;, + 3;1353,1358,1354;, + 3;1354,1358,1359;, + 3;1354,1359,1355;, + 3;1355,1359,1360;, + 3;1355,1360,1361;, + 3;1355,1361,1356;, + 3;1361,1362,1356;, + 3;1356,1362,1350;, + 3;527,1363,1357;, + 3;1357,1363,1364;, + 3;1357,1364,1358;, + 3;1358,1364,1365;, + 3;1358,1365,1359;, + 3;1359,1365,1366;, + 3;1359,1366,1360;, + 3;1360,1366,1367;, + 3;1360,1367,1368;, + 3;1361,1360,1368;, + 3;527,526,1363;, + 3;526,1369,1363;, + 3;1363,1369,1370;, + 3;1363,1370,1364;, + 3;1364,1370,1371;, + 3;1364,1371,1365;, + 3;1365,1371,1372;, + 3;1365,1372,1366;, + 3;1366,1372,1373;, + 3;1366,1373,1367;, + 3;526,533,1369;, + 3;533,1374,1369;, + 3;1369,1374,1375;, + 3;1369,1375,1370;, + 3;1370,1375,1376;, + 3;1370,1376,1371;, + 3;1371,1376,1377;, + 3;1371,1377,1372;, + 3;1372,1377,1378;, + 3;1372,1378,1373;, + 3;533,538,1374;, + 3;538,1379,1374;, + 3;1374,1379,1380;, + 3;1374,1380,1375;, + 3;1375,1380,1381;, + 3;1375,1381,1376;, + 3;1376,1381,1382;, + 3;1376,1382,1377;, + 3;1377,1382,1383;, + 3;1377,1383,1378;, + 3;538,543,1379;, + 3;543,1384,1379;, + 3;1379,1384,1385;, + 3;1379,1385,1380;, + 3;1380,1385,1386;, + 3;1380,1386,1381;, + 3;1381,1386,1387;, + 3;1381,1387,1382;, + 3;1382,1387,1388;, + 3;1382,1388,1383;, + 3;543,548,1384;, + 3;548,1389,1384;, + 3;1384,1389,1390;, + 3;1384,1390,1385;, + 3;1385,1390,1391;, + 3;1385,1391,1386;, + 3;1386,1391,1392;, + 3;1386,1392,1387;, + 3;1387,1392,1393;, + 3;1387,1393,1388;, + 3;548,553,1389;, + 3;553,1394,1389;, + 3;1389,1394,1395;, + 3;1389,1395,1390;, + 3;1390,1395,1396;, + 3;1390,1396,1391;, + 3;1391,1396,1397;, + 3;1391,1397,1392;, + 3;1392,1397,1398;, + 3;1392,1398,1393;, + 3;553,558,1394;, + 3;558,1399,1394;, + 3;1394,1399,1400;, + 3;1394,1400,1395;, + 3;1395,1400,1401;, + 3;1395,1401,1396;, + 3;1396,1401,1402;, + 3;1396,1402,1397;, + 3;1397,1402,1403;, + 3;1397,1403,1398;, + 3;558,563,1399;, + 3;563,1404,1399;, + 3;1399,1404,1405;, + 3;1399,1405,1400;, + 3;1400,1405,1406;, + 3;1400,1406,1401;, + 3;1401,1406,1407;, + 3;1401,1407,1402;, + 3;1402,1407,1408;, + 3;1402,1408,1403;, + 3;563,568,1404;, + 3;568,1409,1404;, + 3;1404,1409,1410;, + 3;1404,1410,1405;, + 3;1405,1410,1411;, + 3;1405,1411,1406;, + 3;1406,1411,1412;, + 3;1406,1412,1407;, + 3;1407,1412,1413;, + 3;1407,1413,1408;, + 3;568,573,1409;, + 3;573,1414,1409;, + 3;1409,1414,1415;, + 3;1409,1415,1410;, + 3;1410,1415,1416;, + 3;1410,1416,1411;, + 3;1411,1416,1417;, + 3;1411,1417,1412;, + 3;1412,1417,1418;, + 3;1412,1418,1413;, + 3;573,578,1414;, + 3;578,1419,1414;, + 3;1414,1419,1420;, + 3;1414,1420,1415;, + 3;1415,1420,1421;, + 3;1415,1421,1416;, + 3;1416,1421,1422;, + 3;1416,1422,1417;, + 3;1417,1422,1423;, + 3;1417,1423,1418;, + 3;578,583,1419;, + 3;583,1424,1419;, + 3;1419,1424,1425;, + 3;1419,1425,1420;, + 3;1420,1425,1426;, + 3;1420,1426,1421;, + 3;1421,1426,1427;, + 3;1421,1427,1422;, + 3;1422,1427,1428;, + 3;1422,1428,1423;, + 3;583,588,1424;, + 3;588,1429,1424;, + 3;1424,1429,1430;, + 3;1424,1430,1425;, + 3;1425,1430,1431;, + 3;1425,1431,1426;, + 3;1426,1431,1432;, + 3;1426,1432,1427;, + 3;1427,1432,1433;, + 3;1427,1433,1428;, + 3;588,593,1429;, + 3;593,1434,1429;, + 3;1429,1434,1435;, + 3;1429,1435,1430;, + 3;1430,1435,1436;, + 3;1430,1436,1431;, + 3;1431,1436,1437;, + 3;1431,1437,1432;, + 3;1432,1437,1438;, + 3;1432,1438,1433;, + 3;593,598,1434;, + 3;598,1439,1434;, + 3;1434,1439,1440;, + 3;1434,1440,1435;, + 3;1435,1440,1441;, + 3;1435,1441,1436;, + 3;1436,1441,1442;, + 3;1436,1442,1437;, + 3;1437,1442,1443;, + 3;1437,1443,1438;, + 3;598,603,1439;, + 3;603,656,1439;, + 3;1439,656,663;, + 3;1439,663,1440;, + 3;1440,663,670;, + 3;1440,670,1441;, + 3;1441,670,677;, + 3;1441,677,1442;, + 3;1442,677,684;, + 3;1442,684,1443;, + 3;1443,684,691;, + 3;1443,691,1444;, + 3;1438,1443,1444;, + 3;1438,1444,1445;, + 3;1433,1438,1445;, + 3;1433,1445,1446;, + 3;1428,1433,1446;, + 3;1444,691,698;, + 3;1444,698,1447;, + 3;1445,1444,1447;, + 3;1445,1447,1448;, + 3;1446,1445,1448;, + 3;1446,1448,1449;, + 3;1450,1446,1449;, + 3;1428,1446,1450;, + 3;1423,1428,1450;, + 3;1423,1450,1451;, + 3;1418,1423,1451;, + 3;1447,698,705;, + 3;1447,705,1452;, + 3;1448,1447,1452;, + 3;1448,1452,1453;, + 3;1449,1448,1453;, + 3;1449,1453,1454;, + 3;1455,1449,1454;, + 3;1450,1449,1455;, + 3;1451,1450,1455;, + 3;1451,1455,1456;, + 3;1457,1451,1456;, + 3;1418,1451,1457;, + 3;1413,1418,1457;, + 3;1452,705,712;, + 3;1452,712,1458;, + 3;1453,1452,1458;, + 3;1453,1458,1459;, + 3;1454,1453,1459;, + 3;1454,1459,1460;, + 3;1461,1454,1460;, + 3;1455,1454,1461;, + 3;1456,1455,1461;, + 3;1456,1461,1462;, + 3;1463,1456,1462;, + 3;1457,1456,1463;, + 3;1458,712,719;, + 3;1458,719,1464;, + 3;1459,1458,1464;, + 3;1459,1464,1465;, + 3;1460,1459,1465;, + 3;1460,1465,1466;, + 3;1467,1460,1466;, + 3;1461,1460,1467;, + 3;1462,1461,1467;, + 3;1462,1467,1468;, + 3;1469,1462,1468;, + 3;1463,1462,1469;, + 3;1464,719,726;, + 3;1464,726,1470;, + 3;1465,1464,1470;, + 3;1465,1470,1471;, + 3;1466,1465,1471;, + 3;1466,1471,1472;, + 3;1473,1466,1472;, + 3;1467,1466,1473;, + 3;1468,1467,1473;, + 3;1468,1473,1474;, + 3;1475,1468,1474;, + 3;1469,1468,1475;, + 3;1470,726,733;, + 3;1470,733,1476;, + 3;1471,1470,1476;, + 3;1471,1476,1477;, + 3;1472,1471,1477;, + 3;1472,1477,1478;, + 3;1479,1472,1478;, + 3;1473,1472,1479;, + 3;1474,1473,1479;, + 3;1474,1479,1480;, + 3;1481,1474,1480;, + 3;1475,1474,1481;, + 3;1476,733,740;, + 3;1476,740,1482;, + 3;1477,1476,1482;, + 3;1477,1482,1483;, + 3;1478,1477,1483;, + 3;1478,1483,1484;, + 3;1485,1478,1484;, + 3;1479,1478,1485;, + 3;1480,1479,1485;, + 3;1480,1485,1486;, + 3;1487,1480,1486;, + 3;1481,1480,1487;, + 3;1482,740,747;, + 3;1482,747,1488;, + 3;1483,1482,1488;, + 3;1483,1488,1489;, + 3;1484,1483,1489;, + 3;1484,1489,1490;, + 3;1491,1484,1490;, + 3;1485,1484,1491;, + 3;1486,1485,1491;, + 3;1486,1491,1492;, + 3;1493,1486,1492;, + 3;1487,1486,1493;, + 3;1488,747,754;, + 3;1488,754,1494;, + 3;1489,1488,1494;, + 3;1489,1494,1495;, + 3;1490,1489,1495;, + 3;1490,1495,1496;, + 3;1497,1490,1496;, + 3;1491,1490,1497;, + 3;1492,1491,1497;, + 3;1492,1497,1498;, + 3;1499,1492,1498;, + 3;1493,1492,1499;, + 3;1494,754,761;, + 3;1494,761,1500;, + 3;1495,1494,1500;, + 3;1495,1500,1501;, + 3;1496,1495,1501;, + 3;1496,1501,1502;, + 3;1503,1496,1502;, + 3;1497,1496,1503;, + 3;1498,1497,1503;, + 3;1498,1503,1504;, + 3;1505,1498,1504;, + 3;1499,1498,1505;, + 3;1500,761,768;, + 3;1500,768,1506;, + 3;1501,1500,1506;, + 3;1501,1506,1507;, + 3;1502,1501,1507;, + 3;1502,1507,1508;, + 3;1509,1502,1508;, + 3;1503,1502,1509;, + 3;1504,1503,1509;, + 3;1504,1509,1510;, + 3;1511,1504,1510;, + 3;1505,1504,1511;, + 3;1506,768,775;, + 3;1506,775,1512;, + 3;1507,1506,1512;, + 3;1507,1512,1513;, + 3;1508,1507,1513;, + 3;1508,1513,1514;, + 3;1515,1508,1514;, + 3;1509,1508,1515;, + 3;1510,1509,1515;, + 3;1510,1515,1516;, + 3;1517,1510,1516;, + 3;1511,1510,1517;, + 3;1512,775,782;, + 3;1512,782,1518;, + 3;1513,1512,1518;, + 3;1513,1518,1519;, + 3;1514,1513,1519;, + 3;1514,1519,1520;, + 3;1521,1514,1520;, + 3;1515,1514,1521;, + 3;1516,1515,1521;, + 3;1516,1521,1522;, + 3;1523,1516,1522;, + 3;1517,1516,1523;, + 3;1518,782,789;, + 3;1518,789,1524;, + 3;1519,1518,1524;, + 3;1519,1524,1525;, + 3;1520,1519,1525;, + 3;1520,1525,1526;, + 3;1527,1520,1526;, + 3;1521,1520,1527;, + 3;1522,1521,1527;, + 3;1522,1527,1528;, + 3;1529,1522,1528;, + 3;1523,1522,1529;, + 3;1524,789,796;, + 3;1524,796,1530;, + 3;1525,1524,1530;, + 3;1525,1530,1531;, + 3;1526,1525,1531;, + 3;1526,1531,1532;, + 3;1533,1526,1532;, + 3;1527,1526,1533;, + 3;1528,1527,1533;, + 3;1528,1533,1534;, + 3;1535,1528,1534;, + 3;1529,1528,1535;, + 3;1530,796,803;, + 3;1530,803,1536;, + 3;1531,1530,1536;, + 3;1531,1536,1537;, + 3;1532,1531,1537;, + 3;1532,1537,1538;, + 3;1539,1532,1538;, + 3;1533,1532,1539;, + 3;1534,1533,1539;, + 3;1534,1539,1540;, + 3;1541,1534,1540;, + 3;1535,1534,1541;, + 3;1536,803,810;, + 3;1536,810,1542;, + 3;1537,1536,1542;, + 3;1537,1542,1543;, + 3;1538,1537,1543;, + 3;1538,1543,1544;, + 3;1545,1538,1544;, + 3;1539,1538,1545;, + 3;1540,1539,1545;, + 3;1540,1545,1546;, + 3;1547,1540,1546;, + 3;1541,1540,1547;, + 3;1542,810,817;, + 3;1542,817,1548;, + 3;1543,1542,1548;, + 3;1543,1548,1549;, + 3;1544,1543,1549;, + 3;1544,1549,1550;, + 3;1551,1544,1550;, + 3;1545,1544,1551;, + 3;1546,1545,1551;, + 3;1546,1551,1552;, + 3;1553,1546,1552;, + 3;1547,1546,1553;, + 3;1548,817,824;, + 3;1548,824,1554;, + 3;1549,1548,1554;, + 3;1549,1554,1555;, + 3;1550,1549,1555;, + 3;1550,1555,1556;, + 3;1557,1550,1556;, + 3;1551,1550,1557;, + 3;1552,1551,1557;, + 3;1552,1557,1558;, + 3;1559,1552,1558;, + 3;1553,1552,1559;, + 3;1554,824,831;, + 3;1554,831,1560;, + 3;1555,1554,1560;, + 3;1555,1560,1561;, + 3;1556,1555,1561;, + 3;1556,1561,1562;, + 3;1563,1556,1562;, + 3;1557,1556,1563;, + 3;1558,1557,1563;, + 3;1558,1563,1564;, + 3;1565,1558,1564;, + 3;1559,1558,1565;, + 3;1560,831,838;, + 3;1560,838,1566;, + 3;1561,1560,1566;, + 3;1561,1566,1567;, + 3;1562,1561,1567;, + 3;1562,1567,1568;, + 3;1569,1562,1568;, + 3;1563,1562,1569;, + 3;1564,1563,1569;, + 3;1564,1569,1570;, + 3;1571,1564,1570;, + 3;1565,1564,1571;, + 3;1566,838,845;, + 3;1566,845,1572;, + 3;1567,1566,1572;, + 3;1567,1572,1573;, + 3;1568,1567,1573;, + 3;1568,1573,1574;, + 3;1575,1568,1574;, + 3;1569,1568,1575;, + 3;1570,1569,1575;, + 3;1570,1575,1576;, + 3;1577,1570,1576;, + 3;1571,1570,1577;, + 3;1572,845,852;, + 3;1572,852,1578;, + 3;1573,1572,1578;, + 3;1573,1578,1579;, + 3;1574,1573,1579;, + 3;1574,1579,1580;, + 3;1581,1574,1580;, + 3;1575,1574,1581;, + 3;1576,1575,1581;, + 3;1576,1581,1582;, + 3;1583,1576,1582;, + 3;1577,1576,1583;, + 3;1578,852,859;, + 3;1578,859,1584;, + 3;1579,1578,1584;, + 3;1579,1584,1585;, + 3;1580,1579,1585;, + 3;1580,1585,1586;, + 3;1587,1580,1586;, + 3;1581,1580,1587;, + 3;1582,1581,1587;, + 3;1582,1587,1588;, + 3;1589,1582,1588;, + 3;1583,1582,1589;, + 3;1584,859,866;, + 3;1584,866,1590;, + 3;1585,1584,1590;, + 3;1585,1590,1591;, + 3;1586,1585,1591;, + 3;1586,1591,1592;, + 3;1593,1586,1592;, + 3;1587,1586,1593;, + 3;1588,1587,1593;, + 3;1588,1593,1594;, + 3;1595,1588,1594;, + 3;1589,1588,1595;, + 3;1590,866,873;, + 3;1590,873,1596;, + 3;1591,1590,1596;, + 3;1591,1596,1597;, + 3;1592,1591,1597;, + 3;1592,1597,1598;, + 3;1599,1592,1598;, + 3;1593,1592,1599;, + 3;1594,1593,1599;, + 3;1594,1599,1600;, + 3;1601,1594,1600;, + 3;1595,1594,1601;, + 3;1596,873,880;, + 3;1596,880,1602;, + 3;1597,1596,1602;, + 3;1597,1602,1603;, + 3;1598,1597,1603;, + 3;1598,1603,1604;, + 3;1605,1598,1604;, + 3;1599,1598,1605;, + 3;1600,1599,1605;, + 3;1600,1605,1606;, + 3;1607,1600,1606;, + 3;1601,1600,1607;, + 3;1602,880,887;, + 3;1602,887,1608;, + 3;1603,1602,1608;, + 3;1603,1608,1609;, + 3;1604,1603,1609;, + 3;1604,1609,1610;, + 3;1611,1604,1610;, + 3;1605,1604,1611;, + 3;1606,1605,1611;, + 3;1606,1611,1612;, + 3;1613,1606,1612;, + 3;1607,1606,1613;, + 3;1608,887,894;, + 3;1608,894,1614;, + 3;1609,1608,1614;, + 3;1609,1614,1615;, + 3;1610,1609,1615;, + 3;1610,1615,1616;, + 3;1617,1610,1616;, + 3;1611,1610,1617;, + 3;1612,1611,1617;, + 3;1612,1617,1618;, + 3;1619,1612,1618;, + 3;1613,1612,1619;, + 3;1614,894,901;, + 3;1614,901,1620;, + 3;1615,1614,1620;, + 3;1615,1620,1621;, + 3;1616,1615,1621;, + 3;1616,1621,1622;, + 3;1623,1616,1622;, + 3;1617,1616,1623;, + 3;1618,1617,1623;, + 3;1618,1623,1624;, + 3;1625,1618,1624;, + 3;1619,1618,1625;, + 3;1620,901,908;, + 3;1620,908,1626;, + 3;1621,1620,1626;, + 3;1621,1626,1627;, + 3;1622,1621,1627;, + 3;1622,1627,1628;, + 3;1629,1622,1628;, + 3;1623,1622,1629;, + 3;1624,1623,1629;, + 3;1624,1629,1630;, + 3;1631,1624,1630;, + 3;1625,1624,1631;, + 3;1626,908,915;, + 3;1626,915,940;, + 3;1627,1626,940;, + 3;1627,940,939;, + 3;1628,1627,939;, + 3;1628,939,945;, + 3;1632,1628,945;, + 3;1629,1628,1632;, + 3;1630,1629,1632;, + 3;1630,1632,1633;, + 3;1634,1630,1633;, + 3;1631,1630,1634;, + 3;1635,1631,1634;, + 3;1636,1631,1635;, + 3;1636,1625,1631;, + 3;1632,945,950;, + 3;1633,1632,950;, + 3;1633,950,955;, + 3;1637,1633,955;, + 3;1634,1633,1637;, + 3;1638,1634,1637;, + 3;1635,1634,1638;, + 3;1639,1635,1638;, + 3;1640,1635,1639;, + 3;1640,1636,1635;, + 3;1641,1636,1640;, + 3;1641,1642,1636;, + 3;1642,1625,1636;, + 3;1642,1619,1625;, + 3;1637,955,960;, + 3;1643,1637,960;, + 3;1638,1637,1643;, + 3;1644,1638,1643;, + 3;1639,1638,1644;, + 3;1645,1639,1644;, + 3;1646,1639,1645;, + 3;1646,1640,1639;, + 3;1647,1640,1646;, + 3;1647,1641,1640;, + 3;1643,960,965;, + 3;1648,1643,965;, + 3;1644,1643,1648;, + 3;1649,1644,1648;, + 3;1645,1644,1649;, + 3;1650,1645,1649;, + 3;1651,1645,1650;, + 3;1651,1646,1645;, + 3;1652,1646,1651;, + 3;1652,1647,1646;, + 3;1648,965,970;, + 3;1653,1648,970;, + 3;1649,1648,1653;, + 3;1654,1649,1653;, + 3;1650,1649,1654;, + 3;1655,1650,1654;, + 3;1656,1650,1655;, + 3;1656,1651,1650;, + 3;1657,1651,1656;, + 3;1657,1652,1651;, + 3;1653,970,975;, + 3;1658,1653,975;, + 3;1654,1653,1658;, + 3;1659,1654,1658;, + 3;1655,1654,1659;, + 3;1660,1655,1659;, + 3;1661,1655,1660;, + 3;1661,1656,1655;, + 3;1662,1656,1661;, + 3;1662,1657,1656;, + 3;1658,975,980;, + 3;1663,1658,980;, + 3;1659,1658,1663;, + 3;1664,1659,1663;, + 3;1660,1659,1664;, + 3;1665,1660,1664;, + 3;1666,1660,1665;, + 3;1666,1661,1660;, + 3;1667,1661,1666;, + 3;1667,1662,1661;, + 3;1663,980,985;, + 3;997,1663,985;, + 3;1664,1663,997;, + 3;1002,1664,997;, + 3;1665,1664,1002;, + 3;1007,1665,1002;, + 3;1668,1665,1007;, + 3;1668,1666,1665;, + 3;1669,1666,1668;, + 3;1669,1667,1666;, + 3;1670,1667,1669;, + 3;1670,1671,1667;, + 3;1671,1662,1667;, + 3;1671,1672,1662;, + 3;1672,1657,1662;, + 3;1013,1668,1007;, + 3;1673,1668,1013;, + 3;1673,1669,1668;, + 3;1674,1669,1673;, + 3;1674,1670,1669;, + 3;1675,1670,1674;, + 3;1675,1676,1670;, + 3;1676,1671,1670;, + 3;1676,1677,1671;, + 3;1677,1672,1671;, + 3;1019,1673,1013;, + 3;1678,1673,1019;, + 3;1678,1674,1673;, + 3;1679,1674,1678;, + 3;1679,1675,1674;, + 3;1680,1675,1679;, + 3;1680,1681,1675;, + 3;1681,1676,1675;, + 3;1681,1682,1676;, + 3;1682,1677,1676;, + 3;1025,1678,1019;, + 3;1683,1678,1025;, + 3;1683,1679,1678;, + 3;1684,1679,1683;, + 3;1684,1680,1679;, + 3;1685,1680,1684;, + 3;1685,1686,1680;, + 3;1686,1681,1680;, + 3;1686,1687,1681;, + 3;1687,1682,1681;, + 3;1031,1683,1025;, + 3;1688,1683,1031;, + 3;1688,1684,1683;, + 3;1689,1684,1688;, + 3;1689,1685,1684;, + 3;1690,1685,1689;, + 3;1690,1691,1685;, + 3;1691,1686,1685;, + 3;1691,1692,1686;, + 3;1692,1687,1686;, + 3;1688,1031,1037;, + 3;1688,1037,1693;, + 3;1689,1688,1693;, + 3;1689,1693,1694;, + 3;1690,1689,1694;, + 3;1690,1694,1695;, + 3;1696,1690,1695;, + 3;1696,1691,1690;, + 3;1696,1697,1691;, + 3;1697,1692,1691;, + 3;1693,1037,1043;, + 3;1693,1043,1698;, + 3;1694,1693,1698;, + 3;1694,1698,1699;, + 3;1695,1694,1699;, + 3;1695,1699,1700;, + 3;1701,1695,1700;, + 3;1696,1695,1701;, + 3;1702,1696,1701;, + 3;1702,1697,1696;, + 3;1698,1043,1049;, + 3;1698,1049,1703;, + 3;1699,1698,1703;, + 3;1699,1703,1704;, + 3;1700,1699,1704;, + 3;1700,1704,1705;, + 3;1706,1700,1705;, + 3;1701,1700,1706;, + 3;1707,1701,1706;, + 3;1702,1701,1707;, + 3;1703,1049,1055;, + 3;1703,1055,1708;, + 3;1704,1703,1708;, + 3;1704,1708,1709;, + 3;1705,1704,1709;, + 3;1705,1709,1710;, + 3;1711,1705,1710;, + 3;1706,1705,1711;, + 3;1712,1706,1711;, + 3;1707,1706,1712;, + 3;1708,1055,1061;, + 3;1708,1061,1713;, + 3;1709,1708,1713;, + 3;1709,1713,1714;, + 3;1710,1709,1714;, + 3;1710,1714,1715;, + 3;1716,1710,1715;, + 3;1711,1710,1716;, + 3;1717,1711,1716;, + 3;1712,1711,1717;, + 3;1713,1061,1067;, + 3;1713,1067,1718;, + 3;1714,1713,1718;, + 3;1714,1718,1719;, + 3;1715,1714,1719;, + 3;1715,1719,1720;, + 3;1721,1715,1720;, + 3;1716,1715,1721;, + 3;1722,1716,1721;, + 3;1717,1716,1722;, + 3;1718,1067,1073;, + 3;1718,1073,1723;, + 3;1719,1718,1723;, + 3;1719,1723,1724;, + 3;1720,1719,1724;, + 3;1720,1724,1725;, + 3;1726,1720,1725;, + 3;1721,1720,1726;, + 3;1727,1721,1726;, + 3;1722,1721,1727;, + 3;1723,1073,1079;, + 3;1723,1079,1728;, + 3;1724,1723,1728;, + 3;1724,1728,1729;, + 3;1725,1724,1729;, + 3;1725,1729,1730;, + 3;1731,1725,1730;, + 3;1726,1725,1731;, + 3;1732,1726,1731;, + 3;1727,1726,1732;, + 3;1728,1079,1085;, + 3;1728,1085,1733;, + 3;1729,1728,1733;, + 3;1729,1733,1734;, + 3;1730,1729,1734;, + 3;1730,1734,1735;, + 3;1736,1730,1735;, + 3;1731,1730,1736;, + 3;1737,1731,1736;, + 3;1732,1731,1737;, + 3;1733,1085,1091;, + 3;1733,1091,1738;, + 3;1734,1733,1738;, + 3;1734,1738,1739;, + 3;1735,1734,1739;, + 3;1735,1739,1740;, + 3;1741,1735,1740;, + 3;1736,1735,1741;, + 3;1742,1736,1741;, + 3;1737,1736,1742;, + 3;1738,1091,1097;, + 3;1738,1097,1743;, + 3;1739,1738,1743;, + 3;1739,1743,1744;, + 3;1740,1739,1744;, + 3;1740,1744,1745;, + 3;1746,1740,1745;, + 3;1741,1740,1746;, + 3;1747,1741,1746;, + 3;1742,1741,1747;, + 3;1743,1097,1103;, + 3;1743,1103,1748;, + 3;1744,1743,1748;, + 3;1744,1748,1749;, + 3;1745,1744,1749;, + 3;1745,1749,1750;, + 3;1751,1745,1750;, + 3;1746,1745,1751;, + 3;1752,1746,1751;, + 3;1747,1746,1752;, + 3;1748,1103,1109;, + 3;1748,1109,1753;, + 3;1749,1748,1753;, + 3;1749,1753,1754;, + 3;1750,1749,1754;, + 3;1750,1754,1755;, + 3;1756,1750,1755;, + 3;1751,1750,1756;, + 3;1757,1751,1756;, + 3;1752,1751,1757;, + 3;1753,1109,1115;, + 3;1753,1115,1132;, + 3;1754,1753,1132;, + 3;1754,1132,1137;, + 3;1755,1754,1137;, + 3;1755,1137,1142;, + 3;1758,1755,1142;, + 3;1756,1755,1758;, + 3;1759,1756,1758;, + 3;1757,1756,1759;, + 3;1760,1757,1759;, + 3;1761,1757,1760;, + 3;1761,1752,1757;, + 3;1762,1752,1761;, + 3;1762,1747,1752;, + 3;1758,1142,1147;, + 3;1763,1758,1147;, + 3;1759,1758,1763;, + 3;1764,1759,1763;, + 3;1760,1759,1764;, + 3;1765,1760,1764;, + 3;1766,1760,1765;, + 3;1766,1761,1760;, + 3;1767,1761,1766;, + 3;1767,1762,1761;, + 3;1763,1147,1152;, + 3;1768,1763,1152;, + 3;1764,1763,1768;, + 3;1769,1764,1768;, + 3;1765,1764,1769;, + 3;1770,1765,1769;, + 3;1771,1765,1770;, + 3;1771,1766,1765;, + 3;1772,1766,1771;, + 3;1772,1767,1766;, + 3;1768,1152,1157;, + 3;1773,1768,1157;, + 3;1769,1768,1773;, + 3;1774,1769,1773;, + 3;1770,1769,1774;, + 3;1775,1770,1774;, + 3;1776,1770,1775;, + 3;1776,1771,1770;, + 3;1777,1771,1776;, + 3;1777,1772,1771;, + 3;1773,1157,1162;, + 3;1778,1773,1162;, + 3;1774,1773,1778;, + 3;1779,1774,1778;, + 3;1775,1774,1779;, + 3;1780,1775,1779;, + 3;1781,1775,1780;, + 3;1781,1776,1775;, + 3;1782,1776,1781;, + 3;1782,1777,1776;, + 3;1778,1162,1167;, + 3;1783,1778,1167;, + 3;1779,1778,1783;, + 3;1784,1779,1783;, + 3;1780,1779,1784;, + 3;1785,1780,1784;, + 3;1786,1780,1785;, + 3;1786,1781,1780;, + 3;1787,1781,1786;, + 3;1787,1782,1781;, + 3;1783,1167,1172;, + 3;1788,1783,1172;, + 3;1784,1783,1788;, + 3;1789,1784,1788;, + 3;1785,1784,1789;, + 3;1790,1785,1789;, + 3;1791,1785,1790;, + 3;1791,1786,1785;, + 3;1792,1786,1791;, + 3;1792,1787,1786;, + 3;1788,1172,1177;, + 3;1793,1788,1177;, + 3;1789,1788,1793;, + 3;1794,1789,1793;, + 3;1790,1789,1794;, + 3;1795,1790,1794;, + 3;1796,1790,1795;, + 3;1796,1791,1790;, + 3;1797,1791,1796;, + 3;1797,1792,1791;, + 3;1793,1177,1182;, + 3;1798,1793,1182;, + 3;1794,1793,1798;, + 3;1799,1794,1798;, + 3;1795,1794,1799;, + 3;1800,1795,1799;, + 3;1801,1795,1800;, + 3;1801,1796,1795;, + 3;1802,1796,1801;, + 3;1802,1797,1796;, + 3;1798,1182,1187;, + 3;1803,1798,1187;, + 3;1799,1798,1803;, + 3;1804,1799,1803;, + 3;1800,1799,1804;, + 3;1805,1800,1804;, + 3;1806,1800,1805;, + 3;1806,1801,1800;, + 3;1807,1801,1806;, + 3;1807,1802,1801;, + 3;1803,1187,1192;, + 3;1808,1803,1192;, + 3;1804,1803,1808;, + 3;1809,1804,1808;, + 3;1805,1804,1809;, + 3;1810,1805,1809;, + 3;1811,1805,1810;, + 3;1811,1806,1805;, + 3;1812,1806,1811;, + 3;1812,1807,1806;, + 3;1808,1192,1197;, + 3;1813,1808,1197;, + 3;1809,1808,1813;, + 3;1814,1809,1813;, + 3;1810,1809,1814;, + 3;1815,1810,1814;, + 3;1816,1810,1815;, + 3;1816,1811,1810;, + 3;1817,1811,1816;, + 3;1817,1812,1811;, + 3;1813,1197,1202;, + 3;1818,1813,1202;, + 3;1814,1813,1818;, + 3;1819,1814,1818;, + 3;1815,1814,1819;, + 3;1820,1815,1819;, + 3;1821,1815,1820;, + 3;1821,1816,1815;, + 3;1822,1816,1821;, + 3;1822,1817,1816;, + 3;1818,1202,1207;, + 3;1823,1818,1207;, + 3;1819,1818,1823;, + 3;1824,1819,1823;, + 3;1820,1819,1824;, + 3;1825,1820,1824;, + 3;1826,1820,1825;, + 3;1826,1821,1820;, + 3;1827,1821,1826;, + 3;1827,1822,1821;, + 3;1823,1207,1212;, + 3;1828,1823,1212;, + 3;1824,1823,1828;, + 3;1829,1824,1828;, + 3;1825,1824,1829;, + 3;1830,1825,1829;, + 3;1831,1825,1830;, + 3;1831,1826,1825;, + 3;1832,1826,1831;, + 3;1832,1827,1826;, + 3;1828,1212,1217;, + 3;1833,1828,1217;, + 3;1829,1828,1833;, + 3;1834,1829,1833;, + 3;1830,1829,1834;, + 3;1835,1830,1834;, + 3;1836,1830,1835;, + 3;1836,1831,1830;, + 3;1837,1831,1836;, + 3;1837,1832,1831;, + 3;1833,1217,1222;, + 3;1838,1833,1222;, + 3;1834,1833,1838;, + 3;1839,1834,1838;, + 3;1835,1834,1839;, + 3;1840,1835,1839;, + 3;1841,1835,1840;, + 3;1841,1836,1835;, + 3;1842,1836,1841;, + 3;1842,1837,1836;, + 3;1838,1222,1227;, + 3;1843,1838,1227;, + 3;1839,1838,1843;, + 3;1844,1839,1843;, + 3;1840,1839,1844;, + 3;1845,1840,1844;, + 3;1846,1840,1845;, + 3;1846,1841,1840;, + 3;1847,1841,1846;, + 3;1847,1842,1841;, + 3;1843,1227,1232;, + 3;1848,1843,1232;, + 3;1844,1843,1848;, + 3;1849,1844,1848;, + 3;1845,1844,1849;, + 3;1850,1845,1849;, + 3;1851,1845,1850;, + 3;1851,1846,1845;, + 3;1852,1846,1851;, + 3;1852,1847,1846;, + 3;1848,1232,1237;, + 3;1853,1848,1237;, + 3;1849,1848,1853;, + 3;1854,1849,1853;, + 3;1850,1849,1854;, + 3;1306,1850,1854;, + 3;1312,1850,1306;, + 3;1312,1851,1850;, + 3;1318,1851,1312;, + 3;1318,1852,1851;, + 3;1853,1237,1242;, + 3;1855,1853,1242;, + 3;1854,1853,1855;, + 3;1300,1854,1855;, + 3;1306,1854,1300;, + 3;1855,1242,1247;, + 3;1294,1855,1247;, + 3;1300,1855,1294;, + 3;1324,1852,1318;, + 3;1324,1856,1852;, + 3;1856,1847,1852;, + 3;1856,1857,1847;, + 3;1857,1842,1847;, + 3;1857,1858,1842;, + 3;1858,1837,1842;, + 3;1330,1856,1324;, + 3;1330,1859,1856;, + 3;1859,1857,1856;, + 3;1859,1860,1857;, + 3;1860,1858,1857;, + 3;1860,1861,1858;, + 3;1861,1862,1858;, + 3;1858,1862,1837;, + 3;1862,1832,1837;, + 3;1862,1863,1832;, + 3;1863,1827,1832;, + 3;1335,1859,1330;, + 3;1335,1864,1859;, + 3;1864,1860,1859;, + 3;1864,1865,1860;, + 3;1865,1861,1860;, + 3;1865,1866,1861;, + 3;1866,1867,1861;, + 3;1861,1867,1862;, + 3;1867,1863,1862;, + 3;1867,1868,1863;, + 3;1868,1869,1863;, + 3;1863,1869,1827;, + 3;1869,1822,1827;, + 3;1340,1864,1335;, + 3;1340,1870,1864;, + 3;1870,1865,1864;, + 3;1870,1871,1865;, + 3;1871,1866,1865;, + 3;1871,1872,1866;, + 3;1872,1873,1866;, + 3;1866,1873,1867;, + 3;1873,1868,1867;, + 3;1873,1874,1868;, + 3;1874,1875,1868;, + 3;1868,1875,1869;, + 3;1345,1870,1340;, + 3;1345,1876,1870;, + 3;1876,1871,1870;, + 3;1876,1877,1871;, + 3;1877,1872,1871;, + 3;1877,1878,1872;, + 3;1878,1879,1872;, + 3;1872,1879,1873;, + 3;1879,1874,1873;, + 3;1879,1880,1874;, + 3;1880,1881,1874;, + 3;1874,1881,1875;, + 3;1351,1876,1345;, + 3;1351,1882,1876;, + 3;1882,1877,1876;, + 3;1882,1883,1877;, + 3;1883,1878,1877;, + 3;1883,1884,1878;, + 3;1884,1885,1878;, + 3;1878,1885,1879;, + 3;1885,1880,1879;, + 3;1885,1886,1880;, + 3;1886,1887,1880;, + 3;1880,1887,1881;, + 3;1888,1882,1351;, + 3;1888,1889,1882;, + 3;1889,1883,1882;, + 3;1889,1890,1883;, + 3;1890,1884,1883;, + 3;1890,1891,1884;, + 3;1891,1892,1884;, + 3;1884,1892,1885;, + 3;1892,1886,1885;, + 3;1350,1888,1351;, + 3;1362,1888,1350;, + 3;1362,1893,1888;, + 3;1893,1889,1888;, + 3;1893,1894,1889;, + 3;1894,1890,1889;, + 3;1894,1895,1890;, + 3;1895,1891,1890;, + 3;1895,1896,1891;, + 3;1896,1897,1891;, + 3;1891,1897,1892;, + 3;1897,1898,1892;, + 3;1892,1898,1886;, + 3;1899,1893,1362;, + 3;1899,1900,1893;, + 3;1900,1894,1893;, + 3;1900,1901,1894;, + 3;1901,1895,1894;, + 3;1901,1902,1895;, + 3;1902,1896,1895;, + 3;1902,1903,1896;, + 3;1903,1904,1896;, + 3;1896,1904,1897;, + 3;1361,1899,1362;, + 3;1361,1368,1899;, + 3;1899,1368,1905;, + 3;1899,1905,1900;, + 3;1900,1905,1906;, + 3;1900,1906,1901;, + 3;1901,1906,1907;, + 3;1901,1907,1902;, + 3;1902,1907,1908;, + 3;1902,1908,1903;, + 3;1903,1908,1909;, + 3;1903,1909,1910;, + 3;1903,1910,1904;, + 3;1368,1911,1905;, + 3;1905,1911,1912;, + 3;1905,1912,1906;, + 3;1906,1912,1913;, + 3;1906,1913,1907;, + 3;1907,1913,1914;, + 3;1907,1914,1908;, + 3;1908,1914,1915;, + 3;1908,1915,1909;, + 3;1368,1367,1911;, + 3;1367,1916,1911;, + 3;1911,1916,1917;, + 3;1911,1917,1912;, + 3;1912,1917,1918;, + 3;1912,1918,1913;, + 3;1913,1918,1919;, + 3;1913,1919,1914;, + 3;1914,1919,1920;, + 3;1914,1920,1915;, + 3;1367,1373,1916;, + 3;1373,1921,1916;, + 3;1916,1921,1922;, + 3;1916,1922,1917;, + 3;1917,1922,1923;, + 3;1917,1923,1918;, + 3;1918,1923,1924;, + 3;1918,1924,1919;, + 3;1919,1924,1925;, + 3;1919,1925,1920;, + 3;1373,1378,1921;, + 3;1378,1926,1921;, + 3;1921,1926,1927;, + 3;1921,1927,1922;, + 3;1922,1927,1928;, + 3;1922,1928,1923;, + 3;1923,1928,1929;, + 3;1923,1929,1924;, + 3;1924,1929,1930;, + 3;1924,1930,1925;, + 3;1378,1383,1926;, + 3;1383,1931,1926;, + 3;1926,1931,1932;, + 3;1926,1932,1927;, + 3;1927,1932,1933;, + 3;1927,1933,1928;, + 3;1928,1933,1934;, + 3;1928,1934,1929;, + 3;1929,1934,1935;, + 3;1929,1935,1930;, + 3;1383,1388,1931;, + 3;1388,1936,1931;, + 3;1931,1936,1937;, + 3;1931,1937,1932;, + 3;1932,1937,1938;, + 3;1932,1938,1933;, + 3;1933,1938,1939;, + 3;1933,1939,1934;, + 3;1934,1939,1940;, + 3;1934,1940,1935;, + 3;1388,1393,1936;, + 3;1393,1941,1936;, + 3;1936,1941,1942;, + 3;1936,1942,1937;, + 3;1937,1942,1943;, + 3;1937,1943,1938;, + 3;1938,1943,1944;, + 3;1938,1944,1939;, + 3;1939,1944,1945;, + 3;1939,1945,1940;, + 3;1393,1398,1941;, + 3;1398,1946,1941;, + 3;1941,1946,1947;, + 3;1941,1947,1942;, + 3;1942,1947,1948;, + 3;1942,1948,1943;, + 3;1943,1948,1949;, + 3;1943,1949,1944;, + 3;1944,1949,1950;, + 3;1944,1950,1945;, + 3;1398,1403,1946;, + 3;1403,1951,1946;, + 3;1946,1951,1952;, + 3;1946,1952,1947;, + 3;1947,1952,1953;, + 3;1947,1953,1948;, + 3;1948,1953,1954;, + 3;1948,1954,1949;, + 3;1949,1954,1955;, + 3;1949,1955,1950;, + 3;1403,1408,1951;, + 3;1408,1956,1951;, + 3;1951,1956,1957;, + 3;1951,1957,1952;, + 3;1952,1957,1958;, + 3;1952,1958,1953;, + 3;1953,1958,1959;, + 3;1953,1959,1954;, + 3;1954,1959,1960;, + 3;1954,1960,1955;, + 3;1408,1413,1956;, + 3;1413,1457,1956;, + 3;1956,1457,1463;, + 3;1956,1463,1957;, + 3;1957,1463,1469;, + 3;1957,1469,1958;, + 3;1958,1469,1475;, + 3;1958,1475,1959;, + 3;1959,1475,1481;, + 3;1959,1481,1960;, + 3;1960,1481,1487;, + 3;1960,1487,1961;, + 3;1955,1960,1961;, + 3;1955,1961,1962;, + 3;1950,1955,1962;, + 3;1950,1962,1963;, + 3;1945,1950,1963;, + 3;1961,1487,1493;, + 3;1961,1493,1964;, + 3;1962,1961,1964;, + 3;1962,1964,1965;, + 3;1963,1962,1965;, + 3;1963,1965,1966;, + 3;1967,1963,1966;, + 3;1945,1963,1967;, + 3;1940,1945,1967;, + 3;1940,1967,1968;, + 3;1935,1940,1968;, + 3;1964,1493,1499;, + 3;1964,1499,1969;, + 3;1965,1964,1969;, + 3;1965,1969,1970;, + 3;1966,1965,1970;, + 3;1966,1970,1971;, + 3;1972,1966,1971;, + 3;1967,1966,1972;, + 3;1968,1967,1972;, + 3;1968,1972,1973;, + 3;1974,1968,1973;, + 3;1935,1968,1974;, + 3;1930,1935,1974;, + 3;1969,1499,1505;, + 3;1969,1505,1975;, + 3;1970,1969,1975;, + 3;1970,1975,1976;, + 3;1971,1970,1976;, + 3;1971,1976,1977;, + 3;1978,1971,1977;, + 3;1972,1971,1978;, + 3;1973,1972,1978;, + 3;1973,1978,1979;, + 3;1980,1973,1979;, + 3;1974,1973,1980;, + 3;1975,1505,1511;, + 3;1975,1511,1981;, + 3;1976,1975,1981;, + 3;1976,1981,1982;, + 3;1977,1976,1982;, + 3;1977,1982,1983;, + 3;1984,1977,1983;, + 3;1978,1977,1984;, + 3;1979,1978,1984;, + 3;1979,1984,1985;, + 3;1986,1979,1985;, + 3;1980,1979,1986;, + 3;1981,1511,1517;, + 3;1981,1517,1987;, + 3;1982,1981,1987;, + 3;1982,1987,1988;, + 3;1983,1982,1988;, + 3;1983,1988,1989;, + 3;1990,1983,1989;, + 3;1984,1983,1990;, + 3;1985,1984,1990;, + 3;1985,1990,1991;, + 3;1992,1985,1991;, + 3;1986,1985,1992;, + 3;1987,1517,1523;, + 3;1987,1523,1993;, + 3;1988,1987,1993;, + 3;1988,1993,1994;, + 3;1989,1988,1994;, + 3;1989,1994,1995;, + 3;1996,1989,1995;, + 3;1990,1989,1996;, + 3;1991,1990,1996;, + 3;1991,1996,1997;, + 3;1998,1991,1997;, + 3;1992,1991,1998;, + 3;1993,1523,1529;, + 3;1993,1529,1999;, + 3;1994,1993,1999;, + 3;1994,1999,2000;, + 3;1995,1994,2000;, + 3;1995,2000,2001;, + 3;2002,1995,2001;, + 3;1996,1995,2002;, + 3;1997,1996,2002;, + 3;1997,2002,2003;, + 3;2004,1997,2003;, + 3;1998,1997,2004;, + 3;1999,1529,1535;, + 3;1999,1535,2005;, + 3;2000,1999,2005;, + 3;2000,2005,2006;, + 3;2001,2000,2006;, + 3;2001,2006,2007;, + 3;2008,2001,2007;, + 3;2002,2001,2008;, + 3;2003,2002,2008;, + 3;2003,2008,2009;, + 3;2010,2003,2009;, + 3;2004,2003,2010;, + 3;2005,1535,1541;, + 3;2005,1541,2011;, + 3;2006,2005,2011;, + 3;2006,2011,2012;, + 3;2007,2006,2012;, + 3;2007,2012,2013;, + 3;2014,2007,2013;, + 3;2008,2007,2014;, + 3;2009,2008,2014;, + 3;2009,2014,2015;, + 3;2016,2009,2015;, + 3;2010,2009,2016;, + 3;2011,1541,1547;, + 3;2011,1547,2017;, + 3;2012,2011,2017;, + 3;2012,2017,2018;, + 3;2013,2012,2018;, + 3;2013,2018,2019;, + 3;2020,2013,2019;, + 3;2014,2013,2020;, + 3;2015,2014,2020;, + 3;2015,2020,2021;, + 3;2022,2015,2021;, + 3;2016,2015,2022;, + 3;2017,1547,1553;, + 3;2017,1553,2023;, + 3;2018,2017,2023;, + 3;2018,2023,2024;, + 3;2019,2018,2024;, + 3;2019,2024,2025;, + 3;2026,2019,2025;, + 3;2020,2019,2026;, + 3;2021,2020,2026;, + 3;2021,2026,2027;, + 3;2028,2021,2027;, + 3;2022,2021,2028;, + 3;2023,1553,1559;, + 3;2023,1559,2029;, + 3;2024,2023,2029;, + 3;2024,2029,2030;, + 3;2025,2024,2030;, + 3;2025,2030,2031;, + 3;2032,2025,2031;, + 3;2026,2025,2032;, + 3;2027,2026,2032;, + 3;2027,2032,2033;, + 3;2034,2027,2033;, + 3;2028,2027,2034;, + 3;2029,1559,1565;, + 3;2029,1565,2035;, + 3;2030,2029,2035;, + 3;2030,2035,2036;, + 3;2031,2030,2036;, + 3;2031,2036,2037;, + 3;2038,2031,2037;, + 3;2032,2031,2038;, + 3;2033,2032,2038;, + 3;2033,2038,2039;, + 3;2040,2033,2039;, + 3;2034,2033,2040;, + 3;2035,1565,1571;, + 3;2035,1571,2041;, + 3;2036,2035,2041;, + 3;2036,2041,2042;, + 3;2037,2036,2042;, + 3;2037,2042,2043;, + 3;2044,2037,2043;, + 3;2038,2037,2044;, + 3;2039,2038,2044;, + 3;2039,2044,2045;, + 3;2046,2039,2045;, + 3;2040,2039,2046;, + 3;2041,1571,1577;, + 3;2041,1577,2047;, + 3;2042,2041,2047;, + 3;2042,2047,2048;, + 3;2043,2042,2048;, + 3;2043,2048,2049;, + 3;2050,2043,2049;, + 3;2044,2043,2050;, + 3;2045,2044,2050;, + 3;2045,2050,2051;, + 3;2052,2045,2051;, + 3;2046,2045,2052;, + 3;2047,1577,1583;, + 3;2047,1583,2053;, + 3;2048,2047,2053;, + 3;2048,2053,2054;, + 3;2049,2048,2054;, + 3;2049,2054,2055;, + 3;2056,2049,2055;, + 3;2050,2049,2056;, + 3;2051,2050,2056;, + 3;2051,2056,2057;, + 3;2058,2051,2057;, + 3;2052,2051,2058;, + 3;2053,1583,1589;, + 3;2053,1589,2059;, + 3;2054,2053,2059;, + 3;2054,2059,2060;, + 3;2055,2054,2060;, + 3;2055,2060,2061;, + 3;2062,2055,2061;, + 3;2056,2055,2062;, + 3;2057,2056,2062;, + 3;2057,2062,2063;, + 3;2064,2057,2063;, + 3;2058,2057,2064;, + 3;2059,1589,1595;, + 3;2059,1595,2065;, + 3;2060,2059,2065;, + 3;2060,2065,2066;, + 3;2061,2060,2066;, + 3;2061,2066,2067;, + 3;2068,2061,2067;, + 3;2062,2061,2068;, + 3;2063,2062,2068;, + 3;2063,2068,2069;, + 3;2070,2063,2069;, + 3;2064,2063,2070;, + 3;2065,1595,1601;, + 3;2065,1601,2071;, + 3;2066,2065,2071;, + 3;2066,2071,2072;, + 3;2067,2066,2072;, + 3;2067,2072,2073;, + 3;2074,2067,2073;, + 3;2068,2067,2074;, + 3;2069,2068,2074;, + 3;2069,2074,2075;, + 3;2076,2069,2075;, + 3;2070,2069,2076;, + 3;2071,1601,1607;, + 3;2071,1607,2077;, + 3;2072,2071,2077;, + 3;2072,2077,2078;, + 3;2073,2072,2078;, + 3;2073,2078,2079;, + 3;2080,2073,2079;, + 3;2074,2073,2080;, + 3;2075,2074,2080;, + 3;2075,2080,2081;, + 3;2082,2075,2081;, + 3;2076,2075,2082;, + 3;2077,1607,1613;, + 3;2077,1613,2083;, + 3;2078,2077,2083;, + 3;2078,2083,2084;, + 3;2079,2078,2084;, + 3;2079,2084,2085;, + 3;2086,2079,2085;, + 3;2080,2079,2086;, + 3;2081,2080,2086;, + 3;2081,2086,2087;, + 3;2088,2081,2087;, + 3;2082,2081,2088;, + 3;2083,1613,1619;, + 3;2083,1619,1642;, + 3;2084,2083,1642;, + 3;2084,1642,1641;, + 3;2085,2084,1641;, + 3;2085,1641,1647;, + 3;2089,2085,1647;, + 3;2086,2085,2089;, + 3;2087,2086,2089;, + 3;2087,2089,2090;, + 3;2091,2087,2090;, + 3;2088,2087,2091;, + 3;2092,2088,2091;, + 3;2093,2088,2092;, + 3;2093,2082,2088;, + 3;2089,1647,1652;, + 3;2090,2089,1652;, + 3;2090,1652,1657;, + 3;1672,2090,1657;, + 3;2091,2090,1672;, + 3;1677,2091,1672;, + 3;2092,2091,1677;, + 3;1682,2092,1677;, + 3;2094,2092,1682;, + 3;2094,2093,2092;, + 3;2095,2093,2094;, + 3;2095,2096,2093;, + 3;2096,2082,2093;, + 3;2096,2076,2082;, + 3;2097,2076,2096;, + 3;2097,2070,2076;, + 3;1687,2094,1682;, + 3;2098,2094,1687;, + 3;2098,2095,2094;, + 3;2099,2095,2098;, + 3;2099,2100,2095;, + 3;2100,2096,2095;, + 3;2100,2097,2096;, + 3;2101,2097,2100;, + 3;2101,2102,2097;, + 3;2102,2070,2097;, + 3;2102,2064,2070;, + 3;1692,2098,1687;, + 3;2103,2098,1692;, + 3;2103,2099,2098;, + 3;2104,2099,2103;, + 3;2104,2105,2099;, + 3;2105,2100,2099;, + 3;2105,2101,2100;, + 3;2106,2101,2105;, + 3;2106,2107,2101;, + 3;2107,2102,2101;, + 3;2107,2108,2102;, + 3;2108,2064,2102;, + 3;2108,2058,2064;, + 3;1697,2103,1692;, + 3;2109,2103,1697;, + 3;2109,2104,2103;, + 3;2110,2104,2109;, + 3;2110,2111,2104;, + 3;2111,2105,2104;, + 3;2111,2106,2105;, + 3;2112,2106,2111;, + 3;2112,2113,2106;, + 3;2113,2107,2106;, + 3;2113,2114,2107;, + 3;2114,2108,2107;, + 3;1702,2109,1697;, + 3;2115,2109,1702;, + 3;2115,2110,2109;, + 3;2116,2110,2115;, + 3;2116,2117,2110;, + 3;2117,2111,2110;, + 3;2117,2112,2111;, + 3;2118,2112,2117;, + 3;2118,2119,2112;, + 3;2119,2113,2112;, + 3;2119,2120,2113;, + 3;2120,2114,2113;, + 3;2115,1702,1707;, + 3;2115,1707,2121;, + 3;2116,2115,2121;, + 3;2116,2121,2122;, + 3;2123,2116,2122;, + 3;2123,2117,2116;, + 3;2123,2118,2117;, + 3;2124,2118,2123;, + 3;2124,2125,2118;, + 3;2125,2119,2118;, + 3;2125,2126,2119;, + 3;2126,2120,2119;, + 3;2121,1707,1712;, + 3;2121,1712,2127;, + 3;2122,2121,2127;, + 3;2122,2127,2128;, + 3;2129,2122,2128;, + 3;2123,2122,2129;, + 3;2124,2123,2129;, + 3;2124,2129,2130;, + 3;2131,2124,2130;, + 3;2131,2125,2124;, + 3;2131,2132,2125;, + 3;2132,2126,2125;, + 3;2127,1712,1717;, + 3;2127,1717,2133;, + 3;2128,2127,2133;, + 3;2128,2133,2134;, + 3;2135,2128,2134;, + 3;2129,2128,2135;, + 3;2130,2129,2135;, + 3;2130,2135,2136;, + 3;2137,2130,2136;, + 3;2131,2130,2137;, + 3;2138,2131,2137;, + 3;2138,2132,2131;, + 3;2133,1717,1722;, + 3;2133,1722,2139;, + 3;2134,2133,2139;, + 3;2134,2139,2140;, + 3;2141,2134,2140;, + 3;2135,2134,2141;, + 3;2136,2135,2141;, + 3;2136,2141,2142;, + 3;2143,2136,2142;, + 3;2137,2136,2143;, + 3;2144,2137,2143;, + 3;2138,2137,2144;, + 3;2139,1722,1727;, + 3;2139,1727,2145;, + 3;2140,2139,2145;, + 3;2140,2145,2146;, + 3;2147,2140,2146;, + 3;2141,2140,2147;, + 3;2142,2141,2147;, + 3;2142,2147,2148;, + 3;2149,2142,2148;, + 3;2143,2142,2149;, + 3;2150,2143,2149;, + 3;2144,2143,2150;, + 3;2145,1727,1732;, + 3;2145,1732,2151;, + 3;2146,2145,2151;, + 3;2146,2151,2152;, + 3;2153,2146,2152;, + 3;2147,2146,2153;, + 3;2148,2147,2153;, + 3;2148,2153,2154;, + 3;2155,2148,2154;, + 3;2149,2148,2155;, + 3;2156,2149,2155;, + 3;2150,2149,2156;, + 3;2151,1732,1737;, + 3;2151,1737,2157;, + 3;2152,2151,2157;, + 3;2152,2157,2158;, + 3;2159,2152,2158;, + 3;2153,2152,2159;, + 3;2154,2153,2159;, + 3;2154,2159,2160;, + 3;2161,2154,2160;, + 3;2155,2154,2161;, + 3;2162,2155,2161;, + 3;2156,2155,2162;, + 3;2157,1737,1742;, + 3;2157,1742,2163;, + 3;2158,2157,2163;, + 3;2158,2163,2164;, + 3;2165,2158,2164;, + 3;2159,2158,2165;, + 3;2160,2159,2165;, + 3;2160,2165,2166;, + 3;2167,2160,2166;, + 3;2161,2160,2167;, + 3;2168,2161,2167;, + 3;2162,2161,2168;, + 3;2163,1742,1747;, + 3;2163,1747,1762;, + 3;2164,2163,1762;, + 3;2164,1762,1767;, + 3;2169,2164,1767;, + 3;2165,2164,2169;, + 3;2166,2165,2169;, + 3;2166,2169,2170;, + 3;2171,2166,2170;, + 3;2167,2166,2171;, + 3;2172,2167,2171;, + 3;2168,2167,2172;, + 3;2173,2168,2172;, + 3;2174,2168,2173;, + 3;2174,2162,2168;, + 3;2169,1767,1772;, + 3;2170,2169,1772;, + 3;2170,1772,1777;, + 3;2175,2170,1777;, + 3;2171,2170,2175;, + 3;2176,2171,2175;, + 3;2172,2171,2176;, + 3;2177,2172,2176;, + 3;2173,2172,2177;, + 3;2178,2173,2177;, + 3;2179,2173,2178;, + 3;2179,2174,2173;, + 3;2175,1777,1782;, + 3;2180,2175,1782;, + 3;2176,2175,2180;, + 3;2181,2176,2180;, + 3;2177,2176,2181;, + 3;2182,2177,2181;, + 3;2178,2177,2182;, + 3;2183,2178,2182;, + 3;2184,2178,2183;, + 3;2184,2179,2178;, + 3;2180,1782,1787;, + 3;2185,2180,1787;, + 3;2181,2180,2185;, + 3;2186,2181,2185;, + 3;2182,2181,2186;, + 3;2187,2182,2186;, + 3;2183,2182,2187;, + 3;2188,2183,2187;, + 3;2189,2183,2188;, + 3;2189,2184,2183;, + 3;2185,1787,1792;, + 3;2190,2185,1792;, + 3;2186,2185,2190;, + 3;2191,2186,2190;, + 3;2187,2186,2191;, + 3;2192,2187,2191;, + 3;2188,2187,2192;, + 3;2193,2188,2192;, + 3;2194,2188,2193;, + 3;2194,2189,2188;, + 3;2190,1792,1797;, + 3;2195,2190,1797;, + 3;2191,2190,2195;, + 3;2196,2191,2195;, + 3;2192,2191,2196;, + 3;2197,2192,2196;, + 3;2193,2192,2197;, + 3;2198,2193,2197;, + 3;2199,2193,2198;, + 3;2199,2194,2193;, + 3;2195,1797,1802;, + 3;2200,2195,1802;, + 3;2196,2195,2200;, + 3;2201,2196,2200;, + 3;2197,2196,2201;, + 3;2202,2197,2201;, + 3;2198,2197,2202;, + 3;2203,2198,2202;, + 3;2204,2198,2203;, + 3;2204,2199,2198;, + 3;2200,1802,1807;, + 3;2205,2200,1807;, + 3;2201,2200,2205;, + 3;2206,2201,2205;, + 3;2202,2201,2206;, + 3;2207,2202,2206;, + 3;2203,2202,2207;, + 3;1887,2203,2207;, + 3;2208,2203,1887;, + 3;2208,2204,2203;, + 3;2205,1807,1812;, + 3;2209,2205,1812;, + 3;2206,2205,2209;, + 3;2210,2206,2209;, + 3;2207,2206,2210;, + 3;1881,2207,2210;, + 3;1887,2207,1881;, + 3;2209,1812,1817;, + 3;2211,2209,1817;, + 3;2210,2209,2211;, + 3;1875,2210,2211;, + 3;1881,2210,1875;, + 3;2211,1817,1822;, + 3;1869,2211,1822;, + 3;1875,2211,1869;, + 3;1886,2208,1887;, + 3;1898,2208,1886;, + 3;1898,2212,2208;, + 3;2212,2204,2208;, + 3;2212,2213,2204;, + 3;2213,2199,2204;, + 3;2213,2214,2199;, + 3;2214,2194,2199;, + 3;2215,2212,1898;, + 3;2215,2216,2212;, + 3;2216,2213,2212;, + 3;2216,2217,2213;, + 3;2217,2214,2213;, + 3;2217,2218,2214;, + 3;2218,2219,2214;, + 3;2214,2219,2194;, + 3;2219,2189,2194;, + 3;1897,2215,1898;, + 3;1904,2215,1897;, + 3;1904,2220,2215;, + 3;2220,2216,2215;, + 3;2220,2221,2216;, + 3;2221,2217,2216;, + 3;2221,2222,2217;, + 3;2222,2218,2217;, + 3;2222,2223,2218;, + 3;2223,2224,2218;, + 3;2218,2224,2219;, + 3;2224,2225,2219;, + 3;2219,2225,2189;, + 3;2225,2184,2189;, + 3;1910,2220,1904;, + 3;1910,2226,2220;, + 3;2226,2221,2220;, + 3;2226,2227,2221;, + 3;2227,2222,2221;, + 3;2227,2228,2222;, + 3;2228,2223,2222;, + 3;2228,2229,2223;, + 3;2229,2230,2223;, + 3;2223,2230,2224;, + 3;2230,2231,2224;, + 3;2224,2231,2225;, + 3;1910,2232,2226;, + 3;2226,2232,2233;, + 3;2226,2233,2227;, + 3;2227,2233,2234;, + 3;2227,2234,2228;, + 3;2228,2234,2235;, + 3;2228,2235,2229;, + 3;2229,2235,2236;, + 3;2229,2236,2237;, + 3;2229,2237,2230;, + 3;1910,1909,2232;, + 3;1909,2238,2232;, + 3;2232,2238,2239;, + 3;2232,2239,2233;, + 3;2233,2239,2240;, + 3;2233,2240,2234;, + 3;2234,2240,2241;, + 3;2234,2241,2235;, + 3;2235,2241,2242;, + 3;2235,2242,2236;, + 3;1909,1915,2238;, + 3;1915,2243,2238;, + 3;2238,2243,2244;, + 3;2238,2244,2239;, + 3;2239,2244,2245;, + 3;2239,2245,2240;, + 3;2240,2245,2246;, + 3;2240,2246,2241;, + 3;2241,2246,2247;, + 3;2241,2247,2242;, + 3;1915,1920,2243;, + 3;1920,2248,2243;, + 3;2243,2248,2249;, + 3;2243,2249,2244;, + 3;2244,2249,2250;, + 3;2244,2250,2245;, + 3;2245,2250,2251;, + 3;2245,2251,2246;, + 3;2246,2251,2252;, + 3;2246,2252,2247;, + 3;1920,1925,2248;, + 3;1925,2253,2248;, + 3;2248,2253,2254;, + 3;2248,2254,2249;, + 3;2249,2254,2255;, + 3;2249,2255,2250;, + 3;2250,2255,2256;, + 3;2250,2256,2251;, + 3;2251,2256,2257;, + 3;2251,2257,2252;, + 3;1925,1930,2253;, + 3;1930,1974,2253;, + 3;2253,1974,1980;, + 3;2253,1980,2254;, + 3;2254,1980,1986;, + 3;2254,1986,2255;, + 3;2255,1986,1992;, + 3;2255,1992,2256;, + 3;2256,1992,1998;, + 3;2256,1998,2257;, + 3;2257,1998,2004;, + 3;2257,2004,2258;, + 3;2252,2257,2258;, + 3;2252,2258,2259;, + 3;2247,2252,2259;, + 3;2247,2259,2260;, + 3;2242,2247,2260;, + 3;2258,2004,2010;, + 3;2258,2010,2261;, + 3;2259,2258,2261;, + 3;2259,2261,2262;, + 3;2260,2259,2262;, + 3;2260,2262,2263;, + 3;2264,2260,2263;, + 3;2242,2260,2264;, + 3;2236,2242,2264;, + 3;2236,2264,2265;, + 3;2237,2236,2265;, + 3;2261,2010,2016;, + 3;2261,2016,2266;, + 3;2262,2261,2266;, + 3;2262,2266,2267;, + 3;2263,2262,2267;, + 3;2263,2267,2268;, + 3;2269,2263,2268;, + 3;2264,2263,2269;, + 3;2265,2264,2269;, + 3;2265,2269,2270;, + 3;2271,2265,2270;, + 3;2237,2265,2271;, + 3;2266,2016,2022;, + 3;2266,2022,2272;, + 3;2267,2266,2272;, + 3;2267,2272,2273;, + 3;2268,2267,2273;, + 3;2268,2273,2274;, + 3;2275,2268,2274;, + 3;2269,2268,2275;, + 3;2270,2269,2275;, + 3;2270,2275,2276;, + 3;2277,2270,2276;, + 3;2271,2270,2277;, + 3;2272,2022,2028;, + 3;2272,2028,2278;, + 3;2273,2272,2278;, + 3;2273,2278,2279;, + 3;2274,2273,2279;, + 3;2274,2279,2280;, + 3;2281,2274,2280;, + 3;2275,2274,2281;, + 3;2276,2275,2281;, + 3;2276,2281,2282;, + 3;2283,2276,2282;, + 3;2277,2276,2283;, + 3;2278,2028,2034;, + 3;2278,2034,2284;, + 3;2279,2278,2284;, + 3;2279,2284,2285;, + 3;2280,2279,2285;, + 3;2280,2285,2286;, + 3;2287,2280,2286;, + 3;2281,2280,2287;, + 3;2282,2281,2287;, + 3;2282,2287,2288;, + 3;2289,2282,2288;, + 3;2283,2282,2289;, + 3;2284,2034,2040;, + 3;2284,2040,2290;, + 3;2285,2284,2290;, + 3;2285,2290,2291;, + 3;2286,2285,2291;, + 3;2286,2291,2292;, + 3;2293,2286,2292;, + 3;2287,2286,2293;, + 3;2288,2287,2293;, + 3;2288,2293,2132;, + 3;2138,2288,2132;, + 3;2289,2288,2138;, + 3;2290,2040,2046;, + 3;2290,2046,2294;, + 3;2291,2290,2294;, + 3;2291,2294,2295;, + 3;2292,2291,2295;, + 3;2292,2295,2120;, + 3;2126,2292,2120;, + 3;2293,2292,2126;, + 3;2132,2293,2126;, + 3;2294,2046,2052;, + 3;2294,2052,2296;, + 3;2295,2294,2296;, + 3;2295,2296,2114;, + 3;2120,2295,2114;, + 3;2296,2052,2058;, + 3;2296,2058,2108;, + 3;2114,2296,2108;, + 3;2289,2138,2144;, + 3;2289,2144,2297;, + 3;2283,2289,2297;, + 3;2283,2297,2298;, + 3;2277,2283,2298;, + 3;2277,2298,2299;, + 3;2271,2277,2299;, + 3;2297,2144,2150;, + 3;2297,2150,2300;, + 3;2298,2297,2300;, + 3;2298,2300,2301;, + 3;2299,2298,2301;, + 3;2299,2301,2302;, + 3;2303,2299,2302;, + 3;2271,2299,2303;, + 3;2237,2271,2303;, + 3;2237,2303,2230;, + 3;2230,2303,2231;, + 3;2300,2150,2156;, + 3;2300,2156,2304;, + 3;2301,2300,2304;, + 3;2301,2304,2305;, + 3;2302,2301,2305;, + 3;2302,2305,2306;, + 3;2231,2302,2306;, + 3;2303,2302,2231;, + 3;2304,2156,2162;, + 3;2304,2162,2174;, + 3;2305,2304,2174;, + 3;2305,2174,2179;, + 3;2306,2305,2179;, + 3;2306,2179,2184;, + 3;2225,2306,2184;, + 3;2231,2306,2225;; + + MeshNormals { + 2307; + -0.036282;0.997085;-0.067122;, + -0.044735;0.997085;-0.061811;, + 0.015507;0.999866;-0.005264;, + -0.066112;0.990719;-0.118761;, + -0.081047;0.990720;-0.109116;, + -0.052418;0.997085;-0.055445;, + -0.023664;0.999688;0.008033;, + -0.027213;0.997085;-0.071283;, + -0.050046;0.990719;-0.126374;, + -0.074061;0.980077;-0.184295;, + -0.097484;0.980077;-0.173051;, + -0.119235;0.980077;-0.158848;, + -0.094596;0.990720;-0.097603;, + -0.017674;0.997085;-0.074225;, + -0.033123;0.990719;-0.131825;, + -0.049373;0.980077;-0.192386;, + -0.065651;0.965231;-0.253022;, + -0.098117;0.965231;-0.242287;, + -0.128902;0.965231;-0.227407;, + -0.007831;0.997085;-0.075897;, + -0.015630;0.990719;-0.135021;, + -0.023837;0.980077;-0.197185;, + -0.032065;0.965230;-0.259427;, + -0.040200;0.946251;-0.320926;, + -0.081747;0.946251;-0.312932;, + -0.000000;0.997859;-0.065402;, + 0.000000;0.992279;-0.124023;, + -0.000000;0.982353;-0.187038;, + 0.000000;0.968207;-0.250151;, + 0.000000;0.949908;-0.312529;, + 0.007831;0.997085;-0.075897;, + 0.015630;0.990719;-0.135021;, + 0.023837;0.980077;-0.197185;, + 0.032065;0.965230;-0.259427;, + 0.040200;0.946251;-0.320926;, + 0.000000;0.927544;-0.373713;, + 0.017674;0.997085;-0.074225;, + 0.033123;0.990719;-0.131825;, + 0.049373;0.980077;-0.192386;, + 0.065651;0.965231;-0.253022;, + 0.081747;0.946251;-0.312932;, + 0.048191;0.923218;-0.381243;, + 0.027213;0.997085;-0.071283;, + 0.050046;0.990719;-0.126374;, + 0.074061;0.980077;-0.184295;, + 0.098117;0.965231;-0.242287;, + 0.121896;0.946250;-0.299586;, + 0.097546;0.923217;-0.371692;, + 0.036282;0.997085;-0.067122;, + 0.066112;0.990720;-0.118761;, + 0.097484;0.980077;-0.173051;, + 0.128902;0.965231;-0.227407;, + 0.159955;0.946251;-0.281112;, + 0.145224;0.923217;-0.355781;, + 0.044735;0.997085;-0.061811;, + 0.081047;0.990720;-0.109116;, + 0.119235;0.980077;-0.158848;, + 0.157482;0.965231;-0.208637;, + 0.195281;0.946250;-0.257828;, + 0.190422;0.923217;-0.333781;, + 0.052418;0.997085;-0.055445;, + 0.094596;0.990720;-0.097603;, + 0.138951;0.980077;-0.141924;, + 0.183368;0.965231;-0.186296;, + 0.227264;0.946250;-0.230134;, + 0.232361;0.923217;-0.306070;, + 0.059207;0.997085;-0.048128;, + 0.106528;0.990720;-0.084420;, + 0.156288;0.980077;-0.122572;, + 0.206116;0.965231;-0.160768;, + 0.255356;0.946251;-0.198503;, + 0.270322;0.923217;-0.273123;, + 0.064982;0.997085;-0.039990;, + 0.116635;0.990719;-0.069793;, + 0.170949;0.980077;-0.101125;, + 0.225334;0.965231;-0.132491;, + 0.279081;0.946251;-0.163473;, + 0.303658;0.923217;-0.235504;, + 0.069647;0.997085;-0.031164;, + 0.124746;0.990719;-0.053975;, + 0.182685;0.980077;-0.077949;, + 0.240703;0.965231;-0.101942;, + 0.298033;0.946250;-0.125645;, + 0.331801;0.923217;-0.193852;, + 0.073117;0.997085;-0.021808;, + 0.130724;0.990720;-0.037231;, + 0.191299;0.980076;-0.053433;, + 0.251949;0.965231;-0.069654;, + 0.311882;0.946251;-0.085671;, + 0.354265;0.923217;-0.148886;, + 0.075339;0.997085;-0.012075;, + 0.134466;0.990719;-0.019844;, + 0.196636;0.980077;-0.028007;, + 0.258885;0.965231;-0.036171;, + 0.320396;0.946251;-0.044227;, + 0.370666;0.923218;-0.101372;, + 0.076271;0.997085;-0.002138;, + 0.135906;0.990719;-0.002126;, + 0.198609;0.980077;-0.002103;, + 0.261392;0.965230;-0.002071;, + 0.323428;0.946250;-0.002029;, + 0.380726;0.923218;-0.052120;, + 0.075897;0.997085;0.007831;, + 0.135021;0.990719;0.015630;, + 0.197185;0.980077;0.023837;, + 0.259427;0.965230;0.032065;, + 0.320926;0.946251;0.040200;, + 0.384271;0.923218;-0.001981;, + 0.074225;0.997085;0.017674;, + 0.131825;0.990719;0.033123;, + 0.192386;0.980077;0.049373;, + 0.253022;0.965231;0.065651;, + 0.312932;0.946251;0.081747;, + 0.381243;0.923218;0.048191;, + 0.071283;0.997085;0.027213;, + 0.126374;0.990719;0.050046;, + 0.184295;0.980077;0.074061;, + 0.242287;0.965231;0.098117;, + 0.299586;0.946250;0.121896;, + 0.371692;0.923217;0.097546;, + 0.067122;0.997085;0.036282;, + 0.118761;0.990720;0.066112;, + 0.173051;0.980077;0.097484;, + 0.227407;0.965231;0.128902;, + 0.281112;0.946251;0.159955;, + 0.355781;0.923217;0.145224;, + 0.061811;0.997085;0.044735;, + 0.109116;0.990720;0.081047;, + 0.158848;0.980077;0.119235;, + 0.208637;0.965231;0.157482;, + 0.257828;0.946250;0.195281;, + 0.333781;0.923217;0.190422;, + 0.055445;0.997085;0.052418;, + 0.097603;0.990720;0.094596;, + 0.141924;0.980077;0.138951;, + 0.186296;0.965231;0.183368;, + 0.230134;0.946250;0.227264;, + 0.306070;0.923217;0.232361;, + 0.048128;0.997085;0.059207;, + 0.084420;0.990720;0.106528;, + 0.122572;0.980077;0.156288;, + 0.160768;0.965231;0.206116;, + 0.198503;0.946251;0.255356;, + 0.273123;0.923217;0.270322;, + 0.039990;0.997085;0.064982;, + 0.069793;0.990719;0.116635;, + 0.101125;0.980077;0.170949;, + 0.132491;0.965231;0.225334;, + 0.163473;0.946251;0.279081;, + 0.235504;0.923217;0.303658;, + 0.031164;0.997085;0.069647;, + 0.053975;0.990719;0.124746;, + 0.077949;0.980077;0.182685;, + 0.101942;0.965231;0.240703;, + 0.125645;0.946250;0.298033;, + 0.193852;0.923217;0.331801;, + 0.021808;0.997085;0.073117;, + 0.037231;0.990720;0.130724;, + 0.053433;0.980076;0.191299;, + 0.069654;0.965231;0.251949;, + 0.085671;0.946251;0.311882;, + 0.148886;0.923217;0.354265;, + 0.012075;0.997085;0.075339;, + 0.019844;0.990719;0.134466;, + 0.028007;0.980077;0.196636;, + 0.036171;0.965231;0.258885;, + 0.044227;0.946251;0.320396;, + 0.101372;0.923218;0.370666;, + 0.005351;0.996642;0.081706;, + 0.009461;0.989475;0.144392;, + 0.013623;0.978065;0.207855;, + 0.017753;0.962452;0.270871;, + 0.021817;0.942711;0.332897;, + 0.052120;0.923218;0.380726;, + 0.116669;0.896227;0.427978;, + 0.171533;0.896228;0.409087;, + 0.223461;0.896227;0.383200;, + 0.025794;0.918920;0.393599;, + 0.059806;0.896226;0.439547;, + 0.131478;0.865405;0.483515;, + 0.193466;0.865406;0.462216;, + 0.252141;0.865406;0.433009;, + 0.306506;0.865407;0.396390;, + 0.271569;0.896227;0.350753;, + 0.029671;0.891186;0.452667;, + 0.067243;0.865405;0.496541;, + 0.145742;0.830873;0.537037;, + 0.214595;0.830874;0.513418;, + 0.279773;0.830874;0.481016;, + 0.340167;0.830873;0.440382;, + 0.033417;0.859642;0.509802;, + 0.074399;0.830873;0.551465;, + 0.159392;0.792784;0.588293;, + 0.234816;0.792783;0.562455;, + 0.306224;0.792784;0.526992;, + 0.372390;0.792784;0.482514;, + 0.037018;0.824409;0.564783;, + 0.081242;0.792785;0.604062;, + 0.172365;0.751306;0.637047;, + 0.254044;0.751305;0.609100;, + 0.331374;0.751303;0.570733;, + 0.403034;0.751304;0.522596;, + 0.040463;0.785659;0.617335;, + 0.087739;0.751305;0.654097;, + 0.184607;0.706601;0.683108;, + 0.272194;0.706601;0.653166;, + 0.355118;0.706601;0.612051;, + 0.431968;0.706602;0.560462;, + 0.043736;0.743547;0.667252;, + 0.093865;0.706602;0.701358;, + 0.196064;0.658871;0.726257;, + 0.289183;0.658871;0.694451;, + 0.377350;0.658873;0.650764;, + 0.459062;0.658874;0.595942;, + 0.046821;0.698262;0.714310;, + 0.099591;0.658871;0.745634;, + 0.206681;0.608323;0.766307;, + 0.304936;0.608326;0.732771;, + 0.397973;0.608326;0.686700;, + 0.484200;0.608324;0.628882;, + 0.049701;0.649993;0.758313;, + 0.104891;0.608323;0.786728;, + 0.216418;0.555175;0.803084;, + 0.319390;0.555175;0.767966;, + 0.416899;0.555175;0.719705;, + 0.507274;0.555172;0.659134;, + 0.052373;0.598970;0.799057;, + 0.109744;0.555174;0.824462;, + 0.225232;0.499645;0.836436;, + 0.332481;0.499641;0.799885;, + 0.434044;0.499644;0.749641;, + 0.528179;0.499647;0.686571;, + 0.054823;0.545394;0.836385;, + 0.114128;0.499645;0.858679;, + 0.233085;0.441973;0.866216;, + 0.344154;0.441970;0.828384;, + 0.449335;0.441969;0.776377;, + 0.546828;0.441972;0.711084;, + 0.057032;0.489503;0.870135;, + 0.118026;0.441975;0.889229;, + 0.239941;0.382406;0.892297;, + 0.354355;0.382407;0.853345;, + 0.462705;0.382409;0.799792;, + 0.563141;0.382406;0.732556;, + 0.059001;0.431530;0.900167;, + 0.121420;0.382407;0.915981;, + 0.245771;0.321212;0.914560;, + 0.363041;0.321211;0.874657;, + 0.474099;0.321208;0.819790;, + 0.577048;0.321209;0.750893;, + 0.060717;0.371721;0.926357;, + 0.124292;0.321208;0.938817;, + 0.250550;0.258635;0.932916;, + 0.370176;0.258636;0.892232;, + 0.483469;0.258636;0.836281;, + 0.588488;0.258630;0.766024;, + 0.062174;0.310348;0.948588;, + 0.126635;0.258637;0.957638;, + 0.254258;0.194952;0.947284;, + 0.375729;0.194951;0.905992;, + 0.490768;0.194948;0.849201;, + 0.597414;0.194952;0.777876;, + 0.063366;0.247660;0.966773;, + 0.128436;0.194950;0.972368;, + 0.256879;0.130431;0.957602;, + 0.379675;0.130433;0.915879;, + 0.495971;0.130434;0.858487;, + 0.603783;0.130436;0.786405;, + 0.064284;0.183916;0.980838;, + 0.129688;0.130433;0.982939;, + 0.258402;0.065359;0.963824;, + 0.381996;0.065356;0.921850;, + 0.499052;0.065353;0.864104;, + 0.607569;0.065356;0.791574;, + 0.064936;0.119402;0.990720;, + 0.130385;0.065356;0.989307;, + 0.258819;-0.000002;0.965926;, + 0.382685;-0.000000;0.923879;, + 0.500001;0.000003;0.866025;, + 0.608759;-0.000000;0.793355;, + 0.065307;0.054380;0.996383;, + 0.130525;0.000000;0.991445;, + 0.258130;-0.065356;0.963897;, + 0.381738;-0.065355;0.921957;, + 0.498808;-0.065361;0.864245;, + 0.607348;-0.065357;0.791743;, + 0.065399;-0.010874;0.997800;, + 0.130108;-0.065357;0.989343;, + 0.256337;-0.130436;0.957746;, + 0.379157;-0.130433;0.916094;, + 0.495489;-0.130428;0.858766;, + 0.603337;-0.130435;0.786747;, + 0.065214;-0.076077;0.994967;, + 0.129135;-0.130430;0.983012;, + 0.253453;-0.194947;0.947501;, + 0.374954;-0.194954;0.906313;, + 0.490045;-0.194952;0.849617;, + 0.596748;-0.194949;0.778387;, + 0.064748;-0.140963;0.987895;, + 0.127605;-0.194953;0.972476;, + 0.249477;-0.258638;0.933203;, + 0.369151;-0.258633;0.892657;, + 0.482508;-0.258631;0.836837;, + 0.587607;-0.258633;0.766698;, + 0.064008;-0.205253;0.976614;, + 0.125534;-0.258637;0.957783;, + 0.244439;-0.321212;0.914917;, + 0.361766;-0.321215;0.875184;, + 0.472906;-0.321211;0.820478;, + 0.575955;-0.321206;0.751733;, + 0.063000;-0.268669;0.961170;, + 0.122927;-0.321209;0.938996;, + 0.238358;-0.382404;0.892722;, + 0.352839;-0.382407;0.853973;, + 0.461284;-0.382408;0.800613;, + 0.561839;-0.382409;0.733553;, + 0.061717;-0.330950;0.941628;, + 0.119793;-0.382405;0.916197;, + 0.231253;-0.441972;0.866708;, + 0.342404;-0.441968;0.829110;, + 0.447691;-0.441971;0.777325;, + 0.545324;-0.441973;0.712237;, + 0.060174;-0.391830;0.918068;, + 0.116144;-0.441976;0.889476;, + 0.223159;-0.499646;0.836991;, + 0.330502;-0.499642;0.800703;, + 0.432187;-0.499643;0.750714;, + 0.526478;-0.499643;0.687879;, + 0.058373;-0.451058;0.890584;, + 0.112002;-0.499646;0.858958;, + 0.214116;-0.555175;0.803701;, + 0.317189;-0.555175;0.768877;, + 0.414835;-0.555174;0.720898;, + 0.505383;-0.555172;0.660585;, + 0.056323;-0.508359;0.859301;, + 0.107383;-0.555173;0.824774;, + 0.204161;-0.608324;0.766981;, + 0.302523;-0.608328;0.733769;, + 0.395711;-0.608327;0.688005;, + 0.482130;-0.608326;0.630469;, + 0.054033;-0.563506;0.824343;, + 0.102304;-0.608323;0.787069;, + 0.193335;-0.658867;0.726991;, + 0.286572;-0.658870;0.695534;, + 0.374900;-0.658874;0.652178;, + 0.456820;-0.658873;0.597664;, + 0.051507;-0.616255;0.785861;, + 0.096785;-0.658872;0.746003;, + 0.181676;-0.706604;0.683890;, + 0.269394;-0.706599;0.654327;, + 0.352493;-0.706600;0.613567;, + 0.429560;-0.706603;0.562309;, + 0.048766;-0.666386;0.744010;, + 0.090858;-0.706602;0.701754;, + 0.169250;-0.751305;0.637883;, + 0.251063;-0.751305;0.610334;, + 0.328585;-0.751302;0.572344;, + 0.400474;-0.751305;0.524559;, + 0.045817;-0.713678;0.698974;, + 0.084545;-0.751304;0.654519;, + 0.156107;-0.792784;0.589173;, + 0.231672;-0.792785;0.563756;, + 0.303277;-0.792784;0.528694;, + 0.369695;-0.792783;0.484584;, + 0.042666;-0.757931;0.650938;, + 0.077869;-0.792785;0.604507;, + 0.142299;-0.830873;0.537960;, + 0.211301;-0.830873;0.514784;, + 0.276683;-0.830874;0.482799;, + 0.337339;-0.830873;0.442552;, + 0.039335;-0.798935;0.600129;, + 0.070862;-0.830874;0.551930;, + 0.127890;-0.865406;0.484475;, + 0.190035;-0.865406;0.463636;, + 0.248926;-0.865406;0.434865;, + 0.303559;-0.865406;0.398653;, + 0.035837;-0.836535;0.546741;, + 0.063562;-0.865405;0.497025;, + 0.112953;-0.896227;0.428975;, + 0.167978;-0.896227;0.410561;, + 0.220132;-0.896227;0.385123;, + 0.268515;-0.896228;0.353095;, + 0.032187;-0.870547;0.491031;, + 0.055996;-0.896226;0.440050;, + 0.097546;-0.923217;0.371692;, + 0.145224;-0.923217;0.355781;, + 0.190422;-0.923217;0.333781;, + 0.232361;-0.923217;0.306070;, + 0.028394;-0.900836;0.433231;, + 0.048191;-0.923218;0.381242;, + 0.081747;-0.946251;0.312932;, + 0.121896;-0.946250;0.299586;, + 0.159955;-0.946251;0.281112;, + 0.195281;-0.946250;0.257828;, + 0.024483;-0.927266;0.373601;, + 0.040200;-0.946251;0.320926;, + 0.065651;-0.965231;0.253022;, + 0.098117;-0.965231;0.242287;, + 0.128902;-0.965231;0.227407;, + 0.157482;-0.965231;0.208637;, + 0.020480;-0.949709;0.312464;, + 0.032065;-0.965230;0.259427;, + 0.049373;-0.980077;0.192386;, + 0.074061;-0.980077;0.184295;, + 0.097484;-0.980077;0.173051;, + 0.119235;-0.980077;0.158848;, + 0.016392;-0.968077;0.250117;, + 0.023837;-0.980077;0.197185;, + 0.033123;-0.990719;0.131825;, + 0.050046;-0.990719;0.126374;, + 0.066112;-0.990719;0.118761;, + 0.081047;-0.990720;0.109116;, + 0.012257;-0.982279;0.187024;, + 0.015630;-0.990719;0.135021;, + 0.017674;-0.997085;0.074225;, + 0.027213;-0.997085;0.071283;, + 0.036282;-0.997085;0.067122;, + 0.044735;-0.997085;0.061811;, + 0.008123;-0.992247;0.124019;, + 0.007831;-0.997085;0.075897;, + 0.020895;-0.999782;0.000000;, + 0.052418;-0.997085;0.055445;, + 0.094596;-0.990720;0.097603;, + 0.004282;-0.997850;0.065402;, + 0.138951;-0.980077;0.141924;, + 0.106528;-0.990719;0.084420;, + 0.156288;-0.980077;0.122572;, + 0.183368;-0.965231;0.186296;, + 0.059207;-0.997085;0.048128;, + 0.064982;-0.997085;0.039990;, + 0.116635;-0.990719;0.069793;, + 0.170949;-0.980077;0.101125;, + 0.206116;-0.965231;0.160768;, + 0.069647;-0.997085;0.031164;, + 0.124746;-0.990719;0.053975;, + 0.182685;-0.980077;0.077949;, + 0.225334;-0.965231;0.132491;, + 0.255356;-0.946251;0.198503;, + 0.227264;-0.946250;0.230134;, + 0.073117;-0.997085;0.021808;, + 0.130724;-0.990720;0.037231;, + 0.191299;-0.980076;0.053433;, + 0.240703;-0.965231;0.101942;, + 0.279081;-0.946251;0.163473;, + 0.075339;-0.997085;0.012075;, + 0.134466;-0.990719;0.019844;, + 0.196636;-0.980077;0.028007;, + 0.251949;-0.965231;0.069654;, + 0.298033;-0.946250;0.125645;, + 0.076271;-0.997085;0.002138;, + 0.135906;-0.990719;0.002126;, + 0.198609;-0.980077;0.002103;, + 0.258885;-0.965231;0.036171;, + 0.311882;-0.946251;0.085671;, + 0.075897;-0.997085;-0.007831;, + 0.135021;-0.990719;-0.015630;, + 0.197185;-0.980077;-0.023837;, + 0.261392;-0.965230;0.002071;, + 0.320396;-0.946251;0.044227;, + 0.074225;-0.997085;-0.017674;, + 0.131825;-0.990719;-0.033123;, + 0.192386;-0.980077;-0.049373;, + 0.259427;-0.965230;-0.032065;, + 0.323428;-0.946250;0.002029;, + 0.071283;-0.997085;-0.027213;, + 0.126374;-0.990719;-0.050046;, + 0.184295;-0.980077;-0.074061;, + 0.253022;-0.965231;-0.065651;, + 0.320926;-0.946251;-0.040200;, + 0.067122;-0.997085;-0.036282;, + 0.118761;-0.990720;-0.066112;, + 0.173051;-0.980077;-0.097484;, + 0.242287;-0.965231;-0.098117;, + 0.312932;-0.946251;-0.081747;, + 0.061811;-0.997085;-0.044735;, + 0.109116;-0.990720;-0.081047;, + 0.158848;-0.980077;-0.119235;, + 0.227407;-0.965231;-0.128902;, + 0.299586;-0.946250;-0.121896;, + 0.055445;-0.997085;-0.052418;, + 0.097603;-0.990720;-0.094596;, + 0.141924;-0.980077;-0.138951;, + 0.208637;-0.965231;-0.157482;, + 0.281112;-0.946251;-0.159955;, + 0.048128;-0.997085;-0.059207;, + 0.084420;-0.990719;-0.106528;, + 0.122572;-0.980077;-0.156288;, + 0.186296;-0.965231;-0.183368;, + 0.257828;-0.946250;-0.195281;, + 0.039990;-0.997085;-0.064982;, + 0.069793;-0.990719;-0.116635;, + 0.101125;-0.980077;-0.170949;, + 0.160768;-0.965231;-0.206116;, + 0.230134;-0.946250;-0.227264;, + 0.031164;-0.997085;-0.069647;, + 0.053975;-0.990719;-0.124746;, + 0.077949;-0.980077;-0.182685;, + 0.132491;-0.965231;-0.225334;, + 0.198503;-0.946251;-0.255356;, + 0.021808;-0.997085;-0.073117;, + 0.037231;-0.990720;-0.130724;, + 0.053433;-0.980076;-0.191299;, + 0.101942;-0.965231;-0.240703;, + 0.163473;-0.946251;-0.279081;, + 0.012075;-0.997085;-0.075339;, + 0.019844;-0.990719;-0.134466;, + 0.028007;-0.980077;-0.196636;, + 0.069654;-0.965231;-0.251949;, + 0.125645;-0.946250;-0.298033;, + -0.000000;-0.996656;-0.081707;, + 0.000000;-0.989520;-0.144398;, + 0.000000;-0.978156;-0.207874;, + 0.036171;-0.965231;-0.258885;, + 0.085671;-0.946250;-0.311882;, + 0.148886;-0.923217;-0.354265;, + 0.193852;-0.923217;-0.331801;, + -0.019844;-0.990719;-0.134466;, + -0.028007;-0.980077;-0.196636;, + -0.036171;-0.965231;-0.258885;, + 0.000000;-0.962604;-0.270914;, + 0.044227;-0.946251;-0.320396;, + 0.101372;-0.923218;-0.370666;, + -0.012075;-0.997085;-0.075339;, + -0.037231;-0.990720;-0.130724;, + -0.053433;-0.980076;-0.191299;, + -0.069654;-0.965231;-0.251949;, + -0.085671;-0.946251;-0.311882;, + -0.044227;-0.946251;-0.320396;, + -0.020895;-0.999782;0.000000;, + -0.021808;-0.997085;-0.073117;, + -0.053975;-0.990719;-0.124746;, + -0.077949;-0.980077;-0.182685;, + -0.101942;-0.965231;-0.240703;, + -0.125645;-0.946250;-0.298033;, + -0.031164;-0.997085;-0.069647;, + -0.069793;-0.990719;-0.116635;, + -0.101125;-0.980077;-0.170949;, + -0.132491;-0.965231;-0.225334;, + -0.163473;-0.946251;-0.279081;, + -0.039990;-0.997085;-0.064982;, + -0.084420;-0.990719;-0.106528;, + -0.122572;-0.980077;-0.156288;, + -0.160768;-0.965231;-0.206116;, + -0.198503;-0.946251;-0.255356;, + -0.048128;-0.997085;-0.059207;, + -0.097603;-0.990720;-0.094596;, + -0.141924;-0.980077;-0.138951;, + -0.186296;-0.965231;-0.183368;, + -0.230134;-0.946250;-0.227264;, + -0.055445;-0.997085;-0.052418;, + -0.109116;-0.990720;-0.081047;, + -0.158848;-0.980077;-0.119235;, + -0.208637;-0.965231;-0.157482;, + -0.257828;-0.946250;-0.195281;, + -0.061811;-0.997085;-0.044735;, + -0.118761;-0.990720;-0.066112;, + -0.173051;-0.980077;-0.097484;, + -0.227407;-0.965231;-0.128902;, + -0.281112;-0.946251;-0.159955;, + -0.067122;-0.997085;-0.036282;, + -0.126374;-0.990719;-0.050046;, + -0.184295;-0.980077;-0.074061;, + -0.242287;-0.965231;-0.098117;, + -0.299586;-0.946250;-0.121896;, + -0.071283;-0.997085;-0.027213;, + -0.131825;-0.990719;-0.033123;, + -0.192386;-0.980077;-0.049373;, + -0.253022;-0.965231;-0.065651;, + -0.312932;-0.946251;-0.081747;, + -0.074225;-0.997085;-0.017674;, + -0.135021;-0.990719;-0.015630;, + -0.197185;-0.980077;-0.023837;, + -0.259427;-0.965230;-0.032065;, + -0.320926;-0.946251;-0.040200;, + -0.075897;-0.997085;-0.007831;, + -0.135906;-0.990719;0.002126;, + -0.198609;-0.980077;0.002103;, + -0.261392;-0.965230;0.002071;, + -0.323428;-0.946250;0.002029;, + -0.076271;-0.997085;0.002138;, + -0.134466;-0.990719;0.019844;, + -0.196636;-0.980077;0.028007;, + -0.258885;-0.965231;0.036171;, + -0.320396;-0.946251;0.044227;, + -0.075339;-0.997085;0.012075;, + -0.130724;-0.990720;0.037231;, + -0.191299;-0.980076;0.053433;, + -0.251949;-0.965231;0.069654;, + -0.311882;-0.946251;0.085671;, + -0.073117;-0.997085;0.021808;, + -0.124746;-0.990719;0.053975;, + -0.182685;-0.980077;0.077949;, + -0.240703;-0.965231;0.101942;, + -0.298033;-0.946250;0.125645;, + -0.069647;-0.997085;0.031164;, + -0.116635;-0.990719;0.069793;, + -0.170949;-0.980077;0.101125;, + -0.225334;-0.965231;0.132491;, + -0.279081;-0.946251;0.163473;, + -0.064982;-0.997085;0.039990;, + -0.106528;-0.990719;0.084420;, + -0.156288;-0.980077;0.122572;, + -0.206116;-0.965231;0.160768;, + -0.255356;-0.946251;0.198503;, + -0.059207;-0.997085;0.048128;, + -0.094596;-0.990720;0.097603;, + -0.138951;-0.980077;0.141924;, + -0.183368;-0.965231;0.186296;, + -0.227264;-0.946250;0.230134;, + -0.052418;-0.997085;0.055445;, + -0.081047;-0.990720;0.109116;, + -0.119235;-0.980077;0.158848;, + -0.157482;-0.965231;0.208637;, + -0.195281;-0.946250;0.257828;, + -0.044735;-0.997085;0.061811;, + -0.066112;-0.990720;0.118761;, + -0.097484;-0.980077;0.173051;, + -0.128902;-0.965231;0.227407;, + -0.159955;-0.946251;0.281112;, + -0.036282;-0.997085;0.067122;, + -0.050046;-0.990719;0.126374;, + -0.074061;-0.980077;0.184295;, + -0.098117;-0.965231;0.242287;, + -0.121896;-0.946250;0.299586;, + -0.027213;-0.997085;0.071283;, + -0.033123;-0.990719;0.131825;, + -0.049373;-0.980077;0.192386;, + -0.065651;-0.965231;0.253022;, + -0.081747;-0.946251;0.312932;, + -0.017674;-0.997085;0.074225;, + -0.015630;-0.990719;0.135021;, + -0.023837;-0.980077;0.197185;, + -0.032065;-0.965230;0.259427;, + -0.040200;-0.946251;0.320926;, + -0.007831;-0.997085;0.075897;, + -0.008123;-0.992247;0.124019;, + -0.012257;-0.982279;0.187024;, + -0.016392;-0.968077;0.250117;, + -0.020480;-0.949709;0.312464;, + -0.004282;-0.997850;0.065402;, + -0.024483;-0.927266;0.373601;, + -0.048191;-0.923218;0.381243;, + -0.097546;-0.923217;0.371692;, + -0.145224;-0.923217;0.355781;, + -0.028394;-0.900836;0.433231;, + -0.055996;-0.896226;0.440050;, + -0.112953;-0.896227;0.428975;, + -0.167978;-0.896227;0.410561;, + -0.190422;-0.923217;0.333781;, + -0.232361;-0.923217;0.306070;, + -0.032187;-0.870547;0.491031;, + -0.063562;-0.865405;0.497025;, + -0.127890;-0.865406;0.484475;, + -0.190035;-0.865406;0.463636;, + -0.220132;-0.896227;0.385123;, + -0.268515;-0.896228;0.353095;, + -0.270322;-0.923217;0.273123;, + -0.035837;-0.836535;0.546741;, + -0.070862;-0.830874;0.551930;, + -0.142299;-0.830873;0.537960;, + -0.211301;-0.830873;0.514784;, + -0.248926;-0.865406;0.434865;, + -0.303559;-0.865406;0.398653;, + -0.312308;-0.896227;0.315026;, + -0.039335;-0.798935;0.600129;, + -0.077869;-0.792785;0.604507;, + -0.156107;-0.792784;0.589173;, + -0.231672;-0.792785;0.563756;, + -0.276683;-0.830874;0.482799;, + -0.337339;-0.830873;0.442552;, + -0.352997;-0.865406;0.355621;, + -0.042666;-0.757931;0.650938;, + -0.084545;-0.751304;0.654519;, + -0.169250;-0.751305;0.637883;, + -0.251063;-0.751305;0.610334;, + -0.303277;-0.792784;0.528694;, + -0.369695;-0.792783;0.484584;, + -0.392214;-0.830874;0.394737;, + -0.045817;-0.713678;0.698974;, + -0.090858;-0.706602;0.701754;, + -0.181676;-0.706604;0.683890;, + -0.269394;-0.706599;0.654327;, + -0.328585;-0.751302;0.572344;, + -0.400474;-0.751305;0.524559;, + -0.429776;-0.792785;0.432185;, + -0.048766;-0.666386;0.744010;, + -0.096785;-0.658872;0.746003;, + -0.193335;-0.658867;0.726991;, + -0.286572;-0.658870;0.695534;, + -0.352493;-0.706600;0.613567;, + -0.429560;-0.706603;0.562309;, + -0.465517;-0.751305;0.467797;, + -0.051507;-0.616255;0.785861;, + -0.102304;-0.608323;0.787069;, + -0.204161;-0.608324;0.766981;, + -0.302523;-0.608328;0.733769;, + -0.374900;-0.658874;0.652178;, + -0.456820;-0.658873;0.597663;, + -0.499285;-0.706601;0.501428;, + -0.054033;-0.563506;0.824343;, + -0.107383;-0.555173;0.824774;, + -0.214116;-0.555175;0.803701;, + -0.317189;-0.555175;0.768877;, + -0.395711;-0.608327;0.688005;, + -0.482130;-0.608326;0.630469;, + -0.530922;-0.658874;0.532923;, + -0.056323;-0.508359;0.859301;, + -0.112002;-0.499646;0.858958;, + -0.223159;-0.499646;0.836991;, + -0.330502;-0.499642;0.800703;, + -0.414835;-0.555174;0.720898;, + -0.505383;-0.555172;0.660585;, + -0.560298;-0.608326;0.562144;, + -0.058373;-0.451058;0.890584;, + -0.116144;-0.441976;0.889476;, + -0.231253;-0.441972;0.866708;, + -0.342404;-0.441968;0.829110;, + -0.432187;-0.499643;0.750714;, + -0.526478;-0.499643;0.687879;, + -0.587285;-0.555169;0.588968;, + -0.060174;-0.391829;0.918068;, + -0.119793;-0.382405;0.916197;, + -0.238358;-0.382404;0.892722;, + -0.352839;-0.382407;0.853973;, + -0.447691;-0.441971;0.777325;, + -0.545324;-0.441973;0.712237;, + -0.611759;-0.499645;0.613275;, + -0.061717;-0.330950;0.941628;, + -0.122927;-0.321209;0.938996;, + -0.244439;-0.321212;0.914917;, + -0.361766;-0.321215;0.875184;, + -0.461284;-0.382408;0.800613;, + -0.561839;-0.382409;0.733553;, + -0.633621;-0.441977;0.634965;, + -0.063000;-0.268669;0.961170;, + -0.125534;-0.258637;0.957783;, + -0.249477;-0.258638;0.933203;, + -0.369151;-0.258633;0.892657;, + -0.472906;-0.321211;0.820478;, + -0.575955;-0.321206;0.751733;, + -0.652782;-0.382408;0.653942;, + -0.064008;-0.205253;0.976614;, + -0.127605;-0.194953;0.972476;, + -0.253453;-0.194947;0.947501;, + -0.374954;-0.194954;0.906313;, + -0.482508;-0.258631;0.836837;, + -0.587607;-0.258633;0.766698;, + -0.669148;-0.321208;0.670124;, + -0.064748;-0.140963;0.987895;, + -0.129135;-0.130430;0.983012;, + -0.256337;-0.130436;0.957746;, + -0.379157;-0.130433;0.916094;, + -0.490046;-0.194952;0.849617;, + -0.596748;-0.194949;0.778387;, + -0.682655;-0.258632;0.683441;, + -0.065214;-0.076077;0.994967;, + -0.130108;-0.065357;0.989343;, + -0.258130;-0.065356;0.963897;, + -0.381738;-0.065355;0.921957;, + -0.495489;-0.130428;0.858766;, + -0.603337;-0.130435;0.786747;, + -0.693245;-0.194947;0.693835;, + -0.065399;-0.010874;0.997800;, + -0.130525;0.000000;0.991445;, + -0.258819;-0.000002;0.965926;, + -0.382685;-0.000000;0.923879;, + -0.498808;-0.065361;0.864244;, + -0.607348;-0.065357;0.791743;, + -0.700868;-0.130435;0.701263;, + -0.065307;0.054380;0.996382;, + -0.130385;0.065356;0.989307;, + -0.258402;0.065359;0.963824;, + -0.381996;0.065356;0.921850;, + -0.500001;0.000003;0.866025;, + -0.608759;-0.000000;0.793355;, + -0.705495;-0.065360;0.705695;, + -0.064936;0.119402;0.990720;, + -0.129688;0.130433;0.982939;, + -0.256879;0.130431;0.957602;, + -0.379675;0.130433;0.915879;, + -0.499052;0.065353;0.864104;, + -0.607569;0.065356;0.791574;, + -0.707107;0.000000;0.707107;, + -0.064284;0.183916;0.980838;, + -0.128436;0.194951;0.972368;, + -0.254258;0.194952;0.947284;, + -0.375729;0.194951;0.905992;, + -0.495971;0.130434;0.858487;, + -0.603783;0.130436;0.786405;, + -0.705695;0.065360;0.705495;, + -0.063366;0.247660;0.966773;, + -0.126635;0.258637;0.957638;, + -0.250550;0.258635;0.932916;, + -0.370176;0.258636;0.892232;, + -0.490768;0.194948;0.849201;, + -0.597414;0.194952;0.777876;, + -0.701263;0.130435;0.700868;, + -0.062174;0.310348;0.948588;, + -0.124292;0.321208;0.938817;, + -0.245771;0.321212;0.914560;, + -0.363040;0.321211;0.874657;, + -0.483469;0.258636;0.836281;, + -0.588488;0.258630;0.766024;, + -0.693835;0.194947;0.693245;, + -0.060717;0.371721;0.926357;, + -0.121420;0.382407;0.915981;, + -0.239941;0.382406;0.892297;, + -0.354355;0.382407;0.853345;, + -0.474099;0.321208;0.819790;, + -0.577047;0.321209;0.750893;, + -0.683441;0.258632;0.682655;, + -0.059001;0.431530;0.900167;, + -0.118026;0.441975;0.889229;, + -0.233086;0.441973;0.866216;, + -0.344154;0.441970;0.828384;, + -0.462705;0.382409;0.799792;, + -0.563141;0.382406;0.732556;, + -0.670124;0.321208;0.669148;, + -0.057032;0.489503;0.870135;, + -0.114128;0.499645;0.858679;, + -0.225232;0.499645;0.836436;, + -0.332481;0.499641;0.799885;, + -0.449335;0.441969;0.776377;, + -0.546828;0.441972;0.711084;, + -0.653942;0.382408;0.652782;, + -0.054823;0.545394;0.836385;, + -0.109745;0.555174;0.824462;, + -0.216418;0.555175;0.803084;, + -0.319390;0.555175;0.767966;, + -0.434044;0.499644;0.749641;, + -0.528179;0.499647;0.686571;, + -0.634965;0.441977;0.633621;, + -0.052373;0.598970;0.799057;, + -0.104891;0.608323;0.786728;, + -0.206681;0.608323;0.766307;, + -0.304936;0.608326;0.732771;, + -0.416899;0.555175;0.719705;, + -0.507273;0.555172;0.659134;, + -0.613275;0.499645;0.611759;, + -0.049701;0.649993;0.758313;, + -0.099591;0.658871;0.745634;, + -0.196064;0.658871;0.726257;, + -0.289183;0.658871;0.694451;, + -0.397973;0.608326;0.686700;, + -0.484200;0.608324;0.628882;, + -0.588968;0.555169;0.587285;, + -0.046821;0.698262;0.714310;, + -0.093865;0.706602;0.701358;, + -0.184607;0.706601;0.683108;, + -0.272194;0.706601;0.653166;, + -0.377350;0.658873;0.650764;, + -0.459062;0.658874;0.595942;, + -0.562144;0.608326;0.560298;, + -0.043736;0.743547;0.667252;, + -0.087739;0.751305;0.654097;, + -0.172365;0.751306;0.637047;, + -0.254044;0.751305;0.609100;, + -0.355118;0.706601;0.612051;, + -0.431968;0.706602;0.560462;, + -0.532922;0.658874;0.530923;, + -0.040463;0.785659;0.617335;, + -0.081242;0.792785;0.604062;, + -0.159392;0.792784;0.588293;, + -0.234816;0.792783;0.562455;, + -0.331374;0.751303;0.570733;, + -0.403034;0.751304;0.522596;, + -0.501428;0.706601;0.499285;, + -0.037018;0.824409;0.564783;, + -0.074399;0.830873;0.551465;, + -0.145742;0.830873;0.537037;, + -0.214595;0.830874;0.513418;, + -0.306224;0.792784;0.526992;, + -0.372390;0.792784;0.482514;, + -0.467797;0.751305;0.465517;, + -0.033417;0.859642;0.509802;, + -0.067243;0.865405;0.496541;, + -0.131478;0.865405;0.483515;, + -0.193466;0.865406;0.462216;, + -0.279773;0.830874;0.481016;, + -0.340167;0.830873;0.440382;, + -0.432185;0.792785;0.429776;, + -0.029671;0.891186;0.452667;, + -0.059806;0.896226;0.439547;, + -0.116669;0.896227;0.427978;, + -0.171533;0.896228;0.409087;, + -0.252141;0.865406;0.433009;, + -0.306506;0.865407;0.396390;, + -0.394737;0.830874;0.392214;, + -0.025794;0.918920;0.393599;, + -0.052120;0.923218;0.380726;, + -0.101372;0.923218;0.370666;, + -0.148886;0.923217;0.354265;, + -0.223461;0.896227;0.383200;, + -0.271569;0.896227;0.350753;, + -0.355621;0.865406;0.352997;, + -0.021817;0.942711;0.332897;, + -0.044227;0.946251;0.320396;, + -0.085671;0.946251;0.311882;, + -0.125645;0.946250;0.298033;, + -0.193852;0.923217;0.331801;, + -0.235504;0.923217;0.303658;, + -0.315026;0.896227;0.312308;, + -0.017753;0.962452;0.270871;, + -0.036171;0.965231;0.258885;, + -0.069654;0.965231;0.251949;, + -0.101942;0.965231;0.240703;, + -0.163473;0.946251;0.279081;, + -0.198503;0.946251;0.255356;, + -0.273123;0.923217;0.270322;, + -0.013623;0.978065;0.207855;, + -0.028007;0.980076;0.196636;, + -0.053433;0.980076;0.191299;, + -0.077949;0.980077;0.182685;, + -0.132491;0.965231;0.225335;, + -0.160768;0.965231;0.206116;, + -0.230134;0.946250;0.227264;, + -0.009461;0.989475;0.144392;, + -0.019844;0.990719;0.134466;, + -0.037231;0.990720;0.130724;, + -0.053975;0.990719;0.124746;, + -0.101125;0.980077;0.170949;, + -0.122572;0.980077;0.156288;, + -0.186296;0.965231;0.183368;, + -0.005351;0.996642;0.081706;, + -0.012075;0.997085;0.075339;, + -0.021808;0.997085;0.073117;, + -0.031164;0.997085;0.069647;, + -0.069793;0.990719;0.116635;, + -0.084420;0.990719;0.106528;, + -0.141924;0.980077;0.138951;, + -0.039990;0.997085;0.064982;, + -0.048128;0.997085;0.059207;, + -0.097603;0.990720;0.094596;, + -0.158848;0.980077;0.119235;, + -0.208637;0.965231;0.157482;, + -0.055445;0.997085;0.052418;, + -0.109116;0.990720;0.081047;, + -0.173051;0.980077;0.097484;, + -0.227407;0.965231;0.128902;, + -0.281112;0.946251;0.159955;, + -0.257828;0.946250;0.195281;, + -0.061811;0.997085;0.044735;, + -0.118761;0.990720;0.066112;, + -0.184295;0.980077;0.074061;, + -0.242287;0.965231;0.098117;, + -0.299586;0.946250;0.121896;, + -0.067122;0.997085;0.036282;, + -0.126374;0.990719;0.050046;, + -0.192386;0.980077;0.049373;, + -0.253022;0.965231;0.065651;, + -0.312932;0.946251;0.081747;, + -0.071283;0.997085;0.027213;, + -0.131825;0.990719;0.033123;, + -0.197185;0.980077;0.023837;, + -0.259427;0.965230;0.032065;, + -0.320926;0.946251;0.040200;, + -0.074225;0.997085;0.017674;, + -0.135021;0.990719;0.015630;, + -0.198609;0.980077;-0.002103;, + -0.261392;0.965230;-0.002071;, + -0.323428;0.946250;-0.002029;, + -0.075897;0.997085;0.007831;, + -0.135906;0.990719;-0.002126;, + -0.196636;0.980077;-0.028007;, + -0.258885;0.965231;-0.036171;, + -0.320396;0.946251;-0.044227;, + -0.076271;0.997085;-0.002138;, + -0.134466;0.990719;-0.019844;, + -0.191299;0.980076;-0.053433;, + -0.251949;0.965231;-0.069654;, + -0.311882;0.946251;-0.085671;, + -0.075339;0.997085;-0.012075;, + -0.130724;0.990720;-0.037231;, + -0.182685;0.980077;-0.077949;, + -0.240703;0.965231;-0.101942;, + -0.298033;0.946250;-0.125645;, + -0.073117;0.997085;-0.021808;, + -0.124746;0.990719;-0.053975;, + -0.170949;0.980077;-0.101125;, + -0.225334;0.965231;-0.132491;, + -0.279081;0.946251;-0.163473;, + -0.069647;0.997085;-0.031164;, + -0.116635;0.990719;-0.069793;, + -0.156288;0.980077;-0.122572;, + -0.206116;0.965231;-0.160768;, + -0.255356;0.946251;-0.198503;, + -0.064982;0.997085;-0.039990;, + -0.106528;0.990719;-0.084420;, + -0.138951;0.980077;-0.141924;, + -0.183368;0.965231;-0.186296;, + -0.227264;0.946250;-0.230134;, + -0.059207;0.997085;-0.048128;, + -0.157482;0.965231;-0.208637;, + -0.195281;0.946250;-0.257828;, + -0.159955;0.946251;-0.281112;, + -0.190422;0.923217;-0.333781;, + -0.232361;0.923217;-0.306070;, + -0.270322;0.923217;-0.273123;, + -0.121896;0.946250;-0.299586;, + -0.145224;0.923217;-0.355781;, + -0.167978;0.896227;-0.410561;, + -0.220132;0.896227;-0.385123;, + -0.268515;0.896228;-0.353095;, + -0.097546;0.923217;-0.371692;, + -0.112953;0.896227;-0.428975;, + -0.127890;0.865406;-0.484475;, + -0.190035;0.865406;-0.463636;, + -0.248926;0.865406;-0.434865;, + -0.048191;0.923218;-0.381242;, + -0.055996;0.896226;-0.440050;, + -0.063562;0.865405;-0.497025;, + -0.070862;0.830874;-0.551930;, + -0.142299;0.830873;-0.537960;, + -0.211301;0.830873;-0.514784;, + 0.000000;0.901199;-0.433406;, + -0.000000;0.870999;-0.491286;, + 0.000000;0.837073;-0.547092;, + 0.000000;0.799554;-0.600594;, + -0.077869;0.792785;-0.604507;, + -0.156107;0.792784;-0.589173;, + 0.055996;0.896226;-0.440050;, + 0.063562;0.865405;-0.497025;, + 0.070862;0.830874;-0.551930;, + 0.077869;0.792785;-0.604507;, + 0.000000;0.758621;-0.651532;, + -0.084545;0.751304;-0.654519;, + 0.112953;0.896227;-0.428975;, + 0.127890;0.865406;-0.484475;, + 0.142299;0.830873;-0.537960;, + 0.156107;0.792784;-0.589173;, + 0.084545;0.751304;-0.654519;, + 0.000000;0.714428;-0.699709;, + 0.167978;0.896227;-0.410561;, + 0.190035;0.865406;-0.463636;, + 0.211301;0.830873;-0.514784;, + 0.231672;0.792785;-0.563756;, + 0.169250;0.751305;-0.637883;, + 0.090858;0.706602;-0.701754;, + 0.220132;0.896227;-0.385123;, + 0.248926;0.865406;-0.434865;, + 0.276683;0.830874;-0.482799;, + 0.303277;0.792784;-0.528694;, + 0.251063;0.751305;-0.610334;, + 0.181676;0.706604;-0.683890;, + 0.268515;0.896228;-0.353095;, + 0.303559;0.865406;-0.398653;, + 0.337339;0.830873;-0.442552;, + 0.369695;0.792783;-0.484584;, + 0.328585;0.751302;-0.572344;, + 0.269394;0.706599;-0.654327;, + 0.312308;0.896227;-0.315026;, + 0.352997;0.865406;-0.355621;, + 0.392214;0.830874;-0.394737;, + 0.429776;0.792785;-0.432185;, + 0.400474;0.751305;-0.524559;, + 0.352493;0.706600;-0.613567;, + 0.350753;0.896227;-0.271569;, + 0.396390;0.865407;-0.306506;, + 0.440382;0.830873;-0.340167;, + 0.482514;0.792784;-0.372390;, + 0.465517;0.751305;-0.467797;, + 0.429560;0.706603;-0.562309;, + 0.383200;0.896227;-0.223461;, + 0.433009;0.865406;-0.252141;, + 0.481016;0.830874;-0.279773;, + 0.526992;0.792784;-0.306224;, + 0.522596;0.751304;-0.403034;, + 0.499285;0.706601;-0.501428;, + 0.409087;0.896228;-0.171533;, + 0.462216;0.865406;-0.193466;, + 0.513418;0.830874;-0.214595;, + 0.562455;0.792783;-0.234816;, + 0.570733;0.751303;-0.331374;, + 0.560462;0.706602;-0.431968;, + 0.427978;0.896227;-0.116669;, + 0.483515;0.865405;-0.131478;, + 0.537037;0.830873;-0.145742;, + 0.588293;0.792784;-0.159392;, + 0.609100;0.751305;-0.254044;, + 0.612051;0.706601;-0.355118;, + 0.439547;0.896226;-0.059806;, + 0.496541;0.865405;-0.067243;, + 0.551465;0.830873;-0.074399;, + 0.604062;0.792785;-0.081242;, + 0.637047;0.751306;-0.172365;, + 0.653166;0.706601;-0.272194;, + 0.443592;0.896227;-0.001925;, + 0.501070;0.865405;-0.001856;, + 0.556458;0.830874;-0.001782;, + 0.609498;0.792786;-0.001701;, + 0.654097;0.751305;-0.087739;, + 0.683108;0.706601;-0.184607;, + 0.440050;0.896226;0.055996;, + 0.497025;0.865405;0.063562;, + 0.551930;0.830874;0.070862;, + 0.604507;0.792785;0.077869;, + 0.659953;0.751305;-0.001613;, + 0.701358;0.706602;-0.093865;, + 0.428975;0.896227;0.112953;, + 0.484475;0.865406;0.127890;, + 0.537960;0.830873;0.142299;, + 0.589173;0.792784;0.156107;, + 0.654519;0.751304;0.084545;, + 0.707610;0.706601;-0.001516;, + 0.410561;0.896227;0.167978;, + 0.463636;0.865406;0.190035;, + 0.514784;0.830873;0.211301;, + 0.563756;0.792785;0.231672;, + 0.637883;0.751305;0.169250;, + 0.701754;0.706602;0.090858;, + 0.385123;0.896227;0.220132;, + 0.434865;0.865406;0.248926;, + 0.482799;0.830874;0.276683;, + 0.528694;0.792784;0.303277;, + 0.610334;0.751305;0.251063;, + 0.683890;0.706604;0.181676;, + 0.353095;0.896228;0.268515;, + 0.398653;0.865406;0.303559;, + 0.442552;0.830873;0.337339;, + 0.484584;0.792783;0.369695;, + 0.572344;0.751302;0.328585;, + 0.654327;0.706599;0.269394;, + 0.315026;0.896227;0.312308;, + 0.355621;0.865406;0.352997;, + 0.394737;0.830874;0.392214;, + 0.432185;0.792785;0.429776;, + 0.524559;0.751305;0.400474;, + 0.613567;0.706600;0.352493;, + 0.467797;0.751305;0.465517;, + 0.562309;0.706603;0.429560;, + 0.652178;0.658874;0.374900;, + 0.695534;0.658870;0.286572;, + 0.726991;0.658867;0.193335;, + 0.501428;0.706601;0.499285;, + 0.597663;0.658873;0.456820;, + 0.688005;0.608327;0.395711;, + 0.733769;0.608328;0.302523;, + 0.766981;0.608324;0.204161;, + 0.532923;0.658874;0.530922;, + 0.630469;0.608326;0.482130;, + 0.720898;0.555174;0.414835;, + 0.768877;0.555175;0.317189;, + 0.803701;0.555175;0.214116;, + 0.562144;0.608326;0.560298;, + 0.660585;0.555172;0.505383;, + 0.750714;0.499643;0.432187;, + 0.800703;0.499642;0.330502;, + 0.836991;0.499647;0.223159;, + 0.588968;0.555169;0.587285;, + 0.687879;0.499643;0.526478;, + 0.777325;0.441971;0.447691;, + 0.829110;0.441968;0.342404;, + 0.866708;0.441972;0.231253;, + 0.613275;0.499645;0.611759;, + 0.712237;0.441973;0.545324;, + 0.800613;0.382408;0.461284;, + 0.853973;0.382407;0.352839;, + 0.892722;0.382404;0.238358;, + 0.634965;0.441977;0.633621;, + 0.733553;0.382409;0.561839;, + 0.820478;0.321211;0.472906;, + 0.875184;0.321215;0.361766;, + 0.914917;0.321212;0.244439;, + 0.653942;0.382408;0.652782;, + 0.751733;0.321206;0.575955;, + 0.836837;0.258631;0.482508;, + 0.892657;0.258633;0.369151;, + 0.933203;0.258638;0.249477;, + 0.670124;0.321208;0.669148;, + 0.766698;0.258633;0.587607;, + 0.849617;0.194952;0.490046;, + 0.906313;0.194954;0.374954;, + 0.947501;0.194947;0.253453;, + 0.683441;0.258632;0.682655;, + 0.778387;0.194949;0.596748;, + 0.858766;0.130428;0.495489;, + 0.916094;0.130433;0.379157;, + 0.957746;0.130436;0.256337;, + 0.693835;0.194947;0.693245;, + 0.786747;0.130435;0.603337;, + 0.864245;0.065361;0.498808;, + 0.921957;0.065355;0.381738;, + 0.963897;0.065356;0.258130;, + 0.701263;0.130435;0.700868;, + 0.791743;0.065357;0.607348;, + 0.866025;-0.000003;0.500001;, + 0.923879;0.000000;0.382685;, + 0.965926;0.000002;0.258819;, + 0.705695;0.065360;0.705495;, + 0.793355;0.000000;0.608759;, + 0.864104;-0.065353;0.499052;, + 0.921850;-0.065356;0.381996;, + 0.963824;-0.065359;0.258402;, + 0.707107;0.000000;0.707107;, + 0.791574;-0.065356;0.607569;, + 0.858487;-0.130434;0.495971;, + 0.915879;-0.130433;0.379675;, + 0.957602;-0.130431;0.256879;, + 0.705495;-0.065360;0.705695;, + 0.786405;-0.130436;0.603783;, + 0.849201;-0.194948;0.490768;, + 0.905992;-0.194951;0.375729;, + 0.947284;-0.194952;0.254258;, + 0.700868;-0.130435;0.701263;, + 0.777876;-0.194952;0.597414;, + 0.836281;-0.258636;0.483469;, + 0.892232;-0.258636;0.370176;, + 0.932916;-0.258635;0.250550;, + 0.693245;-0.194947;0.693835;, + 0.766024;-0.258630;0.588488;, + 0.819790;-0.321208;0.474100;, + 0.874657;-0.321211;0.363041;, + 0.914560;-0.321212;0.245771;, + 0.682655;-0.258632;0.683441;, + 0.750893;-0.321209;0.577047;, + 0.799792;-0.382409;0.462705;, + 0.853345;-0.382408;0.354355;, + 0.892297;-0.382406;0.239941;, + 0.669148;-0.321208;0.670124;, + 0.732556;-0.382406;0.563141;, + 0.776377;-0.441969;0.449335;, + 0.828384;-0.441970;0.344154;, + 0.866216;-0.441973;0.233086;, + 0.652782;-0.382408;0.653942;, + 0.711084;-0.441972;0.546828;, + 0.749641;-0.499644;0.434044;, + 0.799885;-0.499641;0.332481;, + 0.836436;-0.499645;0.225232;, + 0.633621;-0.441977;0.634965;, + 0.686571;-0.499647;0.528179;, + 0.719705;-0.555175;0.416899;, + 0.767966;-0.555175;0.319390;, + 0.803084;-0.555175;0.216418;, + 0.611759;-0.499645;0.613275;, + 0.659135;-0.555172;0.507274;, + 0.686700;-0.608326;0.397973;, + 0.732771;-0.608326;0.304936;, + 0.766307;-0.608323;0.206681;, + 0.587285;-0.555169;0.588968;, + 0.628882;-0.608324;0.484200;, + 0.650764;-0.658873;0.377350;, + 0.694451;-0.658871;0.289183;, + 0.726257;-0.658871;0.196064;, + 0.560298;-0.608326;0.562144;, + 0.595942;-0.658874;0.459062;, + 0.612051;-0.706601;0.355118;, + 0.653166;-0.706601;0.272194;, + 0.683108;-0.706601;0.184607;, + 0.530923;-0.658874;0.532923;, + 0.560462;-0.706602;0.431968;, + 0.570733;-0.751303;0.331374;, + 0.609100;-0.751305;0.254044;, + 0.637047;-0.751306;0.172365;, + 0.499285;-0.706601;0.501428;, + 0.522596;-0.751304;0.403034;, + 0.526992;-0.792784;0.306224;, + 0.562455;-0.792783;0.234816;, + 0.588293;-0.792784;0.159392;, + 0.465517;-0.751305;0.467797;, + 0.482514;-0.792784;0.372390;, + 0.481016;-0.830874;0.279773;, + 0.513418;-0.830874;0.214595;, + 0.537037;-0.830873;0.145742;, + 0.429776;-0.792785;0.432185;, + 0.440382;-0.830873;0.340167;, + 0.433009;-0.865406;0.252141;, + 0.462216;-0.865406;0.193466;, + 0.483515;-0.865405;0.131478;, + 0.392214;-0.830874;0.394737;, + 0.396390;-0.865407;0.306506;, + 0.383200;-0.896227;0.223461;, + 0.409087;-0.896228;0.171533;, + 0.427979;-0.896227;0.116669;, + 0.352997;-0.865406;0.355621;, + 0.350753;-0.896227;0.271569;, + 0.331801;-0.923217;0.193852;, + 0.354265;-0.923217;0.148886;, + 0.370666;-0.923218;0.101372;, + 0.312308;-0.896227;0.315026;, + 0.303658;-0.923217;0.235504;, + 0.270322;-0.923217;0.273123;, + 0.380726;-0.923218;0.052120;, + 0.439547;-0.896226;0.059806;, + 0.496541;-0.865405;0.067243;, + 0.384271;-0.923218;0.001981;, + 0.443592;-0.896227;0.001925;, + 0.501070;-0.865405;0.001856;, + 0.551465;-0.830873;0.074399;, + 0.604062;-0.792785;0.081242;, + 0.381243;-0.923218;-0.048191;, + 0.440050;-0.896226;-0.055996;, + 0.497025;-0.865405;-0.063562;, + 0.556458;-0.830874;0.001782;, + 0.609498;-0.792786;0.001701;, + 0.654097;-0.751305;0.087739;, + 0.371692;-0.923217;-0.097546;, + 0.428975;-0.896227;-0.112953;, + 0.484475;-0.865406;-0.127890;, + 0.551930;-0.830874;-0.070862;, + 0.604507;-0.792785;-0.077869;, + 0.659953;-0.751305;0.001613;, + 0.355781;-0.923217;-0.145224;, + 0.410561;-0.896227;-0.167978;, + 0.463636;-0.865406;-0.190035;, + 0.537960;-0.830873;-0.142299;, + 0.589173;-0.792784;-0.156107;, + 0.654519;-0.751304;-0.084545;, + 0.333781;-0.923217;-0.190422;, + 0.385123;-0.896227;-0.220132;, + 0.434865;-0.865406;-0.248926;, + 0.514784;-0.830873;-0.211301;, + 0.563756;-0.792785;-0.231672;, + 0.637883;-0.751305;-0.169250;, + 0.306070;-0.923217;-0.232361;, + 0.353095;-0.896228;-0.268515;, + 0.398653;-0.865406;-0.303559;, + 0.482799;-0.830874;-0.276683;, + 0.528694;-0.792784;-0.303277;, + 0.610334;-0.751305;-0.251063;, + 0.273123;-0.923217;-0.270322;, + 0.315026;-0.896227;-0.312308;, + 0.355621;-0.865406;-0.352997;, + 0.442552;-0.830873;-0.337339;, + 0.484584;-0.792783;-0.369695;, + 0.572344;-0.751302;-0.328585;, + 0.235504;-0.923217;-0.303657;, + 0.271569;-0.896227;-0.350753;, + 0.306506;-0.865407;-0.396390;, + 0.394737;-0.830874;-0.392214;, + 0.432185;-0.792785;-0.429776;, + 0.524559;-0.751305;-0.400474;, + 0.223461;-0.896227;-0.383200;, + 0.252141;-0.865406;-0.433009;, + 0.340167;-0.830873;-0.440382;, + 0.372390;-0.792784;-0.482514;, + 0.467797;-0.751305;-0.465517;, + 0.171533;-0.896228;-0.409087;, + 0.193466;-0.865406;-0.462216;, + 0.279773;-0.830874;-0.481016;, + 0.306224;-0.792784;-0.526992;, + 0.403034;-0.751304;-0.522596;, + 0.116669;-0.896227;-0.427978;, + 0.131478;-0.865405;-0.483515;, + 0.214595;-0.830874;-0.513418;, + 0.234816;-0.792783;-0.562455;, + 0.331374;-0.751303;-0.570733;, + 0.052120;-0.923218;-0.380726;, + 0.059806;-0.896226;-0.439547;, + 0.067243;-0.865405;-0.496541;, + 0.145742;-0.830873;-0.537037;, + 0.159392;-0.792784;-0.588293;, + 0.254044;-0.751305;-0.609100;, + -0.000000;-0.942935;-0.332977;, + -0.000000;-0.919226;-0.393730;, + -0.000000;-0.891578;-0.452867;, + 0.000000;-0.860123;-0.510087;, + 0.074399;-0.830873;-0.551465;, + -0.052120;-0.923218;-0.380726;, + -0.059806;-0.896226;-0.439547;, + -0.067243;-0.865405;-0.496541;, + -0.074399;-0.830873;-0.551465;, + 0.000000;-0.824974;-0.565170;, + 0.081242;-0.792785;-0.604062;, + -0.101372;-0.923218;-0.370666;, + -0.116669;-0.896227;-0.427978;, + -0.131478;-0.865405;-0.483515;, + -0.145742;-0.830873;-0.537037;, + -0.159392;-0.792784;-0.588293;, + -0.081242;-0.792785;-0.604062;, + -0.148886;-0.923217;-0.354265;, + -0.171533;-0.896228;-0.409087;, + -0.193466;-0.865406;-0.462216;, + -0.214595;-0.830874;-0.513418;, + -0.234816;-0.792783;-0.562455;, + -0.193852;-0.923217;-0.331801;, + -0.223461;-0.896227;-0.383200;, + -0.252141;-0.865406;-0.433009;, + -0.279773;-0.830874;-0.481016;, + -0.306224;-0.792784;-0.526992;, + -0.235504;-0.923217;-0.303658;, + -0.271569;-0.896227;-0.350753;, + -0.306506;-0.865407;-0.396390;, + -0.340167;-0.830873;-0.440382;, + -0.372390;-0.792784;-0.482514;, + -0.273123;-0.923217;-0.270322;, + -0.315026;-0.896227;-0.312308;, + -0.355621;-0.865406;-0.352997;, + -0.394737;-0.830874;-0.392214;, + -0.432185;-0.792785;-0.429776;, + -0.306070;-0.923217;-0.232361;, + -0.353095;-0.896228;-0.268515;, + -0.398653;-0.865406;-0.303559;, + -0.442552;-0.830873;-0.337339;, + -0.484584;-0.792783;-0.369695;, + -0.333781;-0.923217;-0.190422;, + -0.385123;-0.896227;-0.220132;, + -0.434865;-0.865406;-0.248926;, + -0.482799;-0.830874;-0.276683;, + -0.528694;-0.792784;-0.303277;, + -0.355781;-0.923217;-0.145224;, + -0.410561;-0.896227;-0.167978;, + -0.463636;-0.865406;-0.190035;, + -0.514784;-0.830873;-0.211301;, + -0.563756;-0.792785;-0.231672;, + -0.371692;-0.923217;-0.097546;, + -0.428975;-0.896227;-0.112953;, + -0.484475;-0.865406;-0.127890;, + -0.537960;-0.830873;-0.142299;, + -0.589173;-0.792784;-0.156107;, + -0.381242;-0.923218;-0.048191;, + -0.440050;-0.896226;-0.055996;, + -0.497025;-0.865405;-0.063562;, + -0.551930;-0.830874;-0.070862;, + -0.604507;-0.792785;-0.077869;, + -0.384271;-0.923218;0.001981;, + -0.443592;-0.896227;0.001925;, + -0.501070;-0.865405;0.001856;, + -0.556458;-0.830874;0.001782;, + -0.609498;-0.792786;0.001701;, + -0.380726;-0.923218;0.052120;, + -0.439547;-0.896226;0.059806;, + -0.496541;-0.865405;0.067243;, + -0.551465;-0.830873;0.074399;, + -0.604062;-0.792785;0.081242;, + -0.370666;-0.923218;0.101372;, + -0.427978;-0.896227;0.116669;, + -0.483515;-0.865405;0.131478;, + -0.537037;-0.830873;0.145742;, + -0.588293;-0.792784;0.159392;, + -0.354265;-0.923217;0.148886;, + -0.409087;-0.896228;0.171533;, + -0.462216;-0.865406;0.193466;, + -0.513418;-0.830874;0.214595;, + -0.562455;-0.792783;0.234816;, + -0.331801;-0.923217;0.193852;, + -0.383200;-0.896227;0.223461;, + -0.433009;-0.865406;0.252141;, + -0.481016;-0.830874;0.279773;, + -0.526992;-0.792784;0.306224;, + -0.303658;-0.923217;0.235504;, + -0.350753;-0.896227;0.271569;, + -0.396390;-0.865407;0.306506;, + -0.440382;-0.830873;0.340167;, + -0.482514;-0.792784;0.372390;, + -0.522596;-0.751304;0.403034;, + -0.570733;-0.751303;0.331374;, + -0.609100;-0.751305;0.254044;, + -0.560462;-0.706602;0.431968;, + -0.612051;-0.706601;0.355118;, + -0.653166;-0.706601;0.272194;, + -0.637047;-0.751306;0.172365;, + -0.654097;-0.751305;0.087739;, + -0.595942;-0.658874;0.459062;, + -0.650764;-0.658873;0.377350;, + -0.694451;-0.658871;0.289183;, + -0.683108;-0.706601;0.184607;, + -0.701358;-0.706602;0.093865;, + -0.659953;-0.751305;0.001613;, + -0.628882;-0.608324;0.484200;, + -0.686700;-0.608326;0.397973;, + -0.732771;-0.608326;0.304936;, + -0.726257;-0.658871;0.196064;, + -0.745634;-0.658871;0.099591;, + -0.707610;-0.706601;0.001516;, + -0.659134;-0.555172;0.507274;, + -0.719705;-0.555175;0.416899;, + -0.767965;-0.555175;0.319390;, + -0.766307;-0.608323;0.206681;, + -0.786728;-0.608323;0.104891;, + -0.752255;-0.658870;0.001413;, + -0.686571;-0.499647;0.528179;, + -0.749641;-0.499644;0.434044;, + -0.799885;-0.499641;0.332481;, + -0.803084;-0.555175;0.216418;, + -0.824462;-0.555174;0.109745;, + -0.793687;-0.608325;0.001306;, + -0.711084;-0.441972;0.546828;, + -0.776377;-0.441969;0.449335;, + -0.828384;-0.441970;0.344154;, + -0.836436;-0.499645;0.225232;, + -0.858679;-0.499645;0.114128;, + -0.831734;-0.555173;0.001192;, + -0.732556;-0.382406;0.563141;, + -0.799792;-0.382409;0.462705;, + -0.853345;-0.382408;0.354355;, + -0.866216;-0.441973;0.233086;, + -0.889229;-0.441975;0.118026;, + -0.866230;-0.499644;0.001071;, + -0.750893;-0.321209;0.577048;, + -0.819790;-0.321208;0.474099;, + -0.874657;-0.321211;0.363041;, + -0.892297;-0.382406;0.239941;, + -0.915981;-0.382408;0.121421;, + -0.897026;-0.441977;0.000949;, + -0.766024;-0.258630;0.588488;, + -0.836281;-0.258636;0.483469;, + -0.892232;-0.258636;0.370176;, + -0.914560;-0.321212;0.245771;, + -0.938817;-0.321208;0.124292;, + -0.923994;-0.382406;0.000820;, + -0.777876;-0.194952;0.597414;, + -0.849201;-0.194948;0.490768;, + -0.905992;-0.194951;0.375729;, + -0.932916;-0.258635;0.250550;, + -0.957638;-0.258637;0.126635;, + -0.947008;-0.321208;0.000690;, + -0.786405;-0.130436;0.603783;, + -0.858487;-0.130434;0.495971;, + -0.915879;-0.130433;0.379675;, + -0.947284;-0.194952;0.254258;, + -0.972368;-0.194951;0.128436;, + -0.965975;-0.258635;0.000554;, + -0.791574;-0.065356;0.607569;, + -0.864104;-0.065353;0.499052;, + -0.921850;-0.065356;0.381996;, + -0.957602;-0.130431;0.256879;, + -0.982939;-0.130433;0.129688;, + -0.980813;-0.194951;0.000418;, + -0.793355;0.000000;0.608759;, + -0.866025;-0.000003;0.500001;, + -0.923879;0.000000;0.382685;, + -0.963824;-0.065359;0.258402;, + -0.989307;-0.065356;0.130385;, + -0.991457;-0.130434;0.000281;, + -0.791743;0.065357;0.607348;, + -0.864244;0.065361;0.498808;, + -0.921957;0.065355;0.381738;, + -0.965926;0.000002;0.258819;, + -0.991445;-0.000000;0.130525;, + -0.997862;-0.065356;0.000140;, + -0.786747;0.130435;0.603337;, + -0.858766;0.130428;0.495489;, + -0.916094;0.130433;0.379157;, + -0.963897;0.065356;0.258130;, + -0.989343;0.065357;0.130108;, + -1.000000;-0.000000;-0.000000;, + -0.778387;0.194949;0.596748;, + -0.849617;0.194952;0.490046;, + -0.906313;0.194954;0.374954;, + -0.957746;0.130436;0.256337;, + -0.983012;0.130430;0.129135;, + -0.997862;0.065356;-0.000140;, + -0.766698;0.258633;0.587607;, + -0.836837;0.258631;0.482508;, + -0.892657;0.258633;0.369151;, + -0.947501;0.194947;0.253453;, + -0.972476;0.194953;0.127605;, + -0.991457;0.130434;-0.000281;, + -0.751733;0.321206;0.575955;, + -0.820478;0.321211;0.472906;, + -0.875184;0.321215;0.361766;, + -0.933203;0.258638;0.249477;, + -0.957783;0.258637;0.125534;, + -0.980813;0.194951;-0.000418;, + -0.733553;0.382409;0.561839;, + -0.800613;0.382408;0.461284;, + -0.853973;0.382407;0.352839;, + -0.914917;0.321212;0.244439;, + -0.938996;0.321209;0.122927;, + -0.965975;0.258635;-0.000554;, + -0.712237;0.441973;0.545324;, + -0.777325;0.441971;0.447691;, + -0.829110;0.441968;0.342404;, + -0.892722;0.382404;0.238358;, + -0.916197;0.382405;0.119793;, + -0.947008;0.321208;-0.000690;, + -0.687879;0.499643;0.526478;, + -0.750714;0.499643;0.432187;, + -0.800703;0.499642;0.330502;, + -0.866708;0.441972;0.231253;, + -0.889476;0.441976;0.116144;, + -0.923994;0.382406;-0.000820;, + -0.660585;0.555172;0.505383;, + -0.720898;0.555174;0.414835;, + -0.768877;0.555175;0.317189;, + -0.836991;0.499647;0.223159;, + -0.858958;0.499646;0.112002;, + -0.897026;0.441977;-0.000949;, + -0.630469;0.608326;0.482130;, + -0.688005;0.608327;0.395711;, + -0.733769;0.608328;0.302523;, + -0.803701;0.555175;0.214116;, + -0.824774;0.555173;0.107383;, + -0.866230;0.499645;-0.001071;, + -0.597664;0.658873;0.456820;, + -0.652178;0.658874;0.374900;, + -0.695534;0.658870;0.286572;, + -0.766981;0.608324;0.204161;, + -0.787069;0.608323;0.102304;, + -0.831734;0.555173;-0.001192;, + -0.562309;0.706603;0.429560;, + -0.613567;0.706600;0.352493;, + -0.654327;0.706599;0.269394;, + -0.726991;0.658867;0.193335;, + -0.746003;0.658872;0.096785;, + -0.793687;0.608325;-0.001306;, + -0.524559;0.751305;0.400474;, + -0.572344;0.751302;0.328585;, + -0.610334;0.751305;0.251063;, + -0.683890;0.706604;0.181676;, + -0.701754;0.706602;0.090858;, + -0.752255;0.658870;-0.001413;, + -0.484584;0.792783;0.369695;, + -0.528694;0.792784;0.303277;, + -0.563756;0.792785;0.231672;, + -0.637883;0.751305;0.169250;, + -0.654519;0.751304;0.084545;, + -0.707610;0.706601;-0.001516;, + -0.442552;0.830874;0.337339;, + -0.482799;0.830874;0.276683;, + -0.514784;0.830873;0.211301;, + -0.589173;0.792784;0.156107;, + -0.604507;0.792785;0.077869;, + -0.659953;0.751305;-0.001613;, + -0.398653;0.865406;0.303559;, + -0.434865;0.865406;0.248926;, + -0.463636;0.865406;0.190035;, + -0.537960;0.830873;0.142299;, + -0.551930;0.830874;0.070862;, + -0.609498;0.792786;-0.001701;, + -0.353095;0.896228;0.268515;, + -0.385123;0.896227;0.220132;, + -0.410561;0.896227;0.167978;, + -0.484475;0.865406;0.127890;, + -0.497025;0.865405;0.063562;, + -0.556458;0.830874;-0.001782;, + -0.306070;0.923217;0.232361;, + -0.333781;0.923217;0.190422;, + -0.355781;0.923217;0.145224;, + -0.428975;0.896227;0.112953;, + -0.440050;0.896226;0.055996;, + -0.501070;0.865405;-0.001856;, + -0.371692;0.923217;0.097546;, + -0.381242;0.923218;0.048191;, + -0.443592;0.896227;-0.001925;, + -0.496541;0.865405;-0.067243;, + -0.551465;0.830873;-0.074399;, + -0.384271;0.923218;-0.001981;, + -0.439547;0.896226;-0.059806;, + -0.483515;0.865405;-0.131478;, + -0.537037;0.830873;-0.145742;, + -0.588293;0.792784;-0.159392;, + -0.604062;0.792785;-0.081242;, + -0.380726;0.923218;-0.052120;, + -0.427978;0.896227;-0.116669;, + -0.462216;0.865406;-0.193466;, + -0.513418;0.830874;-0.214595;, + -0.562455;0.792783;-0.234816;, + -0.370666;0.923218;-0.101372;, + -0.409087;0.896228;-0.171533;, + -0.433009;0.865406;-0.252141;, + -0.481016;0.830874;-0.279773;, + -0.526992;0.792784;-0.306224;, + -0.354265;0.923217;-0.148886;, + -0.383200;0.896227;-0.223461;, + -0.396390;0.865407;-0.306506;, + -0.440382;0.830873;-0.340167;, + -0.482514;0.792784;-0.372390;, + -0.331801;0.923217;-0.193852;, + -0.350753;0.896227;-0.271569;, + -0.352997;0.865406;-0.355621;, + -0.392214;0.830874;-0.394737;, + -0.429776;0.792785;-0.432185;, + -0.303658;0.923217;-0.235504;, + -0.312308;0.896227;-0.315026;, + -0.303559;0.865406;-0.398653;, + -0.337339;0.830873;-0.442552;, + -0.369695;0.792783;-0.484584;, + -0.276683;0.830874;-0.482799;, + -0.303277;0.792784;-0.528694;, + -0.328585;0.751302;-0.572344;, + -0.400474;0.751305;-0.524559;, + -0.465517;0.751305;-0.467797;, + -0.231672;0.792785;-0.563756;, + -0.251063;0.751305;-0.610334;, + -0.269394;0.706599;-0.654327;, + -0.352493;0.706600;-0.613567;, + -0.429560;0.706603;-0.562309;, + -0.169250;0.751305;-0.637883;, + -0.181676;0.706604;-0.683890;, + -0.193335;0.658867;-0.726991;, + -0.286572;0.658870;-0.695534;, + -0.374900;0.658874;-0.652178;, + -0.090858;0.706602;-0.701754;, + -0.096785;0.658872;-0.746003;, + -0.102304;0.608323;-0.787069;, + -0.204161;0.608324;-0.766981;, + -0.302523;0.608328;-0.733769;, + 0.000000;0.667180;-0.744897;, + 0.000000;0.617074;-0.786905;, + 0.000000;0.564331;-0.825549;, + -0.107383;0.555173;-0.824774;, + -0.214116;0.555175;-0.803701;, + 0.096785;0.658872;-0.746003;, + 0.102304;0.608323;-0.787069;, + 0.107383;0.555173;-0.824774;, + 0.000000;0.509167;-0.860668;, + -0.112002;0.499646;-0.858958;, + 0.193335;0.658867;-0.726991;, + 0.204161;0.608324;-0.766981;, + 0.214116;0.555175;-0.803701;, + 0.112002;0.499646;-0.858958;, + 0.000000;0.451828;-0.892105;, + 0.286572;0.658870;-0.695534;, + 0.302523;0.608328;-0.733769;, + 0.317189;0.555175;-0.768877;, + 0.223159;0.499646;-0.836991;, + 0.116144;0.441976;-0.889476;, + 0.374900;0.658874;-0.652178;, + 0.395711;0.608327;-0.688005;, + 0.414835;0.555174;-0.720898;, + 0.330502;0.499642;-0.800703;, + 0.231253;0.441972;-0.866708;, + 0.456820;0.658873;-0.597663;, + 0.482130;0.608326;-0.630469;, + 0.505383;0.555172;-0.660585;, + 0.432187;0.499643;-0.750714;, + 0.342404;0.441968;-0.829110;, + 0.530923;0.658874;-0.532923;, + 0.560298;0.608326;-0.562144;, + 0.587285;0.555169;-0.588968;, + 0.526478;0.499643;-0.687879;, + 0.447691;0.441971;-0.777325;, + 0.595942;0.658874;-0.459062;, + 0.628882;0.608324;-0.484200;, + 0.659134;0.555172;-0.507274;, + 0.611759;0.499645;-0.613275;, + 0.545324;0.441973;-0.712237;, + 0.650764;0.658873;-0.377350;, + 0.686700;0.608326;-0.397973;, + 0.719705;0.555175;-0.416899;, + 0.686571;0.499647;-0.528179;, + 0.633621;0.441977;-0.634965;, + 0.694451;0.658871;-0.289183;, + 0.732771;0.608326;-0.304936;, + 0.767966;0.555175;-0.319390;, + 0.749641;0.499644;-0.434044;, + 0.711084;0.441972;-0.546828;, + 0.726257;0.658871;-0.196064;, + 0.766307;0.608323;-0.206681;, + 0.803084;0.555175;-0.216418;, + 0.799885;0.499641;-0.332481;, + 0.776377;0.441969;-0.449335;, + 0.745634;0.658871;-0.099591;, + 0.786728;0.608323;-0.104891;, + 0.824462;0.555174;-0.109744;, + 0.836436;0.499645;-0.225232;, + 0.828384;0.441970;-0.344154;, + 0.752255;0.658870;-0.001413;, + 0.793687;0.608325;-0.001306;, + 0.831734;0.555173;-0.001192;, + 0.858679;0.499645;-0.114128;, + 0.866216;0.441973;-0.233085;, + 0.746003;0.658872;0.096785;, + 0.787069;0.608323;0.102304;, + 0.824774;0.555173;0.107383;, + 0.866230;0.499645;-0.001071;, + 0.889229;0.441975;-0.118026;, + 0.858958;0.499646;0.112002;, + 0.897026;0.441977;-0.000949;, + 0.915981;0.382407;-0.121420;, + 0.892297;0.382406;-0.239941;, + 0.853345;0.382407;-0.354355;, + 0.889476;0.441976;0.116144;, + 0.923994;0.382406;-0.000820;, + 0.938817;0.321208;-0.124292;, + 0.914560;0.321212;-0.245771;, + 0.874657;0.321211;-0.363041;, + 0.916197;0.382405;0.119793;, + 0.947008;0.321208;-0.000690;, + 0.957638;0.258637;-0.126635;, + 0.932916;0.258635;-0.250550;, + 0.892232;0.258636;-0.370176;, + 0.938996;0.321209;0.122927;, + 0.965975;0.258635;-0.000554;, + 0.972368;0.194951;-0.128436;, + 0.947284;0.194952;-0.254258;, + 0.905992;0.194951;-0.375729;, + 0.957783;0.258637;0.125534;, + 0.980813;0.194951;-0.000418;, + 0.982939;0.130433;-0.129688;, + 0.957602;0.130431;-0.256879;, + 0.915879;0.130433;-0.379675;, + 0.972476;0.194953;0.127605;, + 0.991457;0.130434;-0.000281;, + 0.989307;0.065356;-0.130385;, + 0.963824;0.065359;-0.258402;, + 0.921850;0.065356;-0.381996;, + 0.983012;0.130430;0.129135;, + 0.997862;0.065356;-0.000140;, + 0.991445;0.000000;-0.130525;, + 0.965926;-0.000002;-0.258819;, + 0.923879;-0.000000;-0.382685;, + 0.989343;0.065357;0.130108;, + 1.000000;0.000000;0.000000;, + 0.989343;-0.065357;-0.130108;, + 0.963897;-0.065356;-0.258130;, + 0.921957;-0.065355;-0.381738;, + 0.991445;-0.000000;0.130525;, + 0.997862;-0.065356;0.000140;, + 0.983012;-0.130430;-0.129135;, + 0.957746;-0.130436;-0.256337;, + 0.916094;-0.130433;-0.379157;, + 0.989307;-0.065356;0.130385;, + 0.991457;-0.130434;0.000281;, + 0.972476;-0.194953;-0.127605;, + 0.947501;-0.194947;-0.253453;, + 0.906313;-0.194954;-0.374954;, + 0.982939;-0.130433;0.129688;, + 0.980813;-0.194951;0.000418;, + 0.957783;-0.258637;-0.125534;, + 0.933203;-0.258638;-0.249477;, + 0.892657;-0.258633;-0.369151;, + 0.972368;-0.194951;0.128436;, + 0.965975;-0.258635;0.000554;, + 0.938996;-0.321209;-0.122927;, + 0.914917;-0.321212;-0.244439;, + 0.875184;-0.321215;-0.361766;, + 0.957638;-0.258637;0.126635;, + 0.947008;-0.321208;0.000690;, + 0.916197;-0.382405;-0.119793;, + 0.892722;-0.382404;-0.238358;, + 0.853973;-0.382407;-0.352839;, + 0.938817;-0.321208;0.124292;, + 0.923994;-0.382406;0.000820;, + 0.889476;-0.441976;-0.116144;, + 0.866708;-0.441972;-0.231253;, + 0.829110;-0.441968;-0.342404;, + 0.915981;-0.382407;0.121420;, + 0.897026;-0.441977;0.000949;, + 0.858958;-0.499646;-0.112002;, + 0.836991;-0.499646;-0.223159;, + 0.800703;-0.499642;-0.330502;, + 0.889229;-0.441975;0.118026;, + 0.866230;-0.499644;0.001071;, + 0.824774;-0.555173;-0.107383;, + 0.803701;-0.555175;-0.214116;, + 0.768877;-0.555175;-0.317189;, + 0.858679;-0.499645;0.114128;, + 0.831734;-0.555173;0.001192;, + 0.787069;-0.608323;-0.102304;, + 0.766981;-0.608324;-0.204161;, + 0.733769;-0.608328;-0.302523;, + 0.824462;-0.555174;0.109745;, + 0.793687;-0.608325;0.001306;, + 0.746003;-0.658872;-0.096785;, + 0.726991;-0.658867;-0.193335;, + 0.695534;-0.658870;-0.286572;, + 0.786728;-0.608323;0.104891;, + 0.752255;-0.658870;0.001413;, + 0.701754;-0.706602;-0.090858;, + 0.683890;-0.706604;-0.181676;, + 0.654327;-0.706599;-0.269394;, + 0.745634;-0.658871;0.099591;, + 0.707610;-0.706601;0.001516;, + 0.701358;-0.706602;0.093865;, + 0.613567;-0.706600;-0.352493;, + 0.652178;-0.658874;-0.374900;, + 0.688005;-0.608327;-0.395711;, + 0.562309;-0.706603;-0.429560;, + 0.597664;-0.658873;-0.456820;, + 0.630469;-0.608326;-0.482130;, + 0.720898;-0.555174;-0.414835;, + 0.750714;-0.499643;-0.432187;, + 0.501428;-0.706601;-0.499285;, + 0.532923;-0.658874;-0.530922;, + 0.562144;-0.608326;-0.560298;, + 0.660585;-0.555172;-0.505383;, + 0.687879;-0.499643;-0.526478;, + 0.777325;-0.441971;-0.447691;, + 0.431968;-0.706602;-0.560462;, + 0.459062;-0.658874;-0.595942;, + 0.484200;-0.608324;-0.628882;, + 0.588968;-0.555169;-0.587285;, + 0.613275;-0.499645;-0.611759;, + 0.712237;-0.441973;-0.545324;, + 0.355118;-0.706601;-0.612051;, + 0.377350;-0.658873;-0.650764;, + 0.397973;-0.608326;-0.686700;, + 0.507273;-0.555172;-0.659134;, + 0.528179;-0.499647;-0.686571;, + 0.634965;-0.441977;-0.633621;, + 0.272194;-0.706601;-0.653166;, + 0.289183;-0.658871;-0.694451;, + 0.304936;-0.608326;-0.732771;, + 0.416899;-0.555175;-0.719705;, + 0.434044;-0.499644;-0.749641;, + 0.546828;-0.441972;-0.711084;, + 0.172365;-0.751306;-0.637047;, + 0.184607;-0.706601;-0.683108;, + 0.196064;-0.658871;-0.726257;, + 0.206681;-0.608323;-0.766307;, + 0.319390;-0.555175;-0.767966;, + 0.087739;-0.751305;-0.654097;, + 0.093865;-0.706602;-0.701358;, + 0.099591;-0.658871;-0.745634;, + 0.104891;-0.608323;-0.786728;, + 0.216418;-0.555175;-0.803084;, + 0.332481;-0.499641;-0.799885;, + 0.000000;-0.786303;-0.617841;, + -0.000000;-0.744259;-0.667891;, + 0.000000;-0.699029;-0.715094;, + 0.000000;-0.650798;-0.759251;, + 0.000000;-0.599793;-0.800155;, + 0.109745;-0.555174;-0.824462;, + -0.087739;-0.751305;-0.654097;, + -0.093865;-0.706602;-0.701358;, + -0.099591;-0.658871;-0.745634;, + -0.104891;-0.608323;-0.786728;, + -0.109745;-0.555174;-0.824462;, + 0.000000;-0.546215;-0.837645;, + -0.172365;-0.751306;-0.637047;, + -0.184607;-0.706601;-0.683108;, + -0.196064;-0.658871;-0.726257;, + -0.206681;-0.608323;-0.766307;, + -0.216418;-0.555175;-0.803084;, + -0.254044;-0.751305;-0.609100;, + -0.272194;-0.706601;-0.653166;, + -0.289183;-0.658871;-0.694451;, + -0.304936;-0.608326;-0.732771;, + -0.319390;-0.555175;-0.767966;, + -0.331374;-0.751303;-0.570733;, + -0.355118;-0.706601;-0.612051;, + -0.377350;-0.658873;-0.650764;, + -0.397973;-0.608326;-0.686700;, + -0.416899;-0.555175;-0.719705;, + -0.403034;-0.751304;-0.522596;, + -0.431968;-0.706602;-0.560462;, + -0.459062;-0.658874;-0.595942;, + -0.484200;-0.608324;-0.628882;, + -0.507274;-0.555171;-0.659134;, + -0.467797;-0.751305;-0.465517;, + -0.501428;-0.706601;-0.499285;, + -0.532922;-0.658874;-0.530922;, + -0.562144;-0.608326;-0.560298;, + -0.588968;-0.555169;-0.587285;, + -0.524559;-0.751305;-0.400474;, + -0.562309;-0.706603;-0.429560;, + -0.597663;-0.658873;-0.456820;, + -0.630469;-0.608326;-0.482130;, + -0.660585;-0.555172;-0.505383;, + -0.572344;-0.751302;-0.328585;, + -0.613567;-0.706600;-0.352493;, + -0.652178;-0.658874;-0.374900;, + -0.688005;-0.608327;-0.395711;, + -0.720898;-0.555174;-0.414835;, + -0.610334;-0.751305;-0.251063;, + -0.654327;-0.706599;-0.269394;, + -0.695534;-0.658870;-0.286572;, + -0.733769;-0.608328;-0.302523;, + -0.768877;-0.555175;-0.317189;, + -0.637883;-0.751305;-0.169250;, + -0.683890;-0.706604;-0.181676;, + -0.726991;-0.658867;-0.193335;, + -0.766981;-0.608324;-0.204161;, + -0.803701;-0.555175;-0.214116;, + -0.654519;-0.751304;-0.084545;, + -0.701754;-0.706602;-0.090858;, + -0.746003;-0.658872;-0.096785;, + -0.787069;-0.608323;-0.102304;, + -0.824774;-0.555173;-0.107383;, + -0.858958;-0.499646;-0.112002;, + -0.836991;-0.499646;-0.223159;, + -0.800703;-0.499642;-0.330502;, + -0.889476;-0.441976;-0.116144;, + -0.866708;-0.441972;-0.231253;, + -0.829110;-0.441968;-0.342404;, + -0.750714;-0.499643;-0.432187;, + -0.687879;-0.499643;-0.526478;, + -0.916197;-0.382405;-0.119793;, + -0.892722;-0.382404;-0.238358;, + -0.853973;-0.382407;-0.352839;, + -0.777325;-0.441971;-0.447691;, + -0.712237;-0.441973;-0.545324;, + -0.613275;-0.499645;-0.611759;, + -0.938996;-0.321209;-0.122927;, + -0.914917;-0.321212;-0.244439;, + -0.875184;-0.321215;-0.361766;, + -0.800613;-0.382408;-0.461284;, + -0.733553;-0.382409;-0.561839;, + -0.634965;-0.441977;-0.633621;, + -0.957783;-0.258637;-0.125534;, + -0.933203;-0.258638;-0.249477;, + -0.892657;-0.258633;-0.369151;, + -0.820478;-0.321211;-0.472906;, + -0.751733;-0.321206;-0.575955;, + -0.653942;-0.382408;-0.652782;, + -0.972476;-0.194953;-0.127605;, + -0.947501;-0.194947;-0.253453;, + -0.906313;-0.194954;-0.374954;, + -0.836837;-0.258631;-0.482508;, + -0.766698;-0.258633;-0.587607;, + -0.670124;-0.321208;-0.669148;, + -0.983012;-0.130430;-0.129135;, + -0.957746;-0.130436;-0.256337;, + -0.916094;-0.130433;-0.379157;, + -0.849617;-0.194952;-0.490046;, + -0.778387;-0.194949;-0.596748;, + -0.683441;-0.258632;-0.682655;, + -0.989343;-0.065357;-0.130108;, + -0.963897;-0.065356;-0.258130;, + -0.921957;-0.065355;-0.381738;, + -0.858766;-0.130428;-0.495489;, + -0.786747;-0.130435;-0.603337;, + -0.693835;-0.194947;-0.693245;, + -0.991445;0.000000;-0.130525;, + -0.965926;-0.000002;-0.258819;, + -0.923879;-0.000000;-0.382685;, + -0.864244;-0.065361;-0.498808;, + -0.791743;-0.065357;-0.607348;, + -0.701263;-0.130435;-0.700868;, + -0.989307;0.065356;-0.130385;, + -0.963824;0.065359;-0.258402;, + -0.921850;0.065356;-0.381996;, + -0.866025;0.000003;-0.500001;, + -0.793355;-0.000000;-0.608759;, + -0.705695;-0.065360;-0.705495;, + -0.982939;0.130433;-0.129688;, + -0.957602;0.130431;-0.256879;, + -0.915879;0.130433;-0.379675;, + -0.864104;0.065353;-0.499052;, + -0.791574;0.065356;-0.607569;, + -0.707107;0.000000;-0.707107;, + -0.972368;0.194951;-0.128436;, + -0.947284;0.194952;-0.254258;, + -0.905992;0.194951;-0.375729;, + -0.858487;0.130434;-0.495971;, + -0.786405;0.130436;-0.603783;, + -0.705495;0.065360;-0.705695;, + -0.957638;0.258637;-0.126635;, + -0.932916;0.258635;-0.250550;, + -0.892232;0.258636;-0.370176;, + -0.849201;0.194948;-0.490768;, + -0.777876;0.194952;-0.597414;, + -0.700868;0.130435;-0.701263;, + -0.938817;0.321208;-0.124292;, + -0.914560;0.321212;-0.245771;, + -0.874657;0.321211;-0.363040;, + -0.836281;0.258636;-0.483469;, + -0.766024;0.258630;-0.588488;, + -0.693245;0.194947;-0.693835;, + -0.915981;0.382407;-0.121420;, + -0.892297;0.382406;-0.239941;, + -0.853345;0.382407;-0.354355;, + -0.819790;0.321208;-0.474099;, + -0.750893;0.321209;-0.577047;, + -0.682655;0.258632;-0.683441;, + -0.889229;0.441975;-0.118026;, + -0.866216;0.441973;-0.233086;, + -0.828384;0.441970;-0.344154;, + -0.799792;0.382409;-0.462705;, + -0.732556;0.382406;-0.563141;, + -0.669148;0.321208;-0.670124;, + -0.858679;0.499645;-0.114128;, + -0.836436;0.499645;-0.225232;, + -0.799885;0.499641;-0.332481;, + -0.776377;0.441969;-0.449335;, + -0.711084;0.441972;-0.546828;, + -0.652782;0.382408;-0.653942;, + -0.824462;0.555174;-0.109745;, + -0.803084;0.555175;-0.216418;, + -0.767966;0.555175;-0.319390;, + -0.749641;0.499644;-0.434044;, + -0.686571;0.499647;-0.528179;, + -0.633621;0.441977;-0.634965;, + -0.786728;0.608323;-0.104891;, + -0.766307;0.608323;-0.206681;, + -0.732771;0.608326;-0.304936;, + -0.719705;0.555175;-0.416899;, + -0.659134;0.555172;-0.507273;, + -0.611759;0.499645;-0.613275;, + -0.745634;0.658871;-0.099591;, + -0.726257;0.658871;-0.196064;, + -0.694451;0.658871;-0.289183;, + -0.686700;0.608326;-0.397973;, + -0.628882;0.608324;-0.484200;, + -0.587285;0.555169;-0.588968;, + -0.701358;0.706602;-0.093865;, + -0.683108;0.706601;-0.184607;, + -0.653166;0.706601;-0.272194;, + -0.650764;0.658873;-0.377350;, + -0.595942;0.658874;-0.459062;, + -0.560298;0.608326;-0.562144;, + -0.654097;0.751305;-0.087739;, + -0.637047;0.751306;-0.172365;, + -0.609100;0.751305;-0.254044;, + -0.612051;0.706601;-0.355118;, + -0.560462;0.706602;-0.431968;, + -0.530923;0.658874;-0.532922;, + -0.570733;0.751303;-0.331374;, + -0.522596;0.751304;-0.403034;, + -0.499285;0.706601;-0.501428;, + -0.456820;0.658873;-0.597663;, + -0.482130;0.608326;-0.630469;, + -0.395711;0.608327;-0.688005;, + -0.414835;0.555174;-0.720898;, + -0.505383;0.555172;-0.660585;, + -0.526478;0.499643;-0.687879;, + -0.317189;0.555175;-0.768877;, + -0.330502;0.499642;-0.800703;, + -0.432187;0.499643;-0.750714;, + -0.447691;0.441971;-0.777325;, + -0.545324;0.441973;-0.712237;, + -0.223159;0.499647;-0.836991;, + -0.231253;0.441972;-0.866708;, + -0.342404;0.441968;-0.829110;, + -0.352839;0.382407;-0.853973;, + -0.461284;0.382408;-0.800613;, + -0.561839;0.382409;-0.733553;, + -0.116144;0.441976;-0.889476;, + -0.119793;0.382405;-0.916197;, + -0.238358;0.382404;-0.892722;, + -0.244439;0.321212;-0.914917;, + -0.361766;0.321215;-0.875184;, + -0.472906;0.321211;-0.820478;, + 0.000000;0.392541;-0.919735;, + -0.000000;0.331582;-0.943426;, + -0.122927;0.321209;-0.938996;, + -0.125534;0.258637;-0.957783;, + -0.249477;0.258638;-0.933203;, + -0.369151;0.258633;-0.892657;, + 0.119793;0.382405;-0.916197;, + 0.122927;0.321209;-0.938996;, + 0.000000;0.269204;-0.963083;, + -0.000000;0.205675;-0.978620;, + -0.127605;0.194953;-0.972476;, + -0.253453;0.194947;-0.947501;, + 0.238358;0.382404;-0.892722;, + 0.244439;0.321212;-0.914917;, + 0.125534;0.258637;-0.957783;, + 0.127605;0.194953;-0.972476;, + 0.000000;0.141259;-0.989973;, + -0.129135;0.130430;-0.983012;, + 0.352839;0.382407;-0.853973;, + 0.361766;0.321215;-0.875184;, + 0.249477;0.258638;-0.933203;, + 0.253453;0.194947;-0.947501;, + 0.129135;0.130430;-0.983012;, + 0.000000;0.076239;-0.997090;, + 0.461284;0.382408;-0.800613;, + 0.472906;0.321211;-0.820478;, + 0.369151;0.258633;-0.892657;, + 0.374954;0.194954;-0.906313;, + 0.256337;0.130436;-0.957746;, + 0.130108;0.065357;-0.989343;, + 0.561839;0.382409;-0.733553;, + 0.575955;0.321206;-0.751733;, + 0.482508;0.258631;-0.836837;, + 0.490046;0.194952;-0.849617;, + 0.379157;0.130433;-0.916094;, + 0.258130;0.065356;-0.963897;, + 0.652782;0.382408;-0.653942;, + 0.669148;0.321208;-0.670124;, + 0.587607;0.258633;-0.766698;, + 0.596748;0.194949;-0.778387;, + 0.495489;0.130428;-0.858766;, + 0.381738;0.065355;-0.921957;, + 0.732556;0.382406;-0.563141;, + 0.750893;0.321209;-0.577048;, + 0.682655;0.258632;-0.683441;, + 0.693245;0.194947;-0.693835;, + 0.603337;0.130435;-0.786747;, + 0.498808;0.065361;-0.864245;, + 0.799792;0.382409;-0.462705;, + 0.819790;0.321208;-0.474099;, + 0.766024;0.258630;-0.588488;, + 0.777876;0.194952;-0.597414;, + 0.700868;0.130435;-0.701263;, + 0.607348;0.065357;-0.791743;, + 0.836281;0.258636;-0.483469;, + 0.849201;0.194948;-0.490768;, + 0.786405;0.130436;-0.603783;, + 0.705495;0.065360;-0.705695;, + 0.608759;0.000000;-0.793355;, + 0.500001;-0.000003;-0.866025;, + 0.858487;0.130434;-0.495971;, + 0.791574;0.065356;-0.607569;, + 0.707107;0.000000;-0.707107;, + 0.607569;-0.065356;-0.791574;, + 0.499052;-0.065353;-0.864104;, + 0.864104;0.065353;-0.499053;, + 0.793355;-0.000000;-0.608759;, + 0.705695;-0.065360;-0.705495;, + 0.603783;-0.130436;-0.786405;, + 0.495971;-0.130434;-0.858487;, + 0.866025;0.000003;-0.500001;, + 0.791743;-0.065357;-0.607348;, + 0.701263;-0.130435;-0.700868;, + 0.597414;-0.194952;-0.777876;, + 0.490768;-0.194948;-0.849201;, + 0.864244;-0.065361;-0.498808;, + 0.786747;-0.130435;-0.603337;, + 0.693835;-0.194947;-0.693245;, + 0.588488;-0.258630;-0.766024;, + 0.483469;-0.258636;-0.836280;, + 0.858766;-0.130428;-0.495489;, + 0.778387;-0.194949;-0.596748;, + 0.683441;-0.258632;-0.682655;, + 0.577048;-0.321209;-0.750893;, + 0.474099;-0.321208;-0.819790;, + 0.849617;-0.194952;-0.490046;, + 0.766698;-0.258633;-0.587607;, + 0.670124;-0.321208;-0.669148;, + 0.563141;-0.382406;-0.732556;, + 0.462705;-0.382409;-0.799792;, + 0.836837;-0.258631;-0.482508;, + 0.751733;-0.321206;-0.575955;, + 0.653942;-0.382408;-0.652782;, + 0.449335;-0.441969;-0.776377;, + 0.820478;-0.321211;-0.472906;, + 0.733553;-0.382409;-0.561839;, + 0.800613;-0.382408;-0.461284;, + 0.344154;-0.441970;-0.828384;, + 0.354355;-0.382408;-0.853345;, + 0.363041;-0.321211;-0.874657;, + 0.225232;-0.499645;-0.836436;, + 0.233086;-0.441973;-0.866216;, + 0.239941;-0.382406;-0.892297;, + 0.245771;-0.321212;-0.914560;, + 0.370176;-0.258636;-0.892232;, + 0.114128;-0.499645;-0.858679;, + 0.118026;-0.441975;-0.889229;, + 0.121420;-0.382407;-0.915981;, + 0.124292;-0.321208;-0.938817;, + 0.250550;-0.258635;-0.932916;, + 0.375729;-0.194951;-0.905992;, + 0.000000;-0.490301;-0.871553;, + -0.000000;-0.432283;-0.901738;, + 0.000000;-0.372408;-0.928069;, + 0.000000;-0.310949;-0.950427;, + 0.126635;-0.258637;-0.957638;, + 0.254258;-0.194952;-0.947284;, + -0.114128;-0.499645;-0.858679;, + -0.118026;-0.441975;-0.889229;, + -0.121420;-0.382407;-0.915981;, + -0.124292;-0.321208;-0.938817;, + -0.126635;-0.258637;-0.957638;, + -0.000000;-0.248158;-0.968720;, + -0.225232;-0.499645;-0.836436;, + -0.233086;-0.441973;-0.866216;, + -0.239941;-0.382406;-0.892297;, + -0.245771;-0.321212;-0.914560;, + -0.250550;-0.258635;-0.932916;, + -0.332481;-0.499641;-0.799885;, + -0.344154;-0.441970;-0.828384;, + -0.354355;-0.382407;-0.853345;, + -0.363041;-0.321211;-0.874657;, + -0.370176;-0.258636;-0.892232;, + -0.434044;-0.499644;-0.749641;, + -0.449335;-0.441969;-0.776377;, + -0.462705;-0.382409;-0.799792;, + -0.474099;-0.321208;-0.819790;, + -0.483469;-0.258636;-0.836281;, + -0.528179;-0.499647;-0.686571;, + -0.546828;-0.441972;-0.711084;, + -0.563141;-0.382406;-0.732556;, + -0.577047;-0.321209;-0.750893;, + -0.588488;-0.258630;-0.766024;, + -0.597414;-0.194952;-0.777876;, + -0.490768;-0.194948;-0.849201;, + -0.375729;-0.194951;-0.905992;, + -0.603783;-0.130436;-0.786405;, + -0.495971;-0.130434;-0.858487;, + -0.379675;-0.130433;-0.915879;, + -0.254258;-0.194952;-0.947284;, + -0.128436;-0.194951;-0.972368;, + -0.607569;-0.065356;-0.791574;, + -0.499052;-0.065353;-0.864104;, + -0.381996;-0.065356;-0.921850;, + -0.256879;-0.130431;-0.957602;, + -0.129688;-0.130433;-0.982939;, + 0.000000;-0.184298;-0.982871;, + -0.608759;0.000000;-0.793355;, + -0.500001;-0.000003;-0.866025;, + -0.382685;0.000000;-0.923879;, + -0.258402;-0.065359;-0.963824;, + -0.130385;-0.065356;-0.989307;, + 0.000000;-0.119654;-0.992816;, + -0.607348;0.065357;-0.791743;, + -0.498808;0.065361;-0.864244;, + -0.381738;0.065355;-0.921957;, + -0.258819;0.000002;-0.965926;, + -0.130525;-0.000000;-0.991445;, + 0.000000;-0.054496;-0.998514;, + -0.603337;0.130435;-0.786747;, + -0.495489;0.130428;-0.858766;, + -0.379157;0.130433;-0.916094;, + -0.258130;0.065356;-0.963897;, + -0.130108;0.065357;-0.989343;, + 0.000000;0.010897;-0.999941;, + -0.596748;0.194949;-0.778387;, + -0.490046;0.194952;-0.849617;, + -0.374954;0.194954;-0.906313;, + -0.256337;0.130436;-0.957746;, + -0.587607;0.258633;-0.766698;, + -0.482508;0.258631;-0.836837;, + -0.575955;0.321206;-0.751733;, + 0.130525;-0.000000;-0.991445;, + 0.130385;-0.065356;-0.989307;, + 0.129688;-0.130433;-0.982939;, + 0.258819;0.000002;-0.965926;, + 0.258402;-0.065359;-0.963824;, + 0.256879;-0.130431;-0.957602;, + 0.128436;-0.194951;-0.972368;, + 0.382685;0.000000;-0.923879;, + 0.381996;-0.065356;-0.921850;, + 0.379675;-0.130433;-0.915879;; + 4512; + 3;0,1,2;, + 3;3,1,0;, + 3;3,4,1;, + 3;4,5,1;, + 3;1,5,6;, + 3;7,0,2;, + 3;8,0,7;, + 3;8,3,0;, + 3;9,3,8;, + 3;9,10,3;, + 3;10,4,3;, + 3;10,11,4;, + 3;11,12,4;, + 3;4,12,5;, + 3;13,7,2;, + 3;14,7,13;, + 3;14,8,7;, + 3;15,8,14;, + 3;15,9,8;, + 3;16,9,15;, + 3;16,17,9;, + 3;17,10,9;, + 3;17,18,10;, + 3;18,11,10;, + 3;19,13,2;, + 3;20,13,19;, + 3;20,14,13;, + 3;21,14,20;, + 3;21,15,14;, + 3;22,15,21;, + 3;22,16,15;, + 3;23,16,22;, + 3;23,24,16;, + 3;24,17,16;, + 3;25,19,2;, + 3;26,19,25;, + 3;26,20,19;, + 3;27,20,26;, + 3;27,21,20;, + 3;28,21,27;, + 3;28,22,21;, + 3;29,22,28;, + 3;29,23,22;, + 3;25,2,30;, + 3;26,25,30;, + 3;26,30,31;, + 3;27,26,31;, + 3;27,31,32;, + 3;28,27,32;, + 3;28,32,33;, + 3;29,28,33;, + 3;29,33,34;, + 3;35,29,34;, + 3;35,23,29;, + 3;30,2,36;, + 3;31,30,36;, + 3;31,36,37;, + 3;32,31,37;, + 3;32,37,38;, + 3;33,32,38;, + 3;33,38,39;, + 3;34,33,39;, + 3;34,39,40;, + 3;41,34,40;, + 3;35,34,41;, + 3;36,2,42;, + 3;37,36,42;, + 3;37,42,43;, + 3;38,37,43;, + 3;38,43,44;, + 3;39,38,44;, + 3;39,44,45;, + 3;40,39,45;, + 3;40,45,46;, + 3;47,40,46;, + 3;41,40,47;, + 3;42,2,48;, + 3;43,42,48;, + 3;43,48,49;, + 3;44,43,49;, + 3;44,49,50;, + 3;45,44,50;, + 3;45,50,51;, + 3;46,45,51;, + 3;46,51,52;, + 3;53,46,52;, + 3;47,46,53;, + 3;48,2,54;, + 3;49,48,54;, + 3;49,54,55;, + 3;50,49,55;, + 3;50,55,56;, + 3;51,50,56;, + 3;51,56,57;, + 3;52,51,57;, + 3;52,57,58;, + 3;59,52,58;, + 3;53,52,59;, + 3;54,2,60;, + 3;55,54,60;, + 3;55,60,61;, + 3;56,55,61;, + 3;56,61,62;, + 3;57,56,62;, + 3;57,62,63;, + 3;58,57,63;, + 3;58,63,64;, + 3;65,58,64;, + 3;59,58,65;, + 3;60,2,66;, + 3;61,60,66;, + 3;61,66,67;, + 3;62,61,67;, + 3;62,67,68;, + 3;63,62,68;, + 3;63,68,69;, + 3;64,63,69;, + 3;64,69,70;, + 3;71,64,70;, + 3;65,64,71;, + 3;66,2,72;, + 3;67,66,72;, + 3;67,72,73;, + 3;68,67,73;, + 3;68,73,74;, + 3;69,68,74;, + 3;69,74,75;, + 3;70,69,75;, + 3;70,75,76;, + 3;77,70,76;, + 3;71,70,77;, + 3;72,2,78;, + 3;73,72,78;, + 3;73,78,79;, + 3;74,73,79;, + 3;74,79,80;, + 3;75,74,80;, + 3;75,80,81;, + 3;76,75,81;, + 3;76,81,82;, + 3;83,76,82;, + 3;77,76,83;, + 3;78,2,84;, + 3;79,78,84;, + 3;79,84,85;, + 3;80,79,85;, + 3;80,85,86;, + 3;81,80,86;, + 3;81,86,87;, + 3;82,81,87;, + 3;82,87,88;, + 3;89,82,88;, + 3;83,82,89;, + 3;84,2,90;, + 3;85,84,90;, + 3;85,90,91;, + 3;86,85,91;, + 3;86,91,92;, + 3;87,86,92;, + 3;87,92,93;, + 3;88,87,93;, + 3;88,93,94;, + 3;95,88,94;, + 3;89,88,95;, + 3;90,2,96;, + 3;91,90,96;, + 3;91,96,97;, + 3;92,91,97;, + 3;92,97,98;, + 3;93,92,98;, + 3;93,98,99;, + 3;94,93,99;, + 3;94,99,100;, + 3;101,94,100;, + 3;95,94,101;, + 3;96,2,102;, + 3;97,96,102;, + 3;97,102,103;, + 3;98,97,103;, + 3;98,103,104;, + 3;99,98,104;, + 3;99,104,105;, + 3;100,99,105;, + 3;100,105,106;, + 3;107,100,106;, + 3;101,100,107;, + 3;102,2,108;, + 3;103,102,108;, + 3;103,108,109;, + 3;104,103,109;, + 3;104,109,110;, + 3;105,104,110;, + 3;105,110,111;, + 3;106,105,111;, + 3;106,111,112;, + 3;113,106,112;, + 3;107,106,113;, + 3;108,2,114;, + 3;109,108,114;, + 3;109,114,115;, + 3;110,109,115;, + 3;110,115,116;, + 3;111,110,116;, + 3;111,116,117;, + 3;112,111,117;, + 3;112,117,118;, + 3;119,112,118;, + 3;113,112,119;, + 3;114,2,120;, + 3;115,114,120;, + 3;115,120,121;, + 3;116,115,121;, + 3;116,121,122;, + 3;117,116,122;, + 3;117,122,123;, + 3;118,117,123;, + 3;118,123,124;, + 3;125,118,124;, + 3;119,118,125;, + 3;120,2,126;, + 3;121,120,126;, + 3;121,126,127;, + 3;122,121,127;, + 3;122,127,128;, + 3;123,122,128;, + 3;123,128,129;, + 3;124,123,129;, + 3;124,129,130;, + 3;131,124,130;, + 3;125,124,131;, + 3;126,2,132;, + 3;127,126,132;, + 3;127,132,133;, + 3;128,127,133;, + 3;128,133,134;, + 3;129,128,134;, + 3;129,134,135;, + 3;130,129,135;, + 3;130,135,136;, + 3;137,130,136;, + 3;131,130,137;, + 3;132,2,138;, + 3;133,132,138;, + 3;133,138,139;, + 3;134,133,139;, + 3;134,139,140;, + 3;135,134,140;, + 3;135,140,141;, + 3;136,135,141;, + 3;136,141,142;, + 3;143,136,142;, + 3;137,136,143;, + 3;138,2,144;, + 3;139,138,144;, + 3;139,144,145;, + 3;140,139,145;, + 3;140,145,146;, + 3;141,140,146;, + 3;141,146,147;, + 3;142,141,147;, + 3;142,147,148;, + 3;149,142,148;, + 3;143,142,149;, + 3;144,2,150;, + 3;145,144,150;, + 3;145,150,151;, + 3;146,145,151;, + 3;146,151,152;, + 3;147,146,152;, + 3;147,152,153;, + 3;148,147,153;, + 3;148,153,154;, + 3;155,148,154;, + 3;149,148,155;, + 3;150,2,156;, + 3;151,150,156;, + 3;151,156,157;, + 3;152,151,157;, + 3;152,157,158;, + 3;153,152,158;, + 3;153,158,159;, + 3;154,153,159;, + 3;154,159,160;, + 3;161,154,160;, + 3;155,154,161;, + 3;156,2,162;, + 3;157,156,162;, + 3;157,162,163;, + 3;158,157,163;, + 3;158,163,164;, + 3;159,158,164;, + 3;159,164,165;, + 3;160,159,165;, + 3;160,165,166;, + 3;167,160,166;, + 3;161,160,167;, + 3;162,2,168;, + 3;163,162,168;, + 3;163,168,169;, + 3;164,163,169;, + 3;164,169,170;, + 3;165,164,170;, + 3;165,170,171;, + 3;166,165,171;, + 3;166,171,172;, + 3;173,166,172;, + 3;167,166,173;, + 3;174,167,173;, + 3;175,167,174;, + 3;175,161,167;, + 3;176,161,175;, + 3;176,155,161;, + 3;173,172,177;, + 3;178,173,177;, + 3;174,173,178;, + 3;179,174,178;, + 3;180,174,179;, + 3;180,175,174;, + 3;181,175,180;, + 3;181,176,175;, + 3;182,176,181;, + 3;182,183,176;, + 3;183,155,176;, + 3;183,149,155;, + 3;178,177,184;, + 3;185,178,184;, + 3;179,178,185;, + 3;186,179,185;, + 3;187,179,186;, + 3;187,180,179;, + 3;188,180,187;, + 3;188,181,180;, + 3;189,181,188;, + 3;189,182,181;, + 3;185,184,190;, + 3;191,185,190;, + 3;186,185,191;, + 3;192,186,191;, + 3;193,186,192;, + 3;193,187,186;, + 3;194,187,193;, + 3;194,188,187;, + 3;195,188,194;, + 3;195,189,188;, + 3;191,190,196;, + 3;197,191,196;, + 3;192,191,197;, + 3;198,192,197;, + 3;199,192,198;, + 3;199,193,192;, + 3;200,193,199;, + 3;200,194,193;, + 3;201,194,200;, + 3;201,195,194;, + 3;197,196,202;, + 3;203,197,202;, + 3;198,197,203;, + 3;204,198,203;, + 3;205,198,204;, + 3;205,199,198;, + 3;206,199,205;, + 3;206,200,199;, + 3;207,200,206;, + 3;207,201,200;, + 3;203,202,208;, + 3;209,203,208;, + 3;204,203,209;, + 3;210,204,209;, + 3;211,204,210;, + 3;211,205,204;, + 3;212,205,211;, + 3;212,206,205;, + 3;213,206,212;, + 3;213,207,206;, + 3;209,208,214;, + 3;215,209,214;, + 3;210,209,215;, + 3;216,210,215;, + 3;217,210,216;, + 3;217,211,210;, + 3;218,211,217;, + 3;218,212,211;, + 3;219,212,218;, + 3;219,213,212;, + 3;215,214,220;, + 3;221,215,220;, + 3;216,215,221;, + 3;222,216,221;, + 3;223,216,222;, + 3;223,217,216;, + 3;224,217,223;, + 3;224,218,217;, + 3;225,218,224;, + 3;225,219,218;, + 3;221,220,226;, + 3;227,221,226;, + 3;222,221,227;, + 3;228,222,227;, + 3;229,222,228;, + 3;229,223,222;, + 3;230,223,229;, + 3;230,224,223;, + 3;231,224,230;, + 3;231,225,224;, + 3;227,226,232;, + 3;233,227,232;, + 3;228,227,233;, + 3;234,228,233;, + 3;235,228,234;, + 3;235,229,228;, + 3;236,229,235;, + 3;236,230,229;, + 3;237,230,236;, + 3;237,231,230;, + 3;233,232,238;, + 3;239,233,238;, + 3;234,233,239;, + 3;240,234,239;, + 3;241,234,240;, + 3;241,235,234;, + 3;242,235,241;, + 3;242,236,235;, + 3;243,236,242;, + 3;243,237,236;, + 3;239,238,244;, + 3;245,239,244;, + 3;240,239,245;, + 3;246,240,245;, + 3;247,240,246;, + 3;247,241,240;, + 3;248,241,247;, + 3;248,242,241;, + 3;249,242,248;, + 3;249,243,242;, + 3;245,244,250;, + 3;251,245,250;, + 3;246,245,251;, + 3;252,246,251;, + 3;253,246,252;, + 3;253,247,246;, + 3;254,247,253;, + 3;254,248,247;, + 3;255,248,254;, + 3;255,249,248;, + 3;251,250,256;, + 3;257,251,256;, + 3;252,251,257;, + 3;258,252,257;, + 3;259,252,258;, + 3;259,253,252;, + 3;260,253,259;, + 3;260,254,253;, + 3;261,254,260;, + 3;261,255,254;, + 3;257,256,262;, + 3;263,257,262;, + 3;258,257,263;, + 3;264,258,263;, + 3;265,258,264;, + 3;265,259,258;, + 3;266,259,265;, + 3;266,260,259;, + 3;267,260,266;, + 3;267,261,260;, + 3;263,262,268;, + 3;269,263,268;, + 3;264,263,269;, + 3;270,264,269;, + 3;271,264,270;, + 3;271,265,264;, + 3;272,265,271;, + 3;272,266,265;, + 3;273,266,272;, + 3;273,267,266;, + 3;269,268,274;, + 3;275,269,274;, + 3;270,269,275;, + 3;276,270,275;, + 3;277,270,276;, + 3;277,271,270;, + 3;278,271,277;, + 3;278,272,271;, + 3;279,272,278;, + 3;279,273,272;, + 3;275,274,280;, + 3;281,275,280;, + 3;276,275,281;, + 3;282,276,281;, + 3;283,276,282;, + 3;283,277,276;, + 3;284,277,283;, + 3;284,278,277;, + 3;285,278,284;, + 3;285,279,278;, + 3;281,280,286;, + 3;287,281,286;, + 3;282,281,287;, + 3;288,282,287;, + 3;289,282,288;, + 3;289,283,282;, + 3;290,283,289;, + 3;290,284,283;, + 3;291,284,290;, + 3;291,285,284;, + 3;287,286,292;, + 3;293,287,292;, + 3;288,287,293;, + 3;294,288,293;, + 3;295,288,294;, + 3;295,289,288;, + 3;296,289,295;, + 3;296,290,289;, + 3;297,290,296;, + 3;297,291,290;, + 3;293,292,298;, + 3;299,293,298;, + 3;294,293,299;, + 3;300,294,299;, + 3;301,294,300;, + 3;301,295,294;, + 3;302,295,301;, + 3;302,296,295;, + 3;303,296,302;, + 3;303,297,296;, + 3;299,298,304;, + 3;305,299,304;, + 3;300,299,305;, + 3;306,300,305;, + 3;307,300,306;, + 3;307,301,300;, + 3;308,301,307;, + 3;308,302,301;, + 3;309,302,308;, + 3;309,303,302;, + 3;305,304,310;, + 3;311,305,310;, + 3;306,305,311;, + 3;312,306,311;, + 3;313,306,312;, + 3;313,307,306;, + 3;314,307,313;, + 3;314,308,307;, + 3;315,308,314;, + 3;315,309,308;, + 3;311,310,316;, + 3;317,311,316;, + 3;312,311,317;, + 3;318,312,317;, + 3;319,312,318;, + 3;319,313,312;, + 3;320,313,319;, + 3;320,314,313;, + 3;321,314,320;, + 3;321,315,314;, + 3;317,316,322;, + 3;323,317,322;, + 3;318,317,323;, + 3;324,318,323;, + 3;325,318,324;, + 3;325,319,318;, + 3;326,319,325;, + 3;326,320,319;, + 3;327,320,326;, + 3;327,321,320;, + 3;323,322,328;, + 3;329,323,328;, + 3;324,323,329;, + 3;330,324,329;, + 3;331,324,330;, + 3;331,325,324;, + 3;332,325,331;, + 3;332,326,325;, + 3;333,326,332;, + 3;333,327,326;, + 3;329,328,334;, + 3;335,329,334;, + 3;330,329,335;, + 3;336,330,335;, + 3;337,330,336;, + 3;337,331,330;, + 3;338,331,337;, + 3;338,332,331;, + 3;339,332,338;, + 3;339,333,332;, + 3;335,334,340;, + 3;341,335,340;, + 3;336,335,341;, + 3;342,336,341;, + 3;343,336,342;, + 3;343,337,336;, + 3;344,337,343;, + 3;344,338,337;, + 3;345,338,344;, + 3;345,339,338;, + 3;341,340,346;, + 3;347,341,346;, + 3;342,341,347;, + 3;348,342,347;, + 3;349,342,348;, + 3;349,343,342;, + 3;350,343,349;, + 3;350,344,343;, + 3;351,344,350;, + 3;351,345,344;, + 3;347,346,352;, + 3;353,347,352;, + 3;348,347,353;, + 3;354,348,353;, + 3;355,348,354;, + 3;355,349,348;, + 3;356,349,355;, + 3;356,350,349;, + 3;357,350,356;, + 3;357,351,350;, + 3;353,352,358;, + 3;359,353,358;, + 3;354,353,359;, + 3;360,354,359;, + 3;361,354,360;, + 3;361,355,354;, + 3;362,355,361;, + 3;362,356,355;, + 3;363,356,362;, + 3;363,357,356;, + 3;359,358,364;, + 3;365,359,364;, + 3;360,359,365;, + 3;366,360,365;, + 3;367,360,366;, + 3;367,361,360;, + 3;368,361,367;, + 3;368,362,361;, + 3;369,362,368;, + 3;369,363,362;, + 3;365,364,370;, + 3;371,365,370;, + 3;366,365,371;, + 3;372,366,371;, + 3;373,366,372;, + 3;373,367,366;, + 3;374,367,373;, + 3;374,368,367;, + 3;375,368,374;, + 3;375,369,368;, + 3;371,370,376;, + 3;377,371,376;, + 3;372,371,377;, + 3;378,372,377;, + 3;379,372,378;, + 3;379,373,372;, + 3;380,373,379;, + 3;380,374,373;, + 3;381,374,380;, + 3;381,375,374;, + 3;377,376,382;, + 3;383,377,382;, + 3;378,377,383;, + 3;384,378,383;, + 3;385,378,384;, + 3;385,379,378;, + 3;386,379,385;, + 3;386,380,379;, + 3;387,380,386;, + 3;387,381,380;, + 3;383,382,388;, + 3;389,383,388;, + 3;384,383,389;, + 3;390,384,389;, + 3;391,384,390;, + 3;391,385,384;, + 3;392,385,391;, + 3;392,386,385;, + 3;393,386,392;, + 3;393,387,386;, + 3;389,388,394;, + 3;395,389,394;, + 3;390,389,395;, + 3;396,390,395;, + 3;397,390,396;, + 3;397,391,390;, + 3;398,391,397;, + 3;398,392,391;, + 3;399,392,398;, + 3;399,393,392;, + 3;395,394,400;, + 3;401,395,400;, + 3;396,395,401;, + 3;402,396,401;, + 3;403,396,402;, + 3;403,397,396;, + 3;404,397,403;, + 3;404,398,397;, + 3;405,398,404;, + 3;405,399,398;, + 3;401,400,406;, + 3;407,401,406;, + 3;402,401,407;, + 3;408,402,407;, + 3;409,402,408;, + 3;409,403,402;, + 3;410,403,409;, + 3;410,404,403;, + 3;411,404,410;, + 3;411,405,404;, + 3;407,406,412;, + 3;413,407,412;, + 3;408,407,413;, + 3;414,408,413;, + 3;415,408,414;, + 3;415,409,408;, + 3;416,409,415;, + 3;416,410,409;, + 3;417,410,416;, + 3;417,411,410;, + 3;413,412,418;, + 3;419,413,418;, + 3;414,413,419;, + 3;420,414,419;, + 3;420,415,414;, + 3;420,416,415;, + 3;420,417,416;, + 3;420,421,417;, + 3;421,411,417;, + 3;421,422,411;, + 3;422,405,411;, + 3;419,418,423;, + 3;420,419,423;, + 3;422,424,405;, + 3;425,424,422;, + 3;425,426,424;, + 3;426,427,424;, + 3;424,427,399;, + 3;424,399,405;, + 3;428,425,422;, + 3;429,425,428;, + 3;429,430,425;, + 3;430,426,425;, + 3;430,431,426;, + 3;431,432,426;, + 3;426,432,427;, + 3;428,422,421;, + 3;420,428,421;, + 3;420,429,428;, + 3;420,433,429;, + 3;433,430,429;, + 3;433,434,430;, + 3;434,431,430;, + 3;434,435,431;, + 3;435,436,431;, + 3;431,436,432;, + 3;436,437,432;, + 3;432,437,438;, + 3;432,438,427;, + 3;420,439,433;, + 3;439,434,433;, + 3;439,440,434;, + 3;440,435,434;, + 3;440,441,435;, + 3;441,442,435;, + 3;435,442,436;, + 3;442,443,436;, + 3;436,443,437;, + 3;420,444,439;, + 3;444,440,439;, + 3;444,445,440;, + 3;445,441,440;, + 3;445,446,441;, + 3;446,447,441;, + 3;441,447,442;, + 3;447,448,442;, + 3;442,448,443;, + 3;420,449,444;, + 3;449,445,444;, + 3;449,450,445;, + 3;450,446,445;, + 3;450,451,446;, + 3;451,452,446;, + 3;446,452,447;, + 3;452,453,447;, + 3;447,453,448;, + 3;420,454,449;, + 3;454,450,449;, + 3;454,455,450;, + 3;455,451,450;, + 3;455,456,451;, + 3;456,457,451;, + 3;451,457,452;, + 3;457,458,452;, + 3;452,458,453;, + 3;420,459,454;, + 3;459,455,454;, + 3;459,460,455;, + 3;460,456,455;, + 3;460,461,456;, + 3;461,462,456;, + 3;456,462,457;, + 3;462,463,457;, + 3;457,463,458;, + 3;420,464,459;, + 3;464,460,459;, + 3;464,465,460;, + 3;465,461,460;, + 3;465,466,461;, + 3;466,467,461;, + 3;461,467,462;, + 3;467,468,462;, + 3;462,468,463;, + 3;420,469,464;, + 3;469,465,464;, + 3;469,470,465;, + 3;470,466,465;, + 3;470,471,466;, + 3;471,472,466;, + 3;466,472,467;, + 3;472,473,467;, + 3;467,473,468;, + 3;420,474,469;, + 3;474,470,469;, + 3;474,475,470;, + 3;475,471,470;, + 3;475,476,471;, + 3;476,477,471;, + 3;471,477,472;, + 3;477,478,472;, + 3;472,478,473;, + 3;420,479,474;, + 3;479,475,474;, + 3;479,480,475;, + 3;480,476,475;, + 3;480,481,476;, + 3;481,482,476;, + 3;476,482,477;, + 3;482,483,477;, + 3;477,483,478;, + 3;420,484,479;, + 3;484,480,479;, + 3;484,485,480;, + 3;485,481,480;, + 3;485,486,481;, + 3;486,487,481;, + 3;481,487,482;, + 3;487,488,482;, + 3;482,488,483;, + 3;420,489,484;, + 3;489,485,484;, + 3;489,490,485;, + 3;490,486,485;, + 3;490,491,486;, + 3;491,492,486;, + 3;486,492,487;, + 3;492,493,487;, + 3;487,493,488;, + 3;420,494,489;, + 3;494,490,489;, + 3;494,495,490;, + 3;495,491,490;, + 3;495,496,491;, + 3;496,497,491;, + 3;491,497,492;, + 3;497,498,492;, + 3;492,498,493;, + 3;420,499,494;, + 3;499,495,494;, + 3;499,500,495;, + 3;500,496,495;, + 3;500,501,496;, + 3;501,502,496;, + 3;496,502,497;, + 3;502,503,497;, + 3;497,503,498;, + 3;420,504,499;, + 3;504,500,499;, + 3;504,505,500;, + 3;505,501,500;, + 3;505,506,501;, + 3;506,507,501;, + 3;501,507,502;, + 3;507,508,502;, + 3;502,508,503;, + 3;420,509,504;, + 3;509,505,504;, + 3;509,510,505;, + 3;510,506,505;, + 3;510,511,506;, + 3;511,512,506;, + 3;506,512,507;, + 3;512,513,507;, + 3;507,513,508;, + 3;513,514,508;, + 3;508,514,515;, + 3;508,515,503;, + 3;509,516,510;, + 3;510,516,517;, + 3;510,517,511;, + 3;511,517,518;, + 3;511,518,519;, + 3;511,519,512;, + 3;519,520,512;, + 3;512,520,513;, + 3;520,521,513;, + 3;513,521,514;, + 3;509,522,516;, + 3;522,523,516;, + 3;516,523,524;, + 3;516,524,517;, + 3;517,524,525;, + 3;517,525,518;, + 3;518,525,526;, + 3;518,526,527;, + 3;519,518,527;, + 3;528,522,509;, + 3;528,529,522;, + 3;522,529,523;, + 3;529,530,523;, + 3;523,530,531;, + 3;523,531,524;, + 3;524,531,532;, + 3;524,532,525;, + 3;525,532,533;, + 3;525,533,526;, + 3;528,534,529;, + 3;529,534,530;, + 3;534,535,530;, + 3;530,535,536;, + 3;530,536,531;, + 3;531,536,537;, + 3;531,537,532;, + 3;532,537,538;, + 3;532,538,533;, + 3;528,539,534;, + 3;534,539,535;, + 3;539,540,535;, + 3;535,540,541;, + 3;535,541,536;, + 3;536,541,542;, + 3;536,542,537;, + 3;537,542,543;, + 3;537,543,538;, + 3;528,544,539;, + 3;539,544,540;, + 3;544,545,540;, + 3;540,545,546;, + 3;540,546,541;, + 3;541,546,547;, + 3;541,547,542;, + 3;542,547,548;, + 3;542,548,543;, + 3;528,549,544;, + 3;544,549,545;, + 3;549,550,545;, + 3;545,550,551;, + 3;545,551,546;, + 3;546,551,552;, + 3;546,552,547;, + 3;547,552,553;, + 3;547,553,548;, + 3;528,554,549;, + 3;549,554,550;, + 3;554,555,550;, + 3;550,555,556;, + 3;550,556,551;, + 3;551,556,557;, + 3;551,557,552;, + 3;552,557,558;, + 3;552,558,553;, + 3;528,559,554;, + 3;554,559,555;, + 3;559,560,555;, + 3;555,560,561;, + 3;555,561,556;, + 3;556,561,562;, + 3;556,562,557;, + 3;557,562,563;, + 3;557,563,558;, + 3;528,564,559;, + 3;559,564,560;, + 3;564,565,560;, + 3;560,565,566;, + 3;560,566,561;, + 3;561,566,567;, + 3;561,567,562;, + 3;562,567,568;, + 3;562,568,563;, + 3;528,569,564;, + 3;564,569,565;, + 3;569,570,565;, + 3;565,570,571;, + 3;565,571,566;, + 3;566,571,572;, + 3;566,572,567;, + 3;567,572,573;, + 3;567,573,568;, + 3;528,574,569;, + 3;569,574,570;, + 3;574,575,570;, + 3;570,575,576;, + 3;570,576,571;, + 3;571,576,577;, + 3;571,577,572;, + 3;572,577,578;, + 3;572,578,573;, + 3;528,579,574;, + 3;574,579,575;, + 3;579,580,575;, + 3;575,580,581;, + 3;575,581,576;, + 3;576,581,582;, + 3;576,582,577;, + 3;577,582,583;, + 3;577,583,578;, + 3;528,584,579;, + 3;579,584,580;, + 3;584,585,580;, + 3;580,585,586;, + 3;580,586,581;, + 3;581,586,587;, + 3;581,587,582;, + 3;582,587,588;, + 3;582,588,583;, + 3;528,589,584;, + 3;584,589,585;, + 3;589,590,585;, + 3;585,590,591;, + 3;585,591,586;, + 3;586,591,592;, + 3;586,592,587;, + 3;587,592,593;, + 3;587,593,588;, + 3;528,594,589;, + 3;589,594,590;, + 3;594,595,590;, + 3;590,595,596;, + 3;590,596,591;, + 3;591,596,597;, + 3;591,597,592;, + 3;592,597,598;, + 3;592,598,593;, + 3;528,599,594;, + 3;594,599,595;, + 3;599,600,595;, + 3;595,600,601;, + 3;595,601,596;, + 3;596,601,602;, + 3;596,602,597;, + 3;597,602,603;, + 3;597,603,598;, + 3;528,604,599;, + 3;599,604,600;, + 3;604,605,600;, + 3;600,605,606;, + 3;600,606,601;, + 3;601,606,607;, + 3;601,607,602;, + 3;602,607,608;, + 3;602,608,603;, + 3;528,609,604;, + 3;604,609,605;, + 3;609,610,605;, + 3;605,610,611;, + 3;605,611,606;, + 3;606,611,612;, + 3;606,612,607;, + 3;607,612,613;, + 3;607,613,608;, + 3;528,614,609;, + 3;609,614,610;, + 3;614,615,610;, + 3;610,615,616;, + 3;610,616,611;, + 3;611,616,617;, + 3;611,617,612;, + 3;612,617,618;, + 3;612,618,613;, + 3;528,619,614;, + 3;614,619,615;, + 3;619,620,615;, + 3;615,620,621;, + 3;615,621,616;, + 3;616,621,622;, + 3;616,622,617;, + 3;617,622,623;, + 3;617,623,618;, + 3;528,624,619;, + 3;619,624,620;, + 3;624,625,620;, + 3;620,625,626;, + 3;620,626,621;, + 3;621,626,627;, + 3;621,627,622;, + 3;622,627,628;, + 3;622,628,623;, + 3;528,629,624;, + 3;624,629,625;, + 3;629,630,625;, + 3;625,630,631;, + 3;625,631,626;, + 3;626,631,632;, + 3;626,632,627;, + 3;627,632,633;, + 3;627,633,628;, + 3;528,634,629;, + 3;629,634,630;, + 3;634,635,630;, + 3;630,635,636;, + 3;630,636,631;, + 3;631,636,637;, + 3;631,637,632;, + 3;632,637,638;, + 3;632,638,633;, + 3;528,639,634;, + 3;634,639,635;, + 3;633,638,640;, + 3;633,640,641;, + 3;628,633,641;, + 3;628,641,642;, + 3;623,628,642;, + 3;623,642,643;, + 3;618,623,643;, + 3;641,640,644;, + 3;641,644,645;, + 3;642,641,645;, + 3;642,645,646;, + 3;643,642,646;, + 3;643,646,647;, + 3;648,643,647;, + 3;618,643,648;, + 3;613,618,648;, + 3;613,648,649;, + 3;608,613,649;, + 3;645,644,650;, + 3;645,650,651;, + 3;646,645,651;, + 3;646,651,652;, + 3;647,646,652;, + 3;647,652,653;, + 3;654,647,653;, + 3;648,647,654;, + 3;649,648,654;, + 3;649,654,655;, + 3;656,649,655;, + 3;608,649,656;, + 3;603,608,656;, + 3;651,650,657;, + 3;651,657,658;, + 3;652,651,658;, + 3;652,658,659;, + 3;653,652,659;, + 3;653,659,660;, + 3;661,653,660;, + 3;654,653,661;, + 3;655,654,661;, + 3;655,661,662;, + 3;663,655,662;, + 3;656,655,663;, + 3;658,657,664;, + 3;658,664,665;, + 3;659,658,665;, + 3;659,665,666;, + 3;660,659,666;, + 3;660,666,667;, + 3;668,660,667;, + 3;661,660,668;, + 3;662,661,668;, + 3;662,668,669;, + 3;670,662,669;, + 3;663,662,670;, + 3;665,664,671;, + 3;665,671,672;, + 3;666,665,672;, + 3;666,672,673;, + 3;667,666,673;, + 3;667,673,674;, + 3;675,667,674;, + 3;668,667,675;, + 3;669,668,675;, + 3;669,675,676;, + 3;677,669,676;, + 3;670,669,677;, + 3;672,671,678;, + 3;672,678,679;, + 3;673,672,679;, + 3;673,679,680;, + 3;674,673,680;, + 3;674,680,681;, + 3;682,674,681;, + 3;675,674,682;, + 3;676,675,682;, + 3;676,682,683;, + 3;684,676,683;, + 3;677,676,684;, + 3;679,678,685;, + 3;679,685,686;, + 3;680,679,686;, + 3;680,686,687;, + 3;681,680,687;, + 3;681,687,688;, + 3;689,681,688;, + 3;682,681,689;, + 3;683,682,689;, + 3;683,689,690;, + 3;691,683,690;, + 3;684,683,691;, + 3;686,685,692;, + 3;686,692,693;, + 3;687,686,693;, + 3;687,693,694;, + 3;688,687,694;, + 3;688,694,695;, + 3;696,688,695;, + 3;689,688,696;, + 3;690,689,696;, + 3;690,696,697;, + 3;698,690,697;, + 3;691,690,698;, + 3;693,692,699;, + 3;693,699,700;, + 3;694,693,700;, + 3;694,700,701;, + 3;695,694,701;, + 3;695,701,702;, + 3;703,695,702;, + 3;696,695,703;, + 3;697,696,703;, + 3;697,703,704;, + 3;705,697,704;, + 3;698,697,705;, + 3;700,699,706;, + 3;700,706,707;, + 3;701,700,707;, + 3;701,707,708;, + 3;702,701,708;, + 3;702,708,709;, + 3;710,702,709;, + 3;703,702,710;, + 3;704,703,710;, + 3;704,710,711;, + 3;712,704,711;, + 3;705,704,712;, + 3;707,706,713;, + 3;707,713,714;, + 3;708,707,714;, + 3;708,714,715;, + 3;709,708,715;, + 3;709,715,716;, + 3;717,709,716;, + 3;710,709,717;, + 3;711,710,717;, + 3;711,717,718;, + 3;719,711,718;, + 3;712,711,719;, + 3;714,713,720;, + 3;714,720,721;, + 3;715,714,721;, + 3;715,721,722;, + 3;716,715,722;, + 3;716,722,723;, + 3;724,716,723;, + 3;717,716,724;, + 3;718,717,724;, + 3;718,724,725;, + 3;726,718,725;, + 3;719,718,726;, + 3;721,720,727;, + 3;721,727,728;, + 3;722,721,728;, + 3;722,728,729;, + 3;723,722,729;, + 3;723,729,730;, + 3;731,723,730;, + 3;724,723,731;, + 3;725,724,731;, + 3;725,731,732;, + 3;733,725,732;, + 3;726,725,733;, + 3;728,727,734;, + 3;728,734,735;, + 3;729,728,735;, + 3;729,735,736;, + 3;730,729,736;, + 3;730,736,737;, + 3;738,730,737;, + 3;731,730,738;, + 3;732,731,738;, + 3;732,738,739;, + 3;740,732,739;, + 3;733,732,740;, + 3;735,734,741;, + 3;735,741,742;, + 3;736,735,742;, + 3;736,742,743;, + 3;737,736,743;, + 3;737,743,744;, + 3;745,737,744;, + 3;738,737,745;, + 3;739,738,745;, + 3;739,745,746;, + 3;747,739,746;, + 3;740,739,747;, + 3;742,741,748;, + 3;742,748,749;, + 3;743,742,749;, + 3;743,749,750;, + 3;744,743,750;, + 3;744,750,751;, + 3;752,744,751;, + 3;745,744,752;, + 3;746,745,752;, + 3;746,752,753;, + 3;754,746,753;, + 3;747,746,754;, + 3;749,748,755;, + 3;749,755,756;, + 3;750,749,756;, + 3;750,756,757;, + 3;751,750,757;, + 3;751,757,758;, + 3;759,751,758;, + 3;752,751,759;, + 3;753,752,759;, + 3;753,759,760;, + 3;761,753,760;, + 3;754,753,761;, + 3;756,755,762;, + 3;756,762,763;, + 3;757,756,763;, + 3;757,763,764;, + 3;758,757,764;, + 3;758,764,765;, + 3;766,758,765;, + 3;759,758,766;, + 3;760,759,766;, + 3;760,766,767;, + 3;768,760,767;, + 3;761,760,768;, + 3;763,762,769;, + 3;763,769,770;, + 3;764,763,770;, + 3;764,770,771;, + 3;765,764,771;, + 3;765,771,772;, + 3;773,765,772;, + 3;766,765,773;, + 3;767,766,773;, + 3;767,773,774;, + 3;775,767,774;, + 3;768,767,775;, + 3;770,769,776;, + 3;770,776,777;, + 3;771,770,777;, + 3;771,777,778;, + 3;772,771,778;, + 3;772,778,779;, + 3;780,772,779;, + 3;773,772,780;, + 3;774,773,780;, + 3;774,780,781;, + 3;782,774,781;, + 3;775,774,782;, + 3;777,776,783;, + 3;777,783,784;, + 3;778,777,784;, + 3;778,784,785;, + 3;779,778,785;, + 3;779,785,786;, + 3;787,779,786;, + 3;780,779,787;, + 3;781,780,787;, + 3;781,787,788;, + 3;789,781,788;, + 3;782,781,789;, + 3;784,783,790;, + 3;784,790,791;, + 3;785,784,791;, + 3;785,791,792;, + 3;786,785,792;, + 3;786,792,793;, + 3;794,786,793;, + 3;787,786,794;, + 3;788,787,794;, + 3;788,794,795;, + 3;796,788,795;, + 3;789,788,796;, + 3;791,790,797;, + 3;791,797,798;, + 3;792,791,798;, + 3;792,798,799;, + 3;793,792,799;, + 3;793,799,800;, + 3;801,793,800;, + 3;794,793,801;, + 3;795,794,801;, + 3;795,801,802;, + 3;803,795,802;, + 3;796,795,803;, + 3;798,797,804;, + 3;798,804,805;, + 3;799,798,805;, + 3;799,805,806;, + 3;800,799,806;, + 3;800,806,807;, + 3;808,800,807;, + 3;801,800,808;, + 3;802,801,808;, + 3;802,808,809;, + 3;810,802,809;, + 3;803,802,810;, + 3;805,804,811;, + 3;805,811,812;, + 3;806,805,812;, + 3;806,812,813;, + 3;807,806,813;, + 3;807,813,814;, + 3;815,807,814;, + 3;808,807,815;, + 3;809,808,815;, + 3;809,815,816;, + 3;817,809,816;, + 3;810,809,817;, + 3;812,811,818;, + 3;812,818,819;, + 3;813,812,819;, + 3;813,819,820;, + 3;814,813,820;, + 3;814,820,821;, + 3;822,814,821;, + 3;815,814,822;, + 3;816,815,822;, + 3;816,822,823;, + 3;824,816,823;, + 3;817,816,824;, + 3;819,818,825;, + 3;819,825,826;, + 3;820,819,826;, + 3;820,826,827;, + 3;821,820,827;, + 3;821,827,828;, + 3;829,821,828;, + 3;822,821,829;, + 3;823,822,829;, + 3;823,829,830;, + 3;831,823,830;, + 3;824,823,831;, + 3;826,825,832;, + 3;826,832,833;, + 3;827,826,833;, + 3;827,833,834;, + 3;828,827,834;, + 3;828,834,835;, + 3;836,828,835;, + 3;829,828,836;, + 3;830,829,836;, + 3;830,836,837;, + 3;838,830,837;, + 3;831,830,838;, + 3;833,832,839;, + 3;833,839,840;, + 3;834,833,840;, + 3;834,840,841;, + 3;835,834,841;, + 3;835,841,842;, + 3;843,835,842;, + 3;836,835,843;, + 3;837,836,843;, + 3;837,843,844;, + 3;845,837,844;, + 3;838,837,845;, + 3;840,839,846;, + 3;840,846,847;, + 3;841,840,847;, + 3;841,847,848;, + 3;842,841,848;, + 3;842,848,849;, + 3;850,842,849;, + 3;843,842,850;, + 3;844,843,850;, + 3;844,850,851;, + 3;852,844,851;, + 3;845,844,852;, + 3;847,846,853;, + 3;847,853,854;, + 3;848,847,854;, + 3;848,854,855;, + 3;849,848,855;, + 3;849,855,856;, + 3;857,849,856;, + 3;850,849,857;, + 3;851,850,857;, + 3;851,857,858;, + 3;859,851,858;, + 3;852,851,859;, + 3;854,853,860;, + 3;854,860,861;, + 3;855,854,861;, + 3;855,861,862;, + 3;856,855,862;, + 3;856,862,863;, + 3;864,856,863;, + 3;857,856,864;, + 3;858,857,864;, + 3;858,864,865;, + 3;866,858,865;, + 3;859,858,866;, + 3;861,860,867;, + 3;861,867,868;, + 3;862,861,868;, + 3;862,868,869;, + 3;863,862,869;, + 3;863,869,870;, + 3;871,863,870;, + 3;864,863,871;, + 3;865,864,871;, + 3;865,871,872;, + 3;873,865,872;, + 3;866,865,873;, + 3;868,867,874;, + 3;868,874,875;, + 3;869,868,875;, + 3;869,875,876;, + 3;870,869,876;, + 3;870,876,877;, + 3;878,870,877;, + 3;871,870,878;, + 3;872,871,878;, + 3;872,878,879;, + 3;880,872,879;, + 3;873,872,880;, + 3;875,874,881;, + 3;875,881,882;, + 3;876,875,882;, + 3;876,882,883;, + 3;877,876,883;, + 3;877,883,884;, + 3;885,877,884;, + 3;878,877,885;, + 3;879,878,885;, + 3;879,885,886;, + 3;887,879,886;, + 3;880,879,887;, + 3;882,881,888;, + 3;882,888,889;, + 3;883,882,889;, + 3;883,889,890;, + 3;884,883,890;, + 3;884,890,891;, + 3;892,884,891;, + 3;885,884,892;, + 3;886,885,892;, + 3;886,892,893;, + 3;894,886,893;, + 3;887,886,894;, + 3;889,888,895;, + 3;889,895,896;, + 3;890,889,896;, + 3;890,896,897;, + 3;891,890,897;, + 3;891,897,898;, + 3;899,891,898;, + 3;892,891,899;, + 3;893,892,899;, + 3;893,899,900;, + 3;901,893,900;, + 3;894,893,901;, + 3;896,895,902;, + 3;896,902,903;, + 3;897,896,903;, + 3;897,903,904;, + 3;898,897,904;, + 3;898,904,905;, + 3;906,898,905;, + 3;899,898,906;, + 3;900,899,906;, + 3;900,906,907;, + 3;908,900,907;, + 3;901,900,908;, + 3;903,902,909;, + 3;903,909,910;, + 3;904,903,910;, + 3;904,910,911;, + 3;905,904,911;, + 3;905,911,912;, + 3;913,905,912;, + 3;906,905,913;, + 3;907,906,913;, + 3;907,913,914;, + 3;915,907,914;, + 3;908,907,915;, + 3;910,909,916;, + 3;910,916,917;, + 3;911,910,917;, + 3;911,917,918;, + 3;912,911,918;, + 3;912,918,919;, + 3;920,912,919;, + 3;913,912,920;, + 3;914,913,920;, + 3;914,920,921;, + 3;922,914,921;, + 3;915,914,922;, + 3;917,916,923;, + 3;917,923,924;, + 3;918,917,924;, + 3;918,924,925;, + 3;919,918,925;, + 3;919,925,926;, + 3;927,919,926;, + 3;920,919,927;, + 3;921,920,927;, + 3;921,927,928;, + 3;929,921,928;, + 3;922,921,929;, + 3;924,923,6;, + 3;925,924,6;, + 3;926,925,6;, + 3;930,926,6;, + 3;927,926,930;, + 3;928,927,930;, + 3;928,930,931;, + 3;932,928,931;, + 3;929,928,932;, + 3;933,929,932;, + 3;934,929,933;, + 3;934,922,929;, + 3;931,930,6;, + 3;935,931,6;, + 3;932,931,935;, + 3;936,932,935;, + 3;933,932,936;, + 3;937,933,936;, + 3;938,933,937;, + 3;938,934,933;, + 3;939,934,938;, + 3;939,940,934;, + 3;940,922,934;, + 3;940,915,922;, + 3;941,935,6;, + 3;936,935,941;, + 3;942,936,941;, + 3;937,936,942;, + 3;943,937,942;, + 3;944,937,943;, + 3;944,938,937;, + 3;945,938,944;, + 3;945,939,938;, + 3;946,941,6;, + 3;942,941,946;, + 3;947,942,946;, + 3;943,942,947;, + 3;948,943,947;, + 3;949,943,948;, + 3;949,944,943;, + 3;950,944,949;, + 3;950,945,944;, + 3;951,946,6;, + 3;947,946,951;, + 3;952,947,951;, + 3;948,947,952;, + 3;953,948,952;, + 3;954,948,953;, + 3;954,949,948;, + 3;955,949,954;, + 3;955,950,949;, + 3;956,951,6;, + 3;952,951,956;, + 3;957,952,956;, + 3;953,952,957;, + 3;958,953,957;, + 3;959,953,958;, + 3;959,954,953;, + 3;960,954,959;, + 3;960,955,954;, + 3;961,956,6;, + 3;957,956,961;, + 3;962,957,961;, + 3;958,957,962;, + 3;963,958,962;, + 3;964,958,963;, + 3;964,959,958;, + 3;965,959,964;, + 3;965,960,959;, + 3;966,961,6;, + 3;962,961,966;, + 3;967,962,966;, + 3;963,962,967;, + 3;968,963,967;, + 3;969,963,968;, + 3;969,964,963;, + 3;970,964,969;, + 3;970,965,964;, + 3;971,966,6;, + 3;967,966,971;, + 3;972,967,971;, + 3;968,967,972;, + 3;973,968,972;, + 3;974,968,973;, + 3;974,969,968;, + 3;975,969,974;, + 3;975,970,969;, + 3;976,971,6;, + 3;972,971,976;, + 3;977,972,976;, + 3;973,972,977;, + 3;978,973,977;, + 3;979,973,978;, + 3;979,974,973;, + 3;980,974,979;, + 3;980,975,974;, + 3;981,976,6;, + 3;977,976,981;, + 3;982,977,981;, + 3;978,977,982;, + 3;983,978,982;, + 3;984,978,983;, + 3;984,979,978;, + 3;985,979,984;, + 3;985,980,979;, + 3;986,981,6;, + 3;982,981,986;, + 3;987,982,986;, + 3;983,982,987;, + 3;988,983,987;, + 3;989,983,988;, + 3;989,984,983;, + 3;990,984,989;, + 3;990,985,984;, + 3;991,986,6;, + 3;987,986,991;, + 3;12,987,991;, + 3;988,987,12;, + 3;11,988,12;, + 3;992,988,11;, + 3;992,989,988;, + 3;993,989,992;, + 3;993,990,989;, + 3;5,991,6;, + 3;12,991,5;, + 3;18,992,11;, + 3;994,992,18;, + 3;994,993,992;, + 3;995,993,994;, + 3;995,996,993;, + 3;996,990,993;, + 3;996,997,990;, + 3;997,985,990;, + 3;998,994,18;, + 3;999,994,998;, + 3;999,995,994;, + 3;1000,995,999;, + 3;1000,1001,995;, + 3;1001,996,995;, + 3;1001,1002,996;, + 3;1002,997,996;, + 3;998,18,17;, + 3;24,998,17;, + 3;1003,998,24;, + 3;1003,999,998;, + 3;1004,999,1003;, + 3;1004,1000,999;, + 3;1005,1000,1004;, + 3;1005,1006,1000;, + 3;1006,1001,1000;, + 3;1006,1007,1001;, + 3;1007,1002,1001;, + 3;1008,1003,24;, + 3;1009,1003,1008;, + 3;1009,1004,1003;, + 3;1010,1004,1009;, + 3;1010,1005,1004;, + 3;1011,1005,1010;, + 3;1011,1012,1005;, + 3;1012,1006,1005;, + 3;1012,1013,1006;, + 3;1013,1007,1006;, + 3;1008,24,23;, + 3;35,1008,23;, + 3;1014,1008,35;, + 3;1014,1009,1008;, + 3;1015,1009,1014;, + 3;1015,1010,1009;, + 3;1016,1010,1015;, + 3;1016,1011,1010;, + 3;1017,1011,1016;, + 3;1017,1018,1011;, + 3;1018,1012,1011;, + 3;1018,1019,1012;, + 3;1019,1013,1012;, + 3;1014,35,41;, + 3;1014,41,1020;, + 3;1015,1014,1020;, + 3;1015,1020,1021;, + 3;1016,1015,1021;, + 3;1016,1021,1022;, + 3;1017,1016,1022;, + 3;1017,1022,1023;, + 3;1024,1017,1023;, + 3;1024,1018,1017;, + 3;1024,1025,1018;, + 3;1025,1019,1018;, + 3;1020,41,47;, + 3;1020,47,1026;, + 3;1021,1020,1026;, + 3;1021,1026,1027;, + 3;1022,1021,1027;, + 3;1022,1027,1028;, + 3;1023,1022,1028;, + 3;1023,1028,1029;, + 3;1030,1023,1029;, + 3;1024,1023,1030;, + 3;1031,1024,1030;, + 3;1031,1025,1024;, + 3;1026,47,53;, + 3;1026,53,1032;, + 3;1027,1026,1032;, + 3;1027,1032,1033;, + 3;1028,1027,1033;, + 3;1028,1033,1034;, + 3;1029,1028,1034;, + 3;1029,1034,1035;, + 3;1036,1029,1035;, + 3;1030,1029,1036;, + 3;1037,1030,1036;, + 3;1031,1030,1037;, + 3;1032,53,59;, + 3;1032,59,1038;, + 3;1033,1032,1038;, + 3;1033,1038,1039;, + 3;1034,1033,1039;, + 3;1034,1039,1040;, + 3;1035,1034,1040;, + 3;1035,1040,1041;, + 3;1042,1035,1041;, + 3;1036,1035,1042;, + 3;1043,1036,1042;, + 3;1037,1036,1043;, + 3;1038,59,65;, + 3;1038,65,1044;, + 3;1039,1038,1044;, + 3;1039,1044,1045;, + 3;1040,1039,1045;, + 3;1040,1045,1046;, + 3;1041,1040,1046;, + 3;1041,1046,1047;, + 3;1048,1041,1047;, + 3;1042,1041,1048;, + 3;1049,1042,1048;, + 3;1043,1042,1049;, + 3;1044,65,71;, + 3;1044,71,1050;, + 3;1045,1044,1050;, + 3;1045,1050,1051;, + 3;1046,1045,1051;, + 3;1046,1051,1052;, + 3;1047,1046,1052;, + 3;1047,1052,1053;, + 3;1054,1047,1053;, + 3;1048,1047,1054;, + 3;1055,1048,1054;, + 3;1049,1048,1055;, + 3;1050,71,77;, + 3;1050,77,1056;, + 3;1051,1050,1056;, + 3;1051,1056,1057;, + 3;1052,1051,1057;, + 3;1052,1057,1058;, + 3;1053,1052,1058;, + 3;1053,1058,1059;, + 3;1060,1053,1059;, + 3;1054,1053,1060;, + 3;1061,1054,1060;, + 3;1055,1054,1061;, + 3;1056,77,83;, + 3;1056,83,1062;, + 3;1057,1056,1062;, + 3;1057,1062,1063;, + 3;1058,1057,1063;, + 3;1058,1063,1064;, + 3;1059,1058,1064;, + 3;1059,1064,1065;, + 3;1066,1059,1065;, + 3;1060,1059,1066;, + 3;1067,1060,1066;, + 3;1061,1060,1067;, + 3;1062,83,89;, + 3;1062,89,1068;, + 3;1063,1062,1068;, + 3;1063,1068,1069;, + 3;1064,1063,1069;, + 3;1064,1069,1070;, + 3;1065,1064,1070;, + 3;1065,1070,1071;, + 3;1072,1065,1071;, + 3;1066,1065,1072;, + 3;1073,1066,1072;, + 3;1067,1066,1073;, + 3;1068,89,95;, + 3;1068,95,1074;, + 3;1069,1068,1074;, + 3;1069,1074,1075;, + 3;1070,1069,1075;, + 3;1070,1075,1076;, + 3;1071,1070,1076;, + 3;1071,1076,1077;, + 3;1078,1071,1077;, + 3;1072,1071,1078;, + 3;1079,1072,1078;, + 3;1073,1072,1079;, + 3;1074,95,101;, + 3;1074,101,1080;, + 3;1075,1074,1080;, + 3;1075,1080,1081;, + 3;1076,1075,1081;, + 3;1076,1081,1082;, + 3;1077,1076,1082;, + 3;1077,1082,1083;, + 3;1084,1077,1083;, + 3;1078,1077,1084;, + 3;1085,1078,1084;, + 3;1079,1078,1085;, + 3;1080,101,107;, + 3;1080,107,1086;, + 3;1081,1080,1086;, + 3;1081,1086,1087;, + 3;1082,1081,1087;, + 3;1082,1087,1088;, + 3;1083,1082,1088;, + 3;1083,1088,1089;, + 3;1090,1083,1089;, + 3;1084,1083,1090;, + 3;1091,1084,1090;, + 3;1085,1084,1091;, + 3;1086,107,113;, + 3;1086,113,1092;, + 3;1087,1086,1092;, + 3;1087,1092,1093;, + 3;1088,1087,1093;, + 3;1088,1093,1094;, + 3;1089,1088,1094;, + 3;1089,1094,1095;, + 3;1096,1089,1095;, + 3;1090,1089,1096;, + 3;1097,1090,1096;, + 3;1091,1090,1097;, + 3;1092,113,119;, + 3;1092,119,1098;, + 3;1093,1092,1098;, + 3;1093,1098,1099;, + 3;1094,1093,1099;, + 3;1094,1099,1100;, + 3;1095,1094,1100;, + 3;1095,1100,1101;, + 3;1102,1095,1101;, + 3;1096,1095,1102;, + 3;1103,1096,1102;, + 3;1097,1096,1103;, + 3;1098,119,125;, + 3;1098,125,1104;, + 3;1099,1098,1104;, + 3;1099,1104,1105;, + 3;1100,1099,1105;, + 3;1100,1105,1106;, + 3;1101,1100,1106;, + 3;1101,1106,1107;, + 3;1108,1101,1107;, + 3;1102,1101,1108;, + 3;1109,1102,1108;, + 3;1103,1102,1109;, + 3;1104,125,131;, + 3;1104,131,1110;, + 3;1105,1104,1110;, + 3;1105,1110,1111;, + 3;1106,1105,1111;, + 3;1106,1111,1112;, + 3;1107,1106,1112;, + 3;1107,1112,1113;, + 3;1114,1107,1113;, + 3;1108,1107,1114;, + 3;1115,1108,1114;, + 3;1109,1108,1115;, + 3;1110,131,137;, + 3;1110,137,1116;, + 3;1111,1110,1116;, + 3;1111,1116,1117;, + 3;1112,1111,1117;, + 3;1112,1117,1118;, + 3;1113,1112,1118;, + 3;1113,1118,1119;, + 3;1120,1113,1119;, + 3;1114,1113,1120;, + 3;1121,1114,1120;, + 3;1115,1114,1121;, + 3;1116,137,143;, + 3;1116,143,1122;, + 3;1117,1116,1122;, + 3;1117,1122,1123;, + 3;1118,1117,1123;, + 3;1118,1123,1124;, + 3;1119,1118,1124;, + 3;1119,1124,1125;, + 3;1126,1119,1125;, + 3;1120,1119,1126;, + 3;1127,1120,1126;, + 3;1121,1120,1127;, + 3;1122,143,149;, + 3;1122,149,183;, + 3;1123,1122,183;, + 3;1123,183,182;, + 3;1124,1123,182;, + 3;1124,182,189;, + 3;1125,1124,189;, + 3;1125,189,195;, + 3;1128,1125,195;, + 3;1126,1125,1128;, + 3;1129,1126,1128;, + 3;1127,1126,1129;, + 3;1130,1127,1129;, + 3;1131,1127,1130;, + 3;1131,1121,1127;, + 3;1132,1121,1131;, + 3;1132,1115,1121;, + 3;1128,195,201;, + 3;1133,1128,201;, + 3;1129,1128,1133;, + 3;1134,1129,1133;, + 3;1130,1129,1134;, + 3;1135,1130,1134;, + 3;1136,1130,1135;, + 3;1136,1131,1130;, + 3;1137,1131,1136;, + 3;1137,1132,1131;, + 3;1133,201,207;, + 3;1138,1133,207;, + 3;1134,1133,1138;, + 3;1139,1134,1138;, + 3;1135,1134,1139;, + 3;1140,1135,1139;, + 3;1141,1135,1140;, + 3;1141,1136,1135;, + 3;1142,1136,1141;, + 3;1142,1137,1136;, + 3;1138,207,213;, + 3;1143,1138,213;, + 3;1139,1138,1143;, + 3;1144,1139,1143;, + 3;1140,1139,1144;, + 3;1145,1140,1144;, + 3;1146,1140,1145;, + 3;1146,1141,1140;, + 3;1147,1141,1146;, + 3;1147,1142,1141;, + 3;1143,213,219;, + 3;1148,1143,219;, + 3;1144,1143,1148;, + 3;1149,1144,1148;, + 3;1145,1144,1149;, + 3;1150,1145,1149;, + 3;1151,1145,1150;, + 3;1151,1146,1145;, + 3;1152,1146,1151;, + 3;1152,1147,1146;, + 3;1148,219,225;, + 3;1153,1148,225;, + 3;1149,1148,1153;, + 3;1154,1149,1153;, + 3;1150,1149,1154;, + 3;1155,1150,1154;, + 3;1156,1150,1155;, + 3;1156,1151,1150;, + 3;1157,1151,1156;, + 3;1157,1152,1151;, + 3;1153,225,231;, + 3;1158,1153,231;, + 3;1154,1153,1158;, + 3;1159,1154,1158;, + 3;1155,1154,1159;, + 3;1160,1155,1159;, + 3;1161,1155,1160;, + 3;1161,1156,1155;, + 3;1162,1156,1161;, + 3;1162,1157,1156;, + 3;1158,231,237;, + 3;1163,1158,237;, + 3;1159,1158,1163;, + 3;1164,1159,1163;, + 3;1160,1159,1164;, + 3;1165,1160,1164;, + 3;1166,1160,1165;, + 3;1166,1161,1160;, + 3;1167,1161,1166;, + 3;1167,1162,1161;, + 3;1163,237,243;, + 3;1168,1163,243;, + 3;1164,1163,1168;, + 3;1169,1164,1168;, + 3;1165,1164,1169;, + 3;1170,1165,1169;, + 3;1171,1165,1170;, + 3;1171,1166,1165;, + 3;1172,1166,1171;, + 3;1172,1167,1166;, + 3;1168,243,249;, + 3;1173,1168,249;, + 3;1169,1168,1173;, + 3;1174,1169,1173;, + 3;1170,1169,1174;, + 3;1175,1170,1174;, + 3;1176,1170,1175;, + 3;1176,1171,1170;, + 3;1177,1171,1176;, + 3;1177,1172,1171;, + 3;1173,249,255;, + 3;1178,1173,255;, + 3;1174,1173,1178;, + 3;1179,1174,1178;, + 3;1175,1174,1179;, + 3;1180,1175,1179;, + 3;1181,1175,1180;, + 3;1181,1176,1175;, + 3;1182,1176,1181;, + 3;1182,1177,1176;, + 3;1178,255,261;, + 3;1183,1178,261;, + 3;1179,1178,1183;, + 3;1184,1179,1183;, + 3;1180,1179,1184;, + 3;1185,1180,1184;, + 3;1186,1180,1185;, + 3;1186,1181,1180;, + 3;1187,1181,1186;, + 3;1187,1182,1181;, + 3;1183,261,267;, + 3;1188,1183,267;, + 3;1184,1183,1188;, + 3;1189,1184,1188;, + 3;1185,1184,1189;, + 3;1190,1185,1189;, + 3;1191,1185,1190;, + 3;1191,1186,1185;, + 3;1192,1186,1191;, + 3;1192,1187,1186;, + 3;1188,267,273;, + 3;1193,1188,273;, + 3;1189,1188,1193;, + 3;1194,1189,1193;, + 3;1190,1189,1194;, + 3;1195,1190,1194;, + 3;1196,1190,1195;, + 3;1196,1191,1190;, + 3;1197,1191,1196;, + 3;1197,1192,1191;, + 3;1193,273,279;, + 3;1198,1193,279;, + 3;1194,1193,1198;, + 3;1199,1194,1198;, + 3;1195,1194,1199;, + 3;1200,1195,1199;, + 3;1201,1195,1200;, + 3;1201,1196,1195;, + 3;1202,1196,1201;, + 3;1202,1197,1196;, + 3;1198,279,285;, + 3;1203,1198,285;, + 3;1199,1198,1203;, + 3;1204,1199,1203;, + 3;1200,1199,1204;, + 3;1205,1200,1204;, + 3;1206,1200,1205;, + 3;1206,1201,1200;, + 3;1207,1201,1206;, + 3;1207,1202,1201;, + 3;1203,285,291;, + 3;1208,1203,291;, + 3;1204,1203,1208;, + 3;1209,1204,1208;, + 3;1205,1204,1209;, + 3;1210,1205,1209;, + 3;1211,1205,1210;, + 3;1211,1206,1205;, + 3;1212,1206,1211;, + 3;1212,1207,1206;, + 3;1208,291,297;, + 3;1213,1208,297;, + 3;1209,1208,1213;, + 3;1214,1209,1213;, + 3;1210,1209,1214;, + 3;1215,1210,1214;, + 3;1216,1210,1215;, + 3;1216,1211,1210;, + 3;1217,1211,1216;, + 3;1217,1212,1211;, + 3;1213,297,303;, + 3;1218,1213,303;, + 3;1214,1213,1218;, + 3;1219,1214,1218;, + 3;1215,1214,1219;, + 3;1220,1215,1219;, + 3;1221,1215,1220;, + 3;1221,1216,1215;, + 3;1222,1216,1221;, + 3;1222,1217,1216;, + 3;1218,303,309;, + 3;1223,1218,309;, + 3;1219,1218,1223;, + 3;1224,1219,1223;, + 3;1220,1219,1224;, + 3;1225,1220,1224;, + 3;1226,1220,1225;, + 3;1226,1221,1220;, + 3;1227,1221,1226;, + 3;1227,1222,1221;, + 3;1223,309,315;, + 3;1228,1223,315;, + 3;1224,1223,1228;, + 3;1229,1224,1228;, + 3;1225,1224,1229;, + 3;1230,1225,1229;, + 3;1231,1225,1230;, + 3;1231,1226,1225;, + 3;1232,1226,1231;, + 3;1232,1227,1226;, + 3;1228,315,321;, + 3;1233,1228,321;, + 3;1229,1228,1233;, + 3;1234,1229,1233;, + 3;1230,1229,1234;, + 3;1235,1230,1234;, + 3;1236,1230,1235;, + 3;1236,1231,1230;, + 3;1237,1231,1236;, + 3;1237,1232,1231;, + 3;1233,321,327;, + 3;1238,1233,327;, + 3;1234,1233,1238;, + 3;1239,1234,1238;, + 3;1235,1234,1239;, + 3;1240,1235,1239;, + 3;1241,1235,1240;, + 3;1241,1236,1235;, + 3;1242,1236,1241;, + 3;1242,1237,1236;, + 3;1238,327,333;, + 3;1243,1238,333;, + 3;1239,1238,1243;, + 3;1244,1239,1243;, + 3;1240,1239,1244;, + 3;1245,1240,1244;, + 3;1246,1240,1245;, + 3;1246,1241,1240;, + 3;1247,1241,1246;, + 3;1247,1242,1241;, + 3;1243,333,339;, + 3;1248,1243,339;, + 3;1244,1243,1248;, + 3;1249,1244,1248;, + 3;1245,1244,1249;, + 3;1250,1245,1249;, + 3;1251,1245,1250;, + 3;1251,1246,1245;, + 3;1252,1246,1251;, + 3;1252,1247,1246;, + 3;1248,339,345;, + 3;1253,1248,345;, + 3;1249,1248,1253;, + 3;1254,1249,1253;, + 3;1250,1249,1254;, + 3;1255,1250,1254;, + 3;1256,1250,1255;, + 3;1256,1251,1250;, + 3;1257,1251,1256;, + 3;1257,1252,1251;, + 3;1253,345,351;, + 3;1258,1253,351;, + 3;1254,1253,1258;, + 3;1259,1254,1258;, + 3;1255,1254,1259;, + 3;1260,1255,1259;, + 3;1261,1255,1260;, + 3;1261,1256,1255;, + 3;1262,1256,1261;, + 3;1262,1257,1256;, + 3;1258,351,357;, + 3;1263,1258,357;, + 3;1259,1258,1263;, + 3;1264,1259,1263;, + 3;1260,1259,1264;, + 3;1265,1260,1264;, + 3;1266,1260,1265;, + 3;1266,1261,1260;, + 3;1267,1261,1266;, + 3;1267,1262,1261;, + 3;1263,357,363;, + 3;1268,1263,363;, + 3;1264,1263,1268;, + 3;1269,1264,1268;, + 3;1265,1264,1269;, + 3;1270,1265,1269;, + 3;1271,1265,1270;, + 3;1271,1266,1265;, + 3;1272,1266,1271;, + 3;1272,1267,1266;, + 3;1268,363,369;, + 3;1273,1268,369;, + 3;1269,1268,1273;, + 3;1274,1269,1273;, + 3;1270,1269,1274;, + 3;1275,1270,1274;, + 3;1276,1270,1275;, + 3;1276,1271,1270;, + 3;1277,1271,1276;, + 3;1277,1272,1271;, + 3;1273,369,375;, + 3;1278,1273,375;, + 3;1274,1273,1278;, + 3;1279,1274,1278;, + 3;1275,1274,1279;, + 3;443,1275,1279;, + 3;448,1275,443;, + 3;448,1276,1275;, + 3;453,1276,448;, + 3;453,1277,1276;, + 3;1278,375,381;, + 3;1280,1278,381;, + 3;1279,1278,1280;, + 3;437,1279,1280;, + 3;443,1279,437;, + 3;1280,381,387;, + 3;438,1280,387;, + 3;437,1280,438;, + 3;438,387,393;, + 3;427,438,393;, + 3;427,393,399;, + 3;458,1277,453;, + 3;458,1281,1277;, + 3;1281,1272,1277;, + 3;1281,1282,1272;, + 3;1282,1267,1272;, + 3;1282,1283,1267;, + 3;1283,1262,1267;, + 3;463,1281,458;, + 3;463,1284,1281;, + 3;1284,1282,1281;, + 3;1284,1285,1282;, + 3;1285,1283,1282;, + 3;1285,1286,1283;, + 3;1286,1287,1283;, + 3;1283,1287,1262;, + 3;1287,1257,1262;, + 3;1287,1288,1257;, + 3;1288,1252,1257;, + 3;468,1284,463;, + 3;468,1289,1284;, + 3;1289,1285,1284;, + 3;1289,1290,1285;, + 3;1290,1286,1285;, + 3;1290,1291,1286;, + 3;1291,1292,1286;, + 3;1286,1292,1287;, + 3;1292,1288,1287;, + 3;1292,1293,1288;, + 3;1293,1294,1288;, + 3;1288,1294,1252;, + 3;1294,1247,1252;, + 3;473,1289,468;, + 3;473,1295,1289;, + 3;1295,1290,1289;, + 3;1295,1296,1290;, + 3;1296,1291,1290;, + 3;1296,1297,1291;, + 3;1297,1298,1291;, + 3;1291,1298,1292;, + 3;1298,1293,1292;, + 3;1298,1299,1293;, + 3;1299,1300,1293;, + 3;1293,1300,1294;, + 3;478,1295,473;, + 3;478,1301,1295;, + 3;1301,1296,1295;, + 3;1301,1302,1296;, + 3;1302,1297,1296;, + 3;1302,1303,1297;, + 3;1303,1304,1297;, + 3;1297,1304,1298;, + 3;1304,1299,1298;, + 3;1304,1305,1299;, + 3;1305,1306,1299;, + 3;1299,1306,1300;, + 3;483,1301,478;, + 3;483,1307,1301;, + 3;1307,1302,1301;, + 3;1307,1308,1302;, + 3;1308,1303,1302;, + 3;1308,1309,1303;, + 3;1309,1310,1303;, + 3;1303,1310,1304;, + 3;1310,1305,1304;, + 3;1310,1311,1305;, + 3;1311,1312,1305;, + 3;1305,1312,1306;, + 3;488,1307,483;, + 3;488,1313,1307;, + 3;1313,1308,1307;, + 3;1313,1314,1308;, + 3;1314,1309,1308;, + 3;1314,1315,1309;, + 3;1315,1316,1309;, + 3;1309,1316,1310;, + 3;1316,1311,1310;, + 3;1316,1317,1311;, + 3;1317,1318,1311;, + 3;1311,1318,1312;, + 3;493,1313,488;, + 3;493,1319,1313;, + 3;1319,1314,1313;, + 3;1319,1320,1314;, + 3;1320,1315,1314;, + 3;1320,1321,1315;, + 3;1321,1322,1315;, + 3;1315,1322,1316;, + 3;1322,1317,1316;, + 3;1322,1323,1317;, + 3;1323,1324,1317;, + 3;1317,1324,1318;, + 3;498,1319,493;, + 3;498,1325,1319;, + 3;1325,1320,1319;, + 3;1325,1326,1320;, + 3;1326,1321,1320;, + 3;1326,1327,1321;, + 3;1327,1328,1321;, + 3;1321,1328,1322;, + 3;1328,1323,1322;, + 3;1328,1329,1323;, + 3;1329,1330,1323;, + 3;1323,1330,1324;, + 3;503,1325,498;, + 3;503,515,1325;, + 3;515,1326,1325;, + 3;515,1331,1326;, + 3;1331,1327,1326;, + 3;1331,1332,1327;, + 3;1332,1333,1327;, + 3;1327,1333,1328;, + 3;1333,1329,1328;, + 3;1333,1334,1329;, + 3;1334,1335,1329;, + 3;1329,1335,1330;, + 3;514,1331,515;, + 3;514,1336,1331;, + 3;1336,1332,1331;, + 3;1336,1337,1332;, + 3;1337,1338,1332;, + 3;1332,1338,1333;, + 3;1338,1334,1333;, + 3;1338,1339,1334;, + 3;1339,1340,1334;, + 3;1334,1340,1335;, + 3;521,1336,514;, + 3;521,1341,1336;, + 3;1341,1337,1336;, + 3;1341,1342,1337;, + 3;1342,1343,1337;, + 3;1337,1343,1338;, + 3;1343,1339,1338;, + 3;1343,1344,1339;, + 3;1344,1345,1339;, + 3;1339,1345,1340;, + 3;1346,1341,521;, + 3;1346,1347,1341;, + 3;1347,1342,1341;, + 3;1347,1348,1342;, + 3;1348,1349,1342;, + 3;1342,1349,1343;, + 3;1349,1344,1343;, + 3;1349,1350,1344;, + 3;1350,1351,1344;, + 3;1344,1351,1345;, + 3;520,1346,521;, + 3;1352,1346,520;, + 3;1352,1353,1346;, + 3;1353,1347,1346;, + 3;1353,1354,1347;, + 3;1354,1348,1347;, + 3;1354,1355,1348;, + 3;1355,1356,1348;, + 3;1348,1356,1349;, + 3;1356,1350,1349;, + 3;519,1352,520;, + 3;519,527,1352;, + 3;1352,527,1357;, + 3;1352,1357,1353;, + 3;1353,1357,1358;, + 3;1353,1358,1354;, + 3;1354,1358,1359;, + 3;1354,1359,1355;, + 3;1355,1359,1360;, + 3;1355,1360,1361;, + 3;1355,1361,1356;, + 3;1361,1362,1356;, + 3;1356,1362,1350;, + 3;527,1363,1357;, + 3;1357,1363,1364;, + 3;1357,1364,1358;, + 3;1358,1364,1365;, + 3;1358,1365,1359;, + 3;1359,1365,1366;, + 3;1359,1366,1360;, + 3;1360,1366,1367;, + 3;1360,1367,1368;, + 3;1361,1360,1368;, + 3;527,526,1363;, + 3;526,1369,1363;, + 3;1363,1369,1370;, + 3;1363,1370,1364;, + 3;1364,1370,1371;, + 3;1364,1371,1365;, + 3;1365,1371,1372;, + 3;1365,1372,1366;, + 3;1366,1372,1373;, + 3;1366,1373,1367;, + 3;526,533,1369;, + 3;533,1374,1369;, + 3;1369,1374,1375;, + 3;1369,1375,1370;, + 3;1370,1375,1376;, + 3;1370,1376,1371;, + 3;1371,1376,1377;, + 3;1371,1377,1372;, + 3;1372,1377,1378;, + 3;1372,1378,1373;, + 3;533,538,1374;, + 3;538,1379,1374;, + 3;1374,1379,1380;, + 3;1374,1380,1375;, + 3;1375,1380,1381;, + 3;1375,1381,1376;, + 3;1376,1381,1382;, + 3;1376,1382,1377;, + 3;1377,1382,1383;, + 3;1377,1383,1378;, + 3;538,543,1379;, + 3;543,1384,1379;, + 3;1379,1384,1385;, + 3;1379,1385,1380;, + 3;1380,1385,1386;, + 3;1380,1386,1381;, + 3;1381,1386,1387;, + 3;1381,1387,1382;, + 3;1382,1387,1388;, + 3;1382,1388,1383;, + 3;543,548,1384;, + 3;548,1389,1384;, + 3;1384,1389,1390;, + 3;1384,1390,1385;, + 3;1385,1390,1391;, + 3;1385,1391,1386;, + 3;1386,1391,1392;, + 3;1386,1392,1387;, + 3;1387,1392,1393;, + 3;1387,1393,1388;, + 3;548,553,1389;, + 3;553,1394,1389;, + 3;1389,1394,1395;, + 3;1389,1395,1390;, + 3;1390,1395,1396;, + 3;1390,1396,1391;, + 3;1391,1396,1397;, + 3;1391,1397,1392;, + 3;1392,1397,1398;, + 3;1392,1398,1393;, + 3;553,558,1394;, + 3;558,1399,1394;, + 3;1394,1399,1400;, + 3;1394,1400,1395;, + 3;1395,1400,1401;, + 3;1395,1401,1396;, + 3;1396,1401,1402;, + 3;1396,1402,1397;, + 3;1397,1402,1403;, + 3;1397,1403,1398;, + 3;558,563,1399;, + 3;563,1404,1399;, + 3;1399,1404,1405;, + 3;1399,1405,1400;, + 3;1400,1405,1406;, + 3;1400,1406,1401;, + 3;1401,1406,1407;, + 3;1401,1407,1402;, + 3;1402,1407,1408;, + 3;1402,1408,1403;, + 3;563,568,1404;, + 3;568,1409,1404;, + 3;1404,1409,1410;, + 3;1404,1410,1405;, + 3;1405,1410,1411;, + 3;1405,1411,1406;, + 3;1406,1411,1412;, + 3;1406,1412,1407;, + 3;1407,1412,1413;, + 3;1407,1413,1408;, + 3;568,573,1409;, + 3;573,1414,1409;, + 3;1409,1414,1415;, + 3;1409,1415,1410;, + 3;1410,1415,1416;, + 3;1410,1416,1411;, + 3;1411,1416,1417;, + 3;1411,1417,1412;, + 3;1412,1417,1418;, + 3;1412,1418,1413;, + 3;573,578,1414;, + 3;578,1419,1414;, + 3;1414,1419,1420;, + 3;1414,1420,1415;, + 3;1415,1420,1421;, + 3;1415,1421,1416;, + 3;1416,1421,1422;, + 3;1416,1422,1417;, + 3;1417,1422,1423;, + 3;1417,1423,1418;, + 3;578,583,1419;, + 3;583,1424,1419;, + 3;1419,1424,1425;, + 3;1419,1425,1420;, + 3;1420,1425,1426;, + 3;1420,1426,1421;, + 3;1421,1426,1427;, + 3;1421,1427,1422;, + 3;1422,1427,1428;, + 3;1422,1428,1423;, + 3;583,588,1424;, + 3;588,1429,1424;, + 3;1424,1429,1430;, + 3;1424,1430,1425;, + 3;1425,1430,1431;, + 3;1425,1431,1426;, + 3;1426,1431,1432;, + 3;1426,1432,1427;, + 3;1427,1432,1433;, + 3;1427,1433,1428;, + 3;588,593,1429;, + 3;593,1434,1429;, + 3;1429,1434,1435;, + 3;1429,1435,1430;, + 3;1430,1435,1436;, + 3;1430,1436,1431;, + 3;1431,1436,1437;, + 3;1431,1437,1432;, + 3;1432,1437,1438;, + 3;1432,1438,1433;, + 3;593,598,1434;, + 3;598,1439,1434;, + 3;1434,1439,1440;, + 3;1434,1440,1435;, + 3;1435,1440,1441;, + 3;1435,1441,1436;, + 3;1436,1441,1442;, + 3;1436,1442,1437;, + 3;1437,1442,1443;, + 3;1437,1443,1438;, + 3;598,603,1439;, + 3;603,656,1439;, + 3;1439,656,663;, + 3;1439,663,1440;, + 3;1440,663,670;, + 3;1440,670,1441;, + 3;1441,670,677;, + 3;1441,677,1442;, + 3;1442,677,684;, + 3;1442,684,1443;, + 3;1443,684,691;, + 3;1443,691,1444;, + 3;1438,1443,1444;, + 3;1438,1444,1445;, + 3;1433,1438,1445;, + 3;1433,1445,1446;, + 3;1428,1433,1446;, + 3;1444,691,698;, + 3;1444,698,1447;, + 3;1445,1444,1447;, + 3;1445,1447,1448;, + 3;1446,1445,1448;, + 3;1446,1448,1449;, + 3;1450,1446,1449;, + 3;1428,1446,1450;, + 3;1423,1428,1450;, + 3;1423,1450,1451;, + 3;1418,1423,1451;, + 3;1447,698,705;, + 3;1447,705,1452;, + 3;1448,1447,1452;, + 3;1448,1452,1453;, + 3;1449,1448,1453;, + 3;1449,1453,1454;, + 3;1455,1449,1454;, + 3;1450,1449,1455;, + 3;1451,1450,1455;, + 3;1451,1455,1456;, + 3;1457,1451,1456;, + 3;1418,1451,1457;, + 3;1413,1418,1457;, + 3;1452,705,712;, + 3;1452,712,1458;, + 3;1453,1452,1458;, + 3;1453,1458,1459;, + 3;1454,1453,1459;, + 3;1454,1459,1460;, + 3;1461,1454,1460;, + 3;1455,1454,1461;, + 3;1456,1455,1461;, + 3;1456,1461,1462;, + 3;1463,1456,1462;, + 3;1457,1456,1463;, + 3;1458,712,719;, + 3;1458,719,1464;, + 3;1459,1458,1464;, + 3;1459,1464,1465;, + 3;1460,1459,1465;, + 3;1460,1465,1466;, + 3;1467,1460,1466;, + 3;1461,1460,1467;, + 3;1462,1461,1467;, + 3;1462,1467,1468;, + 3;1469,1462,1468;, + 3;1463,1462,1469;, + 3;1464,719,726;, + 3;1464,726,1470;, + 3;1465,1464,1470;, + 3;1465,1470,1471;, + 3;1466,1465,1471;, + 3;1466,1471,1472;, + 3;1473,1466,1472;, + 3;1467,1466,1473;, + 3;1468,1467,1473;, + 3;1468,1473,1474;, + 3;1475,1468,1474;, + 3;1469,1468,1475;, + 3;1470,726,733;, + 3;1470,733,1476;, + 3;1471,1470,1476;, + 3;1471,1476,1477;, + 3;1472,1471,1477;, + 3;1472,1477,1478;, + 3;1479,1472,1478;, + 3;1473,1472,1479;, + 3;1474,1473,1479;, + 3;1474,1479,1480;, + 3;1481,1474,1480;, + 3;1475,1474,1481;, + 3;1476,733,740;, + 3;1476,740,1482;, + 3;1477,1476,1482;, + 3;1477,1482,1483;, + 3;1478,1477,1483;, + 3;1478,1483,1484;, + 3;1485,1478,1484;, + 3;1479,1478,1485;, + 3;1480,1479,1485;, + 3;1480,1485,1486;, + 3;1487,1480,1486;, + 3;1481,1480,1487;, + 3;1482,740,747;, + 3;1482,747,1488;, + 3;1483,1482,1488;, + 3;1483,1488,1489;, + 3;1484,1483,1489;, + 3;1484,1489,1490;, + 3;1491,1484,1490;, + 3;1485,1484,1491;, + 3;1486,1485,1491;, + 3;1486,1491,1492;, + 3;1493,1486,1492;, + 3;1487,1486,1493;, + 3;1488,747,754;, + 3;1488,754,1494;, + 3;1489,1488,1494;, + 3;1489,1494,1495;, + 3;1490,1489,1495;, + 3;1490,1495,1496;, + 3;1497,1490,1496;, + 3;1491,1490,1497;, + 3;1492,1491,1497;, + 3;1492,1497,1498;, + 3;1499,1492,1498;, + 3;1493,1492,1499;, + 3;1494,754,761;, + 3;1494,761,1500;, + 3;1495,1494,1500;, + 3;1495,1500,1501;, + 3;1496,1495,1501;, + 3;1496,1501,1502;, + 3;1503,1496,1502;, + 3;1497,1496,1503;, + 3;1498,1497,1503;, + 3;1498,1503,1504;, + 3;1505,1498,1504;, + 3;1499,1498,1505;, + 3;1500,761,768;, + 3;1500,768,1506;, + 3;1501,1500,1506;, + 3;1501,1506,1507;, + 3;1502,1501,1507;, + 3;1502,1507,1508;, + 3;1509,1502,1508;, + 3;1503,1502,1509;, + 3;1504,1503,1509;, + 3;1504,1509,1510;, + 3;1511,1504,1510;, + 3;1505,1504,1511;, + 3;1506,768,775;, + 3;1506,775,1512;, + 3;1507,1506,1512;, + 3;1507,1512,1513;, + 3;1508,1507,1513;, + 3;1508,1513,1514;, + 3;1515,1508,1514;, + 3;1509,1508,1515;, + 3;1510,1509,1515;, + 3;1510,1515,1516;, + 3;1517,1510,1516;, + 3;1511,1510,1517;, + 3;1512,775,782;, + 3;1512,782,1518;, + 3;1513,1512,1518;, + 3;1513,1518,1519;, + 3;1514,1513,1519;, + 3;1514,1519,1520;, + 3;1521,1514,1520;, + 3;1515,1514,1521;, + 3;1516,1515,1521;, + 3;1516,1521,1522;, + 3;1523,1516,1522;, + 3;1517,1516,1523;, + 3;1518,782,789;, + 3;1518,789,1524;, + 3;1519,1518,1524;, + 3;1519,1524,1525;, + 3;1520,1519,1525;, + 3;1520,1525,1526;, + 3;1527,1520,1526;, + 3;1521,1520,1527;, + 3;1522,1521,1527;, + 3;1522,1527,1528;, + 3;1529,1522,1528;, + 3;1523,1522,1529;, + 3;1524,789,796;, + 3;1524,796,1530;, + 3;1525,1524,1530;, + 3;1525,1530,1531;, + 3;1526,1525,1531;, + 3;1526,1531,1532;, + 3;1533,1526,1532;, + 3;1527,1526,1533;, + 3;1528,1527,1533;, + 3;1528,1533,1534;, + 3;1535,1528,1534;, + 3;1529,1528,1535;, + 3;1530,796,803;, + 3;1530,803,1536;, + 3;1531,1530,1536;, + 3;1531,1536,1537;, + 3;1532,1531,1537;, + 3;1532,1537,1538;, + 3;1539,1532,1538;, + 3;1533,1532,1539;, + 3;1534,1533,1539;, + 3;1534,1539,1540;, + 3;1541,1534,1540;, + 3;1535,1534,1541;, + 3;1536,803,810;, + 3;1536,810,1542;, + 3;1537,1536,1542;, + 3;1537,1542,1543;, + 3;1538,1537,1543;, + 3;1538,1543,1544;, + 3;1545,1538,1544;, + 3;1539,1538,1545;, + 3;1540,1539,1545;, + 3;1540,1545,1546;, + 3;1547,1540,1546;, + 3;1541,1540,1547;, + 3;1542,810,817;, + 3;1542,817,1548;, + 3;1543,1542,1548;, + 3;1543,1548,1549;, + 3;1544,1543,1549;, + 3;1544,1549,1550;, + 3;1551,1544,1550;, + 3;1545,1544,1551;, + 3;1546,1545,1551;, + 3;1546,1551,1552;, + 3;1553,1546,1552;, + 3;1547,1546,1553;, + 3;1548,817,824;, + 3;1548,824,1554;, + 3;1549,1548,1554;, + 3;1549,1554,1555;, + 3;1550,1549,1555;, + 3;1550,1555,1556;, + 3;1557,1550,1556;, + 3;1551,1550,1557;, + 3;1552,1551,1557;, + 3;1552,1557,1558;, + 3;1559,1552,1558;, + 3;1553,1552,1559;, + 3;1554,824,831;, + 3;1554,831,1560;, + 3;1555,1554,1560;, + 3;1555,1560,1561;, + 3;1556,1555,1561;, + 3;1556,1561,1562;, + 3;1563,1556,1562;, + 3;1557,1556,1563;, + 3;1558,1557,1563;, + 3;1558,1563,1564;, + 3;1565,1558,1564;, + 3;1559,1558,1565;, + 3;1560,831,838;, + 3;1560,838,1566;, + 3;1561,1560,1566;, + 3;1561,1566,1567;, + 3;1562,1561,1567;, + 3;1562,1567,1568;, + 3;1569,1562,1568;, + 3;1563,1562,1569;, + 3;1564,1563,1569;, + 3;1564,1569,1570;, + 3;1571,1564,1570;, + 3;1565,1564,1571;, + 3;1566,838,845;, + 3;1566,845,1572;, + 3;1567,1566,1572;, + 3;1567,1572,1573;, + 3;1568,1567,1573;, + 3;1568,1573,1574;, + 3;1575,1568,1574;, + 3;1569,1568,1575;, + 3;1570,1569,1575;, + 3;1570,1575,1576;, + 3;1577,1570,1576;, + 3;1571,1570,1577;, + 3;1572,845,852;, + 3;1572,852,1578;, + 3;1573,1572,1578;, + 3;1573,1578,1579;, + 3;1574,1573,1579;, + 3;1574,1579,1580;, + 3;1581,1574,1580;, + 3;1575,1574,1581;, + 3;1576,1575,1581;, + 3;1576,1581,1582;, + 3;1583,1576,1582;, + 3;1577,1576,1583;, + 3;1578,852,859;, + 3;1578,859,1584;, + 3;1579,1578,1584;, + 3;1579,1584,1585;, + 3;1580,1579,1585;, + 3;1580,1585,1586;, + 3;1587,1580,1586;, + 3;1581,1580,1587;, + 3;1582,1581,1587;, + 3;1582,1587,1588;, + 3;1589,1582,1588;, + 3;1583,1582,1589;, + 3;1584,859,866;, + 3;1584,866,1590;, + 3;1585,1584,1590;, + 3;1585,1590,1591;, + 3;1586,1585,1591;, + 3;1586,1591,1592;, + 3;1593,1586,1592;, + 3;1587,1586,1593;, + 3;1588,1587,1593;, + 3;1588,1593,1594;, + 3;1595,1588,1594;, + 3;1589,1588,1595;, + 3;1590,866,873;, + 3;1590,873,1596;, + 3;1591,1590,1596;, + 3;1591,1596,1597;, + 3;1592,1591,1597;, + 3;1592,1597,1598;, + 3;1599,1592,1598;, + 3;1593,1592,1599;, + 3;1594,1593,1599;, + 3;1594,1599,1600;, + 3;1601,1594,1600;, + 3;1595,1594,1601;, + 3;1596,873,880;, + 3;1596,880,1602;, + 3;1597,1596,1602;, + 3;1597,1602,1603;, + 3;1598,1597,1603;, + 3;1598,1603,1604;, + 3;1605,1598,1604;, + 3;1599,1598,1605;, + 3;1600,1599,1605;, + 3;1600,1605,1606;, + 3;1607,1600,1606;, + 3;1601,1600,1607;, + 3;1602,880,887;, + 3;1602,887,1608;, + 3;1603,1602,1608;, + 3;1603,1608,1609;, + 3;1604,1603,1609;, + 3;1604,1609,1610;, + 3;1611,1604,1610;, + 3;1605,1604,1611;, + 3;1606,1605,1611;, + 3;1606,1611,1612;, + 3;1613,1606,1612;, + 3;1607,1606,1613;, + 3;1608,887,894;, + 3;1608,894,1614;, + 3;1609,1608,1614;, + 3;1609,1614,1615;, + 3;1610,1609,1615;, + 3;1610,1615,1616;, + 3;1617,1610,1616;, + 3;1611,1610,1617;, + 3;1612,1611,1617;, + 3;1612,1617,1618;, + 3;1619,1612,1618;, + 3;1613,1612,1619;, + 3;1614,894,901;, + 3;1614,901,1620;, + 3;1615,1614,1620;, + 3;1615,1620,1621;, + 3;1616,1615,1621;, + 3;1616,1621,1622;, + 3;1623,1616,1622;, + 3;1617,1616,1623;, + 3;1618,1617,1623;, + 3;1618,1623,1624;, + 3;1625,1618,1624;, + 3;1619,1618,1625;, + 3;1620,901,908;, + 3;1620,908,1626;, + 3;1621,1620,1626;, + 3;1621,1626,1627;, + 3;1622,1621,1627;, + 3;1622,1627,1628;, + 3;1629,1622,1628;, + 3;1623,1622,1629;, + 3;1624,1623,1629;, + 3;1624,1629,1630;, + 3;1631,1624,1630;, + 3;1625,1624,1631;, + 3;1626,908,915;, + 3;1626,915,940;, + 3;1627,1626,940;, + 3;1627,940,939;, + 3;1628,1627,939;, + 3;1628,939,945;, + 3;1632,1628,945;, + 3;1629,1628,1632;, + 3;1630,1629,1632;, + 3;1630,1632,1633;, + 3;1634,1630,1633;, + 3;1631,1630,1634;, + 3;1635,1631,1634;, + 3;1636,1631,1635;, + 3;1636,1625,1631;, + 3;1632,945,950;, + 3;1633,1632,950;, + 3;1633,950,955;, + 3;1637,1633,955;, + 3;1634,1633,1637;, + 3;1638,1634,1637;, + 3;1635,1634,1638;, + 3;1639,1635,1638;, + 3;1640,1635,1639;, + 3;1640,1636,1635;, + 3;1641,1636,1640;, + 3;1641,1642,1636;, + 3;1642,1625,1636;, + 3;1642,1619,1625;, + 3;1637,955,960;, + 3;1643,1637,960;, + 3;1638,1637,1643;, + 3;1644,1638,1643;, + 3;1639,1638,1644;, + 3;1645,1639,1644;, + 3;1646,1639,1645;, + 3;1646,1640,1639;, + 3;1647,1640,1646;, + 3;1647,1641,1640;, + 3;1643,960,965;, + 3;1648,1643,965;, + 3;1644,1643,1648;, + 3;1649,1644,1648;, + 3;1645,1644,1649;, + 3;1650,1645,1649;, + 3;1651,1645,1650;, + 3;1651,1646,1645;, + 3;1652,1646,1651;, + 3;1652,1647,1646;, + 3;1648,965,970;, + 3;1653,1648,970;, + 3;1649,1648,1653;, + 3;1654,1649,1653;, + 3;1650,1649,1654;, + 3;1655,1650,1654;, + 3;1656,1650,1655;, + 3;1656,1651,1650;, + 3;1657,1651,1656;, + 3;1657,1652,1651;, + 3;1653,970,975;, + 3;1658,1653,975;, + 3;1654,1653,1658;, + 3;1659,1654,1658;, + 3;1655,1654,1659;, + 3;1660,1655,1659;, + 3;1661,1655,1660;, + 3;1661,1656,1655;, + 3;1662,1656,1661;, + 3;1662,1657,1656;, + 3;1658,975,980;, + 3;1663,1658,980;, + 3;1659,1658,1663;, + 3;1664,1659,1663;, + 3;1660,1659,1664;, + 3;1665,1660,1664;, + 3;1666,1660,1665;, + 3;1666,1661,1660;, + 3;1667,1661,1666;, + 3;1667,1662,1661;, + 3;1663,980,985;, + 3;997,1663,985;, + 3;1664,1663,997;, + 3;1002,1664,997;, + 3;1665,1664,1002;, + 3;1007,1665,1002;, + 3;1668,1665,1007;, + 3;1668,1666,1665;, + 3;1669,1666,1668;, + 3;1669,1667,1666;, + 3;1670,1667,1669;, + 3;1670,1671,1667;, + 3;1671,1662,1667;, + 3;1671,1672,1662;, + 3;1672,1657,1662;, + 3;1013,1668,1007;, + 3;1673,1668,1013;, + 3;1673,1669,1668;, + 3;1674,1669,1673;, + 3;1674,1670,1669;, + 3;1675,1670,1674;, + 3;1675,1676,1670;, + 3;1676,1671,1670;, + 3;1676,1677,1671;, + 3;1677,1672,1671;, + 3;1019,1673,1013;, + 3;1678,1673,1019;, + 3;1678,1674,1673;, + 3;1679,1674,1678;, + 3;1679,1675,1674;, + 3;1680,1675,1679;, + 3;1680,1681,1675;, + 3;1681,1676,1675;, + 3;1681,1682,1676;, + 3;1682,1677,1676;, + 3;1025,1678,1019;, + 3;1683,1678,1025;, + 3;1683,1679,1678;, + 3;1684,1679,1683;, + 3;1684,1680,1679;, + 3;1685,1680,1684;, + 3;1685,1686,1680;, + 3;1686,1681,1680;, + 3;1686,1687,1681;, + 3;1687,1682,1681;, + 3;1031,1683,1025;, + 3;1688,1683,1031;, + 3;1688,1684,1683;, + 3;1689,1684,1688;, + 3;1689,1685,1684;, + 3;1690,1685,1689;, + 3;1690,1691,1685;, + 3;1691,1686,1685;, + 3;1691,1692,1686;, + 3;1692,1687,1686;, + 3;1688,1031,1037;, + 3;1688,1037,1693;, + 3;1689,1688,1693;, + 3;1689,1693,1694;, + 3;1690,1689,1694;, + 3;1690,1694,1695;, + 3;1696,1690,1695;, + 3;1696,1691,1690;, + 3;1696,1697,1691;, + 3;1697,1692,1691;, + 3;1693,1037,1043;, + 3;1693,1043,1698;, + 3;1694,1693,1698;, + 3;1694,1698,1699;, + 3;1695,1694,1699;, + 3;1695,1699,1700;, + 3;1701,1695,1700;, + 3;1696,1695,1701;, + 3;1702,1696,1701;, + 3;1702,1697,1696;, + 3;1698,1043,1049;, + 3;1698,1049,1703;, + 3;1699,1698,1703;, + 3;1699,1703,1704;, + 3;1700,1699,1704;, + 3;1700,1704,1705;, + 3;1706,1700,1705;, + 3;1701,1700,1706;, + 3;1707,1701,1706;, + 3;1702,1701,1707;, + 3;1703,1049,1055;, + 3;1703,1055,1708;, + 3;1704,1703,1708;, + 3;1704,1708,1709;, + 3;1705,1704,1709;, + 3;1705,1709,1710;, + 3;1711,1705,1710;, + 3;1706,1705,1711;, + 3;1712,1706,1711;, + 3;1707,1706,1712;, + 3;1708,1055,1061;, + 3;1708,1061,1713;, + 3;1709,1708,1713;, + 3;1709,1713,1714;, + 3;1710,1709,1714;, + 3;1710,1714,1715;, + 3;1716,1710,1715;, + 3;1711,1710,1716;, + 3;1717,1711,1716;, + 3;1712,1711,1717;, + 3;1713,1061,1067;, + 3;1713,1067,1718;, + 3;1714,1713,1718;, + 3;1714,1718,1719;, + 3;1715,1714,1719;, + 3;1715,1719,1720;, + 3;1721,1715,1720;, + 3;1716,1715,1721;, + 3;1722,1716,1721;, + 3;1717,1716,1722;, + 3;1718,1067,1073;, + 3;1718,1073,1723;, + 3;1719,1718,1723;, + 3;1719,1723,1724;, + 3;1720,1719,1724;, + 3;1720,1724,1725;, + 3;1726,1720,1725;, + 3;1721,1720,1726;, + 3;1727,1721,1726;, + 3;1722,1721,1727;, + 3;1723,1073,1079;, + 3;1723,1079,1728;, + 3;1724,1723,1728;, + 3;1724,1728,1729;, + 3;1725,1724,1729;, + 3;1725,1729,1730;, + 3;1731,1725,1730;, + 3;1726,1725,1731;, + 3;1732,1726,1731;, + 3;1727,1726,1732;, + 3;1728,1079,1085;, + 3;1728,1085,1733;, + 3;1729,1728,1733;, + 3;1729,1733,1734;, + 3;1730,1729,1734;, + 3;1730,1734,1735;, + 3;1736,1730,1735;, + 3;1731,1730,1736;, + 3;1737,1731,1736;, + 3;1732,1731,1737;, + 3;1733,1085,1091;, + 3;1733,1091,1738;, + 3;1734,1733,1738;, + 3;1734,1738,1739;, + 3;1735,1734,1739;, + 3;1735,1739,1740;, + 3;1741,1735,1740;, + 3;1736,1735,1741;, + 3;1742,1736,1741;, + 3;1737,1736,1742;, + 3;1738,1091,1097;, + 3;1738,1097,1743;, + 3;1739,1738,1743;, + 3;1739,1743,1744;, + 3;1740,1739,1744;, + 3;1740,1744,1745;, + 3;1746,1740,1745;, + 3;1741,1740,1746;, + 3;1747,1741,1746;, + 3;1742,1741,1747;, + 3;1743,1097,1103;, + 3;1743,1103,1748;, + 3;1744,1743,1748;, + 3;1744,1748,1749;, + 3;1745,1744,1749;, + 3;1745,1749,1750;, + 3;1751,1745,1750;, + 3;1746,1745,1751;, + 3;1752,1746,1751;, + 3;1747,1746,1752;, + 3;1748,1103,1109;, + 3;1748,1109,1753;, + 3;1749,1748,1753;, + 3;1749,1753,1754;, + 3;1750,1749,1754;, + 3;1750,1754,1755;, + 3;1756,1750,1755;, + 3;1751,1750,1756;, + 3;1757,1751,1756;, + 3;1752,1751,1757;, + 3;1753,1109,1115;, + 3;1753,1115,1132;, + 3;1754,1753,1132;, + 3;1754,1132,1137;, + 3;1755,1754,1137;, + 3;1755,1137,1142;, + 3;1758,1755,1142;, + 3;1756,1755,1758;, + 3;1759,1756,1758;, + 3;1757,1756,1759;, + 3;1760,1757,1759;, + 3;1761,1757,1760;, + 3;1761,1752,1757;, + 3;1762,1752,1761;, + 3;1762,1747,1752;, + 3;1758,1142,1147;, + 3;1763,1758,1147;, + 3;1759,1758,1763;, + 3;1764,1759,1763;, + 3;1760,1759,1764;, + 3;1765,1760,1764;, + 3;1766,1760,1765;, + 3;1766,1761,1760;, + 3;1767,1761,1766;, + 3;1767,1762,1761;, + 3;1763,1147,1152;, + 3;1768,1763,1152;, + 3;1764,1763,1768;, + 3;1769,1764,1768;, + 3;1765,1764,1769;, + 3;1770,1765,1769;, + 3;1771,1765,1770;, + 3;1771,1766,1765;, + 3;1772,1766,1771;, + 3;1772,1767,1766;, + 3;1768,1152,1157;, + 3;1773,1768,1157;, + 3;1769,1768,1773;, + 3;1774,1769,1773;, + 3;1770,1769,1774;, + 3;1775,1770,1774;, + 3;1776,1770,1775;, + 3;1776,1771,1770;, + 3;1777,1771,1776;, + 3;1777,1772,1771;, + 3;1773,1157,1162;, + 3;1778,1773,1162;, + 3;1774,1773,1778;, + 3;1779,1774,1778;, + 3;1775,1774,1779;, + 3;1780,1775,1779;, + 3;1781,1775,1780;, + 3;1781,1776,1775;, + 3;1782,1776,1781;, + 3;1782,1777,1776;, + 3;1778,1162,1167;, + 3;1783,1778,1167;, + 3;1779,1778,1783;, + 3;1784,1779,1783;, + 3;1780,1779,1784;, + 3;1785,1780,1784;, + 3;1786,1780,1785;, + 3;1786,1781,1780;, + 3;1787,1781,1786;, + 3;1787,1782,1781;, + 3;1783,1167,1172;, + 3;1788,1783,1172;, + 3;1784,1783,1788;, + 3;1789,1784,1788;, + 3;1785,1784,1789;, + 3;1790,1785,1789;, + 3;1791,1785,1790;, + 3;1791,1786,1785;, + 3;1792,1786,1791;, + 3;1792,1787,1786;, + 3;1788,1172,1177;, + 3;1793,1788,1177;, + 3;1789,1788,1793;, + 3;1794,1789,1793;, + 3;1790,1789,1794;, + 3;1795,1790,1794;, + 3;1796,1790,1795;, + 3;1796,1791,1790;, + 3;1797,1791,1796;, + 3;1797,1792,1791;, + 3;1793,1177,1182;, + 3;1798,1793,1182;, + 3;1794,1793,1798;, + 3;1799,1794,1798;, + 3;1795,1794,1799;, + 3;1800,1795,1799;, + 3;1801,1795,1800;, + 3;1801,1796,1795;, + 3;1802,1796,1801;, + 3;1802,1797,1796;, + 3;1798,1182,1187;, + 3;1803,1798,1187;, + 3;1799,1798,1803;, + 3;1804,1799,1803;, + 3;1800,1799,1804;, + 3;1805,1800,1804;, + 3;1806,1800,1805;, + 3;1806,1801,1800;, + 3;1807,1801,1806;, + 3;1807,1802,1801;, + 3;1803,1187,1192;, + 3;1808,1803,1192;, + 3;1804,1803,1808;, + 3;1809,1804,1808;, + 3;1805,1804,1809;, + 3;1810,1805,1809;, + 3;1811,1805,1810;, + 3;1811,1806,1805;, + 3;1812,1806,1811;, + 3;1812,1807,1806;, + 3;1808,1192,1197;, + 3;1813,1808,1197;, + 3;1809,1808,1813;, + 3;1814,1809,1813;, + 3;1810,1809,1814;, + 3;1815,1810,1814;, + 3;1816,1810,1815;, + 3;1816,1811,1810;, + 3;1817,1811,1816;, + 3;1817,1812,1811;, + 3;1813,1197,1202;, + 3;1818,1813,1202;, + 3;1814,1813,1818;, + 3;1819,1814,1818;, + 3;1815,1814,1819;, + 3;1820,1815,1819;, + 3;1821,1815,1820;, + 3;1821,1816,1815;, + 3;1822,1816,1821;, + 3;1822,1817,1816;, + 3;1818,1202,1207;, + 3;1823,1818,1207;, + 3;1819,1818,1823;, + 3;1824,1819,1823;, + 3;1820,1819,1824;, + 3;1825,1820,1824;, + 3;1826,1820,1825;, + 3;1826,1821,1820;, + 3;1827,1821,1826;, + 3;1827,1822,1821;, + 3;1823,1207,1212;, + 3;1828,1823,1212;, + 3;1824,1823,1828;, + 3;1829,1824,1828;, + 3;1825,1824,1829;, + 3;1830,1825,1829;, + 3;1831,1825,1830;, + 3;1831,1826,1825;, + 3;1832,1826,1831;, + 3;1832,1827,1826;, + 3;1828,1212,1217;, + 3;1833,1828,1217;, + 3;1829,1828,1833;, + 3;1834,1829,1833;, + 3;1830,1829,1834;, + 3;1835,1830,1834;, + 3;1836,1830,1835;, + 3;1836,1831,1830;, + 3;1837,1831,1836;, + 3;1837,1832,1831;, + 3;1833,1217,1222;, + 3;1838,1833,1222;, + 3;1834,1833,1838;, + 3;1839,1834,1838;, + 3;1835,1834,1839;, + 3;1840,1835,1839;, + 3;1841,1835,1840;, + 3;1841,1836,1835;, + 3;1842,1836,1841;, + 3;1842,1837,1836;, + 3;1838,1222,1227;, + 3;1843,1838,1227;, + 3;1839,1838,1843;, + 3;1844,1839,1843;, + 3;1840,1839,1844;, + 3;1845,1840,1844;, + 3;1846,1840,1845;, + 3;1846,1841,1840;, + 3;1847,1841,1846;, + 3;1847,1842,1841;, + 3;1843,1227,1232;, + 3;1848,1843,1232;, + 3;1844,1843,1848;, + 3;1849,1844,1848;, + 3;1845,1844,1849;, + 3;1850,1845,1849;, + 3;1851,1845,1850;, + 3;1851,1846,1845;, + 3;1852,1846,1851;, + 3;1852,1847,1846;, + 3;1848,1232,1237;, + 3;1853,1848,1237;, + 3;1849,1848,1853;, + 3;1854,1849,1853;, + 3;1850,1849,1854;, + 3;1306,1850,1854;, + 3;1312,1850,1306;, + 3;1312,1851,1850;, + 3;1318,1851,1312;, + 3;1318,1852,1851;, + 3;1853,1237,1242;, + 3;1855,1853,1242;, + 3;1854,1853,1855;, + 3;1300,1854,1855;, + 3;1306,1854,1300;, + 3;1855,1242,1247;, + 3;1294,1855,1247;, + 3;1300,1855,1294;, + 3;1324,1852,1318;, + 3;1324,1856,1852;, + 3;1856,1847,1852;, + 3;1856,1857,1847;, + 3;1857,1842,1847;, + 3;1857,1858,1842;, + 3;1858,1837,1842;, + 3;1330,1856,1324;, + 3;1330,1859,1856;, + 3;1859,1857,1856;, + 3;1859,1860,1857;, + 3;1860,1858,1857;, + 3;1860,1861,1858;, + 3;1861,1862,1858;, + 3;1858,1862,1837;, + 3;1862,1832,1837;, + 3;1862,1863,1832;, + 3;1863,1827,1832;, + 3;1335,1859,1330;, + 3;1335,1864,1859;, + 3;1864,1860,1859;, + 3;1864,1865,1860;, + 3;1865,1861,1860;, + 3;1865,1866,1861;, + 3;1866,1867,1861;, + 3;1861,1867,1862;, + 3;1867,1863,1862;, + 3;1867,1868,1863;, + 3;1868,1869,1863;, + 3;1863,1869,1827;, + 3;1869,1822,1827;, + 3;1340,1864,1335;, + 3;1340,1870,1864;, + 3;1870,1865,1864;, + 3;1870,1871,1865;, + 3;1871,1866,1865;, + 3;1871,1872,1866;, + 3;1872,1873,1866;, + 3;1866,1873,1867;, + 3;1873,1868,1867;, + 3;1873,1874,1868;, + 3;1874,1875,1868;, + 3;1868,1875,1869;, + 3;1345,1870,1340;, + 3;1345,1876,1870;, + 3;1876,1871,1870;, + 3;1876,1877,1871;, + 3;1877,1872,1871;, + 3;1877,1878,1872;, + 3;1878,1879,1872;, + 3;1872,1879,1873;, + 3;1879,1874,1873;, + 3;1879,1880,1874;, + 3;1880,1881,1874;, + 3;1874,1881,1875;, + 3;1351,1876,1345;, + 3;1351,1882,1876;, + 3;1882,1877,1876;, + 3;1882,1883,1877;, + 3;1883,1878,1877;, + 3;1883,1884,1878;, + 3;1884,1885,1878;, + 3;1878,1885,1879;, + 3;1885,1880,1879;, + 3;1885,1886,1880;, + 3;1886,1887,1880;, + 3;1880,1887,1881;, + 3;1888,1882,1351;, + 3;1888,1889,1882;, + 3;1889,1883,1882;, + 3;1889,1890,1883;, + 3;1890,1884,1883;, + 3;1890,1891,1884;, + 3;1891,1892,1884;, + 3;1884,1892,1885;, + 3;1892,1886,1885;, + 3;1350,1888,1351;, + 3;1362,1888,1350;, + 3;1362,1893,1888;, + 3;1893,1889,1888;, + 3;1893,1894,1889;, + 3;1894,1890,1889;, + 3;1894,1895,1890;, + 3;1895,1891,1890;, + 3;1895,1896,1891;, + 3;1896,1897,1891;, + 3;1891,1897,1892;, + 3;1897,1898,1892;, + 3;1892,1898,1886;, + 3;1899,1893,1362;, + 3;1899,1900,1893;, + 3;1900,1894,1893;, + 3;1900,1901,1894;, + 3;1901,1895,1894;, + 3;1901,1902,1895;, + 3;1902,1896,1895;, + 3;1902,1903,1896;, + 3;1903,1904,1896;, + 3;1896,1904,1897;, + 3;1361,1899,1362;, + 3;1361,1368,1899;, + 3;1899,1368,1905;, + 3;1899,1905,1900;, + 3;1900,1905,1906;, + 3;1900,1906,1901;, + 3;1901,1906,1907;, + 3;1901,1907,1902;, + 3;1902,1907,1908;, + 3;1902,1908,1903;, + 3;1903,1908,1909;, + 3;1903,1909,1910;, + 3;1903,1910,1904;, + 3;1368,1911,1905;, + 3;1905,1911,1912;, + 3;1905,1912,1906;, + 3;1906,1912,1913;, + 3;1906,1913,1907;, + 3;1907,1913,1914;, + 3;1907,1914,1908;, + 3;1908,1914,1915;, + 3;1908,1915,1909;, + 3;1368,1367,1911;, + 3;1367,1916,1911;, + 3;1911,1916,1917;, + 3;1911,1917,1912;, + 3;1912,1917,1918;, + 3;1912,1918,1913;, + 3;1913,1918,1919;, + 3;1913,1919,1914;, + 3;1914,1919,1920;, + 3;1914,1920,1915;, + 3;1367,1373,1916;, + 3;1373,1921,1916;, + 3;1916,1921,1922;, + 3;1916,1922,1917;, + 3;1917,1922,1923;, + 3;1917,1923,1918;, + 3;1918,1923,1924;, + 3;1918,1924,1919;, + 3;1919,1924,1925;, + 3;1919,1925,1920;, + 3;1373,1378,1921;, + 3;1378,1926,1921;, + 3;1921,1926,1927;, + 3;1921,1927,1922;, + 3;1922,1927,1928;, + 3;1922,1928,1923;, + 3;1923,1928,1929;, + 3;1923,1929,1924;, + 3;1924,1929,1930;, + 3;1924,1930,1925;, + 3;1378,1383,1926;, + 3;1383,1931,1926;, + 3;1926,1931,1932;, + 3;1926,1932,1927;, + 3;1927,1932,1933;, + 3;1927,1933,1928;, + 3;1928,1933,1934;, + 3;1928,1934,1929;, + 3;1929,1934,1935;, + 3;1929,1935,1930;, + 3;1383,1388,1931;, + 3;1388,1936,1931;, + 3;1931,1936,1937;, + 3;1931,1937,1932;, + 3;1932,1937,1938;, + 3;1932,1938,1933;, + 3;1933,1938,1939;, + 3;1933,1939,1934;, + 3;1934,1939,1940;, + 3;1934,1940,1935;, + 3;1388,1393,1936;, + 3;1393,1941,1936;, + 3;1936,1941,1942;, + 3;1936,1942,1937;, + 3;1937,1942,1943;, + 3;1937,1943,1938;, + 3;1938,1943,1944;, + 3;1938,1944,1939;, + 3;1939,1944,1945;, + 3;1939,1945,1940;, + 3;1393,1398,1941;, + 3;1398,1946,1941;, + 3;1941,1946,1947;, + 3;1941,1947,1942;, + 3;1942,1947,1948;, + 3;1942,1948,1943;, + 3;1943,1948,1949;, + 3;1943,1949,1944;, + 3;1944,1949,1950;, + 3;1944,1950,1945;, + 3;1398,1403,1946;, + 3;1403,1951,1946;, + 3;1946,1951,1952;, + 3;1946,1952,1947;, + 3;1947,1952,1953;, + 3;1947,1953,1948;, + 3;1948,1953,1954;, + 3;1948,1954,1949;, + 3;1949,1954,1955;, + 3;1949,1955,1950;, + 3;1403,1408,1951;, + 3;1408,1956,1951;, + 3;1951,1956,1957;, + 3;1951,1957,1952;, + 3;1952,1957,1958;, + 3;1952,1958,1953;, + 3;1953,1958,1959;, + 3;1953,1959,1954;, + 3;1954,1959,1960;, + 3;1954,1960,1955;, + 3;1408,1413,1956;, + 3;1413,1457,1956;, + 3;1956,1457,1463;, + 3;1956,1463,1957;, + 3;1957,1463,1469;, + 3;1957,1469,1958;, + 3;1958,1469,1475;, + 3;1958,1475,1959;, + 3;1959,1475,1481;, + 3;1959,1481,1960;, + 3;1960,1481,1487;, + 3;1960,1487,1961;, + 3;1955,1960,1961;, + 3;1955,1961,1962;, + 3;1950,1955,1962;, + 3;1950,1962,1963;, + 3;1945,1950,1963;, + 3;1961,1487,1493;, + 3;1961,1493,1964;, + 3;1962,1961,1964;, + 3;1962,1964,1965;, + 3;1963,1962,1965;, + 3;1963,1965,1966;, + 3;1967,1963,1966;, + 3;1945,1963,1967;, + 3;1940,1945,1967;, + 3;1940,1967,1968;, + 3;1935,1940,1968;, + 3;1964,1493,1499;, + 3;1964,1499,1969;, + 3;1965,1964,1969;, + 3;1965,1969,1970;, + 3;1966,1965,1970;, + 3;1966,1970,1971;, + 3;1972,1966,1971;, + 3;1967,1966,1972;, + 3;1968,1967,1972;, + 3;1968,1972,1973;, + 3;1974,1968,1973;, + 3;1935,1968,1974;, + 3;1930,1935,1974;, + 3;1969,1499,1505;, + 3;1969,1505,1975;, + 3;1970,1969,1975;, + 3;1970,1975,1976;, + 3;1971,1970,1976;, + 3;1971,1976,1977;, + 3;1978,1971,1977;, + 3;1972,1971,1978;, + 3;1973,1972,1978;, + 3;1973,1978,1979;, + 3;1980,1973,1979;, + 3;1974,1973,1980;, + 3;1975,1505,1511;, + 3;1975,1511,1981;, + 3;1976,1975,1981;, + 3;1976,1981,1982;, + 3;1977,1976,1982;, + 3;1977,1982,1983;, + 3;1984,1977,1983;, + 3;1978,1977,1984;, + 3;1979,1978,1984;, + 3;1979,1984,1985;, + 3;1986,1979,1985;, + 3;1980,1979,1986;, + 3;1981,1511,1517;, + 3;1981,1517,1987;, + 3;1982,1981,1987;, + 3;1982,1987,1988;, + 3;1983,1982,1988;, + 3;1983,1988,1989;, + 3;1990,1983,1989;, + 3;1984,1983,1990;, + 3;1985,1984,1990;, + 3;1985,1990,1991;, + 3;1992,1985,1991;, + 3;1986,1985,1992;, + 3;1987,1517,1523;, + 3;1987,1523,1993;, + 3;1988,1987,1993;, + 3;1988,1993,1994;, + 3;1989,1988,1994;, + 3;1989,1994,1995;, + 3;1996,1989,1995;, + 3;1990,1989,1996;, + 3;1991,1990,1996;, + 3;1991,1996,1997;, + 3;1998,1991,1997;, + 3;1992,1991,1998;, + 3;1993,1523,1529;, + 3;1993,1529,1999;, + 3;1994,1993,1999;, + 3;1994,1999,2000;, + 3;1995,1994,2000;, + 3;1995,2000,2001;, + 3;2002,1995,2001;, + 3;1996,1995,2002;, + 3;1997,1996,2002;, + 3;1997,2002,2003;, + 3;2004,1997,2003;, + 3;1998,1997,2004;, + 3;1999,1529,1535;, + 3;1999,1535,2005;, + 3;2000,1999,2005;, + 3;2000,2005,2006;, + 3;2001,2000,2006;, + 3;2001,2006,2007;, + 3;2008,2001,2007;, + 3;2002,2001,2008;, + 3;2003,2002,2008;, + 3;2003,2008,2009;, + 3;2010,2003,2009;, + 3;2004,2003,2010;, + 3;2005,1535,1541;, + 3;2005,1541,2011;, + 3;2006,2005,2011;, + 3;2006,2011,2012;, + 3;2007,2006,2012;, + 3;2007,2012,2013;, + 3;2014,2007,2013;, + 3;2008,2007,2014;, + 3;2009,2008,2014;, + 3;2009,2014,2015;, + 3;2016,2009,2015;, + 3;2010,2009,2016;, + 3;2011,1541,1547;, + 3;2011,1547,2017;, + 3;2012,2011,2017;, + 3;2012,2017,2018;, + 3;2013,2012,2018;, + 3;2013,2018,2019;, + 3;2020,2013,2019;, + 3;2014,2013,2020;, + 3;2015,2014,2020;, + 3;2015,2020,2021;, + 3;2022,2015,2021;, + 3;2016,2015,2022;, + 3;2017,1547,1553;, + 3;2017,1553,2023;, + 3;2018,2017,2023;, + 3;2018,2023,2024;, + 3;2019,2018,2024;, + 3;2019,2024,2025;, + 3;2026,2019,2025;, + 3;2020,2019,2026;, + 3;2021,2020,2026;, + 3;2021,2026,2027;, + 3;2028,2021,2027;, + 3;2022,2021,2028;, + 3;2023,1553,1559;, + 3;2023,1559,2029;, + 3;2024,2023,2029;, + 3;2024,2029,2030;, + 3;2025,2024,2030;, + 3;2025,2030,2031;, + 3;2032,2025,2031;, + 3;2026,2025,2032;, + 3;2027,2026,2032;, + 3;2027,2032,2033;, + 3;2034,2027,2033;, + 3;2028,2027,2034;, + 3;2029,1559,1565;, + 3;2029,1565,2035;, + 3;2030,2029,2035;, + 3;2030,2035,2036;, + 3;2031,2030,2036;, + 3;2031,2036,2037;, + 3;2038,2031,2037;, + 3;2032,2031,2038;, + 3;2033,2032,2038;, + 3;2033,2038,2039;, + 3;2040,2033,2039;, + 3;2034,2033,2040;, + 3;2035,1565,1571;, + 3;2035,1571,2041;, + 3;2036,2035,2041;, + 3;2036,2041,2042;, + 3;2037,2036,2042;, + 3;2037,2042,2043;, + 3;2044,2037,2043;, + 3;2038,2037,2044;, + 3;2039,2038,2044;, + 3;2039,2044,2045;, + 3;2046,2039,2045;, + 3;2040,2039,2046;, + 3;2041,1571,1577;, + 3;2041,1577,2047;, + 3;2042,2041,2047;, + 3;2042,2047,2048;, + 3;2043,2042,2048;, + 3;2043,2048,2049;, + 3;2050,2043,2049;, + 3;2044,2043,2050;, + 3;2045,2044,2050;, + 3;2045,2050,2051;, + 3;2052,2045,2051;, + 3;2046,2045,2052;, + 3;2047,1577,1583;, + 3;2047,1583,2053;, + 3;2048,2047,2053;, + 3;2048,2053,2054;, + 3;2049,2048,2054;, + 3;2049,2054,2055;, + 3;2056,2049,2055;, + 3;2050,2049,2056;, + 3;2051,2050,2056;, + 3;2051,2056,2057;, + 3;2058,2051,2057;, + 3;2052,2051,2058;, + 3;2053,1583,1589;, + 3;2053,1589,2059;, + 3;2054,2053,2059;, + 3;2054,2059,2060;, + 3;2055,2054,2060;, + 3;2055,2060,2061;, + 3;2062,2055,2061;, + 3;2056,2055,2062;, + 3;2057,2056,2062;, + 3;2057,2062,2063;, + 3;2064,2057,2063;, + 3;2058,2057,2064;, + 3;2059,1589,1595;, + 3;2059,1595,2065;, + 3;2060,2059,2065;, + 3;2060,2065,2066;, + 3;2061,2060,2066;, + 3;2061,2066,2067;, + 3;2068,2061,2067;, + 3;2062,2061,2068;, + 3;2063,2062,2068;, + 3;2063,2068,2069;, + 3;2070,2063,2069;, + 3;2064,2063,2070;, + 3;2065,1595,1601;, + 3;2065,1601,2071;, + 3;2066,2065,2071;, + 3;2066,2071,2072;, + 3;2067,2066,2072;, + 3;2067,2072,2073;, + 3;2074,2067,2073;, + 3;2068,2067,2074;, + 3;2069,2068,2074;, + 3;2069,2074,2075;, + 3;2076,2069,2075;, + 3;2070,2069,2076;, + 3;2071,1601,1607;, + 3;2071,1607,2077;, + 3;2072,2071,2077;, + 3;2072,2077,2078;, + 3;2073,2072,2078;, + 3;2073,2078,2079;, + 3;2080,2073,2079;, + 3;2074,2073,2080;, + 3;2075,2074,2080;, + 3;2075,2080,2081;, + 3;2082,2075,2081;, + 3;2076,2075,2082;, + 3;2077,1607,1613;, + 3;2077,1613,2083;, + 3;2078,2077,2083;, + 3;2078,2083,2084;, + 3;2079,2078,2084;, + 3;2079,2084,2085;, + 3;2086,2079,2085;, + 3;2080,2079,2086;, + 3;2081,2080,2086;, + 3;2081,2086,2087;, + 3;2088,2081,2087;, + 3;2082,2081,2088;, + 3;2083,1613,1619;, + 3;2083,1619,1642;, + 3;2084,2083,1642;, + 3;2084,1642,1641;, + 3;2085,2084,1641;, + 3;2085,1641,1647;, + 3;2089,2085,1647;, + 3;2086,2085,2089;, + 3;2087,2086,2089;, + 3;2087,2089,2090;, + 3;2091,2087,2090;, + 3;2088,2087,2091;, + 3;2092,2088,2091;, + 3;2093,2088,2092;, + 3;2093,2082,2088;, + 3;2089,1647,1652;, + 3;2090,2089,1652;, + 3;2090,1652,1657;, + 3;1672,2090,1657;, + 3;2091,2090,1672;, + 3;1677,2091,1672;, + 3;2092,2091,1677;, + 3;1682,2092,1677;, + 3;2094,2092,1682;, + 3;2094,2093,2092;, + 3;2095,2093,2094;, + 3;2095,2096,2093;, + 3;2096,2082,2093;, + 3;2096,2076,2082;, + 3;2097,2076,2096;, + 3;2097,2070,2076;, + 3;1687,2094,1682;, + 3;2098,2094,1687;, + 3;2098,2095,2094;, + 3;2099,2095,2098;, + 3;2099,2100,2095;, + 3;2100,2096,2095;, + 3;2100,2097,2096;, + 3;2101,2097,2100;, + 3;2101,2102,2097;, + 3;2102,2070,2097;, + 3;2102,2064,2070;, + 3;1692,2098,1687;, + 3;2103,2098,1692;, + 3;2103,2099,2098;, + 3;2104,2099,2103;, + 3;2104,2105,2099;, + 3;2105,2100,2099;, + 3;2105,2101,2100;, + 3;2106,2101,2105;, + 3;2106,2107,2101;, + 3;2107,2102,2101;, + 3;2107,2108,2102;, + 3;2108,2064,2102;, + 3;2108,2058,2064;, + 3;1697,2103,1692;, + 3;2109,2103,1697;, + 3;2109,2104,2103;, + 3;2110,2104,2109;, + 3;2110,2111,2104;, + 3;2111,2105,2104;, + 3;2111,2106,2105;, + 3;2112,2106,2111;, + 3;2112,2113,2106;, + 3;2113,2107,2106;, + 3;2113,2114,2107;, + 3;2114,2108,2107;, + 3;1702,2109,1697;, + 3;2115,2109,1702;, + 3;2115,2110,2109;, + 3;2116,2110,2115;, + 3;2116,2117,2110;, + 3;2117,2111,2110;, + 3;2117,2112,2111;, + 3;2118,2112,2117;, + 3;2118,2119,2112;, + 3;2119,2113,2112;, + 3;2119,2120,2113;, + 3;2120,2114,2113;, + 3;2115,1702,1707;, + 3;2115,1707,2121;, + 3;2116,2115,2121;, + 3;2116,2121,2122;, + 3;2123,2116,2122;, + 3;2123,2117,2116;, + 3;2123,2118,2117;, + 3;2124,2118,2123;, + 3;2124,2125,2118;, + 3;2125,2119,2118;, + 3;2125,2126,2119;, + 3;2126,2120,2119;, + 3;2121,1707,1712;, + 3;2121,1712,2127;, + 3;2122,2121,2127;, + 3;2122,2127,2128;, + 3;2129,2122,2128;, + 3;2123,2122,2129;, + 3;2124,2123,2129;, + 3;2124,2129,2130;, + 3;2131,2124,2130;, + 3;2131,2125,2124;, + 3;2131,2132,2125;, + 3;2132,2126,2125;, + 3;2127,1712,1717;, + 3;2127,1717,2133;, + 3;2128,2127,2133;, + 3;2128,2133,2134;, + 3;2135,2128,2134;, + 3;2129,2128,2135;, + 3;2130,2129,2135;, + 3;2130,2135,2136;, + 3;2137,2130,2136;, + 3;2131,2130,2137;, + 3;2138,2131,2137;, + 3;2138,2132,2131;, + 3;2133,1717,1722;, + 3;2133,1722,2139;, + 3;2134,2133,2139;, + 3;2134,2139,2140;, + 3;2141,2134,2140;, + 3;2135,2134,2141;, + 3;2136,2135,2141;, + 3;2136,2141,2142;, + 3;2143,2136,2142;, + 3;2137,2136,2143;, + 3;2144,2137,2143;, + 3;2138,2137,2144;, + 3;2139,1722,1727;, + 3;2139,1727,2145;, + 3;2140,2139,2145;, + 3;2140,2145,2146;, + 3;2147,2140,2146;, + 3;2141,2140,2147;, + 3;2142,2141,2147;, + 3;2142,2147,2148;, + 3;2149,2142,2148;, + 3;2143,2142,2149;, + 3;2150,2143,2149;, + 3;2144,2143,2150;, + 3;2145,1727,1732;, + 3;2145,1732,2151;, + 3;2146,2145,2151;, + 3;2146,2151,2152;, + 3;2153,2146,2152;, + 3;2147,2146,2153;, + 3;2148,2147,2153;, + 3;2148,2153,2154;, + 3;2155,2148,2154;, + 3;2149,2148,2155;, + 3;2156,2149,2155;, + 3;2150,2149,2156;, + 3;2151,1732,1737;, + 3;2151,1737,2157;, + 3;2152,2151,2157;, + 3;2152,2157,2158;, + 3;2159,2152,2158;, + 3;2153,2152,2159;, + 3;2154,2153,2159;, + 3;2154,2159,2160;, + 3;2161,2154,2160;, + 3;2155,2154,2161;, + 3;2162,2155,2161;, + 3;2156,2155,2162;, + 3;2157,1737,1742;, + 3;2157,1742,2163;, + 3;2158,2157,2163;, + 3;2158,2163,2164;, + 3;2165,2158,2164;, + 3;2159,2158,2165;, + 3;2160,2159,2165;, + 3;2160,2165,2166;, + 3;2167,2160,2166;, + 3;2161,2160,2167;, + 3;2168,2161,2167;, + 3;2162,2161,2168;, + 3;2163,1742,1747;, + 3;2163,1747,1762;, + 3;2164,2163,1762;, + 3;2164,1762,1767;, + 3;2169,2164,1767;, + 3;2165,2164,2169;, + 3;2166,2165,2169;, + 3;2166,2169,2170;, + 3;2171,2166,2170;, + 3;2167,2166,2171;, + 3;2172,2167,2171;, + 3;2168,2167,2172;, + 3;2173,2168,2172;, + 3;2174,2168,2173;, + 3;2174,2162,2168;, + 3;2169,1767,1772;, + 3;2170,2169,1772;, + 3;2170,1772,1777;, + 3;2175,2170,1777;, + 3;2171,2170,2175;, + 3;2176,2171,2175;, + 3;2172,2171,2176;, + 3;2177,2172,2176;, + 3;2173,2172,2177;, + 3;2178,2173,2177;, + 3;2179,2173,2178;, + 3;2179,2174,2173;, + 3;2175,1777,1782;, + 3;2180,2175,1782;, + 3;2176,2175,2180;, + 3;2181,2176,2180;, + 3;2177,2176,2181;, + 3;2182,2177,2181;, + 3;2178,2177,2182;, + 3;2183,2178,2182;, + 3;2184,2178,2183;, + 3;2184,2179,2178;, + 3;2180,1782,1787;, + 3;2185,2180,1787;, + 3;2181,2180,2185;, + 3;2186,2181,2185;, + 3;2182,2181,2186;, + 3;2187,2182,2186;, + 3;2183,2182,2187;, + 3;2188,2183,2187;, + 3;2189,2183,2188;, + 3;2189,2184,2183;, + 3;2185,1787,1792;, + 3;2190,2185,1792;, + 3;2186,2185,2190;, + 3;2191,2186,2190;, + 3;2187,2186,2191;, + 3;2192,2187,2191;, + 3;2188,2187,2192;, + 3;2193,2188,2192;, + 3;2194,2188,2193;, + 3;2194,2189,2188;, + 3;2190,1792,1797;, + 3;2195,2190,1797;, + 3;2191,2190,2195;, + 3;2196,2191,2195;, + 3;2192,2191,2196;, + 3;2197,2192,2196;, + 3;2193,2192,2197;, + 3;2198,2193,2197;, + 3;2199,2193,2198;, + 3;2199,2194,2193;, + 3;2195,1797,1802;, + 3;2200,2195,1802;, + 3;2196,2195,2200;, + 3;2201,2196,2200;, + 3;2197,2196,2201;, + 3;2202,2197,2201;, + 3;2198,2197,2202;, + 3;2203,2198,2202;, + 3;2204,2198,2203;, + 3;2204,2199,2198;, + 3;2200,1802,1807;, + 3;2205,2200,1807;, + 3;2201,2200,2205;, + 3;2206,2201,2205;, + 3;2202,2201,2206;, + 3;2207,2202,2206;, + 3;2203,2202,2207;, + 3;1887,2203,2207;, + 3;2208,2203,1887;, + 3;2208,2204,2203;, + 3;2205,1807,1812;, + 3;2209,2205,1812;, + 3;2206,2205,2209;, + 3;2210,2206,2209;, + 3;2207,2206,2210;, + 3;1881,2207,2210;, + 3;1887,2207,1881;, + 3;2209,1812,1817;, + 3;2211,2209,1817;, + 3;2210,2209,2211;, + 3;1875,2210,2211;, + 3;1881,2210,1875;, + 3;2211,1817,1822;, + 3;1869,2211,1822;, + 3;1875,2211,1869;, + 3;1886,2208,1887;, + 3;1898,2208,1886;, + 3;1898,2212,2208;, + 3;2212,2204,2208;, + 3;2212,2213,2204;, + 3;2213,2199,2204;, + 3;2213,2214,2199;, + 3;2214,2194,2199;, + 3;2215,2212,1898;, + 3;2215,2216,2212;, + 3;2216,2213,2212;, + 3;2216,2217,2213;, + 3;2217,2214,2213;, + 3;2217,2218,2214;, + 3;2218,2219,2214;, + 3;2214,2219,2194;, + 3;2219,2189,2194;, + 3;1897,2215,1898;, + 3;1904,2215,1897;, + 3;1904,2220,2215;, + 3;2220,2216,2215;, + 3;2220,2221,2216;, + 3;2221,2217,2216;, + 3;2221,2222,2217;, + 3;2222,2218,2217;, + 3;2222,2223,2218;, + 3;2223,2224,2218;, + 3;2218,2224,2219;, + 3;2224,2225,2219;, + 3;2219,2225,2189;, + 3;2225,2184,2189;, + 3;1910,2220,1904;, + 3;1910,2226,2220;, + 3;2226,2221,2220;, + 3;2226,2227,2221;, + 3;2227,2222,2221;, + 3;2227,2228,2222;, + 3;2228,2223,2222;, + 3;2228,2229,2223;, + 3;2229,2230,2223;, + 3;2223,2230,2224;, + 3;2230,2231,2224;, + 3;2224,2231,2225;, + 3;1910,2232,2226;, + 3;2226,2232,2233;, + 3;2226,2233,2227;, + 3;2227,2233,2234;, + 3;2227,2234,2228;, + 3;2228,2234,2235;, + 3;2228,2235,2229;, + 3;2229,2235,2236;, + 3;2229,2236,2237;, + 3;2229,2237,2230;, + 3;1910,1909,2232;, + 3;1909,2238,2232;, + 3;2232,2238,2239;, + 3;2232,2239,2233;, + 3;2233,2239,2240;, + 3;2233,2240,2234;, + 3;2234,2240,2241;, + 3;2234,2241,2235;, + 3;2235,2241,2242;, + 3;2235,2242,2236;, + 3;1909,1915,2238;, + 3;1915,2243,2238;, + 3;2238,2243,2244;, + 3;2238,2244,2239;, + 3;2239,2244,2245;, + 3;2239,2245,2240;, + 3;2240,2245,2246;, + 3;2240,2246,2241;, + 3;2241,2246,2247;, + 3;2241,2247,2242;, + 3;1915,1920,2243;, + 3;1920,2248,2243;, + 3;2243,2248,2249;, + 3;2243,2249,2244;, + 3;2244,2249,2250;, + 3;2244,2250,2245;, + 3;2245,2250,2251;, + 3;2245,2251,2246;, + 3;2246,2251,2252;, + 3;2246,2252,2247;, + 3;1920,1925,2248;, + 3;1925,2253,2248;, + 3;2248,2253,2254;, + 3;2248,2254,2249;, + 3;2249,2254,2255;, + 3;2249,2255,2250;, + 3;2250,2255,2256;, + 3;2250,2256,2251;, + 3;2251,2256,2257;, + 3;2251,2257,2252;, + 3;1925,1930,2253;, + 3;1930,1974,2253;, + 3;2253,1974,1980;, + 3;2253,1980,2254;, + 3;2254,1980,1986;, + 3;2254,1986,2255;, + 3;2255,1986,1992;, + 3;2255,1992,2256;, + 3;2256,1992,1998;, + 3;2256,1998,2257;, + 3;2257,1998,2004;, + 3;2257,2004,2258;, + 3;2252,2257,2258;, + 3;2252,2258,2259;, + 3;2247,2252,2259;, + 3;2247,2259,2260;, + 3;2242,2247,2260;, + 3;2258,2004,2010;, + 3;2258,2010,2261;, + 3;2259,2258,2261;, + 3;2259,2261,2262;, + 3;2260,2259,2262;, + 3;2260,2262,2263;, + 3;2264,2260,2263;, + 3;2242,2260,2264;, + 3;2236,2242,2264;, + 3;2236,2264,2265;, + 3;2237,2236,2265;, + 3;2261,2010,2016;, + 3;2261,2016,2266;, + 3;2262,2261,2266;, + 3;2262,2266,2267;, + 3;2263,2262,2267;, + 3;2263,2267,2268;, + 3;2269,2263,2268;, + 3;2264,2263,2269;, + 3;2265,2264,2269;, + 3;2265,2269,2270;, + 3;2271,2265,2270;, + 3;2237,2265,2271;, + 3;2266,2016,2022;, + 3;2266,2022,2272;, + 3;2267,2266,2272;, + 3;2267,2272,2273;, + 3;2268,2267,2273;, + 3;2268,2273,2274;, + 3;2275,2268,2274;, + 3;2269,2268,2275;, + 3;2270,2269,2275;, + 3;2270,2275,2276;, + 3;2277,2270,2276;, + 3;2271,2270,2277;, + 3;2272,2022,2028;, + 3;2272,2028,2278;, + 3;2273,2272,2278;, + 3;2273,2278,2279;, + 3;2274,2273,2279;, + 3;2274,2279,2280;, + 3;2281,2274,2280;, + 3;2275,2274,2281;, + 3;2276,2275,2281;, + 3;2276,2281,2282;, + 3;2283,2276,2282;, + 3;2277,2276,2283;, + 3;2278,2028,2034;, + 3;2278,2034,2284;, + 3;2279,2278,2284;, + 3;2279,2284,2285;, + 3;2280,2279,2285;, + 3;2280,2285,2286;, + 3;2287,2280,2286;, + 3;2281,2280,2287;, + 3;2282,2281,2287;, + 3;2282,2287,2288;, + 3;2289,2282,2288;, + 3;2283,2282,2289;, + 3;2284,2034,2040;, + 3;2284,2040,2290;, + 3;2285,2284,2290;, + 3;2285,2290,2291;, + 3;2286,2285,2291;, + 3;2286,2291,2292;, + 3;2293,2286,2292;, + 3;2287,2286,2293;, + 3;2288,2287,2293;, + 3;2288,2293,2132;, + 3;2138,2288,2132;, + 3;2289,2288,2138;, + 3;2290,2040,2046;, + 3;2290,2046,2294;, + 3;2291,2290,2294;, + 3;2291,2294,2295;, + 3;2292,2291,2295;, + 3;2292,2295,2120;, + 3;2126,2292,2120;, + 3;2293,2292,2126;, + 3;2132,2293,2126;, + 3;2294,2046,2052;, + 3;2294,2052,2296;, + 3;2295,2294,2296;, + 3;2295,2296,2114;, + 3;2120,2295,2114;, + 3;2296,2052,2058;, + 3;2296,2058,2108;, + 3;2114,2296,2108;, + 3;2289,2138,2144;, + 3;2289,2144,2297;, + 3;2283,2289,2297;, + 3;2283,2297,2298;, + 3;2277,2283,2298;, + 3;2277,2298,2299;, + 3;2271,2277,2299;, + 3;2297,2144,2150;, + 3;2297,2150,2300;, + 3;2298,2297,2300;, + 3;2298,2300,2301;, + 3;2299,2298,2301;, + 3;2299,2301,2302;, + 3;2303,2299,2302;, + 3;2271,2299,2303;, + 3;2237,2271,2303;, + 3;2237,2303,2230;, + 3;2230,2303,2231;, + 3;2300,2150,2156;, + 3;2300,2156,2304;, + 3;2301,2300,2304;, + 3;2301,2304,2305;, + 3;2302,2301,2305;, + 3;2302,2305,2306;, + 3;2231,2302,2306;, + 3;2303,2302,2231;, + 3;2304,2156,2162;, + 3;2304,2162,2174;, + 3;2305,2304,2174;, + 3;2305,2174,2179;, + 3;2306,2305,2179;, + 3;2306,2179,2184;, + 3;2225,2306,2184;, + 3;2231,2306,2225;; + } + + MeshTextureCoords { + 2307; + 0.281886;0.010641;, + 0.257541;0.012708;, + 1.000000;0.015902;, + 0.372241;0.029051;, + 0.344386;0.030669;, + 0.237113;0.014790;, + 0.000000;0.015902;, + 0.312811;0.008647;, + 0.401990;0.027694;, + 0.417159;0.048346;, + 0.390687;0.049523;, + 0.365054;0.050960;, + 0.318390;0.032482;, + 0.355259;0.006841;, + 0.433490;0.026663;, + 0.444339;0.047471;, + 0.448562;0.068432;, + 0.423216;0.069238;, + 0.398287;0.070330;, + 0.416933;0.005462;, + 0.466364;0.026017;, + 0.472034;0.046932;, + 0.474204;0.067938;, + 0.475347;0.089019;, + 0.450799;0.089485;, + 0.500000;0.004913;, + 0.500000;0.025797;, + 0.500000;0.046749;, + 0.500000;0.067771;, + 0.500000;0.088861;, + 0.583067;0.005462;, + 0.533636;0.026017;, + 0.527966;0.046932;, + 0.525796;0.067938;, + 0.524653;0.089019;, + 0.500000;0.110020;, + 0.644741;0.006841;, + 0.566510;0.026663;, + 0.555661;0.047471;, + 0.551438;0.068432;, + 0.549201;0.089485;, + 0.523951;0.110170;, + 0.687189;0.008647;, + 0.598010;0.027694;, + 0.582841;0.048346;, + 0.576784;0.069238;, + 0.573546;0.090248;, + 0.547823;0.110616;, + 0.718114;0.010641;, + 0.627759;0.029051;, + 0.609313;0.049523;, + 0.601713;0.070330;, + 0.597600;0.091285;, + 0.571540;0.111345;, + 0.742459;0.012708;, + 0.655614;0.030669;, + 0.634946;0.050960;, + 0.626131;0.071676;, + 0.621293;0.092568;, + 0.595036;0.112338;, + 0.762887;0.014790;, + 0.681610;0.032482;, + 0.659668;0.052612;, + 0.649974;0.073236;, + 0.644570;0.094062;, + 0.618253;0.113568;, + 0.780848;0.016852;, + 0.705888;0.034431;, + 0.683460;0.054429;, + 0.673204;0.074969;, + 0.667396;0.095730;, + 0.641145;0.115005;, + 0.797175;0.018870;, + 0.728639;0.036461;, + 0.706341;0.056366;, + 0.695811;0.076835;, + 0.689751;0.097534;, + 0.663681;0.116615;, + 0.812371;0.020826;, + 0.750066;0.038527;, + 0.728361;0.058378;, + 0.717802;0.078789;, + 0.711633;0.099434;, + 0.685841;0.118360;, + 0.826757;0.022708;, + 0.770360;0.040590;, + 0.749584;0.060422;, + 0.739202;0.080794;, + 0.733049;0.101391;, + 0.707615;0.120203;, + 0.840545;0.024503;, + 0.789695;0.042618;, + 0.770082;0.062463;, + 0.760045;0.082810;, + 0.754016;0.103368;, + 0.729005;0.122107;, + 0.853882;0.026202;, + 0.808222;0.044582;, + 0.789931;0.064466;, + 0.780372;0.084803;, + 0.774560;0.105330;, + 0.750021;0.124036;, + 0.866872;0.027795;, + 0.826070;0.046459;, + 0.809204;0.066402;, + 0.800228;0.086742;, + 0.794709;0.107246;, + 0.770677;0.125955;, + 0.879590;0.029275;, + 0.843348;0.048229;, + 0.827973;0.068246;, + 0.819659;0.088598;, + 0.814496;0.109087;, + 0.790996;0.127833;, + 0.892093;0.030635;, + 0.860148;0.049874;, + 0.846302;0.069974;, + 0.838711;0.090346;, + 0.833956;0.110825;, + 0.811000;0.129641;, + 0.904426;0.031868;, + 0.876550;0.051381;, + 0.864251;0.071568;, + 0.857429;0.091964;, + 0.853123;0.112439;, + 0.830717;0.131351;, + 0.916623;0.032969;, + 0.892622;0.052737;, + 0.881877;0.073010;, + 0.875857;0.093434;, + 0.872033;0.113908;, + 0.850174;0.132942;, + 0.928710;0.033933;, + 0.908422;0.053932;, + 0.899229;0.074287;, + 0.894037;0.094739;, + 0.890720;0.115214;, + 0.869402;0.134391;, + 0.940711;0.034756;, + 0.923999;0.054956;, + 0.916354;0.075386;, + 0.912007;0.095865;, + 0.909217;0.116343;, + 0.888428;0.135682;, + 0.952644;0.035434;, + 0.939401;0.055804;, + 0.933296;0.076298;, + 0.929807;0.096802;, + 0.927558;0.117283;, + 0.907284;0.136798;, + 0.964526;0.035964;, + 0.954665;0.056469;, + 0.950095;0.077015;, + 0.947471;0.097539;, + 0.945776;0.118023;, + 0.925996;0.137728;, + 0.976370;0.036345;, + 0.969831;0.056947;, + 0.966788;0.077531;, + 0.965036;0.098071;, + 0.963902;0.118558;, + 0.944596;0.138462;, + 0.988191;0.036574;, + 0.984932;0.057235;, + 0.983411;0.077843;, + 0.982534;0.098391;, + 0.981966;0.118881;, + 0.963111;0.138991;, + 1.000000;0.036650;, + 1.000000;0.057331;, + 1.000000;0.077947;, + 1.000000;0.098499;, + 1.000000;0.118988;, + 0.981569;0.139311;, + 0.962531;0.159371;, + 0.943731;0.158852;, + 0.924853;0.158133;, + 1.000000;0.139418;, + 0.981278;0.159685;, + 0.962089;0.179699;, + 0.943073;0.179195;, + 0.923985;0.178497;, + 0.904800;0.177612;, + 0.905871;0.157222;, + 1.000000;0.159790;, + 0.981057;0.180004;, + 0.961744;0.199977;, + 0.942559;0.199491;, + 0.923307;0.198818;, + 0.903965;0.197965;, + 1.000000;0.180106;, + 0.980883;0.200270;, + 0.961468;0.220206;, + 0.942148;0.219742;, + 0.922766;0.219098;, + 0.903299;0.218283;, + 1.000000;0.200369;, + 0.980744;0.220487;, + 0.961244;0.240390;, + 0.941815;0.239949;, + 0.922327;0.239339;, + 0.902759;0.238566;, + 1.000000;0.220581;, + 0.980632;0.240656;, + 0.961060;0.260531;, + 0.941542;0.260116;, + 0.921967;0.259542;, + 0.902317;0.258815;, + 1.000000;0.240746;, + 0.980539;0.260782;, + 0.960907;0.280632;, + 0.941315;0.280245;, + 0.921669;0.279710;, + 0.901951;0.279031;, + 1.000000;0.260865;, + 0.980463;0.280865;, + 0.960780;0.300695;, + 0.941127;0.300339;, + 0.921421;0.299845;, + 0.901646;0.299219;, + 1.000000;0.280944;, + 0.980399;0.300911;, + 0.960674;0.320725;, + 0.940969;0.320400;, + 0.921214;0.319949;, + 0.901392;0.319378;, + 1.000000;0.300983;, + 0.980346;0.320921;, + 0.960586;0.340723;, + 0.940838;0.340431;, + 0.921041;0.340026;, + 0.901180;0.339512;, + 1.000000;0.320987;, + 0.980301;0.340900;, + 0.960512;0.360694;, + 0.940729;0.360436;, + 0.920898;0.360078;, + 0.901004;0.359624;, + 1.000000;0.340959;, + 0.980264;0.360851;, + 0.960452;0.380641;, + 0.940639;0.380417;, + 0.920780;0.380108;, + 0.900859;0.379715;, + 1.000000;0.360903;, + 0.980234;0.380776;, + 0.960403;0.400566;, + 0.940566;0.400379;, + 0.920684;0.400119;, + 0.900742;0.399789;, + 1.000000;0.380821;, + 0.980209;0.400680;, + 0.960364;0.420474;, + 0.940508;0.420323;, + 0.920608;0.420114;, + 0.900649;0.419849;, + 1.000000;0.400718;, + 0.980190;0.420565;, + 0.960335;0.440368;, + 0.940465;0.440254;, + 0.920551;0.440097;, + 0.900579;0.439897;, + 1.000000;0.420596;, + 0.980175;0.440437;, + 0.960314;0.460251;, + 0.940435;0.460175;, + 0.920511;0.460070;, + 0.900530;0.459936;, + 1.000000;0.440460;, + 0.980164;0.460297;, + 0.960302;0.480127;, + 0.940416;0.480089;, + 0.920488;0.480037;, + 0.900501;0.479970;, + 1.000000;0.460313;, + 0.980158;0.480150;, + 0.960298;0.500000;, + 0.940410;0.500000;, + 0.920480;0.500000;, + 0.900492;0.500000;, + 1.000000;0.480158;, + 0.980156;0.500000;, + 0.960302;0.519873;, + 0.940416;0.519911;, + 0.920488;0.519963;, + 0.900501;0.520030;, + 1.000000;0.500000;, + 0.980158;0.519850;, + 0.960314;0.539749;, + 0.940435;0.539825;, + 0.920511;0.539930;, + 0.900530;0.540064;, + 1.000000;0.519842;, + 0.980164;0.539703;, + 0.960335;0.559632;, + 0.940465;0.559746;, + 0.920551;0.559903;, + 0.900579;0.560103;, + 1.000000;0.539687;, + 0.980175;0.559563;, + 0.960364;0.579526;, + 0.940508;0.579677;, + 0.920608;0.579886;, + 0.900649;0.580151;, + 1.000000;0.559540;, + 0.980190;0.579435;, + 0.960403;0.599434;, + 0.940566;0.599621;, + 0.920684;0.599881;, + 0.900742;0.600211;, + 1.000000;0.579404;, + 0.980209;0.599320;, + 0.960452;0.619359;, + 0.940639;0.619583;, + 0.920780;0.619892;, + 0.900859;0.620285;, + 1.000000;0.599282;, + 0.980234;0.619224;, + 0.960512;0.639306;, + 0.940729;0.639564;, + 0.920898;0.639922;, + 0.901004;0.640376;, + 1.000000;0.619179;, + 0.980264;0.639149;, + 0.960586;0.659277;, + 0.940838;0.659569;, + 0.921041;0.659974;, + 0.901180;0.660488;, + 1.000000;0.639097;, + 0.980301;0.659100;, + 0.960674;0.679275;, + 0.940969;0.679600;, + 0.921214;0.680051;, + 0.901392;0.680622;, + 1.000000;0.659041;, + 0.980346;0.679079;, + 0.960780;0.699305;, + 0.941127;0.699661;, + 0.921421;0.700155;, + 0.901646;0.700781;, + 1.000000;0.679013;, + 0.980399;0.699089;, + 0.960907;0.719368;, + 0.941315;0.719755;, + 0.921669;0.720290;, + 0.901951;0.720969;, + 1.000000;0.699017;, + 0.980463;0.719135;, + 0.961060;0.739469;, + 0.941542;0.739884;, + 0.921967;0.740458;, + 0.902317;0.741186;, + 1.000000;0.719056;, + 0.980539;0.739218;, + 0.961244;0.759610;, + 0.941815;0.760051;, + 0.922327;0.760661;, + 0.902759;0.761434;, + 1.000000;0.739135;, + 0.980632;0.759344;, + 0.961468;0.779794;, + 0.942148;0.780258;, + 0.922766;0.780902;, + 0.903299;0.781717;, + 1.000000;0.759254;, + 0.980744;0.779513;, + 0.961744;0.800023;, + 0.942559;0.800509;, + 0.923307;0.801182;, + 0.903965;0.802035;, + 1.000000;0.779419;, + 0.980883;0.799730;, + 0.962089;0.820301;, + 0.943073;0.820805;, + 0.923985;0.821503;, + 0.904800;0.822388;, + 1.000000;0.799631;, + 0.981057;0.819996;, + 0.962531;0.840629;, + 0.943731;0.841148;, + 0.924853;0.841867;, + 0.905871;0.842778;, + 1.000000;0.819894;, + 0.981278;0.840315;, + 0.963111;0.861009;, + 0.944596;0.861538;, + 0.925996;0.862272;, + 0.907284;0.863202;, + 1.000000;0.840210;, + 0.981569;0.860689;, + 0.963902;0.881442;, + 0.945776;0.881977;, + 0.927558;0.882717;, + 0.909217;0.883657;, + 1.000000;0.860582;, + 0.981966;0.881119;, + 0.965036;0.901929;, + 0.947471;0.902461;, + 0.929807;0.903198;, + 0.912007;0.904135;, + 1.000000;0.881012;, + 0.982534;0.901609;, + 0.966788;0.922469;, + 0.950095;0.922985;, + 0.933296;0.923702;, + 0.916354;0.924614;, + 1.000000;0.901501;, + 0.983411;0.922157;, + 0.969831;0.943053;, + 0.954665;0.943531;, + 0.939401;0.944196;, + 0.923999;0.945044;, + 1.000000;0.922053;, + 0.984932;0.942765;, + 0.976370;0.963655;, + 0.964526;0.964036;, + 0.952644;0.964566;, + 0.940711;0.965244;, + 1.000000;0.942669;, + 0.988191;0.963426;, + 1.000000;0.984098;, + 0.928710;0.966067;, + 0.908422;0.946068;, + 1.000000;0.963350;, + 0.899229;0.925713;, + 0.892622;0.947263;, + 0.881877;0.926990;, + 0.894037;0.905261;, + 0.916623;0.967031;, + 0.904426;0.968132;, + 0.876550;0.948619;, + 0.864251;0.928432;, + 0.875857;0.906566;, + 0.892093;0.969365;, + 0.860148;0.950126;, + 0.846302;0.930026;, + 0.857429;0.908036;, + 0.872033;0.886092;, + 0.890720;0.884786;, + 0.879590;0.970725;, + 0.843348;0.951772;, + 0.827973;0.931754;, + 0.838711;0.909654;, + 0.853123;0.887561;, + 0.866872;0.972205;, + 0.826070;0.953541;, + 0.809204;0.933598;, + 0.819659;0.911402;, + 0.833956;0.889175;, + 0.853882;0.973798;, + 0.808222;0.955418;, + 0.789931;0.935534;, + 0.800228;0.913258;, + 0.814496;0.890913;, + 0.840545;0.975497;, + 0.789695;0.957382;, + 0.770082;0.937537;, + 0.780372;0.915197;, + 0.794709;0.892754;, + 0.826757;0.977292;, + 0.770360;0.959410;, + 0.749584;0.939578;, + 0.760045;0.917190;, + 0.774560;0.894670;, + 0.812371;0.979174;, + 0.750066;0.961473;, + 0.728361;0.941622;, + 0.739202;0.919206;, + 0.754016;0.896632;, + 0.797175;0.981130;, + 0.728639;0.963539;, + 0.706341;0.943634;, + 0.717802;0.921211;, + 0.733049;0.898609;, + 0.780848;0.983148;, + 0.705888;0.965569;, + 0.683460;0.945571;, + 0.695811;0.923165;, + 0.711633;0.900566;, + 0.762887;0.985210;, + 0.681610;0.967518;, + 0.659668;0.947388;, + 0.673204;0.925031;, + 0.689751;0.902466;, + 0.742459;0.987292;, + 0.655614;0.969331;, + 0.634946;0.949040;, + 0.649974;0.926764;, + 0.667396;0.904270;, + 0.718114;0.989359;, + 0.627759;0.970949;, + 0.609313;0.950477;, + 0.626131;0.928324;, + 0.644570;0.905938;, + 0.687189;0.991353;, + 0.598010;0.972307;, + 0.582841;0.951654;, + 0.601713;0.929670;, + 0.621293;0.907432;, + 0.644741;0.993159;, + 0.566510;0.973337;, + 0.555661;0.952529;, + 0.576784;0.930762;, + 0.597600;0.908715;, + 0.583067;0.994538;, + 0.533636;0.973983;, + 0.527966;0.953068;, + 0.551438;0.931568;, + 0.573546;0.909752;, + 0.500000;0.995087;, + 0.500000;0.974203;, + 0.500000;0.953251;, + 0.525796;0.932062;, + 0.549201;0.910515;, + 0.571540;0.888655;, + 0.595036;0.887662;, + 0.466364;0.973983;, + 0.472034;0.953068;, + 0.474204;0.932062;, + 0.500000;0.932229;, + 0.524653;0.910981;, + 0.547823;0.889384;, + 0.416933;0.994538;, + 0.433490;0.973337;, + 0.444339;0.952529;, + 0.448562;0.931568;, + 0.450799;0.910515;, + 0.475347;0.910981;, + 0.000000;0.984098;, + 0.355259;0.993159;, + 0.401990;0.972307;, + 0.417159;0.951654;, + 0.423216;0.930762;, + 0.426454;0.909752;, + 0.312811;0.991353;, + 0.372241;0.970949;, + 0.390687;0.950477;, + 0.398287;0.929670;, + 0.402400;0.908715;, + 0.281886;0.989359;, + 0.344386;0.969331;, + 0.365054;0.949040;, + 0.373869;0.928324;, + 0.378707;0.907432;, + 0.257541;0.987292;, + 0.318390;0.967518;, + 0.340332;0.947388;, + 0.350026;0.926764;, + 0.355430;0.905938;, + 0.237113;0.985210;, + 0.294112;0.965569;, + 0.316540;0.945571;, + 0.326796;0.925031;, + 0.332604;0.904270;, + 0.219152;0.983148;, + 0.271361;0.963539;, + 0.293659;0.943634;, + 0.304189;0.923165;, + 0.310249;0.902466;, + 0.202825;0.981130;, + 0.249934;0.961473;, + 0.271639;0.941622;, + 0.282198;0.921211;, + 0.288367;0.900566;, + 0.187629;0.979174;, + 0.229640;0.959410;, + 0.250416;0.939578;, + 0.260798;0.919206;, + 0.266951;0.898609;, + 0.173243;0.977292;, + 0.210305;0.957382;, + 0.229918;0.937537;, + 0.239955;0.917190;, + 0.245984;0.896632;, + 0.159455;0.975497;, + 0.191778;0.955418;, + 0.210069;0.935534;, + 0.219628;0.915197;, + 0.225440;0.894670;, + 0.146118;0.973798;, + 0.173930;0.953541;, + 0.190796;0.933598;, + 0.199772;0.913258;, + 0.205291;0.892754;, + 0.133128;0.972205;, + 0.156652;0.951772;, + 0.172027;0.931754;, + 0.180341;0.911402;, + 0.185504;0.890913;, + 0.120410;0.970725;, + 0.139852;0.950126;, + 0.153698;0.930026;, + 0.161289;0.909654;, + 0.166044;0.889175;, + 0.107907;0.969365;, + 0.123450;0.948619;, + 0.135749;0.928432;, + 0.142571;0.908036;, + 0.146877;0.887561;, + 0.095574;0.968132;, + 0.107378;0.947263;, + 0.118123;0.926990;, + 0.124143;0.906566;, + 0.127967;0.886092;, + 0.083377;0.967031;, + 0.091578;0.946068;, + 0.100771;0.925713;, + 0.105963;0.905261;, + 0.109280;0.884786;, + 0.071290;0.966067;, + 0.076001;0.945044;, + 0.083646;0.924614;, + 0.087993;0.904135;, + 0.090783;0.883657;, + 0.059289;0.965244;, + 0.060599;0.944196;, + 0.066704;0.923702;, + 0.070193;0.903198;, + 0.072442;0.882717;, + 0.047356;0.964566;, + 0.045335;0.943531;, + 0.049905;0.922985;, + 0.052529;0.902461;, + 0.054224;0.881977;, + 0.035474;0.964036;, + 0.030169;0.943053;, + 0.033212;0.922469;, + 0.034964;0.901929;, + 0.036098;0.881442;, + 0.023630;0.963655;, + 0.015068;0.942765;, + 0.016589;0.922157;, + 0.017466;0.901609;, + 0.018034;0.881119;, + 0.011809;0.963426;, + 0.000000;0.942669;, + 0.000000;0.922053;, + 0.000000;0.901501;, + 0.000000;0.881012;, + 0.000000;0.963350;, + 0.000000;0.860582;, + 0.018431;0.860689;, + 0.036889;0.861009;, + 0.055404;0.861538;, + 0.000000;0.840210;, + 0.018722;0.840315;, + 0.037469;0.840629;, + 0.056269;0.841148;, + 0.074004;0.862272;, + 0.092716;0.863202;, + 0.000000;0.819894;, + 0.018943;0.819996;, + 0.037911;0.820301;, + 0.056927;0.820805;, + 0.075147;0.841867;, + 0.094129;0.842778;, + 0.111572;0.864319;, + 0.000000;0.799631;, + 0.019117;0.799730;, + 0.038256;0.800023;, + 0.057441;0.800509;, + 0.076015;0.821503;, + 0.095200;0.822388;, + 0.113241;0.843871;, + 0.000000;0.779419;, + 0.019256;0.779513;, + 0.038532;0.779794;, + 0.057852;0.780258;, + 0.076693;0.801182;, + 0.096035;0.802035;, + 0.114505;0.823449;, + 0.000000;0.759254;, + 0.019368;0.759344;, + 0.038756;0.759610;, + 0.058185;0.760051;, + 0.077234;0.780902;, + 0.096701;0.781717;, + 0.115489;0.803057;, + 0.000000;0.739135;, + 0.019461;0.739218;, + 0.038940;0.739469;, + 0.058458;0.739884;, + 0.077673;0.760661;, + 0.097241;0.761434;, + 0.116273;0.782694;, + 0.000000;0.719056;, + 0.019537;0.719135;, + 0.039093;0.719368;, + 0.058685;0.719755;, + 0.078033;0.740458;, + 0.097683;0.741186;, + 0.116907;0.762362;, + 0.000000;0.699017;, + 0.019601;0.699089;, + 0.039220;0.699305;, + 0.058873;0.699661;, + 0.078331;0.720290;, + 0.098049;0.720969;, + 0.117427;0.742058;, + 0.000000;0.679013;, + 0.019654;0.679079;, + 0.039326;0.679275;, + 0.059031;0.679600;, + 0.078579;0.700155;, + 0.098354;0.700781;, + 0.117857;0.721782;, + 0.000000;0.659041;, + 0.019699;0.659100;, + 0.039414;0.659277;, + 0.059162;0.659569;, + 0.078786;0.680051;, + 0.098608;0.680622;, + 0.118214;0.701532;, + 0.000000;0.639097;, + 0.019736;0.639149;, + 0.039488;0.639306;, + 0.059271;0.639564;, + 0.078959;0.659974;, + 0.098820;0.660488;, + 0.118512;0.681307;, + 0.000000;0.619179;, + 0.019766;0.619224;, + 0.039548;0.619359;, + 0.059361;0.619583;, + 0.079102;0.639922;, + 0.098996;0.640376;, + 0.118761;0.661104;, + 0.000000;0.599282;, + 0.019791;0.599320;, + 0.039597;0.599434;, + 0.059434;0.599621;, + 0.079220;0.619892;, + 0.099141;0.620285;, + 0.118967;0.640921;, + 0.000000;0.579404;, + 0.019811;0.579435;, + 0.039636;0.579526;, + 0.059492;0.579677;, + 0.079316;0.599881;, + 0.099258;0.600211;, + 0.119137;0.620755;, + 0.000000;0.559540;, + 0.019825;0.559563;, + 0.039665;0.559632;, + 0.059535;0.559746;, + 0.079392;0.579886;, + 0.099351;0.580151;, + 0.119274;0.600606;, + 0.000000;0.539687;, + 0.019836;0.539703;, + 0.039686;0.539749;, + 0.059565;0.539825;, + 0.079449;0.559903;, + 0.099421;0.560103;, + 0.119383;0.580469;, + 0.000000;0.519842;, + 0.019842;0.519850;, + 0.039698;0.519873;, + 0.059584;0.519911;, + 0.079489;0.539930;, + 0.099470;0.540064;, + 0.119465;0.560342;, + 0.000000;0.500000;, + 0.019844;0.500000;, + 0.039702;0.500000;, + 0.059589;0.500000;, + 0.079512;0.519963;, + 0.099499;0.520030;, + 0.119522;0.540224;, + 0.000000;0.480158;, + 0.019842;0.480150;, + 0.039698;0.480127;, + 0.059584;0.480089;, + 0.079520;0.500000;, + 0.099508;0.500000;, + 0.119556;0.520111;, + 0.000000;0.460313;, + 0.019836;0.460297;, + 0.039686;0.460251;, + 0.059565;0.460175;, + 0.079512;0.480037;, + 0.099499;0.479970;, + 0.119567;0.500000;, + 0.000000;0.440460;, + 0.019825;0.440437;, + 0.039665;0.440368;, + 0.059535;0.440254;, + 0.079489;0.460070;, + 0.099470;0.459936;, + 0.119556;0.479889;, + 0.000000;0.420596;, + 0.019811;0.420565;, + 0.039636;0.420474;, + 0.059492;0.420323;, + 0.079449;0.440097;, + 0.099421;0.439897;, + 0.119522;0.459776;, + 0.000000;0.400718;, + 0.019791;0.400680;, + 0.039597;0.400566;, + 0.059434;0.400379;, + 0.079392;0.420114;, + 0.099351;0.419849;, + 0.119465;0.439658;, + 0.000000;0.380821;, + 0.019766;0.380776;, + 0.039548;0.380641;, + 0.059361;0.380417;, + 0.079316;0.400119;, + 0.099258;0.399789;, + 0.119383;0.419531;, + 0.000000;0.360903;, + 0.019736;0.360851;, + 0.039488;0.360694;, + 0.059271;0.360436;, + 0.079220;0.380108;, + 0.099141;0.379715;, + 0.119274;0.399394;, + 0.000000;0.340959;, + 0.019699;0.340900;, + 0.039414;0.340723;, + 0.059162;0.340431;, + 0.079102;0.360078;, + 0.098996;0.359624;, + 0.119137;0.379245;, + 0.000000;0.320987;, + 0.019654;0.320921;, + 0.039326;0.320725;, + 0.059031;0.320400;, + 0.078959;0.340026;, + 0.098820;0.339512;, + 0.118967;0.359079;, + 0.000000;0.300983;, + 0.019601;0.300911;, + 0.039220;0.300695;, + 0.058873;0.300339;, + 0.078786;0.319949;, + 0.098608;0.319378;, + 0.118761;0.338896;, + 0.000000;0.280944;, + 0.019537;0.280865;, + 0.039093;0.280632;, + 0.058685;0.280245;, + 0.078579;0.299845;, + 0.098354;0.299219;, + 0.118512;0.318693;, + 0.000000;0.260865;, + 0.019461;0.260782;, + 0.038940;0.260531;, + 0.058458;0.260116;, + 0.078331;0.279710;, + 0.098049;0.279031;, + 0.118214;0.298468;, + 0.000000;0.240746;, + 0.019368;0.240656;, + 0.038756;0.240390;, + 0.058185;0.239949;, + 0.078033;0.259542;, + 0.097683;0.258815;, + 0.117857;0.278218;, + 0.000000;0.220581;, + 0.019256;0.220487;, + 0.038532;0.220206;, + 0.057852;0.219742;, + 0.077673;0.239339;, + 0.097241;0.238566;, + 0.117427;0.257942;, + 0.000000;0.200369;, + 0.019117;0.200270;, + 0.038256;0.199977;, + 0.057441;0.199491;, + 0.077234;0.219098;, + 0.096701;0.218283;, + 0.116907;0.237638;, + 0.000000;0.180106;, + 0.018943;0.180004;, + 0.037911;0.179699;, + 0.056927;0.179195;, + 0.076693;0.198818;, + 0.096035;0.197965;, + 0.116273;0.217306;, + 0.000000;0.159790;, + 0.018722;0.159685;, + 0.037469;0.159371;, + 0.056269;0.158852;, + 0.076015;0.178497;, + 0.095200;0.177612;, + 0.115489;0.196943;, + 0.000000;0.139418;, + 0.018431;0.139311;, + 0.036889;0.138991;, + 0.055404;0.138462;, + 0.075147;0.158133;, + 0.094129;0.157222;, + 0.114505;0.176551;, + 0.000000;0.118988;, + 0.018034;0.118881;, + 0.036098;0.118558;, + 0.054224;0.118023;, + 0.074004;0.137728;, + 0.092716;0.136798;, + 0.113241;0.156129;, + 0.000000;0.098499;, + 0.017466;0.098391;, + 0.034964;0.098071;, + 0.052529;0.097539;, + 0.072442;0.117283;, + 0.090783;0.116343;, + 0.111572;0.135682;, + 0.000000;0.077947;, + 0.016589;0.077843;, + 0.033212;0.077531;, + 0.049905;0.077015;, + 0.070193;0.096802;, + 0.087993;0.095865;, + 0.109280;0.115214;, + 0.000000;0.057331;, + 0.015068;0.057235;, + 0.030169;0.056947;, + 0.045335;0.056469;, + 0.066704;0.076298;, + 0.083646;0.075386;, + 0.105963;0.094739;, + 0.000000;0.036650;, + 0.011809;0.036574;, + 0.023630;0.036345;, + 0.035474;0.035964;, + 0.060599;0.055804;, + 0.076001;0.054956;, + 0.100771;0.074287;, + 0.047356;0.035434;, + 0.059289;0.034756;, + 0.091578;0.053932;, + 0.118123;0.073010;, + 0.124143;0.093434;, + 0.071290;0.033933;, + 0.107378;0.052737;, + 0.135749;0.071568;, + 0.142571;0.091964;, + 0.146877;0.112439;, + 0.127967;0.113908;, + 0.083377;0.032969;, + 0.123450;0.051381;, + 0.153698;0.069974;, + 0.161289;0.090346;, + 0.166044;0.110825;, + 0.095574;0.031868;, + 0.139852;0.049874;, + 0.172027;0.068246;, + 0.180341;0.088598;, + 0.185504;0.109087;, + 0.107907;0.030635;, + 0.156652;0.048229;, + 0.190796;0.066402;, + 0.199772;0.086742;, + 0.205291;0.107246;, + 0.120410;0.029275;, + 0.173930;0.046459;, + 0.210069;0.064466;, + 0.219628;0.084803;, + 0.225440;0.105330;, + 0.133128;0.027795;, + 0.191778;0.044582;, + 0.229918;0.062463;, + 0.239955;0.082810;, + 0.245984;0.103368;, + 0.146118;0.026202;, + 0.210305;0.042618;, + 0.250416;0.060422;, + 0.260798;0.080794;, + 0.266951;0.101391;, + 0.159455;0.024503;, + 0.229640;0.040590;, + 0.271639;0.058378;, + 0.282198;0.078789;, + 0.288367;0.099434;, + 0.173243;0.022708;, + 0.249934;0.038527;, + 0.293659;0.056366;, + 0.304189;0.076835;, + 0.310249;0.097534;, + 0.187629;0.020826;, + 0.271361;0.036461;, + 0.316540;0.054429;, + 0.326796;0.074969;, + 0.332604;0.095730;, + 0.202825;0.018870;, + 0.294112;0.034431;, + 0.340332;0.052612;, + 0.350026;0.073236;, + 0.355430;0.094062;, + 0.219152;0.016852;, + 0.373869;0.071676;, + 0.378707;0.092568;, + 0.402400;0.091285;, + 0.404964;0.112338;, + 0.381747;0.113568;, + 0.358855;0.115005;, + 0.426454;0.090248;, + 0.428460;0.111345;, + 0.429818;0.132516;, + 0.406707;0.133469;, + 0.383824;0.134651;, + 0.452177;0.110616;, + 0.453108;0.131817;, + 0.453775;0.153086;, + 0.430793;0.153755;, + 0.407963;0.154668;, + 0.476049;0.110170;, + 0.476522;0.131390;, + 0.476861;0.152677;, + 0.477114;0.174028;, + 0.454274;0.174419;, + 0.431524;0.175059;, + 0.500000;0.131247;, + 0.500000;0.152539;, + 0.500000;0.173897;, + 0.500000;0.195318;, + 0.477309;0.195442;, + 0.454659;0.195814;, + 0.523478;0.131390;, + 0.523139;0.152677;, + 0.522886;0.174028;, + 0.522691;0.195442;, + 0.500000;0.216799;, + 0.477463;0.216917;, + 0.546892;0.131817;, + 0.546225;0.153086;, + 0.545726;0.174419;, + 0.545341;0.195814;, + 0.522537;0.216917;, + 0.500000;0.238339;, + 0.570182;0.132516;, + 0.569207;0.153755;, + 0.568476;0.175059;, + 0.567911;0.196423;, + 0.545037;0.217269;, + 0.522413;0.238450;, + 0.593293;0.133469;, + 0.592037;0.154668;, + 0.591094;0.175932;, + 0.590365;0.197254;, + 0.567465;0.217845;, + 0.544793;0.238780;, + 0.616176;0.134651;, + 0.614675;0.155803;, + 0.613546;0.177017;, + 0.612671;0.198287;, + 0.589789;0.218632;, + 0.567106;0.239322;, + 0.638793;0.136034;, + 0.637087;0.157131;, + 0.635800;0.178288;, + 0.634801;0.199498;, + 0.611978;0.219610;, + 0.589325;0.240062;, + 0.661115;0.137586;, + 0.659247;0.158623;, + 0.657833;0.179716;, + 0.656733;0.200859;, + 0.634008;0.220756;, + 0.611420;0.240982;, + 0.683123;0.139271;, + 0.681135;0.160245;, + 0.679627;0.181271;, + 0.678451;0.202340;, + 0.655859;0.222045;, + 0.633369;0.242060;, + 0.704806;0.141054;, + 0.702742;0.161963;, + 0.701172;0.182918;, + 0.699943;0.203911;, + 0.677514;0.223449;, + 0.655153;0.243272;, + 0.726161;0.142899;, + 0.724064;0.163742;, + 0.722462;0.184626;, + 0.721206;0.205540;, + 0.698964;0.224937;, + 0.676757;0.244592;, + 0.747195;0.144771;, + 0.745101;0.165550;, + 0.743498;0.186361;, + 0.742238;0.207196;, + 0.720203;0.226481;, + 0.698170;0.245992;, + 0.767916;0.146637;, + 0.765863;0.167353;, + 0.764285;0.188094;, + 0.763043;0.208850;, + 0.741229;0.228051;, + 0.719389;0.247445;, + 0.788341;0.148465;, + 0.786360;0.169122;, + 0.784833;0.189794;, + 0.783628;0.210474;, + 0.762046;0.229619;, + 0.740410;0.248922;, + 0.808489;0.150227;, + 0.806608;0.170828;, + 0.805155;0.191434;, + 0.804006;0.212041;, + 0.782660;0.231158;, + 0.761235;0.250397;, + 0.828380;0.151896;, + 0.826625;0.172445;, + 0.825265;0.192990;, + 0.824188;0.213528;, + 0.803081;0.232644;, + 0.781871;0.251845;, + 0.848039;0.153450;, + 0.846431;0.173951;, + 0.845182;0.194440;, + 0.844191;0.214913;, + 0.823319;0.234055;, + 0.802326;0.253243;, + 0.867491;0.154866;, + 0.866047;0.175325;, + 0.864924;0.195763;, + 0.864031;0.216178;, + 0.843390;0.235368;, + 0.822610;0.254570;, + 0.886759;0.156129;, + 0.885495;0.176551;, + 0.884511;0.196943;, + 0.883727;0.217306;, + 0.863309;0.236568;, + 0.842736;0.255806;, + 0.883093;0.237638;, + 0.862718;0.256935;, + 0.842196;0.276227;, + 0.822025;0.275074;, + 0.801704;0.273836;, + 0.882573;0.257942;, + 0.862230;0.277279;, + 0.841747;0.296630;, + 0.821539;0.295565;, + 0.801189;0.294423;, + 0.882143;0.278218;, + 0.861824;0.297601;, + 0.841373;0.317016;, + 0.821135;0.316045;, + 0.800760;0.315003;, + 0.881786;0.298468;, + 0.861486;0.317903;, + 0.841062;0.337388;, + 0.820798;0.336514;, + 0.800403;0.335576;, + 0.881488;0.318693;, + 0.861205;0.338185;, + 0.840804;0.357746;, + 0.820519;0.356973;, + 0.800107;0.356144;, + 0.881239;0.338896;, + 0.860971;0.358451;, + 0.840591;0.378091;, + 0.820290;0.377423;, + 0.799864;0.376706;, + 0.881033;0.359079;, + 0.860778;0.378701;, + 0.840419;0.398426;, + 0.820104;0.397865;, + 0.799668;0.397263;, + 0.880863;0.379245;, + 0.860623;0.398938;, + 0.840284;0.418752;, + 0.819958;0.418300;, + 0.799513;0.417815;, + 0.880726;0.399394;, + 0.860500;0.419164;, + 0.840181;0.439070;, + 0.819847;0.438730;, + 0.799396;0.438365;, + 0.880617;0.419531;, + 0.860407;0.439381;, + 0.840109;0.459383;, + 0.819770;0.459156;, + 0.799314;0.458911;, + 0.880535;0.439658;, + 0.860342;0.459591;, + 0.840067;0.479693;, + 0.819724;0.479579;, + 0.799265;0.479456;, + 0.880478;0.459776;, + 0.860303;0.479797;, + 0.840053;0.500000;, + 0.819709;0.500000;, + 0.799249;0.500000;, + 0.880444;0.479889;, + 0.860290;0.500000;, + 0.840067;0.520307;, + 0.819724;0.520421;, + 0.799265;0.520544;, + 0.880433;0.500000;, + 0.860303;0.520203;, + 0.840109;0.540617;, + 0.819770;0.540844;, + 0.799314;0.541089;, + 0.880444;0.520111;, + 0.860342;0.540409;, + 0.840181;0.560930;, + 0.819847;0.561270;, + 0.799396;0.561636;, + 0.880478;0.540224;, + 0.860407;0.560619;, + 0.840284;0.581248;, + 0.819958;0.581700;, + 0.799513;0.582185;, + 0.880535;0.560342;, + 0.860500;0.580836;, + 0.840419;0.601574;, + 0.820104;0.602135;, + 0.799668;0.602738;, + 0.880617;0.580469;, + 0.860623;0.601062;, + 0.840591;0.621909;, + 0.820290;0.622577;, + 0.799864;0.623294;, + 0.880726;0.600606;, + 0.860778;0.621299;, + 0.840804;0.642254;, + 0.820519;0.643027;, + 0.800107;0.643856;, + 0.880863;0.620755;, + 0.860971;0.641549;, + 0.841062;0.662612;, + 0.820798;0.663486;, + 0.800403;0.664424;, + 0.881033;0.640921;, + 0.861205;0.661815;, + 0.841373;0.682984;, + 0.821135;0.683955;, + 0.800760;0.684997;, + 0.881239;0.661104;, + 0.861486;0.682097;, + 0.841747;0.703370;, + 0.821539;0.704435;, + 0.801189;0.705577;, + 0.881488;0.681307;, + 0.861824;0.702399;, + 0.842196;0.723773;, + 0.822025;0.724926;, + 0.801704;0.726164;, + 0.881786;0.701532;, + 0.862230;0.722721;, + 0.842736;0.744194;, + 0.822610;0.745430;, + 0.802326;0.746757;, + 0.882143;0.721782;, + 0.862718;0.743065;, + 0.843390;0.764631;, + 0.823319;0.765945;, + 0.803081;0.767355;, + 0.882573;0.742058;, + 0.863309;0.763432;, + 0.844191;0.785087;, + 0.824188;0.786472;, + 0.804006;0.787959;, + 0.883093;0.762362;, + 0.864031;0.783822;, + 0.845182;0.805560;, + 0.825265;0.807010;, + 0.805155;0.808566;, + 0.883727;0.782694;, + 0.864924;0.804237;, + 0.846431;0.826049;, + 0.826625;0.827555;, + 0.806608;0.829172;, + 0.884511;0.803057;, + 0.866047;0.824675;, + 0.848039;0.846550;, + 0.828380;0.848104;, + 0.808489;0.849773;, + 0.885495;0.823449;, + 0.867491;0.845134;, + 0.850174;0.867058;, + 0.830717;0.868649;, + 0.811000;0.870359;, + 0.886759;0.843871;, + 0.869402;0.865609;, + 0.888428;0.864319;, + 0.790996;0.872167;, + 0.788341;0.851535;, + 0.786360;0.830878;, + 0.770677;0.874045;, + 0.767916;0.853363;, + 0.765863;0.832647;, + 0.784833;0.810206;, + 0.783628;0.789526;, + 0.750021;0.875964;, + 0.747195;0.855229;, + 0.745101;0.834450;, + 0.764285;0.811906;, + 0.763043;0.791150;, + 0.782660;0.768842;, + 0.729005;0.877893;, + 0.726161;0.857101;, + 0.724064;0.836258;, + 0.743498;0.813639;, + 0.742238;0.792804;, + 0.762046;0.770381;, + 0.707615;0.879797;, + 0.704806;0.858946;, + 0.702742;0.838037;, + 0.722462;0.815374;, + 0.721206;0.794460;, + 0.741229;0.771949;, + 0.685841;0.881640;, + 0.683123;0.860729;, + 0.681135;0.839755;, + 0.701172;0.817082;, + 0.699943;0.796089;, + 0.720203;0.773519;, + 0.663681;0.883385;, + 0.661115;0.862414;, + 0.659247;0.841377;, + 0.679627;0.818729;, + 0.678451;0.797660;, + 0.698964;0.775063;, + 0.641145;0.884995;, + 0.638793;0.863966;, + 0.637087;0.842869;, + 0.657833;0.820284;, + 0.656733;0.799141;, + 0.677514;0.776551;, + 0.618253;0.886432;, + 0.616176;0.865349;, + 0.614675;0.844197;, + 0.635800;0.821712;, + 0.634801;0.800502;, + 0.655859;0.777955;, + 0.593293;0.866532;, + 0.592037;0.845332;, + 0.613546;0.822983;, + 0.612671;0.801713;, + 0.634008;0.779244;, + 0.570182;0.867484;, + 0.569207;0.846245;, + 0.591094;0.824068;, + 0.590365;0.802746;, + 0.611978;0.780390;, + 0.546892;0.868183;, + 0.546225;0.846914;, + 0.568476;0.824941;, + 0.567911;0.803577;, + 0.589789;0.781368;, + 0.523951;0.889830;, + 0.523478;0.868610;, + 0.523139;0.847323;, + 0.545726;0.825581;, + 0.545341;0.804186;, + 0.567465;0.782155;, + 0.500000;0.911139;, + 0.500000;0.889980;, + 0.500000;0.868753;, + 0.500000;0.847461;, + 0.522886;0.825972;, + 0.476049;0.889830;, + 0.476522;0.868610;, + 0.476861;0.847323;, + 0.477114;0.825972;, + 0.500000;0.826103;, + 0.522691;0.804558;, + 0.452177;0.889384;, + 0.453108;0.868183;, + 0.453775;0.846914;, + 0.454274;0.825581;, + 0.454659;0.804186;, + 0.477309;0.804558;, + 0.428460;0.888655;, + 0.429818;0.867484;, + 0.430793;0.846245;, + 0.431524;0.824941;, + 0.432089;0.803577;, + 0.404964;0.887662;, + 0.406707;0.866532;, + 0.407963;0.845332;, + 0.408906;0.824068;, + 0.409635;0.802746;, + 0.381747;0.886432;, + 0.383824;0.865349;, + 0.385325;0.844197;, + 0.386454;0.822983;, + 0.387329;0.801713;, + 0.358855;0.884995;, + 0.361207;0.863966;, + 0.362913;0.842869;, + 0.364200;0.821712;, + 0.365199;0.800502;, + 0.336319;0.883385;, + 0.338885;0.862414;, + 0.340753;0.841377;, + 0.342167;0.820284;, + 0.343267;0.799141;, + 0.314159;0.881640;, + 0.316877;0.860729;, + 0.318865;0.839755;, + 0.320373;0.818729;, + 0.321549;0.797660;, + 0.292385;0.879797;, + 0.295194;0.858946;, + 0.297258;0.838037;, + 0.298828;0.817082;, + 0.300057;0.796089;, + 0.270995;0.877893;, + 0.273839;0.857101;, + 0.275936;0.836258;, + 0.277538;0.815374;, + 0.278794;0.794460;, + 0.249979;0.875964;, + 0.252805;0.855229;, + 0.254899;0.834450;, + 0.256502;0.813639;, + 0.257762;0.792804;, + 0.229323;0.874045;, + 0.232084;0.853363;, + 0.234137;0.832647;, + 0.235715;0.811906;, + 0.236957;0.791150;, + 0.209004;0.872167;, + 0.211659;0.851535;, + 0.213640;0.830878;, + 0.215167;0.810206;, + 0.216372;0.789526;, + 0.189000;0.870359;, + 0.191511;0.849773;, + 0.193392;0.829172;, + 0.194845;0.808566;, + 0.195994;0.787959;, + 0.169283;0.868649;, + 0.171620;0.848104;, + 0.173375;0.827555;, + 0.174735;0.807010;, + 0.175812;0.786472;, + 0.149825;0.867058;, + 0.151961;0.846550;, + 0.153569;0.826049;, + 0.154818;0.805560;, + 0.155809;0.785087;, + 0.130598;0.865609;, + 0.132509;0.845134;, + 0.133953;0.824675;, + 0.135076;0.804237;, + 0.135969;0.783822;, + 0.136691;0.763432;, + 0.156610;0.764631;, + 0.176681;0.765945;, + 0.137282;0.743065;, + 0.157264;0.744194;, + 0.177390;0.745430;, + 0.196919;0.767355;, + 0.217340;0.768842;, + 0.137770;0.722721;, + 0.157805;0.723773;, + 0.177975;0.724926;, + 0.197674;0.746757;, + 0.218129;0.748155;, + 0.237954;0.770381;, + 0.138176;0.702399;, + 0.158253;0.703370;, + 0.178461;0.704435;, + 0.198296;0.726164;, + 0.218778;0.727468;, + 0.238765;0.749603;, + 0.138514;0.682097;, + 0.158627;0.682984;, + 0.178865;0.683955;, + 0.198811;0.705577;, + 0.219316;0.706781;, + 0.239431;0.728819;, + 0.138795;0.661815;, + 0.158938;0.662612;, + 0.179202;0.663486;, + 0.199240;0.684997;, + 0.219763;0.686096;, + 0.239983;0.708029;, + 0.139029;0.641549;, + 0.159196;0.642254;, + 0.179481;0.643027;, + 0.199597;0.664424;, + 0.220134;0.665413;, + 0.240441;0.687235;, + 0.139222;0.621299;, + 0.159409;0.621909;, + 0.179710;0.622577;, + 0.199893;0.643856;, + 0.220442;0.644731;, + 0.240821;0.666437;, + 0.139377;0.601062;, + 0.159581;0.601574;, + 0.179896;0.602135;, + 0.200136;0.623294;, + 0.220695;0.624051;, + 0.241136;0.645638;, + 0.139500;0.580836;, + 0.159716;0.581248;, + 0.180042;0.581700;, + 0.200332;0.602738;, + 0.220899;0.603373;, + 0.241395;0.624836;, + 0.139593;0.560619;, + 0.159819;0.560930;, + 0.180153;0.561270;, + 0.200487;0.582185;, + 0.221061;0.582696;, + 0.241604;0.604032;, + 0.139658;0.540409;, + 0.159891;0.540617;, + 0.180230;0.540844;, + 0.200604;0.561636;, + 0.221182;0.562021;, + 0.241769;0.583227;, + 0.139697;0.520203;, + 0.159933;0.520307;, + 0.180276;0.520421;, + 0.200686;0.541089;, + 0.221267;0.541347;, + 0.241893;0.562421;, + 0.139710;0.500000;, + 0.159947;0.500000;, + 0.180291;0.500000;, + 0.200735;0.520544;, + 0.221318;0.520673;, + 0.241980;0.541614;, + 0.139697;0.479797;, + 0.159933;0.479693;, + 0.180276;0.479579;, + 0.200751;0.500000;, + 0.221334;0.500000;, + 0.242032;0.520807;, + 0.139658;0.459591;, + 0.159891;0.459383;, + 0.180230;0.459156;, + 0.200735;0.479456;, + 0.221318;0.479327;, + 0.242049;0.500000;, + 0.139593;0.439381;, + 0.159819;0.439070;, + 0.180153;0.438730;, + 0.200686;0.458911;, + 0.221267;0.458653;, + 0.242032;0.479193;, + 0.139500;0.419164;, + 0.159716;0.418752;, + 0.180042;0.418300;, + 0.200604;0.438365;, + 0.221182;0.437979;, + 0.241980;0.458386;, + 0.139377;0.398938;, + 0.159581;0.398426;, + 0.179896;0.397865;, + 0.200487;0.417815;, + 0.221061;0.417304;, + 0.241893;0.437579;, + 0.139222;0.378701;, + 0.159409;0.378091;, + 0.179710;0.377423;, + 0.200332;0.397263;, + 0.220899;0.396627;, + 0.241769;0.416773;, + 0.139029;0.358451;, + 0.159196;0.357746;, + 0.179481;0.356973;, + 0.200136;0.376706;, + 0.220695;0.375949;, + 0.241604;0.395968;, + 0.138795;0.338185;, + 0.158938;0.337388;, + 0.179202;0.336514;, + 0.199893;0.356144;, + 0.220442;0.355269;, + 0.241395;0.375165;, + 0.138514;0.317903;, + 0.158627;0.317016;, + 0.178865;0.316045;, + 0.199597;0.335576;, + 0.220134;0.334587;, + 0.241136;0.354362;, + 0.138176;0.297601;, + 0.158253;0.296630;, + 0.178461;0.295565;, + 0.199240;0.315003;, + 0.219763;0.313904;, + 0.240821;0.333563;, + 0.137770;0.277279;, + 0.157805;0.276227;, + 0.177975;0.275074;, + 0.198811;0.294423;, + 0.219316;0.293219;, + 0.240441;0.312765;, + 0.137282;0.256935;, + 0.157264;0.255806;, + 0.177390;0.254570;, + 0.198296;0.273836;, + 0.218778;0.272532;, + 0.239983;0.291971;, + 0.136691;0.236568;, + 0.156610;0.235368;, + 0.176681;0.234055;, + 0.197674;0.253243;, + 0.218129;0.251845;, + 0.239431;0.271181;, + 0.135969;0.216178;, + 0.155809;0.214913;, + 0.175812;0.213528;, + 0.196919;0.232644;, + 0.217340;0.231158;, + 0.238765;0.250397;, + 0.135076;0.195763;, + 0.154818;0.194440;, + 0.174735;0.192990;, + 0.195994;0.212041;, + 0.216372;0.210474;, + 0.237954;0.229619;, + 0.133953;0.175325;, + 0.153569;0.173951;, + 0.173375;0.172445;, + 0.194845;0.191434;, + 0.215167;0.189794;, + 0.236957;0.208850;, + 0.132509;0.154866;, + 0.151961;0.153450;, + 0.171620;0.151896;, + 0.193392;0.170828;, + 0.213640;0.169122;, + 0.235715;0.188094;, + 0.130598;0.134391;, + 0.149825;0.132942;, + 0.169283;0.131351;, + 0.191511;0.150227;, + 0.211659;0.148465;, + 0.234137;0.167353;, + 0.189000;0.129641;, + 0.209004;0.127833;, + 0.232084;0.146637;, + 0.254899;0.165550;, + 0.256502;0.186361;, + 0.229323;0.125955;, + 0.252805;0.144771;, + 0.275936;0.163742;, + 0.277538;0.184626;, + 0.278794;0.205540;, + 0.257762;0.207196;, + 0.249979;0.124036;, + 0.273839;0.142899;, + 0.297258;0.161963;, + 0.298828;0.182918;, + 0.300057;0.203911;, + 0.270995;0.122107;, + 0.295194;0.141054;, + 0.318865;0.160245;, + 0.320373;0.181271;, + 0.321549;0.202340;, + 0.292385;0.120203;, + 0.316877;0.139271;, + 0.340753;0.158623;, + 0.342167;0.179716;, + 0.343267;0.200859;, + 0.314159;0.118360;, + 0.338885;0.137586;, + 0.362913;0.157131;, + 0.364200;0.178288;, + 0.365199;0.199498;, + 0.336319;0.116615;, + 0.361207;0.136034;, + 0.385325;0.155803;, + 0.386454;0.177017;, + 0.387329;0.198287;, + 0.408906;0.175932;, + 0.409635;0.197254;, + 0.410211;0.218632;, + 0.388022;0.219610;, + 0.365992;0.220756;, + 0.432089;0.196423;, + 0.432535;0.217845;, + 0.432894;0.239322;, + 0.410675;0.240062;, + 0.388580;0.240982;, + 0.454963;0.217269;, + 0.455207;0.238780;, + 0.455406;0.260346;, + 0.433185;0.260851;, + 0.411053;0.261541;, + 0.477587;0.238450;, + 0.477688;0.260038;, + 0.477770;0.281677;, + 0.455569;0.281962;, + 0.433425;0.282429;, + 0.500000;0.259934;, + 0.500000;0.281581;, + 0.500000;0.303277;, + 0.477838;0.303364;, + 0.455704;0.303625;, + 0.522312;0.260038;, + 0.522230;0.281677;, + 0.522162;0.303364;, + 0.500000;0.325017;, + 0.477894;0.325096;, + 0.544594;0.260346;, + 0.544431;0.281962;, + 0.544296;0.303625;, + 0.522106;0.325096;, + 0.500000;0.346798;, + 0.566815;0.260851;, + 0.566575;0.282429;, + 0.566377;0.304051;, + 0.544185;0.325331;, + 0.522059;0.346868;, + 0.588947;0.261541;, + 0.588636;0.283066;, + 0.588380;0.304633;, + 0.566214;0.325715;, + 0.544094;0.347076;, + 0.610965;0.262399;, + 0.610591;0.283859;, + 0.610282;0.305358;, + 0.588168;0.326240;, + 0.566079;0.347416;, + 0.632847;0.263405;, + 0.632418;0.284788;, + 0.632063;0.306206;, + 0.610026;0.326892;, + 0.587993;0.347881;, + 0.654576;0.264536;, + 0.654101;0.285833;, + 0.653708;0.307160;, + 0.631770;0.327657;, + 0.609816;0.348458;, + 0.676137;0.265767;, + 0.675627;0.286970;, + 0.675204;0.308199;, + 0.653383;0.328516;, + 0.631528;0.349135;, + 0.697521;0.267073;, + 0.696985;0.288177;, + 0.696541;0.309301;, + 0.674854;0.329452;, + 0.653115;0.349896;, + 0.718721;0.268428;, + 0.718170;0.289428;, + 0.717713;0.310444;, + 0.696173;0.330444;, + 0.674565;0.350725;, + 0.739737;0.269805;, + 0.739181;0.290700;, + 0.738719;0.311605;, + 0.717334;0.331473;, + 0.695868;0.351603;, + 0.760569;0.271181;, + 0.760017;0.291971;, + 0.759559;0.312765;, + 0.738336;0.332518;, + 0.717021;0.352513;, + 0.781222;0.272532;, + 0.780684;0.293219;, + 0.780237;0.313904;, + 0.759179;0.333563;, + 0.738019;0.353439;, + 0.779866;0.334587;, + 0.758864;0.354362;, + 0.737759;0.374365;, + 0.716764;0.373564;, + 0.695619;0.372776;, + 0.779558;0.355269;, + 0.758605;0.375165;, + 0.737549;0.395297;, + 0.716556;0.394624;, + 0.695418;0.393961;, + 0.779305;0.375949;, + 0.758396;0.395968;, + 0.737383;0.416232;, + 0.716392;0.415690;, + 0.695259;0.415157;, + 0.779101;0.396627;, + 0.758231;0.416773;, + 0.737258;0.437171;, + 0.716269;0.436763;, + 0.695139;0.436360;, + 0.778939;0.417304;, + 0.758107;0.437579;, + 0.737170;0.458113;, + 0.716182;0.457839;, + 0.695056;0.457570;, + 0.778818;0.437979;, + 0.758020;0.458386;, + 0.737119;0.479056;, + 0.716131;0.478919;, + 0.695006;0.478784;, + 0.778733;0.458653;, + 0.757968;0.479193;, + 0.737102;0.500000;, + 0.716115;0.500000;, + 0.694990;0.500000;, + 0.778682;0.479327;, + 0.757951;0.500000;, + 0.737119;0.520944;, + 0.716131;0.521081;, + 0.695006;0.521216;, + 0.778665;0.500000;, + 0.757968;0.520807;, + 0.737170;0.541887;, + 0.716182;0.542161;, + 0.695056;0.542430;, + 0.778682;0.520673;, + 0.758020;0.541614;, + 0.737258;0.562829;, + 0.716269;0.563237;, + 0.695139;0.563639;, + 0.778733;0.541347;, + 0.758107;0.562421;, + 0.737383;0.583768;, + 0.716392;0.584310;, + 0.695259;0.584843;, + 0.778818;0.562021;, + 0.758231;0.583227;, + 0.737549;0.604703;, + 0.716556;0.605376;, + 0.695418;0.606039;, + 0.778939;0.582696;, + 0.758396;0.604032;, + 0.737759;0.625635;, + 0.716764;0.626436;, + 0.695619;0.627224;, + 0.779101;0.603373;, + 0.758605;0.624836;, + 0.738019;0.646561;, + 0.717021;0.647487;, + 0.695868;0.648397;, + 0.779305;0.624051;, + 0.758864;0.645638;, + 0.738336;0.667482;, + 0.717334;0.668528;, + 0.696173;0.669556;, + 0.779558;0.644731;, + 0.759179;0.666437;, + 0.738719;0.688395;, + 0.717713;0.689556;, + 0.696541;0.690699;, + 0.779866;0.665413;, + 0.759559;0.687235;, + 0.739181;0.709299;, + 0.718170;0.710572;, + 0.696985;0.711823;, + 0.780237;0.686096;, + 0.760017;0.708029;, + 0.739737;0.730195;, + 0.718721;0.731572;, + 0.697521;0.732927;, + 0.780684;0.706781;, + 0.760569;0.728819;, + 0.740410;0.751078;, + 0.719389;0.752555;, + 0.698170;0.754008;, + 0.781222;0.727468;, + 0.761235;0.749603;, + 0.781871;0.748155;, + 0.676757;0.755408;, + 0.676137;0.734233;, + 0.675627;0.713030;, + 0.655153;0.756728;, + 0.654576;0.735464;, + 0.654101;0.714167;, + 0.675204;0.691801;, + 0.674854;0.670548;, + 0.633369;0.757940;, + 0.632847;0.736595;, + 0.632418;0.715212;, + 0.653708;0.692839;, + 0.653383;0.671484;, + 0.674565;0.649275;, + 0.611420;0.759018;, + 0.610965;0.737601;, + 0.610591;0.716141;, + 0.632063;0.693794;, + 0.631770;0.672343;, + 0.653115;0.650104;, + 0.589325;0.759938;, + 0.588947;0.738459;, + 0.588636;0.716934;, + 0.610282;0.694642;, + 0.610026;0.673108;, + 0.631528;0.650865;, + 0.567106;0.760678;, + 0.566815;0.739149;, + 0.566575;0.717571;, + 0.588380;0.695367;, + 0.588168;0.673760;, + 0.609816;0.651542;, + 0.545037;0.782731;, + 0.544793;0.761220;, + 0.544594;0.739654;, + 0.544431;0.718038;, + 0.566377;0.695949;, + 0.522537;0.783083;, + 0.522413;0.761550;, + 0.522312;0.739962;, + 0.522230;0.718323;, + 0.544296;0.696375;, + 0.566214;0.674285;, + 0.500000;0.804682;, + 0.500000;0.783201;, + 0.500000;0.761661;, + 0.500000;0.740066;, + 0.500000;0.718419;, + 0.522162;0.696636;, + 0.477463;0.783083;, + 0.477587;0.761550;, + 0.477688;0.739962;, + 0.477770;0.718323;, + 0.477838;0.696636;, + 0.500000;0.696723;, + 0.454963;0.782731;, + 0.455207;0.761220;, + 0.455406;0.739654;, + 0.455569;0.718038;, + 0.455704;0.696375;, + 0.432535;0.782155;, + 0.432894;0.760678;, + 0.433185;0.739149;, + 0.433425;0.717571;, + 0.433623;0.695949;, + 0.410211;0.781368;, + 0.410675;0.759938;, + 0.411053;0.738459;, + 0.411364;0.716934;, + 0.411620;0.695367;, + 0.388022;0.780390;, + 0.388580;0.759018;, + 0.389035;0.737601;, + 0.389409;0.716141;, + 0.389718;0.694642;, + 0.365992;0.779244;, + 0.366631;0.757940;, + 0.367153;0.736595;, + 0.367582;0.715212;, + 0.367937;0.693794;, + 0.344141;0.777955;, + 0.344847;0.756728;, + 0.345424;0.735464;, + 0.345899;0.714167;, + 0.346292;0.692839;, + 0.322486;0.776551;, + 0.323243;0.755408;, + 0.323863;0.734233;, + 0.324373;0.713030;, + 0.324796;0.691801;, + 0.301036;0.775063;, + 0.301830;0.754008;, + 0.302479;0.732927;, + 0.303015;0.711823;, + 0.303459;0.690699;, + 0.279797;0.773519;, + 0.280611;0.752555;, + 0.281279;0.731572;, + 0.281830;0.710572;, + 0.282287;0.689556;, + 0.258771;0.771949;, + 0.259590;0.751078;, + 0.260263;0.730195;, + 0.260819;0.709299;, + 0.261281;0.688395;, + 0.261664;0.667482;, + 0.282666;0.668528;, + 0.303827;0.669556;, + 0.261981;0.646561;, + 0.282979;0.647487;, + 0.304132;0.648397;, + 0.325146;0.670548;, + 0.346617;0.671484;, + 0.262241;0.625635;, + 0.283236;0.626436;, + 0.304381;0.627224;, + 0.325435;0.649275;, + 0.346885;0.650104;, + 0.368230;0.672343;, + 0.262451;0.604703;, + 0.283444;0.605376;, + 0.304582;0.606039;, + 0.325672;0.627984;, + 0.347105;0.628701;, + 0.368472;0.650865;, + 0.262617;0.583768;, + 0.283608;0.584310;, + 0.304741;0.584843;, + 0.325864;0.606678;, + 0.347282;0.607280;, + 0.368670;0.629360;, + 0.262742;0.562829;, + 0.283731;0.563237;, + 0.304861;0.563639;, + 0.326014;0.585358;, + 0.347422;0.585843;, + 0.368830;0.607834;, + 0.262830;0.541887;, + 0.283818;0.542161;, + 0.304944;0.542430;, + 0.326128;0.564028;, + 0.347527;0.564394;, + 0.368956;0.586290;, + 0.262881;0.520944;, + 0.283869;0.521081;, + 0.304994;0.521216;, + 0.326207;0.542689;, + 0.347601;0.542935;, + 0.369051;0.564730;, + 0.262898;0.500000;, + 0.283886;0.500000;, + 0.305010;0.500000;, + 0.326254;0.521346;, + 0.347644;0.521469;, + 0.369117;0.543160;, + 0.262881;0.479056;, + 0.283869;0.478919;, + 0.304994;0.478784;, + 0.326270;0.500000;, + 0.347659;0.500000;, + 0.369156;0.521582;, + 0.262830;0.458113;, + 0.283818;0.457839;, + 0.304944;0.457570;, + 0.326254;0.478654;, + 0.347644;0.478531;, + 0.369169;0.500000;, + 0.262742;0.437171;, + 0.283731;0.436763;, + 0.304861;0.436360;, + 0.326207;0.457311;, + 0.347601;0.457065;, + 0.369156;0.478418;, + 0.262617;0.416232;, + 0.283608;0.415690;, + 0.304741;0.415157;, + 0.326128;0.435972;, + 0.347527;0.435606;, + 0.369117;0.456840;, + 0.262451;0.395297;, + 0.283444;0.394624;, + 0.304582;0.393961;, + 0.326014;0.414642;, + 0.347422;0.414157;, + 0.369051;0.435270;, + 0.262241;0.374365;, + 0.283236;0.373564;, + 0.304381;0.372776;, + 0.325864;0.393322;, + 0.347282;0.392720;, + 0.368956;0.413710;, + 0.261981;0.353439;, + 0.282979;0.352513;, + 0.304132;0.351603;, + 0.325672;0.372016;, + 0.347105;0.371299;, + 0.368830;0.392166;, + 0.261664;0.332518;, + 0.282666;0.331473;, + 0.303827;0.330444;, + 0.325435;0.350725;, + 0.346885;0.349896;, + 0.368670;0.370640;, + 0.261281;0.311605;, + 0.282287;0.310444;, + 0.303459;0.309301;, + 0.325146;0.329452;, + 0.346617;0.328516;, + 0.368472;0.349135;, + 0.260819;0.290700;, + 0.281830;0.289428;, + 0.303015;0.288177;, + 0.324796;0.308199;, + 0.346292;0.307160;, + 0.368230;0.327657;, + 0.260263;0.269805;, + 0.281279;0.268428;, + 0.302479;0.267073;, + 0.324373;0.286970;, + 0.345899;0.285833;, + 0.367937;0.306206;, + 0.259590;0.248922;, + 0.280611;0.247445;, + 0.301830;0.245992;, + 0.323863;0.265767;, + 0.345424;0.264536;, + 0.367582;0.284788;, + 0.258771;0.228051;, + 0.279797;0.226481;, + 0.301036;0.224937;, + 0.323243;0.244592;, + 0.344847;0.243272;, + 0.367153;0.263405;, + 0.322486;0.223449;, + 0.344141;0.222045;, + 0.366631;0.242060;, + 0.389035;0.262399;, + 0.389409;0.283859;, + 0.411364;0.283066;, + 0.411620;0.304633;, + 0.389718;0.305358;, + 0.389974;0.326892;, + 0.433623;0.304051;, + 0.433786;0.325715;, + 0.411832;0.326240;, + 0.412007;0.347881;, + 0.390184;0.348458;, + 0.455815;0.325331;, + 0.455906;0.347076;, + 0.433921;0.347416;, + 0.434031;0.369151;, + 0.412149;0.369553;, + 0.390357;0.370053;, + 0.477941;0.346868;, + 0.477979;0.368676;, + 0.455981;0.368856;, + 0.456042;0.390666;, + 0.434120;0.390914;, + 0.412265;0.391252;, + 0.500000;0.368615;, + 0.500000;0.390464;, + 0.478009;0.390515;, + 0.478033;0.412380;, + 0.456089;0.412502;, + 0.434189;0.412701;, + 0.522021;0.368676;, + 0.521991;0.390515;, + 0.500000;0.412339;, + 0.500000;0.434235;, + 0.478051;0.434266;, + 0.456125;0.434358;, + 0.544019;0.368856;, + 0.543958;0.390666;, + 0.521967;0.412380;, + 0.521949;0.434266;, + 0.500000;0.456148;, + 0.478064;0.456168;, + 0.565969;0.369151;, + 0.565880;0.390914;, + 0.543911;0.412502;, + 0.543875;0.434358;, + 0.521936;0.456168;, + 0.500000;0.478071;, + 0.587851;0.369553;, + 0.587735;0.391252;, + 0.565811;0.412701;, + 0.565758;0.434509;, + 0.543850;0.456230;, + 0.521929;0.478081;, + 0.609643;0.370053;, + 0.609504;0.391673;, + 0.587645;0.412974;, + 0.587577;0.434714;, + 0.565721;0.456331;, + 0.543836;0.478112;, + 0.631330;0.370640;, + 0.631170;0.392166;, + 0.609395;0.413313;, + 0.609312;0.434970;, + 0.587529;0.456469;, + 0.565700;0.478163;, + 0.652895;0.371299;, + 0.652718;0.392720;, + 0.631044;0.413710;, + 0.630949;0.435270;, + 0.609255;0.456640;, + 0.587501;0.478232;, + 0.674328;0.372016;, + 0.674136;0.393322;, + 0.652578;0.414157;, + 0.652473;0.435606;, + 0.630883;0.456840;, + 0.609221;0.478318;, + 0.673986;0.414642;, + 0.673872;0.435972;, + 0.652399;0.457065;, + 0.630844;0.478418;, + 0.609209;0.500000;, + 0.587491;0.500000;, + 0.673793;0.457311;, + 0.652356;0.478531;, + 0.630831;0.500000;, + 0.609221;0.521682;, + 0.587501;0.521768;, + 0.673746;0.478654;, + 0.652341;0.500000;, + 0.630844;0.521582;, + 0.609255;0.543360;, + 0.587529;0.543531;, + 0.673730;0.500000;, + 0.652356;0.521469;, + 0.630883;0.543160;, + 0.609312;0.565030;, + 0.587577;0.565286;, + 0.673746;0.521346;, + 0.652399;0.542935;, + 0.630949;0.564730;, + 0.609395;0.586687;, + 0.587645;0.587026;, + 0.673793;0.542689;, + 0.652473;0.564394;, + 0.631044;0.586290;, + 0.609504;0.608327;, + 0.587735;0.608748;, + 0.673872;0.564028;, + 0.652578;0.585843;, + 0.631170;0.607834;, + 0.609643;0.629947;, + 0.587851;0.630447;, + 0.673986;0.585358;, + 0.652718;0.607280;, + 0.631330;0.629360;, + 0.587993;0.652119;, + 0.674136;0.606678;, + 0.652895;0.628701;, + 0.674328;0.627984;, + 0.566079;0.652584;, + 0.565969;0.630849;, + 0.565880;0.609086;, + 0.544185;0.674669;, + 0.544094;0.652924;, + 0.544019;0.631144;, + 0.543958;0.609334;, + 0.565811;0.587299;, + 0.522106;0.674904;, + 0.522059;0.653132;, + 0.522021;0.631324;, + 0.521991;0.609485;, + 0.543911;0.587498;, + 0.565758;0.565491;, + 0.500000;0.674983;, + 0.500000;0.653202;, + 0.500000;0.631385;, + 0.500000;0.609536;, + 0.521967;0.587620;, + 0.543875;0.565642;, + 0.477894;0.674904;, + 0.477941;0.653132;, + 0.477979;0.631324;, + 0.478009;0.609485;, + 0.478033;0.587620;, + 0.500000;0.587661;, + 0.455815;0.674669;, + 0.455906;0.652924;, + 0.455981;0.631144;, + 0.456042;0.609334;, + 0.456089;0.587498;, + 0.433786;0.674285;, + 0.433921;0.652584;, + 0.434031;0.630849;, + 0.434120;0.609086;, + 0.434189;0.587299;, + 0.411832;0.673760;, + 0.412007;0.652119;, + 0.412149;0.630447;, + 0.412265;0.608748;, + 0.412355;0.587026;, + 0.389974;0.673108;, + 0.390184;0.651542;, + 0.390357;0.629947;, + 0.390496;0.608327;, + 0.390605;0.586687;, + 0.390688;0.565030;, + 0.412423;0.565286;, + 0.434242;0.565491;, + 0.390745;0.543360;, + 0.412471;0.543531;, + 0.434279;0.543669;, + 0.456125;0.565642;, + 0.478051;0.565734;, + 0.390779;0.521682;, + 0.412499;0.521768;, + 0.434300;0.521837;, + 0.456150;0.543770;, + 0.478064;0.543832;, + 0.500000;0.565765;, + 0.390791;0.500000;, + 0.412509;0.500000;, + 0.434308;0.500000;, + 0.456164;0.521888;, + 0.478071;0.521919;, + 0.500000;0.543852;, + 0.390779;0.478318;, + 0.412499;0.478232;, + 0.434300;0.478163;, + 0.456169;0.500000;, + 0.478074;0.500000;, + 0.500000;0.521929;, + 0.390745;0.456640;, + 0.412471;0.456469;, + 0.434279;0.456331;, + 0.456164;0.478112;, + 0.478071;0.478081;, + 0.500000;0.500000;, + 0.390688;0.434970;, + 0.412423;0.434714;, + 0.434242;0.434509;, + 0.456150;0.456230;, + 0.390605;0.413313;, + 0.412355;0.412974;, + 0.390496;0.391673;, + 0.521926;0.500000;, + 0.521929;0.521919;, + 0.521936;0.543832;, + 0.543831;0.500000;, + 0.543836;0.521888;, + 0.543850;0.543770;, + 0.521949;0.565734;, + 0.565692;0.500000;, + 0.565700;0.521837;, + 0.565721;0.543669;; + } + + MeshMaterialList { + 1; + 4512; + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0; + + Material { + 1.000000;1.000000;1.000000;1.000000;; + 51.200000; + 0.000000;0.000000;0.000000;; + 0.000000;0.000000;0.000000;; + + TextureFilename { + "earth.jpg"; + } + } + } + } + } +} + +AnimationSet AnimationSet_sphere { + + + Animation { + + + AnimationKey { + 0; + 61; + 0;4;1.000000,0.000000,0.000000,0.000000;;, + 1;4;1.000000,0.000000,0.000000,0.000000;;, + 2;4;1.000000,0.000000,0.000000,0.000000;;, + 3;4;1.000000,0.000000,0.000000,0.000000;;, + 4;4;1.000000,0.000000,0.000000,0.000000;;, + 5;4;1.000000,0.000000,0.000000,0.000000;;, + 6;4;1.000000,0.000000,0.000000,0.000000;;, + 7;4;1.000000,0.000000,0.000000,0.000000;;, + 8;4;1.000000,0.000000,0.000000,0.000000;;, + 9;4;1.000000,0.000000,0.000000,0.000000;;, + 10;4;1.000000,0.000000,0.000000,0.000000;;, + 11;4;1.000000,0.000000,0.000000,0.000000;;, + 12;4;1.000000,0.000000,0.000000,0.000000;;, + 13;4;1.000000,0.000000,0.000000,0.000000;;, + 14;4;1.000000,0.000000,0.000000,0.000000;;, + 15;4;1.000000,0.000000,0.000000,0.000000;;, + 16;4;1.000000,0.000000,0.000000,0.000000;;, + 17;4;1.000000,0.000000,0.000000,0.000000;;, + 18;4;1.000000,0.000000,0.000000,0.000000;;, + 19;4;1.000000,0.000000,0.000000,0.000000;;, + 20;4;1.000000,0.000000,0.000000,0.000000;;, + 21;4;1.000000,0.000000,0.000000,0.000000;;, + 22;4;1.000000,0.000000,0.000000,0.000000;;, + 23;4;1.000000,0.000000,0.000000,0.000000;;, + 24;4;1.000000,0.000000,0.000000,0.000000;;, + 25;4;1.000000,0.000000,0.000000,0.000000;;, + 26;4;1.000000,0.000000,0.000000,0.000000;;, + 27;4;1.000000,0.000000,0.000000,0.000000;;, + 28;4;1.000000,0.000000,0.000000,0.000000;;, + 29;4;1.000000,0.000000,0.000000,0.000000;;, + 30;4;1.000000,0.000000,0.000000,0.000000;;, + 31;4;1.000000,0.000000,0.000000,0.000000;;, + 32;4;1.000000,0.000000,0.000000,0.000000;;, + 33;4;1.000000,0.000000,0.000000,0.000000;;, + 34;4;1.000000,0.000000,0.000000,0.000000;;, + 35;4;1.000000,0.000000,0.000000,0.000000;;, + 36;4;1.000000,0.000000,0.000000,0.000000;;, + 37;4;1.000000,0.000000,0.000000,0.000000;;, + 38;4;1.000000,0.000000,0.000000,0.000000;;, + 39;4;1.000000,0.000000,0.000000,0.000000;;, + 40;4;1.000000,0.000000,0.000000,0.000000;;, + 41;4;1.000000,0.000000,0.000000,0.000000;;, + 42;4;1.000000,0.000000,0.000000,0.000000;;, + 43;4;1.000000,0.000000,0.000000,0.000000;;, + 44;4;1.000000,0.000000,0.000000,0.000000;;, + 45;4;1.000000,0.000000,0.000000,0.000000;;, + 46;4;1.000000,0.000000,0.000000,0.000000;;, + 47;4;1.000000,0.000000,0.000000,0.000000;;, + 48;4;1.000000,0.000000,0.000000,0.000000;;, + 49;4;1.000000,0.000000,0.000000,0.000000;;, + 50;4;1.000000,0.000000,0.000000,0.000000;;, + 51;4;1.000000,0.000000,0.000000,0.000000;;, + 52;4;1.000000,0.000000,0.000000,0.000000;;, + 53;4;1.000000,0.000000,0.000000,0.000000;;, + 54;4;1.000000,0.000000,0.000000,0.000000;;, + 55;4;1.000000,0.000000,0.000000,0.000000;;, + 56;4;1.000000,0.000000,0.000000,0.000000;;, + 57;4;1.000000,0.000000,0.000000,0.000000;;, + 58;4;1.000000,0.000000,0.000000,0.000000;;, + 59;4;1.000000,0.000000,0.000000,0.000000;;, + 60;4;1.000000,0.000000,0.000000,0.000000;;; + } + + AnimationKey { + 1; + 61; + 0;3;1.000000,1.000000,1.000000;;, + 1;3;1.000000,1.000000,1.000000;;, + 2;3;1.000000,1.000000,1.000000;;, + 3;3;1.000000,1.000000,1.000000;;, + 4;3;1.000000,1.000000,1.000000;;, + 5;3;1.000000,1.000000,1.000000;;, + 6;3;1.000000,1.000000,1.000000;;, + 7;3;1.000000,1.000000,1.000000;;, + 8;3;1.000000,1.000000,1.000000;;, + 9;3;1.000000,1.000000,1.000000;;, + 10;3;1.000000,1.000000,1.000000;;, + 11;3;1.000000,1.000000,1.000000;;, + 12;3;1.000000,1.000000,1.000000;;, + 13;3;1.000000,1.000000,1.000000;;, + 14;3;1.000000,1.000000,1.000000;;, + 15;3;1.000000,1.000000,1.000000;;, + 16;3;1.000000,1.000000,1.000000;;, + 17;3;1.000000,1.000000,1.000000;;, + 18;3;1.000000,1.000000,1.000000;;, + 19;3;1.000000,1.000000,1.000000;;, + 20;3;1.000000,1.000000,1.000000;;, + 21;3;1.000000,1.000000,1.000000;;, + 22;3;1.000000,1.000000,1.000000;;, + 23;3;1.000000,1.000000,1.000000;;, + 24;3;1.000000,1.000000,1.000000;;, + 25;3;1.000000,1.000000,1.000000;;, + 26;3;1.000000,1.000000,1.000000;;, + 27;3;1.000000,1.000000,1.000000;;, + 28;3;1.000000,1.000000,1.000000;;, + 29;3;1.000000,1.000000,1.000000;;, + 30;3;1.000000,1.000000,1.000000;;, + 31;3;1.000000,1.000000,1.000000;;, + 32;3;1.000000,1.000000,1.000000;;, + 33;3;1.000000,1.000000,1.000000;;, + 34;3;1.000000,1.000000,1.000000;;, + 35;3;1.000000,1.000000,1.000000;;, + 36;3;1.000000,1.000000,1.000000;;, + 37;3;1.000000,1.000000,1.000000;;, + 38;3;1.000000,1.000000,1.000000;;, + 39;3;1.000000,1.000000,1.000000;;, + 40;3;1.000000,1.000000,1.000000;;, + 41;3;1.000000,1.000000,1.000000;;, + 42;3;1.000000,1.000000,1.000000;;, + 43;3;1.000000,1.000000,1.000000;;, + 44;3;1.000000,1.000000,1.000000;;, + 45;3;1.000000,1.000000,1.000000;;, + 46;3;1.000000,1.000000,1.000000;;, + 47;3;1.000000,1.000000,1.000000;;, + 48;3;1.000000,1.000000,1.000000;;, + 49;3;1.000000,1.000000,1.000000;;, + 50;3;1.000000,1.000000,1.000000;;, + 51;3;1.000000,1.000000,1.000000;;, + 52;3;1.000000,1.000000,1.000000;;, + 53;3;1.000000,1.000000,1.000000;;, + 54;3;1.000000,1.000000,1.000000;;, + 55;3;1.000000,1.000000,1.000000;;, + 56;3;1.000000,1.000000,1.000000;;, + 57;3;1.000000,1.000000,1.000000;;, + 58;3;1.000000,1.000000,1.000000;;, + 59;3;1.000000,1.000000,1.000000;;, + 60;3;1.000000,1.000000,1.000000;;; + } + + AnimationKey { + 2; + 61; + 0;3;0.000000,0.000000,0.000000;;, + 1;3;0.000000,0.000000,0.000000;;, + 2;3;0.000000,0.000000,0.000000;;, + 3;3;0.000000,0.000000,0.000000;;, + 4;3;0.000000,0.000000,0.000000;;, + 5;3;0.000000,0.000000,0.000000;;, + 6;3;0.000000,0.000000,0.000000;;, + 7;3;0.000000,0.000000,0.000000;;, + 8;3;0.000000,0.000000,0.000000;;, + 9;3;0.000000,0.000000,0.000000;;, + 10;3;0.000000,0.000000,0.000000;;, + 11;3;0.000000,0.000000,0.000000;;, + 12;3;0.000000,0.000000,0.000000;;, + 13;3;0.000000,0.000000,0.000000;;, + 14;3;0.000000,0.000000,0.000000;;, + 15;3;0.000000,0.000000,0.000000;;, + 16;3;0.000000,0.000000,0.000000;;, + 17;3;0.000000,0.000000,0.000000;;, + 18;3;0.000000,0.000000,0.000000;;, + 19;3;0.000000,0.000000,0.000000;;, + 20;3;0.000000,0.000000,0.000000;;, + 21;3;0.000000,0.000000,0.000000;;, + 22;3;0.000000,0.000000,0.000000;;, + 23;3;0.000000,0.000000,0.000000;;, + 24;3;0.000000,0.000000,0.000000;;, + 25;3;0.000000,0.000000,0.000000;;, + 26;3;0.000000,0.000000,0.000000;;, + 27;3;0.000000,0.000000,0.000000;;, + 28;3;0.000000,0.000000,0.000000;;, + 29;3;0.000000,0.000000,0.000000;;, + 30;3;0.000000,0.000000,0.000000;;, + 31;3;0.000000,0.000000,0.000000;;, + 32;3;0.000000,0.000000,0.000000;;, + 33;3;0.000000,0.000000,0.000000;;, + 34;3;0.000000,0.000000,0.000000;;, + 35;3;0.000000,0.000000,0.000000;;, + 36;3;0.000000,0.000000,0.000000;;, + 37;3;0.000000,0.000000,0.000000;;, + 38;3;0.000000,0.000000,0.000000;;, + 39;3;0.000000,0.000000,0.000000;;, + 40;3;0.000000,0.000000,0.000000;;, + 41;3;0.000000,0.000000,0.000000;;, + 42;3;0.000000,0.000000,0.000000;;, + 43;3;0.000000,0.000000,0.000000;;, + 44;3;0.000000,0.000000,0.000000;;, + 45;3;0.000000,0.000000,0.000000;;, + 46;3;0.000000,0.000000,0.000000;;, + 47;3;0.000000,0.000000,0.000000;;, + 48;3;0.000000,0.000000,0.000000;;, + 49;3;0.000000,0.000000,0.000000;;, + 50;3;0.000000,0.000000,0.000000;;, + 51;3;0.000000,0.000000,0.000000;;, + 52;3;0.000000,0.000000,0.000000;;, + 53;3;0.000000,0.000000,0.000000;;, + 54;3;0.000000,0.000000,0.000000;;, + 55;3;0.000000,0.000000,0.000000;;, + 56;3;0.000000,0.000000,0.000000;;, + 57;3;0.000000,0.000000,0.000000;;, + 58;3;0.000000,0.000000,0.000000;;, + 59;3;0.000000,0.000000,0.000000;;, + 60;3;0.000000,0.000000,0.000000;;; + } + { Frame1_sphere_lwo_layer1 } + } +} diff --git a/src/others/irrlicht-1.8.1/media/earthbump.jpg b/src/others/irrlicht-1.8.1/media/earthbump.jpg new file mode 100644 index 0000000..feb5ae4 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/earthbump.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/enano.jpg b/src/others/irrlicht-1.8.1/media/enano.jpg new file mode 100644 index 0000000..b749eb9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/enano.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/example.irr b/src/others/irrlicht-1.8.1/media/example.irr new file mode 100644 index 0000000..4035bd5 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/example.irr differ diff --git a/src/others/irrlicht-1.8.1/media/faerie.md2 b/src/others/irrlicht-1.8.1/media/faerie.md2 new file mode 100644 index 0000000..74ce5a8 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/faerie.md2 differ diff --git a/src/others/irrlicht-1.8.1/media/faerie2.bmp b/src/others/irrlicht-1.8.1/media/faerie2.bmp new file mode 100644 index 0000000..56a486a Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/faerie2.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/fire.bmp b/src/others/irrlicht-1.8.1/media/fire.bmp new file mode 100644 index 0000000..c33be5c Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/fire.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/fireball.bmp b/src/others/irrlicht-1.8.1/media/fireball.bmp new file mode 100644 index 0000000..f14bdc1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/fireball.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/fontcourier.bmp b/src/others/irrlicht-1.8.1/media/fontcourier.bmp new file mode 100644 index 0000000..e6dae7e Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/fontcourier.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/fonthaettenschweiler.bmp b/src/others/irrlicht-1.8.1/media/fonthaettenschweiler.bmp new file mode 100644 index 0000000..ca301da Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/fonthaettenschweiler.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/fontlucida.png b/src/others/irrlicht-1.8.1/media/fontlucida.png new file mode 100644 index 0000000..b81ec9f Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/fontlucida.png differ diff --git a/src/others/irrlicht-1.8.1/media/gun.jpg b/src/others/irrlicht-1.8.1/media/gun.jpg new file mode 100644 index 0000000..0e95498 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/gun.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/gun.md2 b/src/others/irrlicht-1.8.1/media/gun.md2 new file mode 100644 index 0000000..082d07c Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/gun.md2 differ diff --git a/src/others/irrlicht-1.8.1/media/help.png b/src/others/irrlicht-1.8.1/media/help.png new file mode 100644 index 0000000..f0b909a Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/help.png differ diff --git a/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw1.png b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw1.png new file mode 100644 index 0000000..314bb0f Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw1.png differ diff --git a/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw2.png b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw2.png new file mode 100644 index 0000000..7aca071 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw2.png differ diff --git a/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw3.png b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw3.png new file mode 100644 index 0000000..0f82a88 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16bw3.png differ diff --git a/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16col.png b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16col.png new file mode 100644 index 0000000..335ee10 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/icon_crosshairs16x16col.png differ diff --git a/src/others/irrlicht-1.8.1/media/iconlist.png b/src/others/irrlicht-1.8.1/media/iconlist.png new file mode 100644 index 0000000..e22ce8b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/iconlist.png differ diff --git a/src/others/irrlicht-1.8.1/media/impact.wav b/src/others/irrlicht-1.8.1/media/impact.wav new file mode 100644 index 0000000..3639617 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/impact.wav differ diff --git a/src/others/irrlicht-1.8.1/media/irr.ico b/src/others/irrlicht-1.8.1/media/irr.ico new file mode 100644 index 0000000..49f8eab Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irr.ico differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht.dat b/src/others/irrlicht-1.8.1/media/irrlicht.dat new file mode 100644 index 0000000..30178bd Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht.dat differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht2_bk.jpg b/src/others/irrlicht-1.8.1/media/irrlicht2_bk.jpg new file mode 100644 index 0000000..509446b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht2_bk.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht2_dn.jpg b/src/others/irrlicht-1.8.1/media/irrlicht2_dn.jpg new file mode 100644 index 0000000..4735dbe Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht2_dn.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht2_ft.jpg b/src/others/irrlicht-1.8.1/media/irrlicht2_ft.jpg new file mode 100644 index 0000000..fdfae23 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht2_ft.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht2_lf.jpg b/src/others/irrlicht-1.8.1/media/irrlicht2_lf.jpg new file mode 100644 index 0000000..384b269 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht2_lf.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht2_rt.jpg b/src/others/irrlicht-1.8.1/media/irrlicht2_rt.jpg new file mode 100644 index 0000000..b29e01a Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht2_rt.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlicht2_up.jpg b/src/others/irrlicht-1.8.1/media/irrlicht2_up.jpg new file mode 100644 index 0000000..80f3068 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlicht2_up.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogo.BMP b/src/others/irrlicht-1.8.1/media/irrlichtlogo.BMP new file mode 100644 index 0000000..3319383 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogo.BMP differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogo.jpg b/src/others/irrlicht-1.8.1/media/irrlichtlogo.jpg new file mode 100644 index 0000000..d33c926 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogo.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogo2.png b/src/others/irrlicht-1.8.1/media/irrlichtlogo2.png new file mode 100644 index 0000000..9086b12 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogo2.png differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogo3.png b/src/others/irrlicht-1.8.1/media/irrlichtlogo3.png new file mode 100644 index 0000000..255b3ac Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogo3.png differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogoaligned.jpg b/src/others/irrlicht-1.8.1/media/irrlichtlogoaligned.jpg new file mode 100644 index 0000000..ea6deaf Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogoaligned.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogoalpha.tga b/src/others/irrlicht-1.8.1/media/irrlichtlogoalpha.tga new file mode 100644 index 0000000..5f58885 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogoalpha.tga differ diff --git a/src/others/irrlicht-1.8.1/media/irrlichtlogoalpha2.tga b/src/others/irrlicht-1.8.1/media/irrlichtlogoalpha2.tga new file mode 100644 index 0000000..faa6c1a Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/irrlichtlogoalpha2.tga differ diff --git a/src/others/irrlicht-1.8.1/media/lightFalloff.png b/src/others/irrlicht-1.8.1/media/lightFalloff.png new file mode 100644 index 0000000..21b2142 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/lightFalloff.png differ diff --git a/src/others/irrlicht-1.8.1/media/lucida.xml b/src/others/irrlicht-1.8.1/media/lucida.xml new file mode 100644 index 0000000..3d18bda Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/lucida.xml differ diff --git a/src/others/irrlicht-1.8.1/media/lucida0.png b/src/others/irrlicht-1.8.1/media/lucida0.png new file mode 100644 index 0000000..3c17688 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/lucida0.png differ diff --git a/src/others/irrlicht-1.8.1/media/map-20kdm2.pk3 b/src/others/irrlicht-1.8.1/media/map-20kdm2.pk3 new file mode 100644 index 0000000..d86083e Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/map-20kdm2.pk3 differ diff --git a/src/others/irrlicht-1.8.1/media/map-20kdm2.txt b/src/others/irrlicht-1.8.1/media/map-20kdm2.txt new file mode 100644 index 0000000..6db34ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/map-20kdm2.txt @@ -0,0 +1,50 @@ + +-=( Map Information )=- ----------------------------------------------- + + : Return to Castle: Quake +<Date> : 02/02/02 - ren 11/17/2002 +<Filename> : map-20kdm2.pk3 +<Author> : Michael "<|3FG20K>" Cook +<Email Address> : bfg20k@nycap.rr.com / bfg20k@planetquake.com +<Website> : http://www.planetquake.com/bfg20k +<Description> : This is an Evil7 Castle! It has three tiers, + tight spaces, and plenty of room for various + battles. + +<Additional Credits> : [HFX]Evil, for making great textures. + +-=( Construction )=- -------------------------------------------------- + +<Base> : None. +<Editor(s) Used> : Q3Radiant - Build 202 & Q3Build +<Known Bugs> : This isn't really a bug, but an added feature; + you can walk on top of the battlements. +<Construction Time> : 3 weeks. +<Compile Machine> : 866mhz PIII, 512mb RAM + +-=( Play Information )=- ---------------------------------------------- + +<Mod> : A good one. +<Players> : 2-8 Players +<Bots> : Duh! wait, I THINK they're smarter than Forrest + Gump... You'll have to clarify that for me =). + +-={ Installation }=- -------------------------------------------------- + +<Installation> : Unzip the the zip file map-20kdm2.zip into + your "Quake III Arena\baseq3" directory + Run Quake III Arena, and under console type + "/map 20kdm2" or select under Skirmish in + SIngle Player mode. + +-=( Copyright / Permissions )=- --------------------------------------- + +<Copyright> : You not include or distribute this map in any + sort of commercial product without permission + from the author. You may not mass distribute + this level via any non-electronic means + including but not limited to compact disks, + and floppy disks without permission from the + author. + +-=( This is the End )=- ----------------------------------------------- diff --git a/src/others/irrlicht-1.8.1/media/ninja animation ranges.txt b/src/others/irrlicht-1.8.1/media/ninja animation ranges.txt new file mode 100644 index 0000000..eaf12fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/ninja animation ranges.txt @@ -0,0 +1,36 @@ +hey guys heres all the ranges for the ninja model, 20 ranges and 300 frames....Phew!! + +you may need to scale or rotate the model and change animation speeds for various 3D game engines... + +Please check the numbers carefully cus they dont follow any order and in between ranges often skip a few frames, this as how I achieved certain moves in Character FX its not a mistake :) + +1-14 Walk (normal) +15-30 Stealth Walk +32-44 Punch and swipe sword +45-59 Swipe and spin sword +60-68 Overhead twohanded downswipe +69-72 Up to block position (play backwards to lower sword if you want) +73-83 Forward kick +84-93 Pick up from floor (or down to crouch at frame 87) +94-102 Jump +103-111 Jump without height (for programmer controlled jumps) +112-125 High jump to Sword Kill (Finish em off move??) +126-133 Side Kick +134-145 Spinning Sword attack (might wanna speed this up in game) +146-158 Backflip +159-165 Climb wall +166-173 Death 1 - Fall back onto ground +174-182 Death 2 - Fall forward onto ground +184-205 Idle 1 - Breathe heavily +206-250 Idle 2 +251-300 Idle 3 + +Ok there it is, have fun and maybe drop by my forums hang out, ask questions, post your own work etc + +Feel free to use however you like, commercial etc, credits are Appreciated as a LOT of work went into this! ;-) + +Psionic + +http://www.psionic3d.co.uk + +Note for Irrlicht: Irrlicht uses a 0-based frame index. So subtract 1 from each of the loops! \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/media/ninja.b3d b/src/others/irrlicht-1.8.1/media/ninja.b3d new file mode 100644 index 0000000..fbc7872 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/ninja.b3d differ diff --git a/src/others/irrlicht-1.8.1/media/nskinbl.jpg b/src/others/irrlicht-1.8.1/media/nskinbl.jpg new file mode 100644 index 0000000..b701adb Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/nskinbl.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/nskinrd.jpg b/src/others/irrlicht-1.8.1/media/nskinrd.jpg new file mode 100644 index 0000000..458dbfc Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/nskinrd.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/open.png b/src/others/irrlicht-1.8.1/media/open.png new file mode 100644 index 0000000..b85229d Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/open.png differ diff --git a/src/others/irrlicht-1.8.1/media/opengl.frag b/src/others/irrlicht-1.8.1/media/opengl.frag new file mode 100644 index 0000000..82c3d5c --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/opengl.frag @@ -0,0 +1,9 @@ + +uniform sampler2D myTexture; + +void main (void) +{ + vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0])); + col *= gl_Color; + gl_FragColor = col * 4.0; +} diff --git a/src/others/irrlicht-1.8.1/media/opengl.psh b/src/others/irrlicht-1.8.1/media/opengl.psh new file mode 100644 index 0000000..9f9d03b --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/opengl.psh @@ -0,0 +1,22 @@ +!!ARBfp1.0 +# part of the Irrlicht Engine Shader example. +# Please note that these example shaders don't do anything really useful. +# They only demonstrate that shaders can be used in Irrlicht. + +#Input +ATTRIB inTexCoord = fragment.texcoord; # texture coordinates +ATTRIB inColor = fragment.color.primary; # interpolated diffuse color + +#Output +OUTPUT outColor = result.color; + +TEMP texelColor; +TEMP tmp; +TXP texelColor, inTexCoord, texture, 2D; + +ADD tmp, inColor, inColor; # mulitply with color +MUL texelColor, texelColor, tmp; # mulitply with color +ADD outColor, texelColor, texelColor; # make it brighter and store result + +END + diff --git a/src/others/irrlicht-1.8.1/media/opengl.vert b/src/others/irrlicht-1.8.1/media/opengl.vert new file mode 100644 index 0000000..bfee816 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/opengl.vert @@ -0,0 +1,27 @@ + +uniform mat4 mWorldViewProj; +uniform mat4 mInvWorld; +uniform mat4 mTransWorld; +uniform vec3 mLightPos; +uniform vec4 mLightColor; + +void main(void) +{ + gl_Position = mWorldViewProj * gl_Vertex; + + vec4 normal = vec4(gl_Normal, 0.0); + normal = mInvWorld * normal; + normal = normalize(normal); + + vec4 worldpos = gl_Vertex * mTransWorld; + + vec4 lightVector = worldpos - vec4(mLightPos,1.0); + lightVector = normalize(lightVector); + + float tmp2 = dot(-lightVector, normal); + + vec4 tmp = mLightColor * tmp2; + gl_FrontColor = gl_BackColor = vec4(tmp.x, tmp.y, tmp.z, 0.0); + + gl_TexCoord[0] = gl_MultiTexCoord0; +} diff --git a/src/others/irrlicht-1.8.1/media/opengl.vsh b/src/others/irrlicht-1.8.1/media/opengl.vsh new file mode 100644 index 0000000..9cd71bf --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/opengl.vsh @@ -0,0 +1,60 @@ +!!ARBvp1.0 +# part of the Irrlicht Engine Shader example. +# Please note that these example shaders don't do anything really useful. +# They only demonstrate that shaders can be used in Irrlicht. + +#input +ATTRIB InPos = vertex.position; +ATTRIB InColor = vertex.color; +ATTRIB InNormal = vertex.normal; +ATTRIB InTexCoord = vertex.texcoord; + +#output +OUTPUT OutPos = result.position; +OUTPUT OutColor = result.color; +OUTPUT OutTexCoord = result.texcoord; + +PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix. +TEMP Temp; +TEMP TempColor; +TEMP TempNormal; +TEMP TempPos; + +#transform position to clip space +DP4 Temp.x, MVP[0], InPos; +DP4 Temp.y, MVP[1], InPos; +DP4 Temp.z, MVP[2], InPos; +DP4 Temp.w, MVP[3], InPos; + +#transform normal +DP3 TempNormal.x, InNormal.x, program.local[0]; +DP3 TempNormal.y, InNormal.y, program.local[1]; +DP3 TempNormal.z, InNormal.z, program.local[2]; + +#renormalize normal +DP3 TempNormal.w, TempNormal, TempNormal; +RSQ TempNormal.w, TempNormal.w; +MUL TempNormal, TempNormal, TempNormal.w; + +# calculate light vector +DP4 TempPos.x, InPos, program.local[10]; # vertex into world position +DP4 TempPos.y, InPos, program.local[11]; +DP4 TempPos.z, InPos, program.local[12]; +DP4 TempPos.w, InPos, program.local[13]; + +ADD TempPos, program.local[8], -TempPos; # vtxpos - lightpos + +# normalize light vector +DP3 TempPos.w, TempPos, TempPos; +RSQ TempPos.w, TempPos.w; +MUL TempPos, TempPos, TempPos.w; + +# calculate light color +DP3 TempColor, TempNormal, TempPos; # dp3 with negative light vector +LIT OutColor, TempColor; # clamp to zero if r3 < 0, r5 has diffuce component in r5.y +MUL OutColor, TempColor.y, program.local[9]; # ouput diffuse color +MOV OutColor.w, 1.0; # we want alpha to be always 1 +MOV OutTexCoord, InTexCoord; # store texture coordinate +MOV OutPos, Temp; + +END \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/media/opengllogo.png b/src/others/irrlicht-1.8.1/media/opengllogo.png new file mode 100644 index 0000000..2e83726 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/opengllogo.png differ diff --git a/src/others/irrlicht-1.8.1/media/particle.bmp b/src/others/irrlicht-1.8.1/media/particle.bmp new file mode 100644 index 0000000..b92a7f9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/particle.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/particlegreen.jpg b/src/others/irrlicht-1.8.1/media/particlegreen.jpg new file mode 100644 index 0000000..b39f171 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/particlegreen.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/particlered.bmp b/src/others/irrlicht-1.8.1/media/particlered.bmp new file mode 100644 index 0000000..1a54214 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/particlered.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/particlewhite.bmp b/src/others/irrlicht-1.8.1/media/particlewhite.bmp new file mode 100644 index 0000000..267845d Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/particlewhite.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal1.bmp b/src/others/irrlicht-1.8.1/media/portal1.bmp new file mode 100644 index 0000000..8bd032e Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal1.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal2.bmp b/src/others/irrlicht-1.8.1/media/portal2.bmp new file mode 100644 index 0000000..85f3322 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal2.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal3.bmp b/src/others/irrlicht-1.8.1/media/portal3.bmp new file mode 100644 index 0000000..6d174ac Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal3.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal4.bmp b/src/others/irrlicht-1.8.1/media/portal4.bmp new file mode 100644 index 0000000..5e7fa35 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal4.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal5.bmp b/src/others/irrlicht-1.8.1/media/portal5.bmp new file mode 100644 index 0000000..36f573f Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal5.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal6.bmp b/src/others/irrlicht-1.8.1/media/portal6.bmp new file mode 100644 index 0000000..972d053 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal6.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/portal7.bmp b/src/others/irrlicht-1.8.1/media/portal7.bmp new file mode 100644 index 0000000..d9e5405 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/portal7.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/rockwall.jpg b/src/others/irrlicht-1.8.1/media/rockwall.jpg new file mode 100644 index 0000000..85a7dd7 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/rockwall.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/rockwall_height.bmp b/src/others/irrlicht-1.8.1/media/rockwall_height.bmp new file mode 100644 index 0000000..90f4d7b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/rockwall_height.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/room.3ds b/src/others/irrlicht-1.8.1/media/room.3ds new file mode 100644 index 0000000..f0bfbe6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/room.3ds differ diff --git a/src/others/irrlicht-1.8.1/media/rsptnback.jpg b/src/others/irrlicht-1.8.1/media/rsptnback.jpg new file mode 100644 index 0000000..9984dcd Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/rsptnback.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/skydome.jpg b/src/others/irrlicht-1.8.1/media/skydome.jpg new file mode 100644 index 0000000..7481513 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/skydome.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/skydome2.jpg b/src/others/irrlicht-1.8.1/media/skydome2.jpg new file mode 100644 index 0000000..7bfe713 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/skydome2.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/smoke.bmp b/src/others/irrlicht-1.8.1/media/smoke.bmp new file mode 100644 index 0000000..6494988 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/smoke.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/smoke2.jpg b/src/others/irrlicht-1.8.1/media/smoke2.jpg new file mode 100644 index 0000000..3d169de Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/smoke2.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/smoke3.jpg b/src/others/irrlicht-1.8.1/media/smoke3.jpg new file mode 100644 index 0000000..5dee86b Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/smoke3.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/spheremap.jpg b/src/others/irrlicht-1.8.1/media/spheremap.jpg new file mode 100644 index 0000000..6b785fb Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/spheremap.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/stones.jpg b/src/others/irrlicht-1.8.1/media/stones.jpg new file mode 100644 index 0000000..99ce6f4 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/stones.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/sydney.bmp b/src/others/irrlicht-1.8.1/media/sydney.bmp new file mode 100644 index 0000000..2f14a5a Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/sydney.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/sydney.md2 b/src/others/irrlicht-1.8.1/media/sydney.md2 new file mode 100644 index 0000000..7d3521d Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/sydney.md2 differ diff --git a/src/others/irrlicht-1.8.1/media/t351sml.jpg b/src/others/irrlicht-1.8.1/media/t351sml.jpg new file mode 100644 index 0000000..e3561f3 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/t351sml.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/terrain-heightmap.bmp b/src/others/irrlicht-1.8.1/media/terrain-heightmap.bmp new file mode 100644 index 0000000..a4753df Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/terrain-heightmap.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/terrain-texture.jpg b/src/others/irrlicht-1.8.1/media/terrain-texture.jpg new file mode 100644 index 0000000..fdfe7c6 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/terrain-texture.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/tools.png b/src/others/irrlicht-1.8.1/media/tools.png new file mode 100644 index 0000000..b7e86c9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/tools.png differ diff --git a/src/others/irrlicht-1.8.1/media/vc6include.jpg b/src/others/irrlicht-1.8.1/media/vc6include.jpg new file mode 100644 index 0000000..d3e65ea Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/vc6include.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/vc6optionsdir.jpg b/src/others/irrlicht-1.8.1/media/vc6optionsdir.jpg new file mode 100644 index 0000000..c745d83 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/vc6optionsdir.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/vcnetinclude.jpg b/src/others/irrlicht-1.8.1/media/vcnetinclude.jpg new file mode 100644 index 0000000..ce37fcb Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/vcnetinclude.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/wall.bmp b/src/others/irrlicht-1.8.1/media/wall.bmp new file mode 100644 index 0000000..ff1a8c1 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/wall.bmp differ diff --git a/src/others/irrlicht-1.8.1/media/wall.jpg b/src/others/irrlicht-1.8.1/media/wall.jpg new file mode 100644 index 0000000..b63c226 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/wall.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/water.jpg b/src/others/irrlicht-1.8.1/media/water.jpg new file mode 100644 index 0000000..47c0599 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/water.jpg differ diff --git a/src/others/irrlicht-1.8.1/media/yodan mdl - readme.txt b/src/others/irrlicht-1.8.1/media/yodan mdl - readme.txt new file mode 100644 index 0000000..53c72a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/media/yodan mdl - readme.txt @@ -0,0 +1,53 @@ +Yodan the Silencer + +Experiment 2 + +Can I add elements to the construction of the Biped and also extra external bones? + +Well, yes and no. + +I discovered that it is possible to add both extra links and extra bones without any detremental effects. However, with the exaggerated biped deformation, I came across a problem that hadn't been that obvious on Knute and Bolte. most weapons are rigid non-deformable objects, however the Egon reference model is actually physiqued to a humanoid biped the same way as the player model mesh is. This means that when you deform the biped, it will in turn deform the Egon. It is possible to adjust the Egon model to fit Yodan, but that would mean including the altered Egon gun with the model which would replace the standard one. It would then screw up on standard models, defeating the whole point. + +So, the Egon gun screws up on Yodan. Nothing I can do about it. I also didn't account for his spikes so one of them impales the pack aswell. Oh well! + +Beyond this, I feel the lupine legs and tail work quite well, though I realised that the legs are allready quite 'crouched' in the standing position which didn't leave much room for actual crouching =( However, the root Bip 01 bone is in the same place as the standard Human ones when standing and crouching. + +I have totally re-animated all of the sequences, but largely based those animations on the Valve ones so no points for originality. However, I have made him fire most weapons, including the missile launcher one-handed, I felt it kind of suited him =) + +So I present to you, chunk the second of my planned three-chunk experiment with Halflife modelling. + + +'Yodan the silencer' PPM for Half-Life + +to install: + +unzip the zipfile into the path: Sierra/half-life/valve/models/player +it will automatically create a folder called 'Yodan' and place the mdl and bmp files inside. + +skins: 1x255x255x255colour bmp. +Chrome: no +Team colours: no +triangles: 505 +animations: Custom + +Thanks to: + +Alexis for the constructive criticism. +Chris for the original name, 'Hugo the Silencer' from which Yodan is derived +Raxogg,DaBalrog and Spine[TDA3] for nagging me +White Dragon, Ian Waugh and Nsi among others, for being competent and friendly competition =) +White Dragon, Raxogg and Mist for testing the model for me. +George Lucas, Gene Roddenberry, Wolfgang Amadeus Motzart, Bruce Li and the Pixies for the background noise =) +The Spanish for their onions + +See chunk the first, 'Knute and Bolte' at all good PPM websites near you =) + +also available on my web-site + +http://dspace.dial.pipex.com/scarecrow + +or E-Mail me with questions, advice, complaints etc... + +Scarecrow@dial.pipex.com + +Please note - I don't have time to make clan models or to commit myself to a mod or TC unless you are offering large sums of cash =) \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/media/yodan.mdl b/src/others/irrlicht-1.8.1/media/yodan.mdl new file mode 100644 index 0000000..543c159 Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/yodan.mdl differ diff --git a/src/others/irrlicht-1.8.1/media/zip.png b/src/others/irrlicht-1.8.1/media/zip.png new file mode 100644 index 0000000..c4f9dde Binary files /dev/null and b/src/others/irrlicht-1.8.1/media/zip.png differ diff --git a/src/others/irrlicht-1.8.1/readme.txt b/src/others/irrlicht-1.8.1/readme.txt new file mode 100644 index 0000000..3fbd478 --- /dev/null +++ b/src/others/irrlicht-1.8.1/readme.txt @@ -0,0 +1,235 @@ +========================================================================== +The Irrlicht Engine SDK version 1.8.1 +========================================================================== + + Welcome the Irrlicht Engine SDK. + + Content of this file: + + 1. Directory Structure Overview + 2. How To Start + 3. Requirements + 4. Release Notes + 5. License + 6. Contact + + +========================================================================== +1. Directory Structure Overview +========================================================================== + + You will find some directories after uncompressing the archive of the + SDK. These are: + + \bin The compiled library Irrlicht.DLL and some compiled demo + and example applications, just start them to see the + Irrlicht Engine in action. Windows only. + \doc Documentation of the Irrlicht Engine. + \examples Examples and tutorials showing how to use the engine with + C++. + \include Header files to include when programming with the engine. + \lib Libs to link with your programs when using the engine. + \media Graphics and sound resources for the demo applications and + examples. + \source The source code of the Irrlicht Engine. This code is + not needed to develop applications with the engine, + but it is included to enable recompilation and + debugging, if necessary. + \tools Useful tools (with sourcecode) for the engine. + + + +========================================================================== +2. How to start +========================================================================== + + To see the engine in action in Windows, just go to the \bin\Win32-VisualStudio + directory, and start some applications. There should also be an + application named Demo.exe which should show the most + interesting features of Irrlicht. + + To start developing own applications and games with the engine take + a look at the 01.HelloWorld example in the \examples directory. + There is also a .html file with a tutorial which should be + easily comprehensible. + + The Irrlicht Engine is a static lib under linux. A precompiled version can be + generated from the sources using the Makefile in source/Irrlicht. Run 'make' in + that subfolder. After this you should be able to 'make' all + example applications in /examples by calling the buildAllExamples script. You + can run the examples then from the bin folder. + + It is also possible to use Irrlicht as shared object + (libIrrlicht.so.versionNumber). Use the proper makefile target for this by + running 'make sharedlib' in the source folder. See the Makefile for details. + + For OSX you can find an XCode project file in source/Irrlicht/MacOSX. This will + build the libIrrlicht.a library necessary to create the apps. + +========================================================================== +3. Requirements +========================================================================== + + You can use one of the following compilers/IDEs to develop applications + with Irrlicht or recompile the engine. However, other compilers/IDEs may + work as well, we simply didn't test them. + + * gcc 4.x + * Visual Studio 2008(9.0)-2012(11.0) + * Code::Blocks (& gcc or visual studio toolkit) + + If you ever want to (re)compile the engine yourself (which means you don't + want to use the precompiled version) you need the following: + + * Windows: + * Needed: PlatformSDK (which usually comes with all IDEs, download + it separately for MSVC Express 2005) + * Optional: DirectX SDK, for D3D9 support + * Optional: DirectX SDK prior to May 2006, for D3D8 support + + * Linux: + * Needed: XServer with include files + * Optional: OpenGL headers and libraries (libGL.so) for OpenGL support + GLX + + XF86VidMode [package x11proto-xf86vidmode-dev] or XRandr + (X11 support libraries, the latter two for fullscreen mode) + + * OSX: + * Needed: XCode and Cocoa framework + * Needed: OpenGL headers and libraries + +========================================================================== +4. Release Notes +========================================================================== + + Informations about changes in this new version of the engine can be + found in changes.txt. + + Please note that the textures, 3D models and levels are copyright + by their authors and not covered by the Irrlicht engine license. + +========================================================================== +5. License +========================================================================== + + The license of the Irrlicht Engine is based on the zlib/libpng license. + Even though this license does not require you to mention that you are + using the Irrlicht Engine in your product, an acknowledgement + would be highly appreciated. + + Please note that the Irrlicht Engine is based in part on the work of + the Independent JPEG Group, the zlib, and libpng. This means that if you use + the Irrlicht Engine in your product, you must acknowledge somewhere + in your documentation that you've used the IJG code and libpng. It would + also be nice to mention that you use the Irrlicht Engine and the zlib. + See the README files in the jpeglib and the zlib for + further informations. + + + The Irrlicht Engine License + =========================== + + Copyright (C) 2002-2012 Nikolaus Gebhardt + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be clearly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +========================================================================== +6. Contact +========================================================================== + + If you have problems, questions or suggestions, please visit the + official homepage of the Irrlicht Engine: + + http://irrlicht.sourceforge.net + + You will find forums, bugtrackers, patches, tutorials, and other stuff + which will help you out. + + If want to contact the team of the engine, please send an email to + Nikolaus Gebhardt: + + irrlicht@users.sourceforge.net + + Please also not that parts of the engine have been written or contributed + by other people. Especially: (There are probably more people, sorry if I forgot one. + See http://irrlicht.sourceforge.net/author.html for more informations) + + Christian Stehno (hybrid) Contribution Coordinator/Developer + Michael Zeilfelder (cutealien) GUI Developer + Patryk Nadrowski (Nadro) Developer + Yoran Bosman (Yoran) Webserver administrator + Gareth Davidson (bitplane) Developer/ Forum admin + Thomas Alten (burningwater) Wrote the burningsvideo software rasterizer + Luke P. Hoschke (luke) Wrote the b3d loader, the new animation system, VBOs and other things + Colin MacDonald (rogerborg) All hands person + Ahmed Hilali (blindside) The shader and advanced effects man + Dean Wadsworth (varmint) OSX port maintainer and game developer + Alvaro F. Celis (afecelis) Lots of work in the community, for example video tutorials about Irrlicht, forum admin + John Goewert (Saigumi) Wrote some tutorials for the Irrlicht Engine and doing admin stuff + Jam Takes care of moderating the forums and keeps them clean from those evil spammers. + + Many others (this list hasn't been updated in a while, but they are often mentioned in changes.txt) + Etienne Petitjean wrote the MacPort of the engine + Mark Jeacocke Wrote lots of helpful comments and ideas in the forums and per email. + Julio Gorg Created the 'Unofficial DirectX 9.0 Driver for the Irrlicht Engine' + Andy Spurgeon Wrote the Dev-Cpp tutorial. + Andr Simon Wrote the Codewarrior tutorial. + KnightToFlight Created the unoffical terrain renderer addon for the Irrlicht Engine. + Jon Pry Wrote the code to load compressed TGA files. + Matthew Couch Wrote the tokamak integration tutorial. + Max Winkel Wrote the splitscreen tutorial. + Gorgon Zola Wrote the ODE integration tutorial. + Dean P. Macri Sent in code for curved surfaces and PCX Loading. + Sirshane Made several bug fixes, sent in code for making the mouse cursor invisible in Linux. + Matthias Gall Sent in code for a spline scene node animator and reported lots of bugs. + Mario Gruber Suggested triangle fan drawing and sent in code for this. + Ariaci Spotted out a bug in the ATI driver. + Dr Andros C Bragianos Improved texture mapping in cube scene node. + Philipp Dortmann Sent in code for stencil buffer support for OpenGL. + Jerome Nichols Created the Irrlicht/Ruby interface located at irr.rubyforge.org + Vash TheStampede Sent code for missing Draw2DLine() implementations + MattyBoy XBOX support suggestions + Oliver Klems createImageFromData() method suggestion/implementation + Jox really, really a lot of bug fixes, and the LMTS file loader + Zola Quaternion method additions + Tomasz Nowakowski various bug fixes + Nicholas Bray stencil shadow bug fixes with OpenGL + REAPER mouswheel events for scrollbar + Calimero various bug fixes like vector2d operators + Haddock bugfix in the linked list + G.o.D XML parser fix + Erik Zilli Translated some of the tutorials from my stuttering english into real english. :) + Martin Piskernig Linux bugfixing and testing + Soconne Wrote the original terrain renderer were Irrlichts terrain renderer of Irrlicht is based on it. + Spintz GeoMipMap scene node, terrain renderer of Irrlicht is based on it. + Murphy McCauley OCT file loader, MIM tools + Saurav Mohapatra IrrCSM, and lots of addons, suggestions and bug reports + Zhuck Dimitry My3D Tools + Terry Welsh Allowed me to use the textures of his 'Parallax Mapping with Offset Limiting' paper for the parallax demo of Irrlicht + rt Wrote the original .png loader for Irrlicht + Salvatore Russo Wrote the original .dmf loader for Irrlicht + Vox Various bug reports and fixes + atomice Contributed code for a ms3d loader enhancement + William Finlayson OpenGL RTT, GLSL support and the reflection 2 layer material for OpenGL. + Delight Various code contributions for Irrlicht.NET (particle system, basic shader support and more) + Michael Zoech Improved GLSL support + Jean-loup Gailly, Mark Adler Created the zlib and libpng + Guy Eric Schalnat, Andreas Dilger, Glenn Randers-Pehrson and others Created libpng + The Independent JPEG Group Created JPEG lib + Dr Brian Gladman AES Created aesGladman + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/BuiltInFont.h b/src/others/irrlicht-1.8.1/source/Irrlicht/BuiltInFont.h new file mode 100644 index 0000000..da7a931 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/BuiltInFont.h @@ -0,0 +1,1075 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __BUILD_IN_FONT_H_INCLUDED__ +#define __BUILD_IN_FONT_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +// header file generated by Bin2H, copyright 2002 by N.Gebhardt. +// Bin2H is Freeware. Download it freely from www.code3d.com. +// for the source bitmap, see builtInFont.bmp + +namespace irr +{ +namespace gui +{ +#ifdef _IRR_COMPILE_WITH_BMP_LOADER_ +u8 BuiltInFontData[] = +{ + 0x42, 0x4d, 0x4a, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x28, 0x00, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x63, 0x0b, + 0x00, 0x00, 0x63, 0x0b, 0x00, 0x00, 0x05, 0x00, + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, + 0x18, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, + 0xff, 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, + 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x04, + 0x44, 0x44, 0x02, 0x04, 0x44, 0x44, 0x40, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x04, + 0x44, 0x44, 0x02, 0x04, 0x44, 0x44, 0x40, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x04, + 0x44, 0x44, 0x02, 0x04, 0x44, 0x44, 0x40, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x44, 0x22, 0x44, 0x42, 0x04, + 0x44, 0x44, 0x02, 0x04, 0x44, 0x44, 0x40, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x04, + 0x40, 0x00, 0x02, 0x00, 0x44, 0x00, 0x00, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x04, + 0x40, 0x40, 0x22, 0x20, 0x00, 0x02, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x04, + 0x40, 0x02, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, + 0x00, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x32, + 0x22, 0x22, 0x22, 0x32, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x22, 0x12, 0x22, 0x22, 0x22, 0x12, 0x22, + 0x21, 0x22, 0x22, 0x12, 0x22, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x12, 0x22, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x12, 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x22, 0x44, 0x44, 0x44, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x44, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x24, + 0x22, 0x22, 0x24, 0x42, 0x24, 0x42, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x24, 0x42, + 0x22, 0x24, 0x42, 0x44, 0x44, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x42, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x42, 0x44, 0x22, 0x44, + 0x42, 0x22, 0x22, 0x44, 0x22, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x22, 0x44, + 0x22, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x24, + 0x42, 0x44, 0x22, 0x22, 0x44, 0x42, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x42, 0x24, 0x42, 0x44, + 0x22, 0x44, 0x22, 0x22, 0x44, 0x42, 0x24, 0x42, + 0x44, 0x22, 0x22, 0x24, 0x42, 0x24, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x24, 0x44, 0x22, 0x24, + 0x44, 0x42, 0x22, 0x22, 0x22, 0x22, 0x24, 0x44, + 0x44, 0x44, 0x22, 0x24, 0x44, 0x22, 0x22, 0x44, + 0x42, 0x44, 0x42, 0x24, 0x44, 0x44, 0x22, 0x24, + 0x44, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x24, 0x42, 0x22, 0x44, 0x22, 0x44, 0x22, 0x24, + 0x42, 0x24, 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, + 0x24, 0x22, 0x22, 0x22, 0x44, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x44, 0x44, 0x44, 0x24, 0x22, 0x22, + 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x44, + 0x44, 0x42, 0x22, 0x44, 0x44, 0x42, 0x24, 0x44, + 0x42, 0x44, 0x44, 0x24, 0x42, 0x44, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x42, 0x22, 0x42, 0x22, + 0x44, 0x44, 0x24, 0x42, 0x24, 0x42, 0x22, 0x22, + 0x44, 0x22, 0x44, 0x24, 0x22, 0x24, 0x22, 0x24, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x42, 0x22, 0x22, + 0x22, 0x22, 0x44, 0x44, 0x44, 0x24, 0x22, 0x24, + 0x44, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x44, 0x22, 0x24, 0x44, 0x44, 0x44, 0x22, 0x44, + 0x42, 0x44, 0x42, 0x24, 0x22, 0x24, 0x44, 0x22, + 0x24, 0x22, 0x22, 0x24, 0x22, 0x24, 0x44, 0x22, + 0x44, 0x44, 0x22, 0x44, 0x22, 0x44, 0x22, 0x24, + 0x42, 0x24, 0x42, 0x24, 0x42, 0x44, 0x22, 0x44, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x44, + 0x22, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x42, 0x44, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, + 0x44, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x24, 0x42, 0x22, 0x24, 0x42, 0x24, 0x42, 0x44, + 0x22, 0x44, 0x22, 0x22, 0x44, 0x42, 0x24, 0x42, + 0x44, 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x44, 0x44, 0x24, 0x42, + 0x22, 0x24, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x42, 0x22, 0x22, 0x22, 0x22, 0x24, 0x24, + 0x44, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, + 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x44, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x32, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x22, 0x22, 0x32, + 0x22, 0x22, 0x22, 0x23, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, + 0x12, 0x22, 0x12, 0x22, 0x12, 0x22, 0x12, 0x22, + 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, 0x21, + 0x22, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x12, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, 0x21, + 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, 0x12, + 0x22, 0x21, 0x22, 0x12, 0x22, 0x22, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x24, 0x44, 0x44, 0x44, 0x44, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x22, + 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x22, 0x44, 0x22, 0x24, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x24, + 0x42, 0x22, 0x42, 0x42, 0x22, 0x44, 0x22, 0x22, + 0x44, 0x22, 0x22, 0x44, 0x22, 0x22, 0x44, 0x22, + 0x22, 0x44, 0x22, 0x22, 0x22, 0x22, 0x44, 0x42, + 0x22, 0x24, 0x42, 0x22, 0x44, 0x22, 0x24, 0x42, + 0x22, 0x44, 0x22, 0x24, 0x22, 0x24, 0x42, 0x22, + 0x24, 0x22, 0x24, 0x24, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x22, 0x44, 0x24, + 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, + 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, + 0x42, 0x42, 0x24, 0x24, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x24, + 0x42, 0x22, 0x42, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x44, 0x22, 0x42, 0x44, + 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, + 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, + 0x42, 0x42, 0x24, 0x24, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x22, + 0x42, 0x22, 0x44, 0x22, 0x22, 0x44, 0x22, 0x22, + 0x44, 0x22, 0x22, 0x44, 0x22, 0x22, 0x44, 0x22, + 0x22, 0x44, 0x22, 0x22, 0x42, 0x22, 0x24, 0x44, + 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, + 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, 0x42, 0x22, + 0x42, 0x42, 0x24, 0x24, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x24, 0x24, 0x24, 0x22, 0x22, + 0x22, 0x22, 0x44, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x42, 0x42, 0x22, 0x44, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x42, + 0x24, 0x24, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x42, 0x24, 0x24, 0x44, 0x44, 0x44, 0x44, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x42, 0x22, 0x42, 0x22, 0x22, + 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, 0x42, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x44, 0x44, 0x44, 0x44, + 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x32, + 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, + 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, 0x22, 0x22, + 0x32, 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, + 0x32, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x22, 0x32, 0x23, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x12, 0x22, 0x22, 0x12, 0x22, + 0x21, 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, + 0x12, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x42, 0x22, 0x24, 0x44, + 0x22, 0x22, 0x22, 0x22, 0x44, 0x44, 0x22, 0x22, + 0x44, 0x42, 0x22, 0x24, 0x44, 0x22, 0x22, 0x44, + 0x42, 0x22, 0x24, 0x44, 0x22, 0x22, 0x24, 0x22, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x42, 0x22, 0x24, + 0x42, 0x22, 0x44, 0x22, 0x24, 0x42, 0x22, 0x44, + 0x22, 0x24, 0x42, 0x22, 0x44, 0x22, 0x44, 0x44, + 0x42, 0x22, 0x44, 0x22, 0x24, 0x42, 0x22, 0x44, + 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x24, 0x22, 0x44, 0x22, 0x42, 0x24, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x22, 0x44, 0x42, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, 0x24, + 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, 0x42, 0x44, + 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x42, 0x22, 0x42, 0x42, 0x42, 0x24, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, 0x24, + 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x42, 0x24, 0x22, 0x22, 0x42, 0x42, 0x24, 0x24, + 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, 0x42, 0x24, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x22, 0x42, 0x24, 0x22, 0x44, 0x42, 0x22, 0x44, + 0x22, 0x24, 0x42, 0x22, 0x44, 0x22, 0x24, 0x42, + 0x22, 0x44, 0x22, 0x24, 0x42, 0x22, 0x44, 0x24, + 0x42, 0x22, 0x44, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x42, 0x24, 0x42, 0x24, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x42, + 0x22, 0x44, 0x42, 0x22, 0x42, 0x42, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x42, 0x22, 0x24, 0x44, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x44, 0x42, 0x24, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x42, 0x22, 0x42, 0x42, 0x24, 0x42, + 0x22, 0x42, 0x42, 0x24, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x42, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x24, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x42, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x22, 0x44, + 0x22, 0x22, 0x22, 0x24, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x32, 0x24, 0x24, 0x23, 0x24, 0x24, + 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x22, 0x32, + 0x42, 0x22, 0x23, 0x22, 0x24, 0x22, 0x32, 0x24, + 0x22, 0x23, 0x24, 0x24, 0x22, 0x32, 0x22, 0x42, + 0x23, 0x22, 0x22, 0x23, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, + 0x23, 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, + 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, 0x21, + 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, 0x22, 0x21, + 0x22, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, + 0x12, 0x22, 0x12, 0x22, 0x12, 0x22, 0x12, 0x22, + 0x22, 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x24, 0x22, 0x24, 0x22, 0x42, 0x24, 0x44, 0x42, + 0x22, 0x44, 0x22, 0x24, 0x44, 0x42, 0x24, 0x44, + 0x42, 0x24, 0x44, 0x42, 0x24, 0x44, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x44, + 0x44, 0x22, 0x24, 0x22, 0x24, 0x22, 0x24, 0x44, + 0x22, 0x22, 0x44, 0x42, 0x22, 0x24, 0x44, 0x22, + 0x22, 0x22, 0x24, 0x44, 0x44, 0x22, 0x44, 0x44, + 0x42, 0x24, 0x44, 0x44, 0x22, 0x44, 0x44, 0x42, + 0x24, 0x44, 0x44, 0x22, 0x44, 0x44, 0x22, 0x22, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x24, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x42, 0x42, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x42, 0x22, 0x24, 0x24, 0x22, + 0x22, 0x42, 0x42, 0x22, 0x24, 0x24, 0x22, 0x22, + 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x22, 0x44, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x42, 0x42, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x42, 0x22, 0x24, 0x24, 0x22, + 0x22, 0x42, 0x42, 0x22, 0x22, 0x44, 0x44, 0x42, + 0x24, 0x22, 0x22, 0x24, 0x44, 0x42, 0x24, 0x44, + 0x42, 0x24, 0x44, 0x42, 0x24, 0x44, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x24, 0x44, + 0x22, 0x42, 0x24, 0x24, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x22, 0x44, 0x22, 0x22, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x24, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x42, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x22, 0x24, 0x44, 0x42, + 0x22, 0x44, 0x22, 0x24, 0x44, 0x42, 0x24, 0x44, + 0x42, 0x24, 0x44, 0x42, 0x24, 0x44, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x44, + 0x44, 0x22, 0x24, 0x22, 0x24, 0x22, 0x24, 0x44, + 0x22, 0x22, 0x44, 0x42, 0x22, 0x24, 0x44, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x42, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x42, 0x42, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x42, 0x24, 0x24, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, 0x24, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x42, 0x23, 0x22, 0x42, + 0x22, 0x32, 0x24, 0x24, 0x23, 0x24, 0x24, 0x22, + 0x32, 0x24, 0x22, 0x23, 0x22, 0x22, 0x22, 0x22, + 0x32, 0x22, 0x22, 0x32, 0x42, 0x22, 0x32, 0x24, + 0x22, 0x32, 0x24, 0x22, 0x34, 0x22, 0x42, 0x32, + 0x23, 0x24, 0x23, 0x42, 0x23, 0x24, 0x23, 0x22, + 0x22, 0x22, 0x32, 0x24, 0x24, 0x23, 0x24, 0x22, + 0x22, 0x32, 0x22, 0x42, 0x23, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x12, 0x22, + 0x22, 0x21, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x21, 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x12, 0x21, 0x22, 0x22, 0x12, 0x21, 0x22, + 0x12, 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, 0x12, + 0x21, 0x22, 0x21, 0x22, 0x12, 0x22, 0x12, 0x22, + 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x24, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x44, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x44, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x42, 0x42, 0x22, 0x44, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x42, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x44, + 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x44, 0x22, 0x22, 0x22, 0x24, + 0x44, 0x22, 0x22, 0x22, 0x24, 0x24, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x22, 0x24, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x22, 0x44, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x24, 0x22, 0x24, 0x24, 0x42, 0x22, 0x42, 0x44, + 0x22, 0x24, 0x24, 0x42, 0x22, 0x42, 0x22, 0x44, + 0x44, 0x42, 0x24, 0x24, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x42, 0x22, 0x42, 0x42, 0x24, + 0x44, 0x42, 0x24, 0x22, 0x42, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x44, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x24, 0x44, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, 0x42, + 0x42, 0x22, 0x22, 0x42, 0x42, 0x22, 0x24, 0x22, + 0x22, 0x22, 0x42, 0x42, 0x22, 0x42, 0x22, 0x24, + 0x24, 0x22, 0x24, 0x42, 0x22, 0x22, 0x22, 0x42, + 0x42, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x42, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x42, 0x24, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x24, 0x44, 0x22, + 0x42, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x24, 0x22, 0x24, 0x24, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x42, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x24, + 0x24, 0x22, 0x22, 0x22, 0x22, 0x24, 0x44, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, + 0x22, 0x44, 0x22, 0x42, 0x22, 0x42, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x42, 0x24, 0x24, 0x22, 0x24, + 0x44, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x44, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x44, + 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x22, 0x32, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x32, 0x22, 0x22, 0x32, + 0x22, 0x22, 0x32, 0x23, 0x22, 0x22, 0x22, 0x32, + 0x22, 0x23, 0x22, 0x32, 0x22, 0x23, 0x22, 0x32, + 0x23, 0x22, 0x32, 0x22, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x32, 0x22, 0x32, 0x23, 0x22, 0x23, 0x22, + 0x22, 0x23, 0x22, 0x22, 0x22, 0x32, 0x22, 0x22, + 0x23, 0x22, 0x22, 0x22, 0x32, 0x22, 0x23, 0x24, + 0x22, 0x22, 0x22, 0x12, 0x21, 0x22, 0x12, 0x21, + 0x22, 0x12, 0x21, 0x22, 0x12, 0x21, 0x22, 0x12, + 0x21, 0x22, 0x12, 0x21, 0x22, 0x12, 0x21, 0x22, + 0x12, 0x21, 0x22, 0x12, 0x21, 0x22, 0x12, 0x21, + 0x22, 0x12, 0x21, 0x22, 0x12, 0x21, 0x22, 0x12, + 0x21, 0x22, 0x12, 0x21, 0x22, 0x12, 0x21, 0x22, + 0x12, 0x21, 0x22, 0x12, 0x21, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, 0x12, + 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x44, 0x22, + 0x24, 0x44, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x24, 0x22, 0x22, 0x22, 0x22, 0x24, 0x44, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x44, 0x42, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, + 0x24, 0x22, 0x22, 0x42, 0x42, 0x24, 0x44, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x24, 0x24, 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x32, 0x23, 0x22, 0x32, 0x23, 0x22, + 0x32, 0x23, 0x22, 0x32, 0x23, 0x22, 0x32, 0x23, + 0x22, 0x32, 0x23, 0x22, 0x32, 0x23, 0x22, 0x32, + 0x23, 0x22, 0x32, 0x23, 0x22, 0x32, 0x23, 0x22, + 0x32, 0x23, 0x22, 0x32, 0x23, 0x22, 0x32, 0x23, + 0x22, 0x32, 0x23, 0x22, 0x32, 0x23, 0x22, 0x32, + 0x23, 0x22, 0x32, 0x23, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x12, 0x22, + 0x22, 0x12, 0x22, 0x21, 0x22, 0x12, 0x21, 0x22, + 0x22, 0x12, 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, + 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x21, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, + 0x12, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, + 0x12, 0x22, 0x12, 0x21, 0x22, 0x21, 0x22, 0x22, + 0x12, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x44, 0x22, 0x42, 0x22, 0x24, + 0x44, 0x22, 0x42, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x24, 0x22, 0x42, 0x24, 0x24, 0x24, 0x22, 0x42, + 0x42, 0x22, 0x44, 0x22, 0x24, 0x44, 0x22, 0x22, + 0x44, 0x42, 0x24, 0x22, 0x24, 0x42, 0x22, 0x24, + 0x22, 0x24, 0x42, 0x22, 0x42, 0x22, 0x24, 0x24, + 0x22, 0x24, 0x24, 0x22, 0x24, 0x22, 0x24, 0x44, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x24, 0x22, 0x22, 0x42, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x24, 0x22, 0x42, 0x24, 0x24, 0x24, 0x22, 0x42, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x22, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x42, 0x22, 0x42, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x22, 0x42, 0x42, 0x24, 0x22, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x24, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x42, 0x22, 0x42, 0x24, 0x24, 0x24, 0x22, 0x42, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x42, 0x24, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, + 0x42, 0x22, 0x42, 0x22, 0x42, 0x42, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x44, 0x22, 0x24, + 0x44, 0x22, 0x44, 0x22, 0x24, 0x22, 0x42, 0x24, + 0x24, 0x22, 0x42, 0x24, 0x44, 0x42, 0x22, 0x44, + 0x22, 0x22, 0x44, 0x22, 0x24, 0x44, 0x22, 0x22, + 0x44, 0x42, 0x24, 0x42, 0x22, 0x44, 0x22, 0x44, + 0x22, 0x42, 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, + 0x42, 0x24, 0x24, 0x22, 0x42, 0x42, 0x24, 0x44, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x42, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x24, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x22, 0x23, 0x22, 0x22, 0x32, 0x23, 0x22, 0x32, + 0x22, 0x23, 0x22, 0x32, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x32, 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, + 0x22, 0x22, 0x32, 0x22, 0x32, 0x22, 0x23, 0x22, + 0x23, 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, + 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, + 0x23, 0x22, 0x23, 0x22, 0x32, 0x22, 0x32, 0x22, + 0x23, 0x22, 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, + 0x22, 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, 0x22, 0x12, + 0x22, 0x12, 0x22, 0x12, 0x22, 0x12, 0x22, 0x21, + 0x22, 0x22, 0x21, 0x22, 0x21, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x44, 0x22, 0x22, 0x22, 0x44, 0x22, 0x22, 0x22, + 0x44, 0x44, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x44, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x44, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x44, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x22, 0x44, 0x44, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, + 0x44, 0x42, 0x22, 0x24, 0x42, 0x22, 0x44, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x24, 0x22, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x22, 0x24, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x44, 0x22, 0x24, 0x24, 0x24, + 0x22, 0x44, 0x44, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x42, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x22, 0x24, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x22, 0x42, 0x22, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x42, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x42, 0x22, 0x24, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x42, 0x22, + 0x44, 0x42, 0x22, 0x24, 0x42, 0x22, 0x44, 0x42, + 0x22, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x22, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x22, 0x24, 0x22, 0x24, 0x24, + 0x22, 0x22, 0x42, 0x42, 0x22, 0x22, 0x24, 0x22, + 0x42, 0x22, 0x42, 0x22, 0x24, 0x22, 0x42, 0x42, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x44, 0x22, 0x22, 0x44, 0x42, + 0x22, 0x44, 0x44, 0x22, 0x22, 0x44, 0x22, 0x44, + 0x44, 0x42, 0x24, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x22, 0x24, 0x22, 0x42, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x22, 0x44, 0x44, 0x22, + 0x44, 0x22, 0x42, 0x22, 0x44, 0x22, 0x24, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, 0x22, 0x22, + 0x23, 0x22, 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, + 0x22, 0x22, 0x32, 0x22, 0x22, 0x23, 0x22, 0x22, + 0x22, 0x32, 0x22, 0x22, 0x22, 0x23, 0x22, 0x22, + 0x22, 0x32, 0x22, 0x22, 0x23, 0x22, 0x22, 0x23, + 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x22, + 0x32, 0x22, 0x22, 0x32, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, + 0x12, 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x22, 0x12, 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x12, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x21, 0x22, 0x22, 0x21, 0x22, 0x12, 0x22, + 0x21, 0x22, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, 0x12, 0x22, + 0x22, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, + 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x42, 0x24, 0x44, + 0x42, 0x22, 0x24, 0x44, 0x22, 0x24, 0x44, 0x42, + 0x22, 0x44, 0x44, 0x22, 0x42, 0x22, 0x22, 0x24, + 0x44, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x44, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x44, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x44, 0x22, 0x24, + 0x44, 0x22, 0x22, 0x22, 0x24, 0x22, 0x24, 0x44, + 0x22, 0x24, 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, + 0x44, 0x42, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x42, 0x24, 0x24, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x24, 0x22, 0x42, 0x24, 0x22, 0x44, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x42, 0x22, 0x42, 0x22, 0x24, 0x24, + 0x24, 0x24, 0x22, 0x24, 0x44, 0x22, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x22, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x22, 0x42, + 0x24, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x42, 0x24, 0x42, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x42, 0x42, 0x42, 0x24, 0x24, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x22, 0x24, 0x22, 0x24, 0x44, + 0x22, 0x24, 0x22, 0x22, 0x24, 0x22, 0x24, 0x22, + 0x42, 0x24, 0x22, 0x24, 0x24, 0x22, 0x24, 0x44, + 0x42, 0x22, 0x42, 0x22, 0x22, 0x24, 0x22, 0x24, + 0x22, 0x44, 0x42, 0x22, 0x44, 0x42, 0x22, 0x42, + 0x22, 0x22, 0x24, 0x44, 0x42, 0x24, 0x22, 0x22, + 0x42, 0x24, 0x42, 0x22, 0x24, 0x22, 0x22, 0x42, + 0x42, 0x42, 0x42, 0x24, 0x24, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, + 0x22, 0x42, 0x22, 0x24, 0x22, 0x42, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x24, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x42, 0x24, 0x24, 0x22, 0x24, 0x22, 0x22, 0x44, + 0x22, 0x24, 0x42, 0x24, 0x42, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x44, 0x22, 0x22, 0x24, + 0x44, 0x22, 0x22, 0x22, 0x42, 0x22, 0x24, 0x44, + 0x42, 0x22, 0x24, 0x44, 0x22, 0x24, 0x44, 0x42, + 0x22, 0x44, 0x44, 0x22, 0x44, 0x44, 0x22, 0x24, + 0x44, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, 0x22, 0x44, + 0x22, 0x24, 0x42, 0x24, 0x42, 0x24, 0x22, 0x24, + 0x44, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x32, 0x23, 0x22, 0x22, 0x32, 0x22, + 0x23, 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x22, 0x32, 0x22, + 0x22, 0x23, 0x22, 0x22, 0x22, 0x32, 0x22, 0x22, + 0x23, 0x22, 0x22, 0x23, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x32, 0x22, 0x22, 0x32, 0x23, 0x22, + 0x22, 0x32, 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x32, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x12, 0x21, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x21, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x12, 0x22, 0x22, 0x12, 0x21, 0x22, 0x21, 0x22, + 0x21, 0x22, 0x21, 0x22, 0x22, 0x12, 0x21, 0x22, + 0x21, 0x22, 0x12, 0x22, 0x12, 0x22, 0x22, 0x12, + 0x22, 0x12, 0x22, 0x22, 0x12, 0x22, 0x22, 0x12, + 0x22, 0x22, 0x12, 0x22, 0x21, 0x22, 0x22, 0x21, + 0x22, 0x22, 0x12, 0x22, 0x22, 0x12, 0x22, 0x22, + 0x12, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x24, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x24, 0x24, 0x22, 0x24, 0x44, 0x22, 0x22, 0x44, + 0x22, 0x24, 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, + 0x22, 0x24, 0x22, 0x42, 0x22, 0x24, 0x42, 0x22, + 0x24, 0x22, 0x44, 0x44, 0x22, 0x24, 0x42, 0x22, + 0x22, 0x42, 0x22, 0x44, 0x22, 0x22, 0x44, 0x22, + 0x22, 0x42, 0x22, 0x24, 0x42, 0x22, 0x24, 0x42, + 0x22, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x44, 0x44, 0x42, 0x22, 0x44, 0x22, 0x42, 0x44, + 0x22, 0x42, 0x42, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x42, 0x22, 0x22, 0x42, 0x24, 0x22, + 0x44, 0x44, 0x22, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x24, 0x24, 0x22, 0x22, 0x42, 0x22, 0x24, 0x22, + 0x22, 0x42, 0x44, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x24, 0x44, 0x22, 0x22, 0x24, + 0x42, 0x22, 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x24, 0x42, 0x22, 0x22, 0x24, 0x22, + 0x42, 0x42, 0x22, 0x22, 0x42, 0x24, 0x22, 0x42, + 0x22, 0x42, 0x22, 0x42, 0x24, 0x22, 0x22, 0x24, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x24, 0x24, 0x22, 0x24, 0x42, 0x22, 0x22, 0x42, + 0x22, 0x24, 0x22, 0x22, 0x22, 0x24, 0x22, 0x22, + 0x42, 0x22, 0x22, 0x22, 0x42, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x22, 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, + 0x24, 0x42, 0x22, 0x44, 0x22, 0x24, 0x44, 0x22, + 0x22, 0x42, 0x22, 0x24, 0x42, 0x22, 0x24, 0x44, + 0x22, 0x42, 0x22, 0x22, 0x42, 0x24, 0x24, 0x22, + 0x44, 0x44, 0x42, 0x24, 0x44, 0x22, 0x44, 0x24, + 0x22, 0x42, 0x42, 0x22, 0x42, 0x24, 0x22, 0x22, + 0x42, 0x24, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x44, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, 0x22, + 0x24, 0x42, 0x22, 0x42, 0x22, 0x24, 0x22, 0x22, + 0x22, 0x24, 0x22, 0x42, 0x24, 0x22, 0x42, 0x24, + 0x22, 0x22, 0x22, 0x22, 0x42, 0x24, 0x24, 0x22, + 0x24, 0x24, 0x22, 0x22, 0x42, 0x22, 0x44, 0x22, + 0x22, 0x24, 0x22, 0x22, 0x42, 0x22, 0x42, 0x24, + 0x22, 0x24, 0x42, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x24, 0x22, 0x24, 0x42, 0x22, + 0x24, 0x22, 0x24, 0x42, 0x22, 0x24, 0x42, 0x22, + 0x22, 0x42, 0x22, 0x44, 0x42, 0x22, 0x44, 0x22, + 0x24, 0x44, 0x22, 0x24, 0x42, 0x22, 0x24, 0x42, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x31, 0x23, 0x22, 0x32, 0x22, 0x23, + 0x22, 0x22, 0x22, 0x32, 0x22, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x22, 0x23, 0x22, 0x32, 0x22, 0x32, + 0x22, 0x32, 0x22, 0x32, 0x22, 0x23, 0x22, 0x32, + 0x22, 0x32, 0x23, 0x22, 0x23, 0x22, 0x22, 0x23, + 0x22, 0x23, 0x22, 0x22, 0x23, 0x22, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x32, 0x22, 0x22, + 0x32, 0x22, 0x23, 0x22, 0x22, 0x23, 0x22, 0x22, + 0x23, 0x22 +}; + + u32 BuiltInFontDataSize = sizeof(BuiltInFontData); + +#else // !defined(_IRR_COMPILE_WITH_BMP_LOADER_) + + // built-in font cannot be loaded if there is no BMP loader + + u8* BuiltInFontData=0; + + u32 BuiltInFontDataSize = 0; + +#endif +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.cpp new file mode 100644 index 0000000..65d3117 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.cpp @@ -0,0 +1,1396 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_3DS_LOADER_ + +#include "C3DSMeshFileLoader.h" +#include "os.h" +#include "SMeshBuffer.h" +#include "SAnimatedMesh.h" +#include "IReadFile.h" +#include "IVideoDriver.h" +#include "IMeshManipulator.h" + +#ifdef _DEBUG +#define _IRR_DEBUG_3DS_LOADER_ +#endif + +namespace irr +{ +namespace scene +{ + + +namespace +{ +enum e3DSChunk +{ + // Primary chunk + C3DS_MAIN3DS = 0x4D4D, + + // Main Chunks + C3DS_EDIT3DS = 0x3D3D, + C3DS_KEYF3DS = 0xB000, + C3DS_VERSION = 0x0002, + C3DS_MESHVERSION = 0x3D3E, + + // sub chunks of C3DS_EDIT3DS + C3DS_EDIT_MATERIAL = 0xAFFF, + C3DS_EDIT_OBJECT = 0x4000, + + // sub chunks of C3DS_EDIT_MATERIAL + C3DS_MATNAME = 0xA000, + C3DS_MATAMBIENT = 0xA010, + C3DS_MATDIFFUSE = 0xA020, + C3DS_MATSPECULAR = 0xA030, + C3DS_MATSHININESS = 0xA040, + C3DS_MATSHIN2PCT = 0xA041, + C3DS_TRANSPARENCY = 0xA050, + C3DS_TRANSPARENCY_FALLOFF = 0xA052, + C3DS_REFL_BLUR = 0xA053, + C3DS_TWO_SIDE = 0xA081, + C3DS_WIRE = 0xA085, + C3DS_SHADING = 0xA100, + C3DS_MATTEXMAP = 0xA200, + C3DS_MATSPECMAP = 0xA204, + C3DS_MATOPACMAP = 0xA210, + C3DS_MATREFLMAP = 0xA220, + C3DS_MATBUMPMAP = 0xA230, + C3DS_MATMAPFILE = 0xA300, + C3DS_MAT_TEXTILING = 0xA351, + C3DS_MAT_USCALE = 0xA354, + C3DS_MAT_VSCALE = 0xA356, + C3DS_MAT_UOFFSET = 0xA358, + C3DS_MAT_VOFFSET = 0xA35A, + + // subs of C3DS_EDIT_OBJECT + C3DS_OBJTRIMESH = 0x4100, + + // subs of C3DS_OBJTRIMESH + C3DS_TRIVERT = 0x4110, + C3DS_POINTFLAGARRAY= 0x4111, + C3DS_TRIFACE = 0x4120, + C3DS_TRIFACEMAT = 0x4130, + C3DS_TRIUV = 0x4140, + C3DS_TRISMOOTH = 0x4150, + C3DS_TRIMATRIX = 0x4160, + C3DS_MESHCOLOR = 0x4165, + C3DS_DIRECT_LIGHT = 0x4600, + C3DS_DL_INNER_RANGE= 0x4659, + C3DS_DL_OUTER_RANGE= 0x465A, + C3DS_DL_MULTIPLIER = 0x465B, + C3DS_CAMERA = 0x4700, + C3DS_CAM_SEE_CONE = 0x4710, + C3DS_CAM_RANGES = 0x4720, + + // subs of C3DS_KEYF3DS + C3DS_KF_HDR = 0xB00A, + C3DS_AMBIENT_TAG = 0xB001, + C3DS_OBJECT_TAG = 0xB002, + C3DS_CAMERA_TAG = 0xB003, + C3DS_TARGET_TAG = 0xB004, + C3DS_LIGHTNODE_TAG = 0xB005, + C3DS_KF_SEG = 0xB008, + C3DS_KF_CURTIME = 0xB009, + C3DS_KF_NODE_HDR = 0xB010, + C3DS_PIVOTPOINT = 0xB013, + C3DS_BOUNDBOX = 0xB014, + C3DS_MORPH_SMOOTH = 0xB015, + C3DS_POS_TRACK_TAG = 0xB020, + C3DS_ROT_TRACK_TAG = 0xB021, + C3DS_SCL_TRACK_TAG = 0xB022, + C3DS_NODE_ID = 0xB030, + + // Viewport definitions + C3DS_VIEWPORT_LAYOUT = 0x7001, + C3DS_VIEWPORT_DATA = 0x7011, + C3DS_VIEWPORT_DATA_3 = 0x7012, + C3DS_VIEWPORT_SIZE = 0x7020, + + // different color chunk types + C3DS_COL_RGB = 0x0010, + C3DS_COL_TRU = 0x0011, + C3DS_COL_LIN_24 = 0x0012, + C3DS_COL_LIN_F = 0x0013, + + // percentage chunk types + C3DS_PERCENTAGE_I = 0x0030, + C3DS_PERCENTAGE_F = 0x0031, + + C3DS_CHUNK_MAX = 0xFFFF +}; +} + + +//! Constructor +C3DSMeshFileLoader::C3DSMeshFileLoader(ISceneManager* smgr, io::IFileSystem* fs) +: SceneManager(smgr), FileSystem(fs), Vertices(0), Indices(0), SmoothingGroups(0), TCoords(0), + CountVertices(0), CountFaces(0), CountTCoords(0), Mesh(0) +{ + + #ifdef _DEBUG + setDebugName("C3DSMeshFileLoader"); + #endif + + if (FileSystem) + FileSystem->grab(); +} + + +//! destructor +C3DSMeshFileLoader::~C3DSMeshFileLoader() +{ + cleanUp(); + + if (FileSystem) + FileSystem->drop(); + + if (Mesh) + Mesh->drop(); +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool C3DSMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "3ds" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* C3DSMeshFileLoader::createMesh(io::IReadFile* file) +{ + ChunkData data; + + readChunkData(file, data); + + if (data.header.id != C3DS_MAIN3DS ) + return 0; + + CurrentMaterial.clear(); + Materials.clear(); + MeshBufferNames.clear(); + cleanUp(); + + if (Mesh) + Mesh->drop(); + + Mesh = new SMesh(); + + if (readChunk(file, &data)) + { + // success + + for (u32 i=0; i<Mesh->getMeshBufferCount(); ++i) + { + SMeshBuffer* mb = ((SMeshBuffer*)Mesh->getMeshBuffer(i)); + // drop empty buffers + if (mb->getIndexCount() == 0 || mb->getVertexCount() == 0) + { + Mesh->MeshBuffers.erase(i--); + mb->drop(); + } + else + { + if (mb->Material.MaterialType == video::EMT_PARALLAX_MAP_SOLID) + { + SMesh tmp; + tmp.addMeshBuffer(mb); + mb->drop(); + IMesh* tangentMesh = SceneManager->getMeshManipulator()->createMeshWithTangents(&tmp); + Mesh->MeshBuffers[i]=tangentMesh->getMeshBuffer(0); + // we need to grab because we replace the buffer manually. + Mesh->MeshBuffers[i]->grab(); + // clean up intermediate mesh struct + tangentMesh->drop(); + } + Mesh->MeshBuffers[i]->recalculateBoundingBox(); + } + } + + Mesh->recalculateBoundingBox(); + + SAnimatedMesh* am = new SAnimatedMesh(); + am->Type = EAMT_3DS; + am->addMesh(Mesh); + am->recalculateBoundingBox(); + Mesh->drop(); + Mesh = 0; + return am; + } + + Mesh->drop(); + Mesh = 0; + + return 0; +} + + +bool C3DSMeshFileLoader::readPercentageChunk(io::IReadFile* file, + ChunkData* chunk, f32& percentage) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load percentage chunk.", ELL_DEBUG); +#endif + + ChunkData data; + readChunkData(file, data); + + short intpercentage; + float fpercentage; + + switch(data.header.id) + { + case C3DS_PERCENTAGE_I: + { + // read short + file->read(&intpercentage, 2); +#ifdef __BIG_ENDIAN__ + intpercentage = os::Byteswap::byteswap(intpercentage); +#endif + percentage=intpercentage/100.0f; + data.read += 2; + } + break; + case C3DS_PERCENTAGE_F: + { + // read float + file->read(&fpercentage, sizeof(float)); + data.read += sizeof(float); +#ifdef __BIG_ENDIAN__ + percentage = os::Byteswap::byteswap(fpercentage); +#else + percentage = (f32)fpercentage; +#endif + } + break; + default: + { + // unknown percentage chunk + os::Printer::log("Unknown percentage chunk in 3Ds file.", ELL_WARNING); + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + } + } + + chunk->read += data.read; + + return true; +} + +bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk, + video::SColor& out) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load color chunk.", ELL_DEBUG); +#endif + ChunkData data; + readChunkData(file, data); + + u8 c[3]; + f32 cf[3]; + + switch(data.header.id) + { + case C3DS_COL_TRU: + case C3DS_COL_LIN_24: + { + // read 8 bit data + file->read(c, sizeof(c)); + out.set(255, c[0], c[1], c[2]); + data.read += sizeof(c); + } + break; + case C3DS_COL_RGB: + case C3DS_COL_LIN_F: + { + // read float data + file->read(cf, sizeof(cf)); +#ifdef __BIG_ENDIAN__ + cf[0] = os::Byteswap::byteswap(cf[0]); + cf[1] = os::Byteswap::byteswap(cf[1]); + cf[2] = os::Byteswap::byteswap(cf[2]); +#endif + out.set(255, (s32)(cf[0]*255.0f), (s32)(cf[1]*255.0f), (s32)(cf[2]*255.0f)); + data.read += sizeof(cf); + } + break; + default: + { + // unknown color chunk size + os::Printer::log("Unknown size of color chunk in 3Ds file.", ELL_WARNING); + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + } + } + + chunk->read += data.read; + + return true; +} + + +bool C3DSMeshFileLoader::readMaterialChunk(io::IReadFile* file, ChunkData* parent) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load material chunk.", ELL_DEBUG); +#endif + u16 matSection=0; + + while(parent->read < parent->header.length) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case C3DS_MATNAME: + { + c8* c = new c8[data.header.length - data.read]; + file->read(c, data.header.length - data.read); + + if (strlen(c)) + CurrentMaterial.Name = c; + + data.read += data.header.length - data.read; + delete [] c; + } + break; + case C3DS_MATAMBIENT: + readColorChunk(file, &data, CurrentMaterial.Material.AmbientColor); + break; + case C3DS_MATDIFFUSE: + readColorChunk(file, &data, CurrentMaterial.Material.DiffuseColor); + break; + case C3DS_MATSPECULAR: + readColorChunk(file, &data, CurrentMaterial.Material.SpecularColor); + break; + case C3DS_MATSHININESS: + readPercentageChunk(file, &data, CurrentMaterial.Material.Shininess); + CurrentMaterial.Material.Shininess = (1.f-CurrentMaterial.Material.Shininess)*128.f; + break; + case C3DS_TRANSPARENCY: + { + f32 percentage; + readPercentageChunk(file, &data, percentage); + if (percentage>0.0f) + { + CurrentMaterial.Material.MaterialTypeParam=percentage; + CurrentMaterial.Material.MaterialType=video::EMT_TRANSPARENT_VERTEX_ALPHA; + } + else + { + CurrentMaterial.Material.MaterialType=video::EMT_SOLID; + } + } + break; + case C3DS_WIRE: + CurrentMaterial.Material.Wireframe=true; + break; + case C3DS_TWO_SIDE: + CurrentMaterial.Material.BackfaceCulling=false; + break; + case C3DS_SHADING: + { + s16 flags; + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + switch (flags) + { + case 0: + CurrentMaterial.Material.Wireframe=true; + break; + case 1: + CurrentMaterial.Material.Wireframe=false; + CurrentMaterial.Material.GouraudShading=false; + break; + case 2: + CurrentMaterial.Material.Wireframe=false; + CurrentMaterial.Material.GouraudShading=true; + break; + default: + // phong and metal missing + break; + } + data.read += data.header.length - data.read; + } + break; + case C3DS_MATTEXMAP: + case C3DS_MATSPECMAP: + case C3DS_MATOPACMAP: + case C3DS_MATREFLMAP: + case C3DS_MATBUMPMAP: + { + matSection=data.header.id; + // Should contain a percentage chunk, but does + // not always have it + s16 testval; + const long pos = file->getPos(); + file->read(&testval, 2); +#ifdef __BIG_ENDIAN__ + testval = os::Byteswap::byteswap(testval); +#endif + file->seek(pos, false); + if ((testval == C3DS_PERCENTAGE_I) || + (testval == C3DS_PERCENTAGE_F)) + switch (matSection) + { + case C3DS_MATTEXMAP: + readPercentageChunk(file, &data, CurrentMaterial.Strength[0]); + break; + case C3DS_MATSPECMAP: + readPercentageChunk(file, &data, CurrentMaterial.Strength[1]); + break; + case C3DS_MATOPACMAP: + readPercentageChunk(file, &data, CurrentMaterial.Strength[2]); + break; + case C3DS_MATBUMPMAP: + readPercentageChunk(file, &data, CurrentMaterial.Strength[4]); + break; + } + } + break; + case C3DS_MATMAPFILE: + { + // read texture file name + c8* c = new c8[data.header.length - data.read]; + file->read(c, data.header.length - data.read); + switch (matSection) + { + case C3DS_MATTEXMAP: + CurrentMaterial.Filename[0] = c; + break; + case C3DS_MATSPECMAP: + CurrentMaterial.Filename[1] = c; + break; + case C3DS_MATOPACMAP: + CurrentMaterial.Filename[2] = c; + break; + case C3DS_MATREFLMAP: + CurrentMaterial.Filename[3] = c; + break; + case C3DS_MATBUMPMAP: + CurrentMaterial.Filename[4] = c; + break; + } + data.read += data.header.length - data.read; + delete [] c; + } + break; + case C3DS_MAT_TEXTILING: + { + s16 flags; + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + data.read += 2; + } + break; + case C3DS_MAT_USCALE: + case C3DS_MAT_VSCALE: + case C3DS_MAT_UOFFSET: + case C3DS_MAT_VOFFSET: + { + f32 value; + file->read(&value, 4); +#ifdef __BIG_ENDIAN__ + value = os::Byteswap::byteswap(value); +#endif + u32 i=0; + if (matSection != C3DS_MATTEXMAP) + i=1; + u32 j=0,k=0; + if (data.header.id == C3DS_MAT_VSCALE) + { + j=1; + k=1; + } + else if (data.header.id == C3DS_MAT_UOFFSET) + { + j=2; + k=0; + } + else if (data.header.id == C3DS_MAT_VOFFSET) + { + j=2; + k=1; + } + CurrentMaterial.Material.getTextureMatrix(i)(j,k)=value; + + data.read += 4; + } + break; + default: + // ignore chunk + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + } + + parent->read += data.read; + } + + Materials.push_back(CurrentMaterial); + CurrentMaterial.clear(); + + return true; +} + + + +bool C3DSMeshFileLoader::readTrackChunk(io::IReadFile* file, ChunkData& data, + IMeshBuffer* mb, const core::vector3df& pivot) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load track chunk.", ELL_DEBUG); +#endif + u16 flags; + u32 flags2; + // Track flags + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + file->read(&flags2, 4); +#ifdef __BIG_ENDIAN__ + flags2 = os::Byteswap::byteswap(flags2); +#endif + file->read(&flags2, 4); +#ifdef __BIG_ENDIAN__ + flags2 = os::Byteswap::byteswap(flags2); +#endif + // Num keys + file->read(&flags2, 4); +#ifdef __BIG_ENDIAN__ + flags2 = os::Byteswap::byteswap(flags2); +#endif + file->read(&flags2, 4); +#ifdef __BIG_ENDIAN__ + flags2 = os::Byteswap::byteswap(flags2); +#endif + // TCB flags + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + data.read += 20; + + f32 angle=0.0f; + if (data.header.id== C3DS_ROT_TRACK_TAG) + { + // Angle + file->read(&angle, sizeof(f32)); +#ifdef __BIG_ENDIAN__ + angle = os::Byteswap::byteswap(angle); +#endif + data.read += sizeof(f32); + } + core::vector3df vec; + file->read(&vec.X, sizeof(f32)); + file->read(&vec.Y, sizeof(f32)); + file->read(&vec.Z, sizeof(f32)); +#ifdef __BIG_ENDIAN__ + vec.X = os::Byteswap::byteswap(vec.X); + vec.Y = os::Byteswap::byteswap(vec.Y); + vec.Z = os::Byteswap::byteswap(vec.Z); +#endif + data.read += 12; + vec-=pivot; + + // apply transformation to mesh buffer + if (false)//mb) + { + video::S3DVertex *vertices=(video::S3DVertex*)mb->getVertices(); + if (data.header.id==C3DS_POS_TRACK_TAG) + { + for (u32 i=0; i<mb->getVertexCount(); ++i) + vertices[i].Pos+=vec; + } + else if (data.header.id==C3DS_ROT_TRACK_TAG) + { + //TODO + } + else if (data.header.id==C3DS_SCL_TRACK_TAG) + { + //TODO + } + } + // skip further frames + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + return true; +} + + +bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load frame chunk.", ELL_DEBUG); +#endif + ChunkData data; + + //KF_HDR is always at the beginning + readChunkData(file, data); + if (data.header.id != C3DS_KF_HDR) + return false; + else + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load keyframe header.", ELL_DEBUG); +#endif + u16 version; + file->read(&version, 2); +#ifdef __BIG_ENDIAN__ + version = os::Byteswap::byteswap(version); +#endif + core::stringc name; + readString(file, data, name); + u32 flags; + file->read(&flags, 4); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + + data.read += 4; + parent->read += data.read; + } + data.read=0; + + IMeshBuffer* mb=0; + core::vector3df pivot,bboxCenter; + while(parent->read < parent->header.length) + { + readChunkData(file, data); + + switch(data.header.id) + { + case C3DS_OBJECT_TAG: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load object tag.", ELL_DEBUG); +#endif + mb=0; + pivot.set(0.0f, 0.0f, 0.0f); + } + break; + case C3DS_KF_SEG: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load keyframe segment.", ELL_DEBUG); +#endif + u32 flags; + file->read(&flags, 4); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + file->read(&flags, 4); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + data.read += 8; + } + break; + case C3DS_KF_NODE_HDR: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load keyframe node header.", ELL_DEBUG); +#endif + s16 flags; + c8* c = new c8[data.header.length - data.read-6]; + file->read(c, data.header.length - data.read-6); + + // search mesh buffer to apply these transformations to + for (u32 i=0; i<MeshBufferNames.size(); ++i) + { + if (MeshBufferNames[i]==c) + { + mb=Mesh->getMeshBuffer(i); + break; + } + } + + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + data.read += data.header.length - data.read; + delete [] c; + } + break; + case C3DS_KF_CURTIME: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load keyframe current time.", ELL_DEBUG); +#endif + u32 flags; + file->read(&flags, 4); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + data.read += 4; + } + break; + case C3DS_NODE_ID: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load node ID.", ELL_DEBUG); +#endif + u16 flags; + file->read(&flags, 2); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + data.read += 2; + } + break; + case C3DS_PIVOTPOINT: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load pivot point.", ELL_DEBUG); +#endif + file->read(&pivot.X, sizeof(f32)); + file->read(&pivot.Y, sizeof(f32)); + file->read(&pivot.Z, sizeof(f32)); +#ifdef __BIG_ENDIAN__ + pivot.X = os::Byteswap::byteswap(pivot.X); + pivot.Y = os::Byteswap::byteswap(pivot.Y); + pivot.Z = os::Byteswap::byteswap(pivot.Z); +#endif + data.read += 12; + } + break; + case C3DS_BOUNDBOX: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load bounding box.", ELL_DEBUG); +#endif + core::aabbox3df bbox; + // abuse bboxCenter as temporary variable + file->read(&bboxCenter.X, sizeof(f32)); + file->read(&bboxCenter.Y, sizeof(f32)); + file->read(&bboxCenter.Z, sizeof(f32)); +#ifdef __BIG_ENDIAN__ + bboxCenter.X = os::Byteswap::byteswap(bboxCenter.X); + bboxCenter.Y = os::Byteswap::byteswap(bboxCenter.Y); + bboxCenter.Z = os::Byteswap::byteswap(bboxCenter.Z); +#endif + bbox.reset(bboxCenter); + file->read(&bboxCenter.X, sizeof(f32)); + file->read(&bboxCenter.Y, sizeof(f32)); + file->read(&bboxCenter.Z, sizeof(f32)); +#ifdef __BIG_ENDIAN__ + bboxCenter.X = os::Byteswap::byteswap(bboxCenter.X); + bboxCenter.Y = os::Byteswap::byteswap(bboxCenter.Y); + bboxCenter.Z = os::Byteswap::byteswap(bboxCenter.Z); +#endif + bbox.addInternalPoint(bboxCenter); + bboxCenter=bbox.getCenter(); + data.read += 24; + } + break; + case C3DS_MORPH_SMOOTH: + { +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load morph smooth.", ELL_DEBUG); +#endif + f32 flag; + file->read(&flag, 4); +#ifdef __BIG_ENDIAN__ + flag = os::Byteswap::byteswap(flag); +#endif + data.read += 4; + } + break; + case C3DS_POS_TRACK_TAG: + case C3DS_ROT_TRACK_TAG: + case C3DS_SCL_TRACK_TAG: + readTrackChunk(file, data, mb, bboxCenter-pivot); + break; + default: + // ignore chunk + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + } + + parent->read += data.read; + data.read=0; + } + + return true; +} + + +bool C3DSMeshFileLoader::readChunk(io::IReadFile* file, ChunkData* parent) +{ + while(parent->read < parent->header.length) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case C3DS_VERSION: + { + u16 version; + file->read(&version, sizeof(u16)); +#ifdef __BIG_ENDIAN__ + version = os::Byteswap::byteswap(version); +#endif + file->seek(data.header.length - data.read - 2, true); + data.read += data.header.length - data.read; + if (version != 0x03) + os::Printer::log("3ds file version is other than 3.", ELL_ERROR); + } + break; + case C3DS_EDIT_MATERIAL: + readMaterialChunk(file, &data); + break; + case C3DS_KEYF3DS: + readFrameChunk(file, &data); + break; + case C3DS_EDIT3DS: + break; + case C3DS_MESHVERSION: + case 0x01: + { + u32 version; + file->read(&version, sizeof(u32)); +#ifdef __BIG_ENDIAN__ + version = os::Byteswap::byteswap(version); +#endif + data.read += sizeof(u32); + } + break; + case C3DS_EDIT_OBJECT: + { + core::stringc name; + readString(file, data, name); + readObjectChunk(file, &data); + composeObject(file, name); + } + break; + + default: + // ignore chunk + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + } + + parent->read += data.read; + } + + return true; +} + + +bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load object chunk.", ELL_DEBUG); +#endif + while(parent->read < parent->header.length) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case C3DS_OBJTRIMESH: + readObjectChunk(file, &data); + break; + + case C3DS_TRIVERT: + readVertices(file, data); + break; + + case C3DS_POINTFLAGARRAY: + { + u16 numVertex, flags; + file->read(&numVertex, sizeof(u16)); +#ifdef __BIG_ENDIAN__ + numVertex= os::Byteswap::byteswap(numVertex); +#endif + for (u16 i=0; i<numVertex; ++i) + { + file->read(&flags, sizeof(u16)); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + } + data.read += (numVertex+1)*sizeof(u16); + } + break; + + case C3DS_TRIFACE: + readIndices(file, data); + readObjectChunk(file, &data); // read smooth and material groups + break; + + case C3DS_TRIFACEMAT: + readMaterialGroup(file, data); + break; + + case C3DS_TRIUV: // getting texture coordinates + readTextureCoords(file, data); + break; + + case C3DS_TRIMATRIX: + { + f32 mat[4][3]; + file->read(&mat, 12*sizeof(f32)); + TransformationMatrix.makeIdentity(); + for (int i=0; i<4; ++i) + { + for (int j=0; j<3; ++j) + { +#ifdef __BIG_ENDIAN__ + TransformationMatrix(i,j)=os::Byteswap::byteswap(mat[i][j]); +#else + TransformationMatrix(i,j)=mat[i][j]; +#endif + } + } + data.read += 12*sizeof(f32); + } + break; + case C3DS_MESHCOLOR: + { + u8 flag; + file->read(&flag, sizeof(u8)); + ++data.read; + } + break; + case C3DS_TRISMOOTH: // TODO + { + SmoothingGroups = new u32[CountFaces]; + file->read(SmoothingGroups, CountFaces*sizeof(u32)); +#ifdef __BIG_ENDIAN__ + for (u16 i=0; i<CountFaces; ++i) + SmoothingGroups[i] = os::Byteswap::byteswap(SmoothingGroups[i]); +#endif + data.read += CountFaces*sizeof(u32); + } + break; + + default: + // ignore chunk + file->seek(data.header.length - data.read, true); + data.read += data.header.length - data.read; + } + + parent->read += data.read; + } + + return true; +} + + +void C3DSMeshFileLoader::composeObject(io::IReadFile* file, const core::stringc& name) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Compose object.", ELL_DEBUG); +#endif + if (Mesh->getMeshBufferCount() != Materials.size()) + loadMaterials(file); + + if (MaterialGroups.empty()) + { + // no material group, so add all + SMaterialGroup group; + group.faceCount = CountFaces; + group.faces = new u16[group.faceCount]; + for (u16 i=0; i<group.faceCount; ++i) + group.faces[i] = i; + MaterialGroups.push_back(group); + + // if we've got no material, add one without a texture + if (Materials.empty()) + { + SCurrentMaterial m; + Materials.push_back(m); + SMeshBuffer* mb = new scene::SMeshBuffer(); + Mesh->addMeshBuffer(mb); + mb->getMaterial() = Materials[0].Material; + mb->drop(); + // add an empty mesh buffer name + MeshBufferNames.push_back(""); + } + } + + for (u32 i=0; i<MaterialGroups.size(); ++i) + { + SMeshBuffer* mb = 0; + video::SMaterial* mat=0; + u32 mbPos; + // -3 because we add three vertices at once + u32 maxPrimitives = core::min_(SceneManager->getVideoDriver()->getMaximalPrimitiveCount(), (u32)((1<<16)-1))-3; // currently hardcoded s16 max value for index pointers + + // find mesh buffer for this group + for (mbPos=0; mbPos<Materials.size(); ++mbPos) + { + if (MaterialGroups[i].MaterialName == Materials[mbPos].Name) + { + mb = (SMeshBuffer*)Mesh->getMeshBuffer(mbPos); + mat=&Materials[mbPos].Material; + MeshBufferNames[mbPos]=name; + break; + } + } + + if (mb != 0) + { + // add geometry to the buffer. + + video::S3DVertex vtx; + core::vector3df vec; + vtx.Color=mat->DiffuseColor; + if (mat->MaterialType==video::EMT_TRANSPARENT_VERTEX_ALPHA) + { + vtx.Color.setAlpha((int)(255.0f*mat->MaterialTypeParam)); + } + vtx.Normal.set(0,0,0); + + for (s32 f=0; f<MaterialGroups[i].faceCount; ++f) + { + u32 vtxCount = mb->Vertices.size(); + if (vtxCount>maxPrimitives) + { + IMeshBuffer* tmp = mb; + mb = new SMeshBuffer(); + Mesh->addMeshBuffer(mb); + mb->drop(); + Mesh->MeshBuffers[mbPos] = Mesh->MeshBuffers.getLast(); + Mesh->MeshBuffers[Mesh->MeshBuffers.size()-1] = tmp; + mb->getMaterial() = tmp->getMaterial(); + vtxCount=0; + } + + for (s32 v=0; v<3; ++v) + { + s32 idx = Indices[MaterialGroups[i].faces[f]*4 +v]; + + if (CountVertices > idx) + { + vtx.Pos.X = Vertices[idx*3 + 0]; + vtx.Pos.Z = Vertices[idx*3 + 1]; + vtx.Pos.Y = Vertices[idx*3 + 2]; +// TransformationMatrix.transformVect(vtx.Pos); + } + + if (CountTCoords > idx) + { + vtx.TCoords.X = TCoords[idx*2 + 0]; + vtx.TCoords.Y = 1.0f -TCoords[idx*2 + 1]; + } + + mb->Vertices.push_back(vtx); + } + + // compute normal + core::plane3d<f32> pl(mb->Vertices[vtxCount].Pos, mb->Vertices[vtxCount+2].Pos, + mb->Vertices[vtxCount+1].Pos); + + mb->Vertices[vtxCount].Normal = pl.Normal; + mb->Vertices[vtxCount+1].Normal = pl.Normal; + mb->Vertices[vtxCount+2].Normal = pl.Normal; + + // add indices + + mb->Indices.push_back(vtxCount); + mb->Indices.push_back(vtxCount+2); + mb->Indices.push_back(vtxCount+1); + } + } + else + os::Printer::log("Found no matching material for Group in 3ds file.", ELL_WARNING); + } + + cleanUp(); +} + + +void C3DSMeshFileLoader::loadMaterials(io::IReadFile* file) +{ + // create a mesh buffer for every material + core::stringc modelFilename = file->getFileName(); + + if (Materials.empty()) + os::Printer::log("No materials found in 3ds file.", ELL_INFORMATION); + + MeshBufferNames.reallocate(Materials.size()); + for (u32 i=0; i<Materials.size(); ++i) + { + MeshBufferNames.push_back(""); + SMeshBuffer* m = new scene::SMeshBuffer(); + Mesh->addMeshBuffer(m); + + m->getMaterial() = Materials[i].Material; + if (Materials[i].Filename[0].size()) + { + video::ITexture* texture = 0; + if (FileSystem->existFile(Materials[i].Filename[0])) + texture = SceneManager->getVideoDriver()->getTexture(Materials[i].Filename[0]); + if (!texture) + { + const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[0]); + if (FileSystem->existFile(fname)) + texture = SceneManager->getVideoDriver()->getTexture(fname); + } + if (!texture) + os::Printer::log("Could not load a texture for entry in 3ds file", + Materials[i].Filename[0].c_str(), ELL_WARNING); + else + m->getMaterial().setTexture(0, texture); + } + + if (Materials[i].Filename[2].size()) + { + video::ITexture* texture = 0; + if (FileSystem->existFile(Materials[i].Filename[2])) + texture = SceneManager->getVideoDriver()->getTexture(Materials[i].Filename[2]); + if (!texture) + { + const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[2]); + if (FileSystem->existFile(fname)) + texture = SceneManager->getVideoDriver()->getTexture(fname); + } + if (!texture) + { + os::Printer::log("Could not load a texture for entry in 3ds file", + Materials[i].Filename[2].c_str(), ELL_WARNING); + } + else + { + m->getMaterial().setTexture(0, texture); + m->getMaterial().MaterialType = video::EMT_TRANSPARENT_ADD_COLOR; + } + } + + if (Materials[i].Filename[3].size()) + { + video::ITexture* texture = 0; + if (FileSystem->existFile(Materials[i].Filename[3])) + texture = SceneManager->getVideoDriver()->getTexture(Materials[i].Filename[3]); + if (!texture) + { + const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[3]); + if (FileSystem->existFile(fname)) + texture = SceneManager->getVideoDriver()->getTexture(fname); + } + + if (!texture) + { + os::Printer::log("Could not load a texture for entry in 3ds file", + Materials[i].Filename[3].c_str(), ELL_WARNING); + } + else + { + m->getMaterial().setTexture(1, m->getMaterial().getTexture(0)); + m->getMaterial().setTexture(0, texture); + m->getMaterial().MaterialType = video::EMT_REFLECTION_2_LAYER; + } + } + + if (Materials[i].Filename[4].size()) + { + video::ITexture* texture = 0; + if (FileSystem->existFile(Materials[i].Filename[4])) + texture = SceneManager->getVideoDriver()->getTexture(Materials[i].Filename[4]); + if (!texture) + { + const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[4]); + if (FileSystem->existFile(fname)) + texture = SceneManager->getVideoDriver()->getTexture(fname); + } + if (!texture) + os::Printer::log("Could not load a texture for entry in 3ds file", + Materials[i].Filename[4].c_str(), ELL_WARNING); + else + { + m->getMaterial().setTexture(1, texture); + SceneManager->getVideoDriver()->makeNormalMapTexture(texture, Materials[i].Strength[4]*10.f); + m->getMaterial().MaterialType=video::EMT_PARALLAX_MAP_SOLID; + m->getMaterial().MaterialTypeParam=.035f; + } + } + + m->drop(); + } +} + + +void C3DSMeshFileLoader::cleanUp() +{ + delete [] Vertices; + CountVertices = 0; + Vertices = 0; + delete [] Indices; + Indices = 0; + CountFaces = 0; + delete [] SmoothingGroups; + SmoothingGroups = 0; + delete [] TCoords; + TCoords = 0; + CountTCoords = 0; + + MaterialGroups.clear(); +} + + +void C3DSMeshFileLoader::readTextureCoords(io::IReadFile* file, ChunkData& data) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load texture coords.", ELL_DEBUG); +#endif + file->read(&CountTCoords, sizeof(CountTCoords)); +#ifdef __BIG_ENDIAN__ + CountTCoords = os::Byteswap::byteswap(CountTCoords); +#endif + data.read += sizeof(CountTCoords); + + s32 tcoordsBufferByteSize = CountTCoords * sizeof(f32) * 2; + + if (data.header.length - data.read != tcoordsBufferByteSize) + { + os::Printer::log("Invalid size of tcoords found in 3ds file.", ELL_WARNING); + return; + } + + TCoords = new f32[CountTCoords * 3]; + file->read(TCoords, tcoordsBufferByteSize); +#ifdef __BIG_ENDIAN__ + for (int i=0;i<CountTCoords*2;i++) TCoords[i] = os::Byteswap::byteswap(TCoords[i]); +#endif + data.read += tcoordsBufferByteSize; +} + + +void C3DSMeshFileLoader::readMaterialGroup(io::IReadFile* file, ChunkData& data) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load material group.", ELL_DEBUG); +#endif + SMaterialGroup group; + + readString(file, data, group.MaterialName); + + file->read(&group.faceCount, sizeof(group.faceCount)); +#ifdef __BIG_ENDIAN__ + group.faceCount = os::Byteswap::byteswap(group.faceCount); +#endif + data.read += sizeof(group.faceCount); + + // read faces + group.faces = new u16[group.faceCount]; + file->read(group.faces, sizeof(u16) * group.faceCount); +#ifdef __BIG_ENDIAN__ + for (u32 i=0;i<group.faceCount;++i) + group.faces[i] = os::Byteswap::byteswap(group.faces[i]); +#endif + data.read += sizeof(u16) * group.faceCount; + + MaterialGroups.push_back(group); +} + + +void C3DSMeshFileLoader::readIndices(io::IReadFile* file, ChunkData& data) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load indices.", ELL_DEBUG); +#endif + file->read(&CountFaces, sizeof(CountFaces)); +#ifdef __BIG_ENDIAN__ + CountFaces = os::Byteswap::byteswap(CountFaces); +#endif + data.read += sizeof(CountFaces); + + s32 indexBufferByteSize = CountFaces * sizeof(u16) * 4; + + // Indices are u16s. + // After every 3 Indices in the array, there follows an edge flag. + Indices = new u16[CountFaces * 4]; + file->read(Indices, indexBufferByteSize); +#ifdef __BIG_ENDIAN__ + for (int i=0;i<CountFaces*4;++i) + Indices[i] = os::Byteswap::byteswap(Indices[i]); +#endif + data.read += indexBufferByteSize; +} + + +void C3DSMeshFileLoader::readVertices(io::IReadFile* file, ChunkData& data) +{ +#ifdef _IRR_DEBUG_3DS_LOADER_ + os::Printer::log("Load vertices.", ELL_DEBUG); +#endif + file->read(&CountVertices, sizeof(CountVertices)); +#ifdef __BIG_ENDIAN__ + CountVertices = os::Byteswap::byteswap(CountVertices); +#endif + data.read += sizeof(CountVertices); + + const s32 vertexBufferByteSize = CountVertices * sizeof(f32) * 3; + + if (data.header.length - data.read != vertexBufferByteSize) + { + os::Printer::log("Invalid size of vertices found in 3ds file", core::stringc(CountVertices), ELL_ERROR); + return; + } + + Vertices = new f32[CountVertices * 3]; + file->read(Vertices, vertexBufferByteSize); +#ifdef __BIG_ENDIAN__ + for (int i=0;i<CountVertices*3;i++) + Vertices[i] = os::Byteswap::byteswap(Vertices[i]); +#endif + data.read += vertexBufferByteSize; +} + + +void C3DSMeshFileLoader::readChunkData(io::IReadFile* file, ChunkData& data) +{ + file->read(&data.header, sizeof(ChunkHeader)); +#ifdef __BIG_ENDIAN__ + data.header.id = os::Byteswap::byteswap(data.header.id); + data.header.length = os::Byteswap::byteswap(data.header.length); +#endif + data.read += sizeof(ChunkHeader); +} + + +void C3DSMeshFileLoader::readString(io::IReadFile* file, ChunkData& data, core::stringc& out) +{ + c8 c = 1; + out = ""; + + while (c) + { + file->read(&c, sizeof(c8)); + if (c) + out.append(c); + } + data.read+=out.size()+1; +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_3DS_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.h new file mode 100644 index 0000000..2219251 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.h @@ -0,0 +1,166 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_3DS_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_3DS_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "ISceneManager.h" +#include "irrString.h" +#include "SMesh.h" +#include "matrix4.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading 3ds meshes. +class C3DSMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + C3DSMeshFileLoader(ISceneManager* smgr, io::IFileSystem* fs); + + //! destructor + virtual ~C3DSMeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + +// byte-align structures +#include "irrpack.h" + + struct ChunkHeader + { + u16 id; + s32 length; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + struct ChunkData + { + ChunkData() : read(0) {} + + ChunkHeader header; + s32 read; + }; + + struct SCurrentMaterial + { + void clear() { + Material=video::SMaterial(); + Name=""; + Filename[0]=""; + Filename[1]=""; + Filename[2]=""; + Filename[3]=""; + Filename[4]=""; + Strength[0]=0.f; + Strength[1]=0.f; + Strength[2]=0.f; + Strength[3]=0.f; + Strength[4]=0.f; + } + + video::SMaterial Material; + core::stringc Name; + core::stringc Filename[5]; + f32 Strength[5]; + }; + + struct SMaterialGroup + { + SMaterialGroup() : faceCount(0), faces(0) {}; + + SMaterialGroup(const SMaterialGroup& o) + { + *this = o; + } + + ~SMaterialGroup() + { + clear(); + } + + void clear() + { + delete [] faces; + faces = 0; + faceCount = 0; + } + + void operator =(const SMaterialGroup& o) + { + MaterialName = o.MaterialName; + faceCount = o.faceCount; + faces = new u16[faceCount]; + for (u16 i=0; i<faceCount; ++i) + faces[i] = o.faces[i]; + } + + core::stringc MaterialName; + u16 faceCount; + u16* faces; + }; + + bool readChunk(io::IReadFile* file, ChunkData* parent); + bool readMaterialChunk(io::IReadFile* file, ChunkData* parent); + bool readFrameChunk(io::IReadFile* file, ChunkData* parent); + bool readTrackChunk(io::IReadFile* file, ChunkData& data, + IMeshBuffer* mb, const core::vector3df& pivot); + bool readObjectChunk(io::IReadFile* file, ChunkData* parent); + bool readPercentageChunk(io::IReadFile* file, ChunkData* chunk, f32& percentage); + bool readColorChunk(io::IReadFile* file, ChunkData* chunk, video::SColor& out); + + void readChunkData(io::IReadFile* file, ChunkData& data); + void readString(io::IReadFile* file, ChunkData& data, core::stringc& out); + void readVertices(io::IReadFile* file, ChunkData& data); + void readIndices(io::IReadFile* file, ChunkData& data); + void readMaterialGroup(io::IReadFile* file, ChunkData& data); + void readTextureCoords(io::IReadFile* file, ChunkData& data); + + void composeObject(io::IReadFile* file, const core::stringc& name); + void loadMaterials(io::IReadFile* file); + void cleanUp(); + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + + f32* Vertices; + u16* Indices; + u32* SmoothingGroups; + core::array<u16> TempIndices; + f32* TCoords; + u16 CountVertices; + u16 CountFaces; // = CountIndices/4 + u16 CountTCoords; + core::array<SMaterialGroup> MaterialGroups; + + SCurrentMaterial CurrentMaterial; + core::array<SCurrentMaterial> Materials; + core::array<core::stringc> MeshBufferNames; + core::matrix4 TransformationMatrix; + + SMesh* Mesh; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.cpp new file mode 100644 index 0000000..6531e1a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.cpp @@ -0,0 +1,1695 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Fabio Concas / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + +#include "CAnimatedMeshHalfLife.h" +#include "os.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "coreutil.h" +#include "SMeshBuffer.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" + +namespace irr +{ +namespace scene +{ + + using namespace video; + + void AngleQuaternion(const core::vector3df& angles, vec4_hl quaternion) + { + f32 angle; + f32 sr, sp, sy, cr, cp, cy; + + // FIXME: rescale the inputs to 1/2 angle + angle = angles.Z * 0.5f; + sy = sin(angle); + cy = cos(angle); + angle = angles.Y * 0.5f; + sp = sin(angle); + cp = cos(angle); + angle = angles.X * 0.5f; + sr = sin(angle); + cr = cos(angle); + + quaternion[0] = sr*cp*cy-cr*sp*sy; // X + quaternion[1] = cr*sp*cy+sr*cp*sy; // Y + quaternion[2] = cr*cp*sy-sr*sp*cy; // Z + quaternion[3] = cr*cp*cy+sr*sp*sy; // W + } + + void QuaternionMatrix( const vec4_hl quaternion, f32 (*matrix)[4] ) + { + matrix[0][0] = 1.f - 2.f * quaternion[1] * quaternion[1] - 2.f * quaternion[2] * quaternion[2]; + matrix[1][0] = 2.f * quaternion[0] * quaternion[1] + 2.f * quaternion[3] * quaternion[2]; + matrix[2][0] = 2.f * quaternion[0] * quaternion[2] - 2.f * quaternion[3] * quaternion[1]; + + matrix[0][1] = 2.f * quaternion[0] * quaternion[1] - 2.f * quaternion[3] * quaternion[2]; + matrix[1][1] = 1.f - 2.f * quaternion[0] * quaternion[0] - 2.f * quaternion[2] * quaternion[2]; + matrix[2][1] = 2.f * quaternion[1] * quaternion[2] + 2.f * quaternion[3] * quaternion[0]; + + matrix[0][2] = 2.f * quaternion[0] * quaternion[2] + 2.f * quaternion[3] * quaternion[1]; + matrix[1][2] = 2.f * quaternion[1] * quaternion[2] - 2.f * quaternion[3] * quaternion[0]; + matrix[2][2] = 1.f - 2.f * quaternion[0] * quaternion[0] - 2.f * quaternion[1] * quaternion[1]; + } + + void QuaternionSlerp( const vec4_hl p, vec4_hl q, f32 t, vec4_hl qt ) + { + s32 i; + f32 omega, cosom, sinom, sclp, sclq; + + // decide if one of the quaternions is backwards + f32 a = 0; + f32 b = 0; + for (i = 0; i < 4; i++) { + a += (p[i]-q[i])*(p[i]-q[i]); + b += (p[i]+q[i])*(p[i]+q[i]); + } + if (a > b) { + for (i = 0; i < 4; i++) { + q[i] = -q[i]; + } + } + + cosom = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3]; + + if ((1.f + cosom) > 0.00000001) { + if ((1.f - cosom) > 0.00000001) { + omega = acos( cosom ); + sinom = sin( omega ); + sclp = sin( (1.f - t)*omega) / sinom; + sclq = sin( t*omega ) / sinom; + } + else { + sclp = 1.f - t; + sclq = t; + } + for (i = 0; i < 4; i++) { + qt[i] = sclp * p[i] + sclq * q[i]; + } + } + else { + qt[0] = -p[1]; + qt[1] = p[0]; + qt[2] = -p[3]; + qt[3] = p[2]; + sclp = sin( (1.f - t) * 0.5f * core::PI); + sclq = sin( t * 0.5f * core::PI); + for (i = 0; i < 3; i++) { + qt[i] = sclp * p[i] + sclq * qt[i]; + } + } + } + + void R_ConcatTransforms (const f32 in1[3][4], const f32 in2[3][4], f32 out[3][4]) + { + out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + in1[0][2] * in2[2][0]; + out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] + in1[0][2] * in2[2][1]; + out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] + in1[0][2] * in2[2][2]; + out[0][3] = in1[0][0] * in2[0][3] + in1[0][1] * in2[1][3] + in1[0][2] * in2[2][3] + in1[0][3]; + out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] + in1[1][2] * in2[2][0]; + out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] + in1[1][2] * in2[2][1]; + out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] + in1[1][2] * in2[2][2]; + out[1][3] = in1[1][0] * in2[0][3] + in1[1][1] * in2[1][3] + in1[1][2] * in2[2][3] + in1[1][3]; + out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] + in1[2][2] * in2[2][0]; + out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] + in1[2][2] * in2[2][1]; + out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] + in1[2][2] * in2[2][2]; + out[2][3] = in1[2][0] * in2[0][3] + in1[2][1] * in2[1][3] + in1[2][2] * in2[2][3] + in1[2][3]; + } + + #define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) + + inline void VectorTransform(const vec3_hl in1, const f32 in2[3][4], core::vector3df& out) + { + out.X = DotProduct(in1, in2[0]) + in2[0][3]; + out.Z = DotProduct(in1, in2[1]) + in2[1][3]; + out.Y = DotProduct(in1, in2[2]) + in2[2][3]; + } + + static f32 BoneTransform[MAXSTUDIOBONES][3][4]; // bone transformation matrix + + void getBoneVector ( core::vector3df &out, u32 index ) + { + out.X = BoneTransform[index][0][3]; + out.Z = BoneTransform[index][1][3]; + out.Y = BoneTransform[index][2][3]; + } + + void getBoneBox ( core::aabbox3df &box, u32 index, f32 size = 0.5f ) + { + box.MinEdge.X = BoneTransform[index][0][3] - size; + box.MinEdge.Z = BoneTransform[index][1][3] - size; + box.MinEdge.Y = BoneTransform[index][2][3] - size; + + size *= 2.f; + box.MaxEdge.X = box.MinEdge.X + size; + box.MaxEdge.Y = box.MinEdge.Y + size; + box.MaxEdge.Z = box.MinEdge.Z + size; + } + + void getTransformedBoneVector ( core::vector3df &out, u32 index, const vec3_hl in) + { + out.X = DotProduct(in, BoneTransform[index][0]) + BoneTransform[index][0][3]; + out.Z = DotProduct(in, BoneTransform[index][1]) + BoneTransform[index][1][3]; + out.Y = DotProduct(in, BoneTransform[index][2]) + BoneTransform[index][2][3]; + + } + + +//! Constructor +CHalflifeMDLMeshFileLoader::CHalflifeMDLMeshFileLoader( + scene::ISceneManager* smgr) : SceneManager(smgr) +{ +#ifdef _DEBUG + setDebugName("CHalflifeMDLMeshFileLoader"); +#endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CHalflifeMDLMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension(filename, "mdl"); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CHalflifeMDLMeshFileLoader::createMesh(io::IReadFile* file) +{ + CAnimatedMeshHalfLife* msh = new CAnimatedMeshHalfLife(); + if (msh) + { + if (msh->loadModelFile(file, SceneManager)) + return msh; + msh->drop(); + } + + return 0; +} + + +//! Constructor +CAnimatedMeshHalfLife::CAnimatedMeshHalfLife() + : FrameCount(0), MeshIPol(0), SceneManager(0), Header(0), TextureHeader(0), + OwnTexModel(false), SequenceIndex(0), CurrentFrame(0), FramesPerSecond(25.f), + SkinGroupSelection(0) +#ifdef HL_TEXTURE_ATLAS + , TextureMaster(0) +#endif +{ +#ifdef _DEBUG + setDebugName("CAnimatedMeshHalfLife"); +#endif + initData(); +} + +/*! + loads a complete model +*/ +bool CAnimatedMeshHalfLife::loadModelFile(io::IReadFile* file, + ISceneManager* smgr) +{ + if (!file) + return false; + + SceneManager = smgr; + + if ( loadModel(file, file->getFileName()) ) + { + if ( postLoadModel ( file->getFileName() ) ) + { + initModel (); + //dumpModelInfo ( 1 ); + return true; + } + } + return false; +} + + +//! Destructor +CAnimatedMeshHalfLife::~CAnimatedMeshHalfLife() +{ + delete [] (u8*) Header; + if (OwnTexModel) + delete [] (u8*) TextureHeader; + + for (u32 i = 0; i < 32; ++i) + delete [] (u8*) AnimationHeader[i]; + + if (MeshIPol) + MeshIPol->drop(); +} + + +//! Returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. +u32 CAnimatedMeshHalfLife::getFrameCount() const +{ + return FrameCount; +} + + +//! set the hardware mapping hint, for driver +void CAnimatedMeshHalfLife::setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint,E_BUFFER_TYPE buffer) +{ +} + + +//! flags the meshbuffer as changed, reloads hardware buffers +void CAnimatedMeshHalfLife::setDirty(E_BUFFER_TYPE buffer) +{ +} + + +static core::vector3df TransformedVerts[MAXSTUDIOVERTS]; // transformed vertices +//static core::vector3df TransformedNormals[MAXSTUDIOVERTS]; // light surface normals + + +/*! +*/ +void CAnimatedMeshHalfLife::initModel() +{ + // init Sequences to Animation + KeyFrameInterpolation ipol; + ipol.Name.reserve ( 64 ); + u32 i; + + AnimList.clear(); + FrameCount = 0; + + SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex); + for ( i = 0; i < Header->numseq; i++) + { + ipol.Name = seq[i].label; + ipol.StartFrame = FrameCount; + ipol.Frames = core::max_ ( 1, seq[i].numframes - 1 ); + ipol.EndFrame = ipol.StartFrame + ipol.Frames - 1; + ipol.FramesPerSecond = seq[i].fps; + ipol.AnimationType = seq[i].flags & STUDIO_LOOPING ? EAMT_LOOPING : EAMT_WAYPOINT; + AnimList.push_back ( ipol ); + + FrameCount += ipol.Frames; + } + + // initBoneControllers +/* + SHalflifeBoneController *bonecontroller = (SHalflifeBoneController *)((u8*) Header + Header->bonecontrollerindex); + for ( i = 0; i < Header->numbonecontrollers; i++) + { + printf ( "BoneController%d index:%d%s range:%f - %f\n", + i, + bonecontroller[i].index, bonecontroller[i].index == MOUTH_CONTROLLER ? " (Mouth)": "", + bonecontroller[i].start,bonecontroller[i].end + ); + } + + // initSkins + for (i = 0; i < TextureHeader->numskinfamilies; i++) + { + printf ( "Skin%d\n", i + 1); + } +*/ + + // initBodyparts + u32 meshBuffer = 0; + BodyList.clear(); + SHalflifeBody *body = (SHalflifeBody *) ((u8*) Header + Header->bodypartindex); + for (i=0; i < Header->numbodyparts; ++i) + { + BodyPart part; + part.name = body[i].name; + part.defaultModel = core::max_ ( 0, (s32) body[i].base - 1 ); + + SHalflifeModel * model = (SHalflifeModel *)((u8*) Header + body[i].modelindex); + for ( u32 g = 0; g < body[i].nummodels; ++g) + { + SubModel sub; + sub.name = model[g].name; + sub.startBuffer = meshBuffer; + sub.endBuffer = sub.startBuffer + model[g].nummesh; + sub.state = g == part.defaultModel; + part.model.push_back ( sub ); + meshBuffer += model[g].nummesh; + } + BodyList.push_back ( part ); + } + + SequenceIndex = 0; + CurrentFrame = 0.f; + + SetController(0, 0.f); + SetController(1, 0.f); + SetController(2, 0.f); + SetController(3, 0.f); + SetController(MOUTH_CONTROLLER, 0.f); + + SetSkin (0); + + // init Meshbuffers + const SHalflifeTexture *tex = (SHalflifeTexture *) ((u8*) TextureHeader + TextureHeader->textureindex); + const u16 *skinref = (u16 *)((u8*)TextureHeader + TextureHeader->skinindex); + if ((SkinGroupSelection != 0) && (SkinGroupSelection < TextureHeader->numskinfamilies)) + skinref += (SkinGroupSelection * TextureHeader->numskinref); + + core::vector2df tex_scale; + core::vector2di tex_trans ( 0, 0 ); + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.getScale(tex_scale); +#endif + + for (u32 bodypart=0 ; bodypart < Header->numbodyparts ; ++bodypart) + { + const SHalflifeBody *body = (SHalflifeBody *)((u8*) Header + Header->bodypartindex) + bodypart; + + for (u32 modelnr = 0; modelnr < body->nummodels; ++modelnr) + { + const SHalflifeModel *model = (SHalflifeModel *)((u8*) Header + body->modelindex) + modelnr; +#if 0 + const vec3_hl *studioverts = (vec3_hl *)((u8*)Header + model->vertindex); + const vec3_hl *studionorms = (vec3_hl *)((u8*)Header + model->normindex); +#endif + for (i = 0; i < model->nummesh; ++i) + { + const SHalflifeMesh *mesh = (SHalflifeMesh *)((u8*)Header + model->meshindex) + i; + const SHalflifeTexture *currentex = &tex[skinref[mesh->skinref]]; + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.getTranslation ( currentex->name, tex_trans ); +#else + tex_scale.X = 1.f/(f32)currentex->width; + tex_scale.Y = 1.f/(f32)currentex->height; +#endif + + SMeshBuffer * buffer = new SMeshBuffer(); + + // count index vertex size indexcount = mesh->numtris * 3 + u32 indexCount = 0; + u32 vertexCount = 0; + + const s16 *tricmd = (s16*)((u8*)Header + mesh->triindex); + s32 c; + while ( (c = *(tricmd++)) ) + { + if (c < 0) + c = -c; + + indexCount += ( c - 2 ) * 3; + vertexCount += c; + tricmd += ( 4 * c ); + } + + // indices + buffer->Indices.set_used ( indexCount ); + buffer->Vertices.set_used ( vertexCount ); + + // fill in static indices and vertex + u16 *index = buffer->Indices.pointer(); + video::S3DVertex * v = buffer->Vertices.pointer(); + + // blow up gl_triangle_fan/gl_triangle_strip to indexed triangle list + E_PRIMITIVE_TYPE type; + vertexCount = 0; + indexCount = 0; + tricmd = (s16*)((u8*)Header + mesh->triindex); + while ( (c = *(tricmd++)) ) + { + if (c < 0) + { + // triangle fan + c = -c; + type = EPT_TRIANGLE_FAN; + } + else + { + type = EPT_TRIANGLE_STRIP; + } + + for ( s32 g = 0; g < c; ++g, v += 1, tricmd += 4 ) + { + // fill vertex + #if 0 + const f32 *av = studioverts[tricmd[0]]; + v->Pos.X = av[0]; + v->Pos.Z = av[1]; + v->Pos.Y = av[2]; + + av = studionorms[tricmd[1]]; + v->Normal.X = av[0]; + v->Normal.Z = av[1]; + v->Normal.Y = av[2]; + + #endif + v->Normal.X = 0.f; + v->Normal.Z = 0.f; + v->Normal.Y = 1.f; + + v->TCoords.X = (tex_trans.X + tricmd[2])*tex_scale.X; + v->TCoords.Y = (tex_trans.Y + tricmd[3])*tex_scale.Y; + + v->Color.color = 0xFFFFFFFF; + + // fill index + if ( g < c - 2 ) + { + if ( type == EPT_TRIANGLE_FAN ) + { + index[indexCount+0] = vertexCount; + index[indexCount+1] = vertexCount+g+1; + index[indexCount+2] = vertexCount+g+2; + } + else + { + if ( g & 1 ) + { + index[indexCount+0] = vertexCount+g+1; + index[indexCount+1] = vertexCount+g+0; + index[indexCount+2] = vertexCount+g+2; + } + else + { + index[indexCount+0] = vertexCount+g+0; + index[indexCount+1] = vertexCount+g+1; + index[indexCount+2] = vertexCount+g+2; + } + } + + indexCount += 3; + } + } + + vertexCount += c; + } + + // material + video::SMaterial &m = buffer->getMaterial(); + + m.MaterialType = video::EMT_SOLID; + m.BackfaceCulling = true; + + if ( currentex->flags & STUDIO_NF_CHROME ) + { + // don't know what to do with chrome here + } + +#ifdef HL_TEXTURE_ATLAS + io::path store = TextureBaseName + "atlas"; +#else + io::path fname; + io::path ext; + core::splitFilename ( currentex->name, 0, &fname, &ext ); + io::path store = TextureBaseName + fname; +#endif + m.TextureLayer[0].Texture = SceneManager->getVideoDriver()->getTexture ( store ); + m.Lighting = false; + + MeshIPol->addMeshBuffer(buffer); + buffer->recalculateBoundingBox(); + buffer->drop(); + } // mesh + MeshIPol->recalculateBoundingBox(); + } // model + } // body part +} + + +/*! +*/ +void CAnimatedMeshHalfLife::buildVertices() +{ +/* + const u16 *skinref = (u16 *)((u8*)TextureHeader + TextureHeader->skinindex); + if (SkinGroupSelection != 0 && SkinGroupSelection < TextureHeader->numskinfamilies) + skinref += (SkinGroupSelection * TextureHeader->numskinref); +*/ + u32 i; + s32 c,g; + const s16 *tricmd; + + u32 meshBufferNr = 0; + for ( u32 bodypart = 0 ; bodypart < Header->numbodyparts; ++bodypart) + { + const SHalflifeBody *body = (SHalflifeBody *)((u8*) Header + Header->bodypartindex) + bodypart; + + for ( u32 modelnr = 0; modelnr < body->nummodels; ++modelnr ) + { + const SHalflifeModel *model = (SHalflifeModel *)((u8*) Header + body->modelindex) + modelnr; + + const u8 *vertbone = ((u8*)Header + model->vertinfoindex); + + const vec3_hl *studioverts = (vec3_hl *)((u8*)Header + model->vertindex); + + for ( i = 0; i < model->numverts; i++) + { + VectorTransform ( studioverts[i], BoneTransform[vertbone[i]], TransformedVerts[i] ); + } + /* + const u8 *normbone = ((u8*)Header + model->norminfoindex); + const vec3_hl *studionorms = (vec3_hl *)((u8*)Header + model->normindex); + for ( i = 0; i < model->numnorms; i++) + { + VectorTransform ( studionorms[i], BoneTransform[normbone[i]], TransformedNormals[i] ); + } + */ + for (i = 0; i < model->nummesh; i++) + { + const SHalflifeMesh *mesh = (SHalflifeMesh *)((u8*)Header + model->meshindex) + i; + + IMeshBuffer * buffer = MeshIPol->getMeshBuffer ( meshBufferNr++ ); + video::S3DVertex* v = (video::S3DVertex* ) buffer->getVertices(); + + tricmd = (s16*)((u8*)Header + mesh->triindex); + while ( (c = *(tricmd++)) ) + { + if (c < 0) + c = -c; + + for ( g = 0; g < c; ++g, v += 1, tricmd += 4 ) + { + // fill vertex + const core::vector3df& av = TransformedVerts[tricmd[0]]; + v->Pos = av; + /* + const core::vector3df& an = TransformedNormals[tricmd[1]]; + v->Normal = an; + //v->Normal.normalize(); + */ + } + } // tricmd + } // nummesh + } // model + } // bodypart +} + + +/*! + render Bones +*/ +void CAnimatedMeshHalfLife::renderModel(u32 param, IVideoDriver * driver, const core::matrix4 &absoluteTransformation) +{ + SHalflifeBone *bone = (SHalflifeBone *) ((u8 *) Header + Header->boneindex); + + video::SColor blue(0xFF000080); + video::SColor red(0xFF800000); + video::SColor yellow(0xFF808000); + video::SColor cyan(0xFF008080); + + core::aabbox3df box; + + u32 i; + for ( i = 0; i < Header->numbones; i++) + { + if (bone[i].parent >= 0) + { + getBoneVector ( box.MinEdge, bone[i].parent ); + getBoneVector ( box.MaxEdge, i ); + driver->draw3DLine ( box.MinEdge, box.MaxEdge, blue ); + + // draw parent bone node + if (bone[bone[i].parent].parent >=0 ) + { + getBoneBox ( box, bone[i].parent ); + driver->draw3DBox ( box, blue ); + } + getBoneBox ( box, i ); + driver->draw3DBox ( box, blue ); + } + else + { + // draw parent bone node + getBoneBox ( box, i, 1.f ); + driver->draw3DBox ( box , red ); + } + } + + // attachements + SHalflifeAttachment *attach = (SHalflifeAttachment *) ((u8*) Header + Header->attachmentindex); + core::vector3df v[8]; + for ( i = 0; i < Header->numattachments; i++) + { + getTransformedBoneVector ( v[0],attach[i].bone,attach[i].org ); + getTransformedBoneVector ( v[1],attach[i].bone,attach[i].vectors[0] ); + getTransformedBoneVector ( v[2],attach[i].bone,attach[i].vectors[1] ); + getTransformedBoneVector ( v[3],attach[i].bone,attach[i].vectors[2] ); + driver->draw3DLine ( v[0], v[1], cyan ); + driver->draw3DLine ( v[0], v[2], cyan ); + driver->draw3DLine ( v[0], v[3], cyan ); + } + + // hit boxes + SHalflifeBBox *hitbox = (SHalflifeBBox *) ((u8*) Header + Header->hitboxindex); + f32 *bbmin,*bbmax; + vec3_hl v2[8]; + for (i = 0; i < Header->numhitboxes; i++) + { + bbmin = hitbox[i].bbmin; + bbmax = hitbox[i].bbmax; + + v2[0][0] = bbmin[0]; + v2[0][1] = bbmax[1]; + v2[0][2] = bbmin[2]; + + v2[1][0] = bbmin[0]; + v2[1][1] = bbmin[1]; + v2[1][2] = bbmin[2]; + + v2[2][0] = bbmax[0]; + v2[2][1] = bbmax[1]; + v2[2][2] = bbmin[2]; + + v2[3][0] = bbmax[0]; + v2[3][1] = bbmin[1]; + v2[3][2] = bbmin[2]; + + v2[4][0] = bbmax[0]; + v2[4][1] = bbmax[1]; + v2[4][2] = bbmax[2]; + + v2[5][0] = bbmax[0]; + v2[5][1] = bbmin[1]; + v2[5][2] = bbmax[2]; + + v2[6][0] = bbmin[0]; + v2[6][1] = bbmax[1]; + v2[6][2] = bbmax[2]; + + v2[7][0] = bbmin[0]; + v2[7][1] = bbmin[1]; + v2[7][2] = bbmax[2]; + + for ( u32 g = 0; g < 8; ++g ) + getTransformedBoneVector ( v[g],hitbox[i].bone,v2[g] ); + + driver->draw3DLine(v[0], v[1], yellow); + driver->draw3DLine(v[1], v[3], yellow); + driver->draw3DLine(v[3], v[2], yellow); + driver->draw3DLine(v[2], v[0], yellow); + + driver->draw3DLine(v[4], v[5], yellow); + driver->draw3DLine(v[5], v[7], yellow); + driver->draw3DLine(v[7], v[6], yellow); + driver->draw3DLine(v[6], v[4], yellow); + + driver->draw3DLine(v[0], v[6], yellow); + driver->draw3DLine(v[1], v[7], yellow); + driver->draw3DLine(v[3], v[5], yellow); + driver->draw3DLine(v[2], v[4], yellow); + } +} + + +//! Returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. +IMesh* CAnimatedMeshHalfLife::getMesh(s32 frameInt, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + f32 frame = frameInt + (detailLevel * 0.001f); + u32 frameA = core::floor32 ( frame ); +// f32 blend = core::fract ( frame ); + + SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex); + + // find SequenceIndex from summed list + u32 frameCount = 0; + for (u32 i = 0; i < Header->numseq; ++i) + { + u32 val = core::max_ ( 1, seq[i].numframes - 1 ); + if ( frameCount + val > frameA ) + { + SequenceIndex = i; + CurrentFrame = frame - frameCount; + break; + } + frameCount += val; + } + + seq += SequenceIndex; + + //SetBodyPart ( 1, 1 ); + setUpBones (); + buildVertices(); + + MeshIPol->BoundingBox.MinEdge.X = seq->bbmin[0]; + MeshIPol->BoundingBox.MinEdge.Z = seq->bbmin[1]; + MeshIPol->BoundingBox.MinEdge.Y = seq->bbmin[2]; + + MeshIPol->BoundingBox.MaxEdge.X = seq->bbmax[0]; + MeshIPol->BoundingBox.MaxEdge.Z = seq->bbmax[1]; + MeshIPol->BoundingBox.MaxEdge.Y = seq->bbmax[2]; + + return MeshIPol; +} + + +/*! +*/ +void CAnimatedMeshHalfLife::initData () +{ + u32 i; + + Header = 0; + TextureHeader = 0; + OwnTexModel = false; + + for ( i = 0; i < 32; ++i ) + AnimationHeader[i] = 0; + + SequenceIndex = 0; + CurrentFrame = 0.f; + + for ( i = 0; i < 5; ++i ) + BoneController[i] = 0; + + for ( i = 0; i < 2; ++i ) + Blending[i] = 0; + + SkinGroupSelection = 0; + + AnimList.clear(); + FrameCount = 0; + + if (!MeshIPol) + MeshIPol = new SMesh(); + MeshIPol->clear(); + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.release(); +#endif +} + + +/*! +*/ +void STextureAtlas::release() +{ + for (u32 i = 0; i < atlas.size(); i++) + { + if ( atlas[i].image ) + { + atlas[i].image->drop(); + atlas[i].image = 0; + } + } + Master = 0; +} + + +/*! +*/ +void STextureAtlas::addSource ( const c8 * name, video::IImage * image ) +{ + TextureAtlasEntry entry; + entry.name = name; + entry.image = image; + entry.width = image->getDimension().Width; + entry.height = image->getDimension().Height; + entry.pos.X = 0; + entry.pos.Y = 0; + atlas.push_back ( entry ); +} + + +/*! +*/ +void STextureAtlas::getScale(core::vector2df& scale) +{ + for (s32 i = static_cast<s32>(atlas.size()) - 1; i >= 0; --i) + { + if ( atlas[i].name == "_merged_" ) + { + scale.X = 1.f / atlas[i].width; + scale.Y = 1.f / atlas[i].height; + return; + } + } + scale.X = 1.f; + scale.Y = 1.f; +} + + +/*! +*/ +void STextureAtlas::getTranslation(const c8* name, core::vector2di& pos) +{ + for ( u32 i = 0; i < atlas.size(); ++i) + { + if ( atlas[i].name == name ) + { + pos = atlas[i].pos; + return; + } + } +} + + +/*! +*/ +void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode) +{ + u32 i = 0; + u32 w = 0; + u32 w2; + u32 h2; + u32 h; + u32 wsum; + u32 hsum = 0; + ECOLOR_FORMAT format = ECF_R8G8B8; + + const s32 frame = core::s32_max ( 0, (border - 1 ) / 2 ); + + // sort for biggest coming first + atlas.sort(); + + // split size + wsum = frame; + for (i = 0; i < atlas.size(); i++) + { + // make space + w2 = atlas[i].width + border; + + // align + w2 = (w2 + 1) & ~1; + wsum += w2; + } + u32 splitsize = 256; + if ( wsum > 512 ) + splitsize = 512; + + wsum = frame; + hsum = frame; + w = frame; + h = 0; + for (i = 0; i < atlas.size(); i++) + { + if ( atlas[i].image->getColorFormat() == ECF_A8R8G8B8 ) + { + format = ECF_A8R8G8B8; + } + + // make space + w2 = atlas[i].width + border; + h2 = atlas[i].height + border; + + // align + w2 = (w2 + 1) & ~1; + h2 = (h2 + 1) & ~1; + + h = core::s32_max ( h, h2 ); + + if ( w + w2 >= splitsize ) + { + hsum += h; + wsum = core::s32_max ( wsum, w ); + h = h2; + w = frame; + } + + atlas[i].pos.X = w; + atlas[i].pos.Y = hsum; + + w += w2; + + } + hsum += h; + wsum = core::s32_max ( wsum, w ); + + // build image + core::dimension2d<u32> dim = core::dimension2d<u32>( wsum, hsum ).getOptimalSize(); + IImage* master = new CImage(format, dim); + master->fill(0); + + video::SColor col[2]; + + static const u8 wrap[][4] = + { + {1, 0}, // ETC_REPEAT + {0, 1}, // ETC_CLAMP + {0, 1}, // ETC_CLAMP_TO_EDGE + {0, 1} // ETC_MIRROR + }; + + s32 a,b; + for (i = 0; i < atlas.size(); i++) + { + atlas[i].image->copyTo ( master, atlas[i].pos ); + + // clamp/wrap ( copy edges, filtering needs it ) + + for ( b = 0; b < frame; ++b ) + { + for ( a = 0 - b; a <= (s32) atlas[i].width + b; ++a ) + { + col[0] = atlas[i].image->getPixel ( core::s32_clamp ( a, 0, atlas[i].width - 1 ), 0 ); + col[1] = atlas[i].image->getPixel ( core::s32_clamp ( a, 0, atlas[i].width - 1 ), atlas[i].height - 1 ); + + master->setPixel ( atlas[i].pos.X + a, atlas[i].pos.Y + ( b + 1 ) * -1, col[wrap[texmode][0]] ); + master->setPixel ( atlas[i].pos.X + a, atlas[i].pos.Y + atlas[i].height - 1 + ( b + 1 ) * 1, col[wrap[texmode][1]] ); + } + + for ( a = -1 - b; a <= (s32) atlas[i].height + b; ++a ) + { + col[0] = atlas[i].image->getPixel ( 0, core::s32_clamp ( a, 0, atlas[i].height - 1 ) ); + col[1] = atlas[i].image->getPixel ( atlas[i].width - 1, core::s32_clamp ( a, 0, atlas[i].height - 1 ) ); + + master->setPixel ( atlas[i].pos.X + ( b + 1 ) * -1, atlas[i].pos.Y + a, col[wrap[texmode][0]] ); + master->setPixel ( atlas[i].pos.X + atlas[i].width + b, atlas[i].pos.Y + a, col[wrap[texmode][1]] ); + } + } + } + + addSource ( "_merged_", master ); + Master = master; +} + + +/*! +*/ +SHalflifeHeader* CAnimatedMeshHalfLife::loadModel(io::IReadFile* file, const io::path& filename) +{ + bool closefile = false; + + // if secondary files are needed, open here and mark for closing + if ( 0 == file ) + { + file = SceneManager->getFileSystem()->createAndOpenFile(filename); + closefile = true; + } + + if ( 0 == file ) + return 0; + + // read into memory + u8* pin = new u8[file->getSize()]; + file->read(pin, file->getSize()); + + SHalflifeHeader* header = (SHalflifeHeader*) pin; + + const bool idst = (0 == strncmp(header->id, "IDST", 4)); + const bool idsq = (0 == strncmp(header->id, "IDSQ", 4)); + + if ( (!idst && !idsq) || (idsq && !Header) ) + { + os::Printer::log("MDL Halflife Loader: Wrong file header", file->getFileName(), ELL_WARNING); + if ( closefile ) + { + file->drop(); + file = 0; + } + delete [] pin; + return 0; + } + + // don't know the real header.. idsg might be different + if (header->textureindex && idst ) + { + io::path path; + io::path fname; + io::path ext; + + core::splitFilename(file->getFileName(), &path, &fname, &ext); + TextureBaseName = path + fname + "_"; + + SHalflifeTexture *tex = (SHalflifeTexture *)(pin + header->textureindex); + u32 *palette = new u32[256]; + for (u32 i = 0; i < header->numtextures; ++i) + { + const u8 *src = pin + tex[i].index; + + // convert rgb to argb palette + { + const u8 *pal = src + tex[i].width * tex[i].height; + for( u32 g=0; g<256; ++g ) + { + palette[g] = 0xFF000000 | pal[0] << 16 | pal[1] << 8 | pal[2]; + pal += 3; + } + } + + IImage* image = SceneManager->getVideoDriver()->createImage(ECF_R8G8B8, core::dimension2d<u32>(tex[i].width, tex[i].height)); + + CColorConverter::convert8BitTo24Bit(src, (u8*)image->lock(), tex[i].width, tex[i].height, (u8*) palette, 0, false); + image->unlock(); + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.addSource ( tex[i].name, image ); +#else + core::splitFilename ( tex[i].name, 0, &fname, &ext ); + SceneManager->getVideoDriver()->addTexture ( TextureBaseName + fname, image ); + image->drop(); +#endif + } + delete [] palette; + +#ifdef HL_TEXTURE_ATLAS + TextureAtlas.create ( 2 * 2 + 1, ETC_CLAMP ); + SceneManager->getVideoDriver()->addTexture ( TextureBaseName + "atlas", TextureAtlas.Master ); + TextureAtlas.release(); +#endif + } + + if (!Header) + Header = header; + + if ( closefile ) + { + file->drop(); + file = 0; + } + + return header; +} + + +/*! +*/ +f32 CAnimatedMeshHalfLife::SetController( s32 controllerIndex, f32 value ) +{ + if (!Header) + return 0.f; + + SHalflifeBoneController *bonecontroller = (SHalflifeBoneController *)((u8*) Header + Header->bonecontrollerindex); + + // find first controller that matches the index + u32 i; + for (i = 0; i < Header->numbonecontrollers; i++, bonecontroller++) + { + if (bonecontroller->index == controllerIndex) + break; + } + if (i >= Header->numbonecontrollers) + return value; + + // wrap 0..360 if it's a rotational controller + if (bonecontroller->type & (STUDIO_XR | STUDIO_YR | STUDIO_ZR)) + { + // ugly hack, invert value if end < start + if (bonecontroller->end < bonecontroller->start) + value = -value; + + // does the controller not wrap? + if (bonecontroller->start + 359.f >= bonecontroller->end) + { + if (value > ((bonecontroller->start + bonecontroller->end) / 2.f) + 180.f) + value = value - 360.f; + if (value < ((bonecontroller->start + bonecontroller->end) / 2.f) - 180.f) + value = value + 360.f; + } + else + { + if (value > 360.f) + value = value - (s32)(value / 360.f) * 360.f; + else if (value < 0.f) + value = value + (s32)((value / -360.f) + 1) * 360.f; + } + } + + s32 range = controllerIndex == MOUTH_CONTROLLER ? 64 : 255; + + s32 setting = (s32) ( (f32) range * (value - bonecontroller->start) / (bonecontroller->end - bonecontroller->start)); + + if (setting < 0) setting = 0; + if (setting > range) setting = range; + + BoneController[controllerIndex] = setting; + + return setting * (1.f / (f32) range ) * (bonecontroller->end - bonecontroller->start) + bonecontroller->start; +} + + +/*! +*/ +u32 CAnimatedMeshHalfLife::SetSkin( u32 value ) +{ + if (value < Header->numskinfamilies) + SkinGroupSelection = value; + + return SkinGroupSelection; +} + + +/*! +*/ +bool CAnimatedMeshHalfLife::postLoadModel( const io::path &filename ) +{ + io::path path; + io::path texname; + io::path submodel; + + core::splitFilename ( filename ,&path, &texname, 0 ); + + // preload textures + // if no textures are stored in main file, use texfile + if (Header->numtextures == 0) + { + submodel = path + texname + "T.mdl"; + TextureHeader = loadModel(0, submodel); + if (!TextureHeader) + return false; + OwnTexModel = true; + } + else + { + TextureHeader = Header; + OwnTexModel = false; + } + + // preload animations + if (Header->numseqgroups > 1) + { + c8 seq[8]; + for (u32 i = 1; i < Header->numseqgroups; i++) + { + snprintf( seq, 8, "%02d.mdl", i ); + submodel = path + texname + seq; + + AnimationHeader[i] = loadModel(0, submodel); + if (!AnimationHeader[i]) + return false; + } + } + + return true; +} + + +/*! +*/ +void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const +{ + const u8 *phdr = (const u8*) Header; + const SHalflifeHeader * hdr = Header; + u32 i; + + if (level == 0) + { + printf ( + "Bones: %d\n" + "Bone Controllers: %d\n" + "Hit Boxes: %d\n" + "Sequences: %d\n" + "Sequence Groups: %d\n", + hdr->numbones, + hdr->numbonecontrollers, + hdr->numhitboxes, + hdr->numseq, + hdr->numseqgroups + ); + printf ( + "Textures: %d\n" + "Skin Families: %d\n" + "Bodyparts: %d\n" + "Attachments: %d\n" + "Transitions: %d\n", + hdr->numtextures, + hdr->numskinfamilies, + hdr->numbodyparts, + hdr->numattachments, + hdr->numtransitions); + return; + } + + printf("id: %c%c%c%c\n", phdr[0], phdr[1], phdr[2], phdr[3]); + printf("version: %d\n", hdr->version); + printf("name: \"%s\"\n", hdr->name); + printf("length: %d\n\n", hdr->length); + + printf("eyeposition: %f %f %f\n", hdr->eyeposition[0], hdr->eyeposition[1], hdr->eyeposition[2]); + printf("min: %f %f %f\n", hdr->min[0], hdr->min[1], hdr->min[2]); + printf("max: %f %f %f\n", hdr->max[0], hdr->max[1], hdr->max[2]); + printf("bbmin: %f %f %f\n", hdr->bbmin[0], hdr->bbmin[1], hdr->bbmin[2]); + printf("bbmax: %f %f %f\n", hdr->bbmax[0], hdr->bbmax[1], hdr->bbmax[2]); + + printf("flags: %d\n\n", hdr->flags); + + printf("numbones: %d\n", hdr->numbones); + for (i = 0; i < hdr->numbones; i++) + { + const SHalflifeBone *bone = (const SHalflifeBone *) (phdr + hdr->boneindex); + printf("bone %d.name: \"%s\"\n", i + 1, bone[i].name); + printf("bone %d.parent: %d\n", i + 1, bone[i].parent); + printf("bone %d.flags: %d\n", i + 1, bone[i].flags); + printf("bone %d.bonecontroller: %d %d %d %d %d %d\n", i + 1, bone[i].bonecontroller[0], bone[i].bonecontroller[1], bone[i].bonecontroller[2], bone[i].bonecontroller[3], bone[i].bonecontroller[4], bone[i].bonecontroller[5]); + printf("bone %d.value: %f %f %f %f %f %f\n", i + 1, bone[i].value[0], bone[i].value[1], bone[i].value[2], bone[i].value[3], bone[i].value[4], bone[i].value[5]); + printf("bone %d.scale: %f %f %f %f %f %f\n", i + 1, bone[i].scale[0], bone[i].scale[1], bone[i].scale[2], bone[i].scale[3], bone[i].scale[4], bone[i].scale[5]); + } + + printf("\nnumbonecontrollers: %d\n", hdr->numbonecontrollers); + const SHalflifeBoneController *bonecontrollers = (const SHalflifeBoneController *) (phdr + hdr->bonecontrollerindex); + for (i = 0; i < hdr->numbonecontrollers; i++) + { + printf("bonecontroller %d.bone: %d\n", i + 1, bonecontrollers[i].bone); + printf("bonecontroller %d.type: %d\n", i + 1, bonecontrollers[i].type); + printf("bonecontroller %d.start: %f\n", i + 1, bonecontrollers[i].start); + printf("bonecontroller %d.end: %f\n", i + 1, bonecontrollers[i].end); + printf("bonecontroller %d.rest: %d\n", i + 1, bonecontrollers[i].rest); + printf("bonecontroller %d.index: %d\n", i + 1, bonecontrollers[i].index); + } + + printf("\nnumhitboxes: %d\n", hdr->numhitboxes); + const SHalflifeBBox *box = (const SHalflifeBBox *) (phdr + hdr->hitboxindex); + for (i = 0; i < hdr->numhitboxes; i++) + { + printf("hitbox %d.bone: %d\n", i + 1, box[i].bone); + printf("hitbox %d.group: %d\n", i + 1, box[i].group); + printf("hitbox %d.bbmin: %f %f %f\n", i + 1, box[i].bbmin[0], box[i].bbmin[1], box[i].bbmin[2]); + printf("hitbox %d.bbmax: %f %f %f\n", i + 1, box[i].bbmax[0], box[i].bbmax[1], box[i].bbmax[2]); + } + + printf("\nnumseq: %d\n", hdr->numseq); + const SHalflifeSequence *seq = (const SHalflifeSequence *) (phdr + hdr->seqindex); + for (i = 0; i < hdr->numseq; i++) + { + printf("seqdesc %d.label: \"%s\"\n", i + 1, seq[i].label); + printf("seqdesc %d.fps: %f\n", i + 1, seq[i].fps); + printf("seqdesc %d.flags: %d\n", i + 1, seq[i].flags); + printf("<...>\n"); + } + + printf("\nnumseqgroups: %d\n", hdr->numseqgroups); + for (i = 0; i < hdr->numseqgroups; i++) + { + const SHalflifeSequenceGroup *group = (const SHalflifeSequenceGroup *) (phdr + hdr->seqgroupindex); + printf("\nseqgroup %d.label: \"%s\"\n", i + 1, group[i].label); + printf("\nseqgroup %d.namel: \"%s\"\n", i + 1, group[i].name); + printf("\nseqgroup %d.data: %d\n", i + 1, group[i].data); + } + + printf("\nnumskinref: %d\n", hdr->numskinref); + printf("numskinfamilies: %d\n", hdr->numskinfamilies); + + printf("\nnumbodyparts: %d\n", hdr->numbodyparts); + const SHalflifeBody *pbodyparts = (const SHalflifeBody*) ((const u8*) hdr + hdr->bodypartindex); + for (i = 0; i < hdr->numbodyparts; i++) + { + printf("bodypart %d.name: \"%s\"\n", i + 1, pbodyparts[i].name); + printf("bodypart %d.nummodels: %d\n", i + 1, pbodyparts[i].nummodels); + printf("bodypart %d.base: %d\n", i + 1, pbodyparts[i].base); + printf("bodypart %d.modelindex: %d\n", i + 1, pbodyparts[i].modelindex); + } + + printf("\nnumattachments: %d\n", hdr->numattachments); + for (i = 0; i < hdr->numattachments; i++) + { + const SHalflifeAttachment *attach = (const SHalflifeAttachment *) ((const u8*) hdr + hdr->attachmentindex); + printf("attachment %d.name: \"%s\"\n", i + 1, attach[i].name); + } + + hdr = TextureHeader; + printf("\nnumtextures: %d\n", hdr->numtextures); + printf("textureindex: %d\n", hdr->textureindex); + printf("texturedataindex: %d\n", hdr->texturedataindex); + const SHalflifeTexture *ptextures = (const SHalflifeTexture *) ((const u8*) hdr + hdr->textureindex); + for (i = 0; i < hdr->numtextures; i++) + { + printf("texture %d.name: \"%s\"\n", i + 1, ptextures[i].name); + printf("texture %d.flags: %d\n", i + 1, ptextures[i].flags); + printf("texture %d.width: %d\n", i + 1, ptextures[i].width); + printf("texture %d.height: %d\n", i + 1, ptextures[i].height); + printf("texture %d.index: %d\n", i + 1, ptextures[i].index); + } +} + + +/*! +*/ +void CAnimatedMeshHalfLife::ExtractBbox(s32 sequence, core::aabbox3df &box) const +{ + const SHalflifeSequence *seq = (const SHalflifeSequence *)((const u8*)Header + Header->seqindex) + sequence; + + box.MinEdge.X = seq[0].bbmin[0]; + box.MinEdge.Y = seq[0].bbmin[1]; + box.MinEdge.Z = seq[0].bbmin[2]; + + box.MaxEdge.X = seq[0].bbmax[0]; + box.MaxEdge.Y = seq[0].bbmax[1]; + box.MaxEdge.Z = seq[0].bbmax[2]; +} + + +/*! +*/ +void CAnimatedMeshHalfLife::calcBoneAdj() +{ + const SHalflifeBoneController *bonecontroller = + (const SHalflifeBoneController *)((const u8*) Header + Header->bonecontrollerindex); + + for (u32 j = 0; j < Header->numbonecontrollers; j++) + { + const s32 i = bonecontroller[j].index; + // check for 360% wrapping + f32 value; + if (bonecontroller[j].type & STUDIO_RLOOP) + { + value = BoneController[i] * (360.f/256.f) + bonecontroller[j].start; + } + else + { + const f32 range = i <= 3 ? 255.f : 64.f; + value = core::clamp(BoneController[i] / range,0.f,1.f); + value = (1.f - value) * bonecontroller[j].start + value * bonecontroller[j].end; + } + + switch(bonecontroller[j].type & STUDIO_TYPES) + { + case STUDIO_XR: + case STUDIO_YR: + case STUDIO_ZR: + BoneAdj[j] = value * core::DEGTORAD; + break; + case STUDIO_X: + case STUDIO_Y: + case STUDIO_Z: + BoneAdj[j] = value; + break; + } + } +} + + +/*! +*/ +void CAnimatedMeshHalfLife::calcBoneQuaternion(const s32 frame, const SHalflifeBone * const bone, + SHalflifeAnimOffset *anim, const u32 j, f32& angle1, f32& angle2) const +{ + // three vector components + if (anim->offset[j+3] == 0) + { + angle2 = angle1 = bone->value[j+3]; // default + } + else + { + SHalflifeAnimationFrame *animvalue = (SHalflifeAnimationFrame *)((u8*)anim + anim->offset[j+3]); + s32 k = frame; + while (animvalue->num.total <= k) + { + k -= animvalue->num.total; + animvalue += animvalue->num.valid + 1; + } + // Bah, missing blend! + if (animvalue->num.valid > k) + { + angle1 = animvalue[k+1].value; + + if (animvalue->num.valid > k + 1) + { + angle2 = animvalue[k+2].value; + } + else + { + if (animvalue->num.total > k + 1) + angle2 = angle1; + else + angle2 = animvalue[animvalue->num.valid+2].value; + } + } + else + { + angle1 = animvalue[animvalue->num.valid].value; + if (animvalue->num.total > k + 1) + { + angle2 = angle1; + } + else + { + angle2 = animvalue[animvalue->num.valid + 2].value; + } + } + angle1 = bone->value[j+3] + angle1 * bone->scale[j+3]; + angle2 = bone->value[j+3] + angle2 * bone->scale[j+3]; + } + + if (bone->bonecontroller[j+3] != -1) + { + angle1 += BoneAdj[bone->bonecontroller[j+3]]; + angle2 += BoneAdj[bone->bonecontroller[j+3]]; + } +} + + +/*! +*/ +void CAnimatedMeshHalfLife::calcBonePosition(const s32 frame, f32 s, + const SHalflifeBone * const bone, SHalflifeAnimOffset *anim, f32 *pos) const +{ + for (s32 j = 0; j < 3; ++j) + { + pos[j] = bone->value[j]; // default; + if (anim->offset[j] != 0) + { + SHalflifeAnimationFrame *animvalue = (SHalflifeAnimationFrame *)((u8*)anim + anim->offset[j]); + + s32 k = frame; + // find span of values that includes the frame we want + while (animvalue->num.total <= k) + { + k -= animvalue->num.total; + animvalue += animvalue->num.valid + 1; + } + // if we're inside the span + if (animvalue->num.valid > k) + { + // and there's more data in the span + if (animvalue->num.valid > k + 1) + { + pos[j] += (animvalue[k+1].value * (1.f - s) + s * animvalue[k+2].value) * bone->scale[j]; + } + else + { + pos[j] += animvalue[k+1].value * bone->scale[j]; + } + } + else + { + // are we at the end of the repeating values section and there's another section with data? + if (animvalue->num.total <= k + 1) + { + pos[j] += (animvalue[animvalue->num.valid].value * (1.f - s) + s * animvalue[animvalue->num.valid + 2].value) * bone->scale[j]; + } + else + { + pos[j] += animvalue[animvalue->num.valid].value * bone->scale[j]; + } + } + } + if (bone->bonecontroller[j] != -1) + { + pos[j] += BoneAdj[bone->bonecontroller[j]]; + } + } +} + + +/*! +*/ +void CAnimatedMeshHalfLife::calcRotations(vec3_hl *pos, vec4_hl *q, + SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f) +{ + s32 frame = (s32)f; + f32 s = (f - frame); + + // add in programatic controllers + calcBoneAdj(); + + SHalflifeBone *bone = (SHalflifeBone *)((u8 *)Header + Header->boneindex); + for ( u32 i = 0; i < Header->numbones; i++, bone++, anim++) + { + core::vector3df angle1, angle2; + calcBoneQuaternion(frame, bone, anim, 0, angle1.X, angle2.X); + calcBoneQuaternion(frame, bone, anim, 1, angle1.Y, angle2.Y); + calcBoneQuaternion(frame, bone, anim, 2, angle1.Z, angle2.Z); + + if (!angle1.equals(angle2)) + { + vec4_hl q1, q2; + AngleQuaternion( angle1, q1 ); + AngleQuaternion( angle2, q2 ); + QuaternionSlerp( q1, q2, s, q[i] ); + } + else + { + AngleQuaternion( angle1, q[i] ); + } + + calcBonePosition(frame, s, bone, anim, pos[i]); + } + + if (seq->motiontype & STUDIO_X) + pos[seq->motionbone][0] = 0.f; + if (seq->motiontype & STUDIO_Y) + pos[seq->motionbone][1] = 0.f; + if (seq->motiontype & STUDIO_Z) + pos[seq->motionbone][2] = 0.f; +} + + +/*! +*/ +SHalflifeAnimOffset * CAnimatedMeshHalfLife::getAnim( SHalflifeSequence *seq ) +{ + SHalflifeSequenceGroup *seqgroup = (SHalflifeSequenceGroup *)((u8*)Header + Header->seqgroupindex) + seq->seqgroup; + + if (seq->seqgroup == 0) + { + return (SHalflifeAnimOffset *)((u8*)Header + seqgroup->data + seq->animindex); + } + + return (SHalflifeAnimOffset *)((u8*)AnimationHeader[seq->seqgroup] + seq->animindex); +} + + +/*! +*/ +void CAnimatedMeshHalfLife::slerpBones(vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s) +{ + if (s < 0) + s = 0; + else if (s > 1.f) + s = 1.f; + + f32 s1 = 1.f - s; + + for ( u32 i = 0; i < Header->numbones; i++) + { + vec4_hl q3; + QuaternionSlerp( q1[i], q2[i], s, q3 ); + q1[i][0] = q3[0]; + q1[i][1] = q3[1]; + q1[i][2] = q3[2]; + q1[i][3] = q3[3]; + pos1[i][0] = pos1[i][0] * s1 + pos2[i][0] * s; + pos1[i][1] = pos1[i][1] * s1 + pos2[i][1] * s; + pos1[i][2] = pos1[i][2] * s1 + pos2[i][2] * s; + } +} + + +/*! +*/ +void CAnimatedMeshHalfLife::setUpBones() +{ + static vec3_hl pos[MAXSTUDIOBONES]; + f32 bonematrix[3][4]; + static vec4_hl q[MAXSTUDIOBONES]; + + static vec3_hl pos2[MAXSTUDIOBONES]; + static vec4_hl q2[MAXSTUDIOBONES]; + static vec3_hl pos3[MAXSTUDIOBONES]; + static vec4_hl q3[MAXSTUDIOBONES]; + static vec3_hl pos4[MAXSTUDIOBONES]; + static vec4_hl q4[MAXSTUDIOBONES]; + + if (SequenceIndex >= Header->numseq) + SequenceIndex = 0; + + SHalflifeSequence *seq = (SHalflifeSequence *)((u8*) Header + Header->seqindex) + SequenceIndex; + + SHalflifeAnimOffset *anim = getAnim(seq); + calcRotations(pos, q, seq, anim, CurrentFrame); + + if (seq->numblends > 1) + { + anim += Header->numbones; + calcRotations( pos2, q2, seq, anim, CurrentFrame ); + f32 s = Blending[0] / 255.f; + + slerpBones( q, pos, q2, pos2, s ); + + if (seq->numblends == 4) + { + anim += Header->numbones; + calcRotations( pos3, q3, seq, anim, CurrentFrame ); + + anim += Header->numbones; + calcRotations( pos4, q4, seq, anim, CurrentFrame ); + + s = Blending[0] / 255.f; + slerpBones( q3, pos3, q4, pos4, s ); + + s = Blending[1] / 255.f; + slerpBones( q, pos, q3, pos3, s ); + } + } + + SHalflifeBone *bone = (SHalflifeBone *)((u8*) Header + Header->boneindex); + + for (u32 i = 0; i < Header->numbones; i++) + { + QuaternionMatrix( q[i], bonematrix ); + + bonematrix[0][3] = pos[i][0]; + bonematrix[1][3] = pos[i][1]; + bonematrix[2][3] = pos[i][2]; + + if (bone[i].parent == -1) { + memcpy(BoneTransform[i], bonematrix, sizeof(f32) * 12); + } + else { + R_ConcatTransforms (BoneTransform[bone[i].parent], bonematrix, BoneTransform[i]); + } + } +} + + +//! Returns an axis aligned bounding box +const core::aabbox3d<f32>& CAnimatedMeshHalfLife::getBoundingBox() const +{ + return MeshIPol->BoundingBox; +} + + +//! Returns the type of the animated mesh. +E_ANIMATED_MESH_TYPE CAnimatedMeshHalfLife::getMeshType() const +{ + return EAMT_MDL_HALFLIFE; +} + + +//! returns amount of mesh buffers. +u32 CAnimatedMeshHalfLife::getMeshBufferCount() const +{ + return MeshIPol->getMeshBufferCount(); +} + + +//! returns pointer to a mesh buffer +IMeshBuffer* CAnimatedMeshHalfLife::getMeshBuffer(u32 nr) const +{ + return MeshIPol->getMeshBuffer(nr); +} + + +//! Returns pointer to a mesh buffer which fits a material +/** \param material: material to search for +\return Returns the pointer to the mesh buffer or +NULL if there is no such mesh buffer. */ +IMeshBuffer* CAnimatedMeshHalfLife::getMeshBuffer(const video::SMaterial &material) const +{ + return MeshIPol->getMeshBuffer(material); +} + + +void CAnimatedMeshHalfLife::setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) +{ + MeshIPol->setMaterialFlag ( flag, newvalue ); +} + + +//! set user axis aligned bounding box +void CAnimatedMeshHalfLife::setBoundingBox(const core::aabbox3df& box) +{ + MeshIPol->setBoundingBox(box); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_MD3_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.h new file mode 100644 index 0000000..32a4ef8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshHalfLife.h @@ -0,0 +1,630 @@ +// Copyright (C) 2002-2012 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ANIMATED_MESH_HALFLIFE_H_INCLUDED__ +#define __C_ANIMATED_MESH_HALFLIFE_H_INCLUDED__ + +#include "IAnimatedMesh.h" +#include "ISceneManager.h" +#include "irrArray.h" +#include "irrString.h" +#include "IMeshLoader.h" +#include "SMesh.h" +#include "IReadFile.h" + +namespace irr +{ +namespace scene +{ + + + // STUDIO MODELS, Copyright (c) 1998, Valve LLC. All rights reserved. + #define MAXSTUDIOTRIANGLES 20000 // TODO: tune this + #define MAXSTUDIOVERTS 2048 // TODO: tune this + #define MAXSTUDIOSEQUENCES 256 // total animation sequences + #define MAXSTUDIOSKINS 100 // total textures + #define MAXSTUDIOSRCBONES 512 // bones allowed at source movement + #define MAXSTUDIOBONES 128 // total bones actually used + #define MAXSTUDIOMODELS 32 // sub-models per model + #define MAXSTUDIOBODYPARTS 32 + #define MAXSTUDIOGROUPS 4 + #define MAXSTUDIOANIMATIONS 512 // per sequence + #define MAXSTUDIOMESHES 256 + #define MAXSTUDIOEVENTS 1024 + #define MAXSTUDIOPIVOTS 256 + #define MAXSTUDIOCONTROLLERS 8 + + typedef f32 vec3_hl[3]; // x,y,z + typedef f32 vec4_hl[4]; // x,y,z,w + +// byte-align structures +#include "irrpack.h" + + struct SHalflifeHeader + { + c8 id[4]; + s32 version; + + c8 name[64]; + s32 length; + + vec3_hl eyeposition; // ideal eye position + vec3_hl min; // ideal movement hull size + vec3_hl max; + + vec3_hl bbmin; // clipping bounding box + vec3_hl bbmax; + + s32 flags; + + u32 numbones; // bones + u32 boneindex; + + u32 numbonecontrollers; // bone controllers + u32 bonecontrollerindex; + + u32 numhitboxes; // complex bounding boxes + u32 hitboxindex; + + u32 numseq; // animation sequences + u32 seqindex; + + u32 numseqgroups; // demand loaded sequences + u32 seqgroupindex; + + u32 numtextures; // raw textures + u32 textureindex; + u32 texturedataindex; + + u32 numskinref; // replaceable textures + u32 numskinfamilies; + u32 skinindex; + + u32 numbodyparts; + u32 bodypartindex; + + u32 numattachments; // queryable attachable points + u32 attachmentindex; + + s32 soundtable; + s32 soundindex; + s32 soundgroups; + s32 soundgroupindex; + + s32 numtransitions; // animation node to animation node transition graph + s32 transitionindex; + } PACK_STRUCT; + + // header for demand loaded sequence group data + struct studioseqhdr_t + { + s32 id; + s32 version; + + c8 name[64]; + s32 length; + } PACK_STRUCT; + + // bones + struct SHalflifeBone + { + c8 name[32]; // bone name for symbolic links + s32 parent; // parent bone + s32 flags; // ?? + s32 bonecontroller[6]; // bone controller index, -1 == none + f32 value[6]; // default DoF values + f32 scale[6]; // scale for delta DoF values + } PACK_STRUCT; + + + // bone controllers + struct SHalflifeBoneController + { + s32 bone; // -1 == 0 + s32 type; // X, Y, Z, XR, YR, ZR, M + f32 start; + f32 end; + s32 rest; // byte index value at rest + s32 index; // 0-3 user set controller, 4 mouth + } PACK_STRUCT; + + // intersection boxes + struct SHalflifeBBox + { + s32 bone; + s32 group; // intersection group + vec3_hl bbmin; // bounding box + vec3_hl bbmax; + } PACK_STRUCT; + +#ifndef ZONE_H + // NOTE: this was a void*, but that crashes on 64bit. + // I have found no mdl format desc, so not sure what it's meant to be, but s32 at least works. + typedef s32 cache_user_t; +#endif + + // demand loaded sequence groups + struct SHalflifeSequenceGroup + { + c8 label[32]; // textual name + c8 name[64]; // file name + cache_user_t cache; // cache index pointer + s32 data; // hack for group 0 + } PACK_STRUCT; + + // sequence descriptions + struct SHalflifeSequence + { + c8 label[32]; // sequence label + + f32 fps; // frames per second + s32 flags; // looping/non-looping flags + + s32 activity; + s32 actweight; + + s32 numevents; + s32 eventindex; + + s32 numframes; // number of frames per sequence + + u32 numpivots; // number of foot pivots + u32 pivotindex; + + s32 motiontype; + s32 motionbone; + vec3_hl linearmovement; + s32 automoveposindex; + s32 automoveangleindex; + + vec3_hl bbmin; // per sequence bounding box + vec3_hl bbmax; + + s32 numblends; + s32 animindex; // SHalflifeAnimOffset pointer relative to start of sequence group data + // [blend][bone][X, Y, Z, XR, YR, ZR] + + s32 blendtype[2]; // X, Y, Z, XR, YR, ZR + f32 blendstart[2]; // starting value + f32 blendend[2]; // ending value + s32 blendparent; + + s32 seqgroup; // sequence group for demand loading + + s32 entrynode; // transition node at entry + s32 exitnode; // transition node at exit + s32 nodeflags; // transition rules + + s32 nextseq; // auto advancing sequences + } PACK_STRUCT; + + // events + struct mstudioevent_t + { + s32 frame; + s32 event; + s32 type; + c8 options[64]; + } PACK_STRUCT; + + + // pivots + struct mstudiopivot_t + { + vec3_hl org; // pivot point + s32 start; + s32 end; + } PACK_STRUCT; + + // attachment + struct SHalflifeAttachment + { + c8 name[32]; + s32 type; + s32 bone; + vec3_hl org; // attachment point + vec3_hl vectors[3]; + } PACK_STRUCT; + + struct SHalflifeAnimOffset + { + u16 offset[6]; + } PACK_STRUCT; + + // animation frames + union SHalflifeAnimationFrame + { + struct { + u8 valid; + u8 total; + } PACK_STRUCT num; + s16 value; + } PACK_STRUCT; + + + // body part index + struct SHalflifeBody + { + c8 name[64]; + u32 nummodels; + u32 base; + u32 modelindex; // index into models array + } PACK_STRUCT; + + + // skin info + struct SHalflifeTexture + { + c8 name[64]; + s32 flags; + s32 width; + s32 height; + s32 index; + } PACK_STRUCT; + + + // skin families + // short index[skinfamilies][skinref] + + // studio models + struct SHalflifeModel + { + c8 name[64]; + s32 type; + + f32 boundingradius; + + u32 nummesh; + u32 meshindex; + + u32 numverts; // number of unique vertices + u32 vertinfoindex; // vertex bone info + u32 vertindex; // vertex vec3_hl + u32 numnorms; // number of unique surface normals + u32 norminfoindex; // normal bone info + u32 normindex; // normal vec3_hl + + u32 numgroups; // deformation groups + u32 groupindex; + } PACK_STRUCT; + + + // meshes + struct SHalflifeMesh + { + u32 numtris; + u32 triindex; + u32 skinref; + u32 numnorms; // per mesh normals + u32 normindex; // normal vec3_hl + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + // lighting options + #define STUDIO_NF_FLATSHADE 0x0001 + #define STUDIO_NF_CHROME 0x0002 + #define STUDIO_NF_FULLBRIGHT 0x0004 + + // motion flags + #define STUDIO_X 0x0001 + #define STUDIO_Y 0x0002 + #define STUDIO_Z 0x0004 + #define STUDIO_XR 0x0008 + #define STUDIO_YR 0x0010 + #define STUDIO_ZR 0x0020 + #define STUDIO_LX 0x0040 + #define STUDIO_LY 0x0080 + #define STUDIO_LZ 0x0100 + #define STUDIO_AX 0x0200 + #define STUDIO_AY 0x0400 + #define STUDIO_AZ 0x0800 + #define STUDIO_AXR 0x1000 + #define STUDIO_AYR 0x2000 + #define STUDIO_AZR 0x4000 + #define STUDIO_TYPES 0x7FFF + #define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance + + // sequence flags + #define STUDIO_LOOPING 0x0001 + + // bone flags + #define STUDIO_HAS_NORMALS 0x0001 + #define STUDIO_HAS_VERTICES 0x0002 + #define STUDIO_HAS_BBOX 0x0004 + #define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them + + #define RAD_TO_STUDIO (32768.0/M_PI) + #define STUDIO_TO_RAD (M_PI/32768.0) + + /*! + Textureatlas + Combine Source Images with arbitrary size and bithdepth to an Image with 2^n size + borders from the source images are copied around for allowing filtering ( bilinear, mipmap ) + */ + struct STextureAtlas + { + STextureAtlas () + { + release(); + } + + virtual ~STextureAtlas () + { + release (); + } + + void release (); + void addSource ( const c8 * name, video::IImage * image ); + void create ( u32 pixelborder, video::E_TEXTURE_CLAMP texmode ); + void getScale ( core::vector2df &scale ); + void getTranslation ( const c8 * name, core::vector2di &pos ); + + struct TextureAtlasEntry + { + io::path name; + u32 width; + u32 height; + + core::vector2di pos; + + video::IImage * image; + + bool operator < ( const TextureAtlasEntry & other ) + { + return height > other.height; + } + }; + + + core::array < TextureAtlasEntry > atlas; + video::IImage * Master; + }; + + + //! Possible types of Animation Type + enum E_ANIMATION_TYPE + { + //! No Animation + EAMT_STILL, + //! From Start to End, then Stop ( Limited Line ) + EAMT_WAYPOINT, + //! Linear Cycling Animation ( Sawtooth ) + EAMT_LOOPING, + //! Linear bobbing ( Triangle ) + EAMT_PINGPONG + }; + + //! Names for Animation Type + const c8* const MeshAnimationTypeNames[] = + { + "still", + "waypoint", + "looping", + "pingpong", + 0 + }; + + + //! Data for holding named Animation Info + struct KeyFrameInterpolation + { + core::stringc Name; // Name of the current Animation/Bone + E_ANIMATION_TYPE AnimationType; // Type of Animation ( looping, usw..) + + f32 CurrentFrame; // Current Frame + s32 NextFrame; // Frame which will be used next. For blending + + s32 StartFrame; // Absolute Frame where the current animation start + s32 Frames; // Relative Frames how much Frames this animation have + s32 LoopingFrames; // How much of Frames sould be looped + s32 EndFrame; // Absolute Frame where the current animation ends End = start + frames - 1 + + f32 FramesPerSecond; // Speed in Frames/Seconds the animation is played + f32 RelativeSpeed; // Factor Original fps is modified + + u32 BeginTime; // Animation started at this thime + u32 EndTime; // Animation end at this time + u32 LastTime; // Last Keyframe was done at this time + + KeyFrameInterpolation ( const c8 * name = "", s32 start = 0, s32 frames = 0, s32 loopingframes = 0, + f32 fps = 0.f, f32 relativefps = 1.f ) + : Name ( name ), AnimationType ( loopingframes ? EAMT_LOOPING : EAMT_WAYPOINT), + CurrentFrame ( (f32) start ), NextFrame ( start ), StartFrame ( start ), + Frames ( frames ), LoopingFrames ( loopingframes ), EndFrame ( start + frames - 1 ), + FramesPerSecond ( fps ), RelativeSpeed ( relativefps ), + BeginTime ( 0 ), EndTime ( 0 ), LastTime ( 0 ) + { + } + + // linear search + bool operator == ( const KeyFrameInterpolation & other ) const + { + return Name.equals_ignore_case ( other.Name ); + } + + }; + + + //! a List holding named Animations + typedef core::array < KeyFrameInterpolation > IAnimationList; + + //! a List holding named Skins + typedef core::array < core::stringc > ISkinList; + + + // Current Model per Body + struct SubModel + { + core::stringc name; + u32 startBuffer; + u32 endBuffer; + u32 state; + }; + + struct BodyPart + { + core::stringc name; + u32 defaultModel; + core::array < SubModel > model; + }; + //! a List holding named Models and SubModels + typedef core::array < BodyPart > IBodyList; + + + class CAnimatedMeshHalfLife : public IAnimatedMesh + { + public: + + //! constructor + CAnimatedMeshHalfLife(); + + //! destructor + virtual ~CAnimatedMeshHalfLife(); + + //! loads a Halflife mdl file + virtual bool loadModelFile( io::IReadFile* file, ISceneManager * smgr ); + + //IAnimatedMesh + virtual u32 getFrameCount() const; + virtual IMesh* getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop); + virtual const core::aabbox3d<f32>& getBoundingBox() const; + virtual E_ANIMATED_MESH_TYPE getMeshType() const; + virtual void renderModel ( u32 param, video::IVideoDriver * driver, const core::matrix4 &absoluteTransformation); + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const; + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const; + //! Returns pointer to a mesh buffer which fits a material + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const; + + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue); + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! set user axis aligned bounding box + virtual void setBoundingBox(const core::aabbox3df& box); + + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const + { + return FramesPerSecond; + } + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps) + { + FramesPerSecond=fps; + } + + //! Get the Animation List + virtual IAnimationList* getAnimList () { return &AnimList; } + + //! Return the named Body List of this Animated Mesh + virtual IBodyList *getBodyList() { return &BodyList; } + + private: + + // KeyFrame Animation List + IAnimationList AnimList; + // Sum of all sequences + u32 FrameCount; + + // Named meshes of the Body + IBodyList BodyList; + + //! return a Mesh per frame + SMesh* MeshIPol; + + ISceneManager *SceneManager; + + SHalflifeHeader *Header; + SHalflifeHeader *TextureHeader; + bool OwnTexModel; // do we have a modelT.mdl ? + SHalflifeHeader *AnimationHeader[32]; // sequences named model01.mdl, model02.mdl + + void initData (); + SHalflifeHeader * loadModel( io::IReadFile* file, const io::path &filename ); + bool postLoadModel( const io::path &filename ); + + u32 SequenceIndex; // sequence index + f32 CurrentFrame; // Current Frame + f32 FramesPerSecond; + + #define MOUTH_CONTROLLER 4 + u8 BoneController[4 + 1 ]; // bone controllers + mouth position + u8 Blending[2]; // animation blending + + vec4_hl BoneAdj; + f32 SetController( s32 controllerIndex, f32 value ); + + u32 SkinGroupSelection; // skin group selection + u32 SetSkin( u32 value ); + + void initModel(); + void dumpModelInfo(u32 level) const; + + void ExtractBbox(s32 sequence, core::aabbox3df &box) const; + + void setUpBones (); + SHalflifeAnimOffset * getAnim( SHalflifeSequence *seq ); + void slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s ); + void calcRotations ( vec3_hl *pos, vec4_hl *q, SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f ); + + void calcBoneAdj(); + void calcBoneQuaternion(const s32 frame, const SHalflifeBone *bone, SHalflifeAnimOffset *anim, const u32 j, f32& angle1, f32& angle2) const; + void calcBonePosition(const s32 frame, f32 s, const SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const; + + void buildVertices (); + + io::path TextureBaseName; + +#define HL_TEXTURE_ATLAS + +#ifdef HL_TEXTURE_ATLAS + STextureAtlas TextureAtlas; + video::ITexture *TextureMaster; +#endif + + }; + + + //! Meshloader capable of loading HalfLife Model files + class CHalflifeMDLMeshFileLoader : public IMeshLoader + { + public: + + //! Constructor + CHalflifeMDLMeshFileLoader( scene::ISceneManager* smgr ); + + //! returns true if the file maybe is able to be loaded by this class + /** based on the file extension (e.g. ".bsp") */ + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + /** \return Pointer to the created mesh. Returns 0 if loading failed. + If you no longer need the mesh, you should call IAnimatedMesh::drop(). + See IReferenceCounted::drop() for more information. + */ + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + private: + scene::ISceneManager* SceneManager; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.cpp new file mode 100644 index 0000000..3c4f55c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.cpp @@ -0,0 +1,457 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_MD2_LOADER_ + +#include "CAnimatedMeshMD2.h" +#include "SColor.h" +#include "irrMath.h" + +namespace irr +{ +namespace scene +{ + +const s32 MD2_FRAME_SHIFT = 2; +const f32 MD2_FRAME_SHIFT_RECIPROCAL = 1.f / (1 << MD2_FRAME_SHIFT); + +const s32 Q2_VERTEX_NORMAL_TABLE_SIZE = 162; + +static const f32 Q2_VERTEX_NORMAL_TABLE[Q2_VERTEX_NORMAL_TABLE_SIZE][3] = { + {-0.525731f, 0.000000f, 0.850651f}, + {-0.442863f, 0.238856f, 0.864188f}, + {-0.295242f, 0.000000f, 0.955423f}, + {-0.309017f, 0.500000f, 0.809017f}, + {-0.162460f, 0.262866f, 0.951056f}, + {0.000000f, 0.000000f, 1.000000f}, + {0.000000f, 0.850651f, 0.525731f}, + {-0.147621f, 0.716567f, 0.681718f}, + {0.147621f, 0.716567f, 0.681718f}, + {0.000000f, 0.525731f, 0.850651f}, + {0.309017f, 0.500000f, 0.809017f}, + {0.525731f, 0.000000f, 0.850651f}, + {0.295242f, 0.000000f, 0.955423f}, + {0.442863f, 0.238856f, 0.864188f}, + {0.162460f, 0.262866f, 0.951056f}, + {-0.681718f, 0.147621f, 0.716567f}, + {-0.809017f, 0.309017f, 0.500000f}, + {-0.587785f, 0.425325f, 0.688191f}, + {-0.850651f, 0.525731f, 0.000000f}, + {-0.864188f, 0.442863f, 0.238856f}, + {-0.716567f, 0.681718f, 0.147621f}, + {-0.688191f, 0.587785f, 0.425325f}, + {-0.500000f, 0.809017f, 0.309017f}, + {-0.238856f, 0.864188f, 0.442863f}, + {-0.425325f, 0.688191f, 0.587785f}, + {-0.716567f, 0.681718f, -0.147621f}, + {-0.500000f, 0.809017f, -0.309017f}, + {-0.525731f, 0.850651f, 0.000000f}, + {0.000000f, 0.850651f, -0.525731f}, + {-0.238856f, 0.864188f, -0.442863f}, + {0.000000f, 0.955423f, -0.295242f}, + {-0.262866f, 0.951056f, -0.162460f}, + {0.000000f, 1.000000f, 0.000000f}, + {0.000000f, 0.955423f, 0.295242f}, + {-0.262866f, 0.951056f, 0.162460f}, + {0.238856f, 0.864188f, 0.442863f}, + {0.262866f, 0.951056f, 0.162460f}, + {0.500000f, 0.809017f, 0.309017f}, + {0.238856f, 0.864188f, -0.442863f}, + {0.262866f, 0.951056f, -0.162460f}, + {0.500000f, 0.809017f, -0.309017f}, + {0.850651f, 0.525731f, 0.000000f}, + {0.716567f, 0.681718f, 0.147621f}, + {0.716567f, 0.681718f, -0.147621f}, + {0.525731f, 0.850651f, 0.000000f}, + {0.425325f, 0.688191f, 0.587785f}, + {0.864188f, 0.442863f, 0.238856f}, + {0.688191f, 0.587785f, 0.425325f}, + {0.809017f, 0.309017f, 0.500000f}, + {0.681718f, 0.147621f, 0.716567f}, + {0.587785f, 0.425325f, 0.688191f}, + {0.955423f, 0.295242f, 0.000000f}, + {1.000000f, 0.000000f, 0.000000f}, + {0.951056f, 0.162460f, 0.262866f}, + {0.850651f, -0.525731f, 0.000000f}, + {0.955423f, -0.295242f, 0.000000f}, + {0.864188f, -0.442863f, 0.238856f}, + {0.951056f, -0.162460f, 0.262866f}, + {0.809017f, -0.309017f, 0.500000f}, + {0.681718f, -0.147621f, 0.716567f}, + {0.850651f, 0.000000f, 0.525731f}, + {0.864188f, 0.442863f, -0.238856f}, + {0.809017f, 0.309017f, -0.500000f}, + {0.951056f, 0.162460f, -0.262866f}, + {0.525731f, 0.000000f, -0.850651f}, + {0.681718f, 0.147621f, -0.716567f}, + {0.681718f, -0.147621f, -0.716567f}, + {0.850651f, 0.000000f, -0.525731f}, + {0.809017f, -0.309017f, -0.500000f}, + {0.864188f, -0.442863f, -0.238856f}, + {0.951056f, -0.162460f, -0.262866f}, + {0.147621f, 0.716567f, -0.681718f}, + {0.309017f, 0.500000f, -0.809017f}, + {0.425325f, 0.688191f, -0.587785f}, + {0.442863f, 0.238856f, -0.864188f}, + {0.587785f, 0.425325f, -0.688191f}, + {0.688191f, 0.587785f, -0.425325f}, + {-0.147621f, 0.716567f, -0.681718f}, + {-0.309017f, 0.500000f, -0.809017f}, + {0.000000f, 0.525731f, -0.850651f}, + {-0.525731f, 0.000000f, -0.850651f}, + {-0.442863f, 0.238856f, -0.864188f}, + {-0.295242f, 0.000000f, -0.955423f}, + {-0.162460f, 0.262866f, -0.951056f}, + {0.000000f, 0.000000f, -1.000000f}, + {0.295242f, 0.000000f, -0.955423f}, + {0.162460f, 0.262866f, -0.951056f}, + {-0.442863f, -0.238856f, -0.864188f}, + {-0.309017f, -0.500000f, -0.809017f}, + {-0.162460f, -0.262866f, -0.951056f}, + {0.000000f, -0.850651f, -0.525731f}, + {-0.147621f, -0.716567f, -0.681718f}, + {0.147621f, -0.716567f, -0.681718f}, + {0.000000f, -0.525731f, -0.850651f}, + {0.309017f, -0.500000f, -0.809017f}, + {0.442863f, -0.238856f, -0.864188f}, + {0.162460f, -0.262866f, -0.951056f}, + {0.238856f, -0.864188f, -0.442863f}, + {0.500000f, -0.809017f, -0.309017f}, + {0.425325f, -0.688191f, -0.587785f}, + {0.716567f, -0.681718f, -0.147621f}, + {0.688191f, -0.587785f, -0.425325f}, + {0.587785f, -0.425325f, -0.688191f}, + {0.000000f, -0.955423f, -0.295242f}, + {0.000000f, -1.000000f, 0.000000f}, + {0.262866f, -0.951056f, -0.162460f}, + {0.000000f, -0.850651f, 0.525731f}, + {0.000000f, -0.955423f, 0.295242f}, + {0.238856f, -0.864188f, 0.442863f}, + {0.262866f, -0.951056f, 0.162460f}, + {0.500000f, -0.809017f, 0.309017f}, + {0.716567f, -0.681718f, 0.147621f}, + {0.525731f, -0.850651f, 0.000000f}, + {-0.238856f, -0.864188f, -0.442863f}, + {-0.500000f, -0.809017f, -0.309017f}, + {-0.262866f, -0.951056f, -0.162460f}, + {-0.850651f, -0.525731f, 0.000000f}, + {-0.716567f, -0.681718f, -0.147621f}, + {-0.716567f, -0.681718f, 0.147621f}, + {-0.525731f, -0.850651f, 0.000000f}, + {-0.500000f, -0.809017f, 0.309017f}, + {-0.238856f, -0.864188f, 0.442863f}, + {-0.262866f, -0.951056f, 0.162460f}, + {-0.864188f, -0.442863f, 0.238856f}, + {-0.809017f, -0.309017f, 0.500000f}, + {-0.688191f, -0.587785f, 0.425325f}, + {-0.681718f, -0.147621f, 0.716567f}, + {-0.442863f, -0.238856f, 0.864188f}, + {-0.587785f, -0.425325f, 0.688191f}, + {-0.309017f, -0.500000f, 0.809017f}, + {-0.147621f, -0.716567f, 0.681718f}, + {-0.425325f, -0.688191f, 0.587785f}, + {-0.162460f, -0.262866f, 0.951056f}, + {0.442863f, -0.238856f, 0.864188f}, + {0.162460f, -0.262866f, 0.951056f}, + {0.309017f, -0.500000f, 0.809017f}, + {0.147621f, -0.716567f, 0.681718f}, + {0.000000f, -0.525731f, 0.850651f}, + {0.425325f, -0.688191f, 0.587785f}, + {0.587785f, -0.425325f, 0.688191f}, + {0.688191f, -0.587785f, 0.425325f}, + {-0.955423f, 0.295242f, 0.000000f}, + {-0.951056f, 0.162460f, 0.262866f}, + {-1.000000f, 0.000000f, 0.000000f}, + {-0.850651f, 0.000000f, 0.525731f}, + {-0.955423f, -0.295242f, 0.000000f}, + {-0.951056f, -0.162460f, 0.262866f}, + {-0.864188f, 0.442863f, -0.238856f}, + {-0.951056f, 0.162460f, -0.262866f}, + {-0.809017f, 0.309017f, -0.500000f}, + {-0.864188f, -0.442863f, -0.238856f}, + {-0.951056f, -0.162460f, -0.262866f}, + {-0.809017f, -0.309017f, -0.500000f}, + {-0.681718f, 0.147621f, -0.716567f}, + {-0.681718f, -0.147621f, -0.716567f}, + {-0.850651f, 0.000000f, -0.525731f}, + {-0.688191f, 0.587785f, -0.425325f}, + {-0.587785f, 0.425325f, -0.688191f}, + {-0.425325f, 0.688191f, -0.587785f}, + {-0.425325f, -0.688191f, -0.587785f}, + {-0.587785f, -0.425325f, -0.688191f}, + {-0.688191f, -0.587785f, -0.425325f}, + }; + +struct SMD2AnimationType +{ + s32 begin; + s32 end; + s32 fps; +}; + +static const SMD2AnimationType MD2AnimationTypeList[21] = +{ + { 0, 39, 9}, // STAND + { 40, 45, 10}, // RUN + { 46, 53, 10}, // ATTACK + { 54, 57, 7}, // PAIN_A + { 58, 61, 7}, // PAIN_B + { 62, 65, 7}, // PAIN_C + { 66, 71, 7}, // JUMP + { 72, 83, 7}, // FLIP + { 84, 94, 7}, // SALUTE + { 95, 111, 10}, // FALLBACK + {112, 122, 7}, // WAVE + {123, 134, 6}, // POINT + {135, 153, 10}, // CROUCH_STAND + {154, 159, 7}, // CROUCH_WALK + {160, 168, 10}, // CROUCH_ATTACK + {169, 172, 7}, // CROUCH_PAIN + {173, 177, 5}, // CROUCH_DEATH + {178, 183, 7}, // DEATH_FALLBACK + {184, 189, 7}, // DEATH_FALLFORWARD + {190, 197, 7}, // DEATH_FALLBACKSLOW + {198, 198, 5}, // BOOM +}; + + +//! constructor +CAnimatedMeshMD2::CAnimatedMeshMD2() + : InterpolationBuffer(0), FrameList(0), FrameCount(0), FramesPerSecond((f32)(MD2AnimationTypeList[0].fps << MD2_FRAME_SHIFT)) +{ + #ifdef _DEBUG + IAnimatedMesh::setDebugName("CAnimatedMeshMD2 IAnimatedMesh"); + IMesh::setDebugName("CAnimatedMeshMD2 IMesh"); + #endif + InterpolationBuffer = new SMeshBuffer; +} + + +//! destructor +CAnimatedMeshMD2::~CAnimatedMeshMD2() +{ + delete [] FrameList; + if (InterpolationBuffer) + InterpolationBuffer->drop(); +} + + +//! returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. +u32 CAnimatedMeshMD2::getFrameCount() const +{ + return FrameCount<<MD2_FRAME_SHIFT; +} + + +//! returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. Note, that some Meshes will ignore the detail level. +IMesh* CAnimatedMeshMD2::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + if ((u32)frame > getFrameCount()) + frame = (frame % getFrameCount()); + + if (startFrameLoop == -1 && endFrameLoop == -1) + { + startFrameLoop = 0; + endFrameLoop = getFrameCount(); + } + + updateInterpolationBuffer(frame, startFrameLoop, endFrameLoop); + return this; +} + + +//! returns amount of mesh buffers. MD2 meshes only have one buffer +u32 CAnimatedMeshMD2::getMeshBufferCount() const +{ + return 1; +} + + +//! returns pointer to a mesh buffer +IMeshBuffer* CAnimatedMeshMD2::getMeshBuffer(u32 nr) const +{ + if (nr == 0) + return InterpolationBuffer; + else + return 0; +} + + +//! Returns pointer to a mesh buffer which fits a material +IMeshBuffer* CAnimatedMeshMD2::getMeshBuffer(const video::SMaterial &material) const +{ + if (InterpolationBuffer->Material == material) + return InterpolationBuffer; + else + return 0; +} + + +// updates the interpolation buffer +void CAnimatedMeshMD2::updateInterpolationBuffer(s32 frame, s32 startFrameLoop, s32 endFrameLoop) +{ + u32 firstFrame, secondFrame; + f32 div; + + // TA: resolve missing ipol in loop between end-start + + if (endFrameLoop - startFrameLoop == 0) + { + firstFrame = frame>>MD2_FRAME_SHIFT; + secondFrame = frame>>MD2_FRAME_SHIFT; + div = 1.0f; + } + else + { + // key frames + u32 s = startFrameLoop >> MD2_FRAME_SHIFT; + u32 e = endFrameLoop >> MD2_FRAME_SHIFT; + + firstFrame = frame >> MD2_FRAME_SHIFT; + secondFrame = core::if_c_a_else_b(firstFrame + 1 > e, s, firstFrame + 1); + + firstFrame = core::s32_min(FrameCount - 1, firstFrame); + secondFrame = core::s32_min(FrameCount - 1, secondFrame); + + //div = (frame % (1<<MD2_FRAME_SHIFT)) / (f32)(1<<MD2_FRAME_SHIFT); + frame &= (1<<MD2_FRAME_SHIFT) - 1; + div = frame * MD2_FRAME_SHIFT_RECIPROCAL; + } + + video::S3DVertex* target = static_cast<video::S3DVertex*>(InterpolationBuffer->getVertices()); + SMD2Vert* first = FrameList[firstFrame].pointer(); + SMD2Vert* second = FrameList[secondFrame].pointer(); + + // interpolate both frames + const u32 count = FrameList[firstFrame].size(); + for (u32 i=0; i<count; ++i) + { + const core::vector3df one = core::vector3df(f32(first->Pos.X) * FrameTransforms[firstFrame].scale.X + FrameTransforms[firstFrame].translate.X, + f32(first->Pos.Y) * FrameTransforms[firstFrame].scale.Y + FrameTransforms[firstFrame].translate.Y, + f32(first->Pos.Z) * FrameTransforms[firstFrame].scale.Z + FrameTransforms[firstFrame].translate.Z); + const core::vector3df two = core::vector3df(f32(second->Pos.X) * FrameTransforms[secondFrame].scale.X + FrameTransforms[secondFrame].translate.X, + f32(second->Pos.Y) * FrameTransforms[secondFrame].scale.Y + FrameTransforms[secondFrame].translate.Y, + f32(second->Pos.Z) * FrameTransforms[secondFrame].scale.Z + FrameTransforms[secondFrame].translate.Z); + target->Pos = two.getInterpolated(one, div); + const core::vector3df n1( + Q2_VERTEX_NORMAL_TABLE[first->NormalIdx][0], + Q2_VERTEX_NORMAL_TABLE[first->NormalIdx][2], + Q2_VERTEX_NORMAL_TABLE[first->NormalIdx][1]); + const core::vector3df n2( + Q2_VERTEX_NORMAL_TABLE[second->NormalIdx][0], + Q2_VERTEX_NORMAL_TABLE[second->NormalIdx][2], + Q2_VERTEX_NORMAL_TABLE[second->NormalIdx][1]); + target->Normal = n2.getInterpolated(n1, div); + ++target; + ++first; + ++second; + } + + //update bounding box + InterpolationBuffer->setBoundingBox(BoxList[secondFrame].getInterpolated(BoxList[firstFrame], div)); + InterpolationBuffer->setDirty(); +} + + +//! sets a flag of all contained materials to a new value +void CAnimatedMeshMD2::setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) +{ + InterpolationBuffer->Material.setFlag(flag, newvalue); +} + + +//! set the hardware mapping hint, for driver +void CAnimatedMeshMD2::setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, + E_BUFFER_TYPE buffer) +{ + InterpolationBuffer->setHardwareMappingHint(newMappingHint, buffer); +} + + +//! flags the meshbuffer as changed, reloads hardware buffers +void CAnimatedMeshMD2::setDirty(E_BUFFER_TYPE buffer) +{ + InterpolationBuffer->setDirty(buffer); +} + + +//! returns an axis aligned bounding box +const core::aabbox3d<f32>& CAnimatedMeshMD2::getBoundingBox() const +{ + return InterpolationBuffer->BoundingBox; +} + + +//! set user axis aligned bounding box +void CAnimatedMeshMD2::setBoundingBox(const core::aabbox3df& box) +{ + InterpolationBuffer->BoundingBox = box; +} + + +//! Returns the type of the animated mesh. +E_ANIMATED_MESH_TYPE CAnimatedMeshMD2::getMeshType() const +{ + return EAMT_MD2; +} + + +//! Returns frame loop data for a special MD2 animation type. +void CAnimatedMeshMD2::getFrameLoop(EMD2_ANIMATION_TYPE l, + s32& outBegin, s32& outEnd, s32& outFPS) const +{ + if (l < 0 || l >= EMAT_COUNT) + return; + + outBegin = MD2AnimationTypeList[l].begin << MD2_FRAME_SHIFT; + outEnd = MD2AnimationTypeList[l].end << MD2_FRAME_SHIFT; + + // correct to anim between last->first frame + outEnd += MD2_FRAME_SHIFT == 0 ? 1 : (1 << MD2_FRAME_SHIFT) - 1; + outFPS = MD2AnimationTypeList[l].fps << MD2_FRAME_SHIFT; +} + + +//! Returns frame loop data for a special MD2 animation type. +bool CAnimatedMeshMD2::getFrameLoop(const c8* name, + s32& outBegin, s32&outEnd, s32& outFPS) const +{ + for (u32 i=0; i < AnimationData.size(); ++i) + { + if (AnimationData[i].name == name) + { + outBegin = AnimationData[i].begin << MD2_FRAME_SHIFT; + outEnd = AnimationData[i].end << MD2_FRAME_SHIFT; + outEnd += MD2_FRAME_SHIFT == 0 ? 1 : (1 << MD2_FRAME_SHIFT) - 1; + outFPS = AnimationData[i].fps << MD2_FRAME_SHIFT; + return true; + } + } + + return false; +} + + +//! Returns amount of md2 animations in this file. +s32 CAnimatedMeshMD2::getAnimationCount() const +{ + return AnimationData.size(); +} + + +//! Returns name of md2 animation. +const c8* CAnimatedMeshMD2::getAnimationName(s32 nr) const +{ + if ((u32)nr >= AnimationData.size()) + return 0; + + return AnimationData[nr].name.c_str(); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_MD2_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.h new file mode 100644 index 0000000..0014910 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD2.h @@ -0,0 +1,154 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ANIMATED_MESH_MD2_H_INCLUDED__ +#define __C_ANIMATED_MESH_MD2_H_INCLUDED__ + +#include "IAnimatedMeshMD2.h" +#include "IMesh.h" +#include "CMeshBuffer.h" +#include "IReadFile.h" +#include "S3DVertex.h" +#include "irrArray.h" +#include "irrString.h" + +namespace irr +{ +namespace scene +{ + + class CAnimatedMeshMD2 : public IAnimatedMeshMD2 + { + public: + + //! constructor + CAnimatedMeshMD2(); + + //! destructor + virtual ~CAnimatedMeshMD2(); + + //! returns the amount of frames. If the amount is 1, it is a static (=non animated) mesh. + virtual u32 getFrameCount() const; + + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const + { + return FramesPerSecond; + } + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps) + { + FramesPerSecond=fps; + } + + //! returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. Note, that some Meshes will ignore the detail level. + virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1); + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const; + + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const; + + //! Returns pointer to a mesh buffer which fits a material + /** \param material: material to search for + \return Returns the pointer to the mesh buffer or + NULL if there is no such mesh buffer. */ + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const; + + //! returns an axis aligned bounding box + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! set user axis aligned bounding box + virtual void setBoundingBox( const core::aabbox3df& box); + + //! sets a flag of all contained materials to a new value + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue); + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! Returns the type of the animated mesh. + virtual E_ANIMATED_MESH_TYPE getMeshType() const; + + //! Returns frame loop data for a special MD2 animation type. + virtual void getFrameLoop(EMD2_ANIMATION_TYPE, + s32& outBegin, s32& outEnd, s32& outFps) const; + + //! Returns frame loop data for a special MD2 animation type. + virtual bool getFrameLoop(const c8* name, + s32& outBegin, s32& outEnd, s32& outFps) const; + + //! Returns amount of md2 animations in this file. + virtual s32 getAnimationCount() const; + + //! Returns name of md2 animation. + //! \param nr: Zero based index of animation. + virtual const c8* getAnimationName(s32 nr) const; + + + // + // exposed for loader + // + + //! the buffer that contains the most recent animation + SMeshBuffer* InterpolationBuffer; + + //! named animations + struct SAnimationData + { + core::stringc name; + s32 begin; + s32 end; + s32 fps; + }; + + //! scale and translations for keyframes + struct SKeyFrameTransform + { + core::vector3df scale; + core::vector3df translate; + }; + + //! md2 vertex data + struct SMD2Vert + { + core::vector3d<u8> Pos; + u8 NormalIdx; + }; + + //! keyframe transformations + core::array<SKeyFrameTransform> FrameTransforms; + + //! keyframe vertex data + core::array<SMD2Vert> *FrameList; + + //! bounding boxes for each keyframe + core::array<core::aabbox3d<f32> > BoxList; + + //! named animations + core::array< SAnimationData > AnimationData; + + u32 FrameCount; + + private: + + //! updates the interpolation buffer + void updateInterpolationBuffer(s32 frame, s32 startFrame, s32 endFrame); + + f32 FramesPerSecond; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.cpp new file mode 100644 index 0000000..0d3a091 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.cpp @@ -0,0 +1,468 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Fabio Concas / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_MD3_LOADER_ + +#include "CAnimatedMeshMD3.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + +// byte-align structures +#include "irrpack.h" + +//! General properties of a single animation frame. +struct SMD3Frame +{ + f32 mins[3]; // bounding box per frame + f32 maxs[3]; + f32 position[3]; // position of bounding box + f32 radius; // radius of bounding sphere + c8 creator[16]; // name of frame +} PACK_STRUCT; + + +//! An attachment point for another MD3 model. +struct SMD3Tag +{ + c8 Name[64]; //name of 'tag' as it's usually called in the md3 files try to see it as a sub-mesh/seperate mesh-part. + f32 position[3]; //relative position of tag + f32 rotationMatrix[9]; //3x3 rotation direction of tag +} PACK_STRUCT; + +//!Shader +struct SMD3Shader +{ + c8 name[64]; // name of shader + s32 shaderIndex; +} PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + +//! Constructor +CAnimatedMeshMD3::CAnimatedMeshMD3() +:Mesh(0), IPolShift(0), LoopMode(0), Scaling(1.f)//, FramesPerSecond(25.f) +{ +#ifdef _DEBUG + setDebugName("CAnimatedMeshMD3"); +#endif + + Mesh = new SMD3Mesh(); + MeshIPol = new SMesh(); + setInterpolationShift(0, 0); +} + + +//! Destructor +CAnimatedMeshMD3::~CAnimatedMeshMD3() +{ + if (Mesh) + Mesh->drop(); + if (MeshIPol) + MeshIPol->drop(); +} + + +//! Returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. +u32 CAnimatedMeshMD3::getFrameCount() const +{ + return Mesh->MD3Header.numFrames << IPolShift; +} + + +//! Rendering Hint +void CAnimatedMeshMD3::setInterpolationShift(u32 shift, u32 loopMode) +{ + IPolShift = shift; + LoopMode = loopMode; +} + + +//! returns amount of mesh buffers. +u32 CAnimatedMeshMD3::getMeshBufferCount() const +{ + return MeshIPol->getMeshBufferCount(); +} + + +//! returns pointer to a mesh buffer +IMeshBuffer* CAnimatedMeshMD3::getMeshBuffer(u32 nr) const +{ + return MeshIPol->getMeshBuffer(nr); +} + + +//! Returns pointer to a mesh buffer which fits a material +IMeshBuffer* CAnimatedMeshMD3::getMeshBuffer(const video::SMaterial &material) const +{ + return MeshIPol->getMeshBuffer(material); +} + + +void CAnimatedMeshMD3::setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) +{ + MeshIPol->setMaterialFlag(flag, newvalue); +} + + +//! set the hardware mapping hint, for driver +void CAnimatedMeshMD3::setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, + E_BUFFER_TYPE buffer) +{ + MeshIPol->setHardwareMappingHint(newMappingHint, buffer); +} + + +//! flags the meshbuffer as changed, reloads hardware buffers +void CAnimatedMeshMD3::setDirty(E_BUFFER_TYPE buffer) +{ + MeshIPol->setDirty(buffer); +} + + +//! set user axis aligned bounding box +void CAnimatedMeshMD3::setBoundingBox(const core::aabbox3df& box) +{ + MeshIPol->setBoundingBox(box); +} + + +//! Returns the animated tag list based on a detail level. 0 is the lowest, 255 the highest detail. +SMD3QuaternionTagList *CAnimatedMeshMD3::getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + if (0 == Mesh) + return 0; + + getMesh(frame, detailLevel, startFrameLoop, endFrameLoop); + return &TagListIPol; +} + + +//! Returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. +IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + if (0 == Mesh) + return 0; + + //! check if we have the mesh in our private cache + SCacheInfo candidate(frame, startFrameLoop, endFrameLoop); + if (candidate == Current) + return MeshIPol; + + startFrameLoop = core::s32_max(0, startFrameLoop >> IPolShift); + endFrameLoop = core::if_c_a_else_b(endFrameLoop < 0, Mesh->MD3Header.numFrames - 1, endFrameLoop >> IPolShift); + + const u32 mask = 1 << IPolShift; + + s32 frameA; + s32 frameB; + f32 iPol; + + if (LoopMode) + { + // correct frame to "pixel center" + frame -= mask >> 1; + + // interpolation + iPol = f32(frame & (mask - 1)) * core::reciprocal(f32(mask)); + + // wrap anim + frame >>= IPolShift; + frameA = core::if_c_a_else_b(frame < startFrameLoop, endFrameLoop, frame); + frameB = core::if_c_a_else_b(frameA + 1 > endFrameLoop, startFrameLoop, frameA + 1); + } + else + { + // correct frame to "pixel center" + frame -= mask >> 1; + + iPol = f32(frame & (mask - 1)) * core::reciprocal(f32(mask)); + + // clamp anim + frame >>= IPolShift; + frameA = core::s32_clamp(frame, startFrameLoop, endFrameLoop); + frameB = core::s32_min(frameA + 1, endFrameLoop); + } + + // build current vertex + for (u32 i = 0; i!= Mesh->Buffer.size(); ++i) + { + buildVertexArray(frameA, frameB, iPol, + Mesh->Buffer[i], + (SMeshBufferLightMap*) MeshIPol->getMeshBuffer(i)); + } + MeshIPol->recalculateBoundingBox(); + + // build current tags + buildTagArray(frameA, frameB, iPol); + + Current = candidate; + return MeshIPol; +} + + +//! create a Irrlicht MeshBuffer for a MD3 MeshBuffer +IMeshBuffer * CAnimatedMeshMD3::createMeshBuffer(const SMD3MeshBuffer* source, + io::IFileSystem* fs, video::IVideoDriver * driver) +{ + SMeshBufferLightMap * dest = new SMeshBufferLightMap(); + dest->Vertices.set_used(source->MeshHeader.numVertices); + dest->Indices.set_used(source->Indices.size()); + + u32 i; + + // fill in static face info + for (i = 0; i < source->Indices.size(); i += 3) + { + dest->Indices[i + 0] = (u16) source->Indices[i + 0]; + dest->Indices[i + 1] = (u16) source->Indices[i + 1]; + dest->Indices[i + 2] = (u16) source->Indices[i + 2]; + } + + // fill in static vertex info + for (i = 0; i!= (u32)source->MeshHeader.numVertices; ++i) + { + video::S3DVertex2TCoords &v = dest->Vertices[i]; + v.Color = 0xFFFFFFFF; + v.TCoords.X = source->Tex[i].u; + v.TCoords.Y = source->Tex[i].v; + v.TCoords2.X = 0.f; + v.TCoords2.Y = 0.f; + } + + // load static texture + u32 pos = 0; + quake3::tTexArray textureArray; + quake3::getTextures(textureArray, source->Shader, pos, fs, driver); + dest->Material.MaterialType = video::EMT_SOLID; + dest->Material.setTexture(0, textureArray[0]); + dest->Material.Lighting = false; + + return dest; +} + + +//! build final mesh's vertices from frames frameA and frameB with linear interpolation. +void CAnimatedMeshMD3::buildVertexArray(u32 frameA, u32 frameB, f32 interpolate, + const SMD3MeshBuffer* source, + SMeshBufferLightMap* dest) +{ + const u32 frameOffsetA = frameA * source->MeshHeader.numVertices; + const u32 frameOffsetB = frameB * source->MeshHeader.numVertices; + const f32 scale = (1.f/ 64.f); + + for (s32 i = 0; i != source->MeshHeader.numVertices; ++i) + { + video::S3DVertex2TCoords &v = dest->Vertices [ i ]; + + const SMD3Vertex &vA = source->Vertices [ frameOffsetA + i ]; + const SMD3Vertex &vB = source->Vertices [ frameOffsetB + i ]; + + // position + v.Pos.X = scale * (vA.position[0] + interpolate * (vB.position[0] - vA.position[0])); + v.Pos.Y = scale * (vA.position[2] + interpolate * (vB.position[2] - vA.position[2])); + v.Pos.Z = scale * (vA.position[1] + interpolate * (vB.position[1] - vA.position[1])); + + // normal + const core::vector3df nA(quake3::getMD3Normal(vA.normal[0], vA.normal[1])); + const core::vector3df nB(quake3::getMD3Normal(vB.normal[0], vB.normal[1])); + + v.Normal.X = nA.X + interpolate * (nB.X - nA.X); + v.Normal.Y = nA.Z + interpolate * (nB.Z - nA.Z); + v.Normal.Z = nA.Y + interpolate * (nB.Y - nA.Y); + } + + dest->recalculateBoundingBox(); +} + + +//! build final mesh's tag from frames frameA and frameB with linear interpolation. +void CAnimatedMeshMD3::buildTagArray(u32 frameA, u32 frameB, f32 interpolate) +{ + const u32 frameOffsetA = frameA * Mesh->MD3Header.numTags; + const u32 frameOffsetB = frameB * Mesh->MD3Header.numTags; + + for (s32 i = 0; i != Mesh->MD3Header.numTags; ++i) + { + SMD3QuaternionTag &d = TagListIPol [ i ]; + + const SMD3QuaternionTag &qA = Mesh->TagList[ frameOffsetA + i]; + const SMD3QuaternionTag &qB = Mesh->TagList[ frameOffsetB + i]; + + // rotation + d.rotation.slerp(qA.rotation, qB.rotation, interpolate); + + // position + d.position.X = qA.position.X + interpolate * (qB.position.X - qA.position.X); + d.position.Y = qA.position.Y + interpolate * (qB.position.Y - qA.position.Y); + d.position.Z = qA.position.Z + interpolate * (qB.position.Z - qA.position.Z); + } +} + + +/*! + loads a model +*/ +bool CAnimatedMeshMD3::loadModelFile(u32 modelIndex, io::IReadFile* file, + io::IFileSystem* fs, video::IVideoDriver* driver) +{ + if (!file) + return false; + + //! Check MD3Header + { + file->read(&Mesh->MD3Header, sizeof(SMD3Header)); + + if (strncmp("IDP3", Mesh->MD3Header.headerID, 4)) + { + os::Printer::log("MD3 Loader: invalid header"); + return false; + } + } + + //! store model name + Mesh->Name = file->getFileName(); + + u32 i; + + //! Frame Data (ignore) +#if 0 + SMD3Frame frameImport; + file->seek(Mesh->MD3Header.frameStart); + for (i = 0; i != Mesh->MD3Header.numFrames; ++i) + { + file->read(&frameImport, sizeof(frameImport)); + } +#endif + + //! Tag Data + const u32 totalTags = Mesh->MD3Header.numTags * Mesh->MD3Header.numFrames; + + SMD3Tag import; + + file->seek(Mesh->MD3Header.tagStart); + Mesh->TagList.set_used(totalTags); + for (i = 0; i != totalTags; ++i) + { + file->read(&import, sizeof(import)); + + SMD3QuaternionTag &exp = Mesh->TagList[i]; + + //! tag name + exp.Name = import.Name; + + //! position + exp.position.X = import.position[0]; + exp.position.Y = import.position[2]; + exp.position.Z = import.position[1]; + + //! construct quaternion from a RH 3x3 Matrix + exp.rotation.set(import.rotationMatrix[7], + 0.f, + -import.rotationMatrix[6], + 1 + import.rotationMatrix[8]); + exp.rotation.normalize(); + } + + //! Meshes + u32 offset = Mesh->MD3Header.tagEnd; + + for (i = 0; i != (u32)Mesh->MD3Header.numMeshes; ++i) + { + //! construct a new mesh buffer + SMD3MeshBuffer * buf = new SMD3MeshBuffer(); + + // !read mesh header info + SMD3MeshHeader &meshHeader = buf->MeshHeader; + + //! read mesh info + file->seek(offset); + file->read(&meshHeader, sizeof(SMD3MeshHeader)); + + //! prepare memory + buf->Vertices.set_used(meshHeader.numVertices * Mesh->MD3Header.numFrames); + buf->Indices.set_used(meshHeader.numTriangles * 3); + buf->Tex.set_used(meshHeader.numVertices); + + //! read skins (shaders). should be 1 per meshbuffer + SMD3Shader skin; + file->seek(offset + buf->MeshHeader.offset_shaders); + for (s32 g = 0; g != buf->MeshHeader.numShader; ++g) + { + file->read(&skin, sizeof(skin)); + + io::path name; + cutFilenameExtension(name, skin.name); + name.replace('\\', '/'); + buf->Shader = name; + } + + //! read texture coordinates + file->seek(offset + buf->MeshHeader.offset_st); + file->read(buf->Tex.pointer(), buf->MeshHeader.numVertices * sizeof(SMD3TexCoord)); + + //! read vertices + file->seek(offset + meshHeader.vertexStart); + file->read(buf->Vertices.pointer(), Mesh->MD3Header.numFrames * meshHeader.numVertices * sizeof(SMD3Vertex)); + + //! read indices + file->seek(offset + meshHeader.offset_triangles); + file->read(buf->Indices.pointer(), meshHeader.numTriangles * sizeof(SMD3Face)); + + //! store meshBuffer + Mesh->Buffer.push_back(buf); + + offset += meshHeader.offset_end; + } + + // Init Mesh Interpolation + for (i = 0; i != Mesh->Buffer.size(); ++i) + { + IMeshBuffer * buffer = createMeshBuffer(Mesh->Buffer[i], fs, driver); + MeshIPol->addMeshBuffer(buffer); + buffer->drop(); + } + MeshIPol->recalculateBoundingBox(); + + // Init Tag Interpolation + for (i = 0; i != (u32)Mesh->MD3Header.numTags; ++i) + { + TagListIPol.push_back(Mesh->TagList[i]); + } + + return true; +} + + +SMD3Mesh * CAnimatedMeshMD3::getOriginalMesh() +{ + return Mesh; +} + + +//! Returns an axis aligned bounding box +const core::aabbox3d<f32>& CAnimatedMeshMD3::getBoundingBox() const +{ + return MeshIPol->BoundingBox; +} + + +//! Returns the type of the animated mesh. +E_ANIMATED_MESH_TYPE CAnimatedMeshMD3::getMeshType() const +{ + return EAMT_MD3; +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_MD3_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.h new file mode 100644 index 0000000..1b01eee --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshMD3.h @@ -0,0 +1,135 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ANIMATED_MESH_MD3_H_INCLUDED__ +#define __C_ANIMATED_MESH_MD3_H_INCLUDED__ + +#include "IAnimatedMeshMD3.h" +#include "IReadFile.h" +#include "IFileSystem.h" +#include "irrArray.h" +#include "irrString.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "IQ3Shader.h" + +namespace irr +{ +namespace scene +{ + + class CAnimatedMeshMD3 : public IAnimatedMeshMD3 + { + public: + + //! constructor + CAnimatedMeshMD3(); + + //! destructor + virtual ~CAnimatedMeshMD3(); + + //! loads a quake3 md3 file + virtual bool loadModelFile(u32 modelIndex, io::IReadFile* file, + io::IFileSystem* fs, video::IVideoDriver* driver); + + // IAnimatedMeshMD3 + virtual void setInterpolationShift(u32 shift, u32 loopMode); + virtual SMD3Mesh* getOriginalMesh(); + virtual SMD3QuaternionTagList* getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop); + + //IAnimatedMesh + virtual u32 getFrameCount() const; + + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const + { + return FramesPerSecond; + } + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps) + { + FramesPerSecond=fps; + } + + virtual IMesh* getMesh(s32 frame, s32 detailLevel, + s32 startFrameLoop, s32 endFrameLoop); + virtual const core::aabbox3d<f32>& getBoundingBox() const; + virtual E_ANIMATED_MESH_TYPE getMeshType() const; + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const; + + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const; + + //! Returns pointer to a mesh buffer which fits a material + virtual IMeshBuffer* getMeshBuffer(const video::SMaterial &material) const; + + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue); + + //! set user axis aligned bounding box + virtual void setBoundingBox(const core::aabbox3df& box); + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + private: + //! animates one frame + inline void Animate(u32 frame); + + video::SMaterial Material; + + //! hold original compressed MD3 Info + SMD3Mesh *Mesh; + + u32 IPolShift; + u32 LoopMode; + f32 Scaling; + + //! Cache Info + struct SCacheInfo + { + SCacheInfo(s32 frame=-1, s32 start=-1, s32 end=-1 ) : + Frame(frame), startFrameLoop(start), + endFrameLoop(end) + {} + + bool operator == ( const SCacheInfo &other ) const + { + return 0 == memcmp ( this, &other, sizeof ( SCacheInfo ) ); + } + s32 Frame; + s32 startFrameLoop; + s32 endFrameLoop; + }; + SCacheInfo Current; + + //! return a Mesh per frame + SMesh* MeshIPol; + SMD3QuaternionTagList TagListIPol; + + IMeshBuffer* createMeshBuffer(const SMD3MeshBuffer* source, + io::IFileSystem* fs, video::IVideoDriver* driver); + + void buildVertexArray(u32 frameA, u32 frameB, f32 interpolate, + const SMD3MeshBuffer* source, + SMeshBufferLightMap* dest); + + void buildTagArray(u32 frameA, u32 frameB, f32 interpolate); + f32 FramesPerSecond; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.cpp new file mode 100644 index 0000000..9b9f533 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.cpp @@ -0,0 +1,1132 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CAnimatedMeshSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "S3DVertex.h" +#include "os.h" +#include "CShadowVolumeSceneNode.h" +#include "IAnimatedMeshMD3.h" +#include "CSkinnedMesh.h" +#include "IDummyTransformationSceneNode.h" +#include "IBoneSceneNode.h" +#include "IMaterialRenderer.h" +#include "IMesh.h" +#include "IMeshCache.h" +#include "IAnimatedMesh.h" +#include "quaternion.h" + + +namespace irr +{ +namespace scene +{ + + +//! constructor +CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, + ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, + const core::vector3df& rotation, + const core::vector3df& scale) +: IAnimatedMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0), + StartFrame(0), EndFrame(0), FramesPerSecond(0.025f), + CurrentFrameNr(0.f), LastTimeMs(0), + TransitionTime(0), Transiting(0.f), TransitingBlend(0.f), + JointMode(EJUOR_NONE), JointsUsed(false), + Looping(true), ReadOnlyMaterials(false), RenderFromIdentity(false), + LoopCallBack(0), PassCount(0), Shadow(0), MD3Special(0) +{ + #ifdef _DEBUG + setDebugName("CAnimatedMeshSceneNode"); + #endif + + setMesh(mesh); +} + + +//! destructor +CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode() +{ + if (MD3Special) + MD3Special->drop(); + + if (Mesh) + Mesh->drop(); + + if (Shadow) + Shadow->drop(); + + if (LoopCallBack) + LoopCallBack->drop(); +} + + +//! Sets the current frame. From now on the animation is played from this frame. +void CAnimatedMeshSceneNode::setCurrentFrame(f32 frame) +{ + // if you pass an out of range value, we just clamp it + CurrentFrameNr = core::clamp ( frame, (f32)StartFrame, (f32)EndFrame ); + + beginTransition(); //transit to this frame if enabled +} + + +//! Returns the currently displayed frame number. +f32 CAnimatedMeshSceneNode::getFrameNr() const +{ + return CurrentFrameNr; +} + + +//! Get CurrentFrameNr and update transiting settings +void CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs) +{ + if (Transiting!=0.f) + { + TransitingBlend += (f32)(timeMs) * Transiting; + if (TransitingBlend > 1.f) + { + Transiting=0.f; + TransitingBlend=0.f; + } + } + + if ((StartFrame==EndFrame)) + { + CurrentFrameNr = (f32)StartFrame; //Support for non animated meshes + } + else if (Looping) + { + // play animation looped + CurrentFrameNr += timeMs * FramesPerSecond; + + // We have no interpolation between EndFrame and StartFrame, + // the last frame must be identical to first one with our current solution. + if (FramesPerSecond > 0.f) //forwards... + { + if (CurrentFrameNr > EndFrame) + CurrentFrameNr = StartFrame + fmod(CurrentFrameNr - StartFrame, (f32)(EndFrame-StartFrame)); + } + else //backwards... + { + if (CurrentFrameNr < StartFrame) + CurrentFrameNr = EndFrame - fmod(EndFrame - CurrentFrameNr, (f32)(EndFrame-StartFrame)); + } + } + else + { + // play animation non looped + + CurrentFrameNr += timeMs * FramesPerSecond; + if (FramesPerSecond > 0.f) //forwards... + { + if (CurrentFrameNr > (f32)EndFrame) + { + CurrentFrameNr = (f32)EndFrame; + if (LoopCallBack) + LoopCallBack->OnAnimationEnd(this); + } + } + else //backwards... + { + if (CurrentFrameNr < (f32)StartFrame) + { + CurrentFrameNr = (f32)StartFrame; + if (LoopCallBack) + LoopCallBack->OnAnimationEnd(this); + } + } + } +} + + +void CAnimatedMeshSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + { + // because this node supports rendering of mixed mode meshes consisting of + // transparent and solid material at the same time, we need to go through all + // materials, check of what type they are and register this node for the right + // render pass according to that. + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + PassCount = 0; + int transparentCount = 0; + int solidCount = 0; + + // count transparent and solid materials in this scene node + for (u32 i=0; i<Materials.size(); ++i) + { + video::IMaterialRenderer* rnd = + driver->getMaterialRenderer(Materials[i].MaterialType); + + if (rnd && rnd->isTransparent()) + ++transparentCount; + else + ++solidCount; + + if (solidCount && transparentCount) + break; + } + + // register according to material types counted + + if (solidCount) + SceneManager->registerNodeForRendering(this, scene::ESNRP_SOLID); + + if (transparentCount) + SceneManager->registerNodeForRendering(this, scene::ESNRP_TRANSPARENT); + + ISceneNode::OnRegisterSceneNode(); + } +} + +IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame() +{ + if(Mesh->getMeshType() != EAMT_SKINNED) + { + s32 frameNr = (s32) getFrameNr(); + s32 frameBlend = (s32) (core::fract ( getFrameNr() ) * 1000.f); + return Mesh->getMesh(frameNr, frameBlend, StartFrame, EndFrame); + } + else + { +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return 0; +#else + + // As multiple scene nodes may be sharing the same skinned mesh, we have to + // re-animate it every frame to ensure that this node gets the mesh that it needs. + + CSkinnedMesh* skinnedMesh = reinterpret_cast<CSkinnedMesh*>(Mesh); + + if (JointMode == EJUOR_CONTROL)//write to mesh + skinnedMesh->transferJointsToMesh(JointChildSceneNodes); + else + skinnedMesh->animateMesh(getFrameNr(), 1.0f); + + // Update the skinned mesh for the current joint transforms. + skinnedMesh->skinMesh(); + + if (JointMode == EJUOR_READ)//read from mesh + { + skinnedMesh->recoverJointsFromMesh(JointChildSceneNodes); + + //---slow--- + for (u32 n=0;n<JointChildSceneNodes.size();++n) + if (JointChildSceneNodes[n]->getParent()==this) + { + JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option + } + } + + if(JointMode == EJUOR_CONTROL) + { + // For meshes other than EJUOR_CONTROL, this is done by calling animateMesh() + skinnedMesh->updateBoundingBox(); + } + + return skinnedMesh; +#endif + } +} + + +//! OnAnimate() is called just before rendering the whole scene. +void CAnimatedMeshSceneNode::OnAnimate(u32 timeMs) +{ + if (LastTimeMs==0) // first frame + { + LastTimeMs = timeMs; + } + + // set CurrentFrameNr + buildFrameNr(timeMs-LastTimeMs); + + // update bbox + if (Mesh) + { + scene::IMesh * mesh = getMeshForCurrentFrame(); + + if (mesh) + Box = mesh->getBoundingBox(); + } + LastTimeMs = timeMs; + + IAnimatedMeshSceneNode::OnAnimate(timeMs); +} + + +//! renders the node. +void CAnimatedMeshSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + if (!Mesh || !driver) + return; + + + bool isTransparentPass = + SceneManager->getSceneNodeRenderPass() == scene::ESNRP_TRANSPARENT; + + ++PassCount; + + scene::IMesh* m = getMeshForCurrentFrame(); + + if(m) + { + Box = m->getBoundingBox(); + } + else + { + #ifdef _DEBUG + os::Printer::log("Animated Mesh returned no mesh to render.", Mesh->getDebugName(), ELL_WARNING); + #endif + } + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + if (Shadow && PassCount==1) + Shadow->updateShadowVolumes(); + + // for debug purposes only: + + bool renderMeshes = true; + video::SMaterial mat; + if (DebugDataVisible && PassCount==1) + { + // overwrite half transparency + if (DebugDataVisible & scene::EDS_HALF_TRANSPARENCY) + { + + for (u32 i=0; i<m->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* mb = m->getMeshBuffer(i); + mat = ReadOnlyMaterials ? mb->getMaterial() : Materials[i]; + mat.MaterialType = video::EMT_TRANSPARENT_ADD_COLOR; + if (RenderFromIdentity) + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix ); + else if (Mesh->getMeshType() == EAMT_SKINNED) + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation * ((SSkinMeshBuffer*)mb)->Transformation); + + driver->setMaterial(mat); + driver->drawMeshBuffer(mb); + } + renderMeshes = false; + } + } + + // render original meshes + if (renderMeshes) + { + for (u32 i=0; i<m->getMeshBufferCount(); ++i) + { + video::IMaterialRenderer* rnd = driver->getMaterialRenderer(Materials[i].MaterialType); + bool transparent = (rnd && rnd->isTransparent()); + + // only render transparent buffer if this is the transparent render pass + // and solid only in solid pass + if (transparent == isTransparentPass) + { + scene::IMeshBuffer* mb = m->getMeshBuffer(i); + const video::SMaterial& material = ReadOnlyMaterials ? mb->getMaterial() : Materials[i]; + if (RenderFromIdentity) + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix ); + else if (Mesh->getMeshType() == EAMT_SKINNED) + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation * ((SSkinMeshBuffer*)mb)->Transformation); + + driver->setMaterial(material); + driver->drawMeshBuffer(mb); + } + } + } + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + // for debug purposes only: + if (DebugDataVisible && PassCount==1) + { + video::SMaterial debug_mat; + debug_mat.Lighting = false; + debug_mat.AntiAliasing=0; + driver->setMaterial(debug_mat); + // show normals + if (DebugDataVisible & scene::EDS_NORMALS) + { + const f32 debugNormalLength = SceneManager->getParameters()->getAttributeAsFloat(DEBUG_NORMAL_LENGTH); + const video::SColor debugNormalColor = SceneManager->getParameters()->getAttributeAsColor(DEBUG_NORMAL_COLOR); + const u32 count = m->getMeshBufferCount(); + + // draw normals + for (u32 g=0; g < count; ++g) + { + driver->drawMeshBufferNormals(m->getMeshBuffer(g), debugNormalLength, debugNormalColor); + } + } + + debug_mat.ZBuffer = video::ECFN_NEVER; + debug_mat.Lighting = false; + driver->setMaterial(debug_mat); + + if (DebugDataVisible & scene::EDS_BBOX) + driver->draw3DBox(Box, video::SColor(255,255,255,255)); + + // show bounding box + if (DebugDataVisible & scene::EDS_BBOX_BUFFERS) + { + for (u32 g=0; g< m->getMeshBufferCount(); ++g) + { + const IMeshBuffer* mb = m->getMeshBuffer(g); + + if (Mesh->getMeshType() == EAMT_SKINNED) + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation * ((SSkinMeshBuffer*)mb)->Transformation); + driver->draw3DBox(mb->getBoundingBox(), video::SColor(255,190,128,128)); + } + } + + // show skeleton + if (DebugDataVisible & scene::EDS_SKELETON) + { + if (Mesh->getMeshType() == EAMT_SKINNED) + { + // draw skeleton + + for (u32 g=0; g < ((ISkinnedMesh*)Mesh)->getAllJoints().size(); ++g) + { + ISkinnedMesh::SJoint *joint=((ISkinnedMesh*)Mesh)->getAllJoints()[g]; + + for (u32 n=0;n<joint->Children.size();++n) + { + driver->draw3DLine(joint->GlobalAnimatedMatrix.getTranslation(), + joint->Children[n]->GlobalAnimatedMatrix.getTranslation(), + video::SColor(255,51,66,255)); + } + } + } + + // show tag for quake3 models + if (Mesh->getMeshType() == EAMT_MD3) + { + IAnimatedMesh * arrow = + SceneManager->addArrowMesh ( + "__tag_show", + 0xFF0000FF, 0xFF000088, + 4, 8, 5.f, 4.f, 0.5f, + 1.f); + if (!arrow) + { + arrow = SceneManager->getMesh ( "__tag_show" ); + } + IMesh *arrowMesh = arrow->getMesh(0); + + core::matrix4 matr; + + SMD3QuaternionTagList *taglist = ((IAnimatedMeshMD3*)Mesh)->getTagList( + (s32)getFrameNr(), 255, + getStartFrame(), getEndFrame()); + if (taglist) + { + for ( u32 ts = 0; ts != taglist->size(); ++ts ) + { + (*taglist)[ts].setto(matr); + + driver->setTransform(video::ETS_WORLD, matr ); + + for ( u32 a = 0; a != arrowMesh->getMeshBufferCount(); ++a ) + driver->drawMeshBuffer(arrowMesh->getMeshBuffer(a)); + } + } + } + } + + // show mesh + if (DebugDataVisible & scene::EDS_MESH_WIRE_OVERLAY) + { + debug_mat.Lighting = false; + debug_mat.Wireframe = true; + debug_mat.ZBuffer = video::ECFN_NEVER; + driver->setMaterial(debug_mat); + + for (u32 g=0; g<m->getMeshBufferCount(); ++g) + { + const IMeshBuffer* mb = m->getMeshBuffer(g); + if (RenderFromIdentity) + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix ); + else if (Mesh->getMeshType() == EAMT_SKINNED) + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation * ((SSkinMeshBuffer*)mb)->Transformation); + driver->drawMeshBuffer(mb); + } + } + } +} + + +//! Returns the current start frame number. +s32 CAnimatedMeshSceneNode::getStartFrame() const +{ + return StartFrame; +} + + +//! Returns the current start frame number. +s32 CAnimatedMeshSceneNode::getEndFrame() const +{ + return EndFrame; +} + + +//! sets the frames between the animation is looped. +//! the default is 0 - MaximalFrameCount of the mesh. +bool CAnimatedMeshSceneNode::setFrameLoop(s32 begin, s32 end) +{ + const s32 maxFrameCount = Mesh->getFrameCount() - 1; + if (end < begin) + { + StartFrame = core::s32_clamp(end, 0, maxFrameCount); + EndFrame = core::s32_clamp(begin, StartFrame, maxFrameCount); + } + else + { + StartFrame = core::s32_clamp(begin, 0, maxFrameCount); + EndFrame = core::s32_clamp(end, StartFrame, maxFrameCount); + } + if (FramesPerSecond < 0) + setCurrentFrame((f32)EndFrame); + else + setCurrentFrame((f32)StartFrame); + + return true; +} + + +//! sets the speed with witch the animation is played +void CAnimatedMeshSceneNode::setAnimationSpeed(f32 framesPerSecond) +{ + FramesPerSecond = framesPerSecond * 0.001f; +} + + +f32 CAnimatedMeshSceneNode::getAnimationSpeed() const +{ + return FramesPerSecond * 1000.f; +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CAnimatedMeshSceneNode::getBoundingBox() const +{ + return Box; +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hirachy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& CAnimatedMeshSceneNode::getMaterial(u32 i) +{ + if (i >= Materials.size()) + return ISceneNode::getMaterial(i); + + return Materials[i]; +} + + + +//! returns amount of materials used by this scene node. +u32 CAnimatedMeshSceneNode::getMaterialCount() const +{ + return Materials.size(); +} + + +//! Creates shadow volume scene node as child of this node +//! and returns a pointer to it. +IShadowVolumeSceneNode* CAnimatedMeshSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) +{ + if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) + return 0; + + if (!shadowMesh) + shadowMesh = Mesh; // if null is given, use the mesh of node + + if (Shadow) + Shadow->drop(); + + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); + return Shadow; +} + +//! Returns a pointer to a child node, which has the same transformation as +//! the corresponding joint, if the mesh in this scene node is a skinned mesh. +IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) +{ +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING); + return 0; +#else + + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) + { + os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING); + return 0; + } + + checkJoints(); + + ISkinnedMesh *skinnedMesh=(ISkinnedMesh*)Mesh; + + const s32 number = skinnedMesh->getJointNumber(jointName); + + if (number == -1) + { + os::Printer::log("Joint with specified name not found in skinned mesh", jointName, ELL_DEBUG); + return 0; + } + + if ((s32)JointChildSceneNodes.size() <= number) + { + os::Printer::log("Joint was found in mesh, but is not loaded into node", jointName, ELL_WARNING); + return 0; + } + + return JointChildSceneNodes[number]; +#endif +} + + + +//! Returns a pointer to a child node, which has the same transformation as +//! the corresponding joint, if the mesh in this scene node is a skinned mesh. +IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID) +{ +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING); + return 0; +#else + + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) + { + os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING); + return 0; + } + + checkJoints(); + + if (JointChildSceneNodes.size() <= jointID) + { + os::Printer::log("Joint not loaded into node", ELL_WARNING); + return 0; + } + + return JointChildSceneNodes[jointID]; +#endif +} + +//! Gets joint count. +u32 CAnimatedMeshSceneNode::getJointCount() const +{ +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return 0; +#else + + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) + return 0; + + ISkinnedMesh *skinnedMesh=(ISkinnedMesh*)Mesh; + + return skinnedMesh->getJointCount(); +#endif +} + + +//! Returns a pointer to a child node, which has the same transformation as +//! the corresponding joint, if the mesh in this scene node is a ms3d mesh. +ISceneNode* CAnimatedMeshSceneNode::getMS3DJointNode(const c8* jointName) +{ + return getJointNode(jointName); +} + + +//! Returns a pointer to a child node, which has the same transformation as +//! the corresponding joint, if the mesh in this scene node is a .x mesh. +ISceneNode* CAnimatedMeshSceneNode::getXJointNode(const c8* jointName) +{ + return getJointNode(jointName); +} + +//! Removes a child from this scene node. +//! Implemented here, to be able to remove the shadow properly, if there is one, +//! or to remove attached childs. +bool CAnimatedMeshSceneNode::removeChild(ISceneNode* child) +{ + if (child && Shadow == child) + { + Shadow->drop(); + Shadow = 0; + } + + if (ISceneNode::removeChild(child)) + { + if (JointsUsed) //stop weird bugs caused while changing parents as the joints are being created + { + for (u32 i=0; i<JointChildSceneNodes.size(); ++i) + { + if (JointChildSceneNodes[i] == child) + { + JointChildSceneNodes[i] = 0; //remove link to child + break; + } + } + } + return true; + } + + return false; +} + + +//! Starts a MD2 animation. +bool CAnimatedMeshSceneNode::setMD2Animation(EMD2_ANIMATION_TYPE anim) +{ + if (!Mesh || Mesh->getMeshType() != EAMT_MD2) + return false; + + IAnimatedMeshMD2* md = (IAnimatedMeshMD2*)Mesh; + + s32 begin, end, speed; + md->getFrameLoop(anim, begin, end, speed); + + setAnimationSpeed( f32(speed) ); + setFrameLoop(begin, end); + return true; +} + + +//! Starts a special MD2 animation. +bool CAnimatedMeshSceneNode::setMD2Animation(const c8* animationName) +{ + if (!Mesh || Mesh->getMeshType() != EAMT_MD2) + return false; + + IAnimatedMeshMD2* md = (IAnimatedMeshMD2*)Mesh; + + s32 begin, end, speed; + if (!md->getFrameLoop(animationName, begin, end, speed)) + return false; + + setAnimationSpeed( (f32)speed ); + setFrameLoop(begin, end); + return true; +} + + +//! Sets looping mode which is on by default. If set to false, +//! animations will not be looped. +void CAnimatedMeshSceneNode::setLoopMode(bool playAnimationLooped) +{ + Looping = playAnimationLooped; +} + +//! returns the current loop mode +bool CAnimatedMeshSceneNode::getLoopMode() const +{ + return Looping; +} + + +//! Sets a callback interface which will be called if an animation +//! playback has ended. Set this to 0 to disable the callback again. +void CAnimatedMeshSceneNode::setAnimationEndCallback(IAnimationEndCallBack* callback) +{ + if (callback == LoopCallBack) + return; + + if (LoopCallBack) + LoopCallBack->drop(); + + LoopCallBack = callback; + + if (LoopCallBack) + LoopCallBack->grab(); +} + + +//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. +void CAnimatedMeshSceneNode::setReadOnlyMaterials(bool readonly) +{ + ReadOnlyMaterials = readonly; +} + + +//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style +bool CAnimatedMeshSceneNode::isReadOnlyMaterials() const +{ + return ReadOnlyMaterials; +} + + +//! Writes attributes of the scene node. +void CAnimatedMeshSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IAnimatedMeshSceneNode::serializeAttributes(out, options); + + if (options && (options->Flags&io::EARWF_USE_RELATIVE_PATHS) && options->Filename) + { + const io::path path = SceneManager->getFileSystem()->getRelativeFilename( + SceneManager->getFileSystem()->getAbsolutePath(SceneManager->getMeshCache()->getMeshName(Mesh).getPath()), + options->Filename); + out->addString("Mesh", path.c_str()); + } + else + out->addString("Mesh", SceneManager->getMeshCache()->getMeshName(Mesh).getPath().c_str()); + out->addBool("Looping", Looping); + out->addBool("ReadOnlyMaterials", ReadOnlyMaterials); + out->addFloat("FramesPerSecond", FramesPerSecond); + out->addInt("StartFrame", StartFrame); + out->addInt("EndFrame", EndFrame); +} + + +//! Reads attributes of the scene node. +void CAnimatedMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + IAnimatedMeshSceneNode::deserializeAttributes(in, options); + + io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh); + io::path newMeshStr = in->getAttributeAsString("Mesh"); + + Looping = in->getAttributeAsBool("Looping"); + ReadOnlyMaterials = in->getAttributeAsBool("ReadOnlyMaterials"); + FramesPerSecond = in->getAttributeAsFloat("FramesPerSecond"); + StartFrame = in->getAttributeAsInt("StartFrame"); + EndFrame = in->getAttributeAsInt("EndFrame"); + + if (newMeshStr != "" && oldMeshStr != newMeshStr) + { + IAnimatedMesh* newAnimatedMesh = SceneManager->getMesh(newMeshStr.c_str()); + + if (newAnimatedMesh) + setMesh(newAnimatedMesh); + } + + // TODO: read animation names instead of frame begin and ends +} + + +//! Sets a new mesh +void CAnimatedMeshSceneNode::setMesh(IAnimatedMesh* mesh) +{ + if (!mesh) + return; // won't set null mesh + + if (Mesh != mesh) + { + if (Mesh) + Mesh->drop(); + + Mesh = mesh; + + // grab the mesh (it's non-null!) + Mesh->grab(); + } + + // get materials and bounding box + Box = Mesh->getBoundingBox(); + + IMesh* m = Mesh->getMesh(0,0); + if (m) + { + Materials.clear(); + Materials.reallocate(m->getMeshBufferCount()); + + for (u32 i=0; i<m->getMeshBufferCount(); ++i) + { + IMeshBuffer* mb = m->getMeshBuffer(i); + if (mb) + Materials.push_back(mb->getMaterial()); + else + Materials.push_back(video::SMaterial()); + } + } + + // clean up joint nodes + if (JointsUsed) + { + JointsUsed=false; + checkJoints(); + } + + // get start and begin time +// setAnimationSpeed(Mesh->getAnimationSpeed()); + setFrameLoop(0, Mesh->getFrameCount()); +} + + +// returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, +// or the absolutetransformation if it's a normal scenenode +const SMD3QuaternionTag* CAnimatedMeshSceneNode::getMD3TagTransformation(const core::stringc& tagname) +{ + return MD3Special ? MD3Special->AbsoluteTagList.get(tagname) : 0; +} + + +//! updates the absolute position based on the relative and the parents position +void CAnimatedMeshSceneNode::updateAbsolutePosition() +{ + IAnimatedMeshSceneNode::updateAbsolutePosition(); + + if (!Mesh || Mesh->getMeshType() != EAMT_MD3) + return; + + SMD3QuaternionTagList *taglist; + taglist = ( (IAnimatedMeshMD3*) Mesh )->getTagList ( (s32)getFrameNr(),255,getStartFrame (),getEndFrame () ); + if (taglist) + { + if (!MD3Special) + { + MD3Special = new SMD3Special(); + } + + SMD3QuaternionTag parent ( MD3Special->Tagname ); + if (Parent && Parent->getType() == ESNT_ANIMATED_MESH) + { + const SMD3QuaternionTag * p = ((IAnimatedMeshSceneNode*) Parent)->getMD3TagTransformation + ( MD3Special->Tagname ); + + if (p) + parent = *p; + } + + SMD3QuaternionTag relative( RelativeTranslation, RelativeRotation ); + + MD3Special->AbsoluteTagList.set_used ( taglist->size () ); + for ( u32 i=0; i!= taglist->size (); ++i ) + { + MD3Special->AbsoluteTagList[i].position = parent.position + (*taglist)[i].position + relative.position; + MD3Special->AbsoluteTagList[i].rotation = parent.rotation * (*taglist)[i].rotation * relative.rotation; + } + } +} + +//! Set the joint update mode (0-unused, 1-get joints only, 2-set joints only, 3-move and set) +void CAnimatedMeshSceneNode::setJointMode(E_JOINT_UPDATE_ON_RENDER mode) +{ + checkJoints(); + JointMode=mode; +} + +//! Sets the transition time in seconds (note: This needs to enable joints, and setJointmode maybe set to 2) +//! you must call animateJoints(), or the mesh will not animate +void CAnimatedMeshSceneNode::setTransitionTime(f32 time) +{ + const u32 ttime = (u32)core::floor32(time*1000.0f); + if (TransitionTime==ttime) + return; + TransitionTime = ttime; + if (ttime != 0) + setJointMode(EJUOR_CONTROL); + else + setJointMode(EJUOR_NONE); +} + + +//! render mesh ignoring its transformation. Used with ragdolls. (culling is unaffected) +void CAnimatedMeshSceneNode::setRenderFromIdentity(bool enable) +{ + RenderFromIdentity=enable; +} + + +//! updates the joint positions of this mesh +void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions) +{ +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return; +#else + if (Mesh && Mesh->getMeshType() == EAMT_SKINNED ) + { + checkJoints(); + const f32 frame = getFrameNr(); //old? + + CSkinnedMesh* skinnedMesh=reinterpret_cast<CSkinnedMesh*>(Mesh); + + skinnedMesh->transferOnlyJointsHintsToMesh( JointChildSceneNodes ); + skinnedMesh->animateMesh(frame, 1.0f); + skinnedMesh->recoverJointsFromMesh( JointChildSceneNodes); + + //----------------------------------------- + // Transition + //----------------------------------------- + + if (Transiting != 0.f) + { + // Init additional matrices + if (PretransitingSave.size()<JointChildSceneNodes.size()) + { + for(u32 n=PretransitingSave.size(); n<JointChildSceneNodes.size(); ++n) + PretransitingSave.push_back(core::matrix4()); + } + + for (u32 n=0; n<JointChildSceneNodes.size(); ++n) + { + //------Position------ + + JointChildSceneNodes[n]->setPosition( + core::lerp( + PretransitingSave[n].getTranslation(), + JointChildSceneNodes[n]->getPosition(), + TransitingBlend)); + + //------Rotation------ + + //Code is slow, needs to be fixed up + + const core::quaternion RotationStart(PretransitingSave[n].getRotationDegrees()*core::DEGTORAD); + const core::quaternion RotationEnd(JointChildSceneNodes[n]->getRotation()*core::DEGTORAD); + + core::quaternion QRotation; + QRotation.slerp(RotationStart, RotationEnd, TransitingBlend); + + core::vector3df tmpVector; + QRotation.toEuler(tmpVector); + tmpVector*=core::RADTODEG; //convert from radians back to degrees + JointChildSceneNodes[n]->setRotation( tmpVector ); + + //------Scale------ + + //JointChildSceneNodes[n]->setScale( + // core::lerp( + // PretransitingSave[n].getScale(), + // JointChildSceneNodes[n]->getScale(), + // TransitingBlend)); + } + } + + if (CalculateAbsolutePositions) + { + //---slow--- + for (u32 n=0;n<JointChildSceneNodes.size();++n) + { + if (JointChildSceneNodes[n]->getParent()==this) + { + JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option + } + } + } + } +#endif +} + +/*! +*/ +void CAnimatedMeshSceneNode::checkJoints() +{ +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return; +#else + + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) + return; + + if (!JointsUsed) + { + for (u32 i=0; i<JointChildSceneNodes.size(); ++i) + removeChild(JointChildSceneNodes[i]); + JointChildSceneNodes.clear(); + + //Create joints for SkinnedMesh + ((CSkinnedMesh*)Mesh)->addJoints(JointChildSceneNodes, this, SceneManager); + ((CSkinnedMesh*)Mesh)->recoverJointsFromMesh(JointChildSceneNodes); + + JointsUsed=true; + JointMode=EJUOR_READ; + } +#endif +} + +/*! +*/ +void CAnimatedMeshSceneNode::beginTransition() +{ + if (!JointsUsed) + return; + + if (TransitionTime != 0) + { + //Check the array is big enough + if (PretransitingSave.size()<JointChildSceneNodes.size()) + { + for(u32 n=PretransitingSave.size(); n<JointChildSceneNodes.size(); ++n) + PretransitingSave.push_back(core::matrix4()); + } + + //Copy the position of joints + for (u32 n=0;n<JointChildSceneNodes.size();++n) + PretransitingSave[n]=JointChildSceneNodes[n]->getRelativeTransformation(); + + Transiting = core::reciprocal((f32)TransitionTime); + } + TransitingBlend = 0.f; +} + + +/*! +*/ +ISceneNode* CAnimatedMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CAnimatedMeshSceneNode* newNode = + new CAnimatedMeshSceneNode(Mesh, NULL, newManager, ID, RelativeTranslation, + RelativeRotation, RelativeScale); + + if (newParent) + { + newNode->setParent(newParent); // not in constructor because virtual overload for updateAbsolutePosition won't be called + newNode->drop(); + } + + newNode->cloneMembers(this, newManager); + + newNode->Materials = Materials; + newNode->Box = Box; + newNode->Mesh = Mesh; + newNode->StartFrame = StartFrame; + newNode->EndFrame = EndFrame; + newNode->FramesPerSecond = FramesPerSecond; + newNode->CurrentFrameNr = CurrentFrameNr; + newNode->JointMode = JointMode; + newNode->JointsUsed = JointsUsed; + newNode->TransitionTime = TransitionTime; + newNode->Transiting = Transiting; + newNode->TransitingBlend = TransitingBlend; + newNode->Looping = Looping; + newNode->ReadOnlyMaterials = ReadOnlyMaterials; + newNode->LoopCallBack = LoopCallBack; + if (newNode->LoopCallBack) + newNode->LoopCallBack->grab(); + newNode->PassCount = PassCount; + newNode->Shadow = Shadow; + if (newNode->Shadow) + newNode->Shadow->grab(); + newNode->JointChildSceneNodes = JointChildSceneNodes; + newNode->PretransitingSave = PretransitingSave; + newNode->RenderFromIdentity = RenderFromIdentity; + newNode->MD3Special = MD3Special; + + return newNode; +} + + +} // end namespace scene +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.h new file mode 100644 index 0000000..522393d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAnimatedMeshSceneNode.h @@ -0,0 +1,227 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ +#define __C_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ + +#include "IAnimatedMeshSceneNode.h" +#include "IAnimatedMesh.h" + +#include "matrix4.h" + + +namespace irr +{ +namespace scene +{ + class IDummyTransformationSceneNode; + + class CAnimatedMeshSceneNode : public IAnimatedMeshSceneNode + { + public: + + //! constructor + CAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! destructor + virtual ~CAnimatedMeshSceneNode(); + + //! sets the current frame. from now on the animation is played from this frame. + virtual void setCurrentFrame(f32 frame); + + //! frame + virtual void OnRegisterSceneNode(); + + //! OnAnimate() is called just before rendering the whole scene. + virtual void OnAnimate(u32 timeMs); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! sets the frames between the animation is looped. + //! the default is 0 - MaximalFrameCount of the mesh. + virtual bool setFrameLoop(s32 begin, s32 end); + + //! Sets looping mode which is on by default. If set to false, + //! animations will not be looped. + virtual void setLoopMode(bool playAnimationLooped); + + //! returns the current loop mode + virtual bool getLoopMode() const; + + //! Sets a callback interface which will be called if an animation + //! playback has ended. Set this to 0 to disable the callback again. + virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0); + + //! sets the speed with which the animation is played + virtual void setAnimationSpeed(f32 framesPerSecond); + + //! gets the speed with which the animation is played + virtual f32 getAnimationSpeed() const; + + //! returns the material based on the zero based index i. To get the amount + //! of materials used by this scene node, use getMaterialCount(). + //! This function is needed for inserting the node into the scene hirachy on a + //! optimal position for minimizing renderstate changes, but can also be used + //! to directly modify the material of a scene node. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Creates shadow volume scene node as child of this node + //! and returns a pointer to it. + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, + s32 id, bool zfailmethod=true, f32 infinity=1000.0f); + + //! Returns a pointer to a child node, which has the same transformation as + //! the corrsesponding joint, if the mesh in this scene node is a skinned mesh. + virtual IBoneSceneNode* getJointNode(const c8* jointName); + + //! same as getJointNode(const c8* jointName), but based on id + virtual IBoneSceneNode* getJointNode(u32 jointID); + + //! Gets joint count. + virtual u32 getJointCount() const; + + //! Deprecated command, please use getJointNode. + virtual ISceneNode* getMS3DJointNode(const c8* jointName); + + //! Deprecated command, please use getJointNode. + virtual ISceneNode* getXJointNode(const c8* jointName); + + //! Removes a child from this scene node. + //! Implemented here, to be able to remove the shadow properly, if there is one, + //! or to remove attached childs. + virtual bool removeChild(ISceneNode* child); + + //! Starts a MD2 animation. + virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim); + + //! Starts a special MD2 animation. + virtual bool setMD2Animation(const c8* animationName); + + //! Returns the current displayed frame number. + virtual f32 getFrameNr() const; + //! Returns the current start frame number. + virtual s32 getStartFrame() const; + //! Returns the current end frame number. + virtual s32 getEndFrame() const; + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + /* In this way it is possible to change the materials a mesh causing all mesh scene nodes + referencing this mesh to change too. */ + virtual void setReadOnlyMaterials(bool readonly); + + //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style + virtual bool isReadOnlyMaterials() const; + + //! Sets a new mesh + virtual void setMesh(IAnimatedMesh* mesh); + + //! Returns the current mesh + virtual IAnimatedMesh* getMesh(void) { return Mesh; } + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_ANIMATED_MESH; } + + // returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, + // or the absolutetransformation if it's a normal scenenode + const SMD3QuaternionTag* getMD3TagTransformation( const core::stringc & tagname); + + //! updates the absolute position based on the relative and the parents position + virtual void updateAbsolutePosition(); + + + //! Set the joint update mode (0-unused, 1-get joints only, 2-set joints only, 3-move and set) + virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode); + + //! Sets the transition time in seconds (note: This needs to enable joints, and setJointmode maybe set to 2) + //! you must call animateJoints(), or the mesh will not animate + virtual void setTransitionTime(f32 Time); + + //! updates the joint positions of this mesh + virtual void animateJoints(bool CalculateAbsolutePositions=true); + + //! render mesh ignoring its transformation. Used with ragdolls. (culling is unaffected) + virtual void setRenderFromIdentity( bool On ); + + //! Creates a clone of this scene node and its children. + /** \param newParent An optional new parent. + \param newManager An optional new scene manager. + \return The newly created clone of this node. */ + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + private: + + //! Get a static mesh for the current frame of this animated mesh + IMesh* getMeshForCurrentFrame(); + + void buildFrameNr(u32 timeMs); + void checkJoints(); + void beginTransition(); + + core::array<video::SMaterial> Materials; + core::aabbox3d<f32> Box; + IAnimatedMesh* Mesh; + + s32 StartFrame; + s32 EndFrame; + f32 FramesPerSecond; + f32 CurrentFrameNr; + + u32 LastTimeMs; + u32 TransitionTime; //Transition time in millisecs + f32 Transiting; //is mesh transiting (plus cache of TransitionTime) + f32 TransitingBlend; //0-1, calculated on buildFrameNr + + //0-unused, 1-get joints only, 2-set joints only, 3-move and set + E_JOINT_UPDATE_ON_RENDER JointMode; + bool JointsUsed; + + bool Looping; + bool ReadOnlyMaterials; + bool RenderFromIdentity; + + IAnimationEndCallBack* LoopCallBack; + s32 PassCount; + + IShadowVolumeSceneNode* Shadow; + + core::array<IBoneSceneNode* > JointChildSceneNodes; + core::array<core::matrix4> PretransitingSave; + + // Quake3 Model + struct SMD3Special : public virtual IReferenceCounted + { + core::stringc Tagname; + SMD3QuaternionTagList AbsoluteTagList; + + SMD3Special & operator = (const SMD3Special & copyMe) + { + Tagname = copyMe.Tagname; + AbsoluteTagList = copyMe.AbsoluteTagList; + return *this; + } + }; + SMD3Special *MD3Special; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributeImpl.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributeImpl.h new file mode 100644 index 0000000..f59c27c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributeImpl.h @@ -0,0 +1,2071 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CAttributes.h" +#include "fast_atof.h" +#include "ITexture.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace io +{ + +/* + basic types +*/ + +// Attribute implemented for boolean values +class CBoolAttribute : public IAttribute +{ +public: + + CBoolAttribute(const char* name, bool value) + { + Name = name; + setBool(value); + } + + virtual s32 getInt() + { + return BoolValue ? 1 : 0; + } + + virtual f32 getFloat() + { + return BoolValue ? 1.0f : 0.0f; + } + + virtual bool getBool() + { + return BoolValue; + } + + virtual core::stringw getStringW() + { + return core::stringw( BoolValue ? L"true" : L"false" ); + } + + virtual void setInt(s32 intValue) + { + BoolValue = (intValue != 0); + } + + virtual void setFloat(f32 floatValue) + { + BoolValue = (floatValue != 0); + } + + virtual void setBool(bool boolValue) + { + BoolValue = boolValue; + } + + virtual void setString(const char* string) + { + BoolValue = strcmp(string, "true") == 0; + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_BOOL; + } + + virtual const wchar_t* getTypeString() const + { + return L"bool"; + } + + bool BoolValue; +}; + +// Attribute implemented for integers +class CIntAttribute : public IAttribute +{ +public: + + CIntAttribute(const char* name, s32 value) + { + Name = name; + setInt(value); + } + + virtual s32 getInt() + { + return Value; + } + + virtual f32 getFloat() + { + return (f32)Value; + } + + virtual bool getBool() + { + return (Value != 0); + } + + virtual core::stringw getStringW() + { + return core::stringw(Value); + } + + virtual void setInt(s32 intValue) + { + Value = intValue; + } + + virtual void setFloat(f32 floatValue) + { + Value = (s32)floatValue; + }; + + virtual void setString(const char* text) + { + Value = atoi(text); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_INT; + } + + + virtual const wchar_t* getTypeString() const + { + return L"int"; + } + + s32 Value; +}; + +// Attribute implemented for floats +class CFloatAttribute : public IAttribute +{ +public: + + CFloatAttribute(const char* name, f32 value) + { + Name = name; + setFloat(value); + } + + virtual s32 getInt() + { + return (s32)Value; + } + + virtual f32 getFloat() + { + return Value; + } + + virtual bool getBool() + { + return (Value != 0); + } + + virtual core::stringw getStringW() + { + return core::stringw((double)Value); + } + + virtual void setInt(s32 intValue) + { + Value = (f32)intValue; + } + + virtual void setFloat(f32 floatValue) + { + Value = floatValue; + } + + virtual void setString(const char* text) + { + Value = core::fast_atof(text); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_FLOAT; + } + + + virtual const wchar_t* getTypeString() const + { + return L"float"; + } + + f32 Value; +}; + + + +/* + Types which can be represented as a list of numbers +*/ + +// Base class for all attributes which are a list of numbers- +// vectors, colors, positions, triangles, etc +class CNumbersAttribute : public IAttribute +{ +public: + + CNumbersAttribute(const char* name, video::SColorf value) : + ValueI(), ValueF(), Count(4), IsFloat(true) + { + Name = name; + ValueF.push_back(value.r); + ValueF.push_back(value.g); + ValueF.push_back(value.b); + ValueF.push_back(value.a); + } + + CNumbersAttribute(const char* name, video::SColor value) : + ValueI(), ValueF(), Count(4), IsFloat(false) + { + Name = name; + ValueI.push_back(value.getRed()); + ValueI.push_back(value.getGreen()); + ValueI.push_back(value.getBlue()); + ValueI.push_back(value.getAlpha()); + } + + + CNumbersAttribute(const char* name, core::vector3df value) : + ValueI(), ValueF(), Count(3), IsFloat(true) + { + Name = name; + ValueF.push_back(value.X); + ValueF.push_back(value.Y); + ValueF.push_back(value.Z); + } + + CNumbersAttribute(const char* name, core::rect<s32> value) : + ValueI(), ValueF(), Count(4), IsFloat(false) + { + Name = name; + ValueI.push_back(value.UpperLeftCorner.X); + ValueI.push_back(value.UpperLeftCorner.Y); + ValueI.push_back(value.LowerRightCorner.X); + ValueI.push_back(value.LowerRightCorner.Y); + } + + CNumbersAttribute(const char* name, core::rect<f32> value) : + ValueI(), ValueF(), Count(4), IsFloat(true) + { + Name = name; + ValueF.push_back(value.UpperLeftCorner.X); + ValueF.push_back(value.UpperLeftCorner.Y); + ValueF.push_back(value.LowerRightCorner.X); + ValueF.push_back(value.LowerRightCorner.Y); + } + + CNumbersAttribute(const char* name, core::matrix4 value) : + ValueI(), ValueF(), Count(16), IsFloat(true) + { + Name = name; + for (s32 r=0; r<4; ++r) + for (s32 c=0; c<4; ++c) + ValueF.push_back(value(r,c)); + } + + CNumbersAttribute(const char* name, core::quaternion value) : + ValueI(), ValueF(), Count(4), IsFloat(true) + { + Name = name; + ValueF.push_back(value.X); + ValueF.push_back(value.Y); + ValueF.push_back(value.Z); + ValueF.push_back(value.W); + } + + CNumbersAttribute(const char* name, core::aabbox3d<f32> value) : + ValueI(), ValueF(), Count(6), IsFloat(true) + { + Name = name; + ValueF.push_back(value.MinEdge.X); + ValueF.push_back(value.MinEdge.Y); + ValueF.push_back(value.MinEdge.Z); + ValueF.push_back(value.MaxEdge.X); + ValueF.push_back(value.MaxEdge.Y); + ValueF.push_back(value.MaxEdge.Z); + } + + CNumbersAttribute(const char* name, core::plane3df value) : + ValueI(), ValueF(), Count(4), IsFloat(true) + { + Name = name; + ValueF.push_back(value.Normal.X); + ValueF.push_back(value.Normal.Y); + ValueF.push_back(value.Normal.Z); + ValueF.push_back(value.D); + } + + CNumbersAttribute(const char* name, core::triangle3df value) : + ValueI(), ValueF(), Count(9), IsFloat(true) + { + Name = name; + ValueF.push_back(value.pointA.X); + ValueF.push_back(value.pointA.Y); + ValueF.push_back(value.pointA.Z); + ValueF.push_back(value.pointB.X); + ValueF.push_back(value.pointB.Y); + ValueF.push_back(value.pointB.Z); + ValueF.push_back(value.pointC.X); + ValueF.push_back(value.pointC.Y); + ValueF.push_back(value.pointC.Z); + } + + CNumbersAttribute(const char* name, core::vector2df value) : + ValueI(), ValueF(), Count(2), IsFloat(true) + { + Name = name; + ValueF.push_back(value.X); + ValueF.push_back(value.Y); + } + + CNumbersAttribute(const char* name, core::vector2di value) : + ValueI(), ValueF(), Count(2), IsFloat(false) + { + Name = name; + ValueI.push_back(value.X); + ValueI.push_back(value.Y); + } + + CNumbersAttribute(const char* name, core::line2di value) : + ValueI(), ValueF(), Count(4), IsFloat(false) + { + Name = name; + ValueI.push_back(value.start.X); + ValueI.push_back(value.start.Y); + ValueI.push_back(value.end.X); + ValueI.push_back(value.end.Y); + } + + CNumbersAttribute(const char* name, core::line2df value) : + ValueI(), ValueF(), Count(4), IsFloat(true) + { + Name = name; + ValueF.push_back(value.start.X); + ValueF.push_back(value.start.Y); + ValueF.push_back(value.end.X); + ValueF.push_back(value.end.Y); + } + + CNumbersAttribute(const char* name, core::line3df value) : + ValueI(), ValueF(), Count(6), IsFloat(true) + { + Name = name; + ValueF.push_back(value.start.X); + ValueF.push_back(value.start.Y); + ValueF.push_back(value.start.Z); + ValueF.push_back(value.end.X); + ValueF.push_back(value.end.Y); + ValueF.push_back(value.end.Z); + } + + CNumbersAttribute(const char* name, core::dimension2du value) : + ValueI(), ValueF(), Count(2), IsFloat(false) + { + Name = name; + ValueI.push_back(value.Width); + ValueI.push_back(value.Height); + } + + + CNumbersAttribute(const char* name, core::dimension2df value) : + ValueI(), ValueF(), Count(2), IsFloat(true) + { + Name = name; + ValueF.push_back(value.Width); + ValueF.push_back(value.Height); + } + + + + // getting values + virtual s32 getInt() + { + if (Count==0) + return 0; + + if (IsFloat) + return (s32)ValueF[0]; + else + return ValueI[0]; + } + + virtual f32 getFloat() + { + if (Count==0) + return 0.0f; + + if (IsFloat) + return ValueF[0]; + else + return (f32)ValueI[0]; + } + + virtual bool getBool() + { + // return true if any number is nonzero + bool ret=false; + + for (u32 i=0; i < Count; ++i) + if ( IsFloat ? (ValueF[i] != 0) : (ValueI[i] != 0) ) + { + ret=true; + break; + } + + return ret; + + } + + + virtual core::stringc getString() + { + core::stringc outstr; + + for (u32 i=0; i <Count; ++i) + { + if (IsFloat) + outstr += ValueF[i]; + else + outstr += ValueI[i]; + + if (i < Count-1) + outstr += ", "; + } + return outstr; + } + virtual core::stringw getStringW() + { + core::stringw outstr; + + for (u32 i=0; i <Count; ++i) + { + if (IsFloat) + outstr += ValueF[i]; + else + outstr += ValueI[i]; + + if (i < Count-1) + outstr += L", "; + } + return outstr; + } + + virtual core::position2di getPosition() + { + core::position2di p; + + if (IsFloat) + { + p.X = (s32)(Count > 0 ? ValueF[0] : 0); + p.Y = (s32)(Count > 1 ? ValueF[1] : 0); + } + else + { + p.X = Count > 0 ? ValueI[0] : 0; + p.Y = Count > 1 ? ValueI[1] : 0; + } + + return p; + } + + virtual core::vector3df getVector() + { + core::vector3df v; + + if (IsFloat) + { + v.X = Count > 0 ? ValueF[0] : 0; + v.Y = Count > 1 ? ValueF[1] : 0; + v.Z = Count > 2 ? ValueF[2] : 0; + } + else + { + v.X = (f32)(Count > 0 ? ValueI[0] : 0); + v.Y = (f32)(Count > 1 ? ValueI[1] : 0); + v.Z = (f32)(Count > 2 ? ValueI[2] : 0); + } + + return v; + } + + virtual core::vector2df getVector2d() + { + core::vector2df v; + + if (IsFloat) + { + v.X = Count > 0 ? ValueF[0] : 0; + v.Y = Count > 1 ? ValueF[1] : 0; + } + else + { + v.X = (f32)(Count > 0 ? ValueI[0] : 0); + v.Y = (f32)(Count > 1 ? ValueI[1] : 0); + } + + return v; + } + + virtual video::SColorf getColorf() + { + video::SColorf c; + if (IsFloat) + { + c.setColorComponentValue(0, Count > 0 ? ValueF[0] : 0); + c.setColorComponentValue(1, Count > 1 ? ValueF[1] : 0); + c.setColorComponentValue(2, Count > 2 ? ValueF[2] : 0); + c.setColorComponentValue(3, Count > 3 ? ValueF[3] : 0); + } + else + { + c.setColorComponentValue(0, Count > 0 ? (f32)(ValueI[0]) / 255.0f : 0); + c.setColorComponentValue(1, Count > 1 ? (f32)(ValueI[1]) / 255.0f : 0); + c.setColorComponentValue(2, Count > 2 ? (f32)(ValueI[2]) / 255.0f : 0); + c.setColorComponentValue(3, Count > 3 ? (f32)(ValueI[3]) / 255.0f : 0); + } + + return c; + } + + virtual video::SColor getColor() + { + return getColorf().toSColor(); + } + + + virtual core::rect<s32> getRect() + { + core::rect<s32> r; + + if (IsFloat) + { + r.UpperLeftCorner.X = (s32)(Count > 0 ? ValueF[0] : 0); + r.UpperLeftCorner.Y = (s32)(Count > 1 ? ValueF[1] : 0); + r.LowerRightCorner.X = (s32)(Count > 2 ? ValueF[2] : r.UpperLeftCorner.X); + r.LowerRightCorner.Y = (s32)(Count > 3 ? ValueF[3] : r.UpperLeftCorner.Y); + } + else + { + r.UpperLeftCorner.X = Count > 0 ? ValueI[0] : 0; + r.UpperLeftCorner.Y = Count > 1 ? ValueI[1] : 0; + r.LowerRightCorner.X = Count > 2 ? ValueI[2] : r.UpperLeftCorner.X; + r.LowerRightCorner.Y = Count > 3 ? ValueI[3] : r.UpperLeftCorner.Y; + } + return r; + } + + virtual core::dimension2du getDimension2d() + { + core::dimension2d<u32> dim; + + if (IsFloat) + { + dim.Width = (u32)(Count > 0 ? ValueF[0] : 0); + dim.Height = (u32)(Count > 1 ? ValueF[1] : 0); + } + else + { + dim.Width = (u32)(Count > 0 ? ValueI[0] : 0); + dim.Height = (u32)(Count > 1 ? ValueI[1] : 0); + } + return dim; + } + + virtual core::matrix4 getMatrix() + { + core::matrix4 ret; + if (IsFloat) + { + for (u32 r=0; r<4; ++r) + for (u32 c=0; c<4; ++c) + if (Count > c+r*4) + ret(r,c) = ValueF[c+r*4]; + } + else + { + for (u32 r=0; r<4; ++r) + for (u32 c=0; c<4; ++c) + if (Count > c+r*4) + ret(r,c) = (f32)ValueI[c+r*4]; + } + return ret; + } + + virtual core::quaternion getQuaternion() + { + core::quaternion ret; + if (IsFloat) + { + ret.X = Count > 0 ? ValueF[0] : 0.0f; + ret.Y = Count > 1 ? ValueF[1] : 0.0f; + ret.Z = Count > 2 ? ValueF[2] : 0.0f; + ret.W = Count > 3 ? ValueF[3] : 0.0f; + } + else + { + ret.X = Count > 0 ? (f32)ValueI[0] : 0.0f; + ret.Y = Count > 1 ? (f32)ValueI[1] : 0.0f; + ret.Z = Count > 2 ? (f32)ValueI[2] : 0.0f; + ret.W = Count > 3 ? (f32)ValueI[3] : 0.0f; + } + return ret; + } + + virtual core::triangle3df getTriangle() + { + core::triangle3df ret; + + if (IsFloat) + { + ret.pointA.X = Count > 0 ? ValueF[0] : 0.0f; + ret.pointA.Y = Count > 1 ? ValueF[1] : 0.0f; + ret.pointA.Z = Count > 2 ? ValueF[2] : 0.0f; + ret.pointB.X = Count > 3 ? ValueF[3] : 0.0f; + ret.pointB.Y = Count > 4 ? ValueF[4] : 0.0f; + ret.pointB.Z = Count > 5 ? ValueF[5] : 0.0f; + ret.pointC.X = Count > 6 ? ValueF[6] : 0.0f; + ret.pointC.Y = Count > 7 ? ValueF[7] : 0.0f; + ret.pointC.Z = Count > 8 ? ValueF[8] : 0.0f; + } + else + { + ret.pointA.X = Count > 0 ? (f32)ValueI[0] : 0.0f; + ret.pointA.Y = Count > 1 ? (f32)ValueI[1] : 0.0f; + ret.pointA.Z = Count > 2 ? (f32)ValueI[2] : 0.0f; + ret.pointB.X = Count > 3 ? (f32)ValueI[3] : 0.0f; + ret.pointB.Y = Count > 4 ? (f32)ValueI[4] : 0.0f; + ret.pointB.Z = Count > 5 ? (f32)ValueI[5] : 0.0f; + ret.pointC.X = Count > 6 ? (f32)ValueI[6] : 0.0f; + ret.pointC.Y = Count > 7 ? (f32)ValueI[7] : 0.0f; + ret.pointC.Z = Count > 8 ? (f32)ValueI[8] : 0.0f; + } + + return ret; + } + + virtual core::plane3df getPlane() + { + core::plane3df ret; + + if (IsFloat) + { + ret.Normal.X = Count > 0 ? ValueF[0] : 0.0f; + ret.Normal.Y = Count > 1 ? ValueF[1] : 0.0f; + ret.Normal.Z = Count > 2 ? ValueF[2] : 0.0f; + ret.D = Count > 3 ? ValueF[3] : 0.0f; + } + else + { + ret.Normal.X = Count > 0 ? (f32)ValueI[0] : 0.0f; + ret.Normal.Y = Count > 1 ? (f32)ValueI[1] : 0.0f; + ret.Normal.Z = Count > 2 ? (f32)ValueI[2] : 0.0f; + ret.D = Count > 3 ? (f32)ValueI[3] : 0.0f; + } + + return ret; + } + + virtual core::aabbox3df getBBox() + { + core::aabbox3df ret; + if (IsFloat) + { + ret.MinEdge.X = Count > 0 ? ValueF[0] : 0.0f; + ret.MinEdge.Y = Count > 1 ? ValueF[1] : 0.0f; + ret.MinEdge.Z = Count > 2 ? ValueF[2] : 0.0f; + ret.MaxEdge.X = Count > 3 ? ValueF[3] : 0.0f; + ret.MaxEdge.Y = Count > 4 ? ValueF[4] : 0.0f; + ret.MaxEdge.Z = Count > 5 ? ValueF[5] : 0.0f; + } + else + { + ret.MinEdge.X = Count > 0 ? (f32)ValueI[0] : 0.0f; + ret.MinEdge.Y = Count > 1 ? (f32)ValueI[1] : 0.0f; + ret.MinEdge.Z = Count > 2 ? (f32)ValueI[2] : 0.0f; + ret.MaxEdge.X = Count > 3 ? (f32)ValueI[3] : 0.0f; + ret.MaxEdge.Y = Count > 4 ? (f32)ValueI[4] : 0.0f; + ret.MaxEdge.Z = Count > 5 ? (f32)ValueI[5] : 0.0f; + } + return ret; + + } + + virtual core::line2df getLine2d() + { + core::line2df ret; + if (IsFloat) + { + ret.start.X = Count > 0 ? ValueF[0] : 0.0f; + ret.start.Y = Count > 1 ? ValueF[1] : 0.0f; + ret.end.X = Count > 2 ? ValueF[2] : 0.0f; + ret.end.Y = Count > 3 ? ValueF[3] : 0.0f; + } + else + { + ret.start.X = Count > 0 ? (f32)ValueI[0] : 0.0f; + ret.start.Y = Count > 1 ? (f32)ValueI[1] : 0.0f; + ret.end.X = Count > 2 ? (f32)ValueI[2] : 0.0f; + ret.end.Y = Count > 3 ? (f32)ValueI[3] : 0.0f; + } + return ret; + } + + virtual core::line3df getLine3d() + { + core::line3df ret; + if (IsFloat) + { + ret.start.X = Count > 0 ? ValueF[0] : 0.0f; + ret.start.Y = Count > 1 ? ValueF[1] : 0.0f; + ret.start.Z = Count > 2 ? ValueF[2] : 0.0f; + ret.end.X = Count > 3 ? ValueF[3] : 0.0f; + ret.end.Y = Count > 4 ? ValueF[4] : 0.0f; + ret.end.Z = Count > 5 ? ValueF[5] : 0.0f; + } + else + { + ret.start.X = Count > 0 ? (f32)ValueI[0] : 0.0f; + ret.start.Y = Count > 1 ? (f32)ValueI[1] : 0.0f; + ret.start.Z = Count > 2 ? (f32)ValueI[2] : 0.0f; + ret.end.X = Count > 3 ? (f32)ValueI[3] : 0.0f; + ret.end.Y = Count > 4 ? (f32)ValueI[4] : 0.0f; + ret.end.Z = Count > 5 ? (f32)ValueI[5] : 0.0f; + } + return ret; + } + + //! get float array + virtual core::array<f32> getFloatArray() + { + if (!IsFloat) + { + ValueF.clear(); + for (u32 i=0; i<Count; ++i) + ValueF.push_back( (f32) ValueI[i] ); + } + return ValueF; + } + + //! get int array + virtual core::array<s32> getIntArray() + { + if (IsFloat) + { + ValueI.clear(); + for (u32 i=0; i<Count; ++i) + ValueI.push_back( (s32) ValueF[i] ); + } + return ValueI; + } + + + // setting values + virtual void setInt(s32 intValue) + { + // set all values + for (u32 i=0; i < Count; ++i) + if (IsFloat) + ValueF[i] = (f32)intValue; + else + ValueI[i] = intValue; + } + + virtual void setFloat(f32 floatValue) + { + // set all values + for (u32 i=0; i < Count; ++i) + if (IsFloat) + ValueF[i] = floatValue; + else + ValueI[i] = (s32)floatValue; + } + + virtual void setBool(bool boolValue) + { + setInt( boolValue ? 1 : 0); + } + + virtual void setString(const char* text) + { + // parse text + + const char* P = (const char*)text; + + reset(); + + u32 i=0; + + for ( i=0; i<Count && *P; ++i ) + { + while(*P && P[0]!='-' && ( P[0]==' ' || (P[0] < '0' || P[0] > '9') ) ) + ++P; + + // set value + if ( *P) + { + if (IsFloat) + { + f32 c = 0; + P = core::fast_atof_move(P, c); + ValueF[i] = c; + } + else + { + // todo: fix this to read ints properly + f32 c = 0; + P = core::fast_atof_move(P, c); + ValueI[i] = (s32)c; + + } + } + } + // todo: warning message + //if (i < Count-1) + //{ + // + //} + } + + virtual void setPosition(core::position2di v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = (f32)v.X; + if (Count > 1) ValueF[1] = (f32)v.Y; + } + else + { + if (Count > 0) ValueI[0] = v.X; + if (Count > 1) ValueI[1] = v.Y; + } + } + + virtual void setVector(core::vector3df v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = v.X; + if (Count > 1) ValueF[1] = v.Y; + if (Count > 2) ValueF[2] = v.Z; + } + else + { + if (Count > 0) ValueI[0] = (s32)v.X; + if (Count > 1) ValueI[1] = (s32)v.Y; + if (Count > 2) ValueI[2] = (s32)v.Z; + } + } + + virtual void setColor(video::SColorf color) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = color.r; + if (Count > 1) ValueF[1] = color.g; + if (Count > 2) ValueF[2] = color.b; + if (Count > 3) ValueF[3] = color.a; + } + else + { + if (Count > 0) ValueI[0] = (s32)(color.r * 255); + if (Count > 1) ValueI[1] = (s32)(color.g * 255); + if (Count > 2) ValueI[2] = (s32)(color.b * 255); + if (Count > 3) ValueI[3] = (s32)(color.a * 255); + } + + } + + virtual void setColor(video::SColor color) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = (f32)color.getRed() / 255.0f; + if (Count > 1) ValueF[1] = (f32)color.getGreen() / 255.0f; + if (Count > 2) ValueF[2] = (f32)color.getBlue() / 255.0f; + if (Count > 3) ValueF[3] = (f32)color.getAlpha() / 255.0f; + } + else + { + if (Count > 0) ValueI[0] = color.getRed(); + if (Count > 1) ValueI[1] = color.getGreen(); + if (Count > 2) ValueI[2] = color.getBlue(); + if (Count > 3) ValueI[3] = color.getAlpha(); + } + } + + virtual void setRect(core::rect<s32> value) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = (f32)value.UpperLeftCorner.X; + if (Count > 1) ValueF[1] = (f32)value.UpperLeftCorner.Y; + if (Count > 2) ValueF[2] = (f32)value.LowerRightCorner.X; + if (Count > 3) ValueF[3] = (f32)value.LowerRightCorner.Y; + } + else + { + if (Count > 0) ValueI[0] = value.UpperLeftCorner.X; + if (Count > 1) ValueI[1] = value.UpperLeftCorner.Y; + if (Count > 2) ValueI[2] = value.LowerRightCorner.X; + if (Count > 3) ValueI[3] = value.LowerRightCorner.Y; + } + } + + virtual void setMatrix(core::matrix4 value) + { + reset(); + if (IsFloat) + { + for (u32 r=0; r<4; ++r) + for (u32 c=0; c<4; ++c) + if (Count > c+r*4) + ValueF[c+r*4] = value(r,c); + } + else + { + for (u32 r=0; r<4; ++r) + for (u32 c=0; c<4; ++c) + if (Count > c+r*4) + ValueI[c+r*4] = (s32)value(r,c); + } + } + + virtual void setQuaternion(core::quaternion value) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = value.X; + if (Count > 1) ValueF[1] = value.Y; + if (Count > 2) ValueF[2] = value.Z; + if (Count > 3) ValueF[3] = value.W; + } + else + { + if (Count > 0) ValueI[0] = (s32)value.X; + if (Count > 1) ValueI[1] = (s32)value.Y; + if (Count > 2) ValueI[2] = (s32)value.Z; + if (Count > 3) ValueI[3] = (s32)value.W; + } + } + + virtual void setBoundingBox(core::aabbox3d<f32> value) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = value.MinEdge.X; + if (Count > 1) ValueF[1] = value.MinEdge.Y; + if (Count > 2) ValueF[2] = value.MinEdge.Z; + if (Count > 3) ValueF[3] = value.MaxEdge.X; + if (Count > 4) ValueF[4] = value.MaxEdge.Y; + if (Count > 5) ValueF[5] = value.MaxEdge.Z; + } + else + { + if (Count > 0) ValueI[0] = (s32)value.MinEdge.X; + if (Count > 1) ValueI[1] = (s32)value.MinEdge.Y; + if (Count > 2) ValueI[2] = (s32)value.MinEdge.Z; + if (Count > 3) ValueI[3] = (s32)value.MaxEdge.X; + if (Count > 4) ValueI[4] = (s32)value.MaxEdge.Y; + if (Count > 5) ValueI[5] = (s32)value.MaxEdge.Z; + } + } + + virtual void setPlane(core::plane3df value) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = value.Normal.X; + if (Count > 1) ValueF[1] = value.Normal.Y; + if (Count > 2) ValueF[2] = value.Normal.Z; + if (Count > 3) ValueF[3] = value.D; + } + else + { + if (Count > 0) ValueI[0] = (s32)value.Normal.X; + if (Count > 1) ValueI[1] = (s32)value.Normal.Y; + if (Count > 2) ValueI[2] = (s32)value.Normal.Z; + if (Count > 3) ValueI[3] = (s32)value.D; + } + } + + virtual void setTriangle3d(core::triangle3df value) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = value.pointA.X; + if (Count > 1) ValueF[1] = value.pointA.Y; + if (Count > 2) ValueF[2] = value.pointA.Z; + if (Count > 3) ValueF[3] = value.pointB.X; + if (Count > 4) ValueF[4] = value.pointB.Y; + if (Count > 5) ValueF[5] = value.pointB.Z; + if (Count > 6) ValueF[6] = value.pointC.X; + if (Count > 7) ValueF[7] = value.pointC.Y; + if (Count > 8) ValueF[8] = value.pointC.Z; + } + else + { + if (Count > 0) ValueI[0] = (s32)value.pointA.X; + if (Count > 1) ValueI[1] = (s32)value.pointA.Y; + if (Count > 2) ValueI[2] = (s32)value.pointA.Z; + if (Count > 3) ValueI[3] = (s32)value.pointB.X; + if (Count > 4) ValueI[4] = (s32)value.pointB.Y; + if (Count > 5) ValueI[5] = (s32)value.pointB.Z; + if (Count > 6) ValueI[6] = (s32)value.pointC.X; + if (Count > 7) ValueI[7] = (s32)value.pointC.Y; + if (Count > 8) ValueI[8] = (s32)value.pointC.Z; + } + } + + virtual void setVector2d(core::vector2df v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = v.X; + if (Count > 1) ValueF[1] = v.Y; + } + else + { + if (Count > 0) ValueI[0] = (s32)v.X; + if (Count > 1) ValueI[1] = (s32)v.Y; + } + } + + virtual void setVector2d(core::vector2di v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = (f32)v.X; + if (Count > 1) ValueF[1] = (f32)v.Y; + } + else + { + if (Count > 0) ValueI[0] = v.X; + if (Count > 1) ValueI[1] = v.Y; + } + } + + virtual void setLine2d(core::line2di v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = (f32)v.start.X; + if (Count > 1) ValueF[1] = (f32)v.start.Y; + if (Count > 2) ValueF[2] = (f32)v.end.X; + if (Count > 3) ValueF[3] = (f32)v.end.Y; + } + else + { + if (Count > 0) ValueI[0] = v.start.X; + if (Count > 1) ValueI[1] = v.start.Y; + if (Count > 2) ValueI[2] = v.end.X; + if (Count > 3) ValueI[3] = v.end.Y; + } + } + + virtual void setLine2d(core::line2df v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = v.start.X; + if (Count > 1) ValueF[1] = v.start.Y; + if (Count > 2) ValueF[2] = v.end.X; + if (Count > 3) ValueF[3] = v.end.Y; + } + else + { + if (Count > 0) ValueI[0] = (s32)v.start.X; + if (Count > 1) ValueI[1] = (s32)v.start.Y; + if (Count > 2) ValueI[2] = (s32)v.end.X; + if (Count > 3) ValueI[3] = (s32)v.end.Y; + } + } + + virtual void setDimension2d(core::dimension2du v) + { + reset(); + if (IsFloat) + { + if (Count > 0) ValueF[0] = (f32)v.Width; + if (Count > 1) ValueF[1] = (f32)v.Height; + } + else + { + if (Count > 0) ValueI[0] = (s32)v.Width; + if (Count > 1) ValueI[1] = (s32)v.Height; + } + } + + //! set float array + virtual void setFloatArray(core::array<f32> &vals) + { + reset(); + + for (u32 i=0; i<vals.size() && i<Count; ++i) + { + if (IsFloat) + ValueF[i] = vals[i]; + else + ValueI[i] = (s32)vals[i]; + } + } + + //! set int array + virtual void setIntArray(core::array<s32> &vals) + { + reset(); + + for (u32 i=0; i<vals.size() && i<Count; ++i) + { + if (IsFloat) + ValueF[i] = (f32)vals[i]; + else + ValueI[i] = vals[i]; + } + } + + + //! is it a number list? + virtual bool isNumberList() + { + return true; + } + + //! is it a float list? + virtual bool isFloat() + { + return IsFloat; + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + if (IsFloat) + return EAT_FLOATARRAY; + else + return EAT_INTARRAY; + } + + virtual const wchar_t* getTypeString() const + { + if (IsFloat) + return L"floatlist"; + else + return L"intlist"; + } + +protected: + + //! clear all values + void reset() + { + if (IsFloat) + for (u32 i=0; i < Count ; ++i) + ValueF[i] = 0.0f; + else + for (u32 i=0; i < Count ; ++i) + ValueI[i] = 0; + } + + core::array<s32> ValueI; + core::array<f32> ValueF; + u32 Count; + bool IsFloat; +}; + + +// Attribute implemented for floating point colors +class CColorfAttribute : public CNumbersAttribute +{ +public: + + CColorfAttribute(const char* name, video::SColorf value) : CNumbersAttribute(name, value) {} + + virtual s32 getInt() + { + return getColor().color; + } + + virtual f32 getFloat() + { + return (f32)getColor().color; + } + + virtual void setInt(s32 intValue) + { + video::SColorf c = video::SColor(intValue); + ValueF[0] = c.r; + ValueF[1] = c.g; + ValueF[2] = c.b; + ValueF[3] = c.a; + } + + virtual void setFloat(f32 floatValue) + { + setInt((s32)floatValue); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_COLORF; + } + + virtual const wchar_t* getTypeString() const + { + return L"colorf"; + } +}; + + + +// Attribute implemented for colors +class CColorAttribute : public CNumbersAttribute +{ +public: + + CColorAttribute(const char* name, const video::SColorf& value) : CNumbersAttribute(name, value) {} + + CColorAttribute(const char* name, const video::SColor& value) : CNumbersAttribute(name, value) {} + + virtual s32 getInt() + { + return getColor().color; + } + + virtual f32 getFloat() + { + return (f32)getColor().color; + } + + virtual void setInt(s32 intValue) + { + video::SColorf c = video::SColor(intValue); + ValueF[0] = c.r; + ValueF[1] = c.g; + ValueF[2] = c.b; + ValueF[3] = c.a; + } + + virtual void setFloat(f32 floatValue) + { + setInt((s32)floatValue); + } + + virtual core::stringw getStringW() + { + char tmp[10]; + const video::SColor c = getColor(); + sprintf(tmp, "%02x%02x%02x%02x", c.getAlpha(), c.getRed(), c.getGreen(), c.getBlue()); + return core::stringw(tmp); + } + + virtual void setString(const char* text) + { + u32 c; + if (sscanf(text, "%08x", &c)!=1) + { + CNumbersAttribute::setString(text); + } + else + setColor(c); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_COLOR; + } + + + virtual const wchar_t* getTypeString() const + { + return L"color"; + } + +}; + + +// Attribute implemented for 3d vectors +class CVector3DAttribute : public CNumbersAttribute +{ +public: + + CVector3DAttribute(const char* name, core::vector3df value) : CNumbersAttribute(name, value) {} + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_VECTOR3D; + } + + virtual core::matrix4 getMatrix() + { + core::matrix4 ret; + ret.makeIdentity(); + ret.setTranslation( core::vector3df(ValueF[0],ValueF[1],ValueF[2]) ); + return ret; + } + + virtual const wchar_t* getTypeString() const + { + return L"vector3d"; + } +}; + +// Attribute implemented for 2d vectors +class CVector2DAttribute : public CNumbersAttribute +{ +public: + + CVector2DAttribute(const char* name, core::vector2df value) : CNumbersAttribute(name, value) {} + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_VECTOR2D; + } + + virtual const wchar_t* getTypeString() const + { + return L"vector2d"; + } +}; + +// Attribute implemented for 2d vectors +class CPosition2DAttribute : public CNumbersAttribute +{ +public: + + CPosition2DAttribute(const char* name, core::position2di value) : CNumbersAttribute(name, value) {} + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_POSITION2D; + } + + virtual const wchar_t* getTypeString() const + { + return L"position"; + } +}; + + + +// Attribute implemented for rectangles +class CRectAttribute : public CNumbersAttribute +{ +public: + + CRectAttribute(const char* name, core::rect<s32> value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_RECT; + } + + virtual const wchar_t* getTypeString() const + { + return L"rect"; + } +}; + + +// Attribute implemented for dimension +class CDimension2dAttribute : public CNumbersAttribute +{ +public: + + CDimension2dAttribute (const char* name, core::dimension2d<u32> value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_DIMENSION2D; + } + + virtual const wchar_t* getTypeString() const + { + return L"dimension2d"; + } +}; + +// Attribute implemented for matrices +class CMatrixAttribute : public CNumbersAttribute +{ +public: + + CMatrixAttribute(const char* name, core::matrix4 value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_MATRIX; + } + + virtual core::quaternion getQuaternion() + { + return core::quaternion(getMatrix()); + } + + virtual const wchar_t* getTypeString() const + { + return L"matrix"; + } +}; + +// Attribute implemented for quaternions +class CQuaternionAttribute : public CNumbersAttribute +{ +public: + + CQuaternionAttribute(const char* name, core::quaternion value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_QUATERNION; + } + + virtual core::matrix4 getMatrix() + { + return getQuaternion().getMatrix(); + } + + virtual const wchar_t* getTypeString() const + { + return L"quaternion"; + } +}; + + +// Attribute implemented for bounding boxes +class CBBoxAttribute : public CNumbersAttribute +{ +public: + + CBBoxAttribute(const char* name, core::aabbox3df value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_BBOX; + } + + virtual const wchar_t* getTypeString() const + { + return L"box3d"; + } +}; + +// Attribute implemented for planes +class CPlaneAttribute : public CNumbersAttribute +{ +public: + + CPlaneAttribute(const char* name, core::plane3df value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_PLANE; + } + + virtual const wchar_t* getTypeString() const + { + return L"plane"; + } +}; + +// Attribute implemented for triangles +class CTriangleAttribute : public CNumbersAttribute +{ +public: + + CTriangleAttribute(const char* name, core::triangle3df value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_TRIANGLE3D; + } + + virtual core::plane3df getPlane() + { + return getTriangle().getPlane(); + } + + virtual const wchar_t* getTypeString() const + { + return L"triangle"; + } +}; + + +// Attribute implemented for 2d lines +class CLine2dAttribute : public CNumbersAttribute +{ +public: + + CLine2dAttribute(const char* name, core::line2df value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_LINE2D; + } + + virtual const wchar_t* getTypeString() const + { + return L"line2d"; + } +}; + +// Attribute implemented for 3d lines +class CLine3dAttribute : public CNumbersAttribute +{ +public: + + CLine3dAttribute(const char* name, core::line3df value) : CNumbersAttribute(name, value) { } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_LINE3D; + } + + virtual const wchar_t* getTypeString() const + { + return L"line3d"; + } +}; + + +// vector2df +// dimension2du + +/* + Special attributes +*/ + +// Attribute implemented for enumeration literals +class CEnumAttribute : public IAttribute +{ +public: + + CEnumAttribute(const char* name, const char* value, const char* const* literals) + { + Name = name; + setEnum(value, literals); + } + + virtual void setEnum(const char* enumValue, const char* const* enumerationLiterals) + { + int literalCount = 0; + + if (enumerationLiterals) + { + s32 i; + for (i=0; enumerationLiterals[i]; ++i) + ++literalCount; + + EnumLiterals.reallocate(literalCount); + for (i=0; enumerationLiterals[i]; ++i) + EnumLiterals.push_back(enumerationLiterals[i]); + } + + setString(enumValue); + } + + virtual s32 getInt() + { + for (s32 i=0; EnumLiterals.size(); ++i) + if (Value.equals_ignore_case(EnumLiterals[i])) + { + return i; + } + + return -1; + } + + virtual f32 getFloat() + { + return (f32)getInt(); + } + + virtual bool getBool() + { + return (getInt() != 0); // does not make a lot of sense, I know + } + + virtual core::stringc getString() + { + return Value; + } + + virtual core::stringw getStringW() + { + return core::stringw(Value.c_str()); + } + + virtual void setInt(s32 intValue) + { + if (intValue>=0 && intValue<(s32)EnumLiterals.size()) + Value = EnumLiterals[intValue]; + else + Value = ""; + } + + virtual void setFloat(f32 floatValue) + { + setInt((s32)floatValue); + }; + + virtual void setString(const char* text) + { + Value = text; + } + + virtual const char* getEnum() + { + return Value.c_str(); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_ENUM; + } + + + virtual const wchar_t* getTypeString() const + { + return L"enum"; + } + + core::stringc Value; + core::array<core::stringc> EnumLiterals; +}; + + + + + +// Attribute implemented for strings +class CStringAttribute : public IAttribute +{ +public: + + CStringAttribute(const char* name, const char* value) + { + IsStringW=false; + Name = name; + setString(value); + } + + CStringAttribute(const char* name, const wchar_t* value) + { + IsStringW = true; + Name = name; + setString(value); + } + + CStringAttribute(const char* name, void* binaryData, s32 lenghtInBytes) + { + IsStringW=false; + Name = name; + setBinary(binaryData, lenghtInBytes); + } + + virtual s32 getInt() + { + if (IsStringW) + return atoi(core::stringc(ValueW.c_str()).c_str()); + else + return atoi(Value.c_str()); + } + + virtual f32 getFloat() + { + if (IsStringW) + return core::fast_atof(core::stringc(ValueW.c_str()).c_str()); + else + return core::fast_atof(Value.c_str()); + } + + virtual bool getBool() + { + if (IsStringW) + return ValueW.equals_ignore_case(L"true"); + else + return Value.equals_ignore_case("true"); + } + + virtual core::stringc getString() + { + if (IsStringW) + return core::stringc(ValueW.c_str()); + else + return Value; + } + virtual core::stringw getStringW() + { + if (IsStringW) + return ValueW; + else + return core::stringw(Value.c_str()); + } + + virtual void setInt(s32 intValue) + { + if (IsStringW) + ValueW = core::stringw(intValue); + else + Value = core::stringc(intValue); + } + + virtual void setFloat(f32 floatValue) + { + if (IsStringW) + { + ValueW = core::stringw((double)floatValue); + } + else + { + Value = core::stringc((double)floatValue); + } + }; + + virtual void setString(const char* text) + { + if (IsStringW) + ValueW = core::stringw(text); + else + Value = text; + } + + virtual void setString(const wchar_t* text) + { + if (IsStringW) + ValueW = text; + else + Value = core::stringc(text); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_STRING; + } + + + virtual const wchar_t* getTypeString() const + { + return L"string"; + } + + virtual void getBinary(void* outdata, s32 maxLength) + { + s32 dataSize = maxLength; + c8* datac8 = (c8*)(outdata); + s32 p = 0; + const c8* dataString = Value.c_str(); + + for (s32 i=0; i<dataSize; ++i) + datac8[i] = 0; + + while(dataString[p] && p<dataSize) + { + s32 v = getByteFromHex((c8)dataString[p*2]) * 16; + + if (dataString[(p*2)+1]) + v += getByteFromHex((c8)dataString[(p*2)+1]); + + datac8[p] = v; + ++p; + } + }; + + virtual void setBinary(void* data, s32 maxLength) + { + s32 dataSize = maxLength; + c8* datac8 = (c8*)(data); + char tmp[3]; + tmp[2] = 0; + Value = ""; + + for (s32 b=0; b<dataSize; ++b) + { + getHexStrFromByte(datac8[b], tmp); + Value.append(tmp); + } + }; + + bool IsStringW; + core::stringc Value; + core::stringw ValueW; + +protected: + + static inline s32 getByteFromHex(c8 h) + { + if (h >= '0' && h <='9') + return h-'0'; + + if (h >= 'a' && h <='f') + return h-'a' + 10; + + return 0; + } + + static inline void getHexStrFromByte(c8 byte, c8* out) + { + s32 b = (byte & 0xf0) >> 4; + + for (s32 i=0; i<2; ++i) + { + if (b >=0 && b <= 9) + out[i] = b+'0'; + if (b >=10 && b <= 15) + out[i] = (b-10)+'a'; + + b = byte & 0x0f; + } + } +}; + +// Attribute implemented for binary data +class CBinaryAttribute : public CStringAttribute +{ +public: + + CBinaryAttribute(const char* name, void* binaryData, s32 lenghtInBytes) + : CStringAttribute(name, binaryData, lenghtInBytes) + { + + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_BINARY; + } + + + virtual const wchar_t* getTypeString() const + { + return L"binary"; + } +}; + + + +// Attribute implemented for texture references +class CTextureAttribute : public IAttribute +{ +public: + + CTextureAttribute(const char* name, video::ITexture* value, video::IVideoDriver* driver, const io::path& filename) + : Value(0), Driver(driver), OverrideName(filename) + { + if (Driver) + Driver->grab(); + + Name = name; + setTexture(value); + } + + ~CTextureAttribute() + { + if (Driver) + Driver->drop(); + + if (Value) + Value->drop(); + } + + virtual video::ITexture* getTexture() + { + return Value; + } + + virtual bool getBool() + { + return (Value != 0); + } + + virtual core::stringw getStringW() + { + // (note: don't try to put all this in some ?: operators, or c++ builder will choke) + if ( OverrideName.size() ) + return core::stringw(OverrideName); + + if ( Value ) + return core::stringw(Value->getName().getPath().c_str()); + + return core::stringw(0); + } + + virtual core::stringc getString() + { + // since texture names can be stringw we are careful with the types + if ( OverrideName.size() ) + return core::stringc(OverrideName); + + if ( Value ) + return core::stringc(Value->getName().getPath().c_str()); + + return core::stringc(0); + } + + virtual void setString(const char* text) + { + if (Driver) + { + if (text && *text) + { + setTexture(Driver->getTexture(text)); + OverrideName=text; + } + else + setTexture(0); + } + } + + virtual void setTexture(video::ITexture* value) + { + if ( value == Value ) + return; + + if (Value) + Value->drop(); + + Value = value; + + if (Value) + Value->grab(); + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_TEXTURE; + } + + + virtual const wchar_t* getTypeString() const + { + return L"texture"; + } + + video::ITexture* Value; + video::IVideoDriver* Driver; + io::path OverrideName; +}; + + + +// Attribute implemented for array of stringw +class CStringWArrayAttribute : public IAttribute +{ +public: + + CStringWArrayAttribute(const char* name, const core::array<core::stringw>& value) + { + Name = name; + setArray(value); + } + + virtual core::array<core::stringw> getArray() + { + return Value; + } + + virtual void setArray(const core::array<core::stringw>& value) + { + Value = value; + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_STRINGWARRAY; + } + + virtual const wchar_t* getTypeString() const + { + return L"stringwarray"; + } + + core::array<core::stringw> Value; +}; + + +// Attribute implemented for user pointers +class CUserPointerAttribute : public IAttribute +{ +public: + + CUserPointerAttribute(const char* name, void* value) + { + Name = name; + Value = value; + } + + virtual s32 getInt() + { + return *static_cast<s32*>(Value); + } + + virtual bool getBool() + { + return (Value != 0); + } + + virtual core::stringw getStringW() + { + wchar_t buf[32]; + swprintf(buf, 32, L"%p", Value); + + return core::stringw(buf); + } + + virtual void setString(const char* text) + { + u32 tmp; + sscanf(text, "0x%x", &tmp); + Value = (void *) tmp; + } + + virtual E_ATTRIBUTE_TYPE getType() const + { + return EAT_USER_POINTER; + } + + virtual void setUserPointer(void* v) + { + Value = v; + } + + virtual void* getUserPointer() + { + return Value; + } + + + virtual const wchar_t* getTypeString() const + { + return L"userPointer"; + } + + void* Value; +}; + + + +// todo: CGUIFontAttribute + +} // end namespace io +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.cpp new file mode 100644 index 0000000..21ebe1f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.cpp @@ -0,0 +1,1665 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CAttributes.h" +#include "CAttributeImpl.h" +#include "ITexture.h" +#include "IXMLWriter.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace io +{ + +CAttributes::CAttributes(video::IVideoDriver* driver) +: Driver(driver) +{ + #ifdef _DEBUG + setDebugName("CAttributes"); + #endif + + if (Driver) + Driver->grab(); +} + +CAttributes::~CAttributes() +{ + clear(); + + if (Driver) + Driver->drop(); +} + + +//! Removes all attributes +void CAttributes::clear() +{ + for (u32 i=0; i<Attributes.size(); ++i) + Attributes[i]->drop(); + + Attributes.clear(); +} + + +//! Sets a string attribute. +//! \param attributeName: Name for the attribute +//! \param value: Value for the attribute. Set this to 0 to delete the attribute +void CAttributes::setAttribute(const c8* attributeName, const c8* value) +{ + for (u32 i=0; i<Attributes.size(); ++i) + if (Attributes[i]->Name == attributeName) + { + if (!value) + { + Attributes[i]->drop(); + Attributes.erase(i); + } + else + Attributes[i]->setString(value); + + return; + } + + if (value) + { + Attributes.push_back(new CStringAttribute(attributeName, value)); + } +} + +//! Gets a string attribute. +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setStringAttribute() +//! or 0 if attribute is not set. +core::stringc CAttributes::getAttributeAsString(const c8* attributeName) +{ + core::stringc str; + + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getString(); + else + return str; +} + +//! Gets a string attribute. +//! \param attributeName: Name of the attribute to get. +//! \param target: Buffer where the string is copied to. +void CAttributes::getAttributeAsString(const c8* attributeName, char* target) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + { + core::stringc str = att->getString(); + strcpy(target,str.c_str()); + } + else + target[0] = 0; +} + +//! Returns string attribute value by index. +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +core::stringc CAttributes::getAttributeAsString(s32 index) +{ + core::stringc str; + + if ((u32)index < Attributes.size()) + return Attributes[index]->getString(); + + return str; +} + + +//! Sets a string attribute. +//! \param attributeName: Name for the attribute +//! \param value: Value for the attribute. Set this to 0 to delete the attribute +void CAttributes::setAttribute(const c8* attributeName, const wchar_t* value) +{ + for (u32 i=0; i<Attributes.size(); ++i) + { + if (Attributes[i]->Name == attributeName) + { + if (!value) + { + Attributes[i]->drop(); + Attributes.erase(i); + } + else + Attributes[i]->setString(value); + + return; + } + } + + if (value) + { + Attributes.push_back(new CStringAttribute(attributeName, value)); + } +} + +//! Gets a string attribute. +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setStringAttribute() +//! or 0 if attribute is not set. +core::stringw CAttributes::getAttributeAsStringW(const c8* attributeName) +{ + core::stringw str; + + IAttribute* att = getAttributeP(attributeName); + if (att) + str = att->getStringW(); + + return str; +} + +//! Gets a string attribute. +//! \param attributeName: Name of the attribute to get. +//! \param target: Buffer where the string is copied to. +void CAttributes::getAttributeAsStringW(const c8* attributeName, wchar_t* target) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + { + core::stringw str = att->getStringW(); + wcscpy(target,str.c_str()); + } + else + target[0] = 0; +} + +//! Returns string attribute value by index. +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +core::stringw CAttributes::getAttributeAsStringW(s32 index) +{ + + if ((u32)index < Attributes.size()) + return Attributes[index]->getStringW(); + else + return core::stringw(); +} + + +//! Adds an attribute as an array of wide strings +void CAttributes::addArray(const c8* attributeName, const core::array<core::stringw>& value) +{ + Attributes.push_back(new CStringWArrayAttribute(attributeName, value)); +} + +//! Sets an attribute value as an array of wide strings. +void CAttributes::setAttribute(const c8* attributeName, const core::array<core::stringw>& value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setArray(value); + else + { + Attributes.push_back(new CStringWArrayAttribute(attributeName, value)); + } +} + +//! Gets an attribute as an array of wide strings. +core::array<core::stringw> CAttributes::getAttributeAsArray(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getArray(); + else + return core::array<core::stringw>(); +} + +//! Returns attribute value as an array of wide strings by index. +core::array<core::stringw> CAttributes::getAttributeAsArray(s32 index) +{ + core::array<core::stringw> ret; + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getArray(); + + return ret; +} + +//! Sets an attribute as an array of wide strings +void CAttributes::setAttribute(s32 index, const core::array<core::stringw>& value) +{ + if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setArray(value); +} + + + + +//! Returns attribute index from name, -1 if not found +s32 CAttributes::findAttribute(const c8* attributeName) const +{ + for (u32 i=0; i<Attributes.size(); ++i) + if (Attributes[i]->Name == attributeName) + return i; + + return -1; +} + + +IAttribute* CAttributes::getAttributeP(const c8* attributeName) const +{ + for (u32 i=0; i<Attributes.size(); ++i) + if (Attributes[i]->Name == attributeName) + return Attributes[i]; + + return 0; +} + + +//! Sets a attribute as boolean value +void CAttributes::setAttribute(const c8* attributeName, bool value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setBool(value); + else + { + Attributes.push_back(new CBoolAttribute(attributeName, value)); + } +} + +//! Gets a attribute as boolean value +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() as bool +//! or 0 if attribute is not set. +bool CAttributes::getAttributeAsBool(const c8* attributeName) +{ + bool ret = false; + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getBool(); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + +//! Sets a attribute as integer value +void CAttributes::setAttribute(const c8* attributeName, s32 value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setInt(value); + else + { + Attributes.push_back(new CIntAttribute(attributeName, value)); + } +} + +//! Gets a attribute as integer value +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() as integer +//! or 0 if attribute is not set. +s32 CAttributes::getAttributeAsInt(const c8* attributeName) const +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getInt(); + else + return 0; +} + +//! Sets a attribute as float value +void CAttributes::setAttribute(const c8* attributeName, f32 value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setFloat(value); + else + Attributes.push_back(new CFloatAttribute(attributeName, value)); +} + +//! Gets a attribute as integer value +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() as float value +//! or 0 if attribute is not set. +f32 CAttributes::getAttributeAsFloat(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getFloat(); + + return 0.f; +} + +//! Sets a attribute as color +void CAttributes::setAttribute(const c8* attributeName, video::SColor value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setColor(value); + else + Attributes.push_back(new CColorAttribute(attributeName, value)); +} + +//! Gets an attribute as color +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +video::SColor CAttributes::getAttributeAsColor(const c8* attributeName) +{ + video::SColor ret(0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getColor(); + + return ret; +} + +//! Sets a attribute as floating point color +void CAttributes::setAttribute(const c8* attributeName, video::SColorf value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setColor(value); + else + Attributes.push_back(new CColorfAttribute(attributeName, value)); +} + +//! Gets an attribute as floating point color +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +video::SColorf CAttributes::getAttributeAsColorf(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getColorf(); + else + return video::SColorf(); +} + +//! Sets a attribute as 2d position +void CAttributes::setAttribute(const c8* attributeName, core::position2di value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setPosition(value); + else + Attributes.push_back(new CPosition2DAttribute(attributeName, value)); +} + +//! Gets an attribute as 2d position +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +core::position2di CAttributes::getAttributeAsPosition2d(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getPosition(); + else + return core::position2di(); +} + +//! Sets a attribute as rectangle +void CAttributes::setAttribute(const c8* attributeName, core::rect<s32> value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setRect(value); + else + Attributes.push_back(new CRectAttribute(attributeName, value)); +} + +//! Gets an attribute as rectangle +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +core::rect<s32> CAttributes::getAttributeAsRect(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getRect(); + else + return core::rect<s32>(); +} + +//! Sets a attribute as dimension2d +void CAttributes::setAttribute(const c8* attributeName, core::dimension2d<u32> value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setDimension2d(value); + else + Attributes.push_back(new CDimension2dAttribute(attributeName, value)); +} + +//! Gets an attribute as dimension2d +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getDimension2d(); + else + return core::dimension2d<u32>(); +} + +//! Sets a attribute as vector +void CAttributes::setAttribute(const c8* attributeName, core::vector3df value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setVector(value); + else + Attributes.push_back(new CVector3DAttribute(attributeName, value)); +} + +//! Sets a attribute as vector +void CAttributes::setAttribute(const c8* attributeName, core::vector2df value) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setVector2d(value); + else + Attributes.push_back(new CVector2DAttribute(attributeName, value)); +} + +//! Gets an attribute as vector +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +core::vector3df CAttributes::getAttributeAsVector3d(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getVector(); + else + return core::vector3df(); +} + +//! Gets an attribute as vector +core::vector2df CAttributes::getAttributeAsVector2d(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getVector2d(); + else + return core::vector2df(); +} + +//! Sets an attribute as binary data +void CAttributes::setAttribute(const c8* attributeName, void* data, s32 dataSizeInBytes ) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setBinary(data, dataSizeInBytes); + else + Attributes.push_back(new CBinaryAttribute(attributeName, data, dataSizeInBytes)); +} + +//! Gets an attribute as binary data +//! \param attributeName: Name of the attribute to get. +void CAttributes::getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->getBinary(outData, maxSizeInBytes); +} + +//! Sets an attribute as enumeration +void CAttributes::setAttribute(const c8* attributeName, const char* enumValue, const char* const* enumerationLiterals) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setEnum(enumValue, enumerationLiterals); + else + Attributes.push_back(new CEnumAttribute(attributeName, enumValue, enumerationLiterals)); +} + +//! Gets an attribute as enumeration +//! \param attributeName: Name of the attribute to get. +//! \return Returns value of the attribute previously set by setAttribute() +const char* CAttributes::getAttributeAsEnumeration(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getEnum(); + else + return 0; +} + +//! Gets an attribute as enumeration +s32 CAttributes::getAttributeAsEnumeration(const c8* attributeName, const char* const* enumerationLiteralsToUse) +{ + IAttribute* att = getAttributeP(attributeName); + + if (enumerationLiteralsToUse && att) + { + const char* value = att->getEnum(); + if (value) + { + for (s32 i=0; enumerationLiteralsToUse[i]; ++i) + if (!strcmp(value, enumerationLiteralsToUse[i])) + return i; + } + } + + return -1; +} + +//! Gets the list of enumeration literals of an enumeration attribute +//! \param attributeName: Name of the attribute to get. +void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) +{ + IAttribute* att = getAttributeP(attributeName); + + if (att && att->getType() == EAT_ENUM) + outLiterals = ((CEnumAttribute*)att)->EnumLiterals; +} + +//! Sets an attribute as texture reference +void CAttributes::setAttribute(const c8* attributeName, video::ITexture* value, const io::path& filename) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setTexture(value, filename); + else + Attributes.push_back(new CTextureAttribute(attributeName, value, Driver, filename)); +} + + +//! Gets an attribute as texture reference +//! \param attributeName: Name of the attribute to get. +video::ITexture* CAttributes::getAttributeAsTexture(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getTexture(); + else + return 0; +} + +//! Gets an attribute as texture reference +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +video::ITexture* CAttributes::getAttributeAsTexture(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getTexture(); + else + return 0; +} + + +//! Returns amount of string attributes set in this scene manager. +u32 CAttributes::getAttributeCount() const +{ + return Attributes.size(); +} + +//! Returns string attribute name by index. +//! \param index: Index value, must be between 0 and getStringAttributeCount()-1. +const c8* CAttributes::getAttributeName(s32 index) +{ + if ((u32)index >= Attributes.size()) + return 0; + + return Attributes[index]->Name.c_str(); +} + +//! Returns the type of an attribute +E_ATTRIBUTE_TYPE CAttributes::getAttributeType(const c8* attributeName) +{ + E_ATTRIBUTE_TYPE ret = EAT_UNKNOWN; + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getType(); + + return ret; +} + +//! Returns attribute type by index. +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index) +{ + if ((u32)index >= Attributes.size()) + return EAT_UNKNOWN; + + return Attributes[index]->getType(); +} + +//! Returns the type of an attribute +const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getTypeString(); + else + return L"unknown"; +} + +//! Returns attribute type string by index. +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +const wchar_t* CAttributes::getAttributeTypeString(s32 index) +{ + if ((u32)index >= Attributes.size()) + return L"unknown"; + + return Attributes[index]->getTypeString(); +} + +//! Gets an attribute as boolean value +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +bool CAttributes::getAttributeAsBool(s32 index) +{ + bool ret = false; + + if ((u32)index < Attributes.size()) + ret = Attributes[index]->getBool(); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + +//! Gets an attribute as integer value +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +s32 CAttributes::getAttributeAsInt(s32 index) const +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getInt(); + else + return 0; +} + +//! Gets an attribute as float value +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +f32 CAttributes::getAttributeAsFloat(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getFloat(); + else + return 0.f; +} + +//! Gets an attribute as color +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +video::SColor CAttributes::getAttributeAsColor(s32 index) +{ + video::SColor ret(0); + + if ((u32)index < Attributes.size()) + ret = Attributes[index]->getColor(); + + return ret; +} + +//! Gets an attribute as floating point color +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +video::SColorf CAttributes::getAttributeAsColorf(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getColorf(); + + return video::SColorf(); +} + +//! Gets an attribute as 3d vector +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +core::vector3df CAttributes::getAttributeAsVector3d(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getVector(); + else + return core::vector3df(); +} + +//! Gets an attribute as 2d vector +core::vector2df CAttributes::getAttributeAsVector2d(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getVector2d(); + else + return core::vector2df(); +} + +//! Gets an attribute as position2d +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +core::position2di CAttributes::getAttributeAsPosition2d(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getPosition(); + else + return core::position2di(); +} + +//! Gets an attribute as rectangle +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +core::rect<s32> CAttributes::getAttributeAsRect(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getRect(); + else + return core::rect<s32>(); +} + +//! Gets an attribute as dimension2d +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getDimension2d(); + else + return core::dimension2d<u32>(); +} + + +//! Gets an attribute as binary data +///! \param index: Index value, must be between 0 and getAttributeCount()-1. +void CAttributes::getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->getBinary(outData, maxSizeInBytes); +} + + +//! Gets an attribute as enumeration +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +const char* CAttributes::getAttributeAsEnumeration(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getEnum(); + else + return 0; +} + + +//! Gets an attribute as enumeration +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +s32 CAttributes::getAttributeAsEnumeration(s32 index, const char* const* enumerationLiteralsToUse) +{ + if ((u32)index < Attributes.size()) + { + IAttribute* att = Attributes[index]; + + if (enumerationLiteralsToUse && att) + { + const char* value = att->getEnum(); + if (value) + { + for (s32 i=0; enumerationLiteralsToUse[i]; ++i) + if (!strcmp(value, enumerationLiteralsToUse[i])) + return i; + } + } + } + + return -1; +} + +//! Gets the list of enumeration literals of an enumeration attribute +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) +{ + if ((u32)index < Attributes.size() && + Attributes[index]->getType() == EAT_ENUM) + outLiterals = ((CEnumAttribute*)Attributes[index])->EnumLiterals; +} + + +//! Adds an attribute as integer +void CAttributes::addInt(const c8* attributeName, s32 value) +{ + Attributes.push_back(new CIntAttribute(attributeName, value)); +} + +//! Adds an attribute as float +void CAttributes::addFloat(const c8* attributeName, f32 value) +{ + Attributes.push_back(new CFloatAttribute(attributeName, value)); +} + +//! Adds an attribute as string +void CAttributes::addString(const c8* attributeName, const char* value) +{ + Attributes.push_back(new CStringAttribute(attributeName, value)); +} + +//! Adds an attribute as wchar string +void CAttributes::addString(const c8* attributeName, const wchar_t* value) +{ + Attributes.push_back(new CStringAttribute(attributeName, value)); +} + +//! Adds an attribute as bool +void CAttributes::addBool(const c8* attributeName, bool value) +{ + Attributes.push_back(new CBoolAttribute(attributeName, value)); +} + +//! Adds an attribute as enum +void CAttributes::addEnum(const c8* attributeName, const char* enumValue, const char* const* enumerationLiterals) +{ + Attributes.push_back(new CEnumAttribute(attributeName, enumValue, enumerationLiterals)); +} + +//! Adds an attribute as enum +void CAttributes::addEnum(const c8* attributeName, s32 enumValue, const char* const* enumerationLiterals) +{ + addEnum(attributeName, "", enumerationLiterals); + Attributes.getLast()->setInt(enumValue); +} + +//! Adds an attribute as color +void CAttributes::addColor(const c8* attributeName, video::SColor value) +{ + Attributes.push_back(new CColorAttribute(attributeName, value)); +} + +//! Adds an attribute as floating point color +void CAttributes::addColorf(const c8* attributeName, video::SColorf value) +{ + Attributes.push_back(new CColorfAttribute(attributeName, value)); +} + +//! Adds an attribute as 3d vector +void CAttributes::addVector3d(const c8* attributeName, core::vector3df value) +{ + Attributes.push_back(new CVector3DAttribute(attributeName, value)); +} + +//! Adds an attribute as 2d vector +void CAttributes::addVector2d(const c8* attributeName, core::vector2df value) +{ + Attributes.push_back(new CVector2DAttribute(attributeName, value)); +} + + +//! Adds an attribute as 2d position +void CAttributes::addPosition2d(const c8* attributeName, core::position2di value) +{ + Attributes.push_back(new CPosition2DAttribute(attributeName, value)); +} + +//! Adds an attribute as rectangle +void CAttributes::addRect(const c8* attributeName, core::rect<s32> value) +{ + Attributes.push_back(new CRectAttribute(attributeName, value)); +} + +//! Adds an attribute as dimension2d +void CAttributes::addDimension2d(const c8* attributeName, core::dimension2d<u32> value) +{ + Attributes.push_back(new CDimension2dAttribute(attributeName, value)); +} + +//! Adds an attribute as binary data +void CAttributes::addBinary(const c8* attributeName, void* data, s32 dataSizeInBytes) +{ + Attributes.push_back(new CBinaryAttribute(attributeName, data, dataSizeInBytes)); +} + +//! Adds an attribute as texture reference +void CAttributes::addTexture(const c8* attributeName, video::ITexture* texture, const io::path& filename) +{ + Attributes.push_back(new CTextureAttribute(attributeName, texture, Driver, filename)); +} + +//! Returns if an attribute with a name exists +bool CAttributes::existsAttribute(const c8* attributeName) +{ + return getAttributeP(attributeName) != 0; +} + +//! Sets an attribute value as string. +//! \param attributeName: Name for the attribute +void CAttributes::setAttribute(s32 index, const c8* value) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setString(value); +} + +//! Sets an attribute value as string. +//! \param attributeName: Name for the attribute +void CAttributes::setAttribute(s32 index, const wchar_t* value) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setString(value); +} + +//! Sets an attribute as boolean value +void CAttributes::setAttribute(s32 index, bool value) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setBool(value); +} + +//! Sets an attribute as integer value +void CAttributes::setAttribute(s32 index, s32 value) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setInt(value); +} + +//! Sets a attribute as float value +void CAttributes::setAttribute(s32 index, f32 value) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setFloat(value); +} + +//! Sets a attribute as color +void CAttributes::setAttribute(s32 index, video::SColor color) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setColor(color); +} + +//! Sets a attribute as floating point color +void CAttributes::setAttribute(s32 index, video::SColorf color) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setColor(color); +} + +//! Sets a attribute as vector +void CAttributes::setAttribute(s32 index, core::vector3df v) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setVector(v); +} + +//! Sets a attribute as vector +void CAttributes::setAttribute(s32 index, core::vector2df v) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setVector2d(v); +} + +//! Sets a attribute as position +void CAttributes::setAttribute(s32 index, core::position2di v) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setPosition(v); +} + +//! Sets a attribute as rectangle +void CAttributes::setAttribute(s32 index, core::rect<s32> v) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setRect(v); +} + +//! Sets a attribute as dimension2d +void CAttributes::setAttribute(s32 index, core::dimension2d<u32> v) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setDimension2d(v); +} + +//! Sets an attribute as binary data +void CAttributes::setAttribute(s32 index, void* data, s32 dataSizeInBytes ) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setBinary(data, dataSizeInBytes); +} + + +//! Sets an attribute as enumeration +void CAttributes::setAttribute(s32 index, const char* enumValue, const char* const* enumerationLiterals) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setEnum(enumValue, enumerationLiterals); +} + + +//! Sets an attribute as texture reference +void CAttributes::setAttribute(s32 index, video::ITexture* texture, const io::path& filename) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setTexture(texture, filename); +} + + +//! Adds an attribute as matrix +void CAttributes::addMatrix(const c8* attributeName, const core::matrix4& v) +{ + Attributes.push_back(new CMatrixAttribute(attributeName, v)); +} + + +//! Sets an attribute as matrix +void CAttributes::setAttribute(const c8* attributeName, const core::matrix4& v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setMatrix(v); + else + Attributes.push_back(new CMatrixAttribute(attributeName, v)); +} + +//! Gets an attribute as a matrix4 +core::matrix4 CAttributes::getAttributeAsMatrix(const c8* attributeName) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + return att->getMatrix(); + else + return core::matrix4(); + +} + +//! Gets an attribute as matrix +core::matrix4 CAttributes::getAttributeAsMatrix(s32 index) +{ + if ((u32)index < Attributes.size()) + return Attributes[index]->getMatrix(); + else + return core::matrix4(); +} + +//! Sets an attribute as matrix +void CAttributes::setAttribute(s32 index, const core::matrix4& v) +{ + if ((u32)index < Attributes.size()) + Attributes[index]->setMatrix(v); +} + + +//! Adds an attribute as quaternion +void CAttributes::addQuaternion(const c8* attributeName, core::quaternion v) +{ + Attributes.push_back(new CQuaternionAttribute(attributeName, v)); +} + + +//! Sets an attribute as quaternion +void CAttributes::setAttribute(const c8* attributeName, core::quaternion v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setQuaternion(v); + else + { + Attributes.push_back(new CQuaternionAttribute(attributeName, v)); + } +} + +//! Gets an attribute as a quaternion +core::quaternion CAttributes::getAttributeAsQuaternion(const c8* attributeName) +{ + core::quaternion ret(0,1,0, 0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getQuaternion(); + + return ret; +} + +//! Gets an attribute as quaternion +core::quaternion CAttributes::getAttributeAsQuaternion(s32 index) +{ + core::quaternion ret(0,1,0, 0); + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getQuaternion(); + + return ret; +} + +//! Sets an attribute as quaternion +void CAttributes::setAttribute(s32 index, core::quaternion v) +{ +if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setQuaternion(v); +} + +//! Adds an attribute as axis aligned bounding box +void CAttributes::addBox3d(const c8* attributeName, core::aabbox3df v) +{ + Attributes.push_back(new CBBoxAttribute(attributeName, v)); +} + +//! Sets an attribute as axis aligned bounding box +void CAttributes::setAttribute(const c8* attributeName, core::aabbox3df v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setBBox(v); + else + { + Attributes.push_back(new CBBoxAttribute(attributeName, v)); + } +} + +//! Gets an attribute as a axis aligned bounding box +core::aabbox3df CAttributes::getAttributeAsBox3d(const c8* attributeName) +{ + core::aabbox3df ret(0,0,0, 0,0,0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getBBox(); + + return ret; +} + +//! Gets an attribute as axis aligned bounding box +core::aabbox3df CAttributes::getAttributeAsBox3d(s32 index) +{ + core::aabbox3df ret(0,0,0, 0,0,0); + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getBBox(); + + return ret; +} + +//! Sets an attribute as axis aligned bounding box +void CAttributes::setAttribute(s32 index, core::aabbox3df v) +{ +if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setBBox(v); +} + +//! Adds an attribute as 3d plane +void CAttributes::addPlane3d(const c8* attributeName, core::plane3df v) +{ + Attributes.push_back(new CPlaneAttribute(attributeName, v)); +} + +//! Sets an attribute as 3d plane +void CAttributes::setAttribute(const c8* attributeName, core::plane3df v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setPlane(v); + else + { + Attributes.push_back(new CPlaneAttribute(attributeName, v)); + } +} + +//! Gets an attribute as a 3d plane +core::plane3df CAttributes::getAttributeAsPlane3d(const c8* attributeName) +{ + core::plane3df ret(0,0,0, 0,1,0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getPlane(); + + return ret; +} + +//! Gets an attribute as 3d plane +core::plane3df CAttributes::getAttributeAsPlane3d(s32 index) +{ + core::plane3df ret(0,0,0, 0,1,0); + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getPlane(); + + return ret; +} + +//! Sets an attribute as 3d plane +void CAttributes::setAttribute(s32 index, core::plane3df v) +{ + if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setPlane(v); +} + +//! Adds an attribute as 3d triangle +void CAttributes::addTriangle3d(const c8* attributeName, core::triangle3df v) +{ + Attributes.push_back(new CTriangleAttribute(attributeName, v)); +} + +//! Sets an attribute as 3d triangle +void CAttributes::setAttribute(const c8* attributeName, core::triangle3df v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setTriangle(v); + else + { + Attributes.push_back(new CTriangleAttribute(attributeName, v)); + } +} + +//! Gets an attribute as a 3d triangle +core::triangle3df CAttributes::getAttributeAsTriangle3d(const c8* attributeName) +{ + core::triangle3df ret; + ret.pointA = ret.pointB = ret.pointC = core::vector3df(0,0,0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getTriangle(); + + return ret; +} + +//! Gets an attribute as 3d triangle +core::triangle3df CAttributes::getAttributeAsTriangle3d(s32 index) +{ + core::triangle3df ret; + ret.pointA = ret.pointB = ret.pointC = core::vector3df(0,0,0); + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getTriangle(); + + return ret; +} + +//! Sets an attribute as 3d triangle +void CAttributes::setAttribute(s32 index, core::triangle3df v) +{ + if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setTriangle(v); +} + +//! Adds an attribute as a 2d line +void CAttributes::addLine2d(const c8* attributeName, core::line2df v) +{ + Attributes.push_back(new CLine2dAttribute(attributeName, v)); +} + +//! Sets an attribute as a 2d line +void CAttributes::setAttribute(const c8* attributeName, core::line2df v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setLine2d(v); + else + { + Attributes.push_back(new CLine2dAttribute(attributeName, v)); + } +} + +//! Gets an attribute as a 2d line +core::line2df CAttributes::getAttributeAsLine2d(const c8* attributeName) +{ + core::line2df ret(0,0, 0,0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getLine2d(); + + return ret; +} + +//! Gets an attribute as a 2d line +core::line2df CAttributes::getAttributeAsLine2d(s32 index) +{ + core::line2df ret(0,0, 0,0); + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getLine2d(); + + return ret; +} + +//! Sets an attribute as a 2d line +void CAttributes::setAttribute(s32 index, core::line2df v) +{ + if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setLine2d(v); +} + +//! Adds an attribute as a 3d line +void CAttributes::addLine3d(const c8* attributeName, core::line3df v) +{ + Attributes.push_back(new CLine3dAttribute(attributeName, v)); +} + +//! Sets an attribute as a 3d line +void CAttributes::setAttribute(const c8* attributeName, core::line3df v) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setLine3d(v); + else + { + Attributes.push_back(new CLine3dAttribute(attributeName, v)); + } +} + +//! Gets an attribute as a 3d line +core::line3df CAttributes::getAttributeAsLine3d(const c8* attributeName) +{ + core::line3df ret(0,0,0, 0,0,0); + + IAttribute* att = getAttributeP(attributeName); + if (att) + ret = att->getLine3d(); + + return ret; +} + +//! Gets an attribute as a 3d line +core::line3df CAttributes::getAttributeAsLine3d(s32 index) +{ + core::line3df ret(0,0,0, 0,0,0); + + if (index >= 0 && index < (s32)Attributes.size()) + ret = Attributes[index]->getLine3d(); + + return ret; +} + +//! Sets an attribute as a 3d line +void CAttributes::setAttribute(s32 index, core::line3df v) +{ + if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setLine3d(v); + +} + + +//! Adds an attribute as user pointner +void CAttributes::addUserPointer(const c8* attributeName, void* userPointer) +{ + Attributes.push_back(new CUserPointerAttribute(attributeName, userPointer)); +} + +//! Sets an attribute as user pointer +void CAttributes::setAttribute(const c8* attributeName, void* userPointer) +{ + IAttribute* att = getAttributeP(attributeName); + if (att) + att->setUserPointer(userPointer); + else + { + Attributes.push_back(new CUserPointerAttribute(attributeName, userPointer)); + } +} + +//! Gets an attribute as user pointer +//! \param attributeName: Name of the attribute to get. +void* CAttributes::getAttributeAsUserPointer(const c8* attributeName) +{ + void* value = 0; + + IAttribute* att = getAttributeP(attributeName); + if (att) + value = att->getUserPointer(); + + return value; +} + +//! Gets an attribute as user pointer +//! \param index: Index value, must be between 0 and getAttributeCount()-1. +void* CAttributes::getAttributeAsUserPointer(s32 index) +{ + void* value = 0; + + if (index >= 0 && index < (s32)Attributes.size()) + value = Attributes[index]->getUserPointer(); + + return value; +} + +//! Sets an attribute as user pointer +void CAttributes::setAttribute(s32 index, void* userPointer) +{ + if (index >= 0 && index < (s32)Attributes.size() ) + Attributes[index]->setUserPointer(userPointer); +} + + +//! Reads attributes from a xml file. +//! \param readCurrentElementOnly: If set to true, reading only works if current element has the name 'attributes'. +//! IF set to false, the first appearing list attributes are read. +bool CAttributes::read(io::IXMLReader* reader, bool readCurrentElementOnly, + const wchar_t* nonDefaultElementName) +{ + if (!reader) + return false; + + clear(); + + core::stringw elementName = L"attributes"; + if (nonDefaultElementName) + elementName = nonDefaultElementName; + + if (readCurrentElementOnly) + { + if (elementName != reader->getNodeName()) + return false; + } + + while(reader->read()) + { + switch(reader->getNodeType()) + { + case io::EXN_ELEMENT: + readAttributeFromXML(reader); + break; + case io::EXN_ELEMENT_END: + if (elementName == reader->getNodeName()) + return true; + break; + default: + break; + } + } + + return true; +} + + +void CAttributes::readAttributeFromXML(io::IXMLReader* reader) +{ + core::stringw element = reader->getNodeName(); + core::stringc name = reader->getAttributeValue(L"name"); + + if (element == L"enum") + { + addEnum(name.c_str(), 0, 0); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"binary") + { + addBinary(name.c_str(), 0, 0); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"color") + { + addColor(name.c_str(), video::SColor()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"colorf") + { + addColorf(name.c_str(), video::SColorf()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"float") + { + addFloat(name.c_str(), 0); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"int") + { + addInt(name.c_str(), 0); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"bool") + { + addBool(name.c_str(), 0); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"string") + { + addString(name.c_str(), L""); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"texture") + { + addTexture(name.c_str(), 0); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"vector3d") + { + addVector3d(name.c_str(), core::vector3df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"vector2d") + { + addVector2d(name.c_str(), core::vector2df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"position") + { + addPosition2d(name.c_str(), core::position2di()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"rect") + { + addRect(name.c_str(), core::rect<s32>()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"matrix") + { + addMatrix(name.c_str(), core::matrix4()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"quaternion") + { + addQuaternion(name.c_str(), core::quaternion()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"box3d") + { + addBox3d(name.c_str(), core::aabbox3df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"plane") + { + addPlane3d(name.c_str(), core::plane3df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"triangle") + { + addTriangle3d(name.c_str(), core::triangle3df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"line2d") + { + addLine2d(name.c_str(), core::line2df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"line3d") + { + addLine3d(name.c_str(), core::line3df()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } + else + if (element == L"stringwarray") + { + core::array<core::stringw> tmpArray; + + s32 count = reader->getAttributeValueAsInt(L"count"); + s32 n=0; + const core::stringw tmpName(L"value"); + for (; n<count; ++n) + { + tmpArray.push_back(reader->getAttributeValue((tmpName+core::stringw(n)).c_str())); + } + addArray(name.c_str(),tmpArray); + } + else + if (element == L"userPointer") + { + // It's debatable if a pointer should be set or not, but it's more likely that adding it now would wreck user-applications. + // Also it probably doesn't makes sense setting this to a value when it comes from file. + } + else + if (element == L"dimension2d") + { + addDimension2d(name.c_str(), core::dimension2d<u32>()); + Attributes.getLast()->setString(reader->getAttributeValue(L"value")); + } +} + +//! Write these attributes into a xml file +bool CAttributes::write(io::IXMLWriter* writer, bool writeXMLHeader, + const wchar_t* nonDefaultElementName) +{ + if (!writer) + return false; + + if (writeXMLHeader) + writer->writeXMLHeader(); + + core::stringw elementName = L"attributes"; + if (nonDefaultElementName) + elementName = nonDefaultElementName; + + writer->writeElement(elementName.c_str(), false); + writer->writeLineBreak(); + + s32 i=0; + for (; i<(s32)Attributes.size(); ++i) + { + if ( Attributes[i]->getType() == EAT_STRINGWARRAY ) + { + core::array<core::stringw> arraynames, arrayvalues; + core::array<core::stringw> arrayinput = Attributes[i]->getArray(); + + // build arrays + + // name + arraynames.push_back(core::stringw(L"name")); + arrayvalues.push_back(core::stringw(Attributes[i]->Name.c_str()) ); + + // count + arraynames.push_back(core::stringw(L"count")); + arrayvalues.push_back(core::stringw((s32)arrayinput.size())); + + // array... + u32 n=0; + const core::stringw tmpName(L"value"); + for (; n < arrayinput.size(); ++n) + { + arraynames.push_back((tmpName+core::stringw(n)).c_str()); + arrayvalues.push_back(arrayinput[n]); + } + + // write them + writer->writeElement( Attributes[i]->getTypeString(), true, arraynames, arrayvalues); + } + else + { + writer->writeElement( + Attributes[i]->getTypeString(), true, + L"name", core::stringw(Attributes[i]->Name.c_str()).c_str(), + L"value", Attributes[i]->getStringW().c_str() ); + } + + writer->writeLineBreak(); + } + + writer->writeClosingTag(elementName.c_str()); + writer->writeLineBreak(); + + return true; +} + + +} // end namespace io +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.h new file mode 100644 index 0000000..1675a3a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CAttributes.h @@ -0,0 +1,712 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ATTRIBUTES_H_INCLUDED__ +#define __C_ATTRIBUTES_H_INCLUDED__ + +#include "IAttributes.h" +#include "IAttribute.h" + +namespace irr +{ +namespace video +{ + class ITexture; + class IVideoDriver; +} +namespace io +{ + + +//! Implementation of the IAttributes interface +class CAttributes : public IAttributes +{ +public: + + CAttributes(video::IVideoDriver* driver=0); + ~CAttributes(); + + //! Returns amount of attributes in this collection of attributes. + virtual u32 getAttributeCount() const; + + //! Returns attribute name by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual const c8* getAttributeName(s32 index); + + //! Returns the type of an attribute + //! \param attributeName: Name for the attribute + virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName); + + //! Returns attribute type by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index); + + //! Returns the type string of the attribute + //! \param attributeName: String for the attribute type + virtual const wchar_t* getAttributeTypeString(const c8* attributeName); + + //! Returns the type string of the attribute by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual const wchar_t* getAttributeTypeString(s32 index); + + //! Returns if an attribute with a name exists + virtual bool existsAttribute(const c8* attributeName); + + //! Returns attribute index from name, -1 if not found + virtual s32 findAttribute(const c8* attributeName) const; + + //! Removes all attributes + virtual void clear(); + + //! Reads attributes from a xml file. + //! \param readCurrentElementOnly: If set to true, reading only works if current element has the name 'attributes'. + //! IF set to false, the first appearing list attributes are read. + virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false, + const wchar_t* nonDefaultElementName = 0); + + //! Write these attributes into a xml file + virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* nonDefaultElementName=0); + + + /* + + Integer Attribute + + */ + + //! Adds an attribute as integer + virtual void addInt(const c8* attributeName, s32 value); + + //! Sets an attribute as integer value + virtual void setAttribute(const c8* attributeName, s32 value); + + //! Gets an attribute as integer value + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual s32 getAttributeAsInt(const c8* attributeName) const; + + //! Gets an attribute as integer value + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual s32 getAttributeAsInt(s32 index) const; + + //! Sets an attribute as integer value + virtual void setAttribute(s32 index, s32 value); + + /* + + Float Attribute + + */ + + //! Adds an attribute as float + virtual void addFloat(const c8* attributeName, f32 value); + + //! Sets a attribute as float value + virtual void setAttribute(const c8* attributeName, f32 value); + + //! Gets an attribute as float value + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual f32 getAttributeAsFloat(const c8* attributeName); + + //! Gets an attribute as float value + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual f32 getAttributeAsFloat(s32 index); + + //! Sets an attribute as float value + virtual void setAttribute(s32 index, f32 value); + + /* + + String Attribute + + */ + + //! Adds an attribute as string + virtual void addString(const c8* attributeName, const c8* value); + + //! Sets an attribute value as string. + //! \param attributeName: Name for the attribute + //! \param value: Value for the attribute. Set this to 0 to delete the attribute + virtual void setAttribute(const c8* attributeName, const c8* value); + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + //! or 0 if attribute is not set. + virtual core::stringc getAttributeAsString(const c8* attributeName); + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \param target: Buffer where the string is copied to. + virtual void getAttributeAsString(const c8* attributeName, c8* target); + + //! Returns attribute value as string by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::stringc getAttributeAsString(s32 index); + + //! Sets an attribute value as string. + //! \param attributeName: Name for the attribute + virtual void setAttribute(s32 index, const c8* value); + + // wide strings + + //! Adds an attribute as string + virtual void addString(const c8* attributeName, const wchar_t* value); + + //! Sets an attribute value as string. + //! \param attributeName: Name for the attribute + //! \param value: Value for the attribute. Set this to 0 to delete the attribute + virtual void setAttribute(const c8* attributeName, const wchar_t* value); + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + //! or 0 if attribute is not set. + virtual core::stringw getAttributeAsStringW(const c8* attributeName); + + //! Gets an attribute as string. + //! \param attributeName: Name of the attribute to get. + //! \param target: Buffer where the string is copied to. + virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target); + + //! Returns attribute value as string by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::stringw getAttributeAsStringW(s32 index); + + //! Sets an attribute value as string. + //! \param attributeName: Name for the attribute + virtual void setAttribute(s32 index, const wchar_t* value); + + /* + + Binary Data Attribute + + */ + + //! Adds an attribute as binary data + virtual void addBinary(const c8* attributeName, void* data, s32 dataSizeInBytes); + + //! Sets an attribute as binary data + virtual void setAttribute(const c8* attributeName, void* data, s32 dataSizeInBytes); + + //! Gets an attribute as binary data + //! \param attributeName: Name of the attribute to get. + virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes); + + //! Gets an attribute as binary data + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes); + + //! Sets an attribute as binary data + virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes); + + + /* + + Array Attribute + + */ + + //! Adds an attribute as wide string array + virtual void addArray(const c8* attributeName, const core::array<core::stringw>& value); + + //! Sets an attribute value as a wide string array. + //! \param attributeName: Name for the attribute + //! \param value: Value for the attribute. Set this to 0 to delete the attribute + virtual void setAttribute(const c8* attributeName, const core::array<core::stringw>& value); + + //! Gets an attribute as an array of wide strings. + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + //! or 0 if attribute is not set. + virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName); + + //! Returns attribute value as an array of wide strings by index. + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::array<core::stringw> getAttributeAsArray(s32 index); + + //! Sets an attribute as an array of wide strings + virtual void setAttribute(s32 index, const core::array<core::stringw>& value); + + /* + + Bool Attribute + + */ + + //! Adds an attribute as bool + virtual void addBool(const c8* attributeName, bool value); + + //! Sets an attribute as boolean value + virtual void setAttribute(const c8* attributeName, bool value); + + //! Gets an attribute as boolean value + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual bool getAttributeAsBool(const c8* attributeName); + + //! Gets an attribute as boolean value + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual bool getAttributeAsBool(s32 index); + + //! Sets an attribute as boolean value + virtual void setAttribute(s32 index, bool value); + + /* + + Enumeration Attribute + + */ + + //! Adds an attribute as enum + virtual void addEnum(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals); + + //! Adds an attribute as enum + virtual void addEnum(const c8* attributeName, s32 enumValue, const c8* const* enumerationLiterals); + + //! Sets an attribute as enumeration + virtual void setAttribute(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals); + + //! Gets an attribute as enumeration + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual const c8* getAttributeAsEnumeration(const c8* attributeName); + + //! Gets an attribute as enumeration + //! \param attributeName: Name of the attribute to get. + //! \param enumerationLiteralsToUse: Use these enumeration literals to get the index value instead of the set ones. + //! This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but + //! no information about its index. + //! \return Returns value of the attribute previously set by setAttribute() + virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse); + + //! Gets an attribute as enumeration + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse); + + //! Gets an attribute as enumeration + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual const c8* getAttributeAsEnumeration(s32 index); + + //! Gets the list of enumeration literals of an enumeration attribute + //! \param attributeName: Name of the attribute to get. + virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals); + + //! Gets the list of enumeration literals of an enumeration attribute + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals); + + //! Sets an attribute as enumeration + virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals); + + + /* + + SColor Attribute + + */ + + //! Adds an attribute as color + virtual void addColor(const c8* attributeName, video::SColor value); + + //! Sets a attribute as color + virtual void setAttribute(const c8* attributeName, video::SColor color); + + //! Gets an attribute as color + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual video::SColor getAttributeAsColor(const c8* attributeName); + + //! Gets an attribute as color + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual video::SColor getAttributeAsColor(s32 index); + + //! Sets an attribute as color + virtual void setAttribute(s32 index, video::SColor color); + + /* + + SColorf Attribute + + */ + + //! Adds an attribute as floating point color + virtual void addColorf(const c8* attributeName, video::SColorf value); + + //! Sets a attribute as floating point color + virtual void setAttribute(const c8* attributeName, video::SColorf color); + + //! Gets an attribute as floating point color + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual video::SColorf getAttributeAsColorf(const c8* attributeName); + + //! Gets an attribute as floating point color + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual video::SColorf getAttributeAsColorf(s32 index); + + //! Sets an attribute as floating point color + virtual void setAttribute(s32 index, video::SColorf color); + + + /* + + Vector3d Attribute + + */ + + //! Adds an attribute as 3d vector + virtual void addVector3d(const c8* attributeName, core::vector3df value); + + //! Sets a attribute as 3d vector + virtual void setAttribute(const c8* attributeName, core::vector3df v); + + //! Gets an attribute as 3d vector + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::vector3df getAttributeAsVector3d(const c8* attributeName); + + //! Gets an attribute as 3d vector + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::vector3df getAttributeAsVector3d(s32 index); + + //! Sets an attribute as vector + virtual void setAttribute(s32 index, core::vector3df v); + + + /* + + Vector2d Attribute + + */ + + //! Adds an attribute as 2d vector + virtual void addVector2d(const c8* attributeName, core::vector2df value); + + //! Sets a attribute as 2d vector + virtual void setAttribute(const c8* attributeName, core::vector2df v); + + //! Gets an attribute as 2d vector + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::vector2df getAttributeAsVector2d(const c8* attributeName); + + //! Gets an attribute as 3d vector + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::vector2df getAttributeAsVector2d(s32 index); + + //! Sets an attribute as vector + virtual void setAttribute(s32 index, core::vector2df v); + + + /* + + Position2d Attribute + + */ + + //! Adds an attribute as 2d position + virtual void addPosition2d(const c8* attributeName, core::position2di value); + + //! Sets a attribute as 2d position + virtual void setAttribute(const c8* attributeName, core::position2di v); + + //! Gets an attribute as position + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::position2di getAttributeAsPosition2d(const c8* attributeName); + + //! Gets an attribute as position + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::position2di getAttributeAsPosition2d(s32 index); + + //! Sets an attribute as 2d position + virtual void setAttribute(s32 index, core::position2di v); + + /* + + Rectangle Attribute + + */ + + //! Adds an attribute as rectangle + virtual void addRect(const c8* attributeName, core::rect<s32> value); + + //! Sets an attribute as rectangle + virtual void setAttribute(const c8* attributeName, core::rect<s32> v); + + //! Gets an attribute as rectangle + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::rect<s32> getAttributeAsRect(const c8* attributeName); + + //! Gets an attribute as rectangle + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::rect<s32> getAttributeAsRect(s32 index); + + //! Sets an attribute as rectangle + virtual void setAttribute(s32 index, core::rect<s32> v); + + + /* + + Dimension2d Attribute + + */ + + //! Adds an attribute as dimension2d + virtual void addDimension2d(const c8* attributeName, core::dimension2d<u32> value); + + //! Sets an attribute as dimension2d + virtual void setAttribute(const c8* attributeName, core::dimension2d<u32> v); + + //! Gets an attribute as dimension2d + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName); + + //! Gets an attribute as dimension2d + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index); + + //! Sets an attribute as dimension2d + virtual void setAttribute(s32 index, core::dimension2d<u32> v); + + + /* + + matrix attribute + + */ + + //! Adds an attribute as matrix + virtual void addMatrix(const c8* attributeName, const core::matrix4& v); + + //! Sets an attribute as matrix + virtual void setAttribute(const c8* attributeName, const core::matrix4& v); + + //! Gets an attribute as a matrix4 + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName); + + //! Gets an attribute as matrix + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::matrix4 getAttributeAsMatrix(s32 index); + + //! Sets an attribute as matrix + virtual void setAttribute(s32 index, const core::matrix4& v); + + /* + quaternion attribute + + */ + + //! Adds an attribute as quaternion + virtual void addQuaternion(const c8* attributeName, core::quaternion v); + + //! Sets an attribute as quaternion + virtual void setAttribute(const c8* attributeName, core::quaternion v); + + //! Gets an attribute as a quaternion + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName); + + //! Gets an attribute as quaternion + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::quaternion getAttributeAsQuaternion(s32 index); + + //! Sets an attribute as quaternion + virtual void setAttribute(s32 index, core::quaternion v); + + /* + + 3d bounding box + + */ + + //! Adds an attribute as axis aligned bounding box + virtual void addBox3d(const c8* attributeName, core::aabbox3df v); + + //! Sets an attribute as axis aligned bounding box + virtual void setAttribute(const c8* attributeName, core::aabbox3df v); + + //! Gets an attribute as a axis aligned bounding box + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName); + + //! Gets an attribute as axis aligned bounding box + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::aabbox3df getAttributeAsBox3d(s32 index); + + //! Sets an attribute as axis aligned bounding box + virtual void setAttribute(s32 index, core::aabbox3df v); + + /* + + plane + + */ + + //! Adds an attribute as 3d plane + virtual void addPlane3d(const c8* attributeName, core::plane3df v); + + //! Sets an attribute as 3d plane + virtual void setAttribute(const c8* attributeName, core::plane3df v); + + //! Gets an attribute as a 3d plane + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName); + + //! Gets an attribute as 3d plane + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::plane3df getAttributeAsPlane3d(s32 index); + + //! Sets an attribute as 3d plane + virtual void setAttribute(s32 index, core::plane3df v); + + + /* + + 3d triangle + + */ + + //! Adds an attribute as 3d triangle + virtual void addTriangle3d(const c8* attributeName, core::triangle3df v); + + //! Sets an attribute as 3d trianle + virtual void setAttribute(const c8* attributeName, core::triangle3df v); + + //! Gets an attribute as a 3d triangle + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::triangle3df getAttributeAsTriangle3d(const c8* attributeName); + + //! Gets an attribute as 3d triangle + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::triangle3df getAttributeAsTriangle3d(s32 index); + + //! Sets an attribute as 3d triangle + virtual void setAttribute(s32 index, core::triangle3df v); + + + /* + + line 2d + + */ + + //! Adds an attribute as a 2d line + virtual void addLine2d(const c8* attributeName, core::line2df v); + + //! Sets an attribute as a 2d line + virtual void setAttribute(const c8* attributeName, core::line2df v); + + //! Gets an attribute as a 2d line + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::line2df getAttributeAsLine2d(const c8* attributeName); + + //! Gets an attribute as a 2d line + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::line2df getAttributeAsLine2d(s32 index); + + //! Sets an attribute as a 2d line + virtual void setAttribute(s32 index, core::line2df v); + + + /* + + line 3d + + */ + + //! Adds an attribute as a 3d line + virtual void addLine3d(const c8* attributeName, core::line3df v); + + //! Sets an attribute as a 3d line + virtual void setAttribute(const c8* attributeName, core::line3df v); + + //! Gets an attribute as a 3d line + //! \param attributeName: Name of the attribute to get. + //! \return Returns value of the attribute previously set by setAttribute() + virtual core::line3df getAttributeAsLine3d(const c8* attributeName); + + //! Gets an attribute as a 3d line + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual core::line3df getAttributeAsLine3d(s32 index); + + //! Sets an attribute as a 3d line + virtual void setAttribute(s32 index, core::line3df v); + + + /* + + Texture Attribute + + */ + + //! Adds an attribute as texture reference + virtual void addTexture(const c8* attributeName, video::ITexture* texture, const io::path& filename = ""); + + //! Sets an attribute as texture reference + virtual void setAttribute(const c8* attributeName, video::ITexture* texture, const io::path& filename = ""); + + //! Gets an attribute as texture reference + //! \param attributeName: Name of the attribute to get. + virtual video::ITexture* getAttributeAsTexture(const c8* attributeName); + + //! Gets an attribute as texture reference + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual video::ITexture* getAttributeAsTexture(s32 index); + + //! Sets an attribute as texture reference + virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = ""); + + + + /* + + User Pointer Attribute + + */ + + //! Adds an attribute as user pointner + virtual void addUserPointer(const c8* attributeName, void* userPointer); + + //! Sets an attribute as user pointer + virtual void setAttribute(const c8* attributeName, void* userPointer); + + //! Gets an attribute as user pointer + //! \param attributeName: Name of the attribute to get. + virtual void* getAttributeAsUserPointer(const c8* attributeName); + + //! Gets an attribute as user pointer + //! \param index: Index value, must be between 0 and getAttributeCount()-1. + virtual void* getAttributeAsUserPointer(s32 index); + + //! Sets an attribute as user pointer + virtual void setAttribute(s32 index, void* userPointer); + +protected: + + void readAttributeFromXML(io::IXMLReader* reader); + + core::array<IAttribute*> Attributes; + + IAttribute* getAttributeP(const c8* attributeName) const; + + video::IVideoDriver* Driver; +}; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.cpp new file mode 100644 index 0000000..3d8769e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.cpp @@ -0,0 +1,1105 @@ +// Copyright (C) 2006-2012 Luke Hoschke +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// B3D Mesh loader +// File format designed by Mark Sibly for the Blitz3D engine and has been +// declared public domain + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_B3D_LOADER_ + +#include "CB3DMeshFileLoader.h" + +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "os.h" + +#ifdef _DEBUG +#define _B3D_READER_DEBUG +#endif + +namespace irr +{ +namespace scene +{ + +//! Constructor +CB3DMeshFileLoader::CB3DMeshFileLoader(scene::ISceneManager* smgr) +: SceneManager(smgr), AnimatedMesh(0), B3DFile(0), NormalsInFile(false), + HasVertexColors(false), ShowWarning(true) +{ + #ifdef _DEBUG + setDebugName("CB3DMeshFileLoader"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CB3DMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "b3d" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CB3DMeshFileLoader::createMesh(io::IReadFile* f) +{ + if (!f) + return 0; + + B3DFile = f; + AnimatedMesh = new scene::CSkinnedMesh(); + ShowWarning = true; // If true a warning is issued if too many textures are used + VerticesStart=0; + + if ( load() ) + { + AnimatedMesh->finalize(); + } + else + { + AnimatedMesh->drop(); + AnimatedMesh = 0; + } + + return AnimatedMesh; +} + + +bool CB3DMeshFileLoader::load() +{ + B3dStack.clear(); + + NormalsInFile=false; + HasVertexColors=false; + + //------ Get header ------ + + SB3dChunkHeader header; + B3DFile->read(&header, sizeof(header)); +#ifdef __BIG_ENDIAN__ + header.size = os::Byteswap::byteswap(header.size); +#endif + + if ( strncmp( header.name, "BB3D", 4 ) != 0 ) + { + os::Printer::log("File is not a b3d file. Loading failed (No header found)", B3DFile->getFileName(), ELL_ERROR); + return false; + } + + // Add main chunk... + B3dStack.push_back(SB3dChunk(header, B3DFile->getPos()-8)); + + // Get file version, but ignore it, as it's not important with b3d files... + s32 fileVersion; + B3DFile->read(&fileVersion, sizeof(fileVersion)); +#ifdef __BIG_ENDIAN__ + fileVersion = os::Byteswap::byteswap(fileVersion); +#endif + + //------ Read main chunk ------ + + while ( (B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos() ) + { + B3DFile->read(&header, sizeof(header)); +#ifdef __BIG_ENDIAN__ + header.size = os::Byteswap::byteswap(header.size); +#endif + B3dStack.push_back(SB3dChunk(header, B3DFile->getPos()-8)); + + if ( strncmp( B3dStack.getLast().name, "TEXS", 4 ) == 0 ) + { + if (!readChunkTEXS()) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "BRUS", 4 ) == 0 ) + { + if (!readChunkBRUS()) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "NODE", 4 ) == 0 ) + { + if (!readChunkNODE((CSkinnedMesh::SJoint*)0) ) + return false; + } + else + { + os::Printer::log("Unknown chunk found in mesh base - skipping"); + B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length); + B3dStack.erase(B3dStack.size()-1); + } + } + + B3dStack.clear(); + + BaseVertices.clear(); + AnimatedVertices_VertexID.clear(); + AnimatedVertices_BufferID.clear(); + + Materials.clear(); + Textures.clear(); + + return true; +} + + +bool CB3DMeshFileLoader::readChunkNODE(CSkinnedMesh::SJoint *inJoint) +{ + CSkinnedMesh::SJoint *joint = AnimatedMesh->addJoint(inJoint); + readString(joint->Name); + +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkNODE"; + os::Printer::log(logStr.c_str(), joint->Name.c_str()); +#endif + + f32 position[3], scale[3], rotation[4]; + + readFloats(position, 3); + readFloats(scale, 3); + readFloats(rotation, 4); + + joint->Animatedposition = core::vector3df(position[0],position[1],position[2]) ; + joint->Animatedscale = core::vector3df(scale[0],scale[1],scale[2]); + joint->Animatedrotation = core::quaternion(rotation[1], rotation[2], rotation[3], rotation[0]); + + //Build LocalMatrix: + + core::matrix4 positionMatrix; + positionMatrix.setTranslation( joint->Animatedposition ); + core::matrix4 scaleMatrix; + scaleMatrix.setScale( joint->Animatedscale ); + core::matrix4 rotationMatrix; + joint->Animatedrotation.getMatrix_transposed(rotationMatrix); + + joint->LocalMatrix = positionMatrix * rotationMatrix * scaleMatrix; + + if (inJoint) + joint->GlobalMatrix = inJoint->GlobalMatrix * joint->LocalMatrix; + else + joint->GlobalMatrix = joint->LocalMatrix; + + while(B3dStack.getLast().startposition + B3dStack.getLast().length > B3DFile->getPos()) // this chunk repeats + { + SB3dChunkHeader header; + B3DFile->read(&header, sizeof(header)); +#ifdef __BIG_ENDIAN__ + header.size = os::Byteswap::byteswap(header.size); +#endif + + B3dStack.push_back(SB3dChunk(header, B3DFile->getPos()-8)); + + if ( strncmp( B3dStack.getLast().name, "NODE", 4 ) == 0 ) + { + if (!readChunkNODE(joint)) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "MESH", 4 ) == 0 ) + { + VerticesStart=BaseVertices.size(); + if (!readChunkMESH(joint)) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "BONE", 4 ) == 0 ) + { + if (!readChunkBONE(joint)) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "KEYS", 4 ) == 0 ) + { + if(!readChunkKEYS(joint)) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "ANIM", 4 ) == 0 ) + { + if (!readChunkANIM()) + return false; + } + else + { + os::Printer::log("Unknown chunk found in node chunk - skipping"); + B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length); + B3dStack.erase(B3dStack.size()-1); + } + } + + B3dStack.erase(B3dStack.size()-1); + + return true; +} + + +bool CB3DMeshFileLoader::readChunkMESH(CSkinnedMesh::SJoint *inJoint) +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkMESH"; + os::Printer::log(logStr.c_str()); +#endif + + s32 brushID; + B3DFile->read(&brushID, sizeof(brushID)); +#ifdef __BIG_ENDIAN__ + brushID = os::Byteswap::byteswap(brushID); +#endif + + NormalsInFile=false; + HasVertexColors=false; + + while((B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) //this chunk repeats + { + SB3dChunkHeader header; + B3DFile->read(&header, sizeof(header)); +#ifdef __BIG_ENDIAN__ + header.size = os::Byteswap::byteswap(header.size); +#endif + + B3dStack.push_back(SB3dChunk(header, B3DFile->getPos()-8)); + + if ( strncmp( B3dStack.getLast().name, "VRTS", 4 ) == 0 ) + { + if (!readChunkVRTS(inJoint)) + return false; + } + else if ( strncmp( B3dStack.getLast().name, "TRIS", 4 ) == 0 ) + { + scene::SSkinMeshBuffer *meshBuffer = AnimatedMesh->addMeshBuffer(); + + if (brushID!=-1) + { + loadTextures(Materials[brushID]); + meshBuffer->Material=Materials[brushID].Material; + } + + if(readChunkTRIS(meshBuffer,AnimatedMesh->getMeshBuffers().size()-1, VerticesStart)==false) + return false; + + if (!NormalsInFile) + { + s32 i; + + for ( i=0; i<(s32)meshBuffer->Indices.size(); i+=3) + { + core::plane3df p(meshBuffer->getVertex(meshBuffer->Indices[i+0])->Pos, + meshBuffer->getVertex(meshBuffer->Indices[i+1])->Pos, + meshBuffer->getVertex(meshBuffer->Indices[i+2])->Pos); + + meshBuffer->getVertex(meshBuffer->Indices[i+0])->Normal += p.Normal; + meshBuffer->getVertex(meshBuffer->Indices[i+1])->Normal += p.Normal; + meshBuffer->getVertex(meshBuffer->Indices[i+2])->Normal += p.Normal; + } + + for ( i = 0; i<(s32)meshBuffer->getVertexCount(); ++i ) + { + meshBuffer->getVertex(i)->Normal.normalize(); + BaseVertices[VerticesStart+i].Normal=meshBuffer->getVertex(i)->Normal; + } + } + } + else + { + os::Printer::log("Unknown chunk found in mesh - skipping"); + B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length); + B3dStack.erase(B3dStack.size()-1); + } + } + + B3dStack.erase(B3dStack.size()-1); + + return true; +} + + +/* +VRTS: + int flags ;1=normal values present, 2=rgba values present + int tex_coord_sets ;texture coords per vertex (eg: 1 for simple U/V) max=8 + but we only support 3 + int tex_coord_set_size ;components per set (eg: 2 for simple U/V) max=4 + { + float x,y,z ;always present + float nx,ny,nz ;vertex normal: present if (flags&1) + float red,green,blue,alpha ;vertex color: present if (flags&2) + float tex_coords[tex_coord_sets][tex_coord_set_size] ;tex coords + } +*/ +bool CB3DMeshFileLoader::readChunkVRTS(CSkinnedMesh::SJoint *inJoint) +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "ChunkVRTS"; + os::Printer::log(logStr.c_str()); +#endif + + const s32 max_tex_coords = 3; + s32 flags, tex_coord_sets, tex_coord_set_size; + + B3DFile->read(&flags, sizeof(flags)); + B3DFile->read(&tex_coord_sets, sizeof(tex_coord_sets)); + B3DFile->read(&tex_coord_set_size, sizeof(tex_coord_set_size)); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); + tex_coord_sets = os::Byteswap::byteswap(tex_coord_sets); + tex_coord_set_size = os::Byteswap::byteswap(tex_coord_set_size); +#endif + + if (tex_coord_sets >= max_tex_coords || tex_coord_set_size >= 4) // Something is wrong + { + os::Printer::log("tex_coord_sets or tex_coord_set_size too big", B3DFile->getFileName(), ELL_ERROR); + return false; + } + + //------ Allocate Memory, for speed -----------// + + s32 numberOfReads = 3; + + if (flags & 1) + { + NormalsInFile = true; + numberOfReads += 3; + } + if (flags & 2) + { + numberOfReads += 4; + HasVertexColors=true; + } + + numberOfReads += tex_coord_sets*tex_coord_set_size; + + const s32 memoryNeeded = (B3dStack.getLast().length / sizeof(f32)) / numberOfReads; + + BaseVertices.reallocate(memoryNeeded + BaseVertices.size() + 1); + AnimatedVertices_VertexID.reallocate(memoryNeeded + AnimatedVertices_VertexID.size() + 1); + + //--------------------------------------------// + + while( (B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) // this chunk repeats + { + f32 position[3]; + f32 normal[3]={0.f, 0.f, 0.f}; + f32 color[4]={1.0f, 1.0f, 1.0f, 1.0f}; + f32 tex_coords[max_tex_coords][4]; + + readFloats(position, 3); + + if (flags & 1) + readFloats(normal, 3); + if (flags & 2) + readFloats(color, 4); + + for (s32 i=0; i<tex_coord_sets; ++i) + readFloats(tex_coords[i], tex_coord_set_size); + + f32 tu=0.0f, tv=0.0f; + if (tex_coord_sets >= 1 && tex_coord_set_size >= 2) + { + tu=tex_coords[0][0]; + tv=tex_coords[0][1]; + } + + f32 tu2=0.0f, tv2=0.0f; + if (tex_coord_sets>1 && tex_coord_set_size>1) + { + tu2=tex_coords[1][0]; + tv2=tex_coords[1][1]; + } + + // Create Vertex... + video::S3DVertex2TCoords Vertex(position[0], position[1], position[2], + normal[0], normal[1], normal[2], + video::SColorf(color[0], color[1], color[2], color[3]).toSColor(), + tu, tv, tu2, tv2); + + // Transform the Vertex position by nested node... + inJoint->GlobalMatrix.transformVect(Vertex.Pos); + inJoint->GlobalMatrix.rotateVect(Vertex.Normal); + + //Add it... + BaseVertices.push_back(Vertex); + + AnimatedVertices_VertexID.push_back(-1); + AnimatedVertices_BufferID.push_back(-1); + } + + B3dStack.erase(B3dStack.size()-1); + + return true; +} + + +bool CB3DMeshFileLoader::readChunkTRIS(scene::SSkinMeshBuffer *meshBuffer, u32 meshBufferID, s32 vertices_Start) +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "ChunkTRIS"; + os::Printer::log(logStr.c_str()); +#endif + + bool showVertexWarning=false; + + s32 triangle_brush_id; // Note: Irrlicht can't have different brushes for each triangle (using a workaround) + B3DFile->read(&triangle_brush_id, sizeof(triangle_brush_id)); +#ifdef __BIG_ENDIAN__ + triangle_brush_id = os::Byteswap::byteswap(triangle_brush_id); +#endif + + SB3dMaterial *B3dMaterial; + + if (triangle_brush_id != -1) + { + loadTextures(Materials[triangle_brush_id]); + B3dMaterial = &Materials[triangle_brush_id]; + meshBuffer->Material = B3dMaterial->Material; + } + else + B3dMaterial = 0; + + const s32 memoryNeeded = B3dStack.getLast().length / sizeof(s32); + meshBuffer->Indices.reallocate(memoryNeeded + meshBuffer->Indices.size() + 1); + + while((B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) // this chunk repeats + { + s32 vertex_id[3]; + + B3DFile->read(vertex_id, 3*sizeof(s32)); +#ifdef __BIG_ENDIAN__ + vertex_id[0] = os::Byteswap::byteswap(vertex_id[0]); + vertex_id[1] = os::Byteswap::byteswap(vertex_id[1]); + vertex_id[2] = os::Byteswap::byteswap(vertex_id[2]); +#endif + + //Make Ids global: + vertex_id[0] += vertices_Start; + vertex_id[1] += vertices_Start; + vertex_id[2] += vertices_Start; + + for(s32 i=0; i<3; ++i) + { + if ((u32)vertex_id[i] >= AnimatedVertices_VertexID.size()) + { + os::Printer::log("Illegal vertex index found", B3DFile->getFileName(), ELL_ERROR); + return false; + } + + if (AnimatedVertices_VertexID[ vertex_id[i] ] != -1) + { + if ( AnimatedVertices_BufferID[ vertex_id[i] ] != (s32)meshBufferID ) //If this vertex is linked in a different meshbuffer + { + AnimatedVertices_VertexID[ vertex_id[i] ] = -1; + AnimatedVertices_BufferID[ vertex_id[i] ] = -1; + showVertexWarning=true; + } + } + if (AnimatedVertices_VertexID[ vertex_id[i] ] == -1) //If this vertex is not in the meshbuffer + { + //Check for lightmapping: + if (BaseVertices[ vertex_id[i] ].TCoords2 != core::vector2df(0.f,0.f)) + meshBuffer->convertTo2TCoords(); //Will only affect the meshbuffer the first time this is called + + //Add the vertex to the meshbuffer: + if (meshBuffer->VertexType == video::EVT_STANDARD) + meshBuffer->Vertices_Standard.push_back( BaseVertices[ vertex_id[i] ] ); + else + meshBuffer->Vertices_2TCoords.push_back(BaseVertices[ vertex_id[i] ] ); + + //create vertex id to meshbuffer index link: + AnimatedVertices_VertexID[ vertex_id[i] ] = meshBuffer->getVertexCount()-1; + AnimatedVertices_BufferID[ vertex_id[i] ] = meshBufferID; + + if (B3dMaterial) + { + // Apply Material/Color/etc... + video::S3DVertex *Vertex=meshBuffer->getVertex(meshBuffer->getVertexCount()-1); + + if (!HasVertexColors) + Vertex->Color=B3dMaterial->Material.DiffuseColor; + else if (Vertex->Color.getAlpha() == 255) + Vertex->Color.setAlpha( (s32)(B3dMaterial->alpha * 255.0f) ); + + // Use texture's scale + if (B3dMaterial->Textures[0]) + { + Vertex->TCoords.X *= B3dMaterial->Textures[0]->Xscale; + Vertex->TCoords.Y *= B3dMaterial->Textures[0]->Yscale; + } + /* + if (B3dMaterial->Textures[1]) + { + Vertex->TCoords2.X *=B3dMaterial->Textures[1]->Xscale; + Vertex->TCoords2.Y *=B3dMaterial->Textures[1]->Yscale; + } + */ + } + } + } + + meshBuffer->Indices.push_back( AnimatedVertices_VertexID[ vertex_id[0] ] ); + meshBuffer->Indices.push_back( AnimatedVertices_VertexID[ vertex_id[1] ] ); + meshBuffer->Indices.push_back( AnimatedVertices_VertexID[ vertex_id[2] ] ); + } + + B3dStack.erase(B3dStack.size()-1); + + if (showVertexWarning) + os::Printer::log("B3dMeshLoader: Warning, different meshbuffers linking to the same vertex, this will cause problems with animated meshes"); + + return true; +} + + +bool CB3DMeshFileLoader::readChunkBONE(CSkinnedMesh::SJoint *inJoint) +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkBONE"; + os::Printer::log(logStr.c_str()); +#endif + + if (B3dStack.getLast().length > 8) + { + while((B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) // this chunk repeats + { + u32 globalVertexID; + f32 strength; + B3DFile->read(&globalVertexID, sizeof(globalVertexID)); + B3DFile->read(&strength, sizeof(strength)); +#ifdef __BIG_ENDIAN__ + globalVertexID = os::Byteswap::byteswap(globalVertexID); + strength = os::Byteswap::byteswap(strength); +#endif + globalVertexID += VerticesStart; + + if (AnimatedVertices_VertexID[globalVertexID]==-1) + { + os::Printer::log("B3dMeshLoader: Weight has bad vertex id (no link to meshbuffer index found)"); + } + else if (strength >0) + { + CSkinnedMesh::SWeight *weight=AnimatedMesh->addWeight(inJoint); + weight->strength=strength; + //Find the meshbuffer and Vertex index from the Global Vertex ID: + weight->vertex_id = AnimatedVertices_VertexID[globalVertexID]; + weight->buffer_id = AnimatedVertices_BufferID[globalVertexID]; + } + } + } + + B3dStack.erase(B3dStack.size()-1); + return true; +} + + +bool CB3DMeshFileLoader::readChunkKEYS(CSkinnedMesh::SJoint *inJoint) +{ +#ifdef _B3D_READER_DEBUG + // Only print first, that's just too much output otherwise + if ( !inJoint || (inJoint->PositionKeys.empty() && inJoint->ScaleKeys.empty() && inJoint->RotationKeys.empty()) ) + { + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkKEYS"; + os::Printer::log(logStr.c_str()); + } +#endif + + s32 flags; + B3DFile->read(&flags, sizeof(flags)); +#ifdef __BIG_ENDIAN__ + flags = os::Byteswap::byteswap(flags); +#endif + + CSkinnedMesh::SPositionKey *oldPosKey=0; + core::vector3df oldPos[2]; + CSkinnedMesh::SScaleKey *oldScaleKey=0; + core::vector3df oldScale[2]; + CSkinnedMesh::SRotationKey *oldRotKey=0; + core::quaternion oldRot[2]; + bool isFirst[3]={true,true,true}; + while((B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) //this chunk repeats + { + s32 frame; + + B3DFile->read(&frame, sizeof(frame)); + #ifdef __BIG_ENDIAN__ + frame = os::Byteswap::byteswap(frame); + #endif + + // Add key frames, frames in Irrlicht are zero-based + f32 data[4]; + if (flags & 1) + { + readFloats(data, 3); + if ((oldPosKey!=0) && (oldPos[0]==oldPos[1])) + { + const core::vector3df pos(data[0], data[1], data[2]); + if (oldPos[1]==pos) + oldPosKey->frame = (f32)frame-1; + else + { + oldPos[0]=oldPos[1]; + oldPosKey=AnimatedMesh->addPositionKey(inJoint); + oldPosKey->frame = (f32)frame-1; + oldPos[1].set(oldPosKey->position.set(pos)); + } + } + else if (oldPosKey==0 && isFirst[0]) + { + oldPosKey=AnimatedMesh->addPositionKey(inJoint); + oldPosKey->frame = (f32)frame-1; + oldPos[0].set(oldPosKey->position.set(data[0], data[1], data[2])); + oldPosKey=0; + isFirst[0]=false; + } + else + { + if (oldPosKey!=0) + oldPos[0]=oldPos[1]; + oldPosKey=AnimatedMesh->addPositionKey(inJoint); + oldPosKey->frame = (f32)frame-1; + oldPos[1].set(oldPosKey->position.set(data[0], data[1], data[2])); + } + } + if (flags & 2) + { + readFloats(data, 3); + if ((oldScaleKey!=0) && (oldScale[0]==oldScale[1])) + { + const core::vector3df scale(data[0], data[1], data[2]); + if (oldScale[1]==scale) + oldScaleKey->frame = (f32)frame-1; + else + { + oldScale[0]=oldScale[1]; + oldScaleKey=AnimatedMesh->addScaleKey(inJoint); + oldScaleKey->frame = (f32)frame-1; + oldScale[1].set(oldScaleKey->scale.set(scale)); + } + } + else if (oldScaleKey==0 && isFirst[1]) + { + oldScaleKey=AnimatedMesh->addScaleKey(inJoint); + oldScaleKey->frame = (f32)frame-1; + oldScale[0].set(oldScaleKey->scale.set(data[0], data[1], data[2])); + oldScaleKey=0; + isFirst[1]=false; + } + else + { + if (oldScaleKey!=0) + oldScale[0]=oldScale[1]; + oldScaleKey=AnimatedMesh->addScaleKey(inJoint); + oldScaleKey->frame = (f32)frame-1; + oldScale[1].set(oldScaleKey->scale.set(data[0], data[1], data[2])); + } + } + if (flags & 4) + { + readFloats(data, 4); + if ((oldRotKey!=0) && (oldRot[0]==oldRot[1])) + { + // meant to be in this order since b3d stores W first + const core::quaternion rot(data[1], data[2], data[3], data[0]); + if (oldRot[1]==rot) + oldRotKey->frame = (f32)frame-1; + else + { + oldRot[0]=oldRot[1]; + oldRotKey=AnimatedMesh->addRotationKey(inJoint); + oldRotKey->frame = (f32)frame-1; + oldRot[1].set(oldRotKey->rotation.set(data[1], data[2], data[3], data[0])); + } + } + else if (oldRotKey==0 && isFirst[2]) + { + oldRotKey=AnimatedMesh->addRotationKey(inJoint); + oldRotKey->frame = (f32)frame-1; + // meant to be in this order since b3d stores W first + oldRot[0].set(oldRotKey->rotation.set(data[1], data[2], data[3], data[0])); + oldRotKey=0; + isFirst[2]=false; + } + else + { + if (oldRotKey!=0) + oldRot[0]=oldRot[1]; + oldRotKey=AnimatedMesh->addRotationKey(inJoint); + oldRotKey->frame = (f32)frame-1; + // meant to be in this order since b3d stores W first + oldRot[1].set(oldRotKey->rotation.set(data[1], data[2], data[3], data[0])); + } + } + } + + B3dStack.erase(B3dStack.size()-1); + return true; +} + + +bool CB3DMeshFileLoader::readChunkANIM() +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkANIM"; + os::Printer::log(logStr.c_str()); +#endif + + s32 animFlags; //not stored\used + s32 animFrames;//not stored\used + f32 animFPS; //not stored\used + + B3DFile->read(&animFlags, sizeof(s32)); + B3DFile->read(&animFrames, sizeof(s32)); + readFloats(&animFPS, 1); + if (animFPS>0.f) + AnimatedMesh->setAnimationSpeed(animFPS); + os::Printer::log("FPS", io::path((double)animFPS), ELL_DEBUG); + + #ifdef __BIG_ENDIAN__ + animFlags = os::Byteswap::byteswap(animFlags); + animFrames = os::Byteswap::byteswap(animFrames); + #endif + + B3dStack.erase(B3dStack.size()-1); + return true; +} + + +bool CB3DMeshFileLoader::readChunkTEXS() +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkTEXS"; + os::Printer::log(logStr.c_str()); +#endif + + while((B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) //this chunk repeats + { + Textures.push_back(SB3dTexture()); + SB3dTexture& B3dTexture = Textures.getLast(); + + readString(B3dTexture.TextureName); + B3dTexture.TextureName.replace('\\','/'); +#ifdef _B3D_READER_DEBUG + os::Printer::log("read Texture", B3dTexture.TextureName.c_str()); +#endif + + B3DFile->read(&B3dTexture.Flags, sizeof(s32)); + B3DFile->read(&B3dTexture.Blend, sizeof(s32)); +#ifdef __BIG_ENDIAN__ + B3dTexture.Flags = os::Byteswap::byteswap(B3dTexture.Flags); + B3dTexture.Blend = os::Byteswap::byteswap(B3dTexture.Blend); +#endif +#ifdef _B3D_READER_DEBUG + os::Printer::log("Flags", core::stringc(B3dTexture.Flags).c_str()); + os::Printer::log("Blend", core::stringc(B3dTexture.Blend).c_str()); +#endif + readFloats(&B3dTexture.Xpos, 1); + readFloats(&B3dTexture.Ypos, 1); + readFloats(&B3dTexture.Xscale, 1); + readFloats(&B3dTexture.Yscale, 1); + readFloats(&B3dTexture.Angle, 1); + } + + B3dStack.erase(B3dStack.size()-1); + + return true; +} + + +bool CB3DMeshFileLoader::readChunkBRUS() +{ +#ifdef _B3D_READER_DEBUG + core::stringc logStr; + for ( u32 i=1; i < B3dStack.size(); ++i ) + logStr += "-"; + logStr += "read ChunkBRUS"; + os::Printer::log(logStr.c_str()); +#endif + + u32 n_texs; + B3DFile->read(&n_texs, sizeof(u32)); +#ifdef __BIG_ENDIAN__ + n_texs = os::Byteswap::byteswap(n_texs); +#endif + + // number of texture ids read for Irrlicht + const u32 num_textures = core::min_(n_texs, video::MATERIAL_MAX_TEXTURES); + // number of bytes to skip (for ignored texture ids) + const u32 n_texs_offset = (num_textures<n_texs)?(n_texs-num_textures):0; + + while((B3dStack.getLast().startposition + B3dStack.getLast().length) > B3DFile->getPos()) //this chunk repeats + { + // This is what blitz basic calls a brush, like a Irrlicht Material + + core::stringc name; + readString(name); +#ifdef _B3D_READER_DEBUG + os::Printer::log("read Material", name); +#endif + Materials.push_back(SB3dMaterial()); + SB3dMaterial& B3dMaterial=Materials.getLast(); + + readFloats(&B3dMaterial.red, 1); + readFloats(&B3dMaterial.green, 1); + readFloats(&B3dMaterial.blue, 1); + readFloats(&B3dMaterial.alpha, 1); + readFloats(&B3dMaterial.shininess, 1); + + B3DFile->read(&B3dMaterial.blend, sizeof(B3dMaterial.blend)); + B3DFile->read(&B3dMaterial.fx, sizeof(B3dMaterial.fx)); +#ifdef __BIG_ENDIAN__ + B3dMaterial.blend = os::Byteswap::byteswap(B3dMaterial.blend); + B3dMaterial.fx = os::Byteswap::byteswap(B3dMaterial.fx); +#endif +#ifdef _B3D_READER_DEBUG + os::Printer::log("Blend", core::stringc(B3dMaterial.blend).c_str()); + os::Printer::log("FX", core::stringc(B3dMaterial.fx).c_str()); +#endif + + u32 i; + for (i=0; i<num_textures; ++i) + { + s32 texture_id=-1; + B3DFile->read(&texture_id, sizeof(s32)); +#ifdef __BIG_ENDIAN__ + texture_id = os::Byteswap::byteswap(texture_id); +#endif + //--- Get pointers to the texture, based on the IDs --- + if ((u32)texture_id < Textures.size()) + { + B3dMaterial.Textures[i]=&Textures[texture_id]; +#ifdef _B3D_READER_DEBUG + os::Printer::log("Layer", core::stringc(i).c_str()); + os::Printer::log("using texture", Textures[texture_id].TextureName.c_str()); +#endif + } + else + B3dMaterial.Textures[i]=0; + } + // skip other texture ids + for (i=0; i<n_texs_offset; ++i) + { + s32 texture_id=-1; + B3DFile->read(&texture_id, sizeof(s32)); +#ifdef __BIG_ENDIAN__ + texture_id = os::Byteswap::byteswap(texture_id); +#endif + if (ShowWarning && (texture_id != -1) && (n_texs>video::MATERIAL_MAX_TEXTURES)) + { + os::Printer::log("Too many textures used in one material", B3DFile->getFileName(), ELL_WARNING); + ShowWarning = false; + } + } + + //Fixes problems when the lightmap is on the first texture: + if (B3dMaterial.Textures[0] != 0) + { + if (B3dMaterial.Textures[0]->Flags & 65536) // 65536 = secondary UV + { + SB3dTexture *TmpTexture; + TmpTexture = B3dMaterial.Textures[1]; + B3dMaterial.Textures[1] = B3dMaterial.Textures[0]; + B3dMaterial.Textures[0] = TmpTexture; + } + } + + //If a preceeding texture slot is empty move the others down: + for (i=num_textures; i>0; --i) + { + for (u32 j=i-1; j<num_textures-1; ++j) + { + if (B3dMaterial.Textures[j+1] != 0 && B3dMaterial.Textures[j] == 0) + { + B3dMaterial.Textures[j] = B3dMaterial.Textures[j+1]; + B3dMaterial.Textures[j+1] = 0; + } + } + } + + //------ Convert blitz flags/blend to irrlicht ------- + + //Two textures: + if (B3dMaterial.Textures[1]) + { + if (B3dMaterial.alpha==1.f) + { + if (B3dMaterial.Textures[1]->Blend == 5) //(Multiply 2) + B3dMaterial.Material.MaterialType = video::EMT_LIGHTMAP_M2; + else + B3dMaterial.Material.MaterialType = video::EMT_LIGHTMAP; + B3dMaterial.Material.Lighting = false; + } + else + { + B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + B3dMaterial.Material.ZWriteEnable = false; + } + } + else if (B3dMaterial.Textures[0]) //One texture: + { + // Flags & 0x1 is usual SOLID, 0x8 is mipmap (handled before) + if (B3dMaterial.Textures[0]->Flags & 0x2) //(Alpha mapped) + { + B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + B3dMaterial.Material.ZWriteEnable = false; + } + else if (B3dMaterial.Textures[0]->Flags & 0x4) //(Masked) + B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; // TODO: create color key texture + else if (B3dMaterial.Textures[0]->Flags & 0x40) + B3dMaterial.Material.MaterialType = video::EMT_SPHERE_MAP; + else if (B3dMaterial.Textures[0]->Flags & 0x80) + B3dMaterial.Material.MaterialType = video::EMT_SPHERE_MAP; // TODO: Should be cube map + else if (B3dMaterial.alpha == 1.f) + B3dMaterial.Material.MaterialType = video::EMT_SOLID; + else + { + B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + B3dMaterial.Material.ZWriteEnable = false; + } + } + else //No texture: + { + if (B3dMaterial.alpha == 1.f) + B3dMaterial.Material.MaterialType = video::EMT_SOLID; + else + { + B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + B3dMaterial.Material.ZWriteEnable = false; + } + } + + B3dMaterial.Material.DiffuseColor = video::SColorf(B3dMaterial.red, B3dMaterial.green, B3dMaterial.blue, B3dMaterial.alpha).toSColor(); + B3dMaterial.Material.ColorMaterial=video::ECM_NONE; + + //------ Material fx ------ + + if (B3dMaterial.fx & 1) //full-bright + { + B3dMaterial.Material.AmbientColor = video::SColor(255, 255, 255, 255); + B3dMaterial.Material.Lighting = false; + } + else + B3dMaterial.Material.AmbientColor = B3dMaterial.Material.DiffuseColor; + + if (B3dMaterial.fx & 2) //use vertex colors instead of brush color + B3dMaterial.Material.ColorMaterial=video::ECM_DIFFUSE_AND_AMBIENT; + + if (B3dMaterial.fx & 4) //flatshaded + B3dMaterial.Material.GouraudShading = false; + + if (B3dMaterial.fx & 16) //disable backface culling + B3dMaterial.Material.BackfaceCulling = false; + + if (B3dMaterial.fx & 32) //force vertex alpha-blending + { + B3dMaterial.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + B3dMaterial.Material.ZWriteEnable = false; + } + + B3dMaterial.Material.Shininess = B3dMaterial.shininess; + } + + B3dStack.erase(B3dStack.size()-1); + + return true; +} + + +void CB3DMeshFileLoader::loadTextures(SB3dMaterial& material) const +{ + const bool previous32BitTextureFlag = SceneManager->getVideoDriver()->getTextureCreationFlag(video::ETCF_ALWAYS_32_BIT); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); + + // read texture from disk + // note that mipmaps might be disabled by Flags & 0x8 + const bool doMipMaps = SceneManager->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + + for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i) + { + SB3dTexture* B3dTexture = material.Textures[i]; + if (B3dTexture && B3dTexture->TextureName.size() && !material.Material.getTexture(i)) + { + if (!SceneManager->getParameters()->getAttributeAsBool(B3D_LOADER_IGNORE_MIPMAP_FLAG)) + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, (B3dTexture->Flags & 0x8) ? true:false); + { + video::ITexture* tex = 0; + io::IFileSystem* fs = SceneManager->getFileSystem(); + io::path texnameWithUserPath( SceneManager->getParameters()->getAttributeAsString(B3D_TEXTURE_PATH) ); + if ( texnameWithUserPath.size() ) + { + texnameWithUserPath += '/'; + texnameWithUserPath += B3dTexture->TextureName; + } + if (fs->existFile(texnameWithUserPath)) + tex = SceneManager->getVideoDriver()->getTexture(texnameWithUserPath); + else if (fs->existFile(B3dTexture->TextureName)) + tex = SceneManager->getVideoDriver()->getTexture(B3dTexture->TextureName); + else if (fs->existFile(fs->getFileDir(B3DFile->getFileName()) +"/"+ fs->getFileBasename(B3dTexture->TextureName))) + tex = SceneManager->getVideoDriver()->getTexture(fs->getFileDir(B3DFile->getFileName()) +"/"+ fs->getFileBasename(B3dTexture->TextureName)); + else + tex = SceneManager->getVideoDriver()->getTexture(fs->getFileBasename(B3dTexture->TextureName)); + + material.Material.setTexture(i, tex); + } + if (material.Textures[i]->Flags & 0x10) // Clamp U + material.Material.TextureLayer[i].TextureWrapU=video::ETC_CLAMP; + if (material.Textures[i]->Flags & 0x20) // Clamp V + material.Material.TextureLayer[i].TextureWrapV=video::ETC_CLAMP; + } + } + + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, doMipMaps); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, previous32BitTextureFlag); +} + + +void CB3DMeshFileLoader::readString(core::stringc& newstring) +{ + newstring=""; + while (B3DFile->getPos() <= B3DFile->getSize()) + { + c8 character; + B3DFile->read(&character, sizeof(character)); + if (character==0) + return; + newstring.append(character); + } +} + + +void CB3DMeshFileLoader::readFloats(f32* vec, u32 count) +{ + B3DFile->read(vec, count*sizeof(f32)); + #ifdef __BIG_ENDIAN__ + for (u32 n=0; n<count; ++n) + vec[n] = os::Byteswap::byteswap(vec[n]); + #endif +} + +} // end namespace scene +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_B3D_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.h new file mode 100644 index 0000000..6b3d4b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CB3DMeshFileLoader.h @@ -0,0 +1,140 @@ +// Copyright (C) 2006-2012 Luke Hoschke +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// B3D Mesh loader +// File format designed by Mark Sibly for the Blitz3D engine and has been +// declared public domain + +#include "IrrCompileConfig.h" + +#ifndef __C_B3D_MESH_LOADER_H_INCLUDED__ +#define __C_B3D_MESH_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "ISceneManager.h" +#include "CSkinnedMesh.h" +#include "IReadFile.h" + +namespace irr +{ + +namespace scene +{ + +//! Meshloader for B3D format +class CB3DMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CB3DMeshFileLoader(scene::ISceneManager* smgr); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + struct SB3dChunkHeader + { + c8 name[4]; + s32 size; + }; + + struct SB3dChunk + { + SB3dChunk(const SB3dChunkHeader& header, long sp) + : length(header.size+8), startposition(sp) + { + name[0]=header.name[0]; + name[1]=header.name[1]; + name[2]=header.name[2]; + name[3]=header.name[3]; + } + + c8 name[4]; + s32 length; + long startposition; + }; + + struct SB3dTexture + { + core::stringc TextureName; + s32 Flags; + s32 Blend; + f32 Xpos; + f32 Ypos; + f32 Xscale; + f32 Yscale; + f32 Angle; + }; + + struct SB3dMaterial + { + SB3dMaterial() : red(1.0f), green(1.0f), + blue(1.0f), alpha(1.0f), shininess(0.0f), blend(1), + fx(0) + { + for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i) + Textures[i]=0; + } + video::SMaterial Material; + f32 red, green, blue, alpha; + f32 shininess; + s32 blend,fx; + SB3dTexture *Textures[video::MATERIAL_MAX_TEXTURES]; + }; + + bool load(); + bool readChunkNODE(CSkinnedMesh::SJoint* InJoint); + bool readChunkMESH(CSkinnedMesh::SJoint* InJoint); + bool readChunkVRTS(CSkinnedMesh::SJoint* InJoint); + bool readChunkTRIS(scene::SSkinMeshBuffer *MeshBuffer, u32 MeshBufferID, s32 Vertices_Start); + bool readChunkBONE(CSkinnedMesh::SJoint* InJoint); + bool readChunkKEYS(CSkinnedMesh::SJoint* InJoint); + bool readChunkANIM(); + bool readChunkTEXS(); + bool readChunkBRUS(); + + void loadTextures(SB3dMaterial& material) const; + + void readString(core::stringc& newstring); + void readFloats(f32* vec, u32 count); + + core::array<SB3dChunk> B3dStack; + + core::array<SB3dMaterial> Materials; + core::array<SB3dTexture> Textures; + + core::array<s32> AnimatedVertices_VertexID; + + core::array<s32> AnimatedVertices_BufferID; + + core::array<video::S3DVertex2TCoords> BaseVertices; + + ISceneManager* SceneManager; + CSkinnedMesh* AnimatedMesh; + io::IReadFile* B3DFile; + + //B3Ds have Vertex ID's local within the mesh I don't want this + // Variable needs to be class member due to recursion in calls + u32 VerticesStart; + + bool NormalsInFile; + bool HasVertexColors; + bool ShowWarning; +}; + + +} // end namespace scene +} // end namespace irr + +#endif // __C_B3D_MESH_LOADER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.cpp new file mode 100644 index 0000000..01ac04a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.cpp @@ -0,0 +1,107 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_BSP_LOADER_ + +#include "CBSPMeshFileLoader.h" +#include "CQ3LevelMesh.h" + +namespace irr +{ +namespace scene +{ + +//! Constructor +CBSPMeshFileLoader::CBSPMeshFileLoader(scene::ISceneManager* smgr, + io::IFileSystem* fs) +: FileSystem(fs), SceneManager(smgr) +{ + + #ifdef _DEBUG + setDebugName("CBSPMeshFileLoader"); + #endif + + if (FileSystem) + FileSystem->grab(); +} + + +//! destructor +CBSPMeshFileLoader::~CBSPMeshFileLoader() +{ + if (FileSystem) + FileSystem->drop(); +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CBSPMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "bsp", "shader", "cfg" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CBSPMeshFileLoader::createMesh(io::IReadFile* file) +{ + s32 type = core::isFileExtension ( file->getFileName(), "bsp", "shader", "cfg" ); + CQ3LevelMesh* q = 0; + + switch ( type ) + { + case 1: + q = new CQ3LevelMesh(FileSystem, SceneManager, LoadParam); + + // determine real shaders in LoadParam + if ( 0 == LoadParam.loadAllShaders ) + { + q->getShader("scripts/common.shader"); + q->getShader("scripts/sfx.shader"); + q->getShader("scripts/gfx.shader"); + q->getShader("scripts/liquid.shader"); + q->getShader("scripts/models.shader"); + q->getShader("scripts/walls.shader"); + //q->getShader("scripts/sky.shader"); + } + + if ( q->loadFile(file) ) + return q; + + q->drop(); + break; + + case 2: + q = new CQ3LevelMesh(FileSystem, SceneManager,LoadParam); + q->getShader( file ); + return q; + break; + + case 3: + // load quake 3 loading parameter + if ( file->getFileName() == "levelparameter.cfg" ) + { + file->read ( &LoadParam, sizeof ( LoadParam ) ); + } + else + { + q = new CQ3LevelMesh(FileSystem, SceneManager,LoadParam); + q->getConfiguration( file ); + return q; + } + break; + } + + return 0; +} + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BSP_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.h new file mode 100644 index 0000000..2845037 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBSPMeshFileLoader.h @@ -0,0 +1,52 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_BSP_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_BSP_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "IQ3Shader.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading Quake 3 BSP files and shaders +class CBSPMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CBSPMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); + + //! destructor + virtual ~CBSPMeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + io::IFileSystem* FileSystem; + scene::ISceneManager* SceneManager; + + quake3::Q3LevelLoadParameter LoadParam; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.cpp new file mode 100644 index 0000000..22d41bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.cpp @@ -0,0 +1,294 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CBillboardSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CBillboardSceneNode::CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::dimension2d<f32>& size, + video::SColor colorTop, video::SColor colorBottom) + : IBillboardSceneNode(parent, mgr, id, position) +{ + #ifdef _DEBUG + setDebugName("CBillboardSceneNode"); + #endif + + setSize(size); + + indices[0] = 0; + indices[1] = 2; + indices[2] = 1; + indices[3] = 0; + indices[4] = 3; + indices[5] = 2; + + vertices[0].TCoords.set(1.0f, 1.0f); + vertices[0].Color = colorBottom; + + vertices[1].TCoords.set(1.0f, 0.0f); + vertices[1].Color = colorTop; + + vertices[2].TCoords.set(0.0f, 0.0f); + vertices[2].Color = colorTop; + + vertices[3].TCoords.set(0.0f, 1.0f); + vertices[3].Color = colorBottom; +} + + +//! pre render event +void CBillboardSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + SceneManager->registerNodeForRendering(this); + + ISceneNode::OnRegisterSceneNode(); +} + + +//! render +void CBillboardSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + ICameraSceneNode* camera = SceneManager->getActiveCamera(); + + if (!camera || !driver) + return; + + // make billboard look to camera + + core::vector3df pos = getAbsolutePosition(); + + core::vector3df campos = camera->getAbsolutePosition(); + core::vector3df target = camera->getTarget(); + core::vector3df up = camera->getUpVector(); + core::vector3df view = target - campos; + view.normalize(); + + core::vector3df horizontal = up.crossProduct(view); + if ( horizontal.getLength() == 0 ) + { + horizontal.set(up.Y,up.X,up.Z); + } + horizontal.normalize(); + core::vector3df topHorizontal = horizontal * 0.5f * TopEdgeWidth; + horizontal *= 0.5f * Size.Width; + + // pointing down! + core::vector3df vertical = horizontal.crossProduct(view); + vertical.normalize(); + vertical *= 0.5f * Size.Height; + + view *= -1.0f; + + for (s32 i=0; i<4; ++i) + vertices[i].Normal = view; + + /* Vertices are: + 2--1 + |\ | + | \| + 3--0 + */ + vertices[0].Pos = pos + horizontal + vertical; + vertices[1].Pos = pos + topHorizontal - vertical; + vertices[2].Pos = pos - topHorizontal - vertical; + vertices[3].Pos = pos - horizontal + vertical; + + // draw + + if (DebugDataVisible & scene::EDS_BBOX) + { + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + driver->draw3DBox(BBox, video::SColor(0,208,195,152)); + } + + driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); + + driver->setMaterial(Material); + + driver->drawIndexedTriangleList(vertices, 4, indices, 2); +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CBillboardSceneNode::getBoundingBox() const +{ + return BBox; +} + + +//! sets the size of the billboard +void CBillboardSceneNode::setSize(const core::dimension2d<f32>& size) +{ + Size = size; + + if (core::equals(Size.Width, 0.0f)) + Size.Width = 1.0f; + TopEdgeWidth = Size.Width; + + if (core::equals(Size.Height, 0.0f)) + Size.Height = 1.0f; + + const f32 avg = (Size.Width + Size.Height)/6; + BBox.MinEdge.set(-avg,-avg,-avg); + BBox.MaxEdge.set(avg,avg,avg); +} + + +void CBillboardSceneNode::setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) +{ + Size.set(bottomEdgeWidth, height); + TopEdgeWidth = topEdgeWidth; + + if (core::equals(Size.Height, 0.0f)) + Size.Height = 1.0f; + + if (core::equals(Size.Width, 0.f) && core::equals(TopEdgeWidth, 0.f)) + { + Size.Width = 1.0f; + TopEdgeWidth = 1.0f; + } + + const f32 avg = (core::max_(Size.Width,TopEdgeWidth) + Size.Height)/6; + BBox.MinEdge.set(-avg,-avg,-avg); + BBox.MaxEdge.set(avg,avg,avg); +} + + +video::SMaterial& CBillboardSceneNode::getMaterial(u32 i) +{ + return Material; +} + + +//! returns amount of materials used by this scene node. +u32 CBillboardSceneNode::getMaterialCount() const +{ + return 1; +} + + +//! gets the size of the billboard +const core::dimension2d<f32>& CBillboardSceneNode::getSize() const +{ + return Size; +} + + +//! Gets the widths of the top and bottom edges of the billboard. +void CBillboardSceneNode::getSize(f32& height, f32& bottomEdgeWidth, + f32& topEdgeWidth) const +{ + height = Size.Height; + bottomEdgeWidth = Size.Width; + topEdgeWidth = TopEdgeWidth; +} + + +//! Writes attributes of the scene node. +void CBillboardSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IBillboardSceneNode::serializeAttributes(out, options); + + out->addFloat("Width", Size.Width); + out->addFloat("TopEdgeWidth", TopEdgeWidth); + out->addFloat("Height", Size.Height); + out->addColor("Shade_Top", vertices[1].Color); + out->addColor("Shade_Down", vertices[0].Color); +} + + +//! Reads attributes of the scene node. +void CBillboardSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + IBillboardSceneNode::deserializeAttributes(in, options); + + Size.Width = in->getAttributeAsFloat("Width"); + Size.Height = in->getAttributeAsFloat("Height"); + + if (in->existsAttribute("TopEdgeWidth")) + { + TopEdgeWidth = in->getAttributeAsFloat("TopEdgeWidth"); + if (Size.Width != TopEdgeWidth) + setSize(Size.Height, Size.Width, TopEdgeWidth); + } + else + setSize(Size); + vertices[1].Color = in->getAttributeAsColor("Shade_Top"); + vertices[0].Color = in->getAttributeAsColor("Shade_Down"); + vertices[2].Color = vertices[1].Color; + vertices[3].Color = vertices[0].Color; +} + + +//! Set the color of all vertices of the billboard +//! \param overallColor: the color to set +void CBillboardSceneNode::setColor(const video::SColor& overallColor) +{ + for(u32 vertex = 0; vertex < 4; ++vertex) + vertices[vertex].Color = overallColor; +} + + +//! Set the color of the top and bottom vertices of the billboard +//! \param topColor: the color to set the top vertices +//! \param bottomColor: the color to set the bottom vertices +void CBillboardSceneNode::setColor(const video::SColor& topColor, + const video::SColor& bottomColor) +{ + vertices[0].Color = bottomColor; + vertices[1].Color = topColor; + vertices[2].Color = topColor; + vertices[3].Color = bottomColor; +} + + +//! Gets the color of the top and bottom vertices of the billboard +//! \param[out] topColor: stores the color of the top vertices +//! \param[out] bottomColor: stores the color of the bottom vertices +void CBillboardSceneNode::getColor(video::SColor& topColor, + video::SColor& bottomColor) const +{ + bottomColor = vertices[0].Color; + topColor = vertices[1].Color; +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CBillboardSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CBillboardSceneNode* nb = new CBillboardSceneNode(newParent, + newManager, ID, RelativeTranslation, Size); + + nb->cloneMembers(this, newManager); + nb->Material = Material; + nb->TopEdgeWidth = this->TopEdgeWidth; + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.h new file mode 100644 index 0000000..416b6ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBillboardSceneNode.h @@ -0,0 +1,99 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_BILLBOARD_SCENE_NODE_H_INCLUDED__ +#define __C_BILLBOARD_SCENE_NODE_H_INCLUDED__ + +#include "IBillboardSceneNode.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace scene +{ + +//! Scene node which is a billboard. A billboard is like a 3d sprite: A 2d element, +//! which always looks to the camera. +class CBillboardSceneNode : virtual public IBillboardSceneNode +{ +public: + + //! constructor + CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::dimension2d<f32>& size, + video::SColor colorTop=video::SColor(0xFFFFFFFF), + video::SColor colorBottom=video::SColor(0xFFFFFFFF)); + + //! pre render event + virtual void OnRegisterSceneNode(); + + //! render + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! sets the size of the billboard + virtual void setSize(const core::dimension2d<f32>& size); + + //! Sets the widths of the top and bottom edges of the billboard independently. + virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth); + + //! gets the size of the billboard + virtual const core::dimension2d<f32>& getSize() const; + + //! Gets the widths of the top and bottom edges of the billboard. + virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const; + + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Set the color of all vertices of the billboard + //! \param overallColor: the color to set + virtual void setColor(const video::SColor& overallColor); + + //! Set the color of the top and bottom vertices of the billboard + //! \param topColor: the color to set the top vertices + //! \param bottomColor: the color to set the bottom vertices + virtual void setColor(const video::SColor& topColor, + const video::SColor& bottomColor); + + //! Gets the color of the top and bottom vertices of the billboard + //! \param[out] topColor: stores the color of the top vertices + //! \param[out] bottomColor: stores the color of the bottom vertices + virtual void getColor(video::SColor& topColor, + video::SColor& bottomColor) const; + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_BILLBOARD; } + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + +private: + + //! Size.Width is the bottom edge width + core::dimension2d<f32> Size; + f32 TopEdgeWidth; + core::aabbox3d<f32> BBox; + video::SMaterial Material; + + video::S3DVertex vertices[4]; + u16 indices[6]; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBlit.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CBlit.h new file mode 100644 index 0000000..a8572e9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBlit.h @@ -0,0 +1,1273 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_BLIT_H_INCLUDED_ +#define _C_BLIT_H_INCLUDED_ + +#include "SoftwareDriver2_helper.h" + +namespace irr +{ + + struct SBlitJob + { + AbsRectangle Dest; + AbsRectangle Source; + + u32 argb; + + void * src; + void * dst; + + s32 width; + s32 height; + + u32 srcPitch; + u32 dstPitch; + + u32 srcPixelMul; + u32 dstPixelMul; + + bool stretch; + float x_stretch; + float y_stretch; + + SBlitJob() : stretch(false) {} + }; + + // Bitfields Cohen Sutherland + enum eClipCode + { + CLIPCODE_EMPTY = 0, + CLIPCODE_BOTTOM = 1, + CLIPCODE_TOP = 2, + CLIPCODE_LEFT = 4, + CLIPCODE_RIGHT = 8 + }; + +inline u32 GetClipCode( const AbsRectangle &r, const core::position2d<s32> &p ) +{ + u32 code = CLIPCODE_EMPTY; + + if ( p.X < r.x0 ) + code = CLIPCODE_LEFT; + else + if ( p.X > r.x1 ) + code = CLIPCODE_RIGHT; + + if ( p.Y < r.y0 ) + code |= CLIPCODE_TOP; + else + if ( p.Y > r.y1 ) + code |= CLIPCODE_BOTTOM; + + return code; +} + + +/*! + Cohen Sutherland clipping + @return: 1 if valid +*/ + +static int ClipLine(const AbsRectangle &clipping, + core::position2d<s32> &p0, + core::position2d<s32> &p1, + const core::position2d<s32>& p0_in, + const core::position2d<s32>& p1_in) +{ + u32 code0; + u32 code1; + u32 code; + + p0 = p0_in; + p1 = p1_in; + + code0 = GetClipCode( clipping, p0 ); + code1 = GetClipCode( clipping, p1 ); + + // trivial accepted + while ( code0 | code1 ) + { + s32 x=0; + s32 y=0; + + // trivial reject + if ( code0 & code1 ) + return 0; + + if ( code0 ) + { + // clip first point + code = code0; + } + else + { + // clip last point + code = code1; + } + + if ( (code & CLIPCODE_BOTTOM) == CLIPCODE_BOTTOM ) + { + // clip bottom viewport + y = clipping.y1; + x = p0.X + ( p1.X - p0.X ) * ( y - p0.Y ) / ( p1.Y - p0.Y ); + } + else + if ( (code & CLIPCODE_TOP) == CLIPCODE_TOP ) + { + // clip to viewport + y = clipping.y0; + x = p0.X + ( p1.X - p0.X ) * ( y - p0.Y ) / ( p1.Y - p0.Y ); + } + else + if ( (code & CLIPCODE_RIGHT) == CLIPCODE_RIGHT ) + { + // clip right viewport + x = clipping.x1; + y = p0.Y + ( p1.Y - p0.Y ) * ( x - p0.X ) / ( p1.X - p0.X ); + } + else + if ( (code & CLIPCODE_LEFT) == CLIPCODE_LEFT ) + { + // clip left viewport + x = clipping.x0; + y = p0.Y + ( p1.Y - p0.Y ) * ( x - p0.X ) / ( p1.X - p0.X ); + } + + if ( code == code0 ) + { + // modify first point + p0.X = x; + p0.Y = y; + code0 = GetClipCode( clipping, p0 ); + } + else + { + // modify second point + p1.X = x; + p1.Y = y; + code1 = GetClipCode( clipping, p1 ); + } + } + + return 1; +} + +/* +*/ +inline void GetClip(AbsRectangle &clipping, video::IImage * t) +{ + clipping.x0 = 0; + clipping.y0 = 0; + clipping.x1 = t->getDimension().Width - 1; + clipping.y1 = t->getDimension().Height - 1; +} + +/* + return alpha in [0;256] Granularity from 32-Bit ARGB + add highbit alpha ( alpha > 127 ? + 1 ) +*/ +static inline u32 extractAlpha(const u32 c) +{ + return ( c >> 24 ) + ( c >> 31 ); +} + +/* + return alpha in [0;255] Granularity and 32-Bit ARGB + add highbit alpha ( alpha > 127 ? + 1 ) +*/ +static inline u32 packAlpha(const u32 c) +{ + return (c > 127 ? c - 1 : c) << 24; +} + + +/*! + Scale Color by (1/value) + value 0 - 256 ( alpha ) +*/ +inline u32 PixelLerp32(const u32 source, const u32 value) +{ + u32 srcRB = source & 0x00FF00FF; + u32 srcXG = (source & 0xFF00FF00) >> 8; + + srcRB *= value; + srcXG *= value; + + srcRB >>= 8; + //srcXG >>= 8; + + srcXG &= 0xFF00FF00; + srcRB &= 0x00FF00FF; + + return srcRB | srcXG; +} + + +/* +*/ +static void RenderLine32_Decal(video::IImage *t, + const core::position2d<s32> &p0, + const core::position2d<s32> &p1, + u32 argb ) +{ + s32 dx = p1.X - p0.X; + s32 dy = p1.Y - p0.Y; + + s32 c; + s32 m; + s32 d = 0; + s32 run; + + s32 xInc = 4; + s32 yInc = (s32) t->getPitch(); + + if ( dx < 0 ) + { + xInc = -xInc; + dx = -dx; + } + + if ( dy < 0 ) + { + yInc = -yInc; + dy = -dy; + } + + u32 *dst; + dst = (u32*) ( (u8*) t->lock() + ( p0.Y * t->getPitch() ) + ( p0.X << 2 ) ); + + if ( dy > dx ) + { + s32 tmp; + tmp = dx; + dx = dy; + dy = tmp; + tmp = xInc; + xInc = yInc; + yInc = tmp; + } + + c = dx << 1; + m = dy << 1; + + run = dx; + do + { + *dst = argb; + + dst = (u32*) ( (u8*) dst + xInc ); // x += xInc + d += m; + if ( d > dx ) + { + dst = (u32*) ( (u8*) dst + yInc ); // y += yInc + d -= c; + } + run -= 1; + } while (run>=0); + + t->unlock(); +} + + +/* +*/ +static void RenderLine32_Blend(video::IImage *t, + const core::position2d<s32> &p0, + const core::position2d<s32> &p1, + u32 argb, u32 alpha) +{ + s32 dx = p1.X - p0.X; + s32 dy = p1.Y - p0.Y; + + s32 c; + s32 m; + s32 d = 0; + s32 run; + + s32 xInc = 4; + s32 yInc = (s32) t->getPitch(); + + if ( dx < 0 ) + { + xInc = -xInc; + dx = -dx; + } + + if ( dy < 0 ) + { + yInc = -yInc; + dy = -dy; + } + + u32 *dst; + dst = (u32*) ( (u8*) t->lock() + ( p0.Y * t->getPitch() ) + ( p0.X << 2 ) ); + + if ( dy > dx ) + { + s32 tmp; + tmp = dx; + dx = dy; + dy = tmp; + tmp = xInc; + xInc = yInc; + yInc = tmp; + } + + c = dx << 1; + m = dy << 1; + + run = dx; + const u32 packA = packAlpha ( alpha ); + do + { + *dst = packA | PixelBlend32( *dst, argb, alpha ); + + dst = (u32*) ( (u8*) dst + xInc ); // x += xInc + d += m; + if ( d > dx ) + { + dst = (u32*) ( (u8*) dst + yInc ); // y += yInc + d -= c; + } + run -= 1; + } while (run>=0); + + t->unlock(); +} + +/* +*/ +static void RenderLine16_Decal(video::IImage *t, + const core::position2d<s32> &p0, + const core::position2d<s32> &p1, + u32 argb ) +{ + s32 dx = p1.X - p0.X; + s32 dy = p1.Y - p0.Y; + + s32 c; + s32 m; + s32 d = 0; + s32 run; + + s32 xInc = 2; + s32 yInc = (s32) t->getPitch(); + + if ( dx < 0 ) + { + xInc = -xInc; + dx = -dx; + } + + if ( dy < 0 ) + { + yInc = -yInc; + dy = -dy; + } + + u16 *dst; + dst = (u16*) ( (u8*) t->lock() + ( p0.Y * t->getPitch() ) + ( p0.X << 1 ) ); + + if ( dy > dx ) + { + s32 tmp; + tmp = dx; + dx = dy; + dy = tmp; + tmp = xInc; + xInc = yInc; + yInc = tmp; + } + + c = dx << 1; + m = dy << 1; + + run = dx; + do + { + *dst = (u16)argb; + + dst = (u16*) ( (u8*) dst + xInc ); // x += xInc + d += m; + if ( d > dx ) + { + dst = (u16*) ( (u8*) dst + yInc ); // y += yInc + d -= c; + } + run -= 1; + } while (run>=0); + + t->unlock(); +} + +/* +*/ +static void RenderLine16_Blend(video::IImage *t, + const core::position2d<s32> &p0, + const core::position2d<s32> &p1, + u16 argb, + u16 alpha) +{ + s32 dx = p1.X - p0.X; + s32 dy = p1.Y - p0.Y; + + s32 c; + s32 m; + s32 d = 0; + s32 run; + + s32 xInc = 2; + s32 yInc = (s32) t->getPitch(); + + if ( dx < 0 ) + { + xInc = -xInc; + dx = -dx; + } + + if ( dy < 0 ) + { + yInc = -yInc; + dy = -dy; + } + + u16 *dst; + dst = (u16*) ( (u8*) t->lock() + ( p0.Y * t->getPitch() ) + ( p0.X << 1 ) ); + + if ( dy > dx ) + { + s32 tmp; + tmp = dx; + dx = dy; + dy = tmp; + tmp = xInc; + xInc = yInc; + yInc = tmp; + } + + c = dx << 1; + m = dy << 1; + + run = dx; + const u16 packA = alpha ? 0x8000 : 0; + do + { + *dst = packA | PixelBlend16( *dst, argb, alpha ); + + dst = (u16*) ( (u8*) dst + xInc ); // x += xInc + d += m; + if ( d > dx ) + { + dst = (u16*) ( (u8*) dst + yInc ); // y += yInc + d -= c; + } + run -= 1; + } while (run>=0); + + t->unlock(); +} + + +/*! +*/ +static void executeBlit_TextureCopy_x_to_x( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + if (job->stretch) + { + const u32 *src = static_cast<const u32*>(job->src); + u32 *dst = static_cast<u32*>(job->dst); + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y ); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u32 src_x = (u32)(dx*wscale); + dst[dx] = src[src_x]; + } + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + const u32 widthPitch = job->width * job->dstPixelMul; + const void *src = (void*) job->src; + void *dst = (void*) job->dst; + + for ( u32 dy = 0; dy != h; ++dy ) + { + memcpy( dst, src, widthPitch ); + + src = (void*) ( (u8*) (src) + job->srcPitch ); + dst = (void*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + +/*! +*/ +static void executeBlit_TextureCopy_32_to_16( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u32 *src = static_cast<const u32*>(job->src); + u16 *dst = static_cast<u16*>(job->dst); + + if (job->stretch) + { + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y ); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u32 src_x = (u32)(dx*wscale); + //16 bit Blitter depends on pre-multiplied color + const u32 s = PixelLerp32( src[src_x] | 0xFF000000, extractAlpha( src[src_x] ) ); + dst[dx] = video::A8R8G8B8toA1R5G5B5( s ); + } + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + for ( u32 dy = 0; dy != h; ++dy ) + { + for ( u32 dx = 0; dx != w; ++dx ) + { + //16 bit Blitter depends on pre-multiplied color + const u32 s = PixelLerp32( src[dx] | 0xFF000000, extractAlpha( src[dx] ) ); + dst[dx] = video::A8R8G8B8toA1R5G5B5( s ); + } + + src = (u32*) ( (u8*) (src) + job->srcPitch ); + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + +/*! +*/ +static void executeBlit_TextureCopy_24_to_16( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u8 *src = static_cast<const u8*>(job->src); + u16 *dst = static_cast<u16*>(job->dst); + + if (job->stretch) + { + const float wscale = 3.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u8*)(job->src) + job->srcPitch*src_y; + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u8* src_x = src+(u32)(dx*wscale); + dst[dx] = video::RGBA16(src_x[0], src_x[1], src_x[2]); + } + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + for ( u32 dy = 0; dy != h; ++dy ) + { + const u8* s = src; + for ( u32 dx = 0; dx != w; ++dx ) + { + dst[dx] = video::RGBA16(s[0], s[1], s[2]); + s += 3; + } + + src = src+job->srcPitch; + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + + +/*! +*/ +static void executeBlit_TextureCopy_16_to_32( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u16 *src = static_cast<const u16*>(job->src); + u32 *dst = static_cast<u32*>(job->dst); + + if (job->stretch) + { + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u16*) ( (u8*) (job->src) + job->srcPitch*src_y ); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u32 src_x = (u32)(dx*wscale); + dst[dx] = video::A1R5G5B5toA8R8G8B8(src[src_x]); + } + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + for ( u32 dy = 0; dy != h; ++dy ) + { + for ( u32 dx = 0; dx != w; ++dx ) + { + dst[dx] = video::A1R5G5B5toA8R8G8B8( src[dx] ); + } + + src = (u16*) ( (u8*) (src) + job->srcPitch ); + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + +static void executeBlit_TextureCopy_16_to_24( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u16 *src = static_cast<const u16*>(job->src); + u8 *dst = static_cast<u8*>(job->dst); + + if (job->stretch) + { + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u16*) ( (u8*) (job->src) + job->srcPitch*src_y ); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u32 src_x = (u32)(dx*wscale); + u32 color = video::A1R5G5B5toA8R8G8B8(src[src_x]); + u8 * writeTo = &dst[dx * 3]; + *writeTo++ = (color >> 16)& 0xFF; + *writeTo++ = (color >> 8) & 0xFF; + *writeTo++ = color & 0xFF; + } + dst += job->dstPitch; + } + } + else + { + for ( u32 dy = 0; dy != h; ++dy ) + { + for ( u32 dx = 0; dx != w; ++dx ) + { + u32 color = video::A1R5G5B5toA8R8G8B8(src[dx]); + u8 * writeTo = &dst[dx * 3]; + *writeTo++ = (color >> 16)& 0xFF; + *writeTo++ = (color >> 8) & 0xFF; + *writeTo++ = color & 0xFF; + } + + src = (u16*) ( (u8*) (src) + job->srcPitch ); + dst += job->dstPitch; + } + } +} + +/*! +*/ +static void executeBlit_TextureCopy_24_to_32( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u8 *src = static_cast<const u8*>(job->src); + u32 *dst = static_cast<u32*>(job->dst); + + if (job->stretch) + { + const float wscale = 3.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (const u8*)job->src+(job->srcPitch*src_y); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u8* s = src+(u32)(dx*wscale); + dst[dx] = 0xFF000000 | s[0] << 16 | s[1] << 8 | s[2]; + } + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + for ( s32 dy = 0; dy != job->height; ++dy ) + { + const u8* s = src; + + for ( s32 dx = 0; dx != job->width; ++dx ) + { + dst[dx] = 0xFF000000 | s[0] << 16 | s[1] << 8 | s[2]; + s += 3; + } + + src = src + job->srcPitch; + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + +static void executeBlit_TextureCopy_32_to_24( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u32 *src = static_cast<const u32*>(job->src); + u8 *dst = static_cast<u8*>(job->dst); + + if (job->stretch) + { + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u32 src_x = src[(u32)(dx*wscale)]; + u8 * writeTo = &dst[dx * 3]; + *writeTo++ = (src_x >> 16)& 0xFF; + *writeTo++ = (src_x >> 8) & 0xFF; + *writeTo++ = src_x & 0xFF; + } + dst += job->dstPitch; + } + } + else + { + for ( u32 dy = 0; dy != h; ++dy ) + { + for ( u32 dx = 0; dx != w; ++dx ) + { + u8 * writeTo = &dst[dx * 3]; + *writeTo++ = (src[dx] >> 16)& 0xFF; + *writeTo++ = (src[dx] >> 8) & 0xFF; + *writeTo++ = src[dx] & 0xFF; + } + + src = (u32*) ( (u8*) (src) + job->srcPitch ); + dst += job->dstPitch; + } + } +} + +/*! +*/ +static void executeBlit_TextureBlend_16_to_16( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u32 rdx = w>>1; + + const u32 *src = (u32*) job->src; + u32 *dst = (u32*) job->dst; + + if (job->stretch) + { + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + const u32 off = core::if_c_a_else_b(w&1, (u32)((w-1)*wscale), 0); + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y ); + + for ( u32 dx = 0; dx < rdx; ++dx ) + { + const u32 src_x = (u32)(dx*wscale); + dst[dx] = PixelBlend16_simd( dst[dx], src[src_x] ); + } + if ( off ) + { + ((u16*) dst)[off] = PixelBlend16( ((u16*) dst)[off], ((u16*) src)[off] ); + } + + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + const u32 off = core::if_c_a_else_b(w&1, w-1, 0); + for (u32 dy = 0; dy != h; ++dy ) + { + for (u32 dx = 0; dx != rdx; ++dx ) + { + dst[dx] = PixelBlend16_simd( dst[dx], src[dx] ); + } + + if ( off ) + { + ((u16*) dst)[off] = PixelBlend16( ((u16*) dst)[off], ((u16*) src)[off] ); + } + + src = (u32*) ( (u8*) (src) + job->srcPitch ); + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + +/*! +*/ +static void executeBlit_TextureBlend_32_to_32( const SBlitJob * job ) +{ + const u32 w = job->width; + const u32 h = job->height; + const u32 *src = (u32*) job->src; + u32 *dst = (u32*) job->dst; + + if (job->stretch) + { + const float wscale = 1.f/job->x_stretch; + const float hscale = 1.f/job->y_stretch; + for ( u32 dy = 0; dy < h; ++dy ) + { + const u32 src_y = (u32)(dy*hscale); + src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y ); + + for ( u32 dx = 0; dx < w; ++dx ) + { + const u32 src_x = (u32)(dx*wscale); + dst[dx] = PixelBlend32( dst[dx], src[src_x] ); + } + + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } + else + { + for ( u32 dy = 0; dy != h; ++dy ) + { + for ( u32 dx = 0; dx != w; ++dx ) + { + dst[dx] = PixelBlend32( dst[dx], src[dx] ); + } + src = (u32*) ( (u8*) (src) + job->srcPitch ); + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } + } +} + +/*! +*/ +static void executeBlit_TextureBlendColor_16_to_16( const SBlitJob * job ) +{ + u16 *src = (u16*) job->src; + u16 *dst = (u16*) job->dst; + + u16 blend = video::A8R8G8B8toA1R5G5B5 ( job->argb ); + for ( s32 dy = 0; dy != job->height; ++dy ) + { + for ( s32 dx = 0; dx != job->width; ++dx ) + { + if ( 0 == (src[dx] & 0x8000) ) + continue; + + dst[dx] = PixelMul16_2( src[dx], blend ); + } + src = (u16*) ( (u8*) (src) + job->srcPitch ); + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } +} + + +/*! +*/ +static void executeBlit_TextureBlendColor_32_to_32( const SBlitJob * job ) +{ + u32 *src = (u32*) job->src; + u32 *dst = (u32*) job->dst; + + for ( s32 dy = 0; dy != job->height; ++dy ) + { + for ( s32 dx = 0; dx != job->width; ++dx ) + { + dst[dx] = PixelBlend32( dst[dx], PixelMul32_2( src[dx], job->argb ) ); + } + src = (u32*) ( (u8*) (src) + job->srcPitch ); + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } +} + +/*! +*/ +static void executeBlit_Color_16_to_16( const SBlitJob * job ) +{ + const u16 c = video::A8R8G8B8toA1R5G5B5(job->argb); + u16 *dst = (u16*) job->dst; + + for ( s32 dy = 0; dy != job->height; ++dy ) + { + memset16(dst, c, job->srcPitch); + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } +} + +/*! +*/ +static void executeBlit_Color_32_to_32( const SBlitJob * job ) +{ + u32 *dst = (u32*) job->dst; + + for ( s32 dy = 0; dy != job->height; ++dy ) + { + memset32( dst, job->argb, job->srcPitch ); + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } +} + +/*! +*/ +static void executeBlit_ColorAlpha_16_to_16( const SBlitJob * job ) +{ + u16 *dst = (u16*) job->dst; + + const u16 alpha = extractAlpha( job->argb ) >> 3; + if ( 0 == alpha ) + return; + const u32 src = video::A8R8G8B8toA1R5G5B5( job->argb ); + + for ( s32 dy = 0; dy != job->height; ++dy ) + { + for ( s32 dx = 0; dx != job->width; ++dx ) + { + dst[dx] = 0x8000 | PixelBlend16( dst[dx], src, alpha ); + } + dst = (u16*) ( (u8*) (dst) + job->dstPitch ); + } +} + +/*! +*/ +static void executeBlit_ColorAlpha_32_to_32( const SBlitJob * job ) +{ + u32 *dst = (u32*) job->dst; + + const u32 alpha = extractAlpha( job->argb ); + const u32 src = job->argb; + + for ( s32 dy = 0; dy != job->height; ++dy ) + { + for ( s32 dx = 0; dx != job->width; ++dx ) + { + dst[dx] = (job->argb & 0xFF000000 ) | PixelBlend32( dst[dx], src, alpha ); + } + dst = (u32*) ( (u8*) (dst) + job->dstPitch ); + } +} + +// Blitter Operation +enum eBlitter +{ + BLITTER_INVALID = 0, + BLITTER_COLOR, + BLITTER_COLOR_ALPHA, + BLITTER_TEXTURE, + BLITTER_TEXTURE_ALPHA_BLEND, + BLITTER_TEXTURE_ALPHA_COLOR_BLEND +}; + +typedef void (*tExecuteBlit) ( const SBlitJob * job ); + + +/*! +*/ +struct blitterTable +{ + eBlitter operation; + s32 destFormat; + s32 sourceFormat; + tExecuteBlit func; +}; + +static const blitterTable blitTable[] = +{ + { BLITTER_TEXTURE, -2, -2, executeBlit_TextureCopy_x_to_x }, + { BLITTER_TEXTURE, video::ECF_A1R5G5B5, video::ECF_A8R8G8B8, executeBlit_TextureCopy_32_to_16 }, + { BLITTER_TEXTURE, video::ECF_A1R5G5B5, video::ECF_R8G8B8, executeBlit_TextureCopy_24_to_16 }, + { BLITTER_TEXTURE, video::ECF_A8R8G8B8, video::ECF_A1R5G5B5, executeBlit_TextureCopy_16_to_32 }, + { BLITTER_TEXTURE, video::ECF_A8R8G8B8, video::ECF_R8G8B8, executeBlit_TextureCopy_24_to_32 }, + { BLITTER_TEXTURE, video::ECF_R8G8B8, video::ECF_A1R5G5B5, executeBlit_TextureCopy_16_to_24 }, + { BLITTER_TEXTURE, video::ECF_R8G8B8, video::ECF_A8R8G8B8, executeBlit_TextureCopy_32_to_24 }, + { BLITTER_TEXTURE_ALPHA_BLEND, video::ECF_A1R5G5B5, video::ECF_A1R5G5B5, executeBlit_TextureBlend_16_to_16 }, + { BLITTER_TEXTURE_ALPHA_BLEND, video::ECF_A8R8G8B8, video::ECF_A8R8G8B8, executeBlit_TextureBlend_32_to_32 }, + { BLITTER_TEXTURE_ALPHA_COLOR_BLEND, video::ECF_A1R5G5B5, video::ECF_A1R5G5B5, executeBlit_TextureBlendColor_16_to_16 }, + { BLITTER_TEXTURE_ALPHA_COLOR_BLEND, video::ECF_A8R8G8B8, video::ECF_A8R8G8B8, executeBlit_TextureBlendColor_32_to_32 }, + { BLITTER_COLOR, video::ECF_A1R5G5B5, -1, executeBlit_Color_16_to_16 }, + { BLITTER_COLOR, video::ECF_A8R8G8B8, -1, executeBlit_Color_32_to_32 }, + { BLITTER_COLOR_ALPHA, video::ECF_A1R5G5B5, -1, executeBlit_ColorAlpha_16_to_16 }, + { BLITTER_COLOR_ALPHA, video::ECF_A8R8G8B8, -1, executeBlit_ColorAlpha_32_to_32 }, + { BLITTER_INVALID, -1, -1, 0 } +}; + + +static inline tExecuteBlit getBlitter2( eBlitter operation,const video::IImage * dest,const video::IImage * source ) +{ + video::ECOLOR_FORMAT sourceFormat = (video::ECOLOR_FORMAT) ( source ? source->getColorFormat() : -1 ); + video::ECOLOR_FORMAT destFormat = (video::ECOLOR_FORMAT) ( dest ? dest->getColorFormat() : -1 ); + + const blitterTable * b = blitTable; + + while ( b->operation != BLITTER_INVALID ) + { + if ( b->operation == operation ) + { + if (( b->destFormat == -1 || b->destFormat == destFormat ) && + ( b->sourceFormat == -1 || b->sourceFormat == sourceFormat ) ) + return b->func; + else + if ( b->destFormat == -2 && ( sourceFormat == destFormat ) ) + return b->func; + } + b += 1; + } + return 0; +} + + +// bounce clipping to texture +inline void setClip ( AbsRectangle &out, const core::rect<s32> *clip, + const video::IImage * tex, s32 passnative ) +{ + if ( clip && 0 == tex && passnative ) + { + out.x0 = clip->UpperLeftCorner.X; + out.x1 = clip->LowerRightCorner.X; + out.y0 = clip->UpperLeftCorner.Y; + out.y1 = clip->LowerRightCorner.Y; + return; + } + + const s32 w = tex ? tex->getDimension().Width : 0; + const s32 h = tex ? tex->getDimension().Height : 0; + if ( clip ) + { + out.x0 = core::s32_clamp ( clip->UpperLeftCorner.X, 0, w ); + out.x1 = core::s32_clamp ( clip->LowerRightCorner.X, out.x0, w ); + out.y0 = core::s32_clamp ( clip->UpperLeftCorner.Y, 0, h ); + out.y1 = core::s32_clamp ( clip->LowerRightCorner.Y, out.y0, h ); + } + else + { + out.x0 = 0; + out.y0 = 0; + out.x1 = w; + out.y1 = h; + } + +} + +/*! + a generic 2D Blitter +*/ +static s32 Blit(eBlitter operation, + video::IImage * dest, + const core::rect<s32> *destClipping, + const core::position2d<s32> *destPos, + video::IImage * const source, + const core::rect<s32> *sourceClipping, + u32 argb) +{ + tExecuteBlit blitter = getBlitter2( operation, dest, source ); + if ( 0 == blitter ) + { + return 0; + } + + // Clipping + AbsRectangle sourceClip; + AbsRectangle destClip; + AbsRectangle v; + + SBlitJob job; + + setClip ( sourceClip, sourceClipping, source, 1 ); + setClip ( destClip, destClipping, dest, 0 ); + + v.x0 = destPos ? destPos->X : 0; + v.y0 = destPos ? destPos->Y : 0; + v.x1 = v.x0 + ( sourceClip.x1 - sourceClip.x0 ); + v.y1 = v.y0 + ( sourceClip.y1 - sourceClip.y0 ); + + if ( !intersect( job.Dest, destClip, v ) ) + return 0; + + job.width = job.Dest.x1 - job.Dest.x0; + job.height = job.Dest.y1 - job.Dest.y0; + + job.Source.x0 = sourceClip.x0 + ( job.Dest.x0 - v.x0 ); + job.Source.x1 = job.Source.x0 + job.width; + job.Source.y0 = sourceClip.y0 + ( job.Dest.y0 - v.y0 ); + job.Source.y1 = job.Source.y0 + job.height; + + job.argb = argb; + + if ( source ) + { + job.srcPitch = source->getPitch(); + job.srcPixelMul = source->getBytesPerPixel(); + job.src = (void*) ( (u8*) source->lock() + ( job.Source.y0 * job.srcPitch ) + ( job.Source.x0 * job.srcPixelMul ) ); + } + else + { + // use srcPitch for color operation on dest + job.srcPitch = job.width * dest->getBytesPerPixel(); + } + + job.dstPitch = dest->getPitch(); + job.dstPixelMul = dest->getBytesPerPixel(); + job.dst = (void*) ( (u8*) dest->lock() + ( job.Dest.y0 * job.dstPitch ) + ( job.Dest.x0 * job.dstPixelMul ) ); + + blitter( &job ); + + if ( source ) + source->unlock(); + + if ( dest ) + dest->unlock(); + + return 1; +} + +static s32 StretchBlit(eBlitter operation, + video::IImage* dest, const core::rect<s32> *destRect, + const core::rect<s32> *srcRect, video::IImage* const source, + u32 argb) +{ + tExecuteBlit blitter = getBlitter2( operation, dest, source ); + if ( 0 == blitter ) + { + return 0; + } + + SBlitJob job; + + // Clipping + setClip ( job.Source, srcRect, source, 1 ); + setClip ( job.Dest, destRect, dest, 0 ); + + job.width = job.Dest.x1-job.Dest.x0; + job.height = job.Dest.y1-job.Dest.y0; + + job.argb = argb; + + // use original dest size, despite any clipping + job.x_stretch = (float)destRect->getWidth() / (float)(job.Source.x1-job.Source.x0); + job.y_stretch = (float)destRect->getHeight() / (float)(job.Source.y1-job.Source.y0); + job.stretch = (job.x_stretch != 1.f) || (job.y_stretch != 1.f); + + if ( source ) + { + job.srcPitch = source->getPitch(); + job.srcPixelMul = source->getBytesPerPixel(); + job.src = (void*) ( (u8*) source->lock() + ( job.Source.y0 * job.srcPitch ) + ( job.Source.x0 * job.srcPixelMul ) ); + } + else + { + // use srcPitch for color operation on dest + job.srcPitch = job.width * dest->getBytesPerPixel(); + } + + job.dstPitch = dest->getPitch(); + job.dstPixelMul = dest->getBytesPerPixel(); + job.dst = (void*) ( (u8*) dest->lock() + ( job.Dest.y0 * job.dstPitch ) + ( job.Dest.x0 * job.dstPixelMul ) ); + + blitter( &job ); + + if ( source ) + source->unlock(); + + if ( dest ) + dest->unlock(); + + return 1; +} + + +// Methods for Software drivers +//! draws a rectangle +static void drawRectangle(video::IImage* img, const core::rect<s32>& rect, const video::SColor &color) +{ + Blit(color.getAlpha() == 0xFF ? BLITTER_COLOR : BLITTER_COLOR_ALPHA, + img, 0, &rect.UpperLeftCorner, 0, &rect, color.color); +} + + +//! draws a line from to with color +static void drawLine(video::IImage* img, const core::position2d<s32>& from, + const core::position2d<s32>& to, const video::SColor &color) +{ + AbsRectangle clip; + GetClip(clip, img); + + core::position2d<s32> p[2]; + if (ClipLine( clip, p[0], p[1], from, to)) + { + u32 alpha = extractAlpha(color.color); + + switch(img->getColorFormat()) + { + case video::ECF_A1R5G5B5: + if (alpha == 256) + { + RenderLine16_Decal(img, p[0], p[1], video::A8R8G8B8toA1R5G5B5(color.color)); + } + else + { + RenderLine16_Blend(img, p[0], p[1], video::A8R8G8B8toA1R5G5B5(color.color), alpha >> 3); + } + break; + case video::ECF_A8R8G8B8: + if (alpha == 256) + { + RenderLine32_Decal(img, p[0], p[1], color.color); + } + else + { + RenderLine32_Blend(img, p[0], p[1], color.color, alpha); + } + break; + default: + break; + } + } +} + + +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.cpp new file mode 100644 index 0000000..af54011 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.cpp @@ -0,0 +1,129 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + +#include "CBoneSceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CBoneSceneNode::CBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + u32 boneIndex, const c8* boneName) +: IBoneSceneNode(parent, mgr, id), BoneIndex(boneIndex), + AnimationMode(EBAM_AUTOMATIC), SkinningSpace(EBSS_LOCAL) +{ + #ifdef _DEBUG + setDebugName("CBoneSceneNode"); + #endif + setName(boneName); +} + + +//! Returns the index of the bone +u32 CBoneSceneNode::getBoneIndex() const +{ + return BoneIndex; +} + + +//! Sets the animation mode of the bone. Returns true if successful. +bool CBoneSceneNode::setAnimationMode(E_BONE_ANIMATION_MODE mode) +{ + AnimationMode = mode; + return true; +} + + +//! Gets the current animation mode of the bone +E_BONE_ANIMATION_MODE CBoneSceneNode::getAnimationMode() const +{ + return AnimationMode; +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CBoneSceneNode::getBoundingBox() const +{ + return Box; +} + + +/* +//! Returns the relative transformation of the scene node. +core::matrix4 CBoneSceneNode::getRelativeTransformation() const +{ + return core::matrix4(); // RelativeTransformation; +} +*/ + + +void CBoneSceneNode::OnAnimate(u32 timeMs) +{ + if (IsVisible) + { + // animate this node with all animators + + ISceneNodeAnimatorList::Iterator ait = Animators.begin(); + for (; ait != Animators.end(); ++ait) + (*ait)->animateNode(this, timeMs); + + // update absolute position + //updateAbsolutePosition(); + + // perform the post render process on all children + ISceneNodeList::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + (*it)->OnAnimate(timeMs); + } +} + + +void CBoneSceneNode::helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node) +{ + Node->updateAbsolutePosition(); + + ISceneNodeList::ConstIterator it = Node->getChildren().begin(); + for (; it != Node->getChildren().end(); ++it) + { + helper_updateAbsolutePositionOfAllChildren( (*it) ); + } +} + + +void CBoneSceneNode::updateAbsolutePositionOfAllChildren() +{ + helper_updateAbsolutePositionOfAllChildren( this ); +} + + +void CBoneSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IBoneSceneNode::serializeAttributes(out, options); + out->addInt("BoneIndex", BoneIndex); + out->addEnum("AnimationMode", AnimationMode, BoneAnimationModeNames); +} + + +void CBoneSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + BoneIndex = in->getAttributeAsInt("BoneIndex"); + AnimationMode = (E_BONE_ANIMATION_MODE)in->getAttributeAsEnumeration("AnimationMode", BoneAnimationModeNames); + // for legacy files (before 1.5) + const core::stringc boneName = in->getAttributeAsString("BoneName"); + setName(boneName); + IBoneSceneNode::deserializeAttributes(in, options); + // TODO: add/replace bone in parent with bone from mesh +} + + +} // namespace scene +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.h new file mode 100644 index 0000000..79b94ef --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBoneSceneNode.h @@ -0,0 +1,79 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_BONE_SCENE_NODE_H_INCLUDED__ +#define __C_BONE_SCENE_NODE_H_INCLUDED__ + +// Used with SkinnedMesh and IAnimatedMeshSceneNode, for boned meshes + +#include "IBoneSceneNode.h" + +namespace irr +{ +namespace scene +{ + + class CBoneSceneNode : public IBoneSceneNode + { + public: + + //! constructor + CBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, + s32 id=-1, u32 boneIndex=0, const c8* boneName=0); + + //! Returns the index of the bone + virtual u32 getBoneIndex() const; + + //! Sets the animation mode of the bone. Returns true if successful. + virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode); + + //! Gets the current animation mode of the bone + virtual E_BONE_ANIMATION_MODE getAnimationMode() const; + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + /* + //! Returns the relative transformation of the scene node. + //virtual core::matrix4 getRelativeTransformation() const; + */ + + virtual void OnAnimate(u32 timeMs); + + virtual void updateAbsolutePositionOfAllChildren(); + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! How the relative transformation of the bone is used + virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) + { + SkinningSpace=space; + } + + virtual E_BONE_SKINNING_SPACE getSkinningSpace() const + { + return SkinningSpace; + } + + private: + void helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node); + + u32 BoneIndex; + + core::aabbox3d<f32> Box; + + E_BONE_ANIMATION_MODE AnimationMode; + E_BONE_SKINNING_SPACE SkinningSpace; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CBurningShader_Raster_Reference.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CBurningShader_Raster_Reference.cpp new file mode 100644 index 0000000..dccdab6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CBurningShader_Raster_Reference.cpp @@ -0,0 +1,1143 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + + +namespace irr +{ + +namespace video +{ + + /*! Render states define set-up states for all kinds of vertex and pixel processing. + Some render states set up vertex processing, and some set up pixel processing (see Render States). + Render states can be saved and restored using stateblocks (see State Blocks Save and Restore State). + */ + enum BD3DRENDERSTATETYPE + { + /*! BD3DRS_ZENABLE + Depth-buffering state as one member of the BD3DZBUFFERTYPE enumerated type. + Set this state to D3DZB_TRUE to enable z-buffering, + D3DZB_USEW to enable w-buffering, or D3DZB_FALSE to disable depth buffering. + The default value for this render state is D3DZB_TRUE if a depth stencil was created + along with the swap chain by setting the EnableAutoDepthStencil member of the + D3DPRESENT_PARAMETERS structure to TRUE, and D3DZB_FALSE otherwise. + */ + BD3DRS_ZENABLE, + + /*! BD3DRS_FILLMODE + One or more members of the D3DFILLMODE enumerated type. The default value is D3DFILL_SOLID. + */ + BD3DRS_FILLMODE, + + /*! BD3DRS_SHADEMODE + One or more members of the D3DSHADEMODE enumerated type. The default value is D3DSHADE_GOURAUD. + */ + BD3DRS_SHADEMODE, + + /*! BD3DRS_ZWRITEENABLE + TRUE to enable the application to write to the depth buffer. The default value is TRUE. + This member enables an application to prevent the system from updating the depth buffer with + new depth values. If FALSE, depth comparisons are still made according to the render state + D3DRS_ZFUNC, assuming that depth buffering is taking place, but depth values are not written + to the buffer. + */ + BD3DRS_ZWRITEENABLE, + + /*! BD3DRS_ALPHATESTENABLE + TRUE to enable per pixel alpha testing. If the test passes, the pixel is processed by the frame + buffer. Otherwise, all frame-buffer processing is skipped for the pixel. The test is done by + comparing the incoming alpha value with the reference alpha value, using the comparison function + provided by the D3DRS_ALPHAFUNC render state. The reference alpha value is determined by the value + set for D3DRS_ALPHAREF. For more information, see Alpha Testing State. + The default value of this parameter is FALSE. + */ + BD3DRS_ALPHATESTENABLE, + + /*! BD3DRS_SRCBLEND + One member of the BD3DBLEND enumerated type. The default value is BD3DBLEND_ONE. + */ + BD3DRS_SRCBLEND, + + /*! BD3DRS_DESTBLEND + One member of the BD3DBLEND enumerated type. The default value is BD3DBLEND_ZERO. + */ + BD3DRS_DESTBLEND, + + /*! BD3DRS_CULLMODE + Specifies how back-facing triangles are culled, if at all. This can be set to one + member of the BD3DCULL enumerated type. The default value is BD3DCULL_CCW. + */ + BD3DRS_CULLMODE, + + /*! BD3DRS_ZFUNC + One member of the BD3DCMPFUNC enumerated type. The default value is BD3DCMP_LESSEQUAL. + This member enables an application to accept or reject a pixel, based on its distance from + the camera. The depth value of the pixel is compared with the depth-buffer value. If the depth + value of the pixel passes the comparison function, the pixel is written. + + The depth value is written to the depth buffer only if the render state is TRUE. + Software rasterizers and many hardware accelerators work faster if the depth test fails, + because there is no need to filter and modulate the texture if the pixel is not going to be + rendered. + */ + BD3DRS_ZFUNC, + + /*! BD3DRS_ALPHAREF + Value that specifies a reference alpha value against which pixels are tested when alpha testing + is enabled. This is an 8-bit value placed in the low 8 bits of the DWORD render-state value. + Values can range from 0x00000000 through 0x000000FF. The default value is 0. + */ + BD3DRS_ALPHAREF, + + /*! BD3DRS_ALPHAFUNC + One member of the BD3DCMPFUNC enumerated type. The default value is BD3DCMP_ALWAYS. + This member enables an application to accept or reject a pixel, based on its alpha value. + */ + BD3DRS_ALPHAFUNC, + + /*! BD3DRS_DITHERENABLE + TRUE to enable dithering. The default value is FALSE. + */ + BD3DRS_DITHERENABLE, + + /*! BD3DRS_ALPHABLENDENABLE + TRUE to enable alpha-blended transparency. The default value is FALSE. + The type of alpha blending is determined by the BD3DRS_SRCBLEND and BD3DRS_DESTBLEND render states. + */ + BD3DRS_ALPHABLENDENABLE, + + /*! BD3DRS_FOGENABLE + TRUE to enable fog blending. The default value is FALSE. For more information about using fog + blending, see Fog. + */ + BD3DRS_FOGENABLE, + + /*! BD3DRS_SPECULARENABLE + TRUE to enable specular highlights. The default value is FALSE. + Specular highlights are calculated as though every vertex in the object being lit is at the + object's origin. This gives the expected results as long as the object is modeled around the + origin and the distance from the light to the object is relatively large. In other cases, the + results as undefined. + When this member is set to TRUE, the specular color is added to the base color after the + texture cascade but before alpha blending. + */ + BD3DRS_SPECULARENABLE, + + /*! BD3DRS_FOGCOLOR + Value whose type is D3DCOLOR. The default value is 0. For more information about fog color, + see Fog Color. + */ + BD3DRS_FOGCOLOR, + + /*! BD3DRS_FOGTABLEMODE + The fog formula to be used for pixel fog. Set to one of the members of the D3DFOGMODE + enumerated type. The default value is D3DFOG_NONE. For more information about pixel fog, + see Pixel Fog. + */ + BD3DRS_FOGTABLEMODE, + + /*! BD3DRS_FOGSTART + Depth at which pixel or vertex fog effects begin for linear fog mode. The default value is 0.0f. + Depth is specified in world space for vertex fog and either device space [0.0, 1.0] or world + space for pixel fog. For pixel fog, these values are in device space when the system uses z for + fog calculations and world-world space when the system is using eye-relative fog (w-fog). For + more information, see Fog Parameters and Eye-Relative vs. Z-based Depth. + Values for the this render state are floating-point values. + Because the IDirect3DDevice9::SetRenderState method accepts DWORD values, your + application must cast a variable that contains the value, as shown in the following code example. + pDevice9->SetRenderState( BD3DRS_FOGSTART, *((DWORD*) (&fFogStart))); + */ + BD3DRS_FOGSTART, + + /*! BD3DRS_FOGEND + Depth at which pixel or vertex fog effects end for linear fog mode. The default value is 1.0f. + Depth is specified in world space for vertex fog and either device space [0.0, 1.0] or world space + for pixel fog. For pixel fog, these values are in device space when the system uses z for fog + calculations and in world space when the system is using eye-relative fog (w-fog). For more + information, see Fog Parameters and Eye-Relative vs. Z-based Depth. + Values for this render state are floating-point values. + */ + BD3DRS_FOGEND, + + /*! BD3DRS_FOGDENSITY + Fog density for pixel or vertex fog used in the exponential fog modes (D3DFOG_EXP and D3DFOG_EXP2). + Valid density values range from 0.0 through 1.0. The default value is 1.0. For more information, + see Fog Parameters. + Values for this render state are floating-point values. + */ + BD3DRS_FOGDENSITY, + + + /*! BD3DRS_RANGEFOGENABLE + TRUE to enable range-based vertex fog. The default value is FALSE, in which case the system + uses depth-based fog. In range-based fog, the distance of an object from the viewer is used + to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene. + In range-based fog, all fog methods work as usual, except that they use range instead of depth + in the computations. + Range is the correct factor to use for fog computations, but depth is commonly used instead + because range is time-consuming to compute and depth is generally already available. Using depth + to calculate fog has the undesirable effect of having the fogginess of peripheral objects change + as the viewer's eye moves - in this case, the depth changes and the range remains constant. + + Because no hardware currently supports per-pixel range-based fog, range correction is offered + only for vertex fog. + For more information, see Vertex Fog. + */ + BD3DRS_RANGEFOGENABLE = 48, + + /*! BD3DRS_STENCILENABLE + TRUE to enable stenciling, or FALSE to disable stenciling. The default value is FALSE. + For more information, see Stencil Buffer Techniques. + */ + BD3DRS_STENCILENABLE = 52, + + /*! BD3DRS_STENCILFAIL + Stencil operation to perform if the stencil test fails. Values are from the D3DSTENCILOP + enumerated type. The default value is D3DSTENCILOP_KEEP. + */ + BD3DRS_STENCILFAIL = 53, + + /*! BD3DRS_STENCILZFAIL + Stencil operation to perform if the stencil test passes and the depth test (z-test) fails. + Values are from the D3DSTENCILOP enumerated type. The default value is D3DSTENCILOP_KEEP. + */ + BD3DRS_STENCILZFAIL = 54, + + /*! BD3DRS_STENCILPASS + Stencil operation to perform if both the stencil and the depth (z) tests pass. Values are + from the D3DSTENCILOP enumerated type. The default value is D3DSTENCILOP_KEEP. + */ + BD3DRS_STENCILPASS = 55, + + /*! BD3DRS_STENCILFUNC + Comparison function for the stencil test. Values are from the D3DCMPFUNC enumerated type. + The default value is D3DCMP_ALWAYS. + The comparison function is used to compare the reference value to a stencil buffer entry. + This comparison applies only to the bits in the reference value and stencil buffer entry that + are set in the stencil mask (set by the D3DRS_STENCILMASK render state). If TRUE, the stencil + test passes. + */ + BD3DRS_STENCILFUNC = 56, + + /*! BD3DRS_STENCILREF + An int reference value for the stencil test. The default value is 0. + */ + BD3DRS_STENCILREF = 57, + + /*! BD3DRS_STENCILMASK + Mask applied to the reference value and each stencil buffer entry to determine the significant + bits for the stencil test. The default mask is 0xFFFFFFFF. + */ + BD3DRS_STENCILMASK = 58, + + /*! BD3DRS_STENCILWRITEMASK + Write mask applied to values written into the stencil buffer. The default mask is 0xFFFFFFFF. + */ + BD3DRS_STENCILWRITEMASK = 59, + + /*! BD3DRS_TEXTUREFACTOR + Color used for multiple-texture blending with the D3DTA_TFACTOR texture-blending argument or the + D3DTOP_BLENDFACTORALPHA texture-blending operation. The associated value is a D3DCOLOR variable. + The default value is opaque white (0xFFFFFFFF). + */ + BD3DRS_TEXTUREFACTOR = 60, + + /*! BD3DRS_WRAP0 + Texture-wrapping behavior for multiple sets of texture coordinates. Valid values for this + render state can be any combination of the D3DWRAPCOORD_0 (or D3DWRAP_U), D3DWRAPCOORD_1 + (or D3DWRAP_V), D3DWRAPCOORD_2 (or D3DWRAP_W), and D3DWRAPCOORD_3 flags. These cause the system + to wrap in the direction of the first, second, third, and fourth dimensions, sometimes referred + to as the s, t, r, and q directions, for a given texture. The default value for this render state + is 0 (wrapping disabled in all directions). + */ + BD3DRS_WRAP0 = 128, + BD3DRS_WRAP1 = 129, + BD3DRS_WRAP2 = 130, + BD3DRS_WRAP3 = 131, + BD3DRS_WRAP4 = 132, + BD3DRS_WRAP5 = 133, + BD3DRS_WRAP6 = 134, + BD3DRS_WRAP7 = 135, + + /*! BD3DRS_CLIPPING + TRUE to enable primitive clipping by Direct3D, or FALSE to disable it. The default value is TRUE. + */ + BD3DRS_CLIPPING = 136, + + /*! BD3DRS_LIGHTING + TRUE to enable Direct3D lighting, or FALSE to disable it. The default value is TRUE. Only + vertices that include a vertex normal are properly lit; vertices that do not contain a normal + employ a dot product of 0 in all lighting calculations. + */ + BD3DRS_LIGHTING = 137, + + /*! D3DRS_AMBIENT + Ambient light color. This value is of type D3DCOLOR. The default value is 0. + */ + BD3DRS_AMBIENT = 139, + + /*! BD3DRS_FOGVERTEXMODE + Fog formula to be used for vertex fog. Set to one member of the BD3DFOGMODE enumerated type. + The default value is D3DFOG_NONE. + */ + BD3DRS_FOGVERTEXMODE = 140, + + /*! BD3DRS_COLORVERTEX + TRUE to enable per-vertex color or FALSE to disable it. The default value is TRUE. Enabling + per-vertex color allows the system to include the color defined for individual vertices in its + lighting calculations. + For more information, see the following render states: + BD3DRS_DIFFUSEMATERIALSOURCE + BD3DRS_SPECULARMATERIALSOURCE + BD3DRS_AMBIENTMATERIALSOURCE + BD3DRS_EMISSIVEMATERIALSOURCE + */ + BD3DRS_COLORVERTEX = 141, + + /*! BD3DRS_LOCALVIEWER + TRUE to enable camera-relative specular highlights, or FALSE to use orthogonal specular + highlights. The default value is TRUE. Applications that use orthogonal projection should + specify false. + */ + BD3DRS_LOCALVIEWER = 142, + + /*! BD3DRS_NORMALIZENORMALS + TRUE to enable automatic normalization of vertex normals, or FALSE to disable it. The default + value is FALSE. Enabling this feature causes the system to normalize the vertex normals for + vertices after transforming them to camera space, which can be computationally time-consuming. + */ + BD3DRS_NORMALIZENORMALS = 143, + + /*! BD3DRS_DIFFUSEMATERIALSOURCE + Diffuse color source for lighting calculations. Valid values are members of the + D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_COLOR1. The value for this + render state is used only if the D3DRS_COLORVERTEX render state is set to TRUE. + */ + BD3DRS_DIFFUSEMATERIALSOURCE = 145, + + /*! BD3DRS_SPECULARMATERIALSOURCE + Specular color source for lighting calculations. Valid values are members of the + D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_COLOR2. + */ + BD3DRS_SPECULARMATERIALSOURCE = 146, + + /*! D3DRS_AMBIENTMATERIALSOURCE + Ambient color source for lighting calculations. Valid values are members of the + D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_MATERIAL. + */ + BD3DRS_AMBIENTMATERIALSOURCE = 147, + + /*! D3DRS_EMISSIVEMATERIALSOURCE + Emissive color source for lighting calculations. Valid values are members of the + D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_MATERIAL. + */ + BD3DRS_EMISSIVEMATERIALSOURCE = 148, + + /*! D3DRS_VERTEXBLEND + Number of matrices to use to perform geometry blending, if any. Valid values are members + of the D3DVERTEXBLENDFLAGS enumerated type. The default value is D3DVBF_DISABLE. + */ + BD3DRS_VERTEXBLEND = 151, + + /* D3DRS_CLIPPLANEENABLE + Enables or disables user-defined clipping planes. Valid values are any DWORD in which the + status of each bit (set or not set) toggles the activation state of a corresponding user-defined + clipping plane. The least significant bit (bit 0) controls the first clipping plane at index 0, + and subsequent bits control the activation of clipping planes at higher indexes. If a bit is set, + the system applies the appropriate clipping plane during scene rendering. The default value is 0. + The D3DCLIPPLANEn macros are defined to provide a convenient way to enable clipping planes. + */ + BD3DRS_CLIPPLANEENABLE = 152, + BD3DRS_POINTSIZE = 154, + BD3DRS_POINTSIZE_MIN = 155, + BD3DRS_POINTSPRITEENABLE = 156, + BD3DRS_POINTSCALEENABLE = 157, + BD3DRS_POINTSCALE_A = 158, + BD3DRS_POINTSCALE_B = 159, + BD3DRS_POINTSCALE_C = 160, + BD3DRS_MULTISAMPLEANTIALIAS = 161, + BD3DRS_MULTISAMPLEMASK = 162, + BD3DRS_PATCHEDGESTYLE = 163, + BD3DRS_DEBUGMONITORTOKEN = 165, + BD3DRS_POINTSIZE_MAX = 166, + BD3DRS_INDEXEDVERTEXBLENDENABLE = 167, + BD3DRS_COLORWRITEENABLE = 168, + BD3DRS_TWEENFACTOR = 170, + BD3DRS_BLENDOP = 171, + BD3DRS_POSITIONDEGREE = 172, + BD3DRS_NORMALDEGREE = 173, + BD3DRS_SCISSORTESTENABLE = 174, + BD3DRS_SLOPESCALEDEPTHBIAS = 175, + BD3DRS_ANTIALIASEDLINEENABLE = 176, + BD3DRS_MINTESSELLATIONLEVEL = 178, + BD3DRS_MAXTESSELLATIONLEVEL = 179, + BD3DRS_ADAPTIVETESS_X = 180, + BD3DRS_ADAPTIVETESS_Y = 181, + BD3DRS_ADAPTIVETESS_Z = 182, + BD3DRS_ADAPTIVETESS_W = 183, + BD3DRS_ENABLEADAPTIVETESSELLATION = 184, + BD3DRS_TWOSIDEDSTENCILMODE = 185, + BD3DRS_CCW_STENCILFAIL = 186, + BD3DRS_CCW_STENCILZFAIL = 187, + BD3DRS_CCW_STENCILPASS = 188, + BD3DRS_CCW_STENCILFUNC = 189, + BD3DRS_COLORWRITEENABLE1 = 190, + BD3DRS_COLORWRITEENABLE2 = 191, + BD3DRS_COLORWRITEENABLE3 = 192, + BD3DRS_BLENDFACTOR = 193, + BD3DRS_SRGBWRITEENABLE = 194, + BD3DRS_DEPTHBIAS = 195, + BD3DRS_WRAP8 = 198, + BD3DRS_WRAP9 = 199, + BD3DRS_WRAP10 = 200, + BD3DRS_WRAP11 = 201, + BD3DRS_WRAP12 = 202, + BD3DRS_WRAP13 = 203, + BD3DRS_WRAP14 = 204, + BD3DRS_WRAP15 = 205, + BD3DRS_SEPARATEALPHABLENDENABLE = 206, + BD3DRS_SRCBLENDALPHA = 207, + BD3DRS_DESTBLENDALPHA = 208, + BD3DRS_BLENDOPALPHA = 209, + + BD3DRS_MAX_TYPE + }; + + + + /*! Defines constants that describe depth-buffer formats + Members of this enumerated type are used with the D3DRS_ZENABLE render state. + */ + enum BD3DZBUFFERTYPE + { + BD3DZB_FALSE = 0, // Disable depth buffering + BD3DZB_TRUE = 1, // Enable z-buffering + BD3DZB_USEW = 2 //Enable w-buffering. + }; + + //! Defines the supported compare functions. + enum BD3DCMPFUNC + { + BD3DCMP_NEVER = 1,// Always fail the test. + BD3DCMP_LESS, // Accept the new pixel if its value is less than the value of the current pixel. + BD3DCMP_EQUAL, // Accept the new pixel if its value equals the value of the current pixel. + BD3DCMP_LESSEQUAL, // Accept the new pixel if its value is less than or equal to the value of the current pixel. + BD3DCMP_GREATER, // Accept the new pixel if its value is greater than the value of the current pixel. + BD3DCMP_NOTEQUAL, // Accept the new pixel if its value does not equal the value of the current pixel. + BD3DCMP_GREATEREQUAL,// Accept the new pixel if its value is greater than or equal to the value of the current pixel. + BD3DCMP_ALWAYS // Always pass the test. + }; + + enum BD3DMATERIALCOLORSOURCE + { + BD3DMCS_MATERIAL = 0, // Use the color from the current material. + BD3DMCS_COLOR1 = 1, // Use the diffuse vertex color. + BD3DMCS_COLOR2 = 2 // Use the specular vertex color. + }; + + + //! Defines constants that describe the supported shading modes. + enum BD3DSHADEMODE + { + /*! BD3DSHADE_FLAT + Flat shading mode. The color and specular component of the first vertex in the triangle + are used to determine the color and specular component of the face. These colors remain + constant across the triangle; that is, they are not interpolated. The specular alpha is + interpolated. + */ + BD3DSHADE_FLAT = 1, + + /*! BD3DSHADE_GOURAUD + Gouraud shading mode. The color and specular components of the face are determined by a + linear interpolation between all three of the triangle's vertices. + */ + BD3DSHADE_GOURAUD = 2, + + /*! BD3DSHADE_PHONG + Not supported. + */ + BD3DSHADE_PHONG = 3 + }; + + /*! Defines constants describing the fill mode + The values in this enumerated type are used by the BD3DRS_FILLMODE render state + */ + enum BD3DFILLMODE + { + BD3DFILL_POINT = 1, // Fill points. + BD3DFILL_WIREFRAME = 2, // Fill wireframes. + BD3DFILL_SOLID = 3 // Fill solids. + }; + + + + /*! Defines the supported culling modes. + The values in this enumerated type are used by the B3DRS_CULLMODE render state. + The culling modes define how back faces are culled when rendering a geometry. + */ + enum BD3DCULL + { + BD3DCULL_NONE = 1, // Do not cull back faces. + BD3DCULL_CW = 2, // Cull back faces with clockwise vertices. + BD3DCULL_CCW = 3 // Cull back faces with counterclockwise vertices. + }; + + struct SShaderParam + { + u32 ColorUnits; + u32 TextureUnits; + + u32 RenderState [ BD3DRS_MAX_TYPE ]; + void SetRenderState ( BD3DRENDERSTATETYPE state, u32 value ); + }; + + void SShaderParam::SetRenderState ( BD3DRENDERSTATETYPE state, u32 value ) + { + RenderState [ state ] = value; + } + + + +class CBurningShader_Raster_Reference : public IBurningShader +{ +public: + + //! constructor + CBurningShader_Raster_Reference(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + virtual void setMaterial ( const SBurningShaderMaterial &material ); + + +private: + void scanline (); + void scanline2 (); + + sScanLineData line; + sPixelShaderData pShader; + + void pShader_1 (); + void pShader_EMT_LIGHTMAP_M4 (); + + SShaderParam ShaderParam; + + REALINLINE u32 depthFunc (); + REALINLINE void depthWrite (); + + +}; + +//! constructor +CBurningShader_Raster_Reference::CBurningShader_Raster_Reference(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CBurningShader_Raster_Reference"); + #endif +} + + +/*! +*/ +void CBurningShader_Raster_Reference::pShader_EMT_LIGHTMAP_M4 () +{ + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + + f32 inversew = fix_inverse32 ( line.w[0] ); + + getSample_texture ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[1][0].x,inversew), tofix ( line.t[1][0].y,inversew) ); + + + pShader.dst[pShader.i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( b0, b1 ) ) + ); + +} + +/*! +*/ +void CBurningShader_Raster_Reference::pShader_1 () +{ + tFixPoint r0, g0, b0; + tFixPoint tx0, ty0; + + const f32 inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x, inversew ); + ty0 = tofix ( line.t[0][0].y, inversew ); + + getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); + pShader.dst[pShader.i] = fix_to_color ( r0, g0, b0 ); + +} + + +/*! +*/ +void CBurningShader_Raster_Reference::setMaterial ( const SBurningShaderMaterial &material ) +{ + const video::SMaterial &m = material.org; + + u32 i; + u32 enable; + + ShaderParam.ColorUnits = 0; + ShaderParam.TextureUnits = 0; + for ( i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i ) + { + if ( m.getTexture( i ) ) + ShaderParam.TextureUnits = i; + } + + // shademode + ShaderParam.SetRenderState( BD3DRS_SHADEMODE, + m.GouraudShading ? BD3DSHADE_GOURAUD : BD3DSHADE_FLAT + ); + + // fillmode + ShaderParam.SetRenderState( BD3DRS_FILLMODE, + m.Wireframe ? BD3DFILL_WIREFRAME : m.PointCloud ? BD3DFILL_POINT : BD3DFILL_SOLID + ); + + // back face culling + ShaderParam.SetRenderState( BD3DRS_CULLMODE, + m.BackfaceCulling ? BD3DCULL_CCW : BD3DCULL_NONE + ); + + // lighting + ShaderParam.SetRenderState( BD3DRS_LIGHTING, m.Lighting ); + + // specular highlights + enable = F32_LOWER_EQUAL_0 ( m.Shininess ); + ShaderParam.SetRenderState( BD3DRS_SPECULARENABLE, enable); + ShaderParam.SetRenderState( BD3DRS_NORMALIZENORMALS, enable); + ShaderParam.SetRenderState( BD3DRS_SPECULARMATERIALSOURCE, (m.ColorMaterial==ECM_SPECULAR)?BD3DMCS_COLOR1:BD3DMCS_MATERIAL); + + // depth buffer enable and compare + ShaderParam.SetRenderState( BD3DRS_ZENABLE, (material.org.ZBuffer==video::ECFN_NEVER) ? BD3DZB_FALSE : BD3DZB_USEW); + switch (material.org.ZBuffer) + { + case ECFN_NEVER: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_NEVER); + break; + case ECFN_LESSEQUAL: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_LESSEQUAL); + break; + case ECFN_EQUAL: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_EQUAL); + break; + case ECFN_LESS: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_LESSEQUAL); + break; + case ECFN_NOTEQUAL: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_NOTEQUAL); + break; + case ECFN_GREATEREQUAL: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_GREATEREQUAL); + break; + case ECFN_GREATER: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_GREATER); + break; + case ECFN_ALWAYS: + ShaderParam.SetRenderState(BD3DRS_ZFUNC, BD3DCMP_ALWAYS); + break; + } + + // depth buffer write + ShaderParam.SetRenderState( BD3DRS_ZWRITEENABLE, m.ZWriteEnable ); +} + +/*! +*/ +REALINLINE u32 CBurningShader_Raster_Reference::depthFunc () +{ + if ( ShaderParam.RenderState [ BD3DRS_ZENABLE ] ) + { + switch ( ShaderParam.RenderState [ BD3DRS_ZFUNC ] ) + { + case BD3DCMP_LESSEQUAL: + return line.w[0] >= pShader.z[ pShader.i]; + case BD3DCMP_EQUAL: + return line.w[0] == pShader.z[ pShader.i]; + } + } + return 1; +} + +/*! +*/ +REALINLINE void CBurningShader_Raster_Reference::depthWrite () +{ + if ( ShaderParam.RenderState [ BD3DRS_ZWRITEENABLE ] ) + { + pShader.z[pShader.i] = line.w[0]; + } +} + +/*! +*/ +REALINLINE void CBurningShader_Raster_Reference::scanline2() +{ + // apply top-left fill-convention, left + pShader.xStart = core::ceil32( line.x[0] ); + pShader.xEnd = core::ceil32( line.x[1] ) - 1; + + pShader.dx = pShader.xEnd - pShader.xStart; + if ( pShader.dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal ( line.x[1] - line.x[0] ); + const f32 subPixel = ( (f32) pShader.xStart ) - line.x[0]; + + // store slopes in endpoint, and correct first pixel + + line.w[0] += (line.w[1] = (line.w[1] - line.w[0]) * invDeltaX) * subPixel; + + u32 i; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + line.c[i][1] = (line.c[i][1] - line.c[i][0]) * invDeltaX; + line.c[i][0] += line.c[i][1] * subPixel; + } +#endif + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + line.t[i][1] = (line.t[i][1] - line.t[i][0]) * invDeltaX; + line.t[i][0] += line.t[i][1] * subPixel; + } + + pShader.dst = (tVideoSample*) ( (u8*) RenderTarget->lock() + ( line.y * RenderTarget->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) ); + pShader.z = (fp24*) ( (u8*) DepthBuffer->lock() + ( line.y * DepthBuffer->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) ); + + for ( pShader.i = 0; pShader.i <= pShader.dx; ++pShader.i ) + { + if ( depthFunc() ) + { + depthWrite (); + } + + // advance next pixel + line.w[0] += line.w[1]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + line.c[i][0] += line.c[i][1]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + line.t[i][0] += line.t[i][1]; + } + } +} + + +/*! +*/ +REALINLINE void CBurningShader_Raster_Reference::scanline () +{ + u32 i; + + // apply top-left fill-convention, left + pShader.xStart = core::ceil32( line.x[0] ); + pShader.xEnd = core::ceil32( line.x[1] ) - 1; + + pShader.dx = pShader.xEnd - pShader.xStart; + if ( pShader.dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal ( line.x[1] - line.x[0] ); + + // search z-buffer for first not occulled pixel + pShader.z = (fp24*) ( (u8*) DepthBuffer->lock() + ( line.y * DepthBuffer->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) ); + + // subTexel + const f32 subPixel = ( (f32) pShader.xStart ) - line.x[0]; + + const f32 b = (line.w[1] - line.w[0]) * invDeltaX; + f32 a = line.w[0] + ( b * subPixel ); + + pShader.i = 0; + + if ( ShaderParam.RenderState [ BD3DRS_ZENABLE ] ) + { + u32 condition; + switch ( ShaderParam.RenderState [ BD3DRS_ZFUNC ] ) + { + case BD3DCMP_LESSEQUAL: + condition = a < pShader.z[pShader.i]; + break; + case BD3DCMP_EQUAL: + condition = a != pShader.z[pShader.i]; + break; + } + while ( a < pShader.z[pShader.i] ) + { + a += b; + + pShader.i += 1; + if ( pShader.i > pShader.dx ) + return; + + } + } + + // lazy setup rest of scanline + + line.w[0] = a; + line.w[1] = b; + + pShader.dst = (tVideoSample*) ( (u8*) RenderTarget->lock() + ( line.y * RenderTarget->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) ); + + a = (f32) pShader.i + subPixel; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + line.c[i][1] = (line.c[i][1] - line.c[i][0]) * invDeltaX; + line.c[i][0] += line.c[i][1] * a; + } +#endif + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + line.t[i][1] = (line.t[i][1] - line.t[i][0]) * invDeltaX; + line.t[i][0] += line.t[i][1] * a; + } + + for ( ; pShader.i <= pShader.dx; ++pShader.i ) + { + if ( line.w[0] >= pShader.z[pShader.i] ) + { + pShader.z[pShader.i] = line.w[0]; + + pShader_EMT_LIGHTMAP_M4 (); + } + + line.w[0] += line.w[1]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + line.c[i][0] += line.c[i][1]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + line.t[i][0] += line.t[i][1]; + } + } + +} + + + +void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + sScanConvertData scan; + u32 i; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal ( c->Pos.y - a->Pos.y ); + scan.invDeltaY[1] = core::reciprocal ( b->Pos.y - a->Pos.y ); + scan.invDeltaY[2] = core::reciprocal ( c->Pos.y - b->Pos.y ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = a->Pos.y - c->Pos.y; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = b->Pos.y - a->Pos.y; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > (f32) 0.0 ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][0] = a->Color[i]; + scan.slopeC[i][0] = (c->Color[i] - a->Color[i]) * scan.invDeltaY[0]; + } +#endif + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][0] = a->Tex[i]; + scan.slopeT[i][0] = (c->Tex[i] - a->Tex[i]) * scan.invDeltaY[0]; + } + + // top left fill convention y run + s32 yStart; + s32 yEnd; + + f32 subPixel; + + // rasterize upper sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][1] = a->Color[i]; + scan.slopeC[i][1] = (b->Color[i] - a->Color[i]) * scan.invDeltaY[1]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][1] = a->Tex[i]; + scan.slopeT[i][1] = (b->Tex[i] - a->Tex[i]) * scan.invDeltaY[1]; + } + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; + + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][0] += scan.slopeC[i][0] * subPixel; + scan.c[i][1] += scan.slopeC[i][1] * subPixel; + } + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][0] += scan.slopeT[i][0] * subPixel; + scan.t[i][1] += scan.slopeT[i][1] * subPixel; + } + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.w[scan.left] = scan.w[0]; + + line.x[scan.right] = scan.x[1]; + line.w[scan.right] = scan.w[1]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + line.c[i][scan.left] = scan.c[i][0]; + line.c[i][scan.right] = scan.c[i][1]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + line.t[i][scan.left] = scan.t[i][0]; + line.t[i][scan.right] = scan.t[i][1]; + } + + // render a scanline + scanline (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; + + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][0] += scan.slopeC[i][0]; + scan.c[i][1] += scan.slopeC[i][1]; + } + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][0] += scan.slopeT[i][0]; + scan.t[i][1] += scan.slopeT[i][1]; + } + + } + } + + // rasterize lower sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][0] = a->Color[i] + scan.slopeC[i][0] * temp[0]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][0] = a->Tex[i] + scan.slopeT[i][0] * temp[0]; + } + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][1] = b->Color[i]; + scan.slopeC[i][1] = (c->Color[i] - b->Color[i]) * scan.invDeltaY[2]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][1] = b->Tex[i]; + scan.slopeT[i][1] = (c->Tex[i] - b->Tex[i]) * scan.invDeltaY[2]; + } + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; + + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + scan.c[i][0] += scan.slopeC[i][0] * subPixel; + scan.c[i][1] += scan.slopeC[i][1] * subPixel; + } + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][0] += scan.slopeT[i][0] * subPixel; + scan.t[i][1] += scan.slopeT[i][1] * subPixel; + } + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.w[scan.left] = scan.w[0]; + + line.x[scan.right] = scan.x[1]; + line.w[scan.right] = scan.w[1]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( i = 0; i != ShaderParam.ColorUnits; ++i ) + { + line.c[i][scan.left] = scan.c[i][0]; + line.c[i][scan.right] = scan.c[i][1]; + } +#endif + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + line.t[i][scan.left] = scan.t[i][0]; + line.t[i][scan.right] = scan.t[i][1]; + } + + // render a scanline + scanline (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.c[i][0] += scan.slopeC[i][0]; + scan.c[i][1] += scan.slopeC[i][1]; + } + + for ( i = 0; i != ShaderParam.TextureUnits; ++i ) + { + scan.t[i][0] += scan.slopeT[i][0]; + scan.t[i][1] += scan.slopeT[i][1]; + } + } + } +} + + +} // end namespace video +} // end namespace irr + + +namespace irr +{ +namespace video +{ + + + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererReference(CBurningVideoDriver* driver) +{ + return new CBurningShader_Raster_Reference(driver); +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.cpp new file mode 100644 index 0000000..048fb01 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.cpp @@ -0,0 +1,872 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was written by Saurav Mohapatra and modified by Nikolaus Gebhardt. +// See CCSMLoader.h for details. + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_CSM_LOADER_ + +#include "CCSMLoader.h" +#include "os.h" +#include "IFileSystem.h" +#include "IReadFile.h" +#include "ISceneManager.h" +#include "IAttributes.h" +#include "SMesh.h" +#include "IVideoDriver.h" +#include "SAnimatedMesh.h" +#include "SMeshBufferLightMap.h" + +#ifdef _DEBUG +#define _IRR_DEBUG_CSM_LOADER_ +#endif + +namespace irr +{ +namespace scene +{ + // + // the CSM data types + // + struct color_rgb_t + { + s32 red; + s32 green; + s32 blue; + + color_rgb_t() : red(0), green(0), blue(0) {} + void clear() { red=0; green=0; blue=0; } + video::SColor toSColor() const { return video::SColor(255, red, green, blue); } + }; + + + // + // A Binary File Reader + // + struct BinaryFileReader + { + BinaryFileReader(io::IReadFile* pFile) : file(pFile) { } + + s32 readBuffer(void* buffer, s32 len) + { + return file->read(buffer,len); + } + + s32 readLong(); + f32 readFloat(); + + void readString(core::stringc &str); + void readVec3f(core::vector3df* v); + void readVec2f(core::vector2df* v); + void readColorRGB(color_rgb_t* color); + + io::IReadFile *file; + }; + + // + // The file header + // + class Header + { + public: + + enum E_CSM_VERSION + { + VERSION_4 = 4, + VERSION_4_1 = 5 + }; + + Header(){ clear(); } + + s32 getVersion() const { return version; } + void clear(){ version = 0; } + void load(BinaryFileReader* pReader) + { + version = pReader->readLong(); + } + + private: + + s32 version; + }; + + + // + // The groups + // + class Group + { + public: + + Group(){ clear(); } + ~Group(){ clear(); } + + void clear(); + void load(BinaryFileReader* pReader); + + s32 getFlags() const { return flags; } + s32 getParentGroupID() const { return parentGroup; } + const core::stringc& getProperties() const { return props; } + video::SColor getColor() const { return color.toSColor(); } + + private: + + s32 flags; + s32 parentGroup; + core::stringc props; + color_rgb_t color; + }; + + + // + // The visgroups + // + class VisGroup + { + public: + + VisGroup(){ clear(); } + ~VisGroup(){ clear(); } + void clear(); + void load(BinaryFileReader* pReader); + + s32 getFlags() const{ return flags; } + const core::stringc& getName() const{ return name; } + video::SColor getColor() const{ return color.toSColor(); } + + private: + + core::stringc name; + s32 flags; + color_rgb_t color; + }; + + + // + // Lightmaps + // + class LightMap + { + public: + + LightMap() : pixelData(0){ clear(); } + ~LightMap(){ clear(); } + void clear(); + void load(BinaryFileReader* pReader); + s32 getWidth() const{ return width; } + s32 getHeight() const{ return height; } + s32* getPixelData() const{ return pixelData; } + + private: + + s32 width; + s32 height; + s32* pixelData; + }; + + struct Triangle + { + s32 a,b,c; + }; + + + struct Line + { + s32 a,b; + }; + + + class Vertex + { + public: + + Vertex(){ clear(); } + ~Vertex(){ clear(); } + void clear(); + void load(BinaryFileReader* pReader); + + const core::vector3df& getPosition() const { return position; } + const core::vector3df& getNormal() const { return normal; } + video::SColor getColor() const { return color.toSColor(); } + const core::vector3df& getTextureCoordinates() const { return texCoords; } + const core::vector3df& getLightMapCoordinates() const { return lmapCoords; } + + private: + + core::vector3df position; + core::vector3df normal; + color_rgb_t color; + core::vector3df texCoords; + core::vector3df lmapCoords; + }; + + + class Surface + { + public: + + Surface() { clear(); } + ~Surface(){ clear(); } + + void clear(); + void load(BinaryFileReader *pReader); + + s32 getFlags() const{ return flags; } + const core::stringc& getTextureName() const{ return textureName; } + s32 getLightMapId() const{ return lightMapId; } + const core::vector2df* getUVOffset() const{ return &uvOffset; } + const core::vector2df* getUVScale() const{ return &uvScale; } + f32 getUVRotation() const{ return uvRotation; } + + u32 getVertexCount() const{ return vertices.size(); } + const Vertex& getVertexAt(const s32 index) const{ return vertices[index]; } + + u32 getTriangleCount() const{ return triangles.size(); } + const Triangle& getTriangleAt(const s32 index) const{ return triangles[index]; } + + private: + + s32 flags; + core::stringc textureName; + s32 lightMapId; + core::vector2df uvOffset; + core::vector2df uvScale; + f32 uvRotation; + core::array<Vertex> vertices; + core::array<Triangle> triangles; + core::array<Line> lines; + }; + + class Mesh + { + public: + + Mesh(){ clear(); } + ~Mesh(){ clear(); } + + void clear(); + void load(BinaryFileReader* pReader, bool bReadVisGroups); + + s32 getFlags() const { return flags; } + s32 getGroupID() const { return groupId; } + const core::stringc& getProperties() const { return props; } + video::SColor getColor() const { return color.toSColor(); } + const core::vector3df* getPosition() const { return &position; } + s32 getVisgroupID() const { return visgroupId; } + s32 getSurfaceCount() const { return surfaces.size(); } + const Surface* getSurfaceAt(const s32 index) const { return surfaces[index]; } + + private: + + s32 flags; + s32 groupId; + core::stringc props; + color_rgb_t color; + core::vector3df position; + s32 visgroupId; + + core::array<Surface*> surfaces; + }; + + class Entity + { + public: + + Entity() { clear(); } + ~Entity() { clear(); } + + void clear(); + void load(BinaryFileReader* pReader); + s32 getVisgroupID() const { return visgroupId; } + s32 getGroupID() const { return groupId; } + const core::stringc& getProperties() const { return props; } + const core::vector3df* getPosition() const { return &position; } + + private: + + s32 visgroupId; + s32 groupId; + core::stringc props; + core::vector3df position; + }; + + + class CameraData + { + public: + + CameraData(){ clear(); } + ~CameraData(){ clear(); } + + void clear(); + void load(BinaryFileReader* pReader); + + const core::vector3df* getPosition(){ return &position; } + f32 getPitch(){ return pitch; } + f32 getYaw(){ return yaw; } + + private: + + core::vector3df position; + f32 pitch; + f32 yaw; + }; + + // + // A CSM File + // + class CSMFile + { + public: + + CSMFile(){ clear(); } + ~CSMFile(){ clear(); } + void clear(); + void load(BinaryFileReader* pReader); + + const Header* getHeader() const{ return &header; } + + u32 getGroupCount() const{ return groups.size(); } + const Group* getGroupAt(const s32 index) const{ return groups[index]; } + + u32 getVisGroupCount() const{ return visgroups.size(); } + const VisGroup* getVisGroupAt(const s32 index) const{ return visgroups[index]; } + + u32 getLightMapCount() const{ return lightmaps.size(); } + const LightMap* getLightMapAt(const s32 index) const { return lightmaps[index]; } + + u32 getMeshCount() const{ return meshes.size(); } + const Mesh* getMeshAt(const s32 index) const{ return meshes[index]; } + + u32 getEntityCount() const{ return entities.size(); } + const Entity* getEntityAt(const s32 index) const{ return entities[index]; } + + const CameraData* getCameraData() const{ return &cameraData; } + + private: + + Header header; + core::array<Group*> groups; + core::array<VisGroup*> visgroups; + core::array<LightMap*> lightmaps; + core::array<Mesh*> meshes; + core::array<Entity*> entities; + CameraData cameraData; + }; + + CCSMLoader::CCSMLoader(scene::ISceneManager* manager, io::IFileSystem* fs) + : FileSystem(fs), SceneManager(manager) + { + + #ifdef _DEBUG + setDebugName("CCSMLoader"); + #endif + } + + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + bool CCSMLoader::isALoadableFileExtension(const io::path& filename) const + { + return core::hasFileExtension ( filename, "csm" ); + } + + + //! creates/loads an animated mesh from the file. + IAnimatedMesh* CCSMLoader::createMesh(io::IReadFile* file) + { + scene::IMesh* m = createCSMMesh(file); + + if (!m) + return 0; + + SAnimatedMesh* am = new SAnimatedMesh(); + am->Type = EAMT_CSM; + am->addMesh(m); + m->drop(); + + am->recalculateBoundingBox(); + return am; + } + + scene::IMesh* CCSMLoader::createCSMMesh(io::IReadFile* file) + { + if (!file) + return 0; + + BinaryFileReader reader(file); + CSMFile csmFile; + csmFile.load(&reader); + + return createIrrlichtMesh(&csmFile, + SceneManager->getParameters()->getAttributeAsString(CSM_TEXTURE_PATH), + file->getFileName()); + } + + + scene::IMesh* CCSMLoader::createIrrlichtMesh(const CSMFile* csmFile, + const core::stringc& textureRoot, const io::path& lmprefix) + { + scene::SMesh *pMesh = new scene::SMesh(); + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + for(u32 l = 0; l<csmFile->getLightMapCount(); l++) + { + const LightMap* lmap = csmFile->getLightMapAt(l); + + io::path lmapName = lmprefix; + lmapName += "LMAP_"; + lmapName += io::path(l+1); + os::Printer::log("CCSMLoader loading light map", lmapName.c_str()); + + video::IImage* lmapImg = driver->createImageFromData( + video::ECF_A8R8G8B8, + core::dimension2d<u32>(lmap->getWidth(),lmap->getHeight()), + lmap->getPixelData()); + + driver->addTexture(lmapName.c_str(), lmapImg); + lmapImg->drop(); + } + + for(u32 m = 0; m<csmFile->getMeshCount(); m++) + { + const Mesh* mshPtr = csmFile->getMeshAt(m); + + for(s32 s = 0; s < mshPtr->getSurfaceCount(); s++) + { + const Surface* surface = mshPtr->getSurfaceAt(s); + + core::stringc texName; + if (textureRoot.size()) + { + texName += textureRoot; + texName += "/"; + } + texName+= surface->getTextureName(); + + video::ITexture* texture = 0; + if (texName.size()) + { + if (FileSystem->existFile(texName)) + texture = driver->getTexture(texName); + else if (FileSystem->existFile(surface->getTextureName())) + texture = driver->getTexture(surface->getTextureName()); + else if (FileSystem->existFile(FileSystem->getFileBasename(surface->getTextureName()))) + texture = driver->getTexture(FileSystem->getFileBasename(surface->getTextureName())); + else if (FileSystem->existFile(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName())) + texture = driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName()); + else + texture = driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+FileSystem->getFileBasename(surface->getTextureName())); + } + + //material + io::path lmapName = lmprefix; + lmapName += "LMAP_"; + lmapName += io::path(surface->getLightMapId()); + + scene::SMeshBufferLightMap *buffer = new scene::SMeshBufferLightMap(); + buffer->Material.setTexture(0, texture); + if (surface->getLightMapId()) + { + buffer->Material.setTexture(1, driver->getTexture(lmapName)); + buffer->Material.Lighting = false; + buffer->Material.MaterialType = video::EMT_LIGHTMAP_ADD; + } + + buffer->Vertices.reallocate(surface->getVertexCount()); + for(u32 v = 0; v < surface->getVertexCount(); ++v) + { + const Vertex& vtxPtr = surface->getVertexAt(v); + video::S3DVertex2TCoords vtx; + vtx.Pos = vtxPtr.getPosition(); + vtx.Normal = vtxPtr.getPosition(); + vtx.Color=vtxPtr.getColor(); + vtx.TCoords.set(vtxPtr.getTextureCoordinates().X, 1.f-vtxPtr.getTextureCoordinates().Y); + vtx.TCoords2.set(vtxPtr.getLightMapCoordinates().X, 1.f-vtxPtr.getLightMapCoordinates().Y); + + buffer->Vertices.push_back(vtx); + } + + buffer->Indices.reallocate(surface->getTriangleCount()*3); + for(u32 t = 0; t < surface->getTriangleCount(); ++t) + { + const Triangle& tri = surface->getTriangleAt(t); + buffer->Indices.push_back(tri.c); + buffer->Indices.push_back(tri.b); + buffer->Indices.push_back(tri.a); + } + + buffer->recalculateBoundingBox(); + pMesh->addMeshBuffer(buffer); + buffer->drop(); + } + } + + pMesh->recalculateBoundingBox(); + return pMesh; + } + + void Group::clear() + { + color.clear(); + flags = 0; + parentGroup = 0; + props = ""; + } + + void Group::load(BinaryFileReader* pReader) + { + flags = pReader->readLong(); + parentGroup = pReader->readLong(); + pReader->readString(props); + pReader->readColorRGB(&color); + } + + void VisGroup::clear() + { + color.clear(); + flags = 0; + name = ""; + } + + void VisGroup::load(BinaryFileReader* pReader) + { + pReader->readString(name); + flags = pReader->readLong(); + pReader->readColorRGB(&color); + } + + void LightMap::clear() + { + delete[] pixelData; + pixelData = 0; + width = height = 0; + } + + void LightMap::load(BinaryFileReader* pReader) + { + width = pReader->readLong(); + height = pReader->readLong(); + pixelData = new s32[width * height]; + pReader->readBuffer(pixelData, width * height * sizeof(s32)); + } + + void Mesh::clear() + { + flags = 0; + groupId = 0; + visgroupId = 0; + props = ""; + color.clear(); + position.set(0,0,0); + + for(u32 s = 0; s < surfaces.size(); s++) + { + delete surfaces[s]; + } + surfaces.clear(); + } + + void Mesh::load(BinaryFileReader* pReader, bool bReadVisGroups) + { + flags = pReader->readLong(); + groupId = pReader->readLong(); + pReader->readString(props); + pReader->readColorRGB(&color); + pReader->readVec3f(&position); + if(bReadVisGroups) + visgroupId = pReader->readLong(); + else + visgroupId = 0; + + s32 count = pReader->readLong(); + + for(s32 i = 0; i < count; i++) + { + Surface* surf = new Surface(); + surf->load(pReader); + surfaces.push_back(surf); + } + } + + void Surface::clear() + { + flags = 0; + lightMapId = 0; + textureName = ""; + uvOffset.set(0.0f,0.0f); + uvScale.set(0.0f,0.0f); + uvRotation = 0.0f; + triangles.clear(); + lines.clear(); + vertices.clear(); + } + + void Surface::load(BinaryFileReader* pReader) + { + flags = pReader->readLong(); + pReader->readString(textureName); + textureName.replace('\\', '/'); + + lightMapId = pReader->readLong(); + pReader->readVec2f(&uvOffset); + pReader->readVec2f(&uvScale); + uvRotation = pReader->readFloat(); + s32 vtxCount = pReader->readLong(); + s32 triCount = pReader->readLong(); + s32 lineCount = pReader->readLong(); + + for(s32 v = 0; v < vtxCount; v++) + { + vertices.push_back(Vertex()); + vertices.getLast().load(pReader); + } + + for(s32 t = 0; t < triCount; t++) + { + Triangle tri; + pReader->readBuffer(&tri, sizeof(tri)); + triangles.push_back(tri); + } + + for(s32 l = 0; l < lineCount; l++) + { + Line line; + pReader->readBuffer(&line,sizeof(line)); + lines.push_back(line); + + } + + } + + void Vertex::clear() + { + position.set(0,0,0); + normal.set(0,0,0); + color.clear(); + texCoords.set(0,0,0); + lmapCoords.set(0,0,0); + } + + void Vertex::load(BinaryFileReader* pReader) + { + pReader->readVec3f(&position); + pReader->readVec3f(&normal); + pReader->readColorRGB(&color); + pReader->readVec3f(&texCoords); + pReader->readVec3f(&lmapCoords); + } + + void Entity::clear() + { + visgroupId = groupId = 0; + props = ""; + position.set(0,0,0); + } + + void Entity::load(BinaryFileReader* pReader) + { + visgroupId = pReader->readLong(); + groupId = pReader->readLong(); + pReader->readString(props); + pReader->readVec3f(&position); + } + + void CameraData::clear() + { + position.set(0,0,0); + pitch = 0; + yaw = 0; + } + + void CameraData::load(BinaryFileReader* pReader) + { + pReader->readVec3f(&position); + pitch = pReader->readFloat(); + yaw = pReader->readFloat(); + } + + void CSMFile::clear() + { + header.clear(); + cameraData.clear(); + + u32 x =0; + for( x= 0; x < groups.size(); x++) + delete groups[x]; + + groups.clear(); + + for(x= 0; x < visgroups.size(); x++) + delete visgroups[x]; + + visgroups.clear(); + + for(x= 0; x < lightmaps.size(); x++) + delete lightmaps[x]; + + lightmaps.clear(); + + for(x= 0; x < meshes.size(); x++) + delete meshes[x]; + + meshes.clear(); + + for(x= 0; x < entities.size(); x++) + delete entities[x]; + + entities.clear(); + } + + void CSMFile::load(BinaryFileReader* pReader) + { + clear(); + + header.load(pReader); + + //groups + { + const s32 count = pReader->readLong(); +#ifdef _IRR_DEBUG_CSM_LOADER_ + os::Printer::log("CSM Version", core::stringc(header.getVersion()).c_str()); + os::Printer::log("Loading groups. Count", core::stringc(count)); +#endif + + groups.reallocate(count); + for (s32 i = 0; i < count; i++) + { + Group* grp = new Group(); + grp->load(pReader); + groups.push_back(grp); + } + } + const bool bHasVGroups = (header.getVersion() == Header::VERSION_4_1); + + if (bHasVGroups) + { + //visgroups + const s32 count = pReader->readLong(); +#ifdef _IRR_DEBUG_CSM_LOADER_ + os::Printer::log("Loading visgroups. Count", core::stringc(count)); +#endif + + visgroups.reallocate(count); + for (s32 i = 0; i < count; i++) + { + VisGroup* grp = new VisGroup(); + grp->load(pReader); + visgroups.push_back(grp); + } + } + + //lightmaps + { + const s32 count = pReader->readLong(); +#ifdef _IRR_DEBUG_CSM_LOADER_ + os::Printer::log("Loading lightmaps. Count", core::stringc(count)); +#endif + + lightmaps.reallocate(count); + for(s32 i = 0; i < count; i++) + { + LightMap* lm = new LightMap(); + lm->load(pReader); + lightmaps.push_back(lm); + } + } + + //meshes + { + const s32 count = pReader->readLong(); +#ifdef _IRR_DEBUG_CSM_LOADER_ + os::Printer::log("Loading meshes. Count", core::stringc(count)); +#endif + + meshes.reallocate(count); + for(s32 i = 0; i < count; i++) + { + Mesh* mesh = new Mesh(); + mesh->load(pReader,bHasVGroups); + meshes.push_back(mesh); + } + } + + //entities + { + const s32 count = pReader->readLong(); +#ifdef _IRR_DEBUG_CSM_LOADER_ + os::Printer::log("Loading entitites. Count", core::stringc(count)); +#endif + + entities.reallocate(count); + for(s32 i = 0; i < count; i++) + { + Entity* ent = new Entity(); + ent->load(pReader); + entities.push_back(ent); + } + } + + //camera data +#ifdef _IRR_DEBUG_CSM_LOADER_ + os::Printer::log("Loading camera data."); +#endif + cameraData.load(pReader); + } + + s32 BinaryFileReader::readLong() + { + int ret = 0; + readBuffer(&ret,sizeof(int)); +#ifdef __BIG_ENDIAN__ + ret = os::Byteswap::byteswap(ret); +#endif + return ret; + } + + f32 BinaryFileReader::readFloat() + { + float ret = 0; + readBuffer(&ret,sizeof(float)); +#ifdef __BIG_ENDIAN__ + ret = os::Byteswap::byteswap(ret); +#endif + return ret; + } + + void BinaryFileReader::readString(core::stringc &str) + { + str = ""; + c8 c; + readBuffer(&c,sizeof(char)); + while(c != 0) + { + str += c; + readBuffer(&c,sizeof(char)); + } + } + + void BinaryFileReader::readVec3f(core::vector3df* v) + { + v->X = readFloat(); + v->Y = readFloat(); + v->Z = readFloat(); + } + + void BinaryFileReader::readVec2f(core::vector2df* v) + { + v->X = readFloat(); + v->Y = readFloat(); + } + + void BinaryFileReader::readColorRGB(color_rgb_t* color) + { + readBuffer(color,sizeof(color_rgb_t)); + } + +} // end namespace +} // end namespace + +#endif // _IRR_COMPILE_WITH_CSM_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.h new file mode 100644 index 0000000..5e850c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCSMLoader.h @@ -0,0 +1,82 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This Loader has been originally written by Saurav Mohapatra. I (Nikolaus Gebhardt) +// modified some minor things and integrated it into Irrlicht 0.9. Thanks a lot +// to Saurav Mohapatra for his work on this and that he gave me his permission to +// add it into Irrlicht. +// I did some changes to Saurav Mohapatra's loader, so I'm writing this down here: +// - Replaced all dependencies to STL and stdio with irr:: methods/constructs. +// - Moved everything into namespace irr::scene +// - Replaced logging with Irrlicht's internal logger. +// - Removed dependency to IrrlichtDevice +// - Moved all internal structures into CCSMLoader.cpp +// - Made the texture root parameter dependent on a ISceneManager string parameter +// - removed exceptions +// - Implemented CCCSMLoader as IMeshLoader +// - Fixed some problems with memory leaks +// - Fixed bounding box calculation +// +// The original readme of this file looks like this: +// +// This component provides a loader for the Cartography shop 4.x .csm maps for Irrlicht Engine. +// This is a part of the M_TRIX Project. +// This is licensed under the ZLib/LibPNG license +// The IrrCSM library is written by Saurav Mohapatra. +// +// Features +// +// The IrrCSM library features the following capabilities +// +// * Loads the .csm 4.0 and 4.1 files transparently +// * Presents the loaded file as irr::scene::IAnimatedMesh for easy creation of IOctreeSceneNode +// * Loads the textures given the correct texture root. hence map and textures can be in separate directories +// +// For more informations go to http://www.geocities.com/standard_template/irrcsm/downloads.html + +#ifndef __CSM_LOADER_H_INCLUDED__ +#define __CSM_LOADER_H_INCLUDED__ + +#include "irrArray.h" +#include "IMesh.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "IMeshLoader.h" + +namespace irr +{ +namespace scene +{ + class CSMFile; + class ISceneManager; + + class CCSMLoader : public scene::IMeshLoader + { + public: + + CCSMLoader(ISceneManager* manager, io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + private: + + scene::IMesh* createCSMMesh(io::IReadFile* file); + + scene::IMesh* createIrrlichtMesh(const CSMFile* csmFile, + const core::stringc& textureRoot, const io::path& lmprefix); + + io::IFileSystem* FileSystem; + scene::ISceneManager* SceneManager; + }; + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.cpp new file mode 100644 index 0000000..370b893 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.cpp @@ -0,0 +1,385 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CCameraSceneNode.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CCameraSceneNode::CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::vector3df& lookat) + : ICameraSceneNode(parent, mgr, id, position), + Target(lookat), UpVector(0.0f, 1.0f, 0.0f), ZNear(1.0f), ZFar(3000.0f), + InputReceiverEnabled(true), TargetAndRotationAreBound(false) +{ + #ifdef _DEBUG + setDebugName("CCameraSceneNode"); + #endif + + // set default projection + Fovy = core::PI / 2.5f; // Field of view, in radians. + + const video::IVideoDriver* const d = mgr?mgr->getVideoDriver():0; + if (d) + Aspect = (f32)d->getCurrentRenderTargetSize().Width / + (f32)d->getCurrentRenderTargetSize().Height; + else + Aspect = 4.0f / 3.0f; // Aspect ratio. + + recalculateProjectionMatrix(); + recalculateViewArea(); +} + + +//! Disables or enables the camera to get key or mouse inputs. +void CCameraSceneNode::setInputReceiverEnabled(bool enabled) +{ + InputReceiverEnabled = enabled; +} + + +//! Returns if the input receiver of the camera is currently enabled. +bool CCameraSceneNode::isInputReceiverEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return InputReceiverEnabled; +} + + +//! Sets the projection matrix of the camera. +/** The core::matrix4 class has some methods +to build a projection matrix. e.g: core::matrix4::buildProjectionMatrixPerspectiveFovLH +\param projection: The new projection matrix of the camera. */ +void CCameraSceneNode::setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal) +{ + IsOrthogonal = isOrthogonal; + ViewArea.getTransform ( video::ETS_PROJECTION ) = projection; +} + + +//! Gets the current projection matrix of the camera +//! \return Returns the current projection matrix of the camera. +const core::matrix4& CCameraSceneNode::getProjectionMatrix() const +{ + return ViewArea.getTransform ( video::ETS_PROJECTION ); +} + + +//! Gets the current view matrix of the camera +//! \return Returns the current view matrix of the camera. +const core::matrix4& CCameraSceneNode::getViewMatrix() const +{ + return ViewArea.getTransform ( video::ETS_VIEW ); +} + + +//! Sets a custom view matrix affector. The matrix passed here, will be +//! multiplied with the view matrix when it gets updated. +//! This allows for custom camera setups like, for example, a reflection camera. +/** \param affector: The affector matrix. */ +void CCameraSceneNode::setViewMatrixAffector(const core::matrix4& affector) +{ + Affector = affector; +} + + +//! Gets the custom view matrix affector. +const core::matrix4& CCameraSceneNode::getViewMatrixAffector() const +{ + return Affector; +} + + +//! It is possible to send mouse and key events to the camera. Most cameras +//! may ignore this input, but camera scene nodes which are created for +//! example with scene::ISceneManager::addMayaCameraSceneNode or +//! scene::ISceneManager::addFPSCameraSceneNode, may want to get this input +//! for changing their position, look at target or whatever. +bool CCameraSceneNode::OnEvent(const SEvent& event) +{ + if (!InputReceiverEnabled) + return false; + + // send events to event receiving animators + + ISceneNodeAnimatorList::Iterator ait = Animators.begin(); + + for (; ait != Animators.end(); ++ait) + if ((*ait)->isEventReceiverEnabled() && (*ait)->OnEvent(event)) + return true; + + // if nobody processed the event, return false + return false; +} + + +//! sets the look at target of the camera +//! \param pos: Look at target of the camera. +void CCameraSceneNode::setTarget(const core::vector3df& pos) +{ + Target = pos; + + if(TargetAndRotationAreBound) + { + const core::vector3df toTarget = Target - getAbsolutePosition(); + ISceneNode::setRotation(toTarget.getHorizontalAngle()); + } +} + + +//! Sets the rotation of the node. +/** This only modifies the relative rotation of the node. +If the camera's target and rotation are bound ( @see bindTargetAndRotation() ) +then calling this will also change the camera's target to match the rotation. +\param rotation New rotation of the node in degrees. */ +void CCameraSceneNode::setRotation(const core::vector3df& rotation) +{ + if(TargetAndRotationAreBound) + Target = getAbsolutePosition() + rotation.rotationToDirection(); + + ISceneNode::setRotation(rotation); +} + + +//! Gets the current look at target of the camera +//! \return Returns the current look at target of the camera +const core::vector3df& CCameraSceneNode::getTarget() const +{ + return Target; +} + + +//! sets the up vector of the camera +//! \param pos: New upvector of the camera. +void CCameraSceneNode::setUpVector(const core::vector3df& pos) +{ + UpVector = pos; +} + + +//! Gets the up vector of the camera. +//! \return Returns the up vector of the camera. +const core::vector3df& CCameraSceneNode::getUpVector() const +{ + return UpVector; +} + + +f32 CCameraSceneNode::getNearValue() const +{ + return ZNear; +} + + +f32 CCameraSceneNode::getFarValue() const +{ + return ZFar; +} + + +f32 CCameraSceneNode::getAspectRatio() const +{ + return Aspect; +} + + +f32 CCameraSceneNode::getFOV() const +{ + return Fovy; +} + + +void CCameraSceneNode::setNearValue(f32 f) +{ + ZNear = f; + recalculateProjectionMatrix(); +} + + +void CCameraSceneNode::setFarValue(f32 f) +{ + ZFar = f; + recalculateProjectionMatrix(); +} + + +void CCameraSceneNode::setAspectRatio(f32 f) +{ + Aspect = f; + recalculateProjectionMatrix(); +} + + +void CCameraSceneNode::setFOV(f32 f) +{ + Fovy = f; + recalculateProjectionMatrix(); +} + + +void CCameraSceneNode::recalculateProjectionMatrix() +{ + ViewArea.getTransform ( video::ETS_PROJECTION ).buildProjectionMatrixPerspectiveFovLH(Fovy, Aspect, ZNear, ZFar); +} + + +//! prerender +void CCameraSceneNode::OnRegisterSceneNode() +{ + if ( SceneManager->getActiveCamera () == this ) + SceneManager->registerNodeForRendering(this, ESNRP_CAMERA); + + ISceneNode::OnRegisterSceneNode(); +} + + +//! render +void CCameraSceneNode::render() +{ + core::vector3df pos = getAbsolutePosition(); + core::vector3df tgtv = Target - pos; + tgtv.normalize(); + + // if upvector and vector to the target are the same, we have a + // problem. so solve this problem: + core::vector3df up = UpVector; + up.normalize(); + + f32 dp = tgtv.dotProduct(up); + + if ( core::equals(core::abs_<f32>(dp), 1.f) ) + { + up.X += 0.5f; + } + + ViewArea.getTransform(video::ETS_VIEW).buildCameraLookAtMatrixLH(pos, Target, up); + ViewArea.getTransform(video::ETS_VIEW) *= Affector; + recalculateViewArea(); + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + if ( driver) + { + driver->setTransform(video::ETS_PROJECTION, ViewArea.getTransform ( video::ETS_PROJECTION) ); + driver->setTransform(video::ETS_VIEW, ViewArea.getTransform ( video::ETS_VIEW) ); + } +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CCameraSceneNode::getBoundingBox() const +{ + return ViewArea.getBoundingBox(); +} + + +//! returns the view frustum. needed sometimes by bsp or lod render nodes. +const SViewFrustum* CCameraSceneNode::getViewFrustum() const +{ + return &ViewArea; +} + + +void CCameraSceneNode::recalculateViewArea() +{ + ViewArea.cameraPosition = getAbsolutePosition(); + + core::matrix4 m(core::matrix4::EM4CONST_NOTHING); + m.setbyproduct_nocheck(ViewArea.getTransform(video::ETS_PROJECTION), + ViewArea.getTransform(video::ETS_VIEW)); + ViewArea.setFrom(m); +} + + +//! Writes attributes of the scene node. +void CCameraSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ICameraSceneNode::serializeAttributes(out, options); + + out->addVector3d("Target", Target); + out->addVector3d("UpVector", UpVector); + out->addFloat("Fovy", Fovy); + out->addFloat("Aspect", Aspect); + out->addFloat("ZNear", ZNear); + out->addFloat("ZFar", ZFar); + out->addBool("Binding", TargetAndRotationAreBound); + out->addBool("ReceiveInput", InputReceiverEnabled); +} + +//! Reads attributes of the scene node. +void CCameraSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + ICameraSceneNode::deserializeAttributes(in, options); + + Target = in->getAttributeAsVector3d("Target"); + UpVector = in->getAttributeAsVector3d("UpVector"); + Fovy = in->getAttributeAsFloat("Fovy"); + Aspect = in->getAttributeAsFloat("Aspect"); + ZNear = in->getAttributeAsFloat("ZNear"); + ZFar = in->getAttributeAsFloat("ZFar"); + TargetAndRotationAreBound = in->getAttributeAsBool("Binding"); + if ( in->findAttribute("ReceiveInput") ) + InputReceiverEnabled = in->getAttributeAsBool("InputReceiverEnabled"); + + recalculateProjectionMatrix(); + recalculateViewArea(); +} + + +//! Set the binding between the camera's rotation adn target. +void CCameraSceneNode::bindTargetAndRotation(bool bound) +{ + TargetAndRotationAreBound = bound; +} + + +//! Gets the binding between the camera's rotation and target. +bool CCameraSceneNode::getTargetAndRotationBinding(void) const +{ + return TargetAndRotationAreBound; +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CCameraSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + ICameraSceneNode::clone(newParent, newManager); + + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CCameraSceneNode* nb = new CCameraSceneNode(newParent, + newManager, ID, RelativeTranslation, Target); + + nb->ISceneNode::cloneMembers(this, newManager); + nb->ICameraSceneNode::cloneMembers(this); + + nb->Target = Target; + nb->UpVector = UpVector; + nb->Fovy = Fovy; + nb->Aspect = Aspect; + nb->ZNear = ZNear; + nb->ZFar = ZFar; + nb->ViewArea = ViewArea; + nb->Affector = Affector; + nb->InputReceiverEnabled = InputReceiverEnabled; + nb->TargetAndRotationAreBound = TargetAndRotationAreBound; + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // end namespace +} // end namespace + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.h new file mode 100644 index 0000000..ce75408 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCameraSceneNode.h @@ -0,0 +1,172 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_CAMERA_SCENE_NODE_H_INCLUDED__ +#define __C_CAMERA_SCENE_NODE_H_INCLUDED__ + +#include "ICameraSceneNode.h" +#include "SViewFrustum.h" + +namespace irr +{ +namespace scene +{ + + class CCameraSceneNode : public ICameraSceneNode + { + public: + + //! constructor + CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& lookat = core::vector3df(0,0,100)); + + //! Sets the projection matrix of the camera. + /** The core::matrix4 class has some methods + to build a projection matrix. e.g: core::matrix4::buildProjectionMatrixPerspectiveFovLH. + Note that the matrix will only stay as set by this method until one of + the following Methods are called: setNearValue, setFarValue, setAspectRatio, setFOV. + \param projection The new projection matrix of the camera. + \param isOrthogonal Set this to true if the matrix is an orthogonal one (e.g. + from matrix4::buildProjectionMatrixOrthoLH(). */ + virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal = false); + + //! Gets the current projection matrix of the camera + //! \return Returns the current projection matrix of the camera. + virtual const core::matrix4& getProjectionMatrix() const; + + //! Gets the current view matrix of the camera + //! \return Returns the current view matrix of the camera. + virtual const core::matrix4& getViewMatrix() const; + + //! Sets a custom view matrix affector. + /** \param affector: The affector matrix. */ + virtual void setViewMatrixAffector(const core::matrix4& affector); + + //! Gets the custom view matrix affector. + virtual const core::matrix4& getViewMatrixAffector() const; + + //! It is possible to send mouse and key events to the camera. Most cameras + //! may ignore this input, but camera scene nodes which are created for + //! example with scene::ISceneManager::addMayaCameraSceneNode or + //! scene::ISceneManager::addMeshViewerCameraSceneNode, may want to get this input + //! for changing their position, look at target or whatever. + virtual bool OnEvent(const SEvent& event); + + //! Sets the look at target of the camera + /** If the camera's target and rotation are bound ( @see bindTargetAndRotation() ) + then calling this will also change the camera's scene node rotation to match the target. + \param pos: Look at target of the camera. */ + virtual void setTarget(const core::vector3df& pos); + + //! Sets the rotation of the node. + /** This only modifies the relative rotation of the node. + If the camera's target and rotation are bound ( @see bindTargetAndRotation() ) + then calling this will also change the camera's target to match the rotation. + \param rotation New rotation of the node in degrees. */ + virtual void setRotation(const core::vector3df& rotation); + + //! Gets the current look at target of the camera + /** \return The current look at target of the camera */ + virtual const core::vector3df& getTarget() const; + + //! Sets the up vector of the camera. + //! \param pos: New upvector of the camera. + virtual void setUpVector(const core::vector3df& pos); + + //! Gets the up vector of the camera. + //! \return Returns the up vector of the camera. + virtual const core::vector3df& getUpVector() const; + + //! Gets distance from the camera to the near plane. + //! \return Value of the near plane of the camera. + virtual f32 getNearValue() const; + + //! Gets the distance from the camera to the far plane. + //! \return Value of the far plane of the camera. + virtual f32 getFarValue() const; + + //! Get the aspect ratio of the camera. + //! \return The aspect ratio of the camera. + virtual f32 getAspectRatio() const; + + //! Gets the field of view of the camera. + //! \return Field of view of the camera + virtual f32 getFOV() const; + + //! Sets the value of the near clipping plane. (default: 1.0f) + virtual void setNearValue(f32 zn); + + //! Sets the value of the far clipping plane (default: 2000.0f) + virtual void setFarValue(f32 zf); + + //! Sets the aspect ratio (default: 4.0f / 3.0f) + virtual void setAspectRatio(f32 aspect); + + //! Sets the field of view (Default: PI / 3.5f) + virtual void setFOV(f32 fovy); + + //! PreRender event + virtual void OnRegisterSceneNode(); + + //! Render + virtual void render(); + + //! Returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! Returns the view area. Sometimes needed by bsp or lod render nodes. + virtual const SViewFrustum* getViewFrustum() const; + + //! Disables or enables the camera to get key or mouse inputs. + //! If this is set to true, the camera will respond to key inputs + //! otherwise not. + virtual void setInputReceiverEnabled(bool enabled); + + //! Returns if the input receiver of the camera is currently enabled. + virtual bool isInputReceiverEnabled() const; + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_CAMERA; } + + //! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them. + virtual void bindTargetAndRotation(bool bound); + + //! Queries if the camera scene node's rotation and its target position are bound together. + virtual bool getTargetAndRotationBinding(void) const; + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + protected: + + void recalculateProjectionMatrix(); + void recalculateViewArea(); + + core::vector3df Target; + core::vector3df UpVector; + + f32 Fovy; // Field of view, in radians. + f32 Aspect; // Aspect ratio. + f32 ZNear; // value of the near view-plane. + f32 ZFar; // Z-value of the far view-plane. + + SViewFrustum ViewArea; + core::matrix4 Affector; + + bool InputReceiverEnabled; + bool TargetAndRotationAreBound; + }; + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.cpp new file mode 100644 index 0000000..a5e4937 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.cpp @@ -0,0 +1,361 @@ +// Copyright (C) 2012 Patryk Nadrowski +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_CG_ + +#include "CCgMaterialRenderer.h" + +namespace irr +{ +namespace video +{ + +CCgUniform::CCgUniform(const CGparameter& parameter, bool global) : Parameter(parameter), Type(CG_UNKNOWN_TYPE) +{ + Name = cgGetParameterName(Parameter); + + if(global) + Space = CG_GLOBAL; + else + Space = CG_PROGRAM; +} + +const core::stringc& CCgUniform::getName() const +{ + return Name; +} + +const CGparameter& CCgUniform::getParameter() const +{ + return Parameter; +} + +CGenum CCgUniform::getSpace() const +{ + return Space; +} + +CGtype CCgUniform::getType() const +{ + return Type; +} + +CCgUniform1f::CCgUniform1f(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_FLOAT; +} + +void CCgUniform1f::update(const void* data, const SMaterial& material) const +{ + f32* Data = (f32*)data; + cgSetParameter1f(Parameter, *Data); +} + +CCgUniform2f::CCgUniform2f(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_FLOAT2; +} + +void CCgUniform2f::update(const void* data, const SMaterial& material) const +{ + f32* Data = (f32*)data; + cgSetParameter2f(Parameter, *Data, *(Data+1)); +} + +CCgUniform3f::CCgUniform3f(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_FLOAT3; +} + +void CCgUniform3f::update(const void* data, const SMaterial& material) const +{ + f32* Data = (f32*)data; + cgSetParameter3f(Parameter, *Data, *(Data+1), *(Data+2)); +} + +CCgUniform4f::CCgUniform4f(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_FLOAT4; +} + +void CCgUniform4f::update(const void* data, const SMaterial& material) const +{ + f32* Data = (f32*)data; + cgSetParameter4f(Parameter, *Data, *(Data+1), *(Data+2), *(Data+3)); +} + +CCgUniform1i::CCgUniform1i(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_INT; +} + +void CCgUniform1i::update(const void* data, const SMaterial& material) const +{ + s32* Data = (s32*)data; + cgSetParameter1i(Parameter, *Data); +} + +CCgUniform2i::CCgUniform2i(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_INT2; +} + +void CCgUniform2i::update(const void* data, const SMaterial& material) const +{ + s32* Data = (s32*)data; + cgSetParameter2i(Parameter, *Data, *(Data+1)); +} + +CCgUniform3i::CCgUniform3i(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_INT3; +} + +void CCgUniform3i::update(const void* data, const SMaterial& material) const +{ + s32* Data = (s32*)data; + cgSetParameter3i(Parameter, *Data, *(Data+1), *(Data+2)); +} + +CCgUniform4i::CCgUniform4i(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_INT4; +} + +void CCgUniform4i::update(const void* data, const SMaterial& material) const +{ + s32* Data = (s32*)data; + cgSetParameter4i(Parameter, *Data, *(Data+1), *(Data+2), *(Data+3)); +} + +CCgUniform4x4f::CCgUniform4x4f(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_FLOAT4x4; +} + +void CCgUniform4x4f::update(const void* data, const SMaterial& material) const +{ + f32* Data = (f32*)data; + cgSetMatrixParameterfr(Parameter, Data); +} + +CCgUniformSampler2D::CCgUniformSampler2D(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_SAMPLER2D; +} + +void CCgUniformSampler2D::update(const void* data, const SMaterial& material) const +{ +} + +CCgMaterialRenderer::CCgMaterialRenderer(IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData) : + CallBack(callback), BaseMaterial(baseMaterial), UserData(userData), + VertexProgram(0), FragmentProgram(0), GeometryProgram(0), VertexProfile(CG_PROFILE_UNKNOWN), FragmentProfile(CG_PROFILE_UNKNOWN), GeometryProfile(CG_PROFILE_UNKNOWN), + Material(IdentityMaterial), Error(CG_NO_ERROR) +{ + #ifdef _DEBUG + setDebugName("CCgMaterialRenderer"); + #endif + + if(BaseMaterial) + BaseMaterial->grab(); + + if(CallBack) + CallBack->grab(); +} + +CCgMaterialRenderer::~CCgMaterialRenderer() +{ + if(CallBack) + CallBack->drop(); + + if(BaseMaterial) + BaseMaterial->drop(); + + for(unsigned int i = 0; i < UniformInfo.size(); ++i) + delete UniformInfo[i]; + + UniformInfo.clear(); +} + +bool CCgMaterialRenderer::isTransparent() const +{ + return BaseMaterial ? BaseMaterial->isTransparent() : false; +} + +void CCgMaterialRenderer::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + os::Printer::log("Cannot set constant, please use high level shader call instead.", ELL_WARNING); +} + +bool CCgMaterialRenderer::setVertexShaderConstant(const c8* name, const f32* floats, int count) +{ + return setPixelShaderConstant(name, floats, count); +} + +bool CCgMaterialRenderer::setVertexShaderConstant(const c8* name, const bool* bools, int count) +{ + return setPixelShaderConstant(name, bools, count); +} + +bool CCgMaterialRenderer::setVertexShaderConstant(const c8* name, const s32* ints, int count) +{ + return setPixelShaderConstant(name, ints, count); +} + +void CCgMaterialRenderer::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + os::Printer::log("Cannot set constant, please use high level shader call instead.", ELL_WARNING); +} + +bool CCgMaterialRenderer::setPixelShaderConstant(const c8* name, const f32* floats, int count) +{ + bool Status = false; + + for(unsigned int i = 0; i < UniformInfo.size(); ++i) + { + if(UniformInfo[i]->getName() == name) + { + UniformInfo[i]->update(floats, Material); + + Status = true; + } + } + + return Status; +} + +bool CCgMaterialRenderer::setPixelShaderConstant(const c8* name, const s32* ints, int count) +{ + bool Status = false; + + for(unsigned int i = 0; i < UniformInfo.size(); ++i) + { + if(UniformInfo[i]->getName() == name) + { + UniformInfo[i]->update(ints, Material); + + Status = true; + } + } + + return Status; +} + +bool CCgMaterialRenderer::setPixelShaderConstant(const c8* name, const bool* bools, int count) +{ + bool Status = false; + + for(unsigned int i = 0; i < UniformInfo.size(); ++i) + { + if(UniformInfo[i]->getName() == name) + { + UniformInfo[i]->update(bools, Material); + + Status = true; + } + } + + return Status; +} + +void CCgMaterialRenderer::getUniformList() +{ + for(unsigned int i = 0; i < UniformInfo.size(); ++i) + delete UniformInfo[i]; + + UniformInfo.clear(); + + for(unsigned int i = 0; i < 2; ++i) + { + CGenum Space = CG_GLOBAL; + bool IsGlobal = 1; + + if(i == 1) + { + Space = CG_PROGRAM; + IsGlobal = 0; + } + + for(unsigned int j = 0; j < 3; ++j) + { + CGprogram* Program = 0; + + switch(j) + { + case 0: + Program = &VertexProgram; + break; + case 1: + Program = &FragmentProgram; + break; + case 2: + Program = &GeometryProgram; + break; + } + + if(*Program) + { + CGparameter Parameter = cgGetFirstParameter(*Program, Space); + + while(Parameter) + { + if(cgGetParameterVariability(Parameter) == CG_UNIFORM && cgGetParameterDirection(Parameter) == CG_IN) + { + CCgUniform* Uniform = 0; + + CGtype Type = cgGetParameterType(Parameter); + + switch(Type) + { + case CG_FLOAT: + case CG_FLOAT1: + Uniform = new CCgUniform1f(Parameter, IsGlobal); + break; + case CG_FLOAT2: + Uniform = new CCgUniform2f(Parameter, IsGlobal); + break; + case CG_FLOAT3: + Uniform = new CCgUniform3f(Parameter, IsGlobal); + break; + case CG_FLOAT4: + Uniform = new CCgUniform4f(Parameter, IsGlobal); + break; + case CG_INT: + case CG_INT1: + Uniform = new CCgUniform1i(Parameter, IsGlobal); + break; + case CG_INT2: + Uniform = new CCgUniform2i(Parameter, IsGlobal); + break; + case CG_INT3: + Uniform = new CCgUniform3i(Parameter, IsGlobal); + break; + case CG_INT4: + Uniform = new CCgUniform4i(Parameter, IsGlobal); + break; + case CG_FLOAT4x4: + Uniform = new CCgUniform4x4f(Parameter, IsGlobal); + break; + case CG_SAMPLER2D: + Uniform = new CCgUniformSampler2D(Parameter, IsGlobal); + break; + } + + if(Uniform) + UniformInfo.push_back(Uniform); + } + + Parameter = cgGetNextParameter(Parameter); + } + } + } + } +} + +} +} + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.h new file mode 100644 index 0000000..8213f78 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCgMaterialRenderer.h @@ -0,0 +1,176 @@ +// Copyright (C) 2012 Patryk Nadrowski +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_CG_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_CG_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_CG_ + +#include "IMaterialRenderer.h" +#include "IMaterialRendererServices.h" +#include "IShaderConstantSetCallBack.h" +#include "IGPUProgrammingServices.h" +#include "irrArray.h" +#include "irrString.h" +#include "IVideoDriver.h" +#include "os.h" +#include "Cg/cg.h" + +#ifdef _MSC_VER + #pragma comment(lib, "cg.lib") +#endif + +namespace irr +{ +namespace video +{ + +class CCgUniform +{ +public: + CCgUniform(const CGparameter& parameter, bool global); + + const core::stringc& getName() const; + const CGparameter& getParameter() const; + CGenum getSpace() const; + CGtype getType() const; + + virtual void update(const void* data, const SMaterial& material) const = 0; + +protected: + core::stringc Name; + CGparameter Parameter; + CGenum Space; + CGtype Type; +}; + +class CCgUniform1f : public CCgUniform +{ +public: + CCgUniform1f(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform2f : public CCgUniform +{ +public: + CCgUniform2f(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform3f : public CCgUniform +{ +public: + CCgUniform3f(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform4f : public CCgUniform +{ +public: + CCgUniform4f(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform1i : public CCgUniform +{ +public: + CCgUniform1i(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform2i : public CCgUniform +{ +public: + CCgUniform2i(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform3i : public CCgUniform +{ +public: + CCgUniform3i(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform4i : public CCgUniform +{ +public: + CCgUniform4i(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniform4x4f : public CCgUniform +{ +public: + CCgUniform4x4f(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgUniformSampler2D : public CCgUniform +{ +public: + CCgUniformSampler2D(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CCgMaterialRenderer : public IMaterialRenderer, public IMaterialRendererServices +{ +public: + CCgMaterialRenderer(IShaderConstantSetCallBack* callback = 0, IMaterialRenderer* baseMaterial = 0, s32 userData = 0); + virtual ~CCgMaterialRenderer(); + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) = 0; + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) = 0; + virtual void OnUnsetMaterial() = 0; + + virtual bool isTransparent() const; + + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) = 0; + virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count); + virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count); + virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count); + virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count); + virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count); + virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count); + virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + virtual IVideoDriver* getVideoDriver() = 0; + +protected: + void getUniformList(); + + IShaderConstantSetCallBack* CallBack; + IMaterialRenderer* BaseMaterial; + s32 UserData; + + core::array<CCgUniform*> UniformInfo; + + CGprogram VertexProgram; + CGprogram FragmentProgram; + CGprogram GeometryProgram; + CGprofile VertexProfile; + CGprofile FragmentProfile; + CGprofile GeometryProfile; + + SMaterial Material; + CGerror Error; +}; + +} +} + +#endif +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.cpp new file mode 100644 index 0000000..6509812 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.cpp @@ -0,0 +1,2957 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_COLLADA_LOADER_ + +#include "CColladaFileLoader.h" +#include "os.h" +#include "IXMLReader.h" +#include "IDummyTransformationSceneNode.h" +#include "SAnimatedMesh.h" +#include "fast_atof.h" +#include "quaternion.h" +#include "ILightSceneNode.h" +#include "ICameraSceneNode.h" +#include "IMeshManipulator.h" +#include "IReadFile.h" +#include "IAttributes.h" +#include "IMeshCache.h" +#include "IMeshSceneNode.h" +#include "SMeshBufferLightMap.h" +#include "irrMap.h" + +#ifdef _DEBUG +#define COLLADA_READER_DEBUG +#endif +namespace irr +{ +namespace scene +{ +namespace +{ + // currently supported COLLADA tag names + const core::stringc colladaSectionName = "COLLADA"; + const core::stringc librarySectionName = "library"; + const core::stringc libraryNodesSectionName = "library_nodes"; + const core::stringc libraryGeometriesSectionName = "library_geometries"; + const core::stringc libraryMaterialsSectionName = "library_materials"; + const core::stringc libraryImagesSectionName = "library_images"; + const core::stringc libraryVisualScenesSectionName = "library_visual_scenes"; + const core::stringc libraryCamerasSectionName = "library_cameras"; + const core::stringc libraryLightsSectionName = "library_lights"; + const core::stringc libraryEffectsSectionName = "library_effects"; + const core::stringc assetSectionName = "asset"; + const core::stringc sceneSectionName = "scene"; + const core::stringc visualSceneSectionName = "visual_scene"; + + const core::stringc lightPrefabName = "light"; + const core::stringc cameraPrefabName = "camera"; + const core::stringc materialSectionName = "material"; + const core::stringc geometrySectionName = "geometry"; + const core::stringc imageSectionName = "image"; + const core::stringc textureSectionName = "texture"; + const core::stringc effectSectionName = "effect"; + + const core::stringc pointSectionName = "point"; + const core::stringc directionalSectionName ="directional"; + const core::stringc spotSectionName = "spot"; + const core::stringc ambientSectionName = "ambient"; + const core::stringc meshSectionName = "mesh"; + const core::stringc sourceSectionName = "source"; + const core::stringc arraySectionName = "array"; + const core::stringc floatArraySectionName ="float_array"; + const core::stringc intArraySectionName = "int_array"; + const core::stringc techniqueCommonSectionName = "technique_common"; + const core::stringc accessorSectionName = "accessor"; + const core::stringc verticesSectionName = "vertices"; + const core::stringc inputTagName = "input"; + const core::stringc polylistSectionName = "polylist"; + const core::stringc trianglesSectionName = "triangles"; + const core::stringc polygonsSectionName = "polygons"; + const core::stringc primitivesName = "p"; + const core::stringc vcountName = "vcount"; + + const core::stringc upAxisNodeName = "up_axis"; + const core::stringc nodeSectionName = "node"; + const core::stringc lookatNodeName = "lookat"; + const core::stringc matrixNodeName = "matrix"; + const core::stringc perspectiveNodeName = "perspective"; + const core::stringc rotateNodeName = "rotate"; + const core::stringc scaleNodeName = "scale"; + const core::stringc translateNodeName = "translate"; + const core::stringc skewNodeName = "skew"; + const core::stringc bboxNodeName = "boundingbox"; + const core::stringc minNodeName = "min"; + const core::stringc maxNodeName = "max"; + const core::stringc instanceName = "instance"; + const core::stringc instanceGeometryName = "instance_geometry"; + const core::stringc instanceSceneName = "instance_visual_scene"; + const core::stringc instanceEffectName = "instance_effect"; + const core::stringc instanceMaterialName = "instance_material"; + const core::stringc instanceLightName = "instance_light"; + const core::stringc instanceNodeName = "instance_node"; + const core::stringc bindMaterialName = "bind_material"; + const core::stringc extraNodeName = "extra"; + const core::stringc techniqueNodeName = "technique"; + const core::stringc colorNodeName = "color"; + const core::stringc floatNodeName = "float"; + const core::stringc float2NodeName = "float2"; + const core::stringc float3NodeName = "float3"; + + const core::stringc newParamName = "newparam"; + const core::stringc paramTagName = "param"; + const core::stringc initFromName = "init_from"; + const core::stringc dataName = "data"; + const core::stringc wrapsName = "wrap_s"; + const core::stringc wraptName = "wrap_t"; + const core::stringc minfilterName = "minfilter"; + const core::stringc magfilterName = "magfilter"; + const core::stringc mipfilterName = "mipfilter"; + + const core::stringc textureNodeName = "texture"; + const core::stringc doubleSidedNodeName = "double_sided"; + const core::stringc constantAttenuationNodeName = "constant_attenuation"; + const core::stringc linearAttenuationNodeName = "linear_attenuation"; + const core::stringc quadraticAttenuationNodeName = "quadratic_attenuation"; + const core::stringc falloffAngleNodeName = "falloff_angle"; + const core::stringc falloffExponentNodeName = "falloff_exponent"; + + const core::stringc profileCOMMONSectionName = "profile_COMMON"; + const core::stringc profileCOMMONAttributeName = "COMMON"; + + const char* const inputSemanticNames[] = {"POSITION", "VERTEX", "NORMAL", "TEXCOORD", + "UV", "TANGENT", "IMAGE", "TEXTURE", 0}; + + // We have to read ambient lights like other light types here, so we need a type for it + const video::E_LIGHT_TYPE ELT_AMBIENT = video::E_LIGHT_TYPE(video::ELT_COUNT+1); +} + + //! following class is for holding and creating instances of library + //! objects, named prefabs in this loader. + class CPrefab : public IColladaPrefab + { + public: + + CPrefab(const core::stringc& id) : Id(id) + { + } + + //! creates an instance of this prefab + virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent, + scene::ISceneManager* mgr) + { + // empty implementation + return 0; + } + + //! returns id of this prefab + virtual const core::stringc& getId() + { + return Id; + } + + protected: + + core::stringc Id; + }; + + + //! prefab for a light scene node + class CLightPrefab : public CPrefab + { + public: + + CLightPrefab(const core::stringc& id) : CPrefab(id) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: loaded light prefab", Id.c_str(), ELL_DEBUG); + #endif + } + + video::SLight LightData; // publically accessible + + //! creates an instance of this prefab + virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent, + scene::ISceneManager* mgr) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: Constructing light instance", Id.c_str(), ELL_DEBUG); + #endif + + if ( LightData.Type == ELT_AMBIENT ) + { + mgr->setAmbientLight( LightData.DiffuseColor ); + return 0; + } + + scene::ILightSceneNode* l = mgr->addLightSceneNode(parent); + if (l) + { + l->setLightData ( LightData ); + l->setName(getId()); + } + return l; + } + }; + + + //! prefab for a mesh scene node + class CGeometryPrefab : public CPrefab + { + public: + + CGeometryPrefab(const core::stringc& id) : CPrefab(id) + { + } + + scene::IMesh* Mesh; + + //! creates an instance of this prefab + virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent, + scene::ISceneManager* mgr) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: Constructing mesh instance", Id.c_str(), ELL_DEBUG); + #endif + + scene::ISceneNode* m = mgr->addMeshSceneNode(Mesh, parent); + if (m) + { + m->setName(getId()); +// m->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); +// m->setDebugDataVisible(scene::EDS_FULL); + } + return m; + } + }; + + + //! prefab for a camera scene node + class CCameraPrefab : public CPrefab + { + public: + + CCameraPrefab(const core::stringc& id) + : CPrefab(id), YFov(core::PI / 2.5f), ZNear(1.0f), ZFar(3000.0f) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: loaded camera prefab", Id.c_str(), ELL_DEBUG); + #endif + } + + // publicly accessible data + f32 YFov; + f32 ZNear; + f32 ZFar; + + //! creates an instance of this prefab + virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent, + scene::ISceneManager* mgr) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: Constructing camera instance", Id.c_str(), ELL_DEBUG); + #endif + + scene::ICameraSceneNode* c = mgr->addCameraSceneNode(parent); + if (c) + { + c->setFOV(YFov); + c->setNearValue(ZNear); + c->setFarValue(ZFar); + c->setName(getId()); + } + return c; + } + }; + + + //! prefab for a container scene node + //! Collects other prefabs and instantiates them upon instantiation + //! Uses a dummy scene node to return the children as one scene node + class CScenePrefab : public CPrefab + { + public: + CScenePrefab(const core::stringc& id) : CPrefab(id) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: loaded scene prefab", Id.c_str(), ELL_DEBUG); + #endif + } + + //! creates an instance of this prefab + virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent, + scene::ISceneManager* mgr) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: Constructing scene instance", Id.c_str(), ELL_DEBUG); + #endif + + if (Children.size()==0) + return 0; + + scene::IDummyTransformationSceneNode* s = mgr->addDummyTransformationSceneNode(parent); + if (s) + { + s->setName(getId()); + s->getRelativeTransformationMatrix() = Transformation; + s->updateAbsolutePosition(); + core::stringc t; + for (u32 i=0; i<16; ++i) + { + t+=core::stringc((double)Transformation[i]); + t+=" "; + } + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA: Transformation", t.c_str(), ELL_DEBUG); + #endif + + for (u32 i=0; i<Children.size(); ++i) + Children[i]->addInstance(s, mgr); + } + + return s; + } + + core::array<IColladaPrefab*> Children; + core::matrix4 Transformation; + }; + + +//! Constructor +CColladaFileLoader::CColladaFileLoader(scene::ISceneManager* smgr, + io::IFileSystem* fs) +: SceneManager(smgr), FileSystem(fs), DummyMesh(0), + FirstLoadedMesh(0), LoadedMeshCount(0), CreateInstances(false) +{ + #ifdef _DEBUG + setDebugName("CColladaFileLoader"); + #endif +} + + +//! destructor +CColladaFileLoader::~CColladaFileLoader() +{ + if (DummyMesh) + DummyMesh->drop(); + + if (FirstLoadedMesh) + FirstLoadedMesh->drop(); +} + + +//! Returns true if the file maybe is able to be loaded by this class. +/** This decision should be based only on the file extension (e.g. ".cob") */ +bool CColladaFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "xml", "dae" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CColladaFileLoader::createMesh(io::IReadFile* file) +{ + io::IXMLReaderUTF8* reader = FileSystem->createXMLReaderUTF8(file); + if (!reader) + return 0; + + CurrentlyLoadingMesh = file->getFileName(); + CreateInstances = SceneManager->getParameters()->getAttributeAsBool( + scene::COLLADA_CREATE_SCENE_INSTANCES); + Version = 0; + FlipAxis = false; + + // read until COLLADA section, skip other parts + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (colladaSectionName == reader->getNodeName()) + readColladaSection(reader); + else + skipSection(reader, true); // unknown section + } + } + + reader->drop(); + if (!Version) + return 0; + + // because this loader loads and creates a complete scene instead of + // a single mesh, return an empty dummy mesh to make the scene manager + // know that everything went well. + if (!DummyMesh) + DummyMesh = new SAnimatedMesh(); + scene::IAnimatedMesh* returnMesh = DummyMesh; + + if (Version < 10400) + instantiateNode(SceneManager->getRootSceneNode()); + + // add the first loaded mesh into the mesh cache too, if more than one + // meshes have been loaded from the file + if (LoadedMeshCount>1 && FirstLoadedMesh) + { + os::Printer::log("Added COLLADA mesh", FirstLoadedMeshName.c_str()); + SceneManager->getMeshCache()->addMesh(FirstLoadedMeshName.c_str(), FirstLoadedMesh); + } + + // clean up temporary loaded data + clearData(); + + returnMesh->grab(); // store until this loader is destroyed + + DummyMesh->drop(); + DummyMesh = 0; + + if (FirstLoadedMesh) + FirstLoadedMesh->drop(); + FirstLoadedMesh = 0; + LoadedMeshCount = 0; + + return returnMesh; +} + + +//! skips an (unknown) section in the collada document +void CColladaFileLoader::skipSection(io::IXMLReaderUTF8* reader, bool reportSkipping) +{ + #ifndef COLLADA_READER_DEBUG + if (reportSkipping) // always report in COLLADA_READER_DEBUG mode + #endif + os::Printer::log("COLLADA skipping section", core::stringc(reader->getNodeName()).c_str(), ELL_DEBUG); + + // skip if this element is empty anyway. + if (reader->isEmptyElement()) + return; + + // read until we've reached the last element in this section + u32 tagCounter = 1; + + while(tagCounter && reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT && + !reader->isEmptyElement()) + { + #ifdef COLLADA_READER_DEBUG + if (reportSkipping) + os::Printer::log("Skipping COLLADA unknown element", core::stringc(reader->getNodeName()).c_str(), ELL_DEBUG); + #endif + + ++tagCounter; + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + --tagCounter; + } +} + + +//! reads the <COLLADA> section and its content +void CColladaFileLoader::readColladaSection(io::IXMLReaderUTF8* reader) +{ + if (reader->isEmptyElement()) + return; + + // todo: patch level needs to be handled + const f32 version = core::fast_atof(core::stringc(reader->getAttributeValue("version")).c_str()); + Version = core::floor32(version)*10000+core::round32(core::fract(version)*1000.0f); + // Version 1.4 can be checked for by if (Version >= 10400) + + while(reader->read()) + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (assetSectionName == reader->getNodeName()) + readAssetSection(reader); + else + if (librarySectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryNodesSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryGeometriesSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryMaterialsSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryEffectsSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryImagesSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryCamerasSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryLightsSectionName == reader->getNodeName()) + readLibrarySection(reader); + else + if (libraryVisualScenesSectionName == reader->getNodeName()) + readVisualScene(reader); + else + if (assetSectionName == reader->getNodeName()) + readAssetSection(reader); + else + if (sceneSectionName == reader->getNodeName()) + readSceneSection(reader); + else + { + os::Printer::log("COLLADA loader warning: Wrong tag usage found", reader->getNodeName(), ELL_WARNING); + skipSection(reader, true); // unknown section + } + } +} + + +//! reads a <library> section and its content +void CColladaFileLoader::readLibrarySection(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading library", ELL_DEBUG); + #endif + + if (reader->isEmptyElement()) + return; + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + // animation section tbd + if (cameraPrefabName == reader->getNodeName()) + readCameraPrefab(reader); + else + // code section tbd + // controller section tbd + if (geometrySectionName == reader->getNodeName()) + readGeometry(reader); + else + if (imageSectionName == reader->getNodeName()) + readImage(reader); + else + if (lightPrefabName == reader->getNodeName()) + readLightPrefab(reader); + else + if (materialSectionName == reader->getNodeName()) + readMaterial(reader); + else + if (nodeSectionName == reader->getNodeName()) + { + CScenePrefab p(""); + + readNodeSection(reader, SceneManager->getRootSceneNode(), &p); + } + else + if (effectSectionName == reader->getNodeName()) + readEffect(reader); + else + // program section tbd + if (textureSectionName == reader->getNodeName()) + readTexture(reader); + else + skipSection(reader, true); // unknown section, not all allowed supported yet + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (librarySectionName == reader->getNodeName()) + break; // end reading. + if (libraryNodesSectionName == reader->getNodeName()) + break; // end reading. + if (libraryGeometriesSectionName == reader->getNodeName()) + break; // end reading. + if (libraryMaterialsSectionName == reader->getNodeName()) + break; // end reading. + if (libraryEffectsSectionName == reader->getNodeName()) + break; // end reading. + if (libraryImagesSectionName == reader->getNodeName()) + break; // end reading. + if (libraryLightsSectionName == reader->getNodeName()) + break; // end reading. + if (libraryCamerasSectionName == reader->getNodeName()) + break; // end reading. + } + } +} + + +//! reads a <visual_scene> element and stores it as a prefab +void CColladaFileLoader::readVisualScene(io::IXMLReaderUTF8* reader) +{ + CScenePrefab* p = 0; + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (visualSceneSectionName == reader->getNodeName()) + p = new CScenePrefab(readId(reader)); + else + if (p && nodeSectionName == reader->getNodeName()) // as a child of visual_scene + readNodeSection(reader, SceneManager->getRootSceneNode(), p); + else + if (assetSectionName == reader->getNodeName()) + readAssetSection(reader); + else + if (extraNodeName == reader->getNodeName()) + skipSection(reader, false); // ignore all other sections + else + { + os::Printer::log("COLLADA loader warning: Wrong tag usage found", reader->getNodeName(), ELL_WARNING); + skipSection(reader, true); // ignore all other sections + } + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (libraryVisualScenesSectionName == reader->getNodeName()) + return; + else + if ((visualSceneSectionName == reader->getNodeName()) && p) + { + Prefabs.push_back(p); + p = 0; + } + } + } +} + + +//! reads a <scene> section and its content +void CColladaFileLoader::readSceneSection(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading scene", ELL_DEBUG); + #endif + + if (reader->isEmptyElement()) + return; + + // read the scene + + core::matrix4 transform; // transformation of this node + core::aabbox3df bbox; + scene::IDummyTransformationSceneNode* node = 0; + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (lookatNodeName == reader->getNodeName()) + transform *= readLookAtNode(reader); + else + if (matrixNodeName == reader->getNodeName()) + transform *= readMatrixNode(reader); + else + if (perspectiveNodeName == reader->getNodeName()) + transform *= readPerspectiveNode(reader); + else + if (rotateNodeName == reader->getNodeName()) + transform *= readRotateNode(reader); + else + if (scaleNodeName == reader->getNodeName()) + transform *= readScaleNode(reader); + else + if (skewNodeName == reader->getNodeName()) + transform *= readSkewNode(reader); + else + if (translateNodeName == reader->getNodeName()) + transform *= readTranslateNode(reader); + else + if (bboxNodeName == reader->getNodeName()) + readBboxNode(reader, bbox); + else + if (nodeSectionName == reader->getNodeName()) + { + // create dummy node if there is none yet. + if (!node) + node = SceneManager->addDummyTransformationSceneNode(SceneManager->getRootSceneNode()); + + readNodeSection(reader, node); + } + else + if ((instanceSceneName == reader->getNodeName())) + readInstanceNode(reader, SceneManager->getRootSceneNode(), 0, 0,instanceSceneName); + else + if (extraNodeName == reader->getNodeName()) + skipSection(reader, false); + else + { + os::Printer::log("COLLADA loader warning: Wrong tag usage found", reader->getNodeName(), ELL_WARNING); + skipSection(reader, true); // ignore all other sections + } + } + else + if ((reader->getNodeType() == io::EXN_ELEMENT_END) && + (sceneSectionName == reader->getNodeName())) + return; + } + if (node) + node->getRelativeTransformationMatrix() = transform; +} + + +//! reads a <asset> section and its content +void CColladaFileLoader::readAssetSection(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading asset", ELL_DEBUG); + #endif + + if (reader->isEmptyElement()) + return; + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (upAxisNodeName == reader->getNodeName()) + { + reader->read(); + FlipAxis = (core::stringc("Z_UP") == reader->getNodeData()); + } + } + else + if ((reader->getNodeType() == io::EXN_ELEMENT_END) && + (assetSectionName == reader->getNodeName())) + return; + } +} + + +//! reads a <node> section and its content +void CColladaFileLoader::readNodeSection(io::IXMLReaderUTF8* reader, scene::ISceneNode* parent, CScenePrefab* p) +{ + if (reader->isEmptyElement()) + { + return; + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading empty node", ELL_DEBUG); + #endif + } + + core::stringc name = readId(reader); + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading node", name, ELL_DEBUG); + #endif + + core::matrix4 transform; // transformation of this node + core::aabbox3df bbox; + scene::ISceneNode* node = 0; // instance + CScenePrefab* nodeprefab = 0; // prefab for library_nodes usage + + if (p) + { + nodeprefab = new CScenePrefab(readId(reader)); + p->Children.push_back(nodeprefab); + Prefabs.push_back(nodeprefab); // in order to delete them later on + } + + // read the node + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (assetSectionName == reader->getNodeName()) + readAssetSection(reader); + else + if (lookatNodeName == reader->getNodeName()) + transform *= readLookAtNode(reader); + else + if (matrixNodeName == reader->getNodeName()) + transform *= readMatrixNode(reader); + else + if (perspectiveNodeName == reader->getNodeName()) + transform *= readPerspectiveNode(reader); + else + if (rotateNodeName == reader->getNodeName()) + transform *= readRotateNode(reader); + else + if (scaleNodeName == reader->getNodeName()) + transform *= readScaleNode(reader); + else + if (skewNodeName == reader->getNodeName()) + transform *= readSkewNode(reader); + else + if (translateNodeName == reader->getNodeName()) + transform *= readTranslateNode(reader); + else + if (bboxNodeName == reader->getNodeName()) + readBboxNode(reader, bbox); + else + if ((instanceName == reader->getNodeName()) || + (instanceNodeName == reader->getNodeName()) || + (instanceGeometryName == reader->getNodeName()) || + (instanceLightName == reader->getNodeName())) + { + scene::ISceneNode* newnode = 0; + readInstanceNode(reader, parent, &newnode, nodeprefab, reader->getNodeName()); + + if (node && newnode) + { + // move children from dummy to new node + ISceneNodeList::ConstIterator it = node->getChildren().begin(); + for (; it != node->getChildren().end(); it = node->getChildren().begin()) + (*it)->setParent(newnode); + + // remove previous dummy node + node->remove(); + node = newnode; + } + } + else + if (nodeSectionName == reader->getNodeName()) + { + // create dummy node if there is none yet. + if (CreateInstances && !node) + { + scene::IDummyTransformationSceneNode* dummy = + SceneManager->addDummyTransformationSceneNode(parent); + dummy->getRelativeTransformationMatrix() = transform; + node = dummy; + } + else + node = parent; + + // read and add child + readNodeSection(reader, node, nodeprefab); + } + else + if (extraNodeName == reader->getNodeName()) + skipSection(reader, false); + else + skipSection(reader, true); // ignore all other sections + + } // end if node + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (nodeSectionName == reader->getNodeName()) + break; + } + } + + if (nodeprefab) + nodeprefab->Transformation = transform; + else + if (node) + { + // set transformation correctly into node. + node->setPosition(transform.getTranslation()); + node->setRotation(transform.getRotationDegrees()); + node->setScale(transform.getScale()); + node->updateAbsolutePosition(); + + node->setName(name); + } +} + + +//! reads a <lookat> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readLookAtNode(io::IXMLReaderUTF8* reader) +{ + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading look at node", ELL_DEBUG); + #endif + + f32 floats[9]; + readFloatsInsideElement(reader, floats, 9); + + mat.buildCameraLookAtMatrixLH( + core::vector3df(floats[0], floats[1], floats[2]), + core::vector3df(floats[3], floats[4], floats[5]), + core::vector3df(floats[6], floats[7], floats[8])); + + return mat; +} + + +//! reads a <skew> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readSkewNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading skew node", ELL_DEBUG); + #endif + + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + f32 floats[7]; // angle rotation-axis translation-axis + readFloatsInsideElement(reader, floats, 7); + + // build skew matrix from these 7 floats + core::quaternion q; + q.fromAngleAxis(floats[0]*core::DEGTORAD, core::vector3df(floats[1], floats[2], floats[3])); + mat = q.getMatrix(); + + if (floats[4]==1.f) // along x-axis + { + mat[4]=0.f; + mat[6]=0.f; + mat[8]=0.f; + mat[9]=0.f; + } + else + if (floats[5]==1.f) // along y-axis + { + mat[1]=0.f; + mat[2]=0.f; + mat[8]=0.f; + mat[9]=0.f; + } + else + if (floats[6]==1.f) // along z-axis + { + mat[1]=0.f; + mat[2]=0.f; + mat[4]=0.f; + mat[6]=0.f; + } + + return mat; +} + + +//! reads a <boundingbox> element and its content and stores it in bbox +void CColladaFileLoader::readBboxNode(io::IXMLReaderUTF8* reader, + core::aabbox3df& bbox) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading boundingbox node", ELL_DEBUG); + #endif + + bbox.reset(core::aabbox3df()); + + if (reader->isEmptyElement()) + return; + + f32 floats[3]; + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (minNodeName == reader->getNodeName()) + { + readFloatsInsideElement(reader, floats, 3); + bbox.MinEdge.set(floats[0], floats[1], floats[2]); + } + else + if (maxNodeName == reader->getNodeName()) + { + readFloatsInsideElement(reader, floats, 3); + bbox.MaxEdge.set(floats[0], floats[1], floats[2]); + } + else + skipSection(reader, true); // ignore all other sections + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (bboxNodeName == reader->getNodeName()) + break; + } + } +} + + +//! reads a <matrix> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readMatrixNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading matrix node", ELL_DEBUG); + #endif + + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + readFloatsInsideElement(reader, mat.pointer(), 16); + // put translation into the correct place + if (FlipAxis) + { + core::matrix4 mat2(mat, core::matrix4::EM4CONST_TRANSPOSED); + mat2[1]=mat[8]; + mat2[2]=mat[4]; + mat2[4]=mat[2]; + mat2[5]=mat[10]; + mat2[6]=mat[6]; + mat2[8]=mat[1]; + mat2[9]=mat[9]; + mat2[10]=mat[5]; + mat2[12]=mat[3]; + mat2[13]=mat[11]; + mat2[14]=mat[7]; + return mat2; + } + else + return core::matrix4(mat, core::matrix4::EM4CONST_TRANSPOSED); +} + + +//! reads a <perspective> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readPerspectiveNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading perspective node", ELL_DEBUG); + #endif + + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + f32 floats[1]; + readFloatsInsideElement(reader, floats, 1); + + // TODO: build perspecitve matrix from this float + + os::Printer::log("COLLADA loader warning: <perspective> not implemented yet.", ELL_WARNING); + + return mat; +} + + +//! reads a <rotate> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readRotateNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading rotate node", ELL_DEBUG); + #endif + + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + f32 floats[4]; + readFloatsInsideElement(reader, floats, 4); + + if (!core::iszero(floats[3])) + { + core::quaternion q; + if (FlipAxis) + q.fromAngleAxis(floats[3]*core::DEGTORAD, core::vector3df(floats[0], floats[2], floats[1])); + else + q.fromAngleAxis(floats[3]*core::DEGTORAD, core::vector3df(floats[0], floats[1], floats[2])); + return q.getMatrix(); + } + else + return core::IdentityMatrix; +} + + +//! reads a <scale> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readScaleNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading scale node", ELL_DEBUG); + #endif + + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + f32 floats[3]; + readFloatsInsideElement(reader, floats, 3); + + if (FlipAxis) + mat.setScale(core::vector3df(floats[0], floats[2], floats[1])); + else + mat.setScale(core::vector3df(floats[0], floats[1], floats[2])); + + return mat; +} + + +//! reads a <translate> element and its content and creates a matrix from it +core::matrix4 CColladaFileLoader::readTranslateNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading translate node", ELL_DEBUG); + #endif + + core::matrix4 mat; + if (reader->isEmptyElement()) + return mat; + + f32 floats[3]; + readFloatsInsideElement(reader, floats, 3); + + if (FlipAxis) + mat.setTranslation(core::vector3df(floats[0], floats[2], floats[1])); + else + mat.setTranslation(core::vector3df(floats[0], floats[1], floats[2])); + + return mat; +} + + +//! reads any kind of <instance*> node +void CColladaFileLoader::readInstanceNode(io::IXMLReaderUTF8* reader, + scene::ISceneNode* parent, scene::ISceneNode** outNode, + CScenePrefab* p, const core::stringc& type) +{ + // find prefab of the specified id + core::stringc url = reader->getAttributeValue("url"); + uriToId(url); + + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading instance", url, ELL_DEBUG); + #endif + + if (!reader->isEmptyElement()) + { + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (bindMaterialName == reader->getNodeName()) + readBindMaterialSection(reader,url); + else + if (extraNodeName == reader->getNodeName()) + skipSection(reader, false); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + break; + } + } + instantiateNode(parent, outNode, p, url, type); +} + + +void CColladaFileLoader::instantiateNode(scene::ISceneNode* parent, + scene::ISceneNode** outNode, CScenePrefab* p, const core::stringc& url, + const core::stringc& type) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA instantiate node", ELL_DEBUG); + #endif + + for (u32 i=0; i<Prefabs.size(); ++i) + { + if (url == "" || url == Prefabs[i]->getId()) + { + if (p) + p->Children.push_back(Prefabs[i]); + else + if (CreateInstances) + { + scene::ISceneNode * newNode + = Prefabs[i]->addInstance(parent, SceneManager); + if (outNode) + { + *outNode = newNode; + if (*outNode) + (*outNode)->setName(url); + } + } + return; + } + } + if (p) + { + if (instanceGeometryName==type) + { + Prefabs.push_back(new CGeometryPrefab(url)); + p->Children.push_back(Prefabs.getLast()); + } + } +} + + +//! reads a <camera> element and stores it as prefab +void CColladaFileLoader::readCameraPrefab(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading camera prefab", ELL_DEBUG); + #endif + + CCameraPrefab* prefab = new CCameraPrefab(readId(reader)); + + if (!reader->isEmptyElement()) + { + // read techniques optics and imager (the latter is completely ignored, though) + readColladaParameters(reader, cameraPrefabName); + + SColladaParam* p; + + // XFOV not yet supported + p = getColladaParameter(ECPN_YFOV); + if (p && p->Type == ECPT_FLOAT) + prefab->YFov = p->Floats[0]; + + p = getColladaParameter(ECPN_ZNEAR); + if (p && p->Type == ECPT_FLOAT) + prefab->ZNear = p->Floats[0]; + + p = getColladaParameter(ECPN_ZFAR); + if (p && p->Type == ECPT_FLOAT) + prefab->ZFar = p->Floats[0]; + // orthographic camera uses LEFT, RIGHT, TOP, and BOTTOM + } + + Prefabs.push_back(prefab); +} + + +//! reads a <image> element and stores it in the image section +void CColladaFileLoader::readImage(io::IXMLReaderUTF8* reader) +{ + // add image to list of loaded images. + Images.push_back(SColladaImage()); + SColladaImage& image=Images.getLast(); + + image.Id = readId(reader); + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading image", core::stringc(image.Id), ELL_DEBUG); + #endif + image.Dimension.Height = (u32)reader->getAttributeValueAsInt("height"); + image.Dimension.Width = (u32)reader->getAttributeValueAsInt("width"); + + if (Version >= 10400) // start with 1.4 + { + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (assetSectionName == reader->getNodeName()) + skipSection(reader, false); + else + if (initFromName == reader->getNodeName()) + { + reader->read(); + image.Source = reader->getNodeData(); + image.Source.trim(); + image.SourceIsFilename=true; + } + else + if (dataName == reader->getNodeName()) + { + reader->read(); + image.Source = reader->getNodeData(); + image.Source.trim(); + image.SourceIsFilename=false; + } + else + if (extraNodeName == reader->getNodeName()) + skipSection(reader, false); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (initFromName == reader->getNodeName()) + return; + } + } + } + else + { + image.Source = reader->getAttributeValue("source"); + image.Source.trim(); + image.SourceIsFilename=false; + } +} + + +//! reads a <texture> element and stores it in the texture section +void CColladaFileLoader::readTexture(io::IXMLReaderUTF8* reader) +{ + // add texture to list of loaded textures. + Textures.push_back(SColladaTexture()); + SColladaTexture& texture=Textures.getLast(); + + texture.Id = readId(reader); + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading texture", core::stringc(texture.Id), ELL_DEBUG); + #endif + + if (!reader->isEmptyElement()) + { + readColladaInputs(reader, textureSectionName); + SColladaInput* input = getColladaInput(ECIS_IMAGE); + if (input) + { + const core::stringc imageName = input->Source; + texture.Texture = getTextureFromImage(imageName, NULL); + } + } +} + + +//! reads a <material> element and stores it in the material section +void CColladaFileLoader::readMaterial(io::IXMLReaderUTF8* reader) +{ + // add material to list of loaded materials. + Materials.push_back(SColladaMaterial()); + + SColladaMaterial& material = Materials.getLast(); + material.Id = readId(reader); + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading material", core::stringc(material.Id), ELL_DEBUG); + #endif + + if (Version >= 10400) + { + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT && + instanceEffectName == reader->getNodeName()) + { + material.InstanceEffectId = reader->getAttributeValue("url"); + uriToId(material.InstanceEffectId); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END && + materialSectionName == reader->getNodeName()) + { + break; + } + } // end while reader->read(); + } + else + { + if (!reader->isEmptyElement()) + { + readColladaInputs(reader, materialSectionName); + SColladaInput* input = getColladaInput(ECIS_TEXTURE); + if (input) + { + core::stringc textureName = input->Source; + uriToId(textureName); + for (u32 i=0; i<Textures.size(); ++i) + if (textureName == Textures[i].Id) + { + material.Mat.setTexture(0, Textures[i].Texture); + break; + } + } + + //does not work because the wrong start node is chosen due to reading of inputs before +#if 0 + readColladaParameters(reader, materialSectionName); + + SColladaParam* p; + + p = getColladaParameter(ECPN_AMBIENT); + if (p && p->Type == ECPT_FLOAT3) + material.Mat.AmbientColor = video::SColorf(p->Floats[0],p->Floats[1],p->Floats[2]).toSColor(); + p = getColladaParameter(ECPN_DIFFUSE); + if (p && p->Type == ECPT_FLOAT3) + material.Mat.DiffuseColor = video::SColorf(p->Floats[0],p->Floats[1],p->Floats[2]).toSColor(); + p = getColladaParameter(ECPN_SPECULAR); + if (p && p->Type == ECPT_FLOAT3) + material.Mat.DiffuseColor = video::SColorf(p->Floats[0],p->Floats[1],p->Floats[2]).toSColor(); + p = getColladaParameter(ECPN_SHININESS); + if (p && p->Type == ECPT_FLOAT) + material.Mat.Shininess = p->Floats[0]; +#endif + } + } +} + +void CColladaFileLoader::readEffect(io::IXMLReaderUTF8* reader, SColladaEffect * effect) +{ + static const core::stringc constantNode("constant"); + static const core::stringc lambertNode("lambert"); + static const core::stringc phongNode("phong"); + static const core::stringc blinnNode("blinn"); + static const core::stringc emissionNode("emission"); + static const core::stringc ambientNode("ambient"); + static const core::stringc diffuseNode("diffuse"); + static const core::stringc specularNode("specular"); + static const core::stringc shininessNode("shininess"); + static const core::stringc reflectiveNode("reflective"); + static const core::stringc reflectivityNode("reflectivity"); + static const core::stringc transparentNode("transparent"); + static const core::stringc transparencyNode("transparency"); + static const core::stringc indexOfRefractionNode("index_of_refraction"); + + if (!effect) + { + Effects.push_back(SColladaEffect()); + effect = &Effects.getLast(); + effect->Parameters = new io::CAttributes(); + effect->Id = readId(reader); + effect->Transparency = 1.f; + effect->Mat.Lighting=true; + effect->Mat.NormalizeNormals=true; + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading effect", core::stringc(effect->Id), ELL_DEBUG); + #endif + } + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + // first come the tags we descend, but ignore the top-levels + if (!reader->isEmptyElement() && ((profileCOMMONSectionName == reader->getNodeName()) || + (techniqueNodeName == reader->getNodeName()))) + readEffect(reader,effect); + else + if (newParamName == reader->getNodeName()) + readParameter(reader, effect->Parameters); + else + // these are the actual materials inside technique + if (constantNode == reader->getNodeName() || + lambertNode == reader->getNodeName() || + phongNode == reader->getNodeName() || + blinnNode == reader->getNodeName()) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading effect part", reader->getNodeName(), ELL_DEBUG); + #endif + effect->Mat.setFlag(irr::video::EMF_GOURAUD_SHADING, + phongNode == reader->getNodeName() || + blinnNode == reader->getNodeName()); + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + const core::stringc node = reader->getNodeName(); + if (emissionNode == node || ambientNode == node || + diffuseNode == node || specularNode == node || + reflectiveNode == node || transparentNode == node ) + { + // color or texture types + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT && + colorNodeName == reader->getNodeName()) + { + const video::SColorf colorf = readColorNode(reader); + const video::SColor color = colorf.toSColor(); + if (emissionNode == node) + effect->Mat.EmissiveColor = color; + else + if (ambientNode == node) + effect->Mat.AmbientColor = color; + else + if (diffuseNode == node) + effect->Mat.DiffuseColor = color; + else + if (specularNode == node) + effect->Mat.SpecularColor = color; + else + if (transparentNode == node) + effect->Transparency = colorf.getAlpha(); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT && + textureNodeName == reader->getNodeName()) + { + effect->Textures.push_back(reader->getAttributeValue("texture")); + break; + } + else + if (reader->getNodeType() == io::EXN_ELEMENT) + skipSection(reader, false); + else + if (reader->getNodeType() == io::EXN_ELEMENT_END && + node == reader->getNodeName()) + break; + } + } + else + if (shininessNode == node || reflectivityNode == node || + transparencyNode == node || indexOfRefractionNode == node ) + { + // float or param types + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT && + floatNodeName == reader->getNodeName()) + { + f32 f = readFloatNode(reader); + if (shininessNode == node) + effect->Mat.Shininess = f; + else + if (transparencyNode == node) + effect->Transparency *= f; + } + else + if (reader->getNodeType() == io::EXN_ELEMENT) + skipSection(reader, false); + else + if (reader->getNodeType() == io::EXN_ELEMENT_END && + node == reader->getNodeName()) + break; + } + } + else + skipSection(reader, true); // ignore all other nodes + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END && ( + constantNode == reader->getNodeName() || + lambertNode == reader->getNodeName() || + phongNode == reader->getNodeName() || + blinnNode == reader->getNodeName() + )) + break; + } + } + else + if (!reader->isEmptyElement() && (extraNodeName == reader->getNodeName())) + readEffect(reader,effect); + else + if (doubleSidedNodeName == reader->getNodeName()) + { + // read the GoogleEarth extra flag for double sided polys + s32 doubleSided = 0; + readIntsInsideElement(reader,&doubleSided,1); + if (doubleSided) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("Setting double sided flag for effect.", ELL_DEBUG); + #endif + + effect->Mat.setFlag(irr::video::EMF_BACK_FACE_CULLING,false); + } + } + else + skipSection(reader, true); // ignore all other sections + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (effectSectionName == reader->getNodeName()) + break; + else + if (profileCOMMONSectionName == reader->getNodeName()) + break; + else + if (techniqueNodeName == reader->getNodeName()) + break; + else + if (extraNodeName == reader->getNodeName()) + break; + } + } + + if (effect->Mat.AmbientColor == video::SColor(0) && + effect->Mat.DiffuseColor != video::SColor(0)) + effect->Mat.AmbientColor = effect->Mat.DiffuseColor; + if (effect->Mat.DiffuseColor == video::SColor(0) && + effect->Mat.AmbientColor != video::SColor(0)) + effect->Mat.DiffuseColor = effect->Mat.AmbientColor; + if ((effect->Transparency != 0.0f) && (effect->Transparency != 1.0f)) + { + effect->Mat.MaterialType = irr::video::EMT_TRANSPARENT_VERTEX_ALPHA; + effect->Mat.ZWriteEnable = false; + } + + video::E_TEXTURE_CLAMP twu = video::ETC_REPEAT; + s32 idx = effect->Parameters->findAttribute(wrapsName.c_str()); + if ( idx >= 0 ) + twu = (video::E_TEXTURE_CLAMP)(effect->Parameters->getAttributeAsInt(idx)); + video::E_TEXTURE_CLAMP twv = video::ETC_REPEAT; + idx = effect->Parameters->findAttribute(wraptName.c_str()); + if ( idx >= 0 ) + twv = (video::E_TEXTURE_CLAMP)(effect->Parameters->getAttributeAsInt(idx)); + + for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i) + { + effect->Mat.TextureLayer[i].TextureWrapU = twu; + effect->Mat.TextureLayer[i].TextureWrapV = twv; + } + + effect->Mat.setFlag(video::EMF_BILINEAR_FILTER, effect->Parameters->getAttributeAsBool("bilinear")); + effect->Mat.setFlag(video::EMF_TRILINEAR_FILTER, effect->Parameters->getAttributeAsBool("trilinear")); + effect->Mat.setFlag(video::EMF_ANISOTROPIC_FILTER, effect->Parameters->getAttributeAsBool("anisotropic")); +} + + +const SColladaMaterial* CColladaFileLoader::findMaterial(const core::stringc& materialName) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA find material", materialName, ELL_DEBUG); + #endif + + // do a quick lookup in the materials + SColladaMaterial matToFind; + matToFind.Id = materialName; + s32 mat = Materials.binary_search(matToFind); + if (mat == -1) + return 0; + // instantiate the material effect if needed + if (Materials[mat].InstanceEffectId.size() != 0) + { + // do a quick lookup in the effects + SColladaEffect effectToFind; + effectToFind.Id = Materials[mat].InstanceEffectId; + s32 effect = Effects.binary_search(effectToFind); + if (effect != -1) + { + // found the effect, instantiate by copying into the material + Materials[mat].Mat = Effects[effect].Mat; + if (Effects[effect].Textures.size()) + Materials[mat].Mat.setTexture(0, getTextureFromImage(Effects[effect].Textures[0], &(Effects[effect]))); + Materials[mat].Transparency = Effects[effect].Transparency; + // and indicate the material is instantiated by removing the effect ref + Materials[mat].InstanceEffectId = ""; + } + else + return 0; + } + return &Materials[mat]; +} + + +void CColladaFileLoader::readBindMaterialSection(io::IXMLReaderUTF8* reader, const core::stringc & id) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading bind material", ELL_DEBUG); + #endif + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (instanceMaterialName == reader->getNodeName()) + { + // the symbol to retarget, and the target material + core::stringc meshbufferReference = reader->getAttributeValue("symbol"); + if (meshbufferReference.size()==0) + continue; + core::stringc target = reader->getAttributeValue("target"); + uriToId(target); + if (target.size()==0) + continue; + const SColladaMaterial * material = findMaterial(target); + if (!material) + continue; + // bind any pending materials for this node + meshbufferReference = id+"/"+meshbufferReference; +#ifdef COLLADA_READER_DEBUG + os::Printer::log((core::stringc("Material binding: ")+meshbufferReference+" "+target).c_str(), ELL_DEBUG); +#endif + if (MaterialsToBind.find(meshbufferReference)) + { + core::array<irr::scene::IMeshBuffer*> & toBind + = MeshesToBind[MaterialsToBind[meshbufferReference]]; +#ifdef COLLADA_READER_DEBUG + os::Printer::log("Material binding now ",material->Id.c_str(), ELL_DEBUG); + os::Printer::log("#meshbuffers",core::stringc(toBind.size()).c_str(), ELL_DEBUG); +#endif + SMesh tmpmesh; + for (u32 i = 0; i < toBind.size(); ++i) + { + toBind[i]->getMaterial() = material->Mat; + tmpmesh.addMeshBuffer(toBind[i]); + + if ((material->Transparency!=0.0f) && (material->Transparency!=1.0f)) + { + toBind[i]->getMaterial().MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + toBind[i]->getMaterial().ZWriteEnable = false; + } + } + SceneManager->getMeshManipulator()->setVertexColors(&tmpmesh,material->Mat.DiffuseColor); + if ((material->Transparency!=0.0f) && (material->Transparency!=1.0f)) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA found transparency material", core::stringc(material->Transparency).c_str(), ELL_DEBUG); + #endif + SceneManager->getMeshManipulator()->setVertexColorAlpha(&tmpmesh, core::floor32(material->Transparency*255.0f)); + } + } + } + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END && + bindMaterialName == reader->getNodeName()) + break; + } +} + + +//! reads a <geometry> element and stores it as mesh if possible +void CColladaFileLoader::readGeometry(io::IXMLReaderUTF8* reader) +{ + core::stringc id = readId(reader); + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading geometry", id, ELL_DEBUG); + #endif + + SAnimatedMesh* amesh = new SAnimatedMesh(); + scene::SMesh* mesh = new SMesh(); + amesh->addMesh(mesh); + core::array<SSource> sources; + bool okToReadArray = false; + + // handles geometry node and the mesh children in this loop + // read sources with arrays and accessor for each mesh + if (!reader->isEmptyElement()) + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + const char* nodeName = reader->getNodeName(); + if (meshSectionName == nodeName) + { + // inside a mesh section. Don't have to do anything here. + } + else + if (sourceSectionName == nodeName) + { + // create a new source + sources.push_back(SSource()); + sources.getLast().Id = readId(reader); + + #ifdef COLLADA_READER_DEBUG + os::Printer::log("Reading source", sources.getLast().Id.c_str(), ELL_DEBUG); + #endif + } + else + if (arraySectionName == nodeName || floatArraySectionName == nodeName || intArraySectionName == nodeName) + { + // create a new array and read it. + if (!sources.empty()) + { + sources.getLast().Array.Name = readId(reader); + + int count = reader->getAttributeValueAsInt("count"); + sources.getLast().Array.Data.set_used(count); // pre allocate + + // check if type of array is ok + const char* type = reader->getAttributeValue("type"); + okToReadArray = (type && (!strcmp("float", type) || !strcmp("int", type))) || floatArraySectionName == nodeName || intArraySectionName == nodeName; + + #ifdef COLLADA_READER_DEBUG + os::Printer::log("Read array", sources.getLast().Array.Name.c_str(), ELL_DEBUG); + #endif + } + #ifdef COLLADA_READER_DEBUG + else + os::Printer::log("Warning, array outside source found", + readId(reader).c_str(), ELL_DEBUG); + #endif + + } + else + if (accessorSectionName == nodeName) // child of source (below a technique tag) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("Reading accessor", ELL_DEBUG); + #endif + SAccessor accessor; + accessor.Count = reader->getAttributeValueAsInt("count"); + accessor.Offset = reader->getAttributeValueAsInt("offset"); + accessor.Stride = reader->getAttributeValueAsInt("stride"); + if (accessor.Stride == 0) + accessor.Stride = 1; + + // the accessor contains some information on how to access (boi!) the array, + // the info is stored in collada style parameters, so just read them. + readColladaParameters(reader, accessorSectionName); + if (!sources.empty()) + { + sources.getLast().Accessors.push_back(accessor); + sources.getLast().Accessors.getLast().Parameters = ColladaParameters; + } + } + else + if (verticesSectionName == nodeName) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("Reading vertices", ELL_DEBUG); + #endif + // read vertex input position source + readColladaInputs(reader, verticesSectionName); + } + else + // lines and linestrips missing + if (polygonsSectionName == nodeName || + polylistSectionName == nodeName || + trianglesSectionName == nodeName) + { + // read polygons section + readPolygonSection(reader, sources, mesh, id); + } + else + // trifans, and tristrips missing + if (doubleSidedNodeName == reader->getNodeName()) + { + // read the extra flag for double sided polys + s32 doubleSided = 0; + readIntsInsideElement(reader,&doubleSided,1); + if (doubleSided) + { + #ifdef COLLADA_READER_DEBUG + os::Printer::log("Setting double sided flag for mesh.", ELL_DEBUG); + #endif + amesh->setMaterialFlag(irr::video::EMF_BACK_FACE_CULLING,false); + } + } + else + // techniqueCommon or 'technique profile=common' must not be skipped + if ((techniqueCommonSectionName != nodeName) // Collada 1.2/1.3 + && (techniqueNodeName != nodeName) // Collada 1.4+ + && (extraNodeName != nodeName)) + { + os::Printer::log("COLLADA loader warning: Wrong tag usage found in geometry", reader->getNodeName(), ELL_WARNING); + skipSection(reader, true); // ignore all other sections + } + } // end if node type is element + else + if (reader->getNodeType() == io::EXN_TEXT) + { + // read array data + if (okToReadArray && !sources.empty()) + { + core::array<f32>& a = sources.getLast().Array.Data; + core::stringc data = reader->getNodeData(); + data.trim(); + const c8* p = &data[0]; + + for (u32 i=0; i<a.size(); ++i) + { + findNextNoneWhiteSpace(&p); + if (*p) + a[i] = readFloat(&p); + else + a[i] = 0.0f; + } + } // end reading array + + okToReadArray = false; + + } // end if node type is text + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (geometrySectionName == reader->getNodeName()) + { + // end of geometry section reached, cancel out + break; + } + } + } // end while reader->read(); + + // add mesh as geometry + + mesh->recalculateBoundingBox(); + amesh->recalculateBoundingBox(); + + // create virtual file name + io::path filename = CurrentlyLoadingMesh; + filename += '#'; + filename += id; + + // add to scene manager + if (LoadedMeshCount) + { + SceneManager->getMeshCache()->addMesh(filename.c_str(), amesh); + os::Printer::log("Added COLLADA mesh", filename.c_str(), ELL_DEBUG); + } + else + { + FirstLoadedMeshName = filename; + FirstLoadedMesh = amesh; + FirstLoadedMesh->grab(); + } + + ++LoadedMeshCount; + mesh->drop(); + amesh->drop(); + + // create geometry prefab + u32 i; + for (i=0; i<Prefabs.size(); ++i) + { + if (Prefabs[i]->getId()==id) + { + ((CGeometryPrefab*)Prefabs[i])->Mesh=mesh; + break; + } + } + if (i==Prefabs.size()) + { + CGeometryPrefab* prefab = new CGeometryPrefab(id); + prefab->Mesh = mesh; + Prefabs.push_back(prefab); + } + + // store as dummy mesh if no instances will be created + if (!CreateInstances && !DummyMesh) + { + DummyMesh = amesh; + DummyMesh->grab(); + } +} + + +struct SPolygon +{ + core::array<s32> Indices; +}; + +//! reads a polygons section and creates a mesh from it +void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, + core::array<SSource>& sources, scene::SMesh* mesh, + const core::stringc& geometryId) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading polygon section", ELL_DEBUG); + #endif + + core::stringc materialName = reader->getAttributeValue("material"); + + core::stringc polygonType = reader->getNodeName(); + const int polygonCount = reader->getAttributeValueAsInt("count"); // Not useful because it only determines the number of primitives, which have arbitrary vertices in case of polygon + core::array<SPolygon> polygons; + if (polygonType == polygonsSectionName) + polygons.reallocate(polygonCount); + core::array<int> vCounts; + bool parsePolygonOK = false; + bool parseVcountOK = false; + u32 inputSemanticCount = 0; + bool unresolvedInput=false; + u32 maxOffset = 0; + core::array<SColladaInput> localInputs; + + // read all <input> and primitives + if (!reader->isEmptyElement()) + while(reader->read()) + { + const char* nodeName = reader->getNodeName(); + + if (reader->getNodeType() == io::EXN_ELEMENT) + { + // polygon node may contain params + if (inputTagName == nodeName) + { + // read input tag + readColladaInput(reader, localInputs); + + // resolve input source + SColladaInput& inp = localInputs.getLast(); + + // get input source array id, if it is a vertex input, take + // the <vertex><input>-source attribute. + if (inp.Semantic == ECIS_VERTEX) + { + inp.Source = Inputs[0].Source; + for (u32 i=1; i<Inputs.size(); ++i) + { + localInputs.push_back(Inputs[i]); + uriToId(localInputs.getLast().Source); + maxOffset = core::max_(maxOffset,localInputs.getLast().Offset); + ++inputSemanticCount; + } + } + uriToId(inp.Source); + maxOffset = core::max_(maxOffset,inp.Offset); + ++inputSemanticCount; + } + else + if (primitivesName == nodeName) + { + parsePolygonOK = true; + polygons.push_back(SPolygon()); + } + else + if (vcountName == nodeName) + { + parseVcountOK = true; + } // end is polygon node + } // end is element node + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (primitivesName == nodeName) + parsePolygonOK = false; // end parsing a polygon + else + if (vcountName == nodeName) + parseVcountOK = false; // end parsing vcounts + else + if (polygonType == nodeName) + break; // cancel out and create mesh + + } // end is element end + else + if (reader->getNodeType() == io::EXN_TEXT) + { + if (parseVcountOK) + { + core::stringc data = reader->getNodeData(); + data.trim(); + const c8* p = &data[0]; + while(*p) + { + findNextNoneWhiteSpace(&p); + if (*p) + vCounts.push_back(readInt(&p)); + } + parseVcountOK = false; + } + else + if (parsePolygonOK && polygons.size()) + { + core::stringc data = reader->getNodeData(); + data.trim(); + const c8* p = &data[0]; + SPolygon& poly = polygons.getLast(); + if (polygonType == polygonsSectionName) + poly.Indices.reallocate((maxOffset+1)*3); + else + poly.Indices.reallocate(polygonCount*(maxOffset+1)*3); + + if (vCounts.empty()) + { + while(*p) + { + findNextNoneWhiteSpace(&p); + poly.Indices.push_back(readInt(&p)); + } + } + else + { + for (u32 i = 0; i < vCounts.size(); i++) + { + const int polyVCount = vCounts[i]; + core::array<int> polyCorners; + + for (u32 j = 0; j < polyVCount * inputSemanticCount; j++) + { + if (!*p) + break; + findNextNoneWhiteSpace(&p); + polyCorners.push_back(readInt(&p)); + } + + while (polyCorners.size() >= 3 * inputSemanticCount) + { + // add one triangle's worth of indices + for (u32 k = 0; k < inputSemanticCount * 3; ++k) + { + poly.Indices.push_back(polyCorners[k]); + } + + // remove one corner from our poly + polyCorners.erase(inputSemanticCount,inputSemanticCount); + } + polyCorners.clear(); + } + vCounts.clear(); + } + parsePolygonOK = false; + } + } + } // end while reader->read() + + // find source array (we'll ignore accessors for this implementation) + for (u32 i=0; i<localInputs.size(); ++i) + { + SColladaInput& inp = localInputs[i]; + u32 s; + for (s=0; s<sources.size(); ++s) + { + if (sources[s].Id == inp.Source) + { + // slot found + inp.Data = sources[s].Array.Data.pointer(); + inp.Stride = sources[s].Accessors[0].Stride; + break; + } + } + + if (s == sources.size()) + { + os::Printer::log("COLLADA Warning, polygon input source not found", + inp.Source.c_str(), ELL_DEBUG); + inp.Semantic=ECIS_COUNT; // for unknown + unresolvedInput=true; + } + else + { + #ifdef COLLADA_READER_DEBUG + // print slot + core::stringc tmp = "Added slot "; + tmp += inputSemanticNames[inp.Semantic]; + tmp += " sourceArray:"; + tmp += inp.Source; + os::Printer::log(tmp.c_str(), ELL_DEBUG); + #endif + } + } + + if ((inputSemanticCount == 0) || !polygons.size()) + return; // cancel if there are no polygons anyway. + + // analyze content of Inputs to create a fitting mesh buffer + + u32 u; + u32 textureCoordSetCount = 0; + bool normalSlotCount = false; + u32 secondTexCoordSetIndex = 0xFFFFFFFF; + + for (u=0; u<Inputs.size(); ++u) + { + if (Inputs[u].Semantic == ECIS_TEXCOORD || Inputs[u].Semantic == ECIS_UV ) + { + ++textureCoordSetCount; + + if (textureCoordSetCount==2) + secondTexCoordSetIndex = u; + } + else + if (Inputs[u].Semantic == ECIS_NORMAL) + normalSlotCount=true; + } + + // if there is more than one texture coordinate set, create a lightmap mesh buffer, + // otherwise use a standard mesh buffer + + scene::IMeshBuffer* buffer = 0; + ++maxOffset; // +1 to jump to the next value + + if ( textureCoordSetCount < 2 ) + { + // standard mesh buffer + + scene::SMeshBuffer* mbuffer = new SMeshBuffer(); + buffer = mbuffer; + + core::map<video::S3DVertex, int> vertMap; + + for (u32 i=0; i<polygons.size(); ++i) + { + core::array<u16> indices; + const u32 vertexCount = polygons[i].Indices.size() / maxOffset; + mbuffer->Vertices.reallocate(mbuffer->Vertices.size()+vertexCount); + + // for all index/semantic groups + for (u32 v=0; v<polygons[i].Indices.size(); v+=maxOffset) + { + video::S3DVertex vtx; + vtx.Color.set(255,255,255,255); + + // for all input semantics + for (u32 k=0; k<localInputs.size(); ++k) + { + if (!localInputs[k].Data) + continue; + // build vertex from input semantics. + + const u32 idx = localInputs[k].Stride*polygons[i].Indices[v+localInputs[k].Offset]; + + switch(localInputs[k].Semantic) + { + case ECIS_POSITION: + case ECIS_VERTEX: + vtx.Pos.X = localInputs[k].Data[idx+0]; + if (FlipAxis) + { + vtx.Pos.Z = localInputs[k].Data[idx+1]; + vtx.Pos.Y = localInputs[k].Data[idx+2]; + } + else + { + vtx.Pos.Y = localInputs[k].Data[idx+1]; + vtx.Pos.Z = localInputs[k].Data[idx+2]; + } + break; + case ECIS_NORMAL: + vtx.Normal.X = localInputs[k].Data[idx+0]; + if (FlipAxis) + { + vtx.Normal.Z = localInputs[k].Data[idx+1]; + vtx.Normal.Y = localInputs[k].Data[idx+2]; + } + else + { + vtx.Normal.Y = localInputs[k].Data[idx+1]; + vtx.Normal.Z = localInputs[k].Data[idx+2]; + } + break; + case ECIS_TEXCOORD: + case ECIS_UV: + vtx.TCoords.X = localInputs[k].Data[idx+0]; + vtx.TCoords.Y = 1-localInputs[k].Data[idx+1]; + break; + case ECIS_TANGENT: + break; + default: + break; + } + } + + //first, try to find this vertex in the mesh + core::map<video::S3DVertex, int>::Node* n = vertMap.find(vtx); + if (n) + { + indices.push_back(n->getValue()); + } + else + { + indices.push_back(mbuffer->getVertexCount()); + mbuffer->Vertices.push_back(vtx); + vertMap.insert(vtx, mbuffer->getVertexCount()-1); + } + } // end for all vertices + + if (polygonsSectionName == polygonType && + indices.size() > 3) + { + // need to tesselate for polygons of 4 or more vertices + // for now we naively turn interpret it as a triangle fan + // as full tesselation is problematic + if (FlipAxis) + { + for (u32 ind = indices.size()-3; ind>0 ; --ind) + { + mbuffer->Indices.push_back(indices[0]); + mbuffer->Indices.push_back(indices[ind+2]); + mbuffer->Indices.push_back(indices[ind+1]); + } + } + else + { + for (u32 ind = 0; ind+2 < indices.size(); ++ind) + { + mbuffer->Indices.push_back(indices[0]); + mbuffer->Indices.push_back(indices[ind+1]); + mbuffer->Indices.push_back(indices[ind+2]); + } + } + } + else + { + // it's just triangles + for (u32 ind = 0; ind < indices.size(); ind+=3) + { + if (FlipAxis) + { + mbuffer->Indices.push_back(indices[ind+2]); + mbuffer->Indices.push_back(indices[ind+1]); + mbuffer->Indices.push_back(indices[ind+0]); + } + else + { + mbuffer->Indices.push_back(indices[ind+0]); + mbuffer->Indices.push_back(indices[ind+1]); + mbuffer->Indices.push_back(indices[ind+2]); + } + } + } + + } // end for all polygons + } + else + { + // lightmap mesh buffer + + scene::SMeshBufferLightMap* mbuffer = new SMeshBufferLightMap(); + buffer = mbuffer; + + for (u32 i=0; i<polygons.size(); ++i) + { + const u32 vertexCount = polygons[i].Indices.size() / maxOffset; + mbuffer->Vertices.reallocate(mbuffer->Vertices.size()+vertexCount); + // for all vertices in array + for (u32 v=0; v<polygons[i].Indices.size(); v+=maxOffset) + { + video::S3DVertex2TCoords vtx; + vtx.Color.set(100,255,255,255); + + // for all input semantics + for (u32 k=0; k<Inputs.size(); ++k) + { + // build vertex from input semantics. + + const u32 idx = localInputs[k].Stride*polygons[i].Indices[v+Inputs[k].Offset]; + + switch(localInputs[k].Semantic) + { + case ECIS_POSITION: + case ECIS_VERTEX: + vtx.Pos.X = localInputs[k].Data[idx+0]; + if (FlipAxis) + { + vtx.Pos.Z = localInputs[k].Data[idx+1]; + vtx.Pos.Y = localInputs[k].Data[idx+2]; + } + else + { + vtx.Pos.Y = localInputs[k].Data[idx+1]; + vtx.Pos.Z = localInputs[k].Data[idx+2]; + } + break; + case ECIS_NORMAL: + vtx.Normal.X = localInputs[k].Data[idx+0]; + if (FlipAxis) + { + vtx.Normal.Z = localInputs[k].Data[idx+1]; + vtx.Normal.Y = localInputs[k].Data[idx+2]; + } + else + { + vtx.Normal.Y = localInputs[k].Data[idx+1]; + vtx.Normal.Z = localInputs[k].Data[idx+2]; + } + break; + case ECIS_TEXCOORD: + case ECIS_UV: + if (k==secondTexCoordSetIndex) + { + vtx.TCoords2.X = localInputs[k].Data[idx+0]; + vtx.TCoords2.Y = 1-localInputs[k].Data[idx+1]; + } + else + { + vtx.TCoords.X = localInputs[k].Data[idx+0]; + vtx.TCoords.Y = 1-localInputs[k].Data[idx+1]; + } + break; + case ECIS_TANGENT: + break; + default: + break; + } + } + + mbuffer->Vertices.push_back(vtx); + + } // end for all vertices + + // add vertex indices + const u32 oldVertexCount = mbuffer->Vertices.size() - vertexCount; + for (u32 face=0; face<vertexCount-2; ++face) + { + mbuffer->Indices.push_back(oldVertexCount + 0); + mbuffer->Indices.push_back(oldVertexCount + 1 + face); + mbuffer->Indices.push_back(oldVertexCount + 2 + face); + } + + } // end for all polygons + } + + const SColladaMaterial* m = findMaterial(materialName); + if (m) + { + buffer->getMaterial() = m->Mat; + SMesh tmpmesh; + tmpmesh.addMeshBuffer(buffer); + SceneManager->getMeshManipulator()->setVertexColors(&tmpmesh,m->Mat.DiffuseColor); + if (m->Transparency != 1.0f) + SceneManager->getMeshManipulator()->setVertexColorAlpha(&tmpmesh,core::floor32(m->Transparency*255.0f)); + } + // add future bind reference for the material + core::stringc meshbufferReference = geometryId+"/"+materialName; + if (!MaterialsToBind.find(meshbufferReference)) + { + MaterialsToBind[meshbufferReference] = MeshesToBind.size(); + MeshesToBind.push_back(core::array<irr::scene::IMeshBuffer*>()); + } + MeshesToBind[MaterialsToBind[meshbufferReference]].push_back(buffer); + + // calculate normals if there is no slot for it + + if (!normalSlotCount) + SceneManager->getMeshManipulator()->recalculateNormals(buffer, true); + + // recalculate bounding box + buffer->recalculateBoundingBox(); + + // add mesh buffer + mesh->addMeshBuffer(buffer); + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA added meshbuffer", core::stringc(buffer->getVertexCount())+" vertices, "+core::stringc(buffer->getIndexCount())+" indices.", ELL_DEBUG); + #endif + + buffer->drop(); +} + + +//! reads a <light> element and stores it as prefab +void CColladaFileLoader::readLightPrefab(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading light prefab", ELL_DEBUG); + #endif + + CLightPrefab* prefab = new CLightPrefab(readId(reader)); + + if (!reader->isEmptyElement()) + { + if (Version >= 10400) // start with 1.4 + { + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (pointSectionName == reader->getNodeName()) + prefab->LightData.Type=video::ELT_POINT; + else + if (directionalSectionName == reader->getNodeName()) + prefab->LightData.Type=video::ELT_DIRECTIONAL; + else + if (spotSectionName == reader->getNodeName()) + prefab->LightData.Type=video::ELT_SPOT; + else + if (ambientSectionName == reader->getNodeName()) + prefab->LightData.Type=ELT_AMBIENT; + else + if (colorNodeName == reader->getNodeName()) + prefab->LightData.DiffuseColor=readColorNode(reader); + else + if (constantAttenuationNodeName == reader->getNodeName()) + readFloatsInsideElement(reader,&prefab->LightData.Attenuation.X,1); + else + if (linearAttenuationNodeName == reader->getNodeName()) + readFloatsInsideElement(reader,&prefab->LightData.Attenuation.Y,1); + else + if (quadraticAttenuationNodeName == reader->getNodeName()) + readFloatsInsideElement(reader,&prefab->LightData.Attenuation.Z,1); + else + if (falloffAngleNodeName == reader->getNodeName()) + { + readFloatsInsideElement(reader,&prefab->LightData.OuterCone,1); + prefab->LightData.OuterCone *= core::DEGTORAD; + } + else + if (falloffExponentNodeName == reader->getNodeName()) + readFloatsInsideElement(reader,&prefab->LightData.Falloff,1); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if ((pointSectionName == reader->getNodeName()) || + (directionalSectionName == reader->getNodeName()) || + (spotSectionName == reader->getNodeName()) || + (ambientSectionName == reader->getNodeName())) + break; + } + } + } + else + { + readColladaParameters(reader, lightPrefabName); + + SColladaParam* p = getColladaParameter(ECPN_COLOR); + if (p && p->Type == ECPT_FLOAT3) + prefab->LightData.DiffuseColor.set(p->Floats[0], p->Floats[1], p->Floats[2]); + } + } + + Prefabs.push_back(prefab); +} + + +//! returns a collada parameter or none if not found +SColladaParam* CColladaFileLoader::getColladaParameter(ECOLLADA_PARAM_NAME name) +{ + for (u32 i=0; i<ColladaParameters.size(); ++i) + if (ColladaParameters[i].Name == name) + return &ColladaParameters[i]; + + return 0; +} + +//! returns a collada input or none if not found +SColladaInput* CColladaFileLoader::getColladaInput(ECOLLADA_INPUT_SEMANTIC input) +{ + for (u32 i=0; i<Inputs.size(); ++i) + if (Inputs[i].Semantic == input) + return &Inputs[i]; + + return 0; +} + + +//! reads a collada input tag and adds it to the input parameter +void CColladaFileLoader::readColladaInput(io::IXMLReaderUTF8* reader, core::array<SColladaInput>& inputs) +{ + // parse param + SColladaInput p; + + // get type + core::stringc semanticName = reader->getAttributeValue("semantic"); + for (u32 i=0; inputSemanticNames[i]; ++i) + { + if (semanticName == inputSemanticNames[i]) + { + p.Semantic = (ECOLLADA_INPUT_SEMANTIC)i; + break; + } + } + + // get source + p.Source = reader->getAttributeValue("source"); + if (reader->getAttributeValue("offset")) // Collada 1.4+ + p.Offset = (u32)reader->getAttributeValueAsInt("offset"); + else // Collada 1.2/1.3 + p.Offset = (u32)reader->getAttributeValueAsInt("idx"); + p.Set = (u32)reader->getAttributeValueAsInt("set"); + + // add input + inputs.push_back(p); +} + +//! parses all collada inputs inside an element and stores them in Inputs +void CColladaFileLoader::readColladaInputs(io::IXMLReaderUTF8* reader, const core::stringc& parentName) +{ + Inputs.clear(); + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT && + inputTagName == reader->getNodeName()) + { + readColladaInput(reader, Inputs); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (parentName == reader->getNodeName()) + return; // end of parent reached + } + + } // end while reader->read(); +} + +//! parses all collada parameters inside an element and stores them in ColladaParameters +void CColladaFileLoader::readColladaParameters(io::IXMLReaderUTF8* reader, + const core::stringc& parentName) +{ + ColladaParameters.clear(); + + const char* const paramNames[] = {"COLOR", "AMBIENT", "DIFFUSE", + "SPECULAR", "SHININESS", "YFOV", "ZNEAR", "ZFAR", 0}; + + const char* const typeNames[] = {"float", "float2", "float3", 0}; + + while(reader->read()) + { + const char* nodeName = reader->getNodeName(); + if (reader->getNodeType() == io::EXN_ELEMENT && + paramTagName == nodeName) + { + // parse param + SColladaParam p; + + // get type + u32 i; + core::stringc typeName = reader->getAttributeValue("type"); + for (i=0; typeNames[i]; ++i) + if (typeName == typeNames[i]) + { + p.Type = (ECOLLADA_PARAM_TYPE)i; + break; + } + + // get name + core::stringc nameName = reader->getAttributeValue("name"); + for (i=0; typeNames[i]; ++i) + if (nameName == paramNames[i]) + { + p.Name = (ECOLLADA_PARAM_NAME)i; + break; + } + + // read parameter data inside parameter tags + switch(p.Type) + { + case ECPT_FLOAT: + case ECPT_FLOAT2: + case ECPT_FLOAT3: + case ECPT_FLOAT4: + readFloatsInsideElement(reader, p.Floats, p.Type - ECPT_FLOAT + 1); + break; + + // TODO: other types of data (ints, bools or whatever) + default: + break; + } + + // add param + ColladaParameters.push_back(p); + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (parentName == reader->getNodeName()) + return; // end of parent reached + } + + } // end while reader->read(); +} + + +//! parses a float from a char pointer and moves the pointer +//! to the end of the parsed float +inline f32 CColladaFileLoader::readFloat(const c8** p) +{ + f32 ftmp; + *p = core::fast_atof_move(*p, ftmp); + return ftmp; +} + + +//! parses an int from a char pointer and moves the pointer to +//! the end of the parsed float +inline s32 CColladaFileLoader::readInt(const c8** p) +{ + return (s32)readFloat(p); +} + + +//! places pointer to next begin of a token +void CColladaFileLoader::findNextNoneWhiteSpace(const c8** start) +{ + const c8* p = *start; + + while(*p && (*p==' ' || *p=='\n' || *p=='\r' || *p=='\t')) + ++p; + + // TODO: skip comments <!-- --> + + *start = p; +} + + +//! reads floats from inside of xml element until end of xml element +void CColladaFileLoader::readFloatsInsideElement(io::IXMLReaderUTF8* reader, f32* floats, u32 count) +{ + if (reader->isEmptyElement()) + return; + + while(reader->read()) + { + // TODO: check for comments inside the element + // and ignore them. + + if (reader->getNodeType() == io::EXN_TEXT) + { + // parse float data + core::stringc data = reader->getNodeData(); + data.trim(); + const c8* p = &data[0]; + + for (u32 i=0; i<count; ++i) + { + findNextNoneWhiteSpace(&p); + if (*p) + floats[i] = readFloat(&p); + else + floats[i] = 0.0f; + } + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + break; // end parsing text + } +} + + +//! reads ints from inside of xml element until end of xml element +void CColladaFileLoader::readIntsInsideElement(io::IXMLReaderUTF8* reader, s32* ints, u32 count) +{ + if (reader->isEmptyElement()) + return; + + while(reader->read()) + { + // TODO: check for comments inside the element + // and ignore them. + + if (reader->getNodeType() == io::EXN_TEXT) + { + // parse float data + core::stringc data = reader->getNodeData(); + data.trim(); + const c8* p = &data[0]; + + for (u32 i=0; i<count; ++i) + { + findNextNoneWhiteSpace(&p); + if (*p) + ints[i] = readInt(&p); + else + ints[i] = 0; + } + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + break; // end parsing text + } +} + + +video::SColorf CColladaFileLoader::readColorNode(io::IXMLReaderUTF8* reader) +{ + if (reader->getNodeType() == io::EXN_ELEMENT && + colorNodeName == reader->getNodeName()) + { + f32 color[4]; + readFloatsInsideElement(reader,color,4); + return video::SColorf(color[0], color[1], color[2], color[3]); + } + + return video::SColorf(); +} + + +f32 CColladaFileLoader::readFloatNode(io::IXMLReaderUTF8* reader) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading <float>", ELL_DEBUG); + #endif + + f32 result = 0.0f; + if (reader->getNodeType() == io::EXN_ELEMENT && + floatNodeName == reader->getNodeName()) + { + readFloatsInsideElement(reader,&result,1); + } + + return result; +} + + +//! clears all loaded data +void CColladaFileLoader::clearData() +{ + // delete all prefabs + + for (u32 i=0; i<Prefabs.size(); ++i) + Prefabs[i]->drop(); + + Prefabs.clear(); + + // clear all parameters + ColladaParameters.clear(); + + // clear all materials + Images.clear(); + + // clear all materials + Textures.clear(); + + // clear all materials + Materials.clear(); + + // clear all inputs + Inputs.clear(); + + // clear all effects + for ( u32 i=0; i<Effects.size(); ++i ) + Effects[i].Parameters->drop(); + Effects.clear(); + + // clear all the materials to bind + MaterialsToBind.clear(); + MeshesToBind.clear(); +} + + +//! changes the XML URI into an internal id +void CColladaFileLoader::uriToId(core::stringc& str) +{ + // currently, we only remove the # from the begin if there + // because we simply don't support referencing other files. + if (!str.size()) + return; + + if (str[0] == '#') + str.erase(0); +} + + +//! read Collada Id, uses id or name if id is missing +core::stringc CColladaFileLoader::readId(io::IXMLReaderUTF8* reader) +{ + core::stringc id = reader->getAttributeValue("id"); + if (id.size()==0) + id = reader->getAttributeValue("name"); + return id; +} + + +//! create an Irrlicht texture from the reference +video::ITexture* CColladaFileLoader::getTextureFromImage(core::stringc uri, SColladaEffect * effect) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA searching texture", uri, ELL_DEBUG); + #endif + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + for (;;) + { + uriToId(uri); + for (u32 i=0; i<Images.size(); ++i) + { + if (uri == Images[i].Id) + { + if (Images[i].Source.size() && Images[i].SourceIsFilename) + { + if (FileSystem->existFile(Images[i].Source)) + return driver->getTexture(Images[i].Source); + return driver->getTexture((FileSystem->getFileDir(CurrentlyLoadingMesh)+"/"+Images[i].Source)); + } + else + if (Images[i].Source.size()) + { + //const u32 size = Images[i].Dimension.getArea(); + const u32 size = Images[i].Dimension.Width * Images[i].Dimension.Height;; + u32* data = new u32[size]; // we assume RGBA + u32* ptrdest = data; + const c8* ptrsrc = Images[i].Source.c_str(); + for (u32 j=0; j<size; ++j) + { + sscanf(ptrsrc, "%x", ptrdest); + ++ptrdest; + ptrsrc += 4; + } + video::IImage* img = driver->createImageFromData(video::ECF_A8R8G8B8, Images[i].Dimension, data, true, true); + video::ITexture* tex = driver->addTexture((CurrentlyLoadingMesh+"#"+Images[i].Id).c_str(), img); + img->drop(); + return tex; + } + break; + } + } + if (effect && effect->Parameters->getAttributeType(uri.c_str())==io::EAT_STRING) + { + uri = effect->Parameters->getAttributeAsString(uri.c_str()); +#ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA now searching texture", uri.c_str(), ELL_DEBUG); +#endif + } + else + break; + } + return 0; +} + + +//! read a parameter and value +void CColladaFileLoader::readParameter(io::IXMLReaderUTF8* reader, io::IAttributes* parameters) +{ + #ifdef COLLADA_READER_DEBUG + os::Printer::log("COLLADA reading parameter", ELL_DEBUG); + #endif + + if ( !parameters ) + return; + + const core::stringc name = reader->getAttributeValue("sid"); + if (!reader->isEmptyElement()) + { + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (floatNodeName == reader->getNodeName()) + { + const f32 f = readFloatNode(reader); + parameters->addFloat(name.c_str(), f); + } + else + if (float2NodeName == reader->getNodeName()) + { + f32 f[2]; + readFloatsInsideElement(reader, f, 2); +// Parameters.addVector2d(name.c_str(), core::vector2df(f[0],f[1])); + } + else + if (float3NodeName == reader->getNodeName()) + { + f32 f[3]; + readFloatsInsideElement(reader, f, 3); + parameters->addVector3d(name.c_str(), core::vector3df(f[0],f[1],f[2])); + } + else + if ((initFromName == reader->getNodeName()) || + (sourceSectionName == reader->getNodeName())) + { + reader->read(); + parameters->addString(name.c_str(), reader->getNodeData()); + } + else + if (wrapsName == reader->getNodeName()) + { + reader->read(); + const core::stringc val = reader->getNodeData(); + if (val == "WRAP") + parameters->addInt(wrapsName.c_str(), (int)video::ETC_REPEAT); + else if ( val== "MIRROR") + parameters->addInt(wrapsName.c_str(), (int)video::ETC_MIRROR); + else if ( val== "CLAMP") + parameters->addInt(wrapsName.c_str(), (int)video::ETC_CLAMP_TO_EDGE); + else if ( val== "BORDER") + parameters->addInt(wrapsName.c_str(), (int)video::ETC_CLAMP_TO_BORDER); + else if ( val== "NONE") + parameters->addInt(wrapsName.c_str(), (int)video::ETC_CLAMP_TO_BORDER); + } + else + if (wraptName == reader->getNodeName()) + { + reader->read(); + const core::stringc val = reader->getNodeData(); + if (val == "WRAP") + parameters->addInt(wraptName.c_str(), (int)video::ETC_REPEAT); + else if ( val== "MIRROR") + parameters->addInt(wraptName.c_str(), (int)video::ETC_MIRROR); + else if ( val== "CLAMP") + parameters->addInt(wraptName.c_str(), (int)video::ETC_CLAMP_TO_EDGE); + else if ( val== "BORDER") + parameters->addInt(wraptName.c_str(), (int)video::ETC_CLAMP_TO_BORDER); + else if ( val== "NONE") + parameters->addInt(wraptName.c_str(), (int)video::ETC_CLAMP_TO_BORDER); + } + else + if (minfilterName == reader->getNodeName()) + { + reader->read(); + const core::stringc val = reader->getNodeData(); + if (val == "LINEAR_MIPMAP_LINEAR") + parameters->addBool("trilinear", true); + else + if (val == "LINEAR_MIPMAP_NEAREST") + parameters->addBool("bilinear", true); + } + else + if (magfilterName == reader->getNodeName()) + { + reader->read(); + const core::stringc val = reader->getNodeData(); + if (val != "LINEAR") + { + parameters->addBool("bilinear", false); + parameters->addBool("trilinear", false); + } + } + else + if (mipfilterName == reader->getNodeName()) + { + parameters->addBool("anisotropic", true); + } + } + else + if(reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (newParamName == reader->getNodeName()) + break; + } + } + } +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_COLLADA_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.h new file mode 100644 index 0000000..df1a551 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaFileLoader.h @@ -0,0 +1,389 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_COLLADA_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_COLLADA_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "irrString.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "ISceneManager.h" +#include "irrMap.h" +#include "CAttributes.h" + +namespace irr +{ +namespace scene +{ + +#ifdef _DEBUG +//#define COLLADA_READER_DEBUG +#endif + +class IColladaPrefab; + +enum ECOLLADA_PARAM_NAME +{ + ECPN_COLOR = 0, + ECPN_AMBIENT, + ECPN_DIFFUSE, + ECPN_SPECULAR, + ECPN_SHININESS, + ECPN_TRANSPARENCY, + ECPN_YFOV, + ECPN_ZNEAR, + ECPN_ZFAR, + + ECPN_COUNT +}; + +enum ECOLLADA_PARAM_TYPE +{ + ECPT_FLOAT = 0, + ECPT_FLOAT2, + ECPT_FLOAT3, + ECPT_FLOAT4, + + ECPT_COUNT +}; + +//! Collada Parameter +struct SColladaParam +{ + SColladaParam() + : Name(ECPN_COUNT), Type(ECPT_COUNT) + { + for (int i=0; i<4; ++i) Floats[i] = 0; + } + + ECOLLADA_PARAM_NAME Name; + ECOLLADA_PARAM_TYPE Type; + + f32 Floats[4]; +}; + +enum ECOLLADA_INPUT_SEMANTIC +{ + ECIS_POSITION = 0, + ECIS_VERTEX, + ECIS_NORMAL, + ECIS_TEXCOORD, + ECIS_UV, + ECIS_TANGENT, + ECIS_IMAGE, + ECIS_TEXTURE, + + ECIS_COUNT +}; + +//! Collada Input +struct SColladaInput +{ + SColladaInput() + : Semantic(ECIS_COUNT), Data(0), Offset(0), Set(0), Stride(1) + { + } + + ECOLLADA_INPUT_SEMANTIC Semantic; + core::stringc Source; + f32* Data; + u32 Offset; + u32 Set; + u32 Stride; +}; + +//! Collada images +struct SColladaImage +{ + core::stringc Id; + core::stringc Source; + core::dimension2du Dimension; + bool SourceIsFilename; +}; + + +//! Collada texture +struct SColladaTexture +{ + video::ITexture* Texture; + core::stringc Id; +}; + + +//! Collada material +struct SColladaMaterial +{ + video::SMaterial Mat; + core::stringc Id; + core::stringc InstanceEffectId; + f32 Transparency; + + inline bool operator< (const SColladaMaterial & other) const + { + return Id < other.Id; + } +}; + +//! Collada effect (materials, shaders, and programs) +struct SColladaEffect +{ + core::stringc Id; + f32 Transparency; + core::array<core::stringc> Textures; + video::SMaterial Mat; + // TODO: Parameters looks somewhat lazy workaround, I think we should really read all parameters correct. + io::IAttributes * Parameters; + + inline bool operator< (const SColladaEffect & other) const + { + return Id < other.Id; + } +}; + + +struct SNumberArray // for storing float and int arrays +{ + core::stringc Name; + core::array<f32> Data; +}; + +struct SAccessor +{ + SAccessor() + : Count(0), Offset(0), Stride(1) {} + // I don't store the source of the accessor here because I assume + // it to use the array of the source this accessor is located in. + + int Count; + int Offset; + int Stride; + + core::array<SColladaParam> Parameters; // parameters defining the accessor +}; + +struct SSource +{ + core::stringc Id; + SNumberArray Array; + core::array<SAccessor> Accessors; +}; + +class CScenePrefab; + +//! Meshloader capable of loading COLLADA meshes and scene descriptions into Irrlicht. +class CColladaFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CColladaFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); + + //! destructor + virtual ~CColladaFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + //! skips an (unknown) section in the collada document + void skipSection(io::IXMLReaderUTF8* reader, bool reportSkipping); + + //! reads the <COLLADA> section and its content + void readColladaSection(io::IXMLReaderUTF8* reader); + + //! reads a <library> section and its content + void readLibrarySection(io::IXMLReaderUTF8* reader); + + //! reads a <visual_scene> element and stores it as a prefab + void readVisualScene(io::IXMLReaderUTF8* reader); + + //! reads a <scene> section and its content + void readSceneSection(io::IXMLReaderUTF8* reader); + + //! reads a <asset> section and its content + void readAssetSection(io::IXMLReaderUTF8* reader); + + //! reads a <node> section and its content + //! if a prefab pointer is passed the nodes are created as scene prefabs children of that prefab + void readNodeSection(io::IXMLReaderUTF8* reader, scene::ISceneNode* parent, CScenePrefab* p=0); + + //! reads a <lookat> element and its content and creates a matrix from it + core::matrix4 readLookAtNode(io::IXMLReaderUTF8* reader); + + //! reads a <matrix> element and its content and creates a matrix from it + core::matrix4 readMatrixNode(io::IXMLReaderUTF8* reader); + + //! reads a <perspective> element and its content and creates a matrix from it + core::matrix4 readPerspectiveNode(io::IXMLReaderUTF8* reader); + + //! reads a <rotate> element and its content and creates a matrix from it + core::matrix4 readRotateNode(io::IXMLReaderUTF8* reader); + + //! reads a <skew> element and its content and creates a matrix from it + core::matrix4 readSkewNode(io::IXMLReaderUTF8* reader); + + //! reads a <boundingbox> element and its content and stores it in bbox + void readBboxNode(io::IXMLReaderUTF8* reader, core::aabbox3df& bbox); + + //! reads a <scale> element and its content and creates a matrix from it + core::matrix4 readScaleNode(io::IXMLReaderUTF8* reader); + + //! reads a <translate> element and its content and creates a matrix from it + core::matrix4 readTranslateNode(io::IXMLReaderUTF8* reader); + + //! reads a <color> element + video::SColorf readColorNode(io::IXMLReaderUTF8* reader); + + //! reads a <float> element + f32 readFloatNode(io::IXMLReaderUTF8* reader); + + //! reads a <instance> node + void readInstanceNode(io::IXMLReaderUTF8* reader, + scene::ISceneNode* parent, scene::ISceneNode** outNode, + CScenePrefab* p=0, const core::stringc& type=core::stringc()); + + //! creates a scene node from Prefabs (with name given in 'url') + void instantiateNode(scene::ISceneNode* parent, scene::ISceneNode** outNode=0, + CScenePrefab* p=0, const core::stringc& url="", + const core::stringc& type=core::stringc()); + + //! reads a <light> element and stores it as prefab + void readLightPrefab(io::IXMLReaderUTF8* reader); + + //! reads a <camera> element and stores it as prefab + void readCameraPrefab(io::IXMLReaderUTF8* reader); + + //! reads a <image> element and stores it in the image section + void readImage(io::IXMLReaderUTF8* reader); + + //! reads a <texture> element and stores it in the texture section + void readTexture(io::IXMLReaderUTF8* reader); + + //! reads a <material> element and stores it in the material section + void readMaterial(io::IXMLReaderUTF8* reader); + + //! reads a <effect> element and stores it in the effects section + void readEffect(io::IXMLReaderUTF8* reader, SColladaEffect * effect = 0); + + //! reads a <geometry> element and stores it as mesh if possible + void readGeometry(io::IXMLReaderUTF8* reader); + + //! parses a float from a char pointer and moves the pointer to + //! the end of the parsed float + inline f32 readFloat(const c8** p); + + //! parses an int from a char pointer and moves the pointer to + //! the end of the parsed float + inline s32 readInt(const c8** p); + + //! places pointer to next begin of a token + void findNextNoneWhiteSpace(const c8** p); + + //! reads floats from inside of xml element until end of xml element + void readFloatsInsideElement(io::IXMLReaderUTF8* reader, f32* floats, u32 count); + + //! reads ints from inside of xml element until end of xml element + void readIntsInsideElement(io::IXMLReaderUTF8* reader, s32* ints, u32 count); + + //! clears all loaded data + void clearData(); + + //! parses all collada parameters inside an element and stores them in ColladaParameters + void readColladaParameters(io::IXMLReaderUTF8* reader, const core::stringc& parentName); + + //! returns a collada parameter or none if not found + SColladaParam* getColladaParameter(ECOLLADA_PARAM_NAME name); + + //! parses all collada inputs inside an element and stores them in Inputs. Reads + //! until first tag which is not an input tag or the end of the parent is reached + void readColladaInputs(io::IXMLReaderUTF8* reader, const core::stringc& parentName); + + //! reads a collada input tag and adds it to the input parameter + void readColladaInput(io::IXMLReaderUTF8* reader, core::array<SColladaInput>& inputs); + + //! returns a collada input or none if not found + SColladaInput* getColladaInput(ECOLLADA_INPUT_SEMANTIC input); + + //! read Collada Id, uses id or name if id is missing + core::stringc readId(io::IXMLReaderUTF8* reader); + + //! changes the XML URI into an internal id + void uriToId(core::stringc& str); + + //! reads a polygons section and creates a mesh from it + void readPolygonSection(io::IXMLReaderUTF8* reader, + core::array<SSource>& sources, scene::SMesh* mesh, + const core::stringc& geometryId); + + //! finds a material, possible instancing it + const SColladaMaterial * findMaterial(const core::stringc & materialName); + + //! reads and bind materials as given by the symbol->target bind mapping + void readBindMaterialSection(io::IXMLReaderUTF8* reader, const core::stringc & id); + + //! create an Irrlicht texture from the SColladaImage + video::ITexture* getTextureFromImage(core::stringc uri, SColladaEffect * effect); + + //! read a parameter and value + void readParameter(io::IXMLReaderUTF8* reader, io::IAttributes* parameters); + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + + scene::IAnimatedMesh* DummyMesh; + core::stringc CurrentlyLoadingMesh; + + scene::IAnimatedMesh* FirstLoadedMesh; + io::path FirstLoadedMeshName; + s32 LoadedMeshCount; + u32 Version; + bool FlipAxis; + + core::array<IColladaPrefab*> Prefabs; + core::array<SColladaParam> ColladaParameters; + core::array<SColladaImage> Images; + core::array<SColladaTexture> Textures; + core::array<SColladaMaterial> Materials; + core::array<SColladaInput> Inputs; + core::array<SColladaEffect> Effects; + //! meshbuffer reference ("geomid/matname") -> index into MeshesToBind + core::map<core::stringc,u32> MaterialsToBind; + //! Array of buffers for each material binding + core::array< core::array<irr::scene::IMeshBuffer*> > MeshesToBind; + + bool CreateInstances; +}; + + + +//! following class is for holding and createing instances of library objects, +//! named prefabs in this loader. +class IColladaPrefab : public virtual IReferenceCounted +{ +public: + //! creates an instance of this prefab + virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent, + scene::ISceneManager* mgr) = 0; + + //! returns id of this prefab + virtual const core::stringc& getId() = 0; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.cpp new file mode 100644 index 0000000..e5b6df5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.cpp @@ -0,0 +1,2245 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// TODO: second UV-coordinates currently ignored in textures + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_COLLADA_WRITER_ + +#include "CColladaMeshWriter.h" +#include "os.h" +#include "IFileSystem.h" +#include "IWriteFile.h" +#include "IXMLWriter.h" +#include "IMesh.h" +#include "IAttributes.h" +#include "IAnimatedMeshSceneNode.h" +#include "IMeshSceneNode.h" +#include "ITerrainSceneNode.h" +#include "ILightSceneNode.h" +#include "ICameraSceneNode.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +//! Which lighting model should be used in the technique (FX) section when exporting effects (materials) +E_COLLADA_TECHNIQUE_FX CColladaMeshWriterProperties::getTechniqueFx(const video::SMaterial& material) const +{ + return ECTF_BLINN; +} + +//! Which texture index should be used when writing the texture of the given sampler color. +s32 CColladaMeshWriterProperties::getTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const +{ + // So far we just export in a way which is similar to how we import colladas. + // There might be better ways to do this, but I suppose it depends a lot for which target + // application we export, so in most cases it will have to be done in user-code anyway. + switch ( cs ) + { + case ECCS_DIFFUSE: + return 2; + case ECCS_AMBIENT: + return 1; + case ECCS_EMISSIVE: + return 0; + case ECCS_SPECULAR: + return 3; + case ECCS_TRANSPARENT: + return -1; + case ECCS_REFLECTIVE: + return -1; + }; + return -1; +} + +E_COLLADA_IRR_COLOR CColladaMeshWriterProperties::getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const +{ + switch ( cs ) + { + case ECCS_DIFFUSE: + return ECIC_DIFFUSE; + case ECCS_AMBIENT: + return ECIC_AMBIENT; + case ECCS_EMISSIVE: + return ECIC_EMISSIVE; + case ECCS_SPECULAR: + return ECIC_SPECULAR; + case ECCS_TRANSPARENT: + return ECIC_NONE; + case ECCS_REFLECTIVE: + return ECIC_CUSTOM; + }; + + return ECIC_NONE; +} + +//! Return custom colors for certain color types requested by collada. +video::SColor CColladaMeshWriterProperties::getCustomColor(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const +{ + return video::SColor(255, 0, 0, 0); +} + + +//! Return the settings for transparence +E_COLLADA_TRANSPARENT_FX CColladaMeshWriterProperties::getTransparentFx(const video::SMaterial& material) const +{ + // TODO: figure out best default mapping + return ECOF_A_ONE; +} + +//! Transparency value for the material. +f32 CColladaMeshWriterProperties::getTransparency(const video::SMaterial& material) const +{ + // TODO: figure out best default mapping + return -1.f; +} + +//! Reflectivity value for that material +f32 CColladaMeshWriterProperties::getReflectivity(const video::SMaterial& material) const +{ + // TODO: figure out best default mapping + return 0.f; +} + +//! Return index of refraction for that material +f32 CColladaMeshWriterProperties::getIndexOfRefraction(const video::SMaterial& material) const +{ + return -1.f; +} + +bool CColladaMeshWriterProperties::isExportable(const irr::scene::ISceneNode * node) const +{ + return node && node->isVisible(); +} + +IMesh* CColladaMeshWriterProperties::getMesh(irr::scene::ISceneNode * node) +{ + if ( !node ) + return 0; + if ( node->getType() == ESNT_ANIMATED_MESH ) + return static_cast<IAnimatedMeshSceneNode*>(node)->getMesh()->getMesh(0); + // TODO: we need some ISceneNode::hasType() function to get rid of those checks + if ( node->getType() == ESNT_MESH + || node->getType() == ESNT_CUBE + || node->getType() == ESNT_SPHERE + || node->getType() == ESNT_WATER_SURFACE + || node->getType() == ESNT_Q3SHADER_SCENE_NODE + ) + return static_cast<IMeshSceneNode*>(node)->getMesh(); + if ( node->getType() == ESNT_TERRAIN ) + return static_cast<ITerrainSceneNode*>(node)->getMesh(); + return 0; +} + +// Check if the node has it's own material overwriting the mesh-materials +bool CColladaMeshWriterProperties::useNodeMaterial(const scene::ISceneNode* node) const +{ + if ( !node ) + return false; + + // TODO: we need some ISceneNode::hasType() function to get rid of those checks + bool useMeshMaterial = ( (node->getType() == ESNT_MESH || + node->getType() == ESNT_CUBE || + node->getType() == ESNT_SPHERE || + node->getType() == ESNT_WATER_SURFACE || + node->getType() == ESNT_Q3SHADER_SCENE_NODE) + && static_cast<const IMeshSceneNode*>(node)->isReadOnlyMaterials()) + + || (node->getType() == ESNT_ANIMATED_MESH + && static_cast<const IAnimatedMeshSceneNode*>(node)->isReadOnlyMaterials() ); + + return !useMeshMaterial; +} + + + +CColladaMeshWriterNames::CColladaMeshWriterNames(IColladaMeshWriter * writer) + : ColladaMeshWriter(writer) +{ +} + +irr::core::stringw CColladaMeshWriterNames::nameForMesh(const scene::IMesh* mesh, int instance) +{ + irr::core::stringw name(L"mesh"); + name += nameForPtr(mesh); + if ( instance > 0 ) + { + name += L"i"; + name += irr::core::stringw(instance); + } + return ColladaMeshWriter->toNCName(name); +} + +irr::core::stringw CColladaMeshWriterNames::nameForNode(const scene::ISceneNode* node) +{ + irr::core::stringw name; + // Prefix, because xs::ID can't start with a number, also nicer name + if ( node && node->getType() == ESNT_LIGHT ) + name = L"light"; + else + name = L"node"; + name += nameForPtr(node); + if ( node ) + { + name += irr::core::stringw(node->getName()); + } + return ColladaMeshWriter->toNCName(name); +} + +irr::core::stringw CColladaMeshWriterNames::nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) +{ + core::stringw strMat(L"mat"); + + bool nodeMaterial = ColladaMeshWriter->getProperties()->useNodeMaterial(node); + if ( nodeMaterial ) + { + strMat += L"node"; + strMat += nameForPtr(node); + strMat += irr::core::stringw(node->getName()); + } + strMat += L"mesh"; + strMat += nameForPtr(mesh); + strMat += materialId; + return ColladaMeshWriter->toNCName(strMat); +} + +irr::core::stringw CColladaMeshWriterNames::nameForPtr(const void* ptr) const +{ + wchar_t buf[32]; + swprintf(buf, 32, L"%p", ptr); + return irr::core::stringw(buf); +} + + + +CColladaMeshWriter::CColladaMeshWriter( ISceneManager * smgr, video::IVideoDriver* driver, + io::IFileSystem* fs) + : FileSystem(fs), VideoDriver(driver), Writer(0) +{ + + #ifdef _DEBUG + setDebugName("CColladaMeshWriter"); + #endif + + if (VideoDriver) + VideoDriver->grab(); + + if (FileSystem) + FileSystem->grab(); + + if ( smgr ) + setAmbientLight( smgr->getAmbientLight() ); + + CColladaMeshWriterProperties * p = new CColladaMeshWriterProperties(); + setDefaultProperties(p); + setProperties(p); + p->drop(); + + CColladaMeshWriterNames * nameGenerator = new CColladaMeshWriterNames(this); + setDefaultNameGenerator(nameGenerator); + setNameGenerator(nameGenerator); + nameGenerator->drop(); +} + + +CColladaMeshWriter::~CColladaMeshWriter() +{ + if (VideoDriver) + VideoDriver->drop(); + + if (FileSystem) + FileSystem->drop(); +} + + +void CColladaMeshWriter::reset() +{ + LibraryImages.clear(); + Meshes.clear(); + LightNodes.clear(); + CameraNodes.clear(); + MaterialsWritten.clear(); + EffectsWritten.clear(); + MaterialNameCache.clear(); +} + +//! Returns the type of the mesh writer +EMESH_WRITER_TYPE CColladaMeshWriter::getType() const +{ + return EMWT_COLLADA; +} + +//! writes a scene starting with the given node +bool CColladaMeshWriter::writeScene(io::IWriteFile* file, scene::ISceneNode* root) +{ + if (!file || !root) + return false; + + reset(); + + Writer = FileSystem->createXMLWriter(file); + + if (!Writer) + { + os::Printer::log("Could not write file", file->getFileName()); + return false; + } + + Directory = FileSystem->getFileDir(FileSystem->getAbsolutePath( file->getFileName() )); + + // make names for all nodes with exportable meshes + makeMeshNames(root); + + os::Printer::log("Writing scene", file->getFileName()); + + // write COLLADA header + + Writer->writeXMLHeader(); + + Writer->writeElement(L"COLLADA", false, + L"xmlns", L"http://www.collada.org/2005/11/COLLADASchema", + L"version", L"1.4.1"); + Writer->writeLineBreak(); + + // write asset data + writeAsset(); + + // write all materials + Writer->writeElement(L"library_materials", false); + Writer->writeLineBreak(); + writeNodeMaterials(root); + Writer->writeClosingTag(L"library_materials"); + Writer->writeLineBreak(); + + Writer->writeElement(L"library_effects", false); + Writer->writeLineBreak(); + writeNodeEffects(root); + Writer->writeClosingTag(L"library_effects"); + Writer->writeLineBreak(); + + + // images + writeLibraryImages(); + + // lights + Writer->writeElement(L"library_lights", false); + Writer->writeLineBreak(); + + writeAmbientLightElement( getAmbientLight() ); + writeNodeLights(root); + + Writer->writeClosingTag(L"library_lights"); + Writer->writeLineBreak(); + + // cameras + Writer->writeElement(L"library_cameras", false); + Writer->writeLineBreak(); + writeNodeCameras(root); + Writer->writeClosingTag(L"library_cameras"); + Writer->writeLineBreak(); + + // write meshes + Writer->writeElement(L"library_geometries", false); + Writer->writeLineBreak(); + writeAllMeshGeometries(); + Writer->writeClosingTag(L"library_geometries"); + Writer->writeLineBreak(); + + // write scene + Writer->writeElement(L"library_visual_scenes", false); + Writer->writeLineBreak(); + Writer->writeElement(L"visual_scene", false, L"id", L"default_scene"); + Writer->writeLineBreak(); + + // ambient light (instance_light also needs a node as parent so we have to create one) + Writer->writeElement(L"node", false); + Writer->writeLineBreak(); + Writer->writeElement(L"instance_light", true, L"url", L"#ambientlight"); + Writer->writeLineBreak(); + Writer->writeClosingTag(L"node"); + Writer->writeLineBreak(); + + // Write the scenegraph. + if ( root->getType() != ESNT_SCENE_MANAGER ) + { + // TODO: Not certain if we should really write the root or if we should just always only write the children. + // For now writing root to keep backward compatibility for this case, but if anyone needs to _not_ write + // that root-node we can add a parameter for this later on in writeScene. + writeSceneNode(root); + } + else + { + // The visual_scene element is identical to our scenemanager and acts as root, + // so we do not write the root itself if it points to the scenemanager. + const core::list<ISceneNode*>& rootChildren = root->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = rootChildren.begin(); + it != rootChildren.end(); + ++ it ) + { + writeSceneNode(*it); + } + } + + + Writer->writeClosingTag(L"visual_scene"); + Writer->writeLineBreak(); + Writer->writeClosingTag(L"library_visual_scenes"); + Writer->writeLineBreak(); + + + // instance scene + Writer->writeElement(L"scene", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"instance_visual_scene", true, L"url", L"#default_scene"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"scene"); + Writer->writeLineBreak(); + + + // close everything + + Writer->writeClosingTag(L"COLLADA"); + Writer->drop(); + + return true; +} + +void CColladaMeshWriter::makeMeshNames(irr::scene::ISceneNode * node) +{ + if ( !node || !getProperties() || !getProperties()->isExportable(node) || !getNameGenerator()) + return; + + IMesh* mesh = getProperties()->getMesh(node); + if ( mesh ) + { + if ( !Meshes.find(mesh) ) + { + SColladaMesh cm; + cm.Name = nameForMesh(mesh, 0); + Meshes.insert(mesh, cm); + } + } + + const core::list<ISceneNode*>& children = node->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it ) + { + makeMeshNames(*it); + } +} + +void CColladaMeshWriter::writeNodeMaterials(irr::scene::ISceneNode * node) +{ + if ( !node || !getProperties() || !getProperties()->isExportable(node) ) + return; + + core::array<irr::core::stringw> materialNames; + + IMesh* mesh = getProperties()->getMesh(node); + if ( mesh ) + { + MeshNode * n = Meshes.find(mesh); + if ( !getProperties()->useNodeMaterial(node) ) + { + // no material overrides - write mesh materials + if ( n && !n->getValue().MaterialsWritten ) + { + writeMeshMaterials(mesh, getGeometryWriting() == ECGI_PER_MESH_AND_MATERIAL ? &materialNames : NULL); + n->getValue().MaterialsWritten = true; + } + } + else + { + // write node materials + for (u32 i=0; i<node->getMaterialCount(); ++i) + { + video::SMaterial & material = node->getMaterial(i); + core::stringw strMat(nameForMaterial(material, i, mesh, node)); + writeMaterial(strMat); + if ( getGeometryWriting() == ECGI_PER_MESH_AND_MATERIAL ) + materialNames.push_back(strMat); + } + } + + // When we write another mesh-geometry for each new material-list we have + // to figure out here if we need another geometry copy and create a new name here. + if ( n && getGeometryWriting() == ECGI_PER_MESH_AND_MATERIAL ) + { + SGeometryMeshMaterials * geomMat = n->getValue().findGeometryMeshMaterials(materialNames); + if ( geomMat ) + geomMat->MaterialOwners.push_back(node); + else + { + SGeometryMeshMaterials gmm; + if ( n->getValue().GeometryMeshMaterials.empty() ) + gmm.GeometryName = n->getValue().Name; // first one can use the original name + else + gmm.GeometryName = nameForMesh(mesh, n->getValue().GeometryMeshMaterials.size()); + gmm.MaterialNames = materialNames; + gmm.MaterialOwners.push_back(node); + n->getValue().GeometryMeshMaterials.push_back(gmm); + } + } + } + + const core::list<ISceneNode*>& children = node->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it ) + { + writeNodeMaterials( *it ); + } +} + +void CColladaMeshWriter::writeMaterial(const irr::core::stringw& materialname) +{ + if ( MaterialsWritten.find(materialname) ) + return; + MaterialsWritten.insert(materialname, true); + + Writer->writeElement(L"material", false, + L"id", materialname.c_str(), + L"name", materialname.c_str()); + Writer->writeLineBreak(); + + // We don't make a difference between material and effect on export. + // Every material is just using an instance of an effect. + core::stringw strFx(materialname); + strFx += L"-fx"; + Writer->writeElement(L"instance_effect", true, + L"url", (core::stringw(L"#") + strFx).c_str()); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"material"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeNodeEffects(irr::scene::ISceneNode * node) +{ + if ( !node || !getProperties() || !getProperties()->isExportable(node) || !getNameGenerator() ) + return; + + IMesh* mesh = getProperties()->getMesh(node); + if ( mesh ) + { + if ( !getProperties()->useNodeMaterial(node) ) + { + // no material overrides - write mesh materials + MeshNode * n = Meshes.find(mesh); + if ( n && !n->getValue().EffectsWritten ) + { + writeMeshEffects(mesh); + n->getValue().EffectsWritten = true; + } + } + else + { + // write node materials + for (u32 i=0; i<node->getMaterialCount(); ++i) + { + video::SMaterial & material = node->getMaterial(i); + irr::core::stringw materialfxname(nameForMaterial(material, i, mesh, node)); + materialfxname += L"-fx"; + writeMaterialEffect(materialfxname, material); + } + } + } + + const core::list<ISceneNode*>& children = node->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it ) + { + writeNodeEffects( *it ); + } +} + +void CColladaMeshWriter::writeNodeLights(irr::scene::ISceneNode * node) +{ + if ( !node || !getProperties() || !getProperties()->isExportable(node)) + return; + + if ( node->getType() == ESNT_LIGHT ) + { + ILightSceneNode * lightNode = static_cast<ILightSceneNode*>(node); + const video::SLight& lightData = lightNode->getLightData(); + + SColladaLight cLight; + cLight.Name = nameForNode(node); + LightNodes.insert(node, cLight); + + Writer->writeElement(L"light", false, L"id", cLight.Name.c_str()); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + switch ( lightNode->getLightType() ) + { + case video::ELT_POINT: + Writer->writeElement(L"point", false); + Writer->writeLineBreak(); + + writeColorElement(lightData.DiffuseColor, false); + writeNode(L"constant_attenuation ", core::stringw(lightData.Attenuation.X).c_str()); + writeNode(L"linear_attenuation ", core::stringw(lightData.Attenuation.Y).c_str()); + writeNode(L"quadratic_attenuation", core::stringw(lightData.Attenuation.Z).c_str()); + + Writer->writeClosingTag(L"point"); + Writer->writeLineBreak(); + break; + + case video::ELT_SPOT: + Writer->writeElement(L"spot", false); + Writer->writeLineBreak(); + + writeColorElement(lightData.DiffuseColor, false); + + writeNode(L"constant_attenuation ", core::stringw(lightData.Attenuation.X).c_str()); + writeNode(L"linear_attenuation ", core::stringw(lightData.Attenuation.Y).c_str()); + writeNode(L"quadratic_attenuation", core::stringw(lightData.Attenuation.Z).c_str()); + + writeNode(L"falloff_angle", core::stringw(lightData.OuterCone * core::RADTODEG).c_str()); + writeNode(L"falloff_exponent", core::stringw(lightData.Falloff).c_str()); + + Writer->writeClosingTag(L"spot"); + Writer->writeLineBreak(); + break; + + case video::ELT_DIRECTIONAL: + Writer->writeElement(L"directional", false); + Writer->writeLineBreak(); + + writeColorElement(lightData.DiffuseColor, false); + + Writer->writeClosingTag(L"directional"); + Writer->writeLineBreak(); + break; + default: + break; + } + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"light"); + Writer->writeLineBreak(); + + } + + const core::list<ISceneNode*>& children = node->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it ) + { + writeNodeLights( *it ); + } +} + +void CColladaMeshWriter::writeNodeCameras(irr::scene::ISceneNode * node) +{ + if ( !node || !getProperties() || !getProperties()->isExportable(node) ) + return; + + if ( isCamera(node) ) + { + ICameraSceneNode * cameraNode = static_cast<ICameraSceneNode*>(node); + irr::core::stringw name = nameForNode(node); + CameraNodes.insert(cameraNode, name); + + Writer->writeElement(L"camera", false, L"id", name.c_str()); + Writer->writeLineBreak(); + + Writer->writeElement(L"optics", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + if ( cameraNode->isOrthogonal() ) + { + Writer->writeElement(L"orthographic", false); + Writer->writeLineBreak(); + +// writeNode(L"xmag", core::stringw("1.0").c_str()); // TODO: do we need xmag, ymag? +// writeNode(L"ymag", core::stringw("1.0").c_str()); + writeNode(L"aspect_ratio", core::stringw(cameraNode->getAspectRatio()).c_str()); + writeNode(L"znear", core::stringw(cameraNode->getNearValue()).c_str()); + writeNode(L"zfar", core::stringw(cameraNode->getFarValue()).c_str()); + + Writer->writeClosingTag(L"orthographic"); + Writer->writeLineBreak(); + } + else + { + Writer->writeElement(L"perspective", false); + Writer->writeLineBreak(); + + writeNode(L"yfov", core::stringw(cameraNode->getFOV()*core::RADTODEG).c_str()); + writeNode(L"aspect_ratio", core::stringw(cameraNode->getAspectRatio()).c_str()); + writeNode(L"znear", core::stringw(cameraNode->getNearValue()).c_str()); + writeNode(L"zfar", core::stringw(cameraNode->getFarValue()).c_str()); + + Writer->writeClosingTag(L"perspective"); + Writer->writeLineBreak(); + } + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"optics"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"camera"); + Writer->writeLineBreak(); + } + + const core::list<ISceneNode*>& children = node->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it ) + { + writeNodeCameras( *it ); + } +} + +void CColladaMeshWriter::writeAllMeshGeometries() +{ + core::map<IMesh*, SColladaMesh>::ConstIterator it = Meshes.getConstIterator(); + for(; !it.atEnd(); it++ ) + { + IMesh* mesh = it->getKey(); + const SColladaMesh& colladaMesh = it->getValue(); + + if ( getGeometryWriting() == ECGI_PER_MESH_AND_MATERIAL && colladaMesh.GeometryMeshMaterials.size() > 1 ) + { + for ( u32 i=0; i<colladaMesh.GeometryMeshMaterials.size(); ++i ) + { + writeMeshGeometry(colladaMesh.GeometryMeshMaterials[i].GeometryName, mesh); + } + } + else + { + writeMeshGeometry(colladaMesh.Name, mesh); + } + } +} + +void CColladaMeshWriter::writeSceneNode(irr::scene::ISceneNode * node ) +{ + if ( !node || !getProperties() || !getProperties()->isExportable(node) ) + return; + + // Collada doesn't require to set the id, but some other tools have problems if none exists, so we just add it. + irr::core::stringw nameId(nameForNode(node)); + Writer->writeElement(L"node", false, L"id", nameId.c_str()); + Writer->writeLineBreak(); + + // DummyTransformationSceneNode don't have rotation, position, scale information + // But also don't always export the transformation matrix as that forces us creating + // new DummyTransformationSceneNode's on import. + if ( node->getType() == ESNT_DUMMY_TRANSFORMATION ) + { + writeMatrixElement(node->getRelativeTransformation()); + } + else + { + irr::core::vector3df rot(node->getRotation()); + if ( isCamera(node) && !static_cast<ICameraSceneNode*>(node)->getTargetAndRotationBinding() ) + { + ICameraSceneNode * camNode = static_cast<ICameraSceneNode*>(node); + const core::vector3df toTarget = camNode->getTarget() - camNode->getAbsolutePosition(); + rot = toTarget.getHorizontalAngle(); + } + + writeTranslateElement( node->getPosition() ); + writeRotateElement( irr::core::vector3df(1.f, 0.f, 0.f), rot.X ); + writeRotateElement( irr::core::vector3df(0.f, 1.f, 0.f), rot.Y ); + writeRotateElement( irr::core::vector3df(0.f, 0.f, 1.f), rot.Z ); + writeScaleElement( node->getScale() ); + } + + // instance geometry + IMesh* mesh = getProperties()->getMesh(node); + if ( mesh ) + { + MeshNode * n = Meshes.find(mesh); + if ( n ) + { + const SColladaMesh& colladaMesh = n->getValue(); + writeMeshInstanceGeometry(colladaMesh.findGeometryNameForNode(node), mesh, node); + } + } + + // instance light + if ( node->getType() == ESNT_LIGHT ) + { + LightNode * n = LightNodes.find(node); + if ( n ) + writeLightInstance(n->getValue().Name); + } + + // instance camera + if ( isCamera(node) ) + { + CameraNode * camNode = CameraNodes.find(node); + if ( camNode ) + writeCameraInstance(camNode->getValue()); + } + + const core::list<ISceneNode*>& children = node->getChildren(); + for ( core::list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it ) + { + writeSceneNode( *it ); + } + + Writer->writeClosingTag(L"node"); + Writer->writeLineBreak(); +} + +//! writes a mesh +bool CColladaMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + if (!file) + return false; + + reset(); + + Writer = FileSystem->createXMLWriter(file); + + if (!Writer) + { + os::Printer::log("Could not write file", file->getFileName()); + return false; + } + + Directory = FileSystem->getFileDir(FileSystem->getAbsolutePath( file->getFileName() )); + + os::Printer::log("Writing mesh", file->getFileName()); + + // write COLLADA header + + Writer->writeXMLHeader(); + + Writer->writeElement(L"COLLADA", false, + L"xmlns", L"http://www.collada.org/2005/11/COLLADASchema", + L"version", L"1.4.1"); + Writer->writeLineBreak(); + + // write asset data + writeAsset(); + + // write all materials + + Writer->writeElement(L"library_materials", false); + Writer->writeLineBreak(); + + writeMeshMaterials(mesh); + + Writer->writeClosingTag(L"library_materials"); + Writer->writeLineBreak(); + + Writer->writeElement(L"library_effects", false); + Writer->writeLineBreak(); + + writeMeshEffects(mesh); + + Writer->writeClosingTag(L"library_effects"); + Writer->writeLineBreak(); + + // images + writeLibraryImages(); + + // write mesh + + Writer->writeElement(L"library_geometries", false); + Writer->writeLineBreak(); + + irr::core::stringw meshname(nameForMesh(mesh, 0)); + writeMeshGeometry(meshname, mesh); + + Writer->writeClosingTag(L"library_geometries"); + Writer->writeLineBreak(); + + // write scene_library + if ( getWriteDefaultScene() ) + { + Writer->writeElement(L"library_visual_scenes", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"visual_scene", false, L"id", L"default_scene"); + Writer->writeLineBreak(); + + Writer->writeElement(L"node", false); + Writer->writeLineBreak(); + + writeMeshInstanceGeometry(meshname, mesh); + + Writer->writeClosingTag(L"node"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"visual_scene"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"library_visual_scenes"); + Writer->writeLineBreak(); + + + // write scene + Writer->writeElement(L"scene", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"instance_visual_scene", true, L"url", L"#default_scene"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"scene"); + Writer->writeLineBreak(); + } + + + // close everything + + Writer->writeClosingTag(L"COLLADA"); + Writer->drop(); + + return true; +} + +void CColladaMeshWriter::writeMeshInstanceGeometry(const irr::core::stringw& meshname, scene::IMesh* mesh, scene::ISceneNode* node) +{ + //<instance_geometry url="#mesh"> + Writer->writeElement(L"instance_geometry", false, L"url", toRef(meshname).c_str()); + Writer->writeLineBreak(); + + Writer->writeElement(L"bind_material", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + // instance materials + // <instance_material symbol="leaf" target="#MidsummerLeaf01"/> + bool useNodeMaterials = node && node->getMaterialCount() == mesh->getMeshBufferCount(); + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + irr::core::stringw strMatSymbol(nameForMaterialSymbol(mesh, i)); + core::stringw strMatTarget = "#"; + video::SMaterial & material = useNodeMaterials ? node->getMaterial(i) : mesh->getMeshBuffer(i)->getMaterial(); + strMatTarget += nameForMaterial(material, i, mesh, node); + Writer->writeElement(L"instance_material", false, L"symbol", strMatSymbol.c_str(), L"target", strMatTarget.c_str()); + Writer->writeLineBreak(); + + // TODO: need to handle second UV-set + // <bind_vertex_input semantic="uv" input_semantic="TEXCOORD" input_set="0"/> + Writer->writeElement(L"bind_vertex_input", true, L"semantic", L"uv", L"input_semantic", L"TEXCOORD", L"input_set", L"0" ); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"instance_material"); + Writer->writeLineBreak(); + } + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"bind_material"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"instance_geometry"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeLightInstance(const irr::core::stringw& lightName) +{ + Writer->writeElement(L"instance_light", true, L"url", toRef(lightName).c_str()); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeCameraInstance(const irr::core::stringw& cameraName) +{ + Writer->writeElement(L"instance_camera", true, L"url", toRef(cameraName).c_str()); + Writer->writeLineBreak(); +} + +bool CColladaMeshWriter::hasSecondTextureCoordinates(video::E_VERTEX_TYPE type) const +{ + return type == video::EVT_2TCOORDS; +} + +void CColladaMeshWriter::writeVector(const irr::core::vector3df& vec) +{ + wchar_t tmpbuf[255]; + swprintf(tmpbuf, 255, L"%f %f %f", vec.X, vec.Y, vec.Z); + + Writer->writeText(tmpbuf); +} + +void CColladaMeshWriter::writeUv(const irr::core::vector2df& vec) +{ + // change handedness + wchar_t tmpbuf[255]; + swprintf(tmpbuf, 255, L"%f %f", vec.X, 1.f-vec.Y); + + Writer->writeText(tmpbuf); +} + +void CColladaMeshWriter::writeVector(const irr::core::vector2df& vec) +{ + wchar_t tmpbuf[255]; + swprintf(tmpbuf, 255, L"%f %f", vec.X, vec.Y); + + Writer->writeText(tmpbuf); +} + +void CColladaMeshWriter::writeColor(const irr::video::SColorf& colorf, bool writeAlpha) +{ + wchar_t tmpbuf[255]; + if ( writeAlpha ) + swprintf(tmpbuf, 255, L"%f %f %f %f", colorf.getRed(), colorf.getGreen(), colorf.getBlue(), colorf.getAlpha()); + else + swprintf(tmpbuf, 255, L"%f %f %f", colorf.getRed(), colorf.getGreen(), colorf.getBlue()); + + Writer->writeText(tmpbuf); +} + +irr::core::stringw CColladaMeshWriter::toString(const irr::video::ECOLOR_FORMAT format) const +{ + switch ( format ) + { + case video::ECF_A1R5G5B5: return irr::core::stringw(L"A1R5G5B5"); + case video::ECF_R5G6B5: return irr::core::stringw(L"R5G6B5"); + case video::ECF_R8G8B8: return irr::core::stringw(L"R8G8B8"); + case video::ECF_A8R8G8B8: return irr::core::stringw(L"A8R8G8B8"); + default: return irr::core::stringw(L""); + } +} + +irr::core::stringw CColladaMeshWriter::toString(const irr::video::E_TEXTURE_CLAMP clamp) const +{ + switch ( clamp ) + { + case video::ETC_REPEAT: + return core::stringw(L"WRAP"); + case video::ETC_CLAMP: + case video::ETC_CLAMP_TO_EDGE: + return core::stringw(L"CLAMP"); + case video::ETC_CLAMP_TO_BORDER: + return core::stringw(L"BORDER"); + case video::ETC_MIRROR: + case video::ETC_MIRROR_CLAMP: + case video::ETC_MIRROR_CLAMP_TO_EDGE: + case video::ETC_MIRROR_CLAMP_TO_BORDER: + return core::stringw(L"MIRROR"); + } + return core::stringw(L"NONE"); +} + +irr::core::stringw CColladaMeshWriter::toString(const irr::scene::E_COLLADA_TRANSPARENT_FX transparent) const +{ + if ( transparent & ECOF_RGB_ZERO ) + return core::stringw(L"RGB_ZERO"); + else + return core::stringw(L"A_ONE"); +} + +irr::core::stringw CColladaMeshWriter::toRef(const irr::core::stringw& source) const +{ + irr::core::stringw ref(L"#"); + ref += source; + return ref; +} + +bool CColladaMeshWriter::isCamera(const scene::ISceneNode* node) const +{ + // TODO: we need some ISceneNode::hasType() function to get rid of those checks + if ( node->getType() == ESNT_CAMERA + || node->getType() == ESNT_CAMERA_MAYA + || node->getType() == ESNT_CAMERA_FPS ) + return true; + return false; +} + +irr::core::stringw CColladaMeshWriter::nameForMesh(const scene::IMesh* mesh, int instance) const +{ + IColladaMeshWriterNames * nameGenerator = getNameGenerator(); + if ( nameGenerator ) + { + return nameGenerator->nameForMesh(mesh, instance); + } + return irr::core::stringw(L"missing_name_generator"); +} + +irr::core::stringw CColladaMeshWriter::nameForNode(const scene::ISceneNode* node) const +{ + IColladaMeshWriterNames * nameGenerator = getNameGenerator(); + if ( nameGenerator ) + { + return nameGenerator->nameForNode(node); + } + return irr::core::stringw(L"missing_name_generator"); +} + +irr::core::stringw CColladaMeshWriter::nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) +{ + irr::core::stringw matName; + if ( getExportSMaterialsOnlyOnce() ) + { + matName = findCachedMaterialName(material); + if ( !matName.empty() ) + return matName; + } + + IColladaMeshWriterNames * nameGenerator = getNameGenerator(); + if ( nameGenerator ) + { + matName = nameGenerator->nameForMaterial(material, materialId, mesh, node); + } + else + matName = irr::core::stringw(L"missing_name_generator"); + + if ( getExportSMaterialsOnlyOnce() ) + MaterialNameCache.push_back (MaterialName(material, matName)); + return matName; +} + +// Each mesh-material has one symbol which is replaced on instantiation +irr::core::stringw CColladaMeshWriter::nameForMaterialSymbol(const scene::IMesh* mesh, int materialId) const +{ + wchar_t buf[100]; + swprintf(buf, 100, L"mat_symb_%p_%d", mesh, materialId); + return irr::core::stringw(buf); +} + +irr::core::stringw CColladaMeshWriter::findCachedMaterialName(const irr::video::SMaterial& material) const +{ + for ( u32 i=0; i<MaterialNameCache.size(); ++i ) + { + if ( MaterialNameCache[i].Material == material ) + return MaterialNameCache[i].Name; + } + return irr::core::stringw(); +} + +irr::core::stringw CColladaMeshWriter::minTexfilterToString(bool bilinear, bool trilinear) const +{ + if ( trilinear ) + return core::stringw(L"LINEAR_MIPMAP_LINEAR"); + else if ( bilinear ) + return core::stringw(L"LINEAR_MIPMAP_NEAREST"); + + return core::stringw(L"NONE"); +} + +inline irr::core::stringw CColladaMeshWriter::magTexfilterToString(bool bilinear, bool trilinear) const +{ + if ( bilinear || trilinear ) + return core::stringw(L"LINEAR"); + + return core::stringw(L"NONE"); +} + +bool CColladaMeshWriter::isXmlNameStartChar(wchar_t c) const +{ + return (c >= 'A' && c <= 'Z') + || c == L'_' + || (c >= 'a' && c <= 'z') + || (c >= 0xC0 && c <= 0xD6) + || (c >= 0xD8 && c <= 0xF6) + || (c >= 0xF8 && c <= 0x2FF) + || (c >= 0x370 && c <= 0x37D) + || (c >= 0x37F && c <= 0x1FFF) + || (c >= 0x200C && c <= 0x200D) + || (c >= 0x2070 && c <= 0x218F) + || (c >= 0x2C00 && c <= 0x2FEF) + || (c >= 0x3001 && c <= 0xD7FF) + || (c >= 0xF900 && c <= 0xFDCF) + || (c >= 0xFDF0 && c <= 0xFFFD) +#if __SIZEOF_WCHAR_T__ == 4 || __WCHAR_MAX__ > 0x10000 + || (c >= 0x10000 && c <= 0xEFFFF) +#endif + ; +} + +bool CColladaMeshWriter::isXmlNameChar(wchar_t c) const +{ + return isXmlNameStartChar(c) + || c == L'-' + || c == L'.' + || (c >= '0' && c <= '9') + || c == 0xB7 + || (c >= 0x0300 && c <= 0x036F) + || (c >= 0x203F && c <= 0x2040); +} + +// Restrict the characters to a set of allowed characters in xs::NCName. +irr::core::stringw CColladaMeshWriter::toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix) const +{ + irr::core::stringw result(prefix); // help to ensure id starts with a valid char and reduce chance of name-conflicts + if ( oldString.empty() ) + return result; + + result.append( oldString ); + + // We replace all characters not allowed by a replacement char + const wchar_t REPLACMENT = L'-'; + for ( irr::u32 i=1; i < result.size(); ++i ) + { + if ( result[i] == L':' || !isXmlNameChar(result[i]) ) + { + result[i] = REPLACMENT; + } + } + return result; +} + +// Restrict the characters to a set of allowed characters in xs::NCName. +irr::core::stringw CColladaMeshWriter::pathToURI(const irr::io::path& path) const +{ + irr::core::stringw result; + + // is this a relative path? + if ( path.size() > 1 + && path[0] != _IRR_TEXT('/') + && path[0] != _IRR_TEXT('\\') + && path[1] != _IRR_TEXT(':') ) + { + // not already starting with "./" ? + if ( path[0] != _IRR_TEXT('.') + || path[1] != _IRR_TEXT('/') ) + { + result.append(L"./"); + } + } + result.append(path); + + // TODO: make correct URI (without whitespaces) + + return result; +} + +void CColladaMeshWriter::writeAsset() +{ + Writer->writeElement(L"asset", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"contributor", false); + Writer->writeLineBreak(); + Writer->writeElement(L"authoring_tool", false); + Writer->writeText(L"Irrlicht Engine / irrEdit"); // this code has originated from irrEdit 0.7 + Writer->writeClosingTag(L"authoring_tool"); + Writer->writeLineBreak(); + Writer->writeClosingTag(L"contributor"); + Writer->writeLineBreak(); + + // The next two are required + Writer->writeElement(L"created", false); + Writer->writeText(L"2008-01-31T00:00:00Z"); + Writer->writeClosingTag(L"created"); + Writer->writeLineBreak(); + + Writer->writeElement(L"modified", false); + Writer->writeText(L"2008-01-31T00:00:00Z"); + Writer->writeClosingTag(L"modified"); + Writer->writeLineBreak(); + + Writer->writeElement(L"revision", false); + Writer->writeText(L"1.0"); + Writer->writeClosingTag(L"revision"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"asset"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeMeshMaterials(scene::IMesh* mesh, irr::core::array<irr::core::stringw> * materialNamesOut) +{ + u32 i; + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + video::SMaterial & material = mesh->getMeshBuffer(i)->getMaterial(); + core::stringw strMat(nameForMaterial(material, i, mesh, NULL)); + writeMaterial(strMat); + if ( materialNamesOut ) + materialNamesOut->push_back(strMat); + } +} + +void CColladaMeshWriter::writeMaterialEffect(const irr::core::stringw& materialfxname, const video::SMaterial & material) +{ + if ( EffectsWritten.find(materialfxname) ) + return; + EffectsWritten.insert(materialfxname, true); + + Writer->writeElement(L"effect", false, + L"id", materialfxname.c_str(), + L"name", materialfxname.c_str()); + Writer->writeLineBreak(); + Writer->writeElement(L"profile_COMMON", false); + Writer->writeLineBreak(); + + int numTextures = 0; + if ( getWriteTextures() ) + { + // write texture surfaces and samplers and buffer all used imagess + for ( int t=0; t<4; ++t ) + { + const video::SMaterialLayer& layer = material.TextureLayer[t]; + if ( !layer.Texture ) + break; + ++numTextures; + + if ( LibraryImages.linear_search(layer.Texture) < 0 ) + LibraryImages.push_back( layer.Texture ); + + irr::core::stringw texName("tex"); + texName += irr::core::stringw(t); + + // write texture surface + //<newparam sid="tex0-surface"> + irr::core::stringw texSurface(texName); + texSurface += L"-surface"; + Writer->writeElement(L"newparam", false, L"sid", texSurface.c_str()); + Writer->writeLineBreak(); + // <surface type="2D"> + Writer->writeElement(L"surface", false, L"type", L"2D"); + Writer->writeLineBreak(); + + // <init_from>internal_texturename</init_from> + Writer->writeElement(L"init_from", false); + irr::io::path p(FileSystem->getRelativeFilename(layer.Texture->getName().getPath(), Directory)); + Writer->writeText(toNCName(irr::core::stringw(p)).c_str()); + Writer->writeClosingTag(L"init_from"); + Writer->writeLineBreak(); + + // <format>A8R8G8B8</format> + Writer->writeElement(L"format", false); + video::ECOLOR_FORMAT format = layer.Texture->getColorFormat(); + Writer->writeText(toString(format).c_str()); + Writer->writeClosingTag(L"format"); + Writer->writeLineBreak(); + // </surface> + Writer->writeClosingTag(L"surface"); + Writer->writeLineBreak(); + // </newparam> + Writer->writeClosingTag(L"newparam"); + Writer->writeLineBreak(); + + // write texture sampler + // <newparam sid="tex0-sampler"> + irr::core::stringw texSampler(texName); + texSampler += L"-sampler"; + Writer->writeElement(L"newparam", false, L"sid", texSampler.c_str()); + Writer->writeLineBreak(); + // <sampler2D> + Writer->writeElement(L"sampler2D", false); + Writer->writeLineBreak(); + + // <source>tex0-surface</source> + Writer->writeElement(L"source", false); + Writer->writeText(texSurface.c_str()); + Writer->writeClosingTag(L"source"); + Writer->writeLineBreak(); + + // <wrap_s>WRAP</wrap_s> + Writer->writeElement(L"wrap_s", false); + Writer->writeText(toString((video::E_TEXTURE_CLAMP)layer.TextureWrapU).c_str()); + Writer->writeClosingTag(L"wrap_s"); + Writer->writeLineBreak(); + + // <wrap_t>WRAP</wrap_t> + Writer->writeElement(L"wrap_t", false); + Writer->writeText(toString((video::E_TEXTURE_CLAMP)layer.TextureWrapV).c_str()); + Writer->writeClosingTag(L"wrap_t"); + Writer->writeLineBreak(); + + // <minfilter>LINEAR_MIPMAP_LINEAR</minfilter> + Writer->writeElement(L"minfilter", false); + Writer->writeText(minTexfilterToString(layer.BilinearFilter, layer.TrilinearFilter).c_str()); + Writer->writeClosingTag(L"minfilter"); + Writer->writeLineBreak(); + + // <magfilter>LINEAR</magfilter> + Writer->writeElement(L"magfilter", false); + Writer->writeText(magTexfilterToString(layer.BilinearFilter, layer.TrilinearFilter).c_str()); + Writer->writeClosingTag(L"magfilter"); + Writer->writeLineBreak(); + + // TBD - actually not sure how anisotropic should be written, so for now it writes in a way + // that works with the way the loader reads it again. + if ( layer.AnisotropicFilter ) + { + // <mipfilter>LINEAR_MIPMAP_LINEAR</mipfilter> + Writer->writeElement(L"mipfilter", false); + Writer->writeText(L"LINEAR_MIPMAP_LINEAR"); + Writer->writeClosingTag(L"mipfilter"); + Writer->writeLineBreak(); + } + + // </sampler2D> + Writer->writeClosingTag(L"sampler2D"); + Writer->writeLineBreak(); + // </newparam> + Writer->writeClosingTag(L"newparam"); + Writer->writeLineBreak(); + } + } + + Writer->writeElement(L"technique", false, L"sid", L"common"); + Writer->writeLineBreak(); + + E_COLLADA_TECHNIQUE_FX techFx = getProperties() ? getProperties()->getTechniqueFx(material) : ECTF_BLINN; + writeFxElement(material, techFx); + + Writer->writeClosingTag(L"technique"); + Writer->writeLineBreak(); + Writer->writeClosingTag(L"profile_COMMON"); + Writer->writeLineBreak(); + Writer->writeClosingTag(L"effect"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeMeshEffects(scene::IMesh* mesh) +{ + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + video::SMaterial & material = mesh->getMeshBuffer(i)->getMaterial(); + irr::core::stringw materialfxname(nameForMaterial(material, i, mesh, NULL)); + materialfxname += L"-fx"; + writeMaterialEffect(materialfxname, material); + } +} + +void CColladaMeshWriter::writeMeshGeometry(const irr::core::stringw& meshname, scene::IMesh* mesh) +{ + core::stringw meshId(meshname); + + Writer->writeElement(L"geometry", false, L"id", meshId.c_str(), L"name", meshId.c_str()); + Writer->writeLineBreak(); + Writer->writeElement(L"mesh"); + Writer->writeLineBreak(); + + // do some statistics for the mesh to know which stuff needs to be saved into + // the file: + // - count vertices + // - check for the need of a second texture coordinate + // - count amount of second texture coordinates + // - check for the need of tangents (TODO) + + u32 totalVertexCount = 0; + u32 totalTCoords2Count = 0; + bool needsTangents = false; // TODO: tangents not supported here yet + u32 i=0; + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + totalVertexCount += mesh->getMeshBuffer(i)->getVertexCount(); + + if (hasSecondTextureCoordinates(mesh->getMeshBuffer(i)->getVertexType())) + totalTCoords2Count += mesh->getMeshBuffer(i)->getVertexCount(); + + if (!needsTangents) + needsTangents = mesh->getMeshBuffer(i)->getVertexType() == video::EVT_TANGENTS; + } + + SComponentGlobalStartPos* globalIndices = new SComponentGlobalStartPos[mesh->getMeshBufferCount()]; + + // write positions + core::stringw meshPosId(meshId); + meshPosId += L"-Pos"; + Writer->writeElement(L"source", false, L"id", meshPosId.c_str()); + Writer->writeLineBreak(); + + core::stringw vertexCountStr(totalVertexCount*3); + core::stringw meshPosArrayId(meshPosId); + meshPosArrayId += L"-array"; + Writer->writeElement(L"float_array", false, L"id", meshPosArrayId.c_str(), + L"count", vertexCountStr.c_str()); + Writer->writeLineBreak(); + + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh->getMeshBuffer(i); + video::E_VERTEX_TYPE vtxType = buffer->getVertexType(); + u32 vertexCount = buffer->getVertexCount(); + + globalIndices[i].PosStartIndex = 0; + + if (i!=0) + globalIndices[i].PosStartIndex = globalIndices[i-1].PosLastIndex + 1; + + globalIndices[i].PosLastIndex = globalIndices[i].PosStartIndex + vertexCount - 1; + + switch(vtxType) + { + case video::EVT_STANDARD: + { + video::S3DVertex* vtx = (video::S3DVertex*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].Pos); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* vtx = (video::S3DVertex2TCoords*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].Pos); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents* vtx = (video::S3DVertexTangents*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].Pos); + Writer->writeLineBreak(); + } + } + break; + } + } + + Writer->writeClosingTag(L"float_array"); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalVertexCount); + + Writer->writeElement(L"accessor", false, L"source", toRef(meshPosArrayId).c_str(), + L"count", vertexCountStr.c_str(), L"stride", L"3"); + Writer->writeLineBreak(); + + Writer->writeElement(L"param", true, L"name", L"X", L"type", L"float"); + Writer->writeLineBreak(); + Writer->writeElement(L"param", true, L"name", L"Y", L"type", L"float"); + Writer->writeLineBreak(); + Writer->writeElement(L"param", true, L"name", L"Z", L"type", L"float"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"accessor"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"source"); + Writer->writeLineBreak(); + + // write texture coordinates + + core::stringw meshTexCoord0Id(meshId); + meshTexCoord0Id += L"-TexCoord0"; + Writer->writeElement(L"source", false, L"id", meshTexCoord0Id.c_str()); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalVertexCount*2); + core::stringw meshTexCoordArrayId(meshTexCoord0Id); + meshTexCoordArrayId += L"-array"; + Writer->writeElement(L"float_array", false, L"id", meshTexCoordArrayId.c_str(), + L"count", vertexCountStr.c_str()); + Writer->writeLineBreak(); + + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh->getMeshBuffer(i); + video::E_VERTEX_TYPE vtxType = buffer->getVertexType(); + u32 vertexCount = buffer->getVertexCount(); + + globalIndices[i].TCoord0StartIndex = 0; + + if (i!=0) + globalIndices[i].TCoord0StartIndex = globalIndices[i-1].TCoord0LastIndex + 1; + + globalIndices[i].TCoord0LastIndex = globalIndices[i].TCoord0StartIndex + vertexCount - 1; + + switch(vtxType) + { + case video::EVT_STANDARD: + { + video::S3DVertex* vtx = (video::S3DVertex*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeUv(vtx[j].TCoords); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* vtx = (video::S3DVertex2TCoords*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeUv(vtx[j].TCoords); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents* vtx = (video::S3DVertexTangents*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeUv(vtx[j].TCoords); + Writer->writeLineBreak(); + } + } + break; + } + } + + Writer->writeClosingTag(L"float_array"); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalVertexCount); + + Writer->writeElement(L"accessor", false, L"source", toRef(meshTexCoordArrayId).c_str(), + L"count", vertexCountStr.c_str(), L"stride", L"2"); + Writer->writeLineBreak(); + + Writer->writeElement(L"param", true, L"name", L"U", L"type", L"float"); + Writer->writeLineBreak(); + Writer->writeElement(L"param", true, L"name", L"V", L"type", L"float"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"accessor"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"source"); + Writer->writeLineBreak(); + + // write normals + core::stringw meshNormalId(meshId); + meshNormalId += L"-Normal"; + Writer->writeElement(L"source", false, L"id", meshNormalId.c_str()); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalVertexCount*3); + core::stringw meshNormalArrayId(meshNormalId); + meshNormalArrayId += L"-array"; + Writer->writeElement(L"float_array", false, L"id", meshNormalArrayId.c_str(), + L"count", vertexCountStr.c_str()); + Writer->writeLineBreak(); + + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh->getMeshBuffer(i); + video::E_VERTEX_TYPE vtxType = buffer->getVertexType(); + u32 vertexCount = buffer->getVertexCount(); + + globalIndices[i].NormalStartIndex = 0; + + if (i!=0) + globalIndices[i].NormalStartIndex = globalIndices[i-1].NormalLastIndex + 1; + + globalIndices[i].NormalLastIndex = globalIndices[i].NormalStartIndex + vertexCount - 1; + + switch(vtxType) + { + case video::EVT_STANDARD: + { + video::S3DVertex* vtx = (video::S3DVertex*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].Normal); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* vtx = (video::S3DVertex2TCoords*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].Normal); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents* vtx = (video::S3DVertexTangents*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].Normal); + Writer->writeLineBreak(); + } + } + break; + } + } + + Writer->writeClosingTag(L"float_array"); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalVertexCount); + + Writer->writeElement(L"accessor", false, L"source", toRef(meshNormalArrayId).c_str(), + L"count", vertexCountStr.c_str(), L"stride", L"3"); + Writer->writeLineBreak(); + + Writer->writeElement(L"param", true, L"name", L"X", L"type", L"float"); + Writer->writeLineBreak(); + Writer->writeElement(L"param", true, L"name", L"Y", L"type", L"float"); + Writer->writeLineBreak(); + Writer->writeElement(L"param", true, L"name", L"Z", L"type", L"float"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"accessor"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"source"); + Writer->writeLineBreak(); + + // write second set of texture coordinates + core::stringw meshTexCoord1Id(meshId); + meshTexCoord1Id += L"-TexCoord1"; + if (totalTCoords2Count) + { + Writer->writeElement(L"source", false, L"id", meshTexCoord1Id.c_str()); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalTCoords2Count*2); + core::stringw meshTexCoord1ArrayId(meshTexCoord1Id); + meshTexCoord1ArrayId += L"-array"; + Writer->writeElement(L"float_array", false, L"id", meshTexCoord1ArrayId.c_str(), + L"count", vertexCountStr.c_str()); + Writer->writeLineBreak(); + + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh->getMeshBuffer(i); + video::E_VERTEX_TYPE vtxType = buffer->getVertexType(); + u32 vertexCount = buffer->getVertexCount(); + + if (hasSecondTextureCoordinates(vtxType)) + { + globalIndices[i].TCoord1StartIndex = 0; + + if (i!=0 && globalIndices[i-1].TCoord1LastIndex != -1) + globalIndices[i].TCoord1StartIndex = globalIndices[i-1].TCoord1LastIndex + 1; + + globalIndices[i].TCoord1LastIndex = globalIndices[i].TCoord1StartIndex + vertexCount - 1; + + switch(vtxType) + { + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* vtx = (video::S3DVertex2TCoords*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + writeVector(vtx[j].TCoords2); + Writer->writeLineBreak(); + } + } + break; + default: + break; + } + } // end this buffer has 2 texture coordinates + } + + Writer->writeClosingTag(L"float_array"); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + vertexCountStr = core::stringw(totalTCoords2Count); + + Writer->writeElement(L"accessor", false, L"source", toRef(meshTexCoord1ArrayId).c_str(), + L"count", vertexCountStr.c_str(), L"stride", L"2"); + Writer->writeLineBreak(); + + Writer->writeElement(L"param", true, L"name", L"U", L"type", L"float"); + Writer->writeLineBreak(); + Writer->writeElement(L"param", true, L"name", L"V", L"type", L"float"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"accessor"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"source"); + Writer->writeLineBreak(); + } + + // write tangents + + // TODO + + // write vertices + core::stringw meshVtxId(meshId); + meshVtxId += L"-Vtx"; + Writer->writeElement(L"vertices", false, L"id", meshVtxId.c_str()); + Writer->writeLineBreak(); + + Writer->writeElement(L"input", true, L"semantic", L"POSITION", L"source", toRef(meshPosId).c_str()); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"vertices"); + Writer->writeLineBreak(); + + // write polygons + + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh->getMeshBuffer(i); + + const u32 polyCount = buffer->getIndexCount() / 3; + core::stringw strPolyCount(polyCount); + irr::core::stringw strMat(nameForMaterialSymbol(mesh, i)); + + Writer->writeElement(L"triangles", false, L"count", strPolyCount.c_str(), + L"material", strMat.c_str()); + Writer->writeLineBreak(); + + Writer->writeElement(L"input", true, L"semantic", L"VERTEX", L"source", toRef(meshVtxId).c_str(), L"offset", L"0"); + Writer->writeLineBreak(); + Writer->writeElement(L"input", true, L"semantic", L"TEXCOORD", L"source", toRef(meshTexCoord0Id).c_str(), L"offset", L"1", L"set", L"0"); + Writer->writeLineBreak(); + Writer->writeElement(L"input", true, L"semantic", L"NORMAL", L"source", toRef(meshNormalId).c_str(), L"offset", L"2"); + Writer->writeLineBreak(); + + bool has2ndTexCoords = hasSecondTextureCoordinates(buffer->getVertexType()); + if (has2ndTexCoords) + { + // TODO: when working on second uv-set - my suspicion is that this one should be called "TEXCOORD2" + // to allow bind_vertex_input to differentiate the uv-sets. + Writer->writeElement(L"input", true, L"semantic", L"TEXCOORD", L"source", toRef(meshTexCoord1Id).c_str(), L"idx", L"3"); + Writer->writeLineBreak(); + } + + // write indices now + + s32 posIdx = globalIndices[i].PosStartIndex; + s32 tCoordIdx = globalIndices[i].TCoord0StartIndex; + s32 normalIdx = globalIndices[i].NormalStartIndex; + s32 tCoord2Idx = globalIndices[i].TCoord1StartIndex; + + Writer->writeElement(L"p", false); + + core::stringw strP; + strP.reserve(100); + for (u32 p=0; p<polyCount; ++p) + { + strP = ""; + strP += buffer->getIndices()[(p*3) + 0] + posIdx; + strP += " "; + strP += buffer->getIndices()[(p*3) + 0] + tCoordIdx; + strP += " "; + strP += buffer->getIndices()[(p*3) + 0] + normalIdx; + strP += " "; + if (has2ndTexCoords) + { + strP += buffer->getIndices()[(p*3) + 0] + tCoord2Idx; + strP += " "; + } + + strP += buffer->getIndices()[(p*3) + 1] + posIdx; + strP += " "; + strP += buffer->getIndices()[(p*3) + 1] + tCoordIdx; + strP += " "; + strP += buffer->getIndices()[(p*3) + 1] + normalIdx; + strP += " "; + if (has2ndTexCoords) + { + strP += buffer->getIndices()[(p*3) + 1] + tCoord2Idx; + strP += " "; + } + + strP += buffer->getIndices()[(p*3) + 2] + posIdx; + strP += " "; + strP += buffer->getIndices()[(p*3) + 2] + tCoordIdx; + strP += " "; + strP += buffer->getIndices()[(p*3) + 2] + normalIdx; + if (has2ndTexCoords) + { + strP += " "; + strP += buffer->getIndices()[(p*3) + 2] + tCoord2Idx; + } + strP += " "; + + Writer->writeText(strP.c_str()); + } + + Writer->writeClosingTag(L"p"); + Writer->writeLineBreak(); + + // close index buffer section + + Writer->writeClosingTag(L"triangles"); + Writer->writeLineBreak(); + } + + // close mesh and geometry + delete [] globalIndices; + Writer->writeClosingTag(L"mesh"); + Writer->writeLineBreak(); + Writer->writeClosingTag(L"geometry"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeLibraryImages() +{ + if ( getWriteTextures() && !LibraryImages.empty() ) + { + Writer->writeElement(L"library_images", false); + Writer->writeLineBreak(); + + for ( irr::u32 i=0; i<LibraryImages.size(); ++i ) + { + irr::io::path p(FileSystem->getRelativeFilename(LibraryImages[i]->getName().getPath(), Directory)); + //<image name="rose01"> + irr::core::stringw ncname( toNCName(irr::core::stringw(p)) ); + Writer->writeElement(L"image", false, L"id", ncname.c_str(), L"name", ncname.c_str()); + Writer->writeLineBreak(); + // <init_from>../flowers/rose01.jpg</init_from> + Writer->writeElement(L"init_from", false); + Writer->writeText(pathToURI(p).c_str()); + Writer->writeClosingTag(L"init_from"); + Writer->writeLineBreak(); + // </image> + Writer->writeClosingTag(L"image"); + Writer->writeLineBreak(); + } + + Writer->writeClosingTag(L"library_images"); + Writer->writeLineBreak(); + } +} + +void CColladaMeshWriter::writeColorElement(const video::SColorf & col, bool writeAlpha) +{ + Writer->writeElement(L"color", false); + + writeColor(col, writeAlpha); + + Writer->writeClosingTag(L"color"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeColorElement(const video::SColor & col, bool writeAlpha) +{ + writeColorElement( video::SColorf(col), writeAlpha ); +} + +void CColladaMeshWriter::writeAmbientLightElement(const video::SColorf & col) +{ + Writer->writeElement(L"light", false, L"id", L"ambientlight"); + Writer->writeLineBreak(); + + Writer->writeElement(L"technique_common", false); + Writer->writeLineBreak(); + + Writer->writeElement(L"ambient", false); + Writer->writeLineBreak(); + + writeColorElement(col, false); + + Writer->writeClosingTag(L"ambient"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"technique_common"); + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"light"); + Writer->writeLineBreak(); +} + +s32 CColladaMeshWriter::getCheckedTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) +{ + if ( !getWriteTextures() + || !getProperties() ) + return -1; + + s32 idx = getProperties()->getTextureIdx(material, cs); + if ( idx >= 0 && !material.TextureLayer[idx].Texture ) + return -1; + + return idx; +} + +video::SColor CColladaMeshWriter::getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs, E_COLLADA_IRR_COLOR colType) +{ + switch ( colType ) + { + case ECIC_NONE: + return video::SColor(255, 0, 0, 0); + + case ECIC_CUSTOM: + return getProperties()->getCustomColor(material, cs); + + case ECIC_DIFFUSE: + return material.DiffuseColor; + + case ECIC_AMBIENT: + return material.AmbientColor; + + case ECIC_EMISSIVE: + return material.EmissiveColor; + + case ECIC_SPECULAR: + return material.SpecularColor; + } + return video::SColor(255, 0, 0, 0); +} + +void CColladaMeshWriter::writeTextureSampler(s32 textureIdx) +{ + irr::core::stringw sampler(L"tex"); + sampler += irr::core::stringw(textureIdx); + sampler += L"-sampler"; + + // <texture texture="sampler" texcoord="texCoordUv"/> + Writer->writeElement(L"texture", true, L"texture", sampler.c_str(), L"texcoord", L"uv" ); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeFxElement(const video::SMaterial & material, E_COLLADA_TECHNIQUE_FX techFx) +{ + core::stringw fxLabel; + bool writeEmission = true; + bool writeAmbient = true; + bool writeDiffuse = true; + bool writeSpecular = true; + bool writeShininess = true; + bool writeReflective = true; + bool writeReflectivity = true; + bool writeTransparent = true; + bool writeTransparency = true; + bool writeIndexOfRefraction = true; + switch ( techFx ) + { + case ECTF_BLINN: + fxLabel = L"blinn"; + break; + case ECTF_PHONG: + fxLabel = L"phong"; + break; + case ECTF_LAMBERT: + fxLabel = L"lambert"; + writeSpecular = false; + writeShininess = false; + break; + case ECTF_CONSTANT: + fxLabel = L"constant"; + writeAmbient = false; + writeDiffuse = false; + writeSpecular = false; + writeShininess = false; + break; + } + + Writer->writeElement(fxLabel.c_str(), false); + Writer->writeLineBreak(); + + // write all interesting material parameters + // attributes must be written in fixed order + if ( getProperties() ) + { + if ( writeEmission ) + { + writeColorFx(material, L"emission", ECCS_EMISSIVE); + } + + if ( writeAmbient ) + { + writeColorFx(material, L"ambient", ECCS_AMBIENT); + } + + if ( writeDiffuse ) + { + writeColorFx(material, L"diffuse", ECCS_DIFFUSE); + } + + if ( writeSpecular ) + { + writeColorFx(material, L"specular", ECCS_SPECULAR); + } + + if ( writeShininess ) + { + Writer->writeElement(L"shininess", false); + Writer->writeLineBreak(); + writeFloatElement(material.Shininess); + Writer->writeClosingTag(L"shininess"); + Writer->writeLineBreak(); + } + + if ( writeReflective ) + { + writeColorFx(material, L"reflective", ECCS_REFLECTIVE); + } + + if ( writeReflectivity ) + { + f32 t = getProperties()->getReflectivity(material); + if ( t >= 0.f ) + { + // <transparency> <float>1.000000</float> </transparency> + Writer->writeElement(L"reflectivity", false); + Writer->writeLineBreak(); + writeFloatElement(t); + Writer->writeClosingTag(L"reflectivity"); + Writer->writeLineBreak(); + } + } + + if ( writeTransparent ) + { + E_COLLADA_TRANSPARENT_FX transparentFx = getProperties()->getTransparentFx(material); + writeColorFx(material, L"transparent", ECCS_TRANSPARENT, L"opaque", toString(transparentFx).c_str()); + } + + if ( writeTransparency ) + { + f32 t = getProperties()->getTransparency(material); + if ( t >= 0.f ) + { + // <transparency> <float>1.000000</float> </transparency> + Writer->writeElement(L"transparency", false); + Writer->writeLineBreak(); + writeFloatElement(t); + Writer->writeClosingTag(L"transparency"); + Writer->writeLineBreak(); + } + } + + if ( writeIndexOfRefraction ) + { + f32 t = getProperties()->getIndexOfRefraction(material); + if ( t >= 0.f ) + { + Writer->writeElement(L"index_of_refraction", false); + Writer->writeLineBreak(); + writeFloatElement(t); + Writer->writeClosingTag(L"index_of_refraction"); + Writer->writeLineBreak(); + } + } + } + + + Writer->writeClosingTag(fxLabel.c_str()); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeColorFx(const video::SMaterial & material, const wchar_t * colorname, E_COLLADA_COLOR_SAMPLER cs, const wchar_t* attr1Name, const wchar_t* attr1Value) +{ + irr::s32 idx = getCheckedTextureIdx(material, cs); + E_COLLADA_IRR_COLOR colType = idx < 0 ? getProperties()->getColorMapping(material, cs) : ECIC_NONE; + if ( idx >= 0 || colType != ECIC_NONE ) + { + Writer->writeElement(colorname, false, attr1Name, attr1Value); + Writer->writeLineBreak(); + if ( idx >= 0 ) + writeTextureSampler(idx); + else + writeColorElement(getColorMapping(material, cs, colType)); + Writer->writeClosingTag(colorname); + Writer->writeLineBreak(); + } +} + +void CColladaMeshWriter::writeNode(const wchar_t * nodeName, const wchar_t * content) +{ + Writer->writeElement(nodeName, false); + Writer->writeText(content); + Writer->writeClosingTag(nodeName); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeFloatElement(irr::f32 value) +{ + Writer->writeElement(L"float", false); + Writer->writeText(core::stringw((double)value).c_str()); + Writer->writeClosingTag(L"float"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeRotateElement(const irr::core::vector3df& axis, irr::f32 angle) +{ + Writer->writeElement(L"rotate", false); + irr::core::stringw txt(axis.X); + txt += L" "; + txt += irr::core::stringw(axis.Y); + txt += L" "; + txt += irr::core::stringw(axis.Z); + txt += L" "; + txt += irr::core::stringw((double)angle); + Writer->writeText(txt.c_str()); + Writer->writeClosingTag(L"rotate"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeScaleElement(const irr::core::vector3df& scale) +{ + Writer->writeElement(L"scale", false); + irr::core::stringw txt(scale.X); + txt += L" "; + txt += irr::core::stringw(scale.Y); + txt += L" "; + txt += irr::core::stringw(scale.Z); + Writer->writeText(txt.c_str()); + Writer->writeClosingTag(L"scale"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeTranslateElement(const irr::core::vector3df& translate) +{ + Writer->writeElement(L"translate", false); + irr::core::stringw txt(translate.X); + txt += L" "; + txt += irr::core::stringw(translate.Y); + txt += L" "; + txt += irr::core::stringw(translate.Z); + Writer->writeText(txt.c_str()); + Writer->writeClosingTag(L"translate"); + Writer->writeLineBreak(); +} + +void CColladaMeshWriter::writeMatrixElement(const irr::core::matrix4& matrix) +{ + Writer->writeElement(L"matrix", false); + Writer->writeLineBreak(); + + for ( int a=0; a<4; ++a ) + { + irr::core::stringw txt; + for ( int b=0; b<4; ++b ) + { + if ( b > 0 ) + txt += " "; + // row-column switched compared to Irrlicht + txt += irr::core::stringw(matrix[b*4+a]); + } + Writer->writeText(txt.c_str()); + Writer->writeLineBreak(); + } + + Writer->writeClosingTag(L"matrix"); + Writer->writeLineBreak(); +} + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.h new file mode 100644 index 0000000..61f2a27 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CColladaMeshWriter.h @@ -0,0 +1,271 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_C_COLLADA_MESH_WRITER_H_INCLUDED__ +#define __IRR_C_COLLADA_MESH_WRITER_H_INCLUDED__ + +#include "IColladaMeshWriter.h" +#include "S3DVertex.h" +#include "irrMap.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace io +{ + class IXMLWriter; + class IFileSystem; +} + +namespace scene +{ + //! Callback interface for properties which can be used to influence collada writing + // (Implementer note: keep namespace labels here to make it easier for users copying this one) + class CColladaMeshWriterProperties : public virtual IColladaMeshWriterProperties + { + public: + //! Which lighting model should be used in the technique (FX) section when exporting effects (materials) + virtual irr::scene::E_COLLADA_TECHNIQUE_FX getTechniqueFx(const irr::video::SMaterial& material) const; + + //! Which texture index should be used when writing the texture of the given sampler color. + virtual irr::s32 getTextureIdx(const irr::video::SMaterial & material, irr::scene::E_COLLADA_COLOR_SAMPLER cs) const; + + //! Return which color from Irrlicht should be used for the color requested by collada + virtual irr::scene::E_COLLADA_IRR_COLOR getColorMapping(const irr::video::SMaterial & material, irr::scene::E_COLLADA_COLOR_SAMPLER cs) const; + + //! Return custom colors for certain color types requested by collada. + virtual irr::video::SColor getCustomColor(const irr::video::SMaterial & material, irr::scene::E_COLLADA_COLOR_SAMPLER cs) const; + + //! Return the settings for transparence + virtual irr::scene::E_COLLADA_TRANSPARENT_FX getTransparentFx(const irr::video::SMaterial& material) const; + + //! Transparency value for that material. + virtual irr::f32 getTransparency(const irr::video::SMaterial& material) const; + + //! Reflectivity value for that material + virtual irr::f32 getReflectivity(const irr::video::SMaterial& material) const; + + //! Return index of refraction for that material + virtual irr::f32 getIndexOfRefraction(const irr::video::SMaterial& material) const; + + //! Should node be used in scene export? By default all visible nodes are exported. + virtual bool isExportable(const irr::scene::ISceneNode * node) const; + + //! Return the mesh for the given nod. If it has no mesh or shouldn't export it's mesh return 0. + virtual irr::scene::IMesh* getMesh(irr::scene::ISceneNode * node); + + //! Return if the node has it's own material overwriting the mesh-materials + virtual bool useNodeMaterial(const scene::ISceneNode* node) const; + }; + + class CColladaMeshWriterNames : public virtual IColladaMeshWriterNames + { + public: + CColladaMeshWriterNames(IColladaMeshWriter * writer); + virtual irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance); + virtual irr::core::stringw nameForNode(const scene::ISceneNode* node); + virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node); + protected: + irr::core::stringw nameForPtr(const void* ptr) const; + private: + IColladaMeshWriter * ColladaMeshWriter; + }; + + + +//! class to write meshes, implementing a COLLADA (.dae, .xml) writer +/** This writer implementation has been originally developed for irrEdit and then +merged out to the Irrlicht Engine */ +class CColladaMeshWriter : public IColladaMeshWriter +{ +public: + + CColladaMeshWriter(ISceneManager * smgr, video::IVideoDriver* driver, io::IFileSystem* fs); + virtual ~CColladaMeshWriter(); + + //! Returns the type of the mesh writer + virtual EMESH_WRITER_TYPE getType() const; + + //! writes a scene starting with the given node + virtual bool writeScene(io::IWriteFile* file, scene::ISceneNode* root); + + //! writes a mesh + virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); + + // Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix. + virtual irr::core::stringw toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix=irr::core::stringw(L"_NC_")) const; + +protected: + + void reset(); + bool hasSecondTextureCoordinates(video::E_VERTEX_TYPE type) const; + void writeUv(const irr::core::vector2df& vec); + void writeVector(const irr::core::vector2df& vec); + void writeVector(const irr::core::vector3df& vec); + void writeColor(const irr::video::SColorf& colorf, bool writeAlpha=true); + inline irr::core::stringw toString(const irr::video::ECOLOR_FORMAT format) const; + inline irr::core::stringw toString(const irr::video::E_TEXTURE_CLAMP clamp) const; + inline irr::core::stringw toString(const irr::scene::E_COLLADA_TRANSPARENT_FX opaque) const; + inline irr::core::stringw toRef(const irr::core::stringw& source) const; + bool isCamera(const scene::ISceneNode* node) const; + irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance) const; + irr::core::stringw nameForNode(const scene::ISceneNode* node) const; + irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node); + irr::core::stringw nameForMaterialSymbol(const scene::IMesh* mesh, int materialId) const; + irr::core::stringw findCachedMaterialName(const irr::video::SMaterial& material) const; + irr::core::stringw minTexfilterToString(bool bilinear, bool trilinear) const; + irr::core::stringw magTexfilterToString(bool bilinear, bool trilinear) const; + irr::core::stringw pathToURI(const irr::io::path& path) const; + inline bool isXmlNameStartChar(wchar_t c) const; + inline bool isXmlNameChar(wchar_t c) const; + s32 getCheckedTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs); + video::SColor getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs, E_COLLADA_IRR_COLOR colType); + void writeAsset(); + void makeMeshNames(irr::scene::ISceneNode * node); + void writeNodeMaterials(irr::scene::ISceneNode * node); + void writeNodeEffects(irr::scene::ISceneNode * node); + void writeNodeLights(irr::scene::ISceneNode * node); + void writeNodeCameras(irr::scene::ISceneNode * node); + void writeAllMeshGeometries(); + void writeSceneNode(irr::scene::ISceneNode * node); + void writeMeshMaterials(scene::IMesh* mesh, irr::core::array<irr::core::stringw> * materialNamesOut=0); + void writeMeshEffects(scene::IMesh* mesh); + void writeMaterialEffect(const irr::core::stringw& materialname, const video::SMaterial & material); + void writeMeshGeometry(const irr::core::stringw& meshname, scene::IMesh* mesh); + void writeMeshInstanceGeometry(const irr::core::stringw& meshname, scene::IMesh* mesh, scene::ISceneNode* node=0); + void writeMaterial(const irr::core::stringw& materialname); + void writeLightInstance(const irr::core::stringw& lightName); + void writeCameraInstance(const irr::core::stringw& cameraName); + void writeLibraryImages(); + void writeColorFx(const video::SMaterial & material, const wchar_t * colorname, E_COLLADA_COLOR_SAMPLER cs, const wchar_t* attr1Name=0, const wchar_t* attr1Value=0); + void writeAmbientLightElement(const video::SColorf & col); + void writeColorElement(const video::SColor & col, bool writeAlpha=true); + void writeColorElement(const video::SColorf & col, bool writeAlpha=true); + void writeTextureSampler(s32 textureIdx); + void writeFxElement(const video::SMaterial & material, E_COLLADA_TECHNIQUE_FX techFx); + void writeNode(const wchar_t * nodeName, const wchar_t * content); + void writeFloatElement(irr::f32 value); + void writeRotateElement(const irr::core::vector3df& axis, irr::f32 angle); + void writeScaleElement(const irr::core::vector3df& scale); + void writeTranslateElement(const irr::core::vector3df& translate); + void writeMatrixElement(const irr::core::matrix4& matrix); + + struct SComponentGlobalStartPos + { + SComponentGlobalStartPos() : PosStartIndex(-1), PosLastIndex(-1), + NormalStartIndex(-1), NormalLastIndex(-1), + TCoord0StartIndex(-1), TCoord0LastIndex(-1), + TCoord1StartIndex(-1), TCoord1LastIndex(-1) + { } + + s32 PosStartIndex; + s32 PosLastIndex; + + s32 NormalStartIndex; + s32 NormalLastIndex; + + s32 TCoord0StartIndex; + s32 TCoord0LastIndex; + + s32 TCoord1StartIndex; + s32 TCoord1LastIndex; + }; + + io::IFileSystem* FileSystem; + video::IVideoDriver* VideoDriver; + io::IXMLWriter* Writer; + core::array<video::ITexture*> LibraryImages; + io::path Directory; + + // Helper struct for creating geometry copies for the ECGI_PER_MESH_AND_MATERIAL settings. + struct SGeometryMeshMaterials + { + bool equals(const core::array<irr::core::stringw>& names) const + { + if ( names.size() != MaterialNames.size() ) + return false; + for ( irr::u32 i=0; i<MaterialNames.size(); ++i ) + if ( names[i] != MaterialNames[i] ) + return false; + return true; + } + + irr::core::stringw GeometryName; // replacing the usual ColladaMesh::Name + core::array<irr::core::stringw> MaterialNames; // Material names exported for this instance + core::array<const ISceneNode*> MaterialOwners; // Nodes using this specific mesh-material combination + }; + + // Check per mesh-ptr if stuff has been written for this mesh already + struct SColladaMesh + { + SColladaMesh() : MaterialsWritten(false), EffectsWritten(false) + { + } + + SGeometryMeshMaterials * findGeometryMeshMaterials(const irr::core::array<irr::core::stringw> materialNames) + { + for ( irr::u32 i=0; i<GeometryMeshMaterials.size(); ++i ) + { + if ( GeometryMeshMaterials[i].equals(materialNames) ) + return &(GeometryMeshMaterials[i]); + } + return NULL; + } + + const irr::core::stringw& findGeometryNameForNode(const ISceneNode* node) const + { + if ( GeometryMeshMaterials.size() < 2 ) + return Name; + for ( irr::u32 i=0; i<GeometryMeshMaterials.size(); ++i ) + { + if ( GeometryMeshMaterials[i].MaterialOwners.linear_search(node) >= 0 ) + return GeometryMeshMaterials[i].GeometryName; + } + return Name; // (shouldn't get here usually) + } + + irr::core::stringw Name; + bool MaterialsWritten; // just an optimization doing that here in addition to the MaterialsWritten map + bool EffectsWritten; // just an optimization doing that here in addition to the EffectsWritten map + + core::array<SGeometryMeshMaterials> GeometryMeshMaterials; + }; + typedef core::map<IMesh*, SColladaMesh>::Node MeshNode; + core::map<IMesh*, SColladaMesh> Meshes; + + // structure for the lights library + struct SColladaLight + { + SColladaLight() {} + irr::core::stringw Name; + }; + typedef core::map<ISceneNode*, SColladaLight>::Node LightNode; + core::map<ISceneNode*, SColladaLight> LightNodes; + + // structure for the camera library + typedef core::map<ISceneNode*, irr::core::stringw>::Node CameraNode; + core::map<ISceneNode*, irr::core::stringw> CameraNodes; + + // Check per name if stuff has been written already + // TODO: second parameter not needed, we just don't have a core::set class yet in Irrlicht + core::map<irr::core::stringw, bool> MaterialsWritten; + core::map<irr::core::stringw, bool> EffectsWritten; + + // Cache material names + struct MaterialName + { + MaterialName(const irr::video::SMaterial & material, const irr::core::stringw& name) + : Material(material), Name(name) + {} + irr::video::SMaterial Material; + irr::core::stringw Name; + }; + irr::core::array< MaterialName > MaterialNameCache; +}; + + +} // end namespace +} // end namespace + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.cpp new file mode 100644 index 0000000..abc2c33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.cpp @@ -0,0 +1,705 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CColorConverter.h" +#include "SColor.h" +#include "os.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +//! converts a monochrome bitmap to A1R5G5B5 data +void CColorConverter::convert1BitTo16Bit(const u8* in, s16* out, s32 width, s32 height, s32 linepad, bool flip) +{ + if (!in || !out) + return; + + if (flip) + out += width * height; + + for (s32 y=0; y<height; ++y) + { + s32 shift = 7; + if (flip) + out -= width; + + for (s32 x=0; x<width; ++x) + { + out[x] = *in>>shift & 0x01 ? (s16)0xffff : (s16)0x8000; + + if ((--shift)<0) // 8 pixel done + { + shift=7; + ++in; + } + } + + if (shift != 7) // width did not fill last byte + ++in; + + if (!flip) + out += width; + in += linepad; + } +} + + + +//! converts a 4 bit palettized image to A1R5G5B5 +void CColorConverter::convert4BitTo16Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad, bool flip) +{ + if (!in || !out || !palette) + return; + + if (flip) + out += width*height; + + for (s32 y=0; y<height; ++y) + { + s32 shift = 4; + if (flip) + out -= width; + + for (s32 x=0; x<width; ++x) + { + out[x] = X8R8G8B8toA1R5G5B5(palette[(u8)((*in >> shift) & 0xf)]); + + if (shift==0) + { + shift = 4; + ++in; + } + else + shift = 0; + } + + if (shift == 0) // odd width + ++in; + + if (!flip) + out += width; + in += linepad; + } +} + + + +//! converts a 8 bit palettized image into A1R5G5B5 +void CColorConverter::convert8BitTo16Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad, bool flip) +{ + if (!in || !out || !palette) + return; + + if (flip) + out += width * height; + + for (s32 y=0; y<height; ++y) + { + if (flip) + out -= width; // one line back + for (s32 x=0; x<width; ++x) + { + out[x] = X8R8G8B8toA1R5G5B5(palette[(u8)(*in)]); + ++in; + } + if (!flip) + out += width; + in += linepad; + } +} + +//! converts a 8 bit palettized or non palettized image (A8) into R8G8B8 +void CColorConverter::convert8BitTo24Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad, bool flip) +{ + if (!in || !out ) + return; + + const s32 lineWidth = 3 * width; + if (flip) + out += lineWidth * height; + + for (s32 y=0; y<height; ++y) + { + if (flip) + out -= lineWidth; // one line back + for (s32 x=0; x< lineWidth; x += 3) + { + if ( palette ) + { +#ifdef __BIG_ENDIAN__ + out[x+0] = palette[ (in[0] << 2 ) + 0]; + out[x+1] = palette[ (in[0] << 2 ) + 1]; + out[x+2] = palette[ (in[0] << 2 ) + 2]; +#else + out[x+0] = palette[ (in[0] << 2 ) + 2]; + out[x+1] = palette[ (in[0] << 2 ) + 1]; + out[x+2] = palette[ (in[0] << 2 ) + 0]; +#endif + } + else + { + out[x+0] = in[0]; + out[x+1] = in[0]; + out[x+2] = in[0]; + } + ++in; + } + if (!flip) + out += lineWidth; + in += linepad; + } +} + +//! converts a 8 bit palettized or non palettized image (A8) into R8G8B8 +void CColorConverter::convert8BitTo32Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad, bool flip) +{ + if (!in || !out ) + return; + + const u32 lineWidth = 4 * width; + if (flip) + out += lineWidth * height; + + u32 x; + register u32 c; + for (u32 y=0; y < (u32) height; ++y) + { + if (flip) + out -= lineWidth; // one line back + + if ( palette ) + { + for (x=0; x < (u32) width; x += 1) + { + c = in[x]; + ((u32*)out)[x] = ((u32*)palette)[ c ]; + } + } + else + { + for (x=0; x < (u32) width; x += 1) + { + c = in[x]; +#ifdef __BIG_ENDIAN__ + ((u32*)out)[x] = c << 24 | c << 16 | c << 8 | 0x000000FF; +#else + ((u32*)out)[x] = 0xFF000000 | c << 16 | c << 8 | c; +#endif + } + + } + + if (!flip) + out += lineWidth; + in += width + linepad; + } +} + + + +//! converts 16bit data to 16bit data +void CColorConverter::convert16BitTo16Bit(const s16* in, s16* out, s32 width, s32 height, s32 linepad, bool flip) +{ + if (!in || !out) + return; + + if (flip) + out += width * height; + + for (s32 y=0; y<height; ++y) + { + if (flip) + out -= width; +#ifdef __BIG_ENDIAN__ + for (s32 x=0; x<width; ++x) + out[x]=os::Byteswap::byteswap(in[x]); +#else + memcpy(out, in, width*sizeof(s16)); +#endif + if (!flip) + out += width; + in += width; + in += linepad; + } +} + + + +//! copies R8G8B8 24bit data to 24bit data +void CColorConverter::convert24BitTo24Bit(const u8* in, u8* out, s32 width, s32 height, s32 linepad, bool flip, bool bgr) +{ + if (!in || !out) + return; + + const s32 lineWidth = 3 * width; + if (flip) + out += lineWidth * height; + + for (s32 y=0; y<height; ++y) + { + if (flip) + out -= lineWidth; + if (bgr) + { + for (s32 x=0; x<lineWidth; x+=3) + { + out[x+0] = in[x+2]; + out[x+1] = in[x+1]; + out[x+2] = in[x+0]; + } + } + else + { + memcpy(out,in,lineWidth); + } + if (!flip) + out += lineWidth; + in += lineWidth; + in += linepad; + } +} + + + +//! Resizes the surface to a new size and converts it at the same time +//! to an A8R8G8B8 format, returning the pointer to the new buffer. +void CColorConverter::convert16bitToA8R8G8B8andResize(const s16* in, s32* out, s32 newWidth, s32 newHeight, s32 currentWidth, s32 currentHeight) +{ + if (!newWidth || !newHeight) + return; + + // note: this is very very slow. (i didn't want to write a fast version. + // but hopefully, nobody wants to convert surfaces every frame. + + f32 sourceXStep = (f32)currentWidth / (f32)newWidth; + f32 sourceYStep = (f32)currentHeight / (f32)newHeight; + f32 sy; + s32 t; + + for (s32 x=0; x<newWidth; ++x) + { + sy = 0.0f; + + for (s32 y=0; y<newHeight; ++y) + { + t = in[(s32)(((s32)sy)*currentWidth + x*sourceXStep)]; + t = (((t >> 15)&0x1)<<31) | (((t >> 10)&0x1F)<<19) | + (((t >> 5)&0x1F)<<11) | (t&0x1F)<<3; + out[(s32)(y*newWidth + x)] = t; + + sy+=sourceYStep; + } + } +} + + + +//! copies X8R8G8B8 32 bit data +void CColorConverter::convert32BitTo32Bit(const s32* in, s32* out, s32 width, s32 height, s32 linepad, bool flip) +{ + if (!in || !out) + return; + + if (flip) + out += width * height; + + for (s32 y=0; y<height; ++y) + { + if (flip) + out -= width; +#ifdef __BIG_ENDIAN__ + for (s32 x=0; x<width; ++x) + out[x]=os::Byteswap::byteswap(in[x]); +#else + memcpy(out, in, width*sizeof(s32)); +#endif + if (!flip) + out += width; + in += width; + in += linepad; + } +} + + + +void CColorConverter::convert_A1R5G5B5toR8G8B8(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u8 * dB = (u8 *)dP; + + for (s32 x = 0; x < sN; ++x) + { + dB[2] = (*sB & 0x7c00) >> 7; + dB[1] = (*sB & 0x03e0) >> 2; + dB[0] = (*sB & 0x1f) << 3; + + sB += 1; + dB += 3; + } +} + +void CColorConverter::convert_A1R5G5B5toB8G8R8(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u8 * dB = (u8 *)dP; + + for (s32 x = 0; x < sN; ++x) + { + dB[0] = (*sB & 0x7c00) >> 7; + dB[1] = (*sB & 0x03e0) >> 2; + dB[2] = (*sB & 0x1f) << 3; + + sB += 1; + dB += 3; + } +} + +void CColorConverter::convert_A1R5G5B5toA8R8G8B8(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u32* dB = (u32*)dP; + + for (s32 x = 0; x < sN; ++x) + *dB++ = A1R5G5B5toA8R8G8B8(*sB++); +} + +void CColorConverter::convert_A1R5G5B5toA1R5G5B5(const void* sP, s32 sN, void* dP) +{ + memcpy(dP, sP, sN * 2); +} + +void CColorConverter::convert_A1R5G5B5toR5G6B5(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u16* dB = (u16*)dP; + + for (s32 x = 0; x < sN; ++x) + *dB++ = A1R5G5B5toR5G6B5(*sB++); +} + +void CColorConverter::convert_A8R8G8B8toR8G8B8(const void* sP, s32 sN, void* dP) +{ + u8* sB = (u8*)sP; + u8* dB = (u8*)dP; + + for (s32 x = 0; x < sN; ++x) + { + // sB[3] is alpha + dB[0] = sB[2]; + dB[1] = sB[1]; + dB[2] = sB[0]; + + sB += 4; + dB += 3; + } +} + +void CColorConverter::convert_A8R8G8B8toB8G8R8(const void* sP, s32 sN, void* dP) +{ + u8* sB = (u8*)sP; + u8* dB = (u8*)dP; + + for (s32 x = 0; x < sN; ++x) + { + // sB[3] is alpha + dB[0] = sB[0]; + dB[1] = sB[1]; + dB[2] = sB[2]; + + sB += 4; + dB += 3; + } +} + +void CColorConverter::convert_A8R8G8B8toA8R8G8B8(const void* sP, s32 sN, void* dP) +{ + memcpy(dP, sP, sN * 4); +} + +void CColorConverter::convert_A8R8G8B8toA1R5G5B5(const void* sP, s32 sN, void* dP) +{ + u32* sB = (u32*)sP; + u16* dB = (u16*)dP; + + for (s32 x = 0; x < sN; ++x) + *dB++ = A8R8G8B8toA1R5G5B5(*sB++); +} + +void CColorConverter::convert_A8R8G8B8toR5G6B5(const void* sP, s32 sN, void* dP) +{ + u8 * sB = (u8 *)sP; + u16* dB = (u16*)dP; + + for (s32 x = 0; x < sN; ++x) + { + s32 r = sB[2] >> 3; + s32 g = sB[1] >> 2; + s32 b = sB[0] >> 3; + + dB[0] = (r << 11) | (g << 5) | (b); + + sB += 4; + dB += 1; + } +} + +void CColorConverter::convert_A8R8G8B8toR3G3B2(const void* sP, s32 sN, void* dP) +{ + u8* sB = (u8*)sP; + u8* dB = (u8*)dP; + + for (s32 x = 0; x < sN; ++x) + { + u8 r = sB[2] & 0xe0; + u8 g = (sB[1] & 0xe0) >> 3; + u8 b = (sB[0] & 0xc0) >> 6; + + dB[0] = (r | g | b); + + sB += 4; + dB += 1; + } +} + +void CColorConverter::convert_R8G8B8toR8G8B8(const void* sP, s32 sN, void* dP) +{ + memcpy(dP, sP, sN * 3); +} + +void CColorConverter::convert_R8G8B8toA8R8G8B8(const void* sP, s32 sN, void* dP) +{ + u8* sB = (u8* )sP; + u32* dB = (u32*)dP; + + for (s32 x = 0; x < sN; ++x) + { + *dB = 0xff000000 | (sB[0]<<16) | (sB[1]<<8) | sB[2]; + + sB += 3; + ++dB; + } +} + +void CColorConverter::convert_R8G8B8toA1R5G5B5(const void* sP, s32 sN, void* dP) +{ + u8 * sB = (u8 *)sP; + u16* dB = (u16*)dP; + + for (s32 x = 0; x < sN; ++x) + { + s32 r = sB[0] >> 3; + s32 g = sB[1] >> 3; + s32 b = sB[2] >> 3; + + dB[0] = (0x8000) | (r << 10) | (g << 5) | (b); + + sB += 3; + dB += 1; + } +} + +void CColorConverter::convert_B8G8R8toA8R8G8B8(const void* sP, s32 sN, void* dP) +{ + u8* sB = (u8* )sP; + u32* dB = (u32*)dP; + + for (s32 x = 0; x < sN; ++x) + { + *dB = 0xff000000 | (sB[2]<<16) | (sB[1]<<8) | sB[0]; + + sB += 3; + ++dB; + } +} + +void CColorConverter::convert_B8G8R8A8toA8R8G8B8(const void* sP, s32 sN, void* dP) +{ + u8* sB = (u8*)sP; + u8* dB = (u8*)dP; + + for (s32 x = 0; x < sN; ++x) + { + dB[0] = sB[3]; + dB[1] = sB[2]; + dB[2] = sB[1]; + dB[3] = sB[0]; + + sB += 4; + dB += 4; + } + +} + +void CColorConverter::convert_R8G8B8toR5G6B5(const void* sP, s32 sN, void* dP) +{ + u8 * sB = (u8 *)sP; + u16* dB = (u16*)dP; + + for (s32 x = 0; x < sN; ++x) + { + s32 r = sB[0] >> 3; + s32 g = sB[1] >> 2; + s32 b = sB[2] >> 3; + + dB[0] = (r << 11) | (g << 5) | (b); + + sB += 3; + dB += 1; + } +} + +void CColorConverter::convert_R5G6B5toR5G6B5(const void* sP, s32 sN, void* dP) +{ + memcpy(dP, sP, sN * 2); +} + +void CColorConverter::convert_R5G6B5toR8G8B8(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u8 * dB = (u8 *)dP; + + for (s32 x = 0; x < sN; ++x) + { + dB[0] = (*sB & 0xf800) >> 8; + dB[1] = (*sB & 0x07e0) >> 3; + dB[2] = (*sB & 0x001f) << 3; + + sB += 1; + dB += 3; + } +} + +void CColorConverter::convert_R5G6B5toB8G8R8(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u8 * dB = (u8 *)dP; + + for (s32 x = 0; x < sN; ++x) + { + dB[2] = (*sB & 0xf800) >> 8; + dB[1] = (*sB & 0x07e0) >> 3; + dB[0] = (*sB & 0x001f) << 3; + + sB += 1; + dB += 3; + } +} + +void CColorConverter::convert_R5G6B5toA8R8G8B8(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u32* dB = (u32*)dP; + + for (s32 x = 0; x < sN; ++x) + *dB++ = R5G6B5toA8R8G8B8(*sB++); +} + +void CColorConverter::convert_R5G6B5toA1R5G5B5(const void* sP, s32 sN, void* dP) +{ + u16* sB = (u16*)sP; + u16* dB = (u16*)dP; + + for (s32 x = 0; x < sN; ++x) + *dB++ = R5G6B5toA1R5G5B5(*sB++); +} + + +void CColorConverter::convert_viaFormat(const void* sP, ECOLOR_FORMAT sF, s32 sN, + void* dP, ECOLOR_FORMAT dF) +{ + switch (sF) + { + case ECF_A1R5G5B5: + switch (dF) + { + case ECF_A1R5G5B5: + convert_A1R5G5B5toA1R5G5B5(sP, sN, dP); + break; + case ECF_R5G6B5: + convert_A1R5G5B5toR5G6B5(sP, sN, dP); + break; + case ECF_A8R8G8B8: + convert_A1R5G5B5toA8R8G8B8(sP, sN, dP); + break; + case ECF_R8G8B8: + convert_A1R5G5B5toR8G8B8(sP, sN, dP); + break; +#ifndef _DEBUG + default: + break; +#endif + } + break; + case ECF_R5G6B5: + switch (dF) + { + case ECF_A1R5G5B5: + convert_R5G6B5toA1R5G5B5(sP, sN, dP); + break; + case ECF_R5G6B5: + convert_R5G6B5toR5G6B5(sP, sN, dP); + break; + case ECF_A8R8G8B8: + convert_R5G6B5toA8R8G8B8(sP, sN, dP); + break; + case ECF_R8G8B8: + convert_R5G6B5toR8G8B8(sP, sN, dP); + break; +#ifndef _DEBUG + default: + break; +#endif + } + break; + case ECF_A8R8G8B8: + switch (dF) + { + case ECF_A1R5G5B5: + convert_A8R8G8B8toA1R5G5B5(sP, sN, dP); + break; + case ECF_R5G6B5: + convert_A8R8G8B8toR5G6B5(sP, sN, dP); + break; + case ECF_A8R8G8B8: + convert_A8R8G8B8toA8R8G8B8(sP, sN, dP); + break; + case ECF_R8G8B8: + convert_A8R8G8B8toR8G8B8(sP, sN, dP); + break; +#ifndef _DEBUG + default: + break; +#endif + } + break; + case ECF_R8G8B8: + switch (dF) + { + case ECF_A1R5G5B5: + convert_R8G8B8toA1R5G5B5(sP, sN, dP); + break; + case ECF_R5G6B5: + convert_R8G8B8toR5G6B5(sP, sN, dP); + break; + case ECF_A8R8G8B8: + convert_R8G8B8toA8R8G8B8(sP, sN, dP); + break; + case ECF_R8G8B8: + convert_R8G8B8toR8G8B8(sP, sN, dP); + break; +#ifndef _DEBUG + default: + break; +#endif + } + break; + } +} + + +} // end namespace video +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.h new file mode 100644 index 0000000..b3da9ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CColorConverter.h @@ -0,0 +1,92 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_COLOR_CONVERTER_H_INCLUDED__ +#define __C_COLOR_CONVERTER_H_INCLUDED__ + +#include "irrTypes.h" +#include "IImage.h" + +namespace irr +{ +namespace video +{ + +class CColorConverter +{ +public: + + //! converts a monochrome bitmap to A1R5G5B5 + static void convert1BitTo16Bit(const u8* in, s16* out, s32 width, s32 height, s32 linepad=0, bool flip=false); + + //! converts a 4 bit palettized image to A1R5G5B5 + static void convert4BitTo16Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad=0, bool flip=false); + + //! converts a 8 bit palettized image to A1R5G5B5 + static void convert8BitTo16Bit(const u8* in, s16* out, s32 width, s32 height, const s32* palette, s32 linepad=0, bool flip=false); + + //! converts a 8 bit palettized or non palettized image (A8) into R8G8B8 + static void convert8BitTo24Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad = 0, bool flip=false); + + //! converts a 8 bit palettized or non palettized image (A8) into A8R8G8B8 + static void convert8BitTo32Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad = 0, bool flip=false); + + //! converts R8G8B8 16 bit data to A1R5G5B5 data + static void convert16BitTo16Bit(const s16* in, s16* out, s32 width, s32 height, s32 linepad=0, bool flip=false); + + //! copies R8G8B8 24 bit data to 24 data, and flips and + //! mirrors the image during the process. + static void convert24BitTo24Bit(const u8* in, u8* out, s32 width, s32 height, s32 linepad=0, bool flip=false, bool bgr=false); + + //! Resizes the surface to a new size and converts it at the same time + //! to an A8R8G8B8 format, returning the pointer to the new buffer. + static void convert16bitToA8R8G8B8andResize(const s16* in, s32* out, s32 newWidth, s32 newHeight, s32 currentWidth, s32 currentHeight); + + //! copies X8R8G8B8 32 bit data, and flips and + //! mirrors the image during the process. + static void convert32BitTo32Bit(const s32* in, s32* out, s32 width, s32 height, s32 linepad, bool flip=false); + + + //! functions for converting one image format to another efficiently + //! and hopefully correctly. + //! + //! \param sP pointer to source pixel data + //! \param sN number of source pixels to copy + //! \param dP pointer to destination data buffer. must be big enough + //! to hold sN pixels in the output format. + static void convert_A1R5G5B5toR8G8B8(const void* sP, s32 sN, void* dP); + static void convert_A1R5G5B5toB8G8R8(const void* sP, s32 sN, void* dP); + static void convert_A1R5G5B5toA8R8G8B8(const void* sP, s32 sN, void* dP); + static void convert_A1R5G5B5toA1R5G5B5(const void* sP, s32 sN, void* dP); + static void convert_A1R5G5B5toR5G6B5(const void* sP, s32 sN, void* dP); + + static void convert_A8R8G8B8toR8G8B8(const void* sP, s32 sN, void* dP); + static void convert_A8R8G8B8toB8G8R8(const void* sP, s32 sN, void* dP); + static void convert_A8R8G8B8toA8R8G8B8(const void* sP, s32 sN, void* dP); + static void convert_A8R8G8B8toA1R5G5B5(const void* sP, s32 sN, void* dP); + static void convert_A8R8G8B8toR5G6B5(const void* sP, s32 sN, void* dP); + + static void convert_A8R8G8B8toR3G3B2(const void* sP, s32 sN, void* dP); + static void convert_R8G8B8toR8G8B8(const void* sP, s32 sN, void* dP); + static void convert_R8G8B8toA8R8G8B8(const void* sP, s32 sN, void* dP); + static void convert_R8G8B8toA1R5G5B5(const void* sP, s32 sN, void* dP); + static void convert_R8G8B8toR5G6B5(const void* sP, s32 sN, void* dP); + static void convert_B8G8R8toA8R8G8B8(const void* sP, s32 sN, void* dP); + static void convert_B8G8R8A8toA8R8G8B8(const void* sP, s32 sN, void* dP); + + static void convert_R5G6B5toR5G6B5(const void* sP, s32 sN, void* dP); + static void convert_R5G6B5toR8G8B8(const void* sP, s32 sN, void* dP); + static void convert_R5G6B5toB8G8R8(const void* sP, s32 sN, void* dP); + static void convert_R5G6B5toA8R8G8B8(const void* sP, s32 sN, void* dP); + static void convert_R5G6B5toA1R5G5B5(const void* sP, s32 sN, void* dP); + static void convert_viaFormat(const void* sP, ECOLOR_FORMAT sF, s32 sN, + void* dP, ECOLOR_FORMAT dF); +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.cpp new file mode 100644 index 0000000..e3eaecc --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.cpp @@ -0,0 +1,235 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CCubeSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "S3DVertex.h" +#include "SMeshBuffer.h" +#include "os.h" +#include "CShadowVolumeSceneNode.h" + +namespace irr +{ +namespace scene +{ + + /* + 011 111 + /6,8------/5 y + / | / | ^ z + / | / | | / + 010 3,9-------2 | |/ + | 7- - -10,4 101 *---->x + | / | / + |/ | / + 0------11,1/ + 000 100 + */ + +//! constructor +CCubeSceneNode::CCubeSceneNode(f32 size, ISceneNode* parent, ISceneManager* mgr, + s32 id, const core::vector3df& position, + const core::vector3df& rotation, const core::vector3df& scale) + : IMeshSceneNode(parent, mgr, id, position, rotation, scale), + Mesh(0), Shadow(0), Size(size) +{ + #ifdef _DEBUG + setDebugName("CCubeSceneNode"); + #endif + + setSize(); +} + + +CCubeSceneNode::~CCubeSceneNode() +{ + if (Shadow) + Shadow->drop(); + if (Mesh) + Mesh->drop(); +} + + +void CCubeSceneNode::setSize() +{ + if (Mesh) + Mesh->drop(); + Mesh = SceneManager->getGeometryCreator()->createCubeMesh(core::vector3df(Size)); +} + + +//! renders the node. +void CCubeSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + if (Shadow) + Shadow->updateShadowVolumes(); + + // for debug purposes only: + video::SMaterial mat = Mesh->getMeshBuffer(0)->getMaterial(); + + // overwrite half transparency + if (DebugDataVisible & scene::EDS_HALF_TRANSPARENCY) + mat.MaterialType = video::EMT_TRANSPARENT_ADD_COLOR; + driver->setMaterial(mat); + driver->drawMeshBuffer(Mesh->getMeshBuffer(0)); + + // for debug purposes only: + if (DebugDataVisible) + { + video::SMaterial m; + m.Lighting = false; + m.AntiAliasing=0; + driver->setMaterial(m); + + if (DebugDataVisible & scene::EDS_BBOX) + { + driver->draw3DBox(Mesh->getMeshBuffer(0)->getBoundingBox(), video::SColor(255,255,255,255)); + } + if (DebugDataVisible & scene::EDS_BBOX_BUFFERS) + { + driver->draw3DBox(Mesh->getMeshBuffer(0)->getBoundingBox(), + video::SColor(255,190,128,128)); + } + if (DebugDataVisible & scene::EDS_NORMALS) + { + // draw normals + const f32 debugNormalLength = SceneManager->getParameters()->getAttributeAsFloat(DEBUG_NORMAL_LENGTH); + const video::SColor debugNormalColor = SceneManager->getParameters()->getAttributeAsColor(DEBUG_NORMAL_COLOR); + const u32 count = Mesh->getMeshBufferCount(); + + for (u32 i=0; i != count; ++i) + { + driver->drawMeshBufferNormals(Mesh->getMeshBuffer(i), debugNormalLength, debugNormalColor); + } + } + + // show mesh + if (DebugDataVisible & scene::EDS_MESH_WIRE_OVERLAY) + { + m.Wireframe = true; + driver->setMaterial(m); + + driver->drawMeshBuffer(Mesh->getMeshBuffer(0)); + } + } +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CCubeSceneNode::getBoundingBox() const +{ + return Mesh->getMeshBuffer(0)->getBoundingBox(); +} + + +//! Removes a child from this scene node. +//! Implemented here, to be able to remove the shadow properly, if there is one, +//! or to remove attached childs. +bool CCubeSceneNode::removeChild(ISceneNode* child) +{ + if (child && Shadow == child) + { + Shadow->drop(); + Shadow = 0; + } + + return ISceneNode::removeChild(child); +} + + +//! Creates shadow volume scene node as child of this node +//! and returns a pointer to it. +IShadowVolumeSceneNode* CCubeSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) +{ + if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) + return 0; + + if (!shadowMesh) + shadowMesh = Mesh; // if null is given, use the mesh of node + + if (Shadow) + Shadow->drop(); + + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); + return Shadow; +} + + +void CCubeSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + SceneManager->registerNodeForRendering(this); + ISceneNode::OnRegisterSceneNode(); +} + + +//! returns the material based on the zero based index i. +video::SMaterial& CCubeSceneNode::getMaterial(u32 i) +{ + return Mesh->getMeshBuffer(0)->getMaterial(); +} + + +//! returns amount of materials used by this scene node. +u32 CCubeSceneNode::getMaterialCount() const +{ + return 1; +} + + +//! Writes attributes of the scene node. +void CCubeSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ISceneNode::serializeAttributes(out, options); + + out->addFloat("Size", Size); +} + + +//! Reads attributes of the scene node. +void CCubeSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + f32 newSize = in->getAttributeAsFloat("Size"); + newSize = core::max_(newSize, 0.0001f); + if (newSize != Size) + { + Size = newSize; + setSize(); + } + + ISceneNode::deserializeAttributes(in, options); +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CCubeSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CCubeSceneNode* nb = new CCubeSceneNode(Size, newParent, + newManager, ID, RelativeTranslation); + + nb->cloneMembers(this, newManager); + nb->getMaterial(0) = getMaterial(0); + nb->Shadow = Shadow; + if ( nb->Shadow ) + nb->Shadow->grab(); + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.h new file mode 100644 index 0000000..b676938 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CCubeSceneNode.h @@ -0,0 +1,93 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_CUBE_SCENE_NODE_H_INCLUDED__ +#define __C_CUBE_SCENE_NODE_H_INCLUDED__ + +#include "IMeshSceneNode.h" +#include "SMesh.h" + +namespace irr +{ +namespace scene +{ + class CCubeSceneNode : public IMeshSceneNode + { + public: + + //! constructor + CCubeSceneNode(f32 size, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + virtual ~CCubeSceneNode(); + + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! returns the material based on the zero based index i. To get the amount + //! of materials used by this scene node, use getMaterialCount(). + //! This function is needed for inserting the node into the scene hirachy on a + //! optimal position for minimizing renderstate changes, but can also be used + //! to directly modify the material of a scene node. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; } + + //! Creates shadow volume scene node as child of this node + //! and returns a pointer to it. + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + //! Sets a new mesh to display + virtual void setMesh(IMesh* mesh) {} + + //! Returns the current mesh + virtual IMesh* getMesh(void) { return Mesh; } + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + /* In this way it is possible to change the materials a mesh causing all mesh scene nodes + referencing this mesh to change too. */ + virtual void setReadOnlyMaterials(bool readonly) {} + + //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style + virtual bool isReadOnlyMaterials() const { return false; } + + //! Removes a child from this scene node. + //! Implemented here, to be able to remove the shadow properly, if there is one, + //! or to remove attached childs. + virtual bool removeChild(ISceneNode* child); + + private: + void setSize(); + + IMesh* Mesh; + IShadowVolumeSceneNode* Shadow; + f32 Size; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.cpp new file mode 100644 index 0000000..9886b37 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.cpp @@ -0,0 +1,2455 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#define _IRR_DONT_DO_MEMORY_DEBUGGING_HERE +#include "CD3D8Driver.h" + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + +#include "os.h" +#include "S3DVertex.h" +#include "CD3D8Texture.h" +#include "CD3D8MaterialRenderer.h" +#include "CD3D8ShaderMaterialRenderer.h" +#include "CD3D8NormalMapRenderer.h" +#include "CD3D8ParallaxMapRenderer.h" +#include "SIrrCreationParameters.h" + +namespace irr +{ +namespace video +{ + + +//! constructor +CD3D8Driver::CD3D8Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io) + : CNullDriver(io, params.WindowSize), CurrentRenderMode(ERM_NONE), + ResetRenderStates(true), Transformation3DChanged(false), + D3DLibrary(0), pID3D(0), pID3DDevice(0), PrevRenderTarget(0), + WindowId(0), SceneSourceRect(0), + LastVertexType((video::E_VERTEX_TYPE)-1), + MaxTextureUnits(0), MaxUserClipPlanes(0), + MaxLightDistance(0), LastSetLight(-1), DeviceLost(false), + DriverWasReset(true), Params(params) +{ + #ifdef _DEBUG + setDebugName("CD3D8Driver"); + #endif + + printVersion(); + + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + CurrentTexture[i] = 0; + MaxLightDistance=sqrtf(FLT_MAX); + // create sphere map matrix + + SphereMapMatrixD3D8._11 = 0.5f; SphereMapMatrixD3D8._12 = 0.0f; + SphereMapMatrixD3D8._13 = 0.0f; SphereMapMatrixD3D8._14 = 0.0f; + SphereMapMatrixD3D8._21 = 0.0f; SphereMapMatrixD3D8._22 =-0.5f; + SphereMapMatrixD3D8._23 = 0.0f; SphereMapMatrixD3D8._24 = 0.0f; + SphereMapMatrixD3D8._31 = 0.0f; SphereMapMatrixD3D8._32 = 0.0f; + SphereMapMatrixD3D8._33 = 1.0f; SphereMapMatrixD3D8._34 = 0.0f; + SphereMapMatrixD3D8._41 = 0.5f; SphereMapMatrixD3D8._42 = 0.5f; + SphereMapMatrixD3D8._43 = 0.0f; SphereMapMatrixD3D8._44 = 1.0f; + + UnitMatrixD3D8 = *(D3DMATRIX*)((void*)core::IdentityMatrix.pointer()); + + // init direct 3d is done in the factory function +} + + +//! destructor +CD3D8Driver::~CD3D8Driver() +{ + deleteMaterialRenders(); + + // drop d3d8 + + if (pID3DDevice) + pID3DDevice->Release(); + + if (pID3D) + pID3D->Release(); +} + + +void CD3D8Driver::createMaterialRenderers() +{ + // create D3D8 material renderers + + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_SOLID(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_SOLID_2_LAYER(pID3DDevice, this)); + + // add the same renderer for all lightmap types + CD3D8MaterialRenderer_LIGHTMAP* lmr = new CD3D8MaterialRenderer_LIGHTMAP(pID3DDevice, this); + addMaterialRenderer(lmr); // for EMT_LIGHTMAP: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_ADD: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M2: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M4: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING_M2: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING_M4: + lmr->drop(); + + // add remaining material renderers + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_DETAIL_MAP(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_SPHERE_MAP(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_REFLECTION_2_LAYER(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_TRANSPARENT_ADD_COLOR(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_TRANSPARENT_VERTEX_ALPHA(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(pID3DDevice, this)); + + // add normal map renderers + s32 tmp = 0; + video::IMaterialRenderer* renderer = 0; + + renderer = new CD3D8NormalMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_SOLID].Renderer); + renderer->drop(); + + renderer = new CD3D8NormalMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_ADD_COLOR].Renderer); + renderer->drop(); + + renderer = new CD3D8NormalMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); + renderer->drop(); + + // add parallax map renderers + + renderer = new CD3D8ParallaxMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_SOLID].Renderer); + renderer->drop(); + + renderer = new CD3D8ParallaxMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_ADD_COLOR].Renderer); + renderer->drop(); + + renderer = new CD3D8ParallaxMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); + renderer->drop(); + + // add basic 1 texture blending + addAndDropMaterialRenderer(new CD3D8MaterialRenderer_ONETEXTURE_BLEND(pID3DDevice, this)); +} + + +//! initialises the Direct3D API +bool CD3D8Driver::initDriver(HWND hwnd, bool pureSoftware) +{ + HRESULT hr; + typedef IDirect3D8 * (__stdcall *D3DCREATETYPE)(UINT); + +#if defined( _IRR_XBOX_PLATFORM_) + D3DCREATETYPE d3dCreate = (D3DCREATETYPE) &Direct3DCreate8; +#else + D3DLibrary = LoadLibrary( __TEXT("d3d8.dll") ); + + if (!D3DLibrary) + { + os::Printer::log("Error, could not load d3d8.dll.", ELL_ERROR); + return false; + } + + D3DCREATETYPE d3dCreate = (D3DCREATETYPE) GetProcAddress(D3DLibrary, "Direct3DCreate8"); + + if (!d3dCreate) + { + os::Printer::log("Error, could not get proc adress of Direct3DCreate8.", ELL_ERROR); + return false; + } +#endif + + //just like pID3D = Direct3DCreate8(D3D_SDK_VERSION); + pID3D = (*d3dCreate)(D3D_SDK_VERSION); + + if (!pID3D) + { + os::Printer::log("Error initializing D3D.", ELL_ERROR); + return false; + } + + // print device information + D3DADAPTER_IDENTIFIER8 dai; + if (!FAILED(pID3D->GetAdapterIdentifier(Params.DisplayAdapter, D3DENUM_NO_WHQL_LEVEL, &dai))) + { + char tmp[512]; + + s32 Product = HIWORD(dai.DriverVersion.HighPart); + s32 Version = LOWORD(dai.DriverVersion.HighPart); + s32 SubVersion = HIWORD(dai.DriverVersion.LowPart); + s32 Build = LOWORD(dai.DriverVersion.LowPart); + + sprintf(tmp, "%s %s %d.%d.%d.%d", dai.Description, dai.Driver, Product, Version, + SubVersion, Build); + os::Printer::log(tmp, ELL_INFORMATION); + } + + D3DDISPLAYMODE d3ddm; + hr = pID3D->GetAdapterDisplayMode(Params.DisplayAdapter, &d3ddm); + if (FAILED(hr)) + { + os::Printer::log("Error: Could not get Adapter Display mode.", ELL_ERROR); + return false; + } + + ZeroMemory(&present, sizeof(present)); + + present.SwapEffect = D3DSWAPEFFECT_DISCARD; + present.Windowed = TRUE; + present.BackBufferFormat = d3ddm.Format; + present.EnableAutoDepthStencil = TRUE; + + if (Params.Fullscreen) + { + present.SwapEffect = D3DSWAPEFFECT_FLIP; + present.Windowed = FALSE; + present.BackBufferWidth = Params.WindowSize.Width; + present.BackBufferHeight = Params.WindowSize.Height; + present.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; + + if (Params.Vsync) + present.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_ONE; + else + present.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + + if (Params.Bits == 32) + present.BackBufferFormat = D3DFMT_X8R8G8B8; + else + present.BackBufferFormat = D3DFMT_R5G6B5; + } + + D3DDEVTYPE devtype = D3DDEVTYPE_HAL; + #ifndef _IRR_D3D_NO_SHADER_DEBUGGING + devtype = D3DDEVTYPE_REF; + #endif + + // enable anti alias if possible and whished + if (Params.AntiAlias > 0) + { + if(Params.AntiAlias > 16) + Params.AntiAlias = 16; + + while(Params.AntiAlias > 0) + { + if(!FAILED(pID3D->CheckDeviceMultiSampleType(Params.DisplayAdapter, + devtype , present.BackBufferFormat, !Params.Fullscreen, + (D3DMULTISAMPLE_TYPE)Params.AntiAlias))) + { + present.MultiSampleType = (D3DMULTISAMPLE_TYPE)Params.AntiAlias; + present.SwapEffect = D3DSWAPEFFECT_DISCARD; + break; + } + --Params.AntiAlias; + } + + if(Params.AntiAlias==0) + os::Printer::log("Anti aliasing disabled because hardware/driver lacks necessary caps.", ELL_WARNING); + } + + // check stencil buffer compatibility + if (Params.Stencilbuffer) + { + present.AutoDepthStencilFormat = D3DFMT_D24S8; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { +#if !defined( _IRR_XBOX_PLATFORM_) + present.AutoDepthStencilFormat = D3DFMT_D24X4S4; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D15S1; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + os::Printer::log("Device does not support stencilbuffer, disabling stencil buffer.", ELL_WARNING); + Params.Stencilbuffer = false; + } + } +#endif + } + else + if(FAILED(pID3D->CheckDepthStencilMatch(Params.DisplayAdapter, devtype, + present.BackBufferFormat, present.BackBufferFormat, present.AutoDepthStencilFormat))) + { + os::Printer::log("Depth-stencil format is not compatible with display format, disabling stencil buffer.", ELL_WARNING); + Params.Stencilbuffer = false; + } + } + // do not use else here to cope with flag change in previous block + if (!Params.Stencilbuffer) + { +#if !defined( _IRR_XBOX_PLATFORM_) + present.AutoDepthStencilFormat = D3DFMT_D32; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D24X8; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D16; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + os::Printer::log("Device does not support required depth buffer.", ELL_WARNING); + return false; + } + } + } +#else + present.AutoDepthStencilFormat = D3DFMT_D16; + if(FAILED(pID3D->CheckDeviceFormat(Params.DisplayAdapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + os::Printer::log("Device does not support required depth buffer.", ELL_WARNING); + return false; + } +#endif + } + + // create device +#if defined( _IRR_XBOX_PLATFORM_) + DWORD fpuPrecision = 0; +#else + DWORD fpuPrecision = Params.HighPrecisionFPU ? D3DCREATE_FPU_PRESERVE : 0; + DWORD multithreaded = Params.DriverMultithreaded ? D3DCREATE_MULTITHREADED : 0; +#endif + if (pureSoftware) + { + hr = pID3D->CreateDevice(Params.DisplayAdapter, D3DDEVTYPE_REF, hwnd, + fpuPrecision | multithreaded | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice); + + if (FAILED(hr)) + os::Printer::log("Was not able to create Direct3D8 software device.", ELL_ERROR); + } + else + { + hr = pID3D->CreateDevice(Params.DisplayAdapter, devtype, hwnd, + fpuPrecision | multithreaded | D3DCREATE_HARDWARE_VERTEXPROCESSING, &present, &pID3DDevice); + + if(FAILED(hr)) + hr = pID3D->CreateDevice(Params.DisplayAdapter, devtype, hwnd, + fpuPrecision | multithreaded | D3DCREATE_MIXED_VERTEXPROCESSING , &present, &pID3DDevice); + if(FAILED(hr)) + hr = pID3D->CreateDevice(Params.DisplayAdapter, devtype, hwnd, + fpuPrecision | multithreaded | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice); + if (FAILED(hr)) + os::Printer::log("Was not able to create Direct3D8 device.", ELL_ERROR); + } + + if (!pID3DDevice) + { + os::Printer::log("Was not able to create Direct3D8 device.", ELL_ERROR); + return false; + } + + // get caps + pID3DDevice->GetDeviceCaps(&Caps); + + if (Params.Stencilbuffer && + (!(Caps.StencilCaps & D3DSTENCILCAPS_DECRSAT) || + !(Caps.StencilCaps & D3DSTENCILCAPS_INCRSAT) || + !(Caps.StencilCaps & D3DSTENCILCAPS_KEEP))) + { + os::Printer::log("Device not able to use stencil buffer, disabling stencil buffer.", ELL_WARNING); + Params.Stencilbuffer = false; + } + + // set default vertex shader + setVertexShader(EVT_STANDARD); + + // enable antialiasing + if (Params.AntiAlias>0) + pID3DDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE); + + // set fog mode + setFog(FogColor, FogType, FogStart, FogEnd, FogDensity, PixelFog, RangeFog); + + // set exposed data + ExposedData.D3D8.D3D8 = pID3D; + ExposedData.D3D8.D3DDev8 = pID3DDevice; + ExposedData.D3D8.HWnd = hwnd; + + ResetRenderStates = true; + + // create materials + createMaterialRenderers(); + + MaxTextureUnits = core::min_((u32)Caps.MaxSimultaneousTextures, MATERIAL_MAX_TEXTURES); + MaxUserClipPlanes = (u32)Caps.MaxUserClipPlanes; + + DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits); + DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures); + DriverAttributes->setAttribute("MaxLights", (s32)Caps.MaxActiveLights); + DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy); + DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes); + DriverAttributes->setAttribute("MaxIndices", (s32)Caps.MaxVertexIndex); + DriverAttributes->setAttribute("MaxTextureSize", (s32)core::min_(Caps.MaxTextureHeight,Caps.MaxTextureWidth)); + DriverAttributes->setAttribute("MaxTextureLODBias", 16.f); + DriverAttributes->setAttribute("Version", 800); + DriverAttributes->setAttribute("ShaderLanguageVersion", (s32)Caps.VertexShaderVersion*100); + DriverAttributes->setAttribute("AntiAlias", Params.AntiAlias); + + // set the renderstates + setRenderStates3DMode(); + + // so far so good. + return true; +} + + +//! applications must call this method before performing any rendering. returns false if failed. +bool CD3D8Driver::beginScene(bool backBuffer, bool zBuffer, SColor color, + const SExposedVideoData& videoData, core::rect<s32>* sourceRect) +{ + CNullDriver::beginScene(backBuffer, zBuffer, color, videoData, sourceRect); + WindowId = (HWND)videoData.D3D8.HWnd; + SceneSourceRect = sourceRect; + + if (!pID3DDevice) + return false; + + HRESULT hr; + if (DeviceLost) + { +#ifndef _IRR_XBOX_PLATFORM_ + if(FAILED(hr = pID3DDevice->TestCooperativeLevel())) + { + if (hr == D3DERR_DEVICELOST) + { + Sleep(100); + hr = pID3DDevice->TestCooperativeLevel(); + if (hr == D3DERR_DEVICELOST) + return false; + } + + if ((hr == D3DERR_DEVICENOTRESET) && !reset()) + return false; + } +#endif + } + + DWORD flags = 0; + + if (backBuffer) + flags |= D3DCLEAR_TARGET; + + if (zBuffer) + flags |= D3DCLEAR_ZBUFFER; + + if (Params.Stencilbuffer) + flags |= D3DCLEAR_STENCIL; + + if (flags) + { + hr = pID3DDevice->Clear( 0, NULL, flags, color.color, 1.0, 0); + if (FAILED(hr)) + os::Printer::log("Direct3D8 clear failed.", ELL_WARNING); + } + + hr = pID3DDevice->BeginScene(); + if (FAILED(hr)) + { + os::Printer::log("Direct3D8 begin scene failed.", ELL_WARNING); + return false; + } + + return true; +} + + +//! applications must call this method after performing any rendering. returns false if failed. +bool CD3D8Driver::endScene() +{ + CNullDriver::endScene(); + DriverWasReset=false; + + HRESULT hr = pID3DDevice->EndScene(); + if (FAILED(hr)) + { + os::Printer::log("DIRECT3D8 end scene failed.", ELL_WARNING); + return false; + } + + RECT* srcRct = 0; + RECT sourceRectData; + if ( SceneSourceRect) + { + srcRct = &sourceRectData; + sourceRectData.left = SceneSourceRect->UpperLeftCorner.X; + sourceRectData.top = SceneSourceRect->UpperLeftCorner.Y; + sourceRectData.right = SceneSourceRect->LowerRightCorner.X; + sourceRectData.bottom = SceneSourceRect->LowerRightCorner.Y; + } + + hr = pID3DDevice->Present(srcRct, NULL, WindowId, NULL); + + if (SUCCEEDED(hr)) + return true; + + if (hr == D3DERR_DEVICELOST) + { + DeviceLost = true; + os::Printer::log("DIRECT3D8 device lost.", ELL_WARNING); + } + else + os::Printer::log("DIRECT3D8 present failed.", ELL_WARNING); + return false; +} + + +//! resets the device +bool CD3D8Driver::reset() +{ + u32 i; + os::Printer::log("Resetting D3D8 device.", ELL_INFORMATION); + + for (i=0; i<Textures.size(); ++i) + { + if (Textures[i].Surface->isRenderTarget()) + { + IDirect3DTexture8* tex = ((CD3D8Texture*)(Textures[i].Surface))->getDX8Texture(); + if (tex) + tex->Release(); + } + } + DriverWasReset=true; + + HRESULT hr = pID3DDevice->Reset(&present); + + for (i=0; i<Textures.size(); ++i) + { + if (Textures[i].Surface->isRenderTarget()) + ((CD3D8Texture*)(Textures[i].Surface))->createRenderTarget(); + } + + if (FAILED(hr)) + { + if (hr == D3DERR_DEVICELOST) + { + DeviceLost = true; + os::Printer::log("Resetting failed due to device lost.", ELL_WARNING); + } + else + os::Printer::log("Resetting failed.", ELL_WARNING); + return false; + } + + DeviceLost = false; + ResetRenderStates = true; + LastVertexType = (E_VERTEX_TYPE)-1; + + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + CurrentTexture[i] = 0; + + setVertexShader(EVT_STANDARD); + setRenderStates3DMode(); + setFog(FogColor, FogType, FogStart, FogEnd, FogDensity, PixelFog, RangeFog); + setAmbientLight(AmbientLight); + + return true; +} + + +//! queries the features of the driver, returns true if feature is available +bool CD3D8Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const +{ + if (!FeatureEnabled[feature]) + return false; + + switch (feature) + { + case EVDF_RENDER_TO_TARGET: + case EVDF_MULTITEXTURE: + case EVDF_BILINEAR_FILTER: + return true; + case EVDF_HARDWARE_TL: + return (Caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) != 0; + case EVDF_MIP_MAP: + return (Caps.TextureCaps & D3DPTEXTURECAPS_MIPMAP) != 0; + case EVDF_STENCIL_BUFFER: + return Params.Stencilbuffer && Caps.StencilCaps; + case EVDF_VERTEX_SHADER_1_1: + return Caps.VertexShaderVersion >= D3DVS_VERSION(1,1); + case EVDF_VERTEX_SHADER_2_0: + return Caps.VertexShaderVersion >= D3DVS_VERSION(2,0); + case EVDF_VERTEX_SHADER_3_0: + return Caps.VertexShaderVersion >= D3DVS_VERSION(3,0); + case EVDF_PIXEL_SHADER_1_1: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,1); + case EVDF_PIXEL_SHADER_1_2: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,2); + case EVDF_PIXEL_SHADER_1_3: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,3); + case EVDF_PIXEL_SHADER_1_4: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,4); + case EVDF_PIXEL_SHADER_2_0: + return Caps.PixelShaderVersion >= D3DPS_VERSION(2,0); + case EVDF_PIXEL_SHADER_3_0: + return Caps.PixelShaderVersion >= D3DPS_VERSION(3,0); + case EVDF_TEXTURE_NSQUARE: + return (Caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY) == 0; + case EVDF_TEXTURE_NPOT: + return (Caps.TextureCaps & D3DPTEXTURECAPS_POW2) == 0; + case EVDF_COLOR_MASK: + return (Caps.PrimitiveMiscCaps & D3DPMISCCAPS_COLORWRITEENABLE) != 0; + case EVDF_BLEND_OPERATIONS: + case EVDF_TEXTURE_MATRIX: + return true; + default: + return false; + }; +} + + +//! sets transformation +void CD3D8Driver::setTransform(E_TRANSFORMATION_STATE state, + const core::matrix4& mat) +{ + switch(state) + { + case ETS_VIEW: + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)mat.pointer())); + Transformation3DChanged = true; + break; + case ETS_WORLD: + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)mat.pointer())); + Transformation3DChanged = true; + break; + case ETS_PROJECTION: + pID3DDevice->SetTransform( D3DTS_PROJECTION, (D3DMATRIX*)((void*)mat.pointer())); + Transformation3DChanged = true; + break; + case ETS_COUNT: + return; + default: + if (state-ETS_TEXTURE_0 < MATERIAL_MAX_TEXTURES) + { + pID3DDevice->SetTextureStageState( state - ETS_TEXTURE_0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTransform((D3DTRANSFORMSTATETYPE)(D3DTS_TEXTURE0+ ( state - ETS_TEXTURE_0 )), + (D3DMATRIX*)((void*)mat.pointer())); + } + break; + } + + Matrices[state] = mat; +} + + +//! sets the current Texture +bool CD3D8Driver::setActiveTexture(u32 stage, const video::ITexture* texture) +{ + if (CurrentTexture[stage] == texture) + return true; + + if (texture && (texture->getDriverType() != EDT_DIRECT3D8)) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + CurrentTexture[stage] = texture; + + if (!texture) + { + pID3DDevice->SetTexture(stage, 0); + pID3DDevice->SetTextureStageState( stage, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + } + else + { + pID3DDevice->SetTexture(stage, ((const CD3D8Texture*)texture)->getDX8Texture()); + } + return true; +} + + +//! sets a material +void CD3D8Driver::setMaterial(const SMaterial& material) +{ + Material = material; + OverrideMaterial.apply(Material); + + for (u32 i=0; i<MaxTextureUnits; ++i) + { + setActiveTexture(i, Material.getTexture(i)); + setTransform((E_TRANSFORMATION_STATE) ( ETS_TEXTURE_0 + i ), + material.getTextureMatrix(i)); + } +} + + +//! returns a device dependent texture from a software surface (IImage) +video::ITexture* CD3D8Driver::createDeviceDependentTexture(IImage* surface,const io::path& name, void* mipmapData) +{ + return new CD3D8Texture(surface, this, TextureCreationFlags, name, mipmapData); +} + + +//! Enables or disables a texture creation flag. +void CD3D8Driver::setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, + bool enabled) +{ + if (flag == video::ETCF_CREATE_MIP_MAPS && !queryFeature(EVDF_MIP_MAP)) + enabled = false; + + CNullDriver::setTextureCreationFlag(flag, enabled); +} + + +//! sets a render target +bool CD3D8Driver::setRenderTarget(video::ITexture* texture, + bool clearBackBuffer, bool clearZBuffer, SColor color) +{ + // check for right driver type + + if (texture && texture->getDriverType() != EDT_DIRECT3D8) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + // check for valid render target + + CD3D8Texture* tex = (CD3D8Texture*)texture; + + if (texture && !tex->isRenderTarget()) + { + os::Printer::log("Fatal Error: Tried to set a non render target texture as render target.", ELL_ERROR); + return false; + } + + if (texture && (tex->getSize().Width > ScreenSize.Width || + tex->getSize().Height > ScreenSize.Height )) + { + os::Printer::log("Error: Tried to set a render target texture which is bigger than the screen.", ELL_ERROR); + return false; + } + + // check if we should set the previous RT back + + bool ret = true; + + if (tex == 0) + { + if (PrevRenderTarget) + { + IDirect3DSurface8* dss = 0; + pID3DDevice->GetDepthStencilSurface(&dss); + + if (FAILED(pID3DDevice->SetRenderTarget(PrevRenderTarget, dss))) + { + os::Printer::log("Error: Could not set back to previous render target.", ELL_ERROR); + ret = false; + } + + if (dss) + dss->Release(); + + CurrentRendertargetSize = core::dimension2d<u32>(0,0); + PrevRenderTarget->Release(); + PrevRenderTarget = 0; + } + } + else + { + // we want to set a new target. so do this. + + // store previous target + + if (!PrevRenderTarget && (FAILED(pID3DDevice->GetRenderTarget(&PrevRenderTarget)))) + { + os::Printer::log("Could not get previous render target.", ELL_ERROR); + return false; + } + + // set new render target + + IDirect3DSurface8* dss = 0; + pID3DDevice->GetDepthStencilSurface(&dss); + + if (FAILED(pID3DDevice->SetRenderTarget(tex->getRenderTargetSurface(), dss))) + { + os::Printer::log("Error: Could not set render target.", ELL_ERROR); + ret = false; + } + + if (dss) + dss->Release(); + + CurrentRendertargetSize = tex->getSize(); + } + Transformation3DChanged = true; + + if (clearBackBuffer || clearZBuffer) + { + DWORD flags = 0; + + if (clearBackBuffer) + flags |= D3DCLEAR_TARGET; + + if (clearZBuffer) + flags |= D3DCLEAR_ZBUFFER; + + pID3DDevice->Clear(0, NULL, flags, color.color, 1.0f, 0); + } + + return ret; +} + + +//! Creates a render target texture. +ITexture* CD3D8Driver::addRenderTargetTexture( + const core::dimension2d<u32>& size, const io::path& name, + const ECOLOR_FORMAT format) +{ + CD3D8Texture* tex = new CD3D8Texture(this, size, name); + if (tex) + { + if (!tex->Texture) + { + tex->drop(); + return 0; + } + addTexture(tex); + tex->drop(); + } + return tex; +} + + +//! sets a viewport +void CD3D8Driver::setViewPort(const core::rect<s32>& area) +{ + core::rect<s32> vp(area); + core::rect<s32> rendert(0,0, ScreenSize.Width, ScreenSize.Height); + vp.clipAgainst(rendert); + + D3DVIEWPORT8 viewPort; + viewPort.X = vp.UpperLeftCorner.X; + viewPort.Y = vp.UpperLeftCorner.Y; + viewPort.Width = vp.getWidth(); + viewPort.Height = vp.getHeight(); + viewPort.MinZ = 0.0f; + viewPort.MaxZ = 1.0f; + + HRESULT hr = D3DERR_INVALIDCALL; + if (vp.getHeight()>0 && vp.getWidth()>0) + hr = pID3DDevice->SetViewport(&viewPort); + + if (FAILED(hr)) + os::Printer::log("Failed setting the viewport.", ELL_WARNING); + + ViewPort = vp; +} + + +//! gets the area of the current viewport +const core::rect<s32>& CD3D8Driver::getViewPort() const +{ + return ViewPort; +} + + +//! draws a vertex primitive list +void CD3D8Driver::drawVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType) +{ + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::drawVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType,iType); + + if (!vertexCount || !primitiveCount) + return; + + draw2D3DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, + vType, pType, iType, true); +} + + +//! draws a vertex primitive list in 2d +void CD3D8Driver::draw2DVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType) +{ + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::draw2DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType,iType); + + if (!vertexCount || !primitiveCount) + return; + + draw2D3DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, + vType, pType, iType, false); +} + + +void CD3D8Driver::draw2D3DVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType, bool is3D) +{ + setVertexShader(vType); + + const u32 stride = getVertexPitchFromType(vType); + + D3DFORMAT indexType=D3DFMT_UNKNOWN; + switch (iType) + { + case (EIT_16BIT): + { + indexType=D3DFMT_INDEX16; + break; + } + case (EIT_32BIT): + { + indexType=D3DFMT_INDEX32; + break; + } + } + + if (is3D) + { + if (!setRenderStates3DMode()) + return; + } + else + { + if (Material.MaterialType==EMT_ONETEXTURE_BLEND) + { + E_BLEND_FACTOR srcFact; + E_BLEND_FACTOR dstFact; + E_MODULATE_FUNC modulo; + u32 alphaSource; + unpack_textureBlendFunc ( srcFact, dstFact, modulo, alphaSource, Material.MaterialTypeParam); + setRenderStates2DMode(alphaSource&video::EAS_VERTEX_COLOR, (Material.getTexture(0) != 0), (alphaSource&video::EAS_TEXTURE) != 0); + } + else + setRenderStates2DMode(Material.MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA, (Material.getTexture(0) != 0), Material.MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL); + } + + switch (pType) + { + case scene::EPT_POINT_SPRITES: + case scene::EPT_POINTS: + { + f32 tmp=Material.Thickness/getScreenSize().Height; + if (pType==scene::EPT_POINT_SPRITES) + pID3DDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_POINTSCALEENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_POINTSIZE, *(DWORD*)(&tmp)); + tmp=1.0f; + pID3DDevice->SetRenderState(D3DRS_POINTSCALE_A, *(DWORD*)(&tmp)); + pID3DDevice->SetRenderState(D3DRS_POINTSCALE_B, *(DWORD*)(&tmp)); + pID3DDevice->SetRenderState(D3DRS_POINTSIZE_MIN, *(DWORD*)(&tmp)); + tmp=0.0f; + pID3DDevice->SetRenderState(D3DRS_POINTSCALE_C, *(DWORD*)(&tmp)); + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_POINTLIST, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + pID3DDevice->SetRenderState(D3DRS_POINTSCALEENABLE, FALSE); + if (pType==scene::EPT_POINT_SPRITES) + pID3DDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, FALSE); + } + break; + case scene::EPT_LINE_STRIP: + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + case scene::EPT_LINE_LOOP: + { + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, + primitiveCount - 1, indexList, indexType, vertices, stride); + u16 tmpIndices[] = {primitiveCount - 1, 0}; + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, + 1, tmpIndices, indexType, vertices, stride); + } + break; + case scene::EPT_LINES: + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + case scene::EPT_TRIANGLE_STRIP: + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLESTRIP, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + case scene::EPT_TRIANGLE_FAN: + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLEFAN, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + case scene::EPT_TRIANGLES: + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + } +} + + +//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. +void CD3D8Driver::draw2DImage(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + if (!sourceRect.isValid()) + return; + + if (!setActiveTexture(0, texture)) + return; + + core::position2d<s32> targetPos = pos; + core::position2d<s32> sourcePos = sourceRect.UpperLeftCorner; + // This needs to be signed as it may go negative. + core::dimension2d<s32> sourceSize(sourceRect.getSize()); + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + + if (clipRect) + { + if (targetPos.X < clipRect->UpperLeftCorner.X) + { + sourceSize.Width += targetPos.X - clipRect->UpperLeftCorner.X; + if (sourceSize.Width <= 0) + return; + + sourcePos.X -= targetPos.X - clipRect->UpperLeftCorner.X; + targetPos.X = clipRect->UpperLeftCorner.X; + } + + if (targetPos.X + (s32)sourceSize.Width > clipRect->LowerRightCorner.X) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - clipRect->LowerRightCorner.X; + if (sourceSize.Width <= 0) + return; + } + + if (targetPos.Y < clipRect->UpperLeftCorner.Y) + { + sourceSize.Height += targetPos.Y - clipRect->UpperLeftCorner.Y; + if (sourceSize.Height <= 0) + return; + + sourcePos.Y -= targetPos.Y - clipRect->UpperLeftCorner.Y; + targetPos.Y = clipRect->UpperLeftCorner.Y; + } + + if (targetPos.Y + (s32)sourceSize.Height > clipRect->LowerRightCorner.Y) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - clipRect->LowerRightCorner.Y; + if (sourceSize.Height <= 0) + return; + } + } + + // clip these coordinates + + if (targetPos.X<0) + { + sourceSize.Width += targetPos.X; + if (sourceSize.Width <= 0) + return; + + sourcePos.X -= targetPos.X; + targetPos.X = 0; + } + + if (targetPos.X + sourceSize.Width > (s32)renderTargetSize.Width) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - renderTargetSize.Width; + if (sourceSize.Width <= 0) + return; + } + + if (targetPos.Y<0) + { + sourceSize.Height += targetPos.Y; + if (sourceSize.Height <= 0) + return; + + sourcePos.Y -= targetPos.Y; + targetPos.Y = 0; + } + + if (targetPos.Y + sourceSize.Height > (s32)renderTargetSize.Height) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - renderTargetSize.Height; + if (sourceSize.Height <= 0) + return; + } + + // ok, we've clipped everything. + // now draw it. + + core::rect<f32> tcoords; + tcoords.UpperLeftCorner.X = (f32)sourcePos.X / texture->getOriginalSize().Width ; + tcoords.UpperLeftCorner.Y = (f32)sourcePos.Y / texture->getOriginalSize().Height; + tcoords.LowerRightCorner.X = tcoords.UpperLeftCorner.X + (f32)sourceSize.Width / texture->getOriginalSize().Width; + tcoords.LowerRightCorner.Y = tcoords.UpperLeftCorner.Y + (f32)sourceSize.Height / texture->getOriginalSize().Height; + + const core::rect<s32> poss(targetPos, sourceSize); + + setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture); + + S3DVertex vtx[4]; + vtx[0] = S3DVertex((f32)poss.UpperLeftCorner.X, + (f32)poss.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + vtx[1] = S3DVertex((f32)poss.LowerRightCorner.X, + (f32)poss.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + vtx[2] = S3DVertex((f32)poss.LowerRightCorner.X, + (f32)poss.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + vtx[3] = S3DVertex((f32)poss.UpperLeftCorner.X, + (f32)poss.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + + const s16 indices[6] = {0,1,2,0,2,3}; + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); +} + + +void CD3D8Driver::draw2DImage(const video::ITexture* texture, + const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, + const video::SColor* const colors, + bool useAlphaChannelOfTexture) +{ + if(!texture) + return; + + const core::dimension2d<u32>& ss = texture->getOriginalSize(); + core::rect<f32> tcoords; + tcoords.UpperLeftCorner.X = (f32)sourceRect.UpperLeftCorner.X / (f32)ss.Width; + tcoords.UpperLeftCorner.Y = (f32)sourceRect.UpperLeftCorner.Y / (f32)ss.Height; + tcoords.LowerRightCorner.X = (f32)sourceRect.LowerRightCorner.X / (f32)ss.Width; + tcoords.LowerRightCorner.Y = (f32)sourceRect.LowerRightCorner.Y / (f32)ss.Height; + + core::rect<s32> clippedRect(destRect); + if (clipRect) + { + clippedRect.clipAgainst(*clipRect); + + //tcoords must be clipped by the same factors + const f32 tcWidth = tcoords.getWidth(); + const f32 tcHeight = tcoords.getHeight(); + + const f32 invDestRectWidth = 1.f / (f32)(destRect.getWidth()); + f32 scale = (f32)(clippedRect.UpperLeftCorner.X - destRect.UpperLeftCorner.X) * invDestRectWidth; + tcoords.UpperLeftCorner.X += scale * tcWidth; + scale = (f32)(destRect.LowerRightCorner.X - clippedRect.LowerRightCorner.X) * invDestRectWidth; + tcoords.LowerRightCorner.X -= scale * tcWidth; + + const f32 invDestRectHeight = 1.f / (f32)(destRect.getHeight()); + scale = (f32)(clippedRect.UpperLeftCorner.Y - destRect.UpperLeftCorner.Y) * invDestRectHeight; + tcoords.UpperLeftCorner.Y += scale * tcHeight; + scale = (f32)(destRect.LowerRightCorner.Y - clippedRect.LowerRightCorner.Y) * invDestRectHeight; + tcoords.LowerRightCorner.Y -= scale * tcHeight; + } + + const video::SColor temp[4] = + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }; + + const video::SColor* const useColor = colors ? colors : temp; + + S3DVertex vtx[4]; // clock wise + vtx[0] = S3DVertex((f32)clippedRect.UpperLeftCorner.X, (f32)clippedRect.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[0], + tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + vtx[1] = S3DVertex((f32)clippedRect.LowerRightCorner.X, (f32)clippedRect.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[3], + tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + vtx[2] = S3DVertex((f32)clippedRect.LowerRightCorner.X, (f32)clippedRect.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[2], + tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + vtx[3] = S3DVertex((f32)clippedRect.UpperLeftCorner.X, (f32)clippedRect.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[1], + tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + + const s16 indices[6] = {0,1,2,0,2,3}; + + setRenderStates2DMode(useColor[0].getAlpha()<255 || useColor[1].getAlpha()<255 || + useColor[2].getAlpha()<255 || useColor[3].getAlpha()<255, + true, useAlphaChannelOfTexture); + + setActiveTexture(0, texture); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); +} + + +//!Draws an 2d rectangle with a gradient. +void CD3D8Driver::draw2DRectangle(const core::rect<s32>& position, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, + SColor colorRightDown, const core::rect<s32>* clip) +{ + core::rect<s32> pos(position); + + if (clip) + pos.clipAgainst(*clip); + + if (!pos.isValid()) + return; + + S3DVertex vtx[4]; + vtx[0] = S3DVertex((f32)pos.UpperLeftCorner.X, (f32)pos.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorLeftUp, 0.0f, 0.0f); + vtx[1] = S3DVertex((f32)pos.LowerRightCorner.X, (f32)pos.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorRightUp, 0.0f, 1.0f); + vtx[2] = S3DVertex((f32)pos.LowerRightCorner.X, (f32)pos.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorRightDown, 1.0f, 0.0f); + vtx[3] = S3DVertex((f32)pos.UpperLeftCorner.X, (f32)pos.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorLeftDown, 1.0f, 1.0f); + + const s16 indices[6] = {0,1,2,0,2,3}; + + setRenderStates2DMode( + colorLeftUp.getAlpha() < 255 || + colorRightUp.getAlpha() < 255 || + colorLeftDown.getAlpha() < 255 || + colorRightDown.getAlpha() < 255, false, false); + + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); +} + + +//! Draws a 2d line. +void CD3D8Driver::draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color) +{ + if (start==end) + drawPixel(start.X, start.Y, color); + else + { + // thanks to Vash TheStampede who sent in his implementation + S3DVertex vtx[2]; + vtx[0] = S3DVertex((f32)start.X+0.375f, (f32)start.Y+0.375f, 0.0f, + 0.0f, 0.0f, 0.0f, // normal + color, 0.0f, 0.0f); // texture + + vtx[1] = S3DVertex((f32)end.X+0.375f, (f32)end.Y+0.375f, 0.0f, + 0.0f, 0.0f, 0.0f, + color, 0.0f, 0.0f); + + setRenderStates2DMode(color.getAlpha() < 255, false, false); + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, &vtx[0], sizeof(S3DVertex)); + } +} + + +//! Draws a pixel +void CD3D8Driver::drawPixel(u32 x, u32 y, const SColor & color) +{ + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + if (x > (u32)renderTargetSize.Width || y > (u32)renderTargetSize.Height) + return; + + setRenderStates2DMode(color.getAlpha() < 255, false, false); + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + S3DVertex vertex((f32)x+0.375f, (f32)y+0.375f, 0.f, 0.f, 0.f, 0.f, color, 0.f, 0.f); + + pID3DDevice->DrawPrimitiveUP(D3DPT_POINTLIST, 1, &vertex, sizeof(vertex)); +} + + +//! sets right vertex shader +void CD3D8Driver::setVertexShader(E_VERTEX_TYPE newType) +{ + // Because we don't know if a vertex shader was set in a material instead of a + // fvf, this call cannot be prevented in D3D8. + //if (newType != LastVertexType) + { + LastVertexType = newType; + HRESULT hr = 0; + + switch(newType) + { + case EVT_STANDARD: + hr = pID3DDevice->SetVertexShader(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1); + break; + case EVT_2TCOORDS: + hr = pID3DDevice->SetVertexShader(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX2); + break; + case EVT_TANGENTS: + hr = pID3DDevice->SetVertexShader(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX3 | + D3DFVF_TEXCOORDSIZE2(0) | // real texture coord + D3DFVF_TEXCOORDSIZE3(1) | // misuse texture coord 2 for tangent + D3DFVF_TEXCOORDSIZE3(2) // misuse texture coord 3 for binormal + ); + break; + } + + if (FAILED(hr)) + { + os::Printer::log("Could not set vertex Shader.", ELL_ERROR); + return; + } + } +} + + +//! sets the needed renderstates +bool CD3D8Driver::setRenderStates3DMode() +{ + if (!pID3DDevice) + return false; + + if (CurrentRenderMode != ERM_3D) + { + // switch back the matrices + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)&Matrices[ETS_VIEW])); + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)&Matrices[ETS_WORLD])); + pID3DDevice->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)((void*)&Matrices[ETS_PROJECTION])); + + pID3DDevice->SetRenderState(D3DRS_STENCILENABLE, FALSE); + + ResetRenderStates = true; + } + + if (ResetRenderStates || LastMaterial != Material) + { + // unset old material + + if (CurrentRenderMode == ERM_3D && + LastMaterial.MaterialType != Material.MaterialType && + LastMaterial.MaterialType >= 0 && LastMaterial.MaterialType < (s32)MaterialRenderers.size()) + MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); + + // set new material. + + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + MaterialRenderers[Material.MaterialType].Renderer->OnSetMaterial( + Material, LastMaterial, ResetRenderStates, this); + } + + bool shaderOK = true; + + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + shaderOK = MaterialRenderers[Material.MaterialType].Renderer->OnRender(this, LastVertexType); + + LastMaterial = Material; + + ResetRenderStates = false; + + CurrentRenderMode = ERM_3D; + + return shaderOK; +} + + +//! Map Irrlicht texture wrap mode to native values +D3DTEXTUREADDRESS CD3D8Driver::getTextureWrapMode(const u8 clamp) +{ + switch (clamp) + { + case ETC_REPEAT: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_WRAP) + return D3DTADDRESS_WRAP; + case ETC_CLAMP: + case ETC_CLAMP_TO_EDGE: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_CLAMP) + return D3DTADDRESS_CLAMP; + case ETC_MIRROR: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_MIRROR) + return D3DTADDRESS_MIRROR; + case ETC_CLAMP_TO_BORDER: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_BORDER) + return D3DTADDRESS_BORDER; + else + return D3DTADDRESS_CLAMP; + case ETC_MIRROR_CLAMP: + case ETC_MIRROR_CLAMP_TO_EDGE: + case ETC_MIRROR_CLAMP_TO_BORDER: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_MIRRORONCE) + return D3DTADDRESS_MIRRORONCE; + else + return D3DTADDRESS_CLAMP; + default: + return D3DTADDRESS_WRAP; + } +} + + +//! Can be called by an IMaterialRenderer to make its work easier. +void CD3D8Driver::setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, + bool resetAllRenderstates) +{ + if (resetAllRenderstates || + lastmaterial.AmbientColor != material.AmbientColor || + lastmaterial.DiffuseColor != material.DiffuseColor || + lastmaterial.SpecularColor != material.SpecularColor || + lastmaterial.EmissiveColor != material.EmissiveColor || + lastmaterial.Shininess != material.Shininess) + { + D3DMATERIAL8 mat; + mat.Diffuse = colorToD3D(material.DiffuseColor); + mat.Ambient = colorToD3D(material.AmbientColor); + mat.Specular = colorToD3D(material.SpecularColor); + mat.Emissive = colorToD3D(material.EmissiveColor); + mat.Power = material.Shininess; + pID3DDevice->SetMaterial(&mat); + } + + if (lastmaterial.ColorMaterial != material.ColorMaterial) + { + pID3DDevice->SetRenderState(D3DRS_COLORVERTEX, (material.ColorMaterial != ECM_NONE)); + pID3DDevice->SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, + ((material.ColorMaterial == ECM_DIFFUSE)|| + (material.ColorMaterial == ECM_DIFFUSE_AND_AMBIENT))?D3DMCS_COLOR1:D3DMCS_MATERIAL); + pID3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, + ((material.ColorMaterial == ECM_AMBIENT)|| + (material.ColorMaterial == ECM_DIFFUSE_AND_AMBIENT))?D3DMCS_COLOR1:D3DMCS_MATERIAL); + pID3DDevice->SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, + (material.ColorMaterial == ECM_EMISSIVE)?D3DMCS_COLOR1:D3DMCS_MATERIAL); + pID3DDevice->SetRenderState(D3DRS_SPECULARMATERIALSOURCE, + (material.ColorMaterial == ECM_SPECULAR)?D3DMCS_COLOR1:D3DMCS_MATERIAL); + } + + // fillmode + if (resetAllRenderstates || lastmaterial.Wireframe != material.Wireframe || lastmaterial.PointCloud != material.PointCloud) + { + if (material.Wireframe) + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); + else + if (material.PointCloud) + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_POINT); + else + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); + } + + // shademode + if (resetAllRenderstates || lastmaterial.GouraudShading != material.GouraudShading) + { + if (material.GouraudShading) + pID3DDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD); + else + pID3DDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_FLAT); + } + + // lighting + if (resetAllRenderstates || lastmaterial.Lighting != material.Lighting) + { + if (material.Lighting) + pID3DDevice->SetRenderState(D3DRS_LIGHTING, TRUE); + else + pID3DDevice->SetRenderState(D3DRS_LIGHTING, FALSE); + } + + // zbuffer + if (resetAllRenderstates || lastmaterial.ZBuffer != material.ZBuffer) + { + switch (material.ZBuffer) + { + case ECFN_NEVER: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, FALSE); + break; + case ECFN_LESSEQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL); + break; + case ECFN_EQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_EQUAL); + break; + case ECFN_LESS: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS); + break; + case ECFN_NOTEQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_NOTEQUAL); + break; + case ECFN_GREATEREQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_GREATEREQUAL); + break; + case ECFN_GREATER: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_GREATER); + break; + case ECFN_ALWAYS: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS); + break; + } + } + + // zwrite +// if (resetAllRenderstates || lastmaterial.ZWriteEnable != material.ZWriteEnable) + { + if (material.ZWriteEnable && (AllowZWriteOnTransparent || !material.isTransparent())) + pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE); + else + pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE); + } + + // back face culling + if (resetAllRenderstates || (lastmaterial.FrontfaceCulling != material.FrontfaceCulling) || (lastmaterial.BackfaceCulling != material.BackfaceCulling)) + { +// if (material.FrontfaceCulling && material.BackfaceCulling) +// pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW|D3DCULL_CCW); +// else + if (material.FrontfaceCulling) + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW); + else + if (material.BackfaceCulling) + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); + else + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); + } + + // fog + if (resetAllRenderstates || lastmaterial.FogEnable != material.FogEnable) + { + pID3DDevice->SetRenderState(D3DRS_FOGENABLE, material.FogEnable); + } + + // specular highlights + if (resetAllRenderstates || !core::equals(lastmaterial.Shininess, material.Shininess)) + { + bool enable = (material.Shininess!=0); + pID3DDevice->SetRenderState(D3DRS_SPECULARENABLE, enable); + pID3DDevice->SetRenderState(D3DRS_NORMALIZENORMALS, enable); + pID3DDevice->SetRenderState(D3DRS_SPECULARMATERIALSOURCE, D3DMCS_MATERIAL); + } + + // normalization + if (resetAllRenderstates || lastmaterial.NormalizeNormals != material.NormalizeNormals) + { + pID3DDevice->SetRenderState(D3DRS_NORMALIZENORMALS, material.NormalizeNormals); + } + + // Color Mask + if (queryFeature(EVDF_COLOR_MASK) && + (resetAllRenderstates || lastmaterial.ColorMask != material.ColorMask)) + { + const DWORD flag = + ((material.ColorMask & ECP_RED)?D3DCOLORWRITEENABLE_RED:0) | + ((material.ColorMask & ECP_GREEN)?D3DCOLORWRITEENABLE_GREEN:0) | + ((material.ColorMask & ECP_BLUE)?D3DCOLORWRITEENABLE_BLUE:0) | + ((material.ColorMask & ECP_ALPHA)?D3DCOLORWRITEENABLE_ALPHA:0); + pID3DDevice->SetRenderState(D3DRS_COLORWRITEENABLE, flag); + } + + if (queryFeature(EVDF_BLEND_OPERATIONS) && + (resetAllRenderstates|| lastmaterial.BlendOperation != material.BlendOperation)) + { + if (material.BlendOperation==EBO_NONE) + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + else + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + switch (material.BlendOperation) + { + case EBO_MAX: + case EBO_MAX_FACTOR: + case EBO_MAX_ALPHA: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_MAX); + break; + case EBO_MIN: + case EBO_MIN_FACTOR: + case EBO_MIN_ALPHA: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_MIN); + break; + case EBO_SUBTRACT: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_SUBTRACT); + break; + case EBO_REVSUBTRACT: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_REVSUBTRACT); + break; + default: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD); + break; + } + } + } + + // Polygon offset + if (queryFeature(EVDF_POLYGON_OFFSET) && (resetAllRenderstates || + lastmaterial.PolygonOffsetDirection != material.PolygonOffsetDirection || + lastmaterial.PolygonOffsetFactor != material.PolygonOffsetFactor)) + { + pID3DDevice->SetRenderState(D3DRS_ZBIAS, material.PolygonOffsetFactor); + } + + // thickness + if (resetAllRenderstates || lastmaterial.Thickness != material.Thickness) + { + pID3DDevice->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&material.Thickness)); + } + + // texture address mode + for (u32 st=0; st<MaxTextureUnits; ++st) + { + if (resetAllRenderstates || lastmaterial.TextureLayer[st].LODBias != material.TextureLayer[st].LODBias) + { + const float tmp = material.TextureLayer[st].LODBias * 0.125f; + pID3DDevice->SetTextureStageState(st, D3DTSS_MIPMAPLODBIAS, *(DWORD*)(&tmp)); + } + + if (resetAllRenderstates || lastmaterial.TextureLayer[st].TextureWrapU != material.TextureLayer[st].TextureWrapU) + pID3DDevice->SetTextureStageState(st, D3DTSS_ADDRESSU, getTextureWrapMode(material.TextureLayer[st].TextureWrapU)); + // If separate UV not supported reuse U for V + if (!(Caps.TextureAddressCaps & D3DPTADDRESSCAPS_INDEPENDENTUV)) + pID3DDevice->SetTextureStageState(st, D3DTSS_ADDRESSV, getTextureWrapMode(material.TextureLayer[st].TextureWrapU)); + else if (resetAllRenderstates || lastmaterial.TextureLayer[st].TextureWrapV != material.TextureLayer[st].TextureWrapV) + pID3DDevice->SetTextureStageState(st, D3DTSS_ADDRESSV, getTextureWrapMode(material.TextureLayer[st].TextureWrapV)); + + // Bilinear and/or trilinear + if (resetAllRenderstates || + lastmaterial.TextureLayer[st].BilinearFilter != material.TextureLayer[st].BilinearFilter || + lastmaterial.TextureLayer[st].TrilinearFilter != material.TextureLayer[st].TrilinearFilter || + lastmaterial.TextureLayer[st].AnisotropicFilter != material.TextureLayer[st].AnisotropicFilter || + lastmaterial.UseMipMaps != material.UseMipMaps) + { + if (material.TextureLayer[st].BilinearFilter || material.TextureLayer[st].TrilinearFilter || material.TextureLayer[st].AnisotropicFilter>1) + { + const D3DTEXTUREFILTERTYPE tftMag = ((Caps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC) && + material.TextureLayer[st].AnisotropicFilter) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR; + const D3DTEXTUREFILTERTYPE tftMin = ((Caps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC) && + material.TextureLayer[st].AnisotropicFilter) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR; + const D3DTEXTUREFILTERTYPE tftMip = material.UseMipMaps? (material.TextureLayer[st].TrilinearFilter ? D3DTEXF_LINEAR : D3DTEXF_POINT) : D3DTEXF_NONE; + + if (tftMag==D3DTEXF_ANISOTROPIC || tftMin == D3DTEXF_ANISOTROPIC) + pID3DDevice->SetTextureStageState(st, D3DTSS_MAXANISOTROPY, core::min_((DWORD)material.TextureLayer[st].AnisotropicFilter, Caps.MaxAnisotropy)); + pID3DDevice->SetTextureStageState(st, D3DTSS_MAGFILTER, tftMag); + pID3DDevice->SetTextureStageState(st, D3DTSS_MINFILTER, tftMin); + pID3DDevice->SetTextureStageState(st, D3DTSS_MIPFILTER, tftMip); + } + else + { + pID3DDevice->SetTextureStageState(st, D3DTSS_MINFILTER, D3DTEXF_POINT); + pID3DDevice->SetTextureStageState(st, D3DTSS_MIPFILTER, D3DTEXF_NONE); + pID3DDevice->SetTextureStageState(st, D3DTSS_MAGFILTER, D3DTEXF_POINT); + } + } + } +} + + +//! sets the needed renderstates +void CD3D8Driver::setRenderStatesStencilShadowMode(bool zfail, u32 debugDataVisible) +{ + if ((CurrentRenderMode != ERM_SHADOW_VOLUME_ZFAIL && + CurrentRenderMode != ERM_SHADOW_VOLUME_ZPASS) || + Transformation3DChanged) + { + // unset last 3d material + if (CurrentRenderMode == ERM_3D && + static_cast<u32>(Material.MaterialType) < MaterialRenderers.size()) + { + MaterialRenderers[Material.MaterialType].Renderer->OnUnsetMaterial(); + ResetRenderStates = true; + } + // switch back the matrices + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)&Matrices[ETS_VIEW])); + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)&Matrices[ETS_WORLD])); + pID3DDevice->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)((void*)&Matrices[ETS_PROJECTION])); + + Transformation3DChanged = false; + + setActiveTexture(0,0); + setActiveTexture(1,0); + setActiveTexture(2,0); + setActiveTexture(3,0); + + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE); + + pID3DDevice->SetVertexShader(D3DFVF_XYZ); + LastVertexType = (video::E_VERTEX_TYPE)(-1); + + pID3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, FALSE); + pID3DDevice->SetRenderState(D3DRS_STENCILENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_FLAT); + //pID3DDevice->SetRenderState(D3DRS_FOGENABLE, FALSE); + //pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + + pID3DDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_ALWAYS); + pID3DDevice->SetRenderState(D3DRS_STENCILREF, 0x0); + pID3DDevice->SetRenderState(D3DRS_STENCILMASK, 0xffffffff); + pID3DDevice->SetRenderState(D3DRS_STENCILWRITEMASK, 0xffffffff); + if (!(debugDataVisible & (scene::EDS_SKELETON|scene::EDS_MESH_WIRE_OVERLAY))) + pID3DDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0); + if ((debugDataVisible & scene::EDS_MESH_WIRE_OVERLAY)) + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); + } + + if (CurrentRenderMode != ERM_SHADOW_VOLUME_ZPASS && !zfail) + { + // USE THE ZPASS METHOD + pID3DDevice->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_INCR); + } + else + if (CurrentRenderMode != ERM_SHADOW_VOLUME_ZFAIL && zfail) + { + // USE THE ZFAIL METHOD + pID3DDevice->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCR); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_KEEP); + } + + CurrentRenderMode = zfail ? ERM_SHADOW_VOLUME_ZFAIL : ERM_SHADOW_VOLUME_ZPASS; +} + + +//! sets the needed renderstates +void CD3D8Driver::setRenderStatesStencilFillMode(bool alpha) +{ + if (CurrentRenderMode != ERM_STENCIL_FILL || Transformation3DChanged) + { + pID3DDevice->SetTransform(D3DTS_VIEW, &UnitMatrixD3D8); + pID3DDevice->SetTransform(D3DTS_WORLD, &UnitMatrixD3D8); + pID3DDevice->SetTransform(D3DTS_PROJECTION, &UnitMatrixD3D8); + + pID3DDevice->SetRenderState(D3DRS_ZENABLE, FALSE); + pID3DDevice->SetRenderState(D3DRS_LIGHTING, FALSE); + pID3DDevice->SetRenderState(D3DRS_FOGENABLE, FALSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(2, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(2, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(3, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(3, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + + pID3DDevice->SetRenderState(D3DRS_STENCILREF, 0x1 ); + pID3DDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_LESSEQUAL); + //pID3DDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_GREATEREQUAL); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_KEEP ); + pID3DDevice->SetRenderState( D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP ); + pID3DDevice->SetRenderState( D3DRS_STENCILMASK, 0xffffffff ); + pID3DDevice->SetRenderState( D3DRS_STENCILWRITEMASK, 0xffffffff ); + + pID3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW); + + Transformation3DChanged = false; + + if (alpha) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE ); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE ); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE ); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } + + CurrentRenderMode = ERM_STENCIL_FILL; +} + + +//! sets the needed renderstates +void CD3D8Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel) +{ + if (!pID3DDevice) + return; + + if (CurrentRenderMode != ERM_2D || Transformation3DChanged) + { + // unset last 3d material + if (CurrentRenderMode == ERM_3D) + { + if (static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size()) + MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); + } + if (!OverrideMaterial2DEnabled) + { + setBasicRenderStates(InitMaterial2D, LastMaterial, true); + LastMaterial=InitMaterial2D; + + // fix everything that is wrongly set by SMaterial default + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); + pID3DDevice->SetTextureStageState(2, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(2, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); + pID3DDevice->SetTextureStageState(3, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(3, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); + + pID3DDevice->SetRenderState( D3DRS_STENCILENABLE, FALSE ); + + } + pID3DDevice->SetTransform(D3DTS_WORLD, &UnitMatrixD3D8); + core::matrix4 m; + m.setTranslation(core::vector3df(-0.5f,-0.5f,0)); + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)m.pointer())); + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + m.buildProjectionMatrixOrthoLH(f32(renderTargetSize.Width), f32(-(s32)(renderTargetSize.Height)), -1.0, 1.0); + m.setTranslation(core::vector3df(-1,1,0)); + pID3DDevice->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)((void*)m.pointer())); + + Transformation3DChanged = false; + } + if (OverrideMaterial2DEnabled) + { + OverrideMaterial2D.Lighting=false; + setBasicRenderStates(OverrideMaterial2D, LastMaterial, false); + LastMaterial = OverrideMaterial2D; + } + + // no alphaChannel without texture + alphaChannel &= texture; + + if (alpha || alphaChannel) + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + else + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); + if (texture) + { + setTransform(ETS_TEXTURE_0, core::IdentityMatrix); + // Due to the transformation change, the previous line would call a reset each frame + // but we can safely reset the variable as it was false before + Transformation3DChanged=false; + } + if (alphaChannel) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); + + if (alpha) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE); + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + } + + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE ); + if (alpha) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG2); + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE); + } + } + + CurrentRenderMode = ERM_2D; +} + + +//! deletes all dynamic lights there are +void CD3D8Driver::deleteAllDynamicLights() +{ + for (s32 i=0; i<LastSetLight+1; ++i) + pID3DDevice->LightEnable(i, false); + + LastSetLight = -1; + + CNullDriver::deleteAllDynamicLights(); +} + + +//! adds a dynamic light +s32 CD3D8Driver::addDynamicLight(const SLight& dl) +{ + CNullDriver::addDynamicLight(dl); + + D3DLIGHT8 light; + + switch (dl.Type) + { + case ELT_POINT: + light.Type = D3DLIGHT_POINT; + break; + case ELT_SPOT: + light.Type = D3DLIGHT_SPOT; + break; + case ELT_DIRECTIONAL: + light.Type = D3DLIGHT_DIRECTIONAL; + break; + } + + light.Position = *(D3DVECTOR*)((void*)(&dl.Position)); + light.Direction = *(D3DVECTOR*)((void*)(&dl.Direction)); + + light.Range = core::min_(dl.Radius, MaxLightDistance); + light.Falloff = dl.Falloff; + + light.Diffuse = *(D3DCOLORVALUE*)((void*)(&dl.DiffuseColor)); + light.Specular = *(D3DCOLORVALUE*)((void*)(&dl.SpecularColor)); + light.Ambient = *(D3DCOLORVALUE*)((void*)(&dl.AmbientColor)); + + light.Attenuation0 = dl.Attenuation.X; + light.Attenuation1 = dl.Attenuation.Y; + light.Attenuation2 = dl.Attenuation.Z; + + light.Theta = dl.InnerCone * 2.0f * core::DEGTORAD; + light.Phi = dl.OuterCone * 2.0f * core::DEGTORAD; + + ++LastSetLight; + + if(D3D_OK == pID3DDevice->SetLight(LastSetLight, &light)) + { + // I don't care if this succeeds + (void)pID3DDevice->LightEnable(LastSetLight, true); + return LastSetLight; + } + + return -1; +} + + +void CD3D8Driver::turnLightOn(s32 lightIndex, bool turnOn) +{ + if(lightIndex < 0 || lightIndex > LastSetLight) + return; + + (void)pID3DDevice->LightEnable(lightIndex, turnOn); +} + + +//! returns the maximal amount of dynamic lights the device can handle +u32 CD3D8Driver::getMaximalDynamicLightAmount() const +{ + return Caps.MaxActiveLights; +} + + +//! Sets the dynamic ambient light color. The default color is +//! (0,0,0,0) which means it is dark. +//! \param color: New color of the ambient light. +void CD3D8Driver::setAmbientLight(const SColorf& color) +{ + if (!pID3DDevice) + return; + + AmbientLight = color; + D3DCOLOR col = color.toSColor().color; + pID3DDevice->SetRenderState(D3DRS_AMBIENT, col); +} + + +//! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 +//! driver, it would return "Direct3D8.1". +const wchar_t* CD3D8Driver::getName() const +{ + return L"Direct3D 8.1"; +} + + +//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do +//! this: First, draw all geometry. Then use this method, to draw the shadow +//! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. +void CD3D8Driver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible) +{ + const u32 count = triangles.size(); + if (!Params.Stencilbuffer || !count) + return; + + setRenderStatesStencilShadowMode(zfail, debugDataVisible); + + if (!zfail) + { + // ZPASS Method + + // Draw front-side of shadow volume in stencil only + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW ); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_INCRSAT); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + + // Now reverse cull order so front sides of shadow volume are written. + pID3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CW ); + pID3DDevice->SetRenderState( D3DRS_STENCILPASS, D3DSTENCILOP_DECRSAT); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + } + else + { + // ZFAIL Method + + // Draw front-side of shadow volume in stencil only + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW ); + pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCRSAT ); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + + // Now reverse cull order so front sides of shadow volume are written. + pID3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW ); + pID3DDevice->SetRenderState( D3DRS_STENCILZFAIL, D3DSTENCILOP_DECRSAT ); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + } +} + + +//! Fills the stencil shadow with color. After the shadow volume has been drawn +//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this +//! to draw the color of the shadow. +void CD3D8Driver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, + video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) +{ + if (!Params.Stencilbuffer) + return; + + S3DVertex vtx[4]; + vtx[0] = S3DVertex(1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, leftUpEdge, 0.0f, 0.0f); + vtx[1] = S3DVertex(1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, rightUpEdge, 0.0f, 1.0f); + vtx[2] = S3DVertex(-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, leftDownEdge, 1.0f, 0.0f); + vtx[3] = S3DVertex(-1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, rightDownEdge, 1.0f, 1.0f); + + const s16 indices[6] = {0,1,2,1,3,2}; + + setRenderStatesStencilFillMode( + leftUpEdge.getAlpha() < 255 || + rightUpEdge.getAlpha() < 255 || + leftDownEdge.getAlpha() < 255 || + rightDownEdge.getAlpha() < 255); + + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); + + if (clearStencilBuffer) + pID3DDevice->Clear(0, NULL, D3DCLEAR_STENCIL,0, 1.0, 0); +} + + +//! Returns the maximum amount of primitives (mostly vertices) which +//! the device is able to render with one drawIndexedTriangleList +//! call. +u32 CD3D8Driver::getMaximalPrimitiveCount() const +{ + return Caps.MaxPrimitiveCount; +} + + +//! Sets the fog mode. +void CD3D8Driver::setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog) +{ + CNullDriver::setFog(color, fogType, start, end, density, pixelFog, rangeFog); + + if (!pID3DDevice) + return; + + pID3DDevice->SetRenderState(D3DRS_FOGCOLOR, color.color); + + pID3DDevice->SetRenderState( +#if defined( _IRR_XBOX_PLATFORM_) + D3DRS_FOGTABLEMODE, +#else + pixelFog ? D3DRS_FOGTABLEMODE : D3DRS_FOGVERTEXMODE, +#endif + (fogType==EFT_FOG_LINEAR)? D3DFOG_LINEAR : (fogType==EFT_FOG_EXP)?D3DFOG_EXP:D3DFOG_EXP2); + + if (fogType==EFT_FOG_LINEAR) + { + pID3DDevice->SetRenderState(D3DRS_FOGSTART, *(DWORD*)(&start)); + pID3DDevice->SetRenderState(D3DRS_FOGEND, *(DWORD*)(&end)); + } + else + pID3DDevice->SetRenderState(D3DRS_FOGDENSITY, *(DWORD*)(&density)); + + if(!pixelFog) + pID3DDevice->SetRenderState(D3DRS_RANGEFOGENABLE, rangeFog); +} + + +//! Draws a 3d line. +void CD3D8Driver::draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color) +{ + setVertexShader(EVT_STANDARD); + setRenderStates3DMode(); + video::S3DVertex v[2]; + v[0].Color = color; + v[1].Color = color; + v[0].Pos = start; + v[1].Pos = end; + + pID3DDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, v, sizeof(S3DVertex)); +} + + +void CD3D8Driver::OnResize(const core::dimension2d<u32>& size) +{ + if (!pID3DDevice) + return; + + CNullDriver::OnResize(size); + reset(); +} + + +//! Returns type of video driver +E_DRIVER_TYPE CD3D8Driver::getDriverType() const +{ + return EDT_DIRECT3D8; +} + + +//! Returns the transformation set by setTransform +const core::matrix4& CD3D8Driver::getTransform(E_TRANSFORMATION_STATE state) const +{ + return Matrices[state]; +} + + +//! Sets a vertex shader constant. +void CD3D8Driver::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + if (data) + pID3DDevice->SetVertexShaderConstant(startRegister, data, constantAmount); +} + + +//! Sets a pixel shader constant. +void CD3D8Driver::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + if (data) + pID3DDevice->SetPixelShaderConstant(startRegister, data, constantAmount); +} + + +//! Sets a constant for the vertex shader based on a name. +bool CD3D8Driver::setVertexShaderConstant(const c8* name, const f32* floats, int count) +{ + os::Printer::log("Cannot set constant, no HLSL supported in D3D8"); + return false; +} + + +//! Bool interface for the above. +bool CD3D8Driver::setVertexShaderConstant(const c8* name, const bool* bools, int count) +{ + os::Printer::log("Cannot set constant, no HLSL supported in D3D8"); + return false; +} + + +//! Int interface for the above. +bool CD3D8Driver::setVertexShaderConstant(const c8* name, const s32* ints, int count) +{ + os::Printer::log("Cannot set constant, no HLSL supported in D3D8"); + return false; +} + + +//! Sets a constant for the pixel shader based on a name. +bool CD3D8Driver::setPixelShaderConstant(const c8* name, const f32* floats, int count) +{ + os::Printer::log("Cannot set constant, no HLSL supported in D3D8"); + return false; +} + + +//! Bool interface for the above. +bool CD3D8Driver::setPixelShaderConstant(const c8* name, const bool* bools, int count) +{ + os::Printer::log("Cannot set constant, no HLSL supported in D3D8"); + return false; +} + + +//! Int interface for the above. +bool CD3D8Driver::setPixelShaderConstant(const c8* name, const s32* ints, int count) +{ + os::Printer::log("Cannot set constant, no HLSL supported in D3D8"); + return false; +} + + +//! Adds a new material renderer to the VideoDriver, using pixel and/or +//! vertex shaders to render geometry. +s32 CD3D8Driver::addShaderMaterial(const c8* vertexShaderProgram, + const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, s32 userData) +{ + s32 nr = -1; + CD3D8ShaderMaterialRenderer* r = new CD3D8ShaderMaterialRenderer( + pID3DDevice, this, nr, vertexShaderProgram, pixelShaderProgram, + callback, getMaterialRenderer(baseMaterial), userData); + + r->drop(); + return nr; +} + + +//! Returns a pointer to the IVideoDriver interface. (Implementation for +//! IMaterialRendererServices) +IVideoDriver* CD3D8Driver::getVideoDriver() +{ + return this; +} + + +//! Clears the ZBuffer. +void CD3D8Driver::clearZBuffer() +{ + const HRESULT hr = pID3DDevice->Clear( 0, NULL, D3DCLEAR_ZBUFFER, 0, 1.0, 0); + + if (FAILED(hr)) + os::Printer::log("CD3D8Driver clearZBuffer() failed.", ELL_WARNING); +} + + +//! Returns an image created from the last rendered frame. +IImage* CD3D8Driver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RENDER_TARGET target) +{ +#if defined( _IRR_XBOX_PLATFORM_) + return 0; +#else + if (target != video::ERT_FRAME_BUFFER) + return 0; + + // query the screen dimensions of the current adapter + D3DDISPLAYMODE displayMode; + pID3DDevice->GetDisplayMode(&displayMode); + + if (format==video::ECF_UNKNOWN) + format=video::ECF_A8R8G8B8; + + // create the image surface to store the front buffer image [always A8R8G8B8] + HRESULT hr; + LPDIRECT3DSURFACE8 lpSurface; + if (FAILED(hr = pID3DDevice->CreateImageSurface(displayMode.Width, displayMode.Height, D3DFMT_A8R8G8B8, &lpSurface))) + return 0; + + // read the front buffer into the image surface + if (FAILED(hr = pID3DDevice->GetFrontBuffer(lpSurface))) + { + lpSurface->Release(); + return 0; + } + + RECT clientRect; + { + POINT clientPoint; + clientPoint.x = 0; + clientPoint.y = 0; + + ClientToScreen( (HWND)getExposedVideoData().D3D8.HWnd, &clientPoint ); + + clientRect.left = clientPoint.x; + clientRect.top = clientPoint.y; + clientRect.right = clientRect.left + ScreenSize.Width; + clientRect.bottom = clientRect.top + ScreenSize.Height; + + // window can be off-screen partly, we can't take screenshots from that + clientRect.left = core::max_(clientRect.left, 0l); + clientRect.top = core::max_(clientRect.top, 0l); + clientRect.right = core::min_(clientRect.right, (long)displayMode.Width); + clientRect.bottom = core::min_(clientRect.bottom, (long)displayMode.Height ); + } + + // lock our area of the surface + D3DLOCKED_RECT lockedRect; + if (FAILED(lpSurface->LockRect(&lockedRect, &clientRect, D3DLOCK_READONLY))) + { + lpSurface->Release(); + return 0; + } + + irr::core::dimension2d<u32> shotSize; + shotSize.Width = core::min_( ScreenSize.Width, (u32)(clientRect.right-clientRect.left) ); + shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) ); + + // this could throw, but we aren't going to worry about that case very much + IImage* newImage = createImage(format, shotSize); + + if (newImage) + { + // d3d pads the image, so we need to copy the correct number of bytes + u32* dP = (u32*)newImage->lock(); + u8 * sP = (u8 *)lockedRect.pBits; + + // If the display mode format doesn't promise anything about the Alpha value + // and it appears that it's not presenting 255, then we should manually + // set each pixel alpha value to 255. + if(D3DFMT_X8R8G8B8 == displayMode.Format && (0xFF000000 != (*dP & 0xFF000000))) + { + for (u32 y = 0; y < shotSize.Height; ++y) + { + for(u32 x = 0; x < shotSize.Width; ++x) + { + newImage->setPixel(x,y,*((u32*)sP) | 0xFF000000); + sP += 4; + } + + sP += lockedRect.Pitch - (4 * shotSize.Width); + } + } + else + { + for (u32 y = 0; y < shotSize.Height; ++y) + { + convertColor(sP, video::ECF_A8R8G8B8, shotSize.Width, dP, format); + sP += lockedRect.Pitch; + dP += shotSize.Width; + } + } + + newImage->unlock(); + } + + // we can unlock and release the surface + lpSurface->UnlockRect(); + + // release the image surface + lpSurface->Release(); + + // return status of save operation to caller + return newImage; +#endif +} + + +// returns the current size of the screen or rendertarget +const core::dimension2d<u32>& CD3D8Driver::getCurrentRenderTargetSize() const +{ + if ( CurrentRendertargetSize.Width == 0 ) + return ScreenSize; + else + return CurrentRendertargetSize; +} + + +// Set/unset a clipping plane. +bool CD3D8Driver::setClipPlane(u32 index, const core::plane3df& plane, bool enable) +{ +#if defined( _IRR_XBOX_PLATFORM_) + return false; +#else + if (index >= MaxUserClipPlanes) + return false; + pID3DDevice->SetClipPlane(index, (const float*)&plane); + enableClipPlane(index, enable); + return true; +#endif +} + + +// Enable/disable a clipping plane. +void CD3D8Driver::enableClipPlane(u32 index, bool enable) +{ +#if defined( _IRR_XBOX_PLATFORM_) + return; +#else + if (index >= MaxUserClipPlanes) + return; + DWORD renderstate; + pID3DDevice->GetRenderState(D3DRS_CLIPPLANEENABLE, &renderstate); + if (enable) + renderstate |= (1 << index); + else + renderstate &= ~(1 << index); + pID3DDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, renderstate); +#endif +} + + +core::dimension2du CD3D8Driver::getMaxTextureSize() const +{ + return core::dimension2du(Caps.MaxTextureWidth, Caps.MaxTextureHeight); +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + + +namespace irr +{ +namespace video +{ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ +//! creates a video driver +IVideoDriver* createDirectX8Driver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window) +{ + const bool pureSoftware = false; + CD3D8Driver* dx8 = new CD3D8Driver(params, io); + + if (!dx8->initDriver(window, pureSoftware)) + { + dx8->drop(); + dx8 = 0; + } + + return dx8; +} +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + +} // end namespace video +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.h new file mode 100644 index 0000000..e9428a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Driver.h @@ -0,0 +1,341 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_VIDEO_DIRECTX_8_H_INCLUDED__ +#define __C_VIDEO_DIRECTX_8_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + +#ifdef _IRR_WINDOWS_ + #define WIN32_LEAN_AND_MEAN + #include <windows.h> +#endif + +#include "SIrrCreationParameters.h" +// always included for static createDriver function +#include "CNullDriver.h" +#include "IMaterialRendererServices.h" + +#include <d3d8.h> + +namespace irr +{ +namespace video +{ + class CD3D8Driver : public CNullDriver, IMaterialRendererServices + { + friend class CD3D8Texture; + + public: + + //! constructor + CD3D8Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io); + + //! destructor + virtual ~CD3D8Driver(); + + //! applications must call this method before performing any rendering. returns false if failed. + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect<s32>* sourceRect=0); + + //! applications must call this method after performing any rendering. returns false if failed. + virtual bool endScene(); + + //! queries the features of the driver, returns true if feature is available + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + + //! sets transformation + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); + + //! sets a material + virtual void setMaterial(const SMaterial& material); + + //! sets a render target + virtual bool setRenderTarget(video::ITexture* texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)); + + //! sets a viewport + virtual void setViewPort(const core::rect<s32>& area); + + //! gets the area of the current viewport + virtual const core::rect<s32>& getViewPort() const; + + //! draws a vertex primitive list + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType); + + //! draws a vertex primitive list in 2d + virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType); + + //! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false); + + //! Draws a part of the texture into the rectangle. + virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false); + + //!Draws an 2d rectangle with a gradient. + virtual void draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip = 0); + + //! Draws a 2d line. + virtual void draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color=SColor(255,255,255,255)); + + //! Draws a pixel. + virtual void drawPixel(u32 x, u32 y, const SColor & color); + + //! Draws a 3d line. + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color = SColor(255,255,255,255)); + + //! initialises the Direct3D API + bool initDriver(HWND hwnd, bool pureSoftware); + + //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 + //! driver, it would return "Direct3D8.1". + virtual const wchar_t* getName() const; + + //! deletes all dynamic lights there are + virtual void deleteAllDynamicLights(); + + //! adds a dynamic light, returning an index to the light + //! \param light: the light data to use to create the light + //! \return An index to the light, or -1 if an error occurs + virtual s32 addDynamicLight(const SLight& light); + + //! Turns a dynamic light on or off + //! \param lightIndex: the index returned by addDynamicLight + //! \param turnOn: true to turn the light on, false to turn it off + virtual void turnLightOn(s32 lightIndex, bool turnOn); + + //! returns the maximal amount of dynamic lights the device can handle + virtual u32 getMaximalDynamicLightAmount() const; + + //! Sets the dynamic ambient light color. The default color is + //! (0,0,0,0) which means it is dark. + //! \param color: New color of the ambient light. + virtual void setAmbientLight(const SColorf& color); + + //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do + //! this: Frist, draw all geometry. Then use this method, to draw the shadow + //! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. + virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0); + + //! Fills the stencil shadow with color. After the shadow volume has been drawn + //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this + //! to draw the color of the shadow. + virtual void drawStencilShadow(bool clearStencilBuffer=false, + video::SColor leftUpEdge = video::SColor(0,0,0,0), + video::SColor rightUpEdge = video::SColor(0,0,0,0), + video::SColor leftDownEdge = video::SColor(0,0,0,0), + video::SColor rightDownEdge = video::SColor(0,0,0,0)); + + //! Returns the maximum amount of primitives (mostly vertices) which + //! the device is able to render with one drawIndexedTriangleList + //! call. + virtual u32 getMaximalPrimitiveCount() const; + + //! Enables or disables a texture creation flag. + virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled); + + //! Sets the fog mode. + virtual void setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog); + + //! Only used by the internal engine. Used to notify the driver that + //! the window was resized. + virtual void OnResize(const core::dimension2d<u32>& size); + + //! Returns type of video driver + virtual E_DRIVER_TYPE getDriverType() const; + + //! Returns the transformation set by setTransform + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const; + + //! Can be called by an IMaterialRenderer to make its work easier. + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates); + + //! Sets a vertex shader constant. + virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + + //! Sets a pixel shader constant. + virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + + //! Sets a constant for the vertex shader based on a name. + virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count); + + //! Sets a constant for the pixel shader based on a name. + virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count); + + //! Returns a pointer to the IVideoDriver interface. (Implementation for + //! IMaterialRendererServices) + virtual IVideoDriver* getVideoDriver(); + + //! Creates a render target texture. + virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! Clears the ZBuffer. + virtual void clearZBuffer(); + + //! Returns an image created from the last rendered frame. + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER); + + //! Set/unset a clipping plane. + //! There are at least 6 clipping planes available for the user to set at will. + //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. + //! \param plane: The plane itself. + //! \param enable: If true, enable the clipping plane else disable it. + virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false); + + //! Enable/disable a clipping plane. + //! There are at least 6 clipping planes available for the user to set at will. + //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. + //! \param enable: If true, enable the clipping plane else disable it. + virtual void enableClipPlane(u32 index, bool enable); + + //! Returns the maximum texture size supported. + virtual core::dimension2du getMaxTextureSize() const; + + virtual bool checkDriverReset() {return DriverWasReset;} + private: + + // enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates. + enum E_RENDER_MODE + { + ERM_NONE = 0, // no render state has been set yet. + ERM_2D, // 2d drawing rendermode + ERM_3D, // 3d rendering mode + ERM_STENCIL_FILL, // stencil fill mode + ERM_SHADOW_VOLUME_ZFAIL, // stencil volume draw mode + ERM_SHADOW_VOLUME_ZPASS // stencil volume draw mode + }; + + //! sets right vertex shader + void setVertexShader(video::E_VERTEX_TYPE newType); + + //! sets the needed renderstates + bool setRenderStates3DMode(); + + //! sets the needed renderstates + void setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel); + + //! sets the needed renderstates + void setRenderStatesStencilFillMode(bool alpha); + + //! sets the needed renderstates + void setRenderStatesStencilShadowMode(bool zfail, u32 debugDataVisible); + + //! sets the current Texture + bool setActiveTexture(u32 stage, const video::ITexture* texture); + + //! resets the device + bool reset(); + + //! returns a device dependent texture from a software surface (IImage) + //! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES + virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData=0); + + // returns the current size of the screen or rendertarget + virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const; + + //! Adds a new material renderer to the VideoDriver, using pixel and/or + //! vertex shaders to render geometry. + s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, s32 userData); + + void createMaterialRenderers(); + + void draw2D3DVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType, bool is3D); + + D3DTEXTUREADDRESS getTextureWrapMode(const u8 clamp); + + inline D3DCOLORVALUE colorToD3D(const SColor& col) + { + const f32 f = 1.0f / 255.0f; + D3DCOLORVALUE v; + v.r = col.getRed() * f; + v.g = col.getGreen() * f; + v.b = col.getBlue() * f; + v.a = col.getAlpha() * f; + return v; + } + + E_RENDER_MODE CurrentRenderMode; + D3DPRESENT_PARAMETERS present; + + SMaterial Material, LastMaterial; + bool ResetRenderStates; // bool to make all renderstates be reseted if set. + bool Transformation3DChanged; + const ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES]; + core::matrix4 Matrices[ETS_COUNT]; // matrices of the 3d mode we need to restore when we switch back from the 2d mode. + + HINSTANCE D3DLibrary; + IDirect3D8* pID3D; + IDirect3DDevice8* pID3DDevice; + + IDirect3DSurface8* PrevRenderTarget; + core::dimension2d<u32> CurrentRendertargetSize; + + HWND WindowId; + core::rect<s32>* SceneSourceRect; + + D3DCAPS8 Caps; + + E_VERTEX_TYPE LastVertexType; + + D3DMATRIX UnitMatrix; + + u32 MaxTextureUnits; + u32 MaxUserClipPlanes; + f32 MaxLightDistance; + s32 LastSetLight; + bool DeviceLost; + bool DriverWasReset; + + SColorf AmbientLight; + + SIrrlichtCreationParameters Params; + }; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + +#endif // __C_VIDEO_DIRECTX_8_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8MaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8MaterialRenderer.h new file mode 100644 index 0000000..5eb883c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8MaterialRenderer.h @@ -0,0 +1,581 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D8_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D8_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_API_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ +#include <d3d8.h> + +#include "IMaterialRenderer.h" + +namespace irr +{ +namespace video +{ + +namespace +{ +D3DMATRIX UnitMatrixD3D8; +D3DMATRIX SphereMapMatrixD3D8; +inline void setTextureColorStage(IDirect3DDevice8* dev, DWORD i, + DWORD arg1, DWORD op, DWORD arg2) +{ + dev->SetTextureStageState(i, D3DTSS_COLOROP, op); + dev->SetTextureStageState(i, D3DTSS_COLORARG1, arg1); + dev->SetTextureStageState(i, D3DTSS_COLORARG2, arg2); +} +inline void setTextureColorStage(IDirect3DDevice8* dev, DWORD i, DWORD arg1) +{ + dev->SetTextureStageState(i, D3DTSS_COLOROP, D3DTOP_SELECTARG1); + dev->SetTextureStageState(i, D3DTSS_COLORARG1, arg1); +} + +inline void setTextureAlphaStage(IDirect3DDevice8* dev, DWORD i, + DWORD arg1, DWORD op, DWORD arg2) +{ + dev->SetTextureStageState(i, D3DTSS_ALPHAOP, op); + dev->SetTextureStageState(i, D3DTSS_ALPHAARG1, arg1); + dev->SetTextureStageState(i, D3DTSS_ALPHAARG2, arg2); +} +inline void setTextureAlphaStage(IDirect3DDevice8* dev, DWORD i, DWORD arg1) +{ + dev->SetTextureStageState(i, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + dev->SetTextureStageState(i, D3DTSS_ALPHAARG1, arg1); +} +} // anonymous namespace + +//! Base class for all internal D3D8 material renderers +class CD3D8MaterialRenderer : public IMaterialRenderer +{ +public: + + //! Constructor + CD3D8MaterialRenderer(IDirect3DDevice8* d3ddev, video::IVideoDriver* driver) + : pID3DDevice(d3ddev), Driver(driver) + { + } + +protected: + + IDirect3DDevice8* pID3DDevice; + video::IVideoDriver* Driver; +}; + + +//! Solid material renderer +class CD3D8MaterialRenderer_SOLID : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_SOLID(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + } + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } +}; + +//! Generic Texture Blend +class CD3D8MaterialRenderer_ONETEXTURE_BLEND : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_ONETEXTURE_BLEND(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || + material.MaterialTypeParam != lastMaterial.MaterialTypeParam || + resetAllRenderstates) + { + + E_BLEND_FACTOR srcFact,dstFact; + E_MODULATE_FUNC modulate; + u32 alphaSource; + unpack_textureBlendFunc ( srcFact, dstFact, modulate, alphaSource, material.MaterialTypeParam ); + + if (srcFact == EBF_SRC_COLOR && dstFact == EBF_ZERO) + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + else + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, getD3DBlend ( srcFact ) ); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, getD3DBlend ( dstFact ) ); + } + + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, getD3DModulate(modulate), D3DTA_DIFFUSE); + + if ( alphaSource && (textureBlendFunc_hasAlpha ( srcFact ) || textureBlendFunc_hasAlpha ( dstFact ) )) + { + if (alphaSource==EAS_VERTEX_COLOR) + { + setTextureAlphaStage(pID3DDevice, 0, D3DTA_DIFFUSE); + } + else if (alphaSource==EAS_TEXTURE) + { + setTextureAlphaStage(pID3DDevice, 0, D3DTA_TEXTURE); + } + else + { + setTextureAlphaStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + } + } + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + + } + } + + //! Returns if the material is transparent. + /** The scene management needs to know this for being able to sort the + materials by opaque and transparent. + The return value could be optimized, but we'd need to know the + MaterialTypeParam for it. */ + virtual bool isTransparent() const + { + return true; + } + + private: + + u32 getD3DBlend ( E_BLEND_FACTOR factor ) const + { + u32 r = 0; + switch ( factor ) + { + case EBF_ZERO: r = D3DBLEND_ZERO; break; + case EBF_ONE: r = D3DBLEND_ONE; break; + case EBF_DST_COLOR: r = D3DBLEND_DESTCOLOR; break; + case EBF_ONE_MINUS_DST_COLOR: r = D3DBLEND_INVDESTCOLOR; break; + case EBF_SRC_COLOR: r = D3DBLEND_SRCCOLOR; break; + case EBF_ONE_MINUS_SRC_COLOR: r = D3DBLEND_INVSRCCOLOR; break; + case EBF_SRC_ALPHA: r = D3DBLEND_SRCALPHA; break; + case EBF_ONE_MINUS_SRC_ALPHA: r = D3DBLEND_INVSRCALPHA; break; + case EBF_DST_ALPHA: r = D3DBLEND_DESTALPHA; break; + case EBF_ONE_MINUS_DST_ALPHA: r = D3DBLEND_INVDESTALPHA; break; + case EBF_SRC_ALPHA_SATURATE: r = D3DBLEND_SRCALPHASAT; break; + } + return r; + } + + u32 getD3DModulate ( E_MODULATE_FUNC func ) const + { + u32 r = D3DTOP_MODULATE; + switch ( func ) + { + case EMFN_MODULATE_1X: r = D3DTOP_MODULATE; break; + case EMFN_MODULATE_2X: r = D3DTOP_MODULATE2X; break; + case EMFN_MODULATE_4X: r = D3DTOP_MODULATE4X; break; + } + return r; + } + +}; + + +//! Solid 2 layer material renderer +class CD3D8MaterialRenderer_SOLID_2_LAYER : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_SOLID_2_LAYER(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, D3DTA_TEXTURE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0); + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_BLENDDIFFUSEALPHA); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } +}; + + +//! Transparent add color material renderer +class CD3D8MaterialRenderer_TRANSPARENT_ADD_COLOR : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_TRANSPARENT_ADD_COLOR(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); + } + } + + //! Returns if the material is transparent. The scene management needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent vertex alpha material renderer +class CD3D8MaterialRenderer_TRANSPARENT_VERTEX_ALPHA : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_TRANSPARENT_VERTEX_ALPHA(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_DIFFUSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent alpha channel material renderer +class CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates + || material.MaterialTypeParam != lastMaterial.MaterialTypeParam ) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_TEXTURE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); + + pID3DDevice->SetRenderState(D3DRS_ALPHAREF, core::floor32(material.MaterialTypeParam * 255.f)); + pID3DDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent alpha channel material renderer +class CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_TEXTURE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + + // 127 is required by EMT_TRANSPARENT_ALPHA_CHANNEL_REF + pID3DDevice->SetRenderState(D3DRS_ALPHAREF, 127); + pID3DDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return false; // this material is not really transparent because it does no blending. + } +}; + + +//! material renderer for all kinds of lightmaps +class CD3D8MaterialRenderer_LIGHTMAP : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_LIGHTMAP(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (material.MaterialType >= EMT_LIGHTMAP_LIGHTING) + { + // with lighting + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + } + else + { + setTextureColorStage(pID3DDevice, 0, D3DTA_TEXTURE); + } + + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, + (material.MaterialType == EMT_LIGHTMAP_ADD)? + D3DTOP_ADD: + (material.MaterialType == EMT_LIGHTMAP_M4 || material.MaterialType == EMT_LIGHTMAP_LIGHTING_M4)? + D3DTOP_MODULATE4X: + (material.MaterialType == EMT_LIGHTMAP_M2 || material.MaterialType == EMT_LIGHTMAP_LIGHTING_M2)? + D3DTOP_MODULATE2X: + D3DTOP_MODULATE, + D3DTA_CURRENT); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } +}; + + +//! material renderer for detail maps +class CD3D8MaterialRenderer_DETAIL_MAP : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_DETAIL_MAP(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, D3DTOP_ADDSIGNED, D3DTA_CURRENT); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } +}; + + +//! sphere map material renderer +class CD3D8MaterialRenderer_SPHERE_MAP : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_SPHERE_MAP(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + + pID3DDevice->SetTransform( D3DTS_TEXTURE0, &SphereMapMatrixD3D8 ); + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACENORMAL ); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, 0); + pID3DDevice->SetTransform( D3DTS_TEXTURE0, &UnitMatrixD3D8 ); + } +}; + + +//! reflection 2 layer material renderer +class CD3D8MaterialRenderer_REFLECTION_2_LAYER : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_REFLECTION_2_LAYER(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + + pID3DDevice->SetTransform( D3DTS_TEXTURE1, &SphereMapMatrixD3D8 ); + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetTransform( D3DTS_TEXTURE1, &UnitMatrixD3D8 ); + } +}; + + +//! reflection 2 layer material renderer +class CD3D8MaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER : public CD3D8MaterialRenderer +{ +public: + + CD3D8MaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(IDirect3DDevice8* p, video::IVideoDriver* d) + : CD3D8MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_DIFFUSE); + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + setTextureAlphaStage(pID3DDevice, 1, D3DTA_CURRENT); + + pID3DDevice->SetTransform(D3DTS_TEXTURE1, &SphereMapMatrixD3D8 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetTransform(D3DTS_TEXTURE1, &UnitMatrixD3D8); + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.cpp new file mode 100644 index 0000000..c5e039d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.cpp @@ -0,0 +1,248 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + +#include "CD3D8NormalMapRenderer.h" +#include "IMaterialRendererServices.h" +#include "IVideoDriver.h" +#include "os.h" +#include "SLight.h" + +namespace irr +{ +namespace video +{ + + // 1.1 Shaders with two lights and vertex based attenuation + + // Irrlicht Engine D3D8 render path normal map vertex shader + const char D3D8_NORMAL_MAP_VSH[] = + ";Irrlicht Engine 0.8 D3D8 render path normal map vertex shader\n"\ + "; c0-3: Transposed world matrix \n"\ + "; c8-11: Transposed worldViewProj matrix (Projection * View * World) \n"\ + "; c12: Light01 position \n"\ + "; c13: x,y,z: Light01 color; .w: 1/LightRadius \n"\ + "; c14: Light02 position \n"\ + "; c15: x,y,z: Light02 color; .w: 1/LightRadius \n"\ + "\n"\ + "; v0 - position \n"\ + "; v1 - normal \n"\ + "; v2 - color \n"\ + "; v3 - texture coord \n"\ + "; v4 - tangent \n"\ + "; v5 - binormal \n"\ + "\n"\ + "vs.1.1\n"\ + "\n"\ + "m4x4 oPos, v0, c8 ; transform position to clip space with worldViewProj matrix\n"\ + "\n"\ + "m3x3 r5, v4, c0 ; transform tangent U\n"\ + "m3x3 r7, v1, c0 ; transform normal W\n"\ + "m3x3 r6, v5, c0 ; transform binormal V\n"\ + "\n"\ + "m4x4 r4, v0, c0 ; vertex into world position\n"\ + "add r2, c12, -r4 ; vtxpos - lightpos1\n"\ + "add r3, c14, -r4 ; vtxpos - lightpos2\n"\ + "\n"\ + "dp3 r8.x, r5, r2 ; transform the light vector 1 with U, V, W\n"\ + "dp3 r8.y, r6, r2 \n"\ + "dp3 r8.z, r7, r2 \n"\ + "dp3 r9.x, r5, r3 ; transform the light vector 2 with U, V, W\n"\ + "dp3 r9.y, r6, r3 \n"\ + "dp3 r9.z, r7, r3 \n"\ + "\n"\ + "dp3 r8.w, r8, r8 ; normalize light vector 1 (r8)\n"\ + "rsq r8.w, r8.w \n"\ + "mul r8, r8, r8.w \n"\ + "dp3 r9.w, r9, r9 ; normalize light vector 2 (r9)\n"\ + "rsq r9.w, r9.w \n"\ + "mul r9, r9, r9.w \n"\ + "\n"\ + "mad oT2.xyz, r8.xyz, c95, c95 ; move light vector 1 from -1..1 into 0..1 \n"\ + "mad oT3.xyz, r9.xyz, c95, c95 ; move light vector 2 from -1..1 into 0..1 \n"\ + "\n"\ + " ; calculate attenuation of light 1 \n"\ + "dp3 r2.x, r2.xyz, r2.xyz ; r2.x = r2.x + r2.y + r2.z \n"\ + "mul r2.x, r2.x, c13.w ; r2.x * attenutation \n"\ + "rsq r2, r2.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD0, r2, c13 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + " ; calculate attenuation of light 2 \n"\ + "dp3 r3.x, r3.xyz, r3.xyz ; r3.x = r3.x + r3.y + r3.z \n"\ + "mul r3.x, r3.x, c15.w ; r2.x * attenutation \n"\ + "rsq r3, r3.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD1, r3, c15 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "mov oT0.xy, v3.xy ; move out texture coordinates 1\n"\ + "mov oT1.xy, v3.xy ; move out texture coordinates 2\n"\ + "mov oD0.a, v2.a ; move out original alpha value \n"\ + "\n"; + + // Irrlicht Engine D3D8 render path normal map pixel shader + const char D3D8_NORMAL_MAP_PSH[] = + ";Irrlicht Engine 0.8 D3D8 render path normal map pixel shader\n"\ + ";Input: \n"\ + ";t0: color map texture coord \n"\ + ";t1: normal map texture coords \n"\ + ";t2: light 1 vector in tangent space \n"\ + ";v0: light 1 color \n"\ + ";t3: light 2 vector in tangent space \n"\ + ";v1: light 2 color \n"\ + ";v0.a: vertex alpha value \n"\ + "ps.1.1 \n"\ + "tex t0 ; sample color map \n"\ + "tex t1 ; sample normal map\n"\ + "texcoord t2 ; fetch light vector 1\n"\ + "texcoord t3 ; fetch light vector 2\n"\ + "\n"\ + "dp3_sat r0, t1_bx2, t2_bx2 ; normal dot light 1 (_bx2 because moved into 0..1)\n"\ + "mul r0, r0, v0 ; luminance1 * light color 1 \n"\ + "\n"\ + "dp3_sat r1, t1_bx2, t3_bx2 ; normal dot light 2 (_bx2 because moved into 0..1)\n"\ + "mad r0, r1, v1, r0 ; (luminance2 * light color 2) + luminance 1 \n"\ + "\n"\ + "mul r0, t0, r0 ; total luminance * base color\n"\ + "mov r0.a, v0.a ; write interpolated vertex alpha value \n"\ + "\n"\ + ""; + + CD3D8NormalMapRenderer::CD3D8NormalMapRenderer( + IDirect3DDevice8* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial) + : CD3D8ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial), + CompiledShaders(true) + { + + #ifdef _DEBUG + setDebugName("CD3D8NormalMapRenderer"); + #endif + + // set this as callback. We could have done this in + // the initialization list, but some compilers don't like it. + + CallBack = this; + + // basicly, this thing simply compiles these hardcoded shaders if the + // hardware is able to do them, otherwise it maps to the base material + + if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) || + !driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + { + // this hardware is not able to do shaders. Fall back to + // base material. + outMaterialTypeNr = driver->addMaterialRenderer(this); + return; + } + + // check if already compiled normal map shaders are there. + + video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_NORMAL_MAP_SOLID); + if (renderer) + { + // use the already compiled shaders + video::CD3D8NormalMapRenderer* nmr = (video::CD3D8NormalMapRenderer*)renderer; + CompiledShaders = false; + + VertexShader = nmr->VertexShader; + PixelShader = nmr->PixelShader; + + outMaterialTypeNr = driver->addMaterialRenderer(this); + } + else + { + // compile shaders on our own + init(outMaterialTypeNr, D3D8_NORMAL_MAP_VSH, D3D8_NORMAL_MAP_PSH, EVT_TANGENTS); + } + // something failed, use base material + if (-1==outMaterialTypeNr) + driver->addMaterialRenderer(this); + } + + + CD3D8NormalMapRenderer::~CD3D8NormalMapRenderer() + { + if (CallBack == this) + CallBack = 0; + + if (!CompiledShaders) + { + // prevent this from deleting shaders we did not create + VertexShader = 0; + PixelShader = 0; + } + } + + + bool CD3D8NormalMapRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) + { + if (vtxtype != video::EVT_TANGENTS) + { + os::Printer::log("Error: Normal map renderer only supports vertices of type EVT_TANGENTS", ELL_ERROR); + return false; + } + + return CD3D8ShaderMaterialRenderer::OnRender(service, vtxtype); + } + + //! Returns the render capability of the material. + s32 CD3D8NormalMapRenderer::getRenderCapability() const + { + if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) && + Driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + return 0; + + return 1; + } + + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + void CD3D8NormalMapRenderer::OnSetConstants(IMaterialRendererServices* services, s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + // set transposed world matrix + services->setVertexShaderConstant(driver->getTransform(video::ETS_WORLD).getTransposed().pointer(), 0, 4); + + // set transposed worldViewProj matrix + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + services->setVertexShaderConstant(worldViewProj.getTransposed().pointer(), 8, 4); + + // here we've got to fetch the fixed function lights from the + // driver and set them as constants + + u32 cnt = driver->getDynamicLightCount(); + + for (u32 i=0; i<2; ++i) + { + SLight light; + + if (i<cnt) + light = driver->getDynamicLight(i); + else + { + light.DiffuseColor.set(0,0,0); // make light dark + light.Radius = 1.0f; + } + + light.DiffuseColor.a = 1.0f/(light.Radius*light.Radius); // set attenuation + + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.Position), 12+(i*2), 1); + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.DiffuseColor), 13+(i*2), 1); + } + + f32 c95[] = {0.5f, 0.5f, 0.5f, 0.5f}; + services->setVertexShaderConstant(c95, 95, 1); + } + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.h new file mode 100644 index 0000000..e53ab65 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8NormalMapRenderer.h @@ -0,0 +1,56 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D8_NORMAL_MAPMATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D8_NORMAL_MAPMATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_API_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ +#include <d3d8.h> + +#include "CD3D8ShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" + +namespace irr +{ +namespace video +{ + +//! Renderer for normal maps +class CD3D8NormalMapRenderer : public CD3D8ShaderMaterialRenderer, IShaderConstantSetCallBack +{ +public: + + CD3D8NormalMapRenderer( + IDirect3DDevice8* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial); + ~CD3D8NormalMapRenderer(); + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData); + + bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + //! Returns the render capability of the material. + virtual s32 getRenderCapability() const; + +private: + + //! stores if this shader compiled the shaders and is + //! allowed to delete them again. D3D8 lacks reference counting + //! support for shaders. + bool CompiledShaders; + +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp new file mode 100644 index 0000000..ca30966 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp @@ -0,0 +1,318 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + +#include "CD3D8ParallaxMapRenderer.h" +#include "IMaterialRendererServices.h" +#include "IVideoDriver.h" +#include "os.h" +#include "SLight.h" + +namespace irr +{ +namespace video +{ + // 1.1/1.4 Shaders with two lights and vertex based attenuation + + // Irrlicht Engine D3D8 render path normal map vertex shader + const char D3D8_PARALLAX_MAP_VSH[] = + ";Irrlicht Engine 0.10 D3D8 render path parallax mapping vertex shader\n"\ + "; c0-3: Transposed world matrix \n"\ + "; c4: Eye position \n"\ + "; c8-11: Transposed worldViewProj matrix (Projection * View * World) \n"\ + "; c12: Light01 position \n"\ + "; c13: x,y,z: Light01 color; .w: 1/LightRadius \n"\ + "; c14: Light02 position \n"\ + "; c15: x,y,z: Light02 color; .w: 1/LightRadius \n"\ + "vs.1.1\n"\ + "; v0 ; position \n"\ + "; v1 ; normal \n"\ + "; v2 ; color \n"\ + "; v3 ; texture coord \n"\ + "; v4 ; tangent \n"\ + "; v5 ; binormal \n"\ + "\n"\ + "def c95, 0.5, 0.5, 0.5, 0.5 ; used for moving light vector to ps \n"\ + "def c96, -1, 1, 1, 1 ; somewhere I've got a bug. flipping the vectors with this fixes it. \n"\ + "\n"\ + "m4x4 oPos, v0, c8 ; transform position to clip space with worldViewProj matrix\n"\ + "\n"\ + "m3x3 r5, v4, c0 ; transform tangent U\n"\ + "m3x3 r7, v1, c0 ; transform normal W\n"\ + "m3x3 r6, v5, c0 ; transform binormal V\n"\ + "\n"\ + "m4x4 r4, v0, c0 ; vertex into world position\n"\ + "add r2, c12, -r4 ; vtxpos - light1 pos\n"\ + "add r3, c14, -r4 ; vtxpos - light2 pos\n"\ + "add r1, -c4, r4 ; eye - vtxpos \n"\ + "\n"\ + "dp3 r8.x, r5, r2 ; transform the light1 vector with U, V, W\n"\ + "dp3 r8.y, r6, r2 \n"\ + "dp3 r8.z, r7, r2 \n"\ + "dp3 r9.x, r5, r3 ; transform the light2 vector with U, V, W\n"\ + "dp3 r9.y, r6, r3 \n"\ + "dp3 r9.z, r7, r3 \n"\ + "dp3 r10.x, r5, r1 ; transform the eye vector with U, V, W\n"\ + "dp3 r10.y, r6, r1 \n"\ + "dp3 r10.z, r7, r1 \n"\ + "\n"\ + "dp3 r8.w, r8, r8 ; normalize light vector 1 (r8)\n"\ + "rsq r8.w, r8.w \n"\ + "mul r8, r8, r8.w \n"\ + ";mul r8, r8, c96 \n"\ + "dp3 r9.w, r9, r9 ; normalize light vector 2 (r9)\n"\ + "rsq r9.w, r9.w \n"\ + "mul r9, r9, r9.w \n"\ + ";mul r9, r9, c96 \n"\ + "dp3 r10.w, r10, r10 ; normalize eye vector (r10)\n"\ + "rsq r10.w, r10.w \n"\ + "mul r10, r10, r10.w \n"\ + "mul r10, r10, c96 \n"\ + "\n"\ + "\n"\ + "mad oT2.xyz, r8.xyz, c95, c95 ; move light vector 1 from -1..1 into 0..1 \n"\ + "mad oT3.xyz, r9.xyz, c95, c95 ; move light vector 2 from -1..1 into 0..1 \n"\ + "mad oT4.xyz, r10.xyz, c95, c95 ; move eye vector from -1..1 into 0..1 \n"\ + "\n"\ + " ; calculate attenuation of light 1 \n"\ + "dp3 r2.x, r2.xyz, r2.xyz ; r2.x = r2.x + r2.y + r2.z \n"\ + "mul r2.x, r2.x, c13.w ; r2.x * attenutation \n"\ + "rsq r2, r2.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD0, r2, c13 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + " ; calculate attenuation of light 2 \n"\ + "dp3 r3.x, r3.xyz, r3.xyz ; r3.x = r3.x + r3.y + r3.z \n"\ + "mul r3.x, r3.x, c15.w ; r2.x * attenutation \n"\ + "rsq r3, r3.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD1, r3, c15 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "mov oT0.xy, v3.xy ; move out texture coordinates 1\n"\ + "mov oT1.xy, v3.xy ; move out texture coordinates 2\n"\ + "mov oD0.a, v2.a ; move out original alpha value \n"\ + "\n"; + + + // Irrlicht Engine D3D8 render path normal map pixel shader version 1.4 + const char D3D8_PARALLAX_MAP_PSH[] = + ";Irrlicht Engine 0.10 D3D8 render path parallax mapping pixel shader \n"\ + ";Input: \n"\ + ";t0: color map texture coord \n"\ + ";t1: normal map texture coords \n"\ + ";t2: light 1 vector in tangent space \n"\ + ";t4: eye vector in tangent space \n"\ + ";v0: light 1 color \n"\ + ";t3: light 2 vector in tangent space \n"\ + ";v1: light 2 color \n"\ + ";v0.a: vertex alpha value \n"\ + " \n"\ + "ps.1.4 \n"\ + " \n"\ + ";def c6, 0.02f, 0.02f, 0.02f, 0.0f ; scale factor, now set in callback \n"\ + " \n"\ + "texld r1, t1 ; sample (normal.x, normal.y, normal.z, height) \n"\ + "texcrd r4.xyz, t4 ; fetch eye vector \n"\ + "texcrd r0.xyz, t0 ; color map \n"\ + " \n"\ + "; original parallax mapping: \n"\ + ";mul r3, r1_bx2.wwww, c6; ; r3 = (height, height, height) * scale \n"\ + ";mad r2.xyz, r3, r4_bx2, r0 ; newTexCoord = height * eye + oldTexCoord \n"\ + " \n"\ + "; modified parallax mapping to reduce swimming effect: \n"\ + "mul r3, r1_bx2.wwww, r1_bx2.zzzz ; (nh,nh,nh,nh) = (h,h,h,h) * (n.z,n.z,n.z,n.z,) \n"\ + "mul r3, r3, c6; ; r3 = (nh, nh, nh) * scale \n"\ + "mad r2.xyz, r3, r4_bx2, r0 ; newTexCoord = height * eye + oldTexCoord \n"\ + " \n"\ + "phase \n"\ + " \n"\ + "texld r0, r2 ; load diffuse texture with new tex coord \n"\ + "texld r1, r2 ; sample normal map \n"\ + "texcrd r2.xyz, t2 ; fetch light vector 1 \n"\ + "texcrd r3.xyz, t3 ; fetch light vector 2 \n"\ + " \n"\ + "dp3_sat r2, r1_bx2, r2_bx2 ; normal dot light 1 (_bx2 because moved into 0..1) \n"\ + "mul r2, r2, v0 ; luminance1 * light color 1 \n"\ + " \n"\ + "dp3_sat r3, r1_bx2, r3_bx2 ; normal dot light 2 (_bx2 because moved into 0..1) \n"\ + "mad r3, r3, v1, r2 ; (luminance2 * light color 2) + luminance1 \n"\ + " \n"\ + "mul r0.xyz, r0, r3 ; total luminance * base color \n"\ + "+mov r0.a, v0.a ; write original alpha value \n"\ + "\n"; + + + CD3D8ParallaxMapRenderer::CD3D8ParallaxMapRenderer( + IDirect3DDevice8* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial) + : CD3D8ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial), + CompiledShaders(true), CurrentScale(0.0f) + { + + #ifdef _DEBUG + setDebugName("CD3D8ParallaxMapRenderer"); + #endif + + // set this as callback. We could have done this in + // the initialization list, but some compilers don't like it. + + CallBack = this; + + // basicly, this thing simply compiles these hardcoded shaders if the + // hardware is able to do them, otherwise it maps to the base material + + if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_4) || + !driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + { + // this hardware is not able to do shaders. Fall back to + // base material. + outMaterialTypeNr = driver->addMaterialRenderer(this); + return; + } + + // check if already compiled parallax map shaders are there. + + video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_PARALLAX_MAP_SOLID); + if (renderer) + { + // use the already compiled shaders + video::CD3D8ParallaxMapRenderer* nmr = (video::CD3D8ParallaxMapRenderer*)renderer; + CompiledShaders = false; + + VertexShader = nmr->VertexShader; + PixelShader = nmr->PixelShader; + + outMaterialTypeNr = driver->addMaterialRenderer(this); + } + else + { + // compile shaders on our own + init(outMaterialTypeNr, D3D8_PARALLAX_MAP_VSH, D3D8_PARALLAX_MAP_PSH, EVT_TANGENTS); + } + // something failed, use base material + if (-1==outMaterialTypeNr) + driver->addMaterialRenderer(this); + } + + + CD3D8ParallaxMapRenderer::~CD3D8ParallaxMapRenderer() + { + if (CallBack == this) + CallBack = 0; + + if (!CompiledShaders) + { + // prevent this from deleting shaders we did not create + VertexShader = 0; + PixelShader = 0; + } + } + + + bool CD3D8ParallaxMapRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) + { + if (vtxtype != video::EVT_TANGENTS) + { + os::Printer::log("Error: Normal map renderer only supports vertices of type EVT_TANGENTS", ELL_ERROR); + return false; + } + + return CD3D8ShaderMaterialRenderer::OnRender(service, vtxtype); + } + + + void CD3D8ParallaxMapRenderer::OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services) + { + CD3D8ShaderMaterialRenderer::OnSetMaterial(material, lastMaterial, + resetAllRenderstates, services); + + CurrentScale = material.MaterialTypeParam; + } + + + //! Returns the render capability of the material. + s32 CD3D8ParallaxMapRenderer::getRenderCapability() const + { + if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_4) && + Driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + return 0; + + return 1; + } + + + //! Called by the engine when the vertex and/or pixel shader constants + //! for an material renderer should be set. + void CD3D8ParallaxMapRenderer::OnSetConstants(IMaterialRendererServices* services, s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + // set transposed world matrix + services->setVertexShaderConstant(driver->getTransform(video::ETS_WORLD).getTransposed().pointer(), 0, 4); + + // set eye position + + // The viewpoint is at (0., 0., 0.) in eye space. + // Turning this into a vector [0 0 0 1] and multiply it by + // the inverse of the view matrix, the resulting vector is the + // object space location of the camera. + + f32 floats[4] = {0,0,0,1}; + core::matrix4 minv(driver->getTransform(video::ETS_VIEW)); + minv.makeInverse(); + minv.multiplyWith1x4Matrix(floats); + services->setVertexShaderConstant(floats, 4, 1); + + // set transposed worldViewProj matrix + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + services->setVertexShaderConstant(worldViewProj.getTransposed().pointer(), 8, 4); + + // here we've got to fetch the fixed function lights from the driver + // and set them as constants + + const u32 cnt = driver->getDynamicLightCount(); + + for (u32 i=0; i<2; ++i) + { + SLight light; + + if (i<cnt) + light = driver->getDynamicLight(i); + else + { + light.DiffuseColor.set(0,0,0); // make light dark + light.Radius = 1.0f; + } + + light.DiffuseColor.a = 1.0f/(light.Radius*light.Radius); // set attenuation + + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.Position), 12+(i*2), 1); + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.DiffuseColor), 13+(i*2), 1); + } + + // this is not really necessary in d3d9 (used a def instruction), but to be sure: + f32 c95[] = {0.5f, 0.5f, 0.5f, 0.5f}; + services->setVertexShaderConstant(c95, 95, 1); + f32 c96[] = {-1, 1, 1, 1}; + services->setVertexShaderConstant(c96, 96, 1); + + // set scale factor + f32 factor = 0.02f; // default value + if (CurrentScale != 0) + factor = CurrentScale; + + f32 c6[] = {factor, factor, factor, 0}; + services->setPixelShaderConstant(c6, 6, 1); + } + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.h new file mode 100644 index 0000000..4543ab7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ParallaxMapRenderer.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D8_PARALLAX_MAPMATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D8_PARALLAX_MAPMATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_API_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ +#include <d3d8.h> + +#include "CD3D8ShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" + +namespace irr +{ +namespace video +{ + +//! Renderer for parallax maps +class CD3D8ParallaxMapRenderer : public CD3D8ShaderMaterialRenderer, IShaderConstantSetCallBack +{ +public: + + CD3D8ParallaxMapRenderer( + IDirect3DDevice8* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial); + ~CD3D8ParallaxMapRenderer(); + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + virtual void OnSetMaterial(const SMaterial& material) { } + virtual void OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services); + + //! Returns the render capability of the material. + virtual s32 getRenderCapability() const; + +private: + + //! stores if this shader compiled the shaders and is + //! allowed to delete them again. D3D8 lacks reference counting + //! support for shaders. + bool CompiledShaders; + + f32 CurrentScale; +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp new file mode 100644 index 0000000..f46d583 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp @@ -0,0 +1,332 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CD3D8ShaderMaterialRenderer.h" + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ +#include <d3d8.h> +#include <d3dx8core.h> +#pragma comment (lib, "d3dx8.lib") + +#include "IShaderConstantSetCallBack.h" +#include "IMaterialRendererServices.h" +#include "IVideoDriver.h" +#include "os.h" + +#ifndef _IRR_D3D_NO_SHADER_DEBUGGING +#include <stdio.h> +#endif + +namespace irr +{ +namespace video +{ + +//! Public constructor +CD3D8ShaderMaterialRenderer::CD3D8ShaderMaterialRenderer(IDirect3DDevice8* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData) +: pID3DDevice(d3ddev), Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + VertexShader(0), OldVertexShader(0), PixelShader(0), UserData(userData) +{ + + #ifdef _DEBUG + setDebugName("CD3D8ShaderMaterialRenderer"); + #endif + + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); + + init(outMaterialTypeNr, vertexShaderProgram, pixelShaderProgram, EVT_STANDARD); +} + +//! constructor only for use by derived classes who want to +//! create a fall back material for example. +CD3D8ShaderMaterialRenderer::CD3D8ShaderMaterialRenderer(IDirect3DDevice8* d3ddev, + video::IVideoDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, + s32 userData) +: pID3DDevice(d3ddev), Driver(driver), BaseMaterial(baseMaterial), CallBack(callback), + VertexShader(0), PixelShader(0), UserData(userData) +{ + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); +} + + + +//! Destructor +CD3D8ShaderMaterialRenderer::~CD3D8ShaderMaterialRenderer() +{ + if (CallBack) + CallBack->drop(); + + if (VertexShader) + pID3DDevice->DeleteVertexShader(VertexShader); + + if (PixelShader) + pID3DDevice->DeletePixelShader(PixelShader); + + if (BaseMaterial) + BaseMaterial->drop (); +} + + +void CD3D8ShaderMaterialRenderer::init(s32& outMaterialTypeNr, const c8* vertexShaderProgram, + const c8* pixelShaderProgram, E_VERTEX_TYPE type) +{ + outMaterialTypeNr = -1; + + // create vertex shader + if (!createVertexShader(vertexShaderProgram, type)) + return; + + // create pixel shader + if (!createPixelShader(pixelShaderProgram)) + return; + + // register myself as new material + outMaterialTypeNr = Driver->addMaterialRenderer(this); +} + + +bool CD3D8ShaderMaterialRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) +{ + // call callback to set shader constants + if (CallBack && (VertexShader || PixelShader)) + CallBack->OnSetConstants(service, UserData); + + return true; +} + + +void CD3D8ShaderMaterialRenderer::OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services) +{ + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (VertexShader) + { + // We do not need to save and reset the old vertex shader, because + // in D3D8, this is mixed up with the fvf, and this is set by the driver + // every time. + //pID3DDevice->GetVertexShader(&OldVertexShader); + + // set new vertex shader + if (FAILED(pID3DDevice->SetVertexShader(VertexShader))) + os::Printer::log("Could not set vertex shader.", ELL_ERROR); + } + + // set new pixel shader + if (PixelShader) + { + if (FAILED(pID3DDevice->SetPixelShader(PixelShader))) + os::Printer::log("Could not set pixel shader.", ELL_ERROR); + } + + if (BaseMaterial) + BaseMaterial->OnSetMaterial(material, material, true, services); + } + + //let callback know used material + if (CallBack) + CallBack->OnSetMaterial(material); + + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + +void CD3D8ShaderMaterialRenderer::OnUnsetMaterial() +{ + // We do not need to save and reset the old vertex shader, because + // in D3D8, this is mixed up with the fvf, and this is set by the driver + // every time. + // if (VertexShader) + // pID3DDevice->SetVertexShader(OldVertexShader); + + if (PixelShader) + pID3DDevice->SetPixelShader(0); + + if (BaseMaterial) + BaseMaterial->OnUnsetMaterial(); +} + + +//! Returns if the material is transparent. The scene managment needs to know this +//! for being able to sort the materials by opaque and transparent. +bool CD3D8ShaderMaterialRenderer::isTransparent() const +{ + return BaseMaterial ? BaseMaterial->isTransparent() : false; +} + +bool CD3D8ShaderMaterialRenderer::createPixelShader(const c8* pxsh) +{ + if (!pxsh) + return true; + +#if defined( _IRR_XBOX_PLATFORM_) + return false; +#else + // compile shader + + LPD3DXBUFFER code = 0; + LPD3DXBUFFER errors = 0; + + #ifdef _IRR_D3D_NO_SHADER_DEBUGGING + + // compile shader without debug info + D3DXAssembleShader(pxsh, (UINT)strlen(pxsh), 0, 0, &code, &errors); + + #else + + // compile shader and emitt some debug informations to + // make it possible to debug the shader in visual studio + + static int irr_dbg_file_nr = 0; + ++irr_dbg_file_nr; + char tmp[32]; + sprintf(tmp, "irr_d3d8_dbg_shader_%d.psh", irr_dbg_file_nr); + + FILE* f = fopen(tmp, "wb"); + fwrite(pxsh, strlen(pxsh), 1, f); + fflush(f); + fclose(f); + + D3DXAssembleShaderFromFile(tmp, D3DXASM_DEBUG, 0, &code, &errors); + #endif + if (errors) + { + // print out compilation errors. + os::Printer::log("Pixel shader compilation failed:", ELL_ERROR); + os::Printer::log((c8*)errors->GetBufferPointer(), ELL_ERROR); + + if (code) + code->Release(); + + errors->Release(); + return false; + } + + if (FAILED(pID3DDevice->CreatePixelShader((DWORD*)code->GetBufferPointer(), &PixelShader))) + { + os::Printer::log("Could not create pixel shader.", ELL_ERROR); + code->Release(); + return false; + } + + code->Release(); + return true; +#endif + +} + + + +bool CD3D8ShaderMaterialRenderer::createVertexShader(const char* vtxsh, E_VERTEX_TYPE type) +{ + if (!vtxsh) + return true; + + // compile shader +#if defined( _IRR_XBOX_PLATFORM_) + return false; +#else + + LPD3DXBUFFER code = 0; + LPD3DXBUFFER errors = 0; + + #ifdef _IRR_D3D_NO_SHADER_DEBUGGING + + // compile shader without debug info + D3DXAssembleShader(vtxsh, (UINT)strlen(vtxsh), 0, 0, &code, &errors); + + #else + + // compile shader and emitt some debug informations to + // make it possible to debug the shader in visual studio + static int irr_dbg_file_nr = 0; + ++irr_dbg_file_nr; + char tmp[32]; + sprintf(tmp, "irr_d3d8_dbg_shader_%d.vsh", irr_dbg_file_nr); + + FILE* f = fopen(tmp, "wb"); + fwrite(vtxsh, strlen(vtxsh), 1, f); + fflush(f); + fclose(f); + + D3DXAssembleShaderFromFile(tmp, D3DXASM_DEBUG, 0, &code, &errors); + + #endif + + + if (errors) + { + // print out compilation errors. + os::Printer::log("Vertex shader compilation failed:", ELL_ERROR); + os::Printer::log((c8*)errors->GetBufferPointer(), ELL_ERROR); + + if (code) + code->Release(); + + errors->Release(); + return false; + } + + DWORD* decl = 0; + + DWORD dwStdDecl[] = + { + D3DVSD_STREAM(0), + D3DVSD_REG(0, D3DVSDT_FLOAT3), // position 0 + D3DVSD_REG(1, D3DVSDT_FLOAT3), // normal 1 + D3DVSD_REG(2, D3DVSDT_D3DCOLOR ),// color 2 + D3DVSD_REG(3, D3DVSDT_FLOAT2 ), // tex1 3 + D3DVSD_REG(4, D3DVSDT_FLOAT2 ), // tex2 4 + D3DVSD_END() + }; + + DWORD dwTngtDecl[] = + { + D3DVSD_STREAM(0), + D3DVSD_REG(0 , D3DVSDT_FLOAT3), // position 0 + D3DVSD_REG(1 , D3DVSDT_FLOAT3), // normal 1 + D3DVSD_REG(2 , D3DVSDT_D3DCOLOR ),// color 2 + D3DVSD_REG(3 , D3DVSDT_FLOAT2 ), // tex1 3 + D3DVSD_REG(4, D3DVSDT_FLOAT3 ), // tangent 4 + D3DVSD_REG(5, D3DVSDT_FLOAT3 ), // binormal 5 + D3DVSD_END() + }; + + if (type == EVT_TANGENTS) + decl = dwTngtDecl; + else + decl = dwStdDecl; + + if (FAILED(pID3DDevice->CreateVertexShader(decl, + (DWORD*)code->GetBufferPointer(), &VertexShader, 0))) + { + os::Printer::log("Could not create vertex shader.", ELL_ERROR); + code->Release(); + return false; + } + + code->Release(); + return true; +#endif +} + + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.h new file mode 100644 index 0000000..02156a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8ShaderMaterialRenderer.h @@ -0,0 +1,82 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D8_SHADER_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D8_SHADER_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_API_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ +#include <d3d8.h> +#include <d3dx8core.h> + +#include "IMaterialRenderer.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace video +{ + +class IVideoDriver; +class IShaderConstantSetCallBack; +class IMaterialRenderer; + +//! Class for using vertex and pixel shaders with D3D8 +class CD3D8ShaderMaterialRenderer : public IMaterialRenderer +{ +public: + + //! Public constructor + CD3D8ShaderMaterialRenderer(IDirect3DDevice8* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData); + + //! Destructor + ~CD3D8ShaderMaterialRenderer(); + + virtual void OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services); + + virtual void OnUnsetMaterial(); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + //! Returns if the material is transparent. + virtual bool isTransparent() const; + +protected: + + //! constructor only for use by derived classes who want to + //! create a fall back material for example. + CD3D8ShaderMaterialRenderer(IDirect3DDevice8* d3ddev, + video::IVideoDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, s32 userData=0); + + void init(s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + E_VERTEX_TYPE type); + bool createPixelShader(const c8* pxsh); + bool createVertexShader(const char* vtxsh, E_VERTEX_TYPE type); + + IDirect3DDevice8* pID3DDevice; + video::IVideoDriver* Driver; + IShaderConstantSetCallBack* CallBack; + IMaterialRenderer* BaseMaterial; + + DWORD VertexShader; + DWORD OldVertexShader; + DWORD PixelShader; + s32 UserData; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.cpp new file mode 100644 index 0000000..990efbe --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.cpp @@ -0,0 +1,659 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + +#define _IRR_DONT_DO_MEMORY_DEBUGGING_HERE +#include "CD3D8Texture.h" +#include "CD3D8Driver.h" +#include "os.h" + + +#ifndef _IRR_COMPILE_WITH_DIRECT3D_9_ +// The D3DXFilterTexture function seems to get linked wrong when +// compiling with both D3D8 and 9, causing it not to work in the D3D9 device. +// So mipmapgeneration is replaced with my own bad generation in d3d 8 when +// compiling with both D3D 8 and 9. +//#define _IRR_USE_D3DXFilterTexture_ +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include <d3dx8tex.h> + +#ifdef _IRR_USE_D3DXFilterTexture_ +#pragma comment (lib, "d3dx8.lib") +#endif // _IRR_USE_D3DXFilterTexture_ + +namespace irr +{ +namespace video +{ + +//! rendertarget constructor +CD3D8Texture::CD3D8Texture(CD3D8Driver* driver, const core::dimension2d<u32>& size, const io::path& name) +: ITexture(name), Texture(0), RTTSurface(0), Driver(driver), + TextureSize(size), ImageSize(size), Pitch(0), + HasMipMaps(false), IsRenderTarget(true) +{ + #ifdef _DEBUG + setDebugName("CD3D8Texture"); + #endif + + Device=driver->getExposedVideoData().D3D8.D3DDev8; + if (Device) + Device->AddRef(); + + createRenderTarget(); +} + + +//! constructor +CD3D8Texture::CD3D8Texture(IImage* image, CD3D8Driver* driver, + u32 flags, const io::path& name, void* mipmapData) +: ITexture(name), Texture(0), RTTSurface(0), Driver(driver), +TextureSize(0,0), ImageSize(0,0), Pitch(0), +HasMipMaps(false), IsRenderTarget(false) +{ + #ifdef _DEBUG + setDebugName("CD3D8Texture"); + #endif + + HasMipMaps = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + + Device=driver->getExposedVideoData().D3D8.D3DDev8; + if (Device) + Device->AddRef(); + + if (image) + { + if (createTexture(flags, image)) + { + if (copyTexture(image)) + { + regenerateMipMapLevels(mipmapData); + } + } + else + os::Printer::log("Could not create DIRECT3D8 Texture.", ELL_WARNING); + } +} + + +//! destructor +CD3D8Texture::~CD3D8Texture() +{ + if (Texture) + Texture->Release(); + + if (RTTSurface) + RTTSurface->Release(); + + if (Device) + Device->Release(); +} + + +//! creates the hardware texture +bool CD3D8Texture::createTexture(u32 flags, video::IImage* image) +{ + ImageSize = image->getDimension(); + + core::dimension2d<u32> optSize = ImageSize.getOptimalSize(!Driver->queryFeature(EVDF_TEXTURE_NPOT), !Driver->queryFeature(EVDF_TEXTURE_NSQUARE), true, Driver->Caps.MaxTextureWidth); + + D3DFORMAT format = D3DFMT_A1R5G5B5; + switch(getTextureFormatFromFlags(flags)) + { + case ETCF_ALWAYS_16_BIT: + format = D3DFMT_A1R5G5B5; break; + case ETCF_ALWAYS_32_BIT: + format = D3DFMT_A8R8G8B8; break; + case ETCF_OPTIMIZED_FOR_QUALITY: + { + switch(image->getColorFormat()) + { + case ECF_R8G8B8: + case ECF_A8R8G8B8: + format = D3DFMT_A8R8G8B8; break; + case ECF_A1R5G5B5: + case ECF_R5G6B5: + format = D3DFMT_A1R5G5B5; break; + } + } + break; + case ETCF_OPTIMIZED_FOR_SPEED: + format = D3DFMT_A1R5G5B5; break; + } + + if (Driver->getTextureCreationFlag(video::ETCF_NO_ALPHA_CHANNEL)) + { + if (format == D3DFMT_A8R8G8B8) + +#ifdef _IRR_XBOX_PLATFORM_ + format = D3DFMT_X8R8G8B8; +#else + format = D3DFMT_R8G8B8; +#endif + + else if (format == D3DFMT_A1R5G5B5) + format = D3DFMT_R5G6B5; + } + + const bool mipmaps = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + + HRESULT hr = Device->CreateTexture(optSize.Width, optSize.Height, + mipmaps ? 0 : 1, // number of mipmaplevels (0 = automatic all) + 0, format, D3DPOOL_MANAGED, &Texture); + + if (FAILED(hr)) + { + // try brute force 16 bit + if (format == D3DFMT_A8R8G8B8) + format = D3DFMT_A1R5G5B5; +#ifdef _IRR_XBOX_PLATFORM_ + else if (format == D3DFMT_X8R8G8B8) + format = D3DFMT_R5G6B5; +#else + else if (format == D3DFMT_R8G8B8) + format = D3DFMT_R5G6B5; +#endif + else + return false; + + hr = Device->CreateTexture(optSize.Width, optSize.Height, + mipmaps ? 0 : 1, // number of mipmaplevels (0 = automatic all) + 0, format, D3DPOOL_MANAGED, &Texture); + } + + ColorFormat = getColorFormatFromD3DFormat(format); + return (SUCCEEDED(hr)); +} + + +//! copies the image to the texture +bool CD3D8Texture::copyTexture(video::IImage* image) +{ + if (Texture && image) + { + D3DSURFACE_DESC desc; + Texture->GetLevelDesc(0, &desc); + + TextureSize.Width = desc.Width; + TextureSize.Height = desc.Height; + + D3DLOCKED_RECT rect; + HRESULT hr = Texture->LockRect(0, &rect, 0, 0); + if (FAILED(hr)) + { + os::Printer::log("Could not lock D3D8 Texture.", ELL_ERROR); + return false; + } + + Pitch = rect.Pitch; + image->copyToScaling(rect.pBits, TextureSize.Width, TextureSize.Height, ColorFormat, Pitch); + + hr = Texture->UnlockRect(0); + if (FAILED(hr)) + { + os::Printer::log("Could not unlock D3D8 Texture.", ELL_ERROR); + return false; + } + } + + return true; +} + + +//! lock function +void* CD3D8Texture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) +{ + if (!Texture) + return 0; + + MipLevelLocked=mipmapLevel; + HRESULT hr; + D3DLOCKED_RECT rect; + if(!IsRenderTarget) + { + hr = Texture->LockRect(mipmapLevel, &rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); + if (FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D9 Texture.", ELL_ERROR); + return 0; + } + } + else + { + if (!RTTSurface) + { + // Make RTT surface large enough for all miplevels (including 0) + D3DSURFACE_DESC desc; + Texture->GetLevelDesc(0, &desc); + hr = Device->CreateImageSurface(desc.Width, desc.Height, desc.Format, &RTTSurface); + if (FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D8 Texture.", ELL_ERROR); + return 0; + } + } + + IDirect3DSurface8 *surface = 0; + hr = Texture->GetSurfaceLevel(mipmapLevel, &surface); + if (FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D8 Texture.", "Could not get surface.", ELL_ERROR); + return 0; + } + hr = Device->CopyRects(surface, 0, 0, RTTSurface, 0); + surface->Release(); + if(FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D8 Texture.", "Data copy failed.", ELL_ERROR); + return 0; + } + hr = RTTSurface->LockRect(&rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); + if(FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D8 Texture.", "LockRect failed.", ELL_ERROR); + return 0; + } + } + return rect.pBits; +} + + +//! unlock function +void CD3D8Texture::unlock() +{ + if (!Texture) + return; + + if (!IsRenderTarget) + Texture->UnlockRect(MipLevelLocked); + else if (RTTSurface) + RTTSurface->UnlockRect(); +} + + +//! Returns original size of the texture. +const core::dimension2d<u32>& CD3D8Texture::getOriginalSize() const +{ + return ImageSize; +} + + +//! Returns (=size) of the texture. +const core::dimension2d<u32>& CD3D8Texture::getSize() const +{ + return TextureSize; +} + + +//! returns driver type of texture (=the driver, who created the texture) +E_DRIVER_TYPE CD3D8Texture::getDriverType() const +{ + return EDT_DIRECT3D8; +} + + +//! returns color format of texture +ECOLOR_FORMAT CD3D8Texture::getColorFormat() const +{ + return ColorFormat; +} + + +//! returns pitch of texture (in bytes) +u32 CD3D8Texture::getPitch() const +{ + return Pitch; +} + + +//! returns the DIRECT3D8 Texture +IDirect3DTexture8* CD3D8Texture::getDX8Texture() const +{ + return Texture; +} + + +//! returns if texture has mipmap levels +bool CD3D8Texture::hasMipMaps() const +{ + return HasMipMaps; +} + + +// The D3DXFilterTexture function seems to get linked wrong when +// compiling with both D3D8 and 9, causing it not to work in the D3D9 device. +// So mipmapgeneration is replaced with my own bad generation in d3d 8 when +// compiling with both D3D 8 and 9. +bool CD3D8Texture::createMipMaps(u32 level) +{ + if (level==0) + return true; + + IDirect3DSurface8* upperSurface = 0; + IDirect3DSurface8* lowerSurface = 0; + + // get upper level + HRESULT hr = Texture->GetSurfaceLevel(level-1, &upperSurface); + if (FAILED(hr) || !upperSurface) + { + os::Printer::log("Could not get upper surface level for mip map generation", ELL_WARNING); + return false; + } + + // get lower level + hr = Texture->GetSurfaceLevel(level, &lowerSurface); + if (FAILED(hr) || !lowerSurface) + { + os::Printer::log("Could not get lower surface level for mip map generation", ELL_WARNING); + upperSurface->Release(); + return false; + } + + D3DSURFACE_DESC upperDesc, lowerDesc; + upperSurface->GetDesc(&upperDesc); + lowerSurface->GetDesc(&lowerDesc); + + D3DLOCKED_RECT upperlr; + D3DLOCKED_RECT lowerlr; + + // lock upper surface + if (FAILED(upperSurface->LockRect(&upperlr, NULL, 0))) + { + os::Printer::log("Could not lock upper texture for mip map generation", ELL_WARNING); + upperSurface->Release(); + lowerSurface->Release(); + return false; + } + + // lock lower surface + if (FAILED(lowerSurface->LockRect(&lowerlr, NULL, 0))) + { + os::Printer::log("Could not lock lower texture for mip map generation", ELL_WARNING); + upperSurface->UnlockRect(); + upperSurface->Release(); + lowerSurface->Release(); + return false; + } + + if (upperDesc.Format != lowerDesc.Format) + { + os::Printer::log("Cannot copy mip maps with different formats.", ELL_WARNING); + } + else + { + if (upperDesc.Format == D3DFMT_A1R5G5B5) + copy16BitMipMap((char*)upperlr.pBits, (char*)lowerlr.pBits, + lowerDesc.Width, lowerDesc.Height, + upperlr.Pitch, lowerlr.Pitch); + else + if (upperDesc.Format == D3DFMT_A8R8G8B8) + copy32BitMipMap((char*)upperlr.pBits, (char*)lowerlr.pBits, + lowerDesc.Width, lowerDesc.Height, + upperlr.Pitch, lowerlr.Pitch); + else + os::Printer::log("Unsupported mipmap format, cannot copy.", ELL_WARNING); + } + + bool result=true; + // unlock + if (FAILED(upperSurface->UnlockRect())) + result=false; + if (FAILED(lowerSurface->UnlockRect())) + result=false; + + // release + upperSurface->Release(); + lowerSurface->Release(); + + if (!result || upperDesc.Width < 3 || upperDesc.Height < 3) + return result; // stop generating levels + + // generate next level + return createMipMaps(level+1); +} + + +ECOLOR_FORMAT CD3D8Texture::getColorFormatFromD3DFormat(D3DFORMAT format) +{ + switch(format) + { + case D3DFMT_X1R5G5B5: + case D3DFMT_A1R5G5B5: + Pitch = TextureSize.Width * 2; + return ECF_A1R5G5B5; + break; + case D3DFMT_A8R8G8B8: + case D3DFMT_X8R8G8B8: + Pitch = TextureSize.Width * 4; + return ECF_A8R8G8B8; + break; + case D3DFMT_R5G6B5: + Pitch = TextureSize.Width * 2; + return ECF_R5G6B5; + break; + default: + return (ECOLOR_FORMAT)0; + }; +} + + + +void CD3D8Texture::copy16BitMipMap(char* src, char* tgt, + s32 width, s32 height, + s32 pitchsrc, s32 pitchtgt) const +{ + u16 c; + + for (int x=0; x<width; ++x) + { + for (int y=0; y<height; ++y) + { + s32 a=0, r=0, g=0, b=0; + + for (int dx=0; dx<2; ++dx) + { + for (int dy=0; dy<2; ++dy) + { + int tgx = (x*2)+dx; + int tgy = (y*2)+dy; + + c = *(u16*)((void*)&src[(tgx*2)+(tgy*pitchsrc)]); + + a += getAlpha(c); + r += getRed(c); + g += getGreen(c); + b += getBlue(c); + } + } + + a /= 4; + r /= 4; + g /= 4; + b /= 4; + + c = ((a & 0x1) <<15) | ((r & 0x1F)<<10) | ((g & 0x1F)<<5) | (b & 0x1F); + *(u16*)((void*)&tgt[(x*2)+(y*pitchtgt)]) = c; + } + } +} + + +void CD3D8Texture::copy32BitMipMap(char* src, char* tgt, + s32 width, s32 height, + s32 pitchsrc, s32 pitchtgt) const +{ + SColor c; + + for (int x=0; x<width; ++x) + { + for (int y=0; y<height; ++y) + { + s32 a=0, r=0, g=0, b=0; + + for (int dx=0; dx<2; ++dx) + { + for (int dy=0; dy<2; ++dy) + { + int tgx = (x*2)+dx; + int tgy = (y*2)+dy; + + c = *(u32*)((void*)&src[(tgx<<2)+(tgy*pitchsrc)]); + + a += c.getAlpha(); + r += c.getRed(); + g += c.getGreen(); + b += c.getBlue(); + } + } + + a >>= 2; + r >>= 2; + g >>= 2; + b >>= 2; + + c = ((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff); + *(u32*)((void*)&tgt[(x*4)+(y*pitchtgt)]) = c.color; + } + } +} + + +void CD3D8Texture::createRenderTarget() +{ + TextureSize = TextureSize.getOptimalSize(!Driver->queryFeature(EVDF_TEXTURE_NPOT), !Driver->queryFeature(EVDF_TEXTURE_NSQUARE), true, Driver->Caps.MaxTextureWidth); + + // get backbuffer format to create the render target in the + // same format + + IDirect3DSurface8* bb; + D3DFORMAT d3DFormat = D3DFMT_A8R8G8B8; + + if (!FAILED(Device->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &bb))) + { + D3DSURFACE_DESC desc; + bb->GetDesc(&desc); + d3DFormat = desc.Format; + + if (d3DFormat == D3DFMT_X8R8G8B8) + d3DFormat = D3DFMT_A8R8G8B8; + + bb->Release(); + } + else + { + os::Printer::log("Could not create RenderTarget texture: could not get BackBuffer.", + ELL_WARNING); + return; + } + + // create texture + HRESULT hr; + + hr = Device->CreateTexture( + TextureSize.Width, + TextureSize.Height, + 1, // mip map level count, we don't want mipmaps here + D3DUSAGE_RENDERTARGET, + d3DFormat, + D3DPOOL_DEFAULT, + &Texture); + + // get irrlicht format from D3D format + ColorFormat = getColorFormatFromD3DFormat(d3DFormat); + + if (FAILED(hr)) + os::Printer::log("Could not create render target texture"); +} + + +//! Regenerates the mip map levels of the texture. Useful after locking and +//! modifying the texture +void CD3D8Texture::regenerateMipMapLevels(void* mipmapData) +{ + if (mipmapData) + { + core::dimension2du size = TextureSize; + u32 level=0; + do + { + if (size.Width>1) + size.Width /=2; + if (size.Height>1) + size.Height /=2; + ++level; + IDirect3DSurface8* mipSurface = 0; + HRESULT hr = Texture->GetSurfaceLevel(level, &mipSurface); + if (FAILED(hr) || !mipSurface) + { + os::Printer::log("Could not get mipmap level", ELL_WARNING); + return; + } + D3DSURFACE_DESC mipDesc; + mipSurface->GetDesc(&mipDesc); + D3DLOCKED_RECT miplr; + + // lock mipmap surface + if (FAILED(mipSurface->LockRect(&miplr, NULL, 0))) + { + mipSurface->Release(); + os::Printer::log("Could not lock texture", ELL_WARNING); + return; + } + + memcpy(miplr.pBits, mipmapData, size.getArea()*getPitch()/TextureSize.Width); + mipmapData = (u8*)mipmapData+size.getArea()*getPitch()/TextureSize.Width; + // unlock + mipSurface->UnlockRect(); + // release + mipSurface->Release(); + } while (size.Width != 1 || size.Height != 1); + } + else if (HasMipMaps) + { + // create mip maps. +#ifndef _IRR_USE_D3DXFilterTexture_ + // The D3DXFilterTexture function seems to get linked wrong when + // compiling with both D3D8 and 9, causing it not to work in the D3D9 device. + // So mipmapgeneration is replaced with my own bad generation in d3d 8 when + // compiling with both D3D 8 and 9. + HRESULT hr = D3DXFilterTexture(Texture, NULL, D3DX_DEFAULT , D3DX_DEFAULT ); + if (FAILED(hr)) +#endif + createMipMaps(); + } +} + + +//! returns if it is a render target +bool CD3D8Texture::isRenderTarget() const +{ + return IsRenderTarget; +} + + +//! Returns pointer to the render target surface +IDirect3DSurface8* CD3D8Texture::getRenderTargetSurface() +{ + if (!IsRenderTarget) + return 0; + + IDirect3DSurface8 *pRTTSurface = 0; + if (Texture) + Texture->GetSurfaceLevel(0, &pRTTSurface); + + if (pRTTSurface) + pRTTSurface->Release(); + + return pRTTSurface; +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.h new file mode 100644 index 0000000..4a73c54 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D8Texture.h @@ -0,0 +1,120 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DIRECTX8_TEXTURE_H_INCLUDED__ +#define __C_DIRECTX8_TEXTURE_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + +#include "ITexture.h" +#include "IImage.h" + +#include <d3d8.h> + +namespace irr +{ +namespace video +{ + +class CD3D8Driver; + +/*! + interface for a Video Driver dependent Texture. +*/ +class CD3D8Texture : public ITexture +{ +public: + + //! constructor + CD3D8Texture(IImage* image, CD3D8Driver* driver, + u32 flags, const io::path& name, void* mipmapData=0); + + //! rendertarget constructor + CD3D8Texture(CD3D8Driver* driver, const core::dimension2d<u32>& size, const io::path& name); + + //! destructor + virtual ~CD3D8Texture(); + + //! lock function + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); + + //! unlock function + virtual void unlock(); + + //! Returns original size of the texture. + virtual const core::dimension2d<u32>& getOriginalSize() const; + + //! Returns (=size) of the texture. + virtual const core::dimension2d<u32>& getSize() const; + + //! returns driver type of texture (=the driver, who created the texture) + virtual E_DRIVER_TYPE getDriverType() const; + + //! returns color format of texture + virtual ECOLOR_FORMAT getColorFormat() const; + + //! returns pitch of texture (in bytes) + virtual u32 getPitch() const; + + //! returns the DIRECT3D8 Texture + IDirect3DTexture8* getDX8Texture() const; + + //! returns if texture has mipmap levels + bool hasMipMaps() const; + + //! Regenerates the mip map levels of the texture. Useful after locking and + //! modifying the texture + virtual void regenerateMipMapLevels(void* mipmapData=0); + + //! returns if it is a render target + virtual bool isRenderTarget() const; + + //! Returns pointer to the render target surface + IDirect3DSurface8* getRenderTargetSurface(); + +private: + friend class CD3D8Driver; + + void createRenderTarget(); + + //! creates the hardware texture + bool createTexture(u32 flags, IImage* Image); + + //! copies the image to the texture + bool copyTexture(IImage* Image); + + //! convert color formats + ECOLOR_FORMAT getColorFormatFromD3DFormat(D3DFORMAT format); + + bool createMipMaps(u32 level=1); + + void copy16BitMipMap(char* src, char* tgt, + s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const; + + void copy32BitMipMap(char* src, char* tgt, + s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const; + + IDirect3DDevice8* Device; + IDirect3DTexture8* Texture; + IDirect3DSurface8* RTTSurface; + CD3D8Driver* Driver; + core::dimension2d<u32> TextureSize; + core::dimension2d<u32> ImageSize; + s32 Pitch; + u32 MipLevelLocked; + ECOLOR_FORMAT ColorFormat; + + bool HasMipMaps; + bool IsRenderTarget; +}; + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + +#endif // __C_DIRECTX8_TEXTURE_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.cpp new file mode 100644 index 0000000..8220a7e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.cpp @@ -0,0 +1,222 @@ +// Copyright (C) 2012-2012 Patryk Nadrowski +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#if defined(_IRR_COMPILE_WITH_DIRECT3D_9_) && defined(_IRR_COMPILE_WITH_CG_) + +#include "CD3D9CgMaterialRenderer.h" +#include "CD3D9Driver.h" +#include "CD3D9Texture.h" + +namespace irr +{ +namespace video +{ + +CD3D9CgUniformSampler2D::CD3D9CgUniformSampler2D(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_SAMPLER2D; +} + +void CD3D9CgUniformSampler2D::update(const void* data, const SMaterial& material) const +{ + s32* Data = (s32*)data; + s32 LayerID = *Data; + + if (material.TextureLayer[LayerID].Texture) + { + IDirect3DBaseTexture9* Texture = reinterpret_cast<irr::video::CD3D9Texture*>(material.TextureLayer[LayerID].Texture)->getDX9Texture(); + + cgD3D9SetTextureParameter(Parameter, Texture); + } +} + +CD3D9CgMaterialRenderer::CD3D9CgMaterialRenderer(CD3D9Driver* driver, s32& materialType, + const c8* vertexProgram, const c8* vertexEntry, E_VERTEX_SHADER_TYPE vertexProfile, + const c8* fragmentProgram, const c8* fragmentEntry, E_PIXEL_SHADER_TYPE fragmentProfile, + const c8* geometryProgram, const c8* geometryEntry, E_GEOMETRY_SHADER_TYPE geometryProfile, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, u32 vertices, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData) : + Driver(driver), CCgMaterialRenderer(callback, baseMaterial, userData) +{ + #ifdef _DEBUG + setDebugName("CD3D9CgMaterialRenderer"); + #endif + + init(materialType, vertexProgram, vertexEntry, vertexProfile, fragmentProgram, fragmentEntry, fragmentProfile, + geometryProgram, geometryEntry, geometryProfile, inType, outType, vertices); +} + +CD3D9CgMaterialRenderer::~CD3D9CgMaterialRenderer() +{ + if (VertexProgram) + { + cgD3D9UnloadProgram(VertexProgram); + cgDestroyProgram(VertexProgram); + } + if (FragmentProgram) + { + cgD3D9UnloadProgram(FragmentProgram); + cgDestroyProgram(FragmentProgram); + } + /*if (GeometryProgram) + { + cgD3D9UnloadProgram(GeometryProgram); + cgDestroyProgram(GeometryProgram); + }*/ +} + +void CD3D9CgMaterialRenderer::OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) +{ + Material = material; + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (VertexProgram) + cgD3D9BindProgram(VertexProgram); + + if (FragmentProgram) + cgD3D9BindProgram(FragmentProgram); + + /*if (GeometryProgram) + cgD3D9BindProgram(GeometryProgram);*/ + + if (BaseMaterial) + BaseMaterial->OnSetMaterial(material, material, true, this); + } + + if (CallBack) + CallBack->OnSetMaterial(material); + + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + +bool CD3D9CgMaterialRenderer::OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype) +{ + if (CallBack && (VertexProgram || FragmentProgram || GeometryProgram)) + CallBack->OnSetConstants(this, UserData); + + return true; +} + +void CD3D9CgMaterialRenderer::OnUnsetMaterial() +{ + if (VertexProgram) + cgD3D9UnbindProgram(VertexProgram); + if (FragmentProgram) + cgD3D9UnbindProgram(FragmentProgram); + /*if (GeometryProgram) + cgD3D9UnbindProgram(GeometryProgram);*/ + + if (BaseMaterial) + BaseMaterial->OnUnsetMaterial(); + + Material = IdentityMaterial;; +} + +void CD3D9CgMaterialRenderer::setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) +{ + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + +IVideoDriver* CD3D9CgMaterialRenderer::getVideoDriver() +{ + return Driver; +} + +void CD3D9CgMaterialRenderer::init(s32& materialType, + const c8* vertexProgram, const c8* vertexEntry, E_VERTEX_SHADER_TYPE vertexProfile, + const c8* fragmentProgram, const c8* fragmentEntry, E_PIXEL_SHADER_TYPE fragmentProfile, + const c8* geometryProgram, const c8* geometryEntry, E_GEOMETRY_SHADER_TYPE geometryProfile, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, u32 vertices) +{ + bool Status = true; + CGerror Error = CG_NO_ERROR; + materialType = -1; + + // TODO: add profile selection + + if (vertexProgram) + { + VertexProfile = cgD3D9GetLatestVertexProfile(); + + if (VertexProfile) + VertexProgram = cgCreateProgram(Driver->getCgContext(), CG_SOURCE, vertexProgram, VertexProfile, vertexEntry, 0); + + if (!VertexProgram) + { + Error = cgGetError(); + os::Printer::log("Cg vertex program failed to compile:", ELL_ERROR); + os::Printer::log(cgGetLastListing(Driver->getCgContext()), ELL_ERROR); + + Status = false; + } + else + cgD3D9LoadProgram(VertexProgram, 0, 0); + } + + if (fragmentProgram) + { + FragmentProfile = cgD3D9GetLatestPixelProfile(); + + if (FragmentProfile) + FragmentProgram = cgCreateProgram(Driver->getCgContext(), CG_SOURCE, fragmentProgram, FragmentProfile, fragmentEntry, 0); + + if (!FragmentProgram) + { + Error = cgGetError(); + os::Printer::log("Cg fragment program failed to compile:", ELL_ERROR); + os::Printer::log(cgGetLastListing(Driver->getCgContext()), ELL_ERROR); + + Status = false; + } + else + cgD3D9LoadProgram(FragmentProgram, 0, 0); + } + + /*if (geometryProgram) + { + GeometryProfile = cgD3D9GetLatestGeometryProfile(); + + if (GeometryProfile) + GeometryProgram = cgCreateProgram(Driver->getCgContext(), CG_SOURCE, geometryProgram, GeometryProfile, geometryEntry, 0); + + if (!GeometryProgram) + { + Error = cgGetError(); + os::Printer::log("Cg geometry program failed to compile:", ELL_ERROR); + os::Printer::log(cgGetLastListing(Driver->getCgContext()), ELL_ERROR); + + Status = false; + } + else + cgD3D9LoadProgram(GeometryProgram, 0, 0); + }*/ + + getUniformList(); + + // create D3D9 specifics sampler uniforms. + for(unsigned int i = 0; i < UniformInfo.size(); ++i) + { + if (UniformInfo[i]->getType() == CG_SAMPLER2D) + { + bool IsGlobal = true; + + if (UniformInfo[i]->getSpace() == CG_PROGRAM) + IsGlobal = false; + + CCgUniform* Uniform = new CD3D9CgUniformSampler2D(UniformInfo[i]->getParameter(), IsGlobal); + delete UniformInfo[i]; + UniformInfo[i] = Uniform; + } + } + + if (Status) + materialType = Driver->addMaterialRenderer(this); +} + +} +} + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.h new file mode 100644 index 0000000..7cb4b0f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9CgMaterialRenderer.h @@ -0,0 +1,83 @@ +// Copyright (C) 2012-2012 Patryk Nadrowski +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DIRECT3D_9_CG_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_DIRECT3D_9_CG_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#if defined(_IRR_COMPILE_WITH_DIRECT3D_9_) && defined(_IRR_COMPILE_WITH_CG_) + +#define WIN32_LEAN_AND_MEAN + +#include <windows.h> +#include <d3d9.h> +#include <d3dx9.h> +#include "CCgMaterialRenderer.h" +#include "Cg/cgD3D9.h" + +#ifdef _MSC_VER + #pragma comment(lib, "cgD3D9.lib") +#endif + +namespace irr +{ +namespace video +{ + +class CD3D9Driver; +class IShaderConstantSetCallBack; + +class CD3D9CgUniformSampler2D : public CCgUniform +{ +public: + CD3D9CgUniformSampler2D(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class CD3D9CgMaterialRenderer : public CCgMaterialRenderer +{ +public: + CD3D9CgMaterialRenderer(CD3D9Driver* driver, s32& materialType, + const c8* vertexProgram = 0, const c8* vertexEntry = "main", + E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, + const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", + E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, + const c8* geometryProgram = 0, const c8* geometryEntry = "main", + E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 vertices = 0, IShaderConstantSetCallBack* callback = 0, + IMaterialRenderer* baseMaterial = 0, s32 userData = 0); + + virtual ~CD3D9CgMaterialRenderer(); + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services); + virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype); + virtual void OnUnsetMaterial(); + + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates); + virtual IVideoDriver* getVideoDriver(); + +protected: + void init(s32& materialType, + const c8* vertexProgram = 0, const c8* vertexEntry = "main", + E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, + const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", + E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, + const c8* geometryProgram = 0, const c8* geometryEntry = "main", + E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 vertices = 0); + + CD3D9Driver* Driver; +}; + +} +} + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.cpp new file mode 100644 index 0000000..7404894 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.cpp @@ -0,0 +1,3633 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#define _IRR_DONT_DO_MEMORY_DEBUGGING_HERE +#include "CD3D9Driver.h" + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "os.h" +#include "S3DVertex.h" +#include "CD3D9Texture.h" +#include "CD3D9MaterialRenderer.h" +#include "CD3D9ShaderMaterialRenderer.h" +#include "CD3D9NormalMapRenderer.h" +#include "CD3D9ParallaxMapRenderer.h" +#include "CD3D9HLSLMaterialRenderer.h" +#include "CD3D9CgMaterialRenderer.h" +#include "SIrrCreationParameters.h" + +namespace irr +{ +namespace video +{ + +namespace +{ + inline DWORD F2DW( FLOAT f ) { return *((DWORD*)&f); } +} + +//! constructor +CD3D9Driver::CD3D9Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io) + : CNullDriver(io, params.WindowSize), CurrentRenderMode(ERM_NONE), + ResetRenderStates(true), Transformation3DChanged(false), + D3DLibrary(0), pID3D(0), pID3DDevice(0), PrevRenderTarget(0), + WindowId(0), SceneSourceRect(0), + LastVertexType((video::E_VERTEX_TYPE)-1), VendorID(0), + MaxTextureUnits(0), MaxUserClipPlanes(0), MaxMRTs(1), NumSetMRTs(1), + MaxLightDistance(0.f), LastSetLight(-1), + ColorFormat(ECF_A8R8G8B8), DeviceLost(false), + DriverWasReset(true), OcclusionQuerySupport(false), + AlphaToCoverageSupport(false), Params(params) +{ + #ifdef _DEBUG + setDebugName("CD3D9Driver"); + #endif + + printVersion(); + + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + { + CurrentTexture[i] = 0; + LastTextureMipMapsAvailable[i] = false; + } + MaxLightDistance = sqrtf(FLT_MAX); + // create sphere map matrix + + SphereMapMatrixD3D9._11 = 0.5f; SphereMapMatrixD3D9._12 = 0.0f; + SphereMapMatrixD3D9._13 = 0.0f; SphereMapMatrixD3D9._14 = 0.0f; + SphereMapMatrixD3D9._21 = 0.0f; SphereMapMatrixD3D9._22 =-0.5f; + SphereMapMatrixD3D9._23 = 0.0f; SphereMapMatrixD3D9._24 = 0.0f; + SphereMapMatrixD3D9._31 = 0.0f; SphereMapMatrixD3D9._32 = 0.0f; + SphereMapMatrixD3D9._33 = 1.0f; SphereMapMatrixD3D9._34 = 0.0f; + SphereMapMatrixD3D9._41 = 0.5f; SphereMapMatrixD3D9._42 = 0.5f; + SphereMapMatrixD3D9._43 = 0.0f; SphereMapMatrixD3D9._44 = 1.0f; + + core::matrix4 mat; + UnitMatrixD3D9 = *(D3DMATRIX*)((void*)mat.pointer()); + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = 0; + #endif + + // init direct 3d is done in the factory function +} + + +//! destructor +CD3D9Driver::~CD3D9Driver() +{ + deleteMaterialRenders(); + deleteAllTextures(); + removeAllOcclusionQueries(); + removeAllHardwareBuffers(); + for (u32 i=0; i<DepthBuffers.size(); ++i) + { + DepthBuffers[i]->drop(); + } + DepthBuffers.clear(); + + // drop d3d9 + + if (pID3DDevice) + pID3DDevice->Release(); + + if (pID3D) + pID3D->Release(); + + #ifdef _IRR_COMPILE_WITH_CG_ + cgD3D9SetDevice(0); + + if(CgContext) + { + cgDestroyContext(CgContext); + } + #endif +} + + +void CD3D9Driver::createMaterialRenderers() +{ + // create D3D9 material renderers + + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_SOLID(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_SOLID_2_LAYER(pID3DDevice, this)); + + // add the same renderer for all lightmap types + + CD3D9MaterialRenderer_LIGHTMAP* lmr = new CD3D9MaterialRenderer_LIGHTMAP(pID3DDevice, this); + addMaterialRenderer(lmr); // for EMT_LIGHTMAP: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_ADD: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M2: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M4: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING_M2: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING_M4: + lmr->drop(); + + // add remaining fixed function pipeline material renderers + + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_DETAIL_MAP(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_SPHERE_MAP(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_REFLECTION_2_LAYER(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_TRANSPARENT_ADD_COLOR(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_TRANSPARENT_VERTEX_ALPHA(pID3DDevice, this)); + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(pID3DDevice, this)); + + // add normal map renderers + + s32 tmp = 0; + video::IMaterialRenderer* renderer = 0; + + renderer = new CD3D9NormalMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_SOLID].Renderer); + renderer->drop(); + + renderer = new CD3D9NormalMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_ADD_COLOR].Renderer); + renderer->drop(); + + renderer = new CD3D9NormalMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); + renderer->drop(); + + // add parallax map renderers + + renderer = new CD3D9ParallaxMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_SOLID].Renderer); + renderer->drop(); + + renderer = new CD3D9ParallaxMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_ADD_COLOR].Renderer); + renderer->drop(); + + renderer = new CD3D9ParallaxMapRenderer(pID3DDevice, this, tmp, + MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); + renderer->drop(); + + // add basic 1 texture blending + addAndDropMaterialRenderer(new CD3D9MaterialRenderer_ONETEXTURE_BLEND(pID3DDevice, this)); +} + + +//! initialises the Direct3D API +bool CD3D9Driver::initDriver(HWND hwnd, bool pureSoftware) +{ + if (!pID3D) + { + D3DLibrary = LoadLibrary( __TEXT("d3d9.dll") ); + + if (!D3DLibrary) + { + os::Printer::log("Error, could not load d3d9.dll.", ELL_ERROR); + return false; + } + + typedef IDirect3D9 * (__stdcall *D3DCREATETYPE)(UINT); + D3DCREATETYPE d3dCreate = (D3DCREATETYPE) GetProcAddress(D3DLibrary, "Direct3DCreate9"); + + if (!d3dCreate) + { + os::Printer::log("Error, could not get proc adress of Direct3DCreate9.", ELL_ERROR); + return false; + } + + //just like pID3D = Direct3DCreate9(D3D_SDK_VERSION); + pID3D = (*d3dCreate)(D3D_SDK_VERSION); + + if (!pID3D) + { + os::Printer::log("Error initializing D3D.", ELL_ERROR); + return false; + } + } + + // print device information + D3DADAPTER_IDENTIFIER9 dai; + if (!FAILED(pID3D->GetAdapterIdentifier(Params.DisplayAdapter, 0, &dai))) + { + char tmp[512]; + + s32 Product = HIWORD(dai.DriverVersion.HighPart); + s32 Version = LOWORD(dai.DriverVersion.HighPart); + s32 SubVersion = HIWORD(dai.DriverVersion.LowPart); + s32 Build = LOWORD(dai.DriverVersion.LowPart); + + sprintf(tmp, "%s %s %d.%d.%d.%d", dai.Description, dai.Driver, Product, Version, + SubVersion, Build); + os::Printer::log(tmp, ELL_INFORMATION); + + // Assign vendor name based on vendor id. + VendorID= static_cast<u16>(dai.VendorId); + switch(dai.VendorId) + { + case 0x1002 : VendorName = "ATI Technologies Inc."; break; + case 0x10DE : VendorName = "NVIDIA Corporation"; break; + case 0x102B : VendorName = "Matrox Electronic Systems Ltd."; break; + case 0x121A : VendorName = "3dfx Interactive Inc"; break; + case 0x5333 : VendorName = "S3 Graphics Co., Ltd."; break; + case 0x8086 : VendorName = "Intel Corporation"; break; + default: VendorName = "Unknown VendorId: ";VendorName += (u32)dai.VendorId; break; + } + } + + D3DDISPLAYMODE d3ddm; + if (FAILED(pID3D->GetAdapterDisplayMode(Params.DisplayAdapter, &d3ddm))) + { + os::Printer::log("Error: Could not get Adapter Display mode.", ELL_ERROR); + return false; + } + + ZeroMemory(&present, sizeof(present)); + + present.BackBufferCount = 1; + present.EnableAutoDepthStencil = TRUE; + if (Params.Vsync) + present.PresentationInterval = D3DPRESENT_INTERVAL_ONE; + else + present.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + + if (Params.Fullscreen) + { + present.BackBufferWidth = Params.WindowSize.Width; + present.BackBufferHeight = Params.WindowSize.Height; + // request 32bit mode if user specified 32 bit, added by Thomas Stuefe + if (Params.Bits == 32) + present.BackBufferFormat = D3DFMT_X8R8G8B8; + else + present.BackBufferFormat = D3DFMT_R5G6B5; + present.SwapEffect = D3DSWAPEFFECT_FLIP; + present.Windowed = FALSE; + present.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; + } + else + { + present.BackBufferFormat = d3ddm.Format; + present.SwapEffect = D3DSWAPEFFECT_DISCARD; + present.Windowed = TRUE; + } + + UINT adapter = Params.DisplayAdapter; + D3DDEVTYPE devtype = D3DDEVTYPE_HAL; + #ifndef _IRR_D3D_NO_SHADER_DEBUGGING + devtype = D3DDEVTYPE_REF; + #elif defined(_IRR_USE_NVIDIA_PERFHUD_) + for (UINT adapter_i = 0; adapter_i < pID3D->GetAdapterCount(); ++adapter_i) + { + D3DADAPTER_IDENTIFIER9 identifier; + pID3D->GetAdapterIdentifier(adapter_i,0,&identifier); + if (strstr(identifier.Description,"PerfHUD") != 0) + { + adapter = adapter_i; + devtype = D3DDEVTYPE_REF; + break; + } + } + #endif + + // enable anti alias if possible and desired + if (Params.AntiAlias > 0) + { + if (Params.AntiAlias > 32) + Params.AntiAlias = 32; + + DWORD qualityLevels = 0; + + while(Params.AntiAlias > 0) + { + if(SUCCEEDED(pID3D->CheckDeviceMultiSampleType(adapter, + devtype, present.BackBufferFormat, !Params.Fullscreen, + (D3DMULTISAMPLE_TYPE)Params.AntiAlias, &qualityLevels))) + { + present.MultiSampleType = (D3DMULTISAMPLE_TYPE)Params.AntiAlias; + present.MultiSampleQuality = qualityLevels-1; + present.SwapEffect = D3DSWAPEFFECT_DISCARD; + break; + } + --Params.AntiAlias; + } + + if (Params.AntiAlias==0) + { + os::Printer::log("Anti aliasing disabled because hardware/driver lacks necessary caps.", ELL_WARNING); + } + } + + // check stencil buffer compatibility + if (Params.Stencilbuffer) + { + present.AutoDepthStencilFormat = D3DFMT_D24S8; + if(FAILED(pID3D->CheckDeviceFormat(adapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D24X4S4; + if(FAILED(pID3D->CheckDeviceFormat(adapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D15S1; + if(FAILED(pID3D->CheckDeviceFormat(adapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + os::Printer::log("Device does not support stencilbuffer, disabling stencil buffer.", ELL_WARNING); + Params.Stencilbuffer = false; + } + } + } + else + if(FAILED(pID3D->CheckDepthStencilMatch(adapter, devtype, + present.BackBufferFormat, present.BackBufferFormat, present.AutoDepthStencilFormat))) + { + os::Printer::log("Depth-stencil format is not compatible with display format, disabling stencil buffer.", ELL_WARNING); + Params.Stencilbuffer = false; + } + } + // do not use else here to cope with flag change in previous block + if (!Params.Stencilbuffer) + { + present.AutoDepthStencilFormat = D3DFMT_D32; + if(FAILED(pID3D->CheckDeviceFormat(adapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D24X8; + if(FAILED(pID3D->CheckDeviceFormat(adapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + present.AutoDepthStencilFormat = D3DFMT_D16; + if(FAILED(pID3D->CheckDeviceFormat(adapter, devtype, + present.BackBufferFormat, D3DUSAGE_DEPTHSTENCIL, + D3DRTYPE_SURFACE, present.AutoDepthStencilFormat))) + { + os::Printer::log("Device does not support required depth buffer.", ELL_WARNING); + return false; + } + } + } + } + + // create device + + DWORD fpuPrecision = Params.HighPrecisionFPU ? D3DCREATE_FPU_PRESERVE : 0; + DWORD multithreaded = Params.DriverMultithreaded ? D3DCREATE_MULTITHREADED : 0; + if (pureSoftware) + { + if (FAILED(pID3D->CreateDevice(Params.DisplayAdapter, D3DDEVTYPE_REF, hwnd, + fpuPrecision | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice))) + os::Printer::log("Was not able to create Direct3D9 software device.", ELL_ERROR); + } + else + { + HRESULT hr = pID3D->CreateDevice(adapter, devtype, hwnd, + fpuPrecision | multithreaded | D3DCREATE_HARDWARE_VERTEXPROCESSING, &present, &pID3DDevice); + + if(FAILED(hr)) + hr = pID3D->CreateDevice(adapter, devtype, hwnd, + fpuPrecision | multithreaded | D3DCREATE_MIXED_VERTEXPROCESSING , &present, &pID3DDevice); + + if(FAILED(hr)) + hr = pID3D->CreateDevice(adapter, devtype, hwnd, + fpuPrecision | multithreaded | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present, &pID3DDevice); + + if (FAILED(hr)) + os::Printer::log("Was not able to create Direct3D9 device.", ELL_ERROR); + } + + if (!pID3DDevice) + { + os::Printer::log("Was not able to create DIRECT3D9 device.", ELL_ERROR); + return false; + } + + // get caps + pID3DDevice->GetDeviceCaps(&Caps); + + os::Printer::log("Currently available Video Memory (kB)", core::stringc(pID3DDevice->GetAvailableTextureMem()/1024).c_str()); + + // disable stencilbuffer if necessary + if (Params.Stencilbuffer && + (!(Caps.StencilCaps & D3DSTENCILCAPS_DECRSAT) || + !(Caps.StencilCaps & D3DSTENCILCAPS_INCRSAT) || + !(Caps.StencilCaps & D3DSTENCILCAPS_KEEP))) + { + os::Printer::log("Device not able to use stencil buffer, disabling stencil buffer.", ELL_WARNING); + Params.Stencilbuffer = false; + } + + // set default vertex shader + setVertexShader(EVT_STANDARD); + + // set fog mode + setFog(FogColor, FogType, FogStart, FogEnd, FogDensity, PixelFog, RangeFog); + + // set exposed data + ExposedData.D3D9.D3D9 = pID3D; + ExposedData.D3D9.D3DDev9 = pID3DDevice; + ExposedData.D3D9.HWnd = hwnd; + + ResetRenderStates = true; + + // create materials + createMaterialRenderers(); + + MaxTextureUnits = core::min_((u32)Caps.MaxSimultaneousTextures, MATERIAL_MAX_TEXTURES); + MaxUserClipPlanes = (u32)Caps.MaxUserClipPlanes; + MaxMRTs = (s32)Caps.NumSimultaneousRTs; + OcclusionQuerySupport=(pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, NULL) == S_OK); + + if (VendorID==0x10DE)//NVidia + AlphaToCoverageSupport = (pID3D->CheckDeviceFormat(adapter, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, 0,D3DRTYPE_SURFACE, + (D3DFORMAT)MAKEFOURCC('A', 'T', 'O', 'C')) == S_OK); + else if (VendorID==0x1002)//ATI + AlphaToCoverageSupport = true; // TODO: Check unknown +#if 0 + AlphaToCoverageSupport = (pID3D->CheckDeviceFormat(adapter, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, 0,D3DRTYPE_SURFACE, + (D3DFORMAT)MAKEFOURCC('A','2','M','1')) == S_OK); +#endif + + DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits); + DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures); + DriverAttributes->setAttribute("MaxLights", (s32)Caps.MaxActiveLights); + DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy); + DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes); + DriverAttributes->setAttribute("MaxMultipleRenderTargets", (s32)Caps.NumSimultaneousRTs); + DriverAttributes->setAttribute("MaxIndices", (s32)Caps.MaxVertexIndex); + DriverAttributes->setAttribute("MaxTextureSize", (s32)core::min_(Caps.MaxTextureHeight,Caps.MaxTextureWidth)); + DriverAttributes->setAttribute("MaxTextureLODBias", 16); + DriverAttributes->setAttribute("Version", 901); + DriverAttributes->setAttribute("ShaderLanguageVersion", (s32)(((0x00ff00 & Caps.VertexShaderVersion)>>8)*100 + (Caps.VertexShaderVersion&0xff))); + DriverAttributes->setAttribute("AntiAlias", Params.AntiAlias); + + // set the renderstates + setRenderStates3DMode(); + + // store the screen's depth buffer + DepthBuffers.push_back(new SDepthSurface()); + if (SUCCEEDED(pID3DDevice->GetDepthStencilSurface(&(DepthBuffers[0]->Surface)))) + { + D3DSURFACE_DESC desc; + DepthBuffers[0]->Surface->GetDesc(&desc); + DepthBuffers[0]->Size.set(desc.Width, desc.Height); + } + else + { + os::Printer::log("Was not able to get main depth buffer.", ELL_ERROR); + return false; + } + + D3DColorFormat = D3DFMT_A8R8G8B8; + IDirect3DSurface9* bb=0; + if (SUCCEEDED(pID3DDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &bb))) + { + D3DSURFACE_DESC desc; + bb->GetDesc(&desc); + D3DColorFormat = desc.Format; + + if (D3DColorFormat == D3DFMT_X8R8G8B8) + D3DColorFormat = D3DFMT_A8R8G8B8; + + bb->Release(); + } + ColorFormat = getColorFormatFromD3DFormat(D3DColorFormat); + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = cgCreateContext(); + cgD3D9SetDevice(pID3DDevice); + #endif + + // so far so good. + return true; +} + + +//! applications must call this method before performing any rendering. returns false if failed. +bool CD3D9Driver::beginScene(bool backBuffer, bool zBuffer, SColor color, + const SExposedVideoData& videoData, core::rect<s32>* sourceRect) +{ + CNullDriver::beginScene(backBuffer, zBuffer, color, videoData, sourceRect); + WindowId = (HWND)videoData.D3D9.HWnd; + SceneSourceRect = sourceRect; + + if (!pID3DDevice) + return false; + + HRESULT hr; + if (DeviceLost) + { + if (FAILED(hr = pID3DDevice->TestCooperativeLevel())) + { + if (hr == D3DERR_DEVICELOST) + { + Sleep(100); + hr = pID3DDevice->TestCooperativeLevel(); + if (hr == D3DERR_DEVICELOST) + return false; + } + + if ((hr == D3DERR_DEVICENOTRESET) && !reset()) + return false; + } + } + + DWORD flags = 0; + + if (backBuffer) + flags |= D3DCLEAR_TARGET; + + if (zBuffer) + flags |= D3DCLEAR_ZBUFFER; + + if (Params.Stencilbuffer) + flags |= D3DCLEAR_STENCIL; + + if (flags) + { + hr = pID3DDevice->Clear( 0, NULL, flags, color.color, 1.0, 0); + if (FAILED(hr)) + os::Printer::log("DIRECT3D9 clear failed.", ELL_WARNING); + } + + hr = pID3DDevice->BeginScene(); + if (FAILED(hr)) + { + os::Printer::log("DIRECT3D9 begin scene failed.", ELL_WARNING); + return false; + } + + return true; +} + + +//! applications must call this method after performing any rendering. returns false if failed. +bool CD3D9Driver::endScene() +{ + CNullDriver::endScene(); + DriverWasReset=false; + + HRESULT hr = pID3DDevice->EndScene(); + if (FAILED(hr)) + { + os::Printer::log("DIRECT3D9 end scene failed.", ELL_WARNING); + return false; + } + + RECT* srcRct = 0; + RECT sourceRectData; + if ( SceneSourceRect ) + { + srcRct = &sourceRectData; + sourceRectData.left = SceneSourceRect->UpperLeftCorner.X; + sourceRectData.top = SceneSourceRect->UpperLeftCorner.Y; + sourceRectData.right = SceneSourceRect->LowerRightCorner.X; + sourceRectData.bottom = SceneSourceRect->LowerRightCorner.Y; + } + + IDirect3DSwapChain9* swChain; + hr = pID3DDevice->GetSwapChain(0, &swChain); + DWORD flags = (Params.HandleSRGB && (Caps.Caps3&D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION))?D3DPRESENT_LINEAR_CONTENT:0; + hr = swChain->Present(srcRct, NULL, WindowId, NULL, flags); + swChain->Release(); + + if (SUCCEEDED(hr)) + return true; + + if (hr == D3DERR_DEVICELOST) + { + DeviceLost = true; + os::Printer::log("Present failed", "DIRECT3D9 device lost.", ELL_WARNING); + } +#ifdef D3DERR_DEVICEREMOVED + else if (hr == D3DERR_DEVICEREMOVED) + { + os::Printer::log("Present failed", "Device removed.", ELL_WARNING); + } +#endif + else if (hr == D3DERR_INVALIDCALL) + { + os::Printer::log("Present failed", "Invalid Call", ELL_WARNING); + } + else + os::Printer::log("DIRECT3D9 present failed.", ELL_WARNING); + return false; +} + + +//! queries the features of the driver, returns true if feature is available +bool CD3D9Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const +{ + if (!FeatureEnabled[feature]) + return false; + + switch (feature) + { + case EVDF_MULTITEXTURE: + case EVDF_BILINEAR_FILTER: + return true; + case EVDF_RENDER_TO_TARGET: + return Caps.NumSimultaneousRTs > 0; + case EVDF_HARDWARE_TL: + return (Caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) != 0; + case EVDF_MIP_MAP: + return (Caps.TextureCaps & D3DPTEXTURECAPS_MIPMAP) != 0; + case EVDF_MIP_MAP_AUTO_UPDATE: + // always return false because a lot of drivers claim they do + // this but actually don't do this at all. + return false; //(Caps.Caps2 & D3DCAPS2_CANAUTOGENMIPMAP) != 0; + case EVDF_STENCIL_BUFFER: + return Params.Stencilbuffer && Caps.StencilCaps; + case EVDF_VERTEX_SHADER_1_1: + return Caps.VertexShaderVersion >= D3DVS_VERSION(1,1); + case EVDF_VERTEX_SHADER_2_0: + return Caps.VertexShaderVersion >= D3DVS_VERSION(2,0); + case EVDF_VERTEX_SHADER_3_0: + return Caps.VertexShaderVersion >= D3DVS_VERSION(3,0); + case EVDF_PIXEL_SHADER_1_1: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,1); + case EVDF_PIXEL_SHADER_1_2: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,2); + case EVDF_PIXEL_SHADER_1_3: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,3); + case EVDF_PIXEL_SHADER_1_4: + return Caps.PixelShaderVersion >= D3DPS_VERSION(1,4); + case EVDF_PIXEL_SHADER_2_0: + return Caps.PixelShaderVersion >= D3DPS_VERSION(2,0); + case EVDF_PIXEL_SHADER_3_0: + return Caps.PixelShaderVersion >= D3DPS_VERSION(3,0); + case EVDF_HLSL: + return Caps.VertexShaderVersion >= D3DVS_VERSION(1,1); + case EVDF_TEXTURE_NSQUARE: + return (Caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY) == 0; + case EVDF_TEXTURE_NPOT: + return (Caps.TextureCaps & D3DPTEXTURECAPS_POW2) == 0; + case EVDF_COLOR_MASK: + return (Caps.PrimitiveMiscCaps & D3DPMISCCAPS_COLORWRITEENABLE) != 0; + case EVDF_MULTIPLE_RENDER_TARGETS: + return Caps.NumSimultaneousRTs > 1; + case EVDF_MRT_COLOR_MASK: + return (Caps.PrimitiveMiscCaps & D3DPMISCCAPS_INDEPENDENTWRITEMASKS) != 0; + case EVDF_MRT_BLEND: + return (Caps.PrimitiveMiscCaps & D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING) != 0; + case EVDF_OCCLUSION_QUERY: + return OcclusionQuerySupport; + case EVDF_POLYGON_OFFSET: + return (Caps.RasterCaps & (D3DPRASTERCAPS_DEPTHBIAS|D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS)) != 0; + case EVDF_BLEND_OPERATIONS: + case EVDF_TEXTURE_MATRIX: +#ifdef _IRR_COMPILE_WITH_CG_ + // available iff. define is present + case EVDF_CG: +#endif + return true; + default: + return false; + }; +} + + +//! sets transformation +void CD3D9Driver::setTransform(E_TRANSFORMATION_STATE state, + const core::matrix4& mat) +{ + Transformation3DChanged = true; + + switch(state) + { + case ETS_VIEW: + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)mat.pointer())); + break; + case ETS_WORLD: + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)mat.pointer())); + break; + case ETS_PROJECTION: + pID3DDevice->SetTransform( D3DTS_PROJECTION, (D3DMATRIX*)((void*)mat.pointer())); + break; + case ETS_COUNT: + return; + default: + if (state-ETS_TEXTURE_0 < MATERIAL_MAX_TEXTURES) + { + if (mat.isIdentity()) + pID3DDevice->SetTextureStageState( state - ETS_TEXTURE_0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + else + { + pID3DDevice->SetTextureStageState( state - ETS_TEXTURE_0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTransform((D3DTRANSFORMSTATETYPE)(D3DTS_TEXTURE0+ ( state - ETS_TEXTURE_0 )), + (D3DMATRIX*)((void*)mat.pointer())); + } + } + break; + } + + Matrices[state] = mat; +} + + +//! sets the current Texture +bool CD3D9Driver::setActiveTexture(u32 stage, const video::ITexture* texture) +{ + if (CurrentTexture[stage] == texture) + return true; + + if (texture && texture->getDriverType() != EDT_DIRECT3D9) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + CurrentTexture[stage] = texture; + + if (!texture) + { + pID3DDevice->SetTexture(stage, 0); + pID3DDevice->SetTextureStageState( stage, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + } + else + { + pID3DDevice->SetTexture(stage, ((const CD3D9Texture*)texture)->getDX9Texture()); + } + return true; +} + + +//! sets a material +void CD3D9Driver::setMaterial(const SMaterial& material) +{ + Material = material; + OverrideMaterial.apply(Material); + + for (u32 i=0; i<MaxTextureUnits; ++i) + { + setActiveTexture(i, Material.getTexture(i)); + setTransform((E_TRANSFORMATION_STATE) ( ETS_TEXTURE_0 + i ), + material.getTextureMatrix(i)); + } +} + + +//! returns a device dependent texture from a software surface (IImage) +video::ITexture* CD3D9Driver::createDeviceDependentTexture(IImage* surface,const io::path& name, void* mipmapData) +{ + return new CD3D9Texture(surface, this, TextureCreationFlags, name, mipmapData); +} + + +//! Enables or disables a texture creation flag. +void CD3D9Driver::setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, + bool enabled) +{ + if (flag == video::ETCF_CREATE_MIP_MAPS && !queryFeature(EVDF_MIP_MAP)) + enabled = false; + + CNullDriver::setTextureCreationFlag(flag, enabled); +} + + +//! sets a render target +bool CD3D9Driver::setRenderTarget(video::ITexture* texture, + bool clearBackBuffer, bool clearZBuffer, SColor color) +{ + // check for right driver type + + if (texture && texture->getDriverType() != EDT_DIRECT3D9) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + // check for valid render target + + if (texture && !texture->isRenderTarget()) + { + os::Printer::log("Fatal Error: Tried to set a non render target texture as render target.", ELL_ERROR); + return false; + } + + CD3D9Texture* tex = static_cast<CD3D9Texture*>(texture); + + // check if we should set the previous RT back + + bool ret = true; + + for(u32 i = 1; i < NumSetMRTs; i++) + { + // First texture handled elsewhere + pID3DDevice->SetRenderTarget(i, NULL); + } + if (tex == 0) + { + if (PrevRenderTarget) + { + if (FAILED(pID3DDevice->SetRenderTarget(0, PrevRenderTarget))) + { + os::Printer::log("Error: Could not set back to previous render target.", ELL_ERROR); + ret = false; + } + if (FAILED(pID3DDevice->SetDepthStencilSurface(DepthBuffers[0]->Surface))) + { + os::Printer::log("Error: Could not set main depth buffer.", ELL_ERROR); + } + + CurrentRendertargetSize = core::dimension2d<u32>(0,0); + PrevRenderTarget->Release(); + PrevRenderTarget = 0; + } + } + else + { + // we want to set a new target. so do this. + + // store previous target + + if (!PrevRenderTarget) + { + if (FAILED(pID3DDevice->GetRenderTarget(0, &PrevRenderTarget))) + { + os::Printer::log("Could not get previous render target.", ELL_ERROR); + return false; + } + } + + // set new render target + + if (FAILED(pID3DDevice->SetRenderTarget(0, tex->getRenderTargetSurface()))) + { + os::Printer::log("Error: Could not set render target.", ELL_ERROR); + return false; + } + CurrentRendertargetSize = tex->getSize(); + + if (FAILED(pID3DDevice->SetDepthStencilSurface(tex->DepthSurface->Surface))) + { + os::Printer::log("Error: Could not set new depth buffer.", ELL_ERROR); + } + } + Transformation3DChanged=true; + + if (clearBackBuffer || clearZBuffer) + { + DWORD flags = 0; + + if (clearBackBuffer) + flags |= D3DCLEAR_TARGET; + + if (clearZBuffer) + flags |= D3DCLEAR_ZBUFFER; + + pID3DDevice->Clear(0, NULL, flags, color.color, 1.0f, 0); + } + + return ret; +} + + +//! Sets multiple render targets +bool CD3D9Driver::setRenderTarget(const core::array<video::IRenderTarget>& targets, + bool clearBackBuffer, bool clearZBuffer, SColor color) +{ + if (targets.size()==0) + return setRenderTarget(0, clearBackBuffer, clearZBuffer, color); + + u32 maxMultipleRTTs = core::min_(MaxMRTs, targets.size()); + + for (u32 i = 0; i < maxMultipleRTTs; ++i) + { + if (targets[i].TargetType != ERT_RENDER_TEXTURE || !targets[i].RenderTexture) + { + maxMultipleRTTs = i; + os::Printer::log("Missing texture for MRT.", ELL_WARNING); + break; + } + + // check for right driver type + + if (targets[i].RenderTexture->getDriverType() != EDT_DIRECT3D9) + { + maxMultipleRTTs = i; + os::Printer::log("Tried to set a texture not owned by this driver.", ELL_WARNING); + break; + } + + // check for valid render target + + if (!targets[i].RenderTexture->isRenderTarget()) + { + maxMultipleRTTs = i; + os::Printer::log("Tried to set a non render target texture as render target.", ELL_WARNING); + break; + } + + // check for valid size + + if (targets[0].RenderTexture->getSize() != targets[i].RenderTexture->getSize()) + { + maxMultipleRTTs = i; + os::Printer::log("Render target texture has wrong size.", ELL_WARNING); + break; + } + } + if (maxMultipleRTTs==0) + { + os::Printer::log("Fatal Error: No valid MRT found.", ELL_ERROR); + return false; + } + + CD3D9Texture* tex = static_cast<CD3D9Texture*>(targets[0].RenderTexture); + + // check if we should set the previous RT back + + bool ret = true; + + // we want to set a new target. so do this. + // store previous target + + if (!PrevRenderTarget) + { + if (FAILED(pID3DDevice->GetRenderTarget(0, &PrevRenderTarget))) + { + os::Printer::log("Could not get previous render target.", ELL_ERROR); + return false; + } + } + + // set new render target + + // In d3d9 we have at most 4 MRTs, so the following is enough + D3DRENDERSTATETYPE colorWrite[4]={D3DRS_COLORWRITEENABLE, D3DRS_COLORWRITEENABLE1, D3DRS_COLORWRITEENABLE2, D3DRS_COLORWRITEENABLE3}; + for (u32 i = 0; i < maxMultipleRTTs; ++i) + { + if (FAILED(pID3DDevice->SetRenderTarget(i, static_cast<CD3D9Texture*>(targets[i].RenderTexture)->getRenderTargetSurface()))) + { + os::Printer::log("Error: Could not set render target.", ELL_ERROR); + return false; + } + if (i<4 && (i==0 || queryFeature(EVDF_MRT_COLOR_MASK))) + { + const DWORD flag = + ((targets[i].ColorMask & ECP_RED)?D3DCOLORWRITEENABLE_RED:0) | + ((targets[i].ColorMask & ECP_GREEN)?D3DCOLORWRITEENABLE_GREEN:0) | + ((targets[i].ColorMask & ECP_BLUE)?D3DCOLORWRITEENABLE_BLUE:0) | + ((targets[i].ColorMask & ECP_ALPHA)?D3DCOLORWRITEENABLE_ALPHA:0); + pID3DDevice->SetRenderState(colorWrite[i], flag); + } + } + for(u32 i = maxMultipleRTTs; i < NumSetMRTs; i++) + { + pID3DDevice->SetRenderTarget(i, NULL); + } + NumSetMRTs=maxMultipleRTTs; + + CurrentRendertargetSize = tex->getSize(); + + if (FAILED(pID3DDevice->SetDepthStencilSurface(tex->DepthSurface->Surface))) + { + os::Printer::log("Error: Could not set new depth buffer.", ELL_ERROR); + } + + if (clearBackBuffer || clearZBuffer) + { + DWORD flags = 0; + + if (clearBackBuffer) + flags |= D3DCLEAR_TARGET; + + if (clearZBuffer) + flags |= D3DCLEAR_ZBUFFER; + + pID3DDevice->Clear(0, NULL, flags, color.color, 1.0f, 0); + } + + return ret; +} + + +//! sets a viewport +void CD3D9Driver::setViewPort(const core::rect<s32>& area) +{ + core::rect<s32> vp = area; + core::rect<s32> rendert(0,0, getCurrentRenderTargetSize().Width, getCurrentRenderTargetSize().Height); + vp.clipAgainst(rendert); + if (vp.getHeight()>0 && vp.getWidth()>0) + { + D3DVIEWPORT9 viewPort; + viewPort.X = vp.UpperLeftCorner.X; + viewPort.Y = vp.UpperLeftCorner.Y; + viewPort.Width = vp.getWidth(); + viewPort.Height = vp.getHeight(); + viewPort.MinZ = 0.0f; + viewPort.MaxZ = 1.0f; + + HRESULT hr = pID3DDevice->SetViewport(&viewPort); + if (FAILED(hr)) + os::Printer::log("Failed setting the viewport.", ELL_WARNING); + else + ViewPort = vp; + } +} + + +//! gets the area of the current viewport +const core::rect<s32>& CD3D9Driver::getViewPort() const +{ + return ViewPort; +} + + +bool CD3D9Driver::updateVertexHardwareBuffer(SHWBufferLink_d3d9 *hwBuffer) +{ + if (!hwBuffer) + return false; + + const scene::IMeshBuffer* mb = hwBuffer->MeshBuffer; + const void* vertices=mb->getVertices(); + const u32 vertexCount=mb->getVertexCount(); + const E_VERTEX_TYPE vType=mb->getVertexType(); + const u32 vertexSize = getVertexPitchFromType(vType); + const u32 bufSize = vertexSize * vertexCount; + + if (!hwBuffer->vertexBuffer || (bufSize > hwBuffer->vertexBufferSize)) + { + if (hwBuffer->vertexBuffer) + { + hwBuffer->vertexBuffer->Release(); + hwBuffer->vertexBuffer=0; + } + + DWORD FVF; + // Get the vertex sizes and cvf + switch (vType) + { + case EVT_STANDARD: + FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1; + break; + case EVT_2TCOORDS: + FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX2; + break; + case EVT_TANGENTS: + FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX3; + break; + default: + return false; + } + + DWORD flags = D3DUSAGE_WRITEONLY; // SIO2: Default to D3DUSAGE_WRITEONLY + if (hwBuffer->Mapped_Vertex != scene::EHM_STATIC) + flags |= D3DUSAGE_DYNAMIC; + + if (FAILED(pID3DDevice->CreateVertexBuffer(bufSize, flags, FVF, D3DPOOL_DEFAULT, &hwBuffer->vertexBuffer, NULL))) + return false; + hwBuffer->vertexBufferSize = bufSize; + + flags = 0; // SIO2: Reset flags before Lock + if (hwBuffer->Mapped_Vertex != scene::EHM_STATIC) + flags = D3DLOCK_DISCARD; + + void* lockedBuffer = 0; + hwBuffer->vertexBuffer->Lock(0, bufSize, (void**)&lockedBuffer, flags); + memcpy(lockedBuffer, vertices, bufSize); + hwBuffer->vertexBuffer->Unlock(); + } + else + { + void* lockedBuffer = 0; + hwBuffer->vertexBuffer->Lock(0, bufSize, (void**)&lockedBuffer, D3DLOCK_DISCARD); + memcpy(lockedBuffer, vertices, bufSize); + hwBuffer->vertexBuffer->Unlock(); + } + + return true; +} + + +bool CD3D9Driver::updateIndexHardwareBuffer(SHWBufferLink_d3d9 *hwBuffer) +{ + if (!hwBuffer) + return false; + + const scene::IMeshBuffer* mb = hwBuffer->MeshBuffer; + const u16* indices=mb->getIndices(); + const u32 indexCount=mb->getIndexCount(); + u32 indexSize = 2; + D3DFORMAT indexType=D3DFMT_UNKNOWN; + switch (mb->getIndexType()) + { + case EIT_16BIT: + { + indexType=D3DFMT_INDEX16; + indexSize = 2; + break; + } + case EIT_32BIT: + { + indexType=D3DFMT_INDEX32; + indexSize = 4; + break; + } + } + + const u32 bufSize = indexSize * indexCount; + if (!hwBuffer->indexBuffer || (bufSize > hwBuffer->indexBufferSize)) + { + if (hwBuffer->indexBuffer) + { + hwBuffer->indexBuffer->Release(); + hwBuffer->indexBuffer=0; + } + + DWORD flags = D3DUSAGE_WRITEONLY; // SIO2: Default to D3DUSAGE_WRITEONLY + if (hwBuffer->Mapped_Index != scene::EHM_STATIC) + flags |= D3DUSAGE_DYNAMIC; // SIO2: Add DYNAMIC flag for dynamic buffer data + + if (FAILED(pID3DDevice->CreateIndexBuffer(bufSize, flags, indexType, D3DPOOL_DEFAULT, &hwBuffer->indexBuffer, NULL))) + return false; + + flags = 0; // SIO2: Reset flags before Lock + if (hwBuffer->Mapped_Index != scene::EHM_STATIC) + flags = D3DLOCK_DISCARD; + + void* lockedBuffer = 0; + if (FAILED(hwBuffer->indexBuffer->Lock( 0, 0, (void**)&lockedBuffer, flags))) + return false; + + memcpy(lockedBuffer, indices, bufSize); + hwBuffer->indexBuffer->Unlock(); + + hwBuffer->indexBufferSize = bufSize; + } + else + { + void* lockedBuffer = 0; + if( SUCCEEDED(hwBuffer->indexBuffer->Lock( 0, 0, (void**)&lockedBuffer, D3DLOCK_DISCARD))) + { + memcpy(lockedBuffer, indices, bufSize); + hwBuffer->indexBuffer->Unlock(); + } + } + + return true; +} + + +//! updates hardware buffer if needed +bool CD3D9Driver::updateHardwareBuffer(SHWBufferLink *hwBuffer) +{ + if (!hwBuffer) + return false; + + if (hwBuffer->Mapped_Vertex!=scene::EHM_NEVER) + { + if (hwBuffer->ChangedID_Vertex != hwBuffer->MeshBuffer->getChangedID_Vertex() + || !((SHWBufferLink_d3d9*)hwBuffer)->vertexBuffer) + { + hwBuffer->ChangedID_Vertex = hwBuffer->MeshBuffer->getChangedID_Vertex(); + + if (!updateVertexHardwareBuffer((SHWBufferLink_d3d9*)hwBuffer)) + return false; + } + } + + if (hwBuffer->Mapped_Index!=scene::EHM_NEVER) + { + if (hwBuffer->ChangedID_Index != hwBuffer->MeshBuffer->getChangedID_Index() + || !((SHWBufferLink_d3d9*)hwBuffer)->indexBuffer) + { + hwBuffer->ChangedID_Index = hwBuffer->MeshBuffer->getChangedID_Index(); + + if (!updateIndexHardwareBuffer((SHWBufferLink_d3d9*)hwBuffer)) + return false; + } + } + + return true; +} + + +//! Create hardware buffer from meshbuffer +CD3D9Driver::SHWBufferLink *CD3D9Driver::createHardwareBuffer(const scene::IMeshBuffer* mb) +{ + // Looks like d3d does not support only partial buffering, so refuse + // in any case of NEVER + if (!mb || (mb->getHardwareMappingHint_Index()==scene::EHM_NEVER || mb->getHardwareMappingHint_Vertex()==scene::EHM_NEVER)) + return 0; + + SHWBufferLink_d3d9 *hwBuffer=new SHWBufferLink_d3d9(mb); + + //add to map + HWBufferMap.insert(hwBuffer->MeshBuffer, hwBuffer); + + hwBuffer->ChangedID_Vertex=hwBuffer->MeshBuffer->getChangedID_Vertex(); + hwBuffer->ChangedID_Index=hwBuffer->MeshBuffer->getChangedID_Index(); + hwBuffer->Mapped_Vertex=mb->getHardwareMappingHint_Vertex(); + hwBuffer->Mapped_Index=mb->getHardwareMappingHint_Index(); + hwBuffer->LastUsed=0; + hwBuffer->vertexBuffer=0; + hwBuffer->indexBuffer=0; + hwBuffer->vertexBufferSize=0; + hwBuffer->indexBufferSize=0; + + if (!updateHardwareBuffer(hwBuffer)) + { + deleteHardwareBuffer(hwBuffer); + return 0; + } + + return hwBuffer; +} + + +void CD3D9Driver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer) +{ + if (!_HWBuffer) + return; + + SHWBufferLink_d3d9 *HWBuffer=(SHWBufferLink_d3d9*)_HWBuffer; + if (HWBuffer->indexBuffer) + { + HWBuffer->indexBuffer->Release(); + HWBuffer->indexBuffer = 0; + } + + if (HWBuffer->vertexBuffer) + { + HWBuffer->vertexBuffer->Release(); + HWBuffer->vertexBuffer = 0; + } + + CNullDriver::deleteHardwareBuffer(_HWBuffer); +} + + +//! Draw hardware buffer +void CD3D9Driver::drawHardwareBuffer(SHWBufferLink *_HWBuffer) +{ + if (!_HWBuffer) + return; + + SHWBufferLink_d3d9 *HWBuffer=(SHWBufferLink_d3d9*)_HWBuffer; + + updateHardwareBuffer(HWBuffer); //check if update is needed + + HWBuffer->LastUsed=0;//reset count + + const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; + const E_VERTEX_TYPE vType = mb->getVertexType(); + const u32 stride = getVertexPitchFromType(vType); + const void* vPtr = mb->getVertices(); + const void* iPtr = mb->getIndices(); + if (HWBuffer->vertexBuffer) + { + pID3DDevice->SetStreamSource(0, HWBuffer->vertexBuffer, 0, stride); + vPtr=0; + } + if (HWBuffer->indexBuffer) + { + pID3DDevice->SetIndices(HWBuffer->indexBuffer); + iPtr=0; + } + + drawVertexPrimitiveList(vPtr, mb->getVertexCount(), iPtr, mb->getIndexCount()/3, mb->getVertexType(), scene::EPT_TRIANGLES, mb->getIndexType()); + + if (HWBuffer->vertexBuffer) + pID3DDevice->SetStreamSource(0, 0, 0, 0); + if (HWBuffer->indexBuffer) + pID3DDevice->SetIndices(0); +} + + +//! Create occlusion query. +/** Use node for identification and mesh for occlusion test. */ +void CD3D9Driver::addOcclusionQuery(scene::ISceneNode* node, + const scene::IMesh* mesh) +{ + if (!queryFeature(EVDF_OCCLUSION_QUERY)) + return; + CNullDriver::addOcclusionQuery(node, mesh); + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if ((index != -1) && (OcclusionQueries[index].PID == 0)) + pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, reinterpret_cast<IDirect3DQuery9**>(&OcclusionQueries[index].PID)); +} + + +//! Remove occlusion query. +void CD3D9Driver::removeOcclusionQuery(scene::ISceneNode* node) +{ + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + if (OcclusionQueries[index].PID != 0) + reinterpret_cast<IDirect3DQuery9*>(OcclusionQueries[index].PID)->Release(); + CNullDriver::removeOcclusionQuery(node); + } +} + + +//! Run occlusion query. Draws mesh stored in query. +/** If the mesh shall not be rendered visible, use +overrideMaterial to disable the color and depth buffer. */ +void CD3D9Driver::runOcclusionQuery(scene::ISceneNode* node, bool visible) +{ + if (!node) + return; + + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + if (OcclusionQueries[index].PID) + reinterpret_cast<IDirect3DQuery9*>(OcclusionQueries[index].PID)->Issue(D3DISSUE_BEGIN); + CNullDriver::runOcclusionQuery(node,visible); + if (OcclusionQueries[index].PID) + reinterpret_cast<IDirect3DQuery9*>(OcclusionQueries[index].PID)->Issue(D3DISSUE_END); + } +} + + +//! Update occlusion query. Retrieves results from GPU. +/** If the query shall not block, set the flag to false. +Update might not occur in this case, though */ +void CD3D9Driver::updateOcclusionQuery(scene::ISceneNode* node, bool block) +{ + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + // not yet started + if (OcclusionQueries[index].Run==u32(~0)) + return; + bool available = block?true:false; + int tmp=0; + if (!block) + available=(reinterpret_cast<IDirect3DQuery9*>(OcclusionQueries[index].PID)->GetData(&tmp, sizeof(DWORD), 0)==S_OK); + else + { + do + { + HRESULT hr = reinterpret_cast<IDirect3DQuery9*>(OcclusionQueries[index].PID)->GetData(&tmp, sizeof(DWORD), D3DGETDATA_FLUSH); + available = (hr == S_OK); + if (hr!=S_FALSE) + break; + } while (!available); + } + if (available) + OcclusionQueries[index].Result = tmp; + } +} + + +//! Return query result. +/** Return value is the number of visible pixels/fragments. +The value is a safe approximation, i.e. can be larger than the +actual value of pixels. */ +u32 CD3D9Driver::getOcclusionQueryResult(scene::ISceneNode* node) const +{ + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + return OcclusionQueries[index].Result; + else + return ~0; +} + + +//! draws a vertex primitive list +void CD3D9Driver::drawVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType) +{ + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::drawVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType,iType); + + if (!vertexCount || !primitiveCount) + return; + + draw2D3DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, + vType, pType, iType, true); +} + + +//! draws a vertex primitive list +void CD3D9Driver::draw2DVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType) +{ + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::draw2DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType,iType); + + if (!vertexCount || !primitiveCount) + return; + + draw2D3DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, + vType, pType, iType, false); +} + + +void CD3D9Driver::draw2D3DVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType, bool is3D) +{ + setVertexShader(vType); + + const u32 stride = getVertexPitchFromType(vType); + + D3DFORMAT indexType=D3DFMT_UNKNOWN; + switch (iType) + { + case (EIT_16BIT): + { + indexType=D3DFMT_INDEX16; + break; + } + case (EIT_32BIT): + { + indexType=D3DFMT_INDEX32; + break; + } + } + + if (is3D) + { + if (!setRenderStates3DMode()) + return; + } + else + { + if (Material.MaterialType==EMT_ONETEXTURE_BLEND) + { + E_BLEND_FACTOR srcFact; + E_BLEND_FACTOR dstFact; + E_MODULATE_FUNC modulo; + u32 alphaSource; + unpack_textureBlendFunc ( srcFact, dstFact, modulo, alphaSource, Material.MaterialTypeParam); + setRenderStates2DMode(alphaSource&video::EAS_VERTEX_COLOR, (Material.getTexture(0) != 0), (alphaSource&video::EAS_TEXTURE) != 0); + } + else + setRenderStates2DMode(Material.MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA, (Material.getTexture(0) != 0), Material.MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL); + } + + switch (pType) + { + case scene::EPT_POINT_SPRITES: + case scene::EPT_POINTS: + { + f32 tmp=Material.Thickness/getScreenSize().Height; + if (pType==scene::EPT_POINT_SPRITES) + pID3DDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_POINTSCALEENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_POINTSIZE, F2DW(tmp)); + tmp=1.0f; + pID3DDevice->SetRenderState(D3DRS_POINTSCALE_A, F2DW(tmp)); + pID3DDevice->SetRenderState(D3DRS_POINTSCALE_B, F2DW(tmp)); + pID3DDevice->SetRenderState(D3DRS_POINTSIZE_MIN, F2DW(tmp)); + tmp=0.0f; + pID3DDevice->SetRenderState(D3DRS_POINTSCALE_C, F2DW(tmp)); + + if (!vertices) + { + pID3DDevice->DrawIndexedPrimitive(D3DPT_POINTLIST, 0, 0, vertexCount, 0, primitiveCount); + } + else + { + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_POINTLIST, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + } + + pID3DDevice->SetRenderState(D3DRS_POINTSCALEENABLE, FALSE); + if (pType==scene::EPT_POINT_SPRITES) + pID3DDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, FALSE); + } + break; + case scene::EPT_LINE_STRIP: + if(!vertices) + pID3DDevice->DrawIndexedPrimitive(D3DPT_LINESTRIP, 0, 0, vertexCount, 0, primitiveCount); + else + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + case scene::EPT_LINE_LOOP: + if(!vertices) + { + // TODO: Implement proper hardware support for this primitive type. + // (No looping occurs currently because this would require a way to + // draw the hardware buffer with a custom set of indices. We may even + // need to create a new mini index buffer specifically for this + // primitive type.) + pID3DDevice->DrawIndexedPrimitive(D3DPT_LINELIST, 0, 0, vertexCount, 0, primitiveCount); + } + else + { + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, + primitiveCount - 1, indexList, indexType, vertices, stride); + + u16 tmpIndices[] = {primitiveCount - 1, 0}; + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, + 1, tmpIndices, indexType, vertices, stride); + } + break; + case scene::EPT_LINES: + if(!vertices) + pID3DDevice->DrawIndexedPrimitive(D3DPT_LINELIST, 0, 0, vertexCount, 0, primitiveCount); + else + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + break; + case scene::EPT_TRIANGLE_STRIP: + if(!vertices) + pID3DDevice->DrawIndexedPrimitive(D3DPT_TRIANGLESTRIP, 0, 0, vertexCount, 0, primitiveCount); + else + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLESTRIP, 0, vertexCount, primitiveCount, + indexList, indexType, vertices, stride); + break; + case scene::EPT_TRIANGLE_FAN: + if(!vertices) + pID3DDevice->DrawIndexedPrimitive(D3DPT_TRIANGLEFAN, 0, 0, vertexCount, 0, primitiveCount); + else + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLEFAN, 0, vertexCount, primitiveCount, + indexList, indexType, vertices, stride); + break; + case scene::EPT_TRIANGLES: + if(!vertices) + { + pID3DDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, vertexCount, 0, primitiveCount); + } + else + { + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, vertexCount, + primitiveCount, indexList, indexType, vertices, stride); + } + break; + } +} + + +void CD3D9Driver::draw2DImage(const video::ITexture* texture, + const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, + const video::SColor* const colors, + bool useAlphaChannelOfTexture) +{ + if(!texture) + return; + + const core::dimension2d<u32>& ss = texture->getOriginalSize(); + core::rect<f32> tcoords; + tcoords.UpperLeftCorner.X = (f32)sourceRect.UpperLeftCorner.X / (f32)ss.Width; + tcoords.UpperLeftCorner.Y = (f32)sourceRect.UpperLeftCorner.Y / (f32)ss.Height; + tcoords.LowerRightCorner.X = (f32)sourceRect.LowerRightCorner.X / (f32)ss.Width; + tcoords.LowerRightCorner.Y = (f32)sourceRect.LowerRightCorner.Y / (f32)ss.Height; + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + + const video::SColor temp[4] = + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }; + + const video::SColor* const useColor = colors ? colors : temp; + + S3DVertex vtx[4]; // clock wise + vtx[0] = S3DVertex((f32)destRect.UpperLeftCorner.X, (f32)destRect.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[0], + tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + vtx[1] = S3DVertex((f32)destRect.LowerRightCorner.X, (f32)destRect.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[3], + tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + vtx[2] = S3DVertex((f32)destRect.LowerRightCorner.X, (f32)destRect.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[2], + tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + vtx[3] = S3DVertex((f32)destRect.UpperLeftCorner.X, (f32)destRect.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, useColor[1], + tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + + s16 indices[6] = {0,1,2,0,2,3}; + + setActiveTexture(0, const_cast<video::ITexture*>(texture)); + + setRenderStates2DMode(useColor[0].getAlpha()<255 || useColor[1].getAlpha()<255 || + useColor[2].getAlpha()<255 || useColor[3].getAlpha()<255, + true, useAlphaChannelOfTexture); + + setVertexShader(EVT_STANDARD); + + if (clipRect) + { + pID3DDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE); + RECT scissor; + scissor.left = clipRect->UpperLeftCorner.X; + scissor.top = clipRect->UpperLeftCorner.Y; + scissor.right = clipRect->LowerRightCorner.X; + scissor.bottom = clipRect->LowerRightCorner.Y; + pID3DDevice->SetScissorRect(&scissor); + } + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16,&vtx[0], sizeof(S3DVertex)); + + if (clipRect) + pID3DDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE); +} + + +void CD3D9Driver::draw2DImageBatch(const video::ITexture* texture, + const core::array<core::position2d<s32> >& positions, + const core::array<core::rect<s32> >& sourceRects, + const core::rect<s32>* clipRect, + SColor color, + bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + if (!setActiveTexture(0, const_cast<video::ITexture*>(texture))) + return; + + setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture); + + const irr::u32 drawCount = core::min_<u32>(positions.size(), sourceRects.size()); + + core::array<S3DVertex> vtx(drawCount * 4); + core::array<u16> indices(drawCount * 6); + + for(u32 i = 0;i < drawCount;i++) + { + core::position2d<s32> targetPos = positions[i]; + core::position2d<s32> sourcePos = sourceRects[i].UpperLeftCorner; + // This needs to be signed as it may go negative. + core::dimension2d<s32> sourceSize(sourceRects[i].getSize()); + + if (clipRect) + { + if (targetPos.X < clipRect->UpperLeftCorner.X) + { + sourceSize.Width += targetPos.X - clipRect->UpperLeftCorner.X; + if (sourceSize.Width <= 0) + continue; + + sourcePos.X -= targetPos.X - clipRect->UpperLeftCorner.X; + targetPos.X = clipRect->UpperLeftCorner.X; + } + + if (targetPos.X + (s32)sourceSize.Width > clipRect->LowerRightCorner.X) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - clipRect->LowerRightCorner.X; + if (sourceSize.Width <= 0) + continue; + } + + if (targetPos.Y < clipRect->UpperLeftCorner.Y) + { + sourceSize.Height += targetPos.Y - clipRect->UpperLeftCorner.Y; + if (sourceSize.Height <= 0) + continue; + + sourcePos.Y -= targetPos.Y - clipRect->UpperLeftCorner.Y; + targetPos.Y = clipRect->UpperLeftCorner.Y; + } + + if (targetPos.Y + (s32)sourceSize.Height > clipRect->LowerRightCorner.Y) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - clipRect->LowerRightCorner.Y; + if (sourceSize.Height <= 0) + continue; + } + } + + // clip these coordinates + + if (targetPos.X<0) + { + sourceSize.Width += targetPos.X; + if (sourceSize.Width <= 0) + continue; + + sourcePos.X -= targetPos.X; + targetPos.X = 0; + } + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + + if (targetPos.X + sourceSize.Width > (s32)renderTargetSize.Width) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - renderTargetSize.Width; + if (sourceSize.Width <= 0) + continue; + } + + if (targetPos.Y<0) + { + sourceSize.Height += targetPos.Y; + if (sourceSize.Height <= 0) + continue; + + sourcePos.Y -= targetPos.Y; + targetPos.Y = 0; + } + + if (targetPos.Y + sourceSize.Height > (s32)renderTargetSize.Height) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - renderTargetSize.Height; + if (sourceSize.Height <= 0) + continue; + } + + // ok, we've clipped everything. + // now draw it. + + core::rect<f32> tcoords; + tcoords.UpperLeftCorner.X = (((f32)sourcePos.X)) / texture->getOriginalSize().Width ; + tcoords.UpperLeftCorner.Y = (((f32)sourcePos.Y)) / texture->getOriginalSize().Height; + tcoords.LowerRightCorner.X = tcoords.UpperLeftCorner.X + ((f32)(sourceSize.Width) / texture->getOriginalSize().Width); + tcoords.LowerRightCorner.Y = tcoords.UpperLeftCorner.Y + ((f32)(sourceSize.Height) / texture->getOriginalSize().Height); + + const core::rect<s32> poss(targetPos, sourceSize); + + vtx.push_back(S3DVertex((f32)poss.UpperLeftCorner.X, (f32)poss.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y)); + vtx.push_back(S3DVertex((f32)poss.LowerRightCorner.X, (f32)poss.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y)); + vtx.push_back(S3DVertex((f32)poss.LowerRightCorner.X, (f32)poss.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y)); + vtx.push_back(S3DVertex((f32)poss.UpperLeftCorner.X, (f32)poss.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y)); + + const u32 curPos = vtx.size()-4; + indices.push_back(0+curPos); + indices.push_back(1+curPos); + indices.push_back(2+curPos); + + indices.push_back(0+curPos); + indices.push_back(2+curPos); + indices.push_back(3+curPos); + } + + if (vtx.size()) + { + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, vtx.size(), indices.size() / 3, indices.pointer(), + D3DFMT_INDEX16,vtx.pointer(), sizeof(S3DVertex)); + } +} + + +//! draws a 2d image, using a color and the alpha channel of the texture if +//! desired. The image is drawn at pos and clipped against clipRect (if != 0). +void CD3D9Driver::draw2DImage(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + if (!sourceRect.isValid()) + return; + + if (!setActiveTexture(0, const_cast<video::ITexture*>(texture))) + return; + + core::position2d<s32> targetPos = pos; + core::position2d<s32> sourcePos = sourceRect.UpperLeftCorner; + // This needs to be signed as it may go negative. + core::dimension2d<s32> sourceSize(sourceRect.getSize()); + + if (clipRect) + { + if (targetPos.X < clipRect->UpperLeftCorner.X) + { + sourceSize.Width += targetPos.X - clipRect->UpperLeftCorner.X; + if (sourceSize.Width <= 0) + return; + + sourcePos.X -= targetPos.X - clipRect->UpperLeftCorner.X; + targetPos.X = clipRect->UpperLeftCorner.X; + } + + if (targetPos.X + (s32)sourceSize.Width > clipRect->LowerRightCorner.X) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - clipRect->LowerRightCorner.X; + if (sourceSize.Width <= 0) + return; + } + + if (targetPos.Y < clipRect->UpperLeftCorner.Y) + { + sourceSize.Height += targetPos.Y - clipRect->UpperLeftCorner.Y; + if (sourceSize.Height <= 0) + return; + + sourcePos.Y -= targetPos.Y - clipRect->UpperLeftCorner.Y; + targetPos.Y = clipRect->UpperLeftCorner.Y; + } + + if (targetPos.Y + (s32)sourceSize.Height > clipRect->LowerRightCorner.Y) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - clipRect->LowerRightCorner.Y; + if (sourceSize.Height <= 0) + return; + } + } + + // clip these coordinates + + if (targetPos.X<0) + { + sourceSize.Width += targetPos.X; + if (sourceSize.Width <= 0) + return; + + sourcePos.X -= targetPos.X; + targetPos.X = 0; + } + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + + if (targetPos.X + sourceSize.Width > (s32)renderTargetSize.Width) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - renderTargetSize.Width; + if (sourceSize.Width <= 0) + return; + } + + if (targetPos.Y<0) + { + sourceSize.Height += targetPos.Y; + if (sourceSize.Height <= 0) + return; + + sourcePos.Y -= targetPos.Y; + targetPos.Y = 0; + } + + if (targetPos.Y + sourceSize.Height > (s32)renderTargetSize.Height) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - renderTargetSize.Height; + if (sourceSize.Height <= 0) + return; + } + + // ok, we've clipped everything. + // now draw it. + + core::rect<f32> tcoords; + tcoords.UpperLeftCorner.X = (((f32)sourcePos.X)) / texture->getOriginalSize().Width ; + tcoords.UpperLeftCorner.Y = (((f32)sourcePos.Y)) / texture->getOriginalSize().Height; + tcoords.LowerRightCorner.X = tcoords.UpperLeftCorner.X + ((f32)(sourceSize.Width) / texture->getOriginalSize().Width); + tcoords.LowerRightCorner.Y = tcoords.UpperLeftCorner.Y + ((f32)(sourceSize.Height) / texture->getOriginalSize().Height); + + const core::rect<s32> poss(targetPos, sourceSize); + + setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture); + + S3DVertex vtx[4]; + vtx[0] = S3DVertex((f32)poss.UpperLeftCorner.X, (f32)poss.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + vtx[1] = S3DVertex((f32)poss.LowerRightCorner.X, (f32)poss.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + vtx[2] = S3DVertex((f32)poss.LowerRightCorner.X, (f32)poss.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + vtx[3] = S3DVertex((f32)poss.UpperLeftCorner.X, (f32)poss.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, color, + tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + + s16 indices[6] = {0,1,2,0,2,3}; + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16,&vtx[0], sizeof(S3DVertex)); +} + + +//!Draws a 2d rectangle with a gradient. +void CD3D9Driver::draw2DRectangle(const core::rect<s32>& position, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip) +{ + core::rect<s32> pos(position); + + if (clip) + pos.clipAgainst(*clip); + + if (!pos.isValid()) + return; + + S3DVertex vtx[4]; + vtx[0] = S3DVertex((f32)pos.UpperLeftCorner.X, (f32)pos.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorLeftUp, 0.0f, 0.0f); + vtx[1] = S3DVertex((f32)pos.LowerRightCorner.X, (f32)pos.UpperLeftCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorRightUp, 0.0f, 1.0f); + vtx[2] = S3DVertex((f32)pos.LowerRightCorner.X, (f32)pos.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorRightDown, 1.0f, 0.0f); + vtx[3] = S3DVertex((f32)pos.UpperLeftCorner.X, (f32)pos.LowerRightCorner.Y, 0.0f, + 0.0f, 0.0f, 0.0f, colorLeftDown, 1.0f, 1.0f); + + s16 indices[6] = {0,1,2,0,2,3}; + + setRenderStates2DMode( + colorLeftUp.getAlpha() < 255 || + colorRightUp.getAlpha() < 255 || + colorLeftDown.getAlpha() < 255 || + colorRightDown.getAlpha() < 255, false, false); + + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); +} + + +//! Draws a 2d line. +void CD3D9Driver::draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color) +{ + if (start==end) + drawPixel(start.X, start.Y, color); + else + { + // thanks to Vash TheStampede who sent in his implementation + S3DVertex vtx[2]; + vtx[0] = S3DVertex((f32)start.X+0.375f, (f32)start.Y+0.375f, 0.0f, + 0.0f, 0.0f, 0.0f, // normal + color, 0.0f, 0.0f); // texture + + vtx[1] = S3DVertex((f32)end.X+0.375f, (f32)end.Y+0.375f, 0.0f, + 0.0f, 0.0f, 0.0f, + color, 0.0f, 0.0f); + + setRenderStates2DMode(color.getAlpha() < 255, false, false); + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, + &vtx[0], sizeof(S3DVertex) ); + } +} + + +//! Draws a pixel +void CD3D9Driver::drawPixel(u32 x, u32 y, const SColor & color) +{ + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + if(x > (u32)renderTargetSize.Width || y > (u32)renderTargetSize.Height) + return; + + setRenderStates2DMode(color.getAlpha() < 255, false, false); + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + S3DVertex vertex((f32)x+0.375f, (f32)y+0.375f, 0.f, 0.f, 0.f, 0.f, color, 0.f, 0.f); + + pID3DDevice->DrawPrimitiveUP(D3DPT_POINTLIST, 1, &vertex, sizeof(vertex)); +} + + +//! sets right vertex shader +void CD3D9Driver::setVertexShader(E_VERTEX_TYPE newType) +{ + if (newType != LastVertexType) + { + LastVertexType = newType; + HRESULT hr = 0; + + switch(newType) + { + case EVT_STANDARD: + hr = pID3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1); + break; + case EVT_2TCOORDS: + hr = pID3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX2); + break; + case EVT_TANGENTS: + hr = pID3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX3 | + D3DFVF_TEXCOORDSIZE2(0) | // real texture coord + D3DFVF_TEXCOORDSIZE3(1) | // misuse texture coord 2 for tangent + D3DFVF_TEXCOORDSIZE3(2) // misuse texture coord 3 for binormal + ); + break; + } + + if (FAILED(hr)) + { + os::Printer::log("Could not set vertex Shader.", ELL_ERROR); + return; + } + } +} + + +//! sets the needed renderstates +bool CD3D9Driver::setRenderStates3DMode() +{ + if (!pID3DDevice) + return false; + + if (CurrentRenderMode != ERM_3D) + { + // switch back the matrices + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)&Matrices[ETS_VIEW])); + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)&Matrices[ETS_WORLD])); + pID3DDevice->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)((void*)&Matrices[ETS_PROJECTION])); + + pID3DDevice->SetRenderState(D3DRS_STENCILENABLE, FALSE); + pID3DDevice->SetRenderState(D3DRS_CLIPPING, TRUE); + + ResetRenderStates = true; + } + + if (ResetRenderStates || LastMaterial != Material) + { + // unset old material + + if (CurrentRenderMode == ERM_3D && + LastMaterial.MaterialType != Material.MaterialType && + LastMaterial.MaterialType >= 0 && LastMaterial.MaterialType < (s32)MaterialRenderers.size()) + MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); + + // set new material. + + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + MaterialRenderers[Material.MaterialType].Renderer->OnSetMaterial( + Material, LastMaterial, ResetRenderStates, this); + } + + bool shaderOK = true; + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + shaderOK = MaterialRenderers[Material.MaterialType].Renderer->OnRender(this, LastVertexType); + + LastMaterial = Material; + + ResetRenderStates = false; + + CurrentRenderMode = ERM_3D; + + return shaderOK; +} + + +//! Map Irrlicht texture wrap mode to native values +D3DTEXTUREADDRESS CD3D9Driver::getTextureWrapMode(const u8 clamp) +{ + switch (clamp) + { + case ETC_REPEAT: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_WRAP) + return D3DTADDRESS_WRAP; + case ETC_CLAMP: + case ETC_CLAMP_TO_EDGE: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_CLAMP) + return D3DTADDRESS_CLAMP; + case ETC_MIRROR: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_MIRROR) + return D3DTADDRESS_MIRROR; + case ETC_CLAMP_TO_BORDER: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_BORDER) + return D3DTADDRESS_BORDER; + else + return D3DTADDRESS_CLAMP; + case ETC_MIRROR_CLAMP: + case ETC_MIRROR_CLAMP_TO_EDGE: + case ETC_MIRROR_CLAMP_TO_BORDER: + if (Caps.TextureAddressCaps & D3DPTADDRESSCAPS_MIRRORONCE) + return D3DTADDRESS_MIRRORONCE; + else + return D3DTADDRESS_CLAMP; + default: + return D3DTADDRESS_WRAP; + } +} + + +//! Can be called by an IMaterialRenderer to make its work easier. +void CD3D9Driver::setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, + bool resetAllRenderstates) +{ + // This needs only to be updated onresets + if (Params.HandleSRGB && resetAllRenderstates) + pID3DDevice->SetRenderState(D3DRS_SRGBWRITEENABLE, TRUE); + + if (resetAllRenderstates || + lastmaterial.AmbientColor != material.AmbientColor || + lastmaterial.DiffuseColor != material.DiffuseColor || + lastmaterial.SpecularColor != material.SpecularColor || + lastmaterial.EmissiveColor != material.EmissiveColor || + lastmaterial.Shininess != material.Shininess) + { + D3DMATERIAL9 mat; + mat.Diffuse = colorToD3D(material.DiffuseColor); + mat.Ambient = colorToD3D(material.AmbientColor); + mat.Specular = colorToD3D(material.SpecularColor); + mat.Emissive = colorToD3D(material.EmissiveColor); + mat.Power = material.Shininess; + pID3DDevice->SetMaterial(&mat); + } + + if (lastmaterial.ColorMaterial != material.ColorMaterial) + { + pID3DDevice->SetRenderState(D3DRS_COLORVERTEX, (material.ColorMaterial != ECM_NONE)); + pID3DDevice->SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, + ((material.ColorMaterial == ECM_DIFFUSE)|| + (material.ColorMaterial == ECM_DIFFUSE_AND_AMBIENT))?D3DMCS_COLOR1:D3DMCS_MATERIAL); + pID3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, + ((material.ColorMaterial == ECM_AMBIENT)|| + (material.ColorMaterial == ECM_DIFFUSE_AND_AMBIENT))?D3DMCS_COLOR1:D3DMCS_MATERIAL); + pID3DDevice->SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, + (material.ColorMaterial == ECM_EMISSIVE)?D3DMCS_COLOR1:D3DMCS_MATERIAL); + pID3DDevice->SetRenderState(D3DRS_SPECULARMATERIALSOURCE, + (material.ColorMaterial == ECM_SPECULAR)?D3DMCS_COLOR1:D3DMCS_MATERIAL); + } + + // fillmode + if (resetAllRenderstates || lastmaterial.Wireframe != material.Wireframe || lastmaterial.PointCloud != material.PointCloud) + { + if (material.Wireframe) + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); + else + if (material.PointCloud) + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_POINT); + else + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); + } + + // shademode + + if (resetAllRenderstates || lastmaterial.GouraudShading != material.GouraudShading) + { + if (material.GouraudShading) + pID3DDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD); + else + pID3DDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_FLAT); + } + + // lighting + + if (resetAllRenderstates || lastmaterial.Lighting != material.Lighting) + { + if (material.Lighting) + pID3DDevice->SetRenderState(D3DRS_LIGHTING, TRUE); + else + pID3DDevice->SetRenderState(D3DRS_LIGHTING, FALSE); + } + + // zbuffer + + if (resetAllRenderstates || lastmaterial.ZBuffer != material.ZBuffer) + { + switch (material.ZBuffer) + { + case ECFN_NEVER: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, FALSE); + break; + case ECFN_LESSEQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL); + break; + case ECFN_EQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_EQUAL); + break; + case ECFN_LESS: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS); + break; + case ECFN_NOTEQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_NOTEQUAL); + break; + case ECFN_GREATEREQUAL: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_GREATEREQUAL); + break; + case ECFN_GREATER: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_GREATER); + break; + case ECFN_ALWAYS: + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS); + break; + } + } + + // zwrite +// if (resetAllRenderstates || (lastmaterial.ZWriteEnable != material.ZWriteEnable)) + { + if ( material.ZWriteEnable && (AllowZWriteOnTransparent || !material.isTransparent())) + pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE); + else + pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE); + } + + // back face culling + + if (resetAllRenderstates || (lastmaterial.FrontfaceCulling != material.FrontfaceCulling) || (lastmaterial.BackfaceCulling != material.BackfaceCulling)) + { +// if (material.FrontfaceCulling && material.BackfaceCulling) +// pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW|D3DCULL_CCW); +// else + if (material.FrontfaceCulling) + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW); + else + if (material.BackfaceCulling) + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); + else + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); + } + + // fog + if (resetAllRenderstates || lastmaterial.FogEnable != material.FogEnable) + { + pID3DDevice->SetRenderState(D3DRS_FOGENABLE, material.FogEnable); + } + + // specular highlights + if (resetAllRenderstates || !core::equals(lastmaterial.Shininess,material.Shininess)) + { + const bool enable = (material.Shininess!=0.0f); + pID3DDevice->SetRenderState(D3DRS_SPECULARENABLE, enable); + pID3DDevice->SetRenderState(D3DRS_SPECULARMATERIALSOURCE, D3DMCS_MATERIAL); + } + + // normalization + if (resetAllRenderstates || lastmaterial.NormalizeNormals != material.NormalizeNormals) + { + pID3DDevice->SetRenderState(D3DRS_NORMALIZENORMALS, material.NormalizeNormals); + } + + // Color Mask + if (queryFeature(EVDF_COLOR_MASK) && + (resetAllRenderstates || lastmaterial.ColorMask != material.ColorMask)) + { + const DWORD flag = + ((material.ColorMask & ECP_RED)?D3DCOLORWRITEENABLE_RED:0) | + ((material.ColorMask & ECP_GREEN)?D3DCOLORWRITEENABLE_GREEN:0) | + ((material.ColorMask & ECP_BLUE)?D3DCOLORWRITEENABLE_BLUE:0) | + ((material.ColorMask & ECP_ALPHA)?D3DCOLORWRITEENABLE_ALPHA:0); + pID3DDevice->SetRenderState(D3DRS_COLORWRITEENABLE, flag); + } + + if (queryFeature(EVDF_BLEND_OPERATIONS) && + (resetAllRenderstates|| lastmaterial.BlendOperation != material.BlendOperation)) + { + if (material.BlendOperation==EBO_NONE) + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + else + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + switch (material.BlendOperation) + { + case EBO_SUBTRACT: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_SUBTRACT); + break; + case EBO_REVSUBTRACT: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_REVSUBTRACT); + break; + case EBO_MIN: + case EBO_MIN_FACTOR: + case EBO_MIN_ALPHA: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_MIN); + break; + case EBO_MAX: + case EBO_MAX_FACTOR: + case EBO_MAX_ALPHA: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_MAX); + break; + default: + pID3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD); + break; + } + } + } + + // Polygon offset + if (queryFeature(EVDF_POLYGON_OFFSET) && (resetAllRenderstates || + lastmaterial.PolygonOffsetDirection != material.PolygonOffsetDirection || + lastmaterial.PolygonOffsetFactor != material.PolygonOffsetFactor)) + { + if (material.PolygonOffsetFactor) + { + if (material.PolygonOffsetDirection==EPO_BACK) + { + pID3DDevice->SetRenderState(D3DRS_SLOPESCALEDEPTHBIAS, F2DW(1.f)); + pID3DDevice->SetRenderState(D3DRS_DEPTHBIAS, F2DW((FLOAT)material.PolygonOffsetFactor)); + } + else + { + pID3DDevice->SetRenderState(D3DRS_SLOPESCALEDEPTHBIAS, F2DW(-1.f)); + pID3DDevice->SetRenderState(D3DRS_DEPTHBIAS, F2DW((FLOAT)-material.PolygonOffsetFactor)); + } + } + else + { + pID3DDevice->SetRenderState(D3DRS_SLOPESCALEDEPTHBIAS, 0); + pID3DDevice->SetRenderState(D3DRS_DEPTHBIAS, 0); + } + } + + // Anti Aliasing + if (resetAllRenderstates || lastmaterial.AntiAliasing != material.AntiAliasing) + { + if (AlphaToCoverageSupport && (material.AntiAliasing & EAAM_ALPHA_TO_COVERAGE)) + { + if (VendorID==0x10DE)//NVidia + pID3DDevice->SetRenderState(D3DRS_ADAPTIVETESS_Y, MAKEFOURCC('A','T','O','C')); + // SSAA could give better results on NVidia cards + else if (VendorID==0x1002)//ATI + pID3DDevice->SetRenderState(D3DRS_POINTSIZE, MAKEFOURCC('A','2','M','1')); + } + else if (AlphaToCoverageSupport && (lastmaterial.AntiAliasing & EAAM_ALPHA_TO_COVERAGE)) + { + if (VendorID==0x10DE) + pID3DDevice->SetRenderState(D3DRS_ADAPTIVETESS_Y, D3DFMT_UNKNOWN); + else if (VendorID==0x1002) + pID3DDevice->SetRenderState(D3DRS_POINTSIZE, MAKEFOURCC('A','2','M','0')); + } + + // enable antialiasing + if (Params.AntiAlias) + { + if (material.AntiAliasing & (EAAM_SIMPLE|EAAM_QUALITY)) + pID3DDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE); + else if (lastmaterial.AntiAliasing & (EAAM_SIMPLE|EAAM_QUALITY)) + pID3DDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE); + if (material.AntiAliasing & (EAAM_LINE_SMOOTH)) + pID3DDevice->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, TRUE); + else if (lastmaterial.AntiAliasing & (EAAM_LINE_SMOOTH)) + pID3DDevice->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, FALSE); + } + } + + // thickness + if (resetAllRenderstates || lastmaterial.Thickness != material.Thickness) + { + pID3DDevice->SetRenderState(D3DRS_POINTSIZE, F2DW(material.Thickness)); + } + + // texture address mode + for (u32 st=0; st<MaxTextureUnits; ++st) + { + if (resetAllRenderstates && Params.HandleSRGB) + pID3DDevice->SetSamplerState(st, D3DSAMP_SRGBTEXTURE, TRUE); + + if (resetAllRenderstates || lastmaterial.TextureLayer[st].LODBias != material.TextureLayer[st].LODBias) + { + const float tmp = material.TextureLayer[st].LODBias * 0.125f; + pID3DDevice->SetSamplerState(st, D3DSAMP_MIPMAPLODBIAS, F2DW(tmp)); + } + + if (resetAllRenderstates || lastmaterial.TextureLayer[st].TextureWrapU != material.TextureLayer[st].TextureWrapU) + pID3DDevice->SetSamplerState(st, D3DSAMP_ADDRESSU, getTextureWrapMode(material.TextureLayer[st].TextureWrapU)); + // If separate UV not supported reuse U for V + if (!(Caps.TextureAddressCaps & D3DPTADDRESSCAPS_INDEPENDENTUV)) + pID3DDevice->SetSamplerState(st, D3DSAMP_ADDRESSV, getTextureWrapMode(material.TextureLayer[st].TextureWrapU)); + else if (resetAllRenderstates || lastmaterial.TextureLayer[st].TextureWrapV != material.TextureLayer[st].TextureWrapV) + pID3DDevice->SetSamplerState(st, D3DSAMP_ADDRESSV, getTextureWrapMode(material.TextureLayer[st].TextureWrapV)); + + // Bilinear, trilinear, and anisotropic filter + if (resetAllRenderstates || + lastmaterial.TextureLayer[st].BilinearFilter != material.TextureLayer[st].BilinearFilter || + lastmaterial.TextureLayer[st].TrilinearFilter != material.TextureLayer[st].TrilinearFilter || + lastmaterial.TextureLayer[st].AnisotropicFilter != material.TextureLayer[st].AnisotropicFilter || + lastmaterial.UseMipMaps != material.UseMipMaps) + { + if (material.TextureLayer[st].BilinearFilter || material.TextureLayer[st].TrilinearFilter || material.TextureLayer[st].AnisotropicFilter) + { + D3DTEXTUREFILTERTYPE tftMag = ((Caps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC) && + material.TextureLayer[st].AnisotropicFilter) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR; + D3DTEXTUREFILTERTYPE tftMin = ((Caps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC) && + material.TextureLayer[st].AnisotropicFilter) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR; + D3DTEXTUREFILTERTYPE tftMip = material.UseMipMaps? (material.TextureLayer[st].TrilinearFilter ? D3DTEXF_LINEAR : D3DTEXF_POINT) : D3DTEXF_NONE; + + if (tftMag==D3DTEXF_ANISOTROPIC || tftMin == D3DTEXF_ANISOTROPIC) + pID3DDevice->SetSamplerState(st, D3DSAMP_MAXANISOTROPY, core::min_((DWORD)material.TextureLayer[st].AnisotropicFilter, Caps.MaxAnisotropy)); + pID3DDevice->SetSamplerState(st, D3DSAMP_MAGFILTER, tftMag); + pID3DDevice->SetSamplerState(st, D3DSAMP_MINFILTER, tftMin); + pID3DDevice->SetSamplerState(st, D3DSAMP_MIPFILTER, tftMip); + } + else + { + pID3DDevice->SetSamplerState(st, D3DSAMP_MINFILTER, D3DTEXF_POINT); + pID3DDevice->SetSamplerState(st, D3DSAMP_MIPFILTER, D3DTEXF_NONE); + pID3DDevice->SetSamplerState(st, D3DSAMP_MAGFILTER, D3DTEXF_POINT); + } + } + } +} + + +//! sets the needed renderstates +void CD3D9Driver::setRenderStatesStencilShadowMode(bool zfail, u32 debugDataVisible) +{ + if ((CurrentRenderMode != ERM_SHADOW_VOLUME_ZFAIL && + CurrentRenderMode != ERM_SHADOW_VOLUME_ZPASS) || + Transformation3DChanged) + { + // unset last 3d material + if (CurrentRenderMode == ERM_3D && + static_cast<u32>(Material.MaterialType) < MaterialRenderers.size()) + { + MaterialRenderers[Material.MaterialType].Renderer->OnUnsetMaterial(); + ResetRenderStates = true; + } + // switch back the matrices + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)&Matrices[ETS_VIEW])); + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)&Matrices[ETS_WORLD])); + pID3DDevice->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)((void*)&Matrices[ETS_PROJECTION])); + + Transformation3DChanged = false; + + setActiveTexture(0,0); + setActiveTexture(1,0); + setActiveTexture(2,0); + setActiveTexture(3,0); + + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE); + + pID3DDevice->SetFVF(D3DFVF_XYZ); + LastVertexType = (video::E_VERTEX_TYPE)(-1); + + pID3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, FALSE); + pID3DDevice->SetRenderState(D3DRS_STENCILENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_FLAT); + //pID3DDevice->SetRenderState(D3DRS_FOGENABLE, FALSE); + //pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + + pID3DDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_ALWAYS); + pID3DDevice->SetRenderState(D3DRS_STENCILREF, 0x0); + pID3DDevice->SetRenderState(D3DRS_STENCILMASK, 0xffffffff); + pID3DDevice->SetRenderState(D3DRS_STENCILWRITEMASK, 0xffffffff); + + pID3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); + pID3DDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_ZERO ); + pID3DDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_ONE ); + + pID3DDevice->SetRenderState(D3DRS_ZENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS); + + //if (!(debugDataVisible & (scene::EDS_SKELETON|scene::EDS_MESH_WIRE_OVERLAY))) + // pID3DDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0); + if ((debugDataVisible & scene::EDS_MESH_WIRE_OVERLAY)) + pID3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); + } + + if (CurrentRenderMode != ERM_SHADOW_VOLUME_ZPASS && !zfail) + { + // USE THE ZPASS METHOD + pID3DDevice->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP); + //pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_INCR); // does not matter, will be set later + } + else + if (CurrentRenderMode != ERM_SHADOW_VOLUME_ZFAIL && zfail) + { + // USE THE ZFAIL METHOD + pID3DDevice->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP); + //pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCR); // does not matter, will be set later + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_KEEP); + } + + CurrentRenderMode = zfail ? ERM_SHADOW_VOLUME_ZFAIL : ERM_SHADOW_VOLUME_ZPASS; +} + + +//! sets the needed renderstates +void CD3D9Driver::setRenderStatesStencilFillMode(bool alpha) +{ + if (CurrentRenderMode != ERM_STENCIL_FILL || Transformation3DChanged) + { + core::matrix4 mat; + pID3DDevice->SetTransform(D3DTS_VIEW, &UnitMatrixD3D9); + pID3DDevice->SetTransform(D3DTS_WORLD, &UnitMatrixD3D9); + pID3DDevice->SetTransform(D3DTS_PROJECTION, &UnitMatrixD3D9); + + pID3DDevice->SetRenderState(D3DRS_ZENABLE, FALSE); + pID3DDevice->SetRenderState(D3DRS_LIGHTING, FALSE); + pID3DDevice->SetRenderState(D3DRS_FOGENABLE, FALSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + + pID3DDevice->SetRenderState(D3DRS_STENCILREF, 0x1); + pID3DDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_LESSEQUAL); + //pID3DDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_GREATEREQUAL); + pID3DDevice->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_KEEP); + pID3DDevice->SetRenderState(D3DRS_STENCILMASK, 0xffffffff); + pID3DDevice->SetRenderState(D3DRS_STENCILWRITEMASK, 0xffffffff); + + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); + + Transformation3DChanged = false; + + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE); + if (alpha) + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + else + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } + + CurrentRenderMode = ERM_STENCIL_FILL; +} + + +//! Enable the 2d override material +void CD3D9Driver::enableMaterial2D(bool enable) +{ + if (!enable) + CurrentRenderMode = ERM_NONE; + CNullDriver::enableMaterial2D(enable); +} + + +//! sets the needed renderstates +void CD3D9Driver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel) +{ + if (!pID3DDevice) + return; + + if (CurrentRenderMode != ERM_2D || Transformation3DChanged) + { + // unset last 3d material + if (CurrentRenderMode == ERM_3D) + { + if (static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size()) + MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); + } + if (!OverrideMaterial2DEnabled) + { + setBasicRenderStates(InitMaterial2D, LastMaterial, true); + LastMaterial=InitMaterial2D; + + // fix everything that is wrongly set by InitMaterial2D default + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + + pID3DDevice->SetRenderState(D3DRS_STENCILENABLE, FALSE); + } + core::matrix4 m; +// this fixes some problems with pixel exact rendering, but also breaks nice texturing +// moreover, it would have to be tested in each call, as the texture flag can change each time +// if (!texture) +// m.setTranslation(core::vector3df(0.5f,0.5f,0)); + pID3DDevice->SetTransform(D3DTS_WORLD, (D3DMATRIX*)((void*)m.pointer())); + + // adjust the view such that pixel center aligns with texels + // Otherwise, subpixel artifacts will occur + m.setTranslation(core::vector3df(-0.5f,-0.5f,0)); + pID3DDevice->SetTransform(D3DTS_VIEW, (D3DMATRIX*)((void*)m.pointer())); + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + m.buildProjectionMatrixOrthoLH(f32(renderTargetSize.Width), f32(-(s32)(renderTargetSize.Height)), -1.0, 1.0); + m.setTranslation(core::vector3df(-1,1,0)); + pID3DDevice->SetTransform(D3DTS_PROJECTION, (D3DMATRIX*)((void*)m.pointer())); + + // 2d elements are clipped in software + pID3DDevice->SetRenderState(D3DRS_CLIPPING, FALSE); + + Transformation3DChanged = false; + } + if (OverrideMaterial2DEnabled) + { + OverrideMaterial2D.Lighting=false; + setBasicRenderStates(OverrideMaterial2D, LastMaterial, false); + LastMaterial = OverrideMaterial2D; + } + + // no alphaChannel without texture + alphaChannel &= texture; + + if (alpha || alphaChannel) + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + else + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); + if (texture) + { + setTransform(ETS_TEXTURE_0, core::IdentityMatrix); + // Due to the transformation change, the previous line would call a reset each frame + // but we can safely reset the variable as it was false before + Transformation3DChanged=false; + } + if (alphaChannel) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); + + if (alpha) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE); + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + } + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE); + if (alpha) + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG2); + } + else + { + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE); + } + } + + CurrentRenderMode = ERM_2D; +} + + +//! deletes all dynamic lights there are +void CD3D9Driver::deleteAllDynamicLights() +{ + for (s32 i=0; i<LastSetLight+1; ++i) + pID3DDevice->LightEnable(i, false); + + LastSetLight = -1; + + CNullDriver::deleteAllDynamicLights(); +} + + +//! adds a dynamic light +s32 CD3D9Driver::addDynamicLight(const SLight& dl) +{ + CNullDriver::addDynamicLight(dl); + + D3DLIGHT9 light; + + switch (dl.Type) + { + case ELT_POINT: + light.Type = D3DLIGHT_POINT; + break; + case ELT_SPOT: + light.Type = D3DLIGHT_SPOT; + break; + case ELT_DIRECTIONAL: + light.Type = D3DLIGHT_DIRECTIONAL; + break; + } + + light.Position = *(D3DVECTOR*)((void*)(&dl.Position)); + light.Direction = *(D3DVECTOR*)((void*)(&dl.Direction)); + + light.Range = core::min_(dl.Radius, MaxLightDistance); + light.Falloff = dl.Falloff; + + light.Diffuse = *(D3DCOLORVALUE*)((void*)(&dl.DiffuseColor)); + light.Specular = *(D3DCOLORVALUE*)((void*)(&dl.SpecularColor)); + light.Ambient = *(D3DCOLORVALUE*)((void*)(&dl.AmbientColor)); + + light.Attenuation0 = dl.Attenuation.X; + light.Attenuation1 = dl.Attenuation.Y; + light.Attenuation2 = dl.Attenuation.Z; + + light.Theta = dl.InnerCone * 2.0f * core::DEGTORAD; + light.Phi = dl.OuterCone * 2.0f * core::DEGTORAD; + + ++LastSetLight; + + if(D3D_OK == pID3DDevice->SetLight(LastSetLight, &light)) + { + // I don't care if this succeeds + (void)pID3DDevice->LightEnable(LastSetLight, true); + return LastSetLight; + } + + return -1; +} + +//! Turns a dynamic light on or off +//! \param lightIndex: the index returned by addDynamicLight +//! \param turnOn: true to turn the light on, false to turn it off +void CD3D9Driver::turnLightOn(s32 lightIndex, bool turnOn) +{ + if(lightIndex < 0 || lightIndex > LastSetLight) + return; + + (void)pID3DDevice->LightEnable(lightIndex, turnOn); +} + + +//! returns the maximal amount of dynamic lights the device can handle +u32 CD3D9Driver::getMaximalDynamicLightAmount() const +{ + return Caps.MaxActiveLights; +} + + +//! Sets the dynamic ambient light color. The default color is +//! (0,0,0,0) which means it is dark. +//! \param color: New color of the ambient light. +void CD3D9Driver::setAmbientLight(const SColorf& color) +{ + if (!pID3DDevice) + return; + + AmbientLight = color; + D3DCOLOR col = color.toSColor().color; + pID3DDevice->SetRenderState(D3DRS_AMBIENT, col); +} + + +//! \return Returns the name of the video driver. Example: In case of the DIRECT3D9 +//! driver, it would return "Direct3D9.0". +const wchar_t* CD3D9Driver::getName() const +{ + return L"Direct3D 9.0"; +} + + +//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do +//! this: First, draw all geometry. Then use this method, to draw the shadow +//! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. +void CD3D9Driver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible) +{ + if (!Params.Stencilbuffer) + return; + + setRenderStatesStencilShadowMode(zfail, debugDataVisible); + + const u32 count = triangles.size(); + if (!count) + return; + + if (!zfail) + { + // ZPASS Method + + // Draw front-side of shadow volume in stencil only + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_INCR); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + + // Now reverse cull order so front sides of shadow volume are written. + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW); + pID3DDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_DECR); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + } + else + { + // ZFAIL Method + + // Draw front-side of shadow volume in stencil only + pID3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW); + pID3DDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCR); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + + // Now reverse cull order so front sides of shadow volume are written. + pID3DDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW); + pID3DDevice->SetRenderState( D3DRS_STENCILZFAIL, D3DSTENCILOP_DECR); + pID3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, count / 3, triangles.const_pointer(), sizeof(core::vector3df)); + } +} + + +//! Fills the stencil shadow with color. After the shadow volume has been drawn +//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this +//! to draw the color of the shadow. +void CD3D9Driver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, + video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) +{ + if (!Params.Stencilbuffer) + return; + + S3DVertex vtx[4]; + vtx[0] = S3DVertex(1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, leftUpEdge, 0.0f, 0.0f); + vtx[1] = S3DVertex(1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, rightUpEdge, 0.0f, 1.0f); + vtx[2] = S3DVertex(-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, leftDownEdge, 1.0f, 0.0f); + vtx[3] = S3DVertex(-1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, rightDownEdge, 1.0f, 1.0f); + + s16 indices[6] = {0,1,2,1,3,2}; + + setRenderStatesStencilFillMode( + leftUpEdge.getAlpha() < 255 || + rightUpEdge.getAlpha() < 255 || + leftDownEdge.getAlpha() < 255 || + rightDownEdge.getAlpha() < 255); + + setActiveTexture(0,0); + + setVertexShader(EVT_STANDARD); + + pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, &indices[0], + D3DFMT_INDEX16, &vtx[0], sizeof(S3DVertex)); + + if (clearStencilBuffer) + pID3DDevice->Clear( 0, NULL, D3DCLEAR_STENCIL,0, 1.0, 0); +} + + +//! Returns the maximum amount of primitives (mostly vertices) which +//! the device is able to render with one drawIndexedTriangleList +//! call. +u32 CD3D9Driver::getMaximalPrimitiveCount() const +{ + return Caps.MaxPrimitiveCount; +} + + +//! Sets the fog mode. +void CD3D9Driver::setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog) +{ + CNullDriver::setFog(color, fogType, start, end, density, pixelFog, rangeFog); + + if (!pID3DDevice) + return; + + pID3DDevice->SetRenderState(D3DRS_FOGCOLOR, color.color); + + pID3DDevice->SetRenderState( + pixelFog ? D3DRS_FOGTABLEMODE : D3DRS_FOGVERTEXMODE, + (fogType==EFT_FOG_LINEAR)? D3DFOG_LINEAR : (fogType==EFT_FOG_EXP)?D3DFOG_EXP:D3DFOG_EXP2); + + if (fogType==EFT_FOG_LINEAR) + { + pID3DDevice->SetRenderState(D3DRS_FOGSTART, F2DW(start)); + pID3DDevice->SetRenderState(D3DRS_FOGEND, F2DW(end)); + } + else + pID3DDevice->SetRenderState(D3DRS_FOGDENSITY, F2DW(density)); + + if(!pixelFog) + pID3DDevice->SetRenderState(D3DRS_RANGEFOGENABLE, rangeFog); +} + + +//! Draws a 3d line. +void CD3D9Driver::draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color) +{ + setVertexShader(EVT_STANDARD); + setRenderStates3DMode(); + video::S3DVertex v[2]; + v[0].Color = color; + v[1].Color = color; + v[0].Pos = start; + v[1].Pos = end; + + pID3DDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, v, sizeof(S3DVertex)); +} + + +//! resets the device +bool CD3D9Driver::reset() +{ + u32 i; + os::Printer::log("Resetting D3D9 device.", ELL_INFORMATION); + + for (i=0; i<Textures.size(); ++i) + { + if (Textures[i].Surface->isRenderTarget()) + { + IDirect3DBaseTexture9* tex = ((CD3D9Texture*)(Textures[i].Surface))->getDX9Texture(); + if (tex) + tex->Release(); + } + } + for (i=0; i<DepthBuffers.size(); ++i) + { + if (DepthBuffers[i]->Surface) + DepthBuffers[i]->Surface->Release(); + } + for (i=0; i<OcclusionQueries.size(); ++i) + { + if (OcclusionQueries[i].PID) + { + reinterpret_cast<IDirect3DQuery9*>(OcclusionQueries[i].PID)->Release(); + OcclusionQueries[i].PID=0; + } + } + // this does not require a restore in the reset method, it's updated + // automatically in the next render cycle. + removeAllHardwareBuffers(); + + DriverWasReset=true; + + HRESULT hr = pID3DDevice->Reset(&present); + + // restore RTTs + for (i=0; i<Textures.size(); ++i) + { + if (Textures[i].Surface->isRenderTarget()) + ((CD3D9Texture*)(Textures[i].Surface))->createRenderTarget(); + } + + // restore screen depthbuffer + pID3DDevice->GetDepthStencilSurface(&(DepthBuffers[0]->Surface)); + D3DSURFACE_DESC desc; + // restore other depth buffers + // depth format is taken from main depth buffer + DepthBuffers[0]->Surface->GetDesc(&desc); + // multisampling is taken from rendertarget + D3DSURFACE_DESC desc2; + for (i=1; i<DepthBuffers.size(); ++i) + { + for (u32 j=0; j<Textures.size(); ++j) + { + // all textures sharing this depth buffer must have the same setting + // so take first one + if (((CD3D9Texture*)(Textures[j].Surface))->DepthSurface==DepthBuffers[i]) + { + ((CD3D9Texture*)(Textures[j].Surface))->Texture->GetLevelDesc(0,&desc2); + break; + } + } + + pID3DDevice->CreateDepthStencilSurface(DepthBuffers[i]->Size.Width, + DepthBuffers[i]->Size.Height, + desc.Format, + desc2.MultiSampleType, + desc2.MultiSampleQuality, + TRUE, + &(DepthBuffers[i]->Surface), + NULL); + } + for (i=0; i<OcclusionQueries.size(); ++i) + { + pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, reinterpret_cast<IDirect3DQuery9**>(&OcclusionQueries[i].PID)); + } + + if (FAILED(hr)) + { + if (hr == D3DERR_DEVICELOST) + { + DeviceLost = true; + os::Printer::log("Resetting failed due to device lost.", ELL_WARNING); + } +#ifdef D3DERR_DEVICEREMOVED + else if (hr == D3DERR_DEVICEREMOVED) + { + os::Printer::log("Resetting failed due to device removed.", ELL_WARNING); + } +#endif + else if (hr == D3DERR_DRIVERINTERNALERROR) + { + os::Printer::log("Resetting failed due to internal error.", ELL_WARNING); + } + else if (hr == D3DERR_OUTOFVIDEOMEMORY) + { + os::Printer::log("Resetting failed due to out of memory.", ELL_WARNING); + } + else if (hr == D3DERR_DEVICENOTRESET) + { + os::Printer::log("Resetting failed due to not reset.", ELL_WARNING); + } + else if (hr == D3DERR_INVALIDCALL) + { + os::Printer::log("Resetting failed due to invalid call", "You need to release some more surfaces.", ELL_WARNING); + } + else + { + os::Printer::log("Resetting failed due to unknown reason.", core::stringc((int)hr).c_str(), ELL_WARNING); + } + return false; + } + + DeviceLost = false; + ResetRenderStates = true; + LastVertexType = (E_VERTEX_TYPE)-1; + + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + CurrentTexture[i] = 0; + + setVertexShader(EVT_STANDARD); + setRenderStates3DMode(); + setFog(FogColor, FogType, FogStart, FogEnd, FogDensity, PixelFog, RangeFog); + setAmbientLight(AmbientLight); + + return true; +} + + +void CD3D9Driver::OnResize(const core::dimension2d<u32>& size) +{ + if (!pID3DDevice) + return; + + CNullDriver::OnResize(size); + present.BackBufferWidth = size.Width; + present.BackBufferHeight = size.Height; + + reset(); +} + + +//! Returns type of video driver +E_DRIVER_TYPE CD3D9Driver::getDriverType() const +{ + return EDT_DIRECT3D9; +} + + +//! Returns the transformation set by setTransform +const core::matrix4& CD3D9Driver::getTransform(E_TRANSFORMATION_STATE state) const +{ + return Matrices[state]; +} + + +//! Sets a vertex shader constant. +void CD3D9Driver::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + if (data) + pID3DDevice->SetVertexShaderConstantF(startRegister, data, constantAmount); +} + + +//! Sets a pixel shader constant. +void CD3D9Driver::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + if (data) + pID3DDevice->SetPixelShaderConstantF(startRegister, data, constantAmount); +} + + +//! Sets a constant for the vertex shader based on a name. +bool CD3D9Driver::setVertexShaderConstant(const c8* name, const f32* floats, int count) +{ + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + { + CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer; + return r->setVariable(true, name, floats, count); + } + + return false; +} + + +//! Bool interface for the above. +bool CD3D9Driver::setVertexShaderConstant(const c8* name, const bool* bools, int count) +{ + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + { + CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer; + return r->setVariable(true, name, bools, count); + } + + return false; +} + + +//! Int interface for the above. +bool CD3D9Driver::setVertexShaderConstant(const c8* name, const s32* ints, int count) +{ + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + { + CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer; + return r->setVariable(true, name, ints, count); + } + + return false; +} + + +//! Sets a constant for the pixel shader based on a name. +bool CD3D9Driver::setPixelShaderConstant(const c8* name, const f32* floats, int count) +{ + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + { + CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer; + return r->setVariable(false, name, floats, count); + } + + return false; +} + + +//! Bool interface for the above. +bool CD3D9Driver::setPixelShaderConstant(const c8* name, const bool* bools, int count) +{ + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + { + CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer; + return r->setVariable(false, name, bools, count); + } + + return false; +} + + +//! Int interface for the above. +bool CD3D9Driver::setPixelShaderConstant(const c8* name, const s32* ints, int count) +{ + if (Material.MaterialType >= 0 && Material.MaterialType < (s32)MaterialRenderers.size()) + { + CD3D9MaterialRenderer* r = (CD3D9MaterialRenderer*)MaterialRenderers[Material.MaterialType].Renderer; + return r->setVariable(false, name, ints, count); + } + + return false; +} + + +//! Adds a new material renderer to the VideoDriver, using pixel and/or +//! vertex shaders to render geometry. +s32 CD3D9Driver::addShaderMaterial(const c8* vertexShaderProgram, + const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, s32 userData) +{ + s32 nr = -1; + CD3D9ShaderMaterialRenderer* r = new CD3D9ShaderMaterialRenderer( + pID3DDevice, this, nr, vertexShaderProgram, pixelShaderProgram, + callback, getMaterialRenderer(baseMaterial), userData); + + r->drop(); + return nr; +} + + +//! Adds a new material renderer to the VideoDriver, based on a high level shading +//! language. +s32 CD3D9Driver::addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName, + E_GEOMETRY_SHADER_TYPE gsCompileTarget, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) +{ + s32 nr = -1; + + #ifdef _IRR_COMPILE_WITH_CG_ + if(shadingLang == EGSL_CG) + { + CD3D9CgMaterialRenderer* r = new CD3D9CgMaterialRenderer( + this, nr, + vertexShaderProgram, vertexShaderEntryPointName, vsCompileTarget, + pixelShaderProgram, pixelShaderEntryPointName, psCompileTarget, + geometryShaderProgram, geometryShaderEntryPointName, gsCompileTarget, + inType, outType, verticesOut, + callback,getMaterialRenderer(baseMaterial), userData); + + r->drop(); + } + else + #endif + { + CD3D9HLSLMaterialRenderer* r = new CD3D9HLSLMaterialRenderer( + pID3DDevice, this, nr, + vertexShaderProgram, + vertexShaderEntryPointName, + vsCompileTarget, + pixelShaderProgram, + pixelShaderEntryPointName, + psCompileTarget, + callback, + getMaterialRenderer(baseMaterial), + userData); + + r->drop(); + } + + return nr; +} + + +//! Returns a pointer to the IVideoDriver interface. (Implementation for +//! IMaterialRendererServices) +IVideoDriver* CD3D9Driver::getVideoDriver() +{ + return this; +} + + +//! Creates a render target texture. +ITexture* CD3D9Driver::addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, + const ECOLOR_FORMAT format) +{ + CD3D9Texture* tex = new CD3D9Texture(this, size, name, format); + if (tex) + { + if (!tex->Texture) + { + tex->drop(); + return 0; + } + checkDepthBuffer(tex); + addTexture(tex); + tex->drop(); + } + return tex; +} + + +//! Clears the ZBuffer. +void CD3D9Driver::clearZBuffer() +{ + HRESULT hr = pID3DDevice->Clear( 0, NULL, D3DCLEAR_ZBUFFER, 0, 1.0, 0); + + if (FAILED(hr)) + os::Printer::log("CD3D9Driver clearZBuffer() failed.", ELL_WARNING); +} + + +//! Returns an image created from the last rendered frame. +IImage* CD3D9Driver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RENDER_TARGET target) +{ + if (target != video::ERT_FRAME_BUFFER) + return 0; + + // query the screen dimensions of the current adapter + D3DDISPLAYMODE displayMode; + pID3DDevice->GetDisplayMode(0, &displayMode); + + if (format==video::ECF_UNKNOWN) + format=video::ECF_A8R8G8B8; + + // create the image surface to store the front buffer image [always A8R8G8B8] + HRESULT hr; + LPDIRECT3DSURFACE9 lpSurface; + if (FAILED(hr = pID3DDevice->CreateOffscreenPlainSurface(displayMode.Width, displayMode.Height, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &lpSurface, 0))) + return 0; + + // read the front buffer into the image surface + if (FAILED(hr = pID3DDevice->GetFrontBufferData(0, lpSurface))) + { + lpSurface->Release(); + return 0; + } + + RECT clientRect; + { + POINT clientPoint; + clientPoint.x = 0; + clientPoint.y = 0; + + ClientToScreen((HWND)getExposedVideoData().D3D9.HWnd, &clientPoint); + + clientRect.left = clientPoint.x; + clientRect.top = clientPoint.y; + clientRect.right = clientRect.left + ScreenSize.Width; + clientRect.bottom = clientRect.top + ScreenSize.Height; + + // window can be off-screen partly, we can't take screenshots from that + clientRect.left = core::max_(clientRect.left, 0l); + clientRect.top = core::max_(clientRect.top, 0l); + clientRect.right = core::min_(clientRect.right, (long)displayMode.Width); + clientRect.bottom = core::min_(clientRect.bottom, (long)displayMode.Height ); + } + + // lock our area of the surface + D3DLOCKED_RECT lockedRect; + if (FAILED(lpSurface->LockRect(&lockedRect, &clientRect, D3DLOCK_READONLY))) + { + lpSurface->Release(); + return 0; + } + + irr::core::dimension2d<u32> shotSize; + shotSize.Width = core::min_( ScreenSize.Width, (u32)(clientRect.right-clientRect.left) ); + shotSize.Height = core::min_( ScreenSize.Height, (u32)(clientRect.bottom-clientRect.top) ); + + // this could throw, but we aren't going to worry about that case very much + IImage* newImage = createImage(format, shotSize); + + if (newImage) + { + // d3d pads the image, so we need to copy the correct number of bytes + u32* dP = (u32*)newImage->lock(); + u8 * sP = (u8 *)lockedRect.pBits; + + // If the display mode format doesn't promise anything about the Alpha value + // and it appears that it's not presenting 255, then we should manually + // set each pixel alpha value to 255. + if (D3DFMT_X8R8G8B8 == displayMode.Format && (0xFF000000 != (*dP & 0xFF000000))) + { + for (u32 y = 0; y < shotSize.Height; ++y) + { + for (u32 x = 0; x < shotSize.Width; ++x) + { + newImage->setPixel(x,y,*((u32*)sP) | 0xFF000000); + sP += 4; + } + + sP += lockedRect.Pitch - (4 * shotSize.Width); + } + } + else + { + for (u32 y = 0; y < shotSize.Height; ++y) + { + convertColor(sP, video::ECF_A8R8G8B8, shotSize.Width, dP, format); + sP += lockedRect.Pitch; + dP += shotSize.Width; + } + } + + newImage->unlock(); + } + + // we can unlock and release the surface + lpSurface->UnlockRect(); + + // release the image surface + lpSurface->Release(); + + // return status of save operation to caller + return newImage; +} + + +//! returns color format +ECOLOR_FORMAT CD3D9Driver::getColorFormat() const +{ + return ColorFormat; +} + + +//! returns color format +D3DFORMAT CD3D9Driver::getD3DColorFormat() const +{ + return D3DColorFormat; +} + + +// returns the current size of the screen or rendertarget +const core::dimension2d<u32>& CD3D9Driver::getCurrentRenderTargetSize() const +{ + if ( CurrentRendertargetSize.Width == 0 ) + return ScreenSize; + else + return CurrentRendertargetSize; +} + + +// Set/unset a clipping plane. +bool CD3D9Driver::setClipPlane(u32 index, const core::plane3df& plane, bool enable) +{ + if (index >= MaxUserClipPlanes) + return false; + + HRESULT ok = pID3DDevice->SetClipPlane(index, (const float*)&(plane.Normal.X)); + if (D3D_OK == ok) + enableClipPlane(index, enable); + return true; +} + + +// Enable/disable a clipping plane. +void CD3D9Driver::enableClipPlane(u32 index, bool enable) +{ + if (index >= MaxUserClipPlanes) + return; + DWORD renderstate; + HRESULT ok = pID3DDevice->GetRenderState(D3DRS_CLIPPLANEENABLE, &renderstate); + if (S_OK == ok) + { + if (enable) + renderstate |= (1 << index); + else + renderstate &= ~(1 << index); + ok = pID3DDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, renderstate); + } +} + + +D3DFORMAT CD3D9Driver::getD3DFormatFromColorFormat(ECOLOR_FORMAT format) const +{ + switch(format) + { + case ECF_A1R5G5B5: + return D3DFMT_A1R5G5B5; + case ECF_R5G6B5: + return D3DFMT_R5G6B5; + case ECF_R8G8B8: + return D3DFMT_R8G8B8; + case ECF_A8R8G8B8: + return D3DFMT_A8R8G8B8; + + // Floating Point formats. Thanks to Patryk "Nadro" Nadrowski. + case ECF_R16F: + return D3DFMT_R16F; + case ECF_G16R16F: + return D3DFMT_G16R16F; + case ECF_A16B16G16R16F: + return D3DFMT_A16B16G16R16F; + case ECF_R32F: + return D3DFMT_R32F; + case ECF_G32R32F: + return D3DFMT_G32R32F; + case ECF_A32B32G32R32F: + return D3DFMT_A32B32G32R32F; + } + return D3DFMT_UNKNOWN; +} + + +ECOLOR_FORMAT CD3D9Driver::getColorFormatFromD3DFormat(D3DFORMAT format) const +{ + switch(format) + { + case D3DFMT_X1R5G5B5: + case D3DFMT_A1R5G5B5: + return ECF_A1R5G5B5; + case D3DFMT_A8B8G8R8: + case D3DFMT_A8R8G8B8: + case D3DFMT_X8R8G8B8: + return ECF_A8R8G8B8; + case D3DFMT_R5G6B5: + return ECF_R5G6B5; + case D3DFMT_R8G8B8: + return ECF_R8G8B8; + + // Floating Point formats. Thanks to Patryk "Nadro" Nadrowski. + case D3DFMT_R16F: + return ECF_R16F; + case D3DFMT_G16R16F: + return ECF_G16R16F; + case D3DFMT_A16B16G16R16F: + return ECF_A16B16G16R16F; + case D3DFMT_R32F: + return ECF_R32F; + case D3DFMT_G32R32F: + return ECF_G32R32F; + case D3DFMT_A32B32G32R32F: + return ECF_A32B32G32R32F; + default: + return (ECOLOR_FORMAT)0; + }; +} + + +void CD3D9Driver::checkDepthBuffer(ITexture* tex) +{ + if (!tex) + return; + const core::dimension2du optSize = tex->getSize().getOptimalSize( + !queryFeature(EVDF_TEXTURE_NPOT), + !queryFeature(EVDF_TEXTURE_NSQUARE), true); + SDepthSurface* depth=0; + core::dimension2du destSize(0x7fffffff, 0x7fffffff); + for (u32 i=0; i<DepthBuffers.size(); ++i) + { + if ((DepthBuffers[i]->Size.Width>=optSize.Width) && + (DepthBuffers[i]->Size.Height>=optSize.Height)) + { + if ((DepthBuffers[i]->Size.Width<destSize.Width) && + (DepthBuffers[i]->Size.Height<destSize.Height)) + { + depth = DepthBuffers[i]; + destSize=DepthBuffers[i]->Size; + } + } + } + if (!depth) + { + D3DSURFACE_DESC desc; + DepthBuffers[0]->Surface->GetDesc(&desc); + // the multisampling needs to match the RTT + D3DSURFACE_DESC desc2; + ((CD3D9Texture*)tex)->Texture->GetLevelDesc(0,&desc2); + DepthBuffers.push_back(new SDepthSurface()); + HRESULT hr=pID3DDevice->CreateDepthStencilSurface(optSize.Width, + optSize.Height, + desc.Format, + desc2.MultiSampleType, + desc2.MultiSampleQuality, + TRUE, + &(DepthBuffers.getLast()->Surface), + NULL); + if (SUCCEEDED(hr)) + { + depth=DepthBuffers.getLast(); + depth->Surface->GetDesc(&desc); + depth->Size.set(desc.Width, desc.Height); + } + else + { + if (hr == D3DERR_OUTOFVIDEOMEMORY) + os::Printer::log("Could not create DepthBuffer","out of video memory",ELL_ERROR); + else if( hr == E_OUTOFMEMORY ) + os::Printer::log("Could not create DepthBuffer","out of memory",ELL_ERROR); + else + { + char buffer[128]; + sprintf(buffer,"Could not create DepthBuffer of %ix%i",optSize.Width,optSize.Height); + os::Printer::log(buffer,ELL_ERROR); + } + DepthBuffers.erase(DepthBuffers.size()-1); + } + } + else + depth->grab(); + + static_cast<CD3D9Texture*>(tex)->DepthSurface=depth; +} + + +void CD3D9Driver::removeDepthSurface(SDepthSurface* depth) +{ + for (u32 i=0; i<DepthBuffers.size(); ++i) + { + if (DepthBuffers[i]==depth) + { + DepthBuffers.erase(i); + return; + } + } +} + + +core::dimension2du CD3D9Driver::getMaxTextureSize() const +{ + return core::dimension2du(Caps.MaxTextureWidth, Caps.MaxTextureHeight); +} + +#ifdef _IRR_COMPILE_WITH_CG_ +const CGcontext& CD3D9Driver::getCgContext() +{ + return CgContext; +} +#endif + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + + + +namespace irr +{ +namespace video +{ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ +//! creates a video driver +IVideoDriver* createDirectX9Driver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window) +{ + const bool pureSoftware = false; + CD3D9Driver* dx9 = new CD3D9Driver(params, io); + if (!dx9->initDriver(window, pureSoftware)) + { + dx9->drop(); + dx9 = 0; + } + + return dx9; +} +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.h new file mode 100644 index 0000000..095ae9d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Driver.h @@ -0,0 +1,496 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_VIDEO_DIRECTX_9_H_INCLUDED__ +#define __C_VIDEO_DIRECTX_9_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#ifdef _IRR_WINDOWS_ +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#endif + +#include "CNullDriver.h" +#include "SIrrCreationParameters.h" +#include "IMaterialRendererServices.h" +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#include "irrMath.h" // needed by borland for sqrtf define +#endif +#include <d3d9.h> + +#ifdef _IRR_COMPILE_WITH_CG_ +#include "Cg/cg.h" +#include "Cg/cgD3D9.h" +#endif + +namespace irr +{ +namespace video +{ + struct SDepthSurface : public IReferenceCounted + { + SDepthSurface() : Surface(0) + { + #ifdef _DEBUG + setDebugName("SDepthSurface"); + #endif + } + virtual ~SDepthSurface() + { + if (Surface) + Surface->Release(); + } + + IDirect3DSurface9* Surface; + core::dimension2du Size; + }; + + class CD3D9Driver : public CNullDriver, IMaterialRendererServices + { + public: + + friend class CD3D9Texture; + + //! constructor + CD3D9Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io); + + //! destructor + virtual ~CD3D9Driver(); + + //! applications must call this method before performing any rendering. returns false if failed. + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect<s32>* sourceRect=0); + + //! applications must call this method after performing any rendering. returns false if failed. + virtual bool endScene(); + + //! queries the features of the driver, returns true if feature is available + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + + //! sets transformation + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); + + //! sets a material + virtual void setMaterial(const SMaterial& material); + + //! sets a render target + virtual bool setRenderTarget(video::ITexture* texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)); + + //! Sets multiple render targets + virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)); + + //! sets a viewport + virtual void setViewPort(const core::rect<s32>& area); + + //! gets the area of the current viewport + virtual const core::rect<s32>& getViewPort() const; + + struct SHWBufferLink_d3d9 : public SHWBufferLink + { + SHWBufferLink_d3d9(const scene::IMeshBuffer *_MeshBuffer): + SHWBufferLink(_MeshBuffer), + vertexBuffer(0), indexBuffer(0), + vertexBufferSize(0), indexBufferSize(0) {} + + IDirect3DVertexBuffer9* vertexBuffer; + IDirect3DIndexBuffer9* indexBuffer; + + u32 vertexBufferSize; + u32 indexBufferSize; + }; + + bool updateVertexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer); + bool updateIndexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer); + + //! updates hardware buffer if needed + virtual bool updateHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Create hardware buffer from mesh + virtual SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb); + + //! Delete hardware buffer (only some drivers can) + virtual void deleteHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Draw hardware buffer + virtual void drawHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Create occlusion query. + /** Use node for identification and mesh for occlusion test. */ + virtual void addOcclusionQuery(scene::ISceneNode* node, + const scene::IMesh* mesh=0); + + //! Remove occlusion query. + virtual void removeOcclusionQuery(scene::ISceneNode* node); + + //! Run occlusion query. Draws mesh stored in query. + /** If the mesh shall not be rendered visible, use + overrideMaterial to disable the color and depth buffer. */ + virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false); + + //! Update occlusion query. Retrieves results from GPU. + /** If the query shall not block, set the flag to false. + Update might not occur in this case, though */ + virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true); + + //! Return query result. + /** Return value is the number of visible pixels/fragments. + The value is a safe approximation, i.e. can be larger then the + actual value of pixels. */ + virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const; + + //! draws a vertex primitive list + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType); + + //! draws a vertex primitive list in 2d + virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType); + + //! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false); + + //! Draws a part of the texture into the rectangle. + virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false); + + //! Draws a set of 2d images, using a color and the alpha channel of the texture. + virtual void draw2DImageBatch(const video::ITexture* texture, + const core::array<core::position2d<s32> >& positions, + const core::array<core::rect<s32> >& sourceRects, + const core::rect<s32>* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false); + + //!Draws an 2d rectangle with a gradient. + virtual void draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip); + + //! Draws a 2d line. + virtual void draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color=SColor(255,255,255,255)); + + //! Draws a pixel. + virtual void drawPixel(u32 x, u32 y, const SColor & color); + + //! Draws a 3d line. + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color = SColor(255,255,255,255)); + + //! initialises the Direct3D API + bool initDriver(HWND hwnd, bool pureSoftware); + + //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 + //! driver, it would return "Direct3D8.1". + virtual const wchar_t* getName() const; + + //! deletes all dynamic lights there are + virtual void deleteAllDynamicLights(); + + //! adds a dynamic light, returning an index to the light + //! \param light: the light data to use to create the light + //! \return An index to the light, or -1 if an error occurs + virtual s32 addDynamicLight(const SLight& light); + + //! Turns a dynamic light on or off + //! \param lightIndex: the index returned by addDynamicLight + //! \param turnOn: true to turn the light on, false to turn it off + virtual void turnLightOn(s32 lightIndex, bool turnOn); + + //! returns the maximal amount of dynamic lights the device can handle + virtual u32 getMaximalDynamicLightAmount() const; + + //! Sets the dynamic ambient light color. The default color is + //! (0,0,0,0) which means it is dark. + //! \param color: New color of the ambient light. + virtual void setAmbientLight(const SColorf& color); + + //! Draws a shadow volume into the stencil buffer. + virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0); + + //! Fills the stencil shadow with color. + virtual void drawStencilShadow(bool clearStencilBuffer=false, + video::SColor leftUpEdge = video::SColor(0,0,0,0), + video::SColor rightUpEdge = video::SColor(0,0,0,0), + video::SColor leftDownEdge = video::SColor(0,0,0,0), + video::SColor rightDownEdge = video::SColor(0,0,0,0)); + + //! Returns the maximum amount of primitives (mostly vertices) which + //! the device is able to render with one drawIndexedTriangleList + //! call. + virtual u32 getMaximalPrimitiveCount() const; + + //! Enables or disables a texture creation flag. + virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled); + + //! Sets the fog mode. + virtual void setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog); + + //! Only used by the internal engine. Used to notify the driver that + //! the window was resized. + virtual void OnResize(const core::dimension2d<u32>& size); + + //! Can be called by an IMaterialRenderer to make its work easier. + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates); + + //! Returns type of video driver + virtual E_DRIVER_TYPE getDriverType() const; + + //! Returns the transformation set by setTransform + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const; + + //! Sets a vertex shader constant. + virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + + //! Sets a pixel shader constant. + virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + + //! Sets a constant for the vertex shader based on a name. + virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count); + + //! Sets a constant for the pixel shader based on a name. + virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count); + + //! Returns a pointer to the IVideoDriver interface. (Implementation for + //! IMaterialRendererServices) + virtual IVideoDriver* getVideoDriver(); + + //! Creates a render target texture. + virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! Clears the ZBuffer. + virtual void clearZBuffer(); + + //! Returns an image created from the last rendered frame. + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER); + + //! Set/unset a clipping plane. + virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false); + + //! Enable/disable a clipping plane. + virtual void enableClipPlane(u32 index, bool enable); + + //! Returns the graphics card vendor name. + virtual core::stringc getVendorInfo() {return VendorName;} + + //! Enable the 2d override material + virtual void enableMaterial2D(bool enable=true); + + //! Check if the driver was recently reset. + virtual bool checkDriverReset() {return DriverWasReset;} + + // removes the depth struct from the DepthSurface array + void removeDepthSurface(SDepthSurface* depth); + + //! Get the current color format of the color buffer + /** \return Color format of the color buffer. */ + virtual ECOLOR_FORMAT getColorFormat() const; + + //! Returns the maximum texture size supported. + virtual core::dimension2du getMaxTextureSize() const; + + //! Get the current color format of the color buffer + /** \return Color format of the color buffer as D3D color value. */ + D3DFORMAT getD3DColorFormat() const; + + //! Get D3D color format from Irrlicht color format. + D3DFORMAT getD3DFormatFromColorFormat(ECOLOR_FORMAT format) const; + + //! Get Irrlicht color format from D3D color format. + ECOLOR_FORMAT getColorFormatFromD3DFormat(D3DFORMAT format) const; + + //! Get Cg context + #ifdef _IRR_COMPILE_WITH_CG_ + const CGcontext& getCgContext(); + #endif + + private: + + //! enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates. + enum E_RENDER_MODE + { + ERM_NONE = 0, // no render state has been set yet. + ERM_2D, // 2d drawing rendermode + ERM_3D, // 3d rendering mode + ERM_STENCIL_FILL, // stencil fill mode + ERM_SHADOW_VOLUME_ZFAIL, // stencil volume draw mode + ERM_SHADOW_VOLUME_ZPASS // stencil volume draw mode + }; + + //! sets right vertex shader + void setVertexShader(video::E_VERTEX_TYPE newType); + + //! sets the needed renderstates + bool setRenderStates3DMode(); + + //! sets the needed renderstates + void setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel); + + //! sets the needed renderstates + void setRenderStatesStencilFillMode(bool alpha); + + //! sets the needed renderstates + void setRenderStatesStencilShadowMode(bool zfail, u32 debugDataVisible); + + //! sets the current Texture + bool setActiveTexture(u32 stage, const video::ITexture* texture); + + //! resets the device + bool reset(); + + //! returns a device dependent texture from a software surface (IImage) + //! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES + virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData=0); + + //! returns the current size of the screen or rendertarget + virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const; + + //! Check if a proper depth buffer for the RTT is available, otherwise create it. + void checkDepthBuffer(ITexture* tex); + + //! Adds a new material renderer to the VideoDriver, using pixel and/or + //! vertex shaders to render geometry. + s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, s32 userData); + + //! Adds a new material renderer to the VideoDriver, based on a high level shading + //! language. + virtual s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT); + + void createMaterialRenderers(); + + void draw2D3DVertexPrimitiveList(const void* vertices, + u32 vertexCount, const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType, bool is3D); + + D3DTEXTUREADDRESS getTextureWrapMode(const u8 clamp); + + inline D3DCOLORVALUE colorToD3D(const SColor& col) + { + const f32 f = 1.0f / 255.0f; + D3DCOLORVALUE v; + v.r = col.getRed() * f; + v.g = col.getGreen() * f; + v.b = col.getBlue() * f; + v.a = col.getAlpha() * f; + return v; + } + + E_RENDER_MODE CurrentRenderMode; + D3DPRESENT_PARAMETERS present; + + SMaterial Material, LastMaterial; + bool ResetRenderStates; // bool to make all renderstates be reseted if set. + bool Transformation3DChanged; + const ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES]; + bool LastTextureMipMapsAvailable[MATERIAL_MAX_TEXTURES]; + core::matrix4 Matrices[ETS_COUNT]; // matrizes of the 3d mode we need to restore when we switch back from the 2d mode. + + HINSTANCE D3DLibrary; + IDirect3D9* pID3D; + IDirect3DDevice9* pID3DDevice; + + IDirect3DSurface9* PrevRenderTarget; + core::dimension2d<u32> CurrentRendertargetSize; + + HWND WindowId; + core::rect<s32>* SceneSourceRect; + + D3DCAPS9 Caps; + + SIrrlichtCreationParameters Params; + + E_VERTEX_TYPE LastVertexType; + + SColorf AmbientLight; + + core::stringc VendorName; + u16 VendorID; + + core::array<SDepthSurface*> DepthBuffers; + + u32 MaxTextureUnits; + u32 MaxUserClipPlanes; + u32 MaxMRTs; + u32 NumSetMRTs; + f32 MaxLightDistance; + s32 LastSetLight; + + enum E_CACHE_2D_ATTRIBUTES + { + EC2D_ALPHA = 0x1, + EC2D_TEXTURE = 0x2, + EC2D_ALPHA_CHANNEL = 0x4 + }; + + ECOLOR_FORMAT ColorFormat; + D3DFORMAT D3DColorFormat; + bool DeviceLost; + bool DriverWasReset; + bool OcclusionQuerySupport; + bool AlphaToCoverageSupport; + + #ifdef _IRR_COMPILE_WITH_CG_ + CGcontext CgContext; + #endif + }; + + +} // end namespace video +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ +#endif // __C_VIDEO_DIRECTX_9_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp new file mode 100644 index 0000000..131bdf5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp @@ -0,0 +1,428 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "CD3D9HLSLMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" +#include "IVideoDriver.h" +#include "os.h" +#include "irrString.h" + +#ifndef _IRR_D3D_NO_SHADER_DEBUGGING +#include <stdio.h> +#endif + + +namespace irr +{ +namespace video +{ + + +//! Public constructor +CD3D9HLSLMaterialRenderer::CD3D9HLSLMaterialRenderer(IDirect3DDevice9* d3ddev, + video::IVideoDriver* driver, s32& outMaterialTypeNr, + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, + s32 userData) + : CD3D9ShaderMaterialRenderer(d3ddev, driver, callback, baseMaterial, userData), + VSConstantsTable(0), PSConstantsTable(0) +{ + + #ifdef _DEBUG + setDebugName("CD3D9HLSLMaterialRenderer"); + #endif + + outMaterialTypeNr = -1; + + // now create shaders + + if (vsCompileTarget < 0 || vsCompileTarget > EVST_COUNT) + { + os::Printer::log("Invalid HLSL vertex shader compilation target", ELL_ERROR); + return; + } + + if (!createHLSLVertexShader(vertexShaderProgram, + vertexShaderEntryPointName, VERTEX_SHADER_TYPE_NAMES[vsCompileTarget])) + return; + + if (!createHLSLPixelShader(pixelShaderProgram, + pixelShaderEntryPointName, PIXEL_SHADER_TYPE_NAMES[psCompileTarget])) + return; + + // register myself as new material + outMaterialTypeNr = Driver->addMaterialRenderer(this); +} + + +//! Destructor +CD3D9HLSLMaterialRenderer::~CD3D9HLSLMaterialRenderer() +{ + if (VSConstantsTable) + VSConstantsTable->Release(); + + if (PSConstantsTable) + PSConstantsTable->Release(); +} + + +bool CD3D9HLSLMaterialRenderer::createHLSLVertexShader(const char* vertexShaderProgram, + const char* shaderEntryPointName, + const char* shaderTargetName) +{ + if (!vertexShaderProgram) + return true; + + LPD3DXBUFFER buffer = 0; + LPD3DXBUFFER errors = 0; + +#ifdef _IRR_D3D_NO_SHADER_DEBUGGING + + // compile without debug info + HRESULT h = stubD3DXCompileShader( + vertexShaderProgram, + strlen(vertexShaderProgram), + 0, // macros + 0, // no includes + shaderEntryPointName, + shaderTargetName, + 0, // no flags + &buffer, + &errors, + &VSConstantsTable); + +#else + + // compile shader and emitt some debug informations to + // make it possible to debug the shader in visual studio + + static int irr_dbg_hlsl_file_nr = 0; + ++irr_dbg_hlsl_file_nr; + char tmp[32]; + sprintf(tmp, "irr_d3d9_dbg_hlsl_%d.vsh", irr_dbg_hlsl_file_nr); + + FILE* f = fopen(tmp, "wb"); + fwrite(vertexShaderProgram, strlen(vertexShaderProgram), 1, f); + fflush(f); + fclose(f); + + HRESULT h = stubD3DXCompileShaderFromFile( + tmp, + 0, // macros + 0, // no includes + shaderEntryPointName, + shaderTargetName, + D3DXSHADER_DEBUG | D3DXSHADER_SKIPOPTIMIZATION, + &buffer, + &errors, + &VSConstantsTable); + +#endif + + if (FAILED(h)) + { + os::Printer::log("HLSL vertex shader compilation failed:", ELL_ERROR); + if (errors) + { + os::Printer::log((c8*)errors->GetBufferPointer(), ELL_ERROR); + errors->Release(); + if (buffer) + buffer->Release(); + } + return false; + } + + if (errors) + errors->Release(); + + if (buffer) + { + if (FAILED(pID3DDevice->CreateVertexShader((DWORD*)buffer->GetBufferPointer(), + &VertexShader))) + { + os::Printer::log("Could not create hlsl vertex shader.", ELL_ERROR); + buffer->Release(); + return false; + } + + buffer->Release(); + return true; + } + + return false; +} + + +bool CD3D9HLSLMaterialRenderer::createHLSLPixelShader(const char* pixelShaderProgram, + const char* shaderEntryPointName, + const char* shaderTargetName) +{ + if (!pixelShaderProgram) + return true; + + LPD3DXBUFFER buffer = 0; + LPD3DXBUFFER errors = 0; + + DWORD flags = 0; + +#ifdef D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY + if (Driver->queryFeature(video::EVDF_VERTEX_SHADER_2_0) || Driver->queryFeature(video::EVDF_VERTEX_SHADER_3_0)) + // this one's for newer DX SDKs which don't support ps_1_x anymore + // instead they'll silently compile 1_x as 2_x when using this flag + flags |= D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY; +#endif +#if defined(_IRR_D3D_USE_LEGACY_HLSL_COMPILER) && defined(D3DXSHADER_USE_LEGACY_D3DX9_31_DLL) +#ifdef D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY + else +#endif + flags |= D3DXSHADER_USE_LEGACY_D3DX9_31_DLL; +#endif + +#ifdef _IRR_D3D_NO_SHADER_DEBUGGING + + // compile without debug info + HRESULT h = stubD3DXCompileShader( + pixelShaderProgram, + strlen(pixelShaderProgram), + 0, // macros + 0, // no includes + shaderEntryPointName, + shaderTargetName, + flags, + &buffer, + &errors, + &PSConstantsTable); + +#else + + // compile shader and emitt some debug informations to + // make it possible to debug the shader in visual studio + + static int irr_dbg_hlsl_file_nr = 0; + ++irr_dbg_hlsl_file_nr; + char tmp[32]; + sprintf(tmp, "irr_d3d9_dbg_hlsl_%d.psh", irr_dbg_hlsl_file_nr); + + FILE* f = fopen(tmp, "wb"); + fwrite(pixelShaderProgram, strlen(pixelShaderProgram), 1, f); + fflush(f); + fclose(f); + + HRESULT h = stubD3DXCompileShaderFromFile( + tmp, + 0, // macros + 0, // no includes + shaderEntryPointName, + shaderTargetName, + flags | D3DXSHADER_DEBUG | D3DXSHADER_SKIPOPTIMIZATION, + &buffer, + &errors, + &PSConstantsTable); + +#endif + + if (FAILED(h)) + { + os::Printer::log("HLSL pixel shader compilation failed:", ELL_ERROR); + if (errors) + { + os::Printer::log((c8*)errors->GetBufferPointer(), ELL_ERROR); + errors->Release(); + if (buffer) + buffer->Release(); + } + return false; + } + + if (errors) + errors->Release(); + + if (buffer) + { + if (FAILED(pID3DDevice->CreatePixelShader((DWORD*)buffer->GetBufferPointer(), + &PixelShader))) + { + os::Printer::log("Could not create hlsl pixel shader.", ELL_ERROR); + buffer->Release(); + return false; + } + + buffer->Release(); + return true; + } + + return false; +} + + +bool CD3D9HLSLMaterialRenderer::setVariable(bool vertexShader, const c8* name, + const f32* floats, int count) +{ + LPD3DXCONSTANTTABLE tbl = vertexShader ? VSConstantsTable : PSConstantsTable; + if (!tbl) + return false; + + // currently we only support top level parameters. + // Should be enough for the beginning. (TODO) + + D3DXHANDLE hndl = tbl->GetConstantByName(NULL, name); + if (!hndl) + { + core::stringc s = "HLSL Variable to set not found: '"; + s += name; + s += "'. Available variables are:"; + os::Printer::log(s.c_str(), ELL_WARNING); + printHLSLVariables(tbl); + return false; + } + + D3DXCONSTANT_DESC Description; + UINT ucount = 1; + tbl->GetConstantDesc(hndl, &Description, &ucount); + + if(Description.RegisterSet != D3DXRS_SAMPLER) + { + HRESULT hr = tbl->SetFloatArray(pID3DDevice, hndl, floats, count); + if (FAILED(hr)) + { + os::Printer::log("Error setting float array for HLSL variable", ELL_WARNING); + return false; + } + } + + return true; +} + + +bool CD3D9HLSLMaterialRenderer::setVariable(bool vertexShader, const c8* name, + const bool* bools, int count) +{ + LPD3DXCONSTANTTABLE tbl = vertexShader ? VSConstantsTable : PSConstantsTable; + if (!tbl) + return false; + + // currently we only support top level parameters. + // Should be enough for the beginning. (TODO) + + D3DXHANDLE hndl = tbl->GetConstantByName(NULL, name); + if (!hndl) + { + core::stringc s = "HLSL Variable to set not found: '"; + s += name; + s += "'. Available variables are:"; + os::Printer::log(s.c_str(), ELL_WARNING); + printHLSLVariables(tbl); + return false; + } + + D3DXCONSTANT_DESC Description; + UINT ucount = 1; + tbl->GetConstantDesc(hndl, &Description, &ucount); + + if(Description.RegisterSet != D3DXRS_SAMPLER) + { + HRESULT hr = tbl->SetBoolArray(pID3DDevice, hndl, (BOOL*)bools, count); + if (FAILED(hr)) + { + os::Printer::log("Error setting bool array for HLSL variable", ELL_WARNING); + return false; + } + } + + return true; +} + + +bool CD3D9HLSLMaterialRenderer::setVariable(bool vertexShader, const c8* name, + const s32* ints, int count) +{ + LPD3DXCONSTANTTABLE tbl = vertexShader ? VSConstantsTable : PSConstantsTable; + if (!tbl) + return false; + + // currently we only support top level parameters. + // Should be enough for the beginning. (TODO) + + D3DXHANDLE hndl = tbl->GetConstantByName(NULL, name); + if (!hndl) + { + core::stringc s = "HLSL Variable to set not found: '"; + s += name; + s += "'. Available variables are:"; + os::Printer::log(s.c_str(), ELL_WARNING); + printHLSLVariables(tbl); + return false; + } + + D3DXCONSTANT_DESC Description; + UINT ucount = 1; + tbl->GetConstantDesc(hndl, &Description, &ucount); + + if(Description.RegisterSet != D3DXRS_SAMPLER) + { + HRESULT hr = tbl->SetIntArray(pID3DDevice, hndl, ints, count); + if (FAILED(hr)) + { + os::Printer::log("Error setting int array for HLSL variable", ELL_WARNING); + return false; + } + } + + return true; +} + + +bool CD3D9HLSLMaterialRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) +{ + if (VSConstantsTable) + VSConstantsTable->SetDefaults(pID3DDevice); + + return CD3D9ShaderMaterialRenderer::OnRender(service, vtxtype); +} + + +void CD3D9HLSLMaterialRenderer::printHLSLVariables(LPD3DXCONSTANTTABLE table) +{ + // currently we only support top level parameters. + // Should be enough for the beginning. (TODO) + + // print out constant names + D3DXCONSTANTTABLE_DESC tblDesc; + HRESULT hr = table->GetDesc(&tblDesc); + if (!FAILED(hr)) + { + for (int i=0; i<(int)tblDesc.Constants; ++i) + { + D3DXCONSTANT_DESC d; + UINT n = 1; + D3DXHANDLE cHndl = table->GetConstant(NULL, i); + if (!FAILED(table->GetConstantDesc(cHndl, &d, &n))) + { + core::stringc s = " '"; + s += d.Name; + s += "' Registers:[begin:"; + s += (int)d.RegisterIndex; + s += ", count:"; + s += (int)d.RegisterCount; + s += "]"; + os::Printer::log(s.c_str()); + } + } + } +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h new file mode 100644 index 0000000..2e051b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9HLSLMaterialRenderer.h @@ -0,0 +1,85 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D9_HLSL_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D9_HLSL_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "CD3D9ShaderMaterialRenderer.h" +#include "IGPUProgrammingServices.h" + +namespace irr +{ +namespace video +{ + +class IVideoDriver; +class IShaderConstantSetCallBack; +class IMaterialRenderer; + +//! Class for using vertex and pixel shaders via HLSL with D3D9 +class CD3D9HLSLMaterialRenderer : public CD3D9ShaderMaterialRenderer +{ +public: + + //! Public constructor + CD3D9HLSLMaterialRenderer(IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, + s32 userData); + + //! Destructor + ~CD3D9HLSLMaterialRenderer(); + + //! sets a variable in the shader. + //! \param vertexShader: True if this should be set in the vertex shader, false if + //! in the pixel shader. + //! \param name: Name of the variable + //! \param floats: Pointer to array of floats + //! \param count: Amount of floats in array. + virtual bool setVariable(bool vertexShader, const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setVariable(bool vertexShader, const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setVariable(bool vertexShader, const c8* name, const s32* ints, int count); + + bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + +protected: + + bool createHLSLVertexShader(const char* vertexShaderProgram, + const char* shaderEntryPointName, + const char* shaderTargetName); + + bool createHLSLPixelShader(const char* pixelShaderProgram, + const char* shaderEntryPointName, + const char* shaderTargetName); + + void printHLSLVariables(LPD3DXCONSTANTTABLE table); + + LPD3DXCONSTANTTABLE VSConstantsTable; + LPD3DXCONSTANTTABLE PSConstantsTable; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9MaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9MaterialRenderer.h new file mode 100644 index 0000000..1653661 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9MaterialRenderer.h @@ -0,0 +1,615 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D9_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D9_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#include "irrMath.h" // needed by borland for sqrtf define +#endif +#include <d3d9.h> + +#include "IMaterialRenderer.h" + +namespace irr +{ +namespace video +{ + +namespace +{ +D3DMATRIX UnitMatrixD3D9; +D3DMATRIX SphereMapMatrixD3D9; +inline void setTextureColorStage(IDirect3DDevice9* dev, DWORD i, + DWORD arg1, DWORD op, DWORD arg2) +{ + dev->SetTextureStageState(i, D3DTSS_COLOROP, op); + dev->SetTextureStageState(i, D3DTSS_COLORARG1, arg1); + dev->SetTextureStageState(i, D3DTSS_COLORARG2, arg2); +} +inline void setTextureColorStage(IDirect3DDevice9* dev, DWORD i, DWORD arg1) +{ + dev->SetTextureStageState(i, D3DTSS_COLOROP, D3DTOP_SELECTARG1); + dev->SetTextureStageState(i, D3DTSS_COLORARG1, arg1); +} + +inline void setTextureAlphaStage(IDirect3DDevice9* dev, DWORD i, + DWORD arg1, DWORD op, DWORD arg2) +{ + dev->SetTextureStageState(i, D3DTSS_ALPHAOP, op); + dev->SetTextureStageState(i, D3DTSS_ALPHAARG1, arg1); + dev->SetTextureStageState(i, D3DTSS_ALPHAARG2, arg2); +} +inline void setTextureAlphaStage(IDirect3DDevice9* dev, DWORD i, DWORD arg1) +{ + dev->SetTextureStageState(i, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + dev->SetTextureStageState(i, D3DTSS_ALPHAARG1, arg1); +} +} // anonymous namespace + +//! Base class for all internal D3D9 material renderers +class CD3D9MaterialRenderer : public IMaterialRenderer +{ +public: + + //! Constructor + CD3D9MaterialRenderer(IDirect3DDevice9* d3ddev, video::IVideoDriver* driver) + : pID3DDevice(d3ddev), Driver(driver) + { + } + + //! sets a variable in the shader. + //! \param vertexShader: True if this should be set in the vertex shader, false if + //! in the pixel shader. + //! \param name: Name of the variable + //! \param floats: Pointer to array of floats + //! \param count: Amount of floats in array. + virtual bool setVariable(bool vertexShader, const c8* name, const f32* floats, int count) + { + os::Printer::log("Invalid material to set variable in."); + return false; + } + + //! Bool interface for the above. + virtual bool setVariable(bool vertexShader, const c8* name, const bool* bools, int count) + { + os::Printer::log("Invalid material to set variable in."); + return false; + } + + //! Int interface for the above. + virtual bool setVariable(bool vertexShader, const c8* name, const s32* ints, int count) + { + os::Printer::log("Invalid material to set variable in."); + return false; + } + +protected: + + IDirect3DDevice9* pID3DDevice; + video::IVideoDriver* Driver; +}; + + +//! Solid material renderer +class CD3D9MaterialRenderer_SOLID : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_SOLID(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + } + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } +}; + +//! Generic Texture Blend +class CD3D9MaterialRenderer_ONETEXTURE_BLEND : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_ONETEXTURE_BLEND(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || + material.MaterialTypeParam != lastMaterial.MaterialTypeParam || + resetAllRenderstates) + { + + E_BLEND_FACTOR srcFact,dstFact; + E_MODULATE_FUNC modulate; + u32 alphaSource; + unpack_textureBlendFunc ( srcFact, dstFact, modulate, alphaSource, material.MaterialTypeParam ); + + if (srcFact == EBF_SRC_COLOR && dstFact == EBF_ZERO) + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + else + { + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, getD3DBlend ( srcFact ) ); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, getD3DBlend ( dstFact ) ); + } + + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, getD3DModulate(modulate), D3DTA_DIFFUSE); + + if ( textureBlendFunc_hasAlpha ( srcFact ) || textureBlendFunc_hasAlpha ( dstFact ) ) + { + if (alphaSource==EAS_VERTEX_COLOR) + { + setTextureAlphaStage(pID3DDevice, 0, D3DTA_DIFFUSE); + } + else if (alphaSource==EAS_TEXTURE) + { + setTextureAlphaStage(pID3DDevice, 0, D3DTA_TEXTURE); + } + else + { + setTextureAlphaStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + } + } + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + + } + } + + //! Returns if the material is transparent. + /** The scene management needs to know this for being able to sort the + materials by opaque and transparent. + The return value could be optimized, but we'd need to know the + MaterialTypeParam for it. */ + virtual bool isTransparent() const + { + return true; + } + + private: + + u32 getD3DBlend ( E_BLEND_FACTOR factor ) const + { + u32 r = 0; + switch ( factor ) + { + case EBF_ZERO: r = D3DBLEND_ZERO; break; + case EBF_ONE: r = D3DBLEND_ONE; break; + case EBF_DST_COLOR: r = D3DBLEND_DESTCOLOR; break; + case EBF_ONE_MINUS_DST_COLOR: r = D3DBLEND_INVDESTCOLOR; break; + case EBF_SRC_COLOR: r = D3DBLEND_SRCCOLOR; break; + case EBF_ONE_MINUS_SRC_COLOR: r = D3DBLEND_INVSRCCOLOR; break; + case EBF_SRC_ALPHA: r = D3DBLEND_SRCALPHA; break; + case EBF_ONE_MINUS_SRC_ALPHA: r = D3DBLEND_INVSRCALPHA; break; + case EBF_DST_ALPHA: r = D3DBLEND_DESTALPHA; break; + case EBF_ONE_MINUS_DST_ALPHA: r = D3DBLEND_INVDESTALPHA; break; + case EBF_SRC_ALPHA_SATURATE: r = D3DBLEND_SRCALPHASAT; break; + } + return r; + } + + u32 getD3DModulate ( E_MODULATE_FUNC func ) const + { + u32 r = D3DTOP_MODULATE; + switch ( func ) + { + case EMFN_MODULATE_1X: r = D3DTOP_MODULATE; break; + case EMFN_MODULATE_2X: r = D3DTOP_MODULATE2X; break; + case EMFN_MODULATE_4X: r = D3DTOP_MODULATE4X; break; + } + return r; + } + + bool transparent; + +}; + + + +//! Solid 2 layer material renderer +class CD3D9MaterialRenderer_SOLID_2_LAYER : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_SOLID_2_LAYER(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, D3DTA_TEXTURE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0); + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_BLENDDIFFUSEALPHA); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } +}; + + +//! Transparent add color material renderer +class CD3D9MaterialRenderer_TRANSPARENT_ADD_COLOR : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_TRANSPARENT_ADD_COLOR(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); + } + } + + //! Returns if the material is transparent. The scene management needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent vertex alpha material renderer +class CD3D9MaterialRenderer_TRANSPARENT_VERTEX_ALPHA : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_TRANSPARENT_VERTEX_ALPHA(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_DIFFUSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent alpha channel material renderer +class CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates + || material.MaterialTypeParam != lastMaterial.MaterialTypeParam ) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_TEXTURE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); + + pID3DDevice->SetRenderState(D3DRS_ALPHAREF, core::floor32(material.MaterialTypeParam * 255.f)); + pID3DDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + + +//! Transparent alpha channel material renderer +class CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_TEXTURE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + + // 127 is required by EMT_TRANSPARENT_ALPHA_CHANNEL_REF + pID3DDevice->SetRenderState(D3DRS_ALPHAREF, 127); + pID3DDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return false; // this material is not really transparent because it does no blending. + } +}; + + +//! material renderer for all kinds of lightmaps +class CD3D9MaterialRenderer_LIGHTMAP : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_LIGHTMAP(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (material.MaterialType >= EMT_LIGHTMAP_LIGHTING) + { + // with lighting + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + } + else + { + setTextureColorStage(pID3DDevice, 0, D3DTA_TEXTURE); + } + + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, + (material.MaterialType == EMT_LIGHTMAP_ADD)? + D3DTOP_ADD: + (material.MaterialType == EMT_LIGHTMAP_M4 || material.MaterialType == EMT_LIGHTMAP_LIGHTING_M4)? + D3DTOP_MODULATE4X: + (material.MaterialType == EMT_LIGHTMAP_M2 || material.MaterialType == EMT_LIGHTMAP_LIGHTING_M2)? + D3DTOP_MODULATE2X: + D3DTOP_MODULATE, + D3DTA_CURRENT); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } +}; + + + +//! material renderer for detail maps +class CD3D9MaterialRenderer_DETAIL_MAP : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_DETAIL_MAP(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, D3DTOP_ADDSIGNED, D3DTA_CURRENT); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } +}; + + +//! sphere map material renderer +class CD3D9MaterialRenderer_SPHERE_MAP : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_SPHERE_MAP(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + + pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + + pID3DDevice->SetTransform( D3DTS_TEXTURE0, &SphereMapMatrixD3D9 ); + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACENORMAL ); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + pID3DDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, 0); + pID3DDevice->SetTransform( D3DTS_TEXTURE0, &UnitMatrixD3D9 ); + } +}; + + +//! reflection 2 layer material renderer +class CD3D9MaterialRenderer_REFLECTION_2_LAYER : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_REFLECTION_2_LAYER(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + + pID3DDevice->SetTransform( D3DTS_TEXTURE1, &SphereMapMatrixD3D9 ); + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetTransform( D3DTS_TEXTURE1, &UnitMatrixD3D9 ); + } +}; + + +//! reflection 2 layer material renderer +class CD3D9MaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER : public CD3D9MaterialRenderer +{ +public: + + CD3D9MaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(IDirect3DDevice9* p, video::IVideoDriver* d) + : CD3D9MaterialRenderer(p, d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + setTextureColorStage(pID3DDevice, 0, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE); + setTextureAlphaStage(pID3DDevice, 0, D3DTA_DIFFUSE); + setTextureColorStage(pID3DDevice, 1, + D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_CURRENT); + setTextureAlphaStage(pID3DDevice, 1, D3DTA_CURRENT); + + pID3DDevice->SetTransform(D3DTS_TEXTURE1, &SphereMapMatrixD3D9 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR); + + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + } + } + + virtual void OnUnsetMaterial() + { + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetTransform(D3DTS_TEXTURE1, &UnitMatrixD3D9); + } + + //! Returns if the material is transparent. The scene managment needs to know this + //! for being able to sort the materials by opaque and transparent. + virtual bool isTransparent() const + { + return true; + } +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.cpp new file mode 100644 index 0000000..eb6f732 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.cpp @@ -0,0 +1,306 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "CD3D9NormalMapRenderer.h" +#include "IVideoDriver.h" +#include "IMaterialRendererServices.h" +#include "os.h" +#include "SLight.h" + +namespace irr +{ +namespace video +{ + + // 1.1 Shaders with two lights and vertex based attenuation + + // Irrlicht Engine D3D9 render path normal map vertex shader + const char D3D9_NORMAL_MAP_VSH[] = + ";Irrlicht Engine 0.8 D3D9 render path normal map vertex shader\n"\ + "; c0-3: Transposed world matrix \n"\ + "; c8-11: Transposed worldViewProj matrix (Projection * View * World) \n"\ + "; c12: Light01 position \n"\ + "; c13: x,y,z: Light01 color; .w: 1/LightRadius \n"\ + "; c14: Light02 position \n"\ + "; c15: x,y,z: Light02 color; .w: 1/LightRadius \n"\ + "vs.1.1\n"\ + "dcl_position v0 ; position \n"\ + "dcl_normal v1 ; normal \n"\ + "dcl_color v2 ; color \n"\ + "dcl_texcoord0 v3 ; texture coord \n"\ + "dcl_texcoord1 v4 ; tangent \n"\ + "dcl_texcoord2 v5 ; binormal \n"\ + "\n"\ + "def c95, 0.5, 0.5, 0.5, 0.5 ; used for moving light vector to ps \n"\ + "\n"\ + "m4x4 oPos, v0, c8 ; transform position to clip space with worldViewProj matrix\n"\ + "\n"\ + "m3x3 r5, v4, c0 ; transform tangent U\n"\ + "m3x3 r7, v1, c0 ; transform normal W\n"\ + "m3x3 r6, v5, c0 ; transform binormal V\n"\ + "\n"\ + "m4x4 r4, v0, c0 ; vertex into world position\n"\ + "add r2, c12, -r4 ; vtxpos - lightpos1\n"\ + "add r3, c14, -r4 ; vtxpos - lightpos2\n"\ + "\n"\ + "dp3 r8.x, r5, r2 ; transform the light vector 1 with U, V, W\n"\ + "dp3 r8.y, r6, r2 \n"\ + "dp3 r8.z, r7, r2 \n"\ + "dp3 r9.x, r5, r3 ; transform the light vector 2 with U, V, W\n"\ + "dp3 r9.y, r6, r3 \n"\ + "dp3 r9.z, r7, r3 \n"\ + "\n"\ + "dp3 r8.w, r8, r8 ; normalize light vector 1 (r8)\n"\ + "rsq r8.w, r8.w \n"\ + "mul r8, r8, r8.w \n"\ + "dp3 r9.w, r9, r9 ; normalize light vector 2 (r9)\n"\ + "rsq r9.w, r9.w \n"\ + "mul r9, r9, r9.w \n"\ + "\n"\ + "mad oT2.xyz, r8.xyz, c95, c95 ; move light vector 1 from -1..1 into 0..1 \n"\ + "mad oT3.xyz, r9.xyz, c95, c95 ; move light vector 2 from -1..1 into 0..1 \n"\ + "\n"\ + " ; calculate attenuation of light 1 \n"\ + "dp3 r2.x, r2.xyz, r2.xyz ; r2.x = r2.x + r2.y + r2.z \n"\ + "mul r2.x, r2.x, c13.w ; r2.x * attenutation \n"\ + "rsq r2, r2.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD0, r2, c13 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + " ; calculate attenuation of light 2 \n"\ + "dp3 r3.x, r3.xyz, r3.xyz ; r3.x = r3.x + r3.y + r3.z \n"\ + "mul r3.x, r3.x, c15.w ; r2.x * attenutation \n"\ + "rsq r3, r3.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD1, r3, c15 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "mov oT0.xy, v3.xy ; move out texture coordinates 1\n"\ + "mov oT1.xy, v3.xy ; move out texture coordinates 2\n"\ + "mov oD0.a, v2.a ; move out original alpha value \n"\ + "\n"; + + // Irrlicht Engine D3D9 render path normal map pixel shader + const char D3D9_NORMAL_MAP_PSH_1_1[] = + ";Irrlicht Engine 0.8 D3D9 render path normal map pixel shader\n"\ + ";Input: \n"\ + ";t0: color map texture coord \n"\ + ";t1: normal map texture coords \n"\ + ";t2: light 1 vector in tangent space \n"\ + ";v0: light 1 color \n"\ + ";t3: light 2 vector in tangent space \n"\ + ";v1: light 2 color \n"\ + ";v0.a: vertex alpha value \n"\ + "ps.1.1 \n"\ + "tex t0 ; sample color map \n"\ + "tex t1 ; sample normal map\n"\ + "texcoord t2 ; fetch light vector 1\n"\ + "texcoord t3 ; fetch light vector 2\n"\ + "\n"\ + "dp3_sat r0, t1_bx2, t2_bx2 ; normal dot light 1 (_bx2 because moved into 0..1)\n"\ + "mul r0, r0, v0 ; luminance1 * light color 1 \n"\ + "\n"\ + "dp3_sat r1, t1_bx2, t3_bx2 ; normal dot light 2 (_bx2 because moved into 0..1)\n"\ + "mad r0, r1, v1, r0 ; (luminance2 * light color 2) + luminance 1 \n"\ + "\n"\ + "mul r0.xyz, t0, r0 ; total luminance * base color\n"\ + "+mov r0.a, v0.a ; write interpolated vertex alpha value \n"\ + "\n"\ + ""; + + // Higher-quality normal map pixel shader (requires PS 2.0) + // uses per-pixel normalization for improved accuracy + const char D3D9_NORMAL_MAP_PSH_2_0[] = + ";Irrlicht Engine 0.8 D3D9 render path normal map pixel shader\n"\ + ";Input: \n"\ + ";t0: color map texture coord \n"\ + ";t1: normal map texture coords \n"\ + ";t2: light 1 vector in tangent space \n"\ + ";v0: light 1 color \n"\ + ";t3: light 2 vector in tangent space \n"\ + ";v1: light 2 color \n"\ + ";v0.a: vertex alpha value \n"\ + + "ps_2_0 \n"\ + "def c0, 0, 0, 0, 0\n"\ + "def c1, 1.0, 1.0, 1.0, 1.0\n"\ + "def c2, 2.0, 2.0, 2.0, 2.0\n"\ + "def c3, -.5, -.5, -.5, -.5\n"\ + "dcl t0\n"\ + "dcl t1\n"\ + "dcl t2\n"\ + "dcl t3\n"\ + "dcl v1\n"\ + "dcl v0\n"\ + "dcl_2d s0\n"\ + "dcl_2d s1\n"\ + + "texld r0, t0, s0 ; sample color map into r0 \n"\ + "texld r4, t0, s1 ; sample normal map into r4\n"\ + "add r4, r4, c3 ; bias the normal vector\n"\ + "add r5, t2, c3 ; bias the light 1 vector into r5\n"\ + "add r6, t3, c3 ; bias the light 2 vector into r6\n"\ + + "nrm r1, r4 ; normalize the normal vector into r1\n"\ + "nrm r2, r5 ; normalize the light1 vector into r2\n"\ + "nrm r3, r6 ; normalize the light2 vector into r3\n"\ + + "dp3 r2, r2, r1 ; let r2 = normal DOT light 1 vector\n"\ + "max r2, r2, c0 ; clamp result to positive numbers\n"\ + "mul r2, r2, v0 ; let r2 = luminance1 * light color 1 \n"\ + + "dp3 r3, r3, r1 ; let r3 = normal DOT light 2 vector\n"\ + "max r3, r3, c0 ; clamp result to positive numbers\n"\ + + "mad r2, r3, v1, r2 ; let r2 = (luminance2 * light color 2) + (luminance2 * light color 1) \n"\ + + "mul r2, r2, r0 ; let r2 = total luminance * base color\n"\ + "mov r2.w, v0.w ; write interpolated vertex alpha value \n"\ + + "mov oC0, r2 ; copy r2 to the output register \n"\ + + "\n"\ + ""; + + CD3D9NormalMapRenderer::CD3D9NormalMapRenderer( + IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial) + : CD3D9ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial) + { + #ifdef _DEBUG + setDebugName("CD3D9NormalMapRenderer"); + #endif + + // set this as callback. We could have done this in + // the initialization list, but some compilers don't like it. + + CallBack = this; + + // basically, this thing simply compiles the hardcoded shaders + // if the hardware is able to do them, otherwise it maps to the + // base material + + if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) || + !driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + { + // this hardware is not able to do shaders. Fall back to + // base material. + outMaterialTypeNr = driver->addMaterialRenderer(this); + return; + } + + // check if already compiled normal map shaders are there. + + video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_NORMAL_MAP_SOLID); + if (renderer) + { + // use the already compiled shaders + video::CD3D9NormalMapRenderer* nmr = (video::CD3D9NormalMapRenderer*)renderer; + VertexShader = nmr->VertexShader; + if (VertexShader) + VertexShader->AddRef(); + + PixelShader = nmr->PixelShader; + if (PixelShader) + PixelShader->AddRef(); + + outMaterialTypeNr = driver->addMaterialRenderer(this); + } + else + { + // compile shaders on our own + if (driver->queryFeature(video::EVDF_PIXEL_SHADER_2_0)) + { + init(outMaterialTypeNr, D3D9_NORMAL_MAP_VSH, D3D9_NORMAL_MAP_PSH_2_0); + } + else + { + init(outMaterialTypeNr, D3D9_NORMAL_MAP_VSH, D3D9_NORMAL_MAP_PSH_1_1); + } + } + // something failed, use base material + if (-1==outMaterialTypeNr) + driver->addMaterialRenderer(this); + } + + + CD3D9NormalMapRenderer::~CD3D9NormalMapRenderer() + { + if (CallBack == this) + CallBack = 0; + } + + + bool CD3D9NormalMapRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) + { + if (vtxtype != video::EVT_TANGENTS) + { + os::Printer::log("Error: Normal map renderer only supports vertices of type EVT_TANGENTS", ELL_ERROR); + return false; + } + + return CD3D9ShaderMaterialRenderer::OnRender(service, vtxtype); + } + + + //! Returns the render capability of the material. + s32 CD3D9NormalMapRenderer::getRenderCapability() const + { + if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) && + Driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + return 0; + + return 1; + } + + + //! Called by the engine when the vertex and/or pixel shader constants + //! for an material renderer should be set. + void CD3D9NormalMapRenderer::OnSetConstants(IMaterialRendererServices* services, s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + // set transposed world matrix + services->setVertexShaderConstant(driver->getTransform(video::ETS_WORLD).getTransposed().pointer(), 0, 4); + + // set transposed worldViewProj matrix + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + services->setVertexShaderConstant(worldViewProj.getTransposed().pointer(), 8, 4); + + // here we've got to fetch the fixed function lights from the + // driver and set them as constants + + u32 cnt = driver->getDynamicLightCount(); + + for (u32 i=0; i<2; ++i) + { + SLight light; + + if (i<cnt) + light = driver->getDynamicLight(i); + else + { + light.DiffuseColor.set(0,0,0); // make light dark + light.Radius = 1.0f; + } + + light.DiffuseColor.a = 1.0f/(light.Radius*light.Radius); // set attenuation + + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.Position), 12+(i*2), 1); + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.DiffuseColor), 13+(i*2), 1); + } + + // this is not really necessary in d3d9 (used a def instruction), but to be sure: + f32 c95[] = {0.5f, 0.5f, 0.5f, 0.5f}; + services->setVertexShaderConstant(c95, 95, 1); + } + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.h new file mode 100644 index 0000000..70b4a5c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9NormalMapRenderer.h @@ -0,0 +1,56 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D9_NORMAL_MAPMATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D9_NORMAL_MAPMATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#include "irrMath.h" // needed by borland for sqrtf define +#endif +#include <d3d9.h> + +#include "CD3D9ShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" + +namespace irr +{ +namespace video +{ + +//! Renderer for normal maps +class CD3D9NormalMapRenderer : + public CD3D9ShaderMaterialRenderer, IShaderConstantSetCallBack +{ +public: + + CD3D9NormalMapRenderer( + IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial); + + ~CD3D9NormalMapRenderer(); + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + //! Returns the render capability of the material. + virtual s32 getRenderCapability() const; + +private: + +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp new file mode 100644 index 0000000..954a552 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp @@ -0,0 +1,410 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "CD3D9ParallaxMapRenderer.h" +#include "IMaterialRendererServices.h" +#include "IVideoDriver.h" +#include "os.h" +#include "SLight.h" + +//#define SHADER_EXTERNAL_DEBUG + +#ifdef SHADER_EXTERNAL_DEBUG +#include "CReadFile.h" +#endif + +namespace irr +{ +namespace video +{ + // 1.1/1.4 Shaders with two lights and vertex based attenuation + + // Irrlicht Engine D3D9 render path normal map vertex shader + const char D3D9_PARALLAX_MAP_VSH[] = + ";Irrlicht Engine 0.10 D3D9 render path parallax mapping vertex shader\n"\ + "; c0-3: Transposed world matrix \n"\ + "; c4: Eye position \n"\ + "; c8-11: Transposed worldViewProj matrix (Projection * View * World) \n"\ + "; c12: Light01 position \n"\ + "; c13: x,y,z: Light01 color; .w: 1/LightRadius \n"\ + "; c14: Light02 position \n"\ + "; c15: x,y,z: Light02 color; .w: 1/LightRadius \n"\ + "vs.1.1\n"\ + "dcl_position v0 ; position \n"\ + "dcl_normal v1 ; normal \n"\ + "dcl_color v2 ; color \n"\ + "dcl_texcoord0 v3 ; texture coord \n"\ + "dcl_texcoord1 v4 ; tangent \n"\ + "dcl_texcoord2 v5 ; binormal \n"\ + "\n"\ + "def c95, 0.5, 0.5, 0.5, 0.5 ; used for moving light vector to ps \n"\ + "def c96, -1, 1, 1, 1 ; somewhere I've got a bug. flipping the vectors with this fixes it. \n"\ + "\n"\ + "m4x4 oPos, v0, c8 ; transform position to clip space with worldViewProj matrix\n"\ + "\n"\ + "m3x3 r5, v4, c0 ; transform tangent U\n"\ + "m3x3 r7, v1, c0 ; transform normal W\n"\ + "m3x3 r6, v5, c0 ; transform binormal V\n"\ + "\n"\ + "m4x4 r4, v0, c0 ; vertex into world position\n"\ + "add r2, c12, -r4 ; vtxpos - light1 pos\n"\ + "add r3, c14, -r4 ; vtxpos - light2 pos\n"\ + "add r1, -c4, r4 ; eye - vtxpos \n"\ + "\n"\ + "dp3 r8.x, r5, r2 ; transform the light1 vector with U, V, W\n"\ + "dp3 r8.y, r6, r2 \n"\ + "dp3 r8.z, r7, r2 \n"\ + "dp3 r9.x, r5, r3 ; transform the light2 vector with U, V, W\n"\ + "dp3 r9.y, r6, r3 \n"\ + "dp3 r9.z, r7, r3 \n"\ + "dp3 r10.x, r5, r1 ; transform the eye vector with U, V, W\n"\ + "dp3 r10.y, r6, r1 \n"\ + "dp3 r10.z, r7, r1 \n"\ + "\n"\ + "dp3 r8.w, r8, r8 ; normalize light vector 1 (r8)\n"\ + "rsq r8.w, r8.w \n"\ + "mul r8, r8, r8.w \n"\ + ";mul r8, r8, c96 \n"\ + "dp3 r9.w, r9, r9 ; normalize light vector 2 (r9)\n"\ + "rsq r9.w, r9.w \n"\ + "mul r9, r9, r9.w \n"\ + ";mul r9, r9, c96 \n"\ + "dp3 r10.w, r10, r10 ; normalize eye vector (r10)\n"\ + "rsq r10.w, r10.w \n"\ + "mul r10, r10, r10.w \n"\ + "mul r10, r10, c96 \n"\ + "\n"\ + "\n"\ + "mad oT2.xyz, r8.xyz, c95, c95 ; move light vector 1 from -1..1 into 0..1 \n"\ + "mad oT3.xyz, r9.xyz, c95, c95 ; move light vector 2 from -1..1 into 0..1 \n"\ + "mad oT4.xyz, r10.xyz, c95, c95 ; move eye vector from -1..1 into 0..1 \n"\ + "\n"\ + " ; calculate attenuation of light 1 \n"\ + "dp3 r2.x, r2.xyz, r2.xyz ; r2.x = r2.x + r2.y + r2.z \n"\ + "mul r2.x, r2.x, c13.w ; r2.x * attenutation \n"\ + "rsq r2, r2.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD0, r2, c13 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + " ; calculate attenuation of light 2 \n"\ + "dp3 r3.x, r3.xyz, r3.xyz ; r3.x = r3.x + r3.y + r3.z \n"\ + "mul r3.x, r3.x, c15.w ; r2.x * attenutation \n"\ + "rsq r3, r3.x ; r2.xyzw = 1/sqrt(r2.x * attenutation)\n"\ + "mul oD1, r3, c15 ; resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "mov oT0.xy, v3.xy ; move out texture coordinates 1\n"\ + "mov oT1.xy, v3.xy ; move out texture coordinates 2\n"\ + "mov oD0.a, v2.a ; move out original alpha value \n"\ + "\n"; + + + // Irrlicht Engine D3D9 render path normal map pixel shader version 1.4 + const char D3D9_PARALLAX_MAP_PSH[] = + ";Irrlicht Engine 0.10 D3D9 render path parallax mapping pixel shader \n"\ + ";Input: \n"\ + ";t0: color map texture coord \n"\ + ";t1: normal map texture coords \n"\ + ";t2: light 1 vector in tangent space \n"\ + ";t4: eye vector in tangent space \n"\ + ";v0: light 1 color \n"\ + ";t3: light 2 vector in tangent space \n"\ + ";v1: light 2 color \n"\ + ";v0.a: vertex alpha value \n"\ + " \n"\ + "ps.1.4 \n"\ + " \n"\ + ";def c6, 0.02f, 0.02f, 0.02f, 0.0f ; scale factor, now set in callback \n"\ + "def c5, 0.5f, 0.5f, 0.5f, 0.0f ; for specular division \n"\ + " \n"\ + "texld r1, t1 ; sample (normal.x, normal.y, normal.z, height) \n"\ + "texcrd r4.xyz, t4 ; fetch eye vector \n"\ + "texcrd r0.xyz, t0 ; color map \n"\ + " \n"\ + "; original parallax mapping: \n"\ + ";mul r3, r1_bx2.wwww, c6; ; r3 = (height, height, height) * scale \n"\ + ";mad r2.xyz, r3, r4_bx2, r0 ; newTexCoord = height * eye + oldTexCoord \n"\ + " \n"\ + "; modified parallax mapping to reduce swimming effect: \n"\ + "mul r3, r1_bx2.wwww, r1_bx2.zzzz ; (nh,nh,nh,nh) = (h,h,h,h) * (n.z,n.z,n.z,n.z,) \n"\ + "mul r3, r3, c6; ; r3 = (nh, nh, nh) * scale \n"\ + "mad r2.xyz, r3, r4_bx2, r0 ; newTexCoord = height * eye + oldTexCoord \n"\ + " \n"\ + "phase \n"\ + " \n"\ + "texld r0, r2 ; load diffuse texture with new tex coord \n"\ + "texld r1, r2 ; sample normal map \n"\ + "texcrd r2.xyz, t2 ; fetch light vector 1 \n"\ + "texcrd r3.xyz, t3 ; fetch light vector 2 \n"\ + " \n"\ + "dp3_sat r5, r1_bx2, r2_bx2 ; normal dot light 1 (_bx2 because moved into 0..1) \n"\ + "mul r5, r5, v0 ; luminance1 * light color 1 \n"\ + " \n"\ + "dp3_sat r3, r1_bx2, r3_bx2 ; normal dot light 2 (_bx2 because moved into 0..1) \n"\ + "mad r3, r3, v1, r5 ; (luminance2 * light color 2) + luminance1 \n"\ + " \n"\ + "mul r0.xyz, r0, r3 ; total luminance * base color \n"\ + "+mov r0.a, v0.a ; write original alpha value \n"\ + "\n"; + + // Irrlicht Engine D3D9 render path normal map pixel shader version 2.0 + const char D3D9_PARALLAX_MAP_PSH_20[] = + ";Irrlicht Engine D3D9 render path parallax mapping pixel shader \n"\ + ";Input: \n"\ + " \n"\ + ";t0: color map texture coord \n"\ + ";t1: normal map texture coords \n"\ + ";t2: light 1 vector in tangent space \n"\ + ";t4: eye vector in tangent space \n"\ + ";v0: light 1 color \n"\ + ";t3: light 2 vector in tangent space \n"\ + ";v1: light 2 color \n"\ + ";v0.a: vertex alpha value \n"\ + " \n"\ + "ps.2.0 \n"\ + " \n"\ + "dcl_2d s0 ; Declare the s0 register to be the sampler for stage 0 \n"\ + "dcl t0.xy ; Declare t0 to have 2D texture coordinates from stage 0 \n"\ + "dcl t1.xy ; Declare t0 to have 2D texture coordinates from stage 0 \n"\ + "dcl_2d s1 ; Declare the s1 register to be the sampler for stage 1 \n"\ + " \n"\ + "dcl t2.xyz ; \n"\ + "dcl t3.xyz ; \n"\ + "dcl t4.xyz ; \n"\ + "dcl v0.xyzw; \n"\ + "dcl v1.xyzw; \n"\ + " \n"\ + "def c0, -1.0f, -1.0f, -1.0f, -1.0f ; for _bx2 emulation \n"\ + "def c1, 2.0f, 2.0f, 2.0f, 2.0f ; for _bx2 emulation \n"\ + "mov r11, c1; \n"\ + " \n"\ + "texld r1, t1, s1 ; sample (normal.x, normal.y, normal.z, height) \n"\ + "mov r4.xyz, t4 ; fetch eye vector \n"\ + "mov r0.xy, t0 ; color map \n"\ + " \n"\ + "; original parallax mapping: \n"\ + "; emulate ps1x _bx2, so substract 0.5f and multiply by 2 \n"\ + "mad r1.xyz, r1, r11, c0; \n"\ + " \n"\ + "mul r3, r1.wwww, c6; ; r3 = (height, height, height) * scale \n"\ + " \n"\ + "; emulate ps1x _bx2, so substract 0.5f and multiply by 2 \n"\ + "mad r4.xyz, r4, r11, c0; \n"\ + " \n"\ + "mad r2.xy, r3, r4, r0 ; newTexCoord = height * eye + oldTexCoord \n"\ + " \n"\ + "; modified parallax mapping to avoid swimming: \n"\ + ";mul r3, r1_bx2.wwww, r1_bx2.zzzz ; r3 = (h,h,h,h) * (n.z, n.z, n.z, n.z,) \n"\ + ";mul r3, r3, c6; ; r3 = (nh, nh, nh) * scale \n"\ + ";mad r2.xyz, r3, r4_bx2, r0 ; newTexCoord = height * eye + oldTexCoord \n"\ + " \n"\ + "texld r0, r2, s0 ; load diffuse texture with new tex coord \n"\ + "texld r1, r2, s1 ; sample normal map \n"\ + "mov r2.xyz, t2 ; fetch light vector 1 \n"\ + "mov r3.xyz, t3 ; fetch light vector 2 \n"\ + " \n"\ + "; emulate ps1x _bx2, so substract 0.5f and multiply by 2 \n"\ + "mad r1.xyz, r1, r11, c0; \n"\ + "mad r2.xyz, r2, r11, c0; \n"\ + "mad r3.xyz, r3, r11, c0; \n"\ + " \n"\ + "dp3_sat r2, r1, r2 ; normal dot light 1 (_bx2 because moved into 0..1) \n"\ + "mul r2, r2, v0 ; luminance1 * light color 1 \n"\ + " \n"\ + "dp3_sat r3, r1, r3 ; normal dot light 2 (_bx2 because moved into 0..1) \n"\ + "mad r3, r3, v1, r2 ; (luminance2 * light color 2) + luminance1 \n"\ + " \n"\ + "mul r0.xyz, r0, r3 ; total luminance * base color \n"\ + "mov r0.a, v0.a ; write original alpha value \n"\ + "mov oC0, r0; \n"\ + "\n"; + + CD3D9ParallaxMapRenderer::CD3D9ParallaxMapRenderer( + IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial) + : CD3D9ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial), + CurrentScale(0.0f) + { + + #ifdef _DEBUG + setDebugName("CD3D9ParallaxMapRenderer"); + #endif + + // set this as callback. We could have done this in + // the initialization list, but some compilers don't like it. + + CallBack = this; + + // basicly, this thing simply compiles these hardcoded shaders if the + // hardware is able to do them, otherwise it maps to the base material + + if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_4) || + !driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + { + // this hardware is not able to do shaders. Fall back to + // base material. + outMaterialTypeNr = driver->addMaterialRenderer(this); + return; + } + + // check if already compiled parallax map shaders are there. + + video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_PARALLAX_MAP_SOLID); + if (renderer) + { + // use the already compiled shaders + video::CD3D9ParallaxMapRenderer* nmr = (video::CD3D9ParallaxMapRenderer*)renderer; + VertexShader = nmr->VertexShader; + if (VertexShader) + VertexShader->AddRef(); + + PixelShader = nmr->PixelShader; + if (PixelShader) + PixelShader->AddRef(); + + outMaterialTypeNr = driver->addMaterialRenderer(this); + } + else + { + #ifdef SHADER_EXTERNAL_DEBUG + + // quickly load shader from external file + io::CReadFile* file = new io::CReadFile("parallax.psh"); + s32 sz = file->getSize(); + char* s = new char[sz+1]; + file->read(s, sz); + s[sz] = 0; + + init(outMaterialTypeNr, D3D9_PARALLAX_MAP_VSH, s); + + delete [] s; + file->drop(); + + #else + + // compile shaders on our own + init(outMaterialTypeNr, D3D9_PARALLAX_MAP_VSH, D3D9_PARALLAX_MAP_PSH); + + #endif // SHADER_EXTERNAL_DEBUG + } + // something failed, use base material + if (-1==outMaterialTypeNr) + driver->addMaterialRenderer(this); + } + + + CD3D9ParallaxMapRenderer::~CD3D9ParallaxMapRenderer() + { + if (CallBack == this) + CallBack = 0; + } + + bool CD3D9ParallaxMapRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) + { + if (vtxtype != video::EVT_TANGENTS) + { + os::Printer::log("Error: Parallax map renderer only supports vertices of type EVT_TANGENTS", ELL_ERROR); + return false; + } + + return CD3D9ShaderMaterialRenderer::OnRender(service, vtxtype); + } + + + void CD3D9ParallaxMapRenderer::OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services) + { + CD3D9ShaderMaterialRenderer::OnSetMaterial(material, lastMaterial, + resetAllRenderstates, services); + + CurrentScale = material.MaterialTypeParam; + } + + + //! Returns the render capability of the material. + s32 CD3D9ParallaxMapRenderer::getRenderCapability() const + { + if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_4) && + Driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1)) + return 0; + + return 1; + } + + + //! Called by the engine when the vertex and/or pixel shader constants + //! for an material renderer should be set. + void CD3D9ParallaxMapRenderer::OnSetConstants(IMaterialRendererServices* services, s32 userData) + { + video::IVideoDriver* driver = services->getVideoDriver(); + + // set transposed world matrix + services->setVertexShaderConstant(driver->getTransform(video::ETS_WORLD).getTransposed().pointer(), 0, 4); + + // set eye position + + // The viewpoint is at (0., 0., 0.) in eye space. + // Turning this into a vector [0 0 0 1] and multiply it by + // the inverse of the view matrix, the resulting vector is the + // object space location of the camera. + + f32 floats[4] = {0,0,0,1}; + core::matrix4 minv = driver->getTransform(video::ETS_VIEW); + minv.makeInverse(); + minv.multiplyWith1x4Matrix(floats); + services->setVertexShaderConstant(floats, 4, 1); + + // set transposed worldViewProj matrix + core::matrix4 worldViewProj; + worldViewProj = driver->getTransform(video::ETS_PROJECTION); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + services->setVertexShaderConstant(worldViewProj.getTransposed().pointer(), 8, 4); + + // here we've got to fetch the fixed function lights from the + // driver and set them as constants + + const u32 cnt = driver->getDynamicLightCount(); + + for (u32 i=0; i<2; ++i) + { + SLight light; + + if (i<cnt) + light = driver->getDynamicLight(i); + else + { + light.DiffuseColor.set(0,0,0); // make light dark + light.Radius = 1.0f; + } + + light.DiffuseColor.a = 1.0f/(light.Radius*light.Radius); // set attenuation + + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.Position), 12+(i*2), 1); + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&light.DiffuseColor), 13+(i*2), 1); + } + + // this is not really necessary in d3d9 (used a def instruction), but to be sure: + f32 c95[] = {0.5f, 0.5f, 0.5f, 0.5f}; + services->setVertexShaderConstant(c95, 95, 1); + f32 c96[] = {-1, 1, 1, 1}; + services->setVertexShaderConstant(c96, 96, 1); + + // set scale factor + f32 factor = 0.02f; // default value + if (CurrentScale != 0) + factor = CurrentScale; + + f32 c6[] = {factor, factor, factor, 0}; + services->setPixelShaderConstant(c6, 6, 1); + } + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.h new file mode 100644 index 0000000..94010cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ParallaxMapRenderer.h @@ -0,0 +1,63 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D9_PARALLAX_MAPMATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D9_PARALLAX_MAPMATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#include "irrMath.h" // needed by borland for sqrtf define +#endif +#include <d3d9.h> + +#include "CD3D9ShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" + +namespace irr +{ +namespace video +{ + +//! Renderer for normal maps using parallax mapping +class CD3D9ParallaxMapRenderer : + public CD3D9ShaderMaterialRenderer, IShaderConstantSetCallBack +{ +public: + + CD3D9ParallaxMapRenderer( + IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial); + + ~CD3D9ParallaxMapRenderer(); + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + //! Returns the render capability of the material. + virtual s32 getRenderCapability() const; + + virtual void OnSetMaterial(const SMaterial& material) { } + virtual void OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services); + +private: + + f32 CurrentScale; + +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp new file mode 100644 index 0000000..7d2f76e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp @@ -0,0 +1,540 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "CD3D9ShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" +#include "IMaterialRendererServices.h" +#include "IVideoDriver.h" +#include "os.h" +#include "irrString.h" + +#ifndef _IRR_D3D_NO_SHADER_DEBUGGING +#include <stdio.h> +#endif + + +namespace irr +{ +namespace video +{ + +//! Public constructor +CD3D9ShaderMaterialRenderer::CD3D9ShaderMaterialRenderer(IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData) +: pID3DDevice(d3ddev), Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + VertexShader(0), OldVertexShader(0), PixelShader(0), UserData(userData) +{ + #ifdef _DEBUG + setDebugName("CD3D9ShaderMaterialRenderer"); + #endif + + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); + + init(outMaterialTypeNr, vertexShaderProgram, pixelShaderProgram); +} + + +//! constructor only for use by derived classes who want to +//! create a fall back material for example. +CD3D9ShaderMaterialRenderer::CD3D9ShaderMaterialRenderer(IDirect3DDevice9* d3ddev, + video::IVideoDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, s32 userData) +: pID3DDevice(d3ddev), Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + VertexShader(0), OldVertexShader(0), PixelShader(0), UserData(userData) +{ + #ifdef _DEBUG + setDebugName("CD3D9ShaderMaterialRenderer"); + #endif + + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); +} + + +void CD3D9ShaderMaterialRenderer::init(s32& outMaterialTypeNr, + const c8* vertexShaderProgram, const c8* pixelShaderProgram) +{ + outMaterialTypeNr = -1; + + // create vertex shader + if (!createVertexShader(vertexShaderProgram)) + return; + + // create pixel shader + if (!createPixelShader(pixelShaderProgram)) + return; + + // register myself as new material + outMaterialTypeNr = Driver->addMaterialRenderer(this); +} + + +//! Destructor +CD3D9ShaderMaterialRenderer::~CD3D9ShaderMaterialRenderer() +{ + if (CallBack) + CallBack->drop(); + + if (VertexShader) + VertexShader->Release(); + + if (PixelShader) + PixelShader->Release(); + + if (BaseMaterial) + BaseMaterial->drop(); +} + + +bool CD3D9ShaderMaterialRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) +{ + // call callback to set shader constants + if (CallBack && (VertexShader || PixelShader)) + CallBack->OnSetConstants(service, UserData); + + return true; +} + + +void CD3D9ShaderMaterialRenderer::OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services) +{ + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (VertexShader) + { + // save old vertex shader + pID3DDevice->GetVertexShader(&OldVertexShader); + + // set new vertex shader + if (FAILED(pID3DDevice->SetVertexShader(VertexShader))) + os::Printer::log("Could not set vertex shader.", ELL_WARNING); + } + + // set new pixel shader + if (PixelShader) + { + if (FAILED(pID3DDevice->SetPixelShader(PixelShader))) + os::Printer::log("Could not set pixel shader.", ELL_WARNING); + } + + if (BaseMaterial) + BaseMaterial->OnSetMaterial(material, material, true, services); + } + + //let callback know used material + if (CallBack) + CallBack->OnSetMaterial(material); + + services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + + +void CD3D9ShaderMaterialRenderer::OnUnsetMaterial() +{ + if (VertexShader) + pID3DDevice->SetVertexShader(OldVertexShader); + + if (PixelShader) + pID3DDevice->SetPixelShader(0); + + if (BaseMaterial) + BaseMaterial->OnUnsetMaterial(); +} + + +//! Returns if the material is transparent. The scene managment needs to know this +//! for being able to sort the materials by opaque and transparent. +bool CD3D9ShaderMaterialRenderer::isTransparent() const +{ + return BaseMaterial ? BaseMaterial->isTransparent() : false; +} + + +bool CD3D9ShaderMaterialRenderer::createPixelShader(const c8* pxsh) +{ + if (!pxsh) + return true; + + // compile shader + + LPD3DXBUFFER code = 0; + LPD3DXBUFFER errors = 0; + + #ifdef _IRR_D3D_NO_SHADER_DEBUGGING + + // compile shader without debug info + stubD3DXAssembleShader(pxsh, (UINT)strlen(pxsh), 0, 0, 0, &code, &errors); + #else + + // compile shader and emitt some debug informations to + // make it possible to debug the shader in visual studio + + static int irr_dbg_file_nr = 0; + ++irr_dbg_file_nr; + char tmp[32]; + sprintf(tmp, "irr_d3d9_dbg_shader_%d.psh", irr_dbg_file_nr); + + FILE* f = fopen(tmp, "wb"); + fwrite(pxsh, strlen(pxsh), 1, f); + fflush(f); + fclose(f); + + stubD3DXAssembleShaderFromFile(tmp, 0, 0, D3DXSHADER_DEBUG, &code, &errors); + + #endif + + + if (errors) + { + // print out compilation errors. + os::Printer::log("Pixel shader compilation failed:", ELL_ERROR); + os::Printer::log((c8*)errors->GetBufferPointer(), ELL_ERROR); + + if (code) + code->Release(); + + errors->Release(); + return false; + } + + if (FAILED(pID3DDevice->CreatePixelShader((DWORD*)code->GetBufferPointer(), &PixelShader))) + { + os::Printer::log("Could not create pixel shader.", ELL_ERROR); + code->Release(); + return false; + } + + code->Release(); + return true; +} + + +bool CD3D9ShaderMaterialRenderer::createVertexShader(const char* vtxsh) +{ + if (!vtxsh) + return true; + + // compile shader + + LPD3DXBUFFER code = 0; + LPD3DXBUFFER errors = 0; + + #ifdef _IRR_D3D_NO_SHADER_DEBUGGING + + // compile shader without debug info + stubD3DXAssembleShader(vtxsh, (UINT)strlen(vtxsh), 0, 0, 0, &code, &errors); + + #else + + // compile shader and emitt some debug informations to + // make it possible to debug the shader in visual studio + + static int irr_dbg_file_nr = 0; + ++irr_dbg_file_nr; + char tmp[32]; + sprintf(tmp, "irr_d3d9_dbg_shader_%d.vsh", irr_dbg_file_nr); + + FILE* f = fopen(tmp, "wb"); + fwrite(vtxsh, strlen(vtxsh), 1, f); + fflush(f); + fclose(f); + + stubD3DXAssembleShaderFromFile(tmp, 0, 0, D3DXSHADER_DEBUG, &code, &errors); + + #endif + + if (errors) + { + // print out compilation errors. + os::Printer::log("Vertex shader compilation failed:", ELL_ERROR); + os::Printer::log((c8*)errors->GetBufferPointer(), ELL_ERROR); + + if (code) + code->Release(); + + errors->Release(); + return false; + } + + if (!code || FAILED(pID3DDevice->CreateVertexShader((DWORD*)code->GetBufferPointer(), &VertexShader))) + { + os::Printer::log("Could not create vertex shader.", ELL_ERROR); + if (code) + code->Release(); + return false; + } + + code->Release(); + return true; +} + + +HRESULT CD3D9ShaderMaterialRenderer::stubD3DXAssembleShader(LPCSTR pSrcData, + UINT SrcDataLen, CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, DWORD Flags, LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs) +{ + // Because Irrlicht needs to be able to start up even without installed d3d dlls, it + // needs to load external d3d dlls manually. examples for the dlls are: + // SDK dll name D3DX_SDK_VERSION + // Summer 2004: no dll 22 + // February 2005: d3dx9_24.dll 24 + // April 2005: d3dx9_25.dll 25 + // June 2005: d3dx9_26.dll 26 + // August 2005: d3dx9_27.dll 27 + // October 2005, + // December 2005: d3dx9_28.dll 28 + + #if ( D3DX_SDK_VERSION < 24 ) + // directly link functions, old d3d sdks didn't try to load external dlls + // when linking to the d3dx9.lib + #ifdef _MSC_VER + #pragma comment (lib, "d3dx9.lib") + #endif + + // invoke static linked function + return D3DXAssembleShader(pSrcData, SrcDataLen, pDefines, pInclude, + Flags, ppShader, ppErrorMsgs); + #else + { + // try to load shader functions from the dll and print error if failed. + + // D3DXAssembleShader signature + typedef HRESULT (WINAPI *AssembleShaderFunction)(LPCSTR pSrcData, UINT SrcDataLen, + CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, + DWORD Flags, LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs); + + static bool LoadFailed = false; + static AssembleShaderFunction pFn = 0; + + if (!pFn && !LoadFailed) + { + // try to load dll + io::path strDllName = "d3dx9_"; + strDllName += (int)D3DX_SDK_VERSION; + strDllName += ".dll"; + + HMODULE hMod = LoadLibrary(strDllName.c_str()); + if (hMod) + pFn = (AssembleShaderFunction)GetProcAddress(hMod, "D3DXAssembleShader"); + + if (!pFn) + { + LoadFailed = true; + os::Printer::log("Could not load shader function D3DXAssembleShader from dll, shaders disabled", + strDllName.c_str(), ELL_ERROR); + } + } + + if (pFn) + { + // call already loaded function + return (*pFn)(pSrcData, SrcDataLen, pDefines, pInclude, Flags, ppShader, ppErrorMsgs); + } + } + #endif // D3DX_SDK_VERSION < 24 + + return 0; +} + + +HRESULT CD3D9ShaderMaterialRenderer::stubD3DXAssembleShaderFromFile(LPCSTR pSrcFile, + CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags, + LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs) +{ + // wondering what I'm doing here? + // see comment in CD3D9ShaderMaterialRenderer::stubD3DXAssembleShader() + + #if ( D3DX_SDK_VERSION < 24 ) + // directly link functions, old d3d sdks didn't try to load external dlls + // when linking to the d3dx9.lib + #ifdef _MSC_VER + #pragma comment (lib, "d3dx9.lib") + #endif + + // invoke static linked function + return D3DXAssembleShaderFromFileA(pSrcFile, pDefines, pInclude, Flags, + ppShader, ppErrorMsgs); + #else + { + // try to load shader functions from the dll and print error if failed. + + // D3DXAssembleShaderFromFileA signature + typedef HRESULT (WINAPI *AssembleShaderFromFileFunction)(LPCSTR pSrcFile, + CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags, + LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs); + + static bool LoadFailed = false; + static AssembleShaderFromFileFunction pFn = 0; + + if (!pFn && !LoadFailed) + { + // try to load dll + io::path strDllName = "d3dx9_"; + strDllName += (int)D3DX_SDK_VERSION; + strDllName += ".dll"; + + HMODULE hMod = LoadLibrary(strDllName.c_str()); + if (hMod) + pFn = (AssembleShaderFromFileFunction)GetProcAddress(hMod, "D3DXAssembleShaderFromFileA"); + + if (!pFn) + { + LoadFailed = true; + os::Printer::log("Could not load shader function D3DXAssembleShaderFromFileA from dll, shaders disabled", + strDllName.c_str(), ELL_ERROR); + } + } + + if (pFn) + { + // call already loaded function + return (*pFn)(pSrcFile, pDefines, pInclude, Flags, ppShader, ppErrorMsgs); + } + } + #endif // D3DX_SDK_VERSION < 24 + + return 0; +} + + +HRESULT CD3D9ShaderMaterialRenderer::stubD3DXCompileShader(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, + LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) +{ + // wondering what I'm doing here? + // see comment in CD3D9ShaderMaterialRenderer::stubD3DXAssembleShader() + + #if ( D3DX_SDK_VERSION < 24 ) + // directly link functions, old d3d sdks didn't try to load external dlls + // when linking to the d3dx9.lib + #ifdef _MSC_VER + #pragma comment (lib, "d3dx9.lib") + #endif + + // invoke static linked function + return D3DXCompileShader(pSrcData, SrcDataLen, pDefines, pInclude, pFunctionName, pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); + #else + { + // try to load shader functions from the dll and print error if failed. + + // D3DXCompileShader + typedef HRESULT (WINAPI *D3DXCompileShaderFunction)(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, + LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable); + + static bool LoadFailed = false; + static D3DXCompileShaderFunction pFn = 0; + + if (!pFn && !LoadFailed) + { + // try to load dll + io::path strDllName = "d3dx9_"; + strDllName += (int)D3DX_SDK_VERSION; + strDllName += ".dll"; + + HMODULE hMod = LoadLibrary(strDllName.c_str()); + if (hMod) + pFn = (D3DXCompileShaderFunction)GetProcAddress(hMod, "D3DXCompileShader"); + + if (!pFn) + { + LoadFailed = true; + os::Printer::log("Could not load shader function D3DXCompileShader from dll, shaders disabled", + strDllName.c_str(), ELL_ERROR); + } + } + + if (pFn) + { + // call already loaded function + return (*pFn)(pSrcData, SrcDataLen, pDefines, pInclude, pFunctionName, pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); + } + } + #endif // D3DX_SDK_VERSION < 24 + + return 0; +} + +HRESULT CD3D9ShaderMaterialRenderer::stubD3DXCompileShaderFromFile(LPCSTR pSrcFile, CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, + LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, + LPD3DXCONSTANTTABLE* ppConstantTable) +{ + // wondering what I'm doing here? + // see comment in CD3D9ShaderMaterialRenderer::stubD3DXAssembleShader() + + #if ( D3DX_SDK_VERSION < 24 ) + // directly link functions, old d3d sdks didn't try to load external dlls + // when linking to the d3dx9.lib + #ifdef _MSC_VER + #pragma comment (lib, "d3dx9.lib") + #endif + + // invoke static linked function + return D3DXCompileShaderFromFileA(pSrcFile, pDefines, pInclude, pFunctionName, pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); + #else + { + // try to load shader functions from the dll and print error if failed. + + // D3DXCompileShaderFromFileA + typedef HRESULT (WINAPI *D3DXCompileShaderFromFileFunction)(LPCSTR pSrcFile, + CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, + LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, + LPD3DXCONSTANTTABLE* ppConstantTable); + + static bool LoadFailed = false; + static D3DXCompileShaderFromFileFunction pFn = 0; + + if (!pFn && !LoadFailed) + { + // try to load dll + io::path strDllName = "d3dx9_"; + strDllName += (int)D3DX_SDK_VERSION; + strDllName += ".dll"; + + HMODULE hMod = LoadLibrary(strDllName.c_str()); + if (hMod) + pFn = (D3DXCompileShaderFromFileFunction)GetProcAddress(hMod, "D3DXCompileShaderFromFileA"); + + if (!pFn) + { + LoadFailed = true; + os::Printer::log("Could not load shader function D3DXCompileShaderFromFileA from dll, shaders disabled", + strDllName.c_str(), ELL_ERROR); + } + } + + if (pFn) + { + // call already loaded function + return (*pFn)(pSrcFile, pDefines, pInclude, pFunctionName, pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); + } + } + #endif // D3DX_SDK_VERSION < 24 + + return 0; +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.h new file mode 100644 index 0000000..2c2bb19 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9ShaderMaterialRenderer.h @@ -0,0 +1,102 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_D3D9_SHADER_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_D3D9_SHADER_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_WINDOWS_ + +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#include "irrMath.h" // needed by borland for sqrtf define +#endif +#include <d3dx9shader.h> + +#include "IMaterialRenderer.h" + +namespace irr +{ +namespace video +{ + +class IVideoDriver; +class IShaderConstantSetCallBack; +class IMaterialRenderer; + +//! Class for using vertex and pixel shaders with D3D9 +class CD3D9ShaderMaterialRenderer : public IMaterialRenderer +{ +public: + + //! Public constructor + CD3D9ShaderMaterialRenderer(IDirect3DDevice9* d3ddev, video::IVideoDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData); + + //! Destructor + ~CD3D9ShaderMaterialRenderer(); + + virtual void OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services); + + virtual void OnUnsetMaterial(); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + //! Returns if the material is transparent. + virtual bool isTransparent() const; + +protected: + + //! constructor only for use by derived classes who want to + //! create a fall back material for example. + CD3D9ShaderMaterialRenderer(IDirect3DDevice9* d3ddev, + video::IVideoDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, + s32 userData=0); + + void init(s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram); + bool createPixelShader(const c8* pxsh); + bool createVertexShader(const char* vtxsh); + + HRESULT stubD3DXAssembleShader(LPCSTR pSrcData, UINT SrcDataLen, + CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, + DWORD Flags, LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs); + + HRESULT stubD3DXAssembleShaderFromFile(LPCSTR pSrcFile, + CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags, + LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs); + + HRESULT stubD3DXCompileShader(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, + LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable); + + HRESULT stubD3DXCompileShaderFromFile(LPCSTR pSrcFile, CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, + LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, + LPD3DXCONSTANTTABLE* ppConstantTable); + + IDirect3DDevice9* pID3DDevice; + video::IVideoDriver* Driver; + IShaderConstantSetCallBack* CallBack; + IMaterialRenderer* BaseMaterial; + + IDirect3DVertexShader9* VertexShader; + IDirect3DVertexShader9* OldVertexShader; + IDirect3DPixelShader9* PixelShader; + s32 UserData; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.cpp new file mode 100644 index 0000000..122ee2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.cpp @@ -0,0 +1,699 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#define _IRR_DONT_DO_MEMORY_DEBUGGING_HERE +#include "CD3D9Texture.h" +#include "CD3D9Driver.h" +#include "os.h" + +#include <d3dx9tex.h> + +#ifndef _IRR_COMPILE_WITH_DIRECT3D_8_ +// The D3DXFilterTexture function seems to get linked wrong when +// compiling with both D3D8 and 9, causing it not to work in the D3D9 device. +// So mipmapgeneration is replaced with my own bad generation in d3d 8 when +// compiling with both D3D 8 and 9. +// #define _IRR_USE_D3DXFilterTexture_ +#endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + +#ifdef _IRR_USE_D3DXFilterTexture_ +#pragma comment(lib, "d3dx9.lib") +#endif + +namespace irr +{ +namespace video +{ + +//! rendertarget constructor +CD3D9Texture::CD3D9Texture(CD3D9Driver* driver, const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format) +: ITexture(name), Texture(0), RTTSurface(0), Driver(driver), DepthSurface(0), + TextureSize(size), ImageSize(size), Pitch(0), ColorFormat(ECF_UNKNOWN), + HasMipMaps(false), HardwareMipMaps(false), IsRenderTarget(true) +{ + #ifdef _DEBUG + setDebugName("CD3D9Texture"); + #endif + + Device=driver->getExposedVideoData().D3D9.D3DDev9; + if (Device) + Device->AddRef(); + + createRenderTarget(format); +} + + +//! constructor +CD3D9Texture::CD3D9Texture(IImage* image, CD3D9Driver* driver, + u32 flags, const io::path& name, void* mipmapData) +: ITexture(name), Texture(0), RTTSurface(0), Driver(driver), DepthSurface(0), + TextureSize(0,0), ImageSize(0,0), Pitch(0), ColorFormat(ECF_UNKNOWN), + HasMipMaps(false), HardwareMipMaps(false), IsRenderTarget(false) +{ + #ifdef _DEBUG + setDebugName("CD3D9Texture"); + #endif + + HasMipMaps = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + + Device=driver->getExposedVideoData().D3D9.D3DDev9; + if (Device) + Device->AddRef(); + + if (image) + { + if (createTexture(flags, image)) + { + if (copyTexture(image)) + { + regenerateMipMapLevels(mipmapData); + } + } + else + os::Printer::log("Could not create DIRECT3D9 Texture.", ELL_WARNING); + } +} + + +//! destructor +CD3D9Texture::~CD3D9Texture() +{ + if (Texture) + Texture->Release(); + + if (RTTSurface) + RTTSurface->Release(); + + // if this texture was the last one using the depth buffer + // we can release the surface. We only use the value of the pointer + // hence it is safe to use the dropped pointer... + if (DepthSurface) + { + if (DepthSurface->drop()) + Driver->removeDepthSurface(DepthSurface); + } + + if (Device) + Device->Release(); +} + + +void CD3D9Texture::createRenderTarget(const ECOLOR_FORMAT format) +{ + // are texture size restrictions there ? + if(!Driver->queryFeature(EVDF_TEXTURE_NPOT)) + { + if (TextureSize != ImageSize) + os::Printer::log("RenderTarget size has to be a power of two", ELL_INFORMATION); + } + TextureSize = TextureSize.getOptimalSize(!Driver->queryFeature(EVDF_TEXTURE_NPOT), !Driver->queryFeature(EVDF_TEXTURE_NSQUARE), true, Driver->Caps.MaxTextureWidth); + + D3DFORMAT d3dformat = Driver->getD3DColorFormat(); + + if(ColorFormat == ECF_UNKNOWN) + { + // get irrlicht format from backbuffer + // (This will get overwritten by the custom format if it is provided, else kept.) + ColorFormat = Driver->getColorFormat(); + setPitch(d3dformat); + + // Use color format if provided. + if(format != ECF_UNKNOWN) + { + ColorFormat = format; + d3dformat = Driver->getD3DFormatFromColorFormat(format); + setPitch(d3dformat); // This will likely set pitch to 0 for now. + } + } + else + { + d3dformat = Driver->getD3DFormatFromColorFormat(ColorFormat); + } + + // create texture + HRESULT hr; + + hr = Device->CreateTexture( + TextureSize.Width, + TextureSize.Height, + 1, // mip map level count, we don't want mipmaps here + D3DUSAGE_RENDERTARGET, + d3dformat, + D3DPOOL_DEFAULT, + &Texture, + NULL); + + if (FAILED(hr)) + { + if (D3DERR_INVALIDCALL == hr) + os::Printer::log("Could not create render target texture", "Invalid Call"); + else + if (D3DERR_OUTOFVIDEOMEMORY == hr) + os::Printer::log("Could not create render target texture", "Out of Video Memory"); + else + if (E_OUTOFMEMORY == hr) + os::Printer::log("Could not create render target texture", "Out of Memory"); + else + os::Printer::log("Could not create render target texture"); + } +} + + +bool CD3D9Texture::createMipMaps(u32 level) +{ + if (level==0) + return true; + + if (HardwareMipMaps && Texture) + { + // generate mipmaps in hardware + Texture->GenerateMipSubLevels(); + return true; + } + + // manual mipmap generation + IDirect3DSurface9* upperSurface = 0; + IDirect3DSurface9* lowerSurface = 0; + + // get upper level + HRESULT hr = Texture->GetSurfaceLevel(level-1, &upperSurface); + if (FAILED(hr) || !upperSurface) + { + os::Printer::log("Could not get upper surface level for mip map generation", ELL_WARNING); + return false; + } + + // get lower level + hr = Texture->GetSurfaceLevel(level, &lowerSurface); + if (FAILED(hr) || !lowerSurface) + { + os::Printer::log("Could not get lower surface level for mip map generation", ELL_WARNING); + upperSurface->Release(); + return false; + } + + D3DSURFACE_DESC upperDesc, lowerDesc; + upperSurface->GetDesc(&upperDesc); + lowerSurface->GetDesc(&lowerDesc); + + D3DLOCKED_RECT upperlr; + D3DLOCKED_RECT lowerlr; + + // lock upper surface + if (FAILED(upperSurface->LockRect(&upperlr, NULL, 0))) + { + upperSurface->Release(); + lowerSurface->Release(); + os::Printer::log("Could not lock upper texture for mip map generation", ELL_WARNING); + return false; + } + + // lock lower surface + if (FAILED(lowerSurface->LockRect(&lowerlr, NULL, 0))) + { + upperSurface->UnlockRect(); + upperSurface->Release(); + lowerSurface->Release(); + os::Printer::log("Could not lock lower texture for mip map generation", ELL_WARNING); + return false; + } + + if (upperDesc.Format != lowerDesc.Format) + { + os::Printer::log("Cannot copy mip maps with different formats.", ELL_WARNING); + } + else + { + if ((upperDesc.Format == D3DFMT_A1R5G5B5) || (upperDesc.Format == D3DFMT_R5G6B5)) + copy16BitMipMap((char*)upperlr.pBits, (char*)lowerlr.pBits, + lowerDesc.Width, lowerDesc.Height, + upperlr.Pitch, lowerlr.Pitch); + else + if (upperDesc.Format == D3DFMT_A8R8G8B8) + copy32BitMipMap((char*)upperlr.pBits, (char*)lowerlr.pBits, + lowerDesc.Width, lowerDesc.Height, + upperlr.Pitch, lowerlr.Pitch); + else + os::Printer::log("Unsupported mipmap format, cannot copy.", ELL_WARNING); + } + + bool result=true; + // unlock + if (FAILED(upperSurface->UnlockRect())) + result=false; + if (FAILED(lowerSurface->UnlockRect())) + result=false; + + // release + upperSurface->Release(); + lowerSurface->Release(); + + if (!result || (upperDesc.Width <= 3 && upperDesc.Height <= 3)) + return result; // stop generating levels + + // generate next level + return createMipMaps(level+1); +} + + +//! creates the hardware texture +bool CD3D9Texture::createTexture(u32 flags, IImage * image) +{ + ImageSize = image->getDimension(); + + core::dimension2d<u32> optSize = ImageSize.getOptimalSize(!Driver->queryFeature(EVDF_TEXTURE_NPOT), !Driver->queryFeature(EVDF_TEXTURE_NSQUARE), true, Driver->Caps.MaxTextureWidth); + + D3DFORMAT format = D3DFMT_A1R5G5B5; + + switch(getTextureFormatFromFlags(flags)) + { + case ETCF_ALWAYS_16_BIT: + format = D3DFMT_A1R5G5B5; break; + case ETCF_ALWAYS_32_BIT: + format = D3DFMT_A8R8G8B8; break; + case ETCF_OPTIMIZED_FOR_QUALITY: + { + switch(image->getColorFormat()) + { + case ECF_R8G8B8: + case ECF_A8R8G8B8: + format = D3DFMT_A8R8G8B8; break; + case ECF_A1R5G5B5: + case ECF_R5G6B5: + format = D3DFMT_A1R5G5B5; break; + } + } + break; + case ETCF_OPTIMIZED_FOR_SPEED: + format = D3DFMT_A1R5G5B5; + break; + default: + break; + } + if (Driver->getTextureCreationFlag(video::ETCF_NO_ALPHA_CHANNEL)) + { + if (format == D3DFMT_A8R8G8B8) + format = D3DFMT_R8G8B8; + else if (format == D3DFMT_A1R5G5B5) + format = D3DFMT_R5G6B5; + } + + const bool mipmaps = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + + DWORD usage = 0; + + // This enables hardware mip map generation. + if (mipmaps && Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE)) + { + LPDIRECT3D9 intf = Driver->getExposedVideoData().D3D9.D3D9; + D3DDISPLAYMODE d3ddm; + intf->GetAdapterDisplayMode(Driver->Params.DisplayAdapter, &d3ddm); + + if (D3D_OK==intf->CheckDeviceFormat(Driver->Params.DisplayAdapter,D3DDEVTYPE_HAL,d3ddm.Format,D3DUSAGE_AUTOGENMIPMAP,D3DRTYPE_TEXTURE,format)) + { + usage = D3DUSAGE_AUTOGENMIPMAP; + HardwareMipMaps = true; + } + } + + HRESULT hr = Device->CreateTexture(optSize.Width, optSize.Height, + mipmaps ? 0 : 1, // number of mipmaplevels (0 = automatic all) + usage, // usage + format, D3DPOOL_MANAGED , &Texture, NULL); + + if (FAILED(hr)) + { + // try brute force 16 bit + HardwareMipMaps = false; + if (format == D3DFMT_A8R8G8B8) + format = D3DFMT_A1R5G5B5; + else if (format == D3DFMT_R8G8B8) + format = D3DFMT_R5G6B5; + else + return false; + + hr = Device->CreateTexture(optSize.Width, optSize.Height, + mipmaps ? 0 : 1, // number of mipmaplevels (0 = automatic all) + 0, format, D3DPOOL_MANAGED, &Texture, NULL); + } + + ColorFormat = Driver->getColorFormatFromD3DFormat(format); + setPitch(format); + return (SUCCEEDED(hr)); +} + + +//! copies the image to the texture +bool CD3D9Texture::copyTexture(IImage * image) +{ + if (Texture && image) + { + D3DSURFACE_DESC desc; + Texture->GetLevelDesc(0, &desc); + + TextureSize.Width = desc.Width; + TextureSize.Height = desc.Height; + + D3DLOCKED_RECT rect; + HRESULT hr = Texture->LockRect(0, &rect, 0, 0); + if (FAILED(hr)) + { + os::Printer::log("Texture data not copied", "Could not LockRect D3D9 Texture.", ELL_ERROR); + return false; + } + + Pitch = rect.Pitch; + image->copyToScaling(rect.pBits, TextureSize.Width, TextureSize.Height, ColorFormat, Pitch); + + hr = Texture->UnlockRect(0); + if (FAILED(hr)) + { + os::Printer::log("Texture data not copied", "Could not UnlockRect D3D9 Texture.", ELL_ERROR); + return false; + } + } + + return true; +} + + +//! lock function +void* CD3D9Texture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) +{ + if (!Texture) + return 0; + + MipLevelLocked=mipmapLevel; + HRESULT hr; + D3DLOCKED_RECT rect; + if(!IsRenderTarget) + { + hr = Texture->LockRect(mipmapLevel, &rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); + if (FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D9 Texture.", ELL_ERROR); + return 0; + } + } + else + { + if (!RTTSurface) + { + // Make RTT surface large enough for all miplevels (including 0) + D3DSURFACE_DESC desc; + Texture->GetLevelDesc(0, &desc); + hr = Device->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &RTTSurface, 0); + if (FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D9 Texture", "Offscreen surface creation failed.", ELL_ERROR); + return 0; + } + } + + IDirect3DSurface9 *surface = 0; + hr = Texture->GetSurfaceLevel(mipmapLevel, &surface); + if (FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D9 Texture", "Could not get surface.", ELL_ERROR); + return 0; + } + hr = Device->GetRenderTargetData(surface, RTTSurface); + surface->Release(); + if(FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D9 Texture", "Data copy failed.", ELL_ERROR); + return 0; + } + hr = RTTSurface->LockRect(&rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); + if(FAILED(hr)) + { + os::Printer::log("Could not lock DIRECT3D9 Texture", "LockRect failed.", ELL_ERROR); + return 0; + } + } + return rect.pBits; +} + + +//! unlock function +void CD3D9Texture::unlock() +{ + if (!Texture) + return; + + if (!IsRenderTarget) + Texture->UnlockRect(MipLevelLocked); + else if (RTTSurface) + RTTSurface->UnlockRect(); +} + + +//! Returns original size of the texture. +const core::dimension2d<u32>& CD3D9Texture::getOriginalSize() const +{ + return ImageSize; +} + + +//! Returns (=size) of the texture. +const core::dimension2d<u32>& CD3D9Texture::getSize() const +{ + return TextureSize; +} + + +//! returns driver type of texture (=the driver, who created the texture) +E_DRIVER_TYPE CD3D9Texture::getDriverType() const +{ + return EDT_DIRECT3D9; +} + + +//! returns color format of texture +ECOLOR_FORMAT CD3D9Texture::getColorFormat() const +{ + return ColorFormat; +} + + +//! returns pitch of texture (in bytes) +u32 CD3D9Texture::getPitch() const +{ + return Pitch; +} + + +//! returns the DIRECT3D9 Texture +IDirect3DBaseTexture9* CD3D9Texture::getDX9Texture() const +{ + return Texture; +} + + +//! returns if texture has mipmap levels +bool CD3D9Texture::hasMipMaps() const +{ + return HasMipMaps; +} + + +void CD3D9Texture::copy16BitMipMap(char* src, char* tgt, + s32 width, s32 height, + s32 pitchsrc, s32 pitchtgt) const +{ + for (s32 y=0; y<height; ++y) + { + for (s32 x=0; x<width; ++x) + { + u32 a=0, r=0, g=0, b=0; + + for (s32 dy=0; dy<2; ++dy) + { + const s32 tgy = (y*2)+dy; + for (s32 dx=0; dx<2; ++dx) + { + const s32 tgx = (x*2)+dx; + + SColor c; + if (ColorFormat == ECF_A1R5G5B5) + c = A1R5G5B5toA8R8G8B8(*(u16*)(&src[(tgx*2)+(tgy*pitchsrc)])); + else + c = R5G6B5toA8R8G8B8(*(u16*)(&src[(tgx*2)+(tgy*pitchsrc)])); + + a += c.getAlpha(); + r += c.getRed(); + g += c.getGreen(); + b += c.getBlue(); + } + } + + a /= 4; + r /= 4; + g /= 4; + b /= 4; + + u16 c; + if (ColorFormat == ECF_A1R5G5B5) + c = RGBA16(r,g,b,a); + else + c = A8R8G8B8toR5G6B5(SColor(a,r,g,b).color); + *(u16*)(&tgt[(x*2)+(y*pitchtgt)]) = c; + } + } +} + + +void CD3D9Texture::copy32BitMipMap(char* src, char* tgt, + s32 width, s32 height, + s32 pitchsrc, s32 pitchtgt) const +{ + for (s32 y=0; y<height; ++y) + { + for (s32 x=0; x<width; ++x) + { + u32 a=0, r=0, g=0, b=0; + SColor c; + + for (s32 dy=0; dy<2; ++dy) + { + const s32 tgy = (y*2)+dy; + for (s32 dx=0; dx<2; ++dx) + { + const s32 tgx = (x*2)+dx; + + c = *(u32*)(&src[(tgx*4)+(tgy*pitchsrc)]); + + a += c.getAlpha(); + r += c.getRed(); + g += c.getGreen(); + b += c.getBlue(); + } + } + + a /= 4; + r /= 4; + g /= 4; + b /= 4; + + c.set(a, r, g, b); + *(u32*)(&tgt[(x*4)+(y*pitchtgt)]) = c.color; + } + } +} + + +//! Regenerates the mip map levels of the texture. Useful after locking and +//! modifying the texture +void CD3D9Texture::regenerateMipMapLevels(void* mipmapData) +{ + if (mipmapData) + { + core::dimension2du size = TextureSize; + u32 level=0; + do + { + if (size.Width>1) + size.Width /=2; + if (size.Height>1) + size.Height /=2; + ++level; + IDirect3DSurface9* mipSurface = 0; + HRESULT hr = Texture->GetSurfaceLevel(level, &mipSurface); + if (FAILED(hr) || !mipSurface) + { + os::Printer::log("Could not get mipmap level", ELL_WARNING); + return; + } + D3DSURFACE_DESC mipDesc; + mipSurface->GetDesc(&mipDesc); + D3DLOCKED_RECT miplr; + + // lock mipmap surface + if (FAILED(mipSurface->LockRect(&miplr, NULL, 0))) + { + mipSurface->Release(); + os::Printer::log("Could not lock texture", ELL_WARNING); + return; + } + + memcpy(miplr.pBits, mipmapData, size.getArea()*getPitch()/TextureSize.Width); + mipmapData = (u8*)mipmapData+size.getArea()*getPitch()/TextureSize.Width; + // unlock + mipSurface->UnlockRect(); + // release + mipSurface->Release(); + } while (size.Width != 1 || size.Height != 1); + } + else if (HasMipMaps) + { + // create mip maps. +#ifdef _IRR_USE_D3DXFilterTexture_ + // The D3DXFilterTexture function seems to get linked wrong when + // compiling with both D3D8 and 9, causing it not to work in the D3D9 device. + // So mipmapgeneration is replaced with my own bad generation + HRESULT hr = D3DXFilterTexture(Texture, NULL, D3DX_DEFAULT, D3DX_DEFAULT); + if (FAILED(hr)) +#endif + createMipMaps(); + } +} + + +//! returns if it is a render target +bool CD3D9Texture::isRenderTarget() const +{ + return IsRenderTarget; +} + + +//! Returns pointer to the render target surface +IDirect3DSurface9* CD3D9Texture::getRenderTargetSurface() +{ + if (!IsRenderTarget) + return 0; + + IDirect3DSurface9 *pRTTSurface = 0; + if (Texture) + Texture->GetSurfaceLevel(0, &pRTTSurface); + + if (pRTTSurface) + pRTTSurface->Release(); + + return pRTTSurface; +} + + +void CD3D9Texture::setPitch(D3DFORMAT d3dformat) +{ + switch(d3dformat) + { + case D3DFMT_X1R5G5B5: + case D3DFMT_A1R5G5B5: + Pitch = TextureSize.Width * 2; + break; + case D3DFMT_A8B8G8R8: + case D3DFMT_A8R8G8B8: + case D3DFMT_X8R8G8B8: + Pitch = TextureSize.Width * 4; + break; + case D3DFMT_R5G6B5: + Pitch = TextureSize.Width * 2; + break; + case D3DFMT_R8G8B8: + Pitch = TextureSize.Width * 3; + break; + default: + Pitch = 0; + }; +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.h new file mode 100644 index 0000000..812aa71 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CD3D9Texture.h @@ -0,0 +1,130 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DIRECTX9_TEXTURE_H_INCLUDED__ +#define __C_DIRECTX9_TEXTURE_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + +#include "ITexture.h" +#include "IImage.h" +#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) +#include "irrMath.h" // needed by borland for sqrtf define +#endif +#include <d3d9.h> + +namespace irr +{ +namespace video +{ + +class CD3D9Driver; +// forward declaration for RTT depth buffer handling +struct SDepthSurface; +/*! + interface for a Video Driver dependent Texture. +*/ +class CD3D9Texture : public ITexture +{ +public: + + //! constructor + CD3D9Texture(IImage* image, CD3D9Driver* driver, + u32 flags, const io::path& name, void* mipmapData=0); + + //! rendertarget constructor + CD3D9Texture(CD3D9Driver* driver, const core::dimension2d<u32>& size, const io::path& name, + const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! destructor + virtual ~CD3D9Texture(); + + //! lock function + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); + + //! unlock function + virtual void unlock(); + + //! Returns original size of the texture. + virtual const core::dimension2d<u32>& getOriginalSize() const; + + //! Returns (=size) of the texture. + virtual const core::dimension2d<u32>& getSize() const; + + //! returns driver type of texture (=the driver, who created the texture) + virtual E_DRIVER_TYPE getDriverType() const; + + //! returns color format of texture + virtual ECOLOR_FORMAT getColorFormat() const; + + //! returns pitch of texture (in bytes) + virtual u32 getPitch() const; + + //! returns the DIRECT3D9 Texture + IDirect3DBaseTexture9* getDX9Texture() const; + + //! returns if texture has mipmap levels + bool hasMipMaps() const; + + //! Regenerates the mip map levels of the texture. Useful after locking and + //! modifying the texture + virtual void regenerateMipMapLevels(void* mipmapData=0); + + //! returns if it is a render target + virtual bool isRenderTarget() const; + + //! Returns pointer to the render target surface + IDirect3DSurface9* getRenderTargetSurface(); + +private: + friend class CD3D9Driver; + + void createRenderTarget(const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! creates the hardware texture + bool createTexture(u32 flags, IImage * image); + + //! copies the image to the texture + bool copyTexture(IImage * image); + + //! Helper function for mipmap generation. + bool createMipMaps(u32 level=1); + + //! Helper function for mipmap generation. + void copy16BitMipMap(char* src, char* tgt, + s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const; + + //! Helper function for mipmap generation. + void copy32BitMipMap(char* src, char* tgt, + s32 width, s32 height, s32 pitchsrc, s32 pitchtgt) const; + + //! set Pitch based on the d3d format + void setPitch(D3DFORMAT d3dformat); + + IDirect3DDevice9* Device; + IDirect3DTexture9* Texture; + IDirect3DSurface9* RTTSurface; + CD3D9Driver* Driver; + SDepthSurface* DepthSurface; + core::dimension2d<u32> TextureSize; + core::dimension2d<u32> ImageSize; + s32 Pitch; + u32 MipLevelLocked; + ECOLOR_FORMAT ColorFormat; + + bool HasMipMaps; + bool HardwareMipMaps; + bool IsRenderTarget; +}; + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + +#endif // __C_DIRECTX9_TEXTURE_H_INCLUDED__ + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.cpp new file mode 100644 index 0000000..b6ed57b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.cpp @@ -0,0 +1,436 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was originally written by Salvatore Russo. +// I (Nikolaus Gebhardt) did some minor modifications and changes to it and +// integrated it into Irrlicht. +// Thanks a lot to Salvatore for his work on this and that he gave me +// his permission to add it into Irrlicht using the zlib license. +/* + CDMFLoader by Salvatore Russo (September 2005) + + See the header file for additional information including use and distribution rights. +*/ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_DMF_LOADER_ + +#ifdef _DEBUG +#define _IRR_DMF_DEBUG_ +#include "os.h" +#endif + +#include "CDMFLoader.h" +#include "ISceneManager.h" +#include "IAttributes.h" +#include "SAnimatedMesh.h" +#include "SSkinMeshBuffer.h" +#include "irrString.h" +#include "irrMath.h" +#include "dmfsupport.h" + +namespace irr +{ +namespace scene +{ + +/** Constructor*/ +CDMFLoader::CDMFLoader(ISceneManager* smgr, io::IFileSystem* filesys) +: SceneMgr(smgr), FileSystem(filesys) +{ + #ifdef _DEBUG + IReferenceCounted::setDebugName("CDMFLoader"); + #endif +} + + +void CDMFLoader::findFile(bool use_mat_dirs, const core::stringc& path, const core::stringc& matPath, core::stringc& filename) +{ + // path + texpath + full name + if (use_mat_dirs && FileSystem->existFile(path+matPath+filename)) + filename = path+matPath+filename; + // path + full name + else if (FileSystem->existFile(path+filename)) + filename = path+filename; + // path + texpath + base name + else if (use_mat_dirs && FileSystem->existFile(path+matPath+FileSystem->getFileBasename(filename))) + filename = path+matPath+FileSystem->getFileBasename(filename); + // path + base name + else if (FileSystem->existFile(path+FileSystem->getFileBasename(filename))) + filename = path+FileSystem->getFileBasename(filename); + // texpath + full name + else if (use_mat_dirs && FileSystem->existFile(matPath+filename)) + filename = matPath+filename; + // texpath + base name + else if (use_mat_dirs && FileSystem->existFile(matPath+FileSystem->getFileBasename(filename))) + filename = matPath+FileSystem->getFileBasename(filename); + // base name + else if (FileSystem->existFile(FileSystem->getFileBasename(filename))) + filename = FileSystem->getFileBasename(filename); +} + + +/**Creates/loads an animated mesh from the file. + \return Pointer to the created mesh. Returns 0 if loading failed. + If you no longer need the mesh, you should call IAnimatedMesh::drop(). + See IReferenceCounted::drop() for more information.*/ +IAnimatedMesh* CDMFLoader::createMesh(io::IReadFile* file) +{ + if (!file) + return 0; + video::IVideoDriver* driver = SceneMgr->getVideoDriver(); + + //Load stringlist + StringList dmfRawFile; + LoadFromFile(file, dmfRawFile); + + if (dmfRawFile.size()==0) + return 0; + + SMesh * mesh = new SMesh(); + + u32 i; + + dmfHeader header; + + //load header + core::array<dmfMaterial> materiali; + if (GetDMFHeader(dmfRawFile, header)) + { + //let's set ambient light + SceneMgr->setAmbientLight(header.dmfAmbient); + + //let's create the correct number of materials, vertices and faces + dmfVert *verts=new dmfVert[header.numVertices]; + dmfFace *faces=new dmfFace[header.numFaces]; + + //let's get the materials +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Loading materials", core::stringc(header.numMaterials).c_str()); +#endif + GetDMFMaterials(dmfRawFile, materiali, header.numMaterials); + + //let's get vertices and faces +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Loading geometry"); +#endif + GetDMFVerticesFaces(dmfRawFile, verts, faces); + + //create a meshbuffer for each material, then we'll remove empty ones +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Creating meshbuffers."); +#endif + for (i=0; i<header.numMaterials; i++) + { + //create a new SMeshBufferLightMap for each material + SSkinMeshBuffer* buffer = new SSkinMeshBuffer(); + buffer->Material.MaterialType = video::EMT_LIGHTMAP_LIGHTING; + buffer->Material.Wireframe = false; + buffer->Material.Lighting = true; + mesh->addMeshBuffer(buffer); + buffer->drop(); + } + + // Build the mesh buffers +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Adding geometry to mesh."); +#endif + for (i = 0; i < header.numFaces; i++) + { +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Polygon with #vertices", core::stringc(faces[i].numVerts).c_str()); +#endif + if (faces[i].numVerts < 3) + continue; + + const core::vector3df normal = + core::triangle3df(verts[faces[i].firstVert].pos, + verts[faces[i].firstVert+1].pos, + verts[faces[i].firstVert+2].pos).getNormal().normalize(); + + SSkinMeshBuffer* meshBuffer = (SSkinMeshBuffer*)mesh->getMeshBuffer( + faces[i].materialID); + + const bool use2TCoords = meshBuffer->Vertices_2TCoords.size() || + materiali[faces[i].materialID].lightmapName.size(); + if (use2TCoords && meshBuffer->Vertices_Standard.size()) + meshBuffer->convertTo2TCoords(); + const u32 base = meshBuffer->Vertices_2TCoords.size()?meshBuffer->Vertices_2TCoords.size():meshBuffer->Vertices_Standard.size(); + + // Add this face's verts + if (use2TCoords) + { + // make sure we have the proper type set + meshBuffer->VertexType=video::EVT_2TCOORDS; + for (u32 v = 0; v < faces[i].numVerts; v++) + { + const dmfVert& vv = verts[faces[i].firstVert + v]; + video::S3DVertex2TCoords vert(vv.pos, + normal, video::SColor(255,255,255,255), vv.tc, vv.lc); + if (materiali[faces[i].materialID].textureBlend==4 && + SceneMgr->getParameters()->getAttributeAsBool(DMF_FLIP_ALPHA_TEXTURES)) + { + vert.TCoords.set(vv.tc.X,-vv.tc.Y); + } + meshBuffer->Vertices_2TCoords.push_back(vert); + } + } + else + { + for (u32 v = 0; v < faces[i].numVerts; v++) + { + const dmfVert& vv = verts[faces[i].firstVert + v]; + video::S3DVertex vert(vv.pos, + normal, video::SColor(255,255,255,255), vv.tc); + if (materiali[faces[i].materialID].textureBlend==4 && + SceneMgr->getParameters()->getAttributeAsBool(DMF_FLIP_ALPHA_TEXTURES)) + { + vert.TCoords.set(vv.tc.X,-vv.tc.Y); + } + meshBuffer->Vertices_Standard.push_back(vert); + } + } + + // Now add the indices + // This weird loop turns convex polygons into triangle strips. + // I do it this way instead of a simple fan because it usually + // looks a lot better in wireframe, for example. + u32 h = faces[i].numVerts - 1, l = 0, c; // High, Low, Center + for (u32 v = 0; v < faces[i].numVerts - 2; v++) + { + if (v & 1) // odd + c = h - 1; + else // even + c = l + 1; + + meshBuffer->Indices.push_back(base + h); + meshBuffer->Indices.push_back(base + l); + meshBuffer->Indices.push_back(base + c); + + if (v & 1) // odd + h--; + else // even + l++; + } + } + + delete [] verts; + delete [] faces; + } + + // delete all buffers without geometry in it. +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Cleaning meshbuffers."); +#endif + i = 0; + while(i < mesh->MeshBuffers.size()) + { + if (mesh->MeshBuffers[i]->getVertexCount() == 0 || + mesh->MeshBuffers[i]->getIndexCount() == 0) + { + // Meshbuffer is empty -- drop it + mesh->MeshBuffers[i]->drop(); + mesh->MeshBuffers.erase(i); + materiali.erase(i); + } + else + { + i++; + } + } + + + { + //load textures and lightmaps in materials. + //don't worry if you receive a could not load texture, cause if you don't need + //a particular material in your scene it will be loaded and then destroyed. +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Loading textures."); +#endif + const bool use_mat_dirs=!SceneMgr->getParameters()->getAttributeAsBool(DMF_IGNORE_MATERIALS_DIRS); + + core::stringc path; + if ( SceneMgr->getParameters()->existsAttribute(DMF_TEXTURE_PATH) ) + path = SceneMgr->getParameters()->getAttributeAsString(DMF_TEXTURE_PATH); + else + path = FileSystem->getFileDir(file->getFileName()); + path += ('/'); + + for (i=0; i<mesh->getMeshBufferCount(); i++) + { + //texture and lightmap + video::ITexture *tex = 0; + video::ITexture *lig = 0; + + //current buffer to apply material + video::SMaterial& mat = mesh->getMeshBuffer(i)->getMaterial(); + + //Primary texture is normal + if (materiali[i].textureFlag==0) + { + if (materiali[i].textureBlend==4) + driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT,true); + findFile(use_mat_dirs, path, materiali[i].pathName, materiali[i].textureName); + tex = driver->getTexture(materiali[i].textureName); + } + //Primary texture is just a color + else if(materiali[i].textureFlag==1) + { + video::SColor color(axtoi(materiali[i].textureName.c_str())); + + //just for compatibility with older Irrlicht versions + //to support transparent materials + if (color.getAlpha()!=255 && materiali[i].textureBlend==4) + driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT,true); + + video::IImage *immagine= driver->createImage(video::ECF_A8R8G8B8, + core::dimension2d<u32>(8,8)); + immagine->fill(color); + tex = driver->addTexture("", immagine); + immagine->drop(); + + //to support transparent materials + if (color.getAlpha()!=255 && materiali[i].textureBlend==4) + { + mat.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + mat.MaterialTypeParam =(((f32) (color.getAlpha()-1))/255.0f); + } + } + + //Lightmap is present + if (materiali[i].lightmapFlag == 0) + { + findFile(use_mat_dirs, path, materiali[i].pathName, materiali[i].lightmapName); + lig = driver->getTexture(materiali[i].lightmapName); + } + else //no lightmap + { + mat.MaterialType = video::EMT_SOLID; + const f32 mult = 100.0f - header.dmfShadow; + mat.AmbientColor=header.dmfAmbient.getInterpolated(video::SColor(255,0,0,0),mult/100.f); + } + + if (materiali[i].textureBlend==4) + { + mat.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + mat.MaterialTypeParam = + SceneMgr->getParameters()->getAttributeAsFloat(DMF_ALPHA_CHANNEL_REF); + } + + //if texture is present mirror vertically owing to DeleD representation + if (tex && header.dmfVersion<1.1) + { + const core::dimension2d<u32> texsize = tex->getSize(); + void* pp = tex->lock(); + if (pp) + { + const video::ECOLOR_FORMAT format = tex->getColorFormat(); + if (format == video::ECF_A1R5G5B5) + { + s16* p = (s16*)pp; + s16 tmp=0; + for (u32 x=0; x<texsize.Width; x++) + for (u32 y=0; y<texsize.Height/2; y++) + { + tmp=p[y*texsize.Width + x]; + p[y*texsize.Width + x] = p[(texsize.Height-y-1)*texsize.Width + x]; + p[(texsize.Height-y-1)*texsize.Width + x]=tmp; + } + } + else + if (format == video::ECF_A8R8G8B8) + { + s32* p = (s32*)pp; + s32 tmp=0; + for (u32 x=0; x<texsize.Width; x++) + for (u32 y=0; y<texsize.Height/2; y++) + { + tmp=p[y*texsize.Width + x]; + p[y*texsize.Width + x] = p[(texsize.Height-y-1)*texsize.Width + x]; + p[(texsize.Height-y-1)*texsize.Width + x]=tmp; + } + } + } + tex->unlock(); + tex->regenerateMipMapLevels(); + } + + //if lightmap is present mirror vertically owing to DeleD rapresentation + if (lig && header.dmfVersion<1.1) + { + const core::dimension2d<u32> ligsize=lig->getSize(); + void* pp = lig->lock(); + if (pp) + { + video::ECOLOR_FORMAT format = lig->getColorFormat(); + if (format == video::ECF_A1R5G5B5) + { + s16* p = (s16*)pp; + s16 tmp=0; + for (u32 x=0; x<ligsize.Width; x++) + { + for (u32 y=0; y<ligsize.Height/2; y++) + { + tmp=p[y*ligsize.Width + x]; + p[y*ligsize.Width + x] = p[(ligsize.Height-y-1)*ligsize.Width + x]; + p[(ligsize.Height-y-1)*ligsize.Width + x]=tmp; + } + } + } + else if (format == video::ECF_A8R8G8B8) + { + s32* p = (s32*)pp; + s32 tmp=0; + for (u32 x=0; x<ligsize.Width; x++) + { + for (u32 y=0; y<ligsize.Height/2; y++) + { + tmp=p[y*ligsize.Width + x]; + p[y*ligsize.Width + x] = p[(ligsize.Height-y-1)*ligsize.Width + x]; + p[(ligsize.Height-y-1)*ligsize.Width + x]=tmp; + } + } + } + } + lig->unlock(); + lig->regenerateMipMapLevels(); + } + + mat.setTexture(0, tex); + mat.setTexture(1, lig); + } + } + + // create bounding box + for (i = 0; i < mesh->MeshBuffers.size(); ++i) + { + mesh->MeshBuffers[i]->recalculateBoundingBox(); + } + mesh->recalculateBoundingBox(); + + // Set up an animated mesh to hold the mesh + SAnimatedMesh* AMesh = new SAnimatedMesh(); + AMesh->Type = EAMT_UNKNOWN; + AMesh->addMesh(mesh); + AMesh->recalculateBoundingBox(); + mesh->drop(); + + return AMesh; +} + + +/** \brief Tell us if this file is able to be loaded by this class + based on the file extension (e.g. ".bsp") + \return true if file is loadable.*/ +bool CDMFLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "dmf" ); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_DMF_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h new file mode 100644 index 0000000..a314913 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h @@ -0,0 +1,91 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was originally written by Salvatore Russo. +// I (Nikolaus Gebhardt) did some minor modifications changes to it and integrated +// it into Irrlicht: +// - removed STL dependency +// - removed log file and replaced it with irrlicht logging +// - adapted code formatting a bit to Irrlicht style +// - removed memory leaks +// Thanks a lot to Salvatore for his work on this and that he gave me +// his permission to add it into Irrlicht. + +/* + CDMFLoader by Salvatore Russo + Version 1.3 + + This loader is used to load DMF files in Irrlicht. + Look at the documentation for a sample application. + + Parts of this code are from Murphy McCauley COCTLoader just like + GetFaceNormal() or indexes creation routines and a routine to add faces. So + please refer to COCTLoader.h to know more about rights granted. + + You can use this software as you wish but you must not remove these notes about license nor + credits to others for parts of this code. +*/ + +#ifndef __C_DMF_LOADER_H_INCLUDED__ +#define __C_DMF_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IReadFile.h" +#include "IFileSystem.h" +#include "SMesh.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "SAnimatedMesh.h" + +namespace irr +{ +namespace scene +{ + /** A class to load DeleD mesh files.*/ + class CDMFLoader : public IMeshLoader + { + public: + + /** constructor*/ + CDMFLoader(ISceneManager* smgr, io::IFileSystem* filesys); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + /** creates/loads an animated mesh from the file. + \return Pointer to the created mesh. Returns 0 if loading failed. + If you no longer need the mesh, you should call IAnimatedMesh::drop(). + See IReferenceCounted::drop() for more information.*/ + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + /** loads dynamic lights present in this scene. + Note that loaded lights from DeleD must have the suffix \b dynamic_ and must be \b pointlight. + Irrlicht correctly loads specular color, diffuse color , position and distance of object affected by light. + \return number of lights loaded or 0 if loading failed.*/ + int loadLights(const c8 * filename, ISceneManager* smgr, + ISceneNode* parent = 0, s32 base_id = 1000); + + /** loads water plains present in this scene. + Note that loaded water plains from DeleD must have the suffix \b water_ and must be \b rectangle (with just 1 rectangular face). + Irrlicht correctly loads position and rotation of water plain as well as texture layers. + \return number of water plains loaded or 0 if loading failed.*/ + int loadWaterPlains(const c8 *filename, + ISceneManager* smgr, + ISceneNode * parent = 0, + s32 base_id = 2000, + bool mode = true); + + private: + void findFile(bool use_mat_dirs, const core::stringc& path, const core::stringc& matPath, core::stringc& filename); + + ISceneManager* SceneMgr; + io::IFileSystem* FileSystem; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.cpp new file mode 100644 index 0000000..c10f18f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.cpp @@ -0,0 +1,164 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CDefaultGUIElementFactory.h" + +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" + +#include "IGUIButton.h" +#include "IGUICheckBox.h" +#include "IGUIColorSelectDialog.h" +#include "IGUIComboBox.h" +#include "IGUIContextMenu.h" +#include "IGUIEditBox.h" +#include "IGUIFileOpenDialog.h" +#include "IGUIInOutFader.h" +#include "IGUIImage.h" +#include "IGUIListBox.h" +#include "IGUIMeshViewer.h" +#include "IGUIScrollBar.h" +#include "IGUISpinBox.h" +#include "IGUIStaticText.h" +#include "IGUITabControl.h" +#include "IGUITable.h" +#include "IGUIToolbar.h" +#include "IGUIWindow.h" +#include "IGUITreeView.h" + +namespace irr +{ +namespace gui +{ + +CDefaultGUIElementFactory::CDefaultGUIElementFactory(IGUIEnvironment* env) +: Environment(env) +{ + + #ifdef _DEBUG + setDebugName("CDefaultGUIElementFactory"); + #endif + + // don't grab the gui environment here to prevent cyclic references +} + + +//! adds an element to the env based on its type id +IGUIElement* CDefaultGUIElementFactory::addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent) +{ + switch(type) + { + case EGUIET_BUTTON: + return Environment->addButton(core::rect<s32>(0,0,100,100),parent); + case EGUIET_CHECK_BOX: + return Environment->addCheckBox(false, core::rect<s32>(0,0,100,100), parent); + case EGUIET_COLOR_SELECT_DIALOG: + return Environment->addColorSelectDialog(0,true,parent); + case EGUIET_COMBO_BOX: + return Environment->addComboBox(core::rect<s32>(0,0,100,100),parent); + case EGUIET_CONTEXT_MENU: + return Environment->addContextMenu(core::rect<s32>(0,0,100,100),parent); + case EGUIET_MENU: + return Environment->addMenu(parent); + case EGUIET_EDIT_BOX: + return Environment->addEditBox(0,core::rect<s32>(0,0,100,100),true, parent); + case EGUIET_FILE_OPEN_DIALOG: + return Environment->addFileOpenDialog(0,true,parent); + case EGUIET_IMAGE: + return Environment->addImage(0,core::position2di(0,0), true, parent); + case EGUIET_IN_OUT_FADER: + return Environment->addInOutFader(0,parent); + case EGUIET_LIST_BOX: + return Environment->addListBox(core::rect<s32>(0,0,100,100),parent); + case EGUIET_MESH_VIEWER: + return Environment->addMeshViewer(core::rect<s32>(0,0,100,100),parent); + case EGUIET_MODAL_SCREEN: + return Environment->addModalScreen(parent); + case EGUIET_MESSAGE_BOX: + return Environment->addMessageBox(0,0,false,0,parent); + case EGUIET_SCROLL_BAR: + return Environment->addScrollBar(false,core::rect<s32>(0,0,100,100),parent); + case EGUIET_STATIC_TEXT: + return Environment->addStaticText(0,core::rect<s32>(0,0,100,100),false,true,parent); + case EGUIET_TAB: + return Environment->addTab(core::rect<s32>(0,0,100,100),parent); + case EGUIET_TAB_CONTROL: + return Environment->addTabControl(core::rect<s32>(0,0,100,100),parent); + case EGUIET_TABLE: + return Environment->addTable(core::rect<s32>(0,0,100,100), parent); + case EGUIET_TOOL_BAR: + return Environment->addToolBar(parent); + case EGUIET_WINDOW: + return Environment->addWindow(core::rect<s32>(0,0,100,100),false,0,parent); + case EGUIET_SPIN_BOX: + return Environment->addSpinBox(L"0.0", core::rect<s32>(0,0,100,100), true, parent); + case EGUIET_TREE_VIEW: + return Environment->addTreeView(core::rect<s32>(0,0,100,100),parent); + default: + return 0; + } +} + + +//! adds an element to the environment based on its type name +IGUIElement* CDefaultGUIElementFactory::addGUIElement(const c8* typeName, IGUIElement* parent) +{ + return addGUIElement( getTypeFromName(typeName), parent ); +} + + +//! Returns the amount of element types this factory is able to create. +s32 CDefaultGUIElementFactory::getCreatableGUIElementTypeCount() const +{ + return EGUIET_COUNT; +} + + +//! Returns the type of a createable element type. +EGUI_ELEMENT_TYPE CDefaultGUIElementFactory::getCreateableGUIElementType(s32 idx) const +{ + if (idx>=0 && idx<EGUIET_COUNT) + return (EGUI_ELEMENT_TYPE)idx; + + return EGUIET_ELEMENT; +} + + +//! Returns the type name of a createable element type. +const c8* CDefaultGUIElementFactory::getCreateableGUIElementTypeName(s32 idx) const +{ + if (idx>=0 && idx<EGUIET_COUNT) + return GUIElementTypeNames[idx]; + + return 0; +} + + +//! Returns the type name of a createable element type. +const c8* CDefaultGUIElementFactory::getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const +{ + // for this factory, type == index + + if (type>=0 && type<EGUIET_COUNT) + return GUIElementTypeNames[type]; + + return 0; +} + +EGUI_ELEMENT_TYPE CDefaultGUIElementFactory::getTypeFromName(const c8* name) const +{ + for ( u32 i=0; GUIElementTypeNames[i]; ++i) + if (!strcmp(name, GUIElementTypeNames[i]) ) + return (EGUI_ELEMENT_TYPE)i; + + return EGUIET_ELEMENT; +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.d new file mode 100644 index 0000000..7489f2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.d @@ -0,0 +1,2 @@ +CDefaultGUIElementFactory.o: CDefaultGUIElementFactory.cpp \ + CDefaultGUIElementFactory.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.h new file mode 100644 index 0000000..fd92c6d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultGUIElementFactory.h @@ -0,0 +1,70 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DEFAULT_GUI_ELEMENT_FACTORY_H_INCLUDED__ +#define __C_DEFAULT_GUI_ELEMENT_FACTORY_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIElementFactory.h" + +namespace irr +{ +namespace gui +{ + class IGUIElement; + class IGUIEnvironment; + + //! This interface makes it possible to dynamically create gui elements. + class CDefaultGUIElementFactory : public IGUIElementFactory + { + public: + + CDefaultGUIElementFactory(IGUIEnvironment* env); + + //! Adds an element to the gui environment based on its type id. + /** \param type: Type of the element to add. + \param parent: Parent scene node of the new element. A value of 0 adds it to the root. + \return Returns pointer to the new element or 0 if unsuccessful. */ + virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0); + + //! Adds a GUI element to the GUI Environment based on its type name. + /** \param typeName: Type name of the element to add. Taken from the GUIElementTypeNames c8* array. + \param parent: Parent scene node of the new element. A value of 0 adds it to the root. + \return Returns pointer to the new element or 0 if unsuccessful. */ + virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0); + + //! Returns the amount of GUI element types this factory is able to create. + virtual s32 getCreatableGUIElementTypeCount() const; + + //! Returns the type of a createable GUI element type based on the index. + /** \param idx: Index of the element type in this factory. The value must be equal or greater than 0 + and lower than getCreatableGUIElementTypeCount(). */ + virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const; + + //! Returns the type name of a createable GUI element type based on the index. + /** \param idx: Index of the element type in this factory. The value must be equal or greater than 0 + and lower than getCreatableGUIElementTypeCount(). */ + virtual const c8* getCreateableGUIElementTypeName(s32 idx) const; + + //! Returns the type name of a createable GUI element based on its type. + /** \param type: Type of the GUI element. + \return: Returns the name of the type if this factory can create it, otherwise it returns 0. */ + virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const; + + private: + + EGUI_ELEMENT_TYPE getTypeFromName(const c8* name) const; + + IGUIEnvironment* Environment; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_DEFAULT_GUI_ELEMENT_FACTORY_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp new file mode 100644 index 0000000..ec52d25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp @@ -0,0 +1,162 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CDefaultSceneNodeAnimatorFactory.h" +#include "CSceneNodeAnimatorCameraFPS.h" +#include "CSceneNodeAnimatorCameraMaya.h" +#include "ICursorControl.h" +#include "ISceneNodeAnimatorCollisionResponse.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +//! Names for scene node types +const c8* const SceneNodeAnimatorTypeNames[] = +{ + "flyCircle", + "flyStraight", + "followSpline", + "rotation", + "texture", + "deletion", + "collisionResponse", + "cameraFPS", + "cameraMaya", + 0 +}; + + +CDefaultSceneNodeAnimatorFactory::CDefaultSceneNodeAnimatorFactory(ISceneManager* mgr, gui::ICursorControl* crs) +: Manager(mgr), CursorControl(crs) +{ + #ifdef _DEBUG + setDebugName("CDefaultSceneNodeAnimatorFactory"); + #endif + + // don't grab the scene manager here to prevent cyclic references + if (CursorControl) + CursorControl->grab(); +} + + +CDefaultSceneNodeAnimatorFactory::~CDefaultSceneNodeAnimatorFactory() +{ + if (CursorControl) + CursorControl->drop(); +} + + +//! creates a scene node animator based on its type id +ISceneNodeAnimator* CDefaultSceneNodeAnimatorFactory::createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target) +{ + scene::ISceneNodeAnimator* anim = 0; + + switch(type) + { + case ESNAT_FLY_CIRCLE: + anim = Manager->createFlyCircleAnimator(core::vector3df(0,0,0), 10); + break; + case ESNAT_FLY_STRAIGHT: + anim = Manager->createFlyStraightAnimator(core::vector3df(0,0,0), core::vector3df(100,100,100), 10000, true ); + break; + case ESNAT_FOLLOW_SPLINE: + { + core::array<core::vector3df> points; + points.push_back(core::vector3df(0,0,0)); + points.push_back(core::vector3df(10,5,10)); + anim = Manager->createFollowSplineAnimator(0, points); + } + break; + case ESNAT_ROTATION: + anim = Manager->createRotationAnimator(core::vector3df(0.3f,0,0)); + break; + case ESNAT_TEXTURE: + { + core::array<video::ITexture*> textures; + anim = Manager->createTextureAnimator(textures, 250); + } + break; + case ESNAT_DELETION: + anim = Manager->createDeleteAnimator(5000); + break; + case ESNAT_COLLISION_RESPONSE: + anim = Manager->createCollisionResponseAnimator(0, target); + break; + case ESNAT_CAMERA_FPS: + anim = new CSceneNodeAnimatorCameraFPS(CursorControl); + break; + case ESNAT_CAMERA_MAYA: + anim = new CSceneNodeAnimatorCameraMaya(CursorControl); + break; + default: + break; + } + + if (anim && target) + target->addAnimator(anim); + + return anim; +} + + +//! creates a scene node animator based on its type name +ISceneNodeAnimator* CDefaultSceneNodeAnimatorFactory::createSceneNodeAnimator(const c8* typeName, ISceneNode* target) +{ + return createSceneNodeAnimator( getTypeFromName(typeName), target ); +} + + +//! returns amount of scene node animator types this factory is able to create +u32 CDefaultSceneNodeAnimatorFactory::getCreatableSceneNodeAnimatorTypeCount() const +{ + return ESNAT_COUNT; +} + + +//! returns type of a createable scene node animator type +ESCENE_NODE_ANIMATOR_TYPE CDefaultSceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorType(u32 idx) const +{ + if (idx<ESNAT_COUNT) + return (ESCENE_NODE_ANIMATOR_TYPE)idx; + else + return ESNAT_UNKNOWN; +} + + +//! returns type name of a createable scene node animator type +const c8* CDefaultSceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName(u32 idx) const +{ + if (idx<ESNAT_COUNT) + return SceneNodeAnimatorTypeNames[idx]; + else + return 0; +} + +//! returns type name of a createable scene node animator type +const c8* CDefaultSceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const +{ + // for this factory: index == type + + if (type<ESNAT_COUNT) + return SceneNodeAnimatorTypeNames[type]; + else + return 0; +} + +ESCENE_NODE_ANIMATOR_TYPE CDefaultSceneNodeAnimatorFactory::getTypeFromName(const c8* name) const +{ + for ( u32 i=0; SceneNodeAnimatorTypeNames[i]; ++i) + if (!strcmp(name, SceneNodeAnimatorTypeNames[i]) ) + return (ESCENE_NODE_ANIMATOR_TYPE)i; + + return ESNAT_UNKNOWN; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h new file mode 100644 index 0000000..0761c6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h @@ -0,0 +1,75 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DEFAULT_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__ +#define __C_DEFAULT_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__ + +#include "ISceneNodeAnimatorFactory.h" + +namespace irr +{ +namespace gui +{ + class ICursorControl; +} +namespace scene +{ + class ISceneNodeAnimator; + class ISceneManager; + + //! Interface making it possible to dynamicly create scene nodes animators + class CDefaultSceneNodeAnimatorFactory : public ISceneNodeAnimatorFactory + { + public: + + CDefaultSceneNodeAnimatorFactory(ISceneManager* mgr, gui::ICursorControl* crs); + + virtual ~CDefaultSceneNodeAnimatorFactory(); + + //! creates a scene node animator based on its type id + /** \param type: Type of the scene node animator to add. + \param target: Target scene node of the new animator. + \return Returns pointer to the new scene node animator or null if not successful. You need to + drop this pointer after calling this, see IReferenceCounted::drop() for details. */ + virtual ISceneNodeAnimator* createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target); + + //! creates a scene node animator based on its type name + /** \param typeName: Type of the scene node animator to add. + \param target: Target scene node of the new animator. + \return Returns pointer to the new scene node animator or null if not successful. You need to + drop this pointer after calling this, see IReferenceCounted::drop() for details. */ + virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target); + + //! returns amount of scene node animator types this factory is able to create + virtual u32 getCreatableSceneNodeAnimatorTypeCount() const; + + //! returns type of a createable scene node animator type + /** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and + getCreatableSceneNodeTypeCount() */ + virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType(u32 idx) const; + + //! returns type name of a createable scene node animator type + /** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and + getCreatableSceneNodeAnimatorTypeCount() */ + virtual const c8* getCreateableSceneNodeAnimatorTypeName(u32 idx) const; + + //! returns type name of a createable scene node animator type + /** \param type: Type of scene node animator. + \return: Returns name of scene node animator type if this factory can create the type, otherwise 0. */ + virtual const c8* getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const; + + private: + + ESCENE_NODE_ANIMATOR_TYPE getTypeFromName(const c8* name) const; + + ISceneManager* Manager; + gui::ICursorControl* CursorControl; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.cpp new file mode 100644 index 0000000..942d3cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.cpp @@ -0,0 +1,179 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CDefaultSceneNodeFactory.h" +#include "ISceneManager.h" +#include "ITextSceneNode.h" +#include "ITerrainSceneNode.h" +#include "IDummyTransformationSceneNode.h" +#include "ICameraSceneNode.h" +#include "IBillboardSceneNode.h" +#include "IAnimatedMeshSceneNode.h" +#include "IParticleSystemSceneNode.h" +#include "ILightSceneNode.h" +#include "IMeshSceneNode.h" + +namespace irr +{ +namespace scene +{ + + +CDefaultSceneNodeFactory::CDefaultSceneNodeFactory(ISceneManager* mgr) +: Manager(mgr) +{ + + #ifdef _DEBUG + setDebugName("CDefaultSceneNodeFactory"); + #endif + + // don't grab the scene manager here to prevent cyclic references + + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_CUBE, "cube")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_SPHERE, "sphere")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_TEXT, "text")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_WATER_SURFACE, "waterSurface")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_TERRAIN, "terrain")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_SKY_BOX, "skyBox")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_SKY_DOME, "skyDome")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_SHADOW_VOLUME, "shadowVolume")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_OCTREE, "octree")); + // Legacy support + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_OCTREE, "octTree")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_MESH, "mesh")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_LIGHT, "light")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_EMPTY, "empty")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_DUMMY_TRANSFORMATION, "dummyTransformation")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_CAMERA, "camera")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_BILLBOARD, "billBoard")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_ANIMATED_MESH, "animatedMesh")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_PARTICLE_SYSTEM, "particleSystem")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_VOLUME_LIGHT, "volumeLight")); + // SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_MD3_SCENE_NODE, "md3")); + + // legacy, for version <= 1.4.x irr files + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_CAMERA_MAYA, "cameraMaya")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_CAMERA_FPS, "cameraFPS")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_Q3SHADER_SCENE_NODE, "quake3Shader")); +} + + +//! adds a scene node to the scene graph based on its type id +ISceneNode* CDefaultSceneNodeFactory::addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent) +{ + switch(type) + { + case ESNT_CUBE: + return Manager->addCubeSceneNode(10, parent); + case ESNT_SPHERE: + return Manager->addSphereSceneNode(5, 16, parent); + case ESNT_TEXT: + return Manager->addTextSceneNode(0, L"example"); + case ESNT_WATER_SURFACE: + return Manager->addWaterSurfaceSceneNode(0, 2.0f, 300.0f, 10.0f, parent); + case ESNT_TERRAIN: + return Manager->addTerrainSceneNode("", parent, -1, + core::vector3df(0.0f,0.0f,0.0f), + core::vector3df(0.0f,0.0f,0.0f), + core::vector3df(1.0f,1.0f,1.0f), + video::SColor(255,255,255,255), + 4, ETPS_17, 0, true); + case ESNT_SKY_BOX: + return Manager->addSkyBoxSceneNode(0,0,0,0,0,0, parent); + case ESNT_SKY_DOME: + return Manager->addSkyDomeSceneNode(0, 16, 8, 0.9f, 2.0f, 1000.0f, parent); + case ESNT_SHADOW_VOLUME: + return 0; + case ESNT_OCTREE: + return Manager->addOctreeSceneNode((IMesh*)0, parent, -1, 128, true); + case ESNT_MESH: + return Manager->addMeshSceneNode(0, parent, -1, core::vector3df(), + core::vector3df(), core::vector3df(1,1,1), true); + case ESNT_LIGHT: + return Manager->addLightSceneNode(parent); + case ESNT_EMPTY: + return Manager->addEmptySceneNode(parent); + case ESNT_DUMMY_TRANSFORMATION: + return Manager->addDummyTransformationSceneNode(parent); + case ESNT_CAMERA: + return Manager->addCameraSceneNode(parent); + case ESNT_CAMERA_MAYA: + return Manager->addCameraSceneNodeMaya(parent); + case ESNT_CAMERA_FPS: + return Manager->addCameraSceneNodeFPS(parent); + case ESNT_BILLBOARD: + return Manager->addBillboardSceneNode(parent); + case ESNT_ANIMATED_MESH: + return Manager->addAnimatedMeshSceneNode(0, parent, -1, core::vector3df(), + core::vector3df(), core::vector3df(1,1,1), true); + case ESNT_PARTICLE_SYSTEM: + return Manager->addParticleSystemSceneNode(true, parent); + case ESNT_VOLUME_LIGHT: + return (ISceneNode*)Manager->addVolumeLightSceneNode(parent); + default: + break; + } + + return 0; +} + + +//! adds a scene node to the scene graph based on its type name +ISceneNode* CDefaultSceneNodeFactory::addSceneNode(const c8* typeName, ISceneNode* parent) +{ + return addSceneNode( getTypeFromName(typeName), parent ); +} + + +//! returns amount of scene node types this factory is able to create +u32 CDefaultSceneNodeFactory::getCreatableSceneNodeTypeCount() const +{ + return SupportedSceneNodeTypes.size(); +} + + +//! returns type of a createable scene node type +ESCENE_NODE_TYPE CDefaultSceneNodeFactory::getCreateableSceneNodeType(u32 idx) const +{ + if (idx<SupportedSceneNodeTypes.size()) + return SupportedSceneNodeTypes[idx].Type; + else + return ESNT_UNKNOWN; +} + + +//! returns type name of a createable scene node type +const c8* CDefaultSceneNodeFactory::getCreateableSceneNodeTypeName(u32 idx) const +{ + if (idx<SupportedSceneNodeTypes.size()) + return SupportedSceneNodeTypes[idx].TypeName.c_str(); + else + return 0; +} + + +//! returns type name of a createable scene node type +const c8* CDefaultSceneNodeFactory::getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const +{ + for (u32 i=0; i<SupportedSceneNodeTypes.size(); ++i) + if (SupportedSceneNodeTypes[i].Type == type) + return SupportedSceneNodeTypes[i].TypeName.c_str(); + + return 0; +} + + +ESCENE_NODE_TYPE CDefaultSceneNodeFactory::getTypeFromName(const c8* name) const +{ + for (u32 i=0; i<SupportedSceneNodeTypes.size(); ++i) + if (SupportedSceneNodeTypes[i].TypeName == name) + return SupportedSceneNodeTypes[i].Type; + + return ESNT_UNKNOWN; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.h new file mode 100644 index 0000000..5ed2036 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDefaultSceneNodeFactory.h @@ -0,0 +1,80 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DEFAULT_SCENE_NODE_FACTORY_H_INCLUDED__ +#define __C_DEFAULT_SCENE_NODE_FACTORY_H_INCLUDED__ + +#include "ISceneNodeFactory.h" +#include "irrArray.h" +#include "irrString.h" + +namespace irr +{ +namespace scene +{ + class ISceneNode; + class ISceneManager; + + //! Interface making it possible to dynamicly create scene nodes and animators + class CDefaultSceneNodeFactory : public ISceneNodeFactory + { + public: + + CDefaultSceneNodeFactory(ISceneManager* mgr); + + //! adds a scene node to the scene graph based on its type id + /** \param type: Type of the scene node to add. + \param parent: Parent scene node of the new node, can be null to add the scene node to the root. + \return Returns pointer to the new scene node or null if not successful. */ + virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0); + + //! adds a scene node to the scene graph based on its type name + /** \param typeName: Type name of the scene node to add. + \param parent: Parent scene node of the new node, can be null to add the scene node to the root. + \return Returns pointer to the new scene node or null if not successful. */ + virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0); + + //! returns amount of scene node types this factory is able to create + virtual u32 getCreatableSceneNodeTypeCount() const; + + //! returns type name of a createable scene node type by index + /** \param idx: Index of scene node type in this factory. Must be a value between 0 and + uetCreatableSceneNodeTypeCount() */ + virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const; + + //! returns type of a createable scene node type + /** \param idx: Index of scene node type in this factory. Must be a value between 0 and + getCreatableSceneNodeTypeCount() */ + virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const; + + //! returns type name of a createable scene node type + /** \param idx: Type of scene node. + \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ + virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const; + + private: + + ESCENE_NODE_TYPE getTypeFromName(const c8* name) const; + + struct SSceneNodeTypePair + { + SSceneNodeTypePair(ESCENE_NODE_TYPE type, const c8* name) + : Type(type), TypeName(name) + {} + + ESCENE_NODE_TYPE Type; + core::stringc TypeName; + }; + + core::array<SSceneNodeTypePair> SupportedSceneNodeTypes; + + ISceneManager* Manager; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.cpp new file mode 100644 index 0000000..8658105 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.cpp @@ -0,0 +1,176 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "SoftwareDriver2_compile_config.h" +#include "CDepthBuffer.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! constructor +CDepthBuffer::CDepthBuffer(const core::dimension2d<u32>& size) +: Buffer(0), Size(0,0) +{ + #ifdef _DEBUG + setDebugName("CDepthBuffer"); + #endif + + setSize(size); +} + + + +//! destructor +CDepthBuffer::~CDepthBuffer() +{ + if (Buffer) + delete [] Buffer; +} + + + +//! clears the zbuffer +void CDepthBuffer::clear() +{ + +#ifdef SOFTWARE_DRIVER_2_USE_WBUFFER + f32 zMax = 0.f; +#else + f32 zMax = 1.f; +#endif + + u32 zMaxValue; + zMaxValue = IR(zMax); + + memset32 ( Buffer, zMaxValue, TotalSize ); +} + + + +//! sets the new size of the zbuffer +void CDepthBuffer::setSize(const core::dimension2d<u32>& size) +{ + if (size == Size) + return; + + Size = size; + + if (Buffer) + delete [] Buffer; + + Pitch = size.Width * sizeof ( fp24 ); + TotalSize = Pitch * size.Height; + Buffer = new u8[TotalSize]; + clear (); +} + + + +//! returns the size of the zbuffer +const core::dimension2d<u32>& CDepthBuffer::getSize() const +{ + return Size; +} + +// ----------------------------------------------------------------- + +//! constructor +CStencilBuffer::CStencilBuffer(const core::dimension2d<u32>& size) +: Buffer(0), Size(0,0) +{ + #ifdef _DEBUG + setDebugName("CDepthBuffer"); + #endif + + setSize(size); +} + + + +//! destructor +CStencilBuffer::~CStencilBuffer() +{ + if (Buffer) + delete [] Buffer; +} + + + +//! clears the zbuffer +void CStencilBuffer::clear() +{ + memset32 ( Buffer, 0, TotalSize ); +} + + + +//! sets the new size of the zbuffer +void CStencilBuffer::setSize(const core::dimension2d<u32>& size) +{ + if (size == Size) + return; + + Size = size; + + if (Buffer) + delete [] Buffer; + + Pitch = size.Width * sizeof ( u32 ); + TotalSize = Pitch * size.Height; + Buffer = new u8[TotalSize]; + clear (); +} + + + +//! returns the size of the zbuffer +const core::dimension2d<u32>& CStencilBuffer::getSize() const +{ + return Size; +} + + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a ZBuffer +IDepthBuffer* createDepthBuffer(const core::dimension2d<u32>& size) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CDepthBuffer(size); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +//! creates a ZBuffer +IStencilBuffer* createStencilBuffer(const core::dimension2d<u32>& size) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CStencilBuffer(size); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h new file mode 100644 index 0000000..2355e61 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDepthBuffer.h @@ -0,0 +1,94 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_Z_BUFFER_H_INCLUDED__ +#define __C_Z_BUFFER_H_INCLUDED__ + +#include "IDepthBuffer.h" + +namespace irr +{ +namespace video +{ + + class CDepthBuffer : public IDepthBuffer + { + public: + + //! constructor + CDepthBuffer(const core::dimension2d<u32>& size); + + //! destructor + virtual ~CDepthBuffer(); + + //! clears the zbuffer + virtual void clear(); + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d<u32>& size); + + //! returns the size of the zbuffer + virtual const core::dimension2d<u32>& getSize() const; + + //! locks the zbuffer + virtual void* lock() { return (void*) Buffer; } + + //! unlocks the zbuffer + virtual void unlock() {} + + //! returns pitch of depthbuffer (in bytes) + virtual u32 getPitch() const { return Pitch; } + + + private: + + u8* Buffer; + core::dimension2d<u32> Size; + u32 TotalSize; + u32 Pitch; + }; + + + class CStencilBuffer : public IStencilBuffer + { + public: + + //! constructor + CStencilBuffer(const core::dimension2d<u32>& size); + + //! destructor + virtual ~CStencilBuffer(); + + //! clears the zbuffer + virtual void clear(); + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d<u32>& size); + + //! returns the size of the zbuffer + virtual const core::dimension2d<u32>& getSize() const; + + //! locks the zbuffer + virtual void* lock() { return (void*) Buffer; } + + //! unlocks the zbuffer + virtual void unlock() {} + + //! returns pitch of depthbuffer (in bytes) + virtual u32 getPitch() const { return Pitch; } + + + private: + + u8* Buffer; + core::dimension2d<u32> Size; + u32 TotalSize; + u32 Pitch; + }; + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp new file mode 100644 index 0000000..812145a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp @@ -0,0 +1,105 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CDummyTransformationSceneNode.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CDummyTransformationSceneNode::CDummyTransformationSceneNode( + ISceneNode* parent, ISceneManager* mgr, s32 id) + : IDummyTransformationSceneNode(parent, mgr, id) +{ + #ifdef _DEBUG + setDebugName("CDummyTransformationSceneNode"); + #endif + + setAutomaticCulling(scene::EAC_OFF); +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CDummyTransformationSceneNode::getBoundingBox() const +{ + return Box; +} + + +//! Returns a reference to the current relative transformation matrix. +//! This is the matrix, this scene node uses instead of scale, translation +//! and rotation. +core::matrix4& CDummyTransformationSceneNode::getRelativeTransformationMatrix() +{ + return RelativeTransformationMatrix; +} + + +//! Returns the relative transformation of the scene node. +core::matrix4 CDummyTransformationSceneNode::getRelativeTransformation() const +{ + return RelativeTransformationMatrix; +} + +//! Creates a clone of this scene node and its children. +ISceneNode* CDummyTransformationSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CDummyTransformationSceneNode* nb = new CDummyTransformationSceneNode(newParent, + newManager, ID); + + nb->cloneMembers(this, newManager); + nb->RelativeTransformationMatrix = RelativeTransformationMatrix; + nb->Box = Box; + + if ( newParent ) + nb->drop(); + return nb; +} + +const core::vector3df& CDummyTransformationSceneNode::getScale() const +{ + os::Printer::log("CDummyTransformationSceneNode::getScale() does not contain the relative transformation.", ELL_DEBUG); + return RelativeScale; +} + +void CDummyTransformationSceneNode::setScale(const core::vector3df& scale) +{ + os::Printer::log("CDummyTransformationSceneNode::setScale() does not affect the relative transformation.", ELL_DEBUG); + RelativeScale = scale; +} + +const core::vector3df& CDummyTransformationSceneNode::getRotation() const +{ + os::Printer::log("CDummyTransformationSceneNode::getRotation() does not contain the relative transformation.", ELL_DEBUG); + return RelativeRotation; +} + +void CDummyTransformationSceneNode::setRotation(const core::vector3df& rotation) +{ + os::Printer::log("CDummyTransformationSceneNode::setRotation() does not affect the relative transformation.", ELL_DEBUG); + RelativeRotation = rotation; +} + +const core::vector3df& CDummyTransformationSceneNode::getPosition() const +{ + os::Printer::log("CDummyTransformationSceneNode::getPosition() does not contain the relative transformation.", ELL_DEBUG); + return RelativeTranslation; +} + +void CDummyTransformationSceneNode::setPosition(const core::vector3df& newpos) +{ + os::Printer::log("CDummyTransformationSceneNode::setPosition() does not affect the relative transformation.", ELL_DEBUG); + RelativeTranslation = newpos; +} + +} // end namespace scene +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.h new file mode 100644 index 0000000..2ad2266 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__ +#define __C_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__ + +#include "IDummyTransformationSceneNode.h" + +namespace irr +{ +namespace scene +{ + + class CDummyTransformationSceneNode : public IDummyTransformationSceneNode + { + public: + + //! constructor + CDummyTransformationSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! Returns a reference to the current relative transformation matrix. + //! This is the matrix, this scene node uses instead of scale, translation + //! and rotation. + virtual core::matrix4& getRelativeTransformationMatrix(); + + //! Returns the relative transformation of the scene node. + virtual core::matrix4 getRelativeTransformation() const; + + //! does nothing. + virtual void render() {} + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_DUMMY_TRANSFORMATION; } + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + + private: + + // TODO: We can add least add some warnings to find troubles faster until we have + // fixed bug id 2318691. + virtual const core::vector3df& getScale() const; + virtual void setScale(const core::vector3df& scale); + virtual const core::vector3df& getRotation() const; + virtual void setRotation(const core::vector3df& rotation); + virtual const core::vector3df& getPosition() const; + virtual void setPosition(const core::vector3df& newpos); + + core::matrix4 RelativeTransformationMatrix; + core::aabbox3d<f32> Box; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp new file mode 100644 index 0000000..fc1b931 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp @@ -0,0 +1,70 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CEmptySceneNode.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CEmptySceneNode::CEmptySceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) +: ISceneNode(parent, mgr, id) +{ + #ifdef _DEBUG + setDebugName("CEmptySceneNode"); + #endif + + setAutomaticCulling(scene::EAC_OFF); +} + + +//! pre render event +void CEmptySceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + SceneManager->registerNodeForRendering(this); + + ISceneNode::OnRegisterSceneNode(); +} + + +//! render +void CEmptySceneNode::render() +{ + // do nothing +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CEmptySceneNode::getBoundingBox() const +{ + return Box; +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CEmptySceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CEmptySceneNode* nb = new CEmptySceneNode(newParent, + newManager, ID); + + nb->cloneMembers(this, newManager); + nb->Box = Box; + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // end namespace scene +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.h new file mode 100644 index 0000000..cbd8971 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.h @@ -0,0 +1,46 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_EMPTY_SCENE_NODE_H_INCLUDED__ +#define __C_EMPTY_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + + class CEmptySceneNode : public ISceneNode + { + public: + + //! constructor + CEmptySceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! This method is called just before the rendering process of the whole scene. + virtual void OnRegisterSceneNode(); + + //! does nothing. + virtual void render(); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_EMPTY; } + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + private: + + core::aabbox3d<f32> Box; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.cpp new file mode 100644 index 0000000..3bbf3af --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.cpp @@ -0,0 +1,76 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CFPSCounter.h" +#include "irrMath.h" + +namespace irr +{ +namespace video +{ + + +CFPSCounter::CFPSCounter() +: FPS(60), Primitive(0), StartTime(0), FramesCounted(0), + PrimitivesCounted(0), PrimitiveAverage(0), PrimitiveTotal(0) +{ + +} + + +//! returns current fps +s32 CFPSCounter::getFPS() const +{ + return FPS; +} + + +//! returns current primitive count +u32 CFPSCounter::getPrimitive() const +{ + return Primitive; +} + + +//! returns average primitive count of last period +u32 CFPSCounter::getPrimitiveAverage() const +{ + return PrimitiveAverage; +} + + +//! returns accumulated primitive count since start +u32 CFPSCounter::getPrimitiveTotal() const +{ + return PrimitiveTotal; +} + + +//! to be called every frame +void CFPSCounter::registerFrame(u32 now, u32 primitivesDrawn) +{ + ++FramesCounted; + PrimitiveTotal += primitivesDrawn; + PrimitivesCounted += primitivesDrawn; + Primitive = primitivesDrawn; + + const u32 milliseconds = now - StartTime; + + if (milliseconds >= 1500 ) + { + const f32 invMilli = core::reciprocal ( (f32) milliseconds ); + + FPS = core::ceil32 ( ( 1000 * FramesCounted ) * invMilli ); + PrimitiveAverage = core::ceil32 ( ( 1000 * PrimitivesCounted ) * invMilli ); + + FramesCounted = 0; + PrimitivesCounted = 0; + StartTime = now; + } +} + + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.h new file mode 100644 index 0000000..ca36527 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CFPSCounter.h @@ -0,0 +1,54 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_FPSCOUNTER_H_INCLUDED__ +#define __C_FPSCOUNTER_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr +{ +namespace video +{ + + +class CFPSCounter +{ +public: + CFPSCounter(); + + //! returns current fps + s32 getFPS() const; + + //! returns primitive count + u32 getPrimitive() const; + + //! returns average primitive count of last period + u32 getPrimitiveAverage() const; + + //! returns accumulated primitive count since start + u32 getPrimitiveTotal() const; + + //! to be called every frame + void registerFrame(u32 now, u32 primitive); + +private: + + s32 FPS; + u32 Primitive; + u32 StartTime; + + u32 FramesCounted; + u32 PrimitivesCounted; + u32 PrimitiveAverage; + u32 PrimitiveTotal; +}; + + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.cpp new file mode 100644 index 0000000..1b8ff4f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.cpp @@ -0,0 +1,165 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CFileList.h" +#include "IrrCompileConfig.h" +#include "irrArray.h" +#include "coreutil.h" + +#include "os.h" + +namespace irr +{ +namespace io +{ + +static const io::path emptyFileListEntry; + +CFileList::CFileList(const io::path& path, bool ignoreCase, bool ignorePaths) + : IgnorePaths(ignorePaths), IgnoreCase(ignoreCase), Path(path) +{ + #ifdef _DEBUG + setDebugName("CFileList"); + #endif + + Path.replace('\\', '/'); +} + +CFileList::~CFileList() +{ + Files.clear(); +} + +u32 CFileList::getFileCount() const +{ + return Files.size(); +} + +void CFileList::sort() +{ + Files.sort(); +} + +const io::path& CFileList::getFileName(u32 index) const +{ + if (index >= Files.size()) + return emptyFileListEntry; + + return Files[index].Name; +} + + +//! Gets the full name of a file in the list, path included, based on an index. +const io::path& CFileList::getFullFileName(u32 index) const +{ + if (index >= Files.size()) + return emptyFileListEntry; + + return Files[index].FullName; +} + +//! adds a file or folder +u32 CFileList::addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id) +{ + SFileListEntry entry; + entry.ID = id ? id : Files.size(); + entry.Offset = offset; + entry.Size = size; + entry.Name = fullPath; + entry.Name.replace('\\', '/'); + entry.IsDirectory = isDirectory; + + // remove trailing slash + if (entry.Name.lastChar() == '/') + { + entry.IsDirectory = true; + entry.Name[entry.Name.size()-1] = 0; + entry.Name.validate(); + } + + if (IgnoreCase) + entry.Name.make_lower(); + + entry.FullName = entry.Name; + + core::deletePathFromFilename(entry.Name); + + if (IgnorePaths) + entry.FullName = entry.Name; + + //os::Printer::log(Path.c_str(), entry.FullName); + + Files.push_back(entry); + + return Files.size() - 1; +} + +//! Returns the ID of a file in the file list, based on an index. +u32 CFileList::getID(u32 index) const +{ + return index < Files.size() ? Files[index].ID : 0; +} + +bool CFileList::isDirectory(u32 index) const +{ + bool ret = false; + if (index < Files.size()) + ret = Files[index].IsDirectory; + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + +//! Returns the size of a file +u32 CFileList::getFileSize(u32 index) const +{ + return index < Files.size() ? Files[index].Size : 0; +} + +//! Returns the size of a file +u32 CFileList::getFileOffset(u32 index) const +{ + return index < Files.size() ? Files[index].Offset : 0; +} + + +//! Searches for a file or folder within the list, returns the index +s32 CFileList::findFile(const io::path& filename, bool isDirectory = false) const +{ + SFileListEntry entry; + // we only need FullName to be set for the search + entry.FullName = filename; + entry.IsDirectory = isDirectory; + + // exchange + entry.FullName.replace('\\', '/'); + + // remove trailing slash + if (entry.FullName.lastChar() == '/') + { + entry.IsDirectory = true; + entry.FullName[entry.FullName.size()-1] = 0; + entry.FullName.validate(); + } + + if (IgnoreCase) + entry.FullName.make_lower(); + + if (IgnorePaths) + core::deletePathFromFilename(entry.FullName); + + return Files.binary_search(entry); +} + + +//! Returns the base path of the file list +const io::path& CFileList::getPath() const +{ + return Path; +} + + +} // end namespace irr +} // end namespace io + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.h new file mode 100644 index 0000000..f1d2ae3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileList.h @@ -0,0 +1,138 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_FILE_LIST_H_INCLUDED__ +#define __C_FILE_LIST_H_INCLUDED__ + +#include "IFileList.h" +#include "irrString.h" +#include "irrArray.h" + + +namespace irr +{ +namespace io +{ + +//! An entry in a list of files, can be a folder or a file. +struct SFileListEntry +{ + //! The name of the file + /** If this is a file or folder in the virtual filesystem and the archive + was created with the ignoreCase flag then the file name will be lower case. */ + io::path Name; + + //! The name of the file including the path + /** If this is a file or folder in the virtual filesystem and the archive was + created with the ignoreDirs flag then it will be the same as Name. */ + io::path FullName; + + //! The size of the file in bytes + u32 Size; + + //! The ID of the file in an archive + /** This is used to link the FileList entry to extra info held about this + file in an archive, which can hold things like data offset and CRC. */ + u32 ID; + + //! FileOffset inside an archive + u32 Offset; + + //! True if this is a folder, false if not. + bool IsDirectory; + + //! The == operator is provided so that CFileList can slowly search the list! + bool operator ==(const struct SFileListEntry& other) const + { + if (IsDirectory != other.IsDirectory) + return false; + + return FullName.equals_ignore_case(other.FullName); + } + + //! The < operator is provided so that CFileList can sort and quickly search the list. + bool operator <(const struct SFileListEntry& other) const + { + if (IsDirectory != other.IsDirectory) + return IsDirectory; + + return FullName.lower_ignore_case(other.FullName); + } +}; + + +//! Implementation of a file list +class CFileList : public IFileList +{ +public: + + // CFileList methods + + //! Constructor + /** \param path The path of this file archive */ + CFileList(const io::path& path, bool ignoreCase, bool ignorePaths); + + //! Destructor + virtual ~CFileList(); + + //! Add as a file or folder to the list + /** \param fullPath The file name including path, up to the root of the file list. + \param isDirectory True if this is a directory rather than a file. + \param offset The offset where the file is stored in an archive + \param size The size of the file in bytes. + \param id The ID of the file in the archive which owns it */ + virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0); + + //! Sorts the file list. You should call this after adding any items to the file list + virtual void sort(); + + //! Returns the amount of files in the filelist. + virtual u32 getFileCount() const; + + //! Gets the name of a file in the list, based on an index. + virtual const io::path& getFileName(u32 index) const; + + //! Gets the full name of a file in the list, path included, based on an index. + virtual const io::path& getFullFileName(u32 index) const; + + //! Returns the ID of a file in the file list, based on an index. + virtual u32 getID(u32 index) const; + + //! Returns true if the file is a directory + virtual bool isDirectory(u32 index) const; + + //! Returns the size of a file + virtual u32 getFileSize(u32 index) const; + + //! Returns the offest of a file + virtual u32 getFileOffset(u32 index) const; + + //! Searches for a file or folder within the list, returns the index + virtual s32 findFile(const io::path& filename, bool isFolder) const; + + //! Returns the base path of the file list + virtual const io::path& getPath() const; + +protected: + + //! Ignore paths when adding or searching for files + bool IgnorePaths; + + //! Ignore case when adding or searching for files + bool IgnoreCase; + + //! Path to the file list + io::path Path; + + //! List of files + core::array<SFileListEntry> Files; +}; + + +} // end namespace irr +} // end namespace io + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.cpp new file mode 100644 index 0000000..0358480 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.cpp @@ -0,0 +1,1078 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#include "CFileSystem.h" +#include "IReadFile.h" +#include "IWriteFile.h" +#include "CZipReader.h" +#include "CMountPointReader.h" +#include "CPakReader.h" +#include "CNPKReader.h" +#include "CTarReader.h" +#include "CWADReader.h" +#include "CFileList.h" +#include "CXMLReader.h" +#include "CXMLWriter.h" +#include "stdio.h" +#include "os.h" +#include "CAttributes.h" +#include "CMemoryFile.h" +#include "CLimitReadFile.h" +#include "irrList.h" + +#if defined (_IRR_WINDOWS_API_) + #if !defined ( _WIN32_WCE ) + #include <direct.h> // for _chdir + #include <io.h> // for _access + #include <tchar.h> + #endif +#else + #if (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_)) + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <limits.h> + #include <sys/types.h> + #include <dirent.h> + #include <sys/stat.h> + #include <unistd.h> + #endif +#endif + +namespace irr +{ +namespace io +{ + +//! constructor +CFileSystem::CFileSystem() +{ + #ifdef _DEBUG + setDebugName("CFileSystem"); + #endif + + setFileListSystem(FILESYSTEM_NATIVE); + //! reset current working directory + getWorkingDirectory(); + +#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderPAK(this)); +#endif + +#ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderNPK(this)); +#endif + +#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderTAR(this)); +#endif + +#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderWAD(this)); +#endif + +#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderMount(this)); +#endif + +#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ + ArchiveLoader.push_back(new CArchiveLoaderZIP(this)); +#endif + +} + + +//! destructor +CFileSystem::~CFileSystem() +{ + u32 i; + + for ( i=0; i < FileArchives.size(); ++i) + { + FileArchives[i]->drop(); + } + + for ( i=0; i < ArchiveLoader.size(); ++i) + { + ArchiveLoader[i]->drop(); + } +} + + +//! opens a file for read access +IReadFile* CFileSystem::createAndOpenFile(const io::path& filename) +{ + IReadFile* file = 0; + u32 i; + + for (i=0; i< FileArchives.size(); ++i) + { + file = FileArchives[i]->createAndOpenFile(filename); + if (file) + return file; + } + + // Create the file using an absolute path so that it matches + // the scheme used by CNullDriver::getTexture(). + return createReadFile(getAbsolutePath(filename)); +} + + +//! Creates an IReadFile interface for treating memory like a file. +IReadFile* CFileSystem::createMemoryReadFile(void* memory, s32 len, + const io::path& fileName, bool deleteMemoryWhenDropped) +{ + if (!memory) + return 0; + else + return new CMemoryFile(memory, len, fileName, deleteMemoryWhenDropped); + } + + +//! Creates an IReadFile interface for reading files inside files +IReadFile* CFileSystem::createLimitReadFile(const io::path& fileName, + IReadFile* alreadyOpenedFile, long pos, long areaSize) +{ + if (!alreadyOpenedFile) + return 0; + else + return new CLimitReadFile(alreadyOpenedFile, pos, areaSize, fileName); +} + + +//! Creates an IReadFile interface for treating memory like a file. +IWriteFile* CFileSystem::createMemoryWriteFile(void* memory, s32 len, + const io::path& fileName, bool deleteMemoryWhenDropped) +{ + if (!memory) + return 0; + else + return new CMemoryFile(memory, len, fileName, deleteMemoryWhenDropped); +} + + +//! Opens a file for write access. +IWriteFile* CFileSystem::createAndWriteFile(const io::path& filename, bool append) +{ + return createWriteFile(filename, append); +} + + +//! Adds an external archive loader to the engine. +void CFileSystem::addArchiveLoader(IArchiveLoader* loader) +{ + if (!loader) + return; + + loader->grab(); + ArchiveLoader.push_back(loader); +} + +//! Returns the total number of archive loaders added. +u32 CFileSystem::getArchiveLoaderCount() const +{ + return ArchiveLoader.size(); +} + +//! Gets the archive loader by index. +IArchiveLoader* CFileSystem::getArchiveLoader(u32 index) const +{ + if (index < ArchiveLoader.size()) + return ArchiveLoader[index]; + else + return 0; +} + +//! move the hirarchy of the filesystem. moves sourceIndex relative up or down +bool CFileSystem::moveFileArchive(u32 sourceIndex, s32 relative) +{ + bool r = false; + const s32 dest = (s32) sourceIndex + relative; + const s32 dir = relative < 0 ? -1 : 1; + const s32 sourceEnd = ((s32) FileArchives.size() ) - 1; + IFileArchive *t; + + for (s32 s = (s32) sourceIndex;s != dest; s += dir) + { + if (s < 0 || s > sourceEnd || s + dir < 0 || s + dir > sourceEnd) + continue; + + t = FileArchives[s + dir]; + FileArchives[s + dir] = FileArchives[s]; + FileArchives[s] = t; + r = true; + } + return r; +} + + +//! Adds an archive to the file system. +bool CFileSystem::addFileArchive(const io::path& filename, bool ignoreCase, + bool ignorePaths, E_FILE_ARCHIVE_TYPE archiveType, + const core::stringc& password, + IFileArchive** retArchive) +{ + IFileArchive* archive = 0; + bool ret = false; + + // see if archive is already added + if (changeArchivePassword(filename, password, retArchive)) + return true; + + s32 i; + + // do we know what type it should be? + if (archiveType == EFAT_UNKNOWN || archiveType == EFAT_FOLDER) + { + // try to load archive based on file name + for (i = ArchiveLoader.size()-1; i >=0 ; --i) + { + if (ArchiveLoader[i]->isALoadableFileFormat(filename)) + { + archive = ArchiveLoader[i]->createArchive(filename, ignoreCase, ignorePaths); + if (archive) + break; + } + } + + // try to load archive based on content + if (!archive) + { + io::IReadFile* file = createAndOpenFile(filename); + if (file) + { + for (i = ArchiveLoader.size()-1; i >= 0; --i) + { + file->seek(0); + if (ArchiveLoader[i]->isALoadableFileFormat(file)) + { + file->seek(0); + archive = ArchiveLoader[i]->createArchive(file, ignoreCase, ignorePaths); + if (archive) + break; + } + } + file->drop(); + } + } + } + else + { + // try to open archive based on archive loader type + + io::IReadFile* file = 0; + + for (i = ArchiveLoader.size()-1; i >= 0; --i) + { + if (ArchiveLoader[i]->isALoadableFileFormat(archiveType)) + { + // attempt to open file + if (!file) + file = createAndOpenFile(filename); + + // is the file open? + if (file) + { + // attempt to open archive + file->seek(0); + if (ArchiveLoader[i]->isALoadableFileFormat(file)) + { + file->seek(0); + archive = ArchiveLoader[i]->createArchive(file, ignoreCase, ignorePaths); + if (archive) + break; + } + } + else + { + // couldn't open file + break; + } + } + } + + // if open, close the file + if (file) + file->drop(); + } + + if (archive) + { + FileArchives.push_back(archive); + if (password.size()) + archive->Password=password; + if (retArchive) + *retArchive = archive; + ret = true; + } + else + { + os::Printer::log("Could not create archive for", filename, ELL_ERROR); + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + +// don't expose! +bool CFileSystem::changeArchivePassword(const path& filename, + const core::stringc& password, + IFileArchive** archive) +{ + for (s32 idx = 0; idx < (s32)FileArchives.size(); ++idx) + { + // TODO: This should go into a path normalization method + // We need to check for directory names with trailing slash and without + const path absPath = getAbsolutePath(filename); + const path arcPath = FileArchives[idx]->getFileList()->getPath(); + if ((absPath == arcPath) || ((absPath+_IRR_TEXT("/")) == arcPath)) + { + if (password.size()) + FileArchives[idx]->Password=password; + if (archive) + *archive = FileArchives[idx]; + return true; + } + } + + return false; +} + +bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase, + bool ignorePaths, E_FILE_ARCHIVE_TYPE archiveType, + const core::stringc& password, IFileArchive** retArchive) +{ + if (!file || archiveType == EFAT_FOLDER) + return false; + + if (file) + { + if (changeArchivePassword(file->getFileName(), password, retArchive)) + return true; + + IFileArchive* archive = 0; + s32 i; + + if (archiveType == EFAT_UNKNOWN) + { + // try to load archive based on file name + for (i = ArchiveLoader.size()-1; i >=0 ; --i) + { + if (ArchiveLoader[i]->isALoadableFileFormat(file->getFileName())) + { + archive = ArchiveLoader[i]->createArchive(file, ignoreCase, ignorePaths); + if (archive) + break; + } + } + + // try to load archive based on content + if (!archive) + { + for (i = ArchiveLoader.size()-1; i >= 0; --i) + { + file->seek(0); + if (ArchiveLoader[i]->isALoadableFileFormat(file)) + { + file->seek(0); + archive = ArchiveLoader[i]->createArchive(file, ignoreCase, ignorePaths); + if (archive) + break; + } + } + } + } + else + { + // try to open archive based on archive loader type + for (i = ArchiveLoader.size()-1; i >= 0; --i) + { + if (ArchiveLoader[i]->isALoadableFileFormat(archiveType)) + { + // attempt to open archive + file->seek(0); + if (ArchiveLoader[i]->isALoadableFileFormat(file)) + { + file->seek(0); + archive = ArchiveLoader[i]->createArchive(file, ignoreCase, ignorePaths); + if (archive) + break; + } + } + } + } + + if (archive) + { + FileArchives.push_back(archive); + if (password.size()) + archive->Password=password; + if (retArchive) + *retArchive = archive; + return true; + } + else + { + os::Printer::log("Could not create archive for", file->getFileName(), ELL_ERROR); + } + } + + return false; +} + + +//! Adds an archive to the file system. +bool CFileSystem::addFileArchive(IFileArchive* archive) +{ + for (u32 i=0; i < FileArchives.size(); ++i) + { + if (archive == FileArchives[i]) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + } + FileArchives.push_back(archive); + return true; +} + + +//! removes an archive from the file system. +bool CFileSystem::removeFileArchive(u32 index) +{ + bool ret = false; + if (index < FileArchives.size()) + { + FileArchives[index]->drop(); + FileArchives.erase(index); + ret = true; + } + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! removes an archive from the file system. +bool CFileSystem::removeFileArchive(const io::path& filename) +{ + const path absPath = getAbsolutePath(filename); + for (u32 i=0; i < FileArchives.size(); ++i) + { + if (absPath == FileArchives[i]->getFileList()->getPath()) + return removeFileArchive(i); + } + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; +} + + +//! Removes an archive from the file system. +bool CFileSystem::removeFileArchive(const IFileArchive* archive) +{ + for (u32 i=0; i < FileArchives.size(); ++i) + { + if (archive == FileArchives[i]) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return removeFileArchive(i); + } + } + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; +} + + +//! gets an archive +u32 CFileSystem::getFileArchiveCount() const +{ + return FileArchives.size(); +} + + +IFileArchive* CFileSystem::getFileArchive(u32 index) +{ + return index < getFileArchiveCount() ? FileArchives[index] : 0; +} + + +//! Returns the string of the current working directory +const io::path& CFileSystem::getWorkingDirectory() +{ + EFileSystemType type = FileSystemType; + + if (type != FILESYSTEM_NATIVE) + { + type = FILESYSTEM_VIRTUAL; + } + else + { + #if defined(_IRR_WINDOWS_CE_PLATFORM_) + // does not need this + #elif defined(_IRR_WINDOWS_API_) + fschar_t tmp[_MAX_PATH]; + #if defined(_IRR_WCHAR_FILESYSTEM ) + _wgetcwd(tmp, _MAX_PATH); + WorkingDirectory[FILESYSTEM_NATIVE] = tmp; + WorkingDirectory[FILESYSTEM_NATIVE].replace(L'\\', L'/'); + #else + _getcwd(tmp, _MAX_PATH); + WorkingDirectory[FILESYSTEM_NATIVE] = tmp; + WorkingDirectory[FILESYSTEM_NATIVE].replace('\\', '/'); + #endif + #endif + + #if (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_)) + + // getting the CWD is rather complex as we do not know the size + // so try it until the call was successful + // Note that neither the first nor the second parameter may be 0 according to POSIX + + #if defined(_IRR_WCHAR_FILESYSTEM ) + u32 pathSize=256; + wchar_t *tmpPath = new wchar_t[pathSize]; + while ((pathSize < (1<<16)) && !(wgetcwd(tmpPath,pathSize))) + { + delete [] tmpPath; + pathSize *= 2; + tmpPath = new char[pathSize]; + } + if (tmpPath) + { + WorkingDirectory[FILESYSTEM_NATIVE] = tmpPath; + delete [] tmpPath; + } + #else + u32 pathSize=256; + char *tmpPath = new char[pathSize]; + while ((pathSize < (1<<16)) && !(getcwd(tmpPath,pathSize))) + { + delete [] tmpPath; + pathSize *= 2; + tmpPath = new char[pathSize]; + } + if (tmpPath) + { + WorkingDirectory[FILESYSTEM_NATIVE] = tmpPath; + delete [] tmpPath; + } + #endif + #endif + + WorkingDirectory[type].validate(); + } + + return WorkingDirectory[type]; +} + + +//! Changes the current Working Directory to the given string. +bool CFileSystem::changeWorkingDirectoryTo(const io::path& newDirectory) +{ + bool success=false; + + if (FileSystemType != FILESYSTEM_NATIVE) + { + WorkingDirectory[FILESYSTEM_VIRTUAL] = newDirectory; + // is this empty string constant really intended? + flattenFilename(WorkingDirectory[FILESYSTEM_VIRTUAL], _IRR_TEXT("")); + success = true; + } + else + { + WorkingDirectory[FILESYSTEM_NATIVE] = newDirectory; + +#if defined(_IRR_WINDOWS_CE_PLATFORM_) + success = true; +#elif defined(_MSC_VER) + #if defined(_IRR_WCHAR_FILESYSTEM) + success = (_wchdir(newDirectory.c_str()) == 0); + #else + success = (_chdir(newDirectory.c_str()) == 0); + #endif +#else + #if defined(_IRR_WCHAR_FILESYSTEM) + success = (_wchdir(newDirectory.c_str()) == 0); + #else + success = (chdir(newDirectory.c_str()) == 0); + #endif +#endif + } + + return success; +} + + +io::path CFileSystem::getAbsolutePath(const io::path& filename) const +{ +#if defined(_IRR_WINDOWS_CE_PLATFORM_) + return filename; +#elif defined(_IRR_WINDOWS_API_) + fschar_t *p=0; + fschar_t fpath[_MAX_PATH]; + #if defined(_IRR_WCHAR_FILESYSTEM ) + p = _wfullpath(fpath, filename.c_str(), _MAX_PATH); + core::stringw tmp(p); + tmp.replace(L'\\', L'/'); + #else + p = _fullpath(fpath, filename.c_str(), _MAX_PATH); + core::stringc tmp(p); + tmp.replace('\\', '/'); + #endif + return tmp; +#elif (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_)) + c8* p=0; + c8 fpath[4096]; + fpath[0]=0; + p = realpath(filename.c_str(), fpath); + if (!p) + { + // content in fpath is unclear at this point + if (!fpath[0]) // seems like fpath wasn't altered, use our best guess + { + io::path tmp(filename); + return flattenFilename(tmp); + } + else + return io::path(fpath); + } + if (filename[filename.size()-1]=='/') + return io::path(p)+_IRR_TEXT("/"); + else + return io::path(p); +#else + return io::path(filename); +#endif +} + + +//! returns the directory part of a filename, i.e. all until the first +//! slash or backslash, excluding it. If no directory path is prefixed, a '.' +//! is returned. +io::path CFileSystem::getFileDir(const io::path& filename) const +{ + // find last forward or backslash + s32 lastSlash = filename.findLast('/'); + const s32 lastBackSlash = filename.findLast('\\'); + lastSlash = lastSlash > lastBackSlash ? lastSlash : lastBackSlash; + + if ((u32)lastSlash < filename.size()) + return filename.subString(0, lastSlash); + else + return _IRR_TEXT("."); +} + + +//! returns the base part of a filename, i.e. all except for the directory +//! part. If no directory path is prefixed, the full name is returned. +io::path CFileSystem::getFileBasename(const io::path& filename, bool keepExtension) const +{ + // find last forward or backslash + s32 lastSlash = filename.findLast('/'); + const s32 lastBackSlash = filename.findLast('\\'); + lastSlash = core::max_(lastSlash, lastBackSlash); + + // get number of chars after last dot + s32 end = 0; + if (!keepExtension) + { + // take care to search only after last slash to check only for + // dots in the filename + end = filename.findLast('.'); + if (end == -1 || end < lastSlash) + end=0; + else + end = filename.size()-end; + } + + if ((u32)lastSlash < filename.size()) + return filename.subString(lastSlash+1, filename.size()-lastSlash-1-end); + else if (end != 0) + return filename.subString(0, filename.size()-end); + else + return filename; +} + + +//! flatten a path and file name for example: "/you/me/../." becomes "/you" +io::path& CFileSystem::flattenFilename(io::path& directory, const io::path& root) const +{ + directory.replace('\\', '/'); + if (directory.lastChar() != '/') + directory.append('/'); + + io::path dir; + io::path subdir; + + s32 lastpos = 0; + s32 pos = 0; + bool lastWasRealDir=false; + + while ((pos = directory.findNext('/', lastpos)) >= 0) + { + subdir = directory.subString(lastpos, pos - lastpos + 1); + + if (subdir == _IRR_TEXT("../")) + { + if (lastWasRealDir) + { + deletePathFromPath(dir, 2); + lastWasRealDir=(dir.size()!=0); + } + else + { + dir.append(subdir); + lastWasRealDir=false; + } + } + else if (subdir == _IRR_TEXT("/")) + { + dir = root; + } + else if (subdir != _IRR_TEXT("./")) + { + dir.append(subdir); + lastWasRealDir=true; + } + + lastpos = pos + 1; + } + directory = dir; + return directory; +} + + +//! Get the relative filename, relative to the given directory +path CFileSystem::getRelativeFilename(const path& filename, const path& directory) const +{ + if ( filename.empty() || directory.empty() ) + return filename; + + io::path path1, file, ext; + core::splitFilename(getAbsolutePath(filename), &path1, &file, &ext); + io::path path2(getAbsolutePath(directory)); + core::list<io::path> list1, list2; + path1.split(list1, _IRR_TEXT("/\\"), 2); + path2.split(list2, _IRR_TEXT("/\\"), 2); + u32 i=0; + core::list<io::path>::ConstIterator it1,it2; + it1=list1.begin(); + it2=list2.begin(); + + #if defined (_IRR_WINDOWS_API_) + fschar_t partition1 = 0, partition2 = 0; + io::path prefix1, prefix2; + if ( it1 != list1.end() ) + prefix1 = *it1; + if ( it2 != list2.end() ) + prefix2 = *it2; + if ( prefix1.size() > 1 && prefix1[1] == _IRR_TEXT(':') ) + partition1 = core::locale_lower(prefix1[0]); + if ( prefix2.size() > 1 && prefix2[1] == _IRR_TEXT(':') ) + partition2 = core::locale_lower(prefix2[0]); + + // must have the same prefix or we can't resolve it to a relative filename + if ( partition1 != partition2 ) + { + return filename; + } + #endif + + + for (; i<list1.size() && i<list2.size() +#if defined (_IRR_WINDOWS_API_) + && (io::path(*it1).make_lower()==io::path(*it2).make_lower()) +#else + && (*it1==*it2) +#endif + ; ++i) + { + ++it1; + ++it2; + } + path1=_IRR_TEXT(""); + for (; i<list2.size(); ++i) + path1 += _IRR_TEXT("../"); + while (it1 != list1.end()) + { + path1 += *it1++; + path1 += _IRR_TEXT('/'); + } + path1 += file; + if (ext.size()) + { + path1 += _IRR_TEXT('.'); + path1 += ext; + } + return path1; +} + + +//! Sets the current file systen type +EFileSystemType CFileSystem::setFileListSystem(EFileSystemType listType) +{ + EFileSystemType current = FileSystemType; + FileSystemType = listType; + return current; +} + + +//! Creates a list of files and directories in the current working directory +IFileList* CFileSystem::createFileList() +{ + CFileList* r = 0; + io::path Path = getWorkingDirectory(); + Path.replace('\\', '/'); + if (Path.lastChar() != '/') + Path.append('/'); + + //! Construct from native filesystem + if (FileSystemType == FILESYSTEM_NATIVE) + { + // -------------------------------------------- + //! Windows version + #ifdef _IRR_WINDOWS_API_ + #if !defined ( _WIN32_WCE ) + + r = new CFileList(Path, true, false); + + // TODO: Should be unified once mingw adapts the proper types +#if defined(__GNUC__) + long hFile; //mingw return type declaration +#else + intptr_t hFile; +#endif + + struct _tfinddata_t c_file; + if( (hFile = _tfindfirst( _T("*"), &c_file )) != -1L ) + { + do + { + r->addItem(Path + c_file.name, 0, c_file.size, (_A_SUBDIR & c_file.attrib) != 0, 0); + } + while( _tfindnext( hFile, &c_file ) == 0 ); + + _findclose( hFile ); + } + #endif + + //TODO add drives + //entry.Name = "E:\\"; + //entry.isDirectory = true; + //Files.push_back(entry); + #endif + + // -------------------------------------------- + //! Linux version + #if (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_)) + + + r = new CFileList(Path, false, false); + + r->addItem(Path + _IRR_TEXT(".."), 0, 0, true, 0); + + //! We use the POSIX compliant methods instead of scandir + DIR* dirHandle=opendir(Path.c_str()); + if (dirHandle) + { + struct dirent *dirEntry; + while ((dirEntry=readdir(dirHandle))) + { + u32 size = 0; + bool isDirectory = false; + + if((strcmp(dirEntry->d_name, ".")==0) || + (strcmp(dirEntry->d_name, "..")==0)) + { + continue; + } + struct stat buf; + if (stat(dirEntry->d_name, &buf)==0) + { + size = buf.st_size; + isDirectory = S_ISDIR(buf.st_mode); + } + #if !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__CYGWIN__) + // only available on some systems + else + { + isDirectory = dirEntry->d_type == DT_DIR; + } + #endif + + r->addItem(Path + dirEntry->d_name, 0, size, isDirectory, 0); + } + closedir(dirHandle); + } + #endif + } + else + { + //! create file list for the virtual filesystem + r = new CFileList(Path, false, false); + + //! add relative navigation + SFileListEntry e2; + SFileListEntry e3; + + //! PWD + r->addItem(Path + _IRR_TEXT("."), 0, 0, true, 0); + + //! parent + r->addItem(Path + _IRR_TEXT(".."), 0, 0, true, 0); + + //! merge archives + for (u32 i=0; i < FileArchives.size(); ++i) + { + const IFileList *merge = FileArchives[i]->getFileList(); + + for (u32 j=0; j < merge->getFileCount(); ++j) + { + if (core::isInSameDirectory(Path, merge->getFullFileName(j)) == 0) + { + r->addItem(merge->getFullFileName(j), merge->getFileOffset(j), merge->getFileSize(j), merge->isDirectory(j), 0); + } + } + } + } + + if (r) + r->sort(); + return r; +} + +//! Creates an empty filelist +IFileList* CFileSystem::createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths) +{ + return new CFileList(path, ignoreCase, ignorePaths); +} + + +//! determines if a file exists and would be able to be opened. +bool CFileSystem::existFile(const io::path& filename) const +{ + for (u32 i=0; i < FileArchives.size(); ++i) + if (FileArchives[i]->getFileList()->findFile(filename)!=-1) + return true; + +#if defined(_IRR_WINDOWS_CE_PLATFORM_) +#if defined(_IRR_WCHAR_FILESYSTEM) + HANDLE hFile = CreateFileW(filename.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); +#else + HANDLE hFile = CreateFileW(core::stringw(filename).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); +#endif + if (hFile == INVALID_HANDLE_VALUE) + return false; + else + { + CloseHandle(hFile); + return true; + } +#else + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; +#if defined(_MSC_VER) + #if defined(_IRR_WCHAR_FILESYSTEM) + return (_waccess(filename.c_str(), 0) != -1); + #else + return (_access(filename.c_str(), 0) != -1); + #endif +#elif defined(F_OK) + #if defined(_IRR_WCHAR_FILESYSTEM) + return (_waccess(filename.c_str(), F_OK) != -1); + #else + return (access(filename.c_str(), F_OK) != -1); + #endif +#else + return (access(filename.c_str(), 0) != -1); +#endif +#endif +} + + +//! Creates a XML Reader from a file. +IXMLReader* CFileSystem::createXMLReader(const io::path& filename) +{ + IReadFile* file = createAndOpenFile(filename); + if (!file) + return 0; + + IXMLReader* reader = createXMLReader(file); + file->drop(); + return reader; +} + + +//! Creates a XML Reader from a file. +IXMLReader* CFileSystem::createXMLReader(IReadFile* file) +{ + if (!file) + return 0; + + return createIXMLReader(file); +} + + +//! Creates a XML Reader from a file. +IXMLReaderUTF8* CFileSystem::createXMLReaderUTF8(const io::path& filename) +{ + IReadFile* file = createAndOpenFile(filename); + if (!file) + return 0; + + IXMLReaderUTF8* reader = createIXMLReaderUTF8(file); + file->drop(); + return reader; +} + + +//! Creates a XML Reader from a file. +IXMLReaderUTF8* CFileSystem::createXMLReaderUTF8(IReadFile* file) +{ + if (!file) + return 0; + + return createIXMLReaderUTF8(file); +} + + +//! Creates a XML Writer from a file. +IXMLWriter* CFileSystem::createXMLWriter(const io::path& filename) +{ + IWriteFile* file = createAndWriteFile(filename); + IXMLWriter* writer = 0; + if (file) + { + writer = createXMLWriter(file); + file->drop(); + } + return writer; +} + + +//! Creates a XML Writer from a file. +IXMLWriter* CFileSystem::createXMLWriter(IWriteFile* file) +{ + return new CXMLWriter(file); +} + + +//! creates a filesystem which is able to open files from the ordinary file system, +//! and out of zipfiles, which are able to be added to the filesystem. +IFileSystem* createFileSystem() +{ + return new CFileSystem(); +} + + +//! Creates a new empty collection of attributes, usable for serialization and more. +IAttributes* CFileSystem::createEmptyAttributes(video::IVideoDriver* driver) +{ + return new CAttributes(driver); +} + + +} // end namespace irr +} // end namespace io + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.h new file mode 100644 index 0000000..0af5356 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CFileSystem.h @@ -0,0 +1,173 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_FILE_SYSTEM_H_INCLUDED__ +#define __C_FILE_SYSTEM_H_INCLUDED__ + +#include "IFileSystem.h" +#include "irrArray.h" + +namespace irr +{ +namespace io +{ + + class CZipReader; + class CPakReader; + class CMountPointReader; + +/*! + FileSystem which uses normal files and one zipfile +*/ +class CFileSystem : public IFileSystem +{ +public: + + //! constructor + CFileSystem(); + + //! destructor + virtual ~CFileSystem(); + + //! opens a file for read access + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! Creates an IReadFile interface for accessing memory like a file. + virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const io::path& fileName, bool deleteMemoryWhenDropped = false); + + //! Creates an IReadFile interface for accessing files inside files + virtual IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize); + + //! Creates an IWriteFile interface for accessing memory like a file. + virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const io::path& fileName, bool deleteMemoryWhenDropped=false); + + //! Opens a file for write access. + virtual IWriteFile* createAndWriteFile(const io::path& filename, bool append=false); + + //! Adds an archive to the file system. + virtual bool addFileArchive(const io::path& filename, + bool ignoreCase = true, bool ignorePaths = true, + E_FILE_ARCHIVE_TYPE archiveType = EFAT_UNKNOWN, + const core::stringc& password="", + IFileArchive** retArchive = 0); + + //! Adds an archive to the file system. + virtual bool addFileArchive(IReadFile* file, bool ignoreCase=true, + bool ignorePaths=true, + E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, + const core::stringc& password="", + IFileArchive** retArchive = 0); + + //! Adds an archive to the file system. + virtual bool addFileArchive(IFileArchive* archive); + + //! move the hirarchy of the filesystem. moves sourceIndex relative up or down + virtual bool moveFileArchive(u32 sourceIndex, s32 relative); + + //! Adds an external archive loader to the engine. + virtual void addArchiveLoader(IArchiveLoader* loader); + + //! Returns the total number of archive loaders added. + virtual u32 getArchiveLoaderCount() const; + + //! Gets the archive loader by index. + virtual IArchiveLoader* getArchiveLoader(u32 index) const; + + //! gets the file archive count + virtual u32 getFileArchiveCount() const; + + //! gets an archive + virtual IFileArchive* getFileArchive(u32 index); + + //! removes an archive from the file system. + virtual bool removeFileArchive(u32 index); + + //! removes an archive from the file system. + virtual bool removeFileArchive(const io::path& filename); + + //! Removes an archive from the file system. + virtual bool removeFileArchive(const IFileArchive* archive); + + //! Returns the string of the current working directory + virtual const io::path& getWorkingDirectory(); + + //! Changes the current Working Directory to the string given. + //! The string is operating system dependent. Under Windows it will look + //! like this: "drive:\directory\sudirectory\" + virtual bool changeWorkingDirectoryTo(const io::path& newDirectory); + + //! Converts a relative path to an absolute (unique) path, resolving symbolic links + virtual io::path getAbsolutePath(const io::path& filename) const; + + //! Returns the directory a file is located in. + /** \param filename: The file to get the directory from */ + virtual io::path getFileDir(const io::path& filename) const; + + //! Returns the base part of a filename, i.e. the name without the directory + //! part. If no directory is prefixed, the full name is returned. + /** \param filename: The file to get the basename from */ + virtual io::path getFileBasename(const io::path& filename, bool keepExtension=true) const; + + //! flatten a path and file name for example: "/you/me/../." becomes "/you" + virtual io::path& flattenFilename( io::path& directory, const io::path& root = "/" ) const; + + //! Get the relative filename, relative to the given directory + virtual path getRelativeFilename(const path& filename, const path& directory) const; + + virtual EFileSystemType setFileListSystem(EFileSystemType listType); + + //! Creates a list of files and directories in the current working directory + //! and returns it. + virtual IFileList* createFileList(); + + //! Creates an empty filelist + virtual IFileList* createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths); + + //! determines if a file exists and would be able to be opened. + virtual bool existFile(const io::path& filename) const; + + //! Creates a XML Reader from a file. + virtual IXMLReader* createXMLReader(const io::path& filename); + + //! Creates a XML Reader from a file. + virtual IXMLReader* createXMLReader(IReadFile* file); + + //! Creates a XML Reader from a file. + virtual IXMLReaderUTF8* createXMLReaderUTF8(const io::path& filename); + + //! Creates a XML Reader from a file. + virtual IXMLReaderUTF8* createXMLReaderUTF8(IReadFile* file); + + //! Creates a XML Writer from a file. + virtual IXMLWriter* createXMLWriter(const io::path& filename); + + //! Creates a XML Writer from a file. + virtual IXMLWriter* createXMLWriter(IWriteFile* file); + + //! Creates a new empty collection of attributes, usable for serialization and more. + virtual IAttributes* createEmptyAttributes(video::IVideoDriver* driver); + +private: + + // don't expose, needs refactoring + bool changeArchivePassword(const path& filename, + const core::stringc& password, + IFileArchive** archive = 0); + + //! Currently used FileSystemType + EFileSystemType FileSystemType; + //! WorkingDirectory for Native and Virtual filesystems + io::path WorkingDirectory [2]; + //! currently attached ArchiveLoaders + core::array<IArchiveLoader*> ArchiveLoader; + //! currently attached Archives + core::array<IFileArchive*> FileArchives; +}; + + +} // end namespace irr +} // end namespace io + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.cpp new file mode 100644 index 0000000..5a451cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.cpp @@ -0,0 +1,531 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIButton.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIButton::CGUIButton(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle, bool noclip) +: IGUIButton(environment, parent, id, rectangle), + SpriteBank(0), OverrideFont(0), Image(0), PressedImage(0), + ClickTime(0), HoverTime(0), FocusTime(0), + IsPushButton(false), Pressed(false), + UseAlphaChannel(false), DrawBorder(true), ScaleImage(false) +{ + #ifdef _DEBUG + setDebugName("CGUIButton"); + #endif + setNotClipped(noclip); + + // Initialize the sprites. + for (u32 i=0; i<EGBS_COUNT; ++i) + ButtonSprites[i].Index = -1; + + // This element can be tabbed. + setTabStop(true); + setTabOrder(-1); +} + + +//! destructor +CGUIButton::~CGUIButton() +{ + if (OverrideFont) + OverrideFont->drop(); + + if (Image) + Image->drop(); + + if (PressedImage) + PressedImage->drop(); + + if (SpriteBank) + SpriteBank->drop(); +} + + +//! Sets if the images should be scaled to fit the button +void CGUIButton::setScaleImage(bool scaleImage) +{ + ScaleImage = scaleImage; +} + + +//! Returns whether the button scale the used images +bool CGUIButton::isScalingImage() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ScaleImage; +} + + +//! Sets if the button should use the skin to draw its border +void CGUIButton::setDrawBorder(bool border) +{ + DrawBorder = border; +} + + +void CGUIButton::setSpriteBank(IGUISpriteBank* sprites) +{ + if (sprites) + sprites->grab(); + + if (SpriteBank) + SpriteBank->drop(); + + SpriteBank = sprites; +} + + +void CGUIButton::setSprite(EGUI_BUTTON_STATE state, s32 index, video::SColor color, bool loop) +{ + if (SpriteBank) + { + ButtonSprites[(u32)state].Index = index; + ButtonSprites[(u32)state].Color = color; + ButtonSprites[(u32)state].Loop = loop; + } + else + { + ButtonSprites[(u32)state].Index = -1; + } +} + + +//! called if an event happened. +bool CGUIButton::OnEvent(const SEvent& event) +{ + if (!isEnabled()) + return IGUIElement::OnEvent(event); + + switch(event.EventType) + { + case EET_KEY_INPUT_EVENT: + if (event.KeyInput.PressedDown && + (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)) + { + if (!IsPushButton) + setPressed(true); + else + setPressed(!Pressed); + + return true; + } + if (Pressed && !IsPushButton && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE) + { + setPressed(false); + return true; + } + else + if (!event.KeyInput.PressedDown && Pressed && + (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)) + { + + if (!IsPushButton) + setPressed(false); + + if (Parent) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_BUTTON_CLICKED; + Parent->OnEvent(newEvent); + } + return true; + } + break; + case EET_GUI_EVENT: + if (event.GUIEvent.Caller == this) + { + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + if (!IsPushButton) + setPressed(false); + FocusTime = os::Timer::getTime(); + } + else if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUSED) + { + FocusTime = os::Timer::getTime(); + } + else if (event.GUIEvent.EventType == EGET_ELEMENT_HOVERED || event.GUIEvent.EventType == EGET_ELEMENT_LEFT) + { + HoverTime = os::Timer::getTime(); + } + } + break; + case EET_MOUSE_INPUT_EVENT: + if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) + { + if (Environment->hasFocus(this) && + !AbsoluteClippingRect.isPointInside(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y))) + { + Environment->removeFocus(this); + return false; + } + + if (!IsPushButton) + setPressed(true); + + Environment->setFocus(this); + return true; + } + else + if (event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP) + { + bool wasPressed = Pressed; + + if ( !AbsoluteClippingRect.isPointInside( core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y ) ) ) + { + if (!IsPushButton) + setPressed(false); + return true; + } + + if (!IsPushButton) + setPressed(false); + else + { + setPressed(!Pressed); + } + + if ((!IsPushButton && wasPressed && Parent) || + (IsPushButton && wasPressed != Pressed)) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_BUTTON_CLICKED; + Parent->OnEvent(newEvent); + } + + return true; + } + break; + default: + break; + } + + return Parent ? Parent->OnEvent(event) : false; +} + + +//! draws the element and its children +void CGUIButton::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + video::IVideoDriver* driver = Environment->getVideoDriver(); + + // todo: move sprite up and text down if the pressed state has a sprite + const core::position2di spritePos = AbsoluteRect.getCenter(); + + if (!Pressed) + { + if (DrawBorder) + skin->draw3DButtonPaneStandard(this, AbsoluteRect, &AbsoluteClippingRect); + + if (Image) + { + core::position2d<s32> pos = spritePos; + pos.X -= ImageRect.getWidth() / 2; + pos.Y -= ImageRect.getHeight() / 2; + + driver->draw2DImage(Image, + ScaleImage? AbsoluteRect : + core::recti(pos, ImageRect.getSize()), + ImageRect, &AbsoluteClippingRect, + 0, UseAlphaChannel); + } + } + else + { + if (DrawBorder) + skin->draw3DButtonPanePressed(this, AbsoluteRect, &AbsoluteClippingRect); + + if (PressedImage) + { + core::position2d<s32> pos = spritePos; + pos.X -= PressedImageRect.getWidth() / 2; + pos.Y -= PressedImageRect.getHeight() / 2; + + if (Image == PressedImage && PressedImageRect == ImageRect) + { + pos.X += skin->getSize(EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X); + pos.Y += skin->getSize(EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y); + } + driver->draw2DImage(PressedImage, + ScaleImage? AbsoluteRect : + core::recti(pos, PressedImageRect.getSize()), + PressedImageRect, &AbsoluteClippingRect, + 0, UseAlphaChannel); + } + } + + if (SpriteBank) + { + // pressed / unpressed animation + u32 state = Pressed ? (u32)EGBS_BUTTON_DOWN : (u32)EGBS_BUTTON_UP; + if (ButtonSprites[state].Index != -1) + { + SpriteBank->draw2DSprite(ButtonSprites[state].Index, spritePos, + &AbsoluteClippingRect, ButtonSprites[state].Color, ClickTime, os::Timer::getTime(), + ButtonSprites[state].Loop, true); + } + + // focused / unfocused animation + state = Environment->hasFocus(this) ? (u32)EGBS_BUTTON_FOCUSED : (u32)EGBS_BUTTON_NOT_FOCUSED; + if (ButtonSprites[state].Index != -1) + { + SpriteBank->draw2DSprite(ButtonSprites[state].Index, spritePos, + &AbsoluteClippingRect, ButtonSprites[state].Color, FocusTime, os::Timer::getTime(), + ButtonSprites[state].Loop, true); + } + + // mouse over / off animation + if (isEnabled()) + { + state = Environment->getHovered() == this ? (u32)EGBS_BUTTON_MOUSE_OVER : (u32)EGBS_BUTTON_MOUSE_OFF; + if (ButtonSprites[state].Index != -1) + { + SpriteBank->draw2DSprite(ButtonSprites[state].Index, spritePos, + &AbsoluteClippingRect, ButtonSprites[state].Color, HoverTime, os::Timer::getTime(), + ButtonSprites[state].Loop, true); + } + } + } + + if (Text.size()) + { + IGUIFont* font = getActiveFont(); + + core::rect<s32> rect = AbsoluteRect; + if (Pressed) + { + rect.UpperLeftCorner.X += skin->getSize(EGDS_BUTTON_PRESSED_TEXT_OFFSET_X); + rect.UpperLeftCorner.Y += skin->getSize(EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y); + } + + if (font) + font->draw(Text.c_str(), rect, + skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), + true, true, &AbsoluteClippingRect); + } + + IGUIElement::draw(); +} + + +//! sets another skin independent font. if this is set to zero, the button uses the font of the skin. +void CGUIButton::setOverrideFont(IGUIFont* font) +{ + if (OverrideFont == font) + return; + + if (OverrideFont) + OverrideFont->drop(); + + OverrideFont = font; + + if (OverrideFont) + OverrideFont->grab(); +} + +//! Gets the override font (if any) +IGUIFont * CGUIButton::getOverrideFont() const +{ + return OverrideFont; +} + +//! Get the font which is used right now for drawing +IGUIFont* CGUIButton::getActiveFont() const +{ + if ( OverrideFont ) + return OverrideFont; + IGUISkin* skin = Environment->getSkin(); + if (skin) + return skin->getFont(EGDF_BUTTON); + return 0; +} + +//! Sets an image which should be displayed on the button when it is in normal state. +void CGUIButton::setImage(video::ITexture* image) +{ + if (image) + image->grab(); + if (Image) + Image->drop(); + + Image = image; + if (image) + ImageRect = core::rect<s32>(core::position2d<s32>(0,0), image->getOriginalSize()); + + if (!PressedImage) + setPressedImage(Image); +} + + +//! Sets the image which should be displayed on the button when it is in its normal state. +void CGUIButton::setImage(video::ITexture* image, const core::rect<s32>& pos) +{ + setImage(image); + ImageRect = pos; +} + + +//! Sets an image which should be displayed on the button when it is in pressed state. +void CGUIButton::setPressedImage(video::ITexture* image) +{ + if (image) + image->grab(); + + if (PressedImage) + PressedImage->drop(); + + PressedImage = image; + if (image) + PressedImageRect = core::rect<s32>(core::position2d<s32>(0,0), image->getOriginalSize()); +} + + +//! Sets the image which should be displayed on the button when it is in its pressed state. +void CGUIButton::setPressedImage(video::ITexture* image, const core::rect<s32>& pos) +{ + setPressedImage(image); + PressedImageRect = pos; +} + + +//! Sets if the button should behave like a push button. Which means it +//! can be in two states: Normal or Pressed. With a click on the button, +//! the user can change the state of the button. +void CGUIButton::setIsPushButton(bool isPushButton) +{ + IsPushButton = isPushButton; +} + + +//! Returns if the button is currently pressed +bool CGUIButton::isPressed() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Pressed; +} + + +//! Sets the pressed state of the button if this is a pushbutton +void CGUIButton::setPressed(bool pressed) +{ + if (Pressed != pressed) + { + ClickTime = os::Timer::getTime(); + Pressed = pressed; + } +} + + +//! Returns whether the button is a push button +bool CGUIButton::isPushButton() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsPushButton; +} + + +//! Sets if the alpha channel should be used for drawing images on the button (default is false) +void CGUIButton::setUseAlphaChannel(bool useAlphaChannel) +{ + UseAlphaChannel = useAlphaChannel; +} + + +//! Returns if the alpha channel should be used for drawing images on the button +bool CGUIButton::isAlphaChannelUsed() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return UseAlphaChannel; +} + + +bool CGUIButton::isDrawingBorder() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return DrawBorder; +} + + +//! Writes attributes of the element. +void CGUIButton::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIButton::serializeAttributes(out,options); + + out->addBool ("PushButton", IsPushButton ); + if (IsPushButton) + out->addBool("Pressed", Pressed); + + out->addTexture ("Image", Image); + out->addRect ("ImageRect", ImageRect); + out->addTexture ("PressedImage", PressedImage); + out->addRect ("PressedImageRect", PressedImageRect); + + out->addBool ("UseAlphaChannel", isAlphaChannelUsed()); + out->addBool ("Border", isDrawingBorder()); + out->addBool ("ScaleImage", isScalingImage()); + + // out->addString ("OverrideFont", OverrideFont); +} + + +//! Reads attributes of the element +void CGUIButton::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIButton::deserializeAttributes(in,options); + + IsPushButton = in->getAttributeAsBool("PushButton"); + Pressed = IsPushButton ? in->getAttributeAsBool("Pressed") : false; + + core::rect<s32> rec = in->getAttributeAsRect("ImageRect"); + if (rec.isValid()) + setImage( in->getAttributeAsTexture("Image"), rec); + else + setImage( in->getAttributeAsTexture("Image") ); + + rec = in->getAttributeAsRect("PressedImageRect"); + if (rec.isValid()) + setPressedImage( in->getAttributeAsTexture("PressedImage"), rec); + else + setPressedImage( in->getAttributeAsTexture("PressedImage") ); + + setDrawBorder(in->getAttributeAsBool("Border")); + setUseAlphaChannel(in->getAttributeAsBool("UseAlphaChannel")); + setScaleImage(in->getAttributeAsBool("ScaleImage")); + + // setOverrideFont(in->getAttributeAsString("OverrideFont")); + + updateAbsolutePosition(); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.d new file mode 100644 index 0000000..357d4fb --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.d @@ -0,0 +1,2 @@ +CGUIButton.o: CGUIButton.cpp CGUIButton.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.h new file mode 100644 index 0000000..86e6954 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIButton.h @@ -0,0 +1,143 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_BUTTON_H_INCLUDED__ +#define __C_GUI_BUTTON_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIButton.h" +#include "IGUISpriteBank.h" +#include "SColor.h" + +namespace irr +{ +namespace gui +{ + + class CGUIButton : public IGUIButton + { + public: + + //! constructor + CGUIButton(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle, bool noclip=false); + + //! destructor + virtual ~CGUIButton(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! sets another skin independent font. if this is set to zero, the button uses the font of the skin. + virtual void setOverrideFont(IGUIFont* font=0); + + //! Gets the override font (if any) + virtual IGUIFont* getOverrideFont() const; + + //! Get the font which is used right now for drawing + virtual IGUIFont* getActiveFont() const; + + //! Sets an image which should be displayed on the button when it is in normal state. + virtual void setImage(video::ITexture* image=0); + + //! Sets an image which should be displayed on the button when it is in normal state. + virtual void setImage(video::ITexture* image, const core::rect<s32>& pos); + + //! Sets an image which should be displayed on the button when it is in pressed state. + virtual void setPressedImage(video::ITexture* image=0); + + //! Sets an image which should be displayed on the button when it is in pressed state. + virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos); + + //! Sets the sprite bank used by the button + virtual void setSpriteBank(IGUISpriteBank* bank=0); + + //! Sets the animated sprite for a specific button state + /** \param index: Number of the sprite within the sprite bank, use -1 for no sprite + \param state: State of the button to set the sprite for + \param index: The sprite number from the current sprite bank + \param color: The color of the sprite + */ + virtual void setSprite(EGUI_BUTTON_STATE state, s32 index, + video::SColor color=video::SColor(255,255,255,255), bool loop=false); + + //! Sets if the button should behave like a push button. Which means it + //! can be in two states: Normal or Pressed. With a click on the button, + //! the user can change the state of the button. + virtual void setIsPushButton(bool isPushButton=true); + + //! Checks whether the button is a push button + virtual bool isPushButton() const; + + //! Sets the pressed state of the button if this is a pushbutton + virtual void setPressed(bool pressed=true); + + //! Returns if the button is currently pressed + virtual bool isPressed() const; + + //! Sets if the button should use the skin to draw its border + virtual void setDrawBorder(bool border=true); + + //! Checks if the button face and border are being drawn + virtual bool isDrawingBorder() const; + + //! Sets if the alpha channel should be used for drawing images on the button (default is false) + virtual void setUseAlphaChannel(bool useAlphaChannel=true); + + //! Checks if the alpha channel should be used for drawing images on the button + virtual bool isAlphaChannelUsed() const; + + //! Sets if the button should scale the button images to fit + virtual void setScaleImage(bool scaleImage=true); + + //! Checks whether the button scales the used images + virtual bool isScalingImage() const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + struct ButtonSprite + { + s32 Index; + video::SColor Color; + bool Loop; + }; + + ButtonSprite ButtonSprites[EGBS_COUNT]; + + IGUISpriteBank* SpriteBank; + IGUIFont* OverrideFont; + + video::ITexture* Image; + video::ITexture* PressedImage; + + core::rect<s32> ImageRect; + core::rect<s32> PressedImageRect; + + u32 ClickTime, HoverTime, FocusTime; + + bool IsPushButton; + bool Pressed; + bool UseAlphaChannel; + bool DrawBorder; + bool ScaleImage; + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_BUTTON_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.cpp new file mode 100644 index 0000000..6a38a28 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.cpp @@ -0,0 +1,205 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUICheckBox.h" + +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUICheckBox::CGUICheckBox(bool checked, IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) +: IGUICheckBox(environment, parent, id, rectangle), checkTime(0), Pressed(false), Checked(checked) +{ + #ifdef _DEBUG + setDebugName("CGUICheckBox"); + #endif + + // this element can be tabbed into + setTabStop(true); + setTabOrder(-1); +} + + +//! called if an event happened. +bool CGUICheckBox::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + switch(event.EventType) + { + case EET_KEY_INPUT_EVENT: + if (event.KeyInput.PressedDown && + (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)) + { + Pressed = true; + return true; + } + else + if (Pressed && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE) + { + Pressed = false; + return true; + } + else + if (!event.KeyInput.PressedDown && Pressed && + (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)) + { + Pressed = false; + if (Parent) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + Checked = !Checked; + newEvent.GUIEvent.EventType = EGET_CHECKBOX_CHANGED; + Parent->OnEvent(newEvent); + } + return true; + } + break; + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + if (event.GUIEvent.Caller == this) + Pressed = false; + } + break; + case EET_MOUSE_INPUT_EVENT: + if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) + { + Pressed = true; + checkTime = os::Timer::getTime(); + Environment->setFocus(this); + return true; + } + else + if (event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP) + { + bool wasPressed = Pressed; + Environment->removeFocus(this); + Pressed = false; + + if (wasPressed && Parent) + { + if ( !AbsoluteClippingRect.isPointInside( core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y) ) ) + { + Pressed = false; + return true; + } + + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + Checked = !Checked; + newEvent.GUIEvent.EventType = EGET_CHECKBOX_CHANGED; + Parent->OnEvent(newEvent); + } + + return true; + } + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +//! draws the element and its children +void CGUICheckBox::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + if (skin) + { + const s32 height = skin->getSize(EGDS_CHECK_BOX_WIDTH); + + core::rect<s32> checkRect(AbsoluteRect.UpperLeftCorner.X, + ((AbsoluteRect.getHeight() - height) / 2) + AbsoluteRect.UpperLeftCorner.Y, + 0, 0); + + checkRect.LowerRightCorner.X = checkRect.UpperLeftCorner.X + height; + checkRect.LowerRightCorner.Y = checkRect.UpperLeftCorner.Y + height; + + EGUI_DEFAULT_COLOR col = EGDC_GRAY_EDITABLE; + if ( isEnabled() ) + col = Pressed ? EGDC_FOCUSED_EDITABLE : EGDC_EDITABLE; + skin->draw3DSunkenPane(this, skin->getColor(col), + false, true, checkRect, &AbsoluteClippingRect); + + if (Checked) + { + skin->drawIcon(this, EGDI_CHECK_BOX_CHECKED, checkRect.getCenter(), + checkTime, os::Timer::getTime(), false, &AbsoluteClippingRect); + } + if (Text.size()) + { + checkRect = AbsoluteRect; + checkRect.UpperLeftCorner.X += height + 5; + + IGUIFont* font = skin->getFont(); + if (font) + { + font->draw(Text.c_str(), checkRect, + skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), false, true, &AbsoluteClippingRect); + } + } + } + IGUIElement::draw(); +} + + +//! set if box is checked +void CGUICheckBox::setChecked(bool checked) +{ + Checked = checked; +} + + +//! returns if box is checked +bool CGUICheckBox::isChecked() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Checked; +} + + +//! Writes attributes of the element. +void CGUICheckBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUICheckBox::serializeAttributes(out,options); + out->addBool("Checked", Checked); +} + + +//! Reads attributes of the element +void CGUICheckBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + Checked = in->getAttributeAsBool ("Checked"); + + IGUICheckBox::deserializeAttributes(in,options); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.d new file mode 100644 index 0000000..10b995d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.d @@ -0,0 +1,2 @@ +CGUICheckBox.o: CGUICheckBox.cpp CGUICheckBox.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.h new file mode 100644 index 0000000..09ed36b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUICheckBox.h @@ -0,0 +1,55 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_CHECKBOX_H_INCLUDED__ +#define __C_GUI_CHECKBOX_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUICheckBox.h" + +namespace irr +{ +namespace gui +{ + + class CGUICheckBox : public IGUICheckBox + { + public: + + //! constructor + CGUICheckBox(bool checked, IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle); + + //! set if box is checked + virtual void setChecked(bool checked); + + //! returns if box is checked + virtual bool isChecked() const; + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + u32 checkTime; + bool Pressed; + bool Checked; + }; + +} // end namespace gui +} // end namespace irr + +#endif // __C_GUI_CHECKBOX_H_INCLUDED__ + +#endif // _IRR_COMPILE_WITH_GUI_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.cpp new file mode 100644 index 0000000..0744ce9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.cpp @@ -0,0 +1,483 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIColorSelectDialog.h" + +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIButton.h" +#include "IGUIStaticText.h" +#include "IGUIFont.h" +#include "IGUISpriteBank.h" +#include "IFileList.h" +#include "os.h" +#include "fast_atof.h" + +namespace irr +{ +namespace gui +{ + +const s32 CSD_WIDTH = 350; +const s32 CSD_HEIGHT = 300; + +namespace +{ + +struct subElementPredefines +{ + const wchar_t *pre; + const wchar_t *init; + const wchar_t *post; + int x, y; + int range_down ,range_up; +}; + +static const subElementPredefines Template [] = +{ + { L"A:", L"0", 0,50,165, 0, 255 }, + { L"R:", L"0", 0,20,205, 0, 255 }, + { L"G:", L"0", 0,20,230, 0, 255 }, + { L"B:", L"0", 0,20,255, 0, 255 }, + { L"H:", L"0", L"°",80,205, 0, 360 }, + { L"S:", L"0", L"%",80,230, 0, 100 }, + { L"L:", L"0", L"%",80,255, 0, 100 }, +}; + +} + +//! constructor +CGUIColorSelectDialog::CGUIColorSelectDialog(const wchar_t* title, IGUIEnvironment* environment, IGUIElement* parent, s32 id) + : IGUIColorSelectDialog(environment, parent, id, + core::rect<s32>((parent->getAbsolutePosition().getWidth()-CSD_WIDTH)/2, + (parent->getAbsolutePosition().getHeight()-CSD_HEIGHT)/2, + (parent->getAbsolutePosition().getWidth()-CSD_WIDTH)/2+CSD_WIDTH, + (parent->getAbsolutePosition().getHeight()-CSD_HEIGHT)/2+CSD_HEIGHT)), + Dragging(false) +{ + #ifdef _DEBUG + IGUIElement::setDebugName("CGUIColorSelectDialog"); + #endif + + Text = title; + + IGUISkin* skin = Environment->getSkin(); + + const s32 buttonw = environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH); + const s32 posx = RelativeRect.getWidth() - buttonw - 4; + + CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), + this, -1, L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close"); + if (skin && skin->getSpriteBank()) + { + CloseButton->setSpriteBank(skin->getSpriteBank()); + CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), skin->getColor(EGDC_WINDOW_SYMBOL)); + CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), skin->getColor(EGDC_WINDOW_SYMBOL)); + } + CloseButton->setSubElement(true); + CloseButton->setTabStop(false); + CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + CloseButton->grab(); + + OKButton = Environment->addButton( + core::rect<s32>(RelativeRect.getWidth()-80, 30, RelativeRect.getWidth()-10, 50), + this, -1, skin ? skin->getDefaultText(EGDT_MSG_BOX_OK) : L"OK"); + OKButton->setSubElement(true); + OKButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + OKButton->grab(); + + CancelButton = Environment->addButton( + core::rect<s32>(RelativeRect.getWidth()-80, 55, RelativeRect.getWidth()-10, 75), + this, -1, skin ? skin->getDefaultText(EGDT_MSG_BOX_CANCEL) : L"Cancel"); + CancelButton->setSubElement(true); + CancelButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + CancelButton->grab(); + + video::IVideoDriver* driver = Environment->getVideoDriver(); + ColorRing.Texture = driver->getTexture ( "#colorring" ); + if ( 0 == ColorRing.Texture ) + { + buildColorRing(core::dimension2d<u32>(128, 128), 1, + Environment->getSkin()->getColor(EGDC_3D_SHADOW)); + } + + core::rect<s32> r(20,20, 0,0); + + ColorRing.Control = Environment->addImage(ColorRing.Texture, r.UpperLeftCorner, true, this); + ColorRing.Control->setSubElement(true); + ColorRing.Control->grab(); + + for ( u32 i = 0; i != sizeof (Template) / sizeof ( subElementPredefines ); ++i ) + { + if ( Template[i].pre ) + { + r.UpperLeftCorner.X = Template[i].x; + r.UpperLeftCorner.Y = Template[i].y; + r.LowerRightCorner.X = r.UpperLeftCorner.X + 15; + r.LowerRightCorner.Y = r.UpperLeftCorner.Y + 20; + IGUIElement *t = Environment->addStaticText(Template[i].pre, r, false, false, this); + t->setSubElement(true); + } + + if ( Template[i].post ) + { + r.UpperLeftCorner.X = Template[i].x + 56; + r.UpperLeftCorner.Y = Template[i].y; + r.LowerRightCorner.X = r.UpperLeftCorner.X + 15; + r.LowerRightCorner.Y = r.UpperLeftCorner.Y + 20; + IGUIElement *t = Environment->addStaticText( Template[i].post, r, false, false, this); + t->setSubElement(true); + } + + r.UpperLeftCorner.X = Template[i].x + 15; + r.UpperLeftCorner.Y = Template[i].y-2; + r.LowerRightCorner.X = r.UpperLeftCorner.X + 40; + r.LowerRightCorner.Y = r.UpperLeftCorner.Y + 20; + + gui::IGUISpinBox* spin = Environment->addSpinBox( Template[i].init, r, true, this); + spin->setSubElement(true); + spin->setDecimalPlaces(0); + spin->setRange((f32)Template[i].range_down, (f32)Template[i].range_up); + spin->grab(); + + Battery.push_back(spin); + } + + bringToFront(CancelButton); + bringToFront(OKButton); +} + + +//! destructor +CGUIColorSelectDialog::~CGUIColorSelectDialog() +{ + if (CloseButton) + CloseButton->drop(); + + if (OKButton) + OKButton->drop(); + + if (CancelButton) + CancelButton->drop(); + + for (u32 i = 0; i != Battery.size(); ++i) + Battery[i]->drop(); + + if (ColorRing.Control) + ColorRing.Control->drop(); +} + + +//! renders a antialiased, colored ring +void CGUIColorSelectDialog::buildColorRing( const core::dimension2d<u32> & dim, s32 supersample, const video::SColor& borderColor ) +{ + const core::dimension2d<u32> d(dim.Width * supersample, dim.Height * supersample); + video::IVideoDriver* driver = Environment->getVideoDriver(); + + video::IImage *RawTexture = driver->createImage(video::ECF_A8R8G8B8, d); + + RawTexture->fill ( 0x00808080 ); + + const s32 radiusOut = ( d.Width / 2 ) - 4; + const s32 fullR2 = radiusOut * radiusOut; + + video::SColorf rgb(0,0,0); + video::SColorHSL hsl; + hsl.Luminance = 50; + hsl.Saturation = 100; + + core::position2d<s32> p; + for ( p.Y = -radiusOut; p.Y <= radiusOut; p.Y += 1 ) + { + s32 y2 = p.Y * p.Y; + + for (p.X = -radiusOut; p.X <= radiusOut; p.X += 1) + { + s32 r2 = y2 + ( p.X * p.X ); + + // test point in circle + s32 testa = r2 - fullR2; + + if ( testa < 0 ) + { + // dotproduct u ( x,y ) * v ( 1, 0 ) = cosinus(a) + + const f32 r = sqrtf((f32) r2); + + // normalize, dotproduct = xnorm + const f32 xn = r == 0.f ? 0.f : -p.X * core::reciprocal(r); + + hsl.Hue = acosf(xn)*core::RADTODEG; + if ( p.Y > 0 ) + hsl.Hue = 360 - hsl.Hue; + hsl.Hue -= 90; + + const f32 rTest = r / radiusOut; +#if 0 + if (rTest < 0.33f) + { + // luminance from 0 to 50 + hsl.Luminance = 50*(rTest/0.33); + hsl.Saturation = 0.f; + hsl.toRGB(rgb); + } + else + if ( rTest < 0.66f ) + { + // saturation from 0 to 100 + hsl.Saturation = 100*(( rTest - 0.33f ) / 0.33f); + hsl.Luminance = 50; + hsl.toRGB(rgb); + } + else + { + // luminance from 50 to 100 + hsl.Luminance = 100*(0.5f + ( ( rTest - 0.66f ) / .66f )); + hsl.Saturation = 100; + hsl.toRGB(rgb); + } + // borders should be slightly transparent + if ( rTest >= 0.95f ) + rgb.a = (1.f-rTest)*20; + else + rgb.a=1.f; +#else + if ( rTest > 0.5f ) + { + hsl.Saturation = 100; + hsl.Luminance = 50; + hsl.toRGB(rgb); + } + // borders should be slightly transparent + if ( rTest < 0.5f ) + rgb.a = 0; + else if ( rTest >= 0.95f ) + rgb.a = (1.f-rTest)*20; + else if ( rTest <= 0.55f ) + rgb.a = (rTest-0.5f)*20; + else + rgb.a=1.f; +#endif + RawTexture->setPixel(4+p.X+radiusOut, 4+p.Y+radiusOut, rgb.toSColor()); + } + } + } + + RawTexture->unlock (); + + if ( supersample > 1 ) + { + video::IImage * filter = driver->createImage(video::ECF_A8R8G8B8, dim ); + RawTexture->copyToScalingBoxFilter(filter); + RawTexture->drop(); + RawTexture = filter; + } + + bool generateMipLevels = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + driver->setTextureCreationFlag( video::ETCF_CREATE_MIP_MAPS, false); + + ColorRing.Texture = driver->addTexture ( "#colorring", RawTexture); + RawTexture->drop(); + + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, generateMipLevels); +} + + +//! called if an event happened. +bool CGUIColorSelectDialog::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case EGET_SPINBOX_CHANGED: + { + for ( u32 i = 0; i!= Battery.size (); ++i ) + { + if ( event.GUIEvent.Caller == Battery[i] ) + { + if (i<4) + { + video::SColor rgb((u32)Battery[0]->getValue(), (u32)Battery[1]->getValue(), + (u32)Battery[2]->getValue(), (u32)Battery[3]->getValue()); + video::SColorHSL hsl; + video::SColorf rgb2(rgb); + hsl.fromRGB(rgb2); + Battery[4]->setValue(hsl.Hue); + Battery[5]->setValue(hsl.Saturation); + Battery[6]->setValue(hsl.Luminance); + } + else + { + video::SColorHSL hsl(Battery[4]->getValue(), Battery[5]->getValue(), + Battery[6]->getValue()); + video::SColorf rgb2; + hsl.toRGB(rgb2); + video::SColor rgb = rgb2.toSColor(); + Battery[1]->setValue((f32)rgb.getRed()); + Battery[2]->setValue((f32)rgb.getGreen()); + Battery[3]->setValue((f32)rgb.getBlue()); + } + } + } + return true; + } + + case EGET_ELEMENT_FOCUS_LOST: + Dragging = false; + break; + case EGET_BUTTON_CLICKED: + if (event.GUIEvent.Caller == CloseButton || + event.GUIEvent.Caller == CancelButton) + { + sendCancelEvent(); + remove(); + return true; + } + else + if (event.GUIEvent.Caller == OKButton) + { + sendSelectedEvent(); + remove(); + return true; + } + break; + + case EGET_LISTBOX_CHANGED: + case EGET_LISTBOX_SELECTED_AGAIN: + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + Dragging = true; + Environment->setFocus(this); + return true; + case EMIE_LMOUSE_LEFT_UP: + Dragging = false; + Environment->removeFocus(this); + return true; + case EMIE_MOUSE_MOVED: + if (Dragging) + { + // gui window should not be dragged outside its parent + if (Parent) + if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || + event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || + event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || + event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) + + return true; + + move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + return true; + } + default: + break; + } + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +//! draws the element and its children +void CGUIColorSelectDialog::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + core::rect<s32> rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), + AbsoluteRect, &AbsoluteClippingRect); + + if (Text.size()) + { + rect.UpperLeftCorner.X += 2; + rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; + + IGUIFont* font = skin->getFont(EGDF_WINDOW); + if (font) + font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, + &AbsoluteClippingRect); + } + + IGUIElement::draw(); + + // draw color selector after the window elements + core::vector2di pos(ColorRing.Control->getAbsolutePosition().UpperLeftCorner); + pos.X += ColorRing.Texture->getOriginalSize().Width/2; + pos.Y += ColorRing.Texture->getOriginalSize().Height/2; +#if 0 + const f32 h = Battery[4]->getValue(); + const f32 s = Battery[5]->getValue(); + const f32 l = Battery[6]->getValue(); + const f32 factor = 58.f*(((s==0)&&(l<50))?(l*0.33f/50):( + (s<100)?((.33f+(s*0.33f/100))):((0.66f+(l-50)*0.33f/50)))); + +#else + const f32 factor = 44; +#endif + pos.X += core::round32(sinf(Battery[4]->getValue()*core::DEGTORAD)*factor); + pos.Y -= core::round32(cosf(Battery[4]->getValue()*core::DEGTORAD)*factor); + Environment->getVideoDriver()->draw2DPolygon(pos, 4, 0xffffffff, 4); +} + + +video::SColor CGUIColorSelectDialog::getColor() +{ + return video::SColor((u32)Battery[0]->getValue(), (u32)Battery[1]->getValue(), + (u32)Battery[2]->getValue(), (u32)Battery[3]->getValue()); +} + +video::SColorHSL CGUIColorSelectDialog::getColorHSL() +{ + return video::SColorHSL(Battery[4]->getValue(), Battery[5]->getValue(), + Battery[6]->getValue()); +} + +//! sends the event that the file has been selected. +void CGUIColorSelectDialog::sendSelectedEvent() +{ + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_FILE_SELECTED; + Parent->OnEvent(event); +} + + +//! sends the event that the file choose process has been canceld +void CGUIColorSelectDialog::sendCancelEvent() +{ + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_FILE_CHOOSE_DIALOG_CANCELLED; + Parent->OnEvent(event); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.d new file mode 100644 index 0000000..f4fe651 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.d @@ -0,0 +1,2 @@ +CGUIColorSelectDialog.o: CGUIColorSelectDialog.cpp \ + CGUIColorSelectDialog.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.h new file mode 100644 index 0000000..7f5cada --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIColorSelectDialog.h @@ -0,0 +1,74 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ +#define __C_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIColorSelectDialog.h" +#include "IGUIButton.h" +#include "IGUISpinBox.h" +#include "IGUIImage.h" +#include "irrArray.h" + + +namespace irr +{ +namespace gui +{ + + class CGUIColorSelectDialog : public IGUIColorSelectDialog + { + public: + + //! constructor + CGUIColorSelectDialog(const wchar_t* title, IGUIEnvironment* environment, IGUIElement* parent, s32 id); + + //! destructor + virtual ~CGUIColorSelectDialog(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + virtual video::SColor getColor(); + virtual video::SColorHSL getColorHSL(); + + private: + + //! sends the event that the file has been selected. + void sendSelectedEvent(); + + //! sends the event that the file choose process has been canceld + void sendCancelEvent(); + + core::position2d<s32> DragStart; + bool Dragging; + IGUIButton* CloseButton; + IGUIButton* OKButton; + IGUIButton* CancelButton; + + core::array<IGUISpinBox*> Battery; + + struct SColorCircle + { + IGUIImage * Control; + video::ITexture * Texture; + }; + SColorCircle ColorRing; + + void buildColorRing( const core::dimension2d<u32> & dim, s32 supersample, const video::SColor& borderColor ); + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.cpp new file mode 100644 index 0000000..44d92e4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.cpp @@ -0,0 +1,523 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIComboBox.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IGUIFont.h" +#include "IGUIButton.h" +#include "CGUIListBox.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIComboBox::CGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle) + : IGUIComboBox(environment, parent, id, rectangle), + ListButton(0), SelectedText(0), ListBox(0), LastFocus(0), + Selected(-1), HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_CENTER), MaxSelectionRows(5), HasFocus(false) +{ + #ifdef _DEBUG + setDebugName("CGUIComboBox"); + #endif + + IGUISkin* skin = Environment->getSkin(); + + s32 width = 15; + if (skin) + width = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + + core::rect<s32> r; + r.UpperLeftCorner.X = rectangle.getWidth() - width - 2; + r.LowerRightCorner.X = rectangle.getWidth() - 2; + + r.UpperLeftCorner.Y = 2; + r.LowerRightCorner.Y = rectangle.getHeight() - 2; + + ListButton = Environment->addButton(r, this, -1, L""); + if (skin && skin->getSpriteBank()) + { + ListButton->setSpriteBank(skin->getSpriteBank()); + ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); + ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); + } + ListButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + ListButton->setSubElement(true); + ListButton->setTabStop(false); + + r.UpperLeftCorner.X = 2; + r.UpperLeftCorner.Y = 2; + r.LowerRightCorner.X = RelativeRect.getWidth() - (ListButton->getAbsolutePosition().getWidth() + 2); + r.LowerRightCorner.Y = RelativeRect.getHeight() - 2; + + SelectedText = Environment->addStaticText(L"", r, false, false, this, -1, false); + SelectedText->setSubElement(true); + SelectedText->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + SelectedText->setTextAlignment(EGUIA_UPPERLEFT, EGUIA_CENTER); + if (skin) + SelectedText->setOverrideColor(skin->getColor(EGDC_BUTTON_TEXT)); + SelectedText->enableOverrideColor(true); + + // this element can be tabbed to + setTabStop(true); + setTabOrder(-1); +} + + +void CGUIComboBox::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) +{ + HAlign = horizontal; + VAlign = vertical; + SelectedText->setTextAlignment(horizontal, vertical); +} + + +//! Set the maximal number of rows for the selection listbox +void CGUIComboBox::setMaxSelectionRows(u32 max) +{ + MaxSelectionRows = max; + + // force recalculation of open listbox + if (ListBox) + { + openCloseMenu(); + openCloseMenu(); + } +} + +//! Get the maximimal number of rows for the selection listbox +u32 CGUIComboBox::getMaxSelectionRows() const +{ + return MaxSelectionRows; +} + + +//! Returns amount of items in box +u32 CGUIComboBox::getItemCount() const +{ + return Items.size(); +} + + +//! returns string of an item. the idx may be a value from 0 to itemCount-1 +const wchar_t* CGUIComboBox::getItem(u32 idx) const +{ + if (idx >= Items.size()) + return 0; + + return Items[idx].Name.c_str(); +} + +//! returns string of an item. the idx may be a value from 0 to itemCount-1 +u32 CGUIComboBox::getItemData(u32 idx) const +{ + if (idx >= Items.size()) + return 0; + + return Items[idx].Data; +} + +//! Returns index based on item data +s32 CGUIComboBox::getIndexForItemData(u32 data ) const +{ + for ( u32 i = 0; i < Items.size (); ++i ) + { + if ( Items[i].Data == data ) + return i; + } + return -1; +} + + +//! Removes an item from the combo box. +void CGUIComboBox::removeItem(u32 idx) +{ + if (idx >= Items.size()) + return; + + if (Selected == (s32)idx) + setSelected(-1); + + Items.erase(idx); +} + + +//! Returns caption of this element. +const wchar_t* CGUIComboBox::getText() const +{ + return getItem(Selected); +} + + +//! adds an item and returns the index of it +u32 CGUIComboBox::addItem(const wchar_t* text, u32 data) +{ + Items.push_back( SComboData ( text, data ) ); + + if (Selected == -1) + setSelected(0); + + return Items.size() - 1; +} + + +//! deletes all items in the combo box +void CGUIComboBox::clear() +{ + Items.clear(); + setSelected(-1); +} + + +//! returns id of selected item. returns -1 if no item is selected. +s32 CGUIComboBox::getSelected() const +{ + return Selected; +} + + +//! sets the selected item. Set this to -1 if no item should be selected +void CGUIComboBox::setSelected(s32 idx) +{ + if (idx < -1 || idx >= (s32)Items.size()) + return; + + Selected = idx; + if (Selected == -1) + SelectedText->setText(L""); + else + SelectedText->setText(Items[Selected].Name.c_str()); +} + + +//! called if an event happened. +bool CGUIComboBox::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + switch(event.EventType) + { + + case EET_KEY_INPUT_EVENT: + if (ListBox && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE) + { + // hide list box + openCloseMenu(); + return true; + } + else + if (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE) + { + if (!event.KeyInput.PressedDown) + { + openCloseMenu(); + } + + ListButton->setPressed(ListBox == 0); + + return true; + } + else + if (event.KeyInput.PressedDown) + { + s32 oldSelected = Selected; + bool absorb = true; + switch (event.KeyInput.Key) + { + case KEY_DOWN: + setSelected(Selected+1); + break; + case KEY_UP: + setSelected(Selected-1); + break; + case KEY_HOME: + case KEY_PRIOR: + setSelected(0); + break; + case KEY_END: + case KEY_NEXT: + setSelected((s32)Items.size()-1); + break; + default: + absorb = false; + } + + if (Selected <0) + setSelected(0); + + if (Selected >= (s32)Items.size()) + setSelected((s32)Items.size() -1); + + if (Selected != oldSelected) + { + sendSelectionChangedEvent(); + return true; + } + + if (absorb) + return true; + } + break; + + case EET_GUI_EVENT: + + switch(event.GUIEvent.EventType) + { + case EGET_ELEMENT_FOCUS_LOST: + if (ListBox && + (Environment->hasFocus(ListBox) || ListBox->isMyChild(event.GUIEvent.Caller) ) && + event.GUIEvent.Element != this && + !isMyChild(event.GUIEvent.Element) && + !ListBox->isMyChild(event.GUIEvent.Element)) + { + openCloseMenu(); + } + break; + case EGET_BUTTON_CLICKED: + if (event.GUIEvent.Caller == ListButton) + { + openCloseMenu(); + return true; + } + break; + case EGET_LISTBOX_SELECTED_AGAIN: + case EGET_LISTBOX_CHANGED: + if (event.GUIEvent.Caller == ListBox) + { + setSelected(ListBox->getSelected()); + if (Selected <0 || Selected >= (s32)Items.size()) + setSelected(-1); + openCloseMenu(); + + sendSelectionChangedEvent(); + } + return true; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + { + core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y); + + // send to list box + if (ListBox && ListBox->isPointInside(p) && ListBox->OnEvent(event)) + return true; + + return true; + } + case EMIE_LMOUSE_LEFT_UP: + { + core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y); + + // send to list box + if (!(ListBox && + ListBox->getAbsolutePosition().isPointInside(p) && + ListBox->OnEvent(event))) + { + openCloseMenu(); + } + return true; + } + case EMIE_MOUSE_WHEEL: + { + s32 oldSelected = Selected; + setSelected( Selected + ((event.MouseInput.Wheel < 0) ? 1 : -1)); + + if (Selected <0) + setSelected(0); + + if (Selected >= (s32)Items.size()) + setSelected((s32)Items.size() -1); + + if (Selected != oldSelected) + { + sendSelectionChangedEvent(); + return true; + } + } + default: + break; + } + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +void CGUIComboBox::sendSelectionChangedEvent() +{ + if (Parent) + { + SEvent event; + + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_COMBO_BOX_CHANGED; + Parent->OnEvent(event); + } +} + + +//! draws the element and its children +void CGUIComboBox::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + IGUIElement *currentFocus = Environment->getFocus(); + if (currentFocus != LastFocus) + { + HasFocus = currentFocus == this || isMyChild(currentFocus); + LastFocus = currentFocus; + } + + // set colors each time as skin-colors can be changed + SelectedText->setBackgroundColor(skin->getColor(EGDC_HIGH_LIGHT)); + if(isEnabled()) + { + SelectedText->setDrawBackground(HasFocus); + SelectedText->setOverrideColor(skin->getColor(HasFocus ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT)); + } + else + { + SelectedText->setDrawBackground(false); + SelectedText->setOverrideColor(skin->getColor(EGDC_GRAY_TEXT)); + } + ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL)); + ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL)); + + + core::rect<s32> frameRect(AbsoluteRect); + + // draw the border + + skin->draw3DSunkenPane(this, skin->getColor(EGDC_3D_HIGH_LIGHT), + true, true, frameRect, &AbsoluteClippingRect); + + // draw children + IGUIElement::draw(); +} + + +void CGUIComboBox::openCloseMenu() +{ + if (ListBox) + { + // close list box + Environment->setFocus(this); + ListBox->remove(); + ListBox = 0; + } + else + { + if (Parent) + Parent->bringToFront(this); + + IGUISkin* skin = Environment->getSkin(); + u32 h = Items.size(); + + if (h > getMaxSelectionRows()) + h = getMaxSelectionRows(); + if (h == 0) + h = 1; + + IGUIFont* font = skin->getFont(); + if (font) + h *= (font->getDimension(L"A").Height + 4); + + // open list box + core::rect<s32> r(0, AbsoluteRect.getHeight(), + AbsoluteRect.getWidth(), AbsoluteRect.getHeight() + h); + + ListBox = new CGUIListBox(Environment, this, -1, r, false, true, true); + ListBox->setSubElement(true); + ListBox->setNotClipped(true); + ListBox->drop(); + + // ensure that list box is always completely visible + if (ListBox->getAbsolutePosition().LowerRightCorner.Y > Environment->getRootGUIElement()->getAbsolutePosition().getHeight()) + ListBox->setRelativePosition( core::rect<s32>(0, -ListBox->getAbsolutePosition().getHeight(), AbsoluteRect.getWidth(), 0) ); + + for (s32 i=0; i<(s32)Items.size(); ++i) + ListBox->addItem(Items[i].Name.c_str()); + + ListBox->setSelected(Selected); + + // set focus + Environment->setFocus(ListBox); + } +} + + +//! Writes attributes of the element. +void CGUIComboBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIComboBox::serializeAttributes(out,options); + + out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); + out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); + out->addInt("MaxSelectionRows", (s32)MaxSelectionRows ); + + out->addInt ("Selected", Selected ); + out->addInt ("ItemCount", Items.size()); + for (u32 i=0; i < Items.size(); ++i) + { + core::stringc s = "Item"; + s += i; + s += "Text"; + out->addString(s.c_str(), Items[i].Name.c_str()); + } +} + + +//! Reads attributes of the element +void CGUIComboBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIComboBox::deserializeAttributes(in,options); + + setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), + (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); + setMaxSelectionRows( (u32)(in->getAttributeAsInt("MaxSelectionRows")) ); + + // clear the list + clear(); + // get item count + u32 c = in->getAttributeAsInt("ItemCount"); + // add items + for (u32 i=0; i < c; ++i) + { + core::stringc s = "Item"; + s += i; + s += "Text"; + addItem(in->getAttributeAsStringW(s.c_str()).c_str(), 0); + } + + setSelected(in->getAttributeAsInt("Selected")); +} + +} // end namespace gui +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.d new file mode 100644 index 0000000..28c1475 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.d @@ -0,0 +1,2 @@ +CGUIComboBox.o: CGUIComboBox.cpp CGUIComboBox.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.h new file mode 100644 index 0000000..3d020ac --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIComboBox.h @@ -0,0 +1,117 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_COMBO_BOX_H_INCLUDED__ +#define __C_GUI_COMBO_BOX_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIComboBox.h" +#include "IGUIStaticText.h" +#include "irrString.h" +#include "irrArray.h" + +namespace irr +{ +namespace gui +{ + class IGUIButton; + class IGUIListBox; + + //! Single line edit box for editing simple text. + class CGUIComboBox : public IGUIComboBox + { + public: + + //! constructor + CGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle); + + //! Returns amount of items in box + virtual u32 getItemCount() const; + + //! returns string of an item. the idx may be a value from 0 to itemCount-1 + virtual const wchar_t* getItem(u32 idx) const; + + //! Returns item data of an item. the idx may be a value from 0 to itemCount-1 + virtual u32 getItemData(u32 idx) const; + + //! Returns index based on item data + virtual s32 getIndexForItemData( u32 data ) const; + + //! adds an item and returns the index of it + virtual u32 addItem(const wchar_t* text, u32 data); + + //! Removes an item from the combo box. + virtual void removeItem(u32 id); + + //! deletes all items in the combo box + virtual void clear(); + + //! returns the text of the currently selected item + virtual const wchar_t* getText() const; + + //! returns id of selected item. returns -1 if no item is selected. + virtual s32 getSelected() const; + + //! sets the selected item. Set this to -1 if no item should be selected + virtual void setSelected(s32 idx); + + //! sets the text alignment of the text part + virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical); + + //! Set the maximal number of rows for the selection listbox + virtual void setMaxSelectionRows(u32 max); + + //! Get the maximimal number of rows for the selection listbox + virtual u32 getMaxSelectionRows() const; + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + void openCloseMenu(); + void sendSelectionChangedEvent(); + + IGUIButton* ListButton; + IGUIStaticText* SelectedText; + IGUIListBox* ListBox; + IGUIElement *LastFocus; + + + struct SComboData + { + SComboData ( const wchar_t * text, u32 data ) + : Name (text), Data ( data ) {} + + core::stringw Name; + u32 Data; + }; + core::array< SComboData > Items; + + s32 Selected; + EGUI_ALIGNMENT HAlign, VAlign; + u32 MaxSelectionRows; + bool HasFocus; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_COMBO_BOX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.cpp new file mode 100644 index 0000000..67631e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.cpp @@ -0,0 +1,869 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIContextMenu.h" + +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "IGUISpriteBank.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + + +//! constructor +CGUIContextMenu::CGUIContextMenu(IGUIEnvironment* environment, + IGUIElement* parent, s32 id, + core::rect<s32> rectangle, bool getFocus, bool allowFocus) + : IGUIContextMenu(environment, parent, id, rectangle), EventParent(0), LastFont(0), + CloseHandling(ECMC_REMOVE), HighLighted(-1), ChangeTime(0), AllowFocus(allowFocus) +{ + #ifdef _DEBUG + setDebugName("CGUIContextMenu"); + #endif + + Pos = rectangle.UpperLeftCorner; + recalculateSize(); + + if (getFocus) + Environment->setFocus(this); + + setNotClipped(true); +} + + +//! destructor +CGUIContextMenu::~CGUIContextMenu() +{ + for (u32 i=0; i<Items.size(); ++i) + if (Items[i].SubMenu) + Items[i].SubMenu->drop(); + + if (LastFont) + LastFont->drop(); +} + +//! set behavior when menus are closed +void CGUIContextMenu::setCloseHandling(ECONTEXT_MENU_CLOSE onClose) +{ + CloseHandling = onClose; +} + +//! get current behavior when the menue will be closed +ECONTEXT_MENU_CLOSE CGUIContextMenu::getCloseHandling() const +{ + return CloseHandling; +} + +//! Returns amount of menu items +u32 CGUIContextMenu::getItemCount() const +{ + return Items.size(); +} + + +//! Adds a menu item. +u32 CGUIContextMenu::addItem(const wchar_t* text, s32 commandId, bool enabled, bool hasSubMenu, bool checked, bool autoChecking) +{ + return insertItem(Items.size(), text, commandId, enabled, hasSubMenu, checked, autoChecking); +} + +//! Insert a menu item at specified position. +u32 CGUIContextMenu::insertItem(u32 idx, const wchar_t* text, s32 commandId, bool enabled, + bool hasSubMenu, bool checked, bool autoChecking) +{ + SItem s; + s.Enabled = enabled; + s.Checked = checked; + s.AutoChecking = autoChecking; + s.Text = text; + s.IsSeparator = (text == 0); + s.SubMenu = 0; + s.CommandId = commandId; + + if (hasSubMenu) + { + s.SubMenu = new CGUIContextMenu(Environment, this, commandId, + core::rect<s32>(0,0,100,100), false, false); + s.SubMenu->setVisible(false); + } + + u32 result = idx; + if ( idx < Items.size() ) + { + Items.insert(s, idx); + } + else + { + Items.push_back(s); + result = Items.size() - 1; + } + + recalculateSize(); + return result; +} + +s32 CGUIContextMenu::findItemWithCommandId(s32 commandId, u32 idxStartSearch) const +{ + for ( u32 i=idxStartSearch; i<Items.size(); ++i ) + { + if ( Items[i].CommandId == commandId ) + { + return (s32)i; + } + } + return -1; +} + +//! Adds a sub menu from an element that already exists. +void CGUIContextMenu::setSubMenu(u32 index, CGUIContextMenu* menu) +{ + if (index >= Items.size()) + return; + + if (menu) + menu->grab(); + if (Items[index].SubMenu) + Items[index].SubMenu->drop(); + + Items[index].SubMenu = menu; + menu->setVisible(false); + + if (Items[index].SubMenu) + { + menu->AllowFocus = false; + if ( Environment->getFocus() == menu ) + { + Environment->setFocus( this ); + } + } + + recalculateSize(); +} + + +//! Adds a separator item to the menu +void CGUIContextMenu::addSeparator() +{ + addItem(0, -1, true, false, false, false); +} + + +//! Returns text of the menu item. +const wchar_t* CGUIContextMenu::getItemText(u32 idx) const +{ + if (idx >= Items.size()) + return 0; + + return Items[idx].Text.c_str(); +} + + +//! Sets text of the menu item. +void CGUIContextMenu::setItemText(u32 idx, const wchar_t* text) +{ + if (idx >= Items.size()) + return; + + Items[idx].Text = text; + recalculateSize(); +} + +//! should the element change the checked status on clicking +void CGUIContextMenu::setItemAutoChecking(u32 idx, bool autoChecking) +{ + if ( idx >= Items.size()) + return; + + Items[idx].AutoChecking = autoChecking; +} + +//! does the element change the checked status on clicking +bool CGUIContextMenu::getItemAutoChecking(u32 idx) const +{ + if (idx >= Items.size()) + return false; + + return Items[idx].AutoChecking; +} + + +//! Returns if a menu item is enabled +bool CGUIContextMenu::isItemEnabled(u32 idx) const +{ + if (idx >= Items.size()) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Items[idx].Enabled; +} + + +//! Returns if a menu item is checked +bool CGUIContextMenu::isItemChecked(u32 idx) const +{ + if (idx >= Items.size()) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Items[idx].Checked; +} + + +//! Sets if the menu item should be enabled. +void CGUIContextMenu::setItemEnabled(u32 idx, bool enabled) +{ + if (idx >= Items.size()) + return; + + Items[idx].Enabled = enabled; +} + + +//! Sets if the menu item should be checked. +void CGUIContextMenu::setItemChecked(u32 idx, bool checked ) +{ + if (idx >= Items.size()) + return; + + Items[idx].Checked = checked; +} + + +//! Removes a menu item +void CGUIContextMenu::removeItem(u32 idx) +{ + if (idx >= Items.size()) + return; + + if (Items[idx].SubMenu) + { + Items[idx].SubMenu->drop(); + Items[idx].SubMenu = 0; + } + + Items.erase(idx); + recalculateSize(); +} + + +//! Removes all menu items +void CGUIContextMenu::removeAllItems() +{ + for (u32 i=0; i<Items.size(); ++i) + if (Items[i].SubMenu) + Items[i].SubMenu->drop(); + + Items.clear(); + recalculateSize(); +} + + +//! called if an event happened. +bool CGUIContextMenu::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case EGET_ELEMENT_FOCUS_LOST: + if (event.GUIEvent.Caller == this && !isMyChild(event.GUIEvent.Element) && AllowFocus) + { + // set event parent of submenus + IGUIElement * p = EventParent ? EventParent : Parent; + setEventParent(p); + + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_ELEMENT_CLOSED; + if ( !p->OnEvent(event) ) + { + if ( CloseHandling & ECMC_HIDE ) + { + setVisible(false); + } + if ( CloseHandling & ECMC_REMOVE ) + { + remove(); + } + } + + return false; + } + break; + case EGET_ELEMENT_FOCUSED: + if (event.GUIEvent.Caller == this && !AllowFocus) + { + return true; + } + break; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_LEFT_UP: + { + // menu might be removed if it loses focus in sendClick, so grab a reference + grab(); + const u32 t = sendClick(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y)); + if ((t==0 || t==1) && Environment->hasFocus(this)) + Environment->removeFocus(this); + drop(); + } + return true; + case EMIE_LMOUSE_PRESSED_DOWN: + return true; + case EMIE_MOUSE_MOVED: + if (Environment->hasFocus(this)) + highlight(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y), true); + return true; + default: + break; + } + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +//! Sets the visible state of this element. +void CGUIContextMenu::setVisible(bool visible) +{ + HighLighted = -1; + ChangeTime = os::Timer::getTime(); + for (u32 j=0; j<Items.size(); ++j) + if (Items[j].SubMenu) + Items[j].SubMenu->setVisible(false); + + IGUIElement::setVisible(visible); +} + + +//! sends a click Returns: +//! 0 if click went outside of the element, +//! 1 if a valid button was clicked, +//! 2 if a nonclickable element was clicked +u32 CGUIContextMenu::sendClick(const core::position2d<s32>& p) +{ + u32 t = 0; + + // get number of open submenu + s32 openmenu = -1; + s32 j; + for (j=0; j<(s32)Items.size(); ++j) + if (Items[j].SubMenu && Items[j].SubMenu->isVisible()) + { + openmenu = j; + break; + } + + // delegate click operation to submenu + if (openmenu != -1) + { + t = Items[j].SubMenu->sendClick(p); + if (t != 0) + return t; // clicked something + } + + // check click on myself + if (isPointInside(p) && + (u32)HighLighted < Items.size()) + { + if (!Items[HighLighted].Enabled || + Items[HighLighted].IsSeparator || + Items[HighLighted].SubMenu) + return 2; + + if ( Items[HighLighted].AutoChecking ) + { + Items[HighLighted].Checked = Items[HighLighted].Checked ? false : true; + } + + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_MENU_ITEM_SELECTED; + if (EventParent) + EventParent->OnEvent(event); + else if (Parent) + Parent->OnEvent(event); + + return 1; + } + + return 0; +} + + +//! returns true, if an element was highligted +bool CGUIContextMenu::highlight(const core::position2d<s32>& p, bool canOpenSubMenu) +{ + if (!isEnabled()) + { + return false; + } + + // get number of open submenu + s32 openmenu = -1; + s32 i; + for (i=0; i<(s32)Items.size(); ++i) + if (Items[i].Enabled && Items[i].SubMenu && Items[i].SubMenu->isVisible()) + { + openmenu = i; + break; + } + + // delegate highlight operation to submenu + if (openmenu != -1) + { + if (Items[openmenu].Enabled && Items[openmenu].SubMenu->highlight(p, canOpenSubMenu)) + { + HighLighted = openmenu; + ChangeTime = os::Timer::getTime(); + return true; + } + } + + // highlight myself + for (i=0; i<(s32)Items.size(); ++i) + { + if (Items[i].Enabled && getHRect(Items[i], AbsoluteRect).isPointInside(p)) + { + HighLighted = i; + ChangeTime = os::Timer::getTime(); + + // make submenus visible/invisible + for (s32 j=0; j<(s32)Items.size(); ++j) + if (Items[j].SubMenu) + { + if ( j == i && canOpenSubMenu && Items[j].Enabled ) + Items[j].SubMenu->setVisible(true); + else if ( j != i ) + Items[j].SubMenu->setVisible(false); + } + return true; + } + } + + HighLighted = openmenu; + return false; +} + + +//! returns the item highlight-area +core::rect<s32> CGUIContextMenu::getHRect(const SItem& i, const core::rect<s32>& absolute) const +{ + core::rect<s32> r = absolute; + r.UpperLeftCorner.Y += i.PosY; + r.LowerRightCorner.Y = r.UpperLeftCorner.Y + i.Dim.Height; + return r; +} + + +//! Gets drawing rect of Item +core::rect<s32> CGUIContextMenu::getRect(const SItem& i, const core::rect<s32>& absolute) const +{ + core::rect<s32> r = absolute; + r.UpperLeftCorner.Y += i.PosY; + r.LowerRightCorner.Y = r.UpperLeftCorner.Y + i.Dim.Height; + r.UpperLeftCorner.X += 20; + return r; +} + + +//! draws the element and its children +void CGUIContextMenu::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + + if (!skin) + return; + + IGUIFont* font = skin->getFont(EGDF_MENU); + if (font != LastFont) + { + if (LastFont) + LastFont->drop(); + LastFont = font; + if (LastFont) + LastFont->grab(); + + recalculateSize(); + } + + IGUISpriteBank* sprites = skin->getSpriteBank(); + + core::rect<s32> rect = AbsoluteRect; + core::rect<s32>* clip = 0; + + // draw frame + skin->draw3DMenuPane(this, AbsoluteRect, clip); + + // loop through all menu items + + rect = AbsoluteRect; + s32 y = AbsoluteRect.UpperLeftCorner.Y; + + for (s32 i=0; i<(s32)Items.size(); ++i) + { + if (Items[i].IsSeparator) + { + // draw separator + rect = AbsoluteRect; + rect.UpperLeftCorner.Y += Items[i].PosY + 3; + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1; + rect.UpperLeftCorner.X += 5; + rect.LowerRightCorner.X -= 5; + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_SHADOW), rect, clip); + + rect.LowerRightCorner.Y += 1; + rect.UpperLeftCorner.Y += 1; + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + + y += 10; + } + else + { + rect = getRect(Items[i], AbsoluteRect); + + // draw highlighted + + if (i == HighLighted && Items[i].Enabled) + { + core::rect<s32> r = AbsoluteRect; + r.LowerRightCorner.Y = rect.LowerRightCorner.Y; + r.UpperLeftCorner.Y = rect.UpperLeftCorner.Y; + r.LowerRightCorner.X -= 5; + r.UpperLeftCorner.X += 5; + skin->draw2DRectangle(this, skin->getColor(EGDC_HIGH_LIGHT), r, clip); + } + + // draw text + + EGUI_DEFAULT_COLOR c = EGDC_BUTTON_TEXT; + + if (i == HighLighted) + c = EGDC_HIGH_LIGHT_TEXT; + + if (!Items[i].Enabled) + c = EGDC_GRAY_TEXT; + + if (font) + font->draw(Items[i].Text.c_str(), rect, + skin->getColor(c), false, true, clip); + + // draw submenu symbol + if (Items[i].SubMenu && sprites) + { + core::rect<s32> r = rect; + r.UpperLeftCorner.X = r.LowerRightCorner.X - 15; + + sprites->draw2DSprite(skin->getIcon(EGDI_CURSOR_RIGHT), + r.getCenter(), clip, skin->getColor(c), + (i == HighLighted) ? ChangeTime : 0, + (i == HighLighted) ? os::Timer::getTime() : 0, + (i == HighLighted), true); + } + + // draw checked symbol + if (Items[i].Checked && sprites) + { + core::rect<s32> r = rect; + r.LowerRightCorner.X = r.UpperLeftCorner.X - 15; + r.UpperLeftCorner.X = r.LowerRightCorner.X + 15; + sprites->draw2DSprite(skin->getIcon(EGDI_CHECK_BOX_CHECKED), + r.getCenter(), clip, skin->getColor(c), + (i == HighLighted) ? ChangeTime : 0, + (i == HighLighted) ? os::Timer::getTime() : 0, + (i == HighLighted), true); + } + } + } + + IGUIElement::draw(); +} + + +void CGUIContextMenu::recalculateSize() +{ + IGUIFont* font = Environment->getSkin()->getFont(EGDF_MENU); + + if (!font) + return; + + core::rect<s32> rect; + rect.UpperLeftCorner = RelativeRect.UpperLeftCorner; + u32 width = 100; + u32 height = 3; + + u32 i; + for (i=0; i<Items.size(); ++i) + { + if (Items[i].IsSeparator) + { + Items[i].Dim.Width = 100; + Items[i].Dim.Height = 10; + } + else + { + Items[i].Dim = font->getDimension(Items[i].Text.c_str()); + Items[i].Dim.Width += 40; + + if (Items[i].Dim.Width > width) + width = Items[i].Dim.Width; + } + + Items[i].PosY = height; + height += Items[i].Dim.Height; + } + + height += 5; + + if (height < 10) + height = 10; + + rect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + width; + rect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + height; + + setRelativePosition(rect); + + // recalculate submenus + for (i=0; i<Items.size(); ++i) + { + if (Items[i].SubMenu) + { + // move submenu + const s32 w = Items[i].SubMenu->getAbsolutePosition().getWidth(); + const s32 h = Items[i].SubMenu->getAbsolutePosition().getHeight(); + + core::rect<s32> subRect(width-5, Items[i].PosY, width+w-5, Items[i].PosY+h); + + // if it would be drawn beyond the right border, then add it to the left side + gui::IGUIElement * root = Environment->getRootGUIElement(); + if ( root ) + { + core::rect<s32> rectRoot( root->getAbsolutePosition() ); + if ( getAbsolutePosition().UpperLeftCorner.X+subRect.LowerRightCorner.X > rectRoot.LowerRightCorner.X ) + { + subRect.UpperLeftCorner.X = -w; + subRect.LowerRightCorner.X = 0; + } + } + + Items[i].SubMenu->setRelativePosition(subRect); + } + } +} + + +//! Returns the selected item in the menu +s32 CGUIContextMenu::getSelectedItem() const +{ + return HighLighted; +} + + +//! \return Returns a pointer to the submenu of an item. +IGUIContextMenu* CGUIContextMenu::getSubMenu(u32 idx) const +{ + if (idx >= Items.size()) + return 0; + + return Items[idx].SubMenu; +} + + +//! Returns command id of a menu item +s32 CGUIContextMenu::getItemCommandId(u32 idx) const +{ + if (idx >= Items.size()) + return -1; + + return Items[idx].CommandId; +} + + +//! Sets the command id of a menu item +void CGUIContextMenu::setItemCommandId(u32 idx, s32 id) +{ + if (idx >= Items.size()) + return; + + Items[idx].CommandId = id; +} + + +//! Writes attributes of the element. +void CGUIContextMenu::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIElement::serializeAttributes(out,options); + out->addPosition2d("Position", Pos); + + if (Parent->getType() == EGUIET_CONTEXT_MENU || Parent->getType() == EGUIET_MENU ) + { + const IGUIContextMenu* const ptr = (const IGUIContextMenu*)Parent; + // find the position of this item in its parent's list + u32 i; + // VC6 needs the cast for this + for (i=0; (i<ptr->getItemCount()) && (ptr->getSubMenu(i) != (const IGUIContextMenu*)this); ++i) + ; // do nothing + + out->addInt("ParentItem", i); + } + + out->addInt("CloseHandling", (s32)CloseHandling); + + // write out the item list + out->addInt("ItemCount", Items.size()); + + core::stringc tmp; + + for (u32 i=0; i < Items.size(); ++i) + { + tmp = "IsSeparator"; tmp += i; + out->addBool(tmp.c_str(), Items[i].IsSeparator); + + if (!Items[i].IsSeparator) + { + tmp = "Text"; tmp += i; + out->addString(tmp.c_str(), Items[i].Text.c_str()); + tmp = "CommandID"; tmp += i; + out->addInt(tmp.c_str(), Items[i].CommandId); + tmp = "Enabled"; tmp += i; + out->addBool(tmp.c_str(), Items[i].Enabled); + tmp = "Checked"; tmp += i; + out->addBool(tmp.c_str(), Items[i].Checked); + tmp = "AutoChecking"; tmp += i; + out->addBool(tmp.c_str(), Items[i].AutoChecking); + } + } +} + + +//! Reads attributes of the element +void CGUIContextMenu::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIElement::deserializeAttributes(in,options); + + Pos = in->getAttributeAsPosition2d("Position"); + + // link to this item's parent + if (Parent && ( Parent->getType() == EGUIET_CONTEXT_MENU || Parent->getType() == EGUIET_MENU ) ) + ((CGUIContextMenu*)Parent)->setSubMenu(in->getAttributeAsInt("ParentItem"),this); + + CloseHandling = (ECONTEXT_MENU_CLOSE)in->getAttributeAsInt("CloseHandling"); + + removeAllItems(); + + // read the item list + const s32 count = in->getAttributeAsInt("ItemCount"); + + for (s32 i=0; i<count; ++i) + { + core::stringc tmp; + core::stringw txt; + s32 commandid=-1; + bool enabled=true; + bool checked=false; + bool autochecking=false; + + tmp = "IsSeparator"; tmp += i; + if ( in->existsAttribute(tmp.c_str()) && in->getAttributeAsBool(tmp.c_str()) ) + addSeparator(); + else + { + tmp = "Text"; tmp += i; + if ( in->existsAttribute(tmp.c_str()) ) + txt = in->getAttributeAsStringW(tmp.c_str()); + + tmp = "CommandID"; tmp += i; + if ( in->existsAttribute(tmp.c_str()) ) + commandid = in->getAttributeAsInt(tmp.c_str()); + + tmp = "Enabled"; tmp += i; + if ( in->existsAttribute(tmp.c_str()) ) + enabled = in->getAttributeAsBool(tmp.c_str()); + + tmp = "Checked"; tmp += i; + if ( in->existsAttribute(tmp.c_str()) ) + checked = in->getAttributeAsBool(tmp.c_str()); + + tmp = "AutoChecking"; tmp += i; + if ( in->existsAttribute(tmp.c_str()) ) + autochecking = in->getAttributeAsBool(tmp.c_str()); + + addItem(core::stringw(txt.c_str()).c_str(), commandid, enabled, false, checked, autochecking); + } + } + + recalculateSize(); +} + + +// because sometimes the element has no parent at click time +void CGUIContextMenu::setEventParent(IGUIElement *parent) +{ + EventParent = parent; + + for (u32 i=0; i<Items.size(); ++i) + if (Items[i].SubMenu) + Items[i].SubMenu->setEventParent(parent); +} + + +bool CGUIContextMenu::hasOpenSubMenu() const +{ + for (u32 i=0; i<Items.size(); ++i) + if (Items[i].SubMenu && Items[i].SubMenu->isVisible()) + return true; + + return false; +} + + +void CGUIContextMenu::closeAllSubMenus() +{ + for (u32 i=0; i<Items.size(); ++i) + if (Items[i].SubMenu) + Items[i].SubMenu->setVisible(false); + + //HighLighted = -1; +} + + +} // end namespace +} // end namespace + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.d new file mode 100644 index 0000000..4cf8e6a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.d @@ -0,0 +1,2 @@ +CGUIContextMenu.o: CGUIContextMenu.cpp CGUIContextMenu.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.h new file mode 100644 index 0000000..843b2b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIContextMenu.h @@ -0,0 +1,174 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_CONTEXT_MENU_H_INCLUDED__ +#define __C_GUI_CONTEXT_MENU_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIContextMenu.h" +#include "irrString.h" +#include "irrArray.h" +#include "IGUIFont.h" + +namespace irr +{ +namespace gui +{ + + //! GUI Context menu interface. + class CGUIContextMenu : public IGUIContextMenu + { + public: + + //! constructor + CGUIContextMenu(IGUIEnvironment* environment, + IGUIElement* parent, s32 id, core::rect<s32> rectangle, + bool getFocus = true, bool allowFocus = true); + + //! destructor + virtual ~CGUIContextMenu(); + + //! set behavior when menus are closed + virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose); + + //! get current behavior when the menue will be closed + virtual ECONTEXT_MENU_CLOSE getCloseHandling() const; + + //! Returns amount of menu items + virtual u32 getItemCount() const; + + //! Adds a menu item. + virtual u32 addItem(const wchar_t* text, s32 commandid, + bool enabled, bool hasSubMenu, bool checked, bool autoChecking); + + //! Insert a menu item at specified position. + virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId, bool enabled, + bool hasSubMenu, bool checked, bool autoChecking); + + //! Find a item which has the given CommandId starting from given index + virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch) const; + + //! Adds a separator item to the menu + virtual void addSeparator(); + + //! Returns text of the menu item. + virtual const wchar_t* getItemText(u32 idx) const; + + //! Sets text of the menu item. + virtual void setItemText(u32 idx, const wchar_t* text); + + //! Returns if a menu item is enabled + virtual bool isItemEnabled(u32 idx) const; + + //! Sets if the menu item should be enabled. + virtual void setItemEnabled(u32 idx, bool enabled); + + //! Returns if a menu item is checked + virtual bool isItemChecked(u32 idx) const; + + //! Sets if the menu item should be checked. + virtual void setItemChecked(u32 idx, bool enabled); + + //! Removes a menu item + virtual void removeItem(u32 idx); + + //! Removes all menu items + virtual void removeAllItems(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! Returns the selected item in the menu + virtual s32 getSelectedItem() const; + + //! Returns a pointer to the submenu of an item. + //! \return Pointer to the submenu of an item. + virtual IGUIContextMenu* getSubMenu(u32 idx) const; + + //! Sets the visible state of this element. + virtual void setVisible(bool visible); + + //! should the element change the checked status on clicking + virtual void setItemAutoChecking(u32 idx, bool autoChecking); + + //! does the element change the checked status on clicking + virtual bool getItemAutoChecking(u32 idx) const; + + //! Returns command id of a menu item + virtual s32 getItemCommandId(u32 idx) const; + + //! Sets the command id of a menu item + virtual void setItemCommandId(u32 idx, s32 id); + + //! Adds a sub menu from an element that already exists. + virtual void setSubMenu(u32 index, CGUIContextMenu* menu); + + //! When an eventparent is set it receives events instead of the usual parent element + virtual void setEventParent(IGUIElement *parent); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + protected: + + void closeAllSubMenus(); + bool hasOpenSubMenu() const; + + struct SItem + { + core::stringw Text; + bool IsSeparator; + bool Enabled; + bool Checked; + bool AutoChecking; + core::dimension2d<u32> Dim; + s32 PosY; + CGUIContextMenu* SubMenu; + s32 CommandId; + }; + + virtual void recalculateSize(); + + //! returns true, if an element was highlighted + virtual bool highlight(const core::position2d<s32>& p, bool canOpenSubMenu); + + //! sends a click Returns: + //! 0 if click went outside of the element, + //! 1 if a valid button was clicked, + //! 2 if a nonclickable element was clicked + virtual u32 sendClick(const core::position2d<s32>& p); + + //! returns the item highlight-area + virtual core::rect<s32> getHRect(const SItem& i, const core::rect<s32>& absolute) const; + + //! Gets drawing rect of Item + virtual core::rect<s32> getRect(const SItem& i, const core::rect<s32>& absolute) const; + + + core::array<SItem> Items; + core::position2d<s32> Pos; + IGUIElement* EventParent; + IGUIFont *LastFont; + ECONTEXT_MENU_CLOSE CloseHandling; + s32 HighLighted; + u32 ChangeTime; + bool AllowFocus; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_CONTEXT_MENU_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.cpp new file mode 100644 index 0000000..a937cc2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.cpp @@ -0,0 +1,1555 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIEditBox.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IGUIFont.h" +#include "IVideoDriver.h" +#include "rect.h" +#include "os.h" +#include "Keycodes.h" + +/* + todo: + optional scrollbars + ctrl+left/right to select word + double click/ctrl click: word select + drag to select whole words, triple click to select line + optional? dragging selected text + numerical +*/ + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIEditBox::CGUIEditBox(const wchar_t* text, bool border, + IGUIEnvironment* environment, IGUIElement* parent, s32 id, + const core::rect<s32>& rectangle) + : IGUIEditBox(environment, parent, id, rectangle), MouseMarking(false), + Border(border), Background(true), OverrideColorEnabled(false), MarkBegin(0), MarkEnd(0), + OverrideColor(video::SColor(101,255,255,255)), OverrideFont(0), LastBreakFont(0), + Operator(0), BlinkStartTime(0), CursorPos(0), HScrollPos(0), VScrollPos(0), Max(0), + WordWrap(false), MultiLine(false), AutoScroll(true), PasswordBox(false), + PasswordChar(L'*'), HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_CENTER), + CurrentTextRect(0,0,1,1), FrameRect(rectangle) +{ + #ifdef _DEBUG + setDebugName("CGUIEditBox"); + #endif + + Text = text; + + if (Environment) + Operator = Environment->getOSOperator(); + + if (Operator) + Operator->grab(); + + // this element can be tabbed to + setTabStop(true); + setTabOrder(-1); + + calculateFrameRect(); + breakText(); + + calculateScrollPos(); +} + + +//! destructor +CGUIEditBox::~CGUIEditBox() +{ + if (OverrideFont) + OverrideFont->drop(); + + if (Operator) + Operator->drop(); +} + + +//! Sets another skin independent font. +void CGUIEditBox::setOverrideFont(IGUIFont* font) +{ + if (OverrideFont == font) + return; + + if (OverrideFont) + OverrideFont->drop(); + + OverrideFont = font; + + if (OverrideFont) + OverrideFont->grab(); + + breakText(); +} + +//! Gets the override font (if any) +IGUIFont * CGUIEditBox::getOverrideFont() const +{ + return OverrideFont; +} + +//! Get the font which is used right now for drawing +IGUIFont* CGUIEditBox::getActiveFont() const +{ + if ( OverrideFont ) + return OverrideFont; + IGUISkin* skin = Environment->getSkin(); + if (skin) + return skin->getFont(); + return 0; +} + +//! Sets another color for the text. +void CGUIEditBox::setOverrideColor(video::SColor color) +{ + OverrideColor = color; + OverrideColorEnabled = true; +} + + +video::SColor CGUIEditBox::getOverrideColor() const +{ + return OverrideColor; +} + + +//! Turns the border on or off +void CGUIEditBox::setDrawBorder(bool border) +{ + Border = border; +} + +//! Sets whether to draw the background +void CGUIEditBox::setDrawBackground(bool draw) +{ + Background = draw; +} + +//! Sets if the text should use the overide color or the color in the gui skin. +void CGUIEditBox::enableOverrideColor(bool enable) +{ + OverrideColorEnabled = enable; +} + +bool CGUIEditBox::isOverrideColorEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return OverrideColorEnabled; +} + +//! Enables or disables word wrap +void CGUIEditBox::setWordWrap(bool enable) +{ + WordWrap = enable; + breakText(); +} + + +void CGUIEditBox::updateAbsolutePosition() +{ + core::rect<s32> oldAbsoluteRect(AbsoluteRect); + IGUIElement::updateAbsolutePosition(); + if ( oldAbsoluteRect != AbsoluteRect ) + { + calculateFrameRect(); + breakText(); + calculateScrollPos(); + } +} + + +//! Checks if word wrap is enabled +bool CGUIEditBox::isWordWrapEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return WordWrap; +} + + +//! Enables or disables newlines. +void CGUIEditBox::setMultiLine(bool enable) +{ + MultiLine = enable; +} + + +//! Checks if multi line editing is enabled +bool CGUIEditBox::isMultiLineEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return MultiLine; +} + + +void CGUIEditBox::setPasswordBox(bool passwordBox, wchar_t passwordChar) +{ + PasswordBox = passwordBox; + if (PasswordBox) + { + PasswordChar = passwordChar; + setMultiLine(false); + setWordWrap(false); + BrokenText.clear(); + } +} + + +bool CGUIEditBox::isPasswordBox() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return PasswordBox; +} + + +//! Sets text justification +void CGUIEditBox::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) +{ + HAlign = horizontal; + VAlign = vertical; +} + + +//! called if an event happened. +bool CGUIEditBox::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + if (event.GUIEvent.Caller == this) + { + MouseMarking = false; + setTextMarkers(0,0); + } + } + break; + case EET_KEY_INPUT_EVENT: + if (processKey(event)) + return true; + break; + case EET_MOUSE_INPUT_EVENT: + if (processMouse(event)) + return true; + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +bool CGUIEditBox::processKey(const SEvent& event) +{ + if (!event.KeyInput.PressedDown) + return false; + + bool textChanged = false; + s32 newMarkBegin = MarkBegin; + s32 newMarkEnd = MarkEnd; + + // control shortcut handling + + if (event.KeyInput.Control) + { + // german backlash '\' entered with control + '?' + if ( event.KeyInput.Char == '\\' ) + { + inputChar(event.KeyInput.Char); + return true; + } + + switch(event.KeyInput.Key) + { + case KEY_KEY_A: + // select all + newMarkBegin = 0; + newMarkEnd = Text.size(); + break; + case KEY_KEY_C: + // copy to clipboard + if (!PasswordBox && Operator && MarkBegin != MarkEnd) + { + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + + core::stringc s; + s = Text.subString(realmbgn, realmend - realmbgn).c_str(); + Operator->copyToClipboard(s.c_str()); + } + break; + case KEY_KEY_X: + // cut to the clipboard + if (!PasswordBox && Operator && MarkBegin != MarkEnd) + { + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + + // copy + core::stringc sc; + sc = Text.subString(realmbgn, realmend - realmbgn).c_str(); + Operator->copyToClipboard(sc.c_str()); + + if (isEnabled()) + { + // delete + core::stringw s; + s = Text.subString(0, realmbgn); + s.append( Text.subString(realmend, Text.size()-realmend) ); + Text = s; + + CursorPos = realmbgn; + newMarkBegin = 0; + newMarkEnd = 0; + textChanged = true; + } + } + break; + case KEY_KEY_V: + if ( !isEnabled() ) + break; + + // paste from the clipboard + if (Operator) + { + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + + // add new character + const c8* p = Operator->getTextFromClipboard(); + if (p) + { + if (MarkBegin == MarkEnd) + { + // insert text + core::stringw s = Text.subString(0, CursorPos); + s.append(p); + s.append( Text.subString(CursorPos, Text.size()-CursorPos) ); + + if (!Max || s.size()<=Max) // thx to Fish FH for fix + { + Text = s; + s = p; + CursorPos += s.size(); + } + } + else + { + // replace text + + core::stringw s = Text.subString(0, realmbgn); + s.append(p); + s.append( Text.subString(realmend, Text.size()-realmend) ); + + if (!Max || s.size()<=Max) // thx to Fish FH for fix + { + Text = s; + s = p; + CursorPos = realmbgn + s.size(); + } + } + } + + newMarkBegin = 0; + newMarkEnd = 0; + textChanged = true; + } + break; + case KEY_HOME: + // move/highlight to start of text + if (event.KeyInput.Shift) + { + newMarkEnd = CursorPos; + newMarkBegin = 0; + CursorPos = 0; + } + else + { + CursorPos = 0; + newMarkBegin = 0; + newMarkEnd = 0; + } + break; + case KEY_END: + // move/highlight to end of text + if (event.KeyInput.Shift) + { + newMarkBegin = CursorPos; + newMarkEnd = Text.size(); + CursorPos = 0; + } + else + { + CursorPos = Text.size(); + newMarkBegin = 0; + newMarkEnd = 0; + } + break; + default: + return false; + } + } + // default keyboard handling + else + switch(event.KeyInput.Key) + { + case KEY_END: + { + s32 p = Text.size(); + if (WordWrap || MultiLine) + { + p = getLineFromPos(CursorPos); + p = BrokenTextPositions[p] + (s32)BrokenText[p].size(); + if (p > 0 && (Text[p-1] == L'\r' || Text[p-1] == L'\n' )) + p-=1; + } + + if (event.KeyInput.Shift) + { + if (MarkBegin == MarkEnd) + newMarkBegin = CursorPos; + + newMarkEnd = p; + } + else + { + newMarkBegin = 0; + newMarkEnd = 0; + } + CursorPos = p; + BlinkStartTime = os::Timer::getTime(); + } + break; + case KEY_HOME: + { + + s32 p = 0; + if (WordWrap || MultiLine) + { + p = getLineFromPos(CursorPos); + p = BrokenTextPositions[p]; + } + + if (event.KeyInput.Shift) + { + if (MarkBegin == MarkEnd) + newMarkBegin = CursorPos; + newMarkEnd = p; + } + else + { + newMarkBegin = 0; + newMarkEnd = 0; + } + CursorPos = p; + BlinkStartTime = os::Timer::getTime(); + } + break; + case KEY_RETURN: + if (MultiLine) + { + inputChar(L'\n'); + } + else + { + calculateScrollPos(); + sendGuiEvent( EGET_EDITBOX_ENTER ); + } + return true; + case KEY_LEFT: + + if (event.KeyInput.Shift) + { + if (CursorPos > 0) + { + if (MarkBegin == MarkEnd) + newMarkBegin = CursorPos; + + newMarkEnd = CursorPos-1; + } + } + else + { + newMarkBegin = 0; + newMarkEnd = 0; + } + + if (CursorPos > 0) CursorPos--; + BlinkStartTime = os::Timer::getTime(); + break; + + case KEY_RIGHT: + if (event.KeyInput.Shift) + { + if (Text.size() > (u32)CursorPos) + { + if (MarkBegin == MarkEnd) + newMarkBegin = CursorPos; + + newMarkEnd = CursorPos+1; + } + } + else + { + newMarkBegin = 0; + newMarkEnd = 0; + } + + if (Text.size() > (u32)CursorPos) CursorPos++; + BlinkStartTime = os::Timer::getTime(); + break; + case KEY_UP: + if (MultiLine || (WordWrap && BrokenText.size() > 1) ) + { + s32 lineNo = getLineFromPos(CursorPos); + s32 mb = (MarkBegin == MarkEnd) ? CursorPos : (MarkBegin > MarkEnd ? MarkBegin : MarkEnd); + if (lineNo > 0) + { + s32 cp = CursorPos - BrokenTextPositions[lineNo]; + if ((s32)BrokenText[lineNo-1].size() < cp) + CursorPos = BrokenTextPositions[lineNo-1] + core::max_((u32)1, BrokenText[lineNo-1].size())-1; + else + CursorPos = BrokenTextPositions[lineNo-1] + cp; + } + + if (event.KeyInput.Shift) + { + newMarkBegin = mb; + newMarkEnd = CursorPos; + } + else + { + newMarkBegin = 0; + newMarkEnd = 0; + } + + } + else + { + return false; + } + break; + case KEY_DOWN: + if (MultiLine || (WordWrap && BrokenText.size() > 1) ) + { + s32 lineNo = getLineFromPos(CursorPos); + s32 mb = (MarkBegin == MarkEnd) ? CursorPos : (MarkBegin < MarkEnd ? MarkBegin : MarkEnd); + if (lineNo < (s32)BrokenText.size()-1) + { + s32 cp = CursorPos - BrokenTextPositions[lineNo]; + if ((s32)BrokenText[lineNo+1].size() < cp) + CursorPos = BrokenTextPositions[lineNo+1] + core::max_((u32)1, BrokenText[lineNo+1].size())-1; + else + CursorPos = BrokenTextPositions[lineNo+1] + cp; + } + + if (event.KeyInput.Shift) + { + newMarkBegin = mb; + newMarkEnd = CursorPos; + } + else + { + newMarkBegin = 0; + newMarkEnd = 0; + } + + } + else + { + return false; + } + break; + + case KEY_BACK: + if ( !isEnabled() ) + break; + + if (Text.size()) + { + core::stringw s; + + if (MarkBegin != MarkEnd) + { + // delete marked text + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + + s = Text.subString(0, realmbgn); + s.append( Text.subString(realmend, Text.size()-realmend) ); + Text = s; + + CursorPos = realmbgn; + } + else + { + // delete text behind cursor + if (CursorPos>0) + s = Text.subString(0, CursorPos-1); + else + s = L""; + s.append( Text.subString(CursorPos, Text.size()-CursorPos) ); + Text = s; + --CursorPos; + } + + if (CursorPos < 0) + CursorPos = 0; + BlinkStartTime = os::Timer::getTime(); + newMarkBegin = 0; + newMarkEnd = 0; + textChanged = true; + } + break; + case KEY_DELETE: + if ( !isEnabled() ) + break; + + if (Text.size() != 0) + { + core::stringw s; + + if (MarkBegin != MarkEnd) + { + // delete marked text + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + + s = Text.subString(0, realmbgn); + s.append( Text.subString(realmend, Text.size()-realmend) ); + Text = s; + + CursorPos = realmbgn; + } + else + { + // delete text before cursor + s = Text.subString(0, CursorPos); + s.append( Text.subString(CursorPos+1, Text.size()-CursorPos-1) ); + Text = s; + } + + if (CursorPos > (s32)Text.size()) + CursorPos = (s32)Text.size(); + + BlinkStartTime = os::Timer::getTime(); + newMarkBegin = 0; + newMarkEnd = 0; + textChanged = true; + } + break; + + case KEY_ESCAPE: + case KEY_TAB: + case KEY_SHIFT: + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + case KEY_F5: + case KEY_F6: + case KEY_F7: + case KEY_F8: + case KEY_F9: + case KEY_F10: + case KEY_F11: + case KEY_F12: + case KEY_F13: + case KEY_F14: + case KEY_F15: + case KEY_F16: + case KEY_F17: + case KEY_F18: + case KEY_F19: + case KEY_F20: + case KEY_F21: + case KEY_F22: + case KEY_F23: + case KEY_F24: + // ignore these keys + return false; + + default: + inputChar(event.KeyInput.Char); + return true; + } + + // Set new text markers + setTextMarkers( newMarkBegin, newMarkEnd ); + + // break the text if it has changed + if (textChanged) + { + breakText(); + calculateScrollPos(); + sendGuiEvent(EGET_EDITBOX_CHANGED); + } + else + { + calculateScrollPos(); + } + + return true; +} + + +//! draws the element and its children +void CGUIEditBox::draw() +{ + if (!IsVisible) + return; + + const bool focus = Environment->hasFocus(this); + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + EGUI_DEFAULT_COLOR bgCol = EGDC_GRAY_EDITABLE; + if ( isEnabled() ) + bgCol = focus ? EGDC_FOCUSED_EDITABLE : EGDC_EDITABLE; + + if (!Border && Background) + { + skin->draw2DRectangle(this, skin->getColor(bgCol), AbsoluteRect, &AbsoluteClippingRect); + } + + if (Border) + { + // draw the border + skin->draw3DSunkenPane(this, skin->getColor(bgCol), false, Background, AbsoluteRect, &AbsoluteClippingRect); + + calculateFrameRect(); + } + + core::rect<s32> localClipRect = FrameRect; + localClipRect.clipAgainst(AbsoluteClippingRect); + + // draw the text + + IGUIFont* font = getActiveFont(); + + s32 cursorLine = 0; + s32 charcursorpos = 0; + + if (font) + { + if (LastBreakFont != font) + { + breakText(); + } + + // calculate cursor pos + + core::stringw *txtLine = &Text; + s32 startPos = 0; + + core::stringw s, s2; + + // get mark position + const bool ml = (!PasswordBox && (WordWrap || MultiLine)); + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + const s32 hlineStart = ml ? getLineFromPos(realmbgn) : 0; + const s32 hlineCount = ml ? getLineFromPos(realmend) - hlineStart + 1 : 1; + const s32 lineCount = ml ? BrokenText.size() : 1; + + // Save the override color information. + // Then, alter it if the edit box is disabled. + const bool prevOver = OverrideColorEnabled; + const video::SColor prevColor = OverrideColor; + + if (Text.size()) + { + if (!isEnabled() && !OverrideColorEnabled) + { + OverrideColorEnabled = true; + OverrideColor = skin->getColor(EGDC_GRAY_TEXT); + } + + for (s32 i=0; i < lineCount; ++i) + { + setTextRect(i); + + // clipping test - don't draw anything outside the visible area + core::rect<s32> c = localClipRect; + c.clipAgainst(CurrentTextRect); + if (!c.isValid()) + continue; + + // get current line + if (PasswordBox) + { + if (BrokenText.size() != 1) + { + BrokenText.clear(); + BrokenText.push_back(core::stringw()); + } + if (BrokenText[0].size() != Text.size()) + { + BrokenText[0] = Text; + for (u32 q = 0; q < Text.size(); ++q) + { + BrokenText[0] [q] = PasswordChar; + } + } + txtLine = &BrokenText[0]; + startPos = 0; + } + else + { + txtLine = ml ? &BrokenText[i] : &Text; + startPos = ml ? BrokenTextPositions[i] : 0; + } + + + // draw normal text + font->draw(txtLine->c_str(), CurrentTextRect, + OverrideColorEnabled ? OverrideColor : skin->getColor(EGDC_BUTTON_TEXT), + false, true, &localClipRect); + + // draw mark and marked text + if (focus && MarkBegin != MarkEnd && i >= hlineStart && i < hlineStart + hlineCount) + { + + s32 mbegin = 0, mend = 0; + s32 lineStartPos = 0, lineEndPos = txtLine->size(); + + if (i == hlineStart) + { + // highlight start is on this line + s = txtLine->subString(0, realmbgn - startPos); + mbegin = font->getDimension(s.c_str()).Width; + + // deal with kerning + mbegin += font->getKerningWidth( + &((*txtLine)[realmbgn - startPos]), + realmbgn - startPos > 0 ? &((*txtLine)[realmbgn - startPos - 1]) : 0); + + lineStartPos = realmbgn - startPos; + } + if (i == hlineStart + hlineCount - 1) + { + // highlight end is on this line + s2 = txtLine->subString(0, realmend - startPos); + mend = font->getDimension(s2.c_str()).Width; + lineEndPos = (s32)s2.size(); + } + else + mend = font->getDimension(txtLine->c_str()).Width; + + CurrentTextRect.UpperLeftCorner.X += mbegin; + CurrentTextRect.LowerRightCorner.X = CurrentTextRect.UpperLeftCorner.X + mend - mbegin; + + // draw mark + skin->draw2DRectangle(this, skin->getColor(EGDC_HIGH_LIGHT), CurrentTextRect, &localClipRect); + + // draw marked text + s = txtLine->subString(lineStartPos, lineEndPos - lineStartPos); + + if (s.size()) + font->draw(s.c_str(), CurrentTextRect, + OverrideColorEnabled ? OverrideColor : skin->getColor(EGDC_HIGH_LIGHT_TEXT), + false, true, &localClipRect); + + } + } + + // Return the override color information to its previous settings. + OverrideColorEnabled = prevOver; + OverrideColor = prevColor; + } + + // draw cursor + if ( IsEnabled ) + { + if (WordWrap || MultiLine) + { + cursorLine = getLineFromPos(CursorPos); + txtLine = &BrokenText[cursorLine]; + startPos = BrokenTextPositions[cursorLine]; + } + s = txtLine->subString(0,CursorPos-startPos); + charcursorpos = font->getDimension(s.c_str()).Width + + font->getKerningWidth(L"_", CursorPos-startPos > 0 ? &((*txtLine)[CursorPos-startPos-1]) : 0); + + if (focus && (os::Timer::getTime() - BlinkStartTime) % 700 < 350) + { + setTextRect(cursorLine); + CurrentTextRect.UpperLeftCorner.X += charcursorpos; + + font->draw(L"_", CurrentTextRect, + OverrideColorEnabled ? OverrideColor : skin->getColor(EGDC_BUTTON_TEXT), + false, true, &localClipRect); + } + } + } + + // draw children + IGUIElement::draw(); +} + + +//! Sets the new caption of this element. +void CGUIEditBox::setText(const wchar_t* text) +{ + Text = text; + if (u32(CursorPos) > Text.size()) + CursorPos = Text.size(); + HScrollPos = 0; + breakText(); +} + + +//! Enables or disables automatic scrolling with cursor position +//! \param enable: If set to true, the text will move around with the cursor position +void CGUIEditBox::setAutoScroll(bool enable) +{ + AutoScroll = enable; +} + + +//! Checks to see if automatic scrolling is enabled +//! \return true if automatic scrolling is enabled, false if not +bool CGUIEditBox::isAutoScrollEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return AutoScroll; +} + + +//! Gets the area of the text in the edit box +//! \return Returns the size in pixels of the text +core::dimension2du CGUIEditBox::getTextDimension() +{ + core::rect<s32> ret; + + setTextRect(0); + ret = CurrentTextRect; + + for (u32 i=1; i < BrokenText.size(); ++i) + { + setTextRect(i); + ret.addInternalPoint(CurrentTextRect.UpperLeftCorner); + ret.addInternalPoint(CurrentTextRect.LowerRightCorner); + } + + return core::dimension2du(ret.getSize()); +} + + +//! Sets the maximum amount of characters which may be entered in the box. +//! \param max: Maximum amount of characters. If 0, the character amount is +//! infinity. +void CGUIEditBox::setMax(u32 max) +{ + Max = max; + + if (Text.size() > Max && Max != 0) + Text = Text.subString(0, Max); +} + + +//! Returns maximum amount of characters, previously set by setMax(); +u32 CGUIEditBox::getMax() const +{ + return Max; +} + + +bool CGUIEditBox::processMouse(const SEvent& event) +{ + switch(event.MouseInput.Event) + { + case irr::EMIE_LMOUSE_LEFT_UP: + if (Environment->hasFocus(this)) + { + CursorPos = getCursorPos(event.MouseInput.X, event.MouseInput.Y); + if (MouseMarking) + { + setTextMarkers( MarkBegin, CursorPos ); + } + MouseMarking = false; + calculateScrollPos(); + return true; + } + break; + case irr::EMIE_MOUSE_MOVED: + { + if (MouseMarking) + { + CursorPos = getCursorPos(event.MouseInput.X, event.MouseInput.Y); + setTextMarkers( MarkBegin, CursorPos ); + calculateScrollPos(); + return true; + } + } + break; + case EMIE_LMOUSE_PRESSED_DOWN: + if (!Environment->hasFocus(this)) + { + BlinkStartTime = os::Timer::getTime(); + MouseMarking = true; + CursorPos = getCursorPos(event.MouseInput.X, event.MouseInput.Y); + setTextMarkers(CursorPos, CursorPos ); + calculateScrollPos(); + return true; + } + else + { + if (!AbsoluteClippingRect.isPointInside( + core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y))) + { + return false; + } + else + { + // move cursor + CursorPos = getCursorPos(event.MouseInput.X, event.MouseInput.Y); + + s32 newMarkBegin = MarkBegin; + if (!MouseMarking) + newMarkBegin = CursorPos; + + MouseMarking = true; + setTextMarkers( newMarkBegin, CursorPos); + calculateScrollPos(); + return true; + } + } + default: + break; + } + + return false; +} + + +s32 CGUIEditBox::getCursorPos(s32 x, s32 y) +{ + IGUIFont* font = getActiveFont(); + + const u32 lineCount = (WordWrap || MultiLine) ? BrokenText.size() : 1; + + core::stringw *txtLine=0; + s32 startPos=0; + x+=3; + + for (u32 i=0; i < lineCount; ++i) + { + setTextRect(i); + if (i == 0 && y < CurrentTextRect.UpperLeftCorner.Y) + y = CurrentTextRect.UpperLeftCorner.Y; + if (i == lineCount - 1 && y > CurrentTextRect.LowerRightCorner.Y ) + y = CurrentTextRect.LowerRightCorner.Y; + + // is it inside this region? + if (y >= CurrentTextRect.UpperLeftCorner.Y && y <= CurrentTextRect.LowerRightCorner.Y) + { + // we've found the clicked line + txtLine = (WordWrap || MultiLine) ? &BrokenText[i] : &Text; + startPos = (WordWrap || MultiLine) ? BrokenTextPositions[i] : 0; + break; + } + } + + if (x < CurrentTextRect.UpperLeftCorner.X) + x = CurrentTextRect.UpperLeftCorner.X; + + if ( !txtLine ) + return 0; + + s32 idx = font->getCharacterFromPos(txtLine->c_str(), x - CurrentTextRect.UpperLeftCorner.X); + + // click was on or left of the line + if (idx != -1) + return idx + startPos; + + // click was off the right edge of the line, go to end. + return txtLine->size() + startPos; +} + + +//! Breaks the single text line. +void CGUIEditBox::breakText() +{ + if ((!WordWrap && !MultiLine)) + return; + + BrokenText.clear(); // need to reallocate :/ + BrokenTextPositions.set_used(0); + + IGUIFont* font = getActiveFont(); + if (!font) + return; + + LastBreakFont = font; + + core::stringw line; + core::stringw word; + core::stringw whitespace; + s32 lastLineStart = 0; + s32 size = Text.size(); + s32 length = 0; + s32 elWidth = RelativeRect.getWidth() - 6; + wchar_t c; + + for (s32 i=0; i<size; ++i) + { + c = Text[i]; + bool lineBreak = false; + + if (c == L'\r') // Mac or Windows breaks + { + lineBreak = true; + c = 0; + if (Text[i+1] == L'\n') // Windows breaks + { + // TODO: I (Michael) think that we shouldn't change the text given by the user for whatever reason. + // Instead rework the cursor positioning to be able to handle this (but not in stable release + // branch as users might already expect this behavior). + Text.erase(i+1); + --size; + if ( CursorPos > i ) + --CursorPos; + } + } + else if (c == L'\n') // Unix breaks + { + lineBreak = true; + c = 0; + } + + // don't break if we're not a multi-line edit box + if (!MultiLine) + lineBreak = false; + + if (c == L' ' || c == 0 || i == (size-1)) + { + // here comes the next whitespace, look if + // we can break the last word to the next line + // We also break whitespace, otherwise cursor would vanish beside the right border. + s32 whitelgth = font->getDimension(whitespace.c_str()).Width; + s32 worldlgth = font->getDimension(word.c_str()).Width; + + if (WordWrap && length + worldlgth + whitelgth > elWidth && line.size() > 0) + { + // break to next line + length = worldlgth; + BrokenText.push_back(line); + BrokenTextPositions.push_back(lastLineStart); + lastLineStart = i - (s32)word.size(); + line = word; + } + else + { + // add word to line + line += whitespace; + line += word; + length += whitelgth + worldlgth; + } + + word = L""; + whitespace = L""; + + + if ( c ) + whitespace += c; + + // compute line break + if (lineBreak) + { + line += whitespace; + line += word; + BrokenText.push_back(line); + BrokenTextPositions.push_back(lastLineStart); + lastLineStart = i+1; + line = L""; + word = L""; + whitespace = L""; + length = 0; + } + } + else + { + // yippee this is a word.. + word += c; + } + } + + line += whitespace; + line += word; + BrokenText.push_back(line); + BrokenTextPositions.push_back(lastLineStart); +} + +// TODO: that function does interpret VAlign according to line-index (indexed line is placed on top-center-bottom) +// but HAlign according to line-width (pixels) and not by row. +// Intuitively I suppose HAlign handling is better as VScrollPos should handle the line-scrolling. +// But please no one change this without also rewriting (and this time fucking testing!!!) autoscrolling (I noticed this when fixing the old autoscrolling). +void CGUIEditBox::setTextRect(s32 line) +{ + if ( line < 0 ) + return; + + IGUIFont* font = getActiveFont(); + if (!font) + return; + + core::dimension2du d; + + // get text dimension + const u32 lineCount = (WordWrap || MultiLine) ? BrokenText.size() : 1; + if (WordWrap || MultiLine) + { + d = font->getDimension(BrokenText[line].c_str()); + } + else + { + d = font->getDimension(Text.c_str()); + d.Height = AbsoluteRect.getHeight(); + } + d.Height += font->getKerningHeight(); + + // justification + switch (HAlign) + { + case EGUIA_CENTER: + // align to h centre + CurrentTextRect.UpperLeftCorner.X = (FrameRect.getWidth()/2) - (d.Width/2); + CurrentTextRect.LowerRightCorner.X = (FrameRect.getWidth()/2) + (d.Width/2); + break; + case EGUIA_LOWERRIGHT: + // align to right edge + CurrentTextRect.UpperLeftCorner.X = FrameRect.getWidth() - d.Width; + CurrentTextRect.LowerRightCorner.X = FrameRect.getWidth(); + break; + default: + // align to left edge + CurrentTextRect.UpperLeftCorner.X = 0; + CurrentTextRect.LowerRightCorner.X = d.Width; + + } + + switch (VAlign) + { + case EGUIA_CENTER: + // align to v centre + CurrentTextRect.UpperLeftCorner.Y = + (FrameRect.getHeight()/2) - (lineCount*d.Height)/2 + d.Height*line; + break; + case EGUIA_LOWERRIGHT: + // align to bottom edge + CurrentTextRect.UpperLeftCorner.Y = + FrameRect.getHeight() - lineCount*d.Height + d.Height*line; + break; + default: + // align to top edge + CurrentTextRect.UpperLeftCorner.Y = d.Height*line; + break; + } + + CurrentTextRect.UpperLeftCorner.X -= HScrollPos; + CurrentTextRect.LowerRightCorner.X -= HScrollPos; + CurrentTextRect.UpperLeftCorner.Y -= VScrollPos; + CurrentTextRect.LowerRightCorner.Y = CurrentTextRect.UpperLeftCorner.Y + d.Height; + + CurrentTextRect += FrameRect.UpperLeftCorner; + +} + + +s32 CGUIEditBox::getLineFromPos(s32 pos) +{ + if (!WordWrap && !MultiLine) + return 0; + + s32 i=0; + while (i < (s32)BrokenTextPositions.size()) + { + if (BrokenTextPositions[i] > pos) + return i-1; + ++i; + } + return (s32)BrokenTextPositions.size() - 1; +} + + +void CGUIEditBox::inputChar(wchar_t c) +{ + if (!isEnabled()) + return; + + if (c != 0) + { + if (Text.size() < Max || Max == 0) + { + core::stringw s; + + if (MarkBegin != MarkEnd) + { + // replace marked text + const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd; + const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin; + + s = Text.subString(0, realmbgn); + s.append(c); + s.append( Text.subString(realmend, Text.size()-realmend) ); + Text = s; + CursorPos = realmbgn+1; + } + else + { + // add new character + s = Text.subString(0, CursorPos); + s.append(c); + s.append( Text.subString(CursorPos, Text.size()-CursorPos) ); + Text = s; + ++CursorPos; + } + + BlinkStartTime = os::Timer::getTime(); + setTextMarkers(0, 0); + } + } + breakText(); + calculateScrollPos(); + sendGuiEvent(EGET_EDITBOX_CHANGED); +} + +// calculate autoscroll +void CGUIEditBox::calculateScrollPos() +{ + if (!AutoScroll) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + IGUIFont* font = OverrideFont ? OverrideFont : skin->getFont(); + if (!font) + return; + + s32 cursLine = getLineFromPos(CursorPos); + if ( cursLine < 0 ) + return; + setTextRect(cursLine); + const bool hasBrokenText = MultiLine || WordWrap; + + // Check horizonal scrolling + // NOTE: Calculations different to vertical scrolling because setTextRect interprets VAlign relative to line but HAlign not relative to row + { + // get cursor position + IGUIFont* font = getActiveFont(); + if (!font) + return; + + // get cursor area + irr::u32 cursorWidth = font->getDimension(L"_").Width; + core::stringw *txtLine = hasBrokenText ? &BrokenText[cursLine] : &Text; + s32 cPos = hasBrokenText ? CursorPos - BrokenTextPositions[cursLine] : CursorPos; // column + s32 cStart = font->getDimension(txtLine->subString(0, cPos).c_str()).Width; // pixels from text-start + s32 cEnd = cStart + cursorWidth; + s32 txtWidth = font->getDimension(txtLine->c_str()).Width; + + if ( txtWidth < FrameRect.getWidth() ) + { + // TODO: Needs a clean left and right gap removal depending on HAlign, similar to vertical scrolling tests for top/bottom. + // This check just fixes the case where it was most noticable (text smaller than clipping area). + + HScrollPos = 0; + setTextRect(cursLine); + } + + if ( CurrentTextRect.UpperLeftCorner.X+cStart < FrameRect.UpperLeftCorner.X ) + { + // cursor to the left of the clipping area + HScrollPos -= FrameRect.UpperLeftCorner.X-(CurrentTextRect.UpperLeftCorner.X+cStart); + setTextRect(cursLine); + + // TODO: should show more characters to the left when we're scrolling left + // and the cursor reaches the border. + } + else if ( CurrentTextRect.UpperLeftCorner.X+cEnd > FrameRect.LowerRightCorner.X) + { + // cursor to the right of the clipping area + HScrollPos += (CurrentTextRect.UpperLeftCorner.X+cEnd)-FrameRect.LowerRightCorner.X; + setTextRect(cursLine); + } + } + + // calculate vertical scrolling + if (hasBrokenText) + { + irr::u32 lineHeight = font->getDimension(L"A").Height + font->getKerningHeight(); + // only up to 1 line fits? + if ( lineHeight >= (irr::u32)FrameRect.getHeight() ) + { + VScrollPos = 0; + setTextRect(cursLine); + s32 unscrolledPos = CurrentTextRect.UpperLeftCorner.Y; + s32 pivot = FrameRect.UpperLeftCorner.Y; + switch (VAlign) + { + case EGUIA_CENTER: + pivot += FrameRect.getHeight()/2; + unscrolledPos += lineHeight/2; + break; + case EGUIA_LOWERRIGHT: + pivot += FrameRect.getHeight(); + unscrolledPos += lineHeight; + break; + default: + break; + } + VScrollPos = unscrolledPos-pivot; + setTextRect(cursLine); + } + else + { + // First 2 checks are necessary when people delete lines + setTextRect(0); + if ( CurrentTextRect.UpperLeftCorner.Y > FrameRect.UpperLeftCorner.Y && VAlign != EGUIA_LOWERRIGHT) + { + // first line is leaving a gap on top + VScrollPos = 0; + } + else if (VAlign != EGUIA_UPPERLEFT) + { + u32 lastLine = BrokenTextPositions.empty() ? 0 : BrokenTextPositions.size()-1; + setTextRect(lastLine); + if ( CurrentTextRect.LowerRightCorner.Y < FrameRect.LowerRightCorner.Y) + { + // last line is leaving a gap on bottom + VScrollPos -= FrameRect.LowerRightCorner.Y-CurrentTextRect.LowerRightCorner.Y; + } + } + + setTextRect(cursLine); + if ( CurrentTextRect.UpperLeftCorner.Y < FrameRect.UpperLeftCorner.Y ) + { + // text above valid area + VScrollPos -= FrameRect.UpperLeftCorner.Y-CurrentTextRect.UpperLeftCorner.Y; + setTextRect(cursLine); + } + else if ( CurrentTextRect.LowerRightCorner.Y > FrameRect.LowerRightCorner.Y) + { + // text below valid area + VScrollPos += CurrentTextRect.LowerRightCorner.Y-FrameRect.LowerRightCorner.Y; + setTextRect(cursLine); + } + } + } +} + +void CGUIEditBox::calculateFrameRect() +{ + FrameRect = AbsoluteRect; + IGUISkin *skin = 0; + if (Environment) + skin = Environment->getSkin(); + if (Border && skin) + { + FrameRect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X)+1; + FrameRect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y)+1; + FrameRect.LowerRightCorner.X -= skin->getSize(EGDS_TEXT_DISTANCE_X)+1; + FrameRect.LowerRightCorner.Y -= skin->getSize(EGDS_TEXT_DISTANCE_Y)+1; + } +} + +//! set text markers +void CGUIEditBox::setTextMarkers(s32 begin, s32 end) +{ + if ( begin != MarkBegin || end != MarkEnd ) + { + MarkBegin = begin; + MarkEnd = end; + sendGuiEvent(EGET_EDITBOX_MARKING_CHANGED); + } +} + +//! send some gui event to parent +void CGUIEditBox::sendGuiEvent(EGUI_EVENT_TYPE type) +{ + if ( Parent ) + { + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = type; + + Parent->OnEvent(e); + } +} + +//! Writes attributes of the element. +void CGUIEditBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + // IGUIEditBox::serializeAttributes(out,options); + + out->addBool ("Border", Border); + out->addBool ("Background", Background); + out->addBool ("OverrideColorEnabled", OverrideColorEnabled ); + out->addColor ("OverrideColor", OverrideColor); + // out->addFont("OverrideFont", OverrideFont); + out->addInt ("MaxChars", Max); + out->addBool ("WordWrap", WordWrap); + out->addBool ("MultiLine", MultiLine); + out->addBool ("AutoScroll", AutoScroll); + out->addBool ("PasswordBox", PasswordBox); + core::stringw ch = L" "; + ch[0] = PasswordChar; + out->addString("PasswordChar", ch.c_str()); + out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); + out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); + + IGUIEditBox::serializeAttributes(out,options); +} + + +//! Reads attributes of the element +void CGUIEditBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIEditBox::deserializeAttributes(in,options); + + setDrawBorder( in->getAttributeAsBool("Border") ); + setDrawBackground( in->getAttributeAsBool("Background") ); + setOverrideColor(in->getAttributeAsColor("OverrideColor")); + enableOverrideColor(in->getAttributeAsBool("OverrideColorEnabled")); + setMax(in->getAttributeAsInt("MaxChars")); + setWordWrap(in->getAttributeAsBool("WordWrap")); + setMultiLine(in->getAttributeAsBool("MultiLine")); + setAutoScroll(in->getAttributeAsBool("AutoScroll")); + core::stringw ch = in->getAttributeAsStringW("PasswordChar"); + + if (!ch.size()) + setPasswordBox(in->getAttributeAsBool("PasswordBox")); + else + setPasswordBox(in->getAttributeAsBool("PasswordBox"), ch[0]); + + setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), + (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); + + // setOverrideFont(in->getAttributeAsFont("OverrideFont")); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.d new file mode 100644 index 0000000..eb977af --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.d @@ -0,0 +1,2 @@ +CGUIEditBox.o: CGUIEditBox.cpp CGUIEditBox.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.h new file mode 100644 index 0000000..b80aa0f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEditBox.h @@ -0,0 +1,182 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_EDIT_BOX_H_INCLUDED__ +#define __C_GUI_EDIT_BOX_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEditBox.h" +#include "irrArray.h" +#include "IOSOperator.h" + +namespace irr +{ +namespace gui +{ + class CGUIEditBox : public IGUIEditBox + { + public: + + //! constructor + CGUIEditBox(const wchar_t* text, bool border, IGUIEnvironment* environment, + IGUIElement* parent, s32 id, const core::rect<s32>& rectangle); + + //! destructor + virtual ~CGUIEditBox(); + + //! Sets another skin independent font. + virtual void setOverrideFont(IGUIFont* font=0); + + //! Gets the override font (if any) + /** \return The override font (may be 0) */ + virtual IGUIFont* getOverrideFont() const; + + //! Get the font which is used right now for drawing + /** Currently this is the override font when one is set and the + font of the active skin otherwise */ + virtual IGUIFont* getActiveFont() const; + + //! Sets another color for the text. + virtual void setOverrideColor(video::SColor color); + + //! Gets the override color + virtual video::SColor getOverrideColor() const; + + //! Sets if the text should use the overide color or the + //! color in the gui skin. + virtual void enableOverrideColor(bool enable); + + //! Checks if an override color is enabled + /** \return true if the override color is enabled, false otherwise */ + virtual bool isOverrideColorEnabled(void) const; + + //! Sets whether to draw the background + virtual void setDrawBackground(bool draw); + + //! Turns the border on or off + virtual void setDrawBorder(bool border); + + //! Enables or disables word wrap for using the edit box as multiline text editor. + virtual void setWordWrap(bool enable); + + //! Checks if word wrap is enabled + //! \return true if word wrap is enabled, false otherwise + virtual bool isWordWrapEnabled() const; + + //! Enables or disables newlines. + /** \param enable: If set to true, the EGET_EDITBOX_ENTER event will not be fired, + instead a newline character will be inserted. */ + virtual void setMultiLine(bool enable); + + //! Checks if multi line editing is enabled + //! \return true if mult-line is enabled, false otherwise + virtual bool isMultiLineEnabled() const; + + //! Enables or disables automatic scrolling with cursor position + //! \param enable: If set to true, the text will move around with the cursor position + virtual void setAutoScroll(bool enable); + + //! Checks to see if automatic scrolling is enabled + //! \return true if automatic scrolling is enabled, false if not + virtual bool isAutoScrollEnabled() const; + + //! Gets the size area of the text in the edit box + //! \return Returns the size in pixels of the text + virtual core::dimension2du getTextDimension(); + + //! Sets text justification + virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! Sets the new caption of this element. + virtual void setText(const wchar_t* text); + + //! Sets the maximum amount of characters which may be entered in the box. + //! \param max: Maximum amount of characters. If 0, the character amount is + //! infinity. + virtual void setMax(u32 max); + + //! Returns maximum amount of characters, previously set by setMax(); + virtual u32 getMax() const; + + //! Sets whether the edit box is a password box. Setting this to true will + /** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x + \param passwordBox: true to enable password, false to disable + \param passwordChar: the character that is displayed instead of letters */ + virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*'); + + //! Returns true if the edit box is currently a password box. + virtual bool isPasswordBox() const; + + //! Updates the absolute position, splits text if required + virtual void updateAbsolutePosition(); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + protected: + //! Breaks the single text line. + void breakText(); + //! sets the area of the given line + void setTextRect(s32 line); + //! returns the line number that the cursor is on + s32 getLineFromPos(s32 pos); + //! adds a letter to the edit box + void inputChar(wchar_t c); + //! calculates the current scroll position + void calculateScrollPos(); + //! calculated the FrameRect + void calculateFrameRect(); + //! send some gui event to parent + void sendGuiEvent(EGUI_EVENT_TYPE type); + //! set text markers + void setTextMarkers(s32 begin, s32 end); + + bool processKey(const SEvent& event); + bool processMouse(const SEvent& event); + s32 getCursorPos(s32 x, s32 y); + + bool MouseMarking; + bool Border; + bool Background; + bool OverrideColorEnabled; + s32 MarkBegin; + s32 MarkEnd; + + video::SColor OverrideColor; + gui::IGUIFont *OverrideFont, *LastBreakFont; + IOSOperator* Operator; + + u32 BlinkStartTime; + s32 CursorPos; + s32 HScrollPos, VScrollPos; // scroll position in characters + u32 Max; + + bool WordWrap, MultiLine, AutoScroll, PasswordBox; + wchar_t PasswordChar; + EGUI_ALIGNMENT HAlign, VAlign; + + core::array< core::stringw > BrokenText; + core::array< s32 > BrokenTextPositions; + + core::rect<s32> CurrentTextRect, FrameRect; // temporary values + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ +#endif // __C_GUI_EDIT_BOX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.cpp new file mode 100644 index 0000000..bf3fa86 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.cpp @@ -0,0 +1,1658 @@ + +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIEnvironment.h" + +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IVideoDriver.h" + +#include "CGUISkin.h" +#include "CGUIButton.h" +#include "CGUIWindow.h" +#include "CGUIScrollBar.h" +#include "CGUIFont.h" +#include "CGUISpriteBank.h" +#include "CGUIImage.h" +#include "CGUIMeshViewer.h" +#include "CGUICheckBox.h" +#include "CGUIListBox.h" +#include "CGUITreeView.h" +#include "CGUIImageList.h" +#include "CGUIFileOpenDialog.h" +#include "CGUIColorSelectDialog.h" +#include "CGUIStaticText.h" +#include "CGUIEditBox.h" +#include "CGUISpinBox.h" +#include "CGUIInOutFader.h" +#include "CGUIMessageBox.h" +#include "CGUIModalScreen.h" +#include "CGUITabControl.h" +#include "CGUIContextMenu.h" +#include "CGUIComboBox.h" +#include "CGUIMenu.h" +#include "CGUIToolBar.h" +#include "CGUITable.h" + +#include "CDefaultGUIElementFactory.h" +#include "IWriteFile.h" +#include "IXMLWriter.h" + +#include "BuiltInFont.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +const wchar_t* IRR_XML_FORMAT_GUI_ENV = L"irr_gui"; +const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT = L"element"; +const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE = L"type"; + +const io::path CGUIEnvironment::DefaultFontName = "#DefaultFont"; + +//! constructor +CGUIEnvironment::CGUIEnvironment(io::IFileSystem* fs, video::IVideoDriver* driver, IOSOperator* op) +: IGUIElement(EGUIET_ROOT, 0, 0, 0, core::rect<s32>(core::position2d<s32>(0,0), driver ? core::dimension2d<s32>(driver->getScreenSize()) : core::dimension2d<s32>(0,0))), + Driver(driver), Hovered(0), HoveredNoSubelement(0), Focus(0), LastHoveredMousePos(0,0), CurrentSkin(0), + FileSystem(fs), UserReceiver(0), Operator(op) +{ + if (Driver) + Driver->grab(); + + if (FileSystem) + FileSystem->grab(); + + if (Operator) + Operator->grab(); + + #ifdef _DEBUG + IGUIEnvironment::setDebugName("CGUIEnvironment"); + #endif + + // gui factory + IGUIElementFactory* factory = new CDefaultGUIElementFactory(this); + registerGUIElementFactory(factory); + factory->drop(); + + loadBuiltInFont(); + + IGUISkin* skin = createSkin( gui::EGST_WINDOWS_METALLIC ); + setSkin(skin); + skin->drop(); + + //set tooltip default + ToolTip.LastTime = 0; + ToolTip.EnterTime = 0; + ToolTip.LaunchTime = 1000; + ToolTip.RelaunchTime = 500; + ToolTip.Element = 0; + + // environment is root tab group + Environment = this; + setTabGroup(true); +} + + +//! destructor +CGUIEnvironment::~CGUIEnvironment() +{ + if ( HoveredNoSubelement && HoveredNoSubelement != this ) + { + HoveredNoSubelement->drop(); + HoveredNoSubelement = 0; + } + + if (Hovered && Hovered != this) + { + Hovered->drop(); + Hovered = 0; + } + + if (Focus) + { + Focus->drop(); + Focus = 0; + } + + if (ToolTip.Element) + { + ToolTip.Element->drop(); + ToolTip.Element = 0; + } + + // drop skin + if (CurrentSkin) + { + CurrentSkin->drop(); + CurrentSkin = 0; + } + + u32 i; + + // delete all sprite banks + for (i=0; i<Banks.size(); ++i) + if (Banks[i].Bank) + Banks[i].Bank->drop(); + + // delete all fonts + for (i=0; i<Fonts.size(); ++i) + Fonts[i].Font->drop(); + + // remove all factories + for (i=0; i<GUIElementFactoryList.size(); ++i) + GUIElementFactoryList[i]->drop(); + + if (Operator) + { + Operator->drop(); + Operator = 0; + } + + if (FileSystem) + { + FileSystem->drop(); + FileSystem = 0; + } + + if (Driver) + { + Driver->drop(); + Driver = 0; + } +} + + +void CGUIEnvironment::loadBuiltInFont() +{ + io::IReadFile* file = io::createMemoryReadFile(BuiltInFontData, BuiltInFontDataSize, DefaultFontName, false); + + CGUIFont* font = new CGUIFont(this, DefaultFontName ); + if (!font->load(file)) + { + os::Printer::log("Error: Could not load built-in Font. Did you compile without the BMP loader?", ELL_ERROR); + font->drop(); + file->drop(); + return; + } + + SFont f; + f.NamedPath.setPath(DefaultFontName); + f.Font = font; + Fonts.push_back(f); + + file->drop(); +} + + +//! draws all gui elements +void CGUIEnvironment::drawAll() +{ + if (Driver) + { + core::dimension2d<s32> dim(Driver->getScreenSize()); + if (AbsoluteRect.LowerRightCorner.X != dim.Width || + AbsoluteRect.LowerRightCorner.Y != dim.Height) + { + // resize gui environment + DesiredRect.LowerRightCorner = dim; + AbsoluteClippingRect = DesiredRect; + AbsoluteRect = DesiredRect; + updateAbsolutePosition(); + } + } + + // make sure tooltip is always on top + if (ToolTip.Element) + bringToFront(ToolTip.Element); + + draw(); + OnPostRender ( os::Timer::getTime () ); +} + + +//! sets the focus to an element +bool CGUIEnvironment::setFocus(IGUIElement* element) +{ + if (Focus == element) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + // GUI Environment should not get the focus + if (element == this) + element = 0; + + // stop element from being deleted + if (element) + element->grab(); + + // focus may change or be removed in this call + IGUIElement *currentFocus = 0; + if (Focus) + { + currentFocus = Focus; + currentFocus->grab(); + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = Focus; + e.GUIEvent.Element = element; + e.GUIEvent.EventType = EGET_ELEMENT_FOCUS_LOST; + if (Focus->OnEvent(e)) + { + if (element) + element->drop(); + currentFocus->drop(); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + currentFocus->drop(); + currentFocus = 0; + } + + if (element) + { + currentFocus = Focus; + if (currentFocus) + currentFocus->grab(); + + // send focused event + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = element; + e.GUIEvent.Element = Focus; + e.GUIEvent.EventType = EGET_ELEMENT_FOCUSED; + if (element->OnEvent(e)) + { + if (element) + element->drop(); + if (currentFocus) + currentFocus->drop(); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + } + + if (currentFocus) + currentFocus->drop(); + + if (Focus) + Focus->drop(); + + // element is the new focus so it doesn't have to be dropped + Focus = element; + + return true; +} + + +//! returns the element with the focus +IGUIElement* CGUIEnvironment::getFocus() const +{ + return Focus; +} + +//! returns the element last known to be under the mouse cursor +IGUIElement* CGUIEnvironment::getHovered() const +{ + return Hovered; +} + + +//! removes the focus from an element +bool CGUIEnvironment::removeFocus(IGUIElement* element) +{ + if (Focus && Focus==element) + { + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = Focus; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = EGET_ELEMENT_FOCUS_LOST; + if (Focus->OnEvent(e)) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + } + if (Focus) + { + Focus->drop(); + Focus = 0; + } + + return true; +} + + +//! Returns if the element has focus +bool CGUIEnvironment::hasFocus(IGUIElement* element) const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return (element == Focus); +} + + +//! returns the current video driver +video::IVideoDriver* CGUIEnvironment::getVideoDriver() const +{ + return Driver; +} + + +//! returns the current file system +io::IFileSystem* CGUIEnvironment::getFileSystem() const +{ + return FileSystem; +} + + +//! returns a pointer to the OS operator +IOSOperator* CGUIEnvironment::getOSOperator() const +{ + return Operator; +} + + +//! clear all GUI elements +void CGUIEnvironment::clear() +{ + // Remove the focus + if (Focus) + { + Focus->drop(); + Focus = 0; + } + + if (Hovered && Hovered != this) + { + Hovered->drop(); + Hovered = 0; + } + if ( HoveredNoSubelement && HoveredNoSubelement != this) + { + HoveredNoSubelement->drop(); + HoveredNoSubelement = 0; + } + + // get the root's children in case the root changes in future + const core::list<IGUIElement*>& children = getRootGUIElement()->getChildren(); + + while (!children.empty()) + (*children.getLast())->remove(); +} + + +//! called by ui if an event happened. +bool CGUIEnvironment::OnEvent(const SEvent& event) +{ + bool ret = false; + if (UserReceiver + && (event.EventType != EET_MOUSE_INPUT_EVENT) + && (event.EventType != EET_KEY_INPUT_EVENT) + && (event.EventType != EET_GUI_EVENT || event.GUIEvent.Caller != this)) + { + ret = UserReceiver->OnEvent(event); + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + +// +void CGUIEnvironment::OnPostRender( u32 time ) +{ + // launch tooltip + if ( ToolTip.Element == 0 && + HoveredNoSubelement && HoveredNoSubelement != this && + (time - ToolTip.EnterTime >= ToolTip.LaunchTime + || (time - ToolTip.LastTime >= ToolTip.RelaunchTime && time - ToolTip.LastTime < ToolTip.LaunchTime)) && + HoveredNoSubelement->getToolTipText().size() && + getSkin() && + getSkin()->getFont(EGDF_TOOLTIP) + ) + { + core::rect<s32> pos; + + pos.UpperLeftCorner = LastHoveredMousePos; + core::dimension2du dim = getSkin()->getFont(EGDF_TOOLTIP)->getDimension(HoveredNoSubelement->getToolTipText().c_str()); + dim.Width += getSkin()->getSize(EGDS_TEXT_DISTANCE_X)*2; + dim.Height += getSkin()->getSize(EGDS_TEXT_DISTANCE_Y)*2; + + pos.UpperLeftCorner.Y -= dim.Height+1; + pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + dim.Height-1; + pos.LowerRightCorner.X = pos.UpperLeftCorner.X + dim.Width; + + pos.constrainTo(getAbsolutePosition()); + + ToolTip.Element = addStaticText(HoveredNoSubelement->getToolTipText().c_str(), pos, true, true, this, -1, true); + ToolTip.Element->setOverrideColor(getSkin()->getColor(EGDC_TOOLTIP)); + ToolTip.Element->setBackgroundColor(getSkin()->getColor(EGDC_TOOLTIP_BACKGROUND)); + ToolTip.Element->setOverrideFont(getSkin()->getFont(EGDF_TOOLTIP)); + ToolTip.Element->setSubElement(true); + ToolTip.Element->grab(); + + s32 textHeight = ToolTip.Element->getTextHeight(); + pos = ToolTip.Element->getRelativePosition(); + pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + textHeight; + ToolTip.Element->setRelativePosition(pos); + } + + if (ToolTip.Element && ToolTip.Element->isVisible() ) // (isVisible() check only because we might use visibility for ToolTip one day) + { + ToolTip.LastTime = time; + + // got invisible or removed in the meantime? + if ( !HoveredNoSubelement || + !HoveredNoSubelement->isVisible() || + !HoveredNoSubelement->getParent() + ) // got invisible or removed in the meantime? + { + ToolTip.Element->remove(); + ToolTip.Element->drop(); + ToolTip.Element = 0; + } + } + + IGUIElement::OnPostRender ( time ); +} + + +// +void CGUIEnvironment::updateHoveredElement(core::position2d<s32> mousePos) +{ + IGUIElement* lastHovered = Hovered; + IGUIElement* lastHoveredNoSubelement = HoveredNoSubelement; + LastHoveredMousePos = mousePos; + + Hovered = getElementFromPoint(mousePos); + + if ( ToolTip.Element && Hovered == ToolTip.Element ) + { + // When the mouse is over the ToolTip we remove that so it will be re-created at a new position. + // Note that ToolTip.EnterTime does not get changed here, so it will be re-created at once. + ToolTip.Element->remove(); + ToolTip.Element->drop(); + ToolTip.Element = 0; + + // Get the real Hovered + Hovered = getElementFromPoint(mousePos); + } + + // for tooltips we want the element itself and not some of it's subelements + HoveredNoSubelement = Hovered; + while ( HoveredNoSubelement && HoveredNoSubelement->isSubElement() ) + { + HoveredNoSubelement = HoveredNoSubelement->getParent(); + } + + if (Hovered && Hovered != this) + Hovered->grab(); + if ( HoveredNoSubelement && HoveredNoSubelement != this) + HoveredNoSubelement->grab(); + + if (Hovered != lastHovered) + { + SEvent event; + event.EventType = EET_GUI_EVENT; + + if (lastHovered) + { + event.GUIEvent.Caller = lastHovered; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_ELEMENT_LEFT; + lastHovered->OnEvent(event); + } + + if ( Hovered ) + { + event.GUIEvent.Caller = Hovered; + event.GUIEvent.Element = Hovered; + event.GUIEvent.EventType = EGET_ELEMENT_HOVERED; + Hovered->OnEvent(event); + } + } + + if ( lastHoveredNoSubelement != HoveredNoSubelement ) + { + if (ToolTip.Element) + { + ToolTip.Element->remove(); + ToolTip.Element->drop(); + ToolTip.Element = 0; + } + + if ( HoveredNoSubelement ) + { + u32 now = os::Timer::getTime(); + ToolTip.EnterTime = now; + } + } + + if (lastHovered && lastHovered != this) + lastHovered->drop(); + if (lastHoveredNoSubelement && lastHoveredNoSubelement != this) + lastHoveredNoSubelement->drop(); +} + + +//! This sets a new event receiver for gui events. Usually you do not have to +//! use this method, it is used by the internal engine. +void CGUIEnvironment::setUserEventReceiver(IEventReceiver* evr) +{ + UserReceiver = evr; +} + + +//! posts an input event to the environment +bool CGUIEnvironment::postEventFromUser(const SEvent& event) +{ + switch(event.EventType) + { + case EET_GUI_EVENT: + // hey, why is the user sending gui events..? + break; + case EET_MOUSE_INPUT_EVENT: + + updateHoveredElement(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y)); + + if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) + if ( (Hovered && Hovered != Focus) || !Focus ) + { + setFocus(Hovered); + } + + // sending input to focus + if (Focus && Focus->OnEvent(event)) + return true; + + // focus could have died in last call + if (!Focus && Hovered) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Hovered->OnEvent(event); + } + + break; + case EET_KEY_INPUT_EVENT: + { + if (Focus && Focus->OnEvent(event)) + return true; + + // For keys we handle the event before changing focus to give elements the chance for catching the TAB + // Send focus changing event + if (event.EventType == EET_KEY_INPUT_EVENT && + event.KeyInput.PressedDown && + event.KeyInput.Key == KEY_TAB) + { + IGUIElement *next = getNextElement(event.KeyInput.Shift, event.KeyInput.Control); + if (next && next != Focus) + { + if (setFocus(next)) + return true; + } + } + + } + break; + default: + break; + } // end switch + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; +} + + +//! returns the current gui skin +IGUISkin* CGUIEnvironment::getSkin() const +{ + return CurrentSkin; +} + + +//! Sets a new GUI Skin +void CGUIEnvironment::setSkin(IGUISkin* skin) +{ + if (CurrentSkin==skin) + return; + + if (CurrentSkin) + CurrentSkin->drop(); + + CurrentSkin = skin; + + if (CurrentSkin) + CurrentSkin->grab(); +} + + +//! Creates a new GUI Skin based on a template. +/** \return Returns a pointer to the created skin. +If you no longer need the skin, you should call IGUISkin::drop(). +See IReferenceCounted::drop() for more information. */ +IGUISkin* CGUIEnvironment::createSkin(EGUI_SKIN_TYPE type) +{ + IGUISkin* skin = new CGUISkin(type, Driver); + + IGUIFont* builtinfont = getBuiltInFont(); + IGUIFontBitmap* bitfont = 0; + if (builtinfont && builtinfont->getType() == EGFT_BITMAP) + bitfont = (IGUIFontBitmap*)builtinfont; + + IGUISpriteBank* bank = 0; + skin->setFont(builtinfont); + + if (bitfont) + bank = bitfont->getSpriteBank(); + + skin->setSpriteBank(bank); + + return skin; +} + + +//! Returns the default element factory which can create all built in elements +IGUIElementFactory* CGUIEnvironment::getDefaultGUIElementFactory() const +{ + return getGUIElementFactory(0); +} + + +//! Adds an element factory to the gui environment. +/** Use this to extend the gui environment with new element types which it should be +able to create automaticly, for example when loading data from xml files. */ +void CGUIEnvironment::registerGUIElementFactory(IGUIElementFactory* factoryToAdd) +{ + if (factoryToAdd) + { + factoryToAdd->grab(); + GUIElementFactoryList.push_back(factoryToAdd); + } +} + + +//! Returns amount of registered scene node factories. +u32 CGUIEnvironment::getRegisteredGUIElementFactoryCount() const +{ + return GUIElementFactoryList.size(); +} + + +//! Returns a scene node factory by index +IGUIElementFactory* CGUIEnvironment::getGUIElementFactory(u32 index) const +{ + if (index < GUIElementFactoryList.size()) + return GUIElementFactoryList[index]; + else + return 0; +} + + +//! adds a GUI Element using its name +IGUIElement* CGUIEnvironment::addGUIElement(const c8* elementName, IGUIElement* parent) +{ + IGUIElement* node=0; + + if (!parent) + parent = this; + + for (s32 i=GUIElementFactoryList.size()-1; i>=0 && !node; --i) + node = GUIElementFactoryList[i]->addGUIElement(elementName, parent); + + + return node; +} + + +//! Saves the current gui into a file. +//! \param filename: Name of the file . +bool CGUIEnvironment::saveGUI(const io::path& filename, IGUIElement* start) +{ + io::IWriteFile* file = FileSystem->createAndWriteFile(filename); + if (!file) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + bool ret = saveGUI(file, start); + file->drop(); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! Saves the current gui into a file. +bool CGUIEnvironment::saveGUI(io::IWriteFile* file, IGUIElement* start) +{ + if (!file) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + io::IXMLWriter* writer = FileSystem->createXMLWriter(file); + if (!writer) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + writer->writeXMLHeader(); + writeGUIElement(writer, start ? start : this); + writer->drop(); + + return true; +} + + +//! Loads the gui. Note that the current gui is not cleared before. +//! \param filename: Name of the file. +bool CGUIEnvironment::loadGUI(const io::path& filename, IGUIElement* parent) +{ + io::IReadFile* read = FileSystem->createAndOpenFile(filename); + if (!read) + { + os::Printer::log("Unable to open gui file", filename, ELL_ERROR); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + bool ret = loadGUI(read, parent); + read->drop(); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! Loads the gui. Note that the current gui is not cleared before. +bool CGUIEnvironment::loadGUI(io::IReadFile* file, IGUIElement* parent) +{ + if (!file) + { + os::Printer::log("Unable to open GUI file", ELL_ERROR); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + io::IXMLReader* reader = FileSystem->createXMLReader(file); + if (!reader) + { + os::Printer::log("GUI is not a valid XML file", file->getFileName(), ELL_ERROR); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + // read file + while(reader->read()) + { + readGUIElement(reader, parent); + } + + // finish up + + reader->drop(); + return true; +} + + +//! reads an element +void CGUIEnvironment::readGUIElement(io::IXMLReader* reader, IGUIElement* node) +{ + if (!reader) + return; + + io::EXML_NODE nodeType = reader->getNodeType(); + + if (nodeType == io::EXN_NONE || nodeType == io::EXN_UNKNOWN || nodeType == io::EXN_ELEMENT_END) + return; + + IGUIElement* deferedNode = 0; + if (!wcscmp(IRR_XML_FORMAT_GUI_ENV, reader->getNodeName())) + { + // GuiEnvironment always must be this as it would serialize into a wrong element otherwise. + // So we use the given node next time + if ( node && node != this ) + deferedNode = node; + node = this; // root + } + else if (!wcscmp(IRR_XML_FORMAT_GUI_ELEMENT, reader->getNodeName())) + { + // find node type and create it + const core::stringc attrName = reader->getAttributeValue(IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE); + + node = addGUIElement(attrName.c_str(), node); + + if (!node) + os::Printer::log("Could not create GUI element of unknown type", attrName.c_str()); + } + + // read attributes + + while(reader->read()) + { + bool endreached = false; + + switch (reader->getNodeType()) + { + case io::EXN_ELEMENT_END: + if (!wcscmp(IRR_XML_FORMAT_GUI_ELEMENT, reader->getNodeName()) || + !wcscmp(IRR_XML_FORMAT_GUI_ENV, reader->getNodeName())) + { + endreached = true; + } + break; + case io::EXN_ELEMENT: + if (!wcscmp(L"attributes", reader->getNodeName())) + { + // read attributes + io::IAttributes* attr = FileSystem->createEmptyAttributes(Driver); + attr->read(reader, true); + + if (node) + node->deserializeAttributes(attr); + + attr->drop(); + } + else + if (!wcscmp(IRR_XML_FORMAT_GUI_ELEMENT, reader->getNodeName()) || + !wcscmp(IRR_XML_FORMAT_GUI_ENV, reader->getNodeName())) + { + if ( deferedNode ) + readGUIElement(reader, deferedNode); + else + readGUIElement(reader, node); + } + else + { + os::Printer::log("Found unknown element in irrlicht GUI file", + core::stringc(reader->getNodeName()).c_str()); + } + + break; + default: + break; + } + + if (endreached) + break; + } +} + + +//! writes an element +void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) +{ + if (!writer || !node ) + return; + + const wchar_t* name = 0; + + // write properties + + io::IAttributes* attr = FileSystem->createEmptyAttributes(); + node->serializeAttributes(attr); + + // all gui elements must have at least one attribute + // if they have nothing then we ignore them. + if (attr->getAttributeCount() != 0) + { + if (node == this) + { + name = IRR_XML_FORMAT_GUI_ENV; + writer->writeElement(name, false); + } + else + { + name = IRR_XML_FORMAT_GUI_ELEMENT; + writer->writeElement(name, false, IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE, + core::stringw(node->getTypeName()).c_str()); + } + + writer->writeLineBreak(); + writer->writeLineBreak(); + + attr->write(writer); + writer->writeLineBreak(); + } + + // write children + + core::list<IGUIElement*>::ConstIterator it = node->getChildren().begin(); + for (; it != node->getChildren().end(); ++it) + { + if (!(*it)->isSubElement()) + writeGUIElement(writer, (*it)); + } + + // write closing brace if required + if (attr->getAttributeCount() != 0) + { + writer->writeClosingTag(name); + writer->writeLineBreak(); + writer->writeLineBreak(); + } + + attr->drop(); +} + + +//! Writes attributes of the environment +void CGUIEnvironment::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IGUISkin* skin = getSkin(); + + if (skin) + { + out->addEnum("Skin", getSkin()->getType(), GUISkinTypeNames); + skin->serializeAttributes(out, options); + } +} + + +//! Reads attributes of the environment +void CGUIEnvironment::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + if (in->existsAttribute("Skin")) + { + IGUISkin *skin = getSkin(); + + EGUI_SKIN_TYPE t = (EGUI_SKIN_TYPE) in->getAttributeAsEnumeration("Skin",GUISkinTypeNames); + if ( !skin || t != skin->getType()) + { + skin = createSkin(t); + setSkin(skin); + skin->drop(); + } + + skin = getSkin(); + + if (skin) + { + skin->deserializeAttributes(in, options); + } + + } + + RelativeRect = AbsoluteRect = + core::rect<s32>(core::position2d<s32>(0,0), + Driver ? core::dimension2di(Driver->getScreenSize()) : core::dimension2d<s32>(0,0)); +} + + +//! adds a button. The returned pointer must not be dropped. +IGUIButton* CGUIEnvironment::addButton(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text, const wchar_t *tooltiptext) +{ + IGUIButton* button = new CGUIButton(this, parent ? parent : this, id, rectangle); + if (text) + button->setText(text); + + if ( tooltiptext ) + button->setToolTipText ( tooltiptext ); + + button->drop(); + return button; +} + + +//! adds a window. The returned pointer must not be dropped. +IGUIWindow* CGUIEnvironment::addWindow(const core::rect<s32>& rectangle, bool modal, + const wchar_t* text, IGUIElement* parent, s32 id) +{ + parent = parent ? parent : this; + + IGUIWindow* win = new CGUIWindow(this, parent, id, rectangle); + if (text) + win->setText(text); + win->drop(); + + if (modal) + { + // Careful, don't just set the modal as parent above. That will mess up the focus (and is hard to change because we have to be very + // careful not to get virtual function call, like OnEvent, in the window. + CGUIModalScreen * modalScreen = new CGUIModalScreen(this, parent, -1); + modalScreen->drop(); + modalScreen->addChild(win); + } + + return win; +} + + +//! adds a modal screen. The returned pointer must not be dropped. +IGUIElement* CGUIEnvironment::addModalScreen(IGUIElement* parent) +{ + parent = parent ? parent : this; + + IGUIElement *win = new CGUIModalScreen(this, parent, -1); + win->drop(); + + return win; +} + + +//! Adds a message box. +IGUIWindow* CGUIEnvironment::addMessageBox(const wchar_t* caption, const wchar_t* text, + bool modal, s32 flag, IGUIElement* parent, s32 id, video::ITexture* image) +{ + if (!CurrentSkin) + return 0; + + parent = parent ? parent : this; + + core::rect<s32> rect; + core::dimension2d<u32> screenDim, msgBoxDim; + + screenDim.Width = parent->getAbsolutePosition().getWidth(); + screenDim.Height = parent->getAbsolutePosition().getHeight(); + msgBoxDim.Width = 2; + msgBoxDim.Height = 2; + + rect.UpperLeftCorner.X = (screenDim.Width - msgBoxDim.Width) / 2; + rect.UpperLeftCorner.Y = (screenDim.Height - msgBoxDim.Height) / 2; + rect.LowerRightCorner.X = rect.UpperLeftCorner.X + msgBoxDim.Width; + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + msgBoxDim.Height; + + IGUIWindow* win = new CGUIMessageBox(this, caption, text, flag, + parent, id, rect, image); + win->drop(); + + if (modal) + { + // Careful, don't just set the modal as parent above. That will mess up the focus (and is hard to change because we have to be very + // careful not to get virtual function call, like OnEvent, in the CGUIMessageBox. + CGUIModalScreen * modalScreen = new CGUIModalScreen(this, parent, -1); + modalScreen->drop(); + modalScreen->addChild( win ); + } + + + return win; +} + + +//! adds a scrollbar. The returned pointer must not be dropped. +IGUIScrollBar* CGUIEnvironment::addScrollBar(bool horizontal, const core::rect<s32>& rectangle, IGUIElement* parent, s32 id) +{ + IGUIScrollBar* bar = new CGUIScrollBar(horizontal, this, parent ? parent : this, id, rectangle); + bar->drop(); + return bar; +} + +//! Adds a table to the environment +IGUITable* CGUIEnvironment::addTable(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, bool drawBackground) +{ + CGUITable* b = new CGUITable(this, parent ? parent : this, id, rectangle, true, drawBackground, false); + b->drop(); + return b; +} + + +//! Adds an image element. +IGUIImage* CGUIEnvironment::addImage(video::ITexture* image, core::position2d<s32> pos, + bool useAlphaChannel, IGUIElement* parent, s32 id, const wchar_t* text) +{ + core::dimension2d<s32> sz(0,0); + if (image) + sz = core::dimension2d<s32>(image->getOriginalSize()); + + IGUIImage* img = new CGUIImage(this, parent ? parent : this, + id, core::rect<s32>(pos, sz)); + + if (text) + img->setText(text); + + if (useAlphaChannel) + img->setUseAlphaChannel(true); + + if (image) + img->setImage(image); + + img->drop(); + return img; +} + + +//! adds an image. The returned pointer must not be dropped. +IGUIImage* CGUIEnvironment::addImage(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text, bool useAlphaChannel) +{ + IGUIImage* img = new CGUIImage(this, parent ? parent : this, + id, rectangle); + + if (text) + img->setText(text); + + if ( useAlphaChannel ) + img->setUseAlphaChannel(true); + + img->drop(); + return img; +} + + +//! adds an mesh viewer. The returned pointer must not be dropped. +IGUIMeshViewer* CGUIEnvironment::addMeshViewer(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text) +{ + IGUIMeshViewer* v = new CGUIMeshViewer(this, parent ? parent : this, + id, rectangle); + + if (text) + v->setText(text); + + v->drop(); + return v; +} + + +//! adds a checkbox +IGUICheckBox* CGUIEnvironment::addCheckBox(bool checked, const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text) +{ + IGUICheckBox* b = new CGUICheckBox(checked, this, + parent ? parent : this , id , rectangle); + + if (text) + b->setText(text); + + b->drop(); + return b; +} + + +//! adds a list box +IGUIListBox* CGUIEnvironment::addListBox(const core::rect<s32>& rectangle, + IGUIElement* parent, s32 id, bool drawBackground) +{ + IGUIListBox* b = new CGUIListBox(this, parent ? parent : this, id, rectangle, + true, drawBackground, false); + + if (CurrentSkin && CurrentSkin->getSpriteBank()) + { + b->setSpriteBank(CurrentSkin->getSpriteBank()); + } + else if (getBuiltInFont() && getBuiltInFont()->getType() == EGFT_BITMAP) + { + b->setSpriteBank( ((IGUIFontBitmap*)getBuiltInFont())->getSpriteBank()); + } + + b->drop(); + return b; +} + +//! adds a tree view +IGUITreeView* CGUIEnvironment::addTreeView(const core::rect<s32>& rectangle, + IGUIElement* parent, s32 id, + bool drawBackground, + bool scrollBarVertical, bool scrollBarHorizontal) +{ + IGUITreeView* b = new CGUITreeView(this, parent ? parent : this, id, rectangle, + true, drawBackground, scrollBarVertical, scrollBarHorizontal); + + b->setIconFont ( getBuiltInFont () ); + b->drop(); + return b; +} + +//! adds a file open dialog. The returned pointer must not be dropped. +IGUIFileOpenDialog* CGUIEnvironment::addFileOpenDialog(const wchar_t* title, + bool modal, IGUIElement* parent, s32 id, + bool restoreCWD, io::path::char_type* startDir) +{ + parent = parent ? parent : this; + + IGUIFileOpenDialog* d = new CGUIFileOpenDialog(title, this, parent, id, + restoreCWD, startDir); + d->drop(); + + if (modal) + { + // Careful, don't just set the modal as parent above. That will mess up the focus (and is hard to change because we have to be very + // careful not to get virtual function call, like OnEvent, in the window. + CGUIModalScreen * modalScreen = new CGUIModalScreen(this, parent, -1); + modalScreen->drop(); + modalScreen->addChild(d); + } + + return d; +} + + +//! adds a color select dialog. The returned pointer must not be dropped. +IGUIColorSelectDialog* CGUIEnvironment::addColorSelectDialog(const wchar_t* title, + bool modal, IGUIElement* parent, s32 id) +{ + parent = parent ? parent : this; + + IGUIColorSelectDialog* d = new CGUIColorSelectDialog( title, + this, parent, id); + d->drop(); + + if (modal) + { + // Careful, don't just set the modal as parent above. That will mess up the focus (and is hard to change because we have to be very + // careful not to get virtual function call, like OnEvent, in the window. + CGUIModalScreen * modalScreen = new CGUIModalScreen(this, parent, -1); + modalScreen->drop(); + modalScreen->addChild(d); + } + + return d; +} + + +//! adds a static text. The returned pointer must not be dropped. +IGUIStaticText* CGUIEnvironment::addStaticText(const wchar_t* text, + const core::rect<s32>& rectangle, + bool border, bool wordWrap, + IGUIElement* parent, s32 id, bool background) +{ + IGUIStaticText* d = new CGUIStaticText(text, border, this, + parent ? parent : this, id, rectangle, background); + + d->setWordWrap(wordWrap); + d->drop(); + + return d; +} + + +//! Adds an edit box. The returned pointer must not be dropped. +IGUIEditBox* CGUIEnvironment::addEditBox(const wchar_t* text, + const core::rect<s32>& rectangle, bool border, + IGUIElement* parent, s32 id) +{ + IGUIEditBox* d = new CGUIEditBox(text, border, this, + parent ? parent : this, id, rectangle); + + d->drop(); + return d; +} + + +//! Adds a spin box to the environment +IGUISpinBox* CGUIEnvironment::addSpinBox(const wchar_t* text, + const core::rect<s32> &rectangle, + bool border,IGUIElement* parent, s32 id) +{ + IGUISpinBox* d = new CGUISpinBox(text, border,this, + parent ? parent : this, id, rectangle); + + d->drop(); + return d; +} + + +//! Adds a tab control to the environment. +IGUITabControl* CGUIEnvironment::addTabControl(const core::rect<s32>& rectangle, + IGUIElement* parent, bool fillbackground, bool border, s32 id) +{ + IGUITabControl* t = new CGUITabControl(this, parent ? parent : this, + rectangle, fillbackground, border, id); + t->drop(); + return t; +} + + +//! Adds tab to the environment. +IGUITab* CGUIEnvironment::addTab(const core::rect<s32>& rectangle, + IGUIElement* parent, s32 id) +{ + IGUITab* t = new CGUITab(-1, this, parent ? parent : this, + rectangle, id); + t->drop(); + return t; +} + + +//! Adds a context menu to the environment. +IGUIContextMenu* CGUIEnvironment::addContextMenu(const core::rect<s32>& rectangle, + IGUIElement* parent, s32 id) +{ + IGUIContextMenu* c = new CGUIContextMenu(this, + parent ? parent : this, id, rectangle, true); + c->drop(); + return c; +} + + +//! Adds a menu to the environment. +IGUIContextMenu* CGUIEnvironment::addMenu(IGUIElement* parent, s32 id) +{ + if (!parent) + parent = this; + + IGUIContextMenu* c = new CGUIMenu(this, + parent, id, core::rect<s32>(0,0, + parent->getAbsolutePosition().getWidth(), + parent->getAbsolutePosition().getHeight())); + + c->drop(); + return c; +} + + +//! Adds a toolbar to the environment. It is like a menu is always placed on top +//! in its parent, and contains buttons. +IGUIToolBar* CGUIEnvironment::addToolBar(IGUIElement* parent, s32 id) +{ + if (!parent) + parent = this; + + IGUIToolBar* b = new CGUIToolBar(this, parent, id, core::rect<s32>(0,0,10,10)); + b->drop(); + return b; +} + + +//! Adds an element for fading in or out. +IGUIInOutFader* CGUIEnvironment::addInOutFader(const core::rect<s32>* rectangle, IGUIElement* parent, s32 id) +{ + core::rect<s32> rect; + + if (rectangle) + rect = *rectangle; + else if (Driver) + rect = core::rect<s32>(core::position2d<s32>(0,0), core::dimension2di(Driver->getScreenSize())); + + if (!parent) + parent = this; + + IGUIInOutFader* fader = new CGUIInOutFader(this, parent, id, rect); + fader->drop(); + return fader; +} + + +//! Adds a combo box to the environment. +IGUIComboBox* CGUIEnvironment::addComboBox(const core::rect<s32>& rectangle, + IGUIElement* parent, s32 id) +{ + IGUIComboBox* t = new CGUIComboBox(this, parent ? parent : this, + id, rectangle); + t->drop(); + return t; +} + + +//! returns the font +IGUIFont* CGUIEnvironment::getFont(const io::path& filename) +{ + // search existing font + + SFont f; + f.NamedPath.setPath(filename); + + s32 index = Fonts.binary_search(f); + if (index != -1) + return Fonts[index].Font; + + // font doesn't exist, attempt to load it + + // does the file exist? + + if (!FileSystem->existFile(filename)) + { + os::Printer::log("Could not load font because the file does not exist", f.NamedPath.getPath(), ELL_ERROR); + return 0; + } + + IGUIFont* ifont=0; + io::IXMLReader *xml = FileSystem->createXMLReader(filename ); + if (xml) + { + // this is an XML font, but we need to know what type + EGUI_FONT_TYPE t = EGFT_CUSTOM; + + bool found=false; + while(!found && xml->read()) + { + if (xml->getNodeType() == io::EXN_ELEMENT) + { + if (core::stringw(L"font") == xml->getNodeName()) + { + if (core::stringw(L"vector") == xml->getAttributeValue(L"type")) + { + t = EGFT_VECTOR; + found=true; + } + else if (core::stringw(L"bitmap") == xml->getAttributeValue(L"type")) + { + t = EGFT_BITMAP; + found=true; + } + else found=true; + } + } + } + + if (t==EGFT_BITMAP) + { + CGUIFont* font = new CGUIFont(this, filename); + ifont = (IGUIFont*)font; + // change working directory, for loading textures + io::path workingDir = FileSystem->getWorkingDirectory(); + FileSystem->changeWorkingDirectoryTo(FileSystem->getFileDir(f.NamedPath.getPath())); + + // load the font + if (!font->load(xml)) + { + font->drop(); + font = 0; + ifont = 0; + } + // change working dir back again + FileSystem->changeWorkingDirectoryTo( workingDir ); + } + else if (t==EGFT_VECTOR) + { + // todo: vector fonts + os::Printer::log("Unable to load font, XML vector fonts are not supported yet", f.NamedPath, ELL_ERROR); + + //CGUIFontVector* font = new CGUIFontVector(Driver); + //ifont = (IGUIFont*)font; + //if (!font->load(xml)) + } + xml->drop(); + } + + + if (!ifont) + { + + CGUIFont* font = new CGUIFont(this, f.NamedPath.getPath() ); + ifont = (IGUIFont*)font; + if (!font->load(f.NamedPath.getPath())) + { + font->drop(); + return 0; + } + } + + // add to fonts. + + f.Font = ifont; + Fonts.push_back(f); + + return ifont; +} + + +//! add an externally loaded font +IGUIFont* CGUIEnvironment::addFont(const io::path& name, IGUIFont* font) +{ + if (font) + { + SFont f; + f.NamedPath.setPath(name); + s32 index = Fonts.binary_search(f); + if (index != -1) + return Fonts[index].Font; + f.Font = font; + Fonts.push_back(f); + font->grab(); + } + return font; +} + +//! remove loaded font +void CGUIEnvironment::removeFont(IGUIFont* font) +{ + if ( !font ) + return; + for ( u32 i=0; i<Fonts.size(); ++i ) + { + if ( Fonts[i].Font == font ) + { + Fonts[i].Font->drop(); + Fonts.erase(i); + return; + } + } +} + +//! returns default font +IGUIFont* CGUIEnvironment::getBuiltInFont() const +{ + if (Fonts.empty()) + return 0; + + return Fonts[0].Font; +} + + +IGUISpriteBank* CGUIEnvironment::getSpriteBank(const io::path& filename) +{ + // search for the file name + + SSpriteBank b; + b.NamedPath.setPath(filename); + + s32 index = Banks.binary_search(b); + if (index != -1) + return Banks[index].Bank; + + // we don't have this sprite bank, we should load it + if (!FileSystem->existFile(b.NamedPath.getPath())) + { + if ( filename != DefaultFontName ) + { + os::Printer::log("Could not load sprite bank because the file does not exist", b.NamedPath.getPath(), ELL_DEBUG); + } + return 0; + } + + // todo: load it! + + return 0; +} + + +IGUISpriteBank* CGUIEnvironment::addEmptySpriteBank(const io::path& name) +{ + // no duplicate names allowed + + SSpriteBank b; + b.NamedPath.setPath(name); + + const s32 index = Banks.binary_search(b); + if (index != -1) + return 0; + + // create a new sprite bank + + b.Bank = new CGUISpriteBank(this); + Banks.push_back(b); + + return b.Bank; +} + + +//! Creates the image list from the given texture. +IGUIImageList* CGUIEnvironment::createImageList( video::ITexture* texture, + core::dimension2d<s32> imageSize, bool useAlphaChannel ) +{ + CGUIImageList* imageList = new CGUIImageList( Driver ); + if( !imageList->createImageList( texture, imageSize, useAlphaChannel ) ) + { + imageList->drop(); + return 0; + } + + return imageList; +} + +//! Returns the root gui element. +IGUIElement* CGUIEnvironment::getRootGUIElement() +{ + return this; +} + + +//! Returns the next element in the tab group starting at the focused element +IGUIElement* CGUIEnvironment::getNextElement(bool reverse, bool group) +{ + // start the search at the root of the current tab group + IGUIElement *startPos = Focus ? Focus->getTabGroup() : 0; + s32 startOrder = -1; + + // if we're searching for a group + if (group && startPos) + { + startOrder = startPos->getTabOrder(); + } + else + if (!group && Focus && !Focus->isTabGroup()) + { + startOrder = Focus->getTabOrder(); + if (startOrder == -1) + { + // this element is not part of the tab cycle, + // but its parent might be... + IGUIElement *el = Focus; + while (el && el->getParent() && startOrder == -1) + { + el = el->getParent(); + startOrder = el->getTabOrder(); + } + + } + } + + if (group || !startPos) + startPos = this; // start at the root + + // find the element + IGUIElement *closest = 0; + IGUIElement *first = 0; + startPos->getNextElement(startOrder, reverse, group, first, closest); + + if (closest) + return closest; // we found an element + else if (first) + return first; // go to the end or the start + else if (group) + return this; // no group found? root group + else + return 0; +} + + +//! creates an GUI Environment +IGUIEnvironment* createGUIEnvironment(io::IFileSystem* fs, + video::IVideoDriver* Driver, + IOSOperator* op) +{ + return new CGUIEnvironment(fs, Driver, op); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.d new file mode 100644 index 0000000..e4563c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.d @@ -0,0 +1,2 @@ +CGUIEnvironment.o: CGUIEnvironment.cpp CGUIEnvironment.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.h new file mode 100644 index 0000000..6b3be3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIEnvironment.h @@ -0,0 +1,323 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_ENVIRONMENT_H_INCLUDED__ +#define __C_GUI_ENVIRONMENT_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" +#include "IGUIElement.h" +#include "irrArray.h" +#include "IFileSystem.h" +#include "IOSOperator.h" + +namespace irr +{ +namespace io +{ + class IXMLWriter; +} +namespace gui +{ + +class CGUIEnvironment : public IGUIEnvironment, public IGUIElement +{ +public: + + //! constructor + CGUIEnvironment(io::IFileSystem* fs, video::IVideoDriver* driver, IOSOperator* op); + + //! destructor + virtual ~CGUIEnvironment(); + + //! draws all gui elements + virtual void drawAll(); + + //! returns the current video driver + virtual video::IVideoDriver* getVideoDriver() const; + + //! returns pointer to the filesystem + virtual io::IFileSystem* getFileSystem() const; + + //! returns a pointer to the OS operator + virtual IOSOperator* getOSOperator() const; + + //! posts an input event to the environment + virtual bool postEventFromUser(const SEvent& event); + + //! This sets a new event receiver for gui events. Usually you do not have to + //! use this method, it is used by the internal engine. + virtual void setUserEventReceiver(IEventReceiver* evr); + + //! removes all elements from the environment + virtual void clear(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! returns the current gui skin + virtual IGUISkin* getSkin() const; + + //! Sets a new GUI Skin + virtual void setSkin(IGUISkin* skin); + + //! Creates a new GUI Skin based on a template. + /** \return Returns a pointer to the created skin. + If you no longer need the skin, you should call IGUISkin::drop(). + See IReferenceCounted::drop() for more information. */ + virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type); + + //! Creates the image list from the given texture. + virtual IGUIImageList* createImageList( video::ITexture* texture, + core::dimension2d<s32> imageSize, bool useAlphaChannel ); + + //! returns the font + virtual IGUIFont* getFont(const io::path& filename); + + //! add an externally loaded font + virtual IGUIFont* addFont(const io::path& name, IGUIFont* font); + + //! remove loaded font + virtual void removeFont(IGUIFont* font); + + //! returns default font + virtual IGUIFont* getBuiltInFont() const; + + //! returns the sprite bank + virtual IGUISpriteBank* getSpriteBank(const io::path& filename); + + //! returns the sprite bank + virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name); + + //! adds an button. The returned pointer must not be dropped. + virtual IGUIButton* addButton(const core::rect<s32>& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext = 0); + + //! adds a window. The returned pointer must not be dropped. + virtual IGUIWindow* addWindow(const core::rect<s32>& rectangle, bool modal = false, + const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1); + + //! adds a modal screen. The returned pointer must not be dropped. + virtual IGUIElement* addModalScreen(IGUIElement* parent); + + //! Adds a message box. + virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0, + bool modal = true, s32 flag = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0); + + //! adds a scrollbar. The returned pointer must not be dropped. + virtual IGUIScrollBar* addScrollBar(bool horizontal, const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1); + + //! Adds an image element. + virtual IGUIImage* addImage(video::ITexture* image, core::position2d<s32> pos, + bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0); + + //! adds an image. The returned pointer must not be dropped. + virtual IGUIImage* addImage(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true); + + //! adds a checkbox + virtual IGUICheckBox* addCheckBox(bool checked, const core::rect<s32>& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0); + + //! adds a list box + virtual IGUIListBox* addListBox(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false); + + //! adds a tree view + virtual IGUITreeView* addTreeView(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false, + bool scrollBarVertical = true, bool scrollBarHorizontal = false); + + //! adds an mesh viewer. The returned pointer must not be dropped. + virtual IGUIMeshViewer* addMeshViewer(const core::rect<s32>& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0); + + //! Adds a file open dialog. + virtual IGUIFileOpenDialog* addFileOpenDialog(const wchar_t* title = 0, + bool modal=true, IGUIElement* parent=0, s32 id=-1, + bool restoreCWD=false, io::path::char_type* startDir=0); + + //! Adds a color select dialog. + virtual IGUIColorSelectDialog* addColorSelectDialog(const wchar_t* title = 0, bool modal=true, IGUIElement* parent=0, s32 id=-1); + + //! adds a static text. The returned pointer must not be dropped. + virtual IGUIStaticText* addStaticText(const wchar_t* text, const core::rect<s32>& rectangle, + bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, bool drawBackground = false); + + //! Adds an edit box. The returned pointer must not be dropped. + virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect<s32>& rectangle, + bool border=false, IGUIElement* parent=0, s32 id=-1); + + //! Adds a spin box to the environment + virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect<s32>& rectangle, + bool border=false,IGUIElement* parent=0, s32 id=-1); + + //! Adds a tab control to the environment. + virtual IGUITabControl* addTabControl(const core::rect<s32>& rectangle, + IGUIElement* parent=0, bool fillbackground=false, bool border=true, s32 id=-1); + + //! Adds tab to the environment. + virtual IGUITab* addTab(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1); + + //! Adds a context menu to the environment. + virtual IGUIContextMenu* addContextMenu(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1); + + //! Adds a menu to the environment. + virtual IGUIContextMenu* addMenu(IGUIElement* parent=0, s32 id=-1); + + //! Adds a toolbar to the environment. It is like a menu is always placed on top + //! in its parent, and contains buttons. + virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1); + + //! Adds a combo box to the environment. + virtual IGUIComboBox* addComboBox(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1); + + //! Adds a table element. + virtual IGUITable* addTable(const core::rect<s32>& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false); + + //! sets the focus to an element + virtual bool setFocus(IGUIElement* element); + + //! removes the focus from an element + virtual bool removeFocus(IGUIElement* element); + + //! Returns if the element has focus + virtual bool hasFocus(IGUIElement* element) const; + + //! Returns the element with the focus + virtual IGUIElement* getFocus() const; + + //! Returns the element last known to be under the mouse + virtual IGUIElement* getHovered() const; + + //! Adds an element for fading in or out. + virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1); + + //! Returns the root gui element. + virtual IGUIElement* getRootGUIElement(); + + virtual void OnPostRender( u32 time ); + + //! Returns the default element factory which can create all built in elements + virtual IGUIElementFactory* getDefaultGUIElementFactory() const; + + //! Adds an element factory to the gui environment. + /** Use this to extend the gui environment with new element types which it should be + able to create automaticly, for example when loading data from xml files. */ + virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd); + + //! Returns amount of registered scene node factories. + virtual u32 getRegisteredGUIElementFactoryCount() const; + + //! Returns a scene node factory by index + virtual IGUIElementFactory* getGUIElementFactory(u32 index) const; + + //! Adds a GUI Element by its name + virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0); + + //! Saves the current gui into a file. + /** \param filename: Name of the file. + \param start: The element to start saving from. + if not specified, the root element will be used */ + virtual bool saveGUI( const io::path& filename, IGUIElement* start=0); + + //! Saves the current gui into a file. + /** \param file: The file to save the GUI to. + \param start: The element to start saving from. + if not specified, the root element will be used */ + virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0); + + //! Loads the gui. Note that the current gui is not cleared before. + /** \param filename: Name of the file. + \param parent: The parent of all loaded GUI elements, + if not specified, the root element will be used */ + virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0); + + //! Loads the gui. Note that the current gui is not cleared before. + /** \param file: IReadFile to load the GUI from + \param parent: The parent of all loaded GUI elements, + if not specified, the root element will be used */ + virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0); + + //! Writes attributes of the environment + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the environment. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! writes an element + virtual void writeGUIElement(io::IXMLWriter* writer, IGUIElement* node); + + //! reads an element + virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node); + +private: + + IGUIElement* getNextElement(bool reverse=false, bool group=false); + + void updateHoveredElement(core::position2d<s32> mousePos); + + void loadBuiltInFont(); + + struct SFont + { + io::SNamedPath NamedPath; + IGUIFont* Font; + + bool operator < (const SFont& other) const + { + return (NamedPath < other.NamedPath); + } + }; + + struct SSpriteBank + { + io::SNamedPath NamedPath; + IGUISpriteBank* Bank; + + bool operator < (const SSpriteBank& other) const + { + return (NamedPath < other.NamedPath); + } + }; + + struct SToolTip + { + IGUIStaticText* Element; + u32 LastTime; + u32 EnterTime; + u32 LaunchTime; + u32 RelaunchTime; + }; + + SToolTip ToolTip; + + core::array<IGUIElementFactory*> GUIElementFactoryList; + + core::array<SFont> Fonts; + core::array<SSpriteBank> Banks; + video::IVideoDriver* Driver; + IGUIElement* Hovered; + IGUIElement* HoveredNoSubelement; // subelements replaced by their parent, so you only have 'real' elements here + IGUIElement* Focus; + core::position2d<s32> LastHoveredMousePos; + IGUISkin* CurrentSkin; + io::IFileSystem* FileSystem; + IEventReceiver* UserReceiver; + IOSOperator* Operator; + static const io::path DefaultFontName; +}; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_ENVIRONMENT_H_INCLUDED__ + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.cpp new file mode 100644 index 0000000..47d71b7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.cpp @@ -0,0 +1,446 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIFileOpenDialog.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include <locale.h> + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIButton.h" +#include "IGUIStaticText.h" +#include "IGUIFont.h" +#include "IGUIFontBitmap.h" +#include "IFileList.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +const s32 FOD_WIDTH = 350; +const s32 FOD_HEIGHT = 250; + + +//! constructor +CGUIFileOpenDialog::CGUIFileOpenDialog(const wchar_t* title, + IGUIEnvironment* environment, IGUIElement* parent, s32 id, + bool restoreCWD, io::path::char_type* startDir) +: IGUIFileOpenDialog(environment, parent, id, + core::rect<s32>((parent->getAbsolutePosition().getWidth()-FOD_WIDTH)/2, + (parent->getAbsolutePosition().getHeight()-FOD_HEIGHT)/2, + (parent->getAbsolutePosition().getWidth()-FOD_WIDTH)/2+FOD_WIDTH, + (parent->getAbsolutePosition().getHeight()-FOD_HEIGHT)/2+FOD_HEIGHT)), + FileNameText(0), FileList(0), Dragging(false) +{ + #ifdef _DEBUG + IGUIElement::setDebugName("CGUIFileOpenDialog"); + #endif + + Text = title; + + FileSystem = Environment?Environment->getFileSystem():0; + + if (FileSystem) + { + FileSystem->grab(); + + if (restoreCWD) + RestoreDirectory = FileSystem->getWorkingDirectory(); + if (startDir) + { + StartDirectory = startDir; + FileSystem->changeWorkingDirectoryTo(startDir); + } + } + else + return; + + IGUISpriteBank* sprites = 0; + video::SColor color(255,255,255,255); + IGUISkin* skin = Environment->getSkin(); + if (skin) + { + sprites = skin->getSpriteBank(); + color = skin->getColor(EGDC_WINDOW_SYMBOL); + } + + const s32 buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + const s32 posx = RelativeRect.getWidth() - buttonw - 4; + + CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, + L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close"); + CloseButton->setSubElement(true); + CloseButton->setTabStop(false); + if (sprites) + { + CloseButton->setSpriteBank(sprites); + CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); + CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color); + } + CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + CloseButton->grab(); + + OKButton = Environment->addButton( + core::rect<s32>(RelativeRect.getWidth()-80, 30, RelativeRect.getWidth()-10, 50), + this, -1, skin ? skin->getDefaultText(EGDT_MSG_BOX_OK) : L"OK"); + OKButton->setSubElement(true); + OKButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + OKButton->grab(); + + CancelButton = Environment->addButton( + core::rect<s32>(RelativeRect.getWidth()-80, 55, RelativeRect.getWidth()-10, 75), + this, -1, skin ? skin->getDefaultText(EGDT_MSG_BOX_CANCEL) : L"Cancel"); + CancelButton->setSubElement(true); + CancelButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + CancelButton->grab(); + + FileBox = Environment->addListBox(core::rect<s32>(10, 55, RelativeRect.getWidth()-90, 230), this, -1, true); + FileBox->setSubElement(true); + FileBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + FileBox->grab(); + + FileNameText = Environment->addEditBox(0, core::rect<s32>(10, 30, RelativeRect.getWidth()-90, 50), true, this); + FileNameText->setSubElement(true); + FileNameText->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + FileNameText->grab(); + + setTabGroup(true); + + fillListBox(); +} + + +//! destructor +CGUIFileOpenDialog::~CGUIFileOpenDialog() +{ + if (CloseButton) + CloseButton->drop(); + + if (OKButton) + OKButton->drop(); + + if (CancelButton) + CancelButton->drop(); + + if (FileBox) + FileBox->drop(); + + if (FileNameText) + FileNameText->drop(); + + if (FileSystem) + { + // revert to original CWD if path was set in constructor + if (RestoreDirectory.size()) + FileSystem->changeWorkingDirectoryTo(RestoreDirectory); + FileSystem->drop(); + } + + if (FileList) + FileList->drop(); +} + + +//! returns the filename of the selected file. Returns NULL, if no file was selected. +const wchar_t* CGUIFileOpenDialog::getFileName() const +{ + return FileName.c_str(); +} + +//! Returns the directory of the selected file. Returns NULL, if no directory was selected. +const io::path& CGUIFileOpenDialog::getDirectoryName() +{ + FileSystem->flattenFilename ( FileDirectory ); + return FileDirectory; +} + + +//! called if an event happened. +bool CGUIFileOpenDialog::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case EGET_ELEMENT_FOCUS_LOST: + Dragging = false; + break; + case EGET_BUTTON_CLICKED: + if (event.GUIEvent.Caller == CloseButton || + event.GUIEvent.Caller == CancelButton) + { + sendCancelEvent(); + remove(); + return true; + } + else + if (event.GUIEvent.Caller == OKButton ) + { + if ( FileDirectory != L"" ) + { + sendSelectedEvent( EGET_DIRECTORY_SELECTED ); + } + if ( FileName != L"" ) + { + sendSelectedEvent( EGET_FILE_SELECTED ); + remove(); + return true; + } + } + break; + + case EGET_LISTBOX_CHANGED: + { + s32 selected = FileBox->getSelected(); + if (FileList && FileSystem) + { + if (FileList->isDirectory(selected)) + { + FileName = L""; + FileDirectory = FileList->getFullFileName(selected); + } + else + { + FileDirectory = L""; + FileName = FileList->getFullFileName(selected); + } + return true; + } + } + break; + + case EGET_LISTBOX_SELECTED_AGAIN: + { + const s32 selected = FileBox->getSelected(); + if (FileList && FileSystem) + { + if (FileList->isDirectory(selected)) + { + FileDirectory = FileList->getFullFileName(selected); + FileSystem->changeWorkingDirectoryTo(FileList->getFileName(selected)); + fillListBox(); + FileName = ""; + } + else + { + FileName = FileList->getFullFileName(selected); + } + return true; + } + } + break; + case EGET_EDITBOX_ENTER: + if (event.GUIEvent.Caller == FileNameText) + { + io::path dir( FileNameText->getText () ); + if ( FileSystem->changeWorkingDirectoryTo( dir ) ) + { + fillListBox(); + FileName = L""; + } + return true; + } + break; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_MOUSE_WHEEL: + return FileBox->OnEvent(event); + case EMIE_LMOUSE_PRESSED_DOWN: + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + Dragging = true; + Environment->setFocus(this); + return true; + case EMIE_LMOUSE_LEFT_UP: + Dragging = false; + return true; + case EMIE_MOUSE_MOVED: + + if ( !event.MouseInput.isLeftPressed () ) + Dragging = false; + + if (Dragging) + { + // gui window should not be dragged outside its parent + if (Parent) + if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || + event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || + event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || + event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) + + return true; + + move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + return true; + } + break; + default: + break; + } + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +//! draws the element and its children +void CGUIFileOpenDialog::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + + core::rect<s32> rect = AbsoluteRect; + + rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), + rect, &AbsoluteClippingRect); + + if (Text.size()) + { + rect.UpperLeftCorner.X += 2; + rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; + + IGUIFont* font = skin->getFont(EGDF_WINDOW); + if (font) + font->draw(Text.c_str(), rect, + skin->getColor(EGDC_ACTIVE_CAPTION), + false, true, &AbsoluteClippingRect); + } + + IGUIElement::draw(); +} + + +//! Writes attributes of the element. +/* Not sure if this will really work out properly. Saving paths can be +rather problematic. */ +void CGUIFileOpenDialog::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IGUIFileOpenDialog::serializeAttributes(out,options); + + out->addString("StartDirectory", StartDirectory.c_str()); + out->addBool("RestoreDirectory", (RestoreDirectory.size()!=0)); +} + + +//! Reads attributes of the element +/* Note that thiese paths changes will happen at arbitrary places upon +load of the gui description. This may be undesired. */ +void CGUIFileOpenDialog::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + StartDirectory = in->getAttributeAsString("StartDirectory"); + const bool restore = in->getAttributeAsBool("RestoreDirectory"); + if (restore) + RestoreDirectory = FileSystem->getWorkingDirectory(); + else + RestoreDirectory = ""; + if (StartDirectory.size()) + FileSystem->changeWorkingDirectoryTo(StartDirectory); + + IGUIFileOpenDialog::deserializeAttributes(in,options); +} + + +//! fills the listbox with files. +void CGUIFileOpenDialog::fillListBox() +{ + IGUISkin *skin = Environment->getSkin(); + + if (!FileSystem || !FileBox || !skin) + return; + + if (FileList) + FileList->drop(); + + FileBox->clear(); + + FileList = FileSystem->createFileList(); + core::stringw s; + +#if !defined(_IRR_WINDOWS_CE_PLATFORM_) + setlocale(LC_ALL,""); +#endif + + if (FileList) + { + for (u32 i=0; i < FileList->getFileCount(); ++i) + { + #ifndef _IRR_WCHAR_FILESYSTEM + const c8 *cs = (const c8 *)FileList->getFileName(i).c_str(); + wchar_t *ws = new wchar_t[strlen(cs) + 1]; + int len = mbstowcs(ws,cs,strlen(cs)); + ws[len] = 0; + s = ws; + delete [] ws; + #else + s = FileList->getFileName(i).c_str(); + #endif + FileBox->addItem(s.c_str(), skin->getIcon(FileList->isDirectory(i) ? EGDI_DIRECTORY : EGDI_FILE)); + } + } + + if (FileNameText) + { + #ifndef _IRR_WCHAR_FILESYSTEM + const c8 *cs = (const c8 *)FileSystem->getWorkingDirectory().c_str(); + wchar_t *ws = new wchar_t[strlen(cs) + 1]; + int len = mbstowcs(ws,cs,strlen(cs)); + ws[len] = 0; + s = ws; + delete [] ws; + #else + s = FileSystem->getWorkingDirectory(); + #endif + + FileDirectory = s; + FileNameText->setText(s.c_str()); + } +} + + +//! sends the event that the file has been selected. +void CGUIFileOpenDialog::sendSelectedEvent( EGUI_EVENT_TYPE type) +{ + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = type; + Parent->OnEvent(event); +} + + +//! sends the event that the file choose process has been canceld +void CGUIFileOpenDialog::sendCancelEvent() +{ + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_FILE_CHOOSE_DIALOG_CANCELLED; + Parent->OnEvent(event); +} + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.d new file mode 100644 index 0000000..6d3c154 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.d @@ -0,0 +1,2 @@ +CGUIFileOpenDialog.o: CGUIFileOpenDialog.cpp CGUIFileOpenDialog.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.h new file mode 100644 index 0000000..075935a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFileOpenDialog.h @@ -0,0 +1,84 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ +#define __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIFileOpenDialog.h" +#include "IGUIButton.h" +#include "IGUIListBox.h" +#include "IGUIEditBox.h" +#include "IFileSystem.h" + +namespace irr +{ +namespace gui +{ + + class CGUIFileOpenDialog : public IGUIFileOpenDialog + { + public: + + //! constructor + CGUIFileOpenDialog(const wchar_t* title, IGUIEnvironment* environment, + IGUIElement* parent, s32 id, bool restoreCWD=false, + io::path::char_type* startDir=0); + + //! destructor + virtual ~CGUIFileOpenDialog(); + + //! returns the filename of the selected file. Returns NULL, if no file was selected. + virtual const wchar_t* getFileName() const; + + //! Returns the directory of the selected file. Returns NULL, if no directory was selected. + virtual const io::path& getDirectoryName(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + protected: + + //! fills the listbox with files. + void fillListBox(); + + //! sends the event that the file has been selected. + void sendSelectedEvent( EGUI_EVENT_TYPE type ); + + //! sends the event that the file choose process has been canceld + void sendCancelEvent(); + + core::position2d<s32> DragStart; + core::stringw FileName; + io::path FileDirectory; + io::path RestoreDirectory; + io::path StartDirectory; + + IGUIButton* CloseButton; + IGUIButton* OKButton; + IGUIButton* CancelButton; + IGUIListBox* FileBox; + IGUIEditBox* FileNameText; + IGUIElement* EventParent; + io::IFileSystem* FileSystem; + io::IFileList* FileList; + bool Dragging; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.cpp new file mode 100644 index 0000000..8c7f85f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.cpp @@ -0,0 +1,589 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIFont.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "os.h" +#include "IGUIEnvironment.h" +#include "IXMLReader.h" +#include "IReadFile.h" +#include "IVideoDriver.h" +#include "IGUISpriteBank.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIFont::CGUIFont(IGUIEnvironment *env, const io::path& filename) +: Driver(0), SpriteBank(0), Environment(env), WrongCharacter(0), + MaxHeight(0), GlobalKerningWidth(0), GlobalKerningHeight(0) +{ + #ifdef _DEBUG + setDebugName("CGUIFont"); + #endif + + if (Environment) + { + // don't grab environment, to avoid circular references + Driver = Environment->getVideoDriver(); + + SpriteBank = Environment->getSpriteBank(filename); + if (!SpriteBank) // could be default-font which has no file + SpriteBank = Environment->addEmptySpriteBank(filename); + if (SpriteBank) + SpriteBank->grab(); + } + + if (Driver) + Driver->grab(); + + setInvisibleCharacters ( L" " ); +} + + +//! destructor +CGUIFont::~CGUIFont() +{ + if (Driver) + Driver->drop(); + + if (SpriteBank) + { + SpriteBank->drop(); + // TODO: spritebank still exists in gui-environment and should be removed here when it's + // reference-count is 1. Just can't do that from here at the moment. + // But spritebank would not be able to drop textures anyway because those are in texture-cache + // where they can't be removed unless materials start reference-couting 'em. + } +} + + +//! loads a font file from xml +bool CGUIFont::load(io::IXMLReader* xml) +{ + if (!SpriteBank) + return false; + + SpriteBank->clear(); + + while (xml->read()) + { + if (io::EXN_ELEMENT == xml->getNodeType()) + { + if (core::stringw(L"Texture") == xml->getNodeName()) + { + // add a texture + core::stringc fn = xml->getAttributeValue(L"filename"); + u32 i = (u32)xml->getAttributeValueAsInt(L"index"); + core::stringw alpha = xml->getAttributeValue(L"hasAlpha"); + + while (i+1 > SpriteBank->getTextureCount()) + SpriteBank->addTexture(0); + + // disable mipmaps+filtering + bool mipmap = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + // load texture + SpriteBank->setTexture(i, Driver->getTexture(fn)); + + // set previous mip-map+filter state + Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, mipmap); + + // couldn't load texture, abort. + if (!SpriteBank->getTexture(i)) + { + os::Printer::log("Unable to load all textures in the font, aborting", ELL_ERROR); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + else + { + // colorkey texture rather than alpha channel? + if (alpha == core::stringw("false")) + Driver->makeColorKeyTexture(SpriteBank->getTexture(i), core::position2di(0,0)); + } + } + else if (core::stringw(L"c") == xml->getNodeName()) + { + // adding a character to this font + SFontArea a; + SGUISpriteFrame f; + SGUISprite s; + core::rect<s32> rectangle; + + a.underhang = xml->getAttributeValueAsInt(L"u"); + a.overhang = xml->getAttributeValueAsInt(L"o"); + a.spriteno = SpriteBank->getSprites().size(); + s32 texno = xml->getAttributeValueAsInt(L"i"); + + // parse rectangle + core::stringc rectstr = xml->getAttributeValue(L"r"); + wchar_t ch = xml->getAttributeValue(L"c")[0]; + + const c8 *c = rectstr.c_str(); + s32 val; + val = 0; + while (*c >= '0' && *c <= '9') + { + val *= 10; + val += *c - '0'; + c++; + } + rectangle.UpperLeftCorner.X = val; + while (*c == L' ' || *c == L',') c++; + + val = 0; + while (*c >= '0' && *c <= '9') + { + val *= 10; + val += *c - '0'; + c++; + } + rectangle.UpperLeftCorner.Y = val; + while (*c == L' ' || *c == L',') c++; + + val = 0; + while (*c >= '0' && *c <= '9') + { + val *= 10; + val += *c - '0'; + c++; + } + rectangle.LowerRightCorner.X = val; + while (*c == L' ' || *c == L',') c++; + + val = 0; + while (*c >= '0' && *c <= '9') + { + val *= 10; + val += *c - '0'; + c++; + } + rectangle.LowerRightCorner.Y = val; + + CharacterMap.insert(ch,Areas.size()); + + // make frame + f.rectNumber = SpriteBank->getPositions().size(); + f.textureNumber = texno; + + // add frame to sprite + s.Frames.push_back(f); + s.frameTime = 0; + + // add rectangle to sprite bank + SpriteBank->getPositions().push_back(rectangle); + a.width = rectangle.getWidth(); + + // add sprite to sprite bank + SpriteBank->getSprites().push_back(s); + + // add character to font + Areas.push_back(a); + } + } + } + + // set bad character + WrongCharacter = getAreaFromCharacter(L' '); + + setMaxHeight(); + + return true; +} + + +void CGUIFont::setMaxHeight() +{ + if ( !SpriteBank ) + return; + + MaxHeight = 0; + s32 t; + + core::array< core::rect<s32> >& p = SpriteBank->getPositions(); + + for (u32 i=0; i<p.size(); ++i) + { + t = p[i].getHeight(); + if (t>MaxHeight) + MaxHeight = t; + } + +} + + +//! loads a font file, native file needed, for texture parsing +bool CGUIFont::load(io::IReadFile* file) +{ + if (!Driver) + return false; + + return loadTexture(Driver->createImageFromFile(file), + file->getFileName()); +} + + +//! loads a font file, native file needed, for texture parsing +bool CGUIFont::load(const io::path& filename) +{ + if (!Driver) + return false; + + return loadTexture(Driver->createImageFromFile( filename ), + filename); +} + + +//! load & prepare font from ITexture +bool CGUIFont::loadTexture(video::IImage* image, const io::path& name) +{ + if (!image || !SpriteBank) + return false; + + s32 lowerRightPositions = 0; + + video::IImage* tmpImage=image; + bool deleteTmpImage=false; + switch(image->getColorFormat()) + { + case video::ECF_R5G6B5: + tmpImage = Driver->createImage(video::ECF_A1R5G5B5,image->getDimension()); + image->copyTo(tmpImage); + deleteTmpImage=true; + break; + case video::ECF_A1R5G5B5: + case video::ECF_A8R8G8B8: + break; + case video::ECF_R8G8B8: + tmpImage = Driver->createImage(video::ECF_A8R8G8B8,image->getDimension()); + image->copyTo(tmpImage); + deleteTmpImage=true; + break; + default: + os::Printer::log("Unknown texture format provided for CGUIFont::loadTexture", ELL_ERROR); + return false; + } + readPositions(tmpImage, lowerRightPositions); + + WrongCharacter = getAreaFromCharacter(L' '); + + // output warnings + if (!lowerRightPositions || !SpriteBank->getSprites().size()) + os::Printer::log("Either no upper or lower corner pixels in the font file. If this font was made using the new font tool, please load the XML file instead. If not, the font may be corrupted.", ELL_ERROR); + else + if (lowerRightPositions != (s32)SpriteBank->getPositions().size()) + os::Printer::log("The amount of upper corner pixels and the lower corner pixels is not equal, font file may be corrupted.", ELL_ERROR); + + bool ret = ( !SpriteBank->getSprites().empty() && lowerRightPositions ); + + if ( ret ) + { + bool flag[2]; + flag[0] = Driver->getTextureCreationFlag ( video::ETCF_ALLOW_NON_POWER_2 ); + flag[1] = Driver->getTextureCreationFlag ( video::ETCF_CREATE_MIP_MAPS ); + + Driver->setTextureCreationFlag(video::ETCF_ALLOW_NON_POWER_2, true); + Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false ); + + SpriteBank->addTexture(Driver->addTexture(name, tmpImage)); + + Driver->setTextureCreationFlag(video::ETCF_ALLOW_NON_POWER_2, flag[0] ); + Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, flag[1] ); + } + if (deleteTmpImage) + tmpImage->drop(); + image->drop(); + + setMaxHeight(); + + return ret; +} + + +void CGUIFont::readPositions(video::IImage* image, s32& lowerRightPositions) +{ + if (!SpriteBank ) + return; + + const core::dimension2d<u32> size = image->getDimension(); + + video::SColor colorTopLeft = image->getPixel(0,0); + colorTopLeft.setAlpha(255); + image->setPixel(0,0,colorTopLeft); + video::SColor colorLowerRight = image->getPixel(1,0); + video::SColor colorBackGround = image->getPixel(2,0); + video::SColor colorBackGroundTransparent = 0; + + image->setPixel(1,0,colorBackGround); + + // start parsing + + core::position2d<s32> pos(0,0); + for (pos.Y=0; pos.Y<(s32)size.Height; ++pos.Y) + { + for (pos.X=0; pos.X<(s32)size.Width; ++pos.X) + { + const video::SColor c = image->getPixel(pos.X, pos.Y); + if (c == colorTopLeft) + { + image->setPixel(pos.X, pos.Y, colorBackGroundTransparent); + SpriteBank->getPositions().push_back(core::rect<s32>(pos, pos)); + } + else + if (c == colorLowerRight) + { + // too many lower right points + if (SpriteBank->getPositions().size()<=(u32)lowerRightPositions) + { + lowerRightPositions = 0; + return; + } + + image->setPixel(pos.X, pos.Y, colorBackGroundTransparent); + SpriteBank->getPositions()[lowerRightPositions].LowerRightCorner = pos; + // add frame to sprite bank + SGUISpriteFrame f; + f.rectNumber = lowerRightPositions; + f.textureNumber = 0; + SGUISprite s; + s.Frames.push_back(f); + s.frameTime = 0; + SpriteBank->getSprites().push_back(s); + // add character to font + SFontArea a; + a.overhang = 0; + a.underhang = 0; + a.spriteno = lowerRightPositions; + a.width = SpriteBank->getPositions()[lowerRightPositions].getWidth(); + Areas.push_back(a); + // map letter to character + wchar_t ch = (wchar_t)(lowerRightPositions + 32); + CharacterMap.set(ch, lowerRightPositions); + + ++lowerRightPositions; + } + else + if (c == colorBackGround) + image->setPixel(pos.X, pos.Y, colorBackGroundTransparent); + } + } +} + + +//! set an Pixel Offset on Drawing ( scale position on width ) +void CGUIFont::setKerningWidth(s32 kerning) +{ + GlobalKerningWidth = kerning; +} + + +//! set an Pixel Offset on Drawing ( scale position on width ) +s32 CGUIFont::getKerningWidth(const wchar_t* thisLetter, const wchar_t* previousLetter) const +{ + s32 ret = GlobalKerningWidth; + + if (thisLetter) + { + ret += Areas[getAreaFromCharacter(*thisLetter)].overhang; + + if (previousLetter) + { + ret += Areas[getAreaFromCharacter(*previousLetter)].underhang; + } + } + + return ret; +} + + +//! set an Pixel Offset on Drawing ( scale position on height ) +void CGUIFont::setKerningHeight(s32 kerning) +{ + GlobalKerningHeight = kerning; +} + + +//! set an Pixel Offset on Drawing ( scale position on height ) +s32 CGUIFont::getKerningHeight () const +{ + return GlobalKerningHeight; +} + + +//! returns the sprite number from a given character +u32 CGUIFont::getSpriteNoFromChar(const wchar_t *c) const +{ + return Areas[getAreaFromCharacter(*c)].spriteno; +} + + +s32 CGUIFont::getAreaFromCharacter(const wchar_t c) const +{ + core::map<wchar_t, s32>::Node* n = CharacterMap.find(c); + if (n) + return n->getValue(); + else + return WrongCharacter; +} + +void CGUIFont::setInvisibleCharacters( const wchar_t *s ) +{ + Invisible = s; +} + + +//! returns the dimension of text +core::dimension2d<u32> CGUIFont::getDimension(const wchar_t* text) const +{ + core::dimension2d<u32> dim(0, 0); + core::dimension2d<u32> thisLine(0, MaxHeight); + + for (const wchar_t* p = text; *p; ++p) + { + bool lineBreak=false; + if (*p == L'\r') // Mac or Windows breaks + { + lineBreak = true; + if (p[1] == L'\n') // Windows breaks + ++p; + } + else if (*p == L'\n') // Unix breaks + { + lineBreak = true; + } + if (lineBreak) + { + dim.Height += thisLine.Height; + if (dim.Width < thisLine.Width) + dim.Width = thisLine.Width; + thisLine.Width = 0; + continue; + } + + const SFontArea &area = Areas[getAreaFromCharacter(*p)]; + + thisLine.Width += area.underhang; + thisLine.Width += area.width + area.overhang + GlobalKerningWidth; + } + + dim.Height += thisLine.Height; + if (dim.Width < thisLine.Width) + dim.Width = thisLine.Width; + + return dim; +} + +//! draws some text and clips it to the specified rectangle if wanted +void CGUIFont::draw(const core::stringw& text, const core::rect<s32>& position, + video::SColor color, + bool hcenter, bool vcenter, const core::rect<s32>* clip + ) +{ + if (!Driver || !SpriteBank) + return; + + core::dimension2d<s32> textDimension; // NOTE: don't make this u32 or the >> later on can fail when the dimension width is < position width + core::position2d<s32> offset = position.UpperLeftCorner; + + if (hcenter || vcenter || clip) + textDimension = getDimension(text.c_str()); + + if (hcenter) + offset.X += (position.getWidth() - textDimension.Width) >> 1; + + if (vcenter) + offset.Y += (position.getHeight() - textDimension.Height) >> 1; + + if (clip) + { + core::rect<s32> clippedRect(offset, textDimension); + clippedRect.clipAgainst(*clip); + if (!clippedRect.isValid()) + return; + } + + core::array<u32> indices(text.size()); + core::array<core::position2di> offsets(text.size()); + + for(u32 i = 0;i < text.size();i++) + { + wchar_t c = text[i]; + + bool lineBreak=false; + if ( c == L'\r') // Mac or Windows breaks + { + lineBreak = true; + if ( text[i + 1] == L'\n') // Windows breaks + c = text[++i]; + } + else if ( c == L'\n') // Unix breaks + { + lineBreak = true; + } + + if (lineBreak) + { + offset.Y += MaxHeight; + offset.X = position.UpperLeftCorner.X; + + if ( hcenter ) + { + offset.X += (position.getWidth() - textDimension.Width) >> 1; + } + continue; + } + + SFontArea& area = Areas[getAreaFromCharacter(c)]; + + offset.X += area.underhang; + if ( Invisible.findFirst ( c ) < 0 ) + { + indices.push_back(area.spriteno); + offsets.push_back(offset); + } + + offset.X += area.width + area.overhang + GlobalKerningWidth; + } + + SpriteBank->draw2DSpriteBatch(indices, offsets, clip, color); +} + + +//! Calculates the index of the character in the text which is on a specific position. +s32 CGUIFont::getCharacterFromPos(const wchar_t* text, s32 pixel_x) const +{ + s32 x = 0; + s32 idx = 0; + + while (text[idx]) + { + const SFontArea& a = Areas[getAreaFromCharacter(text[idx])]; + + x += a.width + a.overhang + a.underhang + GlobalKerningWidth; + + if (x >= pixel_x) + return idx; + + ++idx; + } + + return -1; +} + + +IGUISpriteBank* CGUIFont::getSpriteBank() const +{ + return SpriteBank; +} + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.d new file mode 100644 index 0000000..3429d45 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.d @@ -0,0 +1 @@ +CGUIFont.o: CGUIFont.cpp CGUIFont.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.h new file mode 100644 index 0000000..ada89c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIFont.h @@ -0,0 +1,118 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_FONT_H_INCLUDED__ +#define __C_GUI_FONT_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIFontBitmap.h" +#include "irrString.h" +#include "irrMap.h" +#include "IXMLReader.h" +#include "IReadFile.h" +#include "irrArray.h" + +namespace irr +{ + +namespace video +{ + class IVideoDriver; + class IImage; +} + +namespace gui +{ + + class IGUIEnvironment; + +class CGUIFont : public IGUIFontBitmap +{ +public: + + //! constructor + CGUIFont(IGUIEnvironment* env, const io::path& filename); + + //! destructor + virtual ~CGUIFont(); + + //! loads a font from a texture file + bool load(const io::path& filename); + + //! loads a font from a texture file + bool load(io::IReadFile* file); + + //! loads a font from an XML file + bool load(io::IXMLReader* xml); + + //! draws an text and clips it to the specified rectangle if wanted + virtual void draw(const core::stringw& text, const core::rect<s32>& position, + video::SColor color, bool hcenter=false, + bool vcenter=false, const core::rect<s32>* clip=0); + + //! returns the dimension of a text + virtual core::dimension2d<u32> getDimension(const wchar_t* text) const; + + //! Calculates the index of the character in the text which is on a specific position. + virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const; + + //! Returns the type of this font + virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; } + + //! set an Pixel Offset on Drawing ( scale position on width ) + virtual void setKerningWidth (s32 kerning); + virtual void setKerningHeight (s32 kerning); + + //! set an Pixel Offset on Drawing ( scale position on width ) + virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const; + virtual s32 getKerningHeight() const; + + //! gets the sprite bank + virtual IGUISpriteBank* getSpriteBank() const; + + //! returns the sprite number from a given character + virtual u32 getSpriteNoFromChar(const wchar_t *c) const; + + virtual void setInvisibleCharacters( const wchar_t *s ); + +private: + + struct SFontArea + { + SFontArea() : underhang(0), overhang(0), width(0), spriteno(0) {} + s32 underhang; + s32 overhang; + s32 width; + u32 spriteno; + }; + + //! load & prepare font from ITexture + bool loadTexture(video::IImage * image, const io::path& name); + + void readPositions(video::IImage* texture, s32& lowerRightPositions); + + s32 getAreaFromCharacter (const wchar_t c) const; + void setMaxHeight(); + + core::array<SFontArea> Areas; + core::map<wchar_t, s32> CharacterMap; + video::IVideoDriver* Driver; + IGUISpriteBank* SpriteBank; + IGUIEnvironment* Environment; + u32 WrongCharacter; + s32 MaxHeight; + s32 GlobalKerningWidth, GlobalKerningHeight; + + core::stringw Invisible; +}; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_FONT_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.cpp new file mode 100644 index 0000000..17d30e0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.cpp @@ -0,0 +1,164 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIImage.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace gui +{ + + +//! constructor +CGUIImage::CGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) +: IGUIImage(environment, parent, id, rectangle), Texture(0), Color(255,255,255,255), + UseAlphaChannel(false), ScaleImage(false) +{ + #ifdef _DEBUG + setDebugName("CGUIImage"); + #endif +} + + +//! destructor +CGUIImage::~CGUIImage() +{ + if (Texture) + Texture->drop(); +} + + +//! sets an image +void CGUIImage::setImage(video::ITexture* image) +{ + if (image == Texture) + return; + + if (Texture) + Texture->drop(); + + Texture = image; + + if (Texture) + Texture->grab(); +} + +//! Gets the image texture +video::ITexture* CGUIImage::getImage() const +{ + return Texture; +} + +//! sets the color of the image +void CGUIImage::setColor(video::SColor color) +{ + Color = color; +} + +//! Gets the color of the image +video::SColor CGUIImage::getColor() const +{ + return Color; +} + +//! draws the element and its children +void CGUIImage::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + video::IVideoDriver* driver = Environment->getVideoDriver(); + + if (Texture) + { + if (ScaleImage) + { + const video::SColor Colors[] = {Color,Color,Color,Color}; + + driver->draw2DImage(Texture, AbsoluteRect, + core::rect<s32>(core::position2d<s32>(0,0), core::dimension2di(Texture->getOriginalSize())), + &AbsoluteClippingRect, Colors, UseAlphaChannel); + } + else + { + driver->draw2DImage(Texture, AbsoluteRect.UpperLeftCorner, + core::rect<s32>(core::position2d<s32>(0,0), core::dimension2di(Texture->getOriginalSize())), + &AbsoluteClippingRect, Color, UseAlphaChannel); + } + } + else + { + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_DARK_SHADOW), AbsoluteRect, &AbsoluteClippingRect); + } + + IGUIElement::draw(); +} + + +//! sets if the image should use its alpha channel to draw itself +void CGUIImage::setUseAlphaChannel(bool use) +{ + UseAlphaChannel = use; +} + + +//! sets if the image should use its alpha channel to draw itself +void CGUIImage::setScaleImage(bool scale) +{ + ScaleImage = scale; +} + + +//! Returns true if the image is scaled to fit, false if not +bool CGUIImage::isImageScaled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ScaleImage; +} + +//! Returns true if the image is using the alpha channel, false if not +bool CGUIImage::isAlphaChannelUsed() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return UseAlphaChannel; +} + + +//! Writes attributes of the element. +void CGUIImage::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIImage::serializeAttributes(out,options); + + out->addTexture ("Texture", Texture); + out->addBool ("UseAlphaChannel", UseAlphaChannel); + out->addColor ("Color", Color); + out->addBool ("ScaleImage", ScaleImage); + +} + + +//! Reads attributes of the element +void CGUIImage::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIImage::deserializeAttributes(in,options); + + setImage(in->getAttributeAsTexture("Texture")); + setUseAlphaChannel(in->getAttributeAsBool("UseAlphaChannel")); + setColor(in->getAttributeAsColor("Color")); + setScaleImage(in->getAttributeAsBool("ScaleImage")); +} + + +} // end namespace gui +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.d new file mode 100644 index 0000000..470bf59 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.d @@ -0,0 +1 @@ +CGUIImage.o: CGUIImage.cpp CGUIImage.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.h new file mode 100644 index 0000000..fc6007c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImage.h @@ -0,0 +1,75 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_IMAGE_H_INCLUDED__ +#define __C_GUI_IMAGE_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIImage.h" + +namespace irr +{ +namespace gui +{ + + class CGUIImage : public IGUIImage + { + public: + + //! constructor + CGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle); + + //! destructor + virtual ~CGUIImage(); + + //! sets an image + virtual void setImage(video::ITexture* image); + + //! Gets the image texture + virtual video::ITexture* getImage() const; + + //! sets the color of the image + virtual void setColor(video::SColor color); + + //! sets if the image should scale to fit the element + virtual void setScaleImage(bool scale); + + //! draws the element and its children + virtual void draw(); + + //! sets if the image should use its alpha channel to draw itself + virtual void setUseAlphaChannel(bool use); + + //! Gets the color of the image + virtual video::SColor getColor() const; + + //! Returns true if the image is scaled to fit, false if not + virtual bool isImageScaled() const; + + //! Returns true if the image is using the alpha channel, false if not + virtual bool isAlphaChannelUsed() const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + video::ITexture* Texture; + video::SColor Color; + bool UseAlphaChannel; + bool ScaleImage; + + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_IMAGE_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.cpp new file mode 100644 index 0000000..e02030d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.cpp @@ -0,0 +1,93 @@ +// This file is part of the "Irrlicht Engine". +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de +// modified by Thomas Alten + +#include "CGUIImageList.h" + + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIImageList::CGUIImageList( video::IVideoDriver* driver ) + : Driver( driver ), + Texture( 0 ), + ImageCount( 0 ), + ImageSize( 0, 0 ), + ImagesPerRow( 0 ), + UseAlphaChannel( false ) +{ + #ifdef _DEBUG + setDebugName( "CGUIImageList" ); + #endif + + if( Driver ) + { + Driver->grab(); + } +} + + + +//! destructor +CGUIImageList::~CGUIImageList() +{ + if( Driver ) + { + Driver->drop(); + } + + if( Texture ) + { + Texture->drop(); + } +} + + +//! Creates the image list from texture. +bool CGUIImageList::createImageList(video::ITexture* texture, + core::dimension2d<s32> imageSize, + bool useAlphaChannel) +{ + if( !texture ) + { + return false; + } + + Texture = texture; + Texture->grab(); + + ImageSize = imageSize; + + ImagesPerRow = Texture->getSize().Width / ImageSize.Width; + ImageCount = ImagesPerRow * Texture->getSize().Height / ImageSize.Height; + + UseAlphaChannel = useAlphaChannel; + + return true; +} + +//! Draws an image and clips it to the specified rectangle if wanted +void CGUIImageList::draw( s32 index, const core::position2d<s32>& destPos, + const core::rect<s32>* clip /*= 0*/ ) +{ + core::rect<s32> sourceRect; + + if( !Driver || index < 0 || index >= ImageCount ) + { + return; + } + + sourceRect.UpperLeftCorner.X = ( index % ImagesPerRow ) * ImageSize.Width; + sourceRect.UpperLeftCorner.Y = ( index / ImagesPerRow ) * ImageSize.Height; + sourceRect.LowerRightCorner.X = sourceRect.UpperLeftCorner.X + ImageSize.Width; + sourceRect.LowerRightCorner.Y = sourceRect.UpperLeftCorner.Y + ImageSize.Height; + + Driver->draw2DImage( Texture, destPos, sourceRect, clip, + video::SColor( 255, 255, 255, 255 ), UseAlphaChannel ); +} + +} // end namespace gui +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.d new file mode 100644 index 0000000..08cf913 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.d @@ -0,0 +1,26 @@ +CGUIImageList.o: CGUIImageList.cpp CGUIImageList.h \ + ../../include/IGUIImageList.h ../../include/IGUIElement.h \ + ../../include/IAttributeExchangingObject.h \ + ../../include/IReferenceCounted.h ../../include/irrTypes.h \ + ../../include/IrrCompileConfig.h ../../include/irrList.h \ + ../../include/irrAllocator.h ../../include/irrMath.h \ + ../../include/rect.h ../../include/dimension2d.h \ + ../../include/position2d.h ../../include/vector2d.h \ + ../../include/irrString.h ../../include/IEventReceiver.h \ + ../../include/ILogger.h ../../include/Keycodes.h \ + ../../include/EGUIElementTypes.h ../../include/EGUIAlignment.h \ + ../../include/IAttributes.h ../../include/SColor.h \ + ../../include/vector3d.h ../../include/line2d.h ../../include/line3d.h \ + ../../include/triangle3d.h ../../include/plane3d.h \ + ../../include/aabbox3d.h ../../include/matrix4.h \ + ../../include/quaternion.h ../../include/irrArray.h \ + ../../include/heapsort.h ../../include/IXMLReader.h \ + ../../include/irrXML.h ../../include/EAttributes.h ../../include/path.h \ + ../../include/IVideoDriver.h ../../include/ITexture.h \ + ../../include/IImage.h ../../include/EDriverTypes.h \ + ../../include/SMaterial.h ../../include/EMaterialTypes.h \ + ../../include/EMaterialFlags.h ../../include/SMaterialLayer.h \ + ../../include/IMeshBuffer.h ../../include/S3DVertex.h \ + ../../include/SVertexIndex.h ../../include/EHardwareBufferFlags.h \ + ../../include/EPrimitiveTypes.h ../../include/EDriverFeatures.h \ + ../../include/SExposedVideoData.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.h new file mode 100644 index 0000000..18221c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIImageList.h @@ -0,0 +1,68 @@ +// This file is part of the "Irrlicht Engine". +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de + +#ifndef __C_GUI_IMAGE_LIST_H_INCLUDED__ +#define __C_GUI_IMAGE_LIST_H_INCLUDED__ + +#include "IGUIImageList.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace gui +{ + +class CGUIImageList : public IGUIImageList +{ +public: + + //! constructor + CGUIImageList( video::IVideoDriver* Driver ); + + //! destructor + virtual ~CGUIImageList(); + + //! Creates the image list from texture. + //! \param texture: The texture to use + //! \param imageSize: Size of a single image + //! \param useAlphaChannel: true if the alpha channel from the texture should be used + //! \return + //! true if the image list was created + bool createImageList( + video::ITexture* texture, + core::dimension2d<s32> imageSize, + bool useAlphaChannel ); + + //! Draws an image and clips it to the specified rectangle if wanted + //! \param index: Index of the image + //! \param destPos: Position of the image to draw + //! \param clip: Optional pointer to a rectalgle against which the text will be clipped. + //! If the pointer is null, no clipping will be done. + virtual void draw( s32 index, const core::position2d<s32>& destPos, + const core::rect<s32>* clip = 0 ); + + //! Returns the count of Images in the list. + //! \return Returns the count of Images in the list. + virtual s32 getImageCount() const + { return ImageCount; } + + //! Returns the size of the images in the list. + //! \return Returns the size of the images in the list. + virtual core::dimension2d<s32> getImageSize() const + { return ImageSize; } + +private: + + video::IVideoDriver* Driver; + video::ITexture* Texture; + s32 ImageCount; + core::dimension2d<s32> ImageSize; + s32 ImagesPerRow; + bool UseAlphaChannel; +}; + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.cpp new file mode 100644 index 0000000..3f63662 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.cpp @@ -0,0 +1,179 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIInOutFader.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + + +//! constructor +CGUIInOutFader::CGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) +: IGUIInOutFader(environment, parent, id, rectangle) +{ + #ifdef _DEBUG + setDebugName("CGUIInOutFader"); + #endif + + Action = EFA_NOTHING; + StartTime = 0; + EndTime = 0; + + setColor(video::SColor(0,0,0,0)); +} + + +//! draws the element and its children +void CGUIInOutFader::draw() +{ + if (!IsVisible || !Action) + return; + + u32 now = os::Timer::getTime(); + if (now > EndTime && Action == EFA_FADE_IN) + { + Action = EFA_NOTHING; + return; + } + + video::IVideoDriver* driver = Environment->getVideoDriver(); + + if (driver) + { + f32 d; + + if (now > EndTime) + d = 0.0f; + else + d = (EndTime - now) / (f32)(EndTime - StartTime); + + video::SColor newCol = FullColor.getInterpolated(TransColor, d); + driver->draw2DRectangle(newCol, AbsoluteRect, &AbsoluteClippingRect); + } + + IGUIElement::draw(); +} + + +//! Gets the color to fade out to or to fade in from. +video::SColor CGUIInOutFader::getColor() const +{ + return Color[1]; +} + + +//! Sets the color to fade out to or to fade in from. +void CGUIInOutFader::setColor(video::SColor color) +{ + video::SColor s = color; + video::SColor d = color; + + s.setAlpha ( 255 ); + d.setAlpha ( 0 ); + setColor ( s,d ); + +/* + Color[0] = color; + + FullColor = Color[0]; + TransColor = Color[0]; + + if (Action == EFA_FADE_OUT) + { + FullColor.setAlpha(0); + TransColor.setAlpha(255); + } + else + if (Action == EFA_FADE_IN) + { + FullColor.setAlpha(255); + TransColor.setAlpha(0); + } +*/ +} + + +void CGUIInOutFader::setColor(video::SColor source, video::SColor dest) +{ + Color[0] = source; + Color[1] = dest; + + if (Action == EFA_FADE_OUT) + { + FullColor = Color[1]; + TransColor = Color[0]; + } + else + if (Action == EFA_FADE_IN) + { + FullColor = Color[0]; + TransColor = Color[1]; + } + +} + + +//! Returns if the fade in or out process is done. +bool CGUIInOutFader::isReady() const +{ + u32 now = os::Timer::getTime(); + bool ret = (now > EndTime); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! Starts the fade in process. +void CGUIInOutFader::fadeIn(u32 time) +{ + StartTime = os::Timer::getTime(); + EndTime = StartTime + time; + Action = EFA_FADE_IN; + setColor(Color[0],Color[1]); +} + + +//! Starts the fade out process. +void CGUIInOutFader::fadeOut(u32 time) +{ + StartTime = os::Timer::getTime(); + EndTime = StartTime + time; + Action = EFA_FADE_OUT; + setColor(Color[0],Color[1]); +} + + +//! Writes attributes of the element. +void CGUIInOutFader::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIInOutFader::serializeAttributes(out,options); + + out->addColor ("FullColor", FullColor); + out->addColor ("TransColor", TransColor); + +} + + +//! Reads attributes of the element +void CGUIInOutFader::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIInOutFader::deserializeAttributes(in,options); + + FullColor = in->getAttributeAsColor("FullColor"); + TransColor = in->getAttributeAsColor("TransColor"); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.d new file mode 100644 index 0000000..207701b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.d @@ -0,0 +1,2 @@ +CGUIInOutFader.o: CGUIInOutFader.cpp CGUIInOutFader.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.h new file mode 100644 index 0000000..4bd6aa9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIInOutFader.h @@ -0,0 +1,75 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_IN_OUT_FADER_H_INCLUDED__ +#define __C_GUI_IN_OUT_FADER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIInOutFader.h" + +namespace irr +{ +namespace gui +{ + + class CGUIInOutFader : public IGUIInOutFader + { + public: + + //! constructor + CGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle); + + //! draws the element and its children + virtual void draw(); + + //! Gets the color to fade out to or to fade in from. + virtual video::SColor getColor() const; + + //! Sets the color to fade out to or to fade in from. + virtual void setColor(video::SColor color ); + virtual void setColor(video::SColor source, video::SColor dest); + + //! Starts the fade in process. + virtual void fadeIn(u32 time); + + //! Starts the fade out process. + virtual void fadeOut(u32 time); + + //! Returns if the fade in or out process is done. + virtual bool isReady() const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + enum EFadeAction + { + EFA_NOTHING = 0, + EFA_FADE_IN, + EFA_FADE_OUT + }; + + u32 StartTime; + u32 EndTime; + EFadeAction Action; + + video::SColor Color[2]; + video::SColor FullColor; + video::SColor TransColor; + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_IN_OUT_FADER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.cpp new file mode 100644 index 0000000..74f7a72 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.cpp @@ -0,0 +1,910 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIListBox.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "CGUIListBox.h" +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "IGUISpriteBank.h" +#include "CGUIScrollBar.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIListBox::CGUIListBox(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle, bool clip, + bool drawBack, bool moveOverSelect) +: IGUIListBox(environment, parent, id, rectangle), Selected(-1), + ItemHeight(0),ItemHeightOverride(0), + TotalItemHeight(0), ItemsIconWidth(0), Font(0), IconBank(0), + ScrollBar(0), selectTime(0), LastKeyTime(0), Selecting(false), DrawBack(drawBack), + MoveOverSelect(moveOverSelect), AutoScroll(true), HighlightWhenNotFocused(true) +{ + #ifdef _DEBUG + setDebugName("CGUIListBox"); + #endif + + IGUISkin* skin = Environment->getSkin(); + const s32 s = skin->getSize(EGDS_SCROLLBAR_SIZE); + + ScrollBar = new CGUIScrollBar(false, Environment, this, -1, + core::rect<s32>(RelativeRect.getWidth() - s, 0, RelativeRect.getWidth(), RelativeRect.getHeight()), + !clip); + ScrollBar->setSubElement(true); + ScrollBar->setTabStop(false); + ScrollBar->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + ScrollBar->setVisible(false); + ScrollBar->setPos(0); + + setNotClipped(!clip); + + // this element can be tabbed to + setTabStop(true); + setTabOrder(-1); + + updateAbsolutePosition(); +} + + +//! destructor +CGUIListBox::~CGUIListBox() +{ + if (ScrollBar) + ScrollBar->drop(); + + if (Font) + Font->drop(); + + if (IconBank) + IconBank->drop(); +} + + +//! returns amount of list items +u32 CGUIListBox::getItemCount() const +{ + return Items.size(); +} + + +//! returns string of a list item. the may be a value from 0 to itemCount-1 +const wchar_t* CGUIListBox::getListItem(u32 id) const +{ + if (id>=Items.size()) + return 0; + + return Items[id].text.c_str(); +} + + +//! Returns the icon of an item +s32 CGUIListBox::getIcon(u32 id) const +{ + if (id>=Items.size()) + return -1; + + return Items[id].icon; +} + + +//! adds a list item, returns id of item +u32 CGUIListBox::addItem(const wchar_t* text) +{ + return addItem(text, -1); +} + + +//! adds a list item, returns id of item +void CGUIListBox::removeItem(u32 id) +{ + if (id >= Items.size()) + return; + + if ((u32)Selected==id) + { + Selected = -1; + } + else if ((u32)Selected > id) + { + Selected -= 1; + selectTime = os::Timer::getTime(); + } + + Items.erase(id); + + recalculateItemHeight(); +} + + +s32 CGUIListBox::getItemAt(s32 xpos, s32 ypos) const +{ + if ( xpos < AbsoluteRect.UpperLeftCorner.X || xpos >= AbsoluteRect.LowerRightCorner.X + || ypos < AbsoluteRect.UpperLeftCorner.Y || ypos >= AbsoluteRect.LowerRightCorner.Y + ) + return -1; + + if ( ItemHeight == 0 ) + return -1; + + s32 item = ((ypos - AbsoluteRect.UpperLeftCorner.Y - 1) + ScrollBar->getPos()) / ItemHeight; + if ( item < 0 || item >= (s32)Items.size()) + return -1; + + return item; +} + +//! clears the list +void CGUIListBox::clear() +{ + Items.clear(); + ItemsIconWidth = 0; + Selected = -1; + + if (ScrollBar) + ScrollBar->setPos(0); + + recalculateItemHeight(); +} + + +void CGUIListBox::recalculateItemHeight() +{ + IGUISkin* skin = Environment->getSkin(); + + if (Font != skin->getFont()) + { + if (Font) + Font->drop(); + + Font = skin->getFont(); + if ( 0 == ItemHeightOverride ) + ItemHeight = 0; + + if (Font) + { + if ( 0 == ItemHeightOverride ) + ItemHeight = Font->getDimension(L"A").Height + 4; + + Font->grab(); + } + } + + TotalItemHeight = ItemHeight * Items.size(); + ScrollBar->setMax( core::max_(0, TotalItemHeight - AbsoluteRect.getHeight()) ); + s32 minItemHeight = ItemHeight > 0 ? ItemHeight : 1; + ScrollBar->setSmallStep ( minItemHeight ); + ScrollBar->setLargeStep ( 2*minItemHeight ); + + if ( TotalItemHeight <= AbsoluteRect.getHeight() ) + ScrollBar->setVisible(false); + else + ScrollBar->setVisible(true); +} + + +//! returns id of selected item. returns -1 if no item is selected. +s32 CGUIListBox::getSelected() const +{ + return Selected; +} + + +//! sets the selected item. Set this to -1 if no item should be selected +void CGUIListBox::setSelected(s32 id) +{ + if ((u32)id>=Items.size()) + Selected = -1; + else + Selected = id; + + selectTime = os::Timer::getTime(); + + recalculateScrollPos(); +} + +//! sets the selected item. Set this to -1 if no item should be selected +void CGUIListBox::setSelected(const wchar_t *item) +{ + s32 index = -1; + + if ( item ) + { + for ( index = 0; index < (s32) Items.size(); ++index ) + { + if ( Items[index].text == item ) + break; + } + } + setSelected ( index ); +} + +//! called if an event happened. +bool CGUIListBox::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + switch(event.EventType) + { + case EET_KEY_INPUT_EVENT: + if (event.KeyInput.PressedDown && + (event.KeyInput.Key == KEY_DOWN || + event.KeyInput.Key == KEY_UP || + event.KeyInput.Key == KEY_HOME || + event.KeyInput.Key == KEY_END || + event.KeyInput.Key == KEY_NEXT || + event.KeyInput.Key == KEY_PRIOR ) ) + { + s32 oldSelected = Selected; + switch (event.KeyInput.Key) + { + case KEY_DOWN: + Selected += 1; + break; + case KEY_UP: + Selected -= 1; + break; + case KEY_HOME: + Selected = 0; + break; + case KEY_END: + Selected = (s32)Items.size()-1; + break; + case KEY_NEXT: + Selected += AbsoluteRect.getHeight() / ItemHeight; + break; + case KEY_PRIOR: + Selected -= AbsoluteRect.getHeight() / ItemHeight; + break; + default: + break; + } + if (Selected >= (s32)Items.size()) + Selected = Items.size() - 1; + else + if (Selected<0) + Selected = 0; + + recalculateScrollPos(); + + // post the news + + if (oldSelected != Selected && Parent && !Selecting && !MoveOverSelect) + { + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = EGET_LISTBOX_CHANGED; + Parent->OnEvent(e); + } + + return true; + } + else + if (!event.KeyInput.PressedDown && ( event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE ) ) + { + if (Parent) + { + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = EGET_LISTBOX_SELECTED_AGAIN; + Parent->OnEvent(e); + } + return true; + } + else if (event.KeyInput.PressedDown && event.KeyInput.Char) + { + // change selection based on text as it is typed. + u32 now = os::Timer::getTime(); + + if (now - LastKeyTime < 500) + { + // add to key buffer if it isn't a key repeat + if (!(KeyBuffer.size() == 1 && KeyBuffer[0] == event.KeyInput.Char)) + { + KeyBuffer += L" "; + KeyBuffer[KeyBuffer.size()-1] = event.KeyInput.Char; + } + } + else + { + KeyBuffer = L" "; + KeyBuffer[0] = event.KeyInput.Char; + } + LastKeyTime = now; + + // find the selected item, starting at the current selection + s32 start = Selected; + // dont change selection if the key buffer matches the current item + if (Selected > -1 && KeyBuffer.size() > 1) + { + if (Items[Selected].text.size() >= KeyBuffer.size() && + KeyBuffer.equals_ignore_case(Items[Selected].text.subString(0,KeyBuffer.size()))) + return true; + } + + s32 current; + for (current = start+1; current < (s32)Items.size(); ++current) + { + if (Items[current].text.size() >= KeyBuffer.size()) + { + if (KeyBuffer.equals_ignore_case(Items[current].text.subString(0,KeyBuffer.size()))) + { + if (Parent && Selected != current && !Selecting && !MoveOverSelect) + { + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = EGET_LISTBOX_CHANGED; + Parent->OnEvent(e); + } + setSelected(current); + return true; + } + } + } + for (current = 0; current <= start; ++current) + { + if (Items[current].text.size() >= KeyBuffer.size()) + { + if (KeyBuffer.equals_ignore_case(Items[current].text.subString(0,KeyBuffer.size()))) + { + if (Parent && Selected != current && !Selecting && !MoveOverSelect) + { + Selected = current; + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = EGET_LISTBOX_CHANGED; + Parent->OnEvent(e); + } + setSelected(current); + return true; + } + } + } + + return true; + } + break; + + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case gui::EGET_SCROLL_BAR_CHANGED: + if (event.GUIEvent.Caller == ScrollBar) + return true; + break; + case gui::EGET_ELEMENT_FOCUS_LOST: + { + if (event.GUIEvent.Caller == this) + Selecting = false; + } + default: + break; + } + break; + + case EET_MOUSE_INPUT_EVENT: + { + core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y); + + switch(event.MouseInput.Event) + { + case EMIE_MOUSE_WHEEL: + ScrollBar->setPos(ScrollBar->getPos() + (event.MouseInput.Wheel < 0 ? -1 : 1)*-ItemHeight/2); + return true; + + case EMIE_LMOUSE_PRESSED_DOWN: + { + Selecting = true; + return true; + } + + case EMIE_LMOUSE_LEFT_UP: + { + Selecting = false; + + if (isPointInside(p)) + selectNew(event.MouseInput.Y); + + return true; + } + + case EMIE_MOUSE_MOVED: + if (Selecting || MoveOverSelect) + { + if (isPointInside(p)) + { + selectNew(event.MouseInput.Y, true); + return true; + } + } + default: + break; + } + } + break; + case EET_LOG_TEXT_EVENT: + case EET_USER_EVENT: + case EET_JOYSTICK_INPUT_EVENT: + case EGUIET_FORCE_32_BIT: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +void CGUIListBox::selectNew(s32 ypos, bool onlyHover) +{ + u32 now = os::Timer::getTime(); + s32 oldSelected = Selected; + + Selected = getItemAt(AbsoluteRect.UpperLeftCorner.X, ypos); + if (Selected<0 && !Items.empty()) + Selected = 0; + + recalculateScrollPos(); + + gui::EGUI_EVENT_TYPE eventType = (Selected == oldSelected && now < selectTime + 500) ? EGET_LISTBOX_SELECTED_AGAIN : EGET_LISTBOX_CHANGED; + selectTime = now; + // post the news + if (Parent && !onlyHover) + { + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = eventType; + Parent->OnEvent(event); + } +} + + +//! Update the position and size of the listbox, and update the scrollbar +void CGUIListBox::updateAbsolutePosition() +{ + IGUIElement::updateAbsolutePosition(); + + recalculateItemHeight(); +} + + +//! draws the element and its children +void CGUIListBox::draw() +{ + if (!IsVisible) + return; + + recalculateItemHeight(); // if the font changed + + IGUISkin* skin = Environment->getSkin(); + + core::rect<s32>* clipRect = 0; + + // draw background + core::rect<s32> frameRect(AbsoluteRect); + + // draw items + + core::rect<s32> clientClip(AbsoluteRect); + clientClip.UpperLeftCorner.Y += 1; + clientClip.UpperLeftCorner.X += 1; + if (ScrollBar->isVisible()) + clientClip.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X - skin->getSize(EGDS_SCROLLBAR_SIZE); + clientClip.LowerRightCorner.Y -= 1; + clientClip.clipAgainst(AbsoluteClippingRect); + + skin->draw3DSunkenPane(this, skin->getColor(EGDC_3D_HIGH_LIGHT), true, + DrawBack, frameRect, &AbsoluteClippingRect); + + if (clipRect) + clientClip.clipAgainst(*clipRect); + + frameRect = AbsoluteRect; + frameRect.UpperLeftCorner.X += 1; + if (ScrollBar->isVisible()) + frameRect.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X - skin->getSize(EGDS_SCROLLBAR_SIZE); + + frameRect.LowerRightCorner.Y = AbsoluteRect.UpperLeftCorner.Y + ItemHeight; + + frameRect.UpperLeftCorner.Y -= ScrollBar->getPos(); + frameRect.LowerRightCorner.Y -= ScrollBar->getPos(); + + bool hl = (HighlightWhenNotFocused || Environment->hasFocus(this) || Environment->hasFocus(ScrollBar)); + + for (s32 i=0; i<(s32)Items.size(); ++i) + { + if (frameRect.LowerRightCorner.Y >= AbsoluteRect.UpperLeftCorner.Y && + frameRect.UpperLeftCorner.Y <= AbsoluteRect.LowerRightCorner.Y) + { + if (i == Selected && hl) + skin->draw2DRectangle(this, skin->getColor(EGDC_HIGH_LIGHT), frameRect, &clientClip); + + core::rect<s32> textRect = frameRect; + textRect.UpperLeftCorner.X += 3; + + if (Font) + { + if (IconBank && (Items[i].icon > -1)) + { + core::position2di iconPos = textRect.UpperLeftCorner; + iconPos.Y += textRect.getHeight() / 2; + iconPos.X += ItemsIconWidth/2; + + if ( i==Selected && hl ) + { + IconBank->draw2DSprite( (u32)Items[i].icon, iconPos, &clientClip, + hasItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) ? + getItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_ICON_HIGHLIGHT), + selectTime, os::Timer::getTime(), false, true); + } + else + { + IconBank->draw2DSprite( (u32)Items[i].icon, iconPos, &clientClip, + hasItemOverrideColor(i, EGUI_LBC_ICON) ? getItemOverrideColor(i, EGUI_LBC_ICON) : getItemDefaultColor(EGUI_LBC_ICON), + 0 , (i==Selected) ? os::Timer::getTime() : 0, false, true); + } + } + + textRect.UpperLeftCorner.X += ItemsIconWidth+3; + + if ( i==Selected && hl ) + { + Font->draw(Items[i].text.c_str(), textRect, + hasItemOverrideColor(i, EGUI_LBC_TEXT_HIGHLIGHT) ? + getItemOverrideColor(i, EGUI_LBC_TEXT_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_TEXT_HIGHLIGHT), + false, true, &clientClip); + } + else + { + Font->draw(Items[i].text.c_str(), textRect, + hasItemOverrideColor(i, EGUI_LBC_TEXT) ? getItemOverrideColor(i, EGUI_LBC_TEXT) : getItemDefaultColor(EGUI_LBC_TEXT), + false, true, &clientClip); + } + + textRect.UpperLeftCorner.X -= ItemsIconWidth+3; + } + } + + frameRect.UpperLeftCorner.Y += ItemHeight; + frameRect.LowerRightCorner.Y += ItemHeight; + } + + IGUIElement::draw(); +} + + +//! adds an list item with an icon +u32 CGUIListBox::addItem(const wchar_t* text, s32 icon) +{ + ListItem i; + i.text = text; + i.icon = icon; + + Items.push_back(i); + recalculateItemHeight(); + recalculateItemWidth(icon); + + return Items.size() - 1; +} + + +void CGUIListBox::setSpriteBank(IGUISpriteBank* bank) +{ + if ( bank == IconBank ) + return; + if (IconBank) + IconBank->drop(); + + IconBank = bank; + if (IconBank) + IconBank->grab(); +} + + +void CGUIListBox::recalculateScrollPos() +{ + if (!AutoScroll) + return; + + const s32 selPos = (Selected == -1 ? TotalItemHeight : Selected * ItemHeight) - ScrollBar->getPos(); + + if (selPos < 0) + { + ScrollBar->setPos(ScrollBar->getPos() + selPos); + } + else + if (selPos > AbsoluteRect.getHeight() - ItemHeight) + { + ScrollBar->setPos(ScrollBar->getPos() + selPos - AbsoluteRect.getHeight() + ItemHeight); + } +} + + +void CGUIListBox::setAutoScrollEnabled(bool scroll) +{ + AutoScroll = scroll; +} + + +bool CGUIListBox::isAutoScrollEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return AutoScroll; +} + + +bool CGUIListBox::getSerializationLabels(EGUI_LISTBOX_COLOR colorType, core::stringc & useColorLabel, core::stringc & colorLabel) const +{ + switch ( colorType ) + { + case EGUI_LBC_TEXT: + useColorLabel = "UseColText"; + colorLabel = "ColText"; + break; + case EGUI_LBC_TEXT_HIGHLIGHT: + useColorLabel = "UseColTextHl"; + colorLabel = "ColTextHl"; + break; + case EGUI_LBC_ICON: + useColorLabel = "UseColIcon"; + colorLabel = "ColIcon"; + break; + case EGUI_LBC_ICON_HIGHLIGHT: + useColorLabel = "UseColIconHl"; + colorLabel = "ColIconHl"; + break; + default: + return false; + } + return true; +} + + +//! Writes attributes of the element. +void CGUIListBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIListBox::serializeAttributes(out,options); + + // todo: out->addString ("IconBank", IconBank->getName?); + out->addBool ("DrawBack", DrawBack); + out->addBool ("MoveOverSelect", MoveOverSelect); + out->addBool ("AutoScroll", AutoScroll); + + out->addInt("ItemCount", Items.size()); + for (u32 i=0;i<Items.size(); ++i) + { + core::stringc label("text"); + label += i; + out->addString(label.c_str(), Items[i].text.c_str() ); + + for ( s32 c=0; c < (s32)EGUI_LBC_COUNT; ++c ) + { + core::stringc useColorLabel, colorLabel; + if ( !getSerializationLabels((EGUI_LISTBOX_COLOR)c, useColorLabel, colorLabel) ) + return; + label = useColorLabel; label += i; + if ( Items[i].OverrideColors[c].Use ) + { + out->addBool(label.c_str(), true ); + label = colorLabel; label += i; + out->addColor(label.c_str(), Items[i].OverrideColors[c].Color); + } + else + { + out->addBool(label.c_str(), false ); + } + } + } +} + + +//! Reads attributes of the element +void CGUIListBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + clear(); + + DrawBack = in->getAttributeAsBool("DrawBack"); + MoveOverSelect = in->getAttributeAsBool("MoveOverSelect"); + AutoScroll = in->getAttributeAsBool("AutoScroll"); + + IGUIListBox::deserializeAttributes(in,options); + + const s32 count = in->getAttributeAsInt("ItemCount"); + for (s32 i=0; i<count; ++i) + { + core::stringc label("text"); + ListItem item; + + label += i; + item.text = in->getAttributeAsStringW(label.c_str()); + + addItem(item.text.c_str(), item.icon); + + for ( u32 c=0; c < EGUI_LBC_COUNT; ++c ) + { + core::stringc useColorLabel, colorLabel; + if ( !getSerializationLabels((EGUI_LISTBOX_COLOR)c, useColorLabel, colorLabel) ) + return; + label = useColorLabel; label += i; + Items[i].OverrideColors[c].Use = in->getAttributeAsBool(label.c_str()); + if ( Items[i].OverrideColors[c].Use ) + { + label = colorLabel; label += i; + Items[i].OverrideColors[c].Color = in->getAttributeAsColor(label.c_str()); + } + } + } +} + + +void CGUIListBox::recalculateItemWidth(s32 icon) +{ + if (IconBank && icon > -1 && + IconBank->getSprites().size() > (u32)icon && + IconBank->getSprites()[(u32)icon].Frames.size()) + { + u32 rno = IconBank->getSprites()[(u32)icon].Frames[0].rectNumber; + if (IconBank->getPositions().size() > rno) + { + const s32 w = IconBank->getPositions()[rno].getWidth(); + if (w > ItemsIconWidth) + ItemsIconWidth = w; + } + } +} + + +void CGUIListBox::setItem(u32 index, const wchar_t* text, s32 icon) +{ + if ( index >= Items.size() ) + return; + + Items[index].text = text; + Items[index].icon = icon; + + recalculateItemHeight(); + recalculateItemWidth(icon); +} + + +//! Insert the item at the given index +//! Return the index on success or -1 on failure. +s32 CGUIListBox::insertItem(u32 index, const wchar_t* text, s32 icon) +{ + ListItem i; + i.text = text; + i.icon = icon; + + Items.insert(i, index); + recalculateItemHeight(); + recalculateItemWidth(icon); + + return index; +} + + +void CGUIListBox::swapItems(u32 index1, u32 index2) +{ + if ( index1 >= Items.size() || index2 >= Items.size() ) + return; + + ListItem dummmy = Items[index1]; + Items[index1] = Items[index2]; + Items[index2] = dummmy; +} + + +void CGUIListBox::setItemOverrideColor(u32 index, video::SColor color) +{ + for ( u32 c=0; c < EGUI_LBC_COUNT; ++c ) + { + Items[index].OverrideColors[c].Use = true; + Items[index].OverrideColors[c].Color = color; + } +} + + +void CGUIListBox::setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) +{ + if ( index >= Items.size() || colorType < 0 || colorType >= EGUI_LBC_COUNT ) + return; + + Items[index].OverrideColors[colorType].Use = true; + Items[index].OverrideColors[colorType].Color = color; +} + + +void CGUIListBox::clearItemOverrideColor(u32 index) +{ + for (u32 c=0; c < (u32)EGUI_LBC_COUNT; ++c ) + { + Items[index].OverrideColors[c].Use = false; + } +} + + +void CGUIListBox::clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) +{ + if ( index >= Items.size() || colorType < 0 || colorType >= EGUI_LBC_COUNT ) + return; + + Items[index].OverrideColors[colorType].Use = false; +} + + +bool CGUIListBox::hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const +{ + if ( index >= Items.size() || colorType < 0 || colorType >= EGUI_LBC_COUNT ) + return false; + + return Items[index].OverrideColors[colorType].Use; +} + + +video::SColor CGUIListBox::getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const +{ + if ( (u32)index >= Items.size() || colorType < 0 || colorType >= EGUI_LBC_COUNT ) + return video::SColor(); + + return Items[index].OverrideColors[colorType].Color; +} + + +video::SColor CGUIListBox::getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const +{ + IGUISkin* skin = Environment->getSkin(); + if ( !skin ) + return video::SColor(); + + switch ( colorType ) + { + case EGUI_LBC_TEXT: + return skin->getColor(EGDC_BUTTON_TEXT); + case EGUI_LBC_TEXT_HIGHLIGHT: + return skin->getColor(EGDC_HIGH_LIGHT_TEXT); + case EGUI_LBC_ICON: + return skin->getColor(EGDC_ICON); + case EGUI_LBC_ICON_HIGHLIGHT: + return skin->getColor(EGDC_ICON_HIGH_LIGHT); + default: + return video::SColor(); + } +} + +//! set global itemHeight +void CGUIListBox::setItemHeight( s32 height ) +{ + ItemHeight = height; + ItemHeightOverride = 1; +} + + +//! Sets whether to draw the background +void CGUIListBox::setDrawBackground(bool draw) +{ + DrawBack = draw; +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.d new file mode 100644 index 0000000..07cb1bc --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.d @@ -0,0 +1,2 @@ +CGUIListBox.o: CGUIListBox.cpp CGUIListBox.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.h new file mode 100644 index 0000000..d00921f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIListBox.h @@ -0,0 +1,190 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_LIST_BOX_H_INCLUDED__ +#define __C_GUI_LIST_BOX_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIListBox.h" +#include "irrArray.h" + +namespace irr +{ +namespace gui +{ + + class IGUIFont; + class IGUIScrollBar; + + class CGUIListBox : public IGUIListBox + { + public: + //! constructor + CGUIListBox(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle, bool clip=true, + bool drawBack=false, bool moveOverSelect=false); + + //! destructor + virtual ~CGUIListBox(); + + //! returns amount of list items + virtual u32 getItemCount() const; + + //! returns string of a list item. the id may be a value from 0 to itemCount-1 + virtual const wchar_t* getListItem(u32 id) const; + + //! adds an list item, returns id of item + virtual u32 addItem(const wchar_t* text); + + //! clears the list + virtual void clear(); + + //! returns id of selected item. returns -1 if no item is selected. + virtual s32 getSelected() const; + + //! sets the selected item. Set this to -1 if no item should be selected + virtual void setSelected(s32 id); + + //! sets the selected item. Set this to -1 if no item should be selected + virtual void setSelected(const wchar_t *item); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! adds an list item with an icon + //! \param text Text of list entry + //! \param icon Sprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon + //! \return + //! returns the id of the new created item + virtual u32 addItem(const wchar_t* text, s32 icon); + + //! Returns the icon of an item + virtual s32 getIcon(u32 id) const; + + //! removes an item from the list + virtual void removeItem(u32 id); + + //! get the the id of the item at the given absolute coordinates + virtual s32 getItemAt(s32 xpos, s32 ypos) const; + + //! Sets the sprite bank which should be used to draw list icons. This font is set to the sprite bank of + //! the built-in-font by default. A sprite can be displayed in front of every list item. + //! An icon is an index within the icon sprite bank. Several default icons are available in the + //! skin through getIcon + virtual void setSpriteBank(IGUISpriteBank* bank); + + //! set whether the listbox should scroll to newly selected items + virtual void setAutoScrollEnabled(bool scroll); + + //! returns true if automatic scrolling is enabled, false if not. + virtual bool isAutoScrollEnabled() const; + + //! Update the position and size of the listbox, and update the scrollbar + virtual void updateAbsolutePosition(); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + //! set all item colors at given index to color + virtual void setItemOverrideColor(u32 index, video::SColor color); + + //! set all item colors of specified type at given index to color + virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color); + + //! clear all item colors at index + virtual void clearItemOverrideColor(u32 index); + + //! clear item color at index for given colortype + virtual void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType); + + //! has the item at index its color overwritten? + virtual bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const; + + //! return the overwrite color at given item index. + virtual video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const; + + //! return the default color which is used for the given colorType + virtual video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const; + + //! set the item at the given index + virtual void setItem(u32 index, const wchar_t* text, s32 icon); + + //! Insert the item at the given index + //! Return the index on success or -1 on failure. + virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon); + + //! Swap the items at the given indices + virtual void swapItems(u32 index1, u32 index2); + + //! set global itemHeight + virtual void setItemHeight( s32 height ); + + //! Sets whether to draw the background + virtual void setDrawBackground(bool draw); + + + private: + + struct ListItem + { + ListItem() : icon(-1) + {} + + core::stringw text; + s32 icon; + + // A multicolor extension + struct ListItemOverrideColor + { + ListItemOverrideColor() : Use(false) {} + bool Use; + video::SColor Color; + }; + ListItemOverrideColor OverrideColors[EGUI_LBC_COUNT]; + }; + + void recalculateItemHeight(); + void selectNew(s32 ypos, bool onlyHover=false); + void recalculateScrollPos(); + + // extracted that function to avoid copy&paste code + void recalculateItemWidth(s32 icon); + + // get labels used for serialization + bool getSerializationLabels(EGUI_LISTBOX_COLOR colorType, core::stringc & useColorLabel, core::stringc & colorLabel) const; + + core::array< ListItem > Items; + s32 Selected; + s32 ItemHeight; + s32 ItemHeightOverride; + s32 TotalItemHeight; + s32 ItemsIconWidth; + gui::IGUIFont* Font; + gui::IGUISpriteBank* IconBank; + gui::IGUIScrollBar* ScrollBar; + u32 selectTime; + u32 LastKeyTime; + core::stringw KeyBuffer; + bool Selecting; + bool DrawBack; + bool MoveOverSelect; + bool AutoScroll; + bool HighlightWhenNotFocused; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.cpp new file mode 100644 index 0000000..6987df8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.cpp @@ -0,0 +1,294 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIMenu.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "IGUIWindow.h" + +#include "os.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIMenu::CGUIMenu(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle) + : CGUIContextMenu(environment, parent, id, rectangle, false, true) +{ + #ifdef _DEBUG + setDebugName("CGUIMenu"); + #endif + + Type = EGUIET_MENU; + + setNotClipped(false); + + recalculateSize(); +} + + +//! draws the element and its children +void CGUIMenu::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + IGUIFont* font = skin->getFont(EGDF_MENU); + + if (font != LastFont) + { + if (LastFont) + LastFont->drop(); + LastFont = font; + if (LastFont) + LastFont->grab(); + + recalculateSize(); + } + + core::rect<s32> rect = AbsoluteRect; + + // draw frame + + skin->draw3DToolBar(this, rect, &AbsoluteClippingRect); + + // loop through all menu items + + rect = AbsoluteRect; + + for (s32 i=0; i<(s32)Items.size(); ++i) + { + if (!Items[i].IsSeparator) + { + rect = getRect(Items[i], AbsoluteRect); + + // draw highlighted + if (i == HighLighted && Items[i].Enabled) + { + skin->draw3DSunkenPane(this, skin->getColor(EGDC_3D_DARK_SHADOW), + true, true, rect, &AbsoluteClippingRect); + } + // draw text + + EGUI_DEFAULT_COLOR c = EGDC_BUTTON_TEXT; + + if (i == HighLighted) + c = EGDC_HIGH_LIGHT_TEXT; + + if (!Items[i].Enabled) + c = EGDC_GRAY_TEXT; + + if (font) + font->draw(Items[i].Text.c_str(), rect, + skin->getColor(c), true, true, &AbsoluteClippingRect); + } + } + + IGUIElement::draw(); +} + + +//! called if an event happened. +bool CGUIMenu::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case gui::EGET_ELEMENT_FOCUS_LOST: + if (event.GUIEvent.Caller == this && !isMyChild(event.GUIEvent.Element)) + { + closeAllSubMenus(); + HighLighted = -1; + } + break; + case gui::EGET_ELEMENT_FOCUSED: + if (event.GUIEvent.Caller == this && Parent) + { + Parent->bringToFront(this); + } + break; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + { + if (!Environment->hasFocus(this)) + { + Environment->setFocus(this); + } + + if (Parent) + Parent->bringToFront(this); + + core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y); + bool shouldCloseSubMenu = hasOpenSubMenu(); + if (!AbsoluteClippingRect.isPointInside(p)) + { + shouldCloseSubMenu = false; + } + highlight(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y), true); + if ( shouldCloseSubMenu ) + { + Environment->removeFocus(this); + } + + return true; + } + case EMIE_LMOUSE_LEFT_UP: + { + core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y); + if (!AbsoluteClippingRect.isPointInside(p)) + { + s32 t = sendClick(p); + if ((t==0 || t==1) && Environment->hasFocus(this)) + Environment->removeFocus(this); + } + + return true; + } + case EMIE_MOUSE_MOVED: + if (Environment->hasFocus(this) && HighLighted >= 0) + { + s32 oldHighLighted = HighLighted; + highlight(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y), true); + if ( HighLighted < 0 ) + HighLighted = oldHighLighted; // keep last hightlight active when moving outside the area + } + return true; + default: + break; + } + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + +void CGUIMenu::recalculateSize() +{ + core::rect<s32> clientRect; // client rect of parent + if ( Parent && Parent->hasType(EGUIET_WINDOW) ) + { + clientRect = static_cast<IGUIWindow*>(Parent)->getClientRect(); + } + else if ( Parent ) + { + clientRect = core::rect<s32>(0,0, Parent->getAbsolutePosition().getWidth(), + Parent->getAbsolutePosition().getHeight()); + } + else + { + clientRect = RelativeRect; + } + + + IGUISkin* skin = Environment->getSkin(); + IGUIFont* font = skin->getFont(EGDF_MENU); + + if (!font) + { + if (Parent && skin) + RelativeRect = core::rect<s32>(clientRect.UpperLeftCorner.X, clientRect.UpperLeftCorner.Y, + clientRect.LowerRightCorner.X, clientRect.UpperLeftCorner.Y+skin->getSize(EGDS_MENU_HEIGHT)); + return; + } + + core::rect<s32> rect; + rect.UpperLeftCorner = clientRect.UpperLeftCorner; + s32 height = font->getDimension(L"A").Height + 5; + //if (skin && height < skin->getSize ( EGDS_MENU_HEIGHT )) + // height = skin->getSize(EGDS_MENU_HEIGHT); + s32 width = rect.UpperLeftCorner.X; + s32 i; + + for (i=0; i<(s32)Items.size(); ++i) + { + if (Items[i].IsSeparator) + { + Items[i].Dim.Width = 0; + Items[i].Dim.Height = height; + } + else + { + Items[i].Dim = font->getDimension(Items[i].Text.c_str()); + Items[i].Dim.Width += 20; + } + + Items[i].PosY = width; + width += Items[i].Dim.Width; + } + + width = clientRect.getWidth(); + + rect.LowerRightCorner.X = rect.UpperLeftCorner.X + width; + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + height; + + setRelativePosition(rect); + + // recalculate submenus + for (i=0; i<(s32)Items.size(); ++i) + if (Items[i].SubMenu) + { + // move submenu + s32 w = Items[i].SubMenu->getAbsolutePosition().getWidth(); + s32 h = Items[i].SubMenu->getAbsolutePosition().getHeight(); + + Items[i].SubMenu->setRelativePosition( + core::rect<s32>(Items[i].PosY, height , + Items[i].PosY+w-5, height+h)); + } +} + + +//! returns the item highlight-area +core::rect<s32> CGUIMenu::getHRect(const SItem& i, const core::rect<s32>& absolute) const +{ + core::rect<s32> r = absolute; + r.UpperLeftCorner.X += i.PosY; + r.LowerRightCorner.X = r.UpperLeftCorner.X + i.Dim.Width; + return r; +} + + +//! Gets drawing rect of Item +core::rect<s32> CGUIMenu::getRect(const SItem& i, const core::rect<s32>& absolute) const +{ + return getHRect(i, absolute); +} + + +void CGUIMenu::updateAbsolutePosition() +{ + if (Parent) + DesiredRect.LowerRightCorner.X = Parent->getAbsolutePosition().getWidth(); + + IGUIElement::updateAbsolutePosition(); +} + + +} // end namespace +} // end namespace + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.d new file mode 100644 index 0000000..c9ef3e5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.d @@ -0,0 +1 @@ +CGUIMenu.o: CGUIMenu.cpp CGUIMenu.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.h new file mode 100644 index 0000000..d1e9526 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMenu.h @@ -0,0 +1,52 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_MENU_H_INCLUDED__ +#define __C_GUI_MENU_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "CGUIContextMenu.h" + +namespace irr +{ +namespace gui +{ + + //! GUI menu interface. + class CGUIMenu : public CGUIContextMenu + { + public: + + //! constructor + CGUIMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle); + + //! draws the element and its children + virtual void draw(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! Updates the absolute position. + virtual void updateAbsolutePosition(); + + protected: + + virtual void recalculateSize(); + + //! returns the item highlight-area + virtual core::rect<s32> getHRect(const SItem& i, const core::rect<s32>& absolute) const; + + //! Gets drawing rect of Item + virtual core::rect<s32> getRect(const SItem& i, const core::rect<s32>& absolute) const; + }; + +} // end namespace gui +} // end namespace irr + + +#endif // __C_GUI_MENU_H_INCLUDED__ +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.cpp new file mode 100644 index 0000000..d121e34 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.cpp @@ -0,0 +1,171 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIMeshViewer.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IAnimatedMesh.h" +#include "IMesh.h" +#include "os.h" +#include "IGUISkin.h" + +namespace irr +{ + +namespace gui +{ + + +//! constructor +CGUIMeshViewer::CGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) +: IGUIMeshViewer(environment, parent, id, rectangle), Mesh(0) +{ + #ifdef _DEBUG + setDebugName("CGUIMeshViewer"); + #endif +} + + +//! destructor +CGUIMeshViewer::~CGUIMeshViewer() +{ + if (Mesh) + Mesh->drop(); +} + + +//! sets the mesh to be shown +void CGUIMeshViewer::setMesh(scene::IAnimatedMesh* mesh) +{ + if (mesh) + mesh->grab(); + if (Mesh) + Mesh->drop(); + + Mesh = mesh; + + /* This might be used for proper transformation etc. + core::vector3df center(0.0f,0.0f,0.0f); + core::aabbox3d<f32> box; + + box = Mesh->getMesh(0)->getBoundingBox(); + center = (box.MaxEdge + box.MinEdge) / 2; + */ +} + + +//! Gets the displayed mesh +scene::IAnimatedMesh* CGUIMeshViewer::getMesh() const +{ + return Mesh; +} + + +//! sets the material +void CGUIMeshViewer::setMaterial(const video::SMaterial& material) +{ + Material = material; +} + + +//! gets the material +const video::SMaterial& CGUIMeshViewer::getMaterial() const +{ + return Material; +} + + +//! called if an event happened. +bool CGUIMeshViewer::OnEvent(const SEvent& event) +{ + return IGUIElement::OnEvent(event); +} + + +//! draws the element and its children +void CGUIMeshViewer::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + video::IVideoDriver* driver = Environment->getVideoDriver(); + core::rect<s32> viewPort = AbsoluteRect; + viewPort.LowerRightCorner.X -= 1; + viewPort.LowerRightCorner.Y -= 1; + viewPort.UpperLeftCorner.X += 1; + viewPort.UpperLeftCorner.Y += 1; + + viewPort.clipAgainst(AbsoluteClippingRect); + + // draw the frame + + core::rect<s32> frameRect(AbsoluteRect); + frameRect.LowerRightCorner.Y = frameRect.UpperLeftCorner.Y + 1; + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_SHADOW), frameRect, &AbsoluteClippingRect); + + frameRect.LowerRightCorner.Y = AbsoluteRect.LowerRightCorner.Y; + frameRect.LowerRightCorner.X = frameRect.UpperLeftCorner.X + 1; + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_SHADOW), frameRect, &AbsoluteClippingRect); + + frameRect = AbsoluteRect; + frameRect.UpperLeftCorner.X = frameRect.LowerRightCorner.X - 1; + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_HIGH_LIGHT), frameRect, &AbsoluteClippingRect); + + frameRect = AbsoluteRect; + frameRect.UpperLeftCorner.Y = AbsoluteRect.LowerRightCorner.Y - 1; + skin->draw2DRectangle(this, skin->getColor(EGDC_3D_HIGH_LIGHT), frameRect, &AbsoluteClippingRect); + + // draw the mesh + + if (Mesh) + { + //TODO: if outside of screen, dont draw. + // - why is the absolute clipping rect not already the screen? + + core::rect<s32> oldViewPort = driver->getViewPort(); + + driver->setViewPort(viewPort); + + core::matrix4 mat; + + //CameraControl->calculateProjectionMatrix(mat); + //driver->setTransform(video::TS_PROJECTION, mat); + + mat.makeIdentity(); + mat.setTranslation(core::vector3df(0,0,0)); + driver->setTransform(video::ETS_WORLD, mat); + + //CameraControl->calculateViewMatrix(mat); + //driver->setTransform(video::TS_VIEW, mat); + + driver->setMaterial(Material); + + u32 frame = 0; + if(Mesh->getFrameCount()) + frame = (os::Timer::getTime()/20)%Mesh->getFrameCount(); + const scene::IMesh* const m = Mesh->getMesh(frame); + for (u32 i=0; i<m->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* mb = m->getMeshBuffer(i); + driver->drawVertexPrimitiveList(mb->getVertices(), + mb->getVertexCount(), mb->getIndices(), + mb->getIndexCount()/ 3, mb->getVertexType(), + scene::EPT_TRIANGLES, mb->getIndexType()); + } + + driver->setViewPort(oldViewPort); + } + + IGUIElement::draw(); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.d new file mode 100644 index 0000000..f765bf3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.d @@ -0,0 +1,2 @@ +CGUIMeshViewer.o: CGUIMeshViewer.cpp CGUIMeshViewer.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.h new file mode 100644 index 0000000..7827b4b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMeshViewer.h @@ -0,0 +1,61 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_MESH_VIEWER_H_INCLUDED__ +#define __C_GUI_MESH_VIEWER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIMeshViewer.h" +#include "SMaterial.h" + +namespace irr +{ + +namespace gui +{ + + class CGUIMeshViewer : public IGUIMeshViewer + { + public: + + //! constructor + CGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle); + + //! destructor + virtual ~CGUIMeshViewer(); + + //! sets the mesh to be shown + virtual void setMesh(scene::IAnimatedMesh* mesh); + + //! Gets the displayed mesh + virtual scene::IAnimatedMesh* getMesh() const; + + //! sets the material + virtual void setMaterial(const video::SMaterial& material); + + //! gets the material + virtual const video::SMaterial& getMaterial() const; + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + private: + + video::SMaterial Material; + scene::IAnimatedMesh* Mesh; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_MESH_VIEWER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.cpp new file mode 100644 index 0000000..57b383d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.cpp @@ -0,0 +1,463 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIMessageBox.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IGUIButton.h" +#include "IGUIFont.h" +#include "ITexture.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIMessageBox::CGUIMessageBox(IGUIEnvironment* environment, const wchar_t* caption, + const wchar_t* text, s32 flags, + IGUIElement* parent, s32 id, core::rect<s32> rectangle, video::ITexture* image) +: CGUIWindow(environment, parent, id, rectangle), + OkButton(0), CancelButton(0), YesButton(0), NoButton(0), StaticText(0), + Icon(0), IconTexture(image), + Flags(flags), MessageText(text), Pressed(false) +{ + #ifdef _DEBUG + setDebugName("CGUIMessageBox"); + #endif + + // set element type + Type = EGUIET_MESSAGE_BOX; + + // remove focus + Environment->setFocus(0); + + // remove buttons + + getMaximizeButton()->remove(); + getMinimizeButton()->remove(); + + if (caption) + setText(caption); + + Environment->setFocus(this); + + if ( IconTexture ) + IconTexture->grab(); + + refreshControls(); +} + + +//! destructor +CGUIMessageBox::~CGUIMessageBox() +{ + if (StaticText) + StaticText->drop(); + + if (OkButton) + OkButton->drop(); + + if (CancelButton) + CancelButton->drop(); + + if (YesButton) + YesButton->drop(); + + if (NoButton) + NoButton->drop(); + + if (Icon) + Icon->drop(); + + if ( IconTexture ) + IconTexture->drop(); +} + +void CGUIMessageBox::setButton(IGUIButton*& button, bool isAvailable, const core::rect<s32> & btnRect, const wchar_t * text, IGUIElement*& focusMe) +{ + // add/remove ok button + if (isAvailable) + { + if (!button) + { + button = Environment->addButton(btnRect, this); + button->setSubElement(true); + button->grab(); + } + else + button->setRelativePosition(btnRect); + + button->setText(text); + + focusMe = button; + } + else if (button) + { + button->drop(); + button->remove(); + button =0; + } +} + +void CGUIMessageBox::refreshControls() +{ + // Layout can be seen as 4 boxes (a layoutmanager would be nice) + // One box at top over the whole width for title + // Two boxes with same height at the middle beside each other for icon and for text + // One box at the bottom for the buttons + + const IGUISkin* skin = Environment->getSkin(); + + const s32 buttonHeight = skin->getSize(EGDS_BUTTON_HEIGHT); + const s32 buttonWidth = skin->getSize(EGDS_BUTTON_WIDTH); + const s32 titleHeight = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH)+2; // titlebar has no own constant + const s32 buttonDistance = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + const s32 borderWidth = skin->getSize(EGDS_MESSAGE_BOX_GAP_SPACE); + + // add the static text for the message + core::rect<s32> staticRect; + staticRect.UpperLeftCorner.X = borderWidth; + staticRect.UpperLeftCorner.Y = titleHeight + borderWidth; + staticRect.LowerRightCorner.X = staticRect.UpperLeftCorner.X + skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH); + staticRect.LowerRightCorner.Y = staticRect.UpperLeftCorner.Y + skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT); + if (!StaticText) + { + StaticText = Environment->addStaticText(MessageText.c_str(), staticRect, false, false, this); + + StaticText->setWordWrap(true); + StaticText->setSubElement(true); + StaticText->grab(); + } + else + { + StaticText->setRelativePosition(staticRect); + StaticText->setText(MessageText.c_str()); + } + + s32 textHeight = StaticText->getTextHeight(); + s32 textWidth = StaticText->getTextWidth() + 6; // +6 because the static itself needs that + const s32 iconHeight = IconTexture ? IconTexture->getOriginalSize().Height : 0; + + if ( textWidth < skin->getSize(EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH) ) + textWidth = skin->getSize(EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH) + 6; + // no neeed to check for max because it couldn't get larger due to statictextbox. + if ( textHeight < skin->getSize(EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT) ) + textHeight = skin->getSize(EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT); + if ( textHeight > skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT) ) + textHeight = skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT); + + // content is text + icons + borders (but not titlebar) + s32 contentHeight = textHeight > iconHeight ? textHeight : iconHeight; + contentHeight += borderWidth; + s32 contentWidth = 0; + + // add icon + if ( IconTexture ) + { + core::position2d<s32> iconPos; + iconPos.Y = titleHeight + borderWidth; + if ( iconHeight < textHeight ) + iconPos.Y += (textHeight-iconHeight) / 2; + iconPos.X = borderWidth; + + if (!Icon) + { + Icon = Environment->addImage(IconTexture, iconPos, true, this); + Icon->setSubElement(true); + Icon->grab(); + } + else + { + core::rect<s32> iconRect( iconPos.X, iconPos.Y, iconPos.X + IconTexture->getOriginalSize().Width, iconPos.Y + IconTexture->getOriginalSize().Height ); + Icon->setRelativePosition(iconRect); + } + + contentWidth += borderWidth + IconTexture->getOriginalSize().Width; + } + else if ( Icon ) + { + Icon->drop(); + Icon->remove(); + Icon = 0; + } + + // position text + core::rect<s32> textRect; + textRect.UpperLeftCorner.X = contentWidth + borderWidth; + textRect.UpperLeftCorner.Y = titleHeight + borderWidth; + if ( textHeight < iconHeight ) + textRect.UpperLeftCorner.Y += (iconHeight-textHeight) / 2; + textRect.LowerRightCorner.X = textRect.UpperLeftCorner.X + textWidth; + textRect.LowerRightCorner.Y = textRect.UpperLeftCorner.Y + textHeight; + contentWidth += 2*borderWidth + textWidth; + StaticText->setRelativePosition( textRect ); + + // find out button size needs + s32 countButtons = 0; + if (Flags & EMBF_OK) + ++countButtons; + if (Flags & EMBF_CANCEL) + ++countButtons; + if (Flags & EMBF_YES) + ++countButtons; + if (Flags & EMBF_NO) + ++countButtons; + + s32 buttonBoxWidth = countButtons * buttonWidth + 2 * borderWidth; + if ( countButtons > 1 ) + buttonBoxWidth += (countButtons-1) * buttonDistance; + s32 buttonBoxHeight = buttonHeight + 2 * borderWidth; + + // calc new message box sizes + core::rect<s32> tmp = getRelativePosition(); + s32 msgBoxHeight = titleHeight + contentHeight + buttonBoxHeight; + s32 msgBoxWidth = contentWidth > buttonBoxWidth ? contentWidth : buttonBoxWidth; + + // adjust message box position + tmp.UpperLeftCorner.Y = (Parent->getAbsolutePosition().getHeight() - msgBoxHeight) / 2; + tmp.LowerRightCorner.Y = tmp.UpperLeftCorner.Y + msgBoxHeight; + tmp.UpperLeftCorner.X = (Parent->getAbsolutePosition().getWidth() - msgBoxWidth) / 2; + tmp.LowerRightCorner.X = tmp.UpperLeftCorner.X + msgBoxWidth; + setRelativePosition(tmp); + + // add buttons + + core::rect<s32> btnRect; + btnRect.UpperLeftCorner.Y = titleHeight + contentHeight + borderWidth; + btnRect.LowerRightCorner.Y = btnRect.UpperLeftCorner.Y + buttonHeight; + btnRect.UpperLeftCorner.X = borderWidth; + if ( contentWidth > buttonBoxWidth ) + btnRect.UpperLeftCorner.X += (contentWidth - buttonBoxWidth) / 2; // center buttons + btnRect.LowerRightCorner.X = btnRect.UpperLeftCorner.X + buttonWidth; + + IGUIElement* focusMe = 0; + setButton(OkButton, (Flags & EMBF_OK) != 0, btnRect, skin->getDefaultText(EGDT_MSG_BOX_OK), focusMe); + if ( Flags & EMBF_OK ) + btnRect += core::position2d<s32>(buttonWidth + buttonDistance, 0); + setButton(CancelButton, (Flags & EMBF_CANCEL) != 0, btnRect, skin->getDefaultText(EGDT_MSG_BOX_CANCEL), focusMe); + if ( Flags & EMBF_CANCEL ) + btnRect += core::position2d<s32>(buttonWidth + buttonDistance, 0); + setButton(YesButton, (Flags & EMBF_YES) != 0, btnRect, skin->getDefaultText(EGDT_MSG_BOX_YES), focusMe); + if ( Flags & EMBF_YES ) + btnRect += core::position2d<s32>(buttonWidth + buttonDistance, 0); + setButton(NoButton, (Flags & EMBF_NO) != 0, btnRect, skin->getDefaultText(EGDT_MSG_BOX_NO), focusMe); + + if (Environment->hasFocus(this) && focusMe) + Environment->setFocus(focusMe); +} + + +//! called if an event happened. +bool CGUIMessageBox::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + SEvent outevent; + outevent.EventType = EET_GUI_EVENT; + outevent.GUIEvent.Caller = this; + outevent.GUIEvent.Element = 0; + + switch(event.EventType) + { + case EET_KEY_INPUT_EVENT: + + if (event.KeyInput.PressedDown) + { + switch (event.KeyInput.Key) + { + case KEY_RETURN: + if (OkButton) + { + OkButton->setPressed(true); + Pressed = true; + } + break; + case KEY_KEY_Y: + if (YesButton) + { + YesButton->setPressed(true); + Pressed = true; + } + break; + case KEY_KEY_N: + if (NoButton) + { + NoButton->setPressed(true); + Pressed = true; + } + break; + case KEY_ESCAPE: + if (Pressed) + { + // cancel press + if (OkButton) OkButton->setPressed(false); + if (YesButton) YesButton->setPressed(false); + if (NoButton) NoButton->setPressed(false); + Pressed = false; + } + else + if (CancelButton) + { + CancelButton->setPressed(true); + Pressed = true; + } + else + if (CloseButton && CloseButton->isVisible()) + { + CloseButton->setPressed(true); + Pressed = true; + } + break; + default: // no other key is handled here + break; + } + } + else + if (Pressed) + { + if (OkButton && event.KeyInput.Key == KEY_RETURN) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_OK; + Parent->OnEvent(outevent); + remove(); + return true; + } + else + if ((CancelButton || CloseButton) && event.KeyInput.Key == KEY_ESCAPE) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_CANCEL; + Parent->OnEvent(outevent); + remove(); + return true; + } + else + if (YesButton && event.KeyInput.Key == KEY_KEY_Y) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_YES; + Parent->OnEvent(outevent); + remove(); + return true; + } + else + if (NoButton && event.KeyInput.Key == KEY_KEY_N) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_NO; + Parent->OnEvent(outevent); + remove(); + return true; + } + } + break; + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) + { + if (event.GUIEvent.Caller == OkButton) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_OK; + Parent->OnEvent(outevent); + remove(); + return true; + } + else + if (event.GUIEvent.Caller == CancelButton || + event.GUIEvent.Caller == CloseButton) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_CANCEL; + Parent->OnEvent(outevent); + remove(); + return true; + } + else + if (event.GUIEvent.Caller == YesButton) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_YES; + Parent->OnEvent(outevent); + remove(); + return true; + } + else + if (event.GUIEvent.Caller == NoButton) + { + setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC + Environment->setFocus(0); + outevent.GUIEvent.EventType = EGET_MESSAGEBOX_NO; + Parent->OnEvent(outevent); + remove(); + return true; + } + } + break; + default: + break; + } + } + + return CGUIWindow::OnEvent(event); +} + + +//! Writes attributes of the element. +void CGUIMessageBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + CGUIWindow::serializeAttributes(out,options); + + out->addBool ("OkayButton", (Flags & EMBF_OK) != 0 ); + out->addBool ("CancelButton", (Flags & EMBF_CANCEL) != 0 ); + out->addBool ("YesButton", (Flags & EMBF_YES) != 0 ); + out->addBool ("NoButton", (Flags & EMBF_NO) != 0 ); + out->addTexture ("Texture", IconTexture); + + out->addString ("MessageText", MessageText.c_str()); +} + + +//! Reads attributes of the element +void CGUIMessageBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + Flags = 0; + + Flags = in->getAttributeAsBool("OkayButton") ? EMBF_OK : 0; + Flags |= in->getAttributeAsBool("CancelButton")? EMBF_CANCEL : 0; + Flags |= in->getAttributeAsBool("YesButton") ? EMBF_YES : 0; + Flags |= in->getAttributeAsBool("NoButton") ? EMBF_NO : 0; + + if ( IconTexture ) + { + IconTexture->drop(); + IconTexture = NULL; + } + IconTexture = in->getAttributeAsTexture("Texture"); + if ( IconTexture ) + IconTexture->grab(); + + MessageText = in->getAttributeAsStringW("MessageText").c_str(); + + CGUIWindow::deserializeAttributes(in,options); + + refreshControls(); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.d new file mode 100644 index 0000000..01f3f67 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.d @@ -0,0 +1,2 @@ +CGUIMessageBox.o: CGUIMessageBox.cpp CGUIMessageBox.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.h new file mode 100644 index 0000000..6f632c5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIMessageBox.h @@ -0,0 +1,64 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_MESSAGE_BOX_H_INCLUDED__ +#define __C_GUI_MESSAGE_BOX_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "CGUIWindow.h" +#include "IGUIStaticText.h" +#include "IGUIImage.h" +#include "irrArray.h" + +namespace irr +{ +namespace gui +{ + class CGUIMessageBox : public CGUIWindow + { + public: + + //! constructor + CGUIMessageBox(IGUIEnvironment* environment, const wchar_t* caption, + const wchar_t* text, s32 flag, + IGUIElement* parent, s32 id, core::rect<s32> rectangle, video::ITexture* image=0); + + //! destructor + virtual ~CGUIMessageBox(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + void refreshControls(); + void setButton(IGUIButton*& button, bool isAvailable, const core::rect<s32> & btnRect, const wchar_t * text, IGUIElement*& focusMe); + + IGUIButton* OkButton; + IGUIButton* CancelButton; + IGUIButton* YesButton; + IGUIButton* NoButton; + IGUIStaticText* StaticText; + IGUIImage * Icon; + video::ITexture * IconTexture; + + s32 Flags; + core::stringw MessageText; + bool Pressed; + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.cpp new file mode 100644 index 0000000..879cb49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.cpp @@ -0,0 +1,235 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIModalScreen.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" +#include "os.h" +#include "IVideoDriver.h" +#include "IGUISkin.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIModalScreen::CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* parent, s32 id) +: IGUIElement(EGUIET_MODAL_SCREEN, environment, parent, id, core::recti(0, 0, parent->getAbsolutePosition().getWidth(), parent->getAbsolutePosition().getHeight()) ), + MouseDownTime(0) +{ + #ifdef _DEBUG + setDebugName("CGUIModalScreen"); + #endif + setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + // this element is a tab group + setTabGroup(true); +} + +bool CGUIModalScreen::canTakeFocus(IGUIElement* target) const +{ + return (target && ((const IGUIElement*)target == this // this element can take it + || isMyChild(target) // own children also + || (target->getType() == EGUIET_MODAL_SCREEN ) // other modals also fine (is now on top or explicitely requested) + || (target->getParent() && target->getParent()->getType() == EGUIET_MODAL_SCREEN ))) // children of other modals will do + ; +} + +bool CGUIModalScreen::isVisible() const +{ + // any parent invisible? + IGUIElement * parentElement = getParent(); + while ( parentElement ) + { + if ( !parentElement->isVisible() ) + return false; + parentElement = parentElement->getParent(); + } + + // if we have no children then the modal is probably abused as a way to block input + if ( Children.empty() ) + { + return IGUIElement::isVisible(); + } + + // any child visible? + bool visible = false; + core::list<IGUIElement*>::ConstIterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + if ( (*it)->isVisible() ) + { + visible = true; + break; + } + } + return visible; +} + +bool CGUIModalScreen::isPointInside(const core::position2d<s32>& point) const +{ + return true; +} + +//! called if an event happened. +bool CGUIModalScreen::OnEvent(const SEvent& event) +{ + if (!isEnabled() || !isVisible() ) + return IGUIElement::OnEvent(event); + + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case EGET_ELEMENT_FOCUSED: + if ( event.GUIEvent.Caller == this && isMyChild(event.GUIEvent.Element) ) + { + Environment->removeFocus(0); // can't setFocus otherwise at it still has focus here + Environment->setFocus(event.GUIEvent.Element); + MouseDownTime = os::Timer::getTime(); + return true; + } + if ( !canTakeFocus(event.GUIEvent.Caller)) + { + if ( !Children.empty() ) + Environment->setFocus(*(Children.begin())); + else + Environment->setFocus(this); + } + IGUIElement::OnEvent(event); + return false; + case EGET_ELEMENT_FOCUS_LOST: + if ( !canTakeFocus(event.GUIEvent.Element)) + { + if ( isMyChild(event.GUIEvent.Caller) ) + { + if ( !Children.empty() ) + Environment->setFocus(*(Children.begin())); + else + Environment->setFocus(this); + } + else + { + MouseDownTime = os::Timer::getTime(); + } + return true; + } + else + { + return IGUIElement::OnEvent(event); + } + case EGET_ELEMENT_CLOSED: + // do not interfere with children being removed + return IGUIElement::OnEvent(event); + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) + { + MouseDownTime = os::Timer::getTime(); + } + default: + break; + } + + IGUIElement::OnEvent(event); // anyone knows why events are passed on here? Causes p.e. problems when this is child of a CGUIWindow. + + return true; // absorb everything else +} + + +//! draws the element and its children +void CGUIModalScreen::draw() +{ + IGUISkin *skin = Environment->getSkin(); + + if (!skin) + return; + + u32 now = os::Timer::getTime(); + if (now - MouseDownTime < 300 && (now / 70)%2) + { + core::list<IGUIElement*>::Iterator it = Children.begin(); + core::rect<s32> r; + video::SColor c = Environment->getSkin()->getColor(gui::EGDC_3D_HIGH_LIGHT); + + for (; it != Children.end(); ++it) + { + if ((*it)->isVisible()) + { + r = (*it)->getAbsolutePosition(); + r.LowerRightCorner.X += 1; + r.LowerRightCorner.Y += 1; + r.UpperLeftCorner.X -= 1; + r.UpperLeftCorner.Y -= 1; + + skin->draw2DRectangle(this, c, r, &AbsoluteClippingRect); + } + } + } + + IGUIElement::draw(); +} + + +//! Removes a child. +void CGUIModalScreen::removeChild(IGUIElement* child) +{ + IGUIElement::removeChild(child); + + if (Children.empty()) + { + remove(); + } +} + + +//! adds a child +void CGUIModalScreen::addChild(IGUIElement* child) +{ + IGUIElement::addChild(child); + Environment->setFocus(child); +} + + +void CGUIModalScreen::updateAbsolutePosition() +{ + core::rect<s32> parentRect(0,0,0,0); + + if (Parent) + { + parentRect = Parent->getAbsolutePosition(); + RelativeRect.UpperLeftCorner.X = 0; + RelativeRect.UpperLeftCorner.Y = 0; + RelativeRect.LowerRightCorner.X = parentRect.getWidth(); + RelativeRect.LowerRightCorner.Y = parentRect.getHeight(); + } + + IGUIElement::updateAbsolutePosition(); +} + + +//! Writes attributes of the element. +void CGUIModalScreen::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIElement::serializeAttributes(out,options); +} + +//! Reads attributes of the element +void CGUIModalScreen::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIElement::deserializeAttributes(in, options); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.d new file mode 100644 index 0000000..87b7a96 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.d @@ -0,0 +1,2 @@ +CGUIModalScreen.o: CGUIModalScreen.cpp CGUIModalScreen.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h new file mode 100644 index 0000000..8548eb5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h @@ -0,0 +1,70 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_MODAL_SCREEN_H_INCLUDED__ +#define __C_GUI_MODAL_SCREEN_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIElement.h" + +namespace irr +{ +namespace gui +{ + + class CGUIModalScreen : public IGUIElement + { + public: + + //! constructor + CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* parent, s32 id); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! Removes a child. + virtual void removeChild(IGUIElement* child); + + //! Adds a child + virtual void addChild(IGUIElement* child); + + + //! draws the element and its children + virtual void draw(); + + //! Updates the absolute position. + virtual void updateAbsolutePosition(); + + //! Modalscreen is not a typical element, but rather acts like a state for it's children. + //! isVisible is overriden to give this a useful behavior, so that a modal will no longer + //! be active when its parent is invisible or all its children are invisible. + virtual bool isVisible() const; + + //! Modals are infinite so every point is inside + virtual bool isPointInside(const core::position2d<s32>& point) const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + protected: + virtual bool canTakeFocus(IGUIElement* target) const; + + private: + + u32 MouseDownTime; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.cpp new file mode 100644 index 0000000..b65699e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.cpp @@ -0,0 +1,569 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIScrollBar.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "CGUIButton.h" +#include "IGUIFont.h" +#include "IGUIFontBitmap.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + + +//! constructor +CGUIScrollBar::CGUIScrollBar(bool horizontal, IGUIEnvironment* environment, + IGUIElement* parent, s32 id, + core::rect<s32> rectangle, bool noclip) + : IGUIScrollBar(environment, parent, id, rectangle), UpButton(0), + DownButton(0), Dragging(false), Horizontal(horizontal), + DraggedBySlider(false), TrayClick(false), Pos(0), DrawPos(0), + DrawHeight(0), Min(0), Max(100), SmallStep(10), LargeStep(50), DesiredPos(0), + LastChange(0) +{ + #ifdef _DEBUG + setDebugName("CGUIScrollBar"); + #endif + + refreshControls(); + + setNotClipped(noclip); + + // this element can be tabbed to + setTabStop(true); + setTabOrder(-1); + + setPos(0); +} + + +//! destructor +CGUIScrollBar::~CGUIScrollBar() +{ + if (UpButton) + UpButton->drop(); + + if (DownButton) + DownButton->drop(); +} + + +//! called if an event happened. +bool CGUIScrollBar::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_KEY_INPUT_EVENT: + if (event.KeyInput.PressedDown) + { + const s32 oldPos = Pos; + bool absorb = true; + switch (event.KeyInput.Key) + { + case KEY_LEFT: + case KEY_UP: + setPos(Pos-SmallStep); + break; + case KEY_RIGHT: + case KEY_DOWN: + setPos(Pos+SmallStep); + break; + case KEY_HOME: + setPos(Min); + break; + case KEY_PRIOR: + setPos(Pos-LargeStep); + break; + case KEY_END: + setPos(Max); + break; + case KEY_NEXT: + setPos(Pos+LargeStep); + break; + default: + absorb = false; + } + + if (Pos != oldPos) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_SCROLL_BAR_CHANGED; + Parent->OnEvent(newEvent); + } + if (absorb) + return true; + } + break; + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) + { + if (event.GUIEvent.Caller == UpButton) + setPos(Pos-SmallStep); + else + if (event.GUIEvent.Caller == DownButton) + setPos(Pos+SmallStep); + + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_SCROLL_BAR_CHANGED; + Parent->OnEvent(newEvent); + + return true; + } + else + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + if (event.GUIEvent.Caller == this) + Dragging = false; + } + break; + case EET_MOUSE_INPUT_EVENT: + { + const core::position2di p(event.MouseInput.X, event.MouseInput.Y); + bool isInside = isPointInside ( p ); + switch(event.MouseInput.Event) + { + case EMIE_MOUSE_WHEEL: + if (Environment->hasFocus(this)) + { + // thanks to a bug report by REAPER + // thanks to tommi by tommi for another bugfix + // everybody needs a little thanking. hallo niko!;-) + setPos( getPos() + + ( (event.MouseInput.Wheel < 0 ? -1 : 1) * SmallStep * (Horizontal ? 1 : -1 ) ) + ); + + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_SCROLL_BAR_CHANGED; + Parent->OnEvent(newEvent); + return true; + } + break; + case EMIE_LMOUSE_PRESSED_DOWN: + { + if (isInside) + { + Dragging = true; + DraggedBySlider = SliderRect.isPointInside(p); + TrayClick = !DraggedBySlider; + DesiredPos = getPosFromMousePos(p); + Environment->setFocus ( this ); + return true; + } + break; + } + case EMIE_LMOUSE_LEFT_UP: + case EMIE_MOUSE_MOVED: + { + if ( !event.MouseInput.isLeftPressed () ) + Dragging = false; + + if ( !Dragging ) + { + if ( event.MouseInput.Event == EMIE_MOUSE_MOVED ) + break; + return isInside; + } + + if ( event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP ) + Dragging = false; + + const s32 newPos = getPosFromMousePos(p); + const s32 oldPos = Pos; + + if (!DraggedBySlider) + { + if ( isInside ) + { + DraggedBySlider = SliderRect.isPointInside(p); + TrayClick = !DraggedBySlider; + } + + if (DraggedBySlider) + { + setPos(newPos); + } + else + { + TrayClick = false; + if (event.MouseInput.Event == EMIE_MOUSE_MOVED) + return isInside; + } + } + + if (DraggedBySlider) + { + setPos(newPos); + } + else + { + DesiredPos = newPos; + } + + if (Pos != oldPos && Parent) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_SCROLL_BAR_CHANGED; + Parent->OnEvent(newEvent); + } + return isInside; + } break; + + default: + break; + } + } break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + +void CGUIScrollBar::OnPostRender(u32 timeMs) +{ + if (Dragging && !DraggedBySlider && TrayClick && timeMs > LastChange + 200) + { + LastChange = timeMs; + + const s32 oldPos = Pos; + + if (DesiredPos >= Pos + LargeStep) + setPos(Pos + LargeStep); + else + if (DesiredPos <= Pos - LargeStep) + setPos(Pos - LargeStep); + else + if (DesiredPos >= Pos - LargeStep && DesiredPos <= Pos + LargeStep) + setPos(DesiredPos); + + if (Pos != oldPos && Parent) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_SCROLL_BAR_CHANGED; + Parent->OnEvent(newEvent); + } + } + +} + +//! draws the element and its children +void CGUIScrollBar::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + + video::SColor iconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + if ( iconColor != CurrentIconColor ) + { + refreshControls(); + } + + + SliderRect = AbsoluteRect; + + // draws the background + skin->draw2DRectangle(this, skin->getColor(EGDC_SCROLLBAR), SliderRect, &AbsoluteClippingRect); + + if ( core::isnotzero ( range() ) ) + { + // recalculate slider rectangle + if (Horizontal) + { + SliderRect.UpperLeftCorner.X = AbsoluteRect.UpperLeftCorner.X + DrawPos + RelativeRect.getHeight() - DrawHeight/2; + SliderRect.LowerRightCorner.X = SliderRect.UpperLeftCorner.X + DrawHeight; + } + else + { + SliderRect.UpperLeftCorner.Y = AbsoluteRect.UpperLeftCorner.Y + DrawPos + RelativeRect.getWidth() - DrawHeight/2; + SliderRect.LowerRightCorner.Y = SliderRect.UpperLeftCorner.Y + DrawHeight; + } + + skin->draw3DButtonPaneStandard(this, SliderRect, &AbsoluteClippingRect); + } + + // draw buttons + IGUIElement::draw(); +} + + +void CGUIScrollBar::updateAbsolutePosition() +{ + IGUIElement::updateAbsolutePosition(); + // todo: properly resize + refreshControls(); + setPos ( Pos ); +} + +//! +s32 CGUIScrollBar::getPosFromMousePos(const core::position2di &pos) const +{ + f32 w, p; + if (Horizontal) + { + w = RelativeRect.getWidth() - f32(RelativeRect.getHeight())*3.0f; + p = pos.X - AbsoluteRect.UpperLeftCorner.X - RelativeRect.getHeight()*1.5f; + } + else + { + w = RelativeRect.getHeight() - f32(RelativeRect.getWidth())*3.0f; + p = pos.Y - AbsoluteRect.UpperLeftCorner.Y - RelativeRect.getWidth()*1.5f; + } + return (s32) ( p/w * range() ) + Min; +} + + +//! sets the position of the scrollbar +void CGUIScrollBar::setPos(s32 pos) +{ + Pos = core::s32_clamp ( pos, Min, Max ); + + if (Horizontal) + { + f32 f = (RelativeRect.getWidth() - ((f32)RelativeRect.getHeight()*3.0f)) / range(); + DrawPos = (s32)( ( ( Pos - Min ) * f) + ((f32)RelativeRect.getHeight() * 0.5f)); + DrawHeight = RelativeRect.getHeight(); + } + else + { + f32 f = (RelativeRect.getHeight() - ((f32)RelativeRect.getWidth()*3.0f)) / range(); + + DrawPos = (s32)( ( ( Pos - Min ) * f) + ((f32)RelativeRect.getWidth() * 0.5f)); + DrawHeight = RelativeRect.getWidth(); + } + +} + + +//! gets the small step value +s32 CGUIScrollBar::getSmallStep() const +{ + return SmallStep; +} + + +//! sets the small step value +void CGUIScrollBar::setSmallStep(s32 step) +{ + if (step > 0) + SmallStep = step; + else + SmallStep = 10; +} + + +//! gets the small step value +s32 CGUIScrollBar::getLargeStep() const +{ + return LargeStep; +} + + +//! sets the small step value +void CGUIScrollBar::setLargeStep(s32 step) +{ + if (step > 0) + LargeStep = step; + else + LargeStep = 50; +} + + +//! gets the maximum value of the scrollbar. +s32 CGUIScrollBar::getMax() const +{ + return Max; +} + + +//! sets the maximum value of the scrollbar. +void CGUIScrollBar::setMax(s32 max) +{ + Max = max; + if ( Min > Max ) + Min = Max; + + bool enable = core::isnotzero ( range() ); + UpButton->setEnabled(enable); + DownButton->setEnabled(enable); + setPos(Pos); +} + +//! gets the minimum value of the scrollbar. +s32 CGUIScrollBar::getMin() const +{ + return Min; +} + + +//! sets the minimum value of the scrollbar. +void CGUIScrollBar::setMin(s32 min) +{ + Min = min; + if ( Max < Min ) + Max = Min; + + + bool enable = core::isnotzero ( range() ); + UpButton->setEnabled(enable); + DownButton->setEnabled(enable); + setPos(Pos); +} + + +//! gets the current position of the scrollbar +s32 CGUIScrollBar::getPos() const +{ + return Pos; +} + + +//! refreshes the position and text on child buttons +void CGUIScrollBar::refreshControls() +{ + CurrentIconColor = video::SColor(255,255,255,255); + + IGUISkin* skin = Environment->getSkin(); + IGUISpriteBank* sprites = 0; + + if (skin) + { + sprites = skin->getSpriteBank(); + CurrentIconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + } + + if (Horizontal) + { + s32 h = RelativeRect.getHeight(); + if (!UpButton) + { + UpButton = new CGUIButton(Environment, this, -1, core::rect<s32>(0,0, h, h), NoClip); + UpButton->setSubElement(true); + UpButton->setTabStop(false); + } + if (sprites) + { + UpButton->setSpriteBank(sprites); + UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_LEFT), CurrentIconColor); + UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_LEFT), CurrentIconColor); + } + UpButton->setRelativePosition(core::rect<s32>(0,0, h, h)); + UpButton->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + if (!DownButton) + { + DownButton = new CGUIButton(Environment, this, -1, core::rect<s32>(RelativeRect.getWidth()-h, 0, RelativeRect.getWidth(), h), NoClip); + DownButton->setSubElement(true); + DownButton->setTabStop(false); + } + if (sprites) + { + DownButton->setSpriteBank(sprites); + DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_RIGHT), CurrentIconColor); + DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_RIGHT), CurrentIconColor); + } + DownButton->setRelativePosition(core::rect<s32>(RelativeRect.getWidth()-h, 0, RelativeRect.getWidth(), h)); + DownButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + } + else + { + s32 w = RelativeRect.getWidth(); + if (!UpButton) + { + UpButton = new CGUIButton(Environment, this, -1, core::rect<s32>(0,0, w, w), NoClip); + UpButton->setSubElement(true); + UpButton->setTabStop(false); + } + if (sprites) + { + UpButton->setSpriteBank(sprites); + UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_UP), CurrentIconColor); + UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_UP), CurrentIconColor); + } + UpButton->setRelativePosition(core::rect<s32>(0,0, w, w)); + UpButton->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + if (!DownButton) + { + DownButton = new CGUIButton(Environment, this, -1, core::rect<s32>(0,RelativeRect.getHeight()-w, w, RelativeRect.getHeight()), NoClip); + DownButton->setSubElement(true); + DownButton->setTabStop(false); + } + if (sprites) + { + DownButton->setSpriteBank(sprites); + DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), CurrentIconColor); + DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), CurrentIconColor); + } + DownButton->setRelativePosition(core::rect<s32>(0,RelativeRect.getHeight()-w, w, RelativeRect.getHeight())); + DownButton->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); + } +} + + +//! Writes attributes of the element. +void CGUIScrollBar::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIScrollBar::serializeAttributes(out,options); + + out->addBool("Horizontal", Horizontal); + out->addInt ("Value", Pos); + out->addInt ("Min", Min); + out->addInt ("Max", Max); + out->addInt ("SmallStep", SmallStep); + out->addInt ("LargeStep", LargeStep); + // CurrentIconColor - not serialized as continuiously updated +} + + +//! Reads attributes of the element +void CGUIScrollBar::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIScrollBar::deserializeAttributes(in,options); + + Horizontal = in->getAttributeAsBool("Horizontal"); + setMin(in->getAttributeAsInt("Min")); + setMax(in->getAttributeAsInt("Max")); + setPos(in->getAttributeAsInt("Value")); + setSmallStep(in->getAttributeAsInt("SmallStep")); + setLargeStep(in->getAttributeAsInt("LargeStep")); + // CurrentIconColor - not serialized as continuiously updated + + refreshControls(); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.d new file mode 100644 index 0000000..44cf041 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.d @@ -0,0 +1,2 @@ +CGUIScrollBar.o: CGUIScrollBar.cpp CGUIScrollBar.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.h new file mode 100644 index 0000000..0768f37 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIScrollBar.h @@ -0,0 +1,113 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_SCROLL_BAR_H_INCLUDED__ +#define __C_GUI_SCROLL_BAR_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIScrollBar.h" +#include "IGUIButton.h" + +namespace irr +{ +namespace gui +{ + + class CGUIScrollBar : public IGUIScrollBar + { + public: + + //! constructor + CGUIScrollBar(bool horizontal, IGUIEnvironment* environment, + IGUIElement* parent, s32 id, core::rect<s32> rectangle, + bool noclip=false); + + //! destructor + virtual ~CGUIScrollBar(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + virtual void OnPostRender(u32 timeMs); + + + //! gets the maximum value of the scrollbar. + virtual s32 getMax() const; + + //! sets the maximum value of the scrollbar. + virtual void setMax(s32 max); + + //! gets the minimum value of the scrollbar. + virtual s32 getMin() const; + + //! sets the minimum value of the scrollbar. + virtual void setMin(s32 min); + + //! gets the small step value + virtual s32 getSmallStep() const; + + //! sets the small step value + virtual void setSmallStep(s32 step); + + //! gets the large step value + virtual s32 getLargeStep() const; + + //! sets the large step value + virtual void setLargeStep(s32 step); + + //! gets the current position of the scrollbar + virtual s32 getPos() const; + + //! sets the position of the scrollbar + virtual void setPos(s32 pos); + + //! updates the rectangle + virtual void updateAbsolutePosition(); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + void refreshControls(); + s32 getPosFromMousePos(const core::position2di &p) const; + + IGUIButton* UpButton; + IGUIButton* DownButton; + + core::rect<s32> SliderRect; + + bool Dragging; + bool Horizontal; + bool DraggedBySlider; + bool TrayClick; + s32 Pos; + s32 DrawPos; + s32 DrawHeight; + s32 Min; + s32 Max; + s32 SmallStep; + s32 LargeStep; + s32 DesiredPos; + u32 LastChange; + video::SColor CurrentIconColor; + + f32 range () const { return (f32) ( Max - Min ); } + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.cpp new file mode 100644 index 0000000..b0b2b39 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.cpp @@ -0,0 +1,1019 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUISkin.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIFont.h" +#include "IGUISpriteBank.h" +#include "IGUIElement.h" +#include "IVideoDriver.h" +#include "IAttributes.h" + +namespace irr +{ +namespace gui +{ + +CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver) +: SpriteBank(0), Driver(driver), Type(type) +{ + #ifdef _DEBUG + setDebugName("CGUISkin"); + #endif + + if ((Type == EGST_WINDOWS_CLASSIC) || (Type == EGST_WINDOWS_METALLIC)) + { + Colors[EGDC_3D_DARK_SHADOW] = video::SColor(101,50,50,50); + Colors[EGDC_3D_SHADOW] = video::SColor(101,130,130,130); + Colors[EGDC_3D_FACE] = video::SColor(101,210,210,210); + Colors[EGDC_3D_HIGH_LIGHT] = video::SColor(101,255,255,255); + Colors[EGDC_3D_LIGHT] = video::SColor(101,210,210,210); + Colors[EGDC_ACTIVE_BORDER] = video::SColor(101,16,14,115); + Colors[EGDC_ACTIVE_CAPTION] = video::SColor(255,255,255,255); + Colors[EGDC_APP_WORKSPACE] = video::SColor(101,100,100,100); + Colors[EGDC_BUTTON_TEXT] = video::SColor(240,10,10,10); + Colors[EGDC_GRAY_TEXT] = video::SColor(240,130,130,130); + Colors[EGDC_HIGH_LIGHT] = video::SColor(101,8,36,107); + Colors[EGDC_HIGH_LIGHT_TEXT] = video::SColor(240,255,255,255); + Colors[EGDC_INACTIVE_BORDER] = video::SColor(101,165,165,165); + Colors[EGDC_INACTIVE_CAPTION] = video::SColor(255,30,30,30); + Colors[EGDC_TOOLTIP] = video::SColor(200,0,0,0); + Colors[EGDC_TOOLTIP_BACKGROUND] = video::SColor(200,255,255,225); + Colors[EGDC_SCROLLBAR] = video::SColor(101,230,230,230); + Colors[EGDC_WINDOW] = video::SColor(101,255,255,255); + Colors[EGDC_WINDOW_SYMBOL] = video::SColor(200,10,10,10); + Colors[EGDC_ICON] = video::SColor(200,255,255,255); + Colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,8,36,107); + Colors[EGDC_GRAY_WINDOW_SYMBOL] = video::SColor(240,100,100,100); + Colors[EGDC_EDITABLE] = video::SColor(255,255,255,255); + Colors[EGDC_GRAY_EDITABLE] = video::SColor(255,120,120,120); + Colors[EGDC_FOCUSED_EDITABLE] = video::SColor(255,240,240,255); + + + Sizes[EGDS_SCROLLBAR_SIZE] = 14; + Sizes[EGDS_MENU_HEIGHT] = 30; + Sizes[EGDS_WINDOW_BUTTON_WIDTH] = 15; + Sizes[EGDS_CHECK_BOX_WIDTH] = 18; + Sizes[EGDS_MESSAGE_BOX_WIDTH] = 500; + Sizes[EGDS_MESSAGE_BOX_HEIGHT] = 200; + Sizes[EGDS_BUTTON_WIDTH] = 80; + Sizes[EGDS_BUTTON_HEIGHT] = 30; + + Sizes[EGDS_TEXT_DISTANCE_X] = 2; + Sizes[EGDS_TEXT_DISTANCE_Y] = 0; + + Sizes[EGDS_TITLEBARTEXT_DISTANCE_X] = 2; + Sizes[EGDS_TITLEBARTEXT_DISTANCE_Y] = 0; + } + else + { + //0x80a6a8af + Colors[EGDC_3D_DARK_SHADOW] = 0x60767982; + //Colors[EGDC_3D_FACE] = 0xc0c9ccd4; // tab background + Colors[EGDC_3D_FACE] = 0xc0cbd2d9; // tab background + Colors[EGDC_3D_SHADOW] = 0x50e4e8f1; // tab background, and left-top highlight + Colors[EGDC_3D_HIGH_LIGHT] = 0x40c7ccdc; + Colors[EGDC_3D_LIGHT] = 0x802e313a; + Colors[EGDC_ACTIVE_BORDER] = 0x80404040; // window title + Colors[EGDC_ACTIVE_CAPTION] = 0xffd0d0d0; + Colors[EGDC_APP_WORKSPACE] = 0xc0646464; // unused + Colors[EGDC_BUTTON_TEXT] = 0xd0161616; + Colors[EGDC_GRAY_TEXT] = 0x3c141414; + Colors[EGDC_HIGH_LIGHT] = 0x6c606060; + Colors[EGDC_HIGH_LIGHT_TEXT] = 0xd0e0e0e0; + Colors[EGDC_INACTIVE_BORDER] = 0xf0a5a5a5; + Colors[EGDC_INACTIVE_CAPTION] = 0xffd2d2d2; + Colors[EGDC_TOOLTIP] = 0xf00f2033; + Colors[EGDC_TOOLTIP_BACKGROUND] = 0xc0cbd2d9; + Colors[EGDC_SCROLLBAR] = 0xf0e0e0e0; + Colors[EGDC_WINDOW] = 0xf0f0f0f0; + Colors[EGDC_WINDOW_SYMBOL] = 0xd0161616; + Colors[EGDC_ICON] = 0xd0161616; + Colors[EGDC_ICON_HIGH_LIGHT] = 0xd0606060; + Colors[EGDC_GRAY_WINDOW_SYMBOL] = 0x3c101010; + Colors[EGDC_EDITABLE] = 0xf0ffffff; + Colors[EGDC_GRAY_EDITABLE] = 0xf0cccccc; + Colors[EGDC_FOCUSED_EDITABLE] = 0xf0fffff0; + + Sizes[EGDS_SCROLLBAR_SIZE] = 14; + Sizes[EGDS_MENU_HEIGHT] = 48; + Sizes[EGDS_WINDOW_BUTTON_WIDTH] = 15; + Sizes[EGDS_CHECK_BOX_WIDTH] = 18; + Sizes[EGDS_MESSAGE_BOX_WIDTH] = 500; + Sizes[EGDS_MESSAGE_BOX_HEIGHT] = 200; + Sizes[EGDS_BUTTON_WIDTH] = 80; + Sizes[EGDS_BUTTON_HEIGHT] = 30; + + Sizes[EGDS_TEXT_DISTANCE_X] = 3; + Sizes[EGDS_TEXT_DISTANCE_Y] = 2; + + Sizes[EGDS_TITLEBARTEXT_DISTANCE_X] = 3; + Sizes[EGDS_TITLEBARTEXT_DISTANCE_Y] = 2; + } + + Sizes[EGDS_MESSAGE_BOX_GAP_SPACE] = 15; + Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH] = 0; + Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH] = 500; + Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT] = 0; + Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT] = 99999; + + Sizes[EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X] = 1; + Sizes[EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y] = 1; + Sizes[EGDS_BUTTON_PRESSED_TEXT_OFFSET_X] = 0; + Sizes[EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y] = 2; + + Texts[EGDT_MSG_BOX_OK] = L"OK"; + Texts[EGDT_MSG_BOX_CANCEL] = L"Cancel"; + Texts[EGDT_MSG_BOX_YES] = L"Yes"; + Texts[EGDT_MSG_BOX_NO] = L"No"; + Texts[EGDT_WINDOW_CLOSE] = L"Close"; + Texts[EGDT_WINDOW_RESTORE] = L"Restore"; + Texts[EGDT_WINDOW_MINIMIZE] = L"Minimize"; + Texts[EGDT_WINDOW_MAXIMIZE] = L"Maximize"; + + Icons[EGDI_WINDOW_MAXIMIZE] = 225; + Icons[EGDI_WINDOW_RESTORE] = 226; + Icons[EGDI_WINDOW_CLOSE] = 227; + Icons[EGDI_WINDOW_MINIMIZE] = 228; + Icons[EGDI_CURSOR_UP] = 229; + Icons[EGDI_CURSOR_DOWN] = 230; + Icons[EGDI_CURSOR_LEFT] = 231; + Icons[EGDI_CURSOR_RIGHT] = 232; + Icons[EGDI_MENU_MORE] = 232; + Icons[EGDI_CHECK_BOX_CHECKED] = 233; + Icons[EGDI_DROP_DOWN] = 234; + Icons[EGDI_SMALL_CURSOR_UP] = 235; + Icons[EGDI_SMALL_CURSOR_DOWN] = 236; + Icons[EGDI_RADIO_BUTTON_CHECKED] = 237; + Icons[EGDI_MORE_LEFT] = 238; + Icons[EGDI_MORE_RIGHT] = 239; + Icons[EGDI_MORE_UP] = 240; + Icons[EGDI_MORE_DOWN] = 241; + Icons[EGDI_WINDOW_RESIZE] = 242; + Icons[EGDI_EXPAND] = 243; + Icons[EGDI_COLLAPSE] = 244; + + Icons[EGDI_FILE] = 245; + Icons[EGDI_DIRECTORY] = 246; + + for (u32 i=0; i<EGDF_COUNT; ++i) + Fonts[i] = 0; + + UseGradient = (Type == EGST_WINDOWS_METALLIC) || (Type == EGST_BURNING_SKIN) ; +} + + +//! destructor +CGUISkin::~CGUISkin() +{ + for (u32 i=0; i<EGDF_COUNT; ++i) + { + if (Fonts[i]) + Fonts[i]->drop(); + } + + if (SpriteBank) + SpriteBank->drop(); +} + + +//! returns default color +video::SColor CGUISkin::getColor(EGUI_DEFAULT_COLOR color) const +{ + if ((u32)color < EGDC_COUNT) + return Colors[color]; + else + return video::SColor(); +} + + +//! sets a default color +void CGUISkin::setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) +{ + if ((u32)which < EGDC_COUNT) + Colors[which] = newColor; +} + + +//! returns size for the given size type +s32 CGUISkin::getSize(EGUI_DEFAULT_SIZE size) const +{ + if ((u32)size < EGDS_COUNT) + return Sizes[size]; + else + return 0; +} + + +//! sets a default size +void CGUISkin::setSize(EGUI_DEFAULT_SIZE which, s32 size) +{ + if ((u32)which < EGDS_COUNT) + Sizes[which] = size; +} + + +//! returns the default font +IGUIFont* CGUISkin::getFont(EGUI_DEFAULT_FONT which) const +{ + if (((u32)which < EGDF_COUNT) && Fonts[which]) + return Fonts[which]; + else + return Fonts[EGDF_DEFAULT]; +} + + +//! sets a default font +void CGUISkin::setFont(IGUIFont* font, EGUI_DEFAULT_FONT which) +{ + if ((u32)which >= EGDF_COUNT) + return; + + if (font) + { + font->grab(); + if (Fonts[which]) + Fonts[which]->drop(); + + Fonts[which] = font; + } +} + + +//! gets the sprite bank stored +IGUISpriteBank* CGUISkin::getSpriteBank() const +{ + return SpriteBank; +} + + +//! set a new sprite bank or remove one by passing 0 +void CGUISkin::setSpriteBank(IGUISpriteBank* bank) +{ + if (bank) + bank->grab(); + + if (SpriteBank) + SpriteBank->drop(); + + SpriteBank = bank; +} + + +//! Returns a default icon +u32 CGUISkin::getIcon(EGUI_DEFAULT_ICON icon) const +{ + if ((u32)icon < EGDI_COUNT) + return Icons[icon]; + else + return 0; +} + + +//! Sets a default icon +void CGUISkin::setIcon(EGUI_DEFAULT_ICON icon, u32 index) +{ + if ((u32)icon < EGDI_COUNT) + Icons[icon] = index; +} + + +//! Returns a default text. For example for Message box button captions: +//! "OK", "Cancel", "Yes", "No" and so on. +const wchar_t* CGUISkin::getDefaultText(EGUI_DEFAULT_TEXT text) const +{ + if ((u32)text < EGDT_COUNT) + return Texts[text].c_str(); + else + return Texts[0].c_str(); +} + + +//! Sets a default text. For example for Message box button captions: +//! "OK", "Cancel", "Yes", "No" and so on. +void CGUISkin::setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) +{ + if ((u32)which < EGDT_COUNT) + Texts[which] = newText; +} + + +//! draws a standard 3d button pane +/** Used for drawing for example buttons in normal state. +It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and +EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. +\param rect: Defining area where to draw. +\param clip: Clip area. +\param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. */ +void CGUISkin::draw3DButtonPaneStandard(IGUIElement* element, + const core::rect<s32>& r, + const core::rect<s32>* clip) +{ + if (!Driver) + return; + + core::rect<s32> rect = r; + + if ( Type == EGST_BURNING_SKIN ) + { + rect.UpperLeftCorner.X -= 1; + rect.UpperLeftCorner.Y -= 1; + rect.LowerRightCorner.X += 1; + rect.LowerRightCorner.Y += 1; + draw3DSunkenPane(element, + getColor( EGDC_WINDOW ).getInterpolated( 0xFFFFFFFF, 0.9f ) + ,false, true, rect, clip); + return; + } + + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + + rect.LowerRightCorner.X -= 1; + rect.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + + rect.UpperLeftCorner.X += 1; + rect.UpperLeftCorner.Y += 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + + rect.LowerRightCorner.X -= 1; + rect.LowerRightCorner.Y -= 1; + + if (!UseGradient) + { + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); + } + else + { + const video::SColor c1 = getColor(EGDC_3D_FACE); + const video::SColor c2 = c1.getInterpolated(getColor(EGDC_3D_DARK_SHADOW), 0.4f); + Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip); + } +} + + +//! draws a pressed 3d button pane +/** Used for drawing for example buttons in pressed state. +It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and +EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. +\param rect: Defining area where to draw. +\param clip: Clip area. +\param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. */ +void CGUISkin::draw3DButtonPanePressed(IGUIElement* element, + const core::rect<s32>& r, + const core::rect<s32>* clip) +{ + if (!Driver) + return; + + core::rect<s32> rect = r; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + + rect.LowerRightCorner.X -= 1; + rect.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + + rect.UpperLeftCorner.X += 1; + rect.UpperLeftCorner.Y += 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + + rect.UpperLeftCorner.X += 1; + rect.UpperLeftCorner.Y += 1; + + if (!UseGradient) + { + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); + } + else + { + const video::SColor c1 = getColor(EGDC_3D_FACE); + const video::SColor c2 = c1.getInterpolated(getColor(EGDC_3D_DARK_SHADOW), 0.4f); + Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip); + } +} + + +//! draws a sunken 3d pane +/** Used for drawing the background of edit, combo or check boxes. +\param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. +\param bgcolor: Background color. +\param flat: Specifies if the sunken pane should be flat or displayed as sunken +deep into the ground. +\param rect: Defining area where to draw. +\param clip: Clip area. */ +void CGUISkin::draw3DSunkenPane(IGUIElement* element, video::SColor bgcolor, + bool flat, bool fillBackGround, + const core::rect<s32>& r, + const core::rect<s32>* clip) +{ + if (!Driver) + return; + + core::rect<s32> rect = r; + + if (fillBackGround) + Driver->draw2DRectangle(bgcolor, rect, clip); + + if (flat) + { + // draw flat sunken pane + + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); // top + + ++rect.UpperLeftCorner.Y; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); // left + + rect = r; + ++rect.UpperLeftCorner.Y; + rect.UpperLeftCorner.X = rect.LowerRightCorner.X - 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); // right + + rect = r; + ++rect.UpperLeftCorner.X; + rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1; + --rect.LowerRightCorner.X; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); // bottom + } + else + { + // draw deep sunken pane + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); // top + ++rect.UpperLeftCorner.X; + ++rect.UpperLeftCorner.Y; + --rect.LowerRightCorner.X; + ++rect.LowerRightCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + + rect.UpperLeftCorner.X = r.UpperLeftCorner.X; + rect.UpperLeftCorner.Y = r.UpperLeftCorner.Y+1; + rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); // left + ++rect.UpperLeftCorner.X; + ++rect.UpperLeftCorner.Y; + ++rect.LowerRightCorner.X; + --rect.LowerRightCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + + rect = r; + rect.UpperLeftCorner.X = rect.LowerRightCorner.X - 1; + ++rect.UpperLeftCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); // right + --rect.UpperLeftCorner.X; + ++rect.UpperLeftCorner.Y; + --rect.LowerRightCorner.X; + --rect.LowerRightCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_LIGHT), rect, clip); + + rect = r; + ++rect.UpperLeftCorner.X; + rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1; + --rect.LowerRightCorner.X; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); // bottom + ++rect.UpperLeftCorner.X; + --rect.UpperLeftCorner.Y; + --rect.LowerRightCorner.X; + --rect.LowerRightCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_LIGHT), rect, clip); + } +} + + +//! draws a window background +// return where to draw title bar text. +core::rect<s32> CGUISkin::draw3DWindowBackground(IGUIElement* element, + bool drawTitleBar, video::SColor titleBarColor, + const core::rect<s32>& r, + const core::rect<s32>* clip, + core::rect<s32>* checkClientArea) +{ + if (!Driver) + { + if ( checkClientArea ) + { + *checkClientArea = r; + } + return r; + } + + core::rect<s32> rect = r; + + // top border + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1; + if ( !checkClientArea ) + { + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + } + + // left border + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1; + if ( !checkClientArea ) + { + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + } + + // right border dark outer line + rect.UpperLeftCorner.X = r.LowerRightCorner.X - 1; + rect.LowerRightCorner.X = r.LowerRightCorner.X; + rect.UpperLeftCorner.Y = r.UpperLeftCorner.Y; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + if ( !checkClientArea ) + { + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + } + + // right border bright innner line + rect.UpperLeftCorner.X -= 1; + rect.LowerRightCorner.X -= 1; + rect.UpperLeftCorner.Y += 1; + rect.LowerRightCorner.Y -= 1; + if ( !checkClientArea ) + { + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + } + + // bottom border dark outer line + rect.UpperLeftCorner.X = r.UpperLeftCorner.X; + rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + rect.LowerRightCorner.X = r.LowerRightCorner.X; + if ( !checkClientArea ) + { + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + } + + // bottom border bright inner line + rect.UpperLeftCorner.X += 1; + rect.LowerRightCorner.X -= 1; + rect.UpperLeftCorner.Y -= 1; + rect.LowerRightCorner.Y -= 1; + if ( !checkClientArea ) + { + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + } + + // client area for background + rect = r; + rect.UpperLeftCorner.X +=1; + rect.UpperLeftCorner.Y +=1; + rect.LowerRightCorner.X -= 2; + rect.LowerRightCorner.Y -= 2; + if (checkClientArea) + { + *checkClientArea = rect; + } + + if ( !checkClientArea ) + { + if (!UseGradient) + { + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); + } + else if ( Type == EGST_BURNING_SKIN ) + { + const video::SColor c1 = getColor(EGDC_WINDOW).getInterpolated ( 0xFFFFFFFF, 0.9f ); + const video::SColor c2 = getColor(EGDC_WINDOW).getInterpolated ( 0xFFFFFFFF, 0.8f ); + + Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip); + } + else + { + const video::SColor c2 = getColor(EGDC_3D_SHADOW); + const video::SColor c1 = getColor(EGDC_3D_FACE); + Driver->draw2DRectangle(rect, c1, c1, c1, c2, clip); + } + } + + // title bar + rect = r; + rect.UpperLeftCorner.X += 2; + rect.UpperLeftCorner.Y += 2; + rect.LowerRightCorner.X -= 2; + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + getSize(EGDS_WINDOW_BUTTON_WIDTH) + 2; + + if (drawTitleBar ) + { + if (checkClientArea) + { + (*checkClientArea).UpperLeftCorner.Y = rect.LowerRightCorner.Y; + } + else + { + // draw title bar + //if (!UseGradient) + // Driver->draw2DRectangle(titleBarColor, rect, clip); + //else + if ( Type == EGST_BURNING_SKIN ) + { + const video::SColor c = titleBarColor.getInterpolated( video::SColor(titleBarColor.getAlpha(),255,255,255), 0.8f); + Driver->draw2DRectangle(rect, titleBarColor, titleBarColor, c, c, clip); + } + else + { + const video::SColor c = titleBarColor.getInterpolated(video::SColor(titleBarColor.getAlpha(),0,0,0), 0.2f); + Driver->draw2DRectangle(rect, titleBarColor, c, titleBarColor, c, clip); + } + } + } + + return rect; +} + + +//! draws a standard 3d menu pane +/** Used for drawing for menus and context menus. +It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and +EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. +\param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. +\param rect: Defining area where to draw. +\param clip: Clip area. */ +void CGUISkin::draw3DMenuPane(IGUIElement* element, + const core::rect<s32>& r, const core::rect<s32>* clip) +{ + if (!Driver) + return; + + core::rect<s32> rect = r; + + if ( Type == EGST_BURNING_SKIN ) + { + rect.UpperLeftCorner.Y -= 3; + draw3DButtonPaneStandard(element, rect, clip); + return; + } + + // in this skin, this is exactly what non pressed buttons look like, + // so we could simply call + // draw3DButtonPaneStandard(element, rect, clip); + // here. + // but if the skin is transparent, this doesn't look that nice. So + // We draw it a little bit better, with some more draw2DRectangle calls, + // but there aren't that much menus visible anyway. + + rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), rect, clip); + + rect.UpperLeftCorner.X = r.LowerRightCorner.X - 1; + rect.LowerRightCorner.X = r.LowerRightCorner.X; + rect.UpperLeftCorner.Y = r.UpperLeftCorner.Y; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + + rect.UpperLeftCorner.X -= 1; + rect.LowerRightCorner.X -= 1; + rect.UpperLeftCorner.Y += 1; + rect.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + + rect.UpperLeftCorner.X = r.UpperLeftCorner.X; + rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + rect.LowerRightCorner.X = r.LowerRightCorner.X; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), rect, clip); + + rect.UpperLeftCorner.X += 1; + rect.LowerRightCorner.X -= 1; + rect.UpperLeftCorner.Y -= 1; + rect.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + + rect = r; + rect.UpperLeftCorner.X +=1; + rect.UpperLeftCorner.Y +=1; + rect.LowerRightCorner.X -= 2; + rect.LowerRightCorner.Y -= 2; + + if (!UseGradient) + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); + else + { + const video::SColor c1 = getColor(EGDC_3D_FACE); + const video::SColor c2 = getColor(EGDC_3D_SHADOW); + Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip); + } +} + + +//! draws a standard 3d tool bar +/** Used for drawing for toolbars and menus. +\param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. +\param rect: Defining area where to draw. +\param clip: Clip area. */ +void CGUISkin::draw3DToolBar(IGUIElement* element, + const core::rect<s32>& r, + const core::rect<s32>* clip) +{ + if (!Driver) + return; + + core::rect<s32> rect = r; + + rect.UpperLeftCorner.X = r.UpperLeftCorner.X; + rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1; + rect.LowerRightCorner.Y = r.LowerRightCorner.Y; + rect.LowerRightCorner.X = r.LowerRightCorner.X; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), rect, clip); + + rect = r; + rect.LowerRightCorner.Y -= 1; + + if (!UseGradient) + { + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); + } + else + if ( Type == EGST_BURNING_SKIN ) + { + const video::SColor c1 = 0xF0000000 | getColor(EGDC_3D_FACE).color; + const video::SColor c2 = 0xF0000000 | getColor(EGDC_3D_SHADOW).color; + + rect.LowerRightCorner.Y += 1; + Driver->draw2DRectangle(rect, c1, c2, c1, c2, clip); + } + else + { + const video::SColor c1 = getColor(EGDC_3D_FACE); + const video::SColor c2 = getColor(EGDC_3D_SHADOW); + Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip); + } +} + + +//! draws a tab button +/** Used for drawing for tab buttons on top of tabs. +\param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. +\param active: Specifies if the tab is currently active. +\param rect: Defining area where to draw. +\param clip: Clip area. */ +void CGUISkin::draw3DTabButton(IGUIElement* element, bool active, + const core::rect<s32>& frameRect, const core::rect<s32>* clip, EGUI_ALIGNMENT alignment) +{ + if (!Driver) + return; + + core::rect<s32> tr = frameRect; + + if ( alignment == EGUIA_UPPERLEFT ) + { + tr.LowerRightCorner.X -= 2; + tr.LowerRightCorner.Y = tr.UpperLeftCorner.Y + 1; + tr.UpperLeftCorner.X += 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + + // draw left highlight + tr = frameRect; + tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1; + tr.UpperLeftCorner.Y += 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + + // draw grey background + tr = frameRect; + tr.UpperLeftCorner.X += 1; + tr.UpperLeftCorner.Y += 1; + tr.LowerRightCorner.X -= 2; + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), tr, clip); + + // draw right middle gray shadow + tr.LowerRightCorner.X += 1; + tr.UpperLeftCorner.X = tr.LowerRightCorner.X - 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), tr, clip); + + tr.LowerRightCorner.X += 1; + tr.UpperLeftCorner.X += 1; + tr.UpperLeftCorner.Y += 1; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), tr, clip); + } + else + { + tr.LowerRightCorner.X -= 2; + tr.UpperLeftCorner.Y = tr.LowerRightCorner.Y - 1; + tr.UpperLeftCorner.X += 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + + // draw left highlight + tr = frameRect; + tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1; + tr.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + + // draw grey background + tr = frameRect; + tr.UpperLeftCorner.X += 1; + tr.UpperLeftCorner.Y -= 1; + tr.LowerRightCorner.X -= 2; + tr.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), tr, clip); + + // draw right middle gray shadow + tr.LowerRightCorner.X += 1; + tr.UpperLeftCorner.X = tr.LowerRightCorner.X - 1; + //tr.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), tr, clip); + + tr.LowerRightCorner.X += 1; + tr.UpperLeftCorner.X += 1; + tr.LowerRightCorner.Y -= 1; + Driver->draw2DRectangle(getColor(EGDC_3D_DARK_SHADOW), tr, clip); + } +} + + +//! draws a tab control body +/** \param element: Pointer to the element which wishes to draw this. This parameter +is usually not used by ISkin, but can be used for example by more complex +implementations to find out how to draw the part exactly. +\param border: Specifies if the border should be drawn. +\param background: Specifies if the background should be drawn. +\param rect: Defining area where to draw. +\param clip: Clip area. */ +void CGUISkin::draw3DTabBody(IGUIElement* element, bool border, bool background, + const core::rect<s32>& rect, const core::rect<s32>* clip, s32 tabHeight, EGUI_ALIGNMENT alignment) +{ + if (!Driver) + return; + + core::rect<s32> tr = rect; + + if ( tabHeight == -1 ) + tabHeight = getSize(gui::EGDS_BUTTON_HEIGHT); + + // draw border. + if (border) + { + if ( alignment == EGUIA_UPPERLEFT ) + { + // draw left hightlight + tr.UpperLeftCorner.Y += tabHeight + 2; + tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + + // draw right shadow + tr.UpperLeftCorner.X = rect.LowerRightCorner.X - 1; + tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), tr, clip); + + // draw lower shadow + tr = rect; + tr.UpperLeftCorner.Y = tr.LowerRightCorner.Y - 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), tr, clip); + } + else + { + // draw left hightlight + tr.LowerRightCorner.Y -= tabHeight + 2; + tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + + // draw right shadow + tr.UpperLeftCorner.X = rect.LowerRightCorner.X - 1; + tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_SHADOW), tr, clip); + + // draw lower shadow + tr = rect; + tr.LowerRightCorner.Y = tr.UpperLeftCorner.Y + 1; + Driver->draw2DRectangle(getColor(EGDC_3D_HIGH_LIGHT), tr, clip); + } + } + + if (background) + { + if ( alignment == EGUIA_UPPERLEFT ) + { + tr = rect; + tr.UpperLeftCorner.Y += tabHeight + 2; + tr.LowerRightCorner.X -= 1; + tr.UpperLeftCorner.X += 1; + tr.LowerRightCorner.Y -= 1; + } + else + { + tr = rect; + tr.UpperLeftCorner.X += 1; + tr.UpperLeftCorner.Y -= 1; + tr.LowerRightCorner.X -= 1; + tr.LowerRightCorner.Y -= tabHeight + 2; + //tr.UpperLeftCorner.X += 1; + } + + if (!UseGradient) + Driver->draw2DRectangle(getColor(EGDC_3D_FACE), tr, clip); + else + { + video::SColor c1 = getColor(EGDC_3D_FACE); + video::SColor c2 = getColor(EGDC_3D_SHADOW); + Driver->draw2DRectangle(tr, c1, c1, c2, c2, clip); + } + } +} + + +//! draws an icon, usually from the skin's sprite bank +/** \param parent: Pointer to the element which wishes to draw this icon. +This parameter is usually not used by IGUISkin, but can be used for example +by more complex implementations to find out how to draw the part exactly. +\param icon: Specifies the icon to be drawn. +\param position: The position to draw the icon +\param starttime: The time at the start of the animation +\param currenttime: The present time, used to calculate the frame number +\param loop: Whether the animation should loop or not +\param clip: Clip area. */ +void CGUISkin::drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, + const core::position2di position, + u32 starttime, u32 currenttime, + bool loop, const core::rect<s32>* clip) +{ + if (!SpriteBank) + return; + + bool gray = element && !element->isEnabled(); + SpriteBank->draw2DSprite(Icons[icon], position, clip, + Colors[gray? EGDC_GRAY_WINDOW_SYMBOL : EGDC_WINDOW_SYMBOL], starttime, currenttime, loop, true); +} + + +EGUI_SKIN_TYPE CGUISkin::getType() const +{ + return Type; +} + + +//! draws a 2d rectangle. +void CGUISkin::draw2DRectangle(IGUIElement* element, + const video::SColor &color, const core::rect<s32>& pos, + const core::rect<s32>* clip) +{ + Driver->draw2DRectangle(color, pos, clip); +} + + +//! Writes attributes of the object. +//! Implement this to expose the attributes of your scene node animator for +//! scripting languages, editors, debuggers or xml serialization purposes. +void CGUISkin::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + u32 i; + for (i=0; i<EGDC_COUNT; ++i) + out->addColor(GUISkinColorNames[i], Colors[i]); + + for (i=0; i<EGDS_COUNT; ++i) + out->addInt(GUISkinSizeNames[i], Sizes[i]); + + for (i=0; i<EGDT_COUNT; ++i) + out->addString(GUISkinTextNames[i], Texts[i].c_str()); + + for (i=0; i<EGDI_COUNT; ++i) + out->addInt(GUISkinIconNames[i], Icons[i]); +} + + +//! Reads attributes of the object. +//! Implement this to set the attributes of your scene node animator for +//! scripting languages, editors, debuggers or xml deserialization purposes. +void CGUISkin::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + // TODO: This is not nice code for downward compatibility, whenever new values are added and users + // load an old skin the corresponding values will be set to 0. + u32 i; + for (i=0; i<EGDC_COUNT; ++i) + Colors[i] = in->getAttributeAsColor(GUISkinColorNames[i]); + + for (i=0; i<EGDS_COUNT; ++i) + Sizes[i] = in->getAttributeAsInt(GUISkinSizeNames[i]); + + for (i=0; i<EGDT_COUNT; ++i) + Texts[i] = in->getAttributeAsStringW(GUISkinTextNames[i]); + + for (i=0; i<EGDI_COUNT; ++i) + Icons[i] = in->getAttributeAsInt(GUISkinIconNames[i]); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.d new file mode 100644 index 0000000..8ea1660 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.d @@ -0,0 +1 @@ +CGUISkin.o: CGUISkin.cpp CGUISkin.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.h new file mode 100644 index 0000000..903d856 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISkin.h @@ -0,0 +1,249 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_SKIN_H_INCLUDED__ +#define __C_GUI_SKIN_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + class IVideoDriver; +} +namespace gui +{ + + class CGUISkin : public IGUISkin + { + public: + + CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver); + + //! destructor + virtual ~CGUISkin(); + + //! returns default color + virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const; + + //! sets a default color + virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor); + + //! returns size for the given size type + virtual s32 getSize(EGUI_DEFAULT_SIZE size) const; + + //! sets a default size + virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size); + + //! returns the default font + virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const; + + //! sets a default font + virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT); + + //! sets the sprite bank used for drawing icons + virtual void setSpriteBank(IGUISpriteBank* bank); + + //! gets the sprite bank used for drawing icons + virtual IGUISpriteBank* getSpriteBank() const; + + //! Returns a default icon + /** Returns the sprite index within the sprite bank */ + virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const; + + //! Sets a default icon + /** Sets the sprite index used for drawing icons like arrows, + close buttons and ticks in checkboxes + \param icon: Enum specifying which icon to change + \param index: The sprite index used to draw this icon */ + virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index); + + //! Returns a default text. + /** For example for Message box button captions: + "OK", "Cancel", "Yes", "No" and so on. */ + virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const; + + //! Sets a default text. + /** For example for Message box button captions: + "OK", "Cancel", "Yes", "No" and so on. */ + virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText); + + //! draws a standard 3d button pane + /** Used for drawing for example buttons in normal state. + It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and + EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. + \param rect: Defining area where to draw. + \param clip: Clip area. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. */ + virtual void draw3DButtonPaneStandard(IGUIElement* element, + const core::rect<s32>& rect, + const core::rect<s32>* clip=0); + + //! draws a pressed 3d button pane + /** Used for drawing for example buttons in pressed state. + It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and + EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. + \param rect: Defining area where to draw. + \param clip: Clip area. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. */ + virtual void draw3DButtonPanePressed(IGUIElement* element, + const core::rect<s32>& rect, + const core::rect<s32>* clip=0); + + //! draws a sunken 3d pane + /** Used for drawing the background of edit, combo or check boxes. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param bgcolor: Background color. + \param flat: Specifies if the sunken pane should be flat or displayed as sunken + deep into the ground. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DSunkenPane(IGUIElement* element, + video::SColor bgcolor, bool flat, + bool fillBackGround, + const core::rect<s32>& rect, + const core::rect<s32>* clip=0); + + //! draws a window background + /** Used for drawing the background of dialogs and windows. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param titleBarColor: Title color. + \param drawTitleBar: True to enable title drawing. + \param rect: Defining area where to draw. + \param clip: Clip area. + \param checkClientArea: When set to non-null the function will not draw anything, + but will instead return the clientArea which can be used for drawing by the calling window. + That is the area without borders and without titlebar. + \return Returns rect where it would be good to draw title bar text. This will + work even when checkClientArea is set to a non-null value.*/ + virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element, + bool drawTitleBar, video::SColor titleBarColor, + const core::rect<s32>& rect, + const core::rect<s32>* clip, + core::rect<s32>* checkClientArea); + + //! draws a standard 3d menu pane + /** Used for drawing for menus and context menus. + It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and + EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DMenuPane(IGUIElement* element, + const core::rect<s32>& rect, + const core::rect<s32>* clip=0); + + //! draws a standard 3d tool bar + /** Used for drawing for toolbars and menus. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DToolBar(IGUIElement* element, + const core::rect<s32>& rect, + const core::rect<s32>* clip=0); + + //! draws a tab button + /** Used for drawing for tab buttons on top of tabs. + \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param active: Specifies if the tab is currently active. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DTabButton(IGUIElement* element, bool active, + const core::rect<s32>& rect, const core::rect<s32>* clip=0, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT); + + //! draws a tab control body + /** \param element: Pointer to the element which wishes to draw this. This parameter + is usually not used by ISkin, but can be used for example by more complex + implementations to find out how to draw the part exactly. + \param border: Specifies if the border should be drawn. + \param background: Specifies if the background should be drawn. + \param rect: Defining area where to draw. + \param clip: Clip area. */ + virtual void draw3DTabBody(IGUIElement* element, bool border, bool background, + const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT); + + //! draws an icon, usually from the skin's sprite bank + /** \param element: Pointer to the element which wishes to draw this icon. + This parameter is usually not used by IGUISkin, but can be used for example + by more complex implementations to find out how to draw the part exactly. + \param icon: Specifies the icon to be drawn. + \param position: The position to draw the icon + \param starttime: The time at the start of the animation + \param currenttime: The present time, used to calculate the frame number + \param loop: Whether the animation should loop or not + \param clip: Clip area. */ + virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, + const core::position2di position, + u32 starttime=0, u32 currenttime=0, + bool loop=false, const core::rect<s32>* clip=0); + + + //! draws a 2d rectangle. + /** \param element: Pointer to the element which wishes to draw this icon. + This parameter is usually not used by IGUISkin, but can be used for example + by more complex implementations to find out how to draw the part exactly. + \param color: Color of the rectangle to draw. The alpha component specifies how + transparent the rectangle will be. + \param pos: Position of the rectangle. + \param clip: Pointer to rectangle against which the rectangle will be clipped. + If the pointer is null, no clipping will be performed. */ + virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color, + const core::rect<s32>& pos, const core::rect<s32>* clip = 0); + + + //! get the type of this skin + virtual EGUI_SKIN_TYPE getType() const; + + //! Writes attributes of the object. + //! Implement this to expose the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml serialization purposes. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the object. + //! Implement this to set the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml deserialization purposes. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + private: + + video::SColor Colors[EGDC_COUNT]; + s32 Sizes[EGDS_COUNT]; + u32 Icons[EGDI_COUNT]; + IGUIFont* Fonts[EGDF_COUNT]; + IGUISpriteBank* SpriteBank; + core::stringw Texts[EGDT_COUNT]; + video::IVideoDriver* Driver; + bool UseGradient; + + EGUI_SKIN_TYPE Type; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.cpp new file mode 100644 index 0000000..b440699 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.cpp @@ -0,0 +1,327 @@ +// Copyright (C) 2006-2012 Michael Zeilfelder +// This file uses the licence of the Irrlicht Engine. + +#include "CGUISpinBox.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "CGUIEditBox.h" +#include "CGUIButton.h" +#include "IGUIEnvironment.h" +#include "IEventReceiver.h" +#include "fast_atof.h" +#include <wchar.h> + + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUISpinBox::CGUISpinBox(const wchar_t* text, bool border,IGUIEnvironment* environment, + IGUIElement* parent, s32 id, const core::rect<s32>& rectangle) +: IGUISpinBox(environment, parent, id, rectangle), + EditBox(0), ButtonSpinUp(0), ButtonSpinDown(0), StepSize(1.f), + RangeMin(-FLT_MAX), RangeMax(FLT_MAX), FormatString(L"%f"), + DecimalPlaces(-1) +{ + #ifdef _DEBUG + setDebugName("CGUISpinBox"); + #endif + + CurrentIconColor = video::SColor(255,255,255,255); + s32 ButtonWidth = 16; + + ButtonSpinDown = Environment->addButton( + core::rect<s32>(rectangle.getWidth() - ButtonWidth, rectangle.getHeight()/2 +1, + rectangle.getWidth(), rectangle.getHeight()), this); + ButtonSpinDown->grab(); + ButtonSpinDown->setSubElement(true); + ButtonSpinDown->setTabStop(false); + ButtonSpinDown->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_CENTER, EGUIA_LOWERRIGHT); + + ButtonSpinUp = Environment->addButton( + core::rect<s32>(rectangle.getWidth() - ButtonWidth, 0, + rectangle.getWidth(), rectangle.getHeight()/2), this); + ButtonSpinUp->grab(); + ButtonSpinUp->setSubElement(true); + ButtonSpinUp->setTabStop(false); + ButtonSpinUp->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_CENTER); + + const core::rect<s32> rectEdit(0, 0, rectangle.getWidth() - ButtonWidth - 1, rectangle.getHeight()); + EditBox = Environment->addEditBox(text, rectEdit, border, this, -1); + EditBox->grab(); + EditBox->setSubElement(true); + EditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + refreshSprites(); +} + + +//! destructor +CGUISpinBox::~CGUISpinBox() +{ + if (ButtonSpinUp) + ButtonSpinUp->drop(); + if (ButtonSpinDown) + ButtonSpinDown->drop(); + if (EditBox) + EditBox->drop(); +} + +void CGUISpinBox::refreshSprites() +{ + IGUISpriteBank *sb = 0; + if (Environment && Environment->getSkin()) + { + sb = Environment->getSkin()->getSpriteBank(); + } + + if (sb) + { + IGUISkin * skin = Environment->getSkin(); + CurrentIconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + ButtonSpinDown->setSpriteBank(sb); + ButtonSpinDown->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), CurrentIconColor); + ButtonSpinDown->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), CurrentIconColor); + ButtonSpinUp->setSpriteBank(sb); + ButtonSpinUp->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_UP), CurrentIconColor); + ButtonSpinUp->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_UP), CurrentIconColor); + } + else + { + ButtonSpinDown->setText(L"-"); + ButtonSpinUp->setText(L"+"); + } +} + +IGUIEditBox* CGUISpinBox::getEditBox() const +{ + return EditBox; +} + + +void CGUISpinBox::setValue(f32 val) +{ + wchar_t str[100]; + + swprintf(str, 99, FormatString.c_str(), val); + EditBox->setText(str); + verifyValueRange(); +} + + +f32 CGUISpinBox::getValue() const +{ + const wchar_t* val = EditBox->getText(); + if ( !val ) + return 0.f; + core::stringc tmp(val); + return core::fast_atof(tmp.c_str()); +} + + +void CGUISpinBox::setRange(f32 min, f32 max) +{ + if (max<min) + core::swap(min, max); + RangeMin = min; + RangeMax = max; + + // we have to round the range - otherwise we can get into an infinte setValue/verifyValueRange cycle. + wchar_t str[100]; + swprintf(str, 99, FormatString.c_str(), RangeMin); + RangeMin = core::fast_atof(core::stringc(str).c_str()); + swprintf(str, 99, FormatString.c_str(), RangeMax); + RangeMax = core::fast_atof(core::stringc(str).c_str()); + + verifyValueRange(); +} + + +f32 CGUISpinBox::getMin() const +{ + return RangeMin; +} + + +f32 CGUISpinBox::getMax() const +{ + return RangeMax; +} + + +f32 CGUISpinBox::getStepSize() const +{ + return StepSize; +} + + +void CGUISpinBox::setStepSize(f32 step) +{ + StepSize = step; +} + + +//! Sets the number of decimal places to display. +void CGUISpinBox::setDecimalPlaces(s32 places) +{ + DecimalPlaces = places; + if (places == -1) + FormatString = "%f"; + else + { + FormatString = "%."; + FormatString += places; + FormatString += "f"; + } + setRange( RangeMin, RangeMax ); + setValue(getValue()); +} + + +bool CGUISpinBox::OnEvent(const SEvent& event) +{ + if (IsEnabled) + { + bool changeEvent = false; + switch(event.EventType) + { + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_MOUSE_WHEEL: + { + f32 val = getValue() + (StepSize * (event.MouseInput.Wheel < 0 ? -1.f : 1.f)); + setValue(val); + changeEvent = true; + } + break; + default: + break; + } + break; + + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) + { + if (event.GUIEvent.Caller == ButtonSpinUp) + { + f32 val = getValue(); + val += StepSize; + setValue(val); + changeEvent = true; + } + else if ( event.GUIEvent.Caller == ButtonSpinDown) + { + f32 val = getValue(); + val -= StepSize; + setValue(val); + changeEvent = true; + } + } + if (event.GUIEvent.EventType == EGET_EDITBOX_CHANGED || event.GUIEvent.EventType == EGET_EDITBOX_ENTER) + { + if (event.GUIEvent.Caller == EditBox) + { + verifyValueRange(); + changeEvent = true; + } + } + break; + default: + break; + } + + if ( changeEvent ) + { + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + + e.GUIEvent.EventType = EGET_SPINBOX_CHANGED; + if ( Parent ) + Parent->OnEvent(e); + return true; + } + } + + return IGUIElement::OnEvent(event); +} + + +void CGUISpinBox::draw() +{ + if ( !isVisible() ) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + video::SColor iconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + if ( iconColor != CurrentIconColor ) + { + refreshSprites(); + } + + IGUISpinBox::draw(); +} + +void CGUISpinBox::verifyValueRange() +{ + f32 val = getValue(); + if ( val+core::ROUNDING_ERROR_f32 < RangeMin ) + val = RangeMin; + else if ( val-core::ROUNDING_ERROR_f32 > RangeMax ) + val = RangeMax; + else + return; + + setValue(val); +} + + +//! Sets the new caption of the element +void CGUISpinBox::setText(const wchar_t* text) +{ + EditBox->setText(text); + setValue(getValue()); + verifyValueRange(); +} + + +//! Returns caption of this element. +const wchar_t* CGUISpinBox::getText() const +{ + return EditBox->getText(); +} + + +//! Writes attributes of the element. +void CGUISpinBox::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IGUIElement::serializeAttributes(out, options); + out->addFloat("Min", getMin()); + out->addFloat("Max", getMax()); + out->addFloat("Step", getStepSize()); + out->addInt("DecimalPlaces", DecimalPlaces); +} + + +//! Reads attributes of the element +void CGUISpinBox::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + IGUIElement::deserializeAttributes(in, options); + setRange(in->getAttributeAsFloat("Min"), in->getAttributeAsFloat("Max")); + setStepSize(in->getAttributeAsFloat("Step")); + setDecimalPlaces(in->getAttributeAsInt("DecimalPlaces")); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.d new file mode 100644 index 0000000..1551c2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.d @@ -0,0 +1,2 @@ +CGUISpinBox.o: CGUISpinBox.cpp CGUISpinBox.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.h new file mode 100644 index 0000000..e487c0b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpinBox.h @@ -0,0 +1,108 @@ +// Copyright (C) 2006-2012 Michael Zeilfelder +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_SPIN_BOX_H_INCLUDED__ +#define __C_GUI_SPIN_BOX_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISpinBox.h" + +namespace irr +{ +namespace gui +{ + class IGUIEditBox; + class IGUIButton; + + class CGUISpinBox : public IGUISpinBox + { + public: + + //! constructor + CGUISpinBox(const wchar_t* text, bool border, IGUIEnvironment* environment, + IGUIElement* parent, s32 id, const core::rect<s32>& rectangle); + + //! destructor + virtual ~CGUISpinBox(); + + //! Access the edit box used in the spin control + /** \param enable: If set to true, the override color, which can be set + with IGUIEditBox::setOverrideColor is used, otherwise the + EGDC_BUTTON_TEXT color of the skin. */ + virtual IGUIEditBox* getEditBox() const; + + //! set the current value of the spinbox + /** \param val: value to be set in the spinbox */ + virtual void setValue(f32 val); + + //! Get the current value of the spinbox + virtual f32 getValue() const; + + //! set the range of values which can be used in the spinbox + /** \param min: minimum value + \param max: maximum value */ + virtual void setRange(f32 min, f32 max); + + //! get the minimum value which can be used in the spinbox + virtual f32 getMin() const; + + //! get the maximum value which can be used in the spinbox + virtual f32 getMax() const; + + //! step size by which values are changed when pressing the spin buttons + /** \param step: stepsize used for value changes when pressing spin buttons */ + virtual void setStepSize(f32 step=1.f); + + //! returns the step size + virtual f32 getStepSize() const; + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! Draws the element and its children. + virtual void draw(); + + //! Sets the new caption of the element + virtual void setText(const wchar_t* text); + + //! Returns caption of this element. + virtual const wchar_t* getText() const; + + //! Sets the number of decimal places to display. + //! Note that this also rounds the range to the same number of decimal places. + /** \param places: The number of decimal places to display, use -1 to reset */ + virtual void setDecimalPlaces(s32 places); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + protected: + virtual void verifyValueRange(); + void refreshSprites(); + + IGUIEditBox * EditBox; + IGUIButton * ButtonSpinUp; + IGUIButton * ButtonSpinDown; + video::SColor CurrentIconColor; + f32 StepSize; + f32 RangeMin; + f32 RangeMax; + + core::stringw FormatString; + s32 DecimalPlaces; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_SPIN_BOX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.cpp new file mode 100644 index 0000000..71d8cb4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.cpp @@ -0,0 +1,250 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUISpriteBank.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "ITexture.h" + +namespace irr +{ +namespace gui +{ + +CGUISpriteBank::CGUISpriteBank(IGUIEnvironment* env) : + Environment(env), Driver(0) +{ + #ifdef _DEBUG + setDebugName("CGUISpriteBank"); + #endif + + if (Environment) + { + Driver = Environment->getVideoDriver(); + if (Driver) + Driver->grab(); + } +} + + +CGUISpriteBank::~CGUISpriteBank() +{ + // drop textures + for (u32 i=0; i<Textures.size(); ++i) + if (Textures[i]) + Textures[i]->drop(); + + // drop video driver + if (Driver) + Driver->drop(); +} + + +core::array< core::rect<s32> >& CGUISpriteBank::getPositions() +{ + return Rectangles; +} + + +core::array< SGUISprite >& CGUISpriteBank::getSprites() +{ + return Sprites; +} + + +u32 CGUISpriteBank::getTextureCount() const +{ + return Textures.size(); +} + + +video::ITexture* CGUISpriteBank::getTexture(u32 index) const +{ + if (index < Textures.size()) + return Textures[index]; + else + return 0; +} + + +void CGUISpriteBank::addTexture(video::ITexture* texture) +{ + if (texture) + texture->grab(); + + Textures.push_back(texture); +} + + +void CGUISpriteBank::setTexture(u32 index, video::ITexture* texture) +{ + while (index >= Textures.size()) + Textures.push_back(0); + + if (texture) + texture->grab(); + + if (Textures[index]) + Textures[index]->drop(); + + Textures[index] = texture; +} + + +//! clear everything +void CGUISpriteBank::clear() +{ + // drop textures + for (u32 i=0; i<Textures.size(); ++i) + if (Textures[i]) + Textures[i]->drop(); + Textures.clear(); + Sprites.clear(); + Rectangles.clear(); +} + +//! Add the texture and use it for a single non-animated sprite. +s32 CGUISpriteBank::addTextureAsSprite(video::ITexture* texture) +{ + if ( !texture ) + return -1; + + addTexture(texture); + u32 textureIndex = getTextureCount() - 1; + + u32 rectangleIndex = Rectangles.size(); + Rectangles.push_back( core::rect<s32>(0,0, texture->getOriginalSize().Width, texture->getOriginalSize().Height) ); + + SGUISprite sprite; + sprite.frameTime = 0; + + SGUISpriteFrame frame; + frame.textureNumber = textureIndex; + frame.rectNumber = rectangleIndex; + sprite.Frames.push_back( frame ); + + Sprites.push_back( sprite ); + + return Sprites.size() - 1; +} + +//! draws a sprite in 2d with scale and color +void CGUISpriteBank::draw2DSprite(u32 index, const core::position2di& pos, + const core::rect<s32>* clip, const video::SColor& color, + u32 starttime, u32 currenttime, bool loop, bool center) +{ + if (index >= Sprites.size() || Sprites[index].Frames.empty() ) + return; + + // work out frame number + u32 frame = 0; + if (Sprites[index].frameTime) + { + u32 f = ((currenttime - starttime) / Sprites[index].frameTime); + if (loop) + frame = f % Sprites[index].Frames.size(); + else + frame = (f >= Sprites[index].Frames.size()) ? Sprites[index].Frames.size()-1 : f; + } + + const video::ITexture* tex = Textures[Sprites[index].Frames[frame].textureNumber]; + if (!tex) + return; + + const u32 rn = Sprites[index].Frames[frame].rectNumber; + if (rn >= Rectangles.size()) + return; + + const core::rect<s32>& r = Rectangles[rn]; + + if (center) + { + core::position2di p = pos; + p -= r.getSize() / 2; + Driver->draw2DImage(tex, p, r, clip, color, true); + } + else + { + Driver->draw2DImage(tex, pos, r, clip, color, true); + } +} + + +void CGUISpriteBank::draw2DSpriteBatch( const core::array<u32>& indices, + const core::array<core::position2di>& pos, + const core::rect<s32>* clip, + const video::SColor& color, + u32 starttime, u32 currenttime, + bool loop, bool center) +{ + const irr::u32 drawCount = core::min_<u32>(indices.size(), pos.size()); + + if( Textures.empty() ) + return; + core::array<SDrawBatch> drawBatches(Textures.size()); + for(u32 i = 0;i < Textures.size();i++) + { + drawBatches.push_back(SDrawBatch()); + drawBatches[i].positions.reallocate(drawCount); + drawBatches[i].sourceRects.reallocate(drawCount); + } + + for(u32 i = 0;i < drawCount;i++) + { + const u32 index = indices[i]; + + if (index >= Sprites.size() || Sprites[index].Frames.empty() ) + continue; + + // work out frame number + u32 frame = 0; + if (Sprites[index].frameTime) + { + u32 f = ((currenttime - starttime) / Sprites[index].frameTime); + if (loop) + frame = f % Sprites[index].Frames.size(); + else + frame = (f >= Sprites[index].Frames.size()) ? Sprites[index].Frames.size()-1 : f; + } + + const u32 texNum = Sprites[index].Frames[frame].textureNumber; + + SDrawBatch& currentBatch = drawBatches[texNum]; + + const u32 rn = Sprites[index].Frames[frame].rectNumber; + if (rn >= Rectangles.size()) + return; + + const core::rect<s32>& r = Rectangles[rn]; + + if (center) + { + core::position2di p = pos[i]; + p -= r.getSize() / 2; + + currentBatch.positions.push_back(p); + currentBatch.sourceRects.push_back(r); + } + else + { + currentBatch.positions.push_back(pos[i]); + currentBatch.sourceRects.push_back(r); + } + } + + for(u32 i = 0;i < drawBatches.size();i++) + { + if(!drawBatches[i].positions.empty() && !drawBatches[i].sourceRects.empty()) + Driver->draw2DImageBatch(Textures[i], drawBatches[i].positions, + drawBatches[i].sourceRects, clip, color, true); + } +} + +} // namespace gui +} // namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.d new file mode 100644 index 0000000..7ac073a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.d @@ -0,0 +1,2 @@ +CGUISpriteBank.o: CGUISpriteBank.cpp CGUISpriteBank.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.h new file mode 100644 index 0000000..77adb4d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUISpriteBank.h @@ -0,0 +1,84 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_SPRITE_BANK_H_INCLUDED__ +#define __C_GUI_SPRITE_BANK_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISpriteBank.h" + +namespace irr +{ + +namespace video +{ + class IVideoDriver; + class ITexture; +} + +namespace gui +{ + + class IGUIEnvironment; + +//! Sprite bank interface. +class CGUISpriteBank : public IGUISpriteBank +{ +public: + + CGUISpriteBank(IGUIEnvironment* env); + virtual ~CGUISpriteBank(); + + virtual core::array< core::rect<s32> >& getPositions(); + virtual core::array< SGUISprite >& getSprites(); + + virtual u32 getTextureCount() const; + virtual video::ITexture* getTexture(u32 index) const; + virtual void addTexture(video::ITexture* texture); + virtual void setTexture(u32 index, video::ITexture* texture); + + //! Add the texture and use it for a single non-animated sprite. + virtual s32 addTextureAsSprite(video::ITexture* texture); + + //! clears sprites, rectangles and textures + virtual void clear(); + + //! Draws a sprite in 2d with position and color + virtual void draw2DSprite(u32 index, const core::position2di& pos, const core::rect<s32>* clip=0, + const video::SColor& color= video::SColor(255,255,255,255), + u32 starttime=0, u32 currenttime=0, bool loop=true, bool center=false); + + //! Draws a sprite batch in 2d using an array of positions and a color + virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos, + const core::rect<s32>* clip=0, + const video::SColor& color= video::SColor(255,255,255,255), + u32 starttime=0, u32 currenttime=0, + bool loop=true, bool center=false); + +protected: + + struct SDrawBatch + { + core::array<core::position2di> positions; + core::array<core::recti> sourceRects; + u32 textureNumber; + }; + + core::array<SGUISprite> Sprites; + core::array< core::rect<s32> > Rectangles; + core::array<video::ITexture*> Textures; + IGUIEnvironment* Environment; + video::IVideoDriver* Driver; + +}; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif // __C_GUI_SPRITE_BANK_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.cpp new file mode 100644 index 0000000..ea934d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.cpp @@ -0,0 +1,630 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIStaticText.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IGUIFont.h" +#include "IVideoDriver.h" +#include "rect.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIStaticText::CGUIStaticText(const wchar_t* text, bool border, + IGUIEnvironment* environment, IGUIElement* parent, + s32 id, const core::rect<s32>& rectangle, + bool background) +: IGUIStaticText(environment, parent, id, rectangle), + HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_UPPERLEFT), + Border(border), OverrideColorEnabled(false), OverrideBGColorEnabled(false), WordWrap(false), Background(background), + RestrainTextInside(true), RightToLeft(false), + OverrideColor(video::SColor(101,255,255,255)), BGColor(video::SColor(101,210,210,210)), + OverrideFont(0), LastBreakFont(0) +{ + #ifdef _DEBUG + setDebugName("CGUIStaticText"); + #endif + + Text = text; + if (environment && environment->getSkin()) + { + BGColor = environment->getSkin()->getColor(gui::EGDC_3D_FACE); + } +} + + +//! destructor +CGUIStaticText::~CGUIStaticText() +{ + if (OverrideFont) + OverrideFont->drop(); +} + + +//! draws the element and its children +void CGUIStaticText::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + video::IVideoDriver* driver = Environment->getVideoDriver(); + + core::rect<s32> frameRect(AbsoluteRect); + + // draw background + + if (Background) + { + if ( !OverrideBGColorEnabled ) // skin-colors can change + BGColor = skin->getColor(gui::EGDC_3D_FACE); + + driver->draw2DRectangle(BGColor, frameRect, &AbsoluteClippingRect); + } + + // draw the border + + if (Border) + { + skin->draw3DSunkenPane(this, 0, true, false, frameRect, &AbsoluteClippingRect); + frameRect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); + } + + // draw the text + if (Text.size()) + { + IGUIFont* font = getActiveFont(); + + if (font) + { + if (!WordWrap) + { + if (VAlign == EGUIA_LOWERRIGHT) + { + frameRect.UpperLeftCorner.Y = frameRect.LowerRightCorner.Y - + font->getDimension(L"A").Height - font->getKerningHeight(); + } + if (HAlign == EGUIA_LOWERRIGHT) + { + frameRect.UpperLeftCorner.X = frameRect.LowerRightCorner.X - + font->getDimension(Text.c_str()).Width; + } + + font->draw(Text.c_str(), frameRect, + OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), + HAlign == EGUIA_CENTER, VAlign == EGUIA_CENTER, (RestrainTextInside ? &AbsoluteClippingRect : NULL)); + } + else + { + if (font != LastBreakFont) + breakText(); + + core::rect<s32> r = frameRect; + s32 height = font->getDimension(L"A").Height + font->getKerningHeight(); + s32 totalHeight = height * BrokenText.size(); + if (VAlign == EGUIA_CENTER) + { + r.UpperLeftCorner.Y = r.getCenter().Y - (totalHeight / 2); + } + else if (VAlign == EGUIA_LOWERRIGHT) + { + r.UpperLeftCorner.Y = r.LowerRightCorner.Y - totalHeight; + } + + for (u32 i=0; i<BrokenText.size(); ++i) + { + if (HAlign == EGUIA_LOWERRIGHT) + { + r.UpperLeftCorner.X = frameRect.LowerRightCorner.X - + font->getDimension(BrokenText[i].c_str()).Width; + } + + font->draw(BrokenText[i].c_str(), r, + OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), + HAlign == EGUIA_CENTER, false, (RestrainTextInside ? &AbsoluteClippingRect : NULL)); + + r.LowerRightCorner.Y += height; + r.UpperLeftCorner.Y += height; + } + } + } + } + + IGUIElement::draw(); +} + + +//! Sets another skin independent font. +void CGUIStaticText::setOverrideFont(IGUIFont* font) +{ + if (OverrideFont == font) + return; + + if (OverrideFont) + OverrideFont->drop(); + + OverrideFont = font; + + if (OverrideFont) + OverrideFont->grab(); + + breakText(); +} + +//! Gets the override font (if any) +IGUIFont * CGUIStaticText::getOverrideFont() const +{ + return OverrideFont; +} + +//! Get the font which is used right now for drawing +IGUIFont* CGUIStaticText::getActiveFont() const +{ + if ( OverrideFont ) + return OverrideFont; + IGUISkin* skin = Environment->getSkin(); + if (skin) + return skin->getFont(); + return 0; +} + +//! Sets another color for the text. +void CGUIStaticText::setOverrideColor(video::SColor color) +{ + OverrideColor = color; + OverrideColorEnabled = true; +} + + +//! Sets another color for the text. +void CGUIStaticText::setBackgroundColor(video::SColor color) +{ + BGColor = color; + OverrideBGColorEnabled = true; + Background = true; +} + + +//! Sets whether to draw the background +void CGUIStaticText::setDrawBackground(bool draw) +{ + Background = draw; +} + + +//! Gets the background color +video::SColor CGUIStaticText::getBackgroundColor() const +{ + return BGColor; +} + + +//! Checks if background drawing is enabled +bool CGUIStaticText::isDrawBackgroundEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Background; +} + + +//! Sets whether to draw the border +void CGUIStaticText::setDrawBorder(bool draw) +{ + Border = draw; +} + + +//! Checks if border drawing is enabled +bool CGUIStaticText::isDrawBorderEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Border; +} + + +void CGUIStaticText::setTextRestrainedInside(bool restrainTextInside) +{ + RestrainTextInside = restrainTextInside; +} + + +bool CGUIStaticText::isTextRestrainedInside() const +{ + return RestrainTextInside; +} + + +void CGUIStaticText::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) +{ + HAlign = horizontal; + VAlign = vertical; +} + + +video::SColor CGUIStaticText::getOverrideColor() const +{ + return OverrideColor; +} + + +//! Sets if the static text should use the overide color or the +//! color in the gui skin. +void CGUIStaticText::enableOverrideColor(bool enable) +{ + OverrideColorEnabled = enable; +} + + +bool CGUIStaticText::isOverrideColorEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return OverrideColorEnabled; +} + + +//! Enables or disables word wrap for using the static text as +//! multiline text control. +void CGUIStaticText::setWordWrap(bool enable) +{ + WordWrap = enable; + breakText(); +} + + +bool CGUIStaticText::isWordWrapEnabled() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return WordWrap; +} + + +void CGUIStaticText::setRightToLeft(bool rtl) +{ + if (RightToLeft != rtl) + { + RightToLeft = rtl; + breakText(); + } +} + + +bool CGUIStaticText::isRightToLeft() const +{ + return RightToLeft; +} + + +//! Breaks the single text line. +void CGUIStaticText::breakText() +{ + if (!WordWrap) + return; + + BrokenText.clear(); + + IGUISkin* skin = Environment->getSkin(); + IGUIFont* font = getActiveFont(); + if (!font) + return; + + LastBreakFont = font; + + core::stringw line; + core::stringw word; + core::stringw whitespace; + s32 size = Text.size(); + s32 length = 0; + s32 elWidth = RelativeRect.getWidth(); + if (Border) + elWidth -= 2*skin->getSize(EGDS_TEXT_DISTANCE_X); + wchar_t c; + + // We have to deal with right-to-left and left-to-right differently + // However, most parts of the following code is the same, it's just + // some order and boundaries which change. + if (!RightToLeft) + { + // regular (left-to-right) + for (s32 i=0; i<size; ++i) + { + c = Text[i]; + bool lineBreak = false; + + if (c == L'\r') // Mac or Windows breaks + { + lineBreak = true; + if (Text[i+1] == L'\n') // Windows breaks + { + Text.erase(i+1); + --size; + } + c = '\0'; + } + else if (c == L'\n') // Unix breaks + { + lineBreak = true; + c = '\0'; + } + + bool isWhitespace = (c == L' ' || c == 0); + if ( !isWhitespace ) + { + // part of a word + word += c; + } + + if ( isWhitespace || i == (size-1)) + { + if (word.size()) + { + // here comes the next whitespace, look if + // we must break the last word to the next line. + const s32 whitelgth = font->getDimension(whitespace.c_str()).Width; + const s32 wordlgth = font->getDimension(word.c_str()).Width; + + if (wordlgth > elWidth) + { + // This word is too long to fit in the available space, look for + // the Unicode Soft HYphen (SHY / 00AD) character for a place to + // break the word at + int where = word.findFirst( wchar_t(0x00AD) ); + if (where != -1) + { + core::stringw first = word.subString(0, where); + core::stringw second = word.subString(where, word.size() - where); + BrokenText.push_back(line + first + L"-"); + const s32 secondLength = font->getDimension(second.c_str()).Width; + + length = secondLength; + line = second; + } + else + { + // No soft hyphen found, so there's nothing more we can do + // break to next line + if (length) + BrokenText.push_back(line); + length = wordlgth; + line = word; + } + } + else if (length && (length + wordlgth + whitelgth > elWidth)) + { + // break to next line + BrokenText.push_back(line); + length = wordlgth; + line = word; + } + else + { + // add word to line + line += whitespace; + line += word; + length += whitelgth + wordlgth; + } + + word = L""; + whitespace = L""; + } + + if ( isWhitespace ) + { + whitespace += c; + } + + // compute line break + if (lineBreak) + { + line += whitespace; + line += word; + BrokenText.push_back(line); + line = L""; + word = L""; + whitespace = L""; + length = 0; + } + } + } + + line += whitespace; + line += word; + BrokenText.push_back(line); + } + else + { + // right-to-left + for (s32 i=size; i>=0; --i) + { + c = Text[i]; + bool lineBreak = false; + + if (c == L'\r') // Mac or Windows breaks + { + lineBreak = true; + if ((i>0) && Text[i-1] == L'\n') // Windows breaks + { + Text.erase(i-1); + --size; + } + c = '\0'; + } + else if (c == L'\n') // Unix breaks + { + lineBreak = true; + c = '\0'; + } + + if (c==L' ' || c==0 || i==0) + { + if (word.size()) + { + // here comes the next whitespace, look if + // we must break the last word to the next line. + const s32 whitelgth = font->getDimension(whitespace.c_str()).Width; + const s32 wordlgth = font->getDimension(word.c_str()).Width; + + if (length && (length + wordlgth + whitelgth > elWidth)) + { + // break to next line + BrokenText.push_back(line); + length = wordlgth; + line = word; + } + else + { + // add word to line + line = whitespace + line; + line = word + line; + length += whitelgth + wordlgth; + } + + word = L""; + whitespace = L""; + } + + if (c != 0) + whitespace = core::stringw(&c, 1) + whitespace; + + // compute line break + if (lineBreak) + { + line = whitespace + line; + line = word + line; + BrokenText.push_back(line); + line = L""; + word = L""; + whitespace = L""; + length = 0; + } + } + else + { + // yippee this is a word.. + word = core::stringw(&c, 1) + word; + } + } + + line = whitespace + line; + line = word + line; + BrokenText.push_back(line); + } +} + + +//! Sets the new caption of this element. +void CGUIStaticText::setText(const wchar_t* text) +{ + IGUIElement::setText(text); + breakText(); +} + + +void CGUIStaticText::updateAbsolutePosition() +{ + IGUIElement::updateAbsolutePosition(); + breakText(); +} + + +//! Returns the height of the text in pixels when it is drawn. +s32 CGUIStaticText::getTextHeight() const +{ + IGUIFont* font = getActiveFont(); + if (!font) + return 0; + + s32 height = font->getDimension(L"A").Height + font->getKerningHeight(); + + if (WordWrap) + height *= BrokenText.size(); + + return height; +} + + +s32 CGUIStaticText::getTextWidth() const +{ + IGUIFont * font = getActiveFont(); + if(!font) + return 0; + + if(WordWrap) + { + s32 widest = 0; + + for(u32 line = 0; line < BrokenText.size(); ++line) + { + s32 width = font->getDimension(BrokenText[line].c_str()).Width; + + if(width > widest) + widest = width; + } + + return widest; + } + else + { + return font->getDimension(Text.c_str()).Width; + } +} + + +//! Writes attributes of the element. +//! Implement this to expose the attributes of your element for +//! scripting languages, editors, debuggers or xml serialization purposes. +void CGUIStaticText::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIStaticText::serializeAttributes(out,options); + + out->addBool ("Border", Border); + out->addBool ("OverrideColorEnabled",OverrideColorEnabled); + out->addBool ("OverrideBGColorEnabled",OverrideBGColorEnabled); + out->addBool ("WordWrap", WordWrap); + out->addBool ("Background", Background); + out->addBool ("RightToLeft", RightToLeft); + out->addBool ("RestrainTextInside", RestrainTextInside); + out->addColor ("OverrideColor", OverrideColor); + out->addColor ("BGColor", BGColor); + out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); + out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); + + // out->addFont ("OverrideFont", OverrideFont); +} + + +//! Reads attributes of the element +void CGUIStaticText::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUIStaticText::deserializeAttributes(in,options); + + Border = in->getAttributeAsBool("Border"); + enableOverrideColor(in->getAttributeAsBool("OverrideColorEnabled")); + OverrideBGColorEnabled = in->getAttributeAsBool("OverrideBGColorEnabled"); + setWordWrap(in->getAttributeAsBool("WordWrap")); + Background = in->getAttributeAsBool("Background"); + RightToLeft = in->getAttributeAsBool("RightToLeft"); + RestrainTextInside = in->getAttributeAsBool("RestrainTextInside"); + OverrideColor = in->getAttributeAsColor("OverrideColor"); + BGColor = in->getAttributeAsColor("BGColor"); + + setTextAlignment( (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("HTextAlign", GUIAlignmentNames), + (EGUI_ALIGNMENT) in->getAttributeAsEnumeration("VTextAlign", GUIAlignmentNames)); + + // OverrideFont = in->getAttributeAsFont("OverrideFont"); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.d new file mode 100644 index 0000000..63f9e79 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.d @@ -0,0 +1,2 @@ +CGUIStaticText.o: CGUIStaticText.cpp CGUIStaticText.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.h new file mode 100644 index 0000000..33daa98 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIStaticText.h @@ -0,0 +1,145 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_STATIC_TEXT_H_INCLUDED__ +#define __C_GUI_STATIC_TEXT_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIStaticText.h" +#include "irrArray.h" + +namespace irr +{ +namespace gui +{ + class CGUIStaticText : public IGUIStaticText + { + public: + + //! constructor + CGUIStaticText(const wchar_t* text, bool border, IGUIEnvironment* environment, + IGUIElement* parent, s32 id, const core::rect<s32>& rectangle, + bool background = false); + + //! destructor + virtual ~CGUIStaticText(); + + //! draws the element and its children + virtual void draw(); + + //! Sets another skin independent font. + virtual void setOverrideFont(IGUIFont* font=0); + + //! Gets the override font (if any) + virtual IGUIFont* getOverrideFont() const; + + //! Get the font which is used right now for drawing + virtual IGUIFont* getActiveFont() const; + + //! Sets another color for the text. + virtual void setOverrideColor(video::SColor color); + + //! Sets another color for the background. + virtual void setBackgroundColor(video::SColor color); + + //! Sets whether to draw the background + virtual void setDrawBackground(bool draw); + + //! Gets the background color + virtual video::SColor getBackgroundColor() const; + + //! Checks if background drawing is enabled + virtual bool isDrawBackgroundEnabled() const; + + //! Sets whether to draw the border + virtual void setDrawBorder(bool draw); + + //! Checks if border drawing is enabled + virtual bool isDrawBorderEnabled() const; + + //! Sets alignment mode for text + virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical); + + //! Gets the override color + virtual video::SColor getOverrideColor() const; + + //! Sets if the static text should use the overide color or the + //! color in the gui skin. + virtual void enableOverrideColor(bool enable); + + //! Checks if an override color is enabled + virtual bool isOverrideColorEnabled() const; + + //! Set whether the text in this label should be clipped if it goes outside bounds + virtual void setTextRestrainedInside(bool restrainedInside); + + //! Checks if the text in this label should be clipped if it goes outside bounds + virtual bool isTextRestrainedInside() const; + + //! Enables or disables word wrap for using the static text as + //! multiline text control. + virtual void setWordWrap(bool enable); + + //! Checks if word wrap is enabled + virtual bool isWordWrapEnabled() const; + + //! Sets the new caption of this element. + virtual void setText(const wchar_t* text); + + //! Returns the height of the text in pixels when it is drawn. + virtual s32 getTextHeight() const; + + //! Returns the width of the current text, in the current font + virtual s32 getTextWidth() const; + + //! Updates the absolute position, splits text if word wrap is enabled + virtual void updateAbsolutePosition(); + + //! Set whether the string should be interpreted as right-to-left (RTL) text + /** \note This component does not implement the Unicode bidi standard, the + text of the component should be already RTL if you call this. The + main difference when RTL is enabled is that the linebreaks for multiline + elements are performed starting from the end. + */ + virtual void setRightToLeft(bool rtl); + + //! Checks if the text should be interpreted as right-to-left text + virtual bool isRightToLeft() const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + //! Breaks the single text line. + void breakText(); + + EGUI_ALIGNMENT HAlign, VAlign; + bool Border; + bool OverrideColorEnabled; + bool OverrideBGColorEnabled; + bool WordWrap; + bool Background; + bool RestrainTextInside; + bool RightToLeft; + + video::SColor OverrideColor, BGColor; + gui::IGUIFont* OverrideFont; + gui::IGUIFont* LastBreakFont; // stored because: if skin changes, line break must be recalculated. + + core::array< core::stringw > BrokenText; + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.cpp new file mode 100644 index 0000000..a931d92 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.cpp @@ -0,0 +1,1042 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUITabControl.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "CGUIButton.h" +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IGUIFont.h" +#include "IVideoDriver.h" +#include "rect.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +// ------------------------------------------------------------------ +// Tab +// ------------------------------------------------------------------ + +//! constructor +CGUITab::CGUITab(s32 number, IGUIEnvironment* environment, + IGUIElement* parent, const core::rect<s32>& rectangle, + s32 id) + : IGUITab(environment, parent, id, rectangle), Number(number), + BackColor(0,0,0,0), OverrideTextColorEnabled(false), TextColor(255,0,0,0), + DrawBackground(false) +{ + #ifdef _DEBUG + setDebugName("CGUITab"); + #endif + + const IGUISkin* const skin = environment->getSkin(); + if (skin) + TextColor = skin->getColor(EGDC_BUTTON_TEXT); +} + + +//! Returns number of tab in tabcontrol. Can be accessed +//! later IGUITabControl::getTab() by this number. +s32 CGUITab::getNumber() const +{ + return Number; +} + + +//! Sets the number +void CGUITab::setNumber(s32 n) +{ + Number = n; +} + +void CGUITab::refreshSkinColors() +{ + if ( !OverrideTextColorEnabled ) + { + TextColor = Environment->getSkin()->getColor(EGDC_BUTTON_TEXT); + } +} + +//! draws the element and its children +void CGUITab::draw() +{ + if (!IsVisible) + return; + + IGUISkin *skin = Environment->getSkin(); + + if (skin && DrawBackground) + skin->draw2DRectangle(this, BackColor, AbsoluteRect, &AbsoluteClippingRect); + + IGUIElement::draw(); +} + + +//! sets if the tab should draw its background +void CGUITab::setDrawBackground(bool draw) +{ + DrawBackground = draw; +} + + +//! sets the color of the background, if it should be drawn. +void CGUITab::setBackgroundColor(video::SColor c) +{ + BackColor = c; +} + + +//! sets the color of the text +void CGUITab::setTextColor(video::SColor c) +{ + OverrideTextColorEnabled = true; + TextColor = c; +} + + +video::SColor CGUITab::getTextColor() const +{ + return TextColor; +} + + +//! returns true if the tab is drawing its background, false if not +bool CGUITab::isDrawingBackground() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return DrawBackground; +} + + +//! returns the color of the background +video::SColor CGUITab::getBackgroundColor() const +{ + return BackColor; +} + + +//! Writes attributes of the element. +void CGUITab::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUITab::serializeAttributes(out,options); + + out->addInt ("TabNumber", Number); + out->addBool ("DrawBackground", DrawBackground); + out->addColor ("BackColor", BackColor); + out->addBool ("OverrideTextColorEnabled", OverrideTextColorEnabled); + out->addColor ("TextColor", TextColor); + +} + + +//! Reads attributes of the element +void CGUITab::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + IGUITab::deserializeAttributes(in,options); + + setNumber(in->getAttributeAsInt("TabNumber")); + setDrawBackground(in->getAttributeAsBool("DrawBackground")); + setBackgroundColor(in->getAttributeAsColor("BackColor")); + bool override = in->getAttributeAsBool("OverrideTextColorEnabled"); + setTextColor(in->getAttributeAsColor("TextColor")); + if ( !override ) + { + OverrideTextColorEnabled = false; + } + + if (Parent && Parent->getType() == EGUIET_TAB_CONTROL) + { + ((CGUITabControl*)Parent)->addTab(this); + if (isVisible()) + ((CGUITabControl*)Parent)->setActiveTab(this); + } +} + + +// ------------------------------------------------------------------ +// Tabcontrol +// ------------------------------------------------------------------ + +//! constructor +CGUITabControl::CGUITabControl(IGUIEnvironment* environment, + IGUIElement* parent, const core::rect<s32>& rectangle, + bool fillbackground, bool border, s32 id) + : IGUITabControl(environment, parent, id, rectangle), ActiveTab(-1), + Border(border), FillBackground(fillbackground), ScrollControl(false), TabHeight(0), VerticalAlignment(EGUIA_UPPERLEFT), + UpButton(0), DownButton(0), TabMaxWidth(0), CurrentScrollTabIndex(0), TabExtraWidth(20) +{ + #ifdef _DEBUG + setDebugName("CGUITabControl"); + #endif + + IGUISkin* skin = Environment->getSkin(); + IGUISpriteBank* sprites = 0; + + TabHeight = 32; + + if (skin) + { + sprites = skin->getSpriteBank(); + TabHeight = skin->getSize(gui::EGDS_BUTTON_HEIGHT) + 2; + } + + UpButton = Environment->addButton(core::rect<s32>(0,0,10,10), this); + + if (UpButton) + { + UpButton->setSpriteBank(sprites); + UpButton->setVisible(false); + UpButton->setSubElement(true); + UpButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + UpButton->setOverrideFont(Environment->getBuiltInFont()); + UpButton->grab(); + } + + DownButton = Environment->addButton(core::rect<s32>(0,0,10,10), this); + + if (DownButton) + { + DownButton->setSpriteBank(sprites); + DownButton->setVisible(false); + DownButton->setSubElement(true); + DownButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + DownButton->setOverrideFont(Environment->getBuiltInFont()); + DownButton->grab(); + } + + setTabVerticalAlignment(EGUIA_UPPERLEFT); + refreshSprites(); +} + +//! destructor +CGUITabControl::~CGUITabControl() +{ + for (u32 i=0; i<Tabs.size(); ++i) + { + if (Tabs[i]) + Tabs[i]->drop(); + } + + if (UpButton) + UpButton->drop(); + + if (DownButton) + DownButton->drop(); +} + +void CGUITabControl::refreshSprites() +{ + video::SColor color(255,255,255,255); + IGUISkin* skin = Environment->getSkin(); + if (skin) + { + color = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + } + + if (UpButton) + { + UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_LEFT), color); + UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_LEFT), color); + } + + if (DownButton) + { + DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_RIGHT), color); + DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_RIGHT), color); + } +} + +//! Adds a tab +IGUITab* CGUITabControl::addTab(const wchar_t* caption, s32 id) +{ + CGUITab* tab = new CGUITab(Tabs.size(), Environment, this, calcTabPos(), id); + + tab->setText(caption); + tab->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + tab->setVisible(false); + Tabs.push_back(tab); + + if (ActiveTab == -1) + { + ActiveTab = 0; + tab->setVisible(true); + } + + recalculateScrollBar(); + + return tab; +} + + +//! adds a tab which has been created elsewhere +void CGUITabControl::addTab(CGUITab* tab) +{ + if (!tab) + return; + + // check if its already added + for (u32 i=0; i < Tabs.size(); ++i) + { + if (Tabs[i] == tab) + return; + } + + tab->grab(); + + if (tab->getNumber() == -1) + tab->setNumber((s32)Tabs.size()); + + while (tab->getNumber() >= (s32)Tabs.size()) + Tabs.push_back(0); + + if (Tabs[tab->getNumber()]) + { + Tabs.push_back(Tabs[tab->getNumber()]); + Tabs[Tabs.size()-1]->setNumber(Tabs.size()); + } + Tabs[tab->getNumber()] = tab; + + if (ActiveTab == -1) + ActiveTab = tab->getNumber(); + + + if (tab->getNumber() == ActiveTab) + { + setActiveTab(ActiveTab); + } +} + +//! Insert the tab at the given index +IGUITab* CGUITabControl::insertTab(s32 idx, const wchar_t* caption, s32 id) +{ + if ( idx < 0 || idx > (s32)Tabs.size() ) // idx == Tabs.size() is indeed ok here as core::array can handle that + return NULL; + + CGUITab* tab = new CGUITab(idx, Environment, this, calcTabPos(), id); + + tab->setText(caption); + tab->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + tab->setVisible(false); + Tabs.insert(tab, (u32)idx); + + if (ActiveTab == -1) + { + ActiveTab = 0; + tab->setVisible(true); + } + + for ( u32 i=(u32)idx+1; i < Tabs.size(); ++i ) + { + Tabs[i]->setNumber(i); + } + + recalculateScrollBar(); + + return tab; +} + +//! Removes a tab from the tabcontrol +void CGUITabControl::removeTab(s32 idx) +{ + if ( idx < 0 || idx >= (s32)Tabs.size() ) + return; + + Tabs[(u32)idx]->drop(); + Tabs.erase((u32)idx); + for ( u32 i=(u32)idx; i < Tabs.size(); ++i ) + { + Tabs[i]->setNumber(i); + } +} + +//! Clears the tabcontrol removing all tabs +void CGUITabControl::clear() +{ + for (u32 i=0; i<Tabs.size(); ++i) + { + if (Tabs[i]) + Tabs[i]->drop(); + } + Tabs.clear(); +} + +//! Returns amount of tabs in the tabcontrol +s32 CGUITabControl::getTabCount() const +{ + return Tabs.size(); +} + + +//! Returns a tab based on zero based index +IGUITab* CGUITabControl::getTab(s32 idx) const +{ + if ((u32)idx >= Tabs.size()) + return 0; + + return Tabs[idx]; +} + + +//! called if an event happened. +bool CGUITabControl::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case EGET_BUTTON_CLICKED: + if (event.GUIEvent.Caller == UpButton) + { + scrollLeft(); + return true; + } + else if (event.GUIEvent.Caller == DownButton) + { + scrollRight(); + return true; + } + + break; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + // todo: dragging tabs around + return true; + case EMIE_LMOUSE_LEFT_UP: + { + s32 idx = getTabAt(event.MouseInput.X, event.MouseInput.Y); + if ( idx >= 0 ) + { + setActiveTab(idx); + return true; + } + break; + } + default: + break; + } + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +void CGUITabControl::scrollLeft() +{ + if ( CurrentScrollTabIndex > 0 ) + --CurrentScrollTabIndex; + recalculateScrollBar(); +} + + +void CGUITabControl::scrollRight() +{ + if ( CurrentScrollTabIndex < (s32)(Tabs.size()) - 1 ) + { + if ( needScrollControl(CurrentScrollTabIndex, true) ) + ++CurrentScrollTabIndex; + } + recalculateScrollBar(); +} + +s32 CGUITabControl::calcTabWidth(s32 pos, IGUIFont* font, const wchar_t* text, bool withScrollControl) const +{ + if ( !font ) + return 0; + + s32 len = font->getDimension(text).Width + TabExtraWidth; + if ( TabMaxWidth > 0 && len > TabMaxWidth ) + len = TabMaxWidth; + + // check if we miss the place to draw the tab-button + if ( withScrollControl && ScrollControl && pos+len > UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) + { + s32 tabMinWidth = font->getDimension(L"A").Width; + if ( TabExtraWidth > 0 && TabExtraWidth > tabMinWidth ) + tabMinWidth = TabExtraWidth; + + if ( ScrollControl && pos+tabMinWidth <= UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) + { + len = UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 - pos; + } + } + return len; +} + +bool CGUITabControl::needScrollControl(s32 startIndex, bool withScrollControl) +{ + if ( startIndex >= (s32)Tabs.size() ) + startIndex -= 1; + + if ( startIndex < 0 ) + startIndex = 0; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return false; + + IGUIFont* font = skin->getFont(); + + core::rect<s32> frameRect(AbsoluteRect); + + if (Tabs.empty()) + return false; + + if (!font) + return false; + + s32 pos = frameRect.UpperLeftCorner.X + 2; + + for (s32 i=startIndex; i<(s32)Tabs.size(); ++i) + { + // get Text + const wchar_t* text = 0; + if (Tabs[i]) + text = Tabs[i]->getText(); + + // get text length + s32 len = calcTabWidth(pos, font, text, false); // always without withScrollControl here or len would be shortened + + frameRect.LowerRightCorner.X += len; + + frameRect.UpperLeftCorner.X = pos; + frameRect.LowerRightCorner.X = frameRect.UpperLeftCorner.X + len; + pos += len; + + if ( withScrollControl && pos > UpButton->getAbsolutePosition().UpperLeftCorner.X - 2) + return true; + + if ( !withScrollControl && pos > AbsoluteRect.LowerRightCorner.X ) + return true; + } + + return false; +} + + +core::rect<s32> CGUITabControl::calcTabPos() +{ + core::rect<s32> r; + r.UpperLeftCorner.X = 0; + r.LowerRightCorner.X = AbsoluteRect.getWidth(); + if ( Border ) + { + ++r.UpperLeftCorner.X; + --r.LowerRightCorner.X; + } + + if ( VerticalAlignment == EGUIA_UPPERLEFT ) + { + r.UpperLeftCorner.Y = TabHeight+2; + r.LowerRightCorner.Y = AbsoluteRect.getHeight()-1; + if ( Border ) + { + --r.LowerRightCorner.Y; + } + } + else + { + r.UpperLeftCorner.Y = 0; + r.LowerRightCorner.Y = AbsoluteRect.getHeight()-(TabHeight+2); + if ( Border ) + { + ++r.UpperLeftCorner.Y; + } + } + + return r; +} + + +//! draws the element and its children +void CGUITabControl::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + IGUIFont* font = skin->getFont(); + video::IVideoDriver* driver = Environment->getVideoDriver(); + + core::rect<s32> frameRect(AbsoluteRect); + + if (Tabs.empty()) + driver->draw2DRectangle(skin->getColor(EGDC_3D_HIGH_LIGHT), frameRect, &AbsoluteClippingRect); + + if (!font) + return; + + if ( VerticalAlignment == EGUIA_UPPERLEFT ) + { + frameRect.UpperLeftCorner.Y += 2; + frameRect.LowerRightCorner.Y = frameRect.UpperLeftCorner.Y + TabHeight; + } + else + { + frameRect.UpperLeftCorner.Y = frameRect.LowerRightCorner.Y - TabHeight - 1; + frameRect.LowerRightCorner.Y -= 2; + } + + core::rect<s32> tr; + s32 pos = frameRect.UpperLeftCorner.X + 2; + + bool needLeftScroll = CurrentScrollTabIndex > 0; + bool needRightScroll = false; + + // left and right pos of the active tab + s32 left = 0; + s32 right = 0; + + //const wchar_t* activetext = 0; + CGUITab *activeTab = 0; + + for (u32 i=CurrentScrollTabIndex; i<Tabs.size(); ++i) + { + // get Text + const wchar_t* text = 0; + if (Tabs[i]) + text = Tabs[i]->getText(); + + // get text length + s32 len = calcTabWidth(pos, font, text, true); + if ( ScrollControl && pos+len > UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) + { + needRightScroll = true; + break; + } + + frameRect.LowerRightCorner.X += len; + frameRect.UpperLeftCorner.X = pos; + frameRect.LowerRightCorner.X = frameRect.UpperLeftCorner.X + len; + + pos += len; + + if ( text ) + Tabs[i]->refreshSkinColors(); + + if ((s32)i == ActiveTab) + { + left = frameRect.UpperLeftCorner.X; + right = frameRect.LowerRightCorner.X; + //activetext = text; + activeTab = Tabs[i]; + } + else + { + skin->draw3DTabButton(this, false, frameRect, &AbsoluteClippingRect, VerticalAlignment); + + // draw text + core::rect<s32> textClipRect(frameRect); // TODO: exact size depends on borders in draw3DTabButton which we don't get with current interface + textClipRect.clipAgainst(AbsoluteClippingRect); + font->draw(text, frameRect, Tabs[i]->getTextColor(), + true, true, &textClipRect); + } + } + + // draw active tab + if (left != 0 && right != 0 && activeTab != 0) + { + // draw upper highlight frame + if ( VerticalAlignment == EGUIA_UPPERLEFT ) + { + frameRect.UpperLeftCorner.X = left-2; + frameRect.LowerRightCorner.X = right+2; + frameRect.UpperLeftCorner.Y -= 2; + + skin->draw3DTabButton(this, true, frameRect, &AbsoluteClippingRect, VerticalAlignment); + + // draw text + core::rect<s32> textClipRect(frameRect); // TODO: exact size depends on borders in draw3DTabButton which we don't get with current interface + textClipRect.clipAgainst(AbsoluteClippingRect); + font->draw(activeTab->getText(), frameRect, activeTab->getTextColor(), + true, true, &textClipRect); + + tr.UpperLeftCorner.X = AbsoluteRect.UpperLeftCorner.X; + tr.LowerRightCorner.X = left - 1; + tr.UpperLeftCorner.Y = frameRect.LowerRightCorner.Y - 1; + tr.LowerRightCorner.Y = frameRect.LowerRightCorner.Y; + driver->draw2DRectangle(skin->getColor(EGDC_3D_HIGH_LIGHT), tr, &AbsoluteClippingRect); + + tr.UpperLeftCorner.X = right; + tr.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X; + driver->draw2DRectangle(skin->getColor(EGDC_3D_HIGH_LIGHT), tr, &AbsoluteClippingRect); + } + else + { + + frameRect.UpperLeftCorner.X = left-2; + frameRect.LowerRightCorner.X = right+2; + frameRect.LowerRightCorner.Y += 2; + + skin->draw3DTabButton(this, true, frameRect, &AbsoluteClippingRect, VerticalAlignment); + + // draw text + font->draw(activeTab->getText(), frameRect, activeTab->getTextColor(), + true, true, &frameRect); + + tr.UpperLeftCorner.X = AbsoluteRect.UpperLeftCorner.X; + tr.LowerRightCorner.X = left - 1; + tr.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y - 1; + tr.LowerRightCorner.Y = frameRect.UpperLeftCorner.Y; + driver->draw2DRectangle(skin->getColor(EGDC_3D_DARK_SHADOW), tr, &AbsoluteClippingRect); + + tr.UpperLeftCorner.X = right; + tr.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X; + driver->draw2DRectangle(skin->getColor(EGDC_3D_DARK_SHADOW), tr, &AbsoluteClippingRect); + } + } + else + { + if ( VerticalAlignment == EGUIA_UPPERLEFT ) + { + tr.UpperLeftCorner.X = AbsoluteRect.UpperLeftCorner.X; + tr.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X; + tr.UpperLeftCorner.Y = frameRect.LowerRightCorner.Y - 1; + tr.LowerRightCorner.Y = frameRect.LowerRightCorner.Y; + driver->draw2DRectangle(skin->getColor(EGDC_3D_HIGH_LIGHT), tr, &AbsoluteClippingRect); + } + else + { + tr.UpperLeftCorner.X = AbsoluteRect.UpperLeftCorner.X; + tr.LowerRightCorner.X = 1000; + tr.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y - 1; + tr.LowerRightCorner.Y = frameRect.UpperLeftCorner.Y; + driver->draw2DRectangle(skin->getColor(EGDC_3D_DARK_SHADOW), tr, &AbsoluteClippingRect); + } + } + + skin->draw3DTabBody(this, Border, FillBackground, AbsoluteRect, &AbsoluteClippingRect, TabHeight, VerticalAlignment); + + // enable scrollcontrols on need + if ( UpButton ) + UpButton->setEnabled(needLeftScroll); + if ( DownButton ) + DownButton->setEnabled(needRightScroll); + refreshSprites(); + + IGUIElement::draw(); +} + + +//! Set the height of the tabs +void CGUITabControl::setTabHeight( s32 height ) +{ + if ( height < 0 ) + height = 0; + + TabHeight = height; + + recalculateScrollButtonPlacement(); + recalculateScrollBar(); +} + + +//! Get the height of the tabs +s32 CGUITabControl::getTabHeight() const +{ + return TabHeight; +} + +//! set the maximal width of a tab. Per default width is 0 which means "no width restriction". +void CGUITabControl::setTabMaxWidth(s32 width ) +{ + TabMaxWidth = width; +} + +//! get the maximal width of a tab +s32 CGUITabControl::getTabMaxWidth() const +{ + return TabMaxWidth; +} + + +//! Set the extra width added to tabs on each side of the text +void CGUITabControl::setTabExtraWidth( s32 extraWidth ) +{ + if ( extraWidth < 0 ) + extraWidth = 0; + + TabExtraWidth = extraWidth; + + recalculateScrollBar(); +} + + +//! Get the extra width added to tabs on each side of the text +s32 CGUITabControl::getTabExtraWidth() const +{ + return TabExtraWidth; +} + + +void CGUITabControl::recalculateScrollBar() +{ + if (!UpButton || !DownButton) + return; + + ScrollControl = needScrollControl() || CurrentScrollTabIndex > 0; + + if (ScrollControl) + { + UpButton->setVisible( true ); + DownButton->setVisible( true ); + } + else + { + UpButton->setVisible( false ); + DownButton->setVisible( false ); + } + + bringToFront( UpButton ); + bringToFront( DownButton ); +} + +//! Set the alignment of the tabs +void CGUITabControl::setTabVerticalAlignment( EGUI_ALIGNMENT alignment ) +{ + VerticalAlignment = alignment; + + recalculateScrollButtonPlacement(); + recalculateScrollBar(); + + core::rect<s32> r(calcTabPos()); + for ( u32 i=0; i<Tabs.size(); ++i ) + { + Tabs[i]->setRelativePosition(r); + } +} + +void CGUITabControl::recalculateScrollButtonPlacement() +{ + IGUISkin* skin = Environment->getSkin(); + s32 ButtonSize = 16; + s32 ButtonHeight = TabHeight - 2; + if ( ButtonHeight < 0 ) + ButtonHeight = TabHeight; + if (skin) + { + ButtonSize = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + if (ButtonSize > TabHeight) + ButtonSize = TabHeight; + } + + s32 ButtonX = RelativeRect.getWidth() - (s32)(2.5f*(f32)ButtonSize) - 1; + s32 ButtonY = 0; + + if (VerticalAlignment == EGUIA_UPPERLEFT) + { + ButtonY = 2 + (TabHeight / 2) - (ButtonHeight / 2); + UpButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + DownButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + } + else + { + ButtonY = RelativeRect.getHeight() - (TabHeight / 2) - (ButtonHeight / 2) - 2; + UpButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); + DownButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); + } + + UpButton->setRelativePosition(core::rect<s32>(ButtonX, ButtonY, ButtonX+ButtonSize, ButtonY+ButtonHeight)); + ButtonX += ButtonSize + 1; + DownButton->setRelativePosition(core::rect<s32>(ButtonX, ButtonY, ButtonX+ButtonSize, ButtonY+ButtonHeight)); +} + +//! Get the alignment of the tabs +EGUI_ALIGNMENT CGUITabControl::getTabVerticalAlignment() const +{ + return VerticalAlignment; +} + + +s32 CGUITabControl::getTabAt(s32 xpos, s32 ypos) const +{ + core::position2di p(xpos, ypos); + IGUISkin* skin = Environment->getSkin(); + IGUIFont* font = skin->getFont(); + + core::rect<s32> frameRect(AbsoluteRect); + + if ( VerticalAlignment == EGUIA_UPPERLEFT ) + { + frameRect.UpperLeftCorner.Y += 2; + frameRect.LowerRightCorner.Y = frameRect.UpperLeftCorner.Y + TabHeight; + } + else + { + frameRect.UpperLeftCorner.Y = frameRect.LowerRightCorner.Y - TabHeight; + } + + s32 pos = frameRect.UpperLeftCorner.X + 2; + + if (!frameRect.isPointInside(p)) + return -1; + + for (s32 i=CurrentScrollTabIndex; i<(s32)Tabs.size(); ++i) + { + // get Text + const wchar_t* text = 0; + if (Tabs[i]) + text = Tabs[i]->getText(); + + // get text length + s32 len = calcTabWidth(pos, font, text, true); + if ( ScrollControl && pos+len > UpButton->getAbsolutePosition().UpperLeftCorner.X - 2 ) + return -1; + + frameRect.UpperLeftCorner.X = pos; + frameRect.LowerRightCorner.X = frameRect.UpperLeftCorner.X + len; + + pos += len; + + if (frameRect.isPointInside(p)) + { + return i; + } + } + return -1; +} + +//! Returns which tab is currently active +s32 CGUITabControl::getActiveTab() const +{ + return ActiveTab; +} + + +//! Brings a tab to front. +bool CGUITabControl::setActiveTab(s32 idx) +{ + if ((u32)idx >= Tabs.size()) + return false; + + bool changed = (ActiveTab != idx); + + ActiveTab = idx; + + for (s32 i=0; i<(s32)Tabs.size(); ++i) + if (Tabs[i]) + Tabs[i]->setVisible( i == ActiveTab ); + + if (changed) + { + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_TAB_CHANGED; + Parent->OnEvent(event); + } + + return true; +} + + +bool CGUITabControl::setActiveTab(IGUITab *tab) +{ + for (s32 i=0; i<(s32)Tabs.size(); ++i) + if (Tabs[i] == tab) + return setActiveTab(i); + return false; +} + + +//! Removes a child. +void CGUITabControl::removeChild(IGUIElement* child) +{ + bool isTab = false; + + u32 i=0; + // check if it is a tab + while (i<Tabs.size()) + { + if (Tabs[i] == child) + { + Tabs[i]->drop(); + Tabs.erase(i); + isTab = true; + } + else + ++i; + } + + // reassign numbers + if (isTab) + { + for (i=0; i<Tabs.size(); ++i) + if (Tabs[i]) + Tabs[i]->setNumber(i); + } + + // remove real element + IGUIElement::removeChild(child); + + recalculateScrollBar(); +} + + +//! Update the position of the element, decides scroll button status +void CGUITabControl::updateAbsolutePosition() +{ + IGUIElement::updateAbsolutePosition(); + recalculateScrollBar(); +} + + +//! Writes attributes of the element. +void CGUITabControl::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUITabControl::serializeAttributes(out,options); + + out->addInt ("ActiveTab", ActiveTab); + out->addBool("Border", Border); + out->addBool("FillBackground", FillBackground); + out->addInt ("TabHeight", TabHeight); + out->addInt ("TabMaxWidth", TabMaxWidth); + out->addEnum("TabVerticalAlignment", s32(VerticalAlignment), GUIAlignmentNames); +} + + +//! Reads attributes of the element +void CGUITabControl::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ + Border = in->getAttributeAsBool("Border"); + FillBackground = in->getAttributeAsBool("FillBackground"); + + ActiveTab = -1; + + setTabHeight(in->getAttributeAsInt("TabHeight")); + TabMaxWidth = in->getAttributeAsInt("TabMaxWidth"); + + IGUITabControl::deserializeAttributes(in,options); + + setActiveTab(in->getAttributeAsInt("ActiveTab")); + setTabVerticalAlignment( static_cast<EGUI_ALIGNMENT>(in->getAttributeAsEnumeration("TabVerticalAlignment" , GUIAlignmentNames)) ); +} + + +} // end namespace irr +} // end namespace gui + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.d new file mode 100644 index 0000000..c29cc2c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.d @@ -0,0 +1,2 @@ +CGUITabControl.o: CGUITabControl.cpp CGUITabControl.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.h new file mode 100644 index 0000000..dd6c5ae --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITabControl.h @@ -0,0 +1,202 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_TAB_CONTROL_H_INCLUDED__ +#define __C_GUI_TAB_CONTROL_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUITabControl.h" +#include "irrArray.h" +#include "IGUISkin.h" + +namespace irr +{ +namespace gui +{ + class CGUITabControl; + class IGUIButton; + + // A tab, onto which other gui elements could be added. + class CGUITab : public IGUITab + { + public: + + //! constructor + CGUITab(s32 number, IGUIEnvironment* environment, + IGUIElement* parent, const core::rect<s32>& rectangle, + s32 id); + + //! destructor + //virtual ~CGUITab(); + + //! Returns number of this tab in tabcontrol. Can be accessed + //! later IGUITabControl::getTab() by this number. + virtual s32 getNumber() const; + + //! Sets the number + virtual void setNumber(s32 n); + + //! draws the element and its children + virtual void draw(); + + //! sets if the tab should draw its background + virtual void setDrawBackground(bool draw=true); + + //! sets the color of the background, if it should be drawn. + virtual void setBackgroundColor(video::SColor c); + + //! sets the color of the text + virtual void setTextColor(video::SColor c); + + //! returns true if the tab is drawing its background, false if not + virtual bool isDrawingBackground() const; + + //! returns the color of the background + virtual video::SColor getBackgroundColor() const; + + virtual video::SColor getTextColor() const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + //! only for internal use by CGUITabControl + void refreshSkinColors(); + + private: + + s32 Number; + video::SColor BackColor; + bool OverrideTextColorEnabled; + video::SColor TextColor; + bool DrawBackground; + }; + + + //! A standard tab control + class CGUITabControl : public IGUITabControl + { + public: + + //! destructor + CGUITabControl(IGUIEnvironment* environment, + IGUIElement* parent, const core::rect<s32>& rectangle, + bool fillbackground=true, bool border=true, s32 id=-1); + + //! destructor + virtual ~CGUITabControl(); + + //! Adds a tab + virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1); + + //! Adds a tab that has already been created + virtual void addTab(CGUITab* tab); + + //! Insert the tab at the given index + virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1); + + //! Removes a tab from the tabcontrol + virtual void removeTab(s32 idx); + + //! Clears the tabcontrol removing all tabs + virtual void clear(); + + //! Returns amount of tabs in the tabcontrol + virtual s32 getTabCount() const; + + //! Returns a tab based on zero based index + virtual IGUITab* getTab(s32 idx) const; + + //! Brings a tab to front. + virtual bool setActiveTab(s32 idx); + + //! Brings a tab to front. + virtual bool setActiveTab(IGUITab *tab); + + //! Returns which tab is currently active + virtual s32 getActiveTab() const; + + //! get the the id of the tab at the given absolute coordinates + virtual s32 getTabAt(s32 xpos, s32 ypos) const; + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! Removes a child. + virtual void removeChild(IGUIElement* child); + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + //! Set the height of the tabs + virtual void setTabHeight( s32 height ); + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + //! Get the height of the tabs + virtual s32 getTabHeight() const; + + //! set the maximal width of a tab. Per default width is 0 which means "no width restriction". + virtual void setTabMaxWidth(s32 width ); + + //! get the maximal width of a tab + virtual s32 getTabMaxWidth() const; + + //! Set the alignment of the tabs + //! note: EGUIA_CENTER is not an option + virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ); + + //! Get the alignment of the tabs + virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const; + + //! Set the extra width added to tabs on each side of the text + virtual void setTabExtraWidth( s32 extraWidth ); + + //! Get the extra width added to tabs on each side of the text + virtual s32 getTabExtraWidth() const; + + //! Update the position of the element, decides scroll button status + virtual void updateAbsolutePosition(); + + private: + + void scrollLeft(); + void scrollRight(); + bool needScrollControl( s32 startIndex=0, bool withScrollControl=false ); + s32 calcTabWidth(s32 pos, IGUIFont* font, const wchar_t* text, bool withScrollControl ) const; + core::rect<s32> calcTabPos(); + + void recalculateScrollButtonPlacement(); + void recalculateScrollBar(); + void refreshSprites(); + + core::array<CGUITab*> Tabs; // CGUITab* because we need setNumber (which is certainly not nice) + s32 ActiveTab; + bool Border; + bool FillBackground; + bool ScrollControl; + s32 TabHeight; + gui::EGUI_ALIGNMENT VerticalAlignment; + IGUIButton* UpButton; + IGUIButton* DownButton; + s32 TabMaxWidth; + s32 CurrentScrollTabIndex; + s32 TabExtraWidth; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.cpp new file mode 100644 index 0000000..a045aac --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.cpp @@ -0,0 +1,1256 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// 07.10.2005 - Multicolor-Listbox added by A. Buschhueter (Acki) +// A_Buschhueter@gmx.de + +#include "CGUITable.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "CGUIScrollBar.h" +#include "os.h" + +#define ARROW_PAD 15 + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUITable::CGUITable(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, const core::rect<s32>& rectangle, bool clip, + bool drawBack, bool moveOverSelect) +: IGUITable(environment, parent, id, rectangle), Font(0), + VerticalScrollBar(0), HorizontalScrollBar(0), + Clip(clip), DrawBack(drawBack), MoveOverSelect(moveOverSelect), + Selecting(false), CurrentResizedColumn(-1), ResizeStart(0), ResizableColumns(true), + ItemHeight(0), TotalItemHeight(0), TotalItemWidth(0), Selected(-1), + CellHeightPadding(2), CellWidthPadding(5), ActiveTab(-1), + CurrentOrdering(EGOM_NONE), DrawFlags(EGTDF_ROWS | EGTDF_COLUMNS | EGTDF_ACTIVE_ROW ) +{ + #ifdef _DEBUG + setDebugName("CGUITable"); + #endif + + VerticalScrollBar = Environment->addScrollBar(false, core::rect<s32>(0, 0, 100, 100), this, -1); + if (VerticalScrollBar) + { + VerticalScrollBar->grab(); + VerticalScrollBar->setNotClipped(false); + VerticalScrollBar->setSubElement(true); + } + + HorizontalScrollBar = Environment->addScrollBar(true, core::rect<s32>(0, 0, 100, 100), this, -1); + if ( HorizontalScrollBar ) + { + HorizontalScrollBar->grab(); + HorizontalScrollBar->setNotClipped(false); + HorizontalScrollBar->setSubElement(true); + } + + refreshControls(); +} + + +//! destructor +CGUITable::~CGUITable() +{ + if (VerticalScrollBar) + VerticalScrollBar->drop(); + if ( HorizontalScrollBar ) + HorizontalScrollBar->drop(); + + if (Font) + Font->drop(); +} + + +void CGUITable::addColumn(const wchar_t* caption, s32 columnIndex) +{ + Column tabHeader; + tabHeader.Name = caption; + tabHeader.Width = Font->getDimension(caption).Width + (CellWidthPadding * 2) + ARROW_PAD; + tabHeader.OrderingMode = EGCO_NONE; + + if ( columnIndex < 0 || columnIndex >= (s32)Columns.size() ) + { + Columns.push_back(tabHeader); + for ( u32 i=0; i < Rows.size(); ++i ) + { + Cell cell; + Rows[i].Items.push_back(cell); + } + } + else + { + Columns.insert(tabHeader, columnIndex); + for ( u32 i=0; i < Rows.size(); ++i ) + { + Cell cell; + Rows[i].Items.insert(cell, columnIndex); + } + } + + if (ActiveTab == -1) + ActiveTab = 0; + + recalculateWidths(); +} + + +//! remove a column from the table +void CGUITable::removeColumn(u32 columnIndex) +{ + if ( columnIndex < Columns.size() ) + { + Columns.erase(columnIndex); + for ( u32 i=0; i < Rows.size(); ++i ) + { + Rows[i].Items.erase(columnIndex); + } + } + if ( (s32)columnIndex <= ActiveTab ) + ActiveTab = Columns.size() ? 0 : -1; + + recalculateWidths(); +} + + +s32 CGUITable::getColumnCount() const +{ + return Columns.size(); +} + + +s32 CGUITable::getRowCount() const +{ + return Rows.size(); +} + + +bool CGUITable::setActiveColumn(s32 idx, bool doOrder ) +{ + if (idx < 0 || idx >= (s32)Columns.size()) + return false; + + bool changed = (ActiveTab != idx); + + ActiveTab = idx; + if ( ActiveTab < 0 ) + return false; + + if ( doOrder ) + { + switch ( Columns[idx].OrderingMode ) + { + case EGCO_NONE: + CurrentOrdering = EGOM_NONE; + break; + + case EGCO_CUSTOM: + CurrentOrdering = EGOM_NONE; + if (Parent) + { + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_TABLE_HEADER_CHANGED; + Parent->OnEvent(event); + } + + break; + + case EGCO_ASCENDING: + CurrentOrdering = EGOM_ASCENDING; + break; + + case EGCO_DESCENDING: + CurrentOrdering = EGOM_DESCENDING; + break; + + case EGCO_FLIP_ASCENDING_DESCENDING: + CurrentOrdering = EGOM_ASCENDING == CurrentOrdering ? EGOM_DESCENDING : EGOM_ASCENDING; + break; + default: + CurrentOrdering = EGOM_NONE; + } + + orderRows(getActiveColumn(), CurrentOrdering); + } + + if (changed) + { + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_TABLE_HEADER_CHANGED; + Parent->OnEvent(event); + } + + return true; +} + + +s32 CGUITable::getActiveColumn() const +{ + return ActiveTab; +} + + +EGUI_ORDERING_MODE CGUITable::getActiveColumnOrdering() const +{ + return CurrentOrdering; +} + + +void CGUITable::setColumnWidth(u32 columnIndex, u32 width) +{ + if ( columnIndex < Columns.size() ) + { + const u32 MIN_WIDTH = Font->getDimension(Columns[columnIndex].Name.c_str() ).Width + (CellWidthPadding * 2); + if ( width < MIN_WIDTH ) + width = MIN_WIDTH; + + Columns[columnIndex].Width = width; + + for ( u32 i=0; i < Rows.size(); ++i ) + { + breakText( Rows[i].Items[columnIndex].Text, Rows[i].Items[columnIndex].BrokenText, Columns[columnIndex].Width ); + } + } + recalculateWidths(); +} + +//! Get the width of a column +u32 CGUITable::getColumnWidth(u32 columnIndex) const +{ + if ( columnIndex >= Columns.size() ) + return 0; + + return Columns[columnIndex].Width; +} + +void CGUITable::setResizableColumns(bool resizable) +{ + ResizableColumns = resizable; +} + + +bool CGUITable::hasResizableColumns() const +{ + return ResizableColumns; +} + + +u32 CGUITable::addRow(u32 rowIndex) +{ + if ( rowIndex > Rows.size() ) + { + rowIndex = Rows.size(); + } + + Row row; + + if ( rowIndex == Rows.size() ) + Rows.push_back(row); + else + Rows.insert(row, rowIndex); + + Rows[rowIndex].Items.reallocate(Columns.size()); + for ( u32 i = 0 ; i < Columns.size() ; ++i ) + { + Rows[rowIndex].Items.push_back(Cell()); + } + + recalculateHeights(); + return rowIndex; +} + + +void CGUITable::removeRow(u32 rowIndex) +{ + if ( rowIndex > Rows.size() ) + return; + + Rows.erase( rowIndex ); + + if ( !(Selected < s32(Rows.size())) ) + Selected = Rows.size() - 1; + + recalculateHeights(); +} + + +//! adds an list item, returns id of item +void CGUITable::setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) +{ + if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) + { + Rows[rowIndex].Items[columnIndex].Text = text; + breakText( Rows[rowIndex].Items[columnIndex].Text, Rows[rowIndex].Items[columnIndex].BrokenText, Columns[columnIndex].Width ); + + IGUISkin* skin = Environment->getSkin(); + if ( skin ) + Rows[rowIndex].Items[columnIndex].Color = skin->getColor(EGDC_BUTTON_TEXT); + } +} + +void CGUITable::setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) +{ + if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) + { + Rows[rowIndex].Items[columnIndex].Text = text; + breakText( Rows[rowIndex].Items[columnIndex].Text, Rows[rowIndex].Items[columnIndex].BrokenText, Columns[columnIndex].Width ); + Rows[rowIndex].Items[columnIndex].Color = color; + Rows[rowIndex].Items[columnIndex].IsOverrideColor = true; + } +} + + +void CGUITable::setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) +{ + if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) + { + Rows[rowIndex].Items[columnIndex].Color = color; + Rows[rowIndex].Items[columnIndex].IsOverrideColor = true; + } +} + + +void CGUITable::setCellData(u32 rowIndex, u32 columnIndex, void *data) +{ + if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) + { + Rows[rowIndex].Items[columnIndex].Data = data; + } +} + + +const wchar_t* CGUITable::getCellText(u32 rowIndex, u32 columnIndex ) const +{ + if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) + { + return Rows[rowIndex].Items[columnIndex].Text.c_str(); + } + + return 0; +} + + +void* CGUITable::getCellData(u32 rowIndex, u32 columnIndex ) const +{ + if ( rowIndex < Rows.size() && columnIndex < Columns.size() ) + { + return Rows[rowIndex].Items[columnIndex].Data; + } + + return 0; +} + + +//! clears the list +void CGUITable::clear() +{ + Selected = -1; + Rows.clear(); + Columns.clear(); + + if (VerticalScrollBar) + VerticalScrollBar->setPos(0); + if ( HorizontalScrollBar ) + HorizontalScrollBar->setPos(0); + + recalculateHeights(); + recalculateWidths(); +} + + +void CGUITable::clearRows() +{ + Selected = -1; + Rows.clear(); + + if (VerticalScrollBar) + VerticalScrollBar->setPos(0); + + recalculateHeights(); +} + + +/*! +*/ +s32 CGUITable::getSelected() const +{ + return Selected; +} + +//! set wich row is currently selected +void CGUITable::setSelected( s32 index ) +{ + Selected = -1; + if ( index >= 0 && index < (s32) Rows.size() ) + Selected = index; +} + + +void CGUITable::recalculateWidths() +{ + TotalItemWidth=0; + for ( u32 i=0; i < Columns.size(); ++i ) + { + TotalItemWidth += Columns[i].Width; + } + checkScrollbars(); +} + + +void CGUITable::recalculateHeights() +{ + TotalItemHeight = 0; + IGUISkin* skin = Environment->getSkin(); + if (Font != skin->getFont()) + { + if (Font) + Font->drop(); + + Font = skin->getFont(); + + ItemHeight = 0; + + if(Font) + { + ItemHeight = Font->getDimension(L"A").Height + (CellHeightPadding * 2); + Font->grab(); + } + } + TotalItemHeight = ItemHeight * Rows.size(); // header is not counted, because we only want items + checkScrollbars(); +} + + +// automatic enabled/disabling and resizing of scrollbars +void CGUITable::checkScrollbars() +{ + IGUISkin* skin = Environment->getSkin(); + if ( !HorizontalScrollBar || !VerticalScrollBar || !skin) + return; + + s32 scrollBarSize = skin->getSize(EGDS_SCROLLBAR_SIZE); + bool wasHorizontalScrollBarVisible = HorizontalScrollBar->isVisible(); + bool wasVerticalScrollBarVisible = VerticalScrollBar->isVisible(); + HorizontalScrollBar->setVisible(false); + VerticalScrollBar->setVisible(false); + + // CAREFUL: near identical calculations for tableRect and clientClip are also done in draw + // area of table used for drawing without scrollbars + core::rect<s32> tableRect(AbsoluteRect); + tableRect.UpperLeftCorner.X += 1; + tableRect.UpperLeftCorner.Y += 1; + s32 headerBottom = tableRect.UpperLeftCorner.Y + ItemHeight; + + // area of for the items (without header and without scrollbars) + core::rect<s32> clientClip(tableRect); + clientClip.UpperLeftCorner.Y = headerBottom + 1; + + // needs horizontal scroll be visible? + if( TotalItemWidth > clientClip.getWidth() ) + { + clientClip.LowerRightCorner.Y -= scrollBarSize; + HorizontalScrollBar->setVisible(true); + HorizontalScrollBar->setMax(core::max_(0,TotalItemWidth - clientClip.getWidth())); + } + + // needs vertical scroll be visible? + if( TotalItemHeight > clientClip.getHeight() ) + { + clientClip.LowerRightCorner.X -= scrollBarSize; + VerticalScrollBar->setVisible(true); + VerticalScrollBar->setMax(core::max_(0,TotalItemHeight - clientClip.getHeight())); + + // check horizontal again because we have now smaller clientClip + if ( !HorizontalScrollBar->isVisible() ) + { + if( TotalItemWidth > clientClip.getWidth() ) + { + clientClip.LowerRightCorner.Y -= scrollBarSize; + HorizontalScrollBar->setVisible(true); + HorizontalScrollBar->setMax(core::max_(0,TotalItemWidth - clientClip.getWidth())); + } + } + } + + // find the correct size for the vertical scrollbar + if ( VerticalScrollBar->isVisible() ) + { + if (!wasVerticalScrollBarVisible ) + VerticalScrollBar->setPos(0); + + if ( HorizontalScrollBar->isVisible() ) + { + VerticalScrollBar->setRelativePosition( + core::rect<s32>(RelativeRect.getWidth() - scrollBarSize, 1, + RelativeRect.getWidth()-1, RelativeRect.getHeight()-(1+scrollBarSize) ) ); + } + else + { + VerticalScrollBar->setRelativePosition( + core::rect<s32>(RelativeRect.getWidth() - scrollBarSize, 1, + RelativeRect.getWidth()-1, RelativeRect.getHeight()-1) ); + } + } + + // find the correct size for the horizontal scrollbar + if ( HorizontalScrollBar->isVisible() ) + { + if ( !wasHorizontalScrollBarVisible ) + HorizontalScrollBar->setPos(0); + + if ( VerticalScrollBar->isVisible() ) + { + HorizontalScrollBar->setRelativePosition( core::rect<s32>(1, RelativeRect.getHeight() - scrollBarSize, RelativeRect.getWidth()-(1+scrollBarSize), RelativeRect.getHeight()-1) ); + } + else + { + HorizontalScrollBar->setRelativePosition( core::rect<s32>(1, RelativeRect.getHeight() - scrollBarSize, RelativeRect.getWidth()-1, RelativeRect.getHeight()-1) ); + } + } +} + + +void CGUITable::refreshControls() +{ + updateAbsolutePosition(); + + if ( VerticalScrollBar ) + VerticalScrollBar->setVisible(false); + + if ( HorizontalScrollBar ) + HorizontalScrollBar->setVisible(false); + + recalculateHeights(); + recalculateWidths(); +} + + +//! called if an event happened. +bool CGUITable::OnEvent(const SEvent &event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case gui::EGET_SCROLL_BAR_CHANGED: + if (event.GUIEvent.Caller == VerticalScrollBar) + { + // current position will get read out in draw + return true; + } + if (event.GUIEvent.Caller == HorizontalScrollBar) + { + // current position will get read out in draw + return true; + } + break; + case gui::EGET_ELEMENT_FOCUS_LOST: + { + CurrentResizedColumn = -1; + Selecting = false; + } + break; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + { + if ( !isEnabled() ) + return false; + + core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y); + + switch(event.MouseInput.Event) + { + case EMIE_MOUSE_WHEEL: + VerticalScrollBar->setPos(VerticalScrollBar->getPos() + (event.MouseInput.Wheel < 0 ? -1 : 1)*-10); + return true; + + case EMIE_LMOUSE_PRESSED_DOWN: + + if (Environment->hasFocus(this) && + VerticalScrollBar->isVisible() && + VerticalScrollBar->getAbsolutePosition().isPointInside(p) && + VerticalScrollBar->OnEvent(event)) + return true; + + if (Environment->hasFocus(this) && + HorizontalScrollBar->isVisible() && + HorizontalScrollBar->getAbsolutePosition().isPointInside(p) && + HorizontalScrollBar->OnEvent(event)) + return true; + + if ( dragColumnStart( event.MouseInput.X, event.MouseInput.Y ) ) + { + Environment->setFocus(this); + return true; + } + + if ( selectColumnHeader( event.MouseInput.X, event.MouseInput.Y ) ) + return true; + + Selecting = true; + Environment->setFocus(this); + return true; + + case EMIE_LMOUSE_LEFT_UP: + + CurrentResizedColumn = -1; + Selecting = false; + if (!getAbsolutePosition().isPointInside(p)) + { + Environment->removeFocus(this); + } + + if (Environment->hasFocus(this) && + VerticalScrollBar->isVisible() && + VerticalScrollBar->getAbsolutePosition().isPointInside(p) && + VerticalScrollBar->OnEvent(event)) + { + return true; + } + + if (Environment->hasFocus(this) && + HorizontalScrollBar->isVisible() && + HorizontalScrollBar->getAbsolutePosition().isPointInside(p) && + HorizontalScrollBar->OnEvent(event)) + { + return true; + } + + selectNew(event.MouseInput.Y); + return true; + + case EMIE_MOUSE_MOVED: + if ( CurrentResizedColumn >= 0 ) + { + if ( dragColumnUpdate(event.MouseInput.X) ) + { + return true; + } + } + if (Selecting || MoveOverSelect) + { + if (getAbsolutePosition().isPointInside(p)) + { + selectNew(event.MouseInput.Y); + return true; + } + } + break; + default: + break; + } + } + break; + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +void CGUITable::setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) +{ + if ( columnIndex < Columns.size() ) + Columns[columnIndex].OrderingMode = mode; +} + + +void CGUITable::swapRows(u32 rowIndexA, u32 rowIndexB) +{ + if ( rowIndexA >= Rows.size() ) + return; + + if ( rowIndexB >= Rows.size() ) + return; + + Row swap = Rows[rowIndexA]; + Rows[rowIndexA] = Rows[rowIndexB]; + Rows[rowIndexB] = swap; + + if ( Selected == s32(rowIndexA) ) + Selected = rowIndexB; + else if( Selected == s32(rowIndexB) ) + Selected = rowIndexA; + +} + + +bool CGUITable::dragColumnStart(s32 xpos, s32 ypos) +{ + if ( !ResizableColumns ) + return false; + + if ( ypos > ( AbsoluteRect.UpperLeftCorner.Y + ItemHeight ) ) + return false; + + const s32 CLICK_AREA = 12; // to left and right of line which can be dragged + s32 pos = AbsoluteRect.UpperLeftCorner.X+1; + + if ( HorizontalScrollBar && HorizontalScrollBar->isVisible() ) + pos -= HorizontalScrollBar->getPos(); + + pos += TotalItemWidth; + + // have to search from the right as otherwise lines could no longer be resized when a column width is 0 + for ( s32 i = (s32)Columns.size()-1; i >= 0 ; --i ) + { + u32 colWidth = Columns[i].Width; + + if ( xpos >= (pos - CLICK_AREA) && xpos < ( pos + CLICK_AREA ) ) + { + CurrentResizedColumn = i; + ResizeStart = xpos; + return true; + } + + pos -= colWidth; + } + + return false; +} + + +bool CGUITable::dragColumnUpdate(s32 xpos) +{ + if ( !ResizableColumns || CurrentResizedColumn < 0 || CurrentResizedColumn >= s32(Columns.size()) ) + { + CurrentResizedColumn = -1; + return false; + } + + s32 width = s32(Columns[CurrentResizedColumn].Width) + (xpos-ResizeStart); + if ( width < 0 ) + width = 0; + setColumnWidth(CurrentResizedColumn, u32(width)); + ResizeStart = xpos; + + return false; +} + + +bool CGUITable::selectColumnHeader(s32 xpos, s32 ypos) +{ + if ( ypos > ( AbsoluteRect.UpperLeftCorner.Y + ItemHeight ) ) + return false; + + s32 pos = AbsoluteRect.UpperLeftCorner.X+1; + + if ( HorizontalScrollBar && HorizontalScrollBar->isVisible() ) + pos -= HorizontalScrollBar->getPos(); + + for ( u32 i = 0 ; i < Columns.size() ; ++i ) + { + u32 colWidth = Columns[i].Width; + + if ( xpos >= pos && xpos < ( pos + s32(colWidth) ) ) + { + setActiveColumn( i, true ); + + return true; + } + + pos += colWidth; + } + + return false; +} + + +void CGUITable::orderRows(s32 columnIndex, EGUI_ORDERING_MODE mode) +{ + Row swap; + + if ( columnIndex == -1 ) + columnIndex = getActiveColumn(); + if ( columnIndex < 0 ) + return; + + if ( mode == EGOM_ASCENDING ) + { + for ( s32 i = 0 ; i < s32(Rows.size()) - 1 ; ++i ) + { + for ( s32 j = 0 ; j < s32(Rows.size()) - i - 1 ; ++j ) + { + if ( Rows[j+1].Items[columnIndex].Text < Rows[j].Items[columnIndex].Text ) + { + swap = Rows[j]; + Rows[j] = Rows[j+1]; + Rows[j+1] = swap; + + if ( Selected == j ) + Selected = j+1; + else if( Selected == j+1 ) + Selected = j; + } + } + } + } + else if ( mode == EGOM_DESCENDING ) + { + for ( s32 i = 0 ; i < s32(Rows.size()) - 1 ; ++i ) + { + for ( s32 j = 0 ; j < s32(Rows.size()) - i - 1 ; ++j ) + { + if ( Rows[j].Items[columnIndex].Text < Rows[j+1].Items[columnIndex].Text) + { + swap = Rows[j]; + Rows[j] = Rows[j+1]; + Rows[j+1] = swap; + + if ( Selected == j ) + Selected = j+1; + else if( Selected == j+1 ) + Selected = j; + } + } + } + } +} + + +void CGUITable::selectNew(s32 ypos, bool onlyHover) +{ + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + s32 oldSelected = Selected; + + if ( ypos < ( AbsoluteRect.UpperLeftCorner.Y + ItemHeight ) ) + return; + + // find new selected item. + if (ItemHeight!=0) + Selected = ((ypos - AbsoluteRect.UpperLeftCorner.Y - ItemHeight - 1) + VerticalScrollBar->getPos()) / ItemHeight; + + if (Selected >= (s32)Rows.size()) + Selected = Rows.size() - 1; + else if (Selected<0) + Selected = 0; + + // post the news + if (Parent && !onlyHover) + { + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = (Selected != oldSelected) ? EGET_TABLE_CHANGED : EGET_TABLE_SELECTED_AGAIN; + Parent->OnEvent(event); + } +} + + +//! draws the element and its children +void CGUITable::draw() +{ + if (!IsVisible) + return; + + irr::video::IVideoDriver* driver = Environment->getVideoDriver(); + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + IGUIFont* font = skin->getFont(); + if (!font) + return; + + // CAREFUL: near identical calculations for tableRect and clientClip are also done in checkScrollbars and selectColumnHeader + // Area of table used for drawing without scrollbars + core::rect<s32> tableRect(AbsoluteRect); + tableRect.UpperLeftCorner.X += 1; + tableRect.UpperLeftCorner.Y += 1; + if ( VerticalScrollBar && VerticalScrollBar->isVisible() ) + tableRect.LowerRightCorner.X -= skin->getSize(EGDS_SCROLLBAR_SIZE); + if ( HorizontalScrollBar && HorizontalScrollBar->isVisible() ) + tableRect.LowerRightCorner.Y -= skin->getSize(EGDS_SCROLLBAR_SIZE); + + s32 headerBottom = tableRect.UpperLeftCorner.Y + ItemHeight; + + // area of for the items (without header and without scrollbars) + core::rect<s32> clientClip(tableRect); + clientClip.UpperLeftCorner.Y = headerBottom + 1; + clientClip.clipAgainst(AbsoluteClippingRect); + + // draw background for whole element + skin->draw3DSunkenPane(this, skin->getColor(EGDC_3D_HIGH_LIGHT), true, DrawBack, AbsoluteRect, &AbsoluteClippingRect); + + // scrolledTableClient is the area where the table items would be if it could be drawn completely + core::rect<s32> scrolledTableClient(tableRect); + scrolledTableClient.UpperLeftCorner.Y = headerBottom + 1; + scrolledTableClient.LowerRightCorner.Y = scrolledTableClient.UpperLeftCorner.Y + TotalItemHeight; + scrolledTableClient.LowerRightCorner.X = scrolledTableClient.UpperLeftCorner.X + TotalItemWidth; + if ( VerticalScrollBar && VerticalScrollBar->isVisible() ) + { + scrolledTableClient.UpperLeftCorner.Y -= VerticalScrollBar->getPos(); + scrolledTableClient.LowerRightCorner.Y -= VerticalScrollBar->getPos(); + } + if ( HorizontalScrollBar && HorizontalScrollBar->isVisible() ) + { + scrolledTableClient.UpperLeftCorner.X -= HorizontalScrollBar->getPos(); + scrolledTableClient.LowerRightCorner.X -= HorizontalScrollBar->getPos(); + } + + // rowRect is around the scrolled row + core::rect<s32> rowRect(scrolledTableClient); + rowRect.LowerRightCorner.Y = rowRect.UpperLeftCorner.Y + ItemHeight; + + u32 pos; + for ( u32 i = 0 ; i < Rows.size() ; ++i ) + { + if (rowRect.LowerRightCorner.Y >= AbsoluteRect.UpperLeftCorner.Y && + rowRect.UpperLeftCorner.Y <= AbsoluteRect.LowerRightCorner.Y) + { + // draw row seperator + if ( DrawFlags & EGTDF_ROWS ) + { + core::rect<s32> lineRect(rowRect); + lineRect.UpperLeftCorner.Y = lineRect.LowerRightCorner.Y - 1; + driver->draw2DRectangle(skin->getColor(EGDC_3D_SHADOW), lineRect, &clientClip); + } + + core::rect<s32> textRect(rowRect); + pos = rowRect.UpperLeftCorner.X; + + // draw selected row background highlighted + if ((s32)i == Selected && DrawFlags & EGTDF_ACTIVE_ROW ) + driver->draw2DRectangle(skin->getColor(EGDC_HIGH_LIGHT), rowRect, &clientClip); + + for ( u32 j = 0 ; j < Columns.size() ; ++j ) + { + textRect.UpperLeftCorner.X = pos + CellWidthPadding; + textRect.LowerRightCorner.X = pos + Columns[j].Width - CellWidthPadding; + + // draw item text + if ((s32)i == Selected) + { + font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, skin->getColor(isEnabled() ? EGDC_HIGH_LIGHT_TEXT : EGDC_GRAY_TEXT), false, true, &clientClip); + } + else + { + if ( !Rows[i].Items[j].IsOverrideColor ) // skin-colors can change + Rows[i].Items[j].Color = skin->getColor(EGDC_BUTTON_TEXT); + font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, isEnabled() ? Rows[i].Items[j].Color : skin->getColor(EGDC_GRAY_TEXT), false, true, &clientClip); + } + + pos += Columns[j].Width; + } + } + + rowRect.UpperLeftCorner.Y += ItemHeight; + rowRect.LowerRightCorner.Y += ItemHeight; + } + + core::rect<s32> columnSeparator(clientClip); + pos = scrolledTableClient.UpperLeftCorner.X; + + core::rect<s32> tableClip(tableRect); + tableClip.clipAgainst(AbsoluteClippingRect); + + for (u32 i = 0 ; i < Columns.size() ; ++i ) + { + const wchar_t* text = Columns[i].Name.c_str(); + u32 colWidth = Columns[i].Width; + + //core::dimension2d<s32 > dim = font->getDimension(text); + + core::rect<s32> columnrect(pos, tableRect.UpperLeftCorner.Y, pos + colWidth, headerBottom); + + // draw column background + skin->draw3DButtonPaneStandard(this, columnrect, &tableClip); + + // draw column seperator + if ( DrawFlags & EGTDF_COLUMNS ) + { + columnSeparator.UpperLeftCorner.X = pos; + columnSeparator.LowerRightCorner.X = pos + 1; + driver->draw2DRectangle(skin->getColor(EGDC_3D_SHADOW), columnSeparator, &tableClip); + } + + // draw header column text + columnrect.UpperLeftCorner.X += CellWidthPadding; + font->draw(text, columnrect, skin->getColor( isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), false, true, &tableClip); + + // draw icon for active column tab + if ( (s32)i == ActiveTab ) + { + if ( CurrentOrdering == EGOM_ASCENDING ) + { + columnrect.UpperLeftCorner.X = columnrect.LowerRightCorner.X - CellWidthPadding - ARROW_PAD / 2 + 2; + columnrect.UpperLeftCorner.Y += 7; + skin->drawIcon(this,EGDI_CURSOR_UP,columnrect.UpperLeftCorner,0,0,false,&tableClip); + } + else + { + columnrect.UpperLeftCorner.X = columnrect.LowerRightCorner.X - CellWidthPadding - ARROW_PAD / 2 + 2; + columnrect.UpperLeftCorner.Y += 7; + skin->drawIcon(this,EGDI_CURSOR_DOWN,columnrect.UpperLeftCorner,0,0,false,&tableClip); + } + } + + pos += colWidth; + } + + // fill up header background up to the right side + core::rect<s32> columnrect(pos, tableRect.UpperLeftCorner.Y, tableRect.LowerRightCorner.X , headerBottom); + skin->draw3DButtonPaneStandard(this, columnrect, &tableClip); + + IGUIElement::draw(); +} + + +void CGUITable::breakText(const core::stringw& text, core::stringw& brokenText, u32 cellWidth) +{ + IGUISkin* skin = Environment->getSkin(); + + if (!skin) + return; + + if (!Font) + return; + + IGUIFont* font = skin->getFont(); + if (!font) + return; + + core::stringw line, lineDots; + wchar_t c[2]; + c[1] = L'\0'; + + const u32 maxLength = cellWidth - (CellWidthPadding * 2); + const u32 maxLengthDots = cellWidth - (CellWidthPadding * 2) - font->getDimension(L"...").Width; + const u32 size = text.size(); + u32 pos = 0; + + u32 i; + + for (i=0; i<size; ++i) + { + c[0] = text[i]; + + if (c[0] == L'\n') + break; + + pos += font->getDimension(c).Width; + if ( pos > maxLength ) + break; + + if ( font->getDimension( (line + c).c_str() ).Width > maxLengthDots ) + lineDots = line; + + line += c[0]; + } + + if ( i < size ) + brokenText = lineDots + L"..."; + else + brokenText = line; +} + + +//! Set some flags influencing the layout of the table +void CGUITable::setDrawFlags(s32 flags) +{ + DrawFlags = flags; +} + + +//! Get the flags which influence the layout of the table +s32 CGUITable::getDrawFlags() const +{ + return DrawFlags; +} + + +//! Writes attributes of the element. +void CGUITable::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IGUITable::serializeAttributes(out, options); + + out->addInt("ColumnCount", Columns.size()); + u32 i; + for (i=0;i<Columns.size(); ++i) + { + core::stringc label; + + label = "Column"; label += i; label += "name"; + out->addString(label.c_str(), Columns[i].Name.c_str() ); + label = "Column"; label += i; label += "width"; + out->addInt(label.c_str(), Columns[i].Width ); + label = "Column"; label += i; label += "OrderingMode"; + out->addEnum(label.c_str(), Columns[i].OrderingMode, GUIColumnOrderingNames); + } + + out->addInt("RowCount", Rows.size()); + for (i=0;i<Rows.size(); ++i) + { + core::stringc label; + + // Height currently not used and could be recalculated anyway + //label = "Row"; label += i; label += "height"; + //out->addInt(label.c_str(), Rows[i].Height ); + + //label = "Row"; label += i; label += "ItemCount"; + //out->addInt(label.c_str(), Rows[i].Items.size()); + u32 c; + for ( c=0; c < Rows[i].Items.size(); ++c ) + { + label = "Row"; label += i; label += "cell"; label += c; label += "text"; + out->addString(label.c_str(), Rows[i].Items[c].Text.c_str() ); + // core::stringw BrokenText; // can be recalculated + label = "Row"; label += i; label += "cell"; label += c; label += "color"; + out->addColor(label.c_str(), Rows[i].Items[c].Color ); + label = "Row"; label += i; label += "cell"; label += c; label += "IsOverrideColor"; + out->addColor(label.c_str(), Rows[i].Items[c].IsOverrideColor ); + // void *data; // can't be serialized + } + } + + // s32 ItemHeight; // can be calculated + // TotalItemHeight // calculated + // TotalItemWidth // calculated + // gui::IGUIFont* Font; // font is just the current font from environment + // gui::IGUIScrollBar* VerticalScrollBar; // not serialized + // gui::IGUIScrollBar* HorizontalScrollBar; // not serialized + + out->addBool ("Clip", Clip); + out->addBool ("DrawBack", DrawBack); + out->addBool ("MoveOverSelect", MoveOverSelect); + + // s32 CurrentResizedColumn; // runtime info - depends on user action + out->addBool ("ResizableColumns", ResizableColumns); + + // s32 Selected; // runtime info - depends on user action + out->addInt("CellWidthPadding", CellWidthPadding ); + out->addInt("CellHeightPadding", CellHeightPadding ); + // s32 ActiveTab; // runtime info - depends on user action + // bool Selecting; // runtime info - depends on user action + out->addEnum("CurrentOrdering", CurrentOrdering, GUIOrderingModeNames); + out->addInt("DrawFlags", DrawFlags); +} + + +//! Reads attributes of the element +void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + IGUITable::deserializeAttributes(in, options); + + Columns.clear(); + u32 columnCount = in->getAttributeAsInt("ColumnCount"); + u32 i; + for (i=0;i<columnCount; ++i) + { + core::stringc label; + Column column; + + label = "Column"; label += i; label += "name"; + column.Name = core::stringw(in->getAttributeAsString(label.c_str()).c_str()); + label = "Column"; label += i; label += "width"; + column.Width = in->getAttributeAsInt(label.c_str()); + label = "Column"; label += i; label += "OrderingMode"; + + column.OrderingMode = EGCO_NONE; + s32 co = in->getAttributeAsEnumeration(label.c_str(), GUIColumnOrderingNames); + if (co > 0) + column.OrderingMode = EGUI_COLUMN_ORDERING(co); + + Columns.push_back(column); + } + + Rows.clear(); + u32 rowCount = in->getAttributeAsInt("RowCount"); + for (i=0; i<rowCount; ++i) + { + core::stringc label; + + Row row; + + // Height currently not used and could be recalculated anyway + //label = "Row"; label += i; label += "height"; + //row.Height = in->getAttributeAsInt(label.c_str() ); + + Rows.push_back(row); + + //label = "Row"; label += i; label += "ItemCount"; + //u32 itemCount = in->getAttributeAsInt(label.c_str()); + u32 c; + for ( c=0; c < columnCount; ++c ) + { + Cell cell; + + label = "Row"; label += i; label += "cell"; label += c; label += "text"; + cell.Text = core::stringw(in->getAttributeAsString(label.c_str()).c_str()); + breakText( cell.Text, cell.BrokenText, Columns[c].Width ); + label = "Row"; label += i; label += "cell"; label += c; label += "color"; + cell.Color = in->getAttributeAsColor(label.c_str()); + label = "Row"; label += i; label += "cell"; label += c; label += "IsOverrideColor"; + cell.IsOverrideColor = in->getAttributeAsBool(label.c_str()); + + cell.Data = NULL; + + Rows[Rows.size()-1].Items.push_back(cell); + } + } + + ItemHeight = 0; // calculated + TotalItemHeight = 0; // calculated + TotalItemWidth = 0; // calculated + + // force font recalculation + if ( Font ) + { + Font->drop(); + Font = 0; + } + + Clip = in->getAttributeAsBool("Clip"); + DrawBack = in->getAttributeAsBool("DrawBack"); + MoveOverSelect = in->getAttributeAsBool("MoveOverSelect"); + + CurrentResizedColumn = -1; + ResizeStart = 0; + ResizableColumns = in->getAttributeAsBool("ResizableColumns"); + + Selected = -1; + CellWidthPadding = in->getAttributeAsInt("CellWidthPadding"); + CellHeightPadding = in->getAttributeAsInt("CellHeightPadding"); + ActiveTab = -1; + Selecting = false; + + CurrentOrdering = (EGUI_ORDERING_MODE) in->getAttributeAsEnumeration("CurrentOrdering", GUIOrderingModeNames); + DrawFlags = in->getAttributeAsInt("DrawFlags"); + + refreshControls(); +} + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.d new file mode 100644 index 0000000..7714577 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.d @@ -0,0 +1 @@ +CGUITable.o: CGUITable.cpp CGUITable.h ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.h new file mode 100644 index 0000000..69cfea5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITable.h @@ -0,0 +1,224 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// 07.10.2005 - Multicolor-Listbox addet by A. Buschhueter (Acki) +// A_Buschhueter@gmx.de + +#ifndef __C_GUI_TABLE_BAR_H_INCLUDED__ +#define __C_GUI_TABLE_BAR_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUITable.h" +#include "irrArray.h" + +namespace irr +{ +namespace gui +{ + + class IGUIFont; + class IGUIScrollBar; + + class CGUITable : public IGUITable + { + public: + //! constructor + CGUITable(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, const core::rect<s32>& rectangle, bool clip=true, + bool drawBack=false, bool moveOverSelect=true); + + //! destructor + ~CGUITable(); + + //! Adds a column + //! If columnIndex is outside the current range, do push new colum at the end + virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1); + + //! remove a column from the table + virtual void removeColumn(u32 columnIndex); + + //! Returns the number of columns in the table control + virtual s32 getColumnCount() const; + + //! Makes a column active. This will trigger an ordering process. + /** \param idx: The id of the column to make active. + \return True if successful. */ + virtual bool setActiveColumn(s32 columnIndex, bool doOrder=false); + + //! Returns which header is currently active + virtual s32 getActiveColumn() const; + + //! Returns the ordering used by the currently active column + virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const; + + //! set a column width + virtual void setColumnWidth(u32 columnIndex, u32 width); + + //! Get the width of a column + virtual u32 getColumnWidth(u32 columnIndex) const; + + //! columns can be resized by drag 'n drop + virtual void setResizableColumns(bool resizable); + + //! can columns be resized by dran 'n drop? + virtual bool hasResizableColumns() const; + + //! This tells the table control which ordering mode should be used when + //! a column header is clicked. + /** \param columnIndex: The index of the column header. + \param state: If true, a EGET_TABLE_HEADER_CHANGED message will be sent and you can order the table data as you whish.*/ + //! \param mode: One of the modes defined in EGUI_COLUMN_ORDERING + virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode); + + //! Returns which row is currently selected + virtual s32 getSelected() const; + + //! set wich row is currently selected + virtual void setSelected( s32 index ); + + //! Returns amount of rows in the tabcontrol + virtual s32 getRowCount() const; + + //! adds a row to the table + /** \param rowIndex: zero based index of rows. The row will be + inserted at this position. If a row already exists + there, it will be placed after it. If the row is larger + than the actual number of rows by more than one, it + won't be created. Note that if you create a row that is + not at the end, there might be performance issues*/ + virtual u32 addRow(u32 rowIndex); + + //! Remove a row from the table + virtual void removeRow(u32 rowIndex); + + //! clear the table rows, but keep the columns intact + virtual void clearRows(); + + //! Swap two row positions. This is useful for a custom ordering algo. + virtual void swapRows(u32 rowIndexA, u32 rowIndexB); + + //! This tells the table to start ordering all the rows. You + //! need to explicitly tell the table to reorder the rows when + //! a new row is added or the cells data is changed. This makes + //! the system more flexible and doesn't make you pay the cost + //! of ordering when adding a lot of rows. + //! \param columnIndex: When set to -1 the active column is used. + virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE); + + + //! Set the text of a cell + virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text); + + //! Set the text of a cell, and set a color of this cell. + virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color); + + //! Set the data of a cell + //! data will not be serialized. + virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data); + + //! Set the color of a cell text + virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color); + + //! Get the text of a cell + virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const; + + //! Get the data of a cell + virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const; + + //! clears the table, deletes all items in the table + virtual void clear(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent &event); + + //! draws the element and its children + virtual void draw(); + + //! Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout + virtual void setDrawFlags(s32 flags); + + //! Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout + virtual s32 getDrawFlags() const; + + //! Writes attributes of the object. + //! Implement this to expose the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml serialization purposes. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the object. + //! Implement this to set the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml deserialization purposes. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + protected: + virtual void refreshControls(); + virtual void checkScrollbars(); + + private: + + struct Cell + { + Cell() : IsOverrideColor(false), Data(0) {} + core::stringw Text; + core::stringw BrokenText; + bool IsOverrideColor; + video::SColor Color; + void *Data; + }; + + struct Row + { + Row() {} + core::array<Cell> Items; + }; + + struct Column + { + Column() : Width(0), OrderingMode(EGCO_NONE) {} + core::stringw Name; + u32 Width; + EGUI_COLUMN_ORDERING OrderingMode; + }; + + void breakText(const core::stringw &text, core::stringw & brokenText, u32 cellWidth); + void selectNew(s32 ypos, bool onlyHover=false); + bool selectColumnHeader(s32 xpos, s32 ypos); + bool dragColumnStart(s32 xpos, s32 ypos); + bool dragColumnUpdate(s32 xpos); + void recalculateHeights(); + void recalculateWidths(); + + core::array< Column > Columns; + core::array< Row > Rows; + gui::IGUIFont* Font; + gui::IGUIScrollBar* VerticalScrollBar; + gui::IGUIScrollBar* HorizontalScrollBar; + bool Clip; + bool DrawBack; + bool MoveOverSelect; + bool Selecting; + s32 CurrentResizedColumn; + s32 ResizeStart; + bool ResizableColumns; + + s32 ItemHeight; + s32 TotalItemHeight; + s32 TotalItemWidth; + s32 Selected; + s32 CellHeightPadding; + s32 CellWidthPadding; + s32 ActiveTab; + EGUI_ORDERING_MODE CurrentOrdering; + s32 DrawFlags; + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.cpp new file mode 100644 index 0000000..9671c04 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.cpp @@ -0,0 +1,176 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIToolBar.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIButton.h" +#include "IGUIFont.h" +#include "CGUIButton.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIToolBar::CGUIToolBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) +:IGUIToolBar(environment, parent, id, rectangle), ButtonX(5) +{ + #ifdef _DEBUG + setDebugName("CGUIToolBar"); + #endif + + // calculate position and find other menubars + s32 y = 0; + s32 parentwidth = 100; + + if (parent) + { + parentwidth = Parent->getAbsolutePosition().getWidth(); + + const core::list<IGUIElement*>& children = parent->getChildren(); + core::list<IGUIElement*>::ConstIterator it = children.begin(); + for (; it != children.end(); ++it) + { + core::rect<s32> r = (*it)->getAbsolutePosition(); + if (r.UpperLeftCorner.X == 0 && r.UpperLeftCorner.Y <= y && + r.LowerRightCorner.X == parentwidth) + y = r.LowerRightCorner.Y; + } + } + + core::rect<s32> rr; + rr.UpperLeftCorner.X = 0; + rr.UpperLeftCorner.Y = y; + s32 height = Environment->getSkin()->getSize ( EGDS_MENU_HEIGHT ); + + /*IGUISkin* skin = Environment->getSkin(); + IGUIFont* font = skin->getFont(); + if (font) + { + s32 t = font->getDimension(L"A").Height + 5; + if (t > height) + height = t; + }*/ + + rr.LowerRightCorner.X = parentwidth; + rr.LowerRightCorner.Y = rr.UpperLeftCorner.Y + height; + setRelativePosition(rr); +} + + +//! called if an event happened. +bool CGUIToolBar::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + if (event.EventType == EET_MOUSE_INPUT_EVENT && + event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) + { + if (AbsoluteClippingRect.isPointInside(core::position2di(event.MouseInput.X, event.MouseInput.Y))) + return true; + } + } + + return IGUIElement::OnEvent(event); +} + + +//! draws the element and its children +void CGUIToolBar::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + core::rect<s32> rect = AbsoluteRect; + core::rect<s32>* clip = &AbsoluteClippingRect; + + // draw frame + skin->draw3DToolBar(this, rect, clip); + + IGUIElement::draw(); +} + + +//! Updates the absolute position. +void CGUIToolBar::updateAbsolutePosition() +{ + if (Parent) + { + DesiredRect.UpperLeftCorner.X = 0; + DesiredRect.LowerRightCorner.X = Parent->getAbsolutePosition().getWidth(); + } + + IGUIElement::updateAbsolutePosition(); +} + + +//! Adds a button to the tool bar +IGUIButton* CGUIToolBar::addButton(s32 id, const wchar_t* text,const wchar_t* tooltiptext, + video::ITexture* img, video::ITexture* pressed, bool isPushButton, + bool useAlphaChannel) +{ + ButtonX += 3; + + core::rect<s32> rectangle(ButtonX,2,ButtonX+1,3); + if ( img ) + { + const core::dimension2du &size = img->getOriginalSize(); + rectangle.LowerRightCorner.X = rectangle.UpperLeftCorner.X + size.Width + 8; + rectangle.LowerRightCorner.Y = rectangle.UpperLeftCorner.Y + size.Height + 6; + } + + if ( text ) + { + IGUISkin* skin = Environment->getSkin(); + IGUIFont * font = skin->getFont(EGDF_BUTTON); + if ( font ) + { + core::dimension2d<u32> dim = font->getDimension(text); + if ( (s32)dim.Width > rectangle.getWidth() ) + rectangle.LowerRightCorner.X = rectangle.UpperLeftCorner.X + dim.Width + 8; + if ( (s32)dim.Height > rectangle.getHeight() ) + rectangle.LowerRightCorner.Y = rectangle.UpperLeftCorner.Y + dim.Height + 6; + } + } + + ButtonX += rectangle.getWidth(); + + IGUIButton* button = new CGUIButton(Environment, this, id, rectangle); + button->drop(); + + if (text) + button->setText(text); + + if (tooltiptext) + button->setToolTipText(tooltiptext); + + if (img) + button->setImage(img); + + if (pressed) + button->setPressedImage(pressed); + + if (isPushButton) + button->setIsPushButton(isPushButton); + + if (useAlphaChannel) + button->setUseAlphaChannel(useAlphaChannel); + + return button; +} + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.d new file mode 100644 index 0000000..7cc3692 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.d @@ -0,0 +1,2 @@ +CGUIToolBar.o: CGUIToolBar.cpp CGUIToolBar.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.h new file mode 100644 index 0000000..3f419e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIToolBar.h @@ -0,0 +1,52 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_TOOL_BAR_H_INCLUDED__ +#define __C_GUI_TOOL_BAR_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIToolbar.h" + +namespace irr +{ +namespace gui +{ + + //! Stays at the top of its parent like the menu bar and contains tool buttons + class CGUIToolBar : public IGUIToolBar + { + public: + + //! constructor + CGUIToolBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! draws the element and its children + virtual void draw(); + + //! Updates the absolute position. + virtual void updateAbsolutePosition(); + + //! Adds a button to the tool bar + virtual IGUIButton* addButton(s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext=0, + video::ITexture* img=0, video::ITexture* pressed=0, + bool isPushButton=false, bool useAlphaChannel=false); + + private: + + s32 ButtonX; + }; + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.cpp new file mode 100644 index 0000000..779b8cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.cpp @@ -0,0 +1,1101 @@ +// This file is part of the "Irrlicht Engine". +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de +// expaned by burningwater + +#include "CGUITreeView.h" + +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIFont.h" +#include "CGUIScrollBar.h" +#include "os.h" + +namespace irr +{ +namespace gui +{ + +CGUITreeViewNode::CGUITreeViewNode( CGUITreeView* owner, CGUITreeViewNode* parent ) + : Owner(owner), Parent(parent), ImageIndex(-1), SelectedImageIndex(-1), + Data(0), Data2(0), Expanded(false) +{ +#ifdef _DEBUG + setDebugName( "CGUITreeView" ); +#endif +} + +CGUITreeViewNode::~CGUITreeViewNode() +{ + if( Owner && this == Owner->getSelected() ) + { + setSelected( false ); + } + + clearChildren(); + + if( Data2 ) + { + Data2->drop(); + } +} + +IGUITreeView* CGUITreeViewNode::getOwner() const +{ + return Owner; +} + +IGUITreeViewNode* CGUITreeViewNode::getParent() const +{ + return Parent; +} + +void CGUITreeViewNode::setText( const wchar_t* text ) +{ + Text = text; +} + +void CGUITreeViewNode::setIcon( const wchar_t* icon ) +{ + Icon = icon; +} + +void CGUITreeViewNode::clearChildren() +{ + core::list<CGUITreeViewNode*>::Iterator it; + + for( it = Children.begin(); it != Children.end(); it++ ) + { + ( *it )->drop(); + } + Children.clear(); +} + +IGUITreeViewNode* CGUITreeViewNode::addChildBack( + const wchar_t* text, + const wchar_t* icon /*= 0*/, + s32 imageIndex /*= -1*/, + s32 selectedImageIndex /*= -1*/, + void* data /*= 0*/, + IReferenceCounted* data2 /*= 0*/ ) +{ + CGUITreeViewNode* newChild = new CGUITreeViewNode( Owner, this ); + + Children.push_back( newChild ); + newChild->Text = text; + newChild->Icon = icon; + newChild->ImageIndex = imageIndex; + newChild->SelectedImageIndex = selectedImageIndex; + newChild->Data = data; + newChild->Data2 = data2; + if( data2 ) + { + data2->grab(); + } + return newChild; +} + +IGUITreeViewNode* CGUITreeViewNode::addChildFront( + const wchar_t* text, + const wchar_t* icon /*= 0*/, + s32 imageIndex /*= -1*/, + s32 selectedImageIndex /*= -1*/, + void* data /*= 0*/, + IReferenceCounted* data2 /*= 0*/ ) +{ + CGUITreeViewNode* newChild = new CGUITreeViewNode( Owner, this ); + + Children.push_front( newChild ); + newChild->Text = text; + newChild->Icon = icon; + newChild->ImageIndex = imageIndex; + newChild->SelectedImageIndex = selectedImageIndex; + newChild->Data = data; + newChild->Data2 = data2; + if( data2 ) + { + data2->grab(); + } + return newChild; +} + +IGUITreeViewNode* CGUITreeViewNode::insertChildAfter( + IGUITreeViewNode* other, + const wchar_t* text, + const wchar_t* icon /*= 0*/, + s32 imageIndex /*= -1*/, + s32 selectedImageIndex /*= -1*/, + void* data /*= 0*/, + IReferenceCounted* data2/* = 0*/ ) +{ + core::list<CGUITreeViewNode*>::Iterator itOther; + CGUITreeViewNode* newChild = 0; + + for( itOther = Children.begin(); itOther != Children.end(); itOther++ ) + { + if( other == *itOther ) + { + newChild = new CGUITreeViewNode( Owner, this ); + newChild->Text = text; + newChild->Icon = icon; + newChild->ImageIndex = imageIndex; + newChild->SelectedImageIndex = selectedImageIndex; + newChild->Data = data; + newChild->Data2 = data2; + if( data2 ) + { + data2->grab(); + } + Children.insert_after( itOther, newChild ); + break; + } + } + return newChild; +} + +IGUITreeViewNode* CGUITreeViewNode::insertChildBefore( + IGUITreeViewNode* other, + const wchar_t* text, + const wchar_t* icon /*= 0*/, + s32 imageIndex /*= -1*/, + s32 selectedImageIndex /*= -1*/, + void* data /*= 0*/, + IReferenceCounted* data2/* = 0*/ ) +{ + core::list<CGUITreeViewNode*>::Iterator itOther; + CGUITreeViewNode* newChild = 0; + + for( itOther = Children.begin(); itOther != Children.end(); itOther++ ) + { + if( other == *itOther ) + { + newChild = new CGUITreeViewNode( Owner, this ); + newChild->Text = text; + newChild->Icon = icon; + newChild->ImageIndex = imageIndex; + newChild->SelectedImageIndex = selectedImageIndex; + newChild->Data = data; + newChild->Data2 = data2; + if( data2 ) + { + data2->grab(); + } + Children.insert_before( itOther, newChild ); + break; + } + } + return newChild; +} + +IGUITreeViewNode* CGUITreeViewNode::getFirstChild() const +{ + if( Children.empty() ) + { + return 0; + } + else + { + return *( Children.begin() ); + } +} + +IGUITreeViewNode* CGUITreeViewNode::getLastChild() const +{ + if( Children.empty() ) + { + return 0; + } + else + { + return *( Children.getLast() ); + } +} + +IGUITreeViewNode* CGUITreeViewNode::getPrevSibling() const +{ + core::list<CGUITreeViewNode*>::Iterator itThis; + core::list<CGUITreeViewNode*>::Iterator itOther; + CGUITreeViewNode* other = 0; + + if( Parent ) + { + for( itThis = Parent->Children.begin(); itThis != Parent->Children.end(); itThis++ ) + { + if( this == *itThis ) + { + if( itThis != Parent->Children.begin() ) + { + other = *itOther; + } + break; + } + itOther = itThis; + } + } + return other; +} + +IGUITreeViewNode* CGUITreeViewNode::getNextSibling() const +{ + core::list<CGUITreeViewNode*>::Iterator itThis; + CGUITreeViewNode* other = 0; + + if( Parent ) + { + for( itThis = Parent->Children.begin(); itThis != Parent->Children.end(); itThis++ ) + { + if( this == *itThis ) + { + if( itThis != Parent->Children.getLast() ) + { + other = *( ++itThis ); + } + break; + } + } + } + return other; +} + +IGUITreeViewNode* CGUITreeViewNode::getNextVisible() const +{ + IGUITreeViewNode* next = 0; + IGUITreeViewNode* node = 0; + + node = const_cast<CGUITreeViewNode*>( this ); + + if( node->getExpanded() && node->hasChildren() ) + { + next = node->getFirstChild(); + } + else + { + next = node->getNextSibling(); + } + while( !next && node->getParent() ) + { + next = node->getParent()->getNextSibling(); + if( !next ) + { + node = node->getParent(); + } + } + + return next; +} + +bool CGUITreeViewNode::deleteChild( IGUITreeViewNode* child ) +{ + core::list<CGUITreeViewNode*>::Iterator itChild; + bool deleted = false; + + for( itChild = Children.begin(); itChild != Children.end(); itChild++ ) + { + if( child == *itChild ) + { + child->drop(); + Children.erase( itChild ); + deleted = true; + break; + } + } + return deleted; +} + +bool CGUITreeViewNode::moveChildUp( IGUITreeViewNode* child ) +{ + core::list<CGUITreeViewNode*>::Iterator itChild; + core::list<CGUITreeViewNode*>::Iterator itOther; + CGUITreeViewNode* nodeTmp; + bool moved = false; + + for( itChild = Children.begin(); itChild != Children.end(); itChild++ ) + { + if( child == *itChild ) + { + if( itChild != Children.begin() ) + { + nodeTmp = *itChild; + *itChild = *itOther; + *itOther = nodeTmp; + moved = true; + } + break; + } + itOther = itChild; + } + return moved; +} + +bool CGUITreeViewNode::moveChildDown( IGUITreeViewNode* child ) +{ + core::list<CGUITreeViewNode*>::Iterator itChild; + core::list<CGUITreeViewNode*>::Iterator itOther; + CGUITreeViewNode* nodeTmp; + bool moved = false; + + for( itChild = Children.begin(); itChild != Children.end(); itChild++ ) + { + if( child == *itChild ) + { + if( itChild != Children.getLast() ) + { + itOther = itChild; + ++itOther; + nodeTmp = *itChild; + *itChild = *itOther; + *itOther = nodeTmp; + moved = true; + } + break; + } + } + return moved; +} + +void CGUITreeViewNode::setExpanded( bool expanded ) +{ + Expanded = expanded; +} + +void CGUITreeViewNode::setSelected( bool selected ) +{ + if( Owner ) + { + if( selected ) + { + Owner->Selected = this; + } + else + { + if( Owner->Selected == this ) + { + Owner->Selected = 0; + } + } + } +} + +bool CGUITreeViewNode::getSelected() const +{ + if( Owner ) + { + return Owner->Selected == (IGUITreeViewNode*)this; + } + else + { + return false; + } +} + +bool CGUITreeViewNode::isRoot() const +{ + return ( Owner && ( this == Owner->Root ) ); +} + +s32 CGUITreeViewNode::getLevel() const +{ + if( Parent ) + { + return Parent->getLevel() + 1; + } + else + { + return 0; + } +} + +bool CGUITreeViewNode::isVisible() const +{ + if( Parent ) + { + return Parent->getExpanded() && Parent->isVisible(); + } + else + { + return true; + } +} + + +//! constructor +CGUITreeView::CGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle, bool clip, + bool drawBack,bool scrollBarVertical, bool scrollBarHorizontal) + : IGUITreeView( environment, parent, id, rectangle ), + Root(0), Selected(0), + ItemHeight( 0 ), + IndentWidth( 0 ), + TotalItemHeight( 0 ), + TotalItemWidth ( 0 ), + Font( 0 ), + IconFont( 0 ), + ScrollBarH( 0 ), + ScrollBarV( 0 ), + ImageList( 0 ), + LastEventNode( 0 ), + LinesVisible( true ), + Selecting( false ), + Clip( clip ), + DrawBack( drawBack ), + ImageLeftOfIcon( true ) +{ +#ifdef _DEBUG + setDebugName( "CGUITreeView" ); +#endif + + IGUISkin* skin = Environment->getSkin(); + s32 s = skin->getSize( EGDS_SCROLLBAR_SIZE ); + + if ( scrollBarVertical ) + { + ScrollBarV = new CGUIScrollBar( false, Environment, this, 0, + core::rect<s32>( RelativeRect.getWidth() - s, + 0, + RelativeRect.getWidth(), + RelativeRect.getHeight() - (scrollBarHorizontal ? s : 0 ) + ), + !clip ); + ScrollBarV->drop(); + + ScrollBarV->setSubElement(true); + ScrollBarV->setPos( 0 ); + ScrollBarV->grab(); + } + + if ( scrollBarHorizontal ) + { + ScrollBarH = new CGUIScrollBar( true, Environment, this, 1, + core::rect<s32>( 0, RelativeRect.getHeight() - s, RelativeRect.getWidth() - s, RelativeRect.getHeight() ), + !clip ); + ScrollBarH->drop(); + + ScrollBarH->setSubElement(true); + ScrollBarH->setPos( 0 ); + ScrollBarH->grab(); + } + + Root = new CGUITreeViewNode( this, 0 ); + Root->Expanded = true; + + recalculateItemHeight(); +} + + +//! destructor +CGUITreeView::~CGUITreeView() +{ + if( ScrollBarV ) + { + ScrollBarV->drop(); + } + + if( ScrollBarH ) + { + ScrollBarH->drop(); + } + + if( Font ) + { + Font->drop(); + } + + if( IconFont ) + { + IconFont->drop(); + } + + if( ImageList ) + { + ImageList->drop(); + } + + if( Root ) + { + Root->drop(); + } +} + +void CGUITreeView::recalculateItemHeight() +{ + IGUISkin* skin = Environment->getSkin(); + IGUITreeViewNode* node; + + if( Font != skin->getFont() ) + { + if( Font ) + { + Font->drop(); + } + + Font = skin->getFont(); + ItemHeight = 0; + + if( Font ) + { + ItemHeight = Font->getDimension( L"A" ).Height + 4; + Font->grab(); + } + + if( IconFont ) + { + s32 height = IconFont->getDimension( L" " ).Height; + if( height > ItemHeight ) + { + ItemHeight = height; + } + } + if( ImageList ) + { + if( ImageList->getImageSize().Height + 1 > ItemHeight ) + { + ItemHeight = ImageList->getImageSize().Height + 1; + } + } + } + + IndentWidth = ItemHeight; + if( IndentWidth < 9 ) + { + IndentWidth = 9; + } + else if( IndentWidth > 15 ) + { + IndentWidth = 15; + } + else + { + if( ( ( IndentWidth >> 1 ) << 1 ) - IndentWidth == 0 ) + { + --IndentWidth; + } + } + + TotalItemHeight = 0; + TotalItemWidth = AbsoluteRect.getWidth() * 2; + node = Root->getFirstChild(); + while( node ) + { + TotalItemHeight += ItemHeight; + node = node->getNextVisible(); + } + + if ( ScrollBarV ) + ScrollBarV->setMax( core::max_(0,TotalItemHeight - AbsoluteRect.getHeight()) ); + + if ( ScrollBarH ) + ScrollBarH->setMax( core::max_(0, TotalItemWidth - AbsoluteRect.getWidth()) ); + +} + +//! called if an event happened. +bool CGUITreeView::OnEvent( const SEvent &event ) +{ + if ( isEnabled() ) + { + switch( event.EventType ) + { + case EET_GUI_EVENT: + switch( event.GUIEvent.EventType ) + { + case gui::EGET_SCROLL_BAR_CHANGED: + if( event.GUIEvent.Caller == ScrollBarV || event.GUIEvent.Caller == ScrollBarH ) + { + //s32 pos = ( ( gui::IGUIScrollBar* )event.GUIEvent.Caller )->getPos(); + return true; + } + break; + case gui::EGET_ELEMENT_FOCUS_LOST: + { + Selecting = false; + return false; + } + break; + default: + break; + } + break; + case EET_MOUSE_INPUT_EVENT: + { + core::position2d<s32> p( event.MouseInput.X, event.MouseInput.Y ); + + switch( event.MouseInput.Event ) + { + case EMIE_MOUSE_WHEEL: + if ( ScrollBarV ) + ScrollBarV->setPos( ScrollBarV->getPos() + (event.MouseInput.Wheel < 0 ? -1 : 1) * -10 ); + return true; + break; + + case EMIE_LMOUSE_PRESSED_DOWN: + + if (Environment->hasFocus(this) && !AbsoluteClippingRect.isPointInside(p) ) + { + Environment->removeFocus(this); + return false; + } + + if( Environment->hasFocus( this ) && + ( ( ScrollBarV && ScrollBarV->getAbsolutePosition().isPointInside( p ) && ScrollBarV->OnEvent( event ) ) || + ( ScrollBarH && ScrollBarH->getAbsolutePosition().isPointInside( p ) && ScrollBarH->OnEvent( event ) ) + ) + ) + { + return true; + } + + Selecting = true; + Environment->setFocus( this ); + return true; + break; + + case EMIE_LMOUSE_LEFT_UP: + if( Environment->hasFocus( this ) && + ( ( ScrollBarV && ScrollBarV->getAbsolutePosition().isPointInside( p ) && ScrollBarV->OnEvent( event ) ) || + ( ScrollBarH && ScrollBarH->getAbsolutePosition().isPointInside( p ) && ScrollBarH->OnEvent( event ) ) + ) + ) + { + return true; + } + + Selecting = false; + Environment->removeFocus( this ); + mouseAction( event.MouseInput.X, event.MouseInput.Y ); + return true; + break; + + case EMIE_MOUSE_MOVED: + if( Selecting ) + { + if( getAbsolutePosition().isPointInside( p ) ) + { + mouseAction( event.MouseInput.X, event.MouseInput.Y, true ); + return true; + } + } + break; + default: + break; + } + } + break; + default: + break; + } + } + + return Parent ? Parent->OnEvent( event ) : false; +} + +/*! +*/ +void CGUITreeView::mouseAction( s32 xpos, s32 ypos, bool onlyHover /*= false*/ ) +{ + IGUITreeViewNode* oldSelected = Selected; + IGUITreeViewNode* hitNode = 0; + s32 selIdx=-1; + s32 n; + IGUITreeViewNode* node; + SEvent event; + + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + + xpos -= AbsoluteRect.UpperLeftCorner.X; + ypos -= AbsoluteRect.UpperLeftCorner.Y; + + // find new selected item. + if( ItemHeight != 0 && ScrollBarV ) + { + selIdx = ( ( ypos - 1 ) + ScrollBarV->getPos() ) / ItemHeight; + } + + hitNode = 0; + node = Root->getFirstChild(); + n = 0; + while( node ) + { + if( selIdx == n ) + { + hitNode = node; + break; + } + node = node->getNextVisible(); + ++n; + } + + if( hitNode && xpos > hitNode->getLevel() * IndentWidth ) + { + Selected = hitNode; + } + + if( hitNode && !onlyHover + && xpos < hitNode->getLevel() * IndentWidth + && xpos > ( hitNode->getLevel() - 1 ) * IndentWidth + && hitNode->hasChildren() ) + { + hitNode->setExpanded( !hitNode->getExpanded() ); + + // post expand/collaps news + if( hitNode->getExpanded() ) + { + event.GUIEvent.EventType = EGET_TREEVIEW_NODE_EXPAND; + } + else + { + event.GUIEvent.EventType = EGET_TREEVIEW_NODE_COLLAPS; + } + LastEventNode = hitNode; + Parent->OnEvent( event ); + LastEventNode = 0; + } + + if( Selected && !Selected->isVisible() ) + { + Selected = 0; + } + + // post selection news + + if( Parent && !onlyHover && Selected != oldSelected ) + { + if( oldSelected ) + { + event.GUIEvent.EventType = EGET_TREEVIEW_NODE_DESELECT; + LastEventNode = oldSelected; + Parent->OnEvent( event ); + LastEventNode = 0; + } + if( Selected ) + { + event.GUIEvent.EventType = EGET_TREEVIEW_NODE_SELECT; + LastEventNode = Selected; + Parent->OnEvent( event ); + LastEventNode = 0; + } + } +} + + +//! draws the element and its children +void CGUITreeView::draw() +{ + if( !IsVisible ) + { + return; + } + + recalculateItemHeight(); // if the font changed + + IGUISkin* skin = Environment->getSkin(); + irr::video::IVideoDriver* driver = Environment->getVideoDriver(); + + core::rect<s32>* clipRect = 0; + if( Clip ) + { + clipRect = &AbsoluteClippingRect; + } + + // draw background + core::rect<s32> frameRect( AbsoluteRect ); + + if( DrawBack ) + { + driver->draw2DRectangle( skin->getColor( EGDC_3D_HIGH_LIGHT ), frameRect, + clipRect ); + } + + // draw the border + frameRect.LowerRightCorner.Y = frameRect.UpperLeftCorner.Y + 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), frameRect, + clipRect ); + + frameRect.LowerRightCorner.Y = AbsoluteRect.LowerRightCorner.Y; + frameRect.LowerRightCorner.X = frameRect.UpperLeftCorner.X + 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), frameRect, + clipRect ); + + frameRect = AbsoluteRect; + frameRect.UpperLeftCorner.X = frameRect.LowerRightCorner.X - 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_HIGH_LIGHT ), frameRect, + clipRect ); + + frameRect = AbsoluteRect; + frameRect.UpperLeftCorner.Y = AbsoluteRect.LowerRightCorner.Y - 1; + frameRect.LowerRightCorner.Y = AbsoluteRect.LowerRightCorner.Y; + driver->draw2DRectangle( skin->getColor( EGDC_3D_HIGH_LIGHT ), frameRect, + clipRect ); + + + // draw items + + core::rect<s32> clientClip( AbsoluteRect ); + clientClip.UpperLeftCorner.Y += 1; + clientClip.UpperLeftCorner.X += 1; + clientClip.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X; + clientClip.LowerRightCorner.Y -= 1; + + if ( ScrollBarV ) + clientClip.LowerRightCorner.X -= skin->getSize( EGDS_SCROLLBAR_SIZE ); + if ( ScrollBarH ) + clientClip.LowerRightCorner.Y -= skin->getSize( EGDS_SCROLLBAR_SIZE ); + + if( clipRect ) + { + clientClip.clipAgainst( *clipRect ); + } + + frameRect = AbsoluteRect; + frameRect.LowerRightCorner.X = AbsoluteRect.LowerRightCorner.X - skin->getSize( EGDS_SCROLLBAR_SIZE ); + frameRect.LowerRightCorner.Y = AbsoluteRect.UpperLeftCorner.Y + ItemHeight; + + if ( ScrollBarV ) + { + frameRect.UpperLeftCorner.Y -= ScrollBarV->getPos(); + frameRect.LowerRightCorner.Y -= ScrollBarV->getPos(); + } + + if ( ScrollBarH ) + { + frameRect.UpperLeftCorner.X -= ScrollBarH->getPos(); + frameRect.LowerRightCorner.X -= ScrollBarH->getPos(); + } + + IGUITreeViewNode* node = Root->getFirstChild(); + while( node ) + { + frameRect.UpperLeftCorner.X = AbsoluteRect.UpperLeftCorner.X + 1 + node->getLevel() * IndentWidth; + + if( frameRect.LowerRightCorner.Y >= AbsoluteRect.UpperLeftCorner.Y + && frameRect.UpperLeftCorner.Y <= AbsoluteRect.LowerRightCorner.Y ) + { + if( node == Selected ) + { + driver->draw2DRectangle( skin->getColor( EGDC_HIGH_LIGHT ), frameRect, &clientClip ); + } + + if( node->hasChildren() ) + { + core::rect<s32> rc; + core::rect<s32> expanderRect; + + expanderRect.UpperLeftCorner.X = frameRect.UpperLeftCorner.X - IndentWidth + 2; + expanderRect.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y + ( ( frameRect.getHeight() - ( IndentWidth - 4 ) ) >> 1 ); + expanderRect.LowerRightCorner.X = expanderRect.UpperLeftCorner.X + IndentWidth - 4; + expanderRect.LowerRightCorner.Y = expanderRect.UpperLeftCorner.Y + IndentWidth - 4; + + // box upper line + rc.UpperLeftCorner.X = expanderRect.UpperLeftCorner.X; + rc.UpperLeftCorner.Y = expanderRect.UpperLeftCorner.Y; + rc.LowerRightCorner.X = expanderRect.LowerRightCorner.X; + rc.LowerRightCorner.Y = rc.UpperLeftCorner.Y + 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + + // box left line + rc.UpperLeftCorner.X = expanderRect.UpperLeftCorner.X; + rc.UpperLeftCorner.Y = expanderRect.UpperLeftCorner.Y; + rc.LowerRightCorner.X = rc.UpperLeftCorner.X + 1; + rc.LowerRightCorner.Y = expanderRect.LowerRightCorner.Y; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + + // box right line + rc.UpperLeftCorner.X = expanderRect.LowerRightCorner.X - 1; + rc.UpperLeftCorner.Y = expanderRect.UpperLeftCorner.Y; + rc.LowerRightCorner.X = rc.UpperLeftCorner.X + 1; + rc.LowerRightCorner.Y = expanderRect.LowerRightCorner.Y; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + + // box bottom line + rc.UpperLeftCorner.X = expanderRect.UpperLeftCorner.X; + rc.UpperLeftCorner.Y = expanderRect.LowerRightCorner.Y - 1; + rc.LowerRightCorner.X = expanderRect.LowerRightCorner.X; + rc.LowerRightCorner.Y = rc.UpperLeftCorner.Y + 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + + // horizontal '-' line + rc.UpperLeftCorner.X = expanderRect.UpperLeftCorner.X + 2; + rc.UpperLeftCorner.Y = expanderRect.UpperLeftCorner.Y + ( expanderRect.getHeight() >> 1 ); + rc.LowerRightCorner.X = rc.UpperLeftCorner.X + expanderRect.getWidth() - 4; + rc.LowerRightCorner.Y = rc.UpperLeftCorner.Y + 1; + driver->draw2DRectangle( skin->getColor( EGDC_BUTTON_TEXT ), rc, + clipRect ); + + if( !node->getExpanded() ) + { + // vertical '+' line + rc.UpperLeftCorner.X = expanderRect.UpperLeftCorner.X + ( expanderRect.getWidth() >> 1 ); + rc.UpperLeftCorner.Y = expanderRect.UpperLeftCorner.Y + 2; + rc.LowerRightCorner.X = rc.UpperLeftCorner.X + 1; + rc.LowerRightCorner.Y = rc.UpperLeftCorner.Y + expanderRect.getHeight() - 4; + driver->draw2DRectangle( skin->getColor( EGDC_BUTTON_TEXT ), rc, + clipRect ); + } + } + + core::rect<s32> textRect = frameRect; + + if( Font ) + { + EGUI_DEFAULT_COLOR textCol = EGDC_GRAY_TEXT; + if ( isEnabled() ) + textCol = ( node == Selected ) ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT; + + s32 iconWidth = 0; + for( s32 n = 0; n < 2; ++n ) + { + s32 index = node->getImageIndex(); + if( ( ImageList && index >= 0 ) + && ( ( ImageLeftOfIcon && n == 0 ) + || ( !ImageLeftOfIcon && n == 1 ) ) ) + { + index = node->getSelectedImageIndex(); + if( node != Selected || index < 0 ) + { + index = node->getImageIndex(); + } + ImageList->draw( + index, + core::position2d<s32>( + textRect.UpperLeftCorner.X, + textRect.UpperLeftCorner.Y + ( ( textRect.getHeight() - ImageList->getImageSize().Height ) >> 1 ) ), + &clientClip ); + iconWidth += ImageList->getImageSize().Width + 3; + textRect.UpperLeftCorner.X += ImageList->getImageSize().Width + 3; + } + else if( ( IconFont && reinterpret_cast<CGUITreeViewNode*>( node )->Icon.size() ) + && ( ( ImageLeftOfIcon && n == 1 ) + || ( !ImageLeftOfIcon && n == 0 ) ) ) + { + IconFont->draw( node->getIcon(), textRect, skin->getColor(textCol), false, true, &clientClip ); + iconWidth += IconFont->getDimension( node->getIcon() ).Width + 3; + textRect.UpperLeftCorner.X += IconFont->getDimension( node->getIcon() ).Width + 3; + } + } + + Font->draw( node->getText(), textRect, skin->getColor(textCol), false, true, &clientClip ); + + textRect.UpperLeftCorner.X -= iconWidth; + } + + // draw the lines if neccessary + if( LinesVisible ) + { + core::rect<s32> rc; + + // horizontal line + rc.UpperLeftCorner.X = frameRect.UpperLeftCorner.X - IndentWidth - ( IndentWidth >> 1 ) - 1; + rc.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y + ( ( frameRect.getHeight() ) >> 1 ); + if( node->hasChildren() ) + { + rc.LowerRightCorner.X = frameRect.UpperLeftCorner.X - IndentWidth; + } + else + { + rc.LowerRightCorner.X = frameRect.UpperLeftCorner.X - 2; + } + rc.LowerRightCorner.Y = rc.UpperLeftCorner.Y + 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + + if( node->getParent() != Root ) + { + // vertical line + if( node == node->getParent()->getFirstChild() ) + { + rc.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y - ( ( frameRect.getHeight() - IndentWidth ) >> 1 ); + } + else + { + rc.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y - ( frameRect.getHeight() >> 1 ); + } + rc.LowerRightCorner.X = rc.UpperLeftCorner.X + 1; + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + + // the vertical lines of all parents + IGUITreeViewNode* nodeTmp = node->getParent(); + rc.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y - ( frameRect.getHeight() >> 1 ); + for( s32 n = 0; n < node->getLevel() - 2; ++n ) + { + rc.UpperLeftCorner.X -= IndentWidth; + rc.LowerRightCorner.X -= IndentWidth; + if( nodeTmp != nodeTmp->getParent()->getLastChild() ) + { + driver->draw2DRectangle( skin->getColor( EGDC_3D_SHADOW ), rc, + clipRect ); + } + nodeTmp = nodeTmp->getParent(); + } + } + } + } + + frameRect.UpperLeftCorner.Y += ItemHeight; + frameRect.LowerRightCorner.Y += ItemHeight; + + node = node->getNextVisible(); + } + + IGUIElement::draw(); +} + +//! Sets the font which should be used as icon font. This font is set to the Irrlicht engine +//! built-in-font by default. Icons can be displayed in front of every list item. +//! An icon is a string, displayed with the icon font. When using the build-in-font of the +//! Irrlicht engine as icon font, the icon strings defined in GUIIcons.h can be used. +void CGUITreeView::setIconFont( IGUIFont* font ) +{ + s32 height; + + if ( font ) + font->grab(); + if ( IconFont ) + { + IconFont->drop(); + } + + IconFont = font; + if( IconFont ) + { + height = IconFont->getDimension( L" " ).Height; + if( height > ItemHeight ) + { + ItemHeight = height; + } + } +} + +//! Sets the image list which should be used for the image and selected image of every node. +//! The default is 0 (no images). +void CGUITreeView::setImageList( IGUIImageList* imageList ) +{ + if (imageList ) + imageList->grab(); + if( ImageList ) + { + ImageList->drop(); + } + + ImageList = imageList; + if( ImageList ) + { + if( ImageList->getImageSize().Height + 1 > ItemHeight ) + { + ItemHeight = ImageList->getImageSize().Height + 1; + } + } +} + +} // end namespace gui +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_GUI_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.d new file mode 100644 index 0000000..99cf790 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.d @@ -0,0 +1,19 @@ +CGUITreeView.o: CGUITreeView.cpp CGUITreeView.h \ + ../../include/IGUITreeView.h ../../include/IGUIElement.h \ + ../../include/IAttributeExchangingObject.h \ + ../../include/IReferenceCounted.h ../../include/irrTypes.h \ + ../../include/IrrCompileConfig.h ../../include/irrList.h \ + ../../include/irrAllocator.h ../../include/irrMath.h \ + ../../include/rect.h ../../include/dimension2d.h \ + ../../include/position2d.h ../../include/vector2d.h \ + ../../include/irrString.h ../../include/IEventReceiver.h \ + ../../include/ILogger.h ../../include/Keycodes.h \ + ../../include/EGUIElementTypes.h ../../include/EGUIAlignment.h \ + ../../include/IAttributes.h ../../include/SColor.h \ + ../../include/vector3d.h ../../include/line2d.h ../../include/line3d.h \ + ../../include/triangle3d.h ../../include/plane3d.h \ + ../../include/aabbox3d.h ../../include/matrix4.h \ + ../../include/quaternion.h ../../include/irrArray.h \ + ../../include/heapsort.h ../../include/IXMLReader.h \ + ../../include/irrXML.h ../../include/EAttributes.h ../../include/path.h \ + ../../include/IGUIImageList.h ../../include/irrList.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.h new file mode 100644 index 0000000..36b0280 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUITreeView.h @@ -0,0 +1,331 @@ +// This file is part of the "Irrlicht Engine". +// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de + +#ifndef __C_GUI_TREE_VIEW_H_INCLUDED__ +#define __C_GUI_TREE_VIEW_H_INCLUDED__ + +#include "IGUITreeView.h" +#include "irrList.h" + + +namespace irr +{ +namespace gui +{ + // forward declarations + class IGUIFont; + class IGUIScrollBar; + class CGUITreeView; + + //! Node for gui tree view + class CGUITreeViewNode : public IGUITreeViewNode + { + friend class CGUITreeView; + + public: + //! constructor + CGUITreeViewNode( CGUITreeView* owner, CGUITreeViewNode* parent ); + + //! destructor + ~CGUITreeViewNode(); + + //! returns the owner (tree view) of this node + virtual IGUITreeView* getOwner() const; + + //! Returns the parent node of this node. + virtual IGUITreeViewNode* getParent() const; + + //! returns the text of the node + virtual const wchar_t* getText() const + { return Text.c_str(); } + + //! sets the text of the node + virtual void setText( const wchar_t* text ); + + //! returns the icon text of the node + virtual const wchar_t* getIcon() const + { return Icon.c_str(); } + + //! sets the icon text of the node + virtual void setIcon( const wchar_t* icon ); + + //! returns the image index of the node + virtual u32 getImageIndex() const + { return ImageIndex; } + + //! sets the image index of the node + virtual void setImageIndex( u32 imageIndex ) + { ImageIndex = imageIndex; } + + //! returns the image index of the node + virtual u32 getSelectedImageIndex() const + { return SelectedImageIndex; } + + //! sets the image index of the node + virtual void setSelectedImageIndex( u32 imageIndex ) + { SelectedImageIndex = imageIndex; } + + //! returns the user data (void*) of this node + virtual void* getData() const + { return Data; } + + //! sets the user data (void*) of this node + virtual void setData( void* data ) + { Data = data; } + + //! returns the user data2 (IReferenceCounted) of this node + virtual IReferenceCounted* getData2() const + { return Data2; } + + //! sets the user data2 (IReferenceCounted) of this node + virtual void setData2( IReferenceCounted* data ) + { + if( Data2 ) + { + Data2->drop(); + } + Data2 = data; + if( Data2 ) + { + Data2->grab(); + } + } + + //! returns the child item count + virtual u32 getChildCount() const + { return Children.getSize(); } + + //! removes all children (recursive) from this node + virtual void clearChildren(); + + //! returns true if this node has child nodes + virtual bool hasChildren() const + { return !Children.empty(); } + + //! Adds a new node behind the last child node. + //! \param text text of the new node + //! \param icon icon text of the new node + //! \param imageIndex index of the image for the new node (-1 = none) + //! \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + //! \param data user data (void*) of the new node + //! \param data2 user data2 (IReferenceCounted*) of the new node + //! \return + //! returns the new node + virtual IGUITreeViewNode* addChildBack( + const wchar_t* text, + const wchar_t* icon = 0, + s32 imageIndex = -1, + s32 selectedImageIndex = -1, + void* data = 0, + IReferenceCounted* data2 = 0); + + //! Adds a new node before the first child node. + //! \param text text of the new node + //! \param icon icon text of the new node + //! \param imageIndex index of the image for the new node (-1 = none) + //! \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + //! \param data user data (void*) of the new node + //! \param data2 user data2 (IReferenceCounted*) of the new node + //! \return + //! returns the new node + virtual IGUITreeViewNode* addChildFront( + const wchar_t* text, + const wchar_t* icon = 0, + s32 imageIndex = -1, + s32 selectedImageIndex = -1, + void* data = 0, + IReferenceCounted* data2 = 0 ); + + //! Adds a new node behind the other node. + //! The other node has also te be a child node from this node. + //! \param text text of the new node + //! \param icon icon text of the new node + //! \param imageIndex index of the image for the new node (-1 = none) + //! \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + //! \param data user data (void*) of the new node + //! \param data2 user data2 (IReferenceCounted*) of the new node + //! \return + //! returns the new node or 0 if other is no child node from this + virtual IGUITreeViewNode* insertChildAfter( + IGUITreeViewNode* other, + const wchar_t* text, + const wchar_t* icon = 0, + s32 imageIndex = -1, + s32 selectedImageIndex = -1, + void* data = 0, + IReferenceCounted* data2 = 0 ); + + //! Adds a new node before the other node. + //! The other node has also te be a child node from this node. + //! \param text text of the new node + //! \param icon icon text of the new node + //! \param imageIndex index of the image for the new node (-1 = none) + //! \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) + //! \param data user data (void*) of the new node + //! \param data2 user data2 (IReferenceCounted*) of the new node + //! \return + //! returns the new node or 0 if other is no child node from this + virtual IGUITreeViewNode* insertChildBefore( + IGUITreeViewNode* other, + const wchar_t* text, + const wchar_t* icon = 0, + s32 imageIndex = -1, + s32 selectedImageIndex = -1, + void* data = 0, + IReferenceCounted* data2 = 0 ); + + //! Return the first child note from this node. + virtual IGUITreeViewNode* getFirstChild() const; + + //! Return the last child note from this node. + virtual IGUITreeViewNode* getLastChild() const; + + //! Returns the preverse sibling node from this node. + virtual IGUITreeViewNode* getPrevSibling() const; + + //! Returns the next sibling node from this node. + virtual IGUITreeViewNode* getNextSibling() const; + + //! Returns the next visible (expanded, may be out of scrolling) node from this node. + virtual IGUITreeViewNode* getNextVisible() const; + + //! Deletes a child node. + virtual bool deleteChild( IGUITreeViewNode* child ); + + //! Moves a child node one position up. + virtual bool moveChildUp( IGUITreeViewNode* child ); + + //! Moves a child node one position down. + virtual bool moveChildDown( IGUITreeViewNode* child ); + + //! Returns true if the node is expanded (children are visible). + virtual bool getExpanded() const + { return Expanded; } + + //! Sets if the node is expanded. + virtual void setExpanded( bool expanded ); + + //! Returns true if the node is currently selected. + virtual bool getSelected() const; + + //! Sets this node as selected. + virtual void setSelected( bool selected ); + + //! Returns true if this node is the root node. + virtual bool isRoot() const; + + //! Returns the level of this node. + virtual s32 getLevel() const; + + //! Returns true if this node is visible (all parents are expanded). + virtual bool isVisible() const; + + private: + + CGUITreeView* Owner; + CGUITreeViewNode* Parent; + core::stringw Text; + core::stringw Icon; + s32 ImageIndex; + s32 SelectedImageIndex; + void* Data; + IReferenceCounted* Data2; + bool Expanded; + core::list<CGUITreeViewNode*> Children; + }; + + + //! Default tree view GUI element. + class CGUITreeView : public IGUITreeView + { + friend class CGUITreeViewNode; + + public: + //! constructor + CGUITreeView( IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect<s32> rectangle, bool clip = true, + bool drawBack = false, bool scrollBarVertical = true, bool scrollBarHorizontal = true ); + + //! destructor + virtual ~CGUITreeView(); + + //! returns the root node (not visible) from the tree. + virtual IGUITreeViewNode* getRoot() const + { return Root; } + + //! returns the selected node of the tree or 0 if none is selected + virtual IGUITreeViewNode* getSelected() const + { return Selected; } + + //! returns true if the tree lines are visible + virtual bool getLinesVisible() const + { return LinesVisible; } + + //! sets if the tree lines are visible + virtual void setLinesVisible( bool visible ) + { LinesVisible = visible; } + + //! called if an event happened. + virtual bool OnEvent( const SEvent &event ); + + //! draws the element and its children + virtual void draw(); + + //! Sets the font which should be used as icon font. This font is set to the Irrlicht engine + //! built-in-font by default. Icons can be displayed in front of every list item. + //! An icon is a string, displayed with the icon font. When using the build-in-font of the + //! Irrlicht engine as icon font, the icon strings defined in GUIIcons.h can be used. + virtual void setIconFont( IGUIFont* font ); + + //! Sets the image list which should be used for the image and selected image of every node. + //! The default is 0 (no images). + virtual void setImageList( IGUIImageList* imageList ); + + //! Returns the image list which is used for the nodes. + virtual IGUIImageList* getImageList() const + { return ImageList; } + + //! Sets if the image is left of the icon. Default is true. + virtual void setImageLeftOfIcon( bool bLeftOf ) + { ImageLeftOfIcon = bLeftOf; } + + //! Returns if the Image is left of the icon. Default is true. + virtual bool getImageLeftOfIcon() const + { return ImageLeftOfIcon; } + + //! Returns the node which is associated to the last event. + virtual IGUITreeViewNode* getLastEventNode() const + { return LastEventNode; } + + private: + //! calculates the heigth of an node and of all visible nodes. + void recalculateItemHeight(); + + //! executes an mouse action (like selectNew of CGUIListBox) + void mouseAction( s32 xpos, s32 ypos, bool onlyHover = false ); + + CGUITreeViewNode* Root; + IGUITreeViewNode* Selected; + s32 ItemHeight; + s32 IndentWidth; + s32 TotalItemHeight; + s32 TotalItemWidth; + IGUIFont* Font; + IGUIFont* IconFont; + IGUIScrollBar* ScrollBarH; + IGUIScrollBar* ScrollBarV; + IGUIImageList* ImageList; + IGUITreeViewNode* LastEventNode; + bool LinesVisible; + bool Selecting; + bool Clip; + bool DrawBack; + bool ImageLeftOfIcon; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.cpp new file mode 100644 index 0000000..9769750 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.cpp @@ -0,0 +1,404 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUIWindow.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IGUIButton.h" +#include "IGUIFont.h" +#include "IGUIFontBitmap.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) +: IGUIWindow(environment, parent, id, rectangle), Dragging(false), IsDraggable(true), DrawBackground(true), DrawTitlebar(true), IsActive(false) +{ + #ifdef _DEBUG + setDebugName("CGUIWindow"); + #endif + + IGUISkin* skin = 0; + if (environment) + skin = environment->getSkin(); + + CurrentIconColor = video::SColor(255,255,255,255); + + s32 buttonw = 15; + if (skin) + { + buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + } + s32 posx = RelativeRect.getWidth() - buttonw - 4; + + CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, + L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" ); + CloseButton->setSubElement(true); + CloseButton->setTabStop(false); + CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + posx -= buttonw + 2; + + RestoreButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, + L"", skin ? skin->getDefaultText(EGDT_WINDOW_RESTORE) : L"Restore" ); + RestoreButton->setVisible(false); + RestoreButton->setSubElement(true); + RestoreButton->setTabStop(false); + RestoreButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + posx -= buttonw + 2; + + MinButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, + L"", skin ? skin->getDefaultText(EGDT_WINDOW_MINIMIZE) : L"Minimize" ); + MinButton->setVisible(false); + MinButton->setSubElement(true); + MinButton->setTabStop(false); + MinButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + + MinButton->grab(); + RestoreButton->grab(); + CloseButton->grab(); + + // this element is a tab group + setTabGroup(true); + setTabStop(true); + setTabOrder(-1); + + refreshSprites(); + updateClientRect(); +} + + +//! destructor +CGUIWindow::~CGUIWindow() +{ + if (MinButton) + MinButton->drop(); + + if (RestoreButton) + RestoreButton->drop(); + + if (CloseButton) + CloseButton->drop(); +} + +void CGUIWindow::refreshSprites() +{ + if (!Environment) + return; + IGUISkin* skin = Environment->getSkin(); + if ( !skin ) + return; + + IGUISpriteBank* sprites = skin->getSpriteBank(); + if ( !sprites ) + return; + + CurrentIconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + + if (sprites) + { + CloseButton->setSpriteBank(sprites); + CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), CurrentIconColor); + CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), CurrentIconColor); + + RestoreButton->setSpriteBank(sprites); + RestoreButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESTORE), CurrentIconColor); + RestoreButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESTORE), CurrentIconColor); + + MinButton->setSpriteBank(sprites); + MinButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_MINIMIZE), CurrentIconColor); + MinButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_MINIMIZE), CurrentIconColor); + } +} + +//! called if an event happened. +bool CGUIWindow::OnEvent(const SEvent& event) +{ + if (isEnabled()) + { + + switch(event.EventType) + { + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + Dragging = false; + IsActive = false; + } + else + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUSED) + { + if (Parent && ((event.GUIEvent.Caller == this) || isMyChild(event.GUIEvent.Caller))) + { + Parent->bringToFront(this); + IsActive = true; + } + else + { + IsActive = false; + } + } + else + if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) + { + if (event.GUIEvent.Caller == CloseButton) + { + if (Parent) + { + // send close event to parent + SEvent e; + e.EventType = EET_GUI_EVENT; + e.GUIEvent.Caller = this; + e.GUIEvent.Element = 0; + e.GUIEvent.EventType = EGET_ELEMENT_CLOSED; + + // if the event was not absorbed + if (!Parent->OnEvent(e)) + remove(); + + return true; + + } + else + { + remove(); + return true; + } + } + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + Dragging = IsDraggable; + if (Parent) + Parent->bringToFront(this); + return true; + case EMIE_LMOUSE_LEFT_UP: + Dragging = false; + return true; + case EMIE_MOUSE_MOVED: + if (!event.MouseInput.isLeftPressed()) + Dragging = false; + + if (Dragging) + { + // gui window should not be dragged outside its parent + if (Parent && + (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || + event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || + event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || + event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1)) + return true; + + move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + return true; + } + break; + default: + break; + } + default: + break; + } + } + + return IGUIElement::OnEvent(event); +} + + +//! Updates the absolute position. +void CGUIWindow::updateAbsolutePosition() +{ + IGUIElement::updateAbsolutePosition(); +} + + +//! draws the element and its children +void CGUIWindow::draw() +{ + if (IsVisible) + { + IGUISkin* skin = Environment->getSkin(); + + + // update each time because the skin is allowed to change this always. + updateClientRect(); + + if ( CurrentIconColor != skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL) ) + refreshSprites(); + + core::rect<s32> rect = AbsoluteRect; + + // draw body fast + if (DrawBackground) + { + rect = skin->draw3DWindowBackground(this, DrawTitlebar, + skin->getColor(IsActive ? EGDC_ACTIVE_BORDER : EGDC_INACTIVE_BORDER), + AbsoluteRect, &AbsoluteClippingRect); + + if (DrawTitlebar && Text.size()) + { + rect.UpperLeftCorner.X += skin->getSize(EGDS_TITLEBARTEXT_DISTANCE_X); + rect.UpperLeftCorner.Y += skin->getSize(EGDS_TITLEBARTEXT_DISTANCE_Y); + rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; + + IGUIFont* font = skin->getFont(EGDF_WINDOW); + if (font) + { + font->draw(Text.c_str(), rect, + skin->getColor(IsActive ? EGDC_ACTIVE_CAPTION:EGDC_INACTIVE_CAPTION), + false, true, &AbsoluteClippingRect); + } + } + } + } + + IGUIElement::draw(); +} + + +//! Returns pointer to the close button +IGUIButton* CGUIWindow::getCloseButton() const +{ + return CloseButton; +} + + +//! Returns pointer to the minimize button +IGUIButton* CGUIWindow::getMinimizeButton() const +{ + return MinButton; +} + + +//! Returns pointer to the maximize button +IGUIButton* CGUIWindow::getMaximizeButton() const +{ + return RestoreButton; +} + + +//! Returns true if the window is draggable, false if not +bool CGUIWindow::isDraggable() const +{ + return IsDraggable; +} + + +//! Sets whether the window is draggable +void CGUIWindow::setDraggable(bool draggable) +{ + IsDraggable = draggable; + + if (Dragging && !IsDraggable) + Dragging = false; +} + + +//! Set if the window background will be drawn +void CGUIWindow::setDrawBackground(bool draw) +{ + DrawBackground = draw; +} + + +//! Get if the window background will be drawn +bool CGUIWindow::getDrawBackground() const +{ + return DrawBackground; +} + + +//! Set if the window titlebar will be drawn +void CGUIWindow::setDrawTitlebar(bool draw) +{ + DrawTitlebar = draw; +} + + +//! Get if the window titlebar will be drawn +bool CGUIWindow::getDrawTitlebar() const +{ + return DrawTitlebar; +} + + +void CGUIWindow::updateClientRect() +{ + if (! DrawBackground ) + { + ClientRect = core::rect<s32>(0,0, AbsoluteRect.getWidth(), AbsoluteRect.getHeight()); + return; + } + IGUISkin* skin = Environment->getSkin(); + skin->draw3DWindowBackground(this, DrawTitlebar, + skin->getColor(IsActive ? EGDC_ACTIVE_BORDER : EGDC_INACTIVE_BORDER), + AbsoluteRect, &AbsoluteClippingRect, &ClientRect); + ClientRect -= AbsoluteRect.UpperLeftCorner; +} + + +//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) +core::rect<s32> CGUIWindow::getClientRect() const +{ + return ClientRect; +} + + +//! Writes attributes of the element. +void CGUIWindow::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const +{ + IGUIWindow::serializeAttributes(out,options); + + out->addBool("IsDraggable", IsDraggable); + out->addBool("DrawBackground", DrawBackground); + out->addBool("DrawTitlebar", DrawTitlebar); + + // Currently we can't just serialize attributes of sub-elements. + // To do this we either + // a) allow further serialization after attribute serialiation (second function, callback or event) + // b) add an IGUIElement attribute + // c) extend the attribute system to allow attributes to have sub-attributes + // We just serialize the most important info for now until we can do one of the above solutions. + out->addBool("IsCloseVisible", CloseButton->isVisible()); + out->addBool("IsMinVisible", MinButton->isVisible()); + out->addBool("IsRestoreVisible", RestoreButton->isVisible()); +} + + +//! Reads attributes of the element +void CGUIWindow::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) +{ +IGUIWindow::deserializeAttributes(in,options); + + Dragging = false; + IsActive = false; + IsDraggable = in->getAttributeAsBool("IsDraggable"); + DrawBackground = in->getAttributeAsBool("DrawBackground"); + DrawTitlebar = in->getAttributeAsBool("DrawTitlebar"); + + CloseButton->setVisible(in->getAttributeAsBool("IsCloseVisible")); + MinButton->setVisible(in->getAttributeAsBool("IsMinVisible")); + RestoreButton->setVisible(in->getAttributeAsBool("IsRestoreVisible")); + + updateClientRect(); +} + + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.d b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.d new file mode 100644 index 0000000..de3a6d4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.d @@ -0,0 +1,2 @@ +CGUIWindow.o: CGUIWindow.cpp CGUIWindow.h \ + ../../include/IrrCompileConfig.h diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.h new file mode 100644 index 0000000..980da59 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIWindow.h @@ -0,0 +1,99 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_WINDOW_H_INCLUDED__ +#define __C_GUI_WINDOW_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include "IGUIWindow.h" + +namespace irr +{ +namespace gui +{ + class IGUIButton; + + class CGUIWindow : public IGUIWindow + { + public: + + //! constructor + CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle); + + //! destructor + virtual ~CGUIWindow(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent& event); + + //! update absolute position + virtual void updateAbsolutePosition(); + + //! draws the element and its children + virtual void draw(); + + //! Returns pointer to the close button + virtual IGUIButton* getCloseButton() const; + + //! Returns pointer to the minimize button + virtual IGUIButton* getMinimizeButton() const; + + //! Returns pointer to the maximize button + virtual IGUIButton* getMaximizeButton() const; + + //! Returns true if the window is draggable, false if not + virtual bool isDraggable() const; + + //! Sets whether the window is draggable + virtual void setDraggable(bool draggable); + + //! Set if the window background will be drawn + virtual void setDrawBackground(bool draw); + + //! Get if the window background will be drawn + virtual bool getDrawBackground() const; + + //! Set if the window titlebar will be drawn + //! Note: If the background is not drawn, then the titlebar is automatically also not drawn + virtual void setDrawTitlebar(bool draw); + + //! Get if the window titlebar will be drawn + virtual bool getDrawTitlebar() const; + + //! Returns the rectangle of the drawable area (without border and without titlebar) + virtual core::rect<s32> getClientRect() const; + + //! Writes attributes of the element. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the element + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + protected: + + void updateClientRect(); + void refreshSprites(); + + IGUIButton* CloseButton; + IGUIButton* MinButton; + IGUIButton* RestoreButton; + core::rect<s32> ClientRect; + video::SColor CurrentIconColor; + + core::position2d<s32> DragStart; + bool Dragging, IsDraggable; + bool DrawBackground; + bool DrawTitlebar; + bool IsActive; + }; + +} // end namespace gui +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_GUI_ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.cpp new file mode 100644 index 0000000..c592833 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.cpp @@ -0,0 +1,892 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGeometryCreator.h" +#include "SAnimatedMesh.h" +#include "SMeshBuffer.h" +#include "SMesh.h" +#include "IMesh.h" +#include "IVideoDriver.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +IMesh* CGeometryCreator::createCubeMesh(const core::vector3df& size) const +{ + SMeshBuffer* buffer = new SMeshBuffer(); + + // Create indices + const u16 u[36] = { 0,2,1, 0,3,2, 1,5,4, 1,2,5, 4,6,7, 4,5,6, + 7,3,0, 7,6,3, 9,5,2, 9,8,5, 0,11,10, 0,10,7}; + + buffer->Indices.set_used(36); + + for (u32 i=0; i<36; ++i) + buffer->Indices[i] = u[i]; + + + // Create vertices + video::SColor clr(255,255,255,255); + + buffer->Vertices.reallocate(12); + + buffer->Vertices.push_back(video::S3DVertex(0,0,0, -1,-1,-1, clr, 0, 1)); + buffer->Vertices.push_back(video::S3DVertex(1,0,0, 1,-1,-1, clr, 1, 1)); + buffer->Vertices.push_back(video::S3DVertex(1,1,0, 1, 1,-1, clr, 1, 0)); + buffer->Vertices.push_back(video::S3DVertex(0,1,0, -1, 1,-1, clr, 0, 0)); + buffer->Vertices.push_back(video::S3DVertex(1,0,1, 1,-1, 1, clr, 0, 1)); + buffer->Vertices.push_back(video::S3DVertex(1,1,1, 1, 1, 1, clr, 0, 0)); + buffer->Vertices.push_back(video::S3DVertex(0,1,1, -1, 1, 1, clr, 1, 0)); + buffer->Vertices.push_back(video::S3DVertex(0,0,1, -1,-1, 1, clr, 1, 1)); + buffer->Vertices.push_back(video::S3DVertex(0,1,1, -1, 1, 1, clr, 0, 1)); + buffer->Vertices.push_back(video::S3DVertex(0,1,0, -1, 1,-1, clr, 1, 1)); + buffer->Vertices.push_back(video::S3DVertex(1,0,1, 1,-1, 1, clr, 1, 0)); + buffer->Vertices.push_back(video::S3DVertex(1,0,0, 1,-1,-1, clr, 0, 0)); + + // Recalculate bounding box + buffer->BoundingBox.reset(0,0,0); + + for (u32 i=0; i<12; ++i) + { + buffer->Vertices[i].Pos -= core::vector3df(0.5f, 0.5f, 0.5f); + buffer->Vertices[i].Pos *= size; + buffer->BoundingBox.addInternalPoint(buffer->Vertices[i].Pos); + } + + SMesh* mesh = new SMesh; + mesh->addMeshBuffer(buffer); + buffer->drop(); + + mesh->recalculateBoundingBox(); + return mesh; +} + + +// creates a hill plane +IMesh* CGeometryCreator::createHillPlaneMesh( + const core::dimension2d<f32>& tileSize, + const core::dimension2d<u32>& tc, video::SMaterial* material, + f32 hillHeight, const core::dimension2d<f32>& ch, + const core::dimension2d<f32>& textureRepeatCount) const +{ + core::dimension2d<u32> tileCount = tc; + core::dimension2d<f32> countHills = ch; + + if (countHills.Width < 0.01f) + countHills.Width = 1.f; + if (countHills.Height < 0.01f) + countHills.Height = 1.f; + + // center + const core::position2d<f32> center((tileSize.Width * tileCount.Width) * 0.5f, (tileSize.Height * tileCount.Height) * 0.5f); + + // texture coord step + const core::dimension2d<f32> tx( + textureRepeatCount.Width / tileCount.Width, + textureRepeatCount.Height / tileCount.Height); + + // add one more point in each direction for proper tile count + ++tileCount.Height; + ++tileCount.Width; + + SMeshBuffer* buffer = new SMeshBuffer(); + video::S3DVertex vtx; + vtx.Color.set(255,255,255,255); + + // create vertices from left-front to right-back + u32 x; + + f32 sx=0.f, tsx=0.f; + for (x=0; x<tileCount.Width; ++x) + { + f32 sy=0.f, tsy=0.f; + for (u32 y=0; y<tileCount.Height; ++y) + { + vtx.Pos.set(sx - center.X, 0, sy - center.Y); + vtx.TCoords.set(tsx, 1.0f - tsy); + + if (core::isnotzero(hillHeight)) + vtx.Pos.Y = sinf(vtx.Pos.X * countHills.Width * core::PI / center.X) * + cosf(vtx.Pos.Z * countHills.Height * core::PI / center.Y) * + hillHeight; + + buffer->Vertices.push_back(vtx); + sy += tileSize.Height; + tsy += tx.Height; + } + sx += tileSize.Width; + tsx += tx.Width; + } + + // create indices + + for (x=0; x<tileCount.Width-1; ++x) + { + for (u32 y=0; y<tileCount.Height-1; ++y) + { + const s32 current = x*tileCount.Height + y; + + buffer->Indices.push_back(current); + buffer->Indices.push_back(current + 1); + buffer->Indices.push_back(current + tileCount.Height); + + buffer->Indices.push_back(current + 1); + buffer->Indices.push_back(current + 1 + tileCount.Height); + buffer->Indices.push_back(current + tileCount.Height); + } + } + + // recalculate normals + for (u32 i=0; i<buffer->Indices.size(); i+=3) + { + const core::vector3df normal = core::plane3d<f32>( + buffer->Vertices[buffer->Indices[i+0]].Pos, + buffer->Vertices[buffer->Indices[i+1]].Pos, + buffer->Vertices[buffer->Indices[i+2]].Pos).Normal; + + buffer->Vertices[buffer->Indices[i+0]].Normal = normal; + buffer->Vertices[buffer->Indices[i+1]].Normal = normal; + buffer->Vertices[buffer->Indices[i+2]].Normal = normal; + } + + if (material) + buffer->Material = *material; + + buffer->recalculateBoundingBox(); + buffer->setHardwareMappingHint(EHM_STATIC); + + SMesh* mesh = new SMesh(); + mesh->addMeshBuffer(buffer); + mesh->recalculateBoundingBox(); + buffer->drop(); + return mesh; +} + + +IMesh* CGeometryCreator::createTerrainMesh(video::IImage* texture, + video::IImage* heightmap, const core::dimension2d<f32>& stretchSize, + f32 maxHeight, video::IVideoDriver* driver, + const core::dimension2d<u32>& maxVtxBlockSize, + bool debugBorders) const +{ + if (!texture || !heightmap) + return 0; + + // debug border + const s32 borderSkip = debugBorders ? 0 : 1; + + video::S3DVertex vtx; + vtx.Color.set(255,255,255,255); + + SMesh* mesh = new SMesh(); + + const u32 tm = os::Timer::getRealTime()/1000; + const core::dimension2d<u32> hMapSize= heightmap->getDimension(); + const core::dimension2d<u32> tMapSize= texture->getDimension(); + const core::position2d<f32> thRel(static_cast<f32>(tMapSize.Width) / hMapSize.Width, static_cast<f32>(tMapSize.Height) / hMapSize.Height); + maxHeight /= 255.0f; // height step per color value + + core::position2d<u32> processed(0,0); + while (processed.Y<hMapSize.Height) + { + while(processed.X<hMapSize.Width) + { + core::dimension2d<u32> blockSize = maxVtxBlockSize; + if (processed.X + blockSize.Width > hMapSize.Width) + blockSize.Width = hMapSize.Width - processed.X; + if (processed.Y + blockSize.Height > hMapSize.Height) + blockSize.Height = hMapSize.Height - processed.Y; + + SMeshBuffer* buffer = new SMeshBuffer(); + buffer->setHardwareMappingHint(scene::EHM_STATIC); + buffer->Vertices.reallocate(blockSize.getArea()); + // add vertices of vertex block + u32 y; + core::vector2df pos(0.f, processed.Y*stretchSize.Height); + const core::vector2df bs(1.f/blockSize.Width, 1.f/blockSize.Height); + core::vector2df tc(0.f, 0.5f*bs.Y); + for (y=0; y<blockSize.Height; ++y) + { + pos.X=processed.X*stretchSize.Width; + tc.X=0.5f*bs.X; + for (u32 x=0; x<blockSize.Width; ++x) + { + const f32 height = heightmap->getPixel(x+processed.X, y+processed.Y).getAverage() * maxHeight; + + vtx.Pos.set(pos.X, height, pos.Y); + vtx.TCoords.set(tc); + buffer->Vertices.push_back(vtx); + pos.X += stretchSize.Width; + tc.X += bs.X; + } + pos.Y += stretchSize.Height; + tc.Y += bs.Y; + } + + buffer->Indices.reallocate((blockSize.Height-1)*(blockSize.Width-1)*6); + // add indices of vertex block + s32 c1 = 0; + for (y=0; y<blockSize.Height-1; ++y) + { + for (u32 x=0; x<blockSize.Width-1; ++x) + { + const s32 c = c1 + x; + + buffer->Indices.push_back(c); + buffer->Indices.push_back(c + blockSize.Width); + buffer->Indices.push_back(c + 1); + + buffer->Indices.push_back(c + 1); + buffer->Indices.push_back(c + blockSize.Width); + buffer->Indices.push_back(c + 1 + blockSize.Width); + } + c1 += blockSize.Width; + } + + // recalculate normals + for (u32 i=0; i<buffer->Indices.size(); i+=3) + { + const core::vector3df normal = core::plane3d<f32>( + buffer->Vertices[buffer->Indices[i+0]].Pos, + buffer->Vertices[buffer->Indices[i+1]].Pos, + buffer->Vertices[buffer->Indices[i+2]].Pos).Normal; + + buffer->Vertices[buffer->Indices[i+0]].Normal = normal; + buffer->Vertices[buffer->Indices[i+1]].Normal = normal; + buffer->Vertices[buffer->Indices[i+2]].Normal = normal; + } + + if (buffer->Vertices.size()) + { + c8 textureName[64]; + // create texture for this block + video::IImage* img = driver->createImage(texture->getColorFormat(), core::dimension2d<u32>(core::floor32(blockSize.Width*thRel.X), core::floor32(blockSize.Height*thRel.Y))); + texture->copyTo(img, core::position2di(0,0), core::recti( + core::position2d<s32>(core::floor32(processed.X*thRel.X), core::floor32(processed.Y*thRel.Y)), + core::dimension2d<u32>(core::floor32(blockSize.Width*thRel.X), core::floor32(blockSize.Height*thRel.Y))), 0); + + sprintf(textureName, "terrain%u_%u", tm, mesh->getMeshBufferCount()); + + buffer->Material.setTexture(0, driver->addTexture(textureName, img)); + + if (buffer->Material.getTexture(0)) + { + c8 tmp[255]; + sprintf(tmp, "Generated terrain texture (%dx%d): %s", + buffer->Material.getTexture(0)->getSize().Width, + buffer->Material.getTexture(0)->getSize().Height, + textureName); + os::Printer::log(tmp); + } + else + os::Printer::log("Could not create terrain texture.", textureName, ELL_ERROR); + + img->drop(); + } + + buffer->recalculateBoundingBox(); + mesh->addMeshBuffer(buffer); + buffer->drop(); + + // keep on processing + processed.X += maxVtxBlockSize.Width - borderSkip; + } + + // keep on processing + processed.X = 0; + processed.Y += maxVtxBlockSize.Height - borderSkip; + } + + mesh->recalculateBoundingBox(); + return mesh; +} + + +/* + a cylinder, a cone and a cross + point up on (0,1.f, 0.f ) +*/ +IMesh* CGeometryCreator::createArrowMesh(const u32 tesselationCylinder, + const u32 tesselationCone, + const f32 height, + const f32 cylinderHeight, + const f32 width0, + const f32 width1, + const video::SColor vtxColor0, + const video::SColor vtxColor1) const +{ + SMesh* mesh = (SMesh*)createCylinderMesh(width0, cylinderHeight, tesselationCylinder, vtxColor0, false); + + IMesh* mesh2 = createConeMesh(width1, height-cylinderHeight, tesselationCone, vtxColor1, vtxColor0); + for (u32 i=0; i<mesh2->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh2->getMeshBuffer(i); + for (u32 j=0; j<buffer->getVertexCount(); ++j) + buffer->getPosition(j).Y += cylinderHeight; + buffer->setDirty(EBT_VERTEX); + buffer->recalculateBoundingBox(); + mesh->addMeshBuffer(buffer); + } + mesh2->drop(); + mesh->setHardwareMappingHint(EHM_STATIC); + + mesh->recalculateBoundingBox(); + return mesh; +} + + +/* A sphere with proper normals and texture coords */ +IMesh* CGeometryCreator::createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY) const +{ + // thanks to Alfaz93 who made his code available for Irrlicht on which + // this one is based! + + // we are creating the sphere mesh here. + + if (polyCountX < 2) + polyCountX = 2; + if (polyCountY < 2) + polyCountY = 2; + while (polyCountX * polyCountY > 32767) // prevent u16 overflow + { + polyCountX /= 2; + polyCountY /= 2; + } + + const u32 polyCountXPitch = polyCountX+1; // get to same vertex on next level + + SMeshBuffer* buffer = new SMeshBuffer(); + + buffer->Indices.reallocate((polyCountX * polyCountY) * 6); + + const video::SColor clr(255, 255,255,255); + + u32 level = 0; + + for (u32 p1 = 0; p1 < polyCountY-1; ++p1) + { + //main quads, top to bottom + for (u32 p2 = 0; p2 < polyCountX - 1; ++p2) + { + const u32 curr = level + p2; + buffer->Indices.push_back(curr + polyCountXPitch); + buffer->Indices.push_back(curr); + buffer->Indices.push_back(curr + 1); + buffer->Indices.push_back(curr + polyCountXPitch); + buffer->Indices.push_back(curr+1); + buffer->Indices.push_back(curr + 1 + polyCountXPitch); + } + + // the connectors from front to end + buffer->Indices.push_back(level + polyCountX - 1 + polyCountXPitch); + buffer->Indices.push_back(level + polyCountX - 1); + buffer->Indices.push_back(level + polyCountX); + + buffer->Indices.push_back(level + polyCountX - 1 + polyCountXPitch); + buffer->Indices.push_back(level + polyCountX); + buffer->Indices.push_back(level + polyCountX + polyCountXPitch); + level += polyCountXPitch; + } + + const u32 polyCountSq = polyCountXPitch * polyCountY; // top point + const u32 polyCountSq1 = polyCountSq + 1; // bottom point + const u32 polyCountSqM1 = (polyCountY - 1) * polyCountXPitch; // last row's first vertex + + for (u32 p2 = 0; p2 < polyCountX - 1; ++p2) + { + // create triangles which are at the top of the sphere + + buffer->Indices.push_back(polyCountSq); + buffer->Indices.push_back(p2 + 1); + buffer->Indices.push_back(p2); + + // create triangles which are at the bottom of the sphere + + buffer->Indices.push_back(polyCountSqM1 + p2); + buffer->Indices.push_back(polyCountSqM1 + p2 + 1); + buffer->Indices.push_back(polyCountSq1); + } + + // create final triangle which is at the top of the sphere + + buffer->Indices.push_back(polyCountSq); + buffer->Indices.push_back(polyCountX); + buffer->Indices.push_back(polyCountX-1); + + // create final triangle which is at the bottom of the sphere + + buffer->Indices.push_back(polyCountSqM1 + polyCountX - 1); + buffer->Indices.push_back(polyCountSqM1); + buffer->Indices.push_back(polyCountSq1); + + // calculate the angle which separates all points in a circle + const f64 AngleX = 2 * core::PI / polyCountX; + const f64 AngleY = core::PI / polyCountY; + + u32 i=0; + f64 axz; + + // we don't start at 0. + + f64 ay = 0;//AngleY / 2; + + buffer->Vertices.set_used((polyCountXPitch * polyCountY) + 2); + for (u32 y = 0; y < polyCountY; ++y) + { + ay += AngleY; + const f64 sinay = sin(ay); + axz = 0; + + // calculate the necessary vertices without the doubled one + for (u32 xz = 0;xz < polyCountX; ++xz) + { + // calculate points position + + const core::vector3df pos(static_cast<f32>(radius * cos(axz) * sinay), + static_cast<f32>(radius * cos(ay)), + static_cast<f32>(radius * sin(axz) * sinay)); + // for spheres the normal is the position + core::vector3df normal(pos); + normal.normalize(); + + // calculate texture coordinates via sphere mapping + // tu is the same on each level, so only calculate once + f32 tu = 0.5f; + if (y==0) + { + if (normal.Y != -1.0f && normal.Y != 1.0f) + tu = static_cast<f32>(acos(core::clamp(normal.X/sinay, -1.0, 1.0)) * 0.5 *core::RECIPROCAL_PI64); + if (normal.Z < 0.0f) + tu=1-tu; + } + else + tu = buffer->Vertices[i-polyCountXPitch].TCoords.X; + buffer->Vertices[i] = video::S3DVertex(pos.X, pos.Y, pos.Z, + normal.X, normal.Y, normal.Z, + clr, tu, + static_cast<f32>(ay*core::RECIPROCAL_PI64)); + ++i; + axz += AngleX; + } + // This is the doubled vertex on the initial position + buffer->Vertices[i] = video::S3DVertex(buffer->Vertices[i-polyCountX]); + buffer->Vertices[i].TCoords.X=1.0f; + ++i; + } + + // the vertex at the top of the sphere + buffer->Vertices[i] = video::S3DVertex(0.0f,radius,0.0f, 0.0f,1.0f,0.0f, clr, 0.5f, 0.0f); + + // the vertex at the bottom of the sphere + ++i; + buffer->Vertices[i] = video::S3DVertex(0.0f,-radius,0.0f, 0.0f,-1.0f,0.0f, clr, 0.5f, 1.0f); + + // recalculate bounding box + + buffer->BoundingBox.reset(buffer->Vertices[i].Pos); + buffer->BoundingBox.addInternalPoint(buffer->Vertices[i-1].Pos); + buffer->BoundingBox.addInternalPoint(radius,0.0f,0.0f); + buffer->BoundingBox.addInternalPoint(-radius,0.0f,0.0f); + buffer->BoundingBox.addInternalPoint(0.0f,0.0f,radius); + buffer->BoundingBox.addInternalPoint(0.0f,0.0f,-radius); + + SMesh* mesh = new SMesh(); + mesh->addMeshBuffer(buffer); + buffer->drop(); + + mesh->setHardwareMappingHint(EHM_STATIC); + mesh->recalculateBoundingBox(); + return mesh; +} + + +/* A cylinder with proper normals and texture coords */ +IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length, + u32 tesselation, const video::SColor& color, + bool closeTop, f32 oblique) const +{ + SMeshBuffer* buffer = new SMeshBuffer(); + + const f32 recTesselation = core::reciprocal((f32)tesselation); + const f32 recTesselationHalf = recTesselation * 0.5f; + const f32 angleStep = (core::PI * 2.f ) * recTesselation; + const f32 angleStepHalf = angleStep*0.5f; + + u32 i; + video::S3DVertex v; + v.Color = color; + buffer->Vertices.reallocate(tesselation*4+4+(closeTop?2:1)); + buffer->Indices.reallocate((tesselation*2+1)*(closeTop?12:9)); + f32 tcx = 0.f; + for ( i = 0; i <= tesselation; ++i ) + { + const f32 angle = angleStep * i; + v.Pos.X = radius * cosf(angle); + v.Pos.Y = 0.f; + v.Pos.Z = radius * sinf(angle); + v.Normal = v.Pos; + v.Normal.normalize(); + v.TCoords.X=tcx; + v.TCoords.Y=0.f; + buffer->Vertices.push_back(v); + + v.Pos.X += oblique; + v.Pos.Y = length; + v.Normal = v.Pos; + v.Normal.normalize(); + v.TCoords.Y=1.f; + buffer->Vertices.push_back(v); + + v.Pos.X = radius * cosf(angle + angleStepHalf); + v.Pos.Y = 0.f; + v.Pos.Z = radius * sinf(angle + angleStepHalf); + v.Normal = v.Pos; + v.Normal.normalize(); + v.TCoords.X=tcx+recTesselationHalf; + v.TCoords.Y=0.f; + buffer->Vertices.push_back(v); + + v.Pos.X += oblique; + v.Pos.Y = length; + v.Normal = v.Pos; + v.Normal.normalize(); + v.TCoords.Y=1.f; + buffer->Vertices.push_back(v); + tcx += recTesselation; + } + + // indices for the main hull part + const u32 nonWrappedSize = tesselation* 4; + for (i=0; i != nonWrappedSize; i += 2) + { + buffer->Indices.push_back(i + 2); + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(i + 1); + + buffer->Indices.push_back(i + 2); + buffer->Indices.push_back(i + 1); + buffer->Indices.push_back(i + 3); + } + + // two closing quads between end and start + buffer->Indices.push_back(0); + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(i + 1); + + buffer->Indices.push_back(0); + buffer->Indices.push_back(i + 1); + buffer->Indices.push_back(1); + + // close down + v.Pos.X = 0.f; + v.Pos.Y = 0.f; + v.Pos.Z = 0.f; + v.Normal.X = 0.f; + v.Normal.Y = -1.f; + v.Normal.Z = 0.f; + v.TCoords.X = 1.f; + v.TCoords.Y = 1.f; + buffer->Vertices.push_back(v); + + u32 index = buffer->Vertices.size() - 1; + + for ( i = 0; i != nonWrappedSize; i += 2 ) + { + buffer->Indices.push_back(index); + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(i + 2); + } + + buffer->Indices.push_back(index); + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(0); + + if (closeTop) + { + // close top + v.Pos.X = oblique; + v.Pos.Y = length; + v.Pos.Z = 0.f; + v.Normal.X = 0.f; + v.Normal.Y = 1.f; + v.Normal.Z = 0.f; + v.TCoords.X = 0.f; + v.TCoords.Y = 0.f; + buffer->Vertices.push_back(v); + + index = buffer->Vertices.size() - 1; + + for ( i = 0; i != nonWrappedSize; i += 2 ) + { + buffer->Indices.push_back(i + 1); + buffer->Indices.push_back(index); + buffer->Indices.push_back(i + 3); + } + + buffer->Indices.push_back(i + 1); + buffer->Indices.push_back(index); + buffer->Indices.push_back(1); + } + + buffer->recalculateBoundingBox(); + SMesh* mesh = new SMesh(); + mesh->addMeshBuffer(buffer); + mesh->setHardwareMappingHint(EHM_STATIC); + mesh->recalculateBoundingBox(); + buffer->drop(); + return mesh; +} + + +/* A cone with proper normals and texture coords */ +IMesh* CGeometryCreator::createConeMesh(f32 radius, f32 length, u32 tesselation, + const video::SColor& colorTop, + const video::SColor& colorBottom, + f32 oblique) const +{ + SMeshBuffer* buffer = new SMeshBuffer(); + + const f32 angleStep = (core::PI * 2.f ) / tesselation; + const f32 angleStepHalf = angleStep*0.5f; + + video::S3DVertex v; + u32 i; + + v.Color = colorTop; + for ( i = 0; i != tesselation; ++i ) + { + f32 angle = angleStep * f32(i); + + v.Pos.X = radius * cosf(angle); + v.Pos.Y = 0.f; + v.Pos.Z = radius * sinf(angle); + v.Normal = v.Pos; + v.Normal.normalize(); + buffer->Vertices.push_back(v); + + angle += angleStepHalf; + v.Pos.X = radius * cosf(angle); + v.Pos.Y = 0.f; + v.Pos.Z = radius * sinf(angle); + v.Normal = v.Pos; + v.Normal.normalize(); + buffer->Vertices.push_back(v); + } + const u32 nonWrappedSize = buffer->Vertices.size() - 1; + + // close top + v.Pos.X = oblique; + v.Pos.Y = length; + v.Pos.Z = 0.f; + v.Normal.X = 0.f; + v.Normal.Y = 1.f; + v.Normal.Z = 0.f; + buffer->Vertices.push_back(v); + + u32 index = buffer->Vertices.size() - 1; + + for ( i = 0; i != nonWrappedSize; i += 1 ) + { + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(index); + buffer->Indices.push_back(i + 1); + } + + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(index); + buffer->Indices.push_back(0); + + // close down + v.Color = colorBottom; + v.Pos.X = 0.f; + v.Pos.Y = 0.f; + v.Pos.Z = 0.f; + v.Normal.X = 0.f; + v.Normal.Y = -1.f; + v.Normal.Z = 0.f; + buffer->Vertices.push_back(v); + + index = buffer->Vertices.size() - 1; + + for ( i = 0; i != nonWrappedSize; i += 1 ) + { + buffer->Indices.push_back(index); + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(i + 1); + } + + buffer->Indices.push_back(index); + buffer->Indices.push_back(i + 0); + buffer->Indices.push_back(0); + + buffer->recalculateBoundingBox(); + SMesh* mesh = new SMesh(); + mesh->addMeshBuffer(buffer); + buffer->drop(); + + mesh->setHardwareMappingHint(EHM_STATIC); + mesh->recalculateBoundingBox(); + return mesh; +} + + +void CGeometryCreator::addToBuffer(const video::S3DVertex& v, SMeshBuffer* Buffer) const +{ + const s32 tnidx = Buffer->Vertices.linear_reverse_search(v); + const bool alreadyIn = (tnidx != -1); + u16 nidx = (u16)tnidx; + if (!alreadyIn) + { + nidx = (u16)Buffer->Vertices.size(); + Buffer->Indices.push_back(nidx); + Buffer->Vertices.push_back(v); + } + else + Buffer->Indices.push_back(nidx); +} + + +IMesh* CGeometryCreator::createVolumeLightMesh( + const u32 subdivideU, const u32 subdivideV, + const video::SColor footColor, const video::SColor tailColor, + const f32 lpDistance, const core::vector3df& lightDim) const +{ + SMeshBuffer* Buffer = new SMeshBuffer(); + Buffer->setHardwareMappingHint(EHM_STATIC); + + const core::vector3df lightPoint(0, -(lpDistance*lightDim.Y), 0); + const f32 ax = lightDim.X * 0.5f; // X Axis + const f32 az = lightDim.Z * 0.5f; // Z Axis + + Buffer->Vertices.clear(); + Buffer->Vertices.reallocate(6+12*(subdivideU+subdivideV)); + Buffer->Indices.clear(); + Buffer->Indices.reallocate(6+12*(subdivideU+subdivideV)); + //draw the bottom foot.. the glowing region + addToBuffer(video::S3DVertex(-ax, 0, az, 0,0,0, footColor, 0, 1),Buffer); + addToBuffer(video::S3DVertex( ax, 0, az, 0,0,0, footColor, 1, 1),Buffer); + addToBuffer(video::S3DVertex( ax, 0,-az, 0,0,0, footColor, 1, 0),Buffer); + + addToBuffer(video::S3DVertex( ax, 0,-az, 0,0,0, footColor, 1, 0),Buffer); + addToBuffer(video::S3DVertex(-ax, 0,-az, 0,0,0, footColor, 0, 0),Buffer); + addToBuffer(video::S3DVertex(-ax, 0, az, 0,0,0, footColor, 0, 1),Buffer); + + f32 tu = 0.f; + const f32 tuStep = 1.f/subdivideU; + f32 bx = -ax; + const f32 bxStep = lightDim.X * tuStep; + // Slices in X/U space + for (u32 i = 0; i <= subdivideU; ++i) + { + // These are the two endpoints for a slice at the foot + core::vector3df end1(bx, 0.0f, -az); + core::vector3df end2(bx, 0.0f, az); + + end1 -= lightPoint; // get a vector from point to lightsource + end1.normalize(); // normalize vector + end1 *= lightDim.Y; // multiply it out by shootlength + + end1.X += bx; // Add the original point location to the vector + end1.Z -= az; + + // Do it again for the other point. + end2 -= lightPoint; + end2.normalize(); + end2 *= lightDim.Y; + + end2.X += bx; + end2.Z += az; + + addToBuffer(video::S3DVertex(bx , 0, az, 0,0,0, footColor, tu, 1),Buffer); + addToBuffer(video::S3DVertex(bx , 0, -az, 0,0,0, footColor, tu, 0),Buffer); + addToBuffer(video::S3DVertex(end2.X , end2.Y, end2.Z, 0,0,0, tailColor, tu, 1),Buffer); + + addToBuffer(video::S3DVertex(bx , 0, -az, 0,0,0, footColor, tu, 0),Buffer); + addToBuffer(video::S3DVertex(end1.X , end1.Y, end1.Z, 0,0,0, tailColor, tu, 0),Buffer); + addToBuffer(video::S3DVertex(end2.X , end2.Y, end2.Z, 0,0,0, tailColor, tu, 1),Buffer); + + //back side + addToBuffer(video::S3DVertex(-end2.X , end2.Y, -end2.Z, 0,0,0, tailColor, tu, 1),Buffer); + addToBuffer(video::S3DVertex(-bx , 0, -az, 0,0,0, footColor, tu, 1),Buffer); + addToBuffer(video::S3DVertex(-bx , 0, az, 0,0,0, footColor, tu, 0),Buffer); + + addToBuffer(video::S3DVertex(-bx , 0, az, 0,0,0, footColor, tu, 0),Buffer); + addToBuffer(video::S3DVertex(-end1.X , end1.Y, -end1.Z, 0,0,0, tailColor, tu, 0),Buffer); + addToBuffer(video::S3DVertex(-end2.X , end2.Y, -end2.Z, 0,0,0, tailColor, tu, 1),Buffer); + tu += tuStep; + bx += bxStep; + } + + f32 tv = 0.f; + const f32 tvStep = 1.f/subdivideV; + f32 bz = -az; + const f32 bzStep = lightDim.Z * tvStep; + // Slices in Z/V space + for(u32 i = 0; i <= subdivideV; ++i) + { + // These are the two endpoints for a slice at the foot + core::vector3df end1(-ax, 0.0f, bz); + core::vector3df end2(ax, 0.0f, bz); + + end1 -= lightPoint; // get a vector from point to lightsource + end1.normalize(); // normalize vector + end1 *= lightDim.Y; // multiply it out by shootlength + + end1.X -= ax; // Add the original point location to the vector + end1.Z += bz; + + // Do it again for the other point. + end2 -= lightPoint; + end2.normalize(); + end2 *= lightDim.Y; + + end2.X += ax; + end2.Z += bz; + + addToBuffer(video::S3DVertex(-ax , 0, bz, 0,0,0, footColor, 0, tv),Buffer); + addToBuffer(video::S3DVertex(ax , 0, bz, 0,0,0, footColor, 1, tv),Buffer); + addToBuffer(video::S3DVertex(end2.X , end2.Y, end2.Z, 0,0,0, tailColor, 1, tv),Buffer); + + addToBuffer(video::S3DVertex(end2.X , end2.Y, end2.Z, 0,0,0, tailColor, 1, tv),Buffer); + addToBuffer(video::S3DVertex(end1.X , end1.Y, end1.Z, 0,0,0, tailColor, 0, tv),Buffer); + addToBuffer(video::S3DVertex(-ax , 0, bz, 0,0,0, footColor, 0, tv),Buffer); + + //back side + addToBuffer(video::S3DVertex(ax , 0, -bz, 0,0,0, footColor, 0, tv),Buffer); + addToBuffer(video::S3DVertex(-ax , 0, -bz, 0,0,0, footColor, 1, tv),Buffer); + addToBuffer(video::S3DVertex(-end2.X , end2.Y, -end2.Z, 0,0,0, tailColor, 1, tv),Buffer); + + addToBuffer(video::S3DVertex(-end2.X , end2.Y, -end2.Z, 0,0,0, tailColor, 1, tv),Buffer); + addToBuffer(video::S3DVertex(-end1.X , end1.Y, -end1.Z, 0,0,0, tailColor, 0, tv),Buffer); + addToBuffer(video::S3DVertex(ax , 0, -bz, 0,0,0, footColor, 0, tv),Buffer); + tv += tvStep; + bz += bzStep; + } + + Buffer->recalculateBoundingBox(); + + Buffer->Material.MaterialType = video::EMT_ONETEXTURE_BLEND; + Buffer->Material.MaterialTypeParam = pack_textureBlendFunc( video::EBF_SRC_COLOR, video::EBF_SRC_ALPHA, video::EMFN_MODULATE_1X ); + + Buffer->Material.Lighting = false; + Buffer->Material.ZWriteEnable = false; + + Buffer->setDirty(EBT_VERTEX_AND_INDEX); + + Buffer->recalculateBoundingBox(); + SMesh* mesh = new SMesh(); + mesh->addMeshBuffer(Buffer); + Buffer->drop(); + + mesh->recalculateBoundingBox(); + return mesh; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.h new file mode 100644 index 0000000..326e11c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGeometryCreator.h @@ -0,0 +1,65 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GEOMETRY_CREATOR_H_INCLUDED__ +#define __C_GEOMETRY_CREATOR_H_INCLUDED__ + +#include "IGeometryCreator.h" +#include "SMeshBuffer.h" + +namespace irr +{ + +namespace scene +{ + +//! class for creating geometry on the fly +class CGeometryCreator : public IGeometryCreator +{ + void addToBuffer(const video::S3DVertex& v, SMeshBuffer* Buffer) const; +public: + IMesh* createCubeMesh(const core::vector3df& size) const; + + IMesh* createHillPlaneMesh( + const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount, + video::SMaterial* material, f32 hillHeight, const core::dimension2d<f32>& countHills, + const core::dimension2d<f32>& textureRepeatCount) const; + + IMesh* createTerrainMesh(video::IImage* texture, + video::IImage* heightmap, const core::dimension2d<f32>& stretchSize, + f32 maxHeight, video::IVideoDriver* driver, + const core::dimension2d<u32>& defaultVertexBlockSize, + bool debugBorders=false) const; + + IMesh* createArrowMesh(const u32 tesselationCylinder, + const u32 tesselationCone, const f32 height, + const f32 cylinderHeight, const f32 width0, + const f32 width1, const video::SColor vtxColor0, + const video::SColor vtxColor1) const; + + IMesh* createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY) const; + + IMesh* createCylinderMesh(f32 radius, f32 length, u32 tesselation, + const video::SColor& color=0xffffffff, + bool closeTop=true, f32 oblique=0.f) const; + + IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation, + const video::SColor& colorTop=0xffffffff, + const video::SColor& colorBottom=0xffffffff, + f32 oblique=0.f) const; + + IMesh* createVolumeLightMesh( + const u32 subdivideU=32, const u32 subdivideV=32, + const video::SColor footColor=0xffffffff, + const video::SColor tailColor=0xffffffff, + const f32 lpDistance = 8.f, + const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImage.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImage.cpp new file mode 100644 index 0000000..d567732 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImage.cpp @@ -0,0 +1,462 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImage.h" +#include "irrString.h" +#include "CColorConverter.h" +#include "CBlit.h" + +namespace irr +{ +namespace video +{ + +//! Constructor of empty image +CImage::CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) +:Data(0), Size(size), Format(format), DeleteMemory(true) +{ + initData(); +} + + +//! Constructor from raw data +CImage::CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size, void* data, + bool ownForeignMemory, bool deleteForeignMemory) +: Data(0), Size(size), Format(format), DeleteMemory(deleteForeignMemory) +{ + if (ownForeignMemory) + { + Data = (u8*)0xbadf00d; + initData(); + Data = (u8*)data; + } + else + { + Data = 0; + initData(); + memcpy(Data, data, Size.Height * Pitch); + } +} + + +//! assumes format and size has been set and creates the rest +void CImage::initData() +{ +#ifdef _DEBUG + setDebugName("CImage"); +#endif + BytesPerPixel = getBitsPerPixelFromFormat(Format) / 8; + + // Pitch should be aligned... + Pitch = BytesPerPixel * Size.Width; + + if (!Data) + { + DeleteMemory=true; + Data = new u8[Size.Height * Pitch]; + } +} + + +//! destructor +CImage::~CImage() +{ + if ( DeleteMemory ) + delete [] Data; +} + + +//! Returns width and height of image data. +const core::dimension2d<u32>& CImage::getDimension() const +{ + return Size; +} + + +//! Returns bits per pixel. +u32 CImage::getBitsPerPixel() const +{ + return getBitsPerPixelFromFormat(Format); +} + + +//! Returns bytes per pixel +u32 CImage::getBytesPerPixel() const +{ + return BytesPerPixel; +} + + +//! Returns image data size in bytes +u32 CImage::getImageDataSizeInBytes() const +{ + return Pitch * Size.Height; +} + + +//! Returns image data size in pixels +u32 CImage::getImageDataSizeInPixels() const +{ + return Size.Width * Size.Height; +} + + +//! returns mask for red value of a pixel +u32 CImage::getRedMask() const +{ + switch(Format) + { + case ECF_A1R5G5B5: + return 0x1F<<10; + case ECF_R5G6B5: + return 0x1F<<11; + case ECF_R8G8B8: + return 0x00FF0000; + case ECF_A8R8G8B8: + return 0x00FF0000; + default: + return 0x0; + } +} + + +//! returns mask for green value of a pixel +u32 CImage::getGreenMask() const +{ + switch(Format) + { + case ECF_A1R5G5B5: + return 0x1F<<5; + case ECF_R5G6B5: + return 0x3F<<5; + case ECF_R8G8B8: + return 0x0000FF00; + case ECF_A8R8G8B8: + return 0x0000FF00; + default: + return 0x0; + } +} + + +//! returns mask for blue value of a pixel +u32 CImage::getBlueMask() const +{ + switch(Format) + { + case ECF_A1R5G5B5: + return 0x1F; + case ECF_R5G6B5: + return 0x1F; + case ECF_R8G8B8: + return 0x000000FF; + case ECF_A8R8G8B8: + return 0x000000FF; + default: + return 0x0; + } +} + + +//! returns mask for alpha value of a pixel +u32 CImage::getAlphaMask() const +{ + switch(Format) + { + case ECF_A1R5G5B5: + return 0x1<<15; + case ECF_R5G6B5: + return 0x0; + case ECF_R8G8B8: + return 0x0; + case ECF_A8R8G8B8: + return 0xFF000000; + default: + return 0x0; + } +} + + +//! sets a pixel +void CImage::setPixel(u32 x, u32 y, const SColor &color, bool blend) +{ + if (x >= Size.Width || y >= Size.Height) + return; + + switch(Format) + { + case ECF_A1R5G5B5: + { + u16 * dest = (u16*) (Data + ( y * Pitch ) + ( x << 1 )); + *dest = video::A8R8G8B8toA1R5G5B5( color.color ); + } break; + + case ECF_R5G6B5: + { + u16 * dest = (u16*) (Data + ( y * Pitch ) + ( x << 1 )); + *dest = video::A8R8G8B8toR5G6B5( color.color ); + } break; + + case ECF_R8G8B8: + { + u8* dest = Data + ( y * Pitch ) + ( x * 3 ); + dest[0] = (u8)color.getRed(); + dest[1] = (u8)color.getGreen(); + dest[2] = (u8)color.getBlue(); + } break; + + case ECF_A8R8G8B8: + { + u32 * dest = (u32*) (Data + ( y * Pitch ) + ( x << 2 )); + *dest = blend ? PixelBlend32 ( *dest, color.color ) : color.color; + } break; +#ifndef _DEBUG + default: + break; +#endif + } +} + + +//! returns a pixel +SColor CImage::getPixel(u32 x, u32 y) const +{ + if (x >= Size.Width || y >= Size.Height) + return SColor(0); + + switch(Format) + { + case ECF_A1R5G5B5: + return A1R5G5B5toA8R8G8B8(((u16*)Data)[y*Size.Width + x]); + case ECF_R5G6B5: + return R5G6B5toA8R8G8B8(((u16*)Data)[y*Size.Width + x]); + case ECF_A8R8G8B8: + return ((u32*)Data)[y*Size.Width + x]; + case ECF_R8G8B8: + { + u8* p = Data+(y*3)*Size.Width + (x*3); + return SColor(255,p[0],p[1],p[2]); + } +#ifndef _DEBUG + default: + break; +#endif + } + + return SColor(0); +} + + +//! returns the color format +ECOLOR_FORMAT CImage::getColorFormat() const +{ + return Format; +} + + +//! copies this surface into another at given position +void CImage::copyTo(IImage* target, const core::position2d<s32>& pos) +{ + Blit(BLITTER_TEXTURE, target, 0, &pos, this, 0, 0); +} + + +//! copies this surface partially into another at given position +void CImage::copyTo(IImage* target, const core::position2d<s32>& pos, const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect) +{ + Blit(BLITTER_TEXTURE, target, clipRect, &pos, this, &sourceRect, 0); +} + + +//! copies this surface into another, using the alpha mask, a cliprect and a color to add with +void CImage::copyToWithAlpha(IImage* target, const core::position2d<s32>& pos, const core::rect<s32>& sourceRect, const SColor &color, const core::rect<s32>* clipRect) +{ + // color blend only necessary on not full spectrum aka. color.color != 0xFFFFFFFF + Blit(color.color == 0xFFFFFFFF ? BLITTER_TEXTURE_ALPHA_BLEND: BLITTER_TEXTURE_ALPHA_COLOR_BLEND, + target, clipRect, &pos, this, &sourceRect, color.color); +} + + +//! copies this surface into another, scaling it to the target image size +// note: this is very very slow. +void CImage::copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format, u32 pitch) +{ + if (!target || !width || !height) + return; + + const u32 bpp=getBitsPerPixelFromFormat(format)/8; + if (0==pitch) + pitch = width*bpp; + + if (Format==format && Size.Width==width && Size.Height==height) + { + if (pitch==Pitch) + { + memcpy(target, Data, height*pitch); + return; + } + else + { + u8* tgtpos = (u8*) target; + u8* srcpos = Data; + const u32 bwidth = width*bpp; + const u32 rest = pitch-bwidth; + for (u32 y=0; y<height; ++y) + { + // copy scanline + memcpy(tgtpos, srcpos, bwidth); + // clear pitch + memset(tgtpos+bwidth, 0, rest); + tgtpos += pitch; + srcpos += Pitch; + } + return; + } + } + + const f32 sourceXStep = (f32)Size.Width / (f32)width; + const f32 sourceYStep = (f32)Size.Height / (f32)height; + s32 yval=0, syval=0; + f32 sy = 0.0f; + for (u32 y=0; y<height; ++y) + { + f32 sx = 0.0f; + for (u32 x=0; x<width; ++x) + { + CColorConverter::convert_viaFormat(Data+ syval + ((s32)sx)*BytesPerPixel, Format, 1, ((u8*)target)+ yval + (x*bpp), format); + sx+=sourceXStep; + } + sy+=sourceYStep; + syval=((s32)sy)*Pitch; + yval+=pitch; + } +} + + +//! copies this surface into another, scaling it to the target image size +// note: this is very very slow. +void CImage::copyToScaling(IImage* target) +{ + if (!target) + return; + + const core::dimension2d<u32>& targetSize = target->getDimension(); + + if (targetSize==Size) + { + copyTo(target); + return; + } + + copyToScaling(target->lock(), targetSize.Width, targetSize.Height, target->getColorFormat()); + target->unlock(); +} + + +//! copies this surface into another, scaling it to fit it. +void CImage::copyToScalingBoxFilter(IImage* target, s32 bias, bool blend) +{ + const core::dimension2d<u32> destSize = target->getDimension(); + + const f32 sourceXStep = (f32) Size.Width / (f32) destSize.Width; + const f32 sourceYStep = (f32) Size.Height / (f32) destSize.Height; + + target->lock(); + + s32 fx = core::ceil32( sourceXStep ); + s32 fy = core::ceil32( sourceYStep ); + f32 sx; + f32 sy; + + sy = 0.f; + for ( u32 y = 0; y != destSize.Height; ++y ) + { + sx = 0.f; + for ( u32 x = 0; x != destSize.Width; ++x ) + { + target->setPixel( x, y, + getPixelBox( core::floor32(sx), core::floor32(sy), fx, fy, bias ), blend ); + sx += sourceXStep; + } + sy += sourceYStep; + } + + target->unlock(); +} + + +//! fills the surface with given color +void CImage::fill(const SColor &color) +{ + u32 c; + + switch ( Format ) + { + case ECF_A1R5G5B5: + c = color.toA1R5G5B5(); + c |= c << 16; + break; + case ECF_R5G6B5: + c = video::A8R8G8B8toR5G6B5( color.color ); + c |= c << 16; + break; + case ECF_A8R8G8B8: + c = color.color; + break; + case ECF_R8G8B8: + { + u8 rgb[3]; + CColorConverter::convert_A8R8G8B8toR8G8B8(&color, 1, rgb); + const u32 size = getImageDataSizeInBytes(); + for (u32 i=0; i<size; i+=3) + { + memcpy(Data+i, rgb, 3); + } + return; + } + break; + default: + // TODO: Handle other formats + return; + } + memset32( Data, c, getImageDataSizeInBytes() ); +} + + +//! get a filtered pixel +inline SColor CImage::getPixelBox( s32 x, s32 y, s32 fx, s32 fy, s32 bias ) const +{ + SColor c; + s32 a = 0, r = 0, g = 0, b = 0; + + for ( s32 dx = 0; dx != fx; ++dx ) + { + for ( s32 dy = 0; dy != fy; ++dy ) + { + c = getPixel( core::s32_min ( x + dx, Size.Width - 1 ) , + core::s32_min ( y + dy, Size.Height - 1 ) + ); + + a += c.getAlpha(); + r += c.getRed(); + g += c.getGreen(); + b += c.getBlue(); + } + + } + + s32 sdiv = s32_log2_s32(fx * fy); + + a = core::s32_clamp( ( a >> sdiv ) + bias, 0, 255 ); + r = core::s32_clamp( ( r >> sdiv ) + bias, 0, 255 ); + g = core::s32_clamp( ( g >> sdiv ) + bias, 0, 255 ); + b = core::s32_clamp( ( b >> sdiv ) + bias, 0, 255 ); + + c.set( a, r, g, b ); + return c; +} + + +} // end namespace video +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImage.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImage.h new file mode 100644 index 0000000..82b34c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImage.h @@ -0,0 +1,127 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_H_INCLUDED__ +#define __C_IMAGE_H_INCLUDED__ + +#include "IImage.h" +#include "rect.h" + +namespace irr +{ +namespace video +{ + +//! IImage implementation with a lot of special image operations for +//! 16 bit A1R5G5B5/32 Bit A8R8G8B8 images, which are used by the SoftwareDevice. +class CImage : public IImage +{ +public: + + //! constructor from raw image data + /** \param useForeignMemory: If true, the image will use the data pointer + directly and own it from now on, which means it will also try to delete [] the + data when the image will be destructed. If false, the memory will by copied. */ + CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size, + void* data, bool ownForeignMemory=true, bool deleteMemory = true); + + //! constructor for empty image + CImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size); + + //! destructor + virtual ~CImage(); + + //! Lock function. + virtual void* lock() + { + return Data; + } + + //! Unlock function. + virtual void unlock() {} + + //! Returns width and height of image data. + virtual const core::dimension2d<u32>& getDimension() const; + + //! Returns bits per pixel. + virtual u32 getBitsPerPixel() const; + + //! Returns bytes per pixel + virtual u32 getBytesPerPixel() const; + + //! Returns image data size in bytes + virtual u32 getImageDataSizeInBytes() const; + + //! Returns image data size in pixels + virtual u32 getImageDataSizeInPixels() const; + + //! returns mask for red value of a pixel + virtual u32 getRedMask() const; + + //! returns mask for green value of a pixel + virtual u32 getGreenMask() const; + + //! returns mask for blue value of a pixel + virtual u32 getBlueMask() const; + + //! returns mask for alpha value of a pixel + virtual u32 getAlphaMask() const; + + //! returns a pixel + virtual SColor getPixel(u32 x, u32 y) const; + + //! sets a pixel + virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend = false ); + + //! returns the color format + virtual ECOLOR_FORMAT getColorFormat() const; + + //! returns pitch of image + virtual u32 getPitch() const { return Pitch; } + + //! copies this surface into another, scaling it to fit. + virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format, u32 pitch=0); + + //! copies this surface into another, scaling it to fit. + virtual void copyToScaling(IImage* target); + + //! copies this surface into another + virtual void copyTo(IImage* target, const core::position2d<s32>& pos=core::position2d<s32>(0,0)); + + //! copies this surface into another + virtual void copyTo(IImage* target, const core::position2d<s32>& pos, const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect=0); + + //! copies this surface into another, using the alpha mask, an cliprect and a color to add with + virtual void copyToWithAlpha(IImage* target, const core::position2d<s32>& pos, + const core::rect<s32>& sourceRect, const SColor &color, + const core::rect<s32>* clipRect = 0); + + //! copies this surface into another, scaling it to fit, appyling a box filter + virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false); + + //! fills the surface with given color + virtual void fill(const SColor &color); + +private: + + //! assumes format and size has been set and creates the rest + void initData(); + + inline SColor getPixelBox ( s32 x, s32 y, s32 fx, s32 fy, s32 bias ) const; + + u8* Data; + core::dimension2d<u32> Size; + u32 BytesPerPixel; + u32 Pitch; + ECOLOR_FORMAT Format; + + bool DeleteMemory; +}; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.cpp new file mode 100644 index 0000000..2ccb64c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.cpp @@ -0,0 +1,372 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderBMP.h" + +#ifdef _IRR_COMPILE_WITH_BMP_LOADER_ + +#include "IReadFile.h" +#include "SColor.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "os.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + + +//! constructor +CImageLoaderBMP::CImageLoaderBMP() +{ + #ifdef _DEBUG + setDebugName("CImageLoaderBMP"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderBMP::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "bmp" ); +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderBMP::isALoadableFileFormat(io::IReadFile* file) const +{ + u16 headerID; + file->read(&headerID, sizeof(u16)); +#ifdef __BIG_ENDIAN__ + headerID = os::Byteswap::byteswap(headerID); +#endif + return headerID == 0x4d42; +} + + +void CImageLoaderBMP::decompress8BitRLE(u8*& bmpData, s32 size, s32 width, s32 height, s32 pitch) const +{ + u8* p = bmpData; + u8* newBmp = new u8[(width+pitch)*height]; + u8* d = newBmp; + u8* destEnd = newBmp + (width+pitch)*height; + s32 line = 0; + + while (bmpData - p < size && d < destEnd) + { + if (*p == 0) + { + ++p; + + switch(*p) + { + case 0: // end of line + ++p; + ++line; + d = newBmp + (line*(width+pitch)); + break; + case 1: // end of bmp + delete [] bmpData; + bmpData = newBmp; + return; + case 2: + ++p; d +=(u8)*p; // delta + ++p; d += ((u8)*p)*(width+pitch); + ++p; + break; + default: + { + // absolute mode + s32 count = (u8)*p; ++p; + s32 readAdditional = ((2-(count%2))%2); + s32 i; + + for (i=0; i<count; ++i) + { + *d = *p; + ++p; + ++d; + } + + for (i=0; i<readAdditional; ++i) + ++p; + } + } + } + else + { + s32 count = (u8)*p; ++p; + u8 color = *p; ++p; + for (s32 i=0; i<count; ++i) + { + *d = color; + ++d; + } + } + } + + delete [] bmpData; + bmpData = newBmp; +} + + +void CImageLoaderBMP::decompress4BitRLE(u8*& bmpData, s32 size, s32 width, s32 height, s32 pitch) const +{ + s32 lineWidth = (width+1)/2+pitch; + u8* p = bmpData; + u8* newBmp = new u8[lineWidth*height]; + u8* d = newBmp; + u8* destEnd = newBmp + lineWidth*height; + s32 line = 0; + s32 shift = 4; + + while (bmpData - p < size && d < destEnd) + { + if (*p == 0) + { + ++p; + + switch(*p) + { + case 0: // end of line + ++p; + ++line; + d = newBmp + (line*lineWidth); + shift = 4; + break; + case 1: // end of bmp + delete [] bmpData; + bmpData = newBmp; + return; + case 2: + { + ++p; + s32 x = (u8)*p; ++p; + s32 y = (u8)*p; ++p; + d += x/2 + y*lineWidth; + shift = x%2==0 ? 4 : 0; + } + break; + default: + { + // absolute mode + s32 count = (u8)*p; ++p; + s32 readAdditional = ((2-((count)%2))%2); + s32 readShift = 4; + s32 i; + + for (i=0; i<count; ++i) + { + s32 color = (((u8)*p) >> readShift) & 0x0f; + readShift -= 4; + if (readShift < 0) + { + ++*p; + readShift = 4; + } + + u8 mask = 0x0f << shift; + *d = (*d & (~mask)) | ((color << shift) & mask); + + shift -= 4; + if (shift < 0) + { + shift = 4; + ++d; + } + + } + + for (i=0; i<readAdditional; ++i) + ++p; + } + } + } + else + { + s32 count = (u8)*p; ++p; + s32 color1 = (u8)*p; color1 = color1 & 0x0f; + s32 color2 = (u8)*p; color2 = (color2 >> 4) & 0x0f; + ++p; + + for (s32 i=0; i<count; ++i) + { + u8 mask = 0x0f << shift; + u8 toSet = (shift==0 ? color1 : color2) << shift; + *d = (*d & (~mask)) | (toSet & mask); + + shift -= 4; + if (shift < 0) + { + shift = 4; + ++d; + } + } + } + } + + delete [] bmpData; + bmpData = newBmp; +} + + + +//! creates a surface from the file +IImage* CImageLoaderBMP::loadImage(io::IReadFile* file) const +{ + SBMPHeader header; + + file->read(&header, sizeof(header)); + +#ifdef __BIG_ENDIAN__ + header.Id = os::Byteswap::byteswap(header.Id); + header.FileSize = os::Byteswap::byteswap(header.FileSize); + header.BitmapDataOffset = os::Byteswap::byteswap(header.BitmapDataOffset); + header.BitmapHeaderSize = os::Byteswap::byteswap(header.BitmapHeaderSize); + header.Width = os::Byteswap::byteswap(header.Width); + header.Height = os::Byteswap::byteswap(header.Height); + header.Planes = os::Byteswap::byteswap(header.Planes); + header.BPP = os::Byteswap::byteswap(header.BPP); + header.Compression = os::Byteswap::byteswap(header.Compression); + header.BitmapDataSize = os::Byteswap::byteswap(header.BitmapDataSize); + header.PixelPerMeterX = os::Byteswap::byteswap(header.PixelPerMeterX); + header.PixelPerMeterY = os::Byteswap::byteswap(header.PixelPerMeterY); + header.Colors = os::Byteswap::byteswap(header.Colors); + header.ImportantColors = os::Byteswap::byteswap(header.ImportantColors); +#endif + + s32 pitch = 0; + + //! return if the header is false + + if (header.Id != 0x4d42) + return 0; + + if (header.Compression > 2) // we'll only handle RLE-Compression + { + os::Printer::log("Compression mode not supported.", ELL_ERROR); + return 0; + } + + // adjust bitmap data size to dword boundary + header.BitmapDataSize += (4-(header.BitmapDataSize%4))%4; + + // read palette + + long pos = file->getPos(); + s32 paletteSize = (header.BitmapDataOffset - pos) / 4; + + s32* paletteData = 0; + if (paletteSize) + { + paletteData = new s32[paletteSize]; + file->read(paletteData, paletteSize * sizeof(s32)); +#ifdef __BIG_ENDIAN__ + for (s32 i=0; i<paletteSize; ++i) + paletteData[i] = os::Byteswap::byteswap(paletteData[i]); +#endif + } + + // read image data + + if (!header.BitmapDataSize) + { + // okay, lets guess the size + // some tools simply don't set it + header.BitmapDataSize = static_cast<u32>(file->getSize()) - header.BitmapDataOffset; + } + + file->seek(header.BitmapDataOffset); + + f32 t = (header.Width) * (header.BPP / 8.0f); + s32 widthInBytes = (s32)t; + t -= widthInBytes; + if (t!=0.0f) + ++widthInBytes; + + s32 lineData = widthInBytes + ((4-(widthInBytes%4)))%4; + pitch = lineData - widthInBytes; + + u8* bmpData = new u8[header.BitmapDataSize]; + file->read(bmpData, header.BitmapDataSize); + + // decompress data if needed + switch(header.Compression) + { + case 1: // 8 bit rle + decompress8BitRLE(bmpData, header.BitmapDataSize, header.Width, header.Height, pitch); + break; + case 2: // 4 bit rle + decompress4BitRLE(bmpData, header.BitmapDataSize, header.Width, header.Height, pitch); + break; + } + + // create surface + + // no default constructor from packed area! ARM problem! + core::dimension2d<u32> dim; + dim.Width = header.Width; + dim.Height = header.Height; + + IImage* image = 0; + switch(header.BPP) + { + case 1: + image = new CImage(ECF_A1R5G5B5, dim); + if (image) + CColorConverter::convert1BitTo16Bit(bmpData, (s16*)image->lock(), header.Width, header.Height, pitch, true); + break; + case 4: + image = new CImage(ECF_A1R5G5B5, dim); + if (image) + CColorConverter::convert4BitTo16Bit(bmpData, (s16*)image->lock(), header.Width, header.Height, paletteData, pitch, true); + break; + case 8: + image = new CImage(ECF_A1R5G5B5, dim); + if (image) + CColorConverter::convert8BitTo16Bit(bmpData, (s16*)image->lock(), header.Width, header.Height, paletteData, pitch, true); + break; + case 16: + image = new CImage(ECF_A1R5G5B5, dim); + if (image) + CColorConverter::convert16BitTo16Bit((s16*)bmpData, (s16*)image->lock(), header.Width, header.Height, pitch, true); + break; + case 24: + image = new CImage(ECF_R8G8B8, dim); + if (image) + CColorConverter::convert24BitTo24Bit(bmpData, (u8*)image->lock(), header.Width, header.Height, pitch, true, true); + break; + case 32: // thx to Reinhard Ostermeier + image = new CImage(ECF_A8R8G8B8, dim); + if (image) + CColorConverter::convert32BitTo32Bit((s32*)bmpData, (s32*)image->lock(), header.Width, header.Height, pitch, true); + break; + }; + if (image) + image->unlock(); + + // clean up + + delete [] paletteData; + delete [] bmpData; + + return image; +} + + +//! creates a loader which is able to load windows bitmaps +IImageLoader* createImageLoaderBMP() +{ + return new CImageLoaderBMP; +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.h new file mode 100644 index 0000000..9321ecc --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderBMP.h @@ -0,0 +1,100 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_BMP_H_INCLUDED__ +#define __C_IMAGE_LOADER_BMP_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#include "IImageLoader.h" + + +namespace irr +{ +namespace video +{ + +#if defined(_IRR_COMPILE_WITH_BMP_LOADER_) || defined(_IRR_COMPILE_WITH_BMP_WRITER_) + + +// byte-align structures +#include "irrpack.h" + + struct SBMPHeader + { + u16 Id; // BM - Windows 3.1x, 95, NT, 98, 2000, ME, XP + // BA - OS/2 Bitmap Array + // CI - OS/2 Color Icon + // CP - OS/2 Color Pointer + // IC - OS/2 Icon + // PT - OS/2 Pointer + u32 FileSize; + u32 Reserved; + u32 BitmapDataOffset; + u32 BitmapHeaderSize; // should be 28h for windows bitmaps or + // 0Ch for OS/2 1.x or F0h for OS/2 2.x + u32 Width; + u32 Height; + u16 Planes; + u16 BPP; // 1: Monochrome bitmap + // 4: 16 color bitmap + // 8: 256 color bitmap + // 16: 16bit (high color) bitmap + // 24: 24bit (true color) bitmap + // 32: 32bit (true color) bitmap + + u32 Compression; // 0: none (Also identified by BI_RGB) + // 1: RLE 8-bit / pixel (Also identified by BI_RLE4) + // 2: RLE 4-bit / pixel (Also identified by BI_RLE8) + // 3: Bitfields (Also identified by BI_BITFIELDS) + + u32 BitmapDataSize; // Size of the bitmap data in bytes. This number must be rounded to the next 4 byte boundary. + u32 PixelPerMeterX; + u32 PixelPerMeterY; + u32 Colors; + u32 ImportantColors; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +#endif // defined with loader or writer + +#ifdef _IRR_COMPILE_WITH_BMP_LOADER_ + +/*! + Surface Loader for Windows bitmaps +*/ +class CImageLoaderBMP : public IImageLoader +{ +public: + + //! constructor + CImageLoaderBMP(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + + void decompress8BitRLE(u8*& BmpData, s32 size, s32 width, s32 height, s32 pitch) const; + + void decompress4BitRLE(u8*& BmpData, s32 size, s32 width, s32 height, s32 pitch) const; +}; + + +#endif // compiled with loader + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.cpp new file mode 100644 index 0000000..646abd2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.cpp @@ -0,0 +1,712 @@ +// Copyright (C) 2002-2012 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +/* + Based on Code from Copyright (c) 2003 Randy Reddig + Based on code from Nvidia's DDS example: + http://www.nvidia.com/object/dxtc_decompression_code.html + + mainly c to cpp +*/ + + +#include "CImageLoaderDDS.h" + +#ifdef _IRR_COMPILE_WITH_DDS_LOADER_ + +#include "IReadFile.h" +#include "os.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "irrString.h" + + +namespace irr +{ + +namespace video +{ + +namespace +{ + +/*! + DDSDecodePixelFormat() + determines which pixel format the dds texture is in +*/ +void DDSDecodePixelFormat( ddsBuffer *dds, eDDSPixelFormat *pf ) +{ + /* dummy check */ + if( dds == NULL || pf == NULL ) + return; + + /* extract fourCC */ + const u32 fourCC = dds->pixelFormat.fourCC; + + /* test it */ + if( fourCC == 0 ) + *pf = DDS_PF_ARGB8888; + else if( fourCC == *((u32*) "DXT1") ) + *pf = DDS_PF_DXT1; + else if( fourCC == *((u32*) "DXT2") ) + *pf = DDS_PF_DXT2; + else if( fourCC == *((u32*) "DXT3") ) + *pf = DDS_PF_DXT3; + else if( fourCC == *((u32*) "DXT4") ) + *pf = DDS_PF_DXT4; + else if( fourCC == *((u32*) "DXT5") ) + *pf = DDS_PF_DXT5; + else + *pf = DDS_PF_UNKNOWN; +} + + +/*! +DDSGetInfo() +extracts relevant info from a dds texture, returns 0 on success +*/ +s32 DDSGetInfo( ddsBuffer *dds, s32 *width, s32 *height, eDDSPixelFormat *pf ) +{ + /* dummy test */ + if( dds == NULL ) + return -1; + + /* test dds header */ + if( *((s32*) dds->magic) != *((s32*) "DDS ") ) + return -1; + if( DDSLittleLong( dds->size ) != 124 ) + return -1; + + /* extract width and height */ + if( width != NULL ) + *width = DDSLittleLong( dds->width ); + if( height != NULL ) + *height = DDSLittleLong( dds->height ); + + /* get pixel format */ + DDSDecodePixelFormat( dds, pf ); + + /* return ok */ + return 0; +} + + +/*! + DDSGetColorBlockColors() + extracts colors from a dds color block +*/ +void DDSGetColorBlockColors( ddsColorBlock *block, ddsColor colors[ 4 ] ) +{ + u16 word; + + + /* color 0 */ + word = DDSLittleShort( block->colors[ 0 ] ); + colors[ 0 ].a = 0xff; + + /* extract rgb bits */ + colors[ 0 ].b = (u8) word; + colors[ 0 ].b <<= 3; + colors[ 0 ].b |= (colors[ 0 ].b >> 5); + word >>= 5; + colors[ 0 ].g = (u8) word; + colors[ 0 ].g <<= 2; + colors[ 0 ].g |= (colors[ 0 ].g >> 5); + word >>= 6; + colors[ 0 ].r = (u8) word; + colors[ 0 ].r <<= 3; + colors[ 0 ].r |= (colors[ 0 ].r >> 5); + + /* same for color 1 */ + word = DDSLittleShort( block->colors[ 1 ] ); + colors[ 1 ].a = 0xff; + + /* extract rgb bits */ + colors[ 1 ].b = (u8) word; + colors[ 1 ].b <<= 3; + colors[ 1 ].b |= (colors[ 1 ].b >> 5); + word >>= 5; + colors[ 1 ].g = (u8) word; + colors[ 1 ].g <<= 2; + colors[ 1 ].g |= (colors[ 1 ].g >> 5); + word >>= 6; + colors[ 1 ].r = (u8) word; + colors[ 1 ].r <<= 3; + colors[ 1 ].r |= (colors[ 1 ].r >> 5); + + /* use this for all but the super-freak math method */ + if( block->colors[ 0 ] > block->colors[ 1 ] ) + { + /* four-color block: derive the other two colors. + 00 = color 0, 01 = color 1, 10 = color 2, 11 = color 3 + these two bit codes correspond to the 2-bit fields + stored in the 64-bit block. */ + + word = ((u16) colors[ 0 ].r * 2 + (u16) colors[ 1 ].r ) / 3; + /* no +1 for rounding */ + /* as bits have been shifted to 888 */ + colors[ 2 ].r = (u8) word; + word = ((u16) colors[ 0 ].g * 2 + (u16) colors[ 1 ].g) / 3; + colors[ 2 ].g = (u8) word; + word = ((u16) colors[ 0 ].b * 2 + (u16) colors[ 1 ].b) / 3; + colors[ 2 ].b = (u8) word; + colors[ 2 ].a = 0xff; + + word = ((u16) colors[ 0 ].r + (u16) colors[ 1 ].r * 2) / 3; + colors[ 3 ].r = (u8) word; + word = ((u16) colors[ 0 ].g + (u16) colors[ 1 ].g * 2) / 3; + colors[ 3 ].g = (u8) word; + word = ((u16) colors[ 0 ].b + (u16) colors[ 1 ].b * 2) / 3; + colors[ 3 ].b = (u8) word; + colors[ 3 ].a = 0xff; + } + else + { + /* three-color block: derive the other color. + 00 = color 0, 01 = color 1, 10 = color 2, + 11 = transparent. + These two bit codes correspond to the 2-bit fields + stored in the 64-bit block */ + + word = ((u16) colors[ 0 ].r + (u16) colors[ 1 ].r) / 2; + colors[ 2 ].r = (u8) word; + word = ((u16) colors[ 0 ].g + (u16) colors[ 1 ].g) / 2; + colors[ 2 ].g = (u8) word; + word = ((u16) colors[ 0 ].b + (u16) colors[ 1 ].b) / 2; + colors[ 2 ].b = (u8) word; + colors[ 2 ].a = 0xff; + + /* random color to indicate alpha */ + colors[ 3 ].r = 0x00; + colors[ 3 ].g = 0xff; + colors[ 3 ].b = 0xff; + colors[ 3 ].a = 0x00; + } +} + + +/* +DDSDecodeColorBlock() +decodes a dds color block +fixme: make endian-safe +*/ + +void DDSDecodeColorBlock( u32 *pixel, ddsColorBlock *block, s32 width, u32 colors[ 4 ] ) +{ + s32 r, n; + u32 bits; + u32 masks[] = { 3, 12, 3 << 4, 3 << 6 }; /* bit masks = 00000011, 00001100, 00110000, 11000000 */ + s32 shift[] = { 0, 2, 4, 6 }; + + + /* r steps through lines in y */ + for( r = 0; r < 4; r++, pixel += (width - 4) ) /* no width * 4 as u32 ptr inc will * 4 */ + { + /* width * 4 bytes per pixel per line, each j dxtc row is 4 lines of pixels */ + + /* n steps through pixels */ + for( n = 0; n < 4; n++ ) + { + bits = block->row[ r ] & masks[ n ]; + bits >>= shift[ n ]; + + switch( bits ) + { + case 0: + *pixel = colors[ 0 ]; + pixel++; + break; + + case 1: + *pixel = colors[ 1 ]; + pixel++; + break; + + case 2: + *pixel = colors[ 2 ]; + pixel++; + break; + + case 3: + *pixel = colors[ 3 ]; + pixel++; + break; + + default: + /* invalid */ + pixel++; + break; + } + } + } +} + + +/* +DDSDecodeAlphaExplicit() +decodes a dds explicit alpha block +*/ +void DDSDecodeAlphaExplicit( u32 *pixel, ddsAlphaBlockExplicit *alphaBlock, s32 width, u32 alphaZero ) +{ + s32 row, pix; + u16 word; + ddsColor color; + + + /* clear color */ + color.r = 0; + color.g = 0; + color.b = 0; + + /* walk rows */ + for( row = 0; row < 4; row++, pixel += (width - 4) ) + { + word = DDSLittleShort( alphaBlock->row[ row ] ); + + /* walk pixels */ + for( pix = 0; pix < 4; pix++ ) + { + /* zero the alpha bits of image pixel */ + *pixel &= alphaZero; + color.a = word & 0x000F; + color.a = color.a | (color.a << 4); + *pixel |= *((u32*) &color); + word >>= 4; /* move next bits to lowest 4 */ + pixel++; /* move to next pixel in the row */ + } + } +} + + + +/* +DDSDecodeAlpha3BitLinear() +decodes interpolated alpha block +*/ +void DDSDecodeAlpha3BitLinear( u32 *pixel, ddsAlphaBlock3BitLinear *alphaBlock, s32 width, u32 alphaZero ) +{ + + s32 row, pix; + u32 stuff; + u8 bits[ 4 ][ 4 ]; + u16 alphas[ 8 ]; + ddsColor aColors[ 4 ][ 4 ]; + + /* get initial alphas */ + alphas[ 0 ] = alphaBlock->alpha0; + alphas[ 1 ] = alphaBlock->alpha1; + + /* 8-alpha block */ + if( alphas[ 0 ] > alphas[ 1 ] ) + { + /* 000 = alpha_0, 001 = alpha_1, others are interpolated */ + alphas[ 2 ] = ( 6 * alphas[ 0 ] + alphas[ 1 ]) / 7; /* bit code 010 */ + alphas[ 3 ] = ( 5 * alphas[ 0 ] + 2 * alphas[ 1 ]) / 7; /* bit code 011 */ + alphas[ 4 ] = ( 4 * alphas[ 0 ] + 3 * alphas[ 1 ]) / 7; /* bit code 100 */ + alphas[ 5 ] = ( 3 * alphas[ 0 ] + 4 * alphas[ 1 ]) / 7; /* bit code 101 */ + alphas[ 6 ] = ( 2 * alphas[ 0 ] + 5 * alphas[ 1 ]) / 7; /* bit code 110 */ + alphas[ 7 ] = ( alphas[ 0 ] + 6 * alphas[ 1 ]) / 7; /* bit code 111 */ + } + + /* 6-alpha block */ + else + { + /* 000 = alpha_0, 001 = alpha_1, others are interpolated */ + alphas[ 2 ] = (4 * alphas[ 0 ] + alphas[ 1 ]) / 5; /* bit code 010 */ + alphas[ 3 ] = (3 * alphas[ 0 ] + 2 * alphas[ 1 ]) / 5; /* bit code 011 */ + alphas[ 4 ] = (2 * alphas[ 0 ] + 3 * alphas[ 1 ]) / 5; /* bit code 100 */ + alphas[ 5 ] = ( alphas[ 0 ] + 4 * alphas[ 1 ]) / 5; /* bit code 101 */ + alphas[ 6 ] = 0; /* bit code 110 */ + alphas[ 7 ] = 255; /* bit code 111 */ + } + + /* decode 3-bit fields into array of 16 bytes with same value */ + + /* first two rows of 4 pixels each */ + stuff = *((u32*) &(alphaBlock->stuff[ 0 ])); + + bits[ 0 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 0 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 0 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 0 ][ 3 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 1 ][ 3 ] = (u8) (stuff & 0x00000007); + + /* last two rows */ + stuff = *((u32*) &(alphaBlock->stuff[ 3 ])); /* last 3 bytes */ + + bits[ 2 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 2 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 2 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 2 ][ 3 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 0 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 1 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 2 ] = (u8) (stuff & 0x00000007); + stuff >>= 3; + bits[ 3 ][ 3 ] = (u8) (stuff & 0x00000007); + + /* decode the codes into alpha values */ + for( row = 0; row < 4; row++ ) + { + for( pix=0; pix < 4; pix++ ) + { + aColors[ row ][ pix ].r = 0; + aColors[ row ][ pix ].g = 0; + aColors[ row ][ pix ].b = 0; + aColors[ row ][ pix ].a = (u8) alphas[ bits[ row ][ pix ] ]; + } + } + + /* write out alpha values to the image bits */ + for( row = 0; row < 4; row++, pixel += width-4 ) + { + for( pix = 0; pix < 4; pix++ ) + { + /* zero the alpha bits of image pixel */ + *pixel &= alphaZero; + + /* or the bits into the prev. nulled alpha */ + *pixel |= *((u32*) &(aColors[ row ][ pix ])); + pixel++; + } + } +} + + +/* +DDSDecompressDXT1() +decompresses a dxt1 format texture +*/ +s32 DDSDecompressDXT1( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y, xBlocks, yBlocks; + u32 *pixel; + ddsColorBlock *block; + ddsColor colors[ 4 ]; + + /* setup */ + xBlocks = width / 4; + yBlocks = height / 4; + + /* walk y */ + for( y = 0; y < yBlocks; y++ ) + { + /* 8 bytes per block */ + block = (ddsColorBlock*) (dds->data + y * xBlocks * 8); + + /* walk x */ + for( x = 0; x < xBlocks; x++, block++ ) + { + DDSGetColorBlockColors( block, colors ); + pixel = (u32*) (pixels + x * 16 + (y * 4) * width * 4); + DDSDecodeColorBlock( pixel, block, width, (u32*) colors ); + } + } + + /* return ok */ + return 0; +} + + +/* +DDSDecompressDXT3() +decompresses a dxt3 format texture +*/ + +s32 DDSDecompressDXT3( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y, xBlocks, yBlocks; + u32 *pixel, alphaZero; + ddsColorBlock *block; + ddsAlphaBlockExplicit *alphaBlock; + ddsColor colors[ 4 ]; + + /* setup */ + xBlocks = width / 4; + yBlocks = height / 4; + + /* create zero alpha */ + colors[ 0 ].a = 0; + colors[ 0 ].r = 0xFF; + colors[ 0 ].g = 0xFF; + colors[ 0 ].b = 0xFF; + alphaZero = *((u32*) &colors[ 0 ]); + + /* walk y */ + for( y = 0; y < yBlocks; y++ ) + { + /* 8 bytes per block, 1 block for alpha, 1 block for color */ + block = (ddsColorBlock*) (dds->data + y * xBlocks * 16); + + /* walk x */ + for( x = 0; x < xBlocks; x++, block++ ) + { + /* get alpha block */ + alphaBlock = (ddsAlphaBlockExplicit*) block; + + /* get color block */ + block++; + DDSGetColorBlockColors( block, colors ); + + /* decode color block */ + pixel = (u32*) (pixels + x * 16 + (y * 4) * width * 4); + DDSDecodeColorBlock( pixel, block, width, (u32*) colors ); + + /* overwrite alpha bits with alpha block */ + DDSDecodeAlphaExplicit( pixel, alphaBlock, width, alphaZero ); + } + } + + /* return ok */ + return 0; +} + + +/* +DDSDecompressDXT5() +decompresses a dxt5 format texture +*/ +s32 DDSDecompressDXT5( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + s32 x, y, xBlocks, yBlocks; + u32 *pixel, alphaZero; + ddsColorBlock *block; + ddsAlphaBlock3BitLinear *alphaBlock; + ddsColor colors[ 4 ]; + + /* setup */ + xBlocks = width / 4; + yBlocks = height / 4; + + /* create zero alpha */ + colors[ 0 ].a = 0; + colors[ 0 ].r = 0xFF; + colors[ 0 ].g = 0xFF; + colors[ 0 ].b = 0xFF; + alphaZero = *((u32*) &colors[ 0 ]); + + /* walk y */ + for( y = 0; y < yBlocks; y++ ) + { + /* 8 bytes per block, 1 block for alpha, 1 block for color */ + block = (ddsColorBlock*) (dds->data + y * xBlocks * 16); + + /* walk x */ + for( x = 0; x < xBlocks; x++, block++ ) + { + /* get alpha block */ + alphaBlock = (ddsAlphaBlock3BitLinear*) block; + + /* get color block */ + block++; + DDSGetColorBlockColors( block, colors ); + + /* decode color block */ + pixel = (u32*) (pixels + x * 16 + (y * 4) * width * 4); + DDSDecodeColorBlock( pixel, block, width, (u32*) colors ); + + /* overwrite alpha bits with alpha block */ + DDSDecodeAlpha3BitLinear( pixel, alphaBlock, width, alphaZero ); + } + } + + /* return ok */ + return 0; +} + + +/* +DDSDecompressDXT2() +decompresses a dxt2 format texture (fixme: un-premultiply alpha) +*/ +s32 DDSDecompressDXT2( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + /* decompress dxt3 first */ + const s32 r = DDSDecompressDXT3( dds, width, height, pixels ); + + /* return to sender */ + return r; +} + + +/* +DDSDecompressDXT4() +decompresses a dxt4 format texture (fixme: un-premultiply alpha) +*/ +s32 DDSDecompressDXT4( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + /* decompress dxt5 first */ + const s32 r = DDSDecompressDXT5( dds, width, height, pixels ); + + /* return to sender */ + return r; +} + + +/* +DDSDecompressARGB8888() +decompresses an argb 8888 format texture +*/ +s32 DDSDecompressARGB8888( ddsBuffer *dds, s32 width, s32 height, u8 *pixels ) +{ + /* setup */ + u8* in = dds->data; + u8* out = pixels; + + /* walk y */ + for(s32 y = 0; y < height; y++) + { + /* walk x */ + for(s32 x = 0; x < width; x++) + { + *out++ = *in++; + *out++ = *in++; + *out++ = *in++; + *out++ = *in++; + } + } + + /* return ok */ + return 0; +} + + +/* +DDSDecompress() +decompresses a dds texture into an rgba image buffer, returns 0 on success +*/ +s32 DDSDecompress( ddsBuffer *dds, u8 *pixels ) +{ + s32 width, height; + eDDSPixelFormat pf; + + /* get dds info */ + s32 r = DDSGetInfo( dds, &width, &height, &pf ); + if ( r ) + return r; + + /* decompress */ + switch( pf ) + { + case DDS_PF_ARGB8888: + /* fixme: support other [a]rgb formats */ + r = DDSDecompressARGB8888( dds, width, height, pixels ); + break; + + case DDS_PF_DXT1: + r = DDSDecompressDXT1( dds, width, height, pixels ); + break; + + case DDS_PF_DXT2: + r = DDSDecompressDXT2( dds, width, height, pixels ); + break; + + case DDS_PF_DXT3: + r = DDSDecompressDXT3( dds, width, height, pixels ); + break; + + case DDS_PF_DXT4: + r = DDSDecompressDXT4( dds, width, height, pixels ); + break; + + case DDS_PF_DXT5: + r = DDSDecompressDXT5( dds, width, height, pixels ); + break; + + default: + case DDS_PF_UNKNOWN: + memset( pixels, 0xFF, width * height * 4 ); + r = -1; + break; + } + + /* return to sender */ + return r; +} + +} // end anonymous namespace + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderDDS::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "dds" ); +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderDDS::isALoadableFileFormat(io::IReadFile* file) const +{ + if (!file) + return false; + + ddsBuffer header; + file->read(&header, sizeof(header)); + + s32 width, height; + eDDSPixelFormat pixelFormat; + + return (0 == DDSGetInfo( &header, &width, &height, &pixelFormat)); +} + + +//! creates a surface from the file +IImage* CImageLoaderDDS::loadImage(io::IReadFile* file) const +{ + u8 *memFile = new u8 [ file->getSize() ]; + file->read ( memFile, file->getSize() ); + + ddsBuffer *header = (ddsBuffer*) memFile; + IImage* image = 0; + s32 width, height; + eDDSPixelFormat pixelFormat; + + if ( 0 == DDSGetInfo( header, &width, &height, &pixelFormat) ) + { + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(width, height)); + + if ( DDSDecompress( header, (u8*) image->lock() ) == -1) + { + image->unlock(); + image->drop(); + image = 0; + } + } + + delete [] memFile; + if ( image ) + image->unlock(); + + return image; +} + + +//! creates a loader which is able to load dds images +IImageLoader* createImageLoaderDDS() +{ + return new CImageLoaderDDS(); +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.h new file mode 100644 index 0000000..f8c3516 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderDDS.h @@ -0,0 +1,296 @@ +// Copyright (C) 2002-2012 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_DDS_H_INCLUDED__ +#define __C_IMAGE_LOADER_DDS_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#if defined(_IRR_COMPILE_WITH_DDS_LOADER_) + +#include "IImageLoader.h" + +namespace irr +{ +namespace video +{ + +/* dependencies */ +/* dds definition */ +enum eDDSPixelFormat +{ + DDS_PF_ARGB8888, + DDS_PF_DXT1, + DDS_PF_DXT2, + DDS_PF_DXT3, + DDS_PF_DXT4, + DDS_PF_DXT5, + DDS_PF_UNKNOWN +}; + +/* 16bpp stuff */ +#define DDS_LOW_5 0x001F; +#define DDS_MID_6 0x07E0; +#define DDS_HIGH_5 0xF800; +#define DDS_MID_555 0x03E0; +#define DDS_HI_555 0x7C00; + + +// byte-align structures +#include "irrpack.h" + +/* structures */ +struct ddsColorKey +{ + u32 colorSpaceLowValue; + u32 colorSpaceHighValue; +} PACK_STRUCT; + +struct ddsCaps +{ + u32 caps1; + u32 caps2; + u32 caps3; + u32 caps4; +} PACK_STRUCT; + +struct ddsMultiSampleCaps +{ + u16 flipMSTypes; + u16 bltMSTypes; +} PACK_STRUCT; + + +struct ddsPixelFormat +{ + u32 size; + u32 flags; + u32 fourCC; + union + { + u32 rgbBitCount; + u32 yuvBitCount; + u32 zBufferBitDepth; + u32 alphaBitDepth; + u32 luminanceBitCount; + u32 bumpBitCount; + u32 privateFormatBitCount; + }; + union + { + u32 rBitMask; + u32 yBitMask; + u32 stencilBitDepth; + u32 luminanceBitMask; + u32 bumpDuBitMask; + u32 operations; + }; + union + { + u32 gBitMask; + u32 uBitMask; + u32 zBitMask; + u32 bumpDvBitMask; + ddsMultiSampleCaps multiSampleCaps; + }; + union + { + u32 bBitMask; + u32 vBitMask; + u32 stencilBitMask; + u32 bumpLuminanceBitMask; + }; + union + { + u32 rgbAlphaBitMask; + u32 yuvAlphaBitMask; + u32 luminanceAlphaBitMask; + u32 rgbZBitMask; + u32 yuvZBitMask; + }; +} PACK_STRUCT; + + +struct ddsBuffer +{ + /* magic: 'dds ' */ + c8 magic[ 4 ]; + + /* directdraw surface */ + u32 size; + u32 flags; + u32 height; + u32 width; + union + { + s32 pitch; + u32 linearSize; + }; + u32 backBufferCount; + union + { + u32 mipMapCount; + u32 refreshRate; + u32 srcVBHandle; + }; + u32 alphaBitDepth; + u32 reserved; + void *surface; + union + { + ddsColorKey ckDestOverlay; + u32 emptyFaceColor; + }; + ddsColorKey ckDestBlt; + ddsColorKey ckSrcOverlay; + ddsColorKey ckSrcBlt; + union + { + ddsPixelFormat pixelFormat; + u32 fvf; + }; + ddsCaps caps; + u32 textureStage; + + /* data (Varying size) */ + u8 data[ 4 ]; +} PACK_STRUCT; + + +struct ddsColorBlock +{ + u16 colors[ 2 ]; + u8 row[ 4 ]; +} PACK_STRUCT; + + +struct ddsAlphaBlockExplicit +{ + u16 row[ 4 ]; +} PACK_STRUCT; + + +struct ddsAlphaBlock3BitLinear +{ + u8 alpha0; + u8 alpha1; + u8 stuff[ 6 ]; +} PACK_STRUCT; + + +struct ddsColor +{ + u8 r, g, b, a; +} PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + +/* endian tomfoolery */ +typedef union +{ + f32 f; + c8 c[ 4 ]; +} +floatSwapUnion; + + +#ifndef __BIG_ENDIAN__ +#ifdef _SGI_SOURCE +#define __BIG_ENDIAN__ +#endif +#endif + + +#ifdef __BIG_ENDIAN__ + + s32 DDSBigLong( s32 src ) { return src; } + s16 DDSBigShort( s16 src ) { return src; } + f32 DDSBigFloat( f32 src ) { return src; } + + s32 DDSLittleLong( s32 src ) + { + return ((src & 0xFF000000) >> 24) | + ((src & 0x00FF0000) >> 8) | + ((src & 0x0000FF00) << 8) | + ((src & 0x000000FF) << 24); + } + + s16 DDSLittleShort( s16 src ) + { + return ((src & 0xFF00) >> 8) | + ((src & 0x00FF) << 8); + } + + f32 DDSLittleFloat( f32 src ) + { + floatSwapUnion in,out; + in.f = src; + out.c[ 0 ] = in.c[ 3 ]; + out.c[ 1 ] = in.c[ 2 ]; + out.c[ 2 ] = in.c[ 1 ]; + out.c[ 3 ] = in.c[ 0 ]; + return out.f; + } + +#else /*__BIG_ENDIAN__*/ + + s32 DDSLittleLong( s32 src ) { return src; } + s16 DDSLittleShort( s16 src ) { return src; } + f32 DDSLittleFloat( f32 src ) { return src; } + + s32 DDSBigLong( s32 src ) + { + return ((src & 0xFF000000) >> 24) | + ((src & 0x00FF0000) >> 8) | + ((src & 0x0000FF00) << 8) | + ((src & 0x000000FF) << 24); + } + + s16 DDSBigShort( s16 src ) + { + return ((src & 0xFF00) >> 8) | + ((src & 0x00FF) << 8); + } + + f32 DDSBigFloat( f32 src ) + { + floatSwapUnion in,out; + in.f = src; + out.c[ 0 ] = in.c[ 3 ]; + out.c[ 1 ] = in.c[ 2 ]; + out.c[ 2 ] = in.c[ 1 ]; + out.c[ 3 ] = in.c[ 0 ]; + return out.f; + } + +#endif /*__BIG_ENDIAN__*/ + + +/*! + Surface Loader for DDS images +*/ +class CImageLoaderDDS : public IImageLoader +{ +public: + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; +}; + + +} // end namespace video +} // end namespace irr + +#endif // compiled with DDS loader +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.cpp new file mode 100644 index 0000000..8fc5222 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.cpp @@ -0,0 +1,306 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderJPG.h" + +#ifdef _IRR_COMPILE_WITH_JPG_LOADER_ + +#include "IReadFile.h" +#include "CImage.h" +#include "os.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +// Static members +io::path CImageLoaderJPG::Filename; + +//! constructor +CImageLoaderJPG::CImageLoaderJPG() +{ + #ifdef _DEBUG + setDebugName("CImageLoaderJPG"); + #endif +} + + + +//! destructor +CImageLoaderJPG::~CImageLoaderJPG() +{ +} + + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderJPG::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "jpg", "jpeg" ); +} + + +#ifdef _IRR_COMPILE_WITH_LIBJPEG_ + + // struct for handling jpeg errors + struct irr_jpeg_error_mgr + { + // public jpeg error fields + struct jpeg_error_mgr pub; + + // for longjmp, to return to caller on a fatal error + jmp_buf setjmp_buffer; + }; + +void CImageLoaderJPG::init_source (j_decompress_ptr cinfo) +{ + // DO NOTHING +} + + + +boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo) +{ + // DO NOTHING + return 1; +} + + + +void CImageLoaderJPG::skip_input_data (j_decompress_ptr cinfo, long count) +{ + jpeg_source_mgr * src = cinfo->src; + if(count > 0) + { + src->bytes_in_buffer -= count; + src->next_input_byte += count; + } +} + + + +void CImageLoaderJPG::term_source (j_decompress_ptr cinfo) +{ + // DO NOTHING +} + + +void CImageLoaderJPG::error_exit (j_common_ptr cinfo) +{ + // unfortunately we need to use a goto rather than throwing an exception + // as gcc crashes under linux crashes when using throw from within + // extern c code + + // Always display the message + (*cinfo->err->output_message) (cinfo); + + // cinfo->err really points to a irr_error_mgr struct + irr_jpeg_error_mgr *myerr = (irr_jpeg_error_mgr*) cinfo->err; + + longjmp(myerr->setjmp_buffer, 1); +} + + +void CImageLoaderJPG::output_message(j_common_ptr cinfo) +{ + // display the error message. + c8 temp1[JMSG_LENGTH_MAX]; + (*cinfo->err->format_message)(cinfo, temp1); + core::stringc errMsg("JPEG FATAL ERROR in "); + errMsg += core::stringc(Filename); + os::Printer::log(errMsg.c_str(),temp1, ELL_ERROR); +} +#endif // _IRR_COMPILE_WITH_LIBJPEG_ + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderJPG::isALoadableFileFormat(io::IReadFile* file) const +{ + #ifndef _IRR_COMPILE_WITH_LIBJPEG_ + return false; + #else + + if (!file) + return false; + + s32 jfif = 0; + file->seek(6); + file->read(&jfif, sizeof(s32)); + return (jfif == 0x4a464946 || jfif == 0x4649464a); + + #endif +} + +//! creates a surface from the file +IImage* CImageLoaderJPG::loadImage(io::IReadFile* file) const +{ + #ifndef _IRR_COMPILE_WITH_LIBJPEG_ + os::Printer::log("Can't load as not compiled with _IRR_COMPILE_WITH_LIBJPEG_:", file->getFileName(), ELL_DEBUG); + return 0; + #else + + if (!file) + return 0; + + Filename = file->getFileName(); + + u8 **rowPtr=0; + u8* input = new u8[file->getSize()]; + file->read(input, file->getSize()); + + // allocate and initialize JPEG decompression object + struct jpeg_decompress_struct cinfo; + struct irr_jpeg_error_mgr jerr; + + //We have to set up the error handler first, in case the initialization + //step fails. (Unlikely, but it could happen if you are out of memory.) + //This routine fills in the contents of struct jerr, and returns jerr's + //address which we place into the link field in cinfo. + + cinfo.err = jpeg_std_error(&jerr.pub); + cinfo.err->error_exit = error_exit; + cinfo.err->output_message = output_message; + + // compatibility fudge: + // we need to use setjmp/longjmp for error handling as gcc-linux + // crashes when throwing within external c code + if (setjmp(jerr.setjmp_buffer)) + { + // If we get here, the JPEG code has signaled an error. + // We need to clean up the JPEG object and return. + + jpeg_destroy_decompress(&cinfo); + + delete [] input; + // if the row pointer was created, we delete it. + if (rowPtr) + delete [] rowPtr; + + // return null pointer + return 0; + } + + // Now we can initialize the JPEG decompression object. + jpeg_create_decompress(&cinfo); + + // specify data source + jpeg_source_mgr jsrc; + + // Set up data pointer + jsrc.bytes_in_buffer = file->getSize(); + jsrc.next_input_byte = (JOCTET*)input; + cinfo.src = &jsrc; + + jsrc.init_source = init_source; + jsrc.fill_input_buffer = fill_input_buffer; + jsrc.skip_input_data = skip_input_data; + jsrc.resync_to_restart = jpeg_resync_to_restart; + jsrc.term_source = term_source; + + // Decodes JPG input from whatever source + // Does everything AFTER jpeg_create_decompress + // and BEFORE jpeg_destroy_decompress + // Caller is responsible for arranging these + setting up cinfo + + // read file parameters with jpeg_read_header() + jpeg_read_header(&cinfo, TRUE); + + bool useCMYK=false; + if (cinfo.jpeg_color_space==JCS_CMYK) + { + cinfo.out_color_space=JCS_CMYK; + cinfo.out_color_components=4; + useCMYK=true; + } + else + { + cinfo.out_color_space=JCS_RGB; + cinfo.out_color_components=3; + } + cinfo.output_gamma=2.2; + cinfo.do_fancy_upsampling=FALSE; + + // Start decompressor + jpeg_start_decompress(&cinfo); + + // Get image data + u16 rowspan = cinfo.image_width * cinfo.out_color_components; + u32 width = cinfo.image_width; + u32 height = cinfo.image_height; + + // Allocate memory for buffer + u8* output = new u8[rowspan * height]; + + // Here we use the library's state variable cinfo.output_scanline as the + // loop counter, so that we don't have to keep track ourselves. + // Create array of row pointers for lib + rowPtr = new u8* [height]; + + for( u32 i = 0; i < height; i++ ) + rowPtr[i] = &output[ i * rowspan ]; + + u32 rowsRead = 0; + + while( cinfo.output_scanline < cinfo.output_height ) + rowsRead += jpeg_read_scanlines( &cinfo, &rowPtr[rowsRead], cinfo.output_height - rowsRead ); + + delete [] rowPtr; + // Finish decompression + + jpeg_finish_decompress(&cinfo); + + // Release JPEG decompression object + // This is an important step since it will release a good deal of memory. + jpeg_destroy_decompress(&cinfo); + + // convert image + IImage* image = 0; + if (useCMYK) + { + image = new CImage(ECF_R8G8B8, + core::dimension2d<u32>(width, height)); + const u32 size = 3*width*height; + u8* data = (u8*)image->lock(); + if (data) + { + for (u32 i=0,j=0; i<size; i+=3, j+=4) + { + // Also works without K, but has more contrast with K multiplied in +// data[i+0] = output[j+2]; +// data[i+1] = output[j+1]; +// data[i+2] = output[j+0]; + data[i+0] = (char)(output[j+2]*(output[j+3]/255.f)); + data[i+1] = (char)(output[j+1]*(output[j+3]/255.f)); + data[i+2] = (char)(output[j+0]*(output[j+3]/255.f)); + } + } + image->unlock(); + delete [] output; + } + else + image = new CImage(ECF_R8G8B8, + core::dimension2d<u32>(width, height), output); + + delete [] input; + + return image; + + #endif +} + + + +//! creates a loader which is able to load jpeg images +IImageLoader* createImageLoaderJPG() +{ + return new CImageLoaderJPG(); +} + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.h new file mode 100644 index 0000000..d3d0633 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderJPG.h @@ -0,0 +1,116 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_JPG_H_INCLUDED__ +#define __C_IMAGE_LOADER_JPG_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_JPG_LOADER_ + +#include "IImageLoader.h" + +#include <stdio.h> // required for jpeglib.h +#ifdef _IRR_COMPILE_WITH_LIBJPEG_ +extern "C" { + #ifndef _IRR_USE_NON_SYSTEM_JPEG_LIB_ + #include <jpeglib.h> // use system lib + #else + #include "jpeglib/jpeglib.h" // use irrlicht jpeglib + #endif + #include <setjmp.h> +} +#endif // _IRR_COMPILE_WITH_LIBJPEG_ + + +namespace irr +{ +namespace video +{ + + +//! Surface Loader for JPG images +class CImageLoaderJPG : public IImageLoader +{ +public: + + //! constructor + CImageLoaderJPG(); + + //! destructor + virtual ~CImageLoaderJPG(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + + #ifdef _IRR_COMPILE_WITH_LIBJPEG_ + // several methods used via function pointers by jpeglib + + /* Receives control for a fatal error. Information sufficient to + generate the error message has been stored in cinfo->err; call + output_message to display it. Control must NOT return to the caller; + generally this routine will exit() or longjmp() somewhere. + Typically you would override this routine to get rid of the exit() + default behavior. Note that if you continue processing, you should + clean up the JPEG object with jpeg_abort() or jpeg_destroy(). + */ + static void error_exit (j_common_ptr cinfo); + + /* output error messages via Irrlicht logger. */ + static void output_message(j_common_ptr cinfo); + + /* Initialize source. This is called by jpeg_read_header() before any + data is actually read. Unlike init_destination(), it may leave + bytes_in_buffer set to 0 (in which case a fill_input_buffer() call + will occur immediately). */ + static void init_source (j_decompress_ptr cinfo); + + /* This is called whenever bytes_in_buffer has reached zero and more + data is wanted. In typical applications, it should read fresh data + into the buffer (ignoring the current state of next_input_byte and + bytes_in_buffer), reset the pointer & count to the start of the + buffer, and return TRUE indicating that the buffer has been reloaded. + It is not necessary to fill the buffer entirely, only to obtain at + least one more byte. bytes_in_buffer MUST be set to a positive value + if TRUE is returned. A FALSE return should only be used when I/O + suspension is desired (this mode is discussed in the next section). */ + static boolean fill_input_buffer (j_decompress_ptr cinfo); + + /* Skip num_bytes worth of data. The buffer pointer and count should + be advanced over num_bytes input bytes, refilling the buffer as + needed. This is used to skip over a potentially large amount of + uninteresting data (such as an APPn marker). In some applications + it may be possible to optimize away the reading of the skipped data, + but it's not clear that being smart is worth much trouble; large + skips are uncommon. bytes_in_buffer may be zero on return. + A zero or negative skip count should be treated as a no-op. */ + static void skip_input_data (j_decompress_ptr cinfo, long num_bytes); + + /* Terminate source --- called by jpeg_finish_decompress() after all + data has been read. Often a no-op. */ + static void term_source (j_decompress_ptr cinfo); + + // Copy filename to have it around for error-messages + static io::path Filename; + + #endif // _IRR_COMPILE_WITH_LIBJPEG_ +}; + + +} // end namespace video +} // end namespace irr + + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.cpp new file mode 100644 index 0000000..50ddf6e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.cpp @@ -0,0 +1,231 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderPCX.h" + +#ifdef _IRR_COMPILE_WITH_PCX_LOADER_ + +#include "IReadFile.h" +#include "SColor.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "os.h" +#include "irrString.h" + + +namespace irr +{ +namespace video +{ + + +//! constructor +CImageLoaderPCX::CImageLoaderPCX() +{ + #ifdef _DEBUG + setDebugName("CImageLoaderPCX"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderPCX::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "pcx" ); +} + + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderPCX::isALoadableFileFormat(io::IReadFile* file) const +{ + u8 headerID; + file->read(&headerID, sizeof(headerID)); + return headerID == 0x0a; +} + + +//! creates a image from the file +IImage* CImageLoaderPCX::loadImage(io::IReadFile* file) const +{ + SPCXHeader header; + s32* paletteData = 0; + + file->read(&header, sizeof(header)); + #ifdef __BIG_ENDIAN__ + header.XMin = os::Byteswap::byteswap(header.XMin); + header.YMin = os::Byteswap::byteswap(header.YMin); + header.XMax = os::Byteswap::byteswap(header.XMax); + header.YMax = os::Byteswap::byteswap(header.YMax); + header.HorizDPI = os::Byteswap::byteswap(header.HorizDPI); + header.VertDPI = os::Byteswap::byteswap(header.VertDPI); + header.BytesPerLine = os::Byteswap::byteswap(header.BytesPerLine); + header.PaletteType = os::Byteswap::byteswap(header.PaletteType); + header.HScrSize = os::Byteswap::byteswap(header.HScrSize); + header.VScrSize = os::Byteswap::byteswap(header.VScrSize); + #endif + + //! return if the header is wrong + if (header.Manufacturer != 0x0a && header.Encoding != 0x01) + return 0; + + // return if this isn't a supported type + if ((header.BitsPerPixel != 8) && (header.BitsPerPixel != 4) && (header.BitsPerPixel != 1)) + { + os::Printer::log("Unsupported bits per pixel in PCX file.", + file->getFileName(), irr::ELL_WARNING); + return 0; + } + + // read palette + if( (header.BitsPerPixel == 8) && (header.Planes == 1) ) + { + // the palette indicator (usually a 0x0c is found infront of the actual palette data) + // is ignored because some exporters seem to forget to write it. This would result in + // no image loaded before, now only wrong colors will be set. + const long pos = file->getPos(); + file->seek( file->getSize()-256*3, false ); + + u8 *tempPalette = new u8[768]; + paletteData = new s32[256]; + file->read( tempPalette, 768 ); + + for( s32 i=0; i<256; i++ ) + { + paletteData[i] = (0xff000000 | + (tempPalette[i*3+0] << 16) | + (tempPalette[i*3+1] << 8) | + (tempPalette[i*3+2])); + } + + delete [] tempPalette; + + file->seek(pos); + } + else if( header.BitsPerPixel == 4 ) + { + paletteData = new s32[16]; + for( s32 i=0; i<16; i++ ) + { + paletteData[i] = (0xff000000 | + (header.Palette[i*3+0] << 16) | + (header.Palette[i*3+1] << 8) | + (header.Palette[i*3+2])); + } + } + + // read image data + const s32 width = header.XMax - header.XMin + 1; + const s32 height = header.YMax - header.YMin + 1; + const s32 imagebytes = header.BytesPerLine * header.Planes * header.BitsPerPixel * height / 8; + u8* PCXData = new u8[imagebytes]; + + u8 cnt, value; + s32 lineoffset=0, linestart=0, nextmode=1; + for(s32 offset = 0; offset < imagebytes; offset += cnt) + { + file->read(&cnt, 1); + if( !((cnt & 0xc0) == 0xc0) ) + { + value = cnt; + cnt = 1; + } + else + { + cnt &= 0x3f; + file->read(&value, 1); + } + if (header.Planes==1) + memset(PCXData+offset, value, cnt); + else + { + for (u8 i=0; i<cnt; ++i) + { + PCXData[linestart+lineoffset]=value; + lineoffset += 3; + if (lineoffset>=3*header.BytesPerLine) + { + lineoffset=nextmode; + if (++nextmode==3) + nextmode=0; + if (lineoffset==0) + linestart += 3*header.BytesPerLine; + } + } + } + } + + // create image + video::IImage* image = 0; + s32 pad = (header.BytesPerLine - width * header.BitsPerPixel / 8) * header.Planes; + + if (pad < 0) + pad = -pad; + + if (header.BitsPerPixel==8) + { + switch(header.Planes) // TODO: Other formats + { + case 1: + image = new CImage(ECF_A1R5G5B5, core::dimension2d<u32>(width, height)); + if (image) + CColorConverter::convert8BitTo16Bit(PCXData, (s16*)image->lock(), width, height, paletteData, pad); + break; + case 3: + image = new CImage(ECF_R8G8B8, core::dimension2d<u32>(width, height)); + if (image) + CColorConverter::convert24BitTo24Bit(PCXData, (u8*)image->lock(), width, height, pad); + break; + } + } + else if (header.BitsPerPixel==4) + { + if (header.Planes==1) + { + image = new CImage(ECF_A1R5G5B5, core::dimension2d<u32>(width, height)); + if (image) + CColorConverter::convert4BitTo16Bit(PCXData, (s16*)image->lock(), width, height, paletteData, pad); + } + } + else if (header.BitsPerPixel==1) + { + if (header.Planes==4) + { + image = new CImage(ECF_A1R5G5B5, core::dimension2d<u32>(width, height)); + if (image) + CColorConverter::convert4BitTo16Bit(PCXData, (s16*)image->lock(), width, height, paletteData, pad); + } + else if (header.Planes==1) + { + image = new CImage(ECF_A1R5G5B5, core::dimension2d<u32>(width, height)); + if (image) + CColorConverter::convert1BitTo16Bit(PCXData, (s16*)image->lock(), width, height, pad); + } + } + if (image) + image->unlock(); + + // clean up + + delete [] paletteData; + delete [] PCXData; + + return image; +} + + +//! creates a loader which is able to load pcx images +IImageLoader* createImageLoaderPCX() +{ + return new CImageLoaderPCX(); +} + + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h new file mode 100644 index 0000000..4bd3b7f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h @@ -0,0 +1,82 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_PCX_H_INCLUDED__ +#define __C_IMAGE_LOADER_PCX_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#include "IImageLoader.h" + +namespace irr +{ +namespace video +{ + +#if defined(_IRR_COMPILE_WITH_PCX_LOADER_) || defined(_IRR_COMPILE_WITH_PCX_WRITER_) + +// byte-align structures +#include "irrpack.h" + + struct SPCXHeader + { + u8 Manufacturer; + u8 Version; + u8 Encoding; + u8 BitsPerPixel; + u16 XMin; + u16 YMin; + u16 XMax; + u16 YMax; + u16 HorizDPI; + u16 VertDPI; + u8 Palette[48]; + u8 Reserved; + u8 Planes; + u16 BytesPerLine; + u16 PaletteType; + u16 HScrSize; + u16 VScrSize; + u8 Filler[54]; + } PACK_STRUCT; + + +// Default alignment +#include "irrunpack.h" + +#endif // compile with loader or writer + +#ifdef _IRR_COMPILE_WITH_PCX_LOADER_ + +/*! + Image Loader for Windows PCX bitmaps. + This loader was written and sent in by Dean P. Macri. I modified + only some small bits of it. +*/ +class CImageLoaderPCX : public IImageLoader +{ +public: + + //! constructor + CImageLoaderPCX(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +}; + +#endif // compile with loader + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.cpp new file mode 100644 index 0000000..3dbbe1c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.cpp @@ -0,0 +1,290 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderPNG.h" + +#ifdef _IRR_COMPILE_WITH_PNG_LOADER_ + +#ifdef _IRR_COMPILE_WITH_LIBPNG_ + #ifndef _IRR_USE_NON_SYSTEM_LIB_PNG_ + #include <png.h> // use system lib png + #else // _IRR_USE_NON_SYSTEM_LIB_PNG_ + #include "libpng/png.h" // use irrlicht included lib png + #endif // _IRR_USE_NON_SYSTEM_LIB_PNG_ +#endif // _IRR_COMPILE_WITH_LIBPNG_ + +#include "CImage.h" +#include "CReadFile.h" +#include "os.h" + +namespace irr +{ +namespace video +{ + +#ifdef _IRR_COMPILE_WITH_LIBPNG_ +// PNG function for error handling +static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg) +{ + os::Printer::log("PNG fatal error", msg, ELL_ERROR); + longjmp(png_jmpbuf(png_ptr), 1); +} + +// PNG function for warning handling +static void png_cpexcept_warn(png_structp png_ptr, png_const_charp msg) +{ + os::Printer::log("PNG warning", msg, ELL_WARNING); +} + +// PNG function for file reading +void PNGAPI user_read_data_fcn(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + // changed by zola { + io::IReadFile* file=(io::IReadFile*)png_get_io_ptr(png_ptr); + check=(png_size_t) file->read((void*)data,(u32)length); + // } + + if (check != length) + png_error(png_ptr, "Read Error"); +} +#endif // _IRR_COMPILE_WITH_LIBPNG_ + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderPng::isALoadableFileExtension(const io::path& filename) const +{ +#ifdef _IRR_COMPILE_WITH_LIBPNG_ + return core::hasFileExtension ( filename, "png" ); +#else + return false; +#endif // _IRR_COMPILE_WITH_LIBPNG_ +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderPng::isALoadableFileFormat(io::IReadFile* file) const +{ +#ifdef _IRR_COMPILE_WITH_LIBPNG_ + if (!file) + return false; + + png_byte buffer[8]; + // Read the first few bytes of the PNG file + if (file->read(buffer, 8) != 8) + return false; + + // Check if it really is a PNG file + return !png_sig_cmp(buffer, 0, 8); +#else + return false; +#endif // _IRR_COMPILE_WITH_LIBPNG_ +} + + +// load in the image data +IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const +{ +#ifdef _IRR_COMPILE_WITH_LIBPNG_ + if (!file) + return 0; + + video::IImage* image = 0; + //Used to point to image rows + u8** RowPointers = 0; + + png_byte buffer[8]; + // Read the first few bytes of the PNG file + if( file->read(buffer, 8) != 8 ) + { + os::Printer::log("LOAD PNG: can't read file\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // Check if it really is a PNG file + if( png_sig_cmp(buffer, 0, 8) ) + { + os::Printer::log("LOAD PNG: not really a png\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // Allocate the png read struct + png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warn); + if (!png_ptr) + { + os::Printer::log("LOAD PNG: Internal PNG create read struct failure\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // Allocate the png info struct + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + os::Printer::log("LOAD PNG: Internal PNG create info struct failure\n", file->getFileName(), ELL_ERROR); + png_destroy_read_struct(&png_ptr, NULL, NULL); + return 0; + } + + // for proper error handling + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + if (RowPointers) + delete [] RowPointers; + return 0; + } + + // changed by zola so we don't need to have public FILE pointers + png_set_read_fn(png_ptr, file, user_read_data_fcn); + + png_set_sig_bytes(png_ptr, 8); // Tell png that we read the signature + + png_read_info(png_ptr, info_ptr); // Read the info section of the png file + + u32 Width; + u32 Height; + s32 BitDepth; + s32 ColorType; + { + // Use temporary variables to avoid passing casted pointers + png_uint_32 w,h; + // Extract info + png_get_IHDR(png_ptr, info_ptr, + &w, &h, + &BitDepth, &ColorType, NULL, NULL, NULL); + Width=w; + Height=h; + } + + // Convert palette color to true color + if (ColorType==PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + // Convert low bit colors to 8 bit colors + if (BitDepth < 8) + { + if (ColorType==PNG_COLOR_TYPE_GRAY || ColorType==PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_expand_gray_1_2_4_to_8(png_ptr); + else + png_set_packing(png_ptr); + } + + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(png_ptr); + + // Convert high bit colors to 8 bit colors + if (BitDepth == 16) + png_set_strip_16(png_ptr); + + // Convert gray color to true color + if (ColorType==PNG_COLOR_TYPE_GRAY || ColorType==PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + + int intent; + const double screen_gamma = 2.2; + + if (png_get_sRGB(png_ptr, info_ptr, &intent)) + png_set_gamma(png_ptr, screen_gamma, 0.45455); + else + { + double image_gamma; + if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) + png_set_gamma(png_ptr, screen_gamma, image_gamma); + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + } + + // Update the changes in between, as we need to get the new color type + // for proper processing of the RGBA type + png_read_update_info(png_ptr, info_ptr); + { + // Use temporary variables to avoid passing casted pointers + png_uint_32 w,h; + // Extract info + png_get_IHDR(png_ptr, info_ptr, + &w, &h, + &BitDepth, &ColorType, NULL, NULL, NULL); + Width=w; + Height=h; + } + + // Convert RGBA to BGRA + if (ColorType==PNG_COLOR_TYPE_RGB_ALPHA) + { +#ifdef __BIG_ENDIAN__ + png_set_swap_alpha(png_ptr); +#else + png_set_bgr(png_ptr); +#endif + } + + // Create the image structure to be filled by png data + if (ColorType==PNG_COLOR_TYPE_RGB_ALPHA) + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(Width, Height)); + else + image = new CImage(ECF_R8G8B8, core::dimension2d<u32>(Width, Height)); + if (!image) + { + os::Printer::log("LOAD PNG: Internal PNG create image struct failure\n", file->getFileName(), ELL_ERROR); + png_destroy_read_struct(&png_ptr, NULL, NULL); + return 0; + } + + // Create array of pointers to rows in image data + RowPointers = new png_bytep[Height]; + if (!RowPointers) + { + os::Printer::log("LOAD PNG: Internal PNG create row pointers failure\n", file->getFileName(), ELL_ERROR); + png_destroy_read_struct(&png_ptr, NULL, NULL); + delete image; + return 0; + } + + // Fill array of pointers to rows in image data + unsigned char* data = (unsigned char*)image->lock(); + for (u32 i=0; i<Height; ++i) + { + RowPointers[i]=data; + data += image->getPitch(); + } + + // for proper error handling + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + delete [] RowPointers; + image->unlock(); + delete [] image; + return 0; + } + + // Read data using the library function that handles all transformations including interlacing + png_read_image(png_ptr, RowPointers); + + png_read_end(png_ptr, NULL); + delete [] RowPointers; + image->unlock(); + png_destroy_read_struct(&png_ptr,&info_ptr, 0); // Clean up memory + + return image; +#else + return 0; +#endif // _IRR_COMPILE_WITH_LIBPNG_ +} + + +IImageLoader* createImageLoaderPNG() +{ + return new CImageLoaderPng(); +} + + +}// end namespace irr +}//end namespace video + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.h new file mode 100644 index 0000000..a3faac2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPNG.h @@ -0,0 +1,45 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// this file was created by rt (www.tomkorp.com), based on ttk's png-reader +// i wanted to be able to read in PNG images with irrlicht :) +// why? lossless compression with 8-bit alpha channel! + +#ifndef __C_IMAGE_LOADER_PNG_H_INCLUDED__ +#define __C_IMAGE_LOADER_PNG_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PNG_LOADER_ + +#include "IImageLoader.h" + +namespace irr +{ +namespace video +{ + +//! Surface Loader for PNG files +class CImageLoaderPng : public IImageLoader +{ +public: + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".png") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.cpp new file mode 100644 index 0000000..a0776fa --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.cpp @@ -0,0 +1,277 @@ +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderPPM.h" + +#ifdef _IRR_COMPILE_WITH_PPM_LOADER_ + +#include "IReadFile.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "os.h" +#include "fast_atof.h" +#include "coreutil.h" + +namespace irr +{ +namespace video +{ + + +//! constructor +CImageLoaderPPM::CImageLoaderPPM() +{ + #ifdef _DEBUG + setDebugName("CImageLoaderPPM"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderPPM::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "ppm", "pgm", "pbm" ); +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderPPM::isALoadableFileFormat(io::IReadFile* file) const +{ + c8 id[2]={0}; + file->read(&id, 2); + return (id[0]=='P' && id[1]>'0' && id[1]<'7'); +} + + +//! creates a surface from the file +IImage* CImageLoaderPPM::loadImage(io::IReadFile* file) const +{ + IImage* image; + + if (file->getSize() < 12) + return 0; + + c8 id[2]; + file->read(&id, 2); + + if (id[0]!='P' || id[1]<'1' || id[1]>'6') + return 0; + + const u8 format = id[1] - '0'; + const bool binary = format>3; + + core::stringc token; + getNextToken(file, token); + const u32 width = core::strtoul10(token.c_str()); + + getNextToken(file, token); + const u32 height = core::strtoul10(token.c_str()); + + u8* data = 0; + const u32 size = width*height; + if (format==1 || format==4) + { + skipToNextToken(file); // go to start of data + + const u32 bytesize = size/8+(size & 3)?1:0; + if (binary) + { + if (file->getSize()-file->getPos() < (long)bytesize) + return 0; + data = new u8[bytesize]; + file->read(data, bytesize); + } + else + { + if (file->getSize()-file->getPos() < (long)(2*size)) // optimistic test + return 0; + data = new u8[bytesize]; + memset(data, 0, bytesize); + u32 shift=0; + for (u32 i=0; i<size; ++i) + { + getNextToken(file, token); + if (token == "1") + data[i/8] |= (0x01 << shift); + if (++shift == 8) + shift=0; + } + } + image = new CImage(ECF_A1R5G5B5, core::dimension2d<u32>(width, height)); + if (image) + CColorConverter::convert1BitTo16Bit(data, (s16*)image->lock(), width, height); + } + else + { + getNextToken(file, token); + const u32 maxDepth = core::strtoul10(token.c_str()); + if (maxDepth > 255) // no double bytes yet + return 0; + + skipToNextToken(file); // go to start of data + + if (format==2 || format==5) + { + if (binary) + { + if (file->getSize()-file->getPos() < (long)size) + return 0; + data = new u8[size]; + file->read(data, size); + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(width, height)); + if (image) + { + u8* ptr = (u8*)image->lock(); + for (u32 i=0; i<size; ++i) + { + *ptr++ = data[i]; + *ptr++ = data[i]; + *ptr++ = data[i]; + *ptr++ = 255; + } + } + } + else + { + if (file->getSize()-file->getPos() < (long)(2*size)) // optimistic test + return 0; + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(width, height)); + if (image) + { + u8* ptr = (u8*)image->lock(); + for (u32 i=0; i<size; ++i) + { + getNextToken(file, token); + const u8 num = (u8)core::strtoul10(token.c_str()); + *ptr++ = num; + *ptr++ = num; + *ptr++ = num; + *ptr++ = 255; + } + } + } + } + else + { + const u32 bytesize = 3*size; + if (binary) + { + if (file->getSize()-file->getPos() < (long)bytesize) + return 0; + data = new u8[bytesize]; + file->read(data, bytesize); + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(width, height)); + if (image) + { + u8* ptr = (u8*)image->lock(); + for (u32 i=0; i<size; ++i) + { + *ptr++ = data[3*i]; + *ptr++ = data[3*i+1]; + *ptr++ = data[3*i+2]; + *ptr++ = 255; + } + } + } + else + { + if (file->getSize()-file->getPos() < (long)(2*bytesize)) // optimistic test + return 0; + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(width, height)); + if (image) + { + u8* ptr = (u8*)image->lock(); + for (u32 i=0; i<size; ++i) + { + getNextToken(file, token); + *ptr++ = (u8)core::strtoul10(token.c_str()); + getNextToken(file, token); + *ptr++ = (u8)core::strtoul10(token.c_str()); + getNextToken(file, token); + *ptr++ = (u8)core::strtoul10(token.c_str()); + *ptr++ = 255; + } + } + } + } + } + + if (image) + image->unlock(); + + delete [] data; + + return image; +} + + +//! read the next token from file +void CImageLoaderPPM::getNextToken(io::IReadFile* file, core::stringc& token) const +{ + token = ""; + c8 c; + while(file->getPos()<file->getSize()) + { + file->read(&c, 1); + if (c=='#') + { + while (c!='\n' && c!='\r' && (file->getPos()<file->getSize())) + file->read(&c, 1); + } + else if (!core::isspace(c)) + { + token.append(c); + break; + } + } + while(file->getPos()<file->getSize()) + { + file->read(&c, 1); + if (c=='#') + { + while (c!='\n' && c!='\r' && (file->getPos()<file->getSize())) + file->read(&c, 1); + } + else if (!core::isspace(c)) + token.append(c); + else + break; + } +} + + +//! skip to next token (skip whitespace) +void CImageLoaderPPM::skipToNextToken(io::IReadFile* file) const +{ + c8 c; + while(file->getPos()<file->getSize()) + { + file->read(&c, 1); + if (c=='#') + { + while (c!='\n' && c!='\r' && (file->getPos()<file->getSize())) + file->read(&c, 1); + } + else if (!core::isspace(c)) + { + file->seek(-1, true); // put back + break; + } + } +} + + +//! creates a loader which is able to load windows bitmaps +IImageLoader* createImageLoaderPPM() +{ + return new CImageLoaderPPM; +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.h new file mode 100644 index 0000000..3c015a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPPM.h @@ -0,0 +1,55 @@ +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_PPM_H_INCLUDED__ +#define __C_IMAGE_LOADER_PPM_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PPM_LOADER_ + +#include "IImageLoader.h" +#include "irrString.h" + + +namespace irr +{ +namespace video +{ + + +/*! + Surface Loader for SUN Pixmaps +*/ +class CImageLoaderPPM : public IImageLoader +{ +public: + + //! constructor + CImageLoaderPPM(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + //! read the next token from file + void getNextToken(io::IReadFile* file, core::stringc& token) const; + //! skip to next token (skip whitespace) + void skipToNextToken(io::IReadFile* file) const; +}; + +} // end namespace video +} // end namespace irr + + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.cpp new file mode 100644 index 0000000..3eb5c3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.cpp @@ -0,0 +1,375 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderPSD.h" + +#ifdef _IRR_COMPILE_WITH_PSD_LOADER_ + +#include "IReadFile.h" +#include "os.h" +#include "CImage.h" +#include "irrString.h" + + +namespace irr +{ +namespace video +{ + + +//! constructor +CImageLoaderPSD::CImageLoaderPSD() +{ + #ifdef _DEBUG + setDebugName("CImageLoaderPSD"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderPSD::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "psd" ); +} + + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderPSD::isALoadableFileFormat(io::IReadFile* file) const +{ + if (!file) + return false; + + u8 type[3]; + file->read(&type, sizeof(u8)*3); + return (type[2]==2); // we currently only handle tgas of type 2. +} + + + +//! creates a surface from the file +IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const +{ + u32* imageData = 0; + + PsdHeader header; + file->read(&header, sizeof(PsdHeader)); + +#ifndef __BIG_ENDIAN__ + header.version = os::Byteswap::byteswap(header.version); + header.channels = os::Byteswap::byteswap(header.channels); + header.height = os::Byteswap::byteswap(header.height); + header.width = os::Byteswap::byteswap(header.width); + header.depth = os::Byteswap::byteswap(header.depth); + header.mode = os::Byteswap::byteswap(header.mode); +#endif + + if (header.signature[0] != '8' || + header.signature[1] != 'B' || + header.signature[2] != 'P' || + header.signature[3] != 'S') + return 0; + + if (header.version != 1) + { + os::Printer::log("Unsupported PSD file version", file->getFileName(), ELL_ERROR); + return 0; + } + + if (header.mode != 3 || header.depth != 8) + { + os::Printer::log("Unsupported PSD color mode or depth.\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // skip color mode data + + u32 l; + file->read(&l, sizeof(u32)); +#ifndef __BIG_ENDIAN__ + l = os::Byteswap::byteswap(l); +#endif + if (!file->seek(l, true)) + { + os::Printer::log("Error seeking file pos to image resources.\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // skip image resources + + file->read(&l, sizeof(u32)); +#ifndef __BIG_ENDIAN__ + l = os::Byteswap::byteswap(l); +#endif + if (!file->seek(l, true)) + { + os::Printer::log("Error seeking file pos to layer and mask.\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // skip layer & mask + + file->read(&l, sizeof(u32)); +#ifndef __BIG_ENDIAN__ + l = os::Byteswap::byteswap(l); +#endif + if (!file->seek(l, true)) + { + os::Printer::log("Error seeking file pos to image data section.\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // read image data + + u16 compressionType; + file->read(&compressionType, sizeof(u16)); +#ifndef __BIG_ENDIAN__ + compressionType = os::Byteswap::byteswap(compressionType); +#endif + + if (compressionType != 1 && compressionType != 0) + { + os::Printer::log("Unsupported psd compression mode.\n", file->getFileName(), ELL_ERROR); + return 0; + } + + // create image data block + + imageData = new u32[header.width * header.height]; + + bool res = false; + + if (compressionType == 0) + res = readRawImageData(file, header, imageData); // RAW image data + else + res = readRLEImageData(file, header, imageData); // RLE compressed data + + video::IImage* image = 0; + + if (res) + { + // create surface + image = new CImage(ECF_A8R8G8B8, + core::dimension2d<u32>(header.width, header.height), imageData); + } + + if (!image) + delete [] imageData; + imageData = 0; + + return image; +} + + +bool CImageLoaderPSD::readRawImageData(io::IReadFile* file, const PsdHeader& header, u32* imageData) const +{ + u8* tmpData = new u8[header.width * header.height]; + + for (s32 channel=0; channel<header.channels && channel < 3; ++channel) + { + if (!file->read(tmpData, sizeof(c8) * header.width * header.height)) + { + os::Printer::log("Error reading color channel\n", file->getFileName(), ELL_ERROR); + break; + } + + s16 shift = getShiftFromChannel((c8)channel, header); + if (shift != -1) + { + u32 mask = 0xff << shift; + + for (u32 x=0; x<header.width; ++x) + { + for (u32 y=0; y<header.height; ++y) + { + s32 index = x + y*header.width; + imageData[index] = ~(~imageData[index] | mask); + imageData[index] |= tmpData[index] << shift; + } + } + } + + } + + delete [] tmpData; + return true; +} + + +bool CImageLoaderPSD::readRLEImageData(io::IReadFile* file, const PsdHeader& header, u32* imageData) const +{ + /* If the compression code is 1, the image data + starts with the byte counts for all the scan lines in the channel + (LayerBottom LayerTop), with each count stored as a two + byte value. The RLE compressed data follows, with each scan line + compressed separately. The RLE compression is the same compres-sion + algorithm used by the Macintosh ROM routine PackBits, and + the TIFF standard. + If the Layer's Size, and therefore the data, is odd, a pad byte will + be inserted at the end of the row. + */ + + /* + A pseudo code fragment to unpack might look like this: + + Loop until you get the number of unpacked bytes you are expecting: + Read the next source byte into n. + If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. + Else if n is between -127 and -1 inclusive, copy the next byte -n+1 + times. + Else if n is -128, noop. + Endloop + + In the inverse routine, it is best to encode a 2-byte repeat run as a replicate run + except when preceded and followed by a literal run. In that case, it is best to merge + the three runs into one literal run. Always encode 3-byte repeats as replicate runs. + That is the essence of the algorithm. Here are some additional rules: + - Pack each row separately. Do not compress across row boundaries. + - The number of uncompressed bytes per row is defined to be (ImageWidth + 7) + / 8. If the uncompressed bitmap is required to have an even number of bytes per + row, decompress into word-aligned buffers. + - If a run is larger than 128 bytes, encode the remainder of the run as one or more + additional replicate runs. + When PackBits data is decompressed, the result should be interpreted as per com-pression + type 1 (no compression). + */ + + u8* tmpData = new u8[header.width * header.height]; + u16 *rleCount= new u16 [header.height * header.channels]; + + s32 size=0; + + for (u32 y=0; y<header.height * header.channels; ++y) + { + if (!file->read(&rleCount[y], sizeof(u16))) + { + delete [] tmpData; + delete [] rleCount; + os::Printer::log("Error reading rle rows\n", file->getFileName(), ELL_ERROR); + return false; + } + +#ifndef __BIG_ENDIAN__ + rleCount[y] = os::Byteswap::byteswap(rleCount[y]); +#endif + size += rleCount[y]; + } + + s8 *buf = new s8[size]; + if (!file->read(buf, size)) + { + delete [] rleCount; + delete [] buf; + delete [] tmpData; + os::Printer::log("Error reading rle rows\n", file->getFileName(), ELL_ERROR); + return false; + } + + u16 *rcount=rleCount; + + s8 rh; + u16 bytesRead; + u8 *dest; + s8 *pBuf = buf; + + // decompress packbit rle + + for (s32 channel=0; channel<header.channels; channel++) + { + for (u32 y=0; y<header.height; ++y, ++rcount) + { + bytesRead=0; + dest = &tmpData[y*header.width]; + + while (bytesRead < *rcount) + { + rh = *pBuf++; + ++bytesRead; + + if (rh >= 0) + { + ++rh; + + while (rh--) + { + *dest = *pBuf++; + ++bytesRead; + ++dest; + } + } + else + if (rh > -128) + { + rh = -rh +1; + + while (rh--) + { + *dest = *pBuf; + ++dest; + } + + ++pBuf; + ++bytesRead; + } + } + } + + s16 shift = getShiftFromChannel((c8)channel, header); + + if (shift != -1) + { + u32 mask = 0xff << shift; + + for (u32 x=0; x<header.width; ++x) + for (u32 y=0; y<header.height; ++y) + { + s32 index = x + y*header.width; + imageData[index] = ~(~imageData[index] | mask); + imageData[index] |= tmpData[index] << shift; + } + } + } + + delete [] rleCount; + delete [] buf; + delete [] tmpData; + + return true; +} + + +s16 CImageLoaderPSD::getShiftFromChannel(c8 channelNr, const PsdHeader& header) const +{ + switch(channelNr) + { + case 0: + return 16; // red + case 1: + return 8; // green + case 2: + return 0; // blue + case 3: + return header.channels == 4 ? 24 : -1; // ? + case 4: + return 24; // alpha + default: + return -1; + } +} + + + +//! creates a loader which is able to load tgas +IImageLoader* createImageLoaderPSD() +{ + return new CImageLoaderPSD(); +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.h new file mode 100644 index 0000000..72f4b43 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPSD.h @@ -0,0 +1,72 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_PSD_H_INCLUDED__ +#define __C_IMAGE_LOADER_PSD_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PSD_LOADER_ + +#include "IImageLoader.h" + +namespace irr +{ +namespace video +{ + + +// byte-align structures +#include "irrpack.h" + + struct PsdHeader + { + c8 signature [4]; // Always equal to 8BPS. + u16 version; // Always equal to 1 + c8 reserved [6]; // Must be zero + u16 channels; // Number of any channels inc. alphas + u32 height; // Rows Height of image in pixel + u32 width; // Colums Width of image in pixel + u16 depth; // Bits/channel + u16 mode; // Color mode of the file (Bitmap/Grayscale..) + } PACK_STRUCT; + + +// Default alignment +#include "irrunpack.h" + +/*! + Surface Loader for psd images +*/ +class CImageLoaderPSD : public IImageLoader +{ +public: + + //! constructor + CImageLoaderPSD(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + + bool readRawImageData(io::IReadFile* file, const PsdHeader& header, u32* imageData) const; + bool readRLEImageData(io::IReadFile* file, const PsdHeader& header, u32* imageData) const; + s16 getShiftFromChannel(c8 channelNr, const PsdHeader& header) const; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.cpp new file mode 100644 index 0000000..4699dc0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.cpp @@ -0,0 +1,654 @@ +//! Copyright (C) 2009-2012 Gary Conway +//! This file is part of the "Irrlicht Engine". +//! For conditions of distribution and use, see copyright notice in irrlicht.h + +/* + Author: Gary Conway (Viper) - co-author of the ZIP file format, Feb 1989, + see the story at http://www.idcnet.us/ziphistory.html + Website: http://idcnet.us + Email: codeslinger@vipergc.com + Created: March 1, 2009 + Version: 1.0 + Updated: + + This module will load SGI .rgb files (along with the other extensions). The module complies + with version 1.0 of the SGI Image File Format by Paul Haeberli of Silicon Graphics Computer Systems + The module handles BW, RGB and RGBA images. + + RGB images are stored with either 8 bits per COLOR VALUE, one each for red,green,blue (24bpp) + or 16 bits per COLOR VALUE, again one each for red,green,blue (48 bpp), not including the alpha channel + + + OPTIONS NOT SUPPORTED + + 1. 16 bit COLOR VALUES (48bpp modes) + 2. COLORMAP = DITHERED mode + + + +For non- run length encoded files, this is the structure + + The Header + The Image Data + +If the image is run length encoded, this is the structure: + The Header + The Offset Tables + The Image Data + +The Header consists of the following: + + Size | Type | Name | Description + + 2 bytes | short | MAGIC | IRIS image file magic number + 1 byte | char | STORAGE | Storage format + 1 byte | char | BPC | Number of bytes per pixel channel + 2 bytes | ushort | DIMENSION | Number of dimensions + 2 bytes | ushort | XSIZE | X size in pixels + 2 bytes | ushort | YSIZE | Y size in pixels + 2 bytes | ushort | ZSIZE | Number of channels + 4 bytes | long | PIXMIN | Minimum pixel value + 4 bytes | long | PIXMAX | Maximum pixel value + 4 bytes | char | DUMMY | Ignored + 80 bytes | char | IMAGENAME | Image name + 4 bytes | long | COLORMAP | Colormap ID + 404 bytes | char | DUMMY | Ignored + +Here is a description of each field in the image file Header: + +MAGIC - This is the decimal value 474 saved as a short. This identifies the file as an SGI image file. + +STORAGE - specifies whether the image is stored using run length encoding (RLE) or not (VERBATIM). + If RLE is used, the value of this byte will be 1. Otherwise the value of this byte will + be 0. The only allowed values for this field are 0 or 1. + +BPC - describes the precision that is used to store each channel of an image. This is the number of + bytes per pixel component. The majority of SGI image files use 1 byte per pixel component, + giving 256 levels. Some SGI image files use 2 bytes per component. The only allowed values + for this field are 1 or 2. + +DIMENSION - described the number of dimensions in the data stored in the image file. + The only allowed values are 1, 2, or 3. If this value is 1, the image file + consists of only 1 channel and only 1 scanline (row). The length of this + scanline is given by the value of XSIZE below. If this value is 2, the file + consists of a single channel with a number of scanlines. The width and height + of the image are given by the values of XSIZE and YSIZE below. + If this value is 3, the file consists of a number of channels. + The width and height of the image are given by the values of XSIZE and YSIZE below. + The number of channels is given by the value of ZSIZE below. + +XSIZE - The width of the image in pixels + +YSIZE - The height of the image in pixels + +ZSIZE - The number of channels in the image. B/W (greyscale) images are stored as 2 dimensional + images with a ZSIZE of 1. RGB color images are stored as 3 dimensional images with a + ZSIZE of 3. An RGB image with an ALPHA channel is stored as a 3 dimensional image with + a ZSIZE of 4. There are no inherent limitations in the SGI image file format that would + preclude the creation of image files with more than 4 channels. + +PINMIN - The minimum pixel value in the image. The value of 0 may be used if no pixel has a value + that is smaller than 0. + +PINMAX - The maximum pixel value in the image. The value of 255 may be used if no pixel has a + value that is greater than 255. This is the value that is considered to be full + brightness in the image. + +DUMMY - This 4 bytes of data should be set to 0. + +IMAGENAME - An null terminated ascii string of up to 79 characters terminated by a null may be + included here. This is not commonly used. + +COLORMAP - This controls how the pixel values in the file should be interpreted. It can have one + of these four values: + +0: NORMAL - The data in the channels represent B/W values for images with 1 channel, RGB values + for images with 3 channels, and RGBA values for images with 4 channels. Almost all + the SGI image files are of this type. + +1: DITHERED - The image will have only 1 channel of data. For each pixel, RGB data is packed + into one 8 bit value. 3 bits are used for red and green, while blue uses 2 bits. + Red data is found in bits[2..0], green data in bits[5..3], and blue data in + bits[7..6]. This format is obsolete. + +2: SCREEN - The image will have only 1 channel of data. This format was used to store + color-indexed pixels. To convert the pixel values into RGB values a colormap + must be used. The appropriate color map varies from image to image. This format is obsolete. + +3: COLORMAP - The image is used to store a color map from an SGI machine. In this case the + image is not displayable in the conventional sense. + +DUMMY - This 404 bytes of data should be set to 0. This makes the Header exactly 512 bytes. +*/ + +#include "CImageLoaderRGB.h" + +#ifdef _IRR_COMPILE_WITH_RGB_LOADER_ + +#include "IReadFile.h" +#include "SColor.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "os.h" +#include "irrString.h" + + +namespace irr +{ +namespace video +{ + +//! constructor +CImageLoaderRGB::CImageLoaderRGB() +{ + #ifdef _DEBUG + setDebugName("CImageLoaderRGB"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extensions listed here +bool CImageLoaderRGB::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension( filename, "rgb", "rgba", "sgi" ) || + core::hasFileExtension( filename, "int", "inta", "bw" ); +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderRGB::isALoadableFileFormat(io::IReadFile* file) const +{ + rgbStruct rgb; + return checkFormat(file, rgb); +} + + +/** The main entry point, read and format the image file. +\return Pointer to the image data on success + null pointer on fail */ +IImage* CImageLoaderRGB::loadImage(io::IReadFile* file) const +{ + IImage* image = 0; + s32* paletteData = 0; + + rgbStruct rgb; // construct our structure for holding data + + // read Header information + if (checkFormat(file, rgb)) + { + // 16 bits per COLOR VALUE, not supported, this is 48bpp mode + if (rgb.Header.BPC != 1) + { + os::Printer::log("Only one byte per pixel RGB files are supported", file->getFileName(), ELL_ERROR); + } + else if (rgb.Header.Colormap != 0) + { + os::Printer::log("Dithered, Screen and Colormap RGB files are not supported", file->getFileName(), ELL_ERROR); + } + else if (rgb.Header.Storage == 1 && !readOffsetTables(file, rgb)) + { + os::Printer::log("Failed to read RLE table in RGB file", file->getFileName(), ELL_ERROR); + } + else if (!rgb.allocateTemps()) + { + os::Printer::log("Out of memory in RGB file loader", file->getFileName(), ELL_ERROR); + } + else + { + // read and process the file to rgbData + processFile(file, rgb); + +/* + ZSIZE Description + 1 BW (grayscale) image + 3 RGB image + 4 RGBa image with one alpha channel + + When the Alpha channel is present, I am not sure with RGB files if + it's a precomputed RGB color or it needs to be completely calculated. My guess + would be that it's not precomputed for two reasons. + + 1. the loss of precision when calculating the fraction, then storing the result as an int + 2. the loss of the original color data when the image might be composited with another. Yes + the original color data could be computed, however, not without another loss in precision + + Also, I don't know where to find the background color + Pixmin and Pixmax are apparently the min and max alpha blend values (0-100%) + + Complete Alpha blending computation + The actual resulting merged color is computed this way: + (image color ◊ alpha) + (background color ◊ (100% - alpha)). + + Using precomputed blending + (image color) + (background color ◊ (100% - alpha)). + + Alternatively, the RGB files could use another blending technique entirely +*/ + + switch (rgb.Header.Zsize) + { + case 1: + // BW (grayscale) image + paletteData = new s32[256]; + for (int n=0; n<256; n++) + paletteData[n] = n; + + image = new CImage(ECF_A1R5G5B5, core::dimension2d<u32>(rgb.Header.Xsize, rgb.Header.Ysize)); + if (image) + CColorConverter::convert8BitTo16Bit(rgb.rgbData, (s16*)image->lock(), rgb.Header.Xsize, rgb.Header.Ysize, paletteData, 0, true); + break; + case 3: + // RGB image + // one byte per COLOR VALUE, eg, 24bpp + image = new CImage(ECF_R8G8B8, core::dimension2d<u32>(rgb.Header.Xsize, rgb.Header.Ysize)); + if (image) + CColorConverter::convert24BitTo24Bit(rgb.rgbData, (u8*)image->lock(), rgb.Header.Xsize, rgb.Header.Ysize, 0, true, false); + break; + case 4: + // RGBa image with one alpha channel (32bpp) + // image is stored in rgbData as RGBA + + converttoARGB(reinterpret_cast<u32*>(rgb.rgbData), rgb.Header.Ysize * rgb.Header.Xsize); + + image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(rgb.Header.Xsize, rgb.Header.Ysize)); + if (image) + CColorConverter::convert32BitTo32Bit((s32*)rgb.rgbData, (s32*)image->lock(), rgb.Header.Xsize, rgb.Header.Ysize, 0, true); + + break; + default: + // Format unknown + os::Printer::log("Unsupported pixel format in RGB file", file->getFileName(), ELL_ERROR); + } + + if (image) + image->unlock(); + } + } + + // and tidy up allocated memory + delete [] paletteData; + + return image; +} + +// returns true on success +bool CImageLoaderRGB::readHeader(io::IReadFile* file, rgbStruct& rgb) const +{ + if ( file->read(&rgb.Header, sizeof(rgb.Header)) < s32(sizeof(rgb.Header)) ) + return false; + + // test for INTEL or BIG ENDIAN processor + // if INTEL, then swap the byte order on 16 bit INT's to make them BIG ENDIAN + // because that is the native format for the .rgb file +#ifndef __BIG_ENDIAN__ + rgb.Header.Magic = os::Byteswap::byteswap(rgb.Header.Magic); + rgb.Header.Storage = os::Byteswap::byteswap(rgb.Header.Storage); + rgb.Header.Dimension = os::Byteswap::byteswap(rgb.Header.Dimension); + rgb.Header.Xsize = os::Byteswap::byteswap(rgb.Header.Xsize); + rgb.Header.Ysize = os::Byteswap::byteswap(rgb.Header.Ysize); + rgb.Header.Zsize = os::Byteswap::byteswap(rgb.Header.Zsize); + rgb.Header.Pixmin = os::Byteswap::byteswap(rgb.Header.Pixmin); + rgb.Header.Pixmax = os::Byteswap::byteswap(rgb.Header.Pixmax); + rgb.Header.Colormap = os::Byteswap::byteswap(rgb.Header.Colormap); +#endif + + // calculate the size of the buffer needed: XSIZE * YSIZE * ZSIZE * BPC + rgb.ImageSize = (rgb.Header.Xsize)*(rgb.Header.Ysize)*(rgb.Header.Zsize)*(rgb.Header.BPC); + + return true; +} + + +bool CImageLoaderRGB::checkFormat(io::IReadFile* file, rgbStruct& rgb) const +{ + if (!readHeader(file, rgb)) + return false; + + return (rgb.Header.Magic == 0x1DA); +} + +/* +If the image is stored using run length encoding, offset tables follow the Header that +describe what the file offsets are to the RLE for each scanline. This information only +applies if the value for STORAGE above is 1. + + Size | Type | Name | Description + + tablen longs | long | STARTTAB | Start table + tablen longs | long | LENGTHTAB | Length table + +One entry in each table is needed for each scanline of RLE data. The total number of scanlines in the image (tablen) is determined by the product of the YSIZE and ZSIZE. There are two tables of longs that are written. Each consists of tablen longs of data. The first table has the file offsets to the RLE data for each scanline in the image. In a file with more than 1 channel (ZSIZE > 1) this table first has all the offsets for the scanlines in the first channel, followed be offsets for the scanlines in the second channel, etc. The second table has the RLE data length for each scanline in the image. In a file with more than 1 channel (ZSIZE > 1) this table first has all the RLE data lengths for the scanlines in the first channel, followed be RLE data lengths for the scanlines in the second channel, etc. + +To find the the file offset, and the number of bytes in the RLE data for a particular scanline, these +two arrays may be read in and indexed as follows: + +To read in the tables: + + unsigned long *starttab, *lengthtab; + + tablen = YSIZE*ZSIZE*sizeof(long); + starttab = (unsigned long *)mymalloc(tablen); + lengthtab = (unsigned long *)mymalloc(tablen); + fseek(rgb->inf,512,SEEK_SET); + readlongtab(rgb->inf,starttab); + readlongtab(rgb->inf,lengthtab); + +To find the file offset and RLE data length for a scanline: + +rowno is an integer in the range 0 to YSIZE-1 channo is an integer in the range 0 to ZSIZE-1 + + rleoffset = starttab[rowno+channo*YSIZE] + rlelength = lengthtab[rowno+channo*YSIZE] + +It is possible for two identical rows (scanlines) to share compressed data. A completely +white image could be written as a single compressed row and having all table entries point +to that row. Another little hack that should work is if you are writing out a RGB RLE file, +and a particular scanline is achromatic (greyscale), you could just make the r, g and b rows +point to the same data!! + + RETURNS: on success true, else returns false +*/ + +bool CImageLoaderRGB::readOffsetTables(io::IReadFile* file, rgbStruct& rgb) const +{ + rgb.TableLen = rgb.Header.Ysize * rgb.Header.Zsize ; // calc size of tables + + // return error if unable to allocate tables + rgb.StartTable = new u32[rgb.TableLen]; + if (!rgb.StartTable) + return false; + rgb.LengthTable = new u32[rgb.TableLen]; + if (!rgb.LengthTable) + return false; + + file->seek(512); + file->read(rgb.StartTable, rgb.TableLen* sizeof(u32)); + file->read(rgb.LengthTable, rgb.TableLen* sizeof(u32)); + + // if we are on an INTEL platform, swap the bytes +#ifndef __BIG_ENDIAN__ + const u32 length = rgb.TableLen; + for (u32 i=0; i<length; ++i) + { + rgb.StartTable[i] = os::Byteswap::byteswap(rgb.StartTable[i]); + rgb.LengthTable[i] = os::Byteswap::byteswap(rgb.LengthTable[i]); + } +#endif + + return true; +} + + +/* + The Header has already been read into rgb structure + The Tables have been read if necessary + Now process the actual data +*/ +void CImageLoaderRGB::processFile(io::IReadFile* file, rgbStruct& rgb) const +{ + u16 *tempShort; + + // calculate the size of the buffer needed: XSIZE * YSIZE * ZSIZE * BPC + rgb.rgbData = new u8 [(rgb.Header.Xsize)*(rgb.Header.Ysize)*(rgb.Header.Zsize)*(rgb.Header.BPC)]; + u8 *ptr = rgb.rgbData; + + // cycle through all scanlines + +#ifdef _IRR_RGB_FILE_INVERTED_IMAGE_ + // preserve the image as stored, eg, inverted + for (u16 i = 0; i < rgb.Header.Ysize; ++i) +#else + // invert the image to make it upright + for (s32 i = (s32)(rgb.Header.Ysize)-1; i>=0; --i) +#endif + { + // check the number of channels and read a row of data + if (rgb.Header.Zsize >= 1) + readRGBrow( rgb.tmpR, i, 0, file, rgb); + if (rgb.Header.Zsize >= 2) + readRGBrow( rgb.tmpG, i, 1, file, rgb); + if (rgb.Header.Zsize >= 3) + readRGBrow( rgb.tmpB, i, 2, file, rgb); + if (rgb.Header.Zsize >= 4) + readRGBrow( rgb.tmpA, i, 3, file, rgb); + + // cycle thru all values for this row + for (u16 j = 0; j < rgb.Header.Xsize; ++j) + { + if(rgb.Header.BPC == 1) + { + // ONE byte per color + if (rgb.Header.Zsize >= 1) + *ptr++ = rgb.tmpR[j]; + if (rgb.Header.Zsize >= 2) + *ptr++ = rgb.tmpG[j]; + if (rgb.Header.Zsize >= 3) + *ptr++ = rgb.tmpB[j]; + if (rgb.Header.Zsize >= 4) + *ptr++ = rgb.tmpA[j]; + } + else + { + // TWO bytes per color + if( rgb.Header.Zsize >= 1 ) + { + // two bytes of color data + tempShort = (u16 *) (ptr); + *tempShort = *( (u16 *) (rgb.tmpR) + j); + tempShort++; + ptr = ( u8 *)(tempShort); + } + if( rgb.Header.Zsize >= 2 ) + { + tempShort = ( u16 *) (ptr); + *tempShort = *( ( u16 *) (rgb.tmpG) + j); + tempShort++; + ptr = ( u8 *) (tempShort); + } + if( rgb.Header.Zsize >= 3 ) + { + tempShort = ( u16 *) (ptr); + *tempShort = *( ( u16 *) (rgb.tmpB) + j); + tempShort++; + ptr = ( u8 *)(tempShort); + } + if( rgb.Header.Zsize >= 4 ) + { + tempShort = ( u16 *) (ptr); + *tempShort = *( ( u16 *) (rgb.tmpA) + j); + tempShort++; + ptr = ( u8 *)(tempShort); + } + } // end if(rgb.Header.BPC == 1) + } // end for + } // end for +} + + +/* + This information only applies if the value for STORAGE is 1. If the image is + stored using run length encoding, the image data follows the offset/length tables. + The RLE data is not in any particular order. The offset tables are used to + locate the rle data for any scanline. + + The RLE data must be read in from the file and expanded into pixel data in the following manner: + + If BPC is 1, then there is one byte per pixel. In this case the RLE data should be + read into an array of chars. To expand data, the low order seven bits of the first + byte: bits[6..0] are used to form a count. If the high order bit of the first byte + is 1: bit[7], then the count is used to specify how many bytes to copy from the RLE + data buffer to the destination. Otherwise, if the high order bit of the first byte + is 0: bit[7], then the count is used to specify how many times to repeat the value + of the following byte, in the destination. This process continues until a count + of 0 is found. This should decompress exactly XSIZE pixels. + + + One entry in each table is needed for each scanline of RLE data. The total number of + scanlines in the image (tablen) is determined by the product of the YSIZE and ZSIZE. + There are two tables of longs that are written. Each consists of tablen longs of data. + The first table has the file offsets to the RLE data for each scanline in the image. In + a file with more than 1 channel (ZSIZE > 1) this table first has all the offsets for the + scanlines in the first channel, followed be offsets for the scanlines in the second + channel, etc. The second table has the RLE data length for each scanline in the image. + In a file with more than 1 channel (ZSIZE > 1) this table first has all the RLE data + lengths for the scanlines in the first channel, followed be RLE data lengths for the + scanlines in the second channel, etc. + + Return a row of data, expanding RLE compression if necessary +*/ +void CImageLoaderRGB::readRGBrow(u8 *buf, int y, int z, io::IReadFile* file, rgbStruct& rgb) const +{ + if (rgb.Header.Storage != 1) + { + // stored VERBATIM + + file->seek(512+(y*rgb.Header.Xsize * rgb.Header.BPC)+(z* rgb.Header.Xsize * rgb.Header.Ysize * rgb.Header.BPC)); + file->read(buf, rgb.Header.Xsize * rgb.Header.BPC); + +#ifndef __BIG_ENDIAN__ + if (rgb.Header.BPC != 1) + { + u16* tmpbuf = reinterpret_cast<u16*>(buf); + for (u16 i=0; i<rgb.Header.Xsize; ++i) + tmpbuf[i] = os::Byteswap::byteswap(tmpbuf[i]); + } +#endif + return; + } + + // the file is stored as Run Length Encoding (RLE) + // each sequence is stored as 0x80 NumRepeats ByteToRepeat + + // get the file offset from StartTable and SEEK + // then read the data + + file->seek((long) rgb.StartTable[y+z * rgb.Header.Ysize]); + file->read(rgb.tmp, rgb.LengthTable[y+z * rgb.Header.Ysize]); + + // rgb.tmp has the data + + u16 pixel; + u16 *tempShort; + u8* iPtr = rgb.tmp; + u8* oPtr = buf; + while (true) + { + // if BPC = 1, then one byte per pixel + if (rgb.Header.BPC == 1) + { + pixel = *iPtr++; + } + else + { + // BPC = 2, so two bytes per pixel + tempShort = (u16 *) iPtr; + pixel = *tempShort; + tempShort++; + iPtr = (u8 *) tempShort; + } + +#ifndef __BIG_ENDIAN__ + if (rgb.Header.BPC != 1) + pixel = os::Byteswap::byteswap(pixel); +#endif + + s32 count = (s32)(pixel & 0x7F); + + // limit the count value to the remaining row size + if (oPtr + count*rgb.Header.BPC > buf + rgb.Header.Xsize * rgb.Header.BPC) + { + count = ( (buf + rgb.Header.Xsize * rgb.Header.BPC) - oPtr ) / rgb.Header.BPC; + } + + if (count<=0) + break; + else if (pixel & 0x80) + { + // repeat the byte pointed to by iPtr, count times + while (count--) + { + if(rgb.Header.BPC == 1) + { + *oPtr++ = *iPtr++; + } + else + { + // write pixel from iPtr to oPtr, move both two bytes ahead + tempShort = (u16 *) (iPtr); + pixel = *tempShort; + tempShort++; + iPtr = (u8 *) (tempShort); +#ifndef __BIG_ENDIAN__ + pixel = os::Byteswap::byteswap(pixel); +#endif + tempShort = (u16 *) (oPtr); + *tempShort = pixel; + tempShort++; + oPtr = (u8 *) (tempShort); + } + } + } + else + { + if (rgb.Header.BPC == 1) + { + pixel = *iPtr++; + } + else + { + tempShort = (u16 *) (iPtr); + pixel = *tempShort; + tempShort++; + iPtr = (u8 *) (tempShort); + } + +#ifndef __BIG_ENDIAN__ + if (rgb.Header.BPC != 1) + pixel = os::Byteswap::byteswap(pixel); +#endif + + while (count--) + { + if(rgb.Header.BPC == 1) + { + *oPtr++ = (u8) pixel; + } + else + { + tempShort = (u16 *) (oPtr); + *tempShort = pixel; + tempShort++; + oPtr = (u8 *) (tempShort); + } + } + } // else if (pixel & 0x80) + } // while (true) +} + + +// we have 1 byte per COLOR VALUE, eg 24bpp and 1 alpha channel +// color values are stored as RGBA, convert to ARGB +// todo: replace with CColorConverter method +void CImageLoaderRGB::converttoARGB(u32* in, const u32 size) const +{ + for (u32 x=0; x < size; ++x) + { + *in=(*in>>8)|(*in<<24); + ++in; + } +} + + +//! creates a loader which is able to load SGI RGB images +IImageLoader* createImageLoaderRGB() +{ + return new CImageLoaderRGB; +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.h new file mode 100644 index 0000000..1fe6454 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderRGB.h @@ -0,0 +1,165 @@ +// Copyright (C) 2009-2012 Gary Conway +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + + +/* + Author: Gary Conway (Viper) - co-author of the ZIP file format, Feb 1989, + see the story at http://www.idcnet.us/ziphistory.html + Website: http://idcnet.us + Email: codeslinger@vipergc.com + Created: March 1, 2009 + Version: 1.0 + Updated: +*/ + +#ifndef __C_IMAGE_LOADER_RGB_H_INCLUDED__ +#define __C_IMAGE_LOADER_RGB_H_INCLUDED__ + +// define _IRR_RGB_FILE_INVERTED_IMAGE_ to preserve the inverted format of the RGB file +// commenting this out will invert the inverted image,resulting in the image being upright +#define _IRR_RGB_FILE_INVERTED_IMAGE_ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_RGB_LOADER_ + +#include "IImageLoader.h" + +namespace irr +{ +namespace video +{ + +// byte-align structures +#include "irrpack.h" + + // the RGB image file header structure + + struct SRGBHeader + { + u16 Magic; // IRIS image file magic number + u8 Storage; // Storage format + u8 BPC; // Number of bytes per pixel channel + u16 Dimension; // Number of dimensions + u16 Xsize; // X size in pixels + u16 Ysize; // Y size in pixels + u16 Zsize; // Z size in pixels + u32 Pixmin; // Minimum pixel value + u32 Pixmax; // Maximum pixel value + u32 Dummy1; // ignored + char Imagename[80];// Image name + u32 Colormap; // Colormap ID +// char Dummy2[404];// Ignored + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + // this structure holds context specific data about the file being loaded. + + typedef struct _RGBdata + { + u8 *tmp, + *tmpR, + *tmpG, + *tmpB, + *tmpA; + + + u32 *StartTable; // compressed data table, holds file offsets + u32 *LengthTable; // length for the above data, hold lengths for above + u32 TableLen; // len of above tables + + SRGBHeader Header; // define the .rgb file header + u32 ImageSize; + u8 *rgbData; + + public: + _RGBdata() : tmp(0), tmpR(0), tmpG(0), tmpB(0), tmpA(0), + StartTable(0), LengthTable(0), TableLen(0), ImageSize(0), rgbData(0) + { + } + + ~_RGBdata() + { + delete [] tmp; + delete [] tmpR; + delete [] tmpG; + delete [] tmpB; + delete [] tmpA; + delete [] StartTable; + delete [] LengthTable; + delete [] rgbData; + } + + bool allocateTemps() + { + tmp = tmpR = tmpG = tmpB = tmpA = 0; + tmp = new u8 [Header.Xsize * 256 * Header.BPC]; + if (!tmp) + return false; + + if (Header.Zsize >= 1) + { + tmpR = new u8[Header.Xsize * Header.BPC]; + if (!tmpR) + return false; + } + if (Header.Zsize >= 2) + { + tmpG = new u8[Header.Xsize * Header.BPC]; + if (!tmpG) + return false; + } + if (Header.Zsize >= 3) + { + tmpB = new u8[Header.Xsize * Header.BPC]; + if (!tmpB) + return false; + } + if (Header.Zsize >= 4) + { + tmpA = new u8[Header.Xsize * Header.BPC]; + if (!tmpA) + return false; + } + return true; + } + } rgbStruct; + + +//! Surface Loader for Silicon Graphics RGB files +class CImageLoaderRGB : public IImageLoader +{ +public: + + //! constructor + CImageLoaderRGB(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + + bool readHeader(io::IReadFile* file, rgbStruct& rgb) const; + void readRGBrow(u8 *buf, int y, int z, io::IReadFile* file, rgbStruct& rgb) const; + void processFile(io::IReadFile *file, rgbStruct& rgb) const; + bool checkFormat(io::IReadFile *file, rgbStruct& rgb) const; + bool readOffsetTables(io::IReadFile* file, rgbStruct& rgb) const; + void converttoARGB(u32* in, const u32 size) const; +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_RGB_LOADER_ +#endif // __C_IMAGE_LOADER_RGB_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.cpp new file mode 100644 index 0000000..5f2549b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.cpp @@ -0,0 +1,239 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderTGA.h" + +#ifdef _IRR_COMPILE_WITH_TGA_LOADER_ + +#include "IReadFile.h" +#include "os.h" +#include "CColorConverter.h" +#include "CImage.h" +#include "irrString.h" + + +namespace irr +{ +namespace video +{ + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".tga") +bool CImageLoaderTGA::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "tga" ); +} + + +//! loads a compressed tga. +u8 *CImageLoaderTGA::loadCompressedImage(io::IReadFile *file, const STGAHeader& header) const +{ + // This was written and sent in by Jon Pry, thank you very much! + // I only changed the formatting a little bit. + + s32 bytesPerPixel = header.PixelDepth/8; + s32 imageSize = header.ImageHeight * header.ImageWidth * bytesPerPixel; + u8* data = new u8[imageSize]; + s32 currentByte = 0; + + while(currentByte < imageSize) + { + u8 chunkheader = 0; + file->read(&chunkheader, sizeof(u8)); // Read The Chunk's Header + + if(chunkheader < 128) // If The Chunk Is A 'RAW' Chunk + { + chunkheader++; // Add 1 To The Value To Get Total Number Of Raw Pixels + + file->read(&data[currentByte], bytesPerPixel * chunkheader); + currentByte += bytesPerPixel * chunkheader; + } + else + { + // thnx to neojzs for some fixes with this code + + // If It's An RLE Header + chunkheader -= 127; // Subtract 127 To Get Rid Of The ID Bit + + s32 dataOffset = currentByte; + file->read(&data[dataOffset], bytesPerPixel); + + currentByte += bytesPerPixel; + + for(s32 counter = 1; counter < chunkheader; counter++) + { + for(s32 elementCounter=0; elementCounter < bytesPerPixel; elementCounter++) + data[currentByte + elementCounter] = data[dataOffset + elementCounter]; + + currentByte += bytesPerPixel; + } + } + } + + return data; +} + + + +//! returns true if the file maybe is able to be loaded by this class +bool CImageLoaderTGA::isALoadableFileFormat(io::IReadFile* file) const +{ + if (!file) + return false; + + STGAFooter footer; + memset(&footer, 0, sizeof(STGAFooter)); + file->seek(file->getSize()-sizeof(STGAFooter)); + file->read(&footer, sizeof(STGAFooter)); + return (!strcmp(footer.Signature,"TRUEVISION-XFILE.")); // very old tgas are refused. +} + + + +//! creates a surface from the file +IImage* CImageLoaderTGA::loadImage(io::IReadFile* file) const +{ + STGAHeader header; + u32 *palette = 0; + + file->read(&header, sizeof(STGAHeader)); + +#ifdef __BIG_ENDIAN__ + header.ColorMapLength = os::Byteswap::byteswap(header.ColorMapLength); + header.ImageWidth = os::Byteswap::byteswap(header.ImageWidth); + header.ImageHeight = os::Byteswap::byteswap(header.ImageHeight); +#endif + + // skip image identification field + if (header.IdLength) + file->seek(header.IdLength, true); + + if (header.ColorMapType) + { + // create 32 bit palette + palette = new u32[ header.ColorMapLength]; + + // read color map + u8 * colorMap = new u8[header.ColorMapEntrySize/8 * header.ColorMapLength]; + file->read(colorMap,header.ColorMapEntrySize/8 * header.ColorMapLength); + + // convert to 32-bit palette + switch ( header.ColorMapEntrySize ) + { + case 16: + CColorConverter::convert_A1R5G5B5toA8R8G8B8(colorMap, header.ColorMapLength, palette); + break; + case 24: + CColorConverter::convert_B8G8R8toA8R8G8B8(colorMap, header.ColorMapLength, palette); + break; + case 32: + CColorConverter::convert_B8G8R8A8toA8R8G8B8(colorMap, header.ColorMapLength, palette); + break; + } + delete [] colorMap; + } + + // read image + + u8* data = 0; + + if ( header.ImageType == 1 || // Uncompressed, color-mapped images. + header.ImageType == 2 || // Uncompressed, RGB images + header.ImageType == 3 // Uncompressed, black and white images + ) + { + const s32 imageSize = header.ImageHeight * header.ImageWidth * header.PixelDepth/8; + data = new u8[imageSize]; + file->read(data, imageSize); + } + else + if(header.ImageType == 10) + { + // Runlength encoded RGB images + data = loadCompressedImage(file, header); + } + else + { + os::Printer::log("Unsupported TGA file type", file->getFileName(), ELL_ERROR); + delete [] palette; + return 0; + } + + IImage* image = 0; + + switch(header.PixelDepth) + { + case 8: + { + if (header.ImageType==3) // grey image + { + image = new CImage(ECF_R8G8B8, + core::dimension2d<u32>(header.ImageWidth, header.ImageHeight)); + if (image) + CColorConverter::convert8BitTo24Bit((u8*)data, + (u8*)image->lock(), + header.ImageWidth,header.ImageHeight, + 0, 0, (header.ImageDescriptor&0x20)==0); + } + else + { + image = new CImage(ECF_A1R5G5B5, + core::dimension2d<u32>(header.ImageWidth, header.ImageHeight)); + if (image) + CColorConverter::convert8BitTo16Bit((u8*)data, + (s16*)image->lock(), + header.ImageWidth,header.ImageHeight, + (s32*) palette, 0, + (header.ImageDescriptor&0x20)==0); + } + } + break; + case 16: + image = new CImage(ECF_A1R5G5B5, + core::dimension2d<u32>(header.ImageWidth, header.ImageHeight)); + if (image) + CColorConverter::convert16BitTo16Bit((s16*)data, + (s16*)image->lock(), header.ImageWidth, header.ImageHeight, 0, (header.ImageDescriptor&0x20)==0); + break; + case 24: + image = new CImage(ECF_R8G8B8, + core::dimension2d<u32>(header.ImageWidth, header.ImageHeight)); + if (image) + CColorConverter::convert24BitTo24Bit( + (u8*)data, (u8*)image->lock(), header.ImageWidth, header.ImageHeight, 0, (header.ImageDescriptor&0x20)==0, true); + break; + case 32: + image = new CImage(ECF_A8R8G8B8, + core::dimension2d<u32>(header.ImageWidth, header.ImageHeight)); + if (image) + CColorConverter::convert32BitTo32Bit((s32*)data, + (s32*)image->lock(), header.ImageWidth, header.ImageHeight, 0, (header.ImageDescriptor&0x20)==0); + break; + default: + os::Printer::log("Unsupported TGA format", file->getFileName(), ELL_ERROR); + break; + } + if (image) + image->unlock(); + + delete [] data; + delete [] palette; + + return image; +} + + +//! creates a loader which is able to load tgas +IImageLoader* createImageLoaderTGA() +{ + return new CImageLoaderTGA(); +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.h new file mode 100644 index 0000000..d744b6e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderTGA.h @@ -0,0 +1,82 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IMAGE_LOADER_TGA_H_INCLUDED__ +#define __C_IMAGE_LOADER_TGA_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#include "IImageLoader.h" + + +namespace irr +{ +namespace video +{ + +#if defined(_IRR_COMPILE_WITH_TGA_LOADER_) || defined(_IRR_COMPILE_WITH_TGA_WRITER_) + +// byte-align structures +#include "irrpack.h" + + // these structs are also used in the TGA writer + struct STGAHeader{ + u8 IdLength; + u8 ColorMapType; + u8 ImageType; + u8 FirstEntryIndex[2]; + u16 ColorMapLength; + u8 ColorMapEntrySize; + u8 XOrigin[2]; + u8 YOrigin[2]; + u16 ImageWidth; + u16 ImageHeight; + u8 PixelDepth; + u8 ImageDescriptor; + } PACK_STRUCT; + + struct STGAFooter + { + u32 ExtensionOffset; + u32 DeveloperOffset; + c8 Signature[18]; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +#endif // compiled with loader or reader + +#ifdef _IRR_COMPILE_WITH_TGA_LOADER_ + +/*! + Surface Loader for targa images +*/ +class CImageLoaderTGA : public IImageLoader +{ +public: + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tga") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! returns true if the file maybe is able to be loaded by this class + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! creates a surface from the file + virtual IImage* loadImage(io::IReadFile* file) const; + +private: + + //! loads a compressed tga. Was written and sent in by Jon Pry, thank you very much! + u8* loadCompressedImage(io::IReadFile *file, const STGAHeader& header) const; +}; + +#endif // compiled with loader + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.cpp new file mode 100644 index 0000000..f5d2f17 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.cpp @@ -0,0 +1,285 @@ +// Copyright (C) 2004 Murphy McCauley +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageLoaderWAL.h" + +#include "CColorConverter.h" +#include "CImage.h" +#include "os.h" +#include "dimension2d.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "IReadFile.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +#ifdef _IRR_COMPILE_WITH_LMP_LOADER_ + +// Palette quake2 colormap.h, 768 byte, last is transparent +static const u32 colormap_h[256] = { + 0xFF000000,0xFF0F0F0F,0xFF1F1F1F,0xFF2F2F2F,0xFF3F3F3F,0xFF4B4B4B,0xFF5B5B5B,0xFF6B6B6B, + 0xFF7B7B7B,0xFF8B8B8B,0xFF9B9B9B,0xFFABABAB,0xFFBBBBBB,0xFFCBCBCB,0xFFDBDBDB,0xFFEBEBEB, + 0xFF0F0B07,0xFF170F0B,0xFF1F170B,0xFF271B0F,0xFF2F2313,0xFF372B17,0xFF3F2F17,0xFF4B371B, + 0xFF533B1B,0xFF5B431F,0xFF634B1F,0xFF6B531F,0xFF73571F,0xFF7B5F23,0xFF836723,0xFF8F6F23, + 0xFF0B0B0F,0xFF13131B,0xFF1B1B27,0xFF272733,0xFF2F2F3F,0xFF37374B,0xFF3F3F57,0xFF474767, + 0xFF4F4F73,0xFF5B5B7F,0xFF63638B,0xFF6B6B97,0xFF7373A3,0xFF7B7BAF,0xFF8383BB,0xFF8B8BCB, + 0xFF000000,0xFF070700,0xFF0B0B00,0xFF131300,0xFF1B1B00,0xFF232300,0xFF2B2B07,0xFF2F2F07, + 0xFF373707,0xFF3F3F07,0xFF474707,0xFF4B4B0B,0xFF53530B,0xFF5B5B0B,0xFF63630B,0xFF6B6B0F, + 0xFF070000,0xFF0F0000,0xFF170000,0xFF1F0000,0xFF270000,0xFF2F0000,0xFF370000,0xFF3F0000, + 0xFF470000,0xFF4F0000,0xFF570000,0xFF5F0000,0xFF670000,0xFF6F0000,0xFF770000,0xFF7F0000, + 0xFF131300,0xFF1B1B00,0xFF232300,0xFF2F2B00,0xFF372F00,0xFF433700,0xFF4B3B07,0xFF574307, + 0xFF5F4707,0xFF6B4B0B,0xFF77530F,0xFF835713,0xFF8B5B13,0xFF975F1B,0xFFA3631F,0xFFAF6723, + 0xFF231307,0xFF2F170B,0xFF3B1F0F,0xFF4B2313,0xFF572B17,0xFF632F1F,0xFF733723,0xFF7F3B2B, + 0xFF8F4333,0xFF9F4F33,0xFFAF632F,0xFFBF772F,0xFFCF8F2B,0xFFDFAB27,0xFFEFCB1F,0xFFFFF31B, + 0xFF0B0700,0xFF1B1300,0xFF2B230F,0xFF372B13,0xFF47331B,0xFF533723,0xFF633F2B,0xFF6F4733, + 0xFF7F533F,0xFF8B5F47,0xFF9B6B53,0xFFA77B5F,0xFFB7876B,0xFFC3937B,0xFFD3A38B,0xFFE3B397, + 0xFFAB8BA3,0xFF9F7F97,0xFF937387,0xFF8B677B,0xFF7F5B6F,0xFF775363,0xFF6B4B57,0xFF5F3F4B, + 0xFF573743,0xFF4B2F37,0xFF43272F,0xFF371F23,0xFF2B171B,0xFF231313,0xFF170B0B,0xFF0F0707, + 0xFFBB739F,0xFFAF6B8F,0xFFA35F83,0xFF975777,0xFF8B4F6B,0xFF7F4B5F,0xFF734353,0xFF6B3B4B, + 0xFF5F333F,0xFF532B37,0xFF47232B,0xFF3B1F23,0xFF2F171B,0xFF231313,0xFF170B0B,0xFF0F0707, + 0xFFDBC3BB,0xFFCBB3A7,0xFFBFA39B,0xFFAF978B,0xFFA3877B,0xFF977B6F,0xFF876F5F,0xFF7B6353, + 0xFF6B5747,0xFF5F4B3B,0xFF533F33,0xFF433327,0xFF372B1F,0xFF271F17,0xFF1B130F,0xFF0F0B07, + 0xFF6F837B,0xFF677B6F,0xFF5F7367,0xFF576B5F,0xFF4F6357,0xFF475B4F,0xFF3F5347,0xFF374B3F, + 0xFF2F4337,0xFF2B3B2F,0xFF233327,0xFF1F2B1F,0xFF172317,0xFF0F1B13,0xFF0B130B,0xFF070B07, + 0xFFFFF31B,0xFFEFDF17,0xFFDBCB13,0xFFCBB70F,0xFFBBA70F,0xFFAB970B,0xFF9B8307,0xFF8B7307, + 0xFF7B6307,0xFF6B5300,0xFF5B4700,0xFF4B3700,0xFF3B2B00,0xFF2B1F00,0xFF1B0F00,0xFF0B0700, + 0xFF0000FF,0xFF0B0BEF,0xFF1313DF,0xFF1B1BCF,0xFF2323BF,0xFF2B2BAF,0xFF2F2F9F,0xFF2F2F8F, + 0xFF2F2F7F,0xFF2F2F6F,0xFF2F2F5F,0xFF2B2B4F,0xFF23233F,0xFF1B1B2F,0xFF13131F,0xFF0B0B0F, + 0xFF2B0000,0xFF3B0000,0xFF4B0700,0xFF5F0700,0xFF6F0F00,0xFF7F1707,0xFF931F07,0xFFA3270B, + 0xFFB7330F,0xFFC34B1B,0xFFCF632B,0xFFDB7F3B,0xFFE3974F,0xFFE7AB5F,0xFFEFBF77,0xFFF7D38B, + 0xFFA77B3B,0xFFB79B37,0xFFC7C337,0xFFE7E357,0xFF7FBFFF,0xFFABE7FF,0xFFD7FFFF,0xFF670000, + 0xFF8B0000,0xFFB30000,0xFFD70000,0xFFFF0000,0xFFFFF393,0xFFFFF7C7,0xFFFFFFFF,0x009F5B53 +}; + +bool CImageLoaderLMP::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "lmp" ); +} + + +bool CImageLoaderLMP::isALoadableFileFormat(irr::io::IReadFile* file) const +{ + return false; +} + +/*! + Quake1, Quake2, Hallife lmp texture +*/ +IImage* CImageLoaderLMP::loadImage(irr::io::IReadFile* file) const +{ + SLMPHeader header; + + file->seek(0); + file->read(&header, sizeof(header)); + + // maybe palette file + u32 rawtexsize = header.width * header.height; + if ( rawtexsize + sizeof ( header ) != (u32)file->getSize() ) + return 0; + + u8 *rawtex = new u8 [ rawtexsize ]; + + file->read(rawtex, rawtexsize); + + IImage* image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(header.width, header.height)); + + CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) colormap_h, 0, false); + image->unlock(); + + delete [] rawtex; + + return image; +} + + +IImageLoader* createImageLoaderLMP() +{ + return new irr::video::CImageLoaderLMP(); +} + +#endif + +#ifdef _IRR_COMPILE_WITH_WAL_LOADER_ + +// Palette quake2 demo pics/colormap.pcx, last is transparent +static const u32 colormap_pcx[256] = { + 0xFF000000,0xFF0F0F0F,0xFF1F1F1F,0xFF2F2F2F,0xFF3F3F3F,0xFF4B4B4B,0xFF5B5B5B,0xFF6B6B6B, + 0xFF7B7B7B,0xFF8B8B8B,0xFF9B9B9B,0xFFABABAB,0xFFBBBBBB,0xFFCBCBCB,0xFFDBDBDB,0xFFEBEBEB, + 0xFF634B23,0xFF5B431F,0xFF533F1F,0xFF4F3B1B,0xFF47371B,0xFF3F2F17,0xFF3B2B17,0xFF332713, + 0xFF2F2313,0xFF2B1F13,0xFF271B0F,0xFF23170F,0xFF1B130B,0xFF170F0B,0xFF130F07,0xFF0F0B07, + 0xFF5F5F6F,0xFF5B5B67,0xFF5B535F,0xFF574F5B,0xFF534B53,0xFF4F474B,0xFF473F43,0xFF3F3B3B, + 0xFF3B3737,0xFF332F2F,0xFF2F2B2B,0xFF272727,0xFF232323,0xFF1B1B1B,0xFF171717,0xFF131313, + 0xFF8F7753,0xFF7B6343,0xFF735B3B,0xFF674F2F,0xFFCF974B,0xFFA77B3B,0xFF8B672F,0xFF6F5327, + 0xFFEB9F27,0xFFCB8B23,0xFFAF771F,0xFF93631B,0xFF774F17,0xFF5B3B0F,0xFF3F270B,0xFF231707, + 0xFFA73B2B,0xFF9F2F23,0xFF972B1B,0xFF8B2713,0xFF7F1F0F,0xFF73170B,0xFF671707,0xFF571300, + 0xFF4B0F00,0xFF430F00,0xFF3B0F00,0xFF330B00,0xFF2B0B00,0xFF230B00,0xFF1B0700,0xFF130700, + 0xFF7B5F4B,0xFF735743,0xFF6B533F,0xFF674F3B,0xFF5F4737,0xFF574333,0xFF533F2F,0xFF4B372B, + 0xFF433327,0xFF3F2F23,0xFF37271B,0xFF2F2317,0xFF271B13,0xFF1F170F,0xFF170F0B,0xFF0F0B07, + 0xFF6F3B17,0xFF5F3717,0xFF532F17,0xFF432B17,0xFF372313,0xFF271B0F,0xFF1B130B,0xFF0F0B07, + 0xFFB35B4F,0xFFBF7B6F,0xFFCB9B93,0xFFD7BBB7,0xFFCBD7DF,0xFFB3C7D3,0xFF9FB7C3,0xFF87A7B7, + 0xFF7397A7,0xFF5B879B,0xFF47778B,0xFF2F677F,0xFF17536F,0xFF134B67,0xFF0F435B,0xFF0B3F53, + 0xFF07374B,0xFF072F3F,0xFF072733,0xFF001F2B,0xFF00171F,0xFF000F13,0xFF00070B,0xFF000000, + 0xFF8B5757,0xFF834F4F,0xFF7B4747,0xFF734343,0xFF6B3B3B,0xFF633333,0xFF5B2F2F,0xFF572B2B, + 0xFF4B2323,0xFF3F1F1F,0xFF331B1B,0xFF2B1313,0xFF1F0F0F,0xFF130B0B,0xFF0B0707,0xFF000000, + 0xFF979F7B,0xFF8F9773,0xFF878B6B,0xFF7F8363,0xFF777B5F,0xFF737357,0xFF6B6B4F,0xFF636347, + 0xFF5B5B43,0xFF4F4F3B,0xFF434333,0xFF37372B,0xFF2F2F23,0xFF23231B,0xFF171713,0xFF0F0F0B, + 0xFF9F4B3F,0xFF934337,0xFF8B3B2F,0xFF7F3727,0xFF772F23,0xFF6B2B1B,0xFF632317,0xFF571F13, + 0xFF4F1B0F,0xFF43170B,0xFF37130B,0xFF2B0F07,0xFF1F0B07,0xFF170700,0xFF0B0000,0xFF000000, + 0xFF777BCF,0xFF6F73C3,0xFF676BB7,0xFF6363A7,0xFF5B5B9B,0xFF53578F,0xFF4B4F7F,0xFF474773, + 0xFF3F3F67,0xFF373757,0xFF2F2F4B,0xFF27273F,0xFF231F2F,0xFF1B1723,0xFF130F17,0xFF0B0707, + 0xFF9BAB7B,0xFF8F9F6F,0xFF879763,0xFF7B8B57,0xFF73834B,0xFF677743,0xFF5F6F3B,0xFF576733, + 0xFF4B5B27,0xFF3F4F1B,0xFF374313,0xFF2F3B0B,0xFF232F07,0xFF1B2300,0xFF131700,0xFF0B0F00, + 0xFF00FF00,0xFF23E70F,0xFF3FD31B,0xFF53BB27,0xFF5FA72F,0xFF5F8F33,0xFF5F7B33,0xFFFFFFFF, + 0xFFFFFFD3,0xFFFFFFA7,0xFFFFFF7F,0xFFFFFF53,0xFFFFFF27,0xFFFFEB1F,0xFFFFD717,0xFFFFBF0F, + 0xFFFFAB07,0xFFFF9300,0xFFEF7F00,0xFFE36B00,0xFFD35700,0xFFC74700,0xFFB73B00,0xFFAB2B00, + 0xFF9B1F00,0xFF8F1700,0xFF7F0F00,0xFF730700,0xFF5F0000,0xFF470000,0xFF2F0000,0xFF1B0000, + 0xFFEF0000,0xFF3737FF,0xFFFF0000,0xFF0000FF,0xFF2B2B23,0xFF1B1B17,0xFF13130F,0xFFEB977F, + 0xFFC37353,0xFF9F5733,0xFF7B3F1B,0xFFEBD3C7,0xFFC7AB9B,0xFFA78B77,0xFF876B57,0x009F5B53 +}; + +/*! + Halflife +*/ +bool CImageLoaderWAL2::isALoadableFileExtension(const io::path& filename) const +{ + // embedded in Wad(WAD3 format). originally it has no extension + return core::hasFileExtension ( filename, "wal2" ); +} + + +bool CImageLoaderWAL2::isALoadableFileFormat(irr::io::IReadFile* file) const +{ + return false; +} + +/* + Halflite Texture WAD +*/ +IImage* CImageLoaderWAL2::loadImage(irr::io::IReadFile* file) const +{ + miptex_halflife header; + + file->seek(0); + file->read(&header, sizeof(header)); + +#ifdef __BIG_ENDIAN__ + header.width = os::Byteswap::byteswap(header.width); + header.height = os::Byteswap::byteswap(header.height); +#endif + + // palette + //u32 paletteofs = header.mipmap[0] + ((rawtexsize * 85) >> 6) + 2; + u32 *pal = new u32 [ 192 + 256 ]; + u8 *s = (u8*) pal; + + file->seek ( file->getSize() - 768 - 2 ); + file->read ( s, 768 ); + u32 i; + + for ( i = 0; i < 256; ++i, s+= 3 ) + { + pal [ 192 + i ] = 0xFF000000 | s[0] << 16 | s[1] << 8 | s[2]; + } + + ECOLOR_FORMAT format = ECF_R8G8B8; + + // transparency in filename;-) funny. rgb:0x0000FF is colorkey + if ( file->getFileName().findFirst ( '{' ) >= 0 ) + { + format = ECF_A8R8G8B8; + pal [ 192 + 255 ] &= 0x00FFFFFF; + } + + u32 rawtexsize = header.width * header.height; + + + u8 *rawtex = new u8 [ rawtexsize ]; + + file->seek ( header.mipmap[0] ); + file->read(rawtex, rawtexsize); + + IImage* image = new CImage(format, core::dimension2d<u32>(header.width, header.height)); + + switch ( format ) + { + case ECF_R8G8B8: + CColorConverter::convert8BitTo24Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) pal + 768, 0, false); + break; + case ECF_A8R8G8B8: + CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) pal + 768, 0, false); + break; + } + + image->unlock(); + + delete [] rawtex; + delete [] pal; + + return image; +} + +bool CImageLoaderWAL::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "wal" ); +} + + +bool CImageLoaderWAL::isALoadableFileFormat(irr::io::IReadFile* file) const +{ + return false; +} + + +/*! + quake2 +*/ +IImage* CImageLoaderWAL::loadImage(irr::io::IReadFile* file) const +{ + miptex_quake2 header; + + file->seek(0); + file->read(&header, sizeof(header)); + +#ifdef __BIG_ENDIAN__ + header.width = os::Byteswap::byteswap(header.width); + header.height = os::Byteswap::byteswap(header.height); +#endif + + u32 rawtexsize = header.width * header.height; + + u8 *rawtex = new u8 [ rawtexsize ]; + + file->seek ( header.mipmap[0] ); + file->read(rawtex, rawtexsize); + + IImage* image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(header.width, header.height)); + + CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->lock(), header.width, header.height, (u8*) colormap_pcx, 0, false); + image->unlock(); + + delete [] rawtex; + + return image; +} + +IImageLoader* createImageLoaderWAL() +{ + return new irr::video::CImageLoaderWAL(); +} + +IImageLoader* createImageLoaderHalfLife() +{ + return new irr::video::CImageLoaderWAL2(); +} + +#endif + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h new file mode 100644 index 0000000..871814a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h @@ -0,0 +1,100 @@ +// Copyright (C) 2004 Murphy McCauley +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +/* + Thanks to: + Max McGuire for his Flipcode article about WAL textures + Nikolaus Gebhardt for the Irrlicht 3D engine +*/ + +#ifndef __C_IMAGE_LOADER_WAL_H_INCLUDED__ +#define __C_IMAGE_LOADER_WAL_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#include "IImageLoader.h" + +namespace irr +{ +namespace video +{ + +#ifdef _IRR_COMPILE_WITH_LMP_LOADER_ + +// byte-align structures +#include "irrpack.h" + + struct SLMPHeader { + u32 width; // width + u32 height; // height + // variably sized + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +//! An Irrlicht image loader for Quake1,2 engine lmp textures/palette +class CImageLoaderLMP : public irr::video::IImageLoader +{ +public: + virtual bool isALoadableFileExtension(const io::path& filename) const; + virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const; + virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; +}; + +#endif + +#ifdef _IRR_COMPILE_WITH_WAL_LOADER_ + +//! An Irrlicht image loader for quake2 wal engine textures +class CImageLoaderWAL : public irr::video::IImageLoader +{ +public: + virtual bool isALoadableFileExtension(const io::path& filename) const; + virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const; + virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; +}; + +//! An Irrlicht image loader for Halflife 1 engine textures +class CImageLoaderWAL2 : public irr::video::IImageLoader +{ +public: + virtual bool isALoadableFileExtension(const io::path& filename) const; + virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const; + virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const; +}; + +// byte-align structures +#include "irrpack.h" + + // Halfelife wad3 type 67 file + struct miptex_halflife + { + c8 name[16]; + u32 width, height; + u32 mipmap[4]; // four mip maps stored + } PACK_STRUCT; + + //quake2 texture + struct miptex_quake2 + { + c8 name[32]; + u32 width; + u32 height; + u32 mipmap[4]; // four mip maps stored + c8 animname[32]; // next frame in animation chain + s32 flags; + s32 contents; + s32 value; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +#endif + +} +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.cpp new file mode 100644 index 0000000..8a91c3a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.cpp @@ -0,0 +1,140 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterBMP.h" + +#ifdef _IRR_COMPILE_WITH_BMP_WRITER_ + +#include "CImageLoaderBMP.h" +#include "IWriteFile.h" +#include "CColorConverter.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +IImageWriter* createImageWriterBMP() +{ + return new CImageWriterBMP; +} + +CImageWriterBMP::CImageWriterBMP() +{ +#ifdef _DEBUG + setDebugName("CImageWriterBMP"); +#endif +} + +bool CImageWriterBMP::isAWriteableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "bmp" ); +} + +bool CImageWriterBMP::writeImage(io::IWriteFile* file, IImage* image, u32 param) const +{ + // we always write 24-bit color because nothing really reads 32-bit + + SBMPHeader imageHeader; + imageHeader.Id = 0x4d42; + imageHeader.Reserved = 0; + imageHeader.BitmapDataOffset = sizeof(imageHeader); + imageHeader.BitmapHeaderSize = 0x28; + imageHeader.Width = image->getDimension().Width; + imageHeader.Height = image->getDimension().Height; + imageHeader.Planes = 1; + imageHeader.BPP = 24; + imageHeader.Compression = 0; + imageHeader.PixelPerMeterX = 0; + imageHeader.PixelPerMeterY = 0; + imageHeader.Colors = 0; + imageHeader.ImportantColors = 0; + + // data size is rounded up to next larger 4 bytes boundary + imageHeader.BitmapDataSize = imageHeader.Width * imageHeader.BPP / 8; + imageHeader.BitmapDataSize = (imageHeader.BitmapDataSize + 3) & ~3; + imageHeader.BitmapDataSize *= imageHeader.Height; + + // file size is data size plus offset to data + imageHeader.FileSize = imageHeader.BitmapDataOffset + imageHeader.BitmapDataSize; + + // bitmaps are stored upside down and padded so we always do this + void (*CColorConverter_convertFORMATtoFORMAT)(const void*, s32, void*) = 0; + switch(image->getColorFormat()) + { + case ECF_R8G8B8: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_R8G8B8toR8G8B8; + break; + case ECF_A8R8G8B8: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_A8R8G8B8toB8G8R8; + break; + case ECF_A1R5G5B5: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_A1R5G5B5toR8G8B8; + break; + case ECF_R5G6B5: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_R5G6B5toR8G8B8; + break; +#ifndef _DEBUG + default: + break; +#endif + } + + // couldn't find a color converter + if (!CColorConverter_convertFORMATtoFORMAT) + return false; + + // write the bitmap header + if (file->write(&imageHeader, sizeof(imageHeader)) != sizeof(imageHeader)) + return false; + + u8* scan_lines = (u8*)image->lock(); + if (!scan_lines) + return false; + + // size of one pixel in bytes + u32 pixel_size = image->getBytesPerPixel(); + + // length of one row of the source image in bytes + u32 row_stride = (pixel_size * imageHeader.Width); + + // length of one row in bytes, rounded up to nearest 4-byte boundary + s32 row_size = ((3 * imageHeader.Width) + 3) & ~3; + + // allocate and clear memory for our scan line + u8* row_pointer = new u8[row_size]; + memset(row_pointer, 0, row_size); + + // convert the image to 24-bit BGR and flip it over + s32 y; + for (y = imageHeader.Height - 1; 0 <= y; --y) + { + if (image->getColorFormat()==ECF_R8G8B8) + CColorConverter::convert24BitTo24Bit(&scan_lines[y * row_stride], row_pointer, imageHeader.Width, 1, 0, false, true); + else + // source, length [pixels], destination + CColorConverter_convertFORMATtoFORMAT(&scan_lines[y * row_stride], imageHeader.Width, row_pointer); + if (file->write(row_pointer, row_size) < row_size) + break; + } + + // clean up our scratch area + delete [] row_pointer; + + // give back image handle + image->unlock(); + + return y < 0; +} + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.h new file mode 100644 index 0000000..c66a6b4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterBMP.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_BMP_H_INCLUDED__ +#define _C_IMAGE_WRITER_BMP_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_BMP_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterBMP : public IImageWriter +{ +public: + //! constructor + CImageWriterBMP(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param) const; +}; + +} // namespace video +} // namespace irr + +#endif +#endif // _C_IMAGE_WRITER_BMP_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.cpp new file mode 100644 index 0000000..944db6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.cpp @@ -0,0 +1,229 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterJPG.h" + +#ifdef _IRR_COMPILE_WITH_JPG_WRITER_ + +#include "CColorConverter.h" +#include "IWriteFile.h" +#include "CImage.h" +#include "irrString.h" + +#ifdef _IRR_COMPILE_WITH_LIBJPEG_ +#include <stdio.h> // required for jpeglib.h +extern "C" +{ +#ifndef _IRR_USE_NON_SYSTEM_JPEG_LIB_ + #include <jpeglib.h> + #include <jerror.h> +#else + #include "jpeglib/jpeglib.h" + #include "jpeglib/jerror.h" +#endif +} + + +namespace irr +{ +namespace video +{ + +// The writer uses a 4k buffer and flushes to disk each time it's filled +#define OUTPUT_BUF_SIZE 4096 +typedef struct +{ + struct jpeg_destination_mgr pub;/* public fields */ + + io::IWriteFile* file; /* target file */ + JOCTET buffer[OUTPUT_BUF_SIZE]; /* image buffer */ +} mem_destination_mgr; + + +typedef mem_destination_mgr * mem_dest_ptr; + + +// init +static void jpeg_init_destination(j_compress_ptr cinfo) +{ + mem_dest_ptr dest = (mem_dest_ptr) cinfo->dest; + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; +} + + +// flush to disk and reset buffer +static boolean jpeg_empty_output_buffer(j_compress_ptr cinfo) +{ + mem_dest_ptr dest = (mem_dest_ptr) cinfo->dest; + + // for now just exit upon file error + if (dest->file->write(dest->buffer, OUTPUT_BUF_SIZE) != OUTPUT_BUF_SIZE) + ERREXIT (cinfo, JERR_FILE_WRITE); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + + return TRUE; +} + + +static void jpeg_term_destination(j_compress_ptr cinfo) +{ + mem_dest_ptr dest = (mem_dest_ptr) cinfo->dest; + const s32 datacount = (s32)(OUTPUT_BUF_SIZE - dest->pub.free_in_buffer); + // for now just exit upon file error + if (dest->file->write(dest->buffer, datacount) != datacount) + ERREXIT (cinfo, JERR_FILE_WRITE); +} + + +// set up buffer data +static void jpeg_file_dest(j_compress_ptr cinfo, io::IWriteFile* file) +{ + if (cinfo->dest == NULL) + { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_PERMANENT, + sizeof(mem_destination_mgr)); + } + + mem_dest_ptr dest = (mem_dest_ptr) cinfo->dest; /* for casting */ + + /* Initialize method pointers */ + dest->pub.init_destination = jpeg_init_destination; + dest->pub.empty_output_buffer = jpeg_empty_output_buffer; + dest->pub.term_destination = jpeg_term_destination; + + /* Initialize private member */ + dest->file = file; +} + + +/* write_JPEG_memory: store JPEG compressed image into memory. +*/ +static bool writeJPEGFile(io::IWriteFile* file, IImage* image, u32 quality) +{ + void (*format)(const void*, s32, void*) = 0; + switch( image->getColorFormat () ) + { + case ECF_R8G8B8: + format = CColorConverter::convert_R8G8B8toR8G8B8; + break; + case ECF_A8R8G8B8: + format = CColorConverter::convert_A8R8G8B8toR8G8B8; + break; + case ECF_A1R5G5B5: + format = CColorConverter::convert_A1R5G5B5toB8G8R8; + break; + case ECF_R5G6B5: + format = CColorConverter::convert_R5G6B5toR8G8B8; + break; +#ifndef _DEBUG + default: + break; +#endif + } + + // couldn't find a color converter + if ( 0 == format ) + return false; + + const core::dimension2du dim = image->getDimension(); + + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + cinfo.err = jpeg_std_error(&jerr); + + jpeg_create_compress(&cinfo); + jpeg_file_dest(&cinfo, file); + cinfo.image_width = dim.Width; + cinfo.image_height = dim.Height; + cinfo.input_components = 3; + cinfo.in_color_space = JCS_RGB; + + jpeg_set_defaults(&cinfo); + + if ( 0 == quality ) + quality = 75; + + jpeg_set_quality(&cinfo, quality, TRUE); + jpeg_start_compress(&cinfo, TRUE); + + u8 * dest = new u8[dim.Width*3]; + + if (dest) + { + const u32 pitch = image->getPitch(); + JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ + row_pointer[0] = dest; + + u8* src = (u8*)image->lock(); + + while (cinfo.next_scanline < cinfo.image_height) + { + // convert next line + format( src, dim.Width, dest ); + src += pitch; + jpeg_write_scanlines(&cinfo, row_pointer, 1); + } + image->unlock(); + + delete [] dest; + + /* Step 6: Finish compression */ + jpeg_finish_compress(&cinfo); + } + + /* Step 7: Destroy */ + jpeg_destroy_compress(&cinfo); + + return (dest != 0); +} + + +} // namespace video +} // namespace irr + +#endif // _IRR_COMPILE_WITH_LIBJPEG_ + +namespace irr +{ +namespace video +{ + +IImageWriter* createImageWriterJPG() +{ + return new CImageWriterJPG; +} + +CImageWriterJPG::CImageWriterJPG() +{ +#ifdef _DEBUG + setDebugName("CImageWriterJPG"); +#endif +} + + +bool CImageWriterJPG::isAWriteableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "jpg", "jpeg" ); +} + + +bool CImageWriterJPG::writeImage(io::IWriteFile *file, IImage *image, u32 quality) const +{ +#ifndef _IRR_COMPILE_WITH_LIBJPEG_ + return false; +#else + return writeJPEGFile(file, image, quality); +#endif +} + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.h new file mode 100644 index 0000000..7abe68d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterJPG.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_JPG_H_INCLUDED__ +#define _C_IMAGE_WRITER_JPG_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_JPG_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterJPG : public IImageWriter +{ +public: + //! constructor + CImageWriterJPG(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param) const; +}; + +} +} + +#endif // _C_IMAGE_WRITER_JPG_H_INCLUDED__ +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.cpp new file mode 100644 index 0000000..5ace342 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.cpp @@ -0,0 +1,162 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterPCX.h" + +#ifdef _IRR_COMPILE_WITH_PCX_WRITER_ + +#include "CImageLoaderPCX.h" +#include "IWriteFile.h" +#include "os.h" // for logging +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +IImageWriter* createImageWriterPCX() +{ + return new CImageWriterPCX; +} + +CImageWriterPCX::CImageWriterPCX() +{ +#ifdef _DEBUG + setDebugName("CImageWriterPCX"); +#endif +} + +bool CImageWriterPCX::isAWriteableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "pcx" ); +} + +bool CImageWriterPCX::writeImage(io::IWriteFile *file, IImage *image,u32 param) const +{ + if (!file || !image) + return false; + + u8 d1; + u16 d2; + u32 i; + + d1 = 10; // Manufacturer + file->write(&d1, 1); + d1 = 5; // Version + file->write(&d1, 1); + d1 = 1; // Encoding + file->write(&d1, 1); + d1 = 8; // Bits per Pixel + file->write(&d1, 1); + d2 = 0; // pixel origin + file->write(&d2, 2); + file->write(&d2, 2); + d2 = image->getDimension().Width-1; // width +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + d2 = image->getDimension().Height-1; // height +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + d2 = 300; // dpi +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + file->write(&d2, 2); + d2 = 0; // palette (not used) + for (i=0; i<24; ++i) + { + file->write(&d2, 2); + } + d1 = 0; // reserved + file->write(&d1, 1); + d1 = 3; // planes + file->write(&d1, 1); + d2 = image->getDimension().Width; // pitch + if (d2&0x0001) // must be even + ++d2; +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + d2 = 1; // color mode +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + d2 = 800; // screen width +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + d2 = 600; // screen height +#ifdef __BIG_ENDIAN__ + d2 = os::Byteswap::byteswap(d2); +#endif + file->write(&d2, 2); + d2 = 0; // filler (not used) + for (i=0; i<27; ++i) + { + file->write(&d2, 2); + } + + u8 cnt, value; + for (i=0; i<image->getDimension().Height; ++i) + { + cnt = 0; + value = 0; + for (u32 j=0; j<3; ++j) // color planes + { + for (u32 k=0; k<image->getDimension().Width; ++k) + { + const SColor pix = image->getPixel(k,i); + if ((cnt!=0) && (cnt<63) && + (((j==0) && (value==pix.getRed())) || + ((j==1) && (value==pix.getGreen())) || + ((j==2) && (value==pix.getBlue())))) + { + ++cnt; + } + else + { + if (cnt!=0) + { + if ((cnt>1) || ((value&0xc0)==0xc0)) + { + cnt |= 0xc0; + file->write(&cnt, 1); + } + file->write(&value, 1); + } + cnt=1; + if (j==0) + value=(u8)pix.getRed(); + else if (j==1) + value=(u8)pix.getGreen(); + else if (j==2) + value=(u8)pix.getBlue(); + } + } + } + if ((cnt>1) || ((value&0xc0)==0xc0)) + { + cnt |= 0xc0; + file->write(&cnt, 1); + } + file->write(&value, 1); + } + + return true; +} + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.h new file mode 100644 index 0000000..a0c6d6d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPCX.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_PCX_H_INCLUDED__ +#define _C_IMAGE_WRITER_PCX_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PCX_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterPCX : public IImageWriter +{ +public: + //! constructor + CImageWriterPCX(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param) const; +}; + +} // namespace video +} // namespace irr + +#endif +#endif // _C_IMAGE_WRITER_PCX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.cpp new file mode 100644 index 0000000..6c6386e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.cpp @@ -0,0 +1,222 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterPNG.h" + +#ifdef _IRR_COMPILE_WITH_PNG_WRITER_ + +#include "CImageLoaderPNG.h" +#include "CColorConverter.h" +#include "IWriteFile.h" +#include "irrString.h" +#include "os.h" // for logging + +#ifdef _IRR_COMPILE_WITH_LIBPNG_ +#ifndef _IRR_USE_NON_SYSTEM_LIB_PNG_ + #include <png.h> // use system lib png +#else // _IRR_USE_NON_SYSTEM_LIB_PNG_ + #include "libpng/png.h" // use irrlicht included lib png +#endif // _IRR_USE_NON_SYSTEM_LIB_PNG_ +#endif // _IRR_COMPILE_WITH_LIBPNG_ + +namespace irr +{ +namespace video +{ + +IImageWriter* createImageWriterPNG() +{ + return new CImageWriterPNG; +} + +#ifdef _IRR_COMPILE_WITH_LIBPNG_ +// PNG function for error handling +static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg) +{ + os::Printer::log("PNG fatal error", msg, ELL_ERROR); + longjmp(png_jmpbuf(png_ptr), 1); +} + +// PNG function for warning handling +static void png_cpexcept_warning(png_structp png_ptr, png_const_charp msg) +{ + os::Printer::log("PNG warning", msg, ELL_WARNING); +} + +// PNG function for file writing +void PNGAPI user_write_data_fcn(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + io::IWriteFile* file=(io::IWriteFile*)png_get_io_ptr(png_ptr); + check=(png_size_t) file->write((const void*)data,(u32)length); + + if (check != length) + png_error(png_ptr, "Write Error"); +} +#endif // _IRR_COMPILE_WITH_LIBPNG_ + +CImageWriterPNG::CImageWriterPNG() +{ +#ifdef _DEBUG + setDebugName("CImageWriterPNG"); +#endif +} + +bool CImageWriterPNG::isAWriteableFileExtension(const io::path& filename) const +{ +#ifdef _IRR_COMPILE_WITH_LIBPNG_ + return core::hasFileExtension ( filename, "png" ); +#else + return false; +#endif +} + +bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param) const +{ +#ifdef _IRR_COMPILE_WITH_LIBPNG_ + if (!file || !image) + return false; + + // Allocate the png write struct + png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, + NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warning); + if (!png_ptr) + { + os::Printer::log("PNGWriter: Internal PNG create write struct failure\n", file->getFileName(), ELL_ERROR); + return false; + } + + // Allocate the png info struct + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + os::Printer::log("PNGWriter: Internal PNG create info struct failure\n", file->getFileName(), ELL_ERROR); + png_destroy_write_struct(&png_ptr, NULL); + return false; + } + + // for proper error handling + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + return false; + } + + png_set_write_fn(png_ptr, file, user_write_data_fcn, NULL); + + // Set info + switch(image->getColorFormat()) + { + case ECF_A8R8G8B8: + case ECF_A1R5G5B5: + png_set_IHDR(png_ptr, info_ptr, + image->getDimension().Width, image->getDimension().Height, + 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + break; + default: + png_set_IHDR(png_ptr, info_ptr, + image->getDimension().Width, image->getDimension().Height, + 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + } + + s32 lineWidth = image->getDimension().Width; + switch(image->getColorFormat()) + { + case ECF_R8G8B8: + case ECF_R5G6B5: + lineWidth*=3; + break; + case ECF_A8R8G8B8: + case ECF_A1R5G5B5: + lineWidth*=4; + break; + // TODO: Error handling in case of unsupported color format + default: + break; + } + u8* tmpImage = new u8[image->getDimension().Height*lineWidth]; + if (!tmpImage) + { + os::Printer::log("PNGWriter: Internal PNG create image failure\n", file->getFileName(), ELL_ERROR); + png_destroy_write_struct(&png_ptr, &info_ptr); + return false; + } + + u8* data = (u8*)image->lock(); + switch(image->getColorFormat()) + { + case ECF_R8G8B8: + CColorConverter::convert_R8G8B8toR8G8B8(data,image->getDimension().Height*image->getDimension().Width,tmpImage); + break; + case ECF_A8R8G8B8: + CColorConverter::convert_A8R8G8B8toA8R8G8B8(data,image->getDimension().Height*image->getDimension().Width,tmpImage); + break; + case ECF_R5G6B5: + CColorConverter::convert_R5G6B5toR8G8B8(data,image->getDimension().Height*image->getDimension().Width,tmpImage); + break; + case ECF_A1R5G5B5: + CColorConverter::convert_A1R5G5B5toA8R8G8B8(data,image->getDimension().Height*image->getDimension().Width,tmpImage); + break; +#ifndef _DEBUG + // TODO: Error handling in case of unsupported color format + default: + break; +#endif + } + image->unlock(); + + // Create array of pointers to rows in image data + + //Used to point to image rows + u8** RowPointers = new png_bytep[image->getDimension().Height]; + if (!RowPointers) + { + os::Printer::log("PNGWriter: Internal PNG create row pointers failure\n", file->getFileName(), ELL_ERROR); + png_destroy_write_struct(&png_ptr, &info_ptr); + delete [] tmpImage; + return false; + } + + data=tmpImage; + // Fill array of pointers to rows in image data + for (u32 i=0; i<image->getDimension().Height; ++i) + { + RowPointers[i]=data; + data += lineWidth; + } + // for proper error handling + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + delete [] RowPointers; + delete [] tmpImage; + return false; + } + + png_set_rows(png_ptr, info_ptr, RowPointers); + + if (image->getColorFormat()==ECF_A8R8G8B8 || image->getColorFormat()==ECF_A1R5G5B5) + png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_BGR, NULL); + else + { + png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL); + } + + delete [] RowPointers; + delete [] tmpImage; + png_destroy_write_struct(&png_ptr, &info_ptr); + return true; +#else + return false; +#endif +} + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.h new file mode 100644 index 0000000..67facc2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPNG.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_PNG_H_INCLUDED__ +#define _C_IMAGE_WRITER_PNG_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PNG_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterPNG : public IImageWriter +{ +public: + //! constructor + CImageWriterPNG(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param) const; +}; + +} // namespace video +} // namespace irr + +#endif // _C_IMAGE_WRITER_PNG_H_INCLUDED__ +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.cpp new file mode 100644 index 0000000..3bc1737 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.cpp @@ -0,0 +1,105 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterPPM.h" + +#ifdef _IRR_COMPILE_WITH_PPM_WRITER_ + +#include "IWriteFile.h" +#include "IImage.h" +#include "dimension2d.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + + +IImageWriter* createImageWriterPPM() +{ + return new CImageWriterPPM; +} + + +CImageWriterPPM::CImageWriterPPM() +{ +#ifdef _DEBUG + setDebugName("CImageWriterPPM"); +#endif +} + + +bool CImageWriterPPM::isAWriteableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "ppm" ); +} + + +bool CImageWriterPPM::writeImage(io::IWriteFile *file, IImage *image, u32 param) const +{ + char cache[70]; + int size; + + const core::dimension2d<u32>& imageSize = image->getDimension(); + + const bool binary = false; + + if (binary) + size = snprintf(cache, 70, "P6\n"); + else + size = snprintf(cache, 70, "P3\n"); + + if (file->write(cache, size) != size) + return false; + + size = snprintf(cache, 70, "%d %d\n", imageSize.Width, imageSize.Height); + if (file->write(cache, size) != size) + return false; + + size = snprintf(cache, 70, "255\n"); + if (file->write(cache, size) != size) + return false; + + if (binary) + { + for (u32 h = 0; h < imageSize.Height; ++h) + { + for (u32 c = 0; c < imageSize.Width; ++c) + { + const video::SColor& pixel = image->getPixel(c, h); + const u8 r = (u8)(pixel.getRed() & 0xff); + const u8 g = (u8)(pixel.getGreen() & 0xff); + const u8 b = (u8)(pixel.getBlue() & 0xff); + file->write(&r, 1); + file->write(&g, 1); + file->write(&b, 1); + } + } + } + else + { + s32 n = 0; + + for (u32 h = 0; h < imageSize.Height; ++h) + { + for (u32 c = 0; c < imageSize.Width; ++c, ++n) + { + const video::SColor& pixel = image->getPixel(c, h); + size = snprintf(cache, 70, "%.3u %.3u %.3u%s", pixel.getRed(), pixel.getGreen(), pixel.getBlue(), n % 5 == 4 ? "\n" : " "); + if (file->write(cache, size) != size) + return false; + } + } + } + + return true; +} + + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.h new file mode 100644 index 0000000..853674f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPPM.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_PPM_H_INCLUDED__ +#define _C_IMAGE_WRITER_PPM_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PPM_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterPPM : public IImageWriter +{ +public: + //! constructor + CImageWriterPPM(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param) const; +}; + +} // namespace video +} // namespace irr + +#endif // _C_IMAGE_WRITER_PPM_H_INCLUDED__ +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.cpp new file mode 100644 index 0000000..952eb0b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.cpp @@ -0,0 +1,46 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterPSD.h" + +#ifdef _IRR_COMPILE_WITH_PSD_WRITER_ + +#include "CImageLoaderPSD.h" +#include "IWriteFile.h" +#include "os.h" // for logging +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +IImageWriter* createImageWriterPSD() +{ + return new CImageWriterPSD; +} + +CImageWriterPSD::CImageWriterPSD() +{ +#ifdef _DEBUG + setDebugName("CImageWriterPSD"); +#endif +} + +bool CImageWriterPSD::isAWriteableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "psd" ); +} + +bool CImageWriterPSD::writeImage(io::IWriteFile *file, IImage *image,u32 param) const +{ + os::Printer::log("PSD writer not yet implemented. Image not written.", ELL_WARNING); + return false; +} + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.h new file mode 100644 index 0000000..6f1494e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterPSD.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_PSD_H_INCLUDED__ +#define _C_IMAGE_WRITER_PSD_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PSD_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterPSD : public IImageWriter +{ +public: + //! constructor + CImageWriterPSD(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image,u32 param) const; +}; + +} // namespace video +} // namespace irr + +#endif // _I_IMAGE_WRITER_PSD_H_INCLUDED__ +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.cpp new file mode 100644 index 0000000..4a87eeb --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.cpp @@ -0,0 +1,147 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CImageWriterTGA.h" + +#ifdef _IRR_COMPILE_WITH_TGA_WRITER_ + +#include "CImageLoaderTGA.h" +#include "IWriteFile.h" +#include "CColorConverter.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +IImageWriter* createImageWriterTGA() +{ + return new CImageWriterTGA; +} + +CImageWriterTGA::CImageWriterTGA() +{ +#ifdef _DEBUG + setDebugName("CImageWriterTGA"); +#endif +} + +bool CImageWriterTGA::isAWriteableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "tga" ); +} + +bool CImageWriterTGA::writeImage(io::IWriteFile *file, IImage *image,u32 param) const +{ + STGAHeader imageHeader; + imageHeader.IdLength = 0; + imageHeader.ColorMapType = 0; + imageHeader.ImageType = 2; + imageHeader.FirstEntryIndex[0] = 0; + imageHeader.FirstEntryIndex[1] = 0; + imageHeader.ColorMapLength = 0; + imageHeader.ColorMapEntrySize = 0; + imageHeader.XOrigin[0] = 0; + imageHeader.XOrigin[1] = 0; + imageHeader.YOrigin[0] = 0; + imageHeader.YOrigin[1] = 0; + imageHeader.ImageWidth = image->getDimension().Width; + imageHeader.ImageHeight = image->getDimension().Height; + + // top left of image is the top. the image loader needs to + // be fixed to only swap/flip + imageHeader.ImageDescriptor = (1 << 5); + + // chances are good we'll need to swizzle data, so i'm going + // to convert and write one scan line at a time. it's also + // a bit cleaner this way + void (*CColorConverter_convertFORMATtoFORMAT)(const void*, s32, void*) = 0; + switch(image->getColorFormat()) + { + case ECF_A8R8G8B8: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_A8R8G8B8toA8R8G8B8; + imageHeader.PixelDepth = 32; + imageHeader.ImageDescriptor |= 8; + break; + case ECF_A1R5G5B5: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_A1R5G5B5toA1R5G5B5; + imageHeader.PixelDepth = 16; + imageHeader.ImageDescriptor |= 1; + break; + case ECF_R5G6B5: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_R5G6B5toA1R5G5B5; + imageHeader.PixelDepth = 16; + imageHeader.ImageDescriptor |= 1; + break; + case ECF_R8G8B8: + CColorConverter_convertFORMATtoFORMAT + = CColorConverter::convert_R8G8B8toR8G8B8; + imageHeader.PixelDepth = 24; + imageHeader.ImageDescriptor |= 0; + break; +#ifndef _DEBUG + default: + break; +#endif + } + + // couldn't find a color converter + if (!CColorConverter_convertFORMATtoFORMAT) + return false; + + if (file->write(&imageHeader, sizeof(imageHeader)) != sizeof(imageHeader)) + return false; + + u8* scan_lines = (u8*)image->lock(); + if (!scan_lines) + return false; + + // size of one pixel in bytes + u32 pixel_size = image->getBytesPerPixel(); + + // length of one row of the source image in bytes + u32 row_stride = (pixel_size * imageHeader.ImageWidth); + + // length of one output row in bytes + s32 row_size = ((imageHeader.PixelDepth / 8) * imageHeader.ImageWidth); + + // allocate a row do translate data into + u8* row_pointer = new u8[row_size]; + + u32 y; + for (y = 0; y < imageHeader.ImageHeight; ++y) + { + // source, length [pixels], destination + if (image->getColorFormat()==ECF_R8G8B8) + CColorConverter::convert24BitTo24Bit(&scan_lines[y * row_stride], row_pointer, imageHeader.ImageWidth, 1, 0, 0, true); + else + CColorConverter_convertFORMATtoFORMAT(&scan_lines[y * row_stride], imageHeader.ImageWidth, row_pointer); + if (file->write(row_pointer, row_size) != row_size) + break; + } + + delete [] row_pointer; + + image->unlock(); + + STGAFooter imageFooter; + imageFooter.ExtensionOffset = 0; + imageFooter.DeveloperOffset = 0; + strncpy(imageFooter.Signature, "TRUEVISION-XFILE.", 18); + + if (file->write(&imageFooter, sizeof(imageFooter)) < (s32)sizeof(imageFooter)) + return false; + + return imageHeader.ImageHeight <= y; +} + +} // namespace video +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.h new file mode 100644 index 0000000..ee8e4cb --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageWriterTGA.h @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_IMAGE_WRITER_TGA_H_INCLUDED__ +#define _C_IMAGE_WRITER_TGA_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_TGA_WRITER_ + +#include "IImageWriter.h" + +namespace irr +{ +namespace video +{ + +class CImageWriterTGA : public IImageWriter +{ +public: + //! constructor + CImageWriterTGA(); + + //! return true if this writer can write a file with the given extension + virtual bool isAWriteableFileExtension(const io::path& filename) const; + + //! write image to file + virtual bool writeImage(io::IWriteFile *file, IImage *image,u32 param) const; +}; + +} // namespace video +} // namespace irr + +#endif // _C_IMAGE_WRITER_TGA_H_INCLUDED__ +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.cpp new file mode 100644 index 0000000..53892ee --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.cpp @@ -0,0 +1,477 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CIrrDeviceConsole.h" + +#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ + +#include "os.h" +#include "IGUISkin.h" +#include "IGUIEnvironment.h" + +// to close the device on terminate signal +irr::CIrrDeviceConsole *DeviceToClose; + +#ifdef _IRR_WINDOWS_NT_CONSOLE_ +// Callback for Windows +BOOL WINAPI ConsoleHandler(DWORD CEvent) +{ + switch(CEvent) + { + case CTRL_C_EVENT: + irr::os::Printer::log("Closing console device", "CTRL+C"); + break; + case CTRL_BREAK_EVENT: + irr::os::Printer::log("Closing console device", "CTRL+Break"); + break; + case CTRL_CLOSE_EVENT: + irr::os::Printer::log("Closing console device", "User closed console"); + break; + case CTRL_LOGOFF_EVENT: + irr::os::Printer::log("Closing console device", "User is logging off"); + break; + case CTRL_SHUTDOWN_EVENT: + irr::os::Printer::log("Closing console device", "Computer shutting down"); + break; + } + DeviceToClose->closeDevice(); + return TRUE; +} +#elif defined(_IRR_POSIX_API_) +// sigterm handler +#include <signal.h> + +void sighandler(int sig) +{ + irr::core::stringc code = "Signal "; + code += sig; + code += " received"; + irr::os::Printer::log("Closing console device", code.c_str()); + + DeviceToClose->closeDevice(); +} +#endif + +namespace irr +{ + +const c8 ASCIIArtChars[] = " .,'~:;!+>=icopjtJY56SB8XDQKHNWM"; //MWNHKQDX8BS65YJtjpoci=+>!;:~',. "; +const u16 ASCIIArtCharsCount = 32; + +//const c8 ASCIIArtChars[] = " \xb0\xb1\xf9\xb2\xdb"; +//const u16 ASCIIArtCharsCount = 5; + +//! constructor +CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params) + : CIrrDeviceStub(params), IsWindowFocused(true), ConsoleFont(0), OutFile(stdout) +{ + DeviceToClose = this; + +#ifdef _IRR_WINDOWS_NT_CONSOLE_ + MouseButtonStates = 0; + + WindowsSTDIn = GetStdHandle(STD_INPUT_HANDLE); + WindowsSTDOut = GetStdHandle(STD_OUTPUT_HANDLE); + PCOORD Dimensions = 0; + + if (CreationParams.Fullscreen) + { +// Some mingw versions lack this define, so avoid it in case it does not exist +#if (_WIN32_WINNT >= 0x0501) && defined(CONSOLE_FULLSCREEN_MODE) + if (SetConsoleDisplayMode(WindowsSTDOut, CONSOLE_FULLSCREEN_MODE, Dimensions)) + { + CreationParams.WindowSize.Width = Dimensions->X; + CreationParams.WindowSize.Width = Dimensions->Y; + } +#endif + } + else + { + COORD ConsoleSize; + ConsoleSize.X = CreationParams.WindowSize.Width; + ConsoleSize.X = CreationParams.WindowSize.Height; + SetConsoleScreenBufferSize(WindowsSTDOut, ConsoleSize); + } + + // catch windows close/break signals + SetConsoleCtrlHandler((PHANDLER_ROUTINE)ConsoleHandler, TRUE); + +#elif defined(_IRR_POSIX_API_) + // catch other signals + signal(SIGABRT, &sighandler); + signal(SIGTERM, &sighandler); + signal(SIGINT, &sighandler); + + // set output stream + if (params.WindowId) + OutFile = (FILE*)(params.WindowId); +#endif + +#ifdef _IRR_VT100_CONSOLE_ + // reset terminal + fprintf(OutFile, "%cc", 27); + // disable line wrapping + fprintf(OutFile, "%c[7l", 27); +#endif + + switch (params.DriverType) + { + case video::EDT_SOFTWARE: + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + #else + os::Printer::log("Software driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_DIRECT3D8: + case video::EDT_DIRECT3D9: + case video::EDT_OPENGL: + os::Printer::log("The console device cannot use hardware drivers yet.", ELL_ERROR); + break; + case video::EDT_NULL: + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + default: + break; + } + + // set up output buffer + for (u32 y=0; y<CreationParams.WindowSize.Height; ++y) + { + core::stringc str; + str.reserve(CreationParams.WindowSize.Width); + for (u32 x=0; x<CreationParams.WindowSize.Width; ++x) + str += " "; + OutputBuffer.push_back(str); + } + + +#ifdef _IRR_WINDOWS_NT_CONSOLE_ + CursorControl = new CCursorControl(CreationParams.WindowSize); +#endif + + if (VideoDriver) + { + createGUIAndScene(); +#ifdef _IRR_USE_CONSOLE_FONT_ + if (GUIEnvironment) + { + ConsoleFont = new gui::CGUIConsoleFont(this); + gui::IGUISkin *skin = GUIEnvironment->getSkin(); + if (skin) + { + for (u32 i=0; i < gui::EGDF_COUNT; ++i) + skin->setFont(ConsoleFont, gui::EGUI_DEFAULT_FONT(i)); + } + } +#endif + } +} + +//! destructor +CIrrDeviceConsole::~CIrrDeviceConsole() +{ + // GUI and scene are dropped in the stub + if (CursorControl) + { + CursorControl->drop(); + CursorControl = 0; + } + if (ConsoleFont) + { + ConsoleFont->drop(); + ConsoleFont = 0; + } +#ifdef _IRR_VT100_CONSOLE_ + // reset terminal + fprintf(OutFile, "%cc", 27); +#endif +} + +//! runs the device. Returns false if device wants to be deleted +bool CIrrDeviceConsole::run() +{ + // increment timer + os::Timer::tick(); + + // process Windows console input +#ifdef _IRR_WINDOWS_NT_CONSOLE_ + + INPUT_RECORD in; + DWORD oldMode; + DWORD count, waste; + + // get old input mode + GetConsoleMode(WindowsSTDIn, &oldMode); + SetConsoleMode(WindowsSTDIn, ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT); + + GetNumberOfConsoleInputEvents(WindowsSTDIn, &count); + + // read keyboard and mouse input + while (count) + { + ReadConsoleInput(WindowsSTDIn, &in, 1, &waste ); + switch(in.EventType) + { + case KEY_EVENT: + { + SEvent e; + e.EventType = EET_KEY_INPUT_EVENT; + e.KeyInput.PressedDown = (in.Event.KeyEvent.bKeyDown == TRUE); + e.KeyInput.Control = (in.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) != 0; + e.KeyInput.Shift = (in.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED) != 0; + e.KeyInput.Key = EKEY_CODE(in.Event.KeyEvent.wVirtualKeyCode); + e.KeyInput.Char = in.Event.KeyEvent.uChar.UnicodeChar; + postEventFromUser(e); + break; + } + case MOUSE_EVENT: + { + SEvent e; + e.EventType = EET_MOUSE_INPUT_EVENT; + e.MouseInput.X = in.Event.MouseEvent.dwMousePosition.X; + e.MouseInput.Y = in.Event.MouseEvent.dwMousePosition.Y; + e.MouseInput.Wheel = 0.f; + e.MouseInput.ButtonStates = + ( (in.Event.MouseEvent.dwButtonState & FROM_LEFT_1ST_BUTTON_PRESSED) ? EMBSM_LEFT : 0 ) | + ( (in.Event.MouseEvent.dwButtonState & RIGHTMOST_BUTTON_PRESSED) ? EMBSM_RIGHT : 0 ) | + ( (in.Event.MouseEvent.dwButtonState & FROM_LEFT_2ND_BUTTON_PRESSED) ? EMBSM_MIDDLE : 0 ) | + ( (in.Event.MouseEvent.dwButtonState & FROM_LEFT_3RD_BUTTON_PRESSED) ? EMBSM_EXTRA1 : 0 ) | + ( (in.Event.MouseEvent.dwButtonState & FROM_LEFT_4TH_BUTTON_PRESSED) ? EMBSM_EXTRA2 : 0 ); + + if (in.Event.MouseEvent.dwEventFlags & MOUSE_MOVED) + { + CursorControl->setPosition(core::position2di(e.MouseInput.X, e.MouseInput.Y)); + + // create mouse moved event + e.MouseInput.Event = EMIE_MOUSE_MOVED; + postEventFromUser(e); + } + + if (in.Event.MouseEvent.dwEventFlags & MOUSE_WHEELED) + { + e.MouseInput.Event = EMIE_MOUSE_WHEEL; + e.MouseInput.Wheel = (in.Event.MouseEvent.dwButtonState & 0xFF000000) ? -1.0f : 1.0f; + postEventFromUser(e); + } + + if ( (MouseButtonStates & EMBSM_LEFT) != (e.MouseInput.ButtonStates & EMBSM_LEFT) ) + { + e.MouseInput.Event = (e.MouseInput.ButtonStates & EMBSM_LEFT) ? EMIE_LMOUSE_PRESSED_DOWN : EMIE_LMOUSE_LEFT_UP; + postEventFromUser(e); + } + + if ( (MouseButtonStates & EMBSM_RIGHT) != (e.MouseInput.ButtonStates & EMBSM_RIGHT) ) + { + e.MouseInput.Event = (e.MouseInput.ButtonStates & EMBSM_RIGHT) ? EMIE_RMOUSE_PRESSED_DOWN : EMIE_RMOUSE_LEFT_UP; + postEventFromUser(e); + } + + if ( (MouseButtonStates & EMBSM_MIDDLE) != (e.MouseInput.ButtonStates & EMBSM_MIDDLE) ) + { + e.MouseInput.Event = (e.MouseInput.ButtonStates & EMBSM_MIDDLE) ? EMIE_MMOUSE_PRESSED_DOWN : EMIE_MMOUSE_LEFT_UP; + postEventFromUser(e); + } + + // save current button states + MouseButtonStates = e.MouseInput.ButtonStates; + + break; + } + case WINDOW_BUFFER_SIZE_EVENT: + VideoDriver->OnResize( + core::dimension2d<u32>(in.Event.WindowBufferSizeEvent.dwSize.X, + in.Event.WindowBufferSizeEvent.dwSize.Y)); + break; + case FOCUS_EVENT: + IsWindowFocused = (in.Event.FocusEvent.bSetFocus == TRUE); + break; + default: + break; + } + GetNumberOfConsoleInputEvents(WindowsSTDIn, &count); + } + + // set input mode + SetConsoleMode(WindowsSTDIn, oldMode); +#else + // todo: keyboard input from terminal in raw mode +#endif + + return !Close; +} + +//! Cause the device to temporarily pause execution and let other processes to run +// This should bring down processor usage without major performance loss for Irrlicht +void CIrrDeviceConsole::yield() +{ +#ifdef _IRR_WINDOWS_API_ + Sleep(1); +#else + struct timespec ts = {0,0}; + nanosleep(&ts, NULL); +#endif +} + +//! Pause execution and let other processes to run for a specified amount of time. +void CIrrDeviceConsole::sleep(u32 timeMs, bool pauseTimer) +{ + const bool wasStopped = Timer ? Timer->isStopped() : true; + +#ifdef _IRR_WINDOWS_API_ + Sleep(timeMs); +#else + struct timespec ts; + ts.tv_sec = (time_t) (timeMs / 1000); + ts.tv_nsec = (long) (timeMs % 1000) * 1000000; + + if (pauseTimer && !wasStopped) + Timer->stop(); + + nanosleep(&ts, NULL); +#endif + + if (pauseTimer && !wasStopped) + Timer->start(); +} + +//! sets the caption of the window +void CIrrDeviceConsole::setWindowCaption(const wchar_t* text) +{ +#ifdef _IRR_WINDOWS_NT_CONSOLE_ + SetConsoleTitleW(text); +#endif +} + +//! returns if window is active. if not, nothing need to be drawn +bool CIrrDeviceConsole::isWindowActive() const +{ + // there is no window, but we always assume it is active + return true; +} + +//! returns if window has focus +bool CIrrDeviceConsole::isWindowFocused() const +{ + return IsWindowFocused; +} + +//! returns if window is minimized +bool CIrrDeviceConsole::isWindowMinimized() const +{ + return false; +} + +//! presents a surface in the client area +bool CIrrDeviceConsole::present(video::IImage* surface, void* windowId, core::rect<s32>* src) +{ + + if (surface) + { + for (u32 y=0; y < surface->getDimension().Height; ++y) + { + for (u32 x=0; x< surface->getDimension().Width; ++x) + { + // get average pixel + u32 avg = surface->getPixel(x,y).getAverage() * (ASCIIArtCharsCount-1); + avg /= 255; + OutputBuffer[y] [x] = ASCIIArtChars[avg]; + } + } + } +#ifdef _IRR_USE_CONSOLE_FONT_ + for (u32 i=0; i< Text.size(); ++i) + { + s32 y = Text[i].Pos.Y; + + if ( y < (s32)OutputBuffer.size() && y > 0) + for (u32 c=0; c < Text[i].Text.size() && c + Text[i].Pos.X < OutputBuffer[y].size(); ++c) + //if (Text[i].Text[c] != ' ') + OutputBuffer[y] [c+Text[i].Pos.X] = Text[i].Text[c]; + } + Text.clear(); +#endif + + // draw output + for (u32 y=0; y<OutputBuffer.size(); ++y) + { + setTextCursorPos(0,y); + fprintf(OutFile, "%s", OutputBuffer[y].c_str()); + } + return surface != 0; +} + +//! notifies the device that it should close itself +void CIrrDeviceConsole::closeDevice() +{ + // return false next time we run() + Close = true; +} + + +//! Sets if the window should be resizable in windowed mode. +void CIrrDeviceConsole::setResizable(bool resize) +{ + // do nothing +} + + +//! Minimize the window. +void CIrrDeviceConsole::minimizeWindow() +{ + // do nothing +} + + +//! Maximize window +void CIrrDeviceConsole::maximizeWindow() +{ + // do nothing +} + + +//! Restore original window size +void CIrrDeviceConsole::restoreWindow() +{ + // do nothing +} + + +void CIrrDeviceConsole::setTextCursorPos(s16 x, s16 y) +{ +#ifdef _IRR_WINDOWS_NT_CONSOLE_ + // move WinNT cursor + COORD Position; + Position.X = x; + Position.Y = y; + SetConsoleCursorPosition(WindowsSTDOut, Position); +#elif defined(_IRR_VT100_CONSOLE_) + // send escape code + fprintf(OutFile, "%c[%d;%dH", 27, y, x); +#else + // not implemented +#endif +} + +void CIrrDeviceConsole::addPostPresentText(s16 X, s16 Y, const wchar_t *text) +{ + SPostPresentText p; + p.Text = text; + p.Pos.X = X; + p.Pos.Y = Y; + Text.push_back(p); +} + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_CONSOLE_DEVICE_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.h new file mode 100644 index 0000000..8052182 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceConsole.h @@ -0,0 +1,330 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_DEVICE_CONSOLE_H_INCLUDED__ +#define __C_IRR_DEVICE_CONSOLE_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ + +//#define _IRR_USE_CONSOLE_FONT_ + +#include "SIrrCreationParameters.h" +#include "CIrrDeviceStub.h" +#include "IImagePresenter.h" +// for console font +#include "IGUIFont.h" + +#ifdef _IRR_WINDOWS_API_ +#define WIN32_LEAN_AND_MEAN +#if !defined(_IRR_XBOX_PLATFORM_) + #include <windows.h> +#endif +#if(_WIN32_WINNT >= 0x0500) +#define _IRR_WINDOWS_NT_CONSOLE_ +#endif +#else +#include <time.h> +#endif + +// for now we assume all other terminal types are VT100 +#ifndef _IRR_WINDOWS_NT_CONSOLE_ +#define _IRR_VT100_CONSOLE_ +#endif + +namespace irr +{ + + class CIrrDeviceConsole : public CIrrDeviceStub, video::IImagePresenter + { + public: + + //! constructor + CIrrDeviceConsole(const SIrrlichtCreationParameters& params); + + //! destructor + virtual ~CIrrDeviceConsole(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! Cause the device to temporarily pause execution and let other processes to run + // This should bring down processor usage without major performance loss for Irrlicht + virtual void yield(); + + //! Pause execution and let other processes to run for a specified amount of time. + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! returns if window has focus + virtual bool isWindowFocused() const; + + //! returns if window is minimized + virtual bool isWindowMinimized() const; + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! Sets if the window should be resizable in windowed mode. + virtual void setResizable(bool resize=false); + + //! Minimizes the window. + virtual void minimizeWindow(); + + //! Maximizes the window. + virtual void maximizeWindow(); + + //! Restores the window size. + virtual void restoreWindow(); + + //! Get the device type + virtual E_DEVICE_TYPE getType() const + { + return EIDT_CONSOLE; + } + + void addPostPresentText(s16 X, s16 Y, const wchar_t *text); + + //! Implementation of the win32 console mouse cursor + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(const core::dimension2d<u32>& wsize) + : WindowSize(wsize), InvWindowSize(0.0f, 0.0f), IsVisible(true), UseReferenceRect(false) + { + if (WindowSize.Width!=0) + InvWindowSize.Width = 1.0f / WindowSize.Width; + + if (WindowSize.Height!=0) + InvWindowSize.Height = 1.0f / WindowSize.Height; + } + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + if(visible != IsVisible) + { + IsVisible = visible; + setPosition(CursorPos.X, CursorPos.Y); + } + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + if (!UseReferenceRect) + setPosition((s32)(x*WindowSize.Width), (s32)(y*WindowSize.Height)); + else + setPosition((s32)(x*ReferenceRect.getWidth()), (s32)(y*ReferenceRect.getHeight())); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { + setInternalCursorPosition(core::position2di(x,y)); + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + if (!UseReferenceRect) + { + return core::position2d<f32>(CursorPos.X * InvWindowSize.Width, + CursorPos.Y * InvWindowSize.Height); + } + + return core::position2d<f32>(CursorPos.X / (f32)ReferenceRect.getWidth(), + CursorPos.Y / (f32)ReferenceRect.getHeight()); + } + + //! Sets an absolute reference rect for calculating the cursor position. + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + if (rect) + { + ReferenceRect = *rect; + UseReferenceRect = true; + + // prevent division through zero and uneven sizes + + if (!ReferenceRect.getHeight() || ReferenceRect.getHeight()%2) + ReferenceRect.LowerRightCorner.Y += 1; + + if (!ReferenceRect.getWidth() || ReferenceRect.getWidth()%2) + ReferenceRect.LowerRightCorner.X += 1; + } + else + UseReferenceRect = false; + } + + + //! Updates the internal cursor position + void setInternalCursorPosition(const core::position2di &pos) + { + CursorPos = pos; + + if (UseReferenceRect) + CursorPos -= ReferenceRect.UpperLeftCorner; + } + + private: + + core::position2d<s32> CursorPos; + core::dimension2d<u32> WindowSize; + core::dimension2d<f32> InvWindowSize; + bool IsVisible, + UseReferenceRect; + core::rect<s32> ReferenceRect; + }; + + private: + + //! Set the position of the text caret + void setTextCursorPos(s16 x, s16 y); + + // text to be added after drawing the screen + struct SPostPresentText + { + core::position2d<s16> Pos; + core::stringc Text; + }; + + bool IsWindowFocused; + + core::array<core::stringc> OutputBuffer; + gui::IGUIFont *ConsoleFont; + core::array<SPostPresentText> Text; + + FILE *OutFile; + +#ifdef _IRR_WINDOWS_NT_CONSOLE_ + HANDLE WindowsSTDIn, WindowsSTDOut; + u32 MouseButtonStates; +#endif + }; + +#ifdef _IRR_USE_CONSOLE_FONT_ + +namespace gui +{ + class CGUIConsoleFont : public IGUIFont + { + public: + + CGUIConsoleFont(CIrrDeviceConsole* device) : Device(device) { } + + //! Draws some text and clips it to the specified rectangle if wanted. + virtual void draw(const wchar_t* text, const core::rect<s32>& position, + video::SColor color, bool hcenter=false, bool vcenter=false, + const core::rect<s32>* clip=0) + { + core::rect<s32> Area = clip ? *clip : position; + + if (Area.UpperLeftCorner.X < 0) + Area.UpperLeftCorner.X = 0; + + if (Area.UpperLeftCorner.Y < 0) + Area.UpperLeftCorner.Y = 0; + + core::position2d<s16> pos; + + // centre vertically + pos.Y = vcenter ? (position.UpperLeftCorner.Y + position.LowerRightCorner.Y) / 2 : position.UpperLeftCorner.Y; + + // nothing to display? + if (pos.Y < Area.UpperLeftCorner.Y || pos.Y > Area.LowerRightCorner.Y) + return; + + tempText = text; + + // centre horizontally + pos.X = hcenter ? position.getCenter().X - ( tempText.size() / 2) : position.UpperLeftCorner.X; + + // clip + u32 xlclip = 0, + xrclip = 0; + + // get right clip + if (pos.X + (s32)tempText.size() > Area.LowerRightCorner.X) + xrclip = Area.LowerRightCorner.X - pos.X; + + // get left clip + if (pos.X < Area.UpperLeftCorner.X) + xlclip = Area.UpperLeftCorner.X - pos.X; + + // totally clipped? + if ((s32)tempText.size() - xlclip - xrclip < 0) + return; + + // null terminate the string + if (xrclip > 0) + tempText[xrclip] = L'\0'; + + Device->addPostPresentText(pos.X + xlclip, pos.Y, &(tempText.c_str()[xlclip])); + } + + //! Calculates the dimension of some text. + virtual core::dimension2d<u32> getDimension(const wchar_t* text) const + { + return core::dimension2d<u32>(wcslen(text),1); + } + + //! Calculates the index of the character in the text which is on a specific position. + virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const { return pixel_x; }; + + //! No kerning + virtual void setKerningWidth (s32 kerning) { } + virtual void setKerningHeight (s32 kerning) { } + virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const {return 0;} + virtual s32 getKerningHeight() const { return 0;} + virtual void setInvisibleCharacters( const wchar_t *s ) { } + // I guess this is an OS specific font + virtual EGUI_FONT_TYPE getType() const { return EGFT_OS; } + private: + CIrrDeviceConsole* Device; + core::stringw tempText; + }; + +} // end namespace gui + +#endif // _IRR_USE_CONSOLE_FONT_ + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#endif // __C_IRR_DEVICE_CONSOLE_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.cpp new file mode 100644 index 0000000..e3af6c2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.cpp @@ -0,0 +1,405 @@ +// Copyright (C) 2002-2007 Nikolaus Gebhardt +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CIrrDeviceFB.h" + +#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <sys/utsname.h> +#include <time.h> +#include <errno.h> + +#include "IEventReceiver.h" +#include "os.h" +#include "CTimer.h" +#include "irrString.h" +#include "Keycodes.h" +#include "COSOperator.h" +#include "CColorConverter.h" +#include "SIrrCreationParameters.h" + +#include <linux/input.h> + +namespace irr +{ + +//! constructor +CIrrDeviceFB::CIrrDeviceFB(const SIrrlichtCreationParameters& params) + : CIrrDeviceStub(params), Framebuffer(-1), EventDevice(-1), SoftwareImage(0), + Pitch(0), FBColorFormat(video::ECF_A8R8G8B8), Close(false) +{ + #ifdef _DEBUG + setDebugName("CIrrDeviceFB"); + #endif + + // print version, distribution etc. + // thx to LynxLuna for pointing me to the uname function + core::stringc linuxversion; + struct utsname FBInfo; + uname(&FBInfo); + + linuxversion += FBInfo.sysname; + linuxversion += " "; + linuxversion += FBInfo.release; + linuxversion += " "; + linuxversion += FBInfo.version; + linuxversion += " "; + linuxversion += FBInfo.machine; + + Operator = new COSOperator(linuxversion); + os::Printer::log(linuxversion.c_str(), ELL_INFORMATION); + + // create window + if (params.DriverType != video::EDT_NULL) + { + // create the window, only if we do not use the null device + if (!createWindow(params.WindowSize, params.Bits)) + return; + } + + // create cursor control + CursorControl = new CCursorControl(this, params.DriverType == video::EDT_NULL); + + // create driver + createDriver(); + + if (!VideoDriver) + return; + + createGUIAndScene(); +} + + + +//! destructor +CIrrDeviceFB::~CIrrDeviceFB() +{ + if (SoftwareImage) + munmap(SoftwareImage, CreationParams.WindowSize.Height*Pitch); + // go back to previous format + if (ioctl(Framebuffer, FBIOPUT_VSCREENINFO, &oldscreeninfo) <0) + perror("Restoring old fb mode"); + + if (KeyboardDevice != -1) + if (ioctl(KeyboardDevice, KDSETMODE, &KeyboardMode) <0) + perror("Restoring keyboard mode"); + if (EventDevice != -1) + close(EventDevice); + if (KeyboardDevice != -1) + close(KeyboardDevice); + if (Framebuffer != -1) + close(Framebuffer); +} + + +bool CIrrDeviceFB::createWindow(const core::dimension2d<u32>& windowSize, u32 bits) +{ + char buf[256]; + CreationParams.WindowSize.Width = windowSize.Width; + CreationParams.WindowSize.Height = windowSize.Height; + + KeyboardDevice = open("/dev/tty", O_RDWR); + if (KeyboardDevice == -1) + perror("Open keyboard"); + if (ioctl(KeyboardDevice, KDGETMODE, &KeyboardMode) <0) + perror("Read keyboard mode"); + if (ioctl(KeyboardDevice, KDSETMODE, KD_GRAPHICS) <0) + perror("Set keyboard mode"); + + Framebuffer=open("/dev/fb/0", O_RDWR); + if (Framebuffer == -1) + { + Framebuffer=open("/dev/fb0", O_RDWR); + if (Framebuffer == -1) + { + perror("Open framebuffer"); + return false; + } + } + EventDevice = open("/dev/input/event0", O_RDONLY | O_NONBLOCK); + if (EventDevice == -1) + perror("Open event device"); + + // make format settings + ioctl(Framebuffer, FBIOGET_FSCREENINFO, &fbfixscreeninfo); + ioctl(Framebuffer, FBIOGET_VSCREENINFO, &oldscreeninfo); +snprintf(buf, 256, "Original resolution: %d x %d\nARGB%d%d%d%d\n",oldscreeninfo.xres,oldscreeninfo.yres, + oldscreeninfo.transp.length,oldscreeninfo.red.length,oldscreeninfo.green.length,oldscreeninfo.blue.length); + os::Printer::log(buf); + memcpy(&fbscreeninfo, &oldscreeninfo, sizeof(struct fb_var_screeninfo)); + if (CreationParams.DriverType != video::EDT_NULL) + { + fbscreeninfo.xres = fbscreeninfo.xres_virtual = CreationParams.WindowSize.Width; + fbscreeninfo.yres = fbscreeninfo.yres_virtual = CreationParams.WindowSize.Height; + fbscreeninfo.bits_per_pixel = 16; + fbscreeninfo.red.offset = 10; + fbscreeninfo.red.length = 5; + fbscreeninfo.green.offset = 5; + fbscreeninfo.green.length = 5; + fbscreeninfo.blue.offset = 0; + fbscreeninfo.blue.length = 5; + fbscreeninfo.transp.offset = 15; + fbscreeninfo.transp.length = 1; + ioctl(Framebuffer, FBIOPUT_VSCREENINFO, &fbscreeninfo); + ioctl(Framebuffer, FBIOGET_VSCREENINFO, &fbscreeninfo); + +snprintf(buf, 256, "New resolution: %d x %d (%d x %d)\nARGB%d%d%d%d\n",fbscreeninfo.xres,fbscreeninfo.yres,fbscreeninfo.xres_virtual,fbscreeninfo.yres_virtual, + fbscreeninfo.transp.length,fbscreeninfo.red.length,fbscreeninfo.green.length,fbscreeninfo.blue.length); + os::Printer::log(buf); + + CreationParams.WindowSize.Width = fbscreeninfo.xres; + CreationParams.WindowSize.Height = fbscreeninfo.yres; + CreationParams.Bits = fbscreeninfo.bits_per_pixel; + Pitch = fbfixscreeninfo.line_length; + if (fbscreeninfo.bits_per_pixel == 16) + { + if (fbscreeninfo.transp.length == 0) + FBColorFormat = video::ECF_R5G6B5; + else + FBColorFormat = video::ECF_A1R5G5B5; + } + else + { + if (fbscreeninfo.transp.length == 0) + FBColorFormat = video::ECF_R8G8B8; + else + FBColorFormat = video::ECF_A8R8G8B8; + } + if (MAP_FAILED==(SoftwareImage=(u8*)mmap(0, CreationParams.WindowSize.Height*Pitch, PROT_READ|PROT_WRITE, MAP_SHARED, Framebuffer, 0))) + { + perror("mmap render target"); + return false; + } + } + return true; +} + + +//! create the driver +void CIrrDeviceFB::createDriver() +{ + switch(CreationParams.DriverType) + { + case video::EDT_SOFTWARE: + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + #else + os::Printer::log("No Software driver support compiled in.", ELL_WARNING); + #endif + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("Burning's video driver was not compiled in.", ELL_WARNING); + #endif + break; + + case video::EDT_OPENGL: + case video::EDT_DIRECT3D8: + case video::EDT_DIRECT3D9: + os::Printer::log("This driver is not available in FB. Try Software renderer.", + ELL_WARNING); + break; + + default: + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + } +} + + +//! runs the device. Returns false if device wants to be deleted +bool CIrrDeviceFB::run() +{ + os::Timer::tick(); + + struct input_event ev; + if (EventDevice>=0) + { + if ((read(EventDevice, &ev, sizeof(input_event)) < 0) && + errno != EAGAIN) + perror("Read input event"); + if (ev.type == EV_KEY) + { + irr::SEvent irrevent; + irrevent.EventType = irr::EET_KEY_INPUT_EVENT; + irrevent.KeyInput.PressedDown = true; + + switch (ev.code) + { + case KEY_RIGHTCTRL: + case KEY_LEFTCTRL: + irrevent.KeyInput.Control = true; + break; + case KEY_RIGHTSHIFT: + case KEY_LEFTSHIFT: + irrevent.KeyInput.Shift = true; + break; + case KEY_ESC: + irrevent.KeyInput.Key = (EKEY_CODE)0x1B; + break; + case KEY_SPACE: + irrevent.KeyInput.Key = (EKEY_CODE)0x20; + break; + case KEY_UP: + irrevent.KeyInput.Key = (EKEY_CODE)0x26; + break; + case KEY_LEFT: + irrevent.KeyInput.Key = (EKEY_CODE)0x25; + break; + case KEY_RIGHT: + irrevent.KeyInput.Key = (EKEY_CODE)0x27; + break; + case KEY_DOWN: + irrevent.KeyInput.Key = (EKEY_CODE)0x28; + break; + default: + irrevent.KeyInput.Key = (EKEY_CODE)0; + break; + } + postEventFromUser(irrevent); + } + } + + return !Close; +} + + +//! Pause the current process for the minimum time allowed only to allow other processes to execute +void CIrrDeviceFB::yield() +{ + struct timespec ts = {0,0}; + nanosleep(&ts, NULL); +} + + +//! Pause execution and let other processes to run for a specified amount of time. +void CIrrDeviceFB::sleep(u32 timeMs, bool pauseTimer=false) +{ + bool wasStopped = Timer ? Timer->isStopped() : true; + + struct timespec ts; + ts.tv_sec = (time_t) (timeMs / 1000); + ts.tv_nsec = (long) (timeMs % 1000) * 1000000; + + if (pauseTimer && !wasStopped) + Timer->stop(); + + nanosleep(&ts, NULL); + + if (pauseTimer && !wasStopped) + Timer->start(); +} + + +//! presents a surface in the client area +bool CIrrDeviceFB::present(video::IImage* image, void* windowId, core::rect<s32>* src ) +{ + // this is only necessary for software drivers. + if (CreationParams.DriverType != video::EDT_SOFTWARE && CreationParams.DriverType != video::EDT_BURNINGSVIDEO) + return false; + + if (!SoftwareImage) + return false; + + u8* destData = SoftwareImage; + u32 srcwidth = (u32)image->getDimension().Width; + u32 srcheight = (u32)image->getDimension().Height; + // clip images + srcheight = core::min_(srcheight, CreationParams.WindowSize.Height); + srcwidth = core::min_(srcwidth, CreationParams.WindowSize.Width); + + u8* srcdata = (u8*)image->lock(); + for (u32 y=0; y<srcheight; ++y) + { + video::CColorConverter::convert_viaFormat(srcdata, image->getColorFormat(), srcwidth, destData, FBColorFormat); + srcdata+=image->getPitch(); + destData+=Pitch; + } + image->unlock(); + msync(SoftwareImage,CreationParams.WindowSize.Width*CreationParams.WindowSize.Height,MS_ASYNC); + return true; +} + + +//! notifies the device that it should close itself +void CIrrDeviceFB::closeDevice() +{ + Close = true; +} + + +//! returns if window is active. if not, nothing need to be drawn +bool CIrrDeviceFB::isWindowActive() const +{ + return true; +} + + +//! returns if window has focus +bool CIrrDeviceFB::isWindowFocused() const +{ + return true; +} + + +//! returns if window is minimized +bool CIrrDeviceFB::isWindowMinimized() const +{ + return false; +} + + +//! sets the caption of the window +void CIrrDeviceFB::setWindowCaption(const wchar_t* text) +{ +} + + +//! Sets if the window should be resizeable in windowed mode. +void CIrrDeviceFB::setResizable(bool resize) +{ +} + + +//! Minimizes window +void CIrrDeviceFB::minimizeWindow() +{ +} + + +//! Maximizes window +void CIrrDeviceFB::maximizeWindow() +{ +} + + +//! Restores original window size +void CIrrDeviceFB::restoreWindow() +{ +} + + +//! Returns the type of this device +E_DEVICE_TYPE CIrrDeviceFB::getType() const +{ + return EIDT_FRAMEBUFFER; +} + + +} // end namespace irr + +#endif // _IRR_USE_FB_DEVICE_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.h new file mode 100644 index 0000000..07a9aca --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceFB.h @@ -0,0 +1,207 @@ +// Copyright (C) 2002-2007 Nikolaus Gebhardt +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_DEVICE_FB_H_INCLUDED__ +#define __C_IRR_DEVICE_FB_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ + +#include "CIrrDeviceStub.h" +#include "SIrrCreationParameters.h" +#include "IrrlichtDevice.h" +#include "IImagePresenter.h" +#include "ICursorControl.h" + +#define KeySym s32 +#include <linux/fb.h> +#include <linux/kd.h> + +namespace irr +{ + class CIrrDeviceFB : public CIrrDeviceStub, public video::IImagePresenter + { + public: + + //! constructor + CIrrDeviceFB(const SIrrlichtCreationParameters& params); + + //! destructor + virtual ~CIrrDeviceFB(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! Cause the device to temporarily pause execution and let other processes to run + // This should bring down processor usage without major performance loss for Irrlicht + virtual void yield(); + + //! Pause execution and let other processes to run for a specified amount of time. + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! returns if window has focus + virtual bool isWindowFocused() const; + + //! returns if window is minimized + virtual bool isWindowMinimized() const; + + //! Minimizes window + virtual void minimizeWindow(); + + //! Maximizes window + virtual void maximizeWindow(); + + //! Restores original window size + virtual void restoreWindow(); + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId = 0, core::rect<s32>* src=0 ); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! Sets if the window should be resizeable in windowed mode. + virtual void setResizable(bool resize=false); + + //! Returns the type of this device + virtual E_DEVICE_TYPE getType() const; + + private: + + //! create the driver + void createDriver(); + + bool createWindow(const core::dimension2d<u32>& windowSize, u32 bits); + + //! Implementation of the cursor control + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(CIrrDeviceFB* dev, bool null) + : Device(dev), IsVisible(true), Null(null) + { + Device->grab(); + } + + ~CCursorControl() + { + Device->drop(); + } + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + IsVisible = visible; + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + setPosition((s32)(x*Device->CreationParams.WindowSize.Width), (s32)(y*Device->CreationParams.WindowSize.Height)); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + updateCursorPos(); + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + updateCursorPos(); + return core::position2d<f32>(CursorPos.X / (f32)Device->CreationParams.WindowSize.Width, + CursorPos.Y / (f32)Device->CreationParams.WindowSize.Height); + } + + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + } + + private: + + void updateCursorPos() + { + } + + core::position2d<s32> CursorPos; + CIrrDeviceFB* Device; + bool IsVisible; + bool Null; + }; + + friend class CCursorControl; + + int Framebuffer; + int EventDevice; + int KeyboardDevice; + struct fb_fix_screeninfo fbfixscreeninfo; + struct fb_var_screeninfo fbscreeninfo; + struct fb_var_screeninfo oldscreeninfo; + long KeyboardMode; + u8* SoftwareImage; + + u32 Pitch; + video::ECOLOR_FORMAT FBColorFormat; + bool Close; + + struct SKeyMap + { + SKeyMap() {} + SKeyMap(s32 x11, s32 win32) + : X11Key(x11), Win32Key(win32) + { + } + + KeySym X11Key; + s32 Win32Key; + + bool operator<(const SKeyMap& o) const + { + return X11Key<o.X11Key; + } + }; + + core::array<SKeyMap> KeyMap; + }; + + +} // end namespace irr + +#endif // _IRR_USE_FB_DEVICE_ +#endif // __C_IRR_DEVICE_FB_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.cpp new file mode 100644 index 0000000..b94d566 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.cpp @@ -0,0 +1,2303 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CIrrDeviceLinux.h" + +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + +#include <stdio.h> +#include <stdlib.h> +#include <sys/utsname.h> +#include <time.h> +#include "IEventReceiver.h" +#include "ISceneManager.h" +#include "IGUIEnvironment.h" +#include "os.h" +#include "CTimer.h" +#include "irrString.h" +#include "Keycodes.h" +#include "COSOperator.h" +#include "CColorConverter.h" +#include "SIrrCreationParameters.h" +#include "IGUISpriteBank.h" +#include <X11/XKBlib.h> +#include <X11/Xatom.h> + +#ifdef _IRR_LINUX_XCURSOR_ +#include <X11/Xcursor/Xcursor.h> +#endif + +#if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#include <fcntl.h> +#include <unistd.h> + +#ifdef __FREE_BSD_ +#include <sys/joystick.h> +#else + +// linux/joystick.h includes linux/input.h, which #defines values for various KEY_FOO keys. +// These override the irr::KEY_FOO equivalents, which stops key handling from working. +// As a workaround, defining _INPUT_H stops linux/input.h from being included; it +// doesn't actually seem to be necessary except to pull in sys/ioctl.h. +#define _INPUT_H +#include <sys/ioctl.h> // Would normally be included in linux/input.h +#include <linux/joystick.h> +#undef _INPUT_H +#endif + +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + +namespace irr +{ + namespace video + { + IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceLinux* device); + } +} // end namespace irr + +namespace +{ + Atom X_ATOM_CLIPBOARD; + Atom X_ATOM_TARGETS; + Atom X_ATOM_UTF8_STRING; + Atom X_ATOM_TEXT; +}; + +namespace irr +{ + +const char* wmDeleteWindow = "WM_DELETE_WINDOW"; + +//! constructor +CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) + : CIrrDeviceStub(param), +#ifdef _IRR_COMPILE_WITH_X11_ + display(0), visual(0), screennr(0), window(0), StdHints(0), SoftwareImage(0), +#ifdef _IRR_COMPILE_WITH_OPENGL_ + glxWin(0), + Context(0), +#endif +#endif + Width(param.WindowSize.Width), Height(param.WindowSize.Height), + WindowHasFocus(false), WindowMinimized(false), + UseXVidMode(false), UseXRandR(false), UseGLXWindow(false), + ExternalWindow(false), AutorepeatSupport(0) +{ + #ifdef _DEBUG + setDebugName("CIrrDeviceLinux"); + #endif + + // print version, distribution etc. + // thx to LynxLuna for pointing me to the uname function + core::stringc linuxversion; + struct utsname LinuxInfo; + uname(&LinuxInfo); + + linuxversion += LinuxInfo.sysname; + linuxversion += " "; + linuxversion += LinuxInfo.release; + linuxversion += " "; + linuxversion += LinuxInfo.version; + linuxversion += " "; + linuxversion += LinuxInfo.machine; + + Operator = new COSOperator(linuxversion, this); + os::Printer::log(linuxversion.c_str(), ELL_INFORMATION); + + // create keymap + createKeyMap(); + + // create window + if (CreationParams.DriverType != video::EDT_NULL) + { + // create the window, only if we do not use the null device + if (!createWindow()) + return; + } + + // create cursor control + CursorControl = new CCursorControl(this, CreationParams.DriverType == video::EDT_NULL); + + // create driver + createDriver(); + + if (!VideoDriver) + return; + + createGUIAndScene(); +} + + +//! destructor +CIrrDeviceLinux::~CIrrDeviceLinux() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (StdHints) + XFree(StdHints); + // Disable cursor (it is drop'ed in stub) + if (CursorControl) + { + CursorControl->setVisible(false); + static_cast<CCursorControl*>(CursorControl)->clearCursors(); + } + + // Must free OpenGL textures etc before destroying context, so can't wait for stub destructor + if ( GUIEnvironment ) + { + GUIEnvironment->drop(); + GUIEnvironment = NULL; + } + if ( SceneManager ) + { + SceneManager->drop(); + SceneManager = NULL; + } + if ( VideoDriver ) + { + VideoDriver->drop(); + VideoDriver = NULL; + } + + if (display) + { + #ifdef _IRR_COMPILE_WITH_OPENGL_ + if (Context) + { + if (glxWin) + { + if (!glXMakeContextCurrent(display, None, None, NULL)) + os::Printer::log("Could not release glx context.", ELL_WARNING); + } + else + { + if (!glXMakeCurrent(display, None, NULL)) + os::Printer::log("Could not release glx context.", ELL_WARNING); + } + glXDestroyContext(display, Context); + if (glxWin) + glXDestroyWindow(display, glxWin); + } + #endif // #ifdef _IRR_COMPILE_WITH_OPENGL_ + + // Reset fullscreen resolution change + switchToFullscreen(true); + + if (SoftwareImage) + XDestroyImage(SoftwareImage); + + if (!ExternalWindow) + { + XDestroyWindow(display,window); + XCloseDisplay(display); + } + } + if (visual) + XFree(visual); + +#endif // #ifdef _IRR_COMPILE_WITH_X11_ + +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + for (u32 joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + if (ActiveJoysticks[joystick].fd >= 0) + { + close(ActiveJoysticks[joystick].fd); + } + } +#endif +} + + +#if defined(_IRR_COMPILE_WITH_X11_) && defined(_DEBUG) +int IrrPrintXError(Display *display, XErrorEvent *event) +{ + char msg[256]; + char msg2[256]; + + snprintf(msg, 256, "%d", event->request_code); + XGetErrorDatabaseText(display, "XRequest", msg, "unknown", msg2, 256); + XGetErrorText(display, event->error_code, msg, 256); + os::Printer::log("X Error", msg, ELL_WARNING); + os::Printer::log("From call ", msg2, ELL_WARNING); + return 0; +} +#endif + + +bool CIrrDeviceLinux::switchToFullscreen(bool reset) +{ + if (!CreationParams.Fullscreen) + return true; + if (reset) + { +#ifdef _IRR_LINUX_X11_VIDMODE_ + if (UseXVidMode && CreationParams.Fullscreen) + { + XF86VidModeSwitchToMode(display, screennr, &oldVideoMode); + XF86VidModeSetViewPort(display, screennr, 0, 0); + } + #endif + #ifdef _IRR_LINUX_X11_RANDR_ + if (UseXRandR && CreationParams.Fullscreen) + { + XRRScreenConfiguration *config=XRRGetScreenInfo(display,DefaultRootWindow(display)); + XRRSetScreenConfig(display,config,DefaultRootWindow(display),oldRandrMode,oldRandrRotation,CurrentTime); + XRRFreeScreenConfigInfo(config); + } + #endif + return true; + } + + getVideoModeList(); + #if defined(_IRR_LINUX_X11_VIDMODE_) || defined(_IRR_LINUX_X11_RANDR_) + s32 eventbase, errorbase; + s32 bestMode = -1; + #endif + + #ifdef _IRR_LINUX_X11_VIDMODE_ + if (XF86VidModeQueryExtension(display, &eventbase, &errorbase)) + { + // enumerate video modes + s32 modeCount; + XF86VidModeModeInfo** modes; + + XF86VidModeGetAllModeLines(display, screennr, &modeCount, &modes); + + // find fitting mode + for (s32 i = 0; i<modeCount; ++i) + { + if (bestMode==-1 && modes[i]->hdisplay >= Width && modes[i]->vdisplay >= Height) + bestMode = i; + else if (bestMode!=-1 && + modes[i]->hdisplay >= Width && + modes[i]->vdisplay >= Height && + modes[i]->hdisplay <= modes[bestMode]->hdisplay && + modes[i]->vdisplay <= modes[bestMode]->vdisplay) + bestMode = i; + } + if (bestMode != -1) + { + os::Printer::log("Starting vidmode fullscreen mode...", ELL_INFORMATION); + os::Printer::log("hdisplay: ", core::stringc(modes[bestMode]->hdisplay).c_str(), ELL_INFORMATION); + os::Printer::log("vdisplay: ", core::stringc(modes[bestMode]->vdisplay).c_str(), ELL_INFORMATION); + + XF86VidModeSwitchToMode(display, screennr, modes[bestMode]); + XF86VidModeSetViewPort(display, screennr, 0, 0); + UseXVidMode=true; + } + else + { + os::Printer::log("Could not find specified video mode, running windowed.", ELL_WARNING); + CreationParams.Fullscreen = false; + } + + XFree(modes); + } + else + #endif + #ifdef _IRR_LINUX_X11_RANDR_ + if (XRRQueryExtension(display, &eventbase, &errorbase)) + { + s32 modeCount; + XRRScreenConfiguration *config=XRRGetScreenInfo(display,DefaultRootWindow(display)); + XRRScreenSize *modes=XRRConfigSizes(config,&modeCount); + for (s32 i = 0; i<modeCount; ++i) + { + if (bestMode==-1 && (u32)modes[i].width >= Width && (u32)modes[i].height >= Height) + bestMode = i; + else if (bestMode!=-1 && + (u32)modes[i].width >= Width && + (u32)modes[i].height >= Height && + modes[i].width <= modes[bestMode].width && + modes[i].height <= modes[bestMode].height) + bestMode = i; + } + if (bestMode != -1) + { + os::Printer::log("Starting randr fullscreen mode...", ELL_INFORMATION); + os::Printer::log("width: ", core::stringc(modes[bestMode].width).c_str(), ELL_INFORMATION); + os::Printer::log("height: ", core::stringc(modes[bestMode].height).c_str(), ELL_INFORMATION); + + XRRSetScreenConfig(display,config,DefaultRootWindow(display),bestMode,oldRandrRotation,CurrentTime); + UseXRandR=true; + } + XRRFreeScreenConfigInfo(config); + } + else + #endif + { + os::Printer::log("VidMode or RandR extension must be installed to allow Irrlicht " + "to switch to fullscreen mode. Running in windowed mode instead.", ELL_WARNING); + CreationParams.Fullscreen = false; + } + return CreationParams.Fullscreen; +} + + +#if defined(_IRR_COMPILE_WITH_X11_) +void IrrPrintXGrabError(int grabResult, const c8 * grabCommand ) +{ + if ( grabResult == GrabSuccess ) + { +// os::Printer::log(grabCommand, ": GrabSuccess", ELL_INFORMATION); + return; + } + + switch ( grabResult ) + { + case AlreadyGrabbed: + os::Printer::log(grabCommand, ": AlreadyGrabbed", ELL_WARNING); + break; + case GrabNotViewable: + os::Printer::log(grabCommand, ": GrabNotViewable", ELL_WARNING); + break; + case GrabFrozen: + os::Printer::log(grabCommand, ": GrabFrozen", ELL_WARNING); + break; + case GrabInvalidTime: + os::Printer::log(grabCommand, ": GrabInvalidTime", ELL_WARNING); + break; + default: + os::Printer::log(grabCommand, ": grab failed with unknown problem", ELL_WARNING); + break; + } +} +#endif + + +bool CIrrDeviceLinux::createWindow() +{ +#ifdef _IRR_COMPILE_WITH_X11_ +#ifdef _DEBUG + os::Printer::log("Creating X window...", ELL_INFORMATION); + XSetErrorHandler(IrrPrintXError); +#endif + +// onefang changes start + if (CreationParams.VideoData) + display = (Display *) CreationParams.VideoData->OpenGLLinux.X11Display; + if (!display) +// onefang changes end + display = XOpenDisplay(0); + if (!display) + { + os::Printer::log("Error: Need running XServer to start Irrlicht Engine.", ELL_ERROR); + if (XDisplayName(0)[0]) + os::Printer::log("Could not open display", XDisplayName(0), ELL_ERROR); + else + os::Printer::log("Could not open display, set DISPLAY variable", ELL_ERROR); + return false; + } + + screennr = DefaultScreen(display); + + switchToFullscreen(); + +#ifdef _IRR_COMPILE_WITH_OPENGL_ + + GLXFBConfig glxFBConfig; + int major, minor; + bool isAvailableGLX=false; + if (CreationParams.DriverType==video::EDT_OPENGL) + { + isAvailableGLX=glXQueryExtension(display,&major,&minor); + if (isAvailableGLX && glXQueryVersion(display, &major, &minor)) + { +#ifdef GLX_VERSION_1_3 + typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); + +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + PFNGLXCHOOSEFBCONFIGPROC glxChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC)glXGetProcAddress(reinterpret_cast<const GLubyte*>("glXChooseFBConfig")); +#else + PFNGLXCHOOSEFBCONFIGPROC glxChooseFBConfig=glXChooseFBConfig; +#endif + if (major==1 && minor>2 && glxChooseFBConfig) + { + // attribute array for the draw buffer + int visualAttrBuffer[] = + { + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_RED_SIZE, 4, + GLX_GREEN_SIZE, 4, + GLX_BLUE_SIZE, 4, + GLX_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0, + GLX_DEPTH_SIZE, CreationParams.ZBufferBits, //10,11 + GLX_DOUBLEBUFFER, CreationParams.Doublebuffer?True:False, + GLX_STENCIL_SIZE, CreationParams.Stencilbuffer?1:0, +#if defined(GLX_VERSION_1_4) && defined(GLX_SAMPLE_BUFFERS) // we need to check the extension string! + GLX_SAMPLE_BUFFERS, 1, + GLX_SAMPLES, CreationParams.AntiAlias, // 18,19 +#elif defined(GLX_ARB_multisample) + GLX_SAMPLE_BUFFERS_ARB, 1, + GLX_SAMPLES_ARB, CreationParams.AntiAlias, // 18,19 +#elif defined(GLX_SGIS_multisample) + GLX_SAMPLE_BUFFERS_SGIS, 1, + GLX_SAMPLES_SGIS, CreationParams.AntiAlias, // 18,19 +#endif +//#ifdef GL_ARB_framebuffer_sRGB +// GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB, CreationParams.HandleSRGB, +//#elif defined(GL_EXT_framebuffer_sRGB) +// GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, CreationParams.HandleSRGB, +//#endif + GLX_STEREO, CreationParams.Stereobuffer?True:False, + None + }; + + GLXFBConfig *configList=0; + int nitems=0; + if (CreationParams.AntiAlias<2) + { + visualAttrBuffer[17] = 0; + visualAttrBuffer[19] = 0; + } + // first round with unchanged values + { + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + if (!configList && CreationParams.AntiAlias) + { + while (!configList && (visualAttrBuffer[19]>1)) + { + visualAttrBuffer[19] -= 1; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + } + if (!configList) + { + visualAttrBuffer[17] = 0; + visualAttrBuffer[19] = 0; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + if (configList) + { + os::Printer::log("No FSAA available.", ELL_WARNING); + CreationParams.AntiAlias=0; + } + else + { + //reenable multisampling + visualAttrBuffer[17] = 1; + visualAttrBuffer[19] = CreationParams.AntiAlias; + } + } + } + } + // Next try with flipped stencil buffer value + // If the first round was with stencil flag it's now without + // Other way round also makes sense because some configs + // only have depth buffer combined with stencil buffer + if (!configList) + { + if (CreationParams.Stencilbuffer) + os::Printer::log("No stencilbuffer available, disabling stencil shadows.", ELL_WARNING); + CreationParams.Stencilbuffer = !CreationParams.Stencilbuffer; + visualAttrBuffer[15]=CreationParams.Stencilbuffer?1:0; + + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + if (!configList && CreationParams.AntiAlias) + { + while (!configList && (visualAttrBuffer[19]>1)) + { + visualAttrBuffer[19] -= 1; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + } + if (!configList) + { + visualAttrBuffer[17] = 0; + visualAttrBuffer[19] = 0; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + if (configList) + { + os::Printer::log("No FSAA available.", ELL_WARNING); + CreationParams.AntiAlias=0; + } + else + { + //reenable multisampling + visualAttrBuffer[17] = 1; + visualAttrBuffer[19] = CreationParams.AntiAlias; + } + } + } + } + // Next try without double buffer + if (!configList && CreationParams.Doublebuffer) + { + os::Printer::log("No doublebuffering available.", ELL_WARNING); + CreationParams.Doublebuffer=false; + visualAttrBuffer[13] = GLX_DONT_CARE; + CreationParams.Stencilbuffer = false; + visualAttrBuffer[15]=0; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + if (!configList && CreationParams.AntiAlias) + { + while (!configList && (visualAttrBuffer[19]>1)) + { + visualAttrBuffer[19] -= 1; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + } + if (!configList) + { + visualAttrBuffer[17] = 0; + visualAttrBuffer[19] = 0; + configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems); + if (configList) + { + os::Printer::log("No FSAA available.", ELL_WARNING); + CreationParams.AntiAlias=0; + } + else + { + //reenable multisampling + visualAttrBuffer[17] = 1; + visualAttrBuffer[19] = CreationParams.AntiAlias; + } + } + } + } + if (configList) + { + glxFBConfig=configList[0]; + XFree(configList); + UseGLXWindow=true; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); + PFNGLXGETVISUALFROMFBCONFIGPROC glxGetVisualFromFBConfig= (PFNGLXGETVISUALFROMFBCONFIGPROC)glXGetProcAddress(reinterpret_cast<const GLubyte*>("glXGetVisualFromFBConfig")); + if (glxGetVisualFromFBConfig) + visual = glxGetVisualFromFBConfig(display,glxFBConfig); +#else + visual = glXGetVisualFromFBConfig(display,glxFBConfig); +#endif + } + } + else +#endif + { + // attribute array for the draw buffer + int visualAttrBuffer[] = + { + GLX_RGBA, GLX_USE_GL, + GLX_RED_SIZE, 4, + GLX_GREEN_SIZE, 4, + GLX_BLUE_SIZE, 4, + GLX_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0, + GLX_DEPTH_SIZE, CreationParams.ZBufferBits, + GLX_STENCIL_SIZE, CreationParams.Stencilbuffer?1:0, // 12,13 + // The following attributes have no flags, but are + // either present or not. As a no-op we use + // GLX_USE_GL, which is silently ignored by glXChooseVisual + CreationParams.Doublebuffer?GLX_DOUBLEBUFFER:GLX_USE_GL, // 14 + CreationParams.Stereobuffer?GLX_STEREO:GLX_USE_GL, // 15 +//#ifdef GL_ARB_framebuffer_sRGB +// CreationParams.HandleSRGB?GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB:GLX_USE_GL, +//#elif defined(GL_EXT_framebuffer_sRGB) +// CreationParams.HandleSRGB?GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT:GLX_USE_GL, +//#endif + None + }; + + visual=glXChooseVisual(display, screennr, visualAttrBuffer); + if (!visual) + { + if (CreationParams.Stencilbuffer) + os::Printer::log("No stencilbuffer available, disabling.", ELL_WARNING); + CreationParams.Stencilbuffer = !CreationParams.Stencilbuffer; + visualAttrBuffer[13]=CreationParams.Stencilbuffer?1:0; + + visual=glXChooseVisual(display, screennr, visualAttrBuffer); + if (!visual && CreationParams.Doublebuffer) + { + os::Printer::log("No doublebuffering available.", ELL_WARNING); + CreationParams.Doublebuffer=false; + visualAttrBuffer[14] = GLX_USE_GL; + visual=glXChooseVisual(display, screennr, visualAttrBuffer); + } + } + } + } + else + os::Printer::log("No GLX support available. OpenGL driver will not work.", ELL_WARNING); + } + // don't use the XVisual with OpenGL, because it ignores all requested + // properties of the CreationParams + else if (!visual) +#endif // _IRR_COMPILE_WITH_OPENGL_ + + // create visual with standard X methods + { + os::Printer::log("Using plain X visual"); + XVisualInfo visTempl; //Template to hold requested values + int visNumber; // Return value of available visuals + + visTempl.screen = screennr; + // ARGB visuals should be avoided for usual applications + visTempl.depth = CreationParams.WithAlphaChannel?32:24; + while ((!visual) && (visTempl.depth>=16)) + { + visual = XGetVisualInfo(display, VisualScreenMask|VisualDepthMask, + &visTempl, &visNumber); + visTempl.depth -= 8; + } + } + + if (!visual) + { + os::Printer::log("Fatal error, could not get visual.", ELL_ERROR); + XCloseDisplay(display); + display=0; + return false; + } +#ifdef _DEBUG + else + os::Printer::log("Visual chosen: ", core::stringc(static_cast<u32>(visual->visualid)).c_str(), ELL_DEBUG); +#endif + + // create color map + Colormap colormap; + colormap = XCreateColormap(display, + RootWindow(display, visual->screen), + visual->visual, AllocNone); + + attributes.colormap = colormap; + attributes.border_pixel = 0; + attributes.event_mask = StructureNotifyMask | FocusChangeMask | ExposureMask; + if (!CreationParams.IgnoreInput) + attributes.event_mask |= PointerMotionMask | + ButtonPressMask | KeyPressMask | + ButtonReleaseMask | KeyReleaseMask; + + if (!CreationParams.WindowId) + { + // create new Window + // Remove window manager decoration in fullscreen + attributes.override_redirect = CreationParams.Fullscreen; + window = XCreateWindow(display, + RootWindow(display, visual->screen), + 0, 0, Width, Height, 0, visual->depth, + InputOutput, visual->visual, + CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect, + &attributes); + XMapRaised(display, window); + CreationParams.WindowId = (void*)window; + Atom wmDelete; + wmDelete = XInternAtom(display, wmDeleteWindow, True); + XSetWMProtocols(display, window, &wmDelete, 1); + if (CreationParams.Fullscreen) + { + XSetInputFocus(display, window, RevertToParent, CurrentTime); + int grabKb = XGrabKeyboard(display, window, True, GrabModeAsync, + GrabModeAsync, CurrentTime); + IrrPrintXGrabError(grabKb, "XGrabKeyboard"); + int grabPointer = XGrabPointer(display, window, True, ButtonPressMask, + GrabModeAsync, GrabModeAsync, window, None, CurrentTime); + IrrPrintXGrabError(grabPointer, "XGrabPointer"); + XWarpPointer(display, None, window, 0, 0, 0, 0, 0, 0); + } + } + else + { + // attach external window + window = (Window)CreationParams.WindowId; + if (!CreationParams.IgnoreInput) + { + XCreateWindow(display, + window, + 0, 0, Width, Height, 0, visual->depth, + InputOutput, visual->visual, + CWBorderPixel | CWColormap | CWEventMask, + &attributes); + } + XWindowAttributes wa; + XGetWindowAttributes(display, window, &wa); + CreationParams.WindowSize.Width = wa.width; + CreationParams.WindowSize.Height = wa.height; + CreationParams.Fullscreen = false; + ExternalWindow = true; + } + + WindowMinimized=false; + // Currently broken in X, see Bug ID 2795321 + // XkbSetDetectableAutoRepeat(display, True, &AutorepeatSupport); + +#ifdef _IRR_COMPILE_WITH_OPENGL_ + + // connect glx context to window + Context=0; + if (isAvailableGLX && CreationParams.DriverType==video::EDT_OPENGL) + { +// onefang changes start +// if (UseGLXWindow) + if (CreationParams.VideoData) + Context = (GLXContext) CreationParams.VideoData->OpenGLLinux.X11Context; + if (Context) + { + if (!glXMakeCurrent(display, window, Context)) + { + os::Printer::log("Could not make context current.", ELL_WARNING); + glXDestroyContext(display, Context); + } + } + else if (UseGLXWindow) +// onefang changes end + { + glxWin=glXCreateWindow(display,glxFBConfig,window,NULL); + if (glxWin) + { + // create glx context + Context = glXCreateNewContext(display, glxFBConfig, GLX_RGBA_TYPE, NULL, True); + if (Context) + { + if (!glXMakeContextCurrent(display, glxWin, glxWin, Context)) + { + os::Printer::log("Could not make context current.", ELL_WARNING); + glXDestroyContext(display, Context); + } + } + else + { + os::Printer::log("Could not create GLX rendering context.", ELL_WARNING); + } + } + else + { + os::Printer::log("Could not create GLX window.", ELL_WARNING); + } + } + else + { + Context = glXCreateContext(display, visual, NULL, True); + if (Context) + { + if (!glXMakeCurrent(display, window, Context)) + { + os::Printer::log("Could not make context current.", ELL_WARNING); + glXDestroyContext(display, Context); + } + } + else + { + os::Printer::log("Could not create GLX rendering context.", ELL_WARNING); + } + } + } +#endif // _IRR_COMPILE_WITH_OPENGL_ + + Window tmp; + u32 borderWidth; + int x,y; + unsigned int bits; + + XGetGeometry(display, window, &tmp, &x, &y, &Width, &Height, &borderWidth, &bits); + CreationParams.Bits = bits; + CreationParams.WindowSize.Width = Width; + CreationParams.WindowSize.Height = Height; + + StdHints = XAllocSizeHints(); + long num; + XGetWMNormalHints(display, window, StdHints, &num); + + // create an XImage for the software renderer + //(thx to Nadav for some clues on how to do that!) + + if (CreationParams.DriverType == video::EDT_SOFTWARE || CreationParams.DriverType == video::EDT_BURNINGSVIDEO) + { + SoftwareImage = XCreateImage(display, + visual->visual, visual->depth, + ZPixmap, 0, 0, Width, Height, + BitmapPad(display), 0); + + // use malloc because X will free it later on + if (SoftwareImage) + SoftwareImage->data = (char*) malloc(SoftwareImage->bytes_per_line * SoftwareImage->height * sizeof(char)); + } + + initXAtoms(); + +#endif // #ifdef _IRR_COMPILE_WITH_X11_ + return true; +} + + +//! create the driver +void CIrrDeviceLinux::createDriver() +{ + switch(CreationParams.DriverType) + { +#ifdef _IRR_COMPILE_WITH_X11_ + + case video::EDT_SOFTWARE: + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + #else + os::Printer::log("No Software driver support compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_OPENGL: + #ifdef _IRR_COMPILE_WITH_OPENGL_ + if (Context) + VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("No OpenGL support compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_DIRECT3D8: + case video::EDT_DIRECT3D9: + os::Printer::log("This driver is not available in Linux. Try OpenGL or Software renderer.", + ELL_ERROR); + break; + + case video::EDT_NULL: + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + + default: + os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR); + break; +#else + case video::EDT_NULL: + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + default: + os::Printer::log("No X11 support compiled in. Only Null driver available.", ELL_ERROR); + break; +#endif + } +} + + +//! runs the device. Returns false if device wants to be deleted +bool CIrrDeviceLinux::run() +{ + os::Timer::tick(); + +#ifdef _IRR_COMPILE_WITH_X11_ + + if ( CursorControl ) + static_cast<CCursorControl*>(CursorControl)->update(); + + if ((CreationParams.DriverType != video::EDT_NULL) && display) + { + SEvent irrevent; + irrevent.MouseInput.ButtonStates = 0xffffffff; + + while (XPending(display) > 0 && !Close) + { + XEvent event; + XNextEvent(display, &event); + + switch (event.type) + { + case ConfigureNotify: + // check for changed window size + if ((event.xconfigure.width != (int) Width) || + (event.xconfigure.height != (int) Height)) + { + Width = event.xconfigure.width; + Height = event.xconfigure.height; + + // resize image data + if (SoftwareImage) + { + XDestroyImage(SoftwareImage); + + SoftwareImage = XCreateImage(display, + visual->visual, visual->depth, + ZPixmap, 0, 0, Width, Height, + BitmapPad(display), 0); + + // use malloc because X will free it later on + if (SoftwareImage) + SoftwareImage->data = (char*) malloc(SoftwareImage->bytes_per_line * SoftwareImage->height * sizeof(char)); + } + + if (VideoDriver) + VideoDriver->OnResize(core::dimension2d<u32>(Width, Height)); + } + break; + + case MapNotify: + WindowMinimized=false; + break; + + case UnmapNotify: + WindowMinimized=true; + break; + + case FocusIn: + WindowHasFocus=true; + break; + + case FocusOut: + WindowHasFocus=false; + break; + + case MotionNotify: + irrevent.EventType = irr::EET_MOUSE_INPUT_EVENT; + irrevent.MouseInput.Event = irr::EMIE_MOUSE_MOVED; + irrevent.MouseInput.X = event.xbutton.x; + irrevent.MouseInput.Y = event.xbutton.y; + irrevent.MouseInput.Control = (event.xkey.state & ControlMask) != 0; + irrevent.MouseInput.Shift = (event.xkey.state & ShiftMask) != 0; + + // mouse button states + irrevent.MouseInput.ButtonStates = (event.xbutton.state & Button1Mask) ? irr::EMBSM_LEFT : 0; + irrevent.MouseInput.ButtonStates |= (event.xbutton.state & Button3Mask) ? irr::EMBSM_RIGHT : 0; + irrevent.MouseInput.ButtonStates |= (event.xbutton.state & Button2Mask) ? irr::EMBSM_MIDDLE : 0; + + postEventFromUser(irrevent); + break; + + case ButtonPress: + case ButtonRelease: + + irrevent.EventType = irr::EET_MOUSE_INPUT_EVENT; + irrevent.MouseInput.X = event.xbutton.x; + irrevent.MouseInput.Y = event.xbutton.y; + irrevent.MouseInput.Control = (event.xkey.state & ControlMask) != 0; + irrevent.MouseInput.Shift = (event.xkey.state & ShiftMask) != 0; + + // mouse button states + // This sets the state which the buttons had _prior_ to the event. + // So unlike on Windows the button which just got changed has still the old state here. + // We handle that below by flipping the corresponding bit later. + irrevent.MouseInput.ButtonStates = (event.xbutton.state & Button1Mask) ? irr::EMBSM_LEFT : 0; + irrevent.MouseInput.ButtonStates |= (event.xbutton.state & Button3Mask) ? irr::EMBSM_RIGHT : 0; + irrevent.MouseInput.ButtonStates |= (event.xbutton.state & Button2Mask) ? irr::EMBSM_MIDDLE : 0; + + irrevent.MouseInput.Event = irr::EMIE_COUNT; + + switch(event.xbutton.button) + { + case Button1: + irrevent.MouseInput.Event = + (event.type == ButtonPress) ? irr::EMIE_LMOUSE_PRESSED_DOWN : irr::EMIE_LMOUSE_LEFT_UP; + irrevent.MouseInput.ButtonStates ^= irr::EMBSM_LEFT; + break; + + case Button3: + irrevent.MouseInput.Event = + (event.type == ButtonPress) ? irr::EMIE_RMOUSE_PRESSED_DOWN : irr::EMIE_RMOUSE_LEFT_UP; + irrevent.MouseInput.ButtonStates ^= irr::EMBSM_RIGHT; + break; + + case Button2: + irrevent.MouseInput.Event = + (event.type == ButtonPress) ? irr::EMIE_MMOUSE_PRESSED_DOWN : irr::EMIE_MMOUSE_LEFT_UP; + irrevent.MouseInput.ButtonStates ^= irr::EMBSM_MIDDLE; + break; + + case Button4: + if (event.type == ButtonPress) + { + irrevent.MouseInput.Event = EMIE_MOUSE_WHEEL; + irrevent.MouseInput.Wheel = 1.0f; + } + break; + + case Button5: + if (event.type == ButtonPress) + { + irrevent.MouseInput.Event = EMIE_MOUSE_WHEEL; + irrevent.MouseInput.Wheel = -1.0f; + } + break; + } + + if (irrevent.MouseInput.Event != irr::EMIE_COUNT) + { + postEventFromUser(irrevent); + + if ( irrevent.MouseInput.Event >= EMIE_LMOUSE_PRESSED_DOWN && irrevent.MouseInput.Event <= EMIE_MMOUSE_PRESSED_DOWN ) + { + u32 clicks = checkSuccessiveClicks(irrevent.MouseInput.X, irrevent.MouseInput.Y, irrevent.MouseInput.Event); + if ( clicks == 2 ) + { + irrevent.MouseInput.Event = (EMOUSE_INPUT_EVENT)(EMIE_LMOUSE_DOUBLE_CLICK + irrevent.MouseInput.Event-EMIE_LMOUSE_PRESSED_DOWN); + postEventFromUser(irrevent); + } + else if ( clicks == 3 ) + { + irrevent.MouseInput.Event = (EMOUSE_INPUT_EVENT)(EMIE_LMOUSE_TRIPLE_CLICK + irrevent.MouseInput.Event-EMIE_LMOUSE_PRESSED_DOWN); + postEventFromUser(irrevent); + } + } + } + break; + + case MappingNotify: + XRefreshKeyboardMapping (&event.xmapping) ; + break; + + case KeyRelease: + if (0 == AutorepeatSupport && (XPending( display ) > 0) ) + { + // check for Autorepeat manually + // We'll do the same as Windows does: Only send KeyPressed + // So every KeyRelease is a real release + XEvent next_event; + XPeekEvent (event.xkey.display, &next_event); + if ((next_event.type == KeyPress) && + (next_event.xkey.keycode == event.xkey.keycode) && + (next_event.xkey.time - event.xkey.time) < 2) // usually same time, but on some systems a difference of 1 is possible + { + /* Ignore the key release event */ + break; + } + } + // fall-through in case the release should be handled + case KeyPress: + { + SKeyMap mp; + char buf[8]={0}; + XLookupString(&event.xkey, buf, sizeof(buf), &mp.X11Key, NULL); + + irrevent.EventType = irr::EET_KEY_INPUT_EVENT; + irrevent.KeyInput.PressedDown = (event.type == KeyPress); +// mbtowc(&irrevent.KeyInput.Char, buf, sizeof(buf)); + irrevent.KeyInput.Char = ((wchar_t*)(buf))[0]; + irrevent.KeyInput.Control = (event.xkey.state & ControlMask) != 0; + irrevent.KeyInput.Shift = (event.xkey.state & ShiftMask) != 0; + + event.xkey.state = 0; // ignore shift-ctrl states for figuring out the key + XLookupString(&event.xkey, buf, sizeof(buf), &mp.X11Key, NULL); + const s32 idx = KeyMap.binary_search(mp); + if (idx != -1) + { + irrevent.KeyInput.Key = (EKEY_CODE)KeyMap[idx].Win32Key; + } + else + { + irrevent.KeyInput.Key = (EKEY_CODE)0; + } + if (irrevent.KeyInput.Key == 0) + { + // 1:1 mapping to windows-keys would require testing for keyboard type (us, ger, ...) + // So unless we do that we will have some unknown keys here. + if (idx == -1) + { + os::Printer::log("Could not find EKEY_CODE, using orig. X11 keycode instead", core::stringc(event.xkey.keycode).c_str(), ELL_INFORMATION); + } + else + { + os::Printer::log("EKEY_CODE is 0, using orig. X11 keycode instead", core::stringc(event.xkey.keycode).c_str(), ELL_INFORMATION); + } + // Any value is better than none, that allows at least using the keys. + // Worst case is that some keys will be identical, still better than _all_ + // unknown keys being identical. + irrevent.KeyInput.Key = (EKEY_CODE)event.xkey.keycode; + } + + postEventFromUser(irrevent); + } + break; + + case ClientMessage: + { + char *atom = XGetAtomName(display, event.xclient.message_type); + if (*atom == *wmDeleteWindow) + { + os::Printer::log("Quit message received.", ELL_INFORMATION); + Close = true; + } + else + { + // we assume it's a user message + irrevent.EventType = irr::EET_USER_EVENT; + irrevent.UserEvent.UserData1 = (s32)event.xclient.data.l[0]; + irrevent.UserEvent.UserData2 = (s32)event.xclient.data.l[1]; + postEventFromUser(irrevent); + } + XFree(atom); + } + break; + + case SelectionRequest: + { + XEvent respond; + XSelectionRequestEvent *req = &(event.xselectionrequest); + if ( req->target == XA_STRING) + { + XChangeProperty (display, + req->requestor, + req->property, req->target, + 8, // format + PropModeReplace, + (unsigned char*) Clipboard.c_str(), + Clipboard.size()); + respond.xselection.property = req->property; + } + else if ( req->target == X_ATOM_TARGETS ) + { + long data[2]; + + data[0] = X_ATOM_TEXT; + data[1] = XA_STRING; + + XChangeProperty (display, req->requestor, + req->property, req->target, + 8, PropModeReplace, + (unsigned char *) &data, + sizeof (data)); + respond.xselection.property = req->property; + } + else + { + respond.xselection.property= None; + } + respond.xselection.type= SelectionNotify; + respond.xselection.display= req->display; + respond.xselection.requestor= req->requestor; + respond.xselection.selection=req->selection; + respond.xselection.target= req->target; + respond.xselection.time = req->time; + XSendEvent (display, req->requestor,0,0,&respond); + XFlush (display); + } + break; + + default: + break; + } // end switch + + } // end while + } +#endif //_IRR_COMPILE_WITH_X11_ + + if (!Close) + pollJoysticks(); + + return !Close; +} + + +//! Pause the current process for the minimum time allowed only to allow other processes to execute +void CIrrDeviceLinux::yield() +{ + struct timespec ts = {0,1}; + nanosleep(&ts, NULL); +} + + +//! Pause execution and let other processes to run for a specified amount of time. +void CIrrDeviceLinux::sleep(u32 timeMs, bool pauseTimer=false) +{ + const bool wasStopped = Timer ? Timer->isStopped() : true; + + struct timespec ts; + ts.tv_sec = (time_t) (timeMs / 1000); + ts.tv_nsec = (long) (timeMs % 1000) * 1000000; + + if (pauseTimer && !wasStopped) + Timer->stop(); + + nanosleep(&ts, NULL); + + if (pauseTimer && !wasStopped) + Timer->start(); +} + + +//! sets the caption of the window +void CIrrDeviceLinux::setWindowCaption(const wchar_t* text) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (CreationParams.DriverType == video::EDT_NULL) + return; + + XTextProperty txt; + if (Success==XwcTextListToTextProperty(display, const_cast<wchar_t**>(&text), + 1, XStdICCTextStyle, &txt)) + { + XSetWMName(display, window, &txt); + XSetWMIconName(display, window, &txt); + XFree(txt.value); + } +#endif +} + + +//! presents a surface in the client area +bool CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s32>* srcRect) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + // this is only necessary for software drivers. + if (!SoftwareImage) + return true; + + // thx to Nadav, who send me some clues of how to display the image + // to the X Server. + + const u32 destwidth = SoftwareImage->width; + const u32 minWidth = core::min_(image->getDimension().Width, destwidth); + const u32 destPitch = SoftwareImage->bytes_per_line; + + video::ECOLOR_FORMAT destColor; + switch (SoftwareImage->bits_per_pixel) + { + case 16: + if (SoftwareImage->depth==16) + destColor = video::ECF_R5G6B5; + else + destColor = video::ECF_A1R5G5B5; + break; + case 24: destColor = video::ECF_R8G8B8; break; + case 32: destColor = video::ECF_A8R8G8B8; break; + default: + os::Printer::log("Unsupported screen depth."); + return false; + } + + u8* srcdata = reinterpret_cast<u8*>(image->lock()); + u8* destData = reinterpret_cast<u8*>(SoftwareImage->data); + + const u32 destheight = SoftwareImage->height; + const u32 srcheight = core::min_(image->getDimension().Height, destheight); + const u32 srcPitch = image->getPitch(); + for (u32 y=0; y!=srcheight; ++y) + { + video::CColorConverter::convert_viaFormat(srcdata,image->getColorFormat(), minWidth, destData, destColor); + srcdata+=srcPitch; + destData+=destPitch; + } + image->unlock(); + + GC gc = DefaultGC(display, DefaultScreen(display)); + Window myWindow=window; + if (windowId) + myWindow = reinterpret_cast<Window>(windowId); + XPutImage(display, myWindow, gc, SoftwareImage, 0, 0, 0, 0, destwidth, destheight); +#endif + return true; +} + + +//! notifies the device that it should close itself +void CIrrDeviceLinux::closeDevice() +{ + Close = true; +} + + +//! returns if window is active. if not, nothing need to be drawn +bool CIrrDeviceLinux::isWindowActive() const +{ + return (WindowHasFocus && !WindowMinimized); +} + + +//! returns if window has focus. +bool CIrrDeviceLinux::isWindowFocused() const +{ + return WindowHasFocus; +} + + +//! returns if window is minimized. +bool CIrrDeviceLinux::isWindowMinimized() const +{ + return WindowMinimized; +} + + +//! returns color format of the window. +video::ECOLOR_FORMAT CIrrDeviceLinux::getColorFormat() const +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (visual && (visual->depth != 16)) + return video::ECF_R8G8B8; + else +#endif + return video::ECF_R5G6B5; +} + + +//! Sets if the window should be resizable in windowed mode. +void CIrrDeviceLinux::setResizable(bool resize) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (CreationParams.DriverType == video::EDT_NULL || CreationParams.Fullscreen ) + return; + + XUnmapWindow(display, window); + if ( !resize ) + { + // Must be heap memory because data size depends on X Server + XSizeHints *hints = XAllocSizeHints(); + hints->flags=PSize|PMinSize|PMaxSize; + hints->min_width=hints->max_width=hints->base_width=Width; + hints->min_height=hints->max_height=hints->base_height=Height; + XSetWMNormalHints(display, window, hints); + XFree(hints); + } + else + { + XSetWMNormalHints(display, window, StdHints); + } + XMapWindow(display, window); + XFlush(display); +#endif // #ifdef _IRR_COMPILE_WITH_X11_ +} + + +//! Return pointer to a list with all video modes supported by the gfx adapter. +video::IVideoModeList* CIrrDeviceLinux::getVideoModeList() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (!VideoModeList->getVideoModeCount()) + { + bool temporaryDisplay = false; + + if (!display) + { + display = XOpenDisplay(0); + temporaryDisplay=true; + } + if (display) + { + #if defined(_IRR_LINUX_X11_VIDMODE_) || defined(_IRR_LINUX_X11_RANDR_) + s32 eventbase, errorbase; + s32 defaultDepth=DefaultDepth(display,screennr); + #endif + + #ifdef _IRR_LINUX_X11_VIDMODE_ + if (XF86VidModeQueryExtension(display, &eventbase, &errorbase)) + { + // enumerate video modes + int modeCount; + XF86VidModeModeInfo** modes; + + XF86VidModeGetAllModeLines(display, screennr, &modeCount, &modes); + + // save current video mode + oldVideoMode = *modes[0]; + + // find fitting mode + + VideoModeList->setDesktop(defaultDepth, core::dimension2d<u32>( + modes[0]->hdisplay, modes[0]->vdisplay)); + for (int i = 0; i<modeCount; ++i) + { + VideoModeList->addMode(core::dimension2d<u32>( + modes[i]->hdisplay, modes[i]->vdisplay), defaultDepth); + } + XFree(modes); + } + else + #endif + #ifdef _IRR_LINUX_X11_RANDR_ + if (XRRQueryExtension(display, &eventbase, &errorbase)) + { + int modeCount; + XRRScreenConfiguration *config=XRRGetScreenInfo(display,DefaultRootWindow(display)); + oldRandrMode=XRRConfigCurrentConfiguration(config,&oldRandrRotation); + XRRScreenSize *modes=XRRConfigSizes(config,&modeCount); + VideoModeList->setDesktop(defaultDepth, core::dimension2d<u32>( + modes[oldRandrMode].width, modes[oldRandrMode].height)); + for (int i = 0; i<modeCount; ++i) + { + VideoModeList->addMode(core::dimension2d<u32>( + modes[i].width, modes[i].height), defaultDepth); + } + XRRFreeScreenConfigInfo(config); + } + else + #endif + { + os::Printer::log("VidMode or RandR X11 extension requireed for VideoModeList." , ELL_WARNING); + } + } + if (display && temporaryDisplay) + { + XCloseDisplay(display); + display=0; + } + } +#endif + + return VideoModeList; +} + + +//! Minimize window +void CIrrDeviceLinux::minimizeWindow() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + XIconifyWindow(display, window, screennr); +#endif +} + + +//! Maximize window +void CIrrDeviceLinux::maximizeWindow() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + XMapWindow(display, window); +#endif +} + + +//! Restore original window size +void CIrrDeviceLinux::restoreWindow() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + XMapWindow(display, window); +#endif +} + + +void CIrrDeviceLinux::createKeyMap() +{ + // I don't know if this is the best method to create + // the lookuptable, but I'll leave it like that until + // I find a better version. + +#ifdef _IRR_COMPILE_WITH_X11_ + KeyMap.reallocate(84); + KeyMap.push_back(SKeyMap(XK_BackSpace, KEY_BACK)); + KeyMap.push_back(SKeyMap(XK_Tab, KEY_TAB)); + KeyMap.push_back(SKeyMap(XK_ISO_Left_Tab, KEY_TAB)); + KeyMap.push_back(SKeyMap(XK_Linefeed, 0)); // ??? + KeyMap.push_back(SKeyMap(XK_Clear, KEY_CLEAR)); + KeyMap.push_back(SKeyMap(XK_Return, KEY_RETURN)); + KeyMap.push_back(SKeyMap(XK_Pause, KEY_PAUSE)); + KeyMap.push_back(SKeyMap(XK_Scroll_Lock, KEY_SCROLL)); + KeyMap.push_back(SKeyMap(XK_Sys_Req, 0)); // ??? + KeyMap.push_back(SKeyMap(XK_Escape, KEY_ESCAPE)); + KeyMap.push_back(SKeyMap(XK_Insert, KEY_INSERT)); + KeyMap.push_back(SKeyMap(XK_Delete, KEY_DELETE)); + KeyMap.push_back(SKeyMap(XK_Home, KEY_HOME)); + KeyMap.push_back(SKeyMap(XK_Left, KEY_LEFT)); + KeyMap.push_back(SKeyMap(XK_Up, KEY_UP)); + KeyMap.push_back(SKeyMap(XK_Right, KEY_RIGHT)); + KeyMap.push_back(SKeyMap(XK_Down, KEY_DOWN)); + KeyMap.push_back(SKeyMap(XK_Prior, KEY_PRIOR)); + KeyMap.push_back(SKeyMap(XK_Page_Up, KEY_PRIOR)); + KeyMap.push_back(SKeyMap(XK_Next, KEY_NEXT)); + KeyMap.push_back(SKeyMap(XK_Page_Down, KEY_NEXT)); + KeyMap.push_back(SKeyMap(XK_End, KEY_END)); + KeyMap.push_back(SKeyMap(XK_Begin, KEY_HOME)); + KeyMap.push_back(SKeyMap(XK_Num_Lock, KEY_NUMLOCK)); + KeyMap.push_back(SKeyMap(XK_KP_Space, KEY_SPACE)); + KeyMap.push_back(SKeyMap(XK_KP_Tab, KEY_TAB)); + KeyMap.push_back(SKeyMap(XK_KP_Enter, KEY_RETURN)); + KeyMap.push_back(SKeyMap(XK_KP_F1, KEY_F1)); + KeyMap.push_back(SKeyMap(XK_KP_F2, KEY_F2)); + KeyMap.push_back(SKeyMap(XK_KP_F3, KEY_F3)); + KeyMap.push_back(SKeyMap(XK_KP_F4, KEY_F4)); + KeyMap.push_back(SKeyMap(XK_KP_Home, KEY_HOME)); + KeyMap.push_back(SKeyMap(XK_KP_Left, KEY_LEFT)); + KeyMap.push_back(SKeyMap(XK_KP_Up, KEY_UP)); + KeyMap.push_back(SKeyMap(XK_KP_Right, KEY_RIGHT)); + KeyMap.push_back(SKeyMap(XK_KP_Down, KEY_DOWN)); + KeyMap.push_back(SKeyMap(XK_Print, KEY_PRINT)); + KeyMap.push_back(SKeyMap(XK_KP_Prior, KEY_PRIOR)); + KeyMap.push_back(SKeyMap(XK_KP_Page_Up, KEY_PRIOR)); + KeyMap.push_back(SKeyMap(XK_KP_Next, KEY_NEXT)); + KeyMap.push_back(SKeyMap(XK_KP_Page_Down, KEY_NEXT)); + KeyMap.push_back(SKeyMap(XK_KP_End, KEY_END)); + KeyMap.push_back(SKeyMap(XK_KP_Begin, KEY_HOME)); + KeyMap.push_back(SKeyMap(XK_KP_Insert, KEY_INSERT)); + KeyMap.push_back(SKeyMap(XK_KP_Delete, KEY_DELETE)); + KeyMap.push_back(SKeyMap(XK_KP_Equal, 0)); // ??? + KeyMap.push_back(SKeyMap(XK_KP_Multiply, KEY_MULTIPLY)); + KeyMap.push_back(SKeyMap(XK_KP_Add, KEY_ADD)); + KeyMap.push_back(SKeyMap(XK_KP_Separator, KEY_SEPARATOR)); + KeyMap.push_back(SKeyMap(XK_KP_Subtract, KEY_SUBTRACT)); + KeyMap.push_back(SKeyMap(XK_KP_Decimal, KEY_DECIMAL)); + KeyMap.push_back(SKeyMap(XK_KP_Divide, KEY_DIVIDE)); + KeyMap.push_back(SKeyMap(XK_KP_0, KEY_KEY_0)); + KeyMap.push_back(SKeyMap(XK_KP_1, KEY_KEY_1)); + KeyMap.push_back(SKeyMap(XK_KP_2, KEY_KEY_2)); + KeyMap.push_back(SKeyMap(XK_KP_3, KEY_KEY_3)); + KeyMap.push_back(SKeyMap(XK_KP_4, KEY_KEY_4)); + KeyMap.push_back(SKeyMap(XK_KP_5, KEY_KEY_5)); + KeyMap.push_back(SKeyMap(XK_KP_6, KEY_KEY_6)); + KeyMap.push_back(SKeyMap(XK_KP_7, KEY_KEY_7)); + KeyMap.push_back(SKeyMap(XK_KP_8, KEY_KEY_8)); + KeyMap.push_back(SKeyMap(XK_KP_9, KEY_KEY_9)); + KeyMap.push_back(SKeyMap(XK_F1, KEY_F1)); + KeyMap.push_back(SKeyMap(XK_F2, KEY_F2)); + KeyMap.push_back(SKeyMap(XK_F3, KEY_F3)); + KeyMap.push_back(SKeyMap(XK_F4, KEY_F4)); + KeyMap.push_back(SKeyMap(XK_F5, KEY_F5)); + KeyMap.push_back(SKeyMap(XK_F6, KEY_F6)); + KeyMap.push_back(SKeyMap(XK_F7, KEY_F7)); + KeyMap.push_back(SKeyMap(XK_F8, KEY_F8)); + KeyMap.push_back(SKeyMap(XK_F9, KEY_F9)); + KeyMap.push_back(SKeyMap(XK_F10, KEY_F10)); + KeyMap.push_back(SKeyMap(XK_F11, KEY_F11)); + KeyMap.push_back(SKeyMap(XK_F12, KEY_F12)); + KeyMap.push_back(SKeyMap(XK_Shift_L, KEY_LSHIFT)); + KeyMap.push_back(SKeyMap(XK_Shift_R, KEY_RSHIFT)); + KeyMap.push_back(SKeyMap(XK_Control_L, KEY_LCONTROL)); + KeyMap.push_back(SKeyMap(XK_Control_R, KEY_RCONTROL)); + KeyMap.push_back(SKeyMap(XK_Caps_Lock, KEY_CAPITAL)); + KeyMap.push_back(SKeyMap(XK_Shift_Lock, KEY_CAPITAL)); + KeyMap.push_back(SKeyMap(XK_Meta_L, KEY_LWIN)); + KeyMap.push_back(SKeyMap(XK_Meta_R, KEY_RWIN)); + KeyMap.push_back(SKeyMap(XK_Alt_L, KEY_LMENU)); + KeyMap.push_back(SKeyMap(XK_Alt_R, KEY_RMENU)); + KeyMap.push_back(SKeyMap(XK_ISO_Level3_Shift, KEY_RMENU)); + KeyMap.push_back(SKeyMap(XK_Menu, KEY_MENU)); + KeyMap.push_back(SKeyMap(XK_space, KEY_SPACE)); + KeyMap.push_back(SKeyMap(XK_exclam, 0)); //? + KeyMap.push_back(SKeyMap(XK_quotedbl, 0)); //? + KeyMap.push_back(SKeyMap(XK_section, 0)); //? + KeyMap.push_back(SKeyMap(XK_numbersign, KEY_OEM_2)); + KeyMap.push_back(SKeyMap(XK_dollar, 0)); //? + KeyMap.push_back(SKeyMap(XK_percent, 0)); //? + KeyMap.push_back(SKeyMap(XK_ampersand, 0)); //? + KeyMap.push_back(SKeyMap(XK_apostrophe, KEY_OEM_7)); + KeyMap.push_back(SKeyMap(XK_parenleft, 0)); //? + KeyMap.push_back(SKeyMap(XK_parenright, 0)); //? + KeyMap.push_back(SKeyMap(XK_asterisk, 0)); //? + KeyMap.push_back(SKeyMap(XK_plus, KEY_PLUS)); //? + KeyMap.push_back(SKeyMap(XK_comma, KEY_COMMA)); //? + KeyMap.push_back(SKeyMap(XK_minus, KEY_MINUS)); //? + KeyMap.push_back(SKeyMap(XK_period, KEY_PERIOD)); //? + KeyMap.push_back(SKeyMap(XK_slash, KEY_OEM_2)); //? + KeyMap.push_back(SKeyMap(XK_0, KEY_KEY_0)); + KeyMap.push_back(SKeyMap(XK_1, KEY_KEY_1)); + KeyMap.push_back(SKeyMap(XK_2, KEY_KEY_2)); + KeyMap.push_back(SKeyMap(XK_3, KEY_KEY_3)); + KeyMap.push_back(SKeyMap(XK_4, KEY_KEY_4)); + KeyMap.push_back(SKeyMap(XK_5, KEY_KEY_5)); + KeyMap.push_back(SKeyMap(XK_6, KEY_KEY_6)); + KeyMap.push_back(SKeyMap(XK_7, KEY_KEY_7)); + KeyMap.push_back(SKeyMap(XK_8, KEY_KEY_8)); + KeyMap.push_back(SKeyMap(XK_9, KEY_KEY_9)); + KeyMap.push_back(SKeyMap(XK_colon, 0)); //? + KeyMap.push_back(SKeyMap(XK_semicolon, KEY_OEM_1)); + KeyMap.push_back(SKeyMap(XK_less, KEY_OEM_102)); + KeyMap.push_back(SKeyMap(XK_equal, KEY_PLUS)); + KeyMap.push_back(SKeyMap(XK_greater, 0)); //? + KeyMap.push_back(SKeyMap(XK_question, 0)); //? + KeyMap.push_back(SKeyMap(XK_at, KEY_KEY_2)); //? + KeyMap.push_back(SKeyMap(XK_mu, 0)); //? + KeyMap.push_back(SKeyMap(XK_EuroSign, 0)); //? + KeyMap.push_back(SKeyMap(XK_A, KEY_KEY_A)); + KeyMap.push_back(SKeyMap(XK_B, KEY_KEY_B)); + KeyMap.push_back(SKeyMap(XK_C, KEY_KEY_C)); + KeyMap.push_back(SKeyMap(XK_D, KEY_KEY_D)); + KeyMap.push_back(SKeyMap(XK_E, KEY_KEY_E)); + KeyMap.push_back(SKeyMap(XK_F, KEY_KEY_F)); + KeyMap.push_back(SKeyMap(XK_G, KEY_KEY_G)); + KeyMap.push_back(SKeyMap(XK_H, KEY_KEY_H)); + KeyMap.push_back(SKeyMap(XK_I, KEY_KEY_I)); + KeyMap.push_back(SKeyMap(XK_J, KEY_KEY_J)); + KeyMap.push_back(SKeyMap(XK_K, KEY_KEY_K)); + KeyMap.push_back(SKeyMap(XK_L, KEY_KEY_L)); + KeyMap.push_back(SKeyMap(XK_M, KEY_KEY_M)); + KeyMap.push_back(SKeyMap(XK_N, KEY_KEY_N)); + KeyMap.push_back(SKeyMap(XK_O, KEY_KEY_O)); + KeyMap.push_back(SKeyMap(XK_P, KEY_KEY_P)); + KeyMap.push_back(SKeyMap(XK_Q, KEY_KEY_Q)); + KeyMap.push_back(SKeyMap(XK_R, KEY_KEY_R)); + KeyMap.push_back(SKeyMap(XK_S, KEY_KEY_S)); + KeyMap.push_back(SKeyMap(XK_T, KEY_KEY_T)); + KeyMap.push_back(SKeyMap(XK_U, KEY_KEY_U)); + KeyMap.push_back(SKeyMap(XK_V, KEY_KEY_V)); + KeyMap.push_back(SKeyMap(XK_W, KEY_KEY_W)); + KeyMap.push_back(SKeyMap(XK_X, KEY_KEY_X)); + KeyMap.push_back(SKeyMap(XK_Y, KEY_KEY_Y)); + KeyMap.push_back(SKeyMap(XK_Z, KEY_KEY_Z)); + KeyMap.push_back(SKeyMap(XK_bracketleft, KEY_OEM_4)); + KeyMap.push_back(SKeyMap(XK_backslash, KEY_OEM_5)); + KeyMap.push_back(SKeyMap(XK_bracketright, KEY_OEM_6)); + KeyMap.push_back(SKeyMap(XK_asciicircum, KEY_OEM_5)); + KeyMap.push_back(SKeyMap(XK_degree, 0)); //? + KeyMap.push_back(SKeyMap(XK_underscore, KEY_MINUS)); //? + KeyMap.push_back(SKeyMap(XK_grave, KEY_OEM_3)); + KeyMap.push_back(SKeyMap(XK_acute, KEY_OEM_6)); + KeyMap.push_back(SKeyMap(XK_a, KEY_KEY_A)); + KeyMap.push_back(SKeyMap(XK_b, KEY_KEY_B)); + KeyMap.push_back(SKeyMap(XK_c, KEY_KEY_C)); + KeyMap.push_back(SKeyMap(XK_d, KEY_KEY_D)); + KeyMap.push_back(SKeyMap(XK_e, KEY_KEY_E)); + KeyMap.push_back(SKeyMap(XK_f, KEY_KEY_F)); + KeyMap.push_back(SKeyMap(XK_g, KEY_KEY_G)); + KeyMap.push_back(SKeyMap(XK_h, KEY_KEY_H)); + KeyMap.push_back(SKeyMap(XK_i, KEY_KEY_I)); + KeyMap.push_back(SKeyMap(XK_j, KEY_KEY_J)); + KeyMap.push_back(SKeyMap(XK_k, KEY_KEY_K)); + KeyMap.push_back(SKeyMap(XK_l, KEY_KEY_L)); + KeyMap.push_back(SKeyMap(XK_m, KEY_KEY_M)); + KeyMap.push_back(SKeyMap(XK_n, KEY_KEY_N)); + KeyMap.push_back(SKeyMap(XK_o, KEY_KEY_O)); + KeyMap.push_back(SKeyMap(XK_p, KEY_KEY_P)); + KeyMap.push_back(SKeyMap(XK_q, KEY_KEY_Q)); + KeyMap.push_back(SKeyMap(XK_r, KEY_KEY_R)); + KeyMap.push_back(SKeyMap(XK_s, KEY_KEY_S)); + KeyMap.push_back(SKeyMap(XK_t, KEY_KEY_T)); + KeyMap.push_back(SKeyMap(XK_u, KEY_KEY_U)); + KeyMap.push_back(SKeyMap(XK_v, KEY_KEY_V)); + KeyMap.push_back(SKeyMap(XK_w, KEY_KEY_W)); + KeyMap.push_back(SKeyMap(XK_x, KEY_KEY_X)); + KeyMap.push_back(SKeyMap(XK_y, KEY_KEY_Y)); + KeyMap.push_back(SKeyMap(XK_z, KEY_KEY_Z)); + KeyMap.push_back(SKeyMap(XK_ssharp, KEY_OEM_4)); + KeyMap.push_back(SKeyMap(XK_adiaeresis, KEY_OEM_7)); + KeyMap.push_back(SKeyMap(XK_odiaeresis, KEY_OEM_3)); + KeyMap.push_back(SKeyMap(XK_udiaeresis, KEY_OEM_1)); + KeyMap.push_back(SKeyMap(XK_Super_L, KEY_LWIN)); + KeyMap.push_back(SKeyMap(XK_Super_R, KEY_RWIN)); + + KeyMap.sort(); +#endif +} + +bool CIrrDeviceLinux::activateJoysticks(core::array<SJoystickInfo> & joystickInfo) +{ +#if defined (_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + + joystickInfo.clear(); + + u32 joystick; + for (joystick = 0; joystick < 32; ++joystick) + { + // The joystick device could be here... + core::stringc devName = "/dev/js"; + devName += joystick; + + SJoystickInfo returnInfo; + JoystickInfo info; + + info.fd = open(devName.c_str(), O_RDONLY); + if (-1 == info.fd) + { + // ...but Ubuntu and possibly other distros + // create the devices in /dev/input + devName = "/dev/input/js"; + devName += joystick; + info.fd = open(devName.c_str(), O_RDONLY); + if (-1 == info.fd) + { + // and BSD here + devName = "/dev/joy"; + devName += joystick; + info.fd = open(devName.c_str(), O_RDONLY); + } + } + + if (-1 == info.fd) + continue; + +#ifdef __FREE_BSD_ + info.axes=2; + info.buttons=2; +#else + ioctl( info.fd, JSIOCGAXES, &(info.axes) ); + ioctl( info.fd, JSIOCGBUTTONS, &(info.buttons) ); + fcntl( info.fd, F_SETFL, O_NONBLOCK ); +#endif + + (void)memset(&info.persistentData, 0, sizeof(info.persistentData)); + info.persistentData.EventType = irr::EET_JOYSTICK_INPUT_EVENT; + info.persistentData.JoystickEvent.Joystick = ActiveJoysticks.size(); + + // There's no obvious way to determine which (if any) axes represent a POV + // hat, so we'll just set it to "not used" and forget about it. + info.persistentData.JoystickEvent.POV = 65535; + + ActiveJoysticks.push_back(info); + + returnInfo.Joystick = joystick; + returnInfo.PovHat = SJoystickInfo::POV_HAT_UNKNOWN; + returnInfo.Axes = info.axes; + returnInfo.Buttons = info.buttons; + +#ifndef __FREE_BSD_ + char name[80]; + ioctl( info.fd, JSIOCGNAME(80), name); + returnInfo.Name = name; +#endif + + joystickInfo.push_back(returnInfo); + } + + for (joystick = 0; joystick < joystickInfo.size(); ++joystick) + { + char logString[256]; + (void)sprintf(logString, "Found joystick %u, %u axes, %u buttons '%s'", + joystick, joystickInfo[joystick].Axes, + joystickInfo[joystick].Buttons, joystickInfo[joystick].Name.c_str()); + os::Printer::log(logString, ELL_INFORMATION); + } + + return true; +#else + return false; +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +} + + +void CIrrDeviceLinux::pollJoysticks() +{ +#if defined (_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + if (0 == ActiveJoysticks.size()) + return; + + for (u32 j= 0; j< ActiveJoysticks.size(); ++j) + { + JoystickInfo & info = ActiveJoysticks[j]; + +#ifdef __FREE_BSD_ + struct joystick js; + if (read(info.fd, &js, JS_RETURN) == JS_RETURN) + { + info.persistentData.JoystickEvent.ButtonStates = js.buttons; /* should be a two-bit field */ + info.persistentData.JoystickEvent.Axis[0] = js.x; /* X axis */ + info.persistentData.JoystickEvent.Axis[1] = js.y; /* Y axis */ +#else + struct js_event event; + while (sizeof(event) == read(info.fd, &event, sizeof(event))) + { + switch(event.type & ~JS_EVENT_INIT) + { + case JS_EVENT_BUTTON: + if (event.value) + info.persistentData.JoystickEvent.ButtonStates |= (1 << event.number); + else + info.persistentData.JoystickEvent.ButtonStates &= ~(1 << event.number); + break; + + case JS_EVENT_AXIS: + if (event.number < SEvent::SJoystickEvent::NUMBER_OF_AXES) + info.persistentData.JoystickEvent.Axis[event.number] = event.value; + break; + + default: + break; + } + } +#endif + + // Send an irrlicht joystick event once per ::run() even if no new data were received. + (void)postEventFromUser(info.persistentData); + } +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +} + + +//! Set the current Gamma Value for the Display +bool CIrrDeviceLinux::setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) +{ + #if defined(_IRR_LINUX_X11_VIDMODE_) || defined(_IRR_LINUX_X11_RANDR_) + s32 eventbase, errorbase; + #ifdef _IRR_LINUX_X11_VIDMODE_ + if (XF86VidModeQueryExtension(display, &eventbase, &errorbase)) + { + XF86VidModeGamma gamma; + gamma.red=red; + gamma.green=green; + gamma.blue=blue; + XF86VidModeSetGamma(display, screennr, &gamma); + return true; + } + #endif + #if defined(_IRR_LINUX_X11_VIDMODE_) && defined(_IRR_LINUX_X11_RANDR_) + else + #endif + #ifdef _IRR_LINUX_X11_RANDR_ + if (XRRQueryExtension(display, &eventbase, &errorbase)) + { + XRRQueryVersion(display, &eventbase, &errorbase); // major, minor + if (eventbase>=1 && errorbase>1) + { + #if (RANDR_MAJOR>1 || RANDR_MINOR>1) + XRRCrtcGamma *gamma = XRRGetCrtcGamma(display, screennr); + if (gamma) + { + *gamma->red=(u16)red; + *gamma->green=(u16)green; + *gamma->blue=(u16)blue; + XRRSetCrtcGamma(display, screennr, gamma); + XRRFreeGamma(gamma); + return true; + } + #endif + } + } + #endif + #endif + return false; +} + + +//! Get the current Gamma Value for the Display +bool CIrrDeviceLinux::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ) +{ + brightness = 0.f; + contrast = 0.f; + #if defined(_IRR_LINUX_X11_VIDMODE_) || defined(_IRR_LINUX_X11_RANDR_) + s32 eventbase, errorbase; + #ifdef _IRR_LINUX_X11_VIDMODE_ + if (XF86VidModeQueryExtension(display, &eventbase, &errorbase)) + { + XF86VidModeGamma gamma; + XF86VidModeGetGamma(display, screennr, &gamma); + red = gamma.red; + green = gamma.green; + blue = gamma.blue; + return true; + } + #endif + #if defined(_IRR_LINUX_X11_VIDMODE_) && defined(_IRR_LINUX_X11_RANDR_) + else + #endif + #ifdef _IRR_LINUX_X11_RANDR_ + if (XRRQueryExtension(display, &eventbase, &errorbase)) + { + XRRQueryVersion(display, &eventbase, &errorbase); // major, minor + if (eventbase>=1 && errorbase>1) + { + #if (RANDR_MAJOR>1 || RANDR_MINOR>1) + XRRCrtcGamma *gamma = XRRGetCrtcGamma(display, screennr); + if (gamma) + { + red = *gamma->red; + green = *gamma->green; + blue= *gamma->blue; + XRRFreeGamma(gamma); + return true; + } + #endif + } + } + #endif + #endif + return false; +} + + +//! gets text from the clipboard +//! \return Returns 0 if no string is in there. +const c8* CIrrDeviceLinux::getTextFromClipboard() const +{ +#if defined(_IRR_COMPILE_WITH_X11_) + Window ownerWindow = XGetSelectionOwner (display, X_ATOM_CLIPBOARD); + if ( ownerWindow == window ) + { + return Clipboard.c_str(); + } + Clipboard = ""; + if (ownerWindow != None ) + { + XConvertSelection (display, X_ATOM_CLIPBOARD, XA_STRING, None, ownerWindow, CurrentTime); + XFlush (display); + + // check for data + Atom type; + int format; + unsigned long numItems, bytesLeft, dummy; + unsigned char *data; + XGetWindowProperty (display, ownerWindow, + XA_STRING, // property name + 0, // offset + 0, // length (we only check for data, so 0) + 0, // Delete 0==false + AnyPropertyType, // AnyPropertyType or property identifier + &type, // return type + &format, // return format + &numItems, // number items + &bytesLeft, // remaining bytes for partial reads + &data); // data + if ( bytesLeft > 0 ) + { + // there is some data to get + int result = XGetWindowProperty (display, ownerWindow, XA_STRING, 0, + bytesLeft, 0, AnyPropertyType, &type, &format, + &numItems, &dummy, &data); + if (result == Success) + Clipboard = (irr::c8*)data; + XFree (data); + } + } + + return Clipboard.c_str(); + +#else + return 0; +#endif +} + +//! copies text to the clipboard +void CIrrDeviceLinux::copyToClipboard(const c8* text) const +{ +#if defined(_IRR_COMPILE_WITH_X11_) + // Actually there is no clipboard on X but applications just say they own the clipboard and return text when asked. + // Which btw. also means that on X you lose clipboard content when closing applications. + Clipboard = text; + XSetSelectionOwner (display, X_ATOM_CLIPBOARD, window, CurrentTime); + XFlush (display); +#endif +} + +#ifdef _IRR_COMPILE_WITH_X11_ +// return true if the passed event has the type passed in parameter arg +Bool PredicateIsEventType(Display *display, XEvent *event, XPointer arg) +{ + if ( event && event->type == *(int*)arg ) + { +// os::Printer::log("remove event:", core::stringc((int)arg).c_str(), ELL_INFORMATION); + return True; + } + return False; +} +#endif //_IRR_COMPILE_WITH_X11_ + +//! Remove all messages pending in the system message loop +void CIrrDeviceLinux::clearSystemMessages() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (CreationParams.DriverType != video::EDT_NULL) + { + XEvent event; + int usrArg = ButtonPress; + while ( XCheckIfEvent(display, &event, PredicateIsEventType, XPointer(&usrArg)) == True ) {} + usrArg = ButtonRelease; + while ( XCheckIfEvent(display, &event, PredicateIsEventType, XPointer(&usrArg)) == True ) {} + usrArg = MotionNotify; + while ( XCheckIfEvent(display, &event, PredicateIsEventType, XPointer(&usrArg)) == True ) {} + usrArg = KeyRelease; + while ( XCheckIfEvent(display, &event, PredicateIsEventType, XPointer(&usrArg)) == True ) {} + usrArg = KeyPress; + while ( XCheckIfEvent(display, &event, PredicateIsEventType, XPointer(&usrArg)) == True ) {} + } +#endif //_IRR_COMPILE_WITH_X11_ +} + +void CIrrDeviceLinux::initXAtoms() +{ +#ifdef _IRR_COMPILE_WITH_X11_ + X_ATOM_CLIPBOARD = XInternAtom(display, "CLIPBOARD", False); + X_ATOM_TARGETS = XInternAtom(display, "TARGETS", False); + X_ATOM_UTF8_STRING = XInternAtom (display, "UTF8_STRING", False); + X_ATOM_TEXT = XInternAtom (display, "TEXT", False); +#endif +} + + +#ifdef _IRR_COMPILE_WITH_X11_ + +Cursor CIrrDeviceLinux::TextureToMonochromeCursor(irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot) +{ + XImage * sourceImage = XCreateImage(display, visual->visual, + 1, // depth, + ZPixmap, // XYBitmap (depth=1), ZPixmap(depth=x) + 0, 0, sourceRect.getWidth(), sourceRect.getHeight(), + 32, // bitmap_pad, + 0// bytes_per_line (0 means continuos in memory) + ); + sourceImage->data = new char[sourceImage->height * sourceImage->bytes_per_line]; + XImage * maskImage = XCreateImage(display, visual->visual, + 1, // depth, + ZPixmap, + 0, 0, sourceRect.getWidth(), sourceRect.getHeight(), + 32, // bitmap_pad, + 0 // bytes_per_line + ); + maskImage->data = new char[maskImage->height * maskImage->bytes_per_line]; + + // write texture into XImage + video::ECOLOR_FORMAT format = tex->getColorFormat(); + u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; + u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; + u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; + const u8* data = (const u8*)tex->lock(video::ETLM_READ_ONLY, 0); + data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); + for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) + { + data += bytesLeftGap; + for ( s32 x = 0; x < sourceRect.getWidth(); ++x ) + { + video::SColor pixelCol; + pixelCol.setData((const void*)data, format); + data += bytesPerPixel; + + if ( pixelCol.getAlpha() == 0 ) // transparent + { + XPutPixel(maskImage, x, y, 0); + XPutPixel(sourceImage, x, y, 0); + } + else // color + { + if ( pixelCol.getAverage() >= 127 ) + XPutPixel(sourceImage, x, y, 1); + else + XPutPixel(sourceImage, x, y, 0); + XPutPixel(maskImage, x, y, 1); + } + } + data += bytesRightGap; + } + tex->unlock(); + + Pixmap sourcePixmap = XCreatePixmap(display, window, sourceImage->width, sourceImage->height, sourceImage->depth); + Pixmap maskPixmap = XCreatePixmap(display, window, maskImage->width, maskImage->height, maskImage->depth); + + XGCValues values; + values.foreground = 1; + values.background = 1; + GC gc = XCreateGC( display, sourcePixmap, GCForeground | GCBackground, &values ); + + XPutImage(display, sourcePixmap, gc, sourceImage, 0, 0, 0, 0, sourceImage->width, sourceImage->height); + XPutImage(display, maskPixmap, gc, maskImage, 0, 0, 0, 0, maskImage->width, maskImage->height); + + XFreeGC(display, gc); + XDestroyImage(sourceImage); + XDestroyImage(maskImage); + + Cursor cursorResult = 0; + XColor foreground, background; + foreground.red = 65535; + foreground.green = 65535; + foreground.blue = 65535; + foreground.flags = DoRed | DoGreen | DoBlue; + background.red = 0; + background.green = 0; + background.blue = 0; + background.flags = DoRed | DoGreen | DoBlue; + + cursorResult = XCreatePixmapCursor(display, sourcePixmap, maskPixmap, &foreground, &background, hotspot.X, hotspot.Y); + + XFreePixmap(display, sourcePixmap); + XFreePixmap(display, maskPixmap); + + return cursorResult; +} + +#ifdef _IRR_LINUX_XCURSOR_ +Cursor CIrrDeviceLinux::TextureToARGBCursor(irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot) +{ + XcursorImage * image = XcursorImageCreate (sourceRect.getWidth(), sourceRect.getHeight()); + image->xhot = hotspot.X; + image->yhot = hotspot.Y; + + // write texture into XcursorImage + video::ECOLOR_FORMAT format = tex->getColorFormat(); + u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; + u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; + u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; + XcursorPixel* target = image->pixels; + const u8* data = (const u8*)tex->lock(ETLM_READ_ONLY, 0); + data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); + for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) + { + data += bytesLeftGap; + for ( s32 x = 0; x < sourceRect.getWidth(); ++x ) + { + video::SColor pixelCol; + pixelCol.setData((const void*)data, format); + data += bytesPerPixel; + + *target = (XcursorPixel)pixelCol.color; + ++target; + } + data += bytesRightGap; + } + tex->unlock(); + + Cursor cursorResult=XcursorImageLoadCursor(display, image); + + XcursorImageDestroy(image); + + + return cursorResult; +} +#endif // #ifdef _IRR_LINUX_XCURSOR_ + +Cursor CIrrDeviceLinux::TextureToCursor(irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot) +{ +#ifdef _IRR_LINUX_XCURSOR_ + return TextureToARGBCursor( tex, sourceRect, hotspot ); +#else + return TextureToMonochromeCursor( tex, sourceRect, hotspot ); +#endif +} +#endif // _IRR_COMPILE_WITH_X11_ + + +CIrrDeviceLinux::CCursorControl::CCursorControl(CIrrDeviceLinux* dev, bool null) + : Device(dev) +#ifdef _IRR_COMPILE_WITH_X11_ + , PlatformBehavior(gui::ECPB_NONE), lastQuery(0) +#endif + , IsVisible(true), Null(null), UseReferenceRect(false) + , ActiveIcon(gui::ECI_NORMAL), ActiveIconStartTime(0) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if (!Null) + { + XGCValues values; + unsigned long valuemask = 0; + + XColor fg, bg; + + // this code, for making the cursor invisible was sent in by + // Sirshane, thank your very much! + + + Pixmap invisBitmap = XCreatePixmap(Device->display, Device->window, 32, 32, 1); + Pixmap maskBitmap = XCreatePixmap(Device->display, Device->window, 32, 32, 1); + Colormap screen_colormap = DefaultColormap( Device->display, DefaultScreen( Device->display ) ); + XAllocNamedColor( Device->display, screen_colormap, "black", &fg, &fg ); + XAllocNamedColor( Device->display, screen_colormap, "white", &bg, &bg ); + + GC gc = XCreateGC( Device->display, invisBitmap, valuemask, &values ); + + XSetForeground( Device->display, gc, BlackPixel( Device->display, DefaultScreen( Device->display ) ) ); + XFillRectangle( Device->display, invisBitmap, gc, 0, 0, 32, 32 ); + XFillRectangle( Device->display, maskBitmap, gc, 0, 0, 32, 32 ); + + invisCursor = XCreatePixmapCursor( Device->display, invisBitmap, maskBitmap, &fg, &bg, 1, 1 ); + XFreeGC(Device->display, gc); + XFreePixmap(Device->display, invisBitmap); + XFreePixmap(Device->display, maskBitmap); + + initCursors(); + } +#endif +} + +CIrrDeviceLinux::CCursorControl::~CCursorControl() +{ + // Do not clearCursors here as the display is already closed + // TODO (cutealien): droping cursorcontrol earlier might work, not sure about reason why that's done in stub currently. +} + +#ifdef _IRR_COMPILE_WITH_X11_ +void CIrrDeviceLinux::CCursorControl::clearCursors() +{ + if (!Null) + XFreeCursor(Device->display, invisCursor); + for ( u32 i=0; i < Cursors.size(); ++i ) + { + for ( u32 f=0; f < Cursors[i].Frames.size(); ++f ) + { + XFreeCursor(Device->display, Cursors[i].Frames[f].IconHW); + } + } +} + +void CIrrDeviceLinux::CCursorControl::initCursors() +{ + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_top_left_arrow)) ); // (or XC_arrow?) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_crosshair)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_hand2)) ); // (or XC_hand1? ) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_question_arrow)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_xterm)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_X_cursor)) ); // (or XC_pirate?) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_watch)) ); // (or XC_clock?) + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_fleur)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_top_right_corner)) ); // NESW not available in X11 + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_top_left_corner)) ); // NWSE not available in X11 + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_sb_v_double_arrow)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_sb_h_double_arrow)) ); + Cursors.push_back( CursorX11(XCreateFontCursor(Device->display, XC_sb_up_arrow)) ); // (or XC_center_ptr?) +} + +void CIrrDeviceLinux::CCursorControl::update() +{ + if ( (u32)ActiveIcon < Cursors.size() && !Cursors[ActiveIcon].Frames.empty() && Cursors[ActiveIcon].FrameTime ) + { + // update animated cursors. This could also be done by X11 in case someone wants to figure that out (this way was just easier to implement) + u32 now = Device->getTimer()->getRealTime(); + u32 frame = ((now - ActiveIconStartTime) / Cursors[ActiveIcon].FrameTime) % Cursors[ActiveIcon].Frames.size(); + XDefineCursor(Device->display, Device->window, Cursors[ActiveIcon].Frames[frame].IconHW); + } +} +#endif + +//! Sets the active cursor icon +void CIrrDeviceLinux::CCursorControl::setActiveIcon(gui::ECURSOR_ICON iconId) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if ( iconId >= (s32)Cursors.size() ) + return; + + if ( Cursors[iconId].Frames.size() ) + XDefineCursor(Device->display, Device->window, Cursors[iconId].Frames[0].IconHW); + + ActiveIconStartTime = Device->getTimer()->getRealTime(); + ActiveIcon = iconId; +#endif +} + + +//! Add a custom sprite as cursor icon. +gui::ECURSOR_ICON CIrrDeviceLinux::CCursorControl::addIcon(const gui::SCursorSprite& icon) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if ( icon.SpriteId >= 0 ) + { + CursorX11 cX11; + cX11.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect<s32> rectIcon = icon.SpriteBank->getPositions()[rectId]; + Cursor cursor = Device->TextureToCursor(icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cX11.Frames.push_back( CursorFrameX11(cursor) ); + } + + Cursors.push_back( cX11 ); + + return (gui::ECURSOR_ICON)(Cursors.size() - 1); + } +#endif + return gui::ECI_NORMAL; +} + +//! replace the given cursor icon. +void CIrrDeviceLinux::CCursorControl::changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon) +{ +#ifdef _IRR_COMPILE_WITH_X11_ + if ( iconId >= (s32)Cursors.size() ) + return; + + for ( u32 i=0; i < Cursors[iconId].Frames.size(); ++i ) + XFreeCursor(Device->display, Cursors[iconId].Frames[i].IconHW); + + if ( icon.SpriteId >= 0 ) + { + CursorX11 cX11; + cX11.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect<s32> rectIcon = icon.SpriteBank->getPositions()[rectId]; + Cursor cursor = Device->TextureToCursor(icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cX11.Frames.push_back( CursorFrameX11(cursor) ); + } + + Cursors[iconId] = cX11; + } +#endif +} + +irr::core::dimension2di CIrrDeviceLinux::CCursorControl::getSupportedIconSize() const +{ + // this returns the closest match that is smaller or same size, so we just pass a value which should be large enough for cursors + unsigned int width=0, height=0; +#ifdef _IRR_COMPILE_WITH_X11_ + XQueryBestCursor(Device->display, Device->window, 64, 64, &width, &height); +#endif + return core::dimension2di(width, height); +} + +} // end namespace + +#endif // _IRR_COMPILE_WITH_X11_DEVICE_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.h new file mode 100644 index 0000000..4d2a2c6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceLinux.h @@ -0,0 +1,452 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_DEVICE_LINUX_H_INCLUDED__ +#define __C_IRR_DEVICE_LINUX_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + +#include "CIrrDeviceStub.h" +#include "IrrlichtDevice.h" +#include "IImagePresenter.h" +#include "ICursorControl.h" +#include "os.h" + +#ifdef _IRR_COMPILE_WITH_X11_ + +#ifdef _IRR_COMPILE_WITH_OPENGL_ +#include <GL/gl.h> +#define GLX_GLXEXT_LEGACY 1 +#include <GL/glx.h> +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ +#include "glxext.h" +#endif +#endif + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/cursorfont.h> +#ifdef _IRR_LINUX_X11_VIDMODE_ +#include <X11/extensions/xf86vmode.h> +#endif +#ifdef _IRR_LINUX_X11_RANDR_ +#include <X11/extensions/Xrandr.h> +#endif +#include <X11/keysym.h> + +#else +#define KeySym s32 +#endif + +namespace irr +{ + + class CIrrDeviceLinux : public CIrrDeviceStub, public video::IImagePresenter + { + public: + + //! constructor + CIrrDeviceLinux(const SIrrlichtCreationParameters& param); + + //! destructor + virtual ~CIrrDeviceLinux(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! Cause the device to temporarily pause execution and let other processes to run + // This should bring down processor usage without major performance loss for Irrlicht + virtual void yield(); + + //! Pause execution and let other processes to run for a specified amount of time. + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! returns if window has focus. + virtual bool isWindowFocused() const; + + //! returns if window is minimized. + virtual bool isWindowMinimized() const; + + //! returns color format of the window. + virtual video::ECOLOR_FORMAT getColorFormat() const; + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! \return Returns a pointer to a list with all video modes + //! supported by the gfx adapter. + video::IVideoModeList* getVideoModeList(); + + //! Sets if the window should be resizable in windowed mode. + virtual void setResizable(bool resize=false); + + //! Minimizes the window. + virtual void minimizeWindow(); + + //! Maximizes the window. + virtual void maximizeWindow(); + + //! Restores the window size. + virtual void restoreWindow(); + + //! Activate any joysticks, and generate events for them. + virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo); + + //! Set the current Gamma Value for the Display + virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ); + + //! Get the current Gamma Value for the Display + virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ); + + //! gets text from the clipboard + //! \return Returns 0 if no string is in there. + virtual const c8* getTextFromClipboard() const; + + //! copies text to the clipboard + //! This sets the clipboard selection and _not_ the primary selection which you have on X on the middle mouse button. + virtual void copyToClipboard(const c8* text) const; + + //! Remove all messages pending in the system message loop + virtual void clearSystemMessages(); + + //! Get the device type + virtual E_DEVICE_TYPE getType() const + { + return EIDT_X11; + } + +#ifdef _IRR_COMPILE_WITH_X11_ + // convert an Irrlicht texture to a X11 cursor + Cursor TextureToCursor(irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot); + Cursor TextureToMonochromeCursor(irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot); +#ifdef _IRR_LINUX_XCURSOR_ + Cursor TextureToARGBCursor(irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot); +#endif +#endif + + private: + + //! create the driver + void createDriver(); + + bool createWindow(); + + void createKeyMap(); + + void pollJoysticks(); + + void initXAtoms(); + + bool switchToFullscreen(bool reset=false); + + //! Implementation of the linux cursor control + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(CIrrDeviceLinux* dev, bool null); + + ~CCursorControl(); + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + if (visible==IsVisible) + return; + IsVisible = visible; +#ifdef _IRR_COMPILE_WITH_X11_ + if (!Null) + { + if ( !IsVisible ) + XDefineCursor( Device->display, Device->window, invisCursor ); + else + XUndefineCursor( Device->display, Device->window ); + } +#endif + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + setPosition((s32)(x*Device->Width), (s32)(y*Device->Height)); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { +#ifdef _IRR_COMPILE_WITH_X11_ + + if (!Null) + { + if (UseReferenceRect) + { + XWarpPointer(Device->display, + None, + Device->window, 0, 0, + Device->Width, + Device->Height, + ReferenceRect.UpperLeftCorner.X + x, + ReferenceRect.UpperLeftCorner.Y + y); + + } + else + { + XWarpPointer(Device->display, + None, + Device->window, 0, 0, + Device->Width, + Device->Height, x, y); + } + XFlush(Device->display); + } +#endif + CursorPos.X = x; + CursorPos.Y = y; + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + updateCursorPos(); + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + updateCursorPos(); + + if (!UseReferenceRect) + { + return core::position2d<f32>(CursorPos.X / (f32)Device->Width, + CursorPos.Y / (f32)Device->Height); + } + + return core::position2d<f32>(CursorPos.X / (f32)ReferenceRect.getWidth(), + CursorPos.Y / (f32)ReferenceRect.getHeight()); + } + + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + if (rect) + { + ReferenceRect = *rect; + UseReferenceRect = true; + + // prevent division through zero and uneven sizes + + if (!ReferenceRect.getHeight() || ReferenceRect.getHeight()%2) + ReferenceRect.LowerRightCorner.Y += 1; + + if (!ReferenceRect.getWidth() || ReferenceRect.getWidth()%2) + ReferenceRect.LowerRightCorner.X += 1; + } + else + UseReferenceRect = false; + } + + //! Sets the active cursor icon + virtual void setActiveIcon(gui::ECURSOR_ICON iconId); + + //! Gets the currently active icon + virtual gui::ECURSOR_ICON getActiveIcon() const + { + return ActiveIcon; + } + + //! Add a custom sprite as cursor icon. + virtual gui::ECURSOR_ICON addIcon(const gui::SCursorSprite& icon); + + //! replace the given cursor icon. + virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon); + + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + virtual core::dimension2di getSupportedIconSize() const; + +#ifdef _IRR_COMPILE_WITH_X11_ + //! Set platform specific behavior flags. + virtual void setPlatformBehavior(gui::ECURSOR_PLATFORM_BEHAVIOR behavior) {PlatformBehavior = behavior; } + + //! Return platform specific behavior. + virtual gui::ECURSOR_PLATFORM_BEHAVIOR getPlatformBehavior() const { return PlatformBehavior; } + + void update(); + void clearCursors(); +#endif + private: + + void updateCursorPos() + { +#ifdef _IRR_COMPILE_WITH_X11_ + if (Null) + return; + + if ( PlatformBehavior&gui::ECPB_X11_CACHE_UPDATES && !os::Timer::isStopped() ) + { + u32 now = os::Timer::getTime(); + if (now <= lastQuery) + return; + lastQuery = now; + } + + Window tmp; + int itmp1, itmp2; + unsigned int maskreturn; + XQueryPointer(Device->display, Device->window, + &tmp, &tmp, + &itmp1, &itmp2, + &CursorPos.X, &CursorPos.Y, &maskreturn); + + if (CursorPos.X < 0) + CursorPos.X = 0; + if (CursorPos.X > (s32) Device->Width) + CursorPos.X = Device->Width; + if (CursorPos.Y < 0) + CursorPos.Y = 0; + if (CursorPos.Y > (s32) Device->Height) + CursorPos.Y = Device->Height; +#endif + } + + CIrrDeviceLinux* Device; + core::position2d<s32> CursorPos; + core::rect<s32> ReferenceRect; +#ifdef _IRR_COMPILE_WITH_X11_ + gui::ECURSOR_PLATFORM_BEHAVIOR PlatformBehavior; + u32 lastQuery; + Cursor invisCursor; + + struct CursorFrameX11 + { + CursorFrameX11() : IconHW(0) {} + CursorFrameX11(Cursor icon) : IconHW(icon) {} + + Cursor IconHW; // hardware cursor + }; + + struct CursorX11 + { + CursorX11() {} + explicit CursorX11(Cursor iconHw, u32 frameTime=0) : FrameTime(frameTime) + { + Frames.push_back( CursorFrameX11(iconHw) ); + } + core::array<CursorFrameX11> Frames; + u32 FrameTime; + }; + + core::array<CursorX11> Cursors; + + void initCursors(); +#endif + bool IsVisible; + bool Null; + bool UseReferenceRect; + gui::ECURSOR_ICON ActiveIcon; + u32 ActiveIconStartTime; + }; + + friend class CCursorControl; + +#ifdef _IRR_COMPILE_WITH_X11_ + friend class COpenGLDriver; + + Display *display; + XVisualInfo* visual; + int screennr; + Window window; + XSetWindowAttributes attributes; + XSizeHints* StdHints; + XImage* SoftwareImage; + mutable core::stringc Clipboard; + #ifdef _IRR_LINUX_X11_VIDMODE_ + XF86VidModeModeInfo oldVideoMode; + #endif + #ifdef _IRR_LINUX_X11_RANDR_ + SizeID oldRandrMode; + Rotation oldRandrRotation; + #endif + #ifdef _IRR_COMPILE_WITH_OPENGL_ + GLXWindow glxWin; + GLXContext Context; + #endif +#endif + u32 Width, Height; + bool WindowHasFocus; + bool WindowMinimized; + bool UseXVidMode; + bool UseXRandR; + bool UseGLXWindow; + bool ExternalWindow; + int AutorepeatSupport; + + struct SKeyMap + { + SKeyMap() {} + SKeyMap(s32 x11, s32 win32) + : X11Key(x11), Win32Key(win32) + { + } + + KeySym X11Key; + s32 Win32Key; + + bool operator<(const SKeyMap& o) const + { + return X11Key<o.X11Key; + } + }; + + core::array<SKeyMap> KeyMap; + +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + struct JoystickInfo + { + int fd; + int axes; + int buttons; + + SEvent persistentData; + + JoystickInfo() : fd(-1), axes(0), buttons(0) { } + }; + core::array<JoystickInfo> ActiveJoysticks; +#endif + }; + + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_X11_DEVICE_ +#endif // __C_IRR_DEVICE_LINUX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.cpp new file mode 100644 index 0000000..809b9d7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.cpp @@ -0,0 +1,973 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ + +#include "CIrrDeviceSDL.h" +#include "IEventReceiver.h" +#include "irrList.h" +#include "os.h" +#include "CTimer.h" +#include "irrString.h" +#include "Keycodes.h" +#include "COSOperator.h" +#include <stdio.h> +#include <stdlib.h> +#include "SIrrCreationParameters.h" +#include <SDL/SDL_syswm.h> +#include <SDL/SDL_video.h> + +#ifdef _MSC_VER +#pragma comment(lib, "SDL.lib") +#endif // _MSC_VER + +namespace irr +{ + namespace video + { + + #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + IVideoDriver* createDirectX8Driver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window); + #endif + + #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + IVideoDriver* createDirectX9Driver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window); + #endif + + #ifdef _IRR_COMPILE_WITH_OPENGL_ + IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceSDL* device); + #endif + } // end namespace video + +} // end namespace irr + + +namespace irr +{ + +//! constructor +CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param) + : CIrrDeviceStub(param), + Screen((SDL_Surface*)param.WindowId), SDL_Flags(SDL_ANYFORMAT), + MouseX(0), MouseY(0), MouseButtonStates(0), + Width(param.WindowSize.Width), Height(param.WindowSize.Height), + Resizable(false), WindowHasFocus(false), WindowMinimized(false) +{ + #ifdef _DEBUG + setDebugName("CIrrDeviceSDL"); + #endif + + // Initialize SDL... Timer for sleep, video for the obvious, and + // noparachute prevents SDL from catching fatal errors. + if (SDL_Init( SDL_INIT_TIMER|SDL_INIT_VIDEO| +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + SDL_INIT_JOYSTICK| +#endif + SDL_INIT_NOPARACHUTE ) < 0) + { + os::Printer::log( "Unable to initialize SDL!", SDL_GetError()); + Close = true; + } + +#if defined(_IRR_WINDOWS_) + SDL_putenv("SDL_VIDEODRIVER=directx"); +#elif defined(_IRR_OSX_PLATFORM_) + SDL_putenv("SDL_VIDEODRIVER=Quartz"); +#else + SDL_putenv("SDL_VIDEODRIVER=x11"); +#endif +// SDL_putenv("SDL_WINDOWID="); + + SDL_VERSION(&Info.version); + + SDL_GetWMInfo(&Info); + core::stringc sdlversion = "SDL Version "; + sdlversion += Info.version.major; + sdlversion += "."; + sdlversion += Info.version.minor; + sdlversion += "."; + sdlversion += Info.version.patch; + + Operator = new COSOperator(sdlversion); + os::Printer::log(sdlversion.c_str(), ELL_INFORMATION); + + // create keymap + createKeyMap(); + // enable key to character translation + SDL_EnableUNICODE(1); + + (void)SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); + + if ( CreationParams.Fullscreen ) + SDL_Flags |= SDL_FULLSCREEN; + if (CreationParams.DriverType == video::EDT_OPENGL) + SDL_Flags |= SDL_OPENGL; + else if (CreationParams.Doublebuffer) + SDL_Flags |= SDL_DOUBLEBUF; + // create window + if (CreationParams.DriverType != video::EDT_NULL) + { + // create the window, only if we do not use the null device + createWindow(); + } + + // create cursor control + CursorControl = new CCursorControl(this); + + // create driver + createDriver(); + + if (VideoDriver) + createGUIAndScene(); +} + + +//! destructor +CIrrDeviceSDL::~CIrrDeviceSDL() +{ +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + const u32 numJoysticks = Joysticks.size(); + for (u32 i=0; i<numJoysticks; ++i) + SDL_JoystickClose(Joysticks[i]); +#endif + SDL_Quit(); +} + + +bool CIrrDeviceSDL::createWindow() +{ + if ( Close ) + return false; + + if (CreationParams.DriverType == video::EDT_OPENGL) + { + if (CreationParams.Bits==16) + { + SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 4 ); + SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 4 ); + SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 4 ); + SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0 ); + } + else + { + SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 ); + SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 ); + SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 ); + SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, CreationParams.WithAlphaChannel?8:0 ); + } + SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, CreationParams.ZBufferBits); + if (CreationParams.Doublebuffer) + SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); + if (CreationParams.Stereobuffer) + SDL_GL_SetAttribute( SDL_GL_STEREO, 1 ); + if (CreationParams.AntiAlias>1) + { + SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 ); + SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, CreationParams.AntiAlias ); + } + if ( !Screen ) + Screen = SDL_SetVideoMode( Width, Height, CreationParams.Bits, SDL_Flags ); + if ( !Screen && CreationParams.AntiAlias>1) + { + while (--CreationParams.AntiAlias>1) + { + SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, CreationParams.AntiAlias ); + Screen = SDL_SetVideoMode( Width, Height, CreationParams.Bits, SDL_Flags ); + if (Screen) + break; + } + if ( !Screen ) + { + SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 0 ); + SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 0 ); + Screen = SDL_SetVideoMode( Width, Height, CreationParams.Bits, SDL_Flags ); + if (Screen) + os::Printer::log("AntiAliasing disabled due to lack of support!" ); + } + } + } + else if ( !Screen ) + Screen = SDL_SetVideoMode( Width, Height, CreationParams.Bits, SDL_Flags ); + + if ( !Screen && CreationParams.Doublebuffer) + { + // Try single buffer + if (CreationParams.DriverType == video::EDT_OPENGL) + SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); + SDL_Flags &= ~SDL_DOUBLEBUF; + Screen = SDL_SetVideoMode( Width, Height, CreationParams.Bits, SDL_Flags ); + } + if ( !Screen ) + { + os::Printer::log( "Could not initialize display!" ); + return false; + } + + return true; +} + + +//! create the driver +void CIrrDeviceSDL::createDriver() +{ + switch(CreationParams.DriverType) + { + case video::EDT_DIRECT3D8: + #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + + VideoDriver = video::createDirectX8Driver(CreationParams, FileSystem, HWnd); + if (!VideoDriver) + { + os::Printer::log("Could not create DIRECT3D8 Driver.", ELL_ERROR); + } + #else + os::Printer::log("DIRECT3D8 Driver was not compiled into this dll. Try another one.", ELL_ERROR); + #endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + + break; + + case video::EDT_DIRECT3D9: + #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + + VideoDriver = video::createDirectX9Driver(CreationParams, FileSystem, HWnd); + if (!VideoDriver) + { + os::Printer::log("Could not create DIRECT3D9 Driver.", ELL_ERROR); + } + #else + os::Printer::log("DIRECT3D9 Driver was not compiled into this dll. Try another one.", ELL_ERROR); + #endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + + break; + + case video::EDT_SOFTWARE: + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + #else + os::Printer::log("No Software driver support compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_OPENGL: + #ifdef _IRR_COMPILE_WITH_OPENGL_ + VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("No OpenGL support compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_NULL: + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + + default: + os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR); + break; + } +} + + +//! runs the device. Returns false if device wants to be deleted +bool CIrrDeviceSDL::run() +{ + os::Timer::tick(); + + SEvent irrevent; + SDL_Event SDL_event; + + while ( !Close && SDL_PollEvent( &SDL_event ) ) + { + switch ( SDL_event.type ) + { + case SDL_MOUSEMOTION: + irrevent.EventType = irr::EET_MOUSE_INPUT_EVENT; + irrevent.MouseInput.Event = irr::EMIE_MOUSE_MOVED; + MouseX = irrevent.MouseInput.X = SDL_event.motion.x; + MouseY = irrevent.MouseInput.Y = SDL_event.motion.y; + irrevent.MouseInput.ButtonStates = MouseButtonStates; + + postEventFromUser(irrevent); + break; + + case SDL_MOUSEBUTTONDOWN: + case SDL_MOUSEBUTTONUP: + + irrevent.EventType = irr::EET_MOUSE_INPUT_EVENT; + irrevent.MouseInput.X = SDL_event.button.x; + irrevent.MouseInput.Y = SDL_event.button.y; + + irrevent.MouseInput.Event = irr::EMIE_MOUSE_MOVED; + + switch(SDL_event.button.button) + { + case SDL_BUTTON_LEFT: + if (SDL_event.type == SDL_MOUSEBUTTONDOWN) + { + irrevent.MouseInput.Event = irr::EMIE_LMOUSE_PRESSED_DOWN; + MouseButtonStates |= irr::EMBSM_LEFT; + } + else + { + irrevent.MouseInput.Event = irr::EMIE_LMOUSE_LEFT_UP; + MouseButtonStates &= !irr::EMBSM_LEFT; + } + break; + + case SDL_BUTTON_RIGHT: + if (SDL_event.type == SDL_MOUSEBUTTONDOWN) + { + irrevent.MouseInput.Event = irr::EMIE_RMOUSE_PRESSED_DOWN; + MouseButtonStates |= irr::EMBSM_RIGHT; + } + else + { + irrevent.MouseInput.Event = irr::EMIE_RMOUSE_LEFT_UP; + MouseButtonStates &= !irr::EMBSM_RIGHT; + } + break; + + case SDL_BUTTON_MIDDLE: + if (SDL_event.type == SDL_MOUSEBUTTONDOWN) + { + irrevent.MouseInput.Event = irr::EMIE_MMOUSE_PRESSED_DOWN; + MouseButtonStates |= irr::EMBSM_MIDDLE; + } + else + { + irrevent.MouseInput.Event = irr::EMIE_MMOUSE_LEFT_UP; + MouseButtonStates &= !irr::EMBSM_MIDDLE; + } + break; + + case SDL_BUTTON_WHEELUP: + irrevent.MouseInput.Event = irr::EMIE_MOUSE_WHEEL; + irrevent.MouseInput.Wheel = 1.0f; + break; + + case SDL_BUTTON_WHEELDOWN: + irrevent.MouseInput.Event = irr::EMIE_MOUSE_WHEEL; + irrevent.MouseInput.Wheel = -1.0f; + break; + } + + irrevent.MouseInput.ButtonStates = MouseButtonStates; + + if (irrevent.MouseInput.Event != irr::EMIE_MOUSE_MOVED) + { + postEventFromUser(irrevent); + + if ( irrevent.MouseInput.Event >= EMIE_LMOUSE_PRESSED_DOWN && irrevent.MouseInput.Event <= EMIE_MMOUSE_PRESSED_DOWN ) + { + u32 clicks = checkSuccessiveClicks(irrevent.MouseInput.X, irrevent.MouseInput.Y, irrevent.MouseInput.Event); + if ( clicks == 2 ) + { + irrevent.MouseInput.Event = (EMOUSE_INPUT_EVENT)(EMIE_LMOUSE_DOUBLE_CLICK + irrevent.MouseInput.Event-EMIE_LMOUSE_PRESSED_DOWN); + postEventFromUser(irrevent); + } + else if ( clicks == 3 ) + { + irrevent.MouseInput.Event = (EMOUSE_INPUT_EVENT)(EMIE_LMOUSE_TRIPLE_CLICK + irrevent.MouseInput.Event-EMIE_LMOUSE_PRESSED_DOWN); + postEventFromUser(irrevent); + } + } + } + break; + + case SDL_KEYDOWN: + case SDL_KEYUP: + { + SKeyMap mp; + mp.SDLKey = SDL_event.key.keysym.sym; + s32 idx = KeyMap.binary_search(mp); + + EKEY_CODE key; + if (idx == -1) + key = (EKEY_CODE)0; + else + key = (EKEY_CODE)KeyMap[idx].Win32Key; + +#ifdef _IRR_WINDOWS_API_ + // handle alt+f4 in Windows, because SDL seems not to + if ( (SDL_event.key.keysym.mod & KMOD_LALT) && key == KEY_F4) + { + Close = true; + break; + } +#endif + irrevent.EventType = irr::EET_KEY_INPUT_EVENT; + irrevent.KeyInput.Char = SDL_event.key.keysym.unicode; + irrevent.KeyInput.Key = key; + irrevent.KeyInput.PressedDown = (SDL_event.type == SDL_KEYDOWN); + irrevent.KeyInput.Shift = (SDL_event.key.keysym.mod & KMOD_SHIFT) != 0; + irrevent.KeyInput.Control = (SDL_event.key.keysym.mod & KMOD_CTRL ) != 0; + postEventFromUser(irrevent); + } + break; + + case SDL_QUIT: + Close = true; + break; + + case SDL_ACTIVEEVENT: + if ((SDL_event.active.state == SDL_APPMOUSEFOCUS) || + (SDL_event.active.state == SDL_APPINPUTFOCUS)) + WindowHasFocus = (SDL_event.active.gain==1); + else + if (SDL_event.active.state == SDL_APPACTIVE) + WindowMinimized = (SDL_event.active.gain!=1); + break; + + case SDL_VIDEORESIZE: + if ((SDL_event.resize.w != (int)Width) || (SDL_event.resize.h != (int)Height)) + { + Width = SDL_event.resize.w; + Height = SDL_event.resize.h; + Screen = SDL_SetVideoMode( Width, Height, 0, SDL_Flags ); + if (VideoDriver) + VideoDriver->OnResize(core::dimension2d<u32>(Width, Height)); + } + break; + + case SDL_USEREVENT: + irrevent.EventType = irr::EET_USER_EVENT; + irrevent.UserEvent.UserData1 = *(reinterpret_cast<s32*>(&SDL_event.user.data1)); + irrevent.UserEvent.UserData2 = *(reinterpret_cast<s32*>(&SDL_event.user.data2)); + + postEventFromUser(irrevent); + break; + + default: + break; + } // end switch + + } // end while + +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + // TODO: Check if the multiple open/close calls are too expensive, then + // open/close in the constructor/destructor instead + + // update joystick states manually + SDL_JoystickUpdate(); + // we'll always send joystick input events... + SEvent joyevent; + joyevent.EventType = EET_JOYSTICK_INPUT_EVENT; + for (u32 i=0; i<Joysticks.size(); ++i) + { + SDL_Joystick* joystick = Joysticks[i]; + if (joystick) + { + int j; + // query all buttons + const int numButtons = core::min_(SDL_JoystickNumButtons(joystick), 32); + joyevent.JoystickEvent.ButtonStates=0; + for (j=0; j<numButtons; ++j) + joyevent.JoystickEvent.ButtonStates |= (SDL_JoystickGetButton(joystick, j)<<j); + + // query all axes, already in correct range + const int numAxes = core::min_(SDL_JoystickNumAxes(joystick), (int)SEvent::SJoystickEvent::NUMBER_OF_AXES); + joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_X]=0; + joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_Y]=0; + joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_Z]=0; + joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_R]=0; + joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_U]=0; + joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_V]=0; + for (j=0; j<numAxes; ++j) + joyevent.JoystickEvent.Axis[j] = SDL_JoystickGetAxis(joystick, j); + + // we can only query one hat, SDL only supports 8 directions + if (SDL_JoystickNumHats(joystick)>0) + { + switch (SDL_JoystickGetHat(joystick, 0)) + { + case SDL_HAT_UP: + joyevent.JoystickEvent.POV=0; + break; + case SDL_HAT_RIGHTUP: + joyevent.JoystickEvent.POV=4500; + break; + case SDL_HAT_RIGHT: + joyevent.JoystickEvent.POV=9000; + break; + case SDL_HAT_RIGHTDOWN: + joyevent.JoystickEvent.POV=13500; + break; + case SDL_HAT_DOWN: + joyevent.JoystickEvent.POV=18000; + break; + case SDL_HAT_LEFTDOWN: + joyevent.JoystickEvent.POV=22500; + break; + case SDL_HAT_LEFT: + joyevent.JoystickEvent.POV=27000; + break; + case SDL_HAT_LEFTUP: + joyevent.JoystickEvent.POV=31500; + break; + case SDL_HAT_CENTERED: + default: + joyevent.JoystickEvent.POV=65535; + break; + } + } + else + { + joyevent.JoystickEvent.POV=65535; + } + + // we map the number directly + joyevent.JoystickEvent.Joystick=static_cast<u8>(i); + // now post the event + postEventFromUser(joyevent); + // and close the joystick + } + } +#endif + return !Close; +} + +//! Activate any joysticks, and generate events for them. +bool CIrrDeviceSDL::activateJoysticks(core::array<SJoystickInfo> & joystickInfo) +{ +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + joystickInfo.clear(); + + // we can name up to 256 different joysticks + const int numJoysticks = core::min_(SDL_NumJoysticks(), 256); + Joysticks.reallocate(numJoysticks); + joystickInfo.reallocate(numJoysticks); + + int joystick = 0; + for (; joystick<numJoysticks; ++joystick) + { + Joysticks.push_back(SDL_JoystickOpen(joystick)); + SJoystickInfo info; + + info.Joystick = joystick; + info.Axes = SDL_JoystickNumAxes(Joysticks[joystick]); + info.Buttons = SDL_JoystickNumButtons(Joysticks[joystick]); + info.Name = SDL_JoystickName(joystick); + info.PovHat = (SDL_JoystickNumHats(Joysticks[joystick]) > 0) + ? SJoystickInfo::POV_HAT_PRESENT : SJoystickInfo::POV_HAT_ABSENT; + + joystickInfo.push_back(info); + } + + for(joystick = 0; joystick < (int)joystickInfo.size(); ++joystick) + { + char logString[256]; + (void)sprintf(logString, "Found joystick %d, %d axes, %d buttons '%s'", + joystick, joystickInfo[joystick].Axes, + joystickInfo[joystick].Buttons, joystickInfo[joystick].Name.c_str()); + os::Printer::log(logString, ELL_INFORMATION); + } + + return true; + +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + + return false; +} + + + +//! pause execution temporarily +void CIrrDeviceSDL::yield() +{ + SDL_Delay(0); +} + + +//! pause execution for a specified time +void CIrrDeviceSDL::sleep(u32 timeMs, bool pauseTimer) +{ + const bool wasStopped = Timer ? Timer->isStopped() : true; + if (pauseTimer && !wasStopped) + Timer->stop(); + + SDL_Delay(timeMs); + + if (pauseTimer && !wasStopped) + Timer->start(); +} + + +//! sets the caption of the window +void CIrrDeviceSDL::setWindowCaption(const wchar_t* text) +{ + core::stringc textc = text; + SDL_WM_SetCaption( textc.c_str( ), textc.c_str( ) ); +} + + +//! presents a surface in the client area +bool CIrrDeviceSDL::present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip) +{ + SDL_Surface *sdlSurface = SDL_CreateRGBSurfaceFrom( + surface->lock(), surface->getDimension().Width, surface->getDimension().Height, + surface->getBitsPerPixel(), surface->getPitch(), + surface->getRedMask(), surface->getGreenMask(), surface->getBlueMask(), surface->getAlphaMask()); + if (!sdlSurface) + return false; + SDL_SetAlpha(sdlSurface, 0, 0); + SDL_SetColorKey(sdlSurface, 0, 0); + sdlSurface->format->BitsPerPixel=surface->getBitsPerPixel(); + sdlSurface->format->BytesPerPixel=surface->getBytesPerPixel(); + if ((surface->getColorFormat()==video::ECF_R8G8B8) || + (surface->getColorFormat()==video::ECF_A8R8G8B8)) + { + sdlSurface->format->Rloss=0; + sdlSurface->format->Gloss=0; + sdlSurface->format->Bloss=0; + sdlSurface->format->Rshift=16; + sdlSurface->format->Gshift=8; + sdlSurface->format->Bshift=0; + if (surface->getColorFormat()==video::ECF_R8G8B8) + { + sdlSurface->format->Aloss=8; + sdlSurface->format->Ashift=32; + } + else + { + sdlSurface->format->Aloss=0; + sdlSurface->format->Ashift=24; + } + } + else if (surface->getColorFormat()==video::ECF_R5G6B5) + { + sdlSurface->format->Rloss=3; + sdlSurface->format->Gloss=2; + sdlSurface->format->Bloss=3; + sdlSurface->format->Aloss=8; + sdlSurface->format->Rshift=11; + sdlSurface->format->Gshift=5; + sdlSurface->format->Bshift=0; + sdlSurface->format->Ashift=16; + } + else if (surface->getColorFormat()==video::ECF_A1R5G5B5) + { + sdlSurface->format->Rloss=3; + sdlSurface->format->Gloss=3; + sdlSurface->format->Bloss=3; + sdlSurface->format->Aloss=7; + sdlSurface->format->Rshift=10; + sdlSurface->format->Gshift=5; + sdlSurface->format->Bshift=0; + sdlSurface->format->Ashift=15; + } + + SDL_Surface* scr = (SDL_Surface* )windowId; + if (!scr) + scr = Screen; + if (scr) + { + if (srcClip) + { + SDL_Rect sdlsrcClip; + sdlsrcClip.x = srcClip->UpperLeftCorner.X; + sdlsrcClip.y = srcClip->UpperLeftCorner.Y; + sdlsrcClip.w = srcClip->getWidth(); + sdlsrcClip.h = srcClip->getHeight(); + SDL_BlitSurface(sdlSurface, &sdlsrcClip, scr, NULL); + } + else + SDL_BlitSurface(sdlSurface, NULL, scr, NULL); + SDL_Flip(scr); + } + + SDL_FreeSurface(sdlSurface); + surface->unlock(); + return (scr != 0); +} + + +//! notifies the device that it should close itself +void CIrrDeviceSDL::closeDevice() +{ + Close = true; +} + + +//! \return Pointer to a list with all video modes supported +video::IVideoModeList* CIrrDeviceSDL::getVideoModeList() +{ + if (!VideoModeList->getVideoModeCount()) + { + // enumerate video modes. + const SDL_VideoInfo *vi = SDL_GetVideoInfo(); + SDL_Rect **modes = SDL_ListModes(vi->vfmt, SDL_Flags); + if (modes != 0) + { + if (modes == (SDL_Rect **)-1) + os::Printer::log("All modes available.\n"); + else + { + for (u32 i=0; modes[i]; ++i) + VideoModeList->addMode(core::dimension2d<u32>(modes[i]->w, modes[i]->h), vi->vfmt->BitsPerPixel); + } + } + } + + return VideoModeList; +} + + +//! Sets if the window should be resizable in windowed mode. +void CIrrDeviceSDL::setResizable(bool resize) +{ + if (resize != Resizable) + { + if (resize) + SDL_Flags |= SDL_RESIZABLE; + else + SDL_Flags &= ~SDL_RESIZABLE; + Screen = SDL_SetVideoMode( 0, 0, 0, SDL_Flags ); + Resizable = resize; + } +} + + +//! Minimizes window if possible +void CIrrDeviceSDL::minimizeWindow() +{ + SDL_WM_IconifyWindow(); +} + + +//! Maximize window +void CIrrDeviceSDL::maximizeWindow() +{ + // do nothing +} + + +//! Restore original window size +void CIrrDeviceSDL::restoreWindow() +{ + // do nothing +} + + +//! returns if window is active. if not, nothing need to be drawn +bool CIrrDeviceSDL::isWindowActive() const +{ + return (WindowHasFocus && !WindowMinimized); +} + + +//! returns if window has focus. +bool CIrrDeviceSDL::isWindowFocused() const +{ + return WindowHasFocus; +} + + +//! returns if window is minimized. +bool CIrrDeviceSDL::isWindowMinimized() const +{ + return WindowMinimized; +} + + +//! Set the current Gamma Value for the Display +bool CIrrDeviceSDL::setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) +{ + /* + // todo: Gamma in SDL takes ints, what does Irrlicht use? + return (SDL_SetGamma(red, green, blue) != -1); + */ + return false; +} + +//! Get the current Gamma Value for the Display +bool CIrrDeviceSDL::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ) +{ +/* brightness = 0.f; + contrast = 0.f; + return (SDL_GetGamma(&red, &green, &blue) != -1);*/ + return false; +} + +//! returns color format of the window. +video::ECOLOR_FORMAT CIrrDeviceSDL::getColorFormat() const +{ + if (Screen) + { + if (Screen->format->BitsPerPixel==16) + { + if (Screen->format->Amask != 0) + return video::ECF_A1R5G5B5; + else + return video::ECF_R5G6B5; + } + else + { + if (Screen->format->Amask != 0) + return video::ECF_A8R8G8B8; + else + return video::ECF_R8G8B8; + } + } + else + return CIrrDeviceStub::getColorFormat(); +} + + +void CIrrDeviceSDL::createKeyMap() +{ + // I don't know if this is the best method to create + // the lookuptable, but I'll leave it like that until + // I find a better version. + + KeyMap.reallocate(105); + + // buttons missing + + KeyMap.push_back(SKeyMap(SDLK_BACKSPACE, KEY_BACK)); + KeyMap.push_back(SKeyMap(SDLK_TAB, KEY_TAB)); + KeyMap.push_back(SKeyMap(SDLK_CLEAR, KEY_CLEAR)); + KeyMap.push_back(SKeyMap(SDLK_RETURN, KEY_RETURN)); + + // combined modifiers missing + + KeyMap.push_back(SKeyMap(SDLK_PAUSE, KEY_PAUSE)); + KeyMap.push_back(SKeyMap(SDLK_CAPSLOCK, KEY_CAPITAL)); + + // asian letter keys missing + + KeyMap.push_back(SKeyMap(SDLK_ESCAPE, KEY_ESCAPE)); + + // asian letter keys missing + + KeyMap.push_back(SKeyMap(SDLK_SPACE, KEY_SPACE)); + KeyMap.push_back(SKeyMap(SDLK_PAGEUP, KEY_PRIOR)); + KeyMap.push_back(SKeyMap(SDLK_PAGEDOWN, KEY_NEXT)); + KeyMap.push_back(SKeyMap(SDLK_END, KEY_END)); + KeyMap.push_back(SKeyMap(SDLK_HOME, KEY_HOME)); + KeyMap.push_back(SKeyMap(SDLK_LEFT, KEY_LEFT)); + KeyMap.push_back(SKeyMap(SDLK_UP, KEY_UP)); + KeyMap.push_back(SKeyMap(SDLK_RIGHT, KEY_RIGHT)); + KeyMap.push_back(SKeyMap(SDLK_DOWN, KEY_DOWN)); + + // select missing + KeyMap.push_back(SKeyMap(SDLK_PRINT, KEY_PRINT)); + // execute missing + KeyMap.push_back(SKeyMap(SDLK_PRINT, KEY_SNAPSHOT)); + + KeyMap.push_back(SKeyMap(SDLK_INSERT, KEY_INSERT)); + KeyMap.push_back(SKeyMap(SDLK_DELETE, KEY_DELETE)); + KeyMap.push_back(SKeyMap(SDLK_HELP, KEY_HELP)); + + KeyMap.push_back(SKeyMap(SDLK_0, KEY_KEY_0)); + KeyMap.push_back(SKeyMap(SDLK_1, KEY_KEY_1)); + KeyMap.push_back(SKeyMap(SDLK_2, KEY_KEY_2)); + KeyMap.push_back(SKeyMap(SDLK_3, KEY_KEY_3)); + KeyMap.push_back(SKeyMap(SDLK_4, KEY_KEY_4)); + KeyMap.push_back(SKeyMap(SDLK_5, KEY_KEY_5)); + KeyMap.push_back(SKeyMap(SDLK_6, KEY_KEY_6)); + KeyMap.push_back(SKeyMap(SDLK_7, KEY_KEY_7)); + KeyMap.push_back(SKeyMap(SDLK_8, KEY_KEY_8)); + KeyMap.push_back(SKeyMap(SDLK_9, KEY_KEY_9)); + + KeyMap.push_back(SKeyMap(SDLK_a, KEY_KEY_A)); + KeyMap.push_back(SKeyMap(SDLK_b, KEY_KEY_B)); + KeyMap.push_back(SKeyMap(SDLK_c, KEY_KEY_C)); + KeyMap.push_back(SKeyMap(SDLK_d, KEY_KEY_D)); + KeyMap.push_back(SKeyMap(SDLK_e, KEY_KEY_E)); + KeyMap.push_back(SKeyMap(SDLK_f, KEY_KEY_F)); + KeyMap.push_back(SKeyMap(SDLK_g, KEY_KEY_G)); + KeyMap.push_back(SKeyMap(SDLK_h, KEY_KEY_H)); + KeyMap.push_back(SKeyMap(SDLK_i, KEY_KEY_I)); + KeyMap.push_back(SKeyMap(SDLK_j, KEY_KEY_J)); + KeyMap.push_back(SKeyMap(SDLK_k, KEY_KEY_K)); + KeyMap.push_back(SKeyMap(SDLK_l, KEY_KEY_L)); + KeyMap.push_back(SKeyMap(SDLK_m, KEY_KEY_M)); + KeyMap.push_back(SKeyMap(SDLK_n, KEY_KEY_N)); + KeyMap.push_back(SKeyMap(SDLK_o, KEY_KEY_O)); + KeyMap.push_back(SKeyMap(SDLK_p, KEY_KEY_P)); + KeyMap.push_back(SKeyMap(SDLK_q, KEY_KEY_Q)); + KeyMap.push_back(SKeyMap(SDLK_r, KEY_KEY_R)); + KeyMap.push_back(SKeyMap(SDLK_s, KEY_KEY_S)); + KeyMap.push_back(SKeyMap(SDLK_t, KEY_KEY_T)); + KeyMap.push_back(SKeyMap(SDLK_u, KEY_KEY_U)); + KeyMap.push_back(SKeyMap(SDLK_v, KEY_KEY_V)); + KeyMap.push_back(SKeyMap(SDLK_w, KEY_KEY_W)); + KeyMap.push_back(SKeyMap(SDLK_x, KEY_KEY_X)); + KeyMap.push_back(SKeyMap(SDLK_y, KEY_KEY_Y)); + KeyMap.push_back(SKeyMap(SDLK_z, KEY_KEY_Z)); + + KeyMap.push_back(SKeyMap(SDLK_LSUPER, KEY_LWIN)); + KeyMap.push_back(SKeyMap(SDLK_RSUPER, KEY_RWIN)); + // apps missing + KeyMap.push_back(SKeyMap(SDLK_POWER, KEY_SLEEP)); //?? + + KeyMap.push_back(SKeyMap(SDLK_KP0, KEY_NUMPAD0)); + KeyMap.push_back(SKeyMap(SDLK_KP1, KEY_NUMPAD1)); + KeyMap.push_back(SKeyMap(SDLK_KP2, KEY_NUMPAD2)); + KeyMap.push_back(SKeyMap(SDLK_KP3, KEY_NUMPAD3)); + KeyMap.push_back(SKeyMap(SDLK_KP4, KEY_NUMPAD4)); + KeyMap.push_back(SKeyMap(SDLK_KP5, KEY_NUMPAD5)); + KeyMap.push_back(SKeyMap(SDLK_KP6, KEY_NUMPAD6)); + KeyMap.push_back(SKeyMap(SDLK_KP7, KEY_NUMPAD7)); + KeyMap.push_back(SKeyMap(SDLK_KP8, KEY_NUMPAD8)); + KeyMap.push_back(SKeyMap(SDLK_KP9, KEY_NUMPAD9)); + KeyMap.push_back(SKeyMap(SDLK_KP_MULTIPLY, KEY_MULTIPLY)); + KeyMap.push_back(SKeyMap(SDLK_KP_PLUS, KEY_ADD)); +// KeyMap.push_back(SKeyMap(SDLK_KP_, KEY_SEPARATOR)); + KeyMap.push_back(SKeyMap(SDLK_KP_MINUS, KEY_SUBTRACT)); + KeyMap.push_back(SKeyMap(SDLK_KP_PERIOD, KEY_DECIMAL)); + KeyMap.push_back(SKeyMap(SDLK_KP_DIVIDE, KEY_DIVIDE)); + + KeyMap.push_back(SKeyMap(SDLK_F1, KEY_F1)); + KeyMap.push_back(SKeyMap(SDLK_F2, KEY_F2)); + KeyMap.push_back(SKeyMap(SDLK_F3, KEY_F3)); + KeyMap.push_back(SKeyMap(SDLK_F4, KEY_F4)); + KeyMap.push_back(SKeyMap(SDLK_F5, KEY_F5)); + KeyMap.push_back(SKeyMap(SDLK_F6, KEY_F6)); + KeyMap.push_back(SKeyMap(SDLK_F7, KEY_F7)); + KeyMap.push_back(SKeyMap(SDLK_F8, KEY_F8)); + KeyMap.push_back(SKeyMap(SDLK_F9, KEY_F9)); + KeyMap.push_back(SKeyMap(SDLK_F10, KEY_F10)); + KeyMap.push_back(SKeyMap(SDLK_F11, KEY_F11)); + KeyMap.push_back(SKeyMap(SDLK_F12, KEY_F12)); + KeyMap.push_back(SKeyMap(SDLK_F13, KEY_F13)); + KeyMap.push_back(SKeyMap(SDLK_F14, KEY_F14)); + KeyMap.push_back(SKeyMap(SDLK_F15, KEY_F15)); + // no higher F-keys + + KeyMap.push_back(SKeyMap(SDLK_NUMLOCK, KEY_NUMLOCK)); + KeyMap.push_back(SKeyMap(SDLK_SCROLLOCK, KEY_SCROLL)); + KeyMap.push_back(SKeyMap(SDLK_LSHIFT, KEY_LSHIFT)); + KeyMap.push_back(SKeyMap(SDLK_RSHIFT, KEY_RSHIFT)); + KeyMap.push_back(SKeyMap(SDLK_LCTRL, KEY_LCONTROL)); + KeyMap.push_back(SKeyMap(SDLK_RCTRL, KEY_RCONTROL)); + KeyMap.push_back(SKeyMap(SDLK_LALT, KEY_LMENU)); + KeyMap.push_back(SKeyMap(SDLK_RALT, KEY_RMENU)); + + KeyMap.push_back(SKeyMap(SDLK_PLUS, KEY_PLUS)); + KeyMap.push_back(SKeyMap(SDLK_COMMA, KEY_COMMA)); + KeyMap.push_back(SKeyMap(SDLK_MINUS, KEY_MINUS)); + KeyMap.push_back(SKeyMap(SDLK_PERIOD, KEY_PERIOD)); + + // some special keys missing + + KeyMap.sort(); +} + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SDL_DEVICE_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.h new file mode 100644 index 0000000..c151f1d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceSDL.h @@ -0,0 +1,235 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// This device code is based on the original SDL device implementation +// contributed by Shane Parker (sirshane). + +#ifndef __C_IRR_DEVICE_SDL_H_INCLUDED__ +#define __C_IRR_DEVICE_SDL_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ + +#include "IrrlichtDevice.h" +#include "CIrrDeviceStub.h" +#include "IImagePresenter.h" +#include "ICursorControl.h" + +#include <SDL/SDL.h> +#include <SDL/SDL_syswm.h> + +namespace irr +{ + + class CIrrDeviceSDL : public CIrrDeviceStub, video::IImagePresenter + { + public: + + //! constructor + CIrrDeviceSDL(const SIrrlichtCreationParameters& param); + + //! destructor + virtual ~CIrrDeviceSDL(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! pause execution temporarily + virtual void yield(); + + //! pause execution for a specified time + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! returns if window has focus. + bool isWindowFocused() const; + + //! returns if window is minimized. + bool isWindowMinimized() const; + + //! returns color format of the window. + video::ECOLOR_FORMAT getColorFormat() const; + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! \return Returns a pointer to a list with all video modes supported + video::IVideoModeList* getVideoModeList(); + + //! Sets if the window should be resizable in windowed mode. + virtual void setResizable(bool resize=false); + + //! Minimizes the window. + virtual void minimizeWindow(); + + //! Maximizes the window. + virtual void maximizeWindow(); + + //! Restores the window size. + virtual void restoreWindow(); + + //! Activate any joysticks, and generate events for them. + virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo); + + //! Set the current Gamma Value for the Display + virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ); + + //! Get the current Gamma Value for the Display + virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ); + + //! Get the device type + virtual E_DEVICE_TYPE getType() const + { + return EIDT_SDL; + } + + //! Implementation of the linux cursor control + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(CIrrDeviceSDL* dev) + : Device(dev), IsVisible(true) + { + } + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + IsVisible = visible; + if ( visible ) + SDL_ShowCursor( SDL_ENABLE ); + else + SDL_ShowCursor( SDL_DISABLE ); + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + setPosition((s32)(x*Device->Width), (s32)(y*Device->Height)); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { + SDL_WarpMouse( x, y ); + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + updateCursorPos(); + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + updateCursorPos(); + return core::position2d<f32>(CursorPos.X / (f32)Device->Width, + CursorPos.Y / (f32)Device->Height); + } + + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + } + + private: + + void updateCursorPos() + { + CursorPos.X = Device->MouseX; + CursorPos.Y = Device->MouseY; + + if (CursorPos.X < 0) + CursorPos.X = 0; + if (CursorPos.X > (s32)Device->Width) + CursorPos.X = Device->Width; + if (CursorPos.Y < 0) + CursorPos.Y = 0; + if (CursorPos.Y > (s32)Device->Height) + CursorPos.Y = Device->Height; + } + + CIrrDeviceSDL* Device; + core::position2d<s32> CursorPos; + bool IsVisible; + }; + + private: + + //! create the driver + void createDriver(); + + bool createWindow(); + + void createKeyMap(); + + SDL_Surface* Screen; + int SDL_Flags; +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + core::array<SDL_Joystick*> Joysticks; +#endif + + s32 MouseX, MouseY; + u32 MouseButtonStates; + + u32 Width, Height; + + bool Resizable; + bool WindowHasFocus; + bool WindowMinimized; + + struct SKeyMap + { + SKeyMap() {} + SKeyMap(s32 x11, s32 win32) + : SDLKey(x11), Win32Key(win32) + { + } + + s32 SDLKey; + s32 Win32Key; + + bool operator<(const SKeyMap& o) const + { + return SDLKey<o.SDLKey; + } + }; + + core::array<SKeyMap> KeyMap; + SDL_SysWMinfo Info; + }; + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SDL_DEVICE_ +#endif // __C_IRR_DEVICE_SDL_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.cpp new file mode 100644 index 0000000..d74c929 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.cpp @@ -0,0 +1,429 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CIrrDeviceStub.h" +#include "ISceneManager.h" +#include "IEventReceiver.h" +#include "IFileSystem.h" +#include "IGUIEnvironment.h" +#include "os.h" +#include "IrrCompileConfig.h" +#include "CTimer.h" +#include "CLogger.h" +#include "irrString.h" +#include "IRandomizer.h" + +namespace irr +{ +//! constructor +CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters& params) +: IrrlichtDevice(), VideoDriver(0), GUIEnvironment(0), SceneManager(0), + Timer(0), CursorControl(0), UserReceiver(params.EventReceiver), + Logger(0), Operator(0), Randomizer(0), FileSystem(0), + InputReceivingSceneManager(0), VideoModeList(0), + CreationParams(params), Close(false) +{ + Timer = new CTimer(params.UsePerformanceTimer); + if (os::Printer::Logger) + { + os::Printer::Logger->grab(); + Logger = (CLogger*)os::Printer::Logger; + Logger->setReceiver(UserReceiver); + } + else + { + Logger = new CLogger(UserReceiver); + os::Printer::Logger = Logger; + } + Logger->setLogLevel(CreationParams.LoggingLevel); + + os::Printer::Logger = Logger; + Randomizer = createDefaultRandomizer(); + + FileSystem = io::createFileSystem(); + VideoModeList = new video::CVideoModeList(); + + core::stringc s = "Irrlicht Engine version "; + s.append(getVersion()); + os::Printer::log(s.c_str(), ELL_INFORMATION); + + checkVersion(params.SDK_version_do_not_use); +} + + +CIrrDeviceStub::~CIrrDeviceStub() +{ + VideoModeList->drop(); + FileSystem->drop(); + + if (GUIEnvironment) + GUIEnvironment->drop(); + + if (VideoDriver) + VideoDriver->drop(); + + if (SceneManager) + SceneManager->drop(); + + if (InputReceivingSceneManager) + InputReceivingSceneManager->drop(); + + if (CursorControl) + CursorControl->drop(); + + if (Operator) + Operator->drop(); + + if (Randomizer) + Randomizer->drop(); + + CursorControl = 0; + + if (Timer) + Timer->drop(); + + if (Logger->drop()) + os::Printer::Logger = 0; +} + + +void CIrrDeviceStub::createGUIAndScene() +{ + #ifdef _IRR_COMPILE_WITH_GUI_ + // create gui environment + GUIEnvironment = gui::createGUIEnvironment(FileSystem, VideoDriver, Operator); + #endif + + // create Scene manager + SceneManager = scene::createSceneManager(VideoDriver, FileSystem, CursorControl, GUIEnvironment); + + setEventReceiver(UserReceiver); +} + + +//! returns the video driver +video::IVideoDriver* CIrrDeviceStub::getVideoDriver() +{ + return VideoDriver; +} + + + +//! return file system +io::IFileSystem* CIrrDeviceStub::getFileSystem() +{ + return FileSystem; +} + + + +//! returns the gui environment +gui::IGUIEnvironment* CIrrDeviceStub::getGUIEnvironment() +{ + return GUIEnvironment; +} + + + +//! returns the scene manager +scene::ISceneManager* CIrrDeviceStub::getSceneManager() +{ + return SceneManager; +} + + +//! \return Returns a pointer to the ITimer object. With it the +//! current Time can be received. +ITimer* CIrrDeviceStub::getTimer() +{ + return Timer; +} + + +//! Returns the version of the engine. +const char* CIrrDeviceStub::getVersion() const +{ + return IRRLICHT_SDK_VERSION; +} + +//! \return Returns a pointer to the mouse cursor control interface. +gui::ICursorControl* CIrrDeviceStub::getCursorControl() +{ + return CursorControl; +} + + +//! \return Returns a pointer to a list with all video modes supported +//! by the gfx adapter. +video::IVideoModeList* CIrrDeviceStub::getVideoModeList() +{ + return VideoModeList; +} + + +//! checks version of sdk and prints warning if there might be a problem +bool CIrrDeviceStub::checkVersion(const char* version) +{ + if (strcmp(getVersion(), version)) + { + core::stringc w; + w = "Warning: The library version of the Irrlicht Engine ("; + w += getVersion(); + w += ") does not match the version the application was compiled with ("; + w += version; + w += "). This may cause problems."; + os::Printer::log(w.c_str(), ELL_WARNING); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + return true; +} + + +//! Compares to the last call of this function to return double and triple clicks. +u32 CIrrDeviceStub::checkSuccessiveClicks(s32 mouseX, s32 mouseY, EMOUSE_INPUT_EVENT inputEvent ) +{ + const s32 MAX_MOUSEMOVE = 3; + + irr::u32 clickTime = getTimer()->getRealTime(); + + if ( (clickTime-MouseMultiClicks.LastClickTime) < MouseMultiClicks.DoubleClickTime + && core::abs_(MouseMultiClicks.LastClick.X - mouseX ) <= MAX_MOUSEMOVE + && core::abs_(MouseMultiClicks.LastClick.Y - mouseY ) <= MAX_MOUSEMOVE + && MouseMultiClicks.CountSuccessiveClicks < 3 + && MouseMultiClicks.LastMouseInputEvent == inputEvent + ) + { + ++MouseMultiClicks.CountSuccessiveClicks; + } + else + { + MouseMultiClicks.CountSuccessiveClicks = 1; + } + + MouseMultiClicks.LastMouseInputEvent = inputEvent; + MouseMultiClicks.LastClickTime = clickTime; + MouseMultiClicks.LastClick.X = mouseX; + MouseMultiClicks.LastClick.Y = mouseY; + + return MouseMultiClicks.CountSuccessiveClicks; +} + + +//! send the event to the right receiver +bool CIrrDeviceStub::postEventFromUser(const SEvent& event) +{ + bool absorbed = false; + + if (UserReceiver) + absorbed = UserReceiver->OnEvent(event); + + if (!absorbed && GUIEnvironment) + absorbed = GUIEnvironment->postEventFromUser(event); + + scene::ISceneManager* inputReceiver = InputReceivingSceneManager; + if (!inputReceiver) + inputReceiver = SceneManager; + + if (!absorbed && inputReceiver) + absorbed = inputReceiver->postEventFromUser(event); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return absorbed; +} + + +//! Sets a new event receiver to receive events +void CIrrDeviceStub::setEventReceiver(IEventReceiver* receiver) +{ + UserReceiver = receiver; + Logger->setReceiver(receiver); + if (GUIEnvironment) + GUIEnvironment->setUserEventReceiver(receiver); +} + + +//! Returns poinhter to the current event receiver. Returns 0 if there is none. +IEventReceiver* CIrrDeviceStub::getEventReceiver() +{ + return UserReceiver; +} + + +//! \return Returns a pointer to the logger. +ILogger* CIrrDeviceStub::getLogger() +{ + return Logger; +} + + +//! Returns the operation system opertator object. +IOSOperator* CIrrDeviceStub::getOSOperator() +{ + return Operator; +} + + +//! Provides access to the engine's currently set randomizer. +IRandomizer* CIrrDeviceStub::getRandomizer() const +{ + return Randomizer; +} + +//! Sets a new randomizer. +void CIrrDeviceStub::setRandomizer(IRandomizer* r) +{ + if (r!=Randomizer) + { + if (Randomizer) + Randomizer->drop(); + Randomizer=r; + if (Randomizer) + Randomizer->grab(); + } +} + +namespace +{ + struct SDefaultRandomizer : public IRandomizer + { + virtual void reset(s32 value=0x0f0f0f0f) + { + os::Randomizer::reset(value); + } + + virtual s32 rand() const + { + return os::Randomizer::rand(); + } + + virtual f32 frand() const + { + return os::Randomizer::frand(); + } + + virtual s32 randMax() const + { + return os::Randomizer::randMax(); + } + }; +} + +//! Creates a new default randomizer. +IRandomizer* CIrrDeviceStub::createDefaultRandomizer() const +{ + IRandomizer* r = new SDefaultRandomizer(); + if (r) + r->reset(); + return r; +} + + +//! Sets the input receiving scene manager. +void CIrrDeviceStub::setInputReceivingSceneManager(scene::ISceneManager* sceneManager) +{ + if (sceneManager) + sceneManager->grab(); + if (InputReceivingSceneManager) + InputReceivingSceneManager->drop(); + + InputReceivingSceneManager = sceneManager; +} + + +//! Checks if the window is running in fullscreen mode +bool CIrrDeviceStub::isFullscreen() const +{ + return CreationParams.Fullscreen; +} + + +//! returns color format +video::ECOLOR_FORMAT CIrrDeviceStub::getColorFormat() const +{ + return video::ECF_R5G6B5; +} + +//! No-op in this implementation +bool CIrrDeviceStub::activateJoysticks(core::array<SJoystickInfo> & joystickInfo) +{ + return false; +} + +/*! +*/ +void CIrrDeviceStub::calculateGammaRamp ( u16 *ramp, f32 gamma, f32 relativebrightness, f32 relativecontrast ) +{ + s32 i; + s32 value; + s32 rbright = (s32) ( relativebrightness * (65535.f / 4 ) ); + f32 rcontrast = 1.f / (255.f - ( relativecontrast * 127.5f ) ); + + gamma = gamma > 0.f ? 1.0f / gamma : 0.f; + + for ( i = 0; i < 256; ++i ) + { + value = (s32)(pow( rcontrast * i, gamma)*65535.f + 0.5f ); + ramp[i] = (u16) core::s32_clamp ( value + rbright, 0, 65535 ); + } + +} + +void CIrrDeviceStub::calculateGammaFromRamp ( f32 &gamma, const u16 *ramp ) +{ + /* The following is adapted from a post by Garrett Bass on OpenGL + Gamedev list, March 4, 2000. + */ + f32 sum = 0.0; + s32 i, count = 0; + + gamma = 1.0; + for ( i = 1; i < 256; ++i ) { + if ( (ramp[i] != 0) && (ramp[i] != 65535) ) { + f32 B = (f32)i / 256.f; + f32 A = ramp[i] / 65535.f; + sum += (f32) ( logf(A) / logf(B) ); + count++; + } + } + if ( count && sum ) { + gamma = 1.0f / (sum / count); + } + +} + +//! Set the current Gamma Value for the Display +bool CIrrDeviceStub::setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) +{ + return false; +} + +//! Get the current Gamma Value for the Display +bool CIrrDeviceStub::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ) +{ + return false; +} + +//! Set the maximal elapsed time between 2 clicks to generate doubleclicks for the mouse. It also affects tripleclick behavior. +void CIrrDeviceStub::setDoubleClickTime( u32 timeMs ) +{ + MouseMultiClicks.DoubleClickTime = timeMs; +} + +//! Get the maximal elapsed time between 2 clicks to generate double- and tripleclicks for the mouse. +u32 CIrrDeviceStub::getDoubleClickTime() const +{ + return MouseMultiClicks.DoubleClickTime; +} + +//! Remove all messages pending in the system message loop +void CIrrDeviceStub::clearSystemMessages() +{ +} + + + +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h new file mode 100644 index 0000000..c6334fe --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h @@ -0,0 +1,186 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_DEVICE_STUB_H_INCLUDED__ +#define __C_IRR_DEVICE_STUB_H_INCLUDED__ + +#include "IrrlichtDevice.h" +#include "IImagePresenter.h" +#include "SIrrCreationParameters.h" +#include "CVideoModeList.h" + +namespace irr +{ + // lots of prototypes: + class ILogger; + class CLogger; + class IRandomizer; + + namespace gui + { + class IGUIEnvironment; + IGUIEnvironment* createGUIEnvironment(io::IFileSystem* fs, + video::IVideoDriver* Driver, IOSOperator* op); + } + + namespace scene + { + ISceneManager* createSceneManager(video::IVideoDriver* driver, + io::IFileSystem* fs, gui::ICursorControl* cc, gui::IGUIEnvironment *gui); + } + + namespace io + { + IFileSystem* createFileSystem(); + } + + namespace video + { + IVideoDriver* createSoftwareDriver(const core::dimension2d<u32>& windowSize, + bool fullscreen, io::IFileSystem* io, + video::IImagePresenter* presenter); + IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, video::IImagePresenter* presenter); + IVideoDriver* createNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize); + } + + + + //! Stub for an Irrlicht Device implementation + class CIrrDeviceStub : public IrrlichtDevice + { + public: + + //! constructor + CIrrDeviceStub(const SIrrlichtCreationParameters& param); + + //! destructor + virtual ~CIrrDeviceStub(); + + //! returns the video driver + virtual video::IVideoDriver* getVideoDriver(); + + //! return file system + virtual io::IFileSystem* getFileSystem(); + + //! returns the gui environment + virtual gui::IGUIEnvironment* getGUIEnvironment(); + + //! returns the scene manager + virtual scene::ISceneManager* getSceneManager(); + + //! \return Returns a pointer to the mouse cursor control interface. + virtual gui::ICursorControl* getCursorControl(); + + //! Returns a pointer to a list with all video modes supported by the gfx adapter. + virtual video::IVideoModeList* getVideoModeList(); + + //! Returns a pointer to the ITimer object. With it the current Time can be received. + virtual ITimer* getTimer(); + + //! Returns the version of the engine. + virtual const char* getVersion() const; + + //! send the event to the right receiver + virtual bool postEventFromUser(const SEvent& event); + + //! Sets a new event receiver to receive events + virtual void setEventReceiver(IEventReceiver* receiver); + + //! Returns pointer to the current event receiver. Returns 0 if there is none. + virtual IEventReceiver* getEventReceiver(); + + //! Sets the input receiving scene manager. + /** If set to null, the main scene manager (returned by GetSceneManager()) will receive the input */ + virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager); + + //! Returns a pointer to the logger. + virtual ILogger* getLogger(); + + //! Provides access to the engine's currently set randomizer. + virtual IRandomizer* getRandomizer() const; + + //! Sets a new randomizer. + virtual void setRandomizer(IRandomizer* r); + + //! Creates a new default randomizer. + virtual IRandomizer* createDefaultRandomizer() const; + + //! Returns the operation system opertator object. + virtual IOSOperator* getOSOperator(); + + //! Checks if the window is running in fullscreen mode. + virtual bool isFullscreen() const; + + //! get color format of the current window + virtual video::ECOLOR_FORMAT getColorFormat() const; + + //! Activate any joysticks, and generate events for them. + virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo); + + //! Set the current Gamma Value for the Display + virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ); + + //! Get the current Gamma Value for the Display + virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ); + + //! Set the maximal elapsed time between 2 clicks to generate doubleclicks for the mouse. It also affects tripleclick behavior. + //! When set to 0 no double- and tripleclicks will be generated. + virtual void setDoubleClickTime( u32 timeMs ); + + //! Get the maximal elapsed time between 2 clicks to generate double- and tripleclicks for the mouse. + virtual u32 getDoubleClickTime() const; + + //! Remove all messages pending in the system message loop + virtual void clearSystemMessages(); + + + protected: + + void createGUIAndScene(); + + //! checks version of SDK and prints warning if there might be a problem + bool checkVersion(const char* version); + + //! Compares to the last call of this function to return double and triple clicks. + //! \return Returns only 1,2 or 3. A 4th click will start with 1 again. + virtual u32 checkSuccessiveClicks(s32 mouseX, s32 mouseY, EMOUSE_INPUT_EVENT inputEvent ); + + void calculateGammaRamp ( u16 *ramp, f32 gamma, f32 relativebrightness, f32 relativecontrast ); + void calculateGammaFromRamp ( f32 &gamma, const u16 *ramp ); + + video::IVideoDriver* VideoDriver; + gui::IGUIEnvironment* GUIEnvironment; + scene::ISceneManager* SceneManager; + ITimer* Timer; + gui::ICursorControl* CursorControl; + IEventReceiver* UserReceiver; + CLogger* Logger; + IOSOperator* Operator; + IRandomizer* Randomizer; + io::IFileSystem* FileSystem; + scene::ISceneManager* InputReceivingSceneManager; + + struct SMouseMultiClicks + { + SMouseMultiClicks() + : DoubleClickTime(500), CountSuccessiveClicks(0), LastClickTime(0), LastMouseInputEvent(EMIE_COUNT) + {} + + u32 DoubleClickTime; + u32 CountSuccessiveClicks; + u32 LastClickTime; + core::position2di LastClick; + EMOUSE_INPUT_EVENT LastMouseInputEvent; + }; + SMouseMultiClicks MouseMultiClicks; + video::CVideoModeList* VideoModeList; + SIrrlichtCreationParameters CreationParams; + bool Close; + }; + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.cpp new file mode 100644 index 0000000..93af802 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.cpp @@ -0,0 +1,2068 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + +#include "CIrrDeviceWin32.h" +#include "IEventReceiver.h" +#include "irrList.h" +#include "os.h" + +#include "CTimer.h" +#include "irrString.h" +#include "COSOperator.h" +#include "dimension2d.h" +#include "IGUISpriteBank.h" +#include <winuser.h> +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) +#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ +#define DIRECTINPUT_VERSION 0x0800 +#include <dinput.h> +#ifdef _MSC_VER +#pragma comment(lib, "dinput8.lib") +#pragma comment(lib, "dxguid.lib") +#endif +#else +#ifdef _MSC_VER +#pragma comment(lib, "winmm.lib") +#endif +#endif +#endif + +namespace irr +{ + namespace video + { + #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + IVideoDriver* createDirectX8Driver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window); + #endif + + #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + IVideoDriver* createDirectX9Driver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window); + #endif + + #ifdef _IRR_COMPILE_WITH_OPENGL_ + IVideoDriver* createOpenGLDriver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceWin32* device); + #endif + } +} // end namespace irr + +namespace irr +{ +struct SJoystickWin32Control +{ + CIrrDeviceWin32* Device; + +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_) + IDirectInput8* DirectInputDevice; +#endif +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + struct JoystickInfo + { + u32 Index; +#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ + core::stringc Name; + GUID guid; + LPDIRECTINPUTDEVICE8 lpdijoy; + DIDEVCAPS devcaps; + u8 axisValid[8]; +#else + JOYCAPS Caps; +#endif + }; + core::array<JoystickInfo> ActiveJoysticks; +#endif + + SJoystickWin32Control(CIrrDeviceWin32* dev) : Device(dev) + { +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_) + DirectInputDevice=0; + if (DI_OK != (DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&DirectInputDevice, NULL))) + { + os::Printer::log("Could not create DirectInput8 Object", ELL_WARNING); + return; + } +#endif + } + ~SJoystickWin32Control() + { +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_) + for(u32 joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + LPDIRECTINPUTDEVICE8 dev = ActiveJoysticks[joystick].lpdijoy; + if (dev) + { + dev->Unacquire(); + } + dev->Release(); + } + + if (DirectInputDevice) + DirectInputDevice->Release(); +#endif + } + +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_) + static BOOL CALLBACK EnumJoysticks(LPCDIDEVICEINSTANCE lpddi, LPVOID cp) + { + SJoystickWin32Control* p=(SJoystickWin32Control*)cp; + p->directInputAddJoystick(lpddi); + return DIENUM_CONTINUE; + } + void directInputAddJoystick(LPCDIDEVICEINSTANCE lpddi) + { + //Get the GUID of the joystuck + const GUID guid = lpddi->guidInstance; + + JoystickInfo activeJoystick; + activeJoystick.Index=ActiveJoysticks.size(); + activeJoystick.guid=guid; + activeJoystick.Name=lpddi->tszProductName; + if (FAILED(DirectInputDevice->CreateDevice(guid, &activeJoystick.lpdijoy, NULL))) + { + os::Printer::log("Could not create DirectInput device", ELL_WARNING); + return; + } + + activeJoystick.devcaps.dwSize=sizeof(activeJoystick.devcaps); + if (FAILED(activeJoystick.lpdijoy->GetCapabilities(&activeJoystick.devcaps))) + { + os::Printer::log("Could not create DirectInput device", ELL_WARNING); + return; + } + + if (FAILED(activeJoystick.lpdijoy->SetCooperativeLevel(Device->HWnd, DISCL_BACKGROUND | DISCL_EXCLUSIVE))) + { + os::Printer::log("Could not set DirectInput device cooperative level", ELL_WARNING); + return; + } + + if (FAILED(activeJoystick.lpdijoy->SetDataFormat(&c_dfDIJoystick2))) + { + os::Printer::log("Could not set DirectInput device data format", ELL_WARNING); + return; + } + + if (FAILED(activeJoystick.lpdijoy->Acquire())) + { + os::Printer::log("Could not set DirectInput cooperative level", ELL_WARNING); + return; + } + + DIJOYSTATE2 info; + if (FAILED(activeJoystick.lpdijoy->GetDeviceState(sizeof(info),&info))) + { + os::Printer::log("Could not read DirectInput device state", ELL_WARNING); + return; + } + + ZeroMemory(activeJoystick.axisValid,sizeof(activeJoystick.axisValid)); + activeJoystick.axisValid[0]= (info.lX!=0) ? 1 : 0; + activeJoystick.axisValid[1]= (info.lY!=0) ? 1 : 0; + activeJoystick.axisValid[2]= (info.lZ!=0) ? 1 : 0; + activeJoystick.axisValid[3]= (info.lRx!=0) ? 1 : 0; + activeJoystick.axisValid[4]= (info.lRy!=0) ? 1 : 0; + activeJoystick.axisValid[5]= (info.lRz!=0) ? 1 : 0; + + int caxis=0; + for (u8 i=0; i<6; i++) + { + if (activeJoystick.axisValid[i]) + caxis++; + } + + for (u8 i=0; i<(activeJoystick.devcaps.dwAxes)-caxis; i++) + { + if (i+caxis < 8) + activeJoystick.axisValid[i+caxis]=1; + } + + ActiveJoysticks.push_back(activeJoystick); + } +#endif + +void pollJoysticks() +{ +#if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ + if(0 == ActiveJoysticks.size()) + return; + + u32 joystick; + DIJOYSTATE2 info; + + for(joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + // needs to be reset for each joystick + // request ALL values and POV as continuous if possible + + const DIDEVCAPS & caps = ActiveJoysticks[joystick].devcaps; + // if no POV is available don't ask for POV values + + if (!FAILED(ActiveJoysticks[joystick].lpdijoy->GetDeviceState(sizeof(info),&info))) + { + SEvent event; + + event.EventType = irr::EET_JOYSTICK_INPUT_EVENT; + event.JoystickEvent.Joystick = (u8)joystick; + + event.JoystickEvent.POV = (u16)info.rgdwPOV[0]; + // set to undefined if no POV value was returned or the value + // is out of range + if ((caps.dwPOVs==0) || (event.JoystickEvent.POV > 35900)) + event.JoystickEvent.POV = 65535; + + for(int axis = 0; axis < SEvent::SJoystickEvent::NUMBER_OF_AXES; ++axis) + event.JoystickEvent.Axis[axis] = 0; + + u16 dxAxis=0; + u16 irrAxis=0; + + while (dxAxis < 6 && irrAxis <caps.dwAxes) + { + bool axisFound=0; + s32 axisValue=0; + + switch (dxAxis) + { + case 0: + axisValue=info.lX; + break; + case 1: + axisValue=info.lY; + break; + case 2: + axisValue=info.lZ; + break; + case 3: + axisValue=info.lRx; + break; + case 4: + axisValue=info.lRy; + break; + case 5: + axisValue=info.lRz; + break; + case 6: + axisValue=info.rglSlider[0]; + break; + case 7: + axisValue=info.rglSlider[1]; + break; + default: + break; + } + + if (ActiveJoysticks[joystick].axisValid[dxAxis]>0) + axisFound=1; + + if (axisFound) + { + s32 val=axisValue - 32768; + + if (val <-32767) val=-32767; + if (val > 32767) val=32767; + event.JoystickEvent.Axis[irrAxis]=(s16)(val); + irrAxis++; + } + + dxAxis++; + } + + u32 buttons=0; + BYTE* bytebuttons=info.rgbButtons; + for (u16 i=0; i<32; i++) + { + if (bytebuttons[i] >0) + { + buttons |= (1 << i); + } + } + event.JoystickEvent.ButtonStates = buttons; + + (void)Device->postEventFromUser(event); + } + } +#else + if (0 == ActiveJoysticks.size()) + return; + + u32 joystick; + JOYINFOEX info; + + for(joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + // needs to be reset for each joystick + // request ALL values and POV as continuous if possible + info.dwSize = sizeof(info); + info.dwFlags = JOY_RETURNALL|JOY_RETURNPOVCTS; + const JOYCAPS & caps = ActiveJoysticks[joystick].Caps; + // if no POV is available don't ask for POV values + if (!(caps.wCaps & JOYCAPS_HASPOV)) + info.dwFlags &= ~(JOY_RETURNPOV|JOY_RETURNPOVCTS); + if(JOYERR_NOERROR == joyGetPosEx(ActiveJoysticks[joystick].Index, &info)) + { + SEvent event; + + event.EventType = irr::EET_JOYSTICK_INPUT_EVENT; + event.JoystickEvent.Joystick = (u8)joystick; + + event.JoystickEvent.POV = (u16)info.dwPOV; + // set to undefined if no POV value was returned or the value + // is out of range + if (!(info.dwFlags & JOY_RETURNPOV) || (event.JoystickEvent.POV > 35900)) + event.JoystickEvent.POV = 65535; + + for(int axis = 0; axis < SEvent::SJoystickEvent::NUMBER_OF_AXES; ++axis) + event.JoystickEvent.Axis[axis] = 0; + + event.JoystickEvent.ButtonStates = info.dwButtons; + + switch(caps.wNumAxes) + { + default: + case 6: + event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_V] = + (s16)((65535 * (info.dwVpos - caps.wVmin)) / (caps.wVmax - caps.wVmin) - 32768); + + case 5: + event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_U] = + (s16)((65535 * (info.dwUpos - caps.wUmin)) / (caps.wUmax - caps.wUmin) - 32768); + + case 4: + event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_R] = + (s16)((65535 * (info.dwRpos - caps.wRmin)) / (caps.wRmax - caps.wRmin) - 32768); + + case 3: + event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_Z] = + (s16)((65535 * (info.dwZpos - caps.wZmin)) / (caps.wZmax - caps.wZmin) - 32768); + + case 2: + event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_Y] = + (s16)((65535 * (info.dwYpos - caps.wYmin)) / (caps.wYmax - caps.wYmin) - 32768); + + case 1: + event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_X] = + (s16)((65535 * (info.dwXpos - caps.wXmin)) / (caps.wXmax - caps.wXmin) - 32768); + } + + (void)Device->postEventFromUser(event); + } + } +#endif +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +} + +bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo) +{ +#if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ + if (!DirectInputDevice || (DirectInputDevice->EnumDevices(DI8DEVCLASS_GAMECTRL, SJoystickWin32Control::EnumJoysticks, this, DIEDFL_ATTACHEDONLY ))) + { + os::Printer::log("Could not enum DirectInput8 controllers", ELL_WARNING); + return false; + } + + for(u32 joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + JoystickInfo& activeJoystick = ActiveJoysticks[joystick]; + SJoystickInfo info; + info.Axes=activeJoystick.devcaps.dwAxes; + info.Buttons=activeJoystick.devcaps.dwButtons; + info.Name=activeJoystick.Name; + info.PovHat = (activeJoystick.devcaps.dwPOVs != 0) + ? SJoystickInfo::POV_HAT_PRESENT : SJoystickInfo::POV_HAT_ABSENT; + joystickInfo.push_back(info); + } + return true; +#else + joystickInfo.clear(); + ActiveJoysticks.clear(); + + const u32 numberOfJoysticks = ::joyGetNumDevs(); + JOYINFOEX info; + info.dwSize = sizeof(info); + info.dwFlags = JOY_RETURNALL; + + JoystickInfo activeJoystick; + SJoystickInfo returnInfo; + + joystickInfo.reallocate(numberOfJoysticks); + ActiveJoysticks.reallocate(numberOfJoysticks); + + u32 joystick = 0; + for(; joystick < numberOfJoysticks; ++joystick) + { + if(JOYERR_NOERROR == joyGetPosEx(joystick, &info) + && + JOYERR_NOERROR == joyGetDevCaps(joystick, + &activeJoystick.Caps, + sizeof(activeJoystick.Caps))) + { + activeJoystick.Index = joystick; + ActiveJoysticks.push_back(activeJoystick); + + returnInfo.Joystick = (u8)joystick; + returnInfo.Axes = activeJoystick.Caps.wNumAxes; + returnInfo.Buttons = activeJoystick.Caps.wNumButtons; + returnInfo.Name = activeJoystick.Caps.szPname; + returnInfo.PovHat = ((activeJoystick.Caps.wCaps & JOYCAPS_HASPOV) == JOYCAPS_HASPOV) + ? SJoystickInfo::POV_HAT_PRESENT : SJoystickInfo::POV_HAT_ABSENT; + + joystickInfo.push_back(returnInfo); + } + } + + for(joystick = 0; joystick < joystickInfo.size(); ++joystick) + { + char logString[256]; + (void)sprintf(logString, "Found joystick %d, %d axes, %d buttons '%s'", + joystick, joystickInfo[joystick].Axes, + joystickInfo[joystick].Buttons, joystickInfo[joystick].Name.c_str()); + os::Printer::log(logString, ELL_INFORMATION); + } + + return true; +#endif +#else + return false; +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +} +}; +} // end namespace irr + +// Get the codepage from the locale language id +// Based on the table from http://www.science.co.il/Language/Locale-Codes.asp?s=decimal +static unsigned int LocaleIdToCodepage(unsigned int lcid) +{ + switch ( lcid ) + { + case 1098: // Telugu + case 1095: // Gujarati + case 1094: // Punjabi + case 1103: // Sanskrit + case 1111: // Konkani + case 1114: // Syriac + case 1099: // Kannada + case 1102: // Marathi + case 1125: // Divehi + case 1067: // Armenian + case 1081: // Hindi + case 1079: // Georgian + case 1097: // Tamil + return 0; + case 1054: // Thai + return 874; + case 1041: // Japanese + return 932; + case 2052: // Chinese (PRC) + case 4100: // Chinese (Singapore) + return 936; + case 1042: // Korean + return 949; + case 5124: // Chinese (Macau S.A.R.) + case 3076: // Chinese (Hong Kong S.A.R.) + case 1028: // Chinese (Taiwan) + return 950; + case 1048: // Romanian + case 1060: // Slovenian + case 1038: // Hungarian + case 1051: // Slovak + case 1045: // Polish + case 1052: // Albanian + case 2074: // Serbian (Latin) + case 1050: // Croatian + case 1029: // Czech + return 1250; + case 1104: // Mongolian (Cyrillic) + case 1071: // FYRO Macedonian + case 2115: // Uzbek (Cyrillic) + case 1058: // Ukrainian + case 2092: // Azeri (Cyrillic) + case 1092: // Tatar + case 1087: // Kazakh + case 1059: // Belarusian + case 1088: // Kyrgyz (Cyrillic) + case 1026: // Bulgarian + case 3098: // Serbian (Cyrillic) + case 1049: // Russian + return 1251; + case 8201: // English (Jamaica) + case 3084: // French (Canada) + case 1036: // French (France) + case 5132: // French (Luxembourg) + case 5129: // English (New Zealand) + case 6153: // English (Ireland) + case 1043: // Dutch (Netherlands) + case 9225: // English (Caribbean) + case 4108: // French (Switzerland) + case 4105: // English (Canada) + case 1110: // Galician + case 10249: // English (Belize) + case 3079: // German (Austria) + case 6156: // French (Monaco) + case 12297: // English (Zimbabwe) + case 1069: // Basque + case 2067: // Dutch (Belgium) + case 2060: // French (Belgium) + case 1035: // Finnish + case 1080: // Faroese + case 1031: // German (Germany) + case 3081: // English (Australia) + case 1033: // English (United States) + case 2057: // English (United Kingdom) + case 1027: // Catalan + case 11273: // English (Trinidad) + case 7177: // English (South Africa) + case 1030: // Danish + case 13321: // English (Philippines) + case 15370: // Spanish (Paraguay) + case 9226: // Spanish (Colombia) + case 5130: // Spanish (Costa Rica) + case 7178: // Spanish (Dominican Republic) + case 12298: // Spanish (Ecuador) + case 17418: // Spanish (El Salvador) + case 4106: // Spanish (Guatemala) + case 18442: // Spanish (Honduras) + case 3082: // Spanish (International Sort) + case 13322: // Spanish (Chile) + case 19466: // Spanish (Nicaragua) + case 2058: // Spanish (Mexico) + case 10250: // Spanish (Peru) + case 20490: // Spanish (Puerto Rico) + case 1034: // Spanish (Traditional Sort) + case 14346: // Spanish (Uruguay) + case 8202: // Spanish (Venezuela) + case 1089: // Swahili + case 1053: // Swedish + case 2077: // Swedish (Finland) + case 5127: // German (Liechtenstein) + case 1078: // Afrikaans + case 6154: // Spanish (Panama) + case 4103: // German (Luxembourg) + case 16394: // Spanish (Bolivia) + case 2055: // German (Switzerland) + case 1039: // Icelandic + case 1057: // Indonesian + case 1040: // Italian (Italy) + case 2064: // Italian (Switzerland) + case 2068: // Norwegian (Nynorsk) + case 11274: // Spanish (Argentina) + case 1046: // Portuguese (Brazil) + case 1044: // Norwegian (Bokmal) + case 1086: // Malay (Malaysia) + case 2110: // Malay (Brunei Darussalam) + case 2070: // Portuguese (Portugal) + return 1252; + case 1032: // Greek + return 1253; + case 1091: // Uzbek (Latin) + case 1068: // Azeri (Latin) + case 1055: // Turkish + return 1254; + case 1037: // Hebrew + return 1255; + case 5121: // Arabic (Algeria) + case 15361: // Arabic (Bahrain) + case 9217: // Arabic (Yemen) + case 3073: // Arabic (Egypt) + case 2049: // Arabic (Iraq) + case 11265: // Arabic (Jordan) + case 13313: // Arabic (Kuwait) + case 12289: // Arabic (Lebanon) + case 4097: // Arabic (Libya) + case 6145: // Arabic (Morocco) + case 8193: // Arabic (Oman) + case 16385: // Arabic (Qatar) + case 1025: // Arabic (Saudi Arabia) + case 10241: // Arabic (Syria) + case 14337: // Arabic (U.A.E.) + case 1065: // Farsi + case 1056: // Urdu + case 7169: // Arabic (Tunisia) + return 1256; + case 1061: // Estonian + case 1062: // Latvian + case 1063: // Lithuanian + return 1257; + case 1066: // Vietnamese + return 1258; + } + return 65001; // utf-8 +} + +namespace +{ + struct SEnvMapper + { + HWND hWnd; + irr::CIrrDeviceWin32* irrDev; + }; + irr::core::list<SEnvMapper> EnvMap; + + HKL KEYBOARD_INPUT_HKL=0; + unsigned int KEYBOARD_INPUT_CODEPAGE = 1252; +} + +SEnvMapper* getEnvMapperFromHWnd(HWND hWnd) +{ + irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin(); + for (; it!= EnvMap.end(); ++it) + if ((*it).hWnd == hWnd) + return &(*it); + + return 0; +} + + +irr::CIrrDeviceWin32* getDeviceFromHWnd(HWND hWnd) +{ + irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin(); + for (; it!= EnvMap.end(); ++it) + if ((*it).hWnd == hWnd) + return (*it).irrDev; + + return 0; +} + + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + #ifndef WM_MOUSEWHEEL + #define WM_MOUSEWHEEL 0x020A + #endif + #ifndef WHEEL_DELTA + #define WHEEL_DELTA 120 + #endif + + irr::CIrrDeviceWin32* dev = 0; + irr::SEvent event; + + static irr::s32 ClickCount=0; + if (GetCapture() != hWnd && ClickCount > 0) + ClickCount = 0; + + + struct messageMap + { + irr::s32 group; + UINT winMessage; + irr::s32 irrMessage; + }; + + static messageMap mouseMap[] = + { + {0, WM_LBUTTONDOWN, irr::EMIE_LMOUSE_PRESSED_DOWN}, + {1, WM_LBUTTONUP, irr::EMIE_LMOUSE_LEFT_UP}, + {0, WM_RBUTTONDOWN, irr::EMIE_RMOUSE_PRESSED_DOWN}, + {1, WM_RBUTTONUP, irr::EMIE_RMOUSE_LEFT_UP}, + {0, WM_MBUTTONDOWN, irr::EMIE_MMOUSE_PRESSED_DOWN}, + {1, WM_MBUTTONUP, irr::EMIE_MMOUSE_LEFT_UP}, + {2, WM_MOUSEMOVE, irr::EMIE_MOUSE_MOVED}, + {3, WM_MOUSEWHEEL, irr::EMIE_MOUSE_WHEEL}, + {-1, 0, 0} + }; + + // handle grouped events + messageMap * m = mouseMap; + while ( m->group >=0 && m->winMessage != message ) + m += 1; + + if ( m->group >= 0 ) + { + if ( m->group == 0 ) // down + { + ClickCount++; + SetCapture(hWnd); + } + else + if ( m->group == 1 ) // up + { + ClickCount--; + if (ClickCount<1) + { + ClickCount=0; + ReleaseCapture(); + } + } + + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = (irr::EMOUSE_INPUT_EVENT) m->irrMessage; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; +#if(_WIN32_WINNT >= 0x0500) + if (wParam & MK_XBUTTON1) + event.MouseInput.ButtonStates |= irr::EMBSM_EXTRA1; + if (wParam & MK_XBUTTON2) + event.MouseInput.ButtonStates |= irr::EMBSM_EXTRA2; +#endif + event.MouseInput.Wheel = 0.f; + + // wheel + if ( m->group == 3 ) + { + POINT p; // fixed by jox + p.x = 0; p.y = 0; + ClientToScreen(hWnd, &p); + event.MouseInput.X -= p.x; + event.MouseInput.Y -= p.y; + event.MouseInput.Wheel = ((irr::f32)((short)HIWORD(wParam))) / (irr::f32)WHEEL_DELTA; + } + + dev = getDeviceFromHWnd(hWnd); + if (dev) + { + dev->postEventFromUser(event); + + if ( event.MouseInput.Event >= irr::EMIE_LMOUSE_PRESSED_DOWN && event.MouseInput.Event <= irr::EMIE_MMOUSE_PRESSED_DOWN ) + { + irr::u32 clicks = dev->checkSuccessiveClicks(event.MouseInput.X, event.MouseInput.Y, event.MouseInput.Event); + if ( clicks == 2 ) + { + event.MouseInput.Event = (irr::EMOUSE_INPUT_EVENT)(irr::EMIE_LMOUSE_DOUBLE_CLICK + event.MouseInput.Event-irr::EMIE_LMOUSE_PRESSED_DOWN); + dev->postEventFromUser(event); + } + else if ( clicks == 3 ) + { + event.MouseInput.Event = (irr::EMOUSE_INPUT_EVENT)(irr::EMIE_LMOUSE_TRIPLE_CLICK + event.MouseInput.Event-irr::EMIE_LMOUSE_PRESSED_DOWN); + dev->postEventFromUser(event); + } + } + } + return 0; + } + + switch (message) + { + case WM_PAINT: + { + PAINTSTRUCT ps; + BeginPaint(hWnd, &ps); + EndPaint(hWnd, &ps); + } + return 0; + + case WM_ERASEBKGND: + return 0; + + case WM_SYSKEYDOWN: + case WM_SYSKEYUP: + case WM_KEYDOWN: + case WM_KEYUP: + { + BYTE allKeys[256]; + + event.EventType = irr::EET_KEY_INPUT_EVENT; + event.KeyInput.Key = (irr::EKEY_CODE)wParam; + event.KeyInput.PressedDown = (message==WM_KEYDOWN || message == WM_SYSKEYDOWN); + + const UINT MY_MAPVK_VSC_TO_VK_EX = 3; // MAPVK_VSC_TO_VK_EX should be in SDK according to MSDN, but isn't in mine. + if ( event.KeyInput.Key == irr::KEY_SHIFT ) + { + // this will fail on systems before windows NT/2000/XP, not sure _what_ will return there instead. + event.KeyInput.Key = (irr::EKEY_CODE)MapVirtualKey( ((lParam>>16) & 255), MY_MAPVK_VSC_TO_VK_EX ); + } + if ( event.KeyInput.Key == irr::KEY_CONTROL ) + { + event.KeyInput.Key = (irr::EKEY_CODE)MapVirtualKey( ((lParam>>16) & 255), MY_MAPVK_VSC_TO_VK_EX ); + // some keyboards will just return LEFT for both - left and right keys. So also check extend bit. + if (lParam & 0x1000000) + event.KeyInput.Key = irr::KEY_RCONTROL; + } + if ( event.KeyInput.Key == irr::KEY_MENU ) + { + event.KeyInput.Key = (irr::EKEY_CODE)MapVirtualKey( ((lParam>>16) & 255), MY_MAPVK_VSC_TO_VK_EX ); + if (lParam & 0x1000000) + event.KeyInput.Key = irr::KEY_RMENU; + } + + GetKeyboardState(allKeys); + + event.KeyInput.Shift = ((allKeys[VK_SHIFT] & 0x80)!=0); + event.KeyInput.Control = ((allKeys[VK_CONTROL] & 0x80)!=0); + + // Handle unicode and deadkeys in a way that works since Windows 95 and nt4.0 + // Using ToUnicode instead would be shorter, but would to my knowledge not run on 95 and 98. + WORD keyChars[2]; + UINT scanCode = HIWORD(lParam); + int conversionResult = ToAsciiEx(wParam,scanCode,allKeys,keyChars,0,KEYBOARD_INPUT_HKL); + if (conversionResult == 1) + { + WORD unicodeChar; + MultiByteToWideChar( + KEYBOARD_INPUT_CODEPAGE, + MB_PRECOMPOSED, // default + (LPCSTR)keyChars, + sizeof(keyChars), + (WCHAR*)&unicodeChar, + 1 ); + event.KeyInput.Char = unicodeChar; + } + else + event.KeyInput.Char = 0; + + // allow composing characters like '@' with Alt Gr on non-US keyboards + if ((allKeys[VK_MENU] & 0x80) != 0) + event.KeyInput.Control = 0; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + + if (message == WM_SYSKEYDOWN || message == WM_SYSKEYUP) + return DefWindowProc(hWnd, message, wParam, lParam); + else + return 0; + } + + case WM_SIZE: + { + // resize + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->OnResized(); + } + return 0; + + case WM_DESTROY: + PostQuitMessage(0); + return 0; + + case WM_SYSCOMMAND: + // prevent screensaver or monitor powersave mode from starting + if ((wParam & 0xFFF0) == SC_SCREENSAVE || + (wParam & 0xFFF0) == SC_MONITORPOWER || + (wParam & 0xFFF0) == SC_KEYMENU + ) + return 0; + + break; + + case WM_ACTIVATE: + // we need to take care for screen changes, e.g. Alt-Tab + dev = getDeviceFromHWnd(hWnd); + if (dev && dev->isFullscreen()) + { + if ((wParam&0xFF)==WA_INACTIVE) + { + // If losing focus we minimize the app to show other one + ShowWindow(hWnd,SW_MINIMIZE); + // and switch back to default resolution + dev->switchToFullScreen(true); + } + else + { + // Otherwise we retore the fullscreen Irrlicht app + SetForegroundWindow(hWnd); + ShowWindow(hWnd, SW_RESTORE); + // and set the fullscreen resolution again + dev->switchToFullScreen(); + } + } + break; + + case WM_USER: + event.EventType = irr::EET_USER_EVENT; + event.UserEvent.UserData1 = (irr::s32)wParam; + event.UserEvent.UserData2 = (irr::s32)lParam; + dev = getDeviceFromHWnd(hWnd); + + if (dev) + dev->postEventFromUser(event); + + return 0; + + case WM_SETCURSOR: + // because Windows forgot about that in the meantime + dev = getDeviceFromHWnd(hWnd); + if (dev) + { + dev->getCursorControl()->setActiveIcon( dev->getCursorControl()->getActiveIcon() ); + dev->getCursorControl()->setVisible( dev->getCursorControl()->isVisible() ); + } + break; + + case WM_INPUTLANGCHANGE: + // get the new codepage used for keyboard input + KEYBOARD_INPUT_HKL = GetKeyboardLayout(0); + KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) ); + return 0; + } + return DefWindowProc(hWnd, message, wParam, lParam); +} + + +namespace irr +{ + +//! constructor +CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) +: CIrrDeviceStub(params), HWnd(0), ChangedToFullScreen(false), Resized(false), + ExternalWindow(false), Win32CursorControl(0), JoyControl(0) +{ + #ifdef _DEBUG + setDebugName("CIrrDeviceWin32"); + #endif + + // get windows version and create OS operator + core::stringc winversion; + getWindowsVersion(winversion); + Operator = new COSOperator(winversion); + os::Printer::log(winversion.c_str(), ELL_INFORMATION); + + // get handle to exe file + HINSTANCE hInstance = GetModuleHandle(0); + + // Store original desktop mode. + + memset(&DesktopMode, 0, sizeof(DesktopMode)); + DesktopMode.dmSize = sizeof(DesktopMode); + + EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &DesktopMode); + + // create the window if we need to and we do not use the null device + if (!CreationParams.WindowId && CreationParams.DriverType != video::EDT_NULL) + { + const fschar_t* ClassName = __TEXT("CIrrDeviceWin32"); + + // Register Class + WNDCLASSEX wcex; + wcex.cbSize = sizeof(WNDCLASSEX); + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = NULL; + wcex.hCursor = 0; // LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = 0; + wcex.lpszClassName = ClassName; + wcex.hIconSm = 0; + + // if there is an icon, load it + wcex.hIcon = (HICON)LoadImage(hInstance, __TEXT("irrlicht.ico"), IMAGE_ICON, 0,0, LR_LOADFROMFILE); + + RegisterClassEx(&wcex); + + // calculate client size + + RECT clientSize; + clientSize.top = 0; + clientSize.left = 0; + clientSize.right = CreationParams.WindowSize.Width; + clientSize.bottom = CreationParams.WindowSize.Height; + + DWORD style = WS_POPUP; + + if (!CreationParams.Fullscreen) + style = WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + + AdjustWindowRect(&clientSize, style, FALSE); + + const s32 realWidth = clientSize.right - clientSize.left; + const s32 realHeight = clientSize.bottom - clientSize.top; + + s32 windowLeft = (GetSystemMetrics(SM_CXSCREEN) - realWidth) / 2; + s32 windowTop = (GetSystemMetrics(SM_CYSCREEN) - realHeight) / 2; + + if ( windowLeft < 0 ) + windowLeft = 0; + if ( windowTop < 0 ) + windowTop = 0; // make sure window menus are in screen on creation + + if (CreationParams.Fullscreen) + { + windowLeft = 0; + windowTop = 0; + } + + // create window + + HWnd = CreateWindow( ClassName, __TEXT(""), style, windowLeft, windowTop, + realWidth, realHeight, NULL, NULL, hInstance, NULL); + CreationParams.WindowId = HWnd; +// CreationParams.WindowSize.Width = realWidth; +// CreationParams.WindowSize.Height = realHeight; + + ShowWindow(HWnd, SW_SHOWNORMAL); + UpdateWindow(HWnd); + + // fix ugly ATI driver bugs. Thanks to ariaci + MoveWindow(HWnd, windowLeft, windowTop, realWidth, realHeight, TRUE); + + // make sure everything gets updated to the real sizes + Resized = true; + } + else if (CreationParams.WindowId) + { + // attach external window + HWnd = static_cast<HWND>(CreationParams.WindowId); + RECT r; + GetWindowRect(HWnd, &r); + CreationParams.WindowSize.Width = r.right - r.left; + CreationParams.WindowSize.Height = r.bottom - r.top; + CreationParams.Fullscreen = false; + ExternalWindow = true; + } + + // create cursor control + + Win32CursorControl = new CCursorControl(this, CreationParams.WindowSize, HWnd, CreationParams.Fullscreen); + CursorControl = Win32CursorControl; + JoyControl = new SJoystickWin32Control(this); + + // initialize doubleclicks with system values + MouseMultiClicks.DoubleClickTime = GetDoubleClickTime(); + + // create driver + + createDriver(); + + if (VideoDriver) + createGUIAndScene(); + + // register environment + + SEnvMapper em; + em.irrDev = this; + em.hWnd = HWnd; + EnvMap.push_back(em); + + // set this as active window + if (!ExternalWindow) + { + SetActiveWindow(HWnd); + SetForegroundWindow(HWnd); + } + + // get the codepage used for keyboard input + KEYBOARD_INPUT_HKL = GetKeyboardLayout(0); + KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) ); + + // inform driver about the window size etc. + resizeIfNecessary(); +} + + +//! destructor +CIrrDeviceWin32::~CIrrDeviceWin32() +{ + delete JoyControl; + + // unregister environment + + irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin(); + for (; it!= EnvMap.end(); ++it) + { + if ((*it).hWnd == HWnd) + { + EnvMap.erase(it); + break; + } + } + + switchToFullScreen(true); +} + + +//! create the driver +void CIrrDeviceWin32::createDriver() +{ + switch(CreationParams.DriverType) + { + case video::EDT_DIRECT3D8: + #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + + VideoDriver = video::createDirectX8Driver(CreationParams, FileSystem, HWnd); + + if (!VideoDriver) + { + os::Printer::log("Could not create DIRECT3D8 Driver.", ELL_ERROR); + } + #else + os::Printer::log("DIRECT3D8 Driver was not compiled into this dll. Try another one.", ELL_ERROR); + #endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + + break; + + case video::EDT_DIRECT3D9: + #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + + VideoDriver = video::createDirectX9Driver(CreationParams, FileSystem, HWnd); + + if (!VideoDriver) + { + os::Printer::log("Could not create DIRECT3D9 Driver.", ELL_ERROR); + } + #else + os::Printer::log("DIRECT3D9 Driver was not compiled into this dll. Try another one.", ELL_ERROR); + #endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + + break; + + case video::EDT_OPENGL: + + #ifdef _IRR_COMPILE_WITH_OPENGL_ + switchToFullScreen(); + + VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this); + if (!VideoDriver) + { + os::Printer::log("Could not create OpenGL driver.", ELL_ERROR); + } + #else + os::Printer::log("OpenGL driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_SOFTWARE: + + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + switchToFullScreen(); + + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + #else + os::Printer::log("Software driver was not compiled in.", ELL_ERROR); + #endif + + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + switchToFullScreen(); + + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_NULL: + // create null driver + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + + default: + os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR); + break; + } +} + + +//! runs the device. Returns false if device wants to be deleted +bool CIrrDeviceWin32::run() +{ + os::Timer::tick(); + + static_cast<CCursorControl*>(CursorControl)->update(); + + handleSystemMessages(); + + if (!Close) + resizeIfNecessary(); + + if(!Close && JoyControl) + JoyControl->pollJoysticks(); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return !Close; +} + + +//! Pause the current process for the minimum time allowed only to allow other processes to execute +void CIrrDeviceWin32::yield() +{ + Sleep(1); +} + +//! Pause execution and let other processes to run for a specified amount of time. +void CIrrDeviceWin32::sleep(u32 timeMs, bool pauseTimer) +{ + const bool wasStopped = Timer ? Timer->isStopped() : true; + if (pauseTimer && !wasStopped) + Timer->stop(); + + Sleep(timeMs); + + if (pauseTimer && !wasStopped) + Timer->start(); +} + + +void CIrrDeviceWin32::resizeIfNecessary() +{ + if (!Resized || !getVideoDriver()) + return; + + RECT r; + GetClientRect(HWnd, &r); + + char tmp[255]; + + if (r.right < 2 || r.bottom < 2) + { + sprintf(tmp, "Ignoring resize operation to (%ld %ld)", r.right, r.bottom); + os::Printer::log(tmp); + } + else + { + sprintf(tmp, "Resizing window (%ld %ld)", r.right, r.bottom); + os::Printer::log(tmp); + + getVideoDriver()->OnResize(irr::core::dimension2du((u32)r.right, (u32)r.bottom)); + getWin32CursorControl()->OnResize(getVideoDriver()->getScreenSize()); + } + + Resized = false; +} + + +//! sets the caption of the window +void CIrrDeviceWin32::setWindowCaption(const wchar_t* text) +{ + // We use SendMessage instead of SetText to ensure proper + // function even in cases where the HWND was created in a different thread + DWORD_PTR dwResult; + SendMessageTimeoutW(HWnd, WM_SETTEXT, 0, + reinterpret_cast<LPARAM>(text), + SMTO_ABORTIFHUNG, 2000, &dwResult); +} + + +//! presents a surface in the client area +bool CIrrDeviceWin32::present(video::IImage* image, void* windowId, core::rect<s32>* src) +{ + HWND hwnd = HWnd; + if ( windowId ) + hwnd = reinterpret_cast<HWND>(windowId); + + HDC dc = GetDC(hwnd); + + if ( dc ) + { + RECT rect; + GetClientRect(hwnd, &rect); + const void* memory = (const void *)image->lock(); + + BITMAPV4HEADER bi; + ZeroMemory (&bi, sizeof(bi)); + bi.bV4Size = sizeof(BITMAPINFOHEADER); + bi.bV4BitCount = (WORD)image->getBitsPerPixel(); + bi.bV4Planes = 1; + bi.bV4Width = image->getDimension().Width; + bi.bV4Height = -((s32)image->getDimension().Height); + bi.bV4V4Compression = BI_BITFIELDS; + bi.bV4AlphaMask = image->getAlphaMask(); + bi.bV4RedMask = image->getRedMask(); + bi.bV4GreenMask = image->getGreenMask(); + bi.bV4BlueMask = image->getBlueMask(); + + if ( src ) + { + StretchDIBits(dc, 0,0, rect.right, rect.bottom, + src->UpperLeftCorner.X, src->UpperLeftCorner.Y, + src->getWidth(), src->getHeight(), + memory, (const BITMAPINFO*)(&bi), DIB_RGB_COLORS, SRCCOPY); + } + else + { + StretchDIBits(dc, 0,0, rect.right, rect.bottom, + 0, 0, image->getDimension().Width, image->getDimension().Height, + memory, (const BITMAPINFO*)(&bi), DIB_RGB_COLORS, SRCCOPY); + } + + image->unlock(); + + ReleaseDC(hwnd, dc); + } + return true; +} + + +//! notifies the device that it should close itself +void CIrrDeviceWin32::closeDevice() +{ + MSG msg; + PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE); + PostQuitMessage(0); + PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE); + if (!ExternalWindow) + { + DestroyWindow(HWnd); + const fschar_t* ClassName = __TEXT("CIrrDeviceWin32"); + HINSTANCE hInstance = GetModuleHandle(0); + UnregisterClass(ClassName, hInstance); + } + Close=true; +} + + +//! returns if window is active. if not, nothing needs to be drawn +bool CIrrDeviceWin32::isWindowActive() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return (GetActiveWindow() == HWnd); +} + + +//! returns if window has focus +bool CIrrDeviceWin32::isWindowFocused() const +{ + bool ret = (GetFocus() == HWnd); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! returns if window is minimized +bool CIrrDeviceWin32::isWindowMinimized() const +{ + WINDOWPLACEMENT plc; + plc.length=sizeof(WINDOWPLACEMENT); + bool ret=false; + if (GetWindowPlacement(HWnd,&plc)) + ret=(plc.showCmd & SW_SHOWMINIMIZED)!=0; + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! switches to fullscreen +bool CIrrDeviceWin32::switchToFullScreen(bool reset) +{ + if (!CreationParams.Fullscreen) + return true; + + if (reset) + { + if (ChangedToFullScreen) + { + return (ChangeDisplaySettings(&DesktopMode,0)==DISP_CHANGE_SUCCESSFUL); + } + else + return true; + } + + // use default values from current setting + + DEVMODE dm; + memset(&dm, 0, sizeof(dm)); + dm.dmSize = sizeof(dm); + + EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm); + dm.dmPelsWidth = CreationParams.WindowSize.Width; + dm.dmPelsHeight = CreationParams.WindowSize.Height; + dm.dmBitsPerPel = CreationParams.Bits; + dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY; + + LONG res = ChangeDisplaySettings(&dm, CDS_FULLSCREEN); + if (res != DISP_CHANGE_SUCCESSFUL) + { // try again without forcing display frequency + dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; + res = ChangeDisplaySettings(&dm, CDS_FULLSCREEN); + } + + bool ret = false; + switch(res) + { + case DISP_CHANGE_SUCCESSFUL: + ChangedToFullScreen = true; + ret = true; + break; + case DISP_CHANGE_RESTART: + os::Printer::log("Switch to fullscreen: The computer must be restarted in order for the graphics mode to work.", ELL_ERROR); + break; + case DISP_CHANGE_BADFLAGS: + os::Printer::log("Switch to fullscreen: An invalid set of flags was passed in.", ELL_ERROR); + break; + case DISP_CHANGE_BADPARAM: + os::Printer::log("Switch to fullscreen: An invalid parameter was passed in. This can include an invalid flag or combination of flags.", ELL_ERROR); + break; + case DISP_CHANGE_FAILED: + os::Printer::log("Switch to fullscreen: The display driver failed the specified graphics mode.", ELL_ERROR); + break; + case DISP_CHANGE_BADMODE: + os::Printer::log("Switch to fullscreen: The graphics mode is not supported.", ELL_ERROR); + break; + default: + os::Printer::log("An unknown error occured while changing to fullscreen.", ELL_ERROR); + break; + } + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! returns the win32 cursor control +CIrrDeviceWin32::CCursorControl* CIrrDeviceWin32::getWin32CursorControl() +{ + return Win32CursorControl; +} + + +//! \return Returns a pointer to a list with all video modes supported +//! by the gfx adapter. +video::IVideoModeList* CIrrDeviceWin32::getVideoModeList() +{ + if (!VideoModeList->getVideoModeCount()) + { + // enumerate video modes. + DWORD i=0; + DEVMODE mode; + memset(&mode, 0, sizeof(mode)); + mode.dmSize = sizeof(mode); + + while (EnumDisplaySettings(NULL, i, &mode)) + { + VideoModeList->addMode(core::dimension2d<u32>(mode.dmPelsWidth, mode.dmPelsHeight), + mode.dmBitsPerPel); + + ++i; + } + + if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &mode)) + VideoModeList->setDesktop(mode.dmBitsPerPel, core::dimension2d<u32>(mode.dmPelsWidth, mode.dmPelsHeight)); + } + + return VideoModeList; +} + +typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); +// Needed for old windows apis +// depending on the SDK version and compilers some defines might be available +// or not +#ifndef PRODUCT_ULTIMATE +#define PRODUCT_ULTIMATE 0x00000001 +#define PRODUCT_HOME_BASIC 0x00000002 +#define PRODUCT_HOME_PREMIUM 0x00000003 +#define PRODUCT_ENTERPRISE 0x00000004 +#define PRODUCT_HOME_BASIC_N 0x00000005 +#define PRODUCT_BUSINESS 0x00000006 +#define PRODUCT_STARTER 0x0000000B +#endif +#ifndef PRODUCT_ULTIMATE_N +#define PRODUCT_BUSINESS_N 0x00000010 +#define PRODUCT_HOME_PREMIUM_N 0x0000001A +#define PRODUCT_ENTERPRISE_N 0x0000001B +#define PRODUCT_ULTIMATE_N 0x0000001C +#endif +#ifndef PRODUCT_STARTER_N +#define PRODUCT_STARTER_N 0x0000002F +#endif +#ifndef PRODUCT_PROFESSIONAL +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 +#endif +#ifndef PRODUCT_ULTIMATE_E +#define PRODUCT_STARTER_E 0x00000042 +#define PRODUCT_HOME_BASIC_E 0x00000043 +#define PRODUCT_HOME_PREMIUM_E 0x00000044 +#define PRODUCT_PROFESSIONAL_E 0x00000045 +#define PRODUCT_ENTERPRISE_E 0x00000046 +#define PRODUCT_ULTIMATE_E 0x00000047 +#endif + +void CIrrDeviceWin32::getWindowsVersion(core::stringc& out) +{ + OSVERSIONINFOEX osvi; + PGPI pGPI; + BOOL bOsVersionInfoEx; + + ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + + bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*) &osvi); + if (!bOsVersionInfoEx) + { + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + if (! GetVersionEx((OSVERSIONINFO *) &osvi)) + return; + } + + switch (osvi.dwPlatformId) + { + case VER_PLATFORM_WIN32_NT: + if (osvi.dwMajorVersion <= 4) + out.append("Microsoft Windows NT "); + else + if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) + out.append("Microsoft Windows 2000 "); + else + if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) + out.append("Microsoft Windows XP "); + else + if (osvi.dwMajorVersion == 6 ) + { + if (osvi.dwMinorVersion == 0) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + out.append("Microsoft Windows Vista "); + else + out.append("Microsoft Windows Server 2008 "); + } + else if (osvi.dwMinorVersion == 1) + { + if (osvi.wProductType == VER_NT_WORKSTATION) + out.append("Microsoft Windows 7 "); + else + out.append("Microsoft Windows Server 2008 R2 "); + } + } + + if (bOsVersionInfoEx) + { + if (osvi.dwMajorVersion == 6) + { + DWORD dwType; + pGPI = (PGPI)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetProductInfo"); + pGPI(osvi.dwMajorVersion, osvi.dwMinorVersion, 0, 0, &dwType); + + switch (dwType) + { + case PRODUCT_ULTIMATE: + case PRODUCT_ULTIMATE_E: + case PRODUCT_ULTIMATE_N: + out.append("Ultimate Edition "); + break; + case PRODUCT_PROFESSIONAL: + case PRODUCT_PROFESSIONAL_E: + case PRODUCT_PROFESSIONAL_N: + out.append("Professional Edition "); + break; + case PRODUCT_HOME_BASIC: + case PRODUCT_HOME_BASIC_E: + case PRODUCT_HOME_BASIC_N: + out.append("Home Basic Edition "); + break; + case PRODUCT_HOME_PREMIUM: + case PRODUCT_HOME_PREMIUM_E: + case PRODUCT_HOME_PREMIUM_N: + out.append("Home Premium Edition "); + break; + case PRODUCT_ENTERPRISE: + case PRODUCT_ENTERPRISE_E: + case PRODUCT_ENTERPRISE_N: + out.append("Enterprise Edition "); + break; + case PRODUCT_BUSINESS: + case PRODUCT_BUSINESS_N: + out.append("Business Edition "); + break; + case PRODUCT_STARTER: + case PRODUCT_STARTER_E: + case PRODUCT_STARTER_N: + out.append("Starter Edition "); + break; + } + } +#ifdef VER_SUITE_ENTERPRISE + else + if (osvi.wProductType == VER_NT_WORKSTATION) + { +#ifndef __BORLANDC__ + if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) + out.append("Personal "); + else + out.append("Professional "); +#endif + } + else if (osvi.wProductType == VER_NT_SERVER) + { + if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) + out.append("DataCenter Server "); + else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) + out.append("Advanced Server "); + else + out.append("Server "); + } +#endif + } + else + { + HKEY hKey; + char szProductType[80]; + DWORD dwBufLen; + + RegOpenKeyEx( HKEY_LOCAL_MACHINE, + __TEXT("SYSTEM\\CurrentControlSet\\Control\\ProductOptions"), + 0, KEY_QUERY_VALUE, &hKey ); + RegQueryValueEx( hKey, __TEXT("ProductType"), NULL, NULL, + (LPBYTE) szProductType, &dwBufLen); + RegCloseKey( hKey ); + + if (_strcmpi( "WINNT", szProductType) == 0 ) + out.append("Professional "); + if (_strcmpi( "LANMANNT", szProductType) == 0) + out.append("Server "); + if (_strcmpi( "SERVERNT", szProductType) == 0) + out.append("Advanced Server "); + } + + // Display version, service pack (if any), and build number. + + char tmp[255]; + + if (osvi.dwMajorVersion <= 4 ) + { + sprintf(tmp, "version %ld.%ld %s (Build %ld)", + osvi.dwMajorVersion, + osvi.dwMinorVersion, + irr::core::stringc(osvi.szCSDVersion).c_str(), + osvi.dwBuildNumber & 0xFFFF); + } + else + { + sprintf(tmp, "%s (Build %ld)", irr::core::stringc(osvi.szCSDVersion).c_str(), + osvi.dwBuildNumber & 0xFFFF); + } + + out.append(tmp); + break; + + case VER_PLATFORM_WIN32_WINDOWS: + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) + { + out.append("Microsoft Windows 95 "); + if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' ) + out.append("OSR2 " ); + } + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) + { + out.append("Microsoft Windows 98 "); + if ( osvi.szCSDVersion[1] == 'A' ) + out.append( "SE " ); + } + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) + out.append("Microsoft Windows Me "); + + break; + + case VER_PLATFORM_WIN32s: + out.append("Microsoft Win32s "); + break; + } +} + +//! Notifies the device, that it has been resized +void CIrrDeviceWin32::OnResized() +{ + Resized = true; +} + +//! Sets if the window should be resizable in windowed mode. +void CIrrDeviceWin32::setResizable(bool resize) +{ + if (ExternalWindow || !getVideoDriver() || CreationParams.Fullscreen) + return; + + LONG_PTR style = WS_POPUP; + + if (!resize) + style = WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + else + style = WS_THICKFRAME | WS_SYSMENU | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; + + if (!SetWindowLongPtr(HWnd, GWL_STYLE, style)) + os::Printer::log("Could not change window style."); + + RECT clientSize; + clientSize.top = 0; + clientSize.left = 0; + clientSize.right = getVideoDriver()->getScreenSize().Width; + clientSize.bottom = getVideoDriver()->getScreenSize().Height; + + AdjustWindowRect(&clientSize, style, FALSE); + + const s32 realWidth = clientSize.right - clientSize.left; + const s32 realHeight = clientSize.bottom - clientSize.top; + + const s32 windowLeft = (GetSystemMetrics(SM_CXSCREEN) - realWidth) / 2; + const s32 windowTop = (GetSystemMetrics(SM_CYSCREEN) - realHeight) / 2; + + SetWindowPos(HWnd, HWND_TOP, windowLeft, windowTop, realWidth, realHeight, + SWP_FRAMECHANGED | SWP_NOMOVE | SWP_SHOWWINDOW); + + static_cast<CCursorControl*>(CursorControl)->updateBorderSize(CreationParams.Fullscreen, resize); +} + + +//! Minimizes the window. +void CIrrDeviceWin32::minimizeWindow() +{ + WINDOWPLACEMENT wndpl; + wndpl.length = sizeof(WINDOWPLACEMENT); + GetWindowPlacement(HWnd, &wndpl); + wndpl.showCmd = SW_SHOWMINNOACTIVE; + SetWindowPlacement(HWnd, &wndpl); +} + + +//! Maximizes the window. +void CIrrDeviceWin32::maximizeWindow() +{ + WINDOWPLACEMENT wndpl; + wndpl.length = sizeof(WINDOWPLACEMENT); + GetWindowPlacement(HWnd, &wndpl); + wndpl.showCmd = SW_SHOWMAXIMIZED; + SetWindowPlacement(HWnd, &wndpl); +} + + +//! Restores the window to its original size. +void CIrrDeviceWin32::restoreWindow() +{ + WINDOWPLACEMENT wndpl; + wndpl.length = sizeof(WINDOWPLACEMENT); + GetWindowPlacement(HWnd, &wndpl); + wndpl.showCmd = SW_SHOWNORMAL; + SetWindowPlacement(HWnd, &wndpl); +} + + +bool CIrrDeviceWin32::activateJoysticks(core::array<SJoystickInfo> & joystickInfo) +{ + if (JoyControl) + return JoyControl->activateJoysticks(joystickInfo); + else + return false; +} + + +//! Set the current Gamma Value for the Display +bool CIrrDeviceWin32::setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) +{ + bool r; + u16 ramp[3][256]; + + calculateGammaRamp( ramp[0], red, brightness, contrast ); + calculateGammaRamp( ramp[1], green, brightness, contrast ); + calculateGammaRamp( ramp[2], blue, brightness, contrast ); + + HDC dc = GetDC(0); + r = SetDeviceGammaRamp ( dc, ramp ) == TRUE; + ReleaseDC(HWnd, dc); + return r; +} + +//! Get the current Gamma Value for the Display +bool CIrrDeviceWin32::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ) +{ + bool r; + u16 ramp[3][256]; + + HDC dc = GetDC(0); + r = GetDeviceGammaRamp ( dc, ramp ) == TRUE; + ReleaseDC(HWnd, dc); + + if ( r ) + { + calculateGammaFromRamp(red, ramp[0]); + calculateGammaFromRamp(green, ramp[1]); + calculateGammaFromRamp(blue, ramp[2]); + } + + brightness = 0.f; + contrast = 0.f; + + return r; + +} + + +//! Process system events +void CIrrDeviceWin32::handleSystemMessages() +{ + MSG msg; + + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + // No message translation because we don't use WM_CHAR and it would conflict with our + // deadkey handling. + + if (ExternalWindow && msg.hwnd == HWnd) + WndProc(HWnd, msg.message, msg.wParam, msg.lParam); + else + DispatchMessage(&msg); + + if (msg.message == WM_QUIT) + Close = true; + } +} + + +//! Remove all messages pending in the system message loop +void CIrrDeviceWin32::clearSystemMessages() +{ + MSG msg; + while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) + {} + while (PeekMessage(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE)) + {} +} + +// shows last error in a messagebox to help internal debugging. +void CIrrDeviceWin32::ReportLastWinApiError() +{ + // (based on code from ovidiucucu from http://www.codeguru.com/forum/showthread.php?t=318721) + LPCTSTR pszCaption = __TEXT("Windows SDK Error Report"); + DWORD dwError = GetLastError(); + + if(NOERROR == dwError) + { + MessageBox(NULL, __TEXT("No error"), pszCaption, MB_OK); + } + else + { + const DWORD dwFormatControl = FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_IGNORE_INSERTS | + FORMAT_MESSAGE_FROM_SYSTEM; + + LPVOID pTextBuffer = NULL; + DWORD dwCount = FormatMessage(dwFormatControl, + NULL, + dwError, + 0, + (LPTSTR) &pTextBuffer, + 0, + NULL); + if(0 != dwCount) + { + MessageBox(NULL, (LPCTSTR)pTextBuffer, pszCaption, MB_OK|MB_ICONERROR); + LocalFree(pTextBuffer); + } + else + { + MessageBox(NULL, __TEXT("Unknown error"), pszCaption, MB_OK|MB_ICONERROR); + } + } +} + +// Convert an Irrlicht texture to a Windows cursor +// Based on http://www.codeguru.com/cpp/w-p/win32/cursors/article.php/c4529/ +HCURSOR CIrrDeviceWin32::TextureToCursor(HWND hwnd, irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot) +{ + // + // create the bitmaps needed for cursors from the texture + + HDC dc = GetDC(hwnd); + HDC andDc = CreateCompatibleDC(dc); + HDC xorDc = CreateCompatibleDC(dc); + HBITMAP andBitmap = CreateCompatibleBitmap(dc, sourceRect.getWidth(), sourceRect.getHeight()); + HBITMAP xorBitmap = CreateCompatibleBitmap(dc, sourceRect.getWidth(), sourceRect.getHeight()); + + HBITMAP oldAndBitmap = (HBITMAP)SelectObject(andDc, andBitmap); + HBITMAP oldXorBitmap = (HBITMAP)SelectObject(xorDc, xorBitmap); + + + video::ECOLOR_FORMAT format = tex->getColorFormat(); + u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; + u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; + u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; + const u8* data = (const u8*)tex->lock(video::ETLM_READ_ONLY, 0); + data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); + for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) + { + data += bytesLeftGap; + for ( s32 x = 0; x < sourceRect.getWidth(); ++x ) + { + video::SColor pixelCol; + pixelCol.setData((const void*)data, format); + data += bytesPerPixel; + + if ( pixelCol.getAlpha() == 0 ) // transparent + { + SetPixel(andDc, x, y, RGB(255,255,255)); + SetPixel(xorDc, x, y, RGB(0,0,0)); + } + else // color + { + SetPixel(andDc, x, y, RGB(0,0,0)); + SetPixel(xorDc, x, y, RGB(pixelCol.getRed(), pixelCol.getGreen(), pixelCol.getBlue())); + } + } + data += bytesRightGap; + } + tex->unlock(); + + SelectObject(andDc, oldAndBitmap); + SelectObject(xorDc, oldXorBitmap); + + DeleteDC(xorDc); + DeleteDC(andDc); + + ReleaseDC(hwnd, dc); + + // create the cursor + + ICONINFO iconinfo; + iconinfo.fIcon = false; // type is cursor not icon + iconinfo.xHotspot = hotspot.X; + iconinfo.yHotspot = hotspot.Y; + iconinfo.hbmMask = andBitmap; + iconinfo.hbmColor = xorBitmap; + + HCURSOR cursor = CreateIconIndirect(&iconinfo); + + DeleteObject(andBitmap); + DeleteObject(xorBitmap); + + return cursor; +} + + +CIrrDeviceWin32::CCursorControl::CCursorControl(CIrrDeviceWin32* device, const core::dimension2d<u32>& wsize, HWND hwnd, bool fullscreen) + : Device(device), WindowSize(wsize), InvWindowSize(0.0f, 0.0f), + HWnd(hwnd), BorderX(0), BorderY(0), + UseReferenceRect(false), IsVisible(true) + , ActiveIcon(gui::ECI_NORMAL), ActiveIconStartTime(0) +{ + if (WindowSize.Width!=0) + InvWindowSize.Width = 1.0f / WindowSize.Width; + + if (WindowSize.Height!=0) + InvWindowSize.Height = 1.0f / WindowSize.Height; + + updateBorderSize(fullscreen, false); + initCursors(); +} + +CIrrDeviceWin32::CCursorControl::~CCursorControl() +{ + for ( u32 i=0; i < Cursors.size(); ++i ) + { + for ( u32 f=0; f < Cursors[i].Frames.size(); ++f ) + { + DestroyCursor(Cursors[i].Frames[f].IconHW); + } + } +} + + +void CIrrDeviceWin32::CCursorControl::initCursors() +{ + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_ARROW)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_CROSS)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_HAND)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_HELP)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_IBEAM)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_NO)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_WAIT)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZEALL)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZENESW)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZENWSE)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZENS)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_SIZEWE)) ); + Cursors.push_back( CursorW32(LoadCursor(NULL, IDC_UPARROW)) ); +} + + +void CIrrDeviceWin32::CCursorControl::update() +{ + if ( !Cursors[ActiveIcon].Frames.empty() && Cursors[ActiveIcon].FrameTime ) + { + // update animated cursors. This could also be done by X11 in case someone wants to figure that out (this way was just easier to implement) + u32 now = Device->getTimer()->getRealTime(); + u32 frame = ((now - ActiveIconStartTime) / Cursors[ActiveIcon].FrameTime) % Cursors[ActiveIcon].Frames.size(); + SetCursor( Cursors[ActiveIcon].Frames[frame].IconHW ); + } +} + +//! Sets the active cursor icon +void CIrrDeviceWin32::CCursorControl::setActiveIcon(gui::ECURSOR_ICON iconId) +{ + if ( iconId >= (s32)Cursors.size() ) + return; + + ActiveIcon = iconId; + ActiveIconStartTime = Device->getTimer()->getRealTime(); + if ( Cursors[ActiveIcon].Frames.size() ) + SetCursor( Cursors[ActiveIcon].Frames[0].IconHW ); +} + + +//! Add a custom sprite as cursor icon. +gui::ECURSOR_ICON CIrrDeviceWin32::CCursorControl::addIcon(const gui::SCursorSprite& icon) +{ + if ( icon.SpriteId >= 0 ) + { + CursorW32 cW32; + cW32.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect<s32> rectIcon = icon.SpriteBank->getPositions()[rectId]; + + HCURSOR hc = Device->TextureToCursor(HWnd, icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cW32.Frames.push_back( CursorFrameW32(hc) ); + } + + Cursors.push_back( cW32 ); + return (gui::ECURSOR_ICON)(Cursors.size() - 1); + } + return gui::ECI_NORMAL; +} + + +//! replace the given cursor icon. +void CIrrDeviceWin32::CCursorControl::changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon) +{ + if ( iconId >= (s32)Cursors.size() ) + return; + + for ( u32 i=0; i < Cursors[iconId].Frames.size(); ++i ) + DestroyCursor(Cursors[iconId].Frames[i].IconHW); + + if ( icon.SpriteId >= 0 ) + { + CursorW32 cW32; + cW32.FrameTime = icon.SpriteBank->getSprites()[icon.SpriteId].frameTime; + for ( u32 i=0; i < icon.SpriteBank->getSprites()[icon.SpriteId].Frames.size(); ++i ) + { + irr::u32 texId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].textureNumber; + irr::u32 rectId = icon.SpriteBank->getSprites()[icon.SpriteId].Frames[i].rectNumber; + irr::core::rect<s32> rectIcon = icon.SpriteBank->getPositions()[rectId]; + + HCURSOR hc = Device->TextureToCursor(HWnd, icon.SpriteBank->getTexture(texId), rectIcon, icon.HotSpot); + cW32.Frames.push_back( CursorFrameW32(hc) ); + } + + Cursors[iconId] = cW32; + } +} + + +//! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. +core::dimension2di CIrrDeviceWin32::CCursorControl::getSupportedIconSize() const +{ + core::dimension2di result; + + result.Width = GetSystemMetrics(SM_CXCURSOR); + result.Height = GetSystemMetrics(SM_CYCURSOR); + + return result; +} + + + +} // end namespace + +#endif // _IRR_COMPILE_WITH_WINDOWS_DEVICE_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.h new file mode 100644 index 0000000..c11a3fd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWin32.h @@ -0,0 +1,420 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_DEVICE_WIN32_H_INCLUDED__ +#define __C_IRR_DEVICE_WIN32_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + +#include "CIrrDeviceStub.h" +#include "IrrlichtDevice.h" +#include "IImagePresenter.h" + +#define WIN32_LEAN_AND_MEAN +#if !defined(_IRR_XBOX_PLATFORM_) + #include <windows.h> + #include <mmsystem.h> // For JOYCAPS + #include <windowsx.h> +#endif +#if !defined(GET_X_LPARAM) +#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) +#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) +#endif + +namespace irr +{ + struct SJoystickWin32Control; + + class CIrrDeviceWin32 : public CIrrDeviceStub, video::IImagePresenter + { + friend struct SJoystickWin32Control; + public: + + //! constructor + CIrrDeviceWin32(const SIrrlichtCreationParameters& params); + + //! destructor + virtual ~CIrrDeviceWin32(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! Cause the device to temporarily pause execution and let other processes to run + // This should bring down processor usage without major performance loss for Irrlicht + virtual void yield(); + + //! Pause execution and let other processes to run for a specified amount of time. + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! returns if window has focus + virtual bool isWindowFocused() const; + + //! returns if window is minimized + virtual bool isWindowMinimized() const; + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! \return Returns a pointer to a list with all video modes + //! supported by the gfx adapter. + video::IVideoModeList* getVideoModeList(); + + //! Notifies the device, that it has been resized + void OnResized(); + + //! Sets if the window should be resizable in windowed mode. + virtual void setResizable(bool resize=false); + + //! Minimizes the window. + virtual void minimizeWindow(); + + //! Maximizes the window. + virtual void maximizeWindow(); + + //! Restores the window size. + virtual void restoreWindow(); + + //! Activate any joysticks, and generate events for them. + virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo); + + //! Set the current Gamma Value for the Display + virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ); + + //! Get the current Gamma Value for the Display + virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ); + + //! Remove all messages pending in the system message loop + virtual void clearSystemMessages(); + + //! Get the device type + virtual E_DEVICE_TYPE getType() const + { + return EIDT_WIN32; + } + + //! Compares to the last call of this function to return double and triple clicks. + //! \return Returns only 1,2 or 3. A 4th click will start with 1 again. + virtual u32 checkSuccessiveClicks(s32 mouseX, s32 mouseY, EMOUSE_INPUT_EVENT inputEvent ) + { + // we just have to make it public + return CIrrDeviceStub::checkSuccessiveClicks(mouseX, mouseY, inputEvent ); + } + + //! switchs to fullscreen + bool switchToFullScreen(bool reset=false); + + //! Check for and show last Windows API error to help internal debugging. + //! Does call GetLastError and on errors formats the errortext and displays it in a messagebox. + static void ReportLastWinApiError(); + + // convert an Irrlicht texture to a windows cursor + HCURSOR TextureToCursor(HWND hwnd, irr::video::ITexture * tex, const core::rect<s32>& sourceRect, const core::position2d<s32> &hotspot); + + //! Implementation of the win32 cursor control + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(CIrrDeviceWin32* device, const core::dimension2d<u32>& wsize, HWND hwnd, bool fullscreen); + ~CCursorControl(); + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + CURSORINFO info; + info.cbSize = sizeof(CURSORINFO); + BOOL gotCursorInfo = GetCursorInfo(&info); + while ( gotCursorInfo ) + { +#ifdef CURSOR_SUPPRESSED + // new flag for Windows 8, where cursor + // might be suppressed for touch interface + if (info.flags == CURSOR_SUPPRESSED) + { + visible=false; + break; + } +#endif + if ( (visible && info.flags == CURSOR_SHOWING) || // visible + (!visible && info.flags == 0 ) ) // hidden + { + break; + } + // this only increases an internal + // display counter in windows, so it + // might have to be called some more + const int showResult = ShowCursor(visible); + // if result has correct sign we can + // stop here as well + if (( !visible && showResult < 0 ) || + (visible && showResult >= 0)) + break; + // yes, it really must be set each time + info.cbSize = sizeof(CURSORINFO); + gotCursorInfo = GetCursorInfo(&info); + } + IsVisible = visible; + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + if (!UseReferenceRect) + setPosition(core::round32(x*WindowSize.Width), core::round32(y*WindowSize.Height)); + else + setPosition(core::round32(x*ReferenceRect.getWidth()), core::round32(y*ReferenceRect.getHeight())); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { + if (UseReferenceRect) + { + SetCursorPos(ReferenceRect.UpperLeftCorner.X + x, + ReferenceRect.UpperLeftCorner.Y + y); + } + else + { + RECT rect; + if (GetWindowRect(HWnd, &rect)) + SetCursorPos(x + rect.left + BorderX, y + rect.top + BorderY); + } + + CursorPos.X = x; + CursorPos.Y = y; + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + updateInternalCursorPosition(); + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + updateInternalCursorPosition(); + + if (!UseReferenceRect) + { + return core::position2d<f32>(CursorPos.X * InvWindowSize.Width, + CursorPos.Y * InvWindowSize.Height); + } + + return core::position2d<f32>(CursorPos.X / (f32)ReferenceRect.getWidth(), + CursorPos.Y / (f32)ReferenceRect.getHeight()); + } + + //! Sets an absolute reference rect for calculating the cursor position. + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + if (rect) + { + ReferenceRect = *rect; + UseReferenceRect = true; + + // prevent division through zero and uneven sizes + + if (!ReferenceRect.getHeight() || ReferenceRect.getHeight()%2) + ReferenceRect.LowerRightCorner.Y += 1; + + if (!ReferenceRect.getWidth() || ReferenceRect.getWidth()%2) + ReferenceRect.LowerRightCorner.X += 1; + } + else + UseReferenceRect = false; + } + + /** Used to notify the cursor that the window was resized. */ + virtual void OnResize(const core::dimension2d<u32>& size) + { + WindowSize = size; + if (size.Width!=0) + InvWindowSize.Width = 1.0f / size.Width; + else + InvWindowSize.Width = 0.f; + + if (size.Height!=0) + InvWindowSize.Height = 1.0f / size.Height; + else + InvWindowSize.Height = 0.f; + } + + /** Used to notify the cursor that the window resizable settings changed. */ + void updateBorderSize(bool fullscreen, bool resizable) + { + if (!fullscreen) + { + if (resizable) + { + BorderX = GetSystemMetrics(SM_CXSIZEFRAME); + BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYSIZEFRAME); + } + else + { + BorderX = GetSystemMetrics(SM_CXDLGFRAME); + BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME); + } + } + else + { + BorderX = BorderY = 0; + } + } + + + //! Sets the active cursor icon + virtual void setActiveIcon(gui::ECURSOR_ICON iconId); + + //! Gets the currently active icon + virtual gui::ECURSOR_ICON getActiveIcon() const + { + return ActiveIcon; + } + + //! Add a custom sprite as cursor icon. + virtual gui::ECURSOR_ICON addIcon(const gui::SCursorSprite& icon); + + //! replace the given cursor icon. + virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon); + + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + virtual core::dimension2di getSupportedIconSize() const; + + void update(); + + private: + + //! Updates the internal cursor position + void updateInternalCursorPosition() + { + POINT p; + if (!GetCursorPos(&p)) + { + DWORD xy = GetMessagePos(); + p.x = GET_X_LPARAM(xy); + p.y = GET_Y_LPARAM(xy); + } + + if (UseReferenceRect) + { + CursorPos.X = p.x - ReferenceRect.UpperLeftCorner.X; + CursorPos.Y = p.y - ReferenceRect.UpperLeftCorner.Y; + } + else + { + RECT rect; + if (GetWindowRect(HWnd, &rect)) + { + CursorPos.X = p.x-rect.left-BorderX; + CursorPos.Y = p.y-rect.top-BorderY; + } + else + { + // window seems not to be existent, so set cursor to + // a negative value + CursorPos.X = -1; + CursorPos.Y = -1; + } + } + } + + CIrrDeviceWin32* Device; + core::position2d<s32> CursorPos; + core::dimension2d<u32> WindowSize; + core::dimension2d<f32> InvWindowSize; + HWND HWnd; + + s32 BorderX, BorderY; + core::rect<s32> ReferenceRect; + bool UseReferenceRect; + bool IsVisible; + + + struct CursorFrameW32 + { + CursorFrameW32() : IconHW(0) {} + CursorFrameW32(HCURSOR icon) : IconHW(icon) {} + + HCURSOR IconHW; // hardware cursor + }; + + struct CursorW32 + { + CursorW32() {} + explicit CursorW32(HCURSOR iconHw, u32 frameTime=0) : FrameTime(frameTime) + { + Frames.push_back( CursorFrameW32(iconHw) ); + } + core::array<CursorFrameW32> Frames; + u32 FrameTime; + }; + + core::array<CursorW32> Cursors; + gui::ECURSOR_ICON ActiveIcon; + u32 ActiveIconStartTime; + + void initCursors(); + }; + + //! returns the win32 cursor control + CCursorControl* getWin32CursorControl(); + + private: + + //! create the driver + void createDriver(); + + //! Process system events + void handleSystemMessages(); + + void getWindowsVersion(core::stringc& version); + + void resizeIfNecessary(); + + HWND HWnd; + + bool ChangedToFullScreen; + bool Resized; + bool ExternalWindow; + CCursorControl* Win32CursorControl; + DEVMODE DesktopMode; + + SJoystickWin32Control* JoyControl; + }; + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_WINDOWS_DEVICE_ +#endif // __C_IRR_DEVICE_WIN32_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.cpp new file mode 100644 index 0000000..e6eb27d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.cpp @@ -0,0 +1,868 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ + +#include "CIrrDeviceWinCE.h" +#include "IEventReceiver.h" +#include "irrList.h" +#include "os.h" + +#include "CTimer.h" +#include "irrString.h" +#include "COSOperator.h" +#include "dimension2d.h" +#include <winuser.h> +#include "irrlicht.h" + +#ifdef _MSC_VER + #pragma comment (lib, "aygshell.lib") +#endif + + +namespace irr +{ + namespace video + { + #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + IVideoDriver* createDirectX8Driver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window); + #endif + + #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + IVideoDriver* createDirectX9Driver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, HWND window); + #endif + + #ifdef _IRR_COMPILE_WITH_OPENGL_ + IVideoDriver* createOpenGLDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, this); + #endif + } +} // end namespace irr + + + +struct SEnvMapper +{ + HWND hWnd; + irr::CIrrDeviceWinCE* irrDev; +}; + +irr::core::list<SEnvMapper> EnvMap; + +SEnvMapper* getEnvMapperFromHWnd(HWND hWnd) +{ + irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin(); + for (; it!= EnvMap.end(); ++it) + if ((*it).hWnd == hWnd) + return &(*it); + + return 0; +} + +irr::CIrrDeviceWinCE* getDeviceFromHWnd(HWND hWnd) +{ + irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin(); + for (; it!= EnvMap.end(); ++it) + if ((*it).hWnd == hWnd) + return (*it).irrDev; + + return 0; +} + + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + #ifndef WM_MOUSEWHEEL + #define WM_MOUSEWHEEL 0x020A + #endif + #ifndef WHEEL_DELTA + #define WHEEL_DELTA 120 + #endif + + irr::CIrrDeviceWinCE* dev = 0; + irr::SEvent event; + SEnvMapper* envm = 0; + + //BYTE allKeys[256]; + + static irr::s32 ClickCount=0; + if (GetCapture() != hWnd && ClickCount > 0) + ClickCount = 0; + + switch (message) + { + case WM_PAINT: + { + PAINTSTRUCT ps; + BeginPaint(hWnd, &ps); + EndPaint(hWnd, &ps); + } + return 0; + + case WM_ERASEBKGND: + return 0; + + case WM_SETCURSOR: + envm = getEnvMapperFromHWnd(hWnd); + if (envm && !envm->irrDev->getWin32CursorControl()->isVisible()) + { + SetCursor(NULL); + return 0; + } + break; + + case WM_MOUSEWHEEL: + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Wheel = ((irr::f32)((short)HIWORD(wParam))) / (irr::f32)WHEEL_DELTA; + event.MouseInput.Event = irr::EMIE_MOUSE_WHEEL; + + POINT p; // fixed by jox + p.x = 0; p.y = 0; + ClientToScreen(hWnd, &p); + event.MouseInput.X = LOWORD(lParam) - p.x; + event.MouseInput.Y = HIWORD(lParam) - p.y; + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + break; + + case WM_LBUTTONDOWN: + ClickCount++; + SetCapture(hWnd); + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_LMOUSE_PRESSED_DOWN; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + return 0; + + case WM_LBUTTONUP: + ClickCount--; + if (ClickCount<1) + { + ClickCount=0; + ReleaseCapture(); + } + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_LMOUSE_LEFT_UP; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + return 0; + + case WM_RBUTTONDOWN: + ClickCount++; + SetCapture(hWnd); + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_RMOUSE_PRESSED_DOWN; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + return 0; + + case WM_RBUTTONUP: + ClickCount--; + if (ClickCount<1) + { + ClickCount=0; + ReleaseCapture(); + } + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_RMOUSE_LEFT_UP; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + return 0; + + case WM_MBUTTONDOWN: + ClickCount++; + SetCapture(hWnd); + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_MMOUSE_PRESSED_DOWN; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + return 0; + + case WM_MBUTTONUP: + ClickCount--; + if (ClickCount<1) + { + ClickCount=0; + ReleaseCapture(); + } + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_MMOUSE_LEFT_UP; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + return 0; + + case WM_MOUSEMOVE: + event.EventType = irr::EET_MOUSE_INPUT_EVENT; + event.MouseInput.Event = irr::EMIE_MOUSE_MOVED; + event.MouseInput.X = (short)LOWORD(lParam); + event.MouseInput.Y = (short)HIWORD(lParam); + event.MouseInput.Shift = ((LOWORD(wParam) & MK_SHIFT) != 0); + event.MouseInput.Control = ((LOWORD(wParam) & MK_CONTROL) != 0); + // left and right mouse buttons + event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON); + // middle and extra buttons + if (wParam & MK_MBUTTON) + event.MouseInput.ButtonStates |= irr::EMBSM_MIDDLE; + + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->postEventFromUser(event); + + return 0; + + case WM_SYSKEYDOWN: + case WM_SYSKEYUP: + case WM_KEYDOWN: + case WM_KEYUP: + { + event.EventType = irr::EET_KEY_INPUT_EVENT; + event.KeyInput.Key = (irr::EKEY_CODE)wParam; + event.KeyInput.PressedDown = (message==WM_KEYDOWN || message == WM_SYSKEYDOWN); + dev = getDeviceFromHWnd(hWnd); +/* + WORD KeyAsc=0; + GetKeyboardState(allKeys); + ToAscii(wParam,lParam,allKeys,&KeyAsc,0); +*/ +// event.KeyInput.Shift = ((allKeys[VK_SHIFT] & 0x80)!=0); +// event.KeyInput.Control = ((allKeys[VK_CONTROL] & 0x80)!=0); +// event.KeyInput.Char = (KeyAsc & 0x00ff); //KeyAsc >= 0 ? KeyAsc : 0; + + if (dev) + dev->postEventFromUser(event); + + return 0; + } + + case WM_SIZE: + { + // resize + dev = getDeviceFromHWnd(hWnd); + if (dev) + dev->OnResized(); + } + return 0; + + case WM_DESTROY: + PostQuitMessage(0); + return 0; + + } + + return DefWindowProc(hWnd, message, wParam, lParam); +} + +namespace irr +{ + +//! constructor +CIrrDeviceWinCE::CIrrDeviceWinCE(const SIrrlichtCreationParameters& params) +: CIrrDeviceStub(params), HWnd(0), + Win32CursorControl(0), ChangedToFullScreen(false), Resized(false), + ExternalWindow(false) +{ + #ifdef _DEBUG + setDebugName("CIrrDeviceWinCE"); + #endif + + core::stringc winversion; + getWindowsVersion(winversion); + Operator = new COSOperator(winversion); + os::Printer::log(winversion.c_str(), ELL_INFORMATION); + + HINSTANCE hInstance = GetModuleHandle(0); + + // create the window only if we do not use the null device + if (!CreationParams.WindowId && (CreationParams.DriverType != video::EDT_NULL)) + { + const wchar_t* ClassName = L"CIrrDeviceWinCE"; + + // Register Class + WNDCLASS wc; + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = NULL; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wc.lpszMenuName = 0; + wc.lpszClassName = ClassName; + + // if there is an icon, load it + wc.hIcon = (HICON)LoadImageW(hInstance, L"irrlicht.ico", IMAGE_ICON, 0,0, 0); + + RegisterClass(&wc); + + // calculate client size + + RECT clientSize; + clientSize.top = 0; + clientSize.left = 0; + clientSize.right = CreationParams.WindowSize.Width; + clientSize.bottom = CreationParams.WindowSize.Height; + + DWORD style = WS_POPUP; + + if (!CreationParams.Fullscreen) + style = WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + + AdjustWindowRectEx(&clientSize, style, FALSE, 0); + + const s32 realWidth = clientSize.right - clientSize.left; + const s32 realHeight = clientSize.bottom - clientSize.top; + + const s32 windowLeft = core::s32_max ( 0, (GetSystemMetrics(SM_CXSCREEN) - realWidth) >> 1 ); + const s32 windowTop = core::s32_max ( 0, (GetSystemMetrics(SM_CYSCREEN) - realHeight) >> 1 ); + + // create window + + HWnd = CreateWindowW( ClassName, L"", style, windowLeft, windowTop, + realWidth, realHeight, NULL, NULL, hInstance, NULL); + + ShowWindow(HWnd , SW_SHOW); + UpdateWindow(HWnd); + + // fix ugly ATI driver bugs. Thanks to ariaci + MoveWindow(HWnd, windowLeft, windowTop, realWidth, realHeight, TRUE); + } + else if (CreationParams.WindowId) + { + // attach external window + HWnd = static_cast<HWND>(CreationParams.WindowId); + RECT r; + GetWindowRect(HWnd, &r); + CreationParams.WindowSize.Width = r.right - r.left; + CreationParams.WindowSize.Height = r.bottom - r.top; + CreationParams.Fullscreen = false; + ExternalWindow = true; + } + + // create cursor control + + Win32CursorControl = new CCursorControl(CreationParams.WindowSize, HWnd, CreationParams.Fullscreen); + CursorControl = Win32CursorControl; + + // create driver + + createDriver(); + + if (VideoDriver) + createGUIAndScene(); + + // register environment + + SEnvMapper em; + em.irrDev = this; + em.hWnd = HWnd; + EnvMap.push_back(em); + + // set this as active window + SetActiveWindow(HWnd); + SetForegroundWindow(HWnd); +} + + +//! destructor +CIrrDeviceWinCE::~CIrrDeviceWinCE() +{ + // unregister environment + + if (ChangedToFullScreen) + SHFullScreen(HWnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON); + + irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin(); + for (; it!= EnvMap.end(); ++it) + if ((*it).hWnd == HWnd) + { + EnvMap.erase(it); + break; + } +} + + +//! create the driver +void CIrrDeviceWinCE::createDriver() +{ + switch(CreationParams.DriverType) + { + case video::EDT_DIRECT3D8: + #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ + VideoDriver = video::createDirectX8Driver(CreationParams, FileSystem, HWnd); + if (!VideoDriver) + { + os::Printer::log("Could not create DIRECT3D8 Driver.", ELL_ERROR); + } + #else + os::Printer::log("DIRECT3D8 Driver was not compiled into this dll. Try another one.", ELL_ERROR); + #endif // _IRR_COMPILE_WITH_DIRECT3D_8_ + + break; + + case video::EDT_DIRECT3D9: + #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ + VideoDriver = video::createDirectX9Driver(CreationParams, FileSystem, HWnd); + if (!VideoDriver) + { + os::Printer::log("Could not create DIRECT3D9 Driver.", ELL_ERROR); + } + #else + os::Printer::log("DIRECT3D9 Driver was not compiled into this dll. Try another one.", ELL_ERROR); + #endif // _IRR_COMPILE_WITH_DIRECT3D_9_ + + break; + + case video::EDT_OPENGL: + + #ifdef _IRR_COMPILE_WITH_OPENGL_ + if (CreationParams.Fullscreen) + switchToFullScreen(); + VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem); + if (!VideoDriver) + { + os::Printer::log("Could not create OpenGL driver.", ELL_ERROR); + } + #else + os::Printer::log("OpenGL driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_SOFTWARE: + + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + if (CreationParams.Fullscreen) + switchToFullScreen(); + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + #else + os::Printer::log("Software driver was not compiled in.", ELL_ERROR); + #endif + + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + if (CreationParams.Fullscreen) + switchToFullScreen(); + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("Burning's Video driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_NULL: + // create null driver + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + + default: + os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR); + break; + } +} + + +//! runs the device. Returns false if device wants to be deleted +bool CIrrDeviceWinCE::run() +{ + os::Timer::tick(); + + MSG msg; + + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + + if (ExternalWindow && msg.hwnd == HWnd) + WndProc(HWnd, msg.message, msg.wParam, msg.lParam); + else + DispatchMessage(&msg); + + if (msg.message == WM_QUIT) + Close = true; + } + + if (!Close) + resizeIfNecessary(); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return !Close; +} + + +//! Pause the current process for the minimum time allowed only to allow other processes to execute +void CIrrDeviceWinCE::yield() +{ + Sleep(1); +} + + +//! Pause execution and let other processes to run for a specified amount of time. +void CIrrDeviceWinCE::sleep(u32 timeMs, bool pauseTimer) +{ + const bool wasStopped = Timer ? Timer->isStopped() : true; + if (pauseTimer && !wasStopped) + Timer->stop(); + + Sleep(timeMs); + + if (pauseTimer && !wasStopped) + Timer->start(); +} + + +void CIrrDeviceWinCE::resizeIfNecessary() +{ + if (!Resized) + return; + + RECT r; + GetClientRect(HWnd, &r); + + char tmp[255]; + + if (r.right < 2 || r.bottom < 2) + { + sprintf(tmp, "Ignoring resize operation to (%ld %ld)", r.right, r.bottom); + os::Printer::log(tmp); + } + else + { + sprintf(tmp, "Resizing window (%ld %ld)", r.right, r.bottom); + os::Printer::log(tmp); + + getVideoDriver()->OnResize(irr::core::dimension2d<irr::u32>(r.right, r.bottom)); + getWin32CursorControl()->OnResize(getVideoDriver()->getScreenSize()); + } + + Resized = false; +} + + +//! sets the caption of the window +void CIrrDeviceWinCE::setWindowCaption(const wchar_t* text) +{ + SetWindowTextW(HWnd, text); +} + + +#if !defined(BITMAPV4HEADER) +typedef struct { + DWORD bV4Size; + LONG bV4Width; + LONG bV4Height; + WORD bV4Planes; + WORD bV4BitCount; + DWORD bV4V4Compression; + DWORD bV4SizeImage; + LONG bV4XPelsPerMeter; + LONG bV4YPelsPerMeter; + DWORD bV4ClrUsed; + DWORD bV4ClrImportant; + DWORD bV4RedMask; + DWORD bV4GreenMask; + DWORD bV4BlueMask; + DWORD bV4AlphaMask; + DWORD bV4CSType; + DWORD un[9]; +} BITMAPV4HEADER, *PBITMAPV4HEADER; +#endif + + +//! presents a surface in the client area +bool CIrrDeviceWinCE::present(video::IImage* image, void* windowId, core::rect<s32>* src) +{ + HWND hwnd = HWnd; + if ( windowId ) + hwnd = (HWND)windowId; + + HDC dc = GetDC(hwnd); + + if ( dc ) + { + RECT rect; + GetClientRect(hwnd, &rect); + const void* memory = (const void *)image->lock(); + + BITMAPV4HEADER bi; + memset (&bi, 0, sizeof(bi)); + bi.bV4Size = sizeof(BITMAPINFOHEADER); + bi.bV4BitCount = image->getBitsPerPixel(); + bi.bV4Planes = 1; + bi.bV4Width = image->getDimension().Width; + bi.bV4Height = 0 - image->getDimension().Height; + bi.bV4V4Compression = BI_BITFIELDS; + bi.bV4AlphaMask = image->getAlphaMask (); + bi.bV4RedMask = image->getRedMask (); + bi.bV4GreenMask = image->getGreenMask(); + bi.bV4BlueMask = image->getBlueMask(); + + int r = 0; + if ( src ) + { + r = StretchDIBits(dc, 0,0, rect.right, rect.bottom, + src->UpperLeftCorner.X, src->UpperLeftCorner.Y, + src->getWidth(), src->getHeight(), + memory, (const BITMAPINFO*)(&bi), DIB_RGB_COLORS, SRCCOPY); + } + else + { + r = StretchDIBits(dc, 0,0, rect.right, rect.bottom, + 0, 0, image->getDimension().Width, image->getDimension().Height, + memory, (const BITMAPINFO*)(&bi), DIB_RGB_COLORS, SRCCOPY); + } + + image->unlock(); + + ReleaseDC(hwnd, dc); + } + return true; +} + + +//! notifies the device that it should close itself +void CIrrDeviceWinCE::closeDevice() +{ + MSG msg; + PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE); + PostQuitMessage(0); + PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE); + if (!ExternalWindow) + { + DestroyWindow(HWnd); + const fschar_t* ClassName = __TEXT("CIrrDeviceWin32"); + HINSTANCE hInstance = GetModuleHandle(0); + UnregisterClass(ClassName, hInstance); + } + Close=true; +} + + +//! returns if window is active. if not, nothing need to be drawn +bool CIrrDeviceWinCE::isWindowActive() const +{ + bool ret = (GetActiveWindow() == HWnd); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! returns if window has focus +bool CIrrDeviceWinCE::isWindowFocused() const +{ + bool ret = (GetFocus() == HWnd); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! returns if window is minimized +bool CIrrDeviceWinCE::isWindowMinimized() const +{ +#if 0 + WINDOWPLACEMENT plc; + plc.length=sizeof(WINDOWPLACEMENT); + bool ret=false; + if (GetWindowPlacement(HWnd,&plc)) + ret=(plc.showCmd & SW_SHOWMINIMIZED); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +#endif + return false; +} + + +//! switches to fullscreen +bool CIrrDeviceWinCE::switchToFullScreen() +{ + ChangedToFullScreen = SHFullScreen(HWnd, SHFS_HIDESIPBUTTON | SHFS_HIDETASKBAR) != 0; + return ChangedToFullScreen; +} + + +//! returns the win32 cursor control +CIrrDeviceWinCE::CCursorControl* CIrrDeviceWinCE::getWin32CursorControl() +{ + return Win32CursorControl; +} + + +//! Return pointer to a list with all video modes supported by the gfx adapter. +/** \return Pointer to video modes list */ +video::IVideoModeList* CIrrDeviceWinCE::getVideoModeList() +{ + if (!VideoModeList->getVideoModeCount()) + { + // enumerate video modes. + DWORD i=0; + DEVMODE mode; + memset(&mode, 0, sizeof(mode)); + mode.dmSize = sizeof(mode); + + while (EnumDisplaySettings(NULL, i, &mode)) + { + VideoModeList->addMode(core::dimension2d<u32>(mode.dmPelsWidth, mode.dmPelsHeight), + mode.dmBitsPerPel); + + ++i; + } + + if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &mode)) + VideoModeList->setDesktop(mode.dmBitsPerPel, core::dimension2d<u32>(mode.dmPelsWidth, mode.dmPelsHeight)); + } + + return VideoModeList; +} + + +void CIrrDeviceWinCE::getWindowsVersion(core::stringc& out) +{ + out = "WinCE"; +} + + +//! Notifies the device, that it has been resized +void CIrrDeviceWinCE::OnResized() +{ + Resized = true; +} + + +//! Sets if the window should be resizable in windowed mode. +void CIrrDeviceWinCE::setResizable(bool resize) +{ + if (ExternalWindow || !getVideoDriver() || CreationParams.Fullscreen) + return; + + LONG style = WS_POPUP; + + if (!resize) + style = WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + else + style = WS_THICKFRAME | WS_SYSMENU | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZEBOX; + + if (!SetWindowLong(HWnd, GWL_STYLE, style)) + os::Printer::log("Could not change window style."); + + RECT clientSize; + clientSize.top = 0; + clientSize.left = 0; + clientSize.right = getVideoDriver()->getScreenSize().Width; + clientSize.bottom = getVideoDriver()->getScreenSize().Height; + + AdjustWindowRectEx(&clientSize, style, FALSE, 0); + + const s32 realWidth = clientSize.right - clientSize.left; + const s32 realHeight = clientSize.bottom - clientSize.top; + + const s32 windowLeft = (GetSystemMetrics(SM_CXSCREEN) - realWidth) / 2; + const s32 windowTop = (GetSystemMetrics(SM_CYSCREEN) - realHeight) / 2; + + SetWindowPos(HWnd, HWND_TOP, windowLeft, windowTop, realWidth, realHeight, + SWP_FRAMECHANGED | SWP_NOMOVE | SWP_SHOWWINDOW); +} + + +//! Minimizes the window. +void CIrrDeviceWinCE::minimizeWindow() +{ + // do nothing +} + +//! Maximize window +void CIrrDeviceWinCE::maximizeWindow() +{ + // do nothing +} + + +//! Restore original window size +void CIrrDeviceWinCE::restoreWindow() +{ + // do nothing +} + + +} // end namespace + +#endif // _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.h new file mode 100644 index 0000000..7fe1063 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceWinCE.h @@ -0,0 +1,296 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_DEVICE_WINCE_H_INCLUDED__ +#define __C_IRR_DEVICE_WINCE_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ + +#include "CIrrDeviceStub.h" +#include "IrrlichtDevice.h" +#include "IImagePresenter.h" + +#include <windows.h> +#include <windowsx.h> +#include <commctrl.h> +#include <aygshell.h> +#include <sipapi.h> +#include <gx.h> + +namespace irr +{ + class CIrrDeviceWinCE : public CIrrDeviceStub, video::IImagePresenter + { + public: + + //! constructor + CIrrDeviceWinCE( const SIrrlichtCreationParameters& params); + + //! destructor + virtual ~CIrrDeviceWinCE(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! Cause the device to temporarily pause execution and let other processes to run + // This should bring down processor usage without major performance loss for Irrlicht + virtual void yield(); + + //! Pause execution and let other processes to run for a specified amount of time. + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! returns if window has focus + virtual bool isWindowFocused() const; + + //! returns if window is minimized + virtual bool isWindowMinimized() const; + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId = 0, core::rect<s32>* src=0 ); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! \return Returns a pointer to a list with all video modes + //! supported by the gfx adapter. + video::IVideoModeList* getVideoModeList(); + + //! Notifies the device, that it has been resized + void OnResized(); + + //! Sets if the window should be resizable in windowed mode. + virtual void setResizable(bool resize=false); + + //! Minimizes the window. + virtual void minimizeWindow(); + + //! Maximizes the window. + virtual void maximizeWindow(); + + //! Restores the window size. + virtual void restoreWindow(); + + //! Get the device type + virtual E_DEVICE_TYPE getType() const + { + return EIDT_WINCE; + } + + //! Implementation of the win32 cursor control + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(const core::dimension2d<u32>& wsize, HWND hwnd, bool fullscreen) + : WindowSize(wsize), InvWindowSize(0.0f, 0.0f), + HWnd(hwnd), BorderX(0), BorderY(0), + UseReferenceRect(false), IsVisible(true) + { + if (WindowSize.Width!=0) + InvWindowSize.Width = 1.0f / WindowSize.Width; + + if (WindowSize.Height!=0) + InvWindowSize.Height = 1.0f / WindowSize.Height; + + if (!fullscreen) + { + BorderX = GetSystemMetrics(SM_CXDLGFRAME); + BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME); + } + } + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + IsVisible = visible; + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + if (!UseReferenceRect) + setPosition(core::round32(x*WindowSize.Width), core::round32(y*WindowSize.Height)); + else + setPosition(core::round32(x*ReferenceRect.getWidth()), core::round32(y*ReferenceRect.getHeight())); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { + RECT rect; + + if (UseReferenceRect) + { + SetCursorPos(ReferenceRect.UpperLeftCorner.X + x, + ReferenceRect.UpperLeftCorner.Y + y); + } + else + { + if (GetWindowRect(HWnd, &rect)) + SetCursorPos(x + rect.left + BorderX, y + rect.top + BorderY); + } + + CursorPos.X = x; + CursorPos.Y = y; + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + updateInternalCursorPosition(); + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + updateInternalCursorPosition(); + + if (!UseReferenceRect) + { + return core::position2d<f32>(CursorPos.X * InvWindowSize.Width, + CursorPos.Y * InvWindowSize.Height); + } + + return core::position2d<f32>(CursorPos.X / (f32)ReferenceRect.getWidth(), + CursorPos.Y / (f32)ReferenceRect.getHeight()); + } + + //! Sets an absolute reference rect for calculating the cursor position. + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + if (rect) + { + ReferenceRect = *rect; + UseReferenceRect = true; + + // prevent division through zero and uneven sizes + + if (!ReferenceRect.getHeight() || ReferenceRect.getHeight()%2) + ReferenceRect.LowerRightCorner.Y += 1; + + if (!ReferenceRect.getWidth() || ReferenceRect.getWidth()%2) + ReferenceRect.LowerRightCorner.X += 1; + } + else + UseReferenceRect = false; + } + + /** Used to notify the cursor that the window was resized. */ + virtual void OnResize(const core::dimension2d<u32>& size) + { + WindowSize = size; + if (size.Width!=0) + InvWindowSize.Width = 1.0f / size.Width; + else + InvWindowSize.Width = 0.f; + + if (size.Height!=0) + InvWindowSize.Height = 1.0f / size.Height; + else + InvWindowSize.Height = 0.f; + } + + private: + + //! Updates the internal cursor position + void updateInternalCursorPosition() + { + POINT p; + if (!GetCursorPos(&p)) + { + DWORD xy = GetMessagePos(); + p.x = GET_X_LPARAM(xy); + p.y = GET_Y_LPARAM(xy); + } + + if (UseReferenceRect) + { + CursorPos.X = p.x - ReferenceRect.UpperLeftCorner.X; + CursorPos.Y = p.y - ReferenceRect.UpperLeftCorner.Y; + } + else + { + RECT rect; + if (GetWindowRect(HWnd, &rect)) + { + CursorPos.X = p.x-rect.left-BorderX; + CursorPos.Y = p.y-rect.top-BorderY; + } + else + { + // window seems not to be existent, so set cursor to + // a negative value + CursorPos.X = -1; + CursorPos.Y = -1; + } + } + } + + core::position2d<s32> CursorPos; + core::dimension2d<s32> WindowSize; + core::dimension2d<f32> InvWindowSize; + HWND HWnd; + + s32 BorderX, BorderY; + core::rect<s32> ReferenceRect; + bool UseReferenceRect; + bool IsVisible; + }; + + + //! returns the win32 cursor control + CCursorControl* getWin32CursorControl(); + + private: + + //! create the driver + void createDriver(); + + //! switchs to fullscreen + bool switchToFullScreen(); + + void getWindowsVersion(core::stringc& version); + + void resizeIfNecessary(); + + HWND HWnd; + CCursorControl* Win32CursorControl; + + bool ChangedToFullScreen; + bool Resized; + bool ExternalWindow; + }; + + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ +#endif // __C_IRR_DEVICE_WINCE_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.cpp new file mode 100644 index 0000000..6478aaf --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.cpp @@ -0,0 +1,554 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ + +#include "CIrrMeshFileLoader.h" +#include "os.h" +#include "IXMLReader.h" +#include "SAnimatedMesh.h" +#include "fast_atof.h" +#include "IReadFile.h" +#include "IAttributes.h" +#include "IMeshSceneNode.h" +#include "CDynamicMeshBuffer.h" +#include "SMeshBufferLightMap.h" + +namespace irr +{ +namespace scene +{ + + +//! Constructor +CIrrMeshFileLoader::CIrrMeshFileLoader(scene::ISceneManager* smgr, + io::IFileSystem* fs) + : SceneManager(smgr), FileSystem(fs) +{ + + #ifdef _DEBUG + setDebugName("CIrrMeshFileLoader"); + #endif + +} + + +//! Returns true if the file maybe is able to be loaded by this class. +/** This decision should be based only on the file extension (e.g. ".cob") */ +bool CIrrMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "xml", "irrmesh" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CIrrMeshFileLoader::createMesh(io::IReadFile* file) +{ + io::IXMLReader* reader = FileSystem->createXMLReader(file); + if (!reader) + return 0; + + // read until mesh section, skip other parts + + const core::stringc meshTagName = "mesh"; + IAnimatedMesh* mesh = 0; + + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + if (meshTagName == reader->getNodeName()) + { + mesh = readMesh(reader); + break; + } + else + skipSection(reader, true); // unknown section + } + } + + reader->drop(); + + return mesh; +} + + +//! reads a mesh sections and creates a mesh from it +IAnimatedMesh* CIrrMeshFileLoader::readMesh(io::IXMLReader* reader) +{ + SAnimatedMesh* animatedmesh = new SAnimatedMesh(); + SMesh* mesh = new SMesh(); + + animatedmesh->addMesh(mesh); + mesh->drop(); + + core::stringc bbSectionName = "boundingBox"; + core::stringc bufferSectionName = "buffer"; + core::stringc meshSectionName = "mesh"; + + if (!reader->isEmptyElement()) + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + const wchar_t* nodeName = reader->getNodeName(); + if (bbSectionName == nodeName) + { + // inside a bounding box, ignore it for now because + // we are calculating this anyway ourselves later. + } + else + if (bufferSectionName == nodeName) + { + // we've got a mesh buffer + + IMeshBuffer* buffer = readMeshBuffer(reader); + if (buffer) + { + mesh->addMeshBuffer(buffer); + buffer->drop(); + } + } + else + skipSection(reader, true); // unknown section + + } // end if node type is element + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (meshSectionName == reader->getNodeName()) + { + // end of mesh section reached, cancel out + break; + } + } + } // end while reader->read(); + + mesh->recalculateBoundingBox(); + animatedmesh->recalculateBoundingBox(); + + return animatedmesh; +} + + +//! reads a mesh sections and creates a mesh buffer from it +IMeshBuffer* CIrrMeshFileLoader::readMeshBuffer(io::IXMLReader* reader) +{ + CDynamicMeshBuffer* buffer = 0; + + core::stringc verticesSectionName = "vertices"; + core::stringc bbSectionName = "boundingBox"; + core::stringc materialSectionName = "material"; + core::stringc indicesSectionName = "indices"; + core::stringc bufferSectionName = "buffer"; + + bool insideVertexSection = false; + bool insideIndexSection = false; + + int vertexCount = 0; + int indexCount = 0; + + video::SMaterial material; + + if (!reader->isEmptyElement()) + while(reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT) + { + const wchar_t* nodeName = reader->getNodeName(); + if (bbSectionName == nodeName) + { + // inside a bounding box, ignore it for now because + // we are calculating this anyway ourselves later. + } + else + if (materialSectionName == nodeName) + { + //we've got a material + + io::IAttributes* attributes = FileSystem->createEmptyAttributes(SceneManager->getVideoDriver()); + attributes->read(reader, true, L"material"); + + SceneManager->getVideoDriver()->fillMaterialStructureFromAttributes(material, attributes); + attributes->drop(); + } + else + if (verticesSectionName == nodeName) + { + // vertices section + + const core::stringc vertexTypeName1 = "standard"; + const core::stringc vertexTypeName2 = "2tcoords"; + const core::stringc vertexTypeName3 = "tangents"; + + const wchar_t* vertexType = reader->getAttributeValue(L"type"); + vertexCount = reader->getAttributeValueAsInt(L"vertexCount"); + + insideVertexSection = true; + + video::E_INDEX_TYPE itype = (vertexCount > 65536)?irr::video::EIT_32BIT:irr::video::EIT_16BIT; + if (vertexTypeName1 == vertexType) + { + buffer = new CDynamicMeshBuffer(irr::video::EVT_STANDARD, itype); + + } + else + if (vertexTypeName2 == vertexType) + { + buffer = new CDynamicMeshBuffer(irr::video::EVT_2TCOORDS, itype); + } + else + if (vertexTypeName3 == vertexType) + { + buffer = new CDynamicMeshBuffer(irr::video::EVT_TANGENTS, itype); + } + buffer->getVertexBuffer().reallocate(vertexCount); + buffer->Material = material; + } + else + if (indicesSectionName == nodeName) + { + // indices section + + indexCount = reader->getAttributeValueAsInt(L"indexCount"); + insideIndexSection = true; + } + + } // end if node type is element + else + if (reader->getNodeType() == io::EXN_TEXT) + { + // read vertex data + if (insideVertexSection) + { + readMeshBuffer(reader, vertexCount, buffer); + insideVertexSection = false; + + } // end reading vertex array + else + if (insideIndexSection) + { + readIndices(reader, indexCount, buffer->getIndexBuffer()); + insideIndexSection = false; + } + + } // end if node type is text + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + { + if (bufferSectionName == reader->getNodeName()) + { + // end of buffer section reached, cancel out + break; + } + } + } // end while reader->read(); + + if (buffer) + buffer->recalculateBoundingBox(); + + return buffer; +} + + +//! read indices +void CIrrMeshFileLoader::readIndices(io::IXMLReader* reader, int indexCount, IIndexBuffer& indices) +{ + indices.reallocate(indexCount); + + core::stringc data = reader->getNodeData(); + const c8* p = &data[0]; + + for (int i=0; i<indexCount && *p; ++i) + { + findNextNoneWhiteSpace(&p); + indices.push_back(readInt(&p)); + } +} + + +void CIrrMeshFileLoader::readMeshBuffer(io::IXMLReader* reader, int vertexCount, CDynamicMeshBuffer* sbuffer) +{ + core::stringc data = reader->getNodeData(); + const c8* p = &data[0]; + scene::IVertexBuffer& Vertices = sbuffer->getVertexBuffer(); + video::E_VERTEX_TYPE vType = Vertices.getType(); + + if (sbuffer) + { + for (int i=0; i<vertexCount && *p; ++i) + { + switch(vType) + { + case video::EVT_STANDARD: + { + video::S3DVertex vtx; + // position + + findNextNoneWhiteSpace(&p); + vtx.Pos.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Pos.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Pos.Z = readFloat(&p); + + // normal + + findNextNoneWhiteSpace(&p); + vtx.Normal.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Normal.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Normal.Z = readFloat(&p); + + // color + + u32 col; + findNextNoneWhiteSpace(&p); + sscanf(p, "%08x", &col); + vtx.Color.set(col); + skipCurrentNoneWhiteSpace(&p); + + // tcoord1 + + findNextNoneWhiteSpace(&p); + vtx.TCoords.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.TCoords.Y = readFloat(&p); + + Vertices.push_back(vtx); + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords vtx; + // position + + findNextNoneWhiteSpace(&p); + vtx.Pos.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Pos.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Pos.Z = readFloat(&p); + + // normal + + findNextNoneWhiteSpace(&p); + vtx.Normal.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Normal.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Normal.Z = readFloat(&p); + + // color + + u32 col; + findNextNoneWhiteSpace(&p); + sscanf(p, "%08x", &col); + vtx.Color.set(col); + skipCurrentNoneWhiteSpace(&p); + + // tcoord1 + + findNextNoneWhiteSpace(&p); + vtx.TCoords.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.TCoords.Y = readFloat(&p); + + // tcoord2 + + findNextNoneWhiteSpace(&p); + vtx.TCoords2.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.TCoords2.Y = readFloat(&p); + + Vertices.push_back(vtx); + } + break; + + case video::EVT_TANGENTS: + { + video::S3DVertexTangents vtx; + // position + + findNextNoneWhiteSpace(&p); + vtx.Pos.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Pos.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Pos.Z = readFloat(&p); + + // normal + + findNextNoneWhiteSpace(&p); + vtx.Normal.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Normal.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Normal.Z = readFloat(&p); + + // color + + u32 col; + findNextNoneWhiteSpace(&p); + sscanf(p, "%08x", &col); + vtx.Color.set(col); + skipCurrentNoneWhiteSpace(&p); + + // tcoord1 + + findNextNoneWhiteSpace(&p); + vtx.TCoords.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.TCoords.Y = readFloat(&p); + + // tangent + + findNextNoneWhiteSpace(&p); + vtx.Tangent.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Tangent.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Tangent.Z = readFloat(&p); + + // binormal + + findNextNoneWhiteSpace(&p); + vtx.Binormal.X = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Binormal.Y = readFloat(&p); + findNextNoneWhiteSpace(&p); + vtx.Binormal.Z = readFloat(&p); + + Vertices.push_back(vtx); + } + break; + }; + + } + } +} + + +//! skips an (unknown) section in the irrmesh document +void CIrrMeshFileLoader::skipSection(io::IXMLReader* reader, bool reportSkipping) +{ +#ifdef _DEBUG + os::Printer::log("irrMesh skipping section", core::stringc(reader->getNodeName()).c_str()); +#endif + + // skip if this element is empty anyway. + if (reader->isEmptyElement()) + return; + + // read until we've reached the last element in this section + u32 tagCounter = 1; + + while(tagCounter && reader->read()) + { + if (reader->getNodeType() == io::EXN_ELEMENT && + !reader->isEmptyElement()) + { + #ifdef _DEBUG + if (reportSkipping) + os::Printer::log("irrMesh unknown element:", core::stringc(reader->getNodeName()).c_str()); + #endif + + ++tagCounter; + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + --tagCounter; + } +} + + +//! parses a float from a char pointer and moves the pointer +//! to the end of the parsed float +inline f32 CIrrMeshFileLoader::readFloat(const c8** p) +{ + f32 ftmp; + *p = core::fast_atof_move(*p, ftmp); + return ftmp; +} + + +//! parses an int from a char pointer and moves the pointer to +//! the end of the parsed float +inline s32 CIrrMeshFileLoader::readInt(const c8** p) +{ + return (s32)readFloat(p); +} + + +//! places pointer to next begin of a token +void CIrrMeshFileLoader::skipCurrentNoneWhiteSpace(const c8** start) +{ + const c8* p = *start; + + while(*p && !(*p==' ' || *p=='\n' || *p=='\r' || *p=='\t')) + ++p; + + // TODO: skip comments <!-- --> + + *start = p; +} + +//! places pointer to next begin of a token +void CIrrMeshFileLoader::findNextNoneWhiteSpace(const c8** start) +{ + const c8* p = *start; + + while(*p && (*p==' ' || *p=='\n' || *p=='\r' || *p=='\t')) + ++p; + + // TODO: skip comments <!-- --> + + *start = p; +} + + +//! reads floats from inside of xml element until end of xml element +void CIrrMeshFileLoader::readFloatsInsideElement(io::IXMLReader* reader, f32* floats, u32 count) +{ + if (reader->isEmptyElement()) + return; + + while(reader->read()) + { + // TODO: check for comments inside the element + // and ignore them. + + if (reader->getNodeType() == io::EXN_TEXT) + { + // parse float data + core::stringc data = reader->getNodeData(); + const c8* p = &data[0]; + + for (u32 i=0; i<count; ++i) + { + findNextNoneWhiteSpace(&p); + if (*p) + floats[i] = readFloat(&p); + else + floats[i] = 0.0f; + } + } + else + if (reader->getNodeType() == io::EXN_ELEMENT_END) + break; // end parsing text + } +} + + + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_IRR_MESH_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.h new file mode 100644 index 0000000..39b2332 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshFileLoader.h @@ -0,0 +1,90 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_IRR_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "irrString.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "CDynamicMeshBuffer.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + + +//! Meshloader capable of loading .irrmesh meshes, the Irrlicht Engine mesh format for static meshes +class CIrrMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CIrrMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + //! reads a mesh sections and creates a mesh from it + IAnimatedMesh* readMesh(io::IXMLReader* reader); + + //! reads a mesh sections and creates a mesh buffer from it + IMeshBuffer* readMeshBuffer(io::IXMLReader* reader); + + //! skips an (unknown) section in the irrmesh file + void skipSection(io::IXMLReader* reader, bool reportSkipping); + + //! reads a <material> element and stores it in the material section + void readMaterial(io::IXMLReader* reader); + + //! parses a float from a char pointer and moves the pointer to + //! the end of the parsed float + inline f32 readFloat(const c8** p); + + //! parses an int from a char pointer and moves the pointer to + //! the end of the parsed float + inline s32 readInt(const c8** p); + + //! places pointer to next begin of a token + void findNextNoneWhiteSpace(const c8** p); + + //! places pointer to next begin of a token + void skipCurrentNoneWhiteSpace(const c8** p); + + //! reads floats from inside of xml element until end of xml element + void readFloatsInsideElement(io::IXMLReader* reader, f32* floats, u32 count); + + //! read the mesh buffers + void readMeshBuffer(io::IXMLReader* reader, int vertexCount, CDynamicMeshBuffer* sbuffer); + + //! read indices + void readIndices(io::IXMLReader* reader, int indexCount, IIndexBuffer& indices); + + + // member variables + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.cpp new file mode 100644 index 0000000..2f7f9bd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.cpp @@ -0,0 +1,315 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_IRR_WRITER_ + +#include "CIrrMeshWriter.h" +#include "os.h" +#include "IWriteFile.h" +#include "IXMLWriter.h" +#include "IMesh.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + + +CIrrMeshWriter::CIrrMeshWriter(video::IVideoDriver* driver, + io::IFileSystem* fs) + : FileSystem(fs), VideoDriver(driver), Writer(0) +{ + #ifdef _DEBUG + setDebugName("CIrrMeshWriter"); + #endif + + if (VideoDriver) + VideoDriver->grab(); + + if (FileSystem) + FileSystem->grab(); +} + + +CIrrMeshWriter::~CIrrMeshWriter() +{ + if (VideoDriver) + VideoDriver->drop(); + + if (FileSystem) + FileSystem->drop(); +} + + +//! Returns the type of the mesh writer +EMESH_WRITER_TYPE CIrrMeshWriter::getType() const +{ + return EMWT_IRR_MESH; +} + + +//! writes a mesh +bool CIrrMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + if (!file) + return false; + + Writer = FileSystem->createXMLWriter(file); + + if (!Writer) + { + os::Printer::log("Could not write file", file->getFileName()); + return false; + } + + os::Printer::log("Writing mesh", file->getFileName()); + + // write IRR MESH header + + Writer->writeXMLHeader(); + + Writer->writeElement(L"mesh", false, + L"xmlns", L"http://irrlicht.sourceforge.net/IRRMESH_09_2007", + L"version", L"1.0"); + Writer->writeLineBreak(); + + // add some informational comment. Add a space after and before the comment + // tags so that some braindead xml parsers (AS anyone?) are able to parse this too. + + core::stringw infoComment = L" This file contains a static mesh in the Irrlicht Engine format with "; + infoComment += core::stringw(mesh->getMeshBufferCount()); + infoComment += L" materials."; + + Writer->writeComment(infoComment.c_str()); + Writer->writeLineBreak(); + + // write mesh bounding box + + writeBoundingBox(mesh->getBoundingBox()); + Writer->writeLineBreak(); + + // write mesh buffers + + for (int i=0; i<(int)mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* buffer = mesh->getMeshBuffer(i); + if (buffer) + { + writeMeshBuffer(buffer); + Writer->writeLineBreak(); + } + } + + Writer->writeClosingTag(L"mesh"); + + Writer->drop(); + return true; +} + + +void CIrrMeshWriter::writeBoundingBox(const core::aabbox3df& box) +{ + Writer->writeElement(L"boundingBox", true, + L"minEdge", getVectorAsStringLine(box.MinEdge).c_str(), + L"maxEdge", getVectorAsStringLine(box.MaxEdge).c_str()); +} + + +core::stringw CIrrMeshWriter::getVectorAsStringLine(const core::vector3df& v) const +{ + core::stringw str; + + str = core::stringw(v.X); + str += L" "; + str += core::stringw(v.Y); + str += L" "; + str += core::stringw(v.Z); + + return str; +} + + +core::stringw CIrrMeshWriter::getVectorAsStringLine(const core::vector2df& v) const +{ + core::stringw str; + + str = core::stringw(v.X); + str += L" "; + str += core::stringw(v.Y); + + return str; +} + + +void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer) +{ + Writer->writeElement(L"buffer", false); + Writer->writeLineBreak(); + + // write bounding box + + writeBoundingBox(buffer->getBoundingBox()); + Writer->writeLineBreak(); + + // write material + + writeMaterial(buffer->getMaterial()); + + // write vertices + + const core::stringw vertexTypeStr = video::sBuiltInVertexTypeNames[buffer->getVertexType()]; + + Writer->writeElement(L"vertices", false, + L"type", vertexTypeStr.c_str(), + L"vertexCount", core::stringw(buffer->getVertexCount()).c_str()); + + Writer->writeLineBreak(); + + u32 vertexCount = buffer->getVertexCount(); + + switch(buffer->getVertexType()) + { + case video::EVT_STANDARD: + { + video::S3DVertex* vtx = (video::S3DVertex*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + core::stringw str = getVectorAsStringLine(vtx[j].Pos); + str += L" "; + str += getVectorAsStringLine(vtx[j].Normal); + + char tmp[12]; + sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getGreen(), vtx[j].Color.getBlue()); + str += tmp; + + str += getVectorAsStringLine(vtx[j].TCoords); + + Writer->writeText(str.c_str()); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* vtx = (video::S3DVertex2TCoords*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + core::stringw str = getVectorAsStringLine(vtx[j].Pos); + str += L" "; + str += getVectorAsStringLine(vtx[j].Normal); + + char tmp[12]; + sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getGreen(), vtx[j].Color.getBlue()); + str += tmp; + + str += getVectorAsStringLine(vtx[j].TCoords); + str += L" "; + str += getVectorAsStringLine(vtx[j].TCoords2); + + Writer->writeText(str.c_str()); + Writer->writeLineBreak(); + } + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents* vtx = (video::S3DVertexTangents*)buffer->getVertices(); + for (u32 j=0; j<vertexCount; ++j) + { + core::stringw str = getVectorAsStringLine(vtx[j].Pos); + str += L" "; + str += getVectorAsStringLine(vtx[j].Normal); + + char tmp[12]; + sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getGreen(), vtx[j].Color.getBlue()); + str += tmp; + + str += getVectorAsStringLine(vtx[j].TCoords); + str += L" "; + str += getVectorAsStringLine(vtx[j].Tangent); + str += L" "; + str += getVectorAsStringLine(vtx[j].Binormal); + + Writer->writeText(str.c_str()); + Writer->writeLineBreak(); + } + } + break; + } + + Writer->writeClosingTag(L"vertices"); + Writer->writeLineBreak(); + + // write indices + + Writer->writeElement(L"indices", false, + L"indexCount", core::stringw(buffer->getIndexCount()).c_str()); + + Writer->writeLineBreak(); + + int indexCount = (int)buffer->getIndexCount(); + + video::E_INDEX_TYPE iType = buffer->getIndexType(); + + const u16* idx16 = buffer->getIndices(); + const u32* idx32 = (u32*) buffer->getIndices(); + const int maxIndicesPerLine = 25; + + for (int i=0; i<indexCount; ++i) + { + if(iType == video::EIT_16BIT) + { + core::stringw str((int)idx16[i]); + Writer->writeText(str.c_str()); + } + else + { + core::stringw str((int)idx32[i]); + Writer->writeText(str.c_str()); + } + + if (i % maxIndicesPerLine != maxIndicesPerLine) + { + if (i % maxIndicesPerLine == maxIndicesPerLine-1) + Writer->writeLineBreak(); + else + Writer->writeText(L" "); + } + } + + if ((indexCount-1) % maxIndicesPerLine != maxIndicesPerLine-1) + Writer->writeLineBreak(); + + Writer->writeClosingTag(L"indices"); + Writer->writeLineBreak(); + + // close buffer tag + + Writer->writeClosingTag(L"buffer"); +} + + +void CIrrMeshWriter::writeMaterial(const video::SMaterial& material) +{ + // simply use irrlichts built-in attribute serialization capabilities here: + + io::IAttributes* attributes = + VideoDriver->createAttributesFromMaterial(material); + + if (attributes) + { + attributes->write(Writer, false, L"material"); + attributes->drop(); + } +} + + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.h new file mode 100644 index 0000000..4b62633 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CIrrMeshWriter.h @@ -0,0 +1,63 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_IRR_MESH_WRITER_H_INCLUDED__ +#define __IRR_IRR_MESH_WRITER_H_INCLUDED__ + +#include "IMeshWriter.h" +#include "S3DVertex.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" + +namespace irr +{ +namespace io +{ + class IXMLWriter; +} +namespace scene +{ + class IMeshBuffer; + + + //! class to write meshes, implementing a IrrMesh (.irrmesh, .xml) writer + /** This writer implementation has been originally developed for irrEdit and then + merged out to the Irrlicht Engine */ + class CIrrMeshWriter : public IMeshWriter + { + public: + + CIrrMeshWriter(video::IVideoDriver* driver, io::IFileSystem* fs); + virtual ~CIrrMeshWriter(); + + //! Returns the type of the mesh writer + virtual EMESH_WRITER_TYPE getType() const; + + //! writes a mesh + virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); + + protected: + + void writeBoundingBox(const core::aabbox3df& box); + + void writeMeshBuffer(const scene::IMeshBuffer* buffer); + + void writeMaterial(const video::SMaterial& material); + + core::stringw getVectorAsStringLine(const core::vector3df& v) const; + + core::stringw getVectorAsStringLine(const core::vector2df& v) const; + + // member variables: + + io::IFileSystem* FileSystem; + video::IVideoDriver* VideoDriver; + io::IXMLWriter* Writer; + }; + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.cpp new file mode 100644 index 0000000..6969731 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.cpp @@ -0,0 +1,373 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// This file was written by Jonas Petersen and modified by Nikolaus Gebhardt. +// See CLMTSMeshFileLoder.h for details. +/* + +CLMTSMeshFileLoader.cpp + +LMTSMeshFileLoader +Written by Jonas Petersen (a.k.a. jox) + +Version 1.5 - 15 March 2005 + +Get the latest version here: http://development.mindfloaters.de/ + +This class allows loading meshes with lightmaps (*.lmts + *.tga files) that were created +using Pulsar LMTools by Lord Trancos (http://www.geocities.com/dxlab/index_en.html) + +Notes: +- This version does not support user data in the *.lmts files, but still loads those files (by skipping the extra data). + +License: +-------- + +It's free. You are encouraged to give me credit if you use it in your software. + +Version History: +---------------- + +Version 1.5 - 15 March 2005 +- Did a better cleanup. No memory leaks in case of an loading error. +- Added "#include <stdio.h>" for sprintf. + +Version 1.4 - 12 March 2005 +- Fixed bug in texture and subset loading code that would possibly cause crash. +- Fixed memory cleanup to avoid leak when loading more then one mesh +- Used the irrlicht Logger instead of cerr to output warnings and errors. + For this I had to change the constructor + from: + CLMTSMeshFileLoader(io::IFileSystem* fs, video::IVideoDriver* driver) + to: + CLMTSMeshFileLoader(IrrlichtDevice* device) + +Version 1.3 - 15 February 2005 +- Fixed bug that prevented loading more than one different lmts files. +- Removed unnecessary "#include <os.h>". +- Added "std::" in front of "cerr". This was necessary for Visual Studio .NET, + I hope it's not disturbing other compilers. +- Added warning message when a texture can not be loaded. +- Changed the documentation a bit (minor). + +Version 1.2 +- To avoid confusion I skipped version 1.2 because the website was offering +version 1.2 even though it was only version 1.1. Sorry about that. + +Version 1.1 - 29 July 2004 +- Added setTexturePath() function +- Minor improvements + +Version 1.0 - 29 July 2004 +- Initial release + + +*/ +////////////////////////////////////////////////////////////////////// + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_LMTS_LOADER_ + +#include "SMeshBufferLightMap.h" +#include "SAnimatedMesh.h" +#include "SMeshBuffer.h" +#include "irrString.h" +#include "IReadFile.h" +#include "IAttributes.h" +#include "ISceneManager.h" +#include "CLMTSMeshFileLoader.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +CLMTSMeshFileLoader::CLMTSMeshFileLoader(io::IFileSystem* fs, + video::IVideoDriver* driver, io::IAttributes* parameters) + : Textures(0), Subsets(0), Triangles(0), + Parameters(parameters), Driver(driver), FileSystem(fs), FlipEndianess(false) +{ + #ifdef _DEBUG + setDebugName("CLMTSMeshFileLoader"); + #endif + + if (Driver) + Driver->grab(); + + if (FileSystem) + FileSystem->grab(); +} + + +CLMTSMeshFileLoader::~CLMTSMeshFileLoader() +{ + cleanup(); + + if (Driver) + Driver->drop(); + + if (FileSystem) + FileSystem->drop(); +} + + +void CLMTSMeshFileLoader::cleanup() +{ + delete [] Textures; + Textures = 0; + delete [] Subsets; + Subsets = 0; + delete [] Triangles; + Triangles = 0; +} + + +bool CLMTSMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "lmts" ); +} + + +IAnimatedMesh* CLMTSMeshFileLoader::createMesh(io::IReadFile* file) +{ + u32 i; + u32 id; + + // HEADER + + file->read(&Header, sizeof(SLMTSHeader)); + if (Header.MagicID == 0x4C4D5354) + { + FlipEndianess = true; + Header.MagicID = os::Byteswap::byteswap(Header.MagicID); + Header.Version = os::Byteswap::byteswap(Header.Version); + Header.HeaderSize = os::Byteswap::byteswap(Header.HeaderSize); + Header.TextureCount = os::Byteswap::byteswap(Header.TextureCount); + Header.SubsetCount = os::Byteswap::byteswap(Header.SubsetCount); + Header.TriangleCount = os::Byteswap::byteswap(Header.TriangleCount); + Header.SubsetSize = os::Byteswap::byteswap(Header.SubsetSize); + Header.VertexSize = os::Byteswap::byteswap(Header.VertexSize); + } + if (Header.MagicID != 0x53544D4C) { // "LMTS" + os::Printer::log("LMTS ERROR: wrong header magic id!", ELL_ERROR); + return 0; + } + + //Skip any User Data (arbitrary app specific data) + + const s32 userSize = Header.HeaderSize - sizeof(SLMTSHeader); + if (userSize>0) + file->seek(userSize,true); + + // TEXTURES + + file->read(&id, sizeof(u32)); + if (FlipEndianess) + id = os::Byteswap::byteswap(id); + if (id != 0x54584554) { // "TEXT" + os::Printer::log("LMTS ERROR: wrong texture magic id!", ELL_ERROR); + return 0; + } + + Textures = new SLMTSTextureInfoEntry[Header.TextureCount]; + + file->read(Textures, sizeof(SLMTSTextureInfoEntry)*Header.TextureCount); + if (FlipEndianess) + { + for (i=0; i<Header.TextureCount; ++i) + Textures[i].Flags = os::Byteswap::byteswap(Textures[i].Flags); + } + + // SUBSETS + + file->read(&id, sizeof(u32)); + if (FlipEndianess) + id = os::Byteswap::byteswap(id); + if (id != 0x53425553) // "SUBS" + { + os::Printer::log("LMTS ERROR: wrong subset magic id!", ELL_ERROR); + cleanup(); + return 0; + } + + Subsets = new SLMTSSubsetInfoEntry[Header.SubsetCount]; + const s32 subsetUserSize = Header.SubsetSize - sizeof(SLMTSSubsetInfoEntry); + + for (i=0; i<Header.SubsetCount; ++i) + { + file->read(&Subsets[i], sizeof(SLMTSSubsetInfoEntry)); + if (FlipEndianess) + { + Subsets[i].Offset = os::Byteswap::byteswap(Subsets[i].Offset); + Subsets[i].Count = os::Byteswap::byteswap(Subsets[i].Count); + Subsets[i].TextID1 = os::Byteswap::byteswap(Subsets[i].TextID1); + Subsets[i].TextID2 = os::Byteswap::byteswap(Subsets[i].TextID2); + } + if (subsetUserSize>0) + file->seek(subsetUserSize,true); + } + + // TRIANGLES + + file->read(&id, sizeof(u32)); + if (FlipEndianess) + id = os::Byteswap::byteswap(id); + if (id != 0x53495254) // "TRIS" + { + os::Printer::log("LMTS ERROR: wrong triangle magic id!", ELL_ERROR); + cleanup(); + return 0; + } + + Triangles = new SLMTSTriangleDataEntry[(Header.TriangleCount*3)]; + const s32 triUserSize = Header.VertexSize - sizeof(SLMTSTriangleDataEntry); + + for (i=0; i<(Header.TriangleCount*3); ++i) + { + file->read(&Triangles[i], sizeof(SLMTSTriangleDataEntry)); + if (FlipEndianess) + { + Triangles[i].X = os::Byteswap::byteswap(Triangles[i].X); + Triangles[i].Y = os::Byteswap::byteswap(Triangles[i].Y); + Triangles[i].Z = os::Byteswap::byteswap(Triangles[i].Z); + Triangles[i].U1 = os::Byteswap::byteswap(Triangles[i].U1); + Triangles[i].V1 = os::Byteswap::byteswap(Triangles[i].U2); + Triangles[i].U2 = os::Byteswap::byteswap(Triangles[i].V1); + Triangles[i].V2 = os::Byteswap::byteswap(Triangles[i].V2); + } + if (triUserSize>0) + file->seek(triUserSize,true); + } + + ///////////////////////////////////////////////////////////////// + + SMesh* mesh = new SMesh(); + + constructMesh(mesh); + + loadTextures(mesh); + + cleanup(); + + SAnimatedMesh* am = new SAnimatedMesh(); + am->Type = EAMT_LMTS; // not unknown to irrlicht anymore + + am->addMesh(mesh); + am->recalculateBoundingBox(); + mesh->drop(); + return am; +} + + +void CLMTSMeshFileLoader::constructMesh(SMesh* mesh) +{ + for (s32 i=0; i<Header.SubsetCount; ++i) + { + scene::SMeshBufferLightMap* meshBuffer = new scene::SMeshBufferLightMap(); + + // EMT_LIGHTMAP_M2/EMT_LIGHTMAP_M4 also possible + meshBuffer->Material.MaterialType = video::EMT_LIGHTMAP; + meshBuffer->Material.Wireframe = false; + meshBuffer->Material.Lighting = false; + + mesh->addMeshBuffer(meshBuffer); + + const u32 offs = Subsets[i].Offset * 3; + + for (u32 sc=0; sc<Subsets[i].Count; sc++) + { + const u32 idx = meshBuffer->getVertexCount(); + + for (u32 vu=0; vu<3; ++vu) + { + const SLMTSTriangleDataEntry& v = Triangles[offs+(3*sc)+vu]; + meshBuffer->Vertices.push_back( + video::S3DVertex2TCoords( + v.X, v.Y, v.Z, + video::SColor(255,255,255,255), + v.U1, v.V1, v.U2, v.V2)); + } + const core::vector3df normal = core::plane3df( + meshBuffer->Vertices[idx].Pos, + meshBuffer->Vertices[idx+1].Pos, + meshBuffer->Vertices[idx+2].Pos).Normal; + + meshBuffer->Vertices[idx].Normal = normal; + meshBuffer->Vertices[idx+1].Normal = normal; + meshBuffer->Vertices[idx+2].Normal = normal; + + meshBuffer->Indices.push_back(idx); + meshBuffer->Indices.push_back(idx+1); + meshBuffer->Indices.push_back(idx+2); + } + meshBuffer->drop(); + } + + for (u32 j=0; j<mesh->MeshBuffers.size(); ++j) + mesh->MeshBuffers[j]->recalculateBoundingBox(); + + mesh->recalculateBoundingBox(); +} + + +void CLMTSMeshFileLoader::loadTextures(SMesh* mesh) +{ + if (!Driver || !FileSystem) + return; + + // load textures + + // a little too much space, but won't matter here + core::array<video::ITexture*> tex; + tex.reallocate(Header.TextureCount); + core::array<video::ITexture*> lig; + lig.reallocate(Header.TextureCount); + core::array<u32> id2id; + id2id.reallocate(Header.TextureCount); + + const core::stringc Path = Parameters->getAttributeAsString(LMTS_TEXTURE_PATH); + + core::stringc s; + for (u32 t=0; t<Header.TextureCount; ++t) + { + video::ITexture* tmptex = 0; + s = Path; + s.append(Textures[t].Filename); + + if (FileSystem->existFile(s)) + tmptex = Driver->getTexture(s); + else + os::Printer::log("LMTS WARNING: Texture does not exist", s.c_str(), ELL_WARNING); + + if (Textures[t].Flags & 0x01) + { + id2id.push_back(lig.size()); + lig.push_back(tmptex); + } + else + { + id2id.push_back(tex.size()); + tex.push_back(tmptex); + } + } + + // attach textures to materials. + + for (u32 i=0; i<Header.SubsetCount; ++i) + { + if (Subsets[i].TextID1 < Header.TextureCount && id2id[Subsets[i].TextID1] < tex.size()) + mesh->getMeshBuffer(i)->getMaterial().setTexture(0, tex[id2id[Subsets[i].TextID1]]); + if (Subsets[i].TextID2 < Header.TextureCount && id2id[Subsets[i].TextID2] < lig.size()) + mesh->getMeshBuffer(i)->getMaterial().setTexture(1, lig[id2id[Subsets[i].TextID2]]); + + if (!mesh->getMeshBuffer(i)->getMaterial().getTexture(1)) + mesh->getMeshBuffer(i)->getMaterial().MaterialType = video::EMT_SOLID; + } +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_LMTS_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.h new file mode 100644 index 0000000..4e3bb09 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLMTSMeshFileLoader.h @@ -0,0 +1,109 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// I (Nikolaus Gebhardt) did some few changes to Jonas Petersen's original loader: +// - removed setTexturePath() and replaced with the ISceneManager::getStringParameter()-stuff. +// - added EAMT_LMTS enumeration value +// Thanks a lot to Jonas Petersen for his work +// on this and that he gave me his permission to add it into Irrlicht. +/* + +CLMTSMeshFileLoader.h + +LMTSMeshFileLoader +Written by Jonas Petersen (a.k.a. jox) + +Version 1.5 - 15 March 2005 + +*/ + +#if !defined(__C_LMTS_MESH_FILE_LOADER_H_INCLUDED__) +#define __C_LMTS_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "SMesh.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace scene +{ + +class CLMTSMeshFileLoader : public IMeshLoader +{ +public: + + CLMTSMeshFileLoader(io::IFileSystem* fs, + video::IVideoDriver* driver, io::IAttributes* parameters); + + virtual ~CLMTSMeshFileLoader(); + + virtual bool isALoadableFileExtension(const io::path& filename) const; + + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + void constructMesh(SMesh* mesh); + void loadTextures(SMesh* mesh); + void cleanup(); + +// byte-align structures +#include "irrpack.h" + + struct SLMTSHeader + { + u32 MagicID; + u32 Version; + u32 HeaderSize; + u16 TextureCount; + u16 SubsetCount; + u32 TriangleCount; + u16 SubsetSize; + u16 VertexSize; + } PACK_STRUCT; + + struct SLMTSTextureInfoEntry + { + c8 Filename[256]; + u16 Flags; + } PACK_STRUCT; + + struct SLMTSSubsetInfoEntry + { + u32 Offset; + u32 Count; + u16 TextID1; + u16 TextID2; + } PACK_STRUCT; + + struct SLMTSTriangleDataEntry + { + f32 X; + f32 Y; + f32 Z; + f32 U1; + f32 V1; + f32 U2; + f32 V2; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + SLMTSHeader Header; + SLMTSTextureInfoEntry* Textures; + SLMTSSubsetInfoEntry* Subsets; + SLMTSTriangleDataEntry* Triangles; + + io::IAttributes* Parameters; + video::IVideoDriver* Driver; + io::IFileSystem* FileSystem; + bool FlipEndianess; +}; + +} // end namespace scene +} // end namespace irr + +#endif // !defined(__C_LMTS_MESH_FILE_LOADER_H_INCLUDED__) diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.cpp new file mode 100644 index 0000000..6534727 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.cpp @@ -0,0 +1,2114 @@ +// Copyright (C) 2007-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CLWOMeshFileLoader.h" +#include "os.h" +#include "SAnimatedMesh.h" +#include "SMesh.h" +#include "IReadFile.h" +#include "ISceneManager.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "IMeshManipulator.h" + +namespace irr +{ +namespace scene +{ + +#ifdef _DEBUG +#define LWO_READER_DEBUG +#endif + +#define charsToUIntD(a, b, c, d) ((a << 24) | (b << 16) | (c << 8) | d) +inline unsigned int charsToUInt(const char *str) +{ + return (str[0] << 24) | (str[1] << 16) | (str[2] << 8) | str[3]; +} + + +struct tLWOTextureInfo +{ + tLWOTextureInfo() : UVTag(0), DUVTag(0), Flags(0), WidthWrap(2), + HeightWrap(2), OpacType(0), Color(0xffffffff), + Value(0.0f), AntiAliasing(1.0f), Opacity(1.0f), + Axis(255), Projection(0), Active(false) {} + core::stringc Type; + core::stringc Map; + core::stringc AlphaMap; + core::stringc UVname; + u16 UVTag; + u16 DUVTag; + u16 Flags; + u16 WidthWrap; + u16 HeightWrap; + u16 OpacType; + u16 IParam[3]; + core::vector3df Size; + core::vector3df Center; + core::vector3df Falloff; + core::vector3df Velocity; + video::SColor Color; + f32 Value; + f32 AntiAliasing; + f32 Opacity; + f32 FParam[3]; + u8 Axis; + u8 Projection; + bool Active; +}; + +struct CLWOMeshFileLoader::tLWOMaterial +{ + tLWOMaterial() : Meshbuffer(0), TagType(0), Flags(0), ReflMode(3), TranspMode(3), + Glow(0), AlphaMode(2), Luminance(0.0f), Diffuse(1.0f), Specular(0.0f), + Reflection(0.0f), Transparency(0.0f), Translucency(0.0f), + Sharpness(0.0f), ReflSeamAngle(0.0f), ReflBlur(0.0f), + RefrIndex(1.0f), TranspBlur(0.0f), SmoothingAngle(0.0f), + EdgeTransparency(0.0f), HighlightColor(0.0f), ColorFilter(0.0f), + AdditiveTransparency(0.0f), GlowIntensity(0.0f), GlowSize(0.0f), + AlphaValue(0.0f), VertexColorIntensity(0.0f), VertexColor() {} + + core::stringc Name; + scene::SMeshBuffer *Meshbuffer; + core::stringc ReflMap; + u16 TagType; + u16 Flags; + u16 ReflMode; + u16 TranspMode; + u16 Glow; + u16 AlphaMode; + f32 Luminance; + f32 Diffuse; + f32 Specular; + f32 Reflection; + f32 Transparency; + f32 Translucency; + f32 Sharpness; + f32 ReflSeamAngle; + f32 ReflBlur; + f32 RefrIndex; + f32 TranspBlur; + f32 SmoothingAngle; + f32 EdgeTransparency; + f32 HighlightColor; + f32 ColorFilter; + f32 AdditiveTransparency; + f32 GlowIntensity; + f32 GlowSize; + f32 AlphaValue; + f32 VertexColorIntensity; + video::SColorf VertexColor; + u32 Envelope[23]; + tLWOTextureInfo Texture[7]; +}; + +struct tLWOLayerInfo +{ + u16 Number; + u16 Parent; + u16 Flags; + bool Active; + core::stringc Name; + core::vector3df Pivot; +}; + + +//! Constructor +CLWOMeshFileLoader::CLWOMeshFileLoader(scene::ISceneManager* smgr, + io::IFileSystem* fs) +: SceneManager(smgr), FileSystem(fs), File(0), Mesh(0) +{ + #ifdef _DEBUG + setDebugName("CLWOMeshFileLoader"); + #endif +} + + +//! destructor +CLWOMeshFileLoader::~CLWOMeshFileLoader() +{ + if (Mesh) + Mesh->drop(); +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CLWOMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension(filename, "lwo"); +} + + +//! creates/loads an animated mesh from the file. +IAnimatedMesh* CLWOMeshFileLoader::createMesh(io::IReadFile* file) +{ + File = file; + + if (Mesh) + Mesh->drop(); + + Mesh = new SMesh(); + + if (!readFileHeader()) + return 0; + + if (!readChunks()) + return 0; + +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Creating geometry."); + os::Printer::log("LWO loader: Assigning UV maps."); +#endif + u32 i; + for (i=0; i<Materials.size(); ++i) + { + u16 uvTag; + for (u32 j=0; j<2; ++j) // max 2 texture coords + { + if (Materials[i]->Texture[j].UVname.size()) + { + for (uvTag=0; uvTag<UvName.size(); ++uvTag) + { + if (Materials[i]->Texture[j].UVname == UvName[uvTag]) + { + Materials[i]->Texture[j].UVTag=uvTag; + break; + } + } + for (uvTag=0; uvTag<DUvName.size(); ++uvTag) + { + if (Materials[i]->Texture[j].UVname == DUvName[uvTag]) + { + Materials[i]->Texture[j].DUVTag=uvTag; + break; + } + } + } + } + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Creating polys."); +#endif + // create actual geometry for lwo2 + if (FormatVersion==2) + { + core::array<u32> vertexCount; + vertexCount.reallocate(Materials.size()); + for (i=0; i<Materials.size(); ++i) + vertexCount.push_back(0); + for (u32 polyIndex=0; polyIndex<Indices.size(); ++polyIndex) + vertexCount[MaterialMapping[polyIndex]] += Indices[polyIndex].size(); + for (i=0; i<Materials.size(); ++i) + { + Materials[i]->Meshbuffer->Vertices.reallocate(vertexCount[i]); + Materials[i]->Meshbuffer->Indices.reallocate(vertexCount[i]); + } + } + // create actual geometry for lwo2 + for (u32 polyIndex=0; polyIndex<Indices.size(); ++polyIndex) + { + const u16 tag = MaterialMapping[polyIndex]; + scene::SMeshBuffer *mb=Materials[tag]->Meshbuffer; + const core::array<u32>& poly = Indices[polyIndex]; + const u32 polySize=poly.size(); + const u16 uvTag = Materials[tag]->Texture[0].UVTag; + const u16 duvTag = Materials[tag]->Texture[0].DUVTag; + video::S3DVertex vertex; + vertex.Color=0xffffffff; + const u32 vertCount=mb->Vertices.size(); + for (u32 i=0; i<polySize; ++i) + { + const u32 j=poly[i]; + vertex.Pos=Points[j]; + if (uvTag<UvIndex.size()) + { + for (u32 uvsearch=0; uvsearch < UvIndex[uvTag].size(); ++uvsearch) + { + if(j==UvIndex[uvTag][uvsearch]) + { + vertex.TCoords=TCoords[uvTag][uvsearch]; + break; + } + } + if (duvTag<DUvName.size()) + { + for (u32 polysearch = 0; polysearch < VmPolyPointsIndex[duvTag].size(); polysearch += 2) + { + if (polyIndex==VmPolyPointsIndex[duvTag][polysearch] && j==VmPolyPointsIndex[duvTag][polysearch+1]) + { + vertex.TCoords=VmCoordsIndex[duvTag][polysearch/2]; + break; + } + } + } + } + mb->Vertices.push_back(vertex); + } + // triangulate as trifan + if (polySize>2) + { + for (u32 i=1; i<polySize-1; ++i) + { + mb->Indices.push_back(vertCount); + mb->Indices.push_back(vertCount+i); + mb->Indices.push_back(vertCount+i+1); + } + } + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Fixing meshbuffers."); +#endif + for (u32 i=0; i<Materials.size(); ++i) + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Material name", Materials[i]->Name); + os::Printer::log("LWO loader: Vertex count", core::stringc(Materials[i]->Meshbuffer->Vertices.size())); +#endif + if (!Materials[i]->Meshbuffer->Vertices.size()) + { + Materials[i]->Meshbuffer->drop(); + delete Materials[i]; + continue; + } + for (u32 j=0; j<Materials[i]->Meshbuffer->Vertices.size(); ++j) + Materials[i]->Meshbuffer->Vertices[j].Color=Materials[i]->Meshbuffer->Material.DiffuseColor; + Materials[i]->Meshbuffer->recalculateBoundingBox(); + + // load textures + video::SMaterial& irrMat=Materials[i]->Meshbuffer->Material; + if (Materials[i]->Texture[0].Map != "") // diffuse + irrMat.setTexture(0,loadTexture(Materials[i]->Texture[0].Map)); + if (Materials[i]->Texture[3].Map != "") // reflection + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection texture."); +#endif + video::ITexture* reflTexture = loadTexture(Materials[i]->Texture[3].Map); + if (reflTexture && irrMat.getTexture(0)) + irrMat.setTexture(1, irrMat.getTexture(0)); + irrMat.setTexture(0, reflTexture); + irrMat.MaterialType=video::EMT_REFLECTION_2_LAYER; + } + if (Materials[i]->Texture[4].Map != "") // transparency + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading transparency texture."); +#endif + video::ITexture* transTexture = loadTexture(Materials[i]->Texture[4].Map); + if (transTexture && irrMat.getTexture(0)) + irrMat.setTexture(1, irrMat.getTexture(0)); + irrMat.setTexture(0, transTexture); + irrMat.MaterialType=video::EMT_TRANSPARENT_ADD_COLOR; + } + if (Materials[i]->Texture[6].Map != "") // bump + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading bump texture."); +#endif + const u8 pos = irrMat.getTexture(0)?1:0; + irrMat.setTexture(pos, loadTexture(Materials[i]->Texture[6].Map)); + if (irrMat.getTexture(pos)) + { + // SceneManager->getVideoDriver()->makeNormalMapTexture(irrMat.getTexture(1)); + // irrMat.MaterialType=video::EMT_NORMAL_MAP_SOLID; + } + } + + // cope with planar mapping texture coords + if (Materials[i]->Texture[0].Projection != 5) + { + if (FormatVersion!=2) + { + if (Materials[i]->Texture[0].Flags&1) + Materials[i]->Texture[0].Axis=0; + else if (Materials[i]->Texture[0].Flags&2) + Materials[i]->Texture[0].Axis=1; + else if (Materials[i]->Texture[0].Flags&4) + Materials[i]->Texture[0].Axis=2; + } + // if no axis given choose the dominant one + else if (Materials[i]->Texture[0].Axis>2) + { + if (Materials[i]->Meshbuffer->getBoundingBox().getExtent().Y<Materials[i]->Meshbuffer->getBoundingBox().getExtent().X) + { + if (Materials[i]->Meshbuffer->getBoundingBox().getExtent().Y<Materials[i]->Meshbuffer->getBoundingBox().getExtent().Z) + Materials[i]->Texture[0].Axis=1; + else + Materials[i]->Texture[0].Axis=2; + } + else + { + if (Materials[i]->Meshbuffer->getBoundingBox().getExtent().X<Materials[i]->Meshbuffer->getBoundingBox().getExtent().Z) + Materials[i]->Texture[0].Axis=0; + else + Materials[i]->Texture[0].Axis=2; + } + } + // get the resolution for this axis + f32 resolutionS = core::reciprocal(Materials[i]->Texture[0].Size.Z); + f32 resolutionT = core::reciprocal(Materials[i]->Texture[0].Size.Y); + if (Materials[i]->Texture[0].Axis==1) + { + resolutionS = core::reciprocal(Materials[i]->Texture[0].Size.X); + resolutionT = core::reciprocal(Materials[i]->Texture[0].Size.Z); + } + else if (Materials[i]->Texture[0].Axis==2) + { + resolutionS = core::reciprocal(Materials[i]->Texture[0].Size.X); + resolutionT = core::reciprocal(Materials[i]->Texture[0].Size.Y); + } + // use the two-way planar mapping + SceneManager->getMeshManipulator()->makePlanarTextureMapping(Materials[i]->Meshbuffer, resolutionS, resolutionT, Materials[i]->Texture[0].Axis, Materials[i]->Texture[0].Center); + } + + // add bump maps + if (Materials[i]->Meshbuffer->Material.MaterialType==video::EMT_NORMAL_MAP_SOLID) + { + SMesh* tmpmesh = new SMesh(); + tmpmesh->addMeshBuffer(Materials[i]->Meshbuffer); + SceneManager->getMeshManipulator()->createMeshWithTangents(tmpmesh, true, true); + Mesh->addMeshBuffer(tmpmesh->getMeshBuffer(0)); + tmpmesh->getMeshBuffer(0)->drop(); + tmpmesh->drop(); + } + else + { + SceneManager->getMeshManipulator()->recalculateNormals(Materials[i]->Meshbuffer); + Mesh->addMeshBuffer(Materials[i]->Meshbuffer); + } + Materials[i]->Meshbuffer->drop(); + // clear the material array elements + delete Materials[i]; + } + Mesh->recalculateBoundingBox(); + + SAnimatedMesh* am = new SAnimatedMesh(); + am->Type = EAMT_3DS; + am->addMesh(Mesh); + am->recalculateBoundingBox(); + Mesh->drop(); + Mesh = 0; + + Points.clear(); + Indices.clear(); + MaterialMapping.clear(); + TCoords.clear(); + Materials.clear(); + Images.clear(); + VmPolyPointsIndex.clear(); + VmCoordsIndex.clear(); + UvIndex.clear(); + UvName.clear(); + + return am; +} + + +bool CLWOMeshFileLoader::readChunks() +{ + s32 lastPos; + u32 size; + unsigned int uiType; + char type[5]; + type[4]=0; + tLWOLayerInfo layer; + + while(File->getPos()<File->getSize()) + { + File->read(&type, 4); + //Convert 4-char string to 4-byte integer + //Makes it possible to do a switch statement + uiType = charsToUInt(type); + File->read(&size, 4); +#ifndef __BIG_ENDIAN__ + size=os::Byteswap::byteswap(size); +#endif + lastPos=File->getPos(); + + switch(uiType) + { + case charsToUIntD('L','A','Y','R'): + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading layer."); +#endif + u16 tmp16; + File->read(&tmp16, 2); // number + File->read(&tmp16, 2); // flags + size -= 4; +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + if (((FormatVersion==1)&&(tmp16!=1)) || + ((FormatVersion==2)&&(tmp16&1))) + layer.Active=false; + else + layer.Active=true; + if (FormatVersion==2) + size -= readVec(layer.Pivot); + size -= readString(layer.Name); + if (size) + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + layer.Parent = tmp16; + } + } + break; + case charsToUIntD('P','N','T','S'): + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading points."); +#endif + core::vector3df vec; + Points.clear(); + const u32 tmpsize = size/12; + Points.reallocate(tmpsize); + for (u32 i=0; i<tmpsize; ++i) + { + readVec(vec); + Points.push_back(vec); + } + } + break; + case charsToUIntD('V','M','A','P'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading Vertex mapping."); +#endif + readVertexMapping(size); + break; + case charsToUIntD('P','O','L','S'): + case charsToUIntD('P','T','C','H'): // TODO: should be a subdivison mesh +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading polygons."); +#endif + if (FormatVersion!=2) + readObj1(size); + else + readObj2(size); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Done loading polygons."); +#endif + break; + case charsToUIntD('T','A','G','S'): + case charsToUIntD('S','R','F','S'): + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading surface names."); +#endif + while (size!=0) + { + tLWOMaterial *mat=new tLWOMaterial(); + mat->Name=""; + mat->Meshbuffer=new scene::SMeshBuffer(); + size -= readString(mat->Name); + if (FormatVersion!=2) + mat->TagType = 1; // format 2 has more types + Materials.push_back(mat); + } + } + break; + case charsToUIntD('P','T','A','G'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading tag mapping."); +#endif + readTagMapping(size); + break; + case charsToUIntD('V','M','A','D'): // discontinuous vertex mapping, i.e. additional texcoords +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading Vertex mapping VMAD."); +#endif + readDiscVertexMapping(size); +// case charsToUIntD('V','M','P','A'): +// case charsToUIntD('E','N','V','L'): + break; + case charsToUIntD('C','L','I','P'): + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading clips."); +#endif + u32 index; + u16 subsize; + File->read(&index, 4); +#ifndef __BIG_ENDIAN__ + index=os::Byteswap::byteswap(index); +#endif + size -= 4; + while (size != 0) + { + File->read(&type, 4); + File->read(&subsize, 2); +#ifndef __BIG_ENDIAN__ + subsize=os::Byteswap::byteswap(subsize); +#endif + size -= 6; + if (strncmp(type, "STIL", 4)) + { + File->seek(subsize, true); + size -= subsize; + continue; + } + core::stringc path; + size -= readString(path, subsize); + #ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loaded clip", path.c_str()); + #endif + Images.push_back(path); + } + } + break; + case charsToUIntD('S','U','R','F'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading material."); +#endif + readMat(size); + break; + case charsToUIntD('B','B','O','X'): + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading bbox."); +#endif + // not stored + core::vector3df vec; + for (u32 i=0; i<2; ++i) + readVec(vec); + size -= 24; + } + break; + case charsToUIntD('D','E','S','C'): + case charsToUIntD('T','E','X','T'): + { + core::stringc text; + size -= readString(text, size); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader text", text); +#endif + } + break; + // not needed + case charsToUIntD('I','C','O','N'): + // not yet supported + case charsToUIntD('P','C','H','S'): + case charsToUIntD('C','R','V','S'): + default: +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: skipping ", type); +#endif + //Go to next chunk + File->seek(lastPos + size, false); + break; + } + } + return true; +} + + +void CLWOMeshFileLoader::readObj1(u32 size) +{ + u32 pos; + u16 numVerts, vertIndex; + s16 material; + video::S3DVertex vertex; + vertex.Color=0xffffffff; + + while (size!=0) + { + File->read(&numVerts, 2); +#ifndef __BIG_ENDIAN__ + numVerts=os::Byteswap::byteswap(numVerts); +#endif + pos=File->getPos(); + // skip forward to material number + File->seek(2*numVerts, true); + File->read(&material, 2); +#ifndef __BIG_ENDIAN__ + material=os::Byteswap::byteswap(material); +#endif + size -=2*numVerts+4; + // detail meshes ? + scene::SMeshBuffer *mb; + if (material<0) + mb=Materials[-material-1]->Meshbuffer; + else + mb=Materials[material-1]->Meshbuffer; + // back to vertex list start + File->seek(pos, false); + + const u16 vertCount=mb->Vertices.size(); + for (u16 i=0; i<numVerts; ++i) + { + File->read(&vertIndex, 2); +#ifndef __BIG_ENDIAN__ + vertIndex=os::Byteswap::byteswap(vertIndex); +#endif + vertex.Pos=Points[vertIndex]; + mb->Vertices.push_back(vertex); + } + for (u16 i=1; i<numVerts-1; ++i) + { + mb->Indices.push_back(vertCount); + mb->Indices.push_back(vertCount+i); + mb->Indices.push_back(vertCount+i+1); + } + // skip material number and detail surface count + // detail surface can be read just as a normal one now + if (material<0) + File->read(&material, 2); + File->read(&material, 2); + } +} + + +void CLWOMeshFileLoader::readVertexMapping(u32 size) +{ + char type[5]={0}; + u16 dimension; + core::stringc name; + File->read(&type, 4); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Vertex map type", type); +#endif + File->read(&dimension,2); +#ifndef __BIG_ENDIAN__ + dimension=os::Byteswap::byteswap(dimension); +#endif + size -= 6; + size -= readString(name); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Vertex map", name.c_str()); +#endif + if (strncmp(type, "TXUV", 4)) // also support RGB, RGBA, WGHT, ... + { + File->seek(size, true); + return; + } + UvName.push_back(name); + + TCoords.push_back(core::array<core::vector2df>()); + core::array<core::vector2df>& UvCoords=TCoords.getLast(); + UvCoords.reallocate(Points.size()); + UvIndex.push_back(core::array<u32>()); + core::array<u32>& UvPointsArray=UvIndex.getLast(); + UvPointsArray.reallocate(Points.size()); + + u32 index; + core::vector2df tcoord; + while (size) + { + size -= readVX(index); + File->read(&tcoord.X, 4); + File->read(&tcoord.Y, 4); + size -= 8; +#ifndef __BIG_ENDIAN__ + index=os::Byteswap::byteswap(index); + tcoord.X=os::Byteswap::byteswap(tcoord.X); + tcoord.Y=os::Byteswap::byteswap(tcoord.Y); +#endif + UvCoords.push_back(tcoord); + UvPointsArray.push_back(index); + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: UvCoords", core::stringc(UvCoords.size())); +#endif +} + + +void CLWOMeshFileLoader::readDiscVertexMapping(u32 size) +{ + char type[5]={0}; + u16 dimension; + core::stringc name; + File->read(&type, 4); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Discontinuous vertex map type", type); +#endif + File->read(&dimension,2); +#ifndef __BIG_ENDIAN__ + dimension=os::Byteswap::byteswap(dimension); +#endif + size -= 6; + size -= readString(name); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: Discontinuous vertex map", name.c_str()); +#endif + if (strncmp(type, "TXUV", 4)) + { + File->seek(size, true); + return; + } + DUvName.push_back(name); + VmPolyPointsIndex.push_back(core::array<u32>()); + core::array<u32>& VmPolyPoints=VmPolyPointsIndex.getLast(); + + VmCoordsIndex.push_back(core::array<core::vector2df>()); + core::array<core::vector2df>& VmCoords=VmCoordsIndex.getLast(); + + u32 vmpolys; + u32 vmpoints; + core::vector2df vmcoords; + while (size) + { + size-=readVX(vmpoints); + size-=readVX(vmpolys); + File->read(&vmcoords.X, 4); + File->read(&vmcoords.Y, 4); + size -= 8; +#ifndef __BIG_ENDIAN__ + vmpoints=os::Byteswap::byteswap(vmpoints); + vmpolys=os::Byteswap::byteswap(vmpolys); + vmcoords.X=os::Byteswap::byteswap(vmcoords.X); + vmcoords.Y=os::Byteswap::byteswap(vmcoords.Y); +#endif + VmCoords.push_back(vmcoords); + VmPolyPoints.push_back(vmpolys); + VmPolyPoints.push_back(vmpoints); + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: VmCoords", core::stringc(VmCoords.size())); +#endif +} + + +void CLWOMeshFileLoader::readTagMapping(u32 size) +{ + char type[5]; + type[4]=0; + File->read(&type, 4); + size -= 4; + if ((strncmp(type, "SURF", 4))||(Indices.size()==0)) + { + File->seek(size, true); + return; + } + + while (size!=0) + { + u16 tag; + u32 polyIndex; + size-=readVX(polyIndex); + File->read(&tag, 2); +#ifndef __BIG_ENDIAN__ + tag=os::Byteswap::byteswap(tag); +#endif + size -= 2; + MaterialMapping[polyIndex]=tag; + Materials[tag]->TagType=1; + } +} + + +void CLWOMeshFileLoader::readObj2(u32 size) +{ + char type[5]; + type[4]=0; + File->read(&type, 4); + size -= 4; + Indices.clear(); + if (strncmp(type, "FACE", 4)) // also possible are splines, subdivision patches, metaballs, and bones + { + File->seek(size, true); + return; + } + u16 numVerts=0; + while (size!=0) + { + File->read(&numVerts, 2); +#ifndef __BIG_ENDIAN__ + numVerts=os::Byteswap::byteswap(numVerts); +#endif + // mask out flags + numVerts &= 0x03FF; + + size -= 2; + Indices.push_back(core::array<u32>()); + u32 vertIndex; + core::array<u32>& polyArray = Indices.getLast(); + polyArray.reallocate(numVerts); + for (u16 i=0; i<numVerts; ++i) + { + size -= readVX(vertIndex); + polyArray.push_back(vertIndex); + } + } + MaterialMapping.reallocate(Indices.size()); + for (u32 j=0; j<Indices.size(); ++j) + MaterialMapping.push_back(0); +} + + +void CLWOMeshFileLoader::readMat(u32 size) +{ + core::stringc name; + + tLWOMaterial* mat=0; + size -= readString(name); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: material name", name.c_str()); +#endif + for (u32 i=0; i<Materials.size(); ++i) + { + if ((Materials[i]->TagType==1) && (Materials[i]->Name==name)) + { + mat=Materials[i]; + break; + } + } + if (!mat) + { + File->seek(size, true); + return; + } + if (FormatVersion==2) + size -= readString(name); + + video::SMaterial& irrMat=mat->Meshbuffer->Material; + + u8 currTexture=0; + while (size!=0) + { + char type[5]; + type[4]=0; + u32 uiType; + u32 tmp32; + u16 subsize, tmp16; + f32 tmpf32; + File->read(&type, 4); + //Convert 4-char string to 4-byte integer + //Makes it possible to do a switch statement + uiType = charsToUInt(type); + File->read(&subsize, 2); +#ifndef __BIG_ENDIAN__ + subsize=os::Byteswap::byteswap(subsize); +#endif + size -= 6; + switch (uiType) + { + case charsToUIntD('C','O','L','R'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading Ambient color."); +#endif + { + s32 colSize = readColor(irrMat.DiffuseColor); + irrMat.AmbientColor=irrMat.DiffuseColor; + size -= colSize; + subsize -= colSize; + if (FormatVersion==2) + size -= readVX(mat->Envelope[0]); + } + break; + case charsToUIntD('D','I','F','F'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading Diffuse color."); +#endif + { + if (FormatVersion==2) + { + File->read(&mat->Diffuse, 4); +#ifndef __BIG_ENDIAN__ + mat->Diffuse=os::Byteswap::byteswap(mat->Diffuse); +#endif + size -= 4; + subsize -= 4; + size -= readVX(mat->Envelope[1]); + } + else + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Diffuse=tmp16/256.0f; + size -= 2; + subsize -= 2; + } + } + break; + case charsToUIntD('V','D','I','F'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading Diffuse color."); +#endif + { + File->read(&mat->Diffuse, 4); +#ifndef __BIG_ENDIAN__ + mat->Diffuse=os::Byteswap::byteswap(mat->Diffuse); +#endif + size -= 4; + } + break; + case charsToUIntD('L','U','M','I'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading luminance."); +#endif + { + if (FormatVersion==2) + { + File->read(&mat->Luminance, 4); +#ifndef __BIG_ENDIAN__ + mat->Luminance=os::Byteswap::byteswap(mat->Luminance); +#endif + size -= 4; + subsize -= 4; + size -= readVX(mat->Envelope[2]); + } + else + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Luminance=tmp16/256.0f; + size -= 2; + subsize -= 2; + } } + break; + case charsToUIntD('V','L','U','M'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading luminance."); +#endif + { + File->read(&mat->Luminance, 4); +#ifndef __BIG_ENDIAN__ + mat->Luminance=os::Byteswap::byteswap(mat->Luminance); +#endif + size -= 4; + } + break; + case charsToUIntD('S','P','E','C'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading specular."); +#endif + { + if (FormatVersion==2) + { + File->read(&mat->Specular, 4); +#ifndef __BIG_ENDIAN__ + mat->Specular=os::Byteswap::byteswap(mat->Specular); +#endif + size -= 4; + subsize -= 4; + size -= readVX(mat->Envelope[3]); + } + else + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Specular=tmp16/256.0f;; + size -= 2; + subsize -= 2; + } + } + break; + case charsToUIntD('V','S','P','C'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading specular."); +#endif + { + File->read(&mat->Specular, 4); +#ifndef __BIG_ENDIAN__ + mat->Specular=os::Byteswap::byteswap(mat->Specular); +#endif + size -= 4; + } + break; + case charsToUIntD('R','E','F','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection."); +#endif + { + if (FormatVersion==2) + { + File->read(&mat->Reflection, 4); +#ifndef __BIG_ENDIAN__ + mat->Reflection=os::Byteswap::byteswap(mat->Reflection); +#endif + size -= 4; + subsize -= 4; + size -= readVX(mat->Envelope[4]); + } + else + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Reflection=tmp16/256.0f; + size -= 2; + subsize -= 2; + } + } + break; + case charsToUIntD('V','R','F','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection."); +#endif + { + File->read(&mat->Reflection, 4); +#ifndef __BIG_ENDIAN__ + mat->Reflection=os::Byteswap::byteswap(mat->Reflection); +#endif + size -= 4; + } + break; + case charsToUIntD('T','R','A','N'): + { + if (FormatVersion==2) + { + File->read(&mat->Transparency, 4); +#ifndef __BIG_ENDIAN__ + mat->Transparency=os::Byteswap::byteswap(mat->Transparency); +#endif + size -= 4; + subsize -= 4; + size -= readVX(mat->Envelope[5]); + } + else + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Transparency=tmp16/256.0f; + size -= 2; + subsize -= 2; + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading transparency", core::stringc(mat->Transparency).c_str()); +#endif + } + break; + case charsToUIntD('V','T','R','N'): + { + File->read(&mat->Transparency, 4); +#ifndef __BIG_ENDIAN__ + mat->Transparency=os::Byteswap::byteswap(mat->Transparency); +#endif + size -= 4; + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading transparency", core::stringc(mat->Transparency).c_str()); +#endif + break; + case charsToUIntD('T','R','N','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading translucency."); +#endif + { + File->read(&mat->Translucency, 4); +#ifndef __BIG_ENDIAN__ + mat->Translucency=os::Byteswap::byteswap(mat->Translucency); +#endif + size -= 4; + subsize -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[6]); + } + break; + case charsToUIntD('G','L','O','S'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading glossy."); +#endif + { + if (FormatVersion == 2) + { + File->read(&irrMat.Shininess, 4); +#ifndef __BIG_ENDIAN__ + irrMat.Shininess=os::Byteswap::byteswap(irrMat.Shininess); +#endif + size -= 4; + subsize -= 4; + size -= readVX(mat->Envelope[7]); + } + else + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + irrMat.Shininess=tmp16/16.f; + size -= 2; + subsize -= 2; + } + } + break; + case charsToUIntD('S','H','R','P'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading sharpness."); +#endif + { + File->read(&mat->Sharpness, 4); +#ifndef __BIG_ENDIAN__ + mat->Sharpness=os::Byteswap::byteswap(mat->Sharpness); +#endif + size -= 4; + subsize -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[8]); + } + break; + case charsToUIntD('B','U','M','P'): + case charsToUIntD('T','A','M','P'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading bumpiness."); +#endif + { + File->read(&tmpf32, 4); +#ifndef __BIG_ENDIAN__ + tmpf32=os::Byteswap::byteswap(tmpf32); +#endif + if (currTexture==6) + irrMat.MaterialTypeParam=tmpf32; + size -= 4; + subsize -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[9]); + } + break; + case charsToUIntD('S','I','D','E'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading backface culled."); +#endif + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + if (tmp16==1) + irrMat.BackfaceCulling=true; + else if (tmp16==3) + irrMat.BackfaceCulling=false; + size -= 2; + } + break; + case charsToUIntD('S','M','A','N'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading smoothing angle."); +#endif + { + File->read(&mat->SmoothingAngle, 4); +#ifndef __BIG_ENDIAN__ + mat->SmoothingAngle=os::Byteswap::byteswap(mat->SmoothingAngle); +#endif + size -= 4; + } + break; + case charsToUIntD('R','F','O','P'): + case charsToUIntD('R','F','L','T'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection mode."); +#endif + { + File->read(&mat->ReflMode, 2); +#ifndef __BIG_ENDIAN__ + mat->ReflMode=os::Byteswap::byteswap(mat->ReflMode); +#endif + size -= 2; + } + break; + case charsToUIntD('R','I','M','G'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection map."); +#endif + { + if (FormatVersion==2) + { + size -= readVX(tmp32); + if (tmp32) + mat->ReflMap=Images[tmp32-1]; + } + else + size -= readString(mat->ReflMap, size); + } + break; + case charsToUIntD('R','S','A','N'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection seam angle."); +#endif + { + File->read(&mat->ReflSeamAngle, 4); +#ifndef __BIG_ENDIAN__ + mat->ReflSeamAngle=os::Byteswap::byteswap(mat->ReflSeamAngle); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[10]); + } + break; + case charsToUIntD('R','B','L','R'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading reflection blur."); +#endif + { + File->read(&mat->ReflBlur, 4); +#ifndef __BIG_ENDIAN__ + mat->ReflBlur=os::Byteswap::byteswap(mat->ReflBlur); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[11]); + } + break; + case charsToUIntD('R','I','N','D'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading refraction index."); +#endif + { + File->read(&mat->RefrIndex, 4); +#ifndef __BIG_ENDIAN__ + mat->RefrIndex=os::Byteswap::byteswap(mat->RefrIndex); +#endif + size -= 4; + subsize -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[12]); + } + break; + case charsToUIntD('T','R','O','P'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading refraction options."); +#endif + { + File->read(&mat->TranspMode, 2); +#ifndef __BIG_ENDIAN__ + mat->TranspMode=os::Byteswap::byteswap(mat->TranspMode); +#endif + size -= 2; + } + break; + case charsToUIntD('T','I','M','G'): + { + if (FormatVersion==2) + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading refraction map."); +#endif + size -= readVX(tmp32); +#ifndef __BIG_ENDIAN__ + tmp32=os::Byteswap::byteswap(tmp32); +#endif + if (tmp32) + mat->Texture[currTexture].Map=Images[tmp32-1]; + } + else + { + size -= readString(mat->Texture[currTexture].Map, size); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading image", mat->Texture[currTexture].Map.c_str()); +#endif + } + } + break; + case charsToUIntD('T','B','L','R'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading transparency blur."); +#endif + { + File->read(&mat->TranspBlur, 4); +#ifndef __BIG_ENDIAN__ + mat->TranspBlur=os::Byteswap::byteswap(mat->TranspBlur); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[13]); + } + break; + case charsToUIntD('C','L','R','H'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading highlight color."); +#endif + { + File->read(&mat->HighlightColor, 4); +#ifndef __BIG_ENDIAN__ + mat->HighlightColor=os::Byteswap::byteswap(mat->HighlightColor); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[14]); + } + break; + case charsToUIntD('C','L','R','F'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading color filter."); +#endif + { + File->read(&mat->ColorFilter, 4); +#ifndef __BIG_ENDIAN__ + mat->ColorFilter=os::Byteswap::byteswap(mat->ColorFilter); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[15]); + } + break; + case charsToUIntD('A','D','T','R'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading additive transparency."); +#endif + { + File->read(&mat->AdditiveTransparency, 4); +#ifndef __BIG_ENDIAN__ + mat->AdditiveTransparency=os::Byteswap::byteswap(mat->AdditiveTransparency); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[16]); + } + break; + case charsToUIntD('G','L','O','W'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading glow."); +#endif + { + if (FormatVersion==0) + { + File->read(&mat->GlowIntensity, 4); +#ifndef __BIG_ENDIAN__ + mat->GlowIntensity=os::Byteswap::byteswap(mat->GlowIntensity); +#endif + size -= 4; + } + else + { + File->read(&mat->Glow, 2); +#ifndef __BIG_ENDIAN__ + mat->Glow=os::Byteswap::byteswap(mat->Glow); +#endif + size -= 2; + File->read(&mat->GlowIntensity, 4); +#ifndef __BIG_ENDIAN__ + mat->GlowIntensity=os::Byteswap::byteswap(mat->GlowIntensity); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[17]); + File->read(&mat->GlowSize, 4); +#ifndef __BIG_ENDIAN__ + mat->GlowSize=os::Byteswap::byteswap(mat->GlowSize); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[18]); + } + } + break; + case charsToUIntD('G','V','A','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading glow intensity."); +#endif + { + File->read(&mat->GlowIntensity, 4); +#ifndef __BIG_ENDIAN__ + mat->GlowIntensity=os::Byteswap::byteswap(mat->GlowIntensity); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[17]); + } + break; + case charsToUIntD('L','I','N','E'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading isWireframe."); +#endif + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + if (tmp16&1) + irrMat.Wireframe=true; + size -= 2; + if (size!=0) + { + File->read(&irrMat.Thickness, 4); +#ifndef __BIG_ENDIAN__ + irrMat.Thickness=os::Byteswap::byteswap(irrMat.Thickness); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[19]); + } + if (size!=0) + { + video::SColor lineColor; + size -= readColor(lineColor); + if (FormatVersion==2) + size -= readVX(mat->Envelope[20]); + } + } + break; + case charsToUIntD('A','L','P','H'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading alpha mode."); +#endif + { + File->read(&mat->AlphaMode, 2); +#ifndef __BIG_ENDIAN__ + mat->AlphaMode=os::Byteswap::byteswap(mat->AlphaMode); +#endif + size -= 2; + File->read(&mat->AlphaValue, 4); +#ifndef __BIG_ENDIAN__ + mat->AlphaValue=os::Byteswap::byteswap(mat->AlphaValue); +#endif + size -= 4; + } + break; + case charsToUIntD('V','C','O','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading vertex color."); +#endif + { + File->read(&mat->VertexColorIntensity, 4); +#ifndef __BIG_ENDIAN__ + mat->VertexColorIntensity=os::Byteswap::byteswap(mat->VertexColorIntensity); +#endif + size -= 4; + if (FormatVersion==2) + size -= readVX(mat->Envelope[21]); + File->read(&tmp32, 4); // skip type + size -= 4; + core::stringc tmpname; + size -= readString(tmpname, size); +// mat->VertexColor = getColorVMAP(tmpname); + } + break; + case charsToUIntD('F','L','A','G'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading flag."); +#endif + { + File->read(&mat->Flags, 2); +#ifndef __BIG_ENDIAN__ + mat->Flags=os::Byteswap::byteswap(mat->Flags); +#endif + if (mat->Flags&1) + mat->Luminance=1.0f; + if (mat->Flags&256) + irrMat.BackfaceCulling=false; + size -= 2; + } + break; + case charsToUIntD('E','D','G','E'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading edge."); +#endif + { + File->read(&mat->EdgeTransparency, 4); +#ifndef __BIG_ENDIAN__ + mat->EdgeTransparency=os::Byteswap::byteswap(mat->EdgeTransparency); +#endif + size -= 4; + } + break; + case charsToUIntD('C','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading ctex."); +#endif + currTexture=0; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('D','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading dtex."); +#endif + currTexture=1; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('S','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading stex."); +#endif + currTexture=2; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('R','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading rtex."); +#endif + currTexture=3; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('T','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading ttex."); +#endif + currTexture=4; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('L','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading ltex."); +#endif + currTexture=5; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('B','T','E','X'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading btex."); +#endif + currTexture=6; + size -= readString(mat->Texture[currTexture].Type, size); + break; + case charsToUIntD('T','A','L','P'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading alpha map."); +#endif + size -= readString(mat->Texture[currTexture].AlphaMap, size); + break; + case charsToUIntD('T','F','L','G'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture flag."); +#endif + { + File->read(&mat->Texture[currTexture].Flags, 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].Flags=os::Byteswap::byteswap(mat->Texture[currTexture].Flags); +#endif + size -= 2; + } + break; + case charsToUIntD('E','N','A','B'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading isEnabled."); +#endif + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Texture[currTexture].Active=(tmp16!=0); + size -= 2; + } + break; + case charsToUIntD('W','R','A','P'): + case charsToUIntD('T','W','R','P'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture wrap."); +#endif + { + File->read(&mat->Texture[currTexture].WidthWrap, 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].WidthWrap=os::Byteswap::byteswap(mat->Texture[currTexture].WidthWrap); +#endif + File->read(&mat->Texture[currTexture].HeightWrap, 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].HeightWrap=os::Byteswap::byteswap(mat->Texture[currTexture].HeightWrap); +#endif + size -= 4; + } + break; + case charsToUIntD('T','V','E','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture velocity."); +#endif + size -= readVec(mat->Texture[currTexture].Velocity); + break; + case charsToUIntD('T','C','L','R'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture color."); +#endif + size -= readColor(mat->Texture[currTexture].Color); + break; + case charsToUIntD('A','A','S','T'): + case charsToUIntD('T','A','A','S'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture antialias."); +#endif + { + tmp16=0; + if (FormatVersion==2) + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + size -= 2; + } + File->read(&mat->Texture[currTexture].AntiAliasing, 4); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].AntiAliasing=os::Byteswap::byteswap(mat->Texture[currTexture].AntiAliasing); +#endif + if (tmp16 & ~0x01) + mat->Texture[currTexture].AntiAliasing=0.0f; // disabled + size -= 4; + } + break; + case charsToUIntD('T','O','P','C'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture opacity."); +#endif + { + File->read(&mat->Texture[currTexture].Opacity, 4); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].Opacity=os::Byteswap::byteswap(mat->Texture[currTexture].Opacity); +#endif + size -= 4; + } + break; + case charsToUIntD('O','P','A','C'): + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture opacity and type."); +#endif + File->read(&mat->Texture[currTexture].OpacType, 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].OpacType=os::Byteswap::byteswap(mat->Texture[currTexture].OpacType); +#endif + File->read(&mat->Texture[currTexture].Opacity, 4); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].Opacity=os::Byteswap::byteswap(mat->Texture[currTexture].Opacity); +#endif + size -= 6; + subsize -= 6; + if (FormatVersion==2) + size -= readVX(mat->Envelope[22]); + } + break; + case charsToUIntD('A','X','I','S'): + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Texture[currTexture].Axis=(u8)tmp16; + size -= 2; +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading axis value", core::stringc(tmp16).c_str()); +#endif + } + break; + case charsToUIntD('T','M','A','P'): // empty separation chunk + break; + case charsToUIntD('T','C','T','R'): + case charsToUIntD('C','N','T','R'): + { + core::vector3df& center=mat->Texture[currTexture].Center; + size -= readVec(center); + if (FormatVersion==2) + size -= readVX(mat->Envelope[22]); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture center", (core::stringc(center.X)+" "+core::stringc(center.Y)+" "+core::stringc(center.Z)).c_str()); +#endif + } + break; + case charsToUIntD('T','S','I','Z'): + case charsToUIntD('S','I','Z','E'): + { + core::vector3df& tsize=mat->Texture[currTexture].Size; + size -= readVec(tsize); + if (FormatVersion==2) + size -= readVX(mat->Envelope[22]); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture size", (core::stringc(tsize.X)+" "+core::stringc(tsize.Y)+" "+core::stringc(tsize.Z)).c_str()); +#endif + } + break; + case charsToUIntD('R','O','T','A'): + { + core::vector3df rotation; + size -= readVec(rotation); + if (FormatVersion==2) + size -= readVX(mat->Envelope[22]); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture rotation", (core::stringc(rotation.X)+" "+core::stringc(rotation.Y)+" "+core::stringc(rotation.Z)).c_str()); +#endif + } + break; + case charsToUIntD('O','R','E','F'): + { + core::stringc tmpname; + size -= readString(tmpname); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: texture reference object", tmpname.c_str()); +#endif + } + break; + case charsToUIntD('T','F','A','L'): + case charsToUIntD('F','A','L','L'): + { + if (FormatVersion==2) + { + u16 tmp16; + File->read(&tmp16, 2); + size -= 2; +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + } + + core::vector3df& falloff=mat->Texture[currTexture].Falloff; + size -= readVec(falloff); + if (FormatVersion==2) + size -= readVX(mat->Envelope[22]); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture falloff"); +#endif + } + break; + case charsToUIntD('C','S','Y','S'): + { + u16 tmp16; + File->read(&tmp16, 2); + size -= 2; +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: texture coordinate system", tmp16==0?"object coords":"world coords"); +#endif + } + break; + case charsToUIntD('T','V','A','L'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture value."); +#endif + { + File->read(&tmp16, 2); +#ifndef __BIG_ENDIAN__ + tmp16=os::Byteswap::byteswap(tmp16); +#endif + mat->Texture[currTexture].Value=tmp16/256.0f; + size -= 2; + } + break; + case charsToUIntD('T','F','P','0'): + case charsToUIntD('T','S','P','0'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture param 0."); +#endif + { + File->read(&mat->Texture[currTexture].FParam[0], 4); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].FParam[0]=os::Byteswap::byteswap(mat->Texture[currTexture].FParam[0]); +#endif + size -= 4; + } + break; + case charsToUIntD('T','F','P','1'): + case charsToUIntD('T','S','P','1'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture param 1."); +#endif + { + File->read(&mat->Texture[currTexture].FParam[1], 4); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].FParam[1]=os::Byteswap::byteswap(mat->Texture[currTexture].FParam[1]); +#endif + size -= 4; + } + break; + case charsToUIntD('T','F','P','2'): + case charsToUIntD('T','S','P','2'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture param 2."); +#endif + { + File->read(&mat->Texture[currTexture].FParam[2], 4); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].FParam[2]=os::Byteswap::byteswap(mat->Texture[currTexture].FParam[2]); +#endif + size -= 4; + } + break; + case charsToUIntD('T','F','R','Q'): + case charsToUIntD('T','I','P','0'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture iparam 0."); +#endif + { + File->read(&mat->Texture[currTexture].IParam[0], 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].IParam[0]=os::Byteswap::byteswap(mat->Texture[currTexture].IParam[0]); +#endif + size -= 2; + } + break; + case charsToUIntD('T','I','P','1'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture param 1."); +#endif + { + File->read(&mat->Texture[currTexture].IParam[1], 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].IParam[1]=os::Byteswap::byteswap(mat->Texture[currTexture].IParam[1]); +#endif + size -= 2; + } + break; + case charsToUIntD('T','I','P','2'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading texture param 2."); +#endif + { + File->read(&mat->Texture[currTexture].IParam[2], 2); +#ifndef __BIG_ENDIAN__ + mat->Texture[currTexture].IParam[2]=os::Byteswap::byteswap(mat->Texture[currTexture].IParam[2]); +#endif + size -= 2; + } + break; + case charsToUIntD('V','M','A','P'): + { + size -= readString(mat->Texture[currTexture].UVname); +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading material vmap binding",mat->Texture[currTexture].UVname.c_str()); +#endif + } + break; + case charsToUIntD('B','L','O','K'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading blok."); +#endif + { + core::stringc ordinal; + File->read(&type, 4); + File->read(&subsize, 2); +#ifndef __BIG_ENDIAN__ + subsize=os::Byteswap::byteswap(subsize); +#endif + size -= 6; + size -= readString(ordinal, size); + } + break; + case charsToUIntD('C','H','A','N'): + { + File->read(&type, 4); + size -= 4; + if (!strncmp(type, "COLR", 4)) + currTexture=0; + else if (!strncmp(type, "DIFF", 4)) + currTexture=1; + else if (!strncmp(type, "LUMI", 4)) + currTexture=5; + else if (!strncmp(type, "SPEC", 4)) + currTexture=2; + else if (!strncmp(type, "REFL", 4)) + currTexture=3; + else if (!strncmp(type, "TRAN", 4)) + currTexture=4; + else if (!strncmp(type, "BUMP", 4)) + currTexture=6; + } +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading channel ", type); +#endif + break; + case charsToUIntD('I','M','A','G'): +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading channel map."); +#endif + { + u16 index; + File->read(&index, 2); +#ifndef __BIG_ENDIAN__ + index=os::Byteswap::byteswap(index); +#endif + size -= 2; + if (index) + mat->Texture[currTexture].Map=Images[index-1]; + } + break; + case charsToUIntD('P','R','O','J'): // define the projection type +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: loading channel projection type."); +#endif + { + u16 index; + File->read(&index, 2); +#ifndef __BIG_ENDIAN__ + index=os::Byteswap::byteswap(index); +#endif + size -= 2; +#ifdef LWO_READER_DEBUG + if (index != 5) + os::Printer::log("LWO loader: wrong channel projection type", core::stringc(index).c_str()); +#endif + mat->Texture[currTexture].Projection=(u8)index; + } + break; + case charsToUIntD('W','R','P','W'): // for cylindrical and spherical projections + case charsToUIntD('W','R','P','H'): // for cylindrical and spherical projections + default: + { +#ifdef LWO_READER_DEBUG + os::Printer::log("LWO loader: skipping ", core::stringc((char*)&uiType, 4)); +#endif + File->seek(subsize, true); + size -= subsize; + } + } + } + + if (mat->Transparency != 0.f) + { + irrMat.MaterialType=video::EMT_TRANSPARENT_ADD_COLOR; + } +} + + +u32 CLWOMeshFileLoader::readColor(video::SColor& color) +{ + if (FormatVersion!=2) + { + u8 colorComponent; + File->read(&colorComponent, 1); + color.setRed(colorComponent); + File->read(&colorComponent, 1); + color.setGreen(colorComponent); + File->read(&colorComponent, 1); + color.setBlue(colorComponent); + // unknown value + File->read(&colorComponent, 1); + return 4; + } + else + { + video::SColorf col; + File->read(&col.r, 4); +#ifndef __BIG_ENDIAN__ + col.r=os::Byteswap::byteswap(col.r); +#endif + File->read(&col.g, 4); +#ifndef __BIG_ENDIAN__ + col.g=os::Byteswap::byteswap(col.g); +#endif + File->read(&col.b, 4); +#ifndef __BIG_ENDIAN__ + col.b=os::Byteswap::byteswap(col.b); +#endif + color=col.toSColor(); + return 12; + } +} + +u32 CLWOMeshFileLoader::readString(core::stringc& name, u32 size) +{ + c8 c; + + name=""; + if (size) + name.reserve(size); + File->read(&c, 1); + while (c) + { + name.append(c); + File->read(&c, 1); + } + // read extra 0 upon odd file position + if (File->getPos() & 0x1) + { + File->read(&c, 1); + return (name.size()+2); + } + return (name.size()+1); +} + + +u32 CLWOMeshFileLoader::readVec(core::vector3df& vec) +{ + File->read(&vec.X, 4); +#ifndef __BIG_ENDIAN__ + vec.X=os::Byteswap::byteswap(vec.X); +#endif + File->read(&vec.Y, 4); +#ifndef __BIG_ENDIAN__ + vec.Y=os::Byteswap::byteswap(vec.Y); +#endif + File->read(&vec.Z, 4); +#ifndef __BIG_ENDIAN__ + vec.Z=os::Byteswap::byteswap(vec.Z); +#endif + return 12; +} + + +u32 CLWOMeshFileLoader::readVX(u32& num) +{ + u16 tmpIndex; + + File->read(&tmpIndex, 2); +#ifndef __BIG_ENDIAN__ + tmpIndex=os::Byteswap::byteswap(tmpIndex); +#endif + num=tmpIndex; + if (num >= 0xFF00) + { + File->read(&tmpIndex, 2); +#ifndef __BIG_ENDIAN__ + tmpIndex=os::Byteswap::byteswap(tmpIndex); +#endif + num=((num << 16)|tmpIndex) & ~0xFF000000; + return 4; + } + return 2; +} + + +bool CLWOMeshFileLoader::readFileHeader() +{ + u32 Id; + + File->read(&Id, 4); +#ifndef __BIG_ENDIAN__ + Id=os::Byteswap::byteswap(Id); +#endif + if (Id != 0x464f524d) // FORM + return false; + + //skip the file length + File->read(&Id, 4); + + File->read(&Id, 4); +#ifndef __BIG_ENDIAN__ + Id=os::Byteswap::byteswap(Id); +#endif + // Currently supported: LWOB, LWLO, LWO2 + switch (Id) + { + case 0x4c574f42: + FormatVersion = 0; // LWOB + break; + case 0x4c574c4f: + FormatVersion = 1; // LWLO + break; + case 0x4c574f32: + FormatVersion = 2; // LWO2 + break; + default: + return false; // unsupported + } + + return true; +} + + +video::ITexture* CLWOMeshFileLoader::loadTexture(const core::stringc& file) +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + if (FileSystem->existFile(file)) + return driver->getTexture(file); + + core::stringc strippedName=FileSystem->getFileBasename(file); + if (FileSystem->existFile(strippedName)) + return driver->getTexture(strippedName); + core::stringc newpath = FileSystem->getFileDir(File->getFileName()); + newpath.append("/"); + newpath.append(strippedName); + if (FileSystem->existFile(newpath)) + return driver->getTexture(newpath); + os::Printer::log("Could not load texture", file.c_str(), ELL_WARNING); + + return 0; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h new file mode 100644 index 0000000..c72d666 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h @@ -0,0 +1,87 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_LWO_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_LWO_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "SMeshBuffer.h" +#include "irrString.h" + +namespace irr +{ +namespace io +{ + class IReadFile; + class IFileSystem; +} // end namespace io +namespace scene +{ + + struct SMesh; + class ISceneManager; + +//! Meshloader capable of loading Lightwave 3D meshes. +class CLWOMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CLWOMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); + + //! destructor + virtual ~CLWOMeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IUnknown::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + struct tLWOMaterial; + + bool readFileHeader(); + bool readChunks(); + void readObj1(u32 size); + void readTagMapping(u32 size); + void readVertexMapping(u32 size); + void readDiscVertexMapping (u32 size); + void readObj2(u32 size); + void readMat(u32 size); + u32 readString(core::stringc& name, u32 size=0); + u32 readVec(core::vector3df& vec); + u32 readVX(u32& num); + u32 readColor(video::SColor& color); + video::ITexture* loadTexture(const core::stringc& file); + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + io::IReadFile* File; + SMesh* Mesh; + + core::array<core::vector3df> Points; + core::array<core::array<u32> > Indices; + core::array<core::stringc> UvName; + core::array<core::array<u32> > UvIndex; + core::array<core::stringc> DUvName; + core::array<core::array<u32> > VmPolyPointsIndex; + core::array<core::array<core::vector2df> > VmCoordsIndex; + + core::array<u16> MaterialMapping; + core::array<core::array<core::vector2df> > TCoords; + core::array<tLWOMaterial*> Materials; + core::array<core::stringc> Images; + u8 FormatVersion; +}; + +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.cpp new file mode 100644 index 0000000..55b6337 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.cpp @@ -0,0 +1,275 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CLightSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" + +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CLightSceneNode::CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, video::SColorf color, f32 radius) +: ILightSceneNode(parent, mgr, id, position), DriverLightIndex(-1), LightIsOn(true) +{ + #ifdef _DEBUG + setDebugName("CLightSceneNode"); + #endif + + LightData.DiffuseColor = color; + // set some useful specular color + LightData.SpecularColor = color.getInterpolated(video::SColor(255,255,255,255),0.7f); + + setRadius(radius); +} + + +//! pre render event +void CLightSceneNode::OnRegisterSceneNode() +{ + doLightRecalc(); + + if (IsVisible) + SceneManager->registerNodeForRendering(this, ESNRP_LIGHT); + + ISceneNode::OnRegisterSceneNode(); +} + + +//! render +void CLightSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + if (!driver) + return; + + if ( DebugDataVisible & scene::EDS_BBOX ) + { + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + + switch ( LightData.Type ) + { + case video::ELT_POINT: + case video::ELT_SPOT: + driver->draw3DBox(BBox, LightData.DiffuseColor.toSColor()); + break; + + case video::ELT_DIRECTIONAL: + driver->draw3DLine(core::vector3df(0.f, 0.f, 0.f), + LightData.Direction * LightData.Radius, + LightData.DiffuseColor.toSColor()); + break; + default: + break; + } + } + + DriverLightIndex = driver->addDynamicLight(LightData); + setVisible(LightIsOn); +} + + +//! sets the light data +void CLightSceneNode::setLightData(const video::SLight& light) +{ + LightData = light; +} + + +//! \return Returns the light data. +const video::SLight& CLightSceneNode::getLightData() const +{ + return LightData; +} + + +//! \return Returns the light data. +video::SLight& CLightSceneNode::getLightData() +{ + return LightData; +} + +void CLightSceneNode::setVisible(bool isVisible) +{ + ISceneNode::setVisible(isVisible); + + if(DriverLightIndex < 0) + return; + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + if (!driver) + return; + + LightIsOn = isVisible; + driver->turnLightOn((u32)DriverLightIndex, LightIsOn); +} + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CLightSceneNode::getBoundingBox() const +{ + return BBox; +} + + +//! Sets the light's radius of influence. +/** Outside this radius the light won't lighten geometry and cast no +shadows. Setting the radius will also influence the attenuation, setting +it to (0,1/radius,0). If you want to override this behavior, set the +attenuation after the radius. +\param radius The new radius. */ +void CLightSceneNode::setRadius(f32 radius) +{ + LightData.Radius=radius; + LightData.Attenuation.set(0.f, 1.f/radius, 0.f); + doLightRecalc(); +} + + +//! Gets the light's radius of influence. +/** \return The current radius. */ +f32 CLightSceneNode::getRadius() const +{ + return LightData.Radius; +} + + +//! Sets the light type. +/** \param type The new type. */ +void CLightSceneNode::setLightType(video::E_LIGHT_TYPE type) +{ + LightData.Type=type; +} + + +//! Gets the light type. +/** \return The current light type. */ +video::E_LIGHT_TYPE CLightSceneNode::getLightType() const +{ + return LightData.Type; +} + + +//! Sets whether this light casts shadows. +/** Enabling this flag won't automatically cast shadows, the meshes +will still need shadow scene nodes attached. But one can enable or +disable distinct lights for shadow casting for performance reasons. +\param shadow True if this light shall cast shadows. */ +void CLightSceneNode::enableCastShadow(bool shadow) +{ + LightData.CastShadows=shadow; +} + + +//! Check whether this light casts shadows. +/** \return True if light would cast shadows, else false. */ +bool CLightSceneNode::getCastShadow() const +{ + return LightData.CastShadows; +} + + +void CLightSceneNode::doLightRecalc() +{ + if ((LightData.Type == video::ELT_SPOT) || (LightData.Type == video::ELT_DIRECTIONAL)) + { + LightData.Direction = core::vector3df(.0f,.0f,1.0f); + getAbsoluteTransformation().rotateVect(LightData.Direction); + LightData.Direction.normalize(); + } + if ((LightData.Type == video::ELT_SPOT) || (LightData.Type == video::ELT_POINT)) + { + const f32 r = LightData.Radius * LightData.Radius * 0.5f; + BBox.MaxEdge.set( r, r, r ); + BBox.MinEdge.set( -r, -r, -r ); + //setAutomaticCulling( scene::EAC_BOX ); + setAutomaticCulling( scene::EAC_OFF ); + LightData.Position = getAbsolutePosition(); + } + if (LightData.Type == video::ELT_DIRECTIONAL) + { + BBox.reset( 0, 0, 0 ); + setAutomaticCulling( scene::EAC_OFF ); + } +} + + +//! Writes attributes of the scene node. +void CLightSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ILightSceneNode::serializeAttributes(out, options); + + out->addColorf ("AmbientColor", LightData.AmbientColor); + out->addColorf ("DiffuseColor", LightData.DiffuseColor); + out->addColorf ("SpecularColor", LightData.SpecularColor); + out->addVector3d("Attenuation", LightData.Attenuation); + out->addFloat ("Radius", LightData.Radius); + out->addFloat ("OuterCone", LightData.OuterCone); + out->addFloat ("InnerCone", LightData.InnerCone); + out->addFloat ("Falloff", LightData.Falloff); + out->addBool ("CastShadows", LightData.CastShadows); + out->addEnum ("LightType", LightData.Type, video::LightTypeNames); +} + +//! Reads attributes of the scene node. +void CLightSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + LightData.AmbientColor = in->getAttributeAsColorf("AmbientColor"); + LightData.DiffuseColor = in->getAttributeAsColorf("DiffuseColor"); + LightData.SpecularColor = in->getAttributeAsColorf("SpecularColor"); + + //TODO: clearify Radius and Linear Attenuation +#if 0 + setRadius ( in->getAttributeAsFloat("Radius") ); +#else + LightData.Radius = in->getAttributeAsFloat("Radius"); +#endif + + if (in->existsAttribute("Attenuation")) // might not exist in older files + LightData.Attenuation = in->getAttributeAsVector3d("Attenuation"); + + if (in->existsAttribute("OuterCone")) // might not exist in older files + LightData.OuterCone = in->getAttributeAsFloat("OuterCone"); + if (in->existsAttribute("InnerCone")) // might not exist in older files + LightData.InnerCone = in->getAttributeAsFloat("InnerCone"); + if (in->existsAttribute("Falloff")) // might not exist in older files + LightData.Falloff = in->getAttributeAsFloat("Falloff"); + LightData.CastShadows = in->getAttributeAsBool("CastShadows"); + LightData.Type = (video::E_LIGHT_TYPE)in->getAttributeAsEnumeration("LightType", video::LightTypeNames); + + doLightRecalc (); + + ILightSceneNode::deserializeAttributes(in, options); +} + +//! Creates a clone of this scene node and its children. +ISceneNode* CLightSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CLightSceneNode* nb = new CLightSceneNode(newParent, + newManager, ID, RelativeTranslation, LightData.DiffuseColor, LightData.Radius); + + nb->cloneMembers(this, newManager); + nb->LightData = LightData; + nb->BBox = BBox; + + if ( newParent ) + nb->drop(); + return nb; +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.h new file mode 100644 index 0000000..b2940ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLightSceneNode.h @@ -0,0 +1,108 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_LIGHT_SCENE_NODE_H_INCLUDED__ +#define __C_LIGHT_SCENE_NODE_H_INCLUDED__ + +#include "ILightSceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! Scene node which is a dynamic light. You can switch the light on and off by +//! making it visible or not, and let it be animated by ordinary scene node animators. +class CLightSceneNode : public ILightSceneNode +{ +public: + + //! constructor + CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, video::SColorf color, f32 range); + + virtual ~CLightSceneNode() { } + + //! pre render event + virtual void OnRegisterSceneNode(); + + //! render + virtual void render(); + + //! set node light data from light info + virtual void setLightData(const video::SLight& light); + + //! \return Returns the light data. + virtual const video::SLight& getLightData() const; + + //! \return Returns the light data. + virtual video::SLight& getLightData(); + + //! Sets if the node should be visible or not. + /** All children of this node won't be visible either, when set + to true. + \param isVisible If the node shall be visible. */ + virtual void setVisible(bool isVisible); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_LIGHT; } + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + + //! Sets the light's radius of influence. + /** Outside this radius the light won't lighten geometry and cast no + shadows. Setting the radius will also influence the attenuation, setting + it to (0,1/radius,0). If you want to override this behavior, set the + attenuation after the radius. + \param radius The new radius. */ + virtual void setRadius(f32 radius); + + //! Gets the light's radius of influence. + /** \return The current radius. */ + virtual f32 getRadius() const; + + //! Sets the light type. + /** \param type The new type. */ + virtual void setLightType(video::E_LIGHT_TYPE type); + + //! Gets the light type. + /** \return The current light type. */ + virtual video::E_LIGHT_TYPE getLightType() const; + + //! Sets whether this light casts shadows. + /** Enabling this flag won't automatically cast shadows, the meshes + will still need shadow scene nodes attached. But one can enable or + disable distinct lights for shadow casting for performance reasons. + \param shadow True if this light shall cast shadows. */ + virtual void enableCastShadow(bool shadow=true); + + //! Check whether this light casts shadows. + /** \return True if light would cast shadows, else false. */ + virtual bool getCastShadow() const; +private: + + video::SLight LightData; + core::aabbox3d<f32> BBox; + s32 DriverLightIndex; + bool LightIsOn; + void doLightRecalc(); +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.cpp new file mode 100644 index 0000000..51afaad --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.cpp @@ -0,0 +1,127 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CLimitReadFile.h" +#include "irrString.h" + +namespace irr +{ +namespace io +{ + + +CLimitReadFile::CLimitReadFile(IReadFile* alreadyOpenedFile, long pos, + long areaSize, const io::path& name) + : Filename(name), AreaStart(0), AreaEnd(0), Pos(0), + File(alreadyOpenedFile) +{ + #ifdef _DEBUG + setDebugName("CLimitReadFile"); + #endif + + if (File) + { + File->grab(); + AreaStart = pos; + AreaEnd = AreaStart + areaSize; + } +} + + +CLimitReadFile::~CLimitReadFile() +{ + if (File) + File->drop(); +} + + +//! returns how much was read +s32 CLimitReadFile::read(void* buffer, u32 sizeToRead) +{ +#if 1 + if (0 == File) + return 0; + + s32 r = AreaStart + Pos; + s32 toRead = core::s32_min(AreaEnd, r + sizeToRead) - core::s32_max(AreaStart, r); + if (toRead < 0) + return 0; + File->seek(r); + r = File->read(buffer, toRead); + Pos += r; + return r; +#else + const long pos = File->getPos(); + + if (pos >= AreaEnd) + return 0; + + if (pos + (long)sizeToRead >= AreaEnd) + sizeToRead = AreaEnd - pos; + + return File->read(buffer, sizeToRead); +#endif +} + + +//! changes position in file, returns true if successful +bool CLimitReadFile::seek(long finalPos, bool relativeMovement) +{ +#if 1 + Pos = core::s32_clamp(finalPos + (relativeMovement ? Pos : 0 ), 0, AreaEnd - AreaStart); + return true; +#else + const long pos = File->getPos(); + + if (relativeMovement) + { + if (pos + finalPos > AreaEnd) + finalPos = AreaEnd - pos; + } + else + { + finalPos += AreaStart; + if (finalPos > AreaEnd) + return false; + } + + return File->seek(finalPos, relativeMovement); +#endif +} + + +//! returns size of file +long CLimitReadFile::getSize() const +{ + return AreaEnd - AreaStart; +} + + +//! returns where in the file we are. +long CLimitReadFile::getPos() const +{ +#if 1 + return Pos; +#else + return File->getPos() - AreaStart; +#endif +} + + +//! returns name of file +const io::path& CLimitReadFile::getFileName() const +{ + return Filename; +} + + +IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize) +{ + return new CLimitReadFile(alreadyOpenedFile, pos, areaSize, fileName); +} + + +} // end namespace io +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.h new file mode 100644 index 0000000..00348b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLimitReadFile.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_LIMIT_READ_FILE_H_INCLUDED__ +#define __C_LIMIT_READ_FILE_H_INCLUDED__ + +#include "IReadFile.h" +#include "irrString.h" + +namespace irr +{ + class CUnicodeConverter; + +namespace io +{ + + /*! this is a read file, which is limited to some boundaries, + so that it may only start from a certain file position + and may only read until a certain file position. + This can be useful, for example for reading uncompressed files + in an archive (zip, tar). + !*/ + class CLimitReadFile : public IReadFile + { + public: + + CLimitReadFile(IReadFile* alreadyOpenedFile, long pos, long areaSize, const io::path& name); + + virtual ~CLimitReadFile(); + + //! returns how much was read + virtual s32 read(void* buffer, u32 sizeToRead); + + //! changes position in file, returns true if successful + //! if relativeMovement==true, the pos is changed relative to current pos, + //! otherwise from begin of file + virtual bool seek(long finalPos, bool relativeMovement = false); + + //! returns size of file + virtual long getSize() const; + + //! returns where in the file we are. + virtual long getPos() const; + + //! returns name of file + virtual const io::path& getFileName() const; + + private: + + io::path Filename; + long AreaStart; + long AreaEnd; + long Pos; + IReadFile* File; + }; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.cpp new file mode 100644 index 0000000..5b3feec --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.cpp @@ -0,0 +1,102 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CLogger.h" + +namespace irr +{ + + CLogger::CLogger(IEventReceiver* r) + : LogLevel(ELL_INFORMATION), Receiver(r) + { + #ifdef _DEBUG + setDebugName("CLogger"); + #endif + } + + //! Returns the current set log level. + ELOG_LEVEL CLogger::getLogLevel() const + { + return LogLevel; + } + + //! Sets a new log level. + void CLogger::setLogLevel(ELOG_LEVEL ll) + { + LogLevel = ll; + } + + //! Prints out a text into the log + void CLogger::log(const c8* text, ELOG_LEVEL ll) + { + if (ll < LogLevel) + return; + + if (Receiver) + { + SEvent event; + event.EventType = EET_LOG_TEXT_EVENT; + event.LogEvent.Text = text; + event.LogEvent.Level = ll; + if (Receiver->OnEvent(event)) + return; + } + + os::Printer::print(text); + } + + + //! Prints out a text into the log + void CLogger::log(const c8* text, const c8* hint, ELOG_LEVEL ll) + { + if (ll < LogLevel) + return; + + core::stringc s = text; + s += ": "; + s += hint; + log (s.c_str(), ll); + } + + //! Prints out a text into the log + void CLogger::log(const wchar_t* text, ELOG_LEVEL ll) + { + if (ll < LogLevel) + return; + + core::stringc s = text; + log(s.c_str(), ll); + } + + + //! Prints out a text into the log + void CLogger::log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll) + { + if (ll < LogLevel) + return; + + core::stringc s1 = text; + core::stringc s2 = hint; + log(s1.c_str(), s2.c_str(), ll); + } + + //! Prints out a text into the log + void CLogger::log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll) + { + if (ll < LogLevel) + return; + + core::stringc s2 = hint; + log( text, s2.c_str(), ll); + } + + //! Sets a new event receiver + void CLogger::setReceiver(IEventReceiver* r) + { + Receiver = r; + } + + +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.h new file mode 100644 index 0000000..314cb13 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CLogger.h @@ -0,0 +1,56 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_LOGGER_H_INCLUDED__ +#define __C_LOGGER_H_INCLUDED__ + +#include "ILogger.h" +#include "os.h" +#include "irrString.h" +#include "IEventReceiver.h" + +namespace irr +{ + +//! Class for logging messages, warnings and errors to stdout +class CLogger : public ILogger +{ +public: + + CLogger(IEventReceiver* r); + + //! Returns the current set log level. + virtual ELOG_LEVEL getLogLevel() const; + + //! Sets a new log level. virtual void setLogLevel(ELOG_LEVEL ll); + virtual void setLogLevel(ELOG_LEVEL ll); + + //! Prints out a text into the log + virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION); + + //! Prints out a text into the log + virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION); + + //! Prints out a text into the log + virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION); + + //! Prints out a text into the log + virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION); + + //! Prints out a text into the log + virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION); + + //! Sets a new event receiver + void setReceiver(IEventReceiver* r); + +private: + + ELOG_LEVEL LogLevel; + IEventReceiver* Receiver; +}; + +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.cpp new file mode 100644 index 0000000..4fa26d5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.cpp @@ -0,0 +1,364 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_MD2_LOADER_ + +#include "CMD2MeshFileLoader.h" +#include "CAnimatedMeshMD2.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + + // structs needed to load the md2-format + + const s32 MD2_MAGIC_NUMBER = 844121161; + const s32 MD2_VERSION = 8; + const s32 MD2_MAX_VERTS = 2048; + +// byte-align structures +#include "irrpack.h" + + struct SMD2Header + { + s32 magic; // four character code "IDP2" + s32 version; // must be 8 + s32 skinWidth; // width of the texture + s32 skinHeight; // height of the texture + s32 frameSize; // size in bytes of an animation frame + s32 numSkins; // number of textures + s32 numVertices; // total number of vertices + s32 numTexcoords; // number of vertices with texture coords + s32 numTriangles; // number of triangles + s32 numGlCommands; // number of opengl commands (triangle strip or triangle fan) + s32 numFrames; // animation keyframe count + s32 offsetSkins; // offset in bytes to 64 character skin names + s32 offsetTexcoords; // offset in bytes to texture coordinate list + s32 offsetTriangles; // offset in bytes to triangle list + s32 offsetFrames; // offset in bytes to frame list + s32 offsetGlCommands;// offset in bytes to opengl commands + s32 offsetEnd; // offset in bytes to end of file + } PACK_STRUCT; + + struct SMD2Vertex + { + u8 vertex[3]; // [0] = X, [1] = Z, [2] = Y + u8 lightNormalIndex; // index in the normal table + } PACK_STRUCT; + + struct SMD2Frame + { + f32 scale[3]; // first scale the vertex position + f32 translate[3]; // then translate the position + c8 name[16]; // the name of the animation that this key belongs to + SMD2Vertex vertices[1]; // vertex 1 of SMD2Header.numVertices + } PACK_STRUCT; + + struct SMD2Triangle + { + u16 vertexIndices[3]; + u16 textureIndices[3]; + } PACK_STRUCT; + + struct SMD2TextureCoordinate + { + s16 s; + s16 t; + } PACK_STRUCT; + + struct SMD2GLCommand + { + f32 s, t; + s32 vertexIndex; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +//! Constructor +CMD2MeshFileLoader::CMD2MeshFileLoader() +{ + #ifdef _DEBUG + setDebugName("CMD2MeshFileLoader"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CMD2MeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "md2" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CMD2MeshFileLoader::createMesh(io::IReadFile* file) +{ + IAnimatedMesh* msh = new CAnimatedMeshMD2(); + if (msh) + { + if (loadFile(file, (CAnimatedMeshMD2*)msh) ) + return msh; + + msh->drop(); + } + + return 0; +} + +//! loads an md2 file +bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh) +{ + if (!file) + return false; + + SMD2Header header; + + file->read(&header, sizeof(SMD2Header)); + +#ifdef __BIG_ENDIAN__ + header.magic = os::Byteswap::byteswap(header.magic); + header.version = os::Byteswap::byteswap(header.version); + header.skinWidth = os::Byteswap::byteswap(header.skinWidth); + header.skinHeight = os::Byteswap::byteswap(header.skinHeight); + header.frameSize = os::Byteswap::byteswap(header.frameSize); + header.numSkins = os::Byteswap::byteswap(header.numSkins); + header.numVertices = os::Byteswap::byteswap(header.numVertices); + header.numTexcoords = os::Byteswap::byteswap(header.numTexcoords); + header.numTriangles = os::Byteswap::byteswap(header.numTriangles); + header.numGlCommands = os::Byteswap::byteswap(header.numGlCommands); + header.numFrames = os::Byteswap::byteswap(header.numFrames); + header.offsetSkins = os::Byteswap::byteswap(header.offsetSkins); + header.offsetTexcoords = os::Byteswap::byteswap(header.offsetTexcoords); + header.offsetTriangles = os::Byteswap::byteswap(header.offsetTriangles); + header.offsetFrames = os::Byteswap::byteswap(header.offsetFrames); + header.offsetGlCommands = os::Byteswap::byteswap(header.offsetGlCommands); + header.offsetEnd = os::Byteswap::byteswap(header.offsetEnd); +#endif + + if (header.magic != MD2_MAGIC_NUMBER || header.version != MD2_VERSION) + { + os::Printer::log("MD2 Loader: Wrong file header", file->getFileName(), ELL_WARNING); + return false; + } + + // + // prepare mesh and allocate memory + // + + mesh->FrameCount = header.numFrames; + + // create keyframes + mesh->FrameTransforms.set_used(header.numFrames); + + // create vertex arrays for each keyframe + if (mesh->FrameList) + delete [] mesh->FrameList; + mesh->FrameList = new core::array<CAnimatedMeshMD2::SMD2Vert>[header.numFrames]; + + // allocate space in vertex arrays + s32 i; + for (i=0; i<header.numFrames; ++i) + mesh->FrameList[i].reallocate(header.numVertices); + + // allocate interpolation buffer vertices + mesh->InterpolationBuffer->Vertices.set_used(header.numTriangles*3); + + // populate triangles + mesh->InterpolationBuffer->Indices.reallocate(header.numTriangles*3); + const s32 count = header.numTriangles*3; + for (i=0; i<count; i+=3) + { + mesh->InterpolationBuffer->Indices.push_back(i); + mesh->InterpolationBuffer->Indices.push_back(i+1); + mesh->InterpolationBuffer->Indices.push_back(i+2); + } + + // + // read texture coordinates + // + + file->seek(header.offsetTexcoords); + SMD2TextureCoordinate* textureCoords = new SMD2TextureCoordinate[header.numTexcoords]; + + if (!file->read(textureCoords, sizeof(SMD2TextureCoordinate)*header.numTexcoords)) + { + delete[] textureCoords; + os::Printer::log("MD2 Loader: Error reading TextureCoords.", file->getFileName(), ELL_ERROR); + return false; + } + +#ifdef __BIG_ENDIAN__ + for (i=0; i<header.numTexcoords; ++i) + { + textureCoords[i].s = os::Byteswap::byteswap(textureCoords[i].s); + textureCoords[i].t = os::Byteswap::byteswap(textureCoords[i].t); + } +#endif + + // read Triangles + + file->seek(header.offsetTriangles); + + SMD2Triangle *triangles = new SMD2Triangle[header.numTriangles]; + if (!file->read(triangles, header.numTriangles *sizeof(SMD2Triangle))) + { + delete[] triangles; + delete[] textureCoords; + + os::Printer::log("MD2 Loader: Error reading triangles.", file->getFileName(), ELL_ERROR); + return false; + } + +#ifdef __BIG_ENDIAN__ + for (i=0; i<header.numTriangles; ++i) + { + triangles[i].vertexIndices[0] = os::Byteswap::byteswap(triangles[i].vertexIndices[0]); + triangles[i].vertexIndices[1] = os::Byteswap::byteswap(triangles[i].vertexIndices[1]); + triangles[i].vertexIndices[2] = os::Byteswap::byteswap(triangles[i].vertexIndices[2]); + triangles[i].textureIndices[0] = os::Byteswap::byteswap(triangles[i].textureIndices[0]); + triangles[i].textureIndices[1] = os::Byteswap::byteswap(triangles[i].textureIndices[1]); + triangles[i].textureIndices[2] = os::Byteswap::byteswap(triangles[i].textureIndices[2]); + } +#endif + + // read Vertices + + u8 buffer[MD2_MAX_VERTS*4+128]; + SMD2Frame* frame = (SMD2Frame*)buffer; + + file->seek(header.offsetFrames); + + for (i = 0; i<header.numFrames; ++i) + { + // read vertices + + file->read(frame, header.frameSize); + +#ifdef __BIG_ENDIAN__ + frame->scale[0] = os::Byteswap::byteswap(frame->scale[0]); + frame->scale[1] = os::Byteswap::byteswap(frame->scale[1]); + frame->scale[2] = os::Byteswap::byteswap(frame->scale[2]); + frame->translate[0] = os::Byteswap::byteswap(frame->translate[0]); + frame->translate[1] = os::Byteswap::byteswap(frame->translate[1]); + frame->translate[2] = os::Byteswap::byteswap(frame->translate[2]); +#endif + // + // store frame data + // + + CAnimatedMeshMD2::SAnimationData adata; + adata.begin = i; + adata.end = i; + adata.fps = 7; + + // Add new named animation if necessary + if (frame->name[0]) + { + // get animation name + for (s32 s = 0; s < 16 && frame->name[s]!=0 && (frame->name[s] < '0' || frame->name[s] > '9'); ++s) + { + adata.name += frame->name[s]; + } + + // Does this keyframe have the same animation name as the current animation? + if (!mesh->AnimationData.empty() && mesh->AnimationData[mesh->AnimationData.size()-1].name == adata.name) + { + // Increase the length of the animation + ++mesh->AnimationData[mesh->AnimationData.size() - 1].end; + } + else + { + // Add the new animation + mesh->AnimationData.push_back(adata); + } + } + + // save keyframe scale and translation + + mesh->FrameTransforms[i].scale.X = frame->scale[0]; + mesh->FrameTransforms[i].scale.Z = frame->scale[1]; + mesh->FrameTransforms[i].scale.Y = frame->scale[2]; + mesh->FrameTransforms[i].translate.X = frame->translate[0]; + mesh->FrameTransforms[i].translate.Z = frame->translate[1]; + mesh->FrameTransforms[i].translate.Y = frame->translate[2]; + + // add vertices + for (s32 j=0; j<header.numTriangles; ++j) + { + for (u32 ti=0; ti<3; ++ti) + { + CAnimatedMeshMD2::SMD2Vert v; + u32 num = triangles[j].vertexIndices[ti]; + v.Pos.X = frame->vertices[num].vertex[0]; + v.Pos.Z = frame->vertices[num].vertex[1]; + v.Pos.Y = frame->vertices[num].vertex[2]; + v.NormalIdx = frame->vertices[num].lightNormalIndex; + + mesh->FrameList[i].push_back(v); + } + } + + // calculate bounding boxes + if (header.numVertices) + { + core::aabbox3d<f32> box; + core::vector3df pos; + pos.X = f32(mesh->FrameList[i] [0].Pos.X) * mesh->FrameTransforms[i].scale.X + mesh->FrameTransforms[i].translate.X; + pos.Y = f32(mesh->FrameList[i] [0].Pos.Y) * mesh->FrameTransforms[i].scale.Y + mesh->FrameTransforms[i].translate.Y; + pos.Z = f32(mesh->FrameList[i] [0].Pos.Z) * mesh->FrameTransforms[i].scale.Z + mesh->FrameTransforms[i].translate.Z; + + box.reset(pos); + + for (s32 j=1; j<header.numTriangles*3; ++j) + { + pos.X = f32(mesh->FrameList[i] [j].Pos.X) * mesh->FrameTransforms[i].scale.X + mesh->FrameTransforms[i].translate.X; + pos.Y = f32(mesh->FrameList[i] [j].Pos.Y) * mesh->FrameTransforms[i].scale.Y + mesh->FrameTransforms[i].translate.Y; + pos.Z = f32(mesh->FrameList[i] [j].Pos.Z) * mesh->FrameTransforms[i].scale.Z + mesh->FrameTransforms[i].translate.Z; + + box.addInternalPoint(pos); + } + mesh->BoxList.push_back(box); + } + } + + // populate interpolation buffer with texture coordinates and colors + if (header.numFrames) + { + f32 dmaxs = 1.0f/(header.skinWidth); + f32 dmaxt = 1.0f/(header.skinHeight); + + for (s32 t=0; t<header.numTriangles; ++t) + { + for (s32 n=0; n<3; ++n) + { + mesh->InterpolationBuffer->Vertices[t*3 + n].TCoords.X = (textureCoords[triangles[t].textureIndices[n]].s + 0.5f) * dmaxs; + mesh->InterpolationBuffer->Vertices[t*3 + n].TCoords.Y = (textureCoords[triangles[t].textureIndices[n]].t + 0.5f) * dmaxt; + mesh->InterpolationBuffer->Vertices[t*3 + n].Color = video::SColor(255,255,255,255); + } + } + } + + // clean up + delete [] triangles; + delete [] textureCoords; + + // init buffer with start frame. + mesh->getMesh(0); + return true; +} + +} // end namespace scene +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_MD2_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.h new file mode 100644 index 0000000..cc9f3af --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD2MeshFileLoader.h @@ -0,0 +1,45 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MD2_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_MD2_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" + +namespace irr +{ +namespace scene +{ + +class CAnimatedMeshMD2; + +//! Meshloader capable of loading MD2 files +class CMD2MeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CMD2MeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + //! Loads the file data into the mesh + bool loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh); + +}; + +} // end namespace scene +} // end namespace irr + +#endif // __C_MD2_MESH_LOADER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp new file mode 100644 index 0000000..68f8d80 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp @@ -0,0 +1,53 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_MD3_LOADER_ + +#include "CMD3MeshFileLoader.h" +#include "CAnimatedMeshMD3.h" +#include "irrString.h" + +namespace irr +{ +namespace scene +{ + +//! Constructor +CMD3MeshFileLoader::CMD3MeshFileLoader( scene::ISceneManager* smgr) +: SceneManager(smgr) +{ +} + + +//! destructor +CMD3MeshFileLoader::~CMD3MeshFileLoader() +{ +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CMD3MeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "md3" ); +} + + +IAnimatedMesh* CMD3MeshFileLoader::createMesh(io::IReadFile* file) +{ + CAnimatedMeshMD3 * mesh = new CAnimatedMeshMD3(); + + if ( mesh->loadModelFile ( 0, file, SceneManager->getFileSystem(), SceneManager->getVideoDriver() ) ) + return mesh; + + mesh->drop (); + return 0; +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_MD3_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.h new file mode 100644 index 0000000..eb7cb90 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.h @@ -0,0 +1,49 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MD3_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_MD3_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "IQ3Shader.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading md3 files. +class CMD3MeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CMD3MeshFileLoader( scene::ISceneManager* smgr ); + + //! destructor + virtual ~CMD3MeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + scene::ISceneManager* SceneManager; + +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.cpp new file mode 100644 index 0000000..9a88d49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.cpp @@ -0,0 +1,818 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_MS3D_LOADER_ + +#include "IReadFile.h" +#include "os.h" +#include "CMS3DMeshFileLoader.h" +#include "CSkinnedMesh.h" + + +namespace irr +{ +namespace scene +{ + +#ifdef _DEBUG +#define _IRR_DEBUG_MS3D_LOADER_ +#endif + +// byte-align structures +#include "irrpack.h" + +namespace { +// File header +struct MS3DHeader +{ + char ID[10]; + int Version; +} PACK_STRUCT; + +// Vertex information +struct MS3DVertex +{ + u8 Flags; + float Vertex[3]; + char BoneID; + u8 RefCount; +} PACK_STRUCT; + +// Triangle information +struct MS3DTriangle +{ + u16 Flags; + u16 VertexIndices[3]; + float VertexNormals[3][3]; + float S[3], T[3]; + u8 SmoothingGroup; + u8 GroupIndex; +} PACK_STRUCT; + +// Material information +struct MS3DMaterial +{ + char Name[32]; + float Ambient[4]; + float Diffuse[4]; + float Specular[4]; + float Emissive[4]; + float Shininess; // 0.0f - 128.0f + float Transparency; // 0.0f - 1.0f + u8 Mode; // 0, 1, 2 is unused now + char Texture[128]; + char Alphamap[128]; +} PACK_STRUCT; + +// Joint information +struct MS3DJoint +{ + u8 Flags; + char Name[32]; + char ParentName[32]; + float Rotation[3]; + float Translation[3]; + u16 NumRotationKeyframes; + u16 NumTranslationKeyframes; +} PACK_STRUCT; + +// Keyframe data +struct MS3DKeyframe +{ + float Time; + float Parameter[3]; +} PACK_STRUCT; + +// vertex weights in 1.8.x +struct MS3DVertexWeights +{ + char boneIds[3]; + u8 weights[3]; +} PACK_STRUCT; + +} // end namespace + +// Default alignment +#include "irrunpack.h" + +struct SGroup +{ + core::stringc Name; + core::array<u16> VertexIds; + u16 MaterialIdx; +}; + +//! Constructor +CMS3DMeshFileLoader::CMS3DMeshFileLoader(video::IVideoDriver *driver) +: Driver(driver), AnimatedMesh(0) +{ + #ifdef _DEBUG + setDebugName("CMS3DMeshFileLoader"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CMS3DMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "ms3d" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CMS3DMeshFileLoader::createMesh(io::IReadFile* file) +{ + if (!file) + return 0; + + AnimatedMesh = new CSkinnedMesh(); + + if ( load(file) ) + { + AnimatedMesh->finalize(); + } + else + { + AnimatedMesh->drop(); + AnimatedMesh = 0; + } + + return AnimatedMesh; +} + + +//! loads a milkshape file +bool CMS3DMeshFileLoader::load(io::IReadFile* file) +{ + if (!file) + return false; + + // find file size + const long fileSize = file->getSize(); + + // read whole file + + u8* buffer = new u8[fileSize]; + s32 read = file->read(buffer, fileSize); + if (read != fileSize) + { + delete [] buffer; + os::Printer::log("Could not read full file. Loading failed", file->getFileName(), ELL_ERROR); + return false; + } + + // read header + + const u8 *pPtr = (u8*)((void*)buffer); + MS3DHeader *pHeader = (MS3DHeader*)pPtr; + pPtr += sizeof(MS3DHeader); + + if ( strncmp( pHeader->ID, "MS3D000000", 10 ) != 0 ) + { + delete [] buffer; + os::Printer::log("Not a valid Milkshape3D Model File. Loading failed", file->getFileName(), ELL_ERROR); + return false; + } + +#ifdef __BIG_ENDIAN__ + pHeader->Version = os::Byteswap::byteswap(pHeader->Version); +#endif + if ( pHeader->Version < 3 || pHeader->Version > 4 ) + { + delete [] buffer; + os::Printer::log("Only Milkshape3D version 3 and 4 (1.3 to 1.8) is supported. Loading failed", file->getFileName(), ELL_ERROR); + return false; + } +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Loaded header version", core::stringc(pHeader->Version).c_str()); +#endif + + // get pointers to data + + // vertices + u16 numVertices = *(u16*)pPtr; +#ifdef __BIG_ENDIAN__ + numVertices = os::Byteswap::byteswap(numVertices); +#endif +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Load vertices", core::stringc(numVertices).c_str()); +#endif + pPtr += sizeof(u16); + MS3DVertex *vertices = (MS3DVertex*)pPtr; + pPtr += sizeof(MS3DVertex) * numVertices; + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + for (u16 tmp=0; tmp<numVertices; ++tmp) + { +#ifdef __BIG_ENDIAN__ + vertices[tmp].Vertex[0] = os::Byteswap::byteswap(vertices[tmp].Vertex[0]); + vertices[tmp].Vertex[1] = os::Byteswap::byteswap(vertices[tmp].Vertex[1]); + vertices[tmp].Vertex[2] = -os::Byteswap::byteswap(vertices[tmp].Vertex[2]); +#else + vertices[tmp].Vertex[2] = -vertices[tmp].Vertex[2]; +#endif + } + + // triangles + u16 numTriangles = *(u16*)pPtr; +#ifdef __BIG_ENDIAN__ + numTriangles = os::Byteswap::byteswap(numTriangles); +#endif +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Load Triangles", core::stringc(numTriangles).c_str()); +#endif + pPtr += sizeof(u16); + MS3DTriangle *triangles = (MS3DTriangle*)pPtr; + pPtr += sizeof(MS3DTriangle) * numTriangles; + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + for (u16 tmp=0; tmp<numTriangles; ++tmp) + { +#ifdef __BIG_ENDIAN__ + triangles[tmp].Flags = os::Byteswap::byteswap(triangles[tmp].Flags); + for (u16 j=0; j<3; ++j) + { + triangles[tmp].VertexIndices[j] = os::Byteswap::byteswap(triangles[tmp].VertexIndices[j]); + triangles[tmp].VertexNormals[j][0] = os::Byteswap::byteswap(triangles[tmp].VertexNormals[j][0]); + triangles[tmp].VertexNormals[j][1] = os::Byteswap::byteswap(triangles[tmp].VertexNormals[j][1]); + triangles[tmp].VertexNormals[j][2] = -os::Byteswap::byteswap(triangles[tmp].VertexNormals[j][2]); + triangles[tmp].S[j] = os::Byteswap::byteswap(triangles[tmp].S[j]); + triangles[tmp].T[j] = os::Byteswap::byteswap(triangles[tmp].T[j]); + } +#else + triangles[tmp].VertexNormals[0][2] = -triangles[tmp].VertexNormals[0][2]; + triangles[tmp].VertexNormals[1][2] = -triangles[tmp].VertexNormals[1][2]; + triangles[tmp].VertexNormals[2][2] = -triangles[tmp].VertexNormals[2][2]; +#endif + } + + // groups + u16 numGroups = *(u16*)pPtr; +#ifdef __BIG_ENDIAN__ + numGroups = os::Byteswap::byteswap(numGroups); +#endif +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Load Groups", core::stringc(numGroups).c_str()); +#endif + pPtr += sizeof(u16); + + core::array<SGroup> groups; + groups.reallocate(numGroups); + + //store groups + u32 i; + for (i=0; i<numGroups; ++i) + { + groups.push_back(SGroup()); + SGroup& grp = groups.getLast(); + + // The byte flag is before the name, so add 1 + grp.Name = ((const c8*) pPtr) + 1; + + pPtr += 33; // name and 1 byte flags + u16 triangleCount = *(u16*)pPtr; +#ifdef __BIG_ENDIAN__ + triangleCount = os::Byteswap::byteswap(triangleCount); +#endif + pPtr += sizeof(u16); + grp.VertexIds.reallocate(triangleCount); + + //pPtr += sizeof(u16) * triangleCount; // triangle indices + for (u16 j=0; j<triangleCount; ++j) + { +#ifdef __BIG_ENDIAN__ + grp.VertexIds.push_back(os::Byteswap::byteswap(*(u16*)pPtr)); +#else + grp.VertexIds.push_back(*(u16*)pPtr); +#endif + pPtr += sizeof (u16); + } + + grp.MaterialIdx = *(u8*)pPtr; + if (grp.MaterialIdx == 255) + grp.MaterialIdx = 0; + + pPtr += sizeof(c8); // material index + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + } + + // load materials + u16 numMaterials = *(u16*)pPtr; +#ifdef __BIG_ENDIAN__ + numMaterials = os::Byteswap::byteswap(numMaterials); +#endif +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Load Materials", core::stringc(numMaterials).c_str()); +#endif + pPtr += sizeof(u16); + + if(numMaterials == 0) + { + // if there are no materials, add at least one buffer + AnimatedMesh->addMeshBuffer(); + } + + for (i=0; i<numMaterials; ++i) + { + MS3DMaterial *material = (MS3DMaterial*)pPtr; +#ifdef __BIG_ENDIAN__ + for (u16 j=0; j<4; ++j) + material->Ambient[j] = os::Byteswap::byteswap(material->Ambient[j]); + for (u16 j=0; j<4; ++j) + material->Diffuse[j] = os::Byteswap::byteswap(material->Diffuse[j]); + for (u16 j=0; j<4; ++j) + material->Specular[j] = os::Byteswap::byteswap(material->Specular[j]); + for (u16 j=0; j<4; ++j) + material->Emissive[j] = os::Byteswap::byteswap(material->Emissive[j]); + material->Shininess = os::Byteswap::byteswap(material->Shininess); + material->Transparency = os::Byteswap::byteswap(material->Transparency); +#endif + pPtr += sizeof(MS3DMaterial); + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + + scene::SSkinMeshBuffer *tmpBuffer = AnimatedMesh->addMeshBuffer(); + + tmpBuffer->Material.MaterialType = video::EMT_SOLID; + + tmpBuffer->Material.AmbientColor = video::SColorf(material->Ambient[0], material->Ambient[1], material->Ambient[2], material->Ambient[3]).toSColor (); + tmpBuffer->Material.DiffuseColor = video::SColorf(material->Diffuse[0], material->Diffuse[1], material->Diffuse[2], material->Diffuse[3]).toSColor (); + tmpBuffer->Material.EmissiveColor = video::SColorf(material->Emissive[0], material->Emissive[1], material->Emissive[2], material->Emissive[3]).toSColor (); + tmpBuffer->Material.SpecularColor = video::SColorf(material->Specular[0], material->Specular[1], material->Specular[2], material->Specular[3]).toSColor (); + tmpBuffer->Material.Shininess = material->Shininess; + + core::stringc TexturePath(material->Texture); + if (TexturePath.trim()!="") + { + TexturePath=stripPathFromString(file->getFileName(),true) + stripPathFromString(TexturePath,false); + tmpBuffer->Material.setTexture(0, Driver->getTexture(TexturePath)); + } + + core::stringc AlphamapPath=(const c8*)material->Alphamap; + if (AlphamapPath.trim()!="") + { + AlphamapPath=stripPathFromString(file->getFileName(),true) + stripPathFromString(AlphamapPath,false); + tmpBuffer->Material.setTexture(2, Driver->getTexture(AlphamapPath)); + } + } + + // animation time + f32 framesPerSecond = *(float*)pPtr; +#ifdef __BIG_ENDIAN__ + framesPerSecond = os::Byteswap::byteswap(framesPerSecond); +#endif +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("FPS", core::stringc(framesPerSecond).c_str()); +#endif + pPtr += sizeof(float) * 2; // fps and current time + + if (framesPerSecond<1.f) + framesPerSecond=1.f; + AnimatedMesh->setAnimationSpeed(framesPerSecond); + +// ignore, calculated inside SkinnedMesh +// s32 frameCount = *(int*)pPtr; +#ifdef __BIG_ENDIAN__ +// frameCount = os::Byteswap::byteswap(frameCount); +#endif + pPtr += sizeof(int); + + u16 jointCount = *(u16*)pPtr; +#ifdef __BIG_ENDIAN__ + jointCount = os::Byteswap::byteswap(jointCount); +#endif +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Joints", core::stringc(jointCount).c_str()); +#endif + pPtr += sizeof(u16); + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + + core::array<core::stringc> parentNames; + parentNames.reallocate(jointCount); + + // load joints + for (i=0; i<jointCount; ++i) + { + u32 j; + MS3DJoint *pJoint = (MS3DJoint*)pPtr; +#ifdef __BIG_ENDIAN__ + for (j=0; j<3; ++j) + pJoint->Rotation[j] = os::Byteswap::byteswap(pJoint->Rotation[j]); + for (j=0; j<3; ++j) + pJoint->Translation[j] = os::Byteswap::byteswap(pJoint->Translation[j]); + pJoint->NumRotationKeyframes= os::Byteswap::byteswap(pJoint->NumRotationKeyframes); + pJoint->NumTranslationKeyframes = os::Byteswap::byteswap(pJoint->NumTranslationKeyframes); +#endif + pPtr += sizeof(MS3DJoint); + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + + ISkinnedMesh::SJoint *jnt = AnimatedMesh->addJoint(); + + jnt->Name = pJoint->Name; +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Joint", jnt->Name.c_str()); + os::Printer::log("Rotation keyframes", core::stringc(pJoint->NumRotationKeyframes).c_str()); + os::Printer::log("Translation keyframes", core::stringc(pJoint->NumTranslationKeyframes).c_str()); +#endif + jnt->LocalMatrix.makeIdentity(); + jnt->LocalMatrix.setRotationRadians( + core::vector3df(pJoint->Rotation[0], pJoint->Rotation[1], pJoint->Rotation[2]) ); + // convert right-handed to left-handed + jnt->LocalMatrix[2]=-jnt->LocalMatrix[2]; + jnt->LocalMatrix[6]=-jnt->LocalMatrix[6]; + jnt->LocalMatrix[8]=-jnt->LocalMatrix[8]; + jnt->LocalMatrix[9]=-jnt->LocalMatrix[9]; + + jnt->LocalMatrix.setTranslation( + core::vector3df(pJoint->Translation[0], pJoint->Translation[1], -pJoint->Translation[2]) ); + jnt->Animatedposition.set(jnt->LocalMatrix.getTranslation()); + jnt->Animatedrotation.set(jnt->LocalMatrix.getRotationDegrees()); + + parentNames.push_back( (c8*)pJoint->ParentName ); + + /*if (pJoint->NumRotationKeyframes || + pJoint->NumTranslationKeyframes) + HasAnimation = true; + */ + + // get rotation keyframes + const u16 numRotationKeyframes = pJoint->NumRotationKeyframes; + for (j=0; j < numRotationKeyframes; ++j) + { + MS3DKeyframe* kf = (MS3DKeyframe*)pPtr; +#ifdef __BIG_ENDIAN__ + kf->Time = os::Byteswap::byteswap(kf->Time); + for (u32 l=0; l<3; ++l) + kf->Parameter[l] = os::Byteswap::byteswap(kf->Parameter[l]); +#endif + pPtr += sizeof(MS3DKeyframe); + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + + ISkinnedMesh::SRotationKey *k=AnimatedMesh->addRotationKey(jnt); + k->frame = kf->Time * framesPerSecond-1; + + core::matrix4 tmpMatrix; + + tmpMatrix.setRotationRadians( + core::vector3df(kf->Parameter[0], kf->Parameter[1], kf->Parameter[2]) ); + // convert right-handed to left-handed + tmpMatrix[2]=-tmpMatrix[2]; + tmpMatrix[6]=-tmpMatrix[6]; + tmpMatrix[8]=-tmpMatrix[8]; + tmpMatrix[9]=-tmpMatrix[9]; + + tmpMatrix=jnt->LocalMatrix*tmpMatrix; + + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from tmpMatrix to tmpMatrix.getTransposed() for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! + k->rotation = core::quaternion(tmpMatrix.getTransposed()); + } + + // get translation keyframes + const u16 numTranslationKeyframes = pJoint->NumTranslationKeyframes; + for (j=0; j<numTranslationKeyframes; ++j) + { + MS3DKeyframe* kf = (MS3DKeyframe*)pPtr; +#ifdef __BIG_ENDIAN__ + kf->Time = os::Byteswap::byteswap(kf->Time); + for (u32 l=0; l<3; ++l) + kf->Parameter[l] = os::Byteswap::byteswap(kf->Parameter[l]); +#endif + pPtr += sizeof(MS3DKeyframe); + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + + ISkinnedMesh::SPositionKey *k=AnimatedMesh->addPositionKey(jnt); + k->frame = kf->Time * framesPerSecond-1; + + k->position = core::vector3df + (kf->Parameter[0]+pJoint->Translation[0], + kf->Parameter[1]+pJoint->Translation[1], + -kf->Parameter[2]-pJoint->Translation[2]); + } + } + + core::array<MS3DVertexWeights> vertexWeights; + f32 weightFactor=0; + + if (jointCount && (pHeader->Version == 4) && (pPtr < buffer+fileSize)) + { + s32 subVersion = *(s32*)pPtr; // comment subVersion, always 1 +#ifdef __BIG_ENDIAN__ + subVersion = os::Byteswap::byteswap(subVersion); +#endif + pPtr += sizeof(s32); + + for (u32 j=0; j<4; ++j) // four comment groups + { +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Skipping comment group", core::stringc(j+1).c_str()); +#endif + u32 numComments = *(u32*)pPtr; +#ifdef __BIG_ENDIAN__ + numComments = os::Byteswap::byteswap(numComments); +#endif + pPtr += sizeof(u32); + for (i=0; i<numComments; ++i) + { + // according to scorpiomidget this field does + // not exist for model comments. So avoid to + // read it + if (j!=3) + pPtr += sizeof(s32); // index + s32 commentLength = *(s32*)pPtr; +#ifdef __BIG_ENDIAN__ + commentLength = os::Byteswap::byteswap(commentLength); +#endif + pPtr += sizeof(s32); + pPtr += commentLength; + } + + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + } + + if (pPtr < buffer+fileSize) + { + subVersion = *(s32*)pPtr; // vertex subVersion, 1 or 2 +#ifdef __BIG_ENDIAN__ + subVersion = os::Byteswap::byteswap(subVersion); +#endif + if (subVersion==1) + weightFactor=1.f/255.f; + else + weightFactor=1.f/100.f; + pPtr += sizeof(s32); + +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Reading vertex weights"); +#endif + // read vertex weights, ignoring data 'extra' from 1.8.2 + vertexWeights.reallocate(numVertices); + const char offset = (subVersion==1)?6:10; + for (i=0; i<numVertices; ++i) + { + vertexWeights.push_back(*(MS3DVertexWeights*)pPtr); + pPtr += offset; + } + + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR); + return false; + } + } + + if (pPtr < buffer+fileSize) + { + subVersion = *(s32*)pPtr; // joint subVersion, 1 or 2 +#ifdef __BIG_ENDIAN__ + subVersion = os::Byteswap::byteswap(subVersion); +#endif + pPtr += sizeof(s32); + // skip joint colors +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Skip joint color"); +#endif + pPtr += 3*sizeof(float)*jointCount; + + if (pPtr > buffer+fileSize) + { + delete [] buffer; + os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR); + return false; + } + } + + if (pPtr < buffer+fileSize) + { + subVersion = *(s32*)pPtr; // model subVersion, 1 or 2 +#ifdef __BIG_ENDIAN__ + subVersion = os::Byteswap::byteswap(subVersion); +#endif + pPtr += sizeof(s32); +#ifdef _IRR_DEBUG_MS3D_LOADER_ + os::Printer::log("Skip model extra information"); +#endif + // now the model extra information would follow + // we also skip this for now + } + } + + //find parent of every joint + for (u32 jointnum=0; jointnum<AnimatedMesh->getAllJoints().size(); ++jointnum) + { + for (u32 j2=0; j2<AnimatedMesh->getAllJoints().size(); ++j2) + { + if (jointnum != j2 && parentNames[jointnum] == AnimatedMesh->getAllJoints()[j2]->Name ) + { + AnimatedMesh->getAllJoints()[j2]->Children.push_back(AnimatedMesh->getAllJoints()[jointnum]); + break; + } + } + } + + // create vertices and indices, attach them to the joints. + video::S3DVertex v; + core::array<video::S3DVertex> *Vertices; + core::array<u16> Indices; + + for (i=0; i<numTriangles; ++i) + { + u32 tmp = groups[triangles[i].GroupIndex].MaterialIdx; + Vertices = &AnimatedMesh->getMeshBuffers()[tmp]->Vertices_Standard; + + for (s32 j = 2; j!=-1; --j) + { + const u32 vertidx = triangles[i].VertexIndices[j]; + + v.TCoords.X = triangles[i].S[j]; + v.TCoords.Y = triangles[i].T[j]; + + v.Normal.X = triangles[i].VertexNormals[j][0]; + v.Normal.Y = triangles[i].VertexNormals[j][1]; + v.Normal.Z = triangles[i].VertexNormals[j][2]; + + if(triangles[i].GroupIndex < groups.size() && + groups[triangles[i].GroupIndex].MaterialIdx < AnimatedMesh->getMeshBuffers().size()) + v.Color = AnimatedMesh->getMeshBuffers()[groups[triangles[i].GroupIndex].MaterialIdx]->Material.DiffuseColor; + else + v.Color.set(255,255,255,255); + + v.Pos.X = vertices[vertidx].Vertex[0]; + v.Pos.Y = vertices[vertidx].Vertex[1]; + v.Pos.Z = vertices[vertidx].Vertex[2]; + + // check if we already have this vertex in our vertex array + s32 index = -1; + for (u32 iV = 0; iV < Vertices->size(); ++iV) + { + if (v == (*Vertices)[iV]) + { + index = (s32)iV; + break; + } + } + + if (index == -1) + { + index = Vertices->size(); + const u32 matidx = groups[triangles[i].GroupIndex].MaterialIdx; + if (vertexWeights.size()==0) + { + const s32 boneid = vertices[vertidx].BoneID; + if ((u32)boneid < AnimatedMesh->getAllJoints().size()) + { + ISkinnedMesh::SWeight *w=AnimatedMesh->addWeight(AnimatedMesh->getAllJoints()[boneid]); + w->buffer_id = matidx; + w->strength = 1.0f; + w->vertex_id = index; + } + } + else if (jointCount) // new weights from 1.8.x + { + f32 sum = 1.0f; + s32 boneid = vertices[vertidx].BoneID; + if (((u32)boneid < AnimatedMesh->getAllJoints().size()) && (vertexWeights[vertidx].weights[0] != 0)) + { + ISkinnedMesh::SWeight *w=AnimatedMesh->addWeight(AnimatedMesh->getAllJoints()[boneid]); + w->buffer_id = matidx; + sum -= (w->strength = vertexWeights[vertidx].weights[0]*weightFactor); + w->vertex_id = index; + } + boneid = vertexWeights[vertidx].boneIds[0]; + if (((u32)boneid < AnimatedMesh->getAllJoints().size()) && (vertexWeights[vertidx].weights[1] != 0)) + { + ISkinnedMesh::SWeight *w=AnimatedMesh->addWeight(AnimatedMesh->getAllJoints()[boneid]); + w->buffer_id = matidx; + sum -= (w->strength = vertexWeights[vertidx].weights[1]*weightFactor); + w->vertex_id = index; + } + boneid = vertexWeights[vertidx].boneIds[1]; + if (((u32)boneid < AnimatedMesh->getAllJoints().size()) && (vertexWeights[vertidx].weights[2] != 0)) + { + ISkinnedMesh::SWeight *w=AnimatedMesh->addWeight(AnimatedMesh->getAllJoints()[boneid]); + w->buffer_id = matidx; + sum -= (w->strength = vertexWeights[vertidx].weights[2]*weightFactor); + w->vertex_id = index; + } + boneid = vertexWeights[vertidx].boneIds[2]; + if (((u32)boneid < AnimatedMesh->getAllJoints().size()) && (sum > 0.f)) + { + ISkinnedMesh::SWeight *w=AnimatedMesh->addWeight(AnimatedMesh->getAllJoints()[boneid]); + w->buffer_id = matidx; + w->strength = sum; + w->vertex_id = index; + } + // fallback, if no bone chosen. Seems to be an error in the specs + boneid = vertices[vertidx].BoneID; + if ((sum == 1.f) && ((u32)boneid < AnimatedMesh->getAllJoints().size())) + { + ISkinnedMesh::SWeight *w=AnimatedMesh->addWeight(AnimatedMesh->getAllJoints()[boneid]); + w->buffer_id = matidx; + w->strength = 1.f; + w->vertex_id = index; + } + } + + Vertices->push_back(v); + } + Indices.push_back(index); + } + } + + //create groups + s32 iIndex = -1; + for (i=0; i<groups.size(); ++i) + { + SGroup& grp = groups[i]; + + if (grp.MaterialIdx >= AnimatedMesh->getMeshBuffers().size()) + grp.MaterialIdx = 0; + + core::array<u16>& indices = AnimatedMesh->getMeshBuffers()[grp.MaterialIdx]->Indices; + + for (u32 k=0; k < grp.VertexIds.size(); ++k) + for (u32 l=0; l<3; ++l) + indices.push_back(Indices[++iIndex]); + } + + delete [] buffer; + + return true; +} + + +core::stringc CMS3DMeshFileLoader::stripPathFromString(const core::stringc& inString, bool returnPath) const +{ + s32 slashIndex=inString.findLast('/'); // forward slash + s32 backSlash=inString.findLast('\\'); // back slash + + if (backSlash>slashIndex) slashIndex=backSlash; + + if (slashIndex==-1)//no slashes found + { + if (returnPath) + return core::stringc(); //no path to return + else + return inString; + } + + if (returnPath) + return inString.subString(0, slashIndex + 1); + else + return inString.subString(slashIndex+1, inString.size() - (slashIndex+1)); +} + + +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.h new file mode 100644 index 0000000..ad5d657 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMS3DMeshFileLoader.h @@ -0,0 +1,49 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MS3D_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_MS3D_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IVideoDriver.h" +#include "CSkinnedMesh.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading Milkshape 3D files +class CMS3DMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CMS3DMeshFileLoader(video::IVideoDriver* driver); + + //! returns true if the file might be loadable by this class + //! based on the file extension (e.g. ".bsp") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + core::stringc stripPathFromString(const core::stringc& inString, bool returnPath) const; + + bool load(io::IReadFile* file); + video::IVideoDriver* Driver; + CSkinnedMesh* AnimatedMesh; +}; + +} // end namespace scene +} // end namespace irr + +#endif + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DHelper.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DHelper.h new file mode 100644 index 0000000..e045444 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DHelper.h @@ -0,0 +1,447 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was originally written by ZDimitor. + +//---------------------------------------------------------------------- +// somefuncs.h - part of the My3D Tools +// +// This tool was created by Zhuck Dmitry (ZDimitor). +// Everyone can use it as wants ( i'll be happy if it helps to someone :) ). +//---------------------------------------------------------------------- + +//********************************************************************** +// some useful functions +//********************************************************************** + +#ifndef __C_MY3D_HELPER_H_INCLUDED__ +#define __C_MY3D_HELPER_H_INCLUDED__ + +#include <irrTypes.h> + +namespace irr +{ +namespace scene +{ + +//********************************************************************** +// MY3D stuff +//********************************************************************** + +// byte-align structures +#include "irrpack.h" + +struct SMyVector3 +{ SMyVector3 () {;} + SMyVector3 (f32 __X, f32 __Y, f32 __Z) + : X(__X), Y(__Y), Z(__Z) {} + f32 X, Y, Z; +} PACK_STRUCT; + +struct SMyVector2 +{ SMyVector2 () {;} + SMyVector2(f32 __X, f32 __Y) + : X(__X), Y(__Y) {} + f32 X, Y; +} PACK_STRUCT; + +struct SMyVertex +{ SMyVertex () {;} + SMyVertex (SMyVector3 _Coord, SMyColor _Color, SMyVector3 _Normal) + :Coord(_Coord), Color(_Color), Normal(_Normal) {;} + SMyVector3 Coord; + SMyColor Color; + SMyVector3 Normal; +} PACK_STRUCT; + +struct SMyTVertex +{ SMyTVertex () {;} + SMyTVertex (SMyVector2 _TCoord) + : TCoord(_TCoord) {;} + SMyVector2 TCoord; +} PACK_STRUCT; + +struct SMyFace +{ SMyFace() {;} + SMyFace(u32 __A, u32 __B, u32 __C) + : A(__A), B(__B), C(__C) {} + u32 A, B, C; +} PACK_STRUCT; + +// file header (6 bytes) +struct SMyFileHeader +{ u32 MyId; // MY3D + u16 Ver; // Version +} PACK_STRUCT; + +// scene header +struct SMySceneHeader +{ SMyColor BackgrColor; // background color + SMyColor AmbientColor; // ambient color + s32 MaterialCount; // material count + s32 MeshCount; // mesh count +} PACK_STRUCT; + +// mesh header +struct SMyMeshHeader +{ c8 Name[256]; // material name + u32 MatIndex; // index of the mesh material + u32 TChannelCnt; // mesh mapping channels count +} PACK_STRUCT; + +// texture data header +struct SMyTexDataHeader +{ c8 Name[256]; // texture name + u32 ComprMode; //compression mode + u32 PixelFormat; + u32 Width; // image width + u32 Height; // image height +} PACK_STRUCT; + +// pixel color 24bit (R8G8B8) +struct SMyPixelColor24 +{ SMyPixelColor24() {;} + SMyPixelColor24(u8 __r, u8 __g, u8 __b) + : r(__r), g(__g), b(__b) {} + u8 r, g, b; +} PACK_STRUCT; + +// pixel color 16bit (A1R5G5B5) +struct SMyPixelColor16 +{ SMyPixelColor16() {;} + SMyPixelColor16(s16 _argb): argb(_argb) {;} + SMyPixelColor16(u8 r, u8 g, u8 b) + { argb = ((r&0x1F)<<10) | ((g&0x1F)<<5) | (b&0x1F); + } + s16 argb; +} PACK_STRUCT; + +// RLE Header +struct SMyRLEHeader +{ SMyRLEHeader() {} + u32 nEncodedBytes; + u32 nDecodedBytes; +} PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +} // end namespace +} // end namespace + +//----------------------------------------------------------------------------- +namespace irr +{ +namespace core +{ + +//-----------------RLE stuff----------------------------------------- + +int rle_encode ( + unsigned char *in_buf, int in_buf_size, + unsigned char *out_buf, int out_buf_size + ); +unsigned long process_comp( + unsigned char *buf, int buf_size, + unsigned char *out_buf, int out_buf_size + ); +void process_uncomp( + unsigned char, unsigned char *out_buf, int out_buf_size + ); +void flush_outbuf( + unsigned char *out_buf, int out_buf_size + ); +unsigned long get_byte ( + unsigned char *ch, + unsigned char *in_buf, int in_buf_size, + unsigned char *out_buf, int out_buf_size + ); +void put_byte( + unsigned char ch, unsigned char *out_buf, int out_buf_size + ); +//----------------------------------------------------------- +const unsigned long LIMIT = 1; // was #define LIMIT 1 +const unsigned long NON_MATCH = 2; // was: #define NON_MATCH 2 +const unsigned long EOD_FOUND = 3; // was: #define EOD_FOUND 3 +const unsigned long EOD = 0x00454f44; // was: #define EOD 'EOD' +//----------------------------------------------------------- +// number of decoded bytes +static int nDecodedBytes=0; +// number of coded bytes +static int nCodedBytes=0; +// number of read bytes +static int nReadedBytes=0; +// table used to look for sequences of repeating bytes +static unsigned char tmpbuf[4]; // we use subscripts 1 - 3 +static int tmpbuf_cnt; +// output buffer for non-compressed output data +static unsigned char outbuf[128]; +static int outbuf_cnt; + + +//----------------------------------------------------------- +int rle_encode ( + unsigned char *in_buf, int in_buf_size, + unsigned char *out_buf, int out_buf_size + ) +{ + unsigned long ret_code; + + unsigned char ch; + + nCodedBytes=0; + nReadedBytes=0; + + tmpbuf_cnt = 0; // no. of char's in tmpbuf + outbuf_cnt = 0; // no. of char's in outbuf + while (1) + { + if (get_byte(&ch, in_buf, in_buf_size, + out_buf, out_buf_size) == (int)EOD) // read next byte into ch + break; + + tmpbuf[++tmpbuf_cnt] = (unsigned char) ch; + if (tmpbuf_cnt == 3) + { + // see if all 3 match each other + if ((tmpbuf[1] == tmpbuf[2]) && (tmpbuf[2] == tmpbuf[3])) + { + // they do - add compression + // this will process all bytes in input file until + // a non-match occurs, or 128 bytes are processed, + // or we find eod */ + ret_code = process_comp(in_buf, in_buf_size, out_buf, out_buf_size); + if (ret_code == (int)EOD_FOUND) + break; // stop compressing + if (ret_code == (int)NON_MATCH) + tmpbuf_cnt=1; /* save the char that didn't match */ + else + // we just compressed the max. of 128 bytes + tmpbuf_cnt=0; /* start over for next chunk */ + } + else + { + // we know the first byte doesn't match 2 or more + // others, so just send it out as uncompressed. */ + process_uncomp(tmpbuf[1], out_buf, out_buf_size); + + // see if the last 2 bytes in the buffer match + if (tmpbuf[2] == tmpbuf[3]) + { + // move byte 3 to position 1 and pretend we just + // have 2 bytes -- note that the first byte was + // already sent to output */ + tmpbuf[1]=tmpbuf[3]; + tmpbuf_cnt=2; + } + else + { + // send byte 2 and keep byte 3 - it may match the + // next byte. Move byte 3 to position 1 and set + // count to 1. Note that the first byte was + // already sent to output + process_uncomp(tmpbuf[2], out_buf, out_buf_size); + tmpbuf[1]=tmpbuf[3]; + tmpbuf_cnt=1; + } + } + } + } // end while + flush_outbuf(out_buf, out_buf_size); + + return nCodedBytes; +} + + +//------------------------------------------------------------------ +// This flushes any non-compressed data not yet sent, then it processes +// repeating bytes until > 128, or EOD, or non-match. +// return values: LIMIT, EOD_FOUND, NON_MATCH +// Prior to ANY return, it writes out the 2 byte compressed code. +// If a NON_MATCH was found, this returns with the non-matching char +// residing in tmpbuf[0]. +// Inputs: tmpbuf[0], input file +// Outputs: tmpbuf[0] (sometimes), output file, and return code +//------------------------------------------------------------------ +unsigned long process_comp( + unsigned char *buf, int buf_size, + unsigned char *out_buf, int out_buf_size) +{ + // we start out with 3 repeating bytes + register int len = 3; + + unsigned char ch; + + // we're starting a repeating chunk - end the non-repeaters + flush_outbuf(out_buf, out_buf_size); + + while (get_byte(&ch, buf, buf_size, out_buf, out_buf_size) != (int)EOD) + { + if (ch != tmpbuf[1]) + { + // send no. of repeated bytes to be encoded + put_byte((unsigned char)((--len) | 0x80), out_buf, out_buf_size); + // send the byte's value being repeated + put_byte((unsigned char)tmpbuf[1], out_buf, out_buf_size); + /* save the non-matching character just read */ + tmpbuf[1]=(unsigned char) ch; + return NON_MATCH; + } + /* we know the new byte is part of the repeating seq */ + len++; + if (len == 128) + { + // send no. of repeated bytes to be encoded + put_byte((unsigned char)((--len) | 0x80), out_buf, out_buf_size); + // send the byte's value being repeated + put_byte((unsigned char)tmpbuf[1], out_buf, out_buf_size); + return LIMIT; + } + } // end while + + // if flow comes here, we just read an EOD + // send no. of repeated bytes to be encoded + put_byte((unsigned char)((--len) | 0x80), out_buf, out_buf_size); + // send the byte's value being repeated + put_byte((unsigned char)tmpbuf[1], out_buf, out_buf_size); + return EOD_FOUND; +} + + +//---------------------------------------------------------------- +// This adds 1 non-repeating byte to outbuf. If outbuf becomes full +// with 128 bytes, it flushes outbuf. +// There are no return codes and no bytes are read from the input. +//---------------------------------------------------------------- +void process_uncomp( + unsigned char char1, unsigned char *out_buf, int out_buf_size + ) +{ + outbuf[outbuf_cnt++] = char1; + if (outbuf_cnt == 128) + flush_outbuf(out_buf, out_buf_size); +} +//----------------------------------------------------------- +// This flushes any non-compressed data not yet sent. +// On exit, outbuf_cnt will equal zero. +//----------------------------------------------------------- +void flush_outbuf(unsigned char *out_buf, int out_buf_size) +{ + register int pos=0; + + if(!outbuf_cnt) + return; // nothing to do */ + + // send no. of unencoded bytes to be sent + put_byte((unsigned char)(outbuf_cnt - 1), out_buf, out_buf_size); + + for ( ; outbuf_cnt; outbuf_cnt--) + put_byte((unsigned char)outbuf[pos++], out_buf, out_buf_size); +} +//--------------------------------------------------- +void put_byte(unsigned char ch, unsigned char *out_buf, int out_buf_size) +{ + if (nCodedBytes<=(out_buf_size-1)) + { out_buf[nCodedBytes++]=ch; + out_buf[nCodedBytes]=0; + } +} +//--------------------------------------------------- +// This reads the next byte into ch. It returns EOD +// at end-of-data +//--------------------------------------------------- +unsigned long get_byte( + unsigned char *ch, + unsigned char *in_buf, int in_buf_size, + unsigned char *out_buf, int out_buf_size + ) +{ + if (nReadedBytes>=in_buf_size) + { + // there are either 0, 1, or 2 char's to write before we quit + if (tmpbuf_cnt == 1) + process_uncomp(tmpbuf[1], out_buf, out_buf_size); + else + { + if (tmpbuf_cnt == 2) + { + process_uncomp(tmpbuf[1], out_buf, out_buf_size); + process_uncomp(tmpbuf[2], out_buf, out_buf_size); + } + } + nReadedBytes =0; + + return EOD; + } + + (*ch) = (unsigned char)in_buf[nReadedBytes++]; + + return 0; +} +//----------------------------------------------------------- +int rle_decode ( + unsigned char *in_buf, int in_buf_size, + unsigned char *out_buf, int out_buf_size + ) +{ + nDecodedBytes=0; + nReadedBytes=0; + + int ch, i; + while (1) + { + + if (nReadedBytes>=in_buf_size) + break; + else + ch=in_buf[nReadedBytes]; + nReadedBytes++; + + if (ch > 127) + { + i = ch - 127; // i is the number of repetitions + // get the byte to be repeated + if (nReadedBytes>=in_buf_size) + break; + else + ch=in_buf[nReadedBytes]; + nReadedBytes++; + + // uncompress a chunk + for ( ; i ; i--) + { + if (nDecodedBytes<out_buf_size) + out_buf[nDecodedBytes] = ch; + nDecodedBytes++; + } + } + else + { + // copy out some uncompressed bytes + i = ch + 1; // i is the no. of bytes + // uncompress a chunk + for ( ; i ; i--) + { + if (nReadedBytes>=in_buf_size) + break; + else + ch=in_buf[nReadedBytes]; + nReadedBytes++; + + if (nDecodedBytes<out_buf_size) + out_buf[nDecodedBytes] = ch; + nDecodedBytes++; + } + } + } // end while + + return nDecodedBytes; +} + +} //end namespace core +} //end namespace irr + + +#endif // __C_MY3D_HELPER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.cpp new file mode 100644 index 0000000..7044721 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.cpp @@ -0,0 +1,882 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was originally written by ZDimitor. + +//----------------------------------------------------------------------------- +// This tool created by ZDimitor everyone can use it as wants +//----------------------------------------------------------------------------- + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_MY3D_LOADER_ + +#include "CMY3DMeshFileLoader.h" + +#include "SAnimatedMesh.h" +#include "SMeshBuffer.h" +#include "IReadFile.h" +#include "IAttributes.h" + +#include "CMY3DHelper.h" +#include "os.h" + +// v3.15 - May 16, 2005 + +namespace irr +{ +namespace scene +{ + +static const u32 MY3D_ID = 0x4d593344; +static const u16 MY3D_VER = 0x0003; +static const u16 MY3D_SCENE_HEADER_ID = 0x1000; +static const u16 MY3D_MAT_LIST_ID = 0x2000; +static const u16 MY3D_MAT_HEADER_ID = 0x2100; +static const u16 MY3D_TEX_FNAME_ID = 0x2101; +static const u16 MY3D_TEXDATA_HEADER_ID = 0x2501; +static const u16 MY3D_TEXDATA_RLE_HEADER_ID = 0x2502; +static const u16 MY3D_MESH_LIST_ID = 0x3000; +static const u16 MY3D_MESH_HEADER_ID = 0x3100; +static const u16 MY3D_VERTS_ID = 0x3101; +static const u16 MY3D_FACES_ID = 0x3102; +static const u16 MY3D_TVERTS_ID = 0x3103; +static const u16 MY3D_TFACES_ID = 0x3104; +static const u16 MY3D_FILE_END_ID = 0xFFFF; + +static const unsigned long MY3D_TEXDATA_COMPR_NONE_ID = 0x4e4f4e45; +static const unsigned long MY3D_TEXDATA_COMPR_SIMPLE_ID = 0x53494d50; +static const unsigned long MY3D_TEXDATA_COMPR_RLE_ID = 0x20524c45; + +static const unsigned long MY3D_PIXEL_FORMAT_24 = 0x5f32345f; +static const unsigned long MY3D_PIXEL_FORMAT_16 = 0x5f31365f; + +CMY3DMeshFileLoader::CMY3DMeshFileLoader(ISceneManager* scmgr, io::IFileSystem* fs) + : SceneManager(scmgr), FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("CMY3DMeshFileLoader"); + #endif + + if (FileSystem) + FileSystem->grab(); +} + + +CMY3DMeshFileLoader::~CMY3DMeshFileLoader() +{ + if (FileSystem) + FileSystem->drop(); +} + + +bool CMY3DMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "my3d" ); +} + + +IAnimatedMesh* CMY3DMeshFileLoader::createMesh(io::IReadFile* file) +{ + MaterialEntry.clear(); + MeshBufferEntry.clear(); + ChildNodes.clear(); + + // working directory (from which we load the scene) + core::stringc filepath = FileSystem->getFileDir(file->getFileName()); + if (filepath==".") + filepath=""; + else + filepath.append("/"); + + // read file into memory + SMyFileHeader fileHeader; + file->read(&fileHeader, sizeof(SMyFileHeader)); +#ifdef __BIG_ENDIAN__ + fileHeader.MyId = os::Byteswap::byteswap(fileHeader.MyId); + fileHeader.Ver = os::Byteswap::byteswap(fileHeader.Ver); +#endif + + if (fileHeader.MyId!=MY3D_ID || fileHeader.Ver!=MY3D_VER) + { + os::Printer::log("Bad MY3D file header, loading failed!", ELL_ERROR); + return 0; + } + + u16 id; + + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + if (id!=MY3D_SCENE_HEADER_ID) + { + os::Printer::log("Cannot find MY3D_SCENE_HEADER_ID, loading failed!", ELL_ERROR); + return 0; + } + + SMySceneHeader sceneHeader; + file->read(&sceneHeader, sizeof(SMySceneHeader)); +#ifdef __BIG_ENDIAN__ + sceneHeader.MaterialCount = os::Byteswap::byteswap(sceneHeader.MaterialCount); + sceneHeader.MeshCount = os::Byteswap::byteswap(sceneHeader.MeshCount); +#endif + + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + if (id!=MY3D_MAT_LIST_ID) + { + os::Printer::log("Can not find MY3D_MAT_LIST_ID, loading failed!", ELL_ERROR); + return 0; + } + + core::stringc texturePath = + SceneManager->getParameters()->getAttributeAsString(MY3D_TEXTURE_PATH); + + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + c8 namebuf[256]; + for (s32 m=0; m<sceneHeader.MaterialCount; ++m) + { + if (id != MY3D_MAT_HEADER_ID) + { + os::Printer::log("Cannot find MY3D_MAT_HEADER_ID, loading failed!", ELL_ERROR); + return 0; + } + + // read material header + MaterialEntry.push_back(SMyMaterialEntry()); + SMyMaterialEntry& me=MaterialEntry.getLast(); + file->read(&(me.Header), sizeof(SMyMaterialHeader)); + + // read next identificator + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + bool gotLightMap=false, gotMainMap=false; + + for (u32 t=0; t<me.Header.TextureCount; ++t) + { + if (id==MY3D_TEX_FNAME_ID) + file->read(namebuf, 256); + else + { + me.Texture2 = readEmbeddedLightmap(file, namebuf); + if (!me.Texture2) + return 0; + gotLightMap = true; + } + + const core::stringc name(namebuf); + const s32 pos = name.findLast('.'); + const core::stringc LightingMapStr = "LightingMap"; + const s32 ls = LightingMapStr.size(); + const bool isSubString = (LightingMapStr == name.subString(core::max_(0, (pos - ls)), ls)); + if ((isSubString || (name[pos-1]=='m' && + name[pos-2]=='l' && name[pos-3]=='_')) && + !gotLightMap) + { + const bool oldMipMapState = SceneManager->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + me.Texture2FileName = texturePath.size() ? texturePath : filepath; + me.Texture2FileName.append("Lightmaps/"); + me.Texture2FileName.append(name); + + if (name.size()) + me.Texture2 = SceneManager->getVideoDriver()->getTexture(me.Texture2FileName); + + me.MaterialType = video::EMT_LIGHTMAP_M2; + gotLightMap = true; + + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); + } + else + if (!gotLightMap && gotMainMap) + { + me.Texture2FileName = texturePath.size() ? texturePath : filepath; + me.Texture2FileName.append(name); + + if (name.size()) + me.Texture2 = SceneManager->getVideoDriver()->getTexture(me.Texture2FileName); + + me.MaterialType = video::EMT_REFLECTION_2_LAYER; + } + else + if (!gotMainMap && !gotLightMap) + { + me.Texture1FileName = filepath; + me.Texture1FileName.append(name); + if (name.size()) + me.Texture1 = SceneManager->getVideoDriver()->getTexture(me.Texture1FileName); + + gotMainMap = true; + me.MaterialType = video::EMT_SOLID; + } + else + if (gotLightMap) + { + me.MaterialType = video::EMT_LIGHTMAP_M2; + } + + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + } + + // override material types based on their names + if (!strncmp(me.Header.Name, "AlphaChannel-", 13)) + me.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + else + if (!strncmp(me.Header.Name, "SphereMap-", 10)) + me.MaterialType = video::EMT_SPHERE_MAP; + } + + // loading meshes + + if (id!=MY3D_MESH_LIST_ID) + { + os::Printer::log("Can not find MY3D_MESH_LIST_ID, loading failed!", ELL_ERROR); + return 0; + } + + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + for (s32 mesh_id=0; mesh_id<sceneHeader.MeshCount; mesh_id++) + { + // Warning!!! In some cases MY3D exporter uncorrectly calculates + // MeshCount (it's a problem, has to be solved) thats why + // i added this code line + if (id!=MY3D_MESH_HEADER_ID) + break; + + if (id!=MY3D_MESH_HEADER_ID) + { + os::Printer::log("Can not find MY3D_MESH_HEADER_ID, loading failed!", ELL_ERROR); + return 0; + } + + SMyMeshHeader meshHeader; + file->read(&meshHeader, sizeof(SMyMeshHeader)); + + core::array <SMyVertex> Vertex; + core::array <SMyFace> Face; + core::array <SMyTVertex> TVertex1, TVertex2; + core::array <SMyFace> TFace1, TFace2; + + s32 vertsNum=0; + s32 facesNum=0; + + // vertices + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + if (id!=MY3D_VERTS_ID) + { + os::Printer::log("Can not find MY3D_VERTS_ID, loading failed!", ELL_ERROR); + return 0; + } + + file->read(&vertsNum, sizeof(vertsNum)); + Vertex.set_used(vertsNum); + file->read(Vertex.pointer(), sizeof(SMyVertex)*vertsNum); + + // faces + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + if (id!=MY3D_FACES_ID) + { + os::Printer::log("Can not find MY3D_FACES_ID, loading failed!", ELL_ERROR); + return 0; + } + + file->read(&facesNum, sizeof(facesNum)); + Face.set_used(facesNum); + file->read(Face.pointer(), sizeof(SMyFace)*facesNum); + + // reading texture channels + for (s32 tex=0; tex<(s32)meshHeader.TChannelCnt; tex++) + { + // Max 2 texture channels allowed (but in format .my3d can be more) + s32 tVertsNum=0, tFacesNum=0; + + // reading texture coords + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + if (id!=MY3D_TVERTS_ID) + { + core::stringc msg="Can not find MY3D_TVERTS_ID ("; + msg.append(core::stringc(tex)); + msg.append("texture channel), loading failed!"); + os::Printer::log(msg.c_str(), ELL_ERROR); + return 0; + } + + file->read(&tVertsNum, sizeof(tVertsNum)); + + if (tex==0) + { + // 1st texture channel + TVertex1.set_used(tVertsNum); + file->read(TVertex1.pointer(), sizeof(SMyTVertex)*tVertsNum); + } + else + if (tex==1) + { + // 2nd texture channel + TVertex2.set_used(tVertsNum); + file->read(TVertex2.pointer(), sizeof(SMyTVertex)*tVertsNum); + } + else + { + // skip other texture channels + file->seek(file->getPos()+sizeof(SMyTVertex)*tVertsNum); + } + + // reading texture faces + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + + if (id!=MY3D_TFACES_ID) + { + core::stringc msg="Can not find MY3D_TFACES_ID ("; + msg.append(core::stringc(tex)); + msg.append("texture channel), loading failed!"); + os::Printer::log(msg.c_str(), ELL_ERROR); + return 0; + } + + file->read(&tFacesNum, sizeof(tFacesNum)); + + if (tex==0) + { + // 1st texture channel + TFace1.set_used(tFacesNum); + file->read(TFace1.pointer(), sizeof(SMyFace)*tFacesNum); + } + else if (tex==1) + { + // 2nd texture channel + TFace2.set_used(tFacesNum); + file->read(TFace2.pointer(), sizeof(SMyFace)*tFacesNum); + } + else + { + // skip other texture channels + file->seek(file->getPos()+sizeof(SMyFace)*tFacesNum); + } + } + + // trying to find material + + SMyMaterialEntry* matEnt = getMaterialEntryByIndex(meshHeader.MatIndex); + + // creating geometry for the mesh + + // trying to find mesh buffer for this material + SMeshBufferLightMap* buffer = getMeshBufferByMaterialIndex(meshHeader.MatIndex); + + if (!buffer || + (buffer->Vertices.size()+vertsNum) > SceneManager->getVideoDriver()->getMaximalPrimitiveCount()) + { + // creating new mesh buffer for this material + buffer = new scene::SMeshBufferLightMap(); + + buffer->Material.MaterialType = video::EMT_LIGHTMAP_M2; // EMT_LIGHTMAP_M4 also possible + buffer->Material.Wireframe = false; + buffer->Material.Lighting = false; + + if (matEnt) + { + buffer->Material.MaterialType = matEnt->MaterialType; + + if (buffer->Material.MaterialType == video::EMT_REFLECTION_2_LAYER) + { + buffer->Material.Lighting = true; + buffer->Material.setTexture(1, matEnt->Texture1); + buffer->Material.setTexture(0, matEnt->Texture2); + } + else + { + buffer->Material.setTexture(0, matEnt->Texture1); + buffer->Material.setTexture(1, matEnt->Texture2); + } + + if (buffer->Material.MaterialType == video::EMT_TRANSPARENT_ALPHA_CHANNEL) + { + buffer->Material.BackfaceCulling = true; + buffer->Material.Lighting = true; + } + else + if (buffer->Material.MaterialType == video::EMT_SPHERE_MAP) + { + buffer->Material.Lighting = true; + } + + buffer->Material.AmbientColor = video::SColor( + matEnt->Header.AmbientColor.A, matEnt->Header.AmbientColor.R, + matEnt->Header.AmbientColor.G, matEnt->Header.AmbientColor.B + ); + buffer->Material.DiffuseColor = video::SColor( + matEnt->Header.DiffuseColor.A, matEnt->Header.DiffuseColor.R, + matEnt->Header.DiffuseColor.G, matEnt->Header.DiffuseColor.B + ); + buffer->Material.EmissiveColor = video::SColor( + matEnt->Header.EmissiveColor.A, matEnt->Header.EmissiveColor.R, + matEnt->Header.EmissiveColor.G, matEnt->Header.EmissiveColor.B + ); + buffer->Material.SpecularColor = video::SColor( + matEnt->Header.SpecularColor.A, matEnt->Header.SpecularColor.R, + matEnt->Header.SpecularColor.G, matEnt->Header.SpecularColor.B + ); + } + else + { + buffer->Material.setTexture(0, 0); + buffer->Material.setTexture(1, 0); + + buffer->Material.AmbientColor = video::SColor(255, 255, 255, 255); + buffer->Material.DiffuseColor = video::SColor(255, 255, 255, 255); + buffer->Material.EmissiveColor = video::SColor(0, 0, 0, 0); + buffer->Material.SpecularColor = video::SColor(0, 0, 0, 0); + } + + if (matEnt && matEnt->Header.Transparency!=0) + { + if (buffer->Material.MaterialType == video::EMT_REFLECTION_2_LAYER ) + { + buffer->Material.MaterialType = video::EMT_TRANSPARENT_REFLECTION_2_LAYER; + buffer->Material.Lighting = true; + buffer->Material.BackfaceCulling = true; + } + else + { + buffer->Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + buffer->Material.Lighting = false; + buffer->Material.BackfaceCulling = false; + } + } + else if ( + !buffer->Material.getTexture(1) && + buffer->Material.MaterialType != video::EMT_TRANSPARENT_ALPHA_CHANNEL && + buffer->Material.MaterialType != video::EMT_SPHERE_MAP) + { + buffer->Material.MaterialType = video::EMT_SOLID; + buffer->Material.Lighting = true; + } + + MeshBufferEntry.push_back( + SMyMeshBufferEntry(meshHeader.MatIndex, buffer)); + } + + video::S3DVertex2TCoords VertexA, VertexB, VertexC; + + // vertices (A, B, C) color + video::SColor vert_color; + if (matEnt && + (buffer->Material.MaterialType == video::EMT_TRANSPARENT_VERTEX_ALPHA || + buffer->Material.MaterialType == video::EMT_TRANSPARENT_REFLECTION_2_LAYER)) + { + video::SColor color( + matEnt->Header.DiffuseColor.A, matEnt->Header.DiffuseColor.R, + matEnt->Header.DiffuseColor.G, matEnt->Header.DiffuseColor.B); + + vert_color = color.getInterpolated(video::SColor(0,0,0,0), + 1-matEnt->Header.Transparency); + } + else + { + vert_color = buffer->Material.DiffuseColor; + } + + VertexA.Color = VertexB.Color = VertexC.Color = vert_color; + + if (buffer->Material.MaterialType == video::EMT_TRANSPARENT_ALPHA_CHANNEL) + { + buffer->Indices.reallocate(buffer->Indices.size()+6*facesNum); + buffer->Vertices.reallocate(buffer->Vertices.size()+6*facesNum); + } + else + { + buffer->Indices.reallocate(buffer->Indices.size()+3*facesNum); + buffer->Vertices.reallocate(buffer->Vertices.size()+3*facesNum); + } + for (int f=0; f<facesNum; f++) + { + // vertex A + + VertexA.Pos.X = Vertex[Face[f].C].Coord.X; + VertexA.Pos.Y = Vertex[Face[f].C].Coord.Y; + VertexA.Pos.Z = Vertex[Face[f].C].Coord.Z; + + VertexA.Normal.X = Vertex[Face[f].C].Normal.X; + VertexA.Normal.Y = Vertex[Face[f].C].Normal.Y; + VertexA.Normal.Z = Vertex[Face[f].C].Normal.Z; + + if (meshHeader.TChannelCnt>0) + { + VertexA.TCoords.X = TVertex1[TFace1[f].C].TCoord.X; + VertexA.TCoords.Y = TVertex1[TFace1[f].C].TCoord.Y; + } + + if (meshHeader.TChannelCnt>1) + { + VertexA.TCoords2.X = TVertex2[TFace2[f].C].TCoord.X; + VertexA.TCoords2.Y = TVertex2[TFace2[f].C].TCoord.Y; + } + + // vertex B + + VertexB.Pos.X = Vertex[Face[f].B].Coord.X; + VertexB.Pos.Y = Vertex[Face[f].B].Coord.Y; + VertexB.Pos.Z = Vertex[Face[f].B].Coord.Z; + + VertexB.Normal.X = Vertex[Face[f].B].Normal.X; + VertexB.Normal.Y = Vertex[Face[f].B].Normal.Y; + VertexB.Normal.Z = Vertex[Face[f].B].Normal.Z; + + if (meshHeader.TChannelCnt>0) + { + VertexB.TCoords.X = TVertex1[TFace1[f].B].TCoord.X; + VertexB.TCoords.Y = TVertex1[TFace1[f].B].TCoord.Y; + } + + if (meshHeader.TChannelCnt>1) + { + VertexB.TCoords2.X = TVertex2[TFace2[f].B].TCoord.X; + VertexB.TCoords2.Y = TVertex2[TFace2[f].B].TCoord.Y; + } + + // vertex C + + VertexC.Pos.X = Vertex[Face[f].A].Coord.X; + VertexC.Pos.Y = Vertex[Face[f].A].Coord.Y; + VertexC.Pos.Z = Vertex[Face[f].A].Coord.Z; + + VertexC.Normal.X = Vertex[Face[f].A].Normal.X; + VertexC.Normal.Y = Vertex[Face[f].A].Normal.Y; + VertexC.Normal.Z = Vertex[Face[f].A].Normal.Z; + + if (meshHeader.TChannelCnt>0) + { + VertexC.TCoords.X = TVertex1[TFace1[f].A].TCoord.X; + VertexC.TCoords.Y = TVertex1[TFace1[f].A].TCoord.Y; + } + if (meshHeader.TChannelCnt>1) + { + VertexC.TCoords2.X = TVertex2[TFace2[f].A].TCoord.X; + VertexC.TCoords2.Y = TVertex2[TFace2[f].A].TCoord.Y; + } + + // store 3d data in mesh buffer + + buffer->Indices.push_back(buffer->Vertices.size()); + buffer->Vertices.push_back(VertexA); + + buffer->Indices.push_back(buffer->Vertices.size()); + buffer->Vertices.push_back(VertexB); + + buffer->Indices.push_back(buffer->Vertices.size()); + buffer->Vertices.push_back(VertexC); + + //***************************************************************** + // !!!!!! W A R N I N G !!!!!!! + //***************************************************************** + // For materials with alpha channel we duplicate all faces. + // This has be done for proper lighting calculation of the back faces. + // So you must remember this while you creating your models !!!!! + //***************************************************************** + // !!!!!! W A R N I N G !!!!!!! + //***************************************************************** + + if (buffer->Material.MaterialType == video::EMT_TRANSPARENT_ALPHA_CHANNEL) + { + VertexA.Normal = core::vector3df(-VertexA.Normal.X, -VertexA.Normal.Y, -VertexA.Normal.Z); + VertexB.Normal = core::vector3df(-VertexB.Normal.X, -VertexB.Normal.Y, -VertexB.Normal.Z); + VertexC.Normal = core::vector3df(-VertexC.Normal.X, -VertexC.Normal.Y, -VertexC.Normal.Z); + + buffer->Indices.push_back(buffer->Vertices.size()); + buffer->Vertices.push_back(VertexC); + + buffer->Indices.push_back(buffer->Vertices.size()); + buffer->Vertices.push_back(VertexB); + + buffer->Indices.push_back(buffer->Vertices.size()); + buffer->Vertices.push_back(VertexA); + } + } + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + } + + // creating mesh + SMesh* mesh = new SMesh(); + + for (u32 num=0; num<MeshBufferEntry.size(); ++num) + { + SMeshBufferLightMap* buffer = MeshBufferEntry[num].MeshBuffer; + + if (!buffer) + continue; + + mesh->addMeshBuffer(buffer); + + buffer->recalculateBoundingBox(); + buffer->drop(); + } + + mesh->recalculateBoundingBox(); + + if (id != MY3D_FILE_END_ID) + os::Printer::log("Loading finished, but can not find MY3D_FILE_END_ID token.", ELL_WARNING); + + SAnimatedMesh* am = new SAnimatedMesh(); + + am->addMesh(mesh); + mesh->drop(); + am->recalculateBoundingBox(); + + return am; +} + + +video::ITexture* CMY3DMeshFileLoader::readEmbeddedLightmap(io::IReadFile* file, char* namebuf) +{ + static int LightMapIndex=0; + u16 id; + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + if (id!=MY3D_TEXDATA_HEADER_ID) + { + os::Printer::log("Can not find MY3D_TEXDATA_HEADER_ID, loading failed!", ELL_ERROR); + return 0; + } + + SMyTexDataHeader texDataHeader; + + file->read(&texDataHeader, sizeof(SMyTexDataHeader)); + + strcpy(texDataHeader.Name, namebuf); + + char LightMapName[255]; + sprintf(LightMapName,"My3D.Lightmap.%d",++LightMapIndex); + + core::stringc pixFormatStr; + if (texDataHeader.PixelFormat == MY3D_PIXEL_FORMAT_24) + pixFormatStr = "24bit,"; + else + if (texDataHeader.PixelFormat == MY3D_PIXEL_FORMAT_16) + pixFormatStr = "16bit,"; + else + { + core::stringc msg="Unknown format of image data ("; + msg.append(LightMapName); + msg.append("), loading failed!"); + os::Printer::log(msg.c_str(), ELL_ERROR); + return 0; + } + + if (texDataHeader.ComprMode != MY3D_TEXDATA_COMPR_NONE_ID && + texDataHeader.ComprMode != MY3D_TEXDATA_COMPR_RLE_ID && + texDataHeader.ComprMode != MY3D_TEXDATA_COMPR_SIMPLE_ID ) + { + os::Printer::log("Unknown method of compression image data, loading failed!", ELL_ERROR); + return 0; + } + + const u32 num_pixels = texDataHeader.Width*texDataHeader.Height; + + void* data = 0; + + if (texDataHeader.ComprMode==MY3D_TEXDATA_COMPR_NONE_ID) + { + // none compressed image data + if (texDataHeader.PixelFormat == MY3D_PIXEL_FORMAT_24) + { + data = (void*) new SMyPixelColor24[num_pixels]; + file->read(data, sizeof(SMyPixelColor24)*num_pixels); + } + else + { + data = (void*) new SMyPixelColor16[num_pixels]; + file->read(data, sizeof(SMyPixelColor16)*num_pixels); + } + } + else + if (texDataHeader.ComprMode==MY3D_TEXDATA_COMPR_RLE_ID) + { + // read RLE header identificator + file->read(&id, sizeof(id)); +#ifdef __BIG_ENDIAN__ + id = os::Byteswap::byteswap(id); +#endif + if (id!=MY3D_TEXDATA_RLE_HEADER_ID) + { + os::Printer::log("Can not find MY3D_TEXDATA_RLE_HEADER_ID, loading failed!", ELL_ERROR); + return 0; + } + + // read RLE header + SMyRLEHeader rleHeader; + file->read(&rleHeader, sizeof(SMyRLEHeader)); + + //allocate memory for input and output buffers + void *input_buffer = (void*) new unsigned char[rleHeader.nEncodedBytes]; + void *output_buffer = (void*) new unsigned char[rleHeader.nDecodedBytes]; + + // read encoded data + file->read(input_buffer, rleHeader.nEncodedBytes); + + // decode data + data = 0;//(void*) new unsigned char[rleHeader.nDecodedBytes]; + s32 decodedBytes = core::rle_decode( + (unsigned char*)input_buffer, rleHeader.nEncodedBytes, + (unsigned char*)output_buffer, rleHeader.nDecodedBytes); + + if (decodedBytes!=(s32)rleHeader.nDecodedBytes) + { + os::Printer::log("Error extracting data from RLE compression, loading failed!", ELL_ERROR); + return 0; + } + + // free input buffer + delete [] (unsigned char*)input_buffer; + + // here decoded data + data = output_buffer; + } + else if (texDataHeader.ComprMode==MY3D_TEXDATA_COMPR_SIMPLE_ID) + { + // simple compressed image data + if (texDataHeader.PixelFormat == MY3D_PIXEL_FORMAT_24) + data = (void*) new SMyPixelColor24[num_pixels]; + else + data = (void*) new SMyPixelColor16[num_pixels]; + + u32 nReadedPixels=0, nToRead=0; + while (true) + { + file->read(&nToRead, sizeof(nToRead)); + + if ((nReadedPixels+nToRead) > num_pixels) + break; + + if (texDataHeader.PixelFormat == MY3D_PIXEL_FORMAT_24) + { + SMyPixelColor24 col24; + file->read(&col24, sizeof(SMyPixelColor24)); + for (u32 p=0; p<nToRead; p++) + { + ((SMyPixelColor24*)data)[nReadedPixels+p] = + SMyPixelColor24(col24.r, col24.g, col24.b); + } + } + else + { + SMyPixelColor16 col16; + file->read(&col16, sizeof(SMyPixelColor16)); + for (u32 p=0; p<nToRead; p++) + ((SMyPixelColor16*)data)[nReadedPixels+p].argb = col16.argb; + } + + nReadedPixels+=nToRead; + + if (nReadedPixels >= num_pixels) + break; + } + + if (nReadedPixels != num_pixels) + { + os::Printer::log("Image data seems to be corrupted, loading failed!", ELL_ERROR); + return 0; + } + } + + //! Creates a software image from a byte array. + video::IImage* light_img = 0; + + if (texDataHeader.PixelFormat == MY3D_PIXEL_FORMAT_24) + { + // 24 bit lightmap format + light_img = SceneManager->getVideoDriver()->createImageFromData( + video::ECF_R8G8B8, + core::dimension2d<u32>(texDataHeader.Width, texDataHeader.Height), + data, true); + } + else + { + // 16 bit lightmap format + light_img = SceneManager->getVideoDriver()->createImageFromData( + video::ECF_A1R5G5B5, + core::dimension2d<u32>(texDataHeader.Width, texDataHeader.Height), + data, true); + } + + const bool oldMipMapState = SceneManager->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + video::ITexture* lmtex = SceneManager->getVideoDriver()->addTexture(LightMapName, light_img); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); + + light_img->drop(); + return lmtex; +} + + +CMY3DMeshFileLoader::SMyMaterialEntry* CMY3DMeshFileLoader::getMaterialEntryByIndex(u32 matInd) +{ + for (u32 m=0; m<MaterialEntry.size(); ++m) + if (MaterialEntry[m].Header.Index == matInd) + return &MaterialEntry[m]; + + return 0; +} + + + +SMeshBufferLightMap* CMY3DMeshFileLoader::getMeshBufferByMaterialIndex(u32 matInd) +{ + for (u32 m=0; m<MeshBufferEntry.size(); ++m) + { + if (MeshBufferEntry[m].MaterialIndex == (s32)matInd) + return MeshBufferEntry[m].MeshBuffer; + } + return 0; +} + + +const core::array<ISceneNode*>& CMY3DMeshFileLoader::getChildNodes() const +{ + return ChildNodes; +} + + +} // end namespace scnene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_MY3D_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.h new file mode 100644 index 0000000..716478d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMY3DMeshFileLoader.h @@ -0,0 +1,131 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was originally written by ZDimitor. +// I (Nikolaus Gebhardt) did some few changes to this: +// - replaced logging calls to their os:: counterparts +// - removed some logging calls +// - removed setTexture path and replaced it with the directory of the mesh +// - added EAMT_MY3D file type +// - fixed a memory leak when decompressing RLE data. +// - cleaned multi character constant problems with gcc +// - removed octree child scene node generation because irrlicht is now able to draw +// scene nodes with transparent and sold materials in them at the same time. (see changes.txt) +// Thanks a lot to ZDimitor for his work on this and that he gave me +// his permission to add it into Irrlicht. + +//-------------------------------------------------------------------------------- +// This tool created by ZDimitor everyone can use it as wants +//-------------------------------------------------------------------------------- + +#ifndef __CMY3D_MESH_FILE_LOADER_H_INCLUDED__ +#define __CMY3D_MESH_FILE_LOADER_H_INCLUDED__ + + +#ifdef _MSC_VER +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +#endif + + +#include "IMeshLoader.h" +#include "SMesh.h" +#include "SMeshBufferLightMap.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "irrString.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +// byte-align structures +#include "irrpack.h" + +struct SMyColor +{ SMyColor () {;} + SMyColor (s32 __R, s32 __G, s32 __B, s32 __A) + : R(__R), G(__G), B(__B), A(__A) {} + s32 R, G, B, A; +} PACK_STRUCT; + +// material header +struct SMyMaterialHeader +{ c8 Name[256]; // material name + u32 Index; + SMyColor AmbientColor; + SMyColor DiffuseColor; + SMyColor EmissiveColor; + SMyColor SpecularColor; + f32 Shininess; + f32 Transparency; + u32 TextureCount; // texture count +} PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + +class CMY3DMeshFileLoader : public IMeshLoader +{ +public: + CMY3DMeshFileLoader(ISceneManager *scmgr, io::IFileSystem* fs); + virtual ~CMY3DMeshFileLoader(); + + virtual bool isALoadableFileExtension(const io::path& filename) const; + + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + //! getting access to the nodes (with transparent material), creating + //! while loading .my3d file + const core::array<ISceneNode*>& getChildNodes() const; + +private: + + video::ITexture* readEmbeddedLightmap(io::IReadFile* file, char* namebuf); + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + + struct SMyMaterialEntry + { + SMyMaterialEntry () + : Texture1FileName("null"), Texture2FileName("null"), + Texture1(0), Texture2(0), MaterialType(video::EMT_SOLID) {} + + SMyMaterialHeader Header; + core::stringc Texture1FileName; + core::stringc Texture2FileName; + video::ITexture *Texture1; + video::ITexture *Texture2; + video::E_MATERIAL_TYPE MaterialType; + }; + + struct SMyMeshBufferEntry + { + SMyMeshBufferEntry() : MaterialIndex(-1), MeshBuffer(0) {} + SMyMeshBufferEntry(s32 mi, SMeshBufferLightMap* mb) + : MaterialIndex(mi), MeshBuffer(mb) {} + + s32 MaterialIndex; + SMeshBufferLightMap* MeshBuffer; + }; + + SMyMaterialEntry* getMaterialEntryByIndex (u32 matInd); + SMeshBufferLightMap* getMeshBufferByMaterialIndex(u32 matInd); + + core::array<SMyMaterialEntry> MaterialEntry; + core::array<SMyMeshBufferEntry> MeshBufferEntry; + + core::array<ISceneNode*> ChildNodes; +}; + + +} // end namespace scene +} // end namespace irr + + +#endif // __CMY3D_MESH_FILE_LOADER_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.cpp new file mode 100644 index 0000000..d25c1f2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.cpp @@ -0,0 +1,122 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMemoryFile.h" +#include "irrString.h" + +namespace irr +{ +namespace io +{ + + +CMemoryFile::CMemoryFile(void* memory, long len, const io::path& fileName, bool d) +: Buffer(memory), Len(len), Pos(0), Filename(fileName), deleteMemoryWhenDropped(d) +{ + #ifdef _DEBUG + setDebugName("CMemoryFile"); + #endif +} + + +CMemoryFile::~CMemoryFile() +{ + if (deleteMemoryWhenDropped) + delete [] (c8*)Buffer; +} + + +//! returns how much was read +s32 CMemoryFile::read(void* buffer, u32 sizeToRead) +{ + s32 amount = static_cast<s32>(sizeToRead); + if (Pos + amount > Len) + amount -= Pos + amount - Len; + + if (amount <= 0) + return 0; + + c8* p = (c8*)Buffer; + memcpy(buffer, p + Pos, amount); + + Pos += amount; + + return amount; +} + +//! returns how much was written +s32 CMemoryFile::write(const void* buffer, u32 sizeToWrite) +{ + s32 amount = static_cast<s32>(sizeToWrite); + if (Pos + amount > Len) + amount -= Pos + amount - Len; + + if (amount <= 0) + return 0; + + c8* p = (c8*)Buffer; + memcpy(p + Pos, buffer, amount); + + Pos += amount; + + return amount; +} + + + +//! changes position in file, returns true if successful +//! if relativeMovement==true, the pos is changed relative to current pos, +//! otherwise from begin of file +bool CMemoryFile::seek(long finalPos, bool relativeMovement) +{ + if (relativeMovement) + { + if (Pos + finalPos > Len) + return false; + + Pos += finalPos; + } + else + { + if (finalPos > Len) + return false; + + Pos = finalPos; + } + + return true; +} + + +//! returns size of file +long CMemoryFile::getSize() const +{ + return Len; +} + + +//! returns where in the file we are. +long CMemoryFile::getPos() const +{ + return Pos; +} + + +//! returns name of file +const io::path& CMemoryFile::getFileName() const +{ + return Filename; +} + + +IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped) +{ + CMemoryFile* file = new CMemoryFile(memory, size, fileName, deleteMemoryWhenDropped); + return file; +} + + +} // end namespace io +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.h new file mode 100644 index 0000000..98b4c25 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMemoryFile.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MEMORY_READ_FILE_H_INCLUDED__ +#define __C_MEMORY_READ_FILE_H_INCLUDED__ + +#include "IReadFile.h" +#include "IWriteFile.h" +#include "irrString.h" + +namespace irr +{ + +namespace io +{ + + /*! + Class for reading and writing from memory. + */ + class CMemoryFile : public IReadFile, public IWriteFile + { + public: + + //! Constructor + CMemoryFile(void* memory, long len, const io::path& fileName, bool deleteMemoryWhenDropped); + + //! Destructor + virtual ~CMemoryFile(); + + //! returns how much was read + virtual s32 read(void* buffer, u32 sizeToRead); + + //! returns how much was written + virtual s32 write(const void* buffer, u32 sizeToWrite); + + //! changes position in file, returns true if successful + virtual bool seek(long finalPos, bool relativeMovement = false); + + //! returns size of file + virtual long getSize() const; + + //! returns where in the file we are. + virtual long getPos() const; + + //! returns name of file + virtual const io::path& getFileName() const; + + private: + + void *Buffer; + long Len; + long Pos; + io::path Filename; + bool deleteMemoryWhenDropped; + }; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.cpp new file mode 100644 index 0000000..5bcce19 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.cpp @@ -0,0 +1,178 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMeshCache.h" +#include "IAnimatedMesh.h" +#include "IMesh.h" + +namespace irr +{ +namespace scene +{ + +static const io::SNamedPath emptyNamedPath; + + +CMeshCache::~CMeshCache() +{ + clear(); +} + + +//! adds a mesh to the list +void CMeshCache::addMesh(const io::path& filename, IAnimatedMesh* mesh) +{ + mesh->grab(); + + MeshEntry e ( filename ); + e.Mesh = mesh; + + Meshes.push_back(e); +} + + +//! Removes a mesh from the cache. +void CMeshCache::removeMesh(const IMesh* const mesh) +{ + if ( !mesh ) + return; + for (u32 i=0; i<Meshes.size(); ++i) + { + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) + { + Meshes[i].Mesh->drop(); + Meshes.erase(i); + return; + } + } +} + + +//! Returns amount of loaded meshes +u32 CMeshCache::getMeshCount() const +{ + return Meshes.size(); +} + + +//! Returns current number of the mesh +s32 CMeshCache::getMeshIndex(const IMesh* const mesh) const +{ + for (u32 i=0; i<Meshes.size(); ++i) + { + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) + return (s32)i; + } + + return -1; +} + + +//! Returns a mesh based on its index number +IAnimatedMesh* CMeshCache::getMeshByIndex(u32 number) +{ + if (number >= Meshes.size()) + return 0; + + return Meshes[number].Mesh; +} + + +//! Returns a mesh based on its name. +IAnimatedMesh* CMeshCache::getMeshByName(const io::path& name) +{ + MeshEntry e ( name ); + s32 id = Meshes.binary_search(e); + return (id != -1) ? Meshes[id].Mesh : 0; +} + + +//! Get the name of a loaded mesh, based on its index. +const io::SNamedPath& CMeshCache::getMeshName(u32 index) const +{ + if (index >= Meshes.size()) + return emptyNamedPath; + + return Meshes[index].NamedPath; +} + + +//! Get the name of a loaded mesh, if there is any. +const io::SNamedPath& CMeshCache::getMeshName(const IMesh* const mesh) const +{ + if (!mesh) + return emptyNamedPath; + + for (u32 i=0; i<Meshes.size(); ++i) + { + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) + return Meshes[i].NamedPath; + } + + return emptyNamedPath; +} + +//! Renames a loaded mesh. +bool CMeshCache::renameMesh(u32 index, const io::path& name) +{ + if (index >= Meshes.size()) + return false; + + Meshes[index].NamedPath.setPath(name); + Meshes.sort(); + return true; +} + + +//! Renames a loaded mesh. +bool CMeshCache::renameMesh(const IMesh* const mesh, const io::path& name) +{ + for (u32 i=0; i<Meshes.size(); ++i) + { + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) + { + Meshes[i].NamedPath.setPath(name); + Meshes.sort(); + return true; + } + } + + return false; +} + + +//! returns if a mesh already was loaded +bool CMeshCache::isMeshLoaded(const io::path& name) +{ + return getMeshByName(name) != 0; +} + + +//! Clears the whole mesh cache, removing all meshes. +void CMeshCache::clear() +{ + for (u32 i=0; i<Meshes.size(); ++i) + Meshes[i].Mesh->drop(); + + Meshes.clear(); +} + +//! Clears all meshes that are held in the mesh cache but not used anywhere else. +void CMeshCache::clearUnusedMeshes() +{ + for (u32 i=0; i<Meshes.size(); ++i) + { + if (Meshes[i].Mesh->getReferenceCount() == 1) + { + Meshes[i].Mesh->drop(); + Meshes.erase(i); + --i; + } + } +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.h new file mode 100644 index 0000000..e3cdc9f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshCache.h @@ -0,0 +1,123 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MESH_CACHE_H_INCLUDED__ +#define __C_MESH_CACHE_H_INCLUDED__ + +#include "IMeshCache.h" +#include "irrArray.h" + +namespace irr +{ + +namespace scene +{ + class CMeshCache : public IMeshCache + { + public: + + virtual ~CMeshCache(); + + //! Adds a mesh to the internal list of loaded meshes. + /** Usually, ISceneManager::getMesh() is called to load a mesh from file. + That method searches the list of loaded meshes if a mesh has already been loaded and + returns a pointer to if it is in that list and already in memory. Otherwise it loads + the mesh. With IMeshCache::addMesh(), it is possible to pretend that a mesh already + has been loaded. This method can be used for example by mesh loaders who need to + load more than one mesh with one call. They can add additional meshes with this + method to the scene manager. The COLLADA loader for example uses this method. + \param filename: Filename of the mesh. When called ISceneManager::getMesh() with this + parameter, the method will return the mesh parameter given with this method. + \param mesh: Pointer to a mesh which will now be referenced by this name. */ + virtual void addMesh(const io::path& filename, IAnimatedMesh* mesh); + + //! Removes a mesh from the cache. + /** After loading a mesh with getMesh(), the mesh can be removed from the cache + using this method, freeing a lot of memory. */ + virtual void removeMesh(const IMesh* const mesh); + + //! Returns amount of loaded meshes in the cache. + /** You can load new meshes into the cache using getMesh() and addMesh(). + If you ever need to access the internal mesh cache, you can do this using + removeMesh(), getMeshNumber(), getMeshByIndex() and getMeshFilename() */ + virtual u32 getMeshCount() const; + + //! Returns current index number of the mesh, and -1 if it is not in the cache. + virtual s32 getMeshIndex(const IMesh* const mesh) const; + + //! Returns a mesh based on its index number. + /** \param index: Index of the mesh, number between 0 and getMeshCount()-1. + Note that this number is only valid until a new mesh is loaded or removed * + \return Returns pointer to the mesh or 0 if there is none with this number. */ + virtual IAnimatedMesh* getMeshByIndex(u32 index); + + //! Returns a mesh based on its name. + /** \param name Name of the mesh. Usually a filename. + \return Pointer to the mesh or 0 if there is none with this number. */ + virtual IAnimatedMesh* getMeshByName(const io::path& name); + + //! Get the name of a loaded mesh, based on its index. + /** \param index: Index of the mesh, number between 0 and getMeshCount()-1. + \return The name if mesh was found and has a name, else the path is empty. */ + virtual const io::SNamedPath& getMeshName(u32 index) const; + + //! Get the name of a loaded mesh, if there is any. + /** \param mesh Pointer to mesh to query. + \return The name if mesh was found and has a name, else the path is empty. */ + virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const; + + //! Renames a loaded mesh. + /** Note that renaming meshes might change the ordering of the + meshes, and so the index of the meshes as returned by + getMeshIndex() or taken by some methods will change. + \param index The index of the mesh in the cache. + \param name New name for the mesh. + \return True if mesh was renamed. */ + virtual bool renameMesh(u32 index, const io::path& name); + + //! Renames a loaded mesh. + /** Note that renaming meshes might change the ordering of the + meshes, and so the index of the meshes as returned by + getMeshIndex() or taken by some methods will change. + \param mesh Mesh to be renamed. + \param name New name for the mesh. + \return True if mesh was renamed. */ + virtual bool renameMesh(const IMesh* const mesh, const io::path& name); + + //! returns if a mesh already was loaded + virtual bool isMeshLoaded(const io::path& name); + + //! Clears the whole mesh cache, removing all meshes. + virtual void clear(); + + //! Clears all meshes that are held in the mesh cache but not used anywhere else. + virtual void clearUnusedMeshes(); + + protected: + + struct MeshEntry + { + MeshEntry ( const io::path& name ) + : NamedPath ( name ) + { + } + io::SNamedPath NamedPath; + IAnimatedMesh* Mesh; + + bool operator < (const MeshEntry& other) const + { + return (NamedPath < other.NamedPath); + } + }; + + //! loaded meshes + core::array<MeshEntry> Meshes; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.cpp new file mode 100644 index 0000000..823c4e3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.cpp @@ -0,0 +1,1820 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMeshManipulator.h" +#include "SMesh.h" +#include "CMeshBuffer.h" +#include "SAnimatedMesh.h" +#include "os.h" +#include "irrMap.h" + +namespace irr +{ +namespace scene +{ + +static inline core::vector3df getAngleWeight(const core::vector3df& v1, + const core::vector3df& v2, + const core::vector3df& v3) +{ + // Calculate this triangle's weight for each of its three vertices + // start by calculating the lengths of its sides + const f32 a = v2.getDistanceFromSQ(v3); + const f32 asqrt = sqrtf(a); + const f32 b = v1.getDistanceFromSQ(v3); + const f32 bsqrt = sqrtf(b); + const f32 c = v1.getDistanceFromSQ(v2); + const f32 csqrt = sqrtf(c); + + // use them to find the angle at each vertex + return core::vector3df( + acosf((b + c - a) / (2.f * bsqrt * csqrt)), + acosf((-b + c + a) / (2.f * asqrt * csqrt)), + acosf((b - c + a) / (2.f * bsqrt * asqrt))); +} + + +//! Flips the direction of surfaces. Changes backfacing triangles to frontfacing +//! triangles and vice versa. +//! \param mesh: Mesh on which the operation is performed. +void CMeshManipulator::flipSurfaces(scene::IMesh* mesh) const +{ + if (!mesh) + return; + + const u32 bcount = mesh->getMeshBufferCount(); + for (u32 b=0; b<bcount; ++b) + { + IMeshBuffer* buffer = mesh->getMeshBuffer(b); + const u32 idxcnt = buffer->getIndexCount(); + if (buffer->getIndexType() == video::EIT_16BIT) + { + u16* idx = buffer->getIndices(); + for (u32 i=0; i<idxcnt; i+=3) + { + const u16 tmp = idx[i+1]; + idx[i+1] = idx[i+2]; + idx[i+2] = tmp; + } + } + else + { + u32* idx = reinterpret_cast<u32*>(buffer->getIndices()); + for (u32 i=0; i<idxcnt; i+=3) + { + const u32 tmp = idx[i+1]; + idx[i+1] = idx[i+2]; + idx[i+2] = tmp; + } + } + } +} + + +namespace +{ +template <typename T> +void recalculateNormalsT(IMeshBuffer* buffer, bool smooth, bool angleWeighted) +{ + const u32 vtxcnt = buffer->getVertexCount(); + const u32 idxcnt = buffer->getIndexCount(); + const T* idx = reinterpret_cast<T*>(buffer->getIndices()); + + if (!smooth) + { + for (u32 i=0; i<idxcnt; i+=3) + { + const core::vector3df& v1 = buffer->getPosition(idx[i+0]); + const core::vector3df& v2 = buffer->getPosition(idx[i+1]); + const core::vector3df& v3 = buffer->getPosition(idx[i+2]); + const core::vector3df normal = core::plane3d<f32>(v1, v2, v3).Normal; + buffer->getNormal(idx[i+0]) = normal; + buffer->getNormal(idx[i+1]) = normal; + buffer->getNormal(idx[i+2]) = normal; + } + } + else + { + u32 i; + + for ( i = 0; i!= vtxcnt; ++i ) + buffer->getNormal(i).set(0.f, 0.f, 0.f); + + for ( i=0; i<idxcnt; i+=3) + { + const core::vector3df& v1 = buffer->getPosition(idx[i+0]); + const core::vector3df& v2 = buffer->getPosition(idx[i+1]); + const core::vector3df& v3 = buffer->getPosition(idx[i+2]); + const core::vector3df normal = core::plane3d<f32>(v1, v2, v3).Normal; + + core::vector3df weight(1.f,1.f,1.f); + if (angleWeighted) + weight = irr::scene::getAngleWeight(v1,v2,v3); // writing irr::scene:: necessary for borland + + buffer->getNormal(idx[i+0]) += weight.X*normal; + buffer->getNormal(idx[i+1]) += weight.Y*normal; + buffer->getNormal(idx[i+2]) += weight.Z*normal; + } + + for ( i = 0; i!= vtxcnt; ++i ) + buffer->getNormal(i).normalize(); + } +} +} + + +//! Recalculates all normals of the mesh buffer. +/** \param buffer: Mesh buffer on which the operation is performed. */ +void CMeshManipulator::recalculateNormals(IMeshBuffer* buffer, bool smooth, bool angleWeighted) const +{ + if (!buffer) + return; + + if (buffer->getIndexType()==video::EIT_16BIT) + recalculateNormalsT<u16>(buffer, smooth, angleWeighted); + else + recalculateNormalsT<u32>(buffer, smooth, angleWeighted); +} + + +//! Recalculates all normals of the mesh. +//! \param mesh: Mesh on which the operation is performed. +void CMeshManipulator::recalculateNormals(scene::IMesh* mesh, bool smooth, bool angleWeighted) const +{ + if (!mesh) + return; + + const u32 bcount = mesh->getMeshBufferCount(); + for ( u32 b=0; b<bcount; ++b) + recalculateNormals(mesh->getMeshBuffer(b), smooth, angleWeighted); +} + + +namespace +{ +void calculateTangents( + core::vector3df& normal, + core::vector3df& tangent, + core::vector3df& binormal, + const core::vector3df& vt1, const core::vector3df& vt2, const core::vector3df& vt3, // vertices + const core::vector2df& tc1, const core::vector2df& tc2, const core::vector2df& tc3) // texture coords +{ + // choose one of them: + //#define USE_NVIDIA_GLH_VERSION // use version used by nvidia in glh headers + #define USE_IRR_VERSION + +#ifdef USE_IRR_VERSION + + core::vector3df v1 = vt1 - vt2; + core::vector3df v2 = vt3 - vt1; + normal = v2.crossProduct(v1); + normal.normalize(); + + // binormal + + f32 deltaX1 = tc1.X - tc2.X; + f32 deltaX2 = tc3.X - tc1.X; + binormal = (v1 * deltaX2) - (v2 * deltaX1); + binormal.normalize(); + + // tangent + + f32 deltaY1 = tc1.Y - tc2.Y; + f32 deltaY2 = tc3.Y - tc1.Y; + tangent = (v1 * deltaY2) - (v2 * deltaY1); + tangent.normalize(); + + // adjust + + core::vector3df txb = tangent.crossProduct(binormal); + if (txb.dotProduct(normal) < 0.0f) + { + tangent *= -1.0f; + binormal *= -1.0f; + } + +#endif // USE_IRR_VERSION + +#ifdef USE_NVIDIA_GLH_VERSION + + tangent.set(0,0,0); + binormal.set(0,0,0); + + core::vector3df v1(vt2.X - vt1.X, tc2.X - tc1.X, tc2.Y - tc1.Y); + core::vector3df v2(vt3.X - vt1.X, tc3.X - tc1.X, tc3.Y - tc1.Y); + + core::vector3df txb = v1.crossProduct(v2); + if ( !core::iszero ( txb.X ) ) + { + tangent.X = -txb.Y / txb.X; + binormal.X = -txb.Z / txb.X; + } + + v1.X = vt2.Y - vt1.Y; + v2.X = vt3.Y - vt1.Y; + txb = v1.crossProduct(v2); + + if ( !core::iszero ( txb.X ) ) + { + tangent.Y = -txb.Y / txb.X; + binormal.Y = -txb.Z / txb.X; + } + + v1.X = vt2.Z - vt1.Z; + v2.X = vt3.Z - vt1.Z; + txb = v1.crossProduct(v2); + + if ( !core::iszero ( txb.X ) ) + { + tangent.Z = -txb.Y / txb.X; + binormal.Z = -txb.Z / txb.X; + } + + tangent.normalize(); + binormal.normalize(); + + normal = tangent.crossProduct(binormal); + normal.normalize(); + + binormal = tangent.crossProduct(normal); + binormal.normalize(); + + core::plane3d<f32> pl(vt1, vt2, vt3); + + if(normal.dotProduct(pl.Normal) < 0.0f ) + normal *= -1.0f; + +#endif // USE_NVIDIA_GLH_VERSION +} + + +//! Recalculates tangents for a tangent mesh buffer +template <typename T> +void recalculateTangentsT(IMeshBuffer* buffer, bool recalculateNormals, bool smooth, bool angleWeighted) +{ + if (!buffer || (buffer->getVertexType()!= video::EVT_TANGENTS)) + return; + + const u32 vtxCnt = buffer->getVertexCount(); + const u32 idxCnt = buffer->getIndexCount(); + + T* idx = reinterpret_cast<T*>(buffer->getIndices()); + video::S3DVertexTangents* v = + (video::S3DVertexTangents*)buffer->getVertices(); + + if (smooth) + { + u32 i; + + for ( i = 0; i!= vtxCnt; ++i ) + { + if (recalculateNormals) + v[i].Normal.set( 0.f, 0.f, 0.f ); + v[i].Tangent.set( 0.f, 0.f, 0.f ); + v[i].Binormal.set( 0.f, 0.f, 0.f ); + } + + //Each vertex gets the sum of the tangents and binormals from the faces around it + for ( i=0; i<idxCnt; i+=3) + { + // if this triangle is degenerate, skip it! + if (v[idx[i+0]].Pos == v[idx[i+1]].Pos || + v[idx[i+0]].Pos == v[idx[i+2]].Pos || + v[idx[i+1]].Pos == v[idx[i+2]].Pos + /*|| + v[idx[i+0]].TCoords == v[idx[i+1]].TCoords || + v[idx[i+0]].TCoords == v[idx[i+2]].TCoords || + v[idx[i+1]].TCoords == v[idx[i+2]].TCoords */ + ) + continue; + + //Angle-weighted normals look better, but are slightly more CPU intensive to calculate + core::vector3df weight(1.f,1.f,1.f); + if (angleWeighted) + weight = irr::scene::getAngleWeight(v[i+0].Pos,v[i+1].Pos,v[i+2].Pos); // writing irr::scene:: necessary for borland + core::vector3df localNormal; + core::vector3df localTangent; + core::vector3df localBinormal; + + calculateTangents( + localNormal, + localTangent, + localBinormal, + v[idx[i+0]].Pos, + v[idx[i+1]].Pos, + v[idx[i+2]].Pos, + v[idx[i+0]].TCoords, + v[idx[i+1]].TCoords, + v[idx[i+2]].TCoords); + + if (recalculateNormals) + v[idx[i+0]].Normal += localNormal * weight.X; + v[idx[i+0]].Tangent += localTangent * weight.X; + v[idx[i+0]].Binormal += localBinormal * weight.X; + + calculateTangents( + localNormal, + localTangent, + localBinormal, + v[idx[i+1]].Pos, + v[idx[i+2]].Pos, + v[idx[i+0]].Pos, + v[idx[i+1]].TCoords, + v[idx[i+2]].TCoords, + v[idx[i+0]].TCoords); + + if (recalculateNormals) + v[idx[i+1]].Normal += localNormal * weight.Y; + v[idx[i+1]].Tangent += localTangent * weight.Y; + v[idx[i+1]].Binormal += localBinormal * weight.Y; + + calculateTangents( + localNormal, + localTangent, + localBinormal, + v[idx[i+2]].Pos, + v[idx[i+0]].Pos, + v[idx[i+1]].Pos, + v[idx[i+2]].TCoords, + v[idx[i+0]].TCoords, + v[idx[i+1]].TCoords); + + if (recalculateNormals) + v[idx[i+2]].Normal += localNormal * weight.Z; + v[idx[i+2]].Tangent += localTangent * weight.Z; + v[idx[i+2]].Binormal += localBinormal * weight.Z; + } + + // Normalize the tangents and binormals + if (recalculateNormals) + { + for ( i = 0; i!= vtxCnt; ++i ) + v[i].Normal.normalize(); + } + for ( i = 0; i!= vtxCnt; ++i ) + { + v[i].Tangent.normalize(); + v[i].Binormal.normalize(); + } + } + else + { + core::vector3df localNormal; + for (u32 i=0; i<idxCnt; i+=3) + { + calculateTangents( + localNormal, + v[idx[i+0]].Tangent, + v[idx[i+0]].Binormal, + v[idx[i+0]].Pos, + v[idx[i+1]].Pos, + v[idx[i+2]].Pos, + v[idx[i+0]].TCoords, + v[idx[i+1]].TCoords, + v[idx[i+2]].TCoords); + if (recalculateNormals) + v[idx[i+0]].Normal=localNormal; + + calculateTangents( + localNormal, + v[idx[i+1]].Tangent, + v[idx[i+1]].Binormal, + v[idx[i+1]].Pos, + v[idx[i+2]].Pos, + v[idx[i+0]].Pos, + v[idx[i+1]].TCoords, + v[idx[i+2]].TCoords, + v[idx[i+0]].TCoords); + if (recalculateNormals) + v[idx[i+1]].Normal=localNormal; + + calculateTangents( + localNormal, + v[idx[i+2]].Tangent, + v[idx[i+2]].Binormal, + v[idx[i+2]].Pos, + v[idx[i+0]].Pos, + v[idx[i+1]].Pos, + v[idx[i+2]].TCoords, + v[idx[i+0]].TCoords, + v[idx[i+1]].TCoords); + if (recalculateNormals) + v[idx[i+2]].Normal=localNormal; + } + } +} +} + + +//! Recalculates tangents for a tangent mesh buffer +void CMeshManipulator::recalculateTangents(IMeshBuffer* buffer, bool recalculateNormals, bool smooth, bool angleWeighted) const +{ + if (buffer && (buffer->getVertexType() == video::EVT_TANGENTS)) + { + if (buffer->getIndexType() == video::EIT_16BIT) + recalculateTangentsT<u16>(buffer, recalculateNormals, smooth, angleWeighted); + else + recalculateTangentsT<u32>(buffer, recalculateNormals, smooth, angleWeighted); + } +} + + +//! Recalculates tangents for all tangent mesh buffers +void CMeshManipulator::recalculateTangents(IMesh* mesh, bool recalculateNormals, bool smooth, bool angleWeighted) const +{ + if (!mesh) + return; + + const u32 meshBufferCount = mesh->getMeshBufferCount(); + for (u32 b=0; b<meshBufferCount; ++b) + { + recalculateTangents(mesh->getMeshBuffer(b), recalculateNormals, smooth, angleWeighted); + } +} + + +namespace +{ +//! Creates a planar texture mapping on the meshbuffer +template<typename T> +void makePlanarTextureMappingT(scene::IMeshBuffer* buffer, f32 resolution) +{ + u32 idxcnt = buffer->getIndexCount(); + T* idx = reinterpret_cast<T*>(buffer->getIndices()); + + for (u32 i=0; i<idxcnt; i+=3) + { + core::plane3df p(buffer->getPosition(idx[i+0]), buffer->getPosition(idx[i+1]), buffer->getPosition(idx[i+2])); + p.Normal.X = fabsf(p.Normal.X); + p.Normal.Y = fabsf(p.Normal.Y); + p.Normal.Z = fabsf(p.Normal.Z); + // calculate planar mapping worldspace coordinates + + if (p.Normal.X > p.Normal.Y && p.Normal.X > p.Normal.Z) + { + for (u32 o=0; o!=3; ++o) + { + buffer->getTCoords(idx[i+o]).X = buffer->getPosition(idx[i+o]).Y * resolution; + buffer->getTCoords(idx[i+o]).Y = buffer->getPosition(idx[i+o]).Z * resolution; + } + } + else + if (p.Normal.Y > p.Normal.X && p.Normal.Y > p.Normal.Z) + { + for (u32 o=0; o!=3; ++o) + { + buffer->getTCoords(idx[i+o]).X = buffer->getPosition(idx[i+o]).X * resolution; + buffer->getTCoords(idx[i+o]).Y = buffer->getPosition(idx[i+o]).Z * resolution; + } + } + else + { + for (u32 o=0; o!=3; ++o) + { + buffer->getTCoords(idx[i+o]).X = buffer->getPosition(idx[i+o]).X * resolution; + buffer->getTCoords(idx[i+o]).Y = buffer->getPosition(idx[i+o]).Y * resolution; + } + } + } +} +} + + +//! Creates a planar texture mapping on the meshbuffer +void CMeshManipulator::makePlanarTextureMapping(scene::IMeshBuffer* buffer, f32 resolution) const +{ + if (!buffer) + return; + + if (buffer->getIndexType()==video::EIT_16BIT) + makePlanarTextureMappingT<u16>(buffer, resolution); + else + makePlanarTextureMappingT<u32>(buffer, resolution); +} + + +//! Creates a planar texture mapping on the mesh +void CMeshManipulator::makePlanarTextureMapping(scene::IMesh* mesh, f32 resolution) const +{ + if (!mesh) + return; + + const u32 bcount = mesh->getMeshBufferCount(); + for ( u32 b=0; b<bcount; ++b) + { + makePlanarTextureMapping(mesh->getMeshBuffer(b), resolution); + } +} + + +namespace +{ +//! Creates a planar texture mapping on the meshbuffer +template <typename T> +void makePlanarTextureMappingT(scene::IMeshBuffer* buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) +{ + u32 idxcnt = buffer->getIndexCount(); + T* idx = reinterpret_cast<T*>(buffer->getIndices()); + + for (u32 i=0; i<idxcnt; i+=3) + { + // calculate planar mapping worldspace coordinates + if (axis==0) + { + for (u32 o=0; o!=3; ++o) + { + buffer->getTCoords(idx[i+o]).X = 0.5f+(buffer->getPosition(idx[i+o]).Z + offset.Z) * resolutionS; + buffer->getTCoords(idx[i+o]).Y = 0.5f-(buffer->getPosition(idx[i+o]).Y + offset.Y) * resolutionT; + } + } + else if (axis==1) + { + for (u32 o=0; o!=3; ++o) + { + buffer->getTCoords(idx[i+o]).X = 0.5f+(buffer->getPosition(idx[i+o]).X + offset.X) * resolutionS; + buffer->getTCoords(idx[i+o]).Y = 1.f-(buffer->getPosition(idx[i+o]).Z + offset.Z) * resolutionT; + } + } + else if (axis==2) + { + for (u32 o=0; o!=3; ++o) + { + buffer->getTCoords(idx[i+o]).X = 0.5f+(buffer->getPosition(idx[i+o]).X + offset.X) * resolutionS; + buffer->getTCoords(idx[i+o]).Y = 0.5f-(buffer->getPosition(idx[i+o]).Y + offset.Y) * resolutionT; + } + } + } +} +} + + +//! Creates a planar texture mapping on the meshbuffer +void CMeshManipulator::makePlanarTextureMapping(scene::IMeshBuffer* buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const +{ + if (!buffer) + return; + + if (buffer->getIndexType()==video::EIT_16BIT) + makePlanarTextureMappingT<u16>(buffer, resolutionS, resolutionT, axis, offset); + else + makePlanarTextureMappingT<u32>(buffer, resolutionS, resolutionT, axis, offset); +} + + +//! Creates a planar texture mapping on the mesh +void CMeshManipulator::makePlanarTextureMapping(scene::IMesh* mesh, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const +{ + if (!mesh) + return; + + const u32 bcount = mesh->getMeshBufferCount(); + for ( u32 b=0; b<bcount; ++b) + { + makePlanarTextureMapping(mesh->getMeshBuffer(b), resolutionS, resolutionT, axis, offset); + } +} + + +//! Clones a static IMesh into a modifyable SMesh. +// not yet 32bit +SMesh* CMeshManipulator::createMeshCopy(scene::IMesh* mesh) const +{ + if (!mesh) + return 0; + + SMesh* clone = new SMesh(); + + const u32 meshBufferCount = mesh->getMeshBufferCount(); + + for ( u32 b=0; b<meshBufferCount; ++b) + { + const IMeshBuffer* const mb = mesh->getMeshBuffer(b); + switch(mb->getVertexType()) + { + case video::EVT_STANDARD: + { + SMeshBuffer* buffer = new SMeshBuffer(); + buffer->Material = mb->getMaterial(); + const u32 vcount = mb->getVertexCount(); + buffer->Vertices.reallocate(vcount); + video::S3DVertex* vertices = (video::S3DVertex*)mb->getVertices(); + for (u32 i=0; i < vcount; ++i) + buffer->Vertices.push_back(vertices[i]); + const u32 icount = mb->getIndexCount(); + buffer->Indices.reallocate(icount); + const u16* indices = mb->getIndices(); + for (u32 i=0; i < icount; ++i) + buffer->Indices.push_back(indices[i]); + clone->addMeshBuffer(buffer); + buffer->drop(); + } + break; + case video::EVT_2TCOORDS: + { + SMeshBufferLightMap* buffer = new SMeshBufferLightMap(); + buffer->Material = mb->getMaterial(); + const u32 vcount = mb->getVertexCount(); + buffer->Vertices.reallocate(vcount); + video::S3DVertex2TCoords* vertices = (video::S3DVertex2TCoords*)mb->getVertices(); + for (u32 i=0; i < vcount; ++i) + buffer->Vertices.push_back(vertices[i]); + const u32 icount = mb->getIndexCount(); + buffer->Indices.reallocate(icount); + const u16* indices = mb->getIndices(); + for (u32 i=0; i < icount; ++i) + buffer->Indices.push_back(indices[i]); + clone->addMeshBuffer(buffer); + buffer->drop(); + } + break; + case video::EVT_TANGENTS: + { + SMeshBufferTangents* buffer = new SMeshBufferTangents(); + buffer->Material = mb->getMaterial(); + const u32 vcount = mb->getVertexCount(); + buffer->Vertices.reallocate(vcount); + video::S3DVertexTangents* vertices = (video::S3DVertexTangents*)mb->getVertices(); + for (u32 i=0; i < vcount; ++i) + buffer->Vertices.push_back(vertices[i]); + const u32 icount = mb->getIndexCount(); + buffer->Indices.reallocate(icount); + const u16* indices = mb->getIndices(); + for (u32 i=0; i < icount; ++i) + buffer->Indices.push_back(indices[i]); + clone->addMeshBuffer(buffer); + buffer->drop(); + } + break; + }// end switch + + }// end for all mesh buffers + + clone->BoundingBox = mesh->getBoundingBox(); + return clone; +} + + +//! Creates a copy of the mesh, which will only consist of unique primitives +// not yet 32bit +IMesh* CMeshManipulator::createMeshUniquePrimitives(IMesh* mesh) const +{ + if (!mesh) + return 0; + + SMesh* clone = new SMesh(); + + const u32 meshBufferCount = mesh->getMeshBufferCount(); + + for ( u32 b=0; b<meshBufferCount; ++b) + { + const IMeshBuffer* const mb = mesh->getMeshBuffer(b); + const s32 idxCnt = mb->getIndexCount(); + const u16* idx = mb->getIndices(); + + switch(mb->getVertexType()) + { + case video::EVT_STANDARD: + { + SMeshBuffer* buffer = new SMeshBuffer(); + buffer->Material = mb->getMaterial(); + + video::S3DVertex* v = + (video::S3DVertex*)mb->getVertices(); + + buffer->Vertices.reallocate(idxCnt); + buffer->Indices.reallocate(idxCnt); + for (s32 i=0; i<idxCnt; i += 3) + { + buffer->Vertices.push_back( v[idx[i + 0 ]] ); + buffer->Vertices.push_back( v[idx[i + 1 ]] ); + buffer->Vertices.push_back( v[idx[i + 2 ]] ); + + buffer->Indices.push_back( i + 0 ); + buffer->Indices.push_back( i + 1 ); + buffer->Indices.push_back( i + 2 ); + } + + buffer->setBoundingBox(mb->getBoundingBox()); + clone->addMeshBuffer(buffer); + buffer->drop(); + } + break; + case video::EVT_2TCOORDS: + { + SMeshBufferLightMap* buffer = new SMeshBufferLightMap(); + buffer->Material = mb->getMaterial(); + + video::S3DVertex2TCoords* v = + (video::S3DVertex2TCoords*)mb->getVertices(); + + buffer->Vertices.reallocate(idxCnt); + buffer->Indices.reallocate(idxCnt); + for (s32 i=0; i<idxCnt; i += 3) + { + buffer->Vertices.push_back( v[idx[i + 0 ]] ); + buffer->Vertices.push_back( v[idx[i + 1 ]] ); + buffer->Vertices.push_back( v[idx[i + 2 ]] ); + + buffer->Indices.push_back( i + 0 ); + buffer->Indices.push_back( i + 1 ); + buffer->Indices.push_back( i + 2 ); + } + buffer->setBoundingBox(mb->getBoundingBox()); + clone->addMeshBuffer(buffer); + buffer->drop(); + } + break; + case video::EVT_TANGENTS: + { + SMeshBufferTangents* buffer = new SMeshBufferTangents(); + buffer->Material = mb->getMaterial(); + + video::S3DVertexTangents* v = + (video::S3DVertexTangents*)mb->getVertices(); + + buffer->Vertices.reallocate(idxCnt); + buffer->Indices.reallocate(idxCnt); + for (s32 i=0; i<idxCnt; i += 3) + { + buffer->Vertices.push_back( v[idx[i + 0 ]] ); + buffer->Vertices.push_back( v[idx[i + 1 ]] ); + buffer->Vertices.push_back( v[idx[i + 2 ]] ); + + buffer->Indices.push_back( i + 0 ); + buffer->Indices.push_back( i + 1 ); + buffer->Indices.push_back( i + 2 ); + } + + buffer->setBoundingBox(mb->getBoundingBox()); + clone->addMeshBuffer(buffer); + buffer->drop(); + } + break; + }// end switch + + }// end for all mesh buffers + + clone->BoundingBox = mesh->getBoundingBox(); + return clone; +} + + +//! Creates a copy of a mesh, which will have identical vertices welded together +// not yet 32bit +IMesh* CMeshManipulator::createMeshWelded(IMesh *mesh, f32 tolerance) const +{ + SMesh* clone = new SMesh(); + clone->BoundingBox = mesh->getBoundingBox(); + + core::array<u16> redirects; + + for (u32 b=0; b<mesh->getMeshBufferCount(); ++b) + { + const IMeshBuffer* const mb = mesh->getMeshBuffer(b); + // reset redirect list + redirects.set_used(mb->getVertexCount()); + + const u16* indices = 0; + u32 indexCount = 0; + core::array<u16>* outIdx = 0; + + switch(mb->getVertexType()) + { + case video::EVT_STANDARD: + { + SMeshBuffer* buffer = new SMeshBuffer(); + buffer->BoundingBox = mb->getBoundingBox(); + buffer->Material = mb->getMaterial(); + clone->addMeshBuffer(buffer); + buffer->drop(); + + video::S3DVertex* v = + (video::S3DVertex*)mb->getVertices(); + + u32 vertexCount = mb->getVertexCount(); + + indices = mb->getIndices(); + indexCount = mb->getIndexCount(); + outIdx = &buffer->Indices; + + buffer->Vertices.reallocate(vertexCount); + + for (u32 i=0; i < vertexCount; ++i) + { + bool found = false; + for (u32 j=0; j < i; ++j) + { + if ( v[i].Pos.equals( v[j].Pos, tolerance) && + v[i].Normal.equals( v[j].Normal, tolerance) && + v[i].TCoords.equals( v[j].TCoords ) && + (v[i].Color == v[j].Color) ) + { + redirects[i] = redirects[j]; + found = true; + break; + } + } + if (!found) + { + redirects[i] = buffer->Vertices.size(); + buffer->Vertices.push_back(v[i]); + } + } + + break; + } + case video::EVT_2TCOORDS: + { + SMeshBufferLightMap* buffer = new SMeshBufferLightMap(); + buffer->BoundingBox = mb->getBoundingBox(); + buffer->Material = mb->getMaterial(); + clone->addMeshBuffer(buffer); + buffer->drop(); + + video::S3DVertex2TCoords* v = + (video::S3DVertex2TCoords*)mb->getVertices(); + + u32 vertexCount = mb->getVertexCount(); + + indices = mb->getIndices(); + indexCount = mb->getIndexCount(); + outIdx = &buffer->Indices; + + buffer->Vertices.reallocate(vertexCount); + + for (u32 i=0; i < vertexCount; ++i) + { + bool found = false; + for (u32 j=0; j < i; ++j) + { + if ( v[i].Pos.equals( v[j].Pos, tolerance) && + v[i].Normal.equals( v[j].Normal, tolerance) && + v[i].TCoords.equals( v[j].TCoords ) && + v[i].TCoords2.equals( v[j].TCoords2 ) && + (v[i].Color == v[j].Color) ) + { + redirects[i] = redirects[j]; + found = true; + break; + } + } + if (!found) + { + redirects[i] = buffer->Vertices.size(); + buffer->Vertices.push_back(v[i]); + } + } + break; + } + case video::EVT_TANGENTS: + { + SMeshBufferTangents* buffer = new SMeshBufferTangents(); + buffer->BoundingBox = mb->getBoundingBox(); + buffer->Material = mb->getMaterial(); + clone->addMeshBuffer(buffer); + buffer->drop(); + + video::S3DVertexTangents* v = + (video::S3DVertexTangents*)mb->getVertices(); + + u32 vertexCount = mb->getVertexCount(); + + indices = mb->getIndices(); + indexCount = mb->getIndexCount(); + outIdx = &buffer->Indices; + + buffer->Vertices.reallocate(vertexCount); + + for (u32 i=0; i < vertexCount; ++i) + { + bool found = false; + for (u32 j=0; j < i; ++j) + { + if ( v[i].Pos.equals( v[j].Pos, tolerance) && + v[i].Normal.equals( v[j].Normal, tolerance) && + v[i].TCoords.equals( v[j].TCoords ) && + v[i].Tangent.equals( v[j].Tangent, tolerance ) && + v[i].Binormal.equals( v[j].Binormal, tolerance ) && + (v[i].Color == v[j].Color) ) + { + redirects[i] = redirects[j]; + found = true; + break; + } + } + if (!found) + { + redirects[i] = buffer->Vertices.size(); + buffer->Vertices.push_back(v[i]); + } + } + break; + } + default: + os::Printer::log("Cannot create welded mesh, vertex type unsupported", ELL_ERROR); + break; + } + + // write the buffer's index list + core::array<u16> &Indices = *outIdx; + + Indices.set_used(indexCount); + for (u32 i=0; i<indexCount; ++i) + { + Indices[i] = redirects[ indices[i] ]; + } + } + return clone; +} + + +//! Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. +// not yet 32bit +IMesh* CMeshManipulator::createMeshWithTangents(IMesh* mesh, bool recalculateNormals, bool smooth, bool angleWeighted, bool calculateTangents) const +{ + if (!mesh) + return 0; + + // copy mesh and fill data into SMeshBufferTangents + + SMesh* clone = new SMesh(); + const u32 meshBufferCount = mesh->getMeshBufferCount(); + + for (u32 b=0; b<meshBufferCount; ++b) + { + const IMeshBuffer* const original = mesh->getMeshBuffer(b); + const u32 idxCnt = original->getIndexCount(); + const u16* idx = original->getIndices(); + + SMeshBufferTangents* buffer = new SMeshBufferTangents(); + + buffer->Material = original->getMaterial(); + buffer->Vertices.reallocate(idxCnt); + buffer->Indices.reallocate(idxCnt); + + core::map<video::S3DVertexTangents, int> vertMap; + int vertLocation; + + // copy vertices + + const video::E_VERTEX_TYPE vType = original->getVertexType(); + video::S3DVertexTangents vNew; + for (u32 i=0; i<idxCnt; ++i) + { + switch(vType) + { + case video::EVT_STANDARD: + { + const video::S3DVertex* v = + (const video::S3DVertex*)original->getVertices(); + vNew = video::S3DVertexTangents( + v[idx[i]].Pos, v[idx[i]].Normal, v[idx[i]].Color, v[idx[i]].TCoords); + } + break; + case video::EVT_2TCOORDS: + { + const video::S3DVertex2TCoords* v = + (const video::S3DVertex2TCoords*)original->getVertices(); + vNew = video::S3DVertexTangents( + v[idx[i]].Pos, v[idx[i]].Normal, v[idx[i]].Color, v[idx[i]].TCoords); + } + break; + case video::EVT_TANGENTS: + { + const video::S3DVertexTangents* v = + (const video::S3DVertexTangents*)original->getVertices(); + vNew = v[idx[i]]; + } + break; + } + core::map<video::S3DVertexTangents, int>::Node* n = vertMap.find(vNew); + if (n) + { + vertLocation = n->getValue(); + } + else + { + vertLocation = buffer->Vertices.size(); + buffer->Vertices.push_back(vNew); + vertMap.insert(vNew, vertLocation); + } + + // create new indices + buffer->Indices.push_back(vertLocation); + } + buffer->recalculateBoundingBox(); + + // add new buffer + clone->addMeshBuffer(buffer); + buffer->drop(); + } + + clone->recalculateBoundingBox(); + if (calculateTangents) + recalculateTangents(clone, recalculateNormals, smooth, angleWeighted); + + return clone; +} + + +//! Creates a copy of the mesh, which will only consist of S3DVertex2TCoords vertices. +// not yet 32bit +IMesh* CMeshManipulator::createMeshWith2TCoords(IMesh* mesh) const +{ + if (!mesh) + return 0; + + // copy mesh and fill data into SMeshBufferLightMap + + SMesh* clone = new SMesh(); + const u32 meshBufferCount = mesh->getMeshBufferCount(); + + for (u32 b=0; b<meshBufferCount; ++b) + { + const IMeshBuffer* const original = mesh->getMeshBuffer(b); + const u32 idxCnt = original->getIndexCount(); + const u16* idx = original->getIndices(); + + SMeshBufferLightMap* buffer = new SMeshBufferLightMap(); + buffer->Material = original->getMaterial(); + buffer->Vertices.reallocate(idxCnt); + buffer->Indices.reallocate(idxCnt); + + core::map<video::S3DVertex2TCoords, int> vertMap; + int vertLocation; + + // copy vertices + + const video::E_VERTEX_TYPE vType = original->getVertexType(); + video::S3DVertex2TCoords vNew; + for (u32 i=0; i<idxCnt; ++i) + { + switch(vType) + { + case video::EVT_STANDARD: + { + const video::S3DVertex* v = + (const video::S3DVertex*)original->getVertices(); + vNew = video::S3DVertex2TCoords( + v[idx[i]].Pos, v[idx[i]].Normal, v[idx[i]].Color, v[idx[i]].TCoords, v[idx[i]].TCoords); + } + break; + case video::EVT_2TCOORDS: + { + const video::S3DVertex2TCoords* v = + (const video::S3DVertex2TCoords*)original->getVertices(); + vNew = v[idx[i]]; + } + break; + case video::EVT_TANGENTS: + { + const video::S3DVertexTangents* v = + (const video::S3DVertexTangents*)original->getVertices(); + vNew = video::S3DVertex2TCoords( + v[idx[i]].Pos, v[idx[i]].Normal, v[idx[i]].Color, v[idx[i]].TCoords, v[idx[i]].TCoords); + } + break; + } + core::map<video::S3DVertex2TCoords, int>::Node* n = vertMap.find(vNew); + if (n) + { + vertLocation = n->getValue(); + } + else + { + vertLocation = buffer->Vertices.size(); + buffer->Vertices.push_back(vNew); + vertMap.insert(vNew, vertLocation); + } + + // create new indices + buffer->Indices.push_back(vertLocation); + } + buffer->recalculateBoundingBox(); + + // add new buffer + clone->addMeshBuffer(buffer); + buffer->drop(); + } + + clone->recalculateBoundingBox(); + return clone; +} + + +//! Creates a copy of the mesh, which will only consist of S3DVertex vertices. +// not yet 32bit +IMesh* CMeshManipulator::createMeshWith1TCoords(IMesh* mesh) const +{ + if (!mesh) + return 0; + + // copy mesh and fill data into SMeshBuffer + SMesh* clone = new SMesh(); + const u32 meshBufferCount = mesh->getMeshBufferCount(); + + for (u32 b=0; b<meshBufferCount; ++b) + { + IMeshBuffer* original = mesh->getMeshBuffer(b); + const u32 idxCnt = original->getIndexCount(); + const u16* idx = original->getIndices(); + + SMeshBuffer* buffer = new SMeshBuffer(); + buffer->Material = original->getMaterial(); + buffer->Vertices.reallocate(idxCnt); + buffer->Indices.reallocate(idxCnt); + + core::map<video::S3DVertex, int> vertMap; + int vertLocation; + + // copy vertices + const video::E_VERTEX_TYPE vType = original->getVertexType(); + video::S3DVertex vNew; + for (u32 i=0; i<idxCnt; ++i) + { + switch(vType) + { + case video::EVT_STANDARD: + { + video::S3DVertex* v = + (video::S3DVertex*)original->getVertices(); + vNew = v[idx[i]]; + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords* v = + (video::S3DVertex2TCoords*)original->getVertices(); + vNew = video::S3DVertex( + v[idx[i]].Pos, v[idx[i]].Normal, v[idx[i]].Color, v[idx[i]].TCoords); + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents* v = + (video::S3DVertexTangents*)original->getVertices(); + vNew = video::S3DVertex( + v[idx[i]].Pos, v[idx[i]].Normal, v[idx[i]].Color, v[idx[i]].TCoords); + } + break; + } + core::map<video::S3DVertex, int>::Node* n = vertMap.find(vNew); + if (n) + { + vertLocation = n->getValue(); + } + else + { + vertLocation = buffer->Vertices.size(); + buffer->Vertices.push_back(vNew); + vertMap.insert(vNew, vertLocation); + } + + // create new indices + buffer->Indices.push_back(vertLocation); + } + buffer->recalculateBoundingBox(); + // add new buffer + clone->addMeshBuffer(buffer); + buffer->drop(); + } + + clone->recalculateBoundingBox(); + return clone; +} + + +//! Returns amount of polygons in mesh. +s32 CMeshManipulator::getPolyCount(scene::IMesh* mesh) const +{ + if (!mesh) + return 0; + + s32 trianglecount = 0; + + for (u32 g=0; g<mesh->getMeshBufferCount(); ++g) + trianglecount += mesh->getMeshBuffer(g)->getIndexCount() / 3; + + return trianglecount; +} + + +//! Returns amount of polygons in mesh. +s32 CMeshManipulator::getPolyCount(scene::IAnimatedMesh* mesh) const +{ + if (mesh && mesh->getFrameCount() != 0) + return getPolyCount(mesh->getMesh(0)); + + return 0; +} + + +//! create a new AnimatedMesh and adds the mesh to it +IAnimatedMesh * CMeshManipulator::createAnimatedMesh(scene::IMesh* mesh, scene::E_ANIMATED_MESH_TYPE type) const +{ + return new SAnimatedMesh(mesh, type); +} + +namespace +{ + +struct vcache +{ + core::array<u32> tris; + float score; + s16 cachepos; + u16 NumActiveTris; +}; + +struct tcache +{ + u16 ind[3]; + float score; + bool drawn; +}; + +const u16 cachesize = 32; + +float FindVertexScore(vcache *v) +{ + const float CacheDecayPower = 1.5f; + const float LastTriScore = 0.75f; + const float ValenceBoostScale = 2.0f; + const float ValenceBoostPower = 0.5f; + const float MaxSizeVertexCache = 32.0f; + + if (v->NumActiveTris == 0) + { + // No tri needs this vertex! + return -1.0f; + } + + float Score = 0.0f; + int CachePosition = v->cachepos; + if (CachePosition < 0) + { + // Vertex is not in FIFO cache - no score. + } + else + { + if (CachePosition < 3) + { + // This vertex was used in the last triangle, + // so it has a fixed score. + Score = LastTriScore; + } + else + { + // Points for being high in the cache. + const float Scaler = 1.0f / (MaxSizeVertexCache - 3); + Score = 1.0f - (CachePosition - 3) * Scaler; + Score = powf(Score, CacheDecayPower); + } + } + + // Bonus points for having a low number of tris still to + // use the vert, so we get rid of lone verts quickly. + float ValenceBoost = powf(v->NumActiveTris, + -ValenceBoostPower); + Score += ValenceBoostScale * ValenceBoost; + + return Score; +} + +/* + A specialized LRU cache for the Forsyth algorithm. +*/ + +class f_lru +{ + +public: + f_lru(vcache *v, tcache *t): vc(v), tc(t) + { + for (u16 i = 0; i < cachesize; i++) + { + cache[i] = -1; + } + } + + // Adds this vertex index and returns the highest-scoring triangle index + u32 add(u16 vert, bool updatetris = false) + { + bool found = false; + + // Mark existing pos as empty + for (u16 i = 0; i < cachesize; i++) + { + if (cache[i] == vert) + { + // Move everything down + for (u16 j = i; j; j--) + { + cache[j] = cache[j - 1]; + } + + found = true; + break; + } + } + + if (!found) + { + if (cache[cachesize-1] != -1) + vc[cache[cachesize-1]].cachepos = -1; + + // Move everything down + for (u16 i = cachesize - 1; i; i--) + { + cache[i] = cache[i - 1]; + } + } + + cache[0] = vert; + + u32 highest = 0; + float hiscore = 0; + + if (updatetris) + { + // Update cache positions + for (u16 i = 0; i < cachesize; i++) + { + if (cache[i] == -1) + break; + + vc[cache[i]].cachepos = i; + vc[cache[i]].score = FindVertexScore(&vc[cache[i]]); + } + + // Update triangle scores + for (u16 i = 0; i < cachesize; i++) + { + if (cache[i] == -1) + break; + + const u16 trisize = vc[cache[i]].tris.size(); + for (u16 t = 0; t < trisize; t++) + { + tcache *tri = &tc[vc[cache[i]].tris[t]]; + + tri->score = + vc[tri->ind[0]].score + + vc[tri->ind[1]].score + + vc[tri->ind[2]].score; + + if (tri->score > hiscore) + { + hiscore = tri->score; + highest = vc[cache[i]].tris[t]; + } + } + } + } + + return highest; + } + +private: + s32 cache[cachesize]; + vcache *vc; + tcache *tc; +}; + +} // end anonymous namespace + +/** +Vertex cache optimization according to the Forsyth paper: +http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html + +The function is thread-safe (read: you can optimize several meshes in different threads) + +\param mesh Source mesh for the operation. */ +IMesh* CMeshManipulator::createForsythOptimizedMesh(const IMesh *mesh) const +{ + if (!mesh) + return 0; + + SMesh *newmesh = new SMesh(); + newmesh->BoundingBox = mesh->getBoundingBox(); + + const u32 mbcount = mesh->getMeshBufferCount(); + + for (u32 b = 0; b < mbcount; ++b) + { + const IMeshBuffer *mb = mesh->getMeshBuffer(b); + + if (mb->getIndexType() != video::EIT_16BIT) + { + os::Printer::log("Cannot optimize a mesh with 32bit indices", ELL_ERROR); + newmesh->drop(); + return 0; + } + + const u32 icount = mb->getIndexCount(); + const u32 tcount = icount / 3; + const u32 vcount = mb->getVertexCount(); + const u16 *ind = mb->getIndices(); + + vcache *vc = new vcache[vcount]; + tcache *tc = new tcache[tcount]; + + f_lru lru(vc, tc); + + // init + for (u16 i = 0; i < vcount; i++) + { + vc[i].score = 0; + vc[i].cachepos = -1; + vc[i].NumActiveTris = 0; + } + + // First pass: count how many times a vert is used + for (u32 i = 0; i < icount; i += 3) + { + vc[ind[i]].NumActiveTris++; + vc[ind[i + 1]].NumActiveTris++; + vc[ind[i + 2]].NumActiveTris++; + + const u32 tri_ind = i/3; + tc[tri_ind].ind[0] = ind[i]; + tc[tri_ind].ind[1] = ind[i + 1]; + tc[tri_ind].ind[2] = ind[i + 2]; + } + + // Second pass: list of each triangle + for (u32 i = 0; i < tcount; i++) + { + vc[tc[i].ind[0]].tris.push_back(i); + vc[tc[i].ind[1]].tris.push_back(i); + vc[tc[i].ind[2]].tris.push_back(i); + + tc[i].drawn = false; + } + + // Give initial scores + for (u16 i = 0; i < vcount; i++) + { + vc[i].score = FindVertexScore(&vc[i]); + } + for (u32 i = 0; i < tcount; i++) + { + tc[i].score = + vc[tc[i].ind[0]].score + + vc[tc[i].ind[1]].score + + vc[tc[i].ind[2]].score; + } + + switch(mb->getVertexType()) + { + case video::EVT_STANDARD: + { + video::S3DVertex *v = (video::S3DVertex *) mb->getVertices(); + + SMeshBuffer *buf = new SMeshBuffer(); + buf->Material = mb->getMaterial(); + + buf->Vertices.reallocate(vcount); + buf->Indices.reallocate(icount); + + core::map<const video::S3DVertex, const u16> sind; // search index for fast operation + typedef core::map<const video::S3DVertex, const u16>::Node snode; + + // Main algorithm + u32 highest = 0; + u32 drawcalls = 0; + for (;;) + { + if (tc[highest].drawn) + { + bool found = false; + float hiscore = 0; + for (u32 t = 0; t < tcount; t++) + { + if (!tc[t].drawn) + { + if (tc[t].score > hiscore) + { + highest = t; + hiscore = tc[t].score; + found = true; + } + } + } + if (!found) + break; + } + + // Output the best triangle + u16 newind = buf->Vertices.size(); + + snode *s = sind.find(v[tc[highest].ind[0]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[0]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[0]], newind); + newind++; + } + else + { + buf->Indices.push_back(s->getValue()); + } + + s = sind.find(v[tc[highest].ind[1]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[1]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[1]], newind); + newind++; + } + else + { + buf->Indices.push_back(s->getValue()); + } + + s = sind.find(v[tc[highest].ind[2]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[2]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[2]], newind); + } + else + { + buf->Indices.push_back(s->getValue()); + } + + vc[tc[highest].ind[0]].NumActiveTris--; + vc[tc[highest].ind[1]].NumActiveTris--; + vc[tc[highest].ind[2]].NumActiveTris--; + + tc[highest].drawn = true; + + for (u16 j = 0; j < 3; j++) + { + vcache *vert = &vc[tc[highest].ind[j]]; + for (u16 t = 0; t < vert->tris.size(); t++) + { + if (highest == vert->tris[t]) + { + vert->tris.erase(t); + break; + } + } + } + + lru.add(tc[highest].ind[0]); + lru.add(tc[highest].ind[1]); + highest = lru.add(tc[highest].ind[2], true); + drawcalls++; + } + + buf->setBoundingBox(mb->getBoundingBox()); + newmesh->addMeshBuffer(buf); + buf->drop(); + } + break; + case video::EVT_2TCOORDS: + { + video::S3DVertex2TCoords *v = (video::S3DVertex2TCoords *) mb->getVertices(); + + SMeshBufferLightMap *buf = new SMeshBufferLightMap(); + buf->Material = mb->getMaterial(); + + buf->Vertices.reallocate(vcount); + buf->Indices.reallocate(icount); + + core::map<const video::S3DVertex2TCoords, const u16> sind; // search index for fast operation + typedef core::map<const video::S3DVertex2TCoords, const u16>::Node snode; + + // Main algorithm + u32 highest = 0; + u32 drawcalls = 0; + for (;;) + { + if (tc[highest].drawn) + { + bool found = false; + float hiscore = 0; + for (u32 t = 0; t < tcount; t++) + { + if (!tc[t].drawn) + { + if (tc[t].score > hiscore) + { + highest = t; + hiscore = tc[t].score; + found = true; + } + } + } + if (!found) + break; + } + + // Output the best triangle + u16 newind = buf->Vertices.size(); + + snode *s = sind.find(v[tc[highest].ind[0]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[0]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[0]], newind); + newind++; + } + else + { + buf->Indices.push_back(s->getValue()); + } + + s = sind.find(v[tc[highest].ind[1]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[1]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[1]], newind); + newind++; + } + else + { + buf->Indices.push_back(s->getValue()); + } + + s = sind.find(v[tc[highest].ind[2]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[2]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[2]], newind); + } + else + { + buf->Indices.push_back(s->getValue()); + } + + vc[tc[highest].ind[0]].NumActiveTris--; + vc[tc[highest].ind[1]].NumActiveTris--; + vc[tc[highest].ind[2]].NumActiveTris--; + + tc[highest].drawn = true; + + for (u16 j = 0; j < 3; j++) + { + vcache *vert = &vc[tc[highest].ind[j]]; + for (u16 t = 0; t < vert->tris.size(); t++) + { + if (highest == vert->tris[t]) + { + vert->tris.erase(t); + break; + } + } + } + + lru.add(tc[highest].ind[0]); + lru.add(tc[highest].ind[1]); + highest = lru.add(tc[highest].ind[2]); + drawcalls++; + } + + buf->setBoundingBox(mb->getBoundingBox()); + newmesh->addMeshBuffer(buf); + buf->drop(); + + } + break; + case video::EVT_TANGENTS: + { + video::S3DVertexTangents *v = (video::S3DVertexTangents *) mb->getVertices(); + + SMeshBufferTangents *buf = new SMeshBufferTangents(); + buf->Material = mb->getMaterial(); + + buf->Vertices.reallocate(vcount); + buf->Indices.reallocate(icount); + + core::map<const video::S3DVertexTangents, const u16> sind; // search index for fast operation + typedef core::map<const video::S3DVertexTangents, const u16>::Node snode; + + // Main algorithm + u32 highest = 0; + u32 drawcalls = 0; + for (;;) + { + if (tc[highest].drawn) + { + bool found = false; + float hiscore = 0; + for (u32 t = 0; t < tcount; t++) + { + if (!tc[t].drawn) + { + if (tc[t].score > hiscore) + { + highest = t; + hiscore = tc[t].score; + found = true; + } + } + } + if (!found) + break; + } + + // Output the best triangle + u16 newind = buf->Vertices.size(); + + snode *s = sind.find(v[tc[highest].ind[0]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[0]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[0]], newind); + newind++; + } + else + { + buf->Indices.push_back(s->getValue()); + } + + s = sind.find(v[tc[highest].ind[1]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[1]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[1]], newind); + newind++; + } + else + { + buf->Indices.push_back(s->getValue()); + } + + s = sind.find(v[tc[highest].ind[2]]); + + if (!s) + { + buf->Vertices.push_back(v[tc[highest].ind[2]]); + buf->Indices.push_back(newind); + sind.insert(v[tc[highest].ind[2]], newind); + } + else + { + buf->Indices.push_back(s->getValue()); + } + + vc[tc[highest].ind[0]].NumActiveTris--; + vc[tc[highest].ind[1]].NumActiveTris--; + vc[tc[highest].ind[2]].NumActiveTris--; + + tc[highest].drawn = true; + + for (u16 j = 0; j < 3; j++) + { + vcache *vert = &vc[tc[highest].ind[j]]; + for (u16 t = 0; t < vert->tris.size(); t++) + { + if (highest == vert->tris[t]) + { + vert->tris.erase(t); + break; + } + } + } + + lru.add(tc[highest].ind[0]); + lru.add(tc[highest].ind[1]); + highest = lru.add(tc[highest].ind[2]); + drawcalls++; + } + + buf->setBoundingBox(mb->getBoundingBox()); + newmesh->addMeshBuffer(buf); + buf->drop(); + } + break; + } + + delete [] vc; + delete [] tc; + + } // for each meshbuffer + + return newmesh; +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.h new file mode 100644 index 0000000..c8029be --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshManipulator.h @@ -0,0 +1,95 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MESH_MANIPULATOR_H_INCLUDED__ +#define __C_MESH_MANIPULATOR_H_INCLUDED__ + +#include "IMeshManipulator.h" + +namespace irr +{ +namespace scene +{ + +//! An interface for easy manipulation of meshes. +/** Scale, set alpha value, flip surfaces, and so on. This exists for fixing +problems with wrong imported or exported meshes quickly after loading. It is +not intended for doing mesh modifications and/or animations during runtime. +*/ +class CMeshManipulator : public IMeshManipulator +{ +public: + //! Flips the direction of surfaces. + /** Changes backfacing triangles to frontfacing triangles and vice versa. + \param mesh: Mesh on which the operation is performed. */ + virtual void flipSurfaces(scene::IMesh* mesh) const; + + //! Recalculates all normals of the mesh. + /** \param mesh: Mesh on which the operation is performed. + \param smooth: Whether to use smoothed normals. */ + virtual void recalculateNormals(scene::IMesh* mesh, bool smooth = false, bool angleWeighted = false) const; + + //! Recalculates all normals of the mesh buffer. + /** \param buffer: Mesh buffer on which the operation is performed. + \param smooth: Whether to use smoothed normals. */ + virtual void recalculateNormals(IMeshBuffer* buffer, bool smooth = false, bool angleWeighted = false) const; + + //! Clones a static IMesh into a modifiable SMesh. + virtual SMesh* createMeshCopy(scene::IMesh* mesh) const; + + //! Creates a planar texture mapping on the mesh + /** \param mesh: Mesh on which the operation is performed. + \param resolution: resolution of the planar mapping. This is the value + specifying which is the relation between world space and + texture coordinate space. */ + virtual void makePlanarTextureMapping(scene::IMesh* mesh, f32 resolution=0.001f) const; + + //! Creates a planar texture mapping on the meshbuffer + virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const; + + //! Creates a planar texture mapping on the meshbuffer + void makePlanarTextureMapping(scene::IMeshBuffer* buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const; + + //! Creates a planar texture mapping on the mesh + void makePlanarTextureMapping(scene::IMesh* mesh, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const; + + //! Recalculates tangents, requires a tangent mesh buffer + virtual void recalculateTangents(IMeshBuffer* buffer, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const; + + //! Recalculates tangents, requires a tangent mesh + virtual void recalculateTangents(IMesh* mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const; + + //! Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. + virtual IMesh* createMeshWithTangents(IMesh* mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false, bool recalculateTangents=true) const; + + //! Creates a copy of the mesh, which will only consist of S3D2TCoords vertices. + virtual IMesh* createMeshWith2TCoords(IMesh* mesh) const; + + //! Creates a copy of the mesh, which will only consist of S3DVertex vertices. + virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const; + + //! Creates a copy of the mesh, which will only consist of unique triangles, i.e. no vertices are shared. + virtual IMesh* createMeshUniquePrimitives(IMesh* mesh) const; + + //! Creates a copy of the mesh, which will have all duplicated vertices removed, i.e. maximal amount of vertices are shared via indexing. + virtual IMesh* createMeshWelded(IMesh *mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const; + + //! Returns amount of polygons in mesh. + virtual s32 getPolyCount(scene::IMesh* mesh) const; + + //! Returns amount of polygons in mesh. + virtual s32 getPolyCount(scene::IAnimatedMesh* mesh) const; + + //! create a new AnimatedMesh and adds the mesh to it + virtual IAnimatedMesh * createAnimatedMesh(scene::IMesh* mesh,scene::E_ANIMATED_MESH_TYPE type) const; + + //! create a mesh optimized for the vertex cache + virtual IMesh* createForsythOptimizedMesh(const scene::IMesh *mesh) const; +}; + +} // end namespace scene +} // end namespace irr + + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.cpp new file mode 100644 index 0000000..5205b4d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.cpp @@ -0,0 +1,447 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMeshSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "S3DVertex.h" +#include "ICameraSceneNode.h" +#include "IMeshCache.h" +#include "IAnimatedMesh.h" +#include "IMaterialRenderer.h" +#include "IFileSystem.h" +#include "CShadowVolumeSceneNode.h" + +namespace irr +{ +namespace scene +{ + + + +//! constructor +CMeshSceneNode::CMeshSceneNode(IMesh* mesh, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::vector3df& rotation, + const core::vector3df& scale) +: IMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0), Shadow(0), + PassCount(0), ReadOnlyMaterials(false) +{ + #ifdef _DEBUG + setDebugName("CMeshSceneNode"); + #endif + + setMesh(mesh); +} + + +//! destructor +CMeshSceneNode::~CMeshSceneNode() +{ + if (Shadow) + Shadow->drop(); + if (Mesh) + Mesh->drop(); +} + + +//! frame +void CMeshSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + { + // because this node supports rendering of mixed mode meshes consisting of + // transparent and solid material at the same time, we need to go through all + // materials, check of what type they are and register this node for the right + // render pass according to that. + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + PassCount = 0; + int transparentCount = 0; + int solidCount = 0; + + // count transparent and solid materials in this scene node + if (ReadOnlyMaterials && Mesh) + { + // count mesh materials + + for (u32 i=0; i<Mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i); + video::IMaterialRenderer* rnd = mb ? driver->getMaterialRenderer(mb->getMaterial().MaterialType) : 0; + + if (rnd && rnd->isTransparent()) + ++transparentCount; + else + ++solidCount; + + if (solidCount && transparentCount) + break; + } + } + else + { + // count copied materials + + for (u32 i=0; i<Materials.size(); ++i) + { + video::IMaterialRenderer* rnd = + driver->getMaterialRenderer(Materials[i].MaterialType); + + if (rnd && rnd->isTransparent()) + ++transparentCount; + else + ++solidCount; + + if (solidCount && transparentCount) + break; + } + } + + // register according to material types counted + + if (solidCount) + SceneManager->registerNodeForRendering(this, scene::ESNRP_SOLID); + + if (transparentCount) + SceneManager->registerNodeForRendering(this, scene::ESNRP_TRANSPARENT); + + ISceneNode::OnRegisterSceneNode(); + } +} + + +//! renders the node. +void CMeshSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + if (!Mesh || !driver) + return; + + bool isTransparentPass = + SceneManager->getSceneNodeRenderPass() == scene::ESNRP_TRANSPARENT; + + ++PassCount; + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + Box = Mesh->getBoundingBox(); + + if (Shadow && PassCount==1) + Shadow->updateShadowVolumes(); + + // for debug purposes only: + + bool renderMeshes = true; + video::SMaterial mat; + if (DebugDataVisible && PassCount==1) + { + // overwrite half transparency + if (DebugDataVisible & scene::EDS_HALF_TRANSPARENCY) + { + for (u32 g=0; g<Mesh->getMeshBufferCount(); ++g) + { + mat = Materials[g]; + mat.MaterialType = video::EMT_TRANSPARENT_ADD_COLOR; + driver->setMaterial(mat); + driver->drawMeshBuffer(Mesh->getMeshBuffer(g)); + } + renderMeshes = false; + } + } + + // render original meshes + if (renderMeshes) + { + for (u32 i=0; i<Mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i); + if (mb) + { + const video::SMaterial& material = ReadOnlyMaterials ? mb->getMaterial() : Materials[i]; + + video::IMaterialRenderer* rnd = driver->getMaterialRenderer(material.MaterialType); + bool transparent = (rnd && rnd->isTransparent()); + + // only render transparent buffer if this is the transparent render pass + // and solid only in solid pass + if (transparent == isTransparentPass) + { + driver->setMaterial(material); + driver->drawMeshBuffer(mb); + } + } + } + } + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + // for debug purposes only: + if (DebugDataVisible && PassCount==1) + { + video::SMaterial m; + m.Lighting = false; + m.AntiAliasing=0; + driver->setMaterial(m); + + if (DebugDataVisible & scene::EDS_BBOX) + { + driver->draw3DBox(Box, video::SColor(255,255,255,255)); + } + if (DebugDataVisible & scene::EDS_BBOX_BUFFERS) + { + for (u32 g=0; g<Mesh->getMeshBufferCount(); ++g) + { + driver->draw3DBox( + Mesh->getMeshBuffer(g)->getBoundingBox(), + video::SColor(255,190,128,128)); + } + } + + if (DebugDataVisible & scene::EDS_NORMALS) + { + // draw normals + const f32 debugNormalLength = SceneManager->getParameters()->getAttributeAsFloat(DEBUG_NORMAL_LENGTH); + const video::SColor debugNormalColor = SceneManager->getParameters()->getAttributeAsColor(DEBUG_NORMAL_COLOR); + const u32 count = Mesh->getMeshBufferCount(); + + for (u32 i=0; i != count; ++i) + { + driver->drawMeshBufferNormals(Mesh->getMeshBuffer(i), debugNormalLength, debugNormalColor); + } + } + + // show mesh + if (DebugDataVisible & scene::EDS_MESH_WIRE_OVERLAY) + { + m.Wireframe = true; + driver->setMaterial(m); + + for (u32 g=0; g<Mesh->getMeshBufferCount(); ++g) + { + driver->drawMeshBuffer(Mesh->getMeshBuffer(g)); + } + } + } +} + + +//! Removes a child from this scene node. +//! Implemented here, to be able to remove the shadow properly, if there is one, +//! or to remove attached childs. +bool CMeshSceneNode::removeChild(ISceneNode* child) +{ + if (child && Shadow == child) + { + Shadow->drop(); + Shadow = 0; + } + + return ISceneNode::removeChild(child); +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CMeshSceneNode::getBoundingBox() const +{ + return Mesh ? Mesh->getBoundingBox() : Box; +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hierarchy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& CMeshSceneNode::getMaterial(u32 i) +{ + if (Mesh && ReadOnlyMaterials && i<Mesh->getMeshBufferCount()) + { + ReadOnlyMaterial = Mesh->getMeshBuffer(i)->getMaterial(); + return ReadOnlyMaterial; + } + + if (i >= Materials.size()) + return ISceneNode::getMaterial(i); + + return Materials[i]; +} + + +//! returns amount of materials used by this scene node. +u32 CMeshSceneNode::getMaterialCount() const +{ + if (Mesh && ReadOnlyMaterials) + return Mesh->getMeshBufferCount(); + + return Materials.size(); +} + + +//! Sets a new mesh +void CMeshSceneNode::setMesh(IMesh* mesh) +{ + if (mesh) + { + mesh->grab(); + if (Mesh) + Mesh->drop(); + + Mesh = mesh; + copyMaterials(); + } +} + + +//! Creates shadow volume scene node as child of this node +//! and returns a pointer to it. +IShadowVolumeSceneNode* CMeshSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) +{ + if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) + return 0; + + if (!shadowMesh) + shadowMesh = Mesh; // if null is given, use the mesh of node + + if (Shadow) + Shadow->drop(); + + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); + return Shadow; +} + + +void CMeshSceneNode::copyMaterials() +{ + Materials.clear(); + + if (Mesh) + { + video::SMaterial mat; + + for (u32 i=0; i<Mesh->getMeshBufferCount(); ++i) + { + IMeshBuffer* mb = Mesh->getMeshBuffer(i); + if (mb) + mat = mb->getMaterial(); + + Materials.push_back(mat); + } + } +} + + +//! Writes attributes of the scene node. +void CMeshSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IMeshSceneNode::serializeAttributes(out, options); + + if (options && (options->Flags&io::EARWF_USE_RELATIVE_PATHS) && options->Filename) + { + const io::path path = SceneManager->getFileSystem()->getRelativeFilename( + SceneManager->getFileSystem()->getAbsolutePath(SceneManager->getMeshCache()->getMeshName(Mesh).getPath()), + options->Filename); + out->addString("Mesh", path.c_str()); + } + else + out->addString("Mesh", SceneManager->getMeshCache()->getMeshName(Mesh).getPath().c_str()); + out->addBool("ReadOnlyMaterials", ReadOnlyMaterials); +} + + +//! Reads attributes of the scene node. +void CMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh); + io::path newMeshStr = in->getAttributeAsString("Mesh"); + ReadOnlyMaterials = in->getAttributeAsBool("ReadOnlyMaterials"); + + if (newMeshStr != "" && oldMeshStr != newMeshStr) + { + IMesh* newMesh = 0; + IAnimatedMesh* newAnimatedMesh = SceneManager->getMesh(newMeshStr.c_str()); + + if (newAnimatedMesh) + newMesh = newAnimatedMesh->getMesh(0); + + if (newMesh) + setMesh(newMesh); + } + + // optional attribute to assign the hint to the whole mesh + if (in->existsAttribute("HardwareMappingHint") && + in->existsAttribute("HardwareMappingBufferType")) + { + scene::E_HARDWARE_MAPPING mapping = scene::EHM_NEVER; + scene::E_BUFFER_TYPE bufferType = scene::EBT_NONE; + + core::stringc smapping = in->getAttributeAsString("HardwareMappingHint"); + if (smapping.equals_ignore_case("static")) + mapping = scene::EHM_STATIC; + else if (smapping.equals_ignore_case("dynamic")) + mapping = scene::EHM_DYNAMIC; + else if (smapping.equals_ignore_case("stream")) + mapping = scene::EHM_STREAM; + + core::stringc sbufferType = in->getAttributeAsString("HardwareMappingBufferType"); + if (sbufferType.equals_ignore_case("vertex")) + bufferType = scene::EBT_VERTEX; + else if (sbufferType.equals_ignore_case("index")) + bufferType = scene::EBT_INDEX; + else if (sbufferType.equals_ignore_case("vertexindex")) + bufferType = scene::EBT_VERTEX_AND_INDEX; + + IMesh* mesh = getMesh(); + if (mesh) + mesh->setHardwareMappingHint(mapping, bufferType); + } + + IMeshSceneNode::deserializeAttributes(in, options); +} + + +//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. +/* In this way it is possible to change the materials a mesh causing all mesh scene nodes +referencing this mesh to change too. */ +void CMeshSceneNode::setReadOnlyMaterials(bool readonly) +{ + ReadOnlyMaterials = readonly; +} + + +//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style +bool CMeshSceneNode::isReadOnlyMaterials() const +{ + return ReadOnlyMaterials; +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CMeshSceneNode* nb = new CMeshSceneNode(Mesh, newParent, + newManager, ID, RelativeTranslation, RelativeRotation, RelativeScale); + + nb->cloneMembers(this, newManager); + nb->ReadOnlyMaterials = ReadOnlyMaterials; + nb->Materials = Materials; + nb->Shadow = Shadow; + if ( nb->Shadow ) + nb->Shadow->grab(); + + if (newParent) + nb->drop(); + return nb; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.h new file mode 100644 index 0000000..513664f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMeshSceneNode.h @@ -0,0 +1,103 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MESH_SCENE_NODE_H_INCLUDED__ +#define __C_MESH_SCENE_NODE_H_INCLUDED__ + +#include "IMeshSceneNode.h" +#include "IMesh.h" + +namespace irr +{ +namespace scene +{ + + class CMeshSceneNode : public IMeshSceneNode + { + public: + + //! constructor + CMeshSceneNode(IMesh* mesh, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! destructor + virtual ~CMeshSceneNode(); + + //! frame + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! returns the material based on the zero based index i. To get the amount + //! of materials used by this scene node, use getMaterialCount(). + //! This function is needed for inserting the node into the scene hirachy on a + //! optimal position for minimizing renderstate changes, but can also be used + //! to directly modify the material of a scene node. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_MESH; } + + //! Sets a new mesh + virtual void setMesh(IMesh* mesh); + + //! Returns the current mesh + virtual IMesh* getMesh(void) { return Mesh; } + + //! Creates shadow volume scene node as child of this node + //! and returns a pointer to it. + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + /* In this way it is possible to change the materials a mesh causing all mesh scene nodes + referencing this mesh to change too. */ + virtual void setReadOnlyMaterials(bool readonly); + + //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style + virtual bool isReadOnlyMaterials() const; + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + //! Removes a child from this scene node. + //! Implemented here, to be able to remove the shadow properly, if there is one, + //! or to remove attached childs. + virtual bool removeChild(ISceneNode* child); + + protected: + + void copyMaterials(); + + core::array<video::SMaterial> Materials; + core::aabbox3d<f32> Box; + video::SMaterial ReadOnlyMaterial; + + IMesh* Mesh; + IShadowVolumeSceneNode* Shadow; + + s32 PassCount; + bool ReadOnlyMaterials; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.cpp new file mode 100644 index 0000000..843fa79 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.cpp @@ -0,0 +1,188 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMetaTriangleSelector.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CMetaTriangleSelector::CMetaTriangleSelector() +{ + #ifdef _DEBUG + setDebugName("CMetaTriangleSelector"); + #endif +} + + +//! destructor +CMetaTriangleSelector::~CMetaTriangleSelector() +{ + removeAllTriangleSelectors(); +} + + +//! Returns amount of all available triangles in this selector +s32 CMetaTriangleSelector::getTriangleCount() const +{ + s32 count = 0; + for (u32 i=0; i<TriangleSelectors.size(); ++i) + count += TriangleSelectors[i]->getTriangleCount(); + + return count; +} + + +//! Gets all triangles. +void CMetaTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::matrix4* transform) const +{ + s32 outWritten = 0; + for (u32 i=0; i<TriangleSelectors.size(); ++i) + { + s32 t = 0; + TriangleSelectors[i]->getTriangles(triangles + outWritten, + arraySize - outWritten, t, transform); + outWritten += t; + if (outWritten==arraySize) + break; + } + + outTriangleCount = outWritten; +} + + +//! Gets all triangles which lie within a specific bounding box. +void CMetaTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::aabbox3d<f32>& box, + const core::matrix4* transform) const +{ + s32 outWritten = 0; + for (u32 i=0; i<TriangleSelectors.size(); ++i) + { + s32 t = 0; + TriangleSelectors[i]->getTriangles(triangles + outWritten, + arraySize - outWritten, t, box, transform); + outWritten += t; + if (outWritten==arraySize) + break; + } + + outTriangleCount = outWritten; +} + + +//! Gets all triangles which have or may have contact with a 3d line. +void CMetaTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform) const +{ + s32 outWritten = 0; + for (u32 i=0; i<TriangleSelectors.size(); ++i) + { + s32 t = 0; + TriangleSelectors[i]->getTriangles(triangles + outWritten, + arraySize - outWritten, t, line, transform); + outWritten += t; + if (outWritten==arraySize) + break; + } + + outTriangleCount = outWritten; +} + + +//! Adds a triangle selector to the collection of triangle selectors +//! in this metaTriangleSelector. +void CMetaTriangleSelector::addTriangleSelector(ITriangleSelector* toAdd) +{ + if (!toAdd) + return; + + TriangleSelectors.push_back(toAdd); + toAdd->grab(); +} + + +//! Removes a specific triangle selector which was added before from the collection. +bool CMetaTriangleSelector::removeTriangleSelector(ITriangleSelector* toRemove) +{ + for (u32 i=0; i<TriangleSelectors.size(); ++i) + { + if (toRemove == TriangleSelectors[i]) + { + TriangleSelectors[i]->drop(); + TriangleSelectors.erase(i); + return true; + } + } + + return false; +} + + +//! Removes all triangle selectors from the collection. +void CMetaTriangleSelector::removeAllTriangleSelectors() +{ + for (u32 i=0; i<TriangleSelectors.size(); ++i) + TriangleSelectors[i]->drop(); + + TriangleSelectors.clear(); +} + + +//! Return the scene node associated with a given triangle. +ISceneNode* CMetaTriangleSelector::getSceneNodeForTriangle(u32 triangleIndex) const +{ + u32 totalTriangles = 0; + + for (u32 i=0; i<TriangleSelectors.size(); ++i) + { + totalTriangles += TriangleSelectors[i]->getTriangleCount(); + + if(totalTriangles > triangleIndex) + return TriangleSelectors[i]->getSceneNodeForTriangle(0); + } + + // For lack of anything more sensible, return the first selector. + return TriangleSelectors[0]->getSceneNodeForTriangle(0); +} + + +/* Return the number of TriangleSelectors that are inside this one, +Only useful for MetaTriangleSelector others return 1 +*/ +u32 CMetaTriangleSelector::getSelectorCount() const +{ + return TriangleSelectors.size(); +} + + +/* Returns the TriangleSelector based on index based on getSelectorCount +Only useful for MetaTriangleSelector others return 'this' +*/ +ITriangleSelector* CMetaTriangleSelector::getSelector(u32 index) +{ + if (index >= TriangleSelectors.size()) + return 0; + return TriangleSelectors[index]; +} + + +/* Returns the TriangleSelector based on index based on getSelectorCount +Only useful for MetaTriangleSelector others return 'this' +*/ +const ITriangleSelector* CMetaTriangleSelector::getSelector(u32 index) const +{ + if (index >= TriangleSelectors.size()) + return 0; + return TriangleSelectors[index]; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h new file mode 100644 index 0000000..1294675 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMetaTriangleSelector.h @@ -0,0 +1,76 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_META_TRIANGLE_SELECTOR_H_INCLUDED__ +#define __C_META_TRIANGLE_SELECTOR_H_INCLUDED__ + +#include "IMetaTriangleSelector.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + +//! Interface for making multiple triangle selectors work as one big selector. +class CMetaTriangleSelector : public IMetaTriangleSelector +{ +public: + + //! constructor + CMetaTriangleSelector(); + + //! destructor + virtual ~CMetaTriangleSelector(); + + //! Get amount of all available triangles in this selector + virtual s32 getTriangleCount() const; + + //! Gets all triangles. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::matrix4* transform=0) const; + + //! Gets all triangles which lie within a specific bounding box. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::aabbox3d<f32>& box, + const core::matrix4* transform=0) const; + + //! Gets all triangles which have or may have contact with a 3d line. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform=0) const; + + //! Adds a triangle selector to the collection of triangle selectors + //! in this metaTriangleSelector. + virtual void addTriangleSelector(ITriangleSelector* toAdd); + + //! Removes a specific triangle selector which was added before from the collection. + virtual bool removeTriangleSelector(ITriangleSelector* toRemove); + + //! Removes all triangle selectors from the collection. + virtual void removeAllTriangleSelectors(); + + //! Get the scene node associated with a given triangle. + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const; + + // Get the number of TriangleSelectors that are part of this one + virtual u32 getSelectorCount() const; + + // Get the TriangleSelector based on index based on getSelectorCount + virtual ITriangleSelector* getSelector(u32 index); + + // Get the TriangleSelector based on index based on getSelectorCount + virtual const ITriangleSelector* getSelector(u32 index) const; + +private: + + core::array<ITriangleSelector*> TriangleSelectors; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.cpp new file mode 100644 index 0000000..e78c3ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.cpp @@ -0,0 +1,175 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMountPointReader.h" + +#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ + +#include "CReadFile.h" +#include "os.h" + +namespace irr +{ +namespace io +{ + +//! Constructor +CArchiveLoaderMount::CArchiveLoaderMount( io::IFileSystem* fs) +: FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("CArchiveLoaderMount"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderMount::isALoadableFileFormat(const io::path& filename) const +{ + io::path fname(filename); + deletePathFromFilename(fname); + + if (!fname.size()) + return true; + IFileList* list = FileSystem->createFileList(); + bool ret = false; + if (list) + { + // check if name is found as directory + if (list->findFile(filename, true)) + ret=true; + list->drop(); + } + return ret; +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderMount::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return fileType == EFAT_FOLDER; +} + +//! Check if the file might be loaded by this class +bool CArchiveLoaderMount::isALoadableFileFormat(io::IReadFile* file) const +{ + return false; +} + +//! Creates an archive from the filename +IFileArchive* CArchiveLoaderMount::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + + EFileSystemType current = FileSystem->setFileListSystem(FILESYSTEM_NATIVE); + + const io::path save = FileSystem->getWorkingDirectory(); + io::path fullPath = FileSystem->getAbsolutePath(filename); + FileSystem->flattenFilename(fullPath); + + if (FileSystem->changeWorkingDirectoryTo(fullPath)) + { + archive = new CMountPointReader(FileSystem, fullPath, ignoreCase, ignorePaths); + } + + FileSystem->changeWorkingDirectoryTo(save); + FileSystem->setFileListSystem(current); + + return archive; +} + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderMount::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + return 0; +} + +//! compatible Folder Architecture +CMountPointReader::CMountPointReader(IFileSystem * parent, const io::path& basename, bool ignoreCase, bool ignorePaths) + : CFileList(basename, ignoreCase, ignorePaths), Parent(parent) +{ + //! ensure CFileList path ends in a slash + if (Path.lastChar() != '/' ) + Path.append('/'); + + const io::path& work = Parent->getWorkingDirectory(); + + Parent->changeWorkingDirectoryTo(basename); + buildDirectory(); + Parent->changeWorkingDirectoryTo(work); + + sort(); +} + + +//! returns the list of files +const IFileList* CMountPointReader::getFileList() const +{ + return this; +} + +void CMountPointReader::buildDirectory() +{ + IFileList * list = Parent->createFileList(); + if (!list) + return; + + const u32 size = list->getFileCount(); + for (u32 i=0; i < size; ++i) + { + io::path full = list->getFullFileName(i); + full = full.subString(Path.size(), full.size() - Path.size()); + + if (!list->isDirectory(i)) + { + addItem(full, list->getFileOffset(i), list->getFileSize(i), false, RealFileNames.size()); + RealFileNames.push_back(list->getFullFileName(i)); + } + else + { + const io::path rel = list->getFileName(i); + RealFileNames.push_back(list->getFullFileName(i)); + + io::path pwd = Parent->getWorkingDirectory(); + if (pwd.lastChar() != '/') + pwd.append('/'); + pwd.append(rel); + + if ( rel != "." && rel != ".." ) + { + addItem(full, 0, 0, true, 0); + Parent->changeWorkingDirectoryTo(pwd); + buildDirectory(); + Parent->changeWorkingDirectoryTo(".."); + } + } + } + + list->drop(); +} + +//! opens a file by index +IReadFile* CMountPointReader::createAndOpenFile(u32 index) +{ + if (index >= Files.size()) + return 0; + + return createReadFile(RealFileNames[Files[index].ID]); +} + +//! opens a file by file name +IReadFile* CMountPointReader::createAndOpenFile(const io::path& filename) +{ + s32 index = findFile(filename, false); + if (index != -1) + return createAndOpenFile(index); + else + return 0; +} + + +} // io +} // irr + +#endif // __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.h new file mode 100644 index 0000000..a5ea86c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMountPointReader.h @@ -0,0 +1,89 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MOUNT_READER_H_INCLUDED__ +#define __C_MOUNT_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ + +#include "IFileSystem.h" +#include "CFileList.h" + +namespace irr +{ +namespace io +{ + + //! Archiveloader capable of loading MountPoint Archives + class CArchiveLoaderMount : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderMount(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".zip") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + private: + io::IFileSystem* FileSystem; + }; + + //! A File Archive which uses a mountpoint + class CMountPointReader : public virtual IFileArchive, virtual CFileList + { + public: + + //! Constructor + CMountPointReader(IFileSystem *parent, const io::path& basename, + bool ignoreCase, bool ignorePaths); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the class Type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_FOLDER; } + + private: + + core::array<io::path> RealFileNames; + + IFileSystem *Parent; + void buildDirectory(); + }; +} // io +} // irr + +#endif // __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#endif // __C_MOUNT_READER_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.cpp new file mode 100644 index 0000000..fc02786 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.cpp @@ -0,0 +1,277 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// Copyright (C) 2009-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// Based on the NPK reader from Irrlicht + +#include "CNPKReader.h" + +#ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + +#include "os.h" +#include "coreutil.h" + +#ifdef _DEBUG +#define IRR_DEBUG_NPK_READER +#endif + +namespace irr +{ +namespace io +{ + +namespace +{ + bool isHeaderValid(const SNPKHeader& header) + { + const c8* const tag = header.Tag; + return tag[0] == '0' && + tag[1] == 'K' && + tag[2] == 'P' && + tag[3] == 'N'; + } +} // end namespace + + +//! Constructor +CArchiveLoaderNPK::CArchiveLoaderNPK( io::IFileSystem* fs) +: FileSystem(fs) +{ +#ifdef _DEBUG + setDebugName("CArchiveLoaderNPK"); +#endif +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderNPK::isALoadableFileFormat(const io::path& filename) const +{ + return core::hasFileExtension(filename, "npk"); +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderNPK::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return fileType == EFAT_NPK; +} + +//! Creates an archive from the filename +/** \param file File handle to check. +\return Pointer to newly created archive, or 0 upon error. */ +IFileArchive* CArchiveLoaderNPK::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + archive = createArchive(file, ignoreCase, ignorePaths); + file->drop (); + } + + return archive; +} + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderNPK::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + if ( file ) + { + file->seek ( 0 ); + archive = new CNPKReader(file, ignoreCase, ignorePaths); + } + return archive; +} + + +//! Check if the file might be loaded by this class +/** Check might look into the file. +\param file File handle to check. +\return True if file seems to be loadable. */ +bool CArchiveLoaderNPK::isALoadableFileFormat(io::IReadFile* file) const +{ + SNPKHeader header; + + file->read(&header, sizeof(header)); + + return isHeaderValid(header); +} + + +/*! + NPK Reader +*/ +CNPKReader::CNPKReader(IReadFile* file, bool ignoreCase, bool ignorePaths) +: CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file) +{ +#ifdef _DEBUG + setDebugName("CNPKReader"); +#endif + + if (File) + { + File->grab(); + if (scanLocalHeader()) + sort(); + else + os::Printer::log("Failed to load NPK archive."); + } +} + + +CNPKReader::~CNPKReader() +{ + if (File) + File->drop(); +} + + +const IFileList* CNPKReader::getFileList() const +{ + return this; +} + + +bool CNPKReader::scanLocalHeader() +{ + SNPKHeader header; + + // Read and validate the header + File->read(&header, sizeof(header)); + if (!isHeaderValid(header)) + return false; + + // Seek to the table of contents +#ifdef __BIG_ENDIAN__ + header.Offset = os::Byteswap::byteswap(header.Offset); + header.Length = os::Byteswap::byteswap(header.Length); +#endif + header.Offset += 8; + core::stringc dirName; + bool inTOC=true; + // Loop through each entry in the table of contents + while (inTOC && (File->getPos() < File->getSize())) + { + // read an entry + char tag[4]={0}; + SNPKFileEntry entry; + File->read(tag, 4); + const int numTag = MAKE_IRR_ID(tag[3],tag[2],tag[1],tag[0]); + int size; + + bool isDir=true; + + switch (numTag) + { + case MAKE_IRR_ID('D','I','R','_'): + { + File->read(&size, 4); + readString(entry.Name); + entry.Length=0; + entry.Offset=0; +#ifdef IRR_DEBUG_NPK_READER + os::Printer::log("Dir", entry.Name); +#endif + } + break; + case MAKE_IRR_ID('F','I','L','E'): + { + File->read(&size, 4); + File->read(&entry.Offset, 4); + File->read(&entry.Length, 4); + readString(entry.Name); + isDir=false; +#ifdef IRR_DEBUG_NPK_READER + os::Printer::log("File", entry.Name); +#endif +#ifdef __BIG_ENDIAN__ + entry.Offset = os::Byteswap::byteswap(entry.Offset); + entry.Length = os::Byteswap::byteswap(entry.Length); +#endif + } + break; + case MAKE_IRR_ID('D','E','N','D'): + { + File->read(&size, 4); + entry.Name=""; + entry.Length=0; + entry.Offset=0; + const s32 pos = dirName.findLast('/', dirName.size()-2); + if (pos==-1) + dirName=""; + else + dirName=dirName.subString(0, pos); +#ifdef IRR_DEBUG_NPK_READER + os::Printer::log("Dirend", dirName); +#endif + } + break; + default: + inTOC=false; + } + // skip root dir + if (isDir) + { + if (!entry.Name.size() || (entry.Name==".") || (entry.Name=="<noname>")) + continue; + dirName += entry.Name; + dirName += "/"; + } +#ifdef IRR_DEBUG_NPK_READER + os::Printer::log("Name", entry.Name); +#endif + addItem((isDir?dirName:dirName+entry.Name), entry.Offset+header.Offset, entry.Length, isDir); + } + return true; +} + + +//! opens a file by file name +IReadFile* CNPKReader::createAndOpenFile(const io::path& filename) +{ + s32 index = findFile(filename, false); + + if (index != -1) + return createAndOpenFile(index); + + return 0; +} + + +//! opens a file by index +IReadFile* CNPKReader::createAndOpenFile(u32 index) +{ + if (index >= Files.size() ) + return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); +} + +void CNPKReader::readString(core::stringc& name) +{ + short stringSize; + char buf[256]; + File->read(&stringSize, 2); +#ifdef __BIG_ENDIAN__ + stringSize = os::Byteswap::byteswap(stringSize); +#endif + name.reserve(stringSize); + while(stringSize) + { + const short next = core::min_(stringSize, (short)255); + File->read(buf,next); + buf[next]=0; + name.append(buf); + stringSize -= next; + } +} + + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.h new file mode 100644 index 0000000..e7792a6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CNPKReader.h @@ -0,0 +1,128 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// Copyright (C) 2009-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_NPK_READER_H_INCLUDED__ +#define __C_NPK_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + +#include "IReferenceCounted.h" +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "CFileList.h" + +namespace irr +{ +namespace io +{ + namespace + { + //! File header containing location and size of the table of contents + struct SNPKHeader + { + // Don't change the order of these fields! They must match the order stored on disk. + c8 Tag[4]; + u32 Length; + u32 Offset; + }; + + //! An entry in the NPK file's table of contents. + struct SNPKFileEntry + { + core::stringc Name; + u32 Offset; + u32 Length; + }; + } // end namespace + + //! Archiveloader capable of loading Nebula Device 2 NPK Archives + class CArchiveLoaderNPK : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderNPK(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".zip") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + //! Returns the type of archive created by this loader + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_NPK; } + + private: + io::IFileSystem* FileSystem; + }; + + + //! reads from NPK + class CNPKReader : public virtual IFileArchive, virtual CFileList + { + public: + + CNPKReader(IReadFile* file, bool ignoreCase, bool ignorePaths); + virtual ~CNPKReader(); + + // file archive methods + + //! return the id of the file Archive + virtual const io::path& getArchiveName() const + { + return File->getFileName(); + } + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the class Type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_NPK; } + + private: + + //! scans for a local header, returns false if the header is invalid + bool scanLocalHeader(); + void readString(core::stringc& name); + + IReadFile* File; + }; + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ + +#endif // __C_NPK_READER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.cpp new file mode 100644 index 0000000..3d02abe --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.cpp @@ -0,0 +1,2448 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CNullDriver.h" +#include "os.h" +#include "CImage.h" +#include "CAttributes.h" +#include "IReadFile.h" +#include "IWriteFile.h" +#include "IImageLoader.h" +#include "IImageWriter.h" +#include "IMaterialRenderer.h" +#include "IAnimatedMeshSceneNode.h" +#include "CMeshManipulator.h" +#include "CColorConverter.h" +#include "IAttributeExchangingObject.h" + + +namespace irr +{ +namespace video +{ + +//! creates a loader which is able to load windows bitmaps +IImageLoader* createImageLoaderBMP(); + +//! creates a loader which is able to load jpeg images +IImageLoader* createImageLoaderJPG(); + +//! creates a loader which is able to load targa images +IImageLoader* createImageLoaderTGA(); + +//! creates a loader which is able to load psd images +IImageLoader* createImageLoaderPSD(); + +//! creates a loader which is able to load dds images +IImageLoader* createImageLoaderDDS(); + +//! creates a loader which is able to load pcx images +IImageLoader* createImageLoaderPCX(); + +//! creates a loader which is able to load png images +IImageLoader* createImageLoaderPNG(); + +//! creates a loader which is able to load WAL images +IImageLoader* createImageLoaderWAL(); + +//! creates a loader which is able to load halflife images +IImageLoader* createImageLoaderHalfLife(); + +//! creates a loader which is able to load lmp images +IImageLoader* createImageLoaderLMP(); + +//! creates a loader which is able to load ppm/pgm/pbm images +IImageLoader* createImageLoaderPPM(); + +//! creates a loader which is able to load rgb images +IImageLoader* createImageLoaderRGB(); + + +//! creates a writer which is able to save bmp images +IImageWriter* createImageWriterBMP(); + +//! creates a writer which is able to save jpg images +IImageWriter* createImageWriterJPG(); + +//! creates a writer which is able to save tga images +IImageWriter* createImageWriterTGA(); + +//! creates a writer which is able to save psd images +IImageWriter* createImageWriterPSD(); + +//! creates a writer which is able to save pcx images +IImageWriter* createImageWriterPCX(); + +//! creates a writer which is able to save png images +IImageWriter* createImageWriterPNG(); + +//! creates a writer which is able to save ppm images +IImageWriter* createImageWriterPPM(); + +//! constructor +CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize) +: FileSystem(io), MeshManipulator(0), ViewPort(0,0,0,0), ScreenSize(screenSize), + PrimitivesDrawn(0), MinVertexCountForVBO(500), TextureCreationFlags(0), + OverrideMaterial2DEnabled(false), AllowZWriteOnTransparent(false) +{ + #ifdef _DEBUG + setDebugName("CNullDriver"); + #endif + + DriverAttributes = new io::CAttributes(); + DriverAttributes->addInt("MaxTextures", _IRR_MATERIAL_MAX_TEXTURES_); + DriverAttributes->addInt("MaxSupportedTextures", _IRR_MATERIAL_MAX_TEXTURES_); + DriverAttributes->addInt("MaxLights", getMaximalDynamicLightAmount()); + DriverAttributes->addInt("MaxAnisotropy", 1); +// DriverAttributes->addInt("MaxUserClipPlanes", 0); +// DriverAttributes->addInt("MaxAuxBuffers", 0); + DriverAttributes->addInt("MaxMultipleRenderTargets", 1); + DriverAttributes->addInt("MaxIndices", -1); + DriverAttributes->addInt("MaxTextureSize", -1); +// DriverAttributes->addInt("MaxGeometryVerticesOut", 0); +// DriverAttributes->addFloat("MaxTextureLODBias", 0.f); + DriverAttributes->addInt("Version", 1); +// DriverAttributes->addInt("ShaderLanguageVersion", 0); +// DriverAttributes->addInt("AntiAlias", 0); + + setFog(); + + setTextureCreationFlag(ETCF_ALWAYS_32_BIT, true); + setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, true); + + ViewPort = core::rect<s32>(core::position2d<s32>(0,0), core::dimension2di(screenSize)); + + // create manipulator + MeshManipulator = new scene::CMeshManipulator(); + + if (FileSystem) + FileSystem->grab(); + + // create surface loader + +#ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderHalfLife()); +#endif +#ifdef _IRR_COMPILE_WITH_WAL_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderWAL()); +#endif +#ifdef _IRR_COMPILE_WITH_LMP_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderLMP()); +#endif +#ifdef _IRR_COMPILE_WITH_PPM_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderPPM()); +#endif +#ifdef _IRR_COMPILE_WITH_RGB_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderRGB()); +#endif +#ifdef _IRR_COMPILE_WITH_PSD_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderPSD()); +#endif +#ifdef _IRR_COMPILE_WITH_DDS_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderDDS()); +#endif +#ifdef _IRR_COMPILE_WITH_PCX_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderPCX()); +#endif +#ifdef _IRR_COMPILE_WITH_TGA_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderTGA()); +#endif +#ifdef _IRR_COMPILE_WITH_PNG_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderPNG()); +#endif +#ifdef _IRR_COMPILE_WITH_JPG_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderJPG()); +#endif +#ifdef _IRR_COMPILE_WITH_BMP_LOADER_ + SurfaceLoader.push_back(video::createImageLoaderBMP()); +#endif + + +#ifdef _IRR_COMPILE_WITH_PPM_WRITER_ + SurfaceWriter.push_back(video::createImageWriterPPM()); +#endif +#ifdef _IRR_COMPILE_WITH_PCX_WRITER_ + SurfaceWriter.push_back(video::createImageWriterPCX()); +#endif +#ifdef _IRR_COMPILE_WITH_PSD_WRITER_ + SurfaceWriter.push_back(video::createImageWriterPSD()); +#endif +#ifdef _IRR_COMPILE_WITH_TGA_WRITER_ + SurfaceWriter.push_back(video::createImageWriterTGA()); +#endif +#ifdef _IRR_COMPILE_WITH_JPG_WRITER_ + SurfaceWriter.push_back(video::createImageWriterJPG()); +#endif +#ifdef _IRR_COMPILE_WITH_PNG_WRITER_ + SurfaceWriter.push_back(video::createImageWriterPNG()); +#endif +#ifdef _IRR_COMPILE_WITH_BMP_WRITER_ + SurfaceWriter.push_back(video::createImageWriterBMP()); +#endif + + + // set ExposedData to 0 + memset(&ExposedData, 0, sizeof(ExposedData)); + for (u32 i=0; i<video::EVDF_COUNT; ++i) + FeatureEnabled[i]=true; + + InitMaterial2D.AntiAliasing=video::EAAM_OFF; + InitMaterial2D.Lighting=false; + InitMaterial2D.ZWriteEnable=false; + InitMaterial2D.ZBuffer=video::ECFN_NEVER; + InitMaterial2D.UseMipMaps=false; + for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i) + { + InitMaterial2D.TextureLayer[i].BilinearFilter=false; + InitMaterial2D.TextureLayer[i].TextureWrapU=video::ETC_REPEAT; + InitMaterial2D.TextureLayer[i].TextureWrapV=video::ETC_REPEAT; + } + OverrideMaterial2D=InitMaterial2D; +} + + +//! destructor +CNullDriver::~CNullDriver() +{ + if (DriverAttributes) + DriverAttributes->drop(); + + if (FileSystem) + FileSystem->drop(); + + if (MeshManipulator) + MeshManipulator->drop(); + deleteAllTextures(); + + u32 i; + for (i=0; i<SurfaceLoader.size(); ++i) + SurfaceLoader[i]->drop(); + + for (i=0; i<SurfaceWriter.size(); ++i) + SurfaceWriter[i]->drop(); + + // delete material renderers + deleteMaterialRenders(); + + // delete hardware mesh buffers + removeAllHardwareBuffers(); +} + + +//! Adds an external surface loader to the engine. +void CNullDriver::addExternalImageLoader(IImageLoader* loader) +{ + if (!loader) + return; + + loader->grab(); + SurfaceLoader.push_back(loader); +} + + +//! Adds an external surface writer to the engine. +void CNullDriver::addExternalImageWriter(IImageWriter* writer) +{ + if (!writer) + return; + + writer->grab(); + SurfaceWriter.push_back(writer); +} + + +//! Retrieve the number of image loaders +u32 CNullDriver::getImageLoaderCount() const +{ + return SurfaceLoader.size(); +} + + +//! Retrieve the given image loader +IImageLoader* CNullDriver::getImageLoader(u32 n) +{ + if (n < SurfaceLoader.size()) + return SurfaceLoader[n]; + return 0; +} + + +//! Retrieve the number of image writers +u32 CNullDriver::getImageWriterCount() const +{ + return SurfaceWriter.size(); +} + + +//! Retrieve the given image writer +IImageWriter* CNullDriver::getImageWriter(u32 n) +{ + if (n < SurfaceWriter.size()) + return SurfaceWriter[n]; + return 0; +} + + +//! deletes all textures +void CNullDriver::deleteAllTextures() +{ + // we need to remove previously set textures which might otherwise be kept in the + // last set material member. Could be optimized to reduce state changes. + setMaterial(SMaterial()); + + for (u32 i=0; i<Textures.size(); ++i) + Textures[i].Surface->drop(); + + Textures.clear(); +} + + + +//! applications must call this method before performing any rendering. returns false if failed. +bool CNullDriver::beginScene(bool backBuffer, bool zBuffer, SColor color, + const SExposedVideoData& videoData, core::rect<s32>* sourceRect) +{ + core::clearFPUException(); + PrimitivesDrawn = 0; + return true; +} + + +//! applications must call this method after performing any rendering. returns false if failed. +bool CNullDriver::endScene() +{ + FPSCounter.registerFrame(os::Timer::getRealTime(), PrimitivesDrawn); + updateAllHardwareBuffers(); + updateAllOcclusionQueries(); + return true; +} + + +//! Disable a feature of the driver. +void CNullDriver::disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag) +{ + FeatureEnabled[feature]=!flag; +} + + +//! queries the features of the driver, returns true if feature is available +bool CNullDriver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const +{ + return false; +} + + +//! Get attributes of the actual video driver +const io::IAttributes& CNullDriver::getDriverAttributes() const +{ + return *DriverAttributes; +} + + +//! sets transformation +void CNullDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) +{ +} + + +//! Returns the transformation set by setTransform +const core::matrix4& CNullDriver::getTransform(E_TRANSFORMATION_STATE state) const +{ + return TransformationMatrix; +} + + +//! sets a material +void CNullDriver::setMaterial(const SMaterial& material) +{ +} + + +//! Removes a texture from the texture cache and deletes it, freeing lot of +//! memory. +void CNullDriver::removeTexture(ITexture* texture) +{ + if (!texture) + return; + + for (u32 i=0; i<Textures.size(); ++i) + { + if (Textures[i].Surface == texture) + { + texture->drop(); + Textures.erase(i); + } + } +} + + +//! Removes all texture from the texture cache and deletes them, freeing lot of +//! memory. +void CNullDriver::removeAllTextures() +{ + setMaterial ( SMaterial() ); + deleteAllTextures(); +} + + +//! Returns a texture by index +ITexture* CNullDriver::getTextureByIndex(u32 i) +{ + if ( i < Textures.size() ) + return Textures[i].Surface; + + return 0; +} + + +//! Returns amount of textures currently loaded +u32 CNullDriver::getTextureCount() const +{ + return Textures.size(); +} + + +//! Renames a texture +void CNullDriver::renameTexture(ITexture* texture, const io::path& newName) +{ + // we can do a const_cast here safely, the name of the ITexture interface + // is just readonly to prevent the user changing the texture name without invoking + // this method, because the textures will need resorting afterwards + + io::SNamedPath& name = const_cast<io::SNamedPath&>(texture->getName()); + name.setPath(newName); + + Textures.sort(); +} + + +//! loads a Texture +ITexture* CNullDriver::getTexture(const io::path& filename) +{ + // Identify textures by their absolute filenames if possible. + const io::path absolutePath = FileSystem->getAbsolutePath(filename); + + ITexture* texture = findTexture(absolutePath); + if (texture) + return texture; + + // Then try the raw filename, which might be in an Archive + texture = findTexture(filename); + if (texture) + return texture; + + // Now try to open the file using the complete path. + io::IReadFile* file = FileSystem->createAndOpenFile(absolutePath); + + if (!file) + { + // Try to open it using the raw filename. + file = FileSystem->createAndOpenFile(filename); + } + + if (file) + { + // Re-check name for actual archive names + texture = findTexture(file->getFileName()); + if (texture) + { + file->drop(); + return texture; + } + + texture = loadTextureFromFile(file); + file->drop(); + + if (texture) + { + addTexture(texture); + texture->drop(); // drop it because we created it, one grab too much + } + else + os::Printer::log("Could not load texture", filename, ELL_ERROR); + return texture; + } + else + { + os::Printer::log("Could not open file of texture", filename, ELL_WARNING); + return 0; + } +} + + +//! loads a Texture +ITexture* CNullDriver::getTexture(io::IReadFile* file) +{ + ITexture* texture = 0; + + if (file) + { + texture = findTexture(file->getFileName()); + + if (texture) + return texture; + + texture = loadTextureFromFile(file); + + if (texture) + { + addTexture(texture); + texture->drop(); // drop it because we created it, one grab too much + } + + if (!texture) + os::Printer::log("Could not load texture", file->getFileName(), ELL_WARNING); + } + + return texture; +} + + +//! opens the file and loads it into the surface +video::ITexture* CNullDriver::loadTextureFromFile(io::IReadFile* file, const io::path& hashName ) +{ + ITexture* texture = 0; + IImage* image = createImageFromFile(file); + + if (image) + { + // create texture from surface + texture = createDeviceDependentTexture(image, hashName.size() ? hashName : file->getFileName() ); + os::Printer::log("Loaded texture", file->getFileName()); + image->drop(); + } + + return texture; +} + + +//! adds a surface, not loaded or created by the Irrlicht Engine +void CNullDriver::addTexture(video::ITexture* texture) +{ + if (texture) + { + SSurface s; + s.Surface = texture; + texture->grab(); + + Textures.push_back(s); + + // the new texture is now at the end of the texture list. when searching for + // the next new texture, the texture array will be sorted and the index of this texture + // will be changed. to let the order be more consistent to the user, sort + // the textures now already although this isn't necessary: + + Textures.sort(); + } +} + + +//! looks if the image is already loaded +video::ITexture* CNullDriver::findTexture(const io::path& filename) +{ + SSurface s; + SDummyTexture dummy(filename); + s.Surface = &dummy; + + s32 index = Textures.binary_search(s); + if (index != -1) + return Textures[index].Surface; + + return 0; +} + + +//! Creates a texture from a loaded IImage. +ITexture* CNullDriver::addTexture(const io::path& name, IImage* image, void* mipmapData) +{ + if ( 0 == name.size() || !image) + return 0; + + ITexture* t = createDeviceDependentTexture(image, name, mipmapData); + if (t) + { + addTexture(t); + t->drop(); + } + return t; +} + + +//! creates a Texture +ITexture* CNullDriver::addTexture(const core::dimension2d<u32>& size, + const io::path& name, ECOLOR_FORMAT format) +{ + if(IImage::isRenderTargetOnlyFormat(format)) + { + os::Printer::log("Could not create ITexture, format only supported for render target textures.", ELL_WARNING); + return 0; + } + + if ( 0 == name.size () ) + return 0; + + IImage* image = new CImage(format, size); + ITexture* t = createDeviceDependentTexture(image, name); + image->drop(); + addTexture(t); + + if (t) + t->drop(); + + return t; +} + + + +//! returns a device dependent texture from a software surface (IImage) +//! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES +ITexture* CNullDriver::createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData) +{ + return new SDummyTexture(name); +} + + +//! set or reset special render targets +bool CNullDriver::setRenderTarget(video::E_RENDER_TARGET target, bool clearTarget, + bool clearZBuffer, SColor color) +{ + if (ERT_FRAME_BUFFER==target) + return setRenderTarget(0,clearTarget, clearZBuffer, color); + else + return false; +} + + +//! sets a render target +bool CNullDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color) +{ + return false; +} + + +//! Sets multiple render targets +bool CNullDriver::setRenderTarget(const core::array<video::IRenderTarget>& texture, + bool clearBackBuffer, bool clearZBuffer, SColor color) +{ + return false; +} + + +//! sets a viewport +void CNullDriver::setViewPort(const core::rect<s32>& area) +{ +} + + +//! gets the area of the current viewport +const core::rect<s32>& CNullDriver::getViewPort() const +{ + return ViewPort; +} + + +//! draws a vertex primitive list +void CNullDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCount, const void* indexList, u32 primitiveCount, E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) +{ + if ((iType==EIT_16BIT) && (vertexCount>65536)) + os::Printer::log("Too many vertices for 16bit index type, render artifacts may occur."); + PrimitivesDrawn += primitiveCount; +} + + +//! draws a vertex primitive list in 2d +void CNullDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, const void* indexList, u32 primitiveCount, E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) +{ + if ((iType==EIT_16BIT) && (vertexCount>65536)) + os::Printer::log("Too many vertices for 16bit index type, render artifacts may occur."); + PrimitivesDrawn += primitiveCount; +} + + +//! Draws a 3d line. +void CNullDriver::draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color) +{ +} + + +//! Draws a 3d triangle. +void CNullDriver::draw3DTriangle(const core::triangle3df& triangle, SColor color) +{ + S3DVertex vertices[3]; + vertices[0].Pos=triangle.pointA; + vertices[0].Color=color; + vertices[0].Normal=triangle.getNormal().normalize(); + vertices[0].TCoords.set(0.f,0.f); + vertices[1].Pos=triangle.pointB; + vertices[1].Color=color; + vertices[1].Normal=vertices[0].Normal; + vertices[1].TCoords.set(0.5f,1.f); + vertices[2].Pos=triangle.pointC; + vertices[2].Color=color; + vertices[2].Normal=vertices[0].Normal; + vertices[2].TCoords.set(1.f,0.f); + const u16 indexList[] = {0,1,2}; + drawVertexPrimitiveList(vertices, 3, indexList, 1, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT); +} + + +//! Draws a 3d axis aligned box. +void CNullDriver::draw3DBox(const core::aabbox3d<f32>& box, SColor color) +{ + core::vector3df edges[8]; + box.getEdges(edges); + + // TODO: optimize into one big drawIndexPrimitive call. + + draw3DLine(edges[5], edges[1], color); + draw3DLine(edges[1], edges[3], color); + draw3DLine(edges[3], edges[7], color); + draw3DLine(edges[7], edges[5], color); + draw3DLine(edges[0], edges[2], color); + draw3DLine(edges[2], edges[6], color); + draw3DLine(edges[6], edges[4], color); + draw3DLine(edges[4], edges[0], color); + draw3DLine(edges[1], edges[0], color); + draw3DLine(edges[3], edges[2], color); + draw3DLine(edges[7], edges[6], color); + draw3DLine(edges[5], edges[4], color); +} + + + +//! draws an 2d image +void CNullDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos) +{ + if (!texture) + return; + + draw2DImage(texture,destPos, core::rect<s32>(core::position2d<s32>(0,0), + core::dimension2di(texture->getOriginalSize()))); +} + + + +//! draws a set of 2d images, using a color and the alpha channel of the +//! texture if desired. The images are drawn beginning at pos and concatenated +//! in one line. All drawings are clipped against clipRect (if != 0). +//! The subtextures are defined by the array of sourceRects and are chosen +//! by the indices given. +void CNullDriver::draw2DImageBatch(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::array<core::rect<s32> >& sourceRects, + const core::array<s32>& indices, + s32 kerningWidth, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + core::position2d<s32> target(pos); + + for (u32 i=0; i<indices.size(); ++i) + { + draw2DImage(texture, target, sourceRects[indices[i]], + clipRect, color, useAlphaChannelOfTexture); + target.X += sourceRects[indices[i]].getWidth(); + target.X += kerningWidth; + } +} + +//! draws a set of 2d images, using a color and the alpha channel of the +//! texture if desired. +void CNullDriver::draw2DImageBatch(const video::ITexture* texture, + const core::array<core::position2d<s32> >& positions, + const core::array<core::rect<s32> >& sourceRects, + const core::rect<s32>* clipRect, + SColor color, + bool useAlphaChannelOfTexture) +{ + const irr::u32 drawCount = core::min_<u32>(positions.size(), sourceRects.size()); + + for (u32 i=0; i<drawCount; ++i) + { + draw2DImage(texture, positions[i], sourceRects[i], + clipRect, color, useAlphaChannelOfTexture); + } +} + + +//! Draws a part of the texture into the rectangle. +void CNullDriver::draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect, + const video::SColor* const colors, bool useAlphaChannelOfTexture) +{ + if (destRect.isValid()) + draw2DImage(texture, core::position2d<s32>(destRect.UpperLeftCorner), + sourceRect, clipRect, colors?colors[0]:video::SColor(0xffffffff), + useAlphaChannelOfTexture); +} + + +//! Draws a 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. +void CNullDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ +} + + +//! Draws the outline of a 2d rectangle +void CNullDriver::draw2DRectangleOutline(const core::recti& pos, SColor color) +{ + draw2DLine(pos.UpperLeftCorner, core::position2di(pos.LowerRightCorner.X, pos.UpperLeftCorner.Y), color); + draw2DLine(core::position2di(pos.LowerRightCorner.X, pos.UpperLeftCorner.Y), pos.LowerRightCorner, color); + draw2DLine(pos.LowerRightCorner, core::position2di(pos.UpperLeftCorner.X, pos.LowerRightCorner.Y), color); + draw2DLine(core::position2di(pos.UpperLeftCorner.X, pos.LowerRightCorner.Y), pos.UpperLeftCorner, color); +} + + +//! Draw a 2d rectangle +void CNullDriver::draw2DRectangle(SColor color, const core::rect<s32>& pos, const core::rect<s32>* clip) +{ + draw2DRectangle(pos, color, color, color, color, clip); +} + + + +//! Draws a 2d rectangle with a gradient. +void CNullDriver::draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip) +{ +} + + + +//! Draws a 2d line. +void CNullDriver::draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, SColor color) +{ +} + +//! Draws a pixel +void CNullDriver::drawPixel(u32 x, u32 y, const SColor & color) +{ +} + + +//! Draws a non filled concyclic regular 2d polyon. +void CNullDriver::draw2DPolygon(core::position2d<s32> center, + f32 radius, video::SColor color, s32 count) +{ + if (count < 2) + return; + + core::position2d<s32> first; + core::position2d<s32> a,b; + + for (s32 j=0; j<count; ++j) + { + b = a; + + f32 p = j / (f32)count * (core::PI*2); + a = center + core::position2d<s32>((s32)(sin(p)*radius), (s32)(cos(p)*radius)); + + if (j==0) + first = a; + else + draw2DLine(a, b, color); + } + + draw2DLine(a, first, color); +} + + +//! returns color format +ECOLOR_FORMAT CNullDriver::getColorFormat() const +{ + return ECF_R5G6B5; +} + + +//! returns screen size +const core::dimension2d<u32>& CNullDriver::getScreenSize() const +{ + return ScreenSize; +} + + +//! returns the current render target size, +//! or the screen size if render targets are not implemented +const core::dimension2d<u32>& CNullDriver::getCurrentRenderTargetSize() const +{ + return ScreenSize; +} + + +// returns current frames per second value +s32 CNullDriver::getFPS() const +{ + return FPSCounter.getFPS(); +} + + + +//! returns amount of primitives (mostly triangles) were drawn in the last frame. +//! very useful method for statistics. +u32 CNullDriver::getPrimitiveCountDrawn( u32 param ) const +{ + return (0 == param) ? FPSCounter.getPrimitive() : (1 == param) ? FPSCounter.getPrimitiveAverage() : FPSCounter.getPrimitiveTotal(); +} + + + +//! Sets the dynamic ambient light color. The default color is +//! (0,0,0,0) which means it is dark. +//! \param color: New color of the ambient light. +void CNullDriver::setAmbientLight(const SColorf& color) +{ +} + + + +//! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 +//! driver, it would return "Direct3D8". + +const wchar_t* CNullDriver::getName() const +{ + return L"Irrlicht NullDevice"; +} + + + +//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do +//! this: Frist, draw all geometry. Then use this method, to draw the shadow +//! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. +void CNullDriver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible) +{ +} + + +//! Fills the stencil shadow with color. After the shadow volume has been drawn +//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this +//! to draw the color of the shadow. +void CNullDriver::drawStencilShadow(bool clearStencilBuffer, + video::SColor leftUpEdge, video::SColor rightUpEdge, + video::SColor leftDownEdge, video::SColor rightDownEdge) +{ +} + + +//! deletes all dynamic lights there are +void CNullDriver::deleteAllDynamicLights() +{ + Lights.set_used(0); +} + + +//! adds a dynamic light +s32 CNullDriver::addDynamicLight(const SLight& light) +{ + Lights.push_back(light); + return Lights.size() - 1; +} + +//! Turns a dynamic light on or off +//! \param lightIndex: the index returned by addDynamicLight +//! \param turnOn: true to turn the light on, false to turn it off +void CNullDriver::turnLightOn(s32 lightIndex, bool turnOn) +{ + // Do nothing +} + + +//! returns the maximal amount of dynamic lights the device can handle +u32 CNullDriver::getMaximalDynamicLightAmount() const +{ + return 0; +} + + +//! Returns current amount of dynamic lights set +//! \return Current amount of dynamic lights set +u32 CNullDriver::getDynamicLightCount() const +{ + return Lights.size(); +} + + +//! Returns light data which was previously set by IVideoDriver::addDynamicLight(). +//! \param idx: Zero based index of the light. Must be greater than 0 and smaller +//! than IVideoDriver()::getDynamicLightCount. +//! \return Light data. +const SLight& CNullDriver::getDynamicLight(u32 idx) const +{ + if ( idx < Lights.size() ) + return Lights[idx]; + else + return *((SLight*)0); +} + + +//! Creates a boolean alpha channel of the texture based of an color key. +void CNullDriver::makeColorKeyTexture(video::ITexture* texture, + video::SColor color, + bool zeroTexels) const +{ + if (!texture) + return; + + if (texture->getColorFormat() != ECF_A1R5G5B5 && + texture->getColorFormat() != ECF_A8R8G8B8 ) + { + os::Printer::log("Error: Unsupported texture color format for making color key channel.", ELL_ERROR); + return; + } + + if (texture->getColorFormat() == ECF_A1R5G5B5) + { + u16 *p = (u16*)texture->lock(); + + if (!p) + { + os::Printer::log("Could not lock texture for making color key channel.", ELL_ERROR); + return; + } + + const core::dimension2d<u32> dim = texture->getSize(); + const u32 pitch = texture->getPitch() / 2; + + // color with alpha disabled (i.e. fully transparent) + const u16 refZeroAlpha = (0x7fff & color.toA1R5G5B5()); + + const u32 pixels = pitch * dim.Height; + + for (u32 pixel = 0; pixel < pixels; ++ pixel) + { + // If the color matches the reference color, ignoring alphas, + // set the alpha to zero. + if(((*p) & 0x7fff) == refZeroAlpha) + { + if(zeroTexels) + (*p) = 0; + else + (*p) = refZeroAlpha; + } + + ++p; + } + + texture->unlock(); + } + else + { + u32 *p = (u32*)texture->lock(); + + if (!p) + { + os::Printer::log("Could not lock texture for making color key channel.", ELL_ERROR); + return; + } + + core::dimension2d<u32> dim = texture->getSize(); + u32 pitch = texture->getPitch() / 4; + + // color with alpha disabled (fully transparent) + const u32 refZeroAlpha = 0x00ffffff & color.color; + + const u32 pixels = pitch * dim.Height; + for (u32 pixel = 0; pixel < pixels; ++ pixel) + { + // If the color matches the reference color, ignoring alphas, + // set the alpha to zero. + if(((*p) & 0x00ffffff) == refZeroAlpha) + { + if(zeroTexels) + (*p) = 0; + else + (*p) = refZeroAlpha; + } + + ++p; + } + + texture->unlock(); + } + texture->regenerateMipMapLevels(); +} + + + +//! Creates an boolean alpha channel of the texture based of an color key position. +void CNullDriver::makeColorKeyTexture(video::ITexture* texture, + core::position2d<s32> colorKeyPixelPos, + bool zeroTexels) const +{ + if (!texture) + return; + + if (texture->getColorFormat() != ECF_A1R5G5B5 && + texture->getColorFormat() != ECF_A8R8G8B8 ) + { + os::Printer::log("Error: Unsupported texture color format for making color key channel.", ELL_ERROR); + return; + } + + SColor colorKey; + + if (texture->getColorFormat() == ECF_A1R5G5B5) + { + u16 *p = (u16*)texture->lock(ETLM_READ_ONLY); + + if (!p) + { + os::Printer::log("Could not lock texture for making color key channel.", ELL_ERROR); + return; + } + + u32 pitch = texture->getPitch() / 2; + + const u16 key16Bit = 0x7fff & p[colorKeyPixelPos.Y*pitch + colorKeyPixelPos.X]; + + colorKey = video::A1R5G5B5toA8R8G8B8(key16Bit); + } + else + { + u32 *p = (u32*)texture->lock(ETLM_READ_ONLY); + + if (!p) + { + os::Printer::log("Could not lock texture for making color key channel.", ELL_ERROR); + return; + } + + u32 pitch = texture->getPitch() / 4; + colorKey = 0x00ffffff & p[colorKeyPixelPos.Y*pitch + colorKeyPixelPos.X]; + } + + texture->unlock(); + makeColorKeyTexture(texture, colorKey, zeroTexels); +} + + + +//! Creates a normal map from a height map texture. +//! \param amplitude: Constant value by which the height information is multiplied. +void CNullDriver::makeNormalMapTexture(video::ITexture* texture, f32 amplitude) const +{ + if (!texture) + return; + + if (texture->getColorFormat() != ECF_A1R5G5B5 && + texture->getColorFormat() != ECF_A8R8G8B8 ) + { + os::Printer::log("Error: Unsupported texture color format for making normal map.", ELL_ERROR); + return; + } + + core::dimension2d<u32> dim = texture->getSize(); + amplitude = amplitude / 255.0f; + f32 vh = dim.Height / (f32)dim.Width; + f32 hh = dim.Width / (f32)dim.Height; + + if (texture->getColorFormat() == ECF_A8R8G8B8) + { + // ECF_A8R8G8B8 version + + s32 *p = (s32*)texture->lock(); + + if (!p) + { + os::Printer::log("Could not lock texture for making normal map.", ELL_ERROR); + return; + } + + // copy texture + + u32 pitch = texture->getPitch() / 4; + + s32* in = new s32[dim.Height * pitch]; + memcpy(in, p, dim.Height * pitch * 4); + + for (s32 x=0; x < s32(pitch); ++x) + for (s32 y=0; y < s32(dim.Height); ++y) + { + // TODO: this could be optimized really a lot + + core::vector3df h1((x-1)*hh, nml32(x-1, y, pitch, dim.Height, in)*amplitude, y*vh); + core::vector3df h2((x+1)*hh, nml32(x+1, y, pitch, dim.Height, in)*amplitude, y*vh); + //core::vector3df v1(x*hh, nml32(x, y-1, pitch, dim.Height, in)*amplitude, (y-1)*vh); + //core::vector3df v2(x*hh, nml32(x, y+1, pitch, dim.Height, in)*amplitude, (y+1)*vh); + core::vector3df v1(x*hh, nml32(x, y+1, pitch, dim.Height, in)*amplitude, (y-1)*vh); + core::vector3df v2(x*hh, nml32(x, y-1, pitch, dim.Height, in)*amplitude, (y+1)*vh); + + core::vector3df v = v1-v2; + core::vector3df h = h1-h2; + + core::vector3df n = v.crossProduct(h); + n.normalize(); + n *= 0.5f; + n += core::vector3df(0.5f,0.5f,0.5f); // now between 0 and 1 + n *= 255.0f; + + s32 height = (s32)nml32(x, y, pitch, dim.Height, in); + p[y*pitch + x] = video::SColor( + height, // store height in alpha + (s32)n.X, (s32)n.Z, (s32)n.Y).color; + } + + delete [] in; + texture->unlock(); + } + else + { + // ECF_A1R5G5B5 version + + s16 *p = (s16*)texture->lock(); + + if (!p) + { + os::Printer::log("Could not lock texture for making normal map.", ELL_ERROR); + return; + } + + u32 pitch = texture->getPitch() / 2; + + // copy texture + + s16* in = new s16[dim.Height * pitch]; + memcpy(in, p, dim.Height * pitch * 2); + + for (s32 x=0; x < s32(pitch); ++x) + for (s32 y=0; y < s32(dim.Height); ++y) + { + // TODO: this could be optimized really a lot + + core::vector3df h1((x-1)*hh, nml16(x-1, y, pitch, dim.Height, in)*amplitude, y*vh); + core::vector3df h2((x+1)*hh, nml16(x+1, y, pitch, dim.Height, in)*amplitude, y*vh); + core::vector3df v1(x*hh, nml16(x, y-1, pitch, dim.Height, in)*amplitude, (y-1)*vh); + core::vector3df v2(x*hh, nml16(x, y+1, pitch, dim.Height, in)*amplitude, (y+1)*vh); + + core::vector3df v = v1-v2; + core::vector3df h = h1-h2; + + core::vector3df n = v.crossProduct(h); + n.normalize(); + n *= 0.5f; + n += core::vector3df(0.5f,0.5f,0.5f); // now between 0 and 1 + n *= 255.0f; + + p[y*pitch + x] = video::RGBA16((u32)n.X, (u32)n.Z, (u32)n.Y); + } + + delete [] in; + texture->unlock(); + } + + texture->regenerateMipMapLevels(); +} + + +//! Returns the maximum amount of primitives (mostly vertices) which +//! the device is able to render with one drawIndexedTriangleList +//! call. +u32 CNullDriver::getMaximalPrimitiveCount() const +{ + return 0xFFFFFFFF; +} + + +//! checks triangle count and print warning if wrong +bool CNullDriver::checkPrimitiveCount(u32 prmCount) const +{ + const u32 m = getMaximalPrimitiveCount(); + + if (prmCount > m) + { + char tmp[1024]; + sprintf(tmp,"Could not draw triangles, too many primitives(%u), maxium is %u.", prmCount, m); + os::Printer::log(tmp, ELL_ERROR); + return false; + } + + return true; +} + +//! Enables or disables a texture creation flag. +void CNullDriver::setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled) +{ + if (enabled && ((flag == ETCF_ALWAYS_16_BIT) || (flag == ETCF_ALWAYS_32_BIT) + || (flag == ETCF_OPTIMIZED_FOR_QUALITY) || (flag == ETCF_OPTIMIZED_FOR_SPEED))) + { + // disable other formats + setTextureCreationFlag(ETCF_ALWAYS_16_BIT, false); + setTextureCreationFlag(ETCF_ALWAYS_32_BIT, false); + setTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY, false); + setTextureCreationFlag(ETCF_OPTIMIZED_FOR_SPEED, false); + } + + // set flag + TextureCreationFlags = (TextureCreationFlags & (~flag)) | + ((((u32)!enabled)-1) & flag); +} + + +//! Returns if a texture creation flag is enabled or disabled. +bool CNullDriver::getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const +{ + return (TextureCreationFlags & flag)!=0; +} + + +//! Creates a software image from a file. +IImage* CNullDriver::createImageFromFile(const io::path& filename) +{ + if (!filename.size()) + return 0; + + IImage* image = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + image = createImageFromFile(file); + file->drop(); + } + else + os::Printer::log("Could not open file of image", filename, ELL_WARNING); + + return image; +} + + +//! Creates a software image from a file. +IImage* CNullDriver::createImageFromFile(io::IReadFile* file) +{ + if (!file) + return 0; + + IImage* image = 0; + + s32 i; + + // try to load file based on file extension + for (i=SurfaceLoader.size()-1; i>=0; --i) + { + if (SurfaceLoader[i]->isALoadableFileExtension(file->getFileName())) + { + // reset file position which might have changed due to previous loadImage calls + file->seek(0); + image = SurfaceLoader[i]->loadImage(file); + if (image) + return image; + } + } + + // try to load file based on what is in it + for (i=SurfaceLoader.size()-1; i>=0; --i) + { + // dito + file->seek(0); + if (SurfaceLoader[i]->isALoadableFileFormat(file)) + { + file->seek(0); + image = SurfaceLoader[i]->loadImage(file); + if (image) + return image; + } + } + + return 0; // failed to load +} + + +//! Writes the provided image to disk file +bool CNullDriver::writeImageToFile(IImage* image, const io::path& filename,u32 param) +{ + io::IWriteFile* file = FileSystem->createAndWriteFile(filename); + if(!file) + return false; + + bool result = writeImageToFile(image, file, param); + file->drop(); + + return result; +} + +//! Writes the provided image to a file. +bool CNullDriver::writeImageToFile(IImage* image, io::IWriteFile * file, u32 param) +{ + if(!file) + return false; + + for (s32 i=SurfaceWriter.size()-1; i>=0; --i) + { + if (SurfaceWriter[i]->isAWriteableFileExtension(file->getFileName())) + { + bool written = SurfaceWriter[i]->writeImage(file, image, param); + if (written) + return true; + } + } + return false; // failed to write +} + + +//! Creates a software image from a byte array. +IImage* CNullDriver::createImageFromData(ECOLOR_FORMAT format, + const core::dimension2d<u32>& size, + void *data, bool ownForeignMemory, + bool deleteMemory) +{ + if(IImage::isRenderTargetOnlyFormat(format)) + { + os::Printer::log("Could not create IImage, format only supported for render target textures.", ELL_WARNING); + return 0; + } + + return new CImage(format, size, data, ownForeignMemory, deleteMemory); +} + + +//! Creates an empty software image. +IImage* CNullDriver::createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) +{ + if(IImage::isRenderTargetOnlyFormat(format)) + { + os::Printer::log("Could not create IImage, format only supported for render target textures.", ELL_WARNING); + return 0; + } + + return new CImage(format, size); +} + + +//! Creates a software image from another image. +IImage* CNullDriver::createImage(ECOLOR_FORMAT format, IImage *imageToCopy) +{ + os::Printer::log("Deprecated method, please create an empty image instead and use copyTo().", ELL_WARNING); + if(IImage::isRenderTargetOnlyFormat(format)) + { + os::Printer::log("Could not create IImage, format only supported for render target textures.", ELL_WARNING); + return 0; + } + + CImage* tmp = new CImage(format, imageToCopy->getDimension()); + imageToCopy->copyTo(tmp); + return tmp; +} + + +//! Creates a software image from part of another image. +IImage* CNullDriver::createImage(IImage* imageToCopy, const core::position2d<s32>& pos, const core::dimension2d<u32>& size) +{ + os::Printer::log("Deprecated method, please create an empty image instead and use copyTo().", ELL_WARNING); + CImage* tmp = new CImage(imageToCopy->getColorFormat(), imageToCopy->getDimension()); + imageToCopy->copyTo(tmp, core::position2di(0,0), core::recti(pos,size)); + return tmp; +} + + +//! Creates a software image from part of a texture. +IImage* CNullDriver::createImage(ITexture* texture, const core::position2d<s32>& pos, const core::dimension2d<u32>& size) +{ + if ((pos==core::position2di(0,0)) && (size == texture->getSize())) + { + IImage* image = new CImage(texture->getColorFormat(), size, texture->lock(ETLM_READ_ONLY), false); + texture->unlock(); + return image; + } + else + { + // make sure to avoid buffer overruns + // make the vector a separate variable for g++ 3.x + const core::vector2d<u32> leftUpper(core::clamp(static_cast<u32>(pos.X), 0u, texture->getSize().Width), + core::clamp(static_cast<u32>(pos.Y), 0u, texture->getSize().Height)); + const core::rect<u32> clamped(leftUpper, + core::dimension2du(core::clamp(static_cast<u32>(size.Width), 0u, texture->getSize().Width), + core::clamp(static_cast<u32>(size.Height), 0u, texture->getSize().Height))); + if (!clamped.isValid()) + return 0; + u8* src = static_cast<u8*>(texture->lock(ETLM_READ_ONLY)); + if (!src) + return 0; + IImage* image = new CImage(texture->getColorFormat(), clamped.getSize()); + u8* dst = static_cast<u8*>(image->lock()); + src += clamped.UpperLeftCorner.Y * texture->getPitch() + image->getBytesPerPixel() * clamped.UpperLeftCorner.X; + for (u32 i=0; i<clamped.getHeight(); ++i) + { + video::CColorConverter::convert_viaFormat(src, texture->getColorFormat(), clamped.getWidth(), dst, image->getColorFormat()); + src += texture->getPitch(); + dst += image->getPitch(); + } + image->unlock(); + texture->unlock(); + return image; + } +} + + +//! Sets the fog mode. +void CNullDriver::setFog(SColor color, E_FOG_TYPE fogType, f32 start, f32 end, + f32 density, bool pixelFog, bool rangeFog) +{ + FogColor = color; + FogType = fogType; + FogStart = start; + FogEnd = end; + FogDensity = density; + PixelFog = pixelFog; + RangeFog = rangeFog; +} + +//! Gets the fog mode. +void CNullDriver::getFog(SColor& color, E_FOG_TYPE& fogType, f32& start, f32& end, + f32& density, bool& pixelFog, bool& rangeFog) +{ + color = FogColor; + fogType = FogType; + start = FogStart; + end = FogEnd; + density = FogDensity; + pixelFog = PixelFog; + rangeFog = RangeFog; +} + +//! Draws a mesh buffer +void CNullDriver::drawMeshBuffer(const scene::IMeshBuffer* mb) +{ + if (!mb) + return; + + //IVertexBuffer and IIndexBuffer later + SHWBufferLink *HWBuffer=getBufferLink(mb); + + if (HWBuffer) + drawHardwareBuffer(HWBuffer); + else + drawVertexPrimitiveList(mb->getVertices(), mb->getVertexCount(), mb->getIndices(), mb->getIndexCount()/3, mb->getVertexType(), scene::EPT_TRIANGLES, mb->getIndexType()); +} + + +//! Draws the normals of a mesh buffer +void CNullDriver::drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length, SColor color) +{ + const u32 count = mb->getVertexCount(); + const bool normalize = mb->getMaterial().NormalizeNormals; + + for (u32 i=0; i < count; ++i) + { + core::vector3df normalizedNormal = mb->getNormal(i); + if (normalize) + normalizedNormal.normalize(); + + const core::vector3df& pos = mb->getPosition(i); + draw3DLine(pos, pos + (normalizedNormal * length), color); + } +} + + +CNullDriver::SHWBufferLink *CNullDriver::getBufferLink(const scene::IMeshBuffer* mb) +{ + if (!mb || !isHardwareBufferRecommend(mb)) + return 0; + + //search for hardware links + core::map< const scene::IMeshBuffer*,SHWBufferLink* >::Node* node = HWBufferMap.find(mb); + if (node) + return node->getValue(); + + return createHardwareBuffer(mb); //no hardware links, and mesh wants one, create it +} + + +//! Update all hardware buffers, remove unused ones +void CNullDriver::updateAllHardwareBuffers() +{ + core::map<const scene::IMeshBuffer*,SHWBufferLink*>::ParentFirstIterator Iterator=HWBufferMap.getParentFirstIterator(); + + for (;!Iterator.atEnd();Iterator++) + { + SHWBufferLink *Link=Iterator.getNode()->getValue(); + + Link->LastUsed++; + if (Link->LastUsed>20000) + { + deleteHardwareBuffer(Link); + + // todo: needs better fix + Iterator = HWBufferMap.getParentFirstIterator(); + } + } +} + + +void CNullDriver::deleteHardwareBuffer(SHWBufferLink *HWBuffer) +{ + if (!HWBuffer) + return; + HWBufferMap.remove(HWBuffer->MeshBuffer); + delete HWBuffer; +} + + +//! Remove hardware buffer +void CNullDriver::removeHardwareBuffer(const scene::IMeshBuffer* mb) +{ + core::map<const scene::IMeshBuffer*,SHWBufferLink*>::Node* node = HWBufferMap.find(mb); + if (node) + deleteHardwareBuffer(node->getValue()); +} + + +//! Remove all hardware buffers +void CNullDriver::removeAllHardwareBuffers() +{ + while (HWBufferMap.size()) + deleteHardwareBuffer(HWBufferMap.getRoot()->getValue()); +} + + +bool CNullDriver::isHardwareBufferRecommend(const scene::IMeshBuffer* mb) +{ + if (!mb || (mb->getHardwareMappingHint_Index()==scene::EHM_NEVER && mb->getHardwareMappingHint_Vertex()==scene::EHM_NEVER)) + return false; + + if (mb->getVertexCount()<MinVertexCountForVBO) + return false; + + return true; +} + + +//! Create occlusion query. +/** Use node for identification and mesh for occlusion test. */ +void CNullDriver::addOcclusionQuery(scene::ISceneNode* node, const scene::IMesh* mesh) +{ + if (!node) + return; + if (!mesh) + { + if ((node->getType() != scene::ESNT_MESH) && (node->getType() != scene::ESNT_ANIMATED_MESH)) + return; + else if (node->getType() == scene::ESNT_MESH) + mesh = static_cast<scene::IMeshSceneNode*>(node)->getMesh(); + else + mesh = static_cast<scene::IAnimatedMeshSceneNode*>(node)->getMesh()->getMesh(0); + if (!mesh) + return; + } + + //search for query + s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + if (OcclusionQueries[index].Mesh != mesh) + { + OcclusionQueries[index].Mesh->drop(); + OcclusionQueries[index].Mesh = mesh; + mesh->grab(); + } + } + else + { + OcclusionQueries.push_back(SOccQuery(node, mesh)); + node->setAutomaticCulling(node->getAutomaticCulling() | scene::EAC_OCC_QUERY); + } +} + + +//! Remove occlusion query. +void CNullDriver::removeOcclusionQuery(scene::ISceneNode* node) +{ + //search for query + s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + node->setAutomaticCulling(node->getAutomaticCulling() & ~scene::EAC_OCC_QUERY); + OcclusionQueries.erase(index); + } +} + + +//! Remove all occlusion queries. +void CNullDriver::removeAllOcclusionQueries() +{ + for (s32 i=OcclusionQueries.size()-1; i>=0; --i) + { + removeOcclusionQuery(OcclusionQueries[i].Node); + } +} + + +//! Run occlusion query. Draws mesh stored in query. +/** If the mesh shall be rendered visible, use +flag to enable the proper material setting. */ +void CNullDriver::runOcclusionQuery(scene::ISceneNode* node, bool visible) +{ + if(!node) + return; + s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index==-1) + return; + OcclusionQueries[index].Run=0; + if (!visible) + { + SMaterial mat; + mat.Lighting=false; + mat.AntiAliasing=0; + mat.ColorMask=ECP_NONE; + mat.GouraudShading=false; + mat.ZWriteEnable=false; + setMaterial(mat); + } + setTransform(video::ETS_WORLD, node->getAbsoluteTransformation()); + const scene::IMesh* mesh = OcclusionQueries[index].Mesh; + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + if (visible) + setMaterial(mesh->getMeshBuffer(i)->getMaterial()); + drawMeshBuffer(mesh->getMeshBuffer(i)); + } +} + + +//! Run all occlusion queries. Draws all meshes stored in queries. +/** If the meshes shall not be rendered visible, use +overrideMaterial to disable the color and depth buffer. */ +void CNullDriver::runAllOcclusionQueries(bool visible) +{ + for (u32 i=0; i<OcclusionQueries.size(); ++i) + runOcclusionQuery(OcclusionQueries[i].Node, visible); +} + + +//! Update occlusion query. Retrieves results from GPU. +/** If the query shall not block, set the flag to false. +Update might not occur in this case, though */ +void CNullDriver::updateOcclusionQuery(scene::ISceneNode* node, bool block) +{ +} + + +//! Update all occlusion queries. Retrieves results from GPU. +/** If the query shall not block, set the flag to false. +Update might not occur in this case, though */ +void CNullDriver::updateAllOcclusionQueries(bool block) +{ + for (u32 i=0; i<OcclusionQueries.size(); ++i) + { + if (OcclusionQueries[i].Run==u32(~0)) + continue; + updateOcclusionQuery(OcclusionQueries[i].Node, block); + ++OcclusionQueries[i].Run; + if (OcclusionQueries[i].Run>1000) + removeOcclusionQuery(OcclusionQueries[i].Node); + } +} + + +//! Return query result. +/** Return value is the number of visible pixels/fragments. +The value is a safe approximation, i.e. can be larger then the +actual value of pixels. */ +u32 CNullDriver::getOcclusionQueryResult(scene::ISceneNode* node) const +{ + return ~0; +} + + +//! Only used by the internal engine. Used to notify the driver that +//! the window was resized. +void CNullDriver::OnResize(const core::dimension2d<u32>& size) +{ + if (ViewPort.getWidth() == (s32)ScreenSize.Width && + ViewPort.getHeight() == (s32)ScreenSize.Height) + ViewPort = core::rect<s32>(core::position2d<s32>(0,0), + core::dimension2di(size)); + + ScreenSize = size; +} + + +// adds a material renderer and drops it afterwards. To be used for internal creation +s32 CNullDriver::addAndDropMaterialRenderer(IMaterialRenderer* m) +{ + s32 i = addMaterialRenderer(m); + + if (m) + m->drop(); + + return i; +} + + +//! Adds a new material renderer to the video device. +s32 CNullDriver::addMaterialRenderer(IMaterialRenderer* renderer, const char* name) +{ + if (!renderer) + return -1; + + SMaterialRenderer r; + r.Renderer = renderer; + r.Name = name; + + if (name == 0 && (MaterialRenderers.size() < (sizeof(sBuiltInMaterialTypeNames) / sizeof(char*))-1 )) + { + // set name of built in renderer so that we don't have to implement name + // setting in all available renderers. + r.Name = sBuiltInMaterialTypeNames[MaterialRenderers.size()]; + } + + MaterialRenderers.push_back(r); + renderer->grab(); + + return MaterialRenderers.size()-1; +} + + +//! Sets the name of a material renderer. +void CNullDriver::setMaterialRendererName(s32 idx, const char* name) +{ + if (idx < s32(sizeof(sBuiltInMaterialTypeNames) / sizeof(char*))-1 || + idx >= (s32)MaterialRenderers.size()) + return; + + MaterialRenderers[idx].Name = name; +} + + +//! Creates material attributes list from a material, usable for serialization and more. +io::IAttributes* CNullDriver::createAttributesFromMaterial(const video::SMaterial& material, + io::SAttributeReadWriteOptions* options) +{ + io::CAttributes* attr = new io::CAttributes(this); + + attr->addEnum("Type", material.MaterialType, sBuiltInMaterialTypeNames); + + attr->addColor("Ambient", material.AmbientColor); + attr->addColor("Diffuse", material.DiffuseColor); + attr->addColor("Emissive", material.EmissiveColor); + attr->addColor("Specular", material.SpecularColor); + + attr->addFloat("Shininess", material.Shininess); + attr->addFloat("Param1", material.MaterialTypeParam); + attr->addFloat("Param2", material.MaterialTypeParam2); + + core::stringc prefix="Texture"; + u32 i; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + { + if (options && (options->Flags&io::EARWF_USE_RELATIVE_PATHS) && options->Filename && material.getTexture(i)) + { + io::path path = FileSystem->getRelativeFilename( + FileSystem->getAbsolutePath(material.getTexture(i)->getName()), options->Filename); + attr->addTexture((prefix+core::stringc(i+1)).c_str(), material.getTexture(i), path); + } + else + attr->addTexture((prefix+core::stringc(i+1)).c_str(), material.getTexture(i)); + } + + attr->addBool("Wireframe", material.Wireframe); + attr->addBool("GouraudShading", material.GouraudShading); + attr->addBool("Lighting", material.Lighting); + attr->addBool("ZWriteEnable", material.ZWriteEnable); + attr->addInt("ZBuffer", material.ZBuffer); + attr->addBool("BackfaceCulling", material.BackfaceCulling); + attr->addBool("FrontfaceCulling", material.FrontfaceCulling); + attr->addBool("FogEnable", material.FogEnable); + attr->addBool("NormalizeNormals", material.NormalizeNormals); + attr->addBool("UseMipMaps", material.UseMipMaps); + attr->addInt("AntiAliasing", material.AntiAliasing); + attr->addInt("ColorMask", material.ColorMask); + attr->addInt("ColorMaterial", material.ColorMaterial); + attr->addInt("PolygonOffsetFactor", material.PolygonOffsetFactor); + attr->addEnum("PolygonOffsetDirection", material.PolygonOffsetDirection, video::PolygonOffsetDirectionNames); + + prefix = "BilinearFilter"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + attr->addBool((prefix+core::stringc(i+1)).c_str(), material.TextureLayer[i].BilinearFilter); + prefix = "TrilinearFilter"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + attr->addBool((prefix+core::stringc(i+1)).c_str(), material.TextureLayer[i].TrilinearFilter); + prefix = "AnisotropicFilter"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + attr->addInt((prefix+core::stringc(i+1)).c_str(), material.TextureLayer[i].AnisotropicFilter); + prefix="TextureWrapU"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + attr->addEnum((prefix+core::stringc(i+1)).c_str(), material.TextureLayer[i].TextureWrapU, aTextureClampNames); + prefix="TextureWrapV"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + attr->addEnum((prefix+core::stringc(i+1)).c_str(), material.TextureLayer[i].TextureWrapV, aTextureClampNames); + prefix="LODBias"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + attr->addInt((prefix+core::stringc(i+1)).c_str(), material.TextureLayer[i].LODBias); + + return attr; +} + + +//! Fills an SMaterial structure from attributes. +void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attr) +{ + outMaterial.MaterialType = video::EMT_SOLID; + + core::stringc name = attr->getAttributeAsString("Type"); + + u32 i; + + for ( i=0; i < MaterialRenderers.size(); ++i) + if ( name == MaterialRenderers[i].Name ) + { + outMaterial.MaterialType = (video::E_MATERIAL_TYPE)i; + break; + } + + outMaterial.AmbientColor = attr->getAttributeAsColor("Ambient"); + outMaterial.DiffuseColor = attr->getAttributeAsColor("Diffuse"); + outMaterial.EmissiveColor = attr->getAttributeAsColor("Emissive"); + outMaterial.SpecularColor = attr->getAttributeAsColor("Specular"); + + outMaterial.Shininess = attr->getAttributeAsFloat("Shininess"); + outMaterial.MaterialTypeParam = attr->getAttributeAsFloat("Param1"); + outMaterial.MaterialTypeParam2 = attr->getAttributeAsFloat("Param2"); + + core::stringc prefix="Texture"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + outMaterial.setTexture(i, attr->getAttributeAsTexture((prefix+core::stringc(i+1)).c_str())); + + outMaterial.Wireframe = attr->getAttributeAsBool("Wireframe"); + outMaterial.GouraudShading = attr->getAttributeAsBool("GouraudShading"); + outMaterial.Lighting = attr->getAttributeAsBool("Lighting"); + outMaterial.ZWriteEnable = attr->getAttributeAsBool("ZWriteEnable"); + outMaterial.ZBuffer = (u8)attr->getAttributeAsInt("ZBuffer"); + outMaterial.BackfaceCulling = attr->getAttributeAsBool("BackfaceCulling"); + outMaterial.FrontfaceCulling = attr->getAttributeAsBool("FrontfaceCulling"); + outMaterial.FogEnable = attr->getAttributeAsBool("FogEnable"); + outMaterial.NormalizeNormals = attr->getAttributeAsBool("NormalizeNormals"); + if (attr->existsAttribute("UseMipMaps")) // legacy + outMaterial.UseMipMaps = attr->getAttributeAsBool("UseMipMaps"); + else + outMaterial.UseMipMaps = true; + + // default 0 is ok + outMaterial.AntiAliasing = attr->getAttributeAsInt("AntiAliasing"); + if (attr->existsAttribute("ColorMask")) + outMaterial.ColorMask = attr->getAttributeAsInt("ColorMask"); + if (attr->existsAttribute("ColorMaterial")) + outMaterial.ColorMaterial = attr->getAttributeAsInt("ColorMaterial"); + if (attr->existsAttribute("PolygonOffsetFactor")) + outMaterial.PolygonOffsetFactor = attr->getAttributeAsInt("PolygonOffsetFactor"); + if (attr->existsAttribute("PolygonOffsetDirection")) + outMaterial.PolygonOffsetDirection = (video::E_POLYGON_OFFSET)attr->getAttributeAsEnumeration("PolygonOffsetDirection", video::PolygonOffsetDirectionNames); + prefix = "BilinearFilter"; + if (attr->existsAttribute(prefix.c_str())) // legacy + outMaterial.setFlag(EMF_BILINEAR_FILTER, attr->getAttributeAsBool(prefix.c_str())); + else + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + outMaterial.TextureLayer[i].BilinearFilter = attr->getAttributeAsBool((prefix+core::stringc(i+1)).c_str()); + + prefix = "TrilinearFilter"; + if (attr->existsAttribute(prefix.c_str())) // legacy + outMaterial.setFlag(EMF_TRILINEAR_FILTER, attr->getAttributeAsBool(prefix.c_str())); + else + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + outMaterial.TextureLayer[i].TrilinearFilter = attr->getAttributeAsBool((prefix+core::stringc(i+1)).c_str()); + + prefix = "AnisotropicFilter"; + if (attr->existsAttribute(prefix.c_str())) // legacy + outMaterial.setFlag(EMF_ANISOTROPIC_FILTER, attr->getAttributeAsBool(prefix.c_str())); + else + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + outMaterial.TextureLayer[i].AnisotropicFilter = attr->getAttributeAsInt((prefix+core::stringc(i+1)).c_str()); + + prefix = "TextureWrap"; + if (attr->existsAttribute(prefix.c_str())) // legacy + { + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + { + outMaterial.TextureLayer[i].TextureWrapU = (E_TEXTURE_CLAMP)attr->getAttributeAsEnumeration((prefix+core::stringc(i+1)).c_str(), aTextureClampNames); + outMaterial.TextureLayer[i].TextureWrapV = outMaterial.TextureLayer[i].TextureWrapU; + } + } + else + { + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + { + outMaterial.TextureLayer[i].TextureWrapU = (E_TEXTURE_CLAMP)attr->getAttributeAsEnumeration((prefix+"U"+core::stringc(i+1)).c_str(), aTextureClampNames); + outMaterial.TextureLayer[i].TextureWrapV = (E_TEXTURE_CLAMP)attr->getAttributeAsEnumeration((prefix+"V"+core::stringc(i+1)).c_str(), aTextureClampNames); + } + } + + // default 0 is ok + prefix="LODBias"; + for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) + outMaterial.TextureLayer[i].LODBias = attr->getAttributeAsInt((prefix+core::stringc(i+1)).c_str()); +} + + +//! Returns driver and operating system specific data about the IVideoDriver. +const SExposedVideoData& CNullDriver::getExposedVideoData() +{ + return ExposedData; +} + + +//! Returns type of video driver +E_DRIVER_TYPE CNullDriver::getDriverType() const +{ + return EDT_NULL; +} + + +//! deletes all material renderers +void CNullDriver::deleteMaterialRenders() +{ + // delete material renderers + for (u32 i=0; i<MaterialRenderers.size(); ++i) + if (MaterialRenderers[i].Renderer) + MaterialRenderers[i].Renderer->drop(); + + MaterialRenderers.clear(); +} + + +//! Returns pointer to material renderer or null +IMaterialRenderer* CNullDriver::getMaterialRenderer(u32 idx) +{ + if ( idx < MaterialRenderers.size() ) + return MaterialRenderers[idx].Renderer; + else + return 0; +} + + +//! Returns amount of currently available material renderers. +u32 CNullDriver::getMaterialRendererCount() const +{ + return MaterialRenderers.size(); +} + + +//! Returns name of the material renderer +const char* CNullDriver::getMaterialRendererName(u32 idx) const +{ + if ( idx < MaterialRenderers.size() ) + return MaterialRenderers[idx].Name.c_str(); + + return 0; +} + + +//! Returns pointer to the IGPUProgrammingServices interface. +IGPUProgrammingServices* CNullDriver::getGPUProgrammingServices() +{ + return this; +} + + +//! Adds a new material renderer to the VideoDriver, based on a high level shading language. +s32 CNullDriver::addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName, + E_GEOMETRY_SHADER_TYPE gsCompileTarget, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) +{ + os::Printer::log("High level shader materials not available (yet) in this driver, sorry"); + return -1; +} + + +//! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description), +//! but tries to load the programs from files. +s32 CNullDriver::addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFileName, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const io::path& pixelShaderProgramFileName, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const io::path& geometryShaderProgramFileName, + const c8* geometryShaderEntryPointName, + E_GEOMETRY_SHADER_TYPE gsCompileTarget, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) +{ + io::IReadFile* vsfile = 0; + io::IReadFile* psfile = 0; + io::IReadFile* gsfile = 0; + + if (vertexShaderProgramFileName.size() ) + { + vsfile = FileSystem->createAndOpenFile(vertexShaderProgramFileName); + if (!vsfile) + { + os::Printer::log("Could not open vertex shader program file", + vertexShaderProgramFileName, ELL_WARNING); + } + } + + if (pixelShaderProgramFileName.size() ) + { + psfile = FileSystem->createAndOpenFile(pixelShaderProgramFileName); + if (!psfile) + { + os::Printer::log("Could not open pixel shader program file", + pixelShaderProgramFileName, ELL_WARNING); + } + } + + if (geometryShaderProgramFileName.size() ) + { + gsfile = FileSystem->createAndOpenFile(geometryShaderProgramFileName); + if (!gsfile) + { + os::Printer::log("Could not open geometry shader program file", + geometryShaderProgramFileName, ELL_WARNING); + } + } + + s32 result = addHighLevelShaderMaterialFromFiles( + vsfile, vertexShaderEntryPointName, vsCompileTarget, + psfile, pixelShaderEntryPointName, psCompileTarget, + gsfile, geometryShaderEntryPointName, gsCompileTarget, + inType, outType, verticesOut, + callback, baseMaterial, userData, shadingLang); + + if (psfile) + psfile->drop(); + + if (vsfile) + vsfile->drop(); + + if (gsfile) + gsfile->drop(); + + return result; +} + + +//! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description), +//! but tries to load the programs from files. +s32 CNullDriver::addHighLevelShaderMaterialFromFiles( + io::IReadFile* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + io::IReadFile* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + io::IReadFile* geometryShaderProgram, + const c8* geometryShaderEntryPointName, + E_GEOMETRY_SHADER_TYPE gsCompileTarget, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) +{ + c8* vs = 0; + c8* ps = 0; + c8* gs = 0; + + if (vertexShaderProgram) + { + const long size = vertexShaderProgram->getSize(); + if (size) + { + vs = new c8[size+1]; + vertexShaderProgram->read(vs, size); + vs[size] = 0; + } + } + + if (pixelShaderProgram) + { + const long size = pixelShaderProgram->getSize(); + if (size) + { + // if both handles are the same we must reset the file + if (pixelShaderProgram==vertexShaderProgram) + pixelShaderProgram->seek(0); + ps = new c8[size+1]; + pixelShaderProgram->read(ps, size); + ps[size] = 0; + } + } + + if (geometryShaderProgram) + { + const long size = geometryShaderProgram->getSize(); + if (size) + { + // if both handles are the same we must reset the file + if ((geometryShaderProgram==vertexShaderProgram) || + (geometryShaderProgram==pixelShaderProgram)) + geometryShaderProgram->seek(0); + gs = new c8[size+1]; + geometryShaderProgram->read(gs, size); + gs[size] = 0; + } + } + + s32 result = this->addHighLevelShaderMaterial( + vs, vertexShaderEntryPointName, vsCompileTarget, + ps, pixelShaderEntryPointName, psCompileTarget, + gs, geometryShaderEntryPointName, gsCompileTarget, + inType, outType, verticesOut, + callback, baseMaterial, userData, shadingLang); + + delete [] vs; + delete [] ps; + delete [] gs; + + return result; +} + + +//! Adds a new material renderer to the VideoDriver, using pixel and/or +//! vertex shaders to render geometry. +s32 CNullDriver::addShaderMaterial(const c8* vertexShaderProgram, + const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData) +{ + os::Printer::log("Shader materials not implemented yet in this driver, sorry."); + return -1; +} + + +//! Like IGPUProgrammingServices::addShaderMaterial(), but tries to load the +//! programs from files. +s32 CNullDriver::addShaderMaterialFromFiles(io::IReadFile* vertexShaderProgram, + io::IReadFile* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData) +{ + c8* vs = 0; + c8* ps = 0; + + if (vertexShaderProgram) + { + const long size = vertexShaderProgram->getSize(); + if (size) + { + vs = new c8[size+1]; + vertexShaderProgram->read(vs, size); + vs[size] = 0; + } + } + + if (pixelShaderProgram) + { + const long size = pixelShaderProgram->getSize(); + if (size) + { + ps = new c8[size+1]; + pixelShaderProgram->read(ps, size); + ps[size] = 0; + } + } + + s32 result = addShaderMaterial(vs, ps, callback, baseMaterial, userData); + + delete [] vs; + delete [] ps; + + return result; +} + + +//! Like IGPUProgrammingServices::addShaderMaterial(), but tries to load the +//! programs from files. +s32 CNullDriver::addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName, + const io::path& pixelShaderProgramFileName, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData) +{ + io::IReadFile* vsfile = 0; + io::IReadFile* psfile = 0; + + if (vertexShaderProgramFileName.size()) + { + vsfile = FileSystem->createAndOpenFile(vertexShaderProgramFileName); + if (!vsfile) + { + os::Printer::log("Could not open vertex shader program file", + vertexShaderProgramFileName, ELL_WARNING); + return -1; + } + } + + if (pixelShaderProgramFileName.size()) + { + psfile = FileSystem->createAndOpenFile(pixelShaderProgramFileName); + if (!psfile) + { + os::Printer::log("Could not open pixel shader program file", + pixelShaderProgramFileName, ELL_WARNING); + if (vsfile) + vsfile->drop(); + return -1; + } + } + + s32 result = addShaderMaterialFromFiles(vsfile, psfile, callback, + baseMaterial, userData); + + if (psfile) + psfile->drop(); + + if (vsfile) + vsfile->drop(); + + return result; +} + + +//! Creates a render target texture. +ITexture* CNullDriver::addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path&name, const ECOLOR_FORMAT format) +{ + return 0; +} + + +//! Clears the ZBuffer. +void CNullDriver::clearZBuffer() +{ +} + + +//! Returns a pointer to the mesh manipulator. +scene::IMeshManipulator* CNullDriver::getMeshManipulator() +{ + return MeshManipulator; +} + + +//! Returns an image created from the last rendered frame. +IImage* CNullDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RENDER_TARGET target) +{ + return 0; +} + + +// prints renderer version +void CNullDriver::printVersion() +{ + core::stringw namePrint = L"Using renderer: "; + namePrint += getName(); + os::Printer::log(namePrint.c_str(), ELL_INFORMATION); +} + + +//! creates a video driver +IVideoDriver* createNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize) +{ + CNullDriver* nullDriver = new CNullDriver(io, screenSize); + + // create empty material renderers + for(u32 i=0; sBuiltInMaterialTypeNames[i]; ++i) + { + IMaterialRenderer* imr = new IMaterialRenderer(); + nullDriver->addMaterialRenderer(imr); + imr->drop(); + } + + return nullDriver; +} + + +//! Set/unset a clipping plane. +//! There are at least 6 clipping planes available for the user to set at will. +//! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. +//! \param plane: The plane itself. +//! \param enable: If true, enable the clipping plane else disable it. +bool CNullDriver::setClipPlane(u32 index, const core::plane3df& plane, bool enable) +{ + return false; +} + + +//! Enable/disable a clipping plane. +void CNullDriver::enableClipPlane(u32 index, bool enable) +{ + // not necessary +} + + +ITexture* CNullDriver::createRenderTargetTexture(const core::dimension2d<u32>& size, + const c8* name) +{ + os::Printer::log("createRenderTargetTexture is deprecated, use addRenderTargetTexture instead"); + ITexture* tex = addRenderTargetTexture(size, name); + tex->grab(); + return tex; +} + + +void CNullDriver::setMinHardwareBufferVertexCount(u32 count) +{ + MinVertexCountForVBO = count; +} + + +SOverrideMaterial& CNullDriver::getOverrideMaterial() +{ + return OverrideMaterial; +} + + +//! Get the 2d override material for altering its values +SMaterial& CNullDriver::getMaterial2D() +{ + return OverrideMaterial2D; +} + + +//! Enable the 2d override material +void CNullDriver::enableMaterial2D(bool enable) +{ + OverrideMaterial2DEnabled=enable; +} + + +core::dimension2du CNullDriver::getMaxTextureSize() const +{ + return core::dimension2du(0x10000,0x10000); // maybe large enough +} + + +//! Color conversion convenience function +/** Convert an image (as array of pixels) from source to destination +array, thereby converting the color format. The pixel size is +determined by the color formats. +\param sP Pointer to source +\param sF Color format of source +\param sN Number of pixels to convert, both array must be large enough +\param dP Pointer to destination +\param dF Color format of destination +*/ +void CNullDriver::convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN, + void* dP, ECOLOR_FORMAT dF) const +{ + video::CColorConverter::convert_viaFormat(sP, sF, sN, dP, dF); +} + + +} // end namespace +} // end namespace diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.h new file mode 100644 index 0000000..ead4776 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CNullDriver.h @@ -0,0 +1,849 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_VIDEO_NULL_H_INCLUDED__ +#define __C_VIDEO_NULL_H_INCLUDED__ + +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "IImagePresenter.h" +#include "IGPUProgrammingServices.h" +#include "irrArray.h" +#include "irrString.h" +#include "irrMap.h" +#include "IAttributes.h" +#include "IMesh.h" +#include "IMeshBuffer.h" +#include "IMeshSceneNode.h" +#include "CFPSCounter.h" +#include "S3DVertex.h" +#include "SVertexIndex.h" +#include "SLight.h" +#include "SExposedVideoData.h" + +#ifdef _MSC_VER +#pragma warning( disable: 4996) +#endif + +namespace irr +{ +namespace io +{ + class IWriteFile; + class IReadFile; +} // end namespace io +namespace video +{ + class IImageLoader; + class IImageWriter; + + class CNullDriver : public IVideoDriver, public IGPUProgrammingServices + { + public: + + //! constructor + CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize); + + //! destructor + virtual ~CNullDriver(); + + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect<s32>* sourceRect=0); + + virtual bool endScene(); + + //! Disable a feature of the driver. + virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true); + + //! queries the features of the driver, returns true if feature is available + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + + //! Get attributes of the actual video driver + const io::IAttributes& getDriverAttributes() const; + + //! sets transformation + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); + + //! Retrieve the number of image loaders + virtual u32 getImageLoaderCount() const; + + //! Retrieve the given image loader + virtual IImageLoader* getImageLoader(u32 n); + + //! Retrieve the number of image writers + virtual u32 getImageWriterCount() const; + + //! Retrieve the given image writer + virtual IImageWriter* getImageWriter(u32 n); + + //! sets a material + virtual void setMaterial(const SMaterial& material); + + //! loads a Texture + virtual ITexture* getTexture(const io::path& filename); + + //! loads a Texture + virtual ITexture* getTexture(io::IReadFile* file); + + //! Returns a texture by index + virtual ITexture* getTextureByIndex(u32 index); + + //! Returns amount of textures currently loaded + virtual u32 getTextureCount() const; + + //! Renames a texture + virtual void renameTexture(ITexture* texture, const io::path& newName); + + //! creates a Texture + virtual ITexture* addTexture(const core::dimension2d<u32>& size, const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8); + + //! sets a render target + virtual bool setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color); + + //! set or reset special render targets + virtual bool setRenderTarget(video::E_RENDER_TARGET target, bool clearTarget, + bool clearZBuffer, SColor color); + + //! Sets multiple render targets + virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture, + bool clearBackBuffer=true, bool clearZBuffer=true, SColor color=SColor(0,0,0,0)); + + //! sets a viewport + virtual void setViewPort(const core::rect<s32>& area); + + //! gets the area of the current viewport + virtual const core::rect<s32>& getViewPort() const; + + //! draws a vertex primitive list + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT); + + //! draws a vertex primitive list in 2d + virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT); + + //! Draws a 3d line. + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color = SColor(255,255,255,255)); + + //! Draws a 3d triangle. + virtual void draw3DTriangle(const core::triangle3df& triangle, + SColor color = SColor(255,255,255,255)); + + //! Draws a 3d axis aligned box. + virtual void draw3DBox(const core::aabbox3d<f32>& box, + SColor color = SColor(255,255,255,255)); + + //! draws an 2d image + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos); + + //! draws a set of 2d images, using a color and the alpha + /** channel of the texture if desired. The images are drawn + beginning at pos and concatenated in one line. All drawings + are clipped against clipRect (if != 0). + The subtextures are defined by the array of sourceRects + and are chosen by the indices given. + \param texture: Texture to be drawn. + \param pos: Upper left 2d destination position where the image will be drawn. + \param sourceRects: Source rectangles of the image. + \param indices: List of indices which choose the actual rectangle used each time. + \param kerningWidth: offset on position + \param clipRect: Pointer to rectangle on the screen where the image is clipped to. + This pointer can be 0. Then the image is not clipped. + \param color: Color with which the image is colored. + Note that the alpha component is used: If alpha is other than 255, the image will be transparent. + \param useAlphaChannelOfTexture: If true, the alpha channel of the texture is + used to draw the image. */ + virtual void draw2DImageBatch(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::array<core::rect<s32> >& sourceRects, + const core::array<s32>& indices, + s32 kerningWidth = 0, + const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false); + + //! Draws a set of 2d images, using a color and the alpha channel of the texture. + /** All drawings are clipped against clipRect (if != 0). + The subtextures are defined by the array of sourceRects and are + positioned using the array of positions. + \param texture Texture to be drawn. + \param pos Array of upper left 2d destinations where the images + will be drawn. + \param sourceRects Source rectangles of the image. + \param clipRect Pointer to rectangle on the screen where the + images are clipped to. + If this pointer is 0 then the image is not clipped. + \param color Color with which the image is drawn. + Note that the alpha component is used. If alpha is other than + 255, the image will be transparent. + \param useAlphaChannelOfTexture: If true, the alpha channel of + the texture is used to draw the image. */ + virtual void draw2DImageBatch(const video::ITexture* texture, + const core::array<core::position2d<s32> >& positions, + const core::array<core::rect<s32> >& sourceRects, + const core::rect<s32>* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false); + + //! Draws a 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false); + + //! Draws a part of the texture into the rectangle. + virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false); + + //! Draws a 2d rectangle + virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos, const core::rect<s32>* clip = 0); + + //! Draws a 2d rectangle with a gradient. + virtual void draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip = 0); + + //! Draws the outline of a 2d rectangle + virtual void draw2DRectangleOutline(const core::recti& pos, SColor color=SColor(255,255,255,255)); + + //! Draws a 2d line. + virtual void draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color=SColor(255,255,255,255)); + + //! Draws a pixel + virtual void drawPixel(u32 x, u32 y, const SColor & color); + + //! Draws a non filled concyclic reqular 2d polyon. + virtual void draw2DPolygon(core::position2d<s32> center, + f32 radius, video::SColor Color, s32 vertexCount); + + virtual void setFog(SColor color=SColor(0,255,255,255), + E_FOG_TYPE fogType=EFT_FOG_LINEAR, + f32 start=50.0f, f32 end=100.0f, f32 density=0.01f, + bool pixelFog=false, bool rangeFog=false); + + virtual void getFog(SColor& color, E_FOG_TYPE& fogType, + f32& start, f32& end, f32& density, + bool& pixelFog, bool& rangeFog); + + //! get color format of the current color buffer + virtual ECOLOR_FORMAT getColorFormat() const; + + //! get screen size + virtual const core::dimension2d<u32>& getScreenSize() const; + + //! get render target size + virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const; + + // get current frames per second value + virtual s32 getFPS() const; + + //! returns amount of primitives (mostly triangles) were drawn in the last frame. + //! very useful method for statistics. + virtual u32 getPrimitiveCountDrawn( u32 param = 0 ) const; + + //! deletes all dynamic lights there are + virtual void deleteAllDynamicLights(); + + //! adds a dynamic light, returning an index to the light + //! \param light: the light data to use to create the light + //! \return An index to the light, or -1 if an error occurs + virtual s32 addDynamicLight(const SLight& light); + + //! Turns a dynamic light on or off + //! \param lightIndex: the index returned by addDynamicLight + //! \param turnOn: true to turn the light on, false to turn it off + virtual void turnLightOn(s32 lightIndex, bool turnOn); + + //! returns the maximal amount of dynamic lights the device can handle + virtual u32 getMaximalDynamicLightAmount() const; + + //! \return Returns the name of the video driver. Example: In case of the DIRECT3D8 + //! driver, it would return "Direct3D8.1". + virtual const wchar_t* getName() const; + + //! Sets the dynamic ambient light color. The default color is + //! (0,0,0,0) which means it is dark. + //! \param color: New color of the ambient light. + virtual void setAmbientLight(const SColorf& color); + + //! Adds an external image loader to the engine. + virtual void addExternalImageLoader(IImageLoader* loader); + + //! Adds an external image writer to the engine. + virtual void addExternalImageWriter(IImageWriter* writer); + + //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do + //! this: Frist, draw all geometry. Then use this method, to draw the shadow + //! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. + virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0); + + //! Fills the stencil shadow with color. After the shadow volume has been drawn + //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this + //! to draw the color of the shadow. + virtual void drawStencilShadow(bool clearStencilBuffer=false, + video::SColor leftUpEdge = video::SColor(0,0,0,0), + video::SColor rightUpEdge = video::SColor(0,0,0,0), + video::SColor leftDownEdge = video::SColor(0,0,0,0), + video::SColor rightDownEdge = video::SColor(0,0,0,0)); + + //! Returns current amount of dynamic lights set + //! \return Current amount of dynamic lights set + virtual u32 getDynamicLightCount() const; + + //! Returns light data which was previously set with IVideDriver::addDynamicLight(). + //! \param idx: Zero based index of the light. Must be greater than 0 and smaller + //! than IVideoDriver()::getDynamicLightCount. + //! \return Light data. + virtual const SLight& getDynamicLight(u32 idx) const; + + //! Removes a texture from the texture cache and deletes it, freeing lot of + //! memory. + virtual void removeTexture(ITexture* texture); + + //! Removes all texture from the texture cache and deletes them, freeing lot of + //! memory. + virtual void removeAllTextures(); + + //! Creates a render target texture. + virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! Creates an 1bit alpha channel of the texture based of an color key. + virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color, bool zeroTexels) const; + + //! Creates an 1bit alpha channel of the texture based of an color key position. + virtual void makeColorKeyTexture(video::ITexture* texture, core::position2d<s32> colorKeyPixelPos, bool zeroTexels) const; + + //! Creates a normal map from a height map texture. + //! \param amplitude: Constant value by which the height information is multiplied. + virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const; + + //! Returns the maximum amount of primitives (mostly vertices) which + //! the device is able to render with one drawIndexedTriangleList + //! call. + virtual u32 getMaximalPrimitiveCount() const; + + //! Enables or disables a texture creation flag. + virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled); + + //! Returns if a texture creation flag is enabled or disabled. + virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const; + + //! Creates a software image from a file. + virtual IImage* createImageFromFile(const io::path& filename); + + //! Creates a software image from a file. + virtual IImage* createImageFromFile(io::IReadFile* file); + + //! Creates a software image from a byte array. + /** \param useForeignMemory: If true, the image will use the data pointer + directly and own it from now on, which means it will also try to delete [] the + data when the image will be destructed. If false, the memory will by copied. */ + virtual IImage* createImageFromData(ECOLOR_FORMAT format, + const core::dimension2d<u32>& size, void *data, + bool ownForeignMemory=true, bool deleteForeignMemory = true); + + //! Creates an empty software image. + virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size); + + + //! Creates a software image from another image. + virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy); + + //! Creates a software image from part of another image. + virtual IImage* createImage(IImage* imageToCopy, + const core::position2d<s32>& pos, + const core::dimension2d<u32>& size); + + //! Creates a software image from part of a texture. + virtual IImage* createImage(ITexture* texture, + const core::position2d<s32>& pos, + const core::dimension2d<u32>& size); + + //! Draws a mesh buffer + virtual void drawMeshBuffer(const scene::IMeshBuffer* mb); + + //! Draws the normals of a mesh buffer + virtual void drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length=10.f, SColor color=0xffffffff); + + protected: + struct SHWBufferLink + { + SHWBufferLink(const scene::IMeshBuffer *_MeshBuffer) + :MeshBuffer(_MeshBuffer), + ChangedID_Vertex(0),ChangedID_Index(0),LastUsed(0), + Mapped_Vertex(scene::EHM_NEVER),Mapped_Index(scene::EHM_NEVER) + { + if (MeshBuffer) + MeshBuffer->grab(); + } + + virtual ~SHWBufferLink() + { + if (MeshBuffer) + MeshBuffer->drop(); + } + + const scene::IMeshBuffer *MeshBuffer; + u32 ChangedID_Vertex; + u32 ChangedID_Index; + u32 LastUsed; + scene::E_HARDWARE_MAPPING Mapped_Vertex; + scene::E_HARDWARE_MAPPING Mapped_Index; + }; + + //! Gets hardware buffer link from a meshbuffer (may create or update buffer) + virtual SHWBufferLink *getBufferLink(const scene::IMeshBuffer* mb); + + //! updates hardware buffer if needed (only some drivers can) + virtual bool updateHardwareBuffer(SHWBufferLink *HWBuffer) {return false;} + + //! Draw hardware buffer (only some drivers can) + virtual void drawHardwareBuffer(SHWBufferLink *HWBuffer) {} + + //! Delete hardware buffer + virtual void deleteHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Create hardware buffer from mesh (only some drivers can) + virtual SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb) {return 0;} + + public: + //! Update all hardware buffers, remove unused ones + virtual void updateAllHardwareBuffers(); + + //! Remove hardware buffer + virtual void removeHardwareBuffer(const scene::IMeshBuffer* mb); + + //! Remove all hardware buffers + virtual void removeAllHardwareBuffers(); + + //! is vbo recommended on this mesh? + virtual bool isHardwareBufferRecommend(const scene::IMeshBuffer* mb); + + //! Create occlusion query. + /** Use node for identification and mesh for occlusion test. */ + virtual void addOcclusionQuery(scene::ISceneNode* node, + const scene::IMesh* mesh=0); + + //! Remove occlusion query. + virtual void removeOcclusionQuery(scene::ISceneNode* node); + + //! Remove all occlusion queries. + virtual void removeAllOcclusionQueries(); + + //! Run occlusion query. Draws mesh stored in query. + /** If the mesh shall not be rendered visible, use + overrideMaterial to disable the color and depth buffer. */ + virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false); + + //! Run all occlusion queries. Draws all meshes stored in queries. + /** If the meshes shall not be rendered visible, use + overrideMaterial to disable the color and depth buffer. */ + virtual void runAllOcclusionQueries(bool visible=false); + + //! Update occlusion query. Retrieves results from GPU. + /** If the query shall not block, set the flag to false. + Update might not occur in this case, though */ + virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true); + + //! Update all occlusion queries. Retrieves results from GPU. + /** If the query shall not block, set the flag to false. + Update might not occur in this case, though */ + virtual void updateAllOcclusionQueries(bool block=true); + + //! Return query result. + /** Return value is the number of visible pixels/fragments. + The value is a safe approximation, i.e. can be larger than the + actual value of pixels. */ + virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const; + + //! Only used by the engine internally. + /** Used to notify the driver that the window was resized. */ + virtual void OnResize(const core::dimension2d<u32>& size); + + //! Adds a new material renderer to the video device. + virtual s32 addMaterialRenderer(IMaterialRenderer* renderer, + const char* name = 0); + + //! Returns driver and operating system specific data about the IVideoDriver. + virtual const SExposedVideoData& getExposedVideoData(); + + //! Returns type of video driver + virtual E_DRIVER_TYPE getDriverType() const; + + //! Returns the transformation set by setTransform + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const; + + //! Returns pointer to the IGPUProgrammingServices interface. + virtual IGPUProgrammingServices* getGPUProgrammingServices(); + + //! Adds a new material renderer to the VideoDriver, using pixel and/or + //! vertex shaders to render geometry. + virtual s32 addShaderMaterial(const c8* vertexShaderProgram = 0, + const c8* pixelShaderProgram = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData=0); + + //! Like IGPUProgrammingServices::addShaderMaterial(), but tries to load the + //! programs from files. + virtual s32 addShaderMaterialFromFiles(io::IReadFile* vertexShaderProgram = 0, + io::IReadFile* pixelShaderProgram = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData=0); + + //! Like IGPUProgrammingServices::addShaderMaterial(), but tries to load the + //! programs from files. + virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName, + const io::path& pixelShaderProgramFileName, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData=0); + + //! Returns pointer to material renderer or null + virtual IMaterialRenderer* getMaterialRenderer(u32 idx); + + //! Returns amount of currently available material renderers. + virtual u32 getMaterialRendererCount() const; + + //! Returns name of the material renderer + virtual const char* getMaterialRendererName(u32 idx) const; + + //! Adds a new material renderer to the VideoDriver, based on a high level shading + //! language. Currently only HLSL in D3D9 is supported. + virtual s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName = 0, + E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, + const c8* pixelShaderProgram = 0, + const c8* pixelShaderEntryPointName = 0, + E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, + const c8* geometryShaderProgram = 0, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT); + + //! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description), + //! but tries to load the programs from files. + virtual s32 addHighLevelShaderMaterialFromFiles( + const io::path& vertexShaderProgramFile, + const c8* vertexShaderEntryPointName = "main", + E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, + const io::path& pixelShaderProgramFile = "", + const c8* pixelShaderEntryPointName = "main", + E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, + const io::path& geometryShaderProgramFileName="", + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT); + + //! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description), + //! but tries to load the programs from files. + virtual s32 addHighLevelShaderMaterialFromFiles( + io::IReadFile* vertexShaderProgram, + const c8* vertexShaderEntryPointName = "main", + E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, + io::IReadFile* pixelShaderProgram = 0, + const c8* pixelShaderEntryPointName = "main", + E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, + io::IReadFile* geometryShaderProgram= 0, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT); + + //! Returns a pointer to the mesh manipulator. + virtual scene::IMeshManipulator* getMeshManipulator(); + + //! Clears the ZBuffer. + virtual void clearZBuffer(); + + //! Returns an image created from the last rendered frame. + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER); + + //! Writes the provided image to disk file + virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0); + + //! Writes the provided image to a file. + virtual bool writeImageToFile(IImage* image, io::IWriteFile * file, u32 param = 0); + + //! Sets the name of a material renderer. + virtual void setMaterialRendererName(s32 idx, const char* name); + + //! Creates material attributes list from a material, usable for serialization and more. + virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material, + io::SAttributeReadWriteOptions* options=0); + + //! Fills an SMaterial structure from attributes. + virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes); + + //! looks if the image is already loaded + virtual video::ITexture* findTexture(const io::path& filename); + + //! Set/unset a clipping plane. + //! There are at least 6 clipping planes available for the user to set at will. + //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. + //! \param plane: The plane itself. + //! \param enable: If true, enable the clipping plane else disable it. + virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false); + + //! Enable/disable a clipping plane. + //! There are at least 6 clipping planes available for the user to set at will. + //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. + //! \param enable: If true, enable the clipping plane else disable it. + virtual void enableClipPlane(u32 index, bool enable); + + //! Returns the graphics card vendor name. + virtual core::stringc getVendorInfo() {return "Not available on this driver.";} + + //! Set the minimum number of vertices for which a hw buffer will be created + /** \param count Number of vertices to set as minimum. */ + virtual void setMinHardwareBufferVertexCount(u32 count); + + //! Get the global Material, which might override local materials. + /** Depending on the enable flags, values from this Material + are used to override those of local materials of some + meshbuffer being rendered. */ + virtual SOverrideMaterial& getOverrideMaterial(); + + //! Get the 2d override material for altering its values + virtual SMaterial& getMaterial2D(); + + //! Enable the 2d override material + virtual void enableMaterial2D(bool enable=true); + + //! Only used by the engine internally. + virtual void setAllowZWriteOnTransparent(bool flag) + { AllowZWriteOnTransparent=flag; } + + //! Returns the maximum texture size supported. + virtual core::dimension2du getMaxTextureSize() const; + + //! Color conversion convenience function + /** Convert an image (as array of pixels) from source to destination + array, thereby converting the color format. The pixel size is + determined by the color formats. + \param sP Pointer to source + \param sF Color format of source + \param sN Number of pixels to convert, both array must be large enough + \param dP Pointer to destination + \param dF Color format of destination + */ + virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN, + void* dP, ECOLOR_FORMAT dF) const; + + //! deprecated method + virtual ITexture* createRenderTargetTexture(const core::dimension2d<u32>& size, + const c8* name=0); + + virtual bool checkDriverReset() {return false;} + protected: + + //! deletes all textures + void deleteAllTextures(); + + //! opens the file and loads it into the surface + video::ITexture* loadTextureFromFile(io::IReadFile* file, const io::path& hashName = ""); + + //! adds a surface, not loaded or created by the Irrlicht Engine + void addTexture(video::ITexture* surface); + + //! Creates a texture from a loaded IImage. + virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0); + + //! returns a device dependent texture from a software surface (IImage) + //! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES + virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData=0); + + //! checks triangle count and print warning if wrong + bool checkPrimitiveCount(u32 prmcnt) const; + + // adds a material renderer and drops it afterwards. To be used for internal creation + s32 addAndDropMaterialRenderer(IMaterialRenderer* m); + + //! deletes all material renderers + void deleteMaterialRenders(); + + // prints renderer version + void printVersion(); + + //! normal map lookup 32 bit version + inline f32 nml32(int x, int y, int pitch, int height, s32 *p) const + { + if (x < 0) x = pitch-1; if (x >= pitch) x = 0; + if (y < 0) y = height-1; if (y >= height) y = 0; + return (f32)(((p[(y * pitch) + x])>>16) & 0xff); + } + + //! normal map lookup 16 bit version + inline f32 nml16(int x, int y, int pitch, int height, s16 *p) const + { + if (x < 0) x = pitch-1; if (x >= pitch) x = 0; + if (y < 0) y = height-1; if (y >= height) y = 0; + + return (f32) getAverage ( p[(y * pitch) + x] ); + } + + struct SSurface + { + video::ITexture* Surface; + + bool operator < (const SSurface& other) const + { + return Surface->getName() < other.Surface->getName(); + } + }; + + struct SMaterialRenderer + { + core::stringc Name; + IMaterialRenderer* Renderer; + }; + + struct SDummyTexture : public ITexture + { + SDummyTexture(const io::path& name) : ITexture(name), size(0,0) {}; + + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) { return 0; }; + virtual void unlock(){} + virtual const core::dimension2d<u32>& getOriginalSize() const { return size; } + virtual const core::dimension2d<u32>& getSize() const { return size; } + virtual E_DRIVER_TYPE getDriverType() const { return video::EDT_NULL; } + virtual ECOLOR_FORMAT getColorFormat() const { return video::ECF_A1R5G5B5; }; + virtual u32 getPitch() const { return 0; } + virtual void regenerateMipMapLevels(void* mipmapData=0) {}; + core::dimension2d<u32> size; + }; + core::array<SSurface> Textures; + + struct SOccQuery + { + SOccQuery(scene::ISceneNode* node, const scene::IMesh* mesh=0) : Node(node), Mesh(mesh), PID(0), Result(~0), Run(~0) + { + if (Node) + Node->grab(); + if (Mesh) + Mesh->grab(); + } + + SOccQuery(const SOccQuery& other) : Node(other.Node), Mesh(other.Mesh), PID(other.PID), Result(other.Result), Run(other.Run) + { + if (Node) + Node->grab(); + if (Mesh) + Mesh->grab(); + } + + ~SOccQuery() + { + if (Node) + Node->drop(); + if (Mesh) + Mesh->drop(); + } + + SOccQuery& operator=(const SOccQuery& other) + { + Node=other.Node; + Mesh=other.Mesh; + PID=other.PID; + Result=other.Result; + Run=other.Run; + if (Node) + Node->grab(); + if (Mesh) + Mesh->grab(); + return *this; + } + + bool operator==(const SOccQuery& other) const + { + return other.Node==Node; + } + + scene::ISceneNode* Node; + const scene::IMesh* Mesh; + union + { + void* PID; + unsigned int UID; + }; + u32 Result; + u32 Run; + }; + core::array<SOccQuery> OcclusionQueries; + + core::array<video::IImageLoader*> SurfaceLoader; + core::array<video::IImageWriter*> SurfaceWriter; + core::array<SLight> Lights; + core::array<SMaterialRenderer> MaterialRenderers; + + //core::array<SHWBufferLink*> HWBufferLinks; + core::map< const scene::IMeshBuffer* , SHWBufferLink* > HWBufferMap; + + io::IFileSystem* FileSystem; + + //! mesh manipulator + scene::IMeshManipulator* MeshManipulator; + + core::rect<s32> ViewPort; + core::dimension2d<u32> ScreenSize; + core::matrix4 TransformationMatrix; + + CFPSCounter FPSCounter; + + u32 PrimitivesDrawn; + u32 MinVertexCountForVBO; + + u32 TextureCreationFlags; + + f32 FogStart; + f32 FogEnd; + f32 FogDensity; + SColor FogColor; + SExposedVideoData ExposedData; + + io::IAttributes* DriverAttributes; + + SOverrideMaterial OverrideMaterial; + SMaterial OverrideMaterial2D; + SMaterial InitMaterial2D; + bool OverrideMaterial2DEnabled; + + E_FOG_TYPE FogType; + bool PixelFog; + bool RangeFog; + bool AllowZWriteOnTransparent; + + bool FeatureEnabled[video::EVDF_COUNT]; + }; + +} // end namespace video +} // end namespace irr + + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.cpp new file mode 100644 index 0000000..47a4dad --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.cpp @@ -0,0 +1,931 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OBJ_LOADER_ + +#include "COBJMeshFileLoader.h" +#include "IMeshManipulator.h" +#include "IVideoDriver.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "SAnimatedMesh.h" +#include "IReadFile.h" +#include "IAttributes.h" +#include "fast_atof.h" +#include "coreutil.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +#ifdef _DEBUG +#define _IRR_DEBUG_OBJ_LOADER_ +#endif + +static const u32 WORD_BUFFER_LENGTH = 512; + +//! Constructor +COBJMeshFileLoader::COBJMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs) +: SceneManager(smgr), FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("COBJMeshFileLoader"); + #endif + + if (FileSystem) + FileSystem->grab(); +} + + +//! destructor +COBJMeshFileLoader::~COBJMeshFileLoader() +{ + if (FileSystem) + FileSystem->drop(); +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool COBJMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "obj" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file) +{ + const long filesize = file->getSize(); + if (!filesize) + return 0; + + const u32 WORD_BUFFER_LENGTH = 512; + + core::array<core::vector3df> vertexBuffer; + core::array<core::vector3df> normalsBuffer; + core::array<core::vector2df> textureCoordBuffer; + + SObjMtl * currMtl = new SObjMtl(); + Materials.push_back(currMtl); + u32 smoothingGroup=0; + + const io::path fullName = file->getFileName(); + const io::path relPath = FileSystem->getFileDir(fullName)+"/"; + + c8* buf = new c8[filesize]; + memset(buf, 0, filesize); + file->read((void*)buf, filesize); + const c8* const bufEnd = buf+filesize; + + // Process obj information + const c8* bufPtr = buf; + core::stringc grpName, mtlName; + bool mtlChanged=false; + bool useGroups = !SceneManager->getParameters()->getAttributeAsBool(OBJ_LOADER_IGNORE_GROUPS); + bool useMaterials = !SceneManager->getParameters()->getAttributeAsBool(OBJ_LOADER_IGNORE_MATERIAL_FILES); + while(bufPtr != bufEnd) + { + switch(bufPtr[0]) + { + case 'm': // mtllib (material) + { + if (useMaterials) + { + c8 name[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(name, bufPtr, WORD_BUFFER_LENGTH, bufEnd); +#ifdef _IRR_DEBUG_OBJ_LOADER_ + os::Printer::log("Reading material file",name); +#endif + readMTL(name, relPath); + } + } + break; + + case 'v': // v, vn, vt + switch(bufPtr[1]) + { + case ' ': // vertex + { + core::vector3df vec; + bufPtr = readVec3(bufPtr, vec, bufEnd); + vertexBuffer.push_back(vec); + } + break; + + case 'n': // normal + { + core::vector3df vec; + bufPtr = readVec3(bufPtr, vec, bufEnd); + normalsBuffer.push_back(vec); + } + break; + + case 't': // texcoord + { + core::vector2df vec; + bufPtr = readUV(bufPtr, vec, bufEnd); + textureCoordBuffer.push_back(vec); + } + break; + } + break; + + case 'g': // group name + { + c8 grp[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(grp, bufPtr, WORD_BUFFER_LENGTH, bufEnd); +#ifdef _IRR_DEBUG_OBJ_LOADER_ + os::Printer::log("Loaded group start",grp, ELL_DEBUG); +#endif + if (useGroups) + { + if (0 != grp[0]) + grpName = grp; + else + grpName = "default"; + } + mtlChanged=true; + } + break; + + case 's': // smoothing can be a group or off (equiv. to 0) + { + c8 smooth[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(smooth, bufPtr, WORD_BUFFER_LENGTH, bufEnd); +#ifdef _IRR_DEBUG_OBJ_LOADER_ + os::Printer::log("Loaded smoothing group start",smooth, ELL_DEBUG); +#endif + if (core::stringc("off")==smooth) + smoothingGroup=0; + else + smoothingGroup=core::strtoul10(smooth); + } + break; + + case 'u': // usemtl + // get name of material + { + c8 matName[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(matName, bufPtr, WORD_BUFFER_LENGTH, bufEnd); +#ifdef _IRR_DEBUG_OBJ_LOADER_ + os::Printer::log("Loaded material start",matName, ELL_DEBUG); +#endif + mtlName=matName; + mtlChanged=true; + } + break; + + case 'f': // face + { + c8 vertexWord[WORD_BUFFER_LENGTH]; // for retrieving vertex data + video::S3DVertex v; + // Assign vertex color from currently active material's diffuse color + if (mtlChanged) + { + // retrieve the material + SObjMtl *useMtl = findMtl(mtlName, grpName); + // only change material if we found it + if (useMtl) + currMtl = useMtl; + mtlChanged=false; + } + if (currMtl) + v.Color = currMtl->Meshbuffer->Material.DiffuseColor; + + // get all vertices data in this face (current line of obj file) + const core::stringc wordBuffer = copyLine(bufPtr, bufEnd); + const c8* linePtr = wordBuffer.c_str(); + const c8* const endPtr = linePtr+wordBuffer.size(); + + core::array<int> faceCorners; + faceCorners.reallocate(32); // should be large enough + + // read in all vertices + linePtr = goNextWord(linePtr, endPtr); + while (0 != linePtr[0]) + { + // Array to communicate with retrieveVertexIndices() + // sends the buffer sizes and gets the actual indices + // if index not set returns -1 + s32 Idx[3]; + Idx[1] = Idx[2] = -1; + + // read in next vertex's data + u32 wlength = copyWord(vertexWord, linePtr, WORD_BUFFER_LENGTH, endPtr); + // this function will also convert obj's 1-based index to c++'s 0-based index + retrieveVertexIndices(vertexWord, Idx, vertexWord+wlength+1, vertexBuffer.size(), textureCoordBuffer.size(), normalsBuffer.size()); + v.Pos = vertexBuffer[Idx[0]]; + if ( -1 != Idx[1] ) + v.TCoords = textureCoordBuffer[Idx[1]]; + else + v.TCoords.set(0.0f,0.0f); + if ( -1 != Idx[2] ) + v.Normal = normalsBuffer[Idx[2]]; + else + { + v.Normal.set(0.0f,0.0f,0.0f); + currMtl->RecalculateNormals=true; + } + + int vertLocation; + core::map<video::S3DVertex, int>::Node* n = currMtl->VertMap.find(v); + if (n) + { + vertLocation = n->getValue(); + } + else + { + currMtl->Meshbuffer->Vertices.push_back(v); + vertLocation = currMtl->Meshbuffer->Vertices.size() -1; + currMtl->VertMap.insert(v, vertLocation); + } + + faceCorners.push_back(vertLocation); + + // go to next vertex + linePtr = goNextWord(linePtr, endPtr); + } + + // triangulate the face + for ( u32 i = 1; i < faceCorners.size() - 1; ++i ) + { + // Add a triangle + currMtl->Meshbuffer->Indices.push_back( faceCorners[i+1] ); + currMtl->Meshbuffer->Indices.push_back( faceCorners[i] ); + currMtl->Meshbuffer->Indices.push_back( faceCorners[0] ); + } + faceCorners.set_used(0); // fast clear + faceCorners.reallocate(32); + } + break; + + case '#': // comment + default: + break; + } // end switch(bufPtr[0]) + // eat up rest of line + bufPtr = goNextLine(bufPtr, bufEnd); + } // end while(bufPtr && (bufPtr-buf<filesize)) + + SMesh* mesh = new SMesh(); + + // Combine all the groups (meshbuffers) into the mesh + for ( u32 m = 0; m < Materials.size(); ++m ) + { + if ( Materials[m]->Meshbuffer->getIndexCount() > 0 ) + { + Materials[m]->Meshbuffer->recalculateBoundingBox(); + if (Materials[m]->RecalculateNormals) + SceneManager->getMeshManipulator()->recalculateNormals(Materials[m]->Meshbuffer); + if (Materials[m]->Meshbuffer->Material.MaterialType == video::EMT_PARALLAX_MAP_SOLID) + { + SMesh tmp; + tmp.addMeshBuffer(Materials[m]->Meshbuffer); + IMesh* tangentMesh = SceneManager->getMeshManipulator()->createMeshWithTangents(&tmp); + mesh->addMeshBuffer(tangentMesh->getMeshBuffer(0)); + tangentMesh->drop(); + } + else + mesh->addMeshBuffer( Materials[m]->Meshbuffer ); + } + } + + // Create the Animated mesh if there's anything in the mesh + SAnimatedMesh* animMesh = 0; + if ( 0 != mesh->getMeshBufferCount() ) + { + mesh->recalculateBoundingBox(); + animMesh = new SAnimatedMesh(); + animMesh->Type = EAMT_OBJ; + animMesh->addMesh(mesh); + animMesh->recalculateBoundingBox(); + } + + // Clean up the allocate obj file contents + delete [] buf; + // more cleaning up + cleanUp(); + mesh->drop(); + + return animMesh; +} + + +const c8* COBJMeshFileLoader::readTextures(const c8* bufPtr, const c8* const bufEnd, SObjMtl* currMaterial, const io::path& relPath) +{ + u8 type=0; // map_Kd - diffuse color texture map + // map_Ks - specular color texture map + // map_Ka - ambient color texture map + // map_Ns - shininess texture map + if ((!strncmp(bufPtr,"map_bump",8)) || (!strncmp(bufPtr,"bump",4))) + type=1; // normal map + else if ((!strncmp(bufPtr,"map_d",5)) || (!strncmp(bufPtr,"map_opacity",11))) + type=2; // opacity map + else if (!strncmp(bufPtr,"map_refl",8)) + type=3; // reflection map + // extract new material's name + c8 textureNameBuf[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + + f32 bumpiness = 6.0f; + bool clamp = false; + // handle options + while (textureNameBuf[0]=='-') + { + if (!strncmp(bufPtr,"-bm",3)) + { + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + currMaterial->Meshbuffer->Material.MaterialTypeParam=core::fast_atof(textureNameBuf); + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + continue; + } + else + if (!strncmp(bufPtr,"-blendu",7)) + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + else + if (!strncmp(bufPtr,"-blendv",7)) + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + else + if (!strncmp(bufPtr,"-cc",3)) + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + else + if (!strncmp(bufPtr,"-clamp",6)) + bufPtr = readBool(bufPtr, clamp, bufEnd); + else + if (!strncmp(bufPtr,"-texres",7)) + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + else + if (!strncmp(bufPtr,"-type",5)) + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + else + if (!strncmp(bufPtr,"-mm",3)) + { + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + } + else + if (!strncmp(bufPtr,"-o",2)) // texture coord translation + { + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + // next parameters are optional, so skip rest of loop if no number is found + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + if (!core::isdigit(textureNameBuf[0])) + continue; + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + if (!core::isdigit(textureNameBuf[0])) + continue; + } + else + if (!strncmp(bufPtr,"-s",2)) // texture coord scale + { + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + // next parameters are optional, so skip rest of loop if no number is found + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + if (!core::isdigit(textureNameBuf[0])) + continue; + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + if (!core::isdigit(textureNameBuf[0])) + continue; + } + else + if (!strncmp(bufPtr,"-t",2)) + { + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + // next parameters are optional, so skip rest of loop if no number is found + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + if (!core::isdigit(textureNameBuf[0])) + continue; + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + if (!core::isdigit(textureNameBuf[0])) + continue; + } + // get next word + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + } + + if ((type==1) && (core::isdigit(textureNameBuf[0]))) + { + currMaterial->Meshbuffer->Material.MaterialTypeParam=core::fast_atof(textureNameBuf); + bufPtr = goAndCopyNextWord(textureNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + } + if (clamp) + currMaterial->Meshbuffer->Material.setFlag(video::EMF_TEXTURE_WRAP, video::ETC_CLAMP); + + io::path texname(textureNameBuf); + texname.replace('\\', '/'); + + video::ITexture * texture = 0; + bool newTexture=false; + if (texname.size()) + { + io::path texnameWithUserPath( SceneManager->getParameters()->getAttributeAsString(OBJ_TEXTURE_PATH) ); + if ( texnameWithUserPath.size() ) + { + texnameWithUserPath += '/'; + texnameWithUserPath += texname; + } + if (FileSystem->existFile(texnameWithUserPath)) + texture = SceneManager->getVideoDriver()->getTexture(texnameWithUserPath); + else if (FileSystem->existFile(texname)) + { + newTexture = SceneManager->getVideoDriver()->findTexture(texname) == 0; + texture = SceneManager->getVideoDriver()->getTexture(texname); + } + else + { + newTexture = SceneManager->getVideoDriver()->findTexture(relPath + texname) == 0; + // try to read in the relative path, the .obj is loaded from + texture = SceneManager->getVideoDriver()->getTexture( relPath + texname ); + } + } + if ( texture ) + { + if (type==0) + currMaterial->Meshbuffer->Material.setTexture(0, texture); + else if (type==1) + { + if (newTexture) + SceneManager->getVideoDriver()->makeNormalMapTexture(texture, bumpiness); + currMaterial->Meshbuffer->Material.setTexture(1, texture); + currMaterial->Meshbuffer->Material.MaterialType=video::EMT_PARALLAX_MAP_SOLID; + currMaterial->Meshbuffer->Material.MaterialTypeParam=0.035f; + } + else if (type==2) + { + currMaterial->Meshbuffer->Material.setTexture(0, texture); + currMaterial->Meshbuffer->Material.MaterialType=video::EMT_TRANSPARENT_ADD_COLOR; + } + else if (type==3) + { +// currMaterial->Meshbuffer->Material.Textures[1] = texture; +// currMaterial->Meshbuffer->Material.MaterialType=video::EMT_REFLECTION_2_LAYER; + } + // Set diffuse material color to white so as not to affect texture color + // Because Maya set diffuse color Kd to black when you use a diffuse color map + // But is this the right thing to do? + currMaterial->Meshbuffer->Material.DiffuseColor.set( + currMaterial->Meshbuffer->Material.DiffuseColor.getAlpha(), 255, 255, 255 ); + } + return bufPtr; +} + + +void COBJMeshFileLoader::readMTL(const c8* fileName, const io::path& relPath) +{ + const io::path realFile(fileName); + io::IReadFile * mtlReader; + + if (FileSystem->existFile(realFile)) + mtlReader = FileSystem->createAndOpenFile(realFile); + else if (FileSystem->existFile(relPath + realFile)) + mtlReader = FileSystem->createAndOpenFile(relPath + realFile); + else if (FileSystem->existFile(FileSystem->getFileBasename(realFile))) + mtlReader = FileSystem->createAndOpenFile(FileSystem->getFileBasename(realFile)); + else + mtlReader = FileSystem->createAndOpenFile(relPath + FileSystem->getFileBasename(realFile)); + if (!mtlReader) // fail to open and read file + { + os::Printer::log("Could not open material file", realFile, ELL_WARNING); + return; + } + + const long filesize = mtlReader->getSize(); + if (!filesize) + { + os::Printer::log("Skipping empty material file", realFile, ELL_WARNING); + mtlReader->drop(); + return; + } + + c8* buf = new c8[filesize]; + mtlReader->read((void*)buf, filesize); + const c8* bufEnd = buf+filesize; + + SObjMtl* currMaterial = 0; + + const c8* bufPtr = buf; + while(bufPtr != bufEnd) + { + switch(*bufPtr) + { + case 'n': // newmtl + { + // if there's an existing material, store it first + if ( currMaterial ) + Materials.push_back( currMaterial ); + + // extract new material's name + c8 mtlNameBuf[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(mtlNameBuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + + currMaterial = new SObjMtl; + currMaterial->Name = mtlNameBuf; + } + break; + case 'i': // illum - illumination + if ( currMaterial ) + { + const u32 COLOR_BUFFER_LENGTH = 16; + c8 illumStr[COLOR_BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(illumStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + currMaterial->Illumination = (c8)atol(illumStr); + } + break; + case 'N': + if ( currMaterial ) + { + switch(bufPtr[1]) + { + case 's': // Ns - shininess + { + const u32 COLOR_BUFFER_LENGTH = 16; + c8 nsStr[COLOR_BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(nsStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + f32 shininessValue = core::fast_atof(nsStr); + + // wavefront shininess is from [0, 1000], so scale for OpenGL + shininessValue *= 0.128f; + currMaterial->Meshbuffer->Material.Shininess = shininessValue; + } + break; + case 'i': // Ni - refraction index + { + c8 tmpbuf[WORD_BUFFER_LENGTH]; + bufPtr = goAndCopyNextWord(tmpbuf, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + } + break; + } + } + break; + case 'K': + if ( currMaterial ) + { + switch(bufPtr[1]) + { + case 'd': // Kd = diffuse + { + bufPtr = readColor(bufPtr, currMaterial->Meshbuffer->Material.DiffuseColor, bufEnd); + + } + break; + + case 's': // Ks = specular + { + bufPtr = readColor(bufPtr, currMaterial->Meshbuffer->Material.SpecularColor, bufEnd); + } + break; + + case 'a': // Ka = ambience + { + bufPtr=readColor(bufPtr, currMaterial->Meshbuffer->Material.AmbientColor, bufEnd); + } + break; + case 'e': // Ke = emissive + { + bufPtr=readColor(bufPtr, currMaterial->Meshbuffer->Material.EmissiveColor, bufEnd); + } + break; + } // end switch(bufPtr[1]) + } // end case 'K': if ( 0 != currMaterial )... + break; + case 'b': // bump + case 'm': // texture maps + if (currMaterial) + { + bufPtr=readTextures(bufPtr, bufEnd, currMaterial, relPath); + } + break; + case 'd': // d - transparency + if ( currMaterial ) + { + const u32 COLOR_BUFFER_LENGTH = 16; + c8 dStr[COLOR_BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(dStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + f32 dValue = core::fast_atof(dStr); + + currMaterial->Meshbuffer->Material.DiffuseColor.setAlpha( (s32)(dValue * 255) ); + if (dValue<1.0f) + currMaterial->Meshbuffer->Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + } + break; + case 'T': + if ( currMaterial ) + { + switch ( bufPtr[1] ) + { + case 'f': // Tf - Transmitivity + const u32 COLOR_BUFFER_LENGTH = 16; + c8 redStr[COLOR_BUFFER_LENGTH]; + c8 greenStr[COLOR_BUFFER_LENGTH]; + c8 blueStr[COLOR_BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(redStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + bufPtr = goAndCopyNextWord(greenStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + bufPtr = goAndCopyNextWord(blueStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + + f32 transparency = ( core::fast_atof(redStr) + core::fast_atof(greenStr) + core::fast_atof(blueStr) ) / 3; + + currMaterial->Meshbuffer->Material.DiffuseColor.setAlpha( (s32)(transparency * 255) ); + if (transparency < 1.0f) + currMaterial->Meshbuffer->Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + } + } + break; + default: // comments or not recognised + break; + } // end switch(bufPtr[0]) + // go to next line + bufPtr = goNextLine(bufPtr, bufEnd); + } // end while (bufPtr) + + // end of file. if there's an existing material, store it + if ( currMaterial ) + Materials.push_back( currMaterial ); + + delete [] buf; + mtlReader->drop(); +} + + +//! Read RGB color +const c8* COBJMeshFileLoader::readColor(const c8* bufPtr, video::SColor& color, const c8* const bufEnd) +{ + const u32 COLOR_BUFFER_LENGTH = 16; + c8 colStr[COLOR_BUFFER_LENGTH]; + + color.setAlpha(255); + bufPtr = goAndCopyNextWord(colStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + color.setRed((s32)(core::fast_atof(colStr) * 255.0f)); + bufPtr = goAndCopyNextWord(colStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + color.setGreen((s32)(core::fast_atof(colStr) * 255.0f)); + bufPtr = goAndCopyNextWord(colStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd); + color.setBlue((s32)(core::fast_atof(colStr) * 255.0f)); + return bufPtr; +} + + +//! Read 3d vector of floats +const c8* COBJMeshFileLoader::readVec3(const c8* bufPtr, core::vector3df& vec, const c8* const bufEnd) +{ + const u32 WORD_BUFFER_LENGTH = 256; + c8 wordBuffer[WORD_BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(wordBuffer, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + vec.X=-core::fast_atof(wordBuffer); // change handedness + bufPtr = goAndCopyNextWord(wordBuffer, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + vec.Y=core::fast_atof(wordBuffer); + bufPtr = goAndCopyNextWord(wordBuffer, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + vec.Z=core::fast_atof(wordBuffer); + return bufPtr; +} + + +//! Read 2d vector of floats +const c8* COBJMeshFileLoader::readUV(const c8* bufPtr, core::vector2df& vec, const c8* const bufEnd) +{ + const u32 WORD_BUFFER_LENGTH = 256; + c8 wordBuffer[WORD_BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(wordBuffer, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + vec.X=core::fast_atof(wordBuffer); + bufPtr = goAndCopyNextWord(wordBuffer, bufPtr, WORD_BUFFER_LENGTH, bufEnd); + vec.Y=1-core::fast_atof(wordBuffer); // change handedness + return bufPtr; +} + + +//! Read boolean value represented as 'on' or 'off' +const c8* COBJMeshFileLoader::readBool(const c8* bufPtr, bool& tf, const c8* const bufEnd) +{ + const u32 BUFFER_LENGTH = 8; + c8 tfStr[BUFFER_LENGTH]; + + bufPtr = goAndCopyNextWord(tfStr, bufPtr, BUFFER_LENGTH, bufEnd); + tf = strcmp(tfStr, "off") != 0; + return bufPtr; +} + + +COBJMeshFileLoader::SObjMtl* COBJMeshFileLoader::findMtl(const core::stringc& mtlName, const core::stringc& grpName) +{ + COBJMeshFileLoader::SObjMtl* defMaterial = 0; + // search existing Materials for best match + // exact match does return immediately, only name match means a new group + for (u32 i = 0; i < Materials.size(); ++i) + { + if ( Materials[i]->Name == mtlName ) + { + if ( Materials[i]->Group == grpName ) + return Materials[i]; + else + defMaterial = Materials[i]; + } + } + // we found a partial match + if (defMaterial) + { + Materials.push_back(new SObjMtl(*defMaterial)); + Materials.getLast()->Group = grpName; + return Materials.getLast(); + } + // we found a new group for a non-existant material + else if (grpName.size()) + { + Materials.push_back(new SObjMtl(*Materials[0])); + Materials.getLast()->Group = grpName; + return Materials.getLast(); + } + return 0; +} + + +//! skip space characters and stop on first non-space +const c8* COBJMeshFileLoader::goFirstWord(const c8* buf, const c8* const bufEnd, bool acrossNewlines) +{ + // skip space characters + if (acrossNewlines) + while((buf != bufEnd) && core::isspace(*buf)) + ++buf; + else + while((buf != bufEnd) && core::isspace(*buf) && (*buf != '\n')) + ++buf; + + return buf; +} + + +//! skip current word and stop at beginning of next one +const c8* COBJMeshFileLoader::goNextWord(const c8* buf, const c8* const bufEnd, bool acrossNewlines) +{ + // skip current word + while(( buf != bufEnd ) && !core::isspace(*buf)) + ++buf; + + return goFirstWord(buf, bufEnd, acrossNewlines); +} + + +//! Read until line break is reached and stop at the next non-space character +const c8* COBJMeshFileLoader::goNextLine(const c8* buf, const c8* const bufEnd) +{ + // look for newline characters + while(buf != bufEnd) + { + // found it, so leave + if (*buf=='\n' || *buf=='\r') + break; + ++buf; + } + return goFirstWord(buf, bufEnd); +} + + +u32 COBJMeshFileLoader::copyWord(c8* outBuf, const c8* const inBuf, u32 outBufLength, const c8* const bufEnd) +{ + if (!outBufLength) + return 0; + if (!inBuf) + { + *outBuf = 0; + return 0; + } + + u32 i = 0; + while(inBuf[i]) + { + if (core::isspace(inBuf[i]) || &(inBuf[i]) == bufEnd) + break; + ++i; + } + + u32 length = core::min_(i, outBufLength-1); + for (u32 j=0; j<length; ++j) + outBuf[j] = inBuf[j]; + + outBuf[length] = 0; + return length; +} + + +core::stringc COBJMeshFileLoader::copyLine(const c8* inBuf, const c8* bufEnd) +{ + if (!inBuf) + return core::stringc(); + + const c8* ptr = inBuf; + while (ptr<bufEnd) + { + if (*ptr=='\n' || *ptr=='\r') + break; + ++ptr; + } + // we must avoid the +1 in case the array is used up + return core::stringc(inBuf, (u32)(ptr-inBuf+((ptr < bufEnd) ? 1 : 0))); +} + + +const c8* COBJMeshFileLoader::goAndCopyNextWord(c8* outBuf, const c8* inBuf, u32 outBufLength, const c8* bufEnd) +{ + inBuf = goNextWord(inBuf, bufEnd, false); + copyWord(outBuf, inBuf, outBufLength, bufEnd); + return inBuf; +} + + +bool COBJMeshFileLoader::retrieveVertexIndices(c8* vertexData, s32* idx, const c8* bufEnd, u32 vbsize, u32 vtsize, u32 vnsize) +{ + c8 word[16] = ""; + const c8* p = goFirstWord(vertexData, bufEnd); + u32 idxType = 0; // 0 = posIdx, 1 = texcoordIdx, 2 = normalIdx + + u32 i = 0; + while ( p != bufEnd ) + { + if ( ( core::isdigit(*p)) || (*p == '-') ) + { + // build up the number + word[i++] = *p; + } + else if ( *p == '/' || *p == ' ' || *p == '\0' ) + { + // number is completed. Convert and store it + word[i] = '\0'; + // if no number was found index will become 0 and later on -1 by decrement + idx[idxType] = core::strtol10(word); + if (idx[idxType]<0) + { + switch (idxType) + { + case 0: + idx[idxType] += vbsize; + break; + case 1: + idx[idxType] += vtsize; + break; + case 2: + idx[idxType] += vnsize; + break; + } + } + else + idx[idxType]-=1; + + // reset the word + word[0] = '\0'; + i = 0; + + // go to the next kind of index type + if (*p == '/') + { + if ( ++idxType > 2 ) + { + // error checking, shouldn't reach here unless file is wrong + idxType = 0; + } + } + else + { + // set all missing values to disable (=-1) + while (++idxType < 3) + idx[idxType]=-1; + ++p; + break; // while + } + } + + // go to the next char + ++p; + } + + return true; +} + + +void COBJMeshFileLoader::cleanUp() +{ + for (u32 i=0; i < Materials.size(); ++i ) + { + Materials[i]->Meshbuffer->drop(); + delete Materials[i]; + } + + Materials.clear(); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_OBJ_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.h new file mode 100644 index 0000000..06e71d6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshFileLoader.h @@ -0,0 +1,122 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OBJ_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_OBJ_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "ISceneManager.h" +#include "irrString.h" +#include "SMeshBuffer.h" +#include "irrMap.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading obj meshes. +class COBJMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + COBJMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); + + //! destructor + virtual ~COBJMeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".obj") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + struct SObjMtl + { + SObjMtl() : Meshbuffer(0), Bumpiness (1.0f), Illumination(0), + RecalculateNormals(false) + { + Meshbuffer = new SMeshBuffer(); + Meshbuffer->Material.Shininess = 0.0f; + Meshbuffer->Material.AmbientColor = video::SColorf(0.2f, 0.2f, 0.2f, 1.0f).toSColor(); + Meshbuffer->Material.DiffuseColor = video::SColorf(0.8f, 0.8f, 0.8f, 1.0f).toSColor(); + Meshbuffer->Material.SpecularColor = video::SColorf(1.0f, 1.0f, 1.0f, 1.0f).toSColor(); + } + + SObjMtl(const SObjMtl& o) + : Name(o.Name), Group(o.Group), + Bumpiness(o.Bumpiness), Illumination(o.Illumination), + RecalculateNormals(false) + { + Meshbuffer = new SMeshBuffer(); + Meshbuffer->Material = o.Meshbuffer->Material; + } + + core::map<video::S3DVertex, int> VertMap; + scene::SMeshBuffer *Meshbuffer; + core::stringc Name; + core::stringc Group; + f32 Bumpiness; + c8 Illumination; + bool RecalculateNormals; + }; + + // helper method for material reading + const c8* readTextures(const c8* bufPtr, const c8* const bufEnd, SObjMtl* currMaterial, const io::path& relPath); + + // returns a pointer to the first printable character available in the buffer + const c8* goFirstWord(const c8* buf, const c8* const bufEnd, bool acrossNewlines=true); + // returns a pointer to the first printable character after the first non-printable + const c8* goNextWord(const c8* buf, const c8* const bufEnd, bool acrossNewlines=true); + // returns a pointer to the next printable character after the first line break + const c8* goNextLine(const c8* buf, const c8* const bufEnd); + // copies the current word from the inBuf to the outBuf + u32 copyWord(c8* outBuf, const c8* inBuf, u32 outBufLength, const c8* const pBufEnd); + // copies the current line from the inBuf to the outBuf + core::stringc copyLine(const c8* inBuf, const c8* const bufEnd); + + // combination of goNextWord followed by copyWord + const c8* goAndCopyNextWord(c8* outBuf, const c8* inBuf, u32 outBufLength, const c8* const pBufEnd); + + //! Read the material from the given file + void readMTL(const c8* fileName, const io::path& relPath); + + //! Find and return the material with the given name + SObjMtl* findMtl(const core::stringc& mtlName, const core::stringc& grpName); + + //! Read RGB color + const c8* readColor(const c8* bufPtr, video::SColor& color, const c8* const pBufEnd); + //! Read 3d vector of floats + const c8* readVec3(const c8* bufPtr, core::vector3df& vec, const c8* const pBufEnd); + //! Read 2d vector of floats + const c8* readUV(const c8* bufPtr, core::vector2df& vec, const c8* const pBufEnd); + //! Read boolean value represented as 'on' or 'off' + const c8* readBool(const c8* bufPtr, bool& tf, const c8* const bufEnd); + + // reads and convert to integer the vertex indices in a line of obj file's face statement + // -1 for the index if it doesn't exist + // indices are changed to 0-based index instead of 1-based from the obj file + bool retrieveVertexIndices(c8* vertexData, s32* idx, const c8* bufEnd, u32 vbsize, u32 vtsize, u32 vnsize); + + void cleanUp(); + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + + core::array<SObjMtl*> Materials; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.cpp new file mode 100644 index 0000000..3555324 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.cpp @@ -0,0 +1,243 @@ +// Copyright (C) 2008-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_OBJ_WRITER_ + +#include "COBJMeshWriter.h" +#include "os.h" +#include "IMesh.h" +#include "IMeshBuffer.h" +#include "IAttributes.h" +#include "ISceneManager.h" +#include "IMeshCache.h" +#include "IWriteFile.h" +#include "IFileSystem.h" +#include "ITexture.h" + +namespace irr +{ +namespace scene +{ + +COBJMeshWriter::COBJMeshWriter(scene::ISceneManager* smgr, io::IFileSystem* fs) + : SceneManager(smgr), FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("COBJMeshWriter"); + #endif + + if (SceneManager) + SceneManager->grab(); + + if (FileSystem) + FileSystem->grab(); +} + + +COBJMeshWriter::~COBJMeshWriter() +{ + if (SceneManager) + SceneManager->drop(); + + if (FileSystem) + FileSystem->drop(); +} + + +//! Returns the type of the mesh writer +EMESH_WRITER_TYPE COBJMeshWriter::getType() const +{ + return EMWT_OBJ; +} + + +//! writes a mesh +bool COBJMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + if (!file) + return false; + + os::Printer::log("Writing mesh", file->getFileName()); + + // write OBJ MESH header + + const core::stringc name(FileSystem->getFileBasename(SceneManager->getMeshCache()->getMeshName(mesh), false)+".mtl"); + file->write("# exported by Irrlicht\n",23); + file->write("mtllib ",7); + file->write(name.c_str(),name.size()); + file->write("\n\n",2); + + // write mesh buffers + + core::array<video::SMaterial*> mat; + + u32 allVertexCount=1; // count vertices over the whole file + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + core::stringc num(i+1); + IMeshBuffer* buffer = mesh->getMeshBuffer(i); + if (buffer && buffer->getVertexCount()) + { + file->write("g grp", 5); + file->write(num.c_str(), num.size()); + file->write("\n",1); + + u32 j; + const u32 vertexCount = buffer->getVertexCount(); + for (j=0; j<vertexCount; ++j) + { + file->write("v ",2); + getVectorAsStringLine(buffer->getPosition(j), num); + file->write(num.c_str(), num.size()); + } + + for (j=0; j<vertexCount; ++j) + { + file->write("vt ",3); + getVectorAsStringLine(buffer->getTCoords(j), num); + file->write(num.c_str(), num.size()); + } + + for (j=0; j<vertexCount; ++j) + { + file->write("vn ",3); + getVectorAsStringLine(buffer->getNormal(j), num); + file->write(num.c_str(), num.size()); + } + + file->write("usemtl mat",10); + num = ""; + for (j=0; j<mat.size(); ++j) + { + if (*mat[j]==buffer->getMaterial()) + { + num = core::stringc(j); + break; + } + } + if (num == "") + { + num = core::stringc(mat.size()); + mat.push_back(&buffer->getMaterial()); + } + file->write(num.c_str(), num.size()); + file->write("\n",1); + + const u32 indexCount = buffer->getIndexCount(); + for (j=0; j<indexCount; j+=3) + { + file->write("f ",2); + num = core::stringc(buffer->getIndices()[j+2]+allVertexCount); + file->write(num.c_str(), num.size()); + file->write("/",1); + file->write(num.c_str(), num.size()); + file->write("/",1); + file->write(num.c_str(), num.size()); + file->write(" ",1); + + num = core::stringc(buffer->getIndices()[j+1]+allVertexCount); + file->write(num.c_str(), num.size()); + file->write("/",1); + file->write(num.c_str(), num.size()); + file->write("/",1); + file->write(num.c_str(), num.size()); + file->write(" ",1); + + num = core::stringc(buffer->getIndices()[j+0]+allVertexCount); + file->write(num.c_str(), num.size()); + file->write("/",1); + file->write(num.c_str(), num.size()); + file->write("/",1); + file->write(num.c_str(), num.size()); + file->write(" ",1); + + file->write("\n",1); + } + file->write("\n",1); + allVertexCount += vertexCount; + } + } + + if (mat.size() == 0) + return true; + + file = FileSystem->createAndWriteFile( name ); + if (file) + { + os::Printer::log("Writing material", file->getFileName()); + + file->write("# exported by Irrlicht\n\n",24); + for (u32 i=0; i<mat.size(); ++i) + { + core::stringc num(i); + file->write("newmtl mat",10); + file->write(num.c_str(),num.size()); + file->write("\n",1); + + getColorAsStringLine(mat[i]->AmbientColor, "Ka", num); + file->write(num.c_str(),num.size()); + getColorAsStringLine(mat[i]->DiffuseColor, "Kd", num); + file->write(num.c_str(),num.size()); + getColorAsStringLine(mat[i]->SpecularColor, "Ks", num); + file->write(num.c_str(),num.size()); + getColorAsStringLine(mat[i]->EmissiveColor, "Ke", num); + file->write(num.c_str(),num.size()); + num = core::stringc((double)(mat[i]->Shininess/0.128f)); + file->write("Ns ", 3); + file->write(num.c_str(),num.size()); + file->write("\n", 1); + if (mat[i]->getTexture(0)) + { + file->write("map_Kd ", 7); + file->write(mat[i]->getTexture(0)->getName().getPath().c_str(), mat[i]->getTexture(0)->getName().getPath().size()); + file->write("\n",1); + } + file->write("\n",1); + } + file->drop(); + } + return true; +} + + +void COBJMeshWriter::getVectorAsStringLine(const core::vector3df& v, core::stringc& s) const +{ + s = core::stringc(-v.X); + s += " "; + s += core::stringc(v.Y); + s += " "; + s += core::stringc(v.Z); + s += "\n"; +} + + +void COBJMeshWriter::getVectorAsStringLine(const core::vector2df& v, core::stringc& s) const +{ + s = core::stringc(v.X); + s += " "; + s += core::stringc(-v.Y); + s += "\n"; +} + + +void COBJMeshWriter::getColorAsStringLine(const video::SColor& color, const c8* const prefix, core::stringc& s) const +{ + s = prefix; + s += " "; + s += core::stringc((double)(color.getRed()/255.f)); + s += " "; + s += core::stringc((double)(color.getGreen()/255.f)); + s += " "; + s += core::stringc((double)(color.getBlue()/255.f)); + s += "\n"; +} + + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.h new file mode 100644 index 0000000..34b9108 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COBJMeshWriter.h @@ -0,0 +1,58 @@ +// Copyright (C) 2008-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_OBJ_MESH_WRITER_H_INCLUDED__ +#define __IRR_OBJ_MESH_WRITER_H_INCLUDED__ + +#include "IMeshWriter.h" +#include "S3DVertex.h" +#include "irrString.h" + +namespace irr +{ +namespace io +{ + class IFileSystem; +} // end namespace io +namespace scene +{ + class IMeshBuffer; + class ISceneManager; + + //! class to write meshes, implementing a OBJ writer + class COBJMeshWriter : public IMeshWriter + { + public: + + COBJMeshWriter(scene::ISceneManager* smgr, io::IFileSystem* fs); + virtual ~COBJMeshWriter(); + + //! Returns the type of the mesh writer + virtual EMESH_WRITER_TYPE getType() const; + + //! writes a mesh + virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); + + protected: + // create vector output with line end into string + void getVectorAsStringLine(const core::vector3df& v, + core::stringc& s) const; + + // create vector output with line end into string + void getVectorAsStringLine(const core::vector2df& v, + core::stringc& s) const; + + // create color output with line end into string + void getColorAsStringLine(const video::SColor& color, + const c8* const prefix, core::stringc& s) const; + + scene::ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + }; + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.cpp new file mode 100644 index 0000000..fd03a9b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.cpp @@ -0,0 +1,336 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// originally written by Murphy McCauley, see COCTLoader.h for details. +// +// COCTLoader by Murphy McCauley (February 2005) +// An Irrlicht loader for OCT files +// +// See the header file for additional information including use and distribution rights. + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OCT_LOADER_ + +#include "COCTLoader.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "os.h" +#include "SAnimatedMesh.h" +#include "SMeshBufferLightMap.h" +#include "irrString.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +COCTLoader::COCTLoader(ISceneManager* smgr, io::IFileSystem* fs) + : SceneManager(smgr), FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("COCTLoader"); + #endif + if (FileSystem) + FileSystem->grab(); +} + + +//! destructor +COCTLoader::~COCTLoader() +{ + if (FileSystem) + FileSystem->drop(); +} + + +// Doesn't really belong here, but it's jammed in for now. +void COCTLoader::OCTLoadLights(io::IReadFile* file, scene::ISceneNode * parent, f32 radius, f32 intensityScale, bool rewind) +{ + if (rewind) + file->seek(0); + + octHeader header; + file->read(&header, sizeof(octHeader)); + + file->seek(sizeof(octVert)*header.numVerts, true); + file->seek(sizeof(octFace)*header.numFaces, true); + file->seek(sizeof(octTexture)*header.numTextures, true); + file->seek(sizeof(octLightmap)*header.numLightmaps, true); + + octLight * lights = new octLight[header.numLights]; + file->read(lights, header.numLights * sizeof(octLight)); + + //TODO: Skip past my extended data just for good form + + for (u32 i = 0; i < header.numLights; i++) + { + const f32 intensity = lights[i].intensity * intensityScale; + + SceneManager->addLightSceneNode(parent, core::vector3df(lights[i].pos[0], lights[i].pos[2], lights[i].pos[1]), + video::SColorf(lights[i].color[0] * intensity, lights[i].color[1] * intensity, lights[i].color[2] * intensity, 1.0f), + radius); + } +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* COCTLoader::createMesh(io::IReadFile* file) +{ + if (!file) + return 0; + + octHeader header; + file->read(&header, sizeof(octHeader)); + + octVert * verts = new octVert[header.numVerts]; + octFace * faces = new octFace[header.numFaces]; + octTexture * textures = new octTexture[header.numTextures]; + octLightmap * lightmaps = new octLightmap[header.numLightmaps]; + octLight * lights = new octLight[header.numLights]; + + file->read(verts, sizeof(octVert) * header.numVerts); + file->read(faces, sizeof(octFace) * header.numFaces); + //TODO: Make sure id is in the legal range for Textures and Lightmaps + + u32 i; + for (i = 0; i < header.numTextures; i++) { + octTexture t; + file->read(&t, sizeof(octTexture)); + textures[t.id] = t; + } + for (i = 0; i < header.numLightmaps; i++) { + octLightmap t; + file->read(&t, sizeof(octLightmap)); + lightmaps[t.id] = t; + } + file->read(lights, sizeof(octLight) * header.numLights); + + //TODO: Now read in my extended OCT header (flexible lightmaps and vertex normals) + + + // This is the method Nikolaus Gebhardt used in the Q3 loader -- create a + // meshbuffer for every possible combination of lightmap and texture including + // a "null" texture and "null" lightmap. Ones that end up with nothing in them + // will be removed later. + + SMesh * Mesh = new SMesh(); + for (i=0; i<(header.numTextures+1) * (header.numLightmaps+1); ++i) + { + scene::SMeshBufferLightMap* buffer = new scene::SMeshBufferLightMap(); + + buffer->Material.MaterialType = video::EMT_LIGHTMAP; + buffer->Material.Lighting = false; + Mesh->addMeshBuffer(buffer); + buffer->drop(); + } + + + // Build the mesh buffers + for (i = 0; i < header.numFaces; i++) + { + if (faces[i].numVerts < 3) + continue; + + const f32* const a = verts[faces[i].firstVert].pos; + const f32* const b = verts[faces[i].firstVert+1].pos; + const f32* const c = verts[faces[i].firstVert+2].pos; + const core::vector3df normal = + core::plane3df(core::vector3df(a[0],a[1],a[2]), core::vector3df(b[0],c[1],c[2]), core::vector3df(c[0],c[1],c[2])).Normal; + + const u32 textureID = core::min_(s32(faces[i].textureID), s32(header.numTextures - 1)) + 1; + const u32 lightmapID = core::min_(s32(faces[i].lightmapID),s32(header.numLightmaps - 1)) + 1; + SMeshBufferLightMap * meshBuffer = (SMeshBufferLightMap*)Mesh->getMeshBuffer(lightmapID * (header.numTextures + 1) + textureID); + const u32 base = meshBuffer->Vertices.size(); + + // Add this face's verts + u32 v; + for (v = 0; v < faces[i].numVerts; ++v) + { + octVert * vv = &verts[faces[i].firstVert + v]; + video::S3DVertex2TCoords vert; + vert.Pos.set(vv->pos[0], vv->pos[1], vv->pos[2]); + vert.Color = video::SColor(0,255,255,255); + vert.Normal.set(normal); + + if (textureID == 0) + { + // No texture -- just a lightmap. Thus, use lightmap coords for texture 1. + // (the actual texture will be swapped later) + vert.TCoords.set(vv->lc[0], vv->lc[1]); + } + else + { + vert.TCoords.set(vv->tc[0], vv->tc[1]); + vert.TCoords2.set(vv->lc[0], vv->lc[1]); + } + + meshBuffer->Vertices.push_back(vert); + } + + // Now add the indices + // This weird loop turns convex polygons into triangle strips. + // I do it this way instead of a simple fan because it usually looks a lot better in wireframe, for example. + // High, Low + u32 h = faces[i].numVerts - 1; + u32 l = 0; + for (v = 0; v < faces[i].numVerts - 2; ++v) + { + const u32 center = (v & 1)? h - 1: l + 1; + + meshBuffer->Indices.push_back(base + h); + meshBuffer->Indices.push_back(base + l); + meshBuffer->Indices.push_back(base + center); + + if (v & 1) + --h; + else + ++l; + } + } + + // load textures + core::array<video::ITexture*> tex; + tex.reallocate(header.numTextures + 1); + tex.push_back(0); + + const core::stringc relpath = FileSystem->getFileDir(file->getFileName())+"/"; + for (i = 1; i < (header.numTextures + 1); i++) + { + core::stringc path(textures[i-1].fileName); + path.replace('\\','/'); + if (FileSystem->existFile(path)) + tex.push_back(SceneManager->getVideoDriver()->getTexture(path)); + else + // try to read in the relative path of the OCT file + tex.push_back(SceneManager->getVideoDriver()->getTexture( (relpath + path) )); + } + + // prepare lightmaps + core::array<video::ITexture*> lig; + lig.set_used(header.numLightmaps + 1); + lig[0] = 0; + + const u32 lightmapWidth = 128; + const u32 lightmapHeight = 128; + const core::dimension2d<u32> lmapsize(lightmapWidth, lightmapHeight); + + bool oldMipMapState = SceneManager->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + + video::IImage* tmpImage = SceneManager->getVideoDriver()->createImage(video::ECF_R8G8B8, lmapsize); + for (i = 1; i < (header.numLightmaps + 1); ++i) + { + core::stringc lightmapname = file->getFileName(); + lightmapname += ".lightmap."; + lightmapname += (int)i; + + const octLightmap* lm = &lightmaps[i-1]; + + for (u32 x=0; x<lightmapWidth; ++x) + { + for (u32 y=0; y<lightmapHeight; ++y) + { + tmpImage->setPixel(x, y, + video::SColor(255, + lm->data[x][y][2], + lm->data[x][y][1], + lm->data[x][y][0])); + } + } + + lig[i] = SceneManager->getVideoDriver()->addTexture(lightmapname.c_str(), tmpImage); + } + tmpImage->drop(); + SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); + + // Free stuff + delete [] verts; + delete [] faces; + delete [] textures; + delete [] lightmaps; + delete [] lights; + + // attach materials + for (i = 0; i < header.numLightmaps + 1; i++) + { + for (u32 j = 0; j < header.numTextures + 1; j++) + { + u32 mb = i * (header.numTextures + 1) + j; + SMeshBufferLightMap * meshBuffer = (SMeshBufferLightMap*)Mesh->getMeshBuffer(mb); + meshBuffer->Material.setTexture(0, tex[j]); + meshBuffer->Material.setTexture(1, lig[i]); + + if (meshBuffer->Material.getTexture(0) == 0) + { + // This material has no texture, so we'll just show the lightmap if there is one. + // We swapped the texture coordinates earlier. + meshBuffer->Material.setTexture(0, meshBuffer->Material.getTexture(1)); + meshBuffer->Material.setTexture(1, 0); + } + if (meshBuffer->Material.getTexture(1) == 0) + { + // If there is only one texture, it should be solid and lit. + // Among other things, this way you can preview OCT lights. + meshBuffer->Material.MaterialType = video::EMT_SOLID; + meshBuffer->Material.Lighting = true; + } + } + } + + // delete all buffers without geometry in it. + i = 0; + while(i < Mesh->MeshBuffers.size()) + { + if (Mesh->MeshBuffers[i]->getVertexCount() == 0 || + Mesh->MeshBuffers[i]->getIndexCount() == 0 || + Mesh->MeshBuffers[i]->getMaterial().getTexture(0) == 0) + { + // Meshbuffer is empty -- drop it + Mesh->MeshBuffers[i]->drop(); + Mesh->MeshBuffers.erase(i); + } + else + { + ++i; + } + } + + + // create bounding box + for (i = 0; i < Mesh->MeshBuffers.size(); ++i) + { + Mesh->MeshBuffers[i]->recalculateBoundingBox(); + } + Mesh->recalculateBoundingBox(); + + + // Set up an animated mesh to hold the mesh + SAnimatedMesh* AMesh = new SAnimatedMesh(); + AMesh->Type = EAMT_OCT; + AMesh->addMesh(Mesh); + AMesh->recalculateBoundingBox(); + Mesh->drop(); + + return AMesh; +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool COCTLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "oct" ); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_OCT_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.h new file mode 100644 index 0000000..57eef61 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COCTLoader.h @@ -0,0 +1,141 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// Because I (Nikolaus Gebhardt) did some changes to Murphy McCauley's loader, +// I'm writing this down here: +// - Replaced all dependencies to STL and stdio with irr:: methods/constructs +// - Disabled logging define +// - Changed some minor things (Don't remember what exactly.) +// Thanks a lot to Murphy McCauley for writing this loader. + +// +// COCTLoader by Murphy McCauley (February 2005) +// An Irrlicht loader for OCT files +// +// OCT file format information comes from the sourcecode of the Fluid Studios +// Radiosity Processor by Paul Nettle. You can get that sourcecode from +// http://www.fluidstudios.com . +// +// Parts of this code are from Irrlicht's CQ3LevelMesh and C3DSMeshFileLoader, +// and are Copyright (C) 2002-2004 Nikolaus Gebhardt. +// +// Use of this code is subject to the following: +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// 4. You may not use this software to directly or indirectly cause harm to others. + + +#ifndef __C_OCT_LOADER_H_INCLUDED__ +#define __C_OCT_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IReadFile.h" +#include "SMesh.h" +#include "irrString.h" + +namespace irr +{ +namespace io +{ + class IFileSystem; +} // end namespace io +namespace scene +{ + class ISceneManager; + class ISceneNode; + + class COCTLoader : public IMeshLoader + { + public: + //! constructor + COCTLoader(ISceneManager* smgr, io::IFileSystem* fs); + + //! destructor + virtual ~COCTLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + void OCTLoadLights(io::IReadFile* file, + ISceneNode * parent = 0, f32 radius = 500.0f, + f32 intensityScale = 0.0000001f*2.5, + bool rewind = true); + + private: + struct octHeader { + u32 numVerts; + u32 numFaces; + u32 numTextures; + u32 numLightmaps; + u32 numLights; + }; + + struct octHeaderEx { + u32 magic; // 'OCTX' - 0x4F435458L + u32 numLightmaps; + u32 lightmapWidth; + u32 lightmapHeight; + u32 containsVertexNormals; + }; + + struct octFace { + u32 firstVert; + u32 numVerts; + u32 textureID; + u32 lightmapID; + f32 plane[4]; + }; + + struct octVert { + f32 tc[2]; + f32 lc[2]; + f32 pos[3]; + }; + + struct octTexture { + u32 id; + char fileName[64]; + }; + + struct octLightmap { + u32 id; + u8 data[128][128][3]; + }; + + struct octLight { + f32 pos[3]; + f32 color[3]; + u32 intensity; + }; + + ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.cpp new file mode 100644 index 0000000..0899d1d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.cpp @@ -0,0 +1,212 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "COSOperator.h" + +#ifdef _IRR_WINDOWS_API_ +#ifndef _IRR_XBOX_PLATFORM_ +#include <windows.h> +#endif +#else +#include <string.h> +#include <unistd.h> +#ifndef _IRR_SOLARIS_PLATFORM_ +#include <sys/types.h> +#include <sys/sysctl.h> +#endif +#endif + +#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) +#include "CIrrDeviceLinux.h" +#endif +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ +#include "MacOSX/OSXClipboard.h" +#endif + +namespace irr +{ + +#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) +// constructor linux + COSOperator::COSOperator(const core::stringc& osVersion, CIrrDeviceLinux* device) +: OperatingSystem(osVersion), IrrDeviceLinux(device) +{ +} +#endif + +// constructor +COSOperator::COSOperator(const core::stringc& osVersion) : OperatingSystem(osVersion) +{ + #ifdef _DEBUG + setDebugName("COSOperator"); + #endif +} + + +//! returns the current operating system version as string. +const core::stringc& COSOperator::getOperatingSystemVersion() const +{ + return OperatingSystem; +} + + +//! copies text to the clipboard +void COSOperator::copyToClipboard(const c8* text) const +{ + if (strlen(text)==0) + return; + +// Windows version +#if defined(_IRR_XBOX_PLATFORM_) +#elif defined(_IRR_WINDOWS_API_) + if (!OpenClipboard(NULL) || text == 0) + return; + + EmptyClipboard(); + + HGLOBAL clipbuffer; + char * buffer; + + clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(text)+1); + buffer = (char*)GlobalLock(clipbuffer); + + strcpy(buffer, text); + + GlobalUnlock(clipbuffer); + SetClipboardData(CF_TEXT, clipbuffer); + CloseClipboard(); + +// MacOSX version +#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) + + OSXCopyToClipboard(text); + +#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) + if ( IrrDeviceLinux ) + IrrDeviceLinux->copyToClipboard(text); +#else + +#endif +} + + +//! gets text from the clipboard +//! \return Returns 0 if no string is in there. +const c8* COSOperator::getTextFromClipboard() const +{ +#if defined(_IRR_XBOX_PLATFORM_) + return 0; +#elif defined(_IRR_WINDOWS_API_) + if (!OpenClipboard(NULL)) + return 0; + + char * buffer = 0; + + HANDLE hData = GetClipboardData( CF_TEXT ); + buffer = (char*)GlobalLock( hData ); + GlobalUnlock( hData ); + CloseClipboard(); + return buffer; + +#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) + return (OSXCopyFromClipboard()); + +#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) + if ( IrrDeviceLinux ) + return IrrDeviceLinux->getTextFromClipboard(); + return 0; + +#else + + return 0; +#endif +} + + +bool COSOperator::getProcessorSpeedMHz(u32* MHz) const +{ +#if defined(_IRR_WINDOWS_API_) && !defined(_WIN32_WCE ) && !defined (_IRR_XBOX_PLATFORM_) + LONG Error; + + HKEY Key; + Error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, + __TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), + 0, KEY_READ, &Key); + + if(Error != ERROR_SUCCESS) + return false; + + DWORD Speed = 0; + DWORD Size = sizeof(Speed); + Error = RegQueryValueEx(Key, __TEXT("~MHz"), NULL, NULL, (LPBYTE)&Speed, &Size); + + RegCloseKey(Key); + + if (Error != ERROR_SUCCESS) + return false; + else if (MHz) + *MHz = Speed; + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return true; + +#elif defined(_IRR_OSX_PLATFORM_) + struct clockinfo CpuClock; + size_t Size = sizeof(clockinfo); + + if (!sysctlbyname("kern.clockrate", &CpuClock, &Size, NULL, 0)) + return false; + else if (MHz) + *MHz = CpuClock.hz; + return true; +#else + // could probably be read from "/proc/cpuinfo" or "/proc/cpufreq" + + return false; +#endif +} + +bool COSOperator::getSystemMemory(u32* Total, u32* Avail) const +{ +#if defined(_IRR_WINDOWS_API_) && !defined (_IRR_XBOX_PLATFORM_) + MEMORYSTATUS MemoryStatus; + MemoryStatus.dwLength = sizeof(MEMORYSTATUS); + + // cannot fail + GlobalMemoryStatus(&MemoryStatus); + + if (Total) + *Total = (u32)(MemoryStatus.dwTotalPhys>>10); + if (Avail) + *Avail = (u32)(MemoryStatus.dwAvailPhys>>10); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return true; + +#elif defined(_IRR_POSIX_API_) && !defined(__FreeBSD__) +#if defined(_SC_PHYS_PAGES) && defined(_SC_AVPHYS_PAGES) + long ps = sysconf(_SC_PAGESIZE); + long pp = sysconf(_SC_PHYS_PAGES); + long ap = sysconf(_SC_AVPHYS_PAGES); + + if ((ps==-1)||(pp==-1)||(ap==-1)) + return false; + + if (Total) + *Total = (u32)((ps*(long long)pp)>>10); + if (Avail) + *Avail = (u32)((ps*(long long)ap)>>10); + return true; +#else + // TODO: implement for non-availablity of symbols/features + return false; +#endif +#else + // TODO: implement for OSX + return false; +#endif +} + + +} // end namespace + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.h new file mode 100644 index 0000000..819805f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COSOperator.h @@ -0,0 +1,60 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OS_OPERATOR_H_INCLUDED__ +#define __C_OS_OPERATOR_H_INCLUDED__ + +#include "IOSOperator.h" + +namespace irr +{ + +class CIrrDeviceLinux; + +//! The Operating system operator provides operation system specific methods and informations. +class COSOperator : public IOSOperator +{ +public: + + // constructor +#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) + COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device); +#endif + COSOperator(const core::stringc& osversion); + + //! returns the current operation system version as string. + virtual const core::stringc& getOperatingSystemVersion() const; + + //! copies text to the clipboard + virtual void copyToClipboard(const c8* text) const; + + //! gets text from the clipboard + //! \return Returns 0 if no string is in there. + virtual const c8* getTextFromClipboard() const; + + //! gets the processor speed in megahertz + //! \param Mhz: + //! \return Returns true if successful, false if not + virtual bool getProcessorSpeedMHz(u32* MHz) const; + + //! gets the total and available system RAM in kB + //! \param Total: will contain the total system memory + //! \param Avail: will contain the available memory + //! \return Returns true if successful, false if not + virtual bool getSystemMemory(u32* Total, u32* Avail) const; + +private: + + core::stringc OperatingSystem; + +#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) + CIrrDeviceLinux * IrrDeviceLinux; +#endif + +}; + +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.cpp new file mode 100644 index 0000000..226f6f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.cpp @@ -0,0 +1,636 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "COctreeSceneNode.h" +#include "Octree.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" +#include "ICameraSceneNode.h" +#include "IMeshCache.h" +#include "IAnimatedMesh.h" +#include "IMaterialRenderer.h" +#include "os.h" +#include "CShadowVolumeSceneNode.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +COctreeSceneNode::COctreeSceneNode(ISceneNode* parent, ISceneManager* mgr, + s32 id, s32 minimalPolysPerNode) + : IMeshSceneNode(parent, mgr, id), StdOctree(0), LightMapOctree(0), + TangentsOctree(0), VertexType((video::E_VERTEX_TYPE)-1), + MinimalPolysPerNode(minimalPolysPerNode), Mesh(0), Shadow(0), + UseVBOs(OCTREE_USE_HARDWARE), UseVisibilityAndVBOs(OCTREE_USE_VISIBILITY), + BoxBased(OCTREE_BOX_BASED) +{ +#ifdef _DEBUG + setDebugName("COctreeSceneNode"); +#endif +} + + +//! destructor +COctreeSceneNode::~COctreeSceneNode() +{ + if (Shadow) + Shadow->drop(); + deleteTree(); +} + + +void COctreeSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + { + // because this node supports rendering of mixed mode meshes consisting of + // transparent and solid material at the same time, we need to go through all + // materials, check of what type they are and register this node for the right + // render pass according to that. + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + PassCount = 0; + u32 transparentCount = 0; + u32 solidCount = 0; + + // count transparent and solid materials in this scene node + for (u32 i=0; i<Materials.size(); ++i) + { + const video::IMaterialRenderer* const rnd = + driver->getMaterialRenderer(Materials[i].MaterialType); + + if (rnd && rnd->isTransparent()) + ++transparentCount; + else + ++solidCount; + + if (solidCount && transparentCount) + break; + } + + // register according to material types counted + + if (solidCount) + SceneManager->registerNodeForRendering(this, scene::ESNRP_SOLID); + + if (transparentCount) + SceneManager->registerNodeForRendering(this, scene::ESNRP_TRANSPARENT); + + ISceneNode::OnRegisterSceneNode(); + } +} + + +//! renders the node. +void COctreeSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + if (VertexType == -1 || !driver) + return; + + ICameraSceneNode* camera = SceneManager->getActiveCamera(); + if (!camera) + return; + + bool isTransparentPass = + SceneManager->getSceneNodeRenderPass() == scene::ESNRP_TRANSPARENT; + ++PassCount; + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + if (Shadow) + Shadow->updateShadowVolumes(); + + SViewFrustum frust = *camera->getViewFrustum(); + + //transform the frustum to the current absolute transformation + if ( !AbsoluteTransformation.isIdentity() ) + { + core::matrix4 invTrans(AbsoluteTransformation, core::matrix4::EM4CONST_INVERSE); + frust.transform(invTrans); + } + + const core::aabbox3d<float> &box = frust.getBoundingBox(); + + switch (VertexType) + { + case video::EVT_STANDARD: + { + if (BoxBased) + StdOctree->calculatePolys(box); + else + StdOctree->calculatePolys(frust); + + const Octree<video::S3DVertex>::SIndexData* d = StdOctree->getIndexData(); + + for (u32 i=0; i<Materials.size(); ++i) + { + if ( 0 == d[i].CurrentSize ) + continue; + + const video::IMaterialRenderer* const rnd = driver->getMaterialRenderer(Materials[i].MaterialType); + const bool transparent = (rnd && rnd->isTransparent()); + + // only render transparent buffer if this is the transparent render pass + // and solid only in solid pass + if (transparent == isTransparentPass) + { + driver->setMaterial(Materials[i]); + driver->drawIndexedTriangleList( + &StdMeshes[i].Vertices[0], StdMeshes[i].Vertices.size(), + d[i].Indices, d[i].CurrentSize / 3); + } + } + + // for debug purposes only + if (DebugDataVisible && !Materials.empty() && PassCount==1) + { + const core::aabbox3df& box = frust.getBoundingBox(); + core::array< const core::aabbox3d<f32>* > boxes; + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + if ( DebugDataVisible & scene::EDS_BBOX_BUFFERS ) + { + StdOctree->getBoundingBoxes(box, boxes); + for (u32 b=0; b!=boxes.size(); ++b) + driver->draw3DBox(*boxes[b]); + } + + if ( DebugDataVisible & scene::EDS_BBOX ) + driver->draw3DBox(Box,video::SColor(0,255,0,0)); + } + } + break; + case video::EVT_2TCOORDS: + { + if (BoxBased) + LightMapOctree->calculatePolys(box); + else + LightMapOctree->calculatePolys(frust); + + const Octree<video::S3DVertex2TCoords>::SIndexData* d = LightMapOctree->getIndexData(); + + for (u32 i=0; i<Materials.size(); ++i) + { + if ( 0 == d[i].CurrentSize ) + continue; + + const video::IMaterialRenderer* const rnd = driver->getMaterialRenderer(Materials[i].MaterialType); + const bool transparent = (rnd && rnd->isTransparent()); + + // only render transparent buffer if this is the transparent render pass + // and solid only in solid pass + if (transparent == isTransparentPass) + { + driver->setMaterial(Materials[i]); + if (UseVBOs) + { + if (UseVisibilityAndVBOs) + { + u16* oldPointer = LightMapMeshes[i].Indices.pointer(); + const u32 oldSize = LightMapMeshes[i].Indices.size(); + LightMapMeshes[i].Indices.set_free_when_destroyed(false); + LightMapMeshes[i].Indices.set_pointer(d[i].Indices, d[i].CurrentSize, false, false); + LightMapMeshes[i].setDirty(scene::EBT_INDEX); + driver->drawMeshBuffer ( &LightMapMeshes[i] ); + LightMapMeshes[i].Indices.set_pointer(oldPointer, oldSize); + LightMapMeshes[i].setDirty(scene::EBT_INDEX); + } + else + driver->drawMeshBuffer ( &LightMapMeshes[i] ); + } + else + driver->drawIndexedTriangleList( + &LightMapMeshes[i].Vertices[0], + LightMapMeshes[i].Vertices.size(), + d[i].Indices, d[i].CurrentSize / 3); + } + } + + // for debug purposes only + if (DebugDataVisible && !Materials.empty() && PassCount==1) + { + const core::aabbox3d<float> &box = frust.getBoundingBox(); + core::array< const core::aabbox3d<f32>* > boxes; + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + if ( DebugDataVisible & scene::EDS_BBOX_BUFFERS ) + { + LightMapOctree->getBoundingBoxes(box, boxes); + for (u32 b=0; b<boxes.size(); ++b) + driver->draw3DBox(*boxes[b]); + } + + if ( DebugDataVisible & scene::EDS_BBOX ) + driver->draw3DBox(Box,video::SColor(0,255,0,0)); + } + } + break; + case video::EVT_TANGENTS: + { + if (BoxBased) + TangentsOctree->calculatePolys(box); + else + TangentsOctree->calculatePolys(frust); + + const Octree<video::S3DVertexTangents>::SIndexData* d = TangentsOctree->getIndexData(); + + for (u32 i=0; i<Materials.size(); ++i) + { + if ( 0 == d[i].CurrentSize ) + continue; + + const video::IMaterialRenderer* const rnd = driver->getMaterialRenderer(Materials[i].MaterialType); + const bool transparent = (rnd && rnd->isTransparent()); + + // only render transparent buffer if this is the transparent render pass + // and solid only in solid pass + if (transparent == isTransparentPass) + { + driver->setMaterial(Materials[i]); + driver->drawIndexedTriangleList( + &TangentsMeshes[i].Vertices[0], TangentsMeshes[i].Vertices.size(), + d[i].Indices, d[i].CurrentSize / 3); + } + } + + // for debug purposes only + if (DebugDataVisible && !Materials.empty() && PassCount==1) + { + const core::aabbox3d<float> &box = frust.getBoundingBox(); + core::array< const core::aabbox3d<f32>* > boxes; + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + if ( DebugDataVisible & scene::EDS_BBOX_BUFFERS ) + { + TangentsOctree->getBoundingBoxes(box, boxes); + for (u32 b=0; b<boxes.size(); ++b) + driver->draw3DBox(*boxes[b]); + } + + if ( DebugDataVisible & scene::EDS_BBOX ) + driver->draw3DBox(Box,video::SColor(0,255,0,0)); + } + } + break; + } +} + + +//! Removes a child from this scene node. +//! Implemented here, to be able to remove the shadow properly, if there is one, +//! or to remove attached childs. +bool COctreeSceneNode::removeChild(ISceneNode* child) +{ + if (child && Shadow == child) + { + Shadow->drop(); + Shadow = 0; + } + + return ISceneNode::removeChild(child); +} + + +//! Creates shadow volume scene node as child of this node +//! and returns a pointer to it. +IShadowVolumeSceneNode* COctreeSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) +{ + if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) + return 0; + + if (!shadowMesh) + shadowMesh = Mesh; // if null is given, use the mesh of node + + if (Shadow) + Shadow->drop(); + + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); + return Shadow; +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& COctreeSceneNode::getBoundingBox() const +{ + return Box; +} + + +//! creates the tree +/* This method has a lot of duplication and overhead. Moreover, the tangents mesh conversion does not really work. I think we need a a proper mesh implementation for octrees, which handle all vertex types internally. Converting all structures to just one vertex type is always problematic. +Thanks to Auria for fixing major parts of this method. */ +bool COctreeSceneNode::createTree(IMesh* mesh) +{ + if (!mesh) + return false; + + MeshName = SceneManager->getMeshCache()->getMeshName(mesh); + + mesh->grab(); + deleteTree(); + + Mesh = mesh; + + const u32 beginTime = os::Timer::getRealTime(); + + u32 nodeCount = 0; + u32 polyCount = 0; + u32 i; + + Box = mesh->getBoundingBox(); + + if (mesh->getMeshBufferCount()) + { + // check for "larger" buffer types + VertexType = video::EVT_STANDARD; + u32 meshReserve = 0; + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + const IMeshBuffer* b = mesh->getMeshBuffer(i); + if (b->getVertexCount() && b->getIndexCount()) + { + ++meshReserve; + if (b->getVertexType() == video::EVT_2TCOORDS) + VertexType = video::EVT_2TCOORDS; + else if (b->getVertexType() == video::EVT_TANGENTS) + VertexType = video::EVT_TANGENTS; + } + } + Materials.reallocate(Materials.size()+meshReserve); + + switch(VertexType) + { + case video::EVT_STANDARD: + { + StdMeshes.reallocate(StdMeshes.size() + meshReserve); + for (i=0; i<mesh->getMeshBufferCount(); ++i) + { + IMeshBuffer* b = mesh->getMeshBuffer(i); + + if (b->getVertexCount() && b->getIndexCount()) + { + Materials.push_back(b->getMaterial()); + + StdMeshes.push_back(Octree<video::S3DVertex>::SMeshChunk()); + Octree<video::S3DVertex>::SMeshChunk &nchunk = StdMeshes.getLast(); + nchunk.MaterialId = Materials.size() - 1; + + u32 v; + nchunk.Vertices.reallocate(b->getVertexCount()); + switch (b->getVertexType()) + { + case video::EVT_STANDARD: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertex*)b->getVertices())[v]); + break; + case video::EVT_2TCOORDS: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertex2TCoords*)b->getVertices())[v]); + break; + case video::EVT_TANGENTS: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertexTangents*)b->getVertices())[v]); + break; + } + + polyCount += b->getIndexCount(); + + nchunk.Indices.reallocate(b->getIndexCount()); + for (v=0; v<b->getIndexCount(); ++v) + nchunk.Indices.push_back(b->getIndices()[v]); + } + } + + StdOctree = new Octree<video::S3DVertex>(StdMeshes, MinimalPolysPerNode); + nodeCount = StdOctree->getNodeCount(); + } + break; + case video::EVT_2TCOORDS: + { + LightMapMeshes.reallocate(LightMapMeshes.size() + meshReserve); + + for ( i=0; i < mesh->getMeshBufferCount(); ++i) + { + IMeshBuffer* b = mesh->getMeshBuffer(i); + + if (b->getVertexCount() && b->getIndexCount()) + { + Materials.push_back(b->getMaterial()); + LightMapMeshes.push_back(Octree<video::S3DVertex2TCoords>::SMeshChunk()); + Octree<video::S3DVertex2TCoords>::SMeshChunk& nchunk = LightMapMeshes.getLast(); + nchunk.MaterialId = Materials.size() - 1; + + if (UseVisibilityAndVBOs) + { + nchunk.setHardwareMappingHint(scene::EHM_STATIC, scene::EBT_VERTEX); + nchunk.setHardwareMappingHint(scene::EHM_DYNAMIC, scene::EBT_INDEX); + } + else + nchunk.setHardwareMappingHint(scene::EHM_STATIC); + + u32 v; + nchunk.Vertices.reallocate(b->getVertexCount()); + switch (b->getVertexType()) + { + case video::EVT_STANDARD: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertex*)b->getVertices())[v]); + break; + case video::EVT_2TCOORDS: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertex2TCoords*)b->getVertices())[v]); + break; + case video::EVT_TANGENTS: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertexTangents*)b->getVertices())[v]); + break; + } + + polyCount += b->getIndexCount(); + nchunk.Indices.reallocate(b->getIndexCount()); + for (v=0; v<b->getIndexCount(); ++v) + nchunk.Indices.push_back(b->getIndices()[v]); + } + } + + LightMapOctree = new Octree<video::S3DVertex2TCoords>(LightMapMeshes, MinimalPolysPerNode); + nodeCount = LightMapOctree->getNodeCount(); + } + break; + case video::EVT_TANGENTS: + { + TangentsMeshes.reallocate(TangentsMeshes.size() + meshReserve); + + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + IMeshBuffer* b = mesh->getMeshBuffer(i); + + if (b->getVertexCount() && b->getIndexCount()) + { + Materials.push_back(b->getMaterial()); + TangentsMeshes.push_back(Octree<video::S3DVertexTangents>::SMeshChunk()); + Octree<video::S3DVertexTangents>::SMeshChunk& nchunk = TangentsMeshes.getLast(); + nchunk.MaterialId = Materials.size() - 1; + + u32 v; + nchunk.Vertices.reallocate(b->getVertexCount()); + switch (b->getVertexType()) + { + case video::EVT_STANDARD: + for (v=0; v<b->getVertexCount(); ++v) + { + const video::S3DVertex& tmpV = ((video::S3DVertex*)b->getVertices())[v]; + nchunk.Vertices.push_back(video::S3DVertexTangents(tmpV.Pos, tmpV.Color, tmpV.TCoords)); + } + break; + case video::EVT_2TCOORDS: + for (v=0; v<b->getVertexCount(); ++v) + { + const video::S3DVertex2TCoords& tmpV = ((video::S3DVertex2TCoords*)b->getVertices())[v]; + nchunk.Vertices.push_back(video::S3DVertexTangents(tmpV.Pos, tmpV.Color, tmpV.TCoords)); + } + break; + case video::EVT_TANGENTS: + for (v=0; v<b->getVertexCount(); ++v) + nchunk.Vertices.push_back(((video::S3DVertexTangents*)b->getVertices())[v]); + break; + } + + polyCount += b->getIndexCount(); + nchunk.Indices.reallocate(b->getIndexCount()); + for (v=0; v<b->getIndexCount(); ++v) + nchunk.Indices.push_back(b->getIndices()[v]); + } + } + + TangentsOctree = new Octree<video::S3DVertexTangents>(TangentsMeshes, MinimalPolysPerNode); + nodeCount = TangentsOctree->getNodeCount(); + } + break; + } + } + + const u32 endTime = os::Timer::getRealTime(); + c8 tmp[255]; + sprintf(tmp, "Needed %ums to create Octree SceneNode.(%u nodes, %u polys)", + endTime - beginTime, nodeCount, polyCount/3); + os::Printer::log(tmp, ELL_INFORMATION); + + return true; +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hirachy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& COctreeSceneNode::getMaterial(u32 i) +{ + if ( i >= Materials.size() ) + return ISceneNode::getMaterial(i); + + return Materials[i]; +} + + +//! returns amount of materials used by this scene node. +u32 COctreeSceneNode::getMaterialCount() const +{ + return Materials.size(); +} + + +//! Writes attributes of the scene node. +void COctreeSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ISceneNode::serializeAttributes(out, options); + + out->addInt("MinimalPolysPerNode", MinimalPolysPerNode); + out->addString("Mesh", MeshName.c_str()); +} + + +//! Reads attributes of the scene node. +void COctreeSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + const s32 oldMinimal = MinimalPolysPerNode; + + MinimalPolysPerNode = in->getAttributeAsInt("MinimalPolysPerNode"); + io::path newMeshStr = in->getAttributeAsString("Mesh"); + + IMesh* newMesh = 0; + + if (newMeshStr == "") + newMeshStr = MeshName; + + IAnimatedMesh* newAnimatedMesh = SceneManager->getMesh(newMeshStr.c_str()); + + if (newAnimatedMesh) + newMesh = newAnimatedMesh->getMesh(0); + + if (newMesh && ((MeshName != newMeshStr) || (MinimalPolysPerNode != oldMinimal))) + { + // recalculate tree + createTree(newMesh); + } + + ISceneNode::deserializeAttributes(in, options); +} + + +void COctreeSceneNode::deleteTree() +{ + delete StdOctree; + StdOctree = 0; + StdMeshes.clear(); + + delete LightMapOctree; + LightMapOctree = 0; + LightMapMeshes.clear(); + + delete TangentsOctree; + TangentsOctree = 0; + TangentsMeshes.clear(); + + Materials.clear(); + + if(Mesh) + Mesh->drop(); +} + +void COctreeSceneNode::setMesh(IMesh* mesh) +{ + createTree(mesh); +} + +IMesh* COctreeSceneNode::getMesh(void) +{ + return Mesh; +} + +void COctreeSceneNode::setReadOnlyMaterials(bool readonly) +{ + // Do nothing +} + +bool COctreeSceneNode::isReadOnlyMaterials() const +{ + return false; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.h new file mode 100644 index 0000000..203be70 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeSceneNode.h @@ -0,0 +1,115 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OCTREE_SCENE_NODE_H_INCLUDED__ +#define __C_OCTREE_SCENE_NODE_H_INCLUDED__ + +#include "IMeshSceneNode.h" +#include "Octree.h" + +namespace irr +{ +namespace scene +{ + //! implementation of the IBspTreeSceneNode + class COctreeSceneNode : public IMeshSceneNode + { + public: + + //! constructor + COctreeSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + s32 minimalPolysPerNode=512); + + //! destructor + virtual ~COctreeSceneNode(); + + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! creates the tree + bool createTree(IMesh* mesh); + + //! returns the material based on the zero based index i. To get the amount + //! of materials used by this scene node, use getMaterialCount(). + //! This function is needed for inserting the node into the scene hirachy on a + //! optimal position for minimizing renderstate changes, but can also be used + //! to directly modify the material of a scene node. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_OCTREE; } + + //! Sets a new mesh to display + virtual void setMesh(IMesh* mesh); + + //! Get the currently defined mesh for display. + virtual IMesh* getMesh(void); + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + virtual void setReadOnlyMaterials(bool readonly); + + //! Check if the scene node should not copy the materials of the mesh but use them in a read only style + virtual bool isReadOnlyMaterials() const; + + //! Creates shadow volume scene node as child of this node + //! and returns a pointer to it. + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + + //! Removes a child from this scene node. + //! Implemented here, to be able to remove the shadow properly, if there is one, + //! or to remove attached childs. + virtual bool removeChild(ISceneNode* child); + + private: + + void deleteTree(); + + core::aabbox3d<f32> Box; + + Octree<video::S3DVertex>* StdOctree; + core::array< Octree<video::S3DVertex>::SMeshChunk > StdMeshes; + + Octree<video::S3DVertex2TCoords>* LightMapOctree; + core::array< Octree<video::S3DVertex2TCoords>::SMeshChunk > LightMapMeshes; + + Octree<video::S3DVertexTangents>* TangentsOctree; + core::array< Octree<video::S3DVertexTangents>::SMeshChunk > TangentsMeshes; + + video::E_VERTEX_TYPE VertexType; + core::array< video::SMaterial > Materials; + + core::stringc MeshName; + s32 MinimalPolysPerNode; + s32 PassCount; + + IMesh * Mesh; + IShadowVolumeSceneNode* Shadow; + //! use VBOs for rendering where possible + bool UseVBOs; + //! use visibility information together with VBOs + bool UseVisibilityAndVBOs; + //! use bounding box or frustum for calculate polys + bool BoxBased; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.cpp new file mode 100644 index 0000000..657f911 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.cpp @@ -0,0 +1,265 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "COctreeTriangleSelector.h" +#include "ISceneNode.h" + +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +COctreeTriangleSelector::COctreeTriangleSelector(const IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode) + : CTriangleSelector(mesh, node), Root(0), NodeCount(0), + MinimalPolysPerNode(minimalPolysPerNode) +{ + #ifdef _DEBUG + setDebugName("COctreeTriangleSelector"); + #endif + + if (!Triangles.empty()) + { + const u32 start = os::Timer::getRealTime(); + + // create the triangle octree + Root = new SOctreeNode(); + Root->Triangles = Triangles; + constructOctree(Root); + + c8 tmp[256]; + sprintf(tmp, "Needed %ums to create OctreeTriangleSelector.(%d nodes, %u polys)", + os::Timer::getRealTime() - start, NodeCount, Triangles.size()); + os::Printer::log(tmp, ELL_INFORMATION); + } +} + + +//! destructor +COctreeTriangleSelector::~COctreeTriangleSelector() +{ + delete Root; +} + + +void COctreeTriangleSelector::constructOctree(SOctreeNode* node) +{ + ++NodeCount; + + node->Box.reset(node->Triangles[0].pointA); + + // get bounding box + const u32 cnt = node->Triangles.size(); + for (u32 i=0; i<cnt; ++i) + { + node->Box.addInternalPoint(node->Triangles[i].pointA); + node->Box.addInternalPoint(node->Triangles[i].pointB); + node->Box.addInternalPoint(node->Triangles[i].pointC); + } + + const core::vector3df& middle = node->Box.getCenter(); + core::vector3df edges[8]; + node->Box.getEdges(edges); + + core::aabbox3d<f32> box; + core::array<core::triangle3df> keepTriangles; + + // calculate children + + if (!node->Box.isEmpty() && (s32)node->Triangles.size() > MinimalPolysPerNode) + for (s32 ch=0; ch<8; ++ch) + { + box.reset(middle); + box.addInternalPoint(edges[ch]); + node->Child[ch] = new SOctreeNode(); + + for (s32 i=0; i<(s32)node->Triangles.size(); ++i) + { + if (node->Triangles[i].isTotalInsideBox(box)) + { + node->Child[ch]->Triangles.push_back(node->Triangles[i]); + //node->Triangles.erase(i); + //--i; + } + else + { + keepTriangles.push_back(node->Triangles[i]); + } + } + memcpy(node->Triangles.pointer(), keepTriangles.pointer(), + sizeof(core::triangle3df)*keepTriangles.size()); + + node->Triangles.set_used(keepTriangles.size()); + keepTriangles.set_used(0); + + if (node->Child[ch]->Triangles.empty()) + { + delete node->Child[ch]; + node->Child[ch] = 0; + } + else + constructOctree(node->Child[ch]); + } +} + + +//! Gets all triangles which lie within a specific bounding box. +void COctreeTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, + const core::matrix4* transform) const +{ + core::matrix4 mat(core::matrix4::EM4CONST_NOTHING); + core::aabbox3d<f32> invbox = box; + + if (SceneNode) + { + SceneNode->getAbsoluteTransformation().getInverse(mat); + mat.transformBoxEx(invbox); + } + + if (transform) + mat = *transform; + else + mat.makeIdentity(); + + if (SceneNode) + mat *= SceneNode->getAbsoluteTransformation(); + + s32 trianglesWritten = 0; + + if (Root) + getTrianglesFromOctree(Root, trianglesWritten, + arraySize, invbox, &mat, triangles); + + outTriangleCount = trianglesWritten; +} + + +void COctreeTriangleSelector::getTrianglesFromOctree( + SOctreeNode* node, s32& trianglesWritten, + s32 maximumSize, const core::aabbox3d<f32>& box, + const core::matrix4* mat, core::triangle3df* triangles) const +{ + if (!box.intersectsWithBox(node->Box)) + return; + + const u32 cnt = node->Triangles.size(); + + for (u32 i=0; i<cnt; ++i) + { + const core::triangle3df& srcTri = node->Triangles[i]; + // This isn't an accurate test, but it's fast, and the + // API contract doesn't guarantee complete accuracy. + if (srcTri.isTotalOutsideBox(box)) + continue; + + core::triangle3df& dstTri = triangles[trianglesWritten]; + mat->transformVect(dstTri.pointA, srcTri.pointA ); + mat->transformVect(dstTri.pointB, srcTri.pointB ); + mat->transformVect(dstTri.pointC, srcTri.pointC ); + ++trianglesWritten; + + // Halt when the out array is full. + if (trianglesWritten == maximumSize) + return; + } + + for (u32 i=0; i<8; ++i) + if (node->Child[i]) + getTrianglesFromOctree(node->Child[i], trianglesWritten, + maximumSize, box, mat, triangles); +} + + +//! Gets all triangles which have or may have contact with a 3d line. +// new version: from user Piraaate +void COctreeTriangleSelector::getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform) const +{ +#if 0 + core::aabbox3d<f32> box(line.start); + box.addInternalPoint(line.end); + + // TODO: Could be optimized for line a little bit more. + COctreeTriangleSelector::getTriangles(triangles, arraySize, outTriangleCount, + box, transform); +#else + + core::matrix4 mat ( core::matrix4::EM4CONST_NOTHING ); + + core::vector3df vectStartInv ( line.start ), vectEndInv ( line.end ); + if (SceneNode) + { + mat = SceneNode->getAbsoluteTransformation(); + mat.makeInverse(); + mat.transformVect(vectStartInv, line.start); + mat.transformVect(vectEndInv, line.end); + } + core::line3d<f32> invline(vectStartInv, vectEndInv); + + mat.makeIdentity(); + + if (transform) + mat = (*transform); + + if (SceneNode) + mat *= SceneNode->getAbsoluteTransformation(); + + s32 trianglesWritten = 0; + + if (Root) + getTrianglesFromOctree(Root, trianglesWritten, arraySize, invline, &mat, triangles); + + outTriangleCount = trianglesWritten; +#endif +} + +void COctreeTriangleSelector::getTrianglesFromOctree(SOctreeNode* node, + s32& trianglesWritten, s32 maximumSize, const core::line3d<f32>& line, + const core::matrix4* transform, core::triangle3df* triangles) const +{ + if (!node->Box.intersectsWithLine(line)) + return; + + s32 cnt = node->Triangles.size(); + if (cnt + trianglesWritten > maximumSize) + cnt -= cnt + trianglesWritten - maximumSize; + + s32 i; + + if ( transform->isIdentity() ) + { + for (i=0; i<cnt; ++i) + { + triangles[trianglesWritten] = node->Triangles[i]; + ++trianglesWritten; + } + } + else + { + for (i=0; i<cnt; ++i) + { + triangles[trianglesWritten] = node->Triangles[i]; + transform->transformVect(triangles[trianglesWritten].pointA); + transform->transformVect(triangles[trianglesWritten].pointB); + transform->transformVect(triangles[trianglesWritten].pointC); + ++trianglesWritten; + } + } + + for (i=0; i<8; ++i) + if (node->Child[i]) + getTrianglesFromOctree(node->Child[i], trianglesWritten, + maximumSize, line, transform, triangles); +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.h new file mode 100644 index 0000000..2445467 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COctreeTriangleSelector.h @@ -0,0 +1,80 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OCTREE_TRIANGLE_SELECTOR_H_INCLUDED__ +#define __C_OCTREE_TRIANGLE_SELECTOR_H_INCLUDED__ + +#include "CTriangleSelector.h" + +namespace irr +{ +namespace scene +{ + +class ISceneNode; + +//! Stupid triangle selector without optimization +class COctreeTriangleSelector : public CTriangleSelector +{ +public: + + //! Constructs a selector based on a mesh + COctreeTriangleSelector(const IMesh* mesh, ISceneNode* node, s32 minimalPolysPerNode); + + virtual ~COctreeTriangleSelector(); + + //! Gets all triangles which lie within a specific bounding box. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, const core::matrix4* transform=0) const; + + //! Gets all triangles which have or may have contact with a 3d line. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform=0) const; + +private: + + struct SOctreeNode + { + SOctreeNode() + { + for (u32 i=0; i!=8; ++i) + Child[i] = 0; + } + + ~SOctreeNode() + { + for (u32 i=0; i!=8; ++i) + delete Child[i]; + } + + core::array<core::triangle3df> Triangles; + SOctreeNode* Child[8]; + core::aabbox3d<f32> Box; + }; + + + void constructOctree(SOctreeNode* node); + void deleteEmptyNodes(SOctreeNode* node); + void getTrianglesFromOctree(SOctreeNode* node, s32& trianglesWritten, + s32 maximumSize, const core::aabbox3d<f32>& box, + const core::matrix4* transform, + core::triangle3df* triangles) const; + + void getTrianglesFromOctree(SOctreeNode* node, s32& trianglesWritten, + s32 maximumSize, const core::line3d<f32>& line, + const core::matrix4* transform, + core::triangle3df* triangles) const; + + SOctreeNode* Root; + s32 NodeCount; + s32 MinimalPolysPerNode; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.cpp new file mode 100644 index 0000000..7a2be26 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.cpp @@ -0,0 +1,1592 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// orginally written by Christian Stehno, modified by Nikolaus Gebhardt + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OGRE_LOADER_ + +#include "COgreMeshFileLoader.h" +#include "os.h" +#include "SMeshBuffer.h" +#include "SAnimatedMesh.h" +#include "IReadFile.h" +#include "fast_atof.h" +#include "coreutil.h" + +#ifdef _DEBUG +#define IRR_OGRE_LOADER_DEBUG +#endif + +namespace irr +{ +namespace scene +{ + +namespace +{ + enum OGRE_CHUNKS + { + // Main Chunks + COGRE_HEADER= 0x1000, + COGRE_SKELETON= 0x2000, + COGRE_MESH= 0x3000, + + // sub chunks of COGRE_MESH + COGRE_SUBMESH= 0x4000, + COGRE_GEOMETRY= 0x5000, + COGRE_SKELETON_LINK= 0x6000, + COGRE_BONE_ASSIGNMENT= 0x7000, + COGRE_MESH_LOD= 0x8000, + COGRE_MESH_BOUNDS= 0x9000, + COGRE_MESH_SUBMESH_NAME_TABLE= 0xA000, + COGRE_MESH_EDGE_LISTS= 0xB000, + + // sub chunks of COGRE_SKELETON + COGRE_BONE_PARENT= 0x3000, + COGRE_ANIMATION= 0x4000, + COGRE_ANIMATION_TRACK= 0x4100, + COGRE_ANIMATION_KEYFRAME= 0x4110, + COGRE_ANIMATION_LINK= 0x5000, + + // sub chunks of COGRE_SUBMESH + COGRE_SUBMESH_OPERATION= 0x4010, + COGRE_SUBMESH_BONE_ASSIGNMENT= 0x4100, + COGRE_SUBMESH_TEXTURE_ALIAS= 0x4200, + + // sub chunks of COGRE_GEOMETRY + COGRE_GEOMETRY_VERTEX_DECLARATION= 0x5100, + COGRE_GEOMETRY_VERTEX_ELEMENT= 0x5110, + COGRE_GEOMETRY_VERTEX_BUFFER= 0x5200, + COGRE_GEOMETRY_VERTEX_BUFFER_DATA= 0x5210 + }; +} + +//! Constructor +COgreMeshFileLoader::COgreMeshFileLoader(io::IFileSystem* fs, video::IVideoDriver* driver) +: FileSystem(fs), Driver(driver), SwapEndian(false), Mesh(0), NumUV(0) +{ + + #ifdef _DEBUG + setDebugName("COgreMeshFileLoader"); + #endif + + if (FileSystem) + FileSystem->grab(); + + if (Driver) + Driver->grab(); +} + + +//! destructor +COgreMeshFileLoader::~COgreMeshFileLoader() +{ + clearMeshes(); + + if (FileSystem) + FileSystem->drop(); + + if (Driver) + Driver->drop(); + + if (Mesh) + Mesh->drop(); +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool COgreMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "mesh" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* COgreMeshFileLoader::createMesh(io::IReadFile* file) +{ + s16 id; + + file->read(&id, 2); + + if (id == COGRE_HEADER) + SwapEndian=false; + else if (id == 0x0010) + SwapEndian=true; + else + return 0; + ChunkData data; + readString(file, data, Version); + if ((Version != "[MeshSerializer_v1.30]") && (Version != "[MeshSerializer_v1.40]") && (Version != "[MeshSerializer_v1.41]")) + return 0; + + clearMeshes(); + if (Mesh) + Mesh->drop(); + + CurrentlyLoadingFromPath = FileSystem->getFileDir(file->getFileName()); + loadMaterials(file); + + if (readChunk(file)) + { + // delete data loaded from file + clearMeshes(); + + if (Skeleton.Bones.size()) + { + ISkinnedMesh* tmp = static_cast<CSkinnedMesh*>(Mesh); + static_cast<CSkinnedMesh*>(Mesh)->updateBoundingBox(); + Skeleton.Animations.clear(); + Skeleton.Bones.clear(); + Mesh=0; + return tmp; + } + else + { + for (u32 i=0; i<Mesh->getMeshBufferCount(); ++i) + ((SMeshBuffer*)Mesh->getMeshBuffer(i))->recalculateBoundingBox(); + + ((SMesh*)Mesh)->recalculateBoundingBox(); + SAnimatedMesh* am = new SAnimatedMesh(); + am->Type = EAMT_3DS; + am->addMesh(Mesh); + am->recalculateBoundingBox(); + Mesh->drop(); + Mesh = 0; + return am; + } + } + + Mesh->drop(); + Mesh = 0; + + return 0; +} + + +bool COgreMeshFileLoader::readChunk(io::IReadFile* file) +{ + while(file->getPos() < file->getSize()) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case COGRE_MESH: + { + Meshes.push_back(OgreMesh()); + readObjectChunk(file, data, Meshes.getLast()); + if (Skeleton.Bones.size()) + Mesh = new CSkinnedMesh(); + else + Mesh = new SMesh(); + composeObject(); + } + break; + default: + return true; + } + } + + return true; +} + + +bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent, OgreMesh& mesh) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Object Chunk", ELL_DEBUG); +#endif + readBool(file, parent, mesh.SkeletalAnimation); + bool skeleton_loaded=false; + while ((parent.read < parent.header.length)&&(file->getPos() < file->getSize())) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case COGRE_GEOMETRY: + readGeometry(file, data, mesh.Geometry); + break; + case COGRE_SUBMESH: + mesh.SubMeshes.push_back(OgreSubMesh()); + readSubMesh(file, data, mesh.SubMeshes.getLast()); + break; + case COGRE_MESH_BOUNDS: + { +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Mesh Bounds", ELL_DEBUG); +#endif + readVector(file, data, mesh.BBoxMinEdge); + readVector(file, data, mesh.BBoxMaxEdge); + readFloat(file, data, &mesh.BBoxRadius); + } + break; + case COGRE_SKELETON_LINK: + { +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Skeleton link", ELL_DEBUG); +#endif + core::stringc name; + readString(file, data, name); + loadSkeleton(file, name); + skeleton_loaded=true; + } + break; + case COGRE_BONE_ASSIGNMENT: + { + mesh.BoneAssignments.push_back(OgreBoneAssignment()); + readInt(file, data, &mesh.BoneAssignments.getLast().VertexID); + readShort(file, data, &mesh.BoneAssignments.getLast().BoneID); + readFloat(file, data, &mesh.BoneAssignments.getLast().Weight); + } + break; + case COGRE_MESH_LOD: + case COGRE_MESH_SUBMESH_NAME_TABLE: + case COGRE_MESH_EDGE_LISTS: + // ignore chunk + file->seek(data.header.length-data.read, true); + data.read += data.header.length-data.read; + break; + default: +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Skipping", core::stringc(data.header.id), ELL_DEBUG); +#endif + // ignore chunk + file->seek(data.header.length-data.read, true); + data.read += data.header.length-data.read; + break; + } + parent.read += data.read; + } + if (!skeleton_loaded) + loadSkeleton(file, FileSystem->getFileBasename(file->getFileName(), false)); + return true; +} + + +bool COgreMeshFileLoader::readGeometry(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Geometry", ELL_DEBUG); +#endif + readInt(file, parent, &geometry.NumVertex); + while(parent.read < parent.header.length) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case COGRE_GEOMETRY_VERTEX_DECLARATION: + readVertexDeclaration(file, data, geometry); + break; + case COGRE_GEOMETRY_VERTEX_BUFFER: + readVertexBuffer(file, data, geometry); + break; + default: + // ignore chunk +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Skipping", core::stringc(data.header.id), ELL_DEBUG); +#endif + file->seek(data.header.length-data.read, true); + data.read += data.header.length-data.read; + } + parent.read += data.read; + } + if (parent.read != parent.header.length) + os::Printer::log("Incorrect geometry length. File might be corrupted."); + return true; +} + + +bool COgreMeshFileLoader::readVertexDeclaration(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Vertex Declaration", ELL_DEBUG); +#endif + NumUV = 0; + while(parent.read < parent.header.length) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case COGRE_GEOMETRY_VERTEX_ELEMENT: + { + geometry.Elements.push_back(OgreVertexElement()); + OgreVertexElement& elem = geometry.Elements.getLast(); + readShort(file, data, &elem.Source); + readShort(file, data, &elem.Type); + readShort(file, data, &elem.Semantic); + if (elem.Semantic == 7) //Tex coords + { + ++NumUV; + } + readShort(file, data, &elem.Offset); + elem.Offset /= sizeof(f32); + readShort(file, data, &elem.Index); + } + break; + default: + // ignore chunk + file->seek(data.header.length-data.read, true); + data.read += data.header.length-data.read; + } + parent.read += data.read; + } + if (parent.read != parent.header.length) + os::Printer::log("Incorrect vertex declaration length. File might be corrupted."); + return true; +} + + +bool COgreMeshFileLoader::readVertexBuffer(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Vertex Buffer", ELL_DEBUG); +#endif + OgreVertexBuffer buf; + readShort(file, parent, &buf.BindIndex); + readShort(file, parent, &buf.VertexSize); + buf.VertexSize /= sizeof(f32); + ChunkData data; + readChunkData(file, data); + + if (data.header.id == COGRE_GEOMETRY_VERTEX_BUFFER_DATA) + { + buf.Data.set_used(geometry.NumVertex*buf.VertexSize); + readFloat(file, data, buf.Data.pointer(), geometry.NumVertex*buf.VertexSize); + } + + geometry.Buffers.push_back(buf); + parent.read += data.read; + if (parent.read != parent.header.length) + os::Printer::log("Incorrect vertex buffer length. File might be corrupted."); + return true; +} + + +bool COgreMeshFileLoader::readSubMesh(io::IReadFile* file, ChunkData& parent, OgreSubMesh& subMesh) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Submesh", ELL_DEBUG); +#endif + readString(file, parent, subMesh.Material); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("using material", subMesh.Material, ELL_DEBUG); +#endif + readBool(file, parent, subMesh.SharedVertices); + + s32 numIndices; + readInt(file, parent, &numIndices); + subMesh.Indices.set_used(numIndices); + + readBool(file, parent, subMesh.Indices32Bit); + + if (subMesh.Indices32Bit) + readInt(file, parent, subMesh.Indices.pointer(), numIndices); + else + { + for (s32 i=0; i<numIndices; ++i) + { + u16 num; + readShort(file, parent, &num); + subMesh.Indices[i]=num; + } + } + + while(parent.read < parent.header.length) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case COGRE_GEOMETRY: + readGeometry(file, data, subMesh.Geometry); + break; + case COGRE_SUBMESH_OPERATION: + readShort(file, data, &subMesh.Operation); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Submesh Operation",core::stringc(subMesh.Operation), ELL_DEBUG); +#endif + if (subMesh.Operation != 4) + os::Printer::log("Primitive type != trilist not yet implemented", ELL_WARNING); + break; + case COGRE_SUBMESH_TEXTURE_ALIAS: + { +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Submesh Texture Alias", ELL_DEBUG); +#endif + core::stringc texture, alias; + readString(file, data, texture); + readString(file, data, alias); + subMesh.TextureAliases.push_back(OgreTextureAlias(texture,alias)); + } + break; + case COGRE_SUBMESH_BONE_ASSIGNMENT: + { + subMesh.BoneAssignments.push_back(OgreBoneAssignment()); + readInt(file, data, &subMesh.BoneAssignments.getLast().VertexID); + readShort(file, data, &subMesh.BoneAssignments.getLast().BoneID); + readFloat(file, data, &subMesh.BoneAssignments.getLast().Weight); + } + break; + default: +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Skipping", core::stringc(data.header.id), ELL_DEBUG); +#endif + parent.read=parent.header.length; + file->seek(-(long)sizeof(ChunkHeader), true); + return true; + } + parent.read += data.read; + } + if (parent.read != parent.header.length) + os::Printer::log("Incorrect submesh length. File might be corrupted."); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Done with submesh", ELL_DEBUG); +#endif + return true; +} + + +void COgreMeshFileLoader::composeMeshBufferMaterial(scene::IMeshBuffer* mb, const core::stringc& materialName) +{ + video::SMaterial& material=mb->getMaterial(); + for (u32 k=0; k<Materials.size(); ++k) + { + if ((materialName==Materials[k].Name)&&(Materials[k].Techniques.size())&&(Materials[k].Techniques[0].Passes.size())) + { + material=Materials[k].Techniques[0].Passes[0].Material; + for (u32 i=0; i<Materials[k].Techniques[0].Passes[0].Texture.Filename.size(); ++i) + { + if (FileSystem->existFile(Materials[k].Techniques[0].Passes[0].Texture.Filename[i])) + material.setTexture(i, Driver->getTexture(Materials[k].Techniques[0].Passes[0].Texture.Filename[i])); + else + material.setTexture(i, Driver->getTexture((CurrentlyLoadingFromPath+"/"+FileSystem->getFileBasename(Materials[k].Techniques[0].Passes[0].Texture.Filename[i])))); + } + break; + } + } +} + + +scene::SMeshBuffer* COgreMeshFileLoader::composeMeshBuffer(const core::array<s32>& indices, const OgreGeometry& geom) +{ + scene::SMeshBuffer *mb=new scene::SMeshBuffer(); + + u32 i; + mb->Indices.set_used(indices.size()); + for (i=0; i<indices.size(); ++i) + mb->Indices[i]=indices[i]; + + mb->Vertices.set_used(geom.NumVertex); + for (i=0; i<geom.Elements.size(); ++i) + { + if (geom.Elements[i].Semantic==1) //Pos + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->Vertices[k].Color=mb->Material.DiffuseColor; + mb->Vertices[k].Pos.set(geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1],geom.Buffers[j].Data[ePos+2]); + ePos += eSize; + } + } + } + } + + if (geom.Elements[i].Semantic==4) //Normal + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->Vertices[k].Normal.set(geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1],geom.Buffers[j].Data[ePos+2]); + ePos += eSize; + } + } + } + } + + if (geom.Elements[i].Semantic==7) //TexCoord + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->Vertices[k].TCoords.set(geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1]); + ePos += eSize; + } + } + } + } + } + return mb; +} + + +scene::SMeshBufferLightMap* COgreMeshFileLoader::composeMeshBufferLightMap(const core::array<s32>& indices, const OgreGeometry& geom) +{ + scene::SMeshBufferLightMap *mb=new scene::SMeshBufferLightMap(); + + u32 i; + mb->Indices.set_used(indices.size()); + for (i=0; i<indices.size(); ++i) + mb->Indices[i]=indices[i]; + + mb->Vertices.set_used(geom.NumVertex); + + for (i=0; i<geom.Elements.size(); ++i) + { + if (geom.Elements[i].Semantic==1) //Pos + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->Vertices[k].Color=mb->Material.DiffuseColor; + mb->Vertices[k].Pos.set(geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1],geom.Buffers[j].Data[ePos+2]); + ePos += eSize; + } + } + } + } + + if (geom.Elements[i].Semantic==4) //Normal + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->Vertices[k].Normal.set(geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1],geom.Buffers[j].Data[ePos+2]); + ePos += eSize; + } + } + } + } + + if (geom.Elements[i].Semantic==7) //TexCoord + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + // make sure we have data for a second texture coord + const bool secondCoord = (eSize>ePos+3); + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->Vertices[k].TCoords.set(geom.Buffers[j].Data[ePos], geom.Buffers[j].Data[ePos+1]); + if (secondCoord) + mb->Vertices[k].TCoords2.set(geom.Buffers[j].Data[ePos+2], geom.Buffers[j].Data[ePos+3]); + else + mb->Vertices[k].TCoords2.set(geom.Buffers[j].Data[ePos], geom.Buffers[j].Data[ePos+1]); + ePos += eSize; + } + } + } + } + } + + return mb; +} + + +scene::IMeshBuffer* COgreMeshFileLoader::composeMeshBufferSkinned(scene::CSkinnedMesh& mesh, const core::array<s32>& indices, const OgreGeometry& geom) +{ + scene::SSkinMeshBuffer *mb=mesh.addMeshBuffer(); + if (NumUV>1) + { + mb->convertTo2TCoords(); + mb->Vertices_2TCoords.set_used(geom.NumVertex); + } + else + mb->Vertices_Standard.set_used(geom.NumVertex); + + u32 i; + mb->Indices.set_used(indices.size()); + for (i=0; i<indices.size(); i+=3) + { + mb->Indices[i+0]=indices[i+2]; + mb->Indices[i+1]=indices[i+1]; + mb->Indices[i+2]=indices[i+0]; + } + + for (i=0; i<geom.Elements.size(); ++i) + { + if (geom.Elements[i].Semantic==1) //Pos + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + if (NumUV>1) + mb->Vertices_2TCoords[k].Color=mb->Material.DiffuseColor; + else + mb->Vertices_Standard[k].Color=mb->Material.DiffuseColor; + mb->getPosition(k).set(-geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1],geom.Buffers[j].Data[ePos+2]); + ePos += eSize; + } + } + } + } + + if (geom.Elements[i].Semantic==4) //Normal + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->getNormal(k).set(-geom.Buffers[j].Data[ePos],geom.Buffers[j].Data[ePos+1],geom.Buffers[j].Data[ePos+2]); + ePos += eSize; + } + } + } + } + + if (geom.Elements[i].Semantic==7) //TexCoord + { + for (u32 j=0; j<geom.Buffers.size(); ++j) + { + if (geom.Elements[i].Source==geom.Buffers[j].BindIndex) + { + u32 eSize=geom.Buffers[j].VertexSize; + u32 ePos=geom.Elements[i].Offset; + // make sure we have data for a second texture coord + const bool secondCoord = (eSize>ePos+3); + for (s32 k=0; k<geom.NumVertex; ++k) + { + mb->getTCoords(k).set(geom.Buffers[j].Data[ePos], geom.Buffers[j].Data[ePos+1]); + if (NumUV>1) + { + if (secondCoord) + mb->Vertices_2TCoords[k].TCoords2.set(geom.Buffers[j].Data[ePos+2], geom.Buffers[j].Data[ePos+3]); + else + mb->Vertices_2TCoords[k].TCoords2.set(geom.Buffers[j].Data[ePos], geom.Buffers[j].Data[ePos+1]); + } + ePos += eSize; + } + } + } + } + } + + return mb; +} + + +void COgreMeshFileLoader::composeObject(void) +{ + for (u32 i=0; i<Meshes.size(); ++i) + { + for (u32 j=0; j<Meshes[i].SubMeshes.size(); ++j) + { + IMeshBuffer* mb; + if (Meshes[i].SubMeshes[j].SharedVertices) + { + if (Skeleton.Bones.size()) + { + mb = composeMeshBufferSkinned(*(CSkinnedMesh*)Mesh, Meshes[i].SubMeshes[j].Indices, Meshes[i].Geometry); + } + else if (NumUV < 2) + { + mb = composeMeshBuffer(Meshes[i].SubMeshes[j].Indices, Meshes[i].Geometry); + } + else + { + mb = composeMeshBufferLightMap(Meshes[i].SubMeshes[j].Indices, Meshes[i].Geometry); + } + } + else + { + if (Skeleton.Bones.size()) + { + mb = composeMeshBufferSkinned(*(CSkinnedMesh*)Mesh, Meshes[i].SubMeshes[j].Indices, Meshes[i].SubMeshes[j].Geometry); + } + else if (NumUV < 2) + { + mb = composeMeshBuffer(Meshes[i].SubMeshes[j].Indices, Meshes[i].SubMeshes[j].Geometry); + } + else + { + mb = composeMeshBufferLightMap(Meshes[i].SubMeshes[j].Indices, Meshes[i].SubMeshes[j].Geometry); + } + } + + if (mb != 0) + { + composeMeshBufferMaterial(mb, Meshes[i].SubMeshes[j].Material); + if (!Skeleton.Bones.size()) + { + ((SMesh*)Mesh)->addMeshBuffer(mb); + mb->drop(); + } + } + } + } + if (Skeleton.Bones.size()) + { + CSkinnedMesh* m = (CSkinnedMesh*)Mesh; + // Create Joints + for (u32 i=0; i<Skeleton.Bones.size(); ++i) + { + ISkinnedMesh::SJoint* joint = m->addJoint(); + joint->Name=Skeleton.Bones[i].Name; + + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched to getMatrix_transposed instead of getMatrix for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! + Skeleton.Bones[i].Orientation.getMatrix_transposed(joint->LocalMatrix); + + if (Skeleton.Bones[i].Scale != core::vector3df(1,1,1)) + { + core::matrix4 scaleMatrix; + scaleMatrix.setScale( Skeleton.Bones[i].Scale ); + joint->LocalMatrix *= scaleMatrix; + } + joint->LocalMatrix.setTranslation( Skeleton.Bones[i].Position ); + } + // Joints hierarchy + for (u32 i=0; i<Skeleton.Bones.size(); ++i) + { + if (Skeleton.Bones[i].Parent<m->getJointCount()) + { + m->getAllJoints()[Skeleton.Bones[i].Parent]->Children.push_back(m->getAllJoints()[Skeleton.Bones[i].Handle]); + } + } + + // Weights + u32 bufCount=0; + for (u32 i=0; i<Meshes.size(); ++i) + { + for (u32 j=0; j<Meshes[i].SubMeshes.size(); ++j) + { + for (u32 k=0; k<Meshes[i].SubMeshes[j].BoneAssignments.size(); ++k) + { + const OgreBoneAssignment& ba = Meshes[i].SubMeshes[j].BoneAssignments[k]; + if (ba.BoneID<m->getJointCount()) + { + ISkinnedMesh::SWeight* w = m->addWeight(m->getAllJoints()[ba.BoneID]); + w->strength=ba.Weight; + w->vertex_id=ba.VertexID; + w->buffer_id=bufCount; + } + } + ++bufCount; + } + } + + for (u32 i=0; i<Skeleton.Animations.size(); ++i) + { + for (u32 j=0; j<Skeleton.Animations[i].Keyframes.size(); ++j) + { + OgreKeyframe& frame = Skeleton.Animations[i].Keyframes[j]; + ISkinnedMesh::SJoint* keyjoint = m->getAllJoints()[frame.BoneID]; + ISkinnedMesh::SPositionKey* poskey = m->addPositionKey(keyjoint); + poskey->frame=frame.Time*25; + poskey->position=keyjoint->LocalMatrix.getTranslation()+frame.Position; + ISkinnedMesh::SRotationKey* rotkey = m->addRotationKey(keyjoint); + rotkey->frame=frame.Time*25; + + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from keyjoint->LocalMatrix to keyjoint->LocalMatrix.getTransposed() for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! + rotkey->rotation=core::quaternion(keyjoint->LocalMatrix.getTransposed())*frame.Orientation; + + ISkinnedMesh::SScaleKey* scalekey = m->addScaleKey(keyjoint); + scalekey->frame=frame.Time*25; + scalekey->scale=frame.Scale; + } + } + m->finalize(); + } +} + + +void COgreMeshFileLoader::getMaterialToken(io::IReadFile* file, core::stringc& token, bool noNewLine) +{ + bool parseString=false; + c8 c=0; + token = ""; + + if (file->getPos() >= file->getSize()) + return; + + file->read(&c, sizeof(c8)); + // search for word beginning + while ( core::isspace(c) && (file->getPos() < file->getSize())) + { + if (noNewLine && c=='\n') + { + file->seek(-1, true); + return; + } + file->read(&c, sizeof(c8)); + } + // check if we read a string + if (c=='"') + { + parseString = true; + file->read(&c, sizeof(c8)); + } + do + { + if (c=='/') + { + file->read(&c, sizeof(c8)); + // check for comments, cannot be part of strings + if (!parseString && (c=='/')) + { + // skip comments + while(c!='\n') + file->read(&c, sizeof(c8)); + if (!token.size()) + { + // if we start with a comment we need to skip + // following whitespaces, so restart + getMaterialToken(file, token, noNewLine); + return; + } + else + { + // else continue with next character + file->read(&c, sizeof(c8)); + continue; + } + } + else + { + // else append first slash and check if second char + // ends this token + token.append('/'); + if ((!parseString && core::isspace(c)) || + (parseString && (c=='"'))) + return; + } + } + token.append(c); + file->read(&c, sizeof(c8)); + // read until a token delimiter is found + } + while (((!parseString && !core::isspace(c)) || (parseString && (c!='"'))) && + (file->getPos() < file->getSize())); + // we want to skip the last quotes of a string , but other chars might be the next + // token already. + if (!parseString) + file->seek(-1, true); +} + + +bool COgreMeshFileLoader::readColor(io::IReadFile* file, video::SColor& col) +{ + core::stringc token; + + getMaterialToken(file, token); + if (token!="vertexcolour") + { + video::SColorf col_f; + col_f.r=core::fast_atof(token.c_str()); + getMaterialToken(file, token); + col_f.g=core::fast_atof(token.c_str()); + getMaterialToken(file, token); + col_f.b=core::fast_atof(token.c_str()); + getMaterialToken(file, token, true); + if (token.size()) + col_f.a=core::fast_atof(token.c_str()); + else + col_f.a=1.0f; + if ((col_f.r==0.0f)&&(col_f.g==0.0f)&&(col_f.b==0.0f)) + col.set(255,255,255,255); + else + col=col_f.toSColor(); + return false; + } + return true; +} + + +void COgreMeshFileLoader::readPass(io::IReadFile* file, OgreTechnique& technique) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Pass"); +#endif + core::stringc token; + technique.Passes.push_back(OgrePass()); + OgrePass& pass=technique.Passes.getLast(); + + getMaterialToken(file, token); //open brace or name + if (token != "{") + getMaterialToken(file, token); //open brace + + getMaterialToken(file, token); + if (token == "}") + return; + u32 inBlocks=1; + u32 textureUnit=0; + while(inBlocks) + { + if (token=="ambient") + pass.AmbientTokenColor=readColor(file, pass.Material.AmbientColor); + else if (token=="diffuse") + pass.DiffuseTokenColor=readColor(file, pass.Material.DiffuseColor); + else if (token=="specular") + { + pass.SpecularTokenColor=readColor(file, pass.Material.SpecularColor); + getMaterialToken(file, token); + pass.Material.Shininess=core::fast_atof(token.c_str()); + } + else if (token=="emissive") + pass.EmissiveTokenColor=readColor(file, pass.Material.EmissiveColor); + else if (token=="scene_blend") + { // TODO: Choose correct values + getMaterialToken(file, token); + if (token=="add") + pass.Material.MaterialType=video::EMT_TRANSPARENT_ADD_COLOR; + else if (token=="modulate") + pass.Material.MaterialType=video::EMT_SOLID; + else if (token=="alpha_blend") + pass.Material.MaterialType=video::EMT_TRANSPARENT_ALPHA_CHANNEL; + else if (token=="colour_blend") + pass.Material.MaterialType=video::EMT_TRANSPARENT_VERTEX_ALPHA; + else + getMaterialToken(file, token); + } + else if (token=="depth_check") + { + getMaterialToken(file, token); + if (token!="on") + pass.Material.ZBuffer=video::ECFN_NEVER; + } + else if (token=="depth_write") + { + getMaterialToken(file, token); + pass.Material.ZWriteEnable=(token=="on"); + } + else if (token=="depth_func") + { + getMaterialToken(file, token); // Function name + if (token=="always_fail") + pass.Material.ZBuffer=video::ECFN_NEVER; + else if (token=="always_pass") + pass.Material.ZBuffer=video::ECFN_ALWAYS; + else if (token=="equal") + pass.Material.ZBuffer=video::ECFN_EQUAL; + else if (token=="greater") + pass.Material.ZBuffer=video::ECFN_GREATER; + else if (token=="greater_equal") + pass.Material.ZBuffer=video::ECFN_GREATEREQUAL; + else if (token=="less") + pass.Material.ZBuffer=video::ECFN_LESS; + else if (token=="less_equal") + pass.Material.ZBuffer=video::ECFN_LESSEQUAL; + else if (token=="not_equal") + pass.Material.ZBuffer=video::ECFN_NOTEQUAL; + } + else if (token=="normalise_normals") + { + getMaterialToken(file, token); + pass.Material.NormalizeNormals=(token=="on"); + } + else if (token=="depth_bias") + { + getMaterialToken(file, token); // bias value + } + else if (token=="alpha_rejection") + { + getMaterialToken(file, token); // function name + getMaterialToken(file, token); // value + pass.Material.MaterialTypeParam=core::fast_atof(token.c_str()); + } + else if (token=="alpha_to_coverage") + { + getMaterialToken(file, token); + if (token=="on") + pass.Material.AntiAliasing |= video::EAAM_ALPHA_TO_COVERAGE; + } + else if (token=="colour_write") + { + getMaterialToken(file, token); + pass.Material.ColorMask = (token=="on")?video::ECP_ALL:video::ECP_NONE; + } + else if (token=="cull_hardware") + { + getMaterialToken(file, token); // rotation name + } + else if (token=="cull_software") + { + getMaterialToken(file, token); // culling side + } + else if (token=="lighting") + { + getMaterialToken(file, token); + pass.Material.Lighting=(token=="on"); + } + else if (token=="shading") + { + getMaterialToken(file, token); + // We take phong as gouraud + pass.Material.GouraudShading=(token!="flat"); + } + else if (token=="polygon_mode") + { + getMaterialToken(file, token); + pass.Material.Wireframe=(token=="wireframe"); + pass.Material.PointCloud=(token=="points"); + } + else if (token=="max_lights") + { + getMaterialToken(file, token); + pass.MaxLights=core::strtoul10(token.c_str()); + } + else if (token=="point_size") + { + getMaterialToken(file, token); + pass.PointSize=core::fast_atof(token.c_str()); + } + else if (token=="point_sprites") + { + getMaterialToken(file, token); + pass.PointSprites=(token=="on"); + } + else if (token=="point_size_min") + { + getMaterialToken(file, token); + pass.PointSizeMin=core::strtoul10(token.c_str()); + } + else if (token=="point_size_max") + { + getMaterialToken(file, token); + pass.PointSizeMax=core::strtoul10(token.c_str()); + } + else if (token=="texture_unit") + { +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Texture unit", ELL_DEBUG); +#endif + getMaterialToken(file, token); //open brace + getMaterialToken(file, token); + while(token != "}") + { + if (token=="texture") + { + getMaterialToken(file, token); + pass.Texture.Filename.push_back(token); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Texture", token, ELL_DEBUG); +#endif + getMaterialToken(file, pass.Texture.CoordsType, true); + getMaterialToken(file, pass.Texture.MipMaps, true); + getMaterialToken(file, pass.Texture.Alpha, true); + // Hmm, we might need more hints for other material types using two textures... + if (textureUnit>0) + pass.Material.MaterialType=video::EMT_LIGHTMAP; + } + else if (token=="filtering") + { + getMaterialToken(file, token); + pass.Material.TextureLayer[textureUnit].AnisotropicFilter=0; + if (token=="point") + { + pass.Material.TextureLayer[textureUnit].BilinearFilter=false; + pass.Material.TextureLayer[textureUnit].TrilinearFilter=false; + getMaterialToken(file, token); + getMaterialToken(file, token); + } + else if (token=="linear") + { + getMaterialToken(file, token); + if (token=="point") + { + pass.Material.TextureLayer[textureUnit].BilinearFilter=false; + pass.Material.TextureLayer[textureUnit].TrilinearFilter=false; + getMaterialToken(file, token); + } + else + { + pass.Material.TextureLayer[textureUnit].BilinearFilter=true; + getMaterialToken(file, token); + pass.Material.TextureLayer[textureUnit].TrilinearFilter=(token=="linear"); + } + } + else + { + pass.Material.TextureLayer[textureUnit].BilinearFilter=(token=="bilinear"); + pass.Material.TextureLayer[textureUnit].TrilinearFilter=(token=="trilinear"); + pass.Material.TextureLayer[textureUnit].AnisotropicFilter=(token=="anisotropic")?2:1; + } + } + else if (token=="max_anisotropy") + { + getMaterialToken(file, token); + pass.Material.TextureLayer[textureUnit].AnisotropicFilter=(u8)core::strtoul10(token.c_str()); + } + else if (token=="texture_alias") + { + getMaterialToken(file, pass.Texture.Alias); + } + else if (token=="mipmap_bias") + { + getMaterialToken(file, token); + pass.Material.TextureLayer[textureUnit].LODBias=(s8)core::fast_atof(token.c_str()); + } + else if (token=="colour_op") + { // TODO: Choose correct values + getMaterialToken(file, token); + if (token=="add") + pass.Material.MaterialType=video::EMT_TRANSPARENT_ADD_COLOR; + else if (token=="modulate") + pass.Material.MaterialType=video::EMT_SOLID; + else if (token=="alpha_blend") + pass.Material.MaterialType=video::EMT_TRANSPARENT_ALPHA_CHANNEL; + else if (token=="colour_blend") + pass.Material.MaterialType=video::EMT_TRANSPARENT_VERTEX_ALPHA; + else + getMaterialToken(file, token); + } + getMaterialToken(file, token); + } + ++textureUnit; + } + else if (token=="shadow_caster_program_ref") + { + do + { + getMaterialToken(file, token); + } while (token != "}"); + } + else if (token=="shadow_caster_vertex_program_ref") + { + do + { + getMaterialToken(file, token); + } while (token != "}"); + } + else if (token=="vertex_program_ref") + { + do + { + getMaterialToken(file, token); + } while (token != "}"); + } + //fog_override, iteration, point_size_attenuation + //not considered yet! + getMaterialToken(file, token); + if (token=="{") + ++inBlocks; + else if (token=="}") + --inBlocks; + } +} + + +void COgreMeshFileLoader::readTechnique(io::IReadFile* file, OgreMaterial& mat) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Read Technique"); +#endif + core::stringc token; + mat.Techniques.push_back(OgreTechnique()); + OgreTechnique& technique=mat.Techniques.getLast(); + + getMaterialToken(file, technique.Name); //open brace or name + if (technique.Name != "{") + getMaterialToken(file, token); //open brace + else + technique.Name=core::stringc((int)mat.Techniques.size()); + + getMaterialToken(file, token); + while (token != "}") + { + if (token == "pass") + readPass(file, technique); + else if (token == "scheme") + getMaterialToken(file, token); + else if (token == "lod_index") + getMaterialToken(file, token); + getMaterialToken(file, token); + } +} + + +void COgreMeshFileLoader::loadMaterials(io::IReadFile* meshFile) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Load Materials", ELL_DEBUG); +#endif + core::stringc token; + io::IReadFile* file = 0; + io::path filename = FileSystem->getFileBasename(meshFile->getFileName(), false) + ".material"; + if (FileSystem->existFile(filename)) + file = FileSystem->createAndOpenFile(filename); + else + file = FileSystem->createAndOpenFile(FileSystem->getFileDir(meshFile->getFileName())+"/"+filename); + + if (!file) + { + os::Printer::log("Could not load OGRE material", filename); + return; + } + + getMaterialToken(file, token); + + while (file->getPos() < file->getSize()) + { + if ((token == "fragment_program") || (token == "vertex_program")) + { + // skip whole block + u32 blocks=1; + do + { + getMaterialToken(file, token); + } while (token != "{"); + do + { + getMaterialToken(file, token); + if (token == "{") + ++blocks; + else if (token == "}") + --blocks; + } while (blocks); + getMaterialToken(file, token); + continue; + } + if (token != "material") + { + if (token.trim().size()) + os::Printer::log("Unknown material group", token.c_str()); + break; + } + + Materials.push_back(OgreMaterial()); + OgreMaterial& mat = Materials.getLast(); + + getMaterialToken(file, mat.Name); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Load Material", mat.Name.c_str(), ELL_DEBUG); +#endif + getMaterialToken(file, token); //open brace + getMaterialToken(file, token); + while(token != "}") + { + if (token=="lod_distances") // can have several items + getMaterialToken(file, token); + else if (token=="receive_shadows") + { + getMaterialToken(file, token); + mat.ReceiveShadows=(token=="on"); + } + else if (token=="transparency_casts_shadows") + { + getMaterialToken(file, token); + mat.TransparencyCastsShadows=(token=="on"); + } + else if (token=="set_texture_alias") + { + getMaterialToken(file, token); + getMaterialToken(file, token); + } + else if (token=="technique") + readTechnique(file, mat); + getMaterialToken(file, token); + } + getMaterialToken(file, token); + } + + file->drop(); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Finished loading Materials", ELL_DEBUG); +#endif +} + + +bool COgreMeshFileLoader::loadSkeleton(io::IReadFile* meshFile, const core::stringc& name) +{ +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Load Skeleton", name, ELL_DEBUG); +#endif + io::IReadFile* file = 0; + io::path filename; + if (FileSystem->existFile(name)) + file = FileSystem->createAndOpenFile(name); + else if (FileSystem->existFile(filename = FileSystem->getFileDir(meshFile->getFileName())+"/"+name)) + file = FileSystem->createAndOpenFile(filename); + else if (FileSystem->existFile(filename = FileSystem->getFileBasename(meshFile->getFileName(), false) + ".skeleton")) + file = FileSystem->createAndOpenFile(filename); + else + file = FileSystem->createAndOpenFile(FileSystem->getFileDir(meshFile->getFileName())+"/"+filename); + if (!file) + { + os::Printer::log("Could not load matching skeleton", name); + return false; + } + + s16 id; + file->read(&id, 2); + if (SwapEndian) + id = os::Byteswap::byteswap(id); + if (id != COGRE_HEADER) + { + file->drop(); + return false; + } + + core::stringc skeletonVersion; + ChunkData head; + readString(file, head, skeletonVersion); + if (skeletonVersion != "[Serializer_v1.10]") + { + file->drop(); + return false; + } + + u16 bone=0; + f32 animationTotal=0.f; + while(file->getPos() < file->getSize()) + { + ChunkData data; + readChunkData(file, data); + + switch(data.header.id) + { + case COGRE_SKELETON: + { + Skeleton.Bones.push_back(OgreBone()); + OgreBone& bone = Skeleton.Bones.getLast(); + readString(file, data, bone.Name); + readShort(file, data, &bone.Handle); + readVector(file, data, bone.Position); + readQuaternion(file, data, bone.Orientation); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Bone", bone.Name+" ("+core::stringc(bone.Handle)+")", ELL_DEBUG); + os::Printer::log("Position", core::stringc(bone.Position.X)+" "+core::stringc(bone.Position.Y)+" "+core::stringc(bone.Position.Z), ELL_DEBUG); + os::Printer::log("Rotation quat", core::stringc(bone.Orientation.W)+" "+core::stringc(bone.Orientation.X)+" "+core::stringc(bone.Orientation.Y)+" "+core::stringc(bone.Orientation.Z), ELL_DEBUG); +// core::vector3df rot; +// bone.Orientation.toEuler(rot); +// rot *= core::RADTODEG; +// os::Printer::log("Rotation", core::stringc(rot.X)+" "+core::stringc(rot.Y)+" "+core::stringc(rot.Z)); +#endif + if (data.read<(data.header.length-bone.Name.size())) + { + readVector(file, data, bone.Scale); + bone.Scale.X *= -1.f; + } + else + bone.Scale=core::vector3df(1,1,1); + bone.Parent=0xffff; + } + break; + case COGRE_BONE_PARENT: + { + u16 parent; + readShort(file, data, &bone); + readShort(file, data, &parent); + if (bone<Skeleton.Bones.size() && parent<Skeleton.Bones.size()) + Skeleton.Bones[bone].Parent=parent; + } + break; + case COGRE_ANIMATION: + { + if (Skeleton.Animations.size()) + animationTotal+=Skeleton.Animations.getLast().Length; + Skeleton.Animations.push_back(OgreAnimation()); + OgreAnimation& anim = Skeleton.Animations.getLast(); + readString(file, data, anim.Name); + readFloat(file, data, &anim.Length); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Animation", anim.Name, ELL_DEBUG); + os::Printer::log("Length", core::stringc(anim.Length), ELL_DEBUG); +#endif + } + break; + case COGRE_ANIMATION_TRACK: +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("for Bone ", core::stringc(bone), ELL_DEBUG); +#endif + readShort(file, data, &bone); // store current bone + break; + case COGRE_ANIMATION_KEYFRAME: + { + Skeleton.Animations.getLast().Keyframes.push_back(OgreKeyframe()); + OgreKeyframe& keyframe = Skeleton.Animations.getLast().Keyframes.getLast(); + readFloat(file, data, &keyframe.Time); + keyframe.Time+=animationTotal; + readQuaternion(file, data, keyframe.Orientation); + readVector(file, data, keyframe.Position); + if (data.read<data.header.length) + { + readVector(file, data, keyframe.Scale); + keyframe.Scale.X *= -1.f; + } + else + keyframe.Scale=core::vector3df(1,1,1); + keyframe.BoneID=bone; + } + break; + case COGRE_ANIMATION_LINK: +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Animation link", ELL_DEBUG); +#endif + break; + default: + break; + } + } + file->drop(); + return true; +} + + +void COgreMeshFileLoader::readChunkData(io::IReadFile* file, ChunkData& data) +{ + file->read(&data.header, sizeof(ChunkHeader)); + if (SwapEndian) + { + data.header.id = os::Byteswap::byteswap(data.header.id); + data.header.length = os::Byteswap::byteswap(data.header.length); + } + data.read += sizeof(ChunkHeader); +} + + +void COgreMeshFileLoader::readString(io::IReadFile* file, ChunkData& data, core::stringc& out) +{ + c8 c = 0; + out = ""; + + while (c!='\n') + { + file->read(&c, sizeof(c8)); + if (c!='\n') + out.append(c); + + } + data.read+=out.size()+1; +} + + +void COgreMeshFileLoader::readBool(io::IReadFile* file, ChunkData& data, bool& out) +{ + // normal C type because we read a bit string + char c = 0; + file->read(&c, sizeof(char)); + out=(c!=0); + ++data.read; +} + + +void COgreMeshFileLoader::readInt(io::IReadFile* file, ChunkData& data, s32* out, u32 num) +{ + // normal C type because we read a bit string + file->read(out, sizeof(int)*num); + if (SwapEndian) + { + for (u32 i=0; i<num; ++i) + out[i] = os::Byteswap::byteswap(out[i]); + } + data.read+=sizeof(int)*num; +} + + +void COgreMeshFileLoader::readShort(io::IReadFile* file, ChunkData& data, u16* out, u32 num) +{ + // normal C type because we read a bit string + file->read(out, sizeof(short)*num); + if (SwapEndian) + { + for (u32 i=0; i<num; ++i) + out[i] = os::Byteswap::byteswap(out[i]); + } + data.read+=sizeof(short)*num; +} + + +void COgreMeshFileLoader::readFloat(io::IReadFile* file, ChunkData& data, f32* out, u32 num) +{ + // normal C type because we read a bit string + file->read(out, sizeof(float)*num); + if (SwapEndian) + { + for (u32 i=0; i<num; ++i) + out[i] = os::Byteswap::byteswap(out[i]); + } + data.read+=sizeof(float)*num; +} + + +void COgreMeshFileLoader::readVector(io::IReadFile* file, ChunkData& data, core::vector3df& out) +{ + readFloat(file, data, &out.X); + readFloat(file, data, &out.Y); + readFloat(file, data, &out.Z); + out.X *= -1.f; +} + + +void COgreMeshFileLoader::readQuaternion(io::IReadFile* file, ChunkData& data, core::quaternion& out) +{ + readVector(file, data, *((core::vector3df*)&out.X)); + readFloat(file, data, &out.W); +} + + +void COgreMeshFileLoader::clearMeshes() +{ + for (u32 i=0; i<Meshes.size(); ++i) + { + for (int k=0; k<(int)Meshes[i].Geometry.Buffers.size(); ++k) + Meshes[i].Geometry.Buffers[k].Data.clear(); + + for (u32 j=0; j<Meshes[i].SubMeshes.size(); ++j) + { + for (int h=0; h<(int)Meshes[i].SubMeshes[j].Geometry.Buffers.size(); ++h) + Meshes[i].SubMeshes[j].Geometry.Buffers[h].Data.clear(); + } + } + + Meshes.clear(); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_OGRE_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.h new file mode 100644 index 0000000..8179285 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COgreMeshFileLoader.h @@ -0,0 +1,269 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// orginally written by Christian Stehno, modified by Nikolaus Gebhardt + +#ifndef __C_OGRE_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_OGRE_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "irrString.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "SMeshBufferLightMap.h" +#include "IMeshManipulator.h" +#include "matrix4.h" +#include "quaternion.h" +#include "CSkinnedMesh.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading ogre meshes. +class COgreMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + COgreMeshFileLoader(io::IFileSystem* fs, video::IVideoDriver* driver); + + //! destructor + virtual ~COgreMeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + +// byte-align structures +#include "irrpack.h" + + struct ChunkHeader + { + u16 id; + u32 length; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + + struct ChunkData + { + ChunkData() : read(0) {} + + ChunkHeader header; + u32 read; + }; + + struct OgreTexture + { + core::array<core::stringc> Filename; + core::stringc Alias; + core::stringc CoordsType; + core::stringc MipMaps; + core::stringc Alpha; + }; + + struct OgrePass + { + OgrePass() : AmbientTokenColor(false), + DiffuseTokenColor(false), SpecularTokenColor(false), + EmissiveTokenColor(false), + MaxLights(8), PointSize(1.0f), PointSprites(false), + PointSizeMin(0), PointSizeMax(0) {} + + video::SMaterial Material; + OgreTexture Texture; + bool AmbientTokenColor; + bool DiffuseTokenColor; + bool SpecularTokenColor; + bool EmissiveTokenColor; + u32 MaxLights; + f32 PointSize; + bool PointSprites; + u32 PointSizeMin; + u32 PointSizeMax; + }; + + struct OgreTechnique + { + OgreTechnique() : Name(""), LODIndex(0) {} + + core::stringc Name; + core::stringc Scheme; + u16 LODIndex; + core::array<OgrePass> Passes; + }; + + struct OgreMaterial + { + OgreMaterial() : Name(""), ReceiveShadows(true), + TransparencyCastsShadows(false) {} + + core::stringc Name; + bool ReceiveShadows; + bool TransparencyCastsShadows; + core::array<f32> LODDistances; + core::array<OgreTechnique> Techniques; + }; + + struct OgreVertexBuffer + { + OgreVertexBuffer() : BindIndex(0), VertexSize(0), Data(0) {} + + u16 BindIndex; + u16 VertexSize; + core::array<f32> Data; + }; + + struct OgreVertexElement + { + u16 Source, + Type, + Semantic, + Offset, + Index; + }; + + struct OgreGeometry + { + s32 NumVertex; + core::array<OgreVertexElement> Elements; + core::array<OgreVertexBuffer> Buffers; + core::array<core::vector3df> Vertices; + core::array<core::vector3df> Normals; + core::array<s32> Colors; + core::array<core::vector2df> TexCoords; + }; + + struct OgreTextureAlias + { + OgreTextureAlias() {}; + OgreTextureAlias(const core::stringc& a, const core::stringc& b) : Texture(a), Alias(b) {}; + core::stringc Texture; + core::stringc Alias; + }; + + struct OgreBoneAssignment + { + s32 VertexID; + u16 BoneID; + f32 Weight; + }; + + struct OgreSubMesh + { + core::stringc Material; + bool SharedVertices; + core::array<s32> Indices; + OgreGeometry Geometry; + u16 Operation; + core::array<OgreTextureAlias> TextureAliases; + core::array<OgreBoneAssignment> BoneAssignments; + bool Indices32Bit; + }; + + struct OgreMesh + { + bool SkeletalAnimation; + OgreGeometry Geometry; + core::array<OgreSubMesh> SubMeshes; + core::array<OgreBoneAssignment> BoneAssignments; + core::vector3df BBoxMinEdge; + core::vector3df BBoxMaxEdge; + f32 BBoxRadius; + }; + + struct OgreBone + { + core::stringc Name; + core::vector3df Position; + core::quaternion Orientation; + core::vector3df Scale; + u16 Handle; + u16 Parent; + }; + + struct OgreKeyframe + { + u16 BoneID; + f32 Time; + core::vector3df Position; + core::quaternion Orientation; + core::vector3df Scale; + }; + + struct OgreAnimation + { + core::stringc Name; + f32 Length; + core::array<OgreKeyframe> Keyframes; + }; + + struct OgreSkeleton + { + core::array<OgreBone> Bones; + core::array<OgreAnimation> Animations; + }; + + bool readChunk(io::IReadFile* file); + bool readObjectChunk(io::IReadFile* file, ChunkData& parent, OgreMesh& mesh); + bool readGeometry(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry); + bool readVertexDeclaration(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry); + bool readVertexBuffer(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry); + bool readSubMesh(io::IReadFile* file, ChunkData& parent, OgreSubMesh& subMesh); + + void readChunkData(io::IReadFile* file, ChunkData& data); + void readString(io::IReadFile* file, ChunkData& data, core::stringc& out); + void readBool(io::IReadFile* file, ChunkData& data, bool& out); + void readInt(io::IReadFile* file, ChunkData& data, s32* out, u32 num=1); + void readShort(io::IReadFile* file, ChunkData& data, u16* out, u32 num=1); + void readFloat(io::IReadFile* file, ChunkData& data, f32* out, u32 num=1); + void readVector(io::IReadFile* file, ChunkData& data, core::vector3df& out); + void readQuaternion(io::IReadFile* file, ChunkData& data, core::quaternion& out); + + void composeMeshBufferMaterial(scene::IMeshBuffer* mb, const core::stringc& materialName); + scene::SMeshBuffer* composeMeshBuffer(const core::array<s32>& indices, const OgreGeometry& geom); + scene::SMeshBufferLightMap* composeMeshBufferLightMap(const core::array<s32>& indices, const OgreGeometry& geom); + scene::IMeshBuffer* composeMeshBufferSkinned(scene::CSkinnedMesh& mesh, const core::array<s32>& indices, const OgreGeometry& geom); + void composeObject(void); + bool readColor(io::IReadFile* meshFile, video::SColor& col); + void getMaterialToken(io::IReadFile* file, core::stringc& token, bool noNewLine=false); + void readTechnique(io::IReadFile* meshFile, OgreMaterial& mat); + void readPass(io::IReadFile* file, OgreTechnique& technique); + void loadMaterials(io::IReadFile* file); + bool loadSkeleton(io::IReadFile* meshFile, const core::stringc& name); + void clearMeshes(); + + io::IFileSystem* FileSystem; + video::IVideoDriver* Driver; + + core::stringc Version; + bool SwapEndian; + core::array<OgreMesh> Meshes; + io::path CurrentlyLoadingFromPath; + + core::array<OgreMaterial> Materials; + OgreSkeleton Skeleton; + + IMesh* Mesh; + u32 NumUV; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.cpp new file mode 100644 index 0000000..3550dba --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.cpp @@ -0,0 +1,244 @@ +// Copyright (C) 2012-2012 Patryk Nadrowski +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#if defined(_IRR_COMPILE_WITH_OPENGL_) && defined(_IRR_COMPILE_WITH_CG_) + +#include "COpenGLCgMaterialRenderer.h" +#include "COpenGLDriver.h" +#include "COpenGLTexture.h" + +namespace irr +{ +namespace video +{ + +COpenGLCgUniformSampler2D::COpenGLCgUniformSampler2D(const CGparameter& parameter, bool global) : CCgUniform(parameter, global) +{ + Type = CG_SAMPLER2D; +} + +void COpenGLCgUniformSampler2D::update(const void* data, const SMaterial& material) const +{ + s32* Data = (s32*)data; + s32 LayerID = *Data; + + if (material.TextureLayer[LayerID].Texture) + { + int TextureID = reinterpret_cast<COpenGLTexture*>(material.TextureLayer[LayerID].Texture)->getOpenGLTextureName(); + + cgGLSetTextureParameter(Parameter, TextureID); + cgGLEnableTextureParameter(Parameter); + } +} + +COpenGLCgMaterialRenderer::COpenGLCgMaterialRenderer(COpenGLDriver* driver, s32& materialType, + const c8* vertexProgram, const c8* vertexEntry, E_VERTEX_SHADER_TYPE vertexProfile, + const c8* fragmentProgram, const c8* fragmentEntry, E_PIXEL_SHADER_TYPE fragmentProfile, + const c8* geometryProgram, const c8* geometryEntry, E_GEOMETRY_SHADER_TYPE geometryProfile, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, u32 vertices, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData) : + Driver(driver), CCgMaterialRenderer(callback, baseMaterial, userData) +{ + #ifdef _DEBUG + setDebugName("COpenGLCgMaterialRenderer"); + #endif + + init(materialType, vertexProgram, vertexEntry, vertexProfile, fragmentProgram, fragmentEntry, fragmentProfile, + geometryProgram, geometryEntry, geometryProfile, inType, outType, vertices); +} + +COpenGLCgMaterialRenderer::~COpenGLCgMaterialRenderer() +{ + if (VertexProgram) + { + cgGLUnloadProgram(VertexProgram); + cgDestroyProgram(VertexProgram); + } + if (FragmentProgram) + { + cgGLUnloadProgram(FragmentProgram); + cgDestroyProgram(FragmentProgram); + } + if (GeometryProgram) + { + cgGLUnloadProgram(GeometryProgram); + cgDestroyProgram(GeometryProgram); + } +} + +void COpenGLCgMaterialRenderer::OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) +{ + Material = material; + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (VertexProgram) + { + cgGLEnableProfile(VertexProfile); + cgGLBindProgram(VertexProgram); + } + + if (FragmentProgram) + { + cgGLEnableProfile(FragmentProfile); + cgGLBindProgram(FragmentProgram); + } + + if (GeometryProgram) + { + cgGLEnableProfile(GeometryProfile); + cgGLBindProgram(GeometryProgram); + } + + if (BaseMaterial) + BaseMaterial->OnSetMaterial(material, material, true, this); + } + + if (CallBack) + CallBack->OnSetMaterial(material); + + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + Driver->setActiveTexture(i, material.getTexture(i)); + + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + +bool COpenGLCgMaterialRenderer::OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype) +{ + if (CallBack && (VertexProgram || FragmentProgram || GeometryProgram)) + CallBack->OnSetConstants(this, UserData); + + return true; +} + +void COpenGLCgMaterialRenderer::OnUnsetMaterial() +{ + if (VertexProgram) + { + cgGLUnbindProgram(VertexProfile); + cgGLDisableProfile(VertexProfile); + } + if (FragmentProgram) + { + cgGLUnbindProgram(FragmentProfile); + cgGLDisableProfile(FragmentProfile); + } + if (GeometryProgram) + { + cgGLUnbindProgram(GeometryProfile); + cgGLDisableProfile(GeometryProfile); + } + + if (BaseMaterial) + BaseMaterial->OnUnsetMaterial(); + + Material = IdentityMaterial;; +} + +void COpenGLCgMaterialRenderer::setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) +{ + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + +IVideoDriver* COpenGLCgMaterialRenderer::getVideoDriver() +{ + return Driver; +} + +void COpenGLCgMaterialRenderer::init(s32& materialType, + const c8* vertexProgram, const c8* vertexEntry, E_VERTEX_SHADER_TYPE vertexProfile, + const c8* fragmentProgram, const c8* fragmentEntry, E_PIXEL_SHADER_TYPE fragmentProfile, + const c8* geometryProgram, const c8* geometryEntry, E_GEOMETRY_SHADER_TYPE geometryProfile, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, u32 vertices) +{ + bool Status = true; + CGerror Error = CG_NO_ERROR; + materialType = -1; + + // TODO: add profile selection + + if (vertexProgram) + { + VertexProfile = cgGLGetLatestProfile(CG_GL_VERTEX); + + if (VertexProfile) + VertexProgram = cgCreateProgram(Driver->getCgContext(), CG_SOURCE, vertexProgram, VertexProfile, vertexEntry, 0); + + if (!VertexProgram) + { + Error = cgGetError(); + os::Printer::log("Cg vertex program failed to compile:", ELL_ERROR); + os::Printer::log(cgGetLastListing(Driver->getCgContext()), ELL_ERROR); + + Status = false; + } + else + cgGLLoadProgram(VertexProgram); + } + + if (fragmentProgram) + { + FragmentProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT); + + if (FragmentProfile) + FragmentProgram = cgCreateProgram(Driver->getCgContext(), CG_SOURCE, fragmentProgram, FragmentProfile, fragmentEntry, 0); + + if (!FragmentProgram) + { + Error = cgGetError(); + os::Printer::log("Cg fragment program failed to compile:", ELL_ERROR); + os::Printer::log(cgGetLastListing(Driver->getCgContext()), ELL_ERROR); + + Status = false; + } + else + cgGLLoadProgram(FragmentProgram); + } + + if (geometryProgram) + { + GeometryProfile = cgGLGetLatestProfile(CG_GL_GEOMETRY); + + if (GeometryProfile) + GeometryProgram = cgCreateProgram(Driver->getCgContext(), CG_SOURCE, geometryProgram, GeometryProfile, geometryEntry, 0); + + if (!GeometryProgram) + { + Error = cgGetError(); + os::Printer::log("Cg geometry program failed to compile:", ELL_ERROR); + os::Printer::log(cgGetLastListing(Driver->getCgContext()), ELL_ERROR); + + Status = false; + } + else + cgGLLoadProgram(GeometryProgram); + } + + getUniformList(); + + // create OpenGL specifics sampler uniforms. + for (unsigned int i = 0; i < UniformInfo.size(); ++i) + { + if (UniformInfo[i]->getType() == CG_SAMPLER2D) + { + bool IsGlobal = true; + + if (UniformInfo[i]->getSpace() == CG_PROGRAM) + IsGlobal = false; + + CCgUniform* Uniform = new COpenGLCgUniformSampler2D(UniformInfo[i]->getParameter(), IsGlobal); + delete UniformInfo[i]; + UniformInfo[i] = Uniform; + } + } + + if (Status) + materialType = Driver->addMaterialRenderer(this); +} + +} +} + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.h new file mode 100644 index 0000000..74c43c5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLCgMaterialRenderer.h @@ -0,0 +1,99 @@ +// Copyright (C) 2012-2012 Patryk Nadrowski +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#if defined(_IRR_COMPILE_WITH_OPENGL_) && defined(_IRR_COMPILE_WITH_CG_) + +#ifdef _IRR_WINDOWS_API_ + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <GL/gl.h> + #include "glext.h" +#else +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 +#else + #define GL_GLEXT_PROTOTYPES 1 +#endif +#if defined(_IRR_OSX_PLATFORM_) + #include <OpenGL/gl.h> +#else + #include <GL/gl.h> +#endif +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #include "glext.h" +#endif +#endif + +#include "CCgMaterialRenderer.h" +#include "Cg/cgGL.h" + +#ifdef _MSC_VER + #pragma comment(lib, "cgGL.lib") +#endif + +namespace irr +{ +namespace video +{ + +class COpenGLDriver; +class IShaderConstantSetCallBack; + +class COpenGLCgUniformSampler2D : public CCgUniform +{ +public: + COpenGLCgUniformSampler2D(const CGparameter& parameter, bool global); + + void update(const void* data, const SMaterial& material) const; +}; + +class COpenGLCgMaterialRenderer : public CCgMaterialRenderer +{ +public: + COpenGLCgMaterialRenderer(COpenGLDriver* driver, s32& materialType, + const c8* vertexProgram = 0, const c8* vertexEntry = "main", + E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, + const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", + E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, + const c8* geometryProgram = 0, const c8* geometryEntry = "main", + E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 vertices = 0, IShaderConstantSetCallBack* callback = 0, + IMaterialRenderer* baseMaterial = 0, s32 userData = 0); + + virtual ~COpenGLCgMaterialRenderer(); + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services); + virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype); + virtual void OnUnsetMaterial(); + + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates); + virtual IVideoDriver* getVideoDriver(); + +protected: + void init(s32& materialType, + const c8* vertexProgram = 0, const c8* vertexEntry = "main", + E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, + const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", + E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, + const c8* geometryProgram = 0, const c8* geometryEntry = "main", + E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 vertices = 0); + + COpenGLDriver* Driver; +}; + +} +} + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.cpp new file mode 100644 index 0000000..1dbeac5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.cpp @@ -0,0 +1,4830 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "COpenGLDriver.h" +// needed here also because of the create methods' parameters +#include "CNullDriver.h" + +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLTexture.h" +#include "COpenGLMaterialRenderer.h" +#include "COpenGLShaderMaterialRenderer.h" +#include "COpenGLSLMaterialRenderer.h" +#include "COpenGLCgMaterialRenderer.h" +#include "COpenGLNormalMapRenderer.h" +#include "COpenGLParallaxMapRenderer.h" +#include "os.h" + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ +#include "MacOSX/CIrrDeviceMacOSX.h" +#endif + +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ +#include <SDL/SDL.h> +#endif + +namespace irr +{ +namespace video +{ + +// ----------------------------------------------------------------------- +// WINDOWS CONSTRUCTOR +// ----------------------------------------------------------------------- +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ +//! Windows constructor and init code +COpenGLDriver::COpenGLDriver(const irr::SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceWin32* device) +: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), + CurrentRenderMode(ERM_NONE), ResetRenderStates(true), Transformation3DChanged(true), + AntiAlias(params.AntiAlias), RenderTargetTexture(0), + CurrentRendertargetSize(0,0), ColorFormat(ECF_R8G8B8), + CurrentTarget(ERT_FRAME_BUFFER), Params(params), + HDc(0), Window(static_cast<HWND>(params.WindowId)), Win32Device(device), + DeviceType(EIDT_WIN32) +{ + #ifdef _DEBUG + setDebugName("COpenGLDriver"); + #endif + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = 0; + #endif +} + + +bool COpenGLDriver::changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceWin32* device) +{ + if (videoData.OpenGLWin32.HWnd && videoData.OpenGLWin32.HDc && videoData.OpenGLWin32.HRc) + { + if (!wglMakeCurrent((HDC)videoData.OpenGLWin32.HDc, (HGLRC)videoData.OpenGLWin32.HRc)) + { + os::Printer::log("Render Context switch failed."); + return false; + } + else + { + HDc = (HDC)videoData.OpenGLWin32.HDc; + } + } + // set back to main context + else if (HDc != ExposedData.OpenGLWin32.HDc) + { + if (!wglMakeCurrent((HDC)ExposedData.OpenGLWin32.HDc, (HGLRC)ExposedData.OpenGLWin32.HRc)) + { + os::Printer::log("Render Context switch failed."); + return false; + } + else + { + HDc = (HDC)ExposedData.OpenGLWin32.HDc; + } + } + return true; +} + +//! inits the open gl driver +bool COpenGLDriver::initDriver(CIrrDeviceWin32* device) +{ + // Create a window to test antialiasing support + const fschar_t* ClassName = __TEXT("GLCIrrDeviceWin32"); + HINSTANCE lhInstance = GetModuleHandle(0); + + // Register Class + WNDCLASSEX wcex; + wcex.cbSize = sizeof(WNDCLASSEX); + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = (WNDPROC)DefWindowProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = lhInstance; + wcex.hIcon = NULL; + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = 0; + wcex.lpszClassName = ClassName; + wcex.hIconSm = 0; + wcex.hIcon = 0; + RegisterClassEx(&wcex); + + RECT clientSize; + clientSize.top = 0; + clientSize.left = 0; + clientSize.right = Params.WindowSize.Width; + clientSize.bottom = Params.WindowSize.Height; + + DWORD style = WS_POPUP; + if (!Params.Fullscreen) + style = WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + + AdjustWindowRect(&clientSize, style, FALSE); + + const s32 realWidth = clientSize.right - clientSize.left; + const s32 realHeight = clientSize.bottom - clientSize.top; + + const s32 windowLeft = (GetSystemMetrics(SM_CXSCREEN) - realWidth) / 2; + const s32 windowTop = (GetSystemMetrics(SM_CYSCREEN) - realHeight) / 2; + + HWND temporary_wnd=CreateWindow(ClassName, __TEXT(""), style, windowLeft, + windowTop, realWidth, realHeight, NULL, NULL, lhInstance, NULL); + + if (!temporary_wnd) + { + os::Printer::log("Cannot create a temporary window.", ELL_ERROR); + UnregisterClass(ClassName, lhInstance); + return false; + } + + HDc = GetDC(temporary_wnd); + + // Set up pixel format descriptor with desired parameters + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor + 1, // Version Number + PFD_DRAW_TO_WINDOW | // Format Must Support Window + PFD_SUPPORT_OPENGL | // Format Must Support OpenGL + (Params.Doublebuffer?PFD_DOUBLEBUFFER:0) | // Must Support Double Buffering + (Params.Stereobuffer?PFD_STEREO:0), // Must Support Stereo Buffer + PFD_TYPE_RGBA, // Request An RGBA Format + Params.Bits, // Select Our Color Depth + 0, 0, 0, 0, 0, 0, // Color Bits Ignored + 0, // No Alpha Buffer + 0, // Shift Bit Ignored + 0, // No Accumulation Buffer + 0, 0, 0, 0, // Accumulation Bits Ignored + Params.ZBufferBits, // Z-Buffer (Depth Buffer) + BYTE(Params.Stencilbuffer ? 1 : 0), // Stencil Buffer Depth + 0, // No Auxiliary Buffer + PFD_MAIN_PLANE, // Main Drawing Layer + 0, // Reserved + 0, 0, 0 // Layer Masks Ignored + }; + + GLuint PixelFormat; + + for (u32 i=0; i<6; ++i) + { + if (i == 1) + { + if (Params.Stencilbuffer) + { + os::Printer::log("Cannot create a GL device with stencil buffer, disabling stencil shadows.", ELL_WARNING); + Params.Stencilbuffer = false; + pfd.cStencilBits = 0; + } + else + continue; + } + else + if (i == 2) + { + pfd.cDepthBits = 24; + } + else + if (i == 3) + { + if (Params.Bits!=16) + pfd.cDepthBits = 16; + else + continue; + } + else + if (i == 4) + { + // try single buffer + if (Params.Doublebuffer) + pfd.dwFlags &= ~PFD_DOUBLEBUFFER; + else + continue; + } + else + if (i == 5) + { + os::Printer::log("Cannot create a GL device context", "No suitable format for temporary window.", ELL_ERROR); + ReleaseDC(temporary_wnd, HDc); + DestroyWindow(temporary_wnd); + UnregisterClass(ClassName, lhInstance); + return false; + } + + // choose pixelformat + PixelFormat = ChoosePixelFormat(HDc, &pfd); + if (PixelFormat) + break; + } + + SetPixelFormat(HDc, PixelFormat, &pfd); + HGLRC hrc=wglCreateContext(HDc); + if (!hrc) + { + os::Printer::log("Cannot create a temporary GL rendering context.", ELL_ERROR); + ReleaseDC(temporary_wnd, HDc); + DestroyWindow(temporary_wnd); + UnregisterClass(ClassName, lhInstance); + return false; + } + + SExposedVideoData data; + data.OpenGLWin32.HDc = HDc; + data.OpenGLWin32.HRc = hrc; + data.OpenGLWin32.HWnd = temporary_wnd; + + + if (!changeRenderContext(data, device)) + { + os::Printer::log("Cannot activate a temporary GL rendering context.", ELL_ERROR); + wglDeleteContext(hrc); + ReleaseDC(temporary_wnd, HDc); + DestroyWindow(temporary_wnd); + UnregisterClass(ClassName, lhInstance); + return false; + } + + core::stringc wglExtensions; +#ifdef WGL_ARB_extensions_string + PFNWGLGETEXTENSIONSSTRINGARBPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); + if (irrGetExtensionsString) + wglExtensions = irrGetExtensionsString(HDc); +#elif defined(WGL_EXT_extensions_string) + PFNWGLGETEXTENSIONSSTRINGEXTPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)wglGetProcAddress("wglGetExtensionsStringEXT"); + if (irrGetExtensionsString) + wglExtensions = irrGetExtensionsString(HDc); +#endif + const bool pixel_format_supported = (wglExtensions.find("WGL_ARB_pixel_format") != -1); + const bool multi_sample_supported = ((wglExtensions.find("WGL_ARB_multisample") != -1) || + (wglExtensions.find("WGL_EXT_multisample") != -1) || (wglExtensions.find("WGL_3DFX_multisample") != -1) ); +#ifdef _DEBUG + os::Printer::log("WGL_extensions", wglExtensions); +#endif + +#ifdef WGL_ARB_pixel_format + PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat_ARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); + if (pixel_format_supported && wglChoosePixelFormat_ARB) + { + // This value determines the number of samples used for antialiasing + // My experience is that 8 does not show a big + // improvement over 4, but 4 shows a big improvement + // over 2. + + if(AntiAlias > 32) + AntiAlias = 32; + + f32 fAttributes[] = {0.0, 0.0}; + s32 iAttributes[] = + { + WGL_DRAW_TO_WINDOW_ARB,1, + WGL_SUPPORT_OPENGL_ARB,1, + WGL_ACCELERATION_ARB,WGL_FULL_ACCELERATION_ARB, + WGL_COLOR_BITS_ARB,(Params.Bits==32) ? 24 : 15, + WGL_ALPHA_BITS_ARB,(Params.Bits==32) ? 8 : 1, + WGL_DEPTH_BITS_ARB,Params.ZBufferBits, // 10,11 + WGL_STENCIL_BITS_ARB,Params.Stencilbuffer ? 1 : 0, + WGL_DOUBLE_BUFFER_ARB,Params.Doublebuffer ? 1 : 0, + WGL_STEREO_ARB,Params.Stereobuffer ? 1 : 0, + WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, +#ifdef WGL_ARB_multisample + WGL_SAMPLES_ARB,AntiAlias, // 20,21 + WGL_SAMPLE_BUFFERS_ARB, 1, +#elif defined(WGL_EXT_multisample) + WGL_SAMPLES_EXT,AntiAlias, // 20,21 + WGL_SAMPLE_BUFFERS_EXT, 1, +#elif defined(WGL_3DFX_multisample) + WGL_SAMPLES_3DFX,AntiAlias, // 20,21 + WGL_SAMPLE_BUFFERS_3DFX, 1, +#endif +#ifdef WGL_ARB_framebuffer_sRGB + WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, Params.HandleSRGB ? 1:0, +#elif defined(WGL_EXT_framebuffer_sRGB) + WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT, Params.HandleSRGB ? 1:0, +#endif +// WGL_DEPTH_FLOAT_EXT, 1, + 0,0,0,0 + }; + int iAttrSize = sizeof(iAttributes)/sizeof(int); + const bool framebuffer_srgb_supported = ((wglExtensions.find("WGL_ARB_framebuffer_sRGB") != -1) || + (wglExtensions.find("WGL_EXT_framebuffer_sRGB") != -1)); + if (!framebuffer_srgb_supported) + { + memmove(&iAttributes[24],&iAttributes[26],sizeof(int)*(iAttrSize-26)); + iAttrSize -= 2; + } + if (!multi_sample_supported) + { + memmove(&iAttributes[20],&iAttributes[24],sizeof(int)*(iAttrSize-24)); + iAttrSize -= 4; + } + + s32 rv=0; + // Try to get an acceptable pixel format + do + { + int pixelFormat=0; + UINT numFormats=0; + const BOOL valid = wglChoosePixelFormat_ARB(HDc,iAttributes,fAttributes,1,&pixelFormat,&numFormats); + + if (valid && numFormats) + rv = pixelFormat; + else + iAttributes[21] -= 1; + } + while(rv==0 && iAttributes[21]>1); + if (rv) + { + PixelFormat=rv; + AntiAlias=iAttributes[21]; + } + } + else +#endif + AntiAlias=0; + + wglMakeCurrent(HDc, NULL); + wglDeleteContext(hrc); + ReleaseDC(temporary_wnd, HDc); + DestroyWindow(temporary_wnd); + UnregisterClass(ClassName, lhInstance); + + // get hdc + HDc=GetDC(Window); + if (!HDc) + { + os::Printer::log("Cannot create a GL device context.", ELL_ERROR); + return false; + } + + // search for pixel format the simple way + if (PixelFormat==0 || (!SetPixelFormat(HDc, PixelFormat, &pfd))) + { + for (u32 i=0; i<5; ++i) + { + if (i == 1) + { + if (Params.Stencilbuffer) + { + os::Printer::log("Cannot create a GL device with stencil buffer, disabling stencil shadows.", ELL_WARNING); + Params.Stencilbuffer = false; + pfd.cStencilBits = 0; + } + else + continue; + } + else + if (i == 2) + { + pfd.cDepthBits = 24; + } + if (i == 3) + { + if (Params.Bits!=16) + pfd.cDepthBits = 16; + else + continue; + } + else + if (i == 4) + { + os::Printer::log("Cannot create a GL device context", "No suitable format.", ELL_ERROR); + return false; + } + + // choose pixelformat + PixelFormat = ChoosePixelFormat(HDc, &pfd); + if (PixelFormat) + break; + } + } + + // set pixel format + if (!SetPixelFormat(HDc, PixelFormat, &pfd)) + { + os::Printer::log("Cannot set the pixel format.", ELL_ERROR); + return false; + } + os::Printer::log("Pixel Format", core::stringc(PixelFormat).c_str(), ELL_DEBUG); + + // create rendering context +#ifdef WGL_ARB_create_context + PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs_ARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB"); + if (wglCreateContextAttribs_ARB) + { + int iAttribs[] = + { + WGL_CONTEXT_MAJOR_VERSION_ARB, 3, + WGL_CONTEXT_MINOR_VERSION_ARB, 1, + 0 + }; + hrc=wglCreateContextAttribs_ARB(HDc, 0, iAttribs); + } + else +#endif + hrc=wglCreateContext(HDc); + + if (!hrc) + { + os::Printer::log("Cannot create a GL rendering context.", ELL_ERROR); + return false; + } + + // set exposed data + ExposedData.OpenGLWin32.HDc = HDc; + ExposedData.OpenGLWin32.HRc = hrc; + ExposedData.OpenGLWin32.HWnd = Window; + + // activate rendering context + + if (!changeRenderContext(ExposedData, device)) + { + os::Printer::log("Cannot activate GL rendering context", ELL_ERROR); + wglDeleteContext(hrc); + return false; + } + + int pf = GetPixelFormat(HDc); + DescribePixelFormat(HDc, pf, sizeof(PIXELFORMATDESCRIPTOR), &pfd); + if (pfd.cAlphaBits != 0) + { + if (pfd.cRedBits == 8) + ColorFormat = ECF_A8R8G8B8; + else + ColorFormat = ECF_A1R5G5B5; + } + else + { + if (pfd.cRedBits == 8) + ColorFormat = ECF_R8G8B8; + else + ColorFormat = ECF_R5G6B5; + } + + genericDriverInit(); + + extGlSwapInterval(Params.Vsync ? 1 : 0); + return true; +} + +#endif // _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + +// ----------------------------------------------------------------------- +// MacOSX CONSTRUCTOR +// ----------------------------------------------------------------------- +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ +//! Windows constructor and init code +COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceMacOSX *device) +: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), + CurrentRenderMode(ERM_NONE), ResetRenderStates(true), Transformation3DChanged(true), + AntiAlias(params.AntiAlias), RenderTargetTexture(0), + CurrentRendertargetSize(0,0), ColorFormat(ECF_R8G8B8), + CurrentTarget(ERT_FRAME_BUFFER), Params(params), + OSXDevice(device), DeviceType(EIDT_OSX) +{ + #ifdef _DEBUG + setDebugName("COpenGLDriver"); + #endif + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = 0; + #endif + + genericDriverInit(); +} + +#endif + +// ----------------------------------------------------------------------- +// LINUX CONSTRUCTOR +// ----------------------------------------------------------------------- +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ +//! Linux constructor and init code +COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceLinux* device) +: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), + CurrentRenderMode(ERM_NONE), ResetRenderStates(true), + Transformation3DChanged(true), AntiAlias(params.AntiAlias), + RenderTargetTexture(0), CurrentRendertargetSize(0,0), ColorFormat(ECF_R8G8B8), + CurrentTarget(ERT_FRAME_BUFFER), Params(params), + X11Device(device), DeviceType(EIDT_X11) +{ + #ifdef _DEBUG + setDebugName("COpenGLDriver"); + #endif + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = 0; + #endif +} + + +bool COpenGLDriver::changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceLinux* device) +{ + if (videoData.OpenGLLinux.X11Window) + { + if (videoData.OpenGLLinux.X11Display && videoData.OpenGLLinux.X11Context) + { + if (!glXMakeCurrent((Display*)videoData.OpenGLLinux.X11Display, videoData.OpenGLLinux.X11Window, (GLXContext)videoData.OpenGLLinux.X11Context)) + { + os::Printer::log("Render Context switch failed."); + return false; + } + else + { + Drawable = videoData.OpenGLLinux.X11Window; + X11Display = (Display*)videoData.OpenGLLinux.X11Display; + } + } + else + { + // in case we only got a window ID, try with the existing values for display and context + if (!glXMakeCurrent((Display*)ExposedData.OpenGLLinux.X11Display, videoData.OpenGLLinux.X11Window, (GLXContext)ExposedData.OpenGLLinux.X11Context)) + { + os::Printer::log("Render Context switch failed."); + return false; + } + else + { + Drawable = videoData.OpenGLLinux.X11Window; + X11Display = (Display*)ExposedData.OpenGLLinux.X11Display; + } + } + } + // set back to main context + else if (X11Display != ExposedData.OpenGLLinux.X11Display) + { + if (!glXMakeCurrent((Display*)ExposedData.OpenGLLinux.X11Display, ExposedData.OpenGLLinux.X11Window, (GLXContext)ExposedData.OpenGLLinux.X11Context)) + { + os::Printer::log("Render Context switch failed."); + return false; + } + else + { + Drawable = ExposedData.OpenGLLinux.X11Window; + X11Display = (Display*)ExposedData.OpenGLLinux.X11Display; + } + } + return true; +} + + +//! inits the open gl driver +bool COpenGLDriver::initDriver(CIrrDeviceLinux* device) +{ + ExposedData.OpenGLLinux.X11Context = glXGetCurrentContext(); + ExposedData.OpenGLLinux.X11Display = glXGetCurrentDisplay(); + ExposedData.OpenGLLinux.X11Window = (unsigned long)Params.WindowId; + Drawable = glXGetCurrentDrawable(); + X11Display = (Display*)ExposedData.OpenGLLinux.X11Display; + + genericDriverInit(); + + // set vsync + extGlSwapInterval(Params.Vsync ? 1 : 0); + return true; +} + +#endif // _IRR_COMPILE_WITH_X11_DEVICE_ + + +// ----------------------------------------------------------------------- +// SDL CONSTRUCTOR +// ----------------------------------------------------------------------- +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ +//! SDL constructor and init code +COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceSDL* device) +: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), + CurrentRenderMode(ERM_NONE), ResetRenderStates(true), + Transformation3DChanged(true), AntiAlias(params.AntiAlias), + RenderTargetTexture(0), CurrentRendertargetSize(0,0), ColorFormat(ECF_R8G8B8), + CurrentTarget(ERT_FRAME_BUFFER), Params(params), + SDLDevice(device), DeviceType(EIDT_SDL) +{ + #ifdef _DEBUG + setDebugName("COpenGLDriver"); + #endif + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = 0; + #endif + + genericDriverInit(); +} + +#endif // _IRR_COMPILE_WITH_SDL_DEVICE_ + + +//! destructor +COpenGLDriver::~COpenGLDriver() +{ + #ifdef _IRR_COMPILE_WITH_CG_ + if (CgContext) + cgDestroyContext(CgContext); + #endif + + RequestedLights.clear(); + + deleteMaterialRenders(); + + CurrentTexture.clear(); + // I get a blue screen on my laptop, when I do not delete the + // textures manually before releasing the dc. Oh how I love this. + deleteAllTextures(); + removeAllOcclusionQueries(); + removeAllHardwareBuffers(); + +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + if (DeviceType == EIDT_WIN32) + { + + if (ExposedData.OpenGLWin32.HRc) + { + if (!wglMakeCurrent(HDc, 0)) + os::Printer::log("Release of dc and rc failed.", ELL_WARNING); + + if (!wglDeleteContext((HGLRC)ExposedData.OpenGLWin32.HRc)) + os::Printer::log("Release of rendering context failed.", ELL_WARNING); + } + + if (HDc) + ReleaseDC(Window, HDc); + } +#endif +} + +// ----------------------------------------------------------------------- +// METHODS +// ----------------------------------------------------------------------- + +bool COpenGLDriver::genericDriverInit() +{ + Name=L"OpenGL "; + Name.append(glGetString(GL_VERSION)); + s32 pos=Name.findNext(L' ', 7); + if (pos != -1) + Name=Name.subString(0, pos); + printVersion(); + + // print renderer information + const GLubyte* renderer = glGetString(GL_RENDERER); + const GLubyte* vendor = glGetString(GL_VENDOR); + if (renderer && vendor) + { + os::Printer::log(reinterpret_cast<const c8*>(renderer), reinterpret_cast<const c8*>(vendor), ELL_INFORMATION); + VendorName = reinterpret_cast<const c8*>(vendor); + } + + u32 i; + CurrentTexture.clear(); + // load extensions + initExtensions(Params.Stencilbuffer); + if (queryFeature(EVDF_ARB_GLSL)) + { + char buf[32]; + const u32 maj = ShaderLanguageVersion/100; + snprintf(buf, 32, "%u.%u", maj, ShaderLanguageVersion-maj*100); + os::Printer::log("GLSL version", buf, ELL_INFORMATION); + } + else + os::Printer::log("GLSL not available.", ELL_INFORMATION); + DriverAttributes->setAttribute("MaxTextures", MaxTextureUnits); + DriverAttributes->setAttribute("MaxSupportedTextures", MaxSupportedTextures); + DriverAttributes->setAttribute("MaxLights", MaxLights); + DriverAttributes->setAttribute("MaxAnisotropy", MaxAnisotropy); + DriverAttributes->setAttribute("MaxUserClipPlanes", MaxUserClipPlanes); + DriverAttributes->setAttribute("MaxAuxBuffers", MaxAuxBuffers); + DriverAttributes->setAttribute("MaxMultipleRenderTargets", MaxMultipleRenderTargets); + DriverAttributes->setAttribute("MaxIndices", (s32)MaxIndices); + DriverAttributes->setAttribute("MaxTextureSize", (s32)MaxTextureSize); + DriverAttributes->setAttribute("MaxGeometryVerticesOut", (s32)MaxGeometryVerticesOut); + DriverAttributes->setAttribute("MaxTextureLODBias", MaxTextureLODBias); + DriverAttributes->setAttribute("Version", Version); + DriverAttributes->setAttribute("ShaderLanguageVersion", ShaderLanguageVersion); + DriverAttributes->setAttribute("AntiAlias", AntiAlias); + + glPixelStorei(GL_PACK_ALIGNMENT, 1); + + // Reset The Current Viewport + glViewport(0, 0, Params.WindowSize.Width, Params.WindowSize.Height); + + UserClipPlanes.reallocate(MaxUserClipPlanes); + for (i=0; i<MaxUserClipPlanes; ++i) + UserClipPlanes.push_back(SUserClipPlane()); + + for (i=0; i<ETS_COUNT; ++i) + setTransform(static_cast<E_TRANSFORMATION_STATE>(i), core::IdentityMatrix); + + setAmbientLight(SColorf(0.0f,0.0f,0.0f,0.0f)); +#ifdef GL_EXT_separate_specular_color + if (FeatureAvailable[IRR_EXT_separate_specular_color]) + glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); +#endif + glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); + + Params.HandleSRGB &= ((FeatureAvailable[IRR_ARB_framebuffer_sRGB] || FeatureAvailable[IRR_EXT_framebuffer_sRGB]) && + FeatureAvailable[IRR_EXT_texture_sRGB]); +#if defined(GL_ARB_framebuffer_sRGB) + if (Params.HandleSRGB) + glEnable(GL_FRAMEBUFFER_SRGB); +#elif defined(GL_EXT_framebuffer_sRGB) + if (Params.HandleSRGB) + glEnable(GL_FRAMEBUFFER_SRGB_EXT); +#endif + +// This is a fast replacement for NORMALIZE_NORMALS +// if ((Version>101) || FeatureAvailable[IRR_EXT_rescale_normal]) +// glEnable(GL_RESCALE_NORMAL_EXT); + + glClearDepth(1.0); + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); + glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); + glHint(GL_POINT_SMOOTH_HINT, GL_FASTEST); + glDepthFunc(GL_LEQUAL); + glFrontFace(GL_CW); + // adjust flat coloring scheme to DirectX version +#if defined(GL_ARB_provoking_vertex) || defined(GL_EXT_provoking_vertex) + extGlProvokingVertex(GL_FIRST_VERTEX_CONVENTION_EXT); +#endif + + // create material renderers + createMaterialRenderers(); + + // set the renderstates + setRenderStates3DMode(); + + glAlphaFunc(GL_GREATER, 0.f); + + // set fog mode + setFog(FogColor, FogType, FogStart, FogEnd, FogDensity, PixelFog, RangeFog); + + // create matrix for flipping textures + TextureFlipMatrix.buildTextureTransform(0.0f, core::vector2df(0,0), core::vector2df(0,1.0f), core::vector2df(1.0f,-1.0f)); + + // We need to reset once more at the beginning of the first rendering. + // This fixes problems with intermediate changes to the material during texture load. + ResetRenderStates = true; + + #ifdef _IRR_COMPILE_WITH_CG_ + CgContext = cgCreateContext(); + #endif + + return true; +} + + +void COpenGLDriver::createMaterialRenderers() +{ + // create OpenGL material renderers + + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SOLID(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SOLID_2_LAYER(this)); + + // add the same renderer for all lightmap types + COpenGLMaterialRenderer_LIGHTMAP* lmr = new COpenGLMaterialRenderer_LIGHTMAP(this); + addMaterialRenderer(lmr); // for EMT_LIGHTMAP: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_ADD: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M2: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M4: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING_M2: + addMaterialRenderer(lmr); // for EMT_LIGHTMAP_LIGHTING_M4: + lmr->drop(); + + // add remaining material renderer + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_DETAIL_MAP(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SPHERE_MAP(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_REFLECTION_2_LAYER(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ADD_COLOR(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA(this)); + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(this)); + + // add normal map renderers + s32 tmp = 0; + video::IMaterialRenderer* renderer = 0; + renderer = new COpenGLNormalMapRenderer(this, tmp, MaterialRenderers[EMT_SOLID].Renderer); + renderer->drop(); + renderer = new COpenGLNormalMapRenderer(this, tmp, MaterialRenderers[EMT_TRANSPARENT_ADD_COLOR].Renderer); + renderer->drop(); + renderer = new COpenGLNormalMapRenderer(this, tmp, MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); + renderer->drop(); + + // add parallax map renderers + renderer = new COpenGLParallaxMapRenderer(this, tmp, MaterialRenderers[EMT_SOLID].Renderer); + renderer->drop(); + renderer = new COpenGLParallaxMapRenderer(this, tmp, MaterialRenderers[EMT_TRANSPARENT_ADD_COLOR].Renderer); + renderer->drop(); + renderer = new COpenGLParallaxMapRenderer(this, tmp, MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); + renderer->drop(); + + // add basic 1 texture blending + addAndDropMaterialRenderer(new COpenGLMaterialRenderer_ONETEXTURE_BLEND(this)); +} + + +//! presents the rendered scene on the screen, returns false if failed +bool COpenGLDriver::endScene() +{ + CNullDriver::endScene(); + + glFlush(); + +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + if (DeviceType == EIDT_WIN32) + return SwapBuffers(HDc) == TRUE; +#endif + +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + if (DeviceType == EIDT_X11) + { + glXSwapBuffers(X11Display, Drawable); + return true; + } +#endif + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + if (DeviceType == EIDT_OSX) + { + OSXDevice->flush(); + return true; + } +#endif + +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ + if (DeviceType == EIDT_SDL) + { + SDL_GL_SwapBuffers(); + return true; + } +#endif + + // todo: console device present + + return false; +} + + +//! clears the zbuffer and color buffer +void COpenGLDriver::clearBuffers(bool backBuffer, bool zBuffer, bool stencilBuffer, SColor color) +{ + GLbitfield mask = 0; + if (backBuffer) + { + const f32 inv = 1.0f / 255.0f; + glClearColor(color.getRed() * inv, color.getGreen() * inv, + color.getBlue() * inv, color.getAlpha() * inv); + + mask |= GL_COLOR_BUFFER_BIT; + } + + if (zBuffer) + { + glDepthMask(GL_TRUE); + LastMaterial.ZWriteEnable=true; + mask |= GL_DEPTH_BUFFER_BIT; + } + + if (stencilBuffer) + mask |= GL_STENCIL_BUFFER_BIT; + + if (mask) + glClear(mask); +} + + +//! init call for rendering start +bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color, + const SExposedVideoData& videoData, core::rect<s32>* sourceRect) +{ + CNullDriver::beginScene(backBuffer, zBuffer, color, videoData, sourceRect); + + switch (DeviceType) + { +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + case EIDT_WIN32: + changeRenderContext(videoData, Win32Device); + break; +#endif +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + case EIDT_X11: + changeRenderContext(videoData, X11Device); + break; +#endif + default: + changeRenderContext(videoData, (void*)0); + break; + } + +#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + if (DeviceType == EIDT_SDL) + { + // todo: SDL sets glFrontFace(GL_CCW) after driver creation, + // it would be better if this was fixed elsewhere. + glFrontFace(GL_CW); + } +#endif + + clearBuffers(backBuffer, zBuffer, false, color); + return true; +} + + +//! Returns the transformation set by setTransform +const core::matrix4& COpenGLDriver::getTransform(E_TRANSFORMATION_STATE state) const +{ + return Matrices[state]; +} + + +//! sets transformation +void COpenGLDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) +{ + Matrices[state] = mat; + Transformation3DChanged = true; + + switch (state) + { + case ETS_VIEW: + case ETS_WORLD: + { + // OpenGL only has a model matrix, view and world is not existent. so lets fake these two. + glMatrixMode(GL_MODELVIEW); + + // first load the viewing transformation for user clip planes + glLoadMatrixf((Matrices[ETS_VIEW]).pointer()); + + // we have to update the clip planes to the latest view matrix + for (u32 i=0; i<MaxUserClipPlanes; ++i) + if (UserClipPlanes[i].Enabled) + uploadClipPlane(i); + + // now the real model-view matrix + glMultMatrixf(Matrices[ETS_WORLD].pointer()); + } + break; + case ETS_PROJECTION: + { + glMatrixMode(GL_PROJECTION); + glLoadMatrixf(mat.pointer()); + } + break; + case ETS_COUNT: + return; + default: + { + const u32 i = state - ETS_TEXTURE_0; + if (i >= MATERIAL_MAX_TEXTURES) + break; + + const bool isRTT = Material.getTexture(i) && Material.getTexture(i)->isRenderTarget(); + + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB + i); + + glMatrixMode(GL_TEXTURE); + if (!isRTT && mat.isIdentity() ) + glLoadIdentity(); + else + { + GLfloat glmat[16]; + if (isRTT) + getGLTextureMatrix(glmat, mat * TextureFlipMatrix); + else + getGLTextureMatrix(glmat, mat); + glLoadMatrixf(glmat); + } + break; + } + } +} + + +bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) +{ + if (!HWBuffer) + return false; + + if (!FeatureAvailable[IRR_ARB_vertex_buffer_object]) + return false; + +#if defined(GL_ARB_vertex_buffer_object) + const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; + const void* vertices=mb->getVertices(); + const u32 vertexCount=mb->getVertexCount(); + const E_VERTEX_TYPE vType=mb->getVertexType(); + const u32 vertexSize = getVertexPitchFromType(vType); + + const c8* vbuf = static_cast<const c8*>(vertices); + core::array<c8> buffer; + if (!FeatureAvailable[IRR_ARB_vertex_array_bgra] && !FeatureAvailable[IRR_EXT_vertex_array_bgra]) + { + //buffer vertex data, and convert colors... + buffer.set_used(vertexSize * vertexCount); + memcpy(buffer.pointer(), vertices, vertexSize * vertexCount); + vbuf = buffer.const_pointer(); + + // in order to convert the colors into opengl format (RGBA) + switch (vType) + { + case EVT_STANDARD: + { + S3DVertex* pb = reinterpret_cast<S3DVertex*>(buffer.pointer()); + const S3DVertex* po = static_cast<const S3DVertex*>(vertices); + for (u32 i=0; i<vertexCount; i++) + { + po[i].Color.toOpenGLColor((u8*)&(pb[i].Color)); + } + } + break; + case EVT_2TCOORDS: + { + S3DVertex2TCoords* pb = reinterpret_cast<S3DVertex2TCoords*>(buffer.pointer()); + const S3DVertex2TCoords* po = static_cast<const S3DVertex2TCoords*>(vertices); + for (u32 i=0; i<vertexCount; i++) + { + po[i].Color.toOpenGLColor((u8*)&(pb[i].Color)); + } + } + break; + case EVT_TANGENTS: + { + S3DVertexTangents* pb = reinterpret_cast<S3DVertexTangents*>(buffer.pointer()); + const S3DVertexTangents* po = static_cast<const S3DVertexTangents*>(vertices); + for (u32 i=0; i<vertexCount; i++) + { + po[i].Color.toOpenGLColor((u8*)&(pb[i].Color)); + } + } + break; + default: + { + return false; + } + } + } + + //get or create buffer + bool newBuffer=false; + if (!HWBuffer->vbo_verticesID) + { + extGlGenBuffers(1, &HWBuffer->vbo_verticesID); + if (!HWBuffer->vbo_verticesID) + return false; + newBuffer=true; + } + else if (HWBuffer->vbo_verticesSize < vertexCount*vertexSize) + { + newBuffer=true; + } + + extGlBindBuffer(GL_ARRAY_BUFFER, HWBuffer->vbo_verticesID); + + //copy data to graphics card + glGetError(); // clear error storage + if (!newBuffer) + extGlBufferSubData(GL_ARRAY_BUFFER, 0, vertexCount * vertexSize, vbuf); + else + { + HWBuffer->vbo_verticesSize = vertexCount*vertexSize; + + if (HWBuffer->Mapped_Vertex==scene::EHM_STATIC) + extGlBufferData(GL_ARRAY_BUFFER, vertexCount * vertexSize, vbuf, GL_STATIC_DRAW); + else if (HWBuffer->Mapped_Vertex==scene::EHM_DYNAMIC) + extGlBufferData(GL_ARRAY_BUFFER, vertexCount * vertexSize, vbuf, GL_DYNAMIC_DRAW); + else //scene::EHM_STREAM + extGlBufferData(GL_ARRAY_BUFFER, vertexCount * vertexSize, vbuf, GL_STREAM_DRAW); + } + + extGlBindBuffer(GL_ARRAY_BUFFER, 0); + + return (glGetError() == GL_NO_ERROR); +#else + return false; +#endif +} + + +bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) +{ + if (!HWBuffer) + return false; + + if (!FeatureAvailable[IRR_ARB_vertex_buffer_object]) + return false; + +#if defined(GL_ARB_vertex_buffer_object) + const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; + + const void* indices=mb->getIndices(); + u32 indexCount= mb->getIndexCount(); + + GLenum indexSize; + switch (mb->getIndexType()) + { + case EIT_16BIT: + { + indexSize=sizeof(u16); + break; + } + case EIT_32BIT: + { + indexSize=sizeof(u32); + break; + } + default: + { + return false; + } + } + + + //get or create buffer + bool newBuffer=false; + if (!HWBuffer->vbo_indicesID) + { + extGlGenBuffers(1, &HWBuffer->vbo_indicesID); + if (!HWBuffer->vbo_indicesID) + return false; + newBuffer=true; + } + else if (HWBuffer->vbo_indicesSize < indexCount*indexSize) + { + newBuffer=true; + } + + extGlBindBuffer(GL_ELEMENT_ARRAY_BUFFER, HWBuffer->vbo_indicesID); + + //copy data to graphics card + glGetError(); // clear error storage + if (!newBuffer) + extGlBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, indexCount * indexSize, indices); + else + { + HWBuffer->vbo_indicesSize = indexCount*indexSize; + + if (HWBuffer->Mapped_Index==scene::EHM_STATIC) + extGlBufferData(GL_ELEMENT_ARRAY_BUFFER, indexCount * indexSize, indices, GL_STATIC_DRAW); + else if (HWBuffer->Mapped_Index==scene::EHM_DYNAMIC) + extGlBufferData(GL_ELEMENT_ARRAY_BUFFER, indexCount * indexSize, indices, GL_DYNAMIC_DRAW); + else //scene::EHM_STREAM + extGlBufferData(GL_ELEMENT_ARRAY_BUFFER, indexCount * indexSize, indices, GL_STREAM_DRAW); + } + + extGlBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + + return (glGetError() == GL_NO_ERROR); +#else + return false; +#endif +} + + +//! updates hardware buffer if needed +bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer) +{ + if (!HWBuffer) + return false; + + if (HWBuffer->Mapped_Vertex!=scene::EHM_NEVER) + { + if (HWBuffer->ChangedID_Vertex != HWBuffer->MeshBuffer->getChangedID_Vertex() + || !((SHWBufferLink_opengl*)HWBuffer)->vbo_verticesID) + { + + HWBuffer->ChangedID_Vertex = HWBuffer->MeshBuffer->getChangedID_Vertex(); + + if (!updateVertexHardwareBuffer((SHWBufferLink_opengl*)HWBuffer)) + return false; + } + } + + if (HWBuffer->Mapped_Index!=scene::EHM_NEVER) + { + if (HWBuffer->ChangedID_Index != HWBuffer->MeshBuffer->getChangedID_Index() + || !((SHWBufferLink_opengl*)HWBuffer)->vbo_indicesID) + { + + HWBuffer->ChangedID_Index = HWBuffer->MeshBuffer->getChangedID_Index(); + + if (!updateIndexHardwareBuffer((SHWBufferLink_opengl*)HWBuffer)) + return false; + } + } + + return true; +} + + +//! Create hardware buffer from meshbuffer +COpenGLDriver::SHWBufferLink *COpenGLDriver::createHardwareBuffer(const scene::IMeshBuffer* mb) +{ +#if defined(GL_ARB_vertex_buffer_object) + if (!mb || (mb->getHardwareMappingHint_Index()==scene::EHM_NEVER && mb->getHardwareMappingHint_Vertex()==scene::EHM_NEVER)) + return 0; + + SHWBufferLink_opengl *HWBuffer=new SHWBufferLink_opengl(mb); + + //add to map + HWBufferMap.insert(HWBuffer->MeshBuffer, HWBuffer); + + HWBuffer->ChangedID_Vertex=HWBuffer->MeshBuffer->getChangedID_Vertex(); + HWBuffer->ChangedID_Index=HWBuffer->MeshBuffer->getChangedID_Index(); + HWBuffer->Mapped_Vertex=mb->getHardwareMappingHint_Vertex(); + HWBuffer->Mapped_Index=mb->getHardwareMappingHint_Index(); + HWBuffer->LastUsed=0; + HWBuffer->vbo_verticesID=0; + HWBuffer->vbo_indicesID=0; + HWBuffer->vbo_verticesSize=0; + HWBuffer->vbo_indicesSize=0; + + if (!updateHardwareBuffer(HWBuffer)) + { + deleteHardwareBuffer(HWBuffer); + return 0; + } + + return HWBuffer; +#else + return 0; +#endif +} + + +void COpenGLDriver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer) +{ + if (!_HWBuffer) + return; + +#if defined(GL_ARB_vertex_buffer_object) + SHWBufferLink_opengl *HWBuffer=(SHWBufferLink_opengl*)_HWBuffer; + if (HWBuffer->vbo_verticesID) + { + extGlDeleteBuffers(1, &HWBuffer->vbo_verticesID); + HWBuffer->vbo_verticesID=0; + } + if (HWBuffer->vbo_indicesID) + { + extGlDeleteBuffers(1, &HWBuffer->vbo_indicesID); + HWBuffer->vbo_indicesID=0; + } +#endif + + CNullDriver::deleteHardwareBuffer(_HWBuffer); +} + + +//! Draw hardware buffer +void COpenGLDriver::drawHardwareBuffer(SHWBufferLink *_HWBuffer) +{ + if (!_HWBuffer) + return; + + updateHardwareBuffer(_HWBuffer); //check if update is needed + _HWBuffer->LastUsed=0; //reset count + +#if defined(GL_ARB_vertex_buffer_object) + SHWBufferLink_opengl *HWBuffer=(SHWBufferLink_opengl*)_HWBuffer; + + const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; + const void *vertices=mb->getVertices(); + const void *indexList=mb->getIndices(); + + if (HWBuffer->Mapped_Vertex!=scene::EHM_NEVER) + { + extGlBindBuffer(GL_ARRAY_BUFFER, HWBuffer->vbo_verticesID); + vertices=0; + } + + if (HWBuffer->Mapped_Index!=scene::EHM_NEVER) + { + extGlBindBuffer(GL_ELEMENT_ARRAY_BUFFER, HWBuffer->vbo_indicesID); + indexList=0; + } + + drawVertexPrimitiveList(vertices, mb->getVertexCount(), indexList, mb->getIndexCount()/3, mb->getVertexType(), scene::EPT_TRIANGLES, mb->getIndexType()); + + if (HWBuffer->Mapped_Vertex!=scene::EHM_NEVER) + extGlBindBuffer(GL_ARRAY_BUFFER, 0); + if (HWBuffer->Mapped_Index!=scene::EHM_NEVER) + extGlBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); +#endif +} + + +//! Create occlusion query. +/** Use node for identification and mesh for occlusion test. */ +void COpenGLDriver::addOcclusionQuery(scene::ISceneNode* node, + const scene::IMesh* mesh) +{ + if (!queryFeature(EVDF_OCCLUSION_QUERY)) + return; + + CNullDriver::addOcclusionQuery(node, mesh); + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if ((index != -1) && (OcclusionQueries[index].UID == 0)) + extGlGenQueries(1, reinterpret_cast<GLuint*>(&OcclusionQueries[index].UID)); +} + + +//! Remove occlusion query. +void COpenGLDriver::removeOcclusionQuery(scene::ISceneNode* node) +{ + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + if (OcclusionQueries[index].UID != 0) + extGlDeleteQueries(1, reinterpret_cast<GLuint*>(&OcclusionQueries[index].UID)); + CNullDriver::removeOcclusionQuery(node); + } +} + + +//! Run occlusion query. Draws mesh stored in query. +/** If the mesh shall not be rendered visible, use +overrideMaterial to disable the color and depth buffer. */ +void COpenGLDriver::runOcclusionQuery(scene::ISceneNode* node, bool visible) +{ + if (!node) + return; + + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + if (OcclusionQueries[index].UID) + extGlBeginQuery( +#ifdef GL_ARB_occlusion_query + GL_SAMPLES_PASSED_ARB, +#else + 0, +#endif + OcclusionQueries[index].UID); + CNullDriver::runOcclusionQuery(node,visible); + if (OcclusionQueries[index].UID) + extGlEndQuery( +#ifdef GL_ARB_occlusion_query + GL_SAMPLES_PASSED_ARB); +#else + 0); +#endif + testGLError(); + } +} + + +//! Update occlusion query. Retrieves results from GPU. +/** If the query shall not block, set the flag to false. +Update might not occur in this case, though */ +void COpenGLDriver::updateOcclusionQuery(scene::ISceneNode* node, bool block) +{ + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + { + // not yet started + if (OcclusionQueries[index].Run==u32(~0)) + return; + GLint available = block?GL_TRUE:GL_FALSE; + if (!block) + extGlGetQueryObjectiv(OcclusionQueries[index].UID, +#ifdef GL_ARB_occlusion_query + GL_QUERY_RESULT_AVAILABLE_ARB, +#elif defined(GL_NV_occlusion_query) + GL_PIXEL_COUNT_AVAILABLE_NV, +#else + 0, +#endif + &available); + testGLError(); + if (available==GL_TRUE) + { + extGlGetQueryObjectiv(OcclusionQueries[index].UID, +#ifdef GL_ARB_occlusion_query + GL_QUERY_RESULT_ARB, +#elif defined(GL_NV_occlusion_query) + GL_PIXEL_COUNT_NV, +#else + 0, +#endif + &available); + if (queryFeature(EVDF_OCCLUSION_QUERY)) + OcclusionQueries[index].Result = available; + } + testGLError(); + } +} + + +//! Return query result. +/** Return value is the number of visible pixels/fragments. +The value is a safe approximation, i.e. can be larger than the +actual value of pixels. */ +u32 COpenGLDriver::getOcclusionQueryResult(scene::ISceneNode* node) const +{ + const s32 index = OcclusionQueries.linear_search(SOccQuery(node)); + if (index != -1) + return OcclusionQueries[index].Result; + else + return ~0; +} + + +// small helper function to create vertex buffer object adress offsets +static inline u8* buffer_offset(const long offset) +{ + return ((u8*)0 + offset); +} + + +//! draws a vertex primitive list +void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) +{ + if (!primitiveCount || !vertexCount) + return; + + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::drawVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType, iType); + + if (vertices && !FeatureAvailable[IRR_ARB_vertex_array_bgra] && !FeatureAvailable[IRR_EXT_vertex_array_bgra]) + getColorBuffer(vertices, vertexCount, vType); + + // draw everything + setRenderStates3DMode(); + + if (MultiTextureExtension) + extGlClientActiveTexture(GL_TEXTURE0_ARB); + + glEnableClientState(GL_COLOR_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); + if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES)) + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES)) + glEnableClientState(GL_NORMAL_ARRAY); + +//due to missing defines in OSX headers, we have to be more specific with this check +//#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra) +#ifdef GL_BGRA + const GLint colorSize=(FeatureAvailable[IRR_ARB_vertex_array_bgra] || FeatureAvailable[IRR_EXT_vertex_array_bgra])?GL_BGRA:4; +#else + const GLint colorSize=4; +#endif + if (vertices) + { + if (FeatureAvailable[IRR_ARB_vertex_array_bgra] || FeatureAvailable[IRR_EXT_vertex_array_bgra]) + { + switch (vType) + { + case EVT_STANDARD: + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Color); + break; + case EVT_2TCOORDS: + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].Color); + break; + case EVT_TANGENTS: + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Color); + break; + } + } + else + { + // avoid passing broken pointer to OpenGL + _IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0); + glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]); + } + } + + switch (vType) + { + case EVT_STANDARD: + if (vertices) + { + glNormalPointer(GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Normal); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].TCoords); + glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Pos); + } + else + { + glNormalPointer(GL_FLOAT, sizeof(S3DVertex), buffer_offset(12)); + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), buffer_offset(24)); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), buffer_offset(28)); + glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex), 0); + } + + if (MultiTextureExtension && CurrentTexture[1]) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if (vertices) + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].TCoords); + else + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), buffer_offset(28)); + } + break; + case EVT_2TCOORDS: + if (vertices) + { + glNormalPointer(GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].Normal); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords); + glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].Pos); + } + else + { + glNormalPointer(GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(12)); + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex2TCoords), buffer_offset(24)); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(28)); + glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(0)); + } + + + if (MultiTextureExtension) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if (vertices) + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords2); + else + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(36)); + } + break; + case EVT_TANGENTS: + if (vertices) + { + glNormalPointer(GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Normal); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].TCoords); + glVertexPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Pos); + } + else + { + glNormalPointer(GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(12)); + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertexTangents), buffer_offset(24)); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(28)); + glVertexPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(0)); + } + + if (MultiTextureExtension) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if (vertices) + glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Tangent); + else + glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(36)); + + extGlClientActiveTexture(GL_TEXTURE2_ARB); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if (vertices) + glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Binormal); + else + glTexCoordPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(48)); + } + break; + } + + renderArray(indexList, primitiveCount, pType, iType); + + if (MultiTextureExtension) + { + if (vType==EVT_TANGENTS) + { + extGlClientActiveTexture(GL_TEXTURE2_ARB); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + } + if ((vType!=EVT_STANDARD) || CurrentTexture[1]) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + } + extGlClientActiveTexture(GL_TEXTURE0_ARB); + } + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); +} + + +void COpenGLDriver::getColorBuffer(const void* vertices, u32 vertexCount, E_VERTEX_TYPE vType) +{ + // convert colors to gl color format. + vertexCount *= 4; //reused as color component count + ColorBuffer.set_used(vertexCount); + u32 i; + + switch (vType) + { + case EVT_STANDARD: + { + const S3DVertex* p = static_cast<const S3DVertex*>(vertices); + for (i=0; i<vertexCount; i+=4) + { + p->Color.toOpenGLColor(&ColorBuffer[i]); + ++p; + } + } + break; + case EVT_2TCOORDS: + { + const S3DVertex2TCoords* p = static_cast<const S3DVertex2TCoords*>(vertices); + for (i=0; i<vertexCount; i+=4) + { + p->Color.toOpenGLColor(&ColorBuffer[i]); + ++p; + } + } + break; + case EVT_TANGENTS: + { + const S3DVertexTangents* p = static_cast<const S3DVertexTangents*>(vertices); + for (i=0; i<vertexCount; i+=4) + { + p->Color.toOpenGLColor(&ColorBuffer[i]); + ++p; + } + } + break; + } +} + + +void COpenGLDriver::renderArray(const void* indexList, u32 primitiveCount, + scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) +{ + GLenum indexSize=0; + + switch (iType) + { + case EIT_16BIT: + { + indexSize=GL_UNSIGNED_SHORT; + break; + } + case EIT_32BIT: + { + indexSize=GL_UNSIGNED_INT; + break; + } + } + + switch (pType) + { + case scene::EPT_POINTS: + case scene::EPT_POINT_SPRITES: + { +#ifdef GL_ARB_point_sprite + if (pType==scene::EPT_POINT_SPRITES && FeatureAvailable[IRR_ARB_point_sprite]) + glEnable(GL_POINT_SPRITE_ARB); +#endif + + // prepare size and attenuation (where supported) + GLfloat particleSize=Material.Thickness; +// if (AntiAlias) +// particleSize=core::clamp(particleSize, DimSmoothedPoint[0], DimSmoothedPoint[1]); +// else + particleSize=core::clamp(particleSize, DimAliasedPoint[0], DimAliasedPoint[1]); +#if defined(GL_VERSION_1_4) || defined(GL_ARB_point_parameters) || defined(GL_EXT_point_parameters) || defined(GL_SGIS_point_parameters) + const float att[] = {1.0f, 1.0f, 0.0f}; +#if defined(GL_VERSION_1_4) + extGlPointParameterfv(GL_POINT_DISTANCE_ATTENUATION, att); +// extGlPointParameterf(GL_POINT_SIZE_MIN,1.f); + extGlPointParameterf(GL_POINT_SIZE_MAX, particleSize); + extGlPointParameterf(GL_POINT_FADE_THRESHOLD_SIZE, 1.0f); +#elif defined(GL_ARB_point_parameters) + extGlPointParameterfv(GL_POINT_DISTANCE_ATTENUATION_ARB, att); +// extGlPointParameterf(GL_POINT_SIZE_MIN_ARB,1.f); + extGlPointParameterf(GL_POINT_SIZE_MAX_ARB, particleSize); + extGlPointParameterf(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 1.0f); +#elif defined(GL_EXT_point_parameters) + extGlPointParameterfv(GL_DISTANCE_ATTENUATION_EXT, att); +// extGlPointParameterf(GL_POINT_SIZE_MIN_EXT,1.f); + extGlPointParameterf(GL_POINT_SIZE_MAX_EXT, particleSize); + extGlPointParameterf(GL_POINT_FADE_THRESHOLD_SIZE_EXT, 1.0f); +#elif defined(GL_SGIS_point_parameters) + extGlPointParameterfv(GL_DISTANCE_ATTENUATION_SGIS, att); +// extGlPointParameterf(GL_POINT_SIZE_MIN_SGIS,1.f); + extGlPointParameterf(GL_POINT_SIZE_MAX_SGIS, particleSize); + extGlPointParameterf(GL_POINT_FADE_THRESHOLD_SIZE_SGIS, 1.0f); +#endif +#endif + glPointSize(particleSize); + +#ifdef GL_ARB_point_sprite + if (pType==scene::EPT_POINT_SPRITES && FeatureAvailable[IRR_ARB_point_sprite]) + glTexEnvf(GL_POINT_SPRITE_ARB,GL_COORD_REPLACE, GL_TRUE); +#endif + glDrawArrays(GL_POINTS, 0, primitiveCount); +#ifdef GL_ARB_point_sprite + if (pType==scene::EPT_POINT_SPRITES && FeatureAvailable[IRR_ARB_point_sprite]) + { + glDisable(GL_POINT_SPRITE_ARB); + glTexEnvf(GL_POINT_SPRITE_ARB,GL_COORD_REPLACE, GL_FALSE); + } +#endif + } + break; + case scene::EPT_LINE_STRIP: + glDrawElements(GL_LINE_STRIP, primitiveCount+1, indexSize, indexList); + break; + case scene::EPT_LINE_LOOP: + glDrawElements(GL_LINE_LOOP, primitiveCount, indexSize, indexList); + break; + case scene::EPT_LINES: + glDrawElements(GL_LINES, primitiveCount*2, indexSize, indexList); + break; + case scene::EPT_TRIANGLE_STRIP: + glDrawElements(GL_TRIANGLE_STRIP, primitiveCount+2, indexSize, indexList); + break; + case scene::EPT_TRIANGLE_FAN: + glDrawElements(GL_TRIANGLE_FAN, primitiveCount+2, indexSize, indexList); + break; + case scene::EPT_TRIANGLES: + glDrawElements(GL_TRIANGLES, primitiveCount*3, indexSize, indexList); + break; + case scene::EPT_QUAD_STRIP: + glDrawElements(GL_QUAD_STRIP, primitiveCount*2+2, indexSize, indexList); + break; + case scene::EPT_QUADS: + glDrawElements(GL_QUADS, primitiveCount*4, indexSize, indexList); + break; + case scene::EPT_POLYGON: + glDrawElements(GL_POLYGON, primitiveCount, indexSize, indexList); + break; + } +} + + +//! draws a vertex primitive list in 2d +void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) +{ + if (!primitiveCount || !vertexCount) + return; + + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::draw2DVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType, iType); + + if (vertices && !FeatureAvailable[IRR_ARB_vertex_array_bgra] && !FeatureAvailable[IRR_EXT_vertex_array_bgra]) + getColorBuffer(vertices, vertexCount, vType); + + // draw everything + this->setActiveTexture(0, Material.getTexture(0)); + if (Material.MaterialType==EMT_ONETEXTURE_BLEND) + { + E_BLEND_FACTOR srcFact; + E_BLEND_FACTOR dstFact; + E_MODULATE_FUNC modulo; + u32 alphaSource; + unpack_textureBlendFunc ( srcFact, dstFact, modulo, alphaSource, Material.MaterialTypeParam); + setRenderStates2DMode(alphaSource&video::EAS_VERTEX_COLOR, (Material.getTexture(0) != 0), (alphaSource&video::EAS_TEXTURE) != 0); + } + else + setRenderStates2DMode(Material.MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA, (Material.getTexture(0) != 0), Material.MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL); + + if (MultiTextureExtension) + extGlClientActiveTexture(GL_TEXTURE0_ARB); + + glEnableClientState(GL_COLOR_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); + if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES)) + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + +//due to missing defines in OSX headers, we have to be more specific with this check +//#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra) +#ifdef GL_BGRA + const GLint colorSize=(FeatureAvailable[IRR_ARB_vertex_array_bgra] || FeatureAvailable[IRR_EXT_vertex_array_bgra])?GL_BGRA:4; +#else + const GLint colorSize=4; +#endif + if (vertices) + { + if (FeatureAvailable[IRR_ARB_vertex_array_bgra] || FeatureAvailable[IRR_EXT_vertex_array_bgra]) + { + switch (vType) + { + case EVT_STANDARD: + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Color); + break; + case EVT_2TCOORDS: + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].Color); + break; + case EVT_TANGENTS: + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Color); + break; + } + } + else + { + // avoid passing broken pointer to OpenGL + _IRR_DEBUG_BREAK_IF(ColorBuffer.size()==0); + glColorPointer(colorSize, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]); + } + } + + switch (vType) + { + case EVT_STANDARD: + if (vertices) + { + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].TCoords); + glVertexPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Pos); + } + else + { + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), buffer_offset(24)); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), buffer_offset(28)); + glVertexPointer(2, GL_FLOAT, sizeof(S3DVertex), 0); + } + + if (MultiTextureExtension && CurrentTexture[1]) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if (vertices) + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].TCoords); + else + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), buffer_offset(28)); + } + break; + case EVT_2TCOORDS: + if (vertices) + { + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords); + glVertexPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].Pos); + } + else + { + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex2TCoords), buffer_offset(24)); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(28)); + glVertexPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(0)); + } + + if (MultiTextureExtension) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if (vertices) + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(static_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords2); + else + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), buffer_offset(36)); + } + break; + case EVT_TANGENTS: + if (vertices) + { + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].TCoords); + glVertexPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), &(static_cast<const S3DVertexTangents*>(vertices))[0].Pos); + } + else + { + glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertexTangents), buffer_offset(24)); + glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(28)); + glVertexPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), buffer_offset(0)); + } + + break; + } + + renderArray(indexList, primitiveCount, pType, iType); + + if (MultiTextureExtension) + { + if ((vType!=EVT_STANDARD) || CurrentTexture[1]) + { + extGlClientActiveTexture(GL_TEXTURE1_ARB); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + } + extGlClientActiveTexture(GL_TEXTURE0_ARB); + } + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); +} + + +//! draws a set of 2d images, using a color and the alpha channel of the +//! texture if desired. +void COpenGLDriver::draw2DImageBatch(const video::ITexture* texture, + const core::array<core::position2d<s32> >& positions, + const core::array<core::rect<s32> >& sourceRects, + const core::rect<s32>* clipRect, + SColor color, + bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + const u32 drawCount = core::min_<u32>(positions.size(), sourceRects.size()); + + const core::dimension2d<u32>& ss = texture->getOriginalSize(); + const f32 invW = 1.f / static_cast<f32>(ss.Width); + const f32 invH = 1.f / static_cast<f32>(ss.Height); + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + + disableTextures(1); + if (!setActiveTexture(0, texture)) + return; + setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture); + + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + glBegin(GL_QUADS); + + for (u32 i=0; i<drawCount; ++i) + { + if (!sourceRects[i].isValid()) + continue; + + core::position2d<s32> targetPos(positions[i]); + core::position2d<s32> sourcePos(sourceRects[i].UpperLeftCorner); + // This needs to be signed as it may go negative. + core::dimension2d<s32> sourceSize(sourceRects[i].getSize()); + if (clipRect) + { + if (targetPos.X < clipRect->UpperLeftCorner.X) + { + sourceSize.Width += targetPos.X - clipRect->UpperLeftCorner.X; + if (sourceSize.Width <= 0) + continue; + + sourcePos.X -= targetPos.X - clipRect->UpperLeftCorner.X; + targetPos.X = clipRect->UpperLeftCorner.X; + } + + if (targetPos.X + sourceSize.Width > clipRect->LowerRightCorner.X) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - clipRect->LowerRightCorner.X; + if (sourceSize.Width <= 0) + continue; + } + + if (targetPos.Y < clipRect->UpperLeftCorner.Y) + { + sourceSize.Height += targetPos.Y - clipRect->UpperLeftCorner.Y; + if (sourceSize.Height <= 0) + continue; + + sourcePos.Y -= targetPos.Y - clipRect->UpperLeftCorner.Y; + targetPos.Y = clipRect->UpperLeftCorner.Y; + } + + if (targetPos.Y + sourceSize.Height > clipRect->LowerRightCorner.Y) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - clipRect->LowerRightCorner.Y; + if (sourceSize.Height <= 0) + continue; + } + } + + // clip these coordinates + + if (targetPos.X<0) + { + sourceSize.Width += targetPos.X; + if (sourceSize.Width <= 0) + continue; + + sourcePos.X -= targetPos.X; + targetPos.X = 0; + } + + if (targetPos.X + sourceSize.Width > (s32)renderTargetSize.Width) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - renderTargetSize.Width; + if (sourceSize.Width <= 0) + continue; + } + + if (targetPos.Y<0) + { + sourceSize.Height += targetPos.Y; + if (sourceSize.Height <= 0) + continue; + + sourcePos.Y -= targetPos.Y; + targetPos.Y = 0; + } + + if (targetPos.Y + sourceSize.Height > (s32)renderTargetSize.Height) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - renderTargetSize.Height; + if (sourceSize.Height <= 0) + continue; + } + + // ok, we've clipped everything. + // now draw it. + + const core::rect<f32> tcoords( + sourcePos.X * invW, + sourcePos.Y * invH, + (sourcePos.X + sourceSize.Width) * invW, + (sourcePos.Y + sourceSize.Height) * invH); + + const core::rect<s32> poss(targetPos, sourceSize); + + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(poss.UpperLeftCorner.X), GLfloat(poss.UpperLeftCorner.Y)); + + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(poss.LowerRightCorner.X), GLfloat(poss.UpperLeftCorner.Y)); + + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(poss.LowerRightCorner.X), GLfloat(poss.LowerRightCorner.Y)); + + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(poss.UpperLeftCorner.X), GLfloat(poss.LowerRightCorner.Y)); + } + glEnd(); +} + + +//! draws a 2d image, using a color and the alpha channel of the texture if +//! desired. The image is drawn at pos, clipped against clipRect (if != 0). +//! Only the subtexture defined by sourceRect is used. +void COpenGLDriver::draw2DImage(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + if (!sourceRect.isValid()) + return; + + core::position2d<s32> targetPos(pos); + core::position2d<s32> sourcePos(sourceRect.UpperLeftCorner); + // This needs to be signed as it may go negative. + core::dimension2d<s32> sourceSize(sourceRect.getSize()); + if (clipRect) + { + if (targetPos.X < clipRect->UpperLeftCorner.X) + { + sourceSize.Width += targetPos.X - clipRect->UpperLeftCorner.X; + if (sourceSize.Width <= 0) + return; + + sourcePos.X -= targetPos.X - clipRect->UpperLeftCorner.X; + targetPos.X = clipRect->UpperLeftCorner.X; + } + + if (targetPos.X + sourceSize.Width > clipRect->LowerRightCorner.X) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - clipRect->LowerRightCorner.X; + if (sourceSize.Width <= 0) + return; + } + + if (targetPos.Y < clipRect->UpperLeftCorner.Y) + { + sourceSize.Height += targetPos.Y - clipRect->UpperLeftCorner.Y; + if (sourceSize.Height <= 0) + return; + + sourcePos.Y -= targetPos.Y - clipRect->UpperLeftCorner.Y; + targetPos.Y = clipRect->UpperLeftCorner.Y; + } + + if (targetPos.Y + sourceSize.Height > clipRect->LowerRightCorner.Y) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - clipRect->LowerRightCorner.Y; + if (sourceSize.Height <= 0) + return; + } + } + + // clip these coordinates + + if (targetPos.X<0) + { + sourceSize.Width += targetPos.X; + if (sourceSize.Width <= 0) + return; + + sourcePos.X -= targetPos.X; + targetPos.X = 0; + } + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + + if (targetPos.X + sourceSize.Width > (s32)renderTargetSize.Width) + { + sourceSize.Width -= (targetPos.X + sourceSize.Width) - renderTargetSize.Width; + if (sourceSize.Width <= 0) + return; + } + + if (targetPos.Y<0) + { + sourceSize.Height += targetPos.Y; + if (sourceSize.Height <= 0) + return; + + sourcePos.Y -= targetPos.Y; + targetPos.Y = 0; + } + + if (targetPos.Y + sourceSize.Height > (s32)renderTargetSize.Height) + { + sourceSize.Height -= (targetPos.Y + sourceSize.Height) - renderTargetSize.Height; + if (sourceSize.Height <= 0) + return; + } + + // ok, we've clipped everything. + // now draw it. + + const core::dimension2d<u32>& ss = texture->getOriginalSize(); + const f32 invW = 1.f / static_cast<f32>(ss.Width); + const f32 invH = 1.f / static_cast<f32>(ss.Height); + const core::rect<f32> tcoords( + sourcePos.X * invW, + sourcePos.Y * invH, + (sourcePos.X + sourceSize.Width) * invW, + (sourcePos.Y + sourceSize.Height) * invH); + + const core::rect<s32> poss(targetPos, sourceSize); + + disableTextures(1); + if (!setActiveTexture(0, texture)) + return; + setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture); + + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + glBegin(GL_QUADS); + + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(poss.UpperLeftCorner.X), GLfloat(poss.UpperLeftCorner.Y)); + + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(poss.LowerRightCorner.X), GLfloat(poss.UpperLeftCorner.Y)); + + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(poss.LowerRightCorner.X), GLfloat(poss.LowerRightCorner.Y)); + + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(poss.UpperLeftCorner.X), GLfloat(poss.LowerRightCorner.Y)); + + glEnd(); +} + + +//! The same, but with a four element array of colors, one for each vertex +void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect, + const video::SColor* const colors, bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + const core::dimension2d<u32>& ss = texture->getOriginalSize(); + const f32 invW = 1.f / static_cast<f32>(ss.Width); + const f32 invH = 1.f / static_cast<f32>(ss.Height); + const core::rect<f32> tcoords( + sourceRect.UpperLeftCorner.X * invW, + sourceRect.UpperLeftCorner.Y * invH, + sourceRect.LowerRightCorner.X * invW, + sourceRect.LowerRightCorner.Y *invH); + + const video::SColor temp[4] = + { + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF + }; + + const video::SColor* const useColor = colors ? colors : temp; + + disableTextures(1); + setActiveTexture(0, texture); + setRenderStates2DMode(useColor[0].getAlpha()<255 || useColor[1].getAlpha()<255 || + useColor[2].getAlpha()<255 || useColor[3].getAlpha()<255, + true, useAlphaChannelOfTexture); + + if (clipRect) + { + if (!clipRect->isValid()) + return; + + glEnable(GL_SCISSOR_TEST); + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + glScissor(clipRect->UpperLeftCorner.X, renderTargetSize.Height-clipRect->LowerRightCorner.Y, + clipRect->getWidth(), clipRect->getHeight()); + } + + glBegin(GL_QUADS); + + glColor4ub(useColor[0].getRed(), useColor[0].getGreen(), useColor[0].getBlue(), useColor[0].getAlpha()); + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(destRect.UpperLeftCorner.X), GLfloat(destRect.UpperLeftCorner.Y)); + + glColor4ub(useColor[3].getRed(), useColor[3].getGreen(), useColor[3].getBlue(), useColor[3].getAlpha()); + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(destRect.LowerRightCorner.X), GLfloat(destRect.UpperLeftCorner.Y)); + + glColor4ub(useColor[2].getRed(), useColor[2].getGreen(), useColor[2].getBlue(), useColor[2].getAlpha()); + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(destRect.LowerRightCorner.X), GLfloat(destRect.LowerRightCorner.Y)); + + glColor4ub(useColor[1].getRed(), useColor[1].getGreen(), useColor[1].getBlue(), useColor[1].getAlpha()); + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(destRect.UpperLeftCorner.X), GLfloat(destRect.LowerRightCorner.Y)); + + glEnd(); + + if (clipRect) + glDisable(GL_SCISSOR_TEST); +} + + +//! draws a set of 2d images, using a color and the alpha channel of the +//! texture if desired. The images are drawn beginning at pos and concatenated +//! in one line. All drawings are clipped against clipRect (if != 0). +//! The subtextures are defined by the array of sourceRects and are chosen +//! by the indices given. +void COpenGLDriver::draw2DImage(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::array<core::rect<s32> >& sourceRects, + const core::array<s32>& indices, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + if (!texture) + return; + + disableTextures(1); + if (!setActiveTexture(0, texture)) + return; + setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture); + + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + if (clipRect) + { + if (!clipRect->isValid()) + return; + + glEnable(GL_SCISSOR_TEST); + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + glScissor(clipRect->UpperLeftCorner.X, renderTargetSize.Height-clipRect->LowerRightCorner.Y, + clipRect->getWidth(),clipRect->getHeight()); + } + + const core::dimension2d<u32>& ss = texture->getOriginalSize(); + core::position2d<s32> targetPos(pos); + const f32 invW = 1.f / static_cast<f32>(ss.Width); + const f32 invH = 1.f / static_cast<f32>(ss.Height); + + for (u32 i=0; i<indices.size(); ++i) + { + const s32 currentIndex = indices[i]; + if (!sourceRects[currentIndex].isValid()) + break; + + const core::rect<f32> tcoords( + sourceRects[currentIndex].UpperLeftCorner.X * invW, + sourceRects[currentIndex].UpperLeftCorner.Y * invH, + sourceRects[currentIndex].LowerRightCorner.X * invW, + sourceRects[currentIndex].LowerRightCorner.Y * invH); + + const core::rect<s32> poss(targetPos, sourceRects[currentIndex].getSize()); + + glBegin(GL_QUADS); + + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(poss.UpperLeftCorner.X), GLfloat(poss.UpperLeftCorner.Y)); + + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.UpperLeftCorner.Y); + glVertex2f(GLfloat(poss.LowerRightCorner.X), GLfloat(poss.UpperLeftCorner.Y)); + + glTexCoord2f(tcoords.LowerRightCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(poss.LowerRightCorner.X), GLfloat(poss.LowerRightCorner.Y)); + + glTexCoord2f(tcoords.UpperLeftCorner.X, tcoords.LowerRightCorner.Y); + glVertex2f(GLfloat(poss.UpperLeftCorner.X), GLfloat(poss.LowerRightCorner.Y)); + + glEnd(); + targetPos.X += sourceRects[currentIndex].getWidth(); + } + if (clipRect) + glDisable(GL_SCISSOR_TEST); +} + + +//! draw a 2d rectangle +void COpenGLDriver::draw2DRectangle(SColor color, const core::rect<s32>& position, + const core::rect<s32>* clip) +{ + disableTextures(); + setRenderStates2DMode(color.getAlpha() < 255, false, false); + + core::rect<s32> pos = position; + + if (clip) + pos.clipAgainst(*clip); + + if (!pos.isValid()) + return; + + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + glRectf(GLfloat(pos.UpperLeftCorner.X), GLfloat(pos.UpperLeftCorner.Y), + GLfloat(pos.LowerRightCorner.X), GLfloat(pos.LowerRightCorner.Y)); +} + + +//! draw an 2d rectangle +void COpenGLDriver::draw2DRectangle(const core::rect<s32>& position, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip) +{ + core::rect<s32> pos = position; + + if (clip) + pos.clipAgainst(*clip); + + if (!pos.isValid()) + return; + + disableTextures(); + + setRenderStates2DMode(colorLeftUp.getAlpha() < 255 || + colorRightUp.getAlpha() < 255 || + colorLeftDown.getAlpha() < 255 || + colorRightDown.getAlpha() < 255, false, false); + + glBegin(GL_QUADS); + glColor4ub(colorLeftUp.getRed(), colorLeftUp.getGreen(), + colorLeftUp.getBlue(), colorLeftUp.getAlpha()); + glVertex2f(GLfloat(pos.UpperLeftCorner.X), GLfloat(pos.UpperLeftCorner.Y)); + + glColor4ub(colorRightUp.getRed(), colorRightUp.getGreen(), + colorRightUp.getBlue(), colorRightUp.getAlpha()); + glVertex2f(GLfloat(pos.LowerRightCorner.X), GLfloat(pos.UpperLeftCorner.Y)); + + glColor4ub(colorRightDown.getRed(), colorRightDown.getGreen(), + colorRightDown.getBlue(), colorRightDown.getAlpha()); + glVertex2f(GLfloat(pos.LowerRightCorner.X), GLfloat(pos.LowerRightCorner.Y)); + + glColor4ub(colorLeftDown.getRed(), colorLeftDown.getGreen(), + colorLeftDown.getBlue(), colorLeftDown.getAlpha()); + glVertex2f(GLfloat(pos.UpperLeftCorner.X), GLfloat(pos.LowerRightCorner.Y)); + + glEnd(); +} + + +//! Draws a 2d line. +void COpenGLDriver::draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, SColor color) +{ + if (start==end) + drawPixel(start.X, start.Y, color); + else + { + disableTextures(); + setRenderStates2DMode(color.getAlpha() < 255, false, false); + + glBegin(GL_LINES); + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + GLfloat x=(GLfloat)start.X; + GLfloat y=(GLfloat)start.Y; + if (x>end.X) + x += 0.5f; + if (y>end.Y) + y += 0.5f; + glVertex2f(GLfloat(x), GLfloat(y)); + x=(GLfloat)end.X; + y=(GLfloat)end.Y; + if (x>start.X) + x += 0.5f; + if (y>start.Y) + y += 0.5f; + glVertex2f(GLfloat(x), GLfloat(y)); + glEnd(); + } +} + +//! Draws a pixel +void COpenGLDriver::drawPixel(u32 x, u32 y, const SColor &color) +{ + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + if (x > (u32)renderTargetSize.Width || y > (u32)renderTargetSize.Height) + return; + + disableTextures(); + setRenderStates2DMode(color.getAlpha() < 255, false, false); + + glBegin(GL_POINTS); + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + glVertex2i(x, y); + glEnd(); +} + +bool COpenGLDriver::setActiveTexture(u32 stage, const video::ITexture* texture) +{ + if (stage >= MaxSupportedTextures) + return false; + + if (CurrentTexture[stage]==texture) + return true; + + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB + stage); + + CurrentTexture.set(stage,texture); + + if (!texture) + { + glDisable(GL_TEXTURE_2D); + return true; + } + else + { + if (texture->getDriverType() != EDT_OPENGL) + { + glDisable(GL_TEXTURE_2D); + CurrentTexture.set(stage, 0); + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, + static_cast<const COpenGLTexture*>(texture)->getOpenGLTextureName()); + } + return true; +} + + +//! disables all textures beginning with the optional fromStage parameter. Otherwise all texture stages are disabled. +//! Returns whether disabling was successful or not. +bool COpenGLDriver::disableTextures(u32 fromStage) +{ + bool result=true; + for (u32 i=fromStage; i<MaxSupportedTextures; ++i) + result &= setActiveTexture(i, 0); + return result; +} + + +//! creates a matrix in supplied GLfloat array to pass to OpenGL +inline void COpenGLDriver::getGLMatrix(GLfloat gl_matrix[16], const core::matrix4& m) +{ + memcpy(gl_matrix, m.pointer(), 16 * sizeof(f32)); +} + + +//! creates a opengltexturematrix from a D3D style texture matrix +inline void COpenGLDriver::getGLTextureMatrix(GLfloat *o, const core::matrix4& m) +{ + o[0] = m[0]; + o[1] = m[1]; + o[2] = 0.f; + o[3] = 0.f; + + o[4] = m[4]; + o[5] = m[5]; + o[6] = 0.f; + o[7] = 0.f; + + o[8] = 0.f; + o[9] = 0.f; + o[10] = 1.f; + o[11] = 0.f; + + o[12] = m[8]; + o[13] = m[9]; + o[14] = 0.f; + o[15] = 1.f; +} + + +//! returns a device dependent texture from a software surface (IImage) +video::ITexture* COpenGLDriver::createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData) +{ + return new COpenGLTexture(surface, name, mipmapData, this); +} + + +//! Sets a material. All 3d drawing functions draw geometry now using this material. +void COpenGLDriver::setMaterial(const SMaterial& material) +{ + Material = material; + OverrideMaterial.apply(Material); + + for (s32 i = MaxTextureUnits-1; i>= 0; --i) + { + setActiveTexture(i, material.getTexture(i)); + setTransform ((E_TRANSFORMATION_STATE) (ETS_TEXTURE_0 + i), + Material.getTextureMatrix(i)); + } +} + + +//! prints error if an error happened. +bool COpenGLDriver::testGLError() +{ +#ifdef _DEBUG + GLenum g = glGetError(); + switch (g) + { + case GL_NO_ERROR: + return false; + case GL_INVALID_ENUM: + os::Printer::log("GL_INVALID_ENUM", ELL_ERROR); break; + case GL_INVALID_VALUE: + os::Printer::log("GL_INVALID_VALUE", ELL_ERROR); break; + case GL_INVALID_OPERATION: + os::Printer::log("GL_INVALID_OPERATION", ELL_ERROR); break; + case GL_STACK_OVERFLOW: + os::Printer::log("GL_STACK_OVERFLOW", ELL_ERROR); break; + case GL_STACK_UNDERFLOW: + os::Printer::log("GL_STACK_UNDERFLOW", ELL_ERROR); break; + case GL_OUT_OF_MEMORY: + os::Printer::log("GL_OUT_OF_MEMORY", ELL_ERROR); break; + case GL_TABLE_TOO_LARGE: + os::Printer::log("GL_TABLE_TOO_LARGE", ELL_ERROR); break; +#if defined(GL_EXT_framebuffer_object) + case GL_INVALID_FRAMEBUFFER_OPERATION_EXT: + os::Printer::log("GL_INVALID_FRAMEBUFFER_OPERATION", ELL_ERROR); break; +#endif + }; +// _IRR_DEBUG_BREAK_IF(true); + return true; +#else + return false; +#endif +} + + +//! sets the needed renderstates +void COpenGLDriver::setRenderStates3DMode() +{ + if (CurrentRenderMode != ERM_3D) + { + // Reset Texture Stages + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + // switch back the matrices + glMatrixMode(GL_MODELVIEW); + glLoadMatrixf((Matrices[ETS_VIEW] * Matrices[ETS_WORLD]).pointer()); + + glMatrixMode(GL_PROJECTION); + glLoadMatrixf(Matrices[ETS_PROJECTION].pointer()); + + ResetRenderStates = true; +#ifdef GL_EXT_clip_volume_hint + if (FeatureAvailable[IRR_EXT_clip_volume_hint]) + glHint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT, GL_NICEST); +#endif + } + + if (ResetRenderStates || LastMaterial != Material) + { + // unset old material + + if (LastMaterial.MaterialType != Material.MaterialType && + static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size()) + MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); + + // set new material. + if (static_cast<u32>(Material.MaterialType) < MaterialRenderers.size()) + MaterialRenderers[Material.MaterialType].Renderer->OnSetMaterial( + Material, LastMaterial, ResetRenderStates, this); + + LastMaterial = Material; + ResetRenderStates = false; + } + + if (static_cast<u32>(Material.MaterialType) < MaterialRenderers.size()) + MaterialRenderers[Material.MaterialType].Renderer->OnRender(this, video::EVT_STANDARD); + + CurrentRenderMode = ERM_3D; +} + + +//! Get native wrap mode value +GLint COpenGLDriver::getTextureWrapMode(const u8 clamp) +{ + GLint mode=GL_REPEAT; + switch (clamp) + { + case ETC_REPEAT: + mode=GL_REPEAT; + break; + case ETC_CLAMP: + mode=GL_CLAMP; + break; + case ETC_CLAMP_TO_EDGE: +#ifdef GL_VERSION_1_2 + if (Version>101) + mode=GL_CLAMP_TO_EDGE; + else +#endif +#ifdef GL_SGIS_texture_edge_clamp + if (FeatureAvailable[IRR_SGIS_texture_edge_clamp]) + mode=GL_CLAMP_TO_EDGE_SGIS; + else +#endif + // fallback + mode=GL_CLAMP; + break; + case ETC_CLAMP_TO_BORDER: +#ifdef GL_VERSION_1_3 + if (Version>102) + mode=GL_CLAMP_TO_BORDER; + else +#endif +#ifdef GL_ARB_texture_border_clamp + if (FeatureAvailable[IRR_ARB_texture_border_clamp]) + mode=GL_CLAMP_TO_BORDER_ARB; + else +#endif +#ifdef GL_SGIS_texture_border_clamp + if (FeatureAvailable[IRR_SGIS_texture_border_clamp]) + mode=GL_CLAMP_TO_BORDER_SGIS; + else +#endif + // fallback + mode=GL_CLAMP; + break; + case ETC_MIRROR: +#ifdef GL_VERSION_1_4 + if (Version>103) + mode=GL_MIRRORED_REPEAT; + else +#endif +#ifdef GL_ARB_texture_border_clamp + if (FeatureAvailable[IRR_ARB_texture_mirrored_repeat]) + mode=GL_MIRRORED_REPEAT_ARB; + else +#endif +#ifdef GL_IBM_texture_mirrored_repeat + if (FeatureAvailable[IRR_IBM_texture_mirrored_repeat]) + mode=GL_MIRRORED_REPEAT_IBM; + else +#endif + mode=GL_REPEAT; + break; + case ETC_MIRROR_CLAMP: +#ifdef GL_EXT_texture_mirror_clamp + if (FeatureAvailable[IRR_EXT_texture_mirror_clamp]) + mode=GL_MIRROR_CLAMP_EXT; + else +#endif +#if defined(GL_ATI_texture_mirror_once) + if (FeatureAvailable[IRR_ATI_texture_mirror_once]) + mode=GL_MIRROR_CLAMP_ATI; + else +#endif + mode=GL_CLAMP; + break; + case ETC_MIRROR_CLAMP_TO_EDGE: +#ifdef GL_EXT_texture_mirror_clamp + if (FeatureAvailable[IRR_EXT_texture_mirror_clamp]) + mode=GL_MIRROR_CLAMP_TO_EDGE_EXT; + else +#endif +#if defined(GL_ATI_texture_mirror_once) + if (FeatureAvailable[IRR_ATI_texture_mirror_once]) + mode=GL_MIRROR_CLAMP_TO_EDGE_ATI; + else +#endif + mode=GL_CLAMP; + break; + case ETC_MIRROR_CLAMP_TO_BORDER: +#ifdef GL_EXT_texture_mirror_clamp + if (FeatureAvailable[IRR_EXT_texture_mirror_clamp]) + mode=GL_MIRROR_CLAMP_TO_BORDER_EXT; + else +#endif + mode=GL_CLAMP; + break; + } + return mode; +} + + +void COpenGLDriver::setWrapMode(const SMaterial& material) +{ + // texture address mode + // Has to be checked always because it depends on the textures + for (u32 u=0; u<MaxTextureUnits; ++u) + { + if (!CurrentTexture[u]) + continue; + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB + u); + else if (u>0) + break; // stop loop + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, getTextureWrapMode(material.TextureLayer[u].TextureWrapU)); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, getTextureWrapMode(material.TextureLayer[u].TextureWrapV)); + } +} + + +//! Can be called by an IMaterialRenderer to make its work easier. +void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, + bool resetAllRenderStates) +{ + if (resetAllRenderStates || + lastmaterial.ColorMaterial != material.ColorMaterial) + { + switch (material.ColorMaterial) + { + case ECM_NONE: + glDisable(GL_COLOR_MATERIAL); + break; + case ECM_DIFFUSE: + glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); + break; + case ECM_AMBIENT: + glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT); + break; + case ECM_EMISSIVE: + glColorMaterial(GL_FRONT_AND_BACK, GL_EMISSION); + break; + case ECM_SPECULAR: + glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); + break; + case ECM_DIFFUSE_AND_AMBIENT: + glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); + break; + } + if (material.ColorMaterial != ECM_NONE) + glEnable(GL_COLOR_MATERIAL); + } + + if (resetAllRenderStates || + lastmaterial.AmbientColor != material.AmbientColor || + lastmaterial.DiffuseColor != material.DiffuseColor || + lastmaterial.EmissiveColor != material.EmissiveColor || + lastmaterial.ColorMaterial != material.ColorMaterial) + { + GLfloat color[4]; + + const f32 inv = 1.0f / 255.0f; + + if ((material.ColorMaterial != video::ECM_AMBIENT) && + (material.ColorMaterial != video::ECM_DIFFUSE_AND_AMBIENT)) + { + color[0] = material.AmbientColor.getRed() * inv; + color[1] = material.AmbientColor.getGreen() * inv; + color[2] = material.AmbientColor.getBlue() * inv; + color[3] = material.AmbientColor.getAlpha() * inv; + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, color); + } + + if ((material.ColorMaterial != video::ECM_DIFFUSE) && + (material.ColorMaterial != video::ECM_DIFFUSE_AND_AMBIENT)) + { + color[0] = material.DiffuseColor.getRed() * inv; + color[1] = material.DiffuseColor.getGreen() * inv; + color[2] = material.DiffuseColor.getBlue() * inv; + color[3] = material.DiffuseColor.getAlpha() * inv; + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, color); + } + + if (material.ColorMaterial != video::ECM_EMISSIVE) + { + color[0] = material.EmissiveColor.getRed() * inv; + color[1] = material.EmissiveColor.getGreen() * inv; + color[2] = material.EmissiveColor.getBlue() * inv; + color[3] = material.EmissiveColor.getAlpha() * inv; + glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, color); + } + } + + if (resetAllRenderStates || + lastmaterial.SpecularColor != material.SpecularColor || + lastmaterial.Shininess != material.Shininess || + lastmaterial.ColorMaterial != material.ColorMaterial) + { + GLfloat color[4]={0.f,0.f,0.f,1.f}; + const f32 inv = 1.0f / 255.0f; + + glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, material.Shininess); + // disable Specular colors if no shininess is set + if ((material.Shininess != 0.0f) && + (material.ColorMaterial != video::ECM_SPECULAR)) + { +#ifdef GL_EXT_separate_specular_color + if (FeatureAvailable[IRR_EXT_separate_specular_color]) + glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); +#endif + color[0] = material.SpecularColor.getRed() * inv; + color[1] = material.SpecularColor.getGreen() * inv; + color[2] = material.SpecularColor.getBlue() * inv; + color[3] = material.SpecularColor.getAlpha() * inv; + } +#ifdef GL_EXT_separate_specular_color + else if (FeatureAvailable[IRR_EXT_separate_specular_color]) + glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); +#endif + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color); + } + + // Texture filter + // Has to be checked always because it depends on the textures + // Filtering has to be set for each texture layer + for (u32 i=0; i<MaxTextureUnits; ++i) + { + if (!CurrentTexture[i]) + continue; + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB + i); + else if (i>0) + break; + +#ifdef GL_EXT_texture_lod_bias + if (FeatureAvailable[IRR_EXT_texture_lod_bias]) + { + if (material.TextureLayer[i].LODBias) + { + const float tmp = core::clamp(material.TextureLayer[i].LODBias * 0.125f, -MaxTextureLODBias, MaxTextureLODBias); + glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, tmp); + } + else + glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.f); + } +#endif + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, + (material.TextureLayer[i].BilinearFilter || material.TextureLayer[i].TrilinearFilter) ? GL_LINEAR : GL_NEAREST); + + if (material.UseMipMaps && CurrentTexture[i]->hasMipMaps()) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + material.TextureLayer[i].TrilinearFilter ? GL_LINEAR_MIPMAP_LINEAR : + material.TextureLayer[i].BilinearFilter ? GL_LINEAR_MIPMAP_NEAREST : + GL_NEAREST_MIPMAP_NEAREST); + else + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + (material.TextureLayer[i].BilinearFilter || material.TextureLayer[i].TrilinearFilter) ? GL_LINEAR : GL_NEAREST); + +#ifdef GL_EXT_texture_filter_anisotropic + if (FeatureAvailable[IRR_EXT_texture_filter_anisotropic]) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, + material.TextureLayer[i].AnisotropicFilter>1 ? core::min_(MaxAnisotropy, material.TextureLayer[i].AnisotropicFilter) : 1); +#endif + } + + // fillmode + if (resetAllRenderStates || (lastmaterial.Wireframe != material.Wireframe) || (lastmaterial.PointCloud != material.PointCloud)) + glPolygonMode(GL_FRONT_AND_BACK, material.Wireframe ? GL_LINE : material.PointCloud? GL_POINT : GL_FILL); + + // shademode + if (resetAllRenderStates || (lastmaterial.GouraudShading != material.GouraudShading)) + { + if (material.GouraudShading) + glShadeModel(GL_SMOOTH); + else + glShadeModel(GL_FLAT); + } + + // lighting + if (resetAllRenderStates || (lastmaterial.Lighting != material.Lighting)) + { + if (material.Lighting) + glEnable(GL_LIGHTING); + else + glDisable(GL_LIGHTING); + } + + // zbuffer + if (resetAllRenderStates || lastmaterial.ZBuffer != material.ZBuffer) + { + switch (material.ZBuffer) + { + case ECFN_NEVER: + glDisable(GL_DEPTH_TEST); + break; + case ECFN_LESSEQUAL: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LEQUAL); + break; + case ECFN_EQUAL: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_EQUAL); + break; + case ECFN_LESS: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + break; + case ECFN_NOTEQUAL: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_NOTEQUAL); + break; + case ECFN_GREATEREQUAL: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_GEQUAL); + break; + case ECFN_GREATER: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_GREATER); + break; + case ECFN_ALWAYS: + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_ALWAYS); + break; + } + } + + // zwrite +// if (resetAllRenderStates || lastmaterial.ZWriteEnable != material.ZWriteEnable) + { + if (material.ZWriteEnable && (AllowZWriteOnTransparent || !material.isTransparent())) + { + glDepthMask(GL_TRUE); + } + else + glDepthMask(GL_FALSE); + } + + // back face culling + if (resetAllRenderStates || (lastmaterial.FrontfaceCulling != material.FrontfaceCulling) || (lastmaterial.BackfaceCulling != material.BackfaceCulling)) + { + if ((material.FrontfaceCulling) && (material.BackfaceCulling)) + { + glCullFace(GL_FRONT_AND_BACK); + glEnable(GL_CULL_FACE); + } + else + if (material.BackfaceCulling) + { + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + } + else + if (material.FrontfaceCulling) + { + glCullFace(GL_FRONT); + glEnable(GL_CULL_FACE); + } + else + glDisable(GL_CULL_FACE); + } + + // fog + if (resetAllRenderStates || lastmaterial.FogEnable != material.FogEnable) + { + if (material.FogEnable) + glEnable(GL_FOG); + else + glDisable(GL_FOG); + } + + // normalization + if (resetAllRenderStates || lastmaterial.NormalizeNormals != material.NormalizeNormals) + { + if (material.NormalizeNormals) + glEnable(GL_NORMALIZE); + else + glDisable(GL_NORMALIZE); + } + + // Color Mask + if (resetAllRenderStates || lastmaterial.ColorMask != material.ColorMask) + { + glColorMask( + (material.ColorMask & ECP_RED)?GL_TRUE:GL_FALSE, + (material.ColorMask & ECP_GREEN)?GL_TRUE:GL_FALSE, + (material.ColorMask & ECP_BLUE)?GL_TRUE:GL_FALSE, + (material.ColorMask & ECP_ALPHA)?GL_TRUE:GL_FALSE); + } + + if (queryFeature(EVDF_BLEND_OPERATIONS) && + (resetAllRenderStates|| lastmaterial.BlendOperation != material.BlendOperation)) + { + if (material.BlendOperation==EBO_NONE) + glDisable(GL_BLEND); + else + { + glEnable(GL_BLEND); +#if defined(GL_EXT_blend_subtract) || defined(GL_EXT_blend_minmax) || defined(GL_EXT_blend_logic_op) || defined(GL_VERSION_1_2) + switch (material.BlendOperation) + { + case EBO_SUBTRACT: +#if defined(GL_EXT_blend_subtract) + if (FeatureAvailable[IRR_EXT_blend_subtract] || (Version>=120)) + extGlBlendEquation(GL_FUNC_SUBTRACT_EXT); +#elif defined(GL_VERSION_1_2) + if (Version>=120) + extGlBlendEquation(GL_FUNC_SUBTRACT); +#endif + break; + case EBO_REVSUBTRACT: +#if defined(GL_EXT_blend_subtract) + if (FeatureAvailable[IRR_EXT_blend_subtract] || (Version>=120)) + extGlBlendEquation(GL_FUNC_REVERSE_SUBTRACT_EXT); +#elif defined(GL_VERSION_1_2) + if (Version>=120) + extGlBlendEquation(GL_FUNC_REVERSE_SUBTRACT); +#endif + break; + case EBO_MIN: +#if defined(GL_EXT_blend_minmax) + if (FeatureAvailable[IRR_EXT_blend_minmax] || (Version>=120)) + extGlBlendEquation(GL_MIN_EXT); +#elif defined(GL_VERSION_1_2) + if (Version>=120) + extGlBlendEquation(GL_MIN); +#endif + break; + case EBO_MAX: +#if defined(GL_EXT_blend_minmax) + if (FeatureAvailable[IRR_EXT_blend_minmax] || (Version>=120)) + extGlBlendEquation(GL_MAX_EXT); +#elif defined(GL_VERSION_1_2) + if (Version>=120) + extGlBlendEquation(GL_MAX); +#endif + break; + case EBO_MIN_FACTOR: +#if defined(GL_AMD_blend_minmax_factor) + if (FeatureAvailable[IRR_AMD_blend_minmax_factor]) + extGlBlendEquation(GL_FACTOR_MIN_AMD); +#endif + // fallback in case of missing extension +#if defined(GL_VERSION_1_2) +#if defined(GL_AMD_blend_minmax_factor) + else +#endif + if (Version>=120) + extGlBlendEquation(GL_MIN); +#endif + break; + case EBO_MAX_FACTOR: +#if defined(GL_AMD_blend_minmax_factor) + if (FeatureAvailable[IRR_AMD_blend_minmax_factor]) + extGlBlendEquation(GL_FACTOR_MAX_AMD); +#endif + // fallback in case of missing extension +#if defined(GL_VERSION_1_2) +#if defined(GL_AMD_blend_minmax_factor) + else +#endif + if (Version>=120) + extGlBlendEquation(GL_MAX); +#endif + break; + case EBO_MIN_ALPHA: +#if defined(GL_SGIX_blend_alpha_minmax) + if (FeatureAvailable[IRR_SGIX_blend_alpha_minmax]) + extGlBlendEquation(GL_ALPHA_MIN_SGIX); + // fallback in case of missing extension + else + if (FeatureAvailable[IRR_EXT_blend_minmax]) + extGlBlendEquation(GL_MIN_EXT); +#endif + break; + case EBO_MAX_ALPHA: +#if defined(GL_SGIX_blend_alpha_minmax) + if (FeatureAvailable[IRR_SGIX_blend_alpha_minmax]) + extGlBlendEquation(GL_ALPHA_MAX_SGIX); + // fallback in case of missing extension + else + if (FeatureAvailable[IRR_EXT_blend_minmax]) + extGlBlendEquation(GL_MAX_EXT); +#endif + break; + default: +#if defined(GL_EXT_blend_subtract) || defined(GL_EXT_blend_minmax) || defined(GL_EXT_blend_logic_op) + extGlBlendEquation(GL_FUNC_ADD_EXT); +#elif defined(GL_VERSION_1_2) + extGlBlendEquation(GL_FUNC_ADD); +#endif + break; + } +#endif + } + } + + // Polygon Offset + if (queryFeature(EVDF_POLYGON_OFFSET) && (resetAllRenderStates || + lastmaterial.PolygonOffsetDirection != material.PolygonOffsetDirection || + lastmaterial.PolygonOffsetFactor != material.PolygonOffsetFactor)) + { + glDisable(lastmaterial.Wireframe?GL_POLYGON_OFFSET_LINE:lastmaterial.PointCloud?GL_POLYGON_OFFSET_POINT:GL_POLYGON_OFFSET_FILL); + if (material.PolygonOffsetFactor) + { + glDisable(material.Wireframe?GL_POLYGON_OFFSET_LINE:material.PointCloud?GL_POLYGON_OFFSET_POINT:GL_POLYGON_OFFSET_FILL); + glEnable(material.Wireframe?GL_POLYGON_OFFSET_LINE:material.PointCloud?GL_POLYGON_OFFSET_POINT:GL_POLYGON_OFFSET_FILL); + } + if (material.PolygonOffsetDirection==EPO_BACK) + glPolygonOffset(1.0f, (GLfloat)material.PolygonOffsetFactor); + else + glPolygonOffset(-1.0f, (GLfloat)-material.PolygonOffsetFactor); + } + + // thickness + if (resetAllRenderStates || lastmaterial.Thickness != material.Thickness) + { + if (AntiAlias) + { +// glPointSize(core::clamp(static_cast<GLfloat>(material.Thickness), DimSmoothedPoint[0], DimSmoothedPoint[1])); + // we don't use point smoothing + glPointSize(core::clamp(static_cast<GLfloat>(material.Thickness), DimAliasedPoint[0], DimAliasedPoint[1])); + glLineWidth(core::clamp(static_cast<GLfloat>(material.Thickness), DimSmoothedLine[0], DimSmoothedLine[1])); + } + else + { + glPointSize(core::clamp(static_cast<GLfloat>(material.Thickness), DimAliasedPoint[0], DimAliasedPoint[1])); + glLineWidth(core::clamp(static_cast<GLfloat>(material.Thickness), DimAliasedLine[0], DimAliasedLine[1])); + } + } + + // Anti aliasing + if (resetAllRenderStates || lastmaterial.AntiAliasing != material.AntiAliasing) + { + if (FeatureAvailable[IRR_ARB_multisample]) + { + if (material.AntiAliasing & EAAM_ALPHA_TO_COVERAGE) + glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); + else if (lastmaterial.AntiAliasing & EAAM_ALPHA_TO_COVERAGE) + glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); + + if ((AntiAlias >= 2) && (material.AntiAliasing & (EAAM_SIMPLE|EAAM_QUALITY))) + { + glEnable(GL_MULTISAMPLE_ARB); +#ifdef GL_NV_multisample_filter_hint + if (FeatureAvailable[IRR_NV_multisample_filter_hint]) + { + if ((material.AntiAliasing & EAAM_QUALITY) == EAAM_QUALITY) + glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); + else + glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); + } +#endif + } + else + glDisable(GL_MULTISAMPLE_ARB); + } + if ((material.AntiAliasing & EAAM_LINE_SMOOTH) != (lastmaterial.AntiAliasing & EAAM_LINE_SMOOTH)) + { + if (material.AntiAliasing & EAAM_LINE_SMOOTH) + glEnable(GL_LINE_SMOOTH); + else if (lastmaterial.AntiAliasing & EAAM_LINE_SMOOTH) + glDisable(GL_LINE_SMOOTH); + } + if ((material.AntiAliasing & EAAM_POINT_SMOOTH) != (lastmaterial.AntiAliasing & EAAM_POINT_SMOOTH)) + { + if (material.AntiAliasing & EAAM_POINT_SMOOTH) + // often in software, and thus very slow + glEnable(GL_POINT_SMOOTH); + else if (lastmaterial.AntiAliasing & EAAM_POINT_SMOOTH) + glDisable(GL_POINT_SMOOTH); + } + } + + setWrapMode(material); + + // be sure to leave in texture stage 0 + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB); +} + + +//! Enable the 2d override material +void COpenGLDriver::enableMaterial2D(bool enable) +{ + if (!enable) + CurrentRenderMode = ERM_NONE; + CNullDriver::enableMaterial2D(enable); +} + + +//! sets the needed renderstates +void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel) +{ + if (CurrentRenderMode != ERM_2D || Transformation3DChanged) + { + // unset last 3d material + if (CurrentRenderMode == ERM_3D) + { + if (static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size()) + MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); + } + if (Transformation3DChanged) + { + glMatrixMode(GL_PROJECTION); + + const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize(); + core::matrix4 m(core::matrix4::EM4CONST_NOTHING); + m.buildProjectionMatrixOrthoLH(f32(renderTargetSize.Width), f32(-(s32)(renderTargetSize.Height)), -1.0f, 1.0f); + m.setTranslation(core::vector3df(-1,1,0)); + glLoadMatrixf(m.pointer()); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.375f, 0.375f, 0.0f); + + // Make sure we set first texture matrix + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB); + + Transformation3DChanged = false; + } + if (!OverrideMaterial2DEnabled) + { + setBasicRenderStates(InitMaterial2D, LastMaterial, true); + LastMaterial = InitMaterial2D; + } + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +#ifdef GL_EXT_clip_volume_hint + if (FeatureAvailable[IRR_EXT_clip_volume_hint]) + glHint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT, GL_FASTEST); +#endif + + } + if (OverrideMaterial2DEnabled) + { + OverrideMaterial2D.Lighting=false; + setBasicRenderStates(OverrideMaterial2D, LastMaterial, false); + LastMaterial = OverrideMaterial2D; + } + + // no alphaChannel without texture + alphaChannel &= texture; + + if (alphaChannel || alpha) + { + glEnable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.f); + } + else + { + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + } + + if (texture) + { + if (!OverrideMaterial2DEnabled) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + } + Material.setTexture(0, const_cast<video::ITexture*>(CurrentTexture[0])); + setTransform(ETS_TEXTURE_0, core::IdentityMatrix); + // Due to the transformation change, the previous line would call a reset each frame + // but we can safely reset the variable as it was false before + Transformation3DChanged=false; + + if (alphaChannel) + { + // if alpha and alpha texture just modulate, otherwise use only the alpha channel + if (alpha) + { + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + else + { +#if defined(GL_ARB_texture_env_combine) || defined(GL_EXT_texture_env_combine) + if (FeatureAvailable[IRR_ARB_texture_env_combine]||FeatureAvailable[IRR_EXT_texture_env_combine]) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); + // rgb always modulates + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_TEXTURE); + // rgb always modulates + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PRIMARY_COLOR_EXT); +#endif + } + else +#endif + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + } + else + { + if (alpha) + { +#if defined(GL_ARB_texture_env_combine) || defined(GL_EXT_texture_env_combine) + if (FeatureAvailable[IRR_ARB_texture_env_combine]||FeatureAvailable[IRR_EXT_texture_env_combine]) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); + // rgb always modulates + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PRIMARY_COLOR_EXT); + // rgb always modulates + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PRIMARY_COLOR_EXT); +#endif + } + else +#endif + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + else + { + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + } + } + + CurrentRenderMode = ERM_2D; +} + + +//! \return Returns the name of the video driver. +const wchar_t* COpenGLDriver::getName() const +{ + return Name.c_str(); +} + + +//! deletes all dynamic lights there are +void COpenGLDriver::deleteAllDynamicLights() +{ + for (s32 i=0; i<MaxLights; ++i) + glDisable(GL_LIGHT0 + i); + + RequestedLights.clear(); + + CNullDriver::deleteAllDynamicLights(); +} + + +//! adds a dynamic light +s32 COpenGLDriver::addDynamicLight(const SLight& light) +{ + CNullDriver::addDynamicLight(light); + + RequestedLights.push_back(RequestedLight(light)); + + u32 newLightIndex = RequestedLights.size() - 1; + + // Try and assign a hardware light just now, but don't worry if I can't + assignHardwareLight(newLightIndex); + + return (s32)newLightIndex; +} + + +void COpenGLDriver::assignHardwareLight(u32 lightIndex) +{ + setTransform(ETS_WORLD, core::matrix4()); + + s32 lidx; + for (lidx=GL_LIGHT0; lidx < GL_LIGHT0 + MaxLights; ++lidx) + { + if(!glIsEnabled(lidx)) + { + RequestedLights[lightIndex].HardwareLightIndex = lidx; + break; + } + } + + if(lidx == GL_LIGHT0 + MaxLights) // There's no room for it just now + return; + + GLfloat data[4]; + const SLight & light = RequestedLights[lightIndex].LightData; + + switch (light.Type) + { + case video::ELT_SPOT: + data[0] = light.Direction.X; + data[1] = light.Direction.Y; + data[2] = light.Direction.Z; + data[3] = 0.0f; + glLightfv(lidx, GL_SPOT_DIRECTION, data); + + // set position + data[0] = light.Position.X; + data[1] = light.Position.Y; + data[2] = light.Position.Z; + data[3] = 1.0f; // 1.0f for positional light + glLightfv(lidx, GL_POSITION, data); + + glLightf(lidx, GL_SPOT_EXPONENT, light.Falloff); + glLightf(lidx, GL_SPOT_CUTOFF, light.OuterCone); + break; + case video::ELT_POINT: + // set position + data[0] = light.Position.X; + data[1] = light.Position.Y; + data[2] = light.Position.Z; + data[3] = 1.0f; // 1.0f for positional light + glLightfv(lidx, GL_POSITION, data); + + glLightf(lidx, GL_SPOT_EXPONENT, 0.0f); + glLightf(lidx, GL_SPOT_CUTOFF, 180.0f); + break; + case video::ELT_DIRECTIONAL: + // set direction + data[0] = -light.Direction.X; + data[1] = -light.Direction.Y; + data[2] = -light.Direction.Z; + data[3] = 0.0f; // 0.0f for directional light + glLightfv(lidx, GL_POSITION, data); + + glLightf(lidx, GL_SPOT_EXPONENT, 0.0f); + glLightf(lidx, GL_SPOT_CUTOFF, 180.0f); + break; + default: + break; + } + + // set diffuse color + data[0] = light.DiffuseColor.r; + data[1] = light.DiffuseColor.g; + data[2] = light.DiffuseColor.b; + data[3] = light.DiffuseColor.a; + glLightfv(lidx, GL_DIFFUSE, data); + + // set specular color + data[0] = light.SpecularColor.r; + data[1] = light.SpecularColor.g; + data[2] = light.SpecularColor.b; + data[3] = light.SpecularColor.a; + glLightfv(lidx, GL_SPECULAR, data); + + // set ambient color + data[0] = light.AmbientColor.r; + data[1] = light.AmbientColor.g; + data[2] = light.AmbientColor.b; + data[3] = light.AmbientColor.a; + glLightfv(lidx, GL_AMBIENT, data); + + // 1.0f / (constant + linear * d + quadratic*(d*d); + + // set attenuation + glLightf(lidx, GL_CONSTANT_ATTENUATION, light.Attenuation.X); + glLightf(lidx, GL_LINEAR_ATTENUATION, light.Attenuation.Y); + glLightf(lidx, GL_QUADRATIC_ATTENUATION, light.Attenuation.Z); + + glEnable(lidx); +} + + +//! Turns a dynamic light on or off +//! \param lightIndex: the index returned by addDynamicLight +//! \param turnOn: true to turn the light on, false to turn it off +void COpenGLDriver::turnLightOn(s32 lightIndex, bool turnOn) +{ + if(lightIndex < 0 || lightIndex >= (s32)RequestedLights.size()) + return; + + RequestedLight & requestedLight = RequestedLights[lightIndex]; + + requestedLight.DesireToBeOn = turnOn; + + if(turnOn) + { + if(-1 == requestedLight.HardwareLightIndex) + assignHardwareLight(lightIndex); + } + else + { + if(-1 != requestedLight.HardwareLightIndex) + { + // It's currently assigned, so free up the hardware light + glDisable(requestedLight.HardwareLightIndex); + requestedLight.HardwareLightIndex = -1; + + // Now let the first light that's waiting on a free hardware light grab it + for(u32 requested = 0; requested < RequestedLights.size(); ++requested) + if(RequestedLights[requested].DesireToBeOn + && + -1 == RequestedLights[requested].HardwareLightIndex) + { + assignHardwareLight(requested); + break; + } + } + } +} + + +//! returns the maximal amount of dynamic lights the device can handle +u32 COpenGLDriver::getMaximalDynamicLightAmount() const +{ + return MaxLights; +} + + +//! Sets the dynamic ambient light color. The default color is +//! (0,0,0,0) which means it is dark. +//! \param color: New color of the ambient light. +void COpenGLDriver::setAmbientLight(const SColorf& color) +{ + GLfloat data[4] = {color.r, color.g, color.b, color.a}; + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, data); +} + + +// this code was sent in by Oliver Klems, thank you! (I modified the glViewport +// method just a bit. +void COpenGLDriver::setViewPort(const core::rect<s32>& area) +{ + if (area == ViewPort) + return; + core::rect<s32> vp = area; + core::rect<s32> rendert(0,0, getCurrentRenderTargetSize().Width, getCurrentRenderTargetSize().Height); + vp.clipAgainst(rendert); + + if (vp.getHeight()>0 && vp.getWidth()>0) + { + glViewport(vp.UpperLeftCorner.X, + getCurrentRenderTargetSize().Height - vp.UpperLeftCorner.Y - vp.getHeight(), + vp.getWidth(), vp.getHeight()); + + ViewPort = vp; + } +} + + +//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do +//! this: First, draw all geometry. Then use this method, to draw the shadow +//! volume. Next use IVideoDriver::drawStencilShadow() to visualize the shadow. +void COpenGLDriver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible) +{ + const u32 count=triangles.size(); + if (!StencilBuffer || !count) + return; + + // unset last 3d material + if (CurrentRenderMode == ERM_3D && + static_cast<u32>(Material.MaterialType) < MaterialRenderers.size()) + { + MaterialRenderers[Material.MaterialType].Renderer->OnUnsetMaterial(); + ResetRenderStates = true; + } + + // store current OpenGL state + glPushAttrib(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT | + GL_POLYGON_BIT | GL_STENCIL_BUFFER_BIT); + + glDisable(GL_LIGHTING); + glDisable(GL_FOG); + glDepthFunc(GL_LESS); + glDepthMask(GL_FALSE); // no depth buffer writing + if (debugDataVisible & scene::EDS_MESH_WIRE_OVERLAY) + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + if (!(debugDataVisible & (scene::EDS_SKELETON|scene::EDS_MESH_WIRE_OVERLAY))) + { + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); // no color buffer drawing + glEnable(GL_STENCIL_TEST); + } + + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3,GL_FLOAT,sizeof(core::vector3df),triangles.const_pointer()); + glStencilMask(~0); + glStencilFunc(GL_ALWAYS, 0, ~0); + + GLenum incr = GL_INCR; + GLenum decr = GL_DECR; +#ifdef GL_EXT_stencil_wrap + if (FeatureAvailable[IRR_EXT_stencil_wrap]) + { + incr = GL_INCR_WRAP_EXT; + decr = GL_DECR_WRAP_EXT; + } +#endif +#ifdef GL_NV_depth_clamp + if (FeatureAvailable[IRR_NV_depth_clamp]) + glEnable(GL_DEPTH_CLAMP_NV); +#endif + + // The first parts are not correctly working, yet. +#if 0 +#ifdef GL_EXT_stencil_two_side + if (FeatureAvailable[IRR_EXT_stencil_two_side]) + { + glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); + glDisable(GL_CULL_FACE); + if (zfail) + { + extGlActiveStencilFace(GL_BACK); + glStencilOp(GL_KEEP, incr, GL_KEEP); + glStencilMask(~0); + glStencilFunc(GL_ALWAYS, 0, ~0); + + extGlActiveStencilFace(GL_FRONT); + glStencilOp(GL_KEEP, decr, GL_KEEP); + } + else // zpass + { + extGlActiveStencilFace(GL_BACK); + glStencilOp(GL_KEEP, GL_KEEP, decr); + glStencilMask(~0); + glStencilFunc(GL_ALWAYS, 0, ~0); + + extGlActiveStencilFace(GL_FRONT); + glStencilOp(GL_KEEP, GL_KEEP, incr); + } + glStencilMask(~0); + glStencilFunc(GL_ALWAYS, 0, ~0); + glDrawArrays(GL_TRIANGLES,0,count); + glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT); + } + else +#endif + if (FeatureAvailable[IRR_ATI_separate_stencil]) + { + glDisable(GL_CULL_FACE); + if (zfail) + { + extGlStencilOpSeparate(GL_BACK, GL_KEEP, incr, GL_KEEP); + extGlStencilOpSeparate(GL_FRONT, GL_KEEP, decr, GL_KEEP); + } + else // zpass + { + extGlStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, decr); + extGlStencilOpSeparate(GL_FRONT, GL_KEEP, GL_KEEP, incr); + } + extGlStencilFuncSeparate(GL_ALWAYS, GL_ALWAYS, 0, ~0); + glStencilMask(~0); + glDrawArrays(GL_TRIANGLES,0,count); + } + else +#endif + { + glEnable(GL_CULL_FACE); + if (zfail) + { + glCullFace(GL_FRONT); + glStencilOp(GL_KEEP, incr, GL_KEEP); + glDrawArrays(GL_TRIANGLES,0,count); + + glCullFace(GL_BACK); + glStencilOp(GL_KEEP, decr, GL_KEEP); + glDrawArrays(GL_TRIANGLES,0,count); + } + else // zpass + { + glCullFace(GL_BACK); + glStencilOp(GL_KEEP, GL_KEEP, incr); + glDrawArrays(GL_TRIANGLES,0,count); + + glCullFace(GL_FRONT); + glStencilOp(GL_KEEP, GL_KEEP, decr); + glDrawArrays(GL_TRIANGLES,0,count); + } + } +#ifdef GL_NV_depth_clamp + if (FeatureAvailable[IRR_NV_depth_clamp]) + glDisable(GL_DEPTH_CLAMP_NV); +#endif + + glDisable(GL_POLYGON_OFFSET_FILL); + glDisableClientState(GL_VERTEX_ARRAY); //not stored on stack + glPopAttrib(); +} + +//! Fills the stencil shadow with color. After the shadow volume has been drawn +//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this +//! to draw the color of the shadow. +void COpenGLDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, + video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) +{ + if (!StencilBuffer) + return; + + disableTextures(); + + // store attributes + glPushAttrib(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT | GL_STENCIL_BUFFER_BIT | GL_LIGHTING_BIT); + + glDisable(GL_LIGHTING); + glDisable(GL_FOG); + glDepthMask(GL_FALSE); + + glShadeModel(GL_FLAT); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glEnable(GL_STENCIL_TEST); + glStencilFunc(GL_NOTEQUAL, 0, ~0); + glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); + + // draw a shadow rectangle covering the entire screen using stencil buffer + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + + glBegin(GL_QUADS); + + glColor4ub(leftDownEdge.getRed(), leftDownEdge.getGreen(), leftDownEdge.getBlue(), leftDownEdge.getAlpha()); + glVertex3f(-1.f,-1.f,-0.9f); + + glColor4ub(leftUpEdge.getRed(), leftUpEdge.getGreen(), leftUpEdge.getBlue(), leftUpEdge.getAlpha()); + glVertex3f(-1.f, 1.f,-0.9f); + + glColor4ub(rightUpEdge.getRed(), rightUpEdge.getGreen(), rightUpEdge.getBlue(), rightUpEdge.getAlpha()); + glVertex3f(1.f, 1.f,-0.9f); + + glColor4ub(rightDownEdge.getRed(), rightDownEdge.getGreen(), rightDownEdge.getBlue(), rightDownEdge.getAlpha()); + glVertex3f(1.f,-1.f,-0.9f); + + glEnd(); + + clearBuffers(false, false, clearStencilBuffer, 0x0); + + // restore settings + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + glPopAttrib(); +} + + +//! Sets the fog mode. +void COpenGLDriver::setFog(SColor c, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog) +{ + CNullDriver::setFog(c, fogType, start, end, density, pixelFog, rangeFog); + + glFogf(GL_FOG_MODE, GLfloat((fogType==EFT_FOG_LINEAR)? GL_LINEAR : (fogType==EFT_FOG_EXP)?GL_EXP:GL_EXP2)); + +#ifdef GL_EXT_fog_coord + if (FeatureAvailable[IRR_EXT_fog_coord]) + glFogi(GL_FOG_COORDINATE_SOURCE, GL_FRAGMENT_DEPTH); +#endif +#ifdef GL_NV_fog_distance + if (FeatureAvailable[IRR_NV_fog_distance]) + { + if (rangeFog) + glFogi(GL_FOG_DISTANCE_MODE_NV, GL_EYE_RADIAL_NV); + else + glFogi(GL_FOG_DISTANCE_MODE_NV, GL_EYE_PLANE_ABSOLUTE_NV); + } +#endif + + if (fogType==EFT_FOG_LINEAR) + { + glFogf(GL_FOG_START, start); + glFogf(GL_FOG_END, end); + } + else + glFogf(GL_FOG_DENSITY, density); + + if (pixelFog) + glHint(GL_FOG_HINT, GL_NICEST); + else + glHint(GL_FOG_HINT, GL_FASTEST); + + SColorf color(c); + GLfloat data[4] = {color.r, color.g, color.b, color.a}; + glFogfv(GL_FOG_COLOR, data); +} + + +//! Draws a 3d line. +void COpenGLDriver::draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color) +{ + setRenderStates3DMode(); + + glBegin(GL_LINES); + glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()); + glVertex3f(start.X, start.Y, start.Z); + + glVertex3f(end.X, end.Y, end.Z); + glEnd(); +} + + +//! Removes a texture from the texture cache and deletes it, freeing lot of memory. +void COpenGLDriver::removeTexture(ITexture* texture) +{ + if (!texture) + return; + + CNullDriver::removeTexture(texture); + // Remove this texture from CurrentTexture as well + CurrentTexture.remove(texture); +} + + +//! Only used by the internal engine. Used to notify the driver that +//! the window was resized. +void COpenGLDriver::OnResize(const core::dimension2d<u32>& size) +{ + CNullDriver::OnResize(size); + glViewport(0, 0, size.Width, size.Height); + Transformation3DChanged = true; +} + + +//! Returns type of video driver +E_DRIVER_TYPE COpenGLDriver::getDriverType() const +{ + return EDT_OPENGL; +} + + +//! returns color format +ECOLOR_FORMAT COpenGLDriver::getColorFormat() const +{ + return ColorFormat; +} + + +//! Sets a vertex shader constant. +void COpenGLDriver::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ +#ifdef GL_ARB_vertex_program + for (s32 i=0; i<constantAmount; ++i) + extGlProgramLocalParameter4fv(GL_VERTEX_PROGRAM_ARB, startRegister+i, &data[i*4]); +#endif +} + +//! Sets a pixel shader constant. +void COpenGLDriver::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ +#ifdef GL_ARB_fragment_program + for (s32 i=0; i<constantAmount; ++i) + extGlProgramLocalParameter4fv(GL_FRAGMENT_PROGRAM_ARB, startRegister+i, &data[i*4]); +#endif +} + +//! Sets a constant for the vertex shader based on a name. +bool COpenGLDriver::setVertexShaderConstant(const c8* name, const f32* floats, int count) +{ + //pass this along, as in GLSL the same routine is used for both vertex and fragment shaders + return setPixelShaderConstant(name, floats, count); +} + +//! Bool interface for the above. +bool COpenGLDriver::setVertexShaderConstant(const c8* name, const bool* bools, int count) +{ + return setPixelShaderConstant(name, bools, count); +} + +//! Int interface for the above. +bool COpenGLDriver::setVertexShaderConstant(const c8* name, const s32* ints, int count) +{ + return setPixelShaderConstant(name, ints, count); +} + +//! Sets a constant for the pixel shader based on a name. +bool COpenGLDriver::setPixelShaderConstant(const c8* name, const f32* floats, int count) +{ + os::Printer::log("Error: Please call services->setPixelShaderConstant(), not VideoDriver->setPixelShaderConstant()."); + return false; +} + +//! Bool interface for the above. +bool COpenGLDriver::setPixelShaderConstant(const c8* name, const bool* bools, int count) +{ + os::Printer::log("Error: Please call services->setPixelShaderConstant(), not VideoDriver->setPixelShaderConstant()."); + return false; +} + +//! Int interface for the above. +bool COpenGLDriver::setPixelShaderConstant(const c8* name, const s32* ints, int count) +{ + os::Printer::log("Error: Please call services->setPixelShaderConstant(), not VideoDriver->setPixelShaderConstant()."); + return false; +} + + +//! Adds a new material renderer to the VideoDriver, using pixel and/or +//! vertex shaders to render geometry. +s32 COpenGLDriver::addShaderMaterial(const c8* vertexShaderProgram, + const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, s32 userData) +{ + s32 nr = -1; + COpenGLShaderMaterialRenderer* r = new COpenGLShaderMaterialRenderer( + this, nr, vertexShaderProgram, pixelShaderProgram, + callback, getMaterialRenderer(baseMaterial), userData); + + r->drop(); + return nr; +} + + +//! Adds a new material renderer to the VideoDriver, using GLSL to render geometry. +s32 COpenGLDriver::addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName, + E_GEOMETRY_SHADER_TYPE gsCompileTarget, + scene::E_PRIMITIVE_TYPE inType, + scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut, + IShaderConstantSetCallBack* callback, + E_MATERIAL_TYPE baseMaterial, + s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) +{ + s32 nr = -1; + + #ifdef _IRR_COMPILE_WITH_CG_ + if (shadingLang == EGSL_CG) + { + COpenGLCgMaterialRenderer* r = new COpenGLCgMaterialRenderer( + this, nr, + vertexShaderProgram, vertexShaderEntryPointName, vsCompileTarget, + pixelShaderProgram, pixelShaderEntryPointName, psCompileTarget, + geometryShaderProgram, geometryShaderEntryPointName, gsCompileTarget, + inType, outType, verticesOut, + callback,getMaterialRenderer(baseMaterial), userData); + + r->drop(); + } + else + #endif + { + COpenGLSLMaterialRenderer* r = new COpenGLSLMaterialRenderer( + this, nr, + vertexShaderProgram, vertexShaderEntryPointName, vsCompileTarget, + pixelShaderProgram, pixelShaderEntryPointName, psCompileTarget, + geometryShaderProgram, geometryShaderEntryPointName, gsCompileTarget, + inType, outType, verticesOut, + callback,getMaterialRenderer(baseMaterial), userData); + + r->drop(); + } + + return nr; +} + + +//! Returns a pointer to the IVideoDriver interface. (Implementation for +//! IMaterialRendererServices) +IVideoDriver* COpenGLDriver::getVideoDriver() +{ + return this; +} + + +ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, + const ECOLOR_FORMAT format) +{ + //disable mip-mapping + bool generateMipLevels = getTextureCreationFlag(ETCF_CREATE_MIP_MAPS); + setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, false); + + video::ITexture* rtt = 0; +#if defined(GL_EXT_framebuffer_object) + // if driver supports FrameBufferObjects, use them + if (queryFeature(EVDF_FRAMEBUFFER_OBJECT)) + { + rtt = new COpenGLFBOTexture(size, name, this, format); + if (rtt) + { + bool success = false; + addTexture(rtt); + ITexture* tex = createDepthTexture(rtt); + if (tex) + { + success = static_cast<video::COpenGLFBODepthTexture*>(tex)->attach(rtt); + if ( !success ) + { + removeDepthTexture(tex); + } + tex->drop(); + } + rtt->drop(); + if (!success) + { + removeTexture(rtt); + rtt=0; + } + } + } + else +#endif + { + // the simple texture is only possible for size <= screensize + // we try to find an optimal size with the original constraints + core::dimension2du destSize(core::min_(size.Width,ScreenSize.Width), core::min_(size.Height,ScreenSize.Height)); + destSize = destSize.getOptimalSize((size==size.getOptimalSize()), false, false); + rtt = addTexture(destSize, name, ECF_A8R8G8B8); + if (rtt) + { + static_cast<video::COpenGLTexture*>(rtt)->setIsRenderTarget(true); + } + } + + //restore mip-mapping + setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, generateMipLevels); + + return rtt; +} + + +//! Returns the maximum amount of primitives (mostly vertices) which +//! the device is able to render with one drawIndexedTriangleList +//! call. +u32 COpenGLDriver::getMaximalPrimitiveCount() const +{ + return 0x7fffffff; +} + + +//! set or reset render target +bool COpenGLDriver::setRenderTarget(video::E_RENDER_TARGET target, bool clearTarget, + bool clearZBuffer, SColor color) +{ + if (target != CurrentTarget) + setRenderTarget(0, false, false, 0x0); + + if (ERT_RENDER_TEXTURE == target) + { + os::Printer::log("For render textures call setRenderTarget with the actual texture as first parameter.", ELL_ERROR); + return false; + } + if (ERT_MULTI_RENDER_TEXTURES == target) + { + os::Printer::log("For multiple render textures call setRenderTarget with the texture array as first parameter.", ELL_ERROR); + return false; + } + + if (Params.Stereobuffer && (ERT_STEREO_RIGHT_BUFFER == target)) + { + if (Params.Doublebuffer) + glDrawBuffer(GL_BACK_RIGHT); + else + glDrawBuffer(GL_FRONT_RIGHT); + } + else if (Params.Stereobuffer && ERT_STEREO_BOTH_BUFFERS == target) + { + if (Params.Doublebuffer) + glDrawBuffer(GL_BACK); + else + glDrawBuffer(GL_FRONT); + } + else if ((target >= ERT_AUX_BUFFER0) && (target-ERT_AUX_BUFFER0 < MaxAuxBuffers)) + { + glDrawBuffer(GL_AUX0+target-ERT_AUX_BUFFER0); + } + else + { + if (Params.Doublebuffer) + glDrawBuffer(GL_BACK_LEFT); + else + glDrawBuffer(GL_FRONT_LEFT); + // exit with false, but also with working color buffer + if (target != ERT_FRAME_BUFFER) + return false; + } + CurrentTarget=target; + clearBuffers(clearTarget, clearZBuffer, false, color); + return true; +} + + +//! set or reset render target +bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color) +{ + // check for right driver type + + if (texture && texture->getDriverType() != EDT_OPENGL) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + +#if defined(GL_EXT_framebuffer_object) + if (CurrentTarget==ERT_MULTI_RENDER_TEXTURES) + { + for (u32 i=0; i<MRTargets.size(); ++i) + { + if (MRTargets[i].TargetType==ERT_RENDER_TEXTURE) + { + for (++i; i<MRTargets.size(); ++i) + if (MRTargets[i].TargetType==ERT_RENDER_TEXTURE) + extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT+i, GL_TEXTURE_2D, 0, 0); + } + } + MRTargets.clear(); + } +#endif + + // check if we should set the previous RT back + if ((RenderTargetTexture != texture) || + (CurrentTarget==ERT_MULTI_RENDER_TEXTURES)) + { + setActiveTexture(0, 0); + ResetRenderStates=true; + if (RenderTargetTexture!=0) + { + RenderTargetTexture->unbindRTT(); + } + + if (texture) + { + // we want to set a new target. so do this. + glViewport(0, 0, texture->getSize().Width, texture->getSize().Height); + RenderTargetTexture = static_cast<COpenGLTexture*>(texture); + // calls glDrawBuffer as well + RenderTargetTexture->bindRTT(); + CurrentRendertargetSize = texture->getSize(); + CurrentTarget=ERT_RENDER_TEXTURE; + } + else + { + glViewport(0,0,ScreenSize.Width,ScreenSize.Height); + RenderTargetTexture = 0; + CurrentRendertargetSize = core::dimension2d<u32>(0,0); + CurrentTarget=ERT_FRAME_BUFFER; + glDrawBuffer(Params.Doublebuffer?GL_BACK_LEFT:GL_FRONT_LEFT); + } + // we need to update the matrices due to the rendersize change. + Transformation3DChanged=true; + } + + clearBuffers(clearBackBuffer, clearZBuffer, false, color); + + return true; +} + + +//! Sets multiple render targets +bool COpenGLDriver::setRenderTarget(const core::array<video::IRenderTarget>& targets, + bool clearBackBuffer, bool clearZBuffer, SColor color) +{ + // if simply disabling the MRT via array call + if (targets.size()==0) + return setRenderTarget(0, clearBackBuffer, clearZBuffer, color); + // if disabling old MRT, but enabling new one as well + if ((MRTargets.size()!=0) && (targets != MRTargets)) + setRenderTarget(0, clearBackBuffer, clearZBuffer, color); + // if no change, simply clear buffers + else if (targets == MRTargets) + { + clearBuffers(clearBackBuffer, clearZBuffer, false, color); + return true; + } + + // copy to storage for correct disabling + MRTargets=targets; + + u32 maxMultipleRTTs = core::min_(static_cast<u32>(MaxMultipleRenderTargets), targets.size()); + + // determine common size + core::dimension2du rttSize = CurrentRendertargetSize; + if (targets[0].TargetType==ERT_RENDER_TEXTURE) + { + if (!targets[0].RenderTexture) + { + os::Printer::log("Missing render texture for MRT.", ELL_ERROR); + return false; + } + rttSize=targets[0].RenderTexture->getSize(); + } + + for (u32 i = 0; i < maxMultipleRTTs; ++i) + { + // check for right driver type + if (targets[i].TargetType==ERT_RENDER_TEXTURE) + { + if (!targets[i].RenderTexture) + { + maxMultipleRTTs=i; + os::Printer::log("Missing render texture for MRT.", ELL_WARNING); + break; + } + if (targets[i].RenderTexture->getDriverType() != EDT_OPENGL) + { + maxMultipleRTTs=i; + os::Printer::log("Tried to set a texture not owned by this driver.", ELL_WARNING); + break; + } + + // check for valid render target + if (!targets[i].RenderTexture->isRenderTarget() || !static_cast<COpenGLTexture*>(targets[i].RenderTexture)->isFrameBufferObject()) + { + maxMultipleRTTs=i; + os::Printer::log("Tried to set a non FBO-RTT as render target.", ELL_WARNING); + break; + } + + // check for valid size + if (rttSize != targets[i].RenderTexture->getSize()) + { + maxMultipleRTTs=i; + os::Printer::log("Render target texture has wrong size.", ELL_WARNING); + break; + } + } + } + if (maxMultipleRTTs==0) + { + os::Printer::log("No valid MRTs.", ELL_ERROR); + return false; + } + + // init FBO, if any + for (u32 i=0; i<maxMultipleRTTs; ++i) + { + if (targets[i].TargetType==ERT_RENDER_TEXTURE) + { + setRenderTarget(targets[i].RenderTexture, false, false, 0x0); + break; // bind only first RTT + } + } + // init other main buffer, if necessary + if (targets[0].TargetType!=ERT_RENDER_TEXTURE) + setRenderTarget(targets[0].TargetType, false, false, 0x0); + + // attach other textures and store buffers into array + if (maxMultipleRTTs > 1) + { + CurrentTarget=ERT_MULTI_RENDER_TEXTURES; + core::array<GLenum> MRTs; + MRTs.set_used(maxMultipleRTTs); + for(u32 i = 0; i < maxMultipleRTTs; i++) + { + if (FeatureAvailable[IRR_EXT_draw_buffers2]) + { + extGlColorMaskIndexed(i, + (targets[i].ColorMask & ECP_RED)?GL_TRUE:GL_FALSE, + (targets[i].ColorMask & ECP_GREEN)?GL_TRUE:GL_FALSE, + (targets[i].ColorMask & ECP_BLUE)?GL_TRUE:GL_FALSE, + (targets[i].ColorMask & ECP_ALPHA)?GL_TRUE:GL_FALSE); + if (targets[i].BlendOp==EBO_NONE) + extGlDisableIndexed(GL_BLEND, i); + else + extGlEnableIndexed(GL_BLEND, i); + } +#if defined(GL_AMD_draw_buffers_blend) || defined(GL_ARB_draw_buffers_blend) + if (FeatureAvailable[IRR_AMD_draw_buffers_blend] || FeatureAvailable[IRR_ARB_draw_buffers_blend]) + { + extGlBlendFuncIndexed(i, getGLBlend(targets[i].BlendFuncSrc), getGLBlend(targets[i].BlendFuncDst)); + switch(targets[i].BlendOp) + { + case EBO_SUBTRACT: + extGlBlendEquationIndexed(i, GL_FUNC_SUBTRACT); + break; + case EBO_REVSUBTRACT: + extGlBlendEquationIndexed(i, GL_FUNC_REVERSE_SUBTRACT); + break; + case EBO_MIN: + extGlBlendEquationIndexed(i, GL_MIN); + break; + case EBO_MAX: + extGlBlendEquationIndexed(i, GL_MAX); + break; + case EBO_MIN_FACTOR: + case EBO_MIN_ALPHA: +#if defined(GL_AMD_blend_minmax_factor) + if (FeatureAvailable[IRR_AMD_blend_minmax_factor]) + extGlBlendEquationIndexed(i, GL_FACTOR_MIN_AMD); + // fallback in case of missing extension + else +#endif + extGlBlendEquation(GL_MIN); + break; + case EBO_MAX_FACTOR: + case EBO_MAX_ALPHA: +#if defined(GL_AMD_blend_minmax_factor) + if (FeatureAvailable[IRR_AMD_blend_minmax_factor]) + extGlBlendEquationIndexed(i, GL_FACTOR_MAX_AMD); + // fallback in case of missing extension + else +#endif + extGlBlendEquation(GL_MAX); + break; + default: + extGlBlendEquationIndexed(i, GL_FUNC_ADD); + break; + } + } +#endif + if (targets[i].TargetType==ERT_RENDER_TEXTURE) + { + GLenum attachment = GL_NONE; +#ifdef GL_EXT_framebuffer_object + // attach texture to FrameBuffer Object on Color [i] + attachment = GL_COLOR_ATTACHMENT0_EXT+i; + if ((i != 0) && (targets[i].RenderTexture != RenderTargetTexture)) + extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_2D, static_cast<COpenGLTexture*>(targets[i].RenderTexture)->getOpenGLTextureName(), 0); +#endif + MRTs[i]=attachment; + } + else + { + switch(targets[i].TargetType) + { + case ERT_FRAME_BUFFER: + MRTs[i]=GL_BACK_LEFT; + break; + case ERT_STEREO_BOTH_BUFFERS: + MRTs[i]=GL_BACK; + break; + case ERT_STEREO_RIGHT_BUFFER: + MRTs[i]=GL_BACK_RIGHT; + break; + case ERT_STEREO_LEFT_BUFFER: + MRTs[i]=GL_BACK_LEFT; + break; + default: + MRTs[i]=GL_AUX0+(targets[i].TargetType-ERT_AUX_BUFFER0); + break; + } + } + } + + extGlDrawBuffers(maxMultipleRTTs, MRTs.const_pointer()); + } + + clearBuffers(clearBackBuffer, clearZBuffer, false, color); + return true; +} + + +// returns the current size of the screen or rendertarget +const core::dimension2d<u32>& COpenGLDriver::getCurrentRenderTargetSize() const +{ + if (CurrentRendertargetSize.Width == 0) + return ScreenSize; + else + return CurrentRendertargetSize; +} + + +//! Clears the ZBuffer. +void COpenGLDriver::clearZBuffer() +{ + clearBuffers(false, true, false, 0x0); +} + + +//! Returns an image created from the last rendered frame. +IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RENDER_TARGET target) +{ + if (target==video::ERT_MULTI_RENDER_TEXTURES || target==video::ERT_RENDER_TEXTURE || target==video::ERT_STEREO_BOTH_BUFFERS) + return 0; + + // allows to read pixels in top-to-bottom order +#ifdef GL_MESA_pack_invert + if (FeatureAvailable[IRR_MESA_pack_invert]) + glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); +#endif + + if (format==video::ECF_UNKNOWN) + format=getColorFormat(); + GLenum fmt; + GLenum type; + switch (format) + { + case ECF_A1R5G5B5: + fmt = GL_BGRA; + type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + break; + case ECF_R5G6B5: + fmt = GL_RGB; + type = GL_UNSIGNED_SHORT_5_6_5; + break; + case ECF_R8G8B8: + fmt = GL_RGB; + type = GL_UNSIGNED_BYTE; + break; + case ECF_A8R8G8B8: + fmt = GL_BGRA; + if (Version > 101) + type = GL_UNSIGNED_INT_8_8_8_8_REV; + else + type = GL_UNSIGNED_BYTE; + break; + case ECF_R16F: + if (FeatureAvailable[IRR_ARB_texture_rg]) + fmt = GL_RED; + else + fmt = GL_LUMINANCE; +#ifdef GL_ARB_half_float_pixel + if (FeatureAvailable[IRR_ARB_half_float_pixel]) + type = GL_HALF_FLOAT_ARB; + else +#endif + { + type = GL_FLOAT; + format = ECF_R32F; + } + break; + case ECF_G16R16F: +#ifdef GL_ARB_texture_rg + if (FeatureAvailable[IRR_ARB_texture_rg]) + fmt = GL_RG; + else +#endif + fmt = GL_LUMINANCE_ALPHA; +#ifdef GL_ARB_half_float_pixel + if (FeatureAvailable[IRR_ARB_half_float_pixel]) + type = GL_HALF_FLOAT_ARB; + else +#endif + { + type = GL_FLOAT; + format = ECF_G32R32F; + } + break; + case ECF_A16B16G16R16F: + fmt = GL_BGRA; +#ifdef GL_ARB_half_float_pixel + if (FeatureAvailable[IRR_ARB_half_float_pixel]) + type = GL_HALF_FLOAT_ARB; + else +#endif + { + type = GL_FLOAT; + format = ECF_A32B32G32R32F; + } + break; + case ECF_R32F: + if (FeatureAvailable[IRR_ARB_texture_rg]) + fmt = GL_RED; + else + fmt = GL_LUMINANCE; + type = GL_FLOAT; + break; + case ECF_G32R32F: +#ifdef GL_ARB_texture_rg + if (FeatureAvailable[IRR_ARB_texture_rg]) + fmt = GL_RG; + else +#endif + fmt = GL_LUMINANCE_ALPHA; + type = GL_FLOAT; + break; + case ECF_A32B32G32R32F: + fmt = GL_BGRA; + type = GL_FLOAT; + break; + default: + fmt = GL_BGRA; + type = GL_UNSIGNED_BYTE; + break; + } + IImage* newImage = createImage(format, ScreenSize); + + u8* pixels = 0; + if (newImage) + pixels = static_cast<u8*>(newImage->lock()); + if (pixels) + { + GLenum tgt=GL_FRONT; + switch (target) + { + case video::ERT_FRAME_BUFFER: + break; + case video::ERT_STEREO_LEFT_BUFFER: + tgt=GL_FRONT_LEFT; + break; + case video::ERT_STEREO_RIGHT_BUFFER: + tgt=GL_FRONT_RIGHT; + break; + default: + tgt=GL_AUX0+(target-video::ERT_AUX_BUFFER0); + break; + } + glReadBuffer(tgt); + glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, fmt, type, pixels); + testGLError(); + glReadBuffer(GL_BACK); + } + +#ifdef GL_MESA_pack_invert + if (FeatureAvailable[IRR_MESA_pack_invert]) + glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE); + else +#endif + if (pixels) + { + // opengl images are horizontally flipped, so we have to fix that here. + const s32 pitch=newImage->getPitch(); + u8* p2 = pixels + (ScreenSize.Height - 1) * pitch; + u8* tmpBuffer = new u8[pitch]; + for (u32 i=0; i < ScreenSize.Height; i += 2) + { + memcpy(tmpBuffer, pixels, pitch); +// for (u32 j=0; j<pitch; ++j) +// { +// pixels[j]=(u8)(p2[j]*255.f); +// } + memcpy(pixels, p2, pitch); +// for (u32 j=0; j<pitch; ++j) +// { +// p2[j]=(u8)(tmpBuffer[j]*255.f); +// } + memcpy(p2, tmpBuffer, pitch); + pixels += pitch; + p2 -= pitch; + } + delete [] tmpBuffer; + } + + if (newImage) + { + newImage->unlock(); + if (testGLError() || !pixels) + { + newImage->drop(); + return 0; + } + } + return newImage; +} + + +//! get depth texture for the given render target texture +ITexture* COpenGLDriver::createDepthTexture(ITexture* texture, bool shared) +{ + if ((texture->getDriverType() != EDT_OPENGL) || (!texture->isRenderTarget())) + return 0; + COpenGLTexture* tex = static_cast<COpenGLTexture*>(texture); + + if (!tex->isFrameBufferObject()) + return 0; + + if (shared) + { + for (u32 i=0; i<DepthTextures.size(); ++i) + { + if (DepthTextures[i]->getSize()==texture->getSize()) + { + DepthTextures[i]->grab(); + return DepthTextures[i]; + } + } + DepthTextures.push_back(new COpenGLFBODepthTexture(texture->getSize(), "depth1", this)); + return DepthTextures.getLast(); + } + return (new COpenGLFBODepthTexture(texture->getSize(), "depth1", this)); +} + + +void COpenGLDriver::removeDepthTexture(ITexture* texture) +{ + for (u32 i=0; i<DepthTextures.size(); ++i) + { + if (texture==DepthTextures[i]) + { + DepthTextures.erase(i); + return; + } + } +} + + +//! Set/unset a clipping plane. +bool COpenGLDriver::setClipPlane(u32 index, const core::plane3df& plane, bool enable) +{ + if (index >= MaxUserClipPlanes) + return false; + + UserClipPlanes[index].Plane=plane; + enableClipPlane(index, enable); + return true; +} + + +void COpenGLDriver::uploadClipPlane(u32 index) +{ + // opengl needs an array of doubles for the plane equation + GLdouble clip_plane[4]; + clip_plane[0] = UserClipPlanes[index].Plane.Normal.X; + clip_plane[1] = UserClipPlanes[index].Plane.Normal.Y; + clip_plane[2] = UserClipPlanes[index].Plane.Normal.Z; + clip_plane[3] = UserClipPlanes[index].Plane.D; + glClipPlane(GL_CLIP_PLANE0 + index, clip_plane); +} + + +//! Enable/disable a clipping plane. +void COpenGLDriver::enableClipPlane(u32 index, bool enable) +{ + if (index >= MaxUserClipPlanes) + return; + if (enable) + { + if (!UserClipPlanes[index].Enabled) + { + uploadClipPlane(index); + glEnable(GL_CLIP_PLANE0 + index); + } + } + else + glDisable(GL_CLIP_PLANE0 + index); + + UserClipPlanes[index].Enabled=enable; +} + + +core::dimension2du COpenGLDriver::getMaxTextureSize() const +{ + return core::dimension2du(MaxTextureSize, MaxTextureSize); +} + + +//! Convert E_PRIMITIVE_TYPE to OpenGL equivalent +GLenum COpenGLDriver::primitiveTypeToGL(scene::E_PRIMITIVE_TYPE type) const +{ + switch (type) + { + case scene::EPT_POINTS: + return GL_POINTS; + case scene::EPT_LINE_STRIP: + return GL_LINE_STRIP; + case scene::EPT_LINE_LOOP: + return GL_LINE_LOOP; + case scene::EPT_LINES: + return GL_LINES; + case scene::EPT_TRIANGLE_STRIP: + return GL_TRIANGLE_STRIP; + case scene::EPT_TRIANGLE_FAN: + return GL_TRIANGLE_FAN; + case scene::EPT_TRIANGLES: + return GL_TRIANGLES; + case scene::EPT_QUAD_STRIP: + return GL_QUAD_STRIP; + case scene::EPT_QUADS: + return GL_QUADS; + case scene::EPT_POLYGON: + return GL_POLYGON; + case scene::EPT_POINT_SPRITES: +#ifdef GL_ARB_point_sprite + return GL_POINT_SPRITE_ARB; +#else + return GL_POINTS; +#endif + } + return GL_TRIANGLES; +} + + +GLenum COpenGLDriver::getGLBlend(E_BLEND_FACTOR factor) const +{ + GLenum r = 0; + switch (factor) + { + case EBF_ZERO: r = GL_ZERO; break; + case EBF_ONE: r = GL_ONE; break; + case EBF_DST_COLOR: r = GL_DST_COLOR; break; + case EBF_ONE_MINUS_DST_COLOR: r = GL_ONE_MINUS_DST_COLOR; break; + case EBF_SRC_COLOR: r = GL_SRC_COLOR; break; + case EBF_ONE_MINUS_SRC_COLOR: r = GL_ONE_MINUS_SRC_COLOR; break; + case EBF_SRC_ALPHA: r = GL_SRC_ALPHA; break; + case EBF_ONE_MINUS_SRC_ALPHA: r = GL_ONE_MINUS_SRC_ALPHA; break; + case EBF_DST_ALPHA: r = GL_DST_ALPHA; break; + case EBF_ONE_MINUS_DST_ALPHA: r = GL_ONE_MINUS_DST_ALPHA; break; + case EBF_SRC_ALPHA_SATURATE: r = GL_SRC_ALPHA_SATURATE; break; + } + return r; +} + +GLenum COpenGLDriver::getZBufferBits() const +{ + GLenum bits = 0; + switch (Params.ZBufferBits) + { + case 16: + bits = GL_DEPTH_COMPONENT16; + break; + case 24: + bits = GL_DEPTH_COMPONENT24; + break; + case 32: + bits = GL_DEPTH_COMPONENT32; + break; + default: + bits = GL_DEPTH_COMPONENT; + break; + } + return bits; +} + +#ifdef _IRR_COMPILE_WITH_CG_ +const CGcontext& COpenGLDriver::getCgContext() +{ + return CgContext; +} +#endif + + +} // end namespace +} // end namespace + +#endif // _IRR_COMPILE_WITH_OPENGL_ + +namespace irr +{ +namespace video +{ + + +// ----------------------------------- +// WINDOWS VERSION +// ----------------------------------- +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ +IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceWin32* device) +{ +#ifdef _IRR_COMPILE_WITH_OPENGL_ + COpenGLDriver* ogl = new COpenGLDriver(params, io, device); + if (!ogl->initDriver(device)) + { + ogl->drop(); + ogl = 0; + } + return ogl; +#else + return 0; +#endif // _IRR_COMPILE_WITH_OPENGL_ +} +#endif // _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + +// ----------------------------------- +// MACOSX VERSION +// ----------------------------------- +#if defined(_IRR_COMPILE_WITH_OSX_DEVICE_) +IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceMacOSX *device) +{ +#ifdef _IRR_COMPILE_WITH_OPENGL_ + return new COpenGLDriver(params, io, device); +#else + return 0; +#endif // _IRR_COMPILE_WITH_OPENGL_ +} +#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ + +// ----------------------------------- +// X11 VERSION +// ----------------------------------- +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ +IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceLinux* device) +{ +#ifdef _IRR_COMPILE_WITH_OPENGL_ + COpenGLDriver* ogl = new COpenGLDriver(params, io, device); + if (!ogl->initDriver(device)) + { + ogl->drop(); + ogl = 0; + } + return ogl; +#else + return 0; +#endif // _IRR_COMPILE_WITH_OPENGL_ +} +#endif // _IRR_COMPILE_WITH_X11_DEVICE_ + + +// ----------------------------------- +// SDL VERSION +// ----------------------------------- +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ +IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, + io::IFileSystem* io, CIrrDeviceSDL* device) +{ +#ifdef _IRR_COMPILE_WITH_OPENGL_ + return new COpenGLDriver(params, io, device); +#else + return 0; +#endif // _IRR_COMPILE_WITH_OPENGL_ +} +#endif // _IRR_COMPILE_WITH_SDL_DEVICE_ + +} // end namespace +} // end namespace + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.h new file mode 100644 index 0000000..693052c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLDriver.h @@ -0,0 +1,613 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#ifndef __C_VIDEO_OPEN_GL_H_INCLUDED__ +#define __C_VIDEO_OPEN_GL_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#include "SIrrCreationParameters.h" + +namespace irr +{ + class CIrrDeviceWin32; + class CIrrDeviceLinux; + class CIrrDeviceSDL; + class CIrrDeviceMacOSX; +} + +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "CNullDriver.h" +#include "IMaterialRendererServices.h" +// also includes the OpenGL stuff +#include "COpenGLExtensionHandler.h" + +#ifdef _IRR_COMPILE_WITH_CG_ +#include "Cg/cg.h" +#endif + +namespace irr +{ + +namespace video +{ + class COpenGLTexture; + + class COpenGLDriver : public CNullDriver, public IMaterialRendererServices, public COpenGLExtensionHandler + { + friend class COpenGLTexture; + public: + + #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWin32* device); + //! inits the windows specific parts of the open gl driver + bool initDriver(CIrrDeviceWin32* device); + bool changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceWin32* device); + #endif + + #ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceLinux* device); + //! inits the GLX specific parts of the open gl driver + bool initDriver(CIrrDeviceLinux* device); + bool changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceLinux* device); + #endif + + #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ + COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceSDL* device); + #endif + + #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceMacOSX *device); + #endif + + //! generic version which overloads the unimplemented versions + bool changeRenderContext(const SExposedVideoData& videoData, void* device) {return false;} + + //! destructor + virtual ~COpenGLDriver(); + + //! clears the zbuffer + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect<s32>* sourceRect=0); + + //! presents the rendered scene on the screen, returns false if failed + virtual bool endScene(); + + //! sets transformation + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); + + + struct SHWBufferLink_opengl : public SHWBufferLink + { + SHWBufferLink_opengl(const scene::IMeshBuffer *_MeshBuffer): SHWBufferLink(_MeshBuffer), vbo_verticesID(0),vbo_indicesID(0){} + + GLuint vbo_verticesID; //tmp + GLuint vbo_indicesID; //tmp + + GLuint vbo_verticesSize; //tmp + GLuint vbo_indicesSize; //tmp + }; + + //! updates hardware buffer if needed + virtual bool updateHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Create hardware buffer from mesh + virtual SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb); + + //! Delete hardware buffer (only some drivers can) + virtual void deleteHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Draw hardware buffer + virtual void drawHardwareBuffer(SHWBufferLink *HWBuffer); + + //! Create occlusion query. + /** Use node for identification and mesh for occlusion test. */ + virtual void addOcclusionQuery(scene::ISceneNode* node, + const scene::IMesh* mesh=0); + + //! Remove occlusion query. + virtual void removeOcclusionQuery(scene::ISceneNode* node); + + //! Run occlusion query. Draws mesh stored in query. + /** If the mesh shall not be rendered visible, use + overrideMaterial to disable the color and depth buffer. */ + virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false); + + //! Update occlusion query. Retrieves results from GPU. + /** If the query shall not block, set the flag to false. + Update might not occur in this case, though */ + virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true); + + //! Return query result. + /** Return value is the number of visible pixels/fragments. + The value is a safe approximation, i.e. can be larger then the + actual value of pixels. */ + virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const; + + //! draws a vertex primitive list + virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType); + + //! draws a vertex primitive list in 2d + virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType); + + //! queries the features of the driver, returns true if feature is available + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const + { + return FeatureEnabled[feature] && COpenGLExtensionHandler::queryFeature(feature); + } + + //! Sets a material. All 3d drawing functions draw geometry now + //! using this material. + //! \param material: Material to be used from now on. + virtual void setMaterial(const SMaterial& material); + + //! draws a set of 2d images, using a color and the alpha channel of the + //! texture if desired. + void draw2DImageBatch(const video::ITexture* texture, + const core::array<core::position2d<s32> >& positions, + const core::array<core::rect<s32> >& sourceRects, + const core::rect<s32>* clipRect, + SColor color, + bool useAlphaChannelOfTexture); + + //! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false); + + //! draws a set of 2d images, using a color and the alpha + /** channel of the texture if desired. The images are drawn + beginning at pos and concatenated in one line. All drawings + are clipped against clipRect (if != 0). + The subtextures are defined by the array of sourceRects + and are chosen by the indices given. + \param texture: Texture to be drawn. + \param pos: Upper left 2d destination position where the image will be drawn. + \param sourceRects: Source rectangles of the image. + \param indices: List of indices which choose the actual rectangle used each time. + \param clipRect: Pointer to rectangle on the screen where the image is clipped to. + This pointer can be 0. Then the image is not clipped. + \param color: Color with which the image is colored. + Note that the alpha component is used: If alpha is other than 255, the image will be transparent. + \param useAlphaChannelOfTexture: If true, the alpha channel of the texture is + used to draw the image. */ + virtual void draw2DImage(const video::ITexture* texture, + const core::position2d<s32>& pos, + const core::array<core::rect<s32> >& sourceRects, + const core::array<s32>& indices, + const core::rect<s32>* clipRect=0, + SColor color=SColor(255,255,255,255), + bool useAlphaChannelOfTexture=false); + + //! Draws a part of the texture into the rectangle. + virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false); + + //! draw an 2d rectangle + virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos, + const core::rect<s32>* clip = 0); + + //!Draws an 2d rectangle with a gradient. + virtual void draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip = 0); + + //! Draws a 2d line. + virtual void draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color=SColor(255,255,255,255)); + + //! Draws a single pixel + virtual void drawPixel(u32 x, u32 y, const SColor & color); + + //! Draws a 3d line. + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, + SColor color = SColor(255,255,255,255)); + + //! \return Returns the name of the video driver. Example: In case of the Direct3D8 + //! driver, it would return "Direct3D8.1". + virtual const wchar_t* getName() const; + + //! deletes all dynamic lights there are + virtual void deleteAllDynamicLights(); + + //! adds a dynamic light, returning an index to the light + //! \param light: the light data to use to create the light + //! \return An index to the light, or -1 if an error occurs + virtual s32 addDynamicLight(const SLight& light); + + //! Turns a dynamic light on or off + //! \param lightIndex: the index returned by addDynamicLight + //! \param turnOn: true to turn the light on, false to turn it off + virtual void turnLightOn(s32 lightIndex, bool turnOn); + + //! returns the maximal amount of dynamic lights the device can handle + virtual u32 getMaximalDynamicLightAmount() const; + + //! Sets the dynamic ambient light color. The default color is + //! (0,0,0,0) which means it is dark. + //! \param color: New color of the ambient light. + virtual void setAmbientLight(const SColorf& color); + + //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do + //! this: First, draw all geometry. Then use this method, to draw the shadow + //! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. + virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible=0); + + //! Fills the stencil shadow with color. After the shadow volume has been drawn + //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this + //! to draw the color of the shadow. + virtual void drawStencilShadow(bool clearStencilBuffer=false, + video::SColor leftUpEdge = video::SColor(0,0,0,0), + video::SColor rightUpEdge = video::SColor(0,0,0,0), + video::SColor leftDownEdge = video::SColor(0,0,0,0), + video::SColor rightDownEdge = video::SColor(0,0,0,0)); + + //! sets a viewport + virtual void setViewPort(const core::rect<s32>& area); + + //! Sets the fog mode. + virtual void setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog); + + //! Only used by the internal engine. Used to notify the driver that + //! the window was resized. + virtual void OnResize(const core::dimension2d<u32>& size); + + //! Returns type of video driver + virtual E_DRIVER_TYPE getDriverType() const; + + //! get color format of the current color buffer + virtual ECOLOR_FORMAT getColorFormat() const; + + //! Returns the transformation set by setTransform + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const; + + //! Can be called by an IMaterialRenderer to make its work easier. + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, + bool resetAllRenderstates); + + //! Sets a vertex shader constant. + virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + + //! Sets a pixel shader constant. + virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + + //! Sets a constant for the vertex shader based on a name. + virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count); + + //! Sets a constant for the pixel shader based on a name. + virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count); + + //! Bool interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count); + + //! Int interface for the above. + virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count); + + //! sets the current Texture + //! Returns whether setting was a success or not. + bool setActiveTexture(u32 stage, const video::ITexture* texture); + + //! disables all textures beginning with the optional fromStage parameter. Otherwise all texture stages are disabled. + //! Returns whether disabling was successful or not. + bool disableTextures(u32 fromStage=0); + + //! Adds a new material renderer to the VideoDriver, using + //! extGLGetObjectParameteriv(shaderHandle, GL_OBJECT_COMPILE_STATUS_ARB, &status) + //! pixel and/or vertex shaders to render geometry. + virtual s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, E_MATERIAL_TYPE baseMaterial, s32 userData); + + //! Adds a new material renderer to the VideoDriver, using GLSL to render geometry. + virtual s32 addHighLevelShaderMaterial( + const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, + s32 userData = 0, + E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT); + + //! Returns a pointer to the IVideoDriver interface. (Implementation for + //! IMaterialRendererServices) + virtual IVideoDriver* getVideoDriver(); + + //! Returns the maximum amount of primitives (mostly vertices) which + //! the device is able to render with one drawIndexedTriangleList + //! call. + virtual u32 getMaximalPrimitiveCount() const; + + virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! set or reset render target + virtual bool setRenderTarget(video::E_RENDER_TARGET target, bool clearTarget, + bool clearZBuffer, SColor color); + + //! set or reset render target texture + virtual bool setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color); + + //! Sets multiple render targets + virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture, + bool clearBackBuffer=true, bool clearZBuffer=true, SColor color=SColor(0,0,0,0)); + + //! Clears the ZBuffer. + virtual void clearZBuffer(); + + //! Returns an image created from the last rendered frame. + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER); + + //! checks if an OpenGL error has happend and prints it + //! for performance reasons only available in debug mode + bool testGLError(); + + //! Set/unset a clipping plane. + //! There are at least 6 clipping planes available for the user to set at will. + //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. + //! \param plane: The plane itself. + //! \param enable: If true, enable the clipping plane else disable it. + virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false); + + //! Enable/disable a clipping plane. + //! There are at least 6 clipping planes available for the user to set at will. + //! \param index: The plane index. Must be between 0 and MaxUserClipPlanes. + //! \param enable: If true, enable the clipping plane else disable it. + virtual void enableClipPlane(u32 index, bool enable); + + //! Enable the 2d override material + virtual void enableMaterial2D(bool enable=true); + + //! Returns the graphics card vendor name. + virtual core::stringc getVendorInfo() {return VendorName;} + + //! Returns the maximum texture size supported. + virtual core::dimension2du getMaxTextureSize() const; + + ITexture* createDepthTexture(ITexture* texture, bool shared=true); + void removeDepthTexture(ITexture* texture); + + //! Removes a texture from the texture cache and deletes it, freeing lot of memory. + void removeTexture(ITexture* texture); + + //! Convert E_PRIMITIVE_TYPE to OpenGL equivalent + GLenum primitiveTypeToGL(scene::E_PRIMITIVE_TYPE type) const; + + //! Convert E_BLEND_FACTOR to OpenGL equivalent + GLenum getGLBlend(E_BLEND_FACTOR factor) const; + + //! Get ZBuffer bits. + GLenum getZBufferBits() const; + + //! Get Cg context + #ifdef _IRR_COMPILE_WITH_CG_ + const CGcontext& getCgContext(); + #endif + + private: + + //! clears the zbuffer and color buffer + void clearBuffers(bool backBuffer, bool zBuffer, bool stencilBuffer, SColor color); + + bool updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer); + bool updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer); + + void uploadClipPlane(u32 index); + + //! inits the parts of the open gl driver used on all platforms + bool genericDriverInit(); + //! returns a device dependent texture from a software surface (IImage) + virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData); + + //! creates a transposed matrix in supplied GLfloat array to pass to OpenGL + inline void getGLMatrix(GLfloat gl_matrix[16], const core::matrix4& m); + inline void getGLTextureMatrix(GLfloat gl_matrix[16], const core::matrix4& m); + + //! Set GL pipeline to desired texture wrap modes of the material + void setWrapMode(const SMaterial& material); + + //! get native wrap mode value + GLint getTextureWrapMode(const u8 clamp); + + //! sets the needed renderstates + void setRenderStates3DMode(); + + //! sets the needed renderstates + void setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel); + + // returns the current size of the screen or rendertarget + virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const; + + void createMaterialRenderers(); + + //! Assign a hardware light to the specified requested light, if any + //! free hardware lights exist. + //! \param[in] lightIndex: the index of the requesting light + void assignHardwareLight(u32 lightIndex); + + //! helper function for render setup. + void getColorBuffer(const void* vertices, u32 vertexCount, E_VERTEX_TYPE vType); + + //! helper function doing the actual rendering. + void renderArray(const void* indexList, u32 primitiveCount, + scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType); + + core::stringw Name; + core::matrix4 Matrices[ETS_COUNT]; + core::array<u8> ColorBuffer; + + //! enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates. + enum E_RENDER_MODE + { + ERM_NONE = 0, // no render state has been set yet. + ERM_2D, // 2d drawing rendermode + ERM_3D // 3d rendering mode + }; + + E_RENDER_MODE CurrentRenderMode; + //! bool to make all renderstates reset if set to true. + bool ResetRenderStates; + bool Transformation3DChanged; + u8 AntiAlias; + + SMaterial Material, LastMaterial; + COpenGLTexture* RenderTargetTexture; + core::array<video::IRenderTarget> MRTargets; + class STextureStageCache + { + const ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES]; + public: + STextureStageCache() + { + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + { + CurrentTexture[i] = 0; + } + } + + ~STextureStageCache() + { + clear(); + } + + void set(u32 stage, const ITexture* tex) + { + if (stage<MATERIAL_MAX_TEXTURES) + { + const ITexture* oldTexture=CurrentTexture[stage]; + if (tex) + tex->grab(); + CurrentTexture[stage]=tex; + if (oldTexture) + oldTexture->drop(); + } + } + + const ITexture* operator[](int stage) const + { + if ((u32)stage<MATERIAL_MAX_TEXTURES) + return CurrentTexture[stage]; + else + return 0; + } + + void remove(const ITexture* tex) + { + for (s32 i = MATERIAL_MAX_TEXTURES-1; i>= 0; --i) + { + if (CurrentTexture[i] == tex) + { + tex->drop(); + CurrentTexture[i] = 0; + } + } + } + + void clear() + { + // Drop all the CurrentTexture handles + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + { + if (CurrentTexture[i]) + { + CurrentTexture[i]->drop(); + CurrentTexture[i] = 0; + } + } + } + }; + STextureStageCache CurrentTexture; + core::array<ITexture*> DepthTextures; + struct SUserClipPlane + { + SUserClipPlane() : Enabled(false) {} + core::plane3df Plane; + bool Enabled; + }; + core::array<SUserClipPlane> UserClipPlanes; + + core::dimension2d<u32> CurrentRendertargetSize; + + core::stringc VendorName; + + core::matrix4 TextureFlipMatrix; + + //! Color buffer format + ECOLOR_FORMAT ColorFormat; + + //! Render target type for render operations + E_RENDER_TARGET CurrentTarget; + + SIrrlichtCreationParameters Params; + + //! All the lights that have been requested; a hardware limited + //! number of them will be used at once. + struct RequestedLight + { + RequestedLight(SLight const & lightData) + : LightData(lightData), HardwareLightIndex(-1), DesireToBeOn(true) { } + + SLight LightData; + s32 HardwareLightIndex; // GL_LIGHT0 - GL_LIGHT7 + bool DesireToBeOn; + }; + core::array<RequestedLight> RequestedLights; + + #ifdef _IRR_WINDOWS_API_ + HDC HDc; // Private GDI Device Context + HWND Window; + #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + CIrrDeviceWin32 *Win32Device; + #endif + #endif + #ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + GLXDrawable Drawable; + Display* X11Display; + CIrrDeviceLinux *X11Device; + #endif + #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + CIrrDeviceMacOSX *OSXDevice; + #endif + #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ + CIrrDeviceSDL *SDLDevice; + #endif + #ifdef _IRR_COMPILE_WITH_CG_ + CGcontext CgContext; + #endif + + E_DEVICE_TYPE DeviceType; + }; + +} // end namespace video +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_OPENGL_ +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.cpp new file mode 100644 index 0000000..ae64ffd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.cpp @@ -0,0 +1,804 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLExtensionHandler.h" +#include "irrString.h" +#include "SMaterial.h" // for MATERIAL_MAX_TEXTURES +#include "fast_atof.h" + +namespace irr +{ +namespace video +{ + +COpenGLExtensionHandler::COpenGLExtensionHandler() : + StencilBuffer(false), MultiTextureExtension(false), + TextureCompressionExtension(false), + MaxSupportedTextures(1), MaxTextureUnits(1), MaxLights(1), + MaxAnisotropy(1), MaxUserClipPlanes(0), MaxAuxBuffers(0), + MaxMultipleRenderTargets(1), MaxIndices(65535), + MaxTextureSize(1), MaxGeometryVerticesOut(0), + MaxTextureLODBias(0.f), Version(0), ShaderLanguageVersion(0), + OcclusionQuerySupport(false) +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + ,pGlActiveTextureARB(0), pGlClientActiveTextureARB(0), + pGlGenProgramsARB(0), pGlGenProgramsNV(0), + pGlBindProgramARB(0), pGlBindProgramNV(0), + pGlDeleteProgramsARB(0), pGlDeleteProgramsNV(0), + pGlProgramStringARB(0), pGlLoadProgramNV(0), + pGlProgramLocalParameter4fvARB(0), + pGlCreateShaderObjectARB(0), pGlShaderSourceARB(0), + pGlCompileShaderARB(0), pGlCreateProgramObjectARB(0), pGlAttachObjectARB(0), + pGlLinkProgramARB(0), pGlUseProgramObjectARB(0), pGlDeleteObjectARB(0), + pGlCreateProgram(0), pGlUseProgram(0), + pGlDeleteProgram(0), pGlDeleteShader(0), + pGlGetAttachedObjectsARB(0), pGlGetAttachedShaders(0), + pGlCreateShader(0), pGlShaderSource(0), pGlCompileShader(0), + pGlAttachShader(0), pGlLinkProgram(0), + pGlGetInfoLogARB(0), pGlGetShaderInfoLog(0), pGlGetProgramInfoLog(0), + pGlGetObjectParameterivARB(0), pGlGetShaderiv(0), pGlGetProgramiv(0), + pGlGetUniformLocationARB(0), pGlGetUniformLocation(0), + pGlUniform1fvARB(0), pGlUniform2fvARB(0), pGlUniform3fvARB(0), pGlUniform4fvARB(0), + pGlUniform1ivARB(0), pGlUniform2ivARB(0), pGlUniform3ivARB(0), pGlUniform4ivARB(0), + pGlUniformMatrix2fvARB(0), pGlUniformMatrix3fvARB(0), pGlUniformMatrix4fvARB(0), + pGlGetActiveUniformARB(0), pGlGetActiveUniform(0), + pGlPointParameterfARB(0), pGlPointParameterfvARB(0), + pGlStencilFuncSeparate(0), pGlStencilOpSeparate(0), + pGlStencilFuncSeparateATI(0), pGlStencilOpSeparateATI(0), + pGlCompressedTexImage2D(0), + // ARB framebuffer object + pGlBindFramebuffer(0), pGlDeleteFramebuffers(0), pGlGenFramebuffers(0), + pGlCheckFramebufferStatus(0), pGlFramebufferTexture2D(0), + pGlBindRenderbuffer(0), pGlDeleteRenderbuffers(0), pGlGenRenderbuffers(0), + pGlRenderbufferStorage(0), pGlFramebufferRenderbuffer(0), pGlGenerateMipmap(0), + // EXT framebuffer object + pGlBindFramebufferEXT(0), pGlDeleteFramebuffersEXT(0), pGlGenFramebuffersEXT(0), + pGlCheckFramebufferStatusEXT(0), pGlFramebufferTexture2DEXT(0), + pGlBindRenderbufferEXT(0), pGlDeleteRenderbuffersEXT(0), pGlGenRenderbuffersEXT(0), + pGlRenderbufferStorageEXT(0), pGlFramebufferRenderbufferEXT(0), pGlGenerateMipmapEXT(0), + // MRTs + pGlDrawBuffersARB(0), pGlDrawBuffersATI(0), + pGlGenBuffersARB(0), pGlBindBufferARB(0), pGlBufferDataARB(0), pGlDeleteBuffersARB(0), + pGlBufferSubDataARB(0), pGlGetBufferSubDataARB(0), pGlMapBufferARB(0), pGlUnmapBufferARB(0), + pGlIsBufferARB(0), pGlGetBufferParameterivARB(0), pGlGetBufferPointervARB(0), + pGlProvokingVertexARB(0), pGlProvokingVertexEXT(0), + pGlColorMaskIndexedEXT(0), pGlEnableIndexedEXT(0), pGlDisableIndexedEXT(0), + pGlBlendFuncIndexedAMD(0), pGlBlendFunciARB(0), + pGlBlendEquationIndexedAMD(0), pGlBlendEquationiARB(0), + pGlProgramParameteriARB(0), pGlProgramParameteriEXT(0), + pGlGenQueriesARB(0), pGlDeleteQueriesARB(0), pGlIsQueryARB(0), + pGlBeginQueryARB(0), pGlEndQueryARB(0), pGlGetQueryivARB(0), + pGlGetQueryObjectivARB(0), pGlGetQueryObjectuivARB(0), + pGlGenOcclusionQueriesNV(0), pGlDeleteOcclusionQueriesNV(0), + pGlIsOcclusionQueryNV(0), pGlBeginOcclusionQueryNV(0), + pGlEndOcclusionQueryNV(0), pGlGetOcclusionQueryivNV(0), + pGlGetOcclusionQueryuivNV(0), + pGlBlendEquationEXT(0), pGlBlendEquation(0) +#if defined(GLX_SGI_swap_control) + ,pGlxSwapIntervalSGI(0) +#endif +#if defined(GLX_EXT_swap_control) + ,pGlxSwapIntervalEXT(0) +#endif +#if defined(WGL_EXT_swap_control) + ,pWglSwapIntervalEXT(0) +#endif +#if defined(GLX_MESA_swap_control) + ,pGlxSwapIntervalMESA(0) +#endif +#endif // _IRR_OPENGL_USE_EXTPOINTER_ +{ + for (u32 i=0; i<IRR_OpenGL_Feature_Count; ++i) + FeatureAvailable[i]=false; + DimAliasedLine[0]=1.f; + DimAliasedLine[1]=1.f; + DimAliasedPoint[0]=1.f; + DimAliasedPoint[1]=1.f; + DimSmoothedLine[0]=1.f; + DimSmoothedLine[1]=1.f; + DimSmoothedPoint[0]=1.f; + DimSmoothedPoint[1]=1.f; +} + + +void COpenGLExtensionHandler::dump() const +{ + for (u32 i=0; i<IRR_OpenGL_Feature_Count; ++i) + os::Printer::log(OpenGLFeatureStrings[i], FeatureAvailable[i]?" true":" false"); +} + + +void COpenGLExtensionHandler::dumpFramebufferFormats() const +{ +#ifdef _IRR_WINDOWS_API_ + HDC hdc=wglGetCurrentDC(); + core::stringc wglExtensions; +#ifdef WGL_ARB_extensions_string + PFNWGLGETEXTENSIONSSTRINGARBPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); + if (irrGetExtensionsString) + wglExtensions = irrGetExtensionsString(hdc); +#elif defined(WGL_EXT_extensions_string) + PFNWGLGETEXTENSIONSSTRINGEXTPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)wglGetProcAddress("wglGetExtensionsStringEXT"); + if (irrGetExtensionsString) + wglExtensions = irrGetExtensionsString(hdc); +#endif + const bool pixel_format_supported = (wglExtensions.find("WGL_ARB_pixel_format") != -1); + const bool multi_sample_supported = ((wglExtensions.find("WGL_ARB_multisample") != -1) || + (wglExtensions.find("WGL_EXT_multisample") != -1) || (wglExtensions.find("WGL_3DFX_multisample") != -1) ); +#ifdef _DEBUG + os::Printer::log("WGL_extensions", wglExtensions); +#endif + +#ifdef WGL_ARB_pixel_format + PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat_ARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); + if (pixel_format_supported && wglChoosePixelFormat_ARB) + { + // This value determines the number of samples used for antialiasing + // My experience is that 8 does not show a big + // improvement over 4, but 4 shows a big improvement + // over 2. + + PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribiv_ARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)wglGetProcAddress("wglGetPixelFormatAttribivARB"); + if (wglGetPixelFormatAttribiv_ARB) + { + int vals[128]; + int atts[] = { + WGL_NUMBER_PIXEL_FORMATS_ARB, + WGL_DRAW_TO_BITMAP_ARB, + WGL_ACCELERATION_ARB, + WGL_NEED_PALETTE_ARB, + WGL_NEED_SYSTEM_PALETTE_ARB, + WGL_SWAP_LAYER_BUFFERS_ARB, + WGL_SWAP_METHOD_ARB, + WGL_NUMBER_OVERLAYS_ARB, + WGL_NUMBER_UNDERLAYS_ARB, + WGL_TRANSPARENT_ARB, + WGL_TRANSPARENT_RED_VALUE_ARB, + WGL_TRANSPARENT_GREEN_VALUE_ARB, + WGL_TRANSPARENT_BLUE_VALUE_ARB, + WGL_TRANSPARENT_ALPHA_VALUE_ARB, + WGL_TRANSPARENT_INDEX_VALUE_ARB, + WGL_SHARE_DEPTH_ARB, + WGL_SHARE_STENCIL_ARB, + WGL_SHARE_ACCUM_ARB, + WGL_SUPPORT_GDI_ARB, + WGL_SUPPORT_OPENGL_ARB, + WGL_DOUBLE_BUFFER_ARB, + WGL_STEREO_ARB, + WGL_PIXEL_TYPE_ARB, + WGL_COLOR_BITS_ARB, + WGL_RED_BITS_ARB, + WGL_RED_SHIFT_ARB, + WGL_GREEN_BITS_ARB, + WGL_GREEN_SHIFT_ARB, + WGL_BLUE_BITS_ARB, + WGL_BLUE_SHIFT_ARB, + WGL_ALPHA_BITS_ARB, + WGL_ALPHA_SHIFT_ARB, + WGL_ACCUM_BITS_ARB, + WGL_ACCUM_RED_BITS_ARB, + WGL_ACCUM_GREEN_BITS_ARB, + WGL_ACCUM_BLUE_BITS_ARB, + WGL_ACCUM_ALPHA_BITS_ARB, + WGL_DEPTH_BITS_ARB, + WGL_STENCIL_BITS_ARB, + WGL_AUX_BUFFERS_ARB +#ifdef WGL_ARB_render_texture + ,WGL_BIND_TO_TEXTURE_RGB_ARB //40 + ,WGL_BIND_TO_TEXTURE_RGBA_ARB +#endif +#ifdef WGL_ARB_pbuffer + ,WGL_DRAW_TO_PBUFFER_ARB //42 + ,WGL_MAX_PBUFFER_PIXELS_ARB + ,WGL_MAX_PBUFFER_WIDTH_ARB + ,WGL_MAX_PBUFFER_HEIGHT_ARB +#endif +#ifdef WGL_ARB_framebuffer_sRGB + ,WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB //46 +#endif +#ifdef WGL_ARB_multisample + ,WGL_SAMPLES_ARB //47 + ,WGL_SAMPLE_BUFFERS_ARB +#endif +#ifdef WGL_EXT_depth_float + ,WGL_DEPTH_FLOAT_EXT //49 +#endif + ,0,0,0,0 + }; + size_t nums = sizeof(atts)/sizeof(int); + const bool depth_float_supported= (wglExtensions.find("WGL_EXT_depth_float") != -1); + if (!depth_float_supported) + { + memmove(&atts[49], &atts[50], (nums-50)*sizeof(int)); + nums -= 1; + } + if (!multi_sample_supported) + { + memmove(&atts[47], &atts[49], (nums-49)*sizeof(int)); + nums -= 2; + } + const bool framebuffer_sRGB_supported= (wglExtensions.find("WGL_ARB_framebuffer_sRGB") != -1); + if (!framebuffer_sRGB_supported) + { + memmove(&atts[46], &atts[47], (nums-47)*sizeof(int)); + nums -= 1; + } + const bool pbuffer_supported = (wglExtensions.find("WGL_ARB_pbuffer") != -1); + if (!pbuffer_supported) + { + memmove(&atts[42], &atts[46], (nums-46)*sizeof(int)); + nums -= 4; + } + const bool render_texture_supported = (wglExtensions.find("WGL_ARB_render_texture") != -1); + if (!render_texture_supported) + { + memmove(&atts[40], &atts[42], (nums-42)*sizeof(int)); + nums -= 2; + } + wglGetPixelFormatAttribiv_ARB(hdc,0,0,1,atts,vals); + const int count = vals[0]; + atts[0]=WGL_DRAW_TO_WINDOW_ARB; + for (int i=1; i<count; ++i) + { + memset(vals,0,sizeof(vals)); +#define tmplog(x,y) os::Printer::log(x, core::stringc(y).c_str()) + const BOOL res = wglGetPixelFormatAttribiv_ARB(hdc,i,0,nums,atts,vals); + if (FALSE==res) + continue; + tmplog("Pixel format ",i); + u32 j=0; + tmplog("Draw to window " , vals[j]); + tmplog("Draw to bitmap " , vals[++j]); + ++j; + tmplog("Acceleration " , (vals[j]==WGL_NO_ACCELERATION_ARB?"No": + vals[j]==WGL_GENERIC_ACCELERATION_ARB?"Generic":vals[j]==WGL_FULL_ACCELERATION_ARB?"Full":"ERROR")); + tmplog("Need palette " , vals[++j]); + tmplog("Need system palette " , vals[++j]); + tmplog("Swap layer buffers " , vals[++j]); + ++j; + tmplog("Swap method " , (vals[j]==WGL_SWAP_EXCHANGE_ARB?"Exchange": + vals[j]==WGL_SWAP_COPY_ARB?"Copy":vals[j]==WGL_SWAP_UNDEFINED_ARB?"Undefined":"ERROR")); + tmplog("Number of overlays " , vals[++j]); + tmplog("Number of underlays " , vals[++j]); + tmplog("Transparent " , vals[++j]); + tmplog("Transparent red value " , vals[++j]); + tmplog("Transparent green value " , vals[++j]); + tmplog("Transparent blue value " , vals[++j]); + tmplog("Transparent alpha value " , vals[++j]); + tmplog("Transparent index value " , vals[++j]); + tmplog("Share depth " , vals[++j]); + tmplog("Share stencil " , vals[++j]); + tmplog("Share accum " , vals[++j]); + tmplog("Support GDI " , vals[++j]); + tmplog("Support OpenGL " , vals[++j]); + tmplog("Double Buffer " , vals[++j]); + tmplog("Stereo Buffer " , vals[++j]); + tmplog("Pixel type " , vals[++j]); + tmplog("Color bits" , vals[++j]); + tmplog("Red bits " , vals[++j]); + tmplog("Red shift " , vals[++j]); + tmplog("Green bits " , vals[++j]); + tmplog("Green shift " , vals[++j]); + tmplog("Blue bits " , vals[++j]); + tmplog("Blue shift " , vals[++j]); + tmplog("Alpha bits " , vals[++j]); + tmplog("Alpha Shift " , vals[++j]); + tmplog("Accum bits " , vals[++j]); + tmplog("Accum red bits " , vals[++j]); + tmplog("Accum green bits " , vals[++j]); + tmplog("Accum blue bits " , vals[++j]); + tmplog("Accum alpha bits " , vals[++j]); + tmplog("Depth bits " , vals[++j]); + tmplog("Stencil bits " , vals[++j]); + tmplog("Aux buffers " , vals[++j]); + if (render_texture_supported) + { + tmplog("Bind to texture RGB" , vals[++j]); + tmplog("Bind to texture RGBA" , vals[++j]); + } + if (pbuffer_supported) + { + tmplog("Draw to pbuffer" , vals[++j]); + tmplog("Max pbuffer pixels " , vals[++j]); + tmplog("Max pbuffer width" , vals[++j]); + tmplog("Max pbuffer height" , vals[++j]); + } + if (framebuffer_sRGB_supported) + tmplog("Framebuffer sRBG capable" , vals[++j]); + if (multi_sample_supported) + { + tmplog("Samples " , vals[++j]); + tmplog("Sample buffers " , vals[++j]); + } + if (depth_float_supported) + tmplog("Depth float" , vals[++j]); +#undef tmplog + } + } + } +#endif +#elif defined(IRR_LINUX_DEVICE) +#endif +} + + +void COpenGLExtensionHandler::initExtensions(bool stencilBuffer) +{ + const f32 ogl_ver = core::fast_atof(reinterpret_cast<const c8*>(glGetString(GL_VERSION))); + Version = static_cast<u16>(core::floor32(ogl_ver)*100+core::round32(core::fract(ogl_ver)*10.0f)); + if ( Version >= 102) + os::Printer::log("OpenGL driver version is 1.2 or better.", ELL_INFORMATION); + else + os::Printer::log("OpenGL driver version is not 1.2 or better.", ELL_WARNING); + + { + const char* t = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); + size_t len = 0; + c8 *str = 0; + if (t) + { + len = strlen(t); + str = new c8[len+1]; + } + c8* p = str; + + for (size_t i=0; i<len; ++i) + { + str[i] = static_cast<char>(t[i]); + + if (str[i] == ' ') + { + str[i] = 0; + for (u32 j=0; j<IRR_OpenGL_Feature_Count; ++j) + { + if (!strcmp(OpenGLFeatureStrings[j], p)) + { + FeatureAvailable[j] = true; + break; + } + } + + p = p + strlen(p) + 1; + } + } + + delete [] str; + } + + MultiTextureExtension = FeatureAvailable[IRR_ARB_multitexture]; + TextureCompressionExtension = FeatureAvailable[IRR_ARB_texture_compression]; + StencilBuffer=stencilBuffer; + +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ +#ifdef _IRR_WINDOWS_API_ + #define IRR_OGL_LOAD_EXTENSION(x) wglGetProcAddress(reinterpret_cast<const char*>(x)) +#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_) + #define IRR_OGL_LOAD_EXTENSION(x) SDL_GL_GetProcAddress(reinterpret_cast<const char*>(x)) +#else + // Accessing the correct function is quite complex + // All libraries should support the ARB version, however + // since GLX 1.4 the non-ARB version is the official one + // So we have to check the runtime environment and + // choose the proper symbol + // In case you still have problems please enable the + // next line by uncommenting it + // #define _IRR_GETPROCADDRESS_WORKAROUND_ + + #ifndef _IRR_GETPROCADDRESS_WORKAROUND_ + __GLXextFuncPtr (*IRR_OGL_LOAD_EXTENSION_FUNCP)(const GLubyte*)=0; + #ifdef GLX_VERSION_1_4 + int major=0,minor=0; + if (glXGetCurrentDisplay()) + glXQueryVersion(glXGetCurrentDisplay(), &major, &minor); + if ((major>1) || (minor>3)) + IRR_OGL_LOAD_EXTENSION_FUNCP=glXGetProcAddress; + else + #endif + IRR_OGL_LOAD_EXTENSION_FUNCP=glXGetProcAddressARB; + #define IRR_OGL_LOAD_EXTENSION(X) IRR_OGL_LOAD_EXTENSION_FUNCP(reinterpret_cast<const GLubyte*>(X)) + #else + #define IRR_OGL_LOAD_EXTENSION(X) glXGetProcAddressARB(reinterpret_cast<const GLubyte*>(X)) + #endif // workaround +#endif // Windows, SDL, or Linux + + // get multitexturing function pointers + pGlActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) IRR_OGL_LOAD_EXTENSION("glActiveTextureARB"); + pGlClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) IRR_OGL_LOAD_EXTENSION("glClientActiveTextureARB"); + + // get fragment and vertex program function pointers + pGlGenProgramsARB = (PFNGLGENPROGRAMSARBPROC) IRR_OGL_LOAD_EXTENSION("glGenProgramsARB"); + pGlGenProgramsNV = (PFNGLGENPROGRAMSNVPROC) IRR_OGL_LOAD_EXTENSION("glGenProgramsNV"); + pGlBindProgramARB = (PFNGLBINDPROGRAMARBPROC) IRR_OGL_LOAD_EXTENSION("glBindProgramARB"); + pGlBindProgramNV = (PFNGLBINDPROGRAMNVPROC) IRR_OGL_LOAD_EXTENSION("glBindProgramNV"); + pGlProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC) IRR_OGL_LOAD_EXTENSION("glProgramStringARB"); + pGlLoadProgramNV = (PFNGLLOADPROGRAMNVPROC) IRR_OGL_LOAD_EXTENSION("glLoadProgramNV"); + pGlDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC) IRR_OGL_LOAD_EXTENSION("glDeleteProgramsARB"); + pGlDeleteProgramsNV = (PFNGLDELETEPROGRAMSNVPROC) IRR_OGL_LOAD_EXTENSION("glDeleteProgramsNV"); + pGlProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) IRR_OGL_LOAD_EXTENSION("glProgramLocalParameter4fvARB"); + pGlCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) IRR_OGL_LOAD_EXTENSION("glCreateShaderObjectARB"); + pGlCreateShader = (PFNGLCREATESHADERPROC) IRR_OGL_LOAD_EXTENSION("glCreateShader"); + pGlShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) IRR_OGL_LOAD_EXTENSION("glShaderSourceARB"); + pGlShaderSource = (PFNGLSHADERSOURCEPROC) IRR_OGL_LOAD_EXTENSION("glShaderSource"); + pGlCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) IRR_OGL_LOAD_EXTENSION("glCompileShaderARB"); + pGlCompileShader = (PFNGLCOMPILESHADERPROC) IRR_OGL_LOAD_EXTENSION("glCompileShader"); + pGlCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) IRR_OGL_LOAD_EXTENSION("glCreateProgramObjectARB"); + pGlCreateProgram = (PFNGLCREATEPROGRAMPROC) IRR_OGL_LOAD_EXTENSION("glCreateProgram"); + pGlAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) IRR_OGL_LOAD_EXTENSION("glAttachObjectARB"); + pGlAttachShader = (PFNGLATTACHSHADERPROC) IRR_OGL_LOAD_EXTENSION("glAttachShader"); + pGlLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) IRR_OGL_LOAD_EXTENSION("glLinkProgramARB"); + pGlLinkProgram = (PFNGLLINKPROGRAMPROC) IRR_OGL_LOAD_EXTENSION("glLinkProgram"); + pGlUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) IRR_OGL_LOAD_EXTENSION("glUseProgramObjectARB"); + pGlUseProgram = (PFNGLUSEPROGRAMPROC) IRR_OGL_LOAD_EXTENSION("glUseProgram"); + pGlDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) IRR_OGL_LOAD_EXTENSION("glDeleteObjectARB"); + pGlDeleteProgram = (PFNGLDELETEPROGRAMPROC) IRR_OGL_LOAD_EXTENSION("glDeleteProgram"); + pGlDeleteShader = (PFNGLDELETESHADERPROC) IRR_OGL_LOAD_EXTENSION("glDeleteShader"); + pGlGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) IRR_OGL_LOAD_EXTENSION("glGetAttachedShaders"); + pGlGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC) IRR_OGL_LOAD_EXTENSION("glGetAttachedObjectsARB"); + pGlGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) IRR_OGL_LOAD_EXTENSION("glGetInfoLogARB"); + pGlGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) IRR_OGL_LOAD_EXTENSION("glGetShaderInfoLog"); + pGlGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) IRR_OGL_LOAD_EXTENSION("glGetProgramInfoLog"); + pGlGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetObjectParameterivARB"); + pGlGetShaderiv = (PFNGLGETSHADERIVPROC) IRR_OGL_LOAD_EXTENSION("glGetShaderiv"); + pGlGetProgramiv = (PFNGLGETPROGRAMIVPROC) IRR_OGL_LOAD_EXTENSION("glGetProgramiv"); + pGlGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) IRR_OGL_LOAD_EXTENSION("glGetUniformLocationARB"); + pGlGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) IRR_OGL_LOAD_EXTENSION("glGetUniformLocation"); + pGlUniform1fvARB = (PFNGLUNIFORM1FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform1fvARB"); + pGlUniform2fvARB = (PFNGLUNIFORM2FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform2fvARB"); + pGlUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform3fvARB"); + pGlUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform4fvARB"); + pGlUniform1ivARB = (PFNGLUNIFORM1IVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform1ivARB"); + pGlUniform2ivARB = (PFNGLUNIFORM2IVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform2ivARB"); + pGlUniform3ivARB = (PFNGLUNIFORM3IVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform3ivARB"); + pGlUniform4ivARB = (PFNGLUNIFORM4IVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniform4ivARB"); + pGlUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniformMatrix2fvARB"); + pGlUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniformMatrix3fvARB"); + pGlUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC) IRR_OGL_LOAD_EXTENSION("glUniformMatrix4fvARB"); + pGlGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC) IRR_OGL_LOAD_EXTENSION("glGetActiveUniformARB"); + pGlGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) IRR_OGL_LOAD_EXTENSION("glGetActiveUniform"); + + // get point parameter extension + pGlPointParameterfARB = (PFNGLPOINTPARAMETERFARBPROC) IRR_OGL_LOAD_EXTENSION("glPointParameterfARB"); + pGlPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC) IRR_OGL_LOAD_EXTENSION("glPointParameterfvARB"); + + // get stencil extension + pGlStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) IRR_OGL_LOAD_EXTENSION("glStencilFuncSeparate"); + pGlStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) IRR_OGL_LOAD_EXTENSION("glStencilOpSeparate"); + pGlStencilFuncSeparateATI = (PFNGLSTENCILFUNCSEPARATEATIPROC) IRR_OGL_LOAD_EXTENSION("glStencilFuncSeparateATI"); + pGlStencilOpSeparateATI = (PFNGLSTENCILOPSEPARATEATIPROC) IRR_OGL_LOAD_EXTENSION("glStencilOpSeparateATI"); + + // compressed textures + pGlCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) IRR_OGL_LOAD_EXTENSION("glCompressedTexImage2D"); + + // ARB FrameBufferObjects + pGlBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) IRR_OGL_LOAD_EXTENSION("glBindFramebuffer"); + pGlDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) IRR_OGL_LOAD_EXTENSION("glDeleteFramebuffers"); + pGlGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) IRR_OGL_LOAD_EXTENSION("glGenFramebuffers"); + pGlCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) IRR_OGL_LOAD_EXTENSION("glCheckFramebufferStatus"); + pGlFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) IRR_OGL_LOAD_EXTENSION("glFramebufferTexture2D"); + pGlBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) IRR_OGL_LOAD_EXTENSION("glBindRenderbuffer"); + pGlDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) IRR_OGL_LOAD_EXTENSION("glDeleteRenderbuffers"); + pGlGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) IRR_OGL_LOAD_EXTENSION("glGenRenderbuffers"); + pGlRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) IRR_OGL_LOAD_EXTENSION("glRenderbufferStorage"); + pGlFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) IRR_OGL_LOAD_EXTENSION("glFramebufferRenderbuffer"); + pGlGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) IRR_OGL_LOAD_EXTENSION("glGenerateMipmap"); + + // EXT FrameBufferObjects + pGlBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC) IRR_OGL_LOAD_EXTENSION("glBindFramebufferEXT"); + pGlDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC) IRR_OGL_LOAD_EXTENSION("glDeleteFramebuffersEXT"); + pGlGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC) IRR_OGL_LOAD_EXTENSION("glGenFramebuffersEXT"); + pGlCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) IRR_OGL_LOAD_EXTENSION("glCheckFramebufferStatusEXT"); + pGlFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) IRR_OGL_LOAD_EXTENSION("glFramebufferTexture2DEXT"); + pGlBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC) IRR_OGL_LOAD_EXTENSION("glBindRenderbufferEXT"); + pGlDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC) IRR_OGL_LOAD_EXTENSION("glDeleteRenderbuffersEXT"); + pGlGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC) IRR_OGL_LOAD_EXTENSION("glGenRenderbuffersEXT"); + pGlRenderbufferStorageEXT = (PFNGLRENDERBUFFERSTORAGEEXTPROC) IRR_OGL_LOAD_EXTENSION("glRenderbufferStorageEXT"); + pGlFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) IRR_OGL_LOAD_EXTENSION("glFramebufferRenderbufferEXT"); + pGlGenerateMipmapEXT = (PFNGLGENERATEMIPMAPEXTPROC) IRR_OGL_LOAD_EXTENSION("glGenerateMipmapEXT"); + pGlDrawBuffersARB = (PFNGLDRAWBUFFERSARBPROC) IRR_OGL_LOAD_EXTENSION("glDrawBuffersARB"); + pGlDrawBuffersATI = (PFNGLDRAWBUFFERSATIPROC) IRR_OGL_LOAD_EXTENSION("glDrawBuffersATI"); + + // get vertex buffer extension + pGlGenBuffersARB = (PFNGLGENBUFFERSARBPROC) IRR_OGL_LOAD_EXTENSION("glGenBuffersARB"); + pGlBindBufferARB = (PFNGLBINDBUFFERARBPROC) IRR_OGL_LOAD_EXTENSION("glBindBufferARB"); + pGlBufferDataARB = (PFNGLBUFFERDATAARBPROC) IRR_OGL_LOAD_EXTENSION("glBufferDataARB"); + pGlDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) IRR_OGL_LOAD_EXTENSION("glDeleteBuffersARB"); + pGlBufferSubDataARB= (PFNGLBUFFERSUBDATAARBPROC) IRR_OGL_LOAD_EXTENSION("glBufferSubDataARB"); + pGlGetBufferSubDataARB= (PFNGLGETBUFFERSUBDATAARBPROC)IRR_OGL_LOAD_EXTENSION("glGetBufferSubDataARB"); + pGlMapBufferARB= (PFNGLMAPBUFFERARBPROC) IRR_OGL_LOAD_EXTENSION("glMapBufferARB"); + pGlUnmapBufferARB= (PFNGLUNMAPBUFFERARBPROC) IRR_OGL_LOAD_EXTENSION("glUnmapBufferARB"); + pGlIsBufferARB= (PFNGLISBUFFERARBPROC) IRR_OGL_LOAD_EXTENSION("glIsBufferARB"); + pGlGetBufferParameterivARB= (PFNGLGETBUFFERPARAMETERIVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetBufferParameterivARB"); + pGlGetBufferPointervARB= (PFNGLGETBUFFERPOINTERVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetBufferPointervARB"); + pGlProvokingVertexARB= (PFNGLPROVOKINGVERTEXPROC) IRR_OGL_LOAD_EXTENSION("glProvokingVertex"); + pGlProvokingVertexEXT= (PFNGLPROVOKINGVERTEXEXTPROC) IRR_OGL_LOAD_EXTENSION("glProvokingVertexEXT"); + pGlColorMaskIndexedEXT= (PFNGLCOLORMASKINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glColorMaskIndexedEXT"); + pGlEnableIndexedEXT= (PFNGLENABLEINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glEnableIndexedEXT"); + pGlDisableIndexedEXT= (PFNGLDISABLEINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glDisableIndexedEXT"); + pGlBlendFuncIndexedAMD= (PFNGLBLENDFUNCINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncIndexedAMD"); + pGlBlendFunciARB= (PFNGLBLENDFUNCIPROC) IRR_OGL_LOAD_EXTENSION("glBlendFunciARB"); + pGlBlendEquationIndexedAMD= (PFNGLBLENDEQUATIONINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationIndexedAMD"); + pGlBlendEquationiARB= (PFNGLBLENDEQUATIONIPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationiARB"); + pGlProgramParameteriARB= (PFNGLPROGRAMPARAMETERIARBPROC) IRR_OGL_LOAD_EXTENSION("glProgramParameteriARB"); + pGlProgramParameteriEXT= (PFNGLPROGRAMPARAMETERIEXTPROC) IRR_OGL_LOAD_EXTENSION("glProgramParameteriEXT"); + + // occlusion query + pGlGenQueriesARB = (PFNGLGENQUERIESARBPROC) IRR_OGL_LOAD_EXTENSION("glGenQueriesARB"); + pGlDeleteQueriesARB = (PFNGLDELETEQUERIESARBPROC) IRR_OGL_LOAD_EXTENSION("glDeleteQueriesARB"); + pGlIsQueryARB = (PFNGLISQUERYARBPROC) IRR_OGL_LOAD_EXTENSION("glIsQueryARB"); + pGlBeginQueryARB = (PFNGLBEGINQUERYARBPROC) IRR_OGL_LOAD_EXTENSION("glBeginQueryARB"); + pGlEndQueryARB = (PFNGLENDQUERYARBPROC) IRR_OGL_LOAD_EXTENSION("glEndQueryARB"); + pGlGetQueryivARB = (PFNGLGETQUERYIVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetQueryivARB"); + pGlGetQueryObjectivARB = (PFNGLGETQUERYOBJECTIVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetQueryObjectivARB"); + pGlGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetQueryObjectuivARB"); + pGlGenOcclusionQueriesNV = (PFNGLGENOCCLUSIONQUERIESNVPROC) IRR_OGL_LOAD_EXTENSION("glGenOcclusionQueriesNV"); + pGlDeleteOcclusionQueriesNV = (PFNGLDELETEOCCLUSIONQUERIESNVPROC) IRR_OGL_LOAD_EXTENSION("glDeleteOcclusionQueriesNV"); + pGlIsOcclusionQueryNV = (PFNGLISOCCLUSIONQUERYNVPROC) IRR_OGL_LOAD_EXTENSION("glIsOcclusionQueryNV"); + pGlBeginOcclusionQueryNV = (PFNGLBEGINOCCLUSIONQUERYNVPROC) IRR_OGL_LOAD_EXTENSION("glBeginOcclusionQueryNV"); + pGlEndOcclusionQueryNV = (PFNGLENDOCCLUSIONQUERYNVPROC) IRR_OGL_LOAD_EXTENSION("glEndOcclusionQueryNV"); + pGlGetOcclusionQueryivNV = (PFNGLGETOCCLUSIONQUERYIVNVPROC) IRR_OGL_LOAD_EXTENSION("glGetOcclusionQueryivNV"); + pGlGetOcclusionQueryuivNV = (PFNGLGETOCCLUSIONQUERYUIVNVPROC) IRR_OGL_LOAD_EXTENSION("glGetOcclusionQueryuivNV"); + + // blend equation + pGlBlendEquationEXT = (PFNGLBLENDEQUATIONEXTPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationEXT"); + pGlBlendEquation = (PFNGLBLENDEQUATIONPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquation"); + + // get vsync extension + #if defined(WGL_EXT_swap_control) && !defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + pWglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) IRR_OGL_LOAD_EXTENSION("wglSwapIntervalEXT"); + #endif + #if defined(GLX_SGI_swap_control) && !defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + pGlxSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)IRR_OGL_LOAD_EXTENSION("glXSwapIntervalSGI"); + #endif + #if defined(GLX_EXT_swap_control) && !defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + pGlxSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)IRR_OGL_LOAD_EXTENSION("glXSwapIntervalEXT"); + #endif + #if defined(GLX_MESA_swap_control) && !defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + pGlxSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)IRR_OGL_LOAD_EXTENSION("glXSwapIntervalMESA"); + #endif +#endif // use extension pointer + + GLint num=0; + // set some properties +#if defined(GL_ARB_multitexture) || defined(GL_VERSION_1_3) + if (Version>102 || FeatureAvailable[IRR_ARB_multitexture]) + { +#if defined(GL_MAX_TEXTURE_UNITS) + glGetIntegerv(GL_MAX_TEXTURE_UNITS, &num); +#elif defined(GL_MAX_TEXTURE_UNITS_ARB) + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num); +#endif + MaxSupportedTextures=static_cast<u8>(num); + } +#endif +#if defined(GL_ARB_vertex_shader) || defined(GL_VERSION_2_0) + if (Version>=200 || FeatureAvailable[IRR_ARB_vertex_shader]) + { + num=0; +#if defined(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS) + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num); +#elif defined(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB) + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, &num); +#endif + MaxSupportedTextures=core::max_(MaxSupportedTextures,static_cast<u8>(num)); + } +#endif + glGetIntegerv(GL_MAX_LIGHTS, &num); + MaxLights=static_cast<u8>(num); +#ifdef GL_EXT_texture_filter_anisotropic + if (FeatureAvailable[IRR_EXT_texture_filter_anisotropic]) + { + glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &num); + MaxAnisotropy=static_cast<u8>(num); + } +#endif +#ifdef GL_VERSION_1_2 + if (Version>101) + { + glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &num); + MaxIndices=num; + } +#endif + glGetIntegerv(GL_MAX_TEXTURE_SIZE, &num); + MaxTextureSize=static_cast<u32>(num); + if (queryFeature(EVDF_GEOMETRY_SHADER)) + { +#if defined(GL_ARB_geometry_shader4) || defined(GL_EXT_geometry_shader4) || defined(GL_NV_geometry_shader4) + glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT, &num); + MaxGeometryVerticesOut=static_cast<u32>(num); +#elif defined(GL_NV_geometry_program4) + extGlGetProgramiv(GEOMETRY_PROGRAM_NV, GL_MAX_PROGRAM_OUTPUT_VERTICES_NV, &num); + MaxGeometryVerticesOut=static_cast<u32>(num); +#endif + } +#ifdef GL_EXT_texture_lod_bias + if (FeatureAvailable[IRR_EXT_texture_lod_bias]) + glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &MaxTextureLODBias); +#endif + glGetIntegerv(GL_MAX_CLIP_PLANES, &num); + MaxUserClipPlanes=static_cast<u8>(num); + glGetIntegerv(GL_AUX_BUFFERS, &num); + MaxAuxBuffers=static_cast<u8>(num); +#ifdef GL_ARB_draw_buffers + if (FeatureAvailable[IRR_ARB_draw_buffers]) + { + glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &num); + MaxMultipleRenderTargets = static_cast<u8>(num); + } +#endif +#if defined(GL_ATI_draw_buffers) +#ifdef GL_ARB_draw_buffers + else +#endif + if (FeatureAvailable[IRR_ATI_draw_buffers]) + { + glGetIntegerv(GL_MAX_DRAW_BUFFERS_ATI, &num); + MaxMultipleRenderTargets = static_cast<u8>(num); + } +#endif + glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine); + glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, DimAliasedPoint); + glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, DimSmoothedLine); + glGetFloatv(GL_SMOOTH_POINT_SIZE_RANGE, DimSmoothedPoint); +#if defined(GL_ARB_shading_language_100) || defined (GL_VERSION_2_0) + if (FeatureAvailable[IRR_ARB_shading_language_100] || Version>=200) + { + glGetError(); // clean error buffer +#ifdef GL_SHADING_LANGUAGE_VERSION + const GLubyte* shaderVersion = glGetString(GL_SHADING_LANGUAGE_VERSION); +#else + const GLubyte* shaderVersion = glGetString(GL_SHADING_LANGUAGE_VERSION_ARB); +#endif + if (glGetError() == GL_INVALID_ENUM) + ShaderLanguageVersion = 100; + else + { + const f32 sl_ver = core::fast_atof(reinterpret_cast<const c8*>(shaderVersion)); + ShaderLanguageVersion = static_cast<u16>(core::floor32(sl_ver)*100+core::round32(core::fract(sl_ver)*10.0f)); + } + } +#endif + +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (!pGlActiveTextureARB || !pGlClientActiveTextureARB) + { + MultiTextureExtension = false; + os::Printer::log("Failed to load OpenGL's multitexture extension, proceeding without.", ELL_WARNING); + } + else +#endif + MaxTextureUnits = core::min_(MaxSupportedTextures, static_cast<u8>(MATERIAL_MAX_TEXTURES)); + if (MaxTextureUnits < 2) + { + MultiTextureExtension = false; + os::Printer::log("Warning: OpenGL device only has one texture unit. Disabling multitexturing.", ELL_WARNING); + } + +#ifdef GL_ARB_occlusion_query + if (FeatureAvailable[IRR_ARB_occlusion_query]) + { + extGlGetQueryiv(GL_SAMPLES_PASSED_ARB,GL_QUERY_COUNTER_BITS_ARB, + &num); + OcclusionQuerySupport=(num>0); + } + else +#endif +#ifdef GL_NV_occlusion_query + if (FeatureAvailable[IRR_NV_occlusion_query]) + { + glGetIntegerv(GL_PIXEL_COUNTER_BITS_NV, &num); + OcclusionQuerySupport=(num>0); + } + else +#endif + OcclusionQuerySupport=false; + +#ifdef _DEBUG + if (FeatureAvailable[IRR_NVX_gpu_memory_info]) + { + // undocumented flags, so use the RAW values + GLint val; + glGetIntegerv(0x9047, &val); + os::Printer::log("Dedicated video memory (kB)", core::stringc(val)); + glGetIntegerv(0x9048, &val); + os::Printer::log("Total video memory (kB)", core::stringc(val)); + glGetIntegerv(0x9049, &val); + os::Printer::log("Available video memory (kB)", core::stringc(val)); + } +#ifdef GL_ATI_meminfo + if (FeatureAvailable[IRR_ATI_meminfo]) + { + GLint val[4]; + glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, val); + os::Printer::log("Free texture memory (kB)", core::stringc(val[0])); + glGetIntegerv(GL_VBO_FREE_MEMORY_ATI, val); + os::Printer::log("Free VBO memory (kB)", core::stringc(val[0])); + glGetIntegerv(GL_RENDERBUFFER_FREE_MEMORY_ATI, val); + os::Printer::log("Free render buffer memory (kB)", core::stringc(val[0])); + } +#endif +#endif +} + +bool COpenGLExtensionHandler::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const +{ + switch (feature) + { + case EVDF_RENDER_TO_TARGET: + return true; + case EVDF_HARDWARE_TL: + return true; // we cannot tell other things + case EVDF_MULTITEXTURE: + return MultiTextureExtension; + case EVDF_BILINEAR_FILTER: + return true; + case EVDF_MIP_MAP: + return true; + case EVDF_MIP_MAP_AUTO_UPDATE: + return FeatureAvailable[IRR_SGIS_generate_mipmap] || FeatureAvailable[IRR_EXT_framebuffer_object] || FeatureAvailable[IRR_ARB_framebuffer_object]; + case EVDF_STENCIL_BUFFER: + return StencilBuffer; + case EVDF_VERTEX_SHADER_1_1: + case EVDF_ARB_VERTEX_PROGRAM_1: + return FeatureAvailable[IRR_ARB_vertex_program] || FeatureAvailable[IRR_NV_vertex_program1_1]; + case EVDF_PIXEL_SHADER_1_1: + case EVDF_PIXEL_SHADER_1_2: + case EVDF_ARB_FRAGMENT_PROGRAM_1: + return FeatureAvailable[IRR_ARB_fragment_program] || FeatureAvailable[IRR_NV_fragment_program]; + case EVDF_PIXEL_SHADER_2_0: + case EVDF_VERTEX_SHADER_2_0: + case EVDF_ARB_GLSL: + return (FeatureAvailable[IRR_ARB_shading_language_100]||Version>=200); + case EVDF_TEXTURE_NSQUARE: + return true; // non-square is always supported + case EVDF_TEXTURE_NPOT: + // Some ATI cards seem to have only SW support in OpenGL 2.0 + // drivers if the extension is not exposed, so we skip this + // extra test for now! + // return (FeatureAvailable[IRR_ARB_texture_non_power_of_two]||Version>=200); + return (FeatureAvailable[IRR_ARB_texture_non_power_of_two]); + case EVDF_FRAMEBUFFER_OBJECT: + return FeatureAvailable[IRR_EXT_framebuffer_object] || FeatureAvailable[IRR_ARB_framebuffer_object]; + case EVDF_VERTEX_BUFFER_OBJECT: + return FeatureAvailable[IRR_ARB_vertex_buffer_object]; + case EVDF_COLOR_MASK: + return true; + case EVDF_ALPHA_TO_COVERAGE: + return FeatureAvailable[IRR_ARB_multisample]; + case EVDF_GEOMETRY_SHADER: + return FeatureAvailable[IRR_ARB_geometry_shader4] || FeatureAvailable[IRR_EXT_geometry_shader4] || FeatureAvailable[IRR_NV_geometry_program4] || FeatureAvailable[IRR_NV_geometry_shader4]; + case EVDF_MULTIPLE_RENDER_TARGETS: + return FeatureAvailable[IRR_ARB_draw_buffers] || FeatureAvailable[IRR_ATI_draw_buffers]; + case EVDF_MRT_BLEND: + case EVDF_MRT_COLOR_MASK: + return FeatureAvailable[IRR_EXT_draw_buffers2]; + case EVDF_MRT_BLEND_FUNC: + return FeatureAvailable[IRR_ARB_draw_buffers_blend] || FeatureAvailable[IRR_AMD_draw_buffers_blend]; + case EVDF_OCCLUSION_QUERY: + return FeatureAvailable[IRR_ARB_occlusion_query] && OcclusionQuerySupport; + case EVDF_POLYGON_OFFSET: + // both features supported with OpenGL 1.1 + return Version>=110; + case EVDF_BLEND_OPERATIONS: + return (Version>=120) || FeatureAvailable[IRR_EXT_blend_minmax] || + FeatureAvailable[IRR_EXT_blend_subtract] || FeatureAvailable[IRR_EXT_blend_logic_op]; + case EVDF_TEXTURE_MATRIX: +#ifdef _IRR_COMPILE_WITH_CG_ + // available iff. define is present + case EVDF_CG: +#endif + return true; + default: + return false; + }; +} + + +} +} + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h new file mode 100644 index 0000000..1b77bad --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h @@ -0,0 +1,2586 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#ifndef __C_OPEN_GL_FEATURE_MAP_H_INCLUDED__ +#define __C_OPEN_GL_FEATURE_MAP_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "EDriverFeatures.h" +#include "irrTypes.h" +#include "os.h" + +#if defined(_IRR_WINDOWS_API_) + // include windows headers for HWND + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 + #endif + #include <GL/gl.h> + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #include "glext.h" + #endif + #include "wglext.h" + + #ifdef _MSC_VER + #pragma comment(lib, "OpenGL32.lib") + #endif + +#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 + #endif + #include <OpenGL/gl.h> + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #include "glext.h" + #endif +#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_) + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 + #define GLX_GLXEXT_LEGACY 1 + #else + #define GL_GLEXT_PROTOTYPES 1 + #define GLX_GLXEXT_PROTOTYPES 1 + #endif + #define NO_SDL_GLEXT + #include <SDL/SDL_video.h> + #include <SDL/SDL_opengl.h> + #include "glext.h" +#else + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 + #define GLX_GLXEXT_LEGACY 1 + #else + #define GL_GLEXT_PROTOTYPES 1 + #define GLX_GLXEXT_PROTOTYPES 1 + #endif + #include <GL/gl.h> + #include <GL/glx.h> + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #include "glext.h" + #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h + #include "glxext.h" + #endif +#endif + +#ifndef GL_ARB_shader_objects +/* GL types for program/shader text and shader object handles */ +typedef char GLcharARB; +typedef unsigned int GLhandleARB; +#endif + +#ifndef GL_VERSION_2_0 +/* GL type for program/shader text */ +typedef char GLchar; +#endif + + +namespace irr +{ +namespace video +{ + + +static const char* const OpenGLFeatureStrings[] = { + "GL_3DFX_multisample", + "GL_3DFX_tbuffer", + "GL_3DFX_texture_compression_FXT1", + "GL_AMD_blend_minmax_factor", + "GL_AMD_conservative_depth", + "GL_AMD_debug_output", + "GL_AMD_depth_clamp_separate", + "GL_AMD_draw_buffers_blend", + "GL_AMD_multi_draw_indirect", + "GL_AMD_name_gen_delete", + "GL_AMD_performance_monitor", + "GL_AMD_sample_positions", + "GL_AMD_seamless_cubemap_per_texture", + "GL_AMD_shader_stencil_export", + "GL_AMD_texture_texture4", + "GL_AMD_transform_feedback3_lines_triangles", + "GL_AMD_vertex_shader_tesselator", + "GL_APPLE_aux_depth_stencil", + "GL_APPLE_client_storage", + "GL_APPLE_element_array", + "GL_APPLE_fence", + "GL_APPLE_float_pixels", + "GL_APPLE_flush_buffer_range", + "GL_APPLE_object_purgeable", + "GL_APPLE_rgb_422", + "GL_APPLE_row_bytes", + "GL_APPLE_specular_vector", + "GL_APPLE_texture_range", + "GL_APPLE_transform_hint", + "GL_APPLE_vertex_array_object", + "GL_APPLE_vertex_array_range", + "GL_APPLE_vertex_program_evaluators", + "GL_APPLE_ycbcr_422", + "GL_ARB_base_instance", + "GL_ARB_blend_func_extended", + "GL_ARB_cl_event", + "GL_ARB_color_buffer_float", + "GL_ARB_compatibility", + "GL_ARB_compressed_texture_pixel_storage", + "GL_ARB_conservative_depth", + "GL_ARB_copy_buffer", + "GL_ARB_debug_output", + "GL_ARB_depth_buffer_float", + "GL_ARB_depth_clamp", + "GL_ARB_depth_texture", + "GL_ARB_draw_buffers", + "GL_ARB_draw_buffers_blend", + "GL_ARB_draw_elements_base_vertex", + "GL_ARB_draw_indirect", + "GL_ARB_draw_instanced", + "GL_ARB_ES2_compatibility", + "GL_ARB_explicit_attrib_location", + "GL_ARB_fragment_coord_conventions", + "GL_ARB_fragment_program", + "GL_ARB_fragment_program_shadow", + "GL_ARB_fragment_shader", + "GL_ARB_framebuffer_object", + "GL_ARB_framebuffer_sRGB", + "GL_ARB_get_program_binary", + "GL_ARB_geometry_shader4", + "GL_ARB_gpu_shader5", + "GL_ARB_gpu_shader_fp64", + "GL_ARB_half_float_pixel", + "GL_ARB_half_float_vertex", + "GL_ARB_imaging", + "GL_ARB_instanced_arrays", + "GL_ARB_internalformat_query", + "GL_ARB_map_buffer_alignment", + "GL_ARB_map_buffer_range", + "GL_ARB_matrix_palette", + "GL_ARB_multisample", + "GL_ARB_multitexture", + "GL_ARB_occlusion_query", + "GL_ARB_occlusion_query2", + "GL_ARB_pixel_buffer_object", + "GL_ARB_point_parameters", + "GL_ARB_point_sprite", + "GL_ARB_provoking_vertex", + "GL_ARB_robustness", + "GL_ARB_sample_shading", + "GL_ARB_sampler_objects", + "GL_ARB_seamless_cube_map", + "GL_ARB_separate_shader_objects", + "GL_ARB_shader_atomic_counters", + "GL_ARB_shader_bit_encoding", + "GL_ARB_shader_image_load_store", + "GL_ARB_shader_objects", + "GL_ARB_shader_precision", + "GL_ARB_shader_stencil_export", + "GL_ARB_shader_subroutine", + "GL_ARB_shader_texture_lod", + "GL_ARB_shading_language_100", + "GL_ARB_shading_language_420pack", + "GL_ARB_shading_language_include", + "GL_ARB_shading_language_packing", + "GL_ARB_shadow", + "GL_ARB_shadow_ambient", + "GL_ARB_sync", + "GL_ARB_tessellation_shader", + "GL_ARB_texture_border_clamp", + "GL_ARB_texture_buffer_object", + "GL_ARB_texture_buffer_object_rgb32", + "GL_ARB_texture_compression", + "GL_ARB_texture_compression_bptc", + "GL_ARB_texture_compression_rgtc", + "GL_ARB_texture_cube_map", + "GL_ARB_texture_cube_map_array", + "GL_ARB_texture_env_add", + "GL_ARB_texture_env_combine", + "GL_ARB_texture_env_crossbar", + "GL_ARB_texture_env_dot3", + "GL_ARB_texture_float", + "GL_ARB_texture_gather", + "GL_ARB_texture_mirrored_repeat", + "GL_ARB_texture_multisample", + "GL_ARB_texture_non_power_of_two", + "GL_ARB_texture_query_lod", + "GL_ARB_texture_rectangle", + "GL_ARB_texture_rg", + "GL_ARB_texture_rgb10_a2ui", + "GL_ARB_texture_storage", + "GL_ARB_texture_swizzle", + "GL_ARB_timer_query", + "GL_ARB_transform_feedback2", + "GL_ARB_transform_feedback3", + "GL_ARB_transform_feedback_instanced", + "GL_ARB_transpose_matrix", + "GL_ARB_uniform_buffer_object", + "GL_ARB_vertex_array_bgra", + "GL_ARB_vertex_array_object", + "GL_ARB_vertex_attrib_64bit", + "GL_ARB_vertex_blend", + "GL_ARB_vertex_buffer_object", + "GL_ARB_vertex_program", + "GL_ARB_vertex_shader", + "GL_ARB_vertex_type_2_10_10_10_rev", + "GL_ARB_viewport_array", + "GL_ARB_window_pos", + "GL_ATI_draw_buffers", + "GL_ATI_element_array", + "GL_ATI_envmap_bumpmap", + "GL_ATI_fragment_shader", + "GL_ATI_map_object_buffer", + "GL_ATI_meminfo", + "GL_ATI_pixel_format_float", + "GL_ATI_pn_triangles", + "GL_ATI_separate_stencil", + "GL_ATI_text_fragment_shader", + "GL_ATI_texture_env_combine3", + "GL_ATI_texture_float", + "GL_ATI_texture_mirror_once", + "GL_ATI_vertex_array_object", + "GL_ATI_vertex_attrib_array_object", + "GL_ATI_vertex_streams", + "GL_EXT_422_pixels", + "GL_EXT_abgr", + "GL_EXT_bgra", + "GL_EXT_bindable_uniform", + "GL_EXT_blend_color", + "GL_EXT_blend_equation_separate", + "GL_EXT_blend_func_separate", + "GL_EXT_blend_logic_op", + "GL_EXT_blend_minmax", + "GL_EXT_blend_subtract", + "GL_EXT_clip_volume_hint", + "GL_EXT_cmyka", + "GL_EXT_color_subtable", + "GL_EXT_compiled_vertex_array", + "GL_EXT_convolution", + "GL_EXT_coordinate_frame", + "GL_EXT_copy_texture", + "GL_EXT_cull_vertex", + "GL_EXT_depth_bounds_test", + "GL_EXT_direct_state_access", + "GL_EXT_draw_buffers2", + "GL_EXT_draw_instanced", + "GL_EXT_draw_range_elements", + "GL_EXT_fog_coord", + "GL_EXT_framebuffer_blit", + "GL_EXT_framebuffer_multisample", + "GL_EXT_framebuffer_multisample_blit_scaled", + "GL_EXT_framebuffer_object", + "GL_EXT_framebuffer_sRGB", + "GL_EXT_geometry_shader4", + "GL_EXT_gpu_program_parameters", + "GL_EXT_gpu_shader4", + "GL_EXT_histogram", + "GL_EXT_index_array_formats", + "GL_EXT_index_func", + "GL_EXT_index_material", + "GL_EXT_index_texture", + "GL_EXT_light_texture", + "GL_EXT_misc_attribute", + "GL_EXT_multi_draw_arrays", + "GL_EXT_multisample", + "GL_EXT_packed_depth_stencil", + "GL_EXT_packed_float", + "GL_EXT_packed_pixels", + "GL_EXT_paletted_texture", + "GL_EXT_pixel_buffer_object", + "GL_EXT_pixel_transform", + "GL_EXT_pixel_transform_color_table", + "GL_EXT_point_parameters", + "GL_EXT_polygon_offset", + "GL_EXT_provoking_vertex", + "GL_EXT_rescale_normal", + "GL_EXT_secondary_color", + "GL_EXT_separate_shader_objects", + "GL_EXT_separate_specular_color", + "GL_EXT_shader_image_load_store", + "GL_EXT_shadow_funcs", + "GL_EXT_shared_texture_palette", + "GL_EXT_stencil_clear_tag", + "GL_EXT_stencil_two_side", + "GL_EXT_stencil_wrap", + "GL_EXT_subtexture", + "GL_EXT_texture", + "GL_EXT_texture3D", + "GL_EXT_texture_array", + "GL_EXT_texture_buffer_object", + "GL_EXT_texture_compression_latc", + "GL_EXT_texture_compression_rgtc", + "GL_EXT_texture_compression_s3tc", + "GL_EXT_texture_cube_map", + "GL_EXT_texture_env_add", + "GL_EXT_texture_env_combine", + "GL_EXT_texture_env_dot3", + "GL_EXT_texture_filter_anisotropic", + "GL_EXT_texture_integer", + "GL_EXT_texture_lod_bias", + "GL_EXT_texture_mirror_clamp", + "GL_EXT_texture_object", + "GL_EXT_texture_perturb_normal", + "GL_EXT_texture_shared_exponent", + "GL_EXT_texture_snorm", + "GL_EXT_texture_sRGB", + "GL_EXT_texture_sRGB_decode", + "GL_EXT_texture_swizzle", + "GL_EXT_timer_query", + "GL_EXT_transform_feedback", + "GL_EXT_vertex_array", + "GL_EXT_vertex_array_bgra", + "GL_EXT_vertex_attrib_64bit", + "GL_EXT_vertex_shader", + "GL_EXT_vertex_weighting", + "GL_EXT_x11_sync_object", + "GL_FfdMaskSGIX", + "GL_GREMEDY_frame_terminator", + "GL_GREMEDY_string_marker", + "GL_HP_convolution_border_modes", + "GL_HP_image_transform", + "GL_HP_occlusion_test", + "GL_HP_texture_lighting", + "GL_IBM_cull_vertex", + "GL_IBM_multimode_draw_arrays", + "GL_IBM_rasterpos_clip", + "GL_IBM_texture_mirrored_repeat", + "GL_IBM_vertex_array_lists", + "GL_INGR_blend_func_separate", + "GL_INGR_color_clamp", + "GL_INGR_interlace_read", + "GL_INGR_palette_buffer", + "GL_INTEL_parallel_arrays", + "GL_INTEL_texture_scissor", + "GL_MESA_pack_invert", + "GL_MESA_resize_buffers", + "GL_MESA_window_pos", + "GL_MESAX_texture_stack", + "GL_MESA_ycbcr_texture", + "GL_NV_blend_square", + "GL_NV_conditional_render", + "GL_NV_copy_depth_to_color", + "GL_NV_copy_image", + "GL_NV_depth_buffer_float", + "GL_NV_depth_clamp", + "GL_NV_evaluators", + "GL_NV_explicit_multisample", + "GL_NV_fence", + "GL_NV_float_buffer", + "GL_NV_fog_distance", + "GL_NV_fragment_program", + "GL_NV_fragment_program2", + "GL_NV_fragment_program4", + "GL_NV_fragment_program_option", + "GL_NV_framebuffer_multisample_coverage", + "GL_NV_geometry_program4", + "GL_NV_geometry_shader4", + "GL_NV_gpu_program4", + "GL_NV_gpu_program5", + "GL_NV_gpu_shader5", + "GL_NV_half_float", + "GL_NV_light_max_exponent", + "GL_NV_multisample_coverage", + "GL_NV_multisample_filter_hint", + "GL_NV_occlusion_query", + "GL_NV_packed_depth_stencil", + "GL_NV_parameter_buffer_object", + "GL_NV_parameter_buffer_object2", + "GL_NV_pixel_data_range", + "GL_NV_point_sprite", + "GL_NV_present_video", + "GL_NV_primitive_restart", + "GL_NV_register_combiners", + "GL_NV_register_combiners2", + "GL_NV_shader_buffer_load", + "GL_NV_shader_buffer_store", + "GL_NV_tessellation_program5", + "GL_NV_texgen_emboss", + "GL_NV_texgen_reflection", + "GL_NV_texture_barrier", + "GL_NV_texture_compression_vtc", + "GL_NV_texture_env_combine4", + "GL_NV_texture_expand_normal", + "GL_NV_texture_multisample", + "GL_NV_texture_rectangle", + "GL_NV_texture_shader", + "GL_NV_texture_shader2", + "GL_NV_texture_shader3", + "GL_NV_transform_feedback", + "GL_NV_transform_feedback2", + "GL_NV_vdpau_interop", + "GL_NV_vertex_array_range", + "GL_NV_vertex_array_range2", + "GL_NV_vertex_attrib_integer_64bit", + "GL_NV_vertex_buffer_unified_memory", + "GL_NV_vertex_program", + "GL_NV_vertex_program1_1", + "GL_NV_vertex_program2", + "GL_NV_vertex_program2_option", + "GL_NV_vertex_program3", + "GL_NV_vertex_program4", + "GL_NV_video_capture", + "GL_OES_read_format", + "GL_OML_interlace", + "GL_OML_resample", + "GL_OML_subsample", + "GL_PGI_misc_hints", + "GL_PGI_vertex_hints", + "GL_REND_screen_coordinates", + "GL_S3_s3tc", + "GL_SGI_color_matrix", + "GL_SGI_color_table", + "GL_SGI_depth_pass_instrument", + "GL_SGIS_detail_texture", + "GL_SGIS_fog_function", + "GL_SGIS_generate_mipmap", + "GL_SGIS_multisample", + "GL_SGIS_pixel_texture", + "GL_SGIS_point_line_texgen", + "GL_SGIS_point_parameters", + "GL_SGIS_sharpen_texture", + "GL_SGIS_texture4D", + "GL_SGIS_texture_border_clamp", + "GL_SGIS_texture_color_mask", + "GL_SGIS_texture_edge_clamp", + "GL_SGIS_texture_filter4", + "GL_SGIS_texture_lod", + "GL_SGIS_texture_select", + "GL_SGI_texture_color_table", + "GL_SGIX_async", + "GL_SGIX_async_histogram", + "GL_SGIX_async_pixel", + "GL_SGIX_blend_alpha_minmax", + "GL_SGIX_calligraphic_fragment", + "GL_SGIX_clipmap", + "GL_SGIX_convolution_accuracy", + "GL_SGIX_depth_pass_instrument", + "GL_SGIX_depth_texture", + "GL_SGIX_flush_raster", + "GL_SGIX_fog_offset", + "GL_SGIX_fog_scale", + "GL_SGIX_fragment_lighting", + "GL_SGIX_framezoom", + "GL_SGIX_igloo_interface", + "GL_SGIX_impact_pixel_texture", + "GL_SGIX_instruments", + "GL_SGIX_interlace", + "GL_SGIX_ir_instrument1", + "GL_SGIX_list_priority", + "GL_SGIX_pixel_texture", + "GL_SGIX_pixel_tiles", + "GL_SGIX_polynomial_ffd", + "GL_SGIX_reference_plane", + "GL_SGIX_resample", + "GL_SGIX_scalebias_hint", + "GL_SGIX_shadow", + "GL_SGIX_shadow_ambient", + "GL_SGIX_sprite", + "GL_SGIX_subsample", + "GL_SGIX_tag_sample_buffer", + "GL_SGIX_texture_add_env", + "GL_SGIX_texture_coordinate_clamp", + "GL_SGIX_texture_lod_bias", + "GL_SGIX_texture_multi_buffer", + "GL_SGIX_texture_scale_bias", + "GL_SGIX_texture_select", + "GL_SGIX_vertex_preclip", + "GL_SGIX_ycrcb", + "GL_SGIX_ycrcba", + "GL_SGIX_ycrcb_subsample", + "GL_SUN_convolution_border_modes", + "GL_SUN_global_alpha", + "GL_SUN_mesh_array", + "GL_SUN_slice_accum", + "GL_SUN_triangle_list", + "GL_SUN_vertex", + "GL_SUNX_constant_data", + "GL_WIN_phong_shading", + "GL_WIN_specular_fog", + // unofficial stuff + "GL_NVX_gpu_memory_info" +}; + + +class COpenGLExtensionHandler +{ + public: + enum EOpenGLFeatures { + IRR_3DFX_multisample = 0, + IRR_3DFX_tbuffer, + IRR_3DFX_texture_compression_FXT1, + IRR_AMD_blend_minmax_factor, + IRR_AMD_conservative_depth, + IRR_AMD_debug_output, + IRR_AMD_depth_clamp_separate, + IRR_AMD_draw_buffers_blend, + IRR_AMD_multi_draw_indirect, + IRR_AMD_name_gen_delete, + IRR_AMD_performance_monitor, + IRR_AMD_sample_positions, + IRR_AMD_seamless_cubemap_per_texture, + IRR_AMD_shader_stencil_export, + IRR_AMD_texture_texture4, + IRR_AMD_transform_feedback3_lines_triangles, + IRR_AMD_vertex_shader_tesselator, + IRR_APPLE_aux_depth_stencil, + IRR_APPLE_client_storage, + IRR_APPLE_element_array, + IRR_APPLE_fence, + IRR_APPLE_float_pixels, + IRR_APPLE_flush_buffer_range, + IRR_APPLE_object_purgeable, + IRR_APPLE_rgb_422, + IRR_APPLE_row_bytes, + IRR_APPLE_specular_vector, + IRR_APPLE_texture_range, + IRR_APPLE_transform_hint, + IRR_APPLE_vertex_array_object, + IRR_APPLE_vertex_array_range, + IRR_APPLE_vertex_program_evaluators, + IRR_APPLE_ycbcr_422, + IRR_ARB_base_instance, + IRR_ARB_blend_func_extended, + IRR_ARB_cl_event, + IRR_ARB_color_buffer_float, + IRR_ARB_compatibility, + IRR_ARB_compressed_texture_pixel_storage, + IRR_ARB_conservative_depth, + IRR_ARB_copy_buffer, + IRR_ARB_debug_output, + IRR_ARB_depth_buffer_float, + IRR_ARB_depth_clamp, + IRR_ARB_depth_texture, + IRR_ARB_draw_buffers, + IRR_ARB_draw_buffers_blend, + IRR_ARB_draw_elements_base_vertex, + IRR_ARB_draw_indirect, + IRR_ARB_draw_instanced, + IRR_ARB_ES2_compatibility, + IRR_ARB_explicit_attrib_location, + IRR_ARB_fragment_coord_conventions, + IRR_ARB_fragment_program, + IRR_ARB_fragment_program_shadow, + IRR_ARB_fragment_shader, + IRR_ARB_framebuffer_object, + IRR_ARB_framebuffer_sRGB, + IRR_ARB_geometry_shader4, + IRR_ARB_get_program_binary, + IRR_ARB_gpu_shader5, + IRR_ARB_gpu_shader_fp64, + IRR_ARB_half_float_pixel, + IRR_ARB_half_float_vertex, + IRR_ARB_imaging, + IRR_ARB_instanced_arrays, + IRR_ARB_internalformat_query, + IRR_ARB_map_buffer_alignment, + IRR_ARB_map_buffer_range, + IRR_ARB_matrix_palette, + IRR_ARB_multisample, + IRR_ARB_multitexture, + IRR_ARB_occlusion_query, + IRR_ARB_occlusion_query2, + IRR_ARB_pixel_buffer_object, + IRR_ARB_point_parameters, + IRR_ARB_point_sprite, + IRR_ARB_provoking_vertex, + IRR_ARB_robustness, + IRR_ARB_sample_shading, + IRR_ARB_sampler_objects, + IRR_ARB_seamless_cube_map, + IRR_ARB_separate_shader_objects, + IRR_ARB_shader_atomic_counters, + IRR_ARB_shader_bit_encoding, + IRR_ARB_shader_image_load_store, + IRR_ARB_shader_objects, + IRR_ARB_shader_precision, + IRR_ARB_shader_stencil_export, + IRR_ARB_shader_subroutine, + IRR_ARB_shader_texture_lod, + IRR_ARB_shading_language_100, + IRR_ARB_shading_language_420pack, + IRR_ARB_shading_language_include, + IRR_ARB_shading_language_packing, + IRR_ARB_shadow, + IRR_ARB_shadow_ambient, + IRR_ARB_sync, + IRR_ARB_tessellation_shader, + IRR_ARB_texture_border_clamp, + IRR_ARB_texture_buffer_object, + IRR_ARB_texture_buffer_object_rgb32, + IRR_ARB_texture_compression, + IRR_ARB_texture_compression_bptc, + IRR_ARB_texture_compression_rgtc, + IRR_ARB_texture_cube_map, + IRR_ARB_texture_cube_map_array, + IRR_ARB_texture_env_add, + IRR_ARB_texture_env_combine, + IRR_ARB_texture_env_crossbar, + IRR_ARB_texture_env_dot3, + IRR_ARB_texture_float, + IRR_ARB_texture_gather, + IRR_ARB_texture_mirrored_repeat, + IRR_ARB_texture_multisample, + IRR_ARB_texture_non_power_of_two, + IRR_ARB_texture_query_lod, + IRR_ARB_texture_rectangle, + IRR_ARB_texture_rg, + IRR_ARB_texture_rgb10_a2ui, + IRR_ARB_texture_storage, + IRR_ARB_texture_swizzle, + IRR_ARB_timer_query, + IRR_ARB_transform_feedback2, + IRR_ARB_transform_feedback3, + IRR_ARB_transform_feedback_instanced, + IRR_ARB_transpose_matrix, + IRR_ARB_uniform_buffer_object, + IRR_ARB_vertex_array_bgra, + IRR_ARB_vertex_array_object, + IRR_ARB_vertex_attrib_64bit, + IRR_ARB_vertex_blend, + IRR_ARB_vertex_buffer_object, + IRR_ARB_vertex_program, + IRR_ARB_vertex_shader, + IRR_ARB_vertex_type_2_10_10_10_rev, + IRR_ARB_viewport_array, + IRR_ARB_window_pos, + IRR_ATI_draw_buffers, + IRR_ATI_element_array, + IRR_ATI_envmap_bumpmap, + IRR_ATI_fragment_shader, + IRR_ATI_map_object_buffer, + IRR_ATI_meminfo, + IRR_ATI_pixel_format_float, + IRR_ATI_pn_triangles, + IRR_ATI_separate_stencil, + IRR_ATI_text_fragment_shader, + IRR_ATI_texture_env_combine3, + IRR_ATI_texture_float, + IRR_ATI_texture_mirror_once, + IRR_ATI_vertex_array_object, + IRR_ATI_vertex_attrib_array_object, + IRR_ATI_vertex_streams, + IRR_EXT_422_pixels, + IRR_EXT_abgr, + IRR_EXT_bgra, + IRR_EXT_bindable_uniform, + IRR_EXT_blend_color, + IRR_EXT_blend_equation_separate, + IRR_EXT_blend_func_separate, + IRR_EXT_blend_logic_op, + IRR_EXT_blend_minmax, + IRR_EXT_blend_subtract, + IRR_EXT_clip_volume_hint, + IRR_EXT_cmyka, + IRR_EXT_color_subtable, + IRR_EXT_compiled_vertex_array, + IRR_EXT_convolution, + IRR_EXT_coordinate_frame, + IRR_EXT_copy_texture, + IRR_EXT_cull_vertex, + IRR_EXT_depth_bounds_test, + IRR_EXT_direct_state_access, + IRR_EXT_draw_buffers2, + IRR_EXT_draw_instanced, + IRR_EXT_draw_range_elements, + IRR_EXT_fog_coord, + IRR_EXT_framebuffer_blit, + IRR_EXT_framebuffer_multisample, + IRR_EXT_framebuffer_multisample_blit_scaled, + IRR_EXT_framebuffer_object, + IRR_EXT_framebuffer_sRGB, + IRR_EXT_geometry_shader4, + IRR_EXT_gpu_program_parameters, + IRR_EXT_gpu_shader4, + IRR_EXT_histogram, + IRR_EXT_index_array_formats, + IRR_EXT_index_func, + IRR_EXT_index_material, + IRR_EXT_index_texture, + IRR_EXT_light_texture, + IRR_EXT_misc_attribute, + IRR_EXT_multi_draw_arrays, + IRR_EXT_multisample, + IRR_EXT_packed_depth_stencil, + IRR_EXT_packed_float, + IRR_EXT_packed_pixels, + IRR_EXT_paletted_texture, + IRR_EXT_pixel_buffer_object, + IRR_EXT_pixel_transform, + IRR_EXT_pixel_transform_color_table, + IRR_EXT_point_parameters, + IRR_EXT_polygon_offset, + IRR_EXT_provoking_vertex, + IRR_EXT_rescale_normal, + IRR_EXT_secondary_color, + IRR_EXT_separate_shader_objects, + IRR_EXT_separate_specular_color, + IRR_EXT_shader_image_load_store, + IRR_EXT_shadow_funcs, + IRR_EXT_shared_texture_palette, + IRR_EXT_stencil_clear_tag, + IRR_EXT_stencil_two_side, + IRR_EXT_stencil_wrap, + IRR_EXT_subtexture, + IRR_EXT_texture, + IRR_EXT_texture3D, + IRR_EXT_texture_array, + IRR_EXT_texture_buffer_object, + IRR_EXT_texture_compression_latc, + IRR_EXT_texture_compression_rgtc, + IRR_EXT_texture_compression_s3tc, + IRR_EXT_texture_cube_map, + IRR_EXT_texture_env_add, + IRR_EXT_texture_env_combine, + IRR_EXT_texture_env_dot3, + IRR_EXT_texture_filter_anisotropic, + IRR_EXT_texture_integer, + IRR_EXT_texture_lod_bias, + IRR_EXT_texture_mirror_clamp, + IRR_EXT_texture_object, + IRR_EXT_texture_perturb_normal, + IRR_EXT_texture_shared_exponent, + IRR_EXT_texture_snorm, + IRR_EXT_texture_sRGB, + IRR_EXT_texture_sRGB_decode, + IRR_EXT_texture_swizzle, + IRR_EXT_timer_query, + IRR_EXT_transform_feedback, + IRR_EXT_vertex_array, + IRR_EXT_vertex_array_bgra, + IRR_EXT_vertex_attrib_64bit, + IRR_EXT_vertex_shader, + IRR_EXT_vertex_weighting, + IRR_EXT_x11_sync_object, + IRR_FfdMaskSGIX, + IRR_GREMEDY_frame_terminator, + IRR_GREMEDY_string_marker, + IRR_HP_convolution_border_modes, + IRR_HP_image_transform, + IRR_HP_occlusion_test, + IRR_HP_texture_lighting, + IRR_IBM_cull_vertex, + IRR_IBM_multimode_draw_arrays, + IRR_IBM_rasterpos_clip, + IRR_IBM_texture_mirrored_repeat, + IRR_IBM_vertex_array_lists, + IRR_INGR_blend_func_separate, + IRR_INGR_color_clamp, + IRR_INGR_interlace_read, + IRR_INGR_palette_buffer, + IRR_INTEL_parallel_arrays, + IRR_INTEL_texture_scissor, + IRR_MESA_pack_invert, + IRR_MESA_resize_buffers, + IRR_MESA_window_pos, + IRR_MESAX_texture_stack, + IRR_MESA_ycbcr_texture, + IRR_NV_blend_square, + IRR_NV_conditional_render, + IRR_NV_copy_depth_to_color, + IRR_NV_copy_image, + IRR_NV_depth_buffer_float, + IRR_NV_depth_clamp, + IRR_NV_evaluators, + IRR_NV_explicit_multisample, + IRR_NV_fence, + IRR_NV_float_buffer, + IRR_NV_fog_distance, + IRR_NV_fragment_program, + IRR_NV_fragment_program2, + IRR_NV_fragment_program4, + IRR_NV_fragment_program_option, + IRR_NV_framebuffer_multisample_coverage, + IRR_NV_geometry_program4, + IRR_NV_geometry_shader4, + IRR_NV_gpu_program4, + IRR_NV_gpu_program5, + IRR_NV_gpu_shader5, + IRR_NV_half_float, + IRR_NV_light_max_exponent, + IRR_NV_multisample_coverage, + IRR_NV_multisample_filter_hint, + IRR_NV_occlusion_query, + IRR_NV_packed_depth_stencil, + IRR_NV_parameter_buffer_object, + IRR_NV_parameter_buffer_object2, + IRR_NV_pixel_data_range, + IRR_NV_point_sprite, + IRR_NV_present_video, + IRR_NV_primitive_restart, + IRR_NV_register_combiners, + IRR_NV_register_combiners2, + IRR_NV_shader_buffer_load, + IRR_NV_shader_buffer_store, + IRR_NV_tessellation_program5, + IRR_NV_texgen_emboss, + IRR_NV_texgen_reflection, + IRR_NV_texture_barrier, + IRR_NV_texture_compression_vtc, + IRR_NV_texture_env_combine4, + IRR_NV_texture_expand_normal, + IRR_NV_texture_multisample, + IRR_NV_texture_rectangle, + IRR_NV_texture_shader, + IRR_NV_texture_shader2, + IRR_NV_texture_shader3, + IRR_NV_transform_feedback, + IRR_NV_transform_feedback2, + IRR_NV_vdpau_interop, + IRR_NV_vertex_array_range, + IRR_NV_vertex_array_range2, + IRR_NV_vertex_attrib_integer_64bit, + IRR_NV_vertex_buffer_unified_memory, + IRR_NV_vertex_program, + IRR_NV_vertex_program1_1, + IRR_NV_vertex_program2, + IRR_NV_vertex_program2_option, + IRR_NV_vertex_program3, + IRR_NV_vertex_program4, + IRR_NV_video_capture, + IRR_OES_read_format, + IRR_OML_interlace, + IRR_OML_resample, + IRR_OML_subsample, + IRR_PGI_misc_hints, + IRR_PGI_vertex_hints, + IRR_REND_screen_coordinates, + IRR_S3_s3tc, + IRR_SGI_color_matrix, + IRR_SGI_color_table, + IRR_SGI_depth_pass_instrument, + IRR_SGIS_detail_texture, + IRR_SGIS_fog_function, + IRR_SGIS_generate_mipmap, + IRR_SGIS_multisample, + IRR_SGIS_pixel_texture, + IRR_SGIS_point_line_texgen, + IRR_SGIS_point_parameters, + IRR_SGIS_sharpen_texture, + IRR_SGIS_texture4D, + IRR_SGIS_texture_border_clamp, + IRR_SGIS_texture_color_mask, + IRR_SGIS_texture_edge_clamp, + IRR_SGIS_texture_filter4, + IRR_SGIS_texture_lod, + IRR_SGIS_texture_select, + IRR_SGI_texture_color_table, + IRR_SGIX_async, + IRR_SGIX_async_histogram, + IRR_SGIX_async_pixel, + IRR_SGIX_blend_alpha_minmax, + IRR_SGIX_calligraphic_fragment, + IRR_SGIX_clipmap, + IRR_SGIX_convolution_accuracy, + IRR_SGIX_depth_pass_instrument, + IRR_SGIX_depth_texture, + IRR_SGIX_flush_raster, + IRR_SGIX_fog_offset, + IRR_SGIX_fog_scale, + IRR_SGIX_fragment_lighting, + IRR_SGIX_framezoom, + IRR_SGIX_igloo_interface, + IRR_SGIX_impact_pixel_texture, + IRR_SGIX_instruments, + IRR_SGIX_interlace, + IRR_SGIX_ir_instrument1, + IRR_SGIX_list_priority, + IRR_SGIX_pixel_texture, + IRR_SGIX_pixel_tiles, + IRR_SGIX_polynomial_ffd, + IRR_SGIX_reference_plane, + IRR_SGIX_resample, + IRR_SGIX_scalebias_hint, + IRR_SGIX_shadow, + IRR_SGIX_shadow_ambient, + IRR_SGIX_sprite, + IRR_SGIX_subsample, + IRR_SGIX_tag_sample_buffer, + IRR_SGIX_texture_add_env, + IRR_SGIX_texture_coordinate_clamp, + IRR_SGIX_texture_lod_bias, + IRR_SGIX_texture_multi_buffer, + IRR_SGIX_texture_scale_bias, + IRR_SGIX_texture_select, + IRR_SGIX_vertex_preclip, + IRR_SGIX_ycrcb, + IRR_SGIX_ycrcba, + IRR_SGIX_ycrcb_subsample, + IRR_SUN_convolution_border_modes, + IRR_SUN_global_alpha, + IRR_SUN_mesh_array, + IRR_SUN_slice_accum, + IRR_SUN_triangle_list, + IRR_SUN_vertex, + IRR_SUNX_constant_data, + IRR_WIN_phong_shading, + IRR_WIN_specular_fog, + IRR_NVX_gpu_memory_info, + IRR_OpenGL_Feature_Count + }; + + + // constructor + COpenGLExtensionHandler(); + + // deferred initialization + void initExtensions(bool stencilBuffer); + + //! queries the features of the driver, returns true if feature is available + bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + + //! queries the features of the driver, returns true if feature is available + bool queryOpenGLFeature(EOpenGLFeatures feature) const + { + return FeatureAvailable[feature]; + } + + //! show all features with availablity + void dump() const; + + void dumpFramebufferFormats() const; + + // Some variables for properties + bool StencilBuffer; + bool MultiTextureExtension; + bool TextureCompressionExtension; + + // Some non-boolean properties + //! Maxmimum texture layers supported by the fixed pipeline + u8 MaxSupportedTextures; + //! Maxmimum texture layers supported by the engine + u8 MaxTextureUnits; + //! Maximum hardware lights supported + u8 MaxLights; + //! Maximal Anisotropy + u8 MaxAnisotropy; + //! Number of user clipplanes + u8 MaxUserClipPlanes; + //! Number of auxiliary buffers + u8 MaxAuxBuffers; + //! Number of rendertargets available as MRTs + u8 MaxMultipleRenderTargets; + //! Optimal number of indices per meshbuffer + u32 MaxIndices; + //! Maximal texture dimension + u32 MaxTextureSize; + //! Maximal vertices handled by geometry shaders + u32 MaxGeometryVerticesOut; + //! Maximal LOD Bias + f32 MaxTextureLODBias; + //! Minimal and maximal supported thickness for lines without smoothing + GLfloat DimAliasedLine[2]; + //! Minimal and maximal supported thickness for points without smoothing + GLfloat DimAliasedPoint[2]; + //! Minimal and maximal supported thickness for lines with smoothing + GLfloat DimSmoothedLine[2]; + //! Minimal and maximal supported thickness for points with smoothing + GLfloat DimSmoothedPoint[2]; + + //! OpenGL version as Integer: 100*Major+Minor, i.e. 2.1 becomes 201 + u16 Version; + //! GLSL version as Integer: 100*Major+Minor + u16 ShaderLanguageVersion; + + bool OcclusionQuerySupport; + + // public access to the (loaded) extensions. + // general functions + void extGlActiveTexture(GLenum texture); + void extGlClientActiveTexture(GLenum texture); + void extGlPointParameterf(GLint loc, GLfloat f); + void extGlPointParameterfv(GLint loc, const GLfloat *v); + void extGlStencilFuncSeparate (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + void extGlStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); + void extGlCompressedTexImage2D(GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, const void* data); + + // shader programming + void extGlGenPrograms(GLsizei n, GLuint *programs); + void extGlBindProgram(GLenum target, GLuint program); + void extGlProgramString(GLenum target, GLenum format, GLsizei len, const GLvoid *string); + void extGlLoadProgram(GLenum target, GLuint id, GLsizei len, const GLubyte *string); + void extGlDeletePrograms(GLsizei n, const GLuint *programs); + void extGlProgramLocalParameter4fv(GLenum, GLuint, const GLfloat *); + GLhandleARB extGlCreateShaderObject(GLenum shaderType); + GLuint extGlCreateShader(GLenum shaderType); + // note: Due to the type confusion between shader_objects and OpenGL 2.0 + // we have to add the ARB extension for proper method definitions in case + // that handleARB and uint are the same type + void extGlShaderSourceARB(GLhandleARB shader, GLsizei numOfStrings, const char **strings, const GLint *lenOfStrings); + void extGlShaderSource(GLuint shader, GLsizei numOfStrings, const char **strings, const GLint *lenOfStrings); + // note: Due to the type confusion between shader_objects and OpenGL 2.0 + // we have to add the ARB extension for proper method definitions in case + // that handleARB and uint are the same type + void extGlCompileShaderARB(GLhandleARB shader); + void extGlCompileShader(GLuint shader); + GLhandleARB extGlCreateProgramObject(void); + GLuint extGlCreateProgram(void); + void extGlAttachObject(GLhandleARB program, GLhandleARB shader); + void extGlAttachShader(GLuint program, GLuint shader); + void extGlLinkProgramARB(GLhandleARB program); + // note: Due to the type confusion between shader_objects and OpenGL 2.0 + // we have to add the ARB extension for proper method definitions in case + // that handleARB and uint are the same type + void extGlLinkProgram(GLuint program); + void extGlUseProgramObject(GLhandleARB prog); + void extGlUseProgram(GLuint prog); + void extGlDeleteObject(GLhandleARB object); + void extGlDeleteProgram(GLuint object); + void extGlDeleteShader(GLuint shader); + void extGlGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); + void extGlGetAttachedObjects(GLhandleARB program, GLsizei maxcount, GLsizei* count, GLhandleARB* shaders); + void extGlGetInfoLog(GLhandleARB object, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); + void extGlGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog); + void extGlGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog); + void extGlGetObjectParameteriv(GLhandleARB object, GLenum type, GLint *param); + void extGlGetShaderiv(GLuint shader, GLenum type, GLint *param); + void extGlGetProgramiv(GLuint program, GLenum type, GLint *param); + GLint extGlGetUniformLocationARB(GLhandleARB program, const char *name); + GLint extGlGetUniformLocation(GLuint program, const char *name); + void extGlUniform1fv(GLint loc, GLsizei count, const GLfloat *v); + void extGlUniform2fv(GLint loc, GLsizei count, const GLfloat *v); + void extGlUniform3fv(GLint loc, GLsizei count, const GLfloat *v); + void extGlUniform4fv(GLint loc, GLsizei count, const GLfloat *v); + void extGlUniform1bv(GLint loc, GLsizei count, const bool *v); + void extGlUniform2bv(GLint loc, GLsizei count, const bool *v); + void extGlUniform3bv(GLint loc, GLsizei count, const bool *v); + void extGlUniform4bv(GLint loc, GLsizei count, const bool *v); + void extGlUniform1iv(GLint loc, GLsizei count, const GLint *v); + void extGlUniform2iv(GLint loc, GLsizei count, const GLint *v); + void extGlUniform3iv(GLint loc, GLsizei count, const GLint *v); + void extGlUniform4iv(GLint loc, GLsizei count, const GLint *v); + void extGlUniformMatrix2fv(GLint loc, GLsizei count, GLboolean transpose, const GLfloat *v); + void extGlUniformMatrix3fv(GLint loc, GLsizei count, GLboolean transpose, const GLfloat *v); + void extGlUniformMatrix4fv(GLint loc, GLsizei count, GLboolean transpose, const GLfloat *v); + void extGlGetActiveUniformARB(GLhandleARB program, GLuint index, GLsizei maxlength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); + void extGlGetActiveUniform(GLuint program, GLuint index, GLsizei maxlength, GLsizei *length, GLint *size, GLenum *type, GLchar *name); + + // framebuffer objects + void extGlBindFramebuffer(GLenum target, GLuint framebuffer); + void extGlDeleteFramebuffers(GLsizei n, const GLuint *framebuffers); + void extGlGenFramebuffers(GLsizei n, GLuint *framebuffers); + GLenum extGlCheckFramebufferStatus(GLenum target); + void extGlFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); + void extGlBindRenderbuffer(GLenum target, GLuint renderbuffer); + void extGlDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers); + void extGlGenRenderbuffers(GLsizei n, GLuint *renderbuffers); + void extGlRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); + void extGlFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); + void extGlGenerateMipmap(GLenum target); + void extGlActiveStencilFace(GLenum face); + void extGlDrawBuffers(GLsizei n, const GLenum *bufs); + + // vertex buffer object + void extGlGenBuffers(GLsizei n, GLuint *buffers); + void extGlBindBuffer(GLenum target, GLuint buffer); + void extGlBufferData(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); + void extGlDeleteBuffers(GLsizei n, const GLuint *buffers); + void extGlBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); + void extGlGetBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); + void *extGlMapBuffer (GLenum target, GLenum access); + GLboolean extGlUnmapBuffer (GLenum target); + GLboolean extGlIsBuffer (GLuint buffer); + void extGlGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); + void extGlGetBufferPointerv (GLenum target, GLenum pname, GLvoid **params); + void extGlProvokingVertex(GLenum mode); + void extGlColorMaskIndexed(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); + void extGlEnableIndexed(GLenum target, GLuint index); + void extGlDisableIndexed(GLenum target, GLuint index); + void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst); + void extGlBlendEquationIndexed(GLuint buf, GLenum mode); + void extGlProgramParameteri(GLuint program, GLenum pname, GLint value); + + // occlusion query + void extGlGenQueries(GLsizei n, GLuint *ids); + void extGlDeleteQueries(GLsizei n, const GLuint *ids); + GLboolean extGlIsQuery(GLuint id); + void extGlBeginQuery(GLenum target, GLuint id); + void extGlEndQuery(GLenum target); + void extGlGetQueryiv(GLenum target, GLenum pname, GLint *params); + void extGlGetQueryObjectiv(GLuint id, GLenum pname, GLint *params); + void extGlGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params); + + // generic vsync setting method for several extensions + void extGlSwapInterval(int interval); + + // blend operations + void extGlBlendEquation(GLenum mode); + + // the global feature array + bool FeatureAvailable[IRR_OpenGL_Feature_Count]; + + protected: + #if defined(_IRR_OPENGL_USE_EXTPOINTER_) + PFNGLACTIVETEXTUREARBPROC pGlActiveTextureARB; + PFNGLCLIENTACTIVETEXTUREARBPROC pGlClientActiveTextureARB; + PFNGLGENPROGRAMSARBPROC pGlGenProgramsARB; + PFNGLGENPROGRAMSNVPROC pGlGenProgramsNV; + PFNGLBINDPROGRAMARBPROC pGlBindProgramARB; + PFNGLBINDPROGRAMNVPROC pGlBindProgramNV; + PFNGLDELETEPROGRAMSARBPROC pGlDeleteProgramsARB; + PFNGLDELETEPROGRAMSNVPROC pGlDeleteProgramsNV; + PFNGLPROGRAMSTRINGARBPROC pGlProgramStringARB; + PFNGLLOADPROGRAMNVPROC pGlLoadProgramNV; + PFNGLPROGRAMLOCALPARAMETER4FVARBPROC pGlProgramLocalParameter4fvARB; + PFNGLCREATESHADEROBJECTARBPROC pGlCreateShaderObjectARB; + PFNGLSHADERSOURCEARBPROC pGlShaderSourceARB; + PFNGLCOMPILESHADERARBPROC pGlCompileShaderARB; + PFNGLCREATEPROGRAMOBJECTARBPROC pGlCreateProgramObjectARB; + PFNGLATTACHOBJECTARBPROC pGlAttachObjectARB; + PFNGLLINKPROGRAMARBPROC pGlLinkProgramARB; + PFNGLUSEPROGRAMOBJECTARBPROC pGlUseProgramObjectARB; + PFNGLDELETEOBJECTARBPROC pGlDeleteObjectARB; + PFNGLCREATEPROGRAMPROC pGlCreateProgram; + PFNGLUSEPROGRAMPROC pGlUseProgram; + PFNGLDELETEPROGRAMPROC pGlDeleteProgram; + PFNGLDELETESHADERPROC pGlDeleteShader; + PFNGLGETATTACHEDOBJECTSARBPROC pGlGetAttachedObjectsARB; + PFNGLGETATTACHEDSHADERSPROC pGlGetAttachedShaders; + PFNGLCREATESHADERPROC pGlCreateShader; + PFNGLSHADERSOURCEPROC pGlShaderSource; + PFNGLCOMPILESHADERPROC pGlCompileShader; + PFNGLATTACHSHADERPROC pGlAttachShader; + PFNGLLINKPROGRAMPROC pGlLinkProgram; + PFNGLGETINFOLOGARBPROC pGlGetInfoLogARB; + PFNGLGETSHADERINFOLOGPROC pGlGetShaderInfoLog; + PFNGLGETPROGRAMINFOLOGPROC pGlGetProgramInfoLog; + PFNGLGETOBJECTPARAMETERIVARBPROC pGlGetObjectParameterivARB; + PFNGLGETSHADERIVPROC pGlGetShaderiv; + PFNGLGETSHADERIVPROC pGlGetProgramiv; + PFNGLGETUNIFORMLOCATIONARBPROC pGlGetUniformLocationARB; + PFNGLGETUNIFORMLOCATIONPROC pGlGetUniformLocation; + PFNGLUNIFORM1FVARBPROC pGlUniform1fvARB; + PFNGLUNIFORM2FVARBPROC pGlUniform2fvARB; + PFNGLUNIFORM3FVARBPROC pGlUniform3fvARB; + PFNGLUNIFORM4FVARBPROC pGlUniform4fvARB; + PFNGLUNIFORM1IVARBPROC pGlUniform1ivARB; + PFNGLUNIFORM2IVARBPROC pGlUniform2ivARB; + PFNGLUNIFORM3IVARBPROC pGlUniform3ivARB; + PFNGLUNIFORM4IVARBPROC pGlUniform4ivARB; + PFNGLUNIFORMMATRIX2FVARBPROC pGlUniformMatrix2fvARB; + PFNGLUNIFORMMATRIX3FVARBPROC pGlUniformMatrix3fvARB; + PFNGLUNIFORMMATRIX4FVARBPROC pGlUniformMatrix4fvARB; + PFNGLGETACTIVEUNIFORMARBPROC pGlGetActiveUniformARB; + PFNGLGETACTIVEUNIFORMPROC pGlGetActiveUniform; + PFNGLPOINTPARAMETERFARBPROC pGlPointParameterfARB; + PFNGLPOINTPARAMETERFVARBPROC pGlPointParameterfvARB; + PFNGLSTENCILFUNCSEPARATEPROC pGlStencilFuncSeparate; + PFNGLSTENCILOPSEPARATEPROC pGlStencilOpSeparate; + PFNGLSTENCILFUNCSEPARATEATIPROC pGlStencilFuncSeparateATI; + PFNGLSTENCILOPSEPARATEATIPROC pGlStencilOpSeparateATI; + PFNGLCOMPRESSEDTEXIMAGE2DPROC pGlCompressedTexImage2D; + // ARB framebuffer object + PFNGLBINDFRAMEBUFFERPROC pGlBindFramebuffer; + PFNGLDELETEFRAMEBUFFERSPROC pGlDeleteFramebuffers; + PFNGLGENFRAMEBUFFERSPROC pGlGenFramebuffers; + PFNGLCHECKFRAMEBUFFERSTATUSPROC pGlCheckFramebufferStatus; + PFNGLFRAMEBUFFERTEXTURE2DPROC pGlFramebufferTexture2D; + PFNGLBINDRENDERBUFFERPROC pGlBindRenderbuffer; + PFNGLDELETERENDERBUFFERSPROC pGlDeleteRenderbuffers; + PFNGLGENRENDERBUFFERSPROC pGlGenRenderbuffers; + PFNGLRENDERBUFFERSTORAGEPROC pGlRenderbufferStorage; + PFNGLFRAMEBUFFERRENDERBUFFERPROC pGlFramebufferRenderbuffer; + PFNGLGENERATEMIPMAPPROC pGlGenerateMipmap; + // EXT framebuffer object + PFNGLBINDFRAMEBUFFEREXTPROC pGlBindFramebufferEXT; + PFNGLDELETEFRAMEBUFFERSEXTPROC pGlDeleteFramebuffersEXT; + PFNGLGENFRAMEBUFFERSEXTPROC pGlGenFramebuffersEXT; + PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC pGlCheckFramebufferStatusEXT; + PFNGLFRAMEBUFFERTEXTURE2DEXTPROC pGlFramebufferTexture2DEXT; + PFNGLBINDRENDERBUFFEREXTPROC pGlBindRenderbufferEXT; + PFNGLDELETERENDERBUFFERSEXTPROC pGlDeleteRenderbuffersEXT; + PFNGLGENRENDERBUFFERSEXTPROC pGlGenRenderbuffersEXT; + PFNGLRENDERBUFFERSTORAGEEXTPROC pGlRenderbufferStorageEXT; + PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC pGlFramebufferRenderbufferEXT; + PFNGLGENERATEMIPMAPEXTPROC pGlGenerateMipmapEXT; + PFNGLACTIVESTENCILFACEEXTPROC pGlActiveStencilFaceEXT; + PFNGLDRAWBUFFERSARBPROC pGlDrawBuffersARB; + PFNGLDRAWBUFFERSATIPROC pGlDrawBuffersATI; + PFNGLGENBUFFERSARBPROC pGlGenBuffersARB; + PFNGLBINDBUFFERARBPROC pGlBindBufferARB; + PFNGLBUFFERDATAARBPROC pGlBufferDataARB; + PFNGLDELETEBUFFERSARBPROC pGlDeleteBuffersARB; + PFNGLBUFFERSUBDATAARBPROC pGlBufferSubDataARB; + PFNGLGETBUFFERSUBDATAARBPROC pGlGetBufferSubDataARB; + PFNGLMAPBUFFERARBPROC pGlMapBufferARB; + PFNGLUNMAPBUFFERARBPROC pGlUnmapBufferARB; + PFNGLISBUFFERARBPROC pGlIsBufferARB; + PFNGLGETBUFFERPARAMETERIVARBPROC pGlGetBufferParameterivARB; + PFNGLGETBUFFERPOINTERVARBPROC pGlGetBufferPointervARB; + PFNGLPROVOKINGVERTEXPROC pGlProvokingVertexARB; + PFNGLPROVOKINGVERTEXEXTPROC pGlProvokingVertexEXT; + PFNGLCOLORMASKINDEXEDEXTPROC pGlColorMaskIndexedEXT; + PFNGLENABLEINDEXEDEXTPROC pGlEnableIndexedEXT; + PFNGLDISABLEINDEXEDEXTPROC pGlDisableIndexedEXT; + PFNGLBLENDFUNCINDEXEDAMDPROC pGlBlendFuncIndexedAMD; + PFNGLBLENDFUNCIPROC pGlBlendFunciARB; + PFNGLBLENDEQUATIONINDEXEDAMDPROC pGlBlendEquationIndexedAMD; + PFNGLBLENDEQUATIONIPROC pGlBlendEquationiARB; + PFNGLPROGRAMPARAMETERIARBPROC pGlProgramParameteriARB; + PFNGLPROGRAMPARAMETERIEXTPROC pGlProgramParameteriEXT; + PFNGLGENQUERIESARBPROC pGlGenQueriesARB; + PFNGLDELETEQUERIESARBPROC pGlDeleteQueriesARB; + PFNGLISQUERYARBPROC pGlIsQueryARB; + PFNGLBEGINQUERYARBPROC pGlBeginQueryARB; + PFNGLENDQUERYARBPROC pGlEndQueryARB; + PFNGLGETQUERYIVARBPROC pGlGetQueryivARB; + PFNGLGETQUERYOBJECTIVARBPROC pGlGetQueryObjectivARB; + PFNGLGETQUERYOBJECTUIVARBPROC pGlGetQueryObjectuivARB; + PFNGLGENOCCLUSIONQUERIESNVPROC pGlGenOcclusionQueriesNV; + PFNGLDELETEOCCLUSIONQUERIESNVPROC pGlDeleteOcclusionQueriesNV; + PFNGLISOCCLUSIONQUERYNVPROC pGlIsOcclusionQueryNV; + PFNGLBEGINOCCLUSIONQUERYNVPROC pGlBeginOcclusionQueryNV; + PFNGLENDOCCLUSIONQUERYNVPROC pGlEndOcclusionQueryNV; + PFNGLGETOCCLUSIONQUERYIVNVPROC pGlGetOcclusionQueryivNV; + PFNGLGETOCCLUSIONQUERYUIVNVPROC pGlGetOcclusionQueryuivNV; + PFNGLBLENDEQUATIONEXTPROC pGlBlendEquationEXT; + PFNGLBLENDEQUATIONPROC pGlBlendEquation; + #if defined(WGL_EXT_swap_control) + PFNWGLSWAPINTERVALEXTPROC pWglSwapIntervalEXT; + #endif + #if defined(GLX_SGI_swap_control) + PFNGLXSWAPINTERVALSGIPROC pGlxSwapIntervalSGI; + #endif + #if defined(GLX_EXT_swap_control) + PFNGLXSWAPINTERVALEXTPROC pGlxSwapIntervalEXT; + #endif + #if defined(GLX_MESA_swap_control) + PFNGLXSWAPINTERVALMESAPROC pGlxSwapIntervalMESA; + #endif + #endif +}; + +inline void COpenGLExtensionHandler::extGlActiveTexture(GLenum texture) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (MultiTextureExtension && pGlActiveTextureARB) + pGlActiveTextureARB(texture); +#else + if (MultiTextureExtension) +#ifdef GL_ARB_multitexture + glActiveTextureARB(texture); +#else + glActiveTexture(texture); +#endif +#endif +} + +inline void COpenGLExtensionHandler::extGlClientActiveTexture(GLenum texture) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (MultiTextureExtension && pGlClientActiveTextureARB) + pGlClientActiveTextureARB(texture); +#else + if (MultiTextureExtension) + glClientActiveTextureARB(texture); +#endif +} + +inline void COpenGLExtensionHandler::extGlGenPrograms(GLsizei n, GLuint *programs) +{ + if (programs) + memset(programs,0,n*sizeof(GLuint)); +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGenProgramsARB) + pGlGenProgramsARB(n, programs); + else if (pGlGenProgramsNV) + pGlGenProgramsNV(n, programs); +#elif defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + glGenProgramsARB(n,programs); +#elif defined(GL_NV_vertex_program) || defined(GL_NV_fragment_program) + glGenProgramsNV(n,programs); +#else + os::Printer::log("glGenPrograms not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBindProgram(GLenum target, GLuint program) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBindProgramARB) + pGlBindProgramARB(target, program); + else if (pGlBindProgramNV) + pGlBindProgramNV(target, program); +#elif defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + glBindProgramARB(target, program); +#elif defined(GL_NV_vertex_program) || defined(GL_NV_fragment_program) + glBindProgramNV(target, program); +#else + os::Printer::log("glBindProgram not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlProgramString(GLenum target, GLenum format, GLsizei len, const GLvoid *string) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlProgramStringARB) + pGlProgramStringARB(target, format, len, string); +#elif defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + glProgramStringARB(target,format,len,string); +#else + os::Printer::log("glProgramString not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlLoadProgram(GLenum target, GLuint id, GLsizei len, const GLubyte *string) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlLoadProgramNV) + pGlLoadProgramNV(target, id, len, string); +#elif defined(GL_NV_vertex_program) || defined(GL_NV_fragment_program) + glLoadProgramNV(target,id,len,string); +#else + os::Printer::log("glLoadProgram not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeletePrograms(GLsizei n, const GLuint *programs) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteProgramsARB) + pGlDeleteProgramsARB(n, programs); + else if (pGlDeleteProgramsNV) + pGlDeleteProgramsNV(n, programs); +#elif defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + glDeleteProgramsARB(n,programs); +#elif defined(GL_NV_vertex_program) || defined(GL_NV_fragment_program) + glDeleteProgramsNV(n,programs); +#else + os::Printer::log("glDeletePrograms not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlProgramLocalParameter4fv(GLenum n, GLuint i, const GLfloat *f) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlProgramLocalParameter4fvARB) + pGlProgramLocalParameter4fvARB(n,i,f); +#elif defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + glProgramLocalParameter4fvARB(n,i,f); +#else + os::Printer::log("glProgramLocalParameter4fv not supported", ELL_ERROR); +#endif +} + +inline GLhandleARB COpenGLExtensionHandler::extGlCreateShaderObject(GLenum shaderType) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCreateShaderObjectARB) + return pGlCreateShaderObjectARB(shaderType); +#elif defined(GL_ARB_shader_objects) + return glCreateShaderObjectARB(shaderType); +#else + os::Printer::log("glCreateShaderObject not supported", ELL_ERROR); +#endif + return 0; +} + +inline GLuint COpenGLExtensionHandler::extGlCreateShader(GLenum shaderType) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCreateShader) + return pGlCreateShader(shaderType); +#elif defined(GL_VERSION_2_0) + return glCreateShader(shaderType); +#else + os::Printer::log("glCreateShader not supported", ELL_ERROR); +#endif + return 0; +} + +inline void COpenGLExtensionHandler::extGlShaderSourceARB(GLhandleARB shader, GLsizei numOfStrings, const char **strings, const GLint *lenOfStrings) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlShaderSourceARB) + pGlShaderSourceARB(shader, numOfStrings, strings, lenOfStrings); +#elif defined(GL_ARB_shader_objects) + glShaderSourceARB(shader, numOfStrings, strings, (GLint *)lenOfStrings); +#else + os::Printer::log("glShaderSource not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlShaderSource(GLuint shader, GLsizei numOfStrings, const char **strings, const GLint *lenOfStrings) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlShaderSource) + pGlShaderSource(shader, numOfStrings, strings, lenOfStrings); +#elif defined(GL_VERSION_2_0) + glShaderSource(shader, numOfStrings, strings, (GLint *)lenOfStrings); +#else + os::Printer::log("glShaderSource not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlCompileShaderARB(GLhandleARB shader) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCompileShaderARB) + pGlCompileShaderARB(shader); +#elif defined(GL_ARB_shader_objects) + glCompileShaderARB(shader); +#else + os::Printer::log("glCompileShader not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlCompileShader(GLuint shader) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCompileShader) + pGlCompileShader(shader); +#elif defined(GL_VERSION_2_0) + glCompileShader(shader); +#else + os::Printer::log("glCompileShader not supported", ELL_ERROR); +#endif +} + +inline GLhandleARB COpenGLExtensionHandler::extGlCreateProgramObject(void) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCreateProgramObjectARB) + return pGlCreateProgramObjectARB(); +#elif defined(GL_ARB_shader_objects) + return glCreateProgramObjectARB(); +#else + os::Printer::log("glCreateProgramObject not supported", ELL_ERROR); +#endif + return 0; +} + +inline GLuint COpenGLExtensionHandler::extGlCreateProgram(void) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCreateProgram) + return pGlCreateProgram(); +#elif defined(GL_VERSION_2_0) + return glCreateProgram(); +#else + os::Printer::log("glCreateProgram not supported", ELL_ERROR); +#endif + return 0; +} + +inline void COpenGLExtensionHandler::extGlAttachObject(GLhandleARB program, GLhandleARB shader) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlAttachObjectARB) + pGlAttachObjectARB(program, shader); +#elif defined(GL_ARB_shader_objects) + glAttachObjectARB(program, shader); +#else + os::Printer::log("glAttachObject not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlAttachShader(GLuint program, GLuint shader) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlAttachShader) + pGlAttachShader(program, shader); +#elif defined(GL_VERSION_2_0) + glAttachShader(program, shader); +#else + os::Printer::log("glAttachShader not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlLinkProgramARB(GLhandleARB program) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlLinkProgramARB) + pGlLinkProgramARB(program); +#elif defined(GL_ARB_shader_objects) + glLinkProgramARB(program); +#else + os::Printer::log("glLinkProgram not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlLinkProgram(GLuint program) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlLinkProgram) + pGlLinkProgram(program); +#elif defined(GL_VERSION_2_0) + glLinkProgram(program); +#else + os::Printer::log("glLinkProgram not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUseProgramObject(GLhandleARB prog) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUseProgramObjectARB) + pGlUseProgramObjectARB(prog); +#elif defined(GL_ARB_shader_objects) + glUseProgramObjectARB(prog); +#else + os::Printer::log("glUseProgramObject not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUseProgram(GLuint prog) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUseProgram) + pGlUseProgram(prog); +#elif defined(GL_VERSION_2_0) + glUseProgram(prog); +#else + os::Printer::log("glUseProgram not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteObject(GLhandleARB object) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteObjectARB) + pGlDeleteObjectARB(object); +#elif defined(GL_ARB_shader_objects) + glDeleteObjectARB(object); +#else + os::Printer::log("glDeleteObject not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteProgram(GLuint object) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteProgram) + pGlDeleteProgram(object); +#elif defined(GL_VERSION_2_0) + glDeleteProgram(object); +#else + os::Printer::log("glDeleteProgram not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteShader(GLuint shader) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteShader) + pGlDeleteShader(shader); +#elif defined(GL_VERSION_2_0) + glDeleteShader(shader); +#else + os::Printer::log("glDeleteShader not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetAttachedObjects(GLhandleARB program, GLsizei maxcount, GLsizei* count, GLhandleARB* shaders) +{ + if (count) + *count=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetAttachedObjectsARB) + pGlGetAttachedObjectsARB(program, maxcount, count, shaders); +#elif defined(GL_ARB_shader_objects) + glGetAttachedObjectsARB(program, maxcount, count, shaders); +#else + os::Printer::log("glGetAttachedObjects not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +{ + if (count) + *count=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetAttachedShaders) + pGlGetAttachedShaders(program, maxcount, count, shaders); +#elif defined(GL_VERSION_2_0) + glGetAttachedShaders(program, maxcount, count, shaders); +#else + os::Printer::log("glGetAttachedShaders not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetInfoLog(GLhandleARB object, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) +{ + if (length) + *length=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetInfoLogARB) + pGlGetInfoLogARB(object, maxLength, length, infoLog); +#elif defined(GL_ARB_shader_objects) + glGetInfoLogARB(object, maxLength, length, infoLog); +#else + os::Printer::log("glGetInfoLog not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog) +{ + if (length) + *length=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetShaderInfoLog) + pGlGetShaderInfoLog(shader, maxLength, length, infoLog); +#elif defined(GL_VERSION_2_0) + glGetShaderInfoLog(shader, maxLength, length, infoLog); +#else + os::Printer::log("glGetShaderInfoLog not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog) +{ + if (length) + *length=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetProgramInfoLog) + pGlGetProgramInfoLog(program, maxLength, length, infoLog); +#elif defined(GL_VERSION_2_0) + glGetProgramInfoLog(program, maxLength, length, infoLog); +#else + os::Printer::log("glGetProgramInfoLog not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetObjectParameteriv(GLhandleARB object, GLenum type, GLint *param) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetObjectParameterivARB) + pGlGetObjectParameterivARB(object, type, param); +#elif defined(GL_ARB_shader_objects) + glGetObjectParameterivARB(object, type, param); +#else + os::Printer::log("glGetObjectParameteriv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetShaderiv(GLuint shader, GLenum type, GLint *param) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetShaderiv) + pGlGetShaderiv(shader, type, param); +#elif defined(GL_VERSION_2_0) + glGetShaderiv(shader, type, param); +#else + os::Printer::log("glGetShaderiv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetProgramiv(GLuint program, GLenum type, GLint *param) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetProgramiv) + pGlGetProgramiv(program, type, param); +#elif defined(GL_VERSION_2_0) + glGetProgramiv(program, type, param); +#else + os::Printer::log("glGetProgramiv not supported", ELL_ERROR); +#endif +} + +inline GLint COpenGLExtensionHandler::extGlGetUniformLocationARB(GLhandleARB program, const char *name) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetUniformLocationARB) + return pGlGetUniformLocationARB(program, name); +#elif defined(GL_ARB_shader_objects) + return glGetUniformLocationARB(program, name); +#else + os::Printer::log("glGetUniformLocation not supported", ELL_ERROR); +#endif + return 0; +} + +inline GLint COpenGLExtensionHandler::extGlGetUniformLocation(GLuint program, const char *name) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetUniformLocation) + return pGlGetUniformLocation(program, name); +#elif defined(GL_VERSION_2_0) + return glGetUniformLocation(program, name); +#else + os::Printer::log("glGetUniformLocation not supported", ELL_ERROR); +#endif + return 0; +} + +inline void COpenGLExtensionHandler::extGlUniform1fv(GLint loc, GLsizei count, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform1fvARB) + pGlUniform1fvARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform1fvARB(loc, count, v); +#else + os::Printer::log("glUniform1fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform2fv(GLint loc, GLsizei count, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform2fvARB) + pGlUniform2fvARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform2fvARB(loc, count, v); +#else + os::Printer::log("glUniform2fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform3fv(GLint loc, GLsizei count, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform3fvARB) + pGlUniform3fvARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform3fvARB(loc, count, v); +#else + os::Printer::log("glUniform3fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform4fv(GLint loc, GLsizei count, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform4fvARB) + pGlUniform4fvARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform4fvARB(loc, count, v); +#else + os::Printer::log("glUniform4fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform1iv(GLint loc, GLsizei count, const GLint *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform1ivARB) + pGlUniform1ivARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform1ivARB(loc, count, v); +#else + os::Printer::log("glUniform1iv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform2iv(GLint loc, GLsizei count, const GLint *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform2ivARB) + pGlUniform2ivARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform2ivARB(loc, count, v); +#else + os::Printer::log("glUniform2iv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform3iv(GLint loc, GLsizei count, const GLint *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform3ivARB) + pGlUniform3ivARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform3ivARB(loc, count, v); +#else + os::Printer::log("glUniform3iv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniform4iv(GLint loc, GLsizei count, const GLint *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniform4ivARB) + pGlUniform4ivARB(loc, count, v); +#elif defined(GL_ARB_shader_objects) + glUniform4ivARB(loc, count, v); +#else + os::Printer::log("glUniform4iv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniformMatrix2fv(GLint loc, GLsizei count, GLboolean transpose, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniformMatrix2fvARB) + pGlUniformMatrix2fvARB(loc, count, transpose, v); +#elif defined(GL_ARB_shader_objects) + glUniformMatrix2fvARB(loc, count, transpose, v); +#else + os::Printer::log("glUniformMatrix2fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniformMatrix3fv(GLint loc, GLsizei count, GLboolean transpose, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniformMatrix3fvARB) + pGlUniformMatrix3fvARB(loc, count, transpose, v); +#elif defined(GL_ARB_shader_objects) + glUniformMatrix3fvARB(loc, count, transpose, v); +#else + os::Printer::log("glUniformMatrix3fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlUniformMatrix4fv(GLint loc, GLsizei count, GLboolean transpose, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUniformMatrix4fvARB) + pGlUniformMatrix4fvARB(loc, count, transpose, v); +#elif defined(GL_ARB_shader_objects) + glUniformMatrix4fvARB(loc, count, transpose, v); +#else + os::Printer::log("glUniformMatrix4fv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetActiveUniformARB(GLhandleARB program, + GLuint index, GLsizei maxlength, GLsizei *length, + GLint *size, GLenum *type, GLcharARB *name) +{ + if (length) + *length=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetActiveUniformARB) + pGlGetActiveUniformARB(program, index, maxlength, length, size, type, name); +#elif defined(GL_ARB_shader_objects) + glGetActiveUniformARB(program, index, maxlength, length, size, type, name); +#else + os::Printer::log("glGetActiveUniform not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetActiveUniform(GLuint program, + GLuint index, GLsizei maxlength, GLsizei *length, + GLint *size, GLenum *type, GLchar *name) +{ + if (length) + *length=0; +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetActiveUniform) + pGlGetActiveUniform(program, index, maxlength, length, size, type, name); +#elif defined(GL_VERSION_2_0) + glGetActiveUniform(program, index, maxlength, length, size, type, name); +#else + os::Printer::log("glGetActiveUniform not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlPointParameterf(GLint loc, GLfloat f) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlPointParameterfARB) + pGlPointParameterfARB(loc, f); +#elif defined(GL_ARB_point_parameters) + glPointParameterfARB(loc, f); +#else + os::Printer::log("glPointParameterf not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlPointParameterfv(GLint loc, const GLfloat *v) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlPointParameterfvARB) + pGlPointParameterfvARB(loc, v); +#elif defined(GL_ARB_point_parameters) + glPointParameterfvARB(loc, v); +#else + os::Printer::log("glPointParameterfv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlStencilFuncSeparate (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlStencilFuncSeparate) + pGlStencilFuncSeparate(frontfunc, backfunc, ref, mask); + else if (pGlStencilFuncSeparateATI) + pGlStencilFuncSeparateATI(frontfunc, backfunc, ref, mask); +#elif defined(GL_VERSION_2_0) + glStencilFuncSeparate(frontfunc, backfunc, ref, mask); +#elif defined(GL_ATI_separate_stencil) + glStencilFuncSeparateATI(frontfunc, backfunc, ref, mask); +#else + os::Printer::log("glStencilFuncSeparate not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlStencilOpSeparate) + pGlStencilOpSeparate(face, fail, zfail, zpass); + else if (pGlStencilOpSeparateATI) + pGlStencilOpSeparateATI(face, fail, zfail, zpass); +#elif defined(GL_VERSION_2_0) + glStencilOpSeparate(face, fail, zfail, zpass); +#elif defined(GL_ATI_separate_stencil) + glStencilOpSeparateATI(face, fail, zfail, zpass); +#else + os::Printer::log("glStencilOpSeparate not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLsizei imageSize, const void* data) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCompressedTexImage2D) + pGlCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); +#elif defined(GL_ARB_texture_compression) + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); +#else + os::Printer::log("glCompressedTexImage2D not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBindFramebuffer(GLenum target, GLuint framebuffer) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBindFramebuffer) + pGlBindFramebuffer(target, framebuffer); + else if (pGlBindFramebufferEXT) + pGlBindFramebufferEXT(target, framebuffer); +#elif defined(GL_ARB_framebuffer_object) + glBindFramebuffer(target, framebuffer); +#elif defined(GL_EXT_framebuffer_object) + glBindFramebufferEXT(target, framebuffer); +#else + os::Printer::log("glBindFramebuffer not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteFramebuffers) + pGlDeleteFramebuffers(n, framebuffers); + else if (pGlDeleteFramebuffersEXT) + pGlDeleteFramebuffersEXT(n, framebuffers); +#elif defined(GL_ARB_framebuffer_object) + glDeleteFramebuffers(n, framebuffers); +#elif defined(GL_EXT_framebuffer_object) + glDeleteFramebuffersEXT(n, framebuffers); +#else + os::Printer::log("glDeleteFramebuffers not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGenFramebuffers(GLsizei n, GLuint *framebuffers) +{ + if (framebuffers) + memset(framebuffers,0,n*sizeof(GLuint)); +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGenFramebuffers) + pGlGenFramebuffers(n, framebuffers); + else if (pGlGenFramebuffersEXT) + pGlGenFramebuffersEXT(n, framebuffers); +#elif defined(GL_ARB_framebuffer_object) + glGenFramebuffers(n, framebuffers); +#elif defined(GL_EXT_framebuffer_object) + glGenFramebuffersEXT(n, framebuffers); +#else + os::Printer::log("glGenFramebuffers not supported", ELL_ERROR); +#endif +} + +inline GLenum COpenGLExtensionHandler::extGlCheckFramebufferStatus(GLenum target) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlCheckFramebufferStatus) + return pGlCheckFramebufferStatus(target); + else if (pGlCheckFramebufferStatusEXT) + return pGlCheckFramebufferStatusEXT(target); + else + return 0; +#elif defined(GL_ARB_framebuffer_object) + return glCheckFramebufferStatus(target); +#elif defined(GL_EXT_framebuffer_object) + return glCheckFramebufferStatusEXT(target); +#else + os::Printer::log("glCheckFramebufferStatus not supported", ELL_ERROR); + return 0; +#endif +} + +inline void COpenGLExtensionHandler::extGlFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlFramebufferTexture2D) + pGlFramebufferTexture2D(target, attachment, textarget, texture, level); + else if (pGlFramebufferTexture2DEXT) + pGlFramebufferTexture2DEXT(target, attachment, textarget, texture, level); +#elif defined(GL_ARB_framebuffer_object) + glFramebufferTexture2D(target, attachment, textarget, texture, level); +#elif defined(GL_EXT_framebuffer_object) + glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); +#else + os::Printer::log("glFramebufferTexture2D not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBindRenderbuffer(GLenum target, GLuint renderbuffer) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBindRenderbuffer) + pGlBindRenderbuffer(target, renderbuffer); + else if (pGlBindRenderbufferEXT) + pGlBindRenderbufferEXT(target, renderbuffer); +#elif defined(GL_ARB_framebuffer_object) + glBindRenderbuffer(target, renderbuffer); +#elif defined(GL_EXT_framebuffer_object) + glBindRenderbufferEXT(target, renderbuffer); +#else + os::Printer::log("glBindRenderbuffer not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteRenderbuffers) + pGlDeleteRenderbuffers(n, renderbuffers); + else if (pGlDeleteRenderbuffersEXT) + pGlDeleteRenderbuffersEXT(n, renderbuffers); +#elif defined(GL_ARB_framebuffer_object) + glDeleteRenderbuffers(n, renderbuffers); +#elif defined(GL_EXT_framebuffer_object) + glDeleteRenderbuffersEXT(n, renderbuffers); +#else + os::Printer::log("glDeleteRenderbuffers not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGenRenderbuffers(GLsizei n, GLuint *renderbuffers) +{ + if (renderbuffers) + memset(renderbuffers,0,n*sizeof(GLuint)); +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGenRenderbuffers) + pGlGenRenderbuffers(n, renderbuffers); + else if (pGlGenRenderbuffersEXT) + pGlGenRenderbuffersEXT(n, renderbuffers); +#elif defined(GL_ARB_framebuffer_object) + glGenRenderbuffers(n, renderbuffers); +#elif defined(GL_EXT_framebuffer_object) + glGenRenderbuffersEXT(n, renderbuffers); +#else + os::Printer::log("glGenRenderbuffers not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlRenderbufferStorage) + pGlRenderbufferStorage(target, internalformat, width, height); + else if (pGlRenderbufferStorageEXT) + pGlRenderbufferStorageEXT(target, internalformat, width, height); +#elif defined(GL_ARB_framebuffer_object) + glRenderbufferStorage(target, internalformat, width, height); +#elif defined(GL_EXT_framebuffer_object) + glRenderbufferStorageEXT(target, internalformat, width, height); +#else + os::Printer::log("glRenderbufferStorage not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlFramebufferRenderbuffer) + pGlFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + else if (pGlFramebufferRenderbufferEXT) + pGlFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); +#elif defined(GL_ARB_framebuffer_object) + glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +#elif defined(GL_EXT_framebuffer_object) + glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); +#else + os::Printer::log("glFramebufferRenderbuffer not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGenerateMipmap(GLenum target) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGenerateMipmap) + pGlGenerateMipmap(target); + else if (pGlGenerateMipmapEXT) + pGlGenerateMipmapEXT(target); +#elif defined(GL_ARB_framebuffer_object) + glGenerateMipmap(target); +#elif defined(GL_EXT_framebuffer_object) + glGenerateMipmapEXT(target); +#else + os::Printer::log("glGenerateMipmap not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlActiveStencilFace(GLenum face) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlActiveStencilFaceEXT) + pGlActiveStencilFaceEXT(face); +#elif defined(GL_EXT_stencil_two_side) + glActiveStencilFaceEXT(face); +#else + os::Printer::log("glActiveStencilFace not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDrawBuffers(GLsizei n, const GLenum *bufs) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDrawBuffersARB) + pGlDrawBuffersARB(n, bufs); + else if (pGlDrawBuffersATI) + pGlDrawBuffersATI(n, bufs); +#elif defined(GL_ARB_draw_buffers) + glDrawBuffersARB(n, bufs); +#elif defined(GL_ATI_draw_buffers) + glDrawBuffersATI(n, bufs); +#else + os::Printer::log("glDrawBuffers not supported", ELL_ERROR); +#endif +} + + +inline void COpenGLExtensionHandler::extGlGenBuffers(GLsizei n, GLuint *buffers) +{ + if (buffers) + memset(buffers,0,n*sizeof(GLuint)); +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGenBuffersARB) + pGlGenBuffersARB(n, buffers); +#elif defined(GL_ARB_vertex_buffer_object) + glGenBuffers(n, buffers); +#else + os::Printer::log("glGenBuffers not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBindBuffer(GLenum target, GLuint buffer) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBindBufferARB) + pGlBindBufferARB(target, buffer); +#elif defined(GL_ARB_vertex_buffer_object) + glBindBuffer(target, buffer); +#else + os::Printer::log("glBindBuffer not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBufferData(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBufferDataARB) + pGlBufferDataARB(target, size, data, usage); +#elif defined(GL_ARB_vertex_buffer_object) + glBufferData(target, size, data, usage); +#else + os::Printer::log("glBufferData not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteBuffers(GLsizei n, const GLuint *buffers) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteBuffersARB) + pGlDeleteBuffersARB(n, buffers); +#elif defined(GL_ARB_vertex_buffer_object) + glDeleteBuffers(n, buffers); +#else + os::Printer::log("glDeleteBuffers not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBufferSubData(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBufferSubDataARB) + pGlBufferSubDataARB(target, offset, size, data); +#elif defined(GL_ARB_vertex_buffer_object) + glBufferSubData(target, offset, size, data); +#else + os::Printer::log("glBufferSubData not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetBufferSubData(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetBufferSubDataARB) + pGlGetBufferSubDataARB(target, offset, size, data); +#elif defined(GL_ARB_vertex_buffer_object) + glGetBufferSubData(target, offset, size, data); +#else + os::Printer::log("glGetBufferSubData not supported", ELL_ERROR); +#endif +} + +inline void *COpenGLExtensionHandler::extGlMapBuffer(GLenum target, GLenum access) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlMapBufferARB) + return pGlMapBufferARB(target, access); + return 0; +#elif defined(GL_ARB_vertex_buffer_object) + return glMapBuffer(target, access); +#else + os::Printer::log("glMapBuffer not supported", ELL_ERROR); + return 0; +#endif +} + +inline GLboolean COpenGLExtensionHandler::extGlUnmapBuffer(GLenum target) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlUnmapBufferARB) + return pGlUnmapBufferARB(target); + return false; +#elif defined(GL_ARB_vertex_buffer_object) + return glUnmapBuffer(target); +#else + os::Printer::log("glUnmapBuffer not supported", ELL_ERROR); + return false; +#endif +} + +inline GLboolean COpenGLExtensionHandler::extGlIsBuffer(GLuint buffer) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlIsBufferARB) + return pGlIsBufferARB(buffer); + return false; +#elif defined(GL_ARB_vertex_buffer_object) + return glIsBuffer(buffer); +#else + os::Printer::log("glDeleteBuffers not supported", ELL_ERROR); + return false; +#endif +} + +inline void COpenGLExtensionHandler::extGlGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetBufferParameterivARB) + pGlGetBufferParameterivARB(target, pname, params); +#elif defined(GL_ARB_vertex_buffer_object) + glGetBufferParameteriv(target, pname, params); +#else + os::Printer::log("glGetBufferParameteriv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetBufferPointervARB) + pGlGetBufferPointervARB(target, pname, params); +#elif defined(GL_ARB_vertex_buffer_object) + glGetBufferPointerv(target, pname, params); +#else + os::Printer::log("glGetBufferPointerv not supported", ELL_ERROR); +#endif +} + + +inline void COpenGLExtensionHandler::extGlProvokingVertex(GLenum mode) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (FeatureAvailable[IRR_ARB_provoking_vertex] && pGlProvokingVertexARB) + pGlProvokingVertexARB(mode); + else if (FeatureAvailable[IRR_EXT_provoking_vertex] && pGlProvokingVertexEXT) + pGlProvokingVertexEXT(mode); +#elif defined(GL_ARB_provoking_vertex) + glProvokingVertex(mode); +#elif defined(GL_EXT_provoking_vertex) + glProvokingVertexEXT(mode); +#else + os::Printer::log("glProvokingVertex not supported", ELL_ERROR); +#endif +} + + +inline void COpenGLExtensionHandler::extGlColorMaskIndexed(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlColorMaskIndexedEXT) + pGlColorMaskIndexedEXT(buf, r, g, b, a); +#elif defined(GL_EXT_draw_buffers2) + glColorMaskIndexedEXT(buf, r, g, b, a); +#else + os::Printer::log("glColorMaskIndexed not supported", ELL_ERROR); +#endif +} + + +inline void COpenGLExtensionHandler::extGlEnableIndexed(GLenum target, GLuint index) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlEnableIndexedEXT) + pGlEnableIndexedEXT(target, index); +#elif defined(GL_EXT_draw_buffers2) + glEnableIndexedEXT(target, index); +#else + os::Printer::log("glEnableIndexed not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDisableIndexed(GLenum target, GLuint index) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlDisableIndexedEXT) + pGlDisableIndexedEXT(target, index); +#elif defined(GL_EXT_draw_buffers2) + glDisableIndexedEXT(target, index); +#else + os::Printer::log("glDisableIndexed not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendFunciARB) + pGlBlendFunciARB(buf, src, dst); + else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendFuncIndexedAMD) + pGlBlendFuncIndexedAMD(buf, src, dst); +#elif defined(GL_ARB_draw_buffers_blend) + glBlendFunciARB(buf, src, dst); +#elif defined(GL_AMD_draw_buffers_blend) + glBlendFuncIndexedAMD(buf, src, dst); +#else + os::Printer::log("glBlendFuncIndexed not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlBlendEquationIndexed(GLuint buf, GLenum mode) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendEquationiARB) + pGlBlendEquationiARB(buf, mode); + else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendEquationIndexedAMD) + pGlBlendEquationIndexedAMD(buf, mode); +#elif defined(GL_ARB_draw_buffers_blend) + glBlendEquationiARB(buf, mode); +#elif defined(GL_AMD_draw_buffers_blend) + glBlendEquationIndexedAMD(buf, mode); +#else + os::Printer::log("glBlendEquationIndexed not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLenum pname, GLint value) +{ +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + if (queryFeature(EVDF_GEOMETRY_SHADER)) + { + if (pGlProgramParameteriARB) + pGlProgramParameteriARB(program, pname, value); + else if (pGlProgramParameteriEXT) + pGlProgramParameteriEXT(program, pname, value); + } +#elif defined(GL_ARB_geometry_shader4) + glProgramParameteriARB(program, pname, value); +#elif defined(GL_EXT_geometry_shader4) + glProgramParameteriEXT(program, pname, value); +#elif defined(GL_NV_geometry_program4) || defined(GL_NV_geometry_shader4) + glProgramParameteriNV(program, pname, value); +#else + os::Printer::log("glProgramParameteri not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGenQueries(GLsizei n, GLuint *ids) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGenQueriesARB) + pGlGenQueriesARB(n, ids); + else if (pGlGenOcclusionQueriesNV) + pGlGenOcclusionQueriesNV(n, ids); +#elif defined(GL_ARB_occlusion_query) + glGenQueriesARB(n, ids); +#elif defined(GL_NV_occlusion_query) + glGenOcclusionQueriesNV(n, ids); +#else + os::Printer::log("glGenQueries not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlDeleteQueries(GLsizei n, const GLuint *ids) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlDeleteQueriesARB) + pGlDeleteQueriesARB(n, ids); + else if (pGlDeleteOcclusionQueriesNV) + pGlDeleteOcclusionQueriesNV(n, ids); +#elif defined(GL_ARB_occlusion_query) + glDeleteQueriesARB(n, ids); +#elif defined(GL_NV_occlusion_query) + glDeleteOcclusionQueriesNV(n, ids); +#else + os::Printer::log("glDeleteQueries not supported", ELL_ERROR); +#endif +} + +inline GLboolean COpenGLExtensionHandler::extGlIsQuery(GLuint id) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlIsQueryARB) + return pGlIsQueryARB(id); + else if (pGlIsOcclusionQueryNV) + return pGlIsOcclusionQueryNV(id); + return false; +#elif defined(GL_ARB_occlusion_query) + return glIsQueryARB(id); +#elif defined(GL_NV_occlusion_query) + return glIsOcclusionQueryNV(id); +#else + return false; +#endif +} + +inline void COpenGLExtensionHandler::extGlBeginQuery(GLenum target, GLuint id) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBeginQueryARB) + pGlBeginQueryARB(target, id); + else if (pGlBeginOcclusionQueryNV) + pGlBeginOcclusionQueryNV(id); +#elif defined(GL_ARB_occlusion_query) + glBeginQueryARB(target, id); +#elif defined(GL_NV_occlusion_query) + glBeginOcclusionQueryNV(id); +#else + os::Printer::log("glBeginQuery not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlEndQuery(GLenum target) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlEndQueryARB) + pGlEndQueryARB(target); + else if (pGlEndOcclusionQueryNV) + pGlEndOcclusionQueryNV(); +#elif defined(GL_ARB_occlusion_query) + glEndQueryARB(target); +#elif defined(GL_NV_occlusion_query) + glEndOcclusionQueryNV(); +#else + os::Printer::log("glEndQuery not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetQueryiv(GLenum target, GLenum pname, GLint *params) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetQueryivARB) + pGlGetQueryivARB(target, pname, params); +#elif defined(GL_ARB_occlusion_query) + glGetQueryivARB(target, pname, params); +#else + os::Printer::log("glGetQueryivARB not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetQueryObjectiv(GLuint id, GLenum pname, GLint *params) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetQueryObjectivARB) + pGlGetQueryObjectivARB(id, pname, params); + else if (pGlGetOcclusionQueryivNV) + pGlGetOcclusionQueryivNV(id, pname, params); +#elif defined(GL_ARB_occlusion_query) + glGetQueryObjectivARB(id, pname, params); +#elif defined(GL_NV_occlusion_query) + glGetOcclusionQueryivNV(id, pname, params); +#else + os::Printer::log("glGetQueryObjectiv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlGetQueryObjectuivARB) + pGlGetQueryObjectuivARB(id, pname, params); + else if (pGlGetOcclusionQueryuivNV) + pGlGetOcclusionQueryuivNV(id, pname, params); +#elif defined(GL_ARB_occlusion_query) + glGetQueryObjectuivARB(id, pname, params); +#elif defined(GL_NV_occlusion_query) + glGetOcclusionQueryuivNV(id, pname, params); +#else + os::Printer::log("glGetQueryObjectuiv not supported", ELL_ERROR); +#endif +} + +inline void COpenGLExtensionHandler::extGlSwapInterval(int interval) +{ + // we have wglext, so try to use that +#if defined(_IRR_WINDOWS_API_) && defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_) +#ifdef WGL_EXT_swap_control + if (pWglSwapIntervalEXT) + pWglSwapIntervalEXT(interval); +#endif +#endif +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + //TODO: Check GLX_EXT_swap_control and GLX_MESA_swap_control +#ifdef GLX_SGI_swap_control + // does not work with interval==0 +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (interval && pGlxSwapIntervalSGI) + pGlxSwapIntervalSGI(interval); +#else + if (interval) + glXSwapIntervalSGI(interval); +#endif +#elif defined(GLX_EXT_swap_control) +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + Display *dpy = glXGetCurrentDisplay(); + GLXDrawable drawable = glXGetCurrentDrawable(); + + if (pGlxSwapIntervalEXT) + pGlxSwapIntervalEXT(dpy, drawable, interval); +#else + pGlXSwapIntervalEXT(dpy, drawable, interval); +#endif +#elif defined(GLX_MESA_swap_control) +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlxSwapIntervalMESA) + pGlxSwapIntervalMESA(interval); +#else + pGlXSwapIntervalMESA(interval); +#endif +#endif +#endif +} + +inline void COpenGLExtensionHandler::extGlBlendEquation(GLenum mode) +{ +#ifdef _IRR_OPENGL_USE_EXTPOINTER_ + if (pGlBlendEquation) + pGlBlendEquation(mode); + else if (pGlBlendEquationEXT) + pGlBlendEquationEXT(mode); +#elif defined(GL_EXT_blend_minmax) || defined(GL_EXT_blend_subtract) || defined(GL_EXT_blend_logic_op) + glBlendEquationEXT(mode); +#elif defined(GL_VERSION_1_2) + glBlendEquation(mode); +#else + os::Printer::log("glBlendEquation not supported", ELL_ERROR); +#endif +} + + +} +} + +#endif + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLMaterialRenderer.h new file mode 100644 index 0000000..ea84a54 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLMaterialRenderer.h @@ -0,0 +1,756 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPENGL_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_OPENGL_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLDriver.h" +#include "IMaterialRenderer.h" + +namespace irr +{ +namespace video +{ + +//! Base class for all internal OpenGL material renderers +class COpenGLMaterialRenderer : public IMaterialRenderer +{ +public: + + //! Constructor + COpenGLMaterialRenderer(video::COpenGLDriver* driver) : Driver(driver) + { + } + +protected: + + video::COpenGLDriver* Driver; +}; + + +//! Solid material renderer +class COpenGLMaterialRenderer_SOLID : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_SOLID(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (resetAllRenderstates || (material.MaterialType != lastMaterial.MaterialType)) + { + // thanks to Murphy, the following line removed some + // bugs with several OpenGL implementations. + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + } +}; + + +//! Generic Texture Blend +class COpenGLMaterialRenderer_ONETEXTURE_BLEND : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_ONETEXTURE_BLEND(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + +// if (material.MaterialType != lastMaterial.MaterialType || +// material.MaterialTypeParam != lastMaterial.MaterialTypeParam || +// resetAllRenderstates) + { + E_BLEND_FACTOR srcFact,dstFact; + E_MODULATE_FUNC modulate; + u32 alphaSource; + unpack_textureBlendFunc(srcFact, dstFact, modulate, alphaSource, material.MaterialTypeParam); + +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, (f32) modulate ); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, (f32) modulate ); +#endif + + glBlendFunc(Driver->getGLBlend(srcFact), Driver->getGLBlend(dstFact)); + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.f); + glEnable(GL_BLEND); + + if ( textureBlendFunc_hasAlpha(srcFact) || textureBlendFunc_hasAlpha(dstFact) ) + { + if (alphaSource==EAS_VERTEX_COLOR) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PRIMARY_COLOR_EXT); +#endif + } + else if (alphaSource==EAS_TEXTURE) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_TEXTURE); +#endif + } + else + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_TEXTURE); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PRIMARY_COLOR_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_EXT, GL_TEXTURE); +#endif + } + } + } + } + + virtual void OnUnsetMaterial() + { + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1.f ); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1.f ); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); +#endif + + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + } + + //! Returns if the material is transparent. + /** Is not always transparent, but mostly. */ + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Solid 2 layer material renderer +class COpenGLMaterialRenderer_SOLID_2_LAYER : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_SOLID_2_LAYER(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(2); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_INTERPOLATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, GL_PRIMARY_COLOR); + glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, GL_SRC_ALPHA); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PRIMARY_COLOR_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_INTERPOLATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE2_RGB_EXT, GL_PRIMARY_COLOR); + glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND2_RGB_EXT, GL_SRC_ALPHA); +#endif + } + } + } + + virtual void OnUnsetMaterial() + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, GL_SRC_COLOR); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND2_RGB_EXT, GL_SRC_COLOR); +#endif + Driver->extGlActiveTexture(GL_TEXTURE0_ARB); + } + } +}; + + +//! Transparent add color material renderer +class COpenGLMaterialRenderer_TRANSPARENT_ADD_COLOR : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_TRANSPARENT_ADD_COLOR(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if ((material.MaterialType != lastMaterial.MaterialType) || resetAllRenderstates) + { + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glEnable(GL_BLEND); + } + } + + virtual void OnUnsetMaterial() + { + glDisable(GL_BLEND); + } + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent vertex alpha material renderer +class COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PRIMARY_COLOR_EXT ); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); +#endif + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + } + } + + virtual void OnUnsetMaterial() + { + // default values + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE ); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE ); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_MODULATE ); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_TEXTURE ); +#endif + glDisable(GL_BLEND); + } + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent alpha channel material renderer +class COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates + || material.MaterialTypeParam != lastMaterial.MaterialTypeParam ) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_TEXTURE); +#endif + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + + glAlphaFunc(GL_GREATER, material.MaterialTypeParam); + } + } + + virtual void OnUnsetMaterial() + { + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE ); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_MODULATE ); +#endif + glDisable(GL_ALPHA_TEST); + glDisable(GL_BLEND); + } + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return true; + } +}; + + +//! Transparent alpha channel material renderer +class COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.5f); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + } + + virtual void OnUnsetMaterial() + { + glDisable(GL_ALPHA_TEST); + } + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return false; // this material is not really transparent because it does no blending. + } +}; + + +//! material renderer for all kinds of lightmaps +class COpenGLMaterialRenderer_LIGHTMAP : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_LIGHTMAP(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(2); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + // diffuse map + + switch (material.MaterialType) + { + case EMT_LIGHTMAP_LIGHTING: + case EMT_LIGHTMAP_LIGHTING_M2: + case EMT_LIGHTMAP_LIGHTING_M4: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + break; + case EMT_LIGHTMAP_ADD: + case EMT_LIGHTMAP: + case EMT_LIGHTMAP_M2: + case EMT_LIGHTMAP_M4: + default: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + break; + } + + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + // lightmap + + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); +#ifdef GL_ARB_texture_env_combine + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + + if (material.MaterialType == EMT_LIGHTMAP_ADD) + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD); + else + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + + if (material.MaterialType == EMT_LIGHTMAP_ADD) + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD); + else + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_EXT, GL_PREVIOUS_EXT); +#endif + + switch (material.MaterialType) + { + case EMT_LIGHTMAP_M4: + case EMT_LIGHTMAP_LIGHTING_M4: +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 4.0f); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 4.0f); +#endif + break; + case EMT_LIGHTMAP_M2: + case EMT_LIGHTMAP_LIGHTING_M2: +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2.0f); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 2.0f); +#endif + break; + default: +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1.0f); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1.0f); +#endif + } + Driver->extGlActiveTexture(GL_TEXTURE0_ARB); + } + } + } + + virtual void OnUnsetMaterial() + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); +#ifdef GL_ARB_texture_env_combine + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1.f ); +#else + glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1.f ); +#endif + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + Driver->extGlActiveTexture(GL_TEXTURE0_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + } +}; + + + +//! detail map material renderer +class COpenGLMaterialRenderer_DETAIL_MAP : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_DETAIL_MAP(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(2); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + // diffuse map is default modulated + + // detail map on second layer + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); +#ifdef GL_ARB_texture_env_combine + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD_SIGNED_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD_SIGNED_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); +#endif + } + } + } + + virtual void OnUnsetMaterial() + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + Driver->extGlActiveTexture(GL_TEXTURE0_ARB); + } + } +}; + + +//! sphere map material renderer +class COpenGLMaterialRenderer_SPHERE_MAP : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_SPHERE_MAP(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(1); + // texture needs to be flipped for OpenGL + core::matrix4 tmp = Driver->getTransform(ETS_TEXTURE_0); + tmp[5]*=-1; + Driver->setTransform(ETS_TEXTURE_0, tmp); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); + + glEnable(GL_TEXTURE_GEN_S); + glEnable(GL_TEXTURE_GEN_T); + } + } + + virtual void OnUnsetMaterial() + { + glDisable(GL_TEXTURE_GEN_S); + glDisable(GL_TEXTURE_GEN_T); + } +}; + + +//! reflection 2 layer material renderer +class COpenGLMaterialRenderer_REFLECTION_2_LAYER : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_REFLECTION_2_LAYER(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(2); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); +#ifdef GL_ARB_texture_env_combine + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); +#endif + } + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); + glEnable(GL_TEXTURE_GEN_S); + glEnable(GL_TEXTURE_GEN_T); + } + } + + virtual void OnUnsetMaterial() + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + glDisable(GL_TEXTURE_GEN_S); + glDisable(GL_TEXTURE_GEN_T); + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE0_ARB); + } + } +}; + + +//! reflection 2 layer material renderer +class COpenGLMaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER : public COpenGLMaterialRenderer +{ +public: + + COpenGLMaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(video::COpenGLDriver* d) + : COpenGLMaterialRenderer(d) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + Driver->disableTextures(2); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); + + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { +#ifdef GL_ARB_texture_env_combine + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PREVIOUS_ARB); +#endif + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); +#ifdef GL_ARB_texture_env_combine + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PREVIOUS_ARB); +#endif + } + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); + glEnable(GL_TEXTURE_GEN_S); + glEnable(GL_TEXTURE_GEN_T); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + } + } + + virtual void OnUnsetMaterial() + { + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE1_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + glDisable(GL_TEXTURE_GEN_S); + glDisable(GL_TEXTURE_GEN_T); + if (Driver->queryFeature(EVDF_MULTITEXTURE)) + { + Driver->extGlActiveTexture(GL_TEXTURE0_ARB); + } + glDisable(GL_BLEND); + } + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return true; + } +}; + +} // end namespace video +} // end namespace irr + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.cpp new file mode 100644 index 0000000..875fe63 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.cpp @@ -0,0 +1,291 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLNormalMapRenderer.h" +#include "IGPUProgrammingServices.h" +#include "IShaderConstantSetCallBack.h" +#include "IVideoDriver.h" +#include "os.h" +#include "COpenGLDriver.h" + +namespace irr +{ +namespace video +{ + +// Irrlicht Engine OpenGL render path normal map vertex shader +// I guess it could be optimized a lot, because I wrote it in D3D ASM and +// transferred it 1:1 to OpenGL +const char OPENGL_NORMAL_MAP_VSH[] = + "!!ARBvp1.0\n"\ + "#input\n"\ + "# 0-3: transposed world matrix;\n"\ + "#;12: Light01 position \n"\ + "#;13: x,y,z: Light01 color; .w: 1/LightRadius^2 \n"\ + "#;14: Light02 position \n"\ + "#;15: x,y,z: Light02 color; .w: 1/LightRadius^2 \n"\ + "\n"\ + "ATTRIB InPos = vertex.position;\n"\ + "ATTRIB InColor = vertex.color;\n"\ + "ATTRIB InNormal = vertex.normal;\n"\ + "ATTRIB InTexCoord = vertex.texcoord[0];\n"\ + "ATTRIB InTangent = vertex.texcoord[1];\n"\ + "ATTRIB InBinormal = vertex.texcoord[2];\n"\ + "\n"\ + "#output\n"\ + "OUTPUT OutPos = result.position;\n"\ + "OUTPUT OutLightColor1 = result.color.primary;\n"\ + "OUTPUT OutLightColor2 = result.color.secondary;\n"\ + "OUTPUT OutTexCoord = result.texcoord[0];\n"\ + "OUTPUT OutLightVector1 = result.texcoord[1];\n"\ + "OUTPUT OutLightVector2 = result.texcoord[2];\n"\ + "\n"\ + "PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix.\n"\ + "TEMP Temp;\n"\ + "TEMP TempColor;\n"\ + "TEMP TempLightVector1;\n"\ + "TEMP TempLightVector2;\n"\ + "TEMP TempTransLightV1;\n"\ + "TEMP TempTransLightV2;\n"\ + "\n"\ + "# transform position to clip space \n"\ + "DP4 OutPos.x, MVP[0], InPos;\n"\ + "DP4 OutPos.y, MVP[1], InPos;\n"\ + "DP4 Temp.z, MVP[2], InPos;\n"\ + "DP4 OutPos.w, MVP[3], InPos;\n"\ + "MOV OutPos.z, Temp.z;\n"\ + "MOV result.fogcoord.x, Temp.z;\n"\ + "\n"\ + "# vertex - lightpositions \n"\ + "SUB TempLightVector1, program.local[12], InPos; \n"\ + "SUB TempLightVector2, program.local[14], InPos; \n"\ + "\n"\ + "# transform the light vector 1 with U, V, W \n"\ + "DP3 TempTransLightV1.x, InTangent, TempLightVector1; \n"\ + "DP3 TempTransLightV1.y, InBinormal, TempLightVector1; \n"\ + "DP3 TempTransLightV1.z, InNormal, TempLightVector1; \n"\ + "\n"\ + "# transform the light vector 2 with U, V, W \n"\ + "DP3 TempTransLightV2.x, InTangent, TempLightVector2; \n"\ + "DP3 TempTransLightV2.y, InBinormal, TempLightVector2; \n"\ + "DP3 TempTransLightV2.z, InNormal, TempLightVector2; \n"\ + "\n"\ + "# normalize light vector 1 \n"\ + "DP3 TempTransLightV1.w, TempTransLightV1, TempTransLightV1; \n"\ + "RSQ TempTransLightV1.w, TempTransLightV1.w; \n"\ + "MUL TempTransLightV1, TempTransLightV1, TempTransLightV1.w;\n"\ + "\n"\ + "# normalize light vector 2 \n"\ + "DP3 TempTransLightV2.w, TempTransLightV2, TempTransLightV2; \n"\ + "RSQ TempTransLightV2.w, TempTransLightV2.w; \n"\ + "MUL TempTransLightV2, TempTransLightV2, TempTransLightV2.w;\n"\ + "\n"\ + "\n"\ + "# move light vectors out\n"\ + "MAD OutLightVector1, TempTransLightV1, {0.5,0.5,0.5,0.5}, {0.5,0.5,0.5,0.5}; \n"\ + "MAD OutLightVector2, TempTransLightV2, {0.5,0.5,0.5,0.5}, {0.5,0.5,0.5,0.5}; \n"\ + "\n"\ + "# calculate attenuation of light 1\n"\ + "MOV TempLightVector1.w, {0,0,0,0}; \n"\ + "DP3 TempLightVector1.x, TempLightVector1, TempLightVector1; \n"\ + "MUL TempLightVector1.x, TempLightVector1.x, program.local[13].w; \n"\ + "RSQ TempLightVector1, TempLightVector1.x; \n"\ + "MUL OutLightColor1, TempLightVector1, program.local[13]; # resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "# calculate attenuation of light 2\n"\ + "MOV TempLightVector2.w, {0,0,0,0}; \n"\ + "DP3 TempLightVector2.x, TempLightVector2, TempLightVector2; \n"\ + "MUL TempLightVector2.x, TempLightVector2.x, program.local[15].w; \n"\ + "RSQ TempLightVector2, TempLightVector2.x; \n"\ + "MUL OutLightColor2, TempLightVector2, program.local[15]; # resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "# move out texture coordinates and original alpha value\n"\ + "MOV OutTexCoord, InTexCoord; \n"\ + "MOV OutLightColor1.w, InColor.w; \n"\ + "\n"\ + "END\n"; + +// Irrlicht Engine OpenGL render path normal map pixel shader +// I guess it could be optimized a bit, because I wrote it in D3D ASM and +// transfered it 1:1 to OpenGL +const char OPENGL_NORMAL_MAP_PSH[] = + "!!ARBfp1.0\n"\ + "#_IRR_FOG_MODE_\n"\ + "\n"\ + "#Input\n"\ + "ATTRIB inTexCoord = fragment.texcoord[0]; \n"\ + "ATTRIB light1Vector = fragment.texcoord[1]; \n"\ + "ATTRIB light2Vector = fragment.texcoord[2]; \n"\ + "ATTRIB light1Color = fragment.color.primary; \n"\ + "ATTRIB light2Color = fragment.color.secondary; \n"\ + "\n"\ + "#Output\n"\ + "OUTPUT outColor = result.color;\n"\ + "TEMP temp;\n"\ + "TEMP temp2;\n"\ + "TEMP colorMapColor;\n"\ + "TEMP normalMapColor;\n"\ + "\n"\ + "# fetch color and normal map; \n"\ + "TXP colorMapColor, inTexCoord, texture[0], 2D; \n"\ + "TXP normalMapColor, inTexCoord, texture[1], 2D; \n"\ + "\n"\ + "# calculate color of light1; \n"\ + "MAD normalMapColor, normalMapColor, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "MAD temp, light1Vector, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "DP3_SAT temp, normalMapColor, temp; \n"\ + "MUL temp, light1Color, temp; \n"\ + "\n"\ + "# calculate color of light2; \n"\ + "MAD temp2, light2Vector, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "DP3_SAT temp2, normalMapColor, temp2; \n"\ + "MAD temp, light2Color, temp2, temp; \n"\ + "\n"\ + "# luminance * base color; \n"\ + "MUL outColor, temp, colorMapColor; \n"\ + "MOV outColor.a, light1Color.a; #write interpolated vertex alpha value\n"\ + "\n"\ + "END\n"; + +//! Constructor +COpenGLNormalMapRenderer::COpenGLNormalMapRenderer(video::COpenGLDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial) + : COpenGLShaderMaterialRenderer(driver, 0, baseMaterial), CompiledShaders(true) +{ + + #ifdef _DEBUG + setDebugName("COpenGLNormalMapRenderer"); + #endif + + // set this as callback. We could have done this in + // the initialization list, but some compilers don't like it. + + CallBack = this; + + // basically, this thing simply compiles the hardcoded shaders if the + // hardware is able to do them, otherwise it maps to the base material + + if (!driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1) || + !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) + { + // this hardware is not able to do shaders. Fall back to + // base material. + outMaterialTypeNr = driver->addMaterialRenderer(this); + return; + } + + // check if already compiled normal map shaders are there. + + video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_NORMAL_MAP_SOLID); + + if (renderer) + { + // use the already compiled shaders + video::COpenGLNormalMapRenderer* nmr = reinterpret_cast<video::COpenGLNormalMapRenderer*>(renderer); + CompiledShaders = false; + + VertexShader = nmr->VertexShader; + PixelShader = nmr->PixelShader; + + outMaterialTypeNr = driver->addMaterialRenderer(this); + } + else + { + // compile shaders on our own + init(outMaterialTypeNr, OPENGL_NORMAL_MAP_VSH, OPENGL_NORMAL_MAP_PSH, EVT_TANGENTS); + } + + // fallback if compilation has failed + if (-1==outMaterialTypeNr) + outMaterialTypeNr = driver->addMaterialRenderer(this); +} + + +//! Destructor +COpenGLNormalMapRenderer::~COpenGLNormalMapRenderer() +{ + if (CallBack == this) + CallBack = 0; + + if (!CompiledShaders) + { + // prevent this from deleting shaders we did not create + VertexShader = 0; + PixelShader.clear(); + } +} + + +//! Returns the render capability of the material. +s32 COpenGLNormalMapRenderer::getRenderCapability() const +{ + if (Driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1) && + Driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) + return 0; + + return 1; +} + + +//! Called by the engine when the vertex and/or pixel shader constants for an +//! material renderer should be set. +void COpenGLNormalMapRenderer::OnSetConstants(IMaterialRendererServices* services, s32 userData) +{ + video::IVideoDriver* driver = services->getVideoDriver(); + + // set transposed world matrix + const core::matrix4& tWorld = driver->getTransform(video::ETS_WORLD).getTransposed(); + services->setVertexShaderConstant(tWorld.pointer(), 0, 4); + + // set transposed worldViewProj matrix + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + core::matrix4 tr(worldViewProj.getTransposed()); + services->setVertexShaderConstant(tr.pointer(), 8, 4); + + // here we fetch the fixed function lights from the driver + // and set them as constants + + u32 cnt = driver->getDynamicLightCount(); + + // Load the inverse world matrix. + core::matrix4 invWorldMat; + driver->getTransform(video::ETS_WORLD).getInverse(invWorldMat); + + for (u32 i=0; i<2; ++i) + { + video::SLight light; + + if (i<cnt) + light = driver->getDynamicLight(i); + else + { + light.DiffuseColor.set(0,0,0); // make light dark + light.Radius = 1.0f; + } + + light.DiffuseColor.a = 1.0f/(light.Radius*light.Radius); // set attenuation + + // Transform the light by the inverse world matrix to get it into object space. + invWorldMat.transformVect(light.Position); + + services->setVertexShaderConstant( + reinterpret_cast<const f32*>(&light.Position), 12+(i*2), 1); + + services->setVertexShaderConstant( + reinterpret_cast<const f32*>(&light.DiffuseColor), 13+(i*2), 1); + } +} + + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.h new file mode 100644 index 0000000..304802d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLNormalMapRenderer.h @@ -0,0 +1,49 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPENGL_NORMAL_MAP_RENDERER_H_INCLUDED__ +#define __C_OPENGL_NORMAL_MAP_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" + +namespace irr +{ +namespace video +{ + +//! Class for rendering normal maps with OpenGL +class COpenGLNormalMapRenderer : public COpenGLShaderMaterialRenderer, public IShaderConstantSetCallBack +{ +public: + + //! Constructor + COpenGLNormalMapRenderer(video::COpenGLDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial); + + //! Destructor + ~COpenGLNormalMapRenderer(); + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData); + + //! Returns the render capability of the material. + virtual s32 getRenderCapability() const; + +protected: + + bool CompiledShaders; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.cpp new file mode 100644 index 0000000..15eae29 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.cpp @@ -0,0 +1,354 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLParallaxMapRenderer.h" +#include "COpenGLDriver.h" +#include "IGPUProgrammingServices.h" +#include "IShaderConstantSetCallBack.h" +#include "IVideoDriver.h" +#include "os.h" + +namespace irr +{ +namespace video +{ + +// Irrlicht Engine OpenGL render path parallax map vertex shader +// I guess it could be optimized a lot, because I wrote it in D3D ASM and +// transferred it 1:1 to OpenGL +const char OPENGL_PARALLAX_MAP_VSH[] = + "!!ARBvp1.0\n"\ + "#input\n"\ + "# 0-3: transposed world matrix;\n"\ + "#;12: Light01 position \n"\ + "#;13: x,y,z: Light01 color; .w: 1/LightRadius^2 \n"\ + "#;14: Light02 position \n"\ + "#;15: x,y,z: Light02 color; .w: 1/LightRadius^2 \n"\ + "#;16: Eye position \n"\ + "\n"\ + "ATTRIB InPos = vertex.position;\n"\ + "ATTRIB InColor = vertex.color;\n"\ + "ATTRIB InNormal = vertex.normal;\n"\ + "ATTRIB InTexCoord = vertex.texcoord[0];\n"\ + "ATTRIB InTangent = vertex.texcoord[1];\n"\ + "ATTRIB InBinormal = vertex.texcoord[2];\n"\ + "\n"\ + "#output\n"\ + "OUTPUT OutPos = result.position;\n"\ + "OUTPUT OutLightColor1 = result.color.primary;\n"\ + "OUTPUT OutLightColor2 = result.color.secondary;\n"\ + "OUTPUT OutTexCoord = result.texcoord[0];\n"\ + "OUTPUT OutLightVector1 = result.texcoord[1];\n"\ + "OUTPUT OutLightVector2 = result.texcoord[2];\n"\ + "OUTPUT OutEyeVector = result.texcoord[3];\n"\ + "\n"\ + "PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix.\n"\ + "TEMP Temp;\n"\ + "TEMP TempColor;\n"\ + "TEMP TempLightVector1;\n"\ + "TEMP TempLightVector2;\n"\ + "TEMP TempEyeVector;\n"\ + "TEMP TempTransLightV1;\n"\ + "TEMP TempTransLightV2;\n"\ + "\n"\ + "# transform position to clip space \n"\ + "DP4 OutPos.x, MVP[0], InPos;\n"\ + "DP4 OutPos.y, MVP[1], InPos;\n"\ + "DP4 Temp.z, MVP[2], InPos;\n"\ + "DP4 OutPos.w, MVP[3], InPos;\n"\ + "MOV OutPos.z, Temp.z;\n"\ + "MOV result.fogcoord.x, Temp.z;\n"\ + "\n"\ + "# vertex - lightpositions \n"\ + "SUB TempLightVector1, program.local[12], InPos; \n"\ + "SUB TempLightVector2, program.local[14], InPos; \n"\ + "\n"\ + "# eye vector \n"\ + "SUB Temp, program.local[16], InPos; \n"\ + "\n"\ + "# transform the light vector 1 with U, V, W \n"\ + "DP3 TempTransLightV1.x, InTangent, TempLightVector1; \n"\ + "DP3 TempTransLightV1.y, InBinormal, TempLightVector1; \n"\ + "DP3 TempTransLightV1.z, InNormal, TempLightVector1; \n"\ + "\n"\ + "# transform the light vector 2 with U, V, W \n"\ + "DP3 TempTransLightV2.x, InTangent, TempLightVector2; \n"\ + "DP3 TempTransLightV2.y, InBinormal, TempLightVector2; \n"\ + "DP3 TempTransLightV2.z, InNormal, TempLightVector2; \n"\ + "\n"\ + "# transform the eye vector with U, V, W \n"\ + "DP3 TempEyeVector.x, InTangent, Temp; \n"\ + "DP3 TempEyeVector.y, InBinormal, Temp; \n"\ + "DP3 TempEyeVector.z, InNormal, Temp; \n"\ + "\n"\ + "# normalize light vector 1 \n"\ + "DP3 TempTransLightV1.w, TempTransLightV1, TempTransLightV1; \n"\ + "RSQ TempTransLightV1.w, TempTransLightV1.w; \n"\ + "MUL TempTransLightV1, TempTransLightV1, TempTransLightV1.w;\n"\ + "\n"\ + "# normalize light vector 2 \n"\ + "DP3 TempTransLightV2.w, TempTransLightV2, TempTransLightV2; \n"\ + "RSQ TempTransLightV2.w, TempTransLightV2.w; \n"\ + "MUL TempTransLightV2, TempTransLightV2, TempTransLightV2.w;\n"\ + "\n"\ + "# normalize eye vector \n"\ + "DP3 TempEyeVector.w, TempEyeVector, TempEyeVector; \n"\ + "RSQ TempEyeVector.w, TempEyeVector.w; \n"\ + "MUL TempEyeVector, TempEyeVector, TempEyeVector.w;\n"\ + "MUL TempEyeVector, TempEyeVector, {1,-1,-1,1}; # flip x \n"\ + "\n"\ + "\n"\ + "# move light and eye vectors out\n"\ + "MAD OutLightVector1, TempTransLightV1, {0.5,0.5,0.5,0.5}, {0.5,0.5,0.5,0.5}; \n"\ + "MAD OutLightVector2, TempTransLightV2, {0.5,0.5,0.5,0.5}, {0.5,0.5,0.5,0.5}; \n"\ + "MAD OutEyeVector, TempEyeVector, {0.5,0.5,0.5,0.5}, {0.5,0.5,0.5,0.5}; \n"\ + "\n"\ + "# calculate attenuation of light 1\n"\ + "MOV TempLightVector1.w, {0,0,0,0}; \n"\ + "DP3 TempLightVector1.x, TempLightVector1, TempLightVector1; \n"\ + "MUL TempLightVector1.x, TempLightVector1.x, program.local[13].w; \n"\ + "RSQ TempLightVector1, TempLightVector1.x; \n"\ + "MUL OutLightColor1, TempLightVector1, program.local[13]; # resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "# calculate attenuation of light 2\n"\ + "MOV TempLightVector2.w, {0,0,0,0}; \n"\ + "DP3 TempLightVector2.x, TempLightVector2, TempLightVector2; \n"\ + "MUL TempLightVector2.x, TempLightVector2.x, program.local[15].w; \n"\ + "RSQ TempLightVector2, TempLightVector2.x; \n"\ + "MUL OutLightColor2, TempLightVector2, program.local[15]; # resulting light color = lightcolor * attenuation \n"\ + "\n"\ + "# move out texture coordinates and original alpha value\n"\ + "MOV OutTexCoord, InTexCoord; \n"\ + "MOV OutLightColor1.w, InColor.w; \n"\ + "\n"\ + "END\n"; + +// Irrlicht Engine OpenGL render path parallax map pixel shader +// I guess it could be optimized a bit, because I wrote it in D3D ASM and +// transfered it 1:1 to OpenGL +const char OPENGL_PARALLAX_MAP_PSH[] = + "!!ARBfp1.0\n"\ + "#_IRR_FOG_MODE_\n"\ + "\n"\ + "#Input\n"\ + "ATTRIB inTexCoord = fragment.texcoord[0]; \n"\ + "ATTRIB light1Vector = fragment.texcoord[1]; \n"\ + "ATTRIB light2Vector = fragment.texcoord[2]; \n"\ + "ATTRIB eyeVector = fragment.texcoord[3]; \n"\ + "ATTRIB light1Color = fragment.color.primary; \n"\ + "ATTRIB light2Color = fragment.color.secondary; \n"\ + "\n"\ + "#Output\n"\ + "OUTPUT outColor = result.color;\n"\ + "TEMP temp;\n"\ + "TEMP temp2;\n"\ + "TEMP colorMapColor;\n"\ + "TEMP normalMapColor;\n"\ + "\n"\ + "PARAM height_scale = program.local[0]; \n"\ + "# fetch color and normal map; \n"\ + "TXP normalMapColor, inTexCoord, texture[1], 2D; \n"\ + "MAD normalMapColor, normalMapColor, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "\n"\ + "\n"\ + "# extract eye vector (so substract 0.5f and multiply by 2)\n"\ + "MAD temp, eyeVector, {2,2,2,2}, {-1,-1,-1,-1};\n"\ + "\n"\ + "# height = height * scale \n"\ + "MUL normalMapColor, normalMapColor, height_scale;\n"\ + "\n"\ + "# calculate new texture coord: height * eye + oldTexCoord\n"\ + "MAD temp, temp, normalMapColor.wwww, inTexCoord;\n"\ + "\n"\ + "# fetch new textures \n"\ + "TXP colorMapColor, temp, texture[0], 2D; \n"\ + "TXP normalMapColor, temp, texture[1], 2D; \n"\ + "\n"\ + "# calculate color of light1; \n"\ + "MAD normalMapColor, normalMapColor, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "MAD temp, light1Vector, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "DP3_SAT temp, normalMapColor, temp; \n"\ + "MUL temp, light1Color, temp; \n"\ + "\n"\ + "# calculate color of light2; \n"\ + "MAD temp2, light2Vector, {2,2,2,2}, {-1,-1,-1,-1}; \n"\ + "DP3_SAT temp2, normalMapColor, temp2; \n"\ + "MAD temp, light2Color, temp2, temp; \n"\ + "\n"\ + "# luminance * base color; \n"\ + "MUL outColor, temp, colorMapColor; \n"\ + "MOV outColor.a, light1Color.a; #write interpolated vertex alpha value\n"\ + "\n"\ + "END\n"; + +//! Constructor +COpenGLParallaxMapRenderer::COpenGLParallaxMapRenderer(video::COpenGLDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial) + : COpenGLShaderMaterialRenderer(driver, 0, baseMaterial), CompiledShaders(true) +{ + + #ifdef _DEBUG + setDebugName("COpenGLParallaxMapRenderer"); + #endif + + // set this as callback. We could have done this in + // the initialization list, but some compilers don't like it. + + CallBack = this; + + // basically, this simply compiles the hard coded shaders if the + // hardware is able to do them, otherwise it maps to the base material + + if (!driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1) || + !driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) + { + // this hardware is not able to do shaders. Fall back to + // base material. + outMaterialTypeNr = driver->addMaterialRenderer(this); + return; + } + + // check if already compiled normal map shaders are there. + + video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_PARALLAX_MAP_SOLID); + + if (renderer) + { + // use the already compiled shaders + video::COpenGLParallaxMapRenderer* nmr = reinterpret_cast<video::COpenGLParallaxMapRenderer*>(renderer); + CompiledShaders = false; + + VertexShader = nmr->VertexShader; + PixelShader = nmr->PixelShader; + + outMaterialTypeNr = driver->addMaterialRenderer(this); + } + else + { + // compile shaders on our own + init(outMaterialTypeNr, OPENGL_PARALLAX_MAP_VSH, OPENGL_PARALLAX_MAP_PSH, EVT_TANGENTS); + } + + // fallback if compilation has failed + if (-1==outMaterialTypeNr) + outMaterialTypeNr = driver->addMaterialRenderer(this); +} + + +//! Destructor +COpenGLParallaxMapRenderer::~COpenGLParallaxMapRenderer() +{ + if (CallBack == this) + CallBack = 0; + + if (!CompiledShaders) + { + // prevent this from deleting shaders we did not create + VertexShader = 0; + PixelShader.clear(); + } +} + + +void COpenGLParallaxMapRenderer::OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services) +{ + COpenGLShaderMaterialRenderer::OnSetMaterial(material, lastMaterial, + resetAllRenderstates, services); + + CurrentScale = material.MaterialTypeParam; +} + + + +//! Returns the render capability of the material. +s32 COpenGLParallaxMapRenderer::getRenderCapability() const +{ + if (Driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1) && + Driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1)) + return 0; + + return 1; +} + + +//! Called by the engine when the vertex and/or pixel shader constants for an +//! material renderer should be set. +void COpenGLParallaxMapRenderer::OnSetConstants(IMaterialRendererServices* services, s32 userData) +{ + video::IVideoDriver* driver = services->getVideoDriver(); + + // set transposed world matrix + const core::matrix4& tWorld = driver->getTransform(video::ETS_WORLD).getTransposed(); + services->setVertexShaderConstant(tWorld.pointer(), 0, 4); + + // set transposed worldViewProj matrix + core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); + worldViewProj *= driver->getTransform(video::ETS_VIEW); + worldViewProj *= driver->getTransform(video::ETS_WORLD); + core::matrix4 tr(worldViewProj.getTransposed()); + services->setVertexShaderConstant(tr.pointer(), 8, 4); + + // here we fetch the fixed function lights from the driver + // and set them as constants + + u32 cnt = driver->getDynamicLightCount(); + + // Load the inverse world matrix. + core::matrix4 invWorldMat; + driver->getTransform(video::ETS_WORLD).getInverse(invWorldMat); + + for (u32 i=0; i<2; ++i) + { + video::SLight light; + + if (i<cnt) + light = driver->getDynamicLight(i); + else + { + light.DiffuseColor.set(0,0,0); // make light dark + light.Radius = 1.0f; + } + + light.DiffuseColor.a = 1.0f/(light.Radius*light.Radius); // set attenuation + + // Transform the light by the inverse world matrix to get it into object space. + invWorldMat.transformVect(light.Position); + + services->setVertexShaderConstant( + reinterpret_cast<const f32*>(&light.Position), 12+(i*2), 1); + + services->setVertexShaderConstant( + reinterpret_cast<const f32*>(&light.DiffuseColor), 13+(i*2), 1); + } + + // Obtain the view position by transforming 0,0,0 by the inverse view matrix + // and then multiply this by the inverse world matrix. + core::vector3df viewPos(0.0f, 0.0f, 0.0f); + core::matrix4 inverseView; + driver->getTransform(video::ETS_VIEW).getInverse(inverseView); + inverseView.transformVect(viewPos); + invWorldMat.transformVect(viewPos); + services->setVertexShaderConstant(reinterpret_cast<const f32*>(&viewPos.X), 16, 1); + + // set scale factor + f32 factor = 0.02f; // default value + if (CurrentScale != 0.0f) + factor = CurrentScale; + + f32 c6[] = {factor, factor, factor, factor}; + services->setPixelShaderConstant(c6, 0, 1); +} + + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.h new file mode 100644 index 0000000..bfee487 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLParallaxMapRenderer.h @@ -0,0 +1,55 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPENGL_PARALLAX_MAP_RENDERER_H_INCLUDED__ +#define __C_OPENGL_PARALLAX_MAP_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLShaderMaterialRenderer.h" +#include "IShaderConstantSetCallBack.h" + +namespace irr +{ +namespace video +{ + +//! Class for rendering normal maps with OpenGL +class COpenGLParallaxMapRenderer : public COpenGLShaderMaterialRenderer, public IShaderConstantSetCallBack +{ +public: + + //! Constructor + COpenGLParallaxMapRenderer(video::COpenGLDriver* driver, + s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial); + + //! Destructor + ~COpenGLParallaxMapRenderer(); + + //! Called by the engine when the vertex and/or pixel shader constants for an + //! material renderer should be set. + virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData); + + //! Returns the render capability of the material. + virtual s32 getRenderCapability() const; + + virtual void OnSetMaterial(const SMaterial& material) { } + virtual void OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services); + +protected: + + bool CompiledShaders; + f32 CurrentScale; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.cpp new file mode 100644 index 0000000..af47c0e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.cpp @@ -0,0 +1,693 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// This file was originally written by William Finlayson. I (Nikolaus +// Gebhardt) did some minor modifications and changes to it and integrated it +// into Irrlicht. Thanks a lot to William for his work on this and that he gave +// me his permission to add it into Irrlicht using the zlib license. + +// After Irrlicht 0.12, Michael Zoech did some improvements to this renderer, I +// merged this into Irrlicht 0.14, thanks to him for his work. + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLSLMaterialRenderer.h" +#include "IGPUProgrammingServices.h" +#include "IShaderConstantSetCallBack.h" +#include "IMaterialRendererServices.h" +#include "IVideoDriver.h" +#include "os.h" +#include "COpenGLDriver.h" + +namespace irr +{ +namespace video +{ + + +//! Constructor +COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(video::COpenGLDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, + const c8* vertexShaderEntryPointName, + E_VERTEX_SHADER_TYPE vsCompileTarget, + const c8* pixelShaderProgram, + const c8* pixelShaderEntryPointName, + E_PIXEL_SHADER_TYPE psCompileTarget, + const c8* geometryShaderProgram, + const c8* geometryShaderEntryPointName, + E_GEOMETRY_SHADER_TYPE gsCompileTarget, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut, + IShaderConstantSetCallBack* callback, + video::IMaterialRenderer* baseMaterial, + s32 userData) + : Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + Program(0), Program2(0), UserData(userData) +{ + #ifdef _DEBUG + setDebugName("COpenGLSLMaterialRenderer"); + #endif + + //entry points must always be main, and the compile target isn't selectable + //it is fine to ignore what has been asked for, as the compiler should spot anything wrong + //just check that GLSL is available + + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); + + if (!Driver->queryFeature(EVDF_ARB_GLSL)) + return; + + init(outMaterialTypeNr, vertexShaderProgram, pixelShaderProgram, geometryShaderProgram); +} + + +//! constructor only for use by derived classes who want to +//! create a fall back material for example. +COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(COpenGLDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, s32 userData) +: Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + Program(0), Program2(0), UserData(userData) +{ + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); +} + + +//! Destructor +COpenGLSLMaterialRenderer::~COpenGLSLMaterialRenderer() +{ + if (CallBack) + CallBack->drop(); + + if (Program) + { + GLhandleARB shaders[8]; + GLint count; + Driver->extGlGetAttachedObjects(Program, 8, &count, shaders); + // avoid bugs in some drivers, which return larger numbers + count=core::min_(count,8); + for (GLint i=0; i<count; ++i) + Driver->extGlDeleteObject(shaders[i]); + Driver->extGlDeleteObject(Program); + Program = 0; + } + + if (Program2) + { + GLuint shaders[8]; + GLint count; + Driver->extGlGetAttachedShaders(Program2, 8, &count, shaders); + // avoid bugs in some drivers, which return larger numbers + count=core::min_(count,8); + for (GLint i=0; i<count; ++i) + Driver->extGlDeleteShader(shaders[i]); + Driver->extGlDeleteProgram(Program2); + Program2 = 0; + } + + UniformInfo.clear(); + + if (BaseMaterial) + BaseMaterial->drop(); +} + + +void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr, + const c8* vertexShaderProgram, + const c8* pixelShaderProgram, + const c8* geometryShaderProgram, + scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType, + u32 verticesOut) +{ + outMaterialTypeNr = -1; + + if (!createProgram()) + return; + +#if defined(GL_ARB_vertex_shader) && defined (GL_ARB_fragment_shader) + if (vertexShaderProgram) + if (!createShader(GL_VERTEX_SHADER_ARB, vertexShaderProgram)) + return; + + if (pixelShaderProgram) + if (!createShader(GL_FRAGMENT_SHADER_ARB, pixelShaderProgram)) + return; +#endif + +#if defined(GL_ARB_geometry_shader4) || defined(GL_EXT_geometry_shader4) || defined(GL_NV_geometry_program4) || defined(GL_NV_geometry_shader4) + if (geometryShaderProgram && Driver->queryFeature(EVDF_GEOMETRY_SHADER)) + { + if (!createShader(GL_GEOMETRY_SHADER_EXT, geometryShaderProgram)) + return; +#if defined(GL_ARB_geometry_shader4) || defined(GL_EXT_geometry_shader4) || defined(GL_NV_geometry_shader4) + if (Program2) // Geometry shaders are supported only in OGL2.x+ drivers. + { + Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType)); + Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType)); + if (verticesOut==0) + Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut); + else + Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut)); + } +#elif defined(GL_NV_geometry_program4) + if (verticesOut==0) + Driver->extGlProgramVertexLimit(GL_GEOMETRY_PROGRAM_NV, Driver->MaxGeometryVerticesOut); + else + Driver->extGlProgramVertexLimit(GL_GEOMETRY_PROGRAM_NV, core::min_(verticesOut, Driver->MaxGeometryVerticesOut)); +#endif + } +#endif + + if (!linkProgram()) + return; + + // register myself as new material + outMaterialTypeNr = Driver->addMaterialRenderer(this); +} + + +bool COpenGLSLMaterialRenderer::OnRender(IMaterialRendererServices* service, + E_VERTEX_TYPE vtxtype) +{ + // call callback to set shader constants + if (CallBack && (Program||Program2)) + CallBack->OnSetConstants(this, UserData); + + return true; +} + + +void COpenGLSLMaterialRenderer::OnSetMaterial(const video::SMaterial& material, + const video::SMaterial& lastMaterial, + bool resetAllRenderstates, + video::IMaterialRendererServices* services) +{ + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (Program2) + Driver->extGlUseProgram(Program2); + else if (Program) + Driver->extGlUseProgramObject(Program); + + if (BaseMaterial) + BaseMaterial->OnSetMaterial(material, material, true, this); + } + + //let callback know used material + if (CallBack) + CallBack->OnSetMaterial(material); + + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + Driver->setActiveTexture(i, material.getTexture(i)); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + + +void COpenGLSLMaterialRenderer::OnUnsetMaterial() +{ + if (Program) + Driver->extGlUseProgramObject(0); + if (Program2) + Driver->extGlUseProgram(0); + + if (BaseMaterial) + BaseMaterial->OnUnsetMaterial(); +} + + +//! Returns if the material is transparent. +bool COpenGLSLMaterialRenderer::isTransparent() const +{ + return BaseMaterial ? BaseMaterial->isTransparent() : false; +} + + +bool COpenGLSLMaterialRenderer::createProgram() +{ + if (Driver->Version>=200) + Program2 = Driver->extGlCreateProgram(); + else + Program = Driver->extGlCreateProgramObject(); + return true; +} + + +bool COpenGLSLMaterialRenderer::createShader(GLenum shaderType, const char* shader) +{ + if (Program2) + { + GLuint shaderHandle = Driver->extGlCreateShader(shaderType); + Driver->extGlShaderSource(shaderHandle, 1, &shader, NULL); + Driver->extGlCompileShader(shaderHandle); + + GLint status = 0; + +#ifdef GL_VERSION_2_0 + Driver->extGlGetShaderiv(shaderHandle, GL_COMPILE_STATUS, &status); +#endif + + if (status != GL_TRUE) + { + os::Printer::log("GLSL shader failed to compile", ELL_ERROR); + // check error message and log it + GLint maxLength=0; + GLint length; +#ifdef GL_VERSION_2_0 + Driver->extGlGetShaderiv(shaderHandle, GL_INFO_LOG_LENGTH, + &maxLength); +#endif + if (maxLength) + { + GLchar *infoLog = new GLchar[maxLength]; + Driver->extGlGetShaderInfoLog(shaderHandle, maxLength, &length, infoLog); + os::Printer::log(reinterpret_cast<const c8*>(infoLog), ELL_ERROR); + delete [] infoLog; + } + + return false; + } + + Driver->extGlAttachShader(Program2, shaderHandle); + } + else + { + GLhandleARB shaderHandle = Driver->extGlCreateShaderObject(shaderType); + + Driver->extGlShaderSourceARB(shaderHandle, 1, &shader, NULL); + Driver->extGlCompileShaderARB(shaderHandle); + + GLint status = 0; + +#ifdef GL_ARB_shader_objects + Driver->extGlGetObjectParameteriv(shaderHandle, GL_OBJECT_COMPILE_STATUS_ARB, &status); +#endif + + if (!status) + { + os::Printer::log("GLSL shader failed to compile", ELL_ERROR); + // check error message and log it + GLint maxLength=0; + GLsizei length; +#ifdef GL_ARB_shader_objects + Driver->extGlGetObjectParameteriv(shaderHandle, + GL_OBJECT_INFO_LOG_LENGTH_ARB, &maxLength); +#endif + if (maxLength) + { + GLcharARB *infoLog = new GLcharARB[maxLength]; + Driver->extGlGetInfoLog(shaderHandle, maxLength, &length, infoLog); + os::Printer::log(reinterpret_cast<const c8*>(infoLog), ELL_ERROR); + delete [] infoLog; + } + + return false; + } + + Driver->extGlAttachObject(Program, shaderHandle); + } + return true; +} + + +bool COpenGLSLMaterialRenderer::linkProgram() +{ + if (Program2) + { + Driver->extGlLinkProgram(Program2); + + GLint status = 0; + +#ifdef GL_VERSION_2_0 + Driver->extGlGetProgramiv(Program2, GL_LINK_STATUS, &status); +#endif + + if (!status) + { + os::Printer::log("GLSL shader program failed to link", ELL_ERROR); + // check error message and log it + GLint maxLength=0; + GLsizei length; +#ifdef GL_VERSION_2_0 + Driver->extGlGetProgramiv(Program2, GL_INFO_LOG_LENGTH, &maxLength); +#endif + if (maxLength) + { + GLchar *infoLog = new GLchar[maxLength]; + Driver->extGlGetProgramInfoLog(Program2, maxLength, &length, infoLog); + os::Printer::log(reinterpret_cast<const c8*>(infoLog), ELL_ERROR); + delete [] infoLog; + } + + return false; + } + + // get uniforms information + + GLint num = 0; +#ifdef GL_VERSION_2_0 + Driver->extGlGetProgramiv(Program2, GL_ACTIVE_UNIFORMS, &num); +#endif + + if (num == 0) + { + // no uniforms + return true; + } + + GLint maxlen = 0; +#ifdef GL_VERSION_2_0 + Driver->extGlGetProgramiv(Program2, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxlen); +#endif + + if (maxlen == 0) + { + os::Printer::log("GLSL: failed to retrieve uniform information", ELL_ERROR); + return false; + } + + // seems that some implementations use an extra null terminator + ++maxlen; + c8 *buf = new c8[maxlen]; + + UniformInfo.clear(); + UniformInfo.reallocate(num); + + for (GLint i=0; i < num; ++i) + { + SUniformInfo ui; + memset(buf, 0, maxlen); + + GLint size; + Driver->extGlGetActiveUniform(Program2, i, maxlen, 0, &size, &ui.type, reinterpret_cast<GLchar*>(buf)); + ui.name = buf; + + UniformInfo.push_back(ui); + } + + delete [] buf; + } + else + { + Driver->extGlLinkProgramARB(Program); + + GLint status = 0; + +#ifdef GL_ARB_shader_objects + Driver->extGlGetObjectParameteriv(Program, GL_OBJECT_LINK_STATUS_ARB, &status); +#endif + + if (!status) + { + os::Printer::log("GLSL shader program failed to link", ELL_ERROR); + // check error message and log it + GLint maxLength=0; + GLsizei length; +#ifdef GL_ARB_shader_objects + Driver->extGlGetObjectParameteriv(Program, + GL_OBJECT_INFO_LOG_LENGTH_ARB, &maxLength); +#endif + if (maxLength) + { + GLcharARB *infoLog = new GLcharARB[maxLength]; + Driver->extGlGetInfoLog(Program, maxLength, &length, infoLog); + os::Printer::log(reinterpret_cast<const c8*>(infoLog), ELL_ERROR); + delete [] infoLog; + } + + return false; + } + + // get uniforms information + + GLint num = 0; + #ifdef GL_ARB_shader_objects + Driver->extGlGetObjectParameteriv(Program, GL_OBJECT_ACTIVE_UNIFORMS_ARB, &num); + #endif + + if (num == 0) + { + // no uniforms + return true; + } + + GLint maxlen = 0; + #ifdef GL_ARB_shader_objects + Driver->extGlGetObjectParameteriv(Program, GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB, &maxlen); + #endif + + if (maxlen == 0) + { + os::Printer::log("GLSL: failed to retrieve uniform information", ELL_ERROR); + return false; + } + + // seems that some implementations use an extra null terminator + ++maxlen; + c8 *buf = new c8[maxlen]; + + UniformInfo.clear(); + UniformInfo.reallocate(num); + + for (int i=0; i < num; ++i) + { + SUniformInfo ui; + memset(buf, 0, maxlen); + + GLint size; + Driver->extGlGetActiveUniformARB(Program, i, maxlen, 0, &size, &ui.type, reinterpret_cast<GLcharARB*>(buf)); + ui.name = buf; + + UniformInfo.push_back(ui); + } + + delete [] buf; + } + + return true; +} + + +void COpenGLSLMaterialRenderer::setBasicRenderStates(const SMaterial& material, + const SMaterial& lastMaterial, + bool resetAllRenderstates) +{ + // forward + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + + +bool COpenGLSLMaterialRenderer::setVertexShaderConstant(const c8* name, const f32* floats, int count) +{ + return setPixelShaderConstant(name, floats, count); +} + +bool COpenGLSLMaterialRenderer::setVertexShaderConstant(const c8* name, const bool* bools, int count) +{ + return setPixelShaderConstant(name, bools, count); +} + +bool COpenGLSLMaterialRenderer::setVertexShaderConstant(const c8* name, const s32* ints, int count) +{ + return setPixelShaderConstant(name, ints, count); +} + +void COpenGLSLMaterialRenderer::setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + os::Printer::log("Cannot set constant, please use high level shader call instead.", ELL_WARNING); +} + +bool COpenGLSLMaterialRenderer::setPixelShaderConstant(const c8* name, const f32* floats, int count) +{ + u32 i; + const u32 num = UniformInfo.size(); + + for (i=0; i < num; ++i) + { + if (UniformInfo[i].name == name) + break; + } + + if (i == num) + return false; + +#if defined(GL_VERSION_2_0)||defined(GL_ARB_shader_objects) + GLint Location=0; + if (Program2) + Location=Driver->extGlGetUniformLocation(Program2,name); + else + Location=Driver->extGlGetUniformLocationARB(Program,name); + + bool status = true; + + switch (UniformInfo[i].type) + { + case GL_FLOAT: + Driver->extGlUniform1fv(Location, count, floats); + break; + case GL_FLOAT_VEC2: + Driver->extGlUniform2fv(Location, count/2, floats); + break; + case GL_FLOAT_VEC3: + Driver->extGlUniform3fv(Location, count/3, floats); + break; + case GL_FLOAT_VEC4: + Driver->extGlUniform4fv(Location, count/4, floats); + break; + case GL_FLOAT_MAT2: + Driver->extGlUniformMatrix2fv(Location, count/4, false, floats); + break; + case GL_FLOAT_MAT3: + Driver->extGlUniformMatrix3fv(Location, count/9, false, floats); + break; + case GL_FLOAT_MAT4: + Driver->extGlUniformMatrix4fv(Location, count/16, false, floats); + break; + case GL_SAMPLER_1D: + case GL_SAMPLER_2D: + case GL_SAMPLER_3D: + case GL_SAMPLER_CUBE: + case GL_SAMPLER_1D_SHADOW: + case GL_SAMPLER_2D_SHADOW: + { + const GLint id = static_cast<GLint>(*floats); + Driver->extGlUniform1iv(Location, 1, &id); + } + break; + default: + status = false; + break; + } + return status; +#else + return false; +#endif +} + +bool COpenGLSLMaterialRenderer::setPixelShaderConstant(const c8* name, const bool* bools, int count) +{ + u32 i; + const u32 num = UniformInfo.size(); + + for (i=0; i < num; ++i) + { + if (UniformInfo[i].name == name) + break; + } + + if (i == num) + return false; + +#if defined(GL_VERSION_2_0)||defined(GL_ARB_shader_objects) + GLint Location=0; + if (Program2) + Location=Driver->extGlGetUniformLocation(Program2,name); + else + Location=Driver->extGlGetUniformLocationARB(Program,name); + + bool status = true; + + switch (UniformInfo[i].type) + { + case GL_BOOL: + Driver->extGlUniform1iv(Location, count, (GLint*)bools); + break; + case GL_BOOL_VEC2: + Driver->extGlUniform2iv(Location, count/2, (GLint*)bools); + break; + case GL_BOOL_VEC3: + Driver->extGlUniform3iv(Location, count/3, (GLint*)bools); + break; + case GL_BOOL_VEC4: + Driver->extGlUniform4iv(Location, count/4, (GLint*)bools); + break; + default: + status = false; + break; + } + return status; +#else + return false; +#endif +} + +bool COpenGLSLMaterialRenderer::setPixelShaderConstant(const c8* name, const s32* ints, int count) +{ + u32 i; + const u32 num = UniformInfo.size(); + + for (i=0; i < num; ++i) + { + if (UniformInfo[i].name == name) + break; + } + + if (i == num) + return false; + +#if defined(GL_VERSION_2_0)||defined(GL_ARB_shader_objects) + GLint Location=0; + if (Program2) + Location=Driver->extGlGetUniformLocation(Program2,name); + else + Location=Driver->extGlGetUniformLocationARB(Program,name); + + bool status = true; + + switch (UniformInfo[i].type) + { + case GL_INT: + Driver->extGlUniform1iv(Location, count, ints); + break; + case GL_INT_VEC2: + Driver->extGlUniform2iv(Location, count/2, ints); + break; + case GL_INT_VEC3: + Driver->extGlUniform3iv(Location, count/3, ints); + break; + case GL_INT_VEC4: + Driver->extGlUniform4iv(Location, count/4, ints); + break; + case GL_SAMPLER_1D: + case GL_SAMPLER_2D: + case GL_SAMPLER_3D: + case GL_SAMPLER_CUBE: + case GL_SAMPLER_1D_SHADOW: + case GL_SAMPLER_2D_SHADOW: + Driver->extGlUniform1iv(Location, 1, ints); + break; + default: + status = false; + break; + } + return status; +#else + return false; +#endif +} + +void COpenGLSLMaterialRenderer::setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount) +{ + os::Printer::log("Cannot set constant, use high level shader call.", ELL_WARNING); +} + +IVideoDriver* COpenGLSLMaterialRenderer::getVideoDriver() +{ + return Driver; +} + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.h new file mode 100644 index 0000000..ff71150 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLSLMaterialRenderer.h @@ -0,0 +1,141 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPENGL_SHADER_LANGUAGE_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_OPENGL_SHADER_LANGUAGE_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#ifdef _IRR_WINDOWS_API_ + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <GL/gl.h> + #include "glext.h" +#else +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 +#else + #define GL_GLEXT_PROTOTYPES 1 +#endif +#if defined(_IRR_OSX_PLATFORM_) + #include <OpenGL/gl.h> +#else + #include <GL/gl.h> +#endif +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #include "glext.h" +#endif +#endif + + +#include "IMaterialRenderer.h" +#include "IMaterialRendererServices.h" +#include "IGPUProgrammingServices.h" +#include "irrArray.h" +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +class COpenGLDriver; +class IShaderConstantSetCallBack; + +//! Class for using GLSL shaders with OpenGL +//! Please note: This renderer implements its own IMaterialRendererServices +class COpenGLSLMaterialRenderer : public IMaterialRenderer, public IMaterialRendererServices +{ +public: + + //! Constructor + COpenGLSLMaterialRenderer( + COpenGLDriver* driver, + s32& outMaterialTypeNr, + const c8* vertexShaderProgram = 0, + const c8* vertexShaderEntryPointName = 0, + E_VERTEX_SHADER_TYPE vsCompileTarget = video::EVST_VS_1_1, + const c8* pixelShaderProgram = 0, + const c8* pixelShaderEntryPointName = 0, + E_PIXEL_SHADER_TYPE psCompileTarget = video::EPST_PS_1_1, + const c8* geometryShaderProgram = 0, + const c8* geometryShaderEntryPointName = "main", + E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, + scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, + u32 verticesOut = 0, + IShaderConstantSetCallBack* callback = 0, + IMaterialRenderer* baseMaterial = 0, + s32 userData = 0); + + //! Destructor + virtual ~COpenGLSLMaterialRenderer(); + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + virtual void OnUnsetMaterial(); + + //! Returns if the material is transparent. + virtual bool isTransparent() const; + + // implementations for the render services + virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates); + virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count); + virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count); + virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count); + virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count); + virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count); + virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count); + virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); + virtual IVideoDriver* getVideoDriver(); + +protected: + + //! constructor only for use by derived classes who want to + //! create a fall back material for example. + COpenGLSLMaterialRenderer(COpenGLDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, + s32 userData=0); + + void init(s32& outMaterialTypeNr, + const c8* vertexShaderProgram, + const c8* pixelShaderProgram, + const c8* geometryShaderProgram, + scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, + scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, + u32 verticesOut=0); + + bool createProgram(); + bool createShader(GLenum shaderType, const char* shader); + bool linkProgram(); + + COpenGLDriver* Driver; + IShaderConstantSetCallBack* CallBack; + IMaterialRenderer* BaseMaterial; + + struct SUniformInfo + { + core::stringc name; + GLenum type; + }; + + GLhandleARB Program; + GLuint Program2; + core::array<SUniformInfo> UniformInfo; + s32 UserData; +}; + + +} // end namespace video +} // end namespace irr + +#endif // compile with OpenGL +#endif // if included + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp new file mode 100644 index 0000000..8921a51 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp @@ -0,0 +1,339 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "COpenGLShaderMaterialRenderer.h" +#include "IGPUProgrammingServices.h" +#include "IShaderConstantSetCallBack.h" +#include "IVideoDriver.h" +#include "os.h" +#include "COpenGLDriver.h" + +namespace irr +{ +namespace video +{ + + +//! Constructor +COpenGLShaderMaterialRenderer::COpenGLShaderMaterialRenderer(video::COpenGLDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData) + : Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + VertexShader(0), UserData(userData) +{ + #ifdef _DEBUG + setDebugName("COpenGLShaderMaterialRenderer"); + #endif + + PixelShader.set_used(4); + for (u32 i=0; i<4; ++i) + { + PixelShader[i]=0; + } + + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); + + init(outMaterialTypeNr, vertexShaderProgram, pixelShaderProgram, EVT_STANDARD); +} + + +//! constructor only for use by derived classes who want to +//! create a fall back material for example. +COpenGLShaderMaterialRenderer::COpenGLShaderMaterialRenderer(COpenGLDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, s32 userData) +: Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), + VertexShader(0), UserData(userData) +{ + PixelShader.set_used(4); + for (u32 i=0; i<4; ++i) + { + PixelShader[i]=0; + } + + if (BaseMaterial) + BaseMaterial->grab(); + + if (CallBack) + CallBack->grab(); +} + + +//! Destructor +COpenGLShaderMaterialRenderer::~COpenGLShaderMaterialRenderer() +{ + if (CallBack) + CallBack->drop(); + + if (VertexShader) + Driver->extGlDeletePrograms(1, &VertexShader); + + for (u32 i=0; i<PixelShader.size(); ++i) + if (PixelShader[i]) + Driver->extGlDeletePrograms(1, &PixelShader[i]); + + if (BaseMaterial) + BaseMaterial->drop(); +} + + +void COpenGLShaderMaterialRenderer::init(s32& outMaterialTypeNr, + const c8* vertexShaderProgram, const c8* pixelShaderProgram, + E_VERTEX_TYPE type) +{ + outMaterialTypeNr = -1; + + bool success; + + // create vertex shader + success=createVertexShader(vertexShaderProgram); + + // create pixel shader + if (!createPixelShader(pixelShaderProgram) || !success) + return; + + // register as a new material + outMaterialTypeNr = Driver->addMaterialRenderer(this); +} + + +bool COpenGLShaderMaterialRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) +{ + // call callback to set shader constants + if (CallBack && (VertexShader || PixelShader[0])) + CallBack->OnSetConstants(service, UserData); + + return true; +} + + +void COpenGLShaderMaterialRenderer::OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, + bool resetAllRenderstates, video::IMaterialRendererServices* services) +{ + if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) + { + if (VertexShader) + { + // set new vertex shader +#ifdef GL_ARB_vertex_program + Driver->extGlBindProgram(GL_VERTEX_PROGRAM_ARB, VertexShader); + glEnable(GL_VERTEX_PROGRAM_ARB); +#elif defined(GL_NV_vertex_program) + Driver->extGlBindProgram(GL_VERTEX_PROGRAM_NV, VertexShader); + glEnable(GL_VERTEX_PROGRAM_NV); +#endif + } + + // set new pixel shader + if (PixelShader[0]) + { + GLuint nextShader=PixelShader[0]; + if (material.FogEnable) + { + GLint curFogMode; + glGetIntegerv(GL_FOG_MODE, &curFogMode); +// if (Driver->LinearFog && PixelShader[1]) + if (curFogMode==GL_LINEAR && PixelShader[1]) + nextShader=PixelShader[1]; +// else if (!Driver->LinearFog && PixelShader[2]) + else if (curFogMode==GL_EXP && PixelShader[2]) + nextShader=PixelShader[2]; + else if (curFogMode==GL_EXP2 && PixelShader[3]) + nextShader=PixelShader[3]; + } +#ifdef GL_ARB_fragment_program + Driver->extGlBindProgram(GL_FRAGMENT_PROGRAM_ARB, nextShader); + glEnable(GL_FRAGMENT_PROGRAM_ARB); +#elif defined(GL_NV_fragment_program) + Driver->extGlBindProgram(GL_FRAGMENT_PROGRAM_NV, nextShader); + glEnable(GL_FRAGMENT_PROGRAM_NV); +#endif + } + + if (BaseMaterial) + BaseMaterial->OnSetMaterial(material, material, true, services); + } + + //let callback know used material + if (CallBack) + CallBack->OnSetMaterial(material); + + for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) + Driver->setActiveTexture(i, material.getTexture(i)); + Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); +} + + +void COpenGLShaderMaterialRenderer::OnUnsetMaterial() +{ + // disable vertex shader +#ifdef GL_ARB_vertex_program + if (VertexShader) + glDisable(GL_VERTEX_PROGRAM_ARB); +#elif defined(GL_NV_vertex_program) + if (VertexShader) + glDisable(GL_VERTEX_PROGRAM_NV); +#endif + +#ifdef GL_ARB_fragment_program + if (PixelShader[0]) + glDisable(GL_FRAGMENT_PROGRAM_ARB); +#elif defined(GL_NV_fragment_program) + if (PixelShader[0]) + glDisable(GL_FRAGMENT_PROGRAM_NV); +#endif + + if (BaseMaterial) + BaseMaterial->OnUnsetMaterial(); +} + + +//! Returns if the material is transparent. +bool COpenGLShaderMaterialRenderer::isTransparent() const +{ + return BaseMaterial ? BaseMaterial->isTransparent() : false; +} + + +// This method needs a properly cleaned error state before the checked instruction is called +bool COpenGLShaderMaterialRenderer::checkError(const irr::c8* type) +{ +#if defined(GL_ARB_vertex_program) || defined(GL_NV_vertex_program) || defined(GL_ARB_fragment_program) || defined(GL_NV_fragment_program) + GLenum g = glGetError(); + if (g == GL_NO_ERROR) + return false; + + core::stringc errString = type; + errString += " compilation failed"; + + errString += " at position "; + GLint errPos=-1; +#if defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + glGetIntegerv( GL_PROGRAM_ERROR_POSITION_ARB, &errPos ); +#else + glGetIntegerv( GL_PROGRAM_ERROR_POSITION_NV, &errPos ); +#endif + errString += core::stringc(s32(errPos)); + errString += ":\n"; +#if defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program) + errString += reinterpret_cast<const char*>(glGetString(GL_PROGRAM_ERROR_STRING_ARB)); +#else + errString += reinterpret_cast<const char*>(glGetString(GL_PROGRAM_ERROR_STRING_NV)); +#endif +#else + core::stringc errString("Shaders not supported."); +#endif + os::Printer::log(errString.c_str(), ELL_ERROR); + return true; +} + + +bool COpenGLShaderMaterialRenderer::createPixelShader(const c8* pxsh) +{ + if (!pxsh) + return true; + + const core::stringc inshdr(pxsh); + core::stringc shdr; + const s32 pos = inshdr.find("#_IRR_FOG_MODE_"); + const u32 numShaders = (-1 != pos)?4:1; + + for (u32 i=0; i<numShaders; ++i) + { + if (i==0) + { + shdr=inshdr; + } + else + { + shdr = inshdr.subString(0, pos); + switch (i) { + case 1: shdr += "OPTION ARB_fog_linear;"; break; + case 2: shdr += "OPTION ARB_fog_exp;"; break; + case 3: shdr += "OPTION ARB_fog_exp2;"; break; + } + shdr += inshdr.subString(pos+16, inshdr.size()-pos-16); + } + Driver->extGlGenPrograms(1, &PixelShader[i]); +#ifdef GL_ARB_fragment_program + Driver->extGlBindProgram(GL_FRAGMENT_PROGRAM_ARB, PixelShader[i]); +#elif defined GL_NV_fragment_program + Driver->extGlBindProgram(GL_FRAGMENT_PROGRAM_NV, PixelShader[i]); +#endif + + // clear error buffer + while(glGetError() != GL_NO_ERROR) + {} + +#ifdef GL_ARB_fragment_program + // compile + Driver->extGlProgramString(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + shdr.size(), shdr.c_str()); +#elif defined GL_NV_fragment_program + Driver->extGlLoadProgram(GL_FRAGMENT_PROGRAM_NV, PixelShader[i], + shdr.size(), shdr.c_str()); +#endif + + if (checkError("Pixel shader")) + { + Driver->extGlDeletePrograms(1, &PixelShader[i]); + PixelShader[i]=0; + + return false; + } + } + + return true; +} + + +bool COpenGLShaderMaterialRenderer::createVertexShader(const c8* vtxsh) +{ + if (!vtxsh) + return true; + + Driver->extGlGenPrograms(1, &VertexShader); +#ifdef GL_ARB_vertex_program + Driver->extGlBindProgram(GL_VERTEX_PROGRAM_ARB, VertexShader); +#elif defined GL_NV_vertex_program + Driver->extGlBindProgram(GL_VERTEX_PROGRAM_NV, VertexShader); +#endif + + // clear error buffer + while(glGetError() != GL_NO_ERROR) + {} + + // compile +#ifdef GL_ARB_vertex_program + Driver->extGlProgramString(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + (GLsizei)strlen(vtxsh), vtxsh); +#elif defined GL_NV_vertex_program + Driver->extGlLoadProgram(GL_VERTEX_PROGRAM_NV, VertexShader, + (GLsizei)strlen(vtxsh), vtxsh); +#endif + + if (checkError("Vertex shader")) + { + Driver->extGlDeletePrograms(1, &VertexShader); + VertexShader=0; + + return false; + } + + return true; +} + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.h new file mode 100644 index 0000000..6f5f580 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLShaderMaterialRenderer.h @@ -0,0 +1,97 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 +#else + #define GL_GLEXT_PROTOTYPES 1 +#endif +#ifdef _IRR_WINDOWS_API_ + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <GL/gl.h> +#elif defined(_IRR_OSX_PLATFORM_) + #include <OpenGL/gl.h> +#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + #define NO_SDL_GLEXT + #include <SDL/SDL_video.h> + #include <SDL/SDL_opengl.h> +#else + #include <GL/gl.h> +#endif + +#include "IMaterialRenderer.h" + +namespace irr +{ +namespace video +{ + +class COpenGLDriver; +class IShaderConstantSetCallBack; +class IMaterialRenderer; + +//! Class for using vertex and pixel shaders with OpenGL +class COpenGLShaderMaterialRenderer : public IMaterialRenderer +{ +public: + + //! Constructor + COpenGLShaderMaterialRenderer(COpenGLDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, + IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData); + + //! Destructor + virtual ~COpenGLShaderMaterialRenderer(); + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services); + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); + + virtual void OnUnsetMaterial(); + + //! Returns if the material is transparent. + virtual bool isTransparent() const; + +protected: + + //! constructor only for use by derived classes who want to + //! create a fall back material for example. + COpenGLShaderMaterialRenderer(COpenGLDriver* driver, + IShaderConstantSetCallBack* callback, + IMaterialRenderer* baseMaterial, s32 userData=0); + + // must not be called more than once! + void init(s32& outMaterialTypeNr, const c8* vertexShaderProgram, + const c8* pixelShaderProgram, E_VERTEX_TYPE type); + + bool createPixelShader(const c8* pxsh); + bool createVertexShader(const c8* vtxsh); + bool checkError(const irr::c8* type); + + COpenGLDriver* Driver; + IShaderConstantSetCallBack* CallBack; + IMaterialRenderer* BaseMaterial; + + GLuint VertexShader; + // We have 4 values here, [0] is the non-fog version, the other three are + // ARB_fog_linear, ARB_fog_exp, and ARB_fog_exp2 in that order + core::array<GLuint> PixelShader; + s32 UserData; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.cpp new file mode 100644 index 0000000..3cc41c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.cpp @@ -0,0 +1,963 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#include "irrTypes.h" +#include "COpenGLTexture.h" +#include "COpenGLDriver.h" +#include "os.h" +#include "CColorConverter.h" + +#include "irrString.h" + +namespace irr +{ +namespace video +{ + +//! constructor for usual textures +COpenGLTexture::COpenGLTexture(IImage* origImage, const io::path& name, void* mipmapData, COpenGLDriver* driver) + : ITexture(name), ColorFormat(ECF_A8R8G8B8), Driver(driver), Image(0), MipImage(0), + TextureName(0), InternalFormat(GL_RGBA), PixelFormat(GL_BGRA_EXT), + PixelType(GL_UNSIGNED_BYTE), MipLevelStored(0), MipmapLegacyMode(true), + IsRenderTarget(false), AutomaticMipmapUpdate(false), + ReadOnlyLock(false), KeepImage(true) +{ + #ifdef _DEBUG + setDebugName("COpenGLTexture"); + #endif + + HasMipMaps = Driver->getTextureCreationFlag(ETCF_CREATE_MIP_MAPS); + getImageValues(origImage); + + glGenTextures(1, &TextureName); + + if (ImageSize==TextureSize) + { + Image = Driver->createImage(ColorFormat, ImageSize); + origImage->copyTo(Image); + } + else + { + Image = Driver->createImage(ColorFormat, TextureSize); + // scale texture + origImage->copyToScaling(Image); + } + uploadTexture(true, mipmapData); + if (!KeepImage) + { + Image->drop(); + Image=0; + } +} + + +//! constructor for basic setup (only for derived classes) +COpenGLTexture::COpenGLTexture(const io::path& name, COpenGLDriver* driver) + : ITexture(name), ColorFormat(ECF_A8R8G8B8), Driver(driver), Image(0), MipImage(0), + TextureName(0), InternalFormat(GL_RGBA), PixelFormat(GL_BGRA_EXT), + PixelType(GL_UNSIGNED_BYTE), MipLevelStored(0), HasMipMaps(true), + MipmapLegacyMode(true), IsRenderTarget(false), AutomaticMipmapUpdate(false), + ReadOnlyLock(false), KeepImage(true) +{ + #ifdef _DEBUG + setDebugName("COpenGLTexture"); + #endif +} + + +//! destructor +COpenGLTexture::~COpenGLTexture() +{ + if (TextureName) + glDeleteTextures(1, &TextureName); + if (Image) + Image->drop(); +} + + +//! Choose best matching color format, based on texture creation flags +ECOLOR_FORMAT COpenGLTexture::getBestColorFormat(ECOLOR_FORMAT format) +{ + ECOLOR_FORMAT destFormat = ECF_A8R8G8B8; + switch (format) + { + case ECF_A1R5G5B5: + if (!Driver->getTextureCreationFlag(ETCF_ALWAYS_32_BIT)) + destFormat = ECF_A1R5G5B5; + break; + case ECF_R5G6B5: + if (!Driver->getTextureCreationFlag(ETCF_ALWAYS_32_BIT)) + destFormat = ECF_A1R5G5B5; + break; + case ECF_A8R8G8B8: + if (Driver->getTextureCreationFlag(ETCF_ALWAYS_16_BIT) || + Driver->getTextureCreationFlag(ETCF_OPTIMIZED_FOR_SPEED)) + destFormat = ECF_A1R5G5B5; + break; + case ECF_R8G8B8: + if (Driver->getTextureCreationFlag(ETCF_ALWAYS_16_BIT) || + Driver->getTextureCreationFlag(ETCF_OPTIMIZED_FOR_SPEED)) + destFormat = ECF_A1R5G5B5; + default: + break; + } + if (Driver->getTextureCreationFlag(ETCF_NO_ALPHA_CHANNEL)) + { + switch (destFormat) + { + case ECF_A1R5G5B5: + destFormat = ECF_R5G6B5; + break; + case ECF_A8R8G8B8: + destFormat = ECF_R8G8B8; + break; + default: + break; + } + } + return destFormat; +} + + +//! Get opengl values for the GPU texture storage +GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT format, + GLint& filtering, + GLenum& colorformat, + GLenum& type) +{ + // default + filtering = GL_LINEAR; + colorformat = GL_RGBA; + type = GL_UNSIGNED_BYTE; + GLenum internalformat = GL_RGBA; + + switch(format) + { + case ECF_A1R5G5B5: + colorformat=GL_BGRA_EXT; + type=GL_UNSIGNED_SHORT_1_5_5_5_REV; + internalformat = GL_RGBA; + break; + case ECF_R5G6B5: + colorformat=GL_RGB; + type=GL_UNSIGNED_SHORT_5_6_5; + internalformat = GL_RGB; + break; + case ECF_R8G8B8: + colorformat=GL_BGR; + type=GL_UNSIGNED_BYTE; + internalformat = GL_RGB; + break; + case ECF_A8R8G8B8: + colorformat=GL_BGRA_EXT; + if (Driver->Version > 101) + type=GL_UNSIGNED_INT_8_8_8_8_REV; + internalformat = GL_RGBA; + break; + // Floating Point texture formats. Thanks to Patryk "Nadro" Nadrowski. + case ECF_R16F: + { +#ifdef GL_ARB_texture_rg + filtering = GL_NEAREST; + colorformat = GL_RED; + type = GL_FLOAT; + + internalformat = GL_R16F; +#else + ColorFormat = ECF_A8R8G8B8; + internalformat = GL_RGB8; +#endif + } + break; + case ECF_G16R16F: + { +#ifdef GL_ARB_texture_rg + filtering = GL_NEAREST; + colorformat = GL_RG; + type = GL_FLOAT; + + internalformat = GL_RG16F; +#else + ColorFormat = ECF_A8R8G8B8; + internalformat = GL_RGB8; +#endif + } + break; + case ECF_A16B16G16R16F: + { +#ifdef GL_ARB_texture_rg + filtering = GL_NEAREST; + colorformat = GL_RGBA; + type = GL_FLOAT; + + internalformat = GL_RGBA16F_ARB; +#else + ColorFormat = ECF_A8R8G8B8; + internalformat = GL_RGBA8; +#endif + } + break; + case ECF_R32F: + { +#ifdef GL_ARB_texture_rg + filtering = GL_NEAREST; + colorformat = GL_RED; + type = GL_FLOAT; + + internalformat = GL_R32F; +#else + ColorFormat = ECF_A8R8G8B8; + internalformat = GL_RGB8; +#endif + } + break; + case ECF_G32R32F: + { +#ifdef GL_ARB_texture_rg + filtering = GL_NEAREST; + colorformat = GL_RG; + type = GL_FLOAT; + + internalformat = GL_RG32F; +#else + ColorFormat = ECF_A8R8G8B8; + internalformat = GL_RGB8; +#endif + } + break; + case ECF_A32B32G32R32F: + { +#ifdef GL_ARB_texture_float + filtering = GL_NEAREST; + colorformat = GL_RGBA; + type = GL_FLOAT; + + internalformat = GL_RGBA32F_ARB; +#else + ColorFormat = ECF_A8R8G8B8; + internalformat = GL_RGBA8; +#endif + } + break; + default: + { + os::Printer::log("Unsupported texture format", ELL_ERROR); + internalformat = GL_RGBA8; + } + } +#if defined(GL_ARB_framebuffer_sRGB) || defined(GL_EXT_framebuffer_sRGB) + if (Driver->Params.HandleSRGB) + { + if (internalformat==GL_RGBA) + internalformat=GL_SRGB_ALPHA_EXT; + else if (internalformat==GL_RGB) + internalformat=GL_SRGB_EXT; + } +#endif + return internalformat; +} + + +// prepare values ImageSize, TextureSize, and ColorFormat based on image +void COpenGLTexture::getImageValues(IImage* image) +{ + if (!image) + { + os::Printer::log("No image for OpenGL texture.", ELL_ERROR); + return; + } + + ImageSize = image->getDimension(); + + if ( !ImageSize.Width || !ImageSize.Height) + { + os::Printer::log("Invalid size of image for OpenGL Texture.", ELL_ERROR); + return; + } + + const f32 ratio = (f32)ImageSize.Width/(f32)ImageSize.Height; + if ((ImageSize.Width>Driver->MaxTextureSize) && (ratio >= 1.0f)) + { + ImageSize.Width = Driver->MaxTextureSize; + ImageSize.Height = (u32)(Driver->MaxTextureSize/ratio); + } + else if (ImageSize.Height>Driver->MaxTextureSize) + { + ImageSize.Height = Driver->MaxTextureSize; + ImageSize.Width = (u32)(Driver->MaxTextureSize*ratio); + } + TextureSize=ImageSize.getOptimalSize(!Driver->queryFeature(EVDF_TEXTURE_NPOT)); + + ColorFormat = getBestColorFormat(image->getColorFormat()); +} + + +//! copies the the texture into an open gl texture. +void COpenGLTexture::uploadTexture(bool newTexture, void* mipmapData, u32 level) +{ + // check which image needs to be uploaded + IImage* image = level?MipImage:Image; + if (!image) + { + os::Printer::log("No image for OpenGL texture to upload", ELL_ERROR); + return; + } + + // get correct opengl color data values + GLenum oldInternalFormat = InternalFormat; + GLint filtering; + InternalFormat = getOpenGLFormatAndParametersFromColorFormat(ColorFormat, filtering, PixelFormat, PixelType); + // make sure we don't change the internal format of existing images + if (!newTexture) + InternalFormat=oldInternalFormat; + + Driver->setActiveTexture(0, this); + if (Driver->testGLError()) + os::Printer::log("Could not bind Texture", ELL_ERROR); + + // mipmap handling for main texture + if (!level && newTexture) + { +#ifndef DISABLE_MIPMAPPING +#ifdef GL_SGIS_generate_mipmap + // auto generate if possible and no mipmap data is given + if (HasMipMaps && !mipmapData && Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE)) + { + if (Driver->getTextureCreationFlag(ETCF_OPTIMIZED_FOR_SPEED)) + glHint(GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST); + else if (Driver->getTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY)) + glHint(GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST); + else + glHint(GL_GENERATE_MIPMAP_HINT_SGIS, GL_DONT_CARE); + + AutomaticMipmapUpdate=true; + + if (!Driver->queryFeature(EVDF_FRAMEBUFFER_OBJECT)) + { + glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE ); + MipmapLegacyMode=true; + } + else + MipmapLegacyMode=false; + } + else +#endif + { + // Either generate manually due to missing capability + // or use predefined mipmap data + AutomaticMipmapUpdate=false; + regenerateMipMapLevels(mipmapData); + } + if (HasMipMaps) // might have changed in regenerateMipMapLevels + { + // enable bilinear mipmap filter + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + else +#else + HasMipMaps=false; + os::Printer::log("Did not create OpenGL texture mip maps.", ELL_INFORMATION); +#endif + { + // enable bilinear filter without mipmaps + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + } + + // now get image data and upload to GPU + void* source = image->lock(); + if (newTexture) + glTexImage2D(GL_TEXTURE_2D, level, InternalFormat, image->getDimension().Width, + image->getDimension().Height, 0, PixelFormat, PixelType, source); + else + glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, image->getDimension().Width, + image->getDimension().Height, PixelFormat, PixelType, source); + image->unlock(); + + if (!MipmapLegacyMode && AutomaticMipmapUpdate) + { + glEnable(GL_TEXTURE_2D); + Driver->extGlGenerateMipmap(GL_TEXTURE_2D); + } + + if (Driver->testGLError()) + os::Printer::log("Could not glTexImage2D", ELL_ERROR); +} + + +//! lock function +void* COpenGLTexture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) +{ + // store info about which image is locked + IImage* image = (mipmapLevel==0)?Image:MipImage; + ReadOnlyLock |= (mode==ETLM_READ_ONLY); + MipLevelStored = mipmapLevel; + if (!ReadOnlyLock && mipmapLevel) + { +#ifdef GL_SGIS_generate_mipmap + if (Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE)) + { + // do not automatically generate and update mipmaps + glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_FALSE); + } +#endif + AutomaticMipmapUpdate=false; + } + + // if data not available or might have changed on GPU download it + if (!image || IsRenderTarget) + { + // prepare the data storage if necessary + if (!image) + { + if (mipmapLevel) + { + u32 i=0; + u32 width = TextureSize.Width; + u32 height = TextureSize.Height; + do + { + if (width>1) + width>>=1; + if (height>1) + height>>=1; + ++i; + } + while (i != mipmapLevel); + MipImage = image = Driver->createImage(ECF_A8R8G8B8, core::dimension2du(width,height)); + } + else + Image = image = Driver->createImage(ECF_A8R8G8B8, ImageSize); + ColorFormat = ECF_A8R8G8B8; + } + if (!image) + return 0; + + if (mode != ETLM_WRITE_ONLY) + { + u8* pixels = static_cast<u8*>(image->lock()); + if (!pixels) + return 0; + + // we need to keep the correct texture bound later on + GLint tmpTexture; + glGetIntegerv(GL_TEXTURE_BINDING_2D, &tmpTexture); + glBindTexture(GL_TEXTURE_2D, TextureName); + + // we need to flip textures vertical + // however, it seems that this does not hold for mipmap + // textures, for unknown reasons. + + // allows to read pixels in top-to-bottom order +#ifdef GL_MESA_pack_invert + if (!mipmapLevel && Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_MESA_pack_invert)) + glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); +#endif + + // download GPU data as ARGB8 to pixels; + glGetTexImage(GL_TEXTURE_2D, mipmapLevel, GL_BGRA_EXT, GL_UNSIGNED_BYTE, pixels); + + if (!mipmapLevel) + { +#ifdef GL_MESA_pack_invert + if (Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_MESA_pack_invert)) + glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE); + else +#endif + { + // opengl images are horizontally flipped, so we have to fix that here. + const s32 pitch=image->getPitch(); + u8* p2 = pixels + (image->getDimension().Height - 1) * pitch; + u8* tmpBuffer = new u8[pitch]; + for (u32 i=0; i < image->getDimension().Height; i += 2) + { + memcpy(tmpBuffer, pixels, pitch); + memcpy(pixels, p2, pitch); + memcpy(p2, tmpBuffer, pitch); + pixels += pitch; + p2 -= pitch; + } + delete [] tmpBuffer; + } + } + image->unlock(); + + //reset old bound texture + glBindTexture(GL_TEXTURE_2D, tmpTexture); + } + } + return image->lock(); +} + + +//! unlock function +void COpenGLTexture::unlock() +{ + // test if miplevel or main texture was locked + IImage* image = MipImage?MipImage:Image; + if (!image) + return; + // unlock image to see changes + image->unlock(); + // copy texture data to GPU + if (!ReadOnlyLock) + uploadTexture(false, 0, MipLevelStored); + ReadOnlyLock = false; + // cleanup local image + if (MipImage) + { + MipImage->drop(); + MipImage=0; + } + else if (!KeepImage) + { + Image->drop(); + Image=0; + } + // update information + if (Image) + ColorFormat=Image->getColorFormat(); + else + ColorFormat=ECF_A8R8G8B8; +} + + +//! Returns size of the original image. +const core::dimension2d<u32>& COpenGLTexture::getOriginalSize() const +{ + return ImageSize; +} + + +//! Returns size of the texture. +const core::dimension2d<u32>& COpenGLTexture::getSize() const +{ + return TextureSize; +} + + +//! returns driver type of texture, i.e. the driver, which created the texture +E_DRIVER_TYPE COpenGLTexture::getDriverType() const +{ + return EDT_OPENGL; +} + + +//! returns color format of texture +ECOLOR_FORMAT COpenGLTexture::getColorFormat() const +{ + return ColorFormat; +} + + +//! returns pitch of texture (in bytes) +u32 COpenGLTexture::getPitch() const +{ + if (Image) + return Image->getPitch(); + else + return 0; +} + + +//! return open gl texture name +GLuint COpenGLTexture::getOpenGLTextureName() const +{ + return TextureName; +} + + +//! Returns whether this texture has mipmaps +bool COpenGLTexture::hasMipMaps() const +{ + return HasMipMaps; +} + + +//! Regenerates the mip map levels of the texture. Useful after locking and +//! modifying the texture +void COpenGLTexture::regenerateMipMapLevels(void* mipmapData) +{ + if (AutomaticMipmapUpdate || !HasMipMaps || !Image) + return; + if ((Image->getDimension().Width==1) && (Image->getDimension().Height==1)) + return; + + // Manually create mipmaps or use prepared version + u32 width=Image->getDimension().Width; + u32 height=Image->getDimension().Height; + u32 i=0; + u8* target = static_cast<u8*>(mipmapData); + do + { + if (width>1) + width>>=1; + if (height>1) + height>>=1; + ++i; + if (!target) + target = new u8[width*height*Image->getBytesPerPixel()]; + // create scaled version if no mipdata available + if (!mipmapData) + Image->copyToScaling(target, width, height, Image->getColorFormat()); + glTexImage2D(GL_TEXTURE_2D, i, InternalFormat, width, height, + 0, PixelFormat, PixelType, target); + // get next prepared mipmap data if available + if (mipmapData) + { + mipmapData = static_cast<u8*>(mipmapData)+width*height*Image->getBytesPerPixel(); + target = static_cast<u8*>(mipmapData); + } + } + while (width!=1 || height!=1); + // cleanup + if (!mipmapData) + delete [] target; +} + + +bool COpenGLTexture::isRenderTarget() const +{ + return IsRenderTarget; +} + + +void COpenGLTexture::setIsRenderTarget(bool isTarget) +{ + IsRenderTarget = isTarget; +} + + +bool COpenGLTexture::isFrameBufferObject() const +{ + return false; +} + + +//! Bind Render Target Texture +void COpenGLTexture::bindRTT() +{ +} + + +//! Unbind Render Target Texture +void COpenGLTexture::unbindRTT() +{ + Driver->setActiveTexture(0, this); + + // Copy Our ViewPort To The Texture + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, getSize().Width, getSize().Height); +} + + +/* FBO Textures */ + +// helper function for render to texture +static bool checkFBOStatus(COpenGLDriver* Driver); + +//! RTT ColorFrameBuffer constructor +COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d<u32>& size, + const io::path& name, COpenGLDriver* driver, + ECOLOR_FORMAT format) + : COpenGLTexture(name, driver), DepthTexture(0), ColorFrameBuffer(0) +{ + #ifdef _DEBUG + setDebugName("COpenGLTexture_FBO"); + #endif + + ImageSize = size; + TextureSize = size; + + if (ECF_UNKNOWN == format) + format = getBestColorFormat(driver->getColorFormat()); + + ColorFormat = format; + + GLint FilteringType; + InternalFormat = getOpenGLFormatAndParametersFromColorFormat(format, FilteringType, PixelFormat, PixelType); + + HasMipMaps = false; + IsRenderTarget = true; + +#ifdef GL_EXT_framebuffer_object + // generate frame buffer + Driver->extGlGenFramebuffers(1, &ColorFrameBuffer); + bindRTT(); + + // generate color texture + glGenTextures(1, &TextureName); + Driver->setActiveTexture(0, this); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, FilteringType); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexImage2D(GL_TEXTURE_2D, 0, InternalFormat, ImageSize.Width, + ImageSize.Height, 0, PixelFormat, PixelType, 0); +#ifdef _DEBUG + driver->testGLError(); +#endif + + // attach color texture to frame buffer + Driver->extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, + GL_COLOR_ATTACHMENT0_EXT, + GL_TEXTURE_2D, + TextureName, + 0); +#ifdef _DEBUG + checkFBOStatus(Driver); +#endif + +#endif + unbindRTT(); +} + + +//! destructor +COpenGLFBOTexture::~COpenGLFBOTexture() +{ + if (DepthTexture) + if (DepthTexture->drop()) + Driver->removeDepthTexture(DepthTexture); + if (ColorFrameBuffer) + Driver->extGlDeleteFramebuffers(1, &ColorFrameBuffer); +} + + +bool COpenGLFBOTexture::isFrameBufferObject() const +{ + return true; +} + + +//! Bind Render Target Texture +void COpenGLFBOTexture::bindRTT() +{ +#ifdef GL_EXT_framebuffer_object + if (ColorFrameBuffer != 0) + Driver->extGlBindFramebuffer(GL_FRAMEBUFFER_EXT, ColorFrameBuffer); + glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); +#endif +} + + +//! Unbind Render Target Texture +void COpenGLFBOTexture::unbindRTT() +{ +#ifdef GL_EXT_framebuffer_object + if (ColorFrameBuffer != 0) + Driver->extGlBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); +#endif +} + + +/* FBO Depth Textures */ + +//! RTT DepthBuffer constructor +COpenGLFBODepthTexture::COpenGLFBODepthTexture( + const core::dimension2d<u32>& size, + const io::path& name, + COpenGLDriver* driver, + bool useStencil) + : COpenGLTexture(name, driver), DepthRenderBuffer(0), + StencilRenderBuffer(0), UseStencil(useStencil) +{ +#ifdef _DEBUG + setDebugName("COpenGLTextureFBO_Depth"); +#endif + + ImageSize = size; + TextureSize = size; + InternalFormat = GL_RGBA; + PixelFormat = GL_RGBA; + PixelType = GL_UNSIGNED_BYTE; + HasMipMaps = false; + + if (useStencil) + { + glGenTextures(1, &DepthRenderBuffer); + glBindTexture(GL_TEXTURE_2D, DepthRenderBuffer); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); +#ifdef GL_EXT_packed_depth_stencil + if (Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_EXT_packed_depth_stencil)) + { + // generate packed depth stencil texture + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_EXT, ImageSize.Width, + ImageSize.Height, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0); + StencilRenderBuffer = DepthRenderBuffer; // stencil is packed with depth + } + else // generate separate stencil and depth textures +#endif + { + // generate depth texture + glTexImage2D(GL_TEXTURE_2D, 0, Driver->getZBufferBits(), ImageSize.Width, + ImageSize.Height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 0); + + // generate stencil texture + glGenTextures(1, &StencilRenderBuffer); + glBindTexture(GL_TEXTURE_2D, StencilRenderBuffer); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexImage2D(GL_TEXTURE_2D, 0, GL_STENCIL_INDEX, ImageSize.Width, + ImageSize.Height, 0, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, 0); + } + } +#ifdef GL_EXT_framebuffer_object + else + { + // generate depth buffer + Driver->extGlGenRenderbuffers(1, &DepthRenderBuffer); + Driver->extGlBindRenderbuffer(GL_RENDERBUFFER_EXT, DepthRenderBuffer); + Driver->extGlRenderbufferStorage(GL_RENDERBUFFER_EXT, + Driver->getZBufferBits(), ImageSize.Width, + ImageSize.Height); + } +#endif +} + + +//! destructor +COpenGLFBODepthTexture::~COpenGLFBODepthTexture() +{ + if (DepthRenderBuffer && UseStencil) + glDeleteTextures(1, &DepthRenderBuffer); + else + Driver->extGlDeleteRenderbuffers(1, &DepthRenderBuffer); + if (StencilRenderBuffer && StencilRenderBuffer != DepthRenderBuffer) + glDeleteTextures(1, &StencilRenderBuffer); +} + + +//combine depth texture and rtt +bool COpenGLFBODepthTexture::attach(ITexture* renderTex) +{ + if (!renderTex) + return false; + video::COpenGLFBOTexture* rtt = static_cast<video::COpenGLFBOTexture*>(renderTex); + rtt->bindRTT(); +#ifdef GL_EXT_framebuffer_object + if (UseStencil) + { + // attach stencil texture to stencil buffer + Driver->extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, + GL_STENCIL_ATTACHMENT_EXT, + GL_TEXTURE_2D, + StencilRenderBuffer, + 0); + + // attach depth texture to depth buffer + Driver->extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, + GL_DEPTH_ATTACHMENT_EXT, + GL_TEXTURE_2D, + DepthRenderBuffer, + 0); + } + else + { + // attach depth renderbuffer to depth buffer + Driver->extGlFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, + GL_DEPTH_ATTACHMENT_EXT, + GL_RENDERBUFFER_EXT, + DepthRenderBuffer); + } +#endif + // check the status + if (!checkFBOStatus(Driver)) + { + os::Printer::log("FBO incomplete"); + return false; + } + rtt->DepthTexture=this; + grab(); // grab the depth buffer, not the RTT + rtt->unbindRTT(); + return true; +} + + +//! Bind Render Target Texture +void COpenGLFBODepthTexture::bindRTT() +{ +} + + +//! Unbind Render Target Texture +void COpenGLFBODepthTexture::unbindRTT() +{ +} + + +bool checkFBOStatus(COpenGLDriver* Driver) +{ +#ifdef GL_EXT_framebuffer_object + GLenum status = Driver->extGlCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); + + switch (status) + { + //Our FBO is perfect, return true + case GL_FRAMEBUFFER_COMPLETE_EXT: + return true; + + case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: + os::Printer::log("FBO has invalid read buffer", ELL_ERROR); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: + os::Printer::log("FBO has invalid draw buffer", ELL_ERROR); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: + os::Printer::log("FBO has one or several incomplete image attachments", ELL_ERROR); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: + os::Printer::log("FBO has one or several image attachments with different internal formats", ELL_ERROR); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: + os::Printer::log("FBO has one or several image attachments with different dimensions", ELL_ERROR); + break; + +// not part of fbo_object anymore, but won't harm as it is just a return value +#ifdef GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT + case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT: + os::Printer::log("FBO has a duplicate image attachment", ELL_ERROR); + break; +#endif + + case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: + os::Printer::log("FBO missing an image attachment", ELL_ERROR); + break; + +#ifdef GL_EXT_framebuffer_multisample + case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT: + os::Printer::log("FBO wrong multisample setup", ELL_ERROR); + break; +#endif + + case GL_FRAMEBUFFER_UNSUPPORTED_EXT: + os::Printer::log("FBO format unsupported", ELL_ERROR); + break; + + default: + break; + } +#endif + os::Printer::log("FBO error", ELL_ERROR); +// _IRR_DEBUG_BREAK_IF(true); + return false; +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_OPENGL_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.h b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.h new file mode 100644 index 0000000..1fd4ca2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/COpenGLTexture.h @@ -0,0 +1,205 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OPEN_GL_TEXTURE_H_INCLUDED__ +#define __C_OPEN_GL_TEXTURE_H_INCLUDED__ + +#include "ITexture.h" +#include "IImage.h" + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_OPENGL_ + +#if defined(_IRR_OPENGL_USE_EXTPOINTER_) + #define GL_GLEXT_LEGACY 1 +#else + #define GL_GLEXT_PROTOTYPES 1 +#endif +#ifdef _IRR_WINDOWS_API_ + // include windows headers for HWND + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <GL/gl.h> +#ifdef _MSC_VER + #pragma comment(lib, "OpenGL32.lib") +#endif +#elif defined(_IRR_OSX_PLATFORM_) + #include <OpenGL/gl.h> +#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + #define NO_SDL_GLEXT + #include <SDL/SDL_video.h> + #include <SDL/SDL_opengl.h> +#else + #if defined(_IRR_OSX_PLATFORM_) + #include <OpenGL/gl.h> + #else + #include <GL/gl.h> + #endif +#endif + + +namespace irr +{ +namespace video +{ + +class COpenGLDriver; +//! OpenGL texture. +class COpenGLTexture : public ITexture +{ +public: + + //! constructor + COpenGLTexture(IImage* surface, const io::path& name, void* mipmapData=0, COpenGLDriver* driver=0); + + //! destructor + virtual ~COpenGLTexture(); + + //! lock function + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); + + //! unlock function + virtual void unlock(); + + //! Returns original size of the texture (image). + virtual const core::dimension2d<u32>& getOriginalSize() const; + + //! Returns size of the texture. + virtual const core::dimension2d<u32>& getSize() const; + + //! returns driver type of texture (=the driver, that created it) + virtual E_DRIVER_TYPE getDriverType() const; + + //! returns color format of texture + virtual ECOLOR_FORMAT getColorFormat() const; + + //! returns pitch of texture (in bytes) + virtual u32 getPitch() const; + + //! return open gl texture name + GLuint getOpenGLTextureName() const; + + //! return whether this texture has mipmaps + virtual bool hasMipMaps() const; + + //! Regenerates the mip map levels of the texture. + /** Useful after locking and modifying the texture + \param mipmapData Pointer to raw mipmap data, including all necessary mip levels, in the same format as the main texture image. If not set the mipmaps are derived from the main image. */ + virtual void regenerateMipMapLevels(void* mipmapData=0); + + //! Is it a render target? + virtual bool isRenderTarget() const; + + //! Is it a FrameBufferObject? + virtual bool isFrameBufferObject() const; + + //! Bind RenderTargetTexture + virtual void bindRTT(); + + //! Unbind RenderTargetTexture + virtual void unbindRTT(); + + //! sets whether this texture is intended to be used as a render target. + void setIsRenderTarget(bool isTarget); + +protected: + + //! protected constructor with basic setup, no GL texture name created, for derived classes + COpenGLTexture(const io::path& name, COpenGLDriver* driver); + + //! get the desired color format based on texture creation flags and the input format. + ECOLOR_FORMAT getBestColorFormat(ECOLOR_FORMAT format); + + //! Get the OpenGL color format parameters based on the given Irrlicht color format + GLint getOpenGLFormatAndParametersFromColorFormat( + ECOLOR_FORMAT format, GLint& filtering, GLenum& colorformat, GLenum& type); + + //! get important numbers of the image and hw texture + void getImageValues(IImage* image); + + //! copies the texture into an OpenGL texture. + /** \param newTexture True if method is called for a newly created texture for the first time. Otherwise call with false to improve memory handling. + \param mipmapData Pointer to raw mipmap data, including all necessary mip levels, in the same format as the main texture image. + \param mipLevel If set to non-zero, only that specific miplevel is updated, using the MipImage member. */ + void uploadTexture(bool newTexture=false, void* mipmapData=0, u32 mipLevel=0); + + core::dimension2d<u32> ImageSize; + core::dimension2d<u32> TextureSize; + ECOLOR_FORMAT ColorFormat; + COpenGLDriver* Driver; + IImage* Image; + IImage* MipImage; + + GLuint TextureName; + GLint InternalFormat; + GLenum PixelFormat; + GLenum PixelType; + + u8 MipLevelStored; + bool HasMipMaps; + bool MipmapLegacyMode; + bool IsRenderTarget; + bool AutomaticMipmapUpdate; + bool ReadOnlyLock; + bool KeepImage; +}; + +//! OpenGL FBO texture. +class COpenGLFBOTexture : public COpenGLTexture +{ +public: + + //! FrameBufferObject constructor + COpenGLFBOTexture(const core::dimension2d<u32>& size, const io::path& name, + COpenGLDriver* driver = 0, ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! destructor + virtual ~COpenGLFBOTexture(); + + //! Is it a FrameBufferObject? + virtual bool isFrameBufferObject() const; + + //! Bind RenderTargetTexture + virtual void bindRTT(); + + //! Unbind RenderTargetTexture + virtual void unbindRTT(); + + ITexture* DepthTexture; +protected: + GLuint ColorFrameBuffer; +}; + + +//! OpenGL FBO depth texture. +class COpenGLFBODepthTexture : public COpenGLTexture +{ +public: + //! FrameBufferObject depth constructor + COpenGLFBODepthTexture(const core::dimension2d<u32>& size, const io::path& name, COpenGLDriver* driver=0, bool useStencil=false); + + //! destructor + virtual ~COpenGLFBODepthTexture(); + + //! Bind RenderTargetTexture + virtual void bindRTT(); + + //! Unbind RenderTargetTexture + virtual void unbindRTT(); + + bool attach(ITexture*); + +protected: + GLuint DepthRenderBuffer; + GLuint StencilRenderBuffer; + bool UseStencil; +}; + + +} // end namespace video +} // end namespace irr + +#endif +#endif // _IRR_COMPILE_WITH_OPENGL_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.cpp new file mode 100644 index 0000000..1ef4946 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.cpp @@ -0,0 +1,817 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_PLY_LOADER_ + +#include "CPLYMeshFileLoader.h" +#include "IMeshManipulator.h" +#include "SMesh.h" +#include "CDynamicMeshBuffer.h" +#include "SAnimatedMesh.h" +#include "IReadFile.h" +#include "fast_atof.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +// input buffer must be at least twice as long as the longest line in the file +#define PLY_INPUT_BUFFER_SIZE 51200 // file is loaded in 50k chunks + +// constructor +CPLYMeshFileLoader::CPLYMeshFileLoader(scene::ISceneManager* smgr) +: SceneManager(smgr), File(0), Buffer(0) +{ +} + + +CPLYMeshFileLoader::~CPLYMeshFileLoader() +{ + // delete the buffer in case we didn't earlier + // (we do, but this could be disabled to increase the speed of loading hundreds of meshes) + if (Buffer) + { + delete [] Buffer; + Buffer = 0; + } + + // Destroy the element list if it exists + for (u32 i=0; i<ElementList.size(); ++i) + delete ElementList[i]; + ElementList.clear(); +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CPLYMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension(filename, "ply"); +} + + +//! creates/loads an animated mesh from the file. +IAnimatedMesh* CPLYMeshFileLoader::createMesh(io::IReadFile* file) +{ + if (!file) + return 0; + + File = file; + File->grab(); + + // attempt to allocate the buffer and fill with data + if (!allocateBuffer()) + { + File->drop(); + File = 0; + return 0; + } + + // start with empty mesh + SAnimatedMesh* animMesh = 0; + u32 vertCount=0; + + // Currently only supports ASCII meshes + if (strcmp(getNextLine(), "ply")) + { + os::Printer::log("Not a valid PLY file", file->getFileName().c_str(), ELL_ERROR); + } + else + { + // cut the next line out + getNextLine(); + // grab the word from this line + c8 *word = getNextWord(); + + // ignore comments + while (strcmp(word, "comment") == 0) + { + getNextLine(); + word = getNextWord(); + } + + bool readingHeader = true; + bool continueReading = true; + IsBinaryFile = false; + IsWrongEndian= false; + + do + { + if (strcmp(word, "format") == 0) + { + word = getNextWord(); + + if (strcmp(word, "binary_little_endian") == 0) + { + IsBinaryFile = true; +#ifdef __BIG_ENDIAN__ + IsWrongEndian = true; +#endif + + } + else if (strcmp(word, "binary_big_endian") == 0) + { + IsBinaryFile = true; +#ifndef __BIG_ENDIAN__ + IsWrongEndian = true; +#endif + } + else if (strcmp(word, "ascii")) + { + // abort if this isn't an ascii or a binary mesh + os::Printer::log("Unsupported PLY mesh format", word, ELL_ERROR); + continueReading = false; + } + + if (continueReading) + { + word = getNextWord(); + if (strcmp(word, "1.0")) + { + os::Printer::log("Unsupported PLY mesh version", word, ELL_WARNING); + } + } + } + else if (strcmp(word, "property") == 0) + { + word = getNextWord(); + + if (!ElementList.size()) + { + os::Printer::log("PLY property found before element", word, ELL_WARNING); + } + else + { + // get element + SPLYElement* el = ElementList[ElementList.size()-1]; + + // fill property struct + SPLYProperty prop; + prop.Type = getPropertyType(word); + el->KnownSize += prop.size(); + + if (prop.Type == EPLYPT_LIST) + { + el->IsFixedWidth = false; + + word = getNextWord(); + + prop.Data.List.CountType = getPropertyType(word); + if (IsBinaryFile && prop.Data.List.CountType == EPLYPT_UNKNOWN) + { + os::Printer::log("Cannot read binary PLY file containing data types of unknown length", word, ELL_ERROR); + continueReading = false; + } + else + { + word = getNextWord(); + prop.Data.List.ItemType = getPropertyType(word); + if (IsBinaryFile && prop.Data.List.ItemType == EPLYPT_UNKNOWN) + { + os::Printer::log("Cannot read binary PLY file containing data types of unknown length", word, ELL_ERROR); + continueReading = false; + } + } + } + else if (IsBinaryFile && prop.Type == EPLYPT_UNKNOWN) + { + os::Printer::log("Cannot read binary PLY file containing data types of unknown length", word, ELL_ERROR); + continueReading = false; + } + + prop.Name = getNextWord(); + + // add property to element + el->Properties.push_back(prop); + } + } + else if (strcmp(word, "element") == 0) + { + SPLYElement* el = new SPLYElement; + el->Name = getNextWord(); + el->Count = atoi(getNextWord()); + el->IsFixedWidth = true; + el->KnownSize = 0; + ElementList.push_back(el); + + if (el->Name == "vertex") + vertCount = el->Count; + + } + else if (strcmp(word, "end_header") == 0) + { + readingHeader = false; + if (IsBinaryFile) + { + StartPointer = LineEndPointer + 1; + } + } + else if (strcmp(word, "comment") == 0) + { + // ignore line + } + else + { + os::Printer::log("Unknown item in PLY file", word, ELL_WARNING); + } + + if (readingHeader && continueReading) + { + getNextLine(); + word = getNextWord(); + } + } + while (readingHeader && continueReading); + + // now to read the actual data from the file + if (continueReading) + { + // create a mesh buffer + CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65565 ? video::EIT_32BIT : video::EIT_16BIT); + mb->getVertexBuffer().reallocate(vertCount); + mb->getIndexBuffer().reallocate(vertCount); + mb->setHardwareMappingHint(EHM_STATIC); + + bool hasNormals=true; + // loop through each of the elements + for (u32 i=0; i<ElementList.size(); ++i) + { + // do we want this element type? + if (ElementList[i]->Name == "vertex") + { + // loop through vertex properties + for (u32 j=0; j < ElementList[i]->Count; ++j) + hasNormals &= readVertex(*ElementList[i], mb); + } + else if (ElementList[i]->Name == "face") + { + // read faces + for (u32 j=0; j < ElementList[i]->Count; ++j) + readFace(*ElementList[i], mb); + } + else + { + // skip these elements + for (u32 j=0; j < ElementList[i]->Count; ++j) + skipElement(*ElementList[i]); + } + } + mb->recalculateBoundingBox(); + if (!hasNormals) + SceneManager->getMeshManipulator()->recalculateNormals(mb); + SMesh* m = new SMesh(); + m->addMeshBuffer(mb); + m->recalculateBoundingBox(); + mb->drop(); + animMesh = new SAnimatedMesh(); + animMesh->addMesh(m); + animMesh->recalculateBoundingBox(); + m->drop(); + } + } + + + // free the buffer + delete [] Buffer; + Buffer = 0; + File->drop(); + File = 0; + + // if we managed to create a mesh, return it + return animMesh; +} + + +bool CPLYMeshFileLoader::readVertex(const SPLYElement &Element, scene::CDynamicMeshBuffer* mb) +{ + if (!IsBinaryFile) + getNextLine(); + + video::S3DVertex vert; + vert.Color.set(255,255,255,255); + vert.TCoords.X = 0.0f; + vert.TCoords.Y = 0.0f; + vert.Normal.X = 0.0f; + vert.Normal.Y = 1.0f; + vert.Normal.Z = 0.0f; + + bool result=false; + for (u32 i=0; i < Element.Properties.size(); ++i) + { + E_PLY_PROPERTY_TYPE t = Element.Properties[i].Type; + + if (Element.Properties[i].Name == "x") + vert.Pos.X = getFloat(t); + else if (Element.Properties[i].Name == "y") + vert.Pos.Z = getFloat(t); + else if (Element.Properties[i].Name == "z") + vert.Pos.Y = getFloat(t); + else if (Element.Properties[i].Name == "nx") + { + vert.Normal.X = getFloat(t); + result=true; + } + else if (Element.Properties[i].Name == "ny") + { + vert.Normal.Z = getFloat(t); + result=true; + } + else if (Element.Properties[i].Name == "nz") + { + vert.Normal.Y = getFloat(t); + result=true; + } + else if (Element.Properties[i].Name == "u") + vert.TCoords.X = getFloat(t); + else if (Element.Properties[i].Name == "v") + vert.TCoords.Y = getFloat(t); + else if (Element.Properties[i].Name == "red") + { + u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t); + vert.Color.setRed(value); + } + else if (Element.Properties[i].Name == "green") + { + u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t); + vert.Color.setGreen(value); + } + else if (Element.Properties[i].Name == "blue") + { + u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t); + vert.Color.setBlue(value); + } + else if (Element.Properties[i].Name == "alpha") + { + u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t); + vert.Color.setAlpha(value); + } + else + skipProperty(Element.Properties[i]); + } + + mb->getVertexBuffer().push_back(vert); + + return result; +} + + +bool CPLYMeshFileLoader::readFace(const SPLYElement &Element, scene::CDynamicMeshBuffer* mb) +{ + if (!IsBinaryFile) + getNextLine(); + + for (u32 i=0; i < Element.Properties.size(); ++i) + { + if ( (Element.Properties[i].Name == "vertex_indices" || + Element.Properties[i].Name == "vertex_index") && Element.Properties[i].Type == EPLYPT_LIST) + { + // get count + s32 count = getInt(Element.Properties[i].Data.List.CountType); + u32 a = getInt(Element.Properties[i].Data.List.ItemType), + b = getInt(Element.Properties[i].Data.List.ItemType), + c = getInt(Element.Properties[i].Data.List.ItemType); + s32 j = 3; + + mb->getIndexBuffer().push_back(a); + mb->getIndexBuffer().push_back(c); + mb->getIndexBuffer().push_back(b); + + for (; j < count; ++j) + { + b = c; + c = getInt(Element.Properties[i].Data.List.ItemType); + mb->getIndexBuffer().push_back(a); + mb->getIndexBuffer().push_back(c); + mb->getIndexBuffer().push_back(b); + } + } + else if (Element.Properties[i].Name == "intensity") + { + // todo: face intensity + skipProperty(Element.Properties[i]); + } + else + skipProperty(Element.Properties[i]); + } + return true; +} + + +// skips an element and all properties. return false on EOF +void CPLYMeshFileLoader::skipElement(const SPLYElement &Element) +{ + if (IsBinaryFile) + if (Element.IsFixedWidth) + moveForward(Element.KnownSize); + else + for (u32 i=0; i < Element.Properties.size(); ++i) + skipProperty(Element.Properties[i]); + else + getNextLine(); +} + + +void CPLYMeshFileLoader::skipProperty(const SPLYProperty &Property) +{ + if (Property.Type == EPLYPT_LIST) + { + s32 count = getInt(Property.Data.List.CountType); + + for (s32 i=0; i < count; ++i) + getInt(Property.Data.List.CountType); + } + else + { + if (IsBinaryFile) + moveForward(Property.size()); + else + getNextWord(); + } +} + + +bool CPLYMeshFileLoader::allocateBuffer() +{ + // Destroy the element list if it exists + for (u32 i=0; i<ElementList.size(); ++i) + delete ElementList[i]; + ElementList.clear(); + + if (!Buffer) + Buffer = new c8[PLY_INPUT_BUFFER_SIZE]; + + // not enough memory? + if (!Buffer) + return false; + + // blank memory + memset(Buffer, 0, PLY_INPUT_BUFFER_SIZE); + + StartPointer = Buffer; + EndPointer = Buffer; + LineEndPointer = Buffer-1; + WordLength = -1; + EndOfFile = false; + + // get data from the file + fillBuffer(); + + return true; +} + + +// gets more data from the file. returns false on EOF +void CPLYMeshFileLoader::fillBuffer() +{ + if (EndOfFile) + return; + + u32 length = (u32)(EndPointer - StartPointer); + if (length && StartPointer != Buffer) + { + // copy the remaining data to the start of the buffer + memcpy(Buffer, StartPointer, length); + } + // reset start position + StartPointer = Buffer; + EndPointer = StartPointer + length; + + if (File->getPos() == File->getSize()) + { + EndOfFile = true; + } + else + { + // read data from the file + u32 count = File->read(EndPointer, PLY_INPUT_BUFFER_SIZE - length); + + // increment the end pointer by the number of bytes read + EndPointer = EndPointer + count; + + // if we didn't completely fill the buffer + if (count != PLY_INPUT_BUFFER_SIZE - length) + { + // blank the rest of the memory + memset(EndPointer, 0, Buffer + PLY_INPUT_BUFFER_SIZE - EndPointer); + + // end of file + EndOfFile = true; + } + } +} + + +// skips x bytes in the file, getting more data if required +void CPLYMeshFileLoader::moveForward(u32 bytes) +{ + if (StartPointer + bytes >= EndPointer) + fillBuffer(); + if (StartPointer + bytes < EndPointer) + StartPointer += bytes; + else + StartPointer = EndPointer; +} + + +E_PLY_PROPERTY_TYPE CPLYMeshFileLoader::getPropertyType(const c8* typeString) const +{ + if (strcmp(typeString, "char") == 0 || + strcmp(typeString, "uchar") == 0 || + strcmp(typeString, "int8") == 0 || + strcmp(typeString, "uint8") == 0) + { + return EPLYPT_INT8; + } + else if (strcmp(typeString, "uint") == 0 || + strcmp(typeString, "int16") == 0 || + strcmp(typeString, "uint16") == 0 || + strcmp(typeString, "short") == 0 || + strcmp(typeString, "ushort") == 0) + { + return EPLYPT_INT16; + } + else if (strcmp(typeString, "int") == 0 || + strcmp(typeString, "long") == 0 || + strcmp(typeString, "ulong") == 0 || + strcmp(typeString, "int32") == 0 || + strcmp(typeString, "uint32") == 0) + { + return EPLYPT_INT32; + } + else if (strcmp(typeString, "float") == 0 || + strcmp(typeString, "float32") == 0) + { + return EPLYPT_FLOAT32; + } + else if (strcmp(typeString, "float64") == 0 || + strcmp(typeString, "double") == 0) + { + return EPLYPT_FLOAT64; + } + else if ( strcmp(typeString, "list") == 0 ) + { + return EPLYPT_LIST; + } + else + { + // unsupported type. + // cannot be loaded in binary mode + return EPLYPT_UNKNOWN; + } +} + + +// Split the string data into a line in place by terminating it instead of copying. +c8* CPLYMeshFileLoader::getNextLine() +{ + // move the start pointer along + StartPointer = LineEndPointer + 1; + + // crlf split across buffer move + if (*StartPointer == '\n') + { + *StartPointer = '\0'; + ++StartPointer; + } + + // begin at the start of the next line + c8* pos = StartPointer; + while (pos < EndPointer && *pos && *pos != '\r' && *pos != '\n') + ++pos; + + if ( pos < EndPointer && ( *(pos+1) == '\r' || *(pos+1) == '\n') ) + { + *pos = '\0'; + ++pos; + } + + // we have reached the end of the buffer + if (pos >= EndPointer) + { + // get data from the file + if (!EndOfFile) + { + fillBuffer(); + // reset line end pointer + LineEndPointer = StartPointer - 1; + + if (StartPointer != EndPointer) + return getNextLine(); + else + return Buffer; + } + else + { + // EOF + StartPointer = EndPointer-1; + *StartPointer = '\0'; + return StartPointer; + } + } + else + { + // null terminate the string in place + *pos = '\0'; + LineEndPointer = pos; + WordLength = -1; + // return pointer to the start of the line + return StartPointer; + } +} + + +// null terminate the next word on the previous line and move the next word pointer along +// since we already have a full line in the buffer, we never need to retrieve more data +c8* CPLYMeshFileLoader::getNextWord() +{ + // move the start pointer along + StartPointer += WordLength + 1; + + if (StartPointer == LineEndPointer) + { + WordLength = -1; // + return LineEndPointer; + } + // begin at the start of the next word + c8* pos = StartPointer; + while (*pos && pos < LineEndPointer && pos < EndPointer && *pos != ' ' && *pos != '\t') + ++pos; + + while(*pos && pos < LineEndPointer && pos < EndPointer && (*pos == ' ' || *pos == '\t') ) + { + // null terminate the string in place + *pos = '\0'; + ++pos; + } + --pos; + WordLength = (s32)(pos-StartPointer); + // return pointer to the start of the word + return StartPointer; +} + + +// read the next float from the file and move the start pointer along +f32 CPLYMeshFileLoader::getFloat(E_PLY_PROPERTY_TYPE t) +{ + f32 retVal = 0.0f; + + if (IsBinaryFile) + { + if (EndPointer - StartPointer < 8) + fillBuffer(); + + if (EndPointer - StartPointer > 0) + { + switch (t) + { + case EPLYPT_INT8: + retVal = *StartPointer; + StartPointer++; + break; + case EPLYPT_INT16: + if (IsWrongEndian) + retVal = os::Byteswap::byteswap(*(reinterpret_cast<s16*>(StartPointer))); + else + retVal = *(reinterpret_cast<s16*>(StartPointer)); + StartPointer += 2; + break; + case EPLYPT_INT32: + if (IsWrongEndian) + retVal = f32(os::Byteswap::byteswap(*(reinterpret_cast<s32*>(StartPointer)))); + else + retVal = f32(*(reinterpret_cast<s32*>(StartPointer))); + StartPointer += 4; + break; + case EPLYPT_FLOAT32: + if (IsWrongEndian) + retVal = os::Byteswap::byteswap(*(reinterpret_cast<f32*>(StartPointer))); + else + retVal = *(reinterpret_cast<f32*>(StartPointer)); + StartPointer += 4; + break; + case EPLYPT_FLOAT64: + // todo: byteswap 64-bit + retVal = f32(*(reinterpret_cast<f64*>(StartPointer))); + StartPointer += 8; + break; + case EPLYPT_LIST: + case EPLYPT_UNKNOWN: + default: + retVal = 0.0f; + StartPointer++; // ouch! + } + } + else + retVal = 0.0f; + } + else + { + c8* word = getNextWord(); + switch (t) + { + case EPLYPT_INT8: + case EPLYPT_INT16: + case EPLYPT_INT32: + retVal = f32(atoi(word)); + break; + case EPLYPT_FLOAT32: + case EPLYPT_FLOAT64: + retVal = f32(atof(word)); + break; + case EPLYPT_LIST: + case EPLYPT_UNKNOWN: + default: + retVal = 0.0f; + } + } + return retVal; +} + + +// read the next int from the file and move the start pointer along +u32 CPLYMeshFileLoader::getInt(E_PLY_PROPERTY_TYPE t) +{ + u32 retVal = 0; + + if (IsBinaryFile) + { + if (!EndOfFile && EndPointer - StartPointer < 8) + fillBuffer(); + + if (EndPointer - StartPointer) + { + switch (t) + { + case EPLYPT_INT8: + retVal = *StartPointer; + StartPointer++; + break; + case EPLYPT_INT16: + if (IsWrongEndian) + retVal = os::Byteswap::byteswap(*(reinterpret_cast<u16*>(StartPointer))); + else + retVal = *(reinterpret_cast<u16*>(StartPointer)); + StartPointer += 2; + break; + case EPLYPT_INT32: + if (IsWrongEndian) + retVal = os::Byteswap::byteswap(*(reinterpret_cast<s32*>(StartPointer))); + else + retVal = *(reinterpret_cast<s32*>(StartPointer)); + StartPointer += 4; + break; + case EPLYPT_FLOAT32: + if (IsWrongEndian) + retVal = (u32)os::Byteswap::byteswap(*(reinterpret_cast<f32*>(StartPointer))); + else + retVal = (u32)(*(reinterpret_cast<f32*>(StartPointer))); + StartPointer += 4; + break; + case EPLYPT_FLOAT64: + // todo: byteswap 64-bit + retVal = (u32)(*(reinterpret_cast<f64*>(StartPointer))); + StartPointer += 8; + break; + case EPLYPT_LIST: + case EPLYPT_UNKNOWN: + default: + retVal = 0; + StartPointer++; // ouch! + } + } + else + retVal = 0; + } + else + { + c8* word = getNextWord(); + switch (t) + { + case EPLYPT_INT8: + case EPLYPT_INT16: + case EPLYPT_INT32: + retVal = atoi(word); + break; + case EPLYPT_FLOAT32: + case EPLYPT_FLOAT64: + retVal = u32(atof(word)); + break; + case EPLYPT_LIST: + case EPLYPT_UNKNOWN: + default: + retVal = 0; + } + } + return retVal; +} + + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_PLY_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.h new file mode 100644 index 0000000..d916863 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshFileLoader.h @@ -0,0 +1,148 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PLY_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_PLY_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "ISceneManager.h" +#include "CDynamicMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + +enum E_PLY_PROPERTY_TYPE +{ + EPLYPT_INT8 = 0, + EPLYPT_INT16, + EPLYPT_INT32, + EPLYPT_FLOAT32, + EPLYPT_FLOAT64, + EPLYPT_LIST, + EPLYPT_UNKNOWN +}; + +//! Meshloader capable of loading obj meshes. +class CPLYMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CPLYMeshFileLoader(scene::ISceneManager* smgr); + + //! Destructor + virtual ~CPLYMeshFileLoader(); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".ply") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + struct SPLYProperty + { + core::stringc Name; + E_PLY_PROPERTY_TYPE Type; + union + { + u8 Int8; + u16 Int16; + u32 Int32; + f32 Float32; + f64 Double; + struct SPLYListProperty + { + E_PLY_PROPERTY_TYPE CountType; + E_PLY_PROPERTY_TYPE ItemType; + } List; + + } Data; + + inline u32 size() const + { + switch(Type) + { + case EPLYPT_INT8: + return 1; + case EPLYPT_INT16: + return 2; + case EPLYPT_INT32: + case EPLYPT_FLOAT32: + return 4; + case EPLYPT_FLOAT64: + return 8; + case EPLYPT_LIST: + case EPLYPT_UNKNOWN: + default: + return 0; + } + } + + inline bool isFloat() const + { + switch(Type) + { + case EPLYPT_FLOAT32: + case EPLYPT_FLOAT64: + return true; + case EPLYPT_INT8: + case EPLYPT_INT16: + case EPLYPT_INT32: + case EPLYPT_LIST: + case EPLYPT_UNKNOWN: + default: + return false; + } + } + }; + + struct SPLYElement + { + // name of the element. We only want "vertex" and "face" elements + // but we have to parse the others anyway. + core::stringc Name; + // The number of elements in the file + u32 Count; + // Properties of this element + core::array<SPLYProperty> Properties; + // in binary files, true if this is a fixed size + bool IsFixedWidth; + // known size in bytes, 0 if unknown + u32 KnownSize; + }; + + bool allocateBuffer(); + c8* getNextLine(); + c8* getNextWord(); + void fillBuffer(); + E_PLY_PROPERTY_TYPE getPropertyType(const c8* typeString) const; + + bool readVertex(const SPLYElement &Element, scene::CDynamicMeshBuffer* mb); + bool readFace(const SPLYElement &Element, scene::CDynamicMeshBuffer* mb); + void skipElement(const SPLYElement &Element); + void skipProperty(const SPLYProperty &Property); + f32 getFloat(E_PLY_PROPERTY_TYPE t); + u32 getInt(E_PLY_PROPERTY_TYPE t); + void moveForward(u32 bytes); + + core::array<SPLYElement*> ElementList; + + scene::ISceneManager* SceneManager; + io::IReadFile *File; + c8 *Buffer; + bool IsBinaryFile, IsWrongEndian, EndOfFile; + s32 LineLength, WordLength; + c8 *StartPointer, *EndPointer, *LineEndPointer; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.cpp new file mode 100644 index 0000000..c9f05c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.cpp @@ -0,0 +1,183 @@ +// Copyright (C) 2008-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_PLY_WRITER_ + +#include "CPLYMeshWriter.h" +#include "os.h" +#include "IMesh.h" +#include "IMeshBuffer.h" +#include "IWriteFile.h" + +namespace irr +{ +namespace scene +{ + +CPLYMeshWriter::CPLYMeshWriter() +{ + #ifdef _DEBUG + setDebugName("CPLYMeshWriter"); + #endif +} + + +//! Returns the type of the mesh writer +EMESH_WRITER_TYPE CPLYMeshWriter::getType() const +{ + return EMWT_PLY; +} + +//! writes a mesh +bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + if (!file || !mesh) + return false; + + os::Printer::log("Writing mesh", file->getFileName()); + + // write PLY header + core::stringc header = + "ply\n" + "format ascii 1.0\n" + "comment Irrlicht Engine "; + header += IRRLICHT_SDK_VERSION; + + // get vertex and triangle counts + u32 VertexCount = 0; + u32 TriangleCount = 0; + + for (u32 i=0; i < mesh->getMeshBufferCount(); ++i) + { + VertexCount += mesh->getMeshBuffer(i)->getVertexCount(); + TriangleCount += mesh->getMeshBuffer(i)->getIndexCount() / 3; + } + + // vertex definition + header += "\nelement vertex "; + header += VertexCount; + + header += "\n" + "property float x\n" + "property float y\n" + "property float z\n" + "property float nx\n" + "property float ny\n" + "property float nz\n"; + // todo: writer flags for extended (r,g,b,u,v) and non-standard (alpha,u1,uv,tx,ty,tz) properties + // "property uchar red\n" + // "property uchar green\n" + // "property uchar blue\n" + // "property uchar alpha\n" + // "property float u\n" + // "property float v\n"; + // "property float u1\n + // "property float v1\n" + // "property float tx\n" + // "property float ty\n" + // "property float tz\n" + + // face definition + + header += "element face "; + header += TriangleCount; + header += "\n" + "property list uchar int vertex_indices\n" + "end_header\n"; + + // write header + file->write(header.c_str(), header.size()); + + // write vertices + + c8 outLine[1024]; + + for (u32 i=0; i < mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* mb = mesh->getMeshBuffer(i); + for (u32 j=0; j < mb->getVertexCount(); ++j) + { + const core::vector3df& pos = mb->getPosition(j); + const core::vector3df& n = mb->getNormal(j); +// const core::vector2df& tc = mb->getTCoords(j); + + u8 *buf = (u8*)mb->getVertices(); + switch(mb->getVertexType()) + { + case video::EVT_STANDARD: + buf += sizeof(video::S3DVertex)*j; + break; + case video::EVT_2TCOORDS: + buf += sizeof(video::S3DVertex2TCoords)*j; + break; + case video::EVT_TANGENTS: + buf += sizeof(video::S3DVertexTangents)*j; + break; + } +// video::SColor &col = ( (video::S3DVertex*)buf )->Color; + + // x y z nx ny nz red green blue alpha u v [u1 v1 | tx ty tz]\n + snprintf(outLine, 1024, + "%f %f %f %f %f %f\n",// %u %u %u %u %f %f\n", + pos.X, pos.Z, pos.Y, // Y and Z are flipped + n.X, n.Z, n.Y); + /*col.getRed(), col.getGreen(), col.getBlue(), col.getAlpha(), + tc.X, tc.Y);*/ + + // write the line + file->write(outLine, strlen(outLine)); + } + } + + // index of the first vertex in the current mesh buffer + u32 StartOffset = 0; + + // write triangles + for (u32 i=0; i < mesh->getMeshBufferCount(); ++i) + { + scene::IMeshBuffer* mb = mesh->getMeshBuffer(i); + for (u32 j=0; j < mb->getIndexCount(); j+=3) + { + // y and z are flipped so triangles are reversed + u32 a=StartOffset, + b=StartOffset, + c=StartOffset; + + switch(mb->getIndexType()) + { + case video::EIT_16BIT: + a += mb->getIndices()[j+0]; + c += mb->getIndices()[j+1]; + b += mb->getIndices()[j+2]; + break; + case video::EIT_32BIT: + a += ((u32*)mb->getIndices()) [j+0]; + c += ((u32*)mb->getIndices()) [j+0]; + b += ((u32*)mb->getIndices()) [j+0]; + break; + } + + // count a b c\n + snprintf(outLine, 1024, "3 %u %u %u\n", a, b, c); + // write the line + file->write(outLine, strlen(outLine)); + } + + // increment offset + StartOffset += mb->getVertexCount(); + } + + // all done! + + + return true; +} + +} // end namespace +} // end namespace + +#endif // _IRR_COMPILE_WITH_PLY_WRITER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.h new file mode 100644 index 0000000..79c2450 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CPLYMeshWriter.h @@ -0,0 +1,35 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_PLY_MESH_WRITER_H_INCLUDED__ +#define __IRR_PLY_MESH_WRITER_H_INCLUDED__ + +#include "IMeshWriter.h" + +namespace irr +{ + +namespace scene +{ + class IMeshBuffer; + + //! class to write PLY mesh files + class CPLYMeshWriter : public IMeshWriter + { + public: + + CPLYMeshWriter(); + + //! Returns the type of the mesh writer + virtual EMESH_WRITER_TYPE getType() const; + + //! writes a mesh + virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); + + }; + +} // end namespace +} // end namespace + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.cpp new file mode 100644 index 0000000..7b96842 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.cpp @@ -0,0 +1,196 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// Code contributed by skreamz + +#include "CPakReader.h" + +#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + +#include "os.h" +#include "coreutil.h" + +namespace irr +{ +namespace io +{ + +namespace +{ + +inline bool isHeaderValid(const SPAKFileHeader& header) +{ + const c8* tag = header.tag; + return tag[0] == 'P' && + tag[1] == 'A' && + tag[2] == 'C' && + tag[3] == 'K'; +} + +} // end namespace + +//! Constructor +CArchiveLoaderPAK::CArchiveLoaderPAK( io::IFileSystem* fs) +: FileSystem(fs) +{ +#ifdef _DEBUG + setDebugName("CArchiveLoaderPAK"); +#endif +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderPAK::isALoadableFileFormat(const io::path& filename) const +{ + return core::hasFileExtension(filename, "pak"); +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderPAK::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return fileType == EFAT_PAK; +} + +//! Creates an archive from the filename +/** \param file File handle to check. +\return Pointer to newly created archive, or 0 upon error. */ +IFileArchive* CArchiveLoaderPAK::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + archive = createArchive(file, ignoreCase, ignorePaths); + file->drop (); + } + + return archive; +} + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderPAK::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + if ( file ) + { + file->seek ( 0 ); + archive = new CPakReader(file, ignoreCase, ignorePaths); + } + return archive; +} + + +//! Check if the file might be loaded by this class +/** Check might look into the file. +\param file File handle to check. +\return True if file seems to be loadable. */ +bool CArchiveLoaderPAK::isALoadableFileFormat(io::IReadFile* file) const +{ + SPAKFileHeader header; + + file->read(&header, sizeof(header)); + + return isHeaderValid(header); +} + + +/*! + PAK Reader +*/ +CPakReader::CPakReader(IReadFile* file, bool ignoreCase, bool ignorePaths) +: CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file) +{ +#ifdef _DEBUG + setDebugName("CPakReader"); +#endif + + if (File) + { + File->grab(); + scanLocalHeader(); + sort(); + } +} + + +CPakReader::~CPakReader() +{ + if (File) + File->drop(); +} + + +const IFileList* CPakReader::getFileList() const +{ + return this; +} + +bool CPakReader::scanLocalHeader() +{ + SPAKFileHeader header; + + // Read and validate the header + File->read(&header, sizeof(header)); + if (!isHeaderValid(header)) + return false; + + // Seek to the table of contents +#ifdef __BIG_ENDIAN__ + header.offset = os::Byteswap::byteswap(header.offset); + header.length = os::Byteswap::byteswap(header.length); +#endif + File->seek(header.offset); + + const int numberOfFiles = header.length / sizeof(SPAKFileEntry); + + // Loop through each entry in the table of contents + for(int i = 0; i < numberOfFiles; i++) + { + // read an entry + SPAKFileEntry entry; + File->read(&entry, sizeof(entry)); + +#ifdef _DEBUG + os::Printer::log(entry.name); +#endif + +#ifdef __BIG_ENDIAN__ + entry.offset = os::Byteswap::byteswap(entry.offset); + entry.length = os::Byteswap::byteswap(entry.length); +#endif + + addItem(io::path(entry.name), entry.offset, entry.length, false ); + } + return true; +} + + +//! opens a file by file name +IReadFile* CPakReader::createAndOpenFile(const io::path& filename) +{ + s32 index = findFile(filename, false); + + if (index != -1) + return createAndOpenFile(index); + + return 0; +} + + +//! opens a file by index +IReadFile* CPakReader::createAndOpenFile(u32 index) +{ + if (index >= Files.size() ) + return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); +} + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.h new file mode 100644 index 0000000..1a8dbdd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CPakReader.h @@ -0,0 +1,125 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PAK_READER_H_INCLUDED__ +#define __C_PAK_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + +#include "IReferenceCounted.h" +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "CFileList.h" + +namespace irr +{ +namespace io +{ + //! File header containing location and size of the table of contents + struct SPAKFileHeader + { + // Don't change the order of these fields! They must match the order stored on disk. + c8 tag[4]; + u32 offset; + u32 length; + }; + + //! An entry in the PAK file's table of contents. + struct SPAKFileEntry + { + // Don't change the order of these fields! They must match the order stored on disk. + c8 name[56]; + u32 offset; + u32 length; + }; + + //! Archiveloader capable of loading PAK Archives + class CArchiveLoaderPAK : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderPAK(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".zip") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + //! Returns the type of archive created by this loader + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_PAK; } + + private: + io::IFileSystem* FileSystem; + }; + + + //! reads from pak + class CPakReader : public virtual IFileArchive, virtual CFileList + { + public: + + CPakReader(IReadFile* file, bool ignoreCase, bool ignorePaths); + virtual ~CPakReader(); + + // file archive methods + + //! return the id of the file Archive + virtual const io::path& getArchiveName() const + { + return File->getFileName(); + } + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the class Type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_PAK; } + + private: + + //! scans for a local header, returns false if the header is invalid + bool scanLocalHeader(); + + IReadFile* File; + + }; + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ + +#endif // __C_PAK_READER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp new file mode 100644 index 0000000..1f295e7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp @@ -0,0 +1,200 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleAnimatedMeshSceneNodeEmitter.h" +#include "IAnimatedMeshSceneNode.h" +#include "IMesh.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleAnimatedMeshSceneNodeEmitter::CParticleAnimatedMeshSceneNodeEmitter( + IAnimatedMeshSceneNode* node, bool useNormalDirection, + const core::vector3df& direction, f32 normalDirectionModifier, + s32 mbNumber, bool everyMeshVertex, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, const core::dimension2df& maxStartSize ) + : Node(0), AnimatedMesh(0), BaseMesh(0), TotalVertices(0), MBCount(0), MBNumber(mbNumber), + Direction(direction), NormalDirectionModifier(normalDirectionModifier), + MinParticlesPerSecond(minParticlesPerSecond), MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + MaxStartSize(maxStartSize), MinStartSize(minStartSize), + Time(0), Emitted(0), MaxAngleDegrees(maxAngleDegrees), + EveryMeshVertex(everyMeshVertex), UseNormalDirection(useNormalDirection) +{ + #ifdef _DEBUG + setDebugName("CParticleAnimatedMeshSceneNodeEmitter"); + #endif + setAnimatedMeshSceneNode(node); +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + const f32 everyWhatMillisecond = 1000.0f / perSecond; + + if(Time > everyWhatMillisecond) + { + Particles.set_used(0); + u32 amount = (u32)((Time / everyWhatMillisecond) + 0.5f); + Time = 0; + SParticle p; + + if(amount > MaxParticlesPerSecond * 2) + amount = MaxParticlesPerSecond * 2; + + // Get Mesh for this frame + IMesh* frameMesh = AnimatedMesh->getMesh( core::floor32(Node->getFrameNr()), + 255, Node->getStartFrame(), Node->getEndFrame() ); + for(u32 i=0; i<amount; ++i) + { + if( EveryMeshVertex ) + { + for( u32 j=0; j<frameMesh->getMeshBufferCount(); ++j ) + { + for( u32 k=0; k<frameMesh->getMeshBuffer(j)->getVertexCount(); ++k ) + { + p.pos = frameMesh->getMeshBuffer(j)->getPosition(k); + if( UseNormalDirection ) + p.vector = frameMesh->getMeshBuffer(j)->getNormal(k) / + NormalDirectionModifier; + else + p.vector = Direction; + + p.startTime = now; + + if( MaxAngleDegrees ) + { + core::vector3df tgt = p.vector; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + } + } + else + { + s32 randomMB = 0; + if( MBNumber < 0 ) + randomMB = os::Randomizer::rand() % MBCount; + else + randomMB = MBNumber; + + u32 vertexNumber = frameMesh->getMeshBuffer(randomMB)->getVertexCount(); + if (!vertexNumber) + continue; + vertexNumber = os::Randomizer::rand() % vertexNumber; + + p.pos = frameMesh->getMeshBuffer(randomMB)->getPosition(vertexNumber); + if( UseNormalDirection ) + p.vector = frameMesh->getMeshBuffer(randomMB)->getNormal(vertexNumber) / + NormalDirectionModifier; + else + p.vector = Direction; + + p.startTime = now; + + if( MaxAngleDegrees ) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + } + + outArray = Particles.pointer(); + + return Particles.size(); + } + + return 0; +} + + +//! Set Mesh to emit particles from +void CParticleAnimatedMeshSceneNodeEmitter::setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ) +{ + Node = node; + AnimatedMesh = 0; + BaseMesh = 0; + TotalVertices = 0; + VertexPerMeshBufferList.clear(); + if ( !node ) + { + return; + } + + AnimatedMesh = node->getMesh(); + BaseMesh = AnimatedMesh->getMesh(0); + + MBCount = BaseMesh->getMeshBufferCount(); + VertexPerMeshBufferList.reallocate(MBCount); + for( u32 i = 0; i < MBCount; ++i ) + { + VertexPerMeshBufferList.push_back( BaseMesh->getMeshBuffer(i)->getVertexCount() ); + TotalVertices += BaseMesh->getMeshBuffer(i)->getVertexCount(); + } +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h new file mode 100644 index 0000000..7ca573d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h @@ -0,0 +1,161 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ + +#include "IParticleAnimatedMeshSceneNodeEmitter.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + +//! An animated mesh emitter +class CParticleAnimatedMeshSceneNodeEmitter : public IParticleAnimatedMeshSceneNodeEmitter +{ +public: + + //! constructor + CParticleAnimatedMeshSceneNodeEmitter( + IAnimatedMeshSceneNode* node, + bool useNormalDirection = true, + const core::vector3df& direction = core::vector3df(0.0f,0.0f,-1.0f), + f32 normalDirectionModifier = 100.0f, + s32 mbNumber = -1, + bool everyMeshVertex = false, + u32 minParticlesPerSecond = 20, + u32 maxParticlesPerSecond = 40, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, + u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set Mesh to emit particles from + virtual void setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ); + + //! Set whether to use vertex normal for direction, or direction specified + virtual void setUseNormalDirection( bool useNormalDirection ) { UseNormalDirection = useNormalDirection; } + + //! Set direction the emitter emits particles + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set the amount that the normal is divided by for getting a particles direction + virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) { NormalDirectionModifier = normalDirectionModifier; } + + //! Sets whether to emit min<->max particles for every vertex per second, or to pick + //! min<->max vertices every second + virtual void setEveryMeshVertex( bool everyMeshVertex ) { EveryMeshVertex = everyMeshVertex; } + + //! Set minimum number of particles the emitter emits per second + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set maximum number of particles the emitter emits per second + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set minimum starting color for particles + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set maximum starting color for particles + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Get Mesh we're emitting particles from + virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const { return Node; } + + //! Get whether to use vertex normal for direciton, or direction specified + virtual bool isUsingNormalDirection() const { return UseNormalDirection; } + + //! Get direction the emitter emits particles + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Get the amount that the normal is divided by for getting a particles direction + virtual f32 getNormalDirectionModifier() const { return NormalDirectionModifier; } + + //! Gets whether to emit min<->max particles for every vertex per second, or to pick + //! min<->max vertices every second + virtual bool getEveryMeshVertex() const { return EveryMeshVertex; } + + //! Get the minimum number of particles the emitter emits per second + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Get the maximum number of particles the emitter emits per second + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Get the minimum starting color for particles + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Get the maximum starting color for particles + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Get the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Get the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + +private: + + IAnimatedMeshSceneNode* Node; + IAnimatedMesh* AnimatedMesh; + const IMesh* BaseMesh; + s32 TotalVertices; + u32 MBCount; + s32 MBNumber; + core::array<s32> VertexPerMeshBufferList; + + core::array<SParticle> Particles; + core::vector3df Direction; + f32 NormalDirectionModifier; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + core::dimension2df MaxStartSize, MinStartSize; + + u32 Time; + u32 Emitted; + s32 MaxAngleDegrees; + + bool EveryMeshVertex; + bool UseNormalDirection; +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __C_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.cpp new file mode 100644 index 0000000..83887c9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.cpp @@ -0,0 +1,84 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleAttractionAffector.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleAttractionAffector::CParticleAttractionAffector( + const core::vector3df& point, f32 speed, bool attract, + bool affectX, bool affectY, bool affectZ ) + : Point(point), Speed(speed), AffectX(affectX), AffectY(affectY), + AffectZ(affectZ), Attract(attract), LastTime(0) +{ + #ifdef _DEBUG + setDebugName("CParticleAttractionAffector"); + #endif +} + + +//! Affects an array of particles. +void CParticleAttractionAffector::affect(u32 now, SParticle* particlearray, u32 count) +{ + if( LastTime == 0 ) + { + LastTime = now; + return; + } + + f32 timeDelta = ( now - LastTime ) / 1000.0f; + LastTime = now; + + if( !Enabled ) + return; + + for(u32 i=0; i<count; ++i) + { + core::vector3df direction = (Point - particlearray[i].pos).normalize(); + direction *= Speed * timeDelta; + + if( !Attract ) + direction *= -1.0f; + + if( AffectX ) + particlearray[i].pos.X += direction.X; + + if( AffectY ) + particlearray[i].pos.Y += direction.Y; + + if( AffectZ ) + particlearray[i].pos.Z += direction.Z; + } +} + +//! Writes attributes of the object. +void CParticleAttractionAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Point", Point); + out->addFloat("Speed", Speed); + out->addBool("AffectX", AffectX); + out->addBool("AffectY", AffectY); + out->addBool("AffectZ", AffectZ); + out->addBool("Attract", Attract); +} + +//! Reads attributes of the object. +void CParticleAttractionAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Point = in->getAttributeAsVector3d("Point"); + Speed = in->getAttributeAsFloat("Speed"); + AffectX = in->getAttributeAsBool("AffectX"); + AffectY = in->getAttributeAsBool("AffectY"); + AffectZ = in->getAttributeAsBool("AffectZ"); + Attract = in->getAttributeAsBool("Attract"); +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.h new file mode 100644 index 0000000..0221cdf --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleAttractionAffector.h @@ -0,0 +1,87 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ +#define __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ + +#include "IParticleAttractionAffector.h" + +namespace irr +{ +namespace scene +{ + +//! Particle Affector for attracting particles to a point +class CParticleAttractionAffector : public IParticleAttractionAffector +{ +public: + + CParticleAttractionAffector( + const core::vector3df& point = core::vector3df(), f32 speed = 1.0f, + bool attract = true, bool affectX = true, + bool affectY = true, bool affectZ = true ); + + //! Affects a particle. + virtual void affect(u32 now, SParticle* particlearray, u32 count); + + //! Set the point that particles will attract to + virtual void setPoint( const core::vector3df& point ) { Point = point; } + + //! Set the speed, in game units per second that the particles will attract to + //! the specified point + virtual void setSpeed( f32 speed ) { Speed = speed; } + + //! Set whether or not the particles are attracting or detracting + virtual void setAttract( bool attract ) { Attract = attract; } + + //! Set whether or not this will affect particles in the X direction + virtual void setAffectX( bool affect ) { AffectX = affect; } + + //! Set whether or not this will affect particles in the Y direction + virtual void setAffectY( bool affect ) { AffectY = affect; } + + //! Set whether or not this will affect particles in the Z direction + virtual void setAffectZ( bool affect ) { AffectZ = affect; } + + //! Get the point that particles are attracted to + virtual const core::vector3df& getPoint() const { return Point; } + + //! Get the speed that points attract to the specified point + virtual f32 getSpeed() const { return Speed; } + + //! Get whether or not the particles are attracting or detracting + virtual bool getAttract() const { return Attract; } + + //! Get whether or not the particles X position are affected + virtual bool getAffectX() const { return AffectX; } + + //! Get whether or not the particles Y position are affected + virtual bool getAffectY() const { return AffectY; } + + //! Get whether or not the particles Z position are affected + virtual bool getAffectZ() const { return AffectZ; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + core::vector3df Point; + f32 Speed; + bool AffectX; + bool AffectY; + bool AffectZ; + bool Attract; + u32 LastTime; +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.cpp new file mode 100644 index 0000000..9728f6f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.cpp @@ -0,0 +1,188 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleBoxEmitter.h" +#include "os.h" +#include "IAttributes.h" +#include "irrMath.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleBoxEmitter::CParticleBoxEmitter( + const core::aabbox3df& box, const core::vector3df& direction, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + video::SColor minStartColor, video::SColor maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, const core::dimension2df& maxStartSize) + : Box(box), Direction(direction), + MaxStartSize(maxStartSize), MinStartSize(minStartSize), + MinParticlesPerSecond(minParticlesPerSecond), + MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + Time(0), Emitted(0), MaxAngleDegrees(maxAngleDegrees) +{ + #ifdef _DEBUG + setDebugName("CParticleBoxEmitter"); + #endif +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticleBoxEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + const f32 everyWhatMillisecond = 1000.0f / perSecond; + + if (Time > everyWhatMillisecond) + { + Particles.set_used(0); + u32 amount = (u32)((Time / everyWhatMillisecond) + 0.5f); + Time = 0; + SParticle p; + const core::vector3df& extent = Box.getExtent(); + + if (amount > MaxParticlesPerSecond*2) + amount = MaxParticlesPerSecond * 2; + + for (u32 i=0; i<amount; ++i) + { + p.pos.X = Box.MinEdge.X + os::Randomizer::frand() * extent.X; + p.pos.Y = Box.MinEdge.Y + os::Randomizer::frand() * extent.Y; + p.pos.Z = Box.MinEdge.Z + os::Randomizer::frand() * extent.Z; + + p.startTime = now; + p.vector = Direction; + + if (MaxAngleDegrees) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + + outArray = Particles.pointer(); + + return Particles.size(); + } + + return 0; +} + + +//! Writes attributes of the object. +void CParticleBoxEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + core::vector3df b = Box.getExtent(); + b *= 0.5f; + out->addVector3d("Box", b); + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); +} + + +//! Reads attributes of the object. +void CParticleBoxEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + // read data and correct input values here + + core::vector3df b = in->getAttributeAsVector3d("Box"); + + if (b.X <= 0) + b.X = 1.0f; + if (b.Y <= 0) + b.Y = 1.0f; + if (b.Z <= 0) + b.Z = 1.0f; + + Box.MinEdge.X = -b.X; + Box.MinEdge.Y = -b.Y; + Box.MinEdge.Z = -b.Z; + Box.MaxEdge.X = b.X; + Box.MaxEdge.Y = b.Y; + Box.MaxEdge.Z = b.Z; + + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); + + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.h new file mode 100644 index 0000000..e9190a9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleBoxEmitter.h @@ -0,0 +1,133 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_BOX_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_BOX_EMITTER_H_INCLUDED__ + +#include "IParticleBoxEmitter.h" +#include "irrArray.h" +#include "aabbox3d.h" + +namespace irr +{ +namespace scene +{ + +//! A default box emitter +class CParticleBoxEmitter : public IParticleBoxEmitter +{ +public: + + //! constructor + CParticleBoxEmitter( + const core::aabbox3df& box, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 20, + u32 maxParticlesPerSecond = 40, + video::SColor minStartColor = video::SColor(255,0,0,0), + video::SColor maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, + u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set direction the emitter emits particles. + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set minimum number of particles emitted per second. + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set maximum number of particles emitted per second. + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set minimum start color. + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set maximum start color. + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Set box from which the particles are emitted. + virtual void setBox( const core::aabbox3df& box ) { Box = box; } + + //! Gets direction the emitter emits particles. + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Gets minimum number of particles emitted per second. + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Gets maximum number of particles emitted per second. + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Gets minimum start color. + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Gets maximum start color. + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Gets the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Gets the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + + //! Get box from which the particles are emitted. + virtual const core::aabbox3df& getBox() const { return Box; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + core::array<SParticle> Particles; + core::aabbox3df Box; + core::vector3df Direction; + core::dimension2df MaxStartSize, MinStartSize; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + + u32 Time; + u32 Emitted; + s32 MaxAngleDegrees; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.cpp new file mode 100644 index 0000000..a2078f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.cpp @@ -0,0 +1,187 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleCylinderEmitter.h" +#include "os.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleCylinderEmitter::CParticleCylinderEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& normal, f32 length, + bool outlineOnly, const core::vector3df& direction, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) + : Center(center), Normal(normal), Direction(direction), + MaxStartSize(maxStartSize), MinStartSize(minStartSize), + MinParticlesPerSecond(minParticlesPerSecond), + MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + Radius(radius), Length(length), Time(0), Emitted(0), + MaxAngleDegrees(maxAngleDegrees), OutlineOnly(outlineOnly) +{ + #ifdef _DEBUG + setDebugName("CParticleCylinderEmitter"); + #endif +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticleCylinderEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + const f32 everyWhatMillisecond = 1000.0f / perSecond; + + if(Time > everyWhatMillisecond) + { + Particles.set_used(0); + u32 amount = (u32)((Time / everyWhatMillisecond) + 0.5f); + Time = 0; + SParticle p; + + if(amount > MaxParticlesPerSecond*2) + amount = MaxParticlesPerSecond * 2; + + for(u32 i=0; i<amount; ++i) + { + // Random distance from center if outline only is not true + const f32 distance = (!OutlineOnly) ? (os::Randomizer::frand() * Radius) : Radius; + + // Random direction from center + p.pos.set(Center.X + distance, Center.Y, Center.Z + distance); + p.pos.rotateXZBy(os::Randomizer::frand() * 360, Center); + + // Random length + const f32 length = os::Randomizer::frand() * Length; + + // Random point along the cylinders length + p.pos += Normal * length; + + p.startTime = now; + p.vector = Direction; + + if( MaxAngleDegrees ) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + + outArray = Particles.pointer(); + + return Particles.size(); + } + + return 0; +} + +//! Writes attributes of the object. +void CParticleCylinderEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Center); + out->addVector3d("Normal", Normal); + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addFloat("Radius", Radius); + out->addFloat("Length", Length); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); + out->addBool("OutlineOnly", OutlineOnly); +} + +//! Reads attributes of the object. +void CParticleCylinderEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Normal = in->getAttributeAsVector3d("Normal"); + if (Normal.getLength() == 0) + Normal.set(0,1.f,0); + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + + Radius = in->getAttributeAsFloat("Radius"); + Length = in->getAttributeAsFloat("Length"); + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); + OutlineOnly = in->getAttributeAsBool("OutlineOnly"); +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.h new file mode 100644 index 0000000..3b0fe41 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleCylinderEmitter.h @@ -0,0 +1,164 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ + +#include "IParticleCylinderEmitter.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + +//! A default box emitter +class CParticleCylinderEmitter : public IParticleCylinderEmitter +{ +public: + + //! constructor + CParticleCylinderEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& normal, f32 length, + bool outlineOnly = false, const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 20, + u32 maxParticlesPerSecond = 40, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, + u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set the center of the radius for the cylinder, at one end of the cylinder + virtual void setCenter( const core::vector3df& center ) { Center = center; } + + //! Set the normal of the cylinder + virtual void setNormal( const core::vector3df& normal ) { Normal = normal; } + + //! Set the radius of the cylinder + virtual void setRadius( f32 radius ) { Radius = radius; } + + //! Set the length of the cylinder + virtual void setLength( f32 length ) { Length = length; } + + //! Set whether or not to draw points inside the cylinder + virtual void setOutlineOnly( bool outlineOnly ) { OutlineOnly = outlineOnly; } + + //! Set direction the emitter emits particles + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set direction the emitter emits particles + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set direction the emitter emits particles + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set direction the emitter emits particles + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set direction the emitter emits particles + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Get the center of the cylinder + virtual const core::vector3df& getCenter() const { return Center; } + + //! Get the normal of the cylinder + virtual const core::vector3df& getNormal() const { return Normal; } + + //! Get the radius of the cylinder + virtual f32 getRadius() const { return Radius; } + + //! Get the center of the cylinder + virtual f32 getLength() const { return Length; } + + //! Get whether or not to draw points inside the cylinder + virtual bool getOutlineOnly() const { return OutlineOnly; } + + //! Gets direction the emitter emits particles + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Gets direction the emitter emits particles + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Gets direction the emitter emits particles + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Gets direction the emitter emits particles + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Gets direction the emitter emits particles + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Gets the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Gets the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + core::array<SParticle> Particles; + + core::vector3df Center; + core::vector3df Normal; + core::vector3df Direction; + core::dimension2df MaxStartSize, MinStartSize; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + + f32 Radius; + f32 Length; + + u32 Time; + u32 Emitted; + s32 MaxAngleDegrees; + + bool OutlineOnly; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.cpp new file mode 100644 index 0000000..b14d830 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.cpp @@ -0,0 +1,70 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleFadeOutAffector.h" +#include "IAttributes.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleFadeOutAffector::CParticleFadeOutAffector( + const video::SColor& targetColor, u32 fadeOutTime) + : IParticleFadeOutAffector(), TargetColor(targetColor) +{ + + #ifdef _DEBUG + setDebugName("CParticleFadeOutAffector"); + #endif + + FadeOutTime = fadeOutTime ? static_cast<f32>(fadeOutTime) : 1.0f; +} + + +//! Affects an array of particles. +void CParticleFadeOutAffector::affect(u32 now, SParticle* particlearray, u32 count) +{ + if (!Enabled) + return; + f32 d; + + for (u32 i=0; i<count; ++i) + { + if (particlearray[i].endTime - now < FadeOutTime) + { + d = (particlearray[i].endTime - now) / FadeOutTime; // FadeOutTime probably f32 to save casts here (just guessing) + particlearray[i].color = particlearray[i].startColor.getInterpolated( + TargetColor, d); + } + } +} + + +//! Writes attributes of the object. +//! Implement this to expose the attributes of your scene node animator for +//! scripting languages, editors, debuggers or xml serialization purposes. +void CParticleFadeOutAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addColor("TargetColor", TargetColor); + out->addFloat("FadeOutTime", FadeOutTime); +} + +//! Reads attributes of the object. +//! Implement this to set the attributes of your scene node animator for +//! scripting languages, editors, debuggers or xml deserialization purposes. +//! \param startIndex: start index where to start reading attributes. +//! \return: returns last index of an attribute read by this affector +void CParticleFadeOutAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + TargetColor = in->getAttributeAsColor("TargetColor"); + FadeOutTime = in->getAttributeAsFloat("FadeOutTime"); +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.h new file mode 100644 index 0000000..b39d559 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleFadeOutAffector.h @@ -0,0 +1,63 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ +#define __C_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ + +#include "IParticleFadeOutAffector.h" +#include "SColor.h" + +namespace irr +{ +namespace scene +{ + +//! Particle Affector for fading out a color +class CParticleFadeOutAffector : public IParticleFadeOutAffector +{ +public: + + CParticleFadeOutAffector(const video::SColor& targetColor, u32 fadeOutTime); + + //! Affects a particle. + virtual void affect(u32 now, SParticle* particlearray, u32 count); + + //! Sets the targetColor, i.e. the color the particles will interpolate + //! to over time. + virtual void setTargetColor( const video::SColor& targetColor ) { TargetColor = targetColor; } + + //! Sets the amount of time it takes for each particle to fade out. + virtual void setFadeOutTime( u32 fadeOutTime ) { FadeOutTime = fadeOutTime ? static_cast<f32>(fadeOutTime) : 1.0f; } + + //! Sets the targetColor, i.e. the color the particles will interpolate + //! to over time. + virtual const video::SColor& getTargetColor() const { return TargetColor; } + + //! Sets the amount of time it takes for each particle to fade out. + virtual u32 getFadeOutTime() const { return static_cast<u32>(FadeOutTime); } + + //! Writes attributes of the object. + //! Implement this to expose the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml serialization purposes. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + //! Implement this to set the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml deserialization purposes. + //! \param startIndex: start index where to start reading attributes. + //! \return: returns last index of an attribute read by this affector + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + video::SColor TargetColor; + f32 FadeOutTime; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.cpp new file mode 100644 index 0000000..450a5df --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.cpp @@ -0,0 +1,64 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleGravityAffector.h" +#include "os.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleGravityAffector::CParticleGravityAffector( + const core::vector3df& gravity, u32 timeForceLost) + : IParticleGravityAffector(), TimeForceLost(static_cast<f32>(timeForceLost)), Gravity(gravity) +{ + #ifdef _DEBUG + setDebugName("CParticleGravityAffector"); + #endif +} + + +//! Affects an array of particles. +void CParticleGravityAffector::affect(u32 now, SParticle* particlearray, u32 count) +{ + if (!Enabled) + return; + f32 d; + + for (u32 i=0; i<count; ++i) + { + d = (now - particlearray[i].startTime) / TimeForceLost; + if (d > 1.0f) + d = 1.0f; + if (d < 0.0f) + d = 0.0f; + d = 1.0f - d; + + particlearray[i].vector = particlearray[i].startVector.getInterpolated(Gravity, d); + } +} + +//! Writes attributes of the object. +void CParticleGravityAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Gravity", Gravity); + out->addFloat("TimeForceLost", TimeForceLost); +} + + +//! Reads attributes of the object. +void CParticleGravityAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Gravity = in->getAttributeAsVector3d("Gravity"); + TimeForceLost = in->getAttributeAsFloat("TimeForceLost"); +} + + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.h new file mode 100644 index 0000000..5491b51 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleGravityAffector.h @@ -0,0 +1,64 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ +#define __C_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ + +#include "IParticleGravityAffector.h" +#include "SColor.h" + +namespace irr +{ +namespace scene +{ + +//! Particle Affector for affecting direction of particle +class CParticleGravityAffector : public IParticleGravityAffector +{ +public: + + CParticleGravityAffector( + const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f), + u32 timeForceLost = 1000); + + //! Affects a particle. + virtual void affect(u32 now, SParticle* particlearray, u32 count); + + //! Set the time in milliseconds when the gravity force is totally + //! lost and the particle does not move any more. + virtual void setTimeForceLost( f32 timeForceLost ) { TimeForceLost = timeForceLost; } + + //! Set the direction and force of gravity. + virtual void setGravity( const core::vector3df& gravity ) { Gravity = gravity; } + + //! Set the time in milliseconds when the gravity force is totally + //! lost and the particle does not move any more. + virtual f32 getTimeForceLost() const { return TimeForceLost; } + + //! Set the direction and force of gravity. + virtual const core::vector3df& getGravity() const { return Gravity; } + + //! Writes attributes of the object. + //! Implement this to expose the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml serialization purposes. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + //! Implement this to set the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml deserialization purposes. + //! \param startIndex: start index where to start reading attributes. + //! \return: returns last index of an attribute read by this affector + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + f32 TimeForceLost; + core::vector3df Gravity; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.cpp new file mode 100644 index 0000000..74d5af1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.cpp @@ -0,0 +1,190 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CParticleMeshEmitter.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleMeshEmitter::CParticleMeshEmitter( + IMesh* mesh, bool useNormalDirection, + const core::vector3df& direction, f32 normalDirectionModifier, + s32 mbNumber, bool everyMeshVertex, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) + : Mesh(0), TotalVertices(0), MBCount(0), MBNumber(mbNumber), + NormalDirectionModifier(normalDirectionModifier), Direction(direction), + MaxStartSize(maxStartSize), MinStartSize(minStartSize), + MinParticlesPerSecond(minParticlesPerSecond), MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + Time(0), Emitted(0), MaxAngleDegrees(maxAngleDegrees), + EveryMeshVertex(everyMeshVertex), UseNormalDirection(useNormalDirection) +{ + #ifdef _DEBUG + setDebugName("CParticleMeshEmitter"); + #endif + setMesh(mesh); +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + const f32 everyWhatMillisecond = 1000.0f / perSecond; + + if(Time > everyWhatMillisecond) + { + Particles.set_used(0); + u32 amount = (u32)((Time / everyWhatMillisecond) + 0.5f); + Time = 0; + SParticle p; + + if(amount > MaxParticlesPerSecond * 2) + amount = MaxParticlesPerSecond * 2; + + for(u32 i=0; i<amount; ++i) + { + if( EveryMeshVertex ) + { + for( u32 j=0; j<Mesh->getMeshBufferCount(); ++j ) + { + for( u32 k=0; k<Mesh->getMeshBuffer(j)->getVertexCount(); ++k ) + { + p.pos = Mesh->getMeshBuffer(j)->getPosition(k); + if( UseNormalDirection ) + p.vector = Mesh->getMeshBuffer(j)->getNormal(k) / + NormalDirectionModifier; + else + p.vector = Direction; + + p.startTime = now; + + if( MaxAngleDegrees ) + { + core::vector3df tgt = p.vector; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + } + } + else + { + const s32 randomMB = (MBNumber < 0) ? (os::Randomizer::rand() % MBCount) : MBNumber; + + u32 vertexNumber = Mesh->getMeshBuffer(randomMB)->getVertexCount(); + if (!vertexNumber) + continue; + vertexNumber = os::Randomizer::rand() % vertexNumber; + + p.pos = Mesh->getMeshBuffer(randomMB)->getPosition(vertexNumber); + if( UseNormalDirection ) + p.vector = Mesh->getMeshBuffer(randomMB)->getNormal(vertexNumber) / + NormalDirectionModifier; + else + p.vector = Direction; + + p.startTime = now; + + if( MaxAngleDegrees ) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + } + + outArray = Particles.pointer(); + + return Particles.size(); + } + + return 0; +} + + +//! Set Mesh to emit particles from +void CParticleMeshEmitter::setMesh(IMesh* mesh) +{ + Mesh = mesh; + + TotalVertices = 0; + MBCount = 0; + VertexPerMeshBufferList.clear(); + + if ( !Mesh ) + return; + + MBCount = Mesh->getMeshBufferCount(); + VertexPerMeshBufferList.reallocate(MBCount); + for( u32 i = 0; i < MBCount; ++i ) + { + VertexPerMeshBufferList.push_back( Mesh->getMeshBuffer(i)->getVertexCount() ); + TotalVertices += Mesh->getMeshBuffer(i)->getVertexCount(); + } +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.h new file mode 100644 index 0000000..af00031 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleMeshEmitter.h @@ -0,0 +1,160 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_MESH_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_MESH_EMITTER_H_INCLUDED__ + +#include "IParticleMeshEmitter.h" +#include "irrArray.h" +#include "aabbox3d.h" +#include "IMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + +//! A default box emitter +class CParticleMeshEmitter : public IParticleMeshEmitter +{ +public: + + //! constructor + CParticleMeshEmitter( + IMesh* mesh, bool useNormalDirection = true, + const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), + f32 normalDirectionModifier = 100.0f, + s32 mbNumber = -1, + bool everyMeshVertex = false, + u32 minParticlesPerSecond = 20, + u32 maxParticlesPerSecond = 40, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, + u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set Mesh to emit particles from + virtual void setMesh( IMesh* mesh ); + + //! Set whether to use vertex normal for direction, or direction specified + virtual void setUseNormalDirection( bool useNormalDirection ) { UseNormalDirection = useNormalDirection; } + + //! Set direction the emitter emits particles + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set the amount that the normal is divided by for getting a particles direction + virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) { NormalDirectionModifier = normalDirectionModifier; } + + //! Sets whether to emit min<->max particles for every vertex per second, or to pick + //! min<->max vertices every second + virtual void setEveryMeshVertex( bool everyMeshVertex ) { EveryMeshVertex = everyMeshVertex; } + + //! Set minimum number of particles the emitter emits per second + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set maximum number of particles the emitter emits per second + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set minimum starting color for particles + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set maximum starting color for particles + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Get Mesh we're emitting particles from + virtual const IMesh* getMesh() const { return Mesh; } + + //! Get whether to use vertex normal for direciton, or direction specified + virtual bool isUsingNormalDirection() const { return UseNormalDirection; } + + //! Get direction the emitter emits particles + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Get the amount that the normal is divided by for getting a particles direction + virtual f32 getNormalDirectionModifier() const { return NormalDirectionModifier; } + + //! Gets whether to emit min<->max particles for every vertex per second, or to pick + //! min<->max vertices every second + virtual bool getEveryMeshVertex() const { return EveryMeshVertex; } + + //! Get the minimum number of particles the emitter emits per second + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Get the maximum number of particles the emitter emits per second + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Get the minimum starting color for particles + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Get the maximum starting color for particles + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Gets the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Gets the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + +private: + + const IMesh* Mesh; + core::array<s32> VertexPerMeshBufferList; + s32 TotalVertices; + u32 MBCount; + s32 MBNumber; + + f32 NormalDirectionModifier; + core::array<SParticle> Particles; + core::vector3df Direction; + core::dimension2df MaxStartSize, MinStartSize; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + + u32 Time; + u32 Emitted; + s32 MaxAngleDegrees; + + bool EveryMeshVertex; + bool UseNormalDirection; +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __C_PARTICLE_MESH_EMITTER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.cpp new file mode 100644 index 0000000..34dc51d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.cpp @@ -0,0 +1,147 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticlePointEmitter.h" +#include "os.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticlePointEmitter::CParticlePointEmitter( + const core::vector3df& direction, u32 minParticlesPerSecond, + u32 maxParticlesPerSecond, video::SColor minStartColor, + video::SColor maxStartColor, u32 lifeTimeMin, u32 lifeTimeMax, + s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize) + : Direction(direction), + MinStartSize(minStartSize), MaxStartSize(maxStartSize), + MinParticlesPerSecond(minParticlesPerSecond), + MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + MaxAngleDegrees(maxAngleDegrees), Time(0), Emitted(0) +{ + #ifdef _DEBUG + setDebugName("CParticlePointEmitter"); + #endif +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticlePointEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + const f32 everyWhatMillisecond = 1000.0f / perSecond; + + if (Time > everyWhatMillisecond) + { + Time = 0; + Particle.startTime = now; + Particle.vector = Direction; + + if (MaxAngleDegrees) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + Particle.vector = tgt; + } + + Particle.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + Particle.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + Particle.color=MinStartColor; + else + Particle.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + Particle.startColor = Particle.color; + Particle.startVector = Particle.vector; + + if (MinStartSize==MaxStartSize) + Particle.startSize = MinStartSize; + else + Particle.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + Particle.size = Particle.startSize; + + outArray = &Particle; + return 1; + } + + return 0; +} + + +//! Writes attributes of the object. +void CParticlePointEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); +} + +//! Reads attributes of the object. +void CParticlePointEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); + + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.h new file mode 100644 index 0000000..c83232c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticlePointEmitter.h @@ -0,0 +1,123 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_POINT_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_POINT_EMITTER_H_INCLUDED__ + +#include "IParticleEmitter.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + +//! A default point emitter +class CParticlePointEmitter : public IParticlePointEmitter +{ +public: + + //! constructor + CParticlePointEmitter( + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + video::SColor minStartColor = video::SColor(255,0,0,0), + video::SColor maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, + u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set direction the emitter emits particles. + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set minimum number of particles emitted per second. + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set maximum number of particles emitted per second. + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set minimum start color. + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set maximum start color. + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Gets direction the emitter emits particles. + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Gets minimum number of particles emitted per second. + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Gets maximum number of particles emitted per second. + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Gets minimum start color. + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Gets maximum start color. + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Gets the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Gets the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + SParticle Particle; + core::vector3df Direction; + core::dimension2df MinStartSize, MaxStartSize; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + s32 MaxAngleDegrees; + + u32 Time; + u32 Emitted; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.cpp new file mode 100644 index 0000000..5f398cd --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.cpp @@ -0,0 +1,177 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleRingEmitter.h" +#include "os.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleRingEmitter::CParticleRingEmitter( + const core::vector3df& center, f32 radius, f32 ringThickness, + const core::vector3df& direction, u32 minParticlesPerSecond, + u32 maxParticlesPerSecond, const video::SColor& minStartColor, + const video::SColor& maxStartColor, u32 lifeTimeMin, u32 lifeTimeMax, + s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) + : Center(center), Radius(radius), RingThickness(ringThickness), + Direction(direction), + MaxStartSize(maxStartSize), MinStartSize(minStartSize), + MinParticlesPerSecond(minParticlesPerSecond), + MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + Time(0), Emitted(0), MaxAngleDegrees(maxAngleDegrees) +{ + #ifdef _DEBUG + setDebugName("CParticleRingEmitter"); + #endif +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticleRingEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + f32 everyWhatMillisecond = 1000.0f / perSecond; + + if(Time > everyWhatMillisecond) + { + Particles.set_used(0); + u32 amount = (u32)((Time / everyWhatMillisecond) + 0.5f); + Time = 0; + SParticle p; + + if(amount > MaxParticlesPerSecond*2) + amount = MaxParticlesPerSecond * 2; + + for(u32 i=0; i<amount; ++i) + { + f32 distance = os::Randomizer::frand() * RingThickness * 0.5f; + if (os::Randomizer::rand() % 2) + distance -= Radius; + else + distance += Radius; + + p.pos.set(Center.X + distance, Center.Y, Center.Z + distance); + p.pos.rotateXZBy(os::Randomizer::frand() * 360, Center ); + + p.startTime = now; + p.vector = Direction; + + if(MaxAngleDegrees) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees, Center ); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees, Center ); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees, Center ); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + + outArray = Particles.pointer(); + + return Particles.size(); + } + + return 0; +} + +//! Writes attributes of the object. +void CParticleRingEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Center); + out->addFloat("Radius", Radius); + out->addFloat("RingThickness", RingThickness); + + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); +} + +//! Reads attributes of the object. +void CParticleRingEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Radius = in->getAttributeAsFloat("Radius"); + RingThickness = in->getAttributeAsFloat("RingThickness"); + + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); + + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.h new file mode 100644 index 0000000..b6c9f13 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRingEmitter.h @@ -0,0 +1,148 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_RING_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_RING_EMITTER_H_INCLUDED__ + +#include "IParticleRingEmitter.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + +//! A ring emitter +class CParticleRingEmitter : public IParticleRingEmitter +{ +public: + + //! constructor + CParticleRingEmitter( + const core::vector3df& center, f32 radius, f32 ringThickness, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 20, + u32 maxParticlesPerSecond = 40, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, + u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set direction the emitter emits particles + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set minimum number of particles the emitter emits per second + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set maximum number of particles the emitter emits per second + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set minimum starting color for particles + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set maximum starting color for particles + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Set the center of the ring + virtual void setCenter( const core::vector3df& center ) { Center = center; } + + //! Set the radius of the ring + virtual void setRadius( f32 radius ) { Radius = radius; } + + //! Set the thickness of the ring + virtual void setRingThickness( f32 ringThickness ) { RingThickness = ringThickness; } + + //! Gets direction the emitter emits particles + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Gets the minimum number of particles the emitter emits per second + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Gets the maximum number of particles the emitter emits per second + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Gets the minimum starting color for particles + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Gets the maximum starting color for particles + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Gets the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Gets the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + + //! Get the center of the ring + virtual const core::vector3df& getCenter() const { return Center; } + + //! Get the radius of the ring + virtual f32 getRadius() const { return Radius; } + + //! Get the thickness of the ring + virtual f32 getRingThickness() const { return RingThickness; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + core::array<SParticle> Particles; + + core::vector3df Center; + f32 Radius; + f32 RingThickness; + + core::vector3df Direction; + core::dimension2df MaxStartSize, MinStartSize; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + + u32 Time; + u32 Emitted; + s32 MaxAngleDegrees; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.cpp new file mode 100644 index 0000000..e59854a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.cpp @@ -0,0 +1,67 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleRotationAffector.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleRotationAffector::CParticleRotationAffector( const core::vector3df& speed, const core::vector3df& pivotPoint ) + : PivotPoint(pivotPoint), Speed(speed), LastTime(0) +{ + #ifdef _DEBUG + setDebugName("CParticleRotationAffector"); + #endif +} + + +//! Affects an array of particles. +void CParticleRotationAffector::affect(u32 now, SParticle* particlearray, u32 count) +{ + if( LastTime == 0 ) + { + LastTime = now; + return; + } + + f32 timeDelta = ( now - LastTime ) / 1000.0f; + LastTime = now; + + if( !Enabled ) + return; + + for(u32 i=0; i<count; ++i) + { + if( Speed.X != 0.0f ) + particlearray[i].pos.rotateYZBy( timeDelta * Speed.X, PivotPoint ); + + if( Speed.Y != 0.0f ) + particlearray[i].pos.rotateXZBy( timeDelta * Speed.Y, PivotPoint ); + + if( Speed.Z != 0.0f ) + particlearray[i].pos.rotateXYBy( timeDelta * Speed.Z, PivotPoint ); + } +} + +//! Writes attributes of the object. +void CParticleRotationAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("PivotPoint", PivotPoint); + out->addVector3d("Speed", Speed); +} + +//! Reads attributes of the object. +void CParticleRotationAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + PivotPoint = in->getAttributeAsVector3d("PivotPoint"); + Speed = in->getAttributeAsVector3d("Speed"); +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h new file mode 100644 index 0000000..8db5752 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleRotationAffector.h @@ -0,0 +1,56 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ +#define __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ + +#include "IParticleRotationAffector.h" + +namespace irr +{ +namespace scene +{ + +//! Particle Affector for rotating particles about a point +class CParticleRotationAffector : public IParticleRotationAffector +{ +public: + + CParticleRotationAffector( const core::vector3df& speed = core::vector3df(5.0f, 5.0f, 5.0f), + const core::vector3df& point = core::vector3df() ); + + //! Affects a particle. + virtual void affect(u32 now, SParticle* particlearray, u32 count); + + //! Set the point that particles will attract to + virtual void setPivotPoint( const core::vector3df& point ) { PivotPoint = point; } + + //! Set the speed in degrees per second + virtual void setSpeed( const core::vector3df& speed ) { Speed = speed; } + + //! Get the point that particles are attracted to + virtual const core::vector3df& getPivotPoint() const { return PivotPoint; } + + //! Get the speed in degrees per second + virtual const core::vector3df& getSpeed() const { return Speed; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + core::vector3df PivotPoint; + core::vector3df Speed; + u32 LastTime; +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.cpp new file mode 100644 index 0000000..1817bcf --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.cpp @@ -0,0 +1,53 @@ +// Copyright (C) 2010-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleScaleAffector.h" +#include "IAttributes.h" + +namespace irr +{ + namespace scene + { + CParticleScaleAffector::CParticleScaleAffector(const core::dimension2df& scaleTo) + : ScaleTo(scaleTo) + { + #ifdef _DEBUG + setDebugName("CParticleScaleAffector"); + #endif + } + + + void CParticleScaleAffector::affect (u32 now, SParticle *particlearray, u32 count) + { + for(u32 i=0;i<count;i++) + { + const u32 maxdiff = particlearray[i].endTime - particlearray[i].startTime; + const u32 curdiff = now - particlearray[i].startTime; + const f32 newscale = (f32)curdiff/maxdiff; + particlearray[i].size = particlearray[i].startSize+ScaleTo*newscale; + } + } + + + void CParticleScaleAffector::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const + { + out->addFloat("ScaleToWidth", ScaleTo.Width); + out->addFloat("ScaleToHeight", ScaleTo.Height); + } + + + void CParticleScaleAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) + { + ScaleTo.Width = in->getAttributeAsFloat("ScaleToWidth"); + ScaleTo.Height = in->getAttributeAsFloat("ScaleToHeight"); + } + + + E_PARTICLE_AFFECTOR_TYPE CParticleScaleAffector::getType() const + { + return scene::EPAT_SCALE; + } + } +} + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.h new file mode 100644 index 0000000..8bd4c42 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleScaleAffector.h @@ -0,0 +1,44 @@ +// Copyright (C) 2010-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef C_PARTICLE_SCALE_AFFECTOR_H +#define C_PARTICLE_SCALE_AFFECTOR_H + +#include <IParticleAffector.h> + +namespace irr +{ + namespace scene + { + class CParticleScaleAffector : public IParticleAffector + { + public: + CParticleScaleAffector(const core::dimension2df& scaleTo = core::dimension2df(1.0f, 1.0f)); + + virtual void affect(u32 now, SParticle *particlearray, u32 count); + + //! Writes attributes of the object. + //! Implement this to expose the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml serialization purposes. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + //! Implement this to set the attributes of your scene node animator for + //! scripting languages, editors, debuggers or xml deserialization purposes. + //! \param startIndex: start index where to start reading attributes. + //! \return: returns last index of an attribute read by this affector + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + //! Get emitter type + virtual E_PARTICLE_AFFECTOR_TYPE getType() const; + + protected: + core::dimension2df ScaleTo; + }; + } +} + + +#endif // C_PARTICLE_SCALE_AFFECTOR_H + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.cpp new file mode 100644 index 0000000..42e4e52 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.cpp @@ -0,0 +1,175 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CParticleSphereEmitter.h" +#include "os.h" +#include "IAttributes.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleSphereEmitter::CParticleSphereEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& direction, u32 minParticlesPerSecond, + u32 maxParticlesPerSecond, const video::SColor& minStartColor, + const video::SColor& maxStartColor, u32 lifeTimeMin, u32 lifeTimeMax, + s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) + : Center(center), Radius(radius), Direction(direction), + MinStartSize(minStartSize), MaxStartSize(maxStartSize), + MinParticlesPerSecond(minParticlesPerSecond), + MaxParticlesPerSecond(maxParticlesPerSecond), + MinStartColor(minStartColor), MaxStartColor(maxStartColor), + MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax), + Time(0), Emitted(0), MaxAngleDegrees(maxAngleDegrees) +{ + #ifdef _DEBUG + setDebugName("CParticleSphereEmitter"); + #endif + +} + + +//! Prepares an array with new particles to emitt into the system +//! and returns how much new particles there are. +s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) +{ + Time += timeSinceLastCall; + + const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; + const f32 everyWhatMillisecond = 1000.0f / perSecond; + + if(Time > everyWhatMillisecond) + { + Particles.set_used(0); + u32 amount = (u32)((Time / everyWhatMillisecond) + 0.5f); + Time = 0; + SParticle p; + + if(amount > MaxParticlesPerSecond*2) + amount = MaxParticlesPerSecond * 2; + + for(u32 i=0; i<amount; ++i) + { + // Random distance from center + const f32 distance = os::Randomizer::frand() * Radius; + + // Random direction from center + p.pos.set(Center + distance); + p.pos.rotateXYBy(os::Randomizer::frand() * 360.f, Center ); + p.pos.rotateYZBy(os::Randomizer::frand() * 360.f, Center ); + p.pos.rotateXZBy(os::Randomizer::frand() * 360.f, Center ); + + p.startTime = now; + p.vector = Direction; + + if(MaxAngleDegrees) + { + core::vector3df tgt = Direction; + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); + p.vector = tgt; + } + + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); + + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); + + p.startColor = p.color; + p.startVector = p.vector; + + if (MinStartSize==MaxStartSize) + p.startSize = MinStartSize; + else + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); + p.size = p.startSize; + + Particles.push_back(p); + } + + outArray = Particles.pointer(); + + return Particles.size(); + } + + return 0; +} + +//! Writes attributes of the object. +void CParticleSphereEmitter::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Direction); + out->addFloat("Radius", Radius); + + out->addVector3d("Direction", Direction); + out->addFloat("MinStartSizeWidth", MinStartSize.Width); + out->addFloat("MinStartSizeHeight", MinStartSize.Height); + out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); + out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); + out->addColor("MinStartColor", MinStartColor); + out->addColor("MaxStartColor", MaxStartColor); + out->addInt("MinLifeTime", MinLifeTime); + out->addInt("MaxLifeTime", MaxLifeTime); + out->addInt("MaxAngleDegrees", MaxAngleDegrees); +} + +//! Reads attributes of the object. +void CParticleSphereEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Radius = in->getAttributeAsFloat("Radius"); + + Direction = in->getAttributeAsVector3d("Direction"); + if (Direction.getLength() == 0) + Direction.set(0,0.01f,0); + + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); + MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); + MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); + + MinParticlesPerSecond = core::max_(1u, MinParticlesPerSecond); + MaxParticlesPerSecond = core::max_(MaxParticlesPerSecond, 1u); + MaxParticlesPerSecond = core::min_(MaxParticlesPerSecond, 200u); + MinParticlesPerSecond = core::min_(MinParticlesPerSecond, MaxParticlesPerSecond); + + MinStartColor = in->getAttributeAsColor("MinStartColor"); + MaxStartColor = in->getAttributeAsColor("MaxStartColor"); + MinLifeTime = in->getAttributeAsInt("MinLifeTime"); + MaxLifeTime = in->getAttributeAsInt("MaxLifeTime"); + MinLifeTime = core::max_(0u, MinLifeTime); + MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); + MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); + + MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.h new file mode 100644 index 0000000..59736ec --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSphereEmitter.h @@ -0,0 +1,141 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_SPHERE_EMITTER_H_INCLUDED__ +#define __C_PARTICLE_SPHERE_EMITTER_H_INCLUDED__ + +#include "IParticleSphereEmitter.h" +#include "irrArray.h" +#include "aabbox3d.h" + +namespace irr +{ +namespace scene +{ + +//! A default box emitter +class CParticleSphereEmitter : public IParticleSphereEmitter +{ +public: + + //! constructor + CParticleSphereEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 20, + u32 maxParticlesPerSecond = 40, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, + u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Prepares an array with new particles to emitt into the system + //! and returns how much new particles there are. + virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); + + //! Set direction the emitter emits particles + virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } + + //! Set minimum number of particles per second. + virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } + + //! Set maximum number of particles per second. + virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } + + //! Set minimum start color + virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } + + //! Set maximum start color + virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } + + //! Set the maximum starting size for particles + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } + + //! Set the minimum starting size for particles + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + + //! Set the center of the sphere for particle emissions + virtual void setCenter( const core::vector3df& center ) { Center = center; } + + //! Set the radius of the sphere for particle emissions + virtual void setRadius( f32 radius ) { Radius = radius; } + + //! Gets direction the emitter emits particles + virtual const core::vector3df& getDirection() const { return Direction; } + + //! Get minimum number of particles per second. + virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } + + //! Get maximum number of particles per second. + virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } + + //! Get minimum start color + virtual const video::SColor& getMinStartColor() const { return MinStartColor; } + + //! Get maximum start color + virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } + + //! Gets the maximum starting size for particles + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } + + //! Gets the minimum starting size for particles + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } + + //! Get the center of the sphere for particle emissions + virtual const core::vector3df& getCenter() const { return Center; } + + //! Get the radius of the sphere for particle emissions + virtual f32 getRadius() const { return Radius; } + + //! Writes attributes of the object. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the object. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + +private: + + core::array<SParticle> Particles; + + core::vector3df Center; + f32 Radius; + core::vector3df Direction; + + core::dimension2df MinStartSize, MaxStartSize; + u32 MinParticlesPerSecond, MaxParticlesPerSecond; + video::SColor MinStartColor, MaxStartColor; + u32 MinLifeTime, MaxLifeTime; + + u32 Time; + u32 Emitted; + s32 MaxAngleDegrees; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.cpp new file mode 100644 index 0000000..54bfcc7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.cpp @@ -0,0 +1,721 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CParticleSystemSceneNode.h" +#include "os.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" +#include "IVideoDriver.h" + +#include "CParticleAnimatedMeshSceneNodeEmitter.h" +#include "CParticleBoxEmitter.h" +#include "CParticleCylinderEmitter.h" +#include "CParticleMeshEmitter.h" +#include "CParticlePointEmitter.h" +#include "CParticleRingEmitter.h" +#include "CParticleSphereEmitter.h" +#include "CParticleAttractionAffector.h" +#include "CParticleFadeOutAffector.h" +#include "CParticleGravityAffector.h" +#include "CParticleRotationAffector.h" +#include "CParticleScaleAffector.h" +#include "SViewFrustum.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CParticleSystemSceneNode::CParticleSystemSceneNode(bool createDefaultEmitter, + ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::vector3df& rotation, + const core::vector3df& scale) + : IParticleSystemSceneNode(parent, mgr, id, position, rotation, scale), + Emitter(0), ParticleSize(core::dimension2d<f32>(5.0f, 5.0f)), LastEmitTime(0), + MaxParticles(0xffff), Buffer(0), ParticlesAreGlobal(true) +{ + #ifdef _DEBUG + setDebugName("CParticleSystemSceneNode"); + #endif + + Buffer = new SMeshBuffer(); + if (createDefaultEmitter) + { + IParticleEmitter* e = createBoxEmitter(); + setEmitter(e); + e->drop(); + } +} + + +//! destructor +CParticleSystemSceneNode::~CParticleSystemSceneNode() +{ + if (Emitter) + Emitter->drop(); + if (Buffer) + Buffer->drop(); + + removeAllAffectors(); +} + + +//! Gets the particle emitter, which creates the particles. +IParticleEmitter* CParticleSystemSceneNode::getEmitter() +{ + return Emitter; +} + + +//! Sets the particle emitter, which creates the particles. +void CParticleSystemSceneNode::setEmitter(IParticleEmitter* emitter) +{ + if (emitter == Emitter) + return; + if (Emitter) + Emitter->drop(); + + Emitter = emitter; + + if (Emitter) + Emitter->grab(); +} + + +//! Adds new particle effector to the particle system. +void CParticleSystemSceneNode::addAffector(IParticleAffector* affector) +{ + affector->grab(); + AffectorList.push_back(affector); +} + +//! Get a list of all particle affectors. +const core::list<IParticleAffector*>& CParticleSystemSceneNode::getAffectors() const +{ + return AffectorList; +} + +//! Removes all particle affectors in the particle system. +void CParticleSystemSceneNode::removeAllAffectors() +{ + core::list<IParticleAffector*>::Iterator it = AffectorList.begin(); + while (it != AffectorList.end()) + { + (*it)->drop(); + it = AffectorList.erase(it); + } +} + + +//! Returns the material based on the zero based index i. +video::SMaterial& CParticleSystemSceneNode::getMaterial(u32 i) +{ + return Buffer->Material; +} + + +//! Returns amount of materials used by this scene node. +u32 CParticleSystemSceneNode::getMaterialCount() const +{ + return 1; +} + + +//! Creates a particle emitter for an animated mesh scene node +IParticleAnimatedMeshSceneNodeEmitter* +CParticleSystemSceneNode::createAnimatedMeshSceneNodeEmitter( + scene::IAnimatedMeshSceneNode* node, bool useNormalDirection, + const core::vector3df& direction, f32 normalDirectionModifier, + s32 mbNumber, bool everyMeshVertex, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) +{ + return new CParticleAnimatedMeshSceneNodeEmitter( node, + useNormalDirection, direction, normalDirectionModifier, + mbNumber, everyMeshVertex, + minParticlesPerSecond, maxParticlesPerSecond, + minStartColor, maxStartColor, + lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a box particle emitter. +IParticleBoxEmitter* CParticleSystemSceneNode::createBoxEmitter( + const core::aabbox3df& box, const core::vector3df& direction, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, + s32 maxAngleDegrees, const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) +{ + return new CParticleBoxEmitter(box, direction, minParticlesPerSecond, + maxParticlesPerSecond, minStartColor, maxStartColor, + lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a particle emitter for emitting from a cylinder +IParticleCylinderEmitter* CParticleSystemSceneNode::createCylinderEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& normal, f32 length, + bool outlineOnly, const core::vector3df& direction, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) +{ + return new CParticleCylinderEmitter( center, radius, normal, length, + outlineOnly, direction, + minParticlesPerSecond, maxParticlesPerSecond, + minStartColor, maxStartColor, + lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a mesh particle emitter. +IParticleMeshEmitter* CParticleSystemSceneNode::createMeshEmitter( + scene::IMesh* mesh, bool useNormalDirection, + const core::vector3df& direction, f32 normalDirectionModifier, + s32 mbNumber, bool everyMeshVertex, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize) +{ + return new CParticleMeshEmitter( mesh, useNormalDirection, direction, + normalDirectionModifier, mbNumber, everyMeshVertex, + minParticlesPerSecond, maxParticlesPerSecond, + minStartColor, maxStartColor, + lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a point particle emitter. +IParticlePointEmitter* CParticleSystemSceneNode::createPointEmitter( + const core::vector3df& direction, u32 minParticlesPerSecond, + u32 maxParticlesPerSecond, const video::SColor& minStartColor, + const video::SColor& maxStartColor, u32 lifeTimeMin, u32 lifeTimeMax, + s32 maxAngleDegrees, const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) +{ + return new CParticlePointEmitter(direction, minParticlesPerSecond, + maxParticlesPerSecond, minStartColor, maxStartColor, + lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a ring particle emitter. +IParticleRingEmitter* CParticleSystemSceneNode::createRingEmitter( + const core::vector3df& center, f32 radius, f32 ringThickness, + const core::vector3df& direction, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, s32 maxAngleDegrees, + const core::dimension2df& minStartSize, const core::dimension2df& maxStartSize ) +{ + return new CParticleRingEmitter( center, radius, ringThickness, direction, + minParticlesPerSecond, maxParticlesPerSecond, minStartColor, + maxStartColor, lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a sphere particle emitter. +IParticleSphereEmitter* CParticleSystemSceneNode::createSphereEmitter( + const core::vector3df& center, f32 radius, const core::vector3df& direction, + u32 minParticlesPerSecond, u32 maxParticlesPerSecond, + const video::SColor& minStartColor, const video::SColor& maxStartColor, + u32 lifeTimeMin, u32 lifeTimeMax, + s32 maxAngleDegrees, const core::dimension2df& minStartSize, + const core::dimension2df& maxStartSize ) +{ + return new CParticleSphereEmitter(center, radius, direction, + minParticlesPerSecond, maxParticlesPerSecond, + minStartColor, maxStartColor, + lifeTimeMin, lifeTimeMax, maxAngleDegrees, + minStartSize, maxStartSize ); +} + + +//! Creates a point attraction affector. This affector modifies the positions of the +//! particles and attracts them to a specified point at a specified speed per second. +IParticleAttractionAffector* CParticleSystemSceneNode::createAttractionAffector( + const core::vector3df& point, f32 speed, bool attract, + bool affectX, bool affectY, bool affectZ ) +{ + return new CParticleAttractionAffector( point, speed, attract, affectX, affectY, affectZ ); +} + +//! Creates a scale particle affector. +IParticleAffector* CParticleSystemSceneNode::createScaleParticleAffector(const core::dimension2df& scaleTo) +{ + return new CParticleScaleAffector(scaleTo); +} + + +//! Creates a fade out particle affector. +IParticleFadeOutAffector* CParticleSystemSceneNode::createFadeOutParticleAffector( + const video::SColor& targetColor, u32 timeNeededToFadeOut) +{ + return new CParticleFadeOutAffector(targetColor, timeNeededToFadeOut); +} + + +//! Creates a gravity affector. +IParticleGravityAffector* CParticleSystemSceneNode::createGravityAffector( + const core::vector3df& gravity, u32 timeForceLost) +{ + return new CParticleGravityAffector(gravity, timeForceLost); +} + + +//! Creates a rotation affector. This affector rotates the particles around a specified pivot +//! point. The speed represents Degrees of rotation per second. +IParticleRotationAffector* CParticleSystemSceneNode::createRotationAffector( + const core::vector3df& speed, const core::vector3df& pivotPoint ) +{ + return new CParticleRotationAffector( speed, pivotPoint ); +} + + +//! pre render event +void CParticleSystemSceneNode::OnRegisterSceneNode() +{ + doParticleSystem(os::Timer::getTime()); + + if (IsVisible && (Particles.size() != 0)) + { + SceneManager->registerNodeForRendering(this); + ISceneNode::OnRegisterSceneNode(); + } +} + + +//! render +void CParticleSystemSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + ICameraSceneNode* camera = SceneManager->getActiveCamera(); + + if (!camera || !driver) + return; + + +#if 0 + // calculate vectors for letting particles look to camera + core::vector3df view(camera->getTarget() - camera->getAbsolutePosition()); + view.normalize(); + + view *= -1.0f; + +#else + + const core::matrix4 &m = camera->getViewFrustum()->getTransform( video::ETS_VIEW ); + + const core::vector3df view ( -m[2], -m[6] , -m[10] ); + +#endif + + // reallocate arrays, if they are too small + reallocateBuffers(); + + // create particle vertex data + s32 idx = 0; + for (u32 i=0; i<Particles.size(); ++i) + { + const SParticle& particle = Particles[i]; + + #if 0 + core::vector3df horizontal = camera->getUpVector().crossProduct(view); + horizontal.normalize(); + horizontal *= 0.5f * particle.size.Width; + + core::vector3df vertical = horizontal.crossProduct(view); + vertical.normalize(); + vertical *= 0.5f * particle.size.Height; + + #else + f32 f; + + f = 0.5f * particle.size.Width; + const core::vector3df horizontal ( m[0] * f, m[4] * f, m[8] * f ); + + f = -0.5f * particle.size.Height; + const core::vector3df vertical ( m[1] * f, m[5] * f, m[9] * f ); + #endif + + Buffer->Vertices[0+idx].Pos = particle.pos + horizontal + vertical; + Buffer->Vertices[0+idx].Color = particle.color; + Buffer->Vertices[0+idx].Normal = view; + + Buffer->Vertices[1+idx].Pos = particle.pos + horizontal - vertical; + Buffer->Vertices[1+idx].Color = particle.color; + Buffer->Vertices[1+idx].Normal = view; + + Buffer->Vertices[2+idx].Pos = particle.pos - horizontal - vertical; + Buffer->Vertices[2+idx].Color = particle.color; + Buffer->Vertices[2+idx].Normal = view; + + Buffer->Vertices[3+idx].Pos = particle.pos - horizontal + vertical; + Buffer->Vertices[3+idx].Color = particle.color; + Buffer->Vertices[3+idx].Normal = view; + + idx +=4; + } + + // render all + core::matrix4 mat; + if (!ParticlesAreGlobal) + mat.setTranslation(AbsoluteTransformation.getTranslation()); + driver->setTransform(video::ETS_WORLD, mat); + + driver->setMaterial(Buffer->Material); + + driver->drawVertexPrimitiveList(Buffer->getVertices(), Particles.size()*4, + Buffer->getIndices(), Particles.size()*2, video::EVT_STANDARD, EPT_TRIANGLES,Buffer->getIndexType()); + + // for debug purposes only: + if ( DebugDataVisible & scene::EDS_BBOX ) + { + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + video::SMaterial deb_m; + deb_m.Lighting = false; + driver->setMaterial(deb_m); + driver->draw3DBox(Buffer->BoundingBox, video::SColor(0,255,255,255)); + } +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CParticleSystemSceneNode::getBoundingBox() const +{ + return Buffer->getBoundingBox(); +} + + +void CParticleSystemSceneNode::doParticleSystem(u32 time) +{ + if (LastEmitTime==0) + { + LastEmitTime = time; + return; + } + + u32 now = time; + u32 timediff = time - LastEmitTime; + LastEmitTime = time; + + // run emitter + + if (Emitter && IsVisible) + { + SParticle* array = 0; + s32 newParticles = Emitter->emitt(now, timediff, array); + + if (newParticles && array) + { + s32 j=Particles.size(); + if (newParticles > 16250-j) + newParticles=16250-j; + Particles.set_used(j+newParticles); + for (s32 i=j; i<j+newParticles; ++i) + { + Particles[i]=array[i-j]; + AbsoluteTransformation.rotateVect(Particles[i].startVector); + if (ParticlesAreGlobal) + AbsoluteTransformation.transformVect(Particles[i].pos); + } + } + } + + // run affectors + core::list<IParticleAffector*>::Iterator ait = AffectorList.begin(); + for (; ait != AffectorList.end(); ++ait) + (*ait)->affect(now, Particles.pointer(), Particles.size()); + + if (ParticlesAreGlobal) + Buffer->BoundingBox.reset(AbsoluteTransformation.getTranslation()); + else + Buffer->BoundingBox.reset(core::vector3df(0,0,0)); + + // animate all particles + f32 scale = (f32)timediff; + + for (u32 i=0; i<Particles.size();) + { + // erase is pretty expensive! + if (now > Particles[i].endTime) + { + // Particle order does not seem to matter. + // So we can delete by switching with last particle and deleting that one. + // This is a lot faster and speed is very important here as the erase otherwise + // can cause noticable freezes. + Particles[i] = Particles[Particles.size()-1]; + Particles.erase( Particles.size()-1 ); + } + else + { + Particles[i].pos += (Particles[i].vector * scale); + Buffer->BoundingBox.addInternalPoint(Particles[i].pos); + ++i; + } + } + + const f32 m = (ParticleSize.Width > ParticleSize.Height ? ParticleSize.Width : ParticleSize.Height) * 0.5f; + Buffer->BoundingBox.MaxEdge.X += m; + Buffer->BoundingBox.MaxEdge.Y += m; + Buffer->BoundingBox.MaxEdge.Z += m; + + Buffer->BoundingBox.MinEdge.X -= m; + Buffer->BoundingBox.MinEdge.Y -= m; + Buffer->BoundingBox.MinEdge.Z -= m; + + if (ParticlesAreGlobal) + { + core::matrix4 absinv( AbsoluteTransformation, core::matrix4::EM4CONST_INVERSE ); + absinv.transformBoxEx(Buffer->BoundingBox); + } +} + + +//! Sets if the particles should be global. If it is, the particles are affected by +//! the movement of the particle system scene node too, otherwise they completely +//! ignore it. Default is true. +void CParticleSystemSceneNode::setParticlesAreGlobal(bool global) +{ + ParticlesAreGlobal = global; +} + +//! Remove all currently visible particles +void CParticleSystemSceneNode::clearParticles() +{ + Particles.set_used(0); +} + +//! Sets the size of all particles. +void CParticleSystemSceneNode::setParticleSize(const core::dimension2d<f32> &size) +{ + os::Printer::log("setParticleSize is deprecated, use setMinStartSize/setMaxStartSize in emitter.", irr::ELL_WARNING); + //A bit of a hack, but better here than in the particle code + if (Emitter) + { + Emitter->setMinStartSize(size); + Emitter->setMaxStartSize(size); + } + ParticleSize = size; +} + + +void CParticleSystemSceneNode::reallocateBuffers() +{ + if (Particles.size() * 4 > Buffer->getVertexCount() || + Particles.size() * 6 > Buffer->getIndexCount()) + { + u32 oldSize = Buffer->getVertexCount(); + Buffer->Vertices.set_used(Particles.size() * 4); + + u32 i; + + // fill remaining vertices + for (i=oldSize; i<Buffer->Vertices.size(); i+=4) + { + Buffer->Vertices[0+i].TCoords.set(0.0f, 0.0f); + Buffer->Vertices[1+i].TCoords.set(0.0f, 1.0f); + Buffer->Vertices[2+i].TCoords.set(1.0f, 1.0f); + Buffer->Vertices[3+i].TCoords.set(1.0f, 0.0f); + } + + // fill remaining indices + u32 oldIdxSize = Buffer->getIndexCount(); + u32 oldvertices = oldSize; + Buffer->Indices.set_used(Particles.size() * 6); + + for (i=oldIdxSize; i<Buffer->Indices.size(); i+=6) + { + Buffer->Indices[0+i] = (u16)0+oldvertices; + Buffer->Indices[1+i] = (u16)2+oldvertices; + Buffer->Indices[2+i] = (u16)1+oldvertices; + Buffer->Indices[3+i] = (u16)0+oldvertices; + Buffer->Indices[4+i] = (u16)3+oldvertices; + Buffer->Indices[5+i] = (u16)2+oldvertices; + oldvertices += 4; + } + } +} + + +//! Writes attributes of the scene node. +void CParticleSystemSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + IParticleSystemSceneNode::serializeAttributes(out, options); + + out->addBool("GlobalParticles", ParticlesAreGlobal); + out->addFloat("ParticleWidth", ParticleSize.Width); + out->addFloat("ParticleHeight", ParticleSize.Height); + + // write emitter + + E_PARTICLE_EMITTER_TYPE type = EPET_COUNT; + if (Emitter) + type = Emitter->getType(); + + out->addEnum("Emitter", (s32)type, ParticleEmitterTypeNames); + + if (Emitter) + Emitter->serializeAttributes(out, options); + + // write affectors + + E_PARTICLE_AFFECTOR_TYPE atype = EPAT_NONE; + + for (core::list<IParticleAffector*>::ConstIterator it = AffectorList.begin(); + it != AffectorList.end(); ++it) + { + atype = (*it)->getType(); + + out->addEnum("Affector", (s32)atype, ParticleAffectorTypeNames); + + (*it)->serializeAttributes(out); + } + + // add empty affector to make it possible to add further affectors + + if (options && options->Flags & io::EARWF_FOR_EDITOR) + out->addEnum("Affector", EPAT_NONE, ParticleAffectorTypeNames); +} + + +//! Reads attributes of the scene node. +void CParticleSystemSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + IParticleSystemSceneNode::deserializeAttributes(in, options); + + ParticlesAreGlobal = in->getAttributeAsBool("GlobalParticles"); + ParticleSize.Width = in->getAttributeAsFloat("ParticleWidth"); + ParticleSize.Height = in->getAttributeAsFloat("ParticleHeight"); + + // read emitter + + int emitterIdx = in->findAttribute("Emitter"); + if (emitterIdx == -1) + return; + + if (Emitter) + Emitter->drop(); + Emitter = 0; + + E_PARTICLE_EMITTER_TYPE type = (E_PARTICLE_EMITTER_TYPE) + in->getAttributeAsEnumeration("Emitter", ParticleEmitterTypeNames); + + switch(type) + { + case EPET_POINT: + Emitter = createPointEmitter(); + break; + case EPET_ANIMATED_MESH: + Emitter = createAnimatedMeshSceneNodeEmitter(NULL); // we can't set the node - the user will have to do this + break; + case EPET_BOX: + Emitter = createBoxEmitter(); + break; + case EPET_CYLINDER: + Emitter = createCylinderEmitter(core::vector3df(0,0,0), 10.f, core::vector3df(0,1,0), 10.f); // (values here don't matter) + break; + case EPET_MESH: + Emitter = createMeshEmitter(NULL); // we can't set the mesh - the user will have to do this + break; + case EPET_RING: + Emitter = createRingEmitter(core::vector3df(0,0,0), 10.f, 10.f); // (values here don't matter) + break; + case EPET_SPHERE: + Emitter = createSphereEmitter(core::vector3df(0,0,0), 10.f); // (values here don't matter) + break; + default: + break; + } + + u32 idx = 0; + +#if 0 + if (Emitter) + idx = Emitter->deserializeAttributes(idx, in); + + ++idx; +#else + if (Emitter) + Emitter->deserializeAttributes(in); +#endif + + // read affectors + + removeAllAffectors(); + u32 cnt = in->getAttributeCount(); + + while(idx < cnt) + { + const char* name = in->getAttributeName(idx); + + if (!name || strcmp("Affector", name)) + return; + + E_PARTICLE_AFFECTOR_TYPE atype = + (E_PARTICLE_AFFECTOR_TYPE)in->getAttributeAsEnumeration(idx, ParticleAffectorTypeNames); + + IParticleAffector* aff = 0; + + switch(atype) + { + case EPAT_ATTRACT: + aff = createAttractionAffector(core::vector3df(0,0,0)); + break; + case EPAT_FADE_OUT: + aff = createFadeOutParticleAffector(); + break; + case EPAT_GRAVITY: + aff = createGravityAffector(); + break; + case EPAT_ROTATE: + aff = createRotationAffector(); + break; + case EPAT_SCALE: + aff = createScaleParticleAffector(); + break; + case EPAT_NONE: + default: + break; + } + + ++idx; + + if (aff) + { +#if 0 + idx = aff->deserializeAttributes(idx, in, options); + ++idx; +#else + aff->deserializeAttributes(in, options); +#endif + + addAffector(aff); + aff->drop(); + } + } +} + + +} // end namespace scene +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.h new file mode 100644 index 0000000..24ae48c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CParticleSystemSceneNode.h @@ -0,0 +1,239 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__ +#define __C_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__ + +#include "IParticleSystemSceneNode.h" +#include "irrArray.h" +#include "irrList.h" +#include "SMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + +//! A particle system scene node. +/** A scene node controlling a particle system. The behavior of the particles +can be controlled by setting the right particle emitters and affectors. +*/ +class CParticleSystemSceneNode : public IParticleSystemSceneNode +{ +public: + + //! constructor + CParticleSystemSceneNode(bool createDefaultEmitter, + ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, + const core::vector3df& rotation, + const core::vector3df& scale); + + //! destructor + virtual ~CParticleSystemSceneNode(); + + //! Gets the particle emitter, which creates the particles. + virtual IParticleEmitter* getEmitter(); + + //! Sets the particle emitter, which creates the particles. + virtual void setEmitter(IParticleEmitter* emitter); + + //! Adds new particle affector to the particle system. + virtual void addAffector(IParticleAffector* affector); + + //! Get a list of all particle affectors. + virtual const core::list<IParticleAffector*>& getAffectors() const; + + //! Removes all particle affectors in the particle system. + virtual void removeAllAffectors(); + + //! Returns the material based on the zero based index i. + virtual video::SMaterial& getMaterial(u32 i); + + //! Returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! pre render event + virtual void OnRegisterSceneNode(); + + //! render + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! Creates a particle emitter for an animated mesh scene node + virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter( + scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, + bool everyMeshVertex = false, u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a box particle emitter. + virtual IParticleBoxEmitter* createBoxEmitter( + const core::aabbox3df& box = core::aabbox3d<f32>(-10,0,-10,5,30,10), + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a particle emitter for emitting from a cylinder + virtual IParticleCylinderEmitter* createCylinderEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& normal, f32 length, + bool outlineOnly = false, const core::vector3df& direction = core::vector3df(0.0f,0.5f,0.0f), + u32 minParticlesPerSecond = 5, u32 maxParticlesPersSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a mesh particle emitter. + virtual IParticleMeshEmitter* createMeshEmitter( + scene::IMesh* mesh, bool useNormalDirection = true, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, + bool everyMeshVertex = false, + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, + s32 maxAngleDegrees = 0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a point particle emitter. + virtual IParticlePointEmitter* createPointEmitter( + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a ring particle emitter. + virtual IParticleRingEmitter* createRingEmitter( + const core::vector3df& center, f32 radius, f32 ringThickness, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a sphere particle emitter. + virtual IParticleSphereEmitter* createSphereEmitter( + const core::vector3df& center, f32 radius, + const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), + u32 minParticlesPerSecond = 5, + u32 maxParticlesPerSecond = 10, + const video::SColor& minStartColor = video::SColor(255,0,0,0), + const video::SColor& maxStartColor = video::SColor(255,255,255,255), + u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, + s32 maxAngleDegrees=0, + const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); + + //! Creates a point attraction affector. This affector modifies the positions of the + //! particles and attracts them to a specified point at a specified speed per second. + virtual IParticleAttractionAffector* createAttractionAffector( + const core::vector3df& point, f32 speed = 1.0f, bool attract = true, + bool affectX = true, bool affectY = true, bool affectZ = true); + + //! Creates a scale particle affector. + virtual IParticleAffector* createScaleParticleAffector(const core::dimension2df& scaleTo = core::dimension2df(1.0f, 1.0f)); + + //! Creates a fade out particle affector. + virtual IParticleFadeOutAffector* createFadeOutParticleAffector( + const video::SColor& targetColor = video::SColor(0,0,0,0), + u32 timeNeededToFadeOut = 1000); + + //! Creates a gravity affector. + virtual IParticleGravityAffector* createGravityAffector( + const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f), + u32 timeForceLost = 1000); + + //! Creates a rotation affector. This affector rotates the particles + //! around a specified pivot point. The speed is in Degrees per second. + virtual IParticleRotationAffector* createRotationAffector( + const core::vector3df& speed = core::vector3df(5.0f,5.0f,5.0f), + const core::vector3df& pivotPoint = core::vector3df(0.0f,0.0f,0.0f) ); + + //! Sets the size of all particles. + virtual void setParticleSize( + const core::dimension2d<f32> &size = core::dimension2d<f32>(5.0f, 5.0f)); + + //! Sets if the particles should be global. If they are, the particles are affected by + //! the movement of the particle system scene node too, otherwise they completely + //! ignore it. Default is true. + virtual void setParticlesAreGlobal(bool global=true); + + //! Remove all currently visible particles + virtual void clearParticles(); + + //! Do manually update the particles. + //! This should only be called when you want to render the node outside the scenegraph, + //! as the node will care about this otherwise automatically. + virtual void doParticleSystem(u32 time); + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_PARTICLE_SYSTEM; } + +private: + + void reallocateBuffers(); + + core::list<IParticleAffector*> AffectorList; + IParticleEmitter* Emitter; + core::array<SParticle> Particles; + core::dimension2d<f32> ParticleSize; + u32 LastEmitTime; + s32 MaxParticles; + + SMeshBuffer* Buffer; + + enum E_PARTICLES_PRIMITIVE + { + EPP_POINT=0, + EPP_BILLBOARD, + EPP_POINTSPRITE + }; + E_PARTICLES_PRIMITIVE ParticlePrimitive; + + bool ParticlesAreGlobal; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.cpp new file mode 100644 index 0000000..0e0c05a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.cpp @@ -0,0 +1,2082 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_BSP_LOADER_ + +#include "CQ3LevelMesh.h" +#include "ISceneManager.h" +#include "os.h" +#include "SMeshBufferLightMap.h" +#include "irrString.h" +#include "ILightSceneNode.h" +#include "IQ3Shader.h" +#include "IFileList.h" + +//#define TJUNCTION_SOLVER_ROUND +//#define TJUNCTION_SOLVER_0125 + +namespace irr +{ +namespace scene +{ + + using namespace quake3; + +//! constructor +CQ3LevelMesh::CQ3LevelMesh(io::IFileSystem* fs, scene::ISceneManager* smgr, + const Q3LevelLoadParameter &loadParam) + : LoadParam(loadParam), Textures(0), NumTextures(0), LightMaps(0), NumLightMaps(0), + Vertices(0), NumVertices(0), Faces(0), NumFaces(0), Models(0), NumModels(0), + Planes(0), NumPlanes(0), Nodes(0), NumNodes(0), Leafs(0), NumLeafs(0), + LeafFaces(0), NumLeafFaces(0), MeshVerts(0), NumMeshVerts(0), + Brushes(0), NumBrushes(0), BrushEntities(0), FileSystem(fs), + SceneManager(smgr), FramesPerSecond(25.f) +{ + #ifdef _DEBUG + IReferenceCounted::setDebugName("CQ3LevelMesh"); + #endif + + for ( s32 i = 0; i!= E_Q3_MESH_SIZE; ++i ) + { + Mesh[i] = 0; + } + + Driver = smgr ? smgr->getVideoDriver() : 0; + if (Driver) + Driver->grab(); + + if (FileSystem) + FileSystem->grab(); + + // load default shaders + InitShader(); +} + + +//! destructor +CQ3LevelMesh::~CQ3LevelMesh() +{ + cleanLoader (); + + if (Driver) + Driver->drop(); + + if (FileSystem) + FileSystem->drop(); + + s32 i; + + for ( i = 0; i!= E_Q3_MESH_SIZE; ++i ) + { + if ( Mesh[i] ) + { + Mesh[i]->drop(); + Mesh[i] = 0; + } + } + + for ( i = 1; i < NumModels; i++ ) + { + BrushEntities[i]->drop(); + } + delete [] BrushEntities; BrushEntities = 0; + + ReleaseShader(); + ReleaseEntity(); +} + + +//! loads a level from a .bsp-File. Also tries to load all needed textures. Returns true if successful. +bool CQ3LevelMesh::loadFile(io::IReadFile* file) +{ + if (!file) + return false; + + LevelName = file->getFileName(); + + file->read(&header, sizeof(tBSPHeader)); + + #ifdef __BIG_ENDIAN__ + header.strID = os::Byteswap::byteswap(header.strID); + header.version = os::Byteswap::byteswap(header.version); + #endif + + if ( (header.strID != 0x50534249 || // IBSP + ( header.version != 0x2e // quake3 + && header.version != 0x2f // rtcw + ) + ) + && + ( header.strID != 0x50534252 || header.version != 1 ) // RBSP, starwars jedi, sof + ) + { + os::Printer::log("Could not load .bsp file, unknown header.", file->getFileName(), ELL_ERROR); + return false; + } + +#if 0 + if ( header.strID == 0x50534252 ) // RBSP Raven + { + LoadParam.swapHeader = 1; + } +#endif + + // now read lumps + file->read(&Lumps[0], sizeof(tBSPLump)*kMaxLumps); + + s32 i; + if ( LoadParam.swapHeader ) + { + for ( i=0; i< kMaxLumps;++i) + { + Lumps[i].offset = os::Byteswap::byteswap(Lumps[i].offset); + Lumps[i].length = os::Byteswap::byteswap(Lumps[i].length); + } + } + + ReleaseEntity(); + + // load everything + loadEntities(&Lumps[kEntities], file); // load the entities + loadTextures(&Lumps[kShaders], file); // Load the textures + loadLightmaps(&Lumps[kLightmaps], file); // Load the lightmaps + loadVerts(&Lumps[kVertices], file); // Load the vertices + loadFaces(&Lumps[kFaces], file); // Load the faces + loadPlanes(&Lumps[kPlanes], file); // Load the Planes of the BSP + loadNodes(&Lumps[kNodes], file); // load the Nodes of the BSP + loadLeafs(&Lumps[kLeafs], file); // load the Leafs of the BSP + loadLeafFaces(&Lumps[kLeafFaces], file); // load the Faces of the Leafs of the BSP + loadVisData(&Lumps[kVisData], file); // load the visibility data of the clusters + loadModels(&Lumps[kModels], file); // load the models + loadMeshVerts(&Lumps[kMeshVerts], file); // load the mesh vertices + loadBrushes(&Lumps[kBrushes], file); // load the brushes of the BSP + loadBrushSides(&Lumps[kBrushSides], file); // load the brushsides of the BSP + loadLeafBrushes(&Lumps[kLeafBrushes], file); // load the brushes of the leaf + loadFogs(&Lumps[kFogs], file ); // load the fogs + + loadTextures(); + constructMesh(); + solveTJunction(); + + cleanMeshes(); + calcBoundingBoxes(); + cleanLoader(); + + return true; +} + +/*! +*/ +void CQ3LevelMesh::cleanLoader () +{ + delete [] Textures; Textures = 0; + delete [] LightMaps; LightMaps = 0; + delete [] Vertices; Vertices = 0; + delete [] Faces; Faces = 0; + delete [] Models; Models = 0; + delete [] Planes; Planes = 0; + delete [] Nodes; Nodes = 0; + delete [] Leafs; Leafs = 0; + delete [] LeafFaces; LeafFaces = 0; + delete [] MeshVerts; MeshVerts = 0; + delete [] Brushes; Brushes = 0; + + Lightmap.clear(); + Tex.clear(); +} + +//! returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. +u32 CQ3LevelMesh::getFrameCount() const +{ + return 1; +} + + +//! returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. Note, that some Meshes will ignore the detail level. +IMesh* CQ3LevelMesh::getMesh(s32 frameInMs, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + return Mesh[frameInMs]; +} + + +void CQ3LevelMesh::loadTextures(tBSPLump* l, io::IReadFile* file) +{ + NumTextures = l->length / sizeof(tBSPTexture); + if ( !NumTextures ) + return; + Textures = new tBSPTexture[NumTextures]; + + file->seek(l->offset); + file->read(Textures, l->length); + + if ( LoadParam.swapHeader ) + { + for (s32 i=0;i<NumTextures;++i) + { + Textures[i].flags = os::Byteswap::byteswap(Textures[i].flags); + Textures[i].contents = os::Byteswap::byteswap(Textures[i].contents); + //os::Printer::log("Loaded texture", Textures[i].strName, ELL_INFORMATION); + } + } +} + + +void CQ3LevelMesh::loadLightmaps(tBSPLump* l, io::IReadFile* file) +{ + NumLightMaps = l->length / sizeof(tBSPLightmap); + if ( !NumLightMaps ) + return; + LightMaps = new tBSPLightmap[NumLightMaps]; + + file->seek(l->offset); + file->read(LightMaps, l->length); +} + +/*! +*/ +void CQ3LevelMesh::loadVerts(tBSPLump* l, io::IReadFile* file) +{ + NumVertices = l->length / sizeof(tBSPVertex); + if ( !NumVertices ) + return; + Vertices = new tBSPVertex[NumVertices]; + + file->seek(l->offset); + file->read(Vertices, l->length); + + if ( LoadParam.swapHeader ) + for (s32 i=0;i<NumVertices;i++) + { + Vertices[i].vPosition[0] = os::Byteswap::byteswap(Vertices[i].vPosition[0]); + Vertices[i].vPosition[1] = os::Byteswap::byteswap(Vertices[i].vPosition[1]); + Vertices[i].vPosition[2] = os::Byteswap::byteswap(Vertices[i].vPosition[2]); + Vertices[i].vTextureCoord[0] = os::Byteswap::byteswap(Vertices[i].vTextureCoord[0]); + Vertices[i].vTextureCoord[1] = os::Byteswap::byteswap(Vertices[i].vTextureCoord[1]); + Vertices[i].vLightmapCoord[0] = os::Byteswap::byteswap(Vertices[i].vLightmapCoord[0]); + Vertices[i].vLightmapCoord[1] = os::Byteswap::byteswap(Vertices[i].vLightmapCoord[1]); + Vertices[i].vNormal[0] = os::Byteswap::byteswap(Vertices[i].vNormal[0]); + Vertices[i].vNormal[1] = os::Byteswap::byteswap(Vertices[i].vNormal[1]); + Vertices[i].vNormal[2] = os::Byteswap::byteswap(Vertices[i].vNormal[2]); + } +} + + +/*! +*/ +void CQ3LevelMesh::loadFaces(tBSPLump* l, io::IReadFile* file) +{ + NumFaces = l->length / sizeof(tBSPFace); + if (!NumFaces) + return; + Faces = new tBSPFace[NumFaces]; + + file->seek(l->offset); + file->read(Faces, l->length); + + if ( LoadParam.swapHeader ) + { + for ( s32 i=0;i<NumFaces;i++) + { + Faces[i].textureID = os::Byteswap::byteswap(Faces[i].textureID); + Faces[i].fogNum = os::Byteswap::byteswap(Faces[i].fogNum); + Faces[i].type = os::Byteswap::byteswap(Faces[i].type); + Faces[i].vertexIndex = os::Byteswap::byteswap(Faces[i].vertexIndex); + Faces[i].numOfVerts = os::Byteswap::byteswap(Faces[i].numOfVerts); + Faces[i].meshVertIndex = os::Byteswap::byteswap(Faces[i].meshVertIndex); + Faces[i].numMeshVerts = os::Byteswap::byteswap(Faces[i].numMeshVerts); + Faces[i].lightmapID = os::Byteswap::byteswap(Faces[i].lightmapID); + Faces[i].lMapCorner[0] = os::Byteswap::byteswap(Faces[i].lMapCorner[0]); + Faces[i].lMapCorner[1] = os::Byteswap::byteswap(Faces[i].lMapCorner[1]); + Faces[i].lMapSize[0] = os::Byteswap::byteswap(Faces[i].lMapSize[0]); + Faces[i].lMapSize[1] = os::Byteswap::byteswap(Faces[i].lMapSize[1]); + Faces[i].lMapPos[0] = os::Byteswap::byteswap(Faces[i].lMapPos[0]); + Faces[i].lMapPos[1] = os::Byteswap::byteswap(Faces[i].lMapPos[1]); + Faces[i].lMapPos[2] = os::Byteswap::byteswap(Faces[i].lMapPos[2]); + Faces[i].lMapBitsets[0][0] = os::Byteswap::byteswap(Faces[i].lMapBitsets[0][0]); + Faces[i].lMapBitsets[0][1] = os::Byteswap::byteswap(Faces[i].lMapBitsets[0][1]); + Faces[i].lMapBitsets[0][2] = os::Byteswap::byteswap(Faces[i].lMapBitsets[0][2]); + Faces[i].lMapBitsets[1][0] = os::Byteswap::byteswap(Faces[i].lMapBitsets[1][0]); + Faces[i].lMapBitsets[1][1] = os::Byteswap::byteswap(Faces[i].lMapBitsets[1][1]); + Faces[i].lMapBitsets[1][2] = os::Byteswap::byteswap(Faces[i].lMapBitsets[1][2]); + Faces[i].vNormal[0] = os::Byteswap::byteswap(Faces[i].vNormal[0]); + Faces[i].vNormal[1] = os::Byteswap::byteswap(Faces[i].vNormal[1]); + Faces[i].vNormal[2] = os::Byteswap::byteswap(Faces[i].vNormal[2]); + Faces[i].size[0] = os::Byteswap::byteswap(Faces[i].size[0]); + Faces[i].size[1] = os::Byteswap::byteswap(Faces[i].size[1]); + } + } +} + + +/*! +*/ +void CQ3LevelMesh::loadPlanes(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + + +/*! +*/ +void CQ3LevelMesh::loadNodes(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + + +/*! +*/ +void CQ3LevelMesh::loadLeafs(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + + +/*! +*/ +void CQ3LevelMesh::loadLeafFaces(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + + +/*! +*/ +void CQ3LevelMesh::loadVisData(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + + +/*! +*/ +void CQ3LevelMesh::loadEntities(tBSPLump* l, io::IReadFile* file) +{ + core::array<u8> entity; + entity.set_used( l->length + 2 ); + entity[l->length + 1 ] = 0; + + file->seek(l->offset); + file->read( entity.pointer(), l->length); + + parser_parse( entity.pointer(), l->length, &CQ3LevelMesh::scriptcallback_entity ); +} + + +/*! + load fog brushes +*/ +void CQ3LevelMesh::loadFogs(tBSPLump* l, io::IReadFile* file) +{ + u32 files = l->length / sizeof(tBSPFog); + + file->seek( l->offset ); + tBSPFog fog; + const IShader *shader; + STexShader t; + for ( u32 i = 0; i!= files; ++i ) + { + file->read( &fog, sizeof( fog ) ); + + shader = getShader( fog.shader ); + t.Texture = 0; + t.ShaderID = shader ? shader->ID : -1; + + FogMap.push_back ( t ); + } +} + + +/*! + load models named in bsp +*/ +void CQ3LevelMesh::loadModels(tBSPLump* l, io::IReadFile* file) +{ + NumModels = l->length / sizeof(tBSPModel); + Models = new tBSPModel[NumModels]; + + file->seek( l->offset ); + file->read(Models, l->length); + + if ( LoadParam.swapHeader ) + { + for ( s32 i = 0; i < NumModels; i++) + { + Models[i].min[0] = os::Byteswap::byteswap(Models[i].min[0]); + Models[i].min[1] = os::Byteswap::byteswap(Models[i].min[1]); + Models[i].min[2] = os::Byteswap::byteswap(Models[i].min[2]); + Models[i].max[0] = os::Byteswap::byteswap(Models[i].max[0]); + Models[i].max[1] = os::Byteswap::byteswap(Models[i].max[1]); + Models[i].max[2] = os::Byteswap::byteswap(Models[i].max[2]); + + Models[i].faceIndex = os::Byteswap::byteswap(Models[i].faceIndex); + Models[i].numOfFaces = os::Byteswap::byteswap(Models[i].numOfFaces); + Models[i].brushIndex = os::Byteswap::byteswap(Models[i].brushIndex); + Models[i].numOfBrushes = os::Byteswap::byteswap(Models[i].numOfBrushes); + } + } + + BrushEntities = new SMesh*[NumModels]; +} + +/*! +*/ +void CQ3LevelMesh::loadMeshVerts(tBSPLump* l, io::IReadFile* file) +{ + NumMeshVerts = l->length / sizeof(s32); + if (!NumMeshVerts) + return; + MeshVerts = new s32[NumMeshVerts]; + + file->seek(l->offset); + file->read(MeshVerts, l->length); + + if ( LoadParam.swapHeader ) + { + for (int i=0;i<NumMeshVerts;i++) + MeshVerts[i] = os::Byteswap::byteswap(MeshVerts[i]); + } +} + +/*! +*/ +void CQ3LevelMesh::loadBrushes(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + +/*! +*/ +void CQ3LevelMesh::loadBrushSides(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + +/*! +*/ +void CQ3LevelMesh::loadLeafBrushes(tBSPLump* l, io::IReadFile* file) +{ + // ignore +} + +/*! +*/ +inline bool isQ3WhiteSpace( const u8 symbol ) +{ + return symbol == ' ' || symbol == '\t' || symbol == '\r'; +} + +/*! +*/ +inline bool isQ3ValidName( const u8 symbol ) +{ + return (symbol >= 'a' && symbol <= 'z' ) || + (symbol >= 'A' && symbol <= 'Z' ) || + (symbol >= '0' && symbol <= '9' ) || + (symbol == '/' || symbol == '_' || symbol == '.' ); +} + +/*! +*/ +void CQ3LevelMesh::parser_nextToken() +{ + u8 symbol; + + Parser.token = ""; + Parser.tokenresult = Q3_TOKEN_UNRESOLVED; + + // skip white space + do + { + if ( Parser.index >= Parser.sourcesize ) + { + Parser.tokenresult = Q3_TOKEN_EOF; + return; + } + + symbol = Parser.source [ Parser.index ]; + Parser.index += 1; + } while ( isQ3WhiteSpace( symbol ) ); + + // first symbol, one symbol + switch ( symbol ) + { + case 0: + Parser.tokenresult = Q3_TOKEN_EOF; + return; + + case '/': + // comment or divide + if ( Parser.index >= Parser.sourcesize ) + { + Parser.tokenresult = Q3_TOKEN_EOF; + return; + } + symbol = Parser.source [ Parser.index ]; + Parser.index += 1; + if ( isQ3WhiteSpace( symbol ) ) + { + Parser.tokenresult = Q3_TOKEN_MATH_DIVIDE; + return; + } + else + if ( symbol == '*' ) + { + // C-style comment in quake? + } + else + if ( symbol == '/' ) + { + // skip to eol + do + { + if ( Parser.index >= Parser.sourcesize ) + { + Parser.tokenresult = Q3_TOKEN_EOF; + return; + } + symbol = Parser.source [ Parser.index ]; + Parser.index += 1; + } while ( symbol != '\n' ); + Parser.tokenresult = Q3_TOKEN_COMMENT; + return; + } + // take /[name] as valid token..?!?!?. mhmm, maybe + break; + + case '\n': + Parser.tokenresult = Q3_TOKEN_EOL; + return; + case '{': + Parser.tokenresult = Q3_TOKEN_START_LIST; + return; + case '}': + Parser.tokenresult = Q3_TOKEN_END_LIST; + return; + + case '"': + // string literal + do + { + if ( Parser.index >= Parser.sourcesize ) + { + Parser.tokenresult = Q3_TOKEN_EOF; + return; + } + symbol = Parser.source [ Parser.index ]; + Parser.index += 1; + if ( symbol != '"' ) + Parser.token.append( symbol ); + } while ( symbol != '"' ); + Parser.tokenresult = Q3_TOKEN_ENTITY; + return; + } + + // user identity + Parser.token.append( symbol ); + + // continue till whitespace + bool validName = true; + do + { + if ( Parser.index >= Parser.sourcesize ) + { + Parser.tokenresult = Q3_TOKEN_EOF; + return; + } + symbol = Parser.source [ Parser.index ]; + + validName = isQ3ValidName( symbol ); + if ( validName ) + { + Parser.token.append( symbol ); + Parser.index += 1; + } + } while ( validName ); + + Parser.tokenresult = Q3_TOKEN_TOKEN; + return; +} + + +/* + parse entity & shader + calls callback on content in {} +*/ +void CQ3LevelMesh::parser_parse( const void * data, const u32 size, CQ3LevelMesh::tParserCallback callback ) +{ + Parser.source = static_cast<const c8*>(data); + Parser.sourcesize = size; + Parser.index = 0; + + SVarGroupList *groupList; + + s32 active; + s32 last; + + SVariable entity ( "" ); + + groupList = new SVarGroupList(); + + groupList->VariableGroup.push_back( SVarGroup() ); + active = last = 0; + + do + { + parser_nextToken(); + + switch ( Parser.tokenresult ) + { + case Q3_TOKEN_START_LIST: + { + //stack = core::min_( stack + 1, 7 ); + + groupList->VariableGroup.push_back( SVarGroup() ); + last = active; + active = groupList->VariableGroup.size() - 1; + entity.clear(); + } break; + + // a unregisterd variable is finished + case Q3_TOKEN_EOL: + { + if ( entity.isValid() ) + { + groupList->VariableGroup[active].Variable.push_back( entity ); + entity.clear(); + } + } break; + + case Q3_TOKEN_TOKEN: + case Q3_TOKEN_ENTITY: + { + Parser.token.make_lower(); + + // store content based on line-delemiter + if ( 0 == entity.isValid() ) + { + entity.name = Parser.token; + entity.content = ""; + + } + else + { + if ( entity.content.size() ) + { + entity.content += " "; + } + entity.content += Parser.token; + } + } break; + + case Q3_TOKEN_END_LIST: + { + //stack = core::max_( stack - 1, 0 ); + + // close tag for first + if ( active == 1 ) + { + (this->*callback)( groupList, Q3_TOKEN_END_LIST ); + + // new group + groupList->drop(); + groupList = new SVarGroupList(); + groupList->VariableGroup.push_back( SVarGroup() ); + last = 0; + } + + active = last; + entity.clear(); + + } break; + + default: + break; + } + + } while ( Parser.tokenresult != Q3_TOKEN_EOF ); + + (this->*callback)( groupList, Q3_TOKEN_EOF ); + + groupList->drop(); +} + + +/* + this loader applies only textures for stage 1 & 2 +*/ +s32 CQ3LevelMesh::setShaderFogMaterial( video::SMaterial &material, const tBSPFace * face ) const +{ + material.MaterialType = video::EMT_SOLID; + material.Wireframe = false; + material.Lighting = false; + material.BackfaceCulling = false; + material.setTexture(0, 0); + material.setTexture(1, 0); + material.setTexture(2, 0); + material.setTexture(3, 0); + material.ZBuffer = video::ECFN_LESSEQUAL; + material.ZWriteEnable = false; + material.MaterialTypeParam = 0.f; + + s32 shaderState = -1; + + if ( (u32) face->fogNum < FogMap.size() ) + { + material.setTexture(0, FogMap [ face->fogNum ].Texture); + shaderState = FogMap [ face->fogNum ].ShaderID; + } + + return shaderState; + +} +/* + this loader applies only textures for stage 1 & 2 +*/ +s32 CQ3LevelMesh::setShaderMaterial( video::SMaterial &material, const tBSPFace * face ) const +{ + material.MaterialType = video::EMT_SOLID; + material.Wireframe = false; + material.Lighting = false; + material.BackfaceCulling = true; + material.setTexture(0, 0); + material.setTexture(1, 0); + material.setTexture(2, 0); + material.setTexture(3, 0); + material.ZBuffer = video::ECFN_LESSEQUAL; + material.ZWriteEnable = true; + material.MaterialTypeParam = 0.f; + + s32 shaderState = -1; + + if ( face->textureID >= 0 && face->textureID < (s32)Tex.size() ) + { + material.setTexture(0, Tex [ face->textureID ].Texture); + shaderState = Tex [ face->textureID ].ShaderID; + } + + if ( face->lightmapID >= 0 && face->lightmapID < (s32)Lightmap.size() ) + { + material.setTexture(1, Lightmap [ face->lightmapID ]); + material.MaterialType = LoadParam.defaultLightMapMaterial; + } + + // store shader ID + material.MaterialTypeParam2 = (f32) shaderState; + + const IShader *shader = getShader(shaderState); + if ( 0 == shader ) + return shaderState; + + return shaderState; + +#if 0 + const SVarGroup *group; + + + // generic + group = shader->getGroup( 1 ); + if ( group ) + { + material.BackfaceCulling = getCullingFunction( group->get( "cull" ) ); + + if ( group->isDefined( "surfaceparm", "nolightmap" ) ) + { + material.MaterialType = video::EMT_SOLID; + material.setTexture(1, 0); + } + + } + + // try to get the best of the 8 texture stages.. + + // texture 1, texture 2 + u32 startPos; + for ( s32 g = 2; g <= 3; ++g ) + { + group = shader->getGroup( g ); + if ( 0 == group ) + continue; + + startPos = 0; + + if ( group->isDefined( "depthwrite" ) ) + { + material.ZWriteEnable = true; + } + + SBlendFunc blendfunc ( LoadParam.defaultModulate ); + getBlendFunc( group->get( "blendfunc" ), blendfunc ); + getBlendFunc( group->get( "alphafunc" ), blendfunc ); + + if ( 0 == LoadParam.alpharef && + ( blendfunc.type == video::EMT_TRANSPARENT_ALPHA_CHANNEL || + blendfunc.type == video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF + ) + ) + { + blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + blendfunc.param0 = 0.f; + } + + material.MaterialType = blendfunc.type; + material.MaterialTypeParam = blendfunc.param0; + + // try if we can match better + shaderState |= (material.MaterialType == video::EMT_SOLID ) ? 0x00020000 : 0; + } + + //material.BackfaceCulling = false; + + if ( shader->VarGroup->VariableGroup.size() <= 4 ) + { + shaderState |= 0x00010000; + } + + material.MaterialTypeParam2 = (f32) shaderState; + return shaderState; +#endif +} + +/*! + Internal function to build a mesh. +*/ +scene::SMesh** CQ3LevelMesh::buildMesh(s32 num) +{ + scene::SMesh** newmesh = new SMesh *[quake3::E_Q3_MESH_SIZE]; + + s32 i, j, k,s; + + for (i = 0; i < E_Q3_MESH_SIZE; i++) + { + newmesh[i] = new SMesh(); + } + + s32 *index; + + video::S3DVertex2TCoords temp[3]; + video::SMaterial material; + video::SMaterial material2; + + SToBuffer item [ E_Q3_MESH_SIZE ]; + u32 itemSize; + + for (i = Models[num].faceIndex; i < Models[num].numOfFaces + Models[num].faceIndex; ++i) + { + const tBSPFace * face = Faces + i; + + s32 shaderState = setShaderMaterial( material, face ); + itemSize = 0; + + const IShader *shader = getShader(shaderState); + + if ( face->fogNum >= 0 ) + { + setShaderFogMaterial ( material2, face ); + item[itemSize].index = E_Q3_MESH_FOG; + item[itemSize].takeVertexColor = 1; + itemSize += 1; + } + + switch( face->type ) + { + case 1: // normal polygons + case 2: // patches + case 3: // meshes + if ( 0 == shader ) + { + if ( LoadParam.cleanUnResolvedMeshes || material.getTexture(0) ) + { + item[itemSize].takeVertexColor = 1; + item[itemSize].index = E_Q3_MESH_GEOMETRY; + itemSize += 1; + } + else + { + item[itemSize].takeVertexColor = 1; + item[itemSize].index = E_Q3_MESH_UNRESOLVED; + itemSize += 1; + } + } + else + { + item[itemSize].takeVertexColor = 1; + item[itemSize].index = E_Q3_MESH_ITEMS; + itemSize += 1; + } + break; + + case 4: // billboards + //item[itemSize].takeVertexColor = 1; + //item[itemSize].index = E_Q3_MESH_ITEMS; + //itemSize += 1; + break; + + } + + for ( u32 g = 0; g != itemSize; ++g ) + { + scene::SMeshBufferLightMap* buffer = 0; + + if ( item[g].index == E_Q3_MESH_GEOMETRY ) + { + if ( 0 == item[g].takeVertexColor ) + { + item[g].takeVertexColor = material.getTexture(0) == 0 || material.getTexture(1) == 0; + } + + if (Faces[i].lightmapID < -1 || Faces[i].lightmapID > NumLightMaps-1) + { + Faces[i].lightmapID = -1; + } + +#if 0 + // there are lightmapsids and textureid with -1 + const s32 tmp_index = ((Faces[i].lightmapID+1) * (NumTextures+1)) + (Faces[i].textureID+1); + buffer = (SMeshBufferLightMap*) newmesh[E_Q3_MESH_GEOMETRY]->getMeshBuffer(tmp_index); + buffer->setHardwareMappingHint ( EHM_STATIC ); + buffer->getMaterial() = material; +#endif + } + + // Construct a unique mesh for each shader or combine meshbuffers for same shader + if ( 0 == buffer ) + { + + if ( LoadParam.mergeShaderBuffer == 1 ) + { + // combine + buffer = (SMeshBufferLightMap*) newmesh[ item[g].index ]->getMeshBuffer( + item[g].index != E_Q3_MESH_FOG ? material : material2 ); + } + + // create a seperate mesh buffer + if ( 0 == buffer ) + { + buffer = new scene::SMeshBufferLightMap(); + newmesh[ item[g].index ]->addMeshBuffer( buffer ); + buffer->drop(); + buffer->getMaterial() = item[g].index != E_Q3_MESH_FOG ? material : material2; + if ( item[g].index == E_Q3_MESH_GEOMETRY ) + buffer->setHardwareMappingHint ( EHM_STATIC ); + } + } + + + switch(Faces[i].type) + { + case 4: // billboards + break; + case 2: // patches + createCurvedSurface_bezier( buffer, i, + LoadParam.patchTesselation, + item[g].takeVertexColor + ); + break; + + case 1: // normal polygons + case 3: // mesh vertices + index = MeshVerts + face->meshVertIndex; + k = buffer->getVertexCount(); + + // reallocate better if many small meshes are used + s = buffer->getIndexCount()+face->numMeshVerts; + if ( buffer->Indices.allocated_size () < (u32) s ) + { + if ( buffer->Indices.allocated_size () > 0 && + face->numMeshVerts < 20 && NumFaces > 1000 + ) + { + s = buffer->getIndexCount() + (NumFaces >> 3 * face->numMeshVerts ); + } + buffer->Indices.reallocate( s); + } + + for ( j = 0; j < face->numMeshVerts; ++j ) + { + buffer->Indices.push_back( k + index [j] ); + } + + s = k+face->numOfVerts; + if ( buffer->Vertices.allocated_size () < (u32) s ) + { + if ( buffer->Indices.allocated_size () > 0 && + face->numOfVerts < 20 && NumFaces > 1000 + ) + { + s = buffer->getIndexCount() + (NumFaces >> 3 * face->numOfVerts ); + } + buffer->Vertices.reallocate( s); + } + for ( j = 0; j != face->numOfVerts; ++j ) + { + copy( &temp[0], &Vertices[ j + face->vertexIndex ], item[g].takeVertexColor ); + buffer->Vertices.push_back( temp[0] ); + } + break; + + } // end switch + } + } + + return newmesh; +} + +/*! +*/ +void CQ3LevelMesh::solveTJunction() +{ +} + +/*! + constructs a mesh from the quake 3 level file. +*/ +void CQ3LevelMesh::constructMesh() +{ + if ( LoadParam.verbose > 0 ) + { + LoadParam.startTime = os::Timer::getRealTime(); + + if ( LoadParam.verbose > 1 ) + { + snprintf( buf, sizeof ( buf ), + "quake3::constructMesh start to create %d faces, %d vertices,%d mesh vertices", + NumFaces, + NumVertices, + NumMeshVerts + ); + os::Printer::log(buf, ELL_INFORMATION); + } + + } + + s32 i, j; + + // First the main level + SMesh **tmp = buildMesh(0); + + for (i = 0; i < E_Q3_MESH_SIZE; i++) + { + Mesh[i] = tmp[i]; + } + delete [] tmp; + + // Then the brush entities + + for (i = 1; i < NumModels; i++) + { + tmp = buildMesh(i); + BrushEntities[i] = tmp[0]; + + // We only care about the main geometry here + for (j = 1; j < E_Q3_MESH_SIZE; j++) + { + tmp[j]->drop(); + } + delete [] tmp; + } + + if ( LoadParam.verbose > 0 ) + { + LoadParam.endTime = os::Timer::getRealTime(); + + snprintf( buf, sizeof ( buf ), + "quake3::constructMesh needed %04d ms to create %d faces, %d vertices,%d mesh vertices", + LoadParam.endTime - LoadParam.startTime, + NumFaces, + NumVertices, + NumMeshVerts + ); + os::Printer::log(buf, ELL_INFORMATION); + } + +} + + +void CQ3LevelMesh::S3DVertex2TCoords_64::copy( video::S3DVertex2TCoords &dest ) const +{ +#if defined (TJUNCTION_SOLVER_ROUND) + dest.Pos.X = core::round_( (f32) Pos.X ); + dest.Pos.Y = core::round_( (f32) Pos.Y ); + dest.Pos.Z = core::round_( (f32) Pos.Z ); +#elif defined (TJUNCTION_SOLVER_0125) + dest.Pos.X = (f32) ( floor ( Pos.X * 8.f + 0.5 ) * 0.125 ); + dest.Pos.Y = (f32) ( floor ( Pos.Y * 8.f + 0.5 ) * 0.125 ); + dest.Pos.Z = (f32) ( floor ( Pos.Z * 8.f + 0.5 ) * 0.125 ); +#else + dest.Pos.X = (f32) Pos.X; + dest.Pos.Y = (f32) Pos.Y; + dest.Pos.Z = (f32) Pos.Z; +#endif + + dest.Normal.X = (f32) Normal.X; + dest.Normal.Y = (f32) Normal.Y; + dest.Normal.Z = (f32) Normal.Z; + dest.Normal.normalize(); + + dest.Color = Color.toSColor(); + + dest.TCoords.X = (f32) TCoords.X; + dest.TCoords.Y = (f32) TCoords.Y; + + dest.TCoords2.X = (f32) TCoords2.X; + dest.TCoords2.Y = (f32) TCoords2.Y; +} + + +void CQ3LevelMesh::copy( S3DVertex2TCoords_64 * dest, const tBSPVertex * source, s32 vertexcolor ) const +{ +#if defined (TJUNCTION_SOLVER_ROUND) + dest->Pos.X = core::round_( source->vPosition[0] ); + dest->Pos.Y = core::round_( source->vPosition[2] ); + dest->Pos.Z = core::round_( source->vPosition[1] ); +#elif defined (TJUNCTION_SOLVER_0125) + dest->Pos.X = (f32) ( floor ( source->vPosition[0] * 8.f + 0.5 ) * 0.125 ); + dest->Pos.Y = (f32) ( floor ( source->vPosition[2] * 8.f + 0.5 ) * 0.125 ); + dest->Pos.Z = (f32) ( floor ( source->vPosition[1] * 8.f + 0.5 ) * 0.125 ); +#else + dest->Pos.X = source->vPosition[0]; + dest->Pos.Y = source->vPosition[2]; + dest->Pos.Z = source->vPosition[1]; +#endif + + dest->Normal.X = source->vNormal[0]; + dest->Normal.Y = source->vNormal[2]; + dest->Normal.Z = source->vNormal[1]; + dest->Normal.normalize(); + + dest->TCoords.X = source->vTextureCoord[0]; + dest->TCoords.Y = source->vTextureCoord[1]; + dest->TCoords2.X = source->vLightmapCoord[0]; + dest->TCoords2.Y = source->vLightmapCoord[1]; + + if ( vertexcolor ) + { + //u32 a = core::s32_min( source->color[3] * LoadParam.defaultModulate, 255 ); + u32 a = source->color[3]; + u32 r = core::s32_min( source->color[0] * LoadParam.defaultModulate, 255 ); + u32 g = core::s32_min( source->color[1] * LoadParam.defaultModulate, 255 ); + u32 b = core::s32_min( source->color[2] * LoadParam.defaultModulate, 255 ); + + dest->Color.set(a * 1.f/255.f, r * 1.f/255.f, + g * 1.f/255.f, b * 1.f/255.f); + } + else + { + dest->Color.set( 1.f, 1.f, 1.f, 1.f ); + } +} + + +inline void CQ3LevelMesh::copy( video::S3DVertex2TCoords * dest, const tBSPVertex * source, s32 vertexcolor ) const +{ +#if defined (TJUNCTION_SOLVER_ROUND) + dest->Pos.X = core::round_( source->vPosition[0] ); + dest->Pos.Y = core::round_( source->vPosition[2] ); + dest->Pos.Z = core::round_( source->vPosition[1] ); +#elif defined (TJUNCTION_SOLVER_0125) + dest->Pos.X = (f32) ( floor ( source->vPosition[0] * 8.f + 0.5 ) * 0.125 ); + dest->Pos.Y = (f32) ( floor ( source->vPosition[2] * 8.f + 0.5 ) * 0.125 ); + dest->Pos.Z = (f32) ( floor ( source->vPosition[1] * 8.f + 0.5 ) * 0.125 ); +#else + dest->Pos.X = source->vPosition[0]; + dest->Pos.Y = source->vPosition[2]; + dest->Pos.Z = source->vPosition[1]; +#endif + + dest->Normal.X = source->vNormal[0]; + dest->Normal.Y = source->vNormal[2]; + dest->Normal.Z = source->vNormal[1]; + dest->Normal.normalize(); + + dest->TCoords.X = source->vTextureCoord[0]; + dest->TCoords.Y = source->vTextureCoord[1]; + dest->TCoords2.X = source->vLightmapCoord[0]; + dest->TCoords2.Y = source->vLightmapCoord[1]; + + if ( vertexcolor ) + { + //u32 a = core::s32_min( source->color[3] * LoadParam.defaultModulate, 255 ); + u32 a = source->color[3]; + u32 r = core::s32_min( source->color[0] * LoadParam.defaultModulate, 255 ); + u32 g = core::s32_min( source->color[1] * LoadParam.defaultModulate, 255 ); + u32 b = core::s32_min( source->color[2] * LoadParam.defaultModulate, 255 ); + + dest->Color.set(a << 24 | r << 16 | g << 8 | b); + } + else + { + dest->Color.set(0xFFFFFFFF); + } +} + + +void CQ3LevelMesh::SBezier::tesselate( s32 level ) +{ + //Calculate how many vertices across/down there are + s32 j, k; + + column[0].set_used( level + 1 ); + column[1].set_used( level + 1 ); + column[2].set_used( level + 1 ); + + const f64 w = 0.0 + (1.0 / (f64) level ); + + //Tesselate along the columns + for( j = 0; j <= level; ++j) + { + const f64 f = w * (f64) j; + + column[0][j] = control[0].getInterpolated_quadratic(control[3], control[6], f ); + column[1][j] = control[1].getInterpolated_quadratic(control[4], control[7], f ); + column[2][j] = control[2].getInterpolated_quadratic(control[5], control[8], f ); + } + + const u32 idx = Patch->Vertices.size(); + Patch->Vertices.reallocate(idx+level*level); + //Tesselate across the rows to get final vertices + video::S3DVertex2TCoords v; + S3DVertex2TCoords_64 f; + for( j = 0; j <= level; ++j) + { + for( k = 0; k <= level; ++k) + { + f = column[0][j].getInterpolated_quadratic(column[1][j], column[2][j], w * (f64) k); + f.copy( v ); + Patch->Vertices.push_back( v ); + } + } + + Patch->Indices.reallocate(Patch->Indices.size()+6*level*level); + // connect + for( j = 0; j < level; ++j) + { + for( k = 0; k < level; ++k) + { + const s32 inx = idx + ( k * ( level + 1 ) ) + j; + + Patch->Indices.push_back( inx + 0 ); + Patch->Indices.push_back( inx + (level + 1 ) + 0 ); + Patch->Indices.push_back( inx + (level + 1 ) + 1 ); + + Patch->Indices.push_back( inx + 0 ); + Patch->Indices.push_back( inx + (level + 1 ) + 1 ); + Patch->Indices.push_back( inx + 1 ); + } + } +} + + +/*! + no subdivision +*/ +void CQ3LevelMesh::createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBuffer, + s32 faceIndex, + s32 patchTesselation, + s32 storevertexcolor) +{ + tBSPFace * face = &Faces[faceIndex]; + u32 j,k,m; + + // number of control points across & up + const u32 controlWidth = face->size[0]; + const u32 controlHeight = face->size[1]; + if ( 0 == controlWidth || 0 == controlHeight ) + return; + + video::S3DVertex2TCoords v; + + m = meshBuffer->Vertices.size(); + meshBuffer->Vertices.reallocate(m+controlHeight * controlWidth); + for ( j = 0; j!= controlHeight * controlWidth; ++j ) + { + copy( &v, &Vertices [ face->vertexIndex + j ], storevertexcolor ); + meshBuffer->Vertices.push_back( v ); + } + + meshBuffer->Indices.reallocate(meshBuffer->Indices.size()+6*(controlHeight-1) * (controlWidth-1)); + for ( j = 0; j!= controlHeight - 1; ++j ) + { + for ( k = 0; k!= controlWidth - 1; ++k ) + { + meshBuffer->Indices.push_back( m + k + 0 ); + meshBuffer->Indices.push_back( m + k + controlWidth + 0 ); + meshBuffer->Indices.push_back( m + k + controlWidth + 1 ); + + meshBuffer->Indices.push_back( m + k + 0 ); + meshBuffer->Indices.push_back( m + k + controlWidth + 1 ); + meshBuffer->Indices.push_back( m + k + 1 ); + } + m += controlWidth; + } +} + + +/*! +*/ +void CQ3LevelMesh::createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer, + s32 faceIndex, + s32 patchTesselation, + s32 storevertexcolor) +{ + + tBSPFace * face = &Faces[faceIndex]; + u32 j,k; + + // number of control points across & up + const u32 controlWidth = face->size[0]; + const u32 controlHeight = face->size[1]; + + if ( 0 == controlWidth || 0 == controlHeight ) + return; + + // number of biquadratic patches + const u32 biquadWidth = (controlWidth - 1)/2; + const u32 biquadHeight = (controlHeight -1)/2; + + if ( LoadParam.verbose > 1 ) + { + LoadParam.startTime = os::Timer::getRealTime(); + } + + // Create space for a temporary array of the patch's control points + core::array<S3DVertex2TCoords_64> controlPoint; + controlPoint.set_used( controlWidth * controlHeight ); + + for( j = 0; j < controlPoint.size(); ++j) + { + copy( &controlPoint[j], &Vertices [ face->vertexIndex + j ], storevertexcolor ); + } + + // create a temporary patch + Bezier.Patch = new scene::SMeshBufferLightMap(); + + //Loop through the biquadratic patches + for( j = 0; j < biquadHeight; ++j) + { + for( k = 0; k < biquadWidth; ++k) + { + // set up this patch + const s32 inx = j*controlWidth*2 + k*2; + + // setup bezier control points for this patch + Bezier.control[0] = controlPoint[ inx + 0]; + Bezier.control[1] = controlPoint[ inx + 1]; + Bezier.control[2] = controlPoint[ inx + 2]; + Bezier.control[3] = controlPoint[ inx + controlWidth + 0 ]; + Bezier.control[4] = controlPoint[ inx + controlWidth + 1 ]; + Bezier.control[5] = controlPoint[ inx + controlWidth + 2 ]; + Bezier.control[6] = controlPoint[ inx + controlWidth * 2 + 0]; + Bezier.control[7] = controlPoint[ inx + controlWidth * 2 + 1]; + Bezier.control[8] = controlPoint[ inx + controlWidth * 2 + 2]; + + Bezier.tesselate( patchTesselation ); + } + } + + // stitch together with existing geometry + // TODO: only border needs to be checked + const u32 bsize = Bezier.Patch->getVertexCount(); + const u32 msize = meshBuffer->getVertexCount(); +/* + for ( j = 0; j!= bsize; ++j ) + { + const core::vector3df &v = Bezier.Patch->Vertices[j].Pos; + + for ( k = 0; k!= msize; ++k ) + { + const core::vector3df &m = meshBuffer->Vertices[k].Pos; + + if ( !v.equals( m, tolerance ) ) + continue; + + meshBuffer->Vertices[k].Pos = v; + //Bezier.Patch->Vertices[j].Pos = m; + } + } +*/ + + // add Patch to meshbuffer + meshBuffer->Vertices.reallocate(msize+bsize); + for ( j = 0; j!= bsize; ++j ) + { + meshBuffer->Vertices.push_back( Bezier.Patch->Vertices[j] ); + } + + // add indices to meshbuffer + meshBuffer->Indices.reallocate(meshBuffer->getIndexCount()+Bezier.Patch->getIndexCount()); + for ( j = 0; j!= Bezier.Patch->getIndexCount(); ++j ) + { + meshBuffer->Indices.push_back( msize + Bezier.Patch->Indices[j] ); + } + + delete Bezier.Patch; + + if ( LoadParam.verbose > 1 ) + { + LoadParam.endTime = os::Timer::getRealTime(); + + snprintf( buf, sizeof ( buf ), + "quake3::createCurvedSurface_bezier needed %04d ms to create bezier patch.(%dx%d)", + LoadParam.endTime - LoadParam.startTime, + biquadWidth, + biquadHeight + ); + os::Printer::log(buf, ELL_INFORMATION); + } + +} + + + +/*! + Loads entities from file +*/ +void CQ3LevelMesh::getConfiguration( io::IReadFile* file ) +{ + tBSPLump l; + l.offset = file->getPos(); + l.length = file->getSize (); + + core::array<u8> entity; + entity.set_used( l.length + 2 ); + entity[l.length + 1 ] = 0; + + file->seek(l.offset); + file->read( entity.pointer(), l.length); + + parser_parse( entity.pointer(), l.length, &CQ3LevelMesh::scriptcallback_config ); + + if ( Entity.size () ) + Entity.getLast().name = file->getFileName(); +} + + +//! get's an interface to the entities +tQ3EntityList & CQ3LevelMesh::getEntityList() +{ +// Entity.sort(); + return Entity; +} + +//! returns the requested brush entity +IMesh* CQ3LevelMesh::getBrushEntityMesh(s32 num) const +{ + if (num < 1 || num >= NumModels) + return 0; + + return BrushEntities[num]; +} + +//! returns the requested brush entity +IMesh* CQ3LevelMesh::getBrushEntityMesh(quake3::IEntity &ent) const +{ + // This is a helper function to parse the entity, + // so you don't have to. + + s32 num; + + const quake3::SVarGroup* group = ent.getGroup(1); + const core::stringc& modnum = group->get("model"); + + if (!group->isDefined("model")) + return 0; + + const char *temp = modnum.c_str() + 1; // We skip the first character. + num = core::strtol10(temp); + + return getBrushEntityMesh(num); +} + + +/*! +*/ +const IShader * CQ3LevelMesh::getShader(u32 index) const +{ + index &= 0xFFFF; + + if ( index < Shader.size() ) + { + return &Shader[index]; + } + + return 0; +} + + +/*! + loads the shader definition +*/ +const IShader* CQ3LevelMesh::getShader( const c8 * filename, bool fileNameIsValid ) +{ + core::stringc searchName ( filename ); + + IShader search; + search.name = searchName; + search.name.replace( '\\', '/' ); + search.name.make_lower(); + + + core::stringc message; + s32 index; + + //! is Shader already in cache? + index = Shader.linear_search( search ); + if ( index >= 0 ) + { + if ( LoadParam.verbose > 1 ) + { + message = searchName + " found " + Shader[index].name; + os::Printer::log("quake3:getShader", message.c_str(), ELL_INFORMATION); + } + + return &Shader[index]; + } + + io::path loadFile; + + if ( !fileNameIsValid ) + { + // extract the shader name from the last path component in filename + // "scripts/[name].shader" + core::stringc cut( search.name ); + + s32 end = cut.findLast( '/' ); + s32 start = cut.findLast( '/', end - 1 ); + + loadFile = LoadParam.scriptDir; + loadFile.append( cut.subString( start, end - start ) ); + loadFile.append( ".shader" ); + } + else + { + loadFile = search.name; + } + + // already loaded the file ? + index = ShaderFile.binary_search( loadFile ); + if ( index >= 0 ) + return 0; + + // add file to loaded files + ShaderFile.push_back( loadFile ); + + if ( !FileSystem->existFile( loadFile.c_str() ) ) + { + if ( LoadParam.verbose > 1 ) + { + message = loadFile + " for " + searchName + " failed "; + os::Printer::log("quake3:getShader", message.c_str(), ELL_INFORMATION); + } + return 0; + } + + if ( LoadParam.verbose ) + { + message = loadFile + " for " + searchName; + os::Printer::log("quake3:getShader Load shader", message.c_str(), ELL_INFORMATION); + } + + + io::IReadFile *file = FileSystem->createAndOpenFile( loadFile.c_str() ); + if ( file ) + { + getShader ( file ); + file->drop (); + } + + + // search again + index = Shader.linear_search( search ); + return index >= 0 ? &Shader[index] : 0; +} + +/*! + loads the shader definition +*/ +void CQ3LevelMesh::getShader( io::IReadFile* file ) +{ + if ( 0 == file ) + return; + + // load script + core::array<u8> script; + const long len = file->getSize(); + + script.set_used( len + 2 ); + + file->seek( 0 ); + file->read( script.pointer(), len ); + script[ len + 1 ] = 0; + + // start a parser instance + parser_parse( script.pointer(), len, &CQ3LevelMesh::scriptcallback_shader ); +} + + +//! adding default shaders +void CQ3LevelMesh::InitShader() +{ + ReleaseShader(); + + IShader element; + + SVarGroup group; + SVariable variable ( "noshader" ); + + group.Variable.push_back( variable ); + + element.VarGroup = new SVarGroupList(); + element.VarGroup->VariableGroup.push_back( group ); + element.VarGroup->VariableGroup.push_back( SVarGroup() ); + element.name = element.VarGroup->VariableGroup[0].Variable[0].name; + element.ID = Shader.size(); + Shader.push_back( element ); + + if ( LoadParam.loadAllShaders ) + { + io::EFileSystemType current = FileSystem->setFileListSystem ( io::FILESYSTEM_VIRTUAL ); + io::path save = FileSystem->getWorkingDirectory(); + + io::path newDir; + newDir = "/"; + newDir += LoadParam.scriptDir; + newDir += "/"; + FileSystem->changeWorkingDirectoryTo ( newDir.c_str() ); + + core::stringc s; + io::IFileList *fileList = FileSystem->createFileList (); + for (u32 i=0; i< fileList->getFileCount(); ++i) + { + s = fileList->getFullFileName(i); + if ( s.find ( ".shader" ) >= 0 ) + { + if ( 0 == LoadParam.loadSkyShader && s.find ( "sky.shader" ) >= 0 ) + { + } + else + { + getShader ( s.c_str () ); + } + } + } + fileList->drop (); + + FileSystem->changeWorkingDirectoryTo ( save ); + FileSystem->setFileListSystem ( current ); + } +} + + +//! script callback for shaders +//! i'm having troubles with the reference counting, during callback.. resorting.. +void CQ3LevelMesh::ReleaseShader() +{ + for ( u32 i = 0; i!= Shader.size(); ++i ) + { + Shader[i].VarGroup->drop(); + } + Shader.clear(); + ShaderFile.clear(); +} + + +/*! +*/ +void CQ3LevelMesh::ReleaseEntity() +{ + for ( u32 i = 0; i!= Entity.size(); ++i ) + { + Entity[i].VarGroup->drop(); + } + Entity.clear(); +} + + +// config in simple (quake3) and advanced style +void CQ3LevelMesh::scriptcallback_config( SVarGroupList *& grouplist, eToken token ) +{ + IShader element; + + if ( token == Q3_TOKEN_END_LIST ) + { + if ( 0 == grouplist->VariableGroup[0].Variable.size() ) + return; + + element.name = grouplist->VariableGroup[0].Variable[0].name; + } + else + { + if ( grouplist->VariableGroup.size() != 2 ) + return; + + element.name = "configuration"; + } + + grouplist->grab(); + element.VarGroup = grouplist; + element.ID = Entity.size(); + Entity.push_back( element ); +} + + +// entity only has only one valid level.. and no assoziative name.. +void CQ3LevelMesh::scriptcallback_entity( SVarGroupList *& grouplist, eToken token ) +{ + if ( token != Q3_TOKEN_END_LIST || grouplist->VariableGroup.size() != 2 ) + return; + + grouplist->grab(); + + IEntity element; + element.VarGroup = grouplist; + element.ID = Entity.size(); + element.name = grouplist->VariableGroup[1].get( "classname" ); + + + Entity.push_back( element ); +} + + +//!. script callback for shaders +void CQ3LevelMesh::scriptcallback_shader( SVarGroupList *& grouplist,eToken token ) +{ + if ( token != Q3_TOKEN_END_LIST || grouplist->VariableGroup[0].Variable.size()==0) + return; + + + IShader element; + + grouplist->grab(); + element.VarGroup = grouplist; + element.name = element.VarGroup->VariableGroup[0].Variable[0].name; + element.ID = Shader.size(); +/* + core::stringc s; + dumpShader ( s, &element ); + printf ( s.c_str () ); +*/ + Shader.push_back( element ); +} + + +/*! + delete all buffers without geometry in it. +*/ +void CQ3LevelMesh::cleanMeshes() +{ + if ( 0 == LoadParam.cleanUnResolvedMeshes ) + return; + + s32 i; + + // First the main level + for (i = 0; i < E_Q3_MESH_SIZE; i++) + { + bool texture0important = ( i == 0 ); + + cleanMesh(Mesh[i], texture0important); + } + + // Then the brush entities + for (i = 1; i < NumModels; i++) + { + cleanMesh(BrushEntities[i], true); + } +} + +void CQ3LevelMesh::cleanMesh(SMesh *m, const bool texture0important) +{ + // delete all buffers without geometry in it. + u32 run = 0; + u32 remove = 0; + + IMeshBuffer *b; + + run = 0; + remove = 0; + + if ( LoadParam.verbose > 0 ) + { + LoadParam.startTime = os::Timer::getRealTime(); + if ( LoadParam.verbose > 1 ) + { + snprintf( buf, sizeof ( buf ), + "quake3::cleanMeshes start for %d meshes", + m->MeshBuffers.size() + ); + os::Printer::log(buf, ELL_INFORMATION); + } + } + + u32 i = 0; + s32 blockstart = -1; + s32 blockcount = 0; + + while( i < m->MeshBuffers.size()) + { + run += 1; + + b = m->MeshBuffers[i]; + + if ( b->getVertexCount() == 0 || b->getIndexCount() == 0 || + ( texture0important && b->getMaterial().getTexture(0) == 0 ) + ) + { + if ( blockstart < 0 ) + { + blockstart = i; + blockcount = 0; + } + blockcount += 1; + i += 1; + + // delete Meshbuffer + i -= 1; + remove += 1; + b->drop(); + m->MeshBuffers.erase(i); + } + else + { + // clean blockwise + if ( blockstart >= 0 ) + { + if ( LoadParam.verbose > 1 ) + { + snprintf( buf, sizeof ( buf ), + "quake3::cleanMeshes cleaning mesh %d %d size", + blockstart, + blockcount + ); + os::Printer::log(buf, ELL_INFORMATION); + } + blockstart = -1; + } + i += 1; + } + } + + if ( LoadParam.verbose > 0 ) + { + LoadParam.endTime = os::Timer::getRealTime(); + snprintf( buf, sizeof ( buf ), + "quake3::cleanMeshes needed %04d ms to clean %d of %d meshes", + LoadParam.endTime - LoadParam.startTime, + remove, + run + ); + os::Printer::log(buf, ELL_INFORMATION); + } +} + + +// recalculate bounding boxes +void CQ3LevelMesh::calcBoundingBoxes() +{ + if ( LoadParam.verbose > 0 ) + { + LoadParam.startTime = os::Timer::getRealTime(); + + if ( LoadParam.verbose > 1 ) + { + snprintf( buf, sizeof ( buf ), + "quake3::calcBoundingBoxes start create %d textures and %d lightmaps", + NumTextures, + NumLightMaps + ); + os::Printer::log(buf, ELL_INFORMATION); + } + } + + s32 g; + + // create bounding box + for ( g = 0; g != E_Q3_MESH_SIZE; ++g ) + { + for ( u32 j=0; j < Mesh[g]->MeshBuffers.size(); ++j) + { + ((SMeshBufferLightMap*)Mesh[g]->MeshBuffers[j])->recalculateBoundingBox(); + } + + Mesh[g]->recalculateBoundingBox(); + // Mesh[0] is the main bbox + if (g!=0) + Mesh[0]->BoundingBox.addInternalBox(Mesh[g]->getBoundingBox()); + } + + for (g = 1; g < NumModels; g++) + { + for ( u32 j=0; j < BrushEntities[g]->MeshBuffers.size(); ++j) + { + ((SMeshBufferLightMap*)BrushEntities[g]->MeshBuffers[j])-> + recalculateBoundingBox(); + } + + BrushEntities[g]->recalculateBoundingBox(); + } + + if ( LoadParam.verbose > 0 ) + { + LoadParam.endTime = os::Timer::getRealTime(); + + snprintf( buf, sizeof ( buf ), + "quake3::calcBoundingBoxes needed %04d ms to create %d textures and %d lightmaps", + LoadParam.endTime - LoadParam.startTime, + NumTextures, + NumLightMaps + ); + os::Printer::log( buf, ELL_INFORMATION); + } +} + + +//! loads the textures +void CQ3LevelMesh::loadTextures() +{ + if (!Driver) + return; + + if ( LoadParam.verbose > 0 ) + { + LoadParam.startTime = os::Timer::getRealTime(); + + if ( LoadParam.verbose > 1 ) + { + snprintf( buf, sizeof ( buf ), + "quake3::loadTextures start create %d textures and %d lightmaps", + NumTextures, + NumLightMaps + ); + os::Printer::log( buf, ELL_INFORMATION); + } + } + + c8 lightmapname[255]; + s32 t; + + // load lightmaps. + Lightmap.set_used(NumLightMaps); + +/* + bool oldMipMapState = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); +*/ + core::dimension2d<u32> lmapsize(128,128); + + video::IImage* lmapImg; + for ( t = 0; t < NumLightMaps ; ++t) + { + sprintf(lightmapname, "%s.lightmap.%d", LevelName.c_str(), t); + + // lightmap is a CTexture::R8G8B8 format + lmapImg = Driver->createImageFromData( + video::ECF_R8G8B8, lmapsize, + LightMaps[t].imageBits, false, true ); + + Lightmap[t] = Driver->addTexture( lightmapname, lmapImg ); + lmapImg->drop(); + } + +// Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); + + // load textures + Tex.set_used( NumTextures ); + + const IShader* shader; + + core::stringc list; + io::path check; + tTexArray textureArray; + + // pre-load shaders + for ( t=0; t< NumTextures; ++t) + { + shader = getShader(Textures[t].strName, false); + } + + for ( t=0; t< NumTextures; ++t) + { + Tex[t].ShaderID = -1; + Tex[t].Texture = 0; + + list = ""; + + // get a shader ( if one exists ) + shader = getShader( Textures[t].strName, false); + if ( shader ) + { + Tex[t].ShaderID = shader->ID; + + // if texture name == stage1 Texture map + const SVarGroup * group; + + group = shader->getGroup( 2 ); + if ( group ) + { + if ( core::cutFilenameExtension( check, group->get( "map" ) ) == Textures[t].strName ) + { + list += check; + } + else + if ( check == "$lightmap" ) + { + // we check if lightmap is in stage 1 and texture in stage 2 + group = shader->getGroup( 3 ); + if ( group ) + list += group->get( "map" ); + } + } + } + else + { + // no shader, take it + list += Textures[t].strName; + } + + u32 pos = 0; + getTextures( textureArray, list, pos, FileSystem, Driver ); + + Tex[t].Texture = textureArray[0]; + } + + if ( LoadParam.verbose > 0 ) + { + LoadParam.endTime = os::Timer::getRealTime(); + + snprintf( buf, sizeof ( buf ), + "quake3::loadTextures needed %04d ms to create %d textures and %d lightmaps", + LoadParam.endTime - LoadParam.startTime, + NumTextures, + NumLightMaps + ); + os::Printer::log( buf, ELL_INFORMATION); + } +} + + +//! Returns an axis aligned bounding box of the mesh. +const core::aabbox3d<f32>& CQ3LevelMesh::getBoundingBox() const +{ + return Mesh[0]->getBoundingBox(); +} + + +void CQ3LevelMesh::setBoundingBox(const core::aabbox3df& box) +{ + Mesh[0]->setBoundingBox(box); +} + + +//! Returns the type of the animated mesh. +E_ANIMATED_MESH_TYPE CQ3LevelMesh::getMeshType() const +{ + return scene::EAMT_BSP; +} + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BSP_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.h new file mode 100644 index 0000000..b7e9cf1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CQ3LevelMesh.h @@ -0,0 +1,491 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_Q3_LEVEL_MESH_H_INCLUDED__ +#define __C_Q3_LEVEL_MESH_H_INCLUDED__ + +#include "IQ3LevelMesh.h" +#include "IReadFile.h" +#include "IFileSystem.h" +#include "SMesh.h" +#include "SMeshBufferLightMap.h" +#include "IVideoDriver.h" +#include "irrString.h" +#include "ISceneManager.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + class CQ3LevelMesh : public IQ3LevelMesh + { + public: + + //! constructor + CQ3LevelMesh(io::IFileSystem* fs, scene::ISceneManager* smgr, + const quake3::Q3LevelLoadParameter &loadParam); + + //! destructor + virtual ~CQ3LevelMesh(); + + //! loads a level from a .bsp-File. Also tries to load all + //! needed textures. Returns true if successful. + bool loadFile(io::IReadFile* file); + + //! returns the amount of frames in milliseconds. If the amount + //! is 1, it is a static (=non animated) mesh. + virtual u32 getFrameCount() const; + + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const + { + return FramesPerSecond; + } + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps) + { + FramesPerSecond=fps; + } + + //! returns the animated mesh based on a detail level. 0 is the + //! lowest, 255 the highest detail. Note, that some Meshes will + //! ignore the detail level. + virtual IMesh* getMesh(s32 frameInMs, s32 detailLevel=255, + s32 startFrameLoop=-1, s32 endFrameLoop=-1); + + //! Returns an axis aligned bounding box of the mesh. + //! \return A bounding box of this mesh is returned. + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + virtual void setBoundingBox( const core::aabbox3df& box); + + //! Returns the type of the animated mesh. + virtual E_ANIMATED_MESH_TYPE getMeshType() const; + + //! loads the shader definition + virtual void getShader( io::IReadFile* file ); + + //! loads the shader definition + virtual const quake3::IShader * getShader( const c8 * filename, bool fileNameIsValid=true ); + + //! returns a already loaded Shader + virtual const quake3::IShader * getShader( u32 index ) const; + + + //! loads a configuration file + virtual void getConfiguration( io::IReadFile* file ); + //! get's an interface to the entities + virtual quake3::tQ3EntityList & getEntityList(); + + //! returns the requested brush entity + virtual IMesh* getBrushEntityMesh(s32 num) const; + + //! returns the requested brush entity + virtual IMesh* getBrushEntityMesh(quake3::IEntity &ent) const; + + //Link to held meshes? ... + + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const + { + return 0; + } + + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const + { + return 0; + } + + //! Returns pointer to a mesh buffer which fits a material + /** \param material: material to search for + \return Pointer to the mesh buffer or 0 if there is no such mesh buffer. */ + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const + { + return 0; + } + + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) + { + return; + } + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) + { + return; + } + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) + { + return; + } + + private: + + + void constructMesh(); + void solveTJunction(); + void loadTextures(); + scene::SMesh** buildMesh(s32 num); + + struct STexShader + { + video::ITexture* Texture; + s32 ShaderID; + }; + + core::array< STexShader > Tex; + core::array<video::ITexture*> Lightmap; + + enum eLumps + { + kEntities = 0, // Stores player/object positions, etc... + kShaders = 1, // Stores texture information + kPlanes = 2, // Stores the splitting planes + kNodes = 3, // Stores the BSP nodes + kLeafs = 4, // Stores the leafs of the nodes + kLeafFaces = 5, // Stores the leaf's indices into the faces + kLeafBrushes = 6, // Stores the leaf's indices into the brushes + kModels = 7, // Stores the info of world models + kBrushes = 8, // Stores the brushes info (for collision) + kBrushSides = 9, // Stores the brush surfaces info + kVertices = 10, // Stores the level vertices + kMeshVerts = 11, // Stores the model vertices offsets + kFogs = 12, // Stores the shader files (blending, anims..) + kFaces = 13, // Stores the faces for the level + kLightmaps = 14, // Stores the lightmaps for the level + kLightGrid = 15, // Stores extra world lighting information + kVisData = 16, // Stores PVS and cluster info (visibility) + kLightArray = 17, // RBSP + kMaxLumps // A constant to store the number of lumps + }; + + enum eBspSurfaceType + { + BSP_MST_BAD, + BSP_MST_PLANAR, + BSP_MST_PATCH, + BSP_MST_TRIANGLE_SOUP, + BSP_MST_FLARE, + BSP_MST_FOLIAGE + + }; + + struct tBSPHeader + { + s32 strID; // This should always be 'IBSP' + s32 version; // This should be 0x2e for Quake 3 files + }; + tBSPHeader header; + + struct tBSPLump + { + s32 offset; + s32 length; + }; + + + struct tBSPVertex + { + f32 vPosition[3]; // (x, y, z) position. + f32 vTextureCoord[2]; // (u, v) texture coordinate + f32 vLightmapCoord[2]; // (u, v) lightmap coordinate + f32 vNormal[3]; // (x, y, z) normal vector + u8 color[4]; // RGBA color for the vertex + }; + + struct tBSPFace + { + s32 textureID; // The index into the texture array + s32 fogNum; // The index for the effects (or -1 = n/a) + s32 type; // 1=polygon, 2=patch, 3=mesh, 4=billboard + s32 vertexIndex; // The index into this face's first vertex + s32 numOfVerts; // The number of vertices for this face + s32 meshVertIndex; // The index into the first meshvertex + s32 numMeshVerts; // The number of mesh vertices + s32 lightmapID; // The texture index for the lightmap + s32 lMapCorner[2]; // The face's lightmap corner in the image + s32 lMapSize[2]; // The size of the lightmap section + f32 lMapPos[3]; // The 3D origin of lightmap. + f32 lMapBitsets[2][3]; // The 3D space for s and t unit vectors. + f32 vNormal[3]; // The face normal. + s32 size[2]; // The bezier patch dimensions. + }; + + struct tBSPTexture + { + c8 strName[64]; // The name of the texture w/o the extension + u32 flags; // The surface flags (unknown) + u32 contents; // The content flags (unknown) + }; + + struct tBSPLightmap + { + u8 imageBits[128][128][3]; // The RGB data in a 128x128 image + }; + + struct tBSPNode + { + s32 plane; // The index into the planes array + s32 front; // The child index for the front node + s32 back; // The child index for the back node + s32 mins[3]; // The bounding box min position. + s32 maxs[3]; // The bounding box max position. + }; + + struct tBSPLeaf + { + s32 cluster; // The visibility cluster + s32 area; // The area portal + s32 mins[3]; // The bounding box min position + s32 maxs[3]; // The bounding box max position + s32 leafface; // The first index into the face array + s32 numOfLeafFaces; // The number of faces for this leaf + s32 leafBrush; // The first index for into the brushes + s32 numOfLeafBrushes; // The number of brushes for this leaf + }; + + struct tBSPPlane + { + f32 vNormal[3]; // Plane normal. + f32 d; // The plane distance from origin + }; + + struct tBSPVisData + { + s32 numOfClusters; // The number of clusters + s32 bytesPerCluster; // Bytes (8 bits) in the cluster's bitset + c8 *pBitsets; // Array of bytes holding the cluster vis. + }; + + struct tBSPBrush + { + s32 brushSide; // The starting brush side for the brush + s32 numOfBrushSides; // Number of brush sides for the brush + s32 textureID; // The texture index for the brush + }; + + struct tBSPBrushSide + { + s32 plane; // The plane index + s32 textureID; // The texture index + }; + + struct tBSPModel + { + f32 min[3]; // The min position for the bounding box + f32 max[3]; // The max position for the bounding box. + s32 faceIndex; // The first face index in the model + s32 numOfFaces; // The number of faces in the model + s32 brushIndex; // The first brush index in the model + s32 numOfBrushes; // The number brushes for the model + }; + + struct tBSPFog + { + c8 shader[64]; // The name of the shader file + s32 brushIndex; // The brush index for this shader + s32 visibleSide; // the brush side that ray tests need to clip against (-1 == none + }; + core::array < STexShader > FogMap; + + struct tBSPLights + { + u8 ambient[3]; // This is the ambient color in RGB + u8 directional[3]; // This is the directional color in RGB + u8 direction[2]; // The direction of the light: [phi,theta] + }; + + void loadTextures (tBSPLump* l, io::IReadFile* file); // Load the textures + void loadLightmaps (tBSPLump* l, io::IReadFile* file); // Load the lightmaps + void loadVerts (tBSPLump* l, io::IReadFile* file); // Load the vertices + void loadFaces (tBSPLump* l, io::IReadFile* file); // Load the faces + void loadPlanes (tBSPLump* l, io::IReadFile* file); // Load the Planes of the BSP + void loadNodes (tBSPLump* l, io::IReadFile* file); // load the Nodes of the BSP + void loadLeafs (tBSPLump* l, io::IReadFile* file); // load the Leafs of the BSP + void loadLeafFaces (tBSPLump* l, io::IReadFile* file); // load the Faces of the Leafs of the BSP + void loadVisData (tBSPLump* l, io::IReadFile* file); // load the visibility data of the clusters + void loadEntities (tBSPLump* l, io::IReadFile* file); // load the entities + void loadModels (tBSPLump* l, io::IReadFile* file); // load the models + void loadMeshVerts (tBSPLump* l, io::IReadFile* file); // load the mesh vertices + void loadBrushes (tBSPLump* l, io::IReadFile* file); // load the brushes of the BSP + void loadBrushSides (tBSPLump* l, io::IReadFile* file); // load the brushsides of the BSP + void loadLeafBrushes(tBSPLump* l, io::IReadFile* file); // load the brushes of the leaf + void loadFogs (tBSPLump* l, io::IReadFile* file); // load the shaders + + //bi-quadratic bezier patches + void createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer, + s32 faceIndex, s32 patchTesselation, s32 storevertexcolor); + + void createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBuffer, + s32 faceIndex, s32 patchTesselation, s32 storevertexcolor); + + struct S3DVertex2TCoords_64 + { + core::vector3d<f64> Pos; + core::vector3d<f64> Normal; + video::SColorf Color; + core::vector2d<f64> TCoords; + core::vector2d<f64> TCoords2; + + void copy( video::S3DVertex2TCoords &dest ) const; + + S3DVertex2TCoords_64() {} + S3DVertex2TCoords_64(const core::vector3d<f64>& pos, const core::vector3d<f64>& normal, const video::SColorf& color, + const core::vector2d<f64>& tcoords, const core::vector2d<f64>& tcoords2) + : Pos(pos), Normal(normal), Color(color), TCoords(tcoords), TCoords2(tcoords2) {} + + S3DVertex2TCoords_64 getInterpolated_quadratic(const S3DVertex2TCoords_64& v2, + const S3DVertex2TCoords_64& v3, const f64 d) const + { + return S3DVertex2TCoords_64 ( + Pos.getInterpolated_quadratic ( v2.Pos, v3.Pos, d ), + Normal.getInterpolated_quadratic ( v2.Normal, v3.Normal, d ), + Color.getInterpolated_quadratic ( v2.Color, v3.Color, (f32) d ), + TCoords.getInterpolated_quadratic ( v2.TCoords, v3.TCoords, d ), + TCoords2.getInterpolated_quadratic ( v2.TCoords2, v3.TCoords2, d )); + } + }; + + inline void copy( video::S3DVertex2TCoords * dest, const tBSPVertex * source, + s32 vertexcolor ) const; + void copy( S3DVertex2TCoords_64 * dest, const tBSPVertex * source, s32 vertexcolor ) const; + + + struct SBezier + { + SMeshBufferLightMap *Patch; + S3DVertex2TCoords_64 control[9]; + + void tesselate(s32 level); + + private: + s32 Level; + + core::array<S3DVertex2TCoords_64> column[3]; + + }; + SBezier Bezier; + + quake3::Q3LevelLoadParameter LoadParam; + + tBSPLump Lumps[kMaxLumps]; + + tBSPTexture* Textures; + s32 NumTextures; + + tBSPLightmap* LightMaps; + s32 NumLightMaps; + + tBSPVertex* Vertices; + s32 NumVertices; + + tBSPFace* Faces; + s32 NumFaces; + + tBSPModel* Models; + s32 NumModels; + + tBSPPlane* Planes; + s32 NumPlanes; + + tBSPNode* Nodes; + s32 NumNodes; + + tBSPLeaf* Leafs; + s32 NumLeafs; + + s32 *LeafFaces; + s32 NumLeafFaces; + + s32 *MeshVerts; // The vertex offsets for a mesh + s32 NumMeshVerts; + + tBSPBrush* Brushes; + s32 NumBrushes; + + scene::SMesh** BrushEntities; + + scene::SMesh* Mesh[quake3::E_Q3_MESH_SIZE]; + video::IVideoDriver* Driver; + core::stringc LevelName; + io::IFileSystem* FileSystem; // needs because there are no file extenstions stored in .bsp files. + + // Additional content + scene::ISceneManager* SceneManager; + enum eToken + { + Q3_TOKEN_UNRESOLVED = 0, + Q3_TOKEN_EOF = 1, + Q3_TOKEN_START_LIST, + Q3_TOKEN_END_LIST, + Q3_TOKEN_ENTITY, + Q3_TOKEN_TOKEN, + Q3_TOKEN_EOL, + Q3_TOKEN_COMMENT, + Q3_TOKEN_MATH_DIVIDE, + Q3_TOKEN_MATH_ADD, + Q3_TOKEN_MATH_MULTIPY + }; + struct SQ3Parser + { + const c8 *source; + u32 sourcesize; + u32 index; + core::stringc token; + eToken tokenresult; + }; + SQ3Parser Parser; + + + typedef void( CQ3LevelMesh::*tParserCallback ) ( quake3::SVarGroupList *& groupList, eToken token ); + void parser_parse( const void * data, u32 size, tParserCallback callback ); + void parser_nextToken(); + + void dumpVarGroup( const quake3::SVarGroup * group, s32 stack ) const; + + void scriptcallback_entity( quake3::SVarGroupList *& grouplist, eToken token ); + void scriptcallback_shader( quake3::SVarGroupList *& grouplist, eToken token ); + void scriptcallback_config( quake3::SVarGroupList *& grouplist, eToken token ); + + core::array < quake3::IShader > Shader; + core::array < quake3::IShader > Entity; //quake3::tQ3EntityList Entity; + + + quake3::tStringList ShaderFile; + void InitShader(); + void ReleaseShader(); + void ReleaseEntity(); + + + s32 setShaderMaterial( video::SMaterial & material, const tBSPFace * face ) const; + s32 setShaderFogMaterial( video::SMaterial &material, const tBSPFace * face ) const; + + struct SToBuffer + { + s32 takeVertexColor; + u32 index; + }; + + void cleanMeshes(); + void cleanMesh(SMesh *m, const bool texture0important = false); + void cleanLoader (); + void calcBoundingBoxes(); + c8 buf[128]; + f32 FramesPerSecond; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.cpp new file mode 100644 index 0000000..9219782 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.cpp @@ -0,0 +1,1376 @@ +// Copyright (C) 2002-2012 Thomas Alten / Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_BSP_LOADER_ + +#include "CQuake3ShaderSceneNode.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" +#include "ICameraSceneNode.h" +#include "SViewFrustum.h" +#include "IMeshManipulator.h" +#include "SMesh.h" +#include "IMaterialRenderer.h" +#include "CShadowVolumeSceneNode.h" + +namespace irr +{ +namespace scene +{ + +// who, if not you.. +using namespace quake3; + +/*! +*/ +CQuake3ShaderSceneNode::CQuake3ShaderSceneNode( + scene::ISceneNode* parent, scene::ISceneManager* mgr,s32 id, + io::IFileSystem *fileSystem, const scene::IMeshBuffer *original, + const IShader * shader) +: scene::IMeshSceneNode(parent, mgr, id, + core::vector3df(0.f, 0.f, 0.f), + core::vector3df(0.f, 0.f, 0.f), + core::vector3df(1.f, 1.f, 1.f)), + Shader(shader), Mesh(0), Shadow(0), Original(0), MeshBuffer(0), TimeAbs(0.f) +{ + #ifdef _DEBUG + core::stringc dName = "CQuake3ShaderSceneNode "; + dName += Shader->name; + + setDebugName( dName.c_str() ); + #endif + + // name the Scene Node + this->Name = Shader->name; + + // take lightmap vertex type + MeshBuffer = new SMeshBuffer(); + + Mesh = new SMesh (); + Mesh->addMeshBuffer ( MeshBuffer ); + MeshBuffer->drop (); + + //Original = new SMeshBufferLightMap(); + Original = (const scene::SMeshBufferLightMap*) original; + Original->grab(); + + // clone meshbuffer to modifiable buffer + cloneBuffer(MeshBuffer, Original, + Original->getMaterial().ColorMask != 0); + + // load all Textures in all stages + loadTextures( fileSystem ); + + setAutomaticCulling( scene::EAC_OFF ); +} + + +/*! +*/ +CQuake3ShaderSceneNode::~CQuake3ShaderSceneNode() +{ + if (Shadow) + Shadow->drop(); + + if (Mesh) + Mesh->drop(); + + if (Original) + Original->drop(); +} + + + +/* + create single copies +*/ +void CQuake3ShaderSceneNode::cloneBuffer( scene::SMeshBuffer *dest, const scene::SMeshBufferLightMap * buffer, bool translateCenter ) +{ + dest->Material = buffer->Material; + dest->Indices = buffer->Indices; + + const u32 vsize = buffer->Vertices.size(); + + dest->Vertices.set_used( vsize ); + for ( u32 i = 0; i!= vsize; ++i ) + { + const video::S3DVertex2TCoords& src = buffer->Vertices[i]; + video::S3DVertex &dst = dest->Vertices[i]; + + dst.Pos = src.Pos; + dst.Normal = src.Normal; + dst.Color = 0xFFFFFFFF; + dst.TCoords = src.TCoords; + + if ( i == 0 ) + dest->BoundingBox.reset ( src.Pos ); + else + dest->BoundingBox.addInternalPoint ( src.Pos ); + } + + // move the (temp) Mesh to a ScenePosititon + // set Scene Node Position + + if ( translateCenter ) + { + MeshOffset = dest->BoundingBox.getCenter(); + setPosition( MeshOffset ); + + core::matrix4 m; + m.setTranslation( -MeshOffset ); + SceneManager->getMeshManipulator()->transform( dest, m ); + } + + // No Texture!. Use Shader-Pointer for sorting + dest->Material.setTexture(0, (video::ITexture*) Shader); +} + + +/* + load the textures for all stages +*/ +void CQuake3ShaderSceneNode::loadTextures( io::IFileSystem * fileSystem ) +{ + const SVarGroup *group; + u32 i; + + video::IVideoDriver *driver = SceneManager->getVideoDriver(); + + // generic stage + u32 mipmap = 0; + group = Shader->getGroup( 1 ); + if ( group->isDefined ( "nomipmaps" ) ) + { + mipmap = 2 | (driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS)? 1: 0 ); + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); + } + + // clear all stages and prefill empty + Q3Texture.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); + Q3Texture.clear(); + for ( i = 0; i != Shader->VarGroup->VariableGroup.size(); ++i ) + { + Q3Texture.push_back( SQ3Texture() ); + } + + u32 pos; + + // get texture map + for ( i = 0; i < Shader->VarGroup->VariableGroup.size(); ++i ) + { + group = Shader->getGroup( i ); + + const core::stringc &mapname = group->get( "map" ); + if ( 0 == mapname.size() ) + continue; + + // our lightmap is passed in material.Texture[2] + if ( mapname == "$lightmap" ) + { + Q3Texture [i].Texture.push_back( Original->getMaterial().getTexture(1) ); + } + else + { + pos = 0; + getTextures( Q3Texture [i].Texture, mapname, pos, fileSystem, driver ); + } + } + + // get anim map + for ( i = 0; i < Shader->VarGroup->VariableGroup.size(); ++i ) + { + if ( Q3Texture [i].Texture.size() ) + continue; + + group = Shader->getGroup( i ); + + const core::stringc &animmap = group->get( "animmap" ); + if ( 0 == animmap.size() ) + continue; + + // first parameter is frequency + pos = 0; + Q3Texture [i].TextureFrequency = core::max_( 0.0001f, getAsFloat( animmap, pos ) ); + + getTextures( Q3Texture [i].Texture, animmap, pos,fileSystem, driver ); + } + + // get clamp map + for ( i = 0; i < Shader->VarGroup->VariableGroup.size(); ++i ) + { + if ( Q3Texture [i].Texture.size() ) + continue; + + group = Shader->getGroup( i ); + + const core::stringc &clampmap = group->get( "clampmap" ); + if ( 0 == clampmap.size() ) + continue; + + Q3Texture [i].TextureAddressMode = video::ETC_CLAMP_TO_EDGE; + pos = 0; + getTextures( Q3Texture [i].Texture, clampmap, pos,fileSystem, driver ); + } + + if ( mipmap & 2 ) + driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, mipmap & 1); +} + +/* + Register each texture stage, if first is visible +*/ +void CQuake3ShaderSceneNode::OnRegisterSceneNode() +{ + if ( isVisible() ) + { + SceneManager->registerNodeForRendering(this, getRenderStage() ); + } + ISceneNode::OnRegisterSceneNode(); +} + +/* + is this a transparent node ? +*/ +E_SCENE_NODE_RENDER_PASS CQuake3ShaderSceneNode::getRenderStage() const +{ + E_SCENE_NODE_RENDER_PASS ret = ESNRP_SOLID; + + // generic stage + const SVarGroup *group; + + group = Shader->getGroup( 1 ); +/* + else + if ( group->getIndex( "portal" ) >= 0 ) + { + ret = ESNRP_TRANSPARENT_EFFECT; + } + else +*/ + if ( group->isDefined( "sort", "opaque" ) ) + { + ret = ESNRP_SOLID; + } + else + if ( group->isDefined( "sort", "additive" ) ) + { + ret = ESNRP_TRANSPARENT; + } + else + if ( strstr ( Shader->name.c_str(), "flame" ) || + group->isDefined( "surfaceparm", "water" ) || + group->isDefined( "sort", "underwater" ) || + group->isDefined( "sort", "underwater" ) + ) + { + ret = ESNRP_TRANSPARENT_EFFECT; + } + else + { + // Look if first drawing stage needs graphical underlay + for ( u32 stage = 2; stage < Shader->VarGroup->VariableGroup.size(); ++stage ) + { + if ( 0 == Q3Texture [ stage ].Texture.size() ) + continue; + + group = Shader->getGroup( stage ); + + SBlendFunc blendfunc ( video::EMFN_MODULATE_1X ); + getBlendFunc( group->get( "blendfunc" ), blendfunc ); + getBlendFunc( group->get( "alphafunc" ), blendfunc ); + + //ret = blendfunc.isTransparent ? ESNRP_TRANSPARENT : ESNRP_SOLID; + if ( blendfunc.isTransparent ) + { + ret = ESNRP_TRANSPARENT; + } + break; + } + } + + return ret; +} + + +/* + render in multipass technique +*/ +void CQuake3ShaderSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + E_SCENE_NODE_RENDER_PASS pass = SceneManager->getSceneNodeRenderPass(); + + video::SMaterial material; + const SVarGroup *group; + + material.Lighting = false; + material.setTexture(1, 0); + material.NormalizeNormals = false; + + // generic stage + group = Shader->getGroup( 1 ); + material.BackfaceCulling = getCullingFunction( group->get( "cull" ) ); + + u32 pushProjection = 0; + core::matrix4 projection ( core::matrix4::EM4CONST_NOTHING ); + + // decal ( solve z-fighting ) + if ( group->isDefined( "polygonoffset" ) ) + { + projection = driver->getTransform( video::ETS_PROJECTION ); + + core::matrix4 decalProjection ( projection ); + +/* + f32 n = SceneManager->getActiveCamera()->getNearValue(); + f32 f = SceneManager->getActiveCamera()->getFarValue (); + + f32 delta = 0.01f; + f32 pz = 0.2f; + f32 epsilon = -2.f * f * n * delta / ( ( f + n ) * pz * ( pz + delta ) ); + decalProjection[10] *= 1.f + epsilon; +*/ + // TODO: involve camera + decalProjection[10] -= 0.0002f; + driver->setTransform( video::ETS_PROJECTION, decalProjection ); + pushProjection |= 1; + } + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation ); + if (Shadow) + Shadow->updateShadowVolumes(); + + //! render all stages + u32 drawCount = (pass == ESNRP_TRANSPARENT_EFFECT) ? 1 : 0; + core::matrix4 textureMatrix ( core::matrix4::EM4CONST_NOTHING ); + for ( u32 stage = 1; stage < Shader->VarGroup->VariableGroup.size(); ++stage ) + { + SQ3Texture &q = Q3Texture[stage]; + + // advance current stage + textureMatrix.makeIdentity(); + animate( stage, textureMatrix ); + + // stage finished, no drawing stage ( vertex transform only ) + video::ITexture * tex = q.Texture.size() ? q.Texture [ q.TextureIndex ] : 0; + if ( 0 == tex ) + continue; + + // current stage + group = Shader->getGroup( stage ); + + material.setTexture(0, tex ); + material.ZBuffer = getDepthFunction( group->get( "depthfunc" ) ); + + if ( group->isDefined( "depthwrite" ) ) + { + material.ZWriteEnable = true; + } + else + { + material.ZWriteEnable = drawCount == 0; + } + + //resolve quake3 blendfunction to irrlicht Material Type + SBlendFunc blendfunc ( video::EMFN_MODULATE_1X ); + getBlendFunc( group->get( "blendfunc" ), blendfunc ); + getBlendFunc( group->get( "alphafunc" ), blendfunc ); + + material.MaterialType = blendfunc.type; + material.MaterialTypeParam = blendfunc.param0; + + material.TextureLayer[0].TextureWrapU = q.TextureAddressMode; + material.TextureLayer[0].TextureWrapV = q.TextureAddressMode; + //material.TextureLayer[0].TrilinearFilter = 1; + //material.TextureLayer[0].AnisotropicFilter = 0xFF; + material.setTextureMatrix( 0, textureMatrix ); + + driver->setMaterial( material ); + driver->drawMeshBuffer( MeshBuffer ); + drawCount += 1; + + } + + if ( DebugDataVisible & scene::EDS_MESH_WIRE_OVERLAY ) + { + video::SMaterial deb_m; + deb_m.Wireframe = true; + deb_m.Lighting = false; + deb_m.BackfaceCulling = material.BackfaceCulling; + driver->setMaterial( deb_m ); + + driver->drawMeshBuffer( MeshBuffer ); + } + + // show normals + if ( DebugDataVisible & scene::EDS_NORMALS ) + { + video::SMaterial deb_m; + + IAnimatedMesh * arrow = SceneManager->addArrowMesh ( + "__debugnormalq3", + 0xFFECEC00,0xFF999900, + 4, 8, + 8.f, 6.f, + 0.5f,1.f + ); + if ( 0 == arrow ) + { + arrow = SceneManager->getMesh ( "__debugnormalq3" ); + } + const IMesh *mesh = arrow->getMesh ( 0 ); + + // find a good scaling factor + + core::matrix4 m2; + + // draw normals + const scene::IMeshBuffer* mb = MeshBuffer; + const u32 vSize = video::getVertexPitchFromType(mb->getVertexType()); + const video::S3DVertex* v = ( const video::S3DVertex*)mb->getVertices(); + + //f32 colCycle = 270.f / (f32) core::s32_max ( mb->getVertexCount() - 1, 1 ); + + for ( u32 i=0; i != mb->getVertexCount(); ++i ) + { + // Align to v->normal + m2.buildRotateFromTo ( core::vector3df ( 0.f, 1.f, 0 ), v->Normal ); + m2.setTranslation ( v->Pos + AbsoluteTransformation.getTranslation () ); +/* + core::quaternion quatRot( v->Normal.Z, 0.f, -v->Normal.X, 1 + v->Normal.Y ); + quatRot.normalize(); + quatRot.getMatrix ( m2, v->Pos ); + + m2 [ 12 ] += AbsoluteTransformation [ 12 ]; + m2 [ 13 ] += AbsoluteTransformation [ 13 ]; + m2 [ 14 ] += AbsoluteTransformation [ 14 ]; +*/ + driver->setTransform(video::ETS_WORLD, m2 ); + + deb_m.Lighting = true; +/* + irr::video::SColorHSL color; + irr::video::SColor rgb(0); + color.Hue = i * colCycle * core::DEGTORAD; + color.Saturation = 1.f; + color.Luminance = 0.5f; + color.toRGB( deb_m.EmissiveColor ); +*/ + switch ( i ) + { + case 0: deb_m.EmissiveColor.set(0xFFFFFFFF); break; + case 1: deb_m.EmissiveColor.set(0xFFFF0000); break; + case 2: deb_m.EmissiveColor.set(0xFF00FF00); break; + case 3: deb_m.EmissiveColor.set(0xFF0000FF); break; + default: + deb_m.EmissiveColor = v->Color; break; + } + driver->setMaterial( deb_m ); + + for ( u32 a = 0; a != mesh->getMeshBufferCount(); ++a ) + driver->drawMeshBuffer ( mesh->getMeshBuffer ( a ) ); + + v = (const video::S3DVertex*) ( (u8*) v + vSize ); + } + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + } + + + if ( pushProjection & 1 ) + { + driver->setTransform( video::ETS_PROJECTION, projection ); + } + + if ( DebugDataVisible & scene::EDS_BBOX ) + { + video::SMaterial deb_m; + deb_m.Lighting = false; + driver->setMaterial(deb_m); + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + driver->draw3DBox( getBoundingBox(), video::SColor(255,255,0,0)); + } + +} + + +//! Removes a child from this scene node. +//! Implemented here, to be able to remove the shadow properly, if there is one, +//! or to remove attached childs. +bool CQuake3ShaderSceneNode::removeChild(ISceneNode* child) +{ + if (child && Shadow == child) + { + Shadow->drop(); + Shadow = 0; + } + + return ISceneNode::removeChild(child); +} + + +//! Creates shadow volume scene node as child of this node +//! and returns a pointer to it. +IShadowVolumeSceneNode* CQuake3ShaderSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) +{ + if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) + return 0; + + if (!shadowMesh) + shadowMesh = Mesh; // if null is given, use the mesh of node + + if (Shadow) + Shadow->drop(); + + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); + return Shadow; +} + + +/*! +3.3.1 deformVertexes wave <div> <func> <base> <amplitude> <phase> <freq> + Designed for water surfaces, modifying the values differently at each point. + It accepts the standard wave functions of the type sin, triangle, square, sawtooth + or inversesawtooth. The "div" parameter is used to control the wave "spread" + - a value equal to the tessSize of the surface is a good default value + (tessSize is subdivision size, in game units, used for the shader when seen in the game world) . +*/ +void CQuake3ShaderSceneNode::deformvertexes_wave( f32 dt, SModifierFunction &function ) +{ + function.wave = core::reciprocal( function.wave ); + + const f32 phase = function.phase; + + const u32 vsize = Original->Vertices.size(); + for ( u32 i = 0; i != vsize; ++i ) + { + const video::S3DVertex2TCoords &src = Original->Vertices[i]; + video::S3DVertex &dst = MeshBuffer->Vertices[i]; + + if ( 0 == function.count ) + dst.Pos = src.Pos - MeshOffset; + + const f32 wavephase = (dst.Pos.X + dst.Pos.Y + dst.Pos.Z) * function.wave; + function.phase = phase + wavephase; + + const f32 f = function.evaluate( dt ); + + dst.Pos.X += f * src.Normal.X; + dst.Pos.Y += f * src.Normal.Y; + dst.Pos.Z += f * src.Normal.Z; + + if ( i == 0 ) + MeshBuffer->BoundingBox.reset ( dst.Pos ); + else + MeshBuffer->BoundingBox.addInternalPoint ( dst.Pos ); + } + function.count = 1; +} + +/*! + deformVertexes move x y z func base amplitude phase freq + The move parameter is used to make a brush, curve patch or model + appear to move together as a unit. The x y z values are the distance + and direction in game units the object appears to move relative to + it's point of origin in the map. The func base amplitude phase freq values are + the same as found in other waveform manipulations. + + The product of the function modifies the values x, y, and z. + Therefore, if you have an amplitude of 5 and an x value of 2, + the object will travel 10 units from its point of origin along the x axis. + This results in a total of 20 units of motion along the x axis, since the + amplitude is the variation both above and below the base. + + It must be noted that an object made with this shader does not actually + change position, it only appears to. + + Design Notes: + If an object is made up of surfaces with different shaders, all must have + matching deformVertexes move values or the object will appear to tear itself apart. +*/ +void CQuake3ShaderSceneNode::deformvertexes_move( f32 dt, SModifierFunction &function ) +{ + function.wave = core::reciprocal( function.wave ); + const f32 f = function.evaluate( dt ); + + const u32 vsize = Original->Vertices.size(); + for ( u32 i = 0; i != vsize; ++i ) + { + const video::S3DVertex2TCoords &src = Original->Vertices[i]; + video::S3DVertex &dst = MeshBuffer->Vertices[i]; + + if ( 0 == function.count ) + dst.Pos = src.Pos - MeshOffset; + + dst.Pos.X += f * function.x; + dst.Pos.Y += f * function.y; + dst.Pos.Z += f * function.z; + + if ( i == 0 ) + MeshBuffer->BoundingBox.reset ( dst.Pos ); + else + MeshBuffer->BoundingBox.addInternalPoint ( dst.Pos ); + } + function.count = 1; + +} + +/*! + 3.3.2 deformVertexes normal <div> <func> <base> <amplitude ~0.1-~0.5> <frequency ~1.0-~4.0> + This deformation affects the normals of a vertex without actually moving it, + which will effect later shader options like lighting and especially environment mapping. + If the shader stages don't use normals in any of their calculations, there will + be no visible effect. + + Design Notes: Putting values of 0.1 t o 0.5 in Amplitude and 1.0 to 4.0 in the + Frequency can produce some satisfying results. Some things that have been + done with it: A small fluttering bat, falling leaves, rain, flags. +*/ +void CQuake3ShaderSceneNode::deformvertexes_normal( f32 dt, SModifierFunction &function ) +{ + function.func = SINUS; + const u32 vsize = Original->Vertices.size(); + for ( u32 i = 0; i != vsize; ++i ) + { + const video::S3DVertex2TCoords &src = Original->Vertices[i]; + video::S3DVertex &dst = MeshBuffer->Vertices[i]; + + function.base = atan2f ( src.Pos.X, src.Pos.Y ); + function.phase = src.Pos.X + src.Pos.Z; + + const f32 lat = function.evaluate( dt ); + + function.base = src.Normal.Y; + function.phase = src.Normal.Z + src.Normal.X; + + const f32 lng = function.evaluate( dt ); + + dst.Normal.X = cosf ( lat ) * sinf ( lng ); + dst.Normal.Y = sinf ( lat ) * sinf ( lng ); + dst.Normal.Z = cosf ( lng ); + + } +} + + +/*! + 3.3.3 deformVertexes bulge <bulgeWidth> <bulgeHeight> <bulgeSpeed> + This forces a bulge to move along the given s and t directions. Designed for use + on curved pipes. + + Specific parameter definitions for deform keywords: + <div> This is roughly defined as the size of the waves that occur. + It is measured in game units. Smaller values create a greater + density of smaller wave forms occurring in a given area. + Larger values create a lesser density of waves, or otherwise put, + the appearance of larger waves. To look correct this value should + closely correspond to the value (in pixels) set for tessSize (tessellation size) + of the texture. A value of 100.0 is a good default value + (which means your tessSize should be close to that for things to look "wavelike"). + + <func> This is the type of wave form being created. Sin stands for sine wave, + a regular smoothly flowing wave. Triangle is a wave with a sharp ascent + and a sharp decay. It will make a choppy looking wave forms. + A square wave is simply on or off for the period of the + frequency with no in between. The sawtooth wave has the ascent of a + triangle wave, but has the decay cut off sharply like a square wave. + An inversesawtooth wave reverses this. + + <base> This is the distance, in game units that the apparent surface of the + texture is displaced from the actual surface of the brush as placed + in the editor. A positive value appears above the brush surface. + A negative value appears below the brush surface. + An example of this is the Quad effect, which essentially is a + shell with a positive base value to stand it away from the model + surface and a 0 (zero) value for amplitude. + + <amplitude> The distance that the deformation moves away from the base value. + See Wave Forms in the introduction for a description of amplitude. + + <phase> See Wave Forms in the introduction for a description of phase) + + <frequency> See Wave Forms in the introduction for a description of frequency) + + Design Note: The div and amplitude parameters, when used in conjunction with + liquid volumes like water should take into consideration how much the water + will be moving. A large ocean area would have have massive swells (big div values) + that rose and fell dramatically (big amplitude values). While a small, quiet pool + may move very little. +*/ +void CQuake3ShaderSceneNode::deformvertexes_bulge( f32 dt, SModifierFunction &function ) +{ + function.func = SINUS; + function.wave = core::reciprocal( function.bulgewidth ); + + dt *= function.bulgespeed * 0.1f; + const f32 phase = function.phase; + + const u32 vsize = Original->Vertices.size(); + for ( u32 i = 0; i != vsize; ++i ) + { + const video::S3DVertex2TCoords &src = Original->Vertices[i]; + video::S3DVertex &dst = MeshBuffer->Vertices[i]; + + const f32 wavephase = (Original->Vertices[i].TCoords.X ) * function.wave; + function.phase = phase + wavephase; + + const f32 f = function.evaluate( dt ); + + if ( 0 == function.count ) + dst.Pos = src.Pos - MeshOffset; + + dst.Pos.X += f * src.Normal.X; + dst.Pos.Y += f * src.Normal.Y; + dst.Pos.Z += f * src.Normal.Z; + + if ( i == 0 ) + MeshBuffer->BoundingBox.reset ( dst.Pos ); + else + MeshBuffer->BoundingBox.addInternalPoint ( dst.Pos ); + } + + function.count = 1; +} + + +/*! + deformVertexes autosprite + + This function can be used to make any given triangle quad + (pair of triangles that form a square rectangle) automatically behave + like a sprite without having to make it a separate entity. This means + that the "sprite" on which the texture is placed will rotate to always + appear at right angles to the player's view as a sprite would. Any four-sided + brush side, flat patch, or pair of triangles in a model can have the autosprite + effect on it. The brush face containing a texture with this shader keyword must + be square. +*/ +void CQuake3ShaderSceneNode::deformvertexes_autosprite( f32 dt, SModifierFunction &function ) +{ + u32 vsize = Original->Vertices.size(); + u32 g; + u32 i; + + const core::vector3df& camPos = SceneManager->getActiveCamera()->getPosition(); + + video::S3DVertex * dv = MeshBuffer->Vertices.pointer(); + const video::S3DVertex2TCoords * vin = Original->Vertices.const_pointer(); + + core::matrix4 lookat ( core::matrix4::EM4CONST_NOTHING ); + core::quaternion q; + for ( i = 0; i < vsize; i += 4 ) + { + // quad-plane + core::vector3df center = 0.25f * ( vin[i+0].Pos + vin[i+1].Pos + vin[i+2].Pos + vin[i+3].Pos ); + core::vector3df forward = camPos - center; + + q.rotationFromTo ( vin[i].Normal, forward ); + q.getMatrixCenter ( lookat, center, MeshOffset ); + + for ( g = 0; g < 4; ++g ) + { + lookat.transformVect ( dv[i+g].Pos, vin[i+g].Pos ); + lookat.rotateVect ( dv[i+g].Normal, vin[i+g].Normal ); + } + + } + function.count = 1; +} + + +/*! + deformVertexes autosprite2 + Is a slightly modified "sprite" that only rotates around the middle of its longest axis. + This allows you to make a pillar of fire that you can walk around, or an energy beam + stretched across the room. +*/ + +struct sortaxis +{ + core::vector3df v; + bool operator < ( const sortaxis &other ) const + { + return v.getLengthSQ () < other.v.getLengthSQ (); + } +}; +/*! +*/ +void CQuake3ShaderSceneNode::deformvertexes_autosprite2( f32 dt, SModifierFunction &function ) +{ + u32 vsize = Original->Vertices.size(); + u32 g; + u32 i; + + const core::vector3df camPos = SceneManager->getActiveCamera()->getAbsolutePosition(); + + video::S3DVertex * dv = MeshBuffer->Vertices.pointer(); + const video::S3DVertex2TCoords * vin = Original->Vertices.const_pointer(); + + core::matrix4 lookat ( core::matrix4::EM4CONST_NOTHING ); + + core::array < sortaxis > axis; + axis.set_used ( 3 ); + + for ( i = 0; i < vsize; i += 4 ) + { + // quad-plane + core::vector3df center = 0.25f * ( vin[i+0].Pos + vin[i+1].Pos + vin[i+2].Pos + vin[i+3].Pos ); + + // longes axe + axis[0].v = vin[i+1].Pos - vin[i+0].Pos; + axis[1].v = vin[i+2].Pos - vin[i+0].Pos; + axis[2].v = vin[i+3].Pos - vin[i+0].Pos; + axis.set_sorted ( false ); + axis.sort (); + + lookat.buildAxisAlignedBillboard ( camPos, center, MeshOffset, axis[1].v, vin[i+0].Normal ); + + for ( g = 0; g < 4; ++g ) + { + lookat.transformVect ( dv[i+g].Pos, vin[i+g].Pos ); + lookat.rotateVect ( dv[i+g].Normal, vin[i+g].Normal ); + } + } + function.count = 1; +} + +/* + Generate Vertex Color +*/ +void CQuake3ShaderSceneNode::vertextransform_rgbgen( f32 dt, SModifierFunction &function ) +{ + u32 i; + const u32 vsize = Original->Vertices.size(); + + switch ( function.rgbgen ) + { + case IDENTITY: + //rgbgen identity + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.set(0xFFFFFFFF); + break; + + case IDENTITYLIGHTING: + // rgbgen identitylighting TODO: overbright + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.set(0xFF7F7F7F); + break; + + case EXACTVERTEX: + // alphagen exactvertex TODO lighting + case VERTEX: + // rgbgen vertex + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color=Original->Vertices[i].Color; + break; + case WAVE: + { + // rgbGen wave <func> <base> <amp> <phase> <freq> + f32 f = function.evaluate( dt ) * 255.f; + s32 value = core::clamp( core::floor32(f), 0, 255 ); + value = 0xFF000000 | value << 16 | value << 8 | value; + + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.set(value); + } break; + case CONSTANT: + { + //rgbgen const ( x y z ) + video::SColorf cf( function.x, function.y, function.z ); + video::SColor col = cf.toSColor(); + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color=col; + } break; + default: + break; + } +} + +/* + Generate Vertex Color, Alpha +*/ +void CQuake3ShaderSceneNode::vertextransform_alphagen( f32 dt, SModifierFunction &function ) +{ + u32 i; + const u32 vsize = Original->Vertices.size(); + + switch ( function.alphagen ) + { + case IDENTITY: + //alphagen identity + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.setAlpha ( 0xFF ); + break; + + case EXACTVERTEX: + // alphagen exactvertex TODO lighting + case VERTEX: + // alphagen vertex + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.setAlpha ( Original->Vertices[i].Color.getAlpha() ); + break; + case CONSTANT: + { + // alphagen const + u32 a = (u32) ( function.x * 255.f ); + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.setAlpha ( a ); + } break; + + case LIGHTINGSPECULAR: + { + // alphagen lightingspecular TODO!!! + const SViewFrustum *frustum = SceneManager->getActiveCamera()->getViewFrustum(); + const core::matrix4 &view = frustum->getTransform ( video::ETS_VIEW ); + + const f32 *m = view.pointer(); + + for ( i = 0; i != vsize; ++i ) + { + const core::vector3df &n = Original->Vertices[i].Normal; + MeshBuffer->Vertices[i].Color.setAlpha ((u32)( 128.f *(1.f+(n.X*m[0]+n.Y*m[1]+n.Z*m[2])))); + } + + } break; + + + case WAVE: + { + // alphagen wave + f32 f = function.evaluate( dt ) * 255.f; + s32 value = core::clamp( core::floor32(f), 0, 255 ); + + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].Color.setAlpha ( value ); + } break; + default: + break; + } +} + + + +/* + Generate Texture Coordinates +*/ +void CQuake3ShaderSceneNode::vertextransform_tcgen( f32 dt, SModifierFunction &function ) +{ + u32 i; + const u32 vsize = Original->Vertices.size(); + + switch ( function.tcgen ) + { + case TURBULENCE: + //tcgen turb + { + function.wave = core::reciprocal( function.phase ); + + const f32 phase = function.phase; + + for ( i = 0; i != vsize; ++i ) + { + const video::S3DVertex2TCoords &src = Original->Vertices[i]; + video::S3DVertex &dst = MeshBuffer->Vertices[i]; + + const f32 wavephase = (src.Pos.X + src.Pos.Y + src.Pos.Z) * function.wave; + function.phase = phase + wavephase; + + const f32 f = function.evaluate( dt ); + + dst.TCoords.X = src.TCoords.X + f * src.Normal.X; + dst.TCoords.Y = src.TCoords.Y + f * src.Normal.Y; + } + } + break; + + case TEXTURE: + // tcgen texture + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].TCoords = Original->Vertices[i].TCoords; + break; + case LIGHTMAP: + // tcgen lightmap + for ( i = 0; i != vsize; ++i ) + MeshBuffer->Vertices[i].TCoords = Original->Vertices[i].TCoords2; + break; + case ENVIRONMENT: + { + // tcgen environment + const SViewFrustum *frustum = SceneManager->getActiveCamera()->getViewFrustum(); + const core::matrix4 &view = frustum->getTransform ( video::ETS_VIEW ); + + const f32 *m = view.pointer(); + + core::vector3df n; + for ( i = 0; i != vsize; ++i ) + { + //const core::vector3df &n = Original->Vertices[i].Normal; + + n = frustum->cameraPosition - Original->Vertices[i].Pos; + n.normalize(); + n += Original->Vertices[i].Normal; + n.normalize(); + + MeshBuffer->Vertices[i].TCoords.X = 0.5f*(1.f+(n.X*m[0]+n.Y*m[1]+n.Z*m[2])); + MeshBuffer->Vertices[i].TCoords.Y = 0.5f*(1.f+(n.X*m[4]+n.Y*m[5]+n.Z*m[6])); + } + + } break; + default: + break; + } +} + + +#if 0 +/* + Transform Texture Coordinates +*/ +void CQuake3ShaderSceneNode::transformtex( const core::matrix4 &m, const u32 addressMode ) +{ + u32 i; + const u32 vsize = MeshBuffer->Vertices.size(); + + f32 tx1; + f32 ty1; + + if ( addressMode ) + { + for ( i = 0; i != vsize; ++i ) + { + core::vector2df &tx = MeshBuffer->Vertices[i].TCoords; + + tx1 = m[0] * tx.X + m[4] * tx.Y + m[8]; + ty1 = m[1] * tx.X + m[5] * tx.Y + m[9]; + + tx.X = tx1; + tx.Y = ty1; + } + } + else + { + + for ( i = 0; i != vsize; ++i ) + { + core::vector2df &tx = MeshBuffer->Vertices[i].TCoords; + + tx1 = m[0] * tx.X + m[4] * tx.Y + m[8]; + ty1 = m[1] * tx.X + m[5] * tx.Y + m[9]; + + tx.X = tx1 <= 0.f ? 0.f : tx1 >= 1.f ? 1.f : tx1; + tx.Y = ty1 <= 0.f ? 0.f : ty1 >= 1.f ? 1.f : ty1; + + //tx.X = core::clamp( tx1, 0.f, 1.f ); + //tx.Y = core::clamp( ty1, 0.f, 1.f ); + } + } +} + +#endif + + +/* + Texture & Vertex Transform Animator + + Return a Texture Transformation for this stage + Vertex transformation are called if found + +*/ +void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) +{ + const SVarGroup *group = Shader->getGroup( stage ); + + // select current texture + SQ3Texture &q3Tex = Q3Texture [ stage ]; + if ( q3Tex.TextureFrequency != 0.f ) + { + s32 v = core::floor32( TimeAbs * q3Tex.TextureFrequency ); + q3Tex.TextureIndex = v % q3Tex.Texture.size(); + } + + core::matrix4 m2; + SModifierFunction function; + + f32 f[16]; + + // walk group for all modifiers + for ( u32 g = 0; g != group->Variable.size(); ++g ) + { + const SVariable &v = group->Variable[g]; + + // get the modifier + static const c8 * modifierList[] = + { + "tcmod","deformvertexes","rgbgen","tcgen","map","alphagen" + }; + + u32 pos = 0; + function.masterfunc0 = (eQ3ModifierFunction) isEqual( v.name, pos, modifierList, 6 ); + + if ( UNKNOWN == function.masterfunc0 ) + continue; + + switch ( function.masterfunc0 ) + { + //tcmod + case TCMOD: + m2.makeIdentity(); + break; + default: + break; + } + + // get the modifier function + static const c8 * funclist[] = + { + "scroll","scale","rotate","stretch","turb", + "wave","identity","vertex", + "texture","lightmap","environment","$lightmap", + "bulge","autosprite","autosprite2","transform", + "exactvertex","const","lightingspecular","move","normal", + "identitylighting" + }; + static const c8 * groupToken[] = { "(", ")" }; + + pos = 0; + function.masterfunc1 = (eQ3ModifierFunction) isEqual( v.content, pos, funclist, 22 ); + if ( function.masterfunc1 != UNKNOWN ) + function.masterfunc1 = (eQ3ModifierFunction) ((u32) function.masterfunc1 + FUNCTION2 + 1); + + switch ( function.masterfunc1 ) + { + case SCROLL: + // tcMod scroll <sSpeed> <tSpeed> + f[0] = getAsFloat( v.content, pos ) * TimeAbs; + f[1] = getAsFloat( v.content, pos ) * TimeAbs; + m2.setTextureTranslate( f[0], f[1] ); + break; + case SCALE: + // tcmod scale <sScale> <tScale> + f[0] = getAsFloat( v.content, pos ); + f[1] = getAsFloat( v.content, pos ); + m2.setTextureScale( f[0], f[1] ); + break; + case ROTATE: + // tcmod rotate <degress per second> + m2.setTextureRotationCenter( getAsFloat( v.content, pos ) * + core::DEGTORAD * + TimeAbs + ); + break; + case TRANSFORM: + // tcMod <transform> <m00> <m01> <m10> <m11> <t0> <t1> + memset(f, 0, sizeof ( f )); + f[10] = f[15] = 1.f; + + f[0] = getAsFloat( v.content, pos ); + f[1] = getAsFloat( v.content, pos ); + f[4] = getAsFloat( v.content, pos ); + f[5] = getAsFloat( v.content, pos ); + f[8] = getAsFloat( v.content, pos ); + f[9] = getAsFloat( v.content, pos ); + m2.setM ( f ); + break; + + case STRETCH: // stretch + case TURBULENCE: // turb + case WAVE: // wave + case IDENTITY: // identity + case IDENTITYLIGHTING: + case VERTEX: // vertex + case MOVE: + case CONSTANT: + { + // turb == sin, default == sin + function.func = SINUS; + + if ( function.masterfunc0 == DEFORMVERTEXES ) + { + switch ( function.masterfunc1 ) + { + case WAVE: + // deformvertexes wave + function.wave = getAsFloat( v.content, pos ); + break; + case MOVE: + //deformvertexes move + function.x = getAsFloat( v.content, pos ); + function.z = getAsFloat( v.content, pos ); + function.y = getAsFloat( v.content, pos ); + break; + default: + break; + } + } + + switch ( function.masterfunc1 ) + { + case STRETCH: + case TURBULENCE: + case WAVE: + case MOVE: + getModifierFunc( function, v.content, pos ); + break; + default: + break; + } + + switch ( function.masterfunc1 ) + { + case STRETCH: + //tcMod stretch <func> <base> <amplitude> <phase> <frequency> + f[0] = core::reciprocal( function.evaluate(TimeAbs) ); + m2.setTextureScaleCenter( f[0], f[0] ); + break; + case TURBULENCE: + //tcMod turb <base> <amplitude> <phase> <freq> + //function.tcgen = TURBULENCE; + m2.setTextureRotationCenter( function.frequency * + core::DEGTORAD * + TimeAbs + ); + break; + case WAVE: + case IDENTITY: + case IDENTITYLIGHTING: + case VERTEX: + case EXACTVERTEX: + case CONSTANT: + case LIGHTINGSPECULAR: + case MOVE: + switch ( function.masterfunc0 ) + { + case DEFORMVERTEXES: + switch ( function.masterfunc1 ) + { + case WAVE: + deformvertexes_wave( TimeAbs, function ); + break; + case MOVE: + deformvertexes_move( TimeAbs, function ); + break; + default: + break; + } + break; + case RGBGEN: + function.rgbgen = function.masterfunc1; + if ( function.rgbgen == CONSTANT ) + { + isEqual ( v.content, pos, groupToken, 2 ); + function.x = getAsFloat( v.content, pos ); + function.y = getAsFloat( v.content, pos ); + function.z = getAsFloat( v.content, pos ); + } + //vertextransform_rgbgen( TimeAbs, function ); + break; + case ALPHAGEN: + function.alphagen = function.masterfunc1; + if ( function.alphagen == CONSTANT ) + { + function.x = getAsFloat( v.content, pos ); + } + + //vertextransform_alphagen( TimeAbs, function ); + break; + default: + break; + } + break; + default: + break; + } + + } break; + case TEXTURE: + case LIGHTMAP: + case ENVIRONMENT: + // "texture","lightmap","environment" + function.tcgen = function.masterfunc1; + break; + case DOLLAR_LIGHTMAP: + // map == lightmap, tcgen == lightmap + function.tcgen = LIGHTMAP; + break; + case BULGE: + // deformvertexes bulge + function.bulgewidth = getAsFloat( v.content, pos ); + function.bulgeheight = getAsFloat( v.content, pos ); + function.bulgespeed = getAsFloat( v.content, pos ); + + deformvertexes_bulge(TimeAbs, function); + break; + + case NORMAL: + // deformvertexes normal + function.amp = getAsFloat( v.content, pos ); + function.frequency = getAsFloat( v.content, pos ); + + deformvertexes_normal(TimeAbs, function); + break; + + case AUTOSPRITE: + // deformvertexes autosprite + deformvertexes_autosprite(TimeAbs, function); + break; + + case AUTOSPRITE2: + // deformvertexes autosprite2 + deformvertexes_autosprite2(TimeAbs, function); + break; + default: + break; + } // func + + switch ( function.masterfunc0 ) + { + case TCMOD: + texture *= m2; + break; + default: + break; + } + + } // group + + vertextransform_rgbgen( TimeAbs, function ); + vertextransform_alphagen( TimeAbs, function ); + vertextransform_tcgen( TimeAbs, function ); +} + + +void CQuake3ShaderSceneNode::OnAnimate(u32 timeMs) +{ + TimeAbs = f32( timeMs ) * (1.f/1000.f); + ISceneNode::OnAnimate( timeMs ); +} + +const core::aabbox3d<f32>& CQuake3ShaderSceneNode::getBoundingBox() const +{ + return MeshBuffer->getBoundingBox(); +} + + +u32 CQuake3ShaderSceneNode::getMaterialCount() const +{ + return Q3Texture.size(); +} + +video::SMaterial& CQuake3ShaderSceneNode::getMaterial(u32 i) +{ + video::SMaterial& m = MeshBuffer->Material; + m.setTexture(0, 0); + if ( Q3Texture [ i ].TextureIndex ) + m.setTexture(0, Q3Texture [ i ].Texture [ Q3Texture [ i ].TextureIndex ]); + return m; +} + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.h new file mode 100644 index 0000000..6ec026f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CQuake3ShaderSceneNode.h @@ -0,0 +1,118 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_QUAKE3_SCENE_NODE_H_INCLUDED__ +#define __C_QUAKE3_SCENE_NODE_H_INCLUDED__ + +#include "IMeshSceneNode.h" +#include "IQ3Shader.h" +#include "IFileSystem.h" +#include "SMeshBuffer.h" +#include "SMeshBufferLightMap.h" +#include "SMesh.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +//! Scene node which is a quake3 shader. +class CQuake3ShaderSceneNode : public scene::IMeshSceneNode +{ +public: + + CQuake3ShaderSceneNode( ISceneNode* parent, ISceneManager* mgr, s32 id, + io::IFileSystem* fileSystem, + const IMeshBuffer* original, + const quake3::IShader* shader + ); + + virtual ~CQuake3ShaderSceneNode(); + + virtual void OnRegisterSceneNode(); + virtual void render(); + virtual void OnAnimate(u32 timeMs); + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + virtual u32 getMaterialCount() const; + virtual video::SMaterial& getMaterial(u32 i); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_Q3SHADER_SCENE_NODE; } + + virtual void setMesh(IMesh* mesh){} + virtual IMesh* getMesh() { return Mesh; } + virtual void setReadOnlyMaterials(bool readonly) {} + virtual bool isReadOnlyMaterials() const { return true; } + + //! Creates shadow volume scene node as child of this node + //! and returns a pointer to it. + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + + //! Removes a child from this scene node. + //! Implemented here, to be able to remove the shadow properly, if there is one, + //! or to remove attached childs. + virtual bool removeChild(ISceneNode* child); + +private: + const quake3::IShader* Shader; + SMesh *Mesh; + IShadowVolumeSceneNode* Shadow; + const SMeshBufferLightMap* Original; + SMeshBuffer* MeshBuffer; + core::vector3df MeshOffset; + + struct SQ3Texture + { + SQ3Texture () : + TextureIndex ( 0 ), + TextureFrequency(0.f), + TextureAddressMode( video::ETC_REPEAT ) + { + Texture.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); + } + + quake3::tTexArray Texture; + + u32 TextureIndex; + f32 TextureFrequency; + video::E_TEXTURE_CLAMP TextureAddressMode; // Wrapping/Clamping + }; + + core::array< SQ3Texture > Q3Texture; + + void loadTextures ( io::IFileSystem * fileSystem ); + void addBuffer ( scene::SMeshBufferLightMap * buffer ); + void cloneBuffer ( scene::SMeshBuffer *dest, const scene::SMeshBufferLightMap * buffer, bool translateCenter ); + + void deformvertexes_wave ( f32 dt, quake3::SModifierFunction &function ); + void deformvertexes_move ( f32 dt, quake3::SModifierFunction &function ); + void deformvertexes_bulge( f32 dt, quake3::SModifierFunction &function ); + void deformvertexes_autosprite( f32 dt, quake3::SModifierFunction &function ); + void deformvertexes_autosprite2( f32 dt, quake3::SModifierFunction &function ); + void deformvertexes_normal ( f32 dt, quake3::SModifierFunction &function ); + + void vertextransform_tcgen ( f32 dt, quake3::SModifierFunction &function ); + void vertextransform_rgbgen ( f32 dt, quake3::SModifierFunction &function ); + void vertextransform_alphagen ( f32 dt, quake3::SModifierFunction &function ); + + void transformtex ( const core::matrix4 &m, const u32 clamp ); + + f32 TimeAbs; + + void animate( u32 stage, core::matrix4 &texture ); + + E_SCENE_NODE_RENDER_PASS getRenderStage() const; + +}; + + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.cpp new file mode 100644 index 0000000..2f067e6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.cpp @@ -0,0 +1,114 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CReadFile.h" + +namespace irr +{ +namespace io +{ + + +CReadFile::CReadFile(const io::path& fileName) +: File(0), FileSize(0), Filename(fileName) +{ + #ifdef _DEBUG + setDebugName("CReadFile"); + #endif + + openFile(); +} + + +CReadFile::~CReadFile() +{ + if (File) + fclose(File); +} + + +//! returns how much was read +s32 CReadFile::read(void* buffer, u32 sizeToRead) +{ + if (!isOpen()) + return 0; + + return (s32)fread(buffer, 1, sizeToRead, File); +} + + +//! changes position in file, returns true if successful +//! if relativeMovement==true, the pos is changed relative to current pos, +//! otherwise from begin of file +bool CReadFile::seek(long finalPos, bool relativeMovement) +{ + if (!isOpen()) + return false; + + return fseek(File, finalPos, relativeMovement ? SEEK_CUR : SEEK_SET) == 0; +} + + +//! returns size of file +long CReadFile::getSize() const +{ + return FileSize; +} + + +//! returns where in the file we are. +long CReadFile::getPos() const +{ + return ftell(File); +} + + +//! opens the file +void CReadFile::openFile() +{ + if (Filename.size() == 0) // bugfix posted by rt + { + File = 0; + return; + } + +#if defined ( _IRR_WCHAR_FILESYSTEM ) + File = _wfopen(Filename.c_str(), L"rb"); +#else + File = fopen(Filename.c_str(), "rb"); +#endif + + if (File) + { + // get FileSize + + fseek(File, 0, SEEK_END); + FileSize = getPos(); + fseek(File, 0, SEEK_SET); + } +} + + +//! returns name of file +const io::path& CReadFile::getFileName() const +{ + return Filename; +} + + + +IReadFile* createReadFile(const io::path& fileName) +{ + CReadFile* file = new CReadFile(fileName); + if (file->isOpen()) + return file; + + file->drop(); + return 0; +} + + +} // end namespace io +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.h new file mode 100644 index 0000000..09f3501 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CReadFile.h @@ -0,0 +1,64 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_READ_FILE_H_INCLUDED__ +#define __C_READ_FILE_H_INCLUDED__ + +#include <stdio.h> +#include "IReadFile.h" +#include "irrString.h" + +namespace irr +{ + +namespace io +{ + + /*! + Class for reading a real file from disk. + */ + class CReadFile : public IReadFile + { + public: + + CReadFile(const io::path& fileName); + + virtual ~CReadFile(); + + //! returns how much was read + virtual s32 read(void* buffer, u32 sizeToRead); + + //! changes position in file, returns true if successful + virtual bool seek(long finalPos, bool relativeMovement = false); + + //! returns size of file + virtual long getSize() const; + + //! returns if file is open + virtual bool isOpen() const + { + return File != 0; + } + + //! returns where in the file we are. + virtual long getPos() const; + + //! returns name of file + virtual const io::path& getFileName() const; + + private: + + //! opens the file + void openFile(); + + FILE* File; + long FileSize; + io::path Filename; + }; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.cpp new file mode 100644 index 0000000..099f2aa --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.cpp @@ -0,0 +1,232 @@ +// Copyright (C) 2010-2012 Gaz Davidson / Joseph Ellis +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_SMF_LOADER_ + +#include "CSMFMeshFileLoader.h" +#include "SAnimatedMesh.h" +#include "SMeshBuffer.h" +#include "IReadFile.h" +#include "coreutil.h" +#include "os.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace scene +{ + +CSMFMeshFileLoader::CSMFMeshFileLoader(video::IVideoDriver* driver) +: Driver(driver) +{ +} + +//! Returns true if the file might be loaded by this class. +bool CSMFMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension(filename, "smf"); +} + +//! Creates/loads an animated mesh from the file. +IAnimatedMesh* CSMFMeshFileLoader::createMesh(io::IReadFile* file) +{ + // create empty mesh + SMesh *mesh = new SMesh(); + + // load file + u16 version; + u8 flags; + s32 limbCount; + s32 i; + + io::BinaryFile::read(file, version); + io::BinaryFile::read(file, flags); + io::BinaryFile::read(file, limbCount); + + // load mesh data + core::matrix4 identity; + for (i=0; i < limbCount; ++i) + loadLimb(file, mesh, identity); + + // recalculate buffer bounding boxes + for (i=0; i < (s32)mesh->getMeshBufferCount(); ++i) + mesh->getMeshBuffer(i)->recalculateBoundingBox(); + + mesh->recalculateBoundingBox(); + SAnimatedMesh *am = new SAnimatedMesh(); + am->addMesh(mesh); + mesh->drop(); + am->recalculateBoundingBox(); + + return am; +} + +void CSMFMeshFileLoader::loadLimb(io::IReadFile* file, SMesh* mesh, const core::matrix4 &parentTransformation) +{ + core::matrix4 transformation; + + // limb transformation + core::vector3df translate, rotate, scale; + io::BinaryFile::read(file, translate); + io::BinaryFile::read(file, rotate); + io::BinaryFile::read(file, scale); + + transformation.setTranslation(translate); + transformation.setRotationDegrees(rotate); + transformation.setScale(scale); + + transformation = parentTransformation * transformation; + + core::stringc textureName, textureGroupName; + + // texture information + io::BinaryFile::read(file, textureGroupName); + io::BinaryFile::read(file, textureName); + + // attempt to load texture using known formats + video::ITexture* texture = 0; + + const c8* extensions[] = {".jpg", ".png", ".tga", ".bmp", 0}; + + for (const c8 **ext = extensions; !texture && *ext; ++ext) + { + texture = Driver->getTexture(textureName + *ext); + if (texture) + textureName = textureName + *ext; + } + // find the correct mesh buffer + u32 i; + for (i=0; i<mesh->MeshBuffers.size(); ++i) + if (mesh->MeshBuffers[i]->getMaterial().TextureLayer[0].Texture == texture) + break; + + // create mesh buffer if none was found + if (i == mesh->MeshBuffers.size()) + { + CMeshBuffer<video::S3DVertex>* mb = new CMeshBuffer<video::S3DVertex>(); + mb->Material.TextureLayer[0].Texture = texture; + + // horribly hacky way to do this, maybe it's in the flags? + if (core::hasFileExtension(textureName, "tga", "png")) + mb->Material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + else + mb->Material.MaterialType = video::EMT_SOLID; + + mesh->MeshBuffers.push_back(mb); + } + + CMeshBuffer<video::S3DVertex>* mb = (CMeshBuffer<video::S3DVertex>*)mesh->MeshBuffers[i]; + + u16 vertexCount, firstVertex = mb->getVertexCount(); + + io::BinaryFile::read(file, vertexCount); + mb->Vertices.reallocate(mb->Vertices.size() + vertexCount); + + // add vertices and set positions + for (i=0; i<vertexCount; ++i) + { + core::vector3df pos; + io::BinaryFile::read(file, pos); + transformation.transformVect(pos); + video::S3DVertex vert; + vert.Color = 0xFFFFFFFF; + vert.Pos = pos; + mb->Vertices.push_back(vert); + } + + // set vertex normals + for (i=0; i < vertexCount; ++i) + { + core::vector3df normal; + io::BinaryFile::read(file, normal); + transformation.rotateVect(normal); + mb->Vertices[firstVertex + i].Normal = normal; + } + // set texture coordinates + + for (i=0; i < vertexCount; ++i) + { + core::vector2df tcoords; + io::BinaryFile::read(file, tcoords); + mb->Vertices[firstVertex + i].TCoords = tcoords; + } + + // triangles + u32 triangleCount; + // vertexCount used as temporary + io::BinaryFile::read(file, vertexCount); + triangleCount=3*vertexCount; + mb->Indices.reallocate(mb->Indices.size() + triangleCount); + + for (i=0; i < triangleCount; ++i) + { + u16 index; + io::BinaryFile::read(file, index); + mb->Indices.push_back(firstVertex + index); + } + + // read limbs + s32 limbCount; + io::BinaryFile::read(file, limbCount); + + for (s32 l=0; l < limbCount; ++l) + loadLimb(file, mesh, transformation); +} + +} // namespace scene + +// todo: at some point in the future let's move these to a place where everyone can use them. +namespace io +{ + +#if _BIGENDIAN +#define _SYSTEM_BIG_ENDIAN_ (true) +#else +#define _SYSTEM_BIG_ENDIAN_ (false) +#endif + +template <class T> +void BinaryFile::read(io::IReadFile* file, T &out, bool bigEndian) +{ + file->read((void*)&out, sizeof(out)); + if (bigEndian != (_SYSTEM_BIG_ENDIAN_)) + out = os::Byteswap::byteswap(out); +} + +//! reads a 3d vector from the file, moving the file pointer along +void BinaryFile::read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian) +{ + BinaryFile::read(file, outVector2d.X, bigEndian); + BinaryFile::read(file, outVector2d.Y, bigEndian); + BinaryFile::read(file, outVector2d.Z, bigEndian); +} + +//! reads a 2d vector from the file, moving the file pointer along +void BinaryFile::read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian) +{ + BinaryFile::read(file, outVector2d.X, bigEndian); + BinaryFile::read(file, outVector2d.Y, bigEndian); +} + +//! reads a null terminated string from the file, moving the file pointer along +void BinaryFile::read(io::IReadFile* file, core::stringc &outString, bool bigEndian) +{ + c8 c; + file->read((void*)&c, 1); + + while (c) + { + outString += c; + file->read((void*)&c, 1); + } +} + +} // namespace io + +} // namespace irr + +#endif // compile with SMF loader + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h new file mode 100644 index 0000000..2e87aca --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h @@ -0,0 +1,67 @@ +// Copyright (C) 2010-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SMF_MESH_LOADER_H_INCLUDED__ +#define __C_SMF_MESH_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "SMesh.h" + +namespace irr +{ + +namespace video +{ + class IVideoDriver; +} + +namespace scene +{ + +//! Class which can load +class CSMFMeshFileLoader : public virtual IMeshLoader +{ +public: + + CSMFMeshFileLoader(video::IVideoDriver* driver); + + //! Returns true if the file might be loaded by this class. + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! Creates/loads an animated mesh from the file. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); +private: + + void loadLimb(io::IReadFile* file, scene::SMesh* mesh, const core::matrix4 &parentTransformation); + + video::IVideoDriver* Driver; +}; + +} // end namespace scene + +namespace io +{ + class BinaryFile + { + public: + //! reads most types from the given file, moving the file pointer along + template <class T> + static void read(io::IReadFile* file, T &out, bool bigEndian=false); + + //! reads a 3d vector from the file, moving the file pointer along + static void read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian=false); + + //! reads a 2d vector from the file, moving the file pointer along + static void read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian=false); + + //! reads a null terminated string from the file, moving the file pointer along + static void read(io::IReadFile* file, core::stringc &outString, bool bigEndian=false); + + }; +} + +} // end namespace irr + +#endif // __C_SMF_MESH_LOADER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.cpp new file mode 100644 index 0000000..bf9ffb3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.cpp @@ -0,0 +1,253 @@ +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_STL_LOADER_ + +#include "CSTLMeshFileLoader.h" +#include "SMesh.h" +#include "SMeshBuffer.h" +#include "SAnimatedMesh.h" +#include "IReadFile.h" +#include "fast_atof.h" +#include "coreutil.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CSTLMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "stl" ); +} + + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CSTLMeshFileLoader::createMesh(io::IReadFile* file) +{ + const long filesize = file->getSize(); + if (filesize < 6) // we need a header + return 0; + + SMesh* mesh = new SMesh(); + SMeshBuffer* meshBuffer = new SMeshBuffer(); + mesh->addMeshBuffer(meshBuffer); + meshBuffer->drop(); + + core::vector3df vertex[3]; + core::vector3df normal; + + bool binary = false; + core::stringc token; + if (getNextToken(file, token) != "solid") + binary = true; + // read/skip header + u32 binFaceCount = 0; + if (binary) + { + file->seek(80); + file->read(&binFaceCount, 4); +#ifdef __BIG_ENDIAN__ + binFaceCount = os::Byteswap::byteswap(binFaceCount); +#endif + } + else + goNextLine(file); + + u16 attrib=0; + token.reserve(32); + + while (file->getPos() < filesize) + { + if (!binary) + { + if (getNextToken(file, token) != "facet") + { + if (token=="endsolid") + break; + mesh->drop(); + return 0; + } + if (getNextToken(file, token) != "normal") + { + mesh->drop(); + return 0; + } + } + getNextVector(file, normal, binary); + if (!binary) + { + if (getNextToken(file, token) != "outer") + { + mesh->drop(); + return 0; + } + if (getNextToken(file, token) != "loop") + { + mesh->drop(); + return 0; + } + } + for (u32 i=0; i<3; ++i) + { + if (!binary) + { + if (getNextToken(file, token) != "vertex") + { + mesh->drop(); + return 0; + } + } + getNextVector(file, vertex[i], binary); + } + if (!binary) + { + if (getNextToken(file, token) != "endloop") + { + mesh->drop(); + return 0; + } + if (getNextToken(file, token) != "endfacet") + { + mesh->drop(); + return 0; + } + } + else + { + file->read(&attrib, 2); +#ifdef __BIG_ENDIAN__ + attrib = os::Byteswap::byteswap(attrib); +#endif + } + + SMeshBuffer* mb = reinterpret_cast<SMeshBuffer*>(mesh->getMeshBuffer(mesh->getMeshBufferCount()-1)); + u32 vCount = mb->getVertexCount(); + video::SColor color(0xffffffff); + if (attrib & 0x8000) + color = video::A1R5G5B5toA8R8G8B8(attrib); + if (normal==core::vector3df()) + normal=core::plane3df(vertex[2],vertex[1],vertex[0]).Normal; + mb->Vertices.push_back(video::S3DVertex(vertex[2],normal,color, core::vector2df())); + mb->Vertices.push_back(video::S3DVertex(vertex[1],normal,color, core::vector2df())); + mb->Vertices.push_back(video::S3DVertex(vertex[0],normal,color, core::vector2df())); + mb->Indices.push_back(vCount); + mb->Indices.push_back(vCount+1); + mb->Indices.push_back(vCount+2); + } // end while (file->getPos() < filesize) + mesh->getMeshBuffer(0)->recalculateBoundingBox(); + + // Create the Animated mesh if there's anything in the mesh + SAnimatedMesh* pAM = 0; + if ( 0 != mesh->getMeshBufferCount() ) + { + mesh->recalculateBoundingBox(); + pAM = new SAnimatedMesh(); + pAM->Type = EAMT_OBJ; + pAM->addMesh(mesh); + pAM->recalculateBoundingBox(); + } + + mesh->drop(); + + return pAM; +} + + +//! Read 3d vector of floats +void CSTLMeshFileLoader::getNextVector(io::IReadFile* file, core::vector3df& vec, bool binary) const +{ + if (binary) + { + file->read(&vec.X, 4); + file->read(&vec.Y, 4); + file->read(&vec.Z, 4); +#ifdef __BIG_ENDIAN__ + vec.X = os::Byteswap::byteswap(vec.X); + vec.Y = os::Byteswap::byteswap(vec.Y); + vec.Z = os::Byteswap::byteswap(vec.Z); +#endif + } + else + { + goNextWord(file); + core::stringc tmp; + + getNextToken(file, tmp); + core::fast_atof_move(tmp.c_str(), vec.X); + getNextToken(file, tmp); + core::fast_atof_move(tmp.c_str(), vec.Y); + getNextToken(file, tmp); + core::fast_atof_move(tmp.c_str(), vec.Z); + } + vec.X=-vec.X; +} + + +//! Read next word +const core::stringc& CSTLMeshFileLoader::getNextToken(io::IReadFile* file, core::stringc& token) const +{ + goNextWord(file); + u8 c; + token = ""; + while(file->getPos() != file->getSize()) + { + file->read(&c, 1); + // found it, so leave + if (core::isspace(c)) + break; + token.append(c); + } + return token; +} + + +//! skip to next word +void CSTLMeshFileLoader::goNextWord(io::IReadFile* file) const +{ + u8 c; + while(file->getPos() != file->getSize()) + { + file->read(&c, 1); + // found it, so leave + if (!core::isspace(c)) + { + file->seek(-1, true); + break; + } + } +} + + +//! Read until line break is reached and stop at the next non-space character +void CSTLMeshFileLoader::goNextLine(io::IReadFile* file) const +{ + u8 c; + // look for newline characters + while(file->getPos() != file->getSize()) + { + file->read(&c, 1); + // found it, so leave + if (c=='\n' || c=='\r') + break; + } +} + + +} // end namespace scene +} // end namespace irr + + +#endif // _IRR_COMPILE_WITH_STL_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.h new file mode 100644 index 0000000..fb5dc90 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshFileLoader.h @@ -0,0 +1,49 @@ +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_STL_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_STL_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "irrString.h" +#include "vector3d.h" + +namespace irr +{ +namespace scene +{ + +//! Meshloader capable of loading STL meshes. +class CSTLMeshFileLoader : public IMeshLoader +{ +public: + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (i.e. ".stl") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + +private: + + // skips to the first non-space character available + void goNextWord(io::IReadFile* file) const; + // returns the next word + const core::stringc& getNextToken(io::IReadFile* file, core::stringc& token) const; + // skip to next printable character after the first line break + void goNextLine(io::IReadFile* file) const; + + //! Read 3d vector of floats + void getNextVector(io::IReadFile* file, core::vector3df& vec, bool binary) const; +}; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.cpp new file mode 100644 index 0000000..998a73f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.cpp @@ -0,0 +1,187 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_STL_WRITER_ + +#include "CSTLMeshWriter.h" +#include "os.h" +#include "IMesh.h" +#include "IMeshBuffer.h" +#include "IAttributes.h" +#include "ISceneManager.h" +#include "IMeshCache.h" +#include "IWriteFile.h" + +namespace irr +{ +namespace scene +{ + +CSTLMeshWriter::CSTLMeshWriter(scene::ISceneManager* smgr) + : SceneManager(smgr) +{ + #ifdef _DEBUG + setDebugName("CSTLMeshWriter"); + #endif + + if (SceneManager) + SceneManager->grab(); +} + + +CSTLMeshWriter::~CSTLMeshWriter() +{ + if (SceneManager) + SceneManager->drop(); +} + + +//! Returns the type of the mesh writer +EMESH_WRITER_TYPE CSTLMeshWriter::getType() const +{ + return EMWT_STL; +} + + +//! writes a mesh +bool CSTLMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + if (!file) + return false; + + os::Printer::log("Writing mesh", file->getFileName()); + + if (flags & scene::EMWF_WRITE_COMPRESSED) + return writeMeshBinary(file, mesh, flags); + else + return writeMeshASCII(file, mesh, flags); +} + + +bool CSTLMeshWriter::writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + // write STL MESH header + + file->write("binary ",7); + const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh)); + const s32 sizeleft = 73-name.size(); // 80 byte header + if (sizeleft<0) + file->write(name.c_str(),73); + else + { + char* buf = new char[80]; + memset(buf, 0, 80); + file->write(name.c_str(),name.size()); + file->write(buf,sizeleft); + delete [] buf; + } + u32 facenum = 0; + for (u32 j=0; j<mesh->getMeshBufferCount(); ++j) + facenum += mesh->getMeshBuffer(j)->getIndexCount()/3; + file->write(&facenum,4); + + // write mesh buffers + + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + IMeshBuffer* buffer = mesh->getMeshBuffer(i); + if (buffer) + { + const u32 indexCount = buffer->getIndexCount(); + const u16 attributes = 0; + for (u32 j=0; j<indexCount; j+=3) + { + const core::vector3df& v1 = buffer->getPosition(buffer->getIndices()[j]); + const core::vector3df& v2 = buffer->getPosition(buffer->getIndices()[j+1]); + const core::vector3df& v3 = buffer->getPosition(buffer->getIndices()[j+2]); + const core::plane3df tmpplane(v1,v2,v3); + file->write(&tmpplane.Normal, 12); + file->write(&v1, 12); + file->write(&v2, 12); + file->write(&v3, 12); + file->write(&attributes, 2); + } + } + } + return true; +} + + +bool CSTLMeshWriter::writeMeshASCII(io::IWriteFile* file, scene::IMesh* mesh, s32 flags) +{ + // write STL MESH header + + file->write("solid ",6); + const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh)); + file->write(name.c_str(),name.size()); + file->write("\n\n",2); + + // write mesh buffers + + for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) + { + IMeshBuffer* buffer = mesh->getMeshBuffer(i); + if (buffer) + { + const u32 indexCount = buffer->getIndexCount(); + for (u32 j=0; j<indexCount; j+=3) + { + writeFace(file, + buffer->getPosition(buffer->getIndices()[j]), + buffer->getPosition(buffer->getIndices()[j+1]), + buffer->getPosition(buffer->getIndices()[j+2])); + } + file->write("\n",1); + } + } + + file->write("endsolid ",9); + file->write(name.c_str(),name.size()); + + return true; +} + + +void CSTLMeshWriter::getVectorAsStringLine(const core::vector3df& v, core::stringc& s) const +{ + s = core::stringc(v.X); + s += " "; + s += core::stringc(v.Y); + s += " "; + s += core::stringc(v.Z); + s += "\n"; +} + + +void CSTLMeshWriter::writeFace(io::IWriteFile* file, + const core::vector3df& v1, + const core::vector3df& v2, + const core::vector3df& v3) +{ + core::stringc tmp; + file->write("facet normal ",13); + getVectorAsStringLine(core::plane3df(v1,v2,v3).Normal, tmp); + file->write(tmp.c_str(),tmp.size()); + file->write(" outer loop\n",13); + file->write(" vertex ",11); + getVectorAsStringLine(v1, tmp); + file->write(tmp.c_str(),tmp.size()); + file->write(" vertex ",11); + getVectorAsStringLine(v2, tmp); + file->write(tmp.c_str(),tmp.size()); + file->write(" vertex ",11); + getVectorAsStringLine(v3, tmp); + file->write(tmp.c_str(),tmp.size()); + file->write(" endloop\n",10); + file->write("endfacet\n",9); +} + + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.h new file mode 100644 index 0000000..0b0b76d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSTLMeshWriter.h @@ -0,0 +1,55 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_STL_MESH_WRITER_H_INCLUDED__ +#define __IRR_STL_MESH_WRITER_H_INCLUDED__ + +#include "IMeshWriter.h" +#include "S3DVertex.h" +#include "irrString.h" + +namespace irr +{ +namespace scene +{ + class IMeshBuffer; + class ISceneManager; + + //! class to write meshes, implementing a STL writer + class CSTLMeshWriter : public IMeshWriter + { + public: + + CSTLMeshWriter(scene::ISceneManager* smgr); + virtual ~CSTLMeshWriter(); + + //! Returns the type of the mesh writer + virtual EMESH_WRITER_TYPE getType() const; + + //! writes a mesh + virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); + + protected: + // write binary format + bool writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s32 flags); + + // write text format + bool writeMeshASCII(io::IWriteFile* file, scene::IMesh* mesh, s32 flags); + + // create vector output with line end into string + void getVectorAsStringLine(const core::vector3df& v, + core::stringc& s) const; + + // write face information to file + void writeFace(io::IWriteFile* file, const core::vector3df& v1, + const core::vector3df& v2, const core::vector3df& v3); + + scene::ISceneManager* SceneManager; + }; + +} // end namespace +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.cpp new file mode 100644 index 0000000..cda4133 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.cpp @@ -0,0 +1,960 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneCollisionManager.h" +#include "ISceneNode.h" +#include "ICameraSceneNode.h" +#include "ITriangleSelector.h" +#include "SViewFrustum.h" + +#include "os.h" +#include "irrMath.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSceneCollisionManager::CSceneCollisionManager(ISceneManager* smanager, video::IVideoDriver* driver) +: SceneManager(smanager), Driver(driver) +{ + #ifdef _DEBUG + setDebugName("CSceneCollisionManager"); + #endif + + if (Driver) + Driver->grab(); +} + + +//! destructor +CSceneCollisionManager::~CSceneCollisionManager() +{ + if (Driver) + Driver->drop(); +} + + +//! Returns the scene node, which is currently visible at the given +//! screen coordinates, viewed from the currently active camera. +ISceneNode* CSceneCollisionManager::getSceneNodeFromScreenCoordinatesBB( + const core::position2d<s32>& pos, s32 idBitMask, bool noDebugObjects, scene::ISceneNode* root) +{ + const core::line3d<f32> ln = getRayFromScreenCoordinates(pos, 0); + + if ( ln.start == ln.end ) + return 0; + + return getSceneNodeFromRayBB(ln, idBitMask, noDebugObjects, root); +} + + +//! Returns the nearest scene node which collides with a 3d ray and +//! which id matches a bitmask. +ISceneNode* CSceneCollisionManager::getSceneNodeFromRayBB( + const core::line3d<f32>& ray, + s32 idBitMask, bool noDebugObjects, scene::ISceneNode* root) +{ + ISceneNode* best = 0; + f32 dist = FLT_MAX; + + core::line3d<f32> truncatableRay(ray); + + getPickedNodeBB((root==0)?SceneManager->getRootSceneNode():root, truncatableRay, + idBitMask, noDebugObjects, dist, best); + + return best; +} + + +//! recursive method for going through all scene nodes +void CSceneCollisionManager::getPickedNodeBB(ISceneNode* root, + core::line3df& ray, s32 bits, bool noDebugObjects, + f32& outbestdistance, ISceneNode*& outbestnode) +{ + const ISceneNodeList& children = root->getChildren(); + const core::vector3df rayVector = ray.getVector().normalize(); + + ISceneNodeList::ConstIterator it = children.begin(); + for (; it != children.end(); ++it) + { + ISceneNode* current = *it; + + if (current->isVisible()) + { + if((noDebugObjects ? !current->isDebugObject() : true) && + (bits==0 || (bits != 0 && (current->getID() & bits)))) + { + // get world to object space transform + core::matrix4 worldToObject; + if (!current->getAbsoluteTransformation().getInverse(worldToObject)) + continue; + + // transform vector from world space to object space + core::line3df objectRay(ray); + worldToObject.transformVect(objectRay.start); + worldToObject.transformVect(objectRay.end); + + const core::aabbox3df & objectBox = current->getBoundingBox(); + + // Do the initial intersection test in object space, since the + // object space box test is more accurate. + if(objectBox.isPointInside(objectRay.start)) + { + // use fast bbox intersection to find distance to hitpoint + // algorithm from Kay et al., code from gamedev.net + const core::vector3df dir = (objectRay.end-objectRay.start).normalize(); + const core::vector3df minDist = (objectBox.MinEdge - objectRay.start)/dir; + const core::vector3df maxDist = (objectBox.MaxEdge - objectRay.start)/dir; + const core::vector3df realMin(core::min_(minDist.X, maxDist.X),core::min_(minDist.Y, maxDist.Y),core::min_(minDist.Z, maxDist.Z)); + const core::vector3df realMax(core::max_(minDist.X, maxDist.X),core::max_(minDist.Y, maxDist.Y),core::max_(minDist.Z, maxDist.Z)); + + const f32 minmax = core::min_(realMax.X, realMax.Y, realMax.Z); + // nearest distance to intersection + const f32 maxmin = core::max_(realMin.X, realMin.Y, realMin.Z); + + const f32 toIntersectionSq = (maxmin>0?maxmin*maxmin:minmax*minmax); + if (toIntersectionSq < outbestdistance) + { + outbestdistance = toIntersectionSq; + outbestnode = current; + + // And we can truncate the ray to stop us hitting further nodes. + ray.end = ray.start + (rayVector * sqrtf(toIntersectionSq)); + } + } + else + if (objectBox.intersectsWithLine(objectRay)) + { + // Now transform into world space, since we need to use world space + // scales and distances. + core::aabbox3df worldBox(objectBox); + current->getAbsoluteTransformation().transformBox(worldBox); + + core::vector3df edges[8]; + worldBox.getEdges(edges); + + /* We need to check against each of 6 faces, composed of these corners: + /3--------/7 + / | / | + / | / | + 1---------5 | + | 2- - -| -6 + | / | / + |/ | / + 0---------4/ + + Note that we define them as opposite pairs of faces. + */ + static const s32 faceEdges[6][3] = + { + { 0, 1, 5 }, // Front + { 6, 7, 3 }, // Back + { 2, 3, 1 }, // Left + { 4, 5, 7 }, // Right + { 1, 3, 7 }, // Top + { 2, 0, 4 } // Bottom + }; + + core::vector3df intersection; + core::plane3df facePlane; + f32 bestDistToBoxBorder = FLT_MAX; + f32 bestToIntersectionSq = FLT_MAX; + + for(s32 face = 0; face < 6; ++face) + { + facePlane.setPlane(edges[faceEdges[face][0]], + edges[faceEdges[face][1]], + edges[faceEdges[face][2]]); + + // Only consider lines that might be entering through this face, since we + // already know that the start point is outside the box. + if(facePlane.classifyPointRelation(ray.start) != core::ISREL3D_FRONT) + continue; + + // Don't bother using a limited ray, since we already know that it should be long + // enough to intersect with the box. + if(facePlane.getIntersectionWithLine(ray.start, rayVector, intersection)) + { + const f32 toIntersectionSq = ray.start.getDistanceFromSQ(intersection); + if(toIntersectionSq < outbestdistance) + { + // We have to check that the intersection with this plane is actually + // on the box, so need to go back to object space again. + worldToObject.transformVect(intersection); + + // find the closest point on the box borders. Have to do this as exact checks will fail due to floating point problems. + f32 distToBorder = core::max_ ( core::min_ (core::abs_(objectBox.MinEdge.X-intersection.X), core::abs_(objectBox.MaxEdge.X-intersection.X)), + core::min_ (core::abs_(objectBox.MinEdge.Y-intersection.Y), core::abs_(objectBox.MaxEdge.Y-intersection.Y)), + core::min_ (core::abs_(objectBox.MinEdge.Z-intersection.Z), core::abs_(objectBox.MaxEdge.Z-intersection.Z)) ); + if ( distToBorder < bestDistToBoxBorder ) + { + bestDistToBoxBorder = distToBorder; + bestToIntersectionSq = toIntersectionSq; + } + } + } + + // If the ray could be entering through the first face of a pair, then it can't + // also be entering through the opposite face, and so we can skip that face. + if (!(face & 0x01)) + ++face; + } + + if ( bestDistToBoxBorder < FLT_MAX ) + { + outbestdistance = bestToIntersectionSq; + outbestnode = current; + + // If we got a hit, we can now truncate the ray to stop us hitting further nodes. + ray.end = ray.start + (rayVector * sqrtf(outbestdistance)); + } + } + } + + // Only check the children if this node is visible. + getPickedNodeBB(current, ray, bits, noDebugObjects, outbestdistance, outbestnode); + } + } +} + + +ISceneNode* CSceneCollisionManager::getSceneNodeAndCollisionPointFromRay( + core::line3df ray, + core::vector3df & outCollisionPoint, + core::triangle3df & outTriangle, + s32 idBitMask, + ISceneNode * collisionRootNode, + bool noDebugObjects) +{ + ISceneNode* bestNode = 0; + f32 bestDistanceSquared = FLT_MAX; + + if(0 == collisionRootNode) + collisionRootNode = SceneManager->getRootSceneNode(); + + // We don't try to do anything too clever, like sorting the candidate + // nodes by distance to bounding-box. In the example below, we could do the + // triangle collision check with node A first, but we'd have to check node B + // anyway, as the actual collision point could be (and is) closer than the + // collision point in node A. + // + // ray end + // | + // AAAAAAAAAA + // A | + // A | B + // A | B + // A BBBBB + // A | + // A | + // | + // | + // ray start + // + // We therefore have to do a full BB and triangle collision on every scene + // node in order to find the nearest collision point, so sorting them by + // bounding box would be pointless. + + getPickedNodeFromBBAndSelector(collisionRootNode, ray, idBitMask, + noDebugObjects, bestDistanceSquared, bestNode, + outCollisionPoint, outTriangle); + return bestNode; +} + + +void CSceneCollisionManager::getPickedNodeFromBBAndSelector( + ISceneNode * root, + core::line3df & ray, + s32 bits, + bool noDebugObjects, + f32 & outBestDistanceSquared, + ISceneNode * & outBestNode, + core::vector3df & outBestCollisionPoint, + core::triangle3df & outBestTriangle) +{ + const ISceneNodeList& children = root->getChildren(); + + ISceneNodeList::ConstIterator it = children.begin(); + for (; it != children.end(); ++it) + { + ISceneNode* current = *it; + ITriangleSelector * selector = current->getTriangleSelector(); + + if (selector && current->isVisible() && + (noDebugObjects ? !current->isDebugObject() : true) && + (bits==0 || (bits != 0 && (current->getID() & bits)))) + { + // get world to object space transform + core::matrix4 mat; + if (!current->getAbsoluteTransformation().getInverse(mat)) + continue; + + // transform vector from world space to object space + core::line3df line(ray); + mat.transformVect(line.start); + mat.transformVect(line.end); + + const core::aabbox3df& box = current->getBoundingBox(); + + core::vector3df candidateCollisionPoint; + core::triangle3df candidateTriangle; + + // do intersection test in object space + ISceneNode * hitNode = 0; + if (box.intersectsWithLine(line) && + getCollisionPoint(ray, selector, candidateCollisionPoint, candidateTriangle, hitNode)) + { + const f32 distanceSquared = (candidateCollisionPoint - ray.start).getLengthSQ(); + + if(distanceSquared < outBestDistanceSquared) + { + outBestDistanceSquared = distanceSquared; + outBestNode = current; + outBestCollisionPoint = candidateCollisionPoint; + outBestTriangle = candidateTriangle; + const core::vector3df rayVector = ray.getVector().normalize(); + ray.end = ray.start + (rayVector * sqrtf(distanceSquared)); + } + } + } + + getPickedNodeFromBBAndSelector(current, ray, bits, noDebugObjects, + outBestDistanceSquared, outBestNode, + outBestCollisionPoint, outBestTriangle); + } +} + + +//! Returns the scene node, at which the overgiven camera is looking at and +//! which id matches the bitmask. +ISceneNode* CSceneCollisionManager::getSceneNodeFromCameraBB( + ICameraSceneNode* camera, s32 idBitMask, bool noDebugObjects) +{ + if (!camera) + return 0; + + const core::vector3df start = camera->getAbsolutePosition(); + core::vector3df end = camera->getTarget(); + + end = start + ((end - start).normalize() * camera->getFarValue()); + + return getSceneNodeFromRayBB(core::line3d<f32>(start, end), idBitMask, noDebugObjects); +} + + +//! Finds the collision point of a line and lots of triangles, if there is one. +bool CSceneCollisionManager::getCollisionPoint(const core::line3d<f32>& ray, + ITriangleSelector* selector, core::vector3df& outIntersection, + core::triangle3df& outTriangle, + ISceneNode*& outNode) +{ + if (!selector) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + s32 totalcnt = selector->getTriangleCount(); + if ( totalcnt <= 0 ) + return false; + + Triangles.set_used(totalcnt); + + s32 cnt = 0; + selector->getTriangles(Triangles.pointer(), totalcnt, cnt, ray); + + const core::vector3df linevect = ray.getVector().normalize(); + core::vector3df intersection; + f32 nearest = FLT_MAX; + bool found = false; + const f32 raylength = ray.getLengthSQ(); + + const f32 minX = core::min_(ray.start.X, ray.end.X); + const f32 maxX = core::max_(ray.start.X, ray.end.X); + const f32 minY = core::min_(ray.start.Y, ray.end.Y); + const f32 maxY = core::max_(ray.start.Y, ray.end.Y); + const f32 minZ = core::min_(ray.start.Z, ray.end.Z); + const f32 maxZ = core::max_(ray.start.Z, ray.end.Z); + + for (s32 i=0; i<cnt; ++i) + { + const core::triangle3df & triangle = Triangles[i]; + + if(minX > triangle.pointA.X && minX > triangle.pointB.X && minX > triangle.pointC.X) + continue; + if(maxX < triangle.pointA.X && maxX < triangle.pointB.X && maxX < triangle.pointC.X) + continue; + if(minY > triangle.pointA.Y && minY > triangle.pointB.Y && minY > triangle.pointC.Y) + continue; + if(maxY < triangle.pointA.Y && maxY < triangle.pointB.Y && maxY < triangle.pointC.Y) + continue; + if(minZ > triangle.pointA.Z && minZ > triangle.pointB.Z && minZ > triangle.pointC.Z) + continue; + if(maxZ < triangle.pointA.Z && maxZ < triangle.pointB.Z && maxZ < triangle.pointC.Z) + continue; + + if (triangle.getIntersectionWithLine(ray.start, linevect, intersection)) + { + const f32 tmp = intersection.getDistanceFromSQ(ray.start); + const f32 tmp2 = intersection.getDistanceFromSQ(ray.end); + + if (tmp < raylength && tmp2 < raylength && tmp < nearest) + { + nearest = tmp; + outTriangle = triangle; + outIntersection = intersection; + outNode = selector->getSceneNodeForTriangle(i); + found = true; + } + } + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return found; +} + + +//! Collides a moving ellipsoid with a 3d world with gravity and returns +//! the resulting new position of the ellipsoid. +core::vector3df CSceneCollisionManager::getCollisionResultPosition( + ITriangleSelector* selector, + const core::vector3df &position, const core::vector3df& radius, + const core::vector3df& direction, + core::triangle3df& triout, + core::vector3df& hitPosition, + bool& outFalling, + ISceneNode*& outNode, + f32 slidingSpeed, + const core::vector3df& gravity) +{ + return collideEllipsoidWithWorld(selector, position, + radius, direction, slidingSpeed, gravity, triout, hitPosition, outFalling, outNode); +} + + +bool CSceneCollisionManager::testTriangleIntersection(SCollisionData* colData, + const core::triangle3df& triangle) +{ + const core::plane3d<f32> trianglePlane = triangle.getPlane(); + + // only check front facing polygons + if ( !trianglePlane.isFrontFacing(colData->normalizedVelocity) ) + return false; + + // get interval of plane intersection + + f32 t1, t0; + bool embeddedInPlane = false; + + // calculate signed distance from sphere position to triangle plane + f32 signedDistToTrianglePlane = trianglePlane.getDistanceTo( + colData->basePoint); + + f32 normalDotVelocity = + trianglePlane.Normal.dotProduct(colData->velocity); + + if ( core::iszero ( normalDotVelocity ) ) + { + // sphere is traveling parallel to plane + + if (fabs(signedDistToTrianglePlane) >= 1.0f) + return false; // no collision possible + else + { + // sphere is embedded in plane + embeddedInPlane = true; + t0 = 0.0; + t1 = 1.0; + } + } + else + { + normalDotVelocity = core::reciprocal ( normalDotVelocity ); + + // N.D is not 0. Calculate intersection interval + t0 = (-1.f - signedDistToTrianglePlane) * normalDotVelocity; + t1 = (1.f - signedDistToTrianglePlane) * normalDotVelocity; + + // Swap so t0 < t1 + if (t0 > t1) { f32 tmp = t1; t1 = t0; t0 = tmp; } + + // check if at least one value is within the range + if (t0 > 1.0f || t1 < 0.0f) + return false; // both t values are outside 1 and 0, no collision possible + + // clamp to 0 and 1 + t0 = core::clamp ( t0, 0.f, 1.f ); + t1 = core::clamp ( t1, 0.f, 1.f ); + } + + // at this point we have t0 and t1, if there is any intersection, it + // is between this interval + core::vector3df collisionPoint; + bool foundCollision = false; + f32 t = 1.0f; + + // first check the easy case: Collision within the triangle; + // if this happens, it must be at t0 and this is when the sphere + // rests on the front side of the triangle plane. This can only happen + // if the sphere is not embedded in the triangle plane. + + if (!embeddedInPlane) + { + core::vector3df planeIntersectionPoint = + (colData->basePoint - trianglePlane.Normal) + + (colData->velocity * t0); + + if (triangle.isPointInside(planeIntersectionPoint)) + { + foundCollision = true; + t = t0; + collisionPoint = planeIntersectionPoint; + } + } + + // if we havent found a collision already we will have to sweep + // the sphere against points and edges of the triangle. Note: A + // collision inside the triangle will always happen before a + // vertex or edge collision. + + if (!foundCollision) + { + core::vector3df velocity = colData->velocity; + core::vector3df base = colData->basePoint; + + f32 velocitySqaredLength = velocity.getLengthSQ(); + f32 a,b,c; + f32 newT; + + // for each edge or vertex a quadratic equation has to be solved: + // a*t^2 + b*t + c = 0. We calculate a,b, and c for each test. + + // check against points + a = velocitySqaredLength; + + // p1 + b = 2.0f * (velocity.dotProduct(base - triangle.pointA)); + c = (triangle.pointA-base).getLengthSQ() - 1.f; + if (getLowestRoot(a,b,c,t, &newT)) + { + t = newT; + foundCollision = true; + collisionPoint = triangle.pointA; + } + + // p2 + if (!foundCollision) + { + b = 2.0f * (velocity.dotProduct(base - triangle.pointB)); + c = (triangle.pointB-base).getLengthSQ() - 1.f; + if (getLowestRoot(a,b,c,t, &newT)) + { + t = newT; + foundCollision = true; + collisionPoint = triangle.pointB; + } + } + + // p3 + if (!foundCollision) + { + b = 2.0f * (velocity.dotProduct(base - triangle.pointC)); + c = (triangle.pointC-base).getLengthSQ() - 1.f; + if (getLowestRoot(a,b,c,t, &newT)) + { + t = newT; + foundCollision = true; + collisionPoint = triangle.pointC; + } + } + + // check against edges: + + // p1 --- p2 + core::vector3df edge = triangle.pointB - triangle.pointA; + core::vector3df baseToVertex = triangle.pointA - base; + f32 edgeSqaredLength = edge.getLengthSQ(); + f32 edgeDotVelocity = edge.dotProduct(velocity); + f32 edgeDotBaseToVertex = edge.dotProduct(baseToVertex); + + // calculate parameters for equation + a = edgeSqaredLength* -velocitySqaredLength + + edgeDotVelocity*edgeDotVelocity; + b = edgeSqaredLength* (2.f *velocity.dotProduct(baseToVertex)) - + 2.0f*edgeDotVelocity*edgeDotBaseToVertex; + c = edgeSqaredLength* (1.f -baseToVertex.getLengthSQ()) + + edgeDotBaseToVertex*edgeDotBaseToVertex; + + // does the swept sphere collide against infinite edge? + if (getLowestRoot(a,b,c,t,&newT)) + { + f32 f = (edgeDotVelocity*newT - edgeDotBaseToVertex) / edgeSqaredLength; + if (f >=0.0f && f <= 1.0f) + { + // intersection took place within segment + t = newT; + foundCollision = true; + collisionPoint = triangle.pointA + (edge*f); + } + } + + // p2 --- p3 + edge = triangle.pointC-triangle.pointB; + baseToVertex = triangle.pointB - base; + edgeSqaredLength = edge.getLengthSQ(); + edgeDotVelocity = edge.dotProduct(velocity); + edgeDotBaseToVertex = edge.dotProduct(baseToVertex); + + // calculate parameters for equation + a = edgeSqaredLength* -velocitySqaredLength + + edgeDotVelocity*edgeDotVelocity; + b = edgeSqaredLength* (2*velocity.dotProduct(baseToVertex)) - + 2.0f*edgeDotVelocity*edgeDotBaseToVertex; + c = edgeSqaredLength* (1-baseToVertex.getLengthSQ()) + + edgeDotBaseToVertex*edgeDotBaseToVertex; + + // does the swept sphere collide against infinite edge? + if (getLowestRoot(a,b,c,t,&newT)) + { + f32 f = (edgeDotVelocity*newT-edgeDotBaseToVertex) / + edgeSqaredLength; + if (f >=0.0f && f <= 1.0f) + { + // intersection took place within segment + t = newT; + foundCollision = true; + collisionPoint = triangle.pointB + (edge*f); + } + } + + + // p3 --- p1 + edge = triangle.pointA-triangle.pointC; + baseToVertex = triangle.pointC - base; + edgeSqaredLength = edge.getLengthSQ(); + edgeDotVelocity = edge.dotProduct(velocity); + edgeDotBaseToVertex = edge.dotProduct(baseToVertex); + + // calculate parameters for equation + a = edgeSqaredLength* -velocitySqaredLength + + edgeDotVelocity*edgeDotVelocity; + b = edgeSqaredLength* (2*velocity.dotProduct(baseToVertex)) - + 2.0f*edgeDotVelocity*edgeDotBaseToVertex; + c = edgeSqaredLength* (1-baseToVertex.getLengthSQ()) + + edgeDotBaseToVertex*edgeDotBaseToVertex; + + // does the swept sphere collide against infinite edge? + if (getLowestRoot(a,b,c,t,&newT)) + { + f32 f = (edgeDotVelocity*newT-edgeDotBaseToVertex) / + edgeSqaredLength; + if (f >=0.0f && f <= 1.0f) + { + // intersection took place within segment + t = newT; + foundCollision = true; + collisionPoint = triangle.pointC + (edge*f); + } + } + }// end no collision found + + // set result: + if (foundCollision) + { + // distance to collision is t + f32 distToCollision = t*colData->velocity.getLength(); + + // does this triangle qualify for closest hit? + if (!colData->foundCollision || + distToCollision < colData->nearestDistance) + { + colData->nearestDistance = distToCollision; + colData->intersectionPoint = collisionPoint; + colData->foundCollision = true; + colData->intersectionTriangle = triangle; + ++colData->triangleHits; + return true; + } + }// end found collision + + return false; +} + + +//! Collides a moving ellipsoid with a 3d world with gravity and returns +//! the resulting new position of the ellipsoid. +core::vector3df CSceneCollisionManager::collideEllipsoidWithWorld( + ITriangleSelector* selector, const core::vector3df &position, + const core::vector3df& radius, const core::vector3df& velocity, + f32 slidingSpeed, + const core::vector3df& gravity, + core::triangle3df& triout, + core::vector3df& hitPosition, + bool& outFalling, + ISceneNode*& outNode) +{ + if (!selector || radius.X == 0.0f || radius.Y == 0.0f || radius.Z == 0.0f) + return position; + + // This code is based on the paper "Improved Collision detection and Response" + // by Kasper Fauerby, but some parts are modified. + + SCollisionData colData; + colData.R3Position = position; + colData.R3Velocity = velocity; + colData.eRadius = radius; + colData.nearestDistance = FLT_MAX; + colData.selector = selector; + colData.slidingSpeed = slidingSpeed; + colData.triangleHits = 0; + colData.triangleIndex = -1; + + core::vector3df eSpacePosition = colData.R3Position / colData.eRadius; + core::vector3df eSpaceVelocity = colData.R3Velocity / colData.eRadius; + + // iterate until we have our final position + + core::vector3df finalPos = collideWithWorld( + 0, colData, eSpacePosition, eSpaceVelocity); + + outFalling = false; + + // add gravity + + if (gravity != core::vector3df(0,0,0)) + { + colData.R3Position = finalPos * colData.eRadius; + colData.R3Velocity = gravity; + colData.triangleHits = 0; + + eSpaceVelocity = gravity/colData.eRadius; + + finalPos = collideWithWorld(0, colData, + finalPos, eSpaceVelocity); + + outFalling = (colData.triangleHits == 0); + } + + if (colData.triangleHits) + { + triout = colData.intersectionTriangle; + triout.pointA *= colData.eRadius; + triout.pointB *= colData.eRadius; + triout.pointC *= colData.eRadius; + outNode = selector->getSceneNodeForTriangle(colData.triangleIndex); + } + + finalPos *= colData.eRadius; + hitPosition = colData.intersectionPoint * colData.eRadius; + return finalPos; +} + + +core::vector3df CSceneCollisionManager::collideWithWorld(s32 recursionDepth, + SCollisionData &colData, core::vector3df pos, core::vector3df vel) +{ + f32 veryCloseDistance = colData.slidingSpeed; + + if (recursionDepth > 5) + return pos; + + colData.velocity = vel; + colData.normalizedVelocity = vel; + colData.normalizedVelocity.normalize(); + colData.basePoint = pos; + colData.foundCollision = false; + colData.nearestDistance = FLT_MAX; + + //------------------ collide with world + + // get all triangles with which we might collide + core::aabbox3d<f32> box(colData.R3Position); + box.addInternalPoint(colData.R3Position + colData.R3Velocity); + box.MinEdge -= colData.eRadius; + box.MaxEdge += colData.eRadius; + + s32 totalTriangleCnt = colData.selector->getTriangleCount(); + Triangles.set_used(totalTriangleCnt); + + core::matrix4 scaleMatrix; + scaleMatrix.setScale( + core::vector3df(1.0f / colData.eRadius.X, + 1.0f / colData.eRadius.Y, + 1.0f / colData.eRadius.Z)); + + s32 triangleCnt = 0; + colData.selector->getTriangles(Triangles.pointer(), totalTriangleCnt, triangleCnt, box, &scaleMatrix); + + for (s32 i=0; i<triangleCnt; ++i) + if(testTriangleIntersection(&colData, Triangles[i])) + colData.triangleIndex = i; + + //---------------- end collide with world + + if (!colData.foundCollision) + return pos + vel; + + // original destination point + const core::vector3df destinationPoint = pos + vel; + core::vector3df newBasePoint = pos; + + // only update if we are not already very close + // and if so only move very close to intersection, not to the + // exact point + if (colData.nearestDistance >= veryCloseDistance) + { + core::vector3df v = vel; + v.setLength( colData.nearestDistance - veryCloseDistance ); + newBasePoint = colData.basePoint + v; + + v.normalize(); + colData.intersectionPoint -= (v * veryCloseDistance); + } + + // calculate sliding plane + + const core::vector3df slidePlaneOrigin = colData.intersectionPoint; + const core::vector3df slidePlaneNormal = (newBasePoint - colData.intersectionPoint).normalize(); + core::plane3d<f32> slidingPlane(slidePlaneOrigin, slidePlaneNormal); + + core::vector3df newDestinationPoint = + destinationPoint - + (slidePlaneNormal * slidingPlane.getDistanceTo(destinationPoint)); + + // generate slide vector + + const core::vector3df newVelocityVector = newDestinationPoint - + colData.intersectionPoint; + + if (newVelocityVector.getLength() < veryCloseDistance) + return newBasePoint; + + return collideWithWorld(recursionDepth+1, colData, + newBasePoint, newVelocityVector); +} + + +//! Returns a 3d ray which would go through the 2d screen coodinates. +core::line3d<f32> CSceneCollisionManager::getRayFromScreenCoordinates( + const core::position2d<s32> & pos, ICameraSceneNode* camera) +{ + core::line3d<f32> ln(0,0,0,0,0,0); + + if (!SceneManager) + return ln; + + if (!camera) + camera = SceneManager->getActiveCamera(); + + if (!camera) + return ln; + + const scene::SViewFrustum* f = camera->getViewFrustum(); + + core::vector3df farLeftUp = f->getFarLeftUp(); + core::vector3df lefttoright = f->getFarRightUp() - farLeftUp; + core::vector3df uptodown = f->getFarLeftDown() - farLeftUp; + + const core::rect<s32>& viewPort = Driver->getViewPort(); + core::dimension2d<u32> screenSize(viewPort.getWidth(), viewPort.getHeight()); + + f32 dx = pos.X / (f32)screenSize.Width; + f32 dy = pos.Y / (f32)screenSize.Height; + + if (camera->isOrthogonal()) + ln.start = f->cameraPosition + (lefttoright * (dx-0.5f)) + (uptodown * (dy-0.5f)); + else + ln.start = f->cameraPosition; + + ln.end = farLeftUp + (lefttoright * dx) + (uptodown * dy); + + return ln; +} + + +//! Calculates 2d screen position from a 3d position. +core::position2d<s32> CSceneCollisionManager::getScreenCoordinatesFrom3DPosition( + const core::vector3df & pos3d, ICameraSceneNode* camera, bool useViewPort) +{ + if (!SceneManager || !Driver) + return core::position2d<s32>(-1000,-1000); + + if (!camera) + camera = SceneManager->getActiveCamera(); + + if (!camera) + return core::position2d<s32>(-1000,-1000); + + core::dimension2d<u32> dim; + if (useViewPort) + dim.set(Driver->getViewPort().getWidth(), Driver->getViewPort().getHeight()); + else + dim=(Driver->getCurrentRenderTargetSize()); + + dim.Width /= 2; + dim.Height /= 2; + + core::matrix4 trans = camera->getProjectionMatrix(); + trans *= camera->getViewMatrix(); + + f32 transformedPos[4] = { pos3d.X, pos3d.Y, pos3d.Z, 1.0f }; + + trans.multiplyWith1x4Matrix(transformedPos); + + if (transformedPos[3] < 0) + return core::position2d<s32>(-10000,-10000); + + const f32 zDiv = transformedPos[3] == 0.0f ? 1.0f : + core::reciprocal(transformedPos[3]); + + return core::position2d<s32>( + dim.Width + core::round32(dim.Width * (transformedPos[0] * zDiv)), + dim.Height - core::round32(dim.Height * (transformedPos[1] * zDiv))); +} + + +inline bool CSceneCollisionManager::getLowestRoot(f32 a, f32 b, f32 c, f32 maxR, f32* root) +{ + // check if solution exists + const f32 determinant = b*b - 4.0f*a*c; + + // if determinant is negative, no solution + if (determinant < 0.0f || a == 0.f ) + return false; + + // calculate two roots: (if det==0 then x1==x2 + // but lets disregard that slight optimization) + + const f32 sqrtD = sqrtf(determinant); + const f32 invDA = core::reciprocal(2*a); + f32 r1 = (-b - sqrtD) * invDA; + f32 r2 = (-b + sqrtD) * invDA; + + // sort so x1 <= x2 + if (r1 > r2) + core::swap(r1,r2); + + // get lowest root + if (r1 > 0 && r1 < maxR) + { + *root = r1; + return true; + } + + // its possible that we want x2, this can happen if x1 < 0 + if (r2 > 0 && r2 < maxR) + { + *root = r2; + return true; + } + + return false; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.h new file mode 100644 index 0000000..c581a47 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneCollisionManager.h @@ -0,0 +1,158 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_COLLISION_MANAGER_H_INCLUDED__ +#define __C_SCENE_COLLISION_MANAGER_H_INCLUDED__ + +#include "ISceneCollisionManager.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace scene +{ + + //! The Scene Collision Manager provides methods for performing collision tests and picking on scene nodes. + class CSceneCollisionManager : public ISceneCollisionManager + { + public: + + //! constructor + CSceneCollisionManager(ISceneManager* smanager, video::IVideoDriver* driver); + + //! destructor + virtual ~CSceneCollisionManager(); + + //! Returns the scene node, which is currently visible at the given + //! screen coordinates, viewed from the currently active camera. + virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d<s32>& pos, + s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0); + + //! Returns the nearest scene node which collides with a 3d ray and + //! whose id matches a bitmask. + virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d<f32>& ray, + s32 idBitMask=0, bool bNoDebugObjects=false, + ISceneNode* root=0); + + //! Returns the scene node, at which the overgiven camera is looking at and + //! which id matches the bitmask. + virtual ISceneNode* getSceneNodeFromCameraBB(ICameraSceneNode* camera, + s32 idBitMask=0, bool bNoDebugObjects = false); + + //! Finds the collision point of a line and lots of triangles, if there is one. + virtual bool getCollisionPoint(const core::line3d<f32>& ray, + ITriangleSelector* selector, core::vector3df& outCollisionPoint, + core::triangle3df& outTriangle, + ISceneNode* & outNode); + + //! Collides a moving ellipsoid with a 3d world with gravity and returns + //! the resulting new position of the ellipsoid. + virtual core::vector3df getCollisionResultPosition( + ITriangleSelector* selector, + const core::vector3df &ellipsoidPosition, + const core::vector3df& ellipsoidRadius, + const core::vector3df& ellipsoidDirectionAndSpeed, + core::triangle3df& triout, + core::vector3df& hitPosition, + bool& outFalling, + ISceneNode*& outNode, + f32 slidingSpeed, + const core::vector3df& gravityDirectionAndSpeed); + + //! Returns a 3d ray which would go through the 2d screen coodinates. + virtual core::line3d<f32> getRayFromScreenCoordinates( + const core::position2d<s32> & pos, ICameraSceneNode* camera = 0); + + //! Calculates 2d screen position from a 3d position. + virtual core::position2d<s32> getScreenCoordinatesFrom3DPosition( + const core::vector3df & pos, ICameraSceneNode* camera=0, bool useViewPort=false); + + //! Gets the scene node and nearest collision point for a ray based on + //! the nodes' id bitmasks, bounding boxes and triangle selectors. + virtual ISceneNode* getSceneNodeAndCollisionPointFromRay( + core::line3df ray, + core::vector3df & outCollisionPoint, + core::triangle3df & outTriangle, + s32 idBitMask = 0, + ISceneNode * collisionRootNode = 0, + bool noDebugObjects = false); + + + private: + + //! recursive method for going through all scene nodes + void getPickedNodeBB(ISceneNode* root, core::line3df& ray, s32 bits, + bool bNoDebugObjects, + f32& outbestdistance, ISceneNode*& outbestnode); + + //! recursive method for going through all scene nodes + void getPickedNodeFromBBAndSelector(ISceneNode * root, + core::line3df & ray, + s32 bits, + bool noDebugObjects, + f32 & outBestDistanceSquared, + ISceneNode * & outBestNode, + core::vector3df & outBestCollisionPoint, + core::triangle3df & outBestTriangle); + + + struct SCollisionData + { + core::vector3df eRadius; + + core::vector3df R3Velocity; + core::vector3df R3Position; + + core::vector3df velocity; + core::vector3df normalizedVelocity; + core::vector3df basePoint; + + bool foundCollision; + f32 nearestDistance; + core::vector3df intersectionPoint; + + core::triangle3df intersectionTriangle; + s32 triangleIndex; + s32 triangleHits; + + f32 slidingSpeed; + + ITriangleSelector* selector; + }; + + //! Tests the current collision data against an individual triangle. + /** + \param colData: the collision data. + \param triangle: the triangle to test against. + \return true if the triangle is hit (and is the closest hit), false otherwise */ + bool testTriangleIntersection(SCollisionData* colData, + const core::triangle3df& triangle); + + //! recursive method for doing collision response + core::vector3df collideEllipsoidWithWorld(ITriangleSelector* selector, + const core::vector3df &position, + const core::vector3df& radius, const core::vector3df& velocity, + f32 slidingSpeed, + const core::vector3df& gravity, core::triangle3df& triout, + core::vector3df& hitPosition, + bool& outFalling, + ISceneNode*& outNode); + + core::vector3df collideWithWorld(s32 recursionDepth, SCollisionData &colData, + core::vector3df pos, core::vector3df vel); + + inline bool getLowestRoot(f32 a, f32 b, f32 c, f32 maxR, f32* root); + + ISceneManager* SceneManager; + video::IVideoDriver* Driver; + core::array<core::triangle3df> Triangles; // triangle buffer + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.cpp new file mode 100644 index 0000000..7705436 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.cpp @@ -0,0 +1,284 @@ +// Copyright (C) 2010-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneLoaderIrr.h" +#include "ISceneNodeAnimatorFactory.h" +#include "ISceneUserDataSerializer.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! Constructor +CSceneLoaderIrr::CSceneLoaderIrr(ISceneManager *smgr, io::IFileSystem* fs) + : SceneManager(smgr), FileSystem(fs), + IRR_XML_FORMAT_SCENE(L"irr_scene"), IRR_XML_FORMAT_NODE(L"node"), IRR_XML_FORMAT_NODE_ATTR_TYPE(L"type"), + IRR_XML_FORMAT_ATTRIBUTES(L"attributes"), IRR_XML_FORMAT_MATERIALS(L"materials"), + IRR_XML_FORMAT_ANIMATORS(L"animators"), IRR_XML_FORMAT_USERDATA(L"userData") +{ + +} + +//! Destructor +CSceneLoaderIrr::~CSceneLoaderIrr() +{ + +} + +//! Returns true if the class might be able to load this file. +bool CSceneLoaderIrr::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension(filename, "irr"); +} + +//! Returns true if the class might be able to load this file. +bool CSceneLoaderIrr::isALoadableFileFormat(io::IReadFile *file) const +{ + // todo: check inside the file + return true; +} + +//! Loads the scene into the scene manager. +bool CSceneLoaderIrr::loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer, + ISceneNode* rootNode) +{ + if (!file) + { + os::Printer::log("Unable to open scene file", ELL_ERROR); + return false; + } + + io::IXMLReader* reader = FileSystem->createXMLReader(file); + if (!reader) + { + os::Printer::log("Scene is not a valid XML file", file->getFileName().c_str(), ELL_ERROR); + return false; + } + + // TODO: COLLADA_CREATE_SCENE_INSTANCES can be removed when the COLLADA loader is a scene loader + bool oldColladaSingleMesh = SceneManager->getParameters()->getAttributeAsBool(COLLADA_CREATE_SCENE_INSTANCES); + SceneManager->getParameters()->setAttribute(COLLADA_CREATE_SCENE_INSTANCES, false); + + // read file + while (reader->read()) + { + readSceneNode(reader, rootNode, userDataSerializer); + } + + // restore old collada parameters + SceneManager->getParameters()->setAttribute(COLLADA_CREATE_SCENE_INSTANCES, oldColladaSingleMesh); + + // clean up + reader->drop(); + return true; +} + + +//! Reads the next node +void CSceneLoaderIrr::readSceneNode(io::IXMLReader* reader, ISceneNode* parent, + ISceneUserDataSerializer* userDataSerializer) +{ + if (!reader) + return; + + scene::ISceneNode* node = 0; + + if (!parent && IRR_XML_FORMAT_SCENE==reader->getNodeName()) + node = SceneManager->getRootSceneNode(); + else if (parent && IRR_XML_FORMAT_NODE==reader->getNodeName()) + { + // find node type and create it + core::stringc attrName = reader->getAttributeValue(IRR_XML_FORMAT_NODE_ATTR_TYPE.c_str()); + + node = SceneManager->addSceneNode(attrName.c_str(), parent); + + if (!node) + os::Printer::log("Could not create scene node of unknown type", attrName.c_str()); + } + else + node=parent; + + // read attributes + while(reader->read()) + { + bool endreached = false; + + const wchar_t* name = reader->getNodeName(); + + switch (reader->getNodeType()) + { + case io::EXN_ELEMENT_END: + if ((IRR_XML_FORMAT_NODE == name) || + (IRR_XML_FORMAT_SCENE == name)) + { + endreached = true; + } + break; + case io::EXN_ELEMENT: + if (IRR_XML_FORMAT_ATTRIBUTES == name) + { + // read attributes + io::IAttributes* attr = FileSystem->createEmptyAttributes(SceneManager->getVideoDriver()); + attr->read(reader, true); + + if (node) + node->deserializeAttributes(attr); + + attr->drop(); + } + else + if (IRR_XML_FORMAT_MATERIALS == name) + readMaterials(reader, node); + else + if (IRR_XML_FORMAT_ANIMATORS == name) + readAnimators(reader, node); + else + if (IRR_XML_FORMAT_USERDATA == name) + readUserData(reader, node, userDataSerializer); + else + if ((IRR_XML_FORMAT_NODE == name) || + (IRR_XML_FORMAT_SCENE == name)) + { + readSceneNode(reader, node, userDataSerializer); + } + else + { + os::Printer::log("Found unknown element in irrlicht scene file", + core::stringc(name).c_str()); + } + break; + default: + break; + } + + if (endreached) + break; + } + if (node && userDataSerializer) + userDataSerializer->OnCreateNode(node); +} + +//! reads materials of a node +void CSceneLoaderIrr::readMaterials(io::IXMLReader* reader, ISceneNode* node) +{ + u32 nr = 0; + + while(reader->read()) + { + const wchar_t* name = reader->getNodeName(); + + switch(reader->getNodeType()) + { + case io::EXN_ELEMENT_END: + if (IRR_XML_FORMAT_MATERIALS == name) + return; + break; + case io::EXN_ELEMENT: + if (IRR_XML_FORMAT_ATTRIBUTES == name) + { + // read materials from attribute list + io::IAttributes* attr = FileSystem->createEmptyAttributes(SceneManager->getVideoDriver()); + attr->read(reader); + + if (node && node->getMaterialCount() > nr) + { + SceneManager->getVideoDriver()->fillMaterialStructureFromAttributes( + node->getMaterial(nr), attr); + } + + attr->drop(); + ++nr; + } + break; + default: + break; + } + } +} + + +//! reads animators of a node +void CSceneLoaderIrr::readAnimators(io::IXMLReader* reader, ISceneNode* node) +{ + while(reader->read()) + { + const wchar_t* name = reader->getNodeName(); + + switch(reader->getNodeType()) + { + case io::EXN_ELEMENT_END: + if (IRR_XML_FORMAT_ANIMATORS == name) + return; + break; + case io::EXN_ELEMENT: + if (IRR_XML_FORMAT_ATTRIBUTES == name) + { + // read animator data from attribute list + io::IAttributes* attr = FileSystem->createEmptyAttributes(SceneManager->getVideoDriver()); + attr->read(reader); + + if (node) + { + core::stringc typeName = attr->getAttributeAsString("Type"); + ISceneNodeAnimator* anim = SceneManager->createSceneNodeAnimator(typeName.c_str(), node); + + if (anim) + { + anim->deserializeAttributes(attr); + anim->drop(); + } + } + + attr->drop(); + } + break; + default: + break; + } + } +} + + +//! reads user data of a node +void CSceneLoaderIrr::readUserData(io::IXMLReader* reader, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer) +{ + while(reader->read()) + { + const wchar_t* name = reader->getNodeName(); + + switch(reader->getNodeType()) + { + case io::EXN_ELEMENT_END: + if (IRR_XML_FORMAT_USERDATA == name) + return; + break; + case io::EXN_ELEMENT: + if (IRR_XML_FORMAT_ATTRIBUTES == name) + { + // read user data from attribute list + io::IAttributes* attr = FileSystem->createEmptyAttributes(SceneManager->getVideoDriver()); + attr->read(reader); + + if (node && userDataSerializer) + { + userDataSerializer->OnReadUserData(node, attr); + } + + attr->drop(); + } + break; + default: + break; + } + } +} + +} // scene +} // irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.h new file mode 100644 index 0000000..f8c9532 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneLoaderIrr.h @@ -0,0 +1,82 @@ +// Copyright (C) 2010-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_LOADER_IRR_H_INCLUDED__ +#define __C_SCENE_LOADER_IRR_H_INCLUDED__ + +#include "ISceneLoader.h" + +#include "IXMLReader.h" + +namespace irr +{ + +namespace io +{ + class IFileSystem; +} + +namespace scene +{ + +class ISceneManager; + +//! Class which can load a scene into the scene manager. +class CSceneLoaderIrr : public virtual ISceneLoader +{ +public: + + //! Constructor + CSceneLoaderIrr(ISceneManager *smgr, io::IFileSystem* fs); + + //! Destructor + virtual ~CSceneLoaderIrr(); + + //! Returns true if the class might be able to load this file. + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! Returns true if the class might be able to load this file. + virtual bool isALoadableFileFormat(io::IReadFile *file) const; + + //! Loads the scene into the scene manager. + virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, + ISceneNode* rootNode=0); + +private: + + //! Recursively reads nodes from the xml file + void readSceneNode(io::IXMLReader* reader, ISceneNode* parent, + ISceneUserDataSerializer* userDataSerializer); + + //! read a node's materials + void readMaterials(io::IXMLReader* reader, ISceneNode* node); + + //! read a node's animators + void readAnimators(io::IXMLReader* reader, ISceneNode* node); + + //! read any other data into the user serializer + void readUserData(io::IXMLReader* reader, ISceneNode* node, + ISceneUserDataSerializer* userDataSerializer); + + ISceneManager *SceneManager; + io::IFileSystem *FileSystem; + + //! constants for reading and writing XML. + //! Not made static due to portability problems. + // TODO: move to own header + const core::stringw IRR_XML_FORMAT_SCENE; + const core::stringw IRR_XML_FORMAT_NODE; + const core::stringw IRR_XML_FORMAT_NODE_ATTR_TYPE; + const core::stringw IRR_XML_FORMAT_ATTRIBUTES; + const core::stringw IRR_XML_FORMAT_MATERIALS; + const core::stringw IRR_XML_FORMAT_ANIMATORS; + const core::stringw IRR_XML_FORMAT_USERDATA; +}; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.cpp new file mode 100644 index 0000000..dd3652b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.cpp @@ -0,0 +1,2522 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CSceneManager.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "SAnimatedMesh.h" +#include "CMeshCache.h" +#include "IXMLWriter.h" +#include "ISceneUserDataSerializer.h" +#include "IGUIEnvironment.h" +#include "IMaterialRenderer.h" +#include "IReadFile.h" +#include "IWriteFile.h" +#include "ISceneLoader.h" + +#include "os.h" + +// We need this include for the case of skinned mesh support without +// any such loader +#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#include "CSkinnedMesh.h" +#endif + +#ifdef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#include "CIrrMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_BSP_LOADER_ +#include "CBSPMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_MD2_LOADER_ +#include "CMD2MeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#include "CAnimatedMeshHalfLife.h" +#endif + +#ifdef _IRR_COMPILE_WITH_MS3D_LOADER_ +#include "CMS3DMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_3DS_LOADER_ +#include "C3DSMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_X_LOADER_ +#include "CXMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_OCT_LOADER_ +#include "COCTLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_CSM_LOADER_ +#include "CCSMLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_LMTS_LOADER_ +#include "CLMTSMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_MY3D_LOADER_ +#include "CMY3DMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_COLLADA_LOADER_ +#include "CColladaFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_DMF_LOADER_ +#include "CDMFLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_OGRE_LOADER_ +#include "COgreMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_OBJ_LOADER_ +#include "COBJMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_MD3_LOADER_ +#include "CMD3MeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_B3D_LOADER_ +#include "CB3DMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_LWO_LOADER_ +#include "CLWOMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_STL_LOADER_ +#include "CSTLMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_PLY_LOADER_ +#include "CPLYMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_SMF_LOADER_ +#include "CSMFMeshFileLoader.h" +#endif + +#ifdef _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ +#include "CSceneLoaderIrr.h" +#endif + +#ifdef _IRR_COMPILE_WITH_COLLADA_WRITER_ +#include "CColladaMeshWriter.h" +#endif + +#ifdef _IRR_COMPILE_WITH_IRR_WRITER_ +#include "CIrrMeshWriter.h" +#endif + +#ifdef _IRR_COMPILE_WITH_STL_WRITER_ +#include "CSTLMeshWriter.h" +#endif + +#ifdef _IRR_COMPILE_WITH_OBJ_WRITER_ +#include "COBJMeshWriter.h" +#endif + +#ifdef _IRR_COMPILE_WITH_PLY_WRITER_ +#include "CPLYMeshWriter.h" +#endif + +#include "CCubeSceneNode.h" +#include "CSphereSceneNode.h" +#include "CAnimatedMeshSceneNode.h" +#include "COctreeSceneNode.h" +#include "CCameraSceneNode.h" +#include "CLightSceneNode.h" +#include "CBillboardSceneNode.h" +#include "CMeshSceneNode.h" +#include "CSkyBoxSceneNode.h" +#include "CSkyDomeSceneNode.h" +#include "CParticleSystemSceneNode.h" +#include "CDummyTransformationSceneNode.h" +#include "CWaterSurfaceSceneNode.h" +#include "CTerrainSceneNode.h" +#include "CEmptySceneNode.h" +#include "CTextSceneNode.h" +#include "CQuake3ShaderSceneNode.h" +#include "CVolumeLightSceneNode.h" + +#include "CDefaultSceneNodeFactory.h" + +#include "CSceneCollisionManager.h" +#include "CTriangleSelector.h" +#include "COctreeTriangleSelector.h" +#include "CTriangleBBSelector.h" +#include "CMetaTriangleSelector.h" +#include "CTerrainTriangleSelector.h" + +#include "CSceneNodeAnimatorRotation.h" +#include "CSceneNodeAnimatorFlyCircle.h" +#include "CSceneNodeAnimatorFlyStraight.h" +#include "CSceneNodeAnimatorTexture.h" +#include "CSceneNodeAnimatorCollisionResponse.h" +#include "CSceneNodeAnimatorDelete.h" +#include "CSceneNodeAnimatorFollowSpline.h" +#include "CSceneNodeAnimatorCameraFPS.h" +#include "CSceneNodeAnimatorCameraMaya.h" +#include "CDefaultSceneNodeAnimatorFactory.h" + +#include "CGeometryCreator.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs, + gui::ICursorControl* cursorControl, IMeshCache* cache, + gui::IGUIEnvironment* gui) +: ISceneNode(0, 0), Driver(driver), FileSystem(fs), GUIEnvironment(gui), + CursorControl(cursorControl), CollisionManager(0), + ActiveCamera(0), ShadowColor(150,0,0,0), AmbientLight(0,0,0,0), + MeshCache(cache), CurrentRendertime(ESNRP_NONE), LightManager(0), + IRR_XML_FORMAT_SCENE(L"irr_scene"), IRR_XML_FORMAT_NODE(L"node"), IRR_XML_FORMAT_NODE_ATTR_TYPE(L"type") +{ + #ifdef _DEBUG + ISceneManager::setDebugName("CSceneManager ISceneManager"); + ISceneNode::setDebugName("CSceneManager ISceneNode"); + #endif + + // root node's scene manager + SceneManager = this; + + // set scene parameters + Parameters.setAttribute( DEBUG_NORMAL_LENGTH, 1.f ); + Parameters.setAttribute( DEBUG_NORMAL_COLOR, video::SColor(255, 34, 221, 221)); + + if (Driver) + Driver->grab(); + + if (FileSystem) + FileSystem->grab(); + + if (CursorControl) + CursorControl->grab(); + + if (GUIEnvironment) + GUIEnvironment->grab(); + + // create mesh cache if not there already + if (!MeshCache) + MeshCache = new CMeshCache(); + else + MeshCache->grab(); + + // create collision manager + CollisionManager = new CSceneCollisionManager(this, Driver); + + // create geometry creator + GeometryCreator = new CGeometryCreator(); + + // add file format loaders. add the least commonly used ones first, + // as these are checked last + + // TODO: now that we have multiple scene managers, these should be + // shallow copies from the previous manager if there is one. + + #ifdef _IRR_COMPILE_WITH_STL_LOADER_ + MeshLoaderList.push_back(new CSTLMeshFileLoader()); + #endif + #ifdef _IRR_COMPILE_WITH_PLY_LOADER_ + MeshLoaderList.push_back(new CPLYMeshFileLoader(this)); + #endif + #ifdef _IRR_COMPILE_WITH_SMF_LOADER_ + MeshLoaderList.push_back(new CSMFMeshFileLoader(Driver)); + #endif + #ifdef _IRR_COMPILE_WITH_OCT_LOADER_ + MeshLoaderList.push_back(new COCTLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_CSM_LOADER_ + MeshLoaderList.push_back(new CCSMLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_LMTS_LOADER_ + MeshLoaderList.push_back(new CLMTSMeshFileLoader(FileSystem, Driver, &Parameters)); + #endif + #ifdef _IRR_COMPILE_WITH_MY3D_LOADER_ + MeshLoaderList.push_back(new CMY3DMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_DMF_LOADER_ + MeshLoaderList.push_back(new CDMFLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_OGRE_LOADER_ + MeshLoaderList.push_back(new COgreMeshFileLoader(FileSystem, Driver)); + #endif + #ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ + MeshLoaderList.push_back(new CHalflifeMDLMeshFileLoader( this )); + #endif + #ifdef _IRR_COMPILE_WITH_MD3_LOADER_ + MeshLoaderList.push_back(new CMD3MeshFileLoader( this)); + #endif + #ifdef _IRR_COMPILE_WITH_LWO_LOADER_ + MeshLoaderList.push_back(new CLWOMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_MD2_LOADER_ + MeshLoaderList.push_back(new CMD2MeshFileLoader()); + #endif + #ifdef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ + MeshLoaderList.push_back(new CIrrMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_BSP_LOADER_ + MeshLoaderList.push_back(new CBSPMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_COLLADA_LOADER_ + MeshLoaderList.push_back(new CColladaFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_3DS_LOADER_ + MeshLoaderList.push_back(new C3DSMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_X_LOADER_ + MeshLoaderList.push_back(new CXMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_MS3D_LOADER_ + MeshLoaderList.push_back(new CMS3DMeshFileLoader(Driver)); + #endif + #ifdef _IRR_COMPILE_WITH_OBJ_LOADER_ + MeshLoaderList.push_back(new COBJMeshFileLoader(this, FileSystem)); + #endif + #ifdef _IRR_COMPILE_WITH_B3D_LOADER_ + MeshLoaderList.push_back(new CB3DMeshFileLoader(this)); + #endif + + // scene loaders + #ifdef _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ + SceneLoaderList.push_back(new CSceneLoaderIrr(this, FileSystem)); + #endif + + + // factories + ISceneNodeFactory* factory = new CDefaultSceneNodeFactory(this); + registerSceneNodeFactory(factory); + factory->drop(); + + ISceneNodeAnimatorFactory* animatorFactory = new CDefaultSceneNodeAnimatorFactory(this, CursorControl); + registerSceneNodeAnimatorFactory(animatorFactory); + animatorFactory->drop(); +} + + +//! destructor +CSceneManager::~CSceneManager() +{ + clearDeletionList(); + + //! force to remove hardwareTextures from the driver + //! because Scenes may hold internally data bounded to sceneNodes + //! which may be destroyed twice + if (Driver) + Driver->removeAllHardwareBuffers(); + + if (FileSystem) + FileSystem->drop(); + + if (CursorControl) + CursorControl->drop(); + + if (CollisionManager) + CollisionManager->drop(); + + if (GeometryCreator) + GeometryCreator->drop(); + + if (GUIEnvironment) + GUIEnvironment->drop(); + + u32 i; + for (i=0; i<MeshLoaderList.size(); ++i) + MeshLoaderList[i]->drop(); + + for (i=0; i<SceneLoaderList.size(); ++i) + SceneLoaderList[i]->drop(); + + if (ActiveCamera) + ActiveCamera->drop(); + ActiveCamera = 0; + + if (MeshCache) + MeshCache->drop(); + + for (i=0; i<SceneNodeFactoryList.size(); ++i) + SceneNodeFactoryList[i]->drop(); + + for (i=0; i<SceneNodeAnimatorFactoryList.size(); ++i) + SceneNodeAnimatorFactoryList[i]->drop(); + + if (LightManager) + LightManager->drop(); + + // remove all nodes and animators before dropping the driver + // as render targets may be destroyed twice + + removeAll(); + removeAnimators(); + + if (Driver) + Driver->drop(); +} + + +//! gets an animateable mesh. loads it if needed. returned pointer must not be dropped. +IAnimatedMesh* CSceneManager::getMesh(const io::path& filename) +{ + IAnimatedMesh* msh = MeshCache->getMeshByName(filename); + if (msh) + return msh; + + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + if (!file) + { + os::Printer::log("Could not load mesh, because file could not be opened: ", filename, ELL_ERROR); + return 0; + } + + // iterate the list in reverse order so user-added loaders can override the built-in ones + s32 count = MeshLoaderList.size(); + for (s32 i=count-1; i>=0; --i) + { + if (MeshLoaderList[i]->isALoadableFileExtension(filename)) + { + // reset file to avoid side effects of previous calls to createMesh + file->seek(0); + msh = MeshLoaderList[i]->createMesh(file); + if (msh) + { + MeshCache->addMesh(filename, msh); + msh->drop(); + break; + } + } + } + + file->drop(); + + if (!msh) + os::Printer::log("Could not load mesh, file format seems to be unsupported", filename, ELL_ERROR); + else + os::Printer::log("Loaded mesh", filename, ELL_INFORMATION); + + return msh; +} + + +//! gets an animateable mesh. loads it if needed. returned pointer must not be dropped. +IAnimatedMesh* CSceneManager::getMesh(io::IReadFile* file) +{ + if (!file) + return 0; + + io::path name = file->getFileName(); + IAnimatedMesh* msh = MeshCache->getMeshByName(file->getFileName()); + if (msh) + return msh; + + // iterate the list in reverse order so user-added loaders can override the built-in ones + s32 count = MeshLoaderList.size(); + for (s32 i=count-1; i>=0; --i) + { + if (MeshLoaderList[i]->isALoadableFileExtension(name)) + { + // reset file to avoid side effects of previous calls to createMesh + file->seek(0); + msh = MeshLoaderList[i]->createMesh(file); + if (msh) + { + MeshCache->addMesh(file->getFileName(), msh); + msh->drop(); + break; + } + } + } + + if (!msh) + os::Printer::log("Could not load mesh, file format seems to be unsupported", file->getFileName(), ELL_ERROR); + else + os::Printer::log("Loaded mesh", file->getFileName(), ELL_INFORMATION); + + return msh; +} + + +//! returns the video driver +video::IVideoDriver* CSceneManager::getVideoDriver() +{ + return Driver; +} + + +//! returns the GUI Environment +gui::IGUIEnvironment* CSceneManager::getGUIEnvironment() +{ + return GUIEnvironment; +} + +//! Get the active FileSystem +/** \return Pointer to the FileSystem +This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ +io::IFileSystem* CSceneManager::getFileSystem() +{ + return FileSystem; +} + +//! Adds a text scene node, which is able to display +//! 2d text at a position in three dimensional space +ITextSceneNode* CSceneManager::addTextSceneNode(gui::IGUIFont* font, + const wchar_t* text, video::SColor color, ISceneNode* parent, + const core::vector3df& position, s32 id) +{ + if (!font) + return 0; + + if (!parent) + parent = this; + + ITextSceneNode* t = new CTextSceneNode(parent, this, id, font, + getSceneCollisionManager(), position, text, color); + t->drop(); + + return t; +} + + +//! Adds a text scene node, which uses billboards +IBillboardTextSceneNode* CSceneManager::addBillboardTextSceneNode(gui::IGUIFont* font, + const wchar_t* text, ISceneNode* parent, + const core::dimension2d<f32>& size, + const core::vector3df& position, s32 id, + video::SColor colorTop, video::SColor colorBottom) +{ + if (!font && GUIEnvironment) + font = GUIEnvironment->getBuiltInFont(); + + if (!font) + return 0; + + if (!parent) + parent = this; + + IBillboardTextSceneNode* node = new CBillboardTextSceneNode(parent, this, id, font, text, position, size, + colorTop, colorBottom); + node->drop(); + + return node; + +} + + +//! Adds a scene node, which can render a quake3 shader +IMeshSceneNode* CSceneManager::addQuake3SceneNode(const IMeshBuffer* meshBuffer, + const quake3::IShader * shader, + ISceneNode* parent, s32 id ) +{ +#ifdef _IRR_COMPILE_WITH_BSP_LOADER_ + if (!shader) + return 0; + + if (!parent) + parent = this; + + CQuake3ShaderSceneNode* node = new CQuake3ShaderSceneNode( parent, + this, id, FileSystem, + meshBuffer, shader ); + node->drop(); + + return node; +#else + return 0; +#endif +} + + +//! adds Volume Lighting Scene Node. +//! the returned pointer must not be dropped. +IVolumeLightSceneNode* CSceneManager::addVolumeLightSceneNode( + ISceneNode* parent, s32 id, + const u32 subdivU, const u32 subdivV, + const video::SColor foot, const video::SColor tail, + const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale) +{ + if (!parent) + parent = this; + + IVolumeLightSceneNode* node = new CVolumeLightSceneNode(parent, this, id, subdivU, subdivV, foot, tail, position, rotation, scale); + node->drop(); + + return node; +} + + +//! adds a test scene node for test purposes to the scene. It is a simple cube of (1,1,1) size. +//! the returned pointer must not be dropped. +IMeshSceneNode* CSceneManager::addCubeSceneNode(f32 size, ISceneNode* parent, + s32 id, const core::vector3df& position, + const core::vector3df& rotation, const core::vector3df& scale) +{ + if (!parent) + parent = this; + + IMeshSceneNode* node = new CCubeSceneNode(size, parent, this, id, position, rotation, scale); + node->drop(); + + return node; +} + + +//! Adds a sphere scene node for test purposes to the scene. +IMeshSceneNode* CSceneManager::addSphereSceneNode(f32 radius, s32 polyCount, + ISceneNode* parent, s32 id, const core::vector3df& position, + const core::vector3df& rotation, const core::vector3df& scale) +{ + if (!parent) + parent = this; + + IMeshSceneNode* node = new CSphereSceneNode(radius, polyCount, polyCount, parent, this, id, position, rotation, scale); + node->drop(); + + return node; +} + + +//! adds a scene node for rendering a static mesh +//! the returned pointer must not be dropped. +IMeshSceneNode* CSceneManager::addMeshSceneNode(IMesh* mesh, ISceneNode* parent, s32 id, + const core::vector3df& position, const core::vector3df& rotation, + const core::vector3df& scale, bool alsoAddIfMeshPointerZero) +{ + if (!alsoAddIfMeshPointerZero && !mesh) + return 0; + + if (!parent) + parent = this; + + IMeshSceneNode* node = new CMeshSceneNode(mesh, parent, this, id, position, rotation, scale); + node->drop(); + + return node; +} + + +//! Adds a scene node for rendering a animated water surface mesh. +ISceneNode* CSceneManager::addWaterSurfaceSceneNode(IMesh* mesh, f32 waveHeight, f32 waveSpeed, f32 waveLength, + ISceneNode* parent, s32 id, const core::vector3df& position, + const core::vector3df& rotation, const core::vector3df& scale) +{ + if (!parent) + parent = this; + + ISceneNode* node = new CWaterSurfaceSceneNode(waveHeight, waveSpeed, waveLength, + mesh, parent, this, id, position, rotation, scale); + + node->drop(); + + return node; +} + + +//! adds a scene node for rendering an animated mesh model +IAnimatedMeshSceneNode* CSceneManager::addAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode* parent, s32 id, + const core::vector3df& position, const core::vector3df& rotation, + const core::vector3df& scale, bool alsoAddIfMeshPointerZero) +{ + if (!alsoAddIfMeshPointerZero && !mesh) + return 0; + + if (!parent) + parent = this; + + IAnimatedMeshSceneNode* node = + new CAnimatedMeshSceneNode(mesh, parent, this, id, position, rotation, scale); + node->drop(); + + return node; +} + + +//! Adds a scene node for rendering using a octree to the scene graph. This a good method for rendering +//! scenes with lots of geometry. The Octree is built on the fly from the mesh, much +//! faster then a bsp tree. +IMeshSceneNode* CSceneManager::addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent, + s32 id, s32 minimalPolysPerNode, bool alsoAddIfMeshPointerZero) +{ + if (!alsoAddIfMeshPointerZero && (!mesh || !mesh->getFrameCount())) + return 0; + + return addOctreeSceneNode(mesh ? mesh->getMesh(0) : 0, + parent, id, minimalPolysPerNode, + alsoAddIfMeshPointerZero); +} + + +//! Adds a scene node for rendering using a octree. This a good method for rendering +//! scenes with lots of geometry. The Octree is built on the fly from the mesh, much +//! faster then a bsp tree. +IMeshSceneNode* CSceneManager::addOctreeSceneNode(IMesh* mesh, ISceneNode* parent, + s32 id, s32 minimalPolysPerNode, bool alsoAddIfMeshPointerZero) +{ + if (!alsoAddIfMeshPointerZero && !mesh) + return 0; + + if (!parent) + parent = this; + + COctreeSceneNode* node = new COctreeSceneNode(parent, this, id, minimalPolysPerNode); + + if (node) + { + node->setMesh(mesh); + node->drop(); + } + + return node; +} + + +//! Adds a camera scene node to the tree and sets it as active camera. +//! \param position: Position of the space relative to its parent where the camera will be placed. +//! \param lookat: Position where the camera will look at. Also known as target. +//! \param parent: Parent scene node of the camera. Can be null. If the parent moves, +//! the camera will move too. +//! \return Returns pointer to interface to camera +ICameraSceneNode* CSceneManager::addCameraSceneNode(ISceneNode* parent, + const core::vector3df& position, const core::vector3df& lookat, s32 id, + bool makeActive) +{ + if (!parent) + parent = this; + + ICameraSceneNode* node = new CCameraSceneNode(parent, this, id, position, lookat); + + if (makeActive) + setActiveCamera(node); + node->drop(); + + return node; +} + + +//! Adds a camera scene node which is able to be controlled with the mouse similar +//! to in the 3D Software Maya by Alias Wavefront. +//! The returned pointer must not be dropped. +ICameraSceneNode* CSceneManager::addCameraSceneNodeMaya(ISceneNode* parent, + f32 rotateSpeed, f32 zoomSpeed, f32 translationSpeed, s32 id, f32 distance, + bool makeActive) +{ + ICameraSceneNode* node = addCameraSceneNode(parent, core::vector3df(), + core::vector3df(0,0,100), id, makeActive); + if (node) + { + ISceneNodeAnimator* anm = new CSceneNodeAnimatorCameraMaya(CursorControl, + rotateSpeed, zoomSpeed, translationSpeed, distance); + + node->addAnimator(anm); + anm->drop(); + } + + return node; +} + + +//! Adds a camera scene node which is able to be controlled with the mouse and keys +//! like in most first person shooters (FPS): +ICameraSceneNode* CSceneManager::addCameraSceneNodeFPS(ISceneNode* parent, + f32 rotateSpeed, f32 moveSpeed, s32 id, SKeyMap* keyMapArray, + s32 keyMapSize, bool noVerticalMovement, f32 jumpSpeed, + bool invertMouseY, bool makeActive) +{ + ICameraSceneNode* node = addCameraSceneNode(parent, core::vector3df(), + core::vector3df(0,0,100), id, makeActive); + if (node) + { + ISceneNodeAnimator* anm = new CSceneNodeAnimatorCameraFPS(CursorControl, + rotateSpeed, moveSpeed, jumpSpeed, + keyMapArray, keyMapSize, noVerticalMovement, invertMouseY); + + // Bind the node's rotation to its target. This is consistent with 1.4.2 and below. + node->bindTargetAndRotation(true); + node->addAnimator(anm); + anm->drop(); + } + + return node; +} + + +//! Adds a dynamic light scene node. The light will cast dynamic light on all +//! other scene nodes in the scene, which have the material flag video::MTF_LIGHTING +//! turned on. (This is the default setting in most scene nodes). +ILightSceneNode* CSceneManager::addLightSceneNode(ISceneNode* parent, + const core::vector3df& position, video::SColorf color, f32 range, s32 id) +{ + if (!parent) + parent = this; + + ILightSceneNode* node = new CLightSceneNode(parent, this, id, position, color, range); + node->drop(); + + return node; +} + + +//! Adds a billboard scene node to the scene. A billboard is like a 3d sprite: A 2d element, +//! which always looks to the camera. It is usually used for things like explosions, fire, +//! lensflares and things like that. +IBillboardSceneNode* CSceneManager::addBillboardSceneNode(ISceneNode* parent, + const core::dimension2d<f32>& size, const core::vector3df& position, s32 id, + video::SColor colorTop, video::SColor colorBottom + ) +{ + if (!parent) + parent = this; + + IBillboardSceneNode* node = new CBillboardSceneNode(parent, this, id, position, size, + colorTop, colorBottom); + node->drop(); + + return node; +} + + +//! Adds a skybox scene node. A skybox is a big cube with 6 textures on it and +//! is drawn around the camera position. +ISceneNode* CSceneManager::addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom, + video::ITexture* left, video::ITexture* right, video::ITexture* front, + video::ITexture* back, ISceneNode* parent, s32 id) +{ + if (!parent) + parent = this; + + ISceneNode* node = new CSkyBoxSceneNode(top, bottom, left, right, + front, back, parent, this, id); + + node->drop(); + return node; +} + + +//! Adds a skydome scene node. A skydome is a large (half-) sphere with a +//! panoramic texture on it and is drawn around the camera position. +ISceneNode* CSceneManager::addSkyDomeSceneNode(video::ITexture* texture, + u32 horiRes, u32 vertRes, f32 texturePercentage,f32 spherePercentage, f32 radius, + ISceneNode* parent, s32 id) +{ + if (!parent) + parent = this; + + ISceneNode* node = new CSkyDomeSceneNode(texture, horiRes, vertRes, + texturePercentage, spherePercentage, radius, parent, this, id); + + node->drop(); + return node; +} + + +//! Adds a particle system scene node. +IParticleSystemSceneNode* CSceneManager::addParticleSystemSceneNode( + bool withDefaultEmitter, ISceneNode* parent, s32 id, + const core::vector3df& position, const core::vector3df& rotation, + const core::vector3df& scale) +{ + if (!parent) + parent = this; + + IParticleSystemSceneNode* node = new CParticleSystemSceneNode(withDefaultEmitter, + parent, this, id, position, rotation, scale); + node->drop(); + + return node; +} + + +//! Adds a terrain scene node to the scene graph. +ITerrainSceneNode* CSceneManager::addTerrainSceneNode( + const io::path& heightMapFileName, + ISceneNode* parent, s32 id, + const core::vector3df& position, + const core::vector3df& rotation, + const core::vector3df& scale, + video::SColor vertexColor, + s32 maxLOD, E_TERRAIN_PATCH_SIZE patchSize, s32 smoothFactor, + bool addAlsoIfHeightmapEmpty) +{ + io::IReadFile* file = FileSystem->createAndOpenFile(heightMapFileName); + + if (!file && !addAlsoIfHeightmapEmpty) + { + os::Printer::log("Could not load terrain, because file could not be opened.", + heightMapFileName, ELL_ERROR); + return 0; + } + + ITerrainSceneNode* terrain = addTerrainSceneNode(file, parent, id, + position, rotation, scale, vertexColor, maxLOD, patchSize, + smoothFactor, addAlsoIfHeightmapEmpty); + + if (file) + file->drop(); + + return terrain; +} + +//! Adds a terrain scene node to the scene graph. +ITerrainSceneNode* CSceneManager::addTerrainSceneNode( + io::IReadFile* heightMapFile, + ISceneNode* parent, s32 id, + const core::vector3df& position, + const core::vector3df& rotation, + const core::vector3df& scale, + video::SColor vertexColor, + s32 maxLOD, E_TERRAIN_PATCH_SIZE patchSize, + s32 smoothFactor, + bool addAlsoIfHeightmapEmpty) +{ + if (!parent) + parent = this; + + if (!heightMapFile && !addAlsoIfHeightmapEmpty) + { + os::Printer::log("Could not load terrain, because file could not be opened.", ELL_ERROR); + return 0; + } + + CTerrainSceneNode* node = new CTerrainSceneNode(parent, this, FileSystem, id, + maxLOD, patchSize, position, rotation, scale); + + if (!node->loadHeightMap(heightMapFile, vertexColor, smoothFactor)) + { + if (!addAlsoIfHeightmapEmpty) + { + node->remove(); + node->drop(); + return 0; + } + } + + node->drop(); + return node; +} + + +//! Adds an empty scene node. +ISceneNode* CSceneManager::addEmptySceneNode(ISceneNode* parent, s32 id) +{ + if (!parent) + parent = this; + + ISceneNode* node = new CEmptySceneNode(parent, this, id); + node->drop(); + + return node; +} + + +//! Adds a dummy transformation scene node to the scene graph. +IDummyTransformationSceneNode* CSceneManager::addDummyTransformationSceneNode( + ISceneNode* parent, s32 id) +{ + if (!parent) + parent = this; + + IDummyTransformationSceneNode* node = new CDummyTransformationSceneNode( + parent, this, id); + node->drop(); + + return node; +} + +//! Adds a Hill Plane mesh to the mesh pool. The mesh is generated on the fly +//! and looks like a plane with some hills on it. You can specify how many hills +//! there should be on the plane and how high they should be. Also you must +//! specify a name for the mesh, because the mesh is added to the mesh pool, +//! and can be retrieved again using ISceneManager::getMesh with the name as +//! parameter. +IAnimatedMesh* CSceneManager::addHillPlaneMesh(const io::path& name, + const core::dimension2d<f32>& tileSize, + const core::dimension2d<u32>& tileCount, + video::SMaterial* material, f32 hillHeight, + const core::dimension2d<f32>& countHills, + const core::dimension2d<f32>& textureRepeatCount) +{ + if (MeshCache->isMeshLoaded(name)) + return MeshCache->getMeshByName(name); + + IMesh* mesh = GeometryCreator->createHillPlaneMesh(tileSize, + tileCount, material, hillHeight, countHills, + textureRepeatCount); + if (!mesh) + return 0; + + SAnimatedMesh* animatedMesh = new SAnimatedMesh(); + if (!animatedMesh) + { + mesh->drop(); + return 0; + } + + animatedMesh->addMesh(mesh); + mesh->drop(); + animatedMesh->recalculateBoundingBox(); + + MeshCache->addMesh(name, animatedMesh); + animatedMesh->drop(); + + return animatedMesh; +} + + +//! Adds a terrain mesh to the mesh pool. +IAnimatedMesh* CSceneManager::addTerrainMesh(const io::path& name, + video::IImage* texture, video::IImage* heightmap, + const core::dimension2d<f32>& stretchSize, + f32 maxHeight, + const core::dimension2d<u32>& defaultVertexBlockSize) +{ + if (MeshCache->isMeshLoaded(name)) + return MeshCache->getMeshByName(name); + + const bool debugBorders=false; + IMesh* mesh = GeometryCreator->createTerrainMesh(texture, heightmap, + stretchSize, maxHeight, Driver, + defaultVertexBlockSize, debugBorders); + if (!mesh) + return 0; + + SAnimatedMesh* animatedMesh = new SAnimatedMesh(); + if (!animatedMesh) + { + mesh->drop(); + return 0; + } + + animatedMesh->addMesh(mesh); + mesh->drop(); + animatedMesh->recalculateBoundingBox(); + + MeshCache->addMesh(name, animatedMesh); + animatedMesh->drop(); + + return animatedMesh; +} + + +//! Adds an arrow mesh to the mesh pool. +IAnimatedMesh* CSceneManager::addArrowMesh(const io::path& name, + video::SColor vtxColor0, video::SColor vtxColor1, + u32 tesselationCylinder, u32 tesselationCone, f32 height, + f32 cylinderHeight, f32 width0,f32 width1) +{ + if (MeshCache->isMeshLoaded(name)) + return MeshCache->getMeshByName(name); + + IMesh* mesh = GeometryCreator->createArrowMesh( tesselationCylinder, + tesselationCone, height, cylinderHeight, width0,width1, + vtxColor0, vtxColor1); + if (!mesh) + return 0; + + SAnimatedMesh* animatedMesh = new SAnimatedMesh(); + if (!animatedMesh) + { + mesh->drop(); + return 0; + } + + animatedMesh->addMesh(mesh); + mesh->drop(); + animatedMesh->recalculateBoundingBox(); + + MeshCache->addMesh(name, animatedMesh); + animatedMesh->drop(); + + return animatedMesh; +} + + +//! Adds a static sphere mesh to the mesh pool. +IAnimatedMesh* CSceneManager::addSphereMesh(const io::path& name, + f32 radius, u32 polyCountX, u32 polyCountY) +{ + if (MeshCache->isMeshLoaded(name)) + return MeshCache->getMeshByName(name); + + IMesh* mesh = GeometryCreator->createSphereMesh(radius, polyCountX, polyCountY); + if (!mesh) + return 0; + + SAnimatedMesh* animatedMesh = new SAnimatedMesh(); + if (!animatedMesh) + { + mesh->drop(); + return 0; + } + + animatedMesh->addMesh(mesh); + mesh->drop(); + animatedMesh->recalculateBoundingBox(); + + MeshCache->addMesh(name, animatedMesh); + animatedMesh->drop(); + + return animatedMesh; +} + + + +//! Adds a static volume light mesh to the mesh pool. +IAnimatedMesh* CSceneManager::addVolumeLightMesh(const io::path& name, + const u32 SubdivideU, const u32 SubdivideV, + const video::SColor FootColor, const video::SColor TailColor) +{ + if (MeshCache->isMeshLoaded(name)) + return MeshCache->getMeshByName(name); + + IMesh* mesh = GeometryCreator->createVolumeLightMesh(SubdivideU, SubdivideV, FootColor, TailColor); + if (!mesh) + return 0; + + SAnimatedMesh* animatedMesh = new SAnimatedMesh(); + if (!animatedMesh) + { + mesh->drop(); + return 0; + } + + animatedMesh->addMesh(mesh); + mesh->drop(); + animatedMesh->recalculateBoundingBox(); + + MeshCache->addMesh(name, animatedMesh); + animatedMesh->drop(); + + return animatedMesh; +} + + +//! Returns the root scene node. This is the scene node wich is parent +//! of all scene nodes. The root scene node is a special scene node which +//! only exists to manage all scene nodes. It is not rendered and cannot +//! be removed from the scene. +//! \return Returns a pointer to the root scene node. +ISceneNode* CSceneManager::getRootSceneNode() +{ + return this; +} + + +//! Returns the current active camera. +//! \return The active camera is returned. Note that this can be NULL, if there +//! was no camera created yet. +ICameraSceneNode* CSceneManager::getActiveCamera() const +{ + return ActiveCamera; +} + + +//! Sets the active camera. The previous active camera will be deactivated. +//! \param camera: The new camera which should be active. +void CSceneManager::setActiveCamera(ICameraSceneNode* camera) +{ + if (camera) + camera->grab(); + if (ActiveCamera) + ActiveCamera->drop(); + + ActiveCamera = camera; +} + + +//! renders the node. +void CSceneManager::render() +{ +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CSceneManager::getBoundingBox() const +{ + _IRR_DEBUG_BREAK_IF(true) // Bounding Box of Scene Manager wanted. + + // should never be used. + return *((core::aabbox3d<f32>*)0); +} + + +//! returns if node is culled +bool CSceneManager::isCulled(const ISceneNode* node) const +{ + const ICameraSceneNode* cam = getActiveCamera(); + if (!cam) + { + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + bool result = false; + + // has occlusion query information + if (node->getAutomaticCulling() & scene::EAC_OCC_QUERY) + { + result = (Driver->getOcclusionQueryResult(const_cast<ISceneNode*>(node))==0); + } + + // can be seen by a bounding box ? + if (!result && (node->getAutomaticCulling() & scene::EAC_BOX)) + { + core::aabbox3d<f32> tbox = node->getBoundingBox(); + node->getAbsoluteTransformation().transformBoxEx(tbox); + result = !(tbox.intersectsWithBox(cam->getViewFrustum()->getBoundingBox() )); + } + + // can be seen by a bounding sphere + if (!result && (node->getAutomaticCulling() & scene::EAC_FRUSTUM_SPHERE)) + { // requires bbox diameter + } + + // can be seen by cam pyramid planes ? + if (!result && (node->getAutomaticCulling() & scene::EAC_FRUSTUM_BOX)) + { + SViewFrustum frust = *cam->getViewFrustum(); + + //transform the frustum to the node's current absolute transformation + core::matrix4 invTrans(node->getAbsoluteTransformation(), core::matrix4::EM4CONST_INVERSE); + //invTrans.makeInverse(); + frust.transform(invTrans); + + core::vector3df edges[8]; + node->getBoundingBox().getEdges(edges); + + for (s32 i=0; i<scene::SViewFrustum::VF_PLANE_COUNT; ++i) + { + bool boxInFrustum=false; + for (u32 j=0; j<8; ++j) + { + if (frust.planes[i].classifyPointRelation(edges[j]) != core::ISREL3D_FRONT) + { + boxInFrustum=true; + break; + } + } + + if (!boxInFrustum) + { + result = true; + break; + } + } + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return result; +} + + +//! registers a node for rendering it at a specific time. +u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDER_PASS pass) +{ + u32 taken = 0; + + switch(pass) + { + // take camera if it is not already registered + case ESNRP_CAMERA: + { + taken = 1; + for (u32 i = 0; i != CameraList.size(); ++i) + { + if (CameraList[i] == node) + { + taken = 0; + break; + } + } + if (taken) + { + CameraList.push_back(node); + } + } + break; + + case ESNRP_LIGHT: + // TODO: Point Light culling.. + // Lighting model in irrlicht has to be redone.. + //if (!isCulled(node)) + { + LightList.push_back(node); + taken = 1; + } + break; + + case ESNRP_SKY_BOX: + SkyBoxList.push_back(node); + taken = 1; + break; + case ESNRP_SOLID: + if (!isCulled(node)) + { + SolidNodeList.push_back(node); + taken = 1; + } + break; + case ESNRP_TRANSPARENT: + if (!isCulled(node)) + { + TransparentNodeList.push_back(TransparentNodeEntry(node, camWorldPos)); + taken = 1; + } + break; + case ESNRP_TRANSPARENT_EFFECT: + if (!isCulled(node)) + { + TransparentEffectNodeList.push_back(TransparentNodeEntry(node, camWorldPos)); + taken = 1; + } + break; + case ESNRP_AUTOMATIC: + if (!isCulled(node)) + { + const u32 count = node->getMaterialCount(); + + taken = 0; + for (u32 i=0; i<count; ++i) + { + video::IMaterialRenderer* rnd = + Driver->getMaterialRenderer(node->getMaterial(i).MaterialType); + if (rnd && rnd->isTransparent()) + { + // register as transparent node + TransparentNodeEntry e(node, camWorldPos); + TransparentNodeList.push_back(e); + taken = 1; + break; + } + } + + // not transparent, register as solid + if (!taken) + { + SolidNodeList.push_back(node); + taken = 1; + } + } + break; + case ESNRP_SHADOW: + if (!isCulled(node)) + { + ShadowNodeList.push_back(node); + taken = 1; + } + break; + + case ESNRP_NONE: // ignore this one + break; + } + +#ifdef _IRR_SCENEMANAGER_DEBUG + s32 index = Parameters.findAttribute ( "calls" ); + Parameters.setAttribute ( index, Parameters.getAttributeAsInt ( index ) + 1 ); + + if (!taken) + { + index = Parameters.findAttribute ( "culled" ); + Parameters.setAttribute ( index, Parameters.getAttributeAsInt ( index ) + 1 ); + } +#endif + + return taken; +} + + +//! This method is called just before the rendering process of the whole scene. +//! draws all scene nodes +void CSceneManager::drawAll() +{ + if (!Driver) + return; + +#ifdef _IRR_SCENEMANAGER_DEBUG + // reset attributes + Parameters.setAttribute ( "culled", 0 ); + Parameters.setAttribute ( "calls", 0 ); + Parameters.setAttribute ( "drawn_solid", 0 ); + Parameters.setAttribute ( "drawn_transparent", 0 ); + Parameters.setAttribute ( "drawn_transparent_effect", 0 ); +#endif + + u32 i; // new ISO for scoping problem in some compilers + + // reset all transforms + Driver->setMaterial(video::SMaterial()); + Driver->setTransform ( video::ETS_PROJECTION, core::IdentityMatrix ); + Driver->setTransform ( video::ETS_VIEW, core::IdentityMatrix ); + Driver->setTransform ( video::ETS_WORLD, core::IdentityMatrix ); + for (i=video::ETS_COUNT-1; i>=video::ETS_TEXTURE_0; --i) + Driver->setTransform ( (video::E_TRANSFORMATION_STATE)i, core::IdentityMatrix ); + + // TODO: This should not use an attribute here but a real parameter when necessary (too slow!) + Driver->setAllowZWriteOnTransparent(Parameters.getAttributeAsBool( ALLOW_ZWRITE_ON_TRANSPARENT) ); + + // do animations and other stuff. + OnAnimate(os::Timer::getTime()); + + /*! + First Scene Node for prerendering should be the active camera + consistent Camera is needed for culling + */ + camWorldPos.set(0,0,0); + if (ActiveCamera) + { + ActiveCamera->render(); + camWorldPos = ActiveCamera->getAbsolutePosition(); + } + + // let all nodes register themselves + OnRegisterSceneNode(); + + if (LightManager) + LightManager->OnPreRender(LightList); + + //render camera scenes + { + CurrentRendertime = ESNRP_CAMERA; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + if (LightManager) + LightManager->OnRenderPassPreRender(CurrentRendertime); + + for (i=0; i<CameraList.size(); ++i) + CameraList[i]->render(); + + CameraList.set_used(0); + + if (LightManager) + LightManager->OnRenderPassPostRender(CurrentRendertime); + } + + //render lights scenes + { + CurrentRendertime = ESNRP_LIGHT; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + if (LightManager) + { + LightManager->OnRenderPassPreRender(CurrentRendertime); + } + else + { + // Sort the lights by distance from the camera + core::vector3df camWorldPos(0, 0, 0); + if (ActiveCamera) + camWorldPos = ActiveCamera->getAbsolutePosition(); + + core::array<DistanceNodeEntry> SortedLights; + SortedLights.set_used(LightList.size()); + for (s32 light = (s32)LightList.size() - 1; light >= 0; --light) + SortedLights[light].setNodeAndDistanceFromPosition(LightList[light], camWorldPos); + + SortedLights.set_sorted(false); + SortedLights.sort(); + + for(s32 light = (s32)LightList.size() - 1; light >= 0; --light) + LightList[light] = SortedLights[light].Node; + } + + Driver->deleteAllDynamicLights(); + + Driver->setAmbientLight(AmbientLight); + + u32 maxLights = LightList.size(); + + if (!LightManager) + maxLights = core::min_ ( Driver->getMaximalDynamicLightAmount(), maxLights); + + for (i=0; i< maxLights; ++i) + LightList[i]->render(); + + if (LightManager) + LightManager->OnRenderPassPostRender(CurrentRendertime); + } + + // render skyboxes + { + CurrentRendertime = ESNRP_SKY_BOX; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + if (LightManager) + { + LightManager->OnRenderPassPreRender(CurrentRendertime); + for (i=0; i<SkyBoxList.size(); ++i) + { + ISceneNode* node = SkyBoxList[i]; + LightManager->OnNodePreRender(node); + node->render(); + LightManager->OnNodePostRender(node); + } + } + else + { + for (i=0; i<SkyBoxList.size(); ++i) + SkyBoxList[i]->render(); + } + + SkyBoxList.set_used(0); + + if (LightManager) + LightManager->OnRenderPassPostRender(CurrentRendertime); + } + + + // render default objects + { + CurrentRendertime = ESNRP_SOLID; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + SolidNodeList.sort(); // sort by textures + + if (LightManager) + { + LightManager->OnRenderPassPreRender(CurrentRendertime); + for (i=0; i<SolidNodeList.size(); ++i) + { + ISceneNode* node = SolidNodeList[i].Node; + LightManager->OnNodePreRender(node); + node->render(); + LightManager->OnNodePostRender(node); + } + } + else + { + for (i=0; i<SolidNodeList.size(); ++i) + SolidNodeList[i].Node->render(); + } + +#ifdef _IRR_SCENEMANAGER_DEBUG + Parameters.setAttribute("drawn_solid", (s32) SolidNodeList.size() ); +#endif + SolidNodeList.set_used(0); + + if (LightManager) + LightManager->OnRenderPassPostRender(CurrentRendertime); + } + + // render shadows + { + CurrentRendertime = ESNRP_SHADOW; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + if (LightManager) + { + LightManager->OnRenderPassPreRender(CurrentRendertime); + for (i=0; i<ShadowNodeList.size(); ++i) + { + ISceneNode* node = ShadowNodeList[i]; + LightManager->OnNodePreRender(node); + node->render(); + LightManager->OnNodePostRender(node); + } + } + else + { + for (i=0; i<ShadowNodeList.size(); ++i) + ShadowNodeList[i]->render(); + } + + if (!ShadowNodeList.empty()) + Driver->drawStencilShadow(true,ShadowColor, ShadowColor, + ShadowColor, ShadowColor); + + ShadowNodeList.set_used(0); + + if (LightManager) + LightManager->OnRenderPassPostRender(CurrentRendertime); + } + + // render transparent objects. + { + CurrentRendertime = ESNRP_TRANSPARENT; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + TransparentNodeList.sort(); // sort by distance from camera + if (LightManager) + { + LightManager->OnRenderPassPreRender(CurrentRendertime); + + for (i=0; i<TransparentNodeList.size(); ++i) + { + ISceneNode* node = TransparentNodeList[i].Node; + LightManager->OnNodePreRender(node); + node->render(); + LightManager->OnNodePostRender(node); + } + } + else + { + for (i=0; i<TransparentNodeList.size(); ++i) + TransparentNodeList[i].Node->render(); + } + +#ifdef _IRR_SCENEMANAGER_DEBUG + Parameters.setAttribute ( "drawn_transparent", (s32) TransparentNodeList.size() ); +#endif + TransparentNodeList.set_used(0); + + if (LightManager) + LightManager->OnRenderPassPostRender(CurrentRendertime); + } + + // render transparent effect objects. + { + CurrentRendertime = ESNRP_TRANSPARENT_EFFECT; + Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); + + TransparentEffectNodeList.sort(); // sort by distance from camera + + if (LightManager) + { + LightManager->OnRenderPassPreRender(CurrentRendertime); + + for (i=0; i<TransparentEffectNodeList.size(); ++i) + { + ISceneNode* node = TransparentEffectNodeList[i].Node; + LightManager->OnNodePreRender(node); + node->render(); + LightManager->OnNodePostRender(node); + } + } + else + { + for (i=0; i<TransparentEffectNodeList.size(); ++i) + TransparentEffectNodeList[i].Node->render(); + } +#ifdef _IRR_SCENEMANAGER_DEBUG + Parameters.setAttribute ( "drawn_transparent_effect", (s32) TransparentEffectNodeList.size() ); +#endif + TransparentEffectNodeList.set_used(0); + } + + if (LightManager) + LightManager->OnPostRender(); + + LightList.set_used(0); + clearDeletionList(); + + CurrentRendertime = ESNRP_NONE; +} + +void CSceneManager::setLightManager(ILightManager* lightManager) +{ + if (lightManager) + lightManager->grab(); + if (LightManager) + LightManager->drop(); + + LightManager = lightManager; +} + + +//! Sets the color of stencil buffers shadows drawn by the scene manager. +void CSceneManager::setShadowColor(video::SColor color) +{ + ShadowColor = color; +} + + +//! Returns the current color of shadows. +video::SColor CSceneManager::getShadowColor() const +{ + return ShadowColor; +} + + +//! creates a rotation animator, which rotates the attached scene node around itself. +ISceneNodeAnimator* CSceneManager::createRotationAnimator(const core::vector3df& rotationPerSecond) +{ + ISceneNodeAnimator* anim = new CSceneNodeAnimatorRotation(os::Timer::getTime(), + rotationPerSecond); + + return anim; +} + + +//! creates a fly circle animator, which lets the attached scene node fly around a center. +ISceneNodeAnimator* CSceneManager::createFlyCircleAnimator( + const core::vector3df& center, f32 radius, f32 speed, + const core::vector3df& direction, + f32 startPosition, + f32 radiusEllipsoid) +{ + const f32 orbitDurationMs = (core::DEGTORAD * 360.f) / speed; + const u32 effectiveTime = os::Timer::getTime() + (u32)(orbitDurationMs * startPosition); + + ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyCircle( + effectiveTime, center, + radius, speed, direction,radiusEllipsoid); + return anim; +} + + +//! Creates a fly straight animator, which lets the attached scene node +//! fly or move along a line between two points. +ISceneNodeAnimator* CSceneManager::createFlyStraightAnimator(const core::vector3df& startPoint, + const core::vector3df& endPoint, u32 timeForWay, bool loop,bool pingpong) +{ + ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyStraight(startPoint, + endPoint, timeForWay, loop, os::Timer::getTime(), pingpong); + + return anim; +} + + +//! Creates a texture animator, which switches the textures of the target scene +//! node based on a list of textures. +ISceneNodeAnimator* CSceneManager::createTextureAnimator(const core::array<video::ITexture*>& textures, + s32 timePerFrame, bool loop) +{ + ISceneNodeAnimator* anim = new CSceneNodeAnimatorTexture(textures, + timePerFrame, loop, os::Timer::getTime()); + + return anim; +} + + +//! Creates a scene node animator, which deletes the scene node after +//! some time automaticly. +ISceneNodeAnimator* CSceneManager::createDeleteAnimator(u32 when) +{ + return new CSceneNodeAnimatorDelete(this, os::Timer::getTime() + when); +} + + +//! Creates a special scene node animator for doing automatic collision detection +//! and response. +ISceneNodeAnimatorCollisionResponse* CSceneManager::createCollisionResponseAnimator( + ITriangleSelector* world, ISceneNode* sceneNode, const core::vector3df& ellipsoidRadius, + const core::vector3df& gravityPerSecond, + const core::vector3df& ellipsoidTranslation, f32 slidingValue) +{ + ISceneNodeAnimatorCollisionResponse* anim = new + CSceneNodeAnimatorCollisionResponse(this, world, sceneNode, + ellipsoidRadius, gravityPerSecond, + ellipsoidTranslation, slidingValue); + + return anim; +} + + +//! Creates a follow spline animator. +ISceneNodeAnimator* CSceneManager::createFollowSplineAnimator(s32 startTime, + const core::array< core::vector3df >& points, + f32 speed, f32 tightness, bool loop, bool pingpong) +{ + ISceneNodeAnimator* a = new CSceneNodeAnimatorFollowSpline(startTime, points, + speed, tightness, loop, pingpong); + return a; +} + + +//! Adds an external mesh loader. +void CSceneManager::addExternalMeshLoader(IMeshLoader* externalLoader) +{ + if (!externalLoader) + return; + + externalLoader->grab(); + MeshLoaderList.push_back(externalLoader); +} + + +//! Returns the number of mesh loaders supported by Irrlicht at this time +u32 CSceneManager::getMeshLoaderCount() const +{ + return MeshLoaderList.size(); +} + + +//! Retrieve the given mesh loader +IMeshLoader* CSceneManager::getMeshLoader(u32 index) const +{ + if (index < MeshLoaderList.size()) + return MeshLoaderList[index]; + else + return 0; +} + + +//! Adds an external scene loader. +void CSceneManager::addExternalSceneLoader(ISceneLoader* externalLoader) +{ + if (!externalLoader) + return; + + externalLoader->grab(); + SceneLoaderList.push_back(externalLoader); +} + + +//! Returns the number of scene loaders +u32 CSceneManager::getSceneLoaderCount() const +{ + return SceneLoaderList.size(); +} + + +//! Retrieve the given scene loader +ISceneLoader* CSceneManager::getSceneLoader(u32 index) const +{ + if (index < SceneLoaderList.size()) + return SceneLoaderList[index]; + else + return 0; +} + + +//! Returns a pointer to the scene collision manager. +ISceneCollisionManager* CSceneManager::getSceneCollisionManager() +{ + return CollisionManager; +} + + +//! Returns a pointer to the mesh manipulator. +IMeshManipulator* CSceneManager::getMeshManipulator() +{ + return Driver->getMeshManipulator(); +} + + +//! Creates a simple ITriangleSelector, based on a mesh. +ITriangleSelector* CSceneManager::createTriangleSelector(IMesh* mesh, ISceneNode* node) +{ + if (!mesh) + return 0; + + return new CTriangleSelector(mesh, node); +} + + +//! Creates a simple and updatable ITriangleSelector, based on a the mesh owned by an +//! animated scene node +ITriangleSelector* CSceneManager::createTriangleSelector(IAnimatedMeshSceneNode* node) +{ + if (!node || !node->getMesh()) + return 0; + + return new CTriangleSelector(node); +} + + +//! Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box. +ITriangleSelector* CSceneManager::createTriangleSelectorFromBoundingBox(ISceneNode* node) +{ + if (!node) + return 0; + + return new CTriangleBBSelector(node); +} + + +//! Creates a simple ITriangleSelector, based on a mesh. +ITriangleSelector* CSceneManager::createOctreeTriangleSelector(IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode) +{ + if (!mesh) + return 0; + + return new COctreeTriangleSelector(mesh, node, minimalPolysPerNode); +} + + +//! Creates a meta triangle selector. +IMetaTriangleSelector* CSceneManager::createMetaTriangleSelector() +{ + return new CMetaTriangleSelector(); +} + + +//! Creates a triangle selector which can select triangles from a terrain scene node +ITriangleSelector* CSceneManager::createTerrainTriangleSelector( + ITerrainSceneNode* node, s32 LOD) +{ + return new CTerrainTriangleSelector(node, LOD); +} + + + +//! Adds a scene node to the deletion queue. +void CSceneManager::addToDeletionQueue(ISceneNode* node) +{ + if (!node) + return; + + node->grab(); + DeletionList.push_back(node); +} + + +//! clears the deletion list +void CSceneManager::clearDeletionList() +{ + if (DeletionList.empty()) + return; + + for (u32 i=0; i<DeletionList.size(); ++i) + { + DeletionList[i]->remove(); + DeletionList[i]->drop(); + } + + DeletionList.clear(); +} + + +//! Returns the first scene node with the specified name. +ISceneNode* CSceneManager::getSceneNodeFromName(const char* name, ISceneNode* start) +{ + if (start == 0) + start = getRootSceneNode(); + + if (!strcmp(start->getName(),name)) + return start; + + ISceneNode* node = 0; + + const ISceneNodeList& list = start->getChildren(); + ISceneNodeList::ConstIterator it = list.begin(); + for (; it!=list.end(); ++it) + { + node = getSceneNodeFromName(name, *it); + if (node) + return node; + } + + return 0; +} + + +//! Returns the first scene node with the specified id. +ISceneNode* CSceneManager::getSceneNodeFromId(s32 id, ISceneNode* start) +{ + if (start == 0) + start = getRootSceneNode(); + + if (start->getID() == id) + return start; + + ISceneNode* node = 0; + + const ISceneNodeList& list = start->getChildren(); + ISceneNodeList::ConstIterator it = list.begin(); + for (; it!=list.end(); ++it) + { + node = getSceneNodeFromId(id, *it); + if (node) + return node; + } + + return 0; +} + + +//! Returns the first scene node with the specified type. +ISceneNode* CSceneManager::getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start) +{ + if (start == 0) + start = getRootSceneNode(); + + if (start->getType() == type || ESNT_ANY == type) + return start; + + ISceneNode* node = 0; + + const ISceneNodeList& list = start->getChildren(); + ISceneNodeList::ConstIterator it = list.begin(); + for (; it!=list.end(); ++it) + { + node = getSceneNodeFromType(type, *it); + if (node) + return node; + } + + return 0; +} + + +//! returns scene nodes by type. +void CSceneManager::getSceneNodesFromType(ESCENE_NODE_TYPE type, core::array<scene::ISceneNode*>& outNodes, ISceneNode* start) +{ + if (start == 0) + start = getRootSceneNode(); + + if (start->getType() == type || ESNT_ANY == type) + outNodes.push_back(start); + + const ISceneNodeList& list = start->getChildren(); + ISceneNodeList::ConstIterator it = list.begin(); + + for (; it!=list.end(); ++it) + { + getSceneNodesFromType(type, outNodes, *it); + } +} + + +//! Posts an input event to the environment. Usually you do not have to +//! use this method, it is used by the internal engine. +bool CSceneManager::postEventFromUser(const SEvent& event) +{ + bool ret = false; + ICameraSceneNode* cam = getActiveCamera(); + if (cam) + ret = cam->OnEvent(event); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! Removes all children of this scene node +void CSceneManager::removeAll() +{ + ISceneNode::removeAll(); + setActiveCamera(0); + // Make sure the driver is reset, might need a more complex method at some point + if (Driver) + Driver->setMaterial(video::SMaterial()); +} + + +//! Clears the whole scene. All scene nodes are removed. +void CSceneManager::clear() +{ + removeAll(); +} + + +//! Returns interface to the parameters set in this scene. +io::IAttributes* CSceneManager::getParameters() +{ + return &Parameters; +} + + +//! Returns current render pass. +E_SCENE_NODE_RENDER_PASS CSceneManager::getSceneNodeRenderPass() const +{ + return CurrentRendertime; +} + + +//! Returns an interface to the mesh cache which is shared beween all existing scene managers. +IMeshCache* CSceneManager::getMeshCache() +{ + return MeshCache; +} + + +//! Creates a new scene manager. +ISceneManager* CSceneManager::createNewSceneManager(bool cloneContent) +{ + CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache, GUIEnvironment); + + if (cloneContent) + manager->cloneMembers(this, manager); + + return manager; +} + + +//! Returns the default scene node factory which can create all built in scene nodes +ISceneNodeFactory* CSceneManager::getDefaultSceneNodeFactory() +{ + return getSceneNodeFactory(0); +} + + +//! Adds a scene node factory to the scene manager. +void CSceneManager::registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) +{ + if (factoryToAdd) + { + factoryToAdd->grab(); + SceneNodeFactoryList.push_back(factoryToAdd); + } +} + + +//! Returns amount of registered scene node factories. +u32 CSceneManager::getRegisteredSceneNodeFactoryCount() const +{ + return SceneNodeFactoryList.size(); +} + + +//! Returns a scene node factory by index +ISceneNodeFactory* CSceneManager::getSceneNodeFactory(u32 index) +{ + if (index < SceneNodeFactoryList.size()) + return SceneNodeFactoryList[index]; + + return 0; +} + + +//! Returns the default scene node animator factory which can create all built-in scene node animators +ISceneNodeAnimatorFactory* CSceneManager::getDefaultSceneNodeAnimatorFactory() +{ + return getSceneNodeAnimatorFactory(0); +} + +//! Adds a scene node animator factory to the scene manager. +void CSceneManager::registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) +{ + if (factoryToAdd) + { + factoryToAdd->grab(); + SceneNodeAnimatorFactoryList.push_back(factoryToAdd); + } +} + + +//! Returns amount of registered scene node animator factories. +u32 CSceneManager::getRegisteredSceneNodeAnimatorFactoryCount() const +{ + return SceneNodeAnimatorFactoryList.size(); +} + + +//! Returns a scene node animator factory by index +ISceneNodeAnimatorFactory* CSceneManager::getSceneNodeAnimatorFactory(u32 index) +{ + if (index < SceneNodeAnimatorFactoryList.size()) + return SceneNodeAnimatorFactoryList[index]; + + return 0; +} + + +//! Saves the current scene into a file. +//! \param filename: Name of the file . +bool CSceneManager::saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) +{ + bool ret = false; + io::IWriteFile* file = FileSystem->createAndWriteFile(filename); + if (file) + { + ret = saveScene(file, userDataSerializer, node); + file->drop(); + } + else + os::Printer::log("Unable to open file", filename, ELL_ERROR); + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; +} + + +//! Saves the current scene into a file. +bool CSceneManager::saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) +{ + if (!file) + { + return false; + } + + bool result=false; + io::IXMLWriter* writer = FileSystem->createXMLWriter(file); + if (!writer) + { + os::Printer::log("Unable to create XML writer", file->getFileName(), ELL_ERROR); + } + else + { + result = saveScene(writer, FileSystem->getFileDir(FileSystem->getAbsolutePath(file->getFileName())), userDataSerializer, node); + writer->drop(); + } + return result; +} + + +//! Saves the current scene into a file. +bool CSceneManager::saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) +{ + if (!writer) + return false; + + if (!node) + node=this; + + writer->writeXMLHeader(); + writeSceneNode(writer, node, userDataSerializer, currentPath.c_str(), true); + + return true; +} + + +//! Loads a scene. +bool CSceneManager::loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer, ISceneNode* rootNode) +{ + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + if (!file) + { + os::Printer::log("Unable to open scene file", filename.c_str(), ELL_ERROR); + return false; + } + + const bool ret = loadScene(file, userDataSerializer, rootNode); + file->drop(); + + return ret; +} + + +//! Loads a scene. Note that the current scene is not cleared before. +bool CSceneManager::loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer, ISceneNode* rootNode) +{ + if (!file) + { + os::Printer::log("Unable to open scene file", ELL_ERROR); + return false; + } + + bool ret = false; + + // try scene loaders in reverse order + s32 i = SceneLoaderList.size()-1; + for (; i >= 0 && !ret; --i) + if (SceneLoaderList[i]->isALoadableFileFormat(file)) + ret = SceneLoaderList[i]->loadScene(file, userDataSerializer, rootNode); + + if (!ret) + os::Printer::log("Could not load scene file, perhaps the format is unsupported: ", file->getFileName().c_str(), ELL_ERROR); + + return ret; +} + + +//! writes a scene node +void CSceneManager::writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer, + const fschar_t* currentPath, bool init) +{ + if (!writer || !node || node->isDebugObject()) + return; + + const wchar_t* name; + ISceneNode* tmpNode=node; + + if (init) + { + name = IRR_XML_FORMAT_SCENE.c_str(); + writer->writeElement(name, false); + node=this; + } + else + { + name = IRR_XML_FORMAT_NODE.c_str(); + writer->writeElement(name, false, IRR_XML_FORMAT_NODE_ATTR_TYPE.c_str(), + core::stringw(getSceneNodeTypeName(node->getType())).c_str()); + } + + writer->writeLineBreak(); + + // write properties + + io::IAttributes* attr = FileSystem->createEmptyAttributes(Driver); + io::SAttributeReadWriteOptions options; + if (currentPath) + { + options.Filename=currentPath; + options.Flags|=io::EARWF_USE_RELATIVE_PATHS; + } + node->serializeAttributes(attr, &options); + + if (attr->getAttributeCount() != 0) + { + attr->write(writer); + writer->writeLineBreak(); + } + + // write materials + + if (node->getMaterialCount() && Driver) + { + const wchar_t* materialElement = L"materials"; + + writer->writeElement(materialElement); + writer->writeLineBreak(); + + for (u32 i=0; i < node->getMaterialCount(); ++i) + { + io::IAttributes* tmp_attr = + Driver->createAttributesFromMaterial(node->getMaterial(i), &options); + tmp_attr->write(writer); + tmp_attr->drop(); + } + + writer->writeClosingTag(materialElement); + writer->writeLineBreak(); + } + + // write animators + + if (!node->getAnimators().empty()) + { + const wchar_t* animatorElement = L"animators"; + writer->writeElement(animatorElement); + writer->writeLineBreak(); + + ISceneNodeAnimatorList::ConstIterator it = node->getAnimators().begin(); + for (; it != node->getAnimators().end(); ++it) + { + attr->clear(); + attr->addString("Type", getAnimatorTypeName((*it)->getType())); + + (*it)->serializeAttributes(attr); + + attr->write(writer); + } + + writer->writeClosingTag(animatorElement); + writer->writeLineBreak(); + } + + // write possible user data + + if (userDataSerializer) + { + io::IAttributes* userData = userDataSerializer->createUserData(node); + if (userData) + { + const wchar_t* userDataElement = L"userData"; + + writer->writeLineBreak(); + writer->writeElement(userDataElement); + writer->writeLineBreak(); + + userData->write(writer); + + writer->writeClosingTag(userDataElement); + writer->writeLineBreak(); + writer->writeLineBreak(); + + userData->drop(); + } + } + // reset to actual root node + if (init) + node=tmpNode; + + // write children once root node is written + // if parent is not scene manager, we need to write out node first + if (init && (node != this)) + { + writeSceneNode(writer, node, userDataSerializer, currentPath); + } + else + { + ISceneNodeList::ConstIterator it = node->getChildren().begin(); + for (; it != node->getChildren().end(); ++it) + writeSceneNode(writer, (*it), userDataSerializer, currentPath); + } + + attr->drop(); + + writer->writeClosingTag(name); + writer->writeLineBreak(); + writer->writeLineBreak(); +} + + +//! Returns a typename from a scene node type or null if not found +const c8* CSceneManager::getSceneNodeTypeName(ESCENE_NODE_TYPE type) +{ + const char* name = 0; + + for (s32 i=(s32)SceneNodeFactoryList.size()-1; !name && i>=0; --i) + name = SceneNodeFactoryList[i]->getCreateableSceneNodeTypeName(type); + + return name; +} + +//! Adds a scene node to the scene by name +ISceneNode* CSceneManager::addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent) +{ + ISceneNode* node = 0; + + for (s32 i=(s32)SceneNodeFactoryList.size()-1; i>=0 && !node; --i) + node = SceneNodeFactoryList[i]->addSceneNode(sceneNodeTypeName, parent); + + return node; +} + +ISceneNodeAnimator* CSceneManager::createSceneNodeAnimator(const char* typeName, ISceneNode* target) +{ + ISceneNodeAnimator *animator = 0; + + for (s32 i=(s32)SceneNodeAnimatorFactoryList.size()-1; i>=0 && !animator; --i) + animator = SceneNodeAnimatorFactoryList[i]->createSceneNodeAnimator(typeName, target); + + return animator; +} + + +//! Returns a typename from a scene node animator type or null if not found +const c8* CSceneManager::getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) +{ + const char* name = 0; + + for (s32 i=SceneNodeAnimatorFactoryList.size()-1; !name && i >= 0; --i) + name = SceneNodeAnimatorFactoryList[i]->getCreateableSceneNodeAnimatorTypeName(type); + + return name; +} + + +//! Writes attributes of the scene node. +void CSceneManager::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addString ("Name", Name.c_str()); + out->addInt ("Id", ID ); + out->addColorf ("AmbientLight", AmbientLight); + + // fog attributes from video driver + video::SColor color; + video::E_FOG_TYPE fogType; + f32 start, end, density; + bool pixelFog, rangeFog; + + Driver->getFog(color, fogType, start, end, density, pixelFog, rangeFog); + + out->addEnum("FogType", fogType, video::FogTypeNames); + out->addColorf("FogColor", color); + out->addFloat("FogStart", start); + out->addFloat("FogEnd", end); + out->addFloat("FogDensity", density); + out->addBool("FogPixel", pixelFog); + out->addBool("FogRange", rangeFog); +} + +//! Reads attributes of the scene node. +void CSceneManager::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Name = in->getAttributeAsString("Name"); + ID = in->getAttributeAsInt("Id"); + AmbientLight = in->getAttributeAsColorf("AmbientLight"); + + // fog attributes + video::SColor color; + video::E_FOG_TYPE fogType; + f32 start, end, density; + bool pixelFog, rangeFog; + if (in->existsAttribute("FogType")) + { + fogType = (video::E_FOG_TYPE) in->getAttributeAsEnumeration("FogType", video::FogTypeNames); + color = in->getAttributeAsColorf("FogColor").toSColor(); + start = in->getAttributeAsFloat("FogStart"); + end = in->getAttributeAsFloat("FogEnd"); + density = in->getAttributeAsFloat("FogDensity"); + pixelFog = in->getAttributeAsBool("FogPixel"); + rangeFog = in->getAttributeAsBool("FogRange"); + Driver->setFog(color, fogType, start, end, density, pixelFog, rangeFog); + } + + RelativeTranslation.set(0,0,0); + RelativeRotation.set(0,0,0); + RelativeScale.set(1,1,1); + IsVisible = true; + AutomaticCullingState = scene::EAC_BOX; + DebugDataVisible = scene::EDS_OFF; + IsDebugObject = false; + + updateAbsolutePosition(); +} + + +//! Sets ambient color of the scene +void CSceneManager::setAmbientLight(const video::SColorf &ambientColor) +{ + AmbientLight = ambientColor; +} + + +//! Returns ambient color of the scene +const video::SColorf& CSceneManager::getAmbientLight() const +{ + return AmbientLight; +} + + +//! Get a skinned mesh, which is not available as header-only code +ISkinnedMesh* CSceneManager::createSkinnedMesh() +{ +#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return new CSkinnedMesh(); +#else + return 0; +#endif +} + +//! Returns a mesh writer implementation if available +IMeshWriter* CSceneManager::createMeshWriter(EMESH_WRITER_TYPE type) +{ + switch(type) + { + case EMWT_IRR_MESH: +#ifdef _IRR_COMPILE_WITH_IRR_WRITER_ + return new CIrrMeshWriter(Driver, FileSystem); +#else + return 0; +#endif + case EMWT_COLLADA: +#ifdef _IRR_COMPILE_WITH_COLLADA_WRITER_ + return new CColladaMeshWriter(this, Driver, FileSystem); +#else + return 0; +#endif + case EMWT_STL: +#ifdef _IRR_COMPILE_WITH_STL_WRITER_ + return new CSTLMeshWriter(this); +#else + return 0; +#endif + case EMWT_OBJ: +#ifdef _IRR_COMPILE_WITH_OBJ_WRITER_ + return new COBJMeshWriter(this, FileSystem); +#else + return 0; +#endif + + case EMWT_PLY: +#ifdef _IRR_COMPILE_WITH_PLY_WRITER_ + return new CPLYMeshWriter(); +#else + return 0; +#endif + } + + return 0; +} + + +// creates a scenemanager +ISceneManager* createSceneManager(video::IVideoDriver* driver, + io::IFileSystem* fs, gui::ICursorControl* cursorcontrol, + gui::IGUIEnvironment *guiEnvironment) +{ + return new CSceneManager(driver, fs, cursorcontrol, 0, guiEnvironment ); +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.h new file mode 100644 index 0000000..3957f85 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneManager.h @@ -0,0 +1,659 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_MANAGER_H_INCLUDED__ +#define __C_SCENE_MANAGER_H_INCLUDED__ + +#include "ISceneManager.h" +#include "ISceneNode.h" +#include "ICursorControl.h" +#include "irrString.h" +#include "irrArray.h" +#include "IMeshLoader.h" +#include "CAttributes.h" +#include "ILightManager.h" + +namespace irr +{ +namespace io +{ + class IXMLWriter; + class IFileSystem; +} +namespace scene +{ + class IMeshCache; + class IGeometryCreator; + + /*! + The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff. + */ + class CSceneManager : public ISceneManager, public ISceneNode + { + public: + + //! constructor + CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs, + gui::ICursorControl* cursorControl, IMeshCache* cache = 0, + gui::IGUIEnvironment *guiEnvironment = 0); + + //! destructor + virtual ~CSceneManager(); + + //! gets an animateable mesh. loads it if needed. returned pointer must not be dropped. + virtual IAnimatedMesh* getMesh(const io::path& filename); + + //! gets an animateable mesh. loads it if needed. returned pointer must not be dropped. + virtual IAnimatedMesh* getMesh(io::IReadFile* file); + + //! Returns an interface to the mesh cache which is shared beween all existing scene managers. + virtual IMeshCache* getMeshCache(); + + //! returns the video driver + virtual video::IVideoDriver* getVideoDriver(); + + //! return the gui environment + virtual gui::IGUIEnvironment* getGUIEnvironment(); + + //! return the filesystem + virtual io::IFileSystem* getFileSystem(); + + //! adds Volume Lighting Scene Node. + //! the returned pointer must not be dropped. + virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1, + const u32 subdivU = 32, const u32 subdivV = 32, + const video::SColor foot = video::SColor(51, 0, 230, 180), + const video::SColor tail = video::SColor(0, 0, 0, 0), + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! adds a cube scene node to the scene. It is a simple cube of (1,1,1) size. + //! the returned pointer must not be dropped. + virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), const core::vector3df& rotation = core::vector3df(0,0,0), const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! Adds a sphere scene node to the scene. + virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! adds a scene node for rendering an animated mesh model + virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f), + bool alsoAddIfMeshPointerZero=false); + + //! adds a scene node for rendering a static mesh + //! the returned pointer must not be dropped. + virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f), + bool alsoAddIfMeshPointerZero=false); + + //! Adds a scene node for rendering a animated water surface mesh. + virtual ISceneNode* addWaterSurfaceSceneNode(IMesh* mesh, f32 waveHeight, f32 waveSpeed, f32 wlenght, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! registers a node for rendering it at a specific time. + virtual u32 registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC); + + //! draws all scene nodes + virtual void drawAll(); + + //! Adds a scene node for rendering using a octree to the scene graph. This a good method for rendering + //! scenes with lots of geometry. The Octree is built on the fly from the mesh, much + //! faster then a bsp tree. + virtual IMeshSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false); + + //! Adss a scene node for rendering using a octree. This a good method for rendering + //! scenes with lots of geometry. The Octree is built on the fly from the mesh, much + //! faster then a bsp tree. + virtual IMeshSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=128, bool alsoAddIfMeshPointerZero=false); + + //! Adds a camera scene node to the tree and sets it as active camera. + //! \param position: Position of the space relative to its parent where the camera will be placed. + //! \param lookat: Position where the camera will look at. Also known as target. + //! \param parent: Parent scene node of the camera. Can be null. If the parent moves, + //! the camera will move too. + //! \return Pointer to interface to camera + virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& lookat = core::vector3df(0,0,100), + s32 id=-1, bool makeActive=true); + + //! Adds a camera scene node which is able to be controlle with the mouse similar + //! like in the 3D Software Maya by Alias Wavefront. + //! The returned pointer must not be dropped. + virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent=0, + f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f, + f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f, + bool makeActive=true); + + //! Adds a camera scene node which is able to be controled with the mouse and keys + //! like in most first person shooters (FPS): + virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, s32 id=-1, + SKeyMap* keyMapArray=0, s32 keyMapSize=0, + bool noVerticalMovement=false, f32 jumpSpeed = 0.f, + bool invertMouseY=false, bool makeActive=true); + + //! Adds a dynamic light scene node. The light will cast dynamic light on all + //! other scene nodes in the scene, which have the material flag video::MTF_LIGHTING + //! turned on. (This is the default setting in most scene nodes). + virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0, + const core::vector3df& position = core::vector3df(0,0,0), + video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f), + f32 range=100.0f, s32 id=-1); + + //! Adds a billboard scene node to the scene. A billboard is like a 3d sprite: A 2d element, + //! which always looks to the camera. It is usually used for things like explosions, fire, + //! lensflares and things like that. + virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0, + const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f), + const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, + video::SColor shadeTop = 0xFFFFFFFF, video::SColor shadeBottom = 0xFFFFFFFF); + + //! Adds a skybox scene node. A skybox is a big cube with 6 textures on it and + //! is drawn around the camera position. + virtual ISceneNode* addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom, + video::ITexture* left, video::ITexture* right, video::ITexture* front, + video::ITexture* back, ISceneNode* parent = 0, s32 id=-1); + + //! Adds a skydome scene node. A skydome is a large (half-) sphere with a + //! panoramic texture on it and is drawn around the camera position. + virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture, + u32 horiRes=16, u32 vertRes=8, + f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f, + ISceneNode* parent=0, s32 id=-1); + + //! Adds a text scene node, which is able to display + //! 2d text at a position in three dimensional space + virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text, + video::SColor color=video::SColor(100,255,255,255), + ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0), + s32 id=-1); + + //! Adds a text scene node, which uses billboards + virtual IBillboardTextSceneNode* addBillboardTextSceneNode(gui::IGUIFont* font, const wchar_t* text, + ISceneNode* parent = 0, + const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f), + const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, + video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF); + + //! Adds a scene node, which can render a quake3 shader + virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader, + ISceneNode* parent=0, s32 id=-1 + ); + + + //! Adds a Hill Plane mesh to the mesh pool. The mesh is + //! generated on the fly and looks like a plane with some hills + //! on it. You can specify how many hills should be on the plane + //! and how high they should be. Also you must specify a name + //! for the mesh because the mesh is added to the mesh pool and + //! can be retrieved back using ISceneManager::getMesh with the + //! name as parameter. + virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name, + const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount, + video::SMaterial* material = 0, f32 hillHeight = 0.0f, + const core::dimension2d<f32>& countHills = core::dimension2d<f32>(1.0f, 1.0f), + const core::dimension2d<f32>& textureRepeatCount = core::dimension2d<f32>(1.0f, 1.0f)); + + //! Adds a terrain mesh to the mesh pool. + virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname, video::IImage* texture, video::IImage* heightmap, + const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f), + f32 maxHeight=200.0f, + const core::dimension2d<u32>& defaultVertexBlockSize = core::dimension2d<u32>(64,64)); + + //! Add a arrow mesh to the mesh pool + virtual IAnimatedMesh* addArrowMesh(const io::path& name, + video::SColor vtxColor0, video::SColor vtxColor1, + u32 tesselationCylinder, u32 tesselationCone, + f32 height, f32 cylinderHeight, f32 width0, + f32 width1); + + //! Adds a static sphere mesh to the mesh pool. + IAnimatedMesh* addSphereMesh(const io::path& name, + f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16); + + //! Adds a static volume light mesh to the mesh pool. + IAnimatedMesh* addVolumeLightMesh(const io::path& name, + const u32 SubdivideU = 32, const u32 SubdivideV = 32, + const video::SColor FootColor = video::SColor(51, 0, 230, 180), + const video::SColor TailColor = video::SColor(0, 0, 0, 0)); + + //! Adds a particle system scene node. + virtual IParticleSystemSceneNode* addParticleSystemSceneNode( + bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! Adds a terrain scene node to the scene graph. + virtual ITerrainSceneNode* addTerrainSceneNode( + const io::path& heightMapFileName, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=4, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17,s32 smoothFactor=0, + bool addAlsoIfHeightmapEmpty = false); + + //! Adds a terrain scene node to the scene graph. + virtual ITerrainSceneNode* addTerrainSceneNode( + io::IReadFile* heightMap, + ISceneNode* parent=0, s32 id=-1, + const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), + const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), + video::SColor vertexColor = video::SColor(255,255,255,255), + s32 maxLOD=4, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17,s32 smoothFactor=0, + bool addAlsoIfHeightmapEmpty=false); + + //! Adds a dummy transformation scene node to the scene graph. + virtual IDummyTransformationSceneNode* addDummyTransformationSceneNode( + ISceneNode* parent=0, s32 id=-1); + + //! Adds an empty scene node. + virtual ISceneNode* addEmptySceneNode(ISceneNode* parent, s32 id=-1); + + //! Returns the root scene node. This is the scene node wich is parent + //! of all scene nodes. The root scene node is a special scene node which + //! only exists to manage all scene nodes. It is not rendered and cannot + //! be removed from the scene. + //! \return Pointer to the root scene node. + virtual ISceneNode* getRootSceneNode(); + + //! Returns the current active camera. + //! \return The active camera is returned. Note that this can be NULL, if there + //! was no camera created yet. + virtual ICameraSceneNode* getActiveCamera() const; + + //! Sets the active camera. The previous active camera will be deactivated. + //! \param camera: The new camera which should be active. + virtual void setActiveCamera(ICameraSceneNode* camera); + + //! creates a rotation animator, which rotates the attached scene node around itself. + //! \param rotationPerSecond: Specifies the speed of the animation + //! \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + //! and the animator will animate it. + virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationPerSecond); + + //! creates a fly circle animator + /** Lets the attached scene node fly around a center. + \param center Center relative to node origin + \param speed: The orbital speed, in radians per millisecond. + \param direction: Specifies the upvector used for alignment of the mesh. + \param startPosition: The position on the circle where the animator will + begin. Value is in multiples of a circle, i.e. 0.5 is half way around. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + */ + virtual ISceneNodeAnimator* createFlyCircleAnimator( + const core::vector3df& center=core::vector3df(0.f, 0.f, 0.f), + f32 radius=100.f, f32 speed=0.001f, + const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f), + f32 startPosition = 0.f, + f32 radiusEllipsoid = 0.f); + + //! Creates a fly straight animator, which lets the attached scene node + //! fly or move along a line between two points. + virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint, + const core::vector3df& endPoint, u32 timeForWay, bool loop=false,bool pingpong = false); + + //! Creates a texture animator, which switches the textures of the target scene + //! node based on a list of textures. + virtual ISceneNodeAnimator* createTextureAnimator(const core::array<video::ITexture*>& textures, + s32 timePerFrame, bool loop); + + //! Creates a scene node animator, which deletes the scene node after + //! some time automaticly. + virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMS); + + + //! Creates a special scene node animator for doing automatic collision detection + //! and response. + virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator( + ITriangleSelector* world, ISceneNode* sceneNode, + const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30), + const core::vector3df& gravityPerSecond = core::vector3df(0,-1.0f,0), + const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0), + f32 slidingValue = 0.0005f); + + //! Creates a follow spline animator. + virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, + const core::array< core::vector3df >& points, + f32 speed, f32 tightness, bool loop, bool pingpong); + + + //! Creates a simple ITriangleSelector, based on a mesh. + virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node); + + //! Creates a simple ITriangleSelector, based on an animated mesh scene node. + //! Details of the mesh associated with the node will be extracted internally. + //! Call ITriangleSelector::update() to have the triangle selector updated based + //! on the current frame of the animated mesh scene node. + //! \param: The animated mesh scene node from which to build the selector + virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node); + + //! Creates a simple ITriangleSelector, based on a mesh. + virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode); + + //! Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box. + virtual ITriangleSelector* createTriangleSelectorFromBoundingBox( + ISceneNode* node); + + //! Creates a meta triangle selector. + virtual IMetaTriangleSelector* createMetaTriangleSelector(); + + //! Creates a triangle selector which can select triangles from a terrain scene node + //! \param: Pointer to the created terrain scene node + //! \param: Level of detail, 0 for highest detail. + virtual ITriangleSelector* createTerrainTriangleSelector( + ITerrainSceneNode* node, s32 LOD=0); + + //! Adds an external mesh loader. + virtual void addExternalMeshLoader(IMeshLoader* externalLoader); + + //! Returns the number of mesh loaders supported by Irrlicht at this time + virtual u32 getMeshLoaderCount() const; + + //! Retrieve the given mesh loader + virtual IMeshLoader* getMeshLoader(u32 index) const; + + //! Adds an external scene loader. + virtual void addExternalSceneLoader(ISceneLoader* externalLoader); + + //! Returns the number of scene loaders supported by Irrlicht at this time + virtual u32 getSceneLoaderCount() const; + + //! Retrieve the given scene loader + virtual ISceneLoader* getSceneLoader(u32 index) const; + + //! Returns a pointer to the scene collision manager. + virtual ISceneCollisionManager* getSceneCollisionManager(); + + //! Returns a pointer to the mesh manipulator. + virtual IMeshManipulator* getMeshManipulator(); + + //! Sets the color of stencil buffers shadows drawn by the scene manager. + virtual void setShadowColor(video::SColor color); + + //! Returns the current color of shadows. + virtual video::SColor getShadowColor() const; + + //! Adds a scene node to the deletion queue. + virtual void addToDeletionQueue(ISceneNode* node); + + //! Returns the first scene node with the specified id. + virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0); + + //! Returns the first scene node with the specified name. + virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0); + + //! Returns the first scene node with the specified type. + virtual ISceneNode* getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start=0); + + //! returns scene nodes by type. + virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type, core::array<scene::ISceneNode*>& outNodes, ISceneNode* start=0); + + //! Posts an input event to the environment. Usually you do not have to + //! use this method, it is used by the internal engine. + virtual bool postEventFromUser(const SEvent& event); + + //! Clears the whole scene. All scene nodes are removed. + virtual void clear(); + + //! Removes all children of this scene node + virtual void removeAll(); + + //! Returns interface to the parameters set in this scene. + virtual io::IAttributes* getParameters(); + + //! Returns current render pass. + virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const; + + //! Creates a new scene manager. + virtual ISceneManager* createNewSceneManager(bool cloneContent); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_SCENE_MANAGER; } + + //! Returns the default scene node factory which can create all built in scene nodes + virtual ISceneNodeFactory* getDefaultSceneNodeFactory(); + + //! Adds a scene node factory to the scene manager. + /** Use this to extend the scene manager with new scene node types which it should be + able to create automaticly, for example when loading data from xml files. */ + virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd); + + //! Returns amount of registered scene node factories. + virtual u32 getRegisteredSceneNodeFactoryCount() const; + + //! Returns a scene node factory by index + virtual ISceneNodeFactory* getSceneNodeFactory(u32 index); + + //! Returns a typename from a scene node type or null if not found + virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type); + + //! Returns a typename from a scene node animator type or null if not found + virtual const c8* getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type); + + //! Adds a scene node to the scene by name + virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0); + + //! creates a scene node animator based on its type name + virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0); + + //! Returns the default scene node animator factory which can create all built-in scene node animators + virtual ISceneNodeAnimatorFactory* getDefaultSceneNodeAnimatorFactory(); + + //! Adds a scene node animator factory to the scene manager. + virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd); + + //! Returns amount of registered scene node animator factories. + virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const; + + //! Returns a scene node animator factory by index + virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index); + + //! Saves the current scene into a file. + virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); + + //! Saves the current scene into a file. + virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); + + //! Saves the current scene into a file. + virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); + + //! Loads a scene. Note that the current scene is not cleared before. + virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0); + + //! Loads a scene. Note that the current scene is not cleared before. + virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0); + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns a mesh writer implementation if available + virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type); + + //! Get a skinned mesh, which is not available as header-only code + virtual ISkinnedMesh* createSkinnedMesh(); + + //! Sets ambient color of the scene + virtual void setAmbientLight(const video::SColorf &ambientColor); + + //! Returns ambient color of the scene + virtual const video::SColorf& getAmbientLight() const; + + //! Register a custom callbacks manager which gets callbacks during scene rendering. + virtual void setLightManager(ILightManager* lightManager); + + //! Get current render time. + virtual E_SCENE_NODE_RENDER_PASS getCurrentRendertime() const { return CurrentRendertime; } + + //! Set current render time. + virtual void setCurrentRendertime(E_SCENE_NODE_RENDER_PASS currentRendertime) { CurrentRendertime = currentRendertime; } + + //! Get an instance of a geometry creator. + virtual const IGeometryCreator* getGeometryCreator(void) const { return GeometryCreator; } + + //! returns if node is culled + virtual bool isCulled(const ISceneNode* node) const; + + private: + + //! clears the deletion list + void clearDeletionList(); + + //! writes a scene node + void writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer, const fschar_t* currentPath=0, bool init=false); + + struct DefaultNodeEntry + { + DefaultNodeEntry(ISceneNode* n) : + Node(n), TextureValue(0) + { + if (n->getMaterialCount()) + TextureValue = (n->getMaterial(0).getTexture(0)); + } + + bool operator < (const DefaultNodeEntry& other) const + { + return (TextureValue < other.TextureValue); + } + + ISceneNode* Node; + private: + void* TextureValue; + }; + + //! sort on distance (center) to camera + struct TransparentNodeEntry + { + TransparentNodeEntry(ISceneNode* n, const core::vector3df& camera) + : Node(n) + { + Distance = Node->getAbsoluteTransformation().getTranslation().getDistanceFromSQ(camera); + } + + bool operator < (const TransparentNodeEntry& other) const + { + return Distance > other.Distance; + } + + ISceneNode* Node; + private: + f64 Distance; + }; + + //! sort on distance (sphere) to camera + struct DistanceNodeEntry + { + DistanceNodeEntry(ISceneNode* n, const core::vector3df& cameraPos) + : Node(n) + { + setNodeAndDistanceFromPosition(n, cameraPos); + } + + bool operator < (const DistanceNodeEntry& other) const + { + return Distance < other.Distance; + } + + void setNodeAndDistanceFromPosition(ISceneNode* n, const core::vector3df & fromPosition) + { + Node = n; + Distance = Node->getAbsoluteTransformation().getTranslation().getDistanceFromSQ(fromPosition); + Distance -= Node->getBoundingBox().getExtent().getLengthSQ() * 0.5; + } + + ISceneNode* Node; + private: + f64 Distance; + }; + + //! video driver + video::IVideoDriver* Driver; + + //! file system + io::IFileSystem* FileSystem; + + //! GUI Enviroment ( Debug Purpose ) + gui::IGUIEnvironment* GUIEnvironment; + + //! cursor control + gui::ICursorControl* CursorControl; + + //! collision manager + ISceneCollisionManager* CollisionManager; + + //! render pass lists + core::array<ISceneNode*> CameraList; + core::array<ISceneNode*> LightList; + core::array<ISceneNode*> ShadowNodeList; + core::array<ISceneNode*> SkyBoxList; + core::array<DefaultNodeEntry> SolidNodeList; + core::array<TransparentNodeEntry> TransparentNodeList; + core::array<TransparentNodeEntry> TransparentEffectNodeList; + + core::array<IMeshLoader*> MeshLoaderList; + core::array<ISceneLoader*> SceneLoaderList; + core::array<ISceneNode*> DeletionList; + core::array<ISceneNodeFactory*> SceneNodeFactoryList; + core::array<ISceneNodeAnimatorFactory*> SceneNodeAnimatorFactoryList; + + //! current active camera + ICameraSceneNode* ActiveCamera; + core::vector3df camWorldPos; // Position of camera for transparent nodes. + + video::SColor ShadowColor; + video::SColorf AmbientLight; + + //! String parameters + // NODE: Attributes are slow and should only be used for debug-info and not in release + io::CAttributes Parameters; + + //! Mesh cache + IMeshCache* MeshCache; + + E_SCENE_NODE_RENDER_PASS CurrentRendertime; + + //! An optional callbacks manager to allow the user app finer control + //! over the scene lighting and rendering. + ILightManager* LightManager; + + //! constants for reading and writing XML. + //! Not made static due to portability problems. + const core::stringw IRR_XML_FORMAT_SCENE; + const core::stringw IRR_XML_FORMAT_NODE; + const core::stringw IRR_XML_FORMAT_NODE_ATTR_TYPE; + + IGeometryCreator* GeometryCreator; + }; + +} // end namespace video +} // end namespace scene + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp new file mode 100644 index 0000000..5612f8a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp @@ -0,0 +1,355 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorCameraFPS.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "Keycodes.h" +#include "ICursorControl.h" +#include "ICameraSceneNode.h" +#include "ISceneNodeAnimatorCollisionResponse.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSceneNodeAnimatorCameraFPS::CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, + f32 rotateSpeed, f32 moveSpeed, f32 jumpSpeed, + SKeyMap* keyMapArray, u32 keyMapSize, bool noVerticalMovement, bool invertY) +: CursorControl(cursorControl), MaxVerticalAngle(88.0f), + MoveSpeed(moveSpeed), RotateSpeed(rotateSpeed), JumpSpeed(jumpSpeed), + MouseYDirection(invertY ? -1.0f : 1.0f), + LastAnimationTime(0), firstUpdate(true), firstInput(true), NoVerticalMovement(noVerticalMovement) +{ + #ifdef _DEBUG + setDebugName("CCameraSceneNodeAnimatorFPS"); + #endif + + if (CursorControl) + CursorControl->grab(); + + allKeysUp(); + + // create key map + if (!keyMapArray || !keyMapSize) + { + // create default key map + KeyMap.push_back(SKeyMap(EKA_MOVE_FORWARD, irr::KEY_UP)); + KeyMap.push_back(SKeyMap(EKA_MOVE_BACKWARD, irr::KEY_DOWN)); + KeyMap.push_back(SKeyMap(EKA_STRAFE_LEFT, irr::KEY_LEFT)); + KeyMap.push_back(SKeyMap(EKA_STRAFE_RIGHT, irr::KEY_RIGHT)); + KeyMap.push_back(SKeyMap(EKA_JUMP_UP, irr::KEY_KEY_J)); + } + else + { + // create custom key map + setKeyMap(keyMapArray, keyMapSize); + } +} + + +//! destructor +CSceneNodeAnimatorCameraFPS::~CSceneNodeAnimatorCameraFPS() +{ + if (CursorControl) + CursorControl->drop(); +} + + +//! It is possible to send mouse and key events to the camera. Most cameras +//! may ignore this input, but camera scene nodes which are created for +//! example with scene::ISceneManager::addMayaCameraSceneNode or +//! scene::ISceneManager::addFPSCameraSceneNode, may want to get this input +//! for changing their position, look at target or whatever. +bool CSceneNodeAnimatorCameraFPS::OnEvent(const SEvent& evt) +{ + switch(evt.EventType) + { + case EET_KEY_INPUT_EVENT: + for (u32 i=0; i<KeyMap.size(); ++i) + { + if (KeyMap[i].KeyCode == evt.KeyInput.Key) + { + CursorKeys[KeyMap[i].Action] = evt.KeyInput.PressedDown; + return true; + } + } + break; + + case EET_MOUSE_INPUT_EVENT: + if (evt.MouseInput.Event == EMIE_MOUSE_MOVED) + { + CursorPos = CursorControl->getRelativePosition(); + return true; + } + break; + + default: + break; + } + + return false; +} + + +void CSceneNodeAnimatorCameraFPS::animateNode(ISceneNode* node, u32 timeMs) +{ + if (!node || node->getType() != ESNT_CAMERA) + return; + + ICameraSceneNode* camera = static_cast<ICameraSceneNode*>(node); + + if (firstUpdate) + { + camera->updateAbsolutePosition(); + if (CursorControl ) + { + CursorControl->setPosition(0.5f, 0.5f); + CursorPos = CenterCursor = CursorControl->getRelativePosition(); + } + + LastAnimationTime = timeMs; + + firstUpdate = false; + } + + // If the camera isn't the active camera, and receiving input, then don't process it. + if(!camera->isInputReceiverEnabled()) + { + firstInput = true; + return; + } + + if ( firstInput ) + { + allKeysUp(); + firstInput = false; + } + + scene::ISceneManager * smgr = camera->getSceneManager(); + if(smgr && smgr->getActiveCamera() != camera) + return; + + // get time + f32 timeDiff = (f32) ( timeMs - LastAnimationTime ); + LastAnimationTime = timeMs; + + // update position + core::vector3df pos = camera->getPosition(); + + // Update rotation + core::vector3df target = (camera->getTarget() - camera->getAbsolutePosition()); + core::vector3df relativeRotation = target.getHorizontalAngle(); + + if (CursorControl) + { + if (CursorPos != CenterCursor) + { + relativeRotation.Y -= (0.5f - CursorPos.X) * RotateSpeed; + relativeRotation.X -= (0.5f - CursorPos.Y) * RotateSpeed * MouseYDirection; + + // X < MaxVerticalAngle or X > 360-MaxVerticalAngle + + if (relativeRotation.X > MaxVerticalAngle*2 && + relativeRotation.X < 360.0f-MaxVerticalAngle) + { + relativeRotation.X = 360.0f-MaxVerticalAngle; + } + else + if (relativeRotation.X > MaxVerticalAngle && + relativeRotation.X < 360.0f-MaxVerticalAngle) + { + relativeRotation.X = MaxVerticalAngle; + } + + // Do the fix as normal, special case below + // reset cursor position to the centre of the window. + CursorControl->setPosition(0.5f, 0.5f); + CenterCursor = CursorControl->getRelativePosition(); + + // needed to avoid problems when the event receiver is disabled + CursorPos = CenterCursor; + } + + // Special case, mouse is whipped outside of window before it can update. + video::IVideoDriver* driver = smgr->getVideoDriver(); + core::vector2d<u32> mousepos(u32(CursorControl->getPosition().X), u32(CursorControl->getPosition().Y)); + core::rect<u32> screenRect(0, 0, driver->getScreenSize().Width, driver->getScreenSize().Height); + + // Only if we are moving outside quickly. + bool reset = !screenRect.isPointInside(mousepos); + + if(reset) + { + // Force a reset. + CursorControl->setPosition(0.5f, 0.5f); + CenterCursor = CursorControl->getRelativePosition(); + CursorPos = CenterCursor; + } + } + + // set target + + target.set(0,0, core::max_(1.f, pos.getLength())); + core::vector3df movedir = target; + + core::matrix4 mat; + mat.setRotationDegrees(core::vector3df(relativeRotation.X, relativeRotation.Y, 0)); + mat.transformVect(target); + + if (NoVerticalMovement) + { + mat.setRotationDegrees(core::vector3df(0, relativeRotation.Y, 0)); + mat.transformVect(movedir); + } + else + { + movedir = target; + } + + movedir.normalize(); + + if (CursorKeys[EKA_MOVE_FORWARD]) + pos += movedir * timeDiff * MoveSpeed; + + if (CursorKeys[EKA_MOVE_BACKWARD]) + pos -= movedir * timeDiff * MoveSpeed; + + // strafing + + core::vector3df strafevect = target; + strafevect = strafevect.crossProduct(camera->getUpVector()); + + if (NoVerticalMovement) + strafevect.Y = 0.0f; + + strafevect.normalize(); + + if (CursorKeys[EKA_STRAFE_LEFT]) + pos += strafevect * timeDiff * MoveSpeed; + + if (CursorKeys[EKA_STRAFE_RIGHT]) + pos -= strafevect * timeDiff * MoveSpeed; + + // For jumping, we find the collision response animator attached to our camera + // and if it's not falling, we tell it to jump. + if (CursorKeys[EKA_JUMP_UP]) + { + const ISceneNodeAnimatorList& animators = camera->getAnimators(); + ISceneNodeAnimatorList::ConstIterator it = animators.begin(); + while(it != animators.end()) + { + if(ESNAT_COLLISION_RESPONSE == (*it)->getType()) + { + ISceneNodeAnimatorCollisionResponse * collisionResponse = + static_cast<ISceneNodeAnimatorCollisionResponse *>(*it); + + if(!collisionResponse->isFalling()) + collisionResponse->jump(JumpSpeed); + } + + it++; + } + } + + // write translation + camera->setPosition(pos); + + // write right target + target += pos; + camera->setTarget(target); +} + + +void CSceneNodeAnimatorCameraFPS::allKeysUp() +{ + for (u32 i=0; i<EKA_COUNT; ++i) + CursorKeys[i] = false; +} + + +//! Sets the rotation speed +void CSceneNodeAnimatorCameraFPS::setRotateSpeed(f32 speed) +{ + RotateSpeed = speed; +} + + +//! Sets the movement speed +void CSceneNodeAnimatorCameraFPS::setMoveSpeed(f32 speed) +{ + MoveSpeed = speed; +} + + +//! Gets the rotation speed +f32 CSceneNodeAnimatorCameraFPS::getRotateSpeed() const +{ + return RotateSpeed; +} + + +// Gets the movement speed +f32 CSceneNodeAnimatorCameraFPS::getMoveSpeed() const +{ + return MoveSpeed; +} + + +//! Sets the keyboard mapping for this animator +void CSceneNodeAnimatorCameraFPS::setKeyMap(SKeyMap *map, u32 count) +{ + // clear the keymap + KeyMap.clear(); + + // add actions + for (u32 i=0; i<count; ++i) + { + KeyMap.push_back(map[i]); + } +} + +void CSceneNodeAnimatorCameraFPS::setKeyMap(const core::array<SKeyMap>& keymap) +{ + KeyMap=keymap; +} + +const core::array<SKeyMap>& CSceneNodeAnimatorCameraFPS::getKeyMap() const +{ + return KeyMap; +} + + +//! Sets whether vertical movement should be allowed. +void CSceneNodeAnimatorCameraFPS::setVerticalMovement(bool allow) +{ + NoVerticalMovement = !allow; +} + + +//! Sets whether the Y axis of the mouse should be inverted. +void CSceneNodeAnimatorCameraFPS::setInvertMouse(bool invert) +{ + if (invert) + MouseYDirection = -1.0f; + else + MouseYDirection = 1.0f; +} + + +ISceneNodeAnimator* CSceneNodeAnimatorCameraFPS::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorCameraFPS * newAnimator = + new CSceneNodeAnimatorCameraFPS(CursorControl, RotateSpeed, MoveSpeed, JumpSpeed, + 0, 0, NoVerticalMovement); + newAnimator->setKeyMap(KeyMap); + return newAnimator; +} + + +} // namespace scene +} // namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h new file mode 100644 index 0000000..9b4ad2e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h @@ -0,0 +1,123 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ + +#include "ISceneNodeAnimatorCameraFPS.h" +#include "vector2d.h" +#include "position2d.h" +#include "SKeyMap.h" +#include "irrArray.h" + +namespace irr +{ +namespace gui +{ + class ICursorControl; +} + +namespace scene +{ + + //! Special scene node animator for FPS cameras + class CSceneNodeAnimatorCameraFPS : public ISceneNodeAnimatorCameraFPS + { + public: + + //! Constructor + CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, + f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, f32 jumpSpeed=0.f, + SKeyMap* keyMapArray=0, u32 keyMapSize=0, bool noVerticalMovement=false, + bool invertY=false); + + //! Destructor + virtual ~CSceneNodeAnimatorCameraFPS(); + + //! Animates the scene node, currently only works on cameras + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Event receiver + virtual bool OnEvent(const SEvent& event); + + //! Returns the speed of movement in units per second + virtual f32 getMoveSpeed() const; + + //! Sets the speed of movement in units per second + virtual void setMoveSpeed(f32 moveSpeed); + + //! Returns the rotation speed + virtual f32 getRotateSpeed() const; + + //! Set the rotation speed + virtual void setRotateSpeed(f32 rotateSpeed); + + //! Sets the keyboard mapping for this animator (old style) + //! \param keymap: an array of keyboard mappings, see SKeyMap + //! \param count: the size of the keyboard map array + virtual void setKeyMap(SKeyMap *map, u32 count); + + //! Sets the keyboard mapping for this animator + //! \param keymap The new keymap array + virtual void setKeyMap(const core::array<SKeyMap>& keymap); + + //! Gets the keyboard mapping for this animator + virtual const core::array<SKeyMap>& getKeyMap() const; + + //! Sets whether vertical movement should be allowed. + virtual void setVerticalMovement(bool allow); + + //! Sets whether the Y axis of the mouse should be inverted. + /** If enabled then moving the mouse down will cause + the camera to look up. It is disabled by default. */ + virtual void setInvertMouse(bool invert); + + //! This animator will receive events when attached to the active camera + virtual bool isEventReceiverEnabled() const + { + return true; + } + + //! Returns the type of this animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const + { + return ESNAT_CAMERA_FPS; + } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer once you're + done with it. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + void allKeysUp(); + + gui::ICursorControl *CursorControl; + + f32 MaxVerticalAngle; + + f32 MoveSpeed; + f32 RotateSpeed; + f32 JumpSpeed; + // -1.0f for inverted mouse, defaults to 1.0f + f32 MouseYDirection; + + s32 LastAnimationTime; + + core::array<SKeyMap> KeyMap; + core::position2d<f32> CenterCursor, CursorPos; + + bool CursorKeys[EKA_COUNT]; + + bool firstUpdate; + bool firstInput; + bool NoVerticalMovement; + }; + +} // end namespace scene +} // end namespace irr + +#endif // __C_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp new file mode 100644 index 0000000..00ac133 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp @@ -0,0 +1,317 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorCameraMaya.h" +#include "ICursorControl.h" +#include "ICameraSceneNode.h" +#include "SViewFrustum.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSceneNodeAnimatorCameraMaya::CSceneNodeAnimatorCameraMaya(gui::ICursorControl* cursor, + f32 rotateSpeed, f32 zoomSpeed, f32 translateSpeed, f32 distance) + : CursorControl(cursor), OldCamera(0), MousePos(0.5f, 0.5f), + ZoomSpeed(zoomSpeed), RotateSpeed(rotateSpeed), TranslateSpeed(translateSpeed), + CurrentZoom(distance), RotX(0.0f), RotY(0.0f), + Zooming(false), Rotating(false), Moving(false), Translating(false) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorCameraMaya"); + #endif + + if (CursorControl) + { + CursorControl->grab(); + MousePos = CursorControl->getRelativePosition(); + } + + allKeysUp(); +} + + +//! destructor +CSceneNodeAnimatorCameraMaya::~CSceneNodeAnimatorCameraMaya() +{ + if (CursorControl) + CursorControl->drop(); +} + + +//! It is possible to send mouse and key events to the camera. Most cameras +//! may ignore this input, but camera scene nodes which are created for +//! example with scene::ISceneManager::addMayaCameraSceneNode or +//! scene::ISceneManager::addMeshViewerCameraSceneNode, may want to get this input +//! for changing their position, look at target or whatever. +bool CSceneNodeAnimatorCameraMaya::OnEvent(const SEvent& event) +{ + if (event.EventType != EET_MOUSE_INPUT_EVENT) + return false; + + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + MouseKeys[0] = true; + break; + case EMIE_RMOUSE_PRESSED_DOWN: + MouseKeys[2] = true; + break; + case EMIE_MMOUSE_PRESSED_DOWN: + MouseKeys[1] = true; + break; + case EMIE_LMOUSE_LEFT_UP: + MouseKeys[0] = false; + break; + case EMIE_RMOUSE_LEFT_UP: + MouseKeys[2] = false; + break; + case EMIE_MMOUSE_LEFT_UP: + MouseKeys[1] = false; + break; + case EMIE_MOUSE_MOVED: + MousePos = CursorControl->getRelativePosition(); + break; + case EMIE_MOUSE_WHEEL: + case EMIE_LMOUSE_DOUBLE_CLICK: + case EMIE_RMOUSE_DOUBLE_CLICK: + case EMIE_MMOUSE_DOUBLE_CLICK: + case EMIE_LMOUSE_TRIPLE_CLICK: + case EMIE_RMOUSE_TRIPLE_CLICK: + case EMIE_MMOUSE_TRIPLE_CLICK: + case EMIE_COUNT: + return false; + } + return true; +} + + +//! OnAnimate() is called just before rendering the whole scene. +void CSceneNodeAnimatorCameraMaya::animateNode(ISceneNode *node, u32 timeMs) +{ + //Alt + LM = Rotate around camera pivot + //Alt + LM + MM = Dolly forth/back in view direction (speed % distance camera pivot - max distance to pivot) + //Alt + MM = Move on camera plane (Screen center is about the mouse pointer, depending on move speed) + + if (!node || node->getType() != ESNT_CAMERA) + return; + + ICameraSceneNode* camera = static_cast<ICameraSceneNode*>(node); + + // If the camera isn't the active camera, and receiving input, then don't process it. + if (!camera->isInputReceiverEnabled()) + return; + + scene::ISceneManager * smgr = camera->getSceneManager(); + if (smgr && smgr->getActiveCamera() != camera) + return; + + if (OldCamera != camera) + { + LastCameraTarget = OldTarget = camera->getTarget(); + OldCamera = camera; + } + else + { + OldTarget += camera->getTarget() - LastCameraTarget; + } + + f32 nRotX = RotX; + f32 nRotY = RotY; + f32 nZoom = CurrentZoom; + + if ( (isMouseKeyDown(0) && isMouseKeyDown(2)) || isMouseKeyDown(1) ) + { + if (!Zooming) + { + ZoomStart = MousePos; + Zooming = true; + } + else + { + const f32 targetMinDistance = 0.1f; + nZoom += (ZoomStart.X - MousePos.X) * ZoomSpeed; + + if (nZoom < targetMinDistance) // jox: fixed bug: bounce back when zooming to close + nZoom = targetMinDistance; + } + } + else if (Zooming) + { + const f32 old = CurrentZoom; + CurrentZoom = CurrentZoom + (ZoomStart.X - MousePos.X ) * ZoomSpeed; + nZoom = CurrentZoom; + + if (nZoom < 0) + nZoom = CurrentZoom = old; + Zooming = false; + } + + // Translation --------------------------------- + + core::vector3df translate(OldTarget); + const core::vector3df upVector(camera->getUpVector()); + const core::vector3df target = camera->getTarget(); + + core::vector3df pos = camera->getPosition(); + core::vector3df tvectX = pos - target; + tvectX = tvectX.crossProduct(upVector); + tvectX.normalize(); + + const SViewFrustum* const va = camera->getViewFrustum(); + core::vector3df tvectY = (va->getFarLeftDown() - va->getFarRightDown()); + tvectY = tvectY.crossProduct(upVector.Y > 0 ? pos - target : target - pos); + tvectY.normalize(); + + if (isMouseKeyDown(2) && !Zooming) + { + if (!Translating) + { + TranslateStart = MousePos; + Translating = true; + } + else + { + translate += tvectX * (TranslateStart.X - MousePos.X)*TranslateSpeed + + tvectY * (TranslateStart.Y - MousePos.Y)*TranslateSpeed; + } + } + else if (Translating) + { + translate += tvectX * (TranslateStart.X - MousePos.X)*TranslateSpeed + + tvectY * (TranslateStart.Y - MousePos.Y)*TranslateSpeed; + OldTarget = translate; + Translating = false; + } + + // Rotation ------------------------------------ + + if (isMouseKeyDown(0) && !Zooming) + { + if (!Rotating) + { + RotateStart = MousePos; + Rotating = true; + nRotX = RotX; + nRotY = RotY; + } + else + { + nRotX += (RotateStart.X - MousePos.X) * RotateSpeed; + nRotY += (RotateStart.Y - MousePos.Y) * RotateSpeed; + } + } + else if (Rotating) + { + RotX += (RotateStart.X - MousePos.X) * RotateSpeed; + RotY += (RotateStart.Y - MousePos.Y) * RotateSpeed; + nRotX = RotX; + nRotY = RotY; + Rotating = false; + } + + // Set pos ------------------------------------ + + pos = translate; + pos.X += nZoom; + + pos.rotateXYBy(nRotY, translate); + pos.rotateXZBy(-nRotX, translate); + + camera->setPosition(pos); + camera->setTarget(translate); + + // Rotation Error ---------------------------- + + // jox: fixed bug: jitter when rotating to the top and bottom of y + pos.set(0,1,0); + pos.rotateXYBy(-nRotY); + pos.rotateXZBy(-nRotX+180.f); + camera->setUpVector(pos); + LastCameraTarget = camera->getTarget(); +} + + +bool CSceneNodeAnimatorCameraMaya::isMouseKeyDown(s32 key) const +{ + return MouseKeys[key]; +} + + +void CSceneNodeAnimatorCameraMaya::allKeysUp() +{ + for (s32 i=0; i<3; ++i) + MouseKeys[i] = false; +} + + +//! Sets the rotation speed +void CSceneNodeAnimatorCameraMaya::setRotateSpeed(f32 speed) +{ + RotateSpeed = speed; +} + + +//! Sets the movement speed +void CSceneNodeAnimatorCameraMaya::setMoveSpeed(f32 speed) +{ + TranslateSpeed = speed; +} + + +//! Sets the zoom speed +void CSceneNodeAnimatorCameraMaya::setZoomSpeed(f32 speed) +{ + ZoomSpeed = speed; +} + + +//! Set the distance +void CSceneNodeAnimatorCameraMaya::setDistance(f32 distance) +{ + CurrentZoom=distance; +} + + +//! Gets the rotation speed +f32 CSceneNodeAnimatorCameraMaya::getRotateSpeed() const +{ + return RotateSpeed; +} + + +// Gets the movement speed +f32 CSceneNodeAnimatorCameraMaya::getMoveSpeed() const +{ + return TranslateSpeed; +} + + +//! Gets the zoom speed +f32 CSceneNodeAnimatorCameraMaya::getZoomSpeed() const +{ + return ZoomSpeed; +} + + +//! Returns the current distance, i.e. orbit radius +f32 CSceneNodeAnimatorCameraMaya::getDistance() const +{ + return CurrentZoom; +} + + +ISceneNodeAnimator* CSceneNodeAnimatorCameraMaya::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorCameraMaya * newAnimator = + new CSceneNodeAnimatorCameraMaya(CursorControl, RotateSpeed, ZoomSpeed, TranslateSpeed); + return newAnimator; +} + +} // end namespace +} // end namespace + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h new file mode 100644 index 0000000..495a77b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h @@ -0,0 +1,116 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__ + +#include "ISceneNodeAnimatorCameraMaya.h" +#include "ICameraSceneNode.h" +#include "vector2d.h" + +namespace irr +{ + +namespace gui +{ + class ICursorControl; +} + +namespace scene +{ + + //! Special scene node animator for FPS cameras + /** This scene node animator can be attached to a camera to make it act + like a 3d modelling tool camera + */ + class CSceneNodeAnimatorCameraMaya : public ISceneNodeAnimatorCameraMaya + { + public: + //! Constructor + CSceneNodeAnimatorCameraMaya(gui::ICursorControl* cursor, f32 rotateSpeed = -1500.f, + f32 zoomSpeed = 200.f, f32 translationSpeed = 1500.f, f32 distance=70.f); + + //! Destructor + virtual ~CSceneNodeAnimatorCameraMaya(); + + //! Animates the scene node, currently only works on cameras + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Event receiver + virtual bool OnEvent(const SEvent& event); + + //! Returns the speed of movement in units per millisecond + virtual f32 getMoveSpeed() const; + + //! Sets the speed of movement in units per millisecond + virtual void setMoveSpeed(f32 moveSpeed); + + //! Returns the rotation speed + virtual f32 getRotateSpeed() const; + + //! Set the rotation speed + virtual void setRotateSpeed(f32 rotateSpeed); + + //! Returns the zoom speed + virtual f32 getZoomSpeed() const; + + //! Set the zoom speed + virtual void setZoomSpeed(f32 zoomSpeed); + + //! Returns the current distance, i.e. orbit radius + virtual f32 getDistance() const; + + //! Set the distance + virtual void setDistance(f32 distance); + + //! This animator will receive events when attached to the active camera + virtual bool isEventReceiverEnabled() const + { + return true; + } + + //! Returns type of the scene node + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const + { + return ESNAT_CAMERA_MAYA; + } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling + this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + + void allKeysUp(); + void animate(); + bool isMouseKeyDown(s32 key) const; + + bool MouseKeys[3]; + + gui::ICursorControl *CursorControl; + scene::ICameraSceneNode* OldCamera; + core::vector3df OldTarget; + core::vector3df LastCameraTarget; // to find out if the camera target was moved outside this animator + core::position2df RotateStart; + core::position2df ZoomStart; + core::position2df TranslateStart; + core::position2df MousePos; + f32 ZoomSpeed; + f32 RotateSpeed; + f32 TranslateSpeed; + f32 CurrentZoom; + f32 RotX, RotY; + bool Zooming; + bool Rotating; + bool Moving; + bool Translating; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp new file mode 100644 index 0000000..432d2ac --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp @@ -0,0 +1,303 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorCollisionResponse.h" +#include "ISceneCollisionManager.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSceneNodeAnimatorCollisionResponse::CSceneNodeAnimatorCollisionResponse( + ISceneManager* scenemanager, + ITriangleSelector* world, ISceneNode* object, + const core::vector3df& ellipsoidRadius, + const core::vector3df& gravityPerSecond, + const core::vector3df& ellipsoidTranslation, + f32 slidingSpeed) +: Radius(ellipsoidRadius), Gravity(gravityPerSecond), Translation(ellipsoidTranslation), + World(world), Object(object), SceneManager(scenemanager), LastTime(0), + SlidingSpeed(slidingSpeed), CollisionNode(0), CollisionCallback(0), + Falling(false), IsCamera(false), AnimateCameraTarget(true), CollisionOccurred(false), + FirstUpdate(true) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorCollisionResponse"); + #endif + + if (World) + World->grab(); + + setNode(Object); +} + + +//! destructor +CSceneNodeAnimatorCollisionResponse::~CSceneNodeAnimatorCollisionResponse() +{ + if (World) + World->drop(); + + if (CollisionCallback) + CollisionCallback->drop(); +} + + +//! Returns if the attached scene node is falling, which means that +//! there is no blocking wall from the scene node in the direction of +//! the gravity. +bool CSceneNodeAnimatorCollisionResponse::isFalling() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Falling; +} + + +//! Sets the radius of the ellipsoid with which collision detection and +//! response is done. +void CSceneNodeAnimatorCollisionResponse::setEllipsoidRadius( + const core::vector3df& radius) +{ + Radius = radius; + FirstUpdate = true; +} + + +//! Returns the radius of the ellipsoid with wich the collision detection and +//! response is done. +core::vector3df CSceneNodeAnimatorCollisionResponse::getEllipsoidRadius() const +{ + return Radius; +} + + +//! Sets the gravity of the environment. +void CSceneNodeAnimatorCollisionResponse::setGravity(const core::vector3df& gravity) +{ + Gravity = gravity; + FirstUpdate = true; +} + + +//! Returns current vector of gravity. +core::vector3df CSceneNodeAnimatorCollisionResponse::getGravity() const +{ + return Gravity; +} + + +//! 'Jump' the animator, by adding a jump speed opposite to its gravity +void CSceneNodeAnimatorCollisionResponse::jump(f32 jumpSpeed) +{ + FallingVelocity -= (core::vector3df(Gravity).normalize()) * jumpSpeed; + Falling = true; +} + + +//! Sets the translation of the ellipsoid for collision detection. +void CSceneNodeAnimatorCollisionResponse::setEllipsoidTranslation(const core::vector3df &translation) +{ + Translation = translation; +} + + +//! Returns the translation of the ellipsoid for collision detection. +core::vector3df CSceneNodeAnimatorCollisionResponse::getEllipsoidTranslation() const +{ + return Translation; +} + + +//! Sets a triangle selector holding all triangles of the world with which +//! the scene node may collide. +void CSceneNodeAnimatorCollisionResponse::setWorld(ITriangleSelector* newWorld) +{ + if (newWorld) + newWorld->grab(); + + if (World) + World->drop(); + + World = newWorld; + + FirstUpdate = true; +} + + +//! Returns the current triangle selector containing all triangles for +//! collision detection. +ITriangleSelector* CSceneNodeAnimatorCollisionResponse::getWorld() const +{ + return World; +} + + +void CSceneNodeAnimatorCollisionResponse::animateNode(ISceneNode* node, u32 timeMs) +{ + CollisionOccurred = false; + + if (node != Object) + setNode(node); + + if(!Object || !World) + return; + + // trigger reset + if ( timeMs == 0 ) + { + FirstUpdate = true; + timeMs = LastTime; + } + + if ( FirstUpdate ) + { + LastPosition = Object->getPosition(); + Falling = false; + LastTime = timeMs; + FallingVelocity.set ( 0, 0, 0 ); + + FirstUpdate = false; + } + + const u32 diff = timeMs - LastTime; + LastTime = timeMs; + + CollisionResultPosition = Object->getPosition(); + core::vector3df vel = CollisionResultPosition - LastPosition; + + FallingVelocity += Gravity * (f32)diff * 0.001f; + + CollisionTriangle = RefTriangle; + CollisionPoint = core::vector3df(); + CollisionResultPosition = core::vector3df(); + CollisionNode = 0; + + // core::vector3df force = vel + FallingVelocity; + + if ( AnimateCameraTarget ) + { + // TODO: divide SlidingSpeed by frame time + + bool f = false; + CollisionResultPosition + = SceneManager->getSceneCollisionManager()->getCollisionResultPosition( + World, LastPosition-Translation, + Radius, vel, CollisionTriangle, CollisionPoint, f, + CollisionNode, SlidingSpeed, FallingVelocity); + + CollisionOccurred = (CollisionTriangle != RefTriangle); + + CollisionResultPosition += Translation; + + if (f)//CollisionTriangle == RefTriangle) + { + Falling = true; + } + else + { + Falling = false; + FallingVelocity.set(0, 0, 0); + } + + bool collisionConsumed = false; + + if (CollisionOccurred && CollisionCallback) + collisionConsumed = CollisionCallback->onCollision(*this); + + if(!collisionConsumed) + Object->setPosition(CollisionResultPosition); + } + + // move camera target + if (AnimateCameraTarget && IsCamera) + { + const core::vector3df pdiff = Object->getPosition() - LastPosition - vel; + ICameraSceneNode* cam = (ICameraSceneNode*)Object; + cam->setTarget(cam->getTarget() + pdiff); + } + + LastPosition = Object->getPosition(); +} + + +void CSceneNodeAnimatorCollisionResponse::setNode(ISceneNode* node) +{ + Object = node; + + if (Object) + { + LastPosition = Object->getPosition(); + IsCamera = (Object->getType() == ESNT_CAMERA); + } + + LastTime = os::Timer::getTime(); +} + + +//! Writes attributes of the scene node animator. +void CSceneNodeAnimatorCollisionResponse::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Radius", Radius); + out->addVector3d("Gravity", Gravity); + out->addVector3d("Translation", Translation); + out->addBool("AnimateCameraTarget", AnimateCameraTarget); +} + + +//! Reads attributes of the scene node animator. +void CSceneNodeAnimatorCollisionResponse::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Radius = in->getAttributeAsVector3d("Radius"); + Gravity = in->getAttributeAsVector3d("Gravity"); + Translation = in->getAttributeAsVector3d("Translation"); + AnimateCameraTarget = in->getAttributeAsBool("AnimateCameraTarget"); +} + + +ISceneNodeAnimator* CSceneNodeAnimatorCollisionResponse::createClone(ISceneNode* node, ISceneManager* newManager) +{ + if (!newManager) newManager = SceneManager; + + CSceneNodeAnimatorCollisionResponse * newAnimator = + new CSceneNodeAnimatorCollisionResponse(newManager, World, Object, Radius, + (Gravity * 1000.0f), Translation, SlidingSpeed); + + return newAnimator; +} + +void CSceneNodeAnimatorCollisionResponse::setCollisionCallback(ICollisionCallback* callback) +{ + if ( CollisionCallback == callback ) + return; + + if (CollisionCallback) + CollisionCallback->drop(); + + CollisionCallback = callback; + + if (CollisionCallback) + CollisionCallback->grab(); +} + +//! Should the Target react on collision ( default = true ) +void CSceneNodeAnimatorCollisionResponse::setAnimateTarget ( bool enable ) +{ + AnimateCameraTarget = enable; + FirstUpdate = true; +} + +//! Should the Target react on collision ( default = true ) +bool CSceneNodeAnimatorCollisionResponse::getAnimateTarget () const +{ + return AnimateCameraTarget; +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h new file mode 100644 index 0000000..42ff71a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h @@ -0,0 +1,157 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__ + +#include "ISceneNodeAnimatorCollisionResponse.h" + +namespace irr +{ +namespace scene +{ + + //! Special scene node animator for doing automatic collision detection and response. + /** This scene node animator can be attached to any scene node modifying it in that + way, that it cannot move through walls of the world, is influenced by gravity and + acceleration. This animator is useful for example for first person shooter + games. Attach it for example to a first person shooter camera, and the camera will + behave as the player control in a first person shooter game: The camera stops and + slides at walls, walks up stairs, falls down if there is no floor under it, and so on. + */ + class CSceneNodeAnimatorCollisionResponse : public ISceneNodeAnimatorCollisionResponse + { + public: + + //! constructor + CSceneNodeAnimatorCollisionResponse(ISceneManager* scenemanager, + ITriangleSelector* world, ISceneNode* object, + const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30), + const core::vector3df& gravityPerSecond = core::vector3df(0,-100.0f,0), + const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0), + f32 slidingSpeed = 0.0005f); + + //! destructor + virtual ~CSceneNodeAnimatorCollisionResponse(); + + //! Returns if the attached scene node is falling, which means that + //! there is no blocking wall from the scene node in the direction of + //! the gravity. + virtual bool isFalling() const; + + //! Sets the radius of the ellipsoid with which collision detection and + //! response is done. + virtual void setEllipsoidRadius(const core::vector3df& radius); + + //! Returns the radius of the ellipsoid with which the collision detection and + //! response is done. + virtual core::vector3df getEllipsoidRadius() const; + + //! Sets the gravity of the environment. + virtual void setGravity(const core::vector3df& gravity); + + //! 'Jump' the animator, by adding a jump speed opposite to its gravity + virtual void jump(f32 jumpSpeed); + + //! Should the Target react on collision ( default = true ) + virtual void setAnimateTarget ( bool enable ); + virtual bool getAnimateTarget () const; + + //! Returns current vector of gravity. + virtual core::vector3df getGravity() const; + + //! Sets the translation of the ellipsoid for collision detection. + virtual void setEllipsoidTranslation(const core::vector3df &translation); + + //! Returns the translation of the ellipsoid for collision detection. + virtual core::vector3df getEllipsoidTranslation() const; + + //! Sets a triangle selector holding all triangles of the world with which + //! the scene node may collide. + virtual void setWorld(ITriangleSelector* newWorld); + + //! Returns the current triangle selector containing all triangles for + //! collision detection. + virtual ITriangleSelector* getWorld() const; + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Writes attributes of the scene node animator. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node animator. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_COLLISION_RESPONSE; } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling + this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + //! Set the single node that this animator will act on. + virtual void setTargetNode(ISceneNode * node) { setNode(node); } + + //! Gets the single node that this animator is acting on. + virtual ISceneNode* getTargetNode(void) const { return Object; } + + //! Returns true if a collision occurred during the last animateNode() + virtual bool collisionOccurred() const { return CollisionOccurred; } + + //! Returns the last point of collision. + virtual const core::vector3df & getCollisionPoint() const { return CollisionPoint; } + + //! Returns the last triangle that caused a collision. + virtual const core::triangle3df & getCollisionTriangle() const { return CollisionTriangle; } + + virtual const core::vector3df & getCollisionResultPosition(void) const { return CollisionResultPosition; } + + virtual ISceneNode* getCollisionNode(void) const { return CollisionNode; } + + + //! Sets a callback interface which will be called if a collision occurs. + /** \param callback: collision callback handler that will be called when a collision + occurs. Set this to 0 to disable the callback. + */ + virtual void setCollisionCallback(ICollisionCallback* callback); + + private: + + void setNode(ISceneNode* node); + + core::vector3df Radius; + core::vector3df Gravity; + core::vector3df Translation; + core::vector3df FallingVelocity; // In the direction of Gravity. + + core::vector3df LastPosition; + core::triangle3df RefTriangle; + + ITriangleSelector* World; + ISceneNode* Object; + ISceneManager* SceneManager; + u32 LastTime; + f32 SlidingSpeed; + + core::vector3df CollisionPoint; + core::triangle3df CollisionTriangle; + core::vector3df CollisionResultPosition; + ISceneNode * CollisionNode; + ICollisionCallback* CollisionCallback; + + bool Falling; + bool IsCamera; + bool AnimateCameraTarget; + bool CollisionOccurred; + bool FirstUpdate; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.cpp new file mode 100644 index 0000000..2ef584d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.cpp @@ -0,0 +1,51 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorDelete.h" +#include "ISceneManager.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSceneNodeAnimatorDelete::CSceneNodeAnimatorDelete(ISceneManager* manager, u32 time) +: ISceneNodeAnimatorFinishing(time), SceneManager(manager) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorDelete"); + #endif +} + + +//! animates a scene node +void CSceneNodeAnimatorDelete::animateNode(ISceneNode* node, u32 timeMs) +{ + if (timeMs > FinishTime) + { + HasFinished = true; + if(node && SceneManager) + { + // don't delete if scene manager is attached to an editor + if (!SceneManager->getParameters()->getAttributeAsBool(IRR_SCENE_MANAGER_IS_EDITOR)) + SceneManager->addToDeletionQueue(node); + } + } +} + + +ISceneNodeAnimator* CSceneNodeAnimatorDelete::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorDelete * newAnimator = + new CSceneNodeAnimatorDelete(SceneManager, FinishTime); + + return newAnimator; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.h new file mode 100644 index 0000000..f62848f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorDelete.h @@ -0,0 +1,46 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ + +#include "ISceneNodeAnimatorFinishing.h" + +namespace irr +{ +namespace scene +{ + class CSceneNodeAnimatorDelete : public ISceneNodeAnimatorFinishing + { + public: + + //! constructor + CSceneNodeAnimatorDelete(ISceneManager* manager, u32 when); + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const + { + return ESNAT_DELETION; + } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling + this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + + ISceneManager* SceneManager; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp new file mode 100644 index 0000000..dc887fa --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp @@ -0,0 +1,100 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorFlyCircle.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSceneNodeAnimatorFlyCircle::CSceneNodeAnimatorFlyCircle(u32 time, + const core::vector3df& center, f32 radius, f32 speed, + const core::vector3df& direction, f32 radiusEllipsoid) + : Center(center), Direction(direction), Radius(radius), + RadiusEllipsoid(radiusEllipsoid), Speed(speed), StartTime(time) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorFlyCircle"); + #endif + init(); +} + + +void CSceneNodeAnimatorFlyCircle::init() +{ + Direction.normalize(); + + if (Direction.Y != 0) + VecV = core::vector3df(50,0,0).crossProduct(Direction).normalize(); + else + VecV = core::vector3df(0,50,0).crossProduct(Direction).normalize(); + VecU = VecV.crossProduct(Direction).normalize(); +} + + +//! animates a scene node +void CSceneNodeAnimatorFlyCircle::animateNode(ISceneNode* node, u32 timeMs) +{ + if ( 0 == node ) + return; + + f32 time; + + // Check for the condition where the StartTime is in the future. + if(StartTime > timeMs) + time = ((s32)timeMs - (s32)StartTime) * Speed; + else + time = (timeMs-StartTime) * Speed; + +// node->setPosition(Center + Radius * ((VecU*cosf(time)) + (VecV*sinf(time)))); + f32 r2 = RadiusEllipsoid == 0.f ? Radius : RadiusEllipsoid; + node->setPosition(Center + (Radius*cosf(time)*VecU) + (r2*sinf(time)*VecV ) ); +} + + +//! Writes attributes of the scene node animator. +void CSceneNodeAnimatorFlyCircle::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Center", Center); + out->addFloat("Radius", Radius); + out->addFloat("Speed", Speed); + out->addVector3d("Direction", Direction); + out->addFloat("RadiusEllipsoid", RadiusEllipsoid); +} + + +//! Reads attributes of the scene node animator. +void CSceneNodeAnimatorFlyCircle::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Center = in->getAttributeAsVector3d("Center"); + Radius = in->getAttributeAsFloat("Radius"); + Speed = in->getAttributeAsFloat("Speed"); + Direction = in->getAttributeAsVector3d("Direction"); + StartTime = 0; + + if (Direction.equals(core::vector3df(0,0,0))) + Direction.set(0,1,0); // irrlicht 1.1 backwards compatibility + else + Direction.normalize(); + + RadiusEllipsoid = in->getAttributeAsFloat("RadiusEllipsoid"); + init(); +} + + +ISceneNodeAnimator* CSceneNodeAnimatorFlyCircle::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorFlyCircle * newAnimator = + new CSceneNodeAnimatorFlyCircle(StartTime, Center, Radius, Speed, Direction, RadiusEllipsoid); + + return newAnimator; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h new file mode 100644 index 0000000..c17b036 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h @@ -0,0 +1,64 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + class CSceneNodeAnimatorFlyCircle : public ISceneNodeAnimator + { + public: + + //! constructor + CSceneNodeAnimatorFlyCircle(u32 time, + const core::vector3df& center, f32 radius, + f32 speed, const core::vector3df& direction, + f32 radiusEllipsoid); + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Writes attributes of the scene node animator. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node animator. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_CIRCLE; } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling + this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + // do some initial calculations + void init(); + + // circle center + core::vector3df Center; + // up-vector, normal to the circle's plane + core::vector3df Direction; + // Two helper vectors + core::vector3df VecU; + core::vector3df VecV; + f32 Radius; + f32 RadiusEllipsoid; + f32 Speed; + u32 StartTime; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp new file mode 100644 index 0000000..28730b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp @@ -0,0 +1,112 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorFlyStraight.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3df& startPoint, + const core::vector3df& endPoint, u32 timeForWay, + bool loop, u32 now, bool pingpong) +: ISceneNodeAnimatorFinishing(now + timeForWay), + Start(startPoint), End(endPoint), TimeFactor(0.0f), StartTime(now), + TimeForWay(timeForWay), Loop(loop), PingPong(pingpong) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorFlyStraight"); + #endif + + recalculateIntermediateValues(); +} + + +void CSceneNodeAnimatorFlyStraight::recalculateIntermediateValues() +{ + Vector = End - Start; + TimeFactor = (f32)Vector.getLength() / TimeForWay; + Vector.normalize(); +} + + +//! animates a scene node +void CSceneNodeAnimatorFlyStraight::animateNode(ISceneNode* node, u32 timeMs) +{ + if (!node) + return; + + u32 t = (timeMs-StartTime); + + core::vector3df pos; + + if (!Loop && !PingPong && t >= TimeForWay) + { + pos = End; + HasFinished = true; + } + else if (!Loop && PingPong && t >= TimeForWay * 2.f ) + { + pos = Start; + HasFinished = true; + } + else + { + f32 phase = fmodf( (f32) t, (f32) TimeForWay ); + core::vector3df rel = Vector * phase * TimeFactor; + const bool pong = PingPong && fmodf( (f32) t, (f32) TimeForWay*2.f ) >= TimeForWay; + + if ( !pong ) + { + pos += Start + rel; + } + else + { + pos = End - rel; + } + } + + node->setPosition(pos); +} + + +//! Writes attributes of the scene node animator. +void CSceneNodeAnimatorFlyStraight::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Start", Start); + out->addVector3d("End", End); + out->addInt("TimeForWay", TimeForWay); + out->addBool("Loop", Loop); + out->addBool("PingPong", PingPong); +} + + +//! Reads attributes of the scene node animator. +void CSceneNodeAnimatorFlyStraight::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Start = in->getAttributeAsVector3d("Start"); + End = in->getAttributeAsVector3d("End"); + TimeForWay = in->getAttributeAsInt("TimeForWay"); + Loop = in->getAttributeAsBool("Loop"); + PingPong = in->getAttributeAsBool("PingPong"); + + recalculateIntermediateValues(); +} + + +ISceneNodeAnimator* CSceneNodeAnimatorFlyStraight::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorFlyStraight * newAnimator = + new CSceneNodeAnimatorFlyStraight(Start, End, TimeForWay, Loop, StartTime, PingPong); + + return newAnimator; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h new file mode 100644 index 0000000..7a7fe81 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h @@ -0,0 +1,60 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ + +#include "ISceneNodeAnimatorFinishing.h" + +namespace irr +{ +namespace scene +{ + class CSceneNodeAnimatorFlyStraight : public ISceneNodeAnimatorFinishing + { + public: + + //! constructor + CSceneNodeAnimatorFlyStraight(const core::vector3df& startPoint, + const core::vector3df& endPoint, + u32 timeForWay, + bool loop, u32 now, bool pingpong); + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Writes attributes of the scene node animator. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node animator. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_STRAIGHT; } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + + void recalculateIntermediateValues(); + + core::vector3df Start; + core::vector3df End; + core::vector3df Vector; + f32 TimeFactor; + u32 StartTime; + u32 TimeForWay; + bool Loop; + bool PingPong; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp new file mode 100644 index 0000000..efc7493 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp @@ -0,0 +1,161 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorFollowSpline.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSceneNodeAnimatorFollowSpline::CSceneNodeAnimatorFollowSpline(u32 time, + const core::array<core::vector3df>& points, f32 speed, + f32 tightness, bool loop, bool pingpong) +: ISceneNodeAnimatorFinishing(0), Points(points), Speed(speed), Tightness(tightness), StartTime(time) +, Loop(loop), PingPong(pingpong) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorFollowSpline"); + #endif +} + + +inline s32 CSceneNodeAnimatorFollowSpline::clamp(s32 idx, s32 size) +{ + return ( idx<0 ? size+idx : ( idx>=size ? idx-size : idx ) ); +} + + +//! animates a scene node +void CSceneNodeAnimatorFollowSpline::animateNode(ISceneNode* node, u32 timeMs) +{ + if(!node) + return; + + const u32 pSize = Points.size(); + if (pSize==0) + { + if ( !Loop ) + HasFinished = true; + return; + } + if (pSize==1) + { + if ( timeMs > StartTime ) + { + node->setPosition(Points[0]); + if ( !Loop ) + HasFinished = true; + } + return; + } + + const f32 dt = ( (timeMs-StartTime) * Speed * 0.001f ); + const s32 unwrappedIdx = core::floor32( dt ); + if ( !Loop && unwrappedIdx >= (s32)pSize-1 ) + { + node->setPosition(Points[pSize-1]); + HasFinished = true; + return; + } + const bool pong = PingPong && (unwrappedIdx/(pSize-1))%2; + const f32 u = pong ? 1.f-core::fract ( dt ) : core::fract ( dt ); + const s32 idx = pong ? (pSize-2) - (unwrappedIdx % (pSize-1)) + : (PingPong ? unwrappedIdx % (pSize-1) + : unwrappedIdx % pSize); + //const f32 u = 0.001f * fmodf( dt, 1000.0f ); + + const core::vector3df& p0 = Points[ clamp( idx - 1, pSize ) ]; + const core::vector3df& p1 = Points[ clamp( idx + 0, pSize ) ]; // starting point + const core::vector3df& p2 = Points[ clamp( idx + 1, pSize ) ]; // end point + const core::vector3df& p3 = Points[ clamp( idx + 2, pSize ) ]; + + // hermite polynomials + const f32 h1 = 2.0f * u * u * u - 3.0f * u * u + 1.0f; + const f32 h2 = -2.0f * u * u * u + 3.0f * u * u; + const f32 h3 = u * u * u - 2.0f * u * u + u; + const f32 h4 = u * u * u - u * u; + + // tangents + const core::vector3df t1 = ( p2 - p0 ) * Tightness; + const core::vector3df t2 = ( p3 - p1 ) * Tightness; + + // interpolated point + node->setPosition(p1 * h1 + p2 * h2 + t1 * h3 + t2 * h4); +} + + +//! Writes attributes of the scene node animator. +void CSceneNodeAnimatorFollowSpline::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addFloat("Speed", Speed); + out->addFloat("Tightness", Tightness); + out->addBool("Loop", Loop); + out->addBool("PingPong", PingPong); + + u32 count = Points.size(); + + if ( options && (options->Flags & io::EARWF_FOR_EDITOR)) + { + // add one point in addition when serializing for editors + // to make it easier to add points quickly + count += 1; + } + + for (u32 i=0; i<count; ++i) + { + core::stringc tname = "Point"; + tname += (int)(i+1); + + out->addVector3d(tname.c_str(), i<Points.size() ? Points[i] : core::vector3df(0,0,0) ); + } +} + + +//! Reads attributes of the scene node animator. +void CSceneNodeAnimatorFollowSpline::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Speed = in->getAttributeAsFloat("Speed"); + Tightness = in->getAttributeAsFloat("Tightness"); + Loop = in->getAttributeAsBool("Loop"); + PingPong = in->getAttributeAsBool("PingPong"); + Points.clear(); + + for(u32 i=1; true; ++i) + { + core::stringc pname = "Point"; + pname += i; + + if (in->existsAttribute(pname.c_str())) + Points.push_back(in->getAttributeAsVector3d(pname.c_str())); + else + break; + } + + // remove last point if double entry from editor + if ( options && (options->Flags & io::EARWF_FOR_EDITOR) && + Points.size() > 2 && Points.getLast() == core::vector3df(0,0,0)) + { + Points.erase(Points.size()-1); + + if (Points.size() > 2 && Points.getLast() == core::vector3df(0,0,0)) + Points.erase(Points.size()-1); + } +} + + +ISceneNodeAnimator* CSceneNodeAnimatorFollowSpline::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorFollowSpline * newAnimator = + new CSceneNodeAnimatorFollowSpline(StartTime, Points, Speed, Tightness); + + return newAnimator; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h new file mode 100644 index 0000000..a202328 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h @@ -0,0 +1,63 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "irrArray.h" +#include "ISceneNodeAnimatorFinishing.h" + +namespace irr +{ +namespace scene +{ + //! Scene node animator based free code Matthias Gall wrote and sent in. (Most of + //! this code is written by him, I only modified bits.) + class CSceneNodeAnimatorFollowSpline : public ISceneNodeAnimatorFinishing + { + public: + + //! constructor + CSceneNodeAnimatorFollowSpline(u32 startTime, + const core::array< core::vector3df >& points, + f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false); + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Writes attributes of the scene node animator. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node animator. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FOLLOW_SPLINE; } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling + this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + protected: + + //! clamps a the value idx to fit into range 0..size-1 + s32 clamp(s32 idx, s32 size); + + core::array< core::vector3df > Points; + f32 Speed; + f32 Tightness; + u32 StartTime; + bool Loop; + bool PingPong; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.cpp new file mode 100644 index 0000000..f3c5473 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.cpp @@ -0,0 +1,73 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorRotation.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSceneNodeAnimatorRotation::CSceneNodeAnimatorRotation(u32 time, const core::vector3df& rotation) +: Rotation(rotation), StartTime(time) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorRotation"); + #endif +} + + +//! animates a scene node +void CSceneNodeAnimatorRotation::animateNode(ISceneNode* node, u32 timeMs) +{ + if (node) // thanks to warui for this fix + { + const u32 diffTime = timeMs - StartTime; + + if (diffTime != 0) + { + // clip the rotation to small values, to avoid + // precision problems with huge floats. + core::vector3df rot = node->getRotation() + Rotation*(diffTime*0.1f); + if (rot.X>360.f) + rot.X=fmodf(rot.X, 360.f); + if (rot.Y>360.f) + rot.Y=fmodf(rot.Y, 360.f); + if (rot.Z>360.f) + rot.Z=fmodf(rot.Z, 360.f); + node->setRotation(rot); + StartTime=timeMs; + } + } +} + + +//! Writes attributes of the scene node animator. +void CSceneNodeAnimatorRotation::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addVector3d("Rotation", Rotation); +} + + +//! Reads attributes of the scene node animator. +void CSceneNodeAnimatorRotation::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + Rotation = in->getAttributeAsVector3d("Rotation"); +} + + +ISceneNodeAnimator* CSceneNodeAnimatorRotation::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorRotation * newAnimator = + new CSceneNodeAnimatorRotation(StartTime, Rotation); + + return newAnimator; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.h new file mode 100644 index 0000000..aa26c66 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorRotation.h @@ -0,0 +1,49 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + class CSceneNodeAnimatorRotation : public ISceneNodeAnimator + { + public: + + //! constructor + CSceneNodeAnimatorRotation(u32 time, const core::vector3df& rotation); + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Writes attributes of the scene node animator. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node animator. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_ROTATION; } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + + core::vector3df Rotation; + u32 StartTime; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.cpp new file mode 100644 index 0000000..1cedf3d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.cpp @@ -0,0 +1,140 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSceneNodeAnimatorTexture.h" +#include "ITexture.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSceneNodeAnimatorTexture::CSceneNodeAnimatorTexture(const core::array<video::ITexture*>& textures, + s32 timePerFrame, bool loop, u32 now) +: ISceneNodeAnimatorFinishing(0), + TimePerFrame(timePerFrame), StartTime(now), Loop(loop) +{ + #ifdef _DEBUG + setDebugName("CSceneNodeAnimatorTexture"); + #endif + + for (u32 i=0; i<textures.size(); ++i) + { + if (textures[i]) + textures[i]->grab(); + + Textures.push_back(textures[i]); + } + + FinishTime = now + (timePerFrame * Textures.size()); +} + + +//! destructor +CSceneNodeAnimatorTexture::~CSceneNodeAnimatorTexture() +{ + clearTextures(); +} + + +void CSceneNodeAnimatorTexture::clearTextures() +{ + for (u32 i=0; i<Textures.size(); ++i) + if (Textures[i]) + Textures[i]->drop(); +} + + +//! animates a scene node +void CSceneNodeAnimatorTexture::animateNode(ISceneNode* node, u32 timeMs) +{ + if(!node) + return; + + if (Textures.size()) + { + const u32 t = (timeMs-StartTime); + + u32 idx = 0; + if (!Loop && timeMs >= FinishTime) + { + idx = Textures.size() - 1; + HasFinished = true; + } + else + { + idx = (t/TimePerFrame) % Textures.size(); + } + + if (idx < Textures.size()) + node->setMaterialTexture(0, Textures[idx]); + } +} + + +//! Writes attributes of the scene node animator. +void CSceneNodeAnimatorTexture::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addInt("TimePerFrame", TimePerFrame); + out->addBool("Loop", Loop); + + // add one texture in addition when serializing for editors + // to make it easier to add textures quickly + + u32 count = Textures.size(); + if ( options && (options->Flags & io::EARWF_FOR_EDITOR)) + count += 1; + + for (u32 i=0; i<count; ++i) + { + core::stringc tname = "Texture"; + tname += (int)(i+1); + + out->addTexture(tname.c_str(), i<Textures.size() ? Textures[i] : 0); + } +} + + +//! Reads attributes of the scene node animator. +void CSceneNodeAnimatorTexture::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + TimePerFrame = in->getAttributeAsInt("TimePerFrame"); + Loop = in->getAttributeAsBool("Loop"); + + clearTextures(); + + for(u32 i=1; true; ++i) + { + core::stringc tname = "Texture"; + tname += (int)i; + + if (in->existsAttribute(tname.c_str())) + { + video::ITexture* tex = in->getAttributeAsTexture(tname.c_str()); + if (tex) + { + tex->grab(); + Textures.push_back(tex); + } + } + else + break; + } +} + + +ISceneNodeAnimator* CSceneNodeAnimatorTexture::createClone(ISceneNode* node, ISceneManager* newManager) +{ + CSceneNodeAnimatorTexture * newAnimator = + new CSceneNodeAnimatorTexture(Textures, TimePerFrame, Loop, StartTime); + + return newAnimator; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.h new file mode 100644 index 0000000..a27eef0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSceneNodeAnimatorTexture.h @@ -0,0 +1,59 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ +#define __C_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ + +#include "irrArray.h" +#include "ISceneNodeAnimatorFinishing.h" + +namespace irr +{ +namespace scene +{ + class CSceneNodeAnimatorTexture : public ISceneNodeAnimatorFinishing + { + public: + + //! constructor + CSceneNodeAnimatorTexture(const core::array<video::ITexture*>& textures, + s32 timePerFrame, bool loop, u32 now); + + //! destructor + virtual ~CSceneNodeAnimatorTexture(); + + //! animates a scene node + virtual void animateNode(ISceneNode* node, u32 timeMs); + + //! Writes attributes of the scene node animator. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node animator. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Returns type of the scene node animator + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_TEXTURE; } + + //! Creates a clone of this animator. + /** Please note that you will have to drop + (IReferenceCounted::drop()) the returned pointer after calling + this. */ + virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); + + private: + + void clearTextures(); + + core::array<video::ITexture*> Textures; + u32 TimePerFrame; + u32 StartTime; + bool Loop; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.cpp new file mode 100644 index 0000000..55c802a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.cpp @@ -0,0 +1,419 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CShadowVolumeSceneNode.h" +#include "ISceneManager.h" +#include "IMesh.h" +#include "IVideoDriver.h" +#include "ICameraSceneNode.h" +#include "SViewFrustum.h" +#include "SLight.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CShadowVolumeSceneNode::CShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, + ISceneManager* mgr, s32 id, bool zfailmethod, f32 infinity) +: IShadowVolumeSceneNode(parent, mgr, id), + ShadowMesh(0), IndexCount(0), VertexCount(0), ShadowVolumesUsed(0), + Infinity(infinity), UseZFailMethod(zfailmethod) +{ + #ifdef _DEBUG + setDebugName("CShadowVolumeSceneNode"); + #endif + setShadowMesh(shadowMesh); + setAutomaticCulling(scene::EAC_OFF); +} + + +//! destructor +CShadowVolumeSceneNode::~CShadowVolumeSceneNode() +{ + if (ShadowMesh) + ShadowMesh->drop(); +} + + +void CShadowVolumeSceneNode::createShadowVolume(const core::vector3df& light, bool isDirectional) +{ + SShadowVolume* svp = 0; + core::aabbox3d<f32>* bb = 0; + + // builds the shadow volume and adds it to the shadow volume list. + + if (ShadowVolumes.size() > ShadowVolumesUsed) + { + // get the next unused buffer + + svp = &ShadowVolumes[ShadowVolumesUsed]; + svp->set_used(0); + + bb = &ShadowBBox[ShadowVolumesUsed]; + } + else + { + ShadowVolumes.push_back(SShadowVolume()); + svp = &ShadowVolumes.getLast(); + + ShadowBBox.push_back(core::aabbox3d<f32>()); + bb = &ShadowBBox.getLast(); + } + svp->reallocate(IndexCount*5); + ++ShadowVolumesUsed; + + // We use triangle lists + Edges.set_used(IndexCount*2); + u32 numEdges = 0; + + numEdges=createEdgesAndCaps(light, svp, bb); + + // for all edges add the near->far quads + for (u32 i=0; i<numEdges; ++i) + { + const core::vector3df &v1 = Vertices[Edges[2*i+0]]; + const core::vector3df &v2 = Vertices[Edges[2*i+1]]; + const core::vector3df v3(v1+(v1 - light).normalize()*Infinity); + const core::vector3df v4(v2+(v2 - light).normalize()*Infinity); + + // Add a quad (two triangles) to the vertex list +#ifdef _DEBUG + if (svp->size() >= svp->allocated_size()-5) + os::Printer::log("Allocation too small.", ELL_DEBUG); +#endif + svp->push_back(v1); + svp->push_back(v2); + svp->push_back(v3); + + svp->push_back(v2); + svp->push_back(v4); + svp->push_back(v3); + } +} + + +#define IRR_USE_ADJACENCY +#define IRR_USE_REVERSE_EXTRUDED + +u32 CShadowVolumeSceneNode::createEdgesAndCaps(const core::vector3df& light, + SShadowVolume* svp, core::aabbox3d<f32>* bb) +{ + u32 numEdges=0; + const u32 faceCount = IndexCount / 3; + + if(faceCount >= 1) + bb->reset(Vertices[Indices[0]]); + else + bb->reset(0,0,0); + + // Check every face if it is front or back facing the light. + for (u32 i=0; i<faceCount; ++i) + { + const core::vector3df v0 = Vertices[Indices[3*i+0]]; + const core::vector3df v1 = Vertices[Indices[3*i+1]]; + const core::vector3df v2 = Vertices[Indices[3*i+2]]; + +#ifdef IRR_USE_REVERSE_EXTRUDED + FaceData[i]=core::triangle3df(v0,v1,v2).isFrontFacing(light); +#else + FaceData[i]=core::triangle3df(v2,v1,v0).isFrontFacing(light); +#endif + + if (UseZFailMethod && FaceData[i]) + { +#ifdef _DEBUG + if (svp->size() >= svp->allocated_size()-5) + os::Printer::log("Allocation too small.", ELL_DEBUG); +#endif + // add front cap from light-facing faces + svp->push_back(v2); + svp->push_back(v1); + svp->push_back(v0); + + // add back cap + const core::vector3df i0 = v0+(v0-light).normalize()*Infinity; + const core::vector3df i1 = v1+(v1-light).normalize()*Infinity; + const core::vector3df i2 = v2+(v2-light).normalize()*Infinity; + + svp->push_back(i0); + svp->push_back(i1); + svp->push_back(i2); + + bb->addInternalPoint(i0); + bb->addInternalPoint(i1); + bb->addInternalPoint(i2); + } + } + + // Create edges + for (u32 i=0; i<faceCount; ++i) + { + // check all front facing faces + if (FaceData[i] == true) + { + const u16 wFace0 = Indices[3*i+0]; + const u16 wFace1 = Indices[3*i+1]; + const u16 wFace2 = Indices[3*i+2]; + + const u16 adj0 = Adjacency[3*i+0]; + const u16 adj1 = Adjacency[3*i+1]; + const u16 adj2 = Adjacency[3*i+2]; + + // add edges if face is adjacent to back-facing face + // or if no adjacent face was found +#ifdef IRR_USE_ADJACENCY + if (adj0 == i || FaceData[adj0] == false) +#endif + { + // add edge v0-v1 + Edges[2*numEdges+0] = wFace0; + Edges[2*numEdges+1] = wFace1; + ++numEdges; + } + +#ifdef IRR_USE_ADJACENCY + if (adj1 == i || FaceData[adj1] == false) +#endif + { + // add edge v1-v2 + Edges[2*numEdges+0] = wFace1; + Edges[2*numEdges+1] = wFace2; + ++numEdges; + } + +#ifdef IRR_USE_ADJACENCY + if (adj2 == i || FaceData[adj2] == false) +#endif + { + // add edge v2-v0 + Edges[2*numEdges+0] = wFace2; + Edges[2*numEdges+1] = wFace0; + ++numEdges; + } + } + } + return numEdges; +} + + +void CShadowVolumeSceneNode::setShadowMesh(const IMesh* mesh) +{ + if (ShadowMesh == mesh) + return; + if (ShadowMesh) + ShadowMesh->drop(); + ShadowMesh = mesh; + if (ShadowMesh) + { + ShadowMesh->grab(); + Box = ShadowMesh->getBoundingBox(); + } +} + + +void CShadowVolumeSceneNode::updateShadowVolumes() +{ + const u32 oldIndexCount = IndexCount; + const u32 oldVertexCount = VertexCount; + + const IMesh* const mesh = ShadowMesh; + if (!mesh) + return; + + // create as much shadow volumes as there are lights but + // do not ignore the max light settings. + const u32 lightCount = SceneManager->getVideoDriver()->getDynamicLightCount(); + if (!lightCount) + return; + + // calculate total amount of vertices and indices + + VertexCount = 0; + IndexCount = 0; + ShadowVolumesUsed = 0; + + u32 i; + u32 totalVertices = 0; + u32 totalIndices = 0; + const u32 bufcnt = mesh->getMeshBufferCount(); + + for (i=0; i<bufcnt; ++i) + { + const IMeshBuffer* buf = mesh->getMeshBuffer(i); + totalIndices += buf->getIndexCount(); + totalVertices += buf->getVertexCount(); + } + + // allocate memory if necessary + + Vertices.set_used(totalVertices); + Indices.set_used(totalIndices); + FaceData.set_used(totalIndices / 3); + + // copy mesh + for (i=0; i<bufcnt; ++i) + { + const IMeshBuffer* buf = mesh->getMeshBuffer(i); + + const u16* idxp = buf->getIndices(); + const u16* idxpend = idxp + buf->getIndexCount(); + for (; idxp!=idxpend; ++idxp) + Indices[IndexCount++] = *idxp + VertexCount; + + const u32 vtxcnt = buf->getVertexCount(); + for (u32 j=0; j<vtxcnt; ++j) + Vertices[VertexCount++] = buf->getPosition(j); + } + + // recalculate adjacency if necessary + if (oldVertexCount != VertexCount || oldIndexCount != IndexCount) + calculateAdjacency(); + + core::matrix4 mat = Parent->getAbsoluteTransformation(); + mat.makeInverse(); + const core::vector3df parentpos = Parent->getAbsolutePosition(); + + // TODO: Only correct for point lights. + for (i=0; i<lightCount; ++i) + { + const video::SLight& dl = SceneManager->getVideoDriver()->getDynamicLight(i); + core::vector3df lpos = dl.Position; + if (dl.CastShadows && + fabs((lpos - parentpos).getLengthSQ()) <= (dl.Radius*dl.Radius*4.0f)) + { + mat.transformVect(lpos); + createShadowVolume(lpos); + } + } +} + + +//! pre render method +void CShadowVolumeSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + { + SceneManager->registerNodeForRendering(this, scene::ESNRP_SHADOW); + ISceneNode::OnRegisterSceneNode(); + } +} + +//! renders the node. +void CShadowVolumeSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + if (!ShadowVolumesUsed || !driver) + return; + + driver->setTransform(video::ETS_WORLD, Parent->getAbsoluteTransformation()); + + for (u32 i=0; i<ShadowVolumesUsed; ++i) + { + bool drawShadow = true; + + if (UseZFailMethod && SceneManager->getActiveCamera()) + { + // Disable shadows drawing, when back cap is behind of ZFar plane. + + SViewFrustum frust = *SceneManager->getActiveCamera()->getViewFrustum(); + + core::matrix4 invTrans(Parent->getAbsoluteTransformation(), core::matrix4::EM4CONST_INVERSE); + frust.transform(invTrans); + + core::vector3df edges[8]; + ShadowBBox[i].getEdges(edges); + + core::vector3df largestEdge = edges[0]; + f32 maxDistance = core::vector3df(SceneManager->getActiveCamera()->getPosition() - edges[0]).getLength(); + f32 curDistance = 0.f; + + for(int j = 1; j < 8; ++j) + { + curDistance = core::vector3df(SceneManager->getActiveCamera()->getPosition() - edges[j]).getLength(); + + if(curDistance > maxDistance) + { + maxDistance = curDistance; + largestEdge = edges[j]; + } + } + + if (!(frust.planes[scene::SViewFrustum::VF_FAR_PLANE].classifyPointRelation(largestEdge) != core::ISREL3D_FRONT)) + drawShadow = false; + } + + if(drawShadow) + driver->drawStencilShadowVolume(ShadowVolumes[i], UseZFailMethod, DebugDataVisible); + else + { + core::array<core::vector3df> triangles; + driver->drawStencilShadowVolume(triangles, UseZFailMethod, DebugDataVisible); + } + } +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CShadowVolumeSceneNode::getBoundingBox() const +{ + return Box; +} + + +//! Generates adjacency information based on mesh indices. +void CShadowVolumeSceneNode::calculateAdjacency() +{ + Adjacency.set_used(IndexCount); + + // go through all faces and fetch their three neighbours + for (u32 f=0; f<IndexCount; f+=3) + { + for (u32 edge = 0; edge<3; ++edge) + { + const core::vector3df& v1 = Vertices[Indices[f+edge]]; + const core::vector3df& v2 = Vertices[Indices[f+((edge+1)%3)]]; + + // now we search an_O_ther _F_ace with these two + // vertices, which is not the current face. + u32 of; + + for (of=0; of<IndexCount; of+=3) + { + // only other faces + if (of != f) + { + bool cnt1 = false; + bool cnt2 = false; + + for (s32 e=0; e<3; ++e) + { + if (v1.equals(Vertices[Indices[of+e]])) + cnt1=true; + + if (v2.equals(Vertices[Indices[of+e]])) + cnt2=true; + } + // one match for each vertex, i.e. edge is the same + if (cnt1 && cnt2) + break; + } + } + + // no adjacent edges -> store face number, else store adjacent face + if (of >= IndexCount) + Adjacency[f + edge] = f/3; + else + Adjacency[f + edge] = of/3; + } + } +} + + +} // end namespace scene +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.h new file mode 100644 index 0000000..c66b8f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CShadowVolumeSceneNode.h @@ -0,0 +1,87 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__ +#define __C_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__ + +#include "IShadowVolumeSceneNode.h" + +namespace irr +{ +namespace scene +{ + + //! Scene node for rendering a shadow volume into a stencil buffer. + class CShadowVolumeSceneNode : public IShadowVolumeSceneNode + { + public: + + //! constructor + CShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, ISceneManager* mgr, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + + //! destructor + virtual ~CShadowVolumeSceneNode(); + + //! Sets the mesh from which the shadow volume should be generated. + /** To optimize shadow rendering, use a simpler mesh for shadows. + */ + virtual void setShadowMesh(const IMesh* mesh); + + //! Updates the shadow volumes for current light positions. + /** Called each render cycle from Animated Mesh SceneNode render method. */ + virtual void updateShadowVolumes(); + + //! pre render method + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_SHADOW_VOLUME; } + + private: + + typedef core::array<core::vector3df> SShadowVolume; + + void createShadowVolume(const core::vector3df& pos, bool isDirectional=false); + u32 createEdgesAndCaps(const core::vector3df& light, SShadowVolume* svp, core::aabbox3d<f32>* bb); + + //! Generates adjacency information based on mesh indices. + void calculateAdjacency(); + + core::aabbox3d<f32> Box; + + // a shadow volume for every light + core::array<SShadowVolume> ShadowVolumes; + + // a back cap bounding box for every light + core::array<core::aabbox3d<f32> > ShadowBBox; + + core::array<core::vector3df> Vertices; + core::array<u16> Indices; + core::array<u16> Adjacency; + core::array<u16> Edges; + // tells if face is front facing + core::array<bool> FaceData; + + const scene::IMesh* ShadowMesh; + + u32 IndexCount; + u32 VertexCount; + u32 ShadowVolumesUsed; + + f32 Infinity; + + bool UseZFailMethod; + }; + +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.cpp new file mode 100644 index 0000000..e1ab5a5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.cpp @@ -0,0 +1,1471 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + +#include "CSkinnedMesh.h" +#include "CBoneSceneNode.h" +#include "IAnimatedMeshSceneNode.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CSkinnedMesh::CSkinnedMesh() +: SkinningBuffers(0), AnimationFrames(0.f), FramesPerSecond(25.f), + LastAnimatedFrame(-1), SkinnedLastFrame(false), + InterpolationMode(EIM_LINEAR), + HasAnimation(false), PreparedForSkinning(false), + AnimateNormals(true), HardwareSkinning(false) +{ + #ifdef _DEBUG + setDebugName("CSkinnedMesh"); + #endif + + SkinningBuffers=&LocalBuffers; +} + + +//! destructor +CSkinnedMesh::~CSkinnedMesh() +{ + for (u32 i=0; i<AllJoints.size(); ++i) + delete AllJoints[i]; + + for (u32 j=0; j<LocalBuffers.size(); ++j) + { + if (LocalBuffers[j]) + LocalBuffers[j]->drop(); + } +} + + +//! returns the amount of frames in milliseconds. +//! If the amount is 1, it is a static (=non animated) mesh. +u32 CSkinnedMesh::getFrameCount() const +{ + return core::floor32(AnimationFrames); +} + + +//! Gets the default animation speed of the animated mesh. +/** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ +f32 CSkinnedMesh::getAnimationSpeed() const +{ + return FramesPerSecond; +} + + +//! Gets the frame count of the animated mesh. +/** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. +The actual speed is set in the scene node the mesh is instantiated in.*/ +void CSkinnedMesh::setAnimationSpeed(f32 fps) +{ + FramesPerSecond=fps; +} + + +//! returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. Note, that some Meshes will ignore the detail level. +IMesh* CSkinnedMesh::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) +{ + //animate(frame,startFrameLoop, endFrameLoop); + if (frame==-1) + return this; + + animateMesh((f32)frame, 1.0f); + skinMesh(); + return this; +} + + +//-------------------------------------------------------------------------- +// Keyframe Animation +//-------------------------------------------------------------------------- + + +//! Animates this mesh's joints based on frame input +//! blend: {0-old position, 1-New position} +void CSkinnedMesh::animateMesh(f32 frame, f32 blend) +{ + if (!HasAnimation || LastAnimatedFrame==frame) + return; + + LastAnimatedFrame=frame; + SkinnedLastFrame=false; + + if (blend<=0.f) + return; //No need to animate + + for (u32 i=0; i<AllJoints.size(); ++i) + { + //The joints can be animated here with no input from their + //parents, but for setAnimationMode extra checks are needed + //to their parents + SJoint *joint = AllJoints[i]; + + const core::vector3df oldPosition = joint->Animatedposition; + const core::vector3df oldScale = joint->Animatedscale; + const core::quaternion oldRotation = joint->Animatedrotation; + + core::vector3df position = oldPosition; + core::vector3df scale = oldScale; + core::quaternion rotation = oldRotation; + + getFrameData(frame, joint, + position, joint->positionHint, + scale, joint->scaleHint, + rotation, joint->rotationHint); + + if (blend==1.0f) + { + //No blending needed + joint->Animatedposition = position; + joint->Animatedscale = scale; + joint->Animatedrotation = rotation; + } + else + { + //Blend animation + joint->Animatedposition = core::lerp(oldPosition, position, blend); + joint->Animatedscale = core::lerp(oldScale, scale, blend); + joint->Animatedrotation.slerp(oldRotation, rotation, blend); + } + } + + //Note: + //LocalAnimatedMatrix needs to be built at some point, but this function may be called lots of times for + //one render (to play two animations at the same time) LocalAnimatedMatrix only needs to be built once. + //a call to buildAllLocalAnimatedMatrices is needed before skinning the mesh, and before the user gets the joints to move + + //---------------- + // Temp! + buildAllLocalAnimatedMatrices(); + //----------------- + + updateBoundingBox(); +} + + +void CSkinnedMesh::buildAllLocalAnimatedMatrices() +{ + for (u32 i=0; i<AllJoints.size(); ++i) + { + SJoint *joint = AllJoints[i]; + + //Could be faster: + + if (joint->UseAnimationFrom && + (joint->UseAnimationFrom->PositionKeys.size() || + joint->UseAnimationFrom->ScaleKeys.size() || + joint->UseAnimationFrom->RotationKeys.size() )) + { + joint->GlobalSkinningSpace=false; + + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched to getMatrix_transposed instead of getMatrix for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! + joint->Animatedrotation.getMatrix_transposed(joint->LocalAnimatedMatrix); + + // --- joint->LocalAnimatedMatrix *= joint->Animatedrotation.getMatrix() --- + f32 *m1 = joint->LocalAnimatedMatrix.pointer(); + core::vector3df &Pos = joint->Animatedposition; + m1[0] += Pos.X*m1[3]; + m1[1] += Pos.Y*m1[3]; + m1[2] += Pos.Z*m1[3]; + m1[4] += Pos.X*m1[7]; + m1[5] += Pos.Y*m1[7]; + m1[6] += Pos.Z*m1[7]; + m1[8] += Pos.X*m1[11]; + m1[9] += Pos.Y*m1[11]; + m1[10] += Pos.Z*m1[11]; + m1[12] += Pos.X*m1[15]; + m1[13] += Pos.Y*m1[15]; + m1[14] += Pos.Z*m1[15]; + // ----------------------------------- + + if (joint->ScaleKeys.size()) + { + /* + core::matrix4 scaleMatrix; + scaleMatrix.setScale(joint->Animatedscale); + joint->LocalAnimatedMatrix *= scaleMatrix; + */ + + // -------- joint->LocalAnimatedMatrix *= scaleMatrix ----------------- + core::matrix4& mat = joint->LocalAnimatedMatrix; + mat[0] *= joint->Animatedscale.X; + mat[1] *= joint->Animatedscale.X; + mat[2] *= joint->Animatedscale.X; + mat[3] *= joint->Animatedscale.X; + mat[4] *= joint->Animatedscale.Y; + mat[5] *= joint->Animatedscale.Y; + mat[6] *= joint->Animatedscale.Y; + mat[7] *= joint->Animatedscale.Y; + mat[8] *= joint->Animatedscale.Z; + mat[9] *= joint->Animatedscale.Z; + mat[10] *= joint->Animatedscale.Z; + mat[11] *= joint->Animatedscale.Z; + // ----------------------------------- + } + } + else + { + joint->LocalAnimatedMatrix=joint->LocalMatrix; + } + } + SkinnedLastFrame=false; +} + + +void CSkinnedMesh::buildAllGlobalAnimatedMatrices(SJoint *joint, SJoint *parentJoint) +{ + if (!joint) + { + for (u32 i=0; i<RootJoints.size(); ++i) + buildAllGlobalAnimatedMatrices(RootJoints[i], 0); + return; + } + else + { + // Find global matrix... + if (!parentJoint || joint->GlobalSkinningSpace) + joint->GlobalAnimatedMatrix = joint->LocalAnimatedMatrix; + else + joint->GlobalAnimatedMatrix = parentJoint->GlobalAnimatedMatrix * joint->LocalAnimatedMatrix; + } + + for (u32 j=0; j<joint->Children.size(); ++j) + buildAllGlobalAnimatedMatrices(joint->Children[j], joint); +} + + +void CSkinnedMesh::getFrameData(f32 frame, SJoint *joint, + core::vector3df &position, s32 &positionHint, + core::vector3df &scale, s32 &scaleHint, + core::quaternion &rotation, s32 &rotationHint) +{ + s32 foundPositionIndex = -1; + s32 foundScaleIndex = -1; + s32 foundRotationIndex = -1; + + if (joint->UseAnimationFrom) + { + const core::array<SPositionKey> &PositionKeys=joint->UseAnimationFrom->PositionKeys; + const core::array<SScaleKey> &ScaleKeys=joint->UseAnimationFrom->ScaleKeys; + const core::array<SRotationKey> &RotationKeys=joint->UseAnimationFrom->RotationKeys; + + if (PositionKeys.size()) + { + foundPositionIndex = -1; + + //Test the Hints... + if (positionHint>=0 && (u32)positionHint < PositionKeys.size()) + { + //check this hint + if (positionHint>0 && PositionKeys[positionHint].frame>=frame && PositionKeys[positionHint-1].frame<frame ) + foundPositionIndex=positionHint; + else if (positionHint+1 < (s32)PositionKeys.size()) + { + //check the next index + if ( PositionKeys[positionHint+1].frame>=frame && + PositionKeys[positionHint+0].frame<frame) + { + positionHint++; + foundPositionIndex=positionHint; + } + } + } + + //The hint test failed, do a full scan... + if (foundPositionIndex==-1) + { + for (u32 i=0; i<PositionKeys.size(); ++i) + { + if (PositionKeys[i].frame >= frame) //Keys should to be sorted by frame + { + foundPositionIndex=i; + positionHint=i; + break; + } + } + } + + //Do interpolation... + if (foundPositionIndex!=-1) + { + if (InterpolationMode==EIM_CONSTANT || foundPositionIndex==0) + { + position = PositionKeys[foundPositionIndex].position; + } + else if (InterpolationMode==EIM_LINEAR) + { + const SPositionKey& KeyA = PositionKeys[foundPositionIndex]; + const SPositionKey& KeyB = PositionKeys[foundPositionIndex-1]; + + const f32 fd1 = frame - KeyA.frame; + const f32 fd2 = KeyB.frame - frame; + position = ((KeyB.position-KeyA.position)/(fd1+fd2))*fd1 + KeyA.position; + } + } + } + + //------------------------------------------------------------ + + if (ScaleKeys.size()) + { + foundScaleIndex = -1; + + //Test the Hints... + if (scaleHint>=0 && (u32)scaleHint < ScaleKeys.size()) + { + //check this hint + if (scaleHint>0 && ScaleKeys[scaleHint].frame>=frame && ScaleKeys[scaleHint-1].frame<frame ) + foundScaleIndex=scaleHint; + else if (scaleHint+1 < (s32)ScaleKeys.size()) + { + //check the next index + if ( ScaleKeys[scaleHint+1].frame>=frame && + ScaleKeys[scaleHint+0].frame<frame) + { + scaleHint++; + foundScaleIndex=scaleHint; + } + } + } + + + //The hint test failed, do a full scan... + if (foundScaleIndex==-1) + { + for (u32 i=0; i<ScaleKeys.size(); ++i) + { + if (ScaleKeys[i].frame >= frame) //Keys should to be sorted by frame + { + foundScaleIndex=i; + scaleHint=i; + break; + } + } + } + + //Do interpolation... + if (foundScaleIndex!=-1) + { + if (InterpolationMode==EIM_CONSTANT || foundScaleIndex==0) + { + scale = ScaleKeys[foundScaleIndex].scale; + } + else if (InterpolationMode==EIM_LINEAR) + { + const SScaleKey& KeyA = ScaleKeys[foundScaleIndex]; + const SScaleKey& KeyB = ScaleKeys[foundScaleIndex-1]; + + const f32 fd1 = frame - KeyA.frame; + const f32 fd2 = KeyB.frame - frame; + scale = ((KeyB.scale-KeyA.scale)/(fd1+fd2))*fd1 + KeyA.scale; + } + } + } + + //------------------------------------------------------------- + + if (RotationKeys.size()) + { + foundRotationIndex = -1; + + //Test the Hints... + if (rotationHint>=0 && (u32)rotationHint < RotationKeys.size()) + { + //check this hint + if (rotationHint>0 && RotationKeys[rotationHint].frame>=frame && RotationKeys[rotationHint-1].frame<frame ) + foundRotationIndex=rotationHint; + else if (rotationHint+1 < (s32)RotationKeys.size()) + { + //check the next index + if ( RotationKeys[rotationHint+1].frame>=frame && + RotationKeys[rotationHint+0].frame<frame) + { + rotationHint++; + foundRotationIndex=rotationHint; + } + } + } + + + //The hint test failed, do a full scan... + if (foundRotationIndex==-1) + { + for (u32 i=0; i<RotationKeys.size(); ++i) + { + if (RotationKeys[i].frame >= frame) //Keys should be sorted by frame + { + foundRotationIndex=i; + rotationHint=i; + break; + } + } + } + + //Do interpolation... + if (foundRotationIndex!=-1) + { + if (InterpolationMode==EIM_CONSTANT || foundRotationIndex==0) + { + rotation = RotationKeys[foundRotationIndex].rotation; + } + else if (InterpolationMode==EIM_LINEAR) + { + const SRotationKey& KeyA = RotationKeys[foundRotationIndex]; + const SRotationKey& KeyB = RotationKeys[foundRotationIndex-1]; + + const f32 fd1 = frame - KeyA.frame; + const f32 fd2 = KeyB.frame - frame; + const f32 t = fd1/(fd1+fd2); + + /* + f32 t = 0; + if (KeyA.frame!=KeyB.frame) + t = (frame-KeyA.frame) / (KeyB.frame - KeyA.frame); + */ + + rotation.slerp(KeyA.rotation, KeyB.rotation, t); + } + } + } + } +} + +//-------------------------------------------------------------------------- +// Software Skinning +//-------------------------------------------------------------------------- + +//! Preforms a software skin on this mesh based of joint positions +void CSkinnedMesh::skinMesh() +{ + if (!HasAnimation || SkinnedLastFrame) + return; + + //---------------- + // This is marked as "Temp!". A shiny dubloon to whomever can tell me why. + buildAllGlobalAnimatedMatrices(); + //----------------- + + SkinnedLastFrame=true; + if (!HardwareSkinning) + { + //Software skin.... + u32 i; + + //rigid animation + for (i=0; i<AllJoints.size(); ++i) + { + for (u32 j=0; j<AllJoints[i]->AttachedMeshes.size(); ++j) + { + SSkinMeshBuffer* Buffer=(*SkinningBuffers)[ AllJoints[i]->AttachedMeshes[j] ]; + Buffer->Transformation=AllJoints[i]->GlobalAnimatedMatrix; + } + } + + //clear skinning helper array + for (i=0; i<Vertices_Moved.size(); ++i) + for (u32 j=0; j<Vertices_Moved[i].size(); ++j) + Vertices_Moved[i][j]=false; + + //skin starting with the root joints + for (i=0; i<RootJoints.size(); ++i) + skinJoint(RootJoints[i], 0); + + for (i=0; i<SkinningBuffers->size(); ++i) + (*SkinningBuffers)[i]->setDirty(EBT_VERTEX); + } + updateBoundingBox(); +} + + +void CSkinnedMesh::skinJoint(SJoint *joint, SJoint *parentJoint) +{ + if (joint->Weights.size()) + { + //Find this joints pull on vertices... + core::matrix4 jointVertexPull(core::matrix4::EM4CONST_NOTHING); + jointVertexPull.setbyproduct(joint->GlobalAnimatedMatrix, joint->GlobalInversedMatrix); + + core::vector3df thisVertexMove, thisNormalMove; + + core::array<scene::SSkinMeshBuffer*> &buffersUsed=*SkinningBuffers; + + //Skin Vertices Positions and Normals... + for (u32 i=0; i<joint->Weights.size(); ++i) + { + SWeight& weight = joint->Weights[i]; + + // Pull this vertex... + jointVertexPull.transformVect(thisVertexMove, weight.StaticPos); + + if (AnimateNormals) + jointVertexPull.rotateVect(thisNormalMove, weight.StaticNormal); + + if (! (*(weight.Moved)) ) + { + *(weight.Moved) = true; + + buffersUsed[weight.buffer_id]->getVertex(weight.vertex_id)->Pos = thisVertexMove * weight.strength; + + if (AnimateNormals) + buffersUsed[weight.buffer_id]->getVertex(weight.vertex_id)->Normal = thisNormalMove * weight.strength; + + //*(weight._Pos) = thisVertexMove * weight.strength; + } + else + { + buffersUsed[weight.buffer_id]->getVertex(weight.vertex_id)->Pos += thisVertexMove * weight.strength; + + if (AnimateNormals) + buffersUsed[weight.buffer_id]->getVertex(weight.vertex_id)->Normal += thisNormalMove * weight.strength; + + //*(weight._Pos) += thisVertexMove * weight.strength; + } + + buffersUsed[weight.buffer_id]->boundingBoxNeedsRecalculated(); + } + } + + //Skin all children + for (u32 j=0; j<joint->Children.size(); ++j) + skinJoint(joint->Children[j], joint); +} + + +E_ANIMATED_MESH_TYPE CSkinnedMesh::getMeshType() const +{ + return EAMT_SKINNED; +} + + +//! Gets joint count. +u32 CSkinnedMesh::getJointCount() const +{ + return AllJoints.size(); +} + + +//! Gets the name of a joint. +const c8* CSkinnedMesh::getJointName(u32 number) const +{ + if (number >= AllJoints.size()) + return 0; + return AllJoints[number]->Name.c_str(); +} + + +//! Gets a joint number from its name +s32 CSkinnedMesh::getJointNumber(const c8* name) const +{ + for (u32 i=0; i<AllJoints.size(); ++i) + { + if (AllJoints[i]->Name == name) + return i; + } + + return -1; +} + + +//! returns amount of mesh buffers. +u32 CSkinnedMesh::getMeshBufferCount() const +{ + return LocalBuffers.size(); +} + + +//! returns pointer to a mesh buffer +IMeshBuffer* CSkinnedMesh::getMeshBuffer(u32 nr) const +{ + if (nr < LocalBuffers.size()) + return LocalBuffers[nr]; + else + return 0; +} + + +//! Returns pointer to a mesh buffer which fits a material +IMeshBuffer* CSkinnedMesh::getMeshBuffer(const video::SMaterial &material) const +{ + for (u32 i=0; i<LocalBuffers.size(); ++i) + { + if (LocalBuffers[i]->getMaterial() == material) + return LocalBuffers[i]; + } + return 0; +} + + +//! returns an axis aligned bounding box +const core::aabbox3d<f32>& CSkinnedMesh::getBoundingBox() const +{ + return BoundingBox; +} + + +//! set user axis aligned bounding box +void CSkinnedMesh::setBoundingBox( const core::aabbox3df& box) +{ + BoundingBox = box; +} + + +//! sets a flag of all contained materials to a new value +void CSkinnedMesh::setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) +{ + for (u32 i=0; i<LocalBuffers.size(); ++i) + LocalBuffers[i]->Material.setFlag(flag,newvalue); +} + + +//! set the hardware mapping hint, for driver +void CSkinnedMesh::setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, + E_BUFFER_TYPE buffer) +{ + for (u32 i=0; i<LocalBuffers.size(); ++i) + LocalBuffers[i]->setHardwareMappingHint(newMappingHint, buffer); +} + + +//! flags the meshbuffer as changed, reloads hardware buffers +void CSkinnedMesh::setDirty(E_BUFFER_TYPE buffer) +{ + for (u32 i=0; i<LocalBuffers.size(); ++i) + LocalBuffers[i]->setDirty(buffer); +} + + +//! uses animation from another mesh +bool CSkinnedMesh::useAnimationFrom(const ISkinnedMesh *mesh) +{ + bool unmatched=false; + + for(u32 i=0;i<AllJoints.size();++i) + { + SJoint *joint=AllJoints[i]; + joint->UseAnimationFrom=0; + + if (joint->Name=="") + unmatched=true; + else + { + for(u32 j=0;j<mesh->getAllJoints().size();++j) + { + SJoint *otherJoint=mesh->getAllJoints()[j]; + if (joint->Name==otherJoint->Name) + { + joint->UseAnimationFrom=otherJoint; + } + } + if (!joint->UseAnimationFrom) + unmatched=true; + } + } + + checkForAnimation(); + + return !unmatched; +} + + +//!Update Normals when Animating +//!False= Don't animate them, faster +//!True= Update normals (default) +void CSkinnedMesh::updateNormalsWhenAnimating(bool on) +{ + AnimateNormals = on; +} + + +//!Sets Interpolation Mode +void CSkinnedMesh::setInterpolationMode(E_INTERPOLATION_MODE mode) +{ + InterpolationMode = mode; +} + + +core::array<scene::SSkinMeshBuffer*> &CSkinnedMesh::getMeshBuffers() +{ + return LocalBuffers; +} + + +core::array<CSkinnedMesh::SJoint*> &CSkinnedMesh::getAllJoints() +{ + return AllJoints; +} + + +const core::array<CSkinnedMesh::SJoint*> &CSkinnedMesh::getAllJoints() const +{ + return AllJoints; +} + + +//! (This feature is not implementated in irrlicht yet) +bool CSkinnedMesh::setHardwareSkinning(bool on) +{ + if (HardwareSkinning!=on) + { + if (on) + { + + //set mesh to static pose... + for (u32 i=0; i<AllJoints.size(); ++i) + { + SJoint *joint=AllJoints[i]; + for (u32 j=0; j<joint->Weights.size(); ++j) + { + const u16 buffer_id=joint->Weights[j].buffer_id; + const u32 vertex_id=joint->Weights[j].vertex_id; + LocalBuffers[buffer_id]->getVertex(vertex_id)->Pos = joint->Weights[j].StaticPos; + LocalBuffers[buffer_id]->getVertex(vertex_id)->Normal = joint->Weights[j].StaticNormal; + LocalBuffers[buffer_id]->boundingBoxNeedsRecalculated(); + } + } + } + + HardwareSkinning=on; + } + return HardwareSkinning; +} + + +void CSkinnedMesh::calculateGlobalMatrices(SJoint *joint,SJoint *parentJoint) +{ + if (!joint && parentJoint) // bit of protection from endless loops + return; + + //Go through the root bones + if (!joint) + { + for (u32 i=0; i<RootJoints.size(); ++i) + calculateGlobalMatrices(RootJoints[i],0); + return; + } + + if (!parentJoint) + joint->GlobalMatrix = joint->LocalMatrix; + else + joint->GlobalMatrix = parentJoint->GlobalMatrix * joint->LocalMatrix; + + joint->LocalAnimatedMatrix=joint->LocalMatrix; + joint->GlobalAnimatedMatrix=joint->GlobalMatrix; + + if (joint->GlobalInversedMatrix.isIdentity())//might be pre calculated + { + joint->GlobalInversedMatrix = joint->GlobalMatrix; + joint->GlobalInversedMatrix.makeInverse(); // slow + } + + for (u32 j=0; j<joint->Children.size(); ++j) + calculateGlobalMatrices(joint->Children[j],joint); + SkinnedLastFrame=false; +} + + +void CSkinnedMesh::checkForAnimation() +{ + u32 i,j; + //Check for animation... + HasAnimation = false; + for(i=0;i<AllJoints.size();++i) + { + if (AllJoints[i]->UseAnimationFrom) + { + if (AllJoints[i]->UseAnimationFrom->PositionKeys.size() || + AllJoints[i]->UseAnimationFrom->ScaleKeys.size() || + AllJoints[i]->UseAnimationFrom->RotationKeys.size() ) + { + HasAnimation = true; + } + } + } + + //meshes with weights, are still counted as animated for ragdolls, etc + if (!HasAnimation) + { + for(i=0;i<AllJoints.size();++i) + { + if (AllJoints[i]->Weights.size()) + HasAnimation = true; + } + } + + if (HasAnimation) + { + //--- Find the length of the animation --- + AnimationFrames=0; + for(i=0;i<AllJoints.size();++i) + { + if (AllJoints[i]->UseAnimationFrom) + { + if (AllJoints[i]->UseAnimationFrom->PositionKeys.size()) + if (AllJoints[i]->UseAnimationFrom->PositionKeys.getLast().frame > AnimationFrames) + AnimationFrames=AllJoints[i]->UseAnimationFrom->PositionKeys.getLast().frame; + + if (AllJoints[i]->UseAnimationFrom->ScaleKeys.size()) + if (AllJoints[i]->UseAnimationFrom->ScaleKeys.getLast().frame > AnimationFrames) + AnimationFrames=AllJoints[i]->UseAnimationFrom->ScaleKeys.getLast().frame; + + if (AllJoints[i]->UseAnimationFrom->RotationKeys.size()) + if (AllJoints[i]->UseAnimationFrom->RotationKeys.getLast().frame > AnimationFrames) + AnimationFrames=AllJoints[i]->UseAnimationFrom->RotationKeys.getLast().frame; + } + } + } + + if (HasAnimation && !PreparedForSkinning) + { + PreparedForSkinning=true; + + //check for bugs: + for(i=0; i < AllJoints.size(); ++i) + { + SJoint *joint = AllJoints[i]; + for (j=0; j<joint->Weights.size(); ++j) + { + const u16 buffer_id=joint->Weights[j].buffer_id; + const u32 vertex_id=joint->Weights[j].vertex_id; + + //check for invalid ids + if (buffer_id>=LocalBuffers.size()) + { + os::Printer::log("Skinned Mesh: Weight buffer id too large", ELL_WARNING); + joint->Weights[j].buffer_id = joint->Weights[j].vertex_id =0; + } + else if (vertex_id>=LocalBuffers[buffer_id]->getVertexCount()) + { + os::Printer::log("Skinned Mesh: Weight vertex id too large", ELL_WARNING); + joint->Weights[j].buffer_id = joint->Weights[j].vertex_id =0; + } + } + } + + //An array used in skinning + + for (i=0; i<Vertices_Moved.size(); ++i) + for (j=0; j<Vertices_Moved[i].size(); ++j) + Vertices_Moved[i][j] = false; + + // For skinning: cache weight values for speed + + for (i=0; i<AllJoints.size(); ++i) + { + SJoint *joint = AllJoints[i]; + for (j=0; j<joint->Weights.size(); ++j) + { + const u16 buffer_id=joint->Weights[j].buffer_id; + const u32 vertex_id=joint->Weights[j].vertex_id; + + joint->Weights[j].Moved = &Vertices_Moved[buffer_id] [vertex_id]; + joint->Weights[j].StaticPos = LocalBuffers[buffer_id]->getVertex(vertex_id)->Pos; + joint->Weights[j].StaticNormal = LocalBuffers[buffer_id]->getVertex(vertex_id)->Normal; + + //joint->Weights[j]._Pos=&Buffers[buffer_id]->getVertex(vertex_id)->Pos; + } + } + + // normalize weights + normalizeWeights(); + } + SkinnedLastFrame=false; +} + + +//! called by loader after populating with mesh and bone data +void CSkinnedMesh::finalize() +{ + u32 i; + + // Make sure we recalc the next frame + LastAnimatedFrame=-1; + SkinnedLastFrame=false; + + //calculate bounding box + for (i=0; i<LocalBuffers.size(); ++i) + { + LocalBuffers[i]->recalculateBoundingBox(); + } + + if (AllJoints.size() || RootJoints.size()) + { + // populate AllJoints or RootJoints, depending on which is empty + if (!RootJoints.size()) + { + + for(u32 CheckingIdx=0; CheckingIdx < AllJoints.size(); ++CheckingIdx) + { + + bool foundParent=false; + for(i=0; i < AllJoints.size(); ++i) + { + for(u32 n=0; n < AllJoints[i]->Children.size(); ++n) + { + if (AllJoints[i]->Children[n] == AllJoints[CheckingIdx]) + foundParent=true; + } + } + + if (!foundParent) + RootJoints.push_back(AllJoints[CheckingIdx]); + } + } + else + { + AllJoints=RootJoints; + } + } + + for(i=0; i < AllJoints.size(); ++i) + { + AllJoints[i]->UseAnimationFrom=AllJoints[i]; + } + + //Set array sizes... + + for (i=0; i<LocalBuffers.size(); ++i) + { + Vertices_Moved.push_back( core::array<bool>() ); + Vertices_Moved[i].set_used(LocalBuffers[i]->getVertexCount()); + } + + //Todo: optimise keys here... + + checkForAnimation(); + + if (HasAnimation) + { + //--- optimize and check keyframes --- + for(i=0;i<AllJoints.size();++i) + { + core::array<SPositionKey> &PositionKeys =AllJoints[i]->PositionKeys; + core::array<SScaleKey> &ScaleKeys = AllJoints[i]->ScaleKeys; + core::array<SRotationKey> &RotationKeys = AllJoints[i]->RotationKeys; + + if (PositionKeys.size()>2) + { + for(u32 j=0;j<PositionKeys.size()-2;++j) + { + if (PositionKeys[j].position == PositionKeys[j+1].position && PositionKeys[j+1].position == PositionKeys[j+2].position) + { + PositionKeys.erase(j+1); //the middle key is unneeded + --j; + } + } + } + + if (PositionKeys.size()>1) + { + for(u32 j=0;j<PositionKeys.size()-1;++j) + { + if (PositionKeys[j].frame >= PositionKeys[j+1].frame) //bad frame, unneed and may cause problems + { + PositionKeys.erase(j+1); + --j; + } + } + } + + if (ScaleKeys.size()>2) + { + for(u32 j=0;j<ScaleKeys.size()-2;++j) + { + if (ScaleKeys[j].scale == ScaleKeys[j+1].scale && ScaleKeys[j+1].scale == ScaleKeys[j+2].scale) + { + ScaleKeys.erase(j+1); //the middle key is unneeded + --j; + } + } + } + + if (ScaleKeys.size()>1) + { + for(u32 j=0;j<ScaleKeys.size()-1;++j) + { + if (ScaleKeys[j].frame >= ScaleKeys[j+1].frame) //bad frame, unneed and may cause problems + { + ScaleKeys.erase(j+1); + --j; + } + } + } + + if (RotationKeys.size()>2) + { + for(u32 j=0;j<RotationKeys.size()-2;++j) + { + if (RotationKeys[j].rotation == RotationKeys[j+1].rotation && RotationKeys[j+1].rotation == RotationKeys[j+2].rotation) + { + RotationKeys.erase(j+1); //the middle key is unneeded + --j; + } + } + } + + if (RotationKeys.size()>1) + { + for(u32 j=0;j<RotationKeys.size()-1;++j) + { + if (RotationKeys[j].frame >= RotationKeys[j+1].frame) //bad frame, unneed and may cause problems + { + RotationKeys.erase(j+1); + --j; + } + } + } + + + //Fill empty keyframe areas + if (PositionKeys.size()) + { + SPositionKey *Key; + Key=&PositionKeys[0];//getFirst + if (Key->frame!=0) + { + PositionKeys.push_front(*Key); + Key=&PositionKeys[0];//getFirst + Key->frame=0; + } + + Key=&PositionKeys.getLast(); + if (Key->frame!=AnimationFrames) + { + PositionKeys.push_back(*Key); + Key=&PositionKeys.getLast(); + Key->frame=AnimationFrames; + } + } + + if (ScaleKeys.size()) + { + SScaleKey *Key; + Key=&ScaleKeys[0];//getFirst + if (Key->frame!=0) + { + ScaleKeys.push_front(*Key); + Key=&ScaleKeys[0];//getFirst + Key->frame=0; + } + + Key=&ScaleKeys.getLast(); + if (Key->frame!=AnimationFrames) + { + ScaleKeys.push_back(*Key); + Key=&ScaleKeys.getLast(); + Key->frame=AnimationFrames; + } + } + + if (RotationKeys.size()) + { + SRotationKey *Key; + Key=&RotationKeys[0];//getFirst + if (Key->frame!=0) + { + RotationKeys.push_front(*Key); + Key=&RotationKeys[0];//getFirst + Key->frame=0; + } + + Key=&RotationKeys.getLast(); + if (Key->frame!=AnimationFrames) + { + RotationKeys.push_back(*Key); + Key=&RotationKeys.getLast(); + Key->frame=AnimationFrames; + } + } + } + } + + //Needed for animation and skinning... + + calculateGlobalMatrices(0,0); + + //animateMesh(0, 1); + //buildAllLocalAnimatedMatrices(); + //buildAllGlobalAnimatedMatrices(); + + //rigid animation for non animated meshes + for (i=0; i<AllJoints.size(); ++i) + { + for (u32 j=0; j<AllJoints[i]->AttachedMeshes.size(); ++j) + { + SSkinMeshBuffer* Buffer=(*SkinningBuffers)[ AllJoints[i]->AttachedMeshes[j] ]; + Buffer->Transformation=AllJoints[i]->GlobalAnimatedMatrix; + } + } + + //calculate bounding box + if (LocalBuffers.empty()) + BoundingBox.reset(0,0,0); + else + { + irr::core::aabbox3df bb(LocalBuffers[0]->BoundingBox); + LocalBuffers[0]->Transformation.transformBoxEx(bb); + BoundingBox.reset(bb); + + for (u32 j=1; j<LocalBuffers.size(); ++j) + { + bb = LocalBuffers[j]->BoundingBox; + LocalBuffers[j]->Transformation.transformBoxEx(bb); + + BoundingBox.addInternalBox(bb); + } + } +} + + +void CSkinnedMesh::updateBoundingBox(void) +{ + if(!SkinningBuffers) + return; + + core::array<SSkinMeshBuffer*> & buffer = *SkinningBuffers; + BoundingBox.reset(0,0,0); + + if (!buffer.empty()) + { + for (u32 j=0; j<buffer.size(); ++j) + { + buffer[j]->recalculateBoundingBox(); + core::aabbox3df bb = buffer[j]->BoundingBox; + buffer[j]->Transformation.transformBoxEx(bb); + + BoundingBox.addInternalBox(bb); + } + } +} + + +scene::SSkinMeshBuffer *CSkinnedMesh::addMeshBuffer() +{ + scene::SSkinMeshBuffer *buffer=new scene::SSkinMeshBuffer(); + LocalBuffers.push_back(buffer); + return buffer; +} + + +CSkinnedMesh::SJoint *CSkinnedMesh::addJoint(SJoint *parent) +{ + SJoint *joint=new SJoint; + + AllJoints.push_back(joint); + if (!parent) + { + //Add root joints to array in finalize() + } + else + { + //Set parent (Be careful of the mesh loader also setting the parent) + parent->Children.push_back(joint); + } + + return joint; +} + + +CSkinnedMesh::SPositionKey *CSkinnedMesh::addPositionKey(SJoint *joint) +{ + if (!joint) + return 0; + + joint->PositionKeys.push_back(SPositionKey()); + return &joint->PositionKeys.getLast(); +} + + +CSkinnedMesh::SScaleKey *CSkinnedMesh::addScaleKey(SJoint *joint) +{ + if (!joint) + return 0; + + joint->ScaleKeys.push_back(SScaleKey()); + return &joint->ScaleKeys.getLast(); +} + + +CSkinnedMesh::SRotationKey *CSkinnedMesh::addRotationKey(SJoint *joint) +{ + if (!joint) + return 0; + + joint->RotationKeys.push_back(SRotationKey()); + return &joint->RotationKeys.getLast(); +} + + +CSkinnedMesh::SWeight *CSkinnedMesh::addWeight(SJoint *joint) +{ + if (!joint) + return 0; + + joint->Weights.push_back(SWeight()); + return &joint->Weights.getLast(); +} + + +bool CSkinnedMesh::isStatic() +{ + return !HasAnimation; +} + + +void CSkinnedMesh::normalizeWeights() +{ + // note: unsure if weights ids are going to be used. + + // Normalise the weights on bones.... + + u32 i,j; + core::array< core::array<f32> > verticesTotalWeight; + + verticesTotalWeight.reallocate(LocalBuffers.size()); + for (i=0; i<LocalBuffers.size(); ++i) + { + verticesTotalWeight.push_back(core::array<f32>()); + verticesTotalWeight[i].set_used(LocalBuffers[i]->getVertexCount()); + } + + for (i=0; i<verticesTotalWeight.size(); ++i) + for (j=0; j<verticesTotalWeight[i].size(); ++j) + verticesTotalWeight[i][j] = 0; + + for (i=0; i<AllJoints.size(); ++i) + { + SJoint *joint=AllJoints[i]; + for (j=0; j<joint->Weights.size(); ++j) + { + if (joint->Weights[j].strength<=0)//Check for invalid weights + { + joint->Weights.erase(j); + --j; + } + else + { + verticesTotalWeight[joint->Weights[j].buffer_id] [joint->Weights[j].vertex_id] += joint->Weights[j].strength; + } + } + } + + for (i=0; i<AllJoints.size(); ++i) + { + SJoint *joint=AllJoints[i]; + for (j=0; j< joint->Weights.size(); ++j) + { + const f32 total = verticesTotalWeight[joint->Weights[j].buffer_id] [joint->Weights[j].vertex_id]; + if (total != 0 && total != 1) + joint->Weights[j].strength /= total; + } + } +} + + +void CSkinnedMesh::recoverJointsFromMesh(core::array<IBoneSceneNode*> &jointChildSceneNodes) +{ + for (u32 i=0; i<AllJoints.size(); ++i) + { + IBoneSceneNode* node=jointChildSceneNodes[i]; + SJoint *joint=AllJoints[i]; + node->setPosition(joint->LocalAnimatedMatrix.getTranslation()); + node->setRotation(joint->LocalAnimatedMatrix.getRotationDegrees()); + node->setScale(joint->LocalAnimatedMatrix.getScale()); + + node->positionHint=joint->positionHint; + node->scaleHint=joint->scaleHint; + node->rotationHint=joint->rotationHint; + + node->updateAbsolutePosition(); + } +} + + +void CSkinnedMesh::transferJointsToMesh(const core::array<IBoneSceneNode*> &jointChildSceneNodes) +{ + for (u32 i=0; i<AllJoints.size(); ++i) + { + const IBoneSceneNode* const node=jointChildSceneNodes[i]; + SJoint *joint=AllJoints[i]; + + joint->LocalAnimatedMatrix.setRotationDegrees(node->getRotation()); + joint->LocalAnimatedMatrix.setTranslation(node->getPosition()); + joint->LocalAnimatedMatrix *= core::matrix4().setScale(node->getScale()); + + joint->positionHint=node->positionHint; + joint->scaleHint=node->scaleHint; + joint->rotationHint=node->rotationHint; + + joint->GlobalSkinningSpace=(node->getSkinningSpace()==EBSS_GLOBAL); + } + // Make sure we recalc the next frame + LastAnimatedFrame=-1; + SkinnedLastFrame=false; +} + + +void CSkinnedMesh::transferOnlyJointsHintsToMesh(const core::array<IBoneSceneNode*> &jointChildSceneNodes) +{ + for (u32 i=0; i<AllJoints.size(); ++i) + { + const IBoneSceneNode* const node=jointChildSceneNodes[i]; + SJoint *joint=AllJoints[i]; + + joint->positionHint=node->positionHint; + joint->scaleHint=node->scaleHint; + joint->rotationHint=node->rotationHint; + } + SkinnedLastFrame=false; +} + + +void CSkinnedMesh::addJoints(core::array<IBoneSceneNode*> &jointChildSceneNodes, + IAnimatedMeshSceneNode* node, ISceneManager* smgr) +{ + //Create new joints + for (u32 i=0; i<AllJoints.size(); ++i) + { + jointChildSceneNodes.push_back(new CBoneSceneNode(0, smgr, 0, i, AllJoints[i]->Name.c_str())); + } + + //Match up parents + for (u32 i=0; i<jointChildSceneNodes.size(); ++i) + { + const SJoint* const joint=AllJoints[i]; //should be fine + + s32 parentID=-1; + + for (u32 j=0;(parentID==-1)&&(j<AllJoints.size());++j) + { + if (i!=j) + { + const SJoint* const parentTest=AllJoints[j]; + for (u32 n=0; n<parentTest->Children.size(); ++n) + { + if (parentTest->Children[n]==joint) + { + parentID=j; + break; + } + } + } + } + + IBoneSceneNode* bone=jointChildSceneNodes[i]; + if (parentID!=-1) + bone->setParent(jointChildSceneNodes[parentID]); + else + bone->setParent(node); + + bone->drop(); + } + SkinnedLastFrame=false; +} + + +void CSkinnedMesh::convertMeshToTangents() +{ + // now calculate tangents + for (u32 b=0; b < LocalBuffers.size(); ++b) + { + if (LocalBuffers[b]) + { + LocalBuffers[b]->convertToTangents(); + + const s32 idxCnt = LocalBuffers[b]->getIndexCount(); + + u16* idx = LocalBuffers[b]->getIndices(); + video::S3DVertexTangents* v = + (video::S3DVertexTangents*)LocalBuffers[b]->getVertices(); + + for (s32 i=0; i<idxCnt; i+=3) + { + calculateTangents( + v[idx[i+0]].Normal, + v[idx[i+0]].Tangent, + v[idx[i+0]].Binormal, + v[idx[i+0]].Pos, + v[idx[i+1]].Pos, + v[idx[i+2]].Pos, + v[idx[i+0]].TCoords, + v[idx[i+1]].TCoords, + v[idx[i+2]].TCoords); + + calculateTangents( + v[idx[i+1]].Normal, + v[idx[i+1]].Tangent, + v[idx[i+1]].Binormal, + v[idx[i+1]].Pos, + v[idx[i+2]].Pos, + v[idx[i+0]].Pos, + v[idx[i+1]].TCoords, + v[idx[i+2]].TCoords, + v[idx[i+0]].TCoords); + + calculateTangents( + v[idx[i+2]].Normal, + v[idx[i+2]].Tangent, + v[idx[i+2]].Binormal, + v[idx[i+2]].Pos, + v[idx[i+0]].Pos, + v[idx[i+1]].Pos, + v[idx[i+2]].TCoords, + v[idx[i+0]].TCoords, + v[idx[i+1]].TCoords); + } + } + } +} + + +void CSkinnedMesh::calculateTangents( + core::vector3df& normal, + core::vector3df& tangent, + core::vector3df& binormal, + core::vector3df& vt1, core::vector3df& vt2, core::vector3df& vt3, // vertices + core::vector2df& tc1, core::vector2df& tc2, core::vector2df& tc3) // texture coords +{ + core::vector3df v1 = vt1 - vt2; + core::vector3df v2 = vt3 - vt1; + normal = v2.crossProduct(v1); + normal.normalize(); + + // binormal + + f32 deltaX1 = tc1.X - tc2.X; + f32 deltaX2 = tc3.X - tc1.X; + binormal = (v1 * deltaX2) - (v2 * deltaX1); + binormal.normalize(); + + // tangent + + f32 deltaY1 = tc1.Y - tc2.Y; + f32 deltaY2 = tc3.Y - tc1.Y; + tangent = (v1 * deltaY2) - (v2 * deltaY1); + tangent.normalize(); + + // adjust + + core::vector3df txb = tangent.crossProduct(binormal); + if (txb.dotProduct(normal) < 0.0f) + { + tangent *= -1.0f; + binormal *= -1.0f; + } +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.h new file mode 100644 index 0000000..cb3665c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkinnedMesh.h @@ -0,0 +1,215 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +//New skinned mesh + +#ifndef __C_SKINNED_MESH_H_INCLUDED__ +#define __C_SKINNED_MESH_H_INCLUDED__ + +#include "ISkinnedMesh.h" +#include "SMeshBuffer.h" +#include "S3DVertex.h" +#include "irrString.h" +#include "matrix4.h" +#include "quaternion.h" + +namespace irr +{ +namespace scene +{ + + class IAnimatedMeshSceneNode; + class IBoneSceneNode; + + class CSkinnedMesh: public ISkinnedMesh + { + public: + + //! constructor + CSkinnedMesh(); + + //! destructor + virtual ~CSkinnedMesh(); + + //! returns the amount of frames. If the amount is 1, it is a static (=non animated) mesh. + virtual u32 getFrameCount() const; + + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const; + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps); + + //! returns the animated mesh based on a detail level (which is ignored) + virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1); + + //! Animates this mesh's joints based on frame input + //! blend: {0-old position, 1-New position} + virtual void animateMesh(f32 frame, f32 blend); + + //! Preforms a software skin on this mesh based of joint positions + virtual void skinMesh(); + + //! returns amount of mesh buffers. + virtual u32 getMeshBufferCount() const; + + //! returns pointer to a mesh buffer + virtual IMeshBuffer* getMeshBuffer(u32 nr) const; + + //! Returns pointer to a mesh buffer which fits a material + /** \param material: material to search for + \return Returns the pointer to the mesh buffer or + NULL if there is no such mesh buffer. */ + virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const; + + //! returns an axis aligned bounding box + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! set user axis aligned bounding box + virtual void setBoundingBox( const core::aabbox3df& box); + + //! sets a flag of all contained materials to a new value + virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue); + + //! set the hardware mapping hint, for driver + virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! flags the meshbuffer as changed, reloads hardware buffers + virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX); + + //! Returns the type of the animated mesh. + virtual E_ANIMATED_MESH_TYPE getMeshType() const; + + //! Gets joint count. + virtual u32 getJointCount() const; + + //! Gets the name of a joint. + virtual const c8* getJointName(u32 number) const; + + //! Gets a joint number from its name + virtual s32 getJointNumber(const c8* name) const; + + //! uses animation from another mesh + virtual bool useAnimationFrom(const ISkinnedMesh *mesh); + + //! Update Normals when Animating + //! False= Don't (default) + //! True = Update normals, slower + virtual void updateNormalsWhenAnimating(bool on); + + //! Sets Interpolation Mode + virtual void setInterpolationMode(E_INTERPOLATION_MODE mode); + + //! Convertes the mesh to contain tangent information + virtual void convertMeshToTangents(); + + //! Does the mesh have no animation + virtual bool isStatic(); + + //! (This feature is not implemented in irrlicht yet) + virtual bool setHardwareSkinning(bool on); + + //Interface for the mesh loaders (finalize should lock these functions, and they should have some prefix like loader_ + //these functions will use the needed arrays, set values, etc to help the loaders + + //! exposed for loaders to add mesh buffers + virtual core::array<SSkinMeshBuffer*> &getMeshBuffers(); + + //! alternative method for adding joints + virtual core::array<SJoint*> &getAllJoints(); + + //! alternative method for adding joints + virtual const core::array<SJoint*> &getAllJoints() const; + + //! loaders should call this after populating the mesh + virtual void finalize(); + + //! Adds a new meshbuffer to the mesh, access it as last one + virtual SSkinMeshBuffer *addMeshBuffer(); + + //! Adds a new joint to the mesh, access it as last one + virtual SJoint *addJoint(SJoint *parent=0); + + //! Adds a new position key to the mesh, access it as last one + virtual SPositionKey *addPositionKey(SJoint *joint); + //! Adds a new rotation key to the mesh, access it as last one + virtual SRotationKey *addRotationKey(SJoint *joint); + //! Adds a new scale key to the mesh, access it as last one + virtual SScaleKey *addScaleKey(SJoint *joint); + + //! Adds a new weight to the mesh, access it as last one + virtual SWeight *addWeight(SJoint *joint); + + virtual void updateBoundingBox(void); + + //! Recovers the joints from the mesh + void recoverJointsFromMesh(core::array<IBoneSceneNode*> &jointChildSceneNodes); + + //! Tranfers the joint data to the mesh + void transferJointsToMesh(const core::array<IBoneSceneNode*> &jointChildSceneNodes); + + //! Tranfers the joint hints to the mesh + void transferOnlyJointsHintsToMesh(const core::array<IBoneSceneNode*> &jointChildSceneNodes); + + //! Creates an array of joints from this mesh as children of node + void addJoints(core::array<IBoneSceneNode*> &jointChildSceneNodes, + IAnimatedMeshSceneNode* node, + ISceneManager* smgr); + +private: + void checkForAnimation(); + + void normalizeWeights(); + + void buildAllLocalAnimatedMatrices(); + + void buildAllGlobalAnimatedMatrices(SJoint *Joint=0, SJoint *ParentJoint=0); + + void getFrameData(f32 frame, SJoint *Node, + core::vector3df &position, s32 &positionHint, + core::vector3df &scale, s32 &scaleHint, + core::quaternion &rotation, s32 &rotationHint); + + void calculateGlobalMatrices(SJoint *Joint,SJoint *ParentJoint); + + void skinJoint(SJoint *Joint, SJoint *ParentJoint); + + void calculateTangents(core::vector3df& normal, + core::vector3df& tangent, core::vector3df& binormal, + core::vector3df& vt1, core::vector3df& vt2, core::vector3df& vt3, + core::vector2df& tc1, core::vector2df& tc2, core::vector2df& tc3); + + core::array<SSkinMeshBuffer*> *SkinningBuffers; //Meshbuffer to skin, default is to skin localBuffers + + core::array<SSkinMeshBuffer*> LocalBuffers; + + core::array<SJoint*> AllJoints; + core::array<SJoint*> RootJoints; + + core::array< core::array<bool> > Vertices_Moved; + + core::aabbox3d<f32> BoundingBox; + + f32 AnimationFrames; + f32 FramesPerSecond; + + f32 LastAnimatedFrame; + bool SkinnedLastFrame; + + E_INTERPOLATION_MODE InterpolationMode:8; + + bool HasAnimation; + bool PreparedForSkinning; + bool AnimateNormals; + bool HardwareSkinning; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.cpp new file mode 100644 index 0000000..756fab9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.cpp @@ -0,0 +1,263 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSkyBoxSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" +#include "S3DVertex.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSkyBoxSceneNode::CSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom, video::ITexture* left, + video::ITexture* right, video::ITexture* front, video::ITexture* back, ISceneNode* parent, ISceneManager* mgr, s32 id) +: ISceneNode(parent, mgr, id) +{ + #ifdef _DEBUG + setDebugName("CSkyBoxSceneNode"); + #endif + + setAutomaticCulling(scene::EAC_OFF); + Box.MaxEdge.set(0,0,0); + Box.MinEdge.set(0,0,0); + + // create indices + + Indices[0] = 0; + Indices[1] = 1; + Indices[2] = 2; + Indices[3] = 3; + + // create material + + video::SMaterial mat; + mat.Lighting = false; + mat.ZBuffer = video::ECFN_NEVER; + mat.ZWriteEnable = false; + mat.AntiAliasing=0; + mat.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE; + mat.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE; + + /* Hey, I am no artist, but look at that + cool ASCII art I made! ;) + + -111 111 + /6--------/5 y + / | / | ^ z + / | 11-1 | | / + -11-1 3---------2 | |/ + | 7- - -| -4 1-11 *---->x + | -1-11 | / 3-------|2 + |/ | / | //| + 0---------1/ | // | + -1-1-1 1-1-1 |// | + 0--------1 + */ + + video::ITexture* tex = front; + if (!tex) tex = left; + if (!tex) tex = back; + if (!tex) tex = right; + if (!tex) tex = top; + if (!tex) tex = bottom; + + const f32 onepixel = tex?(1.0f / (tex->getSize().Width * 1.5f)) : 0.0f; + const f32 t = 1.0f - onepixel; + const f32 o = 0.0f + onepixel; + + // create front side + + Material[0] = mat; + Material[0].setTexture(0, front); + Vertices[0] = video::S3DVertex(-1,-1,-1, 0,0,1, video::SColor(255,255,255,255), t, t); + Vertices[1] = video::S3DVertex( 1,-1,-1, 0,0,1, video::SColor(255,255,255,255), o, t); + Vertices[2] = video::S3DVertex( 1, 1,-1, 0,0,1, video::SColor(255,255,255,255), o, o); + Vertices[3] = video::S3DVertex(-1, 1,-1, 0,0,1, video::SColor(255,255,255,255), t, o); + + // create left side + + Material[1] = mat; + Material[1].setTexture(0, left); + Vertices[4] = video::S3DVertex( 1,-1,-1, -1,0,0, video::SColor(255,255,255,255), t, t); + Vertices[5] = video::S3DVertex( 1,-1, 1, -1,0,0, video::SColor(255,255,255,255), o, t); + Vertices[6] = video::S3DVertex( 1, 1, 1, -1,0,0, video::SColor(255,255,255,255), o, o); + Vertices[7] = video::S3DVertex( 1, 1,-1, -1,0,0, video::SColor(255,255,255,255), t, o); + + // create back side + + Material[2] = mat; + Material[2].setTexture(0, back); + Vertices[8] = video::S3DVertex( 1,-1, 1, 0,0,-1, video::SColor(255,255,255,255), t, t); + Vertices[9] = video::S3DVertex(-1,-1, 1, 0,0,-1, video::SColor(255,255,255,255), o, t); + Vertices[10] = video::S3DVertex(-1, 1, 1, 0,0,-1, video::SColor(255,255,255,255), o, o); + Vertices[11] = video::S3DVertex( 1, 1, 1, 0,0,-1, video::SColor(255,255,255,255), t, o); + + // create right side + + Material[3] = mat; + Material[3].setTexture(0, right); + Vertices[12] = video::S3DVertex(-1,-1, 1, 1,0,0, video::SColor(255,255,255,255), t, t); + Vertices[13] = video::S3DVertex(-1,-1,-1, 1,0,0, video::SColor(255,255,255,255), o, t); + Vertices[14] = video::S3DVertex(-1, 1,-1, 1,0,0, video::SColor(255,255,255,255), o, o); + Vertices[15] = video::S3DVertex(-1, 1, 1, 1,0,0, video::SColor(255,255,255,255), t, o); + + // create top side + + Material[4] = mat; + Material[4].setTexture(0, top); + Vertices[16] = video::S3DVertex( 1, 1,-1, 0,-1,0, video::SColor(255,255,255,255), t, t); + Vertices[17] = video::S3DVertex( 1, 1, 1, 0,-1,0, video::SColor(255,255,255,255), o, t); + Vertices[18] = video::S3DVertex(-1, 1, 1, 0,-1,0, video::SColor(255,255,255,255), o, o); + Vertices[19] = video::S3DVertex(-1, 1,-1, 0,-1,0, video::SColor(255,255,255,255), t, o); + + // create bottom side + + Material[5] = mat; + Material[5].setTexture(0, bottom); + Vertices[20] = video::S3DVertex( 1,-1, 1, 0,1,0, video::SColor(255,255,255,255), o, o); + Vertices[21] = video::S3DVertex( 1,-1,-1, 0,1,0, video::SColor(255,255,255,255), t, o); + Vertices[22] = video::S3DVertex(-1,-1,-1, 0,1,0, video::SColor(255,255,255,255), t, t); + Vertices[23] = video::S3DVertex(-1,-1, 1, 0,1,0, video::SColor(255,255,255,255), o, t); +} + + +//! renders the node. +void CSkyBoxSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + scene::ICameraSceneNode* camera = SceneManager->getActiveCamera(); + + if (!camera || !driver) + return; + + if ( !camera->isOrthogonal() ) + { + // draw perspective skybox + + core::matrix4 translate(AbsoluteTransformation); + translate.setTranslation(camera->getAbsolutePosition()); + + // Draw the sky box between the near and far clip plane + const f32 viewDistance = (camera->getNearValue() + camera->getFarValue()) * 0.5f; + core::matrix4 scale; + scale.setScale(core::vector3df(viewDistance, viewDistance, viewDistance)); + + driver->setTransform(video::ETS_WORLD, translate * scale); + + for (s32 i=0; i<6; ++i) + { + driver->setMaterial(Material[i]); + driver->drawIndexedTriangleFan(&Vertices[i*4], 4, Indices, 2); + } + } + else + { + // draw orthogonal skybox, + // simply choose one texture and draw it as 2d picture. + // there could be better ways to do this, but currently I think this is ok. + + core::vector3df lookVect = camera->getTarget() - camera->getAbsolutePosition(); + lookVect.normalize(); + core::vector3df absVect( core::abs_(lookVect.X), + core::abs_(lookVect.Y), + core::abs_(lookVect.Z)); + + int idx = 0; + + if ( absVect.X >= absVect.Y && absVect.X >= absVect.Z ) + { + // x direction + idx = lookVect.X > 0 ? 0 : 2; + } + else + if ( absVect.Y >= absVect.X && absVect.Y >= absVect.Z ) + { + // y direction + idx = lookVect.Y > 0 ? 4 : 5; + } + else + if ( absVect.Z >= absVect.X && absVect.Z >= absVect.Y ) + { + // z direction + idx = lookVect.Z > 0 ? 1 : 3; + } + + video::ITexture* tex = Material[idx].getTexture(0); + + if ( tex ) + { + core::rect<s32> rctDest(core::position2d<s32>(-1,0), + core::dimension2di(driver->getCurrentRenderTargetSize())); + core::rect<s32> rctSrc(core::position2d<s32>(0,0), + core::dimension2di(tex->getSize())); + + driver->draw2DImage(tex, rctDest, rctSrc); + } + } +} + + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CSkyBoxSceneNode::getBoundingBox() const +{ + return Box; +} + + +void CSkyBoxSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + SceneManager->registerNodeForRendering(this, ESNRP_SKY_BOX); + + ISceneNode::OnRegisterSceneNode(); +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hirachy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& CSkyBoxSceneNode::getMaterial(u32 i) +{ + return Material[i]; +} + + +//! returns amount of materials used by this scene node. +u32 CSkyBoxSceneNode::getMaterialCount() const +{ + return 6; +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CSkyBoxSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) newParent = Parent; + if (!newManager) newManager = SceneManager; + + CSkyBoxSceneNode* nb = new CSkyBoxSceneNode(0,0,0,0,0,0, newParent, + newManager, ID); + + nb->cloneMembers(this, newManager); + + for (u32 i=0; i<6; ++i) + nb->Material[i] = Material[i]; + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.h new file mode 100644 index 0000000..91580dc --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyBoxSceneNode.h @@ -0,0 +1,62 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SKY_BOX_SCENE_NODE_H_INCLUDED__ +#define __C_SKY_BOX_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace scene +{ + + // Skybox, rendered with zbuffer turned off, before all other nodes. + class CSkyBoxSceneNode : public ISceneNode + { + public: + + //! constructor + CSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom, video::ITexture* left, + video::ITexture* right, video::ITexture* front, video::ITexture* back, + ISceneNode* parent, ISceneManager* mgr, s32 id); + + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! returns the material based on the zero based index i. To get the amount + //! of materials used by this scene node, use getMaterialCount(). + //! This function is needed for inserting the node into the scene hirachy on a + //! optimal position for minimizing renderstate changes, but can also be used + //! to directly modify the material of a scene node. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_SKY_BOX; } + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + private: + + core::aabbox3d<f32> Box; + u16 Indices[4]; + video::S3DVertex Vertices[4*6]; + video::SMaterial Material[6]; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.cpp new file mode 100644 index 0000000..0554661 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.cpp @@ -0,0 +1,264 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// Code for this scene node has been contributed by Anders la Cour-Harbo (alc) + +#include "CSkyDomeSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" +#include "IAnimatedMesh.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +/* horiRes and vertRes: + Controls the number of faces along the horizontal axis (30 is a good value) + and the number of faces along the vertical axis (8 is a good value). + + texturePercentage: + Only the top texturePercentage of the image is used, e.g. 0.8 uses the top 80% of the image, + 1.0 uses the entire image. This is useful as some landscape images have a small banner + at the bottom that you don't want. + + spherePercentage: + This controls how far around the sphere the sky dome goes. For value 1.0 you get exactly the upper + hemisphere, for 1.1 you get slightly more, and for 2.0 you get a full sphere. It is sometimes useful + to use a value slightly bigger than 1 to avoid a gap between some ground place and the sky. This + parameters stretches the image to fit the chosen "sphere-size". */ + +CSkyDomeSceneNode::CSkyDomeSceneNode(video::ITexture* sky, u32 horiRes, u32 vertRes, + f32 texturePercentage, f32 spherePercentage, f32 radius, + ISceneNode* parent, ISceneManager* mgr, s32 id) + : ISceneNode(parent, mgr, id), Buffer(0), + HorizontalResolution(horiRes), VerticalResolution(vertRes), + TexturePercentage(texturePercentage), + SpherePercentage(spherePercentage), Radius(radius) +{ + #ifdef _DEBUG + setDebugName("CSkyDomeSceneNode"); + #endif + + setAutomaticCulling(scene::EAC_OFF); + + Buffer = new SMeshBuffer(); + Buffer->Material.Lighting = false; + Buffer->Material.ZBuffer = video::ECFN_NEVER; + Buffer->Material.ZWriteEnable = false; + Buffer->Material.AntiAliasing = video::EAAM_OFF; + Buffer->Material.setTexture(0, sky); + Buffer->BoundingBox.MaxEdge.set(0,0,0); + Buffer->BoundingBox.MinEdge.set(0,0,0); + + // regenerate the mesh + generateMesh(); +} + + +CSkyDomeSceneNode::~CSkyDomeSceneNode() +{ + if (Buffer) + Buffer->drop(); +} + + +void CSkyDomeSceneNode::generateMesh() +{ + f32 azimuth; + u32 k; + + Buffer->Vertices.clear(); + Buffer->Indices.clear(); + + const f32 azimuth_step = (core::PI * 2.f) / HorizontalResolution; + if (SpherePercentage < 0.f) + SpherePercentage = -SpherePercentage; + if (SpherePercentage > 2.f) + SpherePercentage = 2.f; + const f32 elevation_step = SpherePercentage * core::HALF_PI / (f32)VerticalResolution; + + Buffer->Vertices.reallocate( (HorizontalResolution + 1) * (VerticalResolution + 1) ); + Buffer->Indices.reallocate(3 * (2*VerticalResolution - 1) * HorizontalResolution); + + video::S3DVertex vtx; + vtx.Color.set(255,255,255,255); + vtx.Normal.set(0.0f,-1.f,0.0f); + + const f32 tcV = TexturePercentage / VerticalResolution; + for (k = 0, azimuth = 0; k <= HorizontalResolution; ++k) + { + f32 elevation = core::HALF_PI; + const f32 tcU = (f32)k / (f32)HorizontalResolution; + const f32 sinA = sinf(azimuth); + const f32 cosA = cosf(azimuth); + for (u32 j = 0; j <= VerticalResolution; ++j) + { + const f32 cosEr = Radius * cosf(elevation); + vtx.Pos.set(cosEr*sinA, Radius*sinf(elevation), cosEr*cosA); + vtx.TCoords.set(tcU, j*tcV); + + vtx.Normal = -vtx.Pos; + vtx.Normal.normalize(); + + Buffer->Vertices.push_back(vtx); + elevation -= elevation_step; + } + azimuth += azimuth_step; + } + + for (k = 0; k < HorizontalResolution; ++k) + { + Buffer->Indices.push_back(VerticalResolution + 2 + (VerticalResolution + 1)*k); + Buffer->Indices.push_back(1 + (VerticalResolution + 1)*k); + Buffer->Indices.push_back(0 + (VerticalResolution + 1)*k); + + for (u32 j = 1; j < VerticalResolution; ++j) + { + Buffer->Indices.push_back(VerticalResolution + 2 + (VerticalResolution + 1)*k + j); + Buffer->Indices.push_back(1 + (VerticalResolution + 1)*k + j); + Buffer->Indices.push_back(0 + (VerticalResolution + 1)*k + j); + + Buffer->Indices.push_back(VerticalResolution + 1 + (VerticalResolution + 1)*k + j); + Buffer->Indices.push_back(VerticalResolution + 2 + (VerticalResolution + 1)*k + j); + Buffer->Indices.push_back(0 + (VerticalResolution + 1)*k + j); + } + } + Buffer->setHardwareMappingHint(scene::EHM_STATIC); +} + + +//! renders the node. +void CSkyDomeSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + scene::ICameraSceneNode* camera = SceneManager->getActiveCamera(); + + if (!camera || !driver) + return; + + if ( !camera->isOrthogonal() ) + { + core::matrix4 mat(AbsoluteTransformation); + mat.setTranslation(camera->getAbsolutePosition()); + + driver->setTransform(video::ETS_WORLD, mat); + + driver->setMaterial(Buffer->Material); + driver->drawMeshBuffer(Buffer); + } + + // for debug purposes only: + if ( DebugDataVisible ) + { + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + + if ( DebugDataVisible & scene::EDS_NORMALS ) + { + // draw normals + const f32 debugNormalLength = SceneManager->getParameters()->getAttributeAsFloat(DEBUG_NORMAL_LENGTH); + const video::SColor debugNormalColor = SceneManager->getParameters()->getAttributeAsColor(DEBUG_NORMAL_COLOR); + driver->drawMeshBufferNormals(Buffer, debugNormalLength, debugNormalColor); + } + + // show mesh + if ( DebugDataVisible & scene::EDS_MESH_WIRE_OVERLAY ) + { + m.Wireframe = true; + driver->setMaterial(m); + + driver->drawMeshBuffer(Buffer); + } + } +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CSkyDomeSceneNode::getBoundingBox() const +{ + return Buffer->BoundingBox; +} + + +void CSkyDomeSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + { + SceneManager->registerNodeForRendering(this, ESNRP_SKY_BOX ); + } + + ISceneNode::OnRegisterSceneNode(); +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hirachy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& CSkyDomeSceneNode::getMaterial(u32 i) +{ + return Buffer->Material; +} + + +//! returns amount of materials used by this scene node. +u32 CSkyDomeSceneNode::getMaterialCount() const +{ + return 1; +} + + +//! Writes attributes of the scene node. +void CSkyDomeSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ISceneNode::serializeAttributes(out, options); + + out->addInt ("HorizontalResolution", HorizontalResolution); + out->addInt ("VerticalResolution", VerticalResolution); + out->addFloat("TexturePercentage", TexturePercentage); + out->addFloat("SpherePercentage", SpherePercentage); + out->addFloat("Radius", Radius); +} + + +//! Reads attributes of the scene node. +void CSkyDomeSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + HorizontalResolution = in->getAttributeAsInt ("HorizontalResolution"); + VerticalResolution = in->getAttributeAsInt ("VerticalResolution"); + TexturePercentage = in->getAttributeAsFloat("TexturePercentage"); + SpherePercentage = in->getAttributeAsFloat("SpherePercentage"); + Radius = in->getAttributeAsFloat("Radius"); + + ISceneNode::deserializeAttributes(in, options); + + // regenerate the mesh + generateMesh(); +} + +//! Creates a clone of this scene node and its children. +ISceneNode* CSkyDomeSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CSkyDomeSceneNode* nb = new CSkyDomeSceneNode(Buffer->Material.TextureLayer[0].Texture, HorizontalResolution, VerticalResolution, TexturePercentage, + SpherePercentage, Radius, newParent, newManager, ID); + + nb->cloneMembers(this, newManager); + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // namespace scene +} // namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.h new file mode 100644 index 0000000..9795b68 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSkyDomeSceneNode.h @@ -0,0 +1,50 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// Code for this scene node has been contributed by Anders la Cour-Harbo (alc) + +#ifndef __C_SKY_DOME_SCENE_NODE_H_INCLUDED__ +#define __C_SKY_DOME_SCENE_NODE_H_INCLUDED__ + +#include "ISceneNode.h" +#include "SMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + +class CSkyDomeSceneNode : public ISceneNode +{ + public: + CSkyDomeSceneNode(video::ITexture* texture, u32 horiRes, u32 vertRes, + f32 texturePercentage, f32 spherePercentage, f32 radius, + ISceneNode* parent, ISceneManager* smgr, s32 id); + virtual ~CSkyDomeSceneNode(); + virtual void OnRegisterSceneNode(); + virtual void render(); + virtual const core::aabbox3d<f32>& getBoundingBox() const; + virtual video::SMaterial& getMaterial(u32 i); + virtual u32 getMaterialCount() const; + virtual ESCENE_NODE_TYPE getType() const { return ESNT_SKY_DOME; } + + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + private: + + void generateMesh(); + + SMeshBuffer* Buffer; + + u32 HorizontalResolution, VerticalResolution; + f32 TexturePercentage, SpherePercentage, Radius; +}; + + +} +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h new file mode 100644 index 0000000..8093613 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftware2MaterialRenderer.h @@ -0,0 +1,118 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SOFTWARE2_MATERIAL_RENDERER_H_INCLUDED__ +#define __C_SOFTWARE2_MATERIAL_RENDERER_H_INCLUDED__ + +#include "SoftwareDriver2_compile_config.h" + +#include "IMaterialRenderer.h" +#include "CSoftwareDriver2.h" + +namespace irr +{ +namespace video +{ + +//! Base class for all internal Software2 material renderers +class CSoftware2MaterialRenderer : public IMaterialRenderer +{ +public: + + //! Constructor + CSoftware2MaterialRenderer(video::CBurningVideoDriver* driver) + : Driver(driver) + { + } + +protected: + + video::CBurningVideoDriver* Driver; +}; + +//! solid material renderer +class CSoftware2MaterialRenderer_SOLID : public CSoftware2MaterialRenderer +{ +public: + CSoftware2MaterialRenderer_SOLID ( video::CBurningVideoDriver* driver ) + :CSoftware2MaterialRenderer ( driver ) {} + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return false; + } + +}; + + + +//! Transparent material renderer +class CSoftware2MaterialRenderer_TRANSPARENT_ADD_COLOR : public CSoftware2MaterialRenderer +{ +public: + CSoftware2MaterialRenderer_TRANSPARENT_ADD_COLOR ( video::CBurningVideoDriver* driver ) + : CSoftware2MaterialRenderer ( driver ) {} + + + //! Returns if the material is transparent. + virtual bool isTransparent() const + { + return true; + } + +}; + +//! unsupported material renderer +class CSoftware2MaterialRenderer_UNSUPPORTED : public CSoftware2MaterialRenderer +{ +public: + CSoftware2MaterialRenderer_UNSUPPORTED ( video::CBurningVideoDriver* driver ) + : CSoftware2MaterialRenderer ( driver ) {} + + virtual s32 getRenderCapability() const { return 1; } + +}; + +//! unsupported material renderer +class CBurningShader_REFERENCE : public CSoftware2MaterialRenderer +{ +public: + CBurningShader_REFERENCE ( video::CBurningVideoDriver* driver ) + : CSoftware2MaterialRenderer ( driver ) {} + + virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, + bool resetAllRenderstates, IMaterialRendererServices* services) + { + } + + virtual void OnUnsetMaterial() + { + } + + virtual bool isTransparent() const + { + return false; + } + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) + { + return true; + }; + + + virtual s32 getRenderCapability() const + { + return 1; + } + +}; + + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.cpp new file mode 100644 index 0000000..e079b07 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.cpp @@ -0,0 +1,973 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CSoftwareDriver.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +#include "CSoftwareTexture.h" +#include "CBlit.h" +#include "os.h" +#include "S3DVertex.h" + +namespace irr +{ +namespace video +{ + + +//! constructor +CSoftwareDriver::CSoftwareDriver(const core::dimension2d<u32>& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter) +: CNullDriver(io, windowSize), BackBuffer(0), Presenter(presenter), WindowId(0), + SceneSourceRect(0), RenderTargetTexture(0), RenderTargetSurface(0), + CurrentTriangleRenderer(0), ZBuffer(0), Texture(0) +{ + #ifdef _DEBUG + setDebugName("CSoftwareDriver"); + #endif + + // create backbuffer + + BackBuffer = new CImage(ECF_A1R5G5B5, windowSize); + if (BackBuffer) + { + BackBuffer->fill(SColor(0)); + + // create z buffer + ZBuffer = video::createZBuffer(BackBuffer->getDimension()); + } + + DriverAttributes->setAttribute("MaxTextures", 1); + DriverAttributes->setAttribute("MaxIndices", 1<<16); + DriverAttributes->setAttribute("MaxTextureSize", 1024); + DriverAttributes->setAttribute("Version", 1); + + // create triangle renderers + + TriangleRenderers[ETR_FLAT] = createTriangleRendererFlat(ZBuffer); + TriangleRenderers[ETR_FLAT_WIRE] = createTriangleRendererFlatWire(ZBuffer); + TriangleRenderers[ETR_GOURAUD] = createTriangleRendererGouraud(ZBuffer); + TriangleRenderers[ETR_GOURAUD_WIRE] = createTriangleRendererGouraudWire(ZBuffer); + TriangleRenderers[ETR_TEXTURE_FLAT] = createTriangleRendererTextureFlat(ZBuffer); + TriangleRenderers[ETR_TEXTURE_FLAT_WIRE] = createTriangleRendererTextureFlatWire(ZBuffer); + TriangleRenderers[ETR_TEXTURE_GOURAUD] = createTriangleRendererTextureGouraud(ZBuffer); + TriangleRenderers[ETR_TEXTURE_GOURAUD_WIRE] = createTriangleRendererTextureGouraudWire(ZBuffer); + TriangleRenderers[ETR_TEXTURE_GOURAUD_NOZ] = createTriangleRendererTextureGouraudNoZ(); + TriangleRenderers[ETR_TEXTURE_GOURAUD_ADD] = createTriangleRendererTextureGouraudAdd(ZBuffer); + + // select render target + + setRenderTarget(BackBuffer); + + // select the right renderer + + selectRightTriangleRenderer(); +} + + + +//! destructor +CSoftwareDriver::~CSoftwareDriver() +{ + // delete Backbuffer + if (BackBuffer) + BackBuffer->drop(); + + // delete triangle renderers + + for (s32 i=0; i<ETR_COUNT; ++i) + if (TriangleRenderers[i]) + TriangleRenderers[i]->drop(); + + // delete zbuffer + + if (ZBuffer) + ZBuffer->drop(); + + // delete current texture + + if (Texture) + Texture->drop(); + + if (RenderTargetTexture) + RenderTargetTexture->drop(); + + if (RenderTargetSurface) + RenderTargetSurface->drop(); +} + + + +//! switches to a triangle renderer +void CSoftwareDriver::switchToTriangleRenderer(ETriangleRenderer renderer) +{ + video::IImage* s = 0; + if (Texture) + s = ((CSoftwareTexture*)Texture)->getTexture(); + + CurrentTriangleRenderer = TriangleRenderers[renderer]; + CurrentTriangleRenderer->setBackfaceCulling(Material.BackfaceCulling == true); + CurrentTriangleRenderer->setTexture(s); + CurrentTriangleRenderer->setRenderTarget(RenderTargetSurface, ViewPort); +} + + +//! void selects the right triangle renderer based on the render states. +void CSoftwareDriver::selectRightTriangleRenderer() +{ + + ETriangleRenderer renderer = ETR_FLAT; + + if (Texture) + { + if (!Material.GouraudShading) + renderer = (!Material.Wireframe) ? ETR_TEXTURE_FLAT : ETR_TEXTURE_FLAT_WIRE; + else + { + if (Material.Wireframe) + renderer = ETR_TEXTURE_GOURAUD_WIRE; + else + { + if (Material.MaterialType == EMT_TRANSPARENT_ADD_COLOR || + Material.MaterialType == EMT_TRANSPARENT_ALPHA_CHANNEL || + Material.MaterialType == EMT_TRANSPARENT_VERTEX_ALPHA) + { + // simply draw all transparent stuff with the same renderer. at + // least it is transparent then. + renderer = ETR_TEXTURE_GOURAUD_ADD; + } + else + if ((Material.ZBuffer==ECFN_NEVER) && !Material.ZWriteEnable) + renderer = ETR_TEXTURE_GOURAUD_NOZ; + else + { + renderer = ETR_TEXTURE_GOURAUD; + } + } + } + } + else + { + if (!Material.GouraudShading) + renderer = (!Material.Wireframe) ? ETR_FLAT : ETR_FLAT_WIRE; + else + renderer = (!Material.Wireframe) ? ETR_GOURAUD : ETR_GOURAUD_WIRE; + } + + switchToTriangleRenderer(renderer); +} + + +//! queries the features of the driver, returns true if feature is available +bool CSoftwareDriver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const +{ + switch (feature) + { + case EVDF_RENDER_TO_TARGET: + case EVDF_TEXTURE_NSQUARE: + return FeatureEnabled[feature]; + default: + return false; + }; +} + + +//! sets transformation +void CSoftwareDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) +{ + TransformationMatrix[state] = mat; +} + + +//! sets the current Texture +bool CSoftwareDriver::setActiveTexture(u32 stage, video::ITexture* texture) +{ + if (texture && texture->getDriverType() != EDT_SOFTWARE) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + if (Texture) + Texture->drop(); + + Texture = texture; + + if (Texture) + Texture->grab(); + + selectRightTriangleRenderer(); + return true; +} + + +//! sets a material +void CSoftwareDriver::setMaterial(const SMaterial& material) +{ + Material = material; + OverrideMaterial.apply(Material); + + for (u32 i = 0; i < 1; ++i) + { + setActiveTexture(i, Material.getTexture(i)); + setTransform ((E_TRANSFORMATION_STATE) ( ETS_TEXTURE_0 + i ), + material.getTextureMatrix(i)); + } +} + + +//! clears the zbuffer +bool CSoftwareDriver::beginScene(bool backBuffer, bool zBuffer, SColor color, + const SExposedVideoData& videoData, core::rect<s32>* sourceRect) +{ + CNullDriver::beginScene(backBuffer, zBuffer, color, videoData, sourceRect); + WindowId=videoData.D3D9.HWnd; + SceneSourceRect = sourceRect; + + if (backBuffer && BackBuffer) + BackBuffer->fill(color); + + if (ZBuffer && zBuffer) + ZBuffer->clear(); + + return true; +} + + +//! presents the rendered scene on the screen, returns false if failed +bool CSoftwareDriver::endScene() +{ + CNullDriver::endScene(); + + return Presenter->present(BackBuffer, WindowId, SceneSourceRect); +} + + +//! returns a device dependent texture from a software surface (IImage) +//! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES +ITexture* CSoftwareDriver::createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData) +{ + return new CSoftwareTexture(surface, name, false, mipmapData); +} + + +//! sets a render target +bool CSoftwareDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color) +{ + if (texture && texture->getDriverType() != EDT_SOFTWARE) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + if (RenderTargetTexture) + RenderTargetTexture->drop(); + + RenderTargetTexture = texture; + + if (RenderTargetTexture) + { + RenderTargetTexture->grab(); + setRenderTarget(((CSoftwareTexture*)RenderTargetTexture)->getTexture()); + } + else + { + setRenderTarget(BackBuffer); + } + + if (RenderTargetSurface && (clearBackBuffer || clearZBuffer)) + { + if (clearZBuffer) + ZBuffer->clear(); + + if (clearBackBuffer) + RenderTargetSurface->fill(color); + } + + return true; +} + + +//! sets a render target +void CSoftwareDriver::setRenderTarget(video::CImage* image) +{ + if (RenderTargetSurface) + RenderTargetSurface->drop(); + + RenderTargetSurface = image; + RenderTargetSize.Width = 0; + RenderTargetSize.Height = 0; + Render2DTranslation.X = 0; + Render2DTranslation.Y = 0; + + if (RenderTargetSurface) + { + RenderTargetSurface->grab(); + RenderTargetSize = RenderTargetSurface->getDimension(); + } + + setViewPort(core::rect<s32>(0,0,RenderTargetSize.Width,RenderTargetSize.Height)); + + if (ZBuffer) + ZBuffer->setSize(RenderTargetSize); +} + + +//! sets a viewport +void CSoftwareDriver::setViewPort(const core::rect<s32>& area) +{ + ViewPort = area; + + //TODO: the clipping is not correct, because the projection is affected. + // to correct this, ViewPortSize and Render2DTranslation will have to be corrected. + core::rect<s32> rendert(0,0,RenderTargetSize.Width,RenderTargetSize.Height); + ViewPort.clipAgainst(rendert); + + ViewPortSize = core::dimension2du(ViewPort.getSize()); + Render2DTranslation.X = (ViewPortSize.Width / 2) + ViewPort.UpperLeftCorner.X; + Render2DTranslation.Y = ViewPort.UpperLeftCorner.Y + ViewPortSize.Height - (ViewPortSize.Height / 2);// + ViewPort.UpperLeftCorner.Y; + + if (CurrentTriangleRenderer) + CurrentTriangleRenderer->setRenderTarget(RenderTargetSurface, ViewPort); +} + + +void CSoftwareDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) + +{ + switch (iType) + { + case (EIT_16BIT): + { + drawVertexPrimitiveList16(vertices, vertexCount, (const u16*)indexList, primitiveCount, vType, pType); + break; + } + case (EIT_32BIT): + { + os::Printer::log("Software driver can not render 32bit buffers", ELL_ERROR); + break; + } + } +} + + +//! draws a vertex primitive list +void CSoftwareDriver::drawVertexPrimitiveList16(const void* vertices, u32 vertexCount, const u16* indexList, u32 primitiveCount, E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType) +{ + const u16* indexPointer=0; + core::array<u16> newBuffer; + switch (pType) + { + case scene::EPT_LINE_STRIP: + { + switch (vType) + { + case EVT_STANDARD: + { + for (u32 i=0; i < primitiveCount-1; ++i) + draw3DLine(((S3DVertex*)vertices)[indexList[i]].Pos, + ((S3DVertex*)vertices)[indexList[i+1]].Pos, + ((S3DVertex*)vertices)[indexList[i]].Color); + } + break; + case EVT_2TCOORDS: + { + for (u32 i=0; i < primitiveCount-1; ++i) + draw3DLine(((S3DVertex2TCoords*)vertices)[indexList[i]].Pos, + ((S3DVertex2TCoords*)vertices)[indexList[i+1]].Pos, + ((S3DVertex2TCoords*)vertices)[indexList[i]].Color); + } + break; + case EVT_TANGENTS: + { + for (u32 i=0; i < primitiveCount-1; ++i) + draw3DLine(((S3DVertexTangents*)vertices)[indexList[i]].Pos, + ((S3DVertexTangents*)vertices)[indexList[i+1]].Pos, + ((S3DVertexTangents*)vertices)[indexList[i]].Color); + } + break; + } + } + return; + case scene::EPT_LINE_LOOP: + drawVertexPrimitiveList16(vertices, vertexCount, indexList, primitiveCount-1, vType, scene::EPT_LINE_STRIP); + switch (vType) + { + case EVT_STANDARD: + draw3DLine(((S3DVertex*)vertices)[indexList[primitiveCount-1]].Pos, + ((S3DVertex*)vertices)[indexList[0]].Pos, + ((S3DVertex*)vertices)[indexList[primitiveCount-1]].Color); + break; + case EVT_2TCOORDS: + draw3DLine(((S3DVertex2TCoords*)vertices)[indexList[primitiveCount-1]].Pos, + ((S3DVertex2TCoords*)vertices)[indexList[0]].Pos, + ((S3DVertex2TCoords*)vertices)[indexList[primitiveCount-1]].Color); + break; + case EVT_TANGENTS: + draw3DLine(((S3DVertexTangents*)vertices)[indexList[primitiveCount-1]].Pos, + ((S3DVertexTangents*)vertices)[indexList[0]].Pos, + ((S3DVertexTangents*)vertices)[indexList[primitiveCount-1]].Color); + break; + } + return; + case scene::EPT_LINES: + { + switch (vType) + { + case EVT_STANDARD: + { + for (u32 i=0; i < 2*primitiveCount; i+=2) + draw3DLine(((S3DVertex*)vertices)[indexList[i]].Pos, + ((S3DVertex*)vertices)[indexList[i+1]].Pos, + ((S3DVertex*)vertices)[indexList[i]].Color); + } + break; + case EVT_2TCOORDS: + { + for (u32 i=0; i < 2*primitiveCount; i+=2) + draw3DLine(((S3DVertex2TCoords*)vertices)[indexList[i]].Pos, + ((S3DVertex2TCoords*)vertices)[indexList[i+1]].Pos, + ((S3DVertex2TCoords*)vertices)[indexList[i]].Color); + } + break; + case EVT_TANGENTS: + { + for (u32 i=0; i < 2*primitiveCount; i+=2) + draw3DLine(((S3DVertexTangents*)vertices)[indexList[i]].Pos, + ((S3DVertexTangents*)vertices)[indexList[i+1]].Pos, + ((S3DVertexTangents*)vertices)[indexList[i]].Color); + } + break; + } + } + return; + case scene::EPT_TRIANGLE_FAN: + { + // TODO: don't convert fan to list + newBuffer.reallocate(primitiveCount*3); + for( u32 t=0; t<primitiveCount; ++t ) + { + newBuffer.push_back(indexList[0]); + newBuffer.push_back(indexList[t+1]); + newBuffer.push_back(indexList[t+2]); + } + + indexPointer = newBuffer.pointer(); + } + break; + case scene::EPT_TRIANGLES: + indexPointer=indexList; + break; + default: + return; + } + switch (vType) + { + case EVT_STANDARD: + drawClippedIndexedTriangleListT((S3DVertex*)vertices, vertexCount, indexPointer, primitiveCount); + break; + case EVT_2TCOORDS: + drawClippedIndexedTriangleListT((S3DVertex2TCoords*)vertices, vertexCount, indexPointer, primitiveCount); + break; + case EVT_TANGENTS: + drawClippedIndexedTriangleListT((S3DVertexTangents*)vertices, vertexCount, indexPointer, primitiveCount); + break; + } +} + + +template<class VERTEXTYPE> +void CSoftwareDriver::drawClippedIndexedTriangleListT(const VERTEXTYPE* vertices, + s32 vertexCount, const u16* indexList, s32 triangleCount) +{ + if (!RenderTargetSurface || !ZBuffer || !triangleCount) + return; + + if (!checkPrimitiveCount(triangleCount)) + return; + + // arrays for storing clipped vertices + core::array<VERTEXTYPE> clippedVertices; + core::array<u16> clippedIndices; + + // calculate inverse world transformation + core::matrix4 worldinv(TransformationMatrix[ETS_WORLD]); + worldinv.makeInverse(); + + // calculate view frustum planes + scene::SViewFrustum frustum(TransformationMatrix[ETS_PROJECTION] * TransformationMatrix[ETS_VIEW]); + + // copy and transform clipping planes ignoring far plane + core::plane3df planes[5]; // ordered by near, left, right, bottom, top + for (int p=0; p<5; ++p) + worldinv.transformPlane(frustum.planes[p+1], planes[p]); + + core::EIntersectionRelation3D inout[3]; // is point in front or back of plane? + + // temporary buffer for vertices to be clipped by all planes + core::array<VERTEXTYPE> tClpBuf; + int t; + + int i; + for (i=0; i<triangleCount; ++i) // for all input triangles + { + // add next triangle to tempClipBuffer + for (t=0; t<3; ++t) + tClpBuf.push_back(vertices[indexList[(i*3)+t]]); + + for (int p=0; p<5; ++p) // for all clip planes + for (int v=0; v<(int)tClpBuf.size(); v+=3) // for all vertices in temp clip buffer + { + int inside = 0; + int outside = 0; + + // test intersection relation of the current vertices + for (t=0; t<3; ++t) + { + inout[t] = planes[p].classifyPointRelation(tClpBuf[v+t].Pos); + if (inout[t] != core::ISREL3D_FRONT) + ++inside; + else + if (inout[t] == core::ISREL3D_FRONT) + ++outside; + } + + if (!outside) + { + // add all vertices to new buffer, this triangle needs no clipping. + // so simply don't change this part of the temporary triangle buffer + continue; + } + + if (!inside) + { + // all vertices are outside, don't add this triangle, so erase this + // triangle from the tClpBuf + tClpBuf.erase(v,3); + v -= 3; + continue; + } + + // this vertex has to be clipped by this clipping plane. + + // The following lines represent my try to implement some real clipping. + // There is a bug somewhere, and after some time I've given up. + // So now it is commented out, resulting that triangles which would need clipping + // are simply taken out (in the next two lines). +#ifndef __SOFTWARE_CLIPPING_PROBLEM__ + tClpBuf.erase(v,3); + v -= 3; +#endif + + /* + // my idea is the following: + // current vertex to next vertex relation: + // out - out : add nothing + // out - in : add middle point + // in - out : add first and middle point + // in - in : add both + + + // now based on the number of intersections, create new vertices + // into tClpBuf (at the front for not letting them be clipped again) + + int added = 0; + int prev = v+2; + for (int index=v; index<v+3; ++index) + { + if (inout[prev] == core::ISREL3D_BACK) + { + if (inout[index] != core::ISREL3D_BACK) + { + VERTEXTYPE& vt1 = tClpBuf[prev]; + VERTEXTYPE& vt2 = tClpBuf[index]; + + f32 fact = planes[p].getKnownIntersectionWithLine(vt1.Pos, vt2.Pos); + VERTEXTYPE nvt; + nvt.Pos = vt1.Pos.getInterpolated(vt2.Pos, fact); + nvt.Color = vt1.Color.getInterpolated(vt2.Color, fact); + nvt.TCoords = vt1.TCoords.getInterpolated(vt2.TCoords, fact); + + tClpBuf.push_front(nvt); ++index; ++prev; ++v; + ++added; + } + } + else + { + if (inout[index] != core::ISREL3D_BACK) + { + VERTEXTYPE vt1 = tClpBuf[index]; + VERTEXTYPE vt2 = tClpBuf[prev]; + tClpBuf.push_front(vt1); ++index; ++prev; ++v; + tClpBuf.push_front(vt2); ++index; ++prev; ++v; + added+= 2; + } + else + { + // same as above, but other way round. + VERTEXTYPE vt1 = tClpBuf[index]; + VERTEXTYPE vt2 = tClpBuf[prev]; + + f32 fact = planes[p].getKnownIntersectionWithLine(vt1.Pos, vt2.Pos); + VERTEXTYPE nvt; + nvt.Pos = vt1.Pos.getInterpolated(vt2.Pos, fact); + nvt.Color = vt1.Color.getInterpolated(vt2.Color, fact); + nvt.TCoords = vt1.TCoords.getInterpolated(vt2.TCoords, fact); + + tClpBuf.push_front(vt2); ++index; ++prev; ++v; + tClpBuf.push_front(nvt); ++index; ++prev; ++v; + added += 2; + } + } + + prev = index; + } + + // erase original vertices + tClpBuf.erase(v,3); + v -= 3; + */ + + + } // end for all clip planes + + // now add all remaining triangles in tempClipBuffer to clippedIndices + // and clippedVertices array. + if (clippedIndices.size() + tClpBuf.size() < 65535) + for (t=0; t<(int)tClpBuf.size(); ++t) + { + clippedIndices.push_back(clippedVertices.size()); + clippedVertices.push_back(tClpBuf[t]); + } + tClpBuf.clear(); + + } // end for all input triangles + + + // draw newly created triangles. + + // ----------------------------------------------------------- + // here all triangles are being drawn. I put this in a separate + // method, but the visual studio 6 compiler has great problems + // with templates and didn't accept two template methods in this + // class. + + // draw triangles + + CNullDriver::drawVertexPrimitiveList(clippedVertices.pointer(), clippedVertices.size(), + clippedIndices.pointer(), clippedIndices.size()/3, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT); + + if (TransformedPoints.size() < clippedVertices.size()) + TransformedPoints.set_used(clippedVertices.size()); + + if (TransformedPoints.empty()) + return; + + const VERTEXTYPE* currentVertex = clippedVertices.pointer(); + S2DVertex* tp = &TransformedPoints[0]; + + core::dimension2d<u32> textureSize(0,0); + f32 zDiv; + + if (Texture) + textureSize = ((CSoftwareTexture*)Texture)->getTexture()->getDimension(); + + f32 transformedPos[4]; // transform all points in the list + + core::matrix4 matrix(TransformationMatrix[ETS_PROJECTION]); + matrix *= TransformationMatrix[ETS_VIEW]; + matrix *= TransformationMatrix[ETS_WORLD]; + + s32 ViewTransformWidth = (ViewPortSize.Width>>1); + s32 ViewTransformHeight = (ViewPortSize.Height>>1); + + for (i=0; i<(int)clippedVertices.size(); ++i) + { + transformedPos[0] = currentVertex->Pos.X; + transformedPos[1] = currentVertex->Pos.Y; + transformedPos[2] = currentVertex->Pos.Z; + transformedPos[3] = 1.0f; + + matrix.multiplyWith1x4Matrix(transformedPos); + zDiv = transformedPos[3] == 0.0f ? 1.0f : (1.0f / transformedPos[3]); + + tp->Pos.X = (s32)(ViewTransformWidth * (transformedPos[0] * zDiv) + (Render2DTranslation.X)); + tp->Pos.Y = (Render2DTranslation.Y - (s32)(ViewTransformHeight * (transformedPos[1] * zDiv))); + tp->Color = currentVertex->Color.toA1R5G5B5(); + tp->ZValue = (TZBufferType)(32767.0f * zDiv); + + tp->TCoords.X = (s32)(currentVertex->TCoords.X * textureSize.Width); + tp->TCoords.X <<= 8; + tp->TCoords.Y = (s32)(currentVertex->TCoords.Y * textureSize.Height); + tp->TCoords.Y <<= 8; + + ++currentVertex; + ++tp; + } + + // draw all transformed points from the index list + CurrentTriangleRenderer->drawIndexedTriangleList(&TransformedPoints[0], + clippedVertices.size(), clippedIndices.pointer(), clippedIndices.size()/3); +} + + +//! Draws a 3d line. +void CSoftwareDriver::draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color) +{ + core::vector3df vect = start.crossProduct(end); + vect.normalize(); + vect *= Material.Thickness*0.3f; + + S3DVertex vtx[4]; + + vtx[0].Color = color; + vtx[1].Color = color; + vtx[2].Color = color; + vtx[3].Color = color; + + vtx[0].Pos = start; + vtx[1].Pos = end; + + vtx[2].Pos = start + vect; + vtx[3].Pos = end + vect; + + u16 idx[12] = {0,1,2, 0,2,1, 0,1,3, 0,3,1}; + + drawIndexedTriangleList(vtx, 4, idx, 4); +} + + +//! clips a triangle against the viewing frustum +void CSoftwareDriver::clipTriangle(f32* transformedPos) +{ +} + + +//! Only used by the internal engine. Used to notify the driver that +//! the window was resized. +void CSoftwareDriver::OnResize(const core::dimension2d<u32>& size) +{ + // make sure width and height are multiples of 2 + core::dimension2d<u32> realSize(size); + + if (realSize.Width % 2) + realSize.Width += 1; + + if (realSize.Height % 2) + realSize.Height += 1; + + if (ScreenSize != realSize) + { + if (ViewPort.getWidth() == (s32)ScreenSize.Width && + ViewPort.getHeight() == (s32)ScreenSize.Height) + { + ViewPort = core::rect<s32>(core::position2d<s32>(0,0), + core::dimension2di(realSize)); + } + + ScreenSize = realSize; + + bool resetRT = (RenderTargetSurface == BackBuffer); + + if (BackBuffer) + BackBuffer->drop(); + BackBuffer = new CImage(ECF_A1R5G5B5, realSize); + + if (resetRT) + setRenderTarget(BackBuffer); + } +} + +//! returns the current render target size +const core::dimension2d<u32>& CSoftwareDriver::getCurrentRenderTargetSize() const +{ + return RenderTargetSize; +} + + +//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. +void CSoftwareDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + if (texture) + { + if (texture->getDriverType() != EDT_SOFTWARE) + { + os::Printer::log("Fatal Error: Tried to copy from a surface not owned by this driver.", ELL_ERROR); + return; + } + + if (useAlphaChannelOfTexture) + ((CSoftwareTexture*)texture)->getImage()->copyToWithAlpha( + RenderTargetSurface, destPos, sourceRect, color, clipRect); + else + ((CSoftwareTexture*)texture)->getImage()->copyTo( + RenderTargetSurface, destPos, sourceRect, clipRect); + } +} + + + +//! Draws a 2d line. +void CSoftwareDriver::draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color) +{ + drawLine(RenderTargetSurface, start, end, color ); +} + + +//! Draws a pixel +void CSoftwareDriver::drawPixel(u32 x, u32 y, const SColor & color) +{ + BackBuffer->setPixel(x, y, color, true); +} + + +//! draw a 2d rectangle +void CSoftwareDriver::draw2DRectangle(SColor color, const core::rect<s32>& pos, + const core::rect<s32>* clip) +{ + if (clip) + { + core::rect<s32> p(pos); + + p.clipAgainst(*clip); + + if(!p.isValid()) + return; + + drawRectangle(RenderTargetSurface, p, color); + } + else + { + if(!pos.isValid()) + return; + + drawRectangle(RenderTargetSurface, pos, color); + } +} + + +//!Draws an 2d rectangle with a gradient. +void CSoftwareDriver::draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip) +{ + // TODO: implement + draw2DRectangle(colorLeftUp, pos, clip); +} + + +//! \return Returns the name of the video driver. Example: In case of the Direct3D8 +//! driver, it would return "Direct3D8.1". +const wchar_t* CSoftwareDriver::getName() const +{ + return L"Irrlicht Software Driver 1.0"; +} + + +//! Returns type of video driver +E_DRIVER_TYPE CSoftwareDriver::getDriverType() const +{ + return EDT_SOFTWARE; +} + + +//! returns color format +ECOLOR_FORMAT CSoftwareDriver::getColorFormat() const +{ + if (BackBuffer) + return BackBuffer->getColorFormat(); + else + return CNullDriver::getColorFormat(); +} + + +//! Returns the transformation set by setTransform +const core::matrix4& CSoftwareDriver::getTransform(E_TRANSFORMATION_STATE state) const +{ + return TransformationMatrix[state]; +} + + +//! Creates a render target texture. +ITexture* CSoftwareDriver::addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, + const ECOLOR_FORMAT format) +{ + IImage* img = createImage(video::ECF_A1R5G5B5, size); + ITexture* tex = new CSoftwareTexture(img, name, true); + img->drop(); + addTexture(tex); + tex->drop(); + return tex; +} + + +//! Clears the ZBuffer. +void CSoftwareDriver::clearZBuffer() +{ + if (ZBuffer) + ZBuffer->clear(); +} + + +//! Returns an image created from the last rendered frame. +IImage* CSoftwareDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RENDER_TARGET target) +{ + if (target != video::ERT_FRAME_BUFFER) + return 0; + + if (BackBuffer) + { + IImage* tmp = createImage(BackBuffer->getColorFormat(), BackBuffer->getDimension()); + BackBuffer->copyTo(tmp); + return tmp; + } + else + return 0; +} + + +//! Returns the maximum amount of primitives (mostly vertices) which +//! the device is able to render with one drawIndexedTriangleList +//! call. +u32 CSoftwareDriver::getMaximalPrimitiveCount() const +{ + return 0x00800000; +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + + +//! creates a video driver +IVideoDriver* createSoftwareDriver(const core::dimension2d<u32>& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CSoftwareDriver(windowSize, fullscreen, io, presenter); + #else + return 0; + #endif +} + + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.h new file mode 100644 index 0000000..60b14c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver.h @@ -0,0 +1,180 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_VIDEO_SOFTWARE_H_INCLUDED__ +#define __C_VIDEO_SOFTWARE_H_INCLUDED__ + +#include "ITriangleRenderer.h" +#include "CNullDriver.h" +#include "SViewFrustum.h" +#include "CImage.h" + +namespace irr +{ +namespace video +{ + class CSoftwareDriver : public CNullDriver + { + public: + + //! constructor + CSoftwareDriver(const core::dimension2d<u32>& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter); + + //! destructor + virtual ~CSoftwareDriver(); + + //! queries the features of the driver, returns true if feature is available + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + + //! sets transformation + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); + + //! sets a material + virtual void setMaterial(const SMaterial& material); + + virtual bool setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color); + + //! sets a viewport + virtual void setViewPort(const core::rect<s32>& area); + + //! clears the zbuffer + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect<s32>* sourceRect=0); + + //! presents the rendered scene on the screen, returns false if failed + virtual bool endScene(); + + //! Only used by the internal engine. Used to notify the driver that + //! the window was resized. + virtual void OnResize(const core::dimension2d<u32>& size); + + //! returns size of the current render target + virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const; + + //! draws a vertex primitive list + void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType); + + //! Draws a 3d line. + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color = SColor(255,255,255,255)); + + //! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false); + + //! draw an 2d rectangle + virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos, + const core::rect<s32>* clip = 0); + + //!Draws an 2d rectangle with a gradient. + virtual void draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip = 0); + + //! Draws a 2d line. + virtual void draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color=SColor(255,255,255,255)); + + //! Draws a single pixel + virtual void drawPixel(u32 x, u32 y, const SColor & color); + + //! \return Returns the name of the video driver. Example: In case of the Direct3D8 + //! driver, it would return "Direct3D8.1". + virtual const wchar_t* getName() const; + + //! Returns type of video driver + virtual E_DRIVER_TYPE getDriverType() const; + + //! get color format of the current color buffer + virtual ECOLOR_FORMAT getColorFormat() const; + + //! Returns the transformation set by setTransform + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const; + + //! returns a device dependent texture from a software surface (IImage) + //! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES + virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData=0); + + //! Creates a render target texture. + virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! Clears the ZBuffer. + virtual void clearZBuffer(); + + //! Returns an image created from the last rendered frame. + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER); + + //! Returns the maximum amount of primitives (mostly vertices) which + //! the device is able to render with one drawIndexedTriangleList + //! call. + virtual u32 getMaximalPrimitiveCount() const; + + protected: + + //! sets a render target + void setRenderTarget(video::CImage* image); + + //! sets the current Texture + bool setActiveTexture(u32 stage, video::ITexture* texture); + + //! switches to a triangle renderer + void switchToTriangleRenderer(ETriangleRenderer renderer); + + //! void selects the right triangle renderer based on the render states. + void selectRightTriangleRenderer(); + + //! clips a triangle agains the viewing frustum + void clipTriangle(f32* transformedPos); + + + //! draws a vertex primitive list + void drawVertexPrimitiveList16(const void* vertices, u32 vertexCount, + const u16* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType); + + + template<class VERTEXTYPE> + void drawClippedIndexedTriangleListT(const VERTEXTYPE* vertices, + s32 vertexCount, const u16* indexList, s32 triangleCount); + + video::CImage* BackBuffer; + video::IImagePresenter* Presenter; + void* WindowId; + core::rect<s32>* SceneSourceRect; + + core::array<S2DVertex> TransformedPoints; + + video::ITexture* RenderTargetTexture; + video::CImage* RenderTargetSurface; + core::position2d<s32> Render2DTranslation; + core::dimension2d<u32> RenderTargetSize; + core::dimension2d<u32> ViewPortSize; + + core::matrix4 TransformationMatrix[ETS_COUNT]; + + ITriangleRenderer* CurrentTriangleRenderer; + ITriangleRenderer* TriangleRenderers[ETR_COUNT]; + ETriangleRenderer CurrentRenderer; + + IZBuffer* ZBuffer; + + video::ITexture* Texture; + + SMaterial Material; + }; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.cpp new file mode 100644 index 0000000..f90ede5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.cpp @@ -0,0 +1,2723 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CSoftwareDriver2.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +#include "SoftwareDriver2_helper.h" +#include "CSoftwareTexture2.h" +#include "CSoftware2MaterialRenderer.h" +#include "S3DVertex.h" +#include "S4DVertex.h" +#include "CBlit.h" + + +#define MAT_TEXTURE(tex) ( (video::CSoftwareTexture2*) Material.org.getTexture ( tex ) ) + + +namespace irr +{ +namespace video +{ + +namespace glsl +{ + +typedef sVec4 vec4; +typedef sVec3 vec3; +typedef sVec2 vec2; + +#define in +#define uniform +#define attribute +#define varying + +#ifdef _MSC_VER +#pragma warning(disable:4244) +#endif + +struct mat4{ + float m[4][4]; + + vec4 operator* ( const vec4 &in ) const + { + vec4 out; + return out; + } + +}; + +struct mat3{ + float m[3][3]; + + vec3 operator* ( const vec3 &in ) const + { + vec3 out; + return out; + } +}; + +const int gl_MaxLights = 8; + + +inline float dot (float x, float y) { return x * y; } +inline float dot ( const vec2 &x, const vec2 &y) { return x.x * y.x + x.y * y.y; } +inline float dot ( const vec3 &x, const vec3 &y) { return x.x * y.x + x.y * y.y + x.z * y.z; } +inline float dot ( const vec4 &x, const vec4 &y) { return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; } + +inline float reflect (float I, float N) { return I - 2.0 * dot (N, I) * N; } +inline vec2 reflect (const vec2 &I, const vec2 &N) { return I - N * 2.0 * dot (N, I); } +inline vec3 reflect (const vec3 &I, const vec3 &N) { return I - N * 2.0 * dot (N, I); } +inline vec4 reflect (const vec4 &I, const vec4 &N) { return I - N * 2.0 * dot (N, I); } + + +inline float refract (float I, float N, float eta){ + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return 0.0; + return eta * I - (eta * dot (N, I) + sqrt (k)) * N; +} + +inline vec2 refract (const vec2 &I, const vec2 &N, float eta){ + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return vec2 (0.0); + return I * eta - N * (eta * dot (N, I) + sqrt (k)); +} + +inline vec3 refract (const vec3 &I, const vec3 &N, float eta) { + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return vec3 (0.0); + return I * eta - N * (eta * dot (N, I) + sqrt (k)); +} + +inline vec4 refract (const vec4 &I, const vec4 &N, float eta) { + const float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); + if (k < 0.0) + return vec4 (0.0); + return I * eta - N * (eta * dot (N, I) + sqrt (k)); +} + + +inline float length ( const vec3 &v ) { return sqrtf ( v.x * v.x + v.y * v.y + v.z * v.z ); } +vec3 normalize ( const vec3 &v ) { float l = 1.f / length ( v ); return vec3 ( v.x * l, v.y * l, v.z * l ); } +float max ( float a, float b ) { return a > b ? a : b; } +float min ( float a, float b ) { return a < b ? a : b; } +vec4 clamp ( const vec4 &a, f32 low, f32 high ) { return vec4 ( min (max(a.x,low), high), min (max(a.y,low), high), min (max(a.z,low), high), min (max(a.w,low), high) ); } + + + +typedef int sampler2D; +sampler2D texUnit0; + +vec4 texture2D (sampler2D sampler, const vec2 &coord) { return vec4 (0.0); } + +struct gl_LightSourceParameters { + vec4 ambient; // Acli + vec4 diffuse; // Dcli + vec4 specular; // Scli + vec4 position; // Ppli + vec4 halfVector; // Derived: Hi + vec3 spotDirection; // Sdli + float spotExponent; // Srli + float spotCutoff; // Crli + // (range: [0.0,90.0], 180.0) + float spotCosCutoff; // Derived: cos(Crli) + // (range: [1.0,0.0],-1.0) + float constantAttenuation; // K0 + float linearAttenuation; // K1 + float quadraticAttenuation;// K2 +}; + +uniform gl_LightSourceParameters gl_LightSource[gl_MaxLights]; + +struct gl_LightModelParameters { + vec4 ambient; +}; +uniform gl_LightModelParameters gl_LightModel; + +struct gl_LightModelProducts { + vec4 sceneColor; +}; + +uniform gl_LightModelProducts gl_FrontLightModelProduct; +uniform gl_LightModelProducts gl_BackLightModelProduct; + +struct gl_LightProducts { + vec4 ambient; + vec4 diffuse; + vec4 specular; +}; + +uniform gl_LightProducts gl_FrontLightProduct[gl_MaxLights]; +uniform gl_LightProducts gl_BackLightProduct[gl_MaxLights]; + +struct gl_MaterialParameters +{ + vec4 emission; // Ecm + vec4 ambient; // Acm + vec4 diffuse; // Dcm + vec4 specular; // Scm + float shininess; // Srm +}; +uniform gl_MaterialParameters gl_FrontMaterial; +uniform gl_MaterialParameters gl_BackMaterial; + +// GLSL has some built-in attributes in a vertex shader: +attribute vec4 gl_Vertex; // 4D vector representing the vertex position +attribute vec3 gl_Normal; // 3D vector representing the vertex normal +attribute vec4 gl_Color; // 4D vector representing the vertex color +attribute vec4 gl_MultiTexCoord0; // 4D vector representing the texture coordinate of texture unit X +attribute vec4 gl_MultiTexCoord1; // 4D vector representing the texture coordinate of texture unit X + +uniform mat4 gl_ModelViewMatrix; //4x4 Matrix representing the model-view matrix. +uniform mat4 gl_ModelViewProjectionMatrix; //4x4 Matrix representing the model-view-projection matrix. +uniform mat3 gl_NormalMatrix; //3x3 Matrix representing the inverse transpose model-view matrix. This matrix is used for normal transformation. + + +varying vec4 gl_FrontColor; // 4D vector representing the primitives front color +varying vec4 gl_FrontSecondaryColor; // 4D vector representing the primitives second front color +varying vec4 gl_BackColor; // 4D vector representing the primitives back color +varying vec4 gl_TexCoord[4]; // 4D vector representing the Xth texture coordinate + +// shader output +varying vec4 gl_Position; // 4D vector representing the final processed vertex position. Only available in vertex shader. +varying vec4 gl_FragColor; // 4D vector representing the final color which is written in the frame buffer. Only available in fragment shader. +varying float gl_FragDepth; // float representing the depth which is written in the depth buffer. Only available in fragment shader. + +varying vec4 gl_SecondaryColor; +varying float gl_FogFragCoord; + + +vec4 ftransform(void) +{ + return gl_ModelViewProjectionMatrix * gl_Vertex; +} + +vec3 fnormal(void) +{ + //Compute the normal + vec3 normal = gl_NormalMatrix * gl_Normal; + normal = normalize(normal); + return normal; +} + + +struct program1 +{ + vec4 Ambient; + vec4 Diffuse; + vec4 Specular; + + void pointLight(in int i, in vec3 normal, in vec3 eye, in vec3 ecPosition3) + { + float nDotVP; // normal . light direction + float nDotHV; // normal . light half vector + float pf; // power factor + float attenuation; // computed attenuation factor + float d; // distance from surface to light source + vec3 VP; // direction from surface to light position + vec3 halfVector; // direction of maximum highlights + + // Compute vector from surface to light position + VP = vec3 (gl_LightSource[i].position) - ecPosition3; + + // Compute distance between surface and light position + d = length(VP); + + // Normalize the vector from surface to light position + VP = normalize(VP); + + // Compute attenuation + attenuation = 1.0 / (gl_LightSource[i].constantAttenuation + + gl_LightSource[i].linearAttenuation * d + + gl_LightSource[i].quadraticAttenuation * d * d); + + halfVector = normalize(VP + eye); + + nDotVP = max(0.0, dot(normal, VP)); + nDotHV = max(0.0, dot(normal, halfVector)); + + if (nDotVP == 0.0) + { + pf = 0.0; + } + else + { + pf = pow(nDotHV, gl_FrontMaterial.shininess); + + } + Ambient += gl_LightSource[i].ambient * attenuation; + Diffuse += gl_LightSource[i].diffuse * nDotVP * attenuation; + Specular += gl_LightSource[i].specular * pf * attenuation; + } + + vec3 fnormal(void) + { + //Compute the normal + vec3 normal = gl_NormalMatrix * gl_Normal; + normal = normalize(normal); + return normal; + } + + void ftexgen(in vec3 normal, in vec4 ecPosition) + { + + gl_TexCoord[0] = gl_MultiTexCoord0; + } + + void flight(in vec3 normal, in vec4 ecPosition, float alphaFade) + { + vec4 color; + vec3 ecPosition3; + vec3 eye; + + ecPosition3 = (vec3 (ecPosition)) / ecPosition.w; + eye = vec3 (0.0, 0.0, 1.0); + + // Clear the light intensity accumulators + Ambient = vec4 (0.0); + Diffuse = vec4 (0.0); + Specular = vec4 (0.0); + + pointLight(0, normal, eye, ecPosition3); + + pointLight(1, normal, eye, ecPosition3); + + color = gl_FrontLightModelProduct.sceneColor + + Ambient * gl_FrontMaterial.ambient + + Diffuse * gl_FrontMaterial.diffuse; + gl_FrontSecondaryColor = Specular * gl_FrontMaterial.specular; + color = clamp( color, 0.0, 1.0 ); + gl_FrontColor = color; + + gl_FrontColor.a *= alphaFade; + } + + + void vertexshader_main (void) + { + vec3 transformedNormal; + float alphaFade = 1.0; + + // Eye-coordinate position of vertex, needed in various calculations + vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; + + // Do fixed functionality vertex transform + gl_Position = ftransform(); + transformedNormal = fnormal(); + flight(transformedNormal, ecPosition, alphaFade); + ftexgen(transformedNormal, ecPosition); + } + + void fragmentshader_main (void) + { + vec4 color; + + color = gl_Color; + + color *= texture2D(texUnit0, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y) ); + + color += gl_SecondaryColor; + color = clamp(color, 0.0, 1.0); + + gl_FragColor = color; + } +}; + +} + +//! constructor +CBurningVideoDriver::CBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, video::IImagePresenter* presenter) +: CNullDriver(io, params.WindowSize), BackBuffer(0), Presenter(presenter), + WindowId(0), SceneSourceRect(0), + RenderTargetTexture(0), RenderTargetSurface(0), CurrentShader(0), + DepthBuffer(0), StencilBuffer ( 0 ), + CurrentOut ( 12 * 2, 128 ), Temp ( 12 * 2, 128 ) +{ + #ifdef _DEBUG + setDebugName("CBurningVideoDriver"); + #endif + + // create backbuffer + BackBuffer = new CImage(BURNINGSHADER_COLOR_FORMAT, params.WindowSize); + if (BackBuffer) + { + BackBuffer->fill(SColor(0)); + + // create z buffer + if ( params.ZBufferBits ) + DepthBuffer = video::createDepthBuffer(BackBuffer->getDimension()); + + // create stencil buffer + if ( params.Stencilbuffer ) + StencilBuffer = video::createStencilBuffer(BackBuffer->getDimension()); + } + + DriverAttributes->setAttribute("MaxTextures", 2); + DriverAttributes->setAttribute("MaxIndices", 1<<16); + DriverAttributes->setAttribute("MaxTextureSize", 1024); + DriverAttributes->setAttribute("MaxLights", glsl::gl_MaxLights); + DriverAttributes->setAttribute("MaxTextureLODBias", 16.f); + DriverAttributes->setAttribute("Version", 47); + + // create triangle renderers + + irr::memset32 ( BurningShader, 0, sizeof ( BurningShader ) ); + //BurningShader[ETR_FLAT] = createTRFlat2(DepthBuffer); + //BurningShader[ETR_FLAT_WIRE] = createTRFlatWire2(DepthBuffer); + BurningShader[ETR_GOURAUD] = createTriangleRendererGouraud2(this); + BurningShader[ETR_GOURAUD_ALPHA] = createTriangleRendererGouraudAlpha2(this ); + BurningShader[ETR_GOURAUD_ALPHA_NOZ] = createTRGouraudAlphaNoZ2(this ); + //BurningShader[ETR_GOURAUD_WIRE] = createTriangleRendererGouraudWire2(DepthBuffer); + //BurningShader[ETR_TEXTURE_FLAT] = createTriangleRendererTextureFlat2(DepthBuffer); + //BurningShader[ETR_TEXTURE_FLAT_WIRE] = createTriangleRendererTextureFlatWire2(DepthBuffer); + BurningShader[ETR_TEXTURE_GOURAUD] = createTriangleRendererTextureGouraud2(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M1] = createTriangleRendererTextureLightMap2_M1(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M2] = createTriangleRendererTextureLightMap2_M2(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_M4] = createTriangleRendererGTextureLightMap2_M4(this); + BurningShader[ETR_TEXTURE_LIGHTMAP_M4] = createTriangleRendererTextureLightMap2_M4(this); + BurningShader[ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD] = createTriangleRendererTextureLightMap2_Add(this); + BurningShader[ETR_TEXTURE_GOURAUD_DETAIL_MAP] = createTriangleRendererTextureDetailMap2(this); + + BurningShader[ETR_TEXTURE_GOURAUD_WIRE] = createTriangleRendererTextureGouraudWire2(this); + BurningShader[ETR_TEXTURE_GOURAUD_NOZ] = createTRTextureGouraudNoZ2(this); + BurningShader[ETR_TEXTURE_GOURAUD_ADD] = createTRTextureGouraudAdd2(this); + BurningShader[ETR_TEXTURE_GOURAUD_ADD_NO_Z] = createTRTextureGouraudAddNoZ2(this); + BurningShader[ETR_TEXTURE_GOURAUD_VERTEX_ALPHA] = createTriangleRendererTextureVertexAlpha2 ( this ); + + BurningShader[ETR_TEXTURE_GOURAUD_ALPHA] = createTRTextureGouraudAlpha(this ); + BurningShader[ETR_TEXTURE_GOURAUD_ALPHA_NOZ] = createTRTextureGouraudAlphaNoZ( this ); + + BurningShader[ETR_NORMAL_MAP_SOLID] = createTRNormalMap ( this ); + BurningShader[ETR_STENCIL_SHADOW] = createTRStencilShadow ( this ); + BurningShader[ETR_TEXTURE_BLEND] = createTRTextureBlend( this ); + + BurningShader[ETR_REFERENCE] = createTriangleRendererReference ( this ); + + + // add the same renderer for all solid types + CSoftware2MaterialRenderer_SOLID* smr = new CSoftware2MaterialRenderer_SOLID( this); + CSoftware2MaterialRenderer_TRANSPARENT_ADD_COLOR* tmr = new CSoftware2MaterialRenderer_TRANSPARENT_ADD_COLOR( this); + CSoftware2MaterialRenderer_UNSUPPORTED * umr = new CSoftware2MaterialRenderer_UNSUPPORTED ( this ); + + //!TODO: addMaterialRenderer depends on pushing order.... + addMaterialRenderer ( smr ); // EMT_SOLID + addMaterialRenderer ( smr ); // EMT_SOLID_2_LAYER, + addMaterialRenderer ( smr ); // EMT_LIGHTMAP, + addMaterialRenderer ( tmr ); // EMT_LIGHTMAP_ADD, + addMaterialRenderer ( smr ); // EMT_LIGHTMAP_M2, + addMaterialRenderer ( smr ); // EMT_LIGHTMAP_M4, + addMaterialRenderer ( smr ); // EMT_LIGHTMAP_LIGHTING, + addMaterialRenderer ( smr ); // EMT_LIGHTMAP_LIGHTING_M2, + addMaterialRenderer ( smr ); // EMT_LIGHTMAP_LIGHTING_M4, + addMaterialRenderer ( smr ); // EMT_DETAIL_MAP, + addMaterialRenderer ( umr ); // EMT_SPHERE_MAP, + addMaterialRenderer ( smr ); // EMT_REFLECTION_2_LAYER, + addMaterialRenderer ( tmr ); // EMT_TRANSPARENT_ADD_COLOR, + addMaterialRenderer ( tmr ); // EMT_TRANSPARENT_ALPHA_CHANNEL, + addMaterialRenderer ( tmr ); // EMT_TRANSPARENT_ALPHA_CHANNEL_REF, + addMaterialRenderer ( tmr ); // EMT_TRANSPARENT_VERTEX_ALPHA, + addMaterialRenderer ( smr ); // EMT_TRANSPARENT_REFLECTION_2_LAYER, + addMaterialRenderer ( smr ); // EMT_NORMAL_MAP_SOLID, + addMaterialRenderer ( umr ); // EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR, + addMaterialRenderer ( tmr ); // EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA, + addMaterialRenderer ( smr ); // EMT_PARALLAX_MAP_SOLID, + addMaterialRenderer ( tmr ); // EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR, + addMaterialRenderer ( tmr ); // EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, + addMaterialRenderer ( tmr ); // EMT_ONETEXTURE_BLEND + + smr->drop (); + tmr->drop (); + umr->drop (); + + // select render target + setRenderTarget(BackBuffer); + + //reset Lightspace + LightSpace.reset (); + + // select the right renderer + setCurrentShader(); +} + + +//! destructor +CBurningVideoDriver::~CBurningVideoDriver() +{ + // delete Backbuffer + if (BackBuffer) + BackBuffer->drop(); + + // delete triangle renderers + + for (s32 i=0; i<ETR2_COUNT; ++i) + { + if (BurningShader[i]) + BurningShader[i]->drop(); + } + + // delete Additional buffer + if (StencilBuffer) + StencilBuffer->drop(); + + if (DepthBuffer) + DepthBuffer->drop(); + + if (RenderTargetTexture) + RenderTargetTexture->drop(); + + if (RenderTargetSurface) + RenderTargetSurface->drop(); +} + + +/*! + selects the right triangle renderer based on the render states. +*/ +void CBurningVideoDriver::setCurrentShader() +{ + ITexture *texture0 = Material.org.getTexture(0); + ITexture *texture1 = Material.org.getTexture(1); + + bool zMaterialTest = Material.org.ZBuffer != ECFN_NEVER && + Material.org.ZWriteEnable && + ( AllowZWriteOnTransparent || !Material.org.isTransparent() ); + + EBurningFFShader shader = zMaterialTest ? ETR_TEXTURE_GOURAUD : ETR_TEXTURE_GOURAUD_NOZ; + + TransformationFlag[ ETS_TEXTURE_0] &= ~(ETF_TEXGEN_CAMERA_NORMAL|ETF_TEXGEN_CAMERA_REFLECTION); + LightSpace.Flags &= ~VERTEXTRANSFORM; + + switch ( Material.org.MaterialType ) + { + case EMT_ONETEXTURE_BLEND: + shader = ETR_TEXTURE_BLEND; + break; + + case EMT_TRANSPARENT_ALPHA_CHANNEL_REF: + Material.org.MaterialTypeParam = 0.5f; + // fall through + case EMT_TRANSPARENT_ALPHA_CHANNEL: + if ( texture0 && texture0->hasAlpha () ) + { + shader = zMaterialTest ? ETR_TEXTURE_GOURAUD_ALPHA : ETR_TEXTURE_GOURAUD_ALPHA_NOZ; + break; + } + // fall through + + case EMT_TRANSPARENT_ADD_COLOR: + shader = zMaterialTest ? ETR_TEXTURE_GOURAUD_ADD : ETR_TEXTURE_GOURAUD_ADD_NO_Z; + break; + + case EMT_TRANSPARENT_VERTEX_ALPHA: + shader = ETR_TEXTURE_GOURAUD_VERTEX_ALPHA; + break; + + case EMT_LIGHTMAP: + case EMT_LIGHTMAP_LIGHTING: + shader = ETR_TEXTURE_GOURAUD_LIGHTMAP_M1; + break; + + case EMT_LIGHTMAP_M2: + case EMT_LIGHTMAP_LIGHTING_M2: + shader = ETR_TEXTURE_GOURAUD_LIGHTMAP_M2; + break; + + case EMT_LIGHTMAP_LIGHTING_M4: + if ( texture1 ) + shader = ETR_TEXTURE_GOURAUD_LIGHTMAP_M4; + break; + case EMT_LIGHTMAP_M4: + if ( texture1 ) + shader = ETR_TEXTURE_LIGHTMAP_M4; + break; + + case EMT_LIGHTMAP_ADD: + if ( texture1 ) + shader = ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD; + break; + + case EMT_DETAIL_MAP: + if ( texture1 ) + shader = ETR_TEXTURE_GOURAUD_DETAIL_MAP; + break; + + case EMT_SPHERE_MAP: + TransformationFlag[ ETS_TEXTURE_0] |= ETF_TEXGEN_CAMERA_REFLECTION; // ETF_TEXGEN_CAMERA_NORMAL; + LightSpace.Flags |= VERTEXTRANSFORM; + break; + case EMT_REFLECTION_2_LAYER: + shader = ETR_TEXTURE_GOURAUD_LIGHTMAP_M1; + TransformationFlag[ ETS_TEXTURE_1] |= ETF_TEXGEN_CAMERA_REFLECTION; + LightSpace.Flags |= VERTEXTRANSFORM; + break; + + case EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA: + case EMT_NORMAL_MAP_SOLID: + case EMT_PARALLAX_MAP_SOLID: + case EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA: + shader = ETR_NORMAL_MAP_SOLID; + LightSpace.Flags |= VERTEXTRANSFORM; + break; + + default: + break; + + } + + if ( !texture0 ) + { + shader = ETR_GOURAUD; + } + + if ( Material.org.Wireframe ) + { + shader = ETR_TEXTURE_GOURAUD_WIRE; + } + + //shader = ETR_REFERENCE; + + // switchToTriangleRenderer + CurrentShader = BurningShader[shader]; + if ( CurrentShader ) + { + CurrentShader->setZCompareFunc ( Material.org.ZBuffer ); + CurrentShader->setRenderTarget(RenderTargetSurface, ViewPort); + CurrentShader->setMaterial ( Material ); + + switch ( shader ) + { + case ETR_TEXTURE_GOURAUD_ALPHA: + case ETR_TEXTURE_GOURAUD_ALPHA_NOZ: + case ETR_TEXTURE_BLEND: + CurrentShader->setParam ( 0, Material.org.MaterialTypeParam ); + break; + default: + break; + } + } + +} + + + +//! queries the features of the driver, returns true if feature is available +bool CBurningVideoDriver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const +{ + if (!FeatureEnabled[feature]) + return false; + + switch (feature) + { +#ifdef SOFTWARE_DRIVER_2_BILINEAR + case EVDF_BILINEAR_FILTER: + return true; +#endif +#ifdef SOFTWARE_DRIVER_2_MIPMAPPING + case EVDF_MIP_MAP: + return true; +#endif + case EVDF_STENCIL_BUFFER: + case EVDF_RENDER_TO_TARGET: + case EVDF_MULTITEXTURE: + case EVDF_HARDWARE_TL: + case EVDF_TEXTURE_NSQUARE: + return true; + + default: + return false; + } +} + + + +//! sets transformation +void CBurningVideoDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) +{ + Transformation[state] = mat; + core::setbit_cond ( TransformationFlag[state], mat.isIdentity(), ETF_IDENTITY ); + + switch ( state ) + { + case ETS_VIEW: + Transformation[ETS_VIEW_PROJECTION].setbyproduct_nocheck ( + Transformation[ETS_PROJECTION], + Transformation[ETS_VIEW] + ); + getCameraPosWorldSpace (); + break; + + case ETS_WORLD: + if ( TransformationFlag[state] & ETF_IDENTITY ) + { + Transformation[ETS_WORLD_INVERSE] = Transformation[ETS_WORLD]; + TransformationFlag[ETS_WORLD_INVERSE] |= ETF_IDENTITY; + Transformation[ETS_CURRENT] = Transformation[ETS_VIEW_PROJECTION]; + } + else + { + //Transformation[ETS_WORLD].getInversePrimitive ( Transformation[ETS_WORLD_INVERSE] ); + Transformation[ETS_CURRENT].setbyproduct_nocheck ( + Transformation[ETS_VIEW_PROJECTION], + Transformation[ETS_WORLD] + ); + } + TransformationFlag[ETS_CURRENT] = 0; + //getLightPosObjectSpace (); + break; + case ETS_TEXTURE_0: + case ETS_TEXTURE_1: + case ETS_TEXTURE_2: + case ETS_TEXTURE_3: + if ( 0 == (TransformationFlag[state] & ETF_IDENTITY ) ) + LightSpace.Flags |= VERTEXTRANSFORM; + default: + break; + } +} + + +//! clears the zbuffer +bool CBurningVideoDriver::beginScene(bool backBuffer, bool zBuffer, + SColor color, const SExposedVideoData& videoData, + core::rect<s32>* sourceRect) +{ + CNullDriver::beginScene(backBuffer, zBuffer, color, videoData, sourceRect); + WindowId = videoData.D3D9.HWnd; + SceneSourceRect = sourceRect; + + if (backBuffer && BackBuffer) + BackBuffer->fill(color); + + if (zBuffer && DepthBuffer) + DepthBuffer->clear(); + + memset ( TransformationFlag, 0, sizeof ( TransformationFlag ) ); + return true; +} + + +//! presents the rendered scene on the screen, returns false if failed +bool CBurningVideoDriver::endScene() +{ + CNullDriver::endScene(); + + return Presenter->present(BackBuffer, WindowId, SceneSourceRect); +} + + +//! sets a render target +bool CBurningVideoDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color) +{ + if (texture && texture->getDriverType() != EDT_BURNINGSVIDEO) + { + os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); + return false; + } + + if (RenderTargetTexture) + RenderTargetTexture->drop(); + + RenderTargetTexture = texture; + + if (RenderTargetTexture) + { + RenderTargetTexture->grab(); + setRenderTarget(((CSoftwareTexture2*)RenderTargetTexture)->getTexture()); + } + else + { + setRenderTarget(BackBuffer); + } + + if (RenderTargetSurface && (clearBackBuffer || clearZBuffer)) + { + if (clearZBuffer) + DepthBuffer->clear(); + + if (clearBackBuffer) + RenderTargetSurface->fill( color ); + } + + return true; +} + + +//! sets a render target +void CBurningVideoDriver::setRenderTarget(video::CImage* image) +{ + if (RenderTargetSurface) + RenderTargetSurface->drop(); + + RenderTargetSurface = image; + RenderTargetSize.Width = 0; + RenderTargetSize.Height = 0; + + if (RenderTargetSurface) + { + RenderTargetSurface->grab(); + RenderTargetSize = RenderTargetSurface->getDimension(); + } + + setViewPort(core::rect<s32>(0,0,RenderTargetSize.Width,RenderTargetSize.Height)); + + if (DepthBuffer) + DepthBuffer->setSize(RenderTargetSize); + + if (StencilBuffer) + StencilBuffer->setSize(RenderTargetSize); +} + + + +//! sets a viewport +void CBurningVideoDriver::setViewPort(const core::rect<s32>& area) +{ + ViewPort = area; + + core::rect<s32> rendert(0,0,RenderTargetSize.Width,RenderTargetSize.Height); + ViewPort.clipAgainst(rendert); + + Transformation [ ETS_CLIPSCALE ].buildNDCToDCMatrix ( ViewPort, 1 ); + + if (CurrentShader) + CurrentShader->setRenderTarget(RenderTargetSurface, ViewPort); +} + +/* + generic plane clipping in homogenous coordinates + special case ndc frustum <-w,w>,<-w,w>,<-w,w> + can be rewritten with compares e.q near plane, a.z < -a.w and b.z < -b.w +*/ + +const sVec4 CBurningVideoDriver::NDCPlane[6] = +{ + sVec4( 0.f, 0.f, -1.f, -1.f ), // near + sVec4( 0.f, 0.f, 1.f, -1.f ), // far + sVec4( 1.f, 0.f, 0.f, -1.f ), // left + sVec4( -1.f, 0.f, 0.f, -1.f ), // right + sVec4( 0.f, 1.f, 0.f, -1.f ), // bottom + sVec4( 0.f, -1.f, 0.f, -1.f ) // top +}; + + + +/* + test a vertex if it's inside the standard frustum + + this is the generic one.. + + f32 dotPlane; + for ( u32 i = 0; i!= 6; ++i ) + { + dotPlane = v->Pos.dotProduct ( NDCPlane[i] ); + core::setbit_cond( flag, dotPlane <= 0.f, 1 << i ); + } + + // this is the base for ndc frustum <-w,w>,<-w,w>,<-w,w> + core::setbit_cond( flag, ( v->Pos.z - v->Pos.w ) <= 0.f, 1 ); + core::setbit_cond( flag, (-v->Pos.z - v->Pos.w ) <= 0.f, 2 ); + core::setbit_cond( flag, ( v->Pos.x - v->Pos.w ) <= 0.f, 4 ); + core::setbit_cond( flag, (-v->Pos.x - v->Pos.w ) <= 0.f, 8 ); + core::setbit_cond( flag, ( v->Pos.y - v->Pos.w ) <= 0.f, 16 ); + core::setbit_cond( flag, (-v->Pos.y - v->Pos.w ) <= 0.f, 32 ); + +*/ +#ifdef IRRLICHT_FAST_MATH + +REALINLINE u32 CBurningVideoDriver::clipToFrustumTest ( const s4DVertex * v ) const +{ + f32 test[6]; + u32 flag; + const f32 w = - v->Pos.w; + + // a conditional move is needed....FCOMI ( but we don't have it ) + // so let the fpu calculate and write it back. + // cpu makes the compare, interleaving + + test[0] = v->Pos.z + w; + test[1] = -v->Pos.z + w; + test[2] = v->Pos.x + w; + test[3] = -v->Pos.x + w; + test[4] = v->Pos.y + w; + test[5] = -v->Pos.y + w; + + flag = (IR ( test[0] ) ) >> 31; + flag |= (IR ( test[1] ) & 0x80000000 ) >> 30; + flag |= (IR ( test[2] ) & 0x80000000 ) >> 29; + flag |= (IR ( test[3] ) & 0x80000000 ) >> 28; + flag |= (IR ( test[4] ) & 0x80000000 ) >> 27; + flag |= (IR ( test[5] ) & 0x80000000 ) >> 26; + +/* + flag = F32_LOWER_EQUAL_0 ( test[0] ); + flag |= F32_LOWER_EQUAL_0 ( test[1] ) << 1; + flag |= F32_LOWER_EQUAL_0 ( test[2] ) << 2; + flag |= F32_LOWER_EQUAL_0 ( test[3] ) << 3; + flag |= F32_LOWER_EQUAL_0 ( test[4] ) << 4; + flag |= F32_LOWER_EQUAL_0 ( test[5] ) << 5; +*/ + return flag; +} + +#else + + +REALINLINE u32 CBurningVideoDriver::clipToFrustumTest ( const s4DVertex * v ) const +{ + u32 flag = 0; + + if ( v->Pos.z <= v->Pos.w ) flag |= 1; + if (-v->Pos.z <= v->Pos.w ) flag |= 2; + + if ( v->Pos.x <= v->Pos.w ) flag |= 4; + if (-v->Pos.x <= v->Pos.w ) flag |= 8; + + if ( v->Pos.y <= v->Pos.w ) flag |= 16; + if (-v->Pos.y <= v->Pos.w ) flag |= 32; + +/* + for ( u32 i = 0; i!= 6; ++i ) + { + core::setbit_cond( flag, v->Pos.dotProduct ( NDCPlane[i] ) <= 0.f, 1 << i ); + } +*/ + return flag; +} + +#endif // _MSC_VER + +u32 CBurningVideoDriver::clipToHyperPlane ( s4DVertex * dest, const s4DVertex * source, u32 inCount, const sVec4 &plane ) +{ + u32 outCount = 0; + s4DVertex * out = dest; + + const s4DVertex * a; + const s4DVertex * b = source; + + f32 bDotPlane; + + bDotPlane = b->Pos.dotProduct ( plane ); + + for( u32 i = 1; i < inCount + 1; ++i) + { + const s32 condition = i - inCount; + const s32 index = (( ( condition >> 31 ) & ( i ^ condition ) ) ^ condition ) << 1; + + a = &source[ index ]; + + // current point inside + if ( a->Pos.dotProduct ( plane ) <= 0.f ) + { + // last point outside + if ( F32_GREATER_0 ( bDotPlane ) ) + { + // intersect line segment with plane + out->interpolate ( *b, *a, bDotPlane / (b->Pos - a->Pos).dotProduct ( plane ) ); + out += 2; + outCount += 1; + } + + // copy current to out + //*out = *a; + irr::memcpy32_small ( out, a, SIZEOF_SVERTEX * 2 ); + b = out; + + out += 2; + outCount += 1; + } + else + { + // current point outside + + if ( F32_LOWER_EQUAL_0 ( bDotPlane ) ) + { + // previous was inside + // intersect line segment with plane + out->interpolate ( *b, *a, bDotPlane / (b->Pos - a->Pos).dotProduct ( plane ) ); + out += 2; + outCount += 1; + } + // pointer + b = a; + } + + bDotPlane = b->Pos.dotProduct ( plane ); + + } + + return outCount; +} + + +u32 CBurningVideoDriver::clipToFrustum ( s4DVertex *v0, s4DVertex * v1, const u32 vIn ) +{ + u32 vOut = vIn; + + vOut = clipToHyperPlane ( v1, v0, vOut, NDCPlane[0] ); if ( vOut < vIn ) return vOut; + vOut = clipToHyperPlane ( v0, v1, vOut, NDCPlane[1] ); if ( vOut < vIn ) return vOut; + vOut = clipToHyperPlane ( v1, v0, vOut, NDCPlane[2] ); if ( vOut < vIn ) return vOut; + vOut = clipToHyperPlane ( v0, v1, vOut, NDCPlane[3] ); if ( vOut < vIn ) return vOut; + vOut = clipToHyperPlane ( v1, v0, vOut, NDCPlane[4] ); if ( vOut < vIn ) return vOut; + vOut = clipToHyperPlane ( v0, v1, vOut, NDCPlane[5] ); + return vOut; +} + +/*! + Part I: + apply Clip Scale matrix + From Normalized Device Coordiante ( NDC ) Space to Device Coordinate Space ( DC ) + + Part II: + Project homogeneous vector + homogeneous to non-homogenous coordinates ( dividebyW ) + + Incoming: ( xw, yw, zw, w, u, v, 1, R, G, B, A ) + Outgoing: ( xw/w, yw/w, zw/w, w/w, u/w, v/w, 1/w, R/w, G/w, B/w, A/w ) + + + replace w/w by 1/w +*/ +inline void CBurningVideoDriver::ndc_2_dc_and_project ( s4DVertex *dest,s4DVertex *source, u32 vIn ) const +{ + u32 g; + + for ( g = 0; g != vIn; g += 2 ) + { + if ( (dest[g].flag & VERTEX4D_PROJECTED ) == VERTEX4D_PROJECTED ) + continue; + + dest[g].flag = source[g].flag | VERTEX4D_PROJECTED; + + const f32 w = source[g].Pos.w; + const f32 iw = core::reciprocal ( w ); + + // to device coordinates + dest[g].Pos.x = iw * ( source[g].Pos.x * Transformation [ ETS_CLIPSCALE ][ 0] + w * Transformation [ ETS_CLIPSCALE ][12] ); + dest[g].Pos.y = iw * ( source[g].Pos.y * Transformation [ ETS_CLIPSCALE ][ 5] + w * Transformation [ ETS_CLIPSCALE ][13] ); + +#ifndef SOFTWARE_DRIVER_2_USE_WBUFFER + dest[g].Pos.z = iw * source[g].Pos.z; +#endif + + #ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + dest[g].Color[0] = source[g].Color[0] * iw; + #else + dest[g].Color[0] = source[g].Color[0]; + #endif + + #endif + dest[g].LightTangent[0] = source[g].LightTangent[0] * iw; + dest[g].Pos.w = iw; + } +} + + +inline void CBurningVideoDriver::ndc_2_dc_and_project2 ( const s4DVertex **v, const u32 size ) const +{ + u32 g; + + for ( g = 0; g != size; g += 1 ) + { + s4DVertex * a = (s4DVertex*) v[g]; + + if ( (a[1].flag & VERTEX4D_PROJECTED ) == VERTEX4D_PROJECTED ) + continue; + + a[1].flag = a->flag | VERTEX4D_PROJECTED; + + // project homogenous vertex, store 1/w + const f32 w = a->Pos.w; + const f32 iw = core::reciprocal ( w ); + + // to device coordinates + const f32 * p = Transformation [ ETS_CLIPSCALE ].pointer(); + a[1].Pos.x = iw * ( a->Pos.x * p[ 0] + w * p[12] ); + a[1].Pos.y = iw * ( a->Pos.y * p[ 5] + w * p[13] ); + +#ifndef SOFTWARE_DRIVER_2_USE_WBUFFER + a[1].Pos.z = a->Pos.z * iw; +#endif + + #ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + a[1].Color[0] = a->Color[0] * iw; + #else + a[1].Color[0] = a->Color[0]; + #endif + #endif + + a[1].LightTangent[0] = a[0].LightTangent[0] * iw; + a[1].Pos.w = iw; + + } + +} + + +/*! + crossproduct in projected 2D -> screen area triangle +*/ +inline f32 CBurningVideoDriver::screenarea ( const s4DVertex *v ) const +{ + return ( ( v[3].Pos.x - v[1].Pos.x ) * ( v[5].Pos.y - v[1].Pos.y ) ) - + ( ( v[3].Pos.y - v[1].Pos.y ) * ( v[5].Pos.x - v[1].Pos.x ) ); +} + + +/*! +*/ +inline f32 CBurningVideoDriver::texelarea ( const s4DVertex *v, int tex ) const +{ + f32 z; + + z = ( (v[2].Tex[tex].x - v[0].Tex[tex].x ) * (v[4].Tex[tex].y - v[0].Tex[tex].y ) ) + - ( (v[4].Tex[tex].x - v[0].Tex[tex].x ) * (v[2].Tex[tex].y - v[0].Tex[tex].y ) ); + + return MAT_TEXTURE ( tex )->getLODFactor ( z ); +} + +/*! + crossproduct in projected 2D +*/ +inline f32 CBurningVideoDriver::screenarea2 ( const s4DVertex **v ) const +{ + return ( (( v[1] + 1 )->Pos.x - (v[0] + 1 )->Pos.x ) * ( (v[2] + 1 )->Pos.y - (v[0] + 1 )->Pos.y ) ) - + ( (( v[1] + 1 )->Pos.y - (v[0] + 1 )->Pos.y ) * ( (v[2] + 1 )->Pos.x - (v[0] + 1 )->Pos.x ) ); +} + +/*! +*/ +inline f32 CBurningVideoDriver::texelarea2 ( const s4DVertex **v, s32 tex ) const +{ + f32 z; + z = ( (v[1]->Tex[tex].x - v[0]->Tex[tex].x ) * (v[2]->Tex[tex].y - v[0]->Tex[tex].y ) ) + - ( (v[2]->Tex[tex].x - v[0]->Tex[tex].x ) * (v[1]->Tex[tex].y - v[0]->Tex[tex].y ) ); + + return MAT_TEXTURE ( tex )->getLODFactor ( z ); +} + + +/*! +*/ +inline void CBurningVideoDriver::select_polygon_mipmap ( s4DVertex *v, u32 vIn, u32 tex, const core::dimension2du& texSize ) const +{ + f32 f[2]; + + f[0] = (f32) texSize.Width - 0.25f; + f[1] = (f32) texSize.Height - 0.25f; + +#ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + for ( u32 g = 0; g != vIn; g += 2 ) + { + (v + g + 1 )->Tex[tex].x = (v + g + 0)->Tex[tex].x * ( v + g + 1 )->Pos.w * f[0]; + (v + g + 1 )->Tex[tex].y = (v + g + 0)->Tex[tex].y * ( v + g + 1 )->Pos.w * f[1]; + } +#else + for ( u32 g = 0; g != vIn; g += 2 ) + { + (v + g + 1 )->Tex[tex].x = (v + g + 0)->Tex[tex].x * f[0]; + (v + g + 1 )->Tex[tex].y = (v + g + 0)->Tex[tex].y * f[1]; + } +#endif +} + +inline void CBurningVideoDriver::select_polygon_mipmap2 ( s4DVertex **v, u32 tex, const core::dimension2du& texSize ) const +{ + f32 f[2]; + + f[0] = (f32) texSize.Width - 0.25f; + f[1] = (f32) texSize.Height - 0.25f; + +#ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + (v[0] + 1 )->Tex[tex].x = v[0]->Tex[tex].x * ( v[0] + 1 )->Pos.w * f[0]; + (v[0] + 1 )->Tex[tex].y = v[0]->Tex[tex].y * ( v[0] + 1 )->Pos.w * f[1]; + + (v[1] + 1 )->Tex[tex].x = v[1]->Tex[tex].x * ( v[1] + 1 )->Pos.w * f[0]; + (v[1] + 1 )->Tex[tex].y = v[1]->Tex[tex].y * ( v[1] + 1 )->Pos.w * f[1]; + + (v[2] + 1 )->Tex[tex].x = v[2]->Tex[tex].x * ( v[2] + 1 )->Pos.w * f[0]; + (v[2] + 1 )->Tex[tex].y = v[2]->Tex[tex].y * ( v[2] + 1 )->Pos.w * f[1]; + +#else + (v[0] + 1 )->Tex[tex].x = v[0]->Tex[tex].x * f[0]; + (v[0] + 1 )->Tex[tex].y = v[0]->Tex[tex].y * f[1]; + + (v[1] + 1 )->Tex[tex].x = v[1]->Tex[tex].x * f[0]; + (v[1] + 1 )->Tex[tex].y = v[1]->Tex[tex].y * f[1]; + + (v[2] + 1 )->Tex[tex].x = v[2]->Tex[tex].x * f[0]; + (v[2] + 1 )->Tex[tex].y = v[2]->Tex[tex].y * f[1]; +#endif +} + +// Vertex Cache +const SVSize CBurningVideoDriver::vSize[] = +{ + { VERTEX4D_FORMAT_TEXTURE_1 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex), 1 }, + { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex2TCoords),2 }, + { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1 | VERTEX4D_FORMAT_BUMP_DOT3, sizeof(S3DVertexTangents),2 }, + { VERTEX4D_FORMAT_TEXTURE_2 | VERTEX4D_FORMAT_COLOR_1, sizeof(S3DVertex), 2 }, // reflection map + { 0, sizeof(f32) * 3, 0 }, // core::vector3df* +}; + + + +/*! + fill a cache line with transformed, light and clipp test triangles +*/ +void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, const u32 destIndex) +{ + u8 * source; + s4DVertex *dest; + + source = (u8*) VertexCache.vertices + ( sourceIndex * vSize[VertexCache.vType].Pitch ); + + // it's a look ahead so we never hit it.. + // but give priority... + //VertexCache.info[ destIndex ].hit = hitCount; + + // store info + VertexCache.info[ destIndex ].index = sourceIndex; + VertexCache.info[ destIndex ].hit = 0; + + // destination Vertex + dest = (s4DVertex *) ( (u8*) VertexCache.mem.data + ( destIndex << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ); + + // transform Model * World * Camera * Projection * NDCSpace matrix + const S3DVertex *base = ((S3DVertex*) source ); + Transformation [ ETS_CURRENT].transformVect ( &dest->Pos.x, base->Pos ); + + //mhm ;-) maybe no goto + if ( VertexCache.vType == 4 ) goto clipandproject; + + +#if defined (SOFTWARE_DRIVER_2_LIGHTING) || defined ( SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM ) + + // vertex normal in light space + if ( Material.org.Lighting || (LightSpace.Flags & VERTEXTRANSFORM) ) + { + if ( TransformationFlag[ETS_WORLD] & ETF_IDENTITY ) + { + LightSpace.normal.set ( base->Normal.X, base->Normal.Y, base->Normal.Z, 1.f ); + LightSpace.vertex.set ( base->Pos.X, base->Pos.Y, base->Pos.Z, 1.f ); + } + else + { + Transformation[ETS_WORLD].rotateVect ( &LightSpace.normal.x, base->Normal ); + + // vertex in light space + if ( LightSpace.Flags & ( POINTLIGHT | FOG | SPECULAR | VERTEXTRANSFORM) ) + Transformation[ETS_WORLD].transformVect ( &LightSpace.vertex.x, base->Pos ); + } + + if ( LightSpace.Flags & NORMALIZE ) + LightSpace.normal.normalize_xyz(); + + } + +#endif + +#if defined ( SOFTWARE_DRIVER_2_USE_VERTEX_COLOR ) + // apply lighting model + #if defined (SOFTWARE_DRIVER_2_LIGHTING) + if ( Material.org.Lighting ) + { + lightVertex ( dest, base->Color.color ); + } + else + { + dest->Color[0].setA8R8G8B8 ( base->Color.color ); + } + #else + dest->Color[0].setA8R8G8B8 ( base->Color.color ); + #endif +#endif + + // Texture Transform +#if !defined ( SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM ) + irr::memcpy32_small ( &dest->Tex[0],&base->TCoords, + vSize[VertexCache.vType].TexSize << 3 // * ( sizeof ( f32 ) * 2 ) + ); +#else + + if ( 0 == (LightSpace.Flags & VERTEXTRANSFORM) ) + { + irr::memcpy32_small ( &dest->Tex[0],&base->TCoords, + vSize[VertexCache.vType].TexSize << 3 // * ( sizeof ( f32 ) * 2 ) + ); + } + else + { + /* + Generate texture coordinates as linear functions so that: + u = Ux*x + Uy*y + Uz*z + Uw + v = Vx*x + Vy*y + Vz*z + Vw + The matrix M for this case is: + Ux Vx 0 0 + Uy Vy 0 0 + Uz Vz 0 0 + Uw Vw 0 0 + */ + + u32 t; + sVec4 n; + sVec2 srcT; + + for ( t = 0; t != vSize[VertexCache.vType].TexSize; ++t ) + { + const core::matrix4& M = Transformation [ ETS_TEXTURE_0 + t ]; + + // texgen + if ( TransformationFlag [ ETS_TEXTURE_0 + t ] & (ETF_TEXGEN_CAMERA_NORMAL|ETF_TEXGEN_CAMERA_REFLECTION) ) + { + n.x = LightSpace.campos.x - LightSpace.vertex.x; + n.y = LightSpace.campos.x - LightSpace.vertex.y; + n.z = LightSpace.campos.x - LightSpace.vertex.z; + n.normalize_xyz(); + n.x += LightSpace.normal.x; + n.y += LightSpace.normal.y; + n.z += LightSpace.normal.z; + n.normalize_xyz(); + + const f32 *view = Transformation[ETS_VIEW].pointer(); + + if ( TransformationFlag [ ETS_TEXTURE_0 + t ] & ETF_TEXGEN_CAMERA_REFLECTION ) + { + srcT.x = 0.5f * ( 1.f + (n.x * view[0] + n.y * view[4] + n.z * view[8] )); + srcT.y = 0.5f * ( 1.f + (n.x * view[1] + n.y * view[5] + n.z * view[9] )); + } + else + { + srcT.x = 0.5f * ( 1.f + (n.x * view[0] + n.y * view[1] + n.z * view[2] )); + srcT.y = 0.5f * ( 1.f + (n.x * view[4] + n.y * view[5] + n.z * view[6] )); + } + } + else + { + irr::memcpy32_small ( &srcT,(&base->TCoords) + t, + sizeof ( f32 ) * 2 ); + } + + switch ( Material.org.TextureLayer[t].TextureWrapU ) + { + case ETC_CLAMP: + case ETC_CLAMP_TO_EDGE: + case ETC_CLAMP_TO_BORDER: + dest->Tex[t].x = core::clamp ( (f32) ( M[0] * srcT.x + M[4] * srcT.y + M[8] ), 0.f, 1.f ); + break; + case ETC_MIRROR: + dest->Tex[t].x = M[0] * srcT.x + M[4] * srcT.y + M[8]; + if (core::fract(dest->Tex[t].x)>0.5f) + dest->Tex[t].x=1.f-dest->Tex[t].x; + break; + case ETC_MIRROR_CLAMP: + case ETC_MIRROR_CLAMP_TO_EDGE: + case ETC_MIRROR_CLAMP_TO_BORDER: + dest->Tex[t].x = core::clamp ( (f32) ( M[0] * srcT.x + M[4] * srcT.y + M[8] ), 0.f, 1.f ); + if (core::fract(dest->Tex[t].x)>0.5f) + dest->Tex[t].x=1.f-dest->Tex[t].x; + break; + case ETC_REPEAT: + default: + dest->Tex[t].x = M[0] * srcT.x + M[4] * srcT.y + M[8]; + break; + } + switch ( Material.org.TextureLayer[t].TextureWrapV ) + { + case ETC_CLAMP: + case ETC_CLAMP_TO_EDGE: + case ETC_CLAMP_TO_BORDER: + dest->Tex[t].y = core::clamp ( (f32) ( M[1] * srcT.x + M[5] * srcT.y + M[9] ), 0.f, 1.f ); + break; + case ETC_MIRROR: + dest->Tex[t].y = M[1] * srcT.x + M[5] * srcT.y + M[9]; + if (core::fract(dest->Tex[t].y)>0.5f) + dest->Tex[t].y=1.f-dest->Tex[t].y; + break; + case ETC_MIRROR_CLAMP: + case ETC_MIRROR_CLAMP_TO_EDGE: + case ETC_MIRROR_CLAMP_TO_BORDER: + dest->Tex[t].y = core::clamp ( (f32) ( M[1] * srcT.x + M[5] * srcT.y + M[9] ), 0.f, 1.f ); + if (core::fract(dest->Tex[t].y)>0.5f) + dest->Tex[t].y=1.f-dest->Tex[t].y; + break; + case ETC_REPEAT: + default: + dest->Tex[t].y = M[1] * srcT.x + M[5] * srcT.y + M[9]; + break; + } + } + } + +#if 0 + // tangent space light vector, emboss + if ( Lights.size () && ( vSize[VertexCache.vType].Format & VERTEX4D_FORMAT_BUMP_DOT3 ) ) + { + const S3DVertexTangents *tangent = ((S3DVertexTangents*) source ); + const SBurningShaderLight &light = LightSpace.Light[0]; + + sVec4 vp; + + vp.x = light.pos.x - LightSpace.vertex.x; + vp.y = light.pos.y - LightSpace.vertex.y; + vp.z = light.pos.z - LightSpace.vertex.z; + + vp.normalize_xyz(); + + LightSpace.tangent.x = vp.x * tangent->Tangent.X + vp.y * tangent->Tangent.Y + vp.z * tangent->Tangent.Z; + LightSpace.tangent.y = vp.x * tangent->Binormal.X + vp.y * tangent->Binormal.Y + vp.z * tangent->Binormal.Z; + //LightSpace.tangent.z = vp.x * tangent->Normal.X + vp.y * tangent->Normal.Y + vp.z * tangent->Normal.Z; + LightSpace.tangent.z = 0.f; + LightSpace.tangent.normalize_xyz(); + + f32 scale = 1.f / 128.f; + if ( Material.org.MaterialTypeParam > 0.f ) + scale = Material.org.MaterialTypeParam; + + // emboss, shift coordinates + dest->Tex[1].x = dest->Tex[0].x + LightSpace.tangent.x * scale; + dest->Tex[1].y = dest->Tex[0].y + LightSpace.tangent.y * scale; + //dest->Tex[1].z = LightSpace.tangent.z * scale; + } +#endif + + if ( LightSpace.Light.size () && ( vSize[VertexCache.vType].Format & VERTEX4D_FORMAT_BUMP_DOT3 ) ) + { + const S3DVertexTangents *tangent = ((S3DVertexTangents*) source ); + + sVec4 vp; + + dest->LightTangent[0].x = 0.f; + dest->LightTangent[0].y = 0.f; + dest->LightTangent[0].z = 0.f; + for ( u32 i = 0; i < 2 && i < LightSpace.Light.size (); ++i ) + { + const SBurningShaderLight &light = LightSpace.Light[i]; + + if ( !light.LightIsOn ) + continue; + + vp.x = light.pos.x - LightSpace.vertex.x; + vp.y = light.pos.y - LightSpace.vertex.y; + vp.z = light.pos.z - LightSpace.vertex.z; + + /* + vp.x = light.pos_objectspace.x - base->Pos.X; + vp.y = light.pos_objectspace.y - base->Pos.Y; + vp.z = light.pos_objectspace.z - base->Pos.Z; + */ + + vp.normalize_xyz(); + + + // transform by tangent matrix + sVec3 l; + #if 1 + l.x = (vp.x * tangent->Tangent.X + vp.y * tangent->Tangent.Y + vp.z * tangent->Tangent.Z ); + l.y = (vp.x * tangent->Binormal.X + vp.y * tangent->Binormal.Y + vp.z * tangent->Binormal.Z ); + l.z = (vp.x * tangent->Normal.X + vp.y * tangent->Normal.Y + vp.z * tangent->Normal.Z ); + #else + l.x = (vp.x * tangent->Tangent.X + vp.y * tangent->Binormal.X + vp.z * tangent->Normal.X ); + l.y = (vp.x * tangent->Tangent.Y + vp.y * tangent->Binormal.Y + vp.z * tangent->Normal.Y ); + l.z = (vp.x * tangent->Tangent.Z + vp.y * tangent->Binormal.Z + vp.z * tangent->Normal.Z ); + #endif + + + /* + f32 scale = 1.f / 128.f; + scale /= dest->LightTangent[0].b; + + // emboss, shift coordinates + dest->Tex[1].x = dest->Tex[0].x + l.r * scale; + dest->Tex[1].y = dest->Tex[0].y + l.g * scale; + */ + dest->Tex[1].x = dest->Tex[0].x; + dest->Tex[1].y = dest->Tex[0].y; + + // scale bias + dest->LightTangent[0].x += l.x; + dest->LightTangent[0].y += l.y; + dest->LightTangent[0].z += l.z; + } + dest->LightTangent[0].setLength ( 0.5f ); + dest->LightTangent[0].x += 0.5f; + dest->LightTangent[0].y += 0.5f; + dest->LightTangent[0].z += 0.5f; + } + + +#endif + +clipandproject: + dest[0].flag = dest[1].flag = vSize[VertexCache.vType].Format; + + // test vertex + dest[0].flag |= clipToFrustumTest ( dest); + + // to DC Space, project homogenous vertex + if ( (dest[0].flag & VERTEX4D_CLIPMASK ) == VERTEX4D_INSIDE ) + { + ndc_2_dc_and_project2 ( (const s4DVertex**) &dest, 1 ); + } + + //return dest; +} + +// + +REALINLINE s4DVertex * CBurningVideoDriver::VertexCache_getVertex ( const u32 sourceIndex ) +{ + for ( s32 i = 0; i < VERTEXCACHE_ELEMENT; ++i ) + { + if ( VertexCache.info[ i ].index == sourceIndex ) + { + return (s4DVertex *) ( (u8*) VertexCache.mem.data + ( i << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ); + } + } + return 0; +} + + +/* + Cache based on linear walk indices + fill blockwise on the next 16(Cache_Size) unique vertices in indexlist + merge the next 16 vertices with the current +*/ +REALINLINE void CBurningVideoDriver::VertexCache_get(const s4DVertex ** face) +{ + SCacheInfo info[VERTEXCACHE_ELEMENT]; + + // next primitive must be complete in cache + if ( VertexCache.indicesIndex - VertexCache.indicesRun < 3 && + VertexCache.indicesIndex < VertexCache.indexCount + ) + { + // rewind to start of primitive + VertexCache.indicesIndex = VertexCache.indicesRun; + + irr::memset32 ( info, VERTEXCACHE_MISS, sizeof ( info ) ); + + // get the next unique vertices cache line + u32 fillIndex = 0; + u32 dIndex; + u32 i; + u32 sourceIndex; + + while ( VertexCache.indicesIndex < VertexCache.indexCount && + fillIndex < VERTEXCACHE_ELEMENT + ) + { + switch ( VertexCache.iType ) + { + case 1: + sourceIndex = ((u16*)VertexCache.indices) [ VertexCache.indicesIndex ]; + break; + case 2: + sourceIndex = ((u32*)VertexCache.indices) [ VertexCache.indicesIndex ]; + break; + case 4: + sourceIndex = VertexCache.indicesIndex; + break; + } + + VertexCache.indicesIndex += 1; + + // if not exist, push back + s32 exist = 0; + for ( dIndex = 0; dIndex < fillIndex; ++dIndex ) + { + if ( info[ dIndex ].index == sourceIndex ) + { + exist = 1; + break; + } + } + + if ( 0 == exist ) + { + info[fillIndex++].index = sourceIndex; + } + } + + // clear marks + for ( i = 0; i!= VERTEXCACHE_ELEMENT; ++i ) + { + VertexCache.info[i].hit = 0; + } + + // mark all existing + for ( i = 0; i!= fillIndex; ++i ) + { + for ( dIndex = 0; dIndex < VERTEXCACHE_ELEMENT; ++dIndex ) + { + if ( VertexCache.info[ dIndex ].index == info[i].index ) + { + info[i].hit = dIndex; + VertexCache.info[ dIndex ].hit = 1; + break; + } + } + } + + // fill new + for ( i = 0; i!= fillIndex; ++i ) + { + if ( info[i].hit != VERTEXCACHE_MISS ) + continue; + + for ( dIndex = 0; dIndex < VERTEXCACHE_ELEMENT; ++dIndex ) + { + if ( 0 == VertexCache.info[dIndex].hit ) + { + VertexCache_fill ( info[i].index, dIndex ); + VertexCache.info[dIndex].hit += 1; + info[i].hit = dIndex; + break; + } + } + } + } + + const u32 i0 = core::if_c_a_else_0 ( VertexCache.pType != scene::EPT_TRIANGLE_FAN, VertexCache.indicesRun ); + + switch ( VertexCache.iType ) + { + case 1: + { + const u16 *p = (const u16 *) VertexCache.indices; + face[0] = VertexCache_getVertex ( p[ i0 ] ); + face[1] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 1] ); + face[2] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 2] ); + } + break; + + case 2: + { + const u32 *p = (const u32 *) VertexCache.indices; + face[0] = VertexCache_getVertex ( p[ i0 ] ); + face[1] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 1] ); + face[2] = VertexCache_getVertex ( p[ VertexCache.indicesRun + 2] ); + } + break; + + case 4: + face[0] = VertexCache_getVertex ( VertexCache.indicesRun + 0 ); + face[1] = VertexCache_getVertex ( VertexCache.indicesRun + 1 ); + face[2] = VertexCache_getVertex ( VertexCache.indicesRun + 2 ); + break; + default: + face[0] = face[1] = face[2] = VertexCache_getVertex(VertexCache.indicesRun + 0); + break; + } + + VertexCache.indicesRun += VertexCache.primitivePitch; +} + +/*! +*/ +REALINLINE void CBurningVideoDriver::VertexCache_getbypass ( s4DVertex ** face ) +{ + const u32 i0 = core::if_c_a_else_0 ( VertexCache.pType != scene::EPT_TRIANGLE_FAN, VertexCache.indicesRun ); + + if ( VertexCache.iType == 1 ) + { + const u16 *p = (const u16 *) VertexCache.indices; + VertexCache_fill ( p[ i0 ], 0 ); + VertexCache_fill ( p[ VertexCache.indicesRun + 1], 1 ); + VertexCache_fill ( p[ VertexCache.indicesRun + 2], 2 ); + } + else + { + const u32 *p = (const u32 *) VertexCache.indices; + VertexCache_fill ( p[ i0 ], 0 ); + VertexCache_fill ( p[ VertexCache.indicesRun + 1], 1 ); + VertexCache_fill ( p[ VertexCache.indicesRun + 2], 2 ); + } + + VertexCache.indicesRun += VertexCache.primitivePitch; + + face[0] = (s4DVertex *) ( (u8*) VertexCache.mem.data + ( 0 << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ); + face[1] = (s4DVertex *) ( (u8*) VertexCache.mem.data + ( 1 << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ); + face[2] = (s4DVertex *) ( (u8*) VertexCache.mem.data + ( 2 << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ); + +} + +/*! +*/ +void CBurningVideoDriver::VertexCache_reset ( const void* vertices, u32 vertexCount, + const void* indices, u32 primitiveCount, + E_VERTEX_TYPE vType, + scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType) +{ + VertexCache.vertices = vertices; + VertexCache.vertexCount = vertexCount; + + VertexCache.indices = indices; + VertexCache.indicesIndex = 0; + VertexCache.indicesRun = 0; + + if ( Material.org.MaterialType == video::EMT_REFLECTION_2_LAYER ) + VertexCache.vType = 3; + else + VertexCache.vType = vType; + VertexCache.pType = pType; + + switch ( iType ) + { + case EIT_16BIT: VertexCache.iType = 1; break; + case EIT_32BIT: VertexCache.iType = 2; break; + default: + VertexCache.iType = iType; break; + } + + switch ( VertexCache.pType ) + { + // most types here will not work as expected, only triangles/triangle_fan + // is known to work. + case scene::EPT_POINTS: + VertexCache.indexCount = primitiveCount; + VertexCache.primitivePitch = 1; + break; + case scene::EPT_LINE_STRIP: + VertexCache.indexCount = primitiveCount+1; + VertexCache.primitivePitch = 1; + break; + case scene::EPT_LINE_LOOP: + VertexCache.indexCount = primitiveCount+1; + VertexCache.primitivePitch = 1; + break; + case scene::EPT_LINES: + VertexCache.indexCount = 2*primitiveCount; + VertexCache.primitivePitch = 2; + break; + case scene::EPT_TRIANGLE_STRIP: + VertexCache.indexCount = primitiveCount+2; + VertexCache.primitivePitch = 1; + break; + case scene::EPT_TRIANGLES: + VertexCache.indexCount = primitiveCount + primitiveCount + primitiveCount; + VertexCache.primitivePitch = 3; + break; + case scene::EPT_TRIANGLE_FAN: + VertexCache.indexCount = primitiveCount + 2; + VertexCache.primitivePitch = 1; + break; + case scene::EPT_QUAD_STRIP: + VertexCache.indexCount = 2*primitiveCount + 2; + VertexCache.primitivePitch = 2; + break; + case scene::EPT_QUADS: + VertexCache.indexCount = 4*primitiveCount; + VertexCache.primitivePitch = 4; + break; + case scene::EPT_POLYGON: + VertexCache.indexCount = primitiveCount+1; + VertexCache.primitivePitch = 1; + break; + case scene::EPT_POINT_SPRITES: + VertexCache.indexCount = primitiveCount; + VertexCache.primitivePitch = 1; + break; + } + + irr::memset32 ( VertexCache.info, VERTEXCACHE_MISS, sizeof ( VertexCache.info ) ); +} + + +void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) + +{ + if (!checkPrimitiveCount(primitiveCount)) + return; + + CNullDriver::drawVertexPrimitiveList(vertices, vertexCount, indexList, primitiveCount, vType, pType, iType); + + // These calls would lead to crashes due to wrong index usage. + // The vertex cache needs to be rewritten for these primitives. + if (pType==scene::EPT_POINTS || pType==scene::EPT_LINE_STRIP || + pType==scene::EPT_LINE_LOOP || pType==scene::EPT_LINES || pType==scene::EPT_POLYGON || + pType==scene::EPT_POINT_SPRITES) + return; + + if ( 0 == CurrentShader ) + return; + + VertexCache_reset ( vertices, vertexCount, indexList, primitiveCount, vType, pType, iType ); + + const s4DVertex * face[3]; + + f32 dc_area; + s32 lodLevel; + u32 i; + u32 g; + u32 m; + video::CSoftwareTexture2* tex; + + for ( i = 0; i < (u32) primitiveCount; ++i ) + { + VertexCache_get(face); + + // if fully outside or outside on same side + if ( ( (face[0]->flag | face[1]->flag | face[2]->flag) & VERTEX4D_CLIPMASK ) + != VERTEX4D_INSIDE + ) + continue; + + // if fully inside + if ( ( face[0]->flag & face[1]->flag & face[2]->flag & VERTEX4D_CLIPMASK ) == VERTEX4D_INSIDE ) + { + dc_area = screenarea2 ( face ); + if ( Material.org.BackfaceCulling && F32_LOWER_EQUAL_0( dc_area ) ) + continue; + else + if ( Material.org.FrontfaceCulling && F32_GREATER_EQUAL_0( dc_area ) ) + continue; + + // select mipmap + dc_area = core::reciprocal ( dc_area ); + for ( m = 0; m != vSize[VertexCache.vType].TexSize; ++m ) + { + if ( 0 == (tex = MAT_TEXTURE ( m )) ) + { + CurrentShader->setTextureParam(m, 0, 0); + continue; + } + + lodLevel = s32_log2_f32 ( texelarea2 ( face, m ) * dc_area ); + CurrentShader->setTextureParam(m, tex, lodLevel ); + select_polygon_mipmap2 ( (s4DVertex**) face, m, tex->getSize() ); + } + + // rasterize + CurrentShader->drawTriangle ( face[0] + 1, face[1] + 1, face[2] + 1 ); + continue; + } + + // else if not complete inside clipping necessary + irr::memcpy32_small ( ( (u8*) CurrentOut.data + ( 0 << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ), face[0], SIZEOF_SVERTEX * 2 ); + irr::memcpy32_small ( ( (u8*) CurrentOut.data + ( 1 << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ), face[1], SIZEOF_SVERTEX * 2 ); + irr::memcpy32_small ( ( (u8*) CurrentOut.data + ( 2 << ( SIZEOF_SVERTEX_LOG2 + 1 ) ) ), face[2], SIZEOF_SVERTEX * 2 ); + + const u32 flag = CurrentOut.data->flag & VERTEX4D_FORMAT_MASK; + + for ( g = 0; g != CurrentOut.ElementSize; ++g ) + { + CurrentOut.data[g].flag = flag; + Temp.data[g].flag = flag; + } + + u32 vOut; + vOut = clipToFrustum ( CurrentOut.data, Temp.data, 3 ); + if ( vOut < 3 ) + continue; + + vOut <<= 1; + + // to DC Space, project homogenous vertex + ndc_2_dc_and_project ( CurrentOut.data + 1, CurrentOut.data, vOut ); + +/* + // TODO: don't stick on 32 Bit Pointer + #define PointerAsValue(x) ( (u32) (u32*) (x) ) + + // if not complete inside clipping necessary + if ( ( test & VERTEX4D_INSIDE ) != VERTEX4D_INSIDE ) + { + u32 v[2] = { PointerAsValue ( Temp ) , PointerAsValue ( CurrentOut ) }; + for ( g = 0; g != 6; ++g ) + { + vOut = clipToHyperPlane ( (s4DVertex*) v[0], (s4DVertex*) v[1], vOut, NDCPlane[g] ); + if ( vOut < 3 ) + break; + + v[0] ^= v[1]; + v[1] ^= v[0]; + v[0] ^= v[1]; + } + + if ( vOut < 3 ) + continue; + + } +*/ + + // check 2d backface culling on first + dc_area = screenarea ( CurrentOut.data ); + if ( Material.org.BackfaceCulling && F32_LOWER_EQUAL_0 ( dc_area ) ) + continue; + else if ( Material.org.FrontfaceCulling && F32_GREATER_EQUAL_0( dc_area ) ) + continue; + + // select mipmap + dc_area = core::reciprocal ( dc_area ); + for ( m = 0; m != vSize[VertexCache.vType].TexSize; ++m ) + { + if ( 0 == (tex = MAT_TEXTURE ( m )) ) + { + CurrentShader->setTextureParam(m, 0, 0); + continue; + } + + lodLevel = s32_log2_f32 ( texelarea ( CurrentOut.data, m ) * dc_area ); + CurrentShader->setTextureParam(m, tex, lodLevel ); + select_polygon_mipmap ( CurrentOut.data, vOut, m, tex->getSize() ); + } + + + // re-tesselate ( triangle-fan, 0-1-2,0-2-3.. ) + for ( g = 0; g <= vOut - 6; g += 2 ) + { + // rasterize + CurrentShader->drawTriangle ( CurrentOut.data + 0 + 1, + CurrentOut.data + g + 3, + CurrentOut.data + g + 5); + } + + } + + // dump statistics +/* + char buf [64]; + sprintf ( buf,"VCount:%d PCount:%d CacheMiss: %d", + vertexCount, primitiveCount, + VertexCache.CacheMiss + ); + os::Printer::log( buf ); +*/ + +} + + +//! Sets the dynamic ambient light color. The default color is +//! (0,0,0,0) which means it is dark. +//! \param color: New color of the ambient light. +void CBurningVideoDriver::setAmbientLight(const SColorf& color) +{ + LightSpace.Global_AmbientLight.setColorf ( color ); +} + + +//! adds a dynamic light +s32 CBurningVideoDriver::addDynamicLight(const SLight& dl) +{ + (void) CNullDriver::addDynamicLight( dl ); + + SBurningShaderLight l; +// l.org = dl; + l.Type = dl.Type; + l.LightIsOn = true; + + l.AmbientColor.setColorf ( dl.AmbientColor ); + l.DiffuseColor.setColorf ( dl.DiffuseColor ); + l.SpecularColor.setColorf ( dl.SpecularColor ); + + switch ( dl.Type ) + { + case video::ELT_DIRECTIONAL: + l.pos.x = -dl.Direction.X; + l.pos.y = -dl.Direction.Y; + l.pos.z = -dl.Direction.Z; + l.pos.w = 1.f; + break; + case ELT_POINT: + case ELT_SPOT: + LightSpace.Flags |= POINTLIGHT; + l.pos.x = dl.Position.X; + l.pos.y = dl.Position.Y; + l.pos.z = dl.Position.Z; + l.pos.w = 1.f; +/* + l.radius = (1.f / dl.Attenuation.Y) * (1.f / dl.Attenuation.Y); + l.constantAttenuation = dl.Attenuation.X; + l.linearAttenuation = dl.Attenuation.Y; + l.quadraticAttenuation = dl.Attenuation.Z; +*/ + l.radius = dl.Radius * dl.Radius; + l.constantAttenuation = dl.Attenuation.X; + l.linearAttenuation = 1.f / dl.Radius; + l.quadraticAttenuation = dl.Attenuation.Z; + + break; + default: + break; + } + + LightSpace.Light.push_back ( l ); + return LightSpace.Light.size() - 1; +} + +//! Turns a dynamic light on or off +void CBurningVideoDriver::turnLightOn(s32 lightIndex, bool turnOn) +{ + if(lightIndex > -1 && lightIndex < (s32)LightSpace.Light.size()) + { + LightSpace.Light[lightIndex].LightIsOn = turnOn; + } +} + +//! deletes all dynamic lights there are +void CBurningVideoDriver::deleteAllDynamicLights() +{ + LightSpace.reset (); + CNullDriver::deleteAllDynamicLights(); + +} + +//! returns the maximal amount of dynamic lights the device can handle +u32 CBurningVideoDriver::getMaximalDynamicLightAmount() const +{ + return 8; +} + + +//! sets a material +void CBurningVideoDriver::setMaterial(const SMaterial& material) +{ + Material.org = material; + +#ifdef SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM + for (u32 i = 0; i < 2; ++i) + { + setTransform((E_TRANSFORMATION_STATE) (ETS_TEXTURE_0 + i), + material.getTextureMatrix(i)); + } +#endif + +#ifdef SOFTWARE_DRIVER_2_LIGHTING + Material.AmbientColor.setR8G8B8 ( Material.org.AmbientColor.color ); + Material.DiffuseColor.setR8G8B8 ( Material.org.DiffuseColor.color ); + Material.EmissiveColor.setR8G8B8 ( Material.org.EmissiveColor.color ); + Material.SpecularColor.setR8G8B8 ( Material.org.SpecularColor.color ); + + core::setbit_cond ( LightSpace.Flags, Material.org.Shininess != 0.f, SPECULAR ); + core::setbit_cond ( LightSpace.Flags, Material.org.FogEnable, FOG ); + core::setbit_cond ( LightSpace.Flags, Material.org.NormalizeNormals, NORMALIZE ); +#endif + + setCurrentShader(); +} + + +/*! + Camera Position in World Space +*/ +void CBurningVideoDriver::getCameraPosWorldSpace () +{ + Transformation[ETS_VIEW_INVERSE] = Transformation[ ETS_VIEW ]; + Transformation[ETS_VIEW_INVERSE].makeInverse (); + TransformationFlag[ETS_VIEW_INVERSE] = 0; + + const f32 *M = Transformation[ETS_VIEW_INVERSE].pointer (); + + /* The viewpoint is at (0., 0., 0.) in eye space. + Turning this into a vector [0 0 0 1] and multiply it by + the inverse of the view matrix, the resulting vector is the + object space location of the camera. + */ + + LightSpace.campos.x = M[12]; + LightSpace.campos.y = M[13]; + LightSpace.campos.z = M[14]; + LightSpace.campos.w = 1.f; +} + +void CBurningVideoDriver::getLightPosObjectSpace () +{ + if ( TransformationFlag[ETS_WORLD] & ETF_IDENTITY ) + { + Transformation[ETS_WORLD_INVERSE] = Transformation[ETS_WORLD]; + TransformationFlag[ETS_WORLD_INVERSE] |= ETF_IDENTITY; + } + else + { + Transformation[ETS_WORLD].getInverse ( Transformation[ETS_WORLD_INVERSE] ); + TransformationFlag[ETS_WORLD_INVERSE] &= ~ETF_IDENTITY; + } + + for ( u32 i = 0; i < 1 && i < LightSpace.Light.size(); ++i ) + { + SBurningShaderLight &l = LightSpace.Light[i]; + + Transformation[ETS_WORLD_INVERSE].transformVec3 ( &l.pos_objectspace.x, &l.pos.x ); + } +} + + +#ifdef SOFTWARE_DRIVER_2_LIGHTING + +//! Sets the fog mode. +void CBurningVideoDriver::setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog) +{ + CNullDriver::setFog(color, fogType, start, end, density, pixelFog, rangeFog); + LightSpace.FogColor.setA8R8G8B8 ( color.color ); +} + +/*! + applies lighting model +*/ +void CBurningVideoDriver::lightVertex ( s4DVertex *dest, u32 vertexargb ) +{ + sVec3 dColor; + + dColor = LightSpace.Global_AmbientLight; + dColor.add ( Material.EmissiveColor ); + + if ( Lights.size () == 0 ) + { + dColor.saturate( dest->Color[0], vertexargb); + return; + } + + sVec3 ambient; + sVec3 diffuse; + sVec3 specular; + + + // the universe started in darkness.. + ambient.set ( 0.f, 0.f, 0.f ); + diffuse.set ( 0.f, 0.f, 0.f ); + specular.set ( 0.f, 0.f, 0.f ); + + + u32 i; + f32 dot; + f32 len; + f32 attenuation; + sVec4 vp; // unit vector vertex to light + sVec4 lightHalf; // blinn-phong reflection + + for ( i = 0; i!= LightSpace.Light.size (); ++i ) + { + const SBurningShaderLight &light = LightSpace.Light[i]; + + if ( !light.LightIsOn ) + continue; + + // accumulate ambient + ambient.add ( light.AmbientColor ); + + switch ( light.Type ) + { + case video::ELT_SPOT: + case video::ELT_POINT: + // surface to light + vp.x = light.pos.x - LightSpace.vertex.x; + vp.y = light.pos.y - LightSpace.vertex.y; + vp.z = light.pos.z - LightSpace.vertex.z; + //vp.x = light.pos_objectspace.x - LightSpace.vertex.x; + //vp.y = light.pos_objectspace.y - LightSpace.vertex.x; + //vp.z = light.pos_objectspace.z - LightSpace.vertex.x; + + len = vp.get_length_xyz_square(); + if ( light.radius < len ) + continue; + + len = core::reciprocal_squareroot ( len ); + + // build diffuse reflection + + //angle between normal and light vector + vp.mul ( len ); + dot = LightSpace.normal.dot_xyz ( vp ); + if ( dot < 0.f ) + continue; + + attenuation = light.constantAttenuation + ( 1.f - ( len * light.linearAttenuation ) ); + + // diffuse component + diffuse.mulAdd ( light.DiffuseColor, 3.f * dot * attenuation ); + + if ( !(LightSpace.Flags & SPECULAR) ) + continue; + + // build specular + // surface to view + lightHalf.x = LightSpace.campos.x - LightSpace.vertex.x; + lightHalf.y = LightSpace.campos.y - LightSpace.vertex.y; + lightHalf.z = LightSpace.campos.z - LightSpace.vertex.z; + lightHalf.normalize_xyz(); + lightHalf += vp; + lightHalf.normalize_xyz(); + + // specular + dot = LightSpace.normal.dot_xyz ( lightHalf ); + if ( dot < 0.f ) + continue; + + //specular += light.SpecularColor * ( powf ( Material.org.Shininess ,dot ) * attenuation ); + specular.mulAdd ( light.SpecularColor, dot * attenuation ); + break; + + case video::ELT_DIRECTIONAL: + + //angle between normal and light vector + dot = LightSpace.normal.dot_xyz ( light.pos ); + if ( dot < 0.f ) + continue; + + // diffuse component + diffuse.mulAdd ( light.DiffuseColor, dot ); + break; + default: + break; + } + + } + + // sum up lights + dColor.mulAdd (ambient, Material.AmbientColor ); + dColor.mulAdd (diffuse, Material.DiffuseColor); + dColor.mulAdd (specular, Material.SpecularColor); + + dColor.saturate ( dest->Color[0], vertexargb ); +} + +#endif + + +//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. +void CBurningVideoDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, + const core::rect<s32>* clipRect, SColor color, + bool useAlphaChannelOfTexture) +{ + if (texture) + { + if (texture->getDriverType() != EDT_BURNINGSVIDEO) + { + os::Printer::log("Fatal Error: Tried to copy from a surface not owned by this driver.", ELL_ERROR); + return; + } + +#if 0 + // 2d methods don't use viewPort + core::position2di dest = destPos; + core::recti clip=ViewPort; + if (ViewPort.getSize().Width != ScreenSize.Width) + { + dest.X=ViewPort.UpperLeftCorner.X+core::round32(destPos.X*ViewPort.getWidth()/(f32)ScreenSize.Width); + dest.Y=ViewPort.UpperLeftCorner.Y+core::round32(destPos.Y*ViewPort.getHeight()/(f32)ScreenSize.Height); + if (clipRect) + { + clip.constrainTo(*clipRect); + } + clipRect = &clip; + } +#endif + if (useAlphaChannelOfTexture) + ((CSoftwareTexture2*)texture)->getImage()->copyToWithAlpha( + RenderTargetSurface, destPos, sourceRect, color, clipRect); + else + ((CSoftwareTexture2*)texture)->getImage()->copyTo( + RenderTargetSurface, destPos, sourceRect, clipRect); + } +} + + +//! Draws a part of the texture into the rectangle. +void CBurningVideoDriver::draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect, + const video::SColor* const colors, bool useAlphaChannelOfTexture) +{ + if (texture) + { + if (texture->getDriverType() != EDT_BURNINGSVIDEO) + { + os::Printer::log("Fatal Error: Tried to copy from a surface not owned by this driver.", ELL_ERROR); + return; + } + + if (useAlphaChannelOfTexture) + StretchBlit(BLITTER_TEXTURE_ALPHA_BLEND, RenderTargetSurface, &destRect, &sourceRect, + ((CSoftwareTexture2*)texture)->getImage(), (colors ? colors[0].color : 0)); + else + StretchBlit(BLITTER_TEXTURE, RenderTargetSurface, &destRect, &sourceRect, + ((CSoftwareTexture2*)texture)->getImage(), (colors ? colors[0].color : 0)); + } +} + +//! Draws a 2d line. +void CBurningVideoDriver::draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color) +{ + drawLine(BackBuffer, start, end, color ); +} + + +//! Draws a pixel +void CBurningVideoDriver::drawPixel(u32 x, u32 y, const SColor & color) +{ + BackBuffer->setPixel(x, y, color, true); +} + + +//! draw an 2d rectangle +void CBurningVideoDriver::draw2DRectangle(SColor color, const core::rect<s32>& pos, + const core::rect<s32>* clip) +{ + if (clip) + { + core::rect<s32> p(pos); + + p.clipAgainst(*clip); + + if(!p.isValid()) + return; + + drawRectangle(BackBuffer, p, color); + } + else + { + if(!pos.isValid()) + return; + + drawRectangle(BackBuffer, pos, color); + } +} + + +//! Only used by the internal engine. Used to notify the driver that +//! the window was resized. +void CBurningVideoDriver::OnResize(const core::dimension2d<u32>& size) +{ + // make sure width and height are multiples of 2 + core::dimension2d<u32> realSize(size); + + if (realSize.Width % 2) + realSize.Width += 1; + + if (realSize.Height % 2) + realSize.Height += 1; + + if (ScreenSize != realSize) + { + if (ViewPort.getWidth() == (s32)ScreenSize.Width && + ViewPort.getHeight() == (s32)ScreenSize.Height) + { + ViewPort.UpperLeftCorner.X = 0; + ViewPort.UpperLeftCorner.Y = 0; + ViewPort.LowerRightCorner.X = realSize.Width; + ViewPort.LowerRightCorner.X = realSize.Height; + } + + ScreenSize = realSize; + + bool resetRT = (RenderTargetSurface == BackBuffer); + + if (BackBuffer) + BackBuffer->drop(); + BackBuffer = new CImage(BURNINGSHADER_COLOR_FORMAT, realSize); + + if (resetRT) + setRenderTarget(BackBuffer); + } +} + + +//! returns the current render target size +const core::dimension2d<u32>& CBurningVideoDriver::getCurrentRenderTargetSize() const +{ + return RenderTargetSize; +} + + +//!Draws an 2d rectangle with a gradient. +void CBurningVideoDriver::draw2DRectangle(const core::rect<s32>& position, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip) +{ +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + + core::rect<s32> pos = position; + + if (clip) + pos.clipAgainst(*clip); + + if (!pos.isValid()) + return; + + const core::dimension2d<s32> renderTargetSize ( ViewPort.getSize() ); + + const s32 xPlus = -(renderTargetSize.Width>>1); + const f32 xFact = 1.0f / (renderTargetSize.Width>>1); + + const s32 yPlus = renderTargetSize.Height-(renderTargetSize.Height>>1); + const f32 yFact = 1.0f / (renderTargetSize.Height>>1); + + // fill VertexCache direct + s4DVertex *v; + + VertexCache.vertexCount = 4; + + VertexCache.info[0].index = 0; + VertexCache.info[1].index = 1; + VertexCache.info[2].index = 2; + VertexCache.info[3].index = 3; + + v = &VertexCache.mem.data [ 0 ]; + + v[0].Pos.set ( (f32)(pos.UpperLeftCorner.X+xPlus) * xFact, (f32)(yPlus-pos.UpperLeftCorner.Y) * yFact, 0.f, 1.f ); + v[0].Color[0].setA8R8G8B8 ( colorLeftUp.color ); + + v[2].Pos.set ( (f32)(pos.LowerRightCorner.X+xPlus) * xFact, (f32)(yPlus- pos.UpperLeftCorner.Y) * yFact, 0.f, 1.f ); + v[2].Color[0].setA8R8G8B8 ( colorRightUp.color ); + + v[4].Pos.set ( (f32)(pos.LowerRightCorner.X+xPlus) * xFact, (f32)(yPlus-pos.LowerRightCorner.Y) * yFact, 0.f ,1.f ); + v[4].Color[0].setA8R8G8B8 ( colorRightDown.color ); + + v[6].Pos.set ( (f32)(pos.UpperLeftCorner.X+xPlus) * xFact, (f32)(yPlus-pos.LowerRightCorner.Y) * yFact, 0.f, 1.f ); + v[6].Color[0].setA8R8G8B8 ( colorLeftDown.color ); + + s32 i; + u32 g; + + for ( i = 0; i!= 8; i += 2 ) + { + v[i + 0].flag = clipToFrustumTest ( v + i ); + v[i + 1].flag = 0; + if ( (v[i].flag & VERTEX4D_INSIDE ) == VERTEX4D_INSIDE ) + { + ndc_2_dc_and_project ( v + i + 1, v + i, 2 ); + } + } + + + IBurningShader * render; + + render = BurningShader [ ETR_GOURAUD_ALPHA_NOZ ]; + render->setRenderTarget(RenderTargetSurface, ViewPort); + + static const s16 indexList[6] = {0,1,2,0,2,3}; + + s4DVertex * face[3]; + + for ( i = 0; i!= 6; i += 3 ) + { + face[0] = VertexCache_getVertex ( indexList [ i + 0 ] ); + face[1] = VertexCache_getVertex ( indexList [ i + 1 ] ); + face[2] = VertexCache_getVertex ( indexList [ i + 2 ] ); + + // test clipping + u32 test = face[0]->flag & face[1]->flag & face[2]->flag & VERTEX4D_INSIDE; + + if ( test == VERTEX4D_INSIDE ) + { + render->drawTriangle ( face[0] + 1, face[1] + 1, face[2] + 1 ); + continue; + } + // Todo: all vertices are clipped in 2d.. + // is this true ? + u32 vOut = 6; + memcpy ( CurrentOut.data + 0, face[0], sizeof ( s4DVertex ) * 2 ); + memcpy ( CurrentOut.data + 2, face[1], sizeof ( s4DVertex ) * 2 ); + memcpy ( CurrentOut.data + 4, face[2], sizeof ( s4DVertex ) * 2 ); + + vOut = clipToFrustum ( CurrentOut.data, Temp.data, 3 ); + if ( vOut < 3 ) + continue; + + vOut <<= 1; + // to DC Space, project homogenous vertex + ndc_2_dc_and_project ( CurrentOut.data + 1, CurrentOut.data, vOut ); + + // re-tesselate ( triangle-fan, 0-1-2,0-2-3.. ) + for ( g = 0; g <= vOut - 6; g += 2 ) + { + // rasterize + render->drawTriangle ( CurrentOut.data + 1, &CurrentOut.data[g + 3], &CurrentOut.data[g + 5] ); + } + + } +#else + draw2DRectangle ( colorLeftUp, position, clip ); +#endif +} + + +//! Draws a 3d line. +void CBurningVideoDriver::draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color) +{ + Transformation [ ETS_CURRENT].transformVect ( &CurrentOut.data[0].Pos.x, start ); + Transformation [ ETS_CURRENT].transformVect ( &CurrentOut.data[2].Pos.x, end ); + + u32 g; + u32 vOut; + + // no clipping flags + for ( g = 0; g != CurrentOut.ElementSize; ++g ) + { + CurrentOut.data[g].flag = 0; + Temp.data[g].flag = 0; + } + + // vertices count per line + vOut = clipToFrustum ( CurrentOut.data, Temp.data, 2 ); + if ( vOut < 2 ) + return; + + vOut <<= 1; + + IBurningShader * line; + line = BurningShader [ ETR_TEXTURE_GOURAUD_WIRE ]; + line->setRenderTarget(RenderTargetSurface, ViewPort); + + // to DC Space, project homogenous vertex + ndc_2_dc_and_project ( CurrentOut.data + 1, CurrentOut.data, vOut ); + + // unproject vertex color +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + for ( g = 0; g != vOut; g+= 2 ) + { + CurrentOut.data[ g + 1].Color[0].setA8R8G8B8 ( color.color ); + } +#endif + + + for ( g = 0; g <= vOut - 4; g += 2 ) + { + // rasterize + line->drawLine ( CurrentOut.data + 1, CurrentOut.data + g + 3 ); + } +} + + +//! \return Returns the name of the video driver. Example: In case of the DirectX8 +//! driver, it would return "Direct3D8.1". +const wchar_t* CBurningVideoDriver::getName() const +{ +#ifdef BURNINGVIDEO_RENDERER_BEAUTIFUL + return L"Burning's Video 0.47 beautiful"; +#elif defined ( BURNINGVIDEO_RENDERER_ULTRA_FAST ) + return L"Burning's Video 0.47 ultra fast"; +#elif defined ( BURNINGVIDEO_RENDERER_FAST ) + return L"Burning's Video 0.47 fast"; +#else + return L"Burning's Video 0.47"; +#endif +} + +//! Returns the graphics card vendor name. +core::stringc CBurningVideoDriver::getVendorInfo() +{ + return "Burning's Video: Ing. Thomas Alten (c) 2006-2012"; +} + + +//! Returns type of video driver +E_DRIVER_TYPE CBurningVideoDriver::getDriverType() const +{ + return EDT_BURNINGSVIDEO; +} + + +//! returns color format +ECOLOR_FORMAT CBurningVideoDriver::getColorFormat() const +{ + return BURNINGSHADER_COLOR_FORMAT; +} + + +//! Returns the transformation set by setTransform +const core::matrix4& CBurningVideoDriver::getTransform(E_TRANSFORMATION_STATE state) const +{ + return Transformation[state]; +} + + +//! Creates a render target texture. +ITexture* CBurningVideoDriver::addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format) +{ + IImage* img = createImage(BURNINGSHADER_COLOR_FORMAT, size); + ITexture* tex = new CSoftwareTexture2(img, name, CSoftwareTexture2::IS_RENDERTARGET ); + img->drop(); + addTexture(tex); + tex->drop(); + return tex; +} + + +//! Clears the DepthBuffer. +void CBurningVideoDriver::clearZBuffer() +{ + if (DepthBuffer) + DepthBuffer->clear(); +} + + +//! Returns an image created from the last rendered frame. +IImage* CBurningVideoDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RENDER_TARGET target) +{ + if (target != video::ERT_FRAME_BUFFER) + return 0; + + if (BackBuffer) + { + IImage* tmp = createImage(BackBuffer->getColorFormat(), BackBuffer->getDimension()); + BackBuffer->copyTo(tmp); + return tmp; + } + else + return 0; +} + + +//! returns a device dependent texture from a software surface (IImage) +//! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES +ITexture* CBurningVideoDriver::createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData) +{ + return new CSoftwareTexture2( + surface, name, + (getTextureCreationFlag(ETCF_CREATE_MIP_MAPS) ? CSoftwareTexture2::GEN_MIPMAP : 0 ) | + (getTextureCreationFlag(ETCF_ALLOW_NON_POWER_2) ? 0 : CSoftwareTexture2::NP2_SIZE ), mipmapData); + +} + + +//! Returns the maximum amount of primitives (mostly vertices) which +//! the device is able to render with one drawIndexedTriangleList +//! call. +u32 CBurningVideoDriver::getMaximalPrimitiveCount() const +{ + return 0xFFFFFFFF; +} + + +//! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do +//! this: First, draw all geometry. Then use this method, to draw the shadow +//! volume. Next use IVideoDriver::drawStencilShadow() to visualize the shadow. +void CBurningVideoDriver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible) +{ + const u32 count = triangles.size(); + IBurningShader *shader = BurningShader [ ETR_STENCIL_SHADOW ]; + + CurrentShader = shader; + shader->setRenderTarget(RenderTargetSurface, ViewPort); + + Material.org.MaterialType = video::EMT_SOLID; + Material.org.Lighting = false; + Material.org.ZWriteEnable = false; + Material.org.ZBuffer = ECFN_LESSEQUAL; + LightSpace.Flags &= ~VERTEXTRANSFORM; + + //glStencilMask(~0); + //glStencilFunc(GL_ALWAYS, 0, ~0); + + if (true)// zpass does not work yet + { + Material.org.BackfaceCulling = true; + Material.org.FrontfaceCulling = false; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 1 ); + shader->setParam ( 2, 0 ); + drawVertexPrimitiveList (triangles.const_pointer(), count, 0, count/3, (video::E_VERTEX_TYPE) 4, scene::EPT_TRIANGLES, (video::E_INDEX_TYPE) 4 ); + //glStencilOp(GL_KEEP, incr, GL_KEEP); + //glDrawArrays(GL_TRIANGLES,0,count); + + Material.org.BackfaceCulling = false; + Material.org.FrontfaceCulling = true; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 2 ); + shader->setParam ( 2, 0 ); + drawVertexPrimitiveList (triangles.const_pointer(), count, 0, count/3, (video::E_VERTEX_TYPE) 4, scene::EPT_TRIANGLES, (video::E_INDEX_TYPE) 4 ); + //glStencilOp(GL_KEEP, decr, GL_KEEP); + //glDrawArrays(GL_TRIANGLES,0,count); + } + else // zpass + { + Material.org.BackfaceCulling = true; + Material.org.FrontfaceCulling = false; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 0 ); + shader->setParam ( 2, 1 ); + //glStencilOp(GL_KEEP, GL_KEEP, incr); + //glDrawArrays(GL_TRIANGLES,0,count); + + Material.org.BackfaceCulling = false; + Material.org.FrontfaceCulling = true; + shader->setParam ( 0, 0 ); + shader->setParam ( 1, 0 ); + shader->setParam ( 2, 2 ); + //glStencilOp(GL_KEEP, GL_KEEP, decr); + //glDrawArrays(GL_TRIANGLES,0,count); + } +} + +//! Fills the stencil shadow with color. After the shadow volume has been drawn +//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this +//! to draw the color of the shadow. +void CBurningVideoDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, + video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) +{ + if (!StencilBuffer) + return; + // draw a shadow rectangle covering the entire screen using stencil buffer + const u32 h = RenderTargetSurface->getDimension().Height; + const u32 w = RenderTargetSurface->getDimension().Width; + tVideoSample *dst; + u32 *stencil; + u32* const stencilBase=(u32*) StencilBuffer->lock(); + + for ( u32 y = 0; y < h; ++y ) + { + dst = (tVideoSample*)RenderTargetSurface->lock() + ( y * w ); + stencil = stencilBase + ( y * w ); + + for ( u32 x = 0; x < w; ++x ) + { + if ( stencil[x] > 1 ) + { + dst[x] = PixelBlend32 ( dst[x], leftUpEdge.color ); + } + } + } + + StencilBuffer->clear(); +} + + +core::dimension2du CBurningVideoDriver::getMaxTextureSize() const +{ + return core::dimension2du(SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE, SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE); +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a video driver +IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, video::IImagePresenter* presenter) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CBurningVideoDriver(params, io, presenter); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.h new file mode 100644 index 0000000..120bad2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareDriver2.h @@ -0,0 +1,290 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_VIDEO_2_SOFTWARE_H_INCLUDED__ +#define __C_VIDEO_2_SOFTWARE_H_INCLUDED__ + +#include "SoftwareDriver2_compile_config.h" +#include "IBurningShader.h" +#include "CNullDriver.h" +#include "CImage.h" +#include "os.h" +#include "irrString.h" +#include "SIrrCreationParameters.h" + +namespace irr +{ +namespace video +{ + class CBurningVideoDriver : public CNullDriver + { + public: + + //! constructor + CBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, io::IFileSystem* io, video::IImagePresenter* presenter); + + //! destructor + virtual ~CBurningVideoDriver(); + + //! queries the features of the driver, returns true if feature is available + virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + + //! sets transformation + virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); + + //! sets a material + virtual void setMaterial(const SMaterial& material); + + virtual bool setRenderTarget(video::ITexture* texture, bool clearBackBuffer, + bool clearZBuffer, SColor color); + + //! sets a viewport + virtual void setViewPort(const core::rect<s32>& area); + + //! clears the zbuffer + virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect<s32>* sourceRect=0); + + //! presents the rendered scene on the screen, returns false if failed + virtual bool endScene(); + + //! Only used by the internal engine. Used to notify the driver that + //! the window was resized. + virtual void OnResize(const core::dimension2d<u32>& size); + + //! returns size of the current render target + virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const; + + //! deletes all dynamic lights there are + virtual void deleteAllDynamicLights(); + + //! adds a dynamic light, returning an index to the light + //! \param light: the light data to use to create the light + //! \return An index to the light, or -1 if an error occurs + virtual s32 addDynamicLight(const SLight& light); + + //! Turns a dynamic light on or off + //! \param lightIndex: the index returned by addDynamicLight + //! \param turnOn: true to turn the light on, false to turn it off + virtual void turnLightOn(s32 lightIndex, bool turnOn); + + //! returns the maximal amount of dynamic lights the device can handle + virtual u32 getMaximalDynamicLightAmount() const; + + //! Sets the dynamic ambient light color. The default color is + //! (0,0,0,0) which means it is dark. + //! \param color: New color of the ambient light. + virtual void setAmbientLight(const SColorf& color); + + //! draws a vertex primitive list + void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, + const void* indexList, u32 primitiveCount, + E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType); + + //! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted. + virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false); + + //! Draws a part of the texture into the rectangle. + virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, + const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0, + const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false); + + //! Draws a 3d line. + virtual void draw3DLine(const core::vector3df& start, + const core::vector3df& end, SColor color = SColor(255,255,255,255)); + + //! draw an 2d rectangle + virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos, + const core::rect<s32>* clip = 0); + + //!Draws an 2d rectangle with a gradient. + virtual void draw2DRectangle(const core::rect<s32>& pos, + SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown, + const core::rect<s32>* clip = 0); + + //! Draws a 2d line. + virtual void draw2DLine(const core::position2d<s32>& start, + const core::position2d<s32>& end, + SColor color=SColor(255,255,255,255)); + + //! Draws a single pixel + virtual void drawPixel(u32 x, u32 y, const SColor & color); + + //! \return Returns the name of the video driver. Example: In case of the DirectX8 + //! driver, it would return "Direct3D8.1". + virtual const wchar_t* getName() const; + + //! Returns type of video driver + virtual E_DRIVER_TYPE getDriverType() const; + + //! get color format of the current color buffer + virtual ECOLOR_FORMAT getColorFormat() const; + + //! Returns the transformation set by setTransform + virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const; + + //! Creates a render target texture. + virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, + const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN); + + //! Clears the DepthBuffer. + virtual void clearZBuffer(); + + //! Returns an image created from the last rendered frame. + virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER); + + //! Returns the maximum amount of primitives (mostly vertices) which + //! the device is able to render with one drawIndexedTriangleList + //! call. + virtual u32 getMaximalPrimitiveCount() const; + + //! Draws a shadow volume into the stencil buffer. To draw a stencil shadow, do + //! this: First, draw all geometry. Then use this method, to draw the shadow + //! volume. Then, use IVideoDriver::drawStencilShadow() to visualize the shadow. + virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0); + + //! Fills the stencil shadow with color. After the shadow volume has been drawn + //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this + //! to draw the color of the shadow. + virtual void drawStencilShadow(bool clearStencilBuffer=false, + video::SColor leftUpEdge = video::SColor(0,0,0,0), + video::SColor rightUpEdge = video::SColor(0,0,0,0), + video::SColor leftDownEdge = video::SColor(0,0,0,0), + video::SColor rightDownEdge = video::SColor(0,0,0,0)); + + //! Returns the graphics card vendor name. + virtual core::stringc getVendorInfo(); + + //! Returns the maximum texture size supported. + virtual core::dimension2du getMaxTextureSize() const; + + virtual IDepthBuffer * getDepthBuffer () { return DepthBuffer; } + virtual IStencilBuffer * getStencilBuffer () { return StencilBuffer; } + + protected: + + + //! sets a render target + void setRenderTarget(video::CImage* image); + + //! sets the current Texture + //bool setTexture(u32 stage, video::ITexture* texture); + + //! returns a device dependent texture from a software surface (IImage) + //! THIS METHOD HAS TO BE OVERRIDDEN BY DERIVED DRIVERS WITH OWN TEXTURES + virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const io::path& name, void* mipmapData=0); + + video::CImage* BackBuffer; + video::IImagePresenter* Presenter; + + void* WindowId; + core::rect<s32>* SceneSourceRect; + + video::ITexture* RenderTargetTexture; + video::IImage* RenderTargetSurface; + core::dimension2d<u32> RenderTargetSize; + + //! selects the right triangle renderer based on the render states. + void setCurrentShader(); + + IBurningShader* CurrentShader; + IBurningShader* BurningShader[ETR2_COUNT]; + + IDepthBuffer* DepthBuffer; + IStencilBuffer* StencilBuffer; + + + /* + extend Matrix Stack + -> combined CameraProjection + -> combined CameraProjectionWorld + -> ClipScale from NDC to DC Space + */ + enum E_TRANSFORMATION_STATE_BURNING_VIDEO + { + ETS_VIEW_PROJECTION = ETS_COUNT, + ETS_CURRENT, + ETS_CLIPSCALE, + ETS_VIEW_INVERSE, + ETS_WORLD_INVERSE, + + ETS_COUNT_BURNING + }; + + enum E_TRANSFORMATION_FLAG + { + ETF_IDENTITY = 1, + ETF_TEXGEN_CAMERA_NORMAL = 2, + ETF_TEXGEN_CAMERA_REFLECTION = 4, + }; + u32 TransformationFlag[ETS_COUNT_BURNING]; + core::matrix4 Transformation[ETS_COUNT_BURNING]; + + void getCameraPosWorldSpace (); + void getLightPosObjectSpace (); + + + // Vertex Cache + static const SVSize vSize[]; + + SVertexCache VertexCache; + + void VertexCache_reset (const void* vertices, u32 vertexCount, + const void* indices, u32 indexCount, + E_VERTEX_TYPE vType,scene::E_PRIMITIVE_TYPE pType, + E_INDEX_TYPE iType); + void VertexCache_get ( const s4DVertex ** face ); + void VertexCache_getbypass ( s4DVertex ** face ); + + void VertexCache_fill ( const u32 sourceIndex,const u32 destIndex ); + s4DVertex * VertexCache_getVertex ( const u32 sourceIndex ); + + + // culling & clipping + u32 clipToHyperPlane ( s4DVertex * dest, const s4DVertex * source, u32 inCount, const sVec4 &plane ); + u32 clipToFrustumTest ( const s4DVertex * v ) const; + u32 clipToFrustum ( s4DVertex *source, s4DVertex * temp, const u32 vIn ); + + +#ifdef SOFTWARE_DRIVER_2_LIGHTING + + void lightVertex ( s4DVertex *dest, u32 vertexargb ); + //! Sets the fog mode. + virtual void setFog(SColor color, E_FOG_TYPE fogType, f32 start, + f32 end, f32 density, bool pixelFog, bool rangeFog); +#endif + + + // holds transformed, clipped vertices + SAlignedVertex CurrentOut; + SAlignedVertex Temp; + + void ndc_2_dc_and_project ( s4DVertex *dest,s4DVertex *source, u32 vIn ) const; + f32 screenarea ( const s4DVertex *v0 ) const; + void select_polygon_mipmap ( s4DVertex *source, u32 vIn, u32 tex, const core::dimension2du& texSize ) const; + f32 texelarea ( const s4DVertex *v0, int tex ) const; + + + void ndc_2_dc_and_project2 ( const s4DVertex **v, const u32 size ) const; + f32 screenarea2 ( const s4DVertex **v ) const; + f32 texelarea2 ( const s4DVertex **v, int tex ) const; + void select_polygon_mipmap2 ( s4DVertex **source, u32 tex, const core::dimension2du& texSize ) const; + + + SBurningShaderLightSpace LightSpace; + SBurningShaderMaterial Material; + + static const sVec4 NDCPlane[6]; + }; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.cpp new file mode 100644 index 0000000..b446e7d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.cpp @@ -0,0 +1,151 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +#include "CSoftwareTexture.h" +#include "os.h" + +namespace irr +{ +namespace video +{ + +//! constructor +CSoftwareTexture::CSoftwareTexture(IImage* image, const io::path& name, + bool renderTarget, void* mipmapData) +: ITexture(name), Texture(0), IsRenderTarget(renderTarget) +{ + #ifdef _DEBUG + setDebugName("CSoftwareTexture"); + #endif + + if (image) + { + OrigSize = image->getDimension(); + core::dimension2d<u32> optSize=OrigSize.getOptimalSize(); + + Image = new CImage(ECF_A1R5G5B5, OrigSize); + image->copyTo(Image); + + if (optSize == OrigSize) + { + Texture = Image; + Texture->grab(); + } + else + { + Texture = new CImage(ECF_A1R5G5B5, optSize); + Image->copyToScaling(Texture); + } + } +} + + + +//! destructor +CSoftwareTexture::~CSoftwareTexture() +{ + if (Image) + Image->drop(); + + if (Texture) + Texture->drop(); +} + + + +//! lock function +void* CSoftwareTexture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) +{ + return Image->lock(); +} + + + +//! unlock function +void CSoftwareTexture::unlock() +{ + if (Image != Texture) + { + os::Printer::log("Performance warning, slow unlock of non power of 2 texture.", ELL_WARNING); + Image->copyToScaling(Texture); + } + + Image->unlock(); +} + + +//! Returns original size of the texture. +const core::dimension2d<u32>& CSoftwareTexture::getOriginalSize() const +{ + return OrigSize; +} + + +//! Returns (=size) of the texture. +const core::dimension2d<u32>& CSoftwareTexture::getSize() const +{ + return Image->getDimension(); +} + + +//! returns unoptimized surface +CImage* CSoftwareTexture::getImage() +{ + return Image; +} + + + +//! returns texture surface +CImage* CSoftwareTexture::getTexture() +{ + return Texture; +} + + + +//! returns driver type of texture (=the driver, who created the texture) +E_DRIVER_TYPE CSoftwareTexture::getDriverType() const +{ + return EDT_SOFTWARE; +} + + + +//! returns color format of texture +ECOLOR_FORMAT CSoftwareTexture::getColorFormat() const +{ + return ECF_A1R5G5B5; +} + + + +//! returns pitch of texture (in bytes) +u32 CSoftwareTexture::getPitch() const +{ + return Image->getDimension().Width * 2; +} + + +//! Regenerates the mip map levels of the texture. Useful after locking and +//! modifying the texture +void CSoftwareTexture::regenerateMipMapLevels(void* mipmapData) +{ + // our software textures don't have mip maps +} + +bool CSoftwareTexture::isRenderTarget() const +{ + return IsRenderTarget; +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.h new file mode 100644 index 0000000..ff06e16 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture.h @@ -0,0 +1,76 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SOFTWARE_TEXTURE_H_INCLUDED__ +#define __C_SOFTWARE_TEXTURE_H_INCLUDED__ + +#include "ITexture.h" +#include "CImage.h" + +namespace irr +{ +namespace video +{ + +/*! + interface for a Video Driver dependent Texture. +*/ +class CSoftwareTexture : public ITexture +{ +public: + + //! constructor + CSoftwareTexture(IImage* surface, const io::path& name, + bool renderTarget=false, void* mipmapData=0); + + //! destructor + virtual ~CSoftwareTexture(); + + //! lock function + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); + + //! unlock function + virtual void unlock(); + + //! Returns original size of the texture. + virtual const core::dimension2d<u32>& getOriginalSize() const; + + //! Returns (=size) of the texture. + virtual const core::dimension2d<u32>& getSize() const; + + //! returns unoptimized surface + virtual CImage* getImage(); + + //! returns texture surface + virtual CImage* getTexture(); + + //! returns driver type of texture (=the driver, who created the texture) + virtual E_DRIVER_TYPE getDriverType() const; + + //! returns color format of texture + virtual ECOLOR_FORMAT getColorFormat() const; + + //! returns pitch of texture (in bytes) + virtual u32 getPitch() const; + + //! Regenerates the mip map levels of the texture. Useful after locking and + //! modifying the texture + virtual void regenerateMipMapLevels(void* mipmapData=0); + + //! is it a render target? + virtual bool isRenderTarget() const; + +private: + CImage* Image; + CImage* Texture; + core::dimension2d<u32> OrigSize; + bool IsRenderTarget; +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.cpp new file mode 100644 index 0000000..32d150f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.cpp @@ -0,0 +1,156 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +#include "SoftwareDriver2_compile_config.h" +#include "SoftwareDriver2_helper.h" +#include "CSoftwareTexture2.h" +#include "os.h" + +namespace irr +{ +namespace video +{ + +//! constructor +CSoftwareTexture2::CSoftwareTexture2(IImage* image, const io::path& name, + u32 flags, void* mipmapData) + : ITexture(name), MipMapLOD(0), Flags ( flags ), OriginalFormat(video::ECF_UNKNOWN) +{ + #ifdef _DEBUG + setDebugName("CSoftwareTexture2"); + #endif + + #ifndef SOFTWARE_DRIVER_2_MIPMAPPING + Flags &= ~GEN_MIPMAP; + #endif + + memset32 ( MipMap, 0, sizeof ( MipMap ) ); + + if (image) + { + OrigSize = image->getDimension(); + OriginalFormat = image->getColorFormat(); + + core::setbit_cond(Flags, + image->getColorFormat () == video::ECF_A8R8G8B8 || + image->getColorFormat () == video::ECF_A1R5G5B5, + HAS_ALPHA); + + core::dimension2d<u32> optSize( + OrigSize.getOptimalSize( 0 != ( Flags & NP2_SIZE ), + false, false, + ( Flags & NP2_SIZE ) ? SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE : 0) + ); + + if ( OrigSize == optSize ) + { + MipMap[0] = new CImage(BURNINGSHADER_COLOR_FORMAT, image->getDimension()); + image->copyTo(MipMap[0]); + } + else + { + char buf[256]; + core::stringw showName ( name ); + snprintf ( buf, 256, "Burningvideo: Warning Texture %ls reformat %dx%d -> %dx%d,%d", + showName.c_str(), + OrigSize.Width, OrigSize.Height, optSize.Width, optSize.Height, + BURNINGSHADER_COLOR_FORMAT + ); + + OrigSize = optSize; + os::Printer::log ( buf, ELL_WARNING ); + MipMap[0] = new CImage(BURNINGSHADER_COLOR_FORMAT, optSize); + image->copyToScalingBoxFilter ( MipMap[0],0, false ); + } + + OrigImageDataSizeInPixels = (f32) 0.3f * MipMap[0]->getImageDataSizeInPixels(); + } + + regenerateMipMapLevels(mipmapData); +} + + +//! destructor +CSoftwareTexture2::~CSoftwareTexture2() +{ + for ( s32 i = 0; i!= SOFTWARE_DRIVER_2_MIPMAPPING_MAX; ++i ) + { + if ( MipMap[i] ) + MipMap[i]->drop(); + } +} + + +//! Regenerates the mip map levels of the texture. Useful after locking and +//! modifying the texture +void CSoftwareTexture2::regenerateMipMapLevels(void* mipmapData) +{ + if ( !hasMipMaps () ) + return; + + s32 i; + + // release + for ( i = 1; i < SOFTWARE_DRIVER_2_MIPMAPPING_MAX; ++i ) + { + if ( MipMap[i] ) + MipMap[i]->drop(); + } + + core::dimension2d<u32> newSize; + core::dimension2d<u32> origSize=OrigSize; + + for (i=1; i < SOFTWARE_DRIVER_2_MIPMAPPING_MAX; ++i) + { + newSize = MipMap[i-1]->getDimension(); + newSize.Width = core::s32_max ( 1, newSize.Width >> SOFTWARE_DRIVER_2_MIPMAPPING_SCALE ); + newSize.Height = core::s32_max ( 1, newSize.Height >> SOFTWARE_DRIVER_2_MIPMAPPING_SCALE ); + origSize.Width = core::s32_max(1, origSize.Width >> 1); + origSize.Height = core::s32_max(1, origSize.Height >> 1); + + if (mipmapData) + { + if (OriginalFormat != BURNINGSHADER_COLOR_FORMAT) + { + IImage* tmpImage = new CImage(OriginalFormat, origSize, mipmapData, true, false); + MipMap[i] = new CImage(BURNINGSHADER_COLOR_FORMAT, newSize); + if (origSize==newSize) + tmpImage->copyTo(MipMap[i]); + else + tmpImage->copyToScalingBoxFilter(MipMap[i]); + tmpImage->drop(); + } + else + { + if (origSize==newSize) + MipMap[i] = new CImage(BURNINGSHADER_COLOR_FORMAT, newSize, mipmapData, false); + else + { + MipMap[i] = new CImage(BURNINGSHADER_COLOR_FORMAT, newSize); + IImage* tmpImage = new CImage(BURNINGSHADER_COLOR_FORMAT, origSize, mipmapData, true, false); + tmpImage->copyToScalingBoxFilter(MipMap[i]); + tmpImage->drop(); + } + } + mipmapData = (u8*)mipmapData+origSize.getArea()*IImage::getBitsPerPixelFromFormat(OriginalFormat)/8; + } + else + { + MipMap[i] = new CImage(BURNINGSHADER_COLOR_FORMAT, newSize); + + //static u32 color[] = { 0, 0xFFFF0000, 0xFF00FF00,0xFF0000FF,0xFFFFFF00,0xFFFF00FF,0xFF00FFFF,0xFF0F0F0F }; + MipMap[i]->fill ( 0 ); + MipMap[0]->copyToScalingBoxFilter( MipMap[i], 0, false ); + } + } +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.h new file mode 100644 index 0000000..cc8adc6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSoftwareTexture2.h @@ -0,0 +1,141 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SOFTWARE_2_TEXTURE_H_INCLUDED__ +#define __C_SOFTWARE_2_TEXTURE_H_INCLUDED__ + +#include "SoftwareDriver2_compile_config.h" + +#include "ITexture.h" +#include "CImage.h" + +namespace irr +{ +namespace video +{ + +/*! + interface for a Video Driver dependent Texture. +*/ +class CSoftwareTexture2 : public ITexture +{ +public: + + //! constructor + enum eTex2Flags + { + GEN_MIPMAP = 1, + IS_RENDERTARGET = 2, + NP2_SIZE = 4, + HAS_ALPHA = 8 + }; + CSoftwareTexture2(IImage* surface, const io::path& name, u32 flags, void* mipmapData=0); + + //! destructor + virtual ~CSoftwareTexture2(); + + //! lock function + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) + { + if (Flags & GEN_MIPMAP) + MipMapLOD=mipmapLevel; + return MipMap[MipMapLOD]->lock(); + } + + //! unlock function + virtual void unlock() + { + MipMap[MipMapLOD]->unlock(); + } + + //! Returns original size of the texture. + virtual const core::dimension2d<u32>& getOriginalSize() const + { + //return MipMap[0]->getDimension(); + return OrigSize; + } + + //! Returns the size of the largest mipmap. + f32 getLODFactor( const f32 texArea ) const + { + return OrigImageDataSizeInPixels * texArea; + //return MipMap[0]->getImageDataSizeInPixels () * texArea; + } + + //! Returns (=size) of the texture. + virtual const core::dimension2d<u32>& getSize() const + { + return MipMap[MipMapLOD]->getDimension(); + } + + //! returns unoptimized surface + virtual CImage* getImage() const + { + return MipMap[0]; + } + + //! returns texture surface + virtual CImage* getTexture() const + { + return MipMap[MipMapLOD]; + } + + + //! returns driver type of texture (=the driver, who created the texture) + virtual E_DRIVER_TYPE getDriverType() const + { + return EDT_BURNINGSVIDEO; + } + + //! returns color format of texture + virtual ECOLOR_FORMAT getColorFormat() const + { + return BURNINGSHADER_COLOR_FORMAT; + } + + //! returns pitch of texture (in bytes) + virtual u32 getPitch() const + { + return MipMap[MipMapLOD]->getPitch(); + } + + //! Regenerates the mip map levels of the texture. Useful after locking and + //! modifying the texture + virtual void regenerateMipMapLevels(void* mipmapData=0); + + //! support mipmaps + virtual bool hasMipMaps() const + { + return (Flags & GEN_MIPMAP ) != 0; + } + + //! Returns if the texture has an alpha channel + virtual bool hasAlpha() const + { + return (Flags & HAS_ALPHA ) != 0; + } + + //! is a render target + virtual bool isRenderTarget() const + { + return (Flags & IS_RENDERTARGET) != 0; + } + +private: + f32 OrigImageDataSizeInPixels; + core::dimension2d<u32> OrigSize; + + CImage * MipMap[SOFTWARE_DRIVER_2_MIPMAPPING_MAX]; + + u32 MipMapLOD; + u32 Flags; + ECOLOR_FORMAT OriginalFormat; +}; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.cpp new file mode 100644 index 0000000..00b6528 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.cpp @@ -0,0 +1,199 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CSphereSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "S3DVertex.h" +#include "os.h" +#include "CShadowVolumeSceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CSphereSceneNode::CSphereSceneNode(f32 radius, u32 polyCountX, u32 polyCountY, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale) +: IMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0), Shadow(0), + Radius(radius), PolyCountX(polyCountX), PolyCountY(polyCountY) +{ + #ifdef _DEBUG + setDebugName("CSphereSceneNode"); + #endif + + Mesh = SceneManager->getGeometryCreator()->createSphereMesh(radius, polyCountX, polyCountY); +} + + + +//! destructor +CSphereSceneNode::~CSphereSceneNode() +{ + if (Shadow) + Shadow->drop(); + if (Mesh) + Mesh->drop(); +} + + +//! renders the node. +void CSphereSceneNode::render() +{ + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + if (Mesh && driver) + { + driver->setMaterial(Mesh->getMeshBuffer(0)->getMaterial()); + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + if (Shadow) + Shadow->updateShadowVolumes(); + + driver->drawMeshBuffer(Mesh->getMeshBuffer(0)); + if ( DebugDataVisible & scene::EDS_BBOX ) + { + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + driver->draw3DBox(Mesh->getMeshBuffer(0)->getBoundingBox(), video::SColor(255,255,255,255)); + } + } +} + + +//! Removes a child from this scene node. +//! Implemented here, to be able to remove the shadow properly, if there is one, +//! or to remove attached childs. +bool CSphereSceneNode::removeChild(ISceneNode* child) +{ + if (child && Shadow == child) + { + Shadow->drop(); + Shadow = 0; + } + + return ISceneNode::removeChild(child); +} + + +//! Creates shadow volume scene node as child of this node +//! and returns a pointer to it. +IShadowVolumeSceneNode* CSphereSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) +{ + if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) + return 0; + + if (!shadowMesh) + shadowMesh = Mesh; // if null is given, use the mesh of node + + if (Shadow) + Shadow->drop(); + + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); + return Shadow; +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CSphereSceneNode::getBoundingBox() const +{ + return Mesh ? Mesh->getBoundingBox() : Box; +} + + +void CSphereSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + SceneManager->registerNodeForRendering(this); + + ISceneNode::OnRegisterSceneNode(); +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hirachy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& CSphereSceneNode::getMaterial(u32 i) +{ + if (i>0 || !Mesh) + return ISceneNode::getMaterial(i); + else + return Mesh->getMeshBuffer(i)->getMaterial(); +} + + +//! returns amount of materials used by this scene node. +u32 CSphereSceneNode::getMaterialCount() const +{ + return 1; +} + + +//! Writes attributes of the scene node. +void CSphereSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ISceneNode::serializeAttributes(out, options); + + out->addFloat("Radius", Radius); + out->addInt("PolyCountX", PolyCountX); + out->addInt("PolyCountY", PolyCountY); +} + + +//! Reads attributes of the scene node. +void CSphereSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + f32 oldRadius = Radius; + u32 oldPolyCountX = PolyCountX; + u32 oldPolyCountY = PolyCountY; + + Radius = in->getAttributeAsFloat("Radius"); + PolyCountX = in->getAttributeAsInt("PolyCountX"); + PolyCountY = in->getAttributeAsInt("PolyCountY"); + // legacy values read for compatibility with older versions + u32 polyCount = in->getAttributeAsInt("PolyCount"); + if (PolyCountX ==0 && PolyCountY == 0) + PolyCountX = PolyCountY = polyCount; + + Radius = core::max_(Radius, 0.0001f); + + if ( !core::equals(Radius, oldRadius) || PolyCountX != oldPolyCountX || PolyCountY != oldPolyCountY) + { + if (Mesh) + Mesh->drop(); + Mesh = SceneManager->getGeometryCreator()->createSphereMesh(Radius, PolyCountX, PolyCountY); + } + + ISceneNode::deserializeAttributes(in, options); +} + +//! Creates a clone of this scene node and its children. +ISceneNode* CSphereSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CSphereSceneNode* nb = new CSphereSceneNode(Radius, PolyCountX, PolyCountY, newParent, + newManager, ID, RelativeTranslation); + + nb->cloneMembers(this, newManager); + nb->getMaterial(0) = Mesh->getMeshBuffer(0)->getMaterial(); + nb->Shadow = Shadow; + if ( nb->Shadow ) + nb->Shadow->grab(); + + if ( newParent ) + nb->drop(); + return nb; +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.h new file mode 100644 index 0000000..7dcc4c8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSphereSceneNode.h @@ -0,0 +1,96 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_SHPERE_SCENE_NODE_H_INCLUDED__ +#define __C_SHPERE_SCENE_NODE_H_INCLUDED__ + +#include "IMeshSceneNode.h" +#include "IMesh.h" + +namespace irr +{ +namespace scene +{ + class CSphereSceneNode : public IMeshSceneNode + { + public: + + //! constructor + CSphereSceneNode(f32 size, u32 polyCountX, u32 polyCountY, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! destructor + virtual ~CSphereSceneNode(); + + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! returns the material based on the zero based index i. To get the amount + //! of materials used by this scene node, use getMaterialCount(). + //! This function is needed for inserting the node into the scene hirachy on a + //! optimal position for minimizing renderstate changes, but can also be used + //! to directly modify the material of a scene node. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_SPHERE; } + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + //! The mesh cannot be changed + virtual void setMesh(IMesh* mesh) {} + + //! Returns the current mesh + virtual IMesh* getMesh() { return Mesh; } + + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. + /* In this way it is possible to change the materials a mesh causing all mesh scene nodes + referencing this mesh to change too. */ + virtual void setReadOnlyMaterials(bool readonly) {} + + //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style + virtual bool isReadOnlyMaterials() const { return false; } + + //! Creates shadow volume scene node as child of this node + //! and returns a pointer to it. + virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + + //! Removes a child from this scene node. + //! Implemented here, to be able to remove the shadow properly, if there is one, + //! or to remove attached childs. + virtual bool removeChild(ISceneNode* child); + + private: + + IMesh* Mesh; + IShadowVolumeSceneNode* Shadow; + core::aabbox3d<f32> Box; + f32 Radius; + u32 PolyCountX; + u32 PolyCountY; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlat.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlat.cpp new file mode 100644 index 0000000..216e1a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlat.cpp @@ -0,0 +1,300 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRFlat : public CTRTextureGouraud +{ +public: + + CTRFlat(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRFlat"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + u16 color; + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + s32 spanZValue, spanZStep; // ZValues when drawing a span + TZBufferType* zTarget, *spanZTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + color = v1->Color; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + // TODO: clipping is not correct when leftx is clipped. + + if (leftx<ViewPortRect.UpperLeftCorner.X) + leftx = ViewPortRect.UpperLeftCorner.X; + else + if (leftx>ViewPortRect.LowerRightCorner.X) + leftx = ViewPortRect.LowerRightCorner.X; + + if (rightx<ViewPortRect.UpperLeftCorner.X) + rightx = ViewPortRect.UpperLeftCorner.X; + else + if (rightx>ViewPortRect.LowerRightCorner.X) + rightx = ViewPortRect.LowerRightCorner.X; + + // draw the span + + if (rightx - leftx != 0) + { + tmpDiv = 1.0f / (rightx - leftx); + spanZValue = leftZValue; + spanZStep = (s32)((rightZValue - leftZValue) * tmpDiv); + + hSpanBegin = targetSurface + leftx; + spanZTarget = zTarget + leftx; + hSpanEnd = targetSurface + rightx; + + while (hSpanBegin < hSpanEnd) + { + if (spanZValue > *spanZTarget) + { + *spanZTarget = spanZValue; + *hSpanBegin = color; + } + + spanZValue += spanZStep; + ++hSpanBegin; + ++spanZTarget; + } + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + } +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererFlat(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRFlat(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlatWire.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlatWire.cpp new file mode 100644 index 0000000..4f0c5c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRFlatWire.cpp @@ -0,0 +1,281 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRFlatWire : public CTRTextureGouraud +{ +public: + + CTRFlatWire(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRWire"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + u16 color; + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + TZBufferType* zTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + color = v1->Color; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + if (leftx>=ViewPortRect.UpperLeftCorner.X && + leftx<=ViewPortRect.LowerRightCorner.X) + { + if (leftZValue > *(zTarget + leftx)) + { + *(zTarget + leftx) = leftZValue; + *(targetSurface + leftx) = color; + } + } + + + if (rightx>=ViewPortRect.UpperLeftCorner.X && + rightx<=ViewPortRect.LowerRightCorner.X) + { + if (rightZValue > *(zTarget + rightx)) + { + *(zTarget + rightx) = rightZValue; + *(targetSurface + rightx) = color; + } + + } + + // draw the span + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + } +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererFlatWire(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRFlatWire(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud.cpp new file mode 100644 index 0000000..9edf908 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud.cpp @@ -0,0 +1,358 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + + +class CTRGouraud : public CTRTextureGouraud +{ +public: + + CTRGouraud(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRGouraud"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels + s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values + s32 leftStepR, leftStepG, leftStepB, + rightStepR, rightStepG, rightStepB; // color steps + s32 spanR, spanG, spanB, spanStepR, spanStepG, spanStepB; // color interpolating values while drawing a span. + + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + s32 spanZValue, spanZStep; // ZValues when drawing a span + TZBufferType* zTarget, *spanZTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftR = rightR = video::getRed(v1->Color)<<11; + leftG = rightG = video::getGreen(v1->Color)<<11; + leftB = rightB = video::getBlue(v1->Color)<<11; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v2->Color)<<11) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v2->Color)<<11) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v2->Color)<<11) - rightB) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - leftB) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - rightB) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v2->Color)<<11) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v2->Color)<<11) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v2->Color)<<11) - leftB) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftR += leftStepR*leftx; + leftG += leftStepG*leftx; + leftB += leftStepB*leftx; + rightR += rightStepR*leftx; + rightG += rightStepG*leftx; + rightB += rightStepB*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + // TODO: clipping is not correct when leftx is clipped. + + if (leftx<ViewPortRect.UpperLeftCorner.X) + leftx = ViewPortRect.UpperLeftCorner.X; + else + if (leftx>ViewPortRect.LowerRightCorner.X) + leftx = ViewPortRect.LowerRightCorner.X; + + if (rightx<ViewPortRect.UpperLeftCorner.X) + rightx = ViewPortRect.UpperLeftCorner.X; + else + if (rightx>ViewPortRect.LowerRightCorner.X) + rightx = ViewPortRect.LowerRightCorner.X; + + // draw the span + + if (rightx - leftx != 0) + { + tmpDiv = 1.0f / (rightx - leftx); + spanZValue = leftZValue; + spanZStep = (s32)((rightZValue - leftZValue) * tmpDiv); + + hSpanBegin = targetSurface + leftx; + spanZTarget = zTarget + leftx; + hSpanEnd = targetSurface + rightx; + + spanR = leftR; + spanG = leftG; + spanB = leftB; + spanStepR = (s32)((rightR - leftR) * tmpDiv); + spanStepG = (s32)((rightG - leftG) * tmpDiv); + spanStepB = (s32)((rightB - leftB) * tmpDiv); + + while (hSpanBegin < hSpanEnd) + { + if (spanZValue > *spanZTarget) + { + *spanZTarget = spanZValue; + *hSpanBegin = video::RGB16(spanR>>8, spanG>>8, spanB>>8); + } + + spanR += spanStepR; + spanG += spanStepG; + spanB += spanStepB; + + spanZValue += spanZStep; + ++hSpanBegin; + ++spanZTarget; + } + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftR += leftStepR; + leftG += leftStepG; + leftB += leftStepB; + rightR += rightStepR; + rightG += rightStepG; + rightB += rightStepB; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightR = video::getRed(v2->Color)<<11; + rightG = video::getGreen(v2->Color)<<11; + rightB = video::getBlue(v2->Color)<<11; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - rightB) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftR = video::getRed(v2->Color)<<11; + leftG = video::getGreen(v2->Color)<<11; + leftB = video::getBlue(v2->Color)<<11; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - leftB) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + } + +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererGouraud(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRGouraud(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud2.cpp new file mode 100644 index 0000000..48ed4d1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraud2.cpp @@ -0,0 +1,645 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +//#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRGouraud2 : public IBurningShader +{ +public: + + //! constructor + CTRGouraud2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRGouraud2::CTRGouraud2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRGouraud2"); + #endif +} + + + +/*! +*/ +void CTRGouraud2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + +#ifdef IPOL_C0 + tFixPoint r0, g0, b0; + +#ifdef INVERSE_W + f32 inversew; +#endif + +#endif + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { +#ifdef IPOL_C0 +#ifdef INVERSE_W + inversew = core::reciprocal ( line.w[0] ); + + getSample_color ( r0, g0, b0, line.c[0][0] * inversew ); +#else + getSample_color ( r0, g0, b0, line.c[0][0] ); +#endif + + dst[i] = fix_to_color ( r0, g0, b0 ); +#else + dst[i] = COLOR_BRIGHT_WHITE; +#endif + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( a->Pos.y > b->Pos.y ) swapVertexPointer(&a, &b); + if ( a->Pos.y > c->Pos.y ) swapVertexPointer(&a, &c); + if ( b->Pos.y > c->Pos.y ) swapVertexPointer(&b, &c); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererGouraud2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRGouraud2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlpha2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlpha2.cpp new file mode 100644 index 0000000..3c014f3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlpha2.cpp @@ -0,0 +1,657 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +//#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + + +namespace irr +{ + +namespace video +{ + +class CTRGouraudAlpha2 : public IBurningShader +{ +public: + + //! constructor + CTRGouraudAlpha2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRGouraudAlpha2::CTRGouraudAlpha2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRGouraudAlpha2"); + #endif +} + + + +/*! +*/ +void CTRGouraudAlpha2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[0]; +#endif +#ifdef IPOL_T1 + sVec2 slopeT[1]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + +#ifdef IPOL_C0 + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint a0; + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; +#endif + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { +#ifdef IPOL_C0 +#ifdef INVERSE_W + inversew = core::reciprocal ( line.w[0] ); + + getSample_color ( a0, r0, g0, b0, line.c[0][0] * inversew ); +#else + getSample_color ( a0, r0, g0, b0, line.c[0][0] ); +#endif + + color_to_fix ( r1, g1, b1, dst[i] ); + + r2 = r1 + imulFix ( a0, r0 - r1 ); + g2 = g1 + imulFix ( a0, g0 - g1 ); + b2 = b1 + imulFix ( a0, b0 - b1 ); + + dst[i] = fix_to_color ( r2, g2, b2 ); +#else + dst[i] = COLOR_BRIGHT_WHITE; +#endif +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRGouraudAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererGouraudAlpha2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRGouraudAlpha2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp new file mode 100644 index 0000000..24b8779 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp @@ -0,0 +1,654 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +//#define INVERSE_W + +//#define USE_ZBUFFER +//#define IPOL_W +//#define CMP_W +//#define WRITE_W + +#define IPOL_C0 +//#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + //#define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + + +namespace irr +{ + +namespace video +{ + +class CTRGouraudAlphaNoZ2 : public IBurningShader +{ +public: + + //! constructor + CTRGouraudAlphaNoZ2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRGouraudAlphaNoZ2::CTRGouraudAlphaNoZ2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRGouraudAlphaNoZ2"); + #endif +} + + + +/*! +*/ +void CTRGouraudAlphaNoZ2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + +#ifdef IPOL_C0 + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint a0; + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; +#endif + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef IPOL_C0 +#ifdef IPOL_W + inversew = core::reciprocal ( line.w[0] ); + + getSample_color ( a0, r0, g0, b0, line.c[0][0] * inversew ); +#else + getSample_color ( a0, r0, g0, b0, line.c[0][0] ); +#endif + + color_to_fix ( r1, g1, b1, dst[i] ); + + r2 = r1 + imulFix ( a0, r0 - r1 ); + g2 = g1 + imulFix ( a0, g0 - g1 ); + b2 = b1 + imulFix ( a0, b0 - b1 ); + + dst[i] = fix_to_color ( r2, g2, b2 ); +#else + dst[i] = COLOR_BRIGHT_WHITE; +#endif + + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRGouraudAlphaNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTRGouraudAlphaNoZ2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRGouraudAlphaNoZ2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudWire.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudWire.cpp new file mode 100644 index 0000000..1d233a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRGouraudWire.cpp @@ -0,0 +1,326 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRGouraudWire : public CTRTextureGouraud +{ +public: + + CTRGouraudWire(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRGouraudWire"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values + s32 leftStepR, leftStepG, leftStepB, + rightStepR, rightStepG, rightStepB; // color steps + + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + TZBufferType* zTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftR = rightR = video::getRed(v1->Color)<<11; + leftG = rightG = video::getGreen(v1->Color)<<11; + leftB = rightB = video::getBlue(v1->Color)<<11; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v2->Color)<<11) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v2->Color)<<11) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v2->Color)<<11) - rightB) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - leftB) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - rightB) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v2->Color)<<11) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v2->Color)<<11) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v2->Color)<<11) - leftB) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftR += leftStepR*leftx; + leftG += leftStepG*leftx; + leftB += leftStepB*leftx; + rightR += rightStepR*leftx; + rightG += rightStepG*leftx; + rightB += rightStepB*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + if (leftx>=ViewPortRect.UpperLeftCorner.X && + leftx<=ViewPortRect.LowerRightCorner.X) + { + if (leftZValue > *(zTarget + leftx)) + { + *(zTarget + leftx) = leftZValue; + *(targetSurface + leftx) = video::RGB16(leftR>>8, leftG>>8, leftB>>8); + } + } + + + if (rightx>=ViewPortRect.UpperLeftCorner.X && + rightx<=ViewPortRect.LowerRightCorner.X) + { + if (rightZValue > *(zTarget + rightx)) + { + *(zTarget + rightx) = rightZValue; + *(targetSurface + rightx) = video::RGB16(rightR, rightG, rightB); + } + + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftR += leftStepR; + leftG += leftStepG; + leftB += leftStepB; + rightR += rightStepR; + rightG += rightStepG; + rightB += rightStepB; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightR = video::getRed(v2->Color)<<11; + rightG = video::getGreen(v2->Color)<<11; + rightB = video::getBlue(v2->Color)<<11; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - rightB) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftR = video::getRed(v2->Color)<<11; + leftG = video::getGreen(v2->Color)<<11; + leftB = video::getBlue(v2->Color)<<11; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<11) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<11) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<11) - leftB) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + } + +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererGouraudWire(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRGouraudWire(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRNormalMap.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRNormalMap.cpp new file mode 100644 index 0000000..94c0962 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRNormalMap.cpp @@ -0,0 +1,848 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 +#undef IPOL_T2 +#undef IPOL_L0 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 +#define IPOL_L0 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + + +class CTRNormalMap : public IBurningShader +{ +public: + + //! constructor + CTRNormalMap(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRNormalMap::CTRNormalMap(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRNormalMap"); + #endif +} + + + +/*! +*/ +void CTRNormalMap::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif +#ifdef IPOL_L0 + sVec3 slopeL[BURNING_MATERIAL_MAX_TANGENT]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif +#ifdef IPOL_T2 + slopeT[2] = (line.t[2][1] - line.t[2][0]) * invDeltaX; +#endif +#ifdef IPOL_L0 + slopeL[0] = (line.l[0][1] - line.l[0][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2] * subPixel; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint tx0, tx1; + tFixPoint ty0, ty1; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + tFixPoint lx, ly, lz; + tFixPoint ndotl; + + sVec3 light; + + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); + tx1 = tofix ( line.t[1][0].x,inversew); + ty1 = tofix ( line.t[1][0].y,inversew); + + +#ifdef IPOL_C0 + r3 = tofix ( line.c[0][0].y ,inversew ); + g3 = tofix ( line.c[0][0].z ,inversew ); + b3 = tofix ( line.c[0][0].w ,inversew ); +#endif + +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); + tx1 = tofix ( line.t[1][0].x ); + ty1 = tofix ( line.t[1][0].y ); + +#ifdef IPOL_C0 + r3 = tofix ( line.c[0][0].y ); + g3 = tofix ( line.c[0][0].z ); + b3 = tofix ( line.c[0][0].w ); +#endif + +#endif + getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); + + // normal map + getSample_texture ( r1, g1, b1, &IT[1], tx1, ty1 ); + + r1 = ( r1 - FIX_POINT_HALF_COLOR) >> (COLOR_MAX_LOG2-1); + g1 = ( g1 - FIX_POINT_HALF_COLOR) >> (COLOR_MAX_LOG2-1); + b1 = ( b1 - FIX_POINT_HALF_COLOR) >> (COLOR_MAX_LOG2-1); + +/* + sVec3 l = line.l[0][0] * inversew; + l.setLength( 2.f ); + + lx = tofix ( l.x - 0.5f ); + ly = tofix ( l.y - 0.5f ); + lz = tofix ( l.z - 0.5f ); +*/ + + lx = tofix ( line.l[0][0].x, inversew ); + ly = tofix ( line.l[0][0].y, inversew ); + lz = tofix ( line.l[0][0].z, inversew ); + + // DOT 3 Normal Map light in tangent space + ndotl = saturateFix ( FIX_POINT_HALF_COLOR + (( imulFix ( r1, lx ) + imulFix ( g1, ly ) + imulFix ( b1, lz ) ) << (COLOR_MAX_LOG2-1)) ); + +#ifdef IPOL_C0 + + // N . L + r2 = imulFix ( imulFix_tex1 ( r0, ndotl ), r3 ); + g2 = imulFix ( imulFix_tex1 ( g0, ndotl ), g3 ); + b2 = imulFix ( imulFix_tex1 ( b0, ndotl ), b3 ); + +/* + // heightmap: (1 - neu ) + alt - 0.5, on_minus_srcalpha + add signed + // emboss bump map + a4 -= a1; + r2 = clampfix_maxcolor ( clampfix_mincolor ( imulFix ( r0 + a4, r3 ) ) ); + g2 = clampfix_maxcolor ( clampfix_mincolor ( imulFix ( g0 + a4, g3 ) ) ); + b2 = clampfix_maxcolor ( clampfix_mincolor ( imulFix ( b0 + a4, b3 ) ) ); +*/ + +/* + r2 = clampfix_maxcolor ( imulFix_tex1 ( r2, r1 ) ); + g2 = clampfix_maxcolor ( imulFix_tex1 ( g2, g1 ) ); + b2 = clampfix_maxcolor ( imulFix_tex1 ( b2, b1 ) ); +*/ +#else + r2 = clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) ); + g2 = clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) ); + b2 = clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) ); +#endif + + + dst[i] = fix_to_color ( r2, g2, b2 ); + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2]; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0]; +#endif + } + +} + +void CTRNormalMap::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][0] = (c->Tex[2] - a->Tex[2]) * scan.invDeltaY[0]; + scan.t[2][0] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][0] = (c->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[0]; + scan.l[0][0] = a->LightTangent[0]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (b->Tex[2] - a->Tex[2]) * scan.invDeltaY[1]; + scan.t[2][1] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (b->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[1]; + scan.l[0][1] = a->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + //if( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] = a->Tex[2] + scan.slopeT[2][0] * temp[0]; +#endif +#ifdef IPOL_L0 + scan.l[0][0] = a->LightTangent[0] + scan.slopeL[0][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (c->Tex[2] - b->Tex[2]) * scan.invDeltaY[2]; + scan.t[2][1] = b->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (c->LightTangent[0] - b->LightTangent[0]) * scan.invDeltaY[2]; + scan.l[0][1] = b->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a triangle renderer +IBurningShader* createTRNormalMap(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRNormalMap(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRStencilShadow.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRStencilShadow.cpp new file mode 100644 index 0000000..be974b6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRStencilShadow.cpp @@ -0,0 +1,930 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef USE_SBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 +#undef IPOL_T2 +#undef IPOL_L0 + +// define render case +#define SUBTEXEL +//#define INVERSE_W + +#define USE_ZBUFFER +#define USE_SBUFFER +#define IPOL_W +#define CMP_W +//#define WRITE_W + + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRStencilShadow : public IBurningShader +{ +public: + + //! constructor + CTRStencilShadow(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + virtual void setParam ( u32 index, f32 value); + +private: + // fragment shader + typedef void (CTRStencilShadow::*tFragmentShader) (); + void fragment_zfail_decr (); + void fragment_zfail_incr (); + + tFragmentShader fragmentShader; + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRStencilShadow::CTRStencilShadow(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRStencilShadow"); + #endif +} + + +/*! +*/ +void CTRStencilShadow::setParam ( u32 index, f32 value) +{ + u32 val = (u32) value; + + // glStencilOp (fail,zfail,zpass + if ( index == 1 && val == 1 ) + { + fragmentShader = &CTRStencilShadow::fragment_zfail_incr; + } + else + if ( index == 1 && val == 2 ) + { + fragmentShader = &CTRStencilShadow::fragment_zfail_decr; + } +} + +/*! +*/ +void CTRStencilShadow::fragment_zfail_decr () +{ + if (!Stencil) + return; + //tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + +#ifdef USE_SBUFFER + u32 *stencil; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif +#ifdef IPOL_L0 + sVec3 slopeL[BURNING_MATERIAL_MAX_TANGENT]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif +#ifdef IPOL_T2 + slopeT[2] = (line.t[2][1] - line.t[2][0]) * invDeltaX; +#endif +#ifdef IPOL_L0 + slopeL[0] = (line.l[0][1] - line.l[0][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2] * subPixel; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0] * subPixel; +#endif +#endif + + //dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + +#ifdef USE_SBUFFER + stencil = (u32*) Stencil->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] < z[i] ) +#endif + { + // zfail + stencil[i] -= 1; + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2]; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0]; +#endif + } +} + +/*! +*/ +void CTRStencilShadow::fragment_zfail_incr() +{ + if (!Stencil) + return; + //tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + +#ifdef USE_SBUFFER + u32 *stencil; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif +#ifdef IPOL_L0 + sVec3 slopeL[BURNING_MATERIAL_MAX_TANGENT]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif +#ifdef IPOL_T2 + slopeT[2] = (line.t[2][1] - line.t[2][0]) * invDeltaX; +#endif +#ifdef IPOL_L0 + slopeL[0] = (line.l[0][1] - line.l[0][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2] * subPixel; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0] * subPixel; +#endif +#endif + + //dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + +#ifdef USE_SBUFFER + stencil = (u32*) Stencil->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + +#ifdef INVERSE_W + f32 inversew; +#endif + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] < z[i] ) +#endif + { + // zfail + stencil[i] += 1; + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif +#ifdef IPOL_T2 + line.t[2][0] += slopeT[2]; +#endif +#ifdef IPOL_L0 + line.l[0][0] += slopeL[0]; +#endif + } +} + +void CTRStencilShadow::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][0] = (c->Tex[2] - a->Tex[2]) * scan.invDeltaY[0]; + scan.t[2][0] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][0] = (c->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[0]; + scan.l[0][0] = a->LightTangent[0]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (b->Tex[2] - a->Tex[2]) * scan.invDeltaY[1]; + scan.t[2][1] = a->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (b->LightTangent[0] - a->LightTangent[0]) * scan.invDeltaY[1]; + scan.l[0][1] = a->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + (this->*fragmentShader) (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + //if( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] = a->Tex[2] + scan.slopeT[2][0] * temp[0]; +#endif +#ifdef IPOL_L0 + scan.l[0][0] = a->LightTangent[0] + scan.slopeL[0][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + +#ifdef IPOL_T2 + scan.slopeT[2][1] = (c->Tex[2] - b->Tex[2]) * scan.invDeltaY[2]; + scan.t[2][1] = b->Tex[2]; +#endif + +#ifdef IPOL_L0 + scan.slopeL[0][1] = (c->LightTangent[0] - b->LightTangent[0]) * scan.invDeltaY[2]; + scan.l[0][1] = b->LightTangent[0]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + +#ifdef IPOL_T2 + line.t[2][scan.left] = scan.t[2][0]; + line.t[2][scan.right] = scan.t[2][1]; +#endif + +#ifdef IPOL_L0 + line.l[0][scan.left] = scan.l[0][0]; + line.l[0][scan.right] = scan.l[0][1]; +#endif + + // render a scanline + (this->*fragmentShader) (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif +#ifdef IPOL_T2 + scan.t[2][0] += scan.slopeT[2][0]; + scan.t[2][1] += scan.slopeT[2][1]; +#endif + +#ifdef IPOL_L0 + scan.l[0][0] += scan.slopeL[0][0]; + scan.l[0][1] += scan.slopeL[0][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a triangle renderer +IBurningShader* createTRStencilShadow(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRStencilShadow(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureBlend.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureBlend.cpp new file mode 100644 index 0000000..82372e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureBlend.cpp @@ -0,0 +1,2385 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + + +namespace irr +{ + +namespace video +{ + +class CTRTextureBlend : public IBurningShader +{ +public: + + //! constructor + CTRTextureBlend(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + virtual void setZCompareFunc ( u32 func); + virtual void setParam ( u32 index, f32 value); + + +private: + // fragment shader + typedef void (CTRTextureBlend::*tFragmentShader) (); + void fragment_dst_color_zero (); + void fragment_dst_color_one (); + void fragment_dst_color_src_alpha (); + void fragment_dst_color_one_minus_dst_alpha (); + void fragment_zero_one_minus_scr_color (); + void fragment_src_color_src_alpha (); + void fragment_one_one_minus_src_alpha (); + void fragment_one_minus_dst_alpha_one(); + void fragment_src_alpha_one(); + + tFragmentShader fragmentShader; + sScanConvertData scan; + sScanLineData line; + + u32 ZCompare; +}; + +//! constructor +CTRTextureBlend::CTRTextureBlend(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureBlend"); + #endif + + ZCompare = 1; +} + +/*! +*/ +void CTRTextureBlend::setZCompareFunc ( u32 func) +{ + ZCompare = func; +} + +/*! +*/ +void CTRTextureBlend::setParam ( u32 index, f32 value) +{ + u8 showname = 0; + + E_BLEND_FACTOR srcFact,dstFact; + E_MODULATE_FUNC modulate; + u32 alphaSrc; + unpack_textureBlendFunc ( srcFact, dstFact, modulate, alphaSrc, value ); + + fragmentShader = 0; + + if ( srcFact == EBF_DST_COLOR && dstFact == EBF_ZERO ) + { + fragmentShader = &CTRTextureBlend::fragment_dst_color_zero; + } + else + if ( srcFact == EBF_DST_COLOR && dstFact == EBF_ONE ) + { + fragmentShader = &CTRTextureBlend::fragment_dst_color_one; + } + else + if ( srcFact == EBF_DST_COLOR && dstFact == EBF_SRC_ALPHA) + { + fragmentShader = &CTRTextureBlend::fragment_dst_color_src_alpha; + } + else + if ( srcFact == EBF_DST_COLOR && dstFact == EBF_ONE_MINUS_DST_ALPHA) + { + fragmentShader = &CTRTextureBlend::fragment_dst_color_one_minus_dst_alpha; + } + else + if ( srcFact == EBF_ZERO && dstFact == EBF_ONE_MINUS_SRC_COLOR ) + { + fragmentShader = &CTRTextureBlend::fragment_zero_one_minus_scr_color; + } + else + if ( srcFact == EBF_ONE && dstFact == EBF_ONE_MINUS_SRC_ALPHA) + { + fragmentShader = &CTRTextureBlend::fragment_one_one_minus_src_alpha; + } + else + if ( srcFact == EBF_ONE_MINUS_DST_ALPHA && dstFact == EBF_ONE ) + { + fragmentShader = &CTRTextureBlend::fragment_one_minus_dst_alpha_one; + } + else + if ( srcFact == EBF_SRC_ALPHA && dstFact == EBF_ONE ) + { + fragmentShader = &CTRTextureBlend::fragment_src_alpha_one; + } + else + if ( srcFact == EBF_SRC_COLOR && dstFact == EBF_SRC_ALPHA ) + { + fragmentShader = &CTRTextureBlend::fragment_src_color_src_alpha; + } + else + { + showname = 1; + fragmentShader = &CTRTextureBlend::fragment_dst_color_zero; + } + + static const c8 *n[] = + { + "gl_zero", + "gl_one", + "gl_dst_color", + "gl_one_minus_dst_color", + "gl_src_color", + "gl_one_minus_src_color", + "gl_src_alpha", + "gl_one_minus_src_alpha", + "gl_dst_alpha", + "gl_one_minus_dst_alpha", + "gl_src_alpha_saturate" + }; + + static E_BLEND_FACTOR lsrcFact = EBF_ZERO; + static E_BLEND_FACTOR ldstFact = EBF_ZERO; + + if ( showname && ( lsrcFact != srcFact || ldstFact != dstFact ) ) + { + char buf[128]; + snprintf ( buf, 128, "missing shader: %s %s",n[srcFact], n[dstFact] ); + os::Printer::log( buf, ELL_INFORMATION ); + + lsrcFact = srcFact; + ldstFact = dstFact; + } + +} + + +/*! +*/ +void CTRTextureBlend::fragment_dst_color_src_alpha () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint a0, r0, g0, b0; + tFixPoint r1, g1, b1; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0,r0,g0,b0, + &IT[0], + tofix ( line.t[0][0].x,iw), + tofix ( line.t[0][0].y,iw) + ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( b0, b1 ) ) + ); + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0,r0,g0,b0, + &IT[0], + tofix ( line.t[0][0].x,iw), + tofix ( line.t[0][0].y,iw) + ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( b0, b1 ) ) + ); + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_src_color_src_alpha () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint a0, r0, g0, b0; + tFixPoint r1, g1, b1; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0, r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) ); + color_to_fix ( r1, g1, b1, dst[i] ); + +// u32 check = imulFix_tex1( r0, r1 ); + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex1( r0, r1 ) + imulFix_tex1( r1, a0 ) ), + clampfix_maxcolor ( imulFix_tex1( g0, g1 ) + imulFix_tex1( g1, a0 ) ), + clampfix_maxcolor ( imulFix_tex1( b0, b1 ) + imulFix_tex1( b1, a0 ) ) + ); + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0,r0,g0,b0, + &IT[0], + tofix ( line.t[0][0].x,iw), + tofix ( line.t[0][0].y,iw) + ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( b0, b1 ) ) + ); + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_one_one_minus_src_alpha() +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint a0,r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0, r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + a0 = FIX_POINT_ONE - a0; + + color_to_fix1 ( r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( imulFix ( r0 + imulFix ( r1, a0 ), r2 ), + imulFix ( g0 + imulFix ( g1, a0 ), g2 ), + imulFix ( b0 + imulFix ( b1, a0 ), b2 ) + ); +#else + dst[i] = fix_to_color ( r0 + imulFix ( r1, a0 ), + g0 + imulFix ( g1, a0 ), + b0 + imulFix ( b1, a0 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + getSample_texture ( a0, r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + a0 = FIX_POINT_ONE - a0; + + color_to_fix1 ( r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( imulFix ( r0 + imulFix ( r1, a0 ), r2 ), + imulFix ( g0 + imulFix ( g1, a0 ), g2 ), + imulFix ( b0 + imulFix ( b1, a0 ), b2 ) + ); +#else + dst[i] = fix_to_color ( r0 + imulFix ( r1, a0 ), + g0 + imulFix ( g1, a0 ), + b0 + imulFix ( b1, a0 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_one_minus_dst_alpha_one () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint r0, g0, b0; + tFixPoint a1, r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( a1, r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + a1 = FIX_POINT_ONE - a1; + dst[i] = fix_to_color ( imulFix ( imulFix ( r0, a1 ) + r1, r2 ), + imulFix ( imulFix ( g0, a1 ) + g1, g2 ), + imulFix ( imulFix ( b0, a1 ) + b1, b2 ) + ); +#else + dst[i] = fix_to_color ( imulFix ( r0, a1) + r0, + imulFix ( g0, a1) + g0, + imulFix ( b0, a1) + b0 + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( a1, r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + a1 = FIX_POINT_ONE - a1; + dst[i] = fix_to_color ( imulFix ( imulFix ( r0, a1 ) + r1, r2 ), + imulFix ( imulFix ( g0, a1 ) + g1, g2 ), + imulFix ( imulFix ( b0, a1 ) + b1, b2 ) + ); +#else + dst[i] = fix_to_color ( imulFix ( r0, a1) + r0, + imulFix ( g0, a1) + g0, + imulFix ( b0, a1) + b0 + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_src_alpha_one () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint a0, r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0, r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + if ( a0 > 0 ) + { + a0 >>= 8; + + color_to_fix ( r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix4_to_color ( a0, + clampfix_maxcolor ( imulFix (r0,a0 ) + r1), + clampfix_maxcolor ( imulFix (g0,a0 ) + g1), + clampfix_maxcolor ( imulFix (b0,a0 ) + b1) + ); + +/* + a0 >>= 8; + dst[i] = fix4_to_color ( a0, + imulFix ( imulFix ( r0, a0 ) + r1, r2 ), + imulFix ( imulFix ( g0, a0 ) + g1, g2 ), + imulFix ( imulFix ( b0, a0 ) + b1, b2 ) + ); +*/ +#else + dst[i] = fix4_to_color ( a0, + clampfix_maxcolor ( imulFix (r0,a0 ) + r1 ), + clampfix_maxcolor ( imulFix (g0,a0 ) + g1 ), + clampfix_maxcolor ( imulFix (b0,a0 ) + b1 ) + ); + +#endif + +#ifdef WRITE_W + //z[i] = line.w[0]; +#endif + } + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + { + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( a0, r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + if ( a0 > 0 ) + { + a0 >>= 8; + + color_to_fix ( r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix4_to_color ( a0, + clampfix_maxcolor ( imulFix ( imulFix (r0,a0 ) + r1, r2 ) ), + clampfix_maxcolor ( imulFix ( imulFix (g0,a0 ) + g1, g2 ) ), + clampfix_maxcolor ( imulFix ( imulFix (b0,a0 ) + b1, b2 ) ) + ); + +/* + a0 >>= 8; + dst[i] = fix4_to_color ( a0, + imulFix ( imulFix ( r0, a0 ) + r1, r2 ), + imulFix ( imulFix ( g0, a0 ) + g1, g2 ), + imulFix ( imulFix ( b0, a0 ) + b1, b2 ) + ); +*/ +#else + dst[i] = fix4_to_color ( a0, + clampfix_maxcolor ( imulFix (r0,a0 ) + r1 ), + clampfix_maxcolor ( imulFix (g0,a0 ) + g1 ), + clampfix_maxcolor ( imulFix (b0,a0 ) + b1 ) + ); + +#endif + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + } + } +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + + +/*! +*/ +void CTRTextureBlend::fragment_dst_color_one_minus_dst_alpha () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint r0, g0, b0; + tFixPoint a1, r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( a1, r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + a1 = FIX_POINT_ONE - a1; + dst[i] = fix_to_color ( imulFix ( imulFix ( r1, r0 + a1 ), r2 ), + imulFix ( imulFix ( g1, g0 + a1 ), g2 ), + imulFix ( imulFix ( b1, b0 + a1 ), b2 ) + ); +#else + dst[i] = fix_to_color ( imulFix ( r1, r0 + a1 ), + imulFix ( g1, g0 + a1 ), + imulFix ( b1, b0 + a1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( a1, r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + a1 = FIX_POINT_ONE - a1; + dst[i] = fix_to_color ( imulFix ( imulFix ( r1, r0 + a1 ), r2 ), + imulFix ( imulFix ( g1, g0 + a1 ), g2 ), + imulFix ( imulFix ( b1, b0 + a1 ), b2 ) + ); +#else + dst[i] = fix_to_color ( imulFix ( r1, r0 + a1 ), + imulFix ( g1, g0 + a1 ), + imulFix ( b1, b0 + a1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_dst_color_zero () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( imulFix ( imulFix ( r0, r1 ), r2 ), + imulFix ( imulFix ( g0, g1 ), g2 ), + imulFix ( imulFix ( b0, b1 ), b2 ) ); +#else + dst[i] = fix_to_color ( imulFix ( r0, r1 ), + imulFix ( g0, g1 ), + imulFix ( b0, b1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( imulFix ( imulFix ( r0, r1 ), r2 ), + imulFix ( imulFix ( g0, g1 ), g2 ), + imulFix ( imulFix ( b0, b1 ), b2 ) + ); +#else + dst[i] = fix_to_color ( imulFix ( r0, r1 ), + imulFix ( g0, g1 ), + imulFix ( b0, b1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_dst_color_one () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix ( r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex1 ( r0, r1 ) + r1 ), + clampfix_maxcolor ( imulFix_tex1 ( g0, g1 ) + g1 ), + clampfix_maxcolor ( imulFix_tex1 ( b0, b1 ) + b1 ) + ); + +#else + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex1 ( r0, r1 ) + r1 ), + clampfix_maxcolor ( imulFix_tex1 ( g0, g1 ) + g1 ), + clampfix_maxcolor ( imulFix_tex1 ( b0, b1 ) + b1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix ( r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex1 ( r0, r1 ) + r1 ), + clampfix_maxcolor ( imulFix_tex1 ( g0, g1 ) + g1 ), + clampfix_maxcolor ( imulFix_tex1 ( b0, b1 ) + b1 ) + ); + +#else + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex1 ( r0, r1 ) + r1 ), + clampfix_maxcolor ( imulFix_tex1 ( g0, g1 ) + g1 ), + clampfix_maxcolor ( imulFix_tex1 ( b0, b1 ) + b1 ) + ); + +#endif + + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + +/*! +*/ +void CTRTextureBlend::fragment_zero_one_minus_scr_color () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + f32 iw = FIX_POINT_F32_MUL; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + s32 i; + + switch ( ZCompare ) + { + case 1: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( imulFix ( FIX_POINT_ONE - r0, r1 ), + imulFix ( FIX_POINT_ONE - g0, g1 ), + imulFix ( FIX_POINT_ONE - b0, b1 ) + ); + +#else + dst[i] = fix_to_color ( imulFix ( FIX_POINT_ONE - r0, r1 ), + imulFix ( FIX_POINT_ONE - g0, g1 ), + imulFix ( FIX_POINT_ONE - b0, b1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + } + break; + + case 2: + for ( i = 0; i <= dx; ++i ) + { +#ifdef CMP_W + if ( line.w[0] == z[i] ) +#endif + + { + +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + iw = fix_inverse32 ( line.w[0] ); +#endif + getSample_texture ( r0, g0, b0, IT + 0, tofix ( line.t[0][0].x,iw),tofix ( line.t[0][0].y,iw) ); + color_to_fix1 ( r1, g1, b1, dst[i] ); +#ifdef IPOL_C0 + getSample_color ( r2, g2, b2, line.c[0][0],iw ); + + dst[i] = fix_to_color ( imulFix ( FIX_POINT_ONE - r0, r1 ), + imulFix ( FIX_POINT_ONE - g0, g1 ), + imulFix ( FIX_POINT_ONE - b0, b1 ) + ); + +#else + dst[i] = fix_to_color ( imulFix ( FIX_POINT_ONE - r0, r1 ), + imulFix ( FIX_POINT_ONE - g0, g1 ), + imulFix ( FIX_POINT_ONE - b0, b1 ) + ); + +#endif + + } + +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif + }break; + } // zcompare + +} + + + +void CTRTextureBlend::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + if ( 0 == fragmentShader ) + return; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + (this->*fragmentShader) (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + (this->*fragmentShader) (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTRTextureBlend(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureBlend(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureDetailMap2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureDetailMap2.cpp new file mode 100644 index 0000000..514383f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureDetailMap2.cpp @@ -0,0 +1,659 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRTextureDetailMap2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureDetailMap2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRTextureDetailMap2::CTRTextureDetailMap2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureDetailMap2"); + #endif +} + + + +/*! +*/ +void CTRTextureDetailMap2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint tx0, tx1; + tFixPoint ty0, ty1; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); + tx1 = tofix ( line.t[1][0].x,inversew); + ty1 = tofix ( line.t[1][0].y,inversew); + +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); + tx1 = tofix ( line.t[1][0].x ); + ty1 = tofix ( line.t[1][0].y ); +#endif + getSample_texture ( r0, g0, b0, &IT[0], tx0,ty0 ); + getSample_texture ( r1, g1, b1, &IT[1], tx1,ty1 ); + + // bias half color + r1 += -FIX_POINT_HALF_COLOR; + g1 += -FIX_POINT_HALF_COLOR; + b1 += -FIX_POINT_HALF_COLOR; + + r2 = clampfix_mincolor ( clampfix_maxcolor ( r0 + r1 ) ); + g2 = clampfix_mincolor ( clampfix_maxcolor ( g0 + g1 ) ); + b2 = clampfix_mincolor ( clampfix_maxcolor ( b0 + b1 ) ); + + dst[i] = fix_to_color ( r2, g2, b2 ); + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureDetailMap2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureDetailMap2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureDetailMap2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlat.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlat.cpp new file mode 100644 index 0000000..d1c0c54 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlat.cpp @@ -0,0 +1,339 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRTextureFlat : public CTRTextureGouraud +{ +public: + + CTRTextureFlat(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRTextureFlat"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels + s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values + s32 leftTxStep, rightTxStep, leftTyStep, rightTyStep; // texture interpolating values + s32 spanTx, spanTy, spanTxStep, spanTyStep; // values of Texturecoords when drawing a span + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + s32 spanZValue, spanZStep; // ZValues when drawing a span + TZBufferType* zTarget, *spanZTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + lockedTexture = (u16*)Texture->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftTx = rightTx = v1->TCoords.X; + leftTy = rightTy = v1->TCoords.Y; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightTxStep = (s32)((v2->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v2->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftTxStep = (s32)((v2->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v2->TCoords.Y - leftTy) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftTx += leftTxStep*leftx; + leftTy += leftTyStep*leftx; + rightTx += rightTxStep*leftx; + rightTy += rightTyStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + // TODO: clipping is not correct when leftx is clipped. + + if (leftx<ViewPortRect.UpperLeftCorner.X) + leftx = ViewPortRect.UpperLeftCorner.X; + else + if (leftx>ViewPortRect.LowerRightCorner.X) + leftx = ViewPortRect.LowerRightCorner.X; + + if (rightx<ViewPortRect.UpperLeftCorner.X) + rightx = ViewPortRect.UpperLeftCorner.X; + else + if (rightx>ViewPortRect.LowerRightCorner.X) + rightx = ViewPortRect.LowerRightCorner.X; + + // draw the span + + if (rightx - leftx != 0) + { + tmpDiv = 1.0f / (rightx - leftx); + spanZValue = leftZValue; + spanZStep = (s32)((rightZValue - leftZValue) * tmpDiv); + + hSpanBegin = targetSurface + leftx; + spanZTarget = zTarget + leftx; + hSpanEnd = targetSurface + rightx; + + spanTx = leftTx; + spanTy = leftTy; + spanTxStep = (s32)((rightTx - leftTx) * tmpDiv); + spanTyStep = (s32)((rightTy - leftTy) * tmpDiv); + + while (hSpanBegin < hSpanEnd) + { + if (spanZValue > *spanZTarget) + { + *spanZTarget = spanZValue; + *hSpanBegin = lockedTexture[((spanTy>>8)&textureYMask) * lockedTextureWidth + ((spanTx>>8)&textureXMask)]; + } + + spanTx += spanTxStep; + spanTy += spanTyStep; + + spanZValue += spanZStep; + ++hSpanBegin; + ++spanZTarget; + } + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftTx += leftTxStep; + leftTy += leftTyStep; + rightTx += rightTxStep; + rightTy += rightTyStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightTx = v2->TCoords.X; + rightTy = v2->TCoords.Y; + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftTx = v2->TCoords.X; + leftTy = v2->TCoords.Y; + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + Texture->unlock(); + + } +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererTextureFlat(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRTextureFlat(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlatWire.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlatWire.cpp new file mode 100644 index 0000000..d15ba04 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureFlatWire.cpp @@ -0,0 +1,313 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRTextureFlatWire : public CTRTextureGouraud +{ +public: + + CTRTextureFlatWire(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRTextureFlatWire"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values + s32 leftTxStep, rightTxStep, leftTyStep, rightTyStep; // texture interpolating values + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + TZBufferType* zTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + lockedTexture = (u16*)Texture->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftTx = rightTx = v1->TCoords.X; + leftTy = rightTy = v1->TCoords.Y; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightTxStep = (s32)((v2->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v2->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftTxStep = (s32)((v2->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v2->TCoords.Y - leftTy) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftTx += leftTxStep*leftx; + leftTy += leftTyStep*leftx; + rightTx += rightTxStep*leftx; + rightTy += rightTyStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + if (leftx>=ViewPortRect.UpperLeftCorner.X && + leftx<=ViewPortRect.LowerRightCorner.X) + { + if (leftZValue > *(zTarget + leftx)) + { + *(zTarget + leftx) = leftZValue; + *(targetSurface + leftx) = lockedTexture[((leftTy>>8)&textureYMask) * lockedTextureWidth + ((rightTx>>8)&textureXMask)]; + } + } + + + if (rightx>=ViewPortRect.UpperLeftCorner.X && + rightx<=ViewPortRect.LowerRightCorner.X) + { + if (rightZValue > *(zTarget + rightx)) + { + *(zTarget + rightx) = rightZValue; + *(targetSurface + rightx) = lockedTexture[((rightTy>>8)&textureYMask) * lockedTextureWidth + ((rightTx>>8)&textureXMask)]; + } + + } + + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftTx += leftTxStep; + leftTy += leftTyStep; + rightTx += rightTxStep; + rightTy += rightTyStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightTx = v2->TCoords.X; + rightTy = v2->TCoords.Y; + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftTx = v2->TCoords.X; + leftTy = v2->TCoords.Y; + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + Texture->unlock(); + + } +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererTextureFlatWire(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRTextureFlatWire(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.cpp new file mode 100644 index 0000000..3b2795d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.cpp @@ -0,0 +1,468 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! constructor +CTRTextureGouraud::CTRTextureGouraud(IZBuffer* zbuffer) + : RenderTarget(0), ZBuffer(zbuffer), SurfaceWidth(0), SurfaceHeight(0), + BackFaceCullingEnabled(true), lockedZBuffer(0), + lockedSurface(0), lockedTexture(0), lockedTextureWidth(0), + textureXMask(0), textureYMask(0), Texture(0) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraud"); + #endif + + if (ZBuffer) + zbuffer->grab(); +} + + + +//! destructor +CTRTextureGouraud::~CTRTextureGouraud() +{ + if (RenderTarget) + RenderTarget->drop(); + + if (ZBuffer) + ZBuffer->drop(); + + if (Texture) + Texture->drop(); +} + + + +//! sets the Texture +void CTRTextureGouraud::setTexture(video::IImage* texture) +{ + if (Texture) + Texture->drop(); + + Texture = texture; + + if (Texture) + { + Texture->grab(); + lockedTextureWidth = Texture->getDimension().Width; + + textureXMask = lockedTextureWidth-1; + textureYMask = Texture->getDimension().Height-1; + } +} + + + + +//! en or disables the backface culling +void CTRTextureGouraud::setBackfaceCulling(bool enabled) +{ + BackFaceCullingEnabled = enabled; +} + + + +//! sets a render target +void CTRTextureGouraud::setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort) +{ + if (RenderTarget) + RenderTarget->drop(); + + RenderTarget = surface; + + if (RenderTarget) + { + SurfaceWidth = RenderTarget->getDimension().Width; + SurfaceHeight = RenderTarget->getDimension().Height; + RenderTarget->grab(); + ViewPortRect = viewPort; + } +} + + + +//! draws an indexed triangle list +void CTRTextureGouraud::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) +{ + const S2DVertex *v1, *v2, *v3; + + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels + s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values + s32 leftStepR, leftStepG, leftStepB, + rightStepR, rightStepG, rightStepB; // color steps + s32 spanR, spanG, spanB, spanStepR, spanStepG, spanStepB; // color interpolating values while drawing a span. + s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values + s32 leftTxStep, rightTxStep, leftTyStep, rightTyStep; // texture interpolating values + s32 spanTx, spanTy, spanTxStep, spanTyStep; // values of Texturecoords when drawing a span + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + s32 spanZValue, spanZStep; // ZValues when drawing a span + TZBufferType* zTarget, *spanZTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + lockedTexture = (u16*)Texture->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftR = rightR = video::getRed(v1->Color)<<8; + leftG = rightG = video::getGreen(v1->Color)<<8; + leftB = rightB = video::getBlue(v1->Color)<<8; + leftTx = rightTx = v1->TCoords.X; + leftTy = rightTy = v1->TCoords.Y; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v2->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v2->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v2->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v2->TCoords.Y - leftTy) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftR += leftStepR*leftx; + leftG += leftStepG*leftx; + leftB += leftStepB*leftx; + rightR += rightStepR*leftx; + rightG += rightStepG*leftx; + rightB += rightStepB*leftx; + + leftTx += leftTxStep*leftx; + leftTy += leftTyStep*leftx; + rightTx += rightTxStep*leftx; + rightTy += rightTyStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + // thanks to a correction by hybrid + // calculations delayed to correctly propagate to textures etc. + s32 tDiffLeft=0, tDiffRight=0; + if (leftx<ViewPortRect.UpperLeftCorner.X) + tDiffLeft=ViewPortRect.UpperLeftCorner.X-leftx; + else + if (leftx>ViewPortRect.LowerRightCorner.X) + tDiffLeft=ViewPortRect.LowerRightCorner.X-leftx; + + if (rightx<ViewPortRect.UpperLeftCorner.X) + tDiffRight=ViewPortRect.UpperLeftCorner.X-rightx; + else + if (rightx>ViewPortRect.LowerRightCorner.X) + tDiffRight=ViewPortRect.LowerRightCorner.X-rightx; + + // draw the span + if (rightx + tDiffRight - leftx - tDiffLeft) + { + tmpDiv = 1.0f / (f32)(rightx - leftx); + spanZStep = (s32)((rightZValue - leftZValue) * tmpDiv); + spanZValue = leftZValue+tDiffLeft*spanZStep; + + spanStepR = (s32)((rightR - leftR) * tmpDiv); + spanR = leftR+tDiffLeft*spanStepR; + spanStepG = (s32)((rightG - leftG) * tmpDiv); + spanG = leftG+tDiffLeft*spanStepG; + spanStepB = (s32)((rightB - leftB) * tmpDiv); + spanB = leftB+tDiffLeft*spanStepB; + + spanTxStep = (s32)((rightTx - leftTx) * tmpDiv); + spanTx = leftTx + tDiffLeft*spanTxStep; + spanTyStep = (s32)((rightTy - leftTy) * tmpDiv); + spanTy = leftTy+tDiffLeft*spanTyStep; + + hSpanBegin = targetSurface + leftx+tDiffLeft; + spanZTarget = zTarget + leftx+tDiffLeft; + hSpanEnd = targetSurface + rightx+tDiffRight; + + while (hSpanBegin < hSpanEnd) + { + if (spanZValue > *spanZTarget) + { + *spanZTarget = spanZValue; + u16 color = lockedTexture[((spanTy>>8)&textureYMask) * lockedTextureWidth + ((spanTx>>8)&textureXMask)]; + *hSpanBegin = video::RGB16(video::getRed(color) * (spanR>>8) >>2, + video::getGreen(color) * (spanG>>8) >>2, + video::getBlue(color) * (spanB>>8) >>2); + } + + spanR += spanStepR; + spanG += spanStepG; + spanB += spanStepB; + + spanTx += spanTxStep; + spanTy += spanTyStep; + + spanZValue += spanZStep; + ++hSpanBegin; + ++spanZTarget; + } + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftR += leftStepR; + leftG += leftStepG; + leftB += leftStepB; + rightR += rightStepR; + rightG += rightStepG; + rightB += rightStepB; + + leftTx += leftTxStep; + leftTy += leftTyStep; + rightTx += rightTxStep; + rightTy += rightTyStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightR = video::getRed(v2->Color)<<8; + rightG = video::getGreen(v2->Color)<<8; + rightB = video::getBlue(v2->Color)<<8; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + + rightTx = v2->TCoords.X; + rightTy = v2->TCoords.Y; + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftR = video::getRed(v2->Color)<<8; + leftG = video::getGreen(v2->Color)<<8; + leftB = video::getBlue(v2->Color)<<8; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + + leftTx = v2->TCoords.X; + leftTy = v2->TCoords.Y; + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + Texture->unlock(); +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererTextureGouraud(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRTextureGouraud(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.h new file mode 100644 index 0000000..0885363 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud.h @@ -0,0 +1,85 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_TRIANGLE_RENDERER_TEXTURE_GOURAUD_H_INCLUDED__ +#define __C_TRIANGLE_RENDERER_TEXTURE_GOURAUD_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifndef _IRR_COMPILE_WITH_SOFTWARE_ +// forward declarations for create methods +namespace irr +{ +namespace video +{ + class ITriangleRenderer; + class IZBuffer; +} // end namespace video +} // end namespace irr + +#else + +#include "ITriangleRenderer.h" +#include "IImage.h" + +namespace irr +{ +namespace video +{ + //! CTRTextureGouraud class + class CTRTextureGouraud : public ITriangleRenderer + { + public: + + //! constructor + CTRTextureGouraud(IZBuffer* zbuffer); + + //! destructor + virtual ~CTRTextureGouraud(); + + //! sets a render target + virtual void setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort); + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount); + + //! en or disables the backface culling + virtual void setBackfaceCulling(bool enabled = true); + + //! sets the Texture + virtual void setTexture(video::IImage* texture); + + protected: + + //! vertauscht zwei vertizen + inline void swapVertices(const S2DVertex** v1, const S2DVertex** v2) + { + const S2DVertex* b = *v1; + *v1 = *v2; + *v2 = b; + } + + video::IImage* RenderTarget; + core::rect<s32> ViewPortRect; + + IZBuffer* ZBuffer; + + s32 SurfaceWidth; + s32 SurfaceHeight; + bool BackFaceCullingEnabled; + TZBufferType* lockedZBuffer; + u16* lockedSurface; + u16* lockedTexture; + s32 lockedTextureWidth; + s32 textureXMask, textureYMask; + video::IImage* Texture; + }; + +} // end namespace video +} // end namespace irr + +#endif + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud2.cpp new file mode 100644 index 0000000..b4e8178 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraud2.cpp @@ -0,0 +1,674 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRTextureGouraud2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureGouraud2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRTextureGouraud2::CTRTextureGouraud2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraud2"); + #endif +} + + + +/*! +*/ +void CTRTextureGouraud2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint tx0; + tFixPoint ty0; + + tFixPoint r0, g0, b0; + +#ifdef IPOL_C0 + tFixPoint r1, g1, b1; +#endif + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; +#endif + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + tx0 = tofix ( line.t[0][0].x, inversew); + ty0 = tofix ( line.t[0][0].y, inversew); + +#ifdef IPOL_C0 + r1 = tofix ( line.c[0][0].y ,inversew ); + g1 = tofix ( line.c[0][0].z ,inversew ); + b1 = tofix ( line.c[0][0].w ,inversew ); +#endif + +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); +#ifdef IPOL_C0 + getTexel_plain2 ( r1, g1, b1, line.c[0][0] ); +#endif +#endif + +#ifdef IPOL_C0 + getSample_texture ( r0, g0, b0, &IT[0], tx0,ty0 ); + + dst[i] = fix_to_color ( imulFix ( r0, r1 ), + imulFix ( g0, g1 ), + imulFix ( b0, b1 ) + ); +#else + +#ifdef BURNINGVIDEO_RENDERER_FAST + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + dst[i] = getTexel_plain ( &IT[0], d + tx0, d + ty0 ); +#else + getSample_texture ( r0, g0, b0, &IT[0], tx0,ty0 ); + dst[i] = fix_to_color ( r0, g0, b0 ); +#endif + +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureGouraud2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureGouraud2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd.cpp new file mode 100644 index 0000000..557bb48 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd.cpp @@ -0,0 +1,419 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRTextureGouraudAdd : public CTRTextureGouraud +{ +public: + + //! constructor + CTRTextureGouraudAdd(IZBuffer* zbuffer); + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount); + +protected: + +}; + +//! constructor +CTRTextureGouraudAdd::CTRTextureGouraudAdd(IZBuffer* zbuffer) +: CTRTextureGouraud(zbuffer) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraudAdd"); + #endif +} + + +//! draws an indexed triangle list +void CTRTextureGouraudAdd::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) +{ + const S2DVertex *v1, *v2, *v3; + + u16 color; + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels + s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values + s32 leftStepR, leftStepG, leftStepB, + rightStepR, rightStepG, rightStepB; // color steps + s32 spanR, spanG, spanB, spanStepR, spanStepG, spanStepB; // color interpolating values while drawing a span. + s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values + s32 leftTxStep, rightTxStep, leftTyStep, rightTyStep; // texture interpolating values + s32 spanTx, spanTy, spanTxStep, spanTyStep; // values of Texturecoords when drawing a span + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + s32 spanZValue, spanZStep; // ZValues when drawing a span + TZBufferType* zTarget, *spanZTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + lockedTexture = (u16*)Texture->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftR = rightR = video::getRed(v1->Color)<<8; + leftG = rightG = video::getGreen(v1->Color)<<8; + leftB = rightB = video::getBlue(v1->Color)<<8; + leftTx = rightTx = v1->TCoords.X; + leftTy = rightTy = v1->TCoords.Y; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v2->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v2->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v2->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v2->TCoords.Y - leftTy) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftR += leftStepR*leftx; + leftG += leftStepG*leftx; + leftB += leftStepB*leftx; + rightR += rightStepR*leftx; + rightG += rightStepG*leftx; + rightB += rightStepB*leftx; + + leftTx += leftTxStep*leftx; + leftTy += leftTyStep*leftx; + rightTx += rightTxStep*leftx; + rightTy += rightTyStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + // thanks to a correction by hybrid + // calculations delayed to correctly propagate to textures etc. + s32 tDiffLeft=0, tDiffRight=0; + if (leftx<ViewPortRect.UpperLeftCorner.X) + tDiffLeft=ViewPortRect.UpperLeftCorner.X-leftx; + else + if (leftx>ViewPortRect.LowerRightCorner.X) + tDiffLeft=ViewPortRect.LowerRightCorner.X-leftx; + + if (rightx<ViewPortRect.UpperLeftCorner.X) + tDiffRight=ViewPortRect.UpperLeftCorner.X-rightx; + else + if (rightx>ViewPortRect.LowerRightCorner.X) + tDiffRight=ViewPortRect.LowerRightCorner.X-rightx; + + // draw the span + if (rightx + tDiffRight - leftx - tDiffLeft) + { + tmpDiv = 1.0f / (f32)(rightx - leftx); + spanZStep = (s32)((rightZValue - leftZValue) * tmpDiv); + spanZValue = leftZValue+tDiffLeft*spanZStep; + + spanStepR = (s32)((rightR - leftR) * tmpDiv); + spanR = leftR+tDiffLeft*spanStepR; + spanStepG = (s32)((rightG - leftG) * tmpDiv); + spanG = leftG+tDiffLeft*spanStepG; + spanStepB = (s32)((rightB - leftB) * tmpDiv); + spanB = leftB+tDiffLeft*spanStepB; + + spanTxStep = (s32)((rightTx - leftTx) * tmpDiv); + spanTx = leftTx + tDiffLeft*spanTxStep; + spanTyStep = (s32)((rightTy - leftTy) * tmpDiv); + spanTy = leftTy+tDiffLeft*spanTyStep; + + hSpanBegin = targetSurface + leftx+tDiffLeft; + spanZTarget = zTarget + leftx+tDiffLeft; + hSpanEnd = targetSurface + rightx+tDiffRight; + + while (hSpanBegin < hSpanEnd) + { + if (spanZValue > *spanZTarget) + { + //*spanZTarget = spanZValue; + color = lockedTexture[((spanTy>>8)&textureYMask) * lockedTextureWidth + ((spanTx>>8)&textureXMask)]; + + s32 basis = *hSpanBegin; + s32 r = (video::getRed(basis)<<3) + (video::getRed(color)<<3); + if (r > 255) r = 255; + s32 g = (video::getGreen(basis)<<3) + (video::getGreen(color)<<3); + if (g > 255) g = 255; + s32 b = (video::getBlue(basis)<<3) + (video::getBlue(color)<<3); + if (b > 255) b = 255; + + *hSpanBegin = video::RGB16(r, g, b); + } + + spanR += spanStepR; + spanG += spanStepG; + spanB += spanStepB; + + spanTx += spanTxStep; + spanTy += spanTyStep; + + spanZValue += spanZStep; + ++hSpanBegin; + ++spanZTarget; + } + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftR += leftStepR; + leftG += leftStepG; + leftB += leftStepB; + rightR += rightStepR; + rightG += rightStepG; + rightB += rightStepB; + + leftTx += leftTxStep; + leftTy += leftTyStep; + rightTx += rightTxStep; + rightTy += rightTyStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightR = video::getRed(v2->Color)<<8; + rightG = video::getGreen(v2->Color)<<8; + rightB = video::getBlue(v2->Color)<<8; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + + rightTx = v2->TCoords.X; + rightTy = v2->TCoords.Y; + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftR = video::getRed(v2->Color)<<8; + leftG = video::getGreen(v2->Color)<<8; + leftB = video::getBlue(v2->Color)<<8; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + + leftTx = v2->TCoords.X; + leftTy = v2->TCoords.Y; + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + Texture->unlock(); +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +ITriangleRenderer* createTriangleRendererTextureGouraudAdd(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRTextureGouraudAdd(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd2.cpp new file mode 100644 index 0000000..1738f33 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAdd2.cpp @@ -0,0 +1,680 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + + +namespace irr +{ + +namespace video +{ + +class CTRTextureGouraudAdd2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureGouraudAdd2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanLineData line; + +}; + +//! constructor +CTRTextureGouraudAdd2::CTRTextureGouraudAdd2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraudAdd2"); + #endif +} + + + +/*! +*/ +void CTRTextureGouraudAdd2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[1] - line.c[0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + +#else + tFixPoint tx0; + tFixPoint ty0; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; +#endif + + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + + +#ifdef BURNINGVIDEO_RENDERER_FAST + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + + +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + dst[i] = PixelAdd32 ( + dst[i], + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + d + tofix ( line.t[0][0].y,inversew) ) + ); +#else + dst[i] = PixelAdd32 ( + dst[i], + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + d + tofix ( line.t[0][0].y) ) + ); + +#endif +#else + +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); +#endif + getSample_texture ( r0, g0, b0, &IT[0], tx0,ty0 ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( r1 + r0 ), + clampfix_maxcolor ( g1 + g0 ), + clampfix_maxcolor ( b1 + b0 ) + ); +#endif + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureGouraudAdd2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + sScanConvertData scan; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTRTextureGouraudAdd2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureGouraudAdd2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp new file mode 100644 index 0000000..58b6d71 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp @@ -0,0 +1,645 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +//#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRTextureGouraudAddNoZ2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRTextureGouraudAddNoZ2::CTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraudAddNoZ2"); + #endif +} + + + +/*! +*/ +void CTRTextureGouraudAddNoZ2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[1] - line.c[0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef IPOL_W + f32 inversew; +#endif + + tFixPoint tx0; + tFixPoint ty0; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { +#ifdef IPOL_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); +#endif + + getSample_texture ( r0, g0, b0, &IT[0], tx0,ty0 ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( r1 + (r0 >> 1 ) ), + clampfix_maxcolor ( g1 + (g0 >> 1 ) ), + clampfix_maxcolor ( b1 + (b0 >> 1) ) + ); + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureGouraudAddNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureGouraudAddNoZ2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlpha.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlpha.cpp new file mode 100644 index 0000000..62a7c9a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlpha.cpp @@ -0,0 +1,744 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + + +namespace irr +{ + +namespace video +{ + +class CTRTextureGouraudAlpha2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureGouraudAlpha2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + virtual void setParam ( u32 index, f32 value); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + + u32 AlphaRef; +}; + +//! constructor +CTRTextureGouraudAlpha2::CTRTextureGouraudAlpha2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraudAlpha2"); + #endif + + AlphaRef = 0; +} + + +/*! +*/ +void CTRTextureGouraudAlpha2::setParam ( u32 index, f32 value) +{ +#ifdef BURNINGVIDEO_RENDERER_FAST + AlphaRef = core::floor32 ( value * 256.f ); +#else + AlphaRef = u32_to_fixPoint ( core::floor32 ( value * 256.f ) ); +#endif +} + +/*! +*/ +void CTRTextureGouraudAlpha2::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + +#else + tFixPoint a0; + tFixPoint r0, g0, b0; +#endif + +#ifdef IPOL_C0 + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; +#endif + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef BURNINGVIDEO_RENDERER_FAST + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + +#ifdef INVERSE_W + + inversew = fix_inverse32 ( line.w[0] ); + + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + d + tofix ( line.t[0][0].y,inversew) + ); + +#else + + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + d + tofix ( line.t[0][0].y) + ); + +#endif + + const u32 alpha = ( argb >> 24 ); + if ( alpha > AlphaRef ) + { +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + dst[i] = PixelBlend32 ( dst[i], argb, alpha ); + } + + +#else + +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + getSample_texture ( a0,r0,g0,b0, + &IT[0], + tofix ( line.t[0][0].x,inversew), + tofix ( line.t[0][0].y,inversew) + ); +#else + getSample_texture ( a0,r0,g0,b0, + &IT[0], + tofix ( line.t[0][0].x), + tofix ( line.t[0][0].y) + ); +#endif + if ( (tFixPointu) a0 > AlphaRef ) + { +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + getSample_color ( r2, g2, b2, line.c[0][0], inversew ); +#else + getSample_color ( r2, g2, b2, line.c[0][0] ); +#endif + r0 = imulFix ( r0, r2 ); + g0 = imulFix ( g0, g2 ); + b0 = imulFix ( b0, b2 ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + a0 >>= 8; + + r2 = r1 + imulFix ( a0, r0 - r1 ); + g2 = g1 + imulFix ( a0, g0 - g1 ); + b2 = b1 + imulFix ( a0, b0 - b1 ); + dst[i] = fix4_to_color ( a0, r2, g2, b2 ); + +/* + dst[i] = PixelBlend32 ( dst[i], + fix_to_color ( r0,g0, b0 ), + fixPointu_to_u32 ( a0 ) + ); +*/ +/* + getSample_color ( r2, g2, b2, line.c[0][0], inversew * COLOR_MAX ); + color_to_fix ( r1, g1, b1, dst[i] ); + + r2 = r0 + imulFix ( a0, r1 - r0 ); + g2 = g0 + imulFix ( a0, g1 - g0 ); + b2 = b0 + imulFix ( a0, b1 - b0 ); + dst[i] = fix_to_color ( r2, g2, b2 ); +*/ + + } +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureGouraudAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a flat triangle renderer +IBurningShader* createTRTextureGouraudAlpha(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureGouraudAlpha2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp new file mode 100644 index 0000000..96e1519 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp @@ -0,0 +1,745 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +//#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + + +namespace irr +{ + +namespace video +{ + +class CTRTextureGouraudAlphaNoZ : public IBurningShader +{ +public: + + //! constructor + CTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + virtual void setParam ( u32 index, f32 value); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + + u32 AlphaRef; +}; + +//! constructor +CTRTextureGouraudAlphaNoZ::CTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraudAlphaNoZ"); + #endif + + AlphaRef = 0; +} + + +/*! +*/ +void CTRTextureGouraudAlphaNoZ::setParam ( u32 index, f32 value) +{ +#ifdef BURNINGVIDEO_RENDERER_FAST + AlphaRef = core::floor32 ( value * 256.f ); +#else + AlphaRef = u32_to_fixPoint ( core::floor32 ( value * 256.f ) ); +#endif +} + +/*! +*/ +void CTRTextureGouraudAlphaNoZ::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC[MATERIAL_MAX_COLORS]; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC[0] = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0] * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + +#else + tFixPoint a0; + tFixPoint r0, g0, b0; +#endif + +#ifdef IPOL_C0 + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; +#endif + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { + +#ifdef BURNINGVIDEO_RENDERER_FAST + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + +#ifdef INVERSE_W + + inversew = fix_inverse32 ( line.w[0] ); + + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + d + tofix ( line.t[0][0].y,inversew) + ); + +#else + + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + d + tofix ( line.t[0][0].y) + ); + +#endif + + const u32 alpha = ( argb >> 24 ); + if ( alpha > AlphaRef ) + { +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + + dst[i] = PixelBlend32 ( dst[i], argb, alpha ); + } + + +#else + +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + getSample_texture ( a0, r0, g0, b0, + &IT[0], + tofix ( line.t[0][0].x,inversew), + tofix ( line.t[0][0].y,inversew) + ); +#else + getSample_texture ( a0, r0, g0,b0, + &IT[0], + tofix ( line.t[0][0].x), + tofix ( line.t[0][0].y) + ); +#endif + if ( (tFixPointu) a0 > AlphaRef ) + { +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef INVERSE_W + getSample_color ( r2, g2, b2, line.c[0][0], inversew ); +#else + getSample_color ( r2, g2, b2, line.c[0][0] ); +#endif + r0 = imulFix ( r0, r2 ); + g0 = imulFix ( g0, g2 ); + b0 = imulFix ( b0, b2 ); + + color_to_fix ( r1, g1, b1, dst[i] ); + + a0 >>= 8; + + r2 = r1 + imulFix ( a0, r0 - r1 ); + g2 = g1 + imulFix ( a0, g0 - g1 ); + b2 = b1 + imulFix ( a0, b0 - b1 ); + dst[i] = fix4_to_color ( a0, r2, g2, b2 ); + +/* + dst[i] = PixelBlend32 ( dst[i], + fix_to_color ( r0,g0, b0 ), + fixPointu_to_u32 ( a0 ) + ); +*/ +/* + getSample_color ( r2, g2, b2, line.c[0][0], inversew * COLOR_MAX ); + color_to_fix ( r1, g1, b1, dst[i] ); + + r2 = r0 + imulFix ( a0, r1 - r0 ); + g2 = g0 + imulFix ( a0, g1 - g0 ); + b2 = b0 + imulFix ( a0, b1 - b0 ); + dst[i] = fix_to_color ( r2, g2, b2 ); +*/ + + } +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC[0]; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureGouraudAlphaNoZ::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a flat triangle renderer +IBurningShader* createTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureGouraudAlphaNoZ(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ.cpp new file mode 100644 index 0000000..ea47277 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ.cpp @@ -0,0 +1,367 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" +#include "SColor.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRTextureGouraudNoZ : public CTRTextureGouraud +{ +public: + + CTRTextureGouraudNoZ() + : CTRTextureGouraud(0) + { + #ifdef _DEBUG + setDebugName("CTRGouraudWireNoZ"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + u16 color; + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels + s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values + s32 leftStepR, leftStepG, leftStepB, + rightStepR, rightStepG, rightStepB; // color steps + s32 spanR, spanG, spanB, spanStepR, spanStepG, spanStepB; // color interpolating values while drawing a span. + s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values + s32 leftTxStep, rightTxStep, leftTyStep, rightTyStep; // texture interpolating values + s32 spanTx, spanTy, spanTxStep, spanTyStep; // values of Texturecoords when drawing a span + core::rect<s32> TriangleRect; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedTexture = (u16*)Texture->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftR = rightR = video::getRed(v1->Color)<<8; + leftG = rightG = video::getGreen(v1->Color)<<8; + leftB = rightB = video::getBlue(v1->Color)<<8; + leftTx = rightTx = v1->TCoords.X; + leftTy = rightTy = v1->TCoords.Y; + + targetSurface = lockedSurface + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v2->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v2->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v2->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v2->TCoords.Y - leftTy) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + + leftR += leftStepR*leftx; + leftG += leftStepG*leftx; + leftB += leftStepB*leftx; + rightR += rightStepR*leftx; + rightG += rightStepG*leftx; + rightB += rightStepB*leftx; + + leftTx += leftTxStep*leftx; + leftTy += leftTyStep*leftx; + rightTx += rightTxStep*leftx; + rightTy += rightTyStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + // thanks to a correction by hybrid + // calculations delayed to correctly propagate to textures etc. + s32 tDiffLeft=0, tDiffRight=0; + if (leftx<ViewPortRect.UpperLeftCorner.X) + tDiffLeft=ViewPortRect.UpperLeftCorner.X-leftx; + else + if (leftx>ViewPortRect.LowerRightCorner.X) + tDiffLeft=ViewPortRect.LowerRightCorner.X-leftx; + + if (rightx<ViewPortRect.UpperLeftCorner.X) + tDiffRight=ViewPortRect.UpperLeftCorner.X-rightx; + else + if (rightx>ViewPortRect.LowerRightCorner.X) + tDiffRight=ViewPortRect.LowerRightCorner.X-rightx; + + // draw the span + if (rightx + tDiffRight - leftx - tDiffLeft) + { + tmpDiv = 1.0f / (f32)(rightx - leftx); + + spanStepR = (s32)((rightR - leftR) * tmpDiv); + spanR = leftR+tDiffLeft*spanStepR; + spanStepG = (s32)((rightG - leftG) * tmpDiv); + spanG = leftG+tDiffLeft*spanStepG; + spanStepB = (s32)((rightB - leftB) * tmpDiv); + spanB = leftB+tDiffLeft*spanStepB; + + spanTxStep = (s32)((rightTx - leftTx) * tmpDiv); + spanTx = leftTx + tDiffLeft*spanTxStep; + spanTyStep = (s32)((rightTy - leftTy) * tmpDiv); + spanTy = leftTy+tDiffLeft*spanTyStep; + + hSpanBegin = targetSurface + leftx+tDiffLeft; + hSpanEnd = targetSurface + rightx+tDiffRight; + + while (hSpanBegin < hSpanEnd) + { + color = lockedTexture[((spanTy>>8)&textureYMask) * lockedTextureWidth + ((spanTx>>8)&textureXMask)]; + *hSpanBegin = video::RGB16(video::getRed(color) * (spanR>>8) >>2, + video::getGreen(color) * (spanG>>8) >>2, + video::getBlue(color) * (spanB>>8) >>2); + + spanR += spanStepR; + spanG += spanStepG; + spanB += spanStepB; + + spanTx += spanTxStep; + spanTy += spanTyStep; + + ++hSpanBegin; + } + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + + leftR += leftStepR; + leftG += leftStepG; + leftB += leftStepB; + rightR += rightStepR; + rightG += rightStepG; + rightB += rightStepB; + + leftTx += leftTxStep; + leftTy += leftTyStep; + rightTx += rightTxStep; + rightTy += rightTyStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightR = video::getRed(v2->Color)<<8; + rightG = video::getGreen(v2->Color)<<8; + rightB = video::getBlue(v2->Color)<<8; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + + rightTx = v2->TCoords.X; + rightTy = v2->TCoords.Y; + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftR = video::getRed(v2->Color)<<8; + leftG = video::getGreen(v2->Color)<<8; + leftB = video::getBlue(v2->Color)<<8; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + + leftTx = v2->TCoords.X; + leftTy = v2->TCoords.Y; + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + Texture->unlock(); + } + +}; + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererTextureGouraudNoZ() +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRTextureGouraudNoZ(); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ2.cpp new file mode 100644 index 0000000..e9eeee0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudNoZ2.cpp @@ -0,0 +1,647 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#ifdef BURNINGVIDEO_RENDERER_FAST + #define SUBTEXEL + #define INVERSE_W +#else + #define SUBTEXEL + #define INVERSE_W +#endif + +//#define USE_ZBUFFER +#define IPOL_W +//#define CMP_W +//#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRTextureGouraudNoZ2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureGouraudNoZ2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRTextureGouraudNoZ2::CTRTextureGouraudNoZ2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureGouraudNoZ2"); + #endif +} + + + +/*! +*/ +void CTRTextureGouraudNoZ2::scanline_bilinear ( ) +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[1] - line.c[0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint tx0; + tFixPoint ty0; + + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); +#endif + dst[i] = getTexel_plain ( &IT[0], tx0, ty0 ); + +/* + getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); + dst[i] = fix_to_color ( r0, g0, b0 ); +*/ +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureGouraudNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear ( ); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTRTextureGouraudNoZ2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureGouraudNoZ2( driver ); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp new file mode 100644 index 0000000..5dad045 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp @@ -0,0 +1,690 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +//#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + +namespace irr +{ + +namespace video +{ + +class CTRTextureVertexAlpha2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureVertexAlpha2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRTextureVertexAlpha2::CTRTextureVertexAlpha2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureVertexAlpha2"); + #endif +} + + + +/*! +*/ +void CTRTextureVertexAlpha2::scanline_bilinear ( ) +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + +//#define __TEST_THIS + +#ifdef __TEST_THIS + +#else + tFixPoint tx0; + tFixPoint ty0; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; +#endif + + +#ifdef IPOL_C0 + tFixPoint a3; +#endif + + + for ( s32 i = 0; i <= dx; ++i ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + + { +#ifdef __TEST_THIS + + inversew = fix_inverse32 ( line.w[0] ); + + dst[i] = PixelAdd32 ( + dst[i], + getTexel_plain ( &IT[0], tofix ( line.t[0][0].x,inversew), + tofix ( line.t[0][0].y,inversew) ) + ); + +#else + +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); + +#ifdef IPOL_C0 + a3 = tofix ( line.c[0][0].y,inversew ); +#endif + +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); + +#ifdef IPOL_C0 + a3 = tofix ( line.c[0][0].y ); +#endif + + +#endif + + getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); + color_to_fix ( r1, g1, b1, dst[i] ); + +#ifdef IPOL_C0 + r2 = clampfix_maxcolor ( r1 + imulFix ( r0, a3 ) ); + g2 = clampfix_maxcolor ( g1 + imulFix ( g0, a3 ) ); + b2 = clampfix_maxcolor ( b1 + imulFix ( b0, a3 ) ); +#else + r2 = clampfix_maxcolor ( r1 + r0 ); + g2 = clampfix_maxcolor ( g1 + g0 ); + b2 = clampfix_maxcolor ( b1 + b0 ); +#endif + + dst[i] = fix_to_color ( r2, g2, b2 ); + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif +#endif + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureVertexAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureVertexAlpha2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureVertexAlpha2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudWire.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudWire.cpp new file mode 100644 index 0000000..8a07e43 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureGouraudWire.cpp @@ -0,0 +1,364 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CTRTextureGouraud.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +class CTRTextureGouraudWire : public CTRTextureGouraud +{ +public: + + CTRTextureGouraudWire(IZBuffer* zbuffer) + : CTRTextureGouraud(zbuffer) + { + #ifdef _DEBUG + setDebugName("CTRGouraudWire"); + #endif + } + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) + { + const S2DVertex *v1, *v2, *v3; + + u16 color; + f32 tmpDiv; // temporary division factor + f32 longest; // saves the longest span + s32 height; // saves height of triangle + u16* targetSurface; // target pointer where to plot pixels + s32 spanEnd; // saves end of spans + f32 leftdeltaxf; // amount of pixels to increase on left side of triangle + f32 rightdeltaxf; // amount of pixels to increase on right side of triangle + s32 leftx, rightx; // position where we are + f32 leftxf, rightxf; // same as above, but as f32 values + s32 span; // current span + s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values + s32 leftStepR, leftStepG, leftStepB, + rightStepR, rightStepG, rightStepB; // color steps + s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values + s32 leftTxStep, rightTxStep, leftTyStep, rightTyStep; // texture interpolating values + core::rect<s32> TriangleRect; + + s32 leftZValue, rightZValue; + s32 leftZStep, rightZStep; + TZBufferType* zTarget;//, *spanZTarget; // target of ZBuffer; + + lockedSurface = (u16*)RenderTarget->lock(); + lockedZBuffer = ZBuffer->lock(); + lockedTexture = (u16*)Texture->lock(); + + for (s32 i=0; i<triangleCount; ++i) + { + v1 = &vertices[*indexList]; + ++indexList; + v2 = &vertices[*indexList]; + ++indexList; + v3 = &vertices[*indexList]; + ++indexList; + + // back face culling + + if (BackFaceCullingEnabled) + { + s32 z = ((v3->Pos.X - v1->Pos.X) * (v3->Pos.Y - v2->Pos.Y)) - + ((v3->Pos.Y - v1->Pos.Y) * (v3->Pos.X - v2->Pos.X)); + + if (z < 0) + continue; + } + + //near plane clipping + + if (v1->ZValue<0 && v2->ZValue<0 && v3->ZValue<0) + continue; + + // sort for width for inscreen clipping + + if (v1->Pos.X > v2->Pos.X) swapVertices(&v1, &v2); + if (v1->Pos.X > v3->Pos.X) swapVertices(&v1, &v3); + if (v2->Pos.X > v3->Pos.X) swapVertices(&v2, &v3); + + if ((v1->Pos.X - v3->Pos.X) == 0) + continue; + + TriangleRect.UpperLeftCorner.X = v1->Pos.X; + TriangleRect.LowerRightCorner.X = v3->Pos.X; + + // sort for height for faster drawing. + + if (v1->Pos.Y > v2->Pos.Y) swapVertices(&v1, &v2); + if (v1->Pos.Y > v3->Pos.Y) swapVertices(&v1, &v3); + if (v2->Pos.Y > v3->Pos.Y) swapVertices(&v2, &v3); + + TriangleRect.UpperLeftCorner.Y = v1->Pos.Y; + TriangleRect.LowerRightCorner.Y = v3->Pos.Y; + + if (!TriangleRect.isRectCollided(ViewPortRect)) + continue; + + // calculate height of triangle + height = v3->Pos.Y - v1->Pos.Y; + if (!height) + continue; + + // calculate longest span + + longest = (v2->Pos.Y - v1->Pos.Y) / (f32)height * (v3->Pos.X - v1->Pos.X) + (v1->Pos.X - v2->Pos.X); + + spanEnd = v2->Pos.Y; + span = v1->Pos.Y; + leftxf = (f32)v1->Pos.X; + rightxf = (f32)v1->Pos.X; + + leftZValue = v1->ZValue; + rightZValue = v1->ZValue; + + leftR = rightR = video::getRed(v1->Color)<<8; + leftG = rightG = video::getGreen(v1->Color)<<8; + leftB = rightB = video::getBlue(v1->Color)<<8; + leftTx = rightTx = v1->TCoords.X; + leftTy = rightTy = v1->TCoords.Y; + + targetSurface = lockedSurface + span * SurfaceWidth; + zTarget = lockedZBuffer + span * SurfaceWidth; + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + rightdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v2->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v2->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)height; + leftdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (f32)height; + rightdeltaxf = (v3->Pos.X - v1->Pos.X) * tmpDiv; + rightZStep = (s32)((v3->ZValue - v1->ZValue) * tmpDiv); + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + + tmpDiv = 1.0f / (f32)(v2->Pos.Y - v1->Pos.Y); + leftdeltaxf = (v2->Pos.X - v1->Pos.X) * tmpDiv; + leftZStep = (s32)((v2->ZValue - v1->ZValue) * tmpDiv); + leftStepR = (s32)(((s32)(video::getRed(v2->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v2->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v2->Color)<<8) - leftB) * tmpDiv); + leftTxStep = (s32)((v2->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v2->TCoords.Y - leftTy) * tmpDiv); + } + + + // do it twice, once for the first half of the triangle, + // end then for the second half. + + for (s32 triangleHalf=0; triangleHalf<2; ++triangleHalf) + { + if (spanEnd > ViewPortRect.LowerRightCorner.Y) + spanEnd = ViewPortRect.LowerRightCorner.Y; + + // if the span <0, than we can skip these spans, + // and proceed to the next spans which are really on the screen. + if (span < ViewPortRect.UpperLeftCorner.Y) + { + // we'll use leftx as temp variable + if (spanEnd < ViewPortRect.UpperLeftCorner.Y) + { + leftx = spanEnd - span; + span = spanEnd; + } + else + { + leftx = ViewPortRect.UpperLeftCorner.Y - span; + span = ViewPortRect.UpperLeftCorner.Y; + } + + leftxf += leftdeltaxf*leftx; + rightxf += rightdeltaxf*leftx; + targetSurface += SurfaceWidth*leftx; + zTarget += SurfaceWidth*leftx; + leftZValue += leftZStep*leftx; + rightZValue += rightZStep*leftx; + + leftR += leftStepR*leftx; + leftG += leftStepG*leftx; + leftB += leftStepB*leftx; + rightR += rightStepR*leftx; + rightG += rightStepG*leftx; + rightB += rightStepB*leftx; + + leftTx += leftTxStep*leftx; + leftTy += leftTyStep*leftx; + rightTx += rightTxStep*leftx; + rightTy += rightTyStep*leftx; + } + + + // the main loop. Go through every span and draw it. + + while (span < spanEnd) + { + leftx = (s32)(leftxf); + rightx = (s32)(rightxf + 0.5f); + + // perform some clipping + + if (leftx>=ViewPortRect.UpperLeftCorner.X && + leftx<=ViewPortRect.LowerRightCorner.X) + { + if (leftZValue > *(zTarget + leftx)) + { + *(zTarget + leftx) = leftZValue; + color = lockedTexture[((leftTy>>8)&textureYMask) * lockedTextureWidth + ((leftTx>>8)&textureXMask)]; + *(targetSurface + leftx) = video::RGB16(video::getRed(color) * (leftR>>8) >>2, + video::getGreen(color) * (leftG>>8) >>2, + video::getBlue(color) * (leftR>>8) >>2); + } + } + + + if (rightx>=ViewPortRect.UpperLeftCorner.X && + rightx<=ViewPortRect.LowerRightCorner.X) + { + if (rightZValue > *(zTarget + rightx)) + { + *(zTarget + rightx) = rightZValue; + color = lockedTexture[((rightTy>>8)&textureYMask) * lockedTextureWidth + ((rightTx>>8)&textureXMask)]; + *(targetSurface + rightx) = video::RGB16(video::getRed(color) * (rightR>>8) >>2, + video::getGreen(color) * (rightG>>8) >>2, + video::getBlue(color) * (rightR>>8) >>2); + } + + } + + leftxf += leftdeltaxf; + rightxf += rightdeltaxf; + ++span; + targetSurface += SurfaceWidth; + zTarget += SurfaceWidth; + leftZValue += leftZStep; + rightZValue += rightZStep; + + leftR += leftStepR; + leftG += leftStepG; + leftB += leftStepB; + rightR += rightStepR; + rightG += rightStepG; + rightB += rightStepB; + + leftTx += leftTxStep; + leftTy += leftTyStep; + rightTx += rightTxStep; + rightTy += rightTyStep; + } + + if (triangleHalf>0) // break, we've gout only two halves + break; + + + // setup variables for second half of the triangle. + + if (longest < 0.0f) + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + rightdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + rightxf = (f32)v2->Pos.X; + + rightZValue = v2->ZValue; + rightZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + rightR = video::getRed(v2->Color)<<8; + rightG = video::getGreen(v2->Color)<<8; + rightB = video::getBlue(v2->Color)<<8; + rightStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - rightR) * tmpDiv); + rightStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - rightG) * tmpDiv); + rightStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - rightB) * tmpDiv); + + rightTx = v2->TCoords.X; + rightTy = v2->TCoords.Y; + rightTxStep = (s32)((v3->TCoords.X - rightTx) * tmpDiv); + rightTyStep = (s32)((v3->TCoords.Y - rightTy) * tmpDiv); + } + else + { + tmpDiv = 1.0f / (v3->Pos.Y - v2->Pos.Y); + + leftdeltaxf = (v3->Pos.X - v2->Pos.X) * tmpDiv; + leftxf = (f32)v2->Pos.X; + + leftZValue = v2->ZValue; + leftZStep = (s32)((v3->ZValue - v2->ZValue) * tmpDiv); + + leftR = video::getRed(v2->Color)<<8; + leftG = video::getGreen(v2->Color)<<8; + leftB = video::getBlue(v2->Color)<<8; + leftStepR = (s32)(((s32)(video::getRed(v3->Color)<<8) - leftR) * tmpDiv); + leftStepG = (s32)(((s32)(video::getGreen(v3->Color)<<8) - leftG) * tmpDiv); + leftStepB = (s32)(((s32)(video::getBlue(v3->Color)<<8) - leftB) * tmpDiv); + + leftTx = v2->TCoords.X; + leftTy = v2->TCoords.Y; + leftTxStep = (s32)((v3->TCoords.X - leftTx) * tmpDiv); + leftTyStep = (s32)((v3->TCoords.Y - leftTy) * tmpDiv); + } + + + spanEnd = v3->Pos.Y; + } + + } + + RenderTarget->unlock(); + ZBuffer->unlock(); + Texture->unlock(); + } +}; + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +ITriangleRenderer* createTriangleRendererTextureGouraudWire(IZBuffer* zbuffer) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CTRTextureGouraudWire(zbuffer); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_Add.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_Add.cpp new file mode 100644 index 0000000..82f39f3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_Add.cpp @@ -0,0 +1,672 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + +namespace irr +{ + +namespace video +{ + +class CTRTextureLightMap2_Add : public IBurningShader +{ +public: + + //! constructor + CTRTextureLightMap2_Add(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRTextureLightMap2_Add::CTRTextureLightMap2_Add(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureLightMap2_Add"); + #endif +} + + + +/*! +*/ +REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[1] - line.c[0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + + + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + + +#else + // + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; +#endif + + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + +#ifdef BURNINGVIDEO_RENDERER_FAST + +#ifdef INVERSE_W + + const f32 inversew = fix_inverse32 ( line.w[0] ); + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + + dst[i] = PixelAdd32 ( + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + d + tofix ( line.t[0][0].y,inversew) ), + getTexel_plain ( &IT[1], d + tofix ( line.t[1][0].x,inversew), + d + tofix ( line.t[1][0].y,inversew) ) + ); +#else + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + + dst[i] = PixelAdd32 ( + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + d + tofix ( line.t[0][0].y) ), + getTexel_plain ( &IT[1], d + tofix ( line.t[1][0].x), + d + tofix ( line.t[1][0].y) ) + ); + +#endif + +#else + const f32 inversew = fix_inverse32 ( line.w[0] ); + + getSample_texture ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[0][1].x,inversew), tofix ( line.t[0][1].y,inversew) ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( r0 + r1 ), + clampfix_maxcolor ( g0 + g1 ), + clampfix_maxcolor ( b0 + b1 ) + ); +#endif + + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRTextureLightMap2_Add::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[1] ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + if ( (f32) 0.0 != scan.invDeltaY[2] ) + { + // advance to middle point + if( (f32) 0.0 != scan.invDeltaY[1] ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureLightMap2_Add(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureLightMap2_Add(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M1.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M1.cpp new file mode 100644 index 0000000..59a13b1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M1.cpp @@ -0,0 +1,644 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + +namespace irr +{ + +namespace video +{ + +class CTRTextureLightMap2_M1 : public IBurningShader +{ +public: + + //! constructor + CTRTextureLightMap2_M1(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear2 (); + + sScanLineData line; + +}; + +//! constructor +CTRTextureLightMap2_M1::CTRTextureLightMap2_M1(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureLightMap2_M1"); + #endif +} + +/*! +*/ +REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 () +{ + tVideoSample *dst; + fp24 *z; + + s32 xStart; + s32 xEnd; + s32 dx; + s32 i; + + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + + // search z-buffer for first not occulled pixel + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + + // subTexel + const f32 subPixel = ( (f32) xStart ) - line.x[0]; + +#ifdef IPOL_W + const f32 b = (line.w[1] - line.w[0]) * invDeltaX; + f32 a = line.w[0] + ( b * subPixel ); + + i = 0; + + while ( a <= z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.w[0] = a; + line.w[1] = b; +#else + const f32 b = (line.z[1] - line.z[0]) * invDeltaX; + f32 a = line.z[0] + ( b * subPixel ); + + i = 0; + + while ( a > z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.z[0] = a; + line.z[1] = b; +#endif + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + + a = (f32) i + subPixel; + + line.t[0][1] = (line.t[0][1] - line.t[0][0]) * invDeltaX; + line.t[1][1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; + + line.t[0][0] += line.t[0][1] * a; + line.t[1][0] += line.t[1][1] * a; + + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + +#else + // + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; +#endif + + + for ( ;i <= dx; i++ ) + { +#ifdef IPOL_W + if ( line.w[0] >= z[i] ) + { + z[i] = line.w[0]; +#else + if ( line.z[0] < z[i] ) + { + z[i] = line.z[0]; +#endif + +#ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + f32 inversew = fix_inverse32 ( line.w[0] ); +#else + f32 inversew = FIX_POINT_F32_MUL; +#endif + + + +#ifdef BURNINGVIDEO_RENDERER_FAST + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + + getSample_texture ( r0, g0, b0, &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], d + tofix ( line.t[1][0].x,inversew), d + tofix ( line.t[1][0].y,inversew) ); +#else + getSample_texture ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[1][0].x,inversew), tofix ( line.t[1][0].y,inversew) ); + +#endif + + dst[i] = fix_to_color ( imulFix_tex1 ( r0, r1 ), + imulFix_tex1 ( g0, g1 ), + imulFix_tex1 ( b0, b1 ) + ); + } + +#ifdef IPOL_W + line.w[0] += line.w[1]; +#else + line.z[0] += line.z[1]; +#endif + line.t[0][0] += line.t[0][1]; + line.t[1][0] += line.t[1][1]; + } + +} + + + +void CTRTextureLightMap2_M1::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + sScanConvertData scan; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2 (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2 (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureLightMap2_M1(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureLightMap2_M1(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M2.cpp new file mode 100644 index 0000000..40da966 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M2.cpp @@ -0,0 +1,644 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + +namespace irr +{ + +namespace video +{ + +class CTRTextureLightMap2_M2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureLightMap2_M2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear2 (); + + sScanLineData line; + +}; + +//! constructor +CTRTextureLightMap2_M2::CTRTextureLightMap2_M2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureLightMap2_M2"); + #endif +} + +/*! +*/ +REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 () +{ + tVideoSample *dst; + fp24 *z; + + s32 xStart; + s32 xEnd; + s32 dx; + s32 i; + + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + + // search z-buffer for first not occulled pixel + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + + // subTexel + const f32 subPixel = ( (f32) xStart ) - line.x[0]; + +#ifdef IPOL_W + const f32 b = (line.w[1] - line.w[0]) * invDeltaX; + f32 a = line.w[0] + ( b * subPixel ); + + i = 0; + + while ( a <= z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.w[0] = a; + line.w[1] = b; +#else + const f32 b = (line.z[1] - line.z[0]) * invDeltaX; + f32 a = line.z[0] + ( b * subPixel ); + + i = 0; + + while ( a > z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.z[0] = a; + line.z[1] = b; +#endif + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + + a = (f32) i + subPixel; + + line.t[0][1] = (line.t[0][1] - line.t[0][0]) * invDeltaX; + line.t[1][1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; + + line.t[0][0] += line.t[0][1] * a; + line.t[1][0] += line.t[1][1] * a; + + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + +#else + // + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; +#endif + + + for ( ;i <= dx; i++ ) + { +#ifdef IPOL_W + if ( line.w[0] >= z[i] ) + { + z[i] = line.w[0]; +#else + if ( line.z[0] < z[i] ) + { + z[i] = line.z[0]; +#endif + +#ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + f32 inversew = fix_inverse32 ( line.w[0] ); +#else + f32 inversew = FIX_POINT_F32_MUL; +#endif + + + +#ifdef BURNINGVIDEO_RENDERER_FAST + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + + getSample_texture ( r0, g0, b0, &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], d + tofix ( line.t[1][0].x,inversew), d + tofix ( line.t[1][0].y,inversew) ); +#else + getSample_texture ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[1][0].x,inversew), tofix ( line.t[1][0].y,inversew) ); + +#endif + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex2 ( b0, b1 ) ) + ); + } + +#ifdef IPOL_W + line.w[0] += line.w[1]; +#else + line.z[0] += line.z[1]; +#endif + line.t[0][0] += line.t[0][1]; + line.t[1][0] += line.t[1][1]; + } + +} + + + +void CTRTextureLightMap2_M2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + sScanConvertData scan; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2 (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2 (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureLightMap2_M2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureLightMap2_M2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M4.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M4.cpp new file mode 100644 index 0000000..989a915 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMap2_M4.cpp @@ -0,0 +1,1154 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +//#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + +namespace irr +{ + +namespace video +{ + +class CTRTextureLightMap2_M4 : public IBurningShader +{ +public: + + //! constructor + CTRTextureLightMap2_M4(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + + void drawTriangle_Min ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + void drawTriangle_Mag ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + void scanline_bilinear (); + void scanline_bilinear2_mag (); + void scanline_bilinear2_min (); + + sScanLineData line; + +}; + +//! constructor +CTRTextureLightMap2_M4::CTRTextureLightMap2_M4(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureLightMap2_M4"); + #endif +} + +/*! +*/ +REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag () +{ + tVideoSample *dst; + fp24 *z; + + // apply top-left fill-convention, left + const s32 xStart = irr::core::ceil32( line.x[0] ); + const s32 xEnd = irr::core::ceil32( line.x[1] ) - 1; + s32 dx; + s32 i; + + + dx = xEnd - xStart; + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + + // search z-buffer for first not occulled pixel + i = ( line.y * RenderTarget->getDimension().Width ) + xStart; + z = (fp24*) DepthBuffer->lock() + i; + dst = (tVideoSample*)RenderTarget->lock() + i; + + // subTexel + const f32 subPixel = ( (f32) xStart ) - line.x[0]; + +#ifdef IPOL_W + const fp24 b = (line.w[1] - line.w[0]) * invDeltaX; + fp24 a = line.w[0] + ( b * subPixel ); + + i = 0; + + while ( a < z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.w[0] = a; + line.w[1] = b; +#else + const f32 b = (line.z[1] - line.z[0]) * invDeltaX; + f32 a = line.z[0] + ( b * subPixel ); + + i = 0; + + while ( a > z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.z[0] = a; + line.z[1] = b; +#endif + + a = (f32) i + subPixel; + + line.t[0][1] = (line.t[0][1] - line.t[0][0]) * invDeltaX; + line.t[1][1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; + + line.t[0][0] += line.t[0][1] * a; + line.t[1][0] += line.t[1][1] * a; + + +#ifdef BURNINGVIDEO_RENDERER_FAST + u32 dIndex = ( line.y & 3 ) << 2; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + +#else + // + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; +#endif + + + for ( ;i <= dx; i++ ) + { +#ifdef IPOL_W + if ( line.w[0] >= z[i] ) + { + z[i] = line.w[0]; +#else + if ( line.z[0] < z[i] ) + { + z[i] = line.z[0]; +#endif + +#ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + f32 inversew = fix_inverse32 ( line.w[0] ); +#else + f32 inversew = FIX_POINT_F32_MUL; +#endif + + + +#ifdef BURNINGVIDEO_RENDERER_FAST + + const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; + + getSample_texture ( r0, g0, b0, &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], d + tofix ( line.t[1][0].x,inversew), d + tofix ( line.t[1][0].y,inversew) ); +#else + getSample_texture ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[1][0].x,inversew), tofix ( line.t[1][0].y,inversew) ); + +#endif + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) ) + ); + } + +#ifdef IPOL_W + line.w[0] += line.w[1]; +#else + line.z[0] += line.z[1]; +#endif + line.t[0][0] += line.t[0][1]; + line.t[1][0] += line.t[1][1]; + } + +} + +/*! +*/ +REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min () +{ + tVideoSample *dst; + fp24 *z; + + s32 xStart; + s32 xEnd; + s32 dx; + s32 i; + + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + + // search z-buffer for first not occulled pixel + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + + // subTexel + const f32 subPixel = ( (f32) xStart ) - line.x[0]; + +#ifdef IPOL_W + const f32 b = (line.w[1] - line.w[0]) * invDeltaX; + f32 a = line.w[0] + ( b * subPixel ); + + i = 0; + + while ( a <= z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.w[0] = a; + line.w[1] = b; +#else + const f32 b = (line.z[1] - line.z[0]) * invDeltaX; + f32 a = line.z[0] + ( b * subPixel ); + + i = 0; + + while ( a > z[i] ) + { + a += b; + + i += 1; + if ( i > dx ) + return; + + } + + // lazy setup rest of scanline + + line.z[0] = a; + line.z[1] = b; +#endif + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + + a = (f32) i + subPixel; + + line.t[0][1] = (line.t[0][1] - line.t[0][0]) * invDeltaX; + line.t[1][1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; + + line.t[0][0] += line.t[0][1] * a; + line.t[1][0] += line.t[1][1] * a; + + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + + + for ( ;i <= dx; i++ ) + { +#ifdef IPOL_W + if ( line.w[0] >= z[i] ) + { + z[i] = line.w[0]; +#else + if ( line.z[0] < z[i] ) + { + z[i] = line.z[0]; +#endif + +#ifdef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + f32 inversew = fix_inverse32 ( line.w[0] ); +#else + f32 inversew = FIX_POINT_F32_MUL; +#endif + + + getTexel_fix ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); + getTexel_fix ( r1, g1, b1, &IT[1], tofix ( line.t[1][0].x,inversew), tofix ( line.t[1][0].y,inversew) ); + + dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) ), + clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) ), + clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) ) + ); + } + +#ifdef IPOL_W + line.w[0] += line.w[1]; +#else + line.z[0] += line.z[1]; +#endif + line.t[0][0] += line.t[0][1]; + line.t[1][0] += line.t[1][1]; + } + +} + +//#ifdef BURNINGVIDEO_RENDERER_FAST +#if 1 + +void CTRTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + if ( IT[0].lodLevel <= 2 ) + drawTriangle_Mag ( a, b, c ); + else + drawTriangle_Min ( a, b, c ); +} + +void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + sScanConvertData scan; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + // rasterize upper sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2_min (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2_min (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +void CTRTextureLightMap2_M4::drawTriangle_Mag ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) + +#else + +void CTRTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) + +#endif + +{ + sScanConvertData scan; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2_mag (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0] = a->Color[0] + scan.slopeC[0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[scan.left] = scan.c[0]; + line.c[scan.right] = scan.c[1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear2_mag (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0] += scan.slopeC[0]; + scan.c[1] += scan.slopeC[1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureLightMap2_M4(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureLightMap2_M4(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp new file mode 100644 index 0000000..d7397f4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp @@ -0,0 +1,690 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + +#define IPOL_C0 +#define IPOL_T0 +#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#ifndef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #undef IPOL_C0 +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + +namespace irr +{ + +namespace video +{ + +class CTRGTextureLightMap2_M4 : public IBurningShader +{ +public: + + //! constructor + CTRGTextureLightMap2_M4(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + + +private: + void scanline_bilinear (); + + sScanConvertData scan; + sScanLineData line; + +}; + +//! constructor +CTRGTextureLightMap2_M4::CTRGTextureLightMap2_M4(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRGTextureLightMap2_M4"); + #endif +} + + + +/*! +*/ +void CTRGTextureLightMap2_M4::scanline_bilinear () +{ + tVideoSample *dst; + +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + s32 xStart; + s32 xEnd; + s32 dx; + + +#ifdef SUBTEXEL + f32 subPixel; +#endif + +#ifdef IPOL_Z + f32 slopeZ; +#endif +#ifdef IPOL_W + fp24 slopeW; +#endif +#ifdef IPOL_C0 + sVec4 slopeC; +#endif +#ifdef IPOL_T0 + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES]; +#endif + + // apply top-left fill-convention, left + xStart = core::ceil32( line.x[0] ); + xEnd = core::ceil32( line.x[1] ) - 1; + + dx = xEnd - xStart; + + if ( dx < 0 ) + return; + + // slopes + const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] ); + +#ifdef IPOL_Z + slopeZ = (line.z[1] - line.z[0]) * invDeltaX; +#endif +#ifdef IPOL_W + slopeW = (line.w[1] - line.w[0]) * invDeltaX; +#endif +#ifdef IPOL_C0 + slopeC = (line.c[0][1] - line.c[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T0 + slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX; +#endif +#ifdef IPOL_T1 + slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX; +#endif + +#ifdef SUBTEXEL + subPixel = ( (f32) xStart ) - line.x[0]; +#ifdef IPOL_Z + line.z[0] += slopeZ * subPixel; +#endif +#ifdef IPOL_W + line.w[0] += slopeW * subPixel; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC * subPixel; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0] * subPixel; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1] * subPixel; +#endif +#endif + + dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; + +#ifdef USE_ZBUFFER + z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; +#endif + + +#ifdef INVERSE_W + f32 inversew; +#endif + + tFixPoint tx0, tx1; + tFixPoint ty0, ty1; + + tFixPoint r0, g0, b0; + tFixPoint r1, g1, b1; + tFixPoint r2, g2, b2; + +#ifdef IPOL_C0 + tFixPoint r3, g3, b3; +#endif + + for ( s32 i = 0; i <= dx; i++ ) + { +#ifdef CMP_Z + if ( line.z[0] < z[i] ) +#endif +#ifdef CMP_W + if ( line.w[0] >= z[i] ) +#endif + { +#ifdef INVERSE_W + inversew = fix_inverse32 ( line.w[0] ); + + tx0 = tofix ( line.t[0][0].x,inversew); + ty0 = tofix ( line.t[0][0].y,inversew); + tx1 = tofix ( line.t[1][0].x,inversew); + ty1 = tofix ( line.t[1][0].y,inversew); + +#ifdef IPOL_C0 + r3 = tofix ( line.c[0][0].y ,inversew ); + g3 = tofix ( line.c[0][0].z ,inversew ); + b3 = tofix ( line.c[0][0].w ,inversew ); +#endif + +#else + tx0 = tofix ( line.t[0][0].x ); + ty0 = tofix ( line.t[0][0].y ); + tx1 = tofix ( line.t[1][0].x ); + ty1 = tofix ( line.t[1][0].y ); + +#ifdef IPOL_C0 + r3 = tofix ( line.c[0][0].y ); + g3 = tofix ( line.c[0][0].z ); + b3 = tofix ( line.c[0][0].w ); +#endif + +#endif + getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 ); + getSample_texture ( r1, g1, b1, &IT[1], tx1, ty1 ); + +#ifdef IPOL_C0 + r2 = imulFix ( r0, r3 ); + g2 = imulFix ( g0, g3 ); + b2 = imulFix ( b0, b3 ); + + r2 = clampfix_maxcolor ( imulFix_tex4 ( r2, r1 ) ); + g2 = clampfix_maxcolor ( imulFix_tex4 ( g2, g1 ) ); + b2 = clampfix_maxcolor ( imulFix_tex4 ( b2, b1 ) ); +/* + r2 = r3 << 8; + g2 = g3 << 8; + b2 = b3 << 8; +*/ +#else + r2 = clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) ); + g2 = clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) ); + b2 = clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) ); +#endif + + + dst[i] = fix_to_color ( r2, g2, b2 ); + +#ifdef WRITE_Z + z[i] = line.z[0]; +#endif +#ifdef WRITE_W + z[i] = line.w[0]; +#endif + } + +#ifdef IPOL_Z + line.z[0] += slopeZ; +#endif +#ifdef IPOL_W + line.w[0] += slopeW; +#endif +#ifdef IPOL_C0 + line.c[0][0] += slopeC; +#endif +#ifdef IPOL_T0 + line.t[0][0] += slopeT[0]; +#endif +#ifdef IPOL_T1 + line.t[1][0] += slopeT[1]; +#endif + } + +} + +void CTRGTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + const f32 ca = c->Pos.y - a->Pos.y; + const f32 ba = b->Pos.y - a->Pos.y; + const f32 cb = c->Pos.y - b->Pos.y; + // calculate delta y of the edges + scan.invDeltaY[0] = core::reciprocal( ca ); + scan.invDeltaY[1] = core::reciprocal( ba ); + scan.invDeltaY[2] = core::reciprocal( cb ); + + if ( F32_LOWER_0 ( scan.invDeltaY[0] ) ) + return; + + // find if the major edge is left or right aligned + f32 temp[4]; + + temp[0] = a->Pos.x - c->Pos.x; + temp[1] = -ca; + temp[2] = b->Pos.x - a->Pos.x; + temp[3] = ba; + + scan.left = ( temp[0] * temp[3] - temp[1] * temp[2] ) > 0.f ? 0 : 1; + scan.right = 1 - scan.left; + + // calculate slopes for the major edge + scan.slopeX[0] = (c->Pos.x - a->Pos.x) * scan.invDeltaY[0]; + scan.x[0] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[0] = (c->Pos.z - a->Pos.z) * scan.invDeltaY[0]; + scan.z[0] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0]; + scan.w[0] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][0] = (c->Color[0] - a->Color[0]) * scan.invDeltaY[0]; + scan.c[0][0] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][0] = (c->Tex[0] - a->Tex[0]) * scan.invDeltaY[0]; + scan.t[0][0] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][0] = (c->Tex[1] - a->Tex[1]) * scan.invDeltaY[0]; + scan.t[1][0] = a->Tex[1]; +#endif + + // top left fill convention y run + s32 yStart; + s32 yEnd; + +#ifdef SUBTEXEL + f32 subPixel; +#endif + + + // rasterize upper sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + // calculate slopes for top edge + scan.slopeX[1] = (b->Pos.x - a->Pos.x) * scan.invDeltaY[1]; + scan.x[1] = a->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (b->Pos.z - a->Pos.z) * scan.invDeltaY[1]; + scan.z[1] = a->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1]; + scan.w[1] = a->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (b->Color[0] - a->Color[0]) * scan.invDeltaY[1]; + scan.c[0][1] = a->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (b->Tex[0] - a->Tex[0]) * scan.invDeltaY[1]; + scan.t[0][1] = a->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (b->Tex[1] - a->Tex[1]) * scan.invDeltaY[1]; + scan.t[1][1] = a->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( a->Pos.y ); + yEnd = core::ceil32( b->Pos.y ) - 1; + +#ifdef SUBTEXEL + subPixel = ( (f32) yStart ) - a->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + + // rasterize lower sub-triangle + //if ( (f32) 0.0 != scan.invDeltaY[2] ) + if ( F32_GREATER_0 ( scan.invDeltaY[2] ) ) + { + // advance to middle point + //if( (f32) 0.0 != scan.invDeltaY[1] ) + if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) + { + temp[0] = b->Pos.y - a->Pos.y; // dy + + scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0]; +#ifdef IPOL_Z + scan.z[0] = a->Pos.z + scan.slopeZ[0] * temp[0]; +#endif +#ifdef IPOL_W + scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0]; +#endif +#ifdef IPOL_C0 + scan.c[0][0] = a->Color[0] + scan.slopeC[0][0] * temp[0]; +#endif +#ifdef IPOL_T0 + scan.t[0][0] = a->Tex[0] + scan.slopeT[0][0] * temp[0]; +#endif +#ifdef IPOL_T1 + scan.t[1][0] = a->Tex[1] + scan.slopeT[1][0] * temp[0]; +#endif + + } + + // calculate slopes for bottom edge + scan.slopeX[1] = (c->Pos.x - b->Pos.x) * scan.invDeltaY[2]; + scan.x[1] = b->Pos.x; + +#ifdef IPOL_Z + scan.slopeZ[1] = (c->Pos.z - b->Pos.z) * scan.invDeltaY[2]; + scan.z[1] = b->Pos.z; +#endif + +#ifdef IPOL_W + scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2]; + scan.w[1] = b->Pos.w; +#endif + +#ifdef IPOL_C0 + scan.slopeC[0][1] = (c->Color[0] - b->Color[0]) * scan.invDeltaY[2]; + scan.c[0][1] = b->Color[0]; +#endif + +#ifdef IPOL_T0 + scan.slopeT[0][1] = (c->Tex[0] - b->Tex[0]) * scan.invDeltaY[2]; + scan.t[0][1] = b->Tex[0]; +#endif + +#ifdef IPOL_T1 + scan.slopeT[1][1] = (c->Tex[1] - b->Tex[1]) * scan.invDeltaY[2]; + scan.t[1][1] = b->Tex[1]; +#endif + + // apply top-left fill convention, top part + yStart = core::ceil32( b->Pos.y ); + yEnd = core::ceil32( c->Pos.y ) - 1; + +#ifdef SUBTEXEL + + subPixel = ( (f32) yStart ) - b->Pos.y; + + // correct to pixel center + scan.x[0] += scan.slopeX[0] * subPixel; + scan.x[1] += scan.slopeX[1] * subPixel; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; +#endif + +#endif + + // rasterize the edge scanlines + for( line.y = yStart; line.y <= yEnd; ++line.y) + { + line.x[scan.left] = scan.x[0]; + line.x[scan.right] = scan.x[1]; + +#ifdef IPOL_Z + line.z[scan.left] = scan.z[0]; + line.z[scan.right] = scan.z[1]; +#endif + +#ifdef IPOL_W + line.w[scan.left] = scan.w[0]; + line.w[scan.right] = scan.w[1]; +#endif + +#ifdef IPOL_C0 + line.c[0][scan.left] = scan.c[0][0]; + line.c[0][scan.right] = scan.c[0][1]; +#endif + +#ifdef IPOL_T0 + line.t[0][scan.left] = scan.t[0][0]; + line.t[0][scan.right] = scan.t[0][1]; +#endif + +#ifdef IPOL_T1 + line.t[1][scan.left] = scan.t[1][0]; + line.t[1][scan.right] = scan.t[1][1]; +#endif + + // render a scanline + scanline_bilinear (); + + scan.x[0] += scan.slopeX[0]; + scan.x[1] += scan.slopeX[1]; + +#ifdef IPOL_Z + scan.z[0] += scan.slopeZ[0]; + scan.z[1] += scan.slopeZ[1]; +#endif + +#ifdef IPOL_W + scan.w[0] += scan.slopeW[0]; + scan.w[1] += scan.slopeW[1]; +#endif + +#ifdef IPOL_C0 + scan.c[0][0] += scan.slopeC[0][0]; + scan.c[0][1] += scan.slopeC[0][1]; +#endif + +#ifdef IPOL_T0 + scan.t[0][0] += scan.slopeT[0][0]; + scan.t[0][1] += scan.slopeT[0][1]; +#endif + +#ifdef IPOL_T1 + scan.t[1][0] += scan.slopeT[1][0]; + scan.t[1][1] += scan.slopeT[1][1]; +#endif + + } + } + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererGTextureLightMap2_M4(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRGTextureLightMap2_M4(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureWire2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureWire2.cpp new file mode 100644 index 0000000..5cf8b3c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTRTextureWire2.cpp @@ -0,0 +1,298 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "IBurningShader.h" + +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +// compile flag for this file +#undef USE_ZBUFFER +#undef IPOL_Z +#undef CMP_Z +#undef WRITE_Z + +#undef IPOL_W +#undef CMP_W +#undef WRITE_W + +#undef SUBTEXEL +#undef INVERSE_W + +#undef IPOL_C0 +#undef IPOL_T0 +#undef IPOL_T1 + +// define render case +#define SUBTEXEL +#define INVERSE_W + +#define USE_ZBUFFER +#define IPOL_W +#define CMP_W +#define WRITE_W + + +//#define IPOL_C0 +#define IPOL_T0 +//#define IPOL_T1 + +// apply global override +#ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef INVERSE_W +#endif + +#ifndef SOFTWARE_DRIVER_2_SUBTEXEL + #undef SUBTEXEL +#endif + +#if !defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) && defined ( USE_ZBUFFER ) + #ifndef SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #undef IPOL_W + #endif + #define IPOL_Z + + #ifdef CMP_W + #undef CMP_W + #define CMP_Z + #endif + + #ifdef WRITE_W + #undef WRITE_W + #define WRITE_Z + #endif + +#endif + + +namespace irr +{ + +namespace video +{ + +class CTRTextureWire2 : public IBurningShader +{ +public: + + //! constructor + CTRTextureWire2(CBurningVideoDriver* driver); + + //! draws an indexed triangle list + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ); + virtual void drawLine ( const s4DVertex *a,const s4DVertex *b); + + + +private: + void renderAlphaLine ( const s4DVertex *a,const s4DVertex *b ) const; + void renderLine ( const s4DVertex *a,const s4DVertex *b ) const; + +}; + +//! constructor +CTRTextureWire2::CTRTextureWire2(CBurningVideoDriver* driver) +: IBurningShader(driver) +{ + #ifdef _DEBUG + setDebugName("CTRTextureWire2"); + #endif +} + + +// swap integer with xor +static inline void swap_xor ( s32 &a, s32 &b ) +{ + a ^= b; + b ^= a; + a ^= b; +} + + +/*! +*/ +void CTRTextureWire2::renderLine ( const s4DVertex *a,const s4DVertex *b ) const +{ + + int pitch0 = RenderTarget->getDimension().Width << VIDEO_SAMPLE_GRANULARITY; + int pitch1 = RenderTarget->getDimension().Width << 2; + + int aposx = (int) a->Pos.x; + int aposy = (int) a->Pos.y; + int bposx = (int) b->Pos.x; + int bposy = (int) b->Pos.y; + + int dx = bposx - aposx; + int dy = bposy - aposy; + + int c; + int m; + int d = 0; + int run; + + tVideoSample *dst; +#ifdef USE_ZBUFFER + fp24 *z; +#endif + + int xInc0 = 1 << VIDEO_SAMPLE_GRANULARITY; + int yInc0 = pitch0; + + int xInc1 = 4; + int yInc1 = pitch1; + + tVideoSample color; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + tFixPoint r0, g0, b0; + getSample_color ( r0, g0, b0, a->Color[0] ); + color = fix_to_color ( r0, g0, b0 ); +#else + color = (tVideoSample) 0xFFFFFFFF; +#endif + + if ( dx < 0 ) + { + xInc0 = - ( 1 << VIDEO_SAMPLE_GRANULARITY); + xInc1 = -4; + dx = -dx; + } + + if ( dy > dx ) + { + swap_xor ( dx, dy ); + swap_xor ( xInc0, yInc0 ); + swap_xor ( xInc1, yInc1 ); + } + + if ( 0 == dx ) + return; + + dst = (tVideoSample*) ( (u8*) (tVideoSample*)RenderTarget->lock() + ( aposy * pitch0 ) + (aposx << VIDEO_SAMPLE_GRANULARITY ) ); +#ifdef USE_ZBUFFER + z = (fp24*) ( (u8*) (fp24*) DepthBuffer->lock() + ( aposy * pitch1 ) + (aposx << 2 ) ); +#endif + + c = dx << 1; + m = dy << 1; + +#ifdef IPOL_Z + f32 slopeZ = (b->Pos.z - a->Pos.z) / f32(dx); + f32 dataZ = a->Pos.z; +#endif + +#ifdef IPOL_W + fp24 slopeW = (b->Pos.w - a->Pos.w) / f32( dx ); + fp24 dataW = a->Pos.w; +#endif + + run = dx; + while ( run ) + { +#ifdef CMP_Z + if ( *z >= dataZ ) +#endif +#ifdef CMP_W + if ( dataW >= *z ) +#endif + { +#ifdef WRITE_Z + *z = dataZ; +#endif +#ifdef WRITE_W + *z = dataW; +#endif + + *dst = color; + + } + + dst = (tVideoSample*) ( (u8*) dst + xInc0 ); // x += xInc +#ifdef IPOL_Z + z = (fp24*) ( (u8*) z + xInc1 ); +#endif +#ifdef IPOL_W + z = (fp24*) ( (u8*) z + xInc1 ); +#endif + + d += m; + if ( d > dx ) + { + dst = (tVideoSample*) ( (u8*) dst + yInc0 ); // y += yInc +#ifdef IPOL_Z + z = (fp24*) ( (u8*) z + yInc1 ); +#endif +#ifdef IPOL_W + z = (fp24*) ( (u8*) z + yInc1 ); +#endif + + d -= c; + } + run -= 1; +#ifdef IPOL_Z + dataZ += slopeZ; +#endif +#ifdef IPOL_W + dataW += slopeW; +#endif + + } + +} + +void CTRTextureWire2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) +{ + sScanLineData line; + + // sort on height, y + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + if ( F32_A_GREATER_B ( b->Pos.y , c->Pos.y ) ) swapVertexPointer(&b, &c); + if ( F32_A_GREATER_B ( a->Pos.y , b->Pos.y ) ) swapVertexPointer(&a, &b); + + renderLine ( a, b ); + renderLine ( b, c ); + renderLine ( a, c ); + +} + + +void CTRTextureWire2::drawLine ( const s4DVertex *a,const s4DVertex *b) +{ + + // query access to TexMaps + + // sort on height, y + if ( a->Pos.y > b->Pos.y ) swapVertexPointer(&a, &b); + + renderLine ( a, b ); + +} + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +namespace irr +{ +namespace video +{ + + +//! creates a flat triangle renderer +IBurningShader* createTriangleRendererTextureGouraudWire2(CBurningVideoDriver* driver) +{ + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + return new CTRTextureWire2(driver); + #else + return 0; + #endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ +} + + +} // end namespace video +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.cpp new file mode 100644 index 0000000..bbc9a8c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.cpp @@ -0,0 +1,258 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CTarReader.h" + +#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ + +#include "CFileList.h" +#include "CLimitReadFile.h" +#include "os.h" +#include "coreutil.h" +#if !defined(_IRR_WINDOWS_CE_PLATFORM_) +#include "errno.h" +#endif + +namespace irr +{ +namespace io +{ + +//! Constructor +CArchiveLoaderTAR::CArchiveLoaderTAR(io::IFileSystem* fs) +: FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("CArchiveLoaderTAR"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderTAR::isALoadableFileFormat(const io::path& filename) const +{ + return core::hasFileExtension(filename, "tar"); +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderTAR::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return fileType == EFAT_TAR; +} + +//! Creates an archive from the filename +/** \param file File handle to check. +\return Pointer to newly created archive, or 0 upon error. */ +IFileArchive* CArchiveLoaderTAR::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + archive = createArchive(file, ignoreCase, ignorePaths); + file->drop(); + } + + return archive; +} + + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderTAR::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + if (file) + { + file->seek(0); + archive = new CTarReader(file, ignoreCase, ignorePaths); + } + return archive; +} + +//! Check if the file might be loaded by this class +/** Check might look into the file. +\param file File handle to check. +\return True if file seems to be loadable. */ +bool CArchiveLoaderTAR::isALoadableFileFormat(io::IReadFile* file) const +{ + // TAR files consist of blocks of 512 bytes + // if it isn't a multiple of 512 then it's not a TAR file. + if (file->getSize() % 512) + return false; + + file->seek(0); + + // read header of first file + STarHeader fHead; + file->read(&fHead, sizeof(STarHeader)); + + u32 checksum = 0; + sscanf(fHead.Checksum, "%o", &checksum); + + // verify checksum + + // some old TAR writers assume that chars are signed, others assume unsigned + // USTAR archives have a longer header, old TAR archives end after linkname + + u32 checksum1=0; + s32 checksum2=0; + + // remember to blank the checksum field! + memset(fHead.Checksum, ' ', 8); + + // old header + for (u8* p = (u8*)(&fHead); p < (u8*)(&fHead.Magic[0]); ++p) + { + checksum1 += *p; + checksum2 += c8(*p); + } + + if (!strncmp(fHead.Magic, "ustar", 5)) + { + for (u8* p = (u8*)(&fHead.Magic[0]); p < (u8*)(&fHead) + sizeof(fHead); ++p) + { + checksum1 += *p; + checksum2 += c8(*p); + } + } + return checksum1 == checksum || checksum2 == (s32)checksum; +} + +/* + TAR Archive +*/ +CTarReader::CTarReader(IReadFile* file, bool ignoreCase, bool ignorePaths) + : CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file) +{ + #ifdef _DEBUG + setDebugName("CTarReader"); + #endif + + if (File) + { + File->grab(); + + // fill the file list + populateFileList(); + + sort(); + } +} + + +CTarReader::~CTarReader() +{ + if (File) + File->drop(); +} + +const IFileList* CTarReader::getFileList() const +{ + return this; +} + + +u32 CTarReader::populateFileList() +{ + STarHeader fHead; + Files.clear(); + + u32 pos = 0; + while ( s32(pos + sizeof(STarHeader)) < File->getSize()) + { + // seek to next file header + File->seek(pos); + + // read the header + File->read(&fHead, sizeof(fHead)); + + // only add standard files for now + if (fHead.Link == ETLI_REGULAR_FILE || ETLI_REGULAR_FILE_OLD) + { + io::path fullPath = ""; + fullPath.reserve(255); + + // USTAR archives have a filename prefix + // may not be null terminated, copy carefully! + if (!strncmp(fHead.Magic, "ustar", 5)) + { + c8* np = fHead.FileNamePrefix; + while(*np && (np - fHead.FileNamePrefix) < 155) + fullPath.append(*np); + np++; + } + + // append the file name + c8* np = fHead.FileName; + while(*np && (np - fHead.FileName) < 100) + { + fullPath.append(*np); + np++; + } + + // get size + core::stringc sSize = ""; + sSize.reserve(12); + np = fHead.Size; + while(*np && (np - fHead.Size) < 12) + { + sSize.append(*np); + np++; + } + + u32 size = strtoul(sSize.c_str(), NULL, 8); +#if !defined(_IRR_WINDOWS_CE_PLATFORM_) + if (errno == ERANGE) + os::Printer::log("File too large", fullPath, ELL_WARNING); +#endif + + // save start position + u32 offset = pos + 512; + + // move to next file header block + pos = offset + (size / 512) * 512 + ((size % 512) ? 512 : 0); + + // add file to list + addItem(fullPath, offset, size, false ); + } + else + { + // todo: ETLI_DIRECTORY, ETLI_LINK_TO_ARCHIVED_FILE + + // move to next block + pos += 512; + } + + } + + return Files.size(); +} + +//! opens a file by file name +IReadFile* CTarReader::createAndOpenFile(const io::path& filename) +{ + const s32 index = findFile(filename, false); + + if (index != -1) + return createAndOpenFile(index); + + return 0; +} + +//! opens a file by index +IReadFile* CTarReader::createAndOpenFile(u32 index) +{ + if (index >= Files.size() ) + return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); +} + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.h new file mode 100644 index 0000000..e2e59c7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTarReader.h @@ -0,0 +1,133 @@ +// Copyright (C) 2009-2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_TAR_READER_H_INCLUDED__ +#define __C_TAR_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ + +#include "IReferenceCounted.h" +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "CFileList.h" + +namespace irr +{ +namespace io +{ + + enum E_TAR_LINK_INDICATOR + { + ETLI_REGULAR_FILE_OLD = 0 , + ETLI_REGULAR_FILE = '0', + ETLI_LINK_TO_ARCHIVED_FILE = '1', // Hard link + ETLI_SYMBOLIC_LINK = '2', + ETLI_CHAR_SPECIAL_DEVICE = '3', + ETLI_BLOCK_SPECIAL_DEVICE = '4', + ETLI_DIRECTORY = '5', + ETLI_FIFO_SPECIAL_FILE = '6', + ETLI_CONTIGUOUS_FILE = '7' + }; + +// byte-align structures +#include "irrpack.h" + + struct STarHeader + { + c8 FileName[100]; + c8 FileMode[8]; + c8 UserID[8]; + c8 GroupID[8]; + c8 Size[12]; + c8 ModifiedTime[12]; + c8 Checksum[8]; + c8 Link; + c8 LinkName[100]; + c8 Magic[6]; + c8 USTARVersion[2]; + c8 UserName[32]; + c8 GroupName[32]; + c8 DeviceMajor[8]; + c8 DeviceMinor[8]; + c8 FileNamePrefix[155]; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + //! Archiveloader capable of loading ZIP Archives + class CArchiveLoaderTAR : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderTAR(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".tar") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + private: + io::IFileSystem* FileSystem; + }; + + + + class CTarReader : public virtual IFileArchive, virtual CFileList + { + public: + + CTarReader(IReadFile* file, bool ignoreCase, bool ignorePaths); + + virtual ~CTarReader(); + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the class Type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_TAR; } + + private: + + u32 populateFileList(); + + IReadFile* File; + }; + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#endif // __C_TAR_READER_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.cpp new file mode 100644 index 0000000..35e9211 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.cpp @@ -0,0 +1,1502 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// The code for the TerrainSceneNode is based on the GeoMipMapSceneNode +// developed by Spintz. He made it available for Irrlicht and allowed it to be +// distributed under this licence. I only modified some parts. A lot of thanks +// go to him. + +#include "CTerrainSceneNode.h" +#include "CTerrainTriangleSelector.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "ICameraSceneNode.h" +#include "SViewFrustum.h" +#include "irrMath.h" +#include "os.h" +#include "IGUIFont.h" +#include "IFileSystem.h" +#include "IReadFile.h" +#include "ITextSceneNode.h" +#include "IAnimatedMesh.h" +#include "SMesh.h" +#include "CDynamicMeshBuffer.h" + +namespace irr +{ +namespace scene +{ + + //! constructor + CTerrainSceneNode::CTerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, + io::IFileSystem* fs, s32 id, s32 maxLOD, E_TERRAIN_PATCH_SIZE patchSize, + const core::vector3df& position, + const core::vector3df& rotation, + const core::vector3df& scale) + : ITerrainSceneNode(parent, mgr, id, position, rotation, scale), + TerrainData(patchSize, maxLOD, position, rotation, scale), RenderBuffer(0), + VerticesToRender(0), IndicesToRender(0), DynamicSelectorUpdate(false), + OverrideDistanceThreshold(false), UseDefaultRotationPivot(true), ForceRecalculation(true), + CameraMovementDelta(10.0f), CameraRotationDelta(1.0f),CameraFOVDelta(0.1f), + TCoordScale1(1.0f), TCoordScale2(1.0f), SmoothFactor(0), FileSystem(fs) + { + #ifdef _DEBUG + setDebugName("CTerrainSceneNode"); + #endif + + Mesh = new SMesh(); + RenderBuffer = new CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT); + RenderBuffer->setHardwareMappingHint(scene::EHM_STATIC, scene::EBT_VERTEX); + RenderBuffer->setHardwareMappingHint(scene::EHM_DYNAMIC, scene::EBT_INDEX); + + if (FileSystem) + FileSystem->grab(); + + setAutomaticCulling(scene::EAC_OFF); + } + + + //! destructor + CTerrainSceneNode::~CTerrainSceneNode() + { + delete [] TerrainData.Patches; + + if (FileSystem) + FileSystem->drop(); + + if (Mesh) + Mesh->drop(); + + if (RenderBuffer) + RenderBuffer->drop(); + } + + + //! Initializes the terrain data. Loads the vertices from the heightMapFile + bool CTerrainSceneNode::loadHeightMap(io::IReadFile* file, video::SColor vertexColor, + s32 smoothFactor) + { + if (!file) + return false; + + Mesh->MeshBuffers.clear(); + const u32 startTime = os::Timer::getRealTime(); + video::IImage* heightMap = SceneManager->getVideoDriver()->createImageFromFile(file); + + if (!heightMap) + { + os::Printer::log("Unable to load heightmap."); + return false; + } + + HeightmapFile = file->getFileName(); + SmoothFactor = smoothFactor; + + // Get the dimension of the heightmap data + TerrainData.Size = heightMap->getDimension().Width; + + switch (TerrainData.PatchSize) + { + case ETPS_9: + if (TerrainData.MaxLOD > 3) + { + TerrainData.MaxLOD = 3; + } + break; + case ETPS_17: + if (TerrainData.MaxLOD > 4) + { + TerrainData.MaxLOD = 4; + } + break; + case ETPS_33: + if (TerrainData.MaxLOD > 5) + { + TerrainData.MaxLOD = 5; + } + break; + case ETPS_65: + if (TerrainData.MaxLOD > 6) + { + TerrainData.MaxLOD = 6; + } + break; + case ETPS_129: + if (TerrainData.MaxLOD > 7) + { + TerrainData.MaxLOD = 7; + } + break; + } + + // --- Generate vertex data from heightmap ---- + // resize the vertex array for the mesh buffer one time (makes loading faster) + scene::CDynamicMeshBuffer *mb=0; + + const u32 numVertices = TerrainData.Size * TerrainData.Size; + if (numVertices <= 65536) + { + //small enough for 16bit buffers + mb=new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT); + RenderBuffer->getIndexBuffer().setType(video::EIT_16BIT); + } + else + { + //we need 32bit buffers + mb=new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_32BIT); + RenderBuffer->getIndexBuffer().setType(video::EIT_32BIT); + } + + mb->getVertexBuffer().set_used(numVertices); + + // Read the heightmap to get the vertex data + // Apply positions changes, scaling changes + const f32 tdSize = 1.0f/(f32)(TerrainData.Size-1); + s32 index = 0; + float fx=0.f; + float fx2=0.f; + for (s32 x = 0; x < TerrainData.Size; ++x) + { + float fz=0.f; + float fz2=0.f; + for (s32 z = 0; z < TerrainData.Size; ++z) + { + video::S3DVertex2TCoords& vertex= static_cast<video::S3DVertex2TCoords*>(mb->getVertexBuffer().pointer())[index++]; + vertex.Normal.set(0.0f, 1.0f, 0.0f); + vertex.Color = vertexColor; + vertex.Pos.X = fx; + vertex.Pos.Y = (f32) heightMap->getPixel(TerrainData.Size-x-1,z).getLightness(); + vertex.Pos.Z = fz; + + vertex.TCoords.X = vertex.TCoords2.X = 1.f-fx2; + vertex.TCoords.Y = vertex.TCoords2.Y = fz2; + + ++fz; + fz2 += tdSize; + } + ++fx; + fx2 += tdSize; + } + + // drop heightMap, no longer needed + heightMap->drop(); + + smoothTerrain(mb, smoothFactor); + + // calculate smooth normals for the vertices + calculateNormals(mb); + + // add the MeshBuffer to the mesh + Mesh->addMeshBuffer(mb); + + // We copy the data to the renderBuffer, after the normals have been calculated. + RenderBuffer->getVertexBuffer().set_used(numVertices); + + for (u32 i = 0; i < numVertices; ++i) + { + RenderBuffer->getVertexBuffer()[i] = mb->getVertexBuffer()[i]; + RenderBuffer->getVertexBuffer()[i].Pos *= TerrainData.Scale; + RenderBuffer->getVertexBuffer()[i].Pos += TerrainData.Position; + } + + // We no longer need the mb + mb->drop(); + + // calculate all the necessary data for the patches and the terrain + calculateDistanceThresholds(); + createPatches(); + calculatePatchData(); + + // set the default rotation pivot point to the terrain nodes center + TerrainData.RotationPivot = TerrainData.Center; + + // Rotate the vertices of the terrain by the rotation + // specified. Must be done after calculating the terrain data, + // so we know what the current center of the terrain is. + setRotation(TerrainData.Rotation); + + // Pre-allocate memory for indices + + RenderBuffer->getIndexBuffer().set_used( + TerrainData.PatchCount * TerrainData.PatchCount * + TerrainData.CalcPatchSize * TerrainData.CalcPatchSize * 6); + + RenderBuffer->setDirty(); + + const u32 endTime = os::Timer::getRealTime(); + + c8 tmp[255]; + snprintf(tmp, 255, "Generated terrain data (%dx%d) in %.4f seconds", + TerrainData.Size, TerrainData.Size, (endTime - startTime) / 1000.0f ); + os::Printer::log(tmp); + + return true; + } + + + //! Initializes the terrain data. Loads the vertices from the heightMapFile + bool CTerrainSceneNode::loadHeightMapRAW(io::IReadFile* file, + s32 bitsPerPixel, bool signedData, bool floatVals, + s32 width, video::SColor vertexColor, s32 smoothFactor) + { + if (!file) + return false; + if (floatVals && bitsPerPixel != 32) + return false; + + // start reading + const u32 startTime = os::Timer::getTime(); + + Mesh->MeshBuffers.clear(); + + const s32 bytesPerPixel = bitsPerPixel / 8; + + // Get the dimension of the heightmap data + const s32 filesize = file->getSize(); + if (!width) + TerrainData.Size = core::floor32(sqrtf((f32)(filesize / bytesPerPixel))); + else + { + if ((filesize-file->getPos())/bytesPerPixel>width*width) + { + os::Printer::log("Error reading heightmap RAW file", "File is too small."); + return false; + } + TerrainData.Size = width; + } + + switch (TerrainData.PatchSize) + { + case ETPS_9: + if (TerrainData.MaxLOD > 3) + { + TerrainData.MaxLOD = 3; + } + break; + case ETPS_17: + if (TerrainData.MaxLOD > 4) + { + TerrainData.MaxLOD = 4; + } + break; + case ETPS_33: + if (TerrainData.MaxLOD > 5) + { + TerrainData.MaxLOD = 5; + } + break; + case ETPS_65: + if (TerrainData.MaxLOD > 6) + { + TerrainData.MaxLOD = 6; + } + break; + case ETPS_129: + if (TerrainData.MaxLOD > 7) + { + TerrainData.MaxLOD = 7; + } + break; + } + + // --- Generate vertex data from heightmap ---- + // resize the vertex array for the mesh buffer one time (makes loading faster) + scene::CDynamicMeshBuffer *mb=0; + const u32 numVertices = TerrainData.Size * TerrainData.Size; + if (numVertices <= 65536) + { + //small enough for 16bit buffers + mb=new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_16BIT); + RenderBuffer->getIndexBuffer().setType(video::EIT_16BIT); + } + else + { + //we need 32bit buffers + mb=new scene::CDynamicMeshBuffer(video::EVT_2TCOORDS, video::EIT_32BIT); + RenderBuffer->getIndexBuffer().setType(video::EIT_32BIT); + } + + mb->getVertexBuffer().reallocate(numVertices); + + video::S3DVertex2TCoords vertex; + vertex.Normal.set(0.0f, 1.0f, 0.0f); + vertex.Color = vertexColor; + + // Read the heightmap to get the vertex data + // Apply positions changes, scaling changes + const f32 tdSize = 1.0f/(f32)(TerrainData.Size-1); + float fx=0.f; + float fx2=0.f; + for (s32 x = 0; x < TerrainData.Size; ++x) + { + float fz=0.f; + float fz2=0.f; + for (s32 z = 0; z < TerrainData.Size; ++z) + { + bool failure=false; + vertex.Pos.X = fx; + if (floatVals) + { + if (file->read(&vertex.Pos.Y, bytesPerPixel) != bytesPerPixel) + failure=true; + } + else if (signedData) + { + switch (bytesPerPixel) + { + case 1: + { + s8 val; + if (file->read(&val, bytesPerPixel) != bytesPerPixel) + failure=true; + vertex.Pos.Y=val; + } + break; + case 2: + { + s16 val; + if (file->read(&val, bytesPerPixel) != bytesPerPixel) + failure=true; + vertex.Pos.Y=val/256.f; + } + break; + case 4: + { + s32 val; + if (file->read(&val, bytesPerPixel) != bytesPerPixel) + failure=true; + vertex.Pos.Y=val/16777216.f; + } + break; + } + } + else + { + switch (bytesPerPixel) + { + case 1: + { + u8 val; + if (file->read(&val, bytesPerPixel) != bytesPerPixel) + failure=true; + vertex.Pos.Y=val; + } + break; + case 2: + { + u16 val; + if (file->read(&val, bytesPerPixel) != bytesPerPixel) + failure=true; + vertex.Pos.Y=val/256.f; + } + break; + case 4: + { + u32 val; + if (file->read(&val, bytesPerPixel) != bytesPerPixel) + failure=true; + vertex.Pos.Y=val/16777216.f; + } + break; + } + } + if (failure) + { + os::Printer::log("Error reading heightmap RAW file."); + mb->drop(); + return false; + } + vertex.Pos.Z = fz; + + vertex.TCoords.X = vertex.TCoords2.X = 1.f-fx2; + vertex.TCoords.Y = vertex.TCoords2.Y = fz2; + + mb->getVertexBuffer().push_back(vertex); + ++fz; + fz2 += tdSize; + } + ++fx; + fx2 += tdSize; + } + + smoothTerrain(mb, smoothFactor); + + // calculate smooth normals for the vertices + calculateNormals(mb); + + // add the MeshBuffer to the mesh + Mesh->addMeshBuffer(mb); + const u32 vertexCount = mb->getVertexCount(); + + // We copy the data to the renderBuffer, after the normals have been calculated. + RenderBuffer->getVertexBuffer().set_used(vertexCount); + + for (u32 i = 0; i < vertexCount; i++) + { + RenderBuffer->getVertexBuffer()[i] = mb->getVertexBuffer()[i]; + RenderBuffer->getVertexBuffer()[i].Pos *= TerrainData.Scale; + RenderBuffer->getVertexBuffer()[i].Pos += TerrainData.Position; + } + + // We no longer need the mb + mb->drop(); + + // calculate all the necessary data for the patches and the terrain + calculateDistanceThresholds(); + createPatches(); + calculatePatchData(); + + // set the default rotation pivot point to the terrain nodes center + TerrainData.RotationPivot = TerrainData.Center; + + // Rotate the vertices of the terrain by the rotation specified. Must be done + // after calculating the terrain data, so we know what the current center of the + // terrain is. + setRotation(TerrainData.Rotation); + + // Pre-allocate memory for indices + RenderBuffer->getIndexBuffer().set_used( + TerrainData.PatchCount*TerrainData.PatchCount* + TerrainData.CalcPatchSize*TerrainData.CalcPatchSize*6); + + const u32 endTime = os::Timer::getTime(); + + c8 tmp[255]; + snprintf(tmp, 255, "Generated terrain data (%dx%d) in %.4f seconds", + TerrainData.Size, TerrainData.Size, (endTime - startTime) / 1000.0f); + os::Printer::log(tmp); + + return true; + } + + + //! Returns the mesh + IMesh* CTerrainSceneNode::getMesh() { return Mesh; } + + + //! Returns the material based on the zero based index i. + video::SMaterial& CTerrainSceneNode::getMaterial(u32 i) + { + return Mesh->getMeshBuffer(i)->getMaterial(); + } + + + //! Returns amount of materials used by this scene node ( always 1 ) + u32 CTerrainSceneNode::getMaterialCount() const + { + return Mesh->getMeshBufferCount(); + } + + + //! Sets the scale of the scene node. + //! \param scale: New scale of the node + void CTerrainSceneNode::setScale(const core::vector3df& scale) + { + TerrainData.Scale = scale; + applyTransformation(); + calculateNormals(RenderBuffer); + ForceRecalculation = true; + } + + + //! Sets the rotation of the node. This only modifies + //! the relative rotation of the node. + //! \param rotation: New rotation of the node in degrees. + void CTerrainSceneNode::setRotation(const core::vector3df& rotation) + { + TerrainData.Rotation = rotation; + applyTransformation(); + ForceRecalculation = true; + } + + + //! Sets the pivot point for rotation of this node. This is useful for the TiledTerrainManager to + //! rotate all terrain tiles around a global world point. + //! NOTE: The default for the RotationPivot will be the center of the individual tile. + void CTerrainSceneNode::setRotationPivot(const core::vector3df& pivot) + { + UseDefaultRotationPivot = false; + TerrainData.RotationPivot = pivot; + } + + + //! Sets the position of the node. + //! \param newpos: New postition of the scene node. + void CTerrainSceneNode::setPosition(const core::vector3df& newpos) + { + TerrainData.Position = newpos; + applyTransformation(); + ForceRecalculation = true; + } + + + //! Apply transformation changes(scale, position, rotation) + void CTerrainSceneNode::applyTransformation() + { + if (!Mesh->getMeshBufferCount()) + return; + + core::matrix4 rotMatrix; + rotMatrix.setRotationDegrees(TerrainData.Rotation); + + const s32 vtxCount = Mesh->getMeshBuffer(0)->getVertexCount(); + for (s32 i = 0; i < vtxCount; ++i) + { + RenderBuffer->getVertexBuffer()[i].Pos = Mesh->getMeshBuffer(0)->getPosition(i) * TerrainData.Scale + TerrainData.Position; + + RenderBuffer->getVertexBuffer()[i].Pos -= TerrainData.RotationPivot; + rotMatrix.inverseRotateVect(RenderBuffer->getVertexBuffer()[i].Pos); + RenderBuffer->getVertexBuffer()[i].Pos += TerrainData.RotationPivot; + } + + calculateDistanceThresholds(true); + calculatePatchData(); + + RenderBuffer->setDirty(EBT_VERTEX); + } + + + //! Updates the scene nodes indices if the camera has moved or rotated by a certain + //! threshold, which can be changed using the SetCameraMovementDeltaThreshold and + //! SetCameraRotationDeltaThreshold functions. This also determines if a given patch + //! for the scene node is within the view frustum and if it's not the indices are not + //! generated for that patch. + void CTerrainSceneNode::OnRegisterSceneNode() + { + if (!IsVisible || !SceneManager->getActiveCamera()) + return; + + SceneManager->registerNodeForRendering(this); + + preRenderCalculationsIfNeeded(); + + // Do Not call ISceneNode::OnRegisterSceneNode(), this node should have no children (luke: is this comment still true, as ISceneNode::OnRegisterSceneNode() is called?) + + ISceneNode::OnRegisterSceneNode(); + ForceRecalculation = false; + } + + void CTerrainSceneNode::preRenderCalculationsIfNeeded() + { + scene::ICameraSceneNode * camera = SceneManager->getActiveCamera(); + if (!camera) + return; + + // Determine the camera rotation, based on the camera direction. + const core::vector3df cameraPosition = camera->getAbsolutePosition(); + const core::vector3df cameraRotation = core::line3d<f32>(cameraPosition, camera->getTarget()).getVector().getHorizontalAngle(); + core::vector3df cameraUp = camera->getUpVector(); + cameraUp.normalize(); + const f32 CameraFOV = SceneManager->getActiveCamera()->getFOV(); + + // Only check on the Camera's Y Rotation + if (!ForceRecalculation) + { + if ((fabsf(cameraRotation.X - OldCameraRotation.X) < CameraRotationDelta) && + (fabsf(cameraRotation.Y - OldCameraRotation.Y) < CameraRotationDelta)) + { + if ((fabs(cameraPosition.X - OldCameraPosition.X) < CameraMovementDelta) && + (fabs(cameraPosition.Y - OldCameraPosition.Y) < CameraMovementDelta) && + (fabs(cameraPosition.Z - OldCameraPosition.Z) < CameraMovementDelta)) + { + if (fabs(CameraFOV-OldCameraFOV) < CameraFOVDelta && + cameraUp.dotProduct(OldCameraUp) > (1.f - (cos(core::DEGTORAD * CameraRotationDelta)))) + { + return; + } + } + } + } + + //we need to redo calculations... + + OldCameraPosition = cameraPosition; + OldCameraRotation = cameraRotation; + OldCameraUp = cameraUp; + OldCameraFOV = CameraFOV; + + preRenderLODCalculations(); + preRenderIndicesCalculations(); + } + + void CTerrainSceneNode::preRenderLODCalculations() + { + scene::ICameraSceneNode * camera = SceneManager->getActiveCamera(); + + if (!camera) + return; + + const core::vector3df cameraPosition = camera->getAbsolutePosition(); + + const SViewFrustum* frustum = camera->getViewFrustum(); + + // Determine each patches LOD based on distance from camera (and whether or not they are in + // the view frustum). + const s32 count = TerrainData.PatchCount * TerrainData.PatchCount; + for (s32 j = 0; j < count; ++j) + { + if (frustum->getBoundingBox().intersectsWithBox(TerrainData.Patches[j].BoundingBox)) + { + const f32 distance = cameraPosition.getDistanceFromSQ(TerrainData.Patches[j].Center); + + TerrainData.Patches[j].CurrentLOD = 0; + for (s32 i = TerrainData.MaxLOD - 1; i>0; --i) + { + if (distance >= TerrainData.LODDistanceThreshold[i]) + { + TerrainData.Patches[j].CurrentLOD = i; + break; + } + } + } + else + { + TerrainData.Patches[j].CurrentLOD = -1; + } + } + } + + + void CTerrainSceneNode::preRenderIndicesCalculations() + { + scene::IIndexBuffer& indexBuffer = RenderBuffer->getIndexBuffer(); + IndicesToRender = 0; + indexBuffer.set_used(0); + + s32 index = 0; + // Then generate the indices for all patches that are visible. + for (s32 i = 0; i < TerrainData.PatchCount; ++i) + { + for (s32 j = 0; j < TerrainData.PatchCount; ++j) + { + if (TerrainData.Patches[index].CurrentLOD >= 0) + { + s32 x = 0; + s32 z = 0; + + // calculate the step we take this patch, based on the patches current LOD + const s32 step = 1 << TerrainData.Patches[index].CurrentLOD; + + // Loop through patch and generate indices + while (z < TerrainData.CalcPatchSize) + { + const s32 index11 = getIndex(j, i, index, x, z); + const s32 index21 = getIndex(j, i, index, x + step, z); + const s32 index12 = getIndex(j, i, index, x, z + step); + const s32 index22 = getIndex(j, i, index, x + step, z + step); + + indexBuffer.push_back(index12); + indexBuffer.push_back(index11); + indexBuffer.push_back(index22); + indexBuffer.push_back(index22); + indexBuffer.push_back(index11); + indexBuffer.push_back(index21); + IndicesToRender+=6; + + // increment index position horizontally + x += step; + + // we've hit an edge + if (x >= TerrainData.CalcPatchSize) + { + x = 0; + z += step; + } + } + } + ++index; + } + } + + RenderBuffer->setDirty(EBT_INDEX); + + if (DynamicSelectorUpdate && TriangleSelector) + { + CTerrainTriangleSelector* selector = (CTerrainTriangleSelector*)TriangleSelector; + selector->setTriangleData(this, -1); + } + } + + + //! Render the scene node + void CTerrainSceneNode::render() + { + if (!IsVisible || !SceneManager->getActiveCamera()) + return; + + if (!Mesh->getMeshBufferCount()) + return; + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + driver->setTransform (video::ETS_WORLD, core::IdentityMatrix); + driver->setMaterial(Mesh->getMeshBuffer(0)->getMaterial()); + + RenderBuffer->getIndexBuffer().set_used(IndicesToRender); + + // For use with geomorphing + driver->drawMeshBuffer(RenderBuffer); + + RenderBuffer->getIndexBuffer().set_used(RenderBuffer->getIndexBuffer().allocated_size()); + + // for debug purposes only: + if (DebugDataVisible) + { + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + if (DebugDataVisible & scene::EDS_BBOX) + driver->draw3DBox(TerrainData.BoundingBox, video::SColor(255,255,255,255)); + + const s32 count = TerrainData.PatchCount * TerrainData.PatchCount; + s32 visible = 0; + if (DebugDataVisible & scene::EDS_BBOX_BUFFERS) + { + for (s32 j = 0; j < count; ++j) + { + driver->draw3DBox(TerrainData.Patches[j].BoundingBox, video::SColor(255,255,0,0)); + visible += (TerrainData.Patches[j].CurrentLOD >= 0); + } + } + + if (DebugDataVisible & scene::EDS_NORMALS) + { + // draw normals + const f32 debugNormalLength = SceneManager->getParameters()->getAttributeAsFloat(DEBUG_NORMAL_LENGTH); + const video::SColor debugNormalColor = SceneManager->getParameters()->getAttributeAsColor(DEBUG_NORMAL_COLOR); + driver->drawMeshBufferNormals(RenderBuffer, debugNormalLength, debugNormalColor); + } + + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + static u32 lastTime = 0; + + const u32 now = os::Timer::getRealTime(); + if (now - lastTime > 1000) + { + char buf[64]; + snprintf(buf, 64, "Count: %d, Visible: %d", count, visible); + os::Printer::log(buf); + + lastTime = now; + } + } + } + + + //! Return the bounding box of the entire terrain. + const core::aabbox3d<f32>& CTerrainSceneNode::getBoundingBox() const + { + return TerrainData.BoundingBox; + } + + + //! Return the bounding box of a patch + const core::aabbox3d<f32>& CTerrainSceneNode::getBoundingBox(s32 patchX, s32 patchZ) const + { + return TerrainData.Patches[patchX * TerrainData.PatchCount + patchZ].BoundingBox; + } + + + //! Gets the meshbuffer data based on a specified Level of Detail. + //! \param mb: A reference to an SMeshBuffer object + //! \param LOD: The Level Of Detail you want the indices from. + void CTerrainSceneNode::getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD ) const + { + if (!Mesh->getMeshBufferCount()) + return; + + LOD = core::clamp(LOD, 0, TerrainData.MaxLOD - 1); + + const u32 numVertices = Mesh->getMeshBuffer(0)->getVertexCount(); + mb.getVertexBuffer().reallocate(numVertices); + video::S3DVertex2TCoords* vertices = (video::S3DVertex2TCoords*)Mesh->getMeshBuffer(0)->getVertices(); + + for (u32 n=0; n<numVertices; ++n) + mb.getVertexBuffer().push_back(vertices[n]); + + mb.getIndexBuffer().setType(RenderBuffer->getIndexBuffer().getType()); + + // calculate the step we take for all patches, since LOD is the same + const s32 step = 1 << LOD; + + // Generate the indices for all patches at the specified LOD + s32 index = 0; + for (s32 i=0; i<TerrainData.PatchCount; ++i) + { + for (s32 j=0; j<TerrainData.PatchCount; ++j) + { + s32 x = 0; + s32 z = 0; + + // Loop through patch and generate indices + while (z < TerrainData.CalcPatchSize) + { + const s32 index11 = getIndex(j, i, index, x, z); + const s32 index21 = getIndex(j, i, index, x + step, z); + const s32 index12 = getIndex(j, i, index, x, z + step); + const s32 index22 = getIndex(j, i, index, x + step, z + step); + + mb.getIndexBuffer().push_back(index12); + mb.getIndexBuffer().push_back(index11); + mb.getIndexBuffer().push_back(index22); + mb.getIndexBuffer().push_back(index22); + mb.getIndexBuffer().push_back(index11); + mb.getIndexBuffer().push_back(index21); + + // increment index position horizontally + x += step; + + if (x >= TerrainData.CalcPatchSize) // we've hit an edge + { + x = 0; + z += step; + } + } + ++index; + } + } + } + + + //! Gets the indices for a specified patch at a specified Level of Detail. + //! \param mb: A reference to an array of u32 indices. + //! \param patchX: Patch x coordinate. + //! \param patchZ: Patch z coordinate. + //! \param LOD: The level of detail to get for that patch. If -1, then get + //! the CurrentLOD. If the CurrentLOD is set to -1, meaning it's not shown, + //! then it will retrieve the triangles at the highest LOD (0). + //! \return: Number if indices put into the buffer. + s32 CTerrainSceneNode::getIndicesForPatch(core::array<u32>& indices, s32 patchX, s32 patchZ, s32 LOD) + { + if (patchX < 0 || patchX > TerrainData.PatchCount-1 || + patchZ < 0 || patchZ > TerrainData.PatchCount-1) + return -1; + + if (LOD < -1 || LOD > TerrainData.MaxLOD - 1) + return -1; + + core::array<s32> cLODs; + bool setLODs = false; + + // If LOD of -1 was passed in, use the CurrentLOD of the patch specified + if (LOD == -1) + { + LOD = TerrainData.Patches[patchX * TerrainData.PatchCount + patchZ].CurrentLOD; + } + else + { + getCurrentLODOfPatches(cLODs); + setCurrentLODOfPatches(LOD); + setLODs = true; + } + + if (LOD < 0) + return -2; // Patch not visible, don't generate indices. + + // calculate the step we take for this LOD + const s32 step = 1 << LOD; + + // Generate the indices for the specified patch at the specified LOD + const s32 index = patchX * TerrainData.PatchCount + patchZ; + + s32 x = 0; + s32 z = 0; + + indices.set_used(TerrainData.PatchSize * TerrainData.PatchSize * 6); + + // Loop through patch and generate indices + s32 rv=0; + while (z<TerrainData.CalcPatchSize) + { + const s32 index11 = getIndex(patchZ, patchX, index, x, z); + const s32 index21 = getIndex(patchZ, patchX, index, x + step, z); + const s32 index12 = getIndex(patchZ, patchX, index, x, z + step); + const s32 index22 = getIndex(patchZ, patchX, index, x + step, z + step); + + indices[rv++] = index12; + indices[rv++] = index11; + indices[rv++] = index22; + indices[rv++] = index22; + indices[rv++] = index11; + indices[rv++] = index21; + + // increment index position horizontally + x += step; + + if (x >= TerrainData.CalcPatchSize) // we've hit an edge + { + x = 0; + z += step; + } + } + + if (setLODs) + setCurrentLODOfPatches(cLODs); + + return rv; + } + + + //! Populates an array with the CurrentLOD of each patch. + //! \param LODs: A reference to a core::array<s32> to hold the values + //! \return Returns the number of elements in the array + s32 CTerrainSceneNode::getCurrentLODOfPatches(core::array<s32>& LODs) const + { + s32 numLODs; + LODs.clear(); + + const s32 count = TerrainData.PatchCount * TerrainData.PatchCount; + for (numLODs = 0; numLODs < count; numLODs++) + LODs.push_back(TerrainData.Patches[numLODs].CurrentLOD); + + return LODs.size(); + } + + + //! Manually sets the LOD of a patch + //! \param patchX: Patch x coordinate. + //! \param patchZ: Patch z coordinate. + //! \param LOD: The level of detail to set the patch to. + void CTerrainSceneNode::setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD) + { + TerrainData.Patches[patchX * TerrainData.PatchCount + patchZ].CurrentLOD = LOD; + } + + + //! Override the default generation of distance thresholds for determining the LOD a patch + //! is rendered at. + bool CTerrainSceneNode::overrideLODDistance(s32 LOD, f64 newDistance) + { + OverrideDistanceThreshold = true; + + if (LOD < 0 || LOD > TerrainData.MaxLOD - 1) + return false; + + TerrainData.LODDistanceThreshold[LOD] = newDistance * newDistance; + + return true; + } + + + //! Creates a planar texture mapping on the terrain + //! \param resolution: resolution of the planar mapping. This is the value + //! specifying the relation between world space and texture coordinate space. + void CTerrainSceneNode::scaleTexture(f32 resolution, f32 resolution2) + { + TCoordScale1 = resolution; + TCoordScale2 = resolution2; + + const f32 resBySize = resolution / (f32)(TerrainData.Size-1); + const f32 res2BySize = resolution2 / (f32)(TerrainData.Size-1); + u32 index = 0; + f32 xval = 0.f; + f32 x2val = 0.f; + for (s32 x=0; x<TerrainData.Size; ++x) + { + f32 zval=0.f; + f32 z2val=0.f; + for (s32 z=0; z<TerrainData.Size; ++z) + { + RenderBuffer->getVertexBuffer()[index].TCoords.X = 1.f-xval; + RenderBuffer->getVertexBuffer()[index].TCoords.Y = zval; + + if (RenderBuffer->getVertexType()==video::EVT_2TCOORDS) + { + if (resolution2 == 0) + { + ((video::S3DVertex2TCoords&)RenderBuffer->getVertexBuffer()[index]).TCoords2 = RenderBuffer->getVertexBuffer()[index].TCoords; + } + else + { + ((video::S3DVertex2TCoords&)RenderBuffer->getVertexBuffer()[index]).TCoords2.X = 1.f-x2val; + ((video::S3DVertex2TCoords&)RenderBuffer->getVertexBuffer()[index]).TCoords2.Y = z2val; + } + } + + ++index; + zval += resBySize; + z2val += res2BySize; + } + xval += resBySize; + x2val += res2BySize; + } + + RenderBuffer->setDirty(EBT_VERTEX); + } + + + //! used to get the indices when generating index data for patches at varying levels of detail. + u32 CTerrainSceneNode::getIndex(const s32 PatchX, const s32 PatchZ, + const s32 PatchIndex, u32 vX, u32 vZ) const + { + // top border + if (vZ == 0) + { + if (TerrainData.Patches[PatchIndex].Top && + TerrainData.Patches[PatchIndex].CurrentLOD < TerrainData.Patches[PatchIndex].Top->CurrentLOD && + (vX % (1 << TerrainData.Patches[PatchIndex].Top->CurrentLOD)) != 0 ) + { + vX -= vX % (1 << TerrainData.Patches[PatchIndex].Top->CurrentLOD); + } + } + else + if (vZ == (u32)TerrainData.CalcPatchSize) // bottom border + { + if (TerrainData.Patches[PatchIndex].Bottom && + TerrainData.Patches[PatchIndex].CurrentLOD < TerrainData.Patches[PatchIndex].Bottom->CurrentLOD && + (vX % (1 << TerrainData.Patches[PatchIndex].Bottom->CurrentLOD)) != 0) + { + vX -= vX % (1 << TerrainData.Patches[PatchIndex].Bottom->CurrentLOD); + } + } + + // left border + if (vX == 0) + { + if (TerrainData.Patches[PatchIndex].Left && + TerrainData.Patches[PatchIndex].CurrentLOD < TerrainData.Patches[PatchIndex].Left->CurrentLOD && + (vZ % (1 << TerrainData.Patches[PatchIndex].Left->CurrentLOD)) != 0) + { + vZ -= vZ % (1 << TerrainData.Patches[PatchIndex].Left->CurrentLOD); + } + } + else + if (vX == (u32)TerrainData.CalcPatchSize) // right border + { + if (TerrainData.Patches[PatchIndex].Right && + TerrainData.Patches[PatchIndex].CurrentLOD < TerrainData.Patches[PatchIndex].Right->CurrentLOD && + (vZ % (1 << TerrainData.Patches[PatchIndex].Right->CurrentLOD)) != 0) + { + vZ -= vZ % (1 << TerrainData.Patches[PatchIndex].Right->CurrentLOD); + } + } + + if (vZ >= (u32)TerrainData.PatchSize) + vZ = TerrainData.CalcPatchSize; + + if (vX >= (u32)TerrainData.PatchSize) + vX = TerrainData.CalcPatchSize; + + return (vZ + ((TerrainData.CalcPatchSize) * PatchZ)) * TerrainData.Size + + (vX + ((TerrainData.CalcPatchSize) * PatchX)); + } + + + //! smooth the terrain + void CTerrainSceneNode::smoothTerrain(IDynamicMeshBuffer* mb, s32 smoothFactor) + { + for (s32 run = 0; run < smoothFactor; ++run) + { + s32 yd = TerrainData.Size; + for (s32 y = 1; y < TerrainData.Size - 1; ++y) + { + for (s32 x = 1; x < TerrainData.Size - 1; ++x) + { + mb->getVertexBuffer()[x + yd].Pos.Y = + (mb->getVertexBuffer()[x-1 + yd].Pos.Y + //left + mb->getVertexBuffer()[x+1 + yd].Pos.Y + //right + mb->getVertexBuffer()[x + yd - TerrainData.Size].Pos.Y + //above + mb->getVertexBuffer()[x + yd + TerrainData.Size].Pos.Y) * 0.25f; //below + } + yd += TerrainData.Size; + } + } + } + + + //! calculate smooth normals + void CTerrainSceneNode::calculateNormals(IDynamicMeshBuffer* mb) + { + s32 count; + core::vector3df a, b, c, t; + + for (s32 x=0; x<TerrainData.Size; ++x) + { + for (s32 z=0; z<TerrainData.Size; ++z) + { + count = 0; + core::vector3df normal; + + // top left + if (x>0 && z>0) + { + a = mb->getVertexBuffer()[(x-1)*TerrainData.Size+z-1].Pos; + b = mb->getVertexBuffer()[(x-1)*TerrainData.Size+z].Pos; + c = mb->getVertexBuffer()[x*TerrainData.Size+z].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + a = mb->getVertexBuffer()[(x-1)*TerrainData.Size+z-1].Pos; + b = mb->getVertexBuffer()[x*TerrainData.Size+z-1].Pos; + c = mb->getVertexBuffer()[x*TerrainData.Size+z].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + count += 2; + } + + // top right + if (x>0 && z<TerrainData.Size-1) + { + a = mb->getVertexBuffer()[(x-1)*TerrainData.Size+z].Pos; + b = mb->getVertexBuffer()[(x-1)*TerrainData.Size+z+1].Pos; + c = mb->getVertexBuffer()[x*TerrainData.Size+z+1].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + a = mb->getVertexBuffer()[(x-1)*TerrainData.Size+z].Pos; + b = mb->getVertexBuffer()[x*TerrainData.Size+z+1].Pos; + c = mb->getVertexBuffer()[x*TerrainData.Size+z].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + count += 2; + } + + // bottom right + if (x<TerrainData.Size-1 && z<TerrainData.Size-1) + { + a = mb->getVertexBuffer()[x*TerrainData.Size+z+1].Pos; + b = mb->getVertexBuffer()[x*TerrainData.Size+z].Pos; + c = mb->getVertexBuffer()[(x+1)*TerrainData.Size+z+1].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + a = mb->getVertexBuffer()[x*TerrainData.Size+z+1].Pos; + b = mb->getVertexBuffer()[(x+1)*TerrainData.Size+z+1].Pos; + c = mb->getVertexBuffer()[(x+1)*TerrainData.Size+z].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + count += 2; + } + + // bottom left + if (x<TerrainData.Size-1 && z>0) + { + a = mb->getVertexBuffer()[x*TerrainData.Size+z-1].Pos; + b = mb->getVertexBuffer()[x*TerrainData.Size+z].Pos; + c = mb->getVertexBuffer()[(x+1)*TerrainData.Size+z].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + a = mb->getVertexBuffer()[x*TerrainData.Size+z-1].Pos; + b = mb->getVertexBuffer()[(x+1)*TerrainData.Size+z].Pos; + c = mb->getVertexBuffer()[(x+1)*TerrainData.Size+z-1].Pos; + b -= a; + c -= a; + t = b.crossProduct(c); + t.normalize(); + normal += t; + + count += 2; + } + + if (count != 0) + { + normal.normalize(); + } + else + { + normal.set(0.0f, 1.0f, 0.0f); + } + + mb->getVertexBuffer()[x * TerrainData.Size + z].Normal = normal; + } + } + } + + + //! create patches, stuff that needs to be done only once for patches goes here. + void CTerrainSceneNode::createPatches() + { + TerrainData.PatchCount = (TerrainData.Size - 1) / (TerrainData.CalcPatchSize); + + if (TerrainData.Patches) + delete [] TerrainData.Patches; + + TerrainData.Patches = new SPatch[TerrainData.PatchCount * TerrainData.PatchCount]; + } + + + //! used to calculate the internal STerrainData structure both at creation and after scaling/position calls. + void CTerrainSceneNode::calculatePatchData() + { + // Reset the Terrains Bounding Box for re-calculation + TerrainData.BoundingBox.reset(RenderBuffer->getPosition(0)); + + for (s32 x = 0; x < TerrainData.PatchCount; ++x) + { + for (s32 z = 0; z < TerrainData.PatchCount; ++z) + { + const s32 index = x * TerrainData.PatchCount + z; + SPatch& patch = TerrainData.Patches[index]; + patch.CurrentLOD = 0; + + const s32 xstart = x*TerrainData.CalcPatchSize; + const s32 xend = xstart+TerrainData.CalcPatchSize; + const s32 zstart = z*TerrainData.CalcPatchSize; + const s32 zend = zstart+TerrainData.CalcPatchSize; + // For each patch, calculate the bounding box (mins and maxes) + patch.BoundingBox.reset(RenderBuffer->getPosition(xstart*TerrainData.Size + zstart)); + + for (s32 xx = xstart; xx <= xend; ++xx) + for (s32 zz = zstart; zz <= zend; ++zz) + patch.BoundingBox.addInternalPoint(RenderBuffer->getVertexBuffer()[xx * TerrainData.Size + zz].Pos); + + // Reconfigure the bounding box of the terrain as a whole + TerrainData.BoundingBox.addInternalBox(patch.BoundingBox); + + // get center of Patch + patch.Center = patch.BoundingBox.getCenter(); + + // Assign Neighbours + // Top + if (x > 0) + patch.Top = &TerrainData.Patches[(x-1) * TerrainData.PatchCount + z]; + else + patch.Top = 0; + + // Bottom + if (x < TerrainData.PatchCount - 1) + patch.Bottom = &TerrainData.Patches[(x+1) * TerrainData.PatchCount + z]; + else + patch.Bottom = 0; + + // Left + if (z > 0) + patch.Left = &TerrainData.Patches[x * TerrainData.PatchCount + z - 1]; + else + patch.Left = 0; + + // Right + if (z < TerrainData.PatchCount - 1) + patch.Right = &TerrainData.Patches[x * TerrainData.PatchCount + z + 1]; + else + patch.Right = 0; + } + } + + // get center of Terrain + TerrainData.Center = TerrainData.BoundingBox.getCenter(); + + // if the default rotation pivot is still being used, update it. + if (UseDefaultRotationPivot) + { + TerrainData.RotationPivot = TerrainData.Center; + } + } + + + //! used to calculate or recalculate the distance thresholds + void CTerrainSceneNode::calculateDistanceThresholds(bool scalechanged) + { + // Only update the LODDistanceThreshold if it's not manually changed + if (!OverrideDistanceThreshold) + { + TerrainData.LODDistanceThreshold.set_used(0); + // Determine new distance threshold for determining what LOD to draw patches at + TerrainData.LODDistanceThreshold.reallocate(TerrainData.MaxLOD); + + const f64 size = TerrainData.PatchSize * TerrainData.PatchSize * + TerrainData.Scale.X * TerrainData.Scale.Z; + for (s32 i=0; i<TerrainData.MaxLOD; ++i) + { + TerrainData.LODDistanceThreshold.push_back(size * ((i+1+ i / 2) * (i+1+ i / 2))); + } + } + } + + + void CTerrainSceneNode::setCurrentLODOfPatches(s32 lod) + { + const s32 count = TerrainData.PatchCount * TerrainData.PatchCount; + for (s32 i=0; i< count; ++i) + TerrainData.Patches[i].CurrentLOD = lod; + } + + + void CTerrainSceneNode::setCurrentLODOfPatches(const core::array<s32>& lodarray) + { + const s32 count = TerrainData.PatchCount * TerrainData.PatchCount; + for (s32 i=0; i<count; ++i) + TerrainData.Patches[i].CurrentLOD = lodarray[i]; + } + + + //! Gets the height + f32 CTerrainSceneNode::getHeight(f32 x, f32 z) const + { + if (!Mesh->getMeshBufferCount()) + return 0; + + core::matrix4 rotMatrix; + rotMatrix.setRotationDegrees(TerrainData.Rotation); + core::vector3df pos(x, 0.0f, z); + rotMatrix.rotateVect(pos); + pos -= TerrainData.Position; + pos /= TerrainData.Scale; + + s32 X(core::floor32(pos.X)); + s32 Z(core::floor32(pos.Z)); + + f32 height = -FLT_MAX; + if (X >= 0 && X < TerrainData.Size-1 && + Z >= 0 && Z < TerrainData.Size-1) + { + const video::S3DVertex2TCoords* Vertices = (const video::S3DVertex2TCoords*)Mesh->getMeshBuffer(0)->getVertices(); + const core::vector3df& a = Vertices[X * TerrainData.Size + Z].Pos; + const core::vector3df& b = Vertices[(X + 1) * TerrainData.Size + Z].Pos; + const core::vector3df& c = Vertices[X * TerrainData.Size + (Z + 1)].Pos; + const core::vector3df& d = Vertices[(X + 1) * TerrainData.Size + (Z + 1)].Pos; + + // offset from integer position + const f32 dx = pos.X - X; + const f32 dz = pos.Z - Z; + + if (dx > dz) + height = a.Y + (d.Y - b.Y)*dz + (b.Y - a.Y)*dx; + else + height = a.Y + (d.Y - c.Y)*dx + (c.Y - a.Y)*dz; + + height *= TerrainData.Scale.Y; + height += TerrainData.Position.Y; + } + + return height; + } + + + //! Writes attributes of the scene node. + void CTerrainSceneNode::serializeAttributes(io::IAttributes* out, + io::SAttributeReadWriteOptions* options) const + { + ISceneNode::serializeAttributes(out, options); + + out->addString("Heightmap", HeightmapFile.c_str()); + out->addFloat("TextureScale1", TCoordScale1); + out->addFloat("TextureScale2", TCoordScale2); + out->addInt("SmoothFactor", SmoothFactor); + } + + + //! Reads attributes of the scene node. + void CTerrainSceneNode::deserializeAttributes(io::IAttributes* in, + io::SAttributeReadWriteOptions* options) + { + io::path newHeightmap = in->getAttributeAsString("Heightmap"); + f32 tcoordScale1 = in->getAttributeAsFloat("TextureScale1"); + f32 tcoordScale2 = in->getAttributeAsFloat("TextureScale2"); + s32 smoothFactor = in->getAttributeAsInt("SmoothFactor"); + + // set possible new heightmap + + if (newHeightmap.size() != 0 && newHeightmap != HeightmapFile) + { + io::IReadFile* file = FileSystem->createAndOpenFile(newHeightmap.c_str()); + if (file) + { + loadHeightMap(file, video::SColor(255,255,255,255), smoothFactor); + file->drop(); + } + else + os::Printer::log("could not open heightmap", newHeightmap.c_str()); + } + + // set possible new scale + + if (core::equals(tcoordScale1, 0.f)) + tcoordScale1 = 1.0f; + + if (core::equals(tcoordScale2, 0.f)) + tcoordScale2 = 1.0f; + + if (!core::equals(tcoordScale1, TCoordScale1) || + !core::equals(tcoordScale2, TCoordScale2)) + { + scaleTexture(tcoordScale1, tcoordScale2); + } + + ISceneNode::deserializeAttributes(in, options); + } + + + //! Creates a clone of this scene node and its children. + ISceneNode* CTerrainSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) + { + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CTerrainSceneNode* nb = new CTerrainSceneNode( + newParent, newManager, FileSystem, ID, + 4, ETPS_17, getPosition(), getRotation(), getScale()); + + nb->cloneMembers(this, newManager); + + // instead of cloning the data structures, recreate the terrain. + // (temporary solution) + + // load file + + io::IReadFile* file = FileSystem->createAndOpenFile(HeightmapFile.c_str()); + if (file) + { + nb->loadHeightMap(file, video::SColor(255,255,255,255), 0); + file->drop(); + } + + // scale textures + + nb->scaleTexture(TCoordScale1, TCoordScale2); + + // copy materials + + for (unsigned int m = 0; m<Mesh->getMeshBufferCount(); ++m) + { + if (nb->Mesh->getMeshBufferCount()>m && + nb->Mesh->getMeshBuffer(m) && + Mesh->getMeshBuffer(m)) + { + nb->Mesh->getMeshBuffer(m)->getMaterial() = + Mesh->getMeshBuffer(m)->getMaterial(); + } + } + + nb->RenderBuffer->getMaterial() = RenderBuffer->getMaterial(); + + // finish + + if ( newParent ) + nb->drop(); + return nb; + } + +} // end namespace scene +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.h new file mode 100644 index 0000000..1d92f66 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainSceneNode.h @@ -0,0 +1,330 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// The code for the TerrainSceneNode is based on the GeoMipMapSceneNode +// developed by Spintz. He made it available for Irrlicht and allowed it to be +// distributed under this licence. I only modified some parts. A lot of thanks go to him. + +#ifndef __C_TERRAIN_SCENE_NODE_H__ +#define __C_TERRAIN_SCENE_NODE_H__ + +#include "ITerrainSceneNode.h" +#include "IDynamicMeshBuffer.h" +#include "path.h" + +namespace irr +{ +namespace io +{ + class IFileSystem; + class IReadFile; +} +namespace scene +{ + struct SMesh; + class ITextSceneNode; + + //! A scene node for displaying terrain using the geo mip map algorithm. + class CTerrainSceneNode : public ITerrainSceneNode + { + public: + + //! constructor + //! \param parent: The node which this node is a child of. Making this node a child of another node, or + //! making it a parent of another node is yet untested and most likely does not work properly. + //! \param mgr: Pointer to the scene manager. + //! \param id: The id of the node + //! \param maxLOD: The maximum LOD ( Level of Detail ) for the node. + //! \param patchSize: An E_GEOMIPMAP_PATCH_SIZE enumeration defining the size of each patch of the terrain. + //! \param position: The absolute position of this node. + //! \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED ) + //! \param scale: The scale factor for the terrain. If you're using a heightmap of size 128x128 and would like + //! your terrain to be 12800x12800 in game units, then use a scale factor of ( core::vector ( 100.0f, 100.0f, 100.0f ). + //! If you use a Y scaling factor of 0.0f, then your terrain will be flat. + CTerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, io::IFileSystem* fs, s32 id, + s32 maxLOD = 4, E_TERRAIN_PATCH_SIZE patchSize = ETPS_17, + const core::vector3df& position = core::vector3df(0.0f, 0.0f, 0.0f), + const core::vector3df& rotation = core::vector3df(0.0f, 0.0f, 0.0f), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + virtual ~CTerrainSceneNode(); + + //! Initializes the terrain data. Loads the vertices from the heightMapFile. + virtual bool loadHeightMap(io::IReadFile* file, + video::SColor vertexColor = video::SColor ( 255, 255, 255, 255 ), s32 smoothFactor = 0 ); + + //! Initializes the terrain data. Loads the vertices from the heightMapFile. + virtual bool loadHeightMapRAW(io::IReadFile* file, s32 bitsPerPixel = 16, + bool signedData=true, bool floatVals=false, s32 width=0, video::SColor vertexColor = video::SColor ( 255, 255, 255, 255 ), s32 smoothFactor = 0 ); + + //! Returns the material based on the zero based index i. This scene node only uses + //! 1 material. + //! \param i: Zero based index i. UNUSED, left in for virtual purposes. + //! \return Returns the single material this scene node uses. + virtual video::SMaterial& getMaterial(u32 i); + + //! Returns amount of materials used by this scene node ( always 1 ) + //! \return Returns current count of materials used by this scene node ( always 1 ) + virtual u32 getMaterialCount() const; + + //! Gets the last scaling factor applied to the scene node. This value only represents the + //! last scaling factor presented to the node. For instance, if you make create the node + //! with a scale factor of ( 1.0f, 1.0f, 1.0f ) then call setScale ( 50.0f, 5.0f, 50.0f ), + //! then make another call to setScale with the values ( 2.0f, 2.0f, 2.0f ), this will return + //! core::vector3df ( 2.0f, 2.0f, 2.0f ), although the total scaling of the scene node is + //! core::vector3df ( 100.0f, 10.0f, 100.0f ). + //! \return Returns the last scaling factor passed to the scene node. + virtual const core::vector3df& getScale() const + { + return TerrainData.Scale; + } + + //! Scales the scene nodes vertices by the vector specified. + //! \param scale: Scaling factor to apply to the node. + virtual void setScale(const core::vector3df& scale); + + //! Gets the last rotation factor applied to the scene node. + //! \return Returns the last rotation factor applied to the scene node. + virtual const core::vector3df& getRotation() const + { + return TerrainData.Rotation; + } + + //! Rotates the node. This only modifies the relative rotation of the node. + //! \param rotation: New rotation of the node in degrees. + virtual void setRotation(const core::vector3df& rotation); + + //! Sets the pivot point for rotation of this node. + //! NOTE: The default for the RotationPivot will be the center of the individual tile. + virtual void setRotationPivot( const core::vector3df& pivot ); + + //! Gets the last positioning vector applied to the scene node. + //! \return Returns the last position vector applied to the scene node. + virtual const core::vector3df& getPosition() const + { + return TerrainData.Position; + } + + //! Moves the scene nodes vertices by the vector specified. + //! \param newpos: Vector specifying how much to move each vertex of the scene node. + virtual void setPosition(const core::vector3df& newpos); + + //! Updates the scene nodes indices if the camera has moved or rotated by a certain + //! threshold, which can be changed using the SetCameraMovementDeltaThreshold and + //! SetCameraRotationDeltaThreshold functions. This also determines if a given patch + //! for the scene node is within the view frustum and if it's not the indices are not + //! generated for that patch. + virtual void OnRegisterSceneNode(); + + //! Render the scene node + virtual void render(); + + //! Return the bounding box of the entire terrain. + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! Return the bounding box of a patch + virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const; + + //! Return the number of indices currently used to draw the scene node. + virtual u32 getIndexCount() const { return IndicesToRender; } + + //! Returns the mesh + virtual IMesh* getMesh(); + + //! Returns a pointer to the buffer used by the terrain (most users will not need this) + virtual IMeshBuffer* getRenderBuffer() { return RenderBuffer; } + + //! Gets the meshbuffer data based on a specified Level of Detail. + //! \param mb: A reference to an IDynamicMeshBuffer object + //! \param LOD: The Level Of Detail you want the indices from. + virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const; + + //! Gets the indices for a specified patch at a specified Level of Detail. + //! \param indices: A reference to an array of u32 indices. + //! \param patchX: Patch x coordinate. + //! \param patchZ: Patch z coordinate. + //! \param LOD: The level of detail to get for that patch. If -1, then get + //! the CurrentLOD. If the CurrentLOD is set to -1, meaning it's not shown, + //! then it will retrieve the triangles at the highest LOD (0). + //! \return: Number of indices put into the buffer. + virtual s32 getIndicesForPatch(core::array<u32>& indices, + s32 patchX, s32 patchZ, s32 LOD=0); + + //! Populates an array with the CurrentLOD of each patch. + //! \param LODs: A reference to a core::array<s32> to hold the values + //! \return Returns the number of elements in the array + virtual s32 getCurrentLODOfPatches(core::array<s32>& LODs) const; + + //! Manually sets the LOD of a patch + //! \param patchX: Patch x coordinate. + //! \param patchZ: Patch z coordinate. + //! \param LOD: The level of detail to set the patch to. + virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0); + + //! Returns center of terrain. + virtual const core::vector3df& getTerrainCenter() const + { + return TerrainData.Center; + } + + //! Returns center of terrain. + virtual f32 getHeight( f32 x, f32 y ) const; + + //! Sets the movement camera threshold which is used to determine when to recalculate + //! indices for the scene node. The default value is 10.0f. + virtual void setCameraMovementDelta(f32 delta) + { + CameraMovementDelta = delta; + } + + //! Sets the rotation camera threshold which is used to determine when to recalculate + //! indices for the scene node. The default value is 1.0f. + virtual void setCameraRotationDelta(f32 delta) + { + CameraRotationDelta = delta; + } + + //! Sets whether or not the node should dynamically update it its associated selector when + //! the geomipmap data changes. + //! param bVal: Boolean value representing whether or not to update selector dynamically. + //! NOTE: Temporarily disabled while working out issues with DynamicSelectorUpdate + virtual void setDynamicSelectorUpdate(bool bVal ) { DynamicSelectorUpdate = false; } + + //! Override the default generation of distance thresholds for determining the LOD a patch + //! is rendered at. If any LOD is overridden, then the scene node will no longer apply + //! scaling factors to these values. If you override these distances and then apply + //! a scale to the scene node, it is your responsibility to update the new distances to + //! work best with your new terrain size. + virtual bool overrideLODDistance( s32 LOD, f64 newDistance ); + + //! Scales the two textures + virtual void scaleTexture(f32 scale = 1.0f, f32 scale2 = 0.0f); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const {return ESNT_TERRAIN;} + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, + io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, + io::SAttributeReadWriteOptions* options=0); + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent, + ISceneManager* newManager); + + private: + friend class CTerrainTriangleSelector; + + struct SPatch + { + SPatch() + : Top(0), Bottom(0), Right(0), Left(0), CurrentLOD(-1) + { + } + + SPatch* Top; + SPatch* Bottom; + SPatch* Right; + SPatch* Left; + s32 CurrentLOD; + core::aabbox3df BoundingBox; + core::vector3df Center; + }; + + struct STerrainData + { + STerrainData(s32 patchSize, s32 maxLOD, const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale) + : Patches(0), Size(0), Position(position), Rotation(rotation), + Scale(scale), PatchSize(patchSize), CalcPatchSize(patchSize-1), + PatchCount(0), MaxLOD(maxLOD) + { + } + + SPatch* Patches; + s32 Size; + core::vector3df Position; + core::vector3df Rotation; + core::vector3df RotationPivot; + core::vector3df Scale; + core::vector3df Center; + s32 PatchSize; + s32 CalcPatchSize; + s32 PatchCount; + s32 MaxLOD; + core::aabbox3df BoundingBox; + core::array<f64> LODDistanceThreshold; + }; + + + virtual void preRenderCalculationsIfNeeded(); + + virtual void preRenderLODCalculations(); + virtual void preRenderIndicesCalculations(); + + //! get indices when generating index data for patches at varying levels of detail. + u32 getIndex(const s32 PatchX, const s32 PatchZ, const s32 PatchIndex, u32 vX, u32 vZ) const; + + //! smooth the terrain + void smoothTerrain(IDynamicMeshBuffer* mb, s32 smoothFactor); + + //! calculate smooth normals + void calculateNormals(IDynamicMeshBuffer* mb); + + //! create patches, stuff that needs to only be done once for patches goes here. + void createPatches(); + + //! calculate the internal STerrainData structure + void calculatePatchData(); + + //! calculate or recalculate the distance thresholds + void calculateDistanceThresholds(bool scalechanged = false); + + //! sets the CurrentLOD of all patches to the specified LOD + void setCurrentLODOfPatches(s32 i); + + //! sets the CurrentLOD of TerrainData patches to the LODs specified in the array + void setCurrentLODOfPatches(const core::array<s32>& lodarray); + + //! Apply transformation changes( scale, position, rotation ) + void applyTransformation(); + + STerrainData TerrainData; + SMesh* Mesh; + + IDynamicMeshBuffer *RenderBuffer; + + u32 VerticesToRender; + u32 IndicesToRender; + + bool DynamicSelectorUpdate; + bool OverrideDistanceThreshold; + bool UseDefaultRotationPivot; + bool ForceRecalculation; + + core::vector3df OldCameraPosition; + core::vector3df OldCameraRotation; + core::vector3df OldCameraUp; + f32 OldCameraFOV; + f32 CameraMovementDelta; + f32 CameraRotationDelta; + f32 CameraFOVDelta; + + // needed for (de)serialization + f32 TCoordScale1; + f32 TCoordScale2; + s32 SmoothFactor; + io::path HeightmapFile; + io::IFileSystem* FileSystem; + }; + + +} // end namespace scene +} // end namespace irr + +#endif // __C_TERRAIN_SCENE_NODE_H__ + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.cpp new file mode 100644 index 0000000..91820ce --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.cpp @@ -0,0 +1,234 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CTerrainTriangleSelector.h" +#include "CTerrainSceneNode.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + + +//! constructor +CTerrainTriangleSelector::CTerrainTriangleSelector ( ITerrainSceneNode* node, s32 LOD ) + : SceneNode(node) +{ + #ifdef _DEBUG + setDebugName ("CTerrainTriangleSelector"); + #endif + + setTriangleData(node, LOD); +} + + +//! destructor +CTerrainTriangleSelector::~CTerrainTriangleSelector() +{ + TrianglePatches.TrianglePatchArray.clear(); +} + + +//! Clears and sets triangle data +void CTerrainTriangleSelector::setTriangleData(ITerrainSceneNode* node, s32 LOD) +{ + // Get pointer to the GeoMipMaps vertices + const video::S3DVertex2TCoords* vertices = static_cast<const video::S3DVertex2TCoords*>(node->getRenderBuffer()->getVertices()); + + // Clear current data + const s32 count = (static_cast<CTerrainSceneNode*>(node))->TerrainData.PatchCount; + TrianglePatches.TotalTriangles = 0; + TrianglePatches.NumPatches = count*count; + + TrianglePatches.TrianglePatchArray.reallocate(TrianglePatches.NumPatches); + for (s32 o=0; o<TrianglePatches.NumPatches; ++o) + TrianglePatches.TrianglePatchArray.push_back(SGeoMipMapTrianglePatch()); + + core::triangle3df tri; + core::array<u32> indices; + s32 tIndex = 0; + for(s32 x = 0; x < count; ++x ) + { + for(s32 z = 0; z < count; ++z ) + { + TrianglePatches.TrianglePatchArray[tIndex].NumTriangles = 0; + TrianglePatches.TrianglePatchArray[tIndex].Box = node->getBoundingBox( x, z ); + u32 indexCount = node->getIndicesForPatch( indices, x, z, LOD ); + + TrianglePatches.TrianglePatchArray[tIndex].Triangles.reallocate(indexCount/3); + for(u32 i = 0; i < indexCount; i += 3 ) + { + tri.pointA = vertices[indices[i+0]].Pos; + tri.pointB = vertices[indices[i+1]].Pos; + tri.pointC = vertices[indices[i+2]].Pos; + TrianglePatches.TrianglePatchArray[tIndex].Triangles.push_back(tri); + ++TrianglePatches.TrianglePatchArray[tIndex].NumTriangles; + } + + TrianglePatches.TotalTriangles += TrianglePatches.TrianglePatchArray[tIndex].NumTriangles; + ++tIndex; + } + } +} + + +//! Gets all triangles. +void CTerrainTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::matrix4* transform) const +{ + s32 count = TrianglePatches.TotalTriangles; + + if (count > arraySize) + count = arraySize; + + core::matrix4 mat; + + if (transform) + mat = (*transform); + + s32 tIndex = 0; + + for (s32 i=0; i<TrianglePatches.NumPatches; ++i) + { + if (tIndex + TrianglePatches.TrianglePatchArray[i].NumTriangles <= count) + for (s32 j=0; j<TrianglePatches.TrianglePatchArray[i].NumTriangles; ++j) + { + triangles[tIndex] = TrianglePatches.TrianglePatchArray[i].Triangles[j]; + + mat.transformVect(triangles[tIndex].pointA); + mat.transformVect(triangles[tIndex].pointB); + mat.transformVect(triangles[tIndex].pointC); + + ++tIndex; + } + } + + outTriangleCount = tIndex; +} + + +//! Gets all triangles which lie within a specific bounding box. +void CTerrainTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, const core::matrix4* transform) const +{ + s32 count = TrianglePatches.TotalTriangles; + + if (count > arraySize) + count = arraySize; + + core::matrix4 mat; + + if (transform) + mat = (*transform); + + s32 tIndex = 0; + + for (s32 i=0; i<TrianglePatches.NumPatches; ++i) + { + if (tIndex + TrianglePatches.TrianglePatchArray[i].NumTriangles <= count && + TrianglePatches.TrianglePatchArray[i].Box.intersectsWithBox(box)) + for (s32 j=0; j<TrianglePatches.TrianglePatchArray[i].NumTriangles; ++j) + { + triangles[tIndex] = TrianglePatches.TrianglePatchArray[i].Triangles[j]; + + mat.transformVect(triangles[tIndex].pointA); + mat.transformVect(triangles[tIndex].pointB); + mat.transformVect(triangles[tIndex].pointC); + + ++tIndex; + } + } + + outTriangleCount = tIndex; +} + + +//! Gets all triangles which have or may have contact with a 3d line. +void CTerrainTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform) const +{ + const s32 count = core::min_((s32)TrianglePatches.TotalTriangles, arraySize); + + core::matrix4 mat; + + if (transform) + mat = (*transform); + + s32 tIndex = 0; + + for (s32 i=0; i<TrianglePatches.NumPatches; ++i) + { + if (tIndex + TrianglePatches.TrianglePatchArray[i].NumTriangles <= count + && TrianglePatches.TrianglePatchArray[i].Box.intersectsWithLine(line)) + { + for (s32 j=0; j<TrianglePatches.TrianglePatchArray[i].NumTriangles; ++j) + { + triangles[tIndex] = TrianglePatches.TrianglePatchArray[i].Triangles[j]; + + mat.transformVect(triangles[tIndex].pointA); + mat.transformVect(triangles[tIndex].pointB); + mat.transformVect(triangles[tIndex].pointC); + + ++tIndex; + } + } + } + + outTriangleCount = tIndex; +} + + +//! Returns amount of all available triangles in this selector +s32 CTerrainTriangleSelector::getTriangleCount() const +{ + return TrianglePatches.TotalTriangles; +} + + +ISceneNode* CTerrainTriangleSelector::getSceneNodeForTriangle( + u32 triangleIndex) const +{ + return SceneNode; +} + + +/* Get the number of TriangleSelectors that are part of this one. +Only useful for MetaTriangleSelector others return 1 +*/ +u32 CTerrainTriangleSelector::getSelectorCount() const +{ + return 1; +} + + +/* Get the TriangleSelector based on index based on getSelectorCount. +Only useful for MetaTriangleSelector others return 'this' or 0 +*/ +ITriangleSelector* CTerrainTriangleSelector::getSelector(u32 index) +{ + if (index) + return 0; + else + return this; +} + + +/* Get the TriangleSelector based on index based on getSelectorCount. +Only useful for MetaTriangleSelector others return 'this' or 0 +*/ +const ITriangleSelector* CTerrainTriangleSelector::getSelector(u32 index) const +{ + if (index) + return 0; + else + return this; +} + + +} // end namespace scene +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.h new file mode 100644 index 0000000..f452a2e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTerrainTriangleSelector.h @@ -0,0 +1,100 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// The code for the TerrainTriangleSelector is based on the GeoMipMapSelector +// developed by Spintz. He made it available for Irrlicht and allowed it to be +// distributed under this licence. I only modified some parts. A lot of thanks go to him. + +#ifndef __C_TERRAIN_TRIANGLE_SELECTOR_H__ +#define __C_TERRAIN_TRIANGLE_SELECTOR_H__ + +#include "ITriangleSelector.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + +class ITerrainSceneNode; + +//! Triangle Selector for the TerrainSceneNode +/** The code for the TerrainTriangleSelector is based on the GeoMipMapSelector +developed by Spintz. He made it available for Irrlicht and allowed it to be +distributed under this licence. I only modified some parts. A lot of thanks go +to him. +*/ +class CTerrainTriangleSelector : public ITriangleSelector +{ +public: + + //! Constructs a selector based on an ITerrainSceneNode + CTerrainTriangleSelector(ITerrainSceneNode* node, s32 LOD); + + //! Destructor + virtual ~CTerrainTriangleSelector(); + + //! Clears and sets triangle data + virtual void setTriangleData (ITerrainSceneNode* node, s32 LOD); + + //! Gets all triangles. + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::matrix4* transform=0) const; + + //! Gets all triangles which lie within a specific bounding box. + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, const core::matrix4* transform=0) const; + + //! Gets all triangles which have or may have contact with a 3d line. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform=0) const; + + //! Returns amount of all available triangles in this selector + virtual s32 getTriangleCount() const; + + //! Return the scene node associated with a given triangle. + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const; + + // Get the number of TriangleSelectors that are part of this one + virtual u32 getSelectorCount() const; + + // Get the TriangleSelector based on index based on getSelectorCount + virtual ITriangleSelector* getSelector(u32 index); + + // Get the TriangleSelector based on index based on getSelectorCount + virtual const ITriangleSelector* getSelector(u32 index) const; + +private: + + friend class CTerrainSceneNode; + + struct SGeoMipMapTrianglePatch + { + core::array<core::triangle3df> Triangles; + s32 NumTriangles; + core::aabbox3df Box; + }; + + struct SGeoMipMapTrianglePatches + { + SGeoMipMapTrianglePatches() : + NumPatches(0), TotalTriangles(0) + { + } + + core::array<SGeoMipMapTrianglePatch> TrianglePatchArray; + s32 NumPatches; + u32 TotalTriangles; + }; + + ITerrainSceneNode* SceneNode; + SGeoMipMapTrianglePatches TrianglePatches; +}; + +} // end namespace scene +} // end namespace irr + + +#endif // __C_TERRAIN_TRIANGLE_SELECTOR_H__ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.cpp new file mode 100644 index 0000000..7edf2f5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.cpp @@ -0,0 +1,471 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CTextSceneNode.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" +#include "ICameraSceneNode.h" +#include "IGUISpriteBank.h" +#include "SMeshBuffer.h" +#include "os.h" + + +namespace irr +{ +namespace scene +{ + + +//! constructor +CTextSceneNode::CTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + gui::IGUIFont* font, scene::ISceneCollisionManager* coll, + const core::vector3df& position, const wchar_t* text, + video::SColor color) + : ITextSceneNode(parent, mgr, id, position), Text(text), Color(color), + Font(font), Coll(coll) + +{ + #ifdef _DEBUG + setDebugName("CTextSceneNode"); + #endif + + if (Font) + Font->grab(); + + setAutomaticCulling(scene::EAC_OFF); +} + +//! destructor +CTextSceneNode::~CTextSceneNode() +{ + if (Font) + Font->drop(); +} + +void CTextSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT); + + ISceneNode::OnRegisterSceneNode(); +} + +//! renders the node. +void CTextSceneNode::render() +{ + if (!Font || !Coll) + return; + + core::position2d<s32> pos = Coll->getScreenCoordinatesFrom3DPosition(getAbsolutePosition(), + SceneManager->getActiveCamera()); + + core::rect<s32> r(pos, core::dimension2d<s32>(1,1)); + Font->draw(Text.c_str(), r, Color, true, true); +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CTextSceneNode::getBoundingBox() const +{ + return Box; +} + +//! sets the text string +void CTextSceneNode::setText(const wchar_t* text) +{ + Text = text; +} + + +//! sets the color of the text +void CTextSceneNode::setTextColor(video::SColor color) +{ + Color = color; +} + + +//!--------------------------------- CBillboardTextSceneNode ---------------------------------------------- + + +//! constructor +CBillboardTextSceneNode::CBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + gui::IGUIFont* font,const wchar_t* text, + const core::vector3df& position, const core::dimension2d<f32>& size, + video::SColor colorTop,video::SColor shade_bottom ) +: IBillboardTextSceneNode(parent, mgr, id, position), + Font(0), ColorTop(colorTop), ColorBottom(shade_bottom), Mesh(0) +{ + #ifdef _DEBUG + setDebugName("CBillboardTextSceneNode"); + #endif + + Material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + Material.MaterialTypeParam = 1.f / 255.f; + Material.BackfaceCulling = false; + Material.Lighting = false; + Material.ZBuffer = video::ECFN_LESSEQUAL; + Material.ZWriteEnable = false; + + if (font) + { + // doesn't support other font types + if (font->getType() == gui::EGFT_BITMAP) + { + Font = (gui::IGUIFontBitmap*)font; + Font->grab(); + + // mesh with one buffer per texture + Mesh = new SMesh(); + for (u32 i=0; i<Font->getSpriteBank()->getTextureCount(); ++i) + { + SMeshBuffer *mb = new SMeshBuffer(); + mb->Material = Material; + mb->Material.setTexture(0, Font->getSpriteBank()->getTexture(i)); + Mesh->addMeshBuffer(mb); + mb->drop(); + } + } + else + { + os::Printer::log("Sorry, CBillboardTextSceneNode does not support this font type", ELL_INFORMATION); + } + } + + setText(text); + setSize(size); + + setAutomaticCulling ( scene::EAC_BOX ); +} + + + +CBillboardTextSceneNode::~CBillboardTextSceneNode() +{ + if (Font) + Font->drop(); + + if (Mesh) + Mesh->drop(); + +} + + +//! sets the text string +void CBillboardTextSceneNode::setText(const wchar_t* text) +{ + if ( !Mesh ) + return; + + Text = text; + + Symbol.clear(); + + // clear mesh + for (u32 j=0; j < Mesh->getMeshBufferCount(); ++j) + { + ((SMeshBuffer*)Mesh->getMeshBuffer(j))->Indices.clear(); + ((SMeshBuffer*)Mesh->getMeshBuffer(j))->Vertices.clear(); + } + + if (!Font) + return; + + const core::array< core::rect<s32> > &sourceRects = Font->getSpriteBank()->getPositions(); + const core::array< gui::SGUISprite > &sprites = Font->getSpriteBank()->getSprites(); + + f32 dim[2]; + f32 tex[4]; + + u32 i; + for ( i = 0; i != Text.size (); ++i ) + { + SSymbolInfo info; + + u32 spriteno = Font->getSpriteNoFromChar( &text[i] ); + u32 rectno = sprites[spriteno].Frames[0].rectNumber; + u32 texno = sprites[spriteno].Frames[0].textureNumber; + + dim[0] = core::reciprocal ( (f32) Font->getSpriteBank()->getTexture(texno)->getSize().Width ); + dim[1] = core::reciprocal ( (f32) Font->getSpriteBank()->getTexture(texno)->getSize().Height ); + + const core::rect<s32>& s = sourceRects[rectno]; + + // add space for letter to buffer + SMeshBuffer* buf = (SMeshBuffer*)Mesh->getMeshBuffer(texno); + u32 firstInd = buf->Indices.size(); + u32 firstVert = buf->Vertices.size(); + buf->Indices.set_used(firstInd + 6); + buf->Vertices.set_used(firstVert + 4); + + tex[0] = (s.LowerRightCorner.X * dim[0]) + 0.5f*dim[0]; // half pixel + tex[1] = (s.LowerRightCorner.Y * dim[1]) + 0.5f*dim[1]; + tex[2] = (s.UpperLeftCorner.Y * dim[1]) - 0.5f*dim[1]; + tex[3] = (s.UpperLeftCorner.X * dim[0]) - 0.5f*dim[0]; + + buf->Vertices[firstVert+0].TCoords.set(tex[0], tex[1]); + buf->Vertices[firstVert+1].TCoords.set(tex[0], tex[2]); + buf->Vertices[firstVert+2].TCoords.set(tex[3], tex[2]); + buf->Vertices[firstVert+3].TCoords.set(tex[3], tex[1]); + + buf->Vertices[firstVert+0].Color = ColorBottom; + buf->Vertices[firstVert+3].Color = ColorBottom; + buf->Vertices[firstVert+1].Color = ColorTop; + buf->Vertices[firstVert+2].Color = ColorTop; + + buf->Indices[firstInd+0] = (u16)firstVert+0; + buf->Indices[firstInd+1] = (u16)firstVert+2; + buf->Indices[firstInd+2] = (u16)firstVert+1; + buf->Indices[firstInd+3] = (u16)firstVert+0; + buf->Indices[firstInd+4] = (u16)firstVert+3; + buf->Indices[firstInd+5] = (u16)firstVert+2; + + wchar_t *tp = 0; + if (i>0) + tp = &Text[i-1]; + + info.Width = (f32)s.getWidth(); + info.bufNo = texno; + info.Kerning = (f32)Font->getKerningWidth(&Text[i], tp); + info.firstInd = firstInd; + info.firstVert = firstVert; + + Symbol.push_back(info); + } +} + + +//! pre render event +void CBillboardTextSceneNode::OnAnimate(u32 timeMs) +{ + ISceneNode::OnAnimate(timeMs); + + if (!IsVisible || !Font || !Mesh) + return; + + ICameraSceneNode* camera = SceneManager->getActiveCamera(); + if (!camera) + return; + + // get text width + f32 textLength = 0.f; + u32 i; + for(i=0; i!=Symbol.size(); ++i) + { + SSymbolInfo &info = Symbol[i]; + textLength += info.Kerning + info.Width; + } + if (textLength<0.0f) + textLength=1.0f; + + //const core::matrix4 &m = camera->getViewFrustum()->Matrices[ video::ETS_VIEW ]; + + // make billboard look to camera + core::vector3df pos = getAbsolutePosition(); + + core::vector3df campos = camera->getAbsolutePosition(); + core::vector3df target = camera->getTarget(); + core::vector3df up = camera->getUpVector(); + core::vector3df view = target - campos; + view.normalize(); + + core::vector3df horizontal = up.crossProduct(view); + if ( horizontal.getLength() == 0 ) + { + horizontal.set(up.Y,up.X,up.Z); + } + + horizontal.normalize(); + core::vector3df space = horizontal; + + horizontal *= 0.5f * Size.Width; + + core::vector3df vertical = horizontal.crossProduct(view); + vertical.normalize(); + vertical *= 0.5f * Size.Height; + + view *= -1.0f; + + // center text + pos += space * (Size.Width * -0.5f); + + for ( i = 0; i!= Symbol.size(); ++i ) + { + SSymbolInfo &info = Symbol[i]; + f32 infw = info.Width / textLength; + f32 infk = info.Kerning / textLength; + f32 w = (Size.Width * infw * 0.5f); + pos += space * w; + + SMeshBuffer* buf = (SMeshBuffer*)Mesh->getMeshBuffer(info.bufNo); + + buf->Vertices[info.firstVert+0].Normal = view; + buf->Vertices[info.firstVert+1].Normal = view; + buf->Vertices[info.firstVert+2].Normal = view; + buf->Vertices[info.firstVert+3].Normal = view; + + buf->Vertices[info.firstVert+0].Pos = pos + (space * w) + vertical; + buf->Vertices[info.firstVert+1].Pos = pos + (space * w) - vertical; + buf->Vertices[info.firstVert+2].Pos = pos - (space * w) - vertical; + buf->Vertices[info.firstVert+3].Pos = pos - (space * w) + vertical; + + pos += space * (Size.Width*infk + w); + } + + // make bounding box + + for (i=0; i< Mesh->getMeshBufferCount() ; ++i) + Mesh->getMeshBuffer(i)->recalculateBoundingBox(); + Mesh->recalculateBoundingBox(); + + BBox = Mesh->getBoundingBox(); + core::matrix4 mat( getAbsoluteTransformation(), core::matrix4::EM4CONST_INVERSE ); + mat.transformBoxEx(BBox); +} + +void CBillboardTextSceneNode::OnRegisterSceneNode() +{ + SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT); + ISceneNode::OnRegisterSceneNode(); +} + + +//! render +void CBillboardTextSceneNode::render() +{ + if ( !Mesh ) + return; + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + + // draw + core::matrix4 mat; + driver->setTransform(video::ETS_WORLD, mat); + + for (u32 i = 0; i < Mesh->getMeshBufferCount(); ++i) + { + driver->setMaterial(Mesh->getMeshBuffer(i)->getMaterial()); + driver->drawMeshBuffer(Mesh->getMeshBuffer(i)); + } + + if ( DebugDataVisible & scene::EDS_BBOX ) + { + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + video::SMaterial m; + m.Lighting = false; + driver->setMaterial(m); + driver->draw3DBox(BBox, video::SColor(0,208,195,152)); + } +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CBillboardTextSceneNode::getBoundingBox() const +{ + return BBox; +} + + +//! sets the size of the billboard +void CBillboardTextSceneNode::setSize(const core::dimension2d<f32>& size) +{ + Size = size; + + if (Size.Width == 0.0f) + Size.Width = 1.0f; + + if (Size.Height == 0.0f ) + Size.Height = 1.0f; + + //f32 avg = (size.Width + size.Height)/6; + //BBox.MinEdge.set(-avg,-avg,-avg); + //BBox.MaxEdge.set(avg,avg,avg); +} + + +video::SMaterial& CBillboardTextSceneNode::getMaterial(u32 i) +{ + if (Mesh && Mesh->getMeshBufferCount() > i ) + return Mesh->getMeshBuffer(i)->getMaterial(); + else + return Material; +} + + +//! returns amount of materials used by this scene node. +u32 CBillboardTextSceneNode::getMaterialCount() const +{ + if (Mesh) + return Mesh->getMeshBufferCount(); + else + return 0; +} + + +//! gets the size of the billboard +const core::dimension2d<f32>& CBillboardTextSceneNode::getSize() const +{ + return Size; +} + + +//! sets the color of the text +void CBillboardTextSceneNode::setTextColor(video::SColor color) +{ + Color = color; +} + +//! Set the color of all vertices of the billboard +//! \param overallColor: the color to set +void CBillboardTextSceneNode::setColor(const video::SColor & overallColor) +{ + if ( !Mesh ) + return; + + for ( u32 i = 0; i != Text.size (); ++i ) + { + const SSymbolInfo &info = Symbol[i]; + SMeshBuffer* buf = (SMeshBuffer*)Mesh->getMeshBuffer(info.bufNo); + buf->Vertices[info.firstVert+0].Color = overallColor; + buf->Vertices[info.firstVert+1].Color = overallColor; + buf->Vertices[info.firstVert+2].Color = overallColor; + buf->Vertices[info.firstVert+3].Color = overallColor; + } +} + + +//! Set the color of the top and bottom vertices of the billboard +//! \param topColor: the color to set the top vertices +//! \param bottomColor: the color to set the bottom vertices +void CBillboardTextSceneNode::setColor(const video::SColor & topColor, const video::SColor & bottomColor) +{ + if ( !Mesh ) + return; + + ColorBottom = bottomColor; + ColorTop = topColor; + for ( u32 i = 0; i != Text.size (); ++i ) + { + const SSymbolInfo &info = Symbol[i]; + SMeshBuffer* buf = (SMeshBuffer*)Mesh->getMeshBuffer(info.bufNo); + buf->Vertices[info.firstVert+0].Color = ColorBottom; + buf->Vertices[info.firstVert+3].Color = ColorBottom; + buf->Vertices[info.firstVert+1].Color = ColorTop; + buf->Vertices[info.firstVert+2].Color = ColorTop; + } +} + + +//! Gets the color of the top and bottom vertices of the billboard +//! \param topColor: stores the color of the top vertices +//! \param bottomColor: stores the color of the bottom vertices +void CBillboardTextSceneNode::getColor(video::SColor & topColor, video::SColor & bottomColor) const +{ + topColor = ColorTop; + bottomColor = ColorBottom; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.h new file mode 100644 index 0000000..5c2e55e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTextSceneNode.h @@ -0,0 +1,160 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_TEXT_SCENE_NODE_H_INCLUDED__ +#define __C_TEXT_SCENE_NODE_H_INCLUDED__ + +#include "ITextSceneNode.h" +#include "IBillboardTextSceneNode.h" +#include "IGUIFont.h" +#include "IGUIFontBitmap.h" +#include "ISceneCollisionManager.h" +#include "SMesh.h" + +namespace irr +{ +namespace scene +{ + + + class CTextSceneNode : public ITextSceneNode + { + public: + + //! constructor + CTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + gui::IGUIFont* font, scene::ISceneCollisionManager* coll, + const core::vector3df& position = core::vector3df(0,0,0), const wchar_t* text=0, + video::SColor color=video::SColor(100,0,0,0)); + + //! destructor + virtual ~CTextSceneNode(); + + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! sets the text string + virtual void setText(const wchar_t* text); + + //! sets the color of the text + virtual void setTextColor(video::SColor color); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; } + + private: + + core::stringw Text; + video::SColor Color; + gui::IGUIFont* Font; + scene::ISceneCollisionManager* Coll; + core::aabbox3d<f32> Box; + }; + + class CBillboardTextSceneNode : public IBillboardTextSceneNode + { + public: + + CBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + gui::IGUIFont* font,const wchar_t* text, + const core::vector3df& position, const core::dimension2d<f32>& size, + video::SColor colorTop, video::SColor shade_bottom); + + //! destructor + virtual ~CBillboardTextSceneNode(); + + //! sets the vertex positions etc + virtual void OnAnimate(u32 timeMs); + + //! registers the node into the transparent pass + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! sets the text string + virtual void setText(const wchar_t* text); + + //! sets the color of the text + virtual void setTextColor(video::SColor color); + + //! sets the size of the billboard + virtual void setSize(const core::dimension2d<f32>& size); + + //! gets the size of the billboard + virtual const core::dimension2d<f32>& getSize() const; + + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; } + + //! Set the color of all vertices of the billboard + //! \param overallColor: the color to set + virtual void setColor(const video::SColor & overallColor); + + //! Set the color of the top and bottom vertices of the billboard + //! \param topColor: the color to set the top vertices + //! \param bottomColor: the color to set the bottom vertices + virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor); + + //! Gets the color of the top and bottom vertices of the billboard + //! \param topColor: stores the color of the top vertices + //! \param bottomColor: stores the color of the bottom vertices + virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const; + + virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) + { + setSize(core::dimension2df(bottomEdgeWidth, height)); + } + + virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const + { + height = Size.Height; + bottomEdgeWidth = Size.Width; + topEdgeWidth = Size.Width; + } + + private: + + core::stringw Text; + video::SColor Color; + gui::IGUIFontBitmap* Font; + + core::dimension2d<f32> Size; + core::aabbox3d<f32> BBox; + video::SMaterial Material; + + video::SColor ColorTop; + video::SColor ColorBottom; + struct SSymbolInfo + { + u32 bufNo; + f32 Width; + f32 Kerning; + u32 firstInd; + u32 firstVert; + }; + + core::array < SSymbolInfo > Symbol; + + SMesh *Mesh; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTimer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTimer.h new file mode 100644 index 0000000..8d8b8b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTimer.h @@ -0,0 +1,108 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_IRR_C_TIMER_H_INCLUDED__ +#define __C_IRR_C_TIMER_H_INCLUDED__ + +#include "ITimer.h" +#include "os.h" + +namespace irr +{ + //! Device independent implementation of the timer + class CTimer : public ITimer + { + public: + + CTimer(bool usePerformanceTimer=true) + { + os::Timer::initTimer(usePerformanceTimer); + } + + //! Returns current real time in milliseconds of the system. + /** This value does not start with 0 when the application starts. + For example in one implementation the value returned could be the + amount of milliseconds which have elapsed since the system was started. */ + virtual u32 getRealTime() const + { + return os::Timer::getRealTime(); + } + + //! Get current time and date in calendar form + virtual RealTimeDate getRealTimeAndDate() const + { + return os::Timer::getRealTimeAndDate(); + } + + //! Returns current virtual time in milliseconds. + /** This value starts with 0 and can be manipulated using setTime(), stopTimer(), + startTimer(), etc. This value depends on the set speed of the timer if the timer + is stopped, etc. If you need the system time, use getRealTime() */ + virtual u32 getTime() const + { + return os::Timer::getTime(); + } + + //! sets current virtual time + virtual void setTime(u32 time) + { + os::Timer::setTime(time); + } + + //! Stops the game timer. + /** The timer is reference counted, which means everything which calls + stopTimer() will also have to call startTimer(), otherwise the timer may not start/stop + corretly again. */ + virtual void stop() + { + os::Timer::stopTimer(); + } + + //! Starts the game timer. + /** The timer is reference counted, which means everything which calls + stopTimer() will also have to call startTimer(), otherwise the timer may not start/stop + corretly again. */ + virtual void start() + { + os::Timer::startTimer(); + } + + //! Sets the speed of the timer + /** The speed is the factor with which the time is running faster or slower then the + real system time. */ + virtual void setSpeed(f32 speed = 1.0f) + { + os::Timer::setSpeed(speed); + } + + //! Returns current speed of the timer + /** The speed is the factor with which the time is running faster or slower then the + real system time. */ + virtual f32 getSpeed() const + { + return os::Timer::getSpeed(); + } + + //! Returns if game timer is currently stopped + virtual bool isStopped() const + { + bool ret = os::Timer::isStopped(); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ret; + } + + //! Advances the virtual time + /** Makes the virtual timer update the time value based on the real time. This is + called automaticly when calling IrrlichtDevice::run(), but you can call it manually + if you don't use this method. */ + virtual void tick() + { + os::Timer::tick(); + } + }; + +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.cpp new file mode 100644 index 0000000..547b249 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.cpp @@ -0,0 +1,80 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CTriangleBBSelector.h" +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CTriangleBBSelector::CTriangleBBSelector(ISceneNode* node) +: CTriangleSelector(node) +{ + #ifdef _DEBUG + setDebugName("CTriangleBBSelector"); + #endif + + Triangles.set_used(12); // a box has 12 triangles. +} + + + +//! Gets all triangles. +void CTriangleBBSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::matrix4* transform) const +{ + if (!SceneNode) + return; + + // construct triangles + const core::aabbox3d<f32>& box = SceneNode->getBoundingBox(); + core::vector3df edges[8]; + box.getEdges(edges); + + Triangles[0].set( edges[3], edges[0], edges[2]); + Triangles[1].set( edges[3], edges[1], edges[0]); + + Triangles[2].set( edges[3], edges[2], edges[7]); + Triangles[3].set( edges[7], edges[2], edges[6]); + + Triangles[4].set( edges[7], edges[6], edges[4]); + Triangles[5].set( edges[5], edges[7], edges[4]); + + Triangles[6].set( edges[5], edges[4], edges[0]); + Triangles[7].set( edges[5], edges[0], edges[1]); + + Triangles[8].set( edges[1], edges[3], edges[7]); + Triangles[9].set( edges[1], edges[7], edges[5]); + + Triangles[10].set(edges[0], edges[6], edges[2]); + Triangles[11].set(edges[0], edges[4], edges[6]); + + // call parent + CTriangleSelector::getTriangles(triangles, arraySize, outTriangleCount, transform); +} + +void CTriangleBBSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, + const core::matrix4* transform) const +{ + return getTriangles(triangles, arraySize, outTriangleCount, transform); +} + +void CTriangleBBSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::line3d<f32>& line, + const core::matrix4* transform) const +{ + return getTriangles(triangles, arraySize, outTriangleCount, transform); +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.h new file mode 100644 index 0000000..c34f57d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleBBSelector.h @@ -0,0 +1,43 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_TRIANGLE_BB_SELECTOR_H_INCLUDED__ +#define __C_TRIANGLE_BB_SELECTOR_H_INCLUDED__ + +#include "CTriangleSelector.h" + +namespace irr +{ +namespace scene +{ + +//! Stupid triangle selector without optimization +class CTriangleBBSelector : public CTriangleSelector +{ +public: + + //! Constructs a selector based on a mesh + CTriangleBBSelector(ISceneNode* node); + + //! Gets all triangles. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::matrix4* transform=0) const; + + //! Gets all triangles which lie within a specific bounding box. + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, const core::matrix4* transform=0) const; + + //! Gets all triangles which have or may have contact with a 3d line. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform=0) const; + +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.cpp new file mode 100644 index 0000000..7b30882 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.cpp @@ -0,0 +1,298 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CTriangleSelector.h" +#include "ISceneNode.h" +#include "IMeshBuffer.h" +#include "IAnimatedMeshSceneNode.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CTriangleSelector::CTriangleSelector(ISceneNode* node) +: SceneNode(node), AnimatedNode(0), LastMeshFrame(0) +{ + #ifdef _DEBUG + setDebugName("CTriangleSelector"); + #endif + + BoundingBox.reset(0.f, 0.f, 0.f); +} + + +//! constructor +CTriangleSelector::CTriangleSelector(const core::aabbox3d<f32>& box, ISceneNode* node) +: SceneNode(node), AnimatedNode(0), LastMeshFrame(0) +{ + #ifdef _DEBUG + setDebugName("CTriangleSelector"); + #endif + + BoundingBox=box; + // TODO +} + + +//! constructor +CTriangleSelector::CTriangleSelector(const IMesh* mesh, ISceneNode* node) +: SceneNode(node), AnimatedNode(0), LastMeshFrame(0) +{ + #ifdef _DEBUG + setDebugName("CTriangleSelector"); + #endif + + createFromMesh(mesh); +} + + +CTriangleSelector::CTriangleSelector(IAnimatedMeshSceneNode* node) +: SceneNode(node), AnimatedNode(node), LastMeshFrame(0) +{ + #ifdef _DEBUG + setDebugName("CTriangleSelector"); + #endif + + if (!AnimatedNode) + return; + + IAnimatedMesh* animatedMesh = AnimatedNode->getMesh(); + if (!animatedMesh) + return; + + LastMeshFrame = (u32)AnimatedNode->getFrameNr(); + IMesh* mesh = animatedMesh->getMesh(LastMeshFrame); + + if (mesh) + createFromMesh(mesh); +} + + +void CTriangleSelector::createFromMesh(const IMesh* mesh) +{ + const u32 cnt = mesh->getMeshBufferCount(); + u32 totalFaceCount = 0; + for (u32 j=0; j<cnt; ++j) + totalFaceCount += mesh->getMeshBuffer(j)->getIndexCount(); + totalFaceCount /= 3; + Triangles.reallocate(totalFaceCount); + BoundingBox.reset(0.f, 0.f, 0.f); + + for (u32 i=0; i<cnt; ++i) + { + const IMeshBuffer* buf = mesh->getMeshBuffer(i); + + const u32 idxCnt = buf->getIndexCount(); + const u16* const indices = buf->getIndices(); + + for (u32 j=0; j<idxCnt; j+=3) + { + Triangles.push_back(core::triangle3df( + buf->getPosition(indices[j+0]), + buf->getPosition(indices[j+1]), + buf->getPosition(indices[j+2]))); + const core::triangle3df& tri = Triangles.getLast(); + BoundingBox.addInternalPoint(tri.pointA); + BoundingBox.addInternalPoint(tri.pointB); + BoundingBox.addInternalPoint(tri.pointC); + } + } +} + + +void CTriangleSelector::updateFromMesh(const IMesh* mesh) const +{ + if (!mesh) + return; + + u32 meshBuffers = mesh->getMeshBufferCount(); + u32 triangleCount = 0; + + BoundingBox.reset(0.f, 0.f, 0.f); + for (u32 i = 0; i < meshBuffers; ++i) + { + IMeshBuffer* buf = mesh->getMeshBuffer(i); + u32 idxCnt = buf->getIndexCount(); + const u16* indices = buf->getIndices(); + + for (u32 index = 0; index < idxCnt; index += 3) + { + core::triangle3df& tri = Triangles[triangleCount++]; + tri.pointA = buf->getPosition(indices[index + 0]); + tri.pointB = buf->getPosition(indices[index + 1]); + tri.pointC = buf->getPosition(indices[index + 2]); + BoundingBox.addInternalPoint(tri.pointA); + BoundingBox.addInternalPoint(tri.pointB); + BoundingBox.addInternalPoint(tri.pointC); + } + } +} + + +void CTriangleSelector::update(void) const +{ + if (!AnimatedNode) + return; //< harmless no-op + + const u32 currentFrame = (u32)AnimatedNode->getFrameNr(); + if (currentFrame == LastMeshFrame) + return; //< Nothing to do + + LastMeshFrame = currentFrame; + IAnimatedMesh * animatedMesh = AnimatedNode->getMesh(); + + if (animatedMesh) + { + IMesh * mesh = animatedMesh->getMesh(LastMeshFrame); + + if (mesh) + updateFromMesh(mesh); + } +} + + +//! Gets all triangles. +void CTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::matrix4* transform) const +{ + // Update my triangles if necessary + update(); + + u32 cnt = Triangles.size(); + if (cnt > (u32)arraySize) + cnt = (u32)arraySize; + + core::matrix4 mat; + if (transform) + mat = *transform; + if (SceneNode) + mat *= SceneNode->getAbsoluteTransformation(); + + for (u32 i=0; i<cnt; ++i) + { + mat.transformVect( triangles[i].pointA, Triangles[i].pointA ); + mat.transformVect( triangles[i].pointB, Triangles[i].pointB ); + mat.transformVect( triangles[i].pointC, Triangles[i].pointC ); + } + + outTriangleCount = cnt; +} + + +//! Gets all triangles which lie within a specific bounding box. +void CTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, + const core::matrix4* transform) const +{ + // Update my triangles if necessary + update(); + + core::matrix4 mat(core::matrix4::EM4CONST_NOTHING); + core::aabbox3df tBox(box); + + if (SceneNode) + { + SceneNode->getAbsoluteTransformation().getInverse(mat); + mat.transformBoxEx(tBox); + } + if (transform) + mat = *transform; + else + mat.makeIdentity(); + if (SceneNode) + mat *= SceneNode->getAbsoluteTransformation(); + + outTriangleCount = 0; + + if (!tBox.intersectsWithBox(BoundingBox)) + return; + + s32 triangleCount = 0; + const u32 cnt = Triangles.size(); + for (u32 i=0; i<cnt; ++i) + { + // This isn't an accurate test, but it's fast, and the + // API contract doesn't guarantee complete accuracy. + if (Triangles[i].isTotalOutsideBox(tBox)) + continue; + + triangles[triangleCount] = Triangles[i]; + mat.transformVect(triangles[triangleCount].pointA); + mat.transformVect(triangles[triangleCount].pointB); + mat.transformVect(triangles[triangleCount].pointC); + + ++triangleCount; + + if (triangleCount == arraySize) + break; + } + + outTriangleCount = triangleCount; +} + + +//! Gets all triangles which have or may have contact with a 3d line. +void CTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, + const core::line3d<f32>& line, + const core::matrix4* transform) const +{ + // Update my triangles if necessary + update(); + + core::aabbox3d<f32> box(line.start); + box.addInternalPoint(line.end); + + // TODO: Could be optimized for line a little bit more. + getTriangles(triangles, arraySize, outTriangleCount, + box, transform); +} + + +//! Returns amount of all available triangles in this selector +s32 CTriangleSelector::getTriangleCount() const +{ + return Triangles.size(); +} + + +/* Get the number of TriangleSelectors that are part of this one. +Only useful for MetaTriangleSelector others return 1 +*/ +u32 CTriangleSelector::getSelectorCount() const +{ + return 1; +} + + +/* Get the TriangleSelector based on index based on getSelectorCount. +Only useful for MetaTriangleSelector others return 'this' or 0 +*/ +ITriangleSelector* CTriangleSelector::getSelector(u32 index) +{ + if (index) + return 0; + else + return this; +} + + +/* Get the TriangleSelector based on index based on getSelectorCount. +Only useful for MetaTriangleSelector others return 'this' or 0 +*/ +const ITriangleSelector* CTriangleSelector::getSelector(u32 index) const +{ + if (index) + return 0; + else + return this; +} + + +} // end namespace scene +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.h new file mode 100644 index 0000000..3d3b5f7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CTriangleSelector.h @@ -0,0 +1,92 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_TRIANGLE_SELECTOR_H_INCLUDED__ +#define __C_TRIANGLE_SELECTOR_H_INCLUDED__ + +#include "ITriangleSelector.h" +#include "IMesh.h" +#include "irrArray.h" +#include "aabbox3d.h" + +namespace irr +{ +namespace scene +{ + +class ISceneNode; +class IAnimatedMeshSceneNode; + +//! Stupid triangle selector without optimization +class CTriangleSelector : public ITriangleSelector +{ +public: + + //! Constructs a selector based on a mesh + CTriangleSelector(ISceneNode* node); + + //! Constructs a selector based on a mesh + CTriangleSelector(const IMesh* mesh, ISceneNode* node); + + //! Constructs a selector based on an animated mesh scene node + //!\param node An animated mesh scene node, which must have a valid mesh + CTriangleSelector(IAnimatedMeshSceneNode* node); + + //! Constructs a selector based on a bounding box + CTriangleSelector(const core::aabbox3d<f32>& box, ISceneNode* node); + + //! Gets all triangles. + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::matrix4* transform=0) const; + + //! Gets all triangles which lie within a specific bounding box. + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + const core::aabbox3d<f32>& box, const core::matrix4* transform=0) const; + + //! Gets all triangles which have or may have contact with a 3d line. + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, + s32& outTriangleCount, const core::line3d<f32>& line, + const core::matrix4* transform=0) const; + + //! Returns amount of all available triangles in this selector + virtual s32 getTriangleCount() const; + + //! Return the scene node associated with a given triangle. + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const { return SceneNode; } + + // Get the number of TriangleSelectors that are part of this one + virtual u32 getSelectorCount() const; + + // Get the TriangleSelector based on index based on getSelectorCount + virtual ITriangleSelector* getSelector(u32 index); + + // Get the TriangleSelector based on index based on getSelectorCount + virtual const ITriangleSelector* getSelector(u32 index) const; + +protected: + //! Create from a mesh + virtual void createFromMesh(const IMesh* mesh); + + //! Update when the mesh has changed + virtual void updateFromMesh(const IMesh* mesh) const; + + //! Update the triangle selector, which will only have an effect if it + //! was built from an animated mesh and that mesh's frame has changed + //! since the last time it was updated. + virtual void update(void) const; + + ISceneNode* SceneNode; + mutable core::array<core::triangle3df> Triangles; // (mutable for CTriangleBBSelector) + mutable core::aabbox3df BoundingBox; // Allows for trivial rejection + + IAnimatedMeshSceneNode* AnimatedNode; + mutable u32 LastMeshFrame; +}; + +} // end namespace scene +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.cpp new file mode 100644 index 0000000..9ae7fb2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.cpp @@ -0,0 +1,132 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CVideoModeList.h" +#include "irrMath.h" + +namespace irr +{ +namespace video +{ + +//! constructor +CVideoModeList::CVideoModeList() +{ + #ifdef _DEBUG + setDebugName("CVideoModeList"); + #endif + + Desktop.depth = 0; + Desktop.size = core::dimension2d<u32>(0,0); +} + + +void CVideoModeList::setDesktop(s32 desktopDepth, const core::dimension2d<u32>& desktopSize) +{ + Desktop.depth = desktopDepth; + Desktop.size = desktopSize; +} + + +//! Gets amount of video modes in the list. +s32 CVideoModeList::getVideoModeCount() const +{ + return (s32)VideoModes.size(); +} + + +//! Returns the screen size of a video mode in pixels. +core::dimension2d<u32> CVideoModeList::getVideoModeResolution(s32 modeNumber) const +{ + if (modeNumber < 0 || modeNumber > (s32)VideoModes.size()) + return core::dimension2d<u32>(0,0); + + return VideoModes[modeNumber].size; +} + + +core::dimension2d<u32> CVideoModeList::getVideoModeResolution( + const core::dimension2d<u32>& minSize, + const core::dimension2d<u32>& maxSize) const +{ + u32 best=VideoModes.size(); + // if only one or no mode + if (best<2) + return getVideoModeResolution(0); + + u32 i; + for (i=0; i<VideoModes.size(); ++i) + { + if (VideoModes[i].size.Width>=minSize.Width && + VideoModes[i].size.Height>=minSize.Height && + VideoModes[i].size.Width<=maxSize.Width && + VideoModes[i].size.Height<=maxSize.Height) + best=i; + } + // we take the last one found, the largest one fitting + if (best<VideoModes.size()) + return VideoModes[best].size; + const u32 minArea = minSize.getArea(); + const u32 maxArea = maxSize.getArea(); + u32 minDist = 0xffffffff; + best=0; + for (i=0; i<VideoModes.size(); ++i) + { + const u32 area = VideoModes[i].size.getArea(); + const u32 dist = core::min_(abs(int(minArea-area)), abs(int(maxArea-area))); + if (dist<minDist) + { + minDist=dist; + best=i; + } + } + return VideoModes[best].size; +} + + +//! Returns the pixel depth of a video mode in bits. +s32 CVideoModeList::getVideoModeDepth(s32 modeNumber) const +{ + if (modeNumber < 0 || modeNumber > (s32)VideoModes.size()) + return 0; + + return VideoModes[modeNumber].depth; +} + + +//! Returns current desktop screen resolution. +const core::dimension2d<u32>& CVideoModeList::getDesktopResolution() const +{ + return Desktop.size; +} + + +//! Returns the pixel depth of a video mode in bits. +s32 CVideoModeList::getDesktopDepth() const +{ + return Desktop.depth; +} + + +//! adds a new mode to the list +void CVideoModeList::addMode(const core::dimension2d<u32>& size, s32 depth) +{ + SVideoMode m; + m.depth = depth; + m.size = size; + + for (u32 i=0; i<VideoModes.size(); ++i) + { + if (VideoModes[i] == m) + return; + } + + VideoModes.push_back(m); + VideoModes.sort(); // TODO: could be replaced by inserting into right place +} + + +} // end namespace video +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.h new file mode 100644 index 0000000..306e11a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CVideoModeList.h @@ -0,0 +1,79 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_C_VIDEO_MODE_LIST_H_INCLUDED__ +#define __IRR_C_VIDEO_MODE_LIST_H_INCLUDED__ + +#include "IVideoModeList.h" +#include "dimension2d.h" +#include "irrArray.h" + +namespace irr +{ +namespace video +{ + + class CVideoModeList : public IVideoModeList + { + public: + + //! constructor + CVideoModeList(); + + //! Gets amount of video modes in the list. + virtual s32 getVideoModeCount() const; + + //! Returns the screen size of a video mode in pixels. + virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const; + + //! Returns the screen size of an optimal video mode in pixels. + virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const; + + //! Returns the pixel depth of a video mode in bits. + virtual s32 getVideoModeDepth(s32 modeNumber) const; + + //! Returns current desktop screen resolution. + virtual const core::dimension2d<u32>& getDesktopResolution() const; + + //! Returns the pixel depth of a video mode in bits. + virtual s32 getDesktopDepth() const; + + //! adds a new mode to the list + void addMode(const core::dimension2d<u32>& size, s32 depth); + + void setDesktop(s32 desktopDepth, const core::dimension2d<u32>& desktopSize); + + private: + + struct SVideoMode + { + core::dimension2d<u32> size; + s32 depth; + + bool operator==(const SVideoMode& other) const + { + return size == other.size && depth == other.depth; + } + + bool operator <(const SVideoMode& other) const + { + return (size.Width < other.size.Width || + (size.Width == other.size.Width && + size.Height < other.size.Height) || + (size.Width == other.size.Width && + size.Height == other.size.Height && + depth < other.depth)); + } + }; + + core::array<SVideoMode> VideoModes; + SVideoMode Desktop; + }; + +} // end namespace video +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.cpp new file mode 100644 index 0000000..966e823 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.cpp @@ -0,0 +1,202 @@ +// Copyright (C) 2007-2012 Dean Wadsworth +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CVolumeLightSceneNode.h" +#include "IVideoDriver.h" +#include "ISceneManager.h" +#include "S3DVertex.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CVolumeLightSceneNode::CVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, + s32 id, const u32 subdivU, const u32 subdivV, + const video::SColor foot, + const video::SColor tail, + const core::vector3df& position, + const core::vector3df& rotation, const core::vector3df& scale) + : IVolumeLightSceneNode(parent, mgr, id, position, rotation, scale), + Mesh(0), LPDistance(8.0f), + SubdivideU(subdivU), SubdivideV(subdivV), + FootColor(foot), TailColor(tail), + LightDimensions(core::vector3df(1.0f, 1.2f, 1.0f)) +{ + #ifdef _DEBUG + setDebugName("CVolumeLightSceneNode"); + #endif + + constructLight(); +} + + +CVolumeLightSceneNode::~CVolumeLightSceneNode() +{ + if (Mesh) + Mesh->drop(); +} + + +void CVolumeLightSceneNode::constructLight() +{ + if (Mesh) + Mesh->drop(); + Mesh = SceneManager->getGeometryCreator()->createVolumeLightMesh(SubdivideU, SubdivideV, FootColor, TailColor, LPDistance, LightDimensions); +} + + +//! renders the node. +void CVolumeLightSceneNode::render() +{ + if (!Mesh) + return; + + video::IVideoDriver* driver = SceneManager->getVideoDriver(); + driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); + + driver->setMaterial(Mesh->getMeshBuffer(0)->getMaterial()); + driver->drawMeshBuffer(Mesh->getMeshBuffer(0)); +} + + +//! returns the axis aligned bounding box of this node +const core::aabbox3d<f32>& CVolumeLightSceneNode::getBoundingBox() const +{ + return Mesh->getBoundingBox(); +} + + +void CVolumeLightSceneNode::OnRegisterSceneNode() +{ + if (IsVisible) + { + SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT); + } + ISceneNode::OnRegisterSceneNode(); +} + + +//! returns the material based on the zero based index i. To get the amount +//! of materials used by this scene node, use getMaterialCount(). +//! This function is needed for inserting the node into the scene hirachy on a +//! optimal position for minimizing renderstate changes, but can also be used +//! to directly modify the material of a scene node. +video::SMaterial& CVolumeLightSceneNode::getMaterial(u32 i) +{ + return Mesh->getMeshBuffer(i)->getMaterial(); +} + + +//! returns amount of materials used by this scene node. +u32 CVolumeLightSceneNode::getMaterialCount() const +{ + return 1; +} + + +void CVolumeLightSceneNode::setSubDivideU (const u32 inU) +{ + if (inU != SubdivideU) + { + SubdivideU = inU; + constructLight(); + } +} + + +void CVolumeLightSceneNode::setSubDivideV (const u32 inV) +{ + if (inV != SubdivideV) + { + SubdivideV = inV; + constructLight(); + } +} + + +void CVolumeLightSceneNode::setFootColor(const video::SColor inColor) +{ + if (inColor != FootColor) + { + FootColor = inColor; + constructLight(); + } +} + + +void CVolumeLightSceneNode::setTailColor(const video::SColor inColor) +{ + if (inColor != TailColor) + { + TailColor = inColor; + constructLight(); + } +} + + +//! Writes attributes of the scene node. +void CVolumeLightSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + ISceneNode::serializeAttributes(out, options); + + out->addFloat("lpDistance", LPDistance); + out->addInt("subDivideU", SubdivideU); + out->addInt("subDivideV", SubdivideV); + + out->addColor("footColor", FootColor); + out->addColor("tailColor", TailColor); + + out->addVector3d("lightDimension", LightDimensions); +} + + +//! Reads attributes of the scene node. +void CVolumeLightSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + LPDistance = in->getAttributeAsFloat("lpDistance"); + LPDistance = core::max_(LPDistance, 8.0f); + + SubdivideU = in->getAttributeAsInt("subDivideU"); + SubdivideU = core::max_(SubdivideU, 1u); + + SubdivideV = in->getAttributeAsInt("subDivideV"); + SubdivideV = core::max_(SubdivideV, 1u); + + FootColor = in->getAttributeAsColor("footColor"); + TailColor = in->getAttributeAsColor("tailColor"); + + LightDimensions = in->getAttributeAsVector3d("lightDimension"); + + constructLight(); + + ISceneNode::deserializeAttributes(in, options); +} + + +//! Creates a clone of this scene node and its children. +ISceneNode* CVolumeLightSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CVolumeLightSceneNode* nb = new CVolumeLightSceneNode(newParent, + newManager, ID, SubdivideU, SubdivideV, FootColor, TailColor, RelativeTranslation); + + nb->cloneMembers(this, newManager); + nb->getMaterial(0) = Mesh->getMeshBuffer(0)->getMaterial(); + + if ( newParent ) + nb->drop(); + return nb; +} + + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.h new file mode 100644 index 0000000..7ee9e3c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CVolumeLightSceneNode.h @@ -0,0 +1,93 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// created by Dean Wadsworth aka Varmint Dec 31 2007 + +#ifndef __VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ +#define __VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ + +#include "IVolumeLightSceneNode.h" +#include "IMesh.h" + +namespace irr +{ +namespace scene +{ + class CVolumeLightSceneNode : public IVolumeLightSceneNode + { + public: + + //! constructor + CVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, + const u32 subdivU = 32, const u32 subdivV = 32, + const video::SColor foot = video::SColor(51, 0, 230, 180), + const video::SColor tail = video::SColor(0, 0, 0, 0), + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + virtual ~CVolumeLightSceneNode(); + + virtual void OnRegisterSceneNode(); + + //! renders the node. + virtual void render(); + + //! returns the axis aligned bounding box of this node + virtual const core::aabbox3d<f32>& getBoundingBox() const; + + //! returns the material based on the zero based index i. + virtual video::SMaterial& getMaterial(u32 i); + + //! returns amount of materials used by this scene node. + virtual u32 getMaterialCount() const; + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; } + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + virtual void setSubDivideU(const u32 inU); + virtual void setSubDivideV(const u32 inV); + + virtual u32 getSubDivideU() const { return SubdivideU; } + virtual u32 getSubDivideV() const { return SubdivideV; } + + virtual void setFootColor(const video::SColor inColor); + virtual void setTailColor(const video::SColor inColor); + + virtual video::SColor getFootColor() const { return FootColor; } + virtual video::SColor getTailColor() const { return TailColor; } + + private: + void constructLight(); + + IMesh* Mesh; + + f32 LPDistance; // Distance to hypothetical lightsource point -- affects fov angle + + u32 SubdivideU; // Number of subdivisions in U and V space. + u32 SubdivideV; // Controls the number of "slices" in the volume. + // NOTE : Total number of polygons = 2 + ((SubdivideU + 1) + (SubdivideV + 1)) * 2 + // Each slice being a quad plus the rectangular plane at the bottom. + + video::SColor FootColor; // Color at the source + video::SColor TailColor; // Color at the end. + + core::vector3df LightDimensions; // LightDimensions.Y Distance of shooting -- Length of beams + // LightDimensions.X and LightDimensions.Z determine the size/dimension of the plane + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.cpp new file mode 100644 index 0000000..9945fc8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.cpp @@ -0,0 +1,263 @@ +// Copyright (C) 2002-2012 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// Code contributed by skreamz + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + +#include "CWADReader.h" +#include "os.h" +#include "coreutil.h" + +namespace irr +{ +namespace io +{ + +//! Constructor +CArchiveLoaderWAD::CArchiveLoaderWAD( io::IFileSystem* fs) +: FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("CArchiveLoaderWAD"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderWAD::isALoadableFileFormat(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "wad" ); +} + + +//! Creates an archive from the filename +/** \param file File handle to check. +\return Pointer to newly created archive, or 0 upon error. */ +IFileArchive* CArchiveLoaderWAD::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + archive = createArchive ( file, ignoreCase, ignorePaths ); + file->drop (); + } + + return archive; +} + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderWAD::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + if ( file ) + { + file->seek ( 0 ); + archive = new CWADReader(file, ignoreCase, ignorePaths); + } + return archive; +} + + +//! Check if the file might be loaded by this class +/** Check might look into the file. +\param file File handle to check. +\return True if file seems to be loadable. */ +bool CArchiveLoaderWAD::isALoadableFileFormat(io::IReadFile* file) const +{ + SWADFileHeader header; + memset(&header, 0, sizeof(header)); + + file->read( &header.tag, 4 ); + + return !strncmp ( header.tag, "WAD2", 4 ) || !strncmp ( header.tag, "WAD3", 4 ); +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderWAD::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return fileType == EFAT_WAD; +} + +void createDir ( const c8 *full ); + + +/*! + WAD Reader +*/ +CWADReader::CWADReader(IReadFile* file, bool ignoreCase, bool ignorePaths) +: CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file) +{ + #ifdef _DEBUG + setDebugName("CWADReader"); + #endif + + if (File) + { + File->grab(); + + Base = File->getFileName(); + Base.replace ( '\\', '/' ); + + // scan local headers + scanLocalHeader(); + + sort(); + } + +#if 0 + for ( u32 i = 0; i < FileList.size(); ++i ) + { + SWADFileEntry &e = FileList[i]; + char buf[128]; + snprintf ( buf, 128, "c:\\h2\\%s", e.wadFileName.c_str() ); + + createDir ( buf ); + FILE * f = fopen ( buf, "wb" ); + if ( 0 == f ) + continue; + + u8 * mem = new u8 [ e.header.disksize ]; + File->seek ( e.header.filepos ); + File->read ( mem, e.header.disksize ); + fwrite ( mem, e.header.disksize, 1, f ); + delete [] mem; + fclose ( f ); + } +#endif + +} + + +CWADReader::~CWADReader() +{ + if (File) + File->drop(); +} + + +//! return the id of the file Archive +const io::path& CWADReader::getArchiveName () const +{ + return Base; +} + +const IFileList* CWADReader::getFileList() const +{ + return this; +} + + +//! scans for a local header, returns false if there is no more local file header. +bool CWADReader::scanLocalHeader() +{ + SWADFileEntryOriginal entry; + SWADFileEntry save; + + memset(&Header, 0, sizeof(SWADFileHeader)); + File->read(&Header, sizeof(SWADFileHeader)); + + if ( 0 == strncmp ( Header.tag, "WAD2", 4 ) ) + WadType = WAD_FORMAT_QUAKE2; + else + if ( 0 == strncmp ( Header.tag, "WAD3", 4 ) ) + WadType = WAD_FORMAT_HALFLIFE; + else + WadType = WAD_FORMAT_UNKNOWN; + + if ( WadType == WAD_FORMAT_UNKNOWN ) + return false; + +#ifdef __BIG_ENDIAN__ + Header.numlumps = os::Byteswap::byteswap(Header.numlumps); + Header.infotableofs = os::Byteswap::byteswap(Header.infotableofs); +#endif + + File->seek ( Header.infotableofs ); + + c8 buf[16]; + for ( u32 i = 0; i < Header.numlumps; ++i ) + { + // read entry + File->read(&entry, sizeof ( SWADFileEntryOriginal )); + entry.name[ sizeof ( entry.name ) - 1 ] = 0; + + save.header = entry; + save.wadFileName = "/"; + save.wadFileName += entry.name; + + if ( WadType == WAD_FORMAT_HALFLIFE ) + { + // don't know about the types! i'm guessing + switch ( entry.type ) + { + case WAD_TYP_MIPTEX_HALFLIFE: + save.wadFileName += ".wal2"; + break; + default: + snprintf ( buf, 16, ".%02d", entry.type ); + save.wadFileName += buf; + break; + } + } + else + if ( WadType == WAD_FORMAT_QUAKE2 ) + { + switch ( entry.type ) + { + case WAD_TYP_MIPTEX: save.wadFileName += ".miptex"; break; + case WAD_TYP_SOUND: save.wadFileName += ".sound"; break; + case WAD_TYP_PALETTE: save.wadFileName += ".palette"; break; + case WAD_TYP_QTEX: save.wadFileName += ".qtex"; break; + case WAD_TYP_QPIC: save.wadFileName += ".qpic"; break; + case WAD_TYP_FONT: save.wadFileName += ".font"; break; + default: + snprintf ( buf, 16, ".%02d", entry.type ); + save.wadFileName += buf; + break; + } + } + + // add file to list + addItem(save.wadFileName,save.header.filepos, save.header.disksize, false ); + //FileInfo.push_back(save); + } + return true; +} + + +//! opens a file by file name +IReadFile* CWADReader::createAndOpenFile(const io::path& filename) +{ + s32 index = findFile(filename, false); + + if (index != -1) + return createAndOpenFile(index); + + return 0; +} + + +//! opens a file by index +IReadFile* CWADReader::createAndOpenFile(u32 index) +{ + if (index >= Files.size() ) + return 0; + + const SFileListEntry &entry = Files[index]; + return createLimitReadFile( entry.FullName, File, entry.Offset, entry.Size ); +} + + + +} // end namespace io +} // end namespace irr + + +#endif // __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.h new file mode 100644 index 0000000..2d51902 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CWADReader.h @@ -0,0 +1,177 @@ +// Copyright (C) 2002-2012 Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_WAD_READER_H_INCLUDED__ +#define __C_WAD_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" +#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + +#include "IReferenceCounted.h" +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "CFileList.h" + + +namespace irr +{ +namespace io +{ + + enum eWADFileTypes + { + WAD_FORMAT_UNKNOWN = 0, + WAD_FORMAT_QUAKE2 = 1, + WAD_FORMAT_HALFLIFE = 2, + + WAD_CMP_NONE = 0, + WAD_CMP_LZSS = 1, + + WAD_TYP_NONE = 0, + WAD_TYP_LABEL = 1, + + WAD_TYP_LUMPY = 64, // 64 + grab command number + WAD_TYP_PALETTE = 64, + WAD_TYP_QTEX = 65, + WAD_TYP_QPIC = 66, + WAD_TYP_SOUND = 67, + WAD_TYP_MIPTEX = 68, + WAD_TYP_MIPTEX_HALFLIFE = 67, + WAD_TYP_FONT = 70, + }; + +// byte-align structures +#include "irrpack.h" + + struct SWADFileHeader + { + c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife + u32 numlumps; + u32 infotableofs; + } PACK_STRUCT; + + struct SWADFileEntryOriginal + { + u32 filepos; + u32 disksize; + u32 size; // uncompressed + u8 type; + u8 compression; + u8 pad[2]; + u8 name[16]; // must be null terminated + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + struct SWADFileEntry + { + io::path simpleFileName; + bool operator < (const SWADFileEntry& other) const + { + return simpleFileName < other.simpleFileName; + } + + io::path wadFileName; + SWADFileEntryOriginal header; + }; + + //! Archiveloader capable of loading WAD Archives + class CArchiveLoaderWAD : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderWAD(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".zip") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + private: + io::IFileSystem* FileSystem; + }; + + + //! reads from WAD + class CWADReader : public IFileArchive, virtual CFileList + { + public: + + CWADReader(IReadFile* file, bool ignoreCase, bool ignorePaths); + virtual ~CWADReader(); + + // file archive methods + + //! return the id of the file Archive + virtual const io::path& getArchiveName() const; + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the class Type + virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_WAD; } + + + private: + + io::path Type; + + //! scans for a local header, returns false if there is no more local file header. + bool scanLocalHeader(); + + //! splits filename from zip file into useful filenames and paths + void extractFilename(SWADFileEntry* entry); + + + io::path Base; + io::path MountPoint; + + IReadFile* File; + + eWADFileTypes WadType; + SWADFileHeader Header; + + //core::array<SWADFileEntry> FileInfo; + + io::IFileSystem* FileSystem; + }; + +} // end namespace io +} // end namespace irr + +#endif + + +#endif // #ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.cpp new file mode 100644 index 0000000..12d20c2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.cpp @@ -0,0 +1,137 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CWaterSurfaceSceneNode.h" +#include "ISceneManager.h" +#include "IMeshManipulator.h" +#include "IMeshCache.h" +#include "S3DVertex.h" +#include "SMesh.h" +#include "os.h" + +namespace irr +{ +namespace scene +{ + +//! constructor +CWaterSurfaceSceneNode::CWaterSurfaceSceneNode(f32 waveHeight, f32 waveSpeed, f32 waveLength, + IMesh* mesh, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position, const core::vector3df& rotation, + const core::vector3df& scale) + : CMeshSceneNode(mesh, parent, mgr, id, position, rotation, scale), + WaveLength(waveLength), WaveSpeed(waveSpeed), WaveHeight(waveHeight), + OriginalMesh(0) +{ + #ifdef _DEBUG + setDebugName("CWaterSurfaceSceneNode"); + #endif + + setMesh(mesh); +} + + +//! destructor +CWaterSurfaceSceneNode::~CWaterSurfaceSceneNode() +{ + // Mesh is dropped in CMeshSceneNode destructor + if (OriginalMesh) + OriginalMesh->drop(); +} + + +//! frame +void CWaterSurfaceSceneNode::OnRegisterSceneNode() +{ + CMeshSceneNode::OnRegisterSceneNode(); +} + + +void CWaterSurfaceSceneNode::OnAnimate(u32 timeMs) +{ + if (Mesh && IsVisible) + { + const u32 meshBufferCount = Mesh->getMeshBufferCount(); + const f32 time = timeMs / WaveSpeed; + + for (u32 b=0; b<meshBufferCount; ++b) + { + const u32 vtxCnt = Mesh->getMeshBuffer(b)->getVertexCount(); + + for (u32 i=0; i<vtxCnt; ++i) + Mesh->getMeshBuffer(b)->getPosition(i).Y = addWave( + OriginalMesh->getMeshBuffer(b)->getPosition(i), + time); + }// end for all mesh buffers + Mesh->setDirty(scene::EBT_VERTEX); + + SceneManager->getMeshManipulator()->recalculateNormals(Mesh); + } + CMeshSceneNode::OnAnimate(timeMs); +} + + +void CWaterSurfaceSceneNode::setMesh(IMesh* mesh) +{ + CMeshSceneNode::setMesh(mesh); + if (!mesh) + return; + if (OriginalMesh) + OriginalMesh->drop(); + IMesh* clone = SceneManager->getMeshManipulator()->createMeshCopy(mesh); + OriginalMesh = mesh; + Mesh = clone; + Mesh->setHardwareMappingHint(scene::EHM_STATIC, scene::EBT_INDEX); +// Mesh->setHardwareMappingHint(scene::EHM_STREAM, scene::EBT_VERTEX); +} + + +//! Writes attributes of the scene node. +void CWaterSurfaceSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const +{ + out->addFloat("WaveLength", WaveLength); + out->addFloat("WaveSpeed", WaveSpeed); + out->addFloat("WaveHeight", WaveHeight); + + CMeshSceneNode::serializeAttributes(out, options); + // serialize original mesh + out->setAttribute("Mesh", SceneManager->getMeshCache()->getMeshName(OriginalMesh).getPath().c_str()); +} + + +//! Reads attributes of the scene node. +void CWaterSurfaceSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + WaveLength = in->getAttributeAsFloat("WaveLength"); + WaveSpeed = in->getAttributeAsFloat("WaveSpeed"); + WaveHeight = in->getAttributeAsFloat("WaveHeight"); + + if (Mesh) + { + Mesh->drop(); + Mesh = OriginalMesh; + OriginalMesh = 0; + } + // deserialize original mesh + CMeshSceneNode::deserializeAttributes(in, options); + + if (Mesh) + { + IMesh* clone = SceneManager->getMeshManipulator()->createMeshCopy(Mesh); + OriginalMesh = Mesh; + Mesh = clone; + } +} + + +f32 CWaterSurfaceSceneNode::addWave(const core::vector3df &source, f32 time) const +{ + return source.Y + + (sinf(((source.X/WaveLength) + time)) * WaveHeight) + + (cosf(((source.Z/WaveLength) + time)) * WaveHeight); +} + +} // end namespace scene +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.h new file mode 100644 index 0000000..f8ce2d0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CWaterSurfaceSceneNode.h @@ -0,0 +1,61 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_WATER_SURFACE_SCENE_NODE_H_INCLUDED__ +#define __C_WATER_SURFACE_SCENE_NODE_H_INCLUDED__ + +#include "CMeshSceneNode.h" + +namespace irr +{ +namespace scene +{ + + class CWaterSurfaceSceneNode : public CMeshSceneNode + { + public: + + //! constructor + CWaterSurfaceSceneNode(f32 waveHeight, f32 waveSpeed, f32 waveLength, + IMesh* mesh, ISceneNode* parent, ISceneManager* mgr, s32 id, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& rotation = core::vector3df(0,0,0), + const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); + + //! destructor + virtual ~CWaterSurfaceSceneNode(); + + //! frame registration + virtual void OnRegisterSceneNode(); + + //! animated update + virtual void OnAnimate(u32 timeMs); + + //! Update mesh + virtual void setMesh(IMesh* mesh); + + //! Returns type of the scene node + virtual ESCENE_NODE_TYPE getType() const { return ESNT_WATER_SURFACE; } + + //! Writes attributes of the scene node. + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; + + //! Reads attributes of the scene node. + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); + + private: + + inline f32 addWave(const core::vector3df &source, f32 time) const; + + f32 WaveLength; + f32 WaveSpeed; + f32 WaveHeight; + IMesh* OriginalMesh; + }; + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.cpp new file mode 100644 index 0000000..f72ef38 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.cpp @@ -0,0 +1,123 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CWriteFile.h" +#include <stdio.h> + +namespace irr +{ +namespace io +{ + + +CWriteFile::CWriteFile(const io::path& fileName, bool append) +: FileSize(0) +{ + #ifdef _DEBUG + setDebugName("CWriteFile"); + #endif + + Filename = fileName; + openFile(append); +} + + + +CWriteFile::~CWriteFile() +{ + if (File) + fclose(File); +} + + + +//! returns if file is open +inline bool CWriteFile::isOpen() const +{ + return File != 0; +} + + + +//! returns how much was read +s32 CWriteFile::write(const void* buffer, u32 sizeToWrite) +{ + if (!isOpen()) + return 0; + + return (s32)fwrite(buffer, 1, sizeToWrite, File); +} + + + +//! changes position in file, returns true if successful +//! if relativeMovement==true, the pos is changed relative to current pos, +//! otherwise from begin of file +bool CWriteFile::seek(long finalPos, bool relativeMovement) +{ + if (!isOpen()) + return false; + + return fseek(File, finalPos, relativeMovement ? SEEK_CUR : SEEK_SET) == 0; +} + + + +//! returns where in the file we are. +long CWriteFile::getPos() const +{ + return ftell(File); +} + + + +//! opens the file +void CWriteFile::openFile(bool append) +{ + if (Filename.size() == 0) + { + File = 0; + return; + } + +#if defined(_IRR_WCHAR_FILESYSTEM) + File = _wfopen(Filename.c_str(), append ? L"ab" : L"wb"); +#else + File = fopen(Filename.c_str(), append ? "ab" : "wb"); +#endif + + if (File) + { + // get FileSize + + fseek(File, 0, SEEK_END); + FileSize = ftell(File); + fseek(File, 0, SEEK_SET); + } +} + + + +//! returns name of file +const io::path& CWriteFile::getFileName() const +{ + return Filename; +} + + + +IWriteFile* createWriteFile(const io::path& fileName, bool append) +{ + CWriteFile* file = new CWriteFile(fileName, append); + if (file->isOpen()) + return file; + + file->drop(); + return 0; +} + + +} // end namespace io +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.h new file mode 100644 index 0000000..b3203ce --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CWriteFile.h @@ -0,0 +1,58 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_WRITE_FILE_H_INCLUDED__ +#define __C_WRITE_FILE_H_INCLUDED__ + +#include <stdio.h> +#include "IWriteFile.h" +#include "irrString.h" + +namespace irr +{ + +namespace io +{ + + /*! + Class for writing a real file to disk. + */ + class CWriteFile : public IWriteFile + { + public: + + CWriteFile(const io::path& fileName, bool append); + + virtual ~CWriteFile(); + + //! Reads an amount of bytes from the file. + virtual s32 write(const void* buffer, u32 sizeToWrite); + + //! Changes position in file, returns true if successful. + virtual bool seek(long finalPos, bool relativeMovement = false); + + //! Returns the current position in the file. + virtual long getPos() const; + + //! Returns name of file. + virtual const io::path& getFileName() const; + + //! returns if file is open + bool isOpen() const; + + private: + + //! opens the file + void openFile(bool append); + + io::path Filename; + FILE* File; + long FileSize; + }; + +} // end namespace io +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.cpp new file mode 100644 index 0000000..bb42800 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.cpp @@ -0,0 +1,70 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CXMLReaderImpl.h" +#include "CXMLReader.h" +#include "IReadFile.h" + +namespace irr +{ +namespace io +{ + //! Irrlicht implementation of the file read callback for the xml parser + class CIrrXMLFileReadCallBack : public IFileReadCallBack + { + public: + + //! construct from FILE pointer + CIrrXMLFileReadCallBack(IReadFile* file) + : ReadFile(file) + { + ReadFile->grab(); + } + + //! destructor + virtual ~CIrrXMLFileReadCallBack() + { + ReadFile->drop(); + } + + //! Reads an amount of bytes from the file. + virtual int read(void* buffer, int sizeToRead) + { + return ReadFile->read(buffer, sizeToRead); + } + + //! Returns size of file in bytes + virtual long getSize() const + { + return ReadFile->getSize(); + } + + private: + + IReadFile* ReadFile; + }; // end class CMyXMLFileReadCallBack + + + // now create an implementation for IXMLReader using irrXML. + + //! Creates an instance of a wide character xml parser. + IXMLReader* createIXMLReader(IReadFile* file) + { + if (!file) + return 0; + + return new CXMLReaderImpl<wchar_t, IReferenceCounted>(new CIrrXMLFileReadCallBack(file)); + } + + //! Creates an instance of an UFT-8 or ASCII character xml parser. + IXMLReaderUTF8* createIXMLReaderUTF8(IReadFile* file) + { + if (!file) + return 0; + + return new CXMLReaderImpl<char, IReferenceCounted>(new CIrrXMLFileReadCallBack(file)); + } + +} // end namespace +} // end namespace diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.h new file mode 100644 index 0000000..f2764f0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReader.h @@ -0,0 +1,26 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_XML_READER_H_INCLUDED__ +#define __C_XML_READER_H_INCLUDED__ + +#include "IXMLReader.h" + +namespace irr +{ +namespace io +{ + class IReadFile; + + //! creates an IXMLReader + IXMLReader* createIXMLReader(IReadFile* file); + + //! creates an IXMLReader + IXMLReaderUTF8* createIXMLReaderUTF8(IReadFile* file); + +} // end namespace irr +} // end namespace io + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReaderImpl.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReaderImpl.h new file mode 100644 index 0000000..cfd89b0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLReaderImpl.h @@ -0,0 +1,821 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h + +#ifndef __ICXML_READER_IMPL_H_INCLUDED__ +#define __ICXML_READER_IMPL_H_INCLUDED__ + +#include "irrXML.h" +#include "irrString.h" +#include "irrArray.h" +#include "fast_atof.h" + +#ifdef _DEBUG +#define IRR_DEBUGPRINT(x) printf((x)); +#else // _DEBUG +#define IRR_DEBUGPRINT(x) +#endif // _DEBUG + + +namespace irr +{ +namespace io +{ + + +//! implementation of the IrrXMLReader +template<class char_type, class superclass> +class CXMLReaderImpl : public IIrrXMLReader<char_type, superclass> +{ +public: + + //! Constructor + CXMLReaderImpl(IFileReadCallBack* callback, bool deleteCallBack = true) + : IgnoreWhitespaceText(true), TextData(0), P(0), TextBegin(0), TextSize(0), CurrentNodeType(EXN_NONE), + SourceFormat(ETF_ASCII), TargetFormat(ETF_ASCII), IsEmptyElement(false) + { + if (!callback) + return; + + storeTargetFormat(); + + // read whole xml file + + readFile(callback); + + // clean up + + if (deleteCallBack) + delete callback; + + // create list with special characters + + createSpecialCharacterList(); + + // set pointer to text begin + P = TextBegin; + } + + + //! Destructor + virtual ~CXMLReaderImpl() + { + delete [] TextData; + } + + + //! Reads forward to the next xml node. + //! \return Returns false, if there was no further node. + virtual bool read() + { + // if not end reached, parse the node + if (P && ((unsigned int)(P - TextBegin) < TextSize - 1) && (*P != 0)) + { + return parseCurrentNode(); + } + + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return false; + } + + + //! Returns the type of the current XML node. + virtual EXML_NODE getNodeType() const + { + return CurrentNodeType; + } + + + //! Returns attribute count of the current XML node. + virtual unsigned int getAttributeCount() const + { + return Attributes.size(); + } + + + //! Returns name of an attribute. + virtual const char_type* getAttributeName(int idx) const + { + if ((u32)idx >= Attributes.size()) + return 0; + + return Attributes[idx].Name.c_str(); + } + + + //! Returns the value of an attribute. + virtual const char_type* getAttributeValue(int idx) const + { + if ((unsigned int)idx >= Attributes.size()) + return 0; + + return Attributes[idx].Value.c_str(); + } + + + //! Returns the value of an attribute. + virtual const char_type* getAttributeValue(const char_type* name) const + { + const SAttribute* attr = getAttributeByName(name); + if (!attr) + return 0; + + return attr->Value.c_str(); + } + + + //! Returns the value of an attribute + virtual const char_type* getAttributeValueSafe(const char_type* name) const + { + const SAttribute* attr = getAttributeByName(name); + if (!attr) + return EmptyString.c_str(); + + return attr->Value.c_str(); + } + + + + //! Returns the value of an attribute as integer. + int getAttributeValueAsInt(const char_type* name) const + { + const SAttribute* attr = getAttributeByName(name); + if (!attr) + return 0; + + core::stringc c(attr->Value.c_str()); + return core::strtol10(c.c_str()); + } + + + //! Returns the value of an attribute as integer. + int getAttributeValueAsInt(int idx) const + { + const char_type* attrvalue = getAttributeValue(idx); + if (!attrvalue) + return 0; + + core::stringc c(attrvalue); + return core::strtol10(c.c_str()); + } + + + //! Returns the value of an attribute as float. + float getAttributeValueAsFloat(const char_type* name) const + { + const SAttribute* attr = getAttributeByName(name); + if (!attr) + return 0; + + core::stringc c = attr->Value.c_str(); + return core::fast_atof(c.c_str()); + } + + + //! Returns the value of an attribute as float. + float getAttributeValueAsFloat(int idx) const + { + const char_type* attrvalue = getAttributeValue(idx); + if (!attrvalue) + return 0; + + core::stringc c = attrvalue; + return core::fast_atof(c.c_str()); + } + + + //! Returns the name of the current node. + virtual const char_type* getNodeName() const + { + return NodeName.c_str(); + } + + + //! Returns data of the current node. + virtual const char_type* getNodeData() const + { + return NodeName.c_str(); + } + + + //! Returns if an element is an empty element, like <foo /> + virtual bool isEmptyElement() const + { + return IsEmptyElement; + } + + //! Returns format of the source xml file. + virtual ETEXT_FORMAT getSourceFormat() const + { + return SourceFormat; + } + + //! Returns format of the strings returned by the parser. + virtual ETEXT_FORMAT getParserFormat() const + { + return TargetFormat; + } + +private: + + // Reads the current xml node + // return false if no further node is found + bool parseCurrentNode() + { + char_type* start = P; + + // more forward until '<' found + while(*P != L'<' && *P) + ++P; + + // not a node, so return false + if (!*P) + return false; + + if (P - start > 0) + { + // we found some text, store it + if (setText(start, P)) + return true; + } + + ++P; + + // based on current token, parse and report next element + switch(*P) + { + case L'/': + parseClosingXMLElement(); + break; + case L'?': + ignoreDefinition(); + break; + case L'!': + if (!parseCDATA()) + parseComment(); + break; + default: + parseOpeningXMLElement(); + break; + } + return true; + } + + + //! sets the state that text was found. Returns true if set should be set + bool setText(char_type* start, char_type* end) + { + // By default xml preserves all whitespace. But Irrlicht dropped some whitespace by default + // in the past which did lead to OS dependent behavior. We just ignore all whitespace for now + // as it's the closest to fixing behavior without breaking downward compatibility too much. + if ( IgnoreWhitespaceText ) + { + char_type* p = start; + for(; p != end; ++p) + if (!isWhiteSpace(*p)) + break; + + if (p == end) + return false; + } + + // set current text to the parsed text, and replace xml special characters + core::string<char_type> s(start, (int)(end - start)); + NodeName = replaceSpecialCharacters(s); + + // current XML node type is text + CurrentNodeType = EXN_TEXT; + + return true; + } + + + + //! ignores an xml definition like <?xml something /> + void ignoreDefinition() + { + CurrentNodeType = EXN_UNKNOWN; + + // move until end marked with '>' reached + while(*P != L'>') + ++P; + + ++P; + } + + + //! parses a comment + void parseComment() + { + CurrentNodeType = EXN_COMMENT; + P += 1; + + char_type *pCommentBegin = P; + + int count = 1; + + // move until end of comment reached + while(count) + { + if (*P == L'>') + --count; + else + if (*P == L'<') + ++count; + + ++P; + } + + P -= 3; + NodeName = core::string<char_type>(pCommentBegin+2, (int)(P - pCommentBegin-2)); + P += 3; + } + + + //! parses an opening xml element and reads attributes + void parseOpeningXMLElement() + { + CurrentNodeType = EXN_ELEMENT; + IsEmptyElement = false; + Attributes.clear(); + + // find name + const char_type* startName = P; + + // find end of element + while(*P != L'>' && !isWhiteSpace(*P)) + ++P; + + const char_type* endName = P; + + // find Attributes + while(*P != L'>') + { + if (isWhiteSpace(*P)) + ++P; + else + { + if (*P != L'/') + { + // we've got an attribute + + // read the attribute names + const char_type* attributeNameBegin = P; + + while(!isWhiteSpace(*P) && *P != L'=') + ++P; + + const char_type* attributeNameEnd = P; + ++P; + + // read the attribute value + // check for quotes and single quotes, thx to murphy + while( (*P != L'\"') && (*P != L'\'') && *P) + ++P; + + if (!*P) // malformatted xml file + return; + + const char_type attributeQuoteChar = *P; + + ++P; + const char_type* attributeValueBegin = P; + + while(*P != attributeQuoteChar && *P) + ++P; + + if (!*P) // malformatted xml file + return; + + const char_type* attributeValueEnd = P; + ++P; + + SAttribute attr; + attr.Name = core::string<char_type>(attributeNameBegin, + (int)(attributeNameEnd - attributeNameBegin)); + + core::string<char_type> s(attributeValueBegin, + (int)(attributeValueEnd - attributeValueBegin)); + + attr.Value = replaceSpecialCharacters(s); + Attributes.push_back(attr); + } + else + { + // tag is closed directly + ++P; + IsEmptyElement = true; + break; + } + } + } + + // check if this tag is closing directly + if (endName > startName && *(endName-1) == L'/') + { + // directly closing tag + IsEmptyElement = true; + endName--; + } + + NodeName = core::string<char_type>(startName, (int)(endName - startName)); + + ++P; + } + + + //! parses an closing xml tag + void parseClosingXMLElement() + { + CurrentNodeType = EXN_ELEMENT_END; + IsEmptyElement = false; + Attributes.clear(); + + ++P; + const char_type* pBeginClose = P; + + while(*P != L'>') + ++P; + + NodeName = core::string<char_type>(pBeginClose, (int)(P - pBeginClose)); + ++P; + } + + //! parses a possible CDATA section, returns false if begin was not a CDATA section + bool parseCDATA() + { + if (*(P+1) != L'[') + return false; + + CurrentNodeType = EXN_CDATA; + + // skip '<![CDATA[' + int count=0; + while( *P && count<8 ) + { + ++P; + ++count; + } + + if (!*P) + return true; + + char_type *cDataBegin = P; + char_type *cDataEnd = 0; + + // find end of CDATA + while(*P && !cDataEnd) + { + if (*P == L'>' && + (*(P-1) == L']') && + (*(P-2) == L']')) + { + cDataEnd = P - 2; + } + + ++P; + } + + if ( cDataEnd ) + NodeName = core::string<char_type>(cDataBegin, (int)(cDataEnd - cDataBegin)); + else + NodeName = ""; + + return true; + } + + + // structure for storing attribute-name pairs + struct SAttribute + { + core::string<char_type> Name; + core::string<char_type> Value; + }; + + // finds a current attribute by name, returns 0 if not found + const SAttribute* getAttributeByName(const char_type* name) const + { + if (!name) + return 0; + + core::string<char_type> n = name; + + for (int i=0; i<(int)Attributes.size(); ++i) + if (Attributes[i].Name == n) + return &Attributes[i]; + + return 0; + } + + // replaces xml special characters in a string and creates a new one + core::string<char_type> replaceSpecialCharacters( + core::string<char_type>& origstr) + { + int pos = origstr.findFirst(L'&'); + int oldPos = 0; + + if (pos == -1) + return origstr; + + core::string<char_type> newstr; + + while(pos != -1 && pos < (int)origstr.size()-2) + { + // check if it is one of the special characters + + int specialChar = -1; + for (int i=0; i<(int)SpecialCharacters.size(); ++i) + { + const char_type* p = &origstr.c_str()[pos]+1; + + if (equalsn(&SpecialCharacters[i][1], p, SpecialCharacters[i].size()-1)) + { + specialChar = i; + break; + } + } + + if (specialChar != -1) + { + newstr.append(origstr.subString(oldPos, pos - oldPos)); + newstr.append(SpecialCharacters[specialChar][0]); + pos += SpecialCharacters[specialChar].size(); + } + else + { + newstr.append(origstr.subString(oldPos, pos - oldPos + 1)); + pos += 1; + } + + // find next & + oldPos = pos; + pos = origstr.findNext(L'&', pos); + } + + if (oldPos < (int)origstr.size()-1) + newstr.append(origstr.subString(oldPos, origstr.size()-oldPos)); + + return newstr; + } + + + + //! reads the xml file and converts it into the wanted character format. + bool readFile(IFileReadCallBack* callback) + { + long size = callback->getSize(); + if (size<0) + return false; + size += 4; // We need four terminating 0's at the end. + // For ASCII we need 1 0's, for UTF-16 2, for UTF-32 4. + + char* data8 = new char[size]; + + if (!callback->read(data8, size-4)) + { + delete [] data8; + return false; + } + + // add zeros at end + + memset(data8+size-4, 0, 4); + + char16* data16 = reinterpret_cast<char16*>(data8); + char32* data32 = reinterpret_cast<char32*>(data8); + + // now we need to convert the data to the desired target format + // based on the byte order mark. + + const unsigned char UTF8[] = {0xEF, 0xBB, 0xBF}; // 0xEFBBBF; + const u16 UTF16_BE = 0xFFFE; + const u16 UTF16_LE = 0xFEFF; + const u32 UTF32_BE = 0xFFFE0000; + const u32 UTF32_LE = 0x0000FEFF; + + // check source for all utf versions and convert to target data format + + if (size >= 4 && data32[0] + == static_cast<char32>(UTF32_BE)) + { + // UTF-32, big endian + SourceFormat = ETF_UTF32_BE; + convertTextData(data32+1, data8, (size/4)-1); // data32+1 because we need to skip the header + } + else + if (size >= 4 && data32[0] == static_cast<char32>(UTF32_LE)) + { + // UTF-32, little endian + SourceFormat = ETF_UTF32_LE; + convertTextData(data32+1, data8, (size/4)-1); // data32+1 because we need to skip the header + } + else + if (size >= 2 && data16[0] == UTF16_BE) + { + // UTF-16, big endian + SourceFormat = ETF_UTF16_BE; + convertTextData(data16+1, data8, (size/2)-1); // data16+1 because we need to skip the header + } + else + if (size >= 2 && data16[0] == UTF16_LE) + { + // UTF-16, little endian + SourceFormat = ETF_UTF16_LE; + convertTextData(data16+1, data8, (size/2)-1); // data16+1 because we need to skip the header + } + else + if (size >= 3 && memcmp(data8,UTF8,3)==0) + { + // UTF-8 + SourceFormat = ETF_UTF8; + convertTextData(data8+3, data8, size-3); // data8+3 because we need to skip the header + } + else + { + // ASCII + SourceFormat = ETF_ASCII; + convertTextData(data8, data8, size); + } + + return true; + } + + + //! converts the text file into the desired format. + /** \param source: begin of the text (without byte order mark) + \param pointerToStore: pointer to text data block which can be + stored or deleted based on the nesessary conversion. + \param sizeWithoutHeader: Text size in characters without header + */ + template<class src_char_type> + void convertTextData(src_char_type* source, char* pointerToStore, int sizeWithoutHeader) + { + // convert little to big endian if necessary + if (sizeof(src_char_type) > 1 && + isLittleEndian(TargetFormat) != isLittleEndian(SourceFormat)) + convertToLittleEndian(source); + + // check if conversion is necessary: + if (sizeof(src_char_type) == sizeof(char_type)) + { + // no need to convert + TextBegin = (char_type*)source; + TextData = (char_type*)pointerToStore; + TextSize = sizeWithoutHeader; + } + else + { + // convert source into target data format. + // TODO: implement a real conversion. This one just + // copies bytes. This is a problem when there are + // unicode symbols using more than one character. + + TextData = new char_type[sizeWithoutHeader]; + + if ( sizeof(src_char_type) == 1 ) + { + // we have to cast away negative numbers or results might add the sign instead of just doing a copy + for (int i=0; i<sizeWithoutHeader; ++i) + { + TextData[i] = static_cast<char_type>(static_cast<unsigned char>(source[i])); + } + } + else + { + for (int i=0; i<sizeWithoutHeader; ++i) + TextData[i] = static_cast<char_type>(source[i]); + } + TextBegin = TextData; + TextSize = sizeWithoutHeader; + + // delete original data because no longer needed + delete [] pointerToStore; + } + } + + //! converts whole text buffer to little endian + template<class src_char_type> + void convertToLittleEndian(src_char_type* t) + { + if (sizeof(src_char_type) == 4) + { + // 32 bit + + while(*t) + { + *t = ((*t & 0xff000000) >> 24) | + ((*t & 0x00ff0000) >> 8) | + ((*t & 0x0000ff00) << 8) | + ((*t & 0x000000ff) << 24); + ++t; + } + } + else + { + // 16 bit + + while(*t) + { + *t = (*t >> 8) | (*t << 8); + ++t; + } + } + } + + //! returns if a format is little endian + inline bool isLittleEndian(ETEXT_FORMAT f) + { + return f == ETF_ASCII || + f == ETF_UTF8 || + f == ETF_UTF16_LE || + f == ETF_UTF32_LE; + } + + + //! returns true if a character is whitespace + inline bool isWhiteSpace(char_type c) + { + return (c==' ' || c=='\t' || c=='\n' || c=='\r'); + } + + + //! generates a list with xml special characters + void createSpecialCharacterList() + { + // list of strings containing special symbols, + // the first character is the special character, + // the following is the symbol string without trailing &. + + SpecialCharacters.push_back("&"); + SpecialCharacters.push_back("<lt;"); + SpecialCharacters.push_back(">gt;"); + SpecialCharacters.push_back("\"quot;"); + SpecialCharacters.push_back("'apos;"); + + } + + + //! compares the first n characters of the strings + bool equalsn(const char_type* str1, const char_type* str2, int len) + { + int i; + for(i=0; str1[i] && str2[i] && i < len; ++i) + if (str1[i] != str2[i]) + return false; + + // if one (or both) of the strings was smaller then they + // are only equal if they have the same lenght + return (i == len) || (str1[i] == 0 && str2[i] == 0); + } + + + //! stores the target text format + void storeTargetFormat() + { + // get target format. We could have done this using template specialization, + // but VisualStudio 6 don't like it and we want to support it. + + switch(sizeof(char_type)) + { + case 1: + TargetFormat = ETF_UTF8; + break; + case 2: + TargetFormat = ETF_UTF16_LE; + break; + case 4: + TargetFormat = ETF_UTF32_LE; + break; + default: + TargetFormat = ETF_ASCII; // should never happen. + } + } + + + // instance variables: + bool IgnoreWhitespaceText; // do not return EXN_TEXT nodes for pure whitespace + char_type* TextData; // data block of the text file + char_type* P; // current point in text to parse + char_type* TextBegin; // start of text to parse + unsigned int TextSize; // size of text to parse in characters, not bytes + + EXML_NODE CurrentNodeType; // type of the currently parsed node + ETEXT_FORMAT SourceFormat; // source format of the xml file + ETEXT_FORMAT TargetFormat; // output format of this parser + + core::string<char_type> NodeName; // name of the node currently in - also used for text + core::string<char_type> EmptyString; // empty string to be returned by getSafe() methods + + bool IsEmptyElement; // is the currently parsed node empty? + + core::array< core::string<char_type> > SpecialCharacters; // see createSpecialCharacterList() + + core::array<SAttribute> Attributes; // attributes of current element + +}; // end CXMLReaderImpl + + +} // end namespace +} // end namespace + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.cpp new file mode 100644 index 0000000..cc294c5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.cpp @@ -0,0 +1,257 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CXMLWriter.h" +#include <wchar.h> +#include "irrString.h" +#include "IrrCompileConfig.h" + +namespace irr +{ +namespace io +{ + + +//! Constructor +CXMLWriter::CXMLWriter(IWriteFile* file) +: File(file), Tabs(0), TextWrittenLast(false) +{ + #ifdef _DEBUG + setDebugName("CXMLWriter"); + #endif + + if (File) + File->grab(); +} + + + +//! Destructor +CXMLWriter::~CXMLWriter() +{ + if (File) + File->drop(); +} + + + +//! Writes a xml 1.0 header like <?xml version="1.0"?> +void CXMLWriter::writeXMLHeader() +{ + if (!File) + return; + + if (sizeof(wchar_t)==2) + { + const u16 h = 0xFEFF; + File->write(&h, 2); + } + else + { + const u32 h = 0x0000FEFF; + File->write(&h, sizeof(wchar_t)); + } + + const wchar_t* const p = L"<?xml version=\"1.0\"?>"; + File->write(p, wcslen(p)*sizeof(wchar_t)); + + writeLineBreak(); + TextWrittenLast = false; +} + + + +//! Writes an xml element with maximal 5 attributes +void CXMLWriter::writeElement(const wchar_t* name, bool empty, + const wchar_t* attr1Name, const wchar_t* attr1Value, + const wchar_t* attr2Name, const wchar_t* attr2Value, + const wchar_t* attr3Name, const wchar_t* attr3Value, + const wchar_t* attr4Name, const wchar_t* attr4Value, + const wchar_t* attr5Name, const wchar_t* attr5Value) +{ + if (!File || !name) + return; + + if (Tabs > 0) + { + for (int i=0; i<Tabs; ++i) + File->write(L"\t", sizeof(wchar_t)); + } + + // write name + + File->write(L"<", sizeof(wchar_t)); + File->write(name, wcslen(name)*sizeof(wchar_t)); + + // write attributes + + writeAttribute(attr1Name, attr1Value); + writeAttribute(attr2Name, attr2Value); + writeAttribute(attr3Name, attr3Value); + writeAttribute(attr4Name, attr4Value); + writeAttribute(attr5Name, attr5Value); + + // write closing tag + if (empty) + File->write(L" />", 3*sizeof(wchar_t)); + else + { + File->write(L">", sizeof(wchar_t)); + ++Tabs; + } + + TextWrittenLast = false; +} + +//! Writes an xml element with any number of attributes +void CXMLWriter::writeElement(const wchar_t* name, bool empty, + core::array<core::stringw> &names, + core::array<core::stringw> &values) +{ + if (!File || !name) + return; + + if (Tabs > 0) + { + for (int i=0; i<Tabs; ++i) + File->write(L"\t", sizeof(wchar_t)); + } + + // write name + + File->write(L"<", sizeof(wchar_t)); + File->write(name, wcslen(name)*sizeof(wchar_t)); + + // write attributes + u32 i=0; + for (; i < names.size() && i < values.size(); ++i) + writeAttribute(names[i].c_str(), values[i].c_str()); + + // write closing tag + if (empty) + File->write(L" />", 3*sizeof(wchar_t)); + else + { + File->write(L">", sizeof(wchar_t)); + ++Tabs; + } + + TextWrittenLast = false; +} + + +void CXMLWriter::writeAttribute(const wchar_t* name, const wchar_t* value) +{ + if (!name || !value) + return; + + File->write(L" ", sizeof(wchar_t)); + File->write(name, wcslen(name)*sizeof(wchar_t)); + File->write(L"=\"", 2*sizeof(wchar_t)); + writeText(value); + File->write(L"\"", sizeof(wchar_t)); +} + + +//! Writes a comment into the xml file +void CXMLWriter::writeComment(const wchar_t* comment) +{ + if (!File || !comment) + return; + + File->write(L"<!--", 4*sizeof(wchar_t)); + writeText(comment); + File->write(L"-->", 3*sizeof(wchar_t)); +} + + +//! Writes the closing tag for an element. Like </foo> +void CXMLWriter::writeClosingTag(const wchar_t* name) +{ + if (!File || !name) + return; + + --Tabs; + + if (Tabs > 0 && !TextWrittenLast) + { + for (int i=0; i<Tabs; ++i) + File->write(L"\t", sizeof(wchar_t)); + } + + File->write(L"</", 2*sizeof(wchar_t)); + File->write(name, wcslen(name)*sizeof(wchar_t)); + File->write(L">", sizeof(wchar_t)); + TextWrittenLast = false; +} + + + +const CXMLWriter::XMLSpecialCharacters XMLWSChar[] = +{ + { L'&', L"&" }, + { L'<', L"<" }, + { L'>', L">" }, + { L'"', L""" }, + { L'\0', 0 } +}; + + +//! Writes a text into the file. All occurrences of special characters like +//! & (&), < (<), > (>), and " (") are automaticly replaced. +void CXMLWriter::writeText(const wchar_t* text) +{ + if (!File || !text) + return; + + // TODO: we have to get rid of that reserve call as well as it slows down xml-writing seriously. + // Making a member-variable would work, but a lot of memory would stay around after writing. + // So the correct solution is probably using fixed block here and always write when that is full. + core::stringw s; + s.reserve(wcslen(text)+1); + const wchar_t* p = text; + + while(*p) + { + // check if it is matching + bool found = false; + for (s32 i=0; XMLWSChar[i].Character != '\0'; ++i) + if (*p == XMLWSChar[i].Character) + { + s.append(XMLWSChar[i].Symbol); + found = true; + break; + } + + if (!found) + s.append(*p); + ++p; + } + + // write new string + File->write(s.c_str(), s.size()*sizeof(wchar_t)); + TextWrittenLast = true; +} + + +//! Writes a line break +void CXMLWriter::writeLineBreak() +{ + if (!File) + return; + +#if defined(_IRR_OSX_PLATFORM_) + File->write(L"\r", sizeof(wchar_t)); +#elif defined(_IRR_WINDOWS_API_) + File->write(L"\r\n", 2*sizeof(wchar_t)); +#else + File->write(L"\n", sizeof(wchar_t)); +#endif + +} + + +} // end namespace irr +} // end namespace io + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.h new file mode 100644 index 0000000..9a69e71 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMLWriter.h @@ -0,0 +1,76 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_XML_WRITER_H_INCLUDED__ +#define __C_XML_WRITER_H_INCLUDED__ + +#include <wchar.h> +#include "IXMLWriter.h" +#include "IWriteFile.h" + +namespace irr +{ +namespace io +{ + + //! Interface providing methods for making it easier to write XML files. + class CXMLWriter : public IXMLWriter + { + public: + + //! Constructor + CXMLWriter(IWriteFile* file); + + //! Destructor + virtual ~CXMLWriter(); + + //! Writes a xml 1.0 header like <?xml version="1.0"?> + virtual void writeXMLHeader(); + + //! Writes an xml element with maximal 5 attributes + virtual void writeElement(const wchar_t* name, bool empty=false, + const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0, + const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0, + const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0, + const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0, + const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0); + + //! Writes an xml element with any number of attributes + virtual void writeElement(const wchar_t* name, bool empty, + core::array<core::stringw> &names, core::array<core::stringw> &values); + + //! Writes a comment into the xml file + virtual void writeComment(const wchar_t* comment); + + //! Writes the closing tag for an element. Like </foo> + virtual void writeClosingTag(const wchar_t* name); + + //! Writes a text into the file. All occurrences of special characters like + //! & (&), < (<), > (>), and " (") are automaticly replaced. + virtual void writeText(const wchar_t* text); + + //! Writes a line break + virtual void writeLineBreak(); + + struct XMLSpecialCharacters + { + wchar_t Character; + const wchar_t* Symbol; + }; + + private: + + void writeAttribute(const wchar_t* att, const wchar_t* name); + + IWriteFile* File; + s32 Tabs; + + bool TextWrittenLast; + }; + +} // end namespace irr +} // end namespace io + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.cpp new file mode 100644 index 0000000..0c4922a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.cpp @@ -0,0 +1,2423 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_X_LOADER_ + +#include "CXMeshFileLoader.h" +#include "os.h" + +#include "fast_atof.h" +#include "coreutil.h" +#include "ISceneManager.h" +#include "IVideoDriver.h" +#include "IFileSystem.h" +#include "IReadFile.h" + +#ifdef _DEBUG +#define _XREADER_DEBUG +#endif +//#define BETTER_MESHBUFFER_SPLITTING_FOR_X + +namespace irr +{ +namespace scene +{ + +//! Constructor +CXMeshFileLoader::CXMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs) +: SceneManager(smgr), FileSystem(fs), AllJoints(0), AnimatedMesh(0), + Buffer(0), P(0), End(0), BinaryNumCount(0), Line(0), + CurFrame(0), MajorVersion(0), MinorVersion(0), BinaryFormat(false), FloatSize(0) +{ + #ifdef _DEBUG + setDebugName("CXMeshFileLoader"); + #endif +} + + +//! returns true if the file maybe is able to be loaded by this class +//! based on the file extension (e.g. ".bsp") +bool CXMeshFileLoader::isALoadableFileExtension(const io::path& filename) const +{ + return core::hasFileExtension ( filename, "x" ); +} + + +//! creates/loads an animated mesh from the file. +//! \return Pointer to the created mesh. Returns 0 if loading failed. +//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). +//! See IReferenceCounted::drop() for more information. +IAnimatedMesh* CXMeshFileLoader::createMesh(io::IReadFile* f) +{ + if (!f) + return 0; + +#ifdef _XREADER_DEBUG + u32 time = os::Timer::getRealTime(); +#endif + + AnimatedMesh = new CSkinnedMesh(); + + if (load(f)) + { + AnimatedMesh->finalize(); + } + else + { + AnimatedMesh->drop(); + AnimatedMesh = 0; + } +#ifdef _XREADER_DEBUG + time = os::Timer::getRealTime() - time; + core::stringc tmpString = "Time to load "; + tmpString += BinaryFormat ? "binary" : "ascii"; + tmpString += " X file: "; + tmpString += time; + tmpString += "ms"; + os::Printer::log(tmpString.c_str()); +#endif + //Clear up + + MajorVersion=0; + MinorVersion=0; + BinaryFormat=0; + BinaryNumCount=0; + FloatSize=0; + P=0; + End=0; + CurFrame=0; + TemplateMaterials.clear(); + + delete [] Buffer; + Buffer = 0; + + for (u32 i=0; i<Meshes.size(); ++i) + delete Meshes[i]; + Meshes.clear(); + + return AnimatedMesh; +} + + +bool CXMeshFileLoader::load(io::IReadFile* file) +{ + if (!readFileIntoMemory(file)) + return false; + + if (!parseFile()) + return false; + + for (u32 n=0; n<Meshes.size(); ++n) + { + SXMesh *mesh=Meshes[n]; + + // default material if nothing loaded + if (!mesh->Materials.size()) + { + mesh->Materials.push_back(video::SMaterial()); + mesh->Materials[0].DiffuseColor.set(0xff777777); + mesh->Materials[0].Shininess=0.f; + mesh->Materials[0].SpecularColor.set(0xff777777); + mesh->Materials[0].EmissiveColor.set(0xff000000); + } + + u32 i; + + mesh->Buffers.reallocate(mesh->Materials.size()); +#ifndef BETTER_MESHBUFFER_SPLITTING_FOR_X + const u32 bufferOffset = AnimatedMesh->getMeshBufferCount(); +#endif + for (i=0; i<mesh->Materials.size(); ++i) + { + mesh->Buffers.push_back( AnimatedMesh->addMeshBuffer() ); + mesh->Buffers.getLast()->Material = mesh->Materials[i]; + + if (!mesh->HasSkinning) + { + //Set up rigid animation + if (mesh->AttachedJointID!=-1) + { + AnimatedMesh->getAllJoints()[mesh->AttachedJointID]->AttachedMeshes.push_back( AnimatedMesh->getMeshBuffers().size()-1 ); + } + } + } + + if (!mesh->FaceMaterialIndices.size()) + { + mesh->FaceMaterialIndices.set_used(mesh->Indices.size() / 3); + for (i=0; i<mesh->FaceMaterialIndices.size(); ++i) + mesh->FaceMaterialIndices[i]=0; + } + + if (!mesh->HasVertexColors) + { + for (u32 j=0;j<mesh->FaceMaterialIndices.size();++j) + { + for (u32 id=j*3+0;id<=j*3+2;++id) + { + mesh->Vertices[ mesh->Indices[id] ].Color = mesh->Buffers[mesh->FaceMaterialIndices[j]]->Material.DiffuseColor; + } + } + } + + #ifdef BETTER_MESHBUFFER_SPLITTING_FOR_X + { + //the same vertex can be used in many different meshbuffers, but it's slow to work out + + core::array< core::array< u32 > > verticesLinkIndex; + verticesLinkIndex.reallocate(mesh->Vertices.size()); + core::array< core::array< u16 > > verticesLinkBuffer; + verticesLinkBuffer.reallocate(mesh->Vertices.size()); + + for (i=0;i<mesh->Vertices.size();++i) + { + verticesLinkIndex.push_back( core::array< u32 >() ); + verticesLinkBuffer.push_back( core::array< u16 >() ); + } + + for (i=0;i<mesh->FaceMaterialIndices.size();++i) + { + for (u32 id=i*3+0;id<=i*3+2;++id) + { + core::array< u16 > &Array=verticesLinkBuffer[ mesh->Indices[id] ]; + bool found=false; + + for (u32 j=0; j < Array.size(); ++j) + { + if (Array[j]==mesh->FaceMaterialIndices[i]) + { + found=true; + break; + } + } + + if (!found) + Array.push_back( mesh->FaceMaterialIndices[i] ); + } + } + + for (i=0;i<verticesLinkBuffer.size();++i) + { + if (!verticesLinkBuffer[i].size()) + verticesLinkBuffer[i].push_back(0); + } + + for (i=0;i<mesh->Vertices.size();++i) + { + core::array< u16 > &Array = verticesLinkBuffer[i]; + verticesLinkIndex[i].reallocate(Array.size()); + for (u32 j=0; j < Array.size(); ++j) + { + scene::SSkinMeshBuffer *buffer = mesh->Buffers[ Array[j] ]; + verticesLinkIndex[i].push_back( buffer->Vertices_Standard.size() ); + buffer->Vertices_Standard.push_back( mesh->Vertices[i] ); + } + } + + for (i=0;i<mesh->FaceMaterialIndices.size();++i) + { + scene::SSkinMeshBuffer *buffer=mesh->Buffers[ mesh->FaceMaterialIndices[i] ]; + + for (u32 id=i*3+0;id<=i*3+2;++id) + { + core::array< u16 > &Array=verticesLinkBuffer[ mesh->Indices[id] ]; + + for (u32 j=0;j< Array.size() ;++j) + { + if ( Array[j]== mesh->FaceMaterialIndices[i] ) + buffer->Indices.push_back( verticesLinkIndex[ mesh->Indices[id] ][j] ); + } + } + } + + for (u32 j=0;j<mesh->WeightJoint.size();++j) + { + ISkinnedMesh::SJoint* joint = AnimatedMesh->getAllJoints()[mesh->WeightJoint[j]]; + ISkinnedMesh::SWeight& weight = joint->Weights[mesh->WeightNum[j]]; + + u32 id = weight.vertex_id; + + if (id>=verticesLinkIndex.size()) + { + os::Printer::log("X loader: Weight id out of range", ELL_WARNING); + id=0; + weight.strength=0.f; + } + + if (verticesLinkBuffer[id].size()==1) + { + weight.vertex_id=verticesLinkIndex[id][0]; + weight.buffer_id=verticesLinkBuffer[id][0]; + } + else if (verticesLinkBuffer[id].size() != 0) + { + for (u32 k=1; k < verticesLinkBuffer[id].size(); ++k) + { + ISkinnedMesh::SWeight* WeightClone = AnimatedMesh->addWeight(joint); + WeightClone->strength = weight.strength; + WeightClone->vertex_id = verticesLinkIndex[id][k]; + WeightClone->buffer_id = verticesLinkBuffer[id][k]; + } + } + } + } + #else + { + core::array< u32 > verticesLinkIndex; + core::array< s16 > verticesLinkBuffer; + verticesLinkBuffer.set_used(mesh->Vertices.size()); + + // init with 0 + for (i=0;i<mesh->Vertices.size();++i) + { + // watch out for vertices which are not part of the mesh + // they will keep the -1 and can lead to out-of-bounds access + verticesLinkBuffer[i]=-1; + } + + bool warned = false; + // store meshbuffer number per vertex + for (i=0;i<mesh->FaceMaterialIndices.size();++i) + { + for (u32 id=i*3+0;id<=i*3+2;++id) + { + if ((verticesLinkBuffer[mesh->Indices[id]] != -1) && (verticesLinkBuffer[mesh->Indices[id]] != (s16)mesh->FaceMaterialIndices[i])) + { + if (!warned) + { + os::Printer::log("X loader", "Duplicated vertex, animation might be corrupted.", ELL_WARNING); + warned=true; + } + const u32 tmp = mesh->Vertices.size(); + mesh->Vertices.push_back(mesh->Vertices[ mesh->Indices[id] ]); + mesh->Indices[id] = tmp; + verticesLinkBuffer.set_used(mesh->Vertices.size()); + } + verticesLinkBuffer[ mesh->Indices[id] ] = mesh->FaceMaterialIndices[i]; + } + } + + if (mesh->FaceMaterialIndices.size() != 0) + { + // store vertices in buffers and remember relation in verticesLinkIndex + u32* vCountArray = new u32[mesh->Buffers.size()]; + memset(vCountArray, 0, mesh->Buffers.size()*sizeof(u32)); + // count vertices in each buffer and reallocate + for (i=0; i<mesh->Vertices.size(); ++i) + { + if (verticesLinkBuffer[i] != -1) + ++vCountArray[verticesLinkBuffer[i]]; + } + if (mesh->TCoords2.size()) + { + for (i=0; i!=mesh->Buffers.size(); ++i) + { + mesh->Buffers[i]->Vertices_2TCoords.reallocate(vCountArray[i]); + mesh->Buffers[i]->VertexType=video::EVT_2TCOORDS; + } + } + else + { + for (i=0; i!=mesh->Buffers.size(); ++i) + mesh->Buffers[i]->Vertices_Standard.reallocate(vCountArray[i]); + } + + verticesLinkIndex.set_used(mesh->Vertices.size()); + // actually store vertices + for (i=0; i<mesh->Vertices.size(); ++i) + { + // if a vertex is missing for some reason, just skip it + if (verticesLinkBuffer[i]==-1) + continue; + scene::SSkinMeshBuffer *buffer = mesh->Buffers[ verticesLinkBuffer[i] ]; + + if (mesh->TCoords2.size()) + { + verticesLinkIndex[i] = buffer->Vertices_2TCoords.size(); + buffer->Vertices_2TCoords.push_back( mesh->Vertices[i] ); + // We have a problem with correct tcoord2 handling here + // crash fixed for now by checking the values + buffer->Vertices_2TCoords.getLast().TCoords2=(i<mesh->TCoords2.size())?mesh->TCoords2[i]:mesh->Vertices[i].TCoords; + } + else + { + verticesLinkIndex[i] = buffer->Vertices_Standard.size(); + buffer->Vertices_Standard.push_back( mesh->Vertices[i] ); + } + } + + // count indices per buffer and reallocate + memset(vCountArray, 0, mesh->Buffers.size()*sizeof(u32)); + for (i=0; i<mesh->FaceMaterialIndices.size(); ++i) + ++vCountArray[ mesh->FaceMaterialIndices[i] ]; + for (i=0; i!=mesh->Buffers.size(); ++i) + mesh->Buffers[i]->Indices.reallocate(vCountArray[i]); + delete [] vCountArray; + // create indices per buffer + for (i=0; i<mesh->FaceMaterialIndices.size(); ++i) + { + scene::SSkinMeshBuffer *buffer = mesh->Buffers[ mesh->FaceMaterialIndices[i] ]; + for (u32 id=i*3+0; id!=i*3+3; ++id) + { + buffer->Indices.push_back( verticesLinkIndex[ mesh->Indices[id] ] ); + } + } + } + + for (u32 j=0; j<mesh->WeightJoint.size(); ++j) + { + ISkinnedMesh::SWeight& weight = (AnimatedMesh->getAllJoints()[mesh->WeightJoint[j]]->Weights[mesh->WeightNum[j]]); + + u32 id = weight.vertex_id; + + if (id>=verticesLinkIndex.size()) + { + os::Printer::log("X loader: Weight id out of range", ELL_WARNING); + id=0; + weight.strength=0.f; + } + + weight.vertex_id=verticesLinkIndex[id]; + weight.buffer_id=verticesLinkBuffer[id] + bufferOffset; + } + } + #endif + + } + + return true; +} + + +//! Reads file into memory +bool CXMeshFileLoader::readFileIntoMemory(io::IReadFile* file) +{ + const long size = file->getSize(); + if (size < 12) + { + os::Printer::log("X File is too small.", ELL_WARNING); + return false; + } + + Buffer = new c8[size]; + + //! read all into memory + if (file->read(Buffer, size) != size) + { + os::Printer::log("Could not read from x file.", ELL_WARNING); + return false; + } + + Line = 1; + End = Buffer + size; + + //! check header "xof " + if (strncmp(Buffer, "xof ", 4)!=0) + { + os::Printer::log("Not an x file, wrong header.", ELL_WARNING); + return false; + } + + //! read minor and major version, e.g. 0302 or 0303 + c8 tmp[3]; + tmp[0] = Buffer[4]; + tmp[1] = Buffer[5]; + tmp[2] = 0x0; + MajorVersion = core::strtoul10(tmp); + + tmp[0] = Buffer[6]; + tmp[1] = Buffer[7]; + MinorVersion = core::strtoul10(tmp); + + //! read format + if (strncmp(&Buffer[8], "txt ", 4) ==0) + BinaryFormat = false; + else if (strncmp(&Buffer[8], "bin ", 4) ==0) + BinaryFormat = true; + else + { + os::Printer::log("Only uncompressed x files currently supported.", ELL_WARNING); + return false; + } + BinaryNumCount=0; + + //! read float size + if (strncmp(&Buffer[12], "0032", 4) ==0) + FloatSize = 4; + else if (strncmp(&Buffer[12], "0064", 4) ==0) + FloatSize = 8; + else + { + os::Printer::log("Float size not supported.", ELL_WARNING); + return false; + } + + P = &Buffer[16]; + + readUntilEndOfLine(); + FilePath = FileSystem->getFileDir(file->getFileName()) + "/"; + + return true; +} + + +//! Parses the file +bool CXMeshFileLoader::parseFile() +{ + while(parseDataObject()) + { + // loop + } + + return true; +} + + +//! Parses the next Data object in the file +bool CXMeshFileLoader::parseDataObject() +{ + core::stringc objectName = getNextToken(); + + if (objectName.size() == 0) + return false; + + // parse specific object +#ifdef _XREADER_DEBUG + os::Printer::log("debug DataObject:", objectName.c_str(), ELL_DEBUG); +#endif + + if (objectName == "template") + return parseDataObjectTemplate(); + else + if (objectName == "Frame") + { + return parseDataObjectFrame( 0 ); + } + else + if (objectName == "Mesh") + { + // some meshes have no frames at all + //CurFrame = AnimatedMesh->addJoint(0); + + SXMesh *mesh=new SXMesh; + + //mesh->Buffer=AnimatedMesh->addMeshBuffer(); + Meshes.push_back(mesh); + + return parseDataObjectMesh(*mesh); + } + else + if (objectName == "AnimationSet") + { + return parseDataObjectAnimationSet(); + } + else + if (objectName == "Material") + { + // template materials now available thanks to joeWright + TemplateMaterials.push_back(SXTemplateMaterial()); + TemplateMaterials.getLast().Name = getNextToken(); + return parseDataObjectMaterial(TemplateMaterials.getLast().Material); + } + else + if (objectName == "}") + { + os::Printer::log("} found in dataObject", ELL_WARNING); + return true; + } + + os::Printer::log("Unknown data object in animation of .x file", objectName.c_str(), ELL_WARNING); + + return parseUnknownDataObject(); +} + + +bool CXMeshFileLoader::parseDataObjectTemplate() +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading template", ELL_DEBUG); +#endif + + // parse a template data object. Currently not stored. + core::stringc name; + + if (!readHeadOfDataObject(&name)) + { + os::Printer::log("Left delimiter in template data object missing.", + name.c_str(), ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read GUID + getNextToken(); + + // read and ignore data members + while(true) + { + core::stringc s = getNextToken(); + + if (s == "}") + break; + + if (s.size() == 0) + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectFrame(CSkinnedMesh::SJoint *Parent) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading frame", ELL_DEBUG); +#endif + + // A coordinate frame, or "frame of reference." The Frame template + // is open and can contain any object. The Direct3D extensions (D3DX) + // mesh-loading functions recognize Mesh, FrameTransformMatrix, and + // Frame template instances as child objects when loading a Frame + // instance. + + u32 JointID=0; + + core::stringc name; + + if (!readHeadOfDataObject(&name)) + { + os::Printer::log("No opening brace in Frame found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + CSkinnedMesh::SJoint *joint=0; + + if (name.size()) + { + for (u32 n=0; n < AnimatedMesh->getAllJoints().size(); ++n) + { + if (AnimatedMesh->getAllJoints()[n]->Name==name) + { + joint=AnimatedMesh->getAllJoints()[n]; + JointID=n; + break; + } + } + } + + if (!joint) + { +#ifdef _XREADER_DEBUG + os::Printer::log("creating joint ", name.c_str(), ELL_DEBUG); +#endif + joint=AnimatedMesh->addJoint(Parent); + joint->Name=name; + JointID=AnimatedMesh->getAllJoints().size()-1; + } + else + { +#ifdef _XREADER_DEBUG + os::Printer::log("using joint ", name.c_str(), ELL_DEBUG); +#endif + if (Parent) + Parent->Children.push_back(joint); + } + + // Now inside a frame. + // read tokens until closing brace is reached. + + while(true) + { + core::stringc objectName = getNextToken(); + +#ifdef _XREADER_DEBUG + os::Printer::log("debug DataObject in frame:", objectName.c_str(), ELL_DEBUG); +#endif + + if (objectName.size() == 0) + { + os::Printer::log("Unexpected ending found in Frame in x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + else + if (objectName == "}") + { + break; // frame finished + } + else + if (objectName == "Frame") + { + + if (!parseDataObjectFrame(joint)) + return false; + } + else + if (objectName == "FrameTransformMatrix") + { + if (!parseDataObjectTransformationMatrix(joint->LocalMatrix)) + return false; + + //joint->LocalAnimatedMatrix + //joint->LocalAnimatedMatrix.makeInverse(); + //joint->LocalMatrix=tmp*joint->LocalAnimatedMatrix; + } + else + if (objectName == "Mesh") + { + /* + frame.Meshes.push_back(SXMesh()); + if (!parseDataObjectMesh(frame.Meshes.getLast())) + return false; + */ + SXMesh *mesh=new SXMesh; + + mesh->AttachedJointID=JointID; + + Meshes.push_back(mesh); + + if (!parseDataObjectMesh(*mesh)) + return false; + } + else + { + os::Printer::log("Unknown data object in frame in x file", objectName.c_str(), ELL_WARNING); + if (!parseUnknownDataObject()) + return false; + } + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectTransformationMatrix(core::matrix4 &mat) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading Transformation Matrix", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Transformation Matrix found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + readMatrix(mat); + + if (!checkForOneFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Transformation Matrix found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in Transformation Matrix found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh) +{ + core::stringc name; + + if (!readHeadOfDataObject(&name)) + { +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading mesh", ELL_DEBUG); +#endif + os::Printer::log("No opening brace in Mesh found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading mesh", name.c_str(), ELL_DEBUG); +#endif + + // read vertex count + const u32 nVertices = readInt(); + + // read vertices + mesh.Vertices.set_used(nVertices); + for (u32 n=0; n<nVertices; ++n) + { + readVector3(mesh.Vertices[n].Pos); + mesh.Vertices[n].Color=0xFFFFFFFF; + } + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Mesh Vertex Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + // read faces + const u32 nFaces = readInt(); + + mesh.Indices.set_used(nFaces * 3); + mesh.IndexCountPerFace.set_used(nFaces); + + core::array<u32> polygonfaces; + u32 currentIndex = 0; + + for (u32 k=0; k<nFaces; ++k) + { + const u32 fcnt = readInt(); + + if (fcnt != 3) + { + if (fcnt < 3) + { + os::Printer::log("Invalid face count (<3) found in Mesh x file reader.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read face indices + polygonfaces.set_used(fcnt); + u32 triangles = (fcnt-2); + mesh.Indices.set_used(mesh.Indices.size() + ((triangles-1)*3)); + mesh.IndexCountPerFace[k] = (u16)(triangles * 3); + + for (u32 f=0; f<fcnt; ++f) + polygonfaces[f] = readInt(); + + for (u32 jk=0; jk<triangles; ++jk) + { + mesh.Indices[currentIndex++] = polygonfaces[0]; + mesh.Indices[currentIndex++] = polygonfaces[jk+1]; + mesh.Indices[currentIndex++] = polygonfaces[jk+2]; + } + + // TODO: change face indices in material list + } + else + { + mesh.Indices[currentIndex++] = readInt(); + mesh.Indices[currentIndex++] = readInt(); + mesh.Indices[currentIndex++] = readInt(); + mesh.IndexCountPerFace[k] = 3; + } + } + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Mesh Face Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + // here, other data objects may follow + + while(true) + { + core::stringc objectName = getNextToken(); + + if (objectName.size() == 0) + { + os::Printer::log("Unexpected ending found in Mesh in x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + else + if (objectName == "}") + { + break; // mesh finished + } + +#ifdef _XREADER_DEBUG + os::Printer::log("debug DataObject in mesh:", objectName.c_str(), ELL_DEBUG); +#endif + + if (objectName == "MeshNormals") + { + if (!parseDataObjectMeshNormals(mesh)) + return false; + } + else + if (objectName == "MeshTextureCoords") + { + if (!parseDataObjectMeshTextureCoords(mesh)) + return false; + } + else + if (objectName == "MeshVertexColors") + { + if (!parseDataObjectMeshVertexColors(mesh)) + return false; + } + else + if (objectName == "MeshMaterialList") + { + if (!parseDataObjectMeshMaterialList(mesh)) + return false; + } + else + if (objectName == "VertexDuplicationIndices") + { + // we'll ignore vertex duplication indices + // TODO: read them + if (!parseUnknownDataObject()) + return false; + } + else + if (objectName == "DeclData") + { + // arbitrary vertex attributes + // first comes the number of element definitions + // then the vertex element type definitions + // with format type;tesselator;semantics;usageindex + // we want to support 2;0;6;0 == tangent + // 2;0;7;0 == binormal + // 2;0;3;0 == normal + // 1/2;0;5;0 == 1st uv coord + // and 1/2;0;5;1 == 2nd uv coord + // type==2 is 3xf32, type==1 is 2xf32 + u32 j; + const u32 dcnt = readInt(); + u16 size = 0; + s16 normalpos = -1; + s16 uvpos = -1; + s16 uv2pos = -1; + s16 tangentpos = -1; + s16 binormalpos = -1; + s16 normaltype = -1; + s16 uvtype = -1; + s16 uv2type = -1; + s16 tangenttype = -1; + s16 binormaltype = -1; + for (j=0; j<dcnt; ++j) + { + const u32 type = readInt(); + //const u32 tesselator = readInt(); + readInt(); + const u32 semantics = readInt(); + const u32 index = readInt(); + switch (semantics) + { + case 3: + normalpos = size; + normaltype = type; + break; + case 5: + if (index==0) + { + uvpos = size; + uvtype = type; + } + else if (index==1) + { + uv2pos = size; + uv2type = type; + } + break; + case 6: + tangentpos = size; + tangenttype = type; + break; + case 7: + binormalpos = size; + binormaltype = type; + break; + default: + break; + } + switch (type) + { + case 0: + size += 4; + break; + case 1: + size += 8; + break; + case 2: + size += 12; + break; + case 3: + size += 16; + break; + case 4: + case 5: + case 6: + size += 4; + break; + case 7: + size += 8; + break; + case 8: + case 9: + size += 4; + break; + case 10: + size += 8; + break; + case 11: + size += 4; + break; + case 12: + size += 8; + break; + case 13: + size += 4; + break; + case 14: + size += 4; + break; + case 15: + size += 4; + break; + case 16: + size += 8; + break; + } + } + const u32 datasize = readInt(); + u32* data = new u32[datasize]; + for (j=0; j<datasize; ++j) + data[j]=readInt(); + + if (!checkForOneFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in DeclData found.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in DeclData.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + delete [] data; + return false; + } + u8* dataptr = (u8*) data; + if ((uv2pos != -1) && (uv2type == 1)) + mesh.TCoords2.reallocate(mesh.Vertices.size()); + for (j=0; j<mesh.Vertices.size(); ++j) + { + if ((normalpos != -1) && (normaltype == 2)) + mesh.Vertices[j].Normal.set(*((core::vector3df*)(dataptr+normalpos))); + if ((uvpos != -1) && (uvtype == 1)) + mesh.Vertices[j].TCoords.set(*((core::vector2df*)(dataptr+uvpos))); + if ((uv2pos != -1) && (uv2type == 1)) + mesh.TCoords2.push_back(*((core::vector2df*)(dataptr+uv2pos))); + dataptr += size; + } + delete [] data; + } + else + if (objectName == "FVFData") + { + if (!readHeadOfDataObject()) + { + os::Printer::log("No starting brace in FVFData found.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + const u32 dataformat = readInt(); + const u32 datasize = readInt(); + u32* data = new u32[datasize]; + for (u32 j=0; j<datasize; ++j) + data[j]=readInt(); + if (dataformat&0x102) // 2nd uv set + { + mesh.TCoords2.reallocate(mesh.Vertices.size()); + u8* dataptr = (u8*) data; + const u32 size=((dataformat>>8)&0xf)*sizeof(core::vector2df); + for (u32 j=0; j<mesh.Vertices.size(); ++j) + { + mesh.TCoords2.push_back(*((core::vector2df*)(dataptr))); + dataptr += size; + } + } + delete [] data; + if (!checkForOneFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in FVFData found.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in FVFData found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + } + else + if (objectName == "XSkinMeshHeader") + { + if (!parseDataObjectSkinMeshHeader(mesh)) + return false; + } + else + if (objectName == "SkinWeights") + { + //mesh.SkinWeights.push_back(SXSkinWeight()); + //if (!parseDataObjectSkinWeights(mesh.SkinWeights.getLast())) + if (!parseDataObjectSkinWeights(mesh)) + return false; + } + else + { + os::Printer::log("Unknown data object in mesh in x file", objectName.c_str(), ELL_WARNING); + if (!parseUnknownDataObject()) + return false; + } + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectSkinWeights(SXMesh &mesh) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading mesh skin weights", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Skin Weights found in .x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + core::stringc TransformNodeName; + + if (!getNextTokenAsString(TransformNodeName)) + { + os::Printer::log("Unknown syntax while reading transfrom node name string in .x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + mesh.HasSkinning=true; + + CSkinnedMesh::SJoint *joint=0; + + u32 n; + for (n=0; n < AnimatedMesh->getAllJoints().size(); ++n) + { + if (AnimatedMesh->getAllJoints()[n]->Name==TransformNodeName) + { + joint=AnimatedMesh->getAllJoints()[n]; + break; + } + } + + if (!joint) + { +#ifdef _XREADER_DEBUG + os::Printer::log("creating joint for skinning ", TransformNodeName.c_str(), ELL_DEBUG); +#endif + n = AnimatedMesh->getAllJoints().size(); + joint=AnimatedMesh->addJoint(0); + joint->Name=TransformNodeName; + } + + // read vertex weights + const u32 nWeights = readInt(); + + // read vertex indices + u32 i; + + const u32 jointStart = joint->Weights.size(); + joint->Weights.reallocate(jointStart+nWeights); + + mesh.WeightJoint.reallocate( mesh.WeightJoint.size() + nWeights ); + mesh.WeightNum.reallocate( mesh.WeightNum.size() + nWeights ); + + for (i=0; i<nWeights; ++i) + { + mesh.WeightJoint.push_back(n); + mesh.WeightNum.push_back(joint->Weights.size()); + + CSkinnedMesh::SWeight *weight=AnimatedMesh->addWeight(joint); + + weight->buffer_id=0; + weight->vertex_id=readInt(); + } + + // read vertex weights + + for (i=jointStart; i<jointStart+nWeights; ++i) + joint->Weights[i].strength = readFloat(); + + // read matrix offset + + // transforms the mesh vertices to the space of the bone + // When concatenated to the bone's transform, this provides the + // world space coordinates of the mesh as affected by the bone + core::matrix4& MatrixOffset = joint->GlobalInversedMatrix; + + readMatrix(MatrixOffset); + + if (!checkForOneFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Skin Weights found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in Skin Weights found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectSkinMeshHeader(SXMesh& mesh) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading skin mesh header", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Skin Mesh header found in .x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + mesh.MaxSkinWeightsPerVertex = readInt(); + mesh.MaxSkinWeightsPerFace = readInt(); + mesh.BoneCount = readInt(); + + if (!BinaryFormat) + getNextToken(); // skip semicolon + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in skin mesh header in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectMeshNormals(SXMesh &mesh) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: reading mesh normals", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Mesh Normals found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read count + const u32 nNormals = readInt(); + core::array<core::vector3df> normals; + normals.set_used(nNormals); + + // read normals + for (u32 i=0; i<nNormals; ++i) + readVector3(normals[i]); + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Mesh Normals Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + core::array<u32> normalIndices; + normalIndices.set_used(mesh.Indices.size()); + + // read face normal indices + const u32 nFNormals = readInt(); + + u32 normalidx = 0; + core::array<u32> polygonfaces; + for (u32 k=0; k<nFNormals; ++k) + { + const u32 fcnt = readInt(); + u32 triangles = fcnt - 2; + u32 indexcount = triangles * 3; + + if (indexcount != mesh.IndexCountPerFace[k]) + { + os::Printer::log("Not matching normal and face index count found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + if (indexcount == 3) + { + // default, only one triangle in this face + for (u32 h=0; h<3; ++h) + { + const u32 normalnum = readInt(); + mesh.Vertices[mesh.Indices[normalidx++]].Normal.set(normals[normalnum]); + } + } + else + { + polygonfaces.set_used(fcnt); + // multiple triangles in this face + for (u32 h=0; h<fcnt; ++h) + polygonfaces[h] = readInt(); + + for (u32 jk=0; jk<triangles; ++jk) + { + mesh.Vertices[mesh.Indices[normalidx++]].Normal.set(normals[polygonfaces[0]]); + mesh.Vertices[mesh.Indices[normalidx++]].Normal.set(normals[polygonfaces[jk+1]]); + mesh.Vertices[mesh.Indices[normalidx++]].Normal.set(normals[polygonfaces[jk+2]]); + } + } + } + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Mesh Face Normals Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in Mesh Normals found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectMeshTextureCoords(SXMesh &mesh) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: reading mesh texture coordinates", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Mesh Texture Coordinates found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + const u32 nCoords = readInt(); + for (u32 i=0; i<nCoords; ++i) + readVector2(mesh.Vertices[i].TCoords); + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Mesh Texture Coordinates Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in Mesh Texture Coordinates Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectMeshVertexColors(SXMesh &mesh) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: reading mesh vertex colors", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace for Mesh Vertex Colors found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + mesh.HasVertexColors=true; + const u32 nColors = readInt(); + for (u32 i=0; i<nColors; ++i) + { + const u32 Index=readInt(); + if (Index>=mesh.Vertices.size()) + { + os::Printer::log("index value in parseDataObjectMeshVertexColors out of bounds", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + readRGBA(mesh.Vertices[Index].Color); + checkForOneFollowingSemicolons(); + } + + if (!checkForOneFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon in Mesh Vertex Colors Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in Mesh Texture Coordinates Array found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectMeshMaterialList(SXMesh &mesh) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading mesh material list", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Mesh Material List found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read material count + mesh.Materials.reallocate(readInt()); + + // read non triangulated face material index count + const u32 nFaceIndices = readInt(); + + // There seems to be a compact representation of "all faces the same material" + // being represented as 1;1;0;; which means 1 material, 1 face with first material + // all the other faces have to obey then, so check is disabled + //if (nFaceIndices != mesh.IndexCountPerFace.size()) + // os::Printer::log("Index count per face not equal to face material index count in x file.", ELL_WARNING); + + // read non triangulated face indices and create triangulated ones + mesh.FaceMaterialIndices.set_used( mesh.Indices.size() / 3); + u32 triangulatedindex = 0; + u32 ind = 0; + for (u32 tfi=0; tfi<mesh.IndexCountPerFace.size(); ++tfi) + { + if (tfi<nFaceIndices) + ind = readInt(); + const u32 fc = mesh.IndexCountPerFace[tfi]/3; + for (u32 k=0; k<fc; ++k) + mesh.FaceMaterialIndices[triangulatedindex++] = ind; + } + + // in version 03.02, the face indices end with two semicolons. + // commented out version check, as version 03.03 exported from blender also has 2 semicolons + if (!BinaryFormat) // && MajorVersion == 3 && MinorVersion <= 2) + { + if (P[0] == ';') + ++P; + } + + // read following data objects + + while(true) + { + core::stringc objectName = getNextToken(); + + if (objectName.size() == 0) + { + os::Printer::log("Unexpected ending found in Mesh Material list in .x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + else + if (objectName == "}") + { + break; // material list finished + } + else + if (objectName == "{") + { + // template materials now available thanks to joeWright + objectName = getNextToken(); + for (u32 i=0; i<TemplateMaterials.size(); ++i) + if (TemplateMaterials[i].Name == objectName) + mesh.Materials.push_back(TemplateMaterials[i].Material); + getNextToken(); // skip } + } + else + if (objectName == "Material") + { + mesh.Materials.push_back(video::SMaterial()); + if (!parseDataObjectMaterial(mesh.Materials.getLast())) + return false; + } + else + if (objectName == ";") + { + // ignore + } + else + { + os::Printer::log("Unknown data object in material list in x file", objectName.c_str(), ELL_WARNING); + if (!parseUnknownDataObject()) + return false; + } + } + return true; +} + + +bool CXMeshFileLoader::parseDataObjectMaterial(video::SMaterial& material) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading mesh material", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Mesh Material found in .x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read RGBA + readRGBA(material.DiffuseColor); checkForOneFollowingSemicolons(); + + // read power + material.Shininess = readFloat(); + + // read specular + readRGB(material.SpecularColor); checkForOneFollowingSemicolons(); + + // read emissive + readRGB(material.EmissiveColor); checkForOneFollowingSemicolons(); + + // read other data objects + int textureLayer=0; + while(true) + { + core::stringc objectName = getNextToken(); + + if (objectName.size() == 0) + { + os::Printer::log("Unexpected ending found in Mesh Material in .x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + else + if (objectName == "}") + { + break; // material finished + } + else + if (objectName.equals_ignore_case("TextureFilename")) + { + // some exporters write "TextureFileName" instead. + core::stringc TextureFileName; + if (!parseDataObjectTextureFilename(TextureFileName)) + return false; + + // original name + if (FileSystem->existFile(TextureFileName)) + material.setTexture(textureLayer, SceneManager->getVideoDriver()->getTexture(TextureFileName)); + // mesh path + else + { + TextureFileName=FilePath + FileSystem->getFileBasename(TextureFileName); + if (FileSystem->existFile(TextureFileName)) + material.setTexture(textureLayer, SceneManager->getVideoDriver()->getTexture(TextureFileName)); + // working directory + else + material.setTexture(textureLayer, SceneManager->getVideoDriver()->getTexture(FileSystem->getFileBasename(TextureFileName))); + } + ++textureLayer; + if (textureLayer==2) + material.MaterialType=video::EMT_LIGHTMAP; + } + else + if (objectName.equals_ignore_case("NormalmapFilename")) + { + // some exporters write "NormalmapFileName" instead. + core::stringc TextureFileName; + if (!parseDataObjectTextureFilename(TextureFileName)) + return false; + + // original name + if (FileSystem->existFile(TextureFileName)) + material.setTexture(1, SceneManager->getVideoDriver()->getTexture(TextureFileName)); + // mesh path + else + { + TextureFileName=FilePath + FileSystem->getFileBasename(TextureFileName); + if (FileSystem->existFile(TextureFileName)) + material.setTexture(1, SceneManager->getVideoDriver()->getTexture(TextureFileName)); + // working directory + else + material.setTexture(1, SceneManager->getVideoDriver()->getTexture(FileSystem->getFileBasename(TextureFileName))); + } + if (textureLayer==1) + ++textureLayer; + } + else + { + os::Printer::log("Unknown data object in material in .x file", objectName.c_str(), ELL_WARNING); + if (!parseUnknownDataObject()) + return false; + } + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectAnimationSet() +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: Reading animation set", ELL_DEBUG); +#endif + + core::stringc AnimationName; + + if (!readHeadOfDataObject(&AnimationName)) + { + os::Printer::log("No opening brace in Animation Set found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + os::Printer::log("Reading animationset ", AnimationName, ELL_DEBUG); + + while(true) + { + core::stringc objectName = getNextToken(); + + if (objectName.size() == 0) + { + os::Printer::log("Unexpected ending found in Animation set in x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + else + if (objectName == "}") + { + break; // animation set finished + } + else + if (objectName == "Animation") + { + if (!parseDataObjectAnimation()) + return false; + } + else + { + os::Printer::log("Unknown data object in animation set in x file", objectName.c_str(), ELL_WARNING); + if (!parseUnknownDataObject()) + return false; + } + } + return true; +} + + +bool CXMeshFileLoader::parseDataObjectAnimation() +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: reading animation", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Animation found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + //anim.closed = true; + //anim.linearPositionQuality = true; + CSkinnedMesh::SJoint animationDump; + + core::stringc FrameName; + + while(true) + { + core::stringc objectName = getNextToken(); + + if (objectName.size() == 0) + { + os::Printer::log("Unexpected ending found in Animation in x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + else + if (objectName == "}") + { + break; // animation finished + } + else + if (objectName == "AnimationKey") + { + if (!parseDataObjectAnimationKey(&animationDump)) + return false; + } + else + if (objectName == "AnimationOptions") + { + //TODO: parse options. + if (!parseUnknownDataObject()) + return false; + } + else + if (objectName == "{") + { + // read frame name + FrameName = getNextToken(); + + if (!checkForClosingBrace()) + { + os::Printer::log("Unexpected ending found in Animation in x file.", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + } + else + { + os::Printer::log("Unknown data object in animation in x file", objectName.c_str(), ELL_WARNING); + if (!parseUnknownDataObject()) + return false; + } + } + + if (FrameName.size() != 0) + { +#ifdef _XREADER_DEBUG + os::Printer::log("frame name", FrameName.c_str(), ELL_DEBUG); +#endif + CSkinnedMesh::SJoint *joint=0; + + u32 n; + for (n=0; n < AnimatedMesh->getAllJoints().size(); ++n) + { + if (AnimatedMesh->getAllJoints()[n]->Name==FrameName) + { + joint=AnimatedMesh->getAllJoints()[n]; + break; + } + } + + if (!joint) + { +#ifdef _XREADER_DEBUG + os::Printer::log("creating joint for animation ", FrameName.c_str(), ELL_DEBUG); +#endif + joint=AnimatedMesh->addJoint(0); + joint->Name=FrameName; + } + + joint->PositionKeys.reallocate(joint->PositionKeys.size()+animationDump.PositionKeys.size()); + for (n=0; n<animationDump.PositionKeys.size(); ++n) + { + joint->PositionKeys.push_back(animationDump.PositionKeys[n]); + } + + joint->ScaleKeys.reallocate(joint->ScaleKeys.size()+animationDump.ScaleKeys.size()); + for (n=0; n<animationDump.ScaleKeys.size(); ++n) + { + joint->ScaleKeys.push_back(animationDump.ScaleKeys[n]); + } + + joint->RotationKeys.reallocate(joint->RotationKeys.size()+animationDump.RotationKeys.size()); + for (n=0; n<animationDump.RotationKeys.size(); ++n) + { + joint->RotationKeys.push_back(animationDump.RotationKeys[n]); + } + } + else + os::Printer::log("joint name was never given", ELL_WARNING); + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: reading animation key", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Animation Key found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read key type + + const u32 keyType = readInt(); + + if (keyType > 4) + { + os::Printer::log("Unknown key type found in Animation Key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read number of keys + const u32 numberOfKeys = readInt(); + + // eat the semicolon after the "0". if there are keys present, readInt() + // does this for us. If there aren't, we need to do it explicitly + if (numberOfKeys == 0) + checkForOneFollowingSemicolons(); + + for (u32 i=0; i<numberOfKeys; ++i) + { + // read time + const f32 time = (f32)readInt(); + + // read keys + switch(keyType) + { + case 0: //rotation + { + //read quaternions + + // read count + if (readInt() != 4) + { + os::Printer::log("Expected 4 numbers in animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + f32 W = -readFloat(); + f32 X = -readFloat(); + f32 Y = -readFloat(); + f32 Z = -readFloat(); + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon after quaternion animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + ISkinnedMesh::SRotationKey *key=AnimatedMesh->addRotationKey(joint); + key->frame=time; + key->rotation.set(X,Y,Z,W); + } + break; + case 1: //scale + case 2: //position + { + // read vectors + + // read count + if (readInt() != 3) + { + os::Printer::log("Expected 3 numbers in animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + core::vector3df vector; + readVector3(vector); + + if (!checkForTwoFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon after vector animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + if (keyType==2) + { + ISkinnedMesh::SPositionKey *key=AnimatedMesh->addPositionKey(joint); + key->frame=time; + key->position=vector; + } + else + { + ISkinnedMesh::SScaleKey *key=AnimatedMesh->addScaleKey(joint); + key->frame=time; + key->scale=vector; + } + } + break; + case 3: + case 4: + { + // read matrix + + // read count + if (readInt() != 16) + { + os::Printer::log("Expected 16 numbers in animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + // read matrix + core::matrix4 mat(core::matrix4::EM4CONST_NOTHING); + readMatrix(mat); + + //mat=joint->LocalMatrix*mat; + + if (!checkForOneFollowingSemicolons()) + { + os::Printer::log("No finishing semicolon after matrix animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + } + + //core::vector3df rotation = mat.getRotationDegrees(); + + ISkinnedMesh::SRotationKey *keyR=AnimatedMesh->addRotationKey(joint); + keyR->frame=time; + + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from mat to mat.getTransposed() for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! + keyR->rotation= core::quaternion(mat.getTransposed()); + + ISkinnedMesh::SPositionKey *keyP=AnimatedMesh->addPositionKey(joint); + keyP->frame=time; + keyP->position=mat.getTranslation(); + +/* + core::vector3df scale=mat.getScale(); + + if (scale.X==0) + scale.X=1; + if (scale.Y==0) + scale.Y=1; + if (scale.Z==0) + scale.Z=1; + ISkinnedMesh::SScaleKey *keyS=AnimatedMesh->addScaleKey(joint); + keyS->frame=time; + keyS->scale=scale; +*/ + } + break; + } // end switch + } + + if (!checkForOneFollowingSemicolons()) + --P; + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in animation key in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseDataObjectTextureFilename(core::stringc& texturename) +{ +#ifdef _XREADER_DEBUG + os::Printer::log("CXFileReader: reading texture filename", ELL_DEBUG); +#endif + + if (!readHeadOfDataObject()) + { + os::Printer::log("No opening brace in Texture filename found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + if (!getNextTokenAsString(texturename)) + { + os::Printer::log("Unknown syntax while reading texture filename string in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + if (!checkForClosingBrace()) + { + os::Printer::log("No closing brace in Texture filename found in x file", ELL_WARNING); + os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); + return false; + } + + return true; +} + + +bool CXMeshFileLoader::parseUnknownDataObject() +{ + // find opening delimiter + while(true) + { + core::stringc t = getNextToken(); + + if (t.size() == 0) + return false; + + if (t == "{") + break; + } + + u32 counter = 1; + + // parse until closing delimiter + + while(counter) + { + core::stringc t = getNextToken(); + + if (t.size() == 0) + return false; + + if (t == "{") + ++counter; + else + if (t == "}") + --counter; + } + + return true; +} + + +//! checks for closing curly brace, returns false if not there +bool CXMeshFileLoader::checkForClosingBrace() +{ + return (getNextToken() == "}"); +} + + +//! checks for one following semicolon, returns false if not there +bool CXMeshFileLoader::checkForOneFollowingSemicolons() +{ + if (BinaryFormat) + return true; + + if (getNextToken() == ";") + return true; + else + { + --P; + return false; + } +} + + +//! checks for two following semicolons, returns false if they are not there +bool CXMeshFileLoader::checkForTwoFollowingSemicolons() +{ + if (BinaryFormat) + return true; + + for (u32 k=0; k<2; ++k) + { + if (getNextToken() != ";") + { + --P; + return false; + } + } + + return true; +} + + +//! reads header of dataobject including the opening brace. +//! returns false if error happened, and writes name of object +//! if there is one +bool CXMeshFileLoader::readHeadOfDataObject(core::stringc* outname) +{ + core::stringc nameOrBrace = getNextToken(); + if (nameOrBrace != "{") + { + if (outname) + (*outname) = nameOrBrace; + + if (getNextToken() != "{") + return false; + } + + return true; +} + + +//! returns next parseable token. Returns empty string if no token there +core::stringc CXMeshFileLoader::getNextToken() +{ + core::stringc s; + + // process binary-formatted file + if (BinaryFormat) + { + // in binary mode it will only return NAME and STRING token + // and (correctly) skip over other tokens. + + s16 tok = readBinWord(); + u32 len; + + // standalone tokens + switch (tok) { + case 1: + // name token + len = readBinDWord(); + s = core::stringc(P, len); + P += len; + return s; + case 2: + // string token + len = readBinDWord(); + s = core::stringc(P, len); + P += (len + 2); + return s; + case 3: + // integer token + P += 4; + return "<integer>"; + case 5: + // GUID token + P += 16; + return "<guid>"; + case 6: + len = readBinDWord(); + P += (len * 4); + return "<int_list>"; + case 7: + len = readBinDWord(); + P += (len * FloatSize); + return "<flt_list>"; + case 0x0a: + return "{"; + case 0x0b: + return "}"; + case 0x0c: + return "("; + case 0x0d: + return ")"; + case 0x0e: + return "["; + case 0x0f: + return "]"; + case 0x10: + return "<"; + case 0x11: + return ">"; + case 0x12: + return "."; + case 0x13: + return ","; + case 0x14: + return ";"; + case 0x1f: + return "template"; + case 0x28: + return "WORD"; + case 0x29: + return "DWORD"; + case 0x2a: + return "FLOAT"; + case 0x2b: + return "DOUBLE"; + case 0x2c: + return "CHAR"; + case 0x2d: + return "UCHAR"; + case 0x2e: + return "SWORD"; + case 0x2f: + return "SDWORD"; + case 0x30: + return "void"; + case 0x31: + return "string"; + case 0x32: + return "unicode"; + case 0x33: + return "cstring"; + case 0x34: + return "array"; + } + } + // process text-formatted file + else + { + findNextNoneWhiteSpace(); + + if (P >= End) + return s; + + while((P < End) && !core::isspace(P[0])) + { + // either keep token delimiters when already holding a token, or return if first valid char + if (P[0]==';' || P[0]=='}' || P[0]=='{' || P[0]==',') + { + if (!s.size()) + { + s.append(P[0]); + ++P; + } + break; // stop for delimiter + } + s.append(P[0]); + ++P; + } + } + return s; +} + + +//! places pointer to next begin of a token, which must be a number, +// and ignores comments +void CXMeshFileLoader::findNextNoneWhiteSpaceNumber() +{ + if (BinaryFormat) + return; + + while((P < End) && (P[0] != '-') && (P[0] != '.') && + !( core::isdigit(P[0]))) + { + // check if this is a comment + if ((P[0] == '/' && P[1] == '/') || P[0] == '#') + readUntilEndOfLine(); + else + ++P; + } +} + + +// places pointer to next begin of a token, and ignores comments +void CXMeshFileLoader::findNextNoneWhiteSpace() +{ + if (BinaryFormat) + return; + + while(true) + { + while((P < End) && core::isspace(P[0])) + { + if (*P=='\n') + ++Line; + ++P; + } + + if (P >= End) + return; + + // check if this is a comment + if ((P[0] == '/' && P[1] == '/') || + P[0] == '#') + readUntilEndOfLine(); + else + break; + } +} + + +//! reads a x file style string +bool CXMeshFileLoader::getNextTokenAsString(core::stringc& out) +{ + if (BinaryFormat) + { + out=getNextToken(); + return true; + } + findNextNoneWhiteSpace(); + + if (P >= End) + return false; + + if (P[0] != '"') + return false; + ++P; + + while(P < End && P[0]!='"') + { + out.append(P[0]); + ++P; + } + + if ( P[1] != ';' || P[0] != '"') + return false; + P+=2; + + return true; +} + + +void CXMeshFileLoader::readUntilEndOfLine() +{ + if (BinaryFormat) + return; + + while(P < End) + { + if (P[0] == '\n' || P[0] == '\r') + { + ++P; + ++Line; + return; + } + + ++P; + } +} + + +u16 CXMeshFileLoader::readBinWord() +{ + if (P>=End) + return 0; +#ifdef __BIG_ENDIAN__ + const u16 tmp = os::Byteswap::byteswap(*(u16 *)P); +#else + const u16 tmp = *(u16 *)P; +#endif + P += 2; + return tmp; +} + + +u32 CXMeshFileLoader::readBinDWord() +{ + if (P>=End) + return 0; +#ifdef __BIG_ENDIAN__ + const u32 tmp = os::Byteswap::byteswap(*(u32 *)P); +#else + const u32 tmp = *(u32 *)P; +#endif + P += 4; + return tmp; +} + + +u32 CXMeshFileLoader::readInt() +{ + if (BinaryFormat) + { + if (!BinaryNumCount) + { + const u16 tmp = readBinWord(); // 0x06 or 0x03 + if (tmp == 0x06) + BinaryNumCount = readBinDWord(); + else + BinaryNumCount = 1; // single int + } + --BinaryNumCount; + return readBinDWord(); + } + else + { + findNextNoneWhiteSpaceNumber(); + return core::strtoul10(P, &P); + } +} + + +f32 CXMeshFileLoader::readFloat() +{ + if (BinaryFormat) + { + if (!BinaryNumCount) + { + const u16 tmp = readBinWord(); // 0x07 or 0x42 + if (tmp == 0x07) + BinaryNumCount = readBinDWord(); + else + BinaryNumCount = 1; // single int + } + --BinaryNumCount; + if (FloatSize == 8) + { +#ifdef __BIG_ENDIAN__ + //TODO: Check if data is properly converted here + f32 ctmp[2]; + ctmp[1] = os::Byteswap::byteswap(*(f32*)P); + ctmp[0] = os::Byteswap::byteswap(*(f32*)P+4); + const f32 tmp = (f32)(*(f64*)(void*)ctmp); +#else + const f32 tmp = (f32)(*(f64 *)P); +#endif + P += 8; + return tmp; + } + else + { +#ifdef __BIG_ENDIAN__ + const f32 tmp = os::Byteswap::byteswap(*(f32 *)P); +#else + const f32 tmp = *(f32 *)P; +#endif + P += 4; + return tmp; + } + } + findNextNoneWhiteSpaceNumber(); + f32 ftmp; + P = core::fast_atof_move(P, ftmp); + return ftmp; +} + + +// read 2-dimensional vector. Stops at semicolon after second value for text file format +bool CXMeshFileLoader::readVector2(core::vector2df& vec) +{ + vec.X = readFloat(); + vec.Y = readFloat(); + return true; +} + + +// read 3-dimensional vector. Stops at semicolon after third value for text file format +bool CXMeshFileLoader::readVector3(core::vector3df& vec) +{ + vec.X = readFloat(); + vec.Y = readFloat(); + vec.Z = readFloat(); + return true; +} + + +// read color without alpha value. Stops after second semicolon after blue value +bool CXMeshFileLoader::readRGB(video::SColor& color) +{ + video::SColorf tmpColor; + tmpColor.r = readFloat(); + tmpColor.g = readFloat(); + tmpColor.b = readFloat(); + color = tmpColor.toSColor(); + return checkForOneFollowingSemicolons(); +} + + +// read color with alpha value. Stops after second semicolon after blue value +bool CXMeshFileLoader::readRGBA(video::SColor& color) +{ + video::SColorf tmpColor; + tmpColor.r = readFloat(); + tmpColor.g = readFloat(); + tmpColor.b = readFloat(); + tmpColor.a = readFloat(); + color = tmpColor.toSColor(); + return checkForOneFollowingSemicolons(); +} + + +// read matrix from list of floats +bool CXMeshFileLoader::readMatrix(core::matrix4& mat) +{ + for (u32 i=0; i<16; ++i) + mat[i] = readFloat(); + return checkForOneFollowingSemicolons(); +} + + +} // end namespace scene +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_X_LOADER_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.h new file mode 100644 index 0000000..67fb041 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CXMeshFileLoader.h @@ -0,0 +1,198 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_X_MESH_FILE_LOADER_H_INCLUDED__ +#define __C_X_MESH_FILE_LOADER_H_INCLUDED__ + +#include "IMeshLoader.h" +#include "irrString.h" +#include "CSkinnedMesh.h" + + +namespace irr +{ +namespace io +{ + class IFileSystem; + class IReadFile; +} // end namespace io +namespace scene +{ +class IMeshManipulator; + +//! Meshloader capable of loading x meshes. +class CXMeshFileLoader : public IMeshLoader +{ +public: + + //! Constructor + CXMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".cob") + virtual bool isALoadableFileExtension(const io::path& filename) const; + + //! creates/loads an animated mesh from the file. + //! \return Pointer to the created mesh. Returns 0 if loading failed. + //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). + //! See IReferenceCounted::drop() for more information. + virtual IAnimatedMesh* createMesh(io::IReadFile* file); + + struct SXTemplateMaterial + { + core::stringc Name; // template name from Xfile + video::SMaterial Material; // material + }; + + struct SXMesh + { + SXMesh() : MaxSkinWeightsPerVertex(0), MaxSkinWeightsPerFace(0), BoneCount(0),AttachedJointID(-1),HasSkinning(false), HasVertexColors(false) {} + // this mesh contains triangulated texture data. + // because in an .x file, faces can be made of more than 3 + // vertices, the indices data structure is triangulated during the + // loading process. The IndexCountPerFace array is filled during + // this triangulation process and stores how much indices belong to + // every face. This data structure can be ignored, because all data + // in this structure is triangulated. + + core::stringc Name; + + u32 MaxSkinWeightsPerVertex; + u32 MaxSkinWeightsPerFace; + u32 BoneCount; + + core::array<u16> IndexCountPerFace; // default 3, but could be more + + core::array<scene::SSkinMeshBuffer*> Buffers; + + core::array<video::S3DVertex> Vertices; + core::array<core::vector2df> TCoords2; + + core::array<u32> Indices; + + core::array<u32> FaceMaterialIndices; // index of material for each face + + core::array<video::SMaterial> Materials; // material array + + core::array<u32> WeightJoint; + core::array<u32> WeightNum; + + s32 AttachedJointID; + + bool HasSkinning; + bool HasVertexColors; + }; + +private: + + bool load(io::IReadFile* file); + + bool readFileIntoMemory(io::IReadFile* file); + + bool parseFile(); + + bool parseDataObject(); + + bool parseDataObjectTemplate(); + + bool parseDataObjectFrame(CSkinnedMesh::SJoint *parent); + + bool parseDataObjectTransformationMatrix(core::matrix4 &mat); + + bool parseDataObjectMesh(SXMesh &mesh); + + bool parseDataObjectSkinWeights(SXMesh &mesh); + + bool parseDataObjectSkinMeshHeader(SXMesh &mesh); + + bool parseDataObjectMeshNormals(SXMesh &mesh); + + bool parseDataObjectMeshTextureCoords(SXMesh &mesh); + + bool parseDataObjectMeshVertexColors(SXMesh &mesh); + + bool parseDataObjectMeshMaterialList(SXMesh &mesh); + + bool parseDataObjectMaterial(video::SMaterial& material); + + bool parseDataObjectAnimationSet(); + + bool parseDataObjectAnimation(); + + bool parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint); + + bool parseDataObjectTextureFilename(core::stringc& texturename); + + bool parseUnknownDataObject(); + + //! places pointer to next begin of a token, and ignores comments + void findNextNoneWhiteSpace(); + + //! places pointer to next begin of a token, which must be a number, + // and ignores comments + void findNextNoneWhiteSpaceNumber(); + + //! returns next parseable token. Returns empty string if no token there + core::stringc getNextToken(); + + //! reads header of dataobject including the opening brace. + //! returns false if error happened, and writes name of object + //! if there is one + bool readHeadOfDataObject(core::stringc* outname=0); + + //! checks for closing curly brace, returns false if not there + bool checkForClosingBrace(); + + //! checks for one following semicolons, returns false if not there + bool checkForOneFollowingSemicolons(); + + //! checks for two following semicolons, returns false if they are not there + bool checkForTwoFollowingSemicolons(); + + //! reads a x file style string + bool getNextTokenAsString(core::stringc& out); + + void readUntilEndOfLine(); + + u16 readBinWord(); + u32 readBinDWord(); + u32 readInt(); + f32 readFloat(); + bool readVector2(core::vector2df& vec); + bool readVector3(core::vector3df& vec); + bool readMatrix(core::matrix4& mat); + bool readRGB(video::SColor& color); + bool readRGBA(video::SColor& color); + + ISceneManager* SceneManager; + io::IFileSystem* FileSystem; + + core::array<CSkinnedMesh::SJoint*> *AllJoints; + + CSkinnedMesh* AnimatedMesh; + + c8* Buffer; + const c8* P; + c8* End; + // counter for number arrays in binary format + u32 BinaryNumCount; + u32 Line; + io::path FilePath; + + CSkinnedMesh::SJoint *CurFrame; + + core::array<SXMesh*> Meshes; + + core::array<SXTemplateMaterial> TemplateMaterials; + + u32 MajorVersion; + u32 MinorVersion; + bool BinaryFormat; + c8 FloatSize; +}; + +} // end namespace scene +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.cpp new file mode 100644 index 0000000..23b515b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.cpp @@ -0,0 +1,109 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#include "CZBuffer.h" +#include "irrString.h" + +#ifdef _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + + +//! constructor +CZBuffer::CZBuffer(const core::dimension2d<u32>& size) +: Buffer(0), BufferEnd(0), Size(0,0), TotalSize(0) +{ + #ifdef _DEBUG + setDebugName("CZBuffer"); + #endif + + setSize(size); +} + + + +//! destructor +CZBuffer::~CZBuffer() +{ + delete [] Buffer; +} + + + +//! clears the zbuffer +void CZBuffer::clear() +{ + memset(Buffer, 0, (BufferEnd-Buffer)*sizeof(TZBufferType)); +} + + + +//! sets the new size of the zbuffer +void CZBuffer::setSize(const core::dimension2d<u32>& size) +{ + if (size == Size) + return; + + Size = size; + + delete [] Buffer; + + TotalSize = size.Width * size.Height; + Buffer = new TZBufferType[TotalSize]; + BufferEnd = Buffer + TotalSize; +} + + + +//! returns the size of the zbuffer +const core::dimension2d<u32>& CZBuffer::getSize() const +{ + return Size; +} + + + +//! locks the zbuffer +TZBufferType* CZBuffer::lock() +{ + return Buffer; +} + + + +//! unlocks the zbuffer +void CZBuffer::unlock() +{ +} + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_SOFTWARE_ + +namespace irr +{ +namespace video +{ + +//! creates a ZBuffer +IZBuffer* createZBuffer(const core::dimension2d<u32>& size) +{ + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + return new CZBuffer(size); + #else + return 0; + #endif // _IRR_COMPILE_WITH_SOFTWARE_ +} + + +} // end namespace video +} // end namespace irr + + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.h new file mode 100644 index 0000000..d923094 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CZBuffer.h @@ -0,0 +1,52 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_Z_BUFFER_H_INCLUDED__ +#define __C_Z_BUFFER_H_INCLUDED__ + +#include "IZBuffer.h" + +namespace irr +{ +namespace video +{ + + class CZBuffer : public IZBuffer + { + public: + + //! constructor + CZBuffer(const core::dimension2d<u32>& size); + + //! destructor + virtual ~CZBuffer(); + + //! clears the zbuffer + virtual void clear(); + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d<u32>& size); + + //! returns the size of the zbuffer + virtual const core::dimension2d<u32>& getSize() const; + + //! locks the zbuffer + virtual TZBufferType* lock(); + + //! unlocks the zbuffer + virtual void unlock(); + + private: + + TZBufferType* Buffer; + TZBufferType* BufferEnd; + core::dimension2d<u32> Size; + s32 TotalSize; + }; + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.cpp new file mode 100644 index 0000000..be29f98 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.cpp @@ -0,0 +1,839 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CZipReader.h" + +#include "os.h" + +// This method is used for error output from bzip2. +extern "C" void bz_internal_error(int errorCode) +{ + irr::os::Printer::log("Error in bzip2 handling", irr::core::stringc(errorCode), irr::ELL_ERROR); +} + +#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ + +#include "CFileList.h" +#include "CReadFile.h" +#include "coreutil.h" + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_ZLIB_ + #ifndef _IRR_USE_NON_SYSTEM_ZLIB_ + #include <zlib.h> // use system lib + #else + #include "zlib/zlib.h" + #endif + + #ifdef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ + #include "aesGladman/fileenc.h" + #endif + #ifdef _IRR_COMPILE_WITH_BZIP2_ + #ifndef _IRR_USE_NON_SYSTEM_BZLIB_ + #include <bzlib.h> + #else + #include "bzip2/bzlib.h" + #endif + #endif + #ifdef _IRR_COMPILE_WITH_LZMA_ + #include "lzma/LzmaDec.h" + #endif +#endif + +namespace irr +{ +namespace io +{ + + +// ----------------------------------------------------------------------------- +// zip loader +// ----------------------------------------------------------------------------- + +//! Constructor +CArchiveLoaderZIP::CArchiveLoaderZIP(io::IFileSystem* fs) +: FileSystem(fs) +{ + #ifdef _DEBUG + setDebugName("CArchiveLoaderZIP"); + #endif +} + +//! returns true if the file maybe is able to be loaded by this class +bool CArchiveLoaderZIP::isALoadableFileFormat(const io::path& filename) const +{ + return core::hasFileExtension(filename, "zip", "pk3") || + core::hasFileExtension(filename, "gz", "tgz"); +} + +//! Check to see if the loader can create archives of this type. +bool CArchiveLoaderZIP::isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const +{ + return (fileType == EFAT_ZIP || fileType == EFAT_GZIP); +} + + +//! Creates an archive from the filename +/** \param file File handle to check. +\return Pointer to newly created archive, or 0 upon error. */ +IFileArchive* CArchiveLoaderZIP::createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + io::IReadFile* file = FileSystem->createAndOpenFile(filename); + + if (file) + { + archive = createArchive(file, ignoreCase, ignorePaths); + file->drop(); + } + + return archive; +} + +//! creates/loads an archive from the file. +//! \return Pointer to the created archive. Returns 0 if loading failed. +IFileArchive* CArchiveLoaderZIP::createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const +{ + IFileArchive *archive = 0; + if (file) + { + file->seek(0); + + u16 sig; + file->read(&sig, 2); + +#ifdef __BIG_ENDIAN__ + sig = os::Byteswap::byteswap(sig); +#endif + + file->seek(0); + + bool isGZip = (sig == 0x8b1f); + + archive = new CZipReader(file, ignoreCase, ignorePaths, isGZip); + } + return archive; +} + +//! Check if the file might be loaded by this class +/** Check might look into the file. +\param file File handle to check. +\return True if file seems to be loadable. */ +bool CArchiveLoaderZIP::isALoadableFileFormat(io::IReadFile* file) const +{ + SZIPFileHeader header; + + file->read( &header.Sig, 4 ); +#ifdef __BIG_ENDIAN__ + header.Sig = os::Byteswap::byteswap(header.Sig); +#endif + + return header.Sig == 0x04034b50 || // ZIP + (header.Sig&0xffff) == 0x8b1f; // gzip +} + +// ----------------------------------------------------------------------------- +// zip archive +// ----------------------------------------------------------------------------- + +CZipReader::CZipReader(IReadFile* file, bool ignoreCase, bool ignorePaths, bool isGZip) + : CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file), IsGZip(isGZip) +{ + #ifdef _DEBUG + setDebugName("CZipReader"); + #endif + + if (File) + { + File->grab(); + + // load file entries + if (IsGZip) + while (scanGZipHeader()) { } + else + while (scanZipHeader()) { } + + sort(); + } +} + +CZipReader::~CZipReader() +{ + if (File) + File->drop(); +} + + +//! get the archive type +E_FILE_ARCHIVE_TYPE CZipReader::getType() const +{ + return IsGZip ? EFAT_GZIP : EFAT_ZIP; +} + +const IFileList* CZipReader::getFileList() const +{ + return this; +} + + +//! scans for a local header, returns false if there is no more local file header. +//! The gzip file format seems to think that there can be multiple files in a gzip file +//! but none +bool CZipReader::scanGZipHeader() +{ + SZipFileEntry entry; + entry.Offset = 0; + memset(&entry.header, 0, sizeof(SZIPFileHeader)); + + // read header + SGZIPMemberHeader header; + if (File->read(&header, sizeof(SGZIPMemberHeader)) == sizeof(SGZIPMemberHeader)) + { + +#ifdef __BIG_ENDIAN__ + header.sig = os::Byteswap::byteswap(header.sig); + header.time = os::Byteswap::byteswap(header.time); +#endif + + // check header value + if (header.sig != 0x8b1f) + return false; + + // now get the file info + if (header.flags & EGZF_EXTRA_FIELDS) + { + // read lenth of extra data + u16 dataLen; + + File->read(&dataLen, 2); + +#ifdef __BIG_ENDIAN__ + dataLen = os::Byteswap::byteswap(dataLen); +#endif + + // skip it + File->seek(dataLen, true); + } + + io::path ZipFileName = ""; + + if (header.flags & EGZF_FILE_NAME) + { + c8 c; + File->read(&c, 1); + while (c) + { + ZipFileName.append(c); + File->read(&c, 1); + } + } + else + { + // no file name? + ZipFileName = Path; + core::deletePathFromFilename(ZipFileName); + + // rename tgz to tar or remove gz extension + if (core::hasFileExtension(ZipFileName, "tgz")) + { + ZipFileName[ ZipFileName.size() - 2] = 'a'; + ZipFileName[ ZipFileName.size() - 1] = 'r'; + } + else if (core::hasFileExtension(ZipFileName, "gz")) + { + ZipFileName[ ZipFileName.size() - 3] = 0; + ZipFileName.validate(); + } + } + + if (header.flags & EGZF_COMMENT) + { + c8 c='a'; + while (c) + File->read(&c, 1); + } + + if (header.flags & EGZF_CRC16) + File->seek(2, true); + + // we are now at the start of the data blocks + entry.Offset = File->getPos(); + + entry.header.FilenameLength = ZipFileName.size(); + + entry.header.CompressionMethod = header.compressionMethod; + entry.header.DataDescriptor.CompressedSize = (File->getSize() - 8) - File->getPos(); + + // seek to file end + File->seek(entry.header.DataDescriptor.CompressedSize, true); + + // read CRC + File->read(&entry.header.DataDescriptor.CRC32, 4); + // read uncompressed size + File->read(&entry.header.DataDescriptor.UncompressedSize, 4); + +#ifdef __BIG_ENDIAN__ + entry.header.DataDescriptor.CRC32 = os::Byteswap::byteswap(entry.header.DataDescriptor.CRC32); + entry.header.DataDescriptor.UncompressedSize = os::Byteswap::byteswap(entry.header.DataDescriptor.UncompressedSize); +#endif + + // now we've filled all the fields, this is just a standard deflate block + addItem(ZipFileName, entry.Offset, entry.header.DataDescriptor.UncompressedSize, false, 0); + FileInfo.push_back(entry); + } + + // there's only one block of data in a gzip file + return false; +} + +//! scans for a local header, returns false if there is no more local file header. +bool CZipReader::scanZipHeader(bool ignoreGPBits) +{ + io::path ZipFileName = ""; + SZipFileEntry entry; + entry.Offset = 0; + memset(&entry.header, 0, sizeof(SZIPFileHeader)); + + File->read(&entry.header, sizeof(SZIPFileHeader)); + +#ifdef __BIG_ENDIAN__ + entry.header.Sig = os::Byteswap::byteswap(entry.header.Sig); + entry.header.VersionToExtract = os::Byteswap::byteswap(entry.header.VersionToExtract); + entry.header.GeneralBitFlag = os::Byteswap::byteswap(entry.header.GeneralBitFlag); + entry.header.CompressionMethod = os::Byteswap::byteswap(entry.header.CompressionMethod); + entry.header.LastModFileTime = os::Byteswap::byteswap(entry.header.LastModFileTime); + entry.header.LastModFileDate = os::Byteswap::byteswap(entry.header.LastModFileDate); + entry.header.DataDescriptor.CRC32 = os::Byteswap::byteswap(entry.header.DataDescriptor.CRC32); + entry.header.DataDescriptor.CompressedSize = os::Byteswap::byteswap(entry.header.DataDescriptor.CompressedSize); + entry.header.DataDescriptor.UncompressedSize = os::Byteswap::byteswap(entry.header.DataDescriptor.UncompressedSize); + entry.header.FilenameLength = os::Byteswap::byteswap(entry.header.FilenameLength); + entry.header.ExtraFieldLength = os::Byteswap::byteswap(entry.header.ExtraFieldLength); +#endif + + if (entry.header.Sig != 0x04034b50) + return false; // local file headers end here. + + // read filename + { + c8 *tmp = new c8 [ entry.header.FilenameLength + 2 ]; + File->read(tmp, entry.header.FilenameLength); + tmp[entry.header.FilenameLength] = 0; + ZipFileName = tmp; + delete [] tmp; + } + +#ifdef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ + // AES encryption + if ((entry.header.GeneralBitFlag & ZIP_FILE_ENCRYPTED) && (entry.header.CompressionMethod == 99)) + { + s16 restSize = entry.header.ExtraFieldLength; + SZipFileExtraHeader extraHeader; + while (restSize) + { + File->read(&extraHeader, sizeof(extraHeader)); +#ifdef __BIG_ENDIAN__ + extraHeader.ID = os::Byteswap::byteswap(extraHeader.ID); + extraHeader.Size = os::Byteswap::byteswap(extraHeader.Size); +#endif + restSize -= sizeof(extraHeader); + if (extraHeader.ID==(s16)0x9901) + { + SZipFileAESExtraData data; + File->read(&data, sizeof(data)); +#ifdef __BIG_ENDIAN__ + data.Version = os::Byteswap::byteswap(data.Version); + data.CompressionMode = os::Byteswap::byteswap(data.CompressionMode); +#endif + restSize -= sizeof(data); + if (data.Vendor[0]=='A' && data.Vendor[1]=='E') + { + // encode values into Sig + // AE-Version | Strength | ActualMode + entry.header.Sig = + ((data.Version & 0xff) << 24) | + (data.EncryptionStrength << 16) | + (data.CompressionMode); + File->seek(restSize, true); + break; + } + } + } + } + // move forward length of extra field. + else +#endif + if (entry.header.ExtraFieldLength) + File->seek(entry.header.ExtraFieldLength, true); + + // if bit 3 was set, use CentralDirectory for setup + if (!ignoreGPBits && entry.header.GeneralBitFlag & ZIP_INFO_IN_DATA_DESCRIPTOR) + { + SZIPFileCentralDirEnd dirEnd; + FileInfo.clear(); + Files.clear(); + // First place where the end record could be stored + File->seek(File->getSize()-22); + const char endID[] = {0x50, 0x4b, 0x05, 0x06, 0x0}; + char tmp[5]={'\0'}; + bool found=false; + // search for the end record ID + while (!found && File->getPos()>0) + { + int seek=8; + File->read(tmp, 4); + switch (tmp[0]) + { + case 0x50: + if (!strcmp(endID, tmp)) + { + seek=4; + found=true; + } + break; + case 0x4b: + seek=5; + break; + case 0x05: + seek=6; + break; + case 0x06: + seek=7; + break; + } + File->seek(-seek, true); + } + File->read(&dirEnd, sizeof(dirEnd)); +#ifdef __BIG_ENDIAN__ + dirEnd.NumberDisk = os::Byteswap::byteswap(dirEnd.NumberDisk); + dirEnd.NumberStart = os::Byteswap::byteswap(dirEnd.NumberStart); + dirEnd.TotalDisk = os::Byteswap::byteswap(dirEnd.TotalDisk); + dirEnd.TotalEntries = os::Byteswap::byteswap(dirEnd.TotalEntries); + dirEnd.Size = os::Byteswap::byteswap(dirEnd.Size); + dirEnd.Offset = os::Byteswap::byteswap(dirEnd.Offset); + dirEnd.CommentLength = os::Byteswap::byteswap(dirEnd.CommentLength); +#endif + FileInfo.reallocate(dirEnd.TotalEntries); + File->seek(dirEnd.Offset); + while (scanCentralDirectoryHeader()) { } + return false; + } + + // store position in file + entry.Offset = File->getPos(); + // move forward length of data + File->seek(entry.header.DataDescriptor.CompressedSize, true); + + #ifdef _DEBUG + //os::Debuginfo::print("added file from archive", ZipFileName.c_str()); + #endif + + addItem(ZipFileName, entry.Offset, entry.header.DataDescriptor.UncompressedSize, ZipFileName.lastChar()=='/', FileInfo.size()); + FileInfo.push_back(entry); + + return true; +} + + +//! scans for a local header, returns false if there is no more local file header. +bool CZipReader::scanCentralDirectoryHeader() +{ + io::path ZipFileName = ""; + SZIPFileCentralDirFileHeader entry; + File->read(&entry, sizeof(SZIPFileCentralDirFileHeader)); + +#ifdef __BIG_ENDIAN__ + entry.Sig = os::Byteswap::byteswap(entry.Sig); + entry.VersionMadeBy = os::Byteswap::byteswap(entry.VersionMadeBy); + entry.VersionToExtract = os::Byteswap::byteswap(entry.VersionToExtract); + entry.GeneralBitFlag = os::Byteswap::byteswap(entry.GeneralBitFlag); + entry.CompressionMethod = os::Byteswap::byteswap(entry.CompressionMethod); + entry.LastModFileTime = os::Byteswap::byteswap(entry.LastModFileTime); + entry.LastModFileDate = os::Byteswap::byteswap(entry.LastModFileDate); + entry.CRC32 = os::Byteswap::byteswap(entry.CRC32); + entry.CompressedSize = os::Byteswap::byteswap(entry.CompressedSize); + entry.UncompressedSize = os::Byteswap::byteswap(entry.UncompressedSize); + entry.FilenameLength = os::Byteswap::byteswap(entry.FilenameLength); + entry.ExtraFieldLength = os::Byteswap::byteswap(entry.ExtraFieldLength); + entry.FileCommentLength = os::Byteswap::byteswap(entry.FileCommentLength); + entry.DiskNumberStart = os::Byteswap::byteswap(entry.DiskNumberStart); + entry.InternalFileAttributes = os::Byteswap::byteswap(entry.InternalFileAttributes); + entry.ExternalFileAttributes = os::Byteswap::byteswap(entry.ExternalFileAttributes); + entry.RelativeOffsetOfLocalHeader = os::Byteswap::byteswap(entry.RelativeOffsetOfLocalHeader); +#endif + + if (entry.Sig != 0x02014b50) + return false; // central dir headers end here. + + const long pos = File->getPos(); + File->seek(entry.RelativeOffsetOfLocalHeader); + scanZipHeader(true); + File->seek(pos+entry.FilenameLength+entry.ExtraFieldLength+entry.FileCommentLength); + FileInfo.getLast().header.DataDescriptor.CompressedSize=entry.CompressedSize; + FileInfo.getLast().header.DataDescriptor.UncompressedSize=entry.UncompressedSize; + FileInfo.getLast().header.DataDescriptor.CRC32=entry.CRC32; + Files.getLast().Size=entry.UncompressedSize; + return true; +} + + +//! opens a file by file name +IReadFile* CZipReader::createAndOpenFile(const io::path& filename) +{ + s32 index = findFile(filename, false); + + if (index != -1) + return createAndOpenFile(index); + + return 0; +} + +#ifdef _IRR_COMPILE_WITH_LZMA_ +//! Used for LZMA decompression. The lib has no default memory management +namespace +{ + void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); } + void SzFree(void *p, void *address) { p = p; free(address); } + ISzAlloc lzmaAlloc = { SzAlloc, SzFree }; +} +#endif + +//! opens a file by index +IReadFile* CZipReader::createAndOpenFile(u32 index) +{ + // Irrlicht supports 0, 8, 12, 14, 99 + //0 - The file is stored (no compression) + //1 - The file is Shrunk + //2 - The file is Reduced with compression factor 1 + //3 - The file is Reduced with compression factor 2 + //4 - The file is Reduced with compression factor 3 + //5 - The file is Reduced with compression factor 4 + //6 - The file is Imploded + //7 - Reserved for Tokenizing compression algorithm + //8 - The file is Deflated + //9 - Reserved for enhanced Deflating + //10 - PKWARE Date Compression Library Imploding + //12 - bzip2 - Compression Method from libbz2, WinZip 10 + //14 - LZMA - Compression Method, WinZip 12 + //96 - Jpeg compression - Compression Method, WinZip 12 + //97 - WavPack - Compression Method, WinZip 11 + //98 - PPMd - Compression Method, WinZip 10 + //99 - AES encryption, WinZip 9 + + const SZipFileEntry &e = FileInfo[Files[index].ID]; + wchar_t buf[64]; + s16 actualCompressionMethod=e.header.CompressionMethod; + IReadFile* decrypted=0; + u8* decryptedBuf=0; + u32 decryptedSize=e.header.DataDescriptor.CompressedSize; +#ifdef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ + if ((e.header.GeneralBitFlag & ZIP_FILE_ENCRYPTED) && (e.header.CompressionMethod == 99)) + { + os::Printer::log("Reading encrypted file."); + u8 salt[16]={0}; + const u16 saltSize = (((e.header.Sig & 0x00ff0000) >>16)+1)*4; + File->seek(e.Offset); + File->read(salt, saltSize); + char pwVerification[2]; + char pwVerificationFile[2]; + File->read(pwVerification, 2); + fcrypt_ctx zctx; // the encryption context + int rc = fcrypt_init( + (e.header.Sig & 0x00ff0000) >>16, + (const unsigned char*)Password.c_str(), // the password + Password.size(), // number of bytes in password + salt, // the salt + (unsigned char*)pwVerificationFile, // on return contains password verifier + &zctx); // encryption context + if (strncmp(pwVerificationFile, pwVerification, 2)) + { + os::Printer::log("Wrong password"); + return 0; + } + decryptedSize= e.header.DataDescriptor.CompressedSize-saltSize-12; + decryptedBuf= new u8[decryptedSize]; + u32 c = 0; + while ((c+32768)<=decryptedSize) + { + File->read(decryptedBuf+c, 32768); + fcrypt_decrypt( + decryptedBuf+c, // pointer to the data to decrypt + 32768, // how many bytes to decrypt + &zctx); // decryption context + c+=32768; + } + File->read(decryptedBuf+c, decryptedSize-c); + fcrypt_decrypt( + decryptedBuf+c, // pointer to the data to decrypt + decryptedSize-c, // how many bytes to decrypt + &zctx); // decryption context + + char fileMAC[10]; + char resMAC[10]; + rc = fcrypt_end( + (unsigned char*)resMAC, // on return contains the authentication code + &zctx); // encryption context + if (rc != 10) + { + os::Printer::log("Error on encryption closing"); + delete [] decryptedBuf; + return 0; + } + File->read(fileMAC, 10); + if (strncmp(fileMAC, resMAC, 10)) + { + os::Printer::log("Error on encryption check"); + delete [] decryptedBuf; + return 0; + } + decrypted = io::createMemoryReadFile(decryptedBuf, decryptedSize, Files[index].FullName, true); + actualCompressionMethod = (e.header.Sig & 0xffff); +#if 0 + if ((e.header.Sig & 0xff000000)==0x01000000) + { + } + else if ((e.header.Sig & 0xff000000)==0x02000000) + { + } + else + { + os::Printer::log("Unknown encryption method"); + return 0; + } +#endif + } +#endif + switch(actualCompressionMethod) + { + case 0: // no compression + { + if (decrypted) + return decrypted; + else + return createLimitReadFile(Files[index].FullName, File, e.Offset, decryptedSize); + } + case 8: + { + #ifdef _IRR_COMPILE_WITH_ZLIB_ + + const u32 uncompressedSize = e.header.DataDescriptor.UncompressedSize; + c8* pBuf = new c8[ uncompressedSize ]; + if (!pBuf) + { + swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + if (decrypted) + decrypted->drop(); + return 0; + } + + u8 *pcData = decryptedBuf; + if (!pcData) + { + pcData = new u8[decryptedSize]; + if (!pcData) + { + swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + delete [] pBuf; + return 0; + } + + //memset(pcData, 0, decryptedSize); + File->seek(e.Offset); + File->read(pcData, decryptedSize); + } + + // Setup the inflate stream. + z_stream stream; + s32 err; + + stream.next_in = (Bytef*)pcData; + stream.avail_in = (uInt)decryptedSize; + stream.next_out = (Bytef*)pBuf; + stream.avail_out = uncompressedSize; + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + + // Perform inflation. wbits < 0 indicates no zlib header inside the data. + err = inflateInit2(&stream, -MAX_WBITS); + if (err == Z_OK) + { + err = inflate(&stream, Z_FINISH); + inflateEnd(&stream); + if (err == Z_STREAM_END) + err = Z_OK; + err = Z_OK; + inflateEnd(&stream); + } + + if (decrypted) + decrypted->drop(); + else + delete[] pcData; + + if (err != Z_OK) + { + swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + delete [] pBuf; + return 0; + } + else + return io::createMemoryReadFile(pBuf, uncompressedSize, Files[index].FullName, true); + + #else + return 0; // zlib not compiled, we cannot decompress the data. + #endif + } + case 12: + { + #ifdef _IRR_COMPILE_WITH_BZIP2_ + + const u32 uncompressedSize = e.header.DataDescriptor.UncompressedSize; + c8* pBuf = new c8[ uncompressedSize ]; + if (!pBuf) + { + swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + if (decrypted) + decrypted->drop(); + return 0; + } + + u8 *pcData = decryptedBuf; + if (!pcData) + { + pcData = new u8[decryptedSize]; + if (!pcData) + { + swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + delete [] pBuf; + return 0; + } + + //memset(pcData, 0, decryptedSize); + File->seek(e.Offset); + File->read(pcData, decryptedSize); + } + + bz_stream bz_ctx={0}; + /* use BZIP2's default memory allocation + bz_ctx->bzalloc = NULL; + bz_ctx->bzfree = NULL; + bz_ctx->opaque = NULL; + */ + int err = BZ2_bzDecompressInit(&bz_ctx, 0, 0); /* decompression */ + if(err != BZ_OK) + { + os::Printer::log("bzip2 decompression failed. File cannot be read.", ELL_ERROR); + return 0; + } + bz_ctx.next_in = (char*)pcData; + bz_ctx.avail_in = decryptedSize; + /* pass all input to decompressor */ + bz_ctx.next_out = pBuf; + bz_ctx.avail_out = uncompressedSize; + err = BZ2_bzDecompress(&bz_ctx); + err = BZ2_bzDecompressEnd(&bz_ctx); + + if (decrypted) + decrypted->drop(); + else + delete[] pcData; + + if (err != BZ_OK) + { + swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + delete [] pBuf; + return 0; + } + else + return io::createMemoryReadFile(pBuf, uncompressedSize, Files[index].FullName, true); + + #else + os::Printer::log("bzip2 decompression not supported. File cannot be read.", ELL_ERROR); + return 0; + #endif + } + case 14: + { + #ifdef _IRR_COMPILE_WITH_LZMA_ + + u32 uncompressedSize = e.header.DataDescriptor.UncompressedSize; + c8* pBuf = new c8[ uncompressedSize ]; + if (!pBuf) + { + swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + if (decrypted) + decrypted->drop(); + return 0; + } + + u8 *pcData = decryptedBuf; + if (!pcData) + { + pcData = new u8[decryptedSize]; + if (!pcData) + { + swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + delete [] pBuf; + return 0; + } + + //memset(pcData, 0, decryptedSize); + File->seek(e.Offset); + File->read(pcData, decryptedSize); + } + + ELzmaStatus status; + SizeT tmpDstSize = uncompressedSize; + SizeT tmpSrcSize = decryptedSize; + + unsigned int propSize = (pcData[3]<<8)+pcData[2]; + int err = LzmaDecode((Byte*)pBuf, &tmpDstSize, + pcData+4+propSize, &tmpSrcSize, + pcData+4, propSize, + e.header.GeneralBitFlag&0x1?LZMA_FINISH_END:LZMA_FINISH_ANY, &status, + &lzmaAlloc); + uncompressedSize = tmpDstSize; // may be different to expected value + + if (decrypted) + decrypted->drop(); + else + delete[] pcData; + + if (err != SZ_OK) + { + os::Printer::log( "Error decompressing", Files[index].FullName, ELL_ERROR); + delete [] pBuf; + return 0; + } + else + return io::createMemoryReadFile(pBuf, uncompressedSize, Files[index].FullName, true); + + #else + os::Printer::log("lzma decompression not supported. File cannot be read.", ELL_ERROR); + return 0; + #endif + } + case 99: + // If we come here with an encrypted file, decryption support is missing + os::Printer::log("Decryption support not enabled. File cannot be read.", ELL_ERROR); + return 0; + default: + swprintf ( buf, 64, L"file has unsupported compression method. %s", Files[index].FullName.c_str() ); + os::Printer::log( buf, ELL_ERROR); + return 0; + }; + +} + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.h new file mode 100644 index 0000000..14251e8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CZipReader.h @@ -0,0 +1,227 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_ZIP_READER_H_INCLUDED__ +#define __C_ZIP_READER_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ + +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "IFileSystem.h" +#include "CFileList.h" + +namespace irr +{ +namespace io +{ + // set if the file is encrypted + const s16 ZIP_FILE_ENCRYPTED = 0x0001; + // the fields crc-32, compressed size and uncompressed size are set to + // zero in the local header + const s16 ZIP_INFO_IN_DATA_DESCRIPTOR = 0x0008; + +// byte-align structures +#include "irrpack.h" + + struct SZIPFileDataDescriptor + { + u32 CRC32; + u32 CompressedSize; + u32 UncompressedSize; + } PACK_STRUCT; + + struct SZIPFileHeader + { + u32 Sig; // 'PK0304' little endian (0x04034b50) + s16 VersionToExtract; + s16 GeneralBitFlag; + s16 CompressionMethod; + s16 LastModFileTime; + s16 LastModFileDate; + SZIPFileDataDescriptor DataDescriptor; + s16 FilenameLength; + s16 ExtraFieldLength; + // filename (variable size) + // extra field (variable size ) + } PACK_STRUCT; + + struct SZIPFileCentralDirFileHeader + { + u32 Sig; // 'PK0102' (0x02014b50) + u16 VersionMadeBy; + u16 VersionToExtract; + u16 GeneralBitFlag; + u16 CompressionMethod; + u16 LastModFileTime; + u16 LastModFileDate; + u32 CRC32; + u32 CompressedSize; + u32 UncompressedSize; + u16 FilenameLength; + u16 ExtraFieldLength; + u16 FileCommentLength; + u16 DiskNumberStart; + u16 InternalFileAttributes; + u32 ExternalFileAttributes; + u32 RelativeOffsetOfLocalHeader; + + // filename (variable size) + // extra field (variable size) + // file comment (variable size) + + } PACK_STRUCT; + + struct SZIPFileCentralDirEnd + { + u32 Sig; // 'PK0506' end_of central dir signature // (0x06054b50) + u16 NumberDisk; // number of this disk + u16 NumberStart; // number of the disk with the start of the central directory + u16 TotalDisk; // total number of entries in the central dir on this disk + u16 TotalEntries; // total number of entries in the central dir + u32 Size; // size of the central directory + u32 Offset; // offset of start of centraldirectory with respect to the starting disk number + u16 CommentLength; // zipfile comment length + // zipfile comment (variable size) + } PACK_STRUCT; + + struct SZipFileExtraHeader + { + s16 ID; + s16 Size; + } PACK_STRUCT; + + struct SZipFileAESExtraData + { + s16 Version; + u8 Vendor[2]; + u8 EncryptionStrength; + s16 CompressionMode; + } PACK_STRUCT; + + enum E_GZIP_FLAGS + { + EGZF_TEXT_DAT = 1, + EGZF_CRC16 = 2, + EGZF_EXTRA_FIELDS = 4, + EGZF_FILE_NAME = 8, + EGZF_COMMENT = 16 + }; + + struct SGZIPMemberHeader + { + u16 sig; // 0x8b1f + u8 compressionMethod; // 8 = deflate + u8 flags; + u32 time; + u8 extraFlags; // slow compress = 2, fast compress = 4 + u8 operatingSystem; + } PACK_STRUCT; + +// Default alignment +#include "irrunpack.h" + + //! Contains extended info about zip files in the archive + struct SZipFileEntry + { + //! Position of data in the archive file + s32 Offset; + + //! The header for this file containing compression info etc + SZIPFileHeader header; + }; + + //! Archiveloader capable of loading ZIP Archives + class CArchiveLoaderZIP : public IArchiveLoader + { + public: + + //! Constructor + CArchiveLoaderZIP(io::IFileSystem* fs); + + //! returns true if the file maybe is able to be loaded by this class + //! based on the file extension (e.g. ".zip") + virtual bool isALoadableFileFormat(const io::path& filename) const; + + //! Check if the file might be loaded by this class + /** Check might look into the file. + \param file File handle to check. + \return True if file seems to be loadable. */ + virtual bool isALoadableFileFormat(io::IReadFile* file) const; + + //! Check to see if the loader can create archives of this type. + /** Check based on the archive type. + \param fileType The archive type to check. + \return True if the archile loader supports this type, false if not */ + virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; + + //! Creates an archive from the filename + /** \param file File handle to check. + \return Pointer to newly created archive, or 0 upon error. */ + virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; + + //! creates/loads an archive from the file. + //! \return Pointer to the created archive. Returns 0 if loading failed. + virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; + + private: + io::IFileSystem* FileSystem; + }; + +/*! + Zip file Reader written April 2002 by N.Gebhardt. +*/ + class CZipReader : public virtual IFileArchive, virtual CFileList + { + public: + + //! constructor + CZipReader(IReadFile* file, bool ignoreCase, bool ignorePaths, bool isGZip=false); + + //! destructor + virtual ~CZipReader(); + + //! opens a file by file name + virtual IReadFile* createAndOpenFile(const io::path& filename); + + //! opens a file by index + virtual IReadFile* createAndOpenFile(u32 index); + + //! returns the list of files + virtual const IFileList* getFileList() const; + + //! get the archive type + virtual E_FILE_ARCHIVE_TYPE getType() const; + + protected: + + //! reads the next file header from a ZIP file, returns false if there are no more headers. + /* if ignoreGPBits is set, the item will be read despite missing + file information. This is used when reading items from the central + directory. */ + bool scanZipHeader(bool ignoreGPBits=false); + + //! the same but for gzip files + bool scanGZipHeader(); + + bool scanCentralDirectoryHeader(); + + IReadFile* File; + + // holds extended info about files + core::array<SZipFileEntry> FileInfo; + + bool IsGZip; + }; + + +} // end namespace io +} // end namespace irr + +#endif // __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#endif // __C_ZIP_READER_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/IAttribute.h b/src/others/irrlicht-1.8.1/source/Irrlicht/IAttribute.h new file mode 100644 index 0000000..69d499f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/IAttribute.h @@ -0,0 +1,107 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_ATTRIBUTE_H_INCLUDED__ +#define __I_ATTRIBUTE_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "SColor.h" +#include "vector3d.h" +#include "vector2d.h" +#include "line2d.h" +#include "line3d.h" +#include "triangle3d.h" +#include "position2d.h" +#include "rect.h" +#include "dimension2d.h" +#include "matrix4.h" +#include "quaternion.h" +#include "plane3d.h" +#include "triangle3d.h" +#include "line2d.h" +#include "line3d.h" +#include "irrString.h" +#include "irrArray.h" +#include "EAttributes.h" + + +namespace irr +{ +namespace io +{ + +class IAttribute : public virtual IReferenceCounted +{ +public: + + virtual ~IAttribute() {}; + + virtual s32 getInt() { return 0; } + virtual f32 getFloat() { return 0; } + virtual video::SColorf getColorf() { return video::SColorf(1.0f,1.0f,1.0f,1.0f); } + virtual video::SColor getColor() { return video::SColor(255,255,255,255); } + virtual core::stringc getString() { return core::stringc(getStringW().c_str()); } + virtual core::stringw getStringW() { return core::stringw(); } + virtual core::array<core::stringw> getArray() { return core::array<core::stringw>(); }; + virtual bool getBool() { return false; } + virtual void getBinary(void* outdata, s32 maxLength) {}; + virtual core::vector3df getVector() { return core::vector3df(); } + virtual core::position2di getPosition() { return core::position2di(); } + virtual core::rect<s32> getRect() { return core::rect<s32>(); } + virtual core::quaternion getQuaternion(){ return core::quaternion(); } + virtual core::matrix4 getMatrix() { return core::matrix4(); } + virtual core::triangle3df getTriangle() { return core::triangle3df(); } + virtual core::vector2df getVector2d() { return core::vector2df(); } + virtual core::vector2di getVector2di() { return core::vector2di(); } + virtual core::line2df getLine2d() { return core::line2df(); } + virtual core::line2di getLine2di() { return core::line2di(); } + virtual core::line3df getLine3d() { return core::line3df(); } + virtual core::line3di getLine3di() { return core::line3di(); } + virtual core::dimension2du getDimension2d() { return core::dimension2du(); } + virtual core::aabbox3d<f32> getBBox() { return core::aabbox3d<f32>(); } + virtual core::plane3df getPlane() { return core::plane3df(); } + + virtual video::ITexture* getTexture() { return 0; } + virtual const char* getEnum() { return 0; } + virtual void* getUserPointer() { return 0; } + + virtual void setInt(s32 intValue) {}; + virtual void setFloat(f32 floatValue) {}; + virtual void setString(const char* text) {}; + virtual void setString(const wchar_t* text){ setString(core::stringc(text).c_str()); }; + virtual void setArray(const core::array<core::stringw>& arr ) {}; + virtual void setColor(video::SColorf color) {}; + virtual void setColor(video::SColor color) {}; + virtual void setBool(bool boolValue) {}; + virtual void setBinary(void* data, s32 maxLenght) {}; + virtual void setVector(core::vector3df v) {}; + virtual void setPosition(core::position2di v) {}; + virtual void setRect(core::rect<s32> v) {}; + virtual void setQuaternion(core::quaternion v) {}; + virtual void setMatrix(core::matrix4 v) {}; + virtual void setTriangle(core::triangle3df v) {}; + virtual void setVector2d(core::vector2df v) {}; + virtual void setVector2d(core::vector2di v) {}; + virtual void setLine2d(core::line2df v) {}; + virtual void setLine2d(core::line2di v) {}; + virtual void setLine3d(core::line3df v) {}; + virtual void setLine3d(core::line3di v) {}; + virtual void setDimension2d(core::dimension2du v) {}; + virtual void setBBox(core::aabbox3d<f32> v) {}; + virtual void setPlane(core::plane3df v) {}; + virtual void setUserPointer(void* v) {}; + + virtual void setEnum(const char* enumValue, const char* const* enumerationLiterals) {}; + virtual void setTexture(video::ITexture*, const path& filename) {}; + + core::stringc Name; + + virtual E_ATTRIBUTE_TYPE getType() const = 0; + virtual const wchar_t* getTypeString() const = 0; +}; + +} // end namespace io +} // end namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.cpp new file mode 100644 index 0000000..b4856b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.cpp @@ -0,0 +1,120 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" +#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + +#include "SoftwareDriver2_compile_config.h" +#include "IBurningShader.h" +#include "CSoftwareDriver2.h" + +namespace irr +{ +namespace video +{ + + const tFixPointu IBurningShader::dithermask[] = + { + 0x00,0x80,0x20,0xa0, + 0xc0,0x40,0xe0,0x60, + 0x30,0xb0,0x10,0x90, + 0xf0,0x70,0xd0,0x50 + }; + + IBurningShader::IBurningShader(CBurningVideoDriver* driver) + { + #ifdef _DEBUG + setDebugName("IBurningShader"); + #endif + + for ( u32 i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i ) + { + IT[i].Texture = 0; + } + + Driver = driver; + RenderTarget = 0; + ColorMask = COLOR_BRIGHT_WHITE; + DepthBuffer = (CDepthBuffer*) driver->getDepthBuffer (); + if ( DepthBuffer ) + DepthBuffer->grab(); + + Stencil = (CStencilBuffer*) driver->getStencilBuffer (); + if ( Stencil ) + Stencil->grab(); + + } + + + //! destructor + IBurningShader::~IBurningShader() + { + if (RenderTarget) + RenderTarget->drop(); + + if (DepthBuffer) + DepthBuffer->drop(); + + if (Stencil) + Stencil->drop(); + + for ( u32 i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i ) + { + if ( IT[i].Texture ) + IT[i].Texture->drop(); + } + } + + //! sets a render target + void IBurningShader::setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort) + { + if (RenderTarget) + RenderTarget->drop(); + + RenderTarget = (video::CImage* ) surface; + + if (RenderTarget) + { + RenderTarget->grab(); + + //(tVideoSample*)RenderTarget->lock() = (tVideoSample*)RenderTarget->lock(); + //(fp24*) DepthBuffer->lock() = DepthBuffer->lock(); + } + } + + + //! sets the Texture + void IBurningShader::setTextureParam( u32 stage, video::CSoftwareTexture2* texture, s32 lodLevel) + { + sInternalTexture *it = &IT[stage]; + + if ( it->Texture) + it->Texture->drop(); + + it->Texture = texture; + + if ( it->Texture) + { + it->Texture->grab(); + + // select mignify and magnify ( lodLevel ) + //SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS + it->lodLevel = lodLevel; + it->data = (tVideoSample*) it->Texture->lock(ETLM_READ_ONLY, + core::s32_clamp ( lodLevel + SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS, 0, SOFTWARE_DRIVER_2_MIPMAPPING_MAX - 1 )); + + // prepare for optimal fixpoint + it->pitchlog2 = s32_log2_s32 ( it->Texture->getPitch() ); + + const core::dimension2d<u32> &dim = it->Texture->getSize(); + it->textureXMask = s32_to_fixPoint ( dim.Width - 1 ) & FIX_POINT_UNSIGNED_MASK; + it->textureYMask = s32_to_fixPoint ( dim.Height - 1 ) & FIX_POINT_UNSIGNED_MASK; + } + } + + +} // end namespace video +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_BURNINGSVIDEO_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.h new file mode 100644 index 0000000..50f1059 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/IBurningShader.h @@ -0,0 +1,201 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_BURNING_SHADER_H_INCLUDED__ +#define __I_BURNING_SHADER_H_INCLUDED__ + +#include "SoftwareDriver2_compile_config.h" +#include "IReferenceCounted.h" +#include "irrMath.h" +#include "IImage.h" +#include "S2DVertex.h" +#include "rect.h" +#include "CDepthBuffer.h" +#include "S4DVertex.h" +#include "irrArray.h" +#include "SLight.h" +#include "SMaterial.h" +#include "os.h" + + +namespace irr +{ + +namespace video +{ + + struct SBurningShaderLight + { + //SLight org; + bool LightIsOn; + + E_LIGHT_TYPE Type; + f32 radius; + f32 linearAttenuation; + f32 constantAttenuation; + f32 quadraticAttenuation; + sVec4 pos; + + sVec3 AmbientColor; + sVec3 DiffuseColor; + sVec3 SpecularColor; + sVec4 pos_objectspace; + }; + + enum eLightFlags + { + ENABLED = 0x01, + POINTLIGHT = 0x02, + SPECULAR = 0x04, + FOG = 0x08, + NORMALIZE = 0x10, + VERTEXTRANSFORM = 0x20, + }; + + struct SBurningShaderLightSpace + { + void reset () + { + Light.set_used ( 0 ); + Global_AmbientLight.set ( 0.f, 0.f, 0.f ); + Flags = 0; + } + core::array<SBurningShaderLight> Light; + sVec3 Global_AmbientLight; + sVec4 FogColor; + sVec4 campos; + sVec4 vertex; + sVec4 normal; + u32 Flags; + }; + + struct SBurningShaderMaterial + { + SMaterial org; + + sVec3 AmbientColor; + sVec3 DiffuseColor; + sVec3 SpecularColor; + sVec3 EmissiveColor; + + }; + + enum EBurningFFShader + { + ETR_FLAT = 0, + ETR_FLAT_WIRE, + ETR_GOURAUD, + ETR_GOURAUD_WIRE, + ETR_TEXTURE_FLAT, + ETR_TEXTURE_FLAT_WIRE, + ETR_TEXTURE_GOURAUD, + ETR_TEXTURE_GOURAUD_WIRE, + ETR_TEXTURE_GOURAUD_NOZ, + ETR_TEXTURE_GOURAUD_ADD, + ETR_TEXTURE_GOURAUD_ADD_NO_Z, + + ETR_TEXTURE_GOURAUD_VERTEX_ALPHA, + + ETR_TEXTURE_GOURAUD_LIGHTMAP_M1, + ETR_TEXTURE_GOURAUD_LIGHTMAP_M2, + ETR_TEXTURE_GOURAUD_LIGHTMAP_M4, + ETR_TEXTURE_LIGHTMAP_M4, + + ETR_TEXTURE_GOURAUD_DETAIL_MAP, + ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD, + + ETR_GOURAUD_ALPHA, + ETR_GOURAUD_ALPHA_NOZ, + + ETR_TEXTURE_GOURAUD_ALPHA, + ETR_TEXTURE_GOURAUD_ALPHA_NOZ, + + ETR_NORMAL_MAP_SOLID, + ETR_STENCIL_SHADOW, + + ETR_TEXTURE_BLEND, + ETR_REFERENCE, + ETR_INVALID, + + ETR2_COUNT + }; + + + class CBurningVideoDriver; + class IBurningShader : public virtual IReferenceCounted + { + public: + IBurningShader(CBurningVideoDriver* driver); + + //! destructor + virtual ~IBurningShader(); + + //! sets a render target + virtual void setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort); + + //! sets the Texture + virtual void setTextureParam( u32 stage, video::CSoftwareTexture2* texture, s32 lodLevel); + virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) = 0; + virtual void drawLine ( const s4DVertex *a,const s4DVertex *b) {}; + + virtual void setParam ( u32 index, f32 value) {}; + virtual void setZCompareFunc ( u32 func) {}; + + virtual void setMaterial ( const SBurningShaderMaterial &material ) {}; + + protected: + + CBurningVideoDriver *Driver; + + video::CImage* RenderTarget; + CDepthBuffer* DepthBuffer; + CStencilBuffer * Stencil; + tVideoSample ColorMask; + + sInternalTexture IT[ BURNING_MATERIAL_MAX_TEXTURES ]; + + static const tFixPointu dithermask[ 4 * 4]; + }; + + + IBurningShader* createTriangleRendererTextureGouraud2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_M1(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_M2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_M4(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGTextureLightMap2_M4(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureLightMap2_Add(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureDetailMap2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureVertexAlpha2(CBurningVideoDriver* driver); + + + IBurningShader* createTriangleRendererTextureGouraudWire2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGouraud2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGouraudAlpha2(CBurningVideoDriver* driver); + IBurningShader* createTRGouraudAlphaNoZ2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererGouraudWire2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureFlat2(CBurningVideoDriver* driver); + IBurningShader* createTriangleRendererTextureFlatWire2(CBurningVideoDriver* driver); + IBurningShader* createTRFlat2(CBurningVideoDriver* driver); + IBurningShader* createTRFlatWire2(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudNoZ2(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudAdd2(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver); + + IBurningShader* createTRTextureGouraudAlpha(CBurningVideoDriver* driver); + IBurningShader* createTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver); + IBurningShader* createTRTextureBlend(CBurningVideoDriver* driver); + IBurningShader* createTRTextureInverseAlphaBlend(CBurningVideoDriver* driver); + + IBurningShader* createTRNormalMap(CBurningVideoDriver* driver); + IBurningShader* createTRStencilShadow(CBurningVideoDriver* driver); + + IBurningShader* createTriangleRendererReference(CBurningVideoDriver* driver); + + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/IDepthBuffer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/IDepthBuffer.h new file mode 100644 index 0000000..719d9f1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/IDepthBuffer.h @@ -0,0 +1,82 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_Z2_BUFFER_H_INCLUDED__ +#define __I_Z2_BUFFER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "dimension2d.h" +#include "S4DVertex.h" + +namespace irr +{ +namespace video +{ + class IDepthBuffer : public virtual IReferenceCounted + { + public: + + //! destructor + virtual ~IDepthBuffer() {}; + + //! clears the zbuffer + virtual void clear() = 0; + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d<u32>& size) = 0; + + //! returns the size of the zbuffer + virtual const core::dimension2d<u32>& getSize() const = 0; + + //! locks the zbuffer + virtual void* lock() = 0; + + //! unlocks the zbuffer + virtual void unlock() = 0; + + //! returns pitch of depthbuffer (in bytes) + virtual u32 getPitch() const = 0; + + }; + + + //! creates a ZBuffer + IDepthBuffer* createDepthBuffer(const core::dimension2d<u32>& size); + + class IStencilBuffer : public virtual IReferenceCounted + { + public: + + //! destructor + virtual ~IStencilBuffer() {}; + + //! clears the zbuffer + virtual void clear() = 0; + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d<u32>& size) = 0; + + //! returns the size of the zbuffer + virtual const core::dimension2d<u32>& getSize() const = 0; + + //! locks the zbuffer + virtual void* lock() = 0; + + //! unlocks the zbuffer + virtual void unlock() = 0; + + //! returns pitch of depthbuffer (in bytes) + virtual u32 getPitch() const = 0; + + }; + + + //! creates a Stencil Buffer + IStencilBuffer* createStencilBuffer(const core::dimension2d<u32>& size); + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/IImagePresenter.h b/src/others/irrlicht-1.8.1/source/Irrlicht/IImagePresenter.h new file mode 100644 index 0000000..4f083f0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/IImagePresenter.h @@ -0,0 +1,36 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_IMAGE_PRESENTER_H_INCLUDED__ +#define __I_IMAGE_PRESENTER_H_INCLUDED__ + +#include "IImage.h" + +namespace irr +{ +namespace video +{ + +/*! + Interface for a class which is able to present an IImage + an the Screen. Usually only implemented by an IrrDevice for + presenting Software Device Rendered images. + + This class should be used only internally. +*/ + + class IImagePresenter + { + public: + + virtual ~IImagePresenter() {}; + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ) = 0; + }; + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/ISceneNodeAnimatorFinishing.h b/src/others/irrlicht-1.8.1/source/Irrlicht/ISceneNodeAnimatorFinishing.h new file mode 100644 index 0000000..6535a6c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/ISceneNodeAnimatorFinishing.h @@ -0,0 +1,36 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_FINISHING_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_FINISHING_H_INCLUDED__ + +#include "ISceneNode.h" + +namespace irr +{ +namespace scene +{ + //! This is an abstract base class for animators that have a discrete end time. + class ISceneNodeAnimatorFinishing : public ISceneNodeAnimator + { + public: + + //! constructor + ISceneNodeAnimatorFinishing(u32 finishTime) + : FinishTime(finishTime), HasFinished(false) { } + + virtual bool hasFinished(void) const { return HasFinished; } + + protected: + + u32 FinishTime; + bool HasFinished; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/ITriangleRenderer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/ITriangleRenderer.h new file mode 100644 index 0000000..629a736 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/ITriangleRenderer.h @@ -0,0 +1,68 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_TRIANGLE_RENDERER_H_INCLUDED__ +#define __I_TRIANGLE_RENDERER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "S2DVertex.h" +#include "rect.h" +#include "IZBuffer.h" + +namespace irr +{ +namespace video +{ + class IImage; + + enum ETriangleRenderer + { + ETR_FLAT = 0, + ETR_FLAT_WIRE, + ETR_GOURAUD, + ETR_GOURAUD_WIRE, + ETR_TEXTURE_FLAT, + ETR_TEXTURE_FLAT_WIRE, + ETR_TEXTURE_GOURAUD, + ETR_TEXTURE_GOURAUD_WIRE, + ETR_TEXTURE_GOURAUD_NOZ, + ETR_TEXTURE_GOURAUD_ADD, + ETR_COUNT + }; + + class ITriangleRenderer : public virtual IReferenceCounted + { + public: + + //! sets a render target + virtual void setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort) = 0; + + //! en or disables the backface culling + virtual void setBackfaceCulling(bool enabled = true) = 0; + + //! sets the Texture + virtual void setTexture(video::IImage* texture) = 0; + + //! draws an indexed triangle list + virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) = 0; + }; + + + ITriangleRenderer* createTriangleRendererTextureGouraud(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererTextureGouraudWire(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererGouraud(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererGouraudWire(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererTextureFlat(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererTextureFlatWire(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererFlat(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererFlatWire(IZBuffer* zbuffer); + ITriangleRenderer* createTriangleRendererTextureGouraudNoZ(); + ITriangleRenderer* createTriangleRendererTextureGouraudAdd(IZBuffer* zbuffer); + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/IZBuffer.h b/src/others/irrlicht-1.8.1/source/Irrlicht/IZBuffer.h new file mode 100644 index 0000000..2c235a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/IZBuffer.h @@ -0,0 +1,47 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_Z_BUFFER_H_INCLUDED__ +#define __I_Z_BUFFER_H_INCLUDED__ + +#include "IReferenceCounted.h" +#include "dimension2d.h" +#include "S2DVertex.h" + +namespace irr +{ +namespace video +{ + class IZBuffer : public virtual IReferenceCounted + { + public: + + //! destructor + virtual ~IZBuffer() {}; + + //! clears the zbuffer + virtual void clear() = 0; + + //! sets the new size of the zbuffer + virtual void setSize(const core::dimension2d<u32>& size) = 0; + + //! returns the size of the zbuffer + virtual const core::dimension2d<u32>& getSize() const = 0; + + //! locks the zbuffer + virtual TZBufferType* lock() = 0; + + //! unlocks the zbuffer + virtual void unlock() = 0; + }; + + + //! creates a ZBuffer + IZBuffer* createZBuffer(const core::dimension2d<u32>& size); + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht-gcc.cbp b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht-gcc.cbp new file mode 100644 index 0000000..073b409 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht-gcc.cbp @@ -0,0 +1,1323 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Irrlicht" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Win32 - Debug - dll"> + <Option platforms="Windows;" /> + <Option output="..\..\lib\Win32-gcc\Irrlicht" prefix_auto="1" extension_auto="1" /> + <Option object_output="..\obj\win32-gcc-debug-dll" /> + <Option type="3" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="-Wextra" /> + <Add option="-Wall" /> + <Add option="-g" /> + <Add option="-W" /> + <Add option="-O0" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-DWIN32" /> + <Add option="-D_DEBUG" /> + <Add option="-D_WINDOWS" /> + <Add option="-D_USRDLL" /> + <Add option="-DIRRLICHT_EXPORTS" /> + <Add option="-D_CRT_SECURE_NO_DEPRECATE" /> + <Add option="-D__GNUWIN32__" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + </Compiler> + <Linker> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="gdi32" /> + <Add library="winspool" /> + <Add library="comdlg32" /> + <Add library="advapi32" /> + <Add library="shell32" /> + <Add library="ole32" /> + <Add library="oleaut32" /> + <Add library="uuid" /> + <Add library="opengl32" /> + <Add library="winmm" /> + </Linker> + <ExtraCommands> + <Add after="cmd /c del ..\..\bin\Win32-gcc\Irrlicht.dll" /> + <Add after="cmd /c move ..\..\lib\Win32-gcc\Irrlicht.dll ..\..\bin\Win32-gcc\Irrlicht.dll" /> + </ExtraCommands> + </Target> + <Target title="Win32 - Release - accurate math - dll"> + <Option platforms="Windows;" /> + <Option output="..\..\lib\Win32-gcc\Irrlicht" prefix_auto="1" extension_auto="1" /> + <Option object_output="..\obj\win32-gcc-release-dll" /> + <Option type="3" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="-O2" /> + <Add option="-Wall" /> + <Add option="-W" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-DWIN32" /> + <Add option="-DNDEBUG" /> + <Add option="-D_WINDOWS" /> + <Add option="-D_USRDLL" /> + <Add option="-DIRRLICHT_EXPORTS" /> + <Add option="-D_CRT_SECURE_NO_DEPRECATE" /> + <Add option="-D__GNUWIN32__" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="gdi32" /> + <Add library="winspool" /> + <Add library="comdlg32" /> + <Add library="advapi32" /> + <Add library="shell32" /> + <Add library="ole32" /> + <Add library="oleaut32" /> + <Add library="uuid" /> + <Add library="opengl32" /> + <Add library="winmm" /> + </Linker> + <ExtraCommands> + <Add after="cmd /c del ..\..\bin\Win32-gcc\Irrlicht.dll" /> + <Add after="cmd /c move ..\..\lib\Win32-gcc\Irrlicht.dll ..\..\bin\Win32-gcc\Irrlicht.dll" /> + </ExtraCommands> + </Target> + <Target title="Win32 - Release - fast math - dll"> + <Option platforms="Windows;" /> + <Option output="..\..\lib\Win32-gcc\Irrlicht" prefix_auto="1" extension_auto="1" /> + <Option object_output="..\obj\win32-gcc-release-fast-dll" /> + <Option type="3" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="-O3" /> + <Add option="-W" /> + <Add option="-Wall" /> + <Add option="-ffast-math" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-DWIN32" /> + <Add option="-DNDEBUG" /> + <Add option="-D_WINDOWS" /> + <Add option="-D_USRDLL" /> + <Add option="-DIRRLICHT_EXPORTS" /> + <Add option="-D_CRT_SECURE_NO_DEPRECATE" /> + <Add option="-D__GNUWIN32__" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + </Compiler> + <Linker> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="gdi32" /> + <Add library="winspool" /> + <Add library="comdlg32" /> + <Add library="advapi32" /> + <Add library="shell32" /> + <Add library="ole32" /> + <Add library="oleaut32" /> + <Add library="uuid" /> + <Add library="opengl32" /> + <Add library="winmm" /> + </Linker> + <ExtraCommands> + <Add after="cmd /c del ..\..\bin\Win32-gcc\Irrlicht.dll" /> + <Add after="cmd /c move ..\..\lib\Win32-gcc\Irrlicht.dll ..\..\bin\Win32-gcc\Irrlicht.dll" /> + </ExtraCommands> + </Target> + <Target title="Win32 - Debug - static"> + <Option platforms="Windows;" /> + <Option output="..\..\lib\Win32-gcc\Irrlicht" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="..\obj\win32-gcc-debug-static" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-W" /> + <Add option="-Wall" /> + <Add option="-g" /> + <Add option="-O0" /> + <Add option="-Wextra" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-DWIN32" /> + <Add option="-D_DEBUG" /> + <Add option="-D_WINDOWS" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add option="-D_CRT_SECURE_NO_DEPRECATE" /> + <Add option="-D__GNUWIN32__" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + </Compiler> + <Linker> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="gdi32" /> + <Add library="winspool" /> + <Add library="comdlg32" /> + <Add library="advapi32" /> + <Add library="shell32" /> + <Add library="ole32" /> + <Add library="oleaut32" /> + <Add library="uuid" /> + <Add library="opengl32" /> + <Add library="winmm" /> + </Linker> + </Target> + <Target title="Win32 - Release - accurate math - static"> + <Option platforms="Windows;" /> + <Option output="..\..\lib\Win32-gcc\Irrlicht" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="..\obj\win32-gcc-release-dll" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-Os" /> + <Add option="-O3" /> + <Add option="-O2" /> + <Add option="-Wall" /> + <Add option="-W" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-DWIN32" /> + <Add option="-DNDEBUG" /> + <Add option="-D_WINDOWS" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add option="-D_CRT_SECURE_NO_DEPRECATE" /> + <Add option="-D__GNUWIN32__" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="gdi32" /> + <Add library="winspool" /> + <Add library="comdlg32" /> + <Add library="advapi32" /> + <Add library="shell32" /> + <Add library="ole32" /> + <Add library="oleaut32" /> + <Add library="uuid" /> + <Add library="opengl32" /> + <Add library="winmm" /> + </Linker> + </Target> + <Target title="Win32 - Release - fast math - static"> + <Option platforms="Windows;" /> + <Option output="..\..\lib\Win32-gcc\Irrlicht" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="..\obj\win32-gcc-release-fast-static" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-fexpensive-optimizations" /> + <Add option="-Os" /> + <Add option="-O3" /> + <Add option="-W" /> + <Add option="-Wall" /> + <Add option="-ffast-math" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-DWIN32" /> + <Add option="-DNDEBUG" /> + <Add option="-D_WINDOWS" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add option="-D_CRT_SECURE_NO_DEPRECATE" /> + <Add option="-D__GNUWIN32__" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="gdi32" /> + <Add library="winspool" /> + <Add library="comdlg32" /> + <Add library="advapi32" /> + <Add library="shell32" /> + <Add library="ole32" /> + <Add library="oleaut32" /> + <Add library="uuid" /> + <Add library="opengl32" /> + <Add library="winmm" /> + </Linker> + </Target> + <Target title="Linux - Debug - shared"> + <Option platforms="Unix;" /> + <Option output="..\..\lib\Linux\libIrrlicht" prefix_auto="0" extension_auto="1" /> + <Option object_output="..\obj\linux-gcc-debug-shared" /> + <Option type="3" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="-Wextra" /> + <Add option="-Wall" /> + <Add option="-g" /> + <Add option="-O0" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-fPIC" /> + <Add option="-fno-exceptions" /> + <Add option="-D_DEBUG" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + <Add directory="libpng" /> + <Add directory="jpeglib" /> + </Compiler> + <Linker> + <Add library="GL" /> + <Add library="Xxf86vm" /> + <Add directory="\usr\X11R6\lib" /> + <Add directory="\usr\local\lib" /> + </Linker> + </Target> + <Target title="Linux - Release - accurate math - shared"> + <Option platforms="Unix;" /> + <Option output="..\..\lib\Linux\libIrrlicht" prefix_auto="0" extension_auto="1" /> + <Option object_output="..\obj\linux-gcc-release-shared" /> + <Option type="3" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="-O3" /> + <Add option="-Wextra" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-fPIC" /> + <Add option="-fno-exceptions" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + <Add directory="libpng" /> + <Add directory="jpeglib" /> + </Compiler> + <Linker> + <Add library="GL" /> + <Add library="Xxf86vm" /> + <Add directory="\usr\X11R6\lib" /> + <Add directory="\usr\local\lib" /> + </Linker> + </Target> + <Target title="Linux - Release - fast math - shared"> + <Option platforms="Unix;" /> + <Option output="..\..\lib\Linux\libIrrlicht" prefix_auto="0" extension_auto="1" /> + <Option object_output="..\obj\linux-gcc-release-fast-shared" /> + <Option type="3" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Option createStaticLib="1" /> + <Compiler> + <Add option="-O3" /> + <Add option="-Wextra" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-fPIC" /> + <Add option="-ffast-math" /> + <Add option="-fno-exceptions" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + <Add directory="libpng" /> + <Add directory="jpeglib" /> + </Compiler> + <Linker> + <Add library="GL" /> + <Add library="Xxf86vm" /> + <Add directory="\usr\X11R6\lib" /> + <Add directory="\usr\local\lib" /> + </Linker> + </Target> + <Target title="Linux - Debug - static"> + <Option platforms="Unix;" /> + <Option output="..\..\lib\Linux\libIrrlicht" prefix_auto="0" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="..\obj\linux-gcc-debug-shared" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-Wextra" /> + <Add option="-Wall" /> + <Add option="-g" /> + <Add option="-O0" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-fno-exceptions" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add option="-D_DEBUG" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + <Add directory="libpng" /> + </Compiler> + <Linker> + <Add library="GL" /> + <Add library="Xxf86vm" /> + <Add directory="\usr\X11R6\lib" /> + <Add directory="\usr\local\lib" /> + </Linker> + </Target> + <Target title="Linux - Release - accurate math - static"> + <Option platforms="Unix;" /> + <Option output="..\..\lib\Linux\libIrrlicht" prefix_auto="0" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="..\obj\linux-gcc-release-shared" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-O3" /> + <Add option="-Wextra" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-fno-exceptions" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + <Add directory="libpng" /> + </Compiler> + <Linker> + <Add library="GL" /> + <Add library="Xxf86vm" /> + <Add directory="\usr\X11R6\lib" /> + <Add directory="\usr\local\lib" /> + </Linker> + </Target> + <Target title="Linux - Release - fast math - static"> + <Option platforms="Unix;" /> + <Option output="..\..\lib\Linux\libIrrlicht" prefix_auto="0" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="..\obj\linux-gcc-release-fast-shared" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-O3" /> + <Add option="-Wextra" /> + <Add option="-Wno-unused-parameter" /> + <Add option="-ffast-math" /> + <Add option="-fno-exceptions" /> + <Add option="-D_IRR_STATIC_LIB_" /> + <Add directory="..\..\include" /> + <Add directory="zlib" /> + <Add directory="libpng" /> + </Compiler> + <Linker> + <Add library="GL" /> + <Add library="Xxf86vm" /> + <Add directory="\usr\X11R6\lib" /> + <Add directory="\usr\local\lib" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Win32 - Debug - dll;Win32 - Release - accurate math - dll;Win32 - Release - fast math - dll;" /> + </VirtualTargets> + <Unit filename="..\..\changes.txt" /> + <Unit filename="..\..\include\CDynamicMeshBuffer.h" /> + <Unit filename="..\..\include\CIndexBuffer.h" /> + <Unit filename="..\..\include\CMeshBuffer.h" /> + <Unit filename="..\..\include\CVertexBuffer.h" /> + <Unit filename="..\..\include\EAttributes.h" /> + <Unit filename="..\..\include\ECullingTypes.h" /> + <Unit filename="..\..\include\EDebugSceneTypes.h" /> + <Unit filename="..\..\include\EDeviceTypes.h" /> + <Unit filename="..\..\include\EDriverFeatures.h" /> + <Unit filename="..\..\include\EDriverTypes.h" /> + <Unit filename="..\..\include\EGUIAlignment.h" /> + <Unit filename="..\..\include\EGUIElementTypes.h" /> + <Unit filename="..\..\include\EHardwareBufferFlags.h" /> + <Unit filename="..\..\include\EMaterialFlags.h" /> + <Unit filename="..\..\include\EMaterialTypes.h" /> + <Unit filename="..\..\include\EMeshWriterEnums.h" /> + <Unit filename="..\..\include\EMessageBoxFlags.h" /> + <Unit filename="..\..\include\EPrimitiveTypes.h" /> + <Unit filename="..\..\include\ESceneNodeAnimatorTypes.h" /> + <Unit filename="..\..\include\ESceneNodeTypes.h" /> + <Unit filename="..\..\include\EShaderTypes.h" /> + <Unit filename="..\..\include\ETerrainElements.h" /> + <Unit filename="..\..\include\IAnimatedMesh.h" /> + <Unit filename="..\..\include\IAnimatedMeshMD2.h" /> + <Unit filename="..\..\include\IAnimatedMeshMD3.h" /> + <Unit filename="..\..\include\IAnimatedMeshSceneNode.h" /> + <Unit filename="..\..\include\IAttributeExchangingObject.h" /> + <Unit filename="..\..\include\IAttributes.h" /> + <Unit filename="..\..\include\IBillboardSceneNode.h" /> + <Unit filename="..\..\include\IBillboardTextSceneNode.h" /> + <Unit filename="..\..\include\IBoneSceneNode.h" /> + <Unit filename="..\..\include\ICameraSceneNode.h" /> + <Unit filename="..\..\include\IColladaMeshWriter.h" /> + <Unit filename="..\..\include\ICursorControl.h" /> + <Unit filename="..\..\include\IDummyTransformationSceneNode.h" /> + <Unit filename="..\..\include\IDynamicMeshBuffer.h" /> + <Unit filename="..\..\include\IEventReceiver.h" /> + <Unit filename="..\..\include\IFileArchive.h" /> + <Unit filename="..\..\include\IFileList.h" /> + <Unit filename="..\..\include\IFileSystem.h" /> + <Unit filename="..\..\include\IGPUProgrammingServices.h" /> + <Unit filename="..\..\include\IGUIButton.h" /> + <Unit filename="..\..\include\IGUICheckBox.h" /> + <Unit filename="..\..\include\IGUIColorSelectDialog.h" /> + <Unit filename="..\..\include\IGUIComboBox.h" /> + <Unit filename="..\..\include\IGUIContextMenu.h" /> + <Unit filename="..\..\include\IGUIEditBox.h" /> + <Unit filename="..\..\include\IGUIElement.h" /> + <Unit filename="..\..\include\IGUIElementFactory.h" /> + <Unit filename="..\..\include\IGUIEnvironment.h" /> + <Unit filename="..\..\include\IGUIFileOpenDialog.h" /> + <Unit filename="..\..\include\IGUIFont.h" /> + <Unit filename="..\..\include\IGUIFontBitmap.h" /> + <Unit filename="..\..\include\IGUIImage.h" /> + <Unit filename="..\..\include\IGUIImageList.h" /> + <Unit filename="..\..\include\IGUIInOutFader.h" /> + <Unit filename="..\..\include\IGUIListBox.h" /> + <Unit filename="..\..\include\IGUIMeshViewer.h" /> + <Unit filename="..\..\include\IGUIScrollBar.h" /> + <Unit filename="..\..\include\IGUISkin.h" /> + <Unit filename="..\..\include\IGUISpinBox.h" /> + <Unit filename="..\..\include\IGUISpriteBank.h" /> + <Unit filename="..\..\include\IGUIStaticText.h" /> + <Unit filename="..\..\include\IGUITabControl.h" /> + <Unit filename="..\..\include\IGUITable.h" /> + <Unit filename="..\..\include\IGUIToolbar.h" /> + <Unit filename="..\..\include\IGUITreeView.h" /> + <Unit filename="..\..\include\IGUIWindow.h" /> + <Unit filename="..\..\include\IGeometryCreator.h" /> + <Unit filename="..\..\include\IImage.h" /> + <Unit filename="..\..\include\IImageLoader.h" /> + <Unit filename="..\..\include\IImageWriter.h" /> + <Unit filename="..\..\include\IIndexBuffer.h" /> + <Unit filename="..\..\include\ILightManager.h" /> + <Unit filename="..\..\include\ILightSceneNode.h" /> + <Unit filename="..\..\include\ILogger.h" /> + <Unit filename="..\..\include\IMaterialRenderer.h" /> + <Unit filename="..\..\include\IMaterialRendererServices.h" /> + <Unit filename="..\..\include\IMesh.h" /> + <Unit filename="..\..\include\IMeshBuffer.h" /> + <Unit filename="..\..\include\IMeshCache.h" /> + <Unit filename="..\..\include\IMeshLoader.h" /> + <Unit filename="..\..\include\IMeshManipulator.h" /> + <Unit filename="..\..\include\IMeshSceneNode.h" /> + <Unit filename="..\..\include\IMeshWriter.h" /> + <Unit filename="..\..\include\IMetaTriangleSelector.h" /> + <Unit filename="..\..\include\IOSOperator.h" /> + <Unit filename="..\..\include\IParticleAffector.h" /> + <Unit filename="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h" /> + <Unit filename="..\..\include\IParticleAttractionAffector.h" /> + <Unit filename="..\..\include\IParticleBoxEmitter.h" /> + <Unit filename="..\..\include\IParticleCylinderEmitter.h" /> + <Unit filename="..\..\include\IParticleEmitter.h" /> + <Unit filename="..\..\include\IParticleFadeOutAffector.h" /> + <Unit filename="..\..\include\IParticleGravityAffector.h" /> + <Unit filename="..\..\include\IParticleMeshEmitter.h" /> + <Unit filename="..\..\include\IParticleRingEmitter.h" /> + <Unit filename="..\..\include\IParticleRotationAffector.h" /> + <Unit filename="..\..\include\IParticleSphereEmitter.h" /> + <Unit filename="..\..\include\IParticleSystemSceneNode.h" /> + <Unit filename="..\..\include\IQ3LevelMesh.h" /> + <Unit filename="..\..\include\IQ3Shader.h" /> + <Unit filename="..\..\include\IReadFile.h" /> + <Unit filename="..\..\include\IReferenceCounted.h" /> + <Unit filename="..\..\include\ISceneCollisionManager.h" /> + <Unit filename="..\..\include\ISceneLoader.h" /> + <Unit filename="..\..\include\ISceneManager.h" /> + <Unit filename="..\..\include\ISceneNode.h" /> + <Unit filename="..\..\include\ISceneNodeAnimator.h" /> + <Unit filename="..\..\include\ISceneNodeAnimatorCameraFPS.h" /> + <Unit filename="..\..\include\ISceneNodeAnimatorCameraMaya.h" /> + <Unit filename="..\..\include\ISceneNodeAnimatorCollisionResponse.h" /> + <Unit filename="..\..\include\ISceneNodeAnimatorFactory.h" /> + <Unit filename="..\..\include\ISceneNodeFactory.h" /> + <Unit filename="..\..\include\ISceneUserDataSerializer.h" /> + <Unit filename="..\..\include\IShaderConstantSetCallBack.h" /> + <Unit filename="..\..\include\IShadowVolumeSceneNode.h" /> + <Unit filename="..\..\include\ISkinnedMesh.h" /> + <Unit filename="..\..\include\ITerrainSceneNode.h" /> + <Unit filename="..\..\include\ITextSceneNode.h" /> + <Unit filename="..\..\include\ITexture.h" /> + <Unit filename="..\..\include\ITimer.h" /> + <Unit filename="..\..\include\ITriangleSelector.h" /> + <Unit filename="..\..\include\IVertexBuffer.h" /> + <Unit filename="..\..\include\IVideoDriver.h" /> + <Unit filename="..\..\include\IVideoModeList.h" /> + <Unit filename="..\..\include\IVolumeLightSceneNode.h" /> + <Unit filename="..\..\include\IWriteFile.h" /> + <Unit filename="..\..\include\IXMLReader.h" /> + <Unit filename="..\..\include\IXMLWriter.h" /> + <Unit filename="..\..\include\IrrCompileConfig.h" /> + <Unit filename="..\..\include\IrrlichtDevice.h" /> + <Unit filename="..\..\include\Keycodes.h" /> + <Unit filename="..\..\include\S3DVertex.h" /> + <Unit filename="..\..\include\SAnimatedMesh.h" /> + <Unit filename="..\..\include\SColor.h" /> + <Unit filename="..\..\include\SExposedVideoData.h" /> + <Unit filename="..\..\include\SIrrCreationParameters.h" /> + <Unit filename="..\..\include\SKeyMap.h" /> + <Unit filename="..\..\include\SLight.h" /> + <Unit filename="..\..\include\SMaterial.h" /> + <Unit filename="..\..\include\SMaterialLayer.h" /> + <Unit filename="..\..\include\SMesh.h" /> + <Unit filename="..\..\include\SMeshBuffer.h" /> + <Unit filename="..\..\include\SMeshBufferLightMap.h" /> + <Unit filename="..\..\include\SMeshBufferTangents.h" /> + <Unit filename="..\..\include\SParticle.h" /> + <Unit filename="..\..\include\SSharedMeshBuffer.h" /> + <Unit filename="..\..\include\SSkinMeshBuffer.h" /> + <Unit filename="..\..\include\SVertexIndex.h" /> + <Unit filename="..\..\include\SVertexManipulator.h" /> + <Unit filename="..\..\include\SViewFrustum.h" /> + <Unit filename="..\..\include\SceneParameters.h" /> + <Unit filename="..\..\include\aabbox3d.h" /> + <Unit filename="..\..\include\coreutil.h" /> + <Unit filename="..\..\include\dimension2d.h" /> + <Unit filename="..\..\include\fast_atof.h" /> + <Unit filename="..\..\include\heapsort.h" /> + <Unit filename="..\..\include\irrAllocator.h" /> + <Unit filename="..\..\include\irrArray.h" /> + <Unit filename="..\..\include\irrList.h" /> + <Unit filename="..\..\include\irrMap.h" /> + <Unit filename="..\..\include\irrMath.h" /> + <Unit filename="..\..\include\irrString.h" /> + <Unit filename="..\..\include\irrTypes.h" /> + <Unit filename="..\..\include\irrXML.h" /> + <Unit filename="..\..\include\irrlicht.h" /> + <Unit filename="..\..\include\irrpack.h" /> + <Unit filename="..\..\include\irrunpack.h" /> + <Unit filename="..\..\include\line2d.h" /> + <Unit filename="..\..\include\line3d.h" /> + <Unit filename="..\..\include\matrix4.h" /> + <Unit filename="..\..\include\path.h" /> + <Unit filename="..\..\include\plane3d.h" /> + <Unit filename="..\..\include\position2d.h" /> + <Unit filename="..\..\include\quaternion.h" /> + <Unit filename="..\..\include\rect.h" /> + <Unit filename="..\..\include\triangle3d.h" /> + <Unit filename="..\..\include\vector2d.h" /> + <Unit filename="..\..\include\vector3d.h" /> + <Unit filename="..\..\readme.txt" /> + <Unit filename="BuiltInFont.h" /> + <Unit filename="C3DSMeshFileLoader.cpp" /> + <Unit filename="C3DSMeshFileLoader.h" /> + <Unit filename="CAnimatedMeshHalfLife.cpp" /> + <Unit filename="CAnimatedMeshHalfLife.h" /> + <Unit filename="CAnimatedMeshMD2.cpp" /> + <Unit filename="CAnimatedMeshMD2.h" /> + <Unit filename="CAnimatedMeshMD3.cpp" /> + <Unit filename="CAnimatedMeshMD3.h" /> + <Unit filename="CAnimatedMeshSceneNode.cpp" /> + <Unit filename="CAnimatedMeshSceneNode.h" /> + <Unit filename="CAttributeImpl.h" /> + <Unit filename="CAttributes.cpp" /> + <Unit filename="CAttributes.h" /> + <Unit filename="CB3DMeshFileLoader.cpp" /> + <Unit filename="CB3DMeshFileLoader.h" /> + <Unit filename="CBSPMeshFileLoader.cpp" /> + <Unit filename="CBSPMeshFileLoader.h" /> + <Unit filename="CBillboardSceneNode.cpp" /> + <Unit filename="CBillboardSceneNode.h" /> + <Unit filename="CBlit.h" /> + <Unit filename="CBoneSceneNode.cpp" /> + <Unit filename="CBoneSceneNode.h" /> + <Unit filename="CBurningShader_Raster_Reference.cpp" /> + <Unit filename="CCSMLoader.cpp" /> + <Unit filename="CCSMLoader.h" /> + <Unit filename="CCameraSceneNode.cpp" /> + <Unit filename="CCameraSceneNode.h" /> + <Unit filename="CCgMaterialRenderer.cpp" /> + <Unit filename="CCgMaterialRenderer.h" /> + <Unit filename="CColladaFileLoader.cpp" /> + <Unit filename="CColladaFileLoader.h" /> + <Unit filename="CColladaMeshWriter.cpp" /> + <Unit filename="CColladaMeshWriter.h" /> + <Unit filename="CColorConverter.cpp" /> + <Unit filename="CColorConverter.h" /> + <Unit filename="CCubeSceneNode.cpp" /> + <Unit filename="CCubeSceneNode.h" /> + <Unit filename="CD3D8Driver.cpp" /> + <Unit filename="CD3D8Driver.h" /> + <Unit filename="CD3D8MaterialRenderer.h" /> + <Unit filename="CD3D8NormalMapRenderer.cpp" /> + <Unit filename="CD3D8NormalMapRenderer.h" /> + <Unit filename="CD3D8ParallaxMapRenderer.cpp" /> + <Unit filename="CD3D8ParallaxMapRenderer.h" /> + <Unit filename="CD3D8ShaderMaterialRenderer.cpp" /> + <Unit filename="CD3D8ShaderMaterialRenderer.h" /> + <Unit filename="CD3D8Texture.cpp" /> + <Unit filename="CD3D8Texture.h" /> + <Unit filename="CD3D9CgMaterialRenderer.cpp" /> + <Unit filename="CD3D9CgMaterialRenderer.h" /> + <Unit filename="CD3D9Driver.cpp" /> + <Unit filename="CD3D9Driver.h" /> + <Unit filename="CD3D9HLSLMaterialRenderer.cpp" /> + <Unit filename="CD3D9HLSLMaterialRenderer.h" /> + <Unit filename="CD3D9MaterialRenderer.h" /> + <Unit filename="CD3D9NormalMapRenderer.cpp" /> + <Unit filename="CD3D9NormalMapRenderer.h" /> + <Unit filename="CD3D9ParallaxMapRenderer.cpp" /> + <Unit filename="CD3D9ParallaxMapRenderer.h" /> + <Unit filename="CD3D9ShaderMaterialRenderer.cpp" /> + <Unit filename="CD3D9ShaderMaterialRenderer.h" /> + <Unit filename="CD3D9Texture.cpp" /> + <Unit filename="CD3D9Texture.h" /> + <Unit filename="CDMFLoader.cpp" /> + <Unit filename="CDMFLoader.h" /> + <Unit filename="CDefaultGUIElementFactory.cpp" /> + <Unit filename="CDefaultGUIElementFactory.h" /> + <Unit filename="CDefaultSceneNodeAnimatorFactory.cpp" /> + <Unit filename="CDefaultSceneNodeAnimatorFactory.h" /> + <Unit filename="CDefaultSceneNodeFactory.cpp" /> + <Unit filename="CDefaultSceneNodeFactory.h" /> + <Unit filename="CDepthBuffer.cpp" /> + <Unit filename="CDepthBuffer.h" /> + <Unit filename="CDummyTransformationSceneNode.cpp" /> + <Unit filename="CDummyTransformationSceneNode.h" /> + <Unit filename="CEmptySceneNode.cpp" /> + <Unit filename="CEmptySceneNode.h" /> + <Unit filename="CFPSCounter.cpp" /> + <Unit filename="CFPSCounter.h" /> + <Unit filename="CFileList.cpp" /> + <Unit filename="CFileList.h" /> + <Unit filename="CFileSystem.cpp" /> + <Unit filename="CFileSystem.h" /> + <Unit filename="CGUIButton.cpp" /> + <Unit filename="CGUIButton.h" /> + <Unit filename="CGUICheckBox.cpp" /> + <Unit filename="CGUICheckbox.h" /> + <Unit filename="CGUIColorSelectDialog.cpp" /> + <Unit filename="CGUIColorSelectDialog.h" /> + <Unit filename="CGUIComboBox.cpp" /> + <Unit filename="CGUIComboBox.h" /> + <Unit filename="CGUIContextMenu.cpp" /> + <Unit filename="CGUIContextMenu.h" /> + <Unit filename="CGUIEditBox.cpp" /> + <Unit filename="CGUIEditBox.h" /> + <Unit filename="CGUIEnvironment.cpp" /> + <Unit filename="CGUIEnvironment.h" /> + <Unit filename="CGUIFileOpenDialog.cpp" /> + <Unit filename="CGUIFileOpenDialog.h" /> + <Unit filename="CGUIFont.cpp" /> + <Unit filename="CGUIFont.h" /> + <Unit filename="CGUIImage.cpp" /> + <Unit filename="CGUIImage.h" /> + <Unit filename="CGUIImageList.cpp" /> + <Unit filename="CGUIImageList.h" /> + <Unit filename="CGUIInOutFader.cpp" /> + <Unit filename="CGUIInOutFader.h" /> + <Unit filename="CGUIListBox.cpp" /> + <Unit filename="CGUIListBox.h" /> + <Unit filename="CGUIMenu.cpp" /> + <Unit filename="CGUIMenu.h" /> + <Unit filename="CGUIMeshViewer.cpp" /> + <Unit filename="CGUIMeshViewer.h" /> + <Unit filename="CGUIMessageBox.cpp" /> + <Unit filename="CGUIMessageBox.h" /> + <Unit filename="CGUIModalScreen.cpp" /> + <Unit filename="CGUIModalScreen.h" /> + <Unit filename="CGUIScrollBar.cpp" /> + <Unit filename="CGUIScrollBar.h" /> + <Unit filename="CGUISkin.cpp" /> + <Unit filename="CGUISkin.h" /> + <Unit filename="CGUISpinBox.cpp" /> + <Unit filename="CGUISpinBox.h" /> + <Unit filename="CGUISpriteBank.cpp" /> + <Unit filename="CGUISpriteBank.h" /> + <Unit filename="CGUIStaticText.cpp" /> + <Unit filename="CGUIStaticText.h" /> + <Unit filename="CGUITabControl.cpp" /> + <Unit filename="CGUITabControl.h" /> + <Unit filename="CGUITable.cpp" /> + <Unit filename="CGUITable.h" /> + <Unit filename="CGUIToolBar.cpp" /> + <Unit filename="CGUIToolBar.h" /> + <Unit filename="CGUITreeView.cpp" /> + <Unit filename="CGUITreeView.h" /> + <Unit filename="CGUIWindow.cpp" /> + <Unit filename="CGUIWindow.h" /> + <Unit filename="CGeometryCreator.cpp" /> + <Unit filename="CGeometryCreator.h" /> + <Unit filename="CImage.cpp" /> + <Unit filename="CImage.h" /> + <Unit filename="CImageLoaderBMP.cpp" /> + <Unit filename="CImageLoaderBMP.h" /> + <Unit filename="CImageLoaderDDS.cpp" /> + <Unit filename="CImageLoaderDDS.h" /> + <Unit filename="CImageLoaderJPG.cpp" /> + <Unit filename="CImageLoaderJPG.h" /> + <Unit filename="CImageLoaderPCX.cpp" /> + <Unit filename="CImageLoaderPCX.h" /> + <Unit filename="CImageLoaderPNG.cpp" /> + <Unit filename="CImageLoaderPNG.h" /> + <Unit filename="CImageLoaderPPM.cpp" /> + <Unit filename="CImageLoaderPPM.h" /> + <Unit filename="CImageLoaderPSD.cpp" /> + <Unit filename="CImageLoaderPSD.h" /> + <Unit filename="CImageLoaderRGB.cpp" /> + <Unit filename="CImageLoaderRGB.h" /> + <Unit filename="CImageLoaderTGA.cpp" /> + <Unit filename="CImageLoaderTGA.h" /> + <Unit filename="CImageLoaderWAL.cpp" /> + <Unit filename="CImageLoaderWAL.h" /> + <Unit filename="CImageWriterBMP.cpp" /> + <Unit filename="CImageWriterBMP.h" /> + <Unit filename="CImageWriterJPG.cpp" /> + <Unit filename="CImageWriterJPG.h" /> + <Unit filename="CImageWriterPCX.cpp" /> + <Unit filename="CImageWriterPCX.h" /> + <Unit filename="CImageWriterPNG.cpp" /> + <Unit filename="CImageWriterPNG.h" /> + <Unit filename="CImageWriterPPM.cpp" /> + <Unit filename="CImageWriterPPM.h" /> + <Unit filename="CImageWriterPSD.cpp" /> + <Unit filename="CImageWriterPSD.h" /> + <Unit filename="CImageWriterTGA.cpp" /> + <Unit filename="CImageWriterTGA.h" /> + <Unit filename="CIrrDeviceConsole.cpp" /> + <Unit filename="CIrrDeviceConsole.h" /> + <Unit filename="CIrrDeviceLinux.cpp" /> + <Unit filename="CIrrDeviceLinux.h" /> + <Unit filename="CIrrDeviceSDL.cpp" /> + <Unit filename="CIrrDeviceSDL.h" /> + <Unit filename="CIrrDeviceStub.cpp" /> + <Unit filename="CIrrDeviceStub.h" /> + <Unit filename="CIrrDeviceWin32.cpp" /> + <Unit filename="CIrrDeviceWin32.h" /> + <Unit filename="CIrrDeviceWinCE.cpp" /> + <Unit filename="CIrrDeviceWinCE.h" /> + <Unit filename="CIrrMeshFileLoader.cpp" /> + <Unit filename="CIrrMeshFileLoader.h" /> + <Unit filename="CIrrMeshWriter.cpp" /> + <Unit filename="CIrrMeshWriter.h" /> + <Unit filename="CLMTSMeshFileLoader.cpp" /> + <Unit filename="CLMTSMeshFileLoader.h" /> + <Unit filename="CLWOMeshFileLoader.cpp" /> + <Unit filename="CLWOMeshFileLoader.h" /> + <Unit filename="CLightSceneNode.cpp" /> + <Unit filename="CLightSceneNode.h" /> + <Unit filename="CLimitReadFile.cpp" /> + <Unit filename="CLimitReadFile.h" /> + <Unit filename="CLogger.cpp" /> + <Unit filename="CLogger.h" /> + <Unit filename="CMD2MeshFileLoader.cpp" /> + <Unit filename="CMD2MeshFileLoader.h" /> + <Unit filename="CMD3MeshFileLoader.cpp" /> + <Unit filename="CMD3MeshFileLoader.h" /> + <Unit filename="CMS3DMeshFileLoader.cpp" /> + <Unit filename="CMS3DMeshFileLoader.h" /> + <Unit filename="CMY3DHelper.h" /> + <Unit filename="CMY3DMeshFileLoader.cpp" /> + <Unit filename="CMY3DMeshFileLoader.h" /> + <Unit filename="CMemoryFile.cpp" /> + <Unit filename="CMemoryFile.h" /> + <Unit filename="CMeshCache.cpp" /> + <Unit filename="CMeshCache.h" /> + <Unit filename="CMeshManipulator.cpp" /> + <Unit filename="CMeshManipulator.h" /> + <Unit filename="CMeshSceneNode.cpp" /> + <Unit filename="CMeshSceneNode.h" /> + <Unit filename="CMetaTriangleSelector.cpp" /> + <Unit filename="CMetaTriangleSelector.h" /> + <Unit filename="CMountPointReader.cpp" /> + <Unit filename="CMountPointReader.h" /> + <Unit filename="CNPKReader.cpp" /> + <Unit filename="CNPKReader.h" /> + <Unit filename="CNullDriver.cpp" /> + <Unit filename="CNullDriver.h" /> + <Unit filename="COBJMeshFileLoader.cpp" /> + <Unit filename="COBJMeshFileLoader.h" /> + <Unit filename="COBJMeshWriter.cpp" /> + <Unit filename="COBJMeshWriter.h" /> + <Unit filename="COCTLoader.cpp" /> + <Unit filename="COCTLoader.h" /> + <Unit filename="COSOperator.cpp" /> + <Unit filename="COSOperator.h" /> + <Unit filename="COctreeSceneNode.cpp" /> + <Unit filename="COctreeSceneNode.h" /> + <Unit filename="COctreeTriangleSelector.cpp" /> + <Unit filename="COctreeTriangleSelector.h" /> + <Unit filename="COgreMeshFileLoader.cpp" /> + <Unit filename="COgreMeshFileLoader.h" /> + <Unit filename="COpenGLCgMaterialRenderer.cpp" /> + <Unit filename="COpenGLCgMaterialRenderer.h" /> + <Unit filename="COpenGLDriver.cpp" /> + <Unit filename="COpenGLDriver.h" /> + <Unit filename="COpenGLExtensionHandler.cpp" /> + <Unit filename="COpenGLExtensionHandler.h" /> + <Unit filename="COpenGLMaterialRenderer.h" /> + <Unit filename="COpenGLNormalMapRenderer.cpp" /> + <Unit filename="COpenGLNormalMapRenderer.h" /> + <Unit filename="COpenGLParallaxMapRenderer.cpp" /> + <Unit filename="COpenGLParallaxMapRenderer.h" /> + <Unit filename="COpenGLSLMaterialRenderer.cpp" /> + <Unit filename="COpenGLSLMaterialRenderer.h" /> + <Unit filename="COpenGLShaderMaterialRenderer.cpp" /> + <Unit filename="COpenGLShaderMaterialRenderer.h" /> + <Unit filename="COpenGLTexture.cpp" /> + <Unit filename="COpenGLTexture.h" /> + <Unit filename="CPLYMeshFileLoader.cpp" /> + <Unit filename="CPLYMeshFileLoader.h" /> + <Unit filename="CPLYMeshWriter.cpp" /> + <Unit filename="CPLYMeshWriter.h" /> + <Unit filename="CPakReader.cpp" /> + <Unit filename="CPakReader.h" /> + <Unit filename="CParticleAnimatedMeshSceneNodeEmitter.cpp" /> + <Unit filename="CParticleAnimatedMeshSceneNodeEmitter.h" /> + <Unit filename="CParticleAttractionAffector.cpp" /> + <Unit filename="CParticleAttractionAffector.h" /> + <Unit filename="CParticleBoxEmitter.cpp" /> + <Unit filename="CParticleBoxEmitter.h" /> + <Unit filename="CParticleCylinderEmitter.cpp" /> + <Unit filename="CParticleCylinderEmitter.h" /> + <Unit filename="CParticleFadeOutAffector.cpp" /> + <Unit filename="CParticleFadeOutAffector.h" /> + <Unit filename="CParticleGravityAffector.cpp" /> + <Unit filename="CParticleGravityAffector.h" /> + <Unit filename="CParticleMeshEmitter.cpp" /> + <Unit filename="CParticleMeshEmitter.h" /> + <Unit filename="CParticlePointEmitter.cpp" /> + <Unit filename="CParticlePointEmitter.h" /> + <Unit filename="CParticleRingEmitter.cpp" /> + <Unit filename="CParticleRingEmitter.h" /> + <Unit filename="CParticleRotationAffector.cpp" /> + <Unit filename="CParticleRotationAffector.h" /> + <Unit filename="CParticleScaleAffector.cpp" /> + <Unit filename="CParticleScaleAffector.h" /> + <Unit filename="CParticleSphereEmitter.cpp" /> + <Unit filename="CParticleSphereEmitter.h" /> + <Unit filename="CParticleSystemSceneNode.cpp" /> + <Unit filename="CParticleSystemSceneNode.h" /> + <Unit filename="CQ3LevelMesh.cpp" /> + <Unit filename="CQ3LevelMesh.h" /> + <Unit filename="CQuake3ShaderSceneNode.cpp" /> + <Unit filename="CQuake3ShaderSceneNode.h" /> + <Unit filename="CReadFile.cpp" /> + <Unit filename="CReadFile.h" /> + <Unit filename="CSMFMeshFileLoader.cpp" /> + <Unit filename="CSMFMeshFileLoader.h" /> + <Unit filename="CSTLMeshFileLoader.cpp" /> + <Unit filename="CSTLMeshFileLoader.h" /> + <Unit filename="CSTLMeshWriter.cpp" /> + <Unit filename="CSTLMeshWriter.h" /> + <Unit filename="CSceneCollisionManager.cpp" /> + <Unit filename="CSceneCollisionManager.h" /> + <Unit filename="CSceneLoaderIrr.cpp" /> + <Unit filename="CSceneLoaderIrr.h" /> + <Unit filename="CSceneManager.cpp" /> + <Unit filename="CSceneManager.h" /> + <Unit filename="CSceneNodeAnimatorCameraFPS.cpp" /> + <Unit filename="CSceneNodeAnimatorCameraFPS.h" /> + <Unit filename="CSceneNodeAnimatorCameraMaya.cpp" /> + <Unit filename="CSceneNodeAnimatorCameraMaya.h" /> + <Unit filename="CSceneNodeAnimatorCollisionResponse.cpp" /> + <Unit filename="CSceneNodeAnimatorCollisionResponse.h" /> + <Unit filename="CSceneNodeAnimatorDelete.cpp" /> + <Unit filename="CSceneNodeAnimatorDelete.h" /> + <Unit filename="CSceneNodeAnimatorFlyCircle.cpp" /> + <Unit filename="CSceneNodeAnimatorFlyCircle.h" /> + <Unit filename="CSceneNodeAnimatorFlyStraight.cpp" /> + <Unit filename="CSceneNodeAnimatorFlyStraight.h" /> + <Unit filename="CSceneNodeAnimatorFollowSpline.cpp" /> + <Unit filename="CSceneNodeAnimatorFollowSpline.h" /> + <Unit filename="CSceneNodeAnimatorRotation.cpp" /> + <Unit filename="CSceneNodeAnimatorRotation.h" /> + <Unit filename="CSceneNodeAnimatorTexture.cpp" /> + <Unit filename="CSceneNodeAnimatorTexture.h" /> + <Unit filename="CShadowVolumeSceneNode.cpp" /> + <Unit filename="CShadowVolumeSceneNode.h" /> + <Unit filename="CSkinnedMesh.cpp" /> + <Unit filename="CSkinnedMesh.h" /> + <Unit filename="CSkyBoxSceneNode.cpp" /> + <Unit filename="CSkyBoxSceneNode.h" /> + <Unit filename="CSkyDomeSceneNode.cpp" /> + <Unit filename="CSkyDomeSceneNode.h" /> + <Unit filename="CSoftware2MaterialRenderer.h" /> + <Unit filename="CSoftwareDriver.cpp" /> + <Unit filename="CSoftwareDriver.h" /> + <Unit filename="CSoftwareDriver2.cpp" /> + <Unit filename="CSoftwareDriver2.h" /> + <Unit filename="CSoftwareTexture.cpp" /> + <Unit filename="CSoftwareTexture.h" /> + <Unit filename="CSoftwareTexture2.cpp" /> + <Unit filename="CSoftwareTexture2.h" /> + <Unit filename="CSphereSceneNode.cpp" /> + <Unit filename="CSphereSceneNode.h" /> + <Unit filename="CTRFlat.cpp" /> + <Unit filename="CTRFlatWire.cpp" /> + <Unit filename="CTRGouraud.cpp" /> + <Unit filename="CTRGouraud2.cpp" /> + <Unit filename="CTRGouraudAlpha2.cpp" /> + <Unit filename="CTRGouraudAlphaNoZ2.cpp" /> + <Unit filename="CTRGouraudWire.cpp" /> + <Unit filename="CTRNormalMap.cpp" /> + <Unit filename="CTRStencilShadow.cpp" /> + <Unit filename="CTRTextureBlend.cpp" /> + <Unit filename="CTRTextureDetailMap2.cpp" /> + <Unit filename="CTRTextureFlat.cpp" /> + <Unit filename="CTRTextureFlatWire.cpp" /> + <Unit filename="CTRTextureGouraud.cpp" /> + <Unit filename="CTRTextureGouraud.h" /> + <Unit filename="CTRTextureGouraud2.cpp" /> + <Unit filename="CTRTextureGouraudAdd.cpp" /> + <Unit filename="CTRTextureGouraudAdd2.cpp" /> + <Unit filename="CTRTextureGouraudAddNoZ2.cpp" /> + <Unit filename="CTRTextureGouraudAlpha.cpp" /> + <Unit filename="CTRTextureGouraudAlphaNoZ.cpp" /> + <Unit filename="CTRTextureGouraudNoZ.cpp" /> + <Unit filename="CTRTextureGouraudNoZ2.cpp" /> + <Unit filename="CTRTextureGouraudVertexAlpha2.cpp" /> + <Unit filename="CTRTextureGouraudWire.cpp" /> + <Unit filename="CTRTextureLightMap2_Add.cpp" /> + <Unit filename="CTRTextureLightMap2_M1.cpp" /> + <Unit filename="CTRTextureLightMap2_M2.cpp" /> + <Unit filename="CTRTextureLightMap2_M4.cpp" /> + <Unit filename="CTRTextureLightMapGouraud2_M4.cpp" /> + <Unit filename="CTRTextureWire2.cpp" /> + <Unit filename="CTarReader.cpp" /> + <Unit filename="CTarReader.h" /> + <Unit filename="CTerrainSceneNode.cpp" /> + <Unit filename="CTerrainSceneNode.h" /> + <Unit filename="CTerrainTriangleSelector.cpp" /> + <Unit filename="CTerrainTriangleSelector.h" /> + <Unit filename="CTextSceneNode.cpp" /> + <Unit filename="CTextSceneNode.h" /> + <Unit filename="CTimer.h" /> + <Unit filename="CTriangleBBSelector.cpp" /> + <Unit filename="CTriangleBBSelector.h" /> + <Unit filename="CTriangleSelector.cpp" /> + <Unit filename="CTriangleSelector.h" /> + <Unit filename="CVideoModeList.cpp" /> + <Unit filename="CVideoModeList.h" /> + <Unit filename="CVolumeLightSceneNode.cpp" /> + <Unit filename="CVolumeLightSceneNode.h" /> + <Unit filename="CWADReader.cpp" /> + <Unit filename="CWADReader.h" /> + <Unit filename="CWaterSurfaceSceneNode.cpp" /> + <Unit filename="CWaterSurfaceSceneNode.h" /> + <Unit filename="CWriteFile.cpp" /> + <Unit filename="CWriteFile.h" /> + <Unit filename="CXMLReader.cpp" /> + <Unit filename="CXMLReader.h" /> + <Unit filename="CXMLReaderImpl.h" /> + <Unit filename="CXMLWriter.cpp" /> + <Unit filename="CXMLWriter.h" /> + <Unit filename="CXMeshFileLoader.cpp" /> + <Unit filename="CXMeshFileLoader.h" /> + <Unit filename="CZBuffer.cpp" /> + <Unit filename="CZBuffer.h" /> + <Unit filename="CZipReader.cpp" /> + <Unit filename="CZipReader.h" /> + <Unit filename="IAttribute.h" /> + <Unit filename="IBurningShader.cpp" /> + <Unit filename="IBurningShader.h" /> + <Unit filename="IDepthBuffer.h" /> + <Unit filename="IImagePresenter.h" /> + <Unit filename="ITriangleRenderer.h" /> + <Unit filename="IZBuffer.h" /> + <Unit filename="Irrlicht.cpp" /> + <Unit filename="MacOSX\CIrrDeviceMacOSX.h" /> + <Unit filename="MacOSX\CIrrDeviceMacOSX.mm" /> + <Unit filename="Octree.h" /> + <Unit filename="S2DVertex.h" /> + <Unit filename="S4DVertex.h" /> + <Unit filename="SoftwareDriver2_compile_config.h" /> + <Unit filename="SoftwareDriver2_helper.h" /> + <Unit filename="aesGladman\aes.h" /> + <Unit filename="aesGladman\aescrypt.cpp" /> + <Unit filename="aesGladman\aeskey.cpp" /> + <Unit filename="aesGladman\aesopt.h" /> + <Unit filename="aesGladman\aestab.cpp" /> + <Unit filename="aesGladman\fileenc.cpp" /> + <Unit filename="aesGladman\fileenc.h" /> + <Unit filename="aesGladman\hmac.cpp" /> + <Unit filename="aesGladman\hmac.h" /> + <Unit filename="aesGladman\prng.cpp" /> + <Unit filename="aesGladman\prng.h" /> + <Unit filename="aesGladman\pwd2key.cpp" /> + <Unit filename="aesGladman\pwd2key.h" /> + <Unit filename="aesGladman\sha1.cpp" /> + <Unit filename="aesGladman\sha1.h" /> + <Unit filename="aesGladman\sha2.cpp" /> + <Unit filename="aesGladman\sha2.h" /> + <Unit filename="bzip2\blocksort.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="bzip2\bzcompress.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="bzip2\bzlib.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="bzip2\bzlib.h" /> + <Unit filename="bzip2\bzlib_private.h" /> + <Unit filename="bzip2\crctable.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="bzip2\decompress.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="bzip2\huffman.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="bzip2\randtable.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="dmfsupport.h" /> + <Unit filename="glext.h" /> + <Unit filename="irrXML.cpp" /> + <Unit filename="jpeglib\cderror.h" /> + <Unit filename="jpeglib\jaricom.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcapimin.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcapistd.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcarith.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jccoefct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jccolor.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcdctmgr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jchuff.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jchuff.h" /> + <Unit filename="jpeglib\jcinit.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcmainct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcmarker.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcmaster.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcomapi.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jconfig.h" /> + <Unit filename="jpeglib\jcparam.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcprepct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jcsample.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jctrans.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdapimin.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdapistd.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdarith.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdatadst.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdatasrc.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdcoefct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdcolor.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdct.h" /> + <Unit filename="jpeglib\jddctmgr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdhuff.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdhuff.h" /> + <Unit filename="jpeglib\jdinput.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdmainct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdmarker.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdmaster.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdmerge.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdpostct.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdsample.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jdtrans.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jerror.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jerror.h" /> + <Unit filename="jpeglib\jfdctflt.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jfdctfst.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jfdctint.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jidctflt.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jidctfst.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jidctint.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jinclude.h" /> + <Unit filename="jpeglib\jmemmgr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jmemnobs.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jmemsys.h" /> + <Unit filename="jpeglib\jmorecfg.h" /> + <Unit filename="jpeglib\jpegint.h" /> + <Unit filename="jpeglib\jpeglib.h" /> + <Unit filename="jpeglib\jquant1.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jquant2.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jutils.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="jpeglib\jversion.h" /> + <Unit filename="libpng\png.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\png.h" /> + <Unit filename="libpng\pngconf.h" /> + <Unit filename="libpng\pngerror.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngget.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngmem.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngpread.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngread.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngrio.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngrtran.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngrutil.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngset.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngtrans.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngwio.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngwrite.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngwtran.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="libpng\pngwutil.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="lzma\LzmaDec.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="lzma\LzmaDec.h" /> + <Unit filename="lzma\Types.h" /> + <Unit filename="os.cpp" /> + <Unit filename="os.h" /> + <Unit filename="zlib\adler32.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\compress.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\crc32.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\crc32.h" /> + <Unit filename="zlib\deflate.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\deflate.h" /> + <Unit filename="zlib\inffast.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\inffast.h" /> + <Unit filename="zlib\inffixed.h" /> + <Unit filename="zlib\inflate.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\inftrees.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\inftrees.h" /> + <Unit filename="zlib\trees.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\trees.h" /> + <Unit filename="zlib\uncompr.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\zconf.h" /> + <Unit filename="zlib\zlib.h" /> + <Unit filename="zlib\zutil.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="zlib\zutil.h" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.aps b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.aps new file mode 100644 index 0000000..1c5c2c9 Binary files /dev/null and b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.aps differ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.cpp new file mode 100644 index 0000000..da0043b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.cpp @@ -0,0 +1,154 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "IrrCompileConfig.h" + +static const char* const copyright = "Irrlicht Engine (c) 2002-2012 Nikolaus Gebhardt"; + +#ifdef _IRR_WINDOWS_ + #include <windows.h> + #if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(_WIN32_WCE) + #include <crtdbg.h> + #endif // _DEBUG +#endif + +#include "irrlicht.h" +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ +#include "CIrrDeviceWin32.h" +#endif + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ +#include "MacOSX/CIrrDeviceMacOSX.h" +#endif + +#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ +#include "CIrrDeviceWinCE.h" +#endif + +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ +#include "CIrrDeviceLinux.h" +#endif + +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ +#include "CIrrDeviceSDL.h" +#endif + +#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ +#include "CIrrDeviceFB.h" +#endif + +#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#include "CIrrDeviceConsole.h" +#endif + +namespace irr +{ + //! stub for calling createDeviceEx + IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType, + const core::dimension2d<u32>& windowSize, + u32 bits, bool fullscreen, + bool stencilbuffer, bool vsync, IEventReceiver* res) + { + SIrrlichtCreationParameters p; + p.DriverType = driverType; + p.WindowSize = windowSize; + p.Bits = (u8)bits; + p.Fullscreen = fullscreen; + p.Stencilbuffer = stencilbuffer; + p.Vsync = vsync; + p.EventReceiver = res; + + return createDeviceEx(p); + } + + extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& params) + { + + IrrlichtDevice* dev = 0; + +#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ + if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceWin32(params); +#endif + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + if (params.DeviceType == EIDT_OSX || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceMacOSX(params); +#endif + +#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ + if (params.DeviceType == EIDT_WINCE || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceWinCE(params); +#endif + +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ + if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceLinux(params); +#endif + +#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ + if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceSDL(params); +#endif + +#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ + if (params.DeviceType == EIDT_FRAMEBUFFER || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceFB(params); +#endif + +#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ + if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST)) + dev = new CIrrDeviceConsole(params); +#endif + + if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL) + { + dev->closeDevice(); // destroy window + dev->run(); // consume quit message + dev->drop(); + dev = 0; + } + + return dev; + } + +namespace core +{ + const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY); + irr::core::stringc LOCALE_DECIMAL_POINTS("."); +} + +namespace video +{ + SMaterial IdentityMaterial; +} + +} // end namespace irr + + +#if defined(_IRR_WINDOWS_API_) + +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved ) +{ + // _crtBreakAlloc = 139; + + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + #if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__) && !defined (_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_) + _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF); + #endif + break; + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + +#endif // defined(_IRR_WINDOWS_) + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.dev b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.dev new file mode 100644 index 0000000..704da54 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.dev @@ -0,0 +1,6630 @@ +[Project] +FileName=Irrlicht.dev +Name=Irrlicht +Ver=1 +IsCpp=1 +Type=3 +Compiler=-D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL -DIRRLICHT_EXPORTS_@@_ +CppCompiler=-D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL -DIRRLICHT_EXPORTS_@@_ +Includes=..\..\include;zlib +Linker=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lwinmm -lopengl32_@@_ +Libs= +UnitCount=658 +Folders=doc,include,include/core,include/gui,include/io,include/scene,include/video,Irrlicht,Irrlicht/extern,Irrlicht/extern/jpeglib,Irrlicht/extern/libpng,Irrlicht/extern/zlib,Irrlicht/extern/aesGladman,Irrlicht/gui,Irrlicht/io,Irrlicht/io/archive,Irrlicht/io/attributes,Irrlicht/io/file,Irrlicht/io/xml,Irrlicht/irr,Irrlicht/irr/IrrlichtDevice,Irrlicht/scene,Irrlicht/scene/animators,Irrlicht/scene/collision,Irrlicht/scene/mesh,Irrlicht/scene/mesh/loaders,Irrlicht/scene/mesh/writers,Irrlicht/scene/nodes,Irrlicht/scene/nodes/particles,Irrlicht/video,"Irrlicht/video/Burning Video",Irrlicht/video/DirectX8,Irrlicht/video/DirectX9,Irrlicht/video/Null,Irrlicht/video/Null/Loader,Irrlicht/video/Null/Writer,Irrlicht/video/OpenGL,Irrlicht/video/Software +ObjFiles= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Icon= +ExeOutput=..\..\bin\Win32-gcc +ObjectOutput=obj +OverrideOutput=1 +OverrideOutputName=Irrlicht.dll +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000001001000000100 + +[Unit1] +FileName=..\..\include\EDriverTypes.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\..\include\ITexture.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\..\include\IVideoDriver.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\..\include\S3DVertex.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\..\include\SColor.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=..\..\include\SLight.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\..\include\SMaterial.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\..\include\aabbox3d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\..\include\dimension2d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\..\include\heapsort.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\..\include\irrArray.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\..\include\irrList.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\include\irrMath.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\include\irrString.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\..\include\line2d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\..\include\line3d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\..\include\matrix4.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\..\include\plane3d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\..\include\position2d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\..\include\rect.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\..\include\vector2d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\..\include\vector3d.h +Folder=include/core +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\..\include\IFileList.h +Folder=include/io +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\..\include\IFileSystem.h +Folder=include/io +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\..\include\IReadFile.H +Folder=include/io +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=..\..\include\IAnimatedMesh.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=..\..\include\IAnimatedMeshSceneNode.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit28] +FileName=..\..\include\IBillboardSceneNode.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit29] +FileName=..\..\include\ICameraSceneNode.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit30] +FileName=..\..\include\ILightSceneNode.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit31] +FileName=..\..\include\IMesh.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit32] +FileName=..\..\include\IMeshBuffer.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit33] +FileName=..\..\include\IQ3LevelMesh.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit34] +FileName=..\..\include\ISceneManager.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit35] +FileName=..\..\include\ISceneNode.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit36] +FileName=..\..\include\ISceneNodeAnimator.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit37] +FileName=..\..\include\SMesh.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit38] +FileName=..\..\include\SMeshBuffer.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit39] +FileName=..\..\include\SMeshBufferLightMap.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit40] +FileName=..\..\include\ICursorControl.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit41] +FileName=..\..\include\IGUIButton.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit42] +FileName=..\..\include\IGUICheckbox.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit43] +FileName=..\..\include\IGUIElement.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit44] +FileName=..\..\include\IGUIEnvironment.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit45] +FileName=..\..\include\IGUIFileOpenDialog.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit46] +FileName=..\..\include\IGUIFont.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit47] +FileName=..\..\include\IGUIImage.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit48] +FileName=..\..\include\IGUIListBox.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit49] +FileName=..\..\include\IGUIMeshViewer.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit50] +FileName=..\..\include\IGUIScrollBar.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit51] +FileName=..\..\include\IGUISkin.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit52] +FileName=..\..\include\IGUIWindow.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit53] +FileName=..\..\include\IEventReceiver.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit54] +FileName=..\..\include\Irrlicht.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit55] +FileName=..\..\include\IrrlichtDevice.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit56] +FileName=..\..\include\irrTypes.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit57] +FileName=..\..\include\Keycodes.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit58] +FileName=..\..\include\SIrrCreationParameters.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit59] +FileName=BuiltInFont.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit60] +FileName=CGUIButton.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit61] +FileName=CGUIButton.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit62] +FileName=CGUICheckbox.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit63] +FileName=CGUICheckbox.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit64] +FileName=CGUIComboBox.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit65] +FileName=CGUIComboBox.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit66] +FileName=CGUIContextMenu.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit67] +FileName=CGUIContextMenu.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit68] +FileName=CGUIEditBox.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit69] +FileName=CGUIEditBox.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit70] +FileName=CGUIEnvironment.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit71] +FileName=CGUIEnvironment.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit72] +FileName=CGUIFileOpenDialog.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit73] +FileName=CGUIFileOpenDialog.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit74] +FileName=CGUIFont.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit75] +FileName=CGUIFont.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit76] +FileName=CGUIImage.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit77] +FileName=CGUIImage.H +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit78] +FileName=CGUIInOutFader.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit79] +FileName=CGUIInOutFader.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit80] +FileName=CGUIListBox.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit81] +FileName=CGUIListBox.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit82] +FileName=CGUIMenu.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit83] +FileName=CGUIMenu.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit84] +FileName=CGUIMeshViewer.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit85] +FileName=CGUIMeshViewer.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit86] +FileName=CGUIMessageBox.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit87] +FileName=CGUIMessageBox.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit88] +FileName=CGUIModalScreen.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit89] +FileName=CGUIModalScreen.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit90] +FileName=CGUIScrollBar.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit91] +FileName=CGUIScrollBar.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit92] +FileName=CGUISkin.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit93] +FileName=CGUISkin.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit94] +FileName=CGUIStaticText.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit95] +FileName=CGUIStaticText.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit96] +FileName=CGUITabControl.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit97] +FileName=CGUITabControl.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit98] +FileName=CGUIToolBar.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit99] +FileName=CGUIToolBar.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit100] +FileName=CGUIWindow.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit101] +FileName=CGUIWindow.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit102] +FileName=CSoftwareDriver.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit103] +FileName=CSoftwareDriver.h +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit104] +FileName=CSoftwareTexture.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit105] +FileName=CSoftwareTexture.h +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit106] +FileName=CTRFlat.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit107] +FileName=CTRFlatWire.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit108] +FileName=CTRGouraud.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit109] +FileName=CTRGouraudWire.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit110] +FileName=CTRTextureFlat.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit111] +FileName=CTRTextureFlatWire.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit112] +FileName=CTRTextureGouraud.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit113] +FileName=CTRTextureGouraud.h +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit114] +FileName=CTRTextureGouraudAdd.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit115] +FileName=CTRTextureGouraudNoZ.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit116] +FileName=CTRTextureGouraudWire.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit117] +FileName=CZBuffer.cpp +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit118] +FileName=CZBuffer.h +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit119] +FileName=IZBuffer.h +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit120] +FileName=S2DVertex.h +Folder=Irrlicht/video/Software +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit121] +FileName=COpenGLDriver.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit122] +FileName=COpenGLDriver.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit123] +FileName=COpenGLMaterialRenderer.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit124] +FileName=COpenGLNormalMapRenderer.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit125] +FileName=COpenGLNormalMapRenderer.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit126] +FileName=COpenGLParallaxMapRenderer.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit127] +FileName=COpenGLParallaxMapRenderer.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit128] +FileName=COpenGLShaderMaterialRenderer.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit129] +FileName=COpenGLShaderMaterialRenderer.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit130] +FileName=COpenGLTexture.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit131] +FileName=COpenGLTexture.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit132] +FileName=glext.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit133] +FileName=CD3D8Driver.cpp +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit134] +FileName=CD3D8Driver.h +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit135] +FileName=CD3D8MaterialRenderer.h +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit136] +FileName=CD3D8NormalMapRenderer.cpp +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit137] +FileName=CD3D8NormalMapRenderer.h +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit138] +FileName=CD3D8ParallaxMapRenderer.cpp +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit139] +FileName=CD3D8ParallaxMapRenderer.h +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit140] +FileName=CD3D8ShaderMaterialRenderer.cpp +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit141] +FileName=CD3D8ShaderMaterialRenderer.h +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit142] +FileName=CD3D8Texture.cpp +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit143] +FileName=CD3D8Texture.h +Folder=Irrlicht/video/DirectX8 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit144] +FileName=CColorConverter.cpp +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit145] +FileName=CColorConverter.h +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit146] +FileName=CFPSCounter.cpp +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit147] +FileName=CFPSCounter.h +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit148] +FileName=CImage.cpp +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit149] +FileName=CImage.h +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit150] +FileName=CImageLoaderBMP.cpp +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit151] +FileName=CImageLoaderBMP.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit152] +FileName=CImageLoaderJPG.cpp +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit153] +FileName=CImageLoaderJPG.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit154] +FileName=CImageLoaderPCX.cpp +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit155] +FileName=CImageLoaderPCX.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit156] +FileName=CImageLoaderPNG.cpp +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit157] +FileName=CImageLoaderPNG.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit158] +FileName=CImageLoaderPSD.cpp +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit159] +FileName=CImageLoaderPSD.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit160] +FileName=CImageLoaderTGA.cpp +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit161] +FileName=CImageLoaderTGA.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit162] +FileName=CNullDriver.cpp +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit163] +FileName=CNullDriver.h +Folder=Irrlicht/video/Null +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit164] +FileName=CD3D9Driver.cpp +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit165] +FileName=CD3D9Driver.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit166] +FileName=CD3D9HLSLMaterialRenderer.cpp +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit167] +FileName=CD3D9HLSLMaterialRenderer.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit168] +FileName=CD3D9MaterialRenderer.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit169] +FileName=CD3D9NormalMapRenderer.cpp +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit170] +FileName=CD3D9NormalMapRenderer.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit171] +FileName=CD3D9ParallaxMapRenderer.cpp +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit172] +FileName=CD3D9ParallaxMapRenderer.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit173] +FileName=CD3D9ShaderMaterialRenderer.cpp +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit174] +FileName=CD3D9ShaderMaterialRenderer.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit175] +FileName=CD3D9Texture.cpp +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit176] +FileName=CD3D9Texture.h +Folder=Irrlicht/video/DirectX9 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit177] +FileName=CVideoModeList.cpp +Folder=Irrlicht/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit178] +FileName=CVideoModeList.h +Folder=Irrlicht/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit179] +FileName=C3DSMeshFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit180] +FileName=C3DSMeshFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit181] +FileName=CAnimatedMeshMD2.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit182] +FileName=CAnimatedMeshMD2.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit183] +FileName=CAnimatedMeshSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit184] +FileName=CAnimatedMeshSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit185] +FileName=CBillboardSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit186] +FileName=CBillboardSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit187] +FileName=CCameraSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit188] +FileName=CCameraSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit189] +FileName=CColladaFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit190] +FileName=CColladaFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit191] +FileName=CCSMLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit192] +FileName=CCSMLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit193] +FileName=CDMFLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit194] +FileName=CDMFLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit195] +FileName=CDummyTransformationSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit196] +FileName=CDummyTransformationSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit197] +FileName=CEmptySceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit198] +FileName=CEmptySceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit199] +FileName=CGeometryCreator.cpp +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit200] +FileName=CGeometryCreator.h +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit201] +FileName=CLightSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit202] +FileName=CLightSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit203] +FileName=CLMTSMeshFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit204] +FileName=CLMTSMeshFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit205] +FileName=CMeshManipulator.cpp +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit206] +FileName=CMeshManipulator.h +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit207] +FileName=CMeshSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit208] +FileName=CMeshSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit209] +FileName=CMetaTriangleSelector.cpp +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit210] +FileName=CMetaTriangleSelector.h +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit211] +FileName=CMY3DHelper.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit212] +FileName=CMY3DMeshFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit213] +FileName=CMY3DMeshFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit214] +FileName=..\..\include\EGUIAlignment.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit215] +FileName=COCTLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit216] +FileName=COCTLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit217] +FileName=COctreeSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit218] +FileName=COctreeSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit219] +FileName=COctreeTriangleSelector.cpp +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit220] +FileName=COctreeTriangleSelector.h +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit221] +FileName=CParticleBoxEmitter.cpp +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit222] +FileName=CParticleBoxEmitter.h +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit223] +FileName=CParticleFadeOutAffector.cpp +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit224] +FileName=CParticleFadeOutAffector.h +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit225] +FileName=CParticleGravityAffector.cpp +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit226] +FileName=CParticleGravityAffector.h +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit227] +FileName=CParticlePointEmitter.cpp +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit228] +FileName=CParticlePointEmitter.h +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit229] +FileName=CParticleSystemSceneNode.cpp +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit230] +FileName=CParticleSystemSceneNode.h +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit231] +FileName=CQ3LevelMesh.cpp +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit232] +FileName=CQ3LevelMesh.h +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit233] +FileName=CSceneCollisionManager.cpp +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit234] +FileName=CSceneCollisionManager.h +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit235] +FileName=CSceneManager.cpp +Folder=Irrlicht/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit236] +FileName=CSceneManager.h +Folder=Irrlicht/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit237] +FileName=CSceneNodeAnimatorCollisionResponse.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit238] +FileName=CSceneNodeAnimatorCollisionResponse.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit239] +FileName=CSceneNodeAnimatorDelete.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit240] +FileName=CSceneNodeAnimatorDelete.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit241] +FileName=CSceneNodeAnimatorFlyCircle.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit242] +FileName=CSceneNodeAnimatorFlyCircle.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit243] +FileName=CSceneNodeAnimatorFlyStraight.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit244] +FileName=CSceneNodeAnimatorFlyStraight.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit245] +FileName=CSceneNodeAnimatorFollowSpline.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit246] +FileName=CSceneNodeAnimatorFollowSpline.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit247] +FileName=CSceneNodeAnimatorRotation.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit248] +FileName=CSceneNodeAnimatorRotation.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit249] +FileName=CSceneNodeAnimatorTexture.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit250] +FileName=CSceneNodeAnimatorTexture.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit251] +FileName=CShadowVolumeSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit252] +FileName=CShadowVolumeSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit253] +FileName=CSkyBoxSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit254] +FileName=CSkyBoxSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit255] +FileName=COBJMeshFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit256] +FileName=COBJMeshFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit257] +FileName=CTerrainSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit258] +FileName=CTerrainSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit259] +FileName=CTerrainTriangleSelector.cpp +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit260] +FileName=CTerrainTriangleSelector.h +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit261] +FileName=CTextSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit262] +FileName=CTextSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit263] +FileName=CTriangleBBSelector.cpp +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit264] +FileName=CTriangleBBSelector.h +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit265] +FileName=CTriangleSelector.cpp +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit266] +FileName=CTriangleSelector.h +Folder=Irrlicht/scene/collision +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit267] +FileName=CWaterSurfaceSceneNode.cpp +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit268] +FileName=CWaterSurfaceSceneNode.h +Folder=Irrlicht/scene/nodes +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit269] +FileName=..\..\include\SExposedVideoData.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit270] +FileName=..\..\include\SKeyMap.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit271] +FileName=..\..\include\SMeshBufferTangents.h +Folder=include/video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit272] +FileName=..\..\include\SParticle.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit273] +FileName=CXMeshFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit274] +FileName=CXMeshFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit275] +FileName=Octree.h +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit276] +FileName=CFileList.cpp +Folder=Irrlicht/io +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit277] +FileName=CFileList.h +Folder=Irrlicht/io +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit278] +FileName=CFileSystem.cpp +CompileCpp=1 +Folder=Irrlicht/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit279] +FileName=CFileSystem.h +CompileCpp=1 +Folder=Irrlicht/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit280] +FileName=CLimitReadFile.cpp +CompileCpp=1 +Folder=Irrlicht/io/file +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit281] +FileName=CLimitReadFile.h +CompileCpp=1 +Folder=Irrlicht/io/file +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit282] +FileName=CMemoryFile.cpp +Folder=Irrlicht/io/file +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit283] +FileName=CMemoryFile.h +Folder=Irrlicht/io/file +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit284] +FileName=CReadFile.cpp +Folder=Irrlicht/io/file +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit285] +FileName=CReadFile.h +Folder=Irrlicht/io/file +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit286] +FileName=CWriteFile.cpp +Folder=Irrlicht/io/file +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit287] +FileName=CWriteFile.h +Folder=Irrlicht/io/file +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit288] +FileName=CXMLReader.cpp +Folder=Irrlicht/io/xml +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit289] +FileName=CXMLReader.h +Folder=Irrlicht/io/xml +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit290] +FileName=CXMLWriter.cpp +Folder=Irrlicht/io/xml +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit291] +FileName=CXMLWriter.h +Folder=Irrlicht/io/xml +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit292] +FileName=CZipReader.cpp +Folder=Irrlicht/io/archive +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit293] +FileName=CZipReader.h +Folder=Irrlicht/io/archive +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit294] +FileName=irrXML.cpp +Folder=Irrlicht/io/xml +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit295] +FileName=zlib\adler32.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit296] +FileName=zlib\compress.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit297] +FileName=zlib\crc32.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit298] +FileName=zlib\crc32.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit299] +FileName=zlib\deflate.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit300] +FileName=zlib\deflate.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit301] +FileName=zlib\inffast.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit302] +FileName=zlib\inffast.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit303] +FileName=zlib\inflate.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit304] +FileName=zlib\inftrees.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit305] +FileName=zlib\inftrees.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit306] +FileName=zlib\trees.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit307] +FileName=zlib\trees.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit308] +FileName=zlib\uncompr.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit309] +FileName=zlib\zconf.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit310] +FileName=zlib\zlib.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit311] +FileName=zlib\zutil.c +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit312] +FileName=zlib\zutil.h +Folder=Irrlicht/extern/zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit313] +FileName=jpeglib\cderror.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit314] +FileName=CSceneNodeAnimatorCameraFPS.h +CompileCpp=1 +Folder=Irrlicht/scene/animators +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit315] +FileName=CSceneNodeAnimatorCameraMaya.cpp +CompileCpp=1 +Folder=Irrlicht/scene/animators +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit316] +FileName=jpeglib\jcapimin.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit317] +FileName=jpeglib\jcapistd.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit318] +FileName=jpeglib\jccoefct.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit319] +FileName=jpeglib\jccolor.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit320] +FileName=jpeglib\jcdctmgr.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit321] +FileName=jpeglib\jchuff.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit322] +FileName=jpeglib\jchuff.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit323] +FileName=jpeglib\jcinit.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit324] +FileName=jpeglib\jcmainct.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit325] +FileName=jpeglib\jcmarker.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit326] +FileName=jpeglib\jcmaster.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit327] +FileName=jpeglib\jcomapi.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit328] +FileName=jpeglib\jconfig.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit329] +FileName=jpeglib\jcparam.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit330] +FileName=jpeglib\jcarith.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit331] +FileName=jpeglib\jcprepct.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit332] +FileName=jpeglib\jcsample.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit333] +FileName=jpeglib\jctrans.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit334] +FileName=jpeglib\jdapimin.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit335] +FileName=jpeglib\jdapistd.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit336] +FileName=jpeglib\jdatadst.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit337] +FileName=jpeglib\jdatasrc.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit338] +FileName=jpeglib\jdcoefct.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit339] +FileName=jpeglib\jdcolor.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit340] +FileName=jpeglib\jdct.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit341] +FileName=jpeglib\jddctmgr.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit342] +FileName=jpeglib\jdhuff.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit343] +FileName=jpeglib\jdhuff.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit344] +FileName=jpeglib\jdinput.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit345] +FileName=jpeglib\jdmainct.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit346] +FileName=jpeglib\jdmarker.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit347] +FileName=jpeglib\jdmaster.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit348] +FileName=jpeglib\jdmerge.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit349] +FileName=jpeglib\jdarith.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit350] +FileName=jpeglib\jdpostct.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit351] +FileName=jpeglib\jdsample.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit352] +FileName=jpeglib\jdtrans.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit353] +FileName=jpeglib\jerror.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit354] +FileName=jpeglib\jerror.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit355] +FileName=jpeglib\jfdctflt.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit356] +FileName=jpeglib\jfdctfst.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit357] +FileName=jpeglib\jfdctint.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit358] +FileName=jpeglib\jidctflt.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit359] +FileName=jpeglib\jidctfst.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit360] +FileName=jpeglib\jidctint.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit361] +FileName=jpeglib\jaricom.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit362] +FileName=jpeglib\jinclude.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit363] +FileName=jpeglib\jmemmgr.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit364] +FileName=jpeglib\jmemnobs.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit365] +FileName=jpeglib\jmemsys.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit366] +FileName=jpeglib\jmorecfg.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit367] +FileName=jpeglib\jpegint.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit368] +FileName=jpeglib\jpeglib.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit369] +FileName=jpeglib\jquant1.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit370] +FileName=jpeglib\jquant2.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit371] +FileName=jpeglib\jutils.c +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit372] +FileName=jpeglib\jversion.h +Folder=Irrlicht/extern/jpeglib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit373] +FileName=CMD3MeshFileLoader.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit374] +FileName=CMD3MeshFileLoader.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit375] +FileName=CAnimatedMeshMD3.h +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit376] +FileName=CAnimatedMeshMD3.cpp +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit377] +FileName=CGUISpriteBank.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit378] +FileName=CGUISpriteBank.cpp +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit379] +FileName=..\..\include\IGUIFontBitmap.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit380] +FileName=..\..\include\IGUISpriteBank.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit381] +FileName=COpenGLExtensionHandler.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit382] +FileName=CGUISpinBox.h +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit383] +FileName=CGUISpinBox.cpp +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit384] +FileName=..\..\include\IGUISpinBox.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit385] +FileName=..\..\include\SViewFrustum.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit386] +FileName=..\..\include\triangle3d.h +CompileCpp=1 +Folder=include/core +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit387] +FileName=libpng\png.c +CompileCpp=0 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit388] +FileName=libpng\png.h +CompileCpp=1 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit389] +FileName=libpng\pngconf.h +CompileCpp=1 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit390] +FileName=libpng\pngerror.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit391] +FileName=libpng\pngget.c +CompileCpp=0 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit392] +FileName=libpng\pngmem.c +CompileCpp=0 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit393] +FileName=libpng\pngpread.c +CompileCpp=0 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit394] +FileName=libpng\pngread.c +CompileCpp=0 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit395] +FileName=libpng\pngrio.c +CompileCpp=0 +Folder=Irrlicht/extern/libpng +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit396] +FileName=libpng\pngrtran.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit397] +FileName=libpng\pngrutil.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit398] +FileName=libpng\pngset.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit399] +FileName=libpng\pngtrans.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit400] +FileName=libpng\pngwio.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit401] +FileName=libpng\pngwrite.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit402] +FileName=libpng\pngwtran.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit403] +FileName=libpng\pngwutil.c +Folder=Irrlicht/extern/libpng +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit404] +FileName=CIrrDeviceLinux.cpp +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit405] +FileName=CIrrDeviceLinux.h +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit406] +FileName=CIrrDeviceStub.cpp +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit407] +FileName=CIrrDeviceStub.h +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit408] +FileName=CIrrDeviceWin32.cpp +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit409] +FileName=CIrrDeviceWin32.h +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit410] +FileName=CLogger.cpp +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit411] +FileName=CLogger.h +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit412] +FileName=COSOperator.cpp +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit413] +FileName=COSOperator.h +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit414] +FileName=CTimer.h +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit415] +FileName=IImagePresenter.h +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit416] +FileName=Irrlicht.cpp +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit417] +FileName=os.cpp +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit418] +FileName=os.h +Folder=Irrlicht/irr +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit419] +FileName=..\..\include\IrrCompileConfig.h +Folder=include +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit420] +FileName=CMeshCache.h +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit421] +FileName=CMeshCache.cpp +Folder=Irrlicht/scene/mesh +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit422] +FileName=COpenGLSLMaterialRenderer.h +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit423] +FileName=COpenGLSLMaterialRenderer.cpp +Folder=Irrlicht/video/OpenGL +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit424] +FileName=CSoftwareTexture2.h +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit425] +FileName=S4DVertex.h +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit426] +FileName=SoftwareDriver2_compile_config.h +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit427] +FileName=CSoftwareDriver2.h +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit428] +FileName=CTRTextureGouraudNoZ2.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit429] +FileName=CTRTextureLightMap2_M2.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit430] +FileName=CTRTextureLightMap2_M4.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit431] +FileName=CTRTextureLightMap2_M1.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit432] +FileName=SoftwareDriver2_helper.h +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit433] +FileName=CSoftwareDriver2.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit434] +FileName=CSoftwareTexture2.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit435] +FileName=CTRTextureGouraud2.cpp +Folder=Irrlicht/video/Burning Video +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=0.1 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename=Irrlicht.dll +ProductName=Irrlicht +ProductVersion=0.1 +AutoIncBuildNr=0 + +[Unit436] +FileName=COgreMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit437] +FileName=COgreMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit438] +FileName=CDefaultSceneNodeFactory.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit439] +FileName=CDefaultSceneNodeAnimatorFactory.cpp +CompileCpp=1 +Folder=Irrlicht/scene/animators +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit440] +FileName=CDefaultSceneNodeAnimatorFactory.h +CompileCpp=1 +Folder=Irrlicht/scene/animators +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit441] +FileName=CDefaultSceneNodeFactory.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit442] +FileName=CAttributes.h +CompileCpp=1 +Folder=Irrlicht/io/attributes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit443] +FileName=CAttributeImpl.h +CompileCpp=1 +Folder=Irrlicht/io/attributes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit444] +FileName=CAttributes.cpp +CompileCpp=1 +Folder=Irrlicht/io/attributes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit445] +FileName=CCubeSceneNode.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit446] +FileName=CCubeSceneNode.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit447] +FileName=CTRTextureGouraudAddNoZ2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit448] +FileName=CTRTextureGouraudAdd2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit449] +FileName=CTRGouraud2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit450] +FileName=CTRGouraudAlpha2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit451] +FileName=CTRGouraudAlphaNoZ2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit452] +FileName=CTRTextureDetailMap2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit453] +FileName=CTRTextureLightMap2_Add.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit454] +FileName=CTRTextureWire2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit455] +FileName=CTRTextureGouraudVertexAlpha2.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit456] +FileName=..\..\changes.txt +CompileCpp=1 +Folder=doc +Compile=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit457] +FileName=..\..\readme.txt +CompileCpp=1 +Folder=doc +Compile=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit458] +FileName=CSphereSceneNode.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit459] +FileName=CSphereSceneNode.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit460] +FileName=CPakReader.h +CompileCpp=1 +Folder=Irrlicht/io/archive +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit461] +FileName=CPakReader.cpp +CompileCpp=1 +Folder=Irrlicht/io/archive +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit462] +FileName=CSkyDomeSceneNode.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit463] +FileName=CSkyDomeSceneNode.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit464] +FileName=CImageWriterTGA.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit465] +FileName=CImageWriterBMP.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit466] +FileName=CImageWriterBMP.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit467] +FileName=CImageWriterJPG.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit468] +FileName=CImageWriterJPG.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit469] +FileName=CImageWriterPCX.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit470] +FileName=CImageWriterPCX.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit471] +FileName=CImageWriterPNG.cpp +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +CompileCpp=1 + +[Unit472] +FileName=CImageWriterPNG.h +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +CompileCpp=1 + +[Unit473] +FileName=CImageWriterPPM.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit474] +FileName=CImageWriterPPM.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit475] +FileName=CImageWriterPSD.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit476] +FileName=CImageWriterPSD.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit477] +FileName=CImageWriterTGA.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Writer +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit478] +FileName=CTRTextureLightMapGouraud2_M4.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit479] +FileName=CGUIColorSelectDialog.cpp +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit480] +FileName=IBurningShader.h +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit481] +FileName=IBurningShader.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit482] +FileName=IDepthBuffer.h +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit483] +FileName=CDepthBuffer.h +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit484] +FileName=CDepthBuffer.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit485] +FileName=CQuake3ShaderSceneNode.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit486] +FileName=CQuake3ShaderSceneNode.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit487] +FileName=..\..\include\fast_atof.h +CompileCpp=1 +Folder=include +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit488] +FileName=CTRTextureBlend.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit489] +FileName=CTRTextureGouraudAlpha.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit490] +FileName=CTRTextureGouraudAlphaNoZ.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit491] +FileName=CDefaultGUIElementFactory.cpp +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit492] +FileName=CDefaultGUIElementFactory.h +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit493] +FileName=CGUIColorSelectDialog.h +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit494] +FileName=CSoftware2MaterialRenderer.h +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit495] +FileName=CXMLReaderImpl.h +CompileCpp=1 +Folder=Irrlicht/io/xml +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit496] +FileName=ITriangleRenderer.h +CompileCpp=1 +Folder=Irrlicht/video/Software +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit497] +FileName=..\..\include\EGUIElementTypes.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit498] +FileName=..\..\include\ESceneNodeAnimatorTypes.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit499] +FileName=..\..\include\ESceneNodeTypes.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit500] +FileName=..\..\include\ETerrainElements.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit501] +FileName=..\..\include\IAnimatedMeshMD2.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit502] +FileName=..\..\include\IAttributeExchangingObject.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit503] +FileName=..\..\include\IAttributes.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit504] +FileName=..\..\include\IDummyTransformationSceneNode.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit505] +FileName=..\..\include\IGPUProgrammingServices.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit506] +FileName=..\..\include\IGUIColorSelectDialog.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit507] +FileName=..\..\include\IGUIComboBox.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit508] +FileName=..\..\include\IGUIContextMenu.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit509] +FileName=..\..\include\IGUIEditBox.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit510] +FileName=..\..\include\IGUIElementFactory.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit511] +FileName=..\..\include\IGUIInOutFader.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit512] +FileName=..\..\include\IGUIStaticText.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit513] +FileName=..\..\include\IGUITabControl.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit514] +FileName=..\..\include\IGUIToolbar.h +CompileCpp=1 +Folder=include/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit515] +FileName=..\..\include\IImage.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit516] +FileName=..\..\include\IImageLoader.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit517] +FileName=..\..\include\IImageWriter.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit518] +FileName=..\..\include\ILogger.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit519] +FileName=..\..\include\IMaterialRenderer.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit520] +FileName=..\..\include\IMaterialRendererServices.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit521] +FileName=..\..\include\IMeshCache.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit522] +FileName=..\..\include\IMeshLoader.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit523] +FileName=..\..\include\IMeshManipulator.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit524] +FileName=..\..\include\IMeshSceneNode.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit525] +FileName=..\..\include\IMetaTriangleSelector.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit526] +FileName=..\..\include\IOSOperator.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit527] +FileName=..\..\include\IParticleAffector.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit528] +FileName=..\..\include\IParticleEmitter.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit529] +FileName=..\..\include\IParticleSystemSceneNode.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit530] +FileName=..\..\include\IQ3Shader.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit531] +FileName=..\..\include\irrAllocator.h +CompileCpp=1 +Folder=include/core +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit532] +FileName=..\..\include\irrMap.h +CompileCpp=1 +Folder=include/core +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit533] +FileName=..\..\include\irrXML.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit534] +FileName=..\..\include\ISceneCollisionManager.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit535] +FileName=..\..\include\ISceneNodeAnimatorCollisionResponse.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit536] +FileName=..\..\include\ISceneNodeAnimatorFactory.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit537] +FileName=..\..\include\ISceneNodeFactory.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit538] +FileName=..\..\include\ISceneUserDataSerializer.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit539] +FileName=..\..\include\IShaderConstantSetCallBack.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit540] +FileName=..\..\include\IShadowVolumeSceneNode.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit541] +FileName=..\..\include\ITerrainSceneNode.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit542] +FileName=..\..\include\ITextSceneNode.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit543] +FileName=..\..\include\ITimer.h +CompileCpp=1 +Folder=include +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit544] +FileName=..\..\include\ITriangleSelector.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit545] +FileName=..\..\include\IVideoModeList.h +CompileCpp=1 +Folder=include/video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit546] +FileName=..\..\include\IWriteFile.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit547] +FileName=..\..\include\IXMLReader.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit548] +FileName=..\..\include\IXMLWriter.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit549] +FileName=..\..\include\quaternion.h +CompileCpp=1 +Folder=include/core +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit550] +FileName=..\..\include\SAnimatedMesh.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit551] +FileName=..\..\include\SceneParameters.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit552] +FileName=..\..\include\IReferenceCounted.h +CompileCpp=1 +Folder=include +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit553] +FileName=CParticleAnimatedMeshSceneNodeEmitter.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit554] +FileName=CParticleAnimatedMeshSceneNodeEmitter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit555] +FileName=CParticleSphereEmitter.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit556] +FileName=CParticleAttractionAffector.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit557] +FileName=CParticleAttractionAffector.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit558] +FileName=CParticleCylinderEmitter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit559] +FileName=CParticleCylinderEmitter.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit560] +FileName=CParticleMeshEmitter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit561] +FileName=CParticleMeshEmitter.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit562] +FileName=CParticleRingEmitter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit563] +FileName=CParticleRingEmitter.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit564] +FileName=CParticleRotationAffector.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit565] +FileName=CParticleRotationAffector.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit566] +FileName=CParticleSphereEmitter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes/particles +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit567] +FileName=CIrrMeshWriter.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit568] +FileName=CIrrMeshWriter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit569] +FileName=CColladaMeshWriter.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit570] +FileName=CColladaMeshWriter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit571] +FileName=CIrrMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit572] +FileName=CIrrMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit573] +FileName=CBSPMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit574] +FileName=CBSPMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit575] +FileName=CMD2MeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit576] +FileName=CMD2MeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit577] +FileName=CMS3DMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit578] +FileName=CMS3DMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit579] +FileName=CB3DMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit580] +FileName=CB3DMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit581] +FileName=CSkinnedMesh.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit582] +FileName=CSkinnedMesh.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit583] +FileName=CBoneSceneNode.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit584] +FileName=CBoneSceneNode.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit585] +FileName=CSTLMeshWriter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit586] +FileName=CSTLMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit587] +FileName=CImageLoaderPPM.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Loader +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit588] +FileName=CImageLoaderPPM.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Loader +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit589] +FileName=CBurningShader_Raster_Reference.cpp +CompileCpp=1 +Folder=Irrlicht/video/Burning Video +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit590] +FileName=CImageLoaderWAL.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Loader +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit591] +FileName=CImageLoaderWAL.h +Folder=Irrlicht/video/Null/Loader +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit592] +FileName=CGUITable.h +Folder=Irrlicht/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit593] +FileName=CGUITable.cpp +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit594] +FileName=..\..\include\IGUITable.h +Folder=include/gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit595] +FileName=CVolumeLightSceneNode.h +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit596] +FileName=CVolumeLightSceneNode.cpp +CompileCpp=1 +Folder=Irrlicht/scene/nodes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit597] +FileName=..\..\include\IVolumeLightSceneNode.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit598] +FileName=CLWOMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit599] +FileName=CLWOMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit600] +FileName=..\..\include\ISceneNodeAnimatorCameraMaya.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit601] +FileName=..\..\include\ISceneNodeAnimatorCameraFPS.h +CompileCpp=1 +Folder=include/scene +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit602] +FileName=CSceneNodeAnimatorCameraMaya.h +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit603] +FileName=CSceneNodeAnimatorCameraFPS.cpp +Folder=Irrlicht/scene/animators +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit604] +FileName=COBJMeshWriter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit605] +FileName=..\..\include\SSkinMeshBuffer.h +Folder=include/scene +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit606] +FileName=CParticleScaleAffector.cpp +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit607] +FileName=CParticleScaleAffector.h +Folder=Irrlicht/scene/nodes/particles +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit608] +FileName=CGUIImageList.cpp +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit609] +FileName=CGUIImageList.h +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit610] +FileName=CGUITreeView.cpp +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit611] +FileName=CGUITreeView.h +CompileCpp=1 +Folder=Irrlicht/gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit612] +FileName=CIrrDeviceConsole.cpp +CompileCpp=1 +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit613] +FileName=CIrrDeviceConsole.h +CompileCpp=1 +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit614] +FileName=CPLYMeshWriter.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit615] +FileName=CPLYMeshWriter.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/writers +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit616] +FileName=CPLYMeshFileLoader.cpp +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit617] +FileName=CPLYMeshFileLoader.h +CompileCpp=1 +Folder=Irrlicht/scene/mesh/loaders +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit618] +FileName=CIrrDeviceSDL.cpp +CompileCpp=1 +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit619] +FileName=CIrrDeviceSDL.h +CompileCpp=1 +Folder=Irrlicht/irr/IrrlichtDevice +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit620] +FileName=CImageLoaderRGB.cpp +CompileCpp=1 +Folder=Irrlicht/video/Null/Loader +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit621] +FileName=CImageLoaderRGB.h +CompileCpp=1 +Folder=Irrlicht/video/Null/Loader +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit622] +FileName=CTarReader.cpp +Folder=Irrlicht/io/archive +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit623] +FileName=CTarReader.h +Folder=Irrlicht/io/archive +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + + +[Unit624] +FileName=CMountPointReader.cpp +Folder=Irrlicht/io/archive +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit625] +FileName=CMountPointReader.h +Folder=Irrlicht/io/archive +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit626] +FileName=CNPKReader.h +CompileCpp=1 +Folder=Irrlicht/io/archive +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit627] +FileName=CNPKReader.cpp +CompileCpp=1 +Folder=Irrlicht/io/archive +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit628] +FileName=..\..\include\EAttributes.h +CompileCpp=1 +Folder=include/io +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit629] +FileName=IAttribute.h +CompileCpp=1 +Folder=Irrlicht/io/attributes +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit630] +FileName=aesGladman\aes.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit631] +FileName=aesGladman\aescrypt.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit632] +FileName=aesGladman\aeskey.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit633] +FileName=aesGladman\aesopt.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit634] +FileName=aesGladman\aestab.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit635] +FileName=aesGladman\sha2.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit636] +FileName=aesGladman\fileenc.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit637] +FileName=aesGladman\fileenc.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit638] +FileName=aesGladman\hmac.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit639] +FileName=aesGladman\hmac.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit640] +FileName=aesGladman\prng.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit641] +FileName=aesGladman\prng.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit642] +FileName=aesGladman\pwd2key.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit643] +FileName=aesGladman\pwd2key.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit644] +FileName=aesGladman\sha1.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit645] +FileName=aesGladman\sha1.h +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit646] +FileName=aesGladman\sha2.cpp +Folder=Irrlicht/extern/aesGladman +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit647] +FileName=bzip2\blocksort.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit648] +FileName=bzip2\bzcompress.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit649] +FileName=bzip2\bzlib.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit650] +FileName=bzip2\bzlib.h +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit651] +FileName=bzip2\bzlib_private.h +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit652] +FileName=bzip2\crctable.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit653] +FileName=bzip2\decompress.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit654] +FileName=bzip2\huffman.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit655] +FileName=bzip2\randtable.c +Folder=Irrlicht/extern/bzip2 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit656] +FileName=lzma\LzmaDec.c +Folder=Irrlicht/extern +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit657] +FileName=lzma\LzmaDec.h +Folder=Irrlicht/extern +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit658] +FileName=lzma\Types.h +Folder=Irrlicht/extern +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.rc b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.rc new file mode 100644 index 0000000..57f8f37 Binary files /dev/null and b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht.rc differ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.sln b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.sln new file mode 100644 index 0000000..f3dcbb4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release - Fast FPU|Win32 = Release - Fast FPU|Win32 + Release - Fast FPU|x64 = Release - Fast FPU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Static lib - Debug|Win32 = Static lib - Debug|Win32 + Static lib - Debug|x64 = Static lib - Debug|x64 + Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 + Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64 + Static lib - Release|Win32 = Static lib - Release|Win32 + Static lib - Release|x64 = Static lib - Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj new file mode 100644 index 0000000..4a10236 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj @@ -0,0 +1,1555 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release - Fast FPU|Win32"> + <Configuration>Release - Fast FPU</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release - Fast FPU|x64"> + <Configuration>Release - Fast FPU</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="SDL-Debug|Win32"> + <Configuration>SDL-Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="SDL-Debug|x64"> + <Configuration>SDL-Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Debug|Win32"> + <Configuration>Static lib - Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Debug|x64"> + <Configuration>Static lib - Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release - Fast FPU|Win32"> + <Configuration>Static lib - Release - Fast FPU</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release - Fast FPU|x64"> + <Configuration>Static lib - Release - Fast FPU</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release|Win32"> + <Configuration>Static lib - Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release|x64"> + <Configuration>Static lib - Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>Irrlicht</ProjectName> + <ProjectGuid>{E08E042A-6C45-411B-92BE-3CC31331019F}</ProjectGuid> + <RootNamespace>Irrlicht</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">..\..\lib\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">..\..\lib\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">obj\$(Configuration)64\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">..\..\lib\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">..\..\lib\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">obj\$(Configuration)64\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">..\..\lib\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">..\..\lib\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">obj\$(Configuration)64\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">true</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" /> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)include;$(CG_INC_PATH);$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)Lib\x86;$(CG_LIB_PATH);$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling>false</ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <StructMemberAlignment>Default</StructMemberAlignment> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>false</FunctionLevelLinking> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <OptimizeReferences>true</OptimizeReferences> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <SubSystem>Windows</SubSystem> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling>false</ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <StructMemberAlignment>Default</StructMemberAlignment> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>false</FunctionLevelLinking> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <OptimizeReferences>true</OptimizeReferences> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + <SubSystem>Windows</SubSystem> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win32-visualstudio\Irrlicht.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win64-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX64</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>false</IntrinsicFunctions> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win32-visualstudio\Irrlicht.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>false</IntrinsicFunctions> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win64-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX64</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CallingConvention>FastCall</CallingConvention> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win32-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX86</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CallingConvention>FastCall</CallingConvention> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win64-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX64</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClInclude Include="..\..\include\EDriverFeatures.h" /> + <ClInclude Include="..\..\include\EMaterialFlags.h" /> + <ClInclude Include="..\..\include\IAnimatedMeshMD3.h" /> + <ClInclude Include="..\..\include\IEventReceiver.h" /> + <ClInclude Include="..\..\include\ILogger.h" /> + <ClInclude Include="..\..\include\IOSOperator.h" /> + <ClInclude Include="..\..\include\IRandomizer.h" /> + <ClInclude Include="..\..\include\IReferenceCounted.h" /> + <ClInclude Include="..\..\include\IrrCompileConfig.h" /> + <ClInclude Include="..\..\include\irrlicht.h" /> + <ClInclude Include="..\..\include\IrrlichtDevice.h" /> + <ClInclude Include="..\..\include\irrTypes.h" /> + <ClInclude Include="..\..\include\ITimer.h" /> + <ClInclude Include="..\..\include\Keycodes.h" /> + <ClInclude Include="..\..\include\SIrrCreationParameters.h" /> + <ClInclude Include="..\..\include\SKeyMap.h" /> + <ClInclude Include="..\..\include\EDriverTypes.h" /> + <ClInclude Include="..\..\include\IGeometryCreator.h" /> + <ClInclude Include="..\..\include\IGPUProgrammingServices.h" /> + <ClInclude Include="..\..\include\IImage.h" /> + <ClInclude Include="..\..\include\IImageLoader.h" /> + <ClInclude Include="..\..\include\IMaterialRenderer.h" /> + <ClInclude Include="..\..\include\IMaterialRendererServices.h" /> + <ClInclude Include="..\..\include\IShaderConstantSetCallBack.h" /> + <ClInclude Include="..\..\include\ITexture.h" /> + <ClInclude Include="..\..\include\IVideoDriver.h" /> + <ClInclude Include="..\..\include\IVideoModeList.h" /> + <ClInclude Include="..\..\include\S3DVertex.h" /> + <ClInclude Include="..\..\include\SColor.h" /> + <ClInclude Include="..\..\include\SExposedVideoData.h" /> + <ClInclude Include="..\..\include\SLight.h" /> + <ClInclude Include="..\..\include\SMaterial.h" /> + <ClInclude Include="..\..\include\SMaterialLayer.h" /> + <ClInclude Include="..\..\include\aabbox3d.h" /> + <ClInclude Include="..\..\include\coreutil.h" /> + <ClInclude Include="..\..\include\dimension2d.h" /> + <ClInclude Include="..\..\include\heapsort.h" /> + <ClInclude Include="..\..\include\irrAllocator.h" /> + <ClInclude Include="..\..\include\irrArray.h" /> + <ClInclude Include="..\..\include\irrList.h" /> + <ClInclude Include="..\..\include\irrMap.h" /> + <ClInclude Include="..\..\include\irrMath.h" /> + <ClInclude Include="..\..\include\irrString.h" /> + <ClInclude Include="..\..\include\line2d.h" /> + <ClInclude Include="..\..\include\line3d.h" /> + <ClInclude Include="..\..\include\matrix4.h" /> + <ClInclude Include="..\..\include\plane3d.h" /> + <ClInclude Include="..\..\include\position2d.h" /> + <ClInclude Include="..\..\include\quaternion.h" /> + <ClInclude Include="..\..\include\rect.h" /> + <ClInclude Include="..\..\include\triangle3d.h" /> + <ClInclude Include="..\..\include\vector2d.h" /> + <ClInclude Include="..\..\include\vector3d.h" /> + <ClInclude Include="..\..\include\EAttributes.h" /> + <ClInclude Include="..\..\include\IAttributeExchangingObject.h" /> + <ClInclude Include="..\..\include\IAttributes.h" /> + <ClInclude Include="..\..\include\IFileList.h" /> + <ClInclude Include="..\..\include\IFileSystem.h" /> + <ClInclude Include="..\..\include\IReadFile.h" /> + <ClInclude Include="..\..\include\irrXML.h" /> + <ClInclude Include="..\..\include\IWriteFile.h" /> + <ClInclude Include="..\..\include\IXMLReader.h" /> + <ClInclude Include="..\..\include\IXMLWriter.h" /> + <ClInclude Include="..\..\include\path.h" /> + <ClInclude Include="..\..\include\CDynamicMeshBuffer.h" /> + <ClInclude Include="..\..\include\CIndexBuffer.h" /> + <ClInclude Include="..\..\include\CMeshBuffer.h" /> + <ClInclude Include="..\..\include\CVertexBuffer.h" /> + <ClInclude Include="..\..\include\ECullingTypes.h" /> + <ClInclude Include="..\..\include\EDebugSceneTypes.h" /> + <ClInclude Include="..\..\include\EMeshWriterEnums.h" /> + <ClInclude Include="..\..\include\EPrimitiveTypes.h" /> + <ClInclude Include="..\..\include\ESceneNodeAnimatorTypes.h" /> + <ClInclude Include="..\..\include\ESceneNodeTypes.h" /> + <ClInclude Include="..\..\include\IAnimatedMesh.h" /> + <ClInclude Include="..\..\include\IAnimatedMeshMD2.h" /> + <ClInclude Include="..\..\include\IAnimatedMeshSceneNode.h" /> + <ClInclude Include="..\..\include\IBillboardSceneNode.h" /> + <ClInclude Include="..\..\include\ICameraSceneNode.h" /> + <ClInclude Include="..\..\include\IDummyTransformationSceneNode.h" /> + <ClInclude Include="..\..\include\ILightSceneNode.h" /> + <ClInclude Include="..\..\include\IMesh.h" /> + <ClInclude Include="..\..\include\IMeshBuffer.h" /> + <ClInclude Include="..\..\include\IMeshCache.h" /> + <ClInclude Include="..\..\include\IMeshLoader.h" /> + <ClInclude Include="..\..\include\IMeshManipulator.h" /> + <ClInclude Include="..\..\include\IMeshSceneNode.h" /> + <ClInclude Include="..\..\include\IMeshWriter.h" /> + <ClInclude Include="..\..\include\IMetaTriangleSelector.h" /> + <ClInclude Include="..\..\include\IParticleAffector.h" /> + <ClInclude Include="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h" /> + <ClInclude Include="..\..\include\IParticleAttractionAffector.h" /> + <ClInclude Include="..\..\include\IParticleBoxEmitter.h" /> + <ClInclude Include="..\..\include\IParticleCylinderEmitter.h" /> + <ClInclude Include="..\..\include\IParticleEmitter.h" /> + <ClInclude Include="..\..\include\IParticleFadeOutAffector.h" /> + <ClInclude Include="..\..\include\IParticleGravityAffector.h" /> + <ClInclude Include="..\..\include\IParticleMeshEmitter.h" /> + <ClInclude Include="..\..\include\IParticleRingEmitter.h" /> + <ClInclude Include="..\..\include\IParticleRotationAffector.h" /> + <ClInclude Include="..\..\include\IParticleSphereEmitter.h" /> + <ClInclude Include="..\..\include\IParticleSystemSceneNode.h" /> + <ClInclude Include="..\..\include\IQ3LevelMesh.h" /> + <ClInclude Include="..\..\include\IQ3Shader.h" /> + <ClInclude Include="..\..\include\ISceneCollisionManager.h" /> + <ClInclude Include="..\..\include\ISceneManager.h" /> + <ClInclude Include="..\..\include\ISceneLoader.h" /> + <ClInclude Include="..\..\include\ISceneNode.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimator.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraFPS.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraMaya.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCollisionResponse.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorFactory.h" /> + <ClInclude Include="..\..\include\ISceneNodeFactory.h" /> + <ClInclude Include="..\..\include\IShadowVolumeSceneNode.h" /> + <ClInclude Include="..\..\include\ISkinnedMesh.h" /> + <ClInclude Include="..\..\include\ITerrainSceneNode.h" /> + <ClInclude Include="..\..\include\ITextSceneNode.h" /> + <ClInclude Include="..\..\include\ITriangleSelector.h" /> + <ClInclude Include="..\..\include\IVolumeLightSceneNode.h" /> + <ClInclude Include="..\..\include\SAnimatedMesh.h" /> + <ClInclude Include="..\..\include\SceneParameters.h" /> + <ClInclude Include="..\..\include\SMesh.h" /> + <ClInclude Include="..\..\include\SMeshBuffer.h" /> + <ClInclude Include="..\..\include\SMeshBufferLightMap.h" /> + <ClInclude Include="..\..\include\SMeshBufferTangents.h" /> + <ClInclude Include="..\..\include\SParticle.h" /> + <ClInclude Include="..\..\include\SSkinMeshBuffer.h" /> + <ClInclude Include="..\..\include\SViewFrustum.h" /> + <ClInclude Include="..\..\include\EGUIAlignment.h" /> + <ClInclude Include="..\..\include\EGUIElementTypes.h" /> + <ClInclude Include="..\..\include\EMessageBoxFlags.h" /> + <ClInclude Include="..\..\include\ICursorControl.h" /> + <ClInclude Include="..\..\include\IGUIButton.h" /> + <ClInclude Include="..\..\include\IGUICheckbox.h" /> + <ClInclude Include="..\..\include\IGUIComboBox.h" /> + <ClInclude Include="..\..\include\IGUIContextMenu.h" /> + <ClInclude Include="..\..\include\IGUIEditBox.h" /> + <ClInclude Include="..\..\include\IGUIElement.h" /> + <ClInclude Include="..\..\include\IGUIElementFactory.h" /> + <ClInclude Include="..\..\include\IGUIEnvironment.h" /> + <ClInclude Include="..\..\include\IGUIFileOpenDialog.h" /> + <ClInclude Include="..\..\include\IGUIFont.h" /> + <ClInclude Include="..\..\include\IGUIImage.h" /> + <ClInclude Include="..\..\include\IGUIImageList.h" /> + <ClInclude Include="..\..\include\IGUIInOutFader.h" /> + <ClInclude Include="..\..\include\IGUIListBox.h" /> + <ClInclude Include="..\..\include\IGUIMeshViewer.h" /> + <ClInclude Include="..\..\include\IGUIScrollBar.h" /> + <ClInclude Include="..\..\include\IGUISkin.h" /> + <ClInclude Include="..\..\include\IGUISpinBox.h" /> + <ClInclude Include="..\..\include\IGUISpriteBank.h" /> + <ClInclude Include="..\..\include\IGUIStaticText.h" /> + <ClInclude Include="..\..\include\IGUITabControl.h" /> + <ClInclude Include="..\..\include\IGUIToolbar.h" /> + <ClInclude Include="..\..\include\IGUITreeView.h" /> + <ClInclude Include="..\..\include\IGUIWindow.h" /> + <ClInclude Include="CCgMaterialRenderer.h" /> + <ClInclude Include="CD3D9CgMaterialRenderer.h" /> + <ClInclude Include="CDefaultSceneNodeAnimatorFactory.h" /> + <ClInclude Include="CDefaultSceneNodeFactory.h" /> + <ClInclude Include="CGeometryCreator.h" /> + <ClInclude Include="CMeshCache.h" /> + <ClInclude Include="CMeshManipulator.h" /> + <ClInclude Include="COpenGLCgMaterialRenderer.h" /> + <ClInclude Include="CSceneManager.h" /> + <ClInclude Include="Octree.h" /> + <ClInclude Include="CSMFMeshFileLoader.h" /> + <ClInclude Include="C3DSMeshFileLoader.h" /> + <ClInclude Include="CAnimatedMeshHalfLife.h" /> + <ClInclude Include="CAnimatedMeshMD2.h" /> + <ClInclude Include="CAnimatedMeshMD3.h" /> + <ClInclude Include="CB3DMeshFileLoader.h" /> + <ClInclude Include="CBSPMeshFileLoader.h" /> + <ClInclude Include="CColladaFileLoader.h" /> + <ClInclude Include="CCSMLoader.h" /> + <ClInclude Include="CDMFLoader.h" /> + <ClInclude Include="CIrrMeshFileLoader.h" /> + <ClInclude Include="CLMTSMeshFileLoader.h" /> + <ClInclude Include="CLWOMeshFileLoader.h" /> + <ClInclude Include="CMD2MeshFileLoader.h" /> + <ClInclude Include="CMD3MeshFileLoader.h" /> + <ClInclude Include="CMS3DMeshFileLoader.h" /> + <ClInclude Include="CMY3DHelper.h" /> + <ClInclude Include="CMY3DMeshFileLoader.h" /> + <ClInclude Include="COBJMeshFileLoader.h" /> + <ClInclude Include="COCTLoader.h" /> + <ClInclude Include="COgreMeshFileLoader.h" /> + <ClInclude Include="CPLYMeshFileLoader.h" /> + <ClInclude Include="CQ3LevelMesh.h" /> + <ClInclude Include="CSkinnedMesh.h" /> + <ClInclude Include="CSTLMeshFileLoader.h" /> + <ClInclude Include="CXMeshFileLoader.h" /> + <ClInclude Include="dmfsupport.h" /> + <ClInclude Include="CAnimatedMeshSceneNode.h" /> + <ClInclude Include="CBillboardSceneNode.h" /> + <ClInclude Include="CBoneSceneNode.h" /> + <ClInclude Include="CCameraSceneNode.h" /> + <ClInclude Include="CCubeSceneNode.h" /> + <ClInclude Include="CDummyTransformationSceneNode.h" /> + <ClInclude Include="CEmptySceneNode.h" /> + <ClInclude Include="CLightSceneNode.h" /> + <ClInclude Include="CMeshSceneNode.h" /> + <ClInclude Include="COctreeSceneNode.h" /> + <ClInclude Include="CQuake3ShaderSceneNode.h" /> + <ClInclude Include="CShadowVolumeSceneNode.h" /> + <ClInclude Include="CSkyBoxSceneNode.h" /> + <ClInclude Include="CSkyDomeSceneNode.h" /> + <ClInclude Include="CSphereSceneNode.h" /> + <ClInclude Include="CTerrainSceneNode.h" /> + <ClInclude Include="CTextSceneNode.h" /> + <ClInclude Include="CVolumeLightSceneNode.h" /> + <ClInclude Include="CWaterSurfaceSceneNode.h" /> + <ClInclude Include="CParticleAnimatedMeshSceneNodeEmitter.h" /> + <ClInclude Include="CParticleAttractionAffector.h" /> + <ClInclude Include="CParticleBoxEmitter.h" /> + <ClInclude Include="CParticleCylinderEmitter.h" /> + <ClInclude Include="CParticleFadeOutAffector.h" /> + <ClInclude Include="CParticleGravityAffector.h" /> + <ClInclude Include="CParticleMeshEmitter.h" /> + <ClInclude Include="CParticlePointEmitter.h" /> + <ClInclude Include="CParticleRingEmitter.h" /> + <ClInclude Include="CParticleRotationAffector.h" /> + <ClInclude Include="CParticleScaleAffector.h" /> + <ClInclude Include="CParticleSphereEmitter.h" /> + <ClInclude Include="CParticleSystemSceneNode.h" /> + <ClInclude Include="CMetaTriangleSelector.h" /> + <ClInclude Include="COctreeTriangleSelector.h" /> + <ClInclude Include="CSceneCollisionManager.h" /> + <ClInclude Include="CTerrainTriangleSelector.h" /> + <ClInclude Include="CTriangleBBSelector.h" /> + <ClInclude Include="CTriangleSelector.h" /> + <ClInclude Include="CSceneLoaderIrr.h" /> + <ClInclude Include="CSceneNodeAnimatorCameraFPS.h" /> + <ClInclude Include="CSceneNodeAnimatorCameraMaya.h" /> + <ClInclude Include="CSceneNodeAnimatorCollisionResponse.h" /> + <ClInclude Include="CSceneNodeAnimatorDelete.h" /> + <ClInclude Include="CSceneNodeAnimatorFlyCircle.h" /> + <ClInclude Include="CSceneNodeAnimatorFlyStraight.h" /> + <ClInclude Include="CSceneNodeAnimatorFollowSpline.h" /> + <ClInclude Include="CSceneNodeAnimatorRotation.h" /> + <ClInclude Include="CSceneNodeAnimatorTexture.h" /> + <ClInclude Include="CColladaMeshWriter.h" /> + <ClInclude Include="CIrrMeshWriter.h" /> + <ClInclude Include="COBJMeshWriter.h" /> + <ClInclude Include="CPLYMeshWriter.h" /> + <ClInclude Include="CSTLMeshWriter.h" /> + <ClInclude Include="CVideoModeList.h" /> + <ClInclude Include="CSoftwareDriver.h" /> + <ClInclude Include="CSoftwareTexture.h" /> + <ClInclude Include="CTRTextureGouraud.h" /> + <ClInclude Include="CZBuffer.h" /> + <ClInclude Include="ITriangleRenderer.h" /> + <ClInclude Include="IZBuffer.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="S2DVertex.h" /> + <ClInclude Include="COpenGLDriver.h" /> + <ClInclude Include="COpenGLExtensionHandler.h" /> + <ClInclude Include="COpenGLMaterialRenderer.h" /> + <ClInclude Include="COpenGLNormalMapRenderer.h" /> + <ClInclude Include="COpenGLParallaxMapRenderer.h" /> + <ClInclude Include="COpenGLShaderMaterialRenderer.h" /> + <ClInclude Include="COpenGLSLMaterialRenderer.h" /> + <ClInclude Include="COpenGLTexture.h" /> + <ClInclude Include="glext.h" /> + <ClInclude Include="wglext.h" /> + <ClInclude Include="CD3D8Driver.h" /> + <ClInclude Include="CD3D8MaterialRenderer.h" /> + <ClInclude Include="CD3D8NormalMapRenderer.h" /> + <ClInclude Include="CD3D8ParallaxMapRenderer.h" /> + <ClInclude Include="CD3D8ShaderMaterialRenderer.h" /> + <ClInclude Include="CD3D8Texture.h" /> + <ClInclude Include="CColorConverter.h" /> + <ClInclude Include="CFPSCounter.h" /> + <ClInclude Include="CImage.h" /> + <ClInclude Include="CNullDriver.h" /> + <ClInclude Include="IImagePresenter.h" /> + <ClInclude Include="CImageWriterBMP.h" /> + <ClInclude Include="CImageWriterJPG.h" /> + <ClInclude Include="CImageWriterPCX.h" /> + <ClInclude Include="CImageWriterPNG.h" /> + <ClInclude Include="CImageWriterPPM.h" /> + <ClInclude Include="CImageWriterPSD.h" /> + <ClInclude Include="CImageWriterTGA.h" /> + <ClInclude Include="CImageLoaderBMP.h" /> + <ClInclude Include="CImageLoaderDDS.h" /> + <ClInclude Include="CImageLoaderJPG.h" /> + <ClInclude Include="CImageLoaderPCX.h" /> + <ClInclude Include="CImageLoaderPNG.h" /> + <ClInclude Include="CImageLoaderPPM.h" /> + <ClInclude Include="CImageLoaderPSD.h" /> + <ClInclude Include="CImageLoaderRGB.h" /> + <ClInclude Include="CImageLoaderTGA.h" /> + <ClInclude Include="CImageLoaderWAL.h" /> + <ClInclude Include="CD3D9Driver.h" /> + <ClInclude Include="CD3D9HLSLMaterialRenderer.h" /> + <ClInclude Include="CD3D9MaterialRenderer.h" /> + <ClInclude Include="CD3D9NormalMapRenderer.h" /> + <ClInclude Include="CD3D9ParallaxMapRenderer.h" /> + <ClInclude Include="CD3D9ShaderMaterialRenderer.h" /> + <ClInclude Include="CD3D9Texture.h" /> + <ClInclude Include="CDepthBuffer.h" /> + <ClInclude Include="CSoftware2MaterialRenderer.h" /> + <ClInclude Include="CSoftwareDriver2.h" /> + <ClInclude Include="CSoftwareTexture2.h" /> + <ClInclude Include="IBurningShader.h" /> + <ClInclude Include="IDepthBuffer.h" /> + <ClInclude Include="S4DVertex.h" /> + <ClInclude Include="SoftwareDriver2_compile_config.h" /> + <ClInclude Include="SoftwareDriver2_helper.h" /> + <ClInclude Include="CLogger.h" /> + <ClInclude Include="COSOperator.h" /> + <ClInclude Include="CTimer.h" /> + <ClInclude Include="os.h" /> + <ClInclude Include="lzma\LzmaDec.h" /> + <ClInclude Include="lzma\Types.h" /> + <ClInclude Include="zlib\crc32.h" /> + <ClInclude Include="zlib\deflate.h" /> + <ClInclude Include="zlib\inffast.h" /> + <ClInclude Include="zlib\inffixed.h" /> + <ClInclude Include="zlib\inftrees.h" /> + <ClInclude Include="zlib\trees.h" /> + <ClInclude Include="zlib\zconf.h" /> + <ClInclude Include="zlib\zlib.h" /> + <ClInclude Include="zlib\zutil.h" /> + <ClInclude Include="jpeglib\cderror.h" /> + <ClInclude Include="jpeglib\jconfig.h" /> + <ClInclude Include="jpeglib\jdct.h" /> + <ClInclude Include="jpeglib\jerror.h" /> + <ClInclude Include="jpeglib\jinclude.h" /> + <ClInclude Include="jpeglib\jmemsys.h" /> + <ClInclude Include="jpeglib\jmorecfg.h" /> + <ClInclude Include="jpeglib\jpegint.h" /> + <ClInclude Include="jpeglib\jpeglib.h" /> + <ClInclude Include="jpeglib\jversion.h" /> + <ClInclude Include="libpng\png.h" /> + <ClInclude Include="libpng\pngconf.h" /> + <ClInclude Include="aesGladman\aes.h" /> + <ClInclude Include="aesGladman\aesopt.h" /> + <ClInclude Include="aesGladman\fileenc.h" /> + <ClInclude Include="aesGladman\hmac.h" /> + <ClInclude Include="aesGladman\prng.h" /> + <ClInclude Include="aesGladman\pwd2key.h" /> + <ClInclude Include="aesGladman\sha1.h" /> + <ClInclude Include="aesGladman\sha2.h" /> + <ClInclude Include="bzip2\bzlib.h" /> + <ClInclude Include="bzip2\bzlib_private.h" /> + <ClInclude Include="CIrrDeviceConsole.h" /> + <ClInclude Include="CIrrDeviceFB.h" /> + <ClInclude Include="CIrrDeviceLinux.h" /> + <ClInclude Include="CIrrDeviceSDL.h" /> + <ClInclude Include="CIrrDeviceStub.h" /> + <ClInclude Include="CIrrDeviceWin32.h" /> + <ClInclude Include="CIrrDeviceWinCE.h" /> + <ClInclude Include="CAttributeImpl.h" /> + <ClInclude Include="CAttributes.h" /> + <ClInclude Include="CFileList.h" /> + <ClInclude Include="CFileSystem.h" /> + <ClInclude Include="CLimitReadFile.h" /> + <ClInclude Include="CMemoryFile.h" /> + <ClInclude Include="CMountPointReader.h" /> + <ClInclude Include="CNPKReader.h" /> + <ClInclude Include="CPakReader.h" /> + <ClInclude Include="CReadFile.h" /> + <ClInclude Include="CTarReader.h" /> + <ClInclude Include="CWADReader.h" /> + <ClInclude Include="CWriteFile.h" /> + <ClInclude Include="CXMLReader.h" /> + <ClInclude Include="CXMLReaderImpl.h" /> + <ClInclude Include="CXMLWriter.h" /> + <ClInclude Include="CZipReader.h" /> + <ClInclude Include="IAttribute.h" /> + <ClInclude Include="BuiltInFont.h" /> + <ClInclude Include="CDefaultGUIElementFactory.h" /> + <ClInclude Include="CGUIButton.h" /> + <ClInclude Include="CGUICheckbox.h" /> + <ClInclude Include="CGUIColorSelectDialog.h" /> + <ClInclude Include="CGUIComboBox.h" /> + <ClInclude Include="CGUIContextMenu.h" /> + <ClInclude Include="CGUIEditBox.h" /> + <ClInclude Include="CGUIEnvironment.h" /> + <ClInclude Include="CGUIFileOpenDialog.h" /> + <ClInclude Include="CGUIFont.h" /> + <ClInclude Include="CGUIImage.h" /> + <ClInclude Include="CGUIImageList.h" /> + <ClInclude Include="CGUIInOutFader.h" /> + <ClInclude Include="CGUIListBox.h" /> + <ClInclude Include="CGUIMenu.h" /> + <ClInclude Include="CGUIMeshViewer.h" /> + <ClInclude Include="CGUIMessageBox.h" /> + <ClInclude Include="CGUIModalScreen.h" /> + <ClInclude Include="CGUIScrollBar.h" /> + <ClInclude Include="CGUISkin.h" /> + <ClInclude Include="CGUISpinBox.h" /> + <ClInclude Include="CGUISpriteBank.h" /> + <ClInclude Include="CGUIStaticText.h" /> + <ClInclude Include="CGUITabControl.h" /> + <ClInclude Include="CGUITable.h" /> + <ClInclude Include="CGUIToolBar.h" /> + <ClInclude Include="CGUITreeView.h" /> + <ClInclude Include="CGUIWindow.h" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\changes.txt" /> + <None Include="..\..\readme.txt" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="CCgMaterialRenderer.cpp" /> + <ClCompile Include="CD3D9CgMaterialRenderer.cpp" /> + <ClCompile Include="CDefaultSceneNodeAnimatorFactory.cpp" /> + <ClCompile Include="CDefaultSceneNodeFactory.cpp" /> + <ClCompile Include="CGeometryCreator.cpp" /> + <ClCompile Include="CMeshCache.cpp" /> + <ClCompile Include="CMeshManipulator.cpp" /> + <ClCompile Include="COpenGLCgMaterialRenderer.cpp" /> + <ClCompile Include="CSceneManager.cpp" /> + <ClCompile Include="C3DSMeshFileLoader.cpp" /> + <ClCompile Include="CSMFMeshFileLoader.cpp" /> + <ClCompile Include="CAnimatedMeshHalfLife.cpp" /> + <ClCompile Include="CAnimatedMeshMD2.cpp" /> + <ClCompile Include="CAnimatedMeshMD3.cpp" /> + <ClCompile Include="CB3DMeshFileLoader.cpp" /> + <ClCompile Include="CBSPMeshFileLoader.cpp" /> + <ClCompile Include="CColladaFileLoader.cpp" /> + <ClCompile Include="CCSMLoader.cpp" /> + <ClCompile Include="CDMFLoader.cpp" /> + <ClCompile Include="CIrrMeshFileLoader.cpp" /> + <ClCompile Include="CLMTSMeshFileLoader.cpp" /> + <ClCompile Include="CLWOMeshFileLoader.cpp" /> + <ClCompile Include="CMD2MeshFileLoader.cpp" /> + <ClCompile Include="CMD3MeshFileLoader.cpp" /> + <ClCompile Include="CMS3DMeshFileLoader.cpp" /> + <ClCompile Include="CMY3DMeshFileLoader.cpp" /> + <ClCompile Include="COBJMeshFileLoader.cpp" /> + <ClCompile Include="COCTLoader.cpp" /> + <ClCompile Include="COgreMeshFileLoader.cpp" /> + <ClCompile Include="CPLYMeshFileLoader.cpp" /> + <ClCompile Include="CQ3LevelMesh.cpp" /> + <ClCompile Include="CSkinnedMesh.cpp" /> + <ClCompile Include="CSTLMeshFileLoader.cpp" /> + <ClCompile Include="CXMeshFileLoader.cpp" /> + <ClCompile Include="CAnimatedMeshSceneNode.cpp" /> + <ClCompile Include="CBillboardSceneNode.cpp" /> + <ClCompile Include="CBoneSceneNode.cpp" /> + <ClCompile Include="CCameraSceneNode.cpp" /> + <ClCompile Include="CCubeSceneNode.cpp" /> + <ClCompile Include="CDummyTransformationSceneNode.cpp" /> + <ClCompile Include="CEmptySceneNode.cpp" /> + <ClCompile Include="CLightSceneNode.cpp" /> + <ClCompile Include="CMeshSceneNode.cpp" /> + <ClCompile Include="COctreeSceneNode.cpp" /> + <ClCompile Include="CQuake3ShaderSceneNode.cpp" /> + <ClCompile Include="CShadowVolumeSceneNode.cpp" /> + <ClCompile Include="CSkyBoxSceneNode.cpp" /> + <ClCompile Include="CSkyDomeSceneNode.cpp" /> + <ClCompile Include="CSphereSceneNode.cpp" /> + <ClCompile Include="CTerrainSceneNode.cpp" /> + <ClCompile Include="CTextSceneNode.cpp" /> + <ClCompile Include="CVolumeLightSceneNode.cpp" /> + <ClCompile Include="CWaterSurfaceSceneNode.cpp" /> + <ClCompile Include="CParticleAnimatedMeshSceneNodeEmitter.cpp" /> + <ClCompile Include="CParticleAttractionAffector.cpp" /> + <ClCompile Include="CParticleBoxEmitter.cpp" /> + <ClCompile Include="CParticleCylinderEmitter.cpp" /> + <ClCompile Include="CParticleFadeOutAffector.cpp" /> + <ClCompile Include="CParticleGravityAffector.cpp" /> + <ClCompile Include="CParticleMeshEmitter.cpp" /> + <ClCompile Include="CParticlePointEmitter.cpp" /> + <ClCompile Include="CParticleRingEmitter.cpp" /> + <ClCompile Include="CParticleRotationAffector.cpp" /> + <ClCompile Include="CParticleScaleAffector.cpp" /> + <ClCompile Include="CParticleSphereEmitter.cpp" /> + <ClCompile Include="CParticleSystemSceneNode.cpp" /> + <ClCompile Include="CMetaTriangleSelector.cpp" /> + <ClCompile Include="COctreeTriangleSelector.cpp" /> + <ClCompile Include="CSceneCollisionManager.cpp" /> + <ClCompile Include="CTerrainTriangleSelector.cpp" /> + <ClCompile Include="CTriangleBBSelector.cpp" /> + <ClCompile Include="CTriangleSelector.cpp" /> + <ClCompile Include="CSceneLoaderIrr.cpp" /> + <ClCompile Include="CSceneNodeAnimatorCameraFPS.cpp" /> + <ClCompile Include="CSceneNodeAnimatorCameraMaya.cpp" /> + <ClCompile Include="CSceneNodeAnimatorCollisionResponse.cpp" /> + <ClCompile Include="CSceneNodeAnimatorDelete.cpp" /> + <ClCompile Include="CSceneNodeAnimatorFlyCircle.cpp" /> + <ClCompile Include="CSceneNodeAnimatorFlyStraight.cpp" /> + <ClCompile Include="CSceneNodeAnimatorFollowSpline.cpp" /> + <ClCompile Include="CSceneNodeAnimatorRotation.cpp" /> + <ClCompile Include="CSceneNodeAnimatorTexture.cpp" /> + <ClCompile Include="CColladaMeshWriter.cpp" /> + <ClCompile Include="CIrrMeshWriter.cpp" /> + <ClCompile Include="COBJMeshWriter.cpp" /> + <ClCompile Include="CPLYMeshWriter.cpp" /> + <ClCompile Include="CSTLMeshWriter.cpp" /> + <ClCompile Include="CVideoModeList.cpp" /> + <ClCompile Include="CSoftwareDriver.cpp" /> + <ClCompile Include="CSoftwareTexture.cpp" /> + <ClCompile Include="CTRFlat.cpp" /> + <ClCompile Include="CTRFlatWire.cpp" /> + <ClCompile Include="CTRGouraud.cpp" /> + <ClCompile Include="CTRGouraudWire.cpp" /> + <ClCompile Include="CTRTextureFlat.cpp" /> + <ClCompile Include="CTRTextureFlatWire.cpp" /> + <ClCompile Include="CTRTextureGouraud.cpp" /> + <ClCompile Include="CTRTextureGouraudAdd.cpp" /> + <ClCompile Include="CTRTextureGouraudNoZ.cpp" /> + <ClCompile Include="CTRTextureGouraudWire.cpp" /> + <ClCompile Include="CZBuffer.cpp" /> + <ClCompile Include="COpenGLDriver.cpp" /> + <ClCompile Include="COpenGLExtensionHandler.cpp" /> + <ClCompile Include="COpenGLNormalMapRenderer.cpp" /> + <ClCompile Include="COpenGLParallaxMapRenderer.cpp" /> + <ClCompile Include="COpenGLShaderMaterialRenderer.cpp" /> + <ClCompile Include="COpenGLSLMaterialRenderer.cpp" /> + <ClCompile Include="COpenGLTexture.cpp" /> + <ClCompile Include="CD3D8Driver.cpp" /> + <ClCompile Include="CD3D8NormalMapRenderer.cpp" /> + <ClCompile Include="CD3D8ParallaxMapRenderer.cpp" /> + <ClCompile Include="CD3D8ShaderMaterialRenderer.cpp" /> + <ClCompile Include="CD3D8Texture.cpp" /> + <ClCompile Include="CColorConverter.cpp" /> + <ClCompile Include="CFPSCounter.cpp" /> + <ClCompile Include="CImage.cpp" /> + <ClCompile Include="CNullDriver.cpp" /> + <ClCompile Include="CImageWriterBMP.cpp" /> + <ClCompile Include="CImageWriterJPG.cpp" /> + <ClCompile Include="CImageWriterPCX.cpp" /> + <ClCompile Include="CImageWriterPNG.cpp" /> + <ClCompile Include="CImageWriterPPM.cpp" /> + <ClCompile Include="CImageWriterPSD.cpp" /> + <ClCompile Include="CImageWriterTGA.cpp" /> + <ClCompile Include="CImageLoaderBMP.cpp" /> + <ClCompile Include="CImageLoaderDDS.cpp" /> + <ClCompile Include="CImageLoaderJPG.cpp" /> + <ClCompile Include="CImageLoaderPCX.cpp" /> + <ClCompile Include="CImageLoaderPNG.cpp" /> + <ClCompile Include="CImageLoaderPPM.cpp" /> + <ClCompile Include="CImageLoaderPSD.cpp" /> + <ClCompile Include="CImageLoaderRGB.cpp" /> + <ClCompile Include="CImageLoaderTGA.cpp" /> + <ClCompile Include="CImageLoaderWAL.cpp" /> + <ClCompile Include="CD3D9Driver.cpp" /> + <ClCompile Include="CD3D9HLSLMaterialRenderer.cpp" /> + <ClCompile Include="CD3D9NormalMapRenderer.cpp" /> + <ClCompile Include="CD3D9ParallaxMapRenderer.cpp" /> + <ClCompile Include="CD3D9ShaderMaterialRenderer.cpp" /> + <ClCompile Include="CD3D9Texture.cpp" /> + <ClCompile Include="CBurningShader_Raster_Reference.cpp" /> + <ClCompile Include="CDepthBuffer.cpp" /> + <ClCompile Include="CSoftwareDriver2.cpp" /> + <ClCompile Include="CSoftwareTexture2.cpp" /> + <ClCompile Include="CTRGouraud2.cpp" /> + <ClCompile Include="CTRGouraudAlpha2.cpp" /> + <ClCompile Include="CTRGouraudAlphaNoZ2.cpp" /> + <ClCompile Include="CTRNormalMap.cpp" /> + <ClCompile Include="CTRStencilShadow.cpp" /> + <ClCompile Include="CTRTextureBlend.cpp" /> + <ClCompile Include="CTRTextureDetailMap2.cpp" /> + <ClCompile Include="CTRTextureGouraud2.cpp" /> + <ClCompile Include="CTRTextureGouraudAdd2.cpp" /> + <ClCompile Include="CTRTextureGouraudAddNoZ2.cpp" /> + <ClCompile Include="CTRTextureGouraudAlpha.cpp" /> + <ClCompile Include="CTRTextureGouraudAlphaNoZ.cpp" /> + <ClCompile Include="CTRTextureGouraudNoZ2.cpp" /> + <ClCompile Include="CTRTextureGouraudVertexAlpha2.cpp" /> + <ClCompile Include="CTRTextureLightMap2_Add.cpp" /> + <ClCompile Include="CTRTextureLightMap2_M1.cpp" /> + <ClCompile Include="CTRTextureLightMap2_M2.cpp" /> + <ClCompile Include="CTRTextureLightMap2_M4.cpp" /> + <ClCompile Include="CTRTextureLightMapGouraud2_M4.cpp" /> + <ClCompile Include="CTRTextureWire2.cpp" /> + <ClCompile Include="IBurningShader.cpp" /> + <ClCompile Include="CLogger.cpp" /> + <ClCompile Include="COSOperator.cpp" /> + <ClCompile Include="Irrlicht.cpp" /> + <ClCompile Include="os.cpp" /> + <ClCompile Include="lzma\LzmaDec.c" /> + <ClCompile Include="zlib\adler32.c" /> + <ClCompile Include="zlib\compress.c" /> + <ClCompile Include="zlib\crc32.c" /> + <ClCompile Include="zlib\deflate.c" /> + <ClCompile Include="zlib\inffast.c" /> + <ClCompile Include="zlib\inflate.c" /> + <ClCompile Include="zlib\inftrees.c" /> + <ClCompile Include="zlib\trees.c" /> + <ClCompile Include="zlib\uncompr.c" /> + <ClCompile Include="zlib\zutil.c" /> + <ClCompile Include="jpeglib\jaricom.c" /> + <ClCompile Include="jpeglib\jcapimin.c" /> + <ClCompile Include="jpeglib\jcapistd.c" /> + <ClCompile Include="jpeglib\jcarith.c" /> + <ClCompile Include="jpeglib\jccoefct.c" /> + <ClCompile Include="jpeglib\jccolor.c" /> + <ClCompile Include="jpeglib\jcdctmgr.c" /> + <ClCompile Include="jpeglib\jchuff.c" /> + <ClCompile Include="jpeglib\jcinit.c" /> + <ClCompile Include="jpeglib\jcmainct.c" /> + <ClCompile Include="jpeglib\jcmarker.c" /> + <ClCompile Include="jpeglib\jcmaster.c" /> + <ClCompile Include="jpeglib\jcomapi.c" /> + <ClCompile Include="jpeglib\jcparam.c" /> + <ClCompile Include="jpeglib\jcprepct.c" /> + <ClCompile Include="jpeglib\jcsample.c" /> + <ClCompile Include="jpeglib\jctrans.c" /> + <ClCompile Include="jpeglib\jdapimin.c" /> + <ClCompile Include="jpeglib\jdapistd.c" /> + <ClCompile Include="jpeglib\jdarith.c" /> + <ClCompile Include="jpeglib\jdatadst.c" /> + <ClCompile Include="jpeglib\jdatasrc.c" /> + <ClCompile Include="jpeglib\jdcoefct.c" /> + <ClCompile Include="jpeglib\jdcolor.c" /> + <ClCompile Include="jpeglib\jddctmgr.c" /> + <ClCompile Include="jpeglib\jdhuff.c" /> + <ClCompile Include="jpeglib\jdinput.c" /> + <ClCompile Include="jpeglib\jdmainct.c" /> + <ClCompile Include="jpeglib\jdmarker.c" /> + <ClCompile Include="jpeglib\jdmaster.c" /> + <ClCompile Include="jpeglib\jdmerge.c" /> + <ClCompile Include="jpeglib\jdpostct.c" /> + <ClCompile Include="jpeglib\jdsample.c" /> + <ClCompile Include="jpeglib\jdtrans.c" /> + <ClCompile Include="jpeglib\jerror.c" /> + <ClCompile Include="jpeglib\jfdctflt.c" /> + <ClCompile Include="jpeglib\jfdctfst.c" /> + <ClCompile Include="jpeglib\jfdctint.c" /> + <ClCompile Include="jpeglib\jidctflt.c" /> + <ClCompile Include="jpeglib\jidctfst.c" /> + <ClCompile Include="jpeglib\jidctint.c" /> + <ClCompile Include="jpeglib\jmemmgr.c" /> + <ClCompile Include="jpeglib\jmemnobs.c" /> + <ClCompile Include="jpeglib\jquant1.c" /> + <ClCompile Include="jpeglib\jquant2.c" /> + <ClCompile Include="jpeglib\jutils.c" /> + <ClCompile Include="libpng\png.c" /> + <ClCompile Include="libpng\pngerror.c" /> + <ClCompile Include="libpng\pngget.c" /> + <ClCompile Include="libpng\pngmem.c" /> + <ClCompile Include="libpng\pngpread.c" /> + <ClCompile Include="libpng\pngread.c" /> + <ClCompile Include="libpng\pngrio.c" /> + <ClCompile Include="libpng\pngrtran.c" /> + <ClCompile Include="libpng\pngrutil.c" /> + <ClCompile Include="libpng\pngset.c" /> + <ClCompile Include="libpng\pngtrans.c" /> + <ClCompile Include="libpng\pngwio.c" /> + <ClCompile Include="libpng\pngwrite.c" /> + <ClCompile Include="libpng\pngwtran.c" /> + <ClCompile Include="libpng\pngwutil.c" /> + <ClCompile Include="aesGladman\aescrypt.cpp" /> + <ClCompile Include="aesGladman\aeskey.cpp" /> + <ClCompile Include="aesGladman\aestab.cpp" /> + <ClCompile Include="aesGladman\fileenc.cpp" /> + <ClCompile Include="aesGladman\hmac.cpp" /> + <ClCompile Include="aesGladman\prng.cpp" /> + <ClCompile Include="aesGladman\pwd2key.cpp" /> + <ClCompile Include="aesGladman\sha1.cpp" /> + <ClCompile Include="aesGladman\sha2.cpp" /> + <ClCompile Include="bzip2\blocksort.c" /> + <ClCompile Include="bzip2\bzcompress.c" /> + <ClCompile Include="bzip2\bzlib.c" /> + <ClCompile Include="bzip2\crctable.c" /> + <ClCompile Include="bzip2\decompress.c" /> + <ClCompile Include="bzip2\huffman.c" /> + <ClCompile Include="bzip2\randtable.c" /> + <ClCompile Include="CIrrDeviceConsole.cpp" /> + <ClCompile Include="CIrrDeviceFB.cpp" /> + <ClCompile Include="CIrrDeviceLinux.cpp" /> + <ClCompile Include="CIrrDeviceSDL.cpp" /> + <ClCompile Include="CIrrDeviceStub.cpp" /> + <ClCompile Include="CIrrDeviceWin32.cpp" /> + <ClCompile Include="CIrrDeviceWinCE.cpp" /> + <ClCompile Include="CAttributes.cpp" /> + <ClCompile Include="CFileList.cpp" /> + <ClCompile Include="CFileSystem.cpp" /> + <ClCompile Include="CLimitReadFile.cpp" /> + <ClCompile Include="CMemoryFile.cpp" /> + <ClCompile Include="CMountPointReader.cpp" /> + <ClCompile Include="CNPKReader.cpp" /> + <ClCompile Include="CPakReader.cpp" /> + <ClCompile Include="CReadFile.cpp" /> + <ClCompile Include="CTarReader.cpp" /> + <ClCompile Include="CWADReader.cpp" /> + <ClCompile Include="CWriteFile.cpp" /> + <ClCompile Include="CXMLReader.cpp" /> + <ClCompile Include="CXMLWriter.cpp" /> + <ClCompile Include="CZipReader.cpp" /> + <ClCompile Include="irrXML.cpp" /> + <ClCompile Include="CDefaultGUIElementFactory.cpp" /> + <ClCompile Include="CGUIButton.cpp" /> + <ClCompile Include="CGUICheckbox.cpp" /> + <ClCompile Include="CGUIColorSelectDialog.cpp" /> + <ClCompile Include="CGUIComboBox.cpp" /> + <ClCompile Include="CGUIContextMenu.cpp" /> + <ClCompile Include="CGUIEditBox.cpp" /> + <ClCompile Include="CGUIEnvironment.cpp" /> + <ClCompile Include="CGUIFileOpenDialog.cpp" /> + <ClCompile Include="CGUIFont.cpp" /> + <ClCompile Include="CGUIImage.cpp" /> + <ClCompile Include="CGUIImageList.cpp" /> + <ClCompile Include="CGUIInOutFader.cpp" /> + <ClCompile Include="CGUIListBox.cpp" /> + <ClCompile Include="CGUIMenu.cpp" /> + <ClCompile Include="CGUIMeshViewer.cpp" /> + <ClCompile Include="CGUIMessageBox.cpp" /> + <ClCompile Include="CGUIModalScreen.cpp" /> + <ClCompile Include="CGUIScrollBar.cpp" /> + <ClCompile Include="CGUISkin.cpp" /> + <ClCompile Include="CGUISpinBox.cpp" /> + <ClCompile Include="CGUISpriteBank.cpp" /> + <ClCompile Include="CGUIStaticText.cpp" /> + <ClCompile Include="CGUITabControl.cpp" /> + <ClCompile Include="CGUITable.cpp" /> + <ClCompile Include="CGUIToolBar.cpp" /> + <ClCompile Include="CGUITreeView.cpp" /> + <ClCompile Include="CGUIWindow.cpp" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Irrlicht.rc" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj.filters b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj.filters new file mode 100644 index 0000000..c522cec --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.vcxproj.filters @@ -0,0 +1,2247 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="include"> + <UniqueIdentifier>{b5bde5d3-f9e4-4036-8c28-2f4e8cd03846}</UniqueIdentifier> + </Filter> + <Filter Include="include\video"> + <UniqueIdentifier>{0b0937fb-2270-4e3e-a94f-f92bc0fa74ae}</UniqueIdentifier> + </Filter> + <Filter Include="include\core"> + <UniqueIdentifier>{67300400-93d5-4a7e-8b59-7c0d7b1f6d75}</UniqueIdentifier> + </Filter> + <Filter Include="include\io"> + <UniqueIdentifier>{feb206b9-81b6-45c0-b4e5-9e637fe060e7}</UniqueIdentifier> + </Filter> + <Filter Include="include\scene"> + <UniqueIdentifier>{af459bf5-2849-4a0e-9a21-91acbbf1c6b5}</UniqueIdentifier> + </Filter> + <Filter Include="include\gui"> + <UniqueIdentifier>{aa649d49-922d-4118-8574-f05c13d67706}</UniqueIdentifier> + </Filter> + <Filter Include="doc"> + <UniqueIdentifier>{a72cb2e5-a5c3-41bc-9c86-fdbdae8f7866}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht"> + <UniqueIdentifier>{72c30315-bbc0-4109-9ccd-fb7107ba316a}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene"> + <UniqueIdentifier>{1fcdc900-911d-4b7a-9328-afce5bbe44fa}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\loaders"> + <UniqueIdentifier>{41e16cbf-c3cb-4d74-8aef-c0416b6b9d7f}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\sceneNodes"> + <UniqueIdentifier>{b84f01e5-ae3c-457b-8d96-b3e271800162}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\particleSystem"> + <UniqueIdentifier>{eca36d94-d8fb-477d-a0dc-b5498c9686d7}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\collision"> + <UniqueIdentifier>{67826246-df05-4523-9191-5286f9157963}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\animators"> + <UniqueIdentifier>{659a61d5-7ab3-4aa3-95ca-879780810b4e}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\writers"> + <UniqueIdentifier>{f65e8d89-c715-4794-8c2d-22f2b57cffb0}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video"> + <UniqueIdentifier>{3cb7865d-a5e9-4b22-8f54-dde759b88c51}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Software"> + <UniqueIdentifier>{919fcfa4-4277-4c88-8bfc-4bfcfcbb1b65}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\OpenGL"> + <UniqueIdentifier>{834213c7-9515-49de-aa27-8d3ed9c0c87a}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Direct3D8"> + <UniqueIdentifier>{19838bc4-396f-4d23-ad1b-3bb652e33e6d}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Null"> + <UniqueIdentifier>{a9ca9d4d-7678-4687-b78b-15236c0dcf53}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Null\Writer"> + <UniqueIdentifier>{d694e7b0-0fb0-4685-ace7-56d9ec65a3d0}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Null\Loader"> + <UniqueIdentifier>{e2571a61-945c-4509-b47c-daea464916ab}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Direct3D9"> + <UniqueIdentifier>{1354e9fa-cea6-461e-af7f-9940bb5f0a2f}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Burning Video"> + <UniqueIdentifier>{ac7af7ba-0e6b-4da4-a695-a0070a4da974}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr"> + <UniqueIdentifier>{1173499e-79e8-4c34-8046-abc325e2f2a9}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern"> + <UniqueIdentifier>{ca095ff3-25e4-4852-ab55-af28c602cd8a}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\zlib"> + <UniqueIdentifier>{1c8bd90a-8361-4478-8942-a062450ef209}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\jpeglib"> + <UniqueIdentifier>{128cac28-b6f8-49e7-87f5-ee15951d0396}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\libpng"> + <UniqueIdentifier>{6f10ce97-ed8b-47bc-a189-f2262eb467e4}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\aesGladman"> + <UniqueIdentifier>{5d58bc55-284e-4880-9226-85083e65d660}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\bzip2"> + <UniqueIdentifier>{064ee182-9f07-4026-ac22-c141ae2c7281}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\device"> + <UniqueIdentifier>{6e842906-e193-451d-8716-12eaafabd0d8}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\io"> + <UniqueIdentifier>{799f220e-3a58-4788-876b-88c175b69871}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\gui"> + <UniqueIdentifier>{da421793-4674-481c-be46-f7a44e78aee5}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\include\IEventReceiver.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ILogger.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IOSOperator.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IReferenceCounted.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IrrCompileConfig.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrlicht.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IrrlichtDevice.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrTypes.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITimer.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\Keycodes.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SIrrCreationParameters.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SKeyMap.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EDriverTypes.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGeometryCreator.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGPUProgrammingServices.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IImage.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IImageLoader.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMaterialRenderer.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMaterialRendererServices.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IShaderConstantSetCallBack.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITexture.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IVideoDriver.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IVideoModeList.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\S3DVertex.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SColor.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SExposedVideoData.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SLight.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMaterial.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMaterialLayer.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\aabbox3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\coreutil.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\dimension2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\heapsort.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrAllocator.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrArray.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrList.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrMap.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrMath.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrString.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\line2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\line3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\matrix4.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\plane3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\position2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\quaternion.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\rect.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\triangle3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\vector2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\vector3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EAttributes.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAttributeExchangingObject.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAttributes.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IFileList.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IFileSystem.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IReadFile.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrXML.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IWriteFile.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IXMLReader.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IXMLWriter.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\path.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CDynamicMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CIndexBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CVertexBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ECullingTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EDebugSceneTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EMeshWriterEnums.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EPrimitiveTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ESceneNodeAnimatorTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ESceneNodeTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMeshMD2.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMeshSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IBillboardSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ICameraSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IDummyTransformationSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ILightSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshCache.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshLoader.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshManipulator.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshWriter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMetaTriangleSelector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleAttractionAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleBoxEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleCylinderEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleFadeOutAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleGravityAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleMeshEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleRingEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleRotationAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleSphereEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleSystemSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IQ3LevelMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IQ3Shader.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneCollisionManager.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneManager.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimator.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraFPS.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraMaya.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCollisionResponse.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorFactory.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeFactory.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IShadowVolumeSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISkinnedMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITerrainSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITextSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITriangleSelector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IVolumeLightSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SAnimatedMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SceneParameters.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMeshBufferLightMap.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMeshBufferTangents.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SParticle.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SSkinMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SViewFrustum.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGUIAlignment.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGUIElementTypes.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EMessageBoxFlags.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ICursorControl.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIButton.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUICheckbox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIComboBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIContextMenu.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIEditBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIElement.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIElementFactory.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIEnvironment.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIFileOpenDialog.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIFont.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIImage.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIImageList.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIInOutFader.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIListBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIMeshViewer.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIScrollBar.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUISkin.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUISpinBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUISpriteBank.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIStaticText.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUITabControl.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIToolbar.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUITreeView.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIWindow.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="CDefaultSceneNodeAnimatorFactory.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CDefaultSceneNodeFactory.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CGeometryCreator.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CMeshCache.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CMeshManipulator.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CSceneManager.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="Octree.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="C3DSMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshHalfLife.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshMD2.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshMD3.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CB3DMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CBSPMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CColladaFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CCSMLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CDMFLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CIrrMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CLMTSMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CLWOMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMD2MeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMD3MeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMS3DMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMY3DHelper.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMY3DMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="COBJMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="COCTLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="COgreMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CPLYMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CQ3LevelMesh.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CSkinnedMesh.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CSTLMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CXMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="dmfsupport.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CBillboardSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CBoneSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CCameraSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CCubeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CDummyTransformationSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CEmptySceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CLightSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CMeshSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="COctreeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CQuake3ShaderSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CShadowVolumeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CSkyBoxSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CSkyDomeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CSphereSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CTerrainSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CTextSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CVolumeLightSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CWaterSurfaceSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CParticleAnimatedMeshSceneNodeEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleAttractionAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleBoxEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleCylinderEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleFadeOutAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleGravityAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleMeshEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticlePointEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleRingEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleRotationAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleScaleAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleSphereEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleSystemSceneNode.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CMetaTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="COctreeTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CSceneCollisionManager.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CTerrainTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CTriangleBBSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorCameraFPS.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorCameraMaya.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorCollisionResponse.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorDelete.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorFlyCircle.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorFlyStraight.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorFollowSpline.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorRotation.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorTexture.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CColladaMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CIrrMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="COBJMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CPLYMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CSTLMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CVideoModeList.h"> + <Filter>Irrlicht\video</Filter> + </ClInclude> + <ClInclude Include="CSoftwareDriver.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="CSoftwareTexture.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="CTRTextureGouraud.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="CZBuffer.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="ITriangleRenderer.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="IZBuffer.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="S2DVertex.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="COpenGLDriver.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLExtensionHandler.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLNormalMapRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLParallaxMapRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLShaderMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLSLMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLTexture.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="glext.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="wglext.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="CD3D8Driver.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8MaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8NormalMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8ParallaxMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8ShaderMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8Texture.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CColorConverter.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CFPSCounter.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CImage.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CNullDriver.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="IImagePresenter.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CImageWriterBMP.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterJPG.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPCX.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPNG.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPPM.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPSD.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterTGA.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderBMP.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderDDS.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderJPG.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPCX.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPNG.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPPM.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPSD.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderRGB.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderTGA.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderWAL.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CD3D9Driver.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9HLSLMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9MaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9NormalMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9ParallaxMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9ShaderMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9Texture.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CDepthBuffer.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CSoftware2MaterialRenderer.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CSoftwareDriver2.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CSoftwareTexture2.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="IBurningShader.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="IDepthBuffer.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="S4DVertex.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="SoftwareDriver2_compile_config.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="SoftwareDriver2_helper.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CLogger.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="COSOperator.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="CTimer.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="os.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="lzma\LzmaDec.h"> + <Filter>Irrlicht\irr\extern</Filter> + </ClInclude> + <ClInclude Include="lzma\Types.h"> + <Filter>Irrlicht\irr\extern</Filter> + </ClInclude> + <ClInclude Include="zlib\crc32.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\deflate.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\inffast.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\inffixed.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\inftrees.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\trees.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\zconf.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\zlib.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\zutil.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\cderror.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jconfig.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jdct.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jerror.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jinclude.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jmemsys.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jmorecfg.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jpegint.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jpeglib.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jversion.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="libpng\png.h"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClInclude> + <ClInclude Include="libpng\pngconf.h"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClInclude> + <ClInclude Include="aesGladman\aes.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\aesopt.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\fileenc.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\hmac.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\prng.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\pwd2key.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\sha1.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\sha2.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="bzip2\bzlib.h"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClInclude> + <ClInclude Include="bzip2\bzlib_private.h"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceConsole.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceFB.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceLinux.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceSDL.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceStub.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceWin32.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceWinCE.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CAttributeImpl.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CAttributes.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CFileList.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CFileSystem.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CLimitReadFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CMemoryFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CMountPointReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CNPKReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CPakReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CReadFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CTarReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CWADReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CWriteFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CXMLReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CXMLReaderImpl.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CXMLWriter.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CZipReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="IAttribute.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="BuiltInFont.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CDefaultGUIElementFactory.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIButton.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUICheckbox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIColorSelectDialog.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIComboBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIContextMenu.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEditBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEnvironment.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIFileOpenDialog.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIFont.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIImage.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIImageList.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIInOutFader.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIListBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIMenu.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIMeshViewer.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIMessageBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIModalScreen.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIScrollBar.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUISkin.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUISpinBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUISpriteBank.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIStaticText.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUITabControl.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUITable.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIToolBar.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUITreeView.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIWindow.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMeshMD3.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="resource.h" /> + <ClInclude Include="CSceneLoaderIrr.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneLoader.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="CSMFMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EDriverFeatures.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IRandomizer.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EMaterialFlags.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="CD3D9CgMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="COpenGLCgMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="CCgMaterialRenderer.h"> + <Filter>Irrlicht\video</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="..\..\changes.txt"> + <Filter>doc</Filter> + </None> + <None Include="..\..\readme.txt"> + <Filter>doc</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ClCompile Include="CDefaultSceneNodeAnimatorFactory.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CDefaultSceneNodeFactory.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CGeometryCreator.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CMeshCache.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CMeshManipulator.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CSceneManager.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="C3DSMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshHalfLife.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshMD2.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshMD3.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CB3DMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CBSPMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CColladaFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CCSMLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CDMFLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CIrrMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CLMTSMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CLWOMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMD2MeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMD3MeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMS3DMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMY3DMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="COBJMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="COCTLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="COgreMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CPLYMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CQ3LevelMesh.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CSkinnedMesh.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CSTLMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CXMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CBillboardSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CBoneSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CCameraSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CCubeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CDummyTransformationSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CEmptySceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CLightSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CMeshSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="COctreeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CQuake3ShaderSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CShadowVolumeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CSkyBoxSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CSkyDomeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CSphereSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CTerrainSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CTextSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CVolumeLightSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CWaterSurfaceSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CParticleAnimatedMeshSceneNodeEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleAttractionAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleBoxEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleCylinderEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleFadeOutAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleGravityAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleMeshEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticlePointEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleRingEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleRotationAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleScaleAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleSphereEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleSystemSceneNode.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CMetaTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="COctreeTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CSceneCollisionManager.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CTerrainTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CTriangleBBSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorCameraFPS.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorCameraMaya.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorCollisionResponse.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorDelete.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorFlyCircle.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorFlyStraight.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorFollowSpline.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorRotation.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorTexture.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CColladaMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CIrrMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="COBJMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CPLYMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CSTLMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CVideoModeList.cpp"> + <Filter>Irrlicht\video</Filter> + </ClCompile> + <ClCompile Include="CSoftwareDriver.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CSoftwareTexture.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRFlat.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRFlatWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRGouraud.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRGouraudWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureFlat.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureFlatWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraud.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAdd.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudNoZ.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CZBuffer.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="COpenGLDriver.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLExtensionHandler.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLNormalMapRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLParallaxMapRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLShaderMaterialRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLSLMaterialRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLTexture.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="CD3D8Driver.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8NormalMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8ParallaxMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8ShaderMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8Texture.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CColorConverter.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CFPSCounter.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CImage.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CNullDriver.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CImageWriterBMP.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterJPG.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPCX.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPNG.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPPM.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPSD.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterTGA.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderBMP.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderDDS.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderJPG.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPCX.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPNG.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPPM.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPSD.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderRGB.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderTGA.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderWAL.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CD3D9Driver.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9HLSLMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9NormalMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9ParallaxMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9ShaderMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9Texture.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CBurningShader_Raster_Reference.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CDepthBuffer.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CSoftwareDriver2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CSoftwareTexture2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRGouraud2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRGouraudAlpha2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRGouraudAlphaNoZ2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRNormalMap.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRStencilShadow.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureBlend.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureDetailMap2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraud2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAdd2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAddNoZ2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAlpha.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAlphaNoZ.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudNoZ2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudVertexAlpha2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_Add.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_M1.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_M2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_M4.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMapGouraud2_M4.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureWire2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="IBurningShader.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CLogger.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="COSOperator.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="Irrlicht.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="os.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="lzma\LzmaDec.c"> + <Filter>Irrlicht\irr\extern</Filter> + </ClCompile> + <ClCompile Include="zlib\adler32.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\compress.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\crc32.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\deflate.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\inffast.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\inflate.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\inftrees.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\trees.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\uncompr.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\zutil.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jaricom.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcapimin.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcapistd.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcarith.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jccoefct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jccolor.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcdctmgr.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jchuff.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcinit.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcmainct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcmarker.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcmaster.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcomapi.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcparam.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcprepct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcsample.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jctrans.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdapimin.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdapistd.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdarith.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdatadst.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdatasrc.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdcoefct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdcolor.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jddctmgr.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdhuff.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdinput.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmainct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmarker.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmaster.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmerge.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdpostct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdsample.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdtrans.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jerror.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jfdctflt.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jfdctfst.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jfdctint.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jidctflt.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jidctfst.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jidctint.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jmemmgr.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jmemnobs.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jquant1.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jquant2.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jutils.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="libpng\png.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngerror.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngget.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngmem.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngpread.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngread.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngrio.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngrtran.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngrutil.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngset.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngtrans.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwio.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwrite.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwtran.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwutil.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="aesGladman\aescrypt.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\aeskey.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\aestab.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\fileenc.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\hmac.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\prng.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\pwd2key.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\sha1.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\sha2.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="bzip2\blocksort.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\bzcompress.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\bzlib.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\crctable.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\decompress.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\huffman.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\randtable.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceConsole.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceFB.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceLinux.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceSDL.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceStub.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceWin32.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceWinCE.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CAttributes.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CFileList.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CFileSystem.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CLimitReadFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CMemoryFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CMountPointReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CNPKReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CPakReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CReadFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CTarReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CWADReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CWriteFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CXMLReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CXMLWriter.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CZipReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="irrXML.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CDefaultGUIElementFactory.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIButton.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUICheckbox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIColorSelectDialog.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIComboBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIContextMenu.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEditBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEnvironment.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIFileOpenDialog.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIFont.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIImage.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIImageList.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIInOutFader.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIListBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIMenu.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIMeshViewer.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIMessageBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIModalScreen.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIScrollBar.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUISkin.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUISpinBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUISpriteBank.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIStaticText.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUITabControl.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUITable.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIToolBar.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUITreeView.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIWindow.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CSceneLoaderIrr.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CSMFMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CD3D9CgMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="COpenGLCgMaterialRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="CCgMaterialRenderer.cpp"> + <Filter>Irrlicht\video</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Irrlicht.rc" /> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.sln b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.sln new file mode 100644 index 0000000..3a28918 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht11.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release - Fast FPU|Win32 = Release - Fast FPU|Win32 + Release - Fast FPU|x64 = Release - Fast FPU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Static lib - Debug|Win32 = Static lib - Debug|Win32 + Static lib - Debug|x64 = Static lib - Debug|x64 + Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 + Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64 + Static lib - Release|Win32 = Static lib - Release|Win32 + Static lib - Release|x64 = Static lib - Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj new file mode 100644 index 0000000..bd821ff --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj @@ -0,0 +1,1563 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release - Fast FPU|Win32"> + <Configuration>Release - Fast FPU</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release - Fast FPU|x64"> + <Configuration>Release - Fast FPU</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="SDL-Debug|Win32"> + <Configuration>SDL-Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="SDL-Debug|x64"> + <Configuration>SDL-Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Debug|Win32"> + <Configuration>Static lib - Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Debug|x64"> + <Configuration>Static lib - Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release - Fast FPU|Win32"> + <Configuration>Static lib - Release - Fast FPU</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release - Fast FPU|x64"> + <Configuration>Static lib - Release - Fast FPU</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release|Win32"> + <Configuration>Static lib - Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Static lib - Release|x64"> + <Configuration>Static lib - Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>Irrlicht</ProjectName> + <ProjectGuid>{E08E042A-6C45-411B-92BE-3CC31331019F}</ProjectGuid> + <RootNamespace>Irrlicht</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">..\..\lib\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">..\..\lib\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">obj\$(Configuration)64\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">..\..\lib\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">..\..\lib\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">obj\$(Configuration)64\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">..\..\lib\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">..\..\lib\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">obj\$(Configuration)64\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">true</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'" /> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);$(DXSDK_DIR)include;$(CG_INC_PATH)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\$(Configuration)64\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">$(DXSDK_DIR)include;$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);$(DXSDK_DIR)Lib\x86;$(CG_LIB_PATH)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'">$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'">$(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling>false</ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <StructMemberAlignment>Default</StructMemberAlignment> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>false</FunctionLevelLinking> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <OptimizeReferences>true</OptimizeReferences> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <SubSystem>Windows</SubSystem> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling>false</ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <StructMemberAlignment>Default</StructMemberAlignment> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>false</FunctionLevelLinking> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <OptimizeReferences>true</OptimizeReferences> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + <SubSystem>Windows</SubSystem> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win32-visualstudio\Irrlicht.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win64-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX64</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>false</IntrinsicFunctions> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win32-visualstudio\Irrlicht.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>false</IntrinsicFunctions> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win64-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX64</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CallingConvention>FastCall</CallingConvention> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win32-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX86</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static lib - Release - Fast FPU|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Release/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling> + </ExceptionHandling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <FloatingPointModel>Fast</FloatingPointModel> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + <CallingConvention>FastCall</CallingConvention> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <Lib> + <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\lib\Win64-visualstudio\Irrlicht.lib</OutputFile> + <TargetMachine>MachineX64</TargetMachine> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win32-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary> + <Version>1.8</Version> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TypeLibraryName>.\..\Debug/Irrlicht.tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\include;zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling> + </ExceptionHandling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + <ProjectReference> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>..\..\bin\Win64-visualstudio\Irrlicht.dll</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>libci.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>..\..\lib\Win64-visualstudio\Irrlicht.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClInclude Include="..\..\include\EDriverFeatures.h" /> + <ClInclude Include="..\..\include\EMaterialFlags.h" /> + <ClInclude Include="..\..\include\IAnimatedMeshMD3.h" /> + <ClInclude Include="..\..\include\IEventReceiver.h" /> + <ClInclude Include="..\..\include\ILogger.h" /> + <ClInclude Include="..\..\include\IOSOperator.h" /> + <ClInclude Include="..\..\include\IRandomizer.h" /> + <ClInclude Include="..\..\include\IReferenceCounted.h" /> + <ClInclude Include="..\..\include\IrrCompileConfig.h" /> + <ClInclude Include="..\..\include\irrlicht.h" /> + <ClInclude Include="..\..\include\IrrlichtDevice.h" /> + <ClInclude Include="..\..\include\irrTypes.h" /> + <ClInclude Include="..\..\include\ITimer.h" /> + <ClInclude Include="..\..\include\Keycodes.h" /> + <ClInclude Include="..\..\include\SIrrCreationParameters.h" /> + <ClInclude Include="..\..\include\SKeyMap.h" /> + <ClInclude Include="..\..\include\EDriverTypes.h" /> + <ClInclude Include="..\..\include\IGeometryCreator.h" /> + <ClInclude Include="..\..\include\IGPUProgrammingServices.h" /> + <ClInclude Include="..\..\include\IImage.h" /> + <ClInclude Include="..\..\include\IImageLoader.h" /> + <ClInclude Include="..\..\include\IMaterialRenderer.h" /> + <ClInclude Include="..\..\include\IMaterialRendererServices.h" /> + <ClInclude Include="..\..\include\IShaderConstantSetCallBack.h" /> + <ClInclude Include="..\..\include\ITexture.h" /> + <ClInclude Include="..\..\include\IVideoDriver.h" /> + <ClInclude Include="..\..\include\IVideoModeList.h" /> + <ClInclude Include="..\..\include\S3DVertex.h" /> + <ClInclude Include="..\..\include\SColor.h" /> + <ClInclude Include="..\..\include\SExposedVideoData.h" /> + <ClInclude Include="..\..\include\SLight.h" /> + <ClInclude Include="..\..\include\SMaterial.h" /> + <ClInclude Include="..\..\include\SMaterialLayer.h" /> + <ClInclude Include="..\..\include\aabbox3d.h" /> + <ClInclude Include="..\..\include\coreutil.h" /> + <ClInclude Include="..\..\include\dimension2d.h" /> + <ClInclude Include="..\..\include\heapsort.h" /> + <ClInclude Include="..\..\include\irrAllocator.h" /> + <ClInclude Include="..\..\include\irrArray.h" /> + <ClInclude Include="..\..\include\irrList.h" /> + <ClInclude Include="..\..\include\irrMap.h" /> + <ClInclude Include="..\..\include\irrMath.h" /> + <ClInclude Include="..\..\include\irrString.h" /> + <ClInclude Include="..\..\include\line2d.h" /> + <ClInclude Include="..\..\include\line3d.h" /> + <ClInclude Include="..\..\include\matrix4.h" /> + <ClInclude Include="..\..\include\plane3d.h" /> + <ClInclude Include="..\..\include\position2d.h" /> + <ClInclude Include="..\..\include\quaternion.h" /> + <ClInclude Include="..\..\include\rect.h" /> + <ClInclude Include="..\..\include\triangle3d.h" /> + <ClInclude Include="..\..\include\vector2d.h" /> + <ClInclude Include="..\..\include\vector3d.h" /> + <ClInclude Include="..\..\include\EAttributes.h" /> + <ClInclude Include="..\..\include\IAttributeExchangingObject.h" /> + <ClInclude Include="..\..\include\IAttributes.h" /> + <ClInclude Include="..\..\include\IFileList.h" /> + <ClInclude Include="..\..\include\IFileSystem.h" /> + <ClInclude Include="..\..\include\IReadFile.h" /> + <ClInclude Include="..\..\include\irrXML.h" /> + <ClInclude Include="..\..\include\IWriteFile.h" /> + <ClInclude Include="..\..\include\IXMLReader.h" /> + <ClInclude Include="..\..\include\IXMLWriter.h" /> + <ClInclude Include="..\..\include\path.h" /> + <ClInclude Include="..\..\include\CDynamicMeshBuffer.h" /> + <ClInclude Include="..\..\include\CIndexBuffer.h" /> + <ClInclude Include="..\..\include\CMeshBuffer.h" /> + <ClInclude Include="..\..\include\CVertexBuffer.h" /> + <ClInclude Include="..\..\include\ECullingTypes.h" /> + <ClInclude Include="..\..\include\EDebugSceneTypes.h" /> + <ClInclude Include="..\..\include\EMeshWriterEnums.h" /> + <ClInclude Include="..\..\include\EPrimitiveTypes.h" /> + <ClInclude Include="..\..\include\ESceneNodeAnimatorTypes.h" /> + <ClInclude Include="..\..\include\ESceneNodeTypes.h" /> + <ClInclude Include="..\..\include\IAnimatedMesh.h" /> + <ClInclude Include="..\..\include\IAnimatedMeshMD2.h" /> + <ClInclude Include="..\..\include\IAnimatedMeshSceneNode.h" /> + <ClInclude Include="..\..\include\IBillboardSceneNode.h" /> + <ClInclude Include="..\..\include\ICameraSceneNode.h" /> + <ClInclude Include="..\..\include\IDummyTransformationSceneNode.h" /> + <ClInclude Include="..\..\include\ILightSceneNode.h" /> + <ClInclude Include="..\..\include\IMesh.h" /> + <ClInclude Include="..\..\include\IMeshBuffer.h" /> + <ClInclude Include="..\..\include\IMeshCache.h" /> + <ClInclude Include="..\..\include\IMeshLoader.h" /> + <ClInclude Include="..\..\include\IMeshManipulator.h" /> + <ClInclude Include="..\..\include\IMeshSceneNode.h" /> + <ClInclude Include="..\..\include\IMeshWriter.h" /> + <ClInclude Include="..\..\include\IMetaTriangleSelector.h" /> + <ClInclude Include="..\..\include\IParticleAffector.h" /> + <ClInclude Include="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h" /> + <ClInclude Include="..\..\include\IParticleAttractionAffector.h" /> + <ClInclude Include="..\..\include\IParticleBoxEmitter.h" /> + <ClInclude Include="..\..\include\IParticleCylinderEmitter.h" /> + <ClInclude Include="..\..\include\IParticleEmitter.h" /> + <ClInclude Include="..\..\include\IParticleFadeOutAffector.h" /> + <ClInclude Include="..\..\include\IParticleGravityAffector.h" /> + <ClInclude Include="..\..\include\IParticleMeshEmitter.h" /> + <ClInclude Include="..\..\include\IParticleRingEmitter.h" /> + <ClInclude Include="..\..\include\IParticleRotationAffector.h" /> + <ClInclude Include="..\..\include\IParticleSphereEmitter.h" /> + <ClInclude Include="..\..\include\IParticleSystemSceneNode.h" /> + <ClInclude Include="..\..\include\IQ3LevelMesh.h" /> + <ClInclude Include="..\..\include\IQ3Shader.h" /> + <ClInclude Include="..\..\include\ISceneCollisionManager.h" /> + <ClInclude Include="..\..\include\ISceneManager.h" /> + <ClInclude Include="..\..\include\ISceneLoader.h" /> + <ClInclude Include="..\..\include\ISceneNode.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimator.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraFPS.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraMaya.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCollisionResponse.h" /> + <ClInclude Include="..\..\include\ISceneNodeAnimatorFactory.h" /> + <ClInclude Include="..\..\include\ISceneNodeFactory.h" /> + <ClInclude Include="..\..\include\IShadowVolumeSceneNode.h" /> + <ClInclude Include="..\..\include\ISkinnedMesh.h" /> + <ClInclude Include="..\..\include\ITerrainSceneNode.h" /> + <ClInclude Include="..\..\include\ITextSceneNode.h" /> + <ClInclude Include="..\..\include\ITriangleSelector.h" /> + <ClInclude Include="..\..\include\IVolumeLightSceneNode.h" /> + <ClInclude Include="..\..\include\SAnimatedMesh.h" /> + <ClInclude Include="..\..\include\SceneParameters.h" /> + <ClInclude Include="..\..\include\SMesh.h" /> + <ClInclude Include="..\..\include\SMeshBuffer.h" /> + <ClInclude Include="..\..\include\SMeshBufferLightMap.h" /> + <ClInclude Include="..\..\include\SMeshBufferTangents.h" /> + <ClInclude Include="..\..\include\SParticle.h" /> + <ClInclude Include="..\..\include\SSkinMeshBuffer.h" /> + <ClInclude Include="..\..\include\SViewFrustum.h" /> + <ClInclude Include="..\..\include\EGUIAlignment.h" /> + <ClInclude Include="..\..\include\EGUIElementTypes.h" /> + <ClInclude Include="..\..\include\EMessageBoxFlags.h" /> + <ClInclude Include="..\..\include\ICursorControl.h" /> + <ClInclude Include="..\..\include\IGUIButton.h" /> + <ClInclude Include="..\..\include\IGUICheckbox.h" /> + <ClInclude Include="..\..\include\IGUIComboBox.h" /> + <ClInclude Include="..\..\include\IGUIContextMenu.h" /> + <ClInclude Include="..\..\include\IGUIEditBox.h" /> + <ClInclude Include="..\..\include\IGUIElement.h" /> + <ClInclude Include="..\..\include\IGUIElementFactory.h" /> + <ClInclude Include="..\..\include\IGUIEnvironment.h" /> + <ClInclude Include="..\..\include\IGUIFileOpenDialog.h" /> + <ClInclude Include="..\..\include\IGUIFont.h" /> + <ClInclude Include="..\..\include\IGUIImage.h" /> + <ClInclude Include="..\..\include\IGUIImageList.h" /> + <ClInclude Include="..\..\include\IGUIInOutFader.h" /> + <ClInclude Include="..\..\include\IGUIListBox.h" /> + <ClInclude Include="..\..\include\IGUIMeshViewer.h" /> + <ClInclude Include="..\..\include\IGUIScrollBar.h" /> + <ClInclude Include="..\..\include\IGUISkin.h" /> + <ClInclude Include="..\..\include\IGUISpinBox.h" /> + <ClInclude Include="..\..\include\IGUISpriteBank.h" /> + <ClInclude Include="..\..\include\IGUIStaticText.h" /> + <ClInclude Include="..\..\include\IGUITabControl.h" /> + <ClInclude Include="..\..\include\IGUIToolbar.h" /> + <ClInclude Include="..\..\include\IGUITreeView.h" /> + <ClInclude Include="..\..\include\IGUIWindow.h" /> + <ClInclude Include="CCgMaterialRenderer.h" /> + <ClInclude Include="CD3D9CgMaterialRenderer.h" /> + <ClInclude Include="CDefaultSceneNodeAnimatorFactory.h" /> + <ClInclude Include="CDefaultSceneNodeFactory.h" /> + <ClInclude Include="CGeometryCreator.h" /> + <ClInclude Include="CMeshCache.h" /> + <ClInclude Include="CMeshManipulator.h" /> + <ClInclude Include="COpenGLCgMaterialRenderer.h" /> + <ClInclude Include="CSceneManager.h" /> + <ClInclude Include="Octree.h" /> + <ClInclude Include="CSMFMeshFileLoader.h" /> + <ClInclude Include="C3DSMeshFileLoader.h" /> + <ClInclude Include="CAnimatedMeshHalfLife.h" /> + <ClInclude Include="CAnimatedMeshMD2.h" /> + <ClInclude Include="CAnimatedMeshMD3.h" /> + <ClInclude Include="CB3DMeshFileLoader.h" /> + <ClInclude Include="CBSPMeshFileLoader.h" /> + <ClInclude Include="CColladaFileLoader.h" /> + <ClInclude Include="CCSMLoader.h" /> + <ClInclude Include="CDMFLoader.h" /> + <ClInclude Include="CIrrMeshFileLoader.h" /> + <ClInclude Include="CLMTSMeshFileLoader.h" /> + <ClInclude Include="CLWOMeshFileLoader.h" /> + <ClInclude Include="CMD2MeshFileLoader.h" /> + <ClInclude Include="CMD3MeshFileLoader.h" /> + <ClInclude Include="CMS3DMeshFileLoader.h" /> + <ClInclude Include="CMY3DHelper.h" /> + <ClInclude Include="CMY3DMeshFileLoader.h" /> + <ClInclude Include="COBJMeshFileLoader.h" /> + <ClInclude Include="COCTLoader.h" /> + <ClInclude Include="COgreMeshFileLoader.h" /> + <ClInclude Include="CPLYMeshFileLoader.h" /> + <ClInclude Include="CQ3LevelMesh.h" /> + <ClInclude Include="CSkinnedMesh.h" /> + <ClInclude Include="CSTLMeshFileLoader.h" /> + <ClInclude Include="CXMeshFileLoader.h" /> + <ClInclude Include="dmfsupport.h" /> + <ClInclude Include="CAnimatedMeshSceneNode.h" /> + <ClInclude Include="CBillboardSceneNode.h" /> + <ClInclude Include="CBoneSceneNode.h" /> + <ClInclude Include="CCameraSceneNode.h" /> + <ClInclude Include="CCubeSceneNode.h" /> + <ClInclude Include="CDummyTransformationSceneNode.h" /> + <ClInclude Include="CEmptySceneNode.h" /> + <ClInclude Include="CLightSceneNode.h" /> + <ClInclude Include="CMeshSceneNode.h" /> + <ClInclude Include="COctreeSceneNode.h" /> + <ClInclude Include="CQuake3ShaderSceneNode.h" /> + <ClInclude Include="CShadowVolumeSceneNode.h" /> + <ClInclude Include="CSkyBoxSceneNode.h" /> + <ClInclude Include="CSkyDomeSceneNode.h" /> + <ClInclude Include="CSphereSceneNode.h" /> + <ClInclude Include="CTerrainSceneNode.h" /> + <ClInclude Include="CTextSceneNode.h" /> + <ClInclude Include="CVolumeLightSceneNode.h" /> + <ClInclude Include="CWaterSurfaceSceneNode.h" /> + <ClInclude Include="CParticleAnimatedMeshSceneNodeEmitter.h" /> + <ClInclude Include="CParticleAttractionAffector.h" /> + <ClInclude Include="CParticleBoxEmitter.h" /> + <ClInclude Include="CParticleCylinderEmitter.h" /> + <ClInclude Include="CParticleFadeOutAffector.h" /> + <ClInclude Include="CParticleGravityAffector.h" /> + <ClInclude Include="CParticleMeshEmitter.h" /> + <ClInclude Include="CParticlePointEmitter.h" /> + <ClInclude Include="CParticleRingEmitter.h" /> + <ClInclude Include="CParticleRotationAffector.h" /> + <ClInclude Include="CParticleScaleAffector.h" /> + <ClInclude Include="CParticleSphereEmitter.h" /> + <ClInclude Include="CParticleSystemSceneNode.h" /> + <ClInclude Include="CMetaTriangleSelector.h" /> + <ClInclude Include="COctreeTriangleSelector.h" /> + <ClInclude Include="CSceneCollisionManager.h" /> + <ClInclude Include="CTerrainTriangleSelector.h" /> + <ClInclude Include="CTriangleBBSelector.h" /> + <ClInclude Include="CTriangleSelector.h" /> + <ClInclude Include="CSceneLoaderIrr.h" /> + <ClInclude Include="CSceneNodeAnimatorCameraFPS.h" /> + <ClInclude Include="CSceneNodeAnimatorCameraMaya.h" /> + <ClInclude Include="CSceneNodeAnimatorCollisionResponse.h" /> + <ClInclude Include="CSceneNodeAnimatorDelete.h" /> + <ClInclude Include="CSceneNodeAnimatorFlyCircle.h" /> + <ClInclude Include="CSceneNodeAnimatorFlyStraight.h" /> + <ClInclude Include="CSceneNodeAnimatorFollowSpline.h" /> + <ClInclude Include="CSceneNodeAnimatorRotation.h" /> + <ClInclude Include="CSceneNodeAnimatorTexture.h" /> + <ClInclude Include="CColladaMeshWriter.h" /> + <ClInclude Include="CIrrMeshWriter.h" /> + <ClInclude Include="COBJMeshWriter.h" /> + <ClInclude Include="CPLYMeshWriter.h" /> + <ClInclude Include="CSTLMeshWriter.h" /> + <ClInclude Include="CVideoModeList.h" /> + <ClInclude Include="CSoftwareDriver.h" /> + <ClInclude Include="CSoftwareTexture.h" /> + <ClInclude Include="CTRTextureGouraud.h" /> + <ClInclude Include="CZBuffer.h" /> + <ClInclude Include="ITriangleRenderer.h" /> + <ClInclude Include="IZBuffer.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="S2DVertex.h" /> + <ClInclude Include="COpenGLDriver.h" /> + <ClInclude Include="COpenGLExtensionHandler.h" /> + <ClInclude Include="COpenGLMaterialRenderer.h" /> + <ClInclude Include="COpenGLNormalMapRenderer.h" /> + <ClInclude Include="COpenGLParallaxMapRenderer.h" /> + <ClInclude Include="COpenGLShaderMaterialRenderer.h" /> + <ClInclude Include="COpenGLSLMaterialRenderer.h" /> + <ClInclude Include="COpenGLTexture.h" /> + <ClInclude Include="glext.h" /> + <ClInclude Include="wglext.h" /> + <ClInclude Include="CD3D8Driver.h" /> + <ClInclude Include="CD3D8MaterialRenderer.h" /> + <ClInclude Include="CD3D8NormalMapRenderer.h" /> + <ClInclude Include="CD3D8ParallaxMapRenderer.h" /> + <ClInclude Include="CD3D8ShaderMaterialRenderer.h" /> + <ClInclude Include="CD3D8Texture.h" /> + <ClInclude Include="CColorConverter.h" /> + <ClInclude Include="CFPSCounter.h" /> + <ClInclude Include="CImage.h" /> + <ClInclude Include="CNullDriver.h" /> + <ClInclude Include="IImagePresenter.h" /> + <ClInclude Include="CImageWriterBMP.h" /> + <ClInclude Include="CImageWriterJPG.h" /> + <ClInclude Include="CImageWriterPCX.h" /> + <ClInclude Include="CImageWriterPNG.h" /> + <ClInclude Include="CImageWriterPPM.h" /> + <ClInclude Include="CImageWriterPSD.h" /> + <ClInclude Include="CImageWriterTGA.h" /> + <ClInclude Include="CImageLoaderBMP.h" /> + <ClInclude Include="CImageLoaderDDS.h" /> + <ClInclude Include="CImageLoaderJPG.h" /> + <ClInclude Include="CImageLoaderPCX.h" /> + <ClInclude Include="CImageLoaderPNG.h" /> + <ClInclude Include="CImageLoaderPPM.h" /> + <ClInclude Include="CImageLoaderPSD.h" /> + <ClInclude Include="CImageLoaderRGB.h" /> + <ClInclude Include="CImageLoaderTGA.h" /> + <ClInclude Include="CImageLoaderWAL.h" /> + <ClInclude Include="CD3D9Driver.h" /> + <ClInclude Include="CD3D9HLSLMaterialRenderer.h" /> + <ClInclude Include="CD3D9MaterialRenderer.h" /> + <ClInclude Include="CD3D9NormalMapRenderer.h" /> + <ClInclude Include="CD3D9ParallaxMapRenderer.h" /> + <ClInclude Include="CD3D9ShaderMaterialRenderer.h" /> + <ClInclude Include="CD3D9Texture.h" /> + <ClInclude Include="CDepthBuffer.h" /> + <ClInclude Include="CSoftware2MaterialRenderer.h" /> + <ClInclude Include="CSoftwareDriver2.h" /> + <ClInclude Include="CSoftwareTexture2.h" /> + <ClInclude Include="IBurningShader.h" /> + <ClInclude Include="IDepthBuffer.h" /> + <ClInclude Include="S4DVertex.h" /> + <ClInclude Include="SoftwareDriver2_compile_config.h" /> + <ClInclude Include="SoftwareDriver2_helper.h" /> + <ClInclude Include="CLogger.h" /> + <ClInclude Include="COSOperator.h" /> + <ClInclude Include="CTimer.h" /> + <ClInclude Include="os.h" /> + <ClInclude Include="lzma\LzmaDec.h" /> + <ClInclude Include="lzma\Types.h" /> + <ClInclude Include="zlib\crc32.h" /> + <ClInclude Include="zlib\deflate.h" /> + <ClInclude Include="zlib\inffast.h" /> + <ClInclude Include="zlib\inffixed.h" /> + <ClInclude Include="zlib\inftrees.h" /> + <ClInclude Include="zlib\trees.h" /> + <ClInclude Include="zlib\zconf.h" /> + <ClInclude Include="zlib\zlib.h" /> + <ClInclude Include="zlib\zutil.h" /> + <ClInclude Include="jpeglib\cderror.h" /> + <ClInclude Include="jpeglib\jconfig.h" /> + <ClInclude Include="jpeglib\jdct.h" /> + <ClInclude Include="jpeglib\jerror.h" /> + <ClInclude Include="jpeglib\jinclude.h" /> + <ClInclude Include="jpeglib\jmemsys.h" /> + <ClInclude Include="jpeglib\jmorecfg.h" /> + <ClInclude Include="jpeglib\jpegint.h" /> + <ClInclude Include="jpeglib\jpeglib.h" /> + <ClInclude Include="jpeglib\jversion.h" /> + <ClInclude Include="libpng\png.h" /> + <ClInclude Include="libpng\pngconf.h" /> + <ClInclude Include="aesGladman\aes.h" /> + <ClInclude Include="aesGladman\aesopt.h" /> + <ClInclude Include="aesGladman\fileenc.h" /> + <ClInclude Include="aesGladman\hmac.h" /> + <ClInclude Include="aesGladman\prng.h" /> + <ClInclude Include="aesGladman\pwd2key.h" /> + <ClInclude Include="aesGladman\sha1.h" /> + <ClInclude Include="aesGladman\sha2.h" /> + <ClInclude Include="bzip2\bzlib.h" /> + <ClInclude Include="bzip2\bzlib_private.h" /> + <ClInclude Include="CIrrDeviceConsole.h" /> + <ClInclude Include="CIrrDeviceFB.h" /> + <ClInclude Include="CIrrDeviceLinux.h" /> + <ClInclude Include="CIrrDeviceSDL.h" /> + <ClInclude Include="CIrrDeviceStub.h" /> + <ClInclude Include="CIrrDeviceWin32.h" /> + <ClInclude Include="CIrrDeviceWinCE.h" /> + <ClInclude Include="CAttributeImpl.h" /> + <ClInclude Include="CAttributes.h" /> + <ClInclude Include="CFileList.h" /> + <ClInclude Include="CFileSystem.h" /> + <ClInclude Include="CLimitReadFile.h" /> + <ClInclude Include="CMemoryFile.h" /> + <ClInclude Include="CMountPointReader.h" /> + <ClInclude Include="CNPKReader.h" /> + <ClInclude Include="CPakReader.h" /> + <ClInclude Include="CReadFile.h" /> + <ClInclude Include="CTarReader.h" /> + <ClInclude Include="CWADReader.h" /> + <ClInclude Include="CWriteFile.h" /> + <ClInclude Include="CXMLReader.h" /> + <ClInclude Include="CXMLReaderImpl.h" /> + <ClInclude Include="CXMLWriter.h" /> + <ClInclude Include="CZipReader.h" /> + <ClInclude Include="IAttribute.h" /> + <ClInclude Include="BuiltInFont.h" /> + <ClInclude Include="CDefaultGUIElementFactory.h" /> + <ClInclude Include="CGUIButton.h" /> + <ClInclude Include="CGUICheckbox.h" /> + <ClInclude Include="CGUIColorSelectDialog.h" /> + <ClInclude Include="CGUIComboBox.h" /> + <ClInclude Include="CGUIContextMenu.h" /> + <ClInclude Include="CGUIEditBox.h" /> + <ClInclude Include="CGUIEnvironment.h" /> + <ClInclude Include="CGUIFileOpenDialog.h" /> + <ClInclude Include="CGUIFont.h" /> + <ClInclude Include="CGUIImage.h" /> + <ClInclude Include="CGUIImageList.h" /> + <ClInclude Include="CGUIInOutFader.h" /> + <ClInclude Include="CGUIListBox.h" /> + <ClInclude Include="CGUIMenu.h" /> + <ClInclude Include="CGUIMeshViewer.h" /> + <ClInclude Include="CGUIMessageBox.h" /> + <ClInclude Include="CGUIModalScreen.h" /> + <ClInclude Include="CGUIScrollBar.h" /> + <ClInclude Include="CGUISkin.h" /> + <ClInclude Include="CGUISpinBox.h" /> + <ClInclude Include="CGUISpriteBank.h" /> + <ClInclude Include="CGUIStaticText.h" /> + <ClInclude Include="CGUITabControl.h" /> + <ClInclude Include="CGUITable.h" /> + <ClInclude Include="CGUIToolBar.h" /> + <ClInclude Include="CGUITreeView.h" /> + <ClInclude Include="CGUIWindow.h" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\changes.txt" /> + <None Include="..\..\readme.txt" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="CCgMaterialRenderer.cpp" /> + <ClCompile Include="CD3D9CgMaterialRenderer.cpp" /> + <ClCompile Include="CDefaultSceneNodeAnimatorFactory.cpp" /> + <ClCompile Include="CDefaultSceneNodeFactory.cpp" /> + <ClCompile Include="CGeometryCreator.cpp" /> + <ClCompile Include="CMeshCache.cpp" /> + <ClCompile Include="CMeshManipulator.cpp" /> + <ClCompile Include="COpenGLCgMaterialRenderer.cpp" /> + <ClCompile Include="CSceneManager.cpp" /> + <ClCompile Include="C3DSMeshFileLoader.cpp" /> + <ClCompile Include="CSMFMeshFileLoader.cpp" /> + <ClCompile Include="CAnimatedMeshHalfLife.cpp" /> + <ClCompile Include="CAnimatedMeshMD2.cpp" /> + <ClCompile Include="CAnimatedMeshMD3.cpp" /> + <ClCompile Include="CB3DMeshFileLoader.cpp" /> + <ClCompile Include="CBSPMeshFileLoader.cpp" /> + <ClCompile Include="CColladaFileLoader.cpp" /> + <ClCompile Include="CCSMLoader.cpp" /> + <ClCompile Include="CDMFLoader.cpp" /> + <ClCompile Include="CIrrMeshFileLoader.cpp" /> + <ClCompile Include="CLMTSMeshFileLoader.cpp" /> + <ClCompile Include="CLWOMeshFileLoader.cpp" /> + <ClCompile Include="CMD2MeshFileLoader.cpp" /> + <ClCompile Include="CMD3MeshFileLoader.cpp" /> + <ClCompile Include="CMS3DMeshFileLoader.cpp" /> + <ClCompile Include="CMY3DMeshFileLoader.cpp" /> + <ClCompile Include="COBJMeshFileLoader.cpp" /> + <ClCompile Include="COCTLoader.cpp" /> + <ClCompile Include="COgreMeshFileLoader.cpp" /> + <ClCompile Include="CPLYMeshFileLoader.cpp" /> + <ClCompile Include="CQ3LevelMesh.cpp" /> + <ClCompile Include="CSkinnedMesh.cpp" /> + <ClCompile Include="CSTLMeshFileLoader.cpp" /> + <ClCompile Include="CXMeshFileLoader.cpp" /> + <ClCompile Include="CAnimatedMeshSceneNode.cpp" /> + <ClCompile Include="CBillboardSceneNode.cpp" /> + <ClCompile Include="CBoneSceneNode.cpp" /> + <ClCompile Include="CCameraSceneNode.cpp" /> + <ClCompile Include="CCubeSceneNode.cpp" /> + <ClCompile Include="CDummyTransformationSceneNode.cpp" /> + <ClCompile Include="CEmptySceneNode.cpp" /> + <ClCompile Include="CLightSceneNode.cpp" /> + <ClCompile Include="CMeshSceneNode.cpp" /> + <ClCompile Include="COctreeSceneNode.cpp" /> + <ClCompile Include="CQuake3ShaderSceneNode.cpp" /> + <ClCompile Include="CShadowVolumeSceneNode.cpp" /> + <ClCompile Include="CSkyBoxSceneNode.cpp" /> + <ClCompile Include="CSkyDomeSceneNode.cpp" /> + <ClCompile Include="CSphereSceneNode.cpp" /> + <ClCompile Include="CTerrainSceneNode.cpp" /> + <ClCompile Include="CTextSceneNode.cpp" /> + <ClCompile Include="CVolumeLightSceneNode.cpp" /> + <ClCompile Include="CWaterSurfaceSceneNode.cpp" /> + <ClCompile Include="CParticleAnimatedMeshSceneNodeEmitter.cpp" /> + <ClCompile Include="CParticleAttractionAffector.cpp" /> + <ClCompile Include="CParticleBoxEmitter.cpp" /> + <ClCompile Include="CParticleCylinderEmitter.cpp" /> + <ClCompile Include="CParticleFadeOutAffector.cpp" /> + <ClCompile Include="CParticleGravityAffector.cpp" /> + <ClCompile Include="CParticleMeshEmitter.cpp" /> + <ClCompile Include="CParticlePointEmitter.cpp" /> + <ClCompile Include="CParticleRingEmitter.cpp" /> + <ClCompile Include="CParticleRotationAffector.cpp" /> + <ClCompile Include="CParticleScaleAffector.cpp" /> + <ClCompile Include="CParticleSphereEmitter.cpp" /> + <ClCompile Include="CParticleSystemSceneNode.cpp" /> + <ClCompile Include="CMetaTriangleSelector.cpp" /> + <ClCompile Include="COctreeTriangleSelector.cpp" /> + <ClCompile Include="CSceneCollisionManager.cpp" /> + <ClCompile Include="CTerrainTriangleSelector.cpp" /> + <ClCompile Include="CTriangleBBSelector.cpp" /> + <ClCompile Include="CTriangleSelector.cpp" /> + <ClCompile Include="CSceneLoaderIrr.cpp" /> + <ClCompile Include="CSceneNodeAnimatorCameraFPS.cpp" /> + <ClCompile Include="CSceneNodeAnimatorCameraMaya.cpp" /> + <ClCompile Include="CSceneNodeAnimatorCollisionResponse.cpp" /> + <ClCompile Include="CSceneNodeAnimatorDelete.cpp" /> + <ClCompile Include="CSceneNodeAnimatorFlyCircle.cpp" /> + <ClCompile Include="CSceneNodeAnimatorFlyStraight.cpp" /> + <ClCompile Include="CSceneNodeAnimatorFollowSpline.cpp" /> + <ClCompile Include="CSceneNodeAnimatorRotation.cpp" /> + <ClCompile Include="CSceneNodeAnimatorTexture.cpp" /> + <ClCompile Include="CColladaMeshWriter.cpp" /> + <ClCompile Include="CIrrMeshWriter.cpp" /> + <ClCompile Include="COBJMeshWriter.cpp" /> + <ClCompile Include="CPLYMeshWriter.cpp" /> + <ClCompile Include="CSTLMeshWriter.cpp" /> + <ClCompile Include="CVideoModeList.cpp" /> + <ClCompile Include="CSoftwareDriver.cpp" /> + <ClCompile Include="CSoftwareTexture.cpp" /> + <ClCompile Include="CTRFlat.cpp" /> + <ClCompile Include="CTRFlatWire.cpp" /> + <ClCompile Include="CTRGouraud.cpp" /> + <ClCompile Include="CTRGouraudWire.cpp" /> + <ClCompile Include="CTRTextureFlat.cpp" /> + <ClCompile Include="CTRTextureFlatWire.cpp" /> + <ClCompile Include="CTRTextureGouraud.cpp" /> + <ClCompile Include="CTRTextureGouraudAdd.cpp" /> + <ClCompile Include="CTRTextureGouraudNoZ.cpp" /> + <ClCompile Include="CTRTextureGouraudWire.cpp" /> + <ClCompile Include="CZBuffer.cpp" /> + <ClCompile Include="COpenGLDriver.cpp" /> + <ClCompile Include="COpenGLExtensionHandler.cpp" /> + <ClCompile Include="COpenGLNormalMapRenderer.cpp" /> + <ClCompile Include="COpenGLParallaxMapRenderer.cpp" /> + <ClCompile Include="COpenGLShaderMaterialRenderer.cpp" /> + <ClCompile Include="COpenGLSLMaterialRenderer.cpp" /> + <ClCompile Include="COpenGLTexture.cpp" /> + <ClCompile Include="CD3D8Driver.cpp" /> + <ClCompile Include="CD3D8NormalMapRenderer.cpp" /> + <ClCompile Include="CD3D8ParallaxMapRenderer.cpp" /> + <ClCompile Include="CD3D8ShaderMaterialRenderer.cpp" /> + <ClCompile Include="CD3D8Texture.cpp" /> + <ClCompile Include="CColorConverter.cpp" /> + <ClCompile Include="CFPSCounter.cpp" /> + <ClCompile Include="CImage.cpp" /> + <ClCompile Include="CNullDriver.cpp" /> + <ClCompile Include="CImageWriterBMP.cpp" /> + <ClCompile Include="CImageWriterJPG.cpp" /> + <ClCompile Include="CImageWriterPCX.cpp" /> + <ClCompile Include="CImageWriterPNG.cpp" /> + <ClCompile Include="CImageWriterPPM.cpp" /> + <ClCompile Include="CImageWriterPSD.cpp" /> + <ClCompile Include="CImageWriterTGA.cpp" /> + <ClCompile Include="CImageLoaderBMP.cpp" /> + <ClCompile Include="CImageLoaderDDS.cpp" /> + <ClCompile Include="CImageLoaderJPG.cpp" /> + <ClCompile Include="CImageLoaderPCX.cpp" /> + <ClCompile Include="CImageLoaderPNG.cpp" /> + <ClCompile Include="CImageLoaderPPM.cpp" /> + <ClCompile Include="CImageLoaderPSD.cpp" /> + <ClCompile Include="CImageLoaderRGB.cpp" /> + <ClCompile Include="CImageLoaderTGA.cpp" /> + <ClCompile Include="CImageLoaderWAL.cpp" /> + <ClCompile Include="CD3D9Driver.cpp" /> + <ClCompile Include="CD3D9HLSLMaterialRenderer.cpp" /> + <ClCompile Include="CD3D9NormalMapRenderer.cpp" /> + <ClCompile Include="CD3D9ParallaxMapRenderer.cpp" /> + <ClCompile Include="CD3D9ShaderMaterialRenderer.cpp" /> + <ClCompile Include="CD3D9Texture.cpp" /> + <ClCompile Include="CBurningShader_Raster_Reference.cpp" /> + <ClCompile Include="CDepthBuffer.cpp" /> + <ClCompile Include="CSoftwareDriver2.cpp" /> + <ClCompile Include="CSoftwareTexture2.cpp" /> + <ClCompile Include="CTRGouraud2.cpp" /> + <ClCompile Include="CTRGouraudAlpha2.cpp" /> + <ClCompile Include="CTRGouraudAlphaNoZ2.cpp" /> + <ClCompile Include="CTRNormalMap.cpp" /> + <ClCompile Include="CTRStencilShadow.cpp" /> + <ClCompile Include="CTRTextureBlend.cpp" /> + <ClCompile Include="CTRTextureDetailMap2.cpp" /> + <ClCompile Include="CTRTextureGouraud2.cpp" /> + <ClCompile Include="CTRTextureGouraudAdd2.cpp" /> + <ClCompile Include="CTRTextureGouraudAddNoZ2.cpp" /> + <ClCompile Include="CTRTextureGouraudAlpha.cpp" /> + <ClCompile Include="CTRTextureGouraudAlphaNoZ.cpp" /> + <ClCompile Include="CTRTextureGouraudNoZ2.cpp" /> + <ClCompile Include="CTRTextureGouraudVertexAlpha2.cpp" /> + <ClCompile Include="CTRTextureLightMap2_Add.cpp" /> + <ClCompile Include="CTRTextureLightMap2_M1.cpp" /> + <ClCompile Include="CTRTextureLightMap2_M2.cpp" /> + <ClCompile Include="CTRTextureLightMap2_M4.cpp" /> + <ClCompile Include="CTRTextureLightMapGouraud2_M4.cpp" /> + <ClCompile Include="CTRTextureWire2.cpp" /> + <ClCompile Include="IBurningShader.cpp" /> + <ClCompile Include="CLogger.cpp" /> + <ClCompile Include="COSOperator.cpp" /> + <ClCompile Include="Irrlicht.cpp" /> + <ClCompile Include="os.cpp" /> + <ClCompile Include="lzma\LzmaDec.c" /> + <ClCompile Include="zlib\adler32.c" /> + <ClCompile Include="zlib\compress.c" /> + <ClCompile Include="zlib\crc32.c" /> + <ClCompile Include="zlib\deflate.c" /> + <ClCompile Include="zlib\inffast.c" /> + <ClCompile Include="zlib\inflate.c" /> + <ClCompile Include="zlib\inftrees.c" /> + <ClCompile Include="zlib\trees.c" /> + <ClCompile Include="zlib\uncompr.c" /> + <ClCompile Include="zlib\zutil.c" /> + <ClCompile Include="jpeglib\jaricom.c" /> + <ClCompile Include="jpeglib\jcapimin.c" /> + <ClCompile Include="jpeglib\jcapistd.c" /> + <ClCompile Include="jpeglib\jcarith.c" /> + <ClCompile Include="jpeglib\jccoefct.c" /> + <ClCompile Include="jpeglib\jccolor.c" /> + <ClCompile Include="jpeglib\jcdctmgr.c" /> + <ClCompile Include="jpeglib\jchuff.c" /> + <ClCompile Include="jpeglib\jcinit.c" /> + <ClCompile Include="jpeglib\jcmainct.c" /> + <ClCompile Include="jpeglib\jcmarker.c" /> + <ClCompile Include="jpeglib\jcmaster.c" /> + <ClCompile Include="jpeglib\jcomapi.c" /> + <ClCompile Include="jpeglib\jcparam.c" /> + <ClCompile Include="jpeglib\jcprepct.c" /> + <ClCompile Include="jpeglib\jcsample.c" /> + <ClCompile Include="jpeglib\jctrans.c" /> + <ClCompile Include="jpeglib\jdapimin.c" /> + <ClCompile Include="jpeglib\jdapistd.c" /> + <ClCompile Include="jpeglib\jdarith.c" /> + <ClCompile Include="jpeglib\jdatadst.c" /> + <ClCompile Include="jpeglib\jdatasrc.c" /> + <ClCompile Include="jpeglib\jdcoefct.c" /> + <ClCompile Include="jpeglib\jdcolor.c" /> + <ClCompile Include="jpeglib\jddctmgr.c" /> + <ClCompile Include="jpeglib\jdhuff.c" /> + <ClCompile Include="jpeglib\jdinput.c" /> + <ClCompile Include="jpeglib\jdmainct.c" /> + <ClCompile Include="jpeglib\jdmarker.c" /> + <ClCompile Include="jpeglib\jdmaster.c" /> + <ClCompile Include="jpeglib\jdmerge.c" /> + <ClCompile Include="jpeglib\jdpostct.c" /> + <ClCompile Include="jpeglib\jdsample.c" /> + <ClCompile Include="jpeglib\jdtrans.c" /> + <ClCompile Include="jpeglib\jerror.c" /> + <ClCompile Include="jpeglib\jfdctflt.c" /> + <ClCompile Include="jpeglib\jfdctfst.c" /> + <ClCompile Include="jpeglib\jfdctint.c" /> + <ClCompile Include="jpeglib\jidctflt.c" /> + <ClCompile Include="jpeglib\jidctfst.c" /> + <ClCompile Include="jpeglib\jidctint.c" /> + <ClCompile Include="jpeglib\jmemmgr.c" /> + <ClCompile Include="jpeglib\jmemnobs.c" /> + <ClCompile Include="jpeglib\jquant1.c" /> + <ClCompile Include="jpeglib\jquant2.c" /> + <ClCompile Include="jpeglib\jutils.c" /> + <ClCompile Include="libpng\png.c" /> + <ClCompile Include="libpng\pngerror.c" /> + <ClCompile Include="libpng\pngget.c" /> + <ClCompile Include="libpng\pngmem.c" /> + <ClCompile Include="libpng\pngpread.c" /> + <ClCompile Include="libpng\pngread.c" /> + <ClCompile Include="libpng\pngrio.c" /> + <ClCompile Include="libpng\pngrtran.c" /> + <ClCompile Include="libpng\pngrutil.c" /> + <ClCompile Include="libpng\pngset.c" /> + <ClCompile Include="libpng\pngtrans.c" /> + <ClCompile Include="libpng\pngwio.c" /> + <ClCompile Include="libpng\pngwrite.c" /> + <ClCompile Include="libpng\pngwtran.c" /> + <ClCompile Include="libpng\pngwutil.c" /> + <ClCompile Include="aesGladman\aescrypt.cpp" /> + <ClCompile Include="aesGladman\aeskey.cpp" /> + <ClCompile Include="aesGladman\aestab.cpp" /> + <ClCompile Include="aesGladman\fileenc.cpp" /> + <ClCompile Include="aesGladman\hmac.cpp" /> + <ClCompile Include="aesGladman\prng.cpp" /> + <ClCompile Include="aesGladman\pwd2key.cpp" /> + <ClCompile Include="aesGladman\sha1.cpp" /> + <ClCompile Include="aesGladman\sha2.cpp" /> + <ClCompile Include="bzip2\blocksort.c" /> + <ClCompile Include="bzip2\bzcompress.c" /> + <ClCompile Include="bzip2\bzlib.c" /> + <ClCompile Include="bzip2\crctable.c" /> + <ClCompile Include="bzip2\decompress.c" /> + <ClCompile Include="bzip2\huffman.c" /> + <ClCompile Include="bzip2\randtable.c" /> + <ClCompile Include="CIrrDeviceConsole.cpp" /> + <ClCompile Include="CIrrDeviceFB.cpp" /> + <ClCompile Include="CIrrDeviceLinux.cpp" /> + <ClCompile Include="CIrrDeviceSDL.cpp" /> + <ClCompile Include="CIrrDeviceStub.cpp" /> + <ClCompile Include="CIrrDeviceWin32.cpp" /> + <ClCompile Include="CIrrDeviceWinCE.cpp" /> + <ClCompile Include="CAttributes.cpp" /> + <ClCompile Include="CFileList.cpp" /> + <ClCompile Include="CFileSystem.cpp" /> + <ClCompile Include="CLimitReadFile.cpp" /> + <ClCompile Include="CMemoryFile.cpp" /> + <ClCompile Include="CMountPointReader.cpp" /> + <ClCompile Include="CNPKReader.cpp" /> + <ClCompile Include="CPakReader.cpp" /> + <ClCompile Include="CReadFile.cpp" /> + <ClCompile Include="CTarReader.cpp" /> + <ClCompile Include="CWADReader.cpp" /> + <ClCompile Include="CWriteFile.cpp" /> + <ClCompile Include="CXMLReader.cpp" /> + <ClCompile Include="CXMLWriter.cpp" /> + <ClCompile Include="CZipReader.cpp" /> + <ClCompile Include="irrXML.cpp" /> + <ClCompile Include="CDefaultGUIElementFactory.cpp" /> + <ClCompile Include="CGUIButton.cpp" /> + <ClCompile Include="CGUICheckbox.cpp" /> + <ClCompile Include="CGUIColorSelectDialog.cpp" /> + <ClCompile Include="CGUIComboBox.cpp" /> + <ClCompile Include="CGUIContextMenu.cpp" /> + <ClCompile Include="CGUIEditBox.cpp" /> + <ClCompile Include="CGUIEnvironment.cpp" /> + <ClCompile Include="CGUIFileOpenDialog.cpp" /> + <ClCompile Include="CGUIFont.cpp" /> + <ClCompile Include="CGUIImage.cpp" /> + <ClCompile Include="CGUIImageList.cpp" /> + <ClCompile Include="CGUIInOutFader.cpp" /> + <ClCompile Include="CGUIListBox.cpp" /> + <ClCompile Include="CGUIMenu.cpp" /> + <ClCompile Include="CGUIMeshViewer.cpp" /> + <ClCompile Include="CGUIMessageBox.cpp" /> + <ClCompile Include="CGUIModalScreen.cpp" /> + <ClCompile Include="CGUIScrollBar.cpp" /> + <ClCompile Include="CGUISkin.cpp" /> + <ClCompile Include="CGUISpinBox.cpp" /> + <ClCompile Include="CGUISpriteBank.cpp" /> + <ClCompile Include="CGUIStaticText.cpp" /> + <ClCompile Include="CGUITabControl.cpp" /> + <ClCompile Include="CGUITable.cpp" /> + <ClCompile Include="CGUIToolBar.cpp" /> + <ClCompile Include="CGUITreeView.cpp" /> + <ClCompile Include="CGUIWindow.cpp" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Irrlicht.rc" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj.filters b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj.filters new file mode 100644 index 0000000..c522cec --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht11.0.vcxproj.filters @@ -0,0 +1,2247 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="include"> + <UniqueIdentifier>{b5bde5d3-f9e4-4036-8c28-2f4e8cd03846}</UniqueIdentifier> + </Filter> + <Filter Include="include\video"> + <UniqueIdentifier>{0b0937fb-2270-4e3e-a94f-f92bc0fa74ae}</UniqueIdentifier> + </Filter> + <Filter Include="include\core"> + <UniqueIdentifier>{67300400-93d5-4a7e-8b59-7c0d7b1f6d75}</UniqueIdentifier> + </Filter> + <Filter Include="include\io"> + <UniqueIdentifier>{feb206b9-81b6-45c0-b4e5-9e637fe060e7}</UniqueIdentifier> + </Filter> + <Filter Include="include\scene"> + <UniqueIdentifier>{af459bf5-2849-4a0e-9a21-91acbbf1c6b5}</UniqueIdentifier> + </Filter> + <Filter Include="include\gui"> + <UniqueIdentifier>{aa649d49-922d-4118-8574-f05c13d67706}</UniqueIdentifier> + </Filter> + <Filter Include="doc"> + <UniqueIdentifier>{a72cb2e5-a5c3-41bc-9c86-fdbdae8f7866}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht"> + <UniqueIdentifier>{72c30315-bbc0-4109-9ccd-fb7107ba316a}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene"> + <UniqueIdentifier>{1fcdc900-911d-4b7a-9328-afce5bbe44fa}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\loaders"> + <UniqueIdentifier>{41e16cbf-c3cb-4d74-8aef-c0416b6b9d7f}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\sceneNodes"> + <UniqueIdentifier>{b84f01e5-ae3c-457b-8d96-b3e271800162}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\particleSystem"> + <UniqueIdentifier>{eca36d94-d8fb-477d-a0dc-b5498c9686d7}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\collision"> + <UniqueIdentifier>{67826246-df05-4523-9191-5286f9157963}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\animators"> + <UniqueIdentifier>{659a61d5-7ab3-4aa3-95ca-879780810b4e}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\scene\writers"> + <UniqueIdentifier>{f65e8d89-c715-4794-8c2d-22f2b57cffb0}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video"> + <UniqueIdentifier>{3cb7865d-a5e9-4b22-8f54-dde759b88c51}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Software"> + <UniqueIdentifier>{919fcfa4-4277-4c88-8bfc-4bfcfcbb1b65}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\OpenGL"> + <UniqueIdentifier>{834213c7-9515-49de-aa27-8d3ed9c0c87a}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Direct3D8"> + <UniqueIdentifier>{19838bc4-396f-4d23-ad1b-3bb652e33e6d}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Null"> + <UniqueIdentifier>{a9ca9d4d-7678-4687-b78b-15236c0dcf53}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Null\Writer"> + <UniqueIdentifier>{d694e7b0-0fb0-4685-ace7-56d9ec65a3d0}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Null\Loader"> + <UniqueIdentifier>{e2571a61-945c-4509-b47c-daea464916ab}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Direct3D9"> + <UniqueIdentifier>{1354e9fa-cea6-461e-af7f-9940bb5f0a2f}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\video\Burning Video"> + <UniqueIdentifier>{ac7af7ba-0e6b-4da4-a695-a0070a4da974}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr"> + <UniqueIdentifier>{1173499e-79e8-4c34-8046-abc325e2f2a9}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern"> + <UniqueIdentifier>{ca095ff3-25e4-4852-ab55-af28c602cd8a}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\zlib"> + <UniqueIdentifier>{1c8bd90a-8361-4478-8942-a062450ef209}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\jpeglib"> + <UniqueIdentifier>{128cac28-b6f8-49e7-87f5-ee15951d0396}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\libpng"> + <UniqueIdentifier>{6f10ce97-ed8b-47bc-a189-f2262eb467e4}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\aesGladman"> + <UniqueIdentifier>{5d58bc55-284e-4880-9226-85083e65d660}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\extern\bzip2"> + <UniqueIdentifier>{064ee182-9f07-4026-ac22-c141ae2c7281}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\irr\device"> + <UniqueIdentifier>{6e842906-e193-451d-8716-12eaafabd0d8}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\io"> + <UniqueIdentifier>{799f220e-3a58-4788-876b-88c175b69871}</UniqueIdentifier> + </Filter> + <Filter Include="Irrlicht\gui"> + <UniqueIdentifier>{da421793-4674-481c-be46-f7a44e78aee5}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\include\IEventReceiver.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ILogger.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IOSOperator.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IReferenceCounted.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IrrCompileConfig.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrlicht.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IrrlichtDevice.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrTypes.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITimer.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\Keycodes.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SIrrCreationParameters.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SKeyMap.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EDriverTypes.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGeometryCreator.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGPUProgrammingServices.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IImage.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IImageLoader.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMaterialRenderer.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMaterialRendererServices.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IShaderConstantSetCallBack.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITexture.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IVideoDriver.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IVideoModeList.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\S3DVertex.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SColor.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SExposedVideoData.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SLight.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMaterial.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMaterialLayer.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\aabbox3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\coreutil.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\dimension2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\heapsort.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrAllocator.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrArray.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrList.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrMap.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrMath.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrString.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\line2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\line3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\matrix4.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\plane3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\position2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\quaternion.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\rect.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\triangle3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\vector2d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\vector3d.h"> + <Filter>include\core</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EAttributes.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAttributeExchangingObject.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAttributes.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IFileList.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IFileSystem.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IReadFile.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\irrXML.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IWriteFile.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IXMLReader.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IXMLWriter.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\path.h"> + <Filter>include\io</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CDynamicMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CIndexBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\CVertexBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ECullingTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EDebugSceneTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EMeshWriterEnums.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EPrimitiveTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ESceneNodeAnimatorTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ESceneNodeTypes.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMeshMD2.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMeshSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IBillboardSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ICameraSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IDummyTransformationSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ILightSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshCache.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshLoader.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshManipulator.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMeshWriter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IMetaTriangleSelector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleAttractionAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleBoxEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleCylinderEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleFadeOutAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleGravityAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleMeshEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleRingEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleRotationAffector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleSphereEmitter.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IParticleSystemSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IQ3LevelMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IQ3Shader.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneCollisionManager.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneManager.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimator.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraFPS.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCameraMaya.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorCollisionResponse.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeAnimatorFactory.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneNodeFactory.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IShadowVolumeSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISkinnedMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITerrainSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITextSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ITriangleSelector.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IVolumeLightSceneNode.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SAnimatedMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SceneParameters.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMesh.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMeshBufferLightMap.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SMeshBufferTangents.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SParticle.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SSkinMeshBuffer.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\SViewFrustum.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGUIAlignment.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGUIElementTypes.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EMessageBoxFlags.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ICursorControl.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIButton.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUICheckbox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIComboBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIContextMenu.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIEditBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIElement.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIElementFactory.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIEnvironment.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIFileOpenDialog.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIFont.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIImage.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIImageList.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIInOutFader.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIListBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIMeshViewer.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIScrollBar.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUISkin.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUISpinBox.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUISpriteBank.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIStaticText.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUITabControl.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIToolbar.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUITreeView.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IGUIWindow.h"> + <Filter>include\gui</Filter> + </ClInclude> + <ClInclude Include="CDefaultSceneNodeAnimatorFactory.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CDefaultSceneNodeFactory.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CGeometryCreator.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CMeshCache.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CMeshManipulator.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="CSceneManager.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="Octree.h"> + <Filter>Irrlicht\scene</Filter> + </ClInclude> + <ClInclude Include="C3DSMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshHalfLife.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshMD2.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshMD3.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CB3DMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CBSPMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CColladaFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CCSMLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CDMFLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CIrrMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CLMTSMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CLWOMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMD2MeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMD3MeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMS3DMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMY3DHelper.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CMY3DMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="COBJMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="COCTLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="COgreMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CPLYMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CQ3LevelMesh.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CSkinnedMesh.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CSTLMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CXMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="dmfsupport.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="CAnimatedMeshSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CBillboardSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CBoneSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CCameraSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CCubeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CDummyTransformationSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CEmptySceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CLightSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CMeshSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="COctreeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CQuake3ShaderSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CShadowVolumeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CSkyBoxSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CSkyDomeSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CSphereSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CTerrainSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CTextSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CVolumeLightSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CWaterSurfaceSceneNode.h"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClInclude> + <ClInclude Include="CParticleAnimatedMeshSceneNodeEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleAttractionAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleBoxEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleCylinderEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleFadeOutAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleGravityAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleMeshEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticlePointEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleRingEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleRotationAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleScaleAffector.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleSphereEmitter.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CParticleSystemSceneNode.h"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClInclude> + <ClInclude Include="CMetaTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="COctreeTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CSceneCollisionManager.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CTerrainTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CTriangleBBSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CTriangleSelector.h"> + <Filter>Irrlicht\scene\collision</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorCameraFPS.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorCameraMaya.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorCollisionResponse.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorDelete.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorFlyCircle.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorFlyStraight.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorFollowSpline.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorRotation.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CSceneNodeAnimatorTexture.h"> + <Filter>Irrlicht\scene\animators</Filter> + </ClInclude> + <ClInclude Include="CColladaMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CIrrMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="COBJMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CPLYMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CSTLMeshWriter.h"> + <Filter>Irrlicht\scene\writers</Filter> + </ClInclude> + <ClInclude Include="CVideoModeList.h"> + <Filter>Irrlicht\video</Filter> + </ClInclude> + <ClInclude Include="CSoftwareDriver.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="CSoftwareTexture.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="CTRTextureGouraud.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="CZBuffer.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="ITriangleRenderer.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="IZBuffer.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="S2DVertex.h"> + <Filter>Irrlicht\video\Software</Filter> + </ClInclude> + <ClInclude Include="COpenGLDriver.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLExtensionHandler.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLNormalMapRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLParallaxMapRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLShaderMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLSLMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="COpenGLTexture.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="glext.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="wglext.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="CD3D8Driver.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8MaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8NormalMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8ParallaxMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8ShaderMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CD3D8Texture.h"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClInclude> + <ClInclude Include="CColorConverter.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CFPSCounter.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CImage.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CNullDriver.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="IImagePresenter.h"> + <Filter>Irrlicht\video\Null</Filter> + </ClInclude> + <ClInclude Include="CImageWriterBMP.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterJPG.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPCX.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPNG.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPPM.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterPSD.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageWriterTGA.h"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderBMP.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderDDS.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderJPG.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPCX.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPNG.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPPM.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderPSD.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderRGB.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderTGA.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CImageLoaderWAL.h"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClInclude> + <ClInclude Include="CD3D9Driver.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9HLSLMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9MaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9NormalMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9ParallaxMapRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9ShaderMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CD3D9Texture.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="CDepthBuffer.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CSoftware2MaterialRenderer.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CSoftwareDriver2.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CSoftwareTexture2.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="IBurningShader.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="IDepthBuffer.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="S4DVertex.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="SoftwareDriver2_compile_config.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="SoftwareDriver2_helper.h"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClInclude> + <ClInclude Include="CLogger.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="COSOperator.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="CTimer.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="os.h"> + <Filter>Irrlicht\irr</Filter> + </ClInclude> + <ClInclude Include="lzma\LzmaDec.h"> + <Filter>Irrlicht\irr\extern</Filter> + </ClInclude> + <ClInclude Include="lzma\Types.h"> + <Filter>Irrlicht\irr\extern</Filter> + </ClInclude> + <ClInclude Include="zlib\crc32.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\deflate.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\inffast.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\inffixed.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\inftrees.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\trees.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\zconf.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\zlib.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="zlib\zutil.h"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\cderror.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jconfig.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jdct.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jerror.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jinclude.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jmemsys.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jmorecfg.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jpegint.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jpeglib.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="jpeglib\jversion.h"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClInclude> + <ClInclude Include="libpng\png.h"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClInclude> + <ClInclude Include="libpng\pngconf.h"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClInclude> + <ClInclude Include="aesGladman\aes.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\aesopt.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\fileenc.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\hmac.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\prng.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\pwd2key.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\sha1.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="aesGladman\sha2.h"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClInclude> + <ClInclude Include="bzip2\bzlib.h"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClInclude> + <ClInclude Include="bzip2\bzlib_private.h"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceConsole.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceFB.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceLinux.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceSDL.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceStub.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceWin32.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CIrrDeviceWinCE.h"> + <Filter>Irrlicht\irr\device</Filter> + </ClInclude> + <ClInclude Include="CAttributeImpl.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CAttributes.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CFileList.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CFileSystem.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CLimitReadFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CMemoryFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CMountPointReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CNPKReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CPakReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CReadFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CTarReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CWADReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CWriteFile.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CXMLReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CXMLReaderImpl.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CXMLWriter.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="CZipReader.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="IAttribute.h"> + <Filter>Irrlicht\io</Filter> + </ClInclude> + <ClInclude Include="BuiltInFont.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CDefaultGUIElementFactory.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIButton.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUICheckbox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIColorSelectDialog.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIComboBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIContextMenu.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEditBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEnvironment.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIFileOpenDialog.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIFont.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIImage.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIImageList.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIInOutFader.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIListBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIMenu.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIMeshViewer.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIMessageBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIModalScreen.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIScrollBar.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUISkin.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUISpinBox.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUISpriteBank.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIStaticText.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUITabControl.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUITable.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIToolBar.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUITreeView.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="CGUIWindow.h"> + <Filter>Irrlicht\gui</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IAnimatedMeshMD3.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="resource.h" /> + <ClInclude Include="CSceneLoaderIrr.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ISceneLoader.h"> + <Filter>include\scene</Filter> + </ClInclude> + <ClInclude Include="CSMFMeshFileLoader.h"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EDriverFeatures.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="..\..\include\IRandomizer.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EMaterialFlags.h"> + <Filter>include\video</Filter> + </ClInclude> + <ClInclude Include="CD3D9CgMaterialRenderer.h"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClInclude> + <ClInclude Include="COpenGLCgMaterialRenderer.h"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClInclude> + <ClInclude Include="CCgMaterialRenderer.h"> + <Filter>Irrlicht\video</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="..\..\changes.txt"> + <Filter>doc</Filter> + </None> + <None Include="..\..\readme.txt"> + <Filter>doc</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ClCompile Include="CDefaultSceneNodeAnimatorFactory.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CDefaultSceneNodeFactory.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CGeometryCreator.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CMeshCache.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CMeshManipulator.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="CSceneManager.cpp"> + <Filter>Irrlicht\scene</Filter> + </ClCompile> + <ClCompile Include="C3DSMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshHalfLife.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshMD2.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshMD3.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CB3DMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CBSPMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CColladaFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CCSMLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CDMFLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CIrrMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CLMTSMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CLWOMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMD2MeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMD3MeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMS3DMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CMY3DMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="COBJMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="COCTLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="COgreMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CPLYMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CQ3LevelMesh.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CSkinnedMesh.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CSTLMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CXMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CAnimatedMeshSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CBillboardSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CBoneSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CCameraSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CCubeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CDummyTransformationSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CEmptySceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CLightSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CMeshSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="COctreeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CQuake3ShaderSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CShadowVolumeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CSkyBoxSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CSkyDomeSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CSphereSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CTerrainSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CTextSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CVolumeLightSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CWaterSurfaceSceneNode.cpp"> + <Filter>Irrlicht\scene\sceneNodes</Filter> + </ClCompile> + <ClCompile Include="CParticleAnimatedMeshSceneNodeEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleAttractionAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleBoxEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleCylinderEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleFadeOutAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleGravityAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleMeshEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticlePointEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleRingEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleRotationAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleScaleAffector.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleSphereEmitter.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CParticleSystemSceneNode.cpp"> + <Filter>Irrlicht\scene\particleSystem</Filter> + </ClCompile> + <ClCompile Include="CMetaTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="COctreeTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CSceneCollisionManager.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CTerrainTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CTriangleBBSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CTriangleSelector.cpp"> + <Filter>Irrlicht\scene\collision</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorCameraFPS.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorCameraMaya.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorCollisionResponse.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorDelete.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorFlyCircle.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorFlyStraight.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorFollowSpline.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorRotation.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CSceneNodeAnimatorTexture.cpp"> + <Filter>Irrlicht\scene\animators</Filter> + </ClCompile> + <ClCompile Include="CColladaMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CIrrMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="COBJMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CPLYMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CSTLMeshWriter.cpp"> + <Filter>Irrlicht\scene\writers</Filter> + </ClCompile> + <ClCompile Include="CVideoModeList.cpp"> + <Filter>Irrlicht\video</Filter> + </ClCompile> + <ClCompile Include="CSoftwareDriver.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CSoftwareTexture.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRFlat.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRFlatWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRGouraud.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRGouraudWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureFlat.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureFlatWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraud.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAdd.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudNoZ.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudWire.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="CZBuffer.cpp"> + <Filter>Irrlicht\video\Software</Filter> + </ClCompile> + <ClCompile Include="COpenGLDriver.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLExtensionHandler.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLNormalMapRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLParallaxMapRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLShaderMaterialRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLSLMaterialRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="COpenGLTexture.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="CD3D8Driver.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8NormalMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8ParallaxMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8ShaderMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CD3D8Texture.cpp"> + <Filter>Irrlicht\video\Direct3D8</Filter> + </ClCompile> + <ClCompile Include="CColorConverter.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CFPSCounter.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CImage.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CNullDriver.cpp"> + <Filter>Irrlicht\video\Null</Filter> + </ClCompile> + <ClCompile Include="CImageWriterBMP.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterJPG.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPCX.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPNG.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPPM.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterPSD.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageWriterTGA.cpp"> + <Filter>Irrlicht\video\Null\Writer</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderBMP.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderDDS.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderJPG.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPCX.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPNG.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPPM.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderPSD.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderRGB.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderTGA.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CImageLoaderWAL.cpp"> + <Filter>Irrlicht\video\Null\Loader</Filter> + </ClCompile> + <ClCompile Include="CD3D9Driver.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9HLSLMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9NormalMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9ParallaxMapRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9ShaderMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CD3D9Texture.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="CBurningShader_Raster_Reference.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CDepthBuffer.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CSoftwareDriver2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CSoftwareTexture2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRGouraud2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRGouraudAlpha2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRGouraudAlphaNoZ2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRNormalMap.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRStencilShadow.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureBlend.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureDetailMap2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraud2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAdd2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAddNoZ2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAlpha.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudAlphaNoZ.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudNoZ2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureGouraudVertexAlpha2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_Add.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_M1.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_M2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMap2_M4.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureLightMapGouraud2_M4.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CTRTextureWire2.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="IBurningShader.cpp"> + <Filter>Irrlicht\video\Burning Video</Filter> + </ClCompile> + <ClCompile Include="CLogger.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="COSOperator.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="Irrlicht.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="os.cpp"> + <Filter>Irrlicht\irr</Filter> + </ClCompile> + <ClCompile Include="lzma\LzmaDec.c"> + <Filter>Irrlicht\irr\extern</Filter> + </ClCompile> + <ClCompile Include="zlib\adler32.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\compress.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\crc32.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\deflate.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\inffast.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\inflate.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\inftrees.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\trees.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\uncompr.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="zlib\zutil.c"> + <Filter>Irrlicht\irr\extern\zlib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jaricom.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcapimin.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcapistd.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcarith.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jccoefct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jccolor.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcdctmgr.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jchuff.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcinit.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcmainct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcmarker.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcmaster.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcomapi.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcparam.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcprepct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jcsample.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jctrans.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdapimin.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdapistd.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdarith.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdatadst.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdatasrc.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdcoefct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdcolor.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jddctmgr.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdhuff.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdinput.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmainct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmarker.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmaster.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdmerge.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdpostct.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdsample.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jdtrans.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jerror.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jfdctflt.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jfdctfst.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jfdctint.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jidctflt.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jidctfst.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jidctint.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jmemmgr.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jmemnobs.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jquant1.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jquant2.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="jpeglib\jutils.c"> + <Filter>Irrlicht\irr\extern\jpeglib</Filter> + </ClCompile> + <ClCompile Include="libpng\png.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngerror.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngget.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngmem.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngpread.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngread.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngrio.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngrtran.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngrutil.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngset.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngtrans.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwio.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwrite.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwtran.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="libpng\pngwutil.c"> + <Filter>Irrlicht\irr\extern\libpng</Filter> + </ClCompile> + <ClCompile Include="aesGladman\aescrypt.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\aeskey.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\aestab.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\fileenc.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\hmac.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\prng.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\pwd2key.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\sha1.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="aesGladman\sha2.cpp"> + <Filter>Irrlicht\irr\extern\aesGladman</Filter> + </ClCompile> + <ClCompile Include="bzip2\blocksort.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\bzcompress.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\bzlib.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\crctable.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\decompress.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\huffman.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="bzip2\randtable.c"> + <Filter>Irrlicht\irr\extern\bzip2</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceConsole.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceFB.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceLinux.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceSDL.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceStub.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceWin32.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CIrrDeviceWinCE.cpp"> + <Filter>Irrlicht\irr\device</Filter> + </ClCompile> + <ClCompile Include="CAttributes.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CFileList.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CFileSystem.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CLimitReadFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CMemoryFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CMountPointReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CNPKReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CPakReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CReadFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CTarReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CWADReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CWriteFile.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CXMLReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CXMLWriter.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CZipReader.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="irrXML.cpp"> + <Filter>Irrlicht\io</Filter> + </ClCompile> + <ClCompile Include="CDefaultGUIElementFactory.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIButton.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUICheckbox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIColorSelectDialog.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIComboBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIContextMenu.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEditBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEnvironment.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIFileOpenDialog.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIFont.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIImage.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIImageList.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIInOutFader.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIListBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIMenu.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIMeshViewer.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIMessageBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIModalScreen.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIScrollBar.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUISkin.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUISpinBox.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUISpriteBank.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIStaticText.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUITabControl.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUITable.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIToolBar.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUITreeView.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CGUIWindow.cpp"> + <Filter>Irrlicht\gui</Filter> + </ClCompile> + <ClCompile Include="CSceneLoaderIrr.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CSMFMeshFileLoader.cpp"> + <Filter>Irrlicht\scene\loaders</Filter> + </ClCompile> + <ClCompile Include="CD3D9CgMaterialRenderer.cpp"> + <Filter>Irrlicht\video\Direct3D9</Filter> + </ClCompile> + <ClCompile Include="COpenGLCgMaterialRenderer.cpp"> + <Filter>Irrlicht\video\OpenGL</Filter> + </ClCompile> + <ClCompile Include="CCgMaterialRenderer.cpp"> + <Filter>Irrlicht\video</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Irrlicht.rc" /> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.sln b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.sln new file mode 100644 index 0000000..e9759b2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Static lib - Debug|Win32 = Static lib - Debug|Win32 + Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 + Static lib - Release|Win32 = Static lib - Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.vcproj b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.vcproj new file mode 100644 index 0000000..38ce04b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht8.0.vcproj @@ -0,0 +1,3512 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="Irrlicht" + ProjectGUID="{E08E042A-6C45-411B-92BE-3CC31331019F}" + RootNamespace="Irrlicht" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="..\obj\IrrDebug" + IntermediateDirectory="..\obj\IrrDebug" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Debug/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="false" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrDebug/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrDebug/" + ObjectFile=".\..\obj\IrrDebug/" + ProgramDataBaseFileName=".\..\obj\IrrDebug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseLibraryDependencyInputs="true" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib opengl32.lib winmm.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\obj\IrrDebug\Irrlicht.pdb" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="obj\IrrRelease" + IntermediateDirectory="obj\IrrRelease" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="false" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\..\obj\IrrRelease/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrRelease/" + ObjectFile=".\..\obj\IrrRelease/" + ProgramDataBaseFileName=".\..\obj\IrrRelease/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib opengl32.lib winmm.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="false" + ProgramDatabaseFile="..\obj\IrrRelease\Irrlicht.pdb" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release - Fast FPU|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="0" + OmitFramePointers="true" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + FloatingPointModel="2" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrReleaseFastFPU/Irrlicht.pch" + ExpandAttributedSource="true" + AssemblerOutput="4" + AssemblerListingLocation=".\..\obj\IrrReleaseFastFPU/" + ObjectFile=".\..\obj\IrrReleaseFastFPU/" + ProgramDataBaseFileName=".\..\obj\IrrReleaseFastFPU/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CallingConvention="1" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib opengl32.lib winmm.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="false" + ProgramDatabaseFile="..\obj\IrrRelease\Irrlicht.pdb" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Static lib - Debug|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Debug/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="false" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrDebugStatic/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrDebugStatic/" + ObjectFile=".\..\obj\IrrDebugStatic/" + ProgramDataBaseFileName=".\..\obj\IrrDebugStatic/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="winmm.lib" + OutputFile="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Static lib - Release|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="false" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\..\obj\IrrReleaseStatic/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrReleaseStatic/" + ObjectFile=".\..\obj\IrrReleaseStatic/" + ProgramDataBaseFileName=".\..\obj\IrrReleaseStatic/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="winmm.lib" + OutputFile="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Static lib - Release - Fast FPU|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="0" + OmitFramePointers="true" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + FloatingPointModel="2" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrReleaseFastFPUStatic/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrReleaseFastFPUStatic/" + ObjectFile=".\..\obj\IrrReleaseFastFPUStatic/" + ProgramDataBaseFileName=".\..\obj\IrrReleaseFastFPUStatic/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CallingConvention="1" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="winmm.lib" + OutputFile="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="include" + > + <File + RelativePath=".\..\..\include\IEventReceiver.h" + > + </File> + <File + RelativePath=".\..\..\include\ILogger.h" + > + </File> + <File + RelativePath=".\..\..\include\IOSOperator.h" + > + </File> + <File + RelativePath=".\..\..\include\IReferenceCounted.h" + > + </File> + <File + RelativePath=".\..\..\include\IrrCompileConfig.h" + > + </File> + <File + RelativePath=".\..\..\include\irrlicht.h" + > + </File> + <File + RelativePath=".\..\..\include\IrrlichtDevice.h" + > + </File> + <File + RelativePath=".\..\..\include\ITimer.h" + > + </File> + <File + RelativePath=".\..\..\include\Keycodes.h" + > + </File> + <File + RelativePath=".\..\..\include\SIrrCreationParameters.h" + > + </File> + <File + RelativePath=".\..\..\include\SKeyMap.h" + > + </File> + <Filter + Name="video" + > + <File + RelativePath=".\..\..\include\EDriverTypes.h" + > + </File> + <File + RelativePath=".\..\..\include\IGPUProgrammingServices.h" + > + </File> + <File + RelativePath=".\..\..\include\IImage.h" + > + </File> + <File + RelativePath=".\..\..\include\IImageLoader.h" + > + </File> + <File + RelativePath=".\..\..\include\IMaterialRenderer.h" + > + </File> + <File + RelativePath=".\..\..\include\IMaterialRendererServices.h" + > + </File> + <File + RelativePath=".\..\..\include\IShaderConstantSetCallBack.h" + > + </File> + <File + RelativePath=".\..\..\include\ITexture.h" + > + </File> + <File + RelativePath=".\..\..\include\IVideoDriver.h" + > + </File> + <File + RelativePath=".\..\..\include\IVideoModeList.h" + > + </File> + <File + RelativePath=".\..\..\include\S3DVertex.h" + > + </File> + <File + RelativePath=".\..\..\include\SColor.h" + > + </File> + <File + RelativePath=".\..\..\include\SExposedVideoData.h" + > + </File> + <File + RelativePath=".\..\..\include\SLight.h" + > + </File> + <File + RelativePath=".\..\..\include\SMaterial.h" + > + </File> + <File + RelativePath="..\..\include\SMaterialLayer.h" + > + </File> + </Filter> + <Filter + Name="core" + > + <File + RelativePath=".\..\..\include\aabbox3d.h" + > + </File> + <File + RelativePath="..\..\include\coreutil.h" + > + </File> + <File + RelativePath=".\..\..\include\dimension2d.h" + > + </File> + <File + RelativePath=".\..\..\include\heapsort.h" + > + </File> + <File + RelativePath=".\..\..\include\irrAllocator.h" + > + </File> + <File + RelativePath=".\..\..\include\irrArray.h" + > + </File> + <File + RelativePath=".\..\..\include\irrList.h" + > + </File> + <File + RelativePath="..\..\include\irrMap.h" + > + </File> + <File + RelativePath=".\..\..\include\irrMath.h" + > + </File> + <File + RelativePath=".\..\..\include\irrString.h" + > + </File> + <File + RelativePath=".\..\..\include\irrTypes.h" + > + </File> + <File + RelativePath=".\..\..\include\line2d.h" + > + </File> + <File + RelativePath=".\..\..\include\line3d.h" + > + </File> + <File + RelativePath=".\..\..\include\matrix4.h" + > + </File> + <File + RelativePath=".\..\..\include\plane3d.h" + > + </File> + <File + RelativePath=".\..\..\include\position2d.h" + > + </File> + <File + RelativePath=".\..\..\include\quaternion.h" + > + </File> + <File + RelativePath=".\..\..\include\rect.h" + > + </File> + <File + RelativePath=".\..\..\include\triangle3d.h" + > + </File> + <File + RelativePath=".\..\..\include\vector2d.h" + > + </File> + <File + RelativePath=".\..\..\include\vector3d.h" + > + </File> + </Filter> + <Filter + Name="io" + > + <File + RelativePath=".\..\..\include\EAttributes.h" + > + </File> + <File + RelativePath=".\..\..\include\IAttributeExchangingObject.h" + > + </File> + <File + RelativePath=".\..\..\include\IAttributes.h" + > + </File> + <File + RelativePath="..\..\include\IFileArchive.h" + > + </File> + <File + RelativePath=".\..\..\include\IFileList.h" + > + </File> + <File + RelativePath=".\..\..\include\IFileSystem.h" + > + </File> + <File + RelativePath=".\..\..\include\IReadFile.h" + > + </File> + <File + RelativePath=".\..\..\include\irrXML.h" + > + </File> + <File + RelativePath=".\..\..\include\IWriteFile.h" + > + </File> + <File + RelativePath=".\..\..\include\IXMLReader.h" + > + </File> + <File + RelativePath=".\..\..\include\IXMLWriter.h" + > + </File> + </Filter> + <Filter + Name="scene" + > + <File + RelativePath="..\..\include\ECullingTypes.h" + > + </File> + <File + RelativePath="..\..\include\EDebugSceneTypes.h" + > + </File> + <File + RelativePath="..\..\include\EMeshWriterEnums.h" + > + </File> + <File + RelativePath=".\..\..\include\ESceneNodeAnimatorTypes.h" + > + </File> + <File + RelativePath=".\..\..\include\ESceneNodeTypes.h" + > + </File> + <File + RelativePath=".\..\..\include\IAnimatedMesh.h" + > + </File> + <File + RelativePath=".\..\..\include\IAnimatedMeshMD2.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD3.h" + > + </File> + <File + RelativePath=".\..\..\include\IAnimatedMeshMD3.h" + > + </File> + <File + RelativePath=".\..\..\include\IAnimatedMeshSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\IBillboardSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\ICameraSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\IDummyTransformationSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IGeometryCreator.h" + > + </File> + <File + RelativePath="..\..\include\ILightManager.h" + > + </File> + <File + RelativePath=".\..\..\include\ILightSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\IMesh.h" + > + </File> + <File + RelativePath=".\..\..\include\IMeshBuffer.h" + > + </File> + <File + RelativePath=".\..\..\include\IMeshCache.h" + > + </File> + <File + RelativePath=".\..\..\include\IMeshLoader.h" + > + </File> + <File + RelativePath=".\..\..\include\IMeshManipulator.h" + > + </File> + <File + RelativePath=".\..\..\include\IMeshSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IMeshWriter.h" + > + </File> + <File + RelativePath=".\..\..\include\IMetaTriangleSelector.h" + > + </File> + <File + RelativePath=".\..\..\include\IQ3LevelMesh.h" + > + </File> + <File + RelativePath="..\..\include\IQ3Shader.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneCollisionManager.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneManager.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneLoader.h" + > + </File> + + <File + RelativePath=".\..\..\include\ISceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneNodeAnimator.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraFPS.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraMaya.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneNodeAnimatorCollisionResponse.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneNodeAnimatorFactory.h" + > + </File> + <File + RelativePath=".\..\..\include\ISceneNodeFactory.h" + > + </File> + <File + RelativePath=".\..\..\include\IShadowVolumeSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ISkinnedMesh.h" + > + </File> + <File + RelativePath=".\..\..\include\ITerrainSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\ITextSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\ITriangleSelector.h" + > + </File> + <File + RelativePath=".\..\..\include\IVolumeLightSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\SAnimatedMesh.h" + > + </File> + <File + RelativePath=".\..\..\include\SceneParameters.h" + > + </File> + <File + RelativePath=".\..\..\include\SMesh.h" + > + </File> + <File + RelativePath=".\..\..\include\SMeshBuffer.h" + > + </File> + <File + RelativePath=".\..\..\include\SMeshBufferLightMap.h" + > + </File> + <File + RelativePath=".\..\..\include\SMeshBufferTangents.h" + > + </File> + <File + RelativePath="..\..\include\SSharedMeshBuffer.h" + > + </File> + <File + RelativePath=".\..\..\include\SSkinMeshBuffer.h" + > + </File> + <File + RelativePath=".\..\..\include\SViewFrustum.h" + > + </File> + <Filter + Name="particle" + > + <File + RelativePath=".\..\..\include\IParticleAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleAttractionAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleBoxEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleCylinderEmitter.h" + > + </File> + <File + RelativePath=".\..\..\include\IParticleEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleFadeOutAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleGravityAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleMeshEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleRingEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleRotationAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleSphereEmitter.h" + > + </File> + <File + RelativePath=".\..\..\include\IParticleSystemSceneNode.h" + > + </File> + <File + RelativePath=".\..\..\include\SParticle.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="gui" + > + <File + RelativePath="..\..\include\EGUIAlignment.h" + > + </File> + <File + RelativePath=".\..\..\include\EGUIElementTypes.h" + > + </File> + <File + RelativePath="..\..\include\EMessageBoxFlags.h" + > + </File> + <File + RelativePath=".\..\..\include\ICursorControl.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIButton.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUICheckbox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIColorSelectDialog.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIComboBox.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIContextMenu.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIEditBox.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIElement.h" + > + </File> + <File + RelativePath="..\..\include\IGUIElementFactory.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIEnvironment.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIFileOpenDialog.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIFont.h" + > + </File> + <File + RelativePath="..\..\include\IGUIFontBitmap.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIImage.h" + > + </File> + <File + RelativePath="..\..\include\IGUIImageList.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIInOutFader.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIListBox.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIMeshViewer.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIScrollBar.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUISkin.h" + > + </File> + <File + RelativePath="..\..\include\IGUISpinBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUISpriteBank.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIStaticText.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUITabControl.h" + > + </File> + <File + RelativePath="..\..\include\IGUITable.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIToolbar.h" + > + </File> + <File + RelativePath="..\..\include\IGUITreeView.h" + > + </File> + <File + RelativePath=".\..\..\include\IGUIWindow.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="gui impl" + > + <File + RelativePath=".\BuiltInFont.h" + > + </File> + <File + RelativePath=".\CDefaultGUIElementFactory.cpp" + > + </File> + <File + RelativePath=".\CDefaultGUIElementFactory.h" + > + </File> + <File + RelativePath=".\CGUIButton.cpp" + > + </File> + <File + RelativePath=".\CGUIButton.h" + > + </File> + <File + RelativePath=".\CGUICheckbox.cpp" + > + </File> + <File + RelativePath=".\CGUICheckbox.h" + > + </File> + <File + RelativePath=".\CGUIColorSelectDialog.cpp" + > + </File> + <File + RelativePath=".\CGUIColorSelectDialog.h" + > + </File> + <File + RelativePath="CGUIComboBox.cpp" + > + </File> + <File + RelativePath="CGUIComboBox.h" + > + </File> + <File + RelativePath="CGUIContextMenu.cpp" + > + </File> + <File + RelativePath="CGUIContextMenu.h" + > + </File> + <File + RelativePath="CGUIEditBox.cpp" + > + </File> + <File + RelativePath="CGUIEditBox.h" + > + </File> + <File + RelativePath=".\CGUIEnvironment.cpp" + > + </File> + <File + RelativePath=".\CGUIEnvironment.h" + > + </File> + <File + RelativePath=".\CGUIFileOpenDialog.cpp" + > + </File> + <File + RelativePath=".\CGUIFileOpenDialog.h" + > + </File> + <File + RelativePath=".\CGUIFont.cpp" + > + </File> + <File + RelativePath=".\CGUIFont.h" + > + </File> + <File + RelativePath=".\CGUIImage.cpp" + > + </File> + <File + RelativePath=".\CGUIImage.h" + > + </File> + <File + RelativePath=".\CGUIImageList.cpp" + > + </File> + <File + RelativePath=".\CGUIImageList.h" + > + </File> + <File + RelativePath="CGUIInOutFader.cpp" + > + </File> + <File + RelativePath="CGUIInOutFader.h" + > + </File> + <File + RelativePath=".\CGUIListBox.cpp" + > + </File> + <File + RelativePath=".\CGUIListBox.h" + > + </File> + <File + RelativePath="CGUIMenu.cpp" + > + </File> + <File + RelativePath="CGUIMenu.h" + > + </File> + <File + RelativePath=".\CGUIMeshViewer.cpp" + > + </File> + <File + RelativePath=".\CGUIMeshViewer.h" + > + </File> + <File + RelativePath="CGUIMessageBox.cpp" + > + </File> + <File + RelativePath="CGUIMessageBox.h" + > + </File> + <File + RelativePath="CGUIModalScreen.cpp" + > + </File> + <File + RelativePath="CGUIModalScreen.h" + > + </File> + <File + RelativePath=".\CGUIScrollBar.cpp" + > + </File> + <File + RelativePath=".\CGUIScrollBar.h" + > + </File> + <File + RelativePath=".\CGUISkin.cpp" + > + </File> + <File + RelativePath=".\CGUISkin.h" + > + </File> + <File + RelativePath=".\CGUISpinBox.cpp" + > + </File> + <File + RelativePath=".\CGUISpinBox.h" + > + </File> + <File + RelativePath=".\CGUISpriteBank.cpp" + > + </File> + <File + RelativePath=".\CGUISpriteBank.h" + > + </File> + <File + RelativePath=".\CGUIStaticText.cpp" + > + </File> + <File + RelativePath=".\CGUIStaticText.h" + > + </File> + <File + RelativePath="CGUITabControl.cpp" + > + </File> + <File + RelativePath="CGUITabControl.h" + > + </File> + <File + RelativePath=".\CGUITable.cpp" + > + </File> + <File + RelativePath=".\CGUITable.h" + > + </File> + <File + RelativePath="CGUIToolBar.cpp" + > + </File> + <File + RelativePath="CGUIToolBar.h" + > + </File> + <File + RelativePath=".\CGUITreeView.cpp" + > + </File> + <File + RelativePath=".\CGUITreeView.h" + > + </File> + <File + RelativePath=".\CGUIWindow.cpp" + > + </File> + <File + RelativePath=".\CGUIWindow.h" + > + </File> + </Filter> + <Filter + Name="video impl" + > + <File + RelativePath="CCgMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CCgMaterialRenderer.h" + > + </File> + <File + RelativePath="CVideoModeList.cpp" + > + </File> + <File + RelativePath="CVideoModeList.h" + > + </File> + <Filter + Name="Software" + > + <File + RelativePath=".\CSoftwareDriver.cpp" + > + </File> + <File + RelativePath=".\CSoftwareDriver.h" + > + </File> + <File + RelativePath=".\CSoftwareTexture.cpp" + > + </File> + <File + RelativePath=".\CSoftwareTexture.h" + > + </File> + <File + RelativePath=".\CTRFlat.cpp" + > + </File> + <File + RelativePath=".\CTRFlatWire.cpp" + > + </File> + <File + RelativePath=".\CTRGouraud.cpp" + > + </File> + <File + RelativePath=".\CTRGouraudWire.cpp" + > + </File> + <File + RelativePath=".\CTRTextureFlat.cpp" + > + </File> + <File + RelativePath=".\CTRTextureFlatWire.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraud.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraud.h" + > + </File> + <File + RelativePath=".\CTRTextureGouraudAdd.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudNoZ.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudWire.cpp" + > + </File> + <File + RelativePath=".\CZBuffer.cpp" + > + </File> + <File + RelativePath=".\CZBuffer.h" + > + </File> + <File + RelativePath=".\ITriangleRenderer.h" + > + </File> + <File + RelativePath=".\IZBuffer.h" + > + </File> + <File + RelativePath=".\S2DVertex.h" + > + </File> + </Filter> + <Filter + Name="OpenGL" + > + <File + RelativePath=".\COpenGLCgMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\COpenGLCgMaterialRenderer.h" + > + </File> + <File + RelativePath=".\COpenGLDriver.cpp" + > + </File> + <File + RelativePath=".\COpenGLDriver.h" + > + </File> + <File + RelativePath=".\COpenGLExtensionHandler.cpp" + > + </File> + <File + RelativePath=".\COpenGLExtensionHandler.h" + > + </File> + <File + RelativePath=".\COpenGLMaterialRenderer.h" + > + </File> + <File + RelativePath=".\COpenGLNormalMapRenderer.cpp" + > + </File> + <File + RelativePath=".\COpenGLNormalMapRenderer.h" + > + </File> + <File + RelativePath=".\COpenGLParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath=".\COpenGLParallaxMapRenderer.h" + > + </File> + <File + RelativePath=".\COpenGLShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\COpenGLShaderMaterialRenderer.h" + > + </File> + <File + RelativePath=".\COpenGLSLMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\COpenGLSLMaterialRenderer.h" + > + </File> + <File + RelativePath=".\COpenGLTexture.cpp" + > + </File> + <File + RelativePath=".\COpenGLTexture.h" + > + </File> + <File + RelativePath=".\glext.h" + > + </File> + <File + RelativePath=".\wglext.h" + > + </File> + </Filter> + <Filter + Name="Direct3D8" + > + <File + RelativePath=".\CD3D8Driver.cpp" + > + </File> + <File + RelativePath=".\CD3D8Driver.h" + > + </File> + <File + RelativePath=".\CD3D8MaterialRenderer.h" + > + </File> + <File + RelativePath=".\CD3D8NormalMapRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D8NormalMapRenderer.h" + > + </File> + <File + RelativePath=".\CD3D8ParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D8ParallaxMapRenderer.h" + > + </File> + <File + RelativePath=".\CD3D8ShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D8ShaderMaterialRenderer.h" + > + </File> + <File + RelativePath=".\CD3D8Texture.cpp" + > + </File> + <File + RelativePath=".\CD3D8Texture.h" + > + </File> + </Filter> + <Filter + Name="Null" + > + <File + RelativePath=".\CColorConverter.cpp" + > + </File> + <File + RelativePath=".\CColorConverter.h" + > + </File> + <File + RelativePath=".\CFPSCounter.cpp" + > + </File> + <File + RelativePath=".\CFPSCounter.h" + > + </File> + <File + RelativePath="CImage.cpp" + > + </File> + <File + RelativePath="CImage.h" + > + </File> + <File + RelativePath="CImageLoaderBMP.cpp" + > + </File> + <File + RelativePath="CImageLoaderBMP.h" + > + </File> + <File + RelativePath=".\CImageLoaderDDS.cpp" + > + </File> + <File + RelativePath=".\CImageLoaderDDS.h" + > + </File> + <File + RelativePath="CImageLoaderJPG.cpp" + > + </File> + <File + RelativePath="CImageLoaderJPG.h" + > + </File> + <File + RelativePath="CImageLoaderPCX.cpp" + > + </File> + <File + RelativePath="CImageLoaderPCX.h" + > + </File> + <File + RelativePath="CImageLoaderPNG.cpp" + > + </File> + <File + RelativePath="CImageLoaderPNG.h" + > + </File> + <File + RelativePath="CImageLoaderPPM.cpp" + > + </File> + <File + RelativePath="CImageLoaderPPM.h" + > + </File> + <File + RelativePath="CImageLoaderPSD.cpp" + > + </File> + <File + RelativePath="CImageLoaderPSD.h" + > + </File> + <File + RelativePath="CImageLoaderRGB.cpp" + > + </File> + <File + RelativePath="CImageLoaderRGB.h" + > + </File> + <File + RelativePath="CImageLoaderTGA.cpp" + > + </File> + <File + RelativePath="CImageLoaderTGA.h" + > + </File> + <File + RelativePath="CImageLoaderWAL.cpp" + > + </File> + <File + RelativePath="CImageLoaderWAL.h" + > + </File> + <File + RelativePath=".\CNullDriver.cpp" + > + </File> + <File + RelativePath=".\CNullDriver.h" + > + </File> + <File + RelativePath="IImagePresenter.h" + > + </File> + <Filter + Name="Writer" + > + <File + RelativePath=".\CImageWriterBMP.cpp" + > + </File> + <File + RelativePath=".\CImageWriterBMP.h" + > + </File> + <File + RelativePath=".\CImageWriterJPG.cpp" + > + </File> + <File + RelativePath=".\CImageWriterJPG.h" + > + </File> + <File + RelativePath=".\CImageWriterPCX.cpp" + > + </File> + <File + RelativePath=".\CImageWriterPCX.h" + > + </File> + <File + RelativePath=".\CImageWriterPNG.cpp" + > + </File> + <File + RelativePath=".\CImageWriterPNG.h" + > + </File> + <File + RelativePath=".\CImageWriterPPM.cpp" + > + </File> + <File + RelativePath=".\CImageWriterPPM.h" + > + </File> + <File + RelativePath=".\CImageWriterPSD.cpp" + > + </File> + <File + RelativePath=".\CImageWriterPSD.h" + > + </File> + <File + RelativePath=".\CImageWriterTGA.cpp" + > + </File> + <File + RelativePath=".\CImageWriterTGA.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="Direct3D9" + > + <File + RelativePath="CD3D9CgMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9CgMaterialRenderer.h" + > + </File> + <File + RelativePath=".\CD3D9Driver.cpp" + > + </File> + <File + RelativePath=".\CD3D9Driver.h" + > + </File> + <File + RelativePath=".\CD3D9HLSLMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D9HLSLMaterialRenderer.h" + > + </File> + <File + RelativePath=".\CD3D9MaterialRenderer.h" + > + </File> + <File + RelativePath=".\CD3D9NormalMapRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D9NormalMapRenderer.h" + > + </File> + <File + RelativePath=".\CD3D9ParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D9ParallaxMapRenderer.h" + > + </File> + <File + RelativePath=".\CD3D9ShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\CD3D9ShaderMaterialRenderer.h" + > + </File> + <File + RelativePath=".\CD3D9Texture.cpp" + > + </File> + <File + RelativePath=".\CD3D9Texture.h" + > + </File> + </Filter> + <Filter + Name="Burning Video" + > + <File + RelativePath=".\CBurningShader_Raster_Reference.cpp" + > + </File> + <File + RelativePath=".\CDepthBuffer.cpp" + > + </File> + <File + RelativePath=".\CDepthBuffer.h" + > + </File> + <File + RelativePath=".\CSoftware2MaterialRenderer.h" + > + </File> + <File + RelativePath=".\CSoftwareDriver2.cpp" + > + </File> + <File + RelativePath=".\CSoftwareDriver2.h" + > + </File> + <File + RelativePath=".\CSoftwareTexture2.cpp" + > + </File> + <File + RelativePath=".\CSoftwareTexture2.h" + > + </File> + <File + RelativePath=".\CTRGouraud2.cpp" + > + </File> + <File + RelativePath=".\CTRGouraudAlpha2.cpp" + > + </File> + <File + RelativePath=".\CTRGouraudAlphaNoZ2.cpp" + > + </File> + <File + RelativePath=".\CTRNormalMap.cpp" + > + </File> + <File + RelativePath=".\CTRStencilShadow.cpp" + > + </File> + <File + RelativePath=".\CTRTextureBlend.cpp" + > + </File> + <File + RelativePath=".\CTRTextureDetailMap2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraud2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudAdd2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudAddNoZ2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudAlpha.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudAlphaNoZ.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudNoZ2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureGouraudVertexAlpha2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureLightMap2_Add.cpp" + > + </File> + <File + RelativePath=".\CTRTextureLightMap2_M1.cpp" + > + </File> + <File + RelativePath=".\CTRTextureLightMap2_M2.cpp" + > + </File> + <File + RelativePath=".\CTRTextureLightMap2_M4.cpp" + > + </File> + <File + RelativePath=".\CTRTextureLightMapGouraud2_M4.cpp" + > + </File> + <File + RelativePath=".\CTRTextureWire2.cpp" + > + </File> + <File + RelativePath=".\IBurningShader.cpp" + > + </File> + <File + RelativePath=".\IBurningShader.h" + > + </File> + <File + RelativePath=".\IDepthBuffer.h" + > + </File> + <File + RelativePath=".\S4DVertex.h" + > + </File> + <File + RelativePath=".\SoftwareDriver2_compile_config.h" + > + </File> + <File + RelativePath=".\SoftwareDriver2_helper.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="scene impl" + > + <File + RelativePath=".\CDefaultSceneNodeAnimatorFactory.cpp" + > + </File> + <File + RelativePath=".\CDefaultSceneNodeAnimatorFactory.h" + > + </File> + <File + RelativePath=".\CDefaultSceneNodeFactory.cpp" + > + </File> + <File + RelativePath=".\CDefaultSceneNodeFactory.h" + > + </File> + <File + RelativePath=".\CGeometryCreator.cpp" + > + </File> + <File + RelativePath=".\CGeometryCreator.h" + > + </File> + <File + RelativePath=".\CMeshCache.cpp" + > + </File> + <File + RelativePath=".\CMeshCache.h" + > + </File> + <File + RelativePath="CMeshManipulator.cpp" + > + </File> + <File + RelativePath="CMeshManipulator.h" + > + </File> + <File + RelativePath="CSceneLoaderIrr.cpp" + > + </File> + <File + RelativePath="CSceneLoaderIrr.h" + > + </File> + <File + RelativePath="CSceneManager.cpp" + > + </File> + <File + RelativePath="CSceneManager.h" + > + </File> + <Filter + Name="loaders" + > + <File + RelativePath=".\C3DSMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\C3DSMeshFileLoader.h" + > + </File> + <File + RelativePath="CSMFMeshFileLoader.cpp"> + </File> + <File + RelativePath="CSMFMeshFileLoader.h"> + </File> + <File + RelativePath=".\CAnimatedMeshHalfLife.cpp" + > + </File> + <File + RelativePath=".\CAnimatedMeshHalfLife.h" + > + </File> + <File + RelativePath=".\CAnimatedMeshMD2.cpp" + > + </File> + <File + RelativePath=".\CAnimatedMeshMD2.h" + > + </File> + <File + RelativePath=".\CAnimatedMeshMD3.cpp" + > + </File> + <File + RelativePath=".\CAnimatedMeshMD3.h" + > + </File> + <File + RelativePath=".\CB3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CB3DMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CBSPMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CBSPMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CColladaFileLoader.cpp" + > + </File> + <File + RelativePath=".\CColladaFileLoader.h" + > + </File> + <File + RelativePath=".\CCSMLoader.cpp" + > + </File> + <File + RelativePath=".\CCSMLoader.h" + > + </File> + <File + RelativePath=".\CDMFLoader.cpp" + > + </File> + <File + RelativePath=".\CDMFLoader.h" + > + </File> + <File + RelativePath=".\CIrrMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CIrrMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CLMTSMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CLMTSMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CLWOMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CLWOMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CMD2MeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CMD2MeshFileLoader.h" + > + </File> + <File + RelativePath=".\CMD3MeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CMD3MeshFileLoader.h" + > + </File> + <File + RelativePath=".\CMS3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CMS3DMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CMY3DHelper.h" + > + </File> + <File + RelativePath=".\CMY3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CMY3DMeshFileLoader.h" + > + </File> + <File + RelativePath=".\COBJMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\COBJMeshFileLoader.h" + > + </File> + <File + RelativePath=".\COCTLoader.cpp" + > + </File> + <File + RelativePath=".\COCTLoader.h" + > + </File> + <File + RelativePath=".\COgreMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\COgreMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CPLYMeshFileLoader.cpp" + > + </File> + <File + RelativePath=".\CPLYMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CQ3LevelMesh.cpp" + > + </File> + <File + RelativePath=".\CQ3LevelMesh.h" + > + </File> + <File + RelativePath=".\CSkinnedMesh.cpp" + > + </File> + <File + RelativePath=".\CSkinnedMesh.h" + > + </File> + <File + RelativePath="CSTLMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CSTLMeshFileLoader.h" + > + </File> + <File + RelativePath="CXMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CXMeshFileLoader.h" + > + </File> + <File + RelativePath=".\dmfsupport.h" + > + </File> + </Filter> + <Filter + Name="sceneNodes" + > + <File + RelativePath=".\CAnimatedMeshSceneNode.cpp" + > + </File> + <File + RelativePath=".\CAnimatedMeshSceneNode.h" + > + </File> + <File + RelativePath=".\CBillboardSceneNode.cpp" + > + </File> + <File + RelativePath=".\CBillboardSceneNode.h" + > + </File> + <File + RelativePath=".\CBoneSceneNode.cpp" + > + </File> + <File + RelativePath=".\CBoneSceneNode.h" + > + </File> + <File + RelativePath=".\CCameraSceneNode.cpp" + > + </File> + <File + RelativePath=".\CCameraSceneNode.h" + > + </File> + <File + RelativePath=".\CCubeSceneNode.cpp" + > + </File> + <File + RelativePath=".\CCubeSceneNode.h" + > + </File> + <File + RelativePath=".\CDummyTransformationSceneNode.cpp" + > + </File> + <File + RelativePath=".\CDummyTransformationSceneNode.h" + > + </File> + <File + RelativePath="CEmptySceneNode.cpp" + > + </File> + <File + RelativePath="CEmptySceneNode.h" + > + </File> + <File + RelativePath=".\CLightSceneNode.cpp" + > + </File> + <File + RelativePath=".\CLightSceneNode.h" + > + </File> + <File + RelativePath=".\CMeshSceneNode.cpp" + > + </File> + <File + RelativePath=".\CMeshSceneNode.h" + > + </File> + <File + RelativePath=".\COctreeSceneNode.cpp" + > + </File> + <File + RelativePath=".\COctreeSceneNode.h" + > + </File> + <File + RelativePath=".\CQuake3ShaderSceneNode.cpp" + > + </File> + <File + RelativePath=".\CQuake3ShaderSceneNode.h" + > + </File> + <File + RelativePath=".\CShadowVolumeSceneNode.cpp" + > + </File> + <File + RelativePath=".\CShadowVolumeSceneNode.h" + > + </File> + <File + RelativePath=".\CSkyBoxSceneNode.cpp" + > + </File> + <File + RelativePath=".\CSkyBoxSceneNode.h" + > + </File> + <File + RelativePath=".\CSkyDomeSceneNode.cpp" + > + </File> + <File + RelativePath=".\CSkyDomeSceneNode.h" + > + </File> + <File + RelativePath=".\CSphereSceneNode.cpp" + > + </File> + <File + RelativePath=".\CSphereSceneNode.h" + > + </File> + <File + RelativePath="CTerrainSceneNode.cpp" + > + </File> + <File + RelativePath="CTerrainSceneNode.h" + > + </File> + <File + RelativePath=".\CTextSceneNode.cpp" + > + </File> + <File + RelativePath=".\CTextSceneNode.h" + > + </File> + <File + RelativePath=".\CVolumeLightSceneNode.cpp" + > + </File> + <File + RelativePath=".\CVolumeLightSceneNode.h" + > + </File> + <File + RelativePath="CWaterSurfaceSceneNode.cpp" + > + </File> + <File + RelativePath="CWaterSurfaceSceneNode.h" + > + </File> + </Filter> + <Filter + Name="particleSystem" + > + <File + RelativePath="CParticleAnimatedMeshSceneNodeEmitter.cpp" + > + </File> + <File + RelativePath="CParticleAttractionAffector.cpp" + > + </File> + <File + RelativePath="CParticleBoxEmitter.cpp" + > + </File> + <File + RelativePath="CParticleBoxEmitter.h" + > + </File> + <File + RelativePath="CParticleCylinderEmitter.cpp" + > + </File> + <File + RelativePath="CParticleFadeOutAffector.cpp" + > + </File> + <File + RelativePath="CParticleFadeOutAffector.h" + > + </File> + <File + RelativePath="CParticleGravityAffector.cpp" + > + </File> + <File + RelativePath="CParticleGravityAffector.h" + > + </File> + <File + RelativePath="CParticleMeshEmitter.cpp" + > + </File> + <File + RelativePath="CParticlePointEmitter.cpp" + > + </File> + <File + RelativePath="CParticlePointEmitter.h" + > + </File> + <File + RelativePath="CParticleRingEmitter.cpp" + > + </File> + <File + RelativePath="CParticleRotationAffector.cpp" + > + </File> + <File + RelativePath="CParticleScaleAffector.cpp" + > + </File> + <File + RelativePath="CParticleScaleAffector.cpp" + > + </File> + <File + RelativePath="CParticleScaleAffector.h" + > + </File> + <File + RelativePath="CParticleScaleAffector.h" + > + </File> + <File + RelativePath="CParticleSphereEmitter.cpp" + > + </File> + <File + RelativePath="CParticleSystemSceneNode.cpp" + > + </File> + <File + RelativePath="CParticleSystemSceneNode.h" + > + </File> + </Filter> + <Filter + Name="collision" + > + <File + RelativePath="CMetaTriangleSelector.cpp" + > + </File> + <File + RelativePath="CMetaTriangleSelector.h" + > + </File> + <File + RelativePath="COctreeTriangleSelector.cpp" + > + </File> + <File + RelativePath="COctreeTriangleSelector.h" + > + </File> + <File + RelativePath="CSceneCollisionManager.cpp" + > + </File> + <File + RelativePath="CSceneCollisionManager.h" + > + </File> + <File + RelativePath="CTerrainTriangleSelector.cpp" + > + </File> + <File + RelativePath="CTerrainTriangleSelector.h" + > + </File> + <File + RelativePath="CTriangleBBSelector.cpp" + > + </File> + <File + RelativePath="CTriangleBBSelector.h" + > + </File> + <File + RelativePath="CTriangleSelector.cpp" + > + </File> + <File + RelativePath="CTriangleSelector.h" + > + </File> + <File + RelativePath=".\Octree.h" + > + </File> + </Filter> + <Filter + Name="animators" + > + <File + RelativePath="CSceneNodeAnimatorCameraFPS.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraFPS.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraMaya.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraMaya.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCollisionResponse.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCollisionResponse.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorDelete.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorDelete.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyCircle.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyCircle.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyStraight.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyStraight.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFollowSpline.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFollowSpline.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorRotation.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorRotation.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorTexture.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorTexture.h" + > + </File> + </Filter> + <Filter + Name="writers" + > + <File + RelativePath="CColladaMeshWriter.cpp" + > + </File> + <File + RelativePath="CColladaMeshWriter.h" + > + </File> + <File + RelativePath="CIrrMeshWriter.cpp" + > + </File> + <File + RelativePath="CIrrMeshWriter.h" + > + </File> + <File + RelativePath="COBJMeshWriter.cpp" + > + </File> + <File + RelativePath="COBJMeshWriter.h" + > + </File> + <File + RelativePath="CPLYMeshWriter.cpp" + > + </File> + <File + RelativePath="CPLYMeshWriter.h" + > + </File> + <File + RelativePath="CSTLMeshWriter.cpp" + > + </File> + <File + RelativePath="CSTLMeshWriter.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="io impl" + > + <File + RelativePath="CAttributeImpl.h" + > + </File> + <File + RelativePath="CAttributes.cpp" + > + </File> + <File + RelativePath="CAttributes.h" + > + </File> + <File + RelativePath="CFileList.cpp" + > + </File> + <File + RelativePath="CFileList.h" + > + </File> + <File + RelativePath="CFileSystem.cpp" + > + </File> + <File + RelativePath="CFileSystem.h" + > + </File> + <File + RelativePath="CLimitReadFile.cpp" + > + </File> + <File + RelativePath="CLimitReadFile.h" + > + </File> + <File + RelativePath="CMemoryFile.cpp" + > + </File> + <File + RelativePath="CMemoryFile.h" + > + </File> + <File + RelativePath="CMountPointReader.cpp" + > + </File> + <File + RelativePath="CMountPointReader.h" + > + </File> + <File + RelativePath="CNPKReader.cpp" + > + </File> + <File + RelativePath="CNPKReader.h" + > + </File> + <File + RelativePath="CPakReader.cpp" + > + </File> + <File + RelativePath="CPakReader.h" + > + </File> + <File + RelativePath="CReadFile.cpp" + > + </File> + <File + RelativePath="CReadFile.cpp" + > + </File> + <File + RelativePath="CReadFile.h" + > + </File> + <File + RelativePath="CTarReader.cpp" + > + </File> + <File + RelativePath="CTarReader.h" + > + </File> + <File + RelativePath=".\CWADReader.cpp" + > + </File> + <File + RelativePath=".\CWADReader.h" + > + </File> + <File + RelativePath="CWriteFile.cpp" + > + </File> + <File + RelativePath="CWriteFile.h" + > + </File> + <File + RelativePath="CXMLReader.cpp" + > + </File> + <File + RelativePath="CXMLReader.h" + > + </File> + <File + RelativePath="CXMLReaderImpl.h" + > + </File> + <File + RelativePath="CXMLWriter.cpp" + > + </File> + <File + RelativePath="CXMLWriter.h" + > + </File> + <File + RelativePath="CZipReader.cpp" + > + </File> + <File + RelativePath="CZipReader.h" + > + </File> + <File + RelativePath="IAttribute.h" + > + </File> + <File + RelativePath="irrXML.cpp" + > + </File> + </Filter> + <Filter + Name="irr impl" + > + <File + RelativePath=".\CIrrDeviceConsole.cpp" + > + </File> + <File + RelativePath=".\CIrrDeviceConsole.h" + > + </File> + <File + RelativePath="CIrrDeviceLinux.cpp" + > + </File> + <File + RelativePath="CIrrDeviceLinux.h" + > + </File> + <File + RelativePath=".\CIrrDeviceSDL.cpp" + > + </File> + <File + RelativePath=".\CIrrDeviceSDL.h" + > + </File> + <File + RelativePath="CIrrDeviceStub.cpp" + > + </File> + <File + RelativePath="CIrrDeviceStub.h" + > + </File> + <File + RelativePath="CIrrDeviceWin32.cpp" + > + </File> + <File + RelativePath="CIrrDeviceWin32.h" + > + </File> + <File + RelativePath="CLogger.cpp" + > + </File> + <File + RelativePath="CLogger.h" + > + </File> + <File + RelativePath="COSOperator.cpp" + > + </File> + <File + RelativePath="COSOperator.h" + > + </File> + <File + RelativePath="CTimer.h" + > + </File> + <File + RelativePath=".\Irrlicht.cpp" + > + </File> + <File + RelativePath="os.cpp" + > + </File> + <File + RelativePath="os.h" + > + </File> + <Filter + Name="extern" + > + <File + RelativePath=".\lzma\LzmaDec.c" + > + </File> + <File + RelativePath=".\lzma\LzmaDec.h" + > + </File> + <File + RelativePath=".\lzma\Types.h" + > + </File> + <Filter + Name="zlib" + > + <File + RelativePath="zlib\adler32.c" + > + </File> + <File + RelativePath="zlib\compress.c" + > + </File> + <File + RelativePath="zlib\crc32.c" + > + </File> + <File + RelativePath="zlib\crc32.h" + > + </File> + <File + RelativePath="zlib\deflate.c" + > + </File> + <File + RelativePath="zlib\deflate.h" + > + </File> + <File + RelativePath="zlib\inffast.c" + > + </File> + <File + RelativePath="zlib\inffast.h" + > + </File> + <File + RelativePath="zlib\inffixed.h" + > + </File> + <File + RelativePath="zlib\inflate.c" + > + </File> + <File + RelativePath="zlib\inftrees.c" + > + </File> + <File + RelativePath="zlib\inftrees.h" + > + </File> + <File + RelativePath="zlib\trees.c" + > + </File> + <File + RelativePath="zlib\trees.h" + > + </File> + <File + RelativePath="zlib\uncompr.c" + > + </File> + <File + RelativePath="zlib\zconf.h" + > + </File> + <File + RelativePath="zlib\zlib.h" + > + </File> + <File + RelativePath="zlib\zutil.c" + > + </File> + <File + RelativePath="zlib\zutil.h" + > + </File> + </Filter> + <Filter + Name="jpeglib" + > + <File + RelativePath="jpeglib\cderror.h" + > + </File> + <File + RelativePath="jpeglib\jaricom.c" + > + </File> + <File + RelativePath="jpeglib\jcapimin.c" + > + </File> + <File + RelativePath="jpeglib\jcapistd.c" + > + </File> + <File + RelativePath="jpeglib\jcarith.c" + > + </File> + <File + RelativePath="jpeglib\jccoefct.c" + > + </File> + <File + RelativePath="jpeglib\jccolor.c" + > + </File> + <File + RelativePath="jpeglib\jcdctmgr.c" + > + </File> + <File + RelativePath="jpeglib\jchuff.c" + > + </File> + <File + RelativePath="jpeglib\jcinit.c" + > + </File> + <File + RelativePath="jpeglib\jcmainct.c" + > + </File> + <File + RelativePath="jpeglib\jcmarker.c" + > + </File> + <File + RelativePath="jpeglib\jcmaster.c" + > + </File> + <File + RelativePath="jpeglib\jcomapi.c" + > + </File> + <File + RelativePath="jpeglib\jconfig.h" + > + </File> + <File + RelativePath="jpeglib\jcparam.c" + > + </File> + <File + RelativePath="jpeglib\jcprepct.c" + > + </File> + <File + RelativePath="jpeglib\jcsample.c" + > + </File> + <File + RelativePath="jpeglib\jctrans.c" + > + </File> + <File + RelativePath="jpeglib\jdapimin.c" + > + </File> + <File + RelativePath="jpeglib\jdapistd.c" + > + </File> + <File + RelativePath="jpeglib\jdarith.c" + > + </File> + <File + RelativePath="jpeglib\jdatadst.c" + > + </File> + <File + RelativePath="jpeglib\jdatasrc.c" + > + </File> + <File + RelativePath="jpeglib\jdcoefct.c" + > + </File> + <File + RelativePath="jpeglib\jdcolor.c" + > + </File> + <File + RelativePath="jpeglib\jdct.h" + > + </File> + <File + RelativePath="jpeglib\jddctmgr.c" + > + </File> + <File + RelativePath="jpeglib\jdhuff.c" + > + </File> + <File + RelativePath="jpeglib\jdinput.c" + > + </File> + <File + RelativePath="jpeglib\jdmainct.c" + > + </File> + <File + RelativePath="jpeglib\jdmarker.c" + > + </File> + <File + RelativePath="jpeglib\jdmaster.c" + > + </File> + <File + RelativePath="jpeglib\jdmerge.c" + > + </File> + <File + RelativePath="jpeglib\jdpostct.c" + > + </File> + <File + RelativePath="jpeglib\jdsample.c" + > + </File> + <File + RelativePath="jpeglib\jdtrans.c" + > + </File> + <File + RelativePath="jpeglib\jerror.c" + > + </File> + <File + RelativePath="jpeglib\jerror.h" + > + </File> + <File + RelativePath="jpeglib\jfdctflt.c" + > + </File> + <File + RelativePath="jpeglib\jfdctfst.c" + > + </File> + <File + RelativePath="jpeglib\jfdctint.c" + > + </File> + <File + RelativePath="jpeglib\jidctflt.c" + > + </File> + <File + RelativePath="jpeglib\jidctfst.c" + > + </File> + <File + RelativePath="jpeglib\jidctint.c" + > + </File> + <File + RelativePath="jpeglib\jinclude.h" + > + </File> + <File + RelativePath="jpeglib\jmemmgr.c" + > + </File> + <File + RelativePath="jpeglib\jmemnobs.c" + > + </File> + <File + RelativePath="jpeglib\jmemsys.h" + > + </File> + <File + RelativePath="jpeglib\jmorecfg.h" + > + </File> + <File + RelativePath="jpeglib\jpegint.h" + > + </File> + <File + RelativePath="jpeglib\jpeglib.h" + > + </File> + <File + RelativePath="jpeglib\jquant1.c" + > + </File> + <File + RelativePath="jpeglib\jquant2.c" + > + </File> + <File + RelativePath="jpeglib\jutils.c" + > + </File> + <File + RelativePath="jpeglib\jversion.h" + > + </File> + </Filter> + <Filter + Name="libpng" + > + <File + RelativePath=".\libpng\png.c" + > + </File> + <File + RelativePath=".\libpng\png.h" + > + </File> + <File + RelativePath=".\libpng\pngconf.h" + > + </File> + <File + RelativePath=".\libpng\pngerror.c" + > + </File> + <File + RelativePath=".\libpng\pngget.c" + > + </File> + <File + RelativePath=".\libpng\pngmem.c" + > + </File> + <File + RelativePath=".\libpng\pngpread.c" + > + </File> + <File + RelativePath=".\libpng\pngread.c" + > + </File> + <File + RelativePath=".\libpng\pngrio.c" + > + </File> + <File + RelativePath=".\libpng\pngrtran.c" + > + </File> + <File + RelativePath=".\libpng\pngrutil.c" + > + </File> + <File + RelativePath=".\libpng\pngset.c" + > + </File> + <File + RelativePath=".\libpng\pngtrans.c" + > + </File> + <File + RelativePath=".\libpng\pngwio.c" + > + </File> + <File + RelativePath=".\libpng\pngwrite.c" + > + </File> + <File + RelativePath=".\libpng\pngwtran.c" + > + </File> + <File + RelativePath=".\libpng\pngwutil.c" + > + </File> + </Filter> + <Filter + Name="aesGladman" + > + <File + RelativePath=".\aesGladman\aes.h" + > + </File> + <File + RelativePath=".\aesGladman\aescrypt.cpp" + > + </File> + <File + RelativePath=".\aesGladman\aeskey.cpp" + > + </File> + <File + RelativePath=".\aesGladman\aesopt.h" + > + </File> + <File + RelativePath=".\aesGladman\aestab.cpp" + > + </File> + <File + RelativePath=".\aesGladman\fileenc.cpp" + > + </File> + <File + RelativePath=".\aesGladman\fileenc.h" + > + </File> + <File + RelativePath=".\aesGladman\hmac.cpp" + > + </File> + <File + RelativePath=".\aesGladman\hmac.h" + > + </File> + <File + RelativePath=".\aesGladman\prng.cpp" + > + </File> + <File + RelativePath=".\aesGladman\prng.h" + > + </File> + <File + RelativePath=".\aesGladman\pwd2key.cpp" + > + </File> + <File + RelativePath=".\aesGladman\pwd2key.h" + > + </File> + <File + RelativePath=".\aesGladman\sha1.cpp" + > + </File> + <File + RelativePath=".\aesGladman\sha1.h" + > + </File> + <File + RelativePath=".\aesGladman\sha2.cpp" + > + </File> + <File + RelativePath=".\aesGladman\sha2.h" + > + </File> + </Filter> + <Filter + Name="bzip2" + > + <File + RelativePath=".\bzip2\blocksort.c" + > + </File> + <File + RelativePath=".\bzip2\bzcompress.c" + > + </File> + <File + RelativePath=".\bzip2\bzlib.c" + > + </File> + <File + RelativePath=".\bzip2\bzlib.h" + > + </File> + <File + RelativePath=".\bzip2\bzlib_private.h" + > + </File> + <File + RelativePath=".\bzip2\crctable.c" + > + </File> + <File + RelativePath=".\bzip2\decompress.c" + > + </File> + <File + RelativePath=".\bzip2\huffman.c" + > + </File> + <File + RelativePath=".\bzip2\randtable.c" + > + </File> + </Filter> + </Filter> + </Filter> + <Filter + Name="doc" + > + <File + RelativePath="..\..\changes.txt" + > + </File> + <File + RelativePath="..\..\readme.txt" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.sln b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.sln new file mode 100644 index 0000000..17f0dab --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht9.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release - Fast FPU|Win32 = Release - Fast FPU|Win32 + Release|Win32 = Release|Win32 + Static lib - Debug|Win32 = Static lib - Debug|Win32 + Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 + Static lib - Release|Win32 = Static lib - Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.vcproj b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.vcproj new file mode 100644 index 0000000..610fbcf --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht9.0.vcproj @@ -0,0 +1,3656 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="Irrlicht" + ProjectGUID="{E08E042A-6C45-411B-92BE-3CC31331019F}" + RootNamespace="Irrlicht" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Debug/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="false" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrDebug/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrDebug/" + ObjectFile=".\..\obj\IrrDebug/" + ProgramDataBaseFileName=".\..\obj\IrrDebug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseLibraryDependencyInputs="true" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\obj\IrrDebug\Irrlicht.pdb" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="false" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\..\obj\IrrRelease/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrRelease/" + ObjectFile=".\..\obj\IrrRelease/" + ProgramDataBaseFileName=".\..\obj\IrrRelease/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="false" + ProgramDatabaseFile="..\obj\IrrRelease\Irrlicht.pdb" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release - Fast FPU|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + StructMemberAlignment="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="false" + EnableEnhancedInstructionSet="2" + FloatingPointModel="2" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrRelease/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrReleaseFastFPU/" + ObjectFile=".\..\obj\IrrReleaseFastFPU/" + ProgramDataBaseFileName=".\..\obj\IrrReleaseFastFPU/" + WarningLevel="3" + WarnAsError="false" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="false" + ProgramDatabaseFile="..\obj\IrrRelease\Irrlicht.pdb" + SubSystem="2" + OptimizeReferences="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Static lib - Debug|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Debug/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="false" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrDebug/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrDebugStatic/" + ObjectFile=".\..\obj\IrrDebugStatic/" + ProgramDataBaseFileName=".\..\obj\IrrDebugStatic/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="winmm.lib" + OutputFile="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Static lib - Release|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="false" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\..\obj\IrrRelease/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrReleaseStatic/" + ObjectFile=".\..\obj\IrrReleaseStatic/" + ProgramDataBaseFileName=".\..\obj\IrrReleaseStatic/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="winmm.lib" + OutputFile="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Static lib - Release - Fast FPU|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="0" + OmitFramePointers="true" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + FloatingPointModel="2" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrRelease/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrReleaseFastFPUStatic/" + ObjectFile=".\..\obj\IrrReleaseFastFPUStatic/" + ProgramDataBaseFileName=".\..\obj\IrrReleaseFastFPUStatic/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CallingConvention="1" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="winmm.lib" + OutputFile="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="SDL-Debug|Win32" + OutputDirectory="obj\$(ConfigurationName)" + IntermediateDirectory="obj\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Debug/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1" + ExceptionHandling="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + DisableLanguageExtensions="false" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrDebug/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrDebug/" + ObjectFile=".\..\obj\IrrDebug/" + ProgramDataBaseFileName=".\..\obj\IrrDebug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseLibraryDependencyInputs="true" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\obj\IrrDebug\Irrlicht.pdb" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="include" + > + <File + RelativePath="..\..\include\IEventReceiver.h" + > + </File> + <File + RelativePath="..\..\include\ILogger.h" + > + </File> + <File + RelativePath="..\..\include\IOSOperator.h" + > + </File> + <File + RelativePath="..\..\include\IReferenceCounted.h" + > + </File> + <File + RelativePath="..\..\include\IrrCompileConfig.h" + > + </File> + <File + RelativePath="..\..\include\irrlicht.h" + > + </File> + <File + RelativePath="..\..\include\IrrlichtDevice.h" + > + </File> + <File + RelativePath="..\..\include\irrTypes.h" + > + </File> + <File + RelativePath="..\..\include\ITimer.h" + > + </File> + <File + RelativePath="..\..\include\Keycodes.h" + > + </File> + <File + RelativePath="..\..\include\SIrrCreationParameters.h" + > + </File> + <File + RelativePath="..\..\include\SKeyMap.h" + > + </File> + <Filter + Name="video" + > + <File + RelativePath="..\..\include\EDriverFeatures.h" + > + </File> + <File + RelativePath="..\..\include\EDriverTypes.h" + > + </File> + <File + RelativePath="..\..\include\IGeometryCreator.h" + > + </File> + <File + RelativePath="..\..\include\IGPUProgrammingServices.h" + > + </File> + <File + RelativePath="..\..\include\IImage.h" + > + </File> + <File + RelativePath="..\..\include\IImageLoader.h" + > + </File> + <File + RelativePath="..\..\include\IMaterialRenderer.h" + > + </File> + <File + RelativePath="..\..\include\IMaterialRendererServices.h" + > + </File> + <File + RelativePath="..\..\include\IShaderConstantSetCallBack.h" + > + </File> + <File + RelativePath="..\..\include\ITexture.h" + > + </File> + <File + RelativePath="..\..\include\IVideoDriver.h" + > + </File> + <File + RelativePath="..\..\include\IVideoModeList.h" + > + </File> + <File + RelativePath="..\..\include\S3DVertex.h" + > + </File> + <File + RelativePath="..\..\include\SColor.h" + > + </File> + <File + RelativePath="..\..\include\SExposedVideoData.h" + > + </File> + <File + RelativePath="..\..\include\SLight.h" + > + </File> + <File + RelativePath="..\..\include\SMaterial.h" + > + </File> + <File + RelativePath="..\..\include\SMaterialLayer.h" + > + </File> + </Filter> + <Filter + Name="core" + > + <File + RelativePath="..\..\include\aabbox3d.h" + > + </File> + <File + RelativePath="..\..\include\coreutil.h" + > + </File> + <File + RelativePath="..\..\include\dimension2d.h" + > + </File> + <File + RelativePath="..\..\include\heapsort.h" + > + </File> + <File + RelativePath="..\..\include\irrAllocator.h" + > + </File> + <File + RelativePath="..\..\include\irrArray.h" + > + </File> + <File + RelativePath="..\..\include\irrList.h" + > + </File> + <File + RelativePath="..\..\include\irrMap.h" + > + </File> + <File + RelativePath="..\..\include\irrMath.h" + > + </File> + <File + RelativePath="..\..\include\irrString.h" + > + </File> + <File + RelativePath="..\..\include\line2d.h" + > + </File> + <File + RelativePath="..\..\include\line3d.h" + > + </File> + <File + RelativePath="..\..\include\matrix4.h" + > + </File> + <File + RelativePath="..\..\include\plane3d.h" + > + </File> + <File + RelativePath="..\..\include\position2d.h" + > + </File> + <File + RelativePath="..\..\include\quaternion.h" + > + </File> + <File + RelativePath="..\..\include\rect.h" + > + </File> + <File + RelativePath="..\..\include\triangle3d.h" + > + </File> + <File + RelativePath="..\..\include\vector2d.h" + > + </File> + <File + RelativePath="..\..\include\vector3d.h" + > + </File> + </Filter> + <Filter + Name="io" + > + <File + RelativePath="..\..\include\EAttributes.h" + > + </File> + <File + RelativePath="..\..\include\IAttributeExchangingObject.h" + > + </File> + <File + RelativePath="..\..\include\IAttributes.h" + > + </File> + <File + RelativePath="..\..\include\IFileList.h" + > + </File> + <File + RelativePath="..\..\include\IFileSystem.h" + > + </File> + <File + RelativePath="..\..\include\IReadFile.h" + > + </File> + <File + RelativePath="..\..\include\irrXML.h" + > + </File> + <File + RelativePath="..\..\include\IWriteFile.h" + > + </File> + <File + RelativePath="..\..\include\IXMLReader.h" + > + </File> + <File + RelativePath="..\..\include\IXMLWriter.h" + > + </File> + <File + RelativePath="..\..\include\path.h" + > + </File> + </Filter> + <Filter + Name="scene" + > + <File + RelativePath="..\..\include\CDynamicMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\CIndexBuffer.h" + > + </File> + <File + RelativePath="..\..\include\CMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\CVertexBuffer.h" + > + </File> + <File + RelativePath="..\..\include\ECullingTypes.h" + > + </File> + <File + RelativePath="..\..\include\EDebugSceneTypes.h" + > + </File> + <File + RelativePath="..\..\include\EMeshWriterEnums.h" + > + </File> + <File + RelativePath="..\..\include\EPrimitiveTypes.h" + > + </File> + <File + RelativePath="..\..\include\ESceneNodeAnimatorTypes.h" + > + </File> + <File + RelativePath="..\..\include\ESceneNodeTypes.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMesh.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD2.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD3.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IBillboardSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ICameraSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IDummyTransformationSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ILightSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IMesh.h" + > + </File> + <File + RelativePath="..\..\include\IMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\IMeshCache.h" + > + </File> + <File + RelativePath="..\..\include\IMeshLoader.h" + > + </File> + <File + RelativePath="..\..\include\IMeshManipulator.h" + > + </File> + <File + RelativePath="..\..\include\IMeshSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IMeshWriter.h" + > + </File> + <File + RelativePath="..\..\include\IMetaTriangleSelector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleAttractionAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleBoxEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleCylinderEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleFadeOutAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleGravityAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleMeshEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleRingEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleRotationAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleSphereEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleSystemSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IQ3LevelMesh.h" + > + </File> + <File + RelativePath="..\..\include\IQ3Shader.h" + > + </File> + <File + RelativePath="..\..\include\ISceneCollisionManager.h" + > + </File> + <File + RelativePath="..\..\include\ISceneLoader.h" + > + </File> + <File + RelativePath="..\..\include\ISceneManager.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimator.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraFPS.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraMaya.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCollisionResponse.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorFactory.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeFactory.h" + > + </File> + <File + RelativePath="..\..\include\IShadowVolumeSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ISkinnedMesh.h" + > + </File> + <File + RelativePath="..\..\include\ITerrainSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ITextSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ITriangleSelector.h" + > + </File> + <File + RelativePath="..\..\include\IVolumeLightSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\SAnimatedMesh.h" + > + </File> + <File + RelativePath="..\..\include\SceneParameters.h" + > + </File> + <File + RelativePath="..\..\include\SMesh.h" + > + </File> + <File + RelativePath="..\..\include\SMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\SMeshBufferLightMap.h" + > + </File> + <File + RelativePath="..\..\include\SMeshBufferTangents.h" + > + </File> + <File + RelativePath="..\..\include\SParticle.h" + > + </File> + <File + RelativePath="..\..\include\SSkinMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\SViewFrustum.h" + > + </File> + </Filter> + <Filter + Name="gui" + > + <File + RelativePath="..\..\include\EGUIAlignment.h" + > + </File> + <File + RelativePath="..\..\include\EGUIElementTypes.h" + > + </File> + <File + RelativePath="..\..\include\EMessageBoxFlags.h" + > + </File> + <File + RelativePath="..\..\include\ICursorControl.h" + > + </File> + <File + RelativePath="..\..\include\IGUIButton.h" + > + </File> + <File + RelativePath="..\..\include\IGUICheckbox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIComboBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIContextMenu.h" + > + </File> + <File + RelativePath="..\..\include\IGUIEditBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIElement.h" + > + </File> + <File + RelativePath="..\..\include\IGUIElementFactory.h" + > + </File> + <File + RelativePath="..\..\include\IGUIEnvironment.h" + > + </File> + <File + RelativePath="..\..\include\IGUIFileOpenDialog.h" + > + </File> + <File + RelativePath="..\..\include\IGUIFont.h" + > + </File> + <File + RelativePath="..\..\include\IGUIImage.h" + > + </File> + <File + RelativePath="..\..\include\IGUIImageList.h" + > + </File> + <File + RelativePath="..\..\include\IGUIInOutFader.h" + > + </File> + <File + RelativePath="..\..\include\IGUIListBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIMeshViewer.h" + > + </File> + <File + RelativePath="..\..\include\IGUIScrollBar.h" + > + </File> + <File + RelativePath="..\..\include\IGUISkin.h" + > + </File> + <File + RelativePath="..\..\include\IGUISpinBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUISpriteBank.h" + > + </File> + <File + RelativePath="..\..\include\IGUIStaticText.h" + > + </File> + <File + RelativePath="..\..\include\IGUITabControl.h" + > + </File> + <File + RelativePath="..\..\include\IGUIToolbar.h" + > + </File> + <File + RelativePath="..\..\include\IGUITreeView.h" + > + </File> + <File + RelativePath="..\..\include\IGUIWindow.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="doc" + > + <File + RelativePath="..\..\changes.txt" + > + </File> + <File + RelativePath="..\..\readme.txt" + > + </File> + </Filter> + <Filter + Name="Irrlicht" + > + <Filter + Name="scene" + > + <File + RelativePath="CDefaultSceneNodeAnimatorFactory.cpp" + > + </File> + <File + RelativePath="CDefaultSceneNodeAnimatorFactory.h" + > + </File> + <File + RelativePath="CDefaultSceneNodeFactory.cpp" + > + </File> + <File + RelativePath="CDefaultSceneNodeFactory.h" + > + </File> + <File + RelativePath="CGeometryCreator.cpp" + > + </File> + <File + RelativePath="CGeometryCreator.h" + > + </File> + <File + RelativePath="CMeshCache.cpp" + > + </File> + <File + RelativePath="CMeshCache.h" + > + </File> + <File + RelativePath="CMeshManipulator.cpp" + > + </File> + <File + RelativePath="CMeshManipulator.h" + > + </File> + <File + RelativePath="CSceneLoaderIrr.cpp" + > + </File> + <File + RelativePath="CSceneLoaderIrr.h" + > + </File> + <File + RelativePath="CSceneManager.cpp" + > + </File> + <File + RelativePath="CSceneManager.h" + > + </File> + <File + RelativePath="Octree.h" + > + </File> + <Filter + Name="loaders" + > + <File + RelativePath="C3DSMeshFileLoader.cpp" + > + </File> + <File + RelativePath="C3DSMeshFileLoader.h" + > + </File> + <File + RelativePath=".\CAnimatedMeshHalfLife.cpp" + > + </File> + <File + RelativePath=".\CAnimatedMeshHalfLife.h" + > + </File> + <File + RelativePath="CAnimatedMeshMD2.cpp" + > + </File> + <File + RelativePath="CAnimatedMeshMD2.h" + > + </File> + <File + RelativePath="CAnimatedMeshMD3.cpp" + > + </File> + <File + RelativePath="CAnimatedMeshMD3.h" + > + </File> + <File + RelativePath="CB3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CB3DMeshFileLoader.h" + > + </File> + <File + RelativePath="CBSPMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CBSPMeshFileLoader.h" + > + </File> + <File + RelativePath="CColladaFileLoader.cpp" + > + </File> + <File + RelativePath="CColladaFileLoader.h" + > + </File> + <File + RelativePath="CCSMLoader.cpp" + > + </File> + <File + RelativePath="CCSMLoader.h" + > + </File> + <File + RelativePath="CDMFLoader.cpp" + > + </File> + <File + RelativePath="CDMFLoader.h" + > + </File> + <File + RelativePath="CIrrMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CIrrMeshFileLoader.h" + > + </File> + <File + RelativePath="CLMTSMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CLMTSMeshFileLoader.h" + > + </File> + <File + RelativePath="CLWOMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CLWOMeshFileLoader.h" + > + </File> + <File + RelativePath="CMD2MeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMD2MeshFileLoader.h" + > + </File> + <File + RelativePath="CMD3MeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMD3MeshFileLoader.h" + > + </File> + <File + RelativePath="CMS3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMS3DMeshFileLoader.h" + > + </File> + <File + RelativePath="CMY3DHelper.h" + > + </File> + <File + RelativePath="CMY3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMY3DMeshFileLoader.h" + > + </File> + <File + RelativePath="COBJMeshFileLoader.cpp" + > + </File> + <File + RelativePath="COBJMeshFileLoader.h" + > + </File> + <File + RelativePath="COCTLoader.cpp" + > + </File> + <File + RelativePath="COCTLoader.h" + > + </File> + <File + RelativePath="COgreMeshFileLoader.cpp" + > + </File> + <File + RelativePath="COgreMeshFileLoader.h" + > + </File> + <File + RelativePath="CPLYMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CPLYMeshFileLoader.h" + > + </File> + <File + RelativePath="CQ3LevelMesh.cpp" + > + </File> + <File + RelativePath="CQ3LevelMesh.h" + > + </File> + <File + RelativePath="CSkinnedMesh.cpp" + > + </File> + <File + RelativePath="CSkinnedMesh.h" + > + </File> + <File + RelativePath="CSMFMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CSMFMeshFileLoader.h" + > + </File> + <File + RelativePath="CSTLMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CSTLMeshFileLoader.h" + > + </File> + <File + RelativePath="CXMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CXMeshFileLoader.h" + > + </File> + <File + RelativePath="dmfsupport.h" + > + </File> + </Filter> + <Filter + Name="sceneNodes" + > + <File + RelativePath="CAnimatedMeshSceneNode.cpp" + > + </File> + <File + RelativePath="CAnimatedMeshSceneNode.h" + > + </File> + <File + RelativePath="CBillboardSceneNode.cpp" + > + </File> + <File + RelativePath="CBillboardSceneNode.h" + > + </File> + <File + RelativePath="CBoneSceneNode.cpp" + > + </File> + <File + RelativePath="CBoneSceneNode.h" + > + </File> + <File + RelativePath="CCameraSceneNode.cpp" + > + </File> + <File + RelativePath="CCameraSceneNode.h" + > + </File> + <File + RelativePath="CCubeSceneNode.cpp" + > + </File> + <File + RelativePath="CCubeSceneNode.h" + > + </File> + <File + RelativePath="CDummyTransformationSceneNode.cpp" + > + </File> + <File + RelativePath="CDummyTransformationSceneNode.h" + > + </File> + <File + RelativePath="CEmptySceneNode.cpp" + > + </File> + <File + RelativePath="CEmptySceneNode.h" + > + </File> + <File + RelativePath="CLightSceneNode.cpp" + > + </File> + <File + RelativePath="CLightSceneNode.h" + > + </File> + <File + RelativePath="CMeshSceneNode.cpp" + > + </File> + <File + RelativePath="CMeshSceneNode.h" + > + </File> + <File + RelativePath="COctreeSceneNode.cpp" + > + </File> + <File + RelativePath="COctreeSceneNode.h" + > + </File> + <File + RelativePath="CQuake3ShaderSceneNode.cpp" + > + </File> + <File + RelativePath="CQuake3ShaderSceneNode.h" + > + </File> + <File + RelativePath="CShadowVolumeSceneNode.cpp" + > + </File> + <File + RelativePath="CShadowVolumeSceneNode.h" + > + </File> + <File + RelativePath="CSkyBoxSceneNode.cpp" + > + </File> + <File + RelativePath="CSkyBoxSceneNode.h" + > + </File> + <File + RelativePath="CSkyDomeSceneNode.cpp" + > + </File> + <File + RelativePath="CSkyDomeSceneNode.h" + > + </File> + <File + RelativePath="CSphereSceneNode.cpp" + > + </File> + <File + RelativePath="CSphereSceneNode.h" + > + </File> + <File + RelativePath="CTerrainSceneNode.cpp" + > + </File> + <File + RelativePath="CTerrainSceneNode.h" + > + </File> + <File + RelativePath="CTextSceneNode.cpp" + > + </File> + <File + RelativePath="CTextSceneNode.h" + > + </File> + <File + RelativePath="CVolumeLightSceneNode.cpp" + > + </File> + <File + RelativePath="CVolumeLightSceneNode.h" + > + </File> + <File + RelativePath="CWaterSurfaceSceneNode.cpp" + > + </File> + <File + RelativePath="CWaterSurfaceSceneNode.h" + > + </File> + </Filter> + <Filter + Name="particleSystem" + > + <File + RelativePath="CParticleAnimatedMeshSceneNodeEmitter.cpp" + > + </File> + <File + RelativePath=".\CParticleAnimatedMeshSceneNodeEmitter.h" + > + </File> + <File + RelativePath="CParticleAttractionAffector.cpp" + > + </File> + <File + RelativePath=".\CParticleAttractionAffector.h" + > + </File> + <File + RelativePath="CParticleBoxEmitter.cpp" + > + </File> + <File + RelativePath="CParticleBoxEmitter.h" + > + </File> + <File + RelativePath="CParticleCylinderEmitter.cpp" + > + </File> + <File + RelativePath=".\CParticleCylinderEmitter.h" + > + </File> + <File + RelativePath="CParticleFadeOutAffector.cpp" + > + </File> + <File + RelativePath="CParticleFadeOutAffector.h" + > + </File> + <File + RelativePath="CParticleGravityAffector.cpp" + > + </File> + <File + RelativePath="CParticleGravityAffector.h" + > + </File> + <File + RelativePath="CParticleMeshEmitter.cpp" + > + </File> + <File + RelativePath=".\CParticleMeshEmitter.h" + > + </File> + <File + RelativePath="CParticlePointEmitter.cpp" + > + </File> + <File + RelativePath="CParticlePointEmitter.h" + > + </File> + <File + RelativePath="CParticleRingEmitter.cpp" + > + </File> + <File + RelativePath=".\CParticleRingEmitter.h" + > + </File> + <File + RelativePath="CParticleRotationAffector.cpp" + > + </File> + <File + RelativePath=".\CParticleRotationAffector.h" + > + </File> + <File + RelativePath="CParticleScaleAffector.cpp" + > + </File> + <File + RelativePath="CParticleScaleAffector.h" + > + </File> + <File + RelativePath="CParticleSphereEmitter.cpp" + > + </File> + <File + RelativePath=".\CParticleSphereEmitter.h" + > + </File> + <File + RelativePath="CParticleSystemSceneNode.cpp" + > + </File> + <File + RelativePath="CParticleSystemSceneNode.h" + > + </File> + </Filter> + <Filter + Name="collision" + > + <File + RelativePath="CMetaTriangleSelector.cpp" + > + </File> + <File + RelativePath="CMetaTriangleSelector.h" + > + </File> + <File + RelativePath="COctreeTriangleSelector.cpp" + > + </File> + <File + RelativePath="COctreeTriangleSelector.h" + > + </File> + <File + RelativePath="CSceneCollisionManager.cpp" + > + </File> + <File + RelativePath="CSceneCollisionManager.h" + > + </File> + <File + RelativePath="CTerrainTriangleSelector.cpp" + > + </File> + <File + RelativePath="CTerrainTriangleSelector.h" + > + </File> + <File + RelativePath="CTriangleBBSelector.cpp" + > + </File> + <File + RelativePath="CTriangleBBSelector.h" + > + </File> + <File + RelativePath="CTriangleSelector.cpp" + > + </File> + <File + RelativePath="CTriangleSelector.h" + > + </File> + </Filter> + <Filter + Name="animators" + > + <File + RelativePath="CSceneNodeAnimatorCameraFPS.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraFPS.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraMaya.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraMaya.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCollisionResponse.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCollisionResponse.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorDelete.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorDelete.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyCircle.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyCircle.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyStraight.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyStraight.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFollowSpline.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFollowSpline.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorRotation.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorRotation.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorTexture.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorTexture.h" + > + </File> + </Filter> + <Filter + Name="writers" + > + <File + RelativePath="CColladaMeshWriter.cpp" + > + </File> + <File + RelativePath="CColladaMeshWriter.h" + > + </File> + <File + RelativePath="CIrrMeshWriter.cpp" + > + </File> + <File + RelativePath="CIrrMeshWriter.h" + > + </File> + <File + RelativePath="COBJMeshWriter.cpp" + > + </File> + <File + RelativePath="COBJMeshWriter.h" + > + </File> + <File + RelativePath=".\CPLYMeshWriter.cpp" + > + </File> + <File + RelativePath=".\CPLYMeshWriter.h" + > + </File> + <File + RelativePath="CSTLMeshWriter.cpp" + > + </File> + <File + RelativePath="CSTLMeshWriter.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="video" + > + <File + RelativePath="CCgMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CCgMaterialRenderer.h" + > + </File> + <File + RelativePath="CVideoModeList.cpp" + > + </File> + <File + RelativePath="CVideoModeList.h" + > + </File> + <Filter + Name="Software" + > + <File + RelativePath="CSoftwareDriver.cpp" + > + </File> + <File + RelativePath="CSoftwareDriver.h" + > + </File> + <File + RelativePath="CSoftwareTexture.cpp" + > + </File> + <File + RelativePath="CSoftwareTexture.h" + > + </File> + <File + RelativePath="CTRFlat.cpp" + > + </File> + <File + RelativePath="CTRFlatWire.cpp" + > + </File> + <File + RelativePath="CTRGouraud.cpp" + > + </File> + <File + RelativePath="CTRGouraudWire.cpp" + > + </File> + <File + RelativePath="CTRTextureFlat.cpp" + > + </File> + <File + RelativePath="CTRTextureFlatWire.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraud.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraud.h" + > + </File> + <File + RelativePath="CTRTextureGouraudAdd.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudNoZ.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudWire.cpp" + > + </File> + <File + RelativePath="CZBuffer.cpp" + > + </File> + <File + RelativePath="CZBuffer.h" + > + </File> + <File + RelativePath="ITriangleRenderer.h" + > + </File> + <File + RelativePath="IZBuffer.h" + > + </File> + <File + RelativePath="S2DVertex.h" + > + </File> + </Filter> + <Filter + Name="OpenGL" + > + <File + RelativePath=".\COpenGLCgMaterialRenderer.cpp" + > + </File> + <File + RelativePath=".\COpenGLCgMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLDriver.cpp" + > + </File> + <File + RelativePath="COpenGLDriver.h" + > + </File> + <File + RelativePath="COpenGLExtensionHandler.cpp" + > + </File> + <File + RelativePath="COpenGLExtensionHandler.h" + > + </File> + <File + RelativePath="COpenGLMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLNormalMapRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLNormalMapRenderer.h" + > + </File> + <File + RelativePath="COpenGLParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLParallaxMapRenderer.h" + > + </File> + <File + RelativePath="COpenGLShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLShaderMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLSLMaterialRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLSLMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLTexture.cpp" + > + </File> + <File + RelativePath="COpenGLTexture.h" + > + </File> + <File + RelativePath="glext.h" + > + </File> + <File + RelativePath=".\wglext.h" + > + </File> + </Filter> + <Filter + Name="Direct3D8" + > + <File + RelativePath="CD3D8Driver.cpp" + > + </File> + <File + RelativePath="CD3D8Driver.h" + > + </File> + <File + RelativePath="CD3D8MaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D8NormalMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D8NormalMapRenderer.h" + > + </File> + <File + RelativePath="CD3D8ParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D8ParallaxMapRenderer.h" + > + </File> + <File + RelativePath="CD3D8ShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D8ShaderMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D8Texture.cpp" + > + </File> + <File + RelativePath="CD3D8Texture.h" + > + </File> + </Filter> + <Filter + Name="Null" + > + <File + RelativePath=".\CBlit.h" + > + </File> + <File + RelativePath="CColorConverter.cpp" + > + </File> + <File + RelativePath="CColorConverter.h" + > + </File> + <File + RelativePath="CFPSCounter.cpp" + > + </File> + <File + RelativePath="CFPSCounter.h" + > + </File> + <File + RelativePath="CImage.cpp" + > + </File> + <File + RelativePath="CImage.h" + > + </File> + <File + RelativePath="CNullDriver.cpp" + > + </File> + <File + RelativePath="CNullDriver.h" + > + </File> + <File + RelativePath="IImagePresenter.h" + > + </File> + <Filter + Name="Writer" + > + <File + RelativePath="CImageWriterBMP.cpp" + > + </File> + <File + RelativePath="CImageWriterBMP.h" + > + </File> + <File + RelativePath="CImageWriterJPG.cpp" + > + </File> + <File + RelativePath="CImageWriterJPG.h" + > + </File> + <File + RelativePath="CImageWriterPCX.cpp" + > + </File> + <File + RelativePath="CImageWriterPCX.h" + > + </File> + <File + RelativePath="CImageWriterPNG.cpp" + > + </File> + <File + RelativePath="CImageWriterPNG.h" + > + </File> + <File + RelativePath="CImageWriterPPM.cpp" + > + </File> + <File + RelativePath="CImageWriterPPM.h" + > + </File> + <File + RelativePath="CImageWriterPSD.cpp" + > + </File> + <File + RelativePath="CImageWriterPSD.h" + > + </File> + <File + RelativePath="CImageWriterTGA.cpp" + > + </File> + <File + RelativePath="CImageWriterTGA.h" + > + </File> + </Filter> + <Filter + Name="Loader" + > + <File + RelativePath="CImageLoaderBMP.cpp" + > + </File> + <File + RelativePath="CImageLoaderBMP.h" + > + </File> + <File + RelativePath=".\CImageLoaderDDS.cpp" + > + </File> + <File + RelativePath=".\CImageLoaderDDS.h" + > + </File> + <File + RelativePath="CImageLoaderJPG.cpp" + > + </File> + <File + RelativePath="CImageLoaderJPG.h" + > + </File> + <File + RelativePath="CImageLoaderPCX.cpp" + > + </File> + <File + RelativePath="CImageLoaderPCX.h" + > + </File> + <File + RelativePath="CImageLoaderPNG.cpp" + > + </File> + <File + RelativePath="CImageLoaderPNG.h" + > + </File> + <File + RelativePath="CImageLoaderPPM.cpp" + > + </File> + <File + RelativePath="CImageLoaderPPM.h" + > + </File> + <File + RelativePath="CImageLoaderPSD.cpp" + > + </File> + <File + RelativePath="CImageLoaderPSD.h" + > + </File> + <File + RelativePath=".\CImageLoaderRGB.cpp" + > + </File> + <File + RelativePath=".\CImageLoaderRGB.h" + > + </File> + <File + RelativePath="CImageLoaderTGA.cpp" + > + </File> + <File + RelativePath="CImageLoaderTGA.h" + > + </File> + <File + RelativePath="CImageLoaderWAL.cpp" + > + </File> + <File + RelativePath="CImageLoaderWAL.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="Direct3D9" + > + <File + RelativePath="CD3D9CgMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9CgMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9Driver.cpp" + > + </File> + <File + RelativePath="CD3D9Driver.h" + > + </File> + <File + RelativePath="CD3D9HLSLMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9HLSLMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9MaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9NormalMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9NormalMapRenderer.h" + > + </File> + <File + RelativePath="CD3D9ParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9ParallaxMapRenderer.h" + > + </File> + <File + RelativePath="CD3D9ShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9ShaderMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9Texture.cpp" + > + </File> + <File + RelativePath="CD3D9Texture.h" + > + </File> + </Filter> + <Filter + Name="Burning Video" + > + <File + RelativePath="CBurningShader_Raster_Reference.cpp" + > + </File> + <File + RelativePath="CDepthBuffer.cpp" + > + </File> + <File + RelativePath="CDepthBuffer.h" + > + </File> + <File + RelativePath="CSoftware2MaterialRenderer.h" + > + </File> + <File + RelativePath="CSoftwareDriver2.cpp" + > + </File> + <File + RelativePath="CSoftwareDriver2.h" + > + </File> + <File + RelativePath="CSoftwareTexture2.cpp" + > + </File> + <File + RelativePath="CSoftwareTexture2.h" + > + </File> + <File + RelativePath="CTRGouraud2.cpp" + > + </File> + <File + RelativePath="CTRGouraudAlpha2.cpp" + > + </File> + <File + RelativePath="CTRGouraudAlphaNoZ2.cpp" + > + </File> + <File + RelativePath=".\CTRNormalMap.cpp" + > + </File> + <File + RelativePath=".\CTRStencilShadow.cpp" + > + </File> + <File + RelativePath="CTRTextureBlend.cpp" + > + </File> + <File + RelativePath="CTRTextureDetailMap2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraud2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAdd2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAddNoZ2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAlpha.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAlphaNoZ.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudNoZ2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudVertexAlpha2.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_Add.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_M1.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_M2.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_M4.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMapGouraud2_M4.cpp" + > + </File> + <File + RelativePath="CTRTextureWire2.cpp" + > + </File> + <File + RelativePath="IBurningShader.cpp" + > + </File> + <File + RelativePath="IBurningShader.h" + > + </File> + <File + RelativePath="IDepthBuffer.h" + > + </File> + <File + RelativePath="S4DVertex.h" + > + </File> + <File + RelativePath="SoftwareDriver2_compile_config.h" + > + </File> + <File + RelativePath="SoftwareDriver2_helper.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="irr" + > + <File + RelativePath="CLogger.cpp" + > + </File> + <File + RelativePath="CLogger.h" + > + </File> + <File + RelativePath="COSOperator.cpp" + > + </File> + <File + RelativePath="COSOperator.h" + > + </File> + <File + RelativePath="CTimer.h" + > + </File> + <File + RelativePath="Irrlicht.cpp" + > + </File> + <File + RelativePath="os.cpp" + > + </File> + <File + RelativePath="os.h" + > + </File> + <Filter + Name="extern" + > + <File + RelativePath=".\lzma\LzmaDec.c" + > + </File> + <File + RelativePath=".\lzma\LzmaDec.h" + > + </File> + <File + RelativePath=".\lzma\Types.h" + > + </File> + <Filter + Name="zlib" + > + <File + RelativePath="zlib\adler32.c" + > + </File> + <File + RelativePath="zlib\compress.c" + > + </File> + <File + RelativePath="zlib\crc32.c" + > + </File> + <File + RelativePath="zlib\crc32.h" + > + </File> + <File + RelativePath="zlib\deflate.c" + > + </File> + <File + RelativePath="zlib\deflate.h" + > + </File> + <File + RelativePath="zlib\inffast.c" + > + </File> + <File + RelativePath="zlib\inffast.h" + > + </File> + <File + RelativePath="zlib\inffixed.h" + > + </File> + <File + RelativePath="zlib\inflate.c" + > + </File> + <File + RelativePath="zlib\inftrees.c" + > + </File> + <File + RelativePath="zlib\inftrees.h" + > + </File> + <File + RelativePath="zlib\trees.c" + > + </File> + <File + RelativePath="zlib\trees.h" + > + </File> + <File + RelativePath="zlib\uncompr.c" + > + </File> + <File + RelativePath="zlib\zconf.h" + > + </File> + <File + RelativePath="zlib\zlib.h" + > + </File> + <File + RelativePath="zlib\zutil.c" + > + </File> + <File + RelativePath="zlib\zutil.h" + > + </File> + </Filter> + <Filter + Name="jpeglib" + > + <File + RelativePath="jpeglib\cderror.h" + > + </File> + <File + RelativePath="jpeglib\jaricom.c" + > + </File> + <File + RelativePath="jpeglib\jcapimin.c" + > + </File> + <File + RelativePath="jpeglib\jcapistd.c" + > + </File> + <File + RelativePath="jpeglib\jcarith.c" + > + </File> + <File + RelativePath="jpeglib\jccoefct.c" + > + </File> + <File + RelativePath="jpeglib\jccolor.c" + > + </File> + <File + RelativePath="jpeglib\jcdctmgr.c" + > + </File> + <File + RelativePath="jpeglib\jchuff.c" + > + </File> + <File + RelativePath="jpeglib\jcinit.c" + > + </File> + <File + RelativePath="jpeglib\jcmainct.c" + > + </File> + <File + RelativePath="jpeglib\jcmarker.c" + > + </File> + <File + RelativePath="jpeglib\jcmaster.c" + > + </File> + <File + RelativePath="jpeglib\jcomapi.c" + > + </File> + <File + RelativePath="jpeglib\jconfig.h" + > + </File> + <File + RelativePath="jpeglib\jcparam.c" + > + </File> + <File + RelativePath="jpeglib\jcprepct.c" + > + </File> + <File + RelativePath="jpeglib\jcsample.c" + > + </File> + <File + RelativePath="jpeglib\jctrans.c" + > + </File> + <File + RelativePath="jpeglib\jdapimin.c" + > + </File> + <File + RelativePath="jpeglib\jdapistd.c" + > + </File> + <File + RelativePath="jpeglib\jdarith.c" + > + </File> + <File + RelativePath="jpeglib\jdatadst.c" + > + </File> + <File + RelativePath="jpeglib\jdatasrc.c" + > + </File> + <File + RelativePath="jpeglib\jdcoefct.c" + > + </File> + <File + RelativePath="jpeglib\jdcolor.c" + > + </File> + <File + RelativePath="jpeglib\jdct.h" + > + </File> + <File + RelativePath="jpeglib\jddctmgr.c" + > + </File> + <File + RelativePath="jpeglib\jdhuff.c" + > + </File> + <File + RelativePath="jpeglib\jdinput.c" + > + </File> + <File + RelativePath="jpeglib\jdmainct.c" + > + </File> + <File + RelativePath="jpeglib\jdmarker.c" + > + </File> + <File + RelativePath="jpeglib\jdmaster.c" + > + </File> + <File + RelativePath="jpeglib\jdmerge.c" + > + </File> + <File + RelativePath="jpeglib\jdpostct.c" + > + </File> + <File + RelativePath="jpeglib\jdsample.c" + > + </File> + <File + RelativePath="jpeglib\jdtrans.c" + > + </File> + <File + RelativePath="jpeglib\jerror.c" + > + </File> + <File + RelativePath="jpeglib\jerror.h" + > + </File> + <File + RelativePath="jpeglib\jfdctflt.c" + > + </File> + <File + RelativePath="jpeglib\jfdctfst.c" + > + </File> + <File + RelativePath="jpeglib\jfdctint.c" + > + </File> + <File + RelativePath="jpeglib\jidctflt.c" + > + </File> + <File + RelativePath="jpeglib\jidctfst.c" + > + </File> + <File + RelativePath="jpeglib\jidctint.c" + > + </File> + <File + RelativePath="jpeglib\jinclude.h" + > + </File> + <File + RelativePath="jpeglib\jmemmgr.c" + > + </File> + <File + RelativePath="jpeglib\jmemnobs.c" + > + </File> + <File + RelativePath="jpeglib\jmemsys.h" + > + </File> + <File + RelativePath="jpeglib\jmorecfg.h" + > + </File> + <File + RelativePath="jpeglib\jpegint.h" + > + </File> + <File + RelativePath="jpeglib\jpeglib.h" + > + </File> + <File + RelativePath="jpeglib\jquant1.c" + > + </File> + <File + RelativePath="jpeglib\jquant2.c" + > + </File> + <File + RelativePath="jpeglib\jutils.c" + > + </File> + <File + RelativePath="jpeglib\jversion.h" + > + </File> + </Filter> + <Filter + Name="libpng" + > + <File + RelativePath="libpng\png.c" + > + </File> + <File + RelativePath="libpng\png.h" + > + </File> + <File + RelativePath="libpng\pngconf.h" + > + </File> + <File + RelativePath="libpng\pngerror.c" + > + </File> + <File + RelativePath="libpng\pngget.c" + > + </File> + <File + RelativePath="libpng\pngmem.c" + > + </File> + <File + RelativePath="libpng\pngpread.c" + > + </File> + <File + RelativePath="libpng\pngread.c" + > + </File> + <File + RelativePath="libpng\pngrio.c" + > + </File> + <File + RelativePath="libpng\pngrtran.c" + > + </File> + <File + RelativePath="libpng\pngrutil.c" + > + </File> + <File + RelativePath="libpng\pngset.c" + > + </File> + <File + RelativePath="libpng\pngtrans.c" + > + </File> + <File + RelativePath="libpng\pngwio.c" + > + </File> + <File + RelativePath="libpng\pngwrite.c" + > + </File> + <File + RelativePath="libpng\pngwtran.c" + > + </File> + <File + RelativePath="libpng\pngwutil.c" + > + </File> + </Filter> + <Filter + Name="aesGladman" + > + <File + RelativePath=".\aesGladman\aes.h" + > + </File> + <File + RelativePath=".\aesGladman\aescrypt.cpp" + > + </File> + <File + RelativePath=".\aesGladman\aeskey.cpp" + > + </File> + <File + RelativePath=".\aesGladman\aesopt.h" + > + </File> + <File + RelativePath=".\aesGladman\aestab.cpp" + > + </File> + <File + RelativePath=".\aesGladman\fileenc.cpp" + > + </File> + <File + RelativePath=".\aesGladman\fileenc.h" + > + </File> + <File + RelativePath=".\aesGladman\hmac.cpp" + > + </File> + <File + RelativePath=".\aesGladman\hmac.h" + > + </File> + <File + RelativePath=".\aesGladman\prng.cpp" + > + </File> + <File + RelativePath=".\aesGladman\prng.h" + > + </File> + <File + RelativePath=".\aesGladman\pwd2key.cpp" + > + </File> + <File + RelativePath=".\aesGladman\pwd2key.h" + > + </File> + <File + RelativePath=".\aesGladman\sha1.cpp" + > + </File> + <File + RelativePath=".\aesGladman\sha1.h" + > + </File> + <File + RelativePath=".\aesGladman\sha2.cpp" + > + </File> + <File + RelativePath=".\aesGladman\sha2.h" + > + </File> + </Filter> + <Filter + Name="bzip2" + > + <File + RelativePath=".\bzip2\blocksort.c" + > + </File> + <File + RelativePath=".\bzip2\bzcompress.c" + > + </File> + <File + RelativePath=".\bzip2\bzlib.c" + > + </File> + <File + RelativePath=".\bzip2\bzlib.h" + > + </File> + <File + RelativePath=".\bzip2\bzlib_private.h" + > + </File> + <File + RelativePath=".\bzip2\crctable.c" + > + </File> + <File + RelativePath=".\bzip2\decompress.c" + > + </File> + <File + RelativePath=".\bzip2\huffman.c" + > + </File> + <File + RelativePath=".\bzip2\randtable.c" + > + </File> + </Filter> + </Filter> + <Filter + Name="device" + > + <File + RelativePath=".\CIrrDeviceConsole.cpp" + > + </File> + <File + RelativePath=".\CIrrDeviceConsole.h" + > + </File> + <File + RelativePath=".\CIrrDeviceFB.cpp" + > + </File> + <File + RelativePath=".\CIrrDeviceFB.h" + > + </File> + <File + RelativePath="CIrrDeviceLinux.cpp" + > + </File> + <File + RelativePath="CIrrDeviceLinux.h" + > + </File> + <File + RelativePath="CIrrDeviceSDL.cpp" + > + </File> + <File + RelativePath="CIrrDeviceSDL.h" + > + </File> + <File + RelativePath="CIrrDeviceStub.cpp" + > + </File> + <File + RelativePath="CIrrDeviceStub.h" + > + </File> + <File + RelativePath="CIrrDeviceWin32.cpp" + > + </File> + <File + RelativePath="CIrrDeviceWin32.h" + > + </File> + <File + RelativePath=".\CIrrDeviceWinCE.cpp" + > + </File> + <File + RelativePath=".\CIrrDeviceWinCE.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="io" + > + <File + RelativePath="CAttributeImpl.h" + > + </File> + <File + RelativePath="CAttributes.cpp" + > + </File> + <File + RelativePath="CAttributes.h" + > + </File> + <File + RelativePath="CFileList.cpp" + > + </File> + <File + RelativePath="CFileList.h" + > + </File> + <File + RelativePath="CFileSystem.cpp" + > + </File> + <File + RelativePath="CFileSystem.h" + > + </File> + <File + RelativePath="CLimitReadFile.cpp" + > + </File> + <File + RelativePath="CLimitReadFile.h" + > + </File> + <File + RelativePath="CMemoryFile.cpp" + > + </File> + <File + RelativePath="CMemoryFile.h" + > + </File> + <File + RelativePath="CMountPointReader.cpp" + > + </File> + <File + RelativePath="CMountPointReader.h" + > + </File> + <File + RelativePath="CNPKReader.cpp" + > + </File> + <File + RelativePath="CNPKReader.h" + > + </File> + <File + RelativePath="CPakReader.cpp" + > + </File> + <File + RelativePath="CPakReader.h" + > + </File> + <File + RelativePath="CReadFile.cpp" + > + </File> + <File + RelativePath="CReadFile.h" + > + </File> + <File + RelativePath="CTarReader.cpp" + > + </File> + <File + RelativePath="CTarReader.h" + > + </File> + <File + RelativePath=".\CWADReader.cpp" + > + </File> + <File + RelativePath=".\CWADReader.h" + > + </File> + <File + RelativePath="CWriteFile.cpp" + > + </File> + <File + RelativePath="CWriteFile.h" + > + </File> + <File + RelativePath="CXMLReader.cpp" + > + </File> + <File + RelativePath="CXMLReader.h" + > + </File> + <File + RelativePath="CXMLReaderImpl.h" + > + </File> + <File + RelativePath="CXMLWriter.cpp" + > + </File> + <File + RelativePath="CXMLWriter.h" + > + </File> + <File + RelativePath="CZipReader.cpp" + > + </File> + <File + RelativePath="CZipReader.h" + > + </File> + <File + RelativePath="IAttribute.h" + > + </File> + <File + RelativePath="irrXML.cpp" + > + </File> + </Filter> + <Filter + Name="gui" + > + <File + RelativePath="BuiltInFont.h" + > + </File> + <File + RelativePath="CDefaultGUIElementFactory.cpp" + > + </File> + <File + RelativePath="CDefaultGUIElementFactory.h" + > + </File> + <File + RelativePath="CGUIButton.cpp" + > + </File> + <File + RelativePath="CGUIButton.h" + > + </File> + <File + RelativePath="CGUICheckbox.cpp" + > + </File> + <File + RelativePath="CGUICheckbox.h" + > + </File> + <File + RelativePath="CGUIColorSelectDialog.cpp" + > + </File> + <File + RelativePath="CGUIColorSelectDialog.h" + > + </File> + <File + RelativePath="CGUIComboBox.cpp" + > + </File> + <File + RelativePath="CGUIComboBox.h" + > + </File> + <File + RelativePath="CGUIContextMenu.cpp" + > + </File> + <File + RelativePath="CGUIContextMenu.h" + > + </File> + <File + RelativePath="CGUIEditBox.cpp" + > + </File> + <File + RelativePath="CGUIEditBox.h" + > + </File> + <File + RelativePath="CGUIEnvironment.cpp" + > + </File> + <File + RelativePath="CGUIEnvironment.h" + > + </File> + <File + RelativePath="CGUIFileOpenDialog.cpp" + > + </File> + <File + RelativePath="CGUIFileOpenDialog.h" + > + </File> + <File + RelativePath="CGUIFont.cpp" + > + </File> + <File + RelativePath="CGUIFont.h" + > + </File> + <File + RelativePath="CGUIImage.cpp" + > + </File> + <File + RelativePath="CGUIImage.h" + > + </File> + <File + RelativePath=".\CGUIImageList.cpp" + > + </File> + <File + RelativePath=".\CGUIImageList.h" + > + </File> + <File + RelativePath="CGUIInOutFader.cpp" + > + </File> + <File + RelativePath="CGUIInOutFader.h" + > + </File> + <File + RelativePath="CGUIListBox.cpp" + > + </File> + <File + RelativePath="CGUIListBox.h" + > + </File> + <File + RelativePath="CGUIMenu.cpp" + > + </File> + <File + RelativePath="CGUIMenu.h" + > + </File> + <File + RelativePath="CGUIMeshViewer.cpp" + > + </File> + <File + RelativePath="CGUIMeshViewer.h" + > + </File> + <File + RelativePath="CGUIMessageBox.cpp" + > + </File> + <File + RelativePath="CGUIMessageBox.h" + > + </File> + <File + RelativePath="CGUIModalScreen.cpp" + > + </File> + <File + RelativePath="CGUIModalScreen.h" + > + </File> + <File + RelativePath="CGUIScrollBar.cpp" + > + </File> + <File + RelativePath="CGUIScrollBar.h" + > + </File> + <File + RelativePath="CGUISkin.cpp" + > + </File> + <File + RelativePath="CGUISkin.h" + > + </File> + <File + RelativePath="CGUISpinBox.cpp" + > + </File> + <File + RelativePath="CGUISpinBox.h" + > + </File> + <File + RelativePath="CGUISpriteBank.cpp" + > + </File> + <File + RelativePath="CGUISpriteBank.h" + > + </File> + <File + RelativePath="CGUIStaticText.cpp" + > + </File> + <File + RelativePath="CGUIStaticText.h" + > + </File> + <File + RelativePath="CGUITabControl.cpp" + > + </File> + <File + RelativePath="CGUITabControl.h" + > + </File> + <File + RelativePath="CGUITable.cpp" + > + </File> + <File + RelativePath="CGUITable.h" + > + </File> + <File + RelativePath="CGUIToolBar.cpp" + > + </File> + <File + RelativePath="CGUIToolBar.h" + > + </File> + <File + RelativePath=".\CGUITreeView.cpp" + > + </File> + <File + RelativePath=".\CGUITreeView.h" + > + </File> + <File + RelativePath="CGUIWindow.cpp" + > + </File> + <File + RelativePath="CGUIWindow.h" + > + </File> + </Filter> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.sln b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.sln new file mode 100644 index 0000000..be319a3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht_mobile6.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.vcproj b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.vcproj new file mode 100644 index 0000000..5a400c0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_mobile6.vcproj @@ -0,0 +1,3085 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="Irrlicht" + ProjectGUID="{E08E042A-6C45-411B-92BE-3CC31331019F}" + RootNamespace="Irrlicht" + > + <Platforms> + <Platform + Name="Windows Mobile 6 Professional SDK (ARMV4I)" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)" + OutputDirectory="..\..\bin\WinCE-visualstudio\" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Debug/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + ExecutionBucket="7" + Optimization="0" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="NO_GETENV;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="0" + RuntimeLibrary="1" + DisableLanguageExtensions="false" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrDebug/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrDebug_ce/" + ObjectFile=".\..\obj\IrrDebug_ce/" + ProgramDataBaseFileName=".\..\obj\IrrDebug_ce/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + EnableFloatingPointEmulation="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseLibraryDependencyInputs="true" + AdditionalOptions=" /subsystem:windowsce,5.02" + OutputFile="$(OutDir)/Irrlicht.dll" + LinkIncremental="2" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\obj\IrrDebug_ce\Irrlicht.pdb" + SubSystem="0" + ImportLibrary="..\..\lib\WinCE-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCCodeSignTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + <DeploymentTool + ForceDirty="-1" + RemoteDirectory="%CSIDL_PROGRAM_FILES%\Irrlicht\bin\wince" + RegisterOutput="0" + AdditionalFiles="" + /> + <DebuggerTool + /> + </Configuration> + <Configuration + Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)" + OutputDirectory="..\..\bin\WinCE-visualstudio\" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + ExecutionBucket="7" + Optimization="3" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="NO_GETENV;_NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile="" + AssemblerListingLocation=".\..\obj\IrrRelease_ce/" + ObjectFile=".\..\obj\IrrRelease_ce/" + ProgramDataBaseFileName=".\..\obj\IrrRelease_ce/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CompileAs="0" + EnableFloatingPointEmulation="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" /subsystem:windowsce,5.02" + OutputFile="$(OutDir)/Irrlicht.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="" + GenerateDebugInformation="false" + ProgramDatabaseFile="..\obj\IrrRelease_ce\Irrlicht.pdb" + ImportLibrary="..\..\lib\WinCE-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCCodeSignTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + <DeploymentTool + ForceDirty="-1" + RemoteDirectory="%CSIDL_PROGRAM_FILES%\Irrlicht\bin\wince" + RegisterOutput="0" + AdditionalFiles="" + /> + <DebuggerTool + /> + </Configuration> + <Configuration + Name="Release - Fast FPU|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\..\Release/Irrlicht.tlb" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="0" + OmitFramePointers="true" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="0" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + FloatingPointModel="2" + RuntimeTypeInfo="false" + PrecompiledHeaderFile=".\..\obj\IrrRelease/Irrlicht.pch" + AssemblerListingLocation=".\..\obj\IrrRelease/" + ObjectFile=".\..\obj\IrrRelease/" + ProgramDataBaseFileName=".\..\obj\IrrRelease/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="0" + CallingConvention="1" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib opengl32.lib winmm.lib" + OutputFile="..\..\bin\Win32-visualstudio\Irrlicht.dll" + LinkIncremental="1" + SuppressStartupBanner="true" + IgnoreDefaultLibraryNames="libci.lib" + GenerateDebugInformation="false" + ProgramDatabaseFile="..\obj\IrrRelease\Irrlicht.pdb" + ImportLibrary="..\..\lib\Win32-visualstudio\Irrlicht.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="include" + > + <File + RelativePath="..\..\include\IEventReceiver.h" + > + </File> + <File + RelativePath="..\..\include\ILogger.h" + > + </File> + <File + RelativePath="..\..\include\IOSOperator.h" + > + </File> + <File + RelativePath="..\..\include\IReferenceCounted.h" + > + </File> + <File + RelativePath="..\..\include\IrrCompileConfig.h" + > + </File> + <File + RelativePath="..\..\include\irrlicht.h" + > + </File> + <File + RelativePath="..\..\include\IrrlichtDevice.h" + > + </File> + <File + RelativePath="..\..\include\irrTypes.h" + > + </File> + <File + RelativePath="..\..\include\ITimer.h" + > + </File> + <File + RelativePath="..\..\include\Keycodes.h" + > + </File> + <File + RelativePath="..\..\include\SIrrCreationParameters.h" + > + </File> + <File + RelativePath="..\..\include\SKeyMap.h" + > + </File> + <Filter + Name="video" + > + <File + RelativePath="..\..\include\EDriverTypes.h" + > + </File> + <File + RelativePath="..\..\include\IGPUProgrammingServices.h" + > + </File> + <File + RelativePath="..\..\include\IImage.h" + > + </File> + <File + RelativePath="..\..\include\IImageLoader.h" + > + </File> + <File + RelativePath="..\..\include\IMaterialRenderer.h" + > + </File> + <File + RelativePath="..\..\include\IMaterialRendererServices.h" + > + </File> + <File + RelativePath="..\..\include\IShaderConstantSetCallBack.h" + > + </File> + <File + RelativePath="..\..\include\ITexture.h" + > + </File> + <File + RelativePath="..\..\include\IVideoDriver.h" + > + </File> + <File + RelativePath="..\..\include\IVideoModeList.h" + > + </File> + <File + RelativePath="..\..\include\S3DVertex.h" + > + </File> + <File + RelativePath="..\..\include\SColor.h" + > + </File> + <File + RelativePath="..\..\include\SExposedVideoData.h" + > + </File> + <File + RelativePath="..\..\include\SLight.h" + > + </File> + <File + RelativePath="..\..\include\SMaterial.h" + > + </File> + </Filter> + <Filter + Name="core" + > + <File + RelativePath="..\..\include\aabbox3d.h" + > + </File> + <File + RelativePath="..\..\include\dimension2d.h" + > + </File> + <File + RelativePath="..\..\include\heapsort.h" + > + </File> + <File + RelativePath="..\..\include\irrAllocator.h" + > + </File> + <File + RelativePath="..\..\include\irrArray.h" + > + </File> + <File + RelativePath="..\..\include\irrList.h" + > + </File> + <File + RelativePath="..\..\include\irrMap.h" + > + </File> + <File + RelativePath="..\..\include\irrMath.h" + > + </File> + <File + RelativePath="..\..\include\irrString.h" + > + </File> + <File + RelativePath="..\..\include\line2d.h" + > + </File> + <File + RelativePath="..\..\include\line3d.h" + > + </File> + <File + RelativePath="..\..\include\matrix4.h" + > + </File> + <File + RelativePath="..\..\include\plane3d.h" + > + </File> + <File + RelativePath="..\..\include\position2d.h" + > + </File> + <File + RelativePath="..\..\include\quaternion.h" + > + </File> + <File + RelativePath="..\..\include\rect.h" + > + </File> + <File + RelativePath="..\..\include\triangle3d.h" + > + </File> + <File + RelativePath="..\..\include\vector2d.h" + > + </File> + <File + RelativePath="..\..\include\vector3d.h" + > + </File> + </Filter> + <Filter + Name="io" + > + <File + RelativePath="..\..\include\EAttributes.h" + > + </File> + <File + RelativePath="..\..\include\IAttributeExchangingObject.h" + > + </File> + <File + RelativePath="..\..\include\IAttributes.h" + > + </File> + <File + RelativePath="..\..\include\IFileList.h" + > + </File> + <File + RelativePath="..\..\include\IFileSystem.h" + > + </File> + <File + RelativePath="..\..\include\IReadFile.h" + > + </File> + <File + RelativePath="..\..\include\irrXML.h" + > + </File> + <File + RelativePath="..\..\include\IWriteFile.h" + > + </File> + <File + RelativePath="..\..\include\IXMLReader.h" + > + </File> + <File + RelativePath="..\..\include\IXMLWriter.h" + > + </File> + </Filter> + <Filter + Name="scene" + > + <File + RelativePath="..\..\include\ECullingTypes.h" + > + </File> + <File + RelativePath="..\..\include\EDebugSceneTypes.h" + > + </File> + <File + RelativePath="..\..\include\EMeshWriterEnums.h" + > + </File> + <File + RelativePath="..\..\include\ESceneNodeAnimatorTypes.h" + > + </File> + <File + RelativePath="..\..\include\ESceneNodeTypes.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMesh.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD2.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD3.h" + > + </File> + <File + RelativePath="..\..\include\IAnimatedMeshSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IBillboardSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ICameraSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IDummyTransformationSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ILightSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IMesh.h" + > + </File> + <File + RelativePath="..\..\include\IMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\IMeshCache.h" + > + </File> + <File + RelativePath="..\..\include\IMeshLoader.h" + > + </File> + <File + RelativePath="..\..\include\IMeshManipulator.h" + > + </File> + <File + RelativePath="..\..\include\IMeshSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IMeshWriter.h" + > + </File> + <File + RelativePath="..\..\include\IMetaTriangleSelector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleAffector.h" + > + </File> + <File + RelativePath="..\..\include\IParticleEmitter.h" + > + </File> + <File + RelativePath="..\..\include\IParticleSystemSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\IQ3LevelMesh.h" + > + </File> + <File + RelativePath="..\..\include\ISceneCollisionManager.h" + > + </File> + <File + RelativePath="..\..\include\ISceneManager.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimator.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraFPS.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraMaya.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCollisionResponse.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorFactory.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeFactory.h" + > + </File> + <File + RelativePath="..\..\include\ISceneNodeMeshLoader.h" + > + </File> + <File + RelativePath="..\..\include\IShadowVolumeSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ISkinnedMesh.h" + > + </File> + <File + RelativePath="..\..\include\ITerrainSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ITextSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\ITriangleSelector.h" + > + </File> + <File + RelativePath="..\..\include\IVolumeLightSceneNode.h" + > + </File> + <File + RelativePath="..\..\include\SAnimatedMesh.h" + > + </File> + <File + RelativePath="..\..\include\SceneParameters.h" + > + </File> + <File + RelativePath="..\..\include\SMesh.h" + > + </File> + <File + RelativePath="..\..\include\SMeshBuffer.h" + > + </File> + <File + RelativePath="..\..\include\SMeshBufferLightMap.h" + > + </File> + <File + RelativePath="..\..\include\SMeshBufferTangents.h" + > + </File> + <File + RelativePath="..\..\include\SParticle.h" + > + </File> + <File + RelativePath="..\..\include\SViewFrustum.h" + > + </File> + </Filter> + <Filter + Name="gui" + > + <File + RelativePath="..\..\include\EGUIAlignment.h" + > + </File> + <File + RelativePath="..\..\include\EGUIElementTypes.h" + > + </File> + <File + RelativePath="..\..\include\EMessageBoxFlags.h" + > + </File> + <File + RelativePath="..\..\include\ICursorControl.h" + > + </File> + <File + RelativePath="..\..\include\IGUIButton.h" + > + </File> + <File + RelativePath="..\..\include\IGUICheckbox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIComboBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIContextMenu.h" + > + </File> + <File + RelativePath="..\..\include\IGUIEditBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIElement.h" + > + </File> + <File + RelativePath="..\..\include\IGUIElementFactory.h" + > + </File> + <File + RelativePath="..\..\include\IGUIEnvironment.h" + > + </File> + <File + RelativePath="..\..\include\IGUIFileOpenDialog.h" + > + </File> + <File + RelativePath="..\..\include\IGUIFont.h" + > + </File> + <File + RelativePath="..\..\include\IGUIImage.h" + > + </File> + <File + RelativePath="..\..\include\IGUIInOutFader.h" + > + </File> + <File + RelativePath="..\..\include\IGUIListBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUIMeshViewer.h" + > + </File> + <File + RelativePath="..\..\include\IGUIScrollBar.h" + > + </File> + <File + RelativePath="..\..\include\IGUISkin.h" + > + </File> + <File + RelativePath="..\..\include\IGUISpinBox.h" + > + </File> + <File + RelativePath="..\..\include\IGUISpriteBank.h" + > + </File> + <File + RelativePath="..\..\include\IGUIStaticText.h" + > + </File> + <File + RelativePath="..\..\include\IGUITabControl.h" + > + </File> + <File + RelativePath="..\..\include\IGUIToolbar.h" + > + </File> + <File + RelativePath="..\..\include\IGUIWindow.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="gui impl" + > + <File + RelativePath="BuiltInFont.h" + > + </File> + <File + RelativePath="CDefaultGUIElementFactory.cpp" + > + </File> + <File + RelativePath="CDefaultGUIElementFactory.h" + > + </File> + <File + RelativePath="CGUIButton.cpp" + > + </File> + <File + RelativePath="CGUIButton.h" + > + </File> + <File + RelativePath="CGUICheckbox.cpp" + > + </File> + <File + RelativePath="CGUICheckbox.h" + > + </File> + <File + RelativePath="CGUIColorSelectDialog.cpp" + > + </File> + <File + RelativePath="CGUIColorSelectDialog.h" + > + </File> + <File + RelativePath="CGUIComboBox.cpp" + > + </File> + <File + RelativePath="CGUIComboBox.h" + > + </File> + <File + RelativePath="CGUIContextMenu.cpp" + > + </File> + <File + RelativePath="CGUIContextMenu.h" + > + </File> + <File + RelativePath="CGUIEditBox.cpp" + > + </File> + <File + RelativePath="CGUIEditBox.h" + > + </File> + <File + RelativePath="CGUIEnvironment.cpp" + > + </File> + <File + RelativePath="CGUIEnvironment.h" + > + </File> + <File + RelativePath="CGUIFileOpenDialog.cpp" + > + </File> + <File + RelativePath="CGUIFileOpenDialog.h" + > + </File> + <File + RelativePath="CGUIFont.cpp" + > + </File> + <File + RelativePath="CGUIFont.h" + > + </File> + <File + RelativePath="CGUIImage.cpp" + > + </File> + <File + RelativePath="CGUIImage.h" + > + </File> + <File + RelativePath="CGUIImageList.cpp" + > + </File> + <File + RelativePath="CGUIImageList.h" + > + </File> + <File + RelativePath="CGUIInOutFader.cpp" + > + </File> + <File + RelativePath="CGUIInOutFader.h" + > + </File> + <File + RelativePath="CGUIListBox.cpp" + > + </File> + <File + RelativePath="CGUIListBox.h" + > + </File> + <File + RelativePath="CGUIMenu.cpp" + > + </File> + <File + RelativePath="CGUIMenu.h" + > + </File> + <File + RelativePath="CGUIMeshViewer.cpp" + > + </File> + <File + RelativePath="CGUIMeshViewer.h" + > + </File> + <File + RelativePath="CGUIMessageBox.cpp" + > + </File> + <File + RelativePath="CGUIMessageBox.h" + > + </File> + <File + RelativePath="CGUIModalScreen.cpp" + > + </File> + <File + RelativePath="CGUIModalScreen.h" + > + </File> + <File + RelativePath="CGUIScrollBar.cpp" + > + </File> + <File + RelativePath="CGUIScrollBar.h" + > + </File> + <File + RelativePath="CGUISkin.cpp" + > + </File> + <File + RelativePath="CGUISkin.h" + > + </File> + <File + RelativePath="CGUISpinBox.cpp" + > + </File> + <File + RelativePath="CGUISpinBox.h" + > + </File> + <File + RelativePath="CGUISpriteBank.cpp" + > + </File> + <File + RelativePath="CGUISpriteBank.h" + > + </File> + <File + RelativePath="CGUIStaticText.cpp" + > + </File> + <File + RelativePath="CGUIStaticText.h" + > + </File> + <File + RelativePath="CGUITabControl.cpp" + > + </File> + <File + RelativePath="CGUITabControl.h" + > + </File> + <File + RelativePath="CGUITable.cpp" + > + </File> + <File + RelativePath="CGUITable.h" + > + </File> + <File + RelativePath="CGUIToolBar.cpp" + > + </File> + <File + RelativePath="CGUIToolBar.h" + > + </File> + <File + RelativePath="CGUITreeView.cpp" + > + </File> + <File + RelativePath="CGUITreeView.h" + > + </File> + <File + RelativePath="CGUIWindow.cpp" + > + </File> + <File + RelativePath="CGUIWindow.h" + > + </File> + </Filter> + <Filter + Name="video impl" + > + <File + RelativePath="CVideoModeList.cpp" + > + </File> + <File + RelativePath="CVideoModeList.h" + > + </File> + <Filter + Name="Software" + > + <File + RelativePath="CSoftwareDriver.cpp" + > + </File> + <File + RelativePath="CSoftwareDriver.h" + > + </File> + <File + RelativePath="CSoftwareTexture.cpp" + > + </File> + <File + RelativePath="CSoftwareTexture.h" + > + </File> + <File + RelativePath="CTRFlat.cpp" + > + </File> + <File + RelativePath="CTRFlatWire.cpp" + > + </File> + <File + RelativePath="CTRGouraud.cpp" + > + </File> + <File + RelativePath="CTRGouraudWire.cpp" + > + </File> + <File + RelativePath="CTRTextureFlat.cpp" + > + </File> + <File + RelativePath="CTRTextureFlatWire.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraud.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraud.h" + > + </File> + <File + RelativePath="CTRTextureGouraudAdd.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudNoZ.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudWire.cpp" + > + </File> + <File + RelativePath="CZBuffer.cpp" + > + </File> + <File + RelativePath="CZBuffer.h" + > + </File> + <File + RelativePath="ITriangleRenderer.h" + > + </File> + <File + RelativePath="IZBuffer.h" + > + </File> + <File + RelativePath="S2DVertex.h" + > + </File> + </Filter> + <Filter + Name="OpenGL" + > + <File + RelativePath="COpenGLDriver.cpp" + > + </File> + <File + RelativePath="COpenGLDriver.h" + > + </File> + <File + RelativePath="COpenGLExtensionHandler.cpp" + > + </File> + <File + RelativePath="COpenGLExtensionHandler.h" + > + </File> + <File + RelativePath="COpenGLMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLNormalMapRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLNormalMapRenderer.h" + > + </File> + <File + RelativePath="COpenGLParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLParallaxMapRenderer.h" + > + </File> + <File + RelativePath="COpenGLShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLShaderMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLSLMaterialRenderer.cpp" + > + </File> + <File + RelativePath="COpenGLSLMaterialRenderer.h" + > + </File> + <File + RelativePath="COpenGLTexture.cpp" + > + </File> + <File + RelativePath="COpenGLTexture.h" + > + </File> + <File + RelativePath="glext.h" + > + </File> + </Filter> + <Filter + Name="Direct3D8" + > + <File + RelativePath="CD3D8Driver.cpp" + > + </File> + <File + RelativePath="CD3D8Driver.h" + > + </File> + <File + RelativePath="CD3D8MaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D8NormalMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D8NormalMapRenderer.h" + > + </File> + <File + RelativePath="CD3D8ParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D8ParallaxMapRenderer.h" + > + </File> + <File + RelativePath="CD3D8ShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D8ShaderMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D8Texture.cpp" + > + </File> + <File + RelativePath="CD3D8Texture.h" + > + </File> + </Filter> + <Filter + Name="Null" + > + <File + RelativePath="CColorConverter.cpp" + > + </File> + <File + RelativePath="CColorConverter.h" + > + </File> + <File + RelativePath="CFPSCounter.cpp" + > + </File> + <File + RelativePath="CFPSCounter.h" + > + </File> + <File + RelativePath="CImage.cpp" + > + </File> + <File + RelativePath="CImage.h" + > + </File> + <File + RelativePath="CImageLoaderBMP.cpp" + > + </File> + <File + RelativePath="CImageLoaderBMP.h" + > + </File> + <File + RelativePath="CImageLoaderJPG.cpp" + > + </File> + <File + RelativePath="CImageLoaderJPG.h" + > + </File> + <File + RelativePath="CImageLoaderPCX.cpp" + > + </File> + <File + RelativePath="CImageLoaderPCX.h" + > + </File> + <File + RelativePath="CImageLoaderPNG.cpp" + > + </File> + <File + RelativePath="CImageLoaderPNG.h" + > + </File> + <File + RelativePath="CImageLoaderPPM.cpp" + > + </File> + <File + RelativePath="CImageLoaderPPM.h" + > + </File> + <File + RelativePath="CImageLoaderPSD.cpp" + > + </File> + <File + RelativePath="CImageLoaderPSD.h" + > + </File> + <File + RelativePath="CImageLoaderRGB.cpp" + > + </File> + <File + RelativePath="CImageLoaderRGB.h" + > + </File> + <File + RelativePath="CImageLoaderTGA.cpp" + > + </File> + <File + RelativePath="CImageLoaderTGA.h" + > + </File> + <File + RelativePath="CImageLoaderWAL.cpp" + > + </File> + <File + RelativePath="CImageLoaderWAL.h" + > + </File> + <File + RelativePath="CNullDriver.cpp" + > + </File> + <File + RelativePath="CNullDriver.h" + > + </File> + <File + RelativePath="IImagePresenter.h" + > + </File> + <Filter + Name="Writer" + > + <File + RelativePath="CImageWriterBMP.cpp" + > + </File> + <File + RelativePath="CImageWriterBMP.h" + > + </File> + <File + RelativePath="CImageWriterJPG.cpp" + > + </File> + <File + RelativePath="CImageWriterJPG.h" + > + </File> + <File + RelativePath="CImageWriterPCX.cpp" + > + </File> + <File + RelativePath="CImageWriterPCX.h" + > + </File> + <File + RelativePath="CImageWriterPNG.cpp" + > + </File> + <File + RelativePath="CImageWriterPNG.h" + > + </File> + <File + RelativePath="CImageWriterPPM.cpp" + > + </File> + <File + RelativePath="CImageWriterPPM.h" + > + </File> + <File + RelativePath="CImageWriterPSD.cpp" + > + </File> + <File + RelativePath="CImageWriterPSD.h" + > + </File> + <File + RelativePath="CImageWriterTGA.cpp" + > + </File> + <File + RelativePath="CImageWriterTGA.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="Direct3D9" + > + <File + RelativePath="CD3D9Driver.cpp" + > + </File> + <File + RelativePath="CD3D9Driver.h" + > + </File> + <File + RelativePath="CD3D9HLSLMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9HLSLMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9MaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9NormalMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9NormalMapRenderer.h" + > + </File> + <File + RelativePath="CD3D9ParallaxMapRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9ParallaxMapRenderer.h" + > + </File> + <File + RelativePath="CD3D9ShaderMaterialRenderer.cpp" + > + </File> + <File + RelativePath="CD3D9ShaderMaterialRenderer.h" + > + </File> + <File + RelativePath="CD3D9Texture.cpp" + > + </File> + <File + RelativePath="CD3D9Texture.h" + > + </File> + </Filter> + <Filter + Name="Burning Video" + > + <File + RelativePath="CBurningShader_Raster_Reference.cpp" + > + </File> + <File + RelativePath="CDepthBuffer.cpp" + > + </File> + <File + RelativePath="CDepthBuffer.h" + > + </File> + <File + RelativePath="CSoftware2MaterialRenderer.h" + > + </File> + <File + RelativePath="CSoftwareDriver2.cpp" + > + </File> + <File + RelativePath="CSoftwareDriver2.h" + > + </File> + <File + RelativePath="CSoftwareTexture2.cpp" + > + </File> + <File + RelativePath="CSoftwareTexture2.h" + > + </File> + <File + RelativePath="CTRGouraud2.cpp" + > + </File> + <File + RelativePath="CTRGouraudAlpha2.cpp" + > + </File> + <File + RelativePath="CTRGouraudAlphaNoZ2.cpp" + > + </File> + <File + RelativePath="CTRTextureBlend.cpp" + > + </File> + + <File + RelativePath="CTRTextureDetailMap2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraud2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAdd2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAddNoZ2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAlpha.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudAlphaNoZ.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudNoZ2.cpp" + > + </File> + <File + RelativePath="CTRTextureGouraudVertexAlpha2.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_Add.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_M1.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_M2.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMap2_M4.cpp" + > + </File> + <File + RelativePath="CTRTextureLightMapGouraud2_M4.cpp" + > + </File> + <File + RelativePath="CTRTextureWire2.cpp" + > + </File> + <File + RelativePath="IBurningShader.cpp" + > + </File> + <File + RelativePath="IBurningShader.h" + > + </File> + <File + RelativePath="IDepthBuffer.h" + > + </File> + <File + RelativePath="S4DVertex.h" + > + </File> + <File + RelativePath="SoftwareDriver2_compile_config.h" + > + </File> + <File + RelativePath="SoftwareDriver2_helper.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="scene impl" + > + <File + RelativePath="CDefaultSceneNodeAnimatorFactory.cpp" + > + </File> + <File + RelativePath="CDefaultSceneNodeAnimatorFactory.h" + > + </File> + <File + RelativePath="CDefaultSceneNodeFactory.cpp" + > + </File> + <File + RelativePath="CDefaultSceneNodeFactory.h" + > + </File> + <File + RelativePath="CGeometryCreator.cpp" + > + </File> + <File + RelativePath="CGeometryCreator.h" + > + </File> + <File + RelativePath="CMeshCache.cpp" + > + </File> + <File + RelativePath="CMeshCache.h" + > + </File> + <File + RelativePath="CMeshManipulator.cpp" + > + </File> + <File + RelativePath="CMeshManipulator.h" + > + </File> + <File + RelativePath="CSceneManager.cpp" + > + </File> + <File + RelativePath="CSceneManager.h" + > + </File> + <File + RelativePath="Octree.h" + > + </File> + <Filter + Name="loaders" + > + <File + RelativePath="C3DSMeshFileLoader.cpp" + > + </File> + <File + RelativePath="C3DSMeshFileLoader.h" + > + </File> + <File + RelativePath="CSMFMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CSMFMeshFileLoader.h" + > + </File> + <File + RelativePath="CAnimatedMeshMD2.cpp" + > + </File> + <File + RelativePath="CAnimatedMeshMD2.h" + > + </File> + <File + RelativePath="CAnimatedMeshMD3.cpp" + > + </File> + <File + RelativePath="CAnimatedMeshMD3.h" + > + </File> + <File + RelativePath="CB3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CB3DMeshFileLoader.h" + > + </File> + <File + RelativePath="CBSPMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CBSPMeshFileLoader.h" + > + </File> + <File + RelativePath="CColladaFileLoader.cpp" + > + </File> + <File + RelativePath="CColladaFileLoader.h" + > + </File> + <File + RelativePath="CCSMLoader.cpp" + > + </File> + <File + RelativePath="CCSMLoader.h" + > + </File> + <File + RelativePath="CDMFLoader.cpp" + > + </File> + <File + RelativePath="CDMFLoader.h" + > + </File> + <File + RelativePath="CIrrMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CIrrMeshFileLoader.h" + > + </File> + <File + RelativePath="CLMTSMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CLMTSMeshFileLoader.h" + > + </File> + <File + RelativePath="CLWOMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CLWOMeshFileLoader.h" + > + </File> + <File + RelativePath="CMD2MeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMD2MeshFileLoader.h" + > + </File> + <File + RelativePath="CMD3MeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMD3MeshFileLoader.h" + > + </File> + <File + RelativePath="CMS3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMS3DMeshFileLoader.h" + > + </File> + <File + RelativePath="CMY3DHelper.h" + > + </File> + <File + RelativePath="CMY3DMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CMY3DMeshFileLoader.h" + > + </File> + <File + RelativePath="COBJMeshFileLoader.cpp" + > + </File> + <File + RelativePath="COBJMeshFileLoader.h" + > + </File> + <File + RelativePath="COCTLoader.cpp" + > + </File> + <File + RelativePath="COCTLoader.h" + > + </File> + <File + RelativePath="COgreMeshFileLoader.cpp" + > + </File> + <File + RelativePath="COgreMeshFileLoader.h" + > + </File> + <File + RelativePath="CPLYMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CPLYMeshFileLoader.h" + > + </File> + <File + RelativePath="CQ3LevelMesh.cpp" + > + </File> + <File + RelativePath="CQ3LevelMesh.h" + > + </File> + <File + RelativePath="CSkinnedMesh.cpp" + > + </File> + <File + RelativePath="CSkinnedMesh.h" + > + </File> + <File + RelativePath="CSTLMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CSTLMeshFileLoader.h" + > + </File> + <File + RelativePath="CXMeshFileLoader.cpp" + > + </File> + <File + RelativePath="CXMeshFileLoader.h" + > + </File> + <File + RelativePath="dmfsupport.h" + > + </File> + </Filter> + <Filter + Name="sceneNodes" + > + <File + RelativePath="CAnimatedMeshSceneNode.cpp" + > + </File> + <File + RelativePath="CAnimatedMeshSceneNode.h" + > + </File> + <File + RelativePath="CBillboardSceneNode.cpp" + > + </File> + <File + RelativePath="CBillboardSceneNode.h" + > + </File> + <File + RelativePath="CBoneSceneNode.cpp" + > + </File> + <File + RelativePath="CBoneSceneNode.h" + > + </File> + <File + RelativePath="CCameraSceneNode.cpp" + > + </File> + <File + RelativePath="CCameraSceneNode.h" + > + </File> + <File + RelativePath="CCubeSceneNode.cpp" + > + </File> + <File + RelativePath="CCubeSceneNode.h" + > + </File> + <File + RelativePath="CDummyTransformationSceneNode.cpp" + > + </File> + <File + RelativePath="CDummyTransformationSceneNode.h" + > + </File> + <File + RelativePath="CEmptySceneNode.cpp" + > + </File> + <File + RelativePath="CEmptySceneNode.h" + > + </File> + <File + RelativePath="CLightSceneNode.cpp" + > + </File> + <File + RelativePath="CLightSceneNode.h" + > + </File> + <File + RelativePath="CMeshSceneNode.cpp" + > + </File> + <File + RelativePath="CMeshSceneNode.h" + > + </File> + <File + RelativePath="COctreeSceneNode.cpp" + > + </File> + <File + RelativePath="COctreeSceneNode.h" + > + </File> + <File + RelativePath="CQuake3ShaderSceneNode.cpp" + > + </File> + <File + RelativePath="CQuake3ShaderSceneNode.h" + > + </File> + <File + RelativePath="CShadowVolumeSceneNode.cpp" + > + </File> + <File + RelativePath="CShadowVolumeSceneNode.h" + > + </File> + <File + RelativePath="CSkyBoxSceneNode.cpp" + > + </File> + <File + RelativePath="CSkyBoxSceneNode.h" + > + </File> + <File + RelativePath="CSkyDomeSceneNode.cpp" + > + </File> + <File + RelativePath="CSkyDomeSceneNode.h" + > + </File> + <File + RelativePath="CSphereSceneNode.cpp" + > + </File> + <File + RelativePath="CSphereSceneNode.h" + > + </File> + <File + RelativePath="CTerrainSceneNode.cpp" + > + </File> + <File + RelativePath="CTerrainSceneNode.h" + > + </File> + <File + RelativePath="CTextSceneNode.cpp" + > + </File> + <File + RelativePath="CTextSceneNode.h" + > + </File> + <File + RelativePath="CVolumeLightSceneNode.cpp" + > + </File> + <File + RelativePath="CVolumeLightSceneNode.h" + > + </File> + <File + RelativePath="CWaterSurfaceSceneNode.cpp" + > + </File> + <File + RelativePath="CWaterSurfaceSceneNode.h" + > + </File> + </Filter> + <Filter + Name="particleSystem" + > + <File + RelativePath="CParticleAnimatedMeshSceneNodeEmitter.cpp" + > + </File> + <File + RelativePath="CParticleAttractionAffector.cpp" + > + </File> + <File + RelativePath="CParticleBoxEmitter.cpp" + > + </File> + <File + RelativePath="CParticleBoxEmitter.h" + > + </File> + <File + RelativePath="CParticleCylinderEmitter.cpp" + > + </File> + <File + RelativePath="CParticleFadeOutAffector.cpp" + > + </File> + <File + RelativePath="CParticleFadeOutAffector.h" + > + </File> + <File + RelativePath="CParticleGravityAffector.cpp" + > + </File> + <File + RelativePath="CParticleGravityAffector.h" + > + </File> + <File + RelativePath="CParticleMeshEmitter.cpp" + > + </File> + <File + RelativePath="CParticlePointEmitter.cpp" + > + </File> + <File + RelativePath="CParticlePointEmitter.h" + > + </File> + <File + RelativePath="CParticleRingEmitter.cpp" + > + </File> + <File + RelativePath="CParticleRotationAffector.cpp" + > + </File> + <File + RelativePath="CParticleScaleAffector.cpp" + > + </File> + <File + RelativePath="CParticleScaleAffector.h" + > + </File> + <File + RelativePath="CParticleSphereEmitter.cpp" + > + </File> + <File + RelativePath="CParticleSystemSceneNode.cpp" + > + </File> + <File + RelativePath="CParticleSystemSceneNode.h" + > + </File> + </Filter> + <Filter + Name="collision" + > + <File + RelativePath="CMetaTriangleSelector.cpp" + > + </File> + <File + RelativePath="CMetaTriangleSelector.h" + > + </File> + <File + RelativePath="COctreeTriangleSelector.cpp" + > + </File> + <File + RelativePath="COctreeTriangleSelector.h" + > + </File> + <File + RelativePath="CSceneCollisionManager.cpp" + > + </File> + <File + RelativePath="CSceneCollisionManager.h" + > + </File> + <File + RelativePath="CTerrainTriangleSelector.cpp" + > + </File> + <File + RelativePath="CTerrainTriangleSelector.h" + > + </File> + <File + RelativePath="CTriangleBBSelector.cpp" + > + </File> + <File + RelativePath="CTriangleBBSelector.h" + > + </File> + <File + RelativePath="CTriangleSelector.cpp" + > + </File> + <File + RelativePath="CTriangleSelector.h" + > + </File> + </Filter> + <Filter + Name="animators" + > + <File + RelativePath="CSceneNodeAnimatorCameraFPS.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraFPS.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraMaya.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCameraMaya.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCollisionResponse.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorCollisionResponse.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorDelete.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorDelete.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyCircle.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyCircle.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyStraight.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFlyStraight.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFollowSpline.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorFollowSpline.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorRotation.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorRotation.h" + > + </File> + <File + RelativePath="CSceneNodeAnimatorTexture.cpp" + > + </File> + <File + RelativePath="CSceneNodeAnimatorTexture.h" + > + </File> + </Filter> + <Filter + Name="writers" + > + <File + RelativePath="CColladaMeshWriter.cpp" + > + </File> + <File + RelativePath="CColladaMeshWriter.h" + > + </File> + <File + RelativePath="CIrrMeshWriter.cpp" + > + </File> + <File + RelativePath="CIrrMeshWriter.h" + > + </File> + <File + RelativePath="COBJMeshWriter.cpp" + > + </File> + <File + RelativePath="CPLYMeshWriter.cpp" + > + </File> + <File + RelativePath="CPLYMeshWriter.h" + > + </File> + <File + RelativePath="COBJMeshWriter.h" + > + </File> + <File + RelativePath="CSTLMeshWriter.cpp" + > + </File> + <File + RelativePath="CSTLMeshWriter.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="io impl" + > + <File + RelativePath="CAttributeImpl.h" + > + </File> + <File + RelativePath="CAttributes.cpp" + > + </File> + <File + RelativePath="CAttributes.h" + > + </File> + <File + RelativePath="CFileList.cpp" + > + </File> + <File + RelativePath="CFileList.h" + > + </File> + <File + RelativePath="CFileSystem.cpp" + > + </File> + <File + RelativePath="CFileSystem.h" + > + </File> + <File + RelativePath="CLimitReadFile.cpp" + > + </File> + <File + RelativePath="CLimitReadFile.h" + > + </File> + <File + RelativePath="CMemoryFile.cpp" + > + </File> + <File + RelativePath="CMemoryFile.h" + > + </File> + <File + RelativePath="CPakReader.cpp" + > + </File> + <File + RelativePath="CPakReader.h" + > + </File> + <File + RelativePath="CNPKReader.cpp" + > + </File> + <File + RelativePath="CNPKReader.h" + > + </File> + <File + RelativePath="CTarReader.cpp" + > + </File> + <File + RelativePath="CTarReader.h" + > + </File> + <File + RelativePath="CMountPointReader.cpp" + > + </File> + <File + RelativePath="CMountPointReader.h" + > + </File> + <File + RelativePath="CReadFile.cpp" + > + </File> + <File + RelativePath="CReadFile.h" + > + </File> + <File + RelativePath="CWriteFile.cpp" + > + </File> + <File + RelativePath="CWriteFile.h" + > + </File> + <File + RelativePath="CXMLReader.cpp" + > + </File> + <File + RelativePath="CXMLReader.h" + > + </File> + <File + RelativePath="CXMLReaderImpl.h" + > + </File> + <File + RelativePath="CXMLWriter.cpp" + > + </File> + <File + RelativePath="CXMLWriter.h" + > + </File> + <File + RelativePath="CZipReader.cpp" + > + </File> + <File + RelativePath="CZipReader.h" + > + </File> + <File + RelativePath="IAttribute.h" + > + </File> + <File + RelativePath="irrXML.cpp" + > + </File> + </Filter> + <Filter + Name="irr impl" + > + <File + RelativePath="CIrrDeviceConsole.cpp" + > + </File> + <File + RelativePath="CIrrDeviceConsole.h" + > + </File> + <File + RelativePath="CIrrDeviceLinux.cpp" + > + </File> + <File + RelativePath="CIrrDeviceLinux.h" + > + </File> + <File + RelativePath="CIrrDeviceSDL.cpp" + > + </File> + <File + RelativePath="CIrrDeviceSDL.h" + > + </File> + <File + RelativePath="CIrrDeviceStub.cpp" + > + </File> + <File + RelativePath="CIrrDeviceStub.h" + > + </File> + <File + RelativePath="CIrrDeviceWin32.cpp" + > + </File> + <File + RelativePath="CIrrDeviceWin32.h" + > + </File> + <File + RelativePath="CIrrDeviceWinCE.cpp" + > + </File> + <File + RelativePath="CIrrDeviceWinCE.h" + > + </File> + <File + RelativePath="CLogger.cpp" + > + </File> + <File + RelativePath="CLogger.h" + > + </File> + <File + RelativePath="COSOperator.cpp" + > + </File> + <File + RelativePath="COSOperator.h" + > + </File> + <File + RelativePath="CTimer.h" + > + </File> + <File + RelativePath="Irrlicht.cpp" + > + </File> + <File + RelativePath="os.cpp" + > + </File> + <File + RelativePath="os.h" + > + </File> + <Filter + Name="extern" + > + <File + RelativePath=".\lzma\LzmaDec.c" + > + </File> + <File + RelativePath=".\lzma\LzmaDec.h" + > + </File> + <File + RelativePath=".\lzma\Types.h" + > + </File> + <Filter + Name="zlib" + > + <File + RelativePath="zlib\adler32.c" + > + </File> + <File + RelativePath="zlib\compress.c" + > + </File> + <File + RelativePath="zlib\crc32.c" + > + </File> + <File + RelativePath="zlib\crc32.h" + > + </File> + <File + RelativePath="zlib\deflate.c" + > + </File> + <File + RelativePath="zlib\deflate.h" + > + </File> + <File + RelativePath="zlib\inffast.c" + > + </File> + <File + RelativePath="zlib\inffast.h" + > + </File> + <File + RelativePath="zlib\inffixed.h" + > + </File> + <File + RelativePath="zlib\inflate.c" + > + </File> + <File + RelativePath="zlib\inftrees.c" + > + </File> + <File + RelativePath="zlib\inftrees.h" + > + </File> + <File + RelativePath="zlib\trees.c" + > + </File> + <File + RelativePath="zlib\trees.h" + > + </File> + <File + RelativePath="zlib\uncompr.c" + > + </File> + <File + RelativePath="zlib\zconf.h" + > + </File> + <File + RelativePath="zlib\zlib.h" + > + </File> + <File + RelativePath="zlib\zutil.c" + > + </File> + <File + RelativePath="zlib\zutil.h" + > + </File> + </Filter> + <Filter + Name="jpeglib" + > + <File + RelativePath="jpeglib\cderror.h" + > + </File> + <File + RelativePath="jpeglib\jaricom.c" + > + </File> + <File + RelativePath="jpeglib\jcapimin.c" + > + </File> + <File + RelativePath="jpeglib\jcapistd.c" + > + </File> + <File + RelativePath="jpeglib\jcarith.c" + > + </File> + <File + RelativePath="jpeglib\jccoefct.c" + > + </File> + <File + RelativePath="jpeglib\jccolor.c" + > + </File> + <File + RelativePath="jpeglib\jcdctmgr.c" + > + </File> + <File + RelativePath="jpeglib\jchuff.c" + > + </File> + <File + RelativePath="jpeglib\jcinit.c" + > + </File> + <File + RelativePath="jpeglib\jcmainct.c" + > + </File> + <File + RelativePath="jpeglib\jcmarker.c" + > + </File> + <File + RelativePath="jpeglib\jcmaster.c" + > + </File> + <File + RelativePath="jpeglib\jcomapi.c" + > + </File> + <File + RelativePath="jpeglib\jconfig.h" + > + </File> + <File + RelativePath="jpeglib\jcparam.c" + > + </File> + <File + RelativePath="jpeglib\jcprepct.c" + > + </File> + <File + RelativePath="jpeglib\jcsample.c" + > + </File> + <File + RelativePath="jpeglib\jctrans.c" + > + </File> + <File + RelativePath="jpeglib\jdapimin.c" + > + </File> + <File + RelativePath="jpeglib\jdapistd.c" + > + </File> + <File + RelativePath="jpeglib\jdarith.c" + > + </File> + <File + RelativePath="jpeglib\jdatadst.c" + > + </File> + <File + RelativePath="jpeglib\jdatasrc.c" + > + </File> + <File + RelativePath="jpeglib\jdcoefct.c" + > + </File> + <File + RelativePath="jpeglib\jdcolor.c" + > + </File> + <File + RelativePath="jpeglib\jdct.h" + > + </File> + <File + RelativePath="jpeglib\jddctmgr.c" + > + </File> + <File + RelativePath="jpeglib\jdhuff.c" + > + </File> + <File + RelativePath="jpeglib\jdinput.c" + > + </File> + <File + RelativePath="jpeglib\jdmainct.c" + > + </File> + <File + RelativePath="jpeglib\jdmarker.c" + > + </File> + <File + RelativePath="jpeglib\jdmaster.c" + > + </File> + <File + RelativePath="jpeglib\jdmerge.c" + > + </File> + <File + RelativePath="jpeglib\jdpostct.c" + > + </File> + <File + RelativePath="jpeglib\jdsample.c" + > + </File> + <File + RelativePath="jpeglib\jdtrans.c" + > + </File> + <File + RelativePath="jpeglib\jerror.c" + > + </File> + <File + RelativePath="jpeglib\jerror.h" + > + </File> + <File + RelativePath="jpeglib\jfdctflt.c" + > + </File> + <File + RelativePath="jpeglib\jfdctfst.c" + > + </File> + <File + RelativePath="jpeglib\jfdctint.c" + > + </File> + <File + RelativePath="jpeglib\jidctflt.c" + > + </File> + <File + RelativePath="jpeglib\jidctfst.c" + > + </File> + <File + RelativePath="jpeglib\jidctint.c" + > + </File> + <File + RelativePath="jpeglib\jinclude.h" + > + </File> + <File + RelativePath="jpeglib\jmemmgr.c" + > + </File> + <File + RelativePath="jpeglib\jmemnobs.c" + > + </File> + <File + RelativePath="jpeglib\jmemsys.h" + > + </File> + <File + RelativePath="jpeglib\jmorecfg.h" + > + </File> + <File + RelativePath="jpeglib\jpegint.h" + > + </File> + <File + RelativePath="jpeglib\jpeglib.h" + > + </File> + <File + RelativePath="jpeglib\jquant1.c" + > + </File> + <File + RelativePath="jpeglib\jquant2.c" + > + </File> + <File + RelativePath="jpeglib\jutils.c" + > + </File> + <File + RelativePath="jpeglib\jversion.h" + > + </File> + </Filter> + <Filter + Name="libpng" + > + <File + RelativePath="libpng\png.c" + > + </File> + <File + RelativePath="libpng\png.h" + > + </File> + <File + RelativePath="libpng\pngconf.h" + > + </File> + <File + RelativePath="libpng\pngerror.c" + > + </File> + <File + RelativePath="libpng\pngget.c" + > + </File> + <File + RelativePath="libpng\pngmem.c" + > + </File> + <File + RelativePath="libpng\pngpread.c" + > + </File> + <File + RelativePath="libpng\pngread.c" + > + </File> + <File + RelativePath="libpng\pngrio.c" + > + </File> + <File + RelativePath="libpng\pngrtran.c" + > + </File> + <File + RelativePath="libpng\pngrutil.c" + > + </File> + <File + RelativePath="libpng\pngset.c" + > + </File> + <File + RelativePath="libpng\pngtrans.c" + > + </File> + <File + RelativePath="libpng\pngwio.c" + > + </File> + <File + RelativePath="libpng\pngwrite.c" + > + </File> + <File + RelativePath="libpng\pngwtran.c" + > + </File> + <File + RelativePath="libpng\pngwutil.c" + > + </File> + </Filter> + <Filter + Name="aesGladman" + > + <File + RelativePath=".\aesGladman\aes.h" + > + </File> + <File + RelativePath=".\aesGladman\aescrypt.cpp" + > + </File> + <File + RelativePath=".\aesGladman\aeskey.cpp" + > + </File> + <File + RelativePath=".\aesGladman\aesopt.h" + > + </File> + <File + RelativePath=".\aesGladman\aestab.cpp" + > + </File> + <File + RelativePath=".\aesGladman\fileenc.cpp" + > + </File> + <File + RelativePath=".\aesGladman\fileenc.h" + > + </File> + <File + RelativePath=".\aesGladman\hmac.cpp" + > + </File> + <File + RelativePath=".\aesGladman\hmac.h" + > + </File> + <File + RelativePath=".\aesGladman\prng.cpp" + > + </File> + <File + RelativePath=".\aesGladman\prng.h" + > + </File> + <File + RelativePath=".\aesGladman\pwd2key.cpp" + > + </File> + <File + RelativePath=".\aesGladman\pwd2key.h" + > + </File> + <File + RelativePath=".\aesGladman\sha1.cpp" + > + </File> + <File + RelativePath=".\aesGladman\sha1.h" + > + </File> + <File + RelativePath=".\aesGladman\sha2.cpp" + > + </File> + <File + RelativePath=".\aesGladman\sha2.h" + > + </File> + </Filter> + <Filter + Name="bzip2" + > + <File + RelativePath=".\bzip2\blocksort.c" + > + </File> + <File + RelativePath=".\bzip2\bzcompress.c" + > + </File> + <File + RelativePath=".\bzip2\bzlib.c" + > + </File> + <File + RelativePath=".\bzip2\bzlib.h" + > + </File> + <File + RelativePath=".\bzip2\bzlib_private.h" + > + </File> + <File + RelativePath=".\bzip2\crctable.c" + > + </File> + <File + RelativePath=".\bzip2\decompress.c" + > + </File> + <File + RelativePath=".\bzip2\huffman.c" + > + </File> + <File + RelativePath=".\bzip2\randtable.c" + > + </File> + </Filter> + </Filter> + </Filter> + <Filter + Name="doc" + > + <File + RelativePath="..\..\changes.txt" + > + </File> + <File + RelativePath="..\..\readme.txt" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.sln b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.sln new file mode 100644 index 0000000..1a35817 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.sln @@ -0,0 +1,30 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht_xbox", "Irrlicht_xbox.vcproj", "{2440E601-7438-4C6B-B4AF-BBFE9735875E}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Profile = Profile + Profile_FastCap = Profile_FastCap + Release = Release + Release_LTCG = Release_LTCG + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Debug.ActiveCfg = Debug|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Debug.Build.0 = Debug|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile.ActiveCfg = Profile|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile.Build.0 = Profile|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release.ActiveCfg = Release|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release.Build.0 = Release|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox + {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release_LTCG.Build.0 = Release_LTCG|Xbox + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.vcproj b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.vcproj new file mode 100644 index 0000000..d92d0df --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Irrlicht_xbox.vcproj @@ -0,0 +1,1987 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="Irrlicht_xbox" + ProjectGUID="{2440E601-7438-4C6B-B4AF-BBFE9735875E}" + Keyword="XboxProj"> + <Platforms> + <Platform + Name="Xbox"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Xbox" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="_DEBUG;_XBOX;_LIB;_IRR_STATIC_LIB_" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch" + WarningLevel="3" + Detect64BitPortabilityProblems="FALSE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="$(OutDir)/$(ProjectName).lib"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + </Configuration> + <Configuration + Name="Profile|Xbox" + OutputDirectory="Profile" + IntermediateDirectory="Profile" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + OmitFramePointers="TRUE" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;_LIB;_IRR_STATIC_LIB_" + StringPooling="TRUE" + RuntimeLibrary="0" + BufferSecurityCheck="TRUE" + EnableFunctionLevelLinking="TRUE" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch" + WarningLevel="3" + Detect64BitPortabilityProblems="FALSE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="$(OutDir)/$(ProjectName).lib"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + </Configuration> + <Configuration + Name="Profile_FastCap|Xbox" + OutputDirectory="Profile_FastCap" + IntermediateDirectory="Profile_FastCap" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + OmitFramePointers="TRUE" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB;_IRR_STATIC_LIB_" + StringPooling="TRUE" + RuntimeLibrary="0" + BufferSecurityCheck="TRUE" + EnableFunctionLevelLinking="TRUE" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch" + WarningLevel="3" + Detect64BitPortabilityProblems="FALSE" + DebugInformationFormat="3" + FastCAP="TRUE"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="$(OutDir)/$(ProjectName).lib"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + </Configuration> + <Configuration + Name="Release|Xbox" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + OmitFramePointers="TRUE" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="NDEBUG;_XBOX;_LIB;_IRR_STATIC_LIB_" + StringPooling="TRUE" + RuntimeLibrary="0" + BufferSecurityCheck="TRUE" + EnableFunctionLevelLinking="TRUE" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch" + WarningLevel="3" + Detect64BitPortabilityProblems="FALSE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="$(OutDir)/$(ProjectName).lib"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + </Configuration> + <Configuration + Name="Release_LTCG|Xbox" + OutputDirectory="Release_LTCG" + IntermediateDirectory="Release_LTCG" + ConfigurationType="4" + CharacterSet="2" + WholeProgramOptimization="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + OmitFramePointers="TRUE" + OptimizeForProcessor="2" + AdditionalIncludeDirectories="..\..\include;zlib" + PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB;_IRR_STATIC_LIB_" + StringPooling="TRUE" + RuntimeLibrary="0" + BufferSecurityCheck="TRUE" + EnableFunctionLevelLinking="TRUE" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch" + WarningLevel="3" + Detect64BitPortabilityProblems="FALSE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="$(OutDir)/$(ProjectName).lib"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="include" + Filter=""> + <File + RelativePath="..\..\include\aabbox3d.h"> + </File> + <File + RelativePath="..\..\include\CDynamicMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\CIndexBuffer.h"> + </File> + <File + RelativePath="..\..\include\CMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\coreutil.h"> + </File> + <File + RelativePath="..\..\include\CVertexBuffer.h"> + </File> + <File + RelativePath="..\..\include\dimension2d.h"> + </File> + <File + RelativePath="..\..\include\ECullingTypes.h"> + </File> + <File + RelativePath="..\..\include\EDebugSceneTypes.h"> + </File> + <File + RelativePath="..\..\include\EDriverFeatures.h"> + </File> + <File + RelativePath="..\..\include\EDriverTypes.h"> + </File> + <File + RelativePath="..\..\include\EGUIAlignment.h"> + </File> + <File + RelativePath="..\..\include\EGUIElementTypes.h"> + </File> + <File + RelativePath="..\..\include\EHardwareBufferFlags.h"> + </File> + <File + RelativePath="..\..\include\EMaterialFlags.h"> + </File> + <File + RelativePath="..\..\include\EMaterialTypes.h"> + </File> + <File + RelativePath="..\..\include\EMeshWriterEnums.h"> + </File> + <File + RelativePath="..\..\include\EMessageBoxFlags.h"> + </File> + <File + RelativePath="..\..\include\ESceneNodeAnimatorTypes.h"> + </File> + <File + RelativePath="..\..\include\ESceneNodeTypes.h"> + </File> + <File + RelativePath="..\..\include\ETerrainElements.h"> + </File> + <File + RelativePath="..\..\include\fast_atof.h"> + </File> + <File + RelativePath="..\..\include\heapsort.h"> + </File> + <File + RelativePath="..\..\include\IAnimatedMesh.h"> + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD2.h"> + </File> + <File + RelativePath="..\..\include\IAnimatedMeshMD3.h"> + </File> + <File + RelativePath="..\..\include\IAnimatedMeshSceneNode.h"> + </File> + <File + RelativePath="..\..\include\EAttributes.h"> + </File> + <File + RelativePath="..\..\include\IAttributeExchangingObject.h"> + </File> + <File + RelativePath="..\..\include\IAttributes.h"> + </File> + <File + RelativePath="..\..\include\IBillboardSceneNode.h"> + </File> + <File + RelativePath="..\..\include\IBillboardTextSceneNode.h"> + </File> + <File + RelativePath="..\..\include\IBoneSceneNode.h"> + </File> + <File + RelativePath="..\..\include\ICameraSceneNode.h"> + </File> + <File + RelativePath="..\..\include\ICursorControl.h"> + </File> + <File + RelativePath="..\..\include\IDummyTransformationSceneNode.h"> + </File> + <File + RelativePath="..\..\include\IDynamicMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\IEventReceiver.h"> + </File> + <File + RelativePath="..\..\include\IFileArchive.h"> + </File> + <File + RelativePath="..\..\include\IFileList.h"> + </File> + <File + RelativePath="..\..\include\IFileSystem.h"> + </File> + <File + RelativePath="..\..\include\IGPUProgrammingServices.h"> + </File> + <File + RelativePath="..\..\include\IGUIButton.h"> + </File> + <File + RelativePath="..\..\include\IGUICheckBox.h"> + </File> + <File + RelativePath="..\..\include\IGUIColorSelectDialog.h"> + </File> + <File + RelativePath="..\..\include\IGUIComboBox.h"> + </File> + <File + RelativePath="..\..\include\IGUIContextMenu.h"> + </File> + <File + RelativePath="..\..\include\IGUIEditBox.h"> + </File> + <File + RelativePath="..\..\include\IGUIElement.h"> + </File> + <File + RelativePath="..\..\include\IGUIElementFactory.h"> + </File> + <File + RelativePath="..\..\include\IGUIEnvironment.h"> + </File> + <File + RelativePath="..\..\include\IGUIFileOpenDialog.h"> + </File> + <File + RelativePath="..\..\include\IGUIFont.h"> + </File> + <File + RelativePath="..\..\include\IGUIFontBitmap.h"> + </File> + <File + RelativePath="..\..\include\IGUIImage.h"> + </File> + <File + RelativePath="..\..\include\IGUIImageList.h"> + </File> + <File + RelativePath="..\..\include\IGUIInOutFader.h"> + </File> + <File + RelativePath="..\..\include\IGUIListBox.h"> + </File> + <File + RelativePath="..\..\include\IGUIMeshViewer.h"> + </File> + <File + RelativePath="..\..\include\IGUIScrollBar.h"> + </File> + <File + RelativePath="..\..\include\IGUISkin.h"> + </File> + <File + RelativePath="..\..\include\IGUISpinBox.h"> + </File> + <File + RelativePath="..\..\include\IGUISpriteBank.h"> + </File> + <File + RelativePath="..\..\include\IGUIStaticText.h"> + </File> + <File + RelativePath="..\..\include\IGUITabControl.h"> + </File> + <File + RelativePath="..\..\include\IGUITable.h"> + </File> + <File + RelativePath="..\..\include\IGUIToolbar.h"> + </File> + <File + RelativePath="..\..\include\IGUITreeView.h"> + </File> + <File + RelativePath="..\..\include\IGUIWindow.h"> + </File> + <File + RelativePath="..\..\include\IImage.h"> + </File> + <File + RelativePath="..\..\include\IImageLoader.h"> + </File> + <File + RelativePath="..\..\include\IImageWriter.h"> + </File> + <File + RelativePath="..\..\include\IIndexBuffer.h"> + </File> + <File + RelativePath="..\..\include\ILightManager.h"> + </File> + <File + RelativePath="..\..\include\ILightSceneNode.h"> + </File> + <File + RelativePath="..\..\include\ILogger.h"> + </File> + <File + RelativePath="..\..\include\IMaterialRenderer.h"> + </File> + <File + RelativePath="..\..\include\IMaterialRendererServices.h"> + </File> + <File + RelativePath="..\..\include\IMesh.h"> + </File> + <File + RelativePath="..\..\include\IMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\IMeshCache.h"> + </File> + <File + RelativePath="..\..\include\IMeshLoader.h"> + </File> + <File + RelativePath="..\..\include\IMeshManipulator.h"> + </File> + <File + RelativePath="..\..\include\IMeshSceneNode.h"> + </File> + <File + RelativePath="..\..\include\IMeshWriter.h"> + </File> + <File + RelativePath="..\..\include\IMetaTriangleSelector.h"> + </File> + <File + RelativePath="..\..\include\IOSOperator.h"> + </File> + <File + RelativePath="..\..\include\IParticleAffector.h"> + </File> + <File + RelativePath="..\..\include\IParticleAnimatedMeshSceneNodeEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleAttractionAffector.h"> + </File> + <File + RelativePath="..\..\include\IParticleBoxEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleCylinderEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleFadeOutAffector.h"> + </File> + <File + RelativePath="..\..\include\IParticleGravityAffector.h"> + </File> + <File + RelativePath="..\..\include\IParticleMeshEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleRingEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleRotationAffector.h"> + </File> + <File + RelativePath="..\..\include\IParticleSphereEmitter.h"> + </File> + <File + RelativePath="..\..\include\IParticleSystemSceneNode.h"> + </File> + <File + RelativePath="..\..\include\IQ3LevelMesh.h"> + </File> + <File + RelativePath="..\..\include\IQ3Shader.h"> + </File> + <File + RelativePath="..\..\include\IReadFile.h"> + </File> + <File + RelativePath="..\..\include\IReferenceCounted.h"> + </File> + <File + RelativePath="..\..\include\irrAllocator.h"> + </File> + <File + RelativePath="..\..\include\irrArray.h"> + </File> + <File + RelativePath="..\..\include\IrrCompileConfig.h"> + </File> + <File + RelativePath="..\..\include\irrlicht.h"> + </File> + <File + RelativePath="..\..\include\IrrlichtDevice.h"> + </File> + <File + RelativePath="..\..\include\irrList.h"> + </File> + <File + RelativePath="..\..\include\irrMap.h"> + </File> + <File + RelativePath="..\..\include\irrMath.h"> + </File> + <File + RelativePath="..\..\include\irrString.h"> + </File> + <File + RelativePath="..\..\include\irrTypes.h"> + </File> + <File + RelativePath="..\..\include\irrXML.h"> + </File> + <File + RelativePath="..\..\include\ISceneCollisionManager.h"> + </File> + <File + RelativePath="..\..\include\ISceneManager.h"> + </File> + <File + RelativePath="..\..\include\ISceneNode.h"> + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimator.h"> + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraFPS.h"> + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCameraMaya.h"> + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorCollisionResponse.h"> + </File> + <File + RelativePath="..\..\include\ISceneNodeAnimatorFactory.h"> + </File> + <File + RelativePath="..\..\include\ISceneNodeFactory.h"> + </File> + <File + RelativePath="..\..\include\ISceneUserDataSerializer.h"> + </File> + <File + RelativePath="..\..\include\IShaderConstantSetCallBack.h"> + </File> + <File + RelativePath="..\..\include\IShadowVolumeSceneNode.h"> + </File> + <File + RelativePath="..\..\include\ISkinnedMesh.h"> + </File> + <File + RelativePath="..\..\include\ITerrainSceneNode.h"> + </File> + <File + RelativePath="..\..\include\ITextSceneNode.h"> + </File> + <File + RelativePath="..\..\include\ITexture.h"> + </File> + <File + RelativePath="..\..\include\ITimer.h"> + </File> + <File + RelativePath="..\..\include\ITriangleSelector.h"> + </File> + <File + RelativePath="..\..\include\IVertexBuffer.h"> + </File> + <File + RelativePath="..\..\include\IVideoDriver.h"> + </File> + <File + RelativePath="..\..\include\IVideoModeList.h"> + </File> + <File + RelativePath="..\..\include\IVolumeLightSceneNode.h"> + </File> + <File + RelativePath="..\..\include\IWriteFile.h"> + </File> + <File + RelativePath="..\..\include\IXMLReader.h"> + </File> + <File + RelativePath="..\..\include\IXMLWriter.h"> + </File> + <File + RelativePath="..\..\include\Keycodes.h"> + </File> + <File + RelativePath="..\..\include\line2d.h"> + </File> + <File + RelativePath="..\..\include\line3d.h"> + </File> + <File + RelativePath="..\..\include\matrix4.h"> + </File> + <File + RelativePath="..\..\include\plane3d.h"> + </File> + <File + RelativePath="..\..\include\position2d.h"> + </File> + <File + RelativePath="..\..\include\quaternion.h"> + </File> + <File + RelativePath="..\..\include\rect.h"> + </File> + <File + RelativePath="..\..\include\S3DVertex.h"> + </File> + <File + RelativePath="..\..\include\SAnimatedMesh.h"> + </File> + <File + RelativePath="..\..\include\SceneParameters.h"> + </File> + <File + RelativePath="..\..\include\SColor.h"> + </File> + <File + RelativePath="..\..\include\SExposedVideoData.h"> + </File> + <File + RelativePath="..\..\include\SIrrCreationParameters.h"> + </File> + <File + RelativePath="..\..\include\SKeyMap.h"> + </File> + <File + RelativePath="..\..\include\SLight.h"> + </File> + <File + RelativePath="..\..\include\SMaterial.h"> + </File> + <File + RelativePath="..\..\include\SMaterialLayer.h"> + </File> + <File + RelativePath="..\..\include\SMesh.h"> + </File> + <File + RelativePath="..\..\include\SMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\SMeshBufferLightMap.h"> + </File> + <File + RelativePath="..\..\include\SMeshBufferTangents.h"> + </File> + <File + RelativePath="..\..\include\SParticle.h"> + </File> + <File + RelativePath="..\..\include\SSharedMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\SSkinMeshBuffer.h"> + </File> + <File + RelativePath="..\..\include\SVertexIndex.h"> + </File> + <File + RelativePath="..\..\include\SViewFrustum.h"> + </File> + <File + RelativePath="..\..\include\triangle3d.h"> + </File> + <File + RelativePath="..\..\include\vector2d.h"> + </File> + <File + RelativePath="..\..\include\vector3d.h"> + </File> + </Filter> + <Filter + Name="scene" + Filter=""> + <File + RelativePath=".\CBillboardSceneNode.cpp"> + </File> + <File + RelativePath=".\CBillboardSceneNode.h"> + </File> + <File + RelativePath=".\CBoneSceneNode.cpp"> + </File> + <File + RelativePath=".\CBoneSceneNode.h"> + </File> + <File + RelativePath=".\CCameraSceneNode.cpp"> + </File> + <File + RelativePath=".\CCameraSceneNode.h"> + </File> + <File + RelativePath=".\CCubeSceneNode.cpp"> + </File> + <File + RelativePath=".\CCubeSceneNode.h"> + </File> + <File + RelativePath=".\CDummyTransformationSceneNode.cpp"> + </File> + <File + RelativePath=".\CDummyTransformationSceneNode.h"> + </File> + <File + RelativePath=".\CEmptySceneNode.cpp"> + </File> + <File + RelativePath=".\CEmptySceneNode.h"> + </File> + <File + RelativePath=".\CLightSceneNode.cpp"> + </File> + <File + RelativePath=".\CLightSceneNode.h"> + </File> + <File + RelativePath=".\COctreeSceneNode.cpp"> + </File> + <File + RelativePath=".\COctreeSceneNode.h"> + </File> + <File + RelativePath=".\CShadowVolumeSceneNode.cpp"> + </File> + <File + RelativePath=".\CShadowVolumeSceneNode.h"> + </File> + <File + RelativePath=".\CSkyBoxSceneNode.cpp"> + </File> + <File + RelativePath=".\CSkyBoxSceneNode.h"> + </File> + <File + RelativePath=".\CSkyDomeSceneNode.cpp"> + </File> + <File + RelativePath=".\CSkyDomeSceneNode.h"> + </File> + <File + RelativePath=".\CSphereSceneNode.cpp"> + </File> + <File + RelativePath=".\CSphereSceneNode.h"> + </File> + <File + RelativePath=".\CTerrainSceneNode.cpp"> + </File> + <File + RelativePath=".\CTerrainSceneNode.h"> + </File> + <File + RelativePath=".\CTextSceneNode.cpp"> + </File> + <File + RelativePath=".\CTextSceneNode.h"> + </File> + <File + RelativePath=".\CVolumeLightSceneNode.cpp"> + </File> + <File + RelativePath=".\CVolumeLightSceneNode.h"> + </File> + <File + RelativePath=".\CWaterSurfaceSceneNode.cpp"> + </File> + <File + RelativePath=".\CWaterSurfaceSceneNode.h"> + </File> + </Filter> + <Filter + Name="D3D8" + Filter=""> + <File + RelativePath=".\CD3D8Driver.cpp"> + </File> + <File + RelativePath=".\CD3D8Driver.h"> + </File> + <File + RelativePath=".\CD3D8MaterialRenderer.h"> + </File> + <File + RelativePath=".\CD3D8NormalMapRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D8NormalMapRenderer.h"> + </File> + <File + RelativePath=".\CD3D8ParallaxMapRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D8ParallaxMapRenderer.h"> + </File> + <File + RelativePath=".\CD3D8ShaderMaterialRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D8ShaderMaterialRenderer.h"> + </File> + <File + RelativePath=".\CD3D8Texture.cpp"> + </File> + <File + RelativePath=".\CD3D8Texture.h"> + </File> + </Filter> + <Filter + Name="unsorted" + Filter=""> + <File + RelativePath=".\BuiltInFont.h"> + </File> + <File + RelativePath=".\C3DSMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\C3DSMeshFileLoader.h"> + </File> + <File + RelativePath="CSMFMeshFileLoader.cpp"> + </File> + <File + RelativePath="CSMFMeshFileLoader.h"> + </File> + <File + RelativePath=".\CAnimatedMeshMD2.cpp"> + </File> + <File + RelativePath=".\CAnimatedMeshMD2.h"> + </File> + <File + RelativePath=".\CAnimatedMeshMD3.cpp"> + </File> + <File + RelativePath=".\CAnimatedMeshMD3.h"> + </File> + <File + RelativePath=".\CAnimatedMeshSceneNode.cpp"> + </File> + <File + RelativePath=".\CAnimatedMeshSceneNode.h"> + </File> + <File + RelativePath=".\CAttributeImpl.h"> + </File> + <File + RelativePath=".\CAttributes.cpp"> + </File> + <File + RelativePath=".\CAttributes.h"> + </File> + <File + RelativePath=".\CColorConverter.cpp"> + </File> + <File + RelativePath=".\CColorConverter.h"> + </File> + <File + RelativePath=".\CCSMLoader.cpp"> + </File> + <File + RelativePath=".\CCSMLoader.h"> + </File> + <File + RelativePath=".\CDefaultGUIElementFactory.cpp"> + </File> + <File + RelativePath=".\CDefaultGUIElementFactory.h"> + </File> + <File + RelativePath=".\CDefaultSceneNodeAnimatorFactory.cpp"> + </File> + <File + RelativePath=".\CDefaultSceneNodeAnimatorFactory.h"> + </File> + <File + RelativePath=".\CDefaultSceneNodeFactory.cpp"> + </File> + <File + RelativePath=".\CDefaultSceneNodeFactory.h"> + </File> + <File + RelativePath=".\CDepthBuffer.cpp"> + </File> + <File + RelativePath=".\CDepthBuffer.h"> + </File> + <File + RelativePath=".\CDMFLoader.cpp"> + </File> + <File + RelativePath=".\CDMFLoader.h"> + </File> + <File + RelativePath=".\CFileList.cpp"> + </File> + <File + RelativePath=".\CFileList.h"> + </File> + <File + RelativePath=".\CFileSystem.cpp"> + </File> + <File + RelativePath=".\CFileSystem.h"> + </File> + <File + RelativePath=".\CFPSCounter.cpp"> + </File> + <File + RelativePath=".\CFPSCounter.h"> + </File> + <File + RelativePath=".\CGeometryCreator.cpp"> + </File> + <File + RelativePath=".\CGeometryCreator.h"> + </File> + <File + RelativePath=".\CIrrDeviceConsole.cpp"> + </File> + <File + RelativePath=".\CIrrDeviceConsole.h"> + </File> + <File + RelativePath=".\CIrrDeviceLinux.cpp"> + </File> + <File + RelativePath=".\CIrrDeviceLinux.h"> + </File> + <File + RelativePath=".\CIrrDeviceSDL.cpp"> + </File> + <File + RelativePath=".\CIrrDeviceSDL.h"> + </File> + <File + RelativePath=".\CIrrDeviceStub.cpp"> + </File> + <File + RelativePath=".\CIrrDeviceStub.h"> + </File> + <File + RelativePath=".\CIrrDeviceWin32.cpp"> + </File> + <File + RelativePath=".\CIrrDeviceWin32.h"> + </File> + <File + RelativePath=".\CIrrDeviceWinCE.cpp"> + </File> + <File + RelativePath=".\CIrrDeviceWinCE.h"> + </File> + <File + RelativePath=".\CIrrMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CIrrMeshFileLoader.h"> + </File> + <File + RelativePath=".\CIrrMeshWriter.cpp"> + </File> + <File + RelativePath=".\CIrrMeshWriter.h"> + </File> + <File + RelativePath=".\CLimitReadFile.cpp"> + </File> + <File + RelativePath=".\CLimitReadFile.h"> + </File> + <File + RelativePath=".\CLMTSMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CLMTSMeshFileLoader.h"> + </File> + <File + RelativePath=".\CLogger.cpp"> + </File> + <File + RelativePath=".\CLogger.h"> + </File> + <File + RelativePath=".\CLWOMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CLWOMeshFileLoader.h"> + </File> + <File + RelativePath=".\CMD2MeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CMD2MeshFileLoader.h"> + </File> + <File + RelativePath=".\CMD3MeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CMD3MeshFileLoader.h"> + </File> + <File + RelativePath=".\CMemoryFile.cpp"> + </File> + <File + RelativePath=".\CMemoryFile.h"> + </File> + <File + RelativePath=".\CMeshCache.cpp"> + </File> + <File + RelativePath=".\CMeshCache.h"> + </File> + <File + RelativePath=".\CMeshManipulator.cpp"> + </File> + <File + RelativePath=".\CMeshManipulator.h"> + </File> + <File + RelativePath=".\CMeshSceneNode.cpp"> + </File> + <File + RelativePath=".\CMeshSceneNode.h"> + </File> + <File + RelativePath=".\CMetaTriangleSelector.cpp"> + </File> + <File + RelativePath=".\CMetaTriangleSelector.h"> + </File> + <File + RelativePath=".\CMS3DMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CMS3DMeshFileLoader.h"> + </File> + <File + RelativePath=".\CMY3DHelper.h"> + </File> + <File + RelativePath=".\CMY3DMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CMY3DMeshFileLoader.h"> + </File> + <File + RelativePath=".\CNullDriver.cpp"> + </File> + <File + RelativePath=".\CNullDriver.h"> + </File> + <File + RelativePath=".\COBJMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\COBJMeshFileLoader.h"> + </File> + <File + RelativePath=".\COBJMeshWriter.cpp"> + </File> + <File + RelativePath=".\COBJMeshWriter.h"> + </File> + <File + RelativePath=".\CPLYMeshWriter.cpp"> + </File> + <File + RelativePath="CPLYMeshWriter.h"> + </File> + <File + RelativePath=".\COCTLoader.cpp"> + </File> + <File + RelativePath=".\COCTLoader.h"> + </File> + <File + RelativePath=".\COctreeTriangleSelector.cpp"> + </File> + <File + RelativePath=".\COctreeTriangleSelector.h"> + </File> + <File + RelativePath=".\COgreMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\COgreMeshFileLoader.h"> + </File> + <File + RelativePath=".\CPLYMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CPLYMeshFileLoader.h"> + </File> + <File + RelativePath=".\COSOperator.cpp"> + </File> + <File + RelativePath=".\COSOperator.h"> + </File> + <File + RelativePath=".\CPakReader.cpp"> + </File> + <File + RelativePath=".\CPakReader.h"> + </File> + <File + RelativePath=".\CNPKReader.cpp"> + </File> + <File + RelativePath=".\CNPKReader.h"> + </File> + <File + RelativePath=".\CTarReader.cpp"> + </File> + <File + RelativePath=".\CTarReader.h"> + </File> + <File + RelativePath="CMountPointReader.cpp"> + </File> + <File + RelativePath="CMountPointReader.h"> + </File> + <File + RelativePath=".\CParticleAnimatedMeshSceneNodeEmitter.cpp"> + </File> + <File + RelativePath=".\CParticleAnimatedMeshSceneNodeEmitter.h"> + </File> + <File + RelativePath=".\CParticleAttractionAffector.cpp"> + </File> + <File + RelativePath=".\CParticleAttractionAffector.h"> + </File> + <File + RelativePath=".\CParticleBoxEmitter.cpp"> + </File> + <File + RelativePath=".\CParticleBoxEmitter.h"> + </File> + <File + RelativePath=".\CParticleCylinderEmitter.cpp"> + </File> + <File + RelativePath=".\CParticleCylinderEmitter.h"> + </File> + <File + RelativePath=".\CParticleFadeOutAffector.cpp"> + </File> + <File + RelativePath=".\CParticleFadeOutAffector.h"> + </File> + <File + RelativePath=".\CParticleGravityAffector.cpp"> + </File> + <File + RelativePath=".\CParticleGravityAffector.h"> + </File> + <File + RelativePath=".\CParticleMeshEmitter.cpp"> + </File> + <File + RelativePath=".\CParticleMeshEmitter.h"> + </File> + <File + RelativePath=".\CParticlePointEmitter.cpp"> + </File> + <File + RelativePath=".\CParticlePointEmitter.h"> + </File> + <File + RelativePath=".\CParticleRingEmitter.cpp"> + </File> + <File + RelativePath=".\CParticleRingEmitter.h"> + </File> + <File + RelativePath=".\CParticleRotationAffector.cpp"> + </File> + <File + RelativePath=".\CParticleRotationAffector.h"> + </File> + <File + RelativePath=".\CParticleScaleAffector.cpp"> + </File> + <File + RelativePath=".\CParticleScaleAffector.h"> + </File> + <File + RelativePath=".\CParticleSphereEmitter.cpp"> + </File> + <File + RelativePath=".\CParticleSphereEmitter.h"> + </File> + <File + RelativePath=".\CParticleSystemSceneNode.cpp"> + </File> + <File + RelativePath=".\CParticleSystemSceneNode.h"> + </File> + <File + RelativePath=".\CQ3LevelMesh.cpp"> + </File> + <File + RelativePath=".\CQ3LevelMesh.h"> + </File> + <File + RelativePath=".\CQuake3ShaderSceneNode.cpp"> + </File> + <File + RelativePath=".\CQuake3ShaderSceneNode.h"> + </File> + <File + RelativePath=".\CReadFile.cpp"> + </File> + <File + RelativePath=".\CReadFile.h"> + </File> + <File + RelativePath=".\CSceneCollisionManager.cpp"> + </File> + <File + RelativePath=".\CSceneCollisionManager.h"> + </File> + <File + RelativePath=".\CSceneManager.cpp"> + </File> + <File + RelativePath=".\CSceneManager.h"> + </File> + <File + RelativePath=".\CSkinnedMesh.cpp"> + </File> + <File + RelativePath=".\CSkinnedMesh.h"> + </File> + <File + RelativePath=".\CSoftware2MaterialRenderer.h"> + </File> + <File + RelativePath=".\CSTLMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CSTLMeshFileLoader.h"> + </File> + <File + RelativePath=".\CSTLMeshWriter.cpp"> + </File> + <File + RelativePath=".\CSTLMeshWriter.h"> + </File> + <File + RelativePath=".\CTerrainTriangleSelector.cpp"> + </File> + <File + RelativePath=".\CTerrainTriangleSelector.h"> + </File> + <File + RelativePath=".\CTimer.h"> + </File> + <File + RelativePath=".\CTriangleBBSelector.cpp"> + </File> + <File + RelativePath=".\CTriangleBBSelector.h"> + </File> + <File + RelativePath=".\CTriangleSelector.cpp"> + </File> + <File + RelativePath=".\CTriangleSelector.h"> + </File> + <File + RelativePath=".\CTRTextureGouraudWire.cpp"> + </File> + <File + RelativePath=".\CTRTextureLightMap2_Add.cpp"> + </File> + <File + RelativePath=".\CTRTextureLightMap2_M1.cpp"> + </File> + <File + RelativePath=".\CTRTextureLightMap2_M2.cpp"> + </File> + <File + RelativePath=".\CTRTextureLightMap2_M4.cpp"> + </File> + <File + RelativePath=".\CTRTextureLightMapGouraud2_M4.cpp"> + </File> + <File + RelativePath=".\CTRTextureWire2.cpp"> + </File> + <File + RelativePath=".\CVideoModeList.cpp"> + </File> + <File + RelativePath=".\CVideoModeList.h"> + </File> + <File + RelativePath=".\CWriteFile.cpp"> + </File> + <File + RelativePath=".\CWriteFile.h"> + </File> + <File + RelativePath=".\CXMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CXMeshFileLoader.h"> + </File> + <File + RelativePath=".\CXMLReader.cpp"> + </File> + <File + RelativePath=".\CXMLReader.h"> + </File> + <File + RelativePath=".\CXMLReaderImpl.h"> + </File> + <File + RelativePath=".\CXMLWriter.cpp"> + </File> + <File + RelativePath=".\CXMLWriter.h"> + </File> + <File + RelativePath=".\CZBuffer.cpp"> + </File> + <File + RelativePath=".\CZBuffer.h"> + </File> + <File + RelativePath=".\CZipReader.cpp"> + </File> + <File + RelativePath=".\CZipReader.h"> + </File> + <File + RelativePath=".\dmfsupport.h"> + </File> + <File + RelativePath=".\glext.h"> + </File> + <File + RelativePath=".\glxext.h"> + </File> + <File + RelativePath=".\IAttribute.h"> + </File> + <File + RelativePath=".\IBurningShader.cpp"> + </File> + <File + RelativePath=".\IBurningShader.h"> + </File> + <File + RelativePath=".\IDepthBuffer.h"> + </File> + <File + RelativePath=".\IImagePresenter.h"> + </File> + <File + RelativePath=".\Irrlicht.cpp"> + </File> + <File + RelativePath=".\irrXML.cpp"> + </File> + <File + RelativePath=".\ISceneNodeAnimatorFinishing.h"> + </File> + <File + RelativePath=".\ITriangleRenderer.h"> + </File> + <File + RelativePath=".\IZBuffer.h"> + </File> + <File + RelativePath=".\Octree.h"> + </File> + <File + RelativePath=".\os.cpp"> + </File> + <File + RelativePath=".\os.h"> + </File> + <File + RelativePath=".\S2DVertex.h"> + </File> + <File + RelativePath=".\S4DVertex.h"> + </File> + <File + RelativePath=".\SoftwareDriver2_compile_config.h"> + </File> + <File + RelativePath=".\SoftwareDriver2_helper.h"> + </File> + <File + RelativePath=".\wglext.h"> + </File> + </Filter> + <Filter + Name="loader" + Filter=""> + <File + RelativePath=".\CB3DMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CB3DMeshFileLoader.h"> + </File> + <File + RelativePath=".\CBSPMeshFileLoader.cpp"> + </File> + <File + RelativePath=".\CBSPMeshFileLoader.h"> + </File> + <File + RelativePath=".\CColladaFileLoader.cpp"> + </File> + <File + RelativePath=".\CColladaFileLoader.h"> + </File> + <File + RelativePath=".\CColladaMeshWriter.cpp"> + </File> + <File + RelativePath=".\CColladaMeshWriter.h"> + </File> + <File + RelativePath=".\CImage.cpp"> + </File> + <File + RelativePath=".\CImage.h"> + </File> + <File + RelativePath=".\CImageLoaderBMP.cpp"> + </File> + <File + RelativePath=".\CImageLoaderBMP.h"> + </File> + <File + RelativePath=".\CImageLoaderJPG.cpp"> + </File> + <File + RelativePath=".\CImageLoaderJPG.h"> + </File> + <File + RelativePath=".\CImageLoaderPCX.cpp"> + </File> + <File + RelativePath=".\CImageLoaderPCX.h"> + </File> + <File + RelativePath=".\CImageLoaderPNG.cpp"> + </File> + <File + RelativePath=".\CImageLoaderPNG.h"> + </File> + <File + RelativePath=".\CImageLoaderPPM.cpp"> + </File> + <File + RelativePath=".\CImageLoaderPPM.h"> + </File> + <File + RelativePath=".\CImageLoaderPSD.cpp"> + </File> + <File + RelativePath=".\CImageLoaderPSD.h"> + </File> + <File + RelativePath=".\CImageLoaderRGB.cpp"> + </File> + <File + RelativePath=".\CImageLoaderRGB.h"> + </File> + <File + RelativePath=".\CImageLoaderTGA.cpp"> + </File> + <File + RelativePath=".\CImageLoaderTGA.h"> + </File> + <File + RelativePath=".\CImageLoaderWAL.cpp"> + </File> + <File + RelativePath=".\CImageLoaderWAL.h"> + </File> + <File + RelativePath=".\CImageWriterBMP.cpp"> + </File> + <File + RelativePath=".\CImageWriterBMP.h"> + </File> + <File + RelativePath=".\CImageWriterJPG.cpp"> + </File> + <File + RelativePath=".\CImageWriterJPG.h"> + </File> + <File + RelativePath=".\CImageWriterPCX.cpp"> + </File> + <File + RelativePath=".\CImageWriterPCX.h"> + </File> + <File + RelativePath=".\CImageWriterPNG.cpp"> + </File> + <File + RelativePath=".\CImageWriterPNG.h"> + </File> + <File + RelativePath=".\CImageWriterPPM.cpp"> + </File> + <File + RelativePath=".\CImageWriterPPM.h"> + </File> + <File + RelativePath=".\CImageWriterPSD.cpp"> + </File> + <File + RelativePath=".\CImageWriterPSD.h"> + </File> + <File + RelativePath=".\CImageWriterTGA.cpp"> + </File> + <File + RelativePath=".\CImageWriterTGA.h"> + </File> + </Filter> + <Filter + Name="opengl" + Filter=""> + <File + RelativePath=".\COpenGLDriver.cpp"> + </File> + <File + RelativePath=".\COpenGLDriver.h"> + </File> + <File + RelativePath=".\COpenGLExtensionHandler.cpp"> + </File> + <File + RelativePath=".\COpenGLExtensionHandler.h"> + </File> + <File + RelativePath=".\COpenGLMaterialRenderer.h"> + </File> + <File + RelativePath=".\COpenGLNormalMapRenderer.cpp"> + </File> + <File + RelativePath=".\COpenGLNormalMapRenderer.h"> + </File> + <File + RelativePath=".\COpenGLParallaxMapRenderer.cpp"> + </File> + <File + RelativePath=".\COpenGLParallaxMapRenderer.h"> + </File> + <File + RelativePath=".\COpenGLShaderMaterialRenderer.cpp"> + </File> + <File + RelativePath=".\COpenGLShaderMaterialRenderer.h"> + </File> + <File + RelativePath=".\COpenGLSLMaterialRenderer.cpp"> + </File> + <File + RelativePath=".\COpenGLSLMaterialRenderer.h"> + </File> + <File + RelativePath=".\COpenGLTexture.cpp"> + </File> + <File + RelativePath=".\COpenGLTexture.h"> + </File> + </Filter> + <Filter + Name="burningvideo" + Filter=""> + <File + RelativePath=".\CBurningShader_Raster_Reference.cpp"> + </File> + <File + RelativePath=".\CSoftwareDriver.cpp"> + </File> + <File + RelativePath=".\CSoftwareDriver.h"> + </File> + <File + RelativePath=".\CSoftwareDriver2.cpp"> + </File> + <File + RelativePath=".\CSoftwareDriver2.h"> + </File> + <File + RelativePath=".\CSoftwareTexture.cpp"> + </File> + <File + RelativePath=".\CSoftwareTexture.h"> + </File> + <File + RelativePath=".\CSoftwareTexture2.cpp"> + </File> + <File + RelativePath=".\CSoftwareTexture2.h"> + </File> + <File + RelativePath=".\CTRFlat.cpp"> + </File> + <File + RelativePath=".\CTRFlatWire.cpp"> + </File> + <File + RelativePath=".\CTRGouraud.cpp"> + </File> + <File + RelativePath=".\CTRGouraud2.cpp"> + </File> + <File + RelativePath=".\CTRGouraudAlpha2.cpp"> + </File> + <File + RelativePath=".\CTRGouraudAlphaNoZ2.cpp"> + </File> + <File + RelativePath=".\CTRGouraudWire.cpp"> + </File> + <File + RelativePath=".\CTRTextureBlend.cpp"> + </File> + <File + RelativePath=".\CTRTextureDetailMap2.cpp"> + </File> + <File + RelativePath=".\CTRTextureFlat.cpp"> + </File> + <File + RelativePath=".\CTRTextureFlatWire.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraud.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraud.h"> + </File> + <File + RelativePath=".\CTRTextureGouraud2.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudAdd.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudAdd2.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudAddNoZ2.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudAlpha.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudAlphaNoZ.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudNoZ.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudNoZ2.cpp"> + </File> + <File + RelativePath=".\CTRTextureGouraudVertexAlpha2.cpp"> + </File> + </Filter> + <Filter + Name="gui" + Filter=""> + <File + RelativePath=".\CGUIButton.cpp"> + </File> + <File + RelativePath=".\CGUIButton.h"> + </File> + <File + RelativePath=".\CGUICheckBox.cpp"> + </File> + <File + RelativePath=".\CGUICheckBox.h"> + </File> + <File + RelativePath=".\CGUIColorSelectDialog.cpp"> + </File> + <File + RelativePath=".\CGUIColorSelectDialog.h"> + </File> + <File + RelativePath=".\CGUIComboBox.cpp"> + </File> + <File + RelativePath=".\CGUIComboBox.h"> + </File> + <File + RelativePath=".\CGUIContextMenu.cpp"> + </File> + <File + RelativePath=".\CGUIContextMenu.h"> + </File> + <File + RelativePath=".\CGUIEditBox.cpp"> + </File> + <File + RelativePath=".\CGUIEditBox.h"> + </File> + <File + RelativePath=".\CGUIEnvironment.cpp"> + </File> + <File + RelativePath=".\CGUIEnvironment.h"> + </File> + <File + RelativePath=".\CGUIFileOpenDialog.cpp"> + </File> + <File + RelativePath=".\CGUIFileOpenDialog.h"> + </File> + <File + RelativePath=".\CGUIFont.cpp"> + </File> + <File + RelativePath=".\CGUIFont.h"> + </File> + <File + RelativePath=".\CGUIImage.cpp"> + </File> + <File + RelativePath=".\CGUIImage.h"> + </File> + <File + RelativePath=".\CGUIImageList.cpp"> + </File> + <File + RelativePath=".\CGUIImageList.h"> + </File> + <File + RelativePath=".\CGUIInOutFader.cpp"> + </File> + <File + RelativePath=".\CGUIInOutFader.h"> + </File> + <File + RelativePath=".\CGUIListBox.cpp"> + </File> + <File + RelativePath=".\CGUIListBox.h"> + </File> + <File + RelativePath=".\CGUIMenu.cpp"> + </File> + <File + RelativePath=".\CGUIMenu.h"> + </File> + <File + RelativePath=".\CGUIMeshViewer.cpp"> + </File> + <File + RelativePath=".\CGUIMeshViewer.h"> + </File> + <File + RelativePath=".\CGUIMessageBox.cpp"> + </File> + <File + RelativePath=".\CGUIMessageBox.h"> + </File> + <File + RelativePath=".\CGUIModalScreen.cpp"> + </File> + <File + RelativePath=".\CGUIModalScreen.h"> + </File> + <File + RelativePath=".\CGUIScrollBar.cpp"> + </File> + <File + RelativePath=".\CGUIScrollBar.h"> + </File> + <File + RelativePath=".\CGUISkin.cpp"> + </File> + <File + RelativePath=".\CGUISkin.h"> + </File> + <File + RelativePath=".\CGUISpinBox.cpp"> + </File> + <File + RelativePath=".\CGUISpinBox.h"> + </File> + <File + RelativePath=".\CGUISpriteBank.cpp"> + </File> + <File + RelativePath=".\CGUISpriteBank.h"> + </File> + <File + RelativePath=".\CGUIStaticText.cpp"> + </File> + <File + RelativePath=".\CGUIStaticText.h"> + </File> + <File + RelativePath=".\CGUITabControl.cpp"> + </File> + <File + RelativePath=".\CGUITabControl.h"> + </File> + <File + RelativePath=".\CGUITable.cpp"> + </File> + <File + RelativePath=".\CGUITable.h"> + </File> + <File + RelativePath=".\CGUIToolBar.cpp"> + </File> + <File + RelativePath=".\CGUIToolBar.h"> + </File> + <File + RelativePath=".\CGUITreeView.cpp"> + </File> + <File + RelativePath=".\CGUITreeView.h"> + </File> + <File + RelativePath=".\CGUIWindow.cpp"> + </File> + <File + RelativePath=".\CGUIWindow.h"> + </File> + </Filter> + <Filter + Name="scene animator" + Filter=""> + <File + RelativePath=".\CSceneNodeAnimatorCameraFPS.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorCameraFPS.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorCameraMaya.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorCameraMaya.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorCollisionResponse.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorCollisionResponse.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorDelete.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorDelete.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorFlyCircle.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorFlyCircle.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorFlyStraight.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorFlyStraight.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorFollowSpline.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorFollowSpline.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorRotation.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorRotation.h"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorTexture.cpp"> + </File> + <File + RelativePath=".\CSceneNodeAnimatorTexture.h"> + </File> + </Filter> + <Filter + Name="D3D9" + Filter=""> + <File + RelativePath=".\CD3D9Driver.cpp"> + </File> + <File + RelativePath=".\CD3D9Driver.h"> + </File> + <File + RelativePath=".\CD3D9HLSLMaterialRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D9HLSLMaterialRenderer.h"> + </File> + <File + RelativePath=".\CD3D9MaterialRenderer.h"> + </File> + <File + RelativePath=".\CD3D9NormalMapRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D9NormalMapRenderer.h"> + </File> + <File + RelativePath=".\CD3D9ParallaxMapRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D9ParallaxMapRenderer.h"> + </File> + <File + RelativePath=".\CD3D9ShaderMaterialRenderer.cpp"> + </File> + <File + RelativePath=".\CD3D9ShaderMaterialRenderer.h"> + </File> + <File + RelativePath=".\CD3D9Texture.cpp"> + </File> + <File + RelativePath=".\CD3D9Texture.h"> + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/._MainMenu.nib b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/._MainMenu.nib new file mode 100644 index 0000000..ed1f83f Binary files /dev/null and b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/._MainMenu.nib differ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.h b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.h new file mode 100644 index 0000000..ccb116d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.h @@ -0,0 +1,24 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + +#import <Cocoa/Cocoa.h> +#import "CIrrDeviceMacOSX.h" + +@interface AppDelegate : NSObject +{ + BOOL _quit; + irr::CIrrDeviceMacOSX *_device; +} + +- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device; +- (BOOL)isQuit; + +@end + +#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm new file mode 100644 index 0000000..14a7f86 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm @@ -0,0 +1,79 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#import "AppDelegate.h" + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + +@implementation AppDelegate + +- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device +{ + self = [super init]; + if (self) _device = device; + return (self); +} + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + _quit = FALSE; +} + +- (void)orderFrontStandardAboutPanel:(id)sender +{ + [NSApp orderFrontStandardAboutPanel:sender]; +} + +- (void)unhideAllApplications:(id)sender +{ + [NSApp unhideAllApplications:sender]; +} + +- (void)hide:(id)sender +{ + [NSApp hide:sender]; +} + +- (void)hideOtherApplications:(id)sender +{ + [NSApp hideOtherApplications:sender]; +} + +- (void)terminate:(id)sender +{ + _quit = TRUE; +} + +- (void)windowWillClose:(id)sender +{ + _quit = TRUE; +} + +- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize +{ + if (_device->isResizable()) + return proposedFrameSize; + else + return [window frame].size; +} + +- (void)windowDidResize:(NSNotification *)aNotification +{ + NSWindow *window; + NSRect frame; + + window = [aNotification object]; + frame = [window frame]; + _device->setResize((int)frame.size.width,(int)frame.size.height); +} + +- (BOOL)isQuit +{ + return (_quit); +} + +@end + +#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h new file mode 100644 index 0000000..f629588 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h @@ -0,0 +1,251 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#ifndef __C_IRR_DEVICE_MACOSX_H_INCLUDED__ +#define __C_IRR_DEVICE_MACOSX_H_INCLUDED__ + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + +#import <AppKit/NSWindow.h> +#import <AppKit/NSOpenGL.h> +#import <AppKit/NSBitmapImageRep.h> + +#include "CIrrDeviceStub.h" +#include "IrrlichtDevice.h" +#include "IImagePresenter.h" +#include "IGUIEnvironment.h" +#include "ICursorControl.h" + +#include <OpenGL/OpenGL.h> +#include <map> + +namespace irr +{ + class CIrrDeviceMacOSX : public CIrrDeviceStub, video::IImagePresenter + { + public: + + //! constructor + CIrrDeviceMacOSX(const SIrrlichtCreationParameters& params); + + //! destructor + virtual ~CIrrDeviceMacOSX(); + + //! runs the device. Returns false if device wants to be deleted + virtual bool run(); + + //! Cause the device to temporarily pause execution and let other processes to run + // This should bring down processor usage without major performance loss for Irrlicht + virtual void yield(); + + //! Pause execution and let other processes to run for a specified amount of time. + virtual void sleep(u32 timeMs, bool pauseTimer); + + //! sets the caption of the window + virtual void setWindowCaption(const wchar_t* text); + + //! returns if window is active. if not, nothing need to be drawn + virtual bool isWindowActive() const; + + //! Checks if the Irrlicht window has focus + virtual bool isWindowFocused() const; + + //! Checks if the Irrlicht window is minimized + virtual bool isWindowMinimized() const; + + //! presents a surface in the client area + virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ); + + //! notifies the device that it should close itself + virtual void closeDevice(); + + //! Sets if the window should be resizable in windowed mode. + virtual void setResizable(bool resize); + + //! Returns true if the window is resizable, false if not + virtual bool isResizable() const; + + //! Minimizes the window if possible + virtual void minimizeWindow(); + + //! Maximizes the window if possible. + virtual void maximizeWindow(); + + //! Restore the window to normal size if possible. + virtual void restoreWindow(); + + //! Activate any joysticks, and generate events for them. + virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo); + + //! \return Returns a pointer to a list with all video modes + //! supported by the gfx adapter. + virtual video::IVideoModeList* getVideoModeList(); + + //! Get the device type + virtual E_DEVICE_TYPE getType() const + { + return EIDT_OSX; + } + + void flush(); + void setMouseLocation(int x, int y); + void setResize(int width, int height); + void setCursorVisible(bool visible); + + private: + + //! create the driver + void createDriver(); + + //! Implementation of the macos x cursor control + class CCursorControl : public gui::ICursorControl + { + public: + + CCursorControl(const core::dimension2d<u32>& wsize, CIrrDeviceMacOSX *device) + : WindowSize(wsize), IsVisible(true), InvWindowSize(0.0f, 0.0f), Device(device), UseReferenceRect(false) + { + CursorPos.X = CursorPos.Y = 0; + if (WindowSize.Width!=0) + InvWindowSize.Width = 1.0f / WindowSize.Width; + if (WindowSize.Height!=0) + InvWindowSize.Height = 1.0f / WindowSize.Height; + } + + //! Changes the visible state of the mouse cursor. + virtual void setVisible(bool visible) + { + IsVisible = visible; + Device->setCursorVisible(visible); + } + + //! Returns if the cursor is currently visible. + virtual bool isVisible() const + { + return IsVisible; + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<f32> &pos) + { + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(f32 x, f32 y) + { + setPosition((s32)(x*WindowSize.Width), (s32)(y*WindowSize.Height)); + } + + //! Sets the new position of the cursor. + virtual void setPosition(const core::position2d<s32> &pos) + { + if (CursorPos.X != pos.X || CursorPos.Y != pos.Y) + setPosition(pos.X, pos.Y); + } + + //! Sets the new position of the cursor. + virtual void setPosition(s32 x, s32 y) + { + if (UseReferenceRect) + { + Device->setMouseLocation(ReferenceRect.UpperLeftCorner.X + x, ReferenceRect.UpperLeftCorner.Y + y); + } + else + { + Device->setMouseLocation(x,y); + } + } + + //! Returns the current position of the mouse cursor. + virtual const core::position2d<s32>& getPosition() + { + return CursorPos; + } + + //! Returns the current position of the mouse cursor. + virtual core::position2d<f32> getRelativePosition() + { + if (!UseReferenceRect) + { + return core::position2d<f32>(CursorPos.X * InvWindowSize.Width, + CursorPos.Y * InvWindowSize.Height); + } + + return core::position2d<f32>(CursorPos.X / (f32)ReferenceRect.getWidth(), + CursorPos.Y / (f32)ReferenceRect.getHeight()); + } + + //! Sets an absolute reference rect for calculating the cursor position. + virtual void setReferenceRect(core::rect<s32>* rect=0) + { + if (rect) + { + ReferenceRect = *rect; + UseReferenceRect = true; + + // prevent division through zero and uneven sizes + + if (!ReferenceRect.getHeight() || ReferenceRect.getHeight()%2) + ReferenceRect.LowerRightCorner.Y += 1; + + if (!ReferenceRect.getWidth() || ReferenceRect.getWidth()%2) + ReferenceRect.LowerRightCorner.X += 1; + } + else + UseReferenceRect = false; + } + + //! Updates the internal cursor position + void updateInternalCursorPosition(int x,int y) + { + CursorPos.X = x; + CursorPos.Y = y; + } + + private: + + core::position2d<s32> CursorPos; + core::dimension2d<s32> WindowSize; + core::dimension2d<float> InvWindowSize; + core::rect<s32> ReferenceRect; + CIrrDeviceMacOSX *Device; + bool IsVisible; + bool UseReferenceRect; + }; + + bool createWindow(); + void initKeycodes(); + void storeMouseLocation(); + void postMouseEvent(void *event, irr::SEvent &ievent); + void postKeyEvent(void *event, irr::SEvent &ievent, bool pressed); + void pollJoysticks(); + + NSWindow *Window; + CGLContextObj CGLContext; + NSOpenGLContext *OGLContext; + NSBitmapImageRep *SoftwareDriverTarget; + std::map<int,int> KeyCodes; + int DeviceWidth; + int DeviceHeight; + int ScreenWidth; + int ScreenHeight; + u32 MouseButtonStates; + u32 SoftwareRendererType; + bool IsFullscreen; + bool IsActive; + bool IsShiftDown; + bool IsControlDown; + bool IsResizable; + }; + + +} // end namespace irr + +#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ +#endif // __C_IRR_DEVICE_MACOSX_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm new file mode 100644 index 0000000..8b48134 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm @@ -0,0 +1,1889 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#include "IrrCompileConfig.h" + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + +#import <Cocoa/Cocoa.h> +#import <OpenGL/gl.h> +#ifndef __MAC_10_6 +#import <Carbon/Carbon.h> +#endif + +#include "CIrrDeviceMacOSX.h" +#include "IEventReceiver.h" +#include "irrList.h" +#include "os.h" +#include "CTimer.h" +#include "irrString.h" +#include "Keycodes.h" +#include <stdio.h> +#include <sys/utsname.h> +#include "COSOperator.h" +#include "CColorConverter.h" +#include "irrlicht.h" + + +#import <wchar.h> +#import <time.h> +#import "AppDelegate.h" + +#if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + +#include <IOKit/IOKitLib.h> +#include <IOKit/IOCFPlugIn.h> +#ifdef MACOS_10_0_4 +#include <IOKit/hidsystem/IOHIDUsageTables.h> +#else +/* The header was moved here in Mac OS X 10.1 */ +#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h> +#endif +#include <IOKit/hid/IOHIDLib.h> +#include <IOKit/hid/IOHIDKeys.h> + +// only OSX 10.5 seems to not need these defines... +#if !defined(__MAC_10_5) || defined(__MAC_10_6) +// Contents from Events.h from Carbon/HIToolbox but we need it with Cocoa too +// and for some reason no Cocoa equivalent of these constants seems provided. +// So I'm doing like everyone else and using copy-and-paste. + +/* + * Summary: + * Virtual keycodes + * + * Discussion: + * These constants are the virtual keycodes defined originally in + * Inside Mac Volume V, pg. V-191. They identify physical keys on a + * keyboard. Those constants with "ANSI" in the name are labeled + * according to the key position on an ANSI-standard US keyboard. + * For example, kVK_ANSI_A indicates the virtual keycode for the key + * with the letter 'A' in the US keyboard layout. Other keyboard + * layouts may have the 'A' key label on a different physical key; + * in this case, pressing 'A' will generate a different virtual + * keycode. + */ +enum { + kVK_ANSI_A = 0x00, + kVK_ANSI_S = 0x01, + kVK_ANSI_D = 0x02, + kVK_ANSI_F = 0x03, + kVK_ANSI_H = 0x04, + kVK_ANSI_G = 0x05, + kVK_ANSI_Z = 0x06, + kVK_ANSI_X = 0x07, + kVK_ANSI_C = 0x08, + kVK_ANSI_V = 0x09, + kVK_ANSI_B = 0x0B, + kVK_ANSI_Q = 0x0C, + kVK_ANSI_W = 0x0D, + kVK_ANSI_E = 0x0E, + kVK_ANSI_R = 0x0F, + kVK_ANSI_Y = 0x10, + kVK_ANSI_T = 0x11, + kVK_ANSI_1 = 0x12, + kVK_ANSI_2 = 0x13, + kVK_ANSI_3 = 0x14, + kVK_ANSI_4 = 0x15, + kVK_ANSI_6 = 0x16, + kVK_ANSI_5 = 0x17, + kVK_ANSI_Equal = 0x18, + kVK_ANSI_9 = 0x19, + kVK_ANSI_7 = 0x1A, + kVK_ANSI_Minus = 0x1B, + kVK_ANSI_8 = 0x1C, + kVK_ANSI_0 = 0x1D, + kVK_ANSI_RightBracket = 0x1E, + kVK_ANSI_O = 0x1F, + kVK_ANSI_U = 0x20, + kVK_ANSI_LeftBracket = 0x21, + kVK_ANSI_I = 0x22, + kVK_ANSI_P = 0x23, + kVK_ANSI_L = 0x25, + kVK_ANSI_J = 0x26, + kVK_ANSI_Quote = 0x27, + kVK_ANSI_K = 0x28, + kVK_ANSI_Semicolon = 0x29, + kVK_ANSI_Backslash = 0x2A, + kVK_ANSI_Comma = 0x2B, + kVK_ANSI_Slash = 0x2C, + kVK_ANSI_N = 0x2D, + kVK_ANSI_M = 0x2E, + kVK_ANSI_Period = 0x2F, + kVK_ANSI_Grave = 0x32, + kVK_ANSI_KeypadDecimal = 0x41, + kVK_ANSI_KeypadMultiply = 0x43, + kVK_ANSI_KeypadPlus = 0x45, + kVK_ANSI_KeypadClear = 0x47, + kVK_ANSI_KeypadDivide = 0x4B, + kVK_ANSI_KeypadEnter = 0x4C, + kVK_ANSI_KeypadMinus = 0x4E, + kVK_ANSI_KeypadEquals = 0x51, + kVK_ANSI_Keypad0 = 0x52, + kVK_ANSI_Keypad1 = 0x53, + kVK_ANSI_Keypad2 = 0x54, + kVK_ANSI_Keypad3 = 0x55, + kVK_ANSI_Keypad4 = 0x56, + kVK_ANSI_Keypad5 = 0x57, + kVK_ANSI_Keypad6 = 0x58, + kVK_ANSI_Keypad7 = 0x59, + kVK_ANSI_Keypad8 = 0x5B, + kVK_ANSI_Keypad9 = 0x5C +}; + +/* keycodes for keys that are independent of keyboard layout*/ +enum { + kVK_Return = 0x24, + kVK_Tab = 0x30, + kVK_Space = 0x31, + kVK_Delete = 0x33, + kVK_Escape = 0x35, + kVK_Command = 0x37, + kVK_Shift = 0x38, + kVK_CapsLock = 0x39, + kVK_Option = 0x3A, + kVK_Control = 0x3B, + kVK_RightShift = 0x3C, + kVK_RightOption = 0x3D, + kVK_RightControl = 0x3E, + kVK_Function = 0x3F, + kVK_F17 = 0x40, + kVK_VolumeUp = 0x48, + kVK_VolumeDown = 0x49, + kVK_Mute = 0x4A, + kVK_F18 = 0x4F, + kVK_F19 = 0x50, + kVK_F20 = 0x5A, + kVK_F5 = 0x60, + kVK_F6 = 0x61, + kVK_F7 = 0x62, + kVK_F3 = 0x63, + kVK_F8 = 0x64, + kVK_F9 = 0x65, + kVK_F11 = 0x67, + kVK_F13 = 0x69, + kVK_F16 = 0x6A, + kVK_F14 = 0x6B, + kVK_F10 = 0x6D, + kVK_F12 = 0x6F, + kVK_F15 = 0x71, + kVK_Help = 0x72, + kVK_Home = 0x73, + kVK_PageUp = 0x74, + kVK_ForwardDelete = 0x75, + kVK_F4 = 0x76, + kVK_End = 0x77, + kVK_F2 = 0x78, + kVK_PageDown = 0x79, + kVK_F1 = 0x7A, + kVK_LeftArrow = 0x7B, + kVK_RightArrow = 0x7C, + kVK_DownArrow = 0x7D, + kVK_UpArrow = 0x7E +}; +#endif + +struct JoystickComponent +{ + IOHIDElementCookie cookie; // unique value which identifies element, will NOT change + long min; // reported min value possible + long max; // reported max value possible + + long minRead; //min read value + long maxRead; //max read value + + JoystickComponent() : min(0), minRead(0), max(0), maxRead(0) + { + } +}; + +struct JoystickInfo +{ + irr::core::array <JoystickComponent> axisComp; + irr::core::array <JoystickComponent> buttonComp; + irr::core::array <JoystickComponent> hatComp; + + int hats; + int axes; + int buttons; + int numActiveJoysticks; + + irr::SEvent persistentData; + + IOHIDDeviceInterface ** interface; + bool removed; + char joystickName[256]; + long usage; // usage page from IOUSBHID Parser.h which defines general usage + long usagePage; // usage within above page from IOUSBHID Parser.h which defines specific usage + + JoystickInfo() : hats(0), axes(0), buttons(0), interface(0), removed(false), usage(0), usagePage(0), numActiveJoysticks(0) + { + interface = NULL; + memset(joystickName, '\0', 256); + axisComp.clear(); + buttonComp.clear(); + hatComp.clear(); + + persistentData.EventType = irr::EET_JOYSTICK_INPUT_EVENT; + persistentData.JoystickEvent.POV = 65535; + persistentData.JoystickEvent.ButtonStates = 0; + } +}; +irr::core::array<JoystickInfo> ActiveJoysticks; + +//helper functions for init joystick +static IOReturn closeJoystickDevice (JoystickInfo* joyInfo) +{ + IOReturn result = kIOReturnSuccess; + if (joyInfo && joyInfo->interface) + { + /* close the interface */ + result = (*(joyInfo->interface))->close (joyInfo->interface); + if (kIOReturnNotOpen == result) + { + /* do nothing as device was not opened, thus can't be closed */ + } + else if (kIOReturnSuccess != result) + irr::os::Printer::log("IOHIDDeviceInterface failed to close", irr::ELL_ERROR); + /* release the interface */ + result = (*(joyInfo->interface))->Release (joyInfo->interface); + if (kIOReturnSuccess != result) + irr::os::Printer::log("IOHIDDeviceInterface failed to release", irr::ELL_ERROR); + joyInfo->interface = NULL; + } + return result; +} + +static void addComponentInfo (CFTypeRef refElement, JoystickComponent *pComponent, int numActiveJoysticks) +{ + long number; + CFTypeRef refType; + + refType = CFDictionaryGetValue ((CFDictionaryRef)refElement, CFSTR(kIOHIDElementCookieKey)); + if (refType && CFNumberGetValue ((CFNumberRef)refType, kCFNumberLongType, &number)) + pComponent->cookie = (IOHIDElementCookie) number; + refType = CFDictionaryGetValue ((CFDictionaryRef)refElement, CFSTR(kIOHIDElementMinKey)); + if (refType && CFNumberGetValue ((CFNumberRef)refType, kCFNumberLongType, &number)) + pComponent->minRead = pComponent->min = number; + refType = CFDictionaryGetValue ((CFDictionaryRef)refElement, CFSTR(kIOHIDElementMaxKey)); + if (refType && CFNumberGetValue ((CFNumberRef)refType, kCFNumberLongType, &number)) + pComponent->maxRead = pComponent->max = number; +} + +static void getJoystickComponentArrayHandler (const void * value, void * parameter); + +static void addJoystickComponent (CFTypeRef refElement, JoystickInfo* joyInfo) +{ + long elementType, usagePage, usage; + CFTypeRef refElementType = CFDictionaryGetValue ((CFDictionaryRef)refElement, CFSTR(kIOHIDElementTypeKey)); + CFTypeRef refUsagePage = CFDictionaryGetValue ((CFDictionaryRef)refElement, CFSTR(kIOHIDElementUsagePageKey)); + CFTypeRef refUsage = CFDictionaryGetValue ((CFDictionaryRef)refElement, CFSTR(kIOHIDElementUsageKey)); + + if ((refElementType) && (CFNumberGetValue ((CFNumberRef)refElementType, kCFNumberLongType, &elementType))) + { + /* look at types of interest */ + if ((elementType == kIOHIDElementTypeInput_Misc) || (elementType == kIOHIDElementTypeInput_Button) || + (elementType == kIOHIDElementTypeInput_Axis)) + { + if (refUsagePage && CFNumberGetValue ((CFNumberRef)refUsagePage, kCFNumberLongType, &usagePage) && + refUsage && CFNumberGetValue ((CFNumberRef)refUsage, kCFNumberLongType, &usage)) + { + switch (usagePage) /* only interested in kHIDPage_GenericDesktop and kHIDPage_Button */ + { + case kHIDPage_GenericDesktop: + { + switch (usage) /* look at usage to determine function */ + { + case kHIDUsage_GD_X: + case kHIDUsage_GD_Y: + case kHIDUsage_GD_Z: + case kHIDUsage_GD_Rx: + case kHIDUsage_GD_Ry: + case kHIDUsage_GD_Rz: + case kHIDUsage_GD_Slider: + case kHIDUsage_GD_Dial: + case kHIDUsage_GD_Wheel: + { + joyInfo->axes++; + JoystickComponent newComponent; + addComponentInfo(refElement, &newComponent, joyInfo->numActiveJoysticks); + joyInfo->axisComp.push_back(newComponent); + } + break; + case kHIDUsage_GD_Hatswitch: + { + joyInfo->hats++; + JoystickComponent newComponent; + addComponentInfo(refElement, &newComponent, joyInfo->numActiveJoysticks); + joyInfo->hatComp.push_back(newComponent); + } + break; + } + } + break; + case kHIDPage_Button: + { + joyInfo->buttons++; + JoystickComponent newComponent; + addComponentInfo(refElement, &newComponent, joyInfo->numActiveJoysticks); + joyInfo->buttonComp.push_back(newComponent); + } + break; + default: + break; + } + } + } + else if (kIOHIDElementTypeCollection == elementType) + { + //get elements + CFTypeRef refElementTop = CFDictionaryGetValue ((CFMutableDictionaryRef) refElement, CFSTR(kIOHIDElementKey)); + if (refElementTop) + { + CFTypeID type = CFGetTypeID (refElementTop); + if (type == CFArrayGetTypeID()) + { + CFRange range = {0, CFArrayGetCount ((CFArrayRef)refElementTop)}; + CFArrayApplyFunction ((CFArrayRef)refElementTop, range, getJoystickComponentArrayHandler, joyInfo); + } + } + } + } +} + +static void getJoystickComponentArrayHandler (const void * value, void * parameter) +{ + if (CFGetTypeID (value) == CFDictionaryGetTypeID ()) + addJoystickComponent ((CFTypeRef) value, (JoystickInfo *) parameter); +} + +static void joystickTopLevelElementHandler (const void * value, void * parameter) +{ + CFTypeRef refCF = 0; + if (CFGetTypeID (value) != CFDictionaryGetTypeID ()) + return; + refCF = CFDictionaryGetValue ((CFDictionaryRef)value, CFSTR(kIOHIDElementUsagePageKey)); + if (!CFNumberGetValue ((CFNumberRef)refCF, kCFNumberLongType, &((JoystickInfo *) parameter)->usagePage)) + irr::os::Printer::log("CFNumberGetValue error retrieving JoystickInfo->usagePage", irr::ELL_ERROR); + refCF = CFDictionaryGetValue ((CFDictionaryRef)value, CFSTR(kIOHIDElementUsageKey)); + if (!CFNumberGetValue ((CFNumberRef)refCF, kCFNumberLongType, &((JoystickInfo *) parameter)->usage)) + irr::os::Printer::log("CFNumberGetValue error retrieving JoystickInfo->usage", irr::ELL_ERROR); +} + +static void getJoystickDeviceInfo (io_object_t hidDevice, CFMutableDictionaryRef hidProperties, JoystickInfo *joyInfo) +{ + CFMutableDictionaryRef usbProperties = 0; + io_registry_entry_t parent1, parent2; + + /* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also + * get dictionary for usb properties: step up two levels and get CF dictionary for USB properties + */ + if ((KERN_SUCCESS == IORegistryEntryGetParentEntry (hidDevice, kIOServicePlane, &parent1)) && + (KERN_SUCCESS == IORegistryEntryGetParentEntry (parent1, kIOServicePlane, &parent2)) && + (KERN_SUCCESS == IORegistryEntryCreateCFProperties (parent2, &usbProperties, kCFAllocatorDefault, kNilOptions))) + { + if (usbProperties) + { + CFTypeRef refCF = 0; + /* get device info + * try hid dictionary first, if fail then go to usb dictionary + */ + + /* get joystickName name */ + refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDProductKey)); + if (!refCF) + refCF = CFDictionaryGetValue (usbProperties, CFSTR("USB Product Name")); + if (refCF) + { + if (!CFStringGetCString ((CFStringRef)refCF, joyInfo->joystickName, 256, CFStringGetSystemEncoding ())) + irr::os::Printer::log("CFStringGetCString error getting joyInfo->joystickName", irr::ELL_ERROR); + } + + /* get usage page and usage */ + refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsagePageKey)); + if (refCF) + { + if (!CFNumberGetValue ((CFNumberRef)refCF, kCFNumberLongType, &joyInfo->usagePage)) + irr::os::Printer::log("CFNumberGetValue error getting joyInfo->usagePage", irr::ELL_ERROR); + refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsageKey)); + if (refCF) + if (!CFNumberGetValue ((CFNumberRef)refCF, kCFNumberLongType, &joyInfo->usage)) + irr::os::Printer::log("CFNumberGetValue error getting joyInfo->usage", irr::ELL_ERROR); + } + + if (NULL == refCF) /* get top level element HID usage page or usage */ + { + /* use top level element instead */ + CFTypeRef refCFTopElement = 0; + refCFTopElement = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDElementKey)); + { + /* refCFTopElement points to an array of element dictionaries */ + CFRange range = {0, CFArrayGetCount ((CFArrayRef)refCFTopElement)}; + CFArrayApplyFunction ((CFArrayRef)refCFTopElement, range, joystickTopLevelElementHandler, joyInfo); + } + } + + CFRelease (usbProperties); + } + else + irr::os::Printer::log("IORegistryEntryCreateCFProperties failed to create usbProperties", irr::ELL_ERROR); + + if (kIOReturnSuccess != IOObjectRelease (parent2)) + irr::os::Printer::log("IOObjectRelease failed to release parent2", irr::ELL_ERROR); + if (kIOReturnSuccess != IOObjectRelease (parent1)) + irr::os::Printer::log("IOObjectRelease failed to release parent1", irr::ELL_ERROR); + } +} + +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + +//------------------------------------------------------------------------------------------ +Boolean GetDictionaryBoolean(CFDictionaryRef theDict, const void* key) +{ + // get a boolean from the dictionary + Boolean value = false; + CFBooleanRef boolRef; + boolRef = (CFBooleanRef)CFDictionaryGetValue(theDict, key); + if (boolRef != NULL) + value = CFBooleanGetValue(boolRef); + return value; +} +//------------------------------------------------------------------------------------------ +long GetDictionaryLong(CFDictionaryRef theDict, const void* key) +{ + // get a long from the dictionary + long value = 0; + CFNumberRef numRef; + numRef = (CFNumberRef)CFDictionaryGetValue(theDict, key); + if (numRef != NULL) + CFNumberGetValue(numRef, kCFNumberLongType, &value); + return value; +} + +namespace irr +{ + namespace video + { + IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& param, io::IFileSystem* io, CIrrDeviceMacOSX *device); + } +} // end namespace irr + +static bool firstLaunch = true; + +namespace irr +{ +//! constructor +CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param) + : CIrrDeviceStub(param), Window(NULL), CGLContext(NULL), OGLContext(NULL), + SoftwareDriverTarget(0), DeviceWidth(0), DeviceHeight(0), + ScreenWidth(0), ScreenHeight(0), MouseButtonStates(0), SoftwareRendererType(0), + IsActive(true), IsFullscreen(false), IsShiftDown(false), IsControlDown(false), IsResizable(false) +{ + struct utsname name; + NSString *path; + + #ifdef _DEBUG + setDebugName("CIrrDeviceMacOSX"); + #endif + + if (firstLaunch) + { + firstLaunch = false; + + if(!CreationParams.WindowId) //load menus if standalone application + { + [[NSAutoreleasePool alloc] init]; + [NSApplication sharedApplication]; + [NSApp setDelegate:[[[AppDelegate alloc] initWithDevice:this] autorelease]]; + [NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]]; + [NSApp finishLaunching]; + } + + path = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent]; + chdir([path fileSystemRepresentation]); + [path release]; + } + NSWindow* a; + uname(&name); + Operator = new COSOperator(name.version); + os::Printer::log(name.version,ELL_INFORMATION); + + initKeycodes(); + + VideoModeList->setDesktop(CreationParams.Bits, core::dimension2d<u32>([[NSScreen mainScreen] frame].size.width, [[NSScreen mainScreen] frame].size.height)); + + bool success = true; + if (CreationParams.DriverType != video::EDT_NULL) + success = createWindow(); + + // in case of failure, one can check VideoDriver for initialization + if (!success) + return; + + setResizable(false); + CursorControl = new CCursorControl(CreationParams.WindowSize, this); + + createDriver(); + createGUIAndScene(); +} + +CIrrDeviceMacOSX::~CIrrDeviceMacOSX() +{ + [SoftwareDriverTarget release]; +#ifdef __MAC_10_6 + [NSApp setPresentationOptions:(NSApplicationPresentationDefault)]; +#else + SetSystemUIMode(kUIModeNormal, kUIOptionAutoShowMenuBar); +#endif + closeDevice(); +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + for (u32 joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + if (ActiveJoysticks[joystick].interface) + closeJoystickDevice(&ActiveJoysticks[joystick]); + } +#endif +} + +void CIrrDeviceMacOSX::closeDevice() +{ + if (Window != NULL) + { + [Window setIsVisible:FALSE]; + + if (OGLContext != NULL) + { + [OGLContext clearDrawable]; + [OGLContext release]; + OGLContext = NULL; + } + + [Window setReleasedWhenClosed:TRUE]; + [Window release]; + Window = NULL; + + if (IsFullscreen) + CGReleaseAllDisplays(); + } + else + { + if (CGLContext != NULL) + { + if(CreationParams.WindowId) + { + [(NSOpenGLContext *)OGLContext clearDrawable]; + [(NSOpenGLContext *)OGLContext release]; + OGLContext = NULL; + } + else + { + CGLSetCurrentContext(NULL); + CGLClearDrawable(CGLContext); + CGLDestroyContext(CGLContext); + CGReleaseAllDisplays(); + } + } + } + + IsFullscreen = false; + IsActive = false; + CGLContext = NULL; +} + +bool CIrrDeviceMacOSX::createWindow() +{ + CGDisplayErr error; + bool result=false; + CGDirectDisplayID display=CGMainDisplayID(); + CGLPixelFormatObj pixelFormat; + CGRect displayRect; +#ifdef __MAC_10_6 + CGDisplayModeRef displaymode, olddisplaymode; +#else + CFDictionaryRef displaymode, olddisplaymode; +#endif + GLint numPixelFormats, newSwapInterval; + + int alphaSize = CreationParams.WithAlphaChannel?4:0; + int depthSize = CreationParams.ZBufferBits; + if (CreationParams.WithAlphaChannel && (CreationParams.Bits == 32)) + alphaSize = 8; + + ScreenWidth = (int) CGDisplayPixelsWide(display); + ScreenHeight = (int) CGDisplayPixelsHigh(display); + + // we need to check where the exceptions may happen and work at them + // for now we will just catch them to be able to avoid an app exit + @try + { + if (!CreationParams.Fullscreen) + { + if(!CreationParams.WindowId) //create another window when WindowId is null + { + NSBackingStoreType type = (CreationParams.DriverType == video::EDT_OPENGL) ? NSBackingStoreBuffered : NSBackingStoreNonretained; + + Window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,CreationParams.WindowSize.Width,CreationParams.WindowSize.Height) styleMask:NSTitledWindowMask+NSClosableWindowMask+NSResizableWindowMask backing:type defer:FALSE]; + } + + if (Window != NULL || CreationParams.WindowId) + { + if (CreationParams.DriverType == video::EDT_OPENGL) + { + NSOpenGLPixelFormatAttribute windowattribs[] = + { + NSOpenGLPFANoRecovery, + NSOpenGLPFAAccelerated, + NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)depthSize, + NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)CreationParams.Bits, + NSOpenGLPFAAlphaSize, (NSOpenGLPixelFormatAttribute)alphaSize, + NSOpenGLPFASampleBuffers, (NSOpenGLPixelFormatAttribute)1, + NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)CreationParams.AntiAlias, + NSOpenGLPFAStencilSize, (NSOpenGLPixelFormatAttribute)(CreationParams.Stencilbuffer?1:0), + NSOpenGLPFADoubleBuffer, + (NSOpenGLPixelFormatAttribute)nil + }; + + if (CreationParams.AntiAlias<2) + { + windowattribs[ 9] = (NSOpenGLPixelFormatAttribute)0; + windowattribs[11] = (NSOpenGLPixelFormatAttribute)0; + } + + NSOpenGLPixelFormat *format; + for (int i=0; i<3; ++i) + { + if (1==i) + { + // Second try without stencilbuffer + if (CreationParams.Stencilbuffer) + { + windowattribs[13]=(NSOpenGLPixelFormatAttribute)0; + } + else + continue; + } + else if (2==i) + { + // Third try without Doublebuffer + os::Printer::log("No doublebuffering available.", ELL_WARNING); + windowattribs[14]=(NSOpenGLPixelFormatAttribute)nil; + } + + format = [[NSOpenGLPixelFormat alloc] initWithAttributes:windowattribs]; + if (format == NULL) + { + if (CreationParams.AntiAlias>1) + { + while (!format && windowattribs[12]>1) + { + windowattribs[12] = (NSOpenGLPixelFormatAttribute)((int)windowattribs[12]-1); + format = [[NSOpenGLPixelFormat alloc] initWithAttributes:windowattribs]; + } + + if (!format) + { + windowattribs[9] = (NSOpenGLPixelFormatAttribute)0; + windowattribs[11] = (NSOpenGLPixelFormatAttribute)0; + format = [[NSOpenGLPixelFormat alloc] initWithAttributes:windowattribs]; + if (!format) + { + // reset values for next try + windowattribs[9] = (NSOpenGLPixelFormatAttribute)1; + windowattribs[11] = (NSOpenGLPixelFormatAttribute)CreationParams.AntiAlias; + } + else + { + os::Printer::log("No FSAA available.", ELL_WARNING); + } + } + } + } + else + break; + } + CreationParams.AntiAlias = windowattribs[11]; + CreationParams.Stencilbuffer=(windowattribs[13]==1); + + if (format != NULL) + { + OGLContext = [[NSOpenGLContext alloc] initWithFormat:format shareContext:NULL]; + [format release]; + } + } + + if (OGLContext != NULL || CreationParams.DriverType != video::EDT_OPENGL) + { + if (!CreationParams.WindowId) + { + [Window center]; + [Window setDelegate:[NSApp delegate]]; + + if(CreationParams.DriverType == video::EDT_OPENGL) + [OGLContext setView:[Window contentView]]; + + [Window setAcceptsMouseMovedEvents:TRUE]; + [Window setIsVisible:TRUE]; + [Window makeKeyAndOrderFront:nil]; + } + else if(CreationParams.DriverType == video::EDT_OPENGL) //use another window for drawing + [OGLContext setView:(NSView*)CreationParams.WindowId]; + + if (CreationParams.DriverType == video::EDT_OPENGL) + CGLContext = (CGLContextObj) [OGLContext CGLContextObj]; + + DeviceWidth = CreationParams.WindowSize.Width; + DeviceHeight = CreationParams.WindowSize.Height; + result = true; + } + } + } + else + { + IsFullscreen = true; + +#ifdef __MAC_10_6 + displaymode = CGDisplayCopyDisplayMode(display); + + CFArrayRef Modes = CGDisplayCopyAllDisplayModes(display, NULL); + + for(int i = 0; i < CFArrayGetCount(Modes); ++i) + { + CGDisplayModeRef CurrentMode = (CGDisplayModeRef)CFArrayGetValueAtIndex(Modes, i); + + u8 Depth = 0; + + CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(CurrentMode); + + if(CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + Depth = 32; + else + if(CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + Depth = 16; + else + if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + Depth = 8; + + if(Depth == CreationParams.Bits) + if((CGDisplayModeGetWidth(CurrentMode) == CreationParams.WindowSize.Width) && (CGDisplayModeGetHeight(CurrentMode) == CreationParams.WindowSize.Height)) + { + displaymode = CurrentMode; + break; + } + } +#else + displaymode = CGDisplayBestModeForParameters(display,CreationParams.Bits,CreationParams.WindowSize.Width,CreationParams.WindowSize.Height,NULL); +#endif + + if (displaymode != NULL) + { +#ifdef __MAC_10_6 + olddisplaymode = CGDisplayCopyDisplayMode(display); +#else + olddisplaymode = CGDisplayCurrentMode(display); +#endif + + error = CGCaptureAllDisplays(); + if (error == CGDisplayNoErr) + { +#ifdef __MAC_10_6 + error = CGDisplaySetDisplayMode(display, displaymode, NULL); +#else + error = CGDisplaySwitchToMode(display, displaymode); +#endif + + if (error == CGDisplayNoErr) + { + if (CreationParams.DriverType == video::EDT_OPENGL) + { + CGLPixelFormatAttribute fullattribs[] = + { + kCGLPFAFullScreen, + kCGLPFADisplayMask, (CGLPixelFormatAttribute)CGDisplayIDToOpenGLDisplayMask(display), + kCGLPFADoubleBuffer, + kCGLPFANoRecovery, + kCGLPFAAccelerated, + kCGLPFADepthSize, (CGLPixelFormatAttribute)depthSize, + kCGLPFAColorSize, (CGLPixelFormatAttribute)CreationParams.Bits, + kCGLPFAAlphaSize, (CGLPixelFormatAttribute)alphaSize, + kCGLPFASampleBuffers, (CGLPixelFormatAttribute)(CreationParams.AntiAlias?1:0), + kCGLPFASamples, (CGLPixelFormatAttribute)CreationParams.AntiAlias, + kCGLPFAStencilSize, (CGLPixelFormatAttribute)(CreationParams.Stencilbuffer?1:0), + (CGLPixelFormatAttribute)NULL + }; + + pixelFormat = NULL; + numPixelFormats = 0; + CGLChoosePixelFormat(fullattribs,&pixelFormat,&numPixelFormats); + + if (pixelFormat != NULL) + { + CGLCreateContext(pixelFormat,NULL,&CGLContext); + CGLDestroyPixelFormat(pixelFormat); + } + + if (CGLContext != NULL) + { +#ifdef __MAC_10_6 + CGLSetFullScreenOnDisplay(CGLContext, CGDisplayIDToOpenGLDisplayMask(display)); +#else + CGLSetFullScreen(CGLContext); +#endif + displayRect = CGDisplayBounds(display); + ScreenWidth = DeviceWidth = (int)displayRect.size.width; + ScreenHeight = DeviceHeight = (int)displayRect.size.height; + CreationParams.WindowSize.set(ScreenWidth, ScreenHeight); + result = true; + } + } + else + { + Window = [[NSWindow alloc] initWithContentRect:[[NSScreen mainScreen] frame] styleMask:NSBorderlessWindowMask backing:NSBackingStoreNonretained defer:NO screen:[NSScreen mainScreen]]; + + [Window setLevel: CGShieldingWindowLevel()]; + [Window setAcceptsMouseMovedEvents:TRUE]; + [Window setIsVisible:TRUE]; + [Window makeKeyAndOrderFront:nil]; + + displayRect = CGDisplayBounds(display); + ScreenWidth = DeviceWidth = (int)displayRect.size.width; + ScreenHeight = DeviceHeight = (int)displayRect.size.height; + CreationParams.WindowSize.set(ScreenWidth, ScreenHeight); + result = true; + } + } + if (!result) + CGReleaseAllDisplays(); + } + } + } + } + @catch (NSException *exception) + { + closeDevice(); + result = false; + } + + if (result) + { + // fullscreen? + if (Window == NULL && !CreationParams.WindowId) //hide menus in fullscreen mode only +#ifdef __MAC_10_6 + [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)]; +#else + SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar); +#endif + + if(CreationParams.DriverType == video::EDT_OPENGL) + { + CGLSetCurrentContext(CGLContext); + newSwapInterval = (CreationParams.Vsync) ? 1 : 0; + CGLSetParameter(CGLContext,kCGLCPSwapInterval,&newSwapInterval); + } + } + + return (result); +} + +void CIrrDeviceMacOSX::setResize(int width, int height) +{ + // set new window size + DeviceWidth = width; + DeviceHeight = height; + + // update the size of the opengl rendering context + if(OGLContext); + [OGLContext update]; + + // resize the driver to the inner pane size + if (Window) + { + NSRect driverFrame = [Window contentRectForFrameRect:[Window frame]]; + getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)driverFrame.size.width, (s32)driverFrame.size.height)); + } + else + getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)width, (s32)height)); + + if (CreationParams.WindowId && OGLContext) + [(NSOpenGLContext *)OGLContext update]; +} + + +void CIrrDeviceMacOSX::createDriver() +{ + switch (CreationParams.DriverType) + { + case video::EDT_SOFTWARE: + #ifdef _IRR_COMPILE_WITH_SOFTWARE_ + VideoDriver = video::createSoftwareDriver(CreationParams.WindowSize, CreationParams.Fullscreen, FileSystem, this); + SoftwareRendererType = 2; + #else + os::Printer::log("No Software driver support compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_BURNINGSVIDEO: + #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ + VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); + SoftwareRendererType = 1; + #else + os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_OPENGL: + #ifdef _IRR_COMPILE_WITH_OPENGL_ + VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this); + #else + os::Printer::log("No OpenGL support compiled in.", ELL_ERROR); + #endif + break; + + case video::EDT_DIRECT3D8: + case video::EDT_DIRECT3D9: + os::Printer::log("This driver is not available in OSX. Try OpenGL or Software renderer.", ELL_ERROR); + break; + + case video::EDT_NULL: + VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize); + break; + + default: + os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR); + break; + } +} + +void CIrrDeviceMacOSX::flush() +{ + if (CGLContext != NULL) + CGLFlushDrawable(CGLContext); +} + +bool CIrrDeviceMacOSX::run() +{ + NSAutoreleasePool* Pool = [[NSAutoreleasePool alloc] init]; + + NSEvent *event; + irr::SEvent ievent; + + os::Timer::tick(); + storeMouseLocation(); + + event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; + if (event != nil) + { + bzero(&ievent,sizeof(ievent)); + + switch([(NSEvent *)event type]) + { + case NSKeyDown: + postKeyEvent(event,ievent,true); + break; + + case NSKeyUp: + postKeyEvent(event,ievent,false); + break; + + case NSFlagsChanged: + ievent.EventType = irr::EET_KEY_INPUT_EVENT; + ievent.KeyInput.Shift = ([(NSEvent *)event modifierFlags] & NSShiftKeyMask) != 0; + ievent.KeyInput.Control = ([(NSEvent *)event modifierFlags] & NSControlKeyMask) != 0; + + if (IsShiftDown != ievent.KeyInput.Shift) + { + ievent.KeyInput.Char = irr::KEY_SHIFT; + ievent.KeyInput.Key = irr::KEY_SHIFT; + ievent.KeyInput.PressedDown = ievent.KeyInput.Shift; + + IsShiftDown = ievent.KeyInput.Shift; + + postEventFromUser(ievent); + } + + if (IsControlDown != ievent.KeyInput.Control) + { + ievent.KeyInput.Char = irr::KEY_CONTROL; + ievent.KeyInput.Key = irr::KEY_CONTROL; + ievent.KeyInput.PressedDown = ievent.KeyInput.Control; + + IsControlDown = ievent.KeyInput.Control; + + postEventFromUser(ievent); + } + + [NSApp sendEvent:event]; + break; + + case NSLeftMouseDown: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_LMOUSE_PRESSED_DOWN; + MouseButtonStates |= irr::EMBSM_LEFT; + ievent.MouseInput.ButtonStates = MouseButtonStates; + postMouseEvent(event,ievent); + break; + + case NSLeftMouseUp: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + MouseButtonStates &= !irr::EMBSM_LEFT; + ievent.MouseInput.ButtonStates = MouseButtonStates; + ievent.MouseInput.Event = irr::EMIE_LMOUSE_LEFT_UP; + postMouseEvent(event,ievent); + break; + + case NSOtherMouseDown: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_MMOUSE_PRESSED_DOWN; + MouseButtonStates |= irr::EMBSM_MIDDLE; + ievent.MouseInput.ButtonStates = MouseButtonStates; + postMouseEvent(event,ievent); + break; + + case NSOtherMouseUp: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + MouseButtonStates &= !irr::EMBSM_MIDDLE; + ievent.MouseInput.ButtonStates = MouseButtonStates; + ievent.MouseInput.Event = irr::EMIE_MMOUSE_LEFT_UP; + postMouseEvent(event,ievent); + break; + + case NSMouseMoved: + case NSLeftMouseDragged: + case NSRightMouseDragged: + case NSOtherMouseDragged: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_MOUSE_MOVED; + ievent.MouseInput.ButtonStates = MouseButtonStates; + postMouseEvent(event,ievent); + break; + + case NSRightMouseDown: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_RMOUSE_PRESSED_DOWN; + MouseButtonStates |= irr::EMBSM_RIGHT; + ievent.MouseInput.ButtonStates = MouseButtonStates; + postMouseEvent(event,ievent); + break; + + case NSRightMouseUp: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_RMOUSE_LEFT_UP; + MouseButtonStates &= !irr::EMBSM_RIGHT; + ievent.MouseInput.ButtonStates = MouseButtonStates; + postMouseEvent(event,ievent); + break; + + case NSScrollWheel: + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_MOUSE_WHEEL; + ievent.MouseInput.Wheel = [(NSEvent *)event deltaY]; + if (ievent.MouseInput.Wheel < 1.0f) + ievent.MouseInput.Wheel *= 10.0f; + else + ievent.MouseInput.Wheel *= 5.0f; + postMouseEvent(event,ievent); + break; + + default: + [NSApp sendEvent:event]; + break; + } + } + + pollJoysticks(); + + [Pool release]; + + return (![[NSApp delegate] isQuit] && IsActive); +} + + +//! Pause the current process for the minimum time allowed only to allow other processes to execute +void CIrrDeviceMacOSX::yield() +{ + struct timespec ts = {0,0}; + nanosleep(&ts, NULL); +} + + +//! Pause execution and let other processes to run for a specified amount of time. +void CIrrDeviceMacOSX::sleep(u32 timeMs, bool pauseTimer=false) +{ + bool wasStopped = Timer ? Timer->isStopped() : true; + + struct timespec ts; + ts.tv_sec = (time_t) (timeMs / 1000); + ts.tv_nsec = (long) (timeMs % 1000) * 1000000; + + if (pauseTimer && !wasStopped) + Timer->stop(); + + nanosleep(&ts, NULL); + + if (pauseTimer && !wasStopped) + Timer->start(); +} + + +void CIrrDeviceMacOSX::setWindowCaption(const wchar_t* text) +{ + size_t size; + char title[1024]; + + if (Window != NULL) + { + size = wcstombs(title,text,1024); + title[1023] = 0; +#ifdef __MAC_10_6 + NSString* name = [NSString stringWithCString:title encoding:NSUTF8StringEncoding]; +#else + NSString* name = [NSString stringWithCString:title length:size]; +#endif + [Window setTitle:name]; + [name release]; + } +} + + +bool CIrrDeviceMacOSX::isWindowActive() const +{ + return (IsActive); +} + + +bool CIrrDeviceMacOSX::isWindowFocused() const +{ + if (Window != NULL) + return [Window isKeyWindow]; + return false; +} + + +bool CIrrDeviceMacOSX::isWindowMinimized() const +{ + if (Window != NULL) + return [Window isMiniaturized]; + return false; +} + + +void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed) +{ + NSString *str; + std::map<int,int>::const_iterator iter; + unsigned int result,c,mkey,mchar; + const unsigned char *cStr; + BOOL skipCommand; + + str = [(NSEvent *)event characters]; + if ((str != nil) && ([str length] > 0)) + { + mkey = mchar = 0; + skipCommand = false; + c = [str characterAtIndex:0]; + mchar = c; + + iter = KeyCodes.find([(NSEvent *)event keyCode]); + if (iter != KeyCodes.end()) + mkey = (*iter).second; + else if ((iter = KeyCodes.find(c)) != KeyCodes.end()) + mkey = (*iter).second; + else + { + // workaround for period character + if (c == 0x2E) + { + mkey = irr::KEY_PERIOD; + mchar = '.'; + } + else + { + cStr = (unsigned char *)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; + if (cStr != NULL && strlen((char*)cStr) > 0) + { + mchar = cStr[0]; + mkey = toupper(mchar); + if ([(NSEvent *)event modifierFlags] & NSCommandKeyMask) + { + if (mkey == 'C' || mkey == 'V' || mkey == 'X') + { + mchar = 0; + skipCommand = true; + } + } + } + } + } + + ievent.EventType = irr::EET_KEY_INPUT_EVENT; + ievent.KeyInput.Key = (irr::EKEY_CODE)mkey; + ievent.KeyInput.PressedDown = pressed; + ievent.KeyInput.Shift = ([(NSEvent *)event modifierFlags] & NSShiftKeyMask) != 0; + ievent.KeyInput.Control = ([(NSEvent *)event modifierFlags] & NSControlKeyMask) != 0; + ievent.KeyInput.Char = mchar; + + if (skipCommand) + ievent.KeyInput.Control = true; + else if ([(NSEvent *)event modifierFlags] & NSCommandKeyMask) + [NSApp sendEvent:(NSEvent *)event]; + + postEventFromUser(ievent); + } +} + + +void CIrrDeviceMacOSX::postMouseEvent(void *event,irr::SEvent &ievent) +{ + bool post = true; + + if (Window != NULL) + { + ievent.MouseInput.X = (int)[(NSEvent *)event locationInWindow].x; + ievent.MouseInput.Y = DeviceHeight - (int)[(NSEvent *)event locationInWindow].y; + + if (ievent.MouseInput.Y < 0) + post = false; + } + else + { + CGEventRef ourEvent = CGEventCreate(NULL); + CGPoint point = CGEventGetLocation(ourEvent); + CFRelease(ourEvent); + + ievent.MouseInput.X = (int)point.x; + ievent.MouseInput.Y = (int)point.y; + + if (ievent.MouseInput.Y < 0) + post = false; + } + + if (post) + postEventFromUser(ievent); + + [NSApp sendEvent:(NSEvent *)event]; +} + + +void CIrrDeviceMacOSX::storeMouseLocation() +{ + int x,y; + + if (Window != NULL) + { + NSPoint p; + p = [NSEvent mouseLocation]; + p = [Window convertScreenToBase:p]; + x = (int)p.x; + y = DeviceHeight - (int)p.y; + } + else + { + CGEventRef ourEvent = CGEventCreate(NULL); + CGPoint point = CGEventGetLocation(ourEvent); + CFRelease(ourEvent); + + x = (int)point.x; + y = (int)point.y; + + const core::position2di& curr = ((CCursorControl *)CursorControl)->getPosition(); + if (curr.X != x || curr.Y != y) + { + // In fullscreen mode, events are not sent regularly so rely on polling + irr::SEvent ievent; + ievent.EventType = irr::EET_MOUSE_INPUT_EVENT; + ievent.MouseInput.Event = irr::EMIE_MOUSE_MOVED; + ievent.MouseInput.X = x; + ievent.MouseInput.Y = y; + postEventFromUser(ievent); + } + } + + ((CCursorControl *)CursorControl)->updateInternalCursorPosition(x,y); +} + + +void CIrrDeviceMacOSX::setMouseLocation(int x,int y) +{ + NSPoint p; + CGPoint c; + + if (Window != NULL) + { + // Irrlicht window exists + p.x = (float) x; + p.y = (float) (DeviceHeight - y); + p = [Window convertBaseToScreen:p]; + p.y = ScreenHeight - p.y; + } + else + { + p.x = (float) x; + p.y = (float) y + (ScreenHeight - DeviceHeight); + } + + c.x = p.x; + c.y = p.y; + +#ifdef __MAC_10_6 + /*CGEventSourceRef SourceRef = CGEventSourceCreate(0); + CGEventSourceSetLocalEventsSuppressionInterval(SourceRef, 0); + CFRelease(SourceRef);*/ + CGSetLocalEventsSuppressionInterval(0); +#else + CGSetLocalEventsSuppressionInterval(0); +#endif + CGWarpMouseCursorPosition(c); +} + + +void CIrrDeviceMacOSX::setCursorVisible(bool visible) +{ + if (visible) + CGDisplayShowCursor(CGMainDisplayID()); + else + CGDisplayHideCursor(CGMainDisplayID()); +} + + +void CIrrDeviceMacOSX::initKeycodes() +{ + KeyCodes[kVK_UpArrow] = irr::KEY_UP; + KeyCodes[kVK_DownArrow] = irr::KEY_DOWN; + KeyCodes[kVK_LeftArrow] = irr::KEY_LEFT; + KeyCodes[kVK_RightArrow] = irr::KEY_RIGHT; + KeyCodes[kVK_F1] = irr::KEY_F1; + KeyCodes[kVK_F2] = irr::KEY_F2; + KeyCodes[kVK_F3] = irr::KEY_F3; + KeyCodes[kVK_F4] = irr::KEY_F4; + KeyCodes[kVK_F5] = irr::KEY_F5; + KeyCodes[kVK_F6] = irr::KEY_F6; + KeyCodes[kVK_F7] = irr::KEY_F7; + KeyCodes[kVK_F8] = irr::KEY_F8; + KeyCodes[kVK_F9] = irr::KEY_F9; + KeyCodes[kVK_F10] = irr::KEY_F10; + KeyCodes[kVK_F11] = irr::KEY_F11; + KeyCodes[kVK_F12] = irr::KEY_F12; + KeyCodes[kVK_F13] = irr::KEY_F13; + KeyCodes[kVK_F14] = irr::KEY_F14; + KeyCodes[kVK_F15] = irr::KEY_F15; + KeyCodes[kVK_F16] = irr::KEY_F16; + KeyCodes[kVK_F17] = irr::KEY_F17; + KeyCodes[kVK_F18] = irr::KEY_F18; + KeyCodes[kVK_F19] = irr::KEY_F19; + KeyCodes[kVK_F20] = irr::KEY_F20; + KeyCodes[kVK_Home] = irr::KEY_HOME; + KeyCodes[kVK_End] = irr::KEY_END; + KeyCodes[NSInsertFunctionKey] = irr::KEY_INSERT; + KeyCodes[kVK_ForwardDelete] = irr::KEY_DELETE; + KeyCodes[kVK_Help] = irr::KEY_HELP; + KeyCodes[NSSelectFunctionKey] = irr::KEY_SELECT; + KeyCodes[NSPrintFunctionKey] = irr::KEY_PRINT; + KeyCodes[NSExecuteFunctionKey] = irr::KEY_EXECUT; + KeyCodes[NSPrintScreenFunctionKey] = irr::KEY_SNAPSHOT; + KeyCodes[NSPauseFunctionKey] = irr::KEY_PAUSE; + KeyCodes[NSScrollLockFunctionKey] = irr::KEY_SCROLL; + KeyCodes[kVK_Delete] = irr::KEY_BACK; + KeyCodes[kVK_Tab] = irr::KEY_TAB; + KeyCodes[kVK_Return] = irr::KEY_RETURN; + KeyCodes[kVK_Escape] = irr::KEY_ESCAPE; + KeyCodes[kVK_Control] = irr::KEY_CONTROL; + KeyCodes[kVK_RightControl] = irr::KEY_RCONTROL; + KeyCodes[kVK_Command] = irr::KEY_MENU; + KeyCodes[kVK_Shift] = irr::KEY_SHIFT; + KeyCodes[kVK_RightShift] = irr::KEY_RSHIFT; + KeyCodes[kVK_Space] = irr::KEY_SPACE; + + KeyCodes[kVK_ANSI_A] = irr::KEY_KEY_A; + KeyCodes[kVK_ANSI_B] = irr::KEY_KEY_B; + KeyCodes[kVK_ANSI_C] = irr::KEY_KEY_C; + KeyCodes[kVK_ANSI_D] = irr::KEY_KEY_D; + KeyCodes[kVK_ANSI_E] = irr::KEY_KEY_E; + KeyCodes[kVK_ANSI_F] = irr::KEY_KEY_F; + KeyCodes[kVK_ANSI_G] = irr::KEY_KEY_G; + KeyCodes[kVK_ANSI_H] = irr::KEY_KEY_H; + KeyCodes[kVK_ANSI_I] = irr::KEY_KEY_I; + KeyCodes[kVK_ANSI_J] = irr::KEY_KEY_J; + KeyCodes[kVK_ANSI_K] = irr::KEY_KEY_K; + KeyCodes[kVK_ANSI_L] = irr::KEY_KEY_L; + KeyCodes[kVK_ANSI_M] = irr::KEY_KEY_M; + KeyCodes[kVK_ANSI_N] = irr::KEY_KEY_N; + KeyCodes[kVK_ANSI_O] = irr::KEY_KEY_O; + KeyCodes[kVK_ANSI_P] = irr::KEY_KEY_P; + KeyCodes[kVK_ANSI_Q] = irr::KEY_KEY_Q; + KeyCodes[kVK_ANSI_R] = irr::KEY_KEY_R; + KeyCodes[kVK_ANSI_S] = irr::KEY_KEY_S; + KeyCodes[kVK_ANSI_T] = irr::KEY_KEY_T; + KeyCodes[kVK_ANSI_U] = irr::KEY_KEY_U; + KeyCodes[kVK_ANSI_V] = irr::KEY_KEY_V; + KeyCodes[kVK_ANSI_W] = irr::KEY_KEY_W; + KeyCodes[kVK_ANSI_X] = irr::KEY_KEY_X; + KeyCodes[kVK_ANSI_X] = irr::KEY_KEY_X; + KeyCodes[kVK_ANSI_Y] = irr::KEY_KEY_Y; + KeyCodes[kVK_ANSI_Z] = irr::KEY_KEY_Z; + + KeyCodes[kVK_ANSI_0] = irr::KEY_KEY_0; + KeyCodes[kVK_ANSI_1] = irr::KEY_KEY_1; + KeyCodes[kVK_ANSI_2] = irr::KEY_KEY_2; + KeyCodes[kVK_ANSI_3] = irr::KEY_KEY_3; + KeyCodes[kVK_ANSI_4] = irr::KEY_KEY_4; + KeyCodes[kVK_ANSI_5] = irr::KEY_KEY_5; + KeyCodes[kVK_ANSI_6] = irr::KEY_KEY_6; + KeyCodes[kVK_ANSI_7] = irr::KEY_KEY_7; + KeyCodes[kVK_ANSI_8] = irr::KEY_KEY_8; + KeyCodes[kVK_ANSI_9] = irr::KEY_KEY_9; + + KeyCodes[kVK_ANSI_Slash] = irr::KEY_DIVIDE; + KeyCodes[kVK_ANSI_Comma] = irr::KEY_COMMA; + KeyCodes[kVK_ANSI_Period] = irr::KEY_PERIOD; + KeyCodes[kVK_PageUp] = irr::KEY_PRIOR; + KeyCodes[kVK_PageDown] = irr::KEY_NEXT; + + KeyCodes[kVK_ANSI_Keypad0] = irr::KEY_NUMPAD0; + KeyCodes[kVK_ANSI_Keypad1] = irr::KEY_NUMPAD1; + KeyCodes[kVK_ANSI_Keypad2] = irr::KEY_NUMPAD2; + KeyCodes[kVK_ANSI_Keypad3] = irr::KEY_NUMPAD3; + KeyCodes[kVK_ANSI_Keypad4] = irr::KEY_NUMPAD4; + KeyCodes[kVK_ANSI_Keypad5] = irr::KEY_NUMPAD5; + KeyCodes[kVK_ANSI_Keypad6] = irr::KEY_NUMPAD6; + KeyCodes[kVK_ANSI_Keypad7] = irr::KEY_NUMPAD7; + KeyCodes[kVK_ANSI_Keypad8] = irr::KEY_NUMPAD8; + KeyCodes[kVK_ANSI_Keypad9] = irr::KEY_NUMPAD9; + + KeyCodes[kVK_ANSI_KeypadDecimal] = irr::KEY_DECIMAL; + KeyCodes[kVK_ANSI_KeypadMultiply] = irr::KEY_MULTIPLY; + KeyCodes[kVK_ANSI_KeypadPlus] = irr::KEY_PLUS; + KeyCodes[kVK_ANSI_KeypadClear] = irr::KEY_OEM_CLEAR; + KeyCodes[kVK_ANSI_KeypadDivide] = irr::KEY_DIVIDE; + KeyCodes[kVK_ANSI_KeypadEnter] = irr::KEY_RETURN; + KeyCodes[kVK_ANSI_KeypadMinus] = irr::KEY_SUBTRACT; +} + + +//! Sets if the window should be resizable in windowed mode. +void CIrrDeviceMacOSX::setResizable(bool resize) +{ + IsResizable = resize; +#if 0 + if (resize) + [Window setStyleMask:NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask]; + else + [Window setStyleMask:NSTitledWindowMask|NSClosableWindowMask]; +#endif +} + + +bool CIrrDeviceMacOSX::isResizable() const +{ + return IsResizable; +} + + +void CIrrDeviceMacOSX::minimizeWindow() +{ + if (Window != NULL) + [Window miniaturize:[NSApp self]]; +} + + +//! Maximizes the window if possible. +void CIrrDeviceMacOSX::maximizeWindow() +{ + // todo: implement +} + + +//! Restore the window to normal size if possible. +void CIrrDeviceMacOSX::restoreWindow() +{ + [Window deminiaturize:[NSApp self]]; +} + + +bool CIrrDeviceMacOSX::present(video::IImage* surface, void* windowId, core::rect<s32>* src ) +{ + // todo: implement window ID and src rectangle + + if (!surface) + return false; + + if (SoftwareRendererType > 0) + { + const u32 colorSamples=3; + // do we need to change the size? + const bool updateSize = !SoftwareDriverTarget || + s32([SoftwareDriverTarget size].width) != surface->getDimension().Width || + s32([SoftwareDriverTarget size].height) != surface->getDimension().Height; + + NSRect areaRect = NSMakeRect(0.0, 0.0, surface->getDimension().Width, surface->getDimension().Height); + const u32 destPitch = (colorSamples * areaRect.size.width); + + // create / update the target + if (updateSize) + { + [SoftwareDriverTarget release]; + // allocate target for IImage + SoftwareDriverTarget = [[NSBitmapImageRep alloc] + initWithBitmapDataPlanes: nil + pixelsWide: areaRect.size.width + pixelsHigh: areaRect.size.height + bitsPerSample: 8 + samplesPerPixel: colorSamples + hasAlpha: NO + isPlanar: NO + colorSpaceName: NSCalibratedRGBColorSpace + bytesPerRow: destPitch + bitsPerPixel: 8*colorSamples]; + } + + if (SoftwareDriverTarget==nil) + return false; + + // get pointer to image data + unsigned char* imgData = (unsigned char*)surface->lock(); + + u8* srcdata = reinterpret_cast<u8*>(imgData); + u8* destData = reinterpret_cast<u8*>([SoftwareDriverTarget bitmapData]); + const u32 srcheight = core::min_(surface->getDimension().Height, (u32)areaRect.size.height); + const u32 srcPitch = surface->getPitch(); + const u32 minWidth = core::min_(surface->getDimension().Width, (u32)areaRect.size.width); + for (u32 y=0; y!=srcheight; ++y) + { + if(SoftwareRendererType == 2) + { + if (surface->getColorFormat() == video::ECF_A8R8G8B8) + video::CColorConverter::convert_A8R8G8B8toB8G8R8(srcdata, minWidth, destData); + else if (surface->getColorFormat() == video::ECF_A1R5G5B5) + video::CColorConverter::convert_A1R5G5B5toB8G8R8(srcdata, minWidth, destData); + else + video::CColorConverter::convert_viaFormat(srcdata, surface->getColorFormat(), minWidth, destData, video::ECF_R8G8B8); + } + else + { + if (surface->getColorFormat() == video::ECF_A8R8G8B8) + video::CColorConverter::convert_A8R8G8B8toR8G8B8(srcdata, minWidth, destData); + else if (surface->getColorFormat() == video::ECF_A1R5G5B5) + video::CColorConverter::convert_A1R5G5B5toR8G8B8(srcdata, minWidth, destData); + else + video::CColorConverter::convert_viaFormat(srcdata, surface->getColorFormat(), minWidth, destData, video::ECF_R8G8B8); + } + + srcdata += srcPitch; + destData += destPitch; + } + + // unlock the data + surface->unlock(); + + // todo: draw properly into a sub-view + [SoftwareDriverTarget draw]; + } + + return false; +} + + +#if defined (_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) +static void joystickRemovalCallback(void * target, + IOReturn result, void * refcon, void * sender) +{ + JoystickInfo *joy = (JoystickInfo *) refcon; + joy->removed = 1; +} +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + + +bool CIrrDeviceMacOSX::activateJoysticks(core::array<SJoystickInfo> & joystickInfo) +{ +#if defined (_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + ActiveJoysticks.clear(); + joystickInfo.clear(); + + io_object_t hidObject = 0; + io_iterator_t hidIterator = 0; + IOReturn result = kIOReturnSuccess; + mach_port_t masterPort = 0; + CFMutableDictionaryRef hidDictionaryRef = NULL; + + result = IOMasterPort (bootstrap_port, &masterPort); + if (kIOReturnSuccess != result) + { + os::Printer::log("initialiseJoysticks IOMasterPort failed", ELL_ERROR); + return false; + } + + hidDictionaryRef = IOServiceMatching (kIOHIDDeviceKey); + if (!hidDictionaryRef) + { + os::Printer::log("initialiseJoysticks IOServiceMatching failed", ELL_ERROR); + return false; + } + result = IOServiceGetMatchingServices (masterPort, hidDictionaryRef, &hidIterator); + + if (kIOReturnSuccess != result) + { + os::Printer::log("initialiseJoysticks IOServiceGetMatchingServices failed", ELL_ERROR); + return false; + } + + //no joysticks just return + if (!hidIterator) + return false; + + u32 jindex = 0u; + while ((hidObject = IOIteratorNext (hidIterator))) + { + JoystickInfo info; + + // get dictionary for HID properties + CFMutableDictionaryRef hidProperties = 0; + + kern_return_t kern_result = IORegistryEntryCreateCFProperties (hidObject, &hidProperties, kCFAllocatorDefault, kNilOptions); + if ((kern_result == KERN_SUCCESS) && hidProperties) + { + HRESULT plugInResult = S_OK; + SInt32 score = 0; + IOCFPlugInInterface ** ppPlugInInterface = NULL; + result = IOCreatePlugInInterfaceForService (hidObject, kIOHIDDeviceUserClientTypeID, + kIOCFPlugInInterfaceID, &ppPlugInInterface, &score); + if (kIOReturnSuccess == result) + { + plugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface, + CFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID), (void **) &(info.interface)); + if (plugInResult != S_OK) + os::Printer::log("initialiseJoysticks query HID class device interface failed", ELL_ERROR); + (*ppPlugInInterface)->Release(ppPlugInInterface); + } + else + continue; + + if (info.interface != NULL) + { + result = (*(info.interface))->open (info.interface, 0); + if (result == kIOReturnSuccess) + { + (*(info.interface))->setRemovalCallback (info.interface, joystickRemovalCallback, &info, &info); + getJoystickDeviceInfo(hidObject, hidProperties, &info); + + // get elements + CFTypeRef refElementTop = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDElementKey)); + if (refElementTop) + { + CFTypeID type = CFGetTypeID (refElementTop); + if (type == CFArrayGetTypeID()) + { + CFRange range = {0, CFArrayGetCount ((CFArrayRef)refElementTop)}; + info.numActiveJoysticks = ActiveJoysticks.size(); + CFArrayApplyFunction ((CFArrayRef)refElementTop, range, getJoystickComponentArrayHandler, &info); + } + } + } + else + { + CFRelease (hidProperties); + os::Printer::log("initialiseJoysticks Open interface failed", ELL_ERROR); + continue; + } + + CFRelease (hidProperties); + + result = IOObjectRelease (hidObject); + + if ( (info.usagePage != kHIDPage_GenericDesktop) || + ((info.usage != kHIDUsage_GD_Joystick && + info.usage != kHIDUsage_GD_GamePad && + info.usage != kHIDUsage_GD_MultiAxisController)) ) + { + closeJoystickDevice (&info); + continue; + } + + for (u32 i = 0; i < 6; ++i) + info.persistentData.JoystickEvent.Axis[i] = 0; + + ActiveJoysticks.push_back(info); + + SJoystickInfo returnInfo; + returnInfo.Joystick = jindex; + returnInfo.Axes = info.axes; + //returnInfo.Hats = info.hats; + returnInfo.Buttons = info.buttons; + returnInfo.Name = info.joystickName; + returnInfo.PovHat = SJoystickInfo::POV_HAT_UNKNOWN; + ++ jindex; + + //if (info.hatComp.size()) + // returnInfo.PovHat = SJoystickInfo::POV_HAT_PRESENT; + //else + // returnInfo.PovHat = SJoystickInfo::POV_HAT_ABSENT; + + joystickInfo.push_back(returnInfo); + } + + } + else + { + continue; + } + } + result = IOObjectRelease (hidIterator); + + return true; +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ + + return false; +} + +void CIrrDeviceMacOSX::pollJoysticks() +{ +#if defined (_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) + if(0 == ActiveJoysticks.size()) + return; + + u32 joystick; + for (joystick = 0; joystick < ActiveJoysticks.size(); ++joystick) + { + if (ActiveJoysticks[joystick].removed) + continue; + + bool found = false; + ActiveJoysticks[joystick].persistentData.JoystickEvent.Joystick = joystick; + + if (ActiveJoysticks[joystick].interface) + { + for (u32 n = 0; n < ActiveJoysticks[joystick].axisComp.size(); n++) + { + IOReturn result = kIOReturnSuccess; + IOHIDEventStruct hidEvent; + hidEvent.value = 0; + result = (*(ActiveJoysticks[joystick].interface))->getElementValue(ActiveJoysticks[joystick].interface, ActiveJoysticks[joystick].axisComp[n].cookie, &hidEvent); + if (kIOReturnSuccess == result) + { + const f32 min = -32768.0f; + const f32 max = 32767.0f; + const f32 deviceScale = max - min; + const f32 readScale = (f32)ActiveJoysticks[joystick].axisComp[n].maxRead - (f32)ActiveJoysticks[joystick].axisComp[n].minRead; + + if (hidEvent.value < ActiveJoysticks[joystick].axisComp[n].minRead) + ActiveJoysticks[joystick].axisComp[n].minRead = hidEvent.value; + if (hidEvent.value > ActiveJoysticks[joystick].axisComp[n].maxRead) + ActiveJoysticks[joystick].axisComp[n].maxRead = hidEvent.value; + + if (readScale != 0.0f) + hidEvent.value = (int)(((f32)((f32)hidEvent.value - (f32)ActiveJoysticks[joystick].axisComp[n].minRead) * deviceScale / readScale) + min); + + if (ActiveJoysticks[joystick].persistentData.JoystickEvent.Axis[n] != (s16)hidEvent.value) + found = true; + ActiveJoysticks[joystick].persistentData.JoystickEvent.Axis[n] = (s16)hidEvent.value; + } + }//axis check + + for (u32 n = 0; n < ActiveJoysticks[joystick].buttonComp.size(); n++) + { + IOReturn result = kIOReturnSuccess; + IOHIDEventStruct hidEvent; + hidEvent.value = 0; + result = (*(ActiveJoysticks[joystick].interface))->getElementValue(ActiveJoysticks[joystick].interface, ActiveJoysticks[joystick].buttonComp[n].cookie, &hidEvent); + if (kIOReturnSuccess == result) + { + u32 ButtonStates = 0; + + if (hidEvent.value && !((ActiveJoysticks[joystick].persistentData.JoystickEvent.ButtonStates & (1 << n)) ? true : false) ) + found = true; + else if (!hidEvent.value && ((ActiveJoysticks[joystick].persistentData.JoystickEvent.ButtonStates & (1 << n)) ? true : false)) + found = true; + + if (hidEvent.value) + ActiveJoysticks[joystick].persistentData.JoystickEvent.ButtonStates |= (1 << n); + else + ActiveJoysticks[joystick].persistentData.JoystickEvent.ButtonStates &= ~(1 << n); + } + }//button check + //still ToDo..will be done soon :) +/* + for (u32 n = 0; n < ActiveJoysticks[joystick].hatComp.size(); n++) + { + IOReturn result = kIOReturnSuccess; + IOHIDEventStruct hidEvent; + hidEvent.value = 0; + result = (*(ActiveJoysticks[joystick].interface))->getElementValue(ActiveJoysticks[joystick].interface, ActiveJoysticks[joystick].hatComp[n].cookie, &hidEvent); + if (kIOReturnSuccess == result) + { + if (ActiveJoysticks[joystick].persistentData.JoystickEvent.POV != hidEvent.value) + found = true; + ActiveJoysticks[joystick].persistentData.JoystickEvent.POV = hidEvent.value; + } + }//hat check +*/ + } + + if (found) + postEventFromUser(ActiveJoysticks[joystick].persistentData); + } +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +} + +video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList() +{ + if (!VideoModeList->getVideoModeCount()) + { + CGDirectDisplayID display; + display = CGMainDisplayID(); + +#ifdef __MAC_10_6 + CFArrayRef Modes = CGDisplayCopyAllDisplayModes(display, NULL); + + for(int i = 0; i < CFArrayGetCount(Modes); ++i) + { + CGDisplayModeRef CurrentMode = (CGDisplayModeRef)CFArrayGetValueAtIndex(Modes, i); + + u8 Depth = 0; + + CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(CurrentMode); + + if(CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + Depth = 32; + else + if(CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + Depth = 16; + else + if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + Depth = 8; + + if(Depth) + { + unsigned int Width = CGDisplayModeGetWidth(CurrentMode); + unsigned int Height = CGDisplayModeGetHeight(CurrentMode); + + VideoModeList->addMode(core::dimension2d<u32>(Width, Height), Depth); + } + } +#else + CFArrayRef availableModes = CGDisplayAvailableModes(display); + unsigned int numberOfAvailableModes = CFArrayGetCount(availableModes); + for (u32 i= 0; i<numberOfAvailableModes; ++i) + { + // look at each mode in the available list + CFDictionaryRef mode = (CFDictionaryRef)CFArrayGetValueAtIndex(availableModes, i); + long bitsPerPixel = GetDictionaryLong(mode, kCGDisplayBitsPerPixel); + Boolean safeForHardware = GetDictionaryBoolean(mode, kCGDisplayModeIsSafeForHardware); + Boolean stretched = GetDictionaryBoolean(mode, kCGDisplayModeIsStretched); + + if (!safeForHardware) + continue; + + long width = GetDictionaryLong(mode, kCGDisplayWidth); + long height = GetDictionaryLong(mode, kCGDisplayHeight); + // long refresh = GetDictionaryLong((mode), kCGDisplayRefreshRate); + VideoModeList.addMode(core::dimension2d<u32>(width, height), + bitsPerPixel); + } +#endif + } + return VideoModeList; +} + +} // end namespace + +#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/DemoApp-Info.plist b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/DemoApp-Info.plist new file mode 100644 index 0000000..a754c7f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/DemoApp-Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.irrlicht.${EXECUTABLE_NAME}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>IRRL</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/Irrlicht-Info.plist b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/Irrlicht-Info.plist new file mode 100644 index 0000000..fd4ba51 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/Irrlicht-Info.plist @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>org.irrlichtengine.${PRODUCT_NAME:identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.6</string> +</dict> +</plist> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj new file mode 100644 index 0000000..65f4cec --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj @@ -0,0 +1,7232 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXAggregateTarget section */ + B81CFFC6097FE9980057C06F /* All */ = { + isa = PBXAggregateTarget; + buildConfigurationList = B81CFFE8097FE9C30057C06F /* Build configuration list for PBXAggregateTarget "All" */; + buildPhases = ( + ); + dependencies = ( + 0946CCD90EC99D8C00D945A5 /* PBXTargetDependency */, + 09F649210D2CDFF0001E0599 /* PBXTargetDependency */, + 4CA5CB9A0A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB980A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB960A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB940A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB920A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB900A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB8E0A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB8C0A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB8A0A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB880A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB860A4868B500ADB3D7 /* PBXTargetDependency */, + 4CA5CB840A4868B500ADB3D7 /* PBXTargetDependency */, + 0E2E3D901103EB32002DE8D7 /* PBXTargetDependency */, + 0E2E3D921103EB39002DE8D7 /* PBXTargetDependency */, + 0E2E3D8E1103EB1A002DE8D7 /* PBXTargetDependency */, + 0E2E3D941103EB41002DE8D7 /* PBXTargetDependency */, + 0E2E3D8C1103EB12002DE8D7 /* PBXTargetDependency */, + 4CA5CB820A4868B500ADB3D7 /* PBXTargetDependency */, + ); + name = All; + productName = ALL; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 09022C560EA0E97F00CD54EE /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 09022C5B0EA0E97F00CD54EE /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 09022C5C0EA0E97F00CD54EE /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 09022C5D0EA0E97F00CD54EE /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 09022C5E0EA0E97F00CD54EE /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 09022C7E0EA0EA9D00CD54EE /* CGUIAttributeEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C690EA0EA9D00CD54EE /* CGUIAttributeEditor.cpp */; }; + 09022C7F0EA0EA9D00CD54EE /* CGUIEditFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C6E0EA0EA9D00CD54EE /* CGUIEditFactory.cpp */; }; + 09022C800EA0EA9D00CD54EE /* CGUIEditWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C700EA0EA9D00CD54EE /* CGUIEditWindow.cpp */; }; + 09022C810EA0EA9D00CD54EE /* CGUIEditWorkspace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C720EA0EA9D00CD54EE /* CGUIEditWorkspace.cpp */; }; + 09022C820EA0EA9D00CD54EE /* CGUIPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C750EA0EA9D00CD54EE /* CGUIPanel.cpp */; }; + 09022C830EA0EA9D00CD54EE /* CGUITextureCacheBrowser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C790EA0EA9D00CD54EE /* CGUITextureCacheBrowser.cpp */; }; + 09022C840EA0EA9D00CD54EE /* CMemoryReadWriteFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C7B0EA0EA9D00CD54EE /* CMemoryReadWriteFile.cpp */; }; + 09022C850EA0EA9D00CD54EE /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09022C7D0EA0EA9D00CD54EE /* main.cpp */; }; + 090FBC820D31085E0076D847 /* CVolumeLightSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 090FBC800D31085E0076D847 /* CVolumeLightSceneNode.cpp */; }; + 090FBC830D31085E0076D847 /* CVolumeLightSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 090FBC810D31085E0076D847 /* CVolumeLightSceneNode.h */; }; + 0910B9DE0D1F5D4100D46B04 /* CBurningShader_Raster_Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0910B9D90D1F5D4100D46B04 /* CBurningShader_Raster_Reference.cpp */; }; + 0910B9DF0D1F5D4100D46B04 /* CGUITable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0910B9DA0D1F5D4100D46B04 /* CGUITable.cpp */; }; + 0910B9E00D1F5D4100D46B04 /* CGUITable.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9DB0D1F5D4100D46B04 /* CGUITable.h */; }; + 0910B9E10D1F5D4100D46B04 /* CImageLoaderWAL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0910B9DC0D1F5D4100D46B04 /* CImageLoaderWAL.cpp */; }; + 0910B9E20D1F5D4100D46B04 /* CImageLoaderWAL.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9DD0D1F5D4100D46B04 /* CImageLoaderWAL.h */; }; + 0910BA240D1F64B300D46B04 /* CMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FD0D1F64B300D46B04 /* CMeshBuffer.h */; }; + 0910BA250D1F64B300D46B04 /* coreutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FE0D1F64B300D46B04 /* coreutil.h */; }; + 0910BA260D1F64B300D46B04 /* ECullingTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FF0D1F64B300D46B04 /* ECullingTypes.h */; }; + 0910BA270D1F64B300D46B04 /* EDebugSceneTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA000D1F64B300D46B04 /* EDebugSceneTypes.h */; }; + 0910BA280D1F64B300D46B04 /* EDriverFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA010D1F64B300D46B04 /* EDriverFeatures.h */; }; + 0910BA290D1F64B300D46B04 /* EGUIAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA020D1F64B300D46B04 /* EGUIAlignment.h */; }; + 0910BA2A0D1F64B300D46B04 /* EHardwareBufferFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA030D1F64B300D46B04 /* EHardwareBufferFlags.h */; }; + 0910BA2B0D1F64B300D46B04 /* EMaterialFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA040D1F64B300D46B04 /* EMaterialFlags.h */; }; + 0910BA2C0D1F64B300D46B04 /* EMaterialTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA050D1F64B300D46B04 /* EMaterialTypes.h */; }; + 0910BA2D0D1F64B300D46B04 /* EMeshWriterEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA060D1F64B300D46B04 /* EMeshWriterEnums.h */; }; + 0910BA2E0D1F64B300D46B04 /* EMessageBoxFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA070D1F64B300D46B04 /* EMessageBoxFlags.h */; }; + 0910BA2F0D1F64B300D46B04 /* ETerrainElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA080D1F64B300D46B04 /* ETerrainElements.h */; }; + 0910BA300D1F64B300D46B04 /* IAnimatedMeshMD3.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA090D1F64B300D46B04 /* IAnimatedMeshMD3.h */; }; + 0910BA310D1F64B300D46B04 /* IBoneSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0A0D1F64B300D46B04 /* IBoneSceneNode.h */; }; + 0910BA320D1F64B300D46B04 /* IGUIColorSelectDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0B0D1F64B300D46B04 /* IGUIColorSelectDialog.h */; }; + 0910BA330D1F64B300D46B04 /* IGUIElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0C0D1F64B300D46B04 /* IGUIElementFactory.h */; }; + 0910BA340D1F64B300D46B04 /* IGUIFontBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0D0D1F64B300D46B04 /* IGUIFontBitmap.h */; }; + 0910BA350D1F64B300D46B04 /* IGUISpinBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0E0D1F64B300D46B04 /* IGUISpinBox.h */; }; + 0910BA360D1F64B300D46B04 /* IGUISpriteBank.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0F0D1F64B300D46B04 /* IGUISpriteBank.h */; }; + 0910BA370D1F64B300D46B04 /* IGUITable.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA100D1F64B300D46B04 /* IGUITable.h */; }; + 0910BA380D1F64B300D46B04 /* IMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA110D1F64B300D46B04 /* IMeshWriter.h */; }; + 0910BA390D1F64B300D46B04 /* IParticleAnimatedMeshSceneNodeEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA120D1F64B300D46B04 /* IParticleAnimatedMeshSceneNodeEmitter.h */; }; + 0910BA3A0D1F64B300D46B04 /* IParticleAttractionAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA130D1F64B300D46B04 /* IParticleAttractionAffector.h */; }; + 0910BA3B0D1F64B300D46B04 /* IParticleBoxEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA140D1F64B300D46B04 /* IParticleBoxEmitter.h */; }; + 0910BA3C0D1F64B300D46B04 /* IParticleCylinderEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA150D1F64B300D46B04 /* IParticleCylinderEmitter.h */; }; + 0910BA3D0D1F64B300D46B04 /* IParticleFadeOutAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA160D1F64B300D46B04 /* IParticleFadeOutAffector.h */; }; + 0910BA3E0D1F64B300D46B04 /* IParticleGravityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA170D1F64B300D46B04 /* IParticleGravityAffector.h */; }; + 0910BA3F0D1F64B300D46B04 /* IParticleMeshEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA180D1F64B300D46B04 /* IParticleMeshEmitter.h */; }; + 0910BA400D1F64B300D46B04 /* IParticleRingEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA190D1F64B300D46B04 /* IParticleRingEmitter.h */; }; + 0910BA410D1F64B300D46B04 /* IParticleRotationAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1A0D1F64B300D46B04 /* IParticleRotationAffector.h */; }; + 0910BA420D1F64B300D46B04 /* IParticleSphereEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1B0D1F64B300D46B04 /* IParticleSphereEmitter.h */; }; + 0910BA430D1F64B300D46B04 /* IQ3Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1C0D1F64B300D46B04 /* IQ3Shader.h */; }; + 0910BA440D1F64B300D46B04 /* IReferenceCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1D0D1F64B300D46B04 /* IReferenceCounted.h */; }; + 0910BA450D1F64B300D46B04 /* irrMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1E0D1F64B300D46B04 /* irrMap.h */; }; + 0910BA460D1F64B300D46B04 /* ISkinnedMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1F0D1F64B300D46B04 /* ISkinnedMesh.h */; }; + 0910BA470D1F64B300D46B04 /* SMaterialLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA200D1F64B300D46B04 /* SMaterialLayer.h */; }; + 0910BA480D1F64B300D46B04 /* SSharedMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA210D1F64B300D46B04 /* SSharedMeshBuffer.h */; }; + 0910BA490D1F64B300D46B04 /* SSkinMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA220D1F64B300D46B04 /* SSkinMeshBuffer.h */; }; + 0910BA4A0D1F64B300D46B04 /* SViewFrustum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA230D1F64B300D46B04 /* SViewFrustum.h */; }; + 0925113E0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925113F0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511400D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511410D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511420D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511430D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511440D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511450D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511460D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511470D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511480D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 092511490D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925114A0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925114B0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925114C0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0925114D0D744ADE006784D9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 09293C3E0ED32029003B8C9C /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2C0ED32029003B8C9C /* png.c */; }; + 09293C3F0ED32029003B8C9C /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2D0ED32029003B8C9C /* pngerror.c */; }; + 09293C410ED32029003B8C9C /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2F0ED32029003B8C9C /* pngget.c */; }; + 09293C420ED32029003B8C9C /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C300ED32029003B8C9C /* pngmem.c */; }; + 09293C430ED32029003B8C9C /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C310ED32029003B8C9C /* pngpread.c */; }; + 09293C440ED32029003B8C9C /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C320ED32029003B8C9C /* pngread.c */; }; + 09293C450ED32029003B8C9C /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C330ED32029003B8C9C /* pngrio.c */; }; + 09293C460ED32029003B8C9C /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C340ED32029003B8C9C /* pngrtran.c */; }; + 09293C470ED32029003B8C9C /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C350ED32029003B8C9C /* pngrutil.c */; }; + 09293C480ED32029003B8C9C /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C360ED32029003B8C9C /* pngset.c */; }; + 09293C4A0ED32029003B8C9C /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C380ED32029003B8C9C /* pngtrans.c */; }; + 09293C4C0ED32029003B8C9C /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3A0ED32029003B8C9C /* pngwio.c */; }; + 09293C4D0ED32029003B8C9C /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3B0ED32029003B8C9C /* pngwrite.c */; }; + 09293C4E0ED32029003B8C9C /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3C0ED32029003B8C9C /* pngwtran.c */; }; + 09293C4F0ED32029003B8C9C /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3D0ED32029003B8C9C /* pngwutil.c */; }; + 0930CE560EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE570EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE580EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE590EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE5A0EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE5B0EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE5C0EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE5D0EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE5E0EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE5F0EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE600EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE610EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE620EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE630EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE640EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE650EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0930CE660EC39F4500D63866 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 093973C00E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 093973BC0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp */; }; + 093973C10E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.h in Headers */ = {isa = PBXBuildFile; fileRef = 093973BD0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.h */; }; + 093973C20E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 093973BE0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp */; }; + 093973C30E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.h in Headers */ = {isa = PBXBuildFile; fileRef = 093973BF0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.h */; }; + 0946CCA70EC99BBE00D945A5 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 0946CCAC0EC99BBE00D945A5 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 0946CCAD0EC99BBE00D945A5 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 0946CCAE0EC99BBE00D945A5 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 0946CCAF0EC99BBE00D945A5 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0946CCB00EC99BBE00D945A5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0946CCCB0EC99C6E00D945A5 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0946CCCA0EC99C6E00D945A5 /* main.cpp */; }; + 096840470D0F1A2300333EFD /* CB3DMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968401E0D0F1A2300333EFD /* CB3DMeshFileLoader.cpp */; }; + 096840480D0F1A2300333EFD /* CB3DMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0968401F0D0F1A2300333EFD /* CB3DMeshFileLoader.h */; }; + 096840490D0F1A2300333EFD /* CBoneSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840200D0F1A2300333EFD /* CBoneSceneNode.cpp */; }; + 0968404A0D0F1A2300333EFD /* CBoneSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840210D0F1A2300333EFD /* CBoneSceneNode.h */; }; + 0968404B0D0F1A2300333EFD /* CBSPMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840220D0F1A2300333EFD /* CBSPMeshFileLoader.cpp */; }; + 0968404C0D0F1A2300333EFD /* CBSPMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840230D0F1A2300333EFD /* CBSPMeshFileLoader.h */; }; + 0968404E0D0F1A2300333EFD /* CColladaMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840250D0F1A2300333EFD /* CColladaMeshWriter.cpp */; }; + 0968404F0D0F1A2300333EFD /* CColladaMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840260D0F1A2300333EFD /* CColladaMeshWriter.h */; }; + 096840500D0F1A2300333EFD /* CImageLoaderPPM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840270D0F1A2300333EFD /* CImageLoaderPPM.cpp */; }; + 096840510D0F1A2300333EFD /* CImageLoaderPPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840280D0F1A2300333EFD /* CImageLoaderPPM.h */; }; + 096840540D0F1A2300333EFD /* CIrrMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968402B0D0F1A2300333EFD /* CIrrMeshFileLoader.cpp */; }; + 096840550D0F1A2300333EFD /* CIrrMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0968402C0D0F1A2300333EFD /* CIrrMeshFileLoader.h */; }; + 096840560D0F1A2300333EFD /* CIrrMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968402D0D0F1A2300333EFD /* CIrrMeshWriter.cpp */; }; + 096840570D0F1A2300333EFD /* CIrrMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0968402E0D0F1A2300333EFD /* CIrrMeshWriter.h */; }; + 096840580D0F1A2300333EFD /* CMD2MeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968402F0D0F1A2300333EFD /* CMD2MeshFileLoader.cpp */; }; + 096840590D0F1A2300333EFD /* CMD2MeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840300D0F1A2300333EFD /* CMD2MeshFileLoader.h */; }; + 0968405A0D0F1A2300333EFD /* CMS3DMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840310D0F1A2300333EFD /* CMS3DMeshFileLoader.cpp */; }; + 0968405B0D0F1A2300333EFD /* CMS3DMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840320D0F1A2300333EFD /* CMS3DMeshFileLoader.h */; }; + 0968405C0D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840330D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.cpp */; }; + 0968405D0D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840340D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.h */; }; + 0968405E0D0F1A2300333EFD /* CParticleAttractionAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840350D0F1A2300333EFD /* CParticleAttractionAffector.cpp */; }; + 0968405F0D0F1A2300333EFD /* CParticleAttractionAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840360D0F1A2300333EFD /* CParticleAttractionAffector.h */; }; + 096840600D0F1A2300333EFD /* CParticleCylinderEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840370D0F1A2300333EFD /* CParticleCylinderEmitter.cpp */; }; + 096840610D0F1A2300333EFD /* CParticleCylinderEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840380D0F1A2300333EFD /* CParticleCylinderEmitter.h */; }; + 096840620D0F1A2300333EFD /* CParticleMeshEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840390D0F1A2300333EFD /* CParticleMeshEmitter.cpp */; }; + 096840630D0F1A2300333EFD /* CParticleMeshEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0968403A0D0F1A2300333EFD /* CParticleMeshEmitter.h */; }; + 096840640D0F1A2300333EFD /* CParticleRingEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968403B0D0F1A2300333EFD /* CParticleRingEmitter.cpp */; }; + 096840650D0F1A2300333EFD /* CParticleRingEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0968403C0D0F1A2300333EFD /* CParticleRingEmitter.h */; }; + 096840660D0F1A2300333EFD /* CParticleRotationAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968403D0D0F1A2300333EFD /* CParticleRotationAffector.cpp */; }; + 096840670D0F1A2300333EFD /* CParticleRotationAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0968403E0D0F1A2300333EFD /* CParticleRotationAffector.h */; }; + 096840680D0F1A2300333EFD /* CParticleSphereEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968403F0D0F1A2300333EFD /* CParticleSphereEmitter.cpp */; }; + 096840690D0F1A2300333EFD /* CParticleSphereEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840400D0F1A2300333EFD /* CParticleSphereEmitter.h */; }; + 0968406A0D0F1A2300333EFD /* CSkinnedMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840410D0F1A2300333EFD /* CSkinnedMesh.cpp */; }; + 0968406B0D0F1A2300333EFD /* CSkinnedMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840420D0F1A2300333EFD /* CSkinnedMesh.h */; }; + 0968406C0D0F1A2300333EFD /* CSTLMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840430D0F1A2300333EFD /* CSTLMeshFileLoader.cpp */; }; + 0968406D0D0F1A2300333EFD /* CSTLMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840440D0F1A2300333EFD /* CSTLMeshFileLoader.h */; }; + 0968406E0D0F1A2300333EFD /* CSTLMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840450D0F1A2300333EFD /* CSTLMeshWriter.cpp */; }; + 0968406F0D0F1A2300333EFD /* CSTLMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 096840460D0F1A2300333EFD /* CSTLMeshWriter.h */; }; + 096CC0E00ECE65B500C81DC7 /* CParticleScaleAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096CC0DE0ECE65B500C81DC7 /* CParticleScaleAffector.cpp */; }; + 096CC0E10ECE65B500C81DC7 /* CParticleScaleAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 096CC0DF0ECE65B500C81DC7 /* CParticleScaleAffector.h */; }; + 096F8E3D0EA2EFBA00907EC5 /* COBJMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096F8E3B0EA2EFBA00907EC5 /* COBJMeshWriter.cpp */; }; + 096F8E3E0EA2EFBA00907EC5 /* COBJMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 096F8E3C0EA2EFBA00907EC5 /* COBJMeshWriter.h */; }; + 09C638720D4F1A69000B6A18 /* CLWOMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09C638700D4F1A69000B6A18 /* CLWOMeshFileLoader.cpp */; }; + 09C638730D4F1A69000B6A18 /* CLWOMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 09C638710D4F1A69000B6A18 /* CLWOMeshFileLoader.h */; }; + 09F460EB0D3223ED00D0A9B0 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09F6492E0D2CE038001E0599 /* main.cpp */; }; + 09F648F80D2CDED9001E0599 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 09F648FD0D2CDED9001E0599 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 09F648FE0D2CDED9001E0599 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 09F648FF0D2CDED9001E0599 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 09F6491A0D2CDF9A001E0599 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054710A48470500C844C2 /* main.cpp */; }; + 09F649330D2CE03E001E0599 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 09F649380D2CE03E001E0599 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 09F649390D2CE03E001E0599 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 09F6493A0D2CE03E001E0599 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 09F6495A0D2CE206001E0599 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 09F6495F0D2CE206001E0599 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 09F649600D2CE206001E0599 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 09F649610D2CE206001E0599 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 09F649740D2CE2D0001E0599 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09F649730D2CE2D0001E0599 /* main.cpp */; }; + 0E2E3C461103B1B5002DE8D7 /* jaricom.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C431103B1B5002DE8D7 /* jaricom.c */; }; + 0E2E3C471103B1B5002DE8D7 /* jcarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C441103B1B5002DE8D7 /* jcarith.c */; }; + 0E2E3C481103B1B5002DE8D7 /* jdarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C451103B1B5002DE8D7 /* jdarith.c */; }; + 0E2E3C4A1103B224002DE8D7 /* Octree.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C491103B224002DE8D7 /* Octree.h */; }; + 0E2E3C4D1103B247002DE8D7 /* COctreeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */; }; + 0E2E3C4E1103B247002DE8D7 /* COctreeSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C4C1103B247002DE8D7 /* COctreeSceneNode.h */; }; + 0E2E3C511103B261002DE8D7 /* COctreeTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4F1103B261002DE8D7 /* COctreeTriangleSelector.cpp */; }; + 0E2E3C521103B261002DE8D7 /* COctreeTriangleSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C501103B261002DE8D7 /* COctreeTriangleSelector.h */; }; + 0E2E3C551103B27D002DE8D7 /* CNPKReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C531103B27D002DE8D7 /* CNPKReader.cpp */; }; + 0E2E3C561103B27D002DE8D7 /* CNPKReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C541103B27D002DE8D7 /* CNPKReader.h */; }; + 0E2E3C5B1103B2AE002DE8D7 /* CIrrDeviceFB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C571103B2AE002DE8D7 /* CIrrDeviceFB.cpp */; }; + 0E2E3C5C1103B2AE002DE8D7 /* CIrrDeviceFB.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C581103B2AE002DE8D7 /* CIrrDeviceFB.h */; }; + 0E2E3C5D1103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */; }; + 0E2E3C5E1103B2AE002DE8D7 /* CIrrDeviceWinCE.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E2E3C5A1103B2AE002DE8D7 /* CIrrDeviceWinCE.h */; }; + 0E2E3C641103B384002DE8D7 /* LzmaDec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C631103B384002DE8D7 /* LzmaDec.c */; }; + 0E2E3C6F1103B3B9002DE8D7 /* blocksort.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C661103B3B9002DE8D7 /* blocksort.c */; }; + 0E2E3C701103B3B9002DE8D7 /* bzcompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */; }; + 0E2E3C731103B3B9002DE8D7 /* crctable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */; }; + 0E2E3C741103B3B9002DE8D7 /* decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */; }; + 0E2E3C751103B3B9002DE8D7 /* huffman.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */; }; + 0E2E3C771103B3B9002DE8D7 /* randtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */; }; + 0E2E3C7C1103B4E1002DE8D7 /* bzlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */; }; + 0E2E3C871103B53C002DE8D7 /* aescrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */; }; + 0E2E3C881103B53C002DE8D7 /* aeskey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */; }; + 0E2E3C891103B53C002DE8D7 /* aestab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C801103B53C002DE8D7 /* aestab.cpp */; }; + 0E2E3C8A1103B53C002DE8D7 /* fileenc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C811103B53C002DE8D7 /* fileenc.cpp */; }; + 0E2E3C8B1103B53C002DE8D7 /* hmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C821103B53C002DE8D7 /* hmac.cpp */; }; + 0E2E3C8C1103B53C002DE8D7 /* prng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C831103B53C002DE8D7 /* prng.cpp */; }; + 0E2E3C8D1103B53C002DE8D7 /* pwd2key.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C841103B53C002DE8D7 /* pwd2key.cpp */; }; + 0E2E3C8E1103B53C002DE8D7 /* sha1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C851103B53C002DE8D7 /* sha1.cpp */; }; + 0E2E3C8F1103B53C002DE8D7 /* sha2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C861103B53C002DE8D7 /* sha2.cpp */; }; + 0E2E3CEF1103E294002DE8D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 0E2E3CF41103E294002DE8D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 0E2E3CF51103E294002DE8D7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 0E2E3CF61103E294002DE8D7 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 0E2E3CF71103E294002DE8D7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0E2E3CF81103E294002DE8D7 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0E2E3D301103E3F4002DE8D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 0E2E3D341103E3F4002DE8D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 0E2E3D351103E3F4002DE8D7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 0E2E3D361103E3F4002DE8D7 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 0E2E3D371103E3F4002DE8D7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0925113D0D744ADE006784D9 /* Carbon.framework */; }; + 0E2E3D381103E3F4002DE8D7 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0930CE550EC39F4500D63866 /* IOKit.framework */; }; + 0E2E3D701103E6C6002DE8D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3D681103E6C6002DE8D7 /* main.cpp */; }; + 0E2E3D811103E6E4002DE8D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3D791103E6E4002DE8D7 /* main.cpp */; }; + 3430E4D61022C391006271FD /* CTarReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430E4D41022C391006271FD /* CTarReader.h */; }; + 3430E4D71022C391006271FD /* CTarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3430E4D51022C391006271FD /* CTarReader.cpp */; }; + 344FD4A61039E98C0045FD3F /* CMountPointReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344FD4A41039E98C0045FD3F /* CMountPointReader.cpp */; }; + 344FD4A71039E98C0045FD3F /* CMountPointReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 344FD4A51039E98C0045FD3F /* CMountPointReader.h */; }; + 3484C4E10F48D1B000C81F60 /* CGUIImageList.h in Headers */ = {isa = PBXBuildFile; fileRef = 3484C4DF0F48D1B000C81F60 /* CGUIImageList.h */; }; + 3484C4E20F48D1B000C81F60 /* CGUIImageList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4E00F48D1B000C81F60 /* CGUIImageList.cpp */; }; + 3484C4EE0F48D3A100C81F60 /* CGUITreeView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3484C4EC0F48D3A100C81F60 /* CGUITreeView.h */; }; + 3484C4EF0F48D3A100C81F60 /* CGUITreeView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4ED0F48D3A100C81F60 /* CGUITreeView.cpp */; }; + 3484C4FD0F48D4CB00C81F60 /* CMemoryFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 3484C4FB0F48D4CB00C81F60 /* CMemoryFile.h */; }; + 3484C4FE0F48D4CB00C81F60 /* CMemoryFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4FC0F48D4CB00C81F60 /* CMemoryFile.cpp */; }; + 34EC243C0F59272E0037BC3A /* CIrrDeviceConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 34EC243A0F59272E0037BC3A /* CIrrDeviceConsole.h */; }; + 34EC243D0F59272E0037BC3A /* CIrrDeviceConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EC243B0F59272E0037BC3A /* CIrrDeviceConsole.cpp */; }; + 34EF91D20F65FCA6000B5651 /* CImageLoaderRGB.h in Headers */ = {isa = PBXBuildFile; fileRef = 34EF91D00F65FCA6000B5651 /* CImageLoaderRGB.h */; }; + 34EF91D30F65FCA6000B5651 /* CImageLoaderRGB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91D10F65FCA6000B5651 /* CImageLoaderRGB.cpp */; }; + 34EF91D70F65FCF6000B5651 /* CPLYMeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 34EF91D50F65FCF6000B5651 /* CPLYMeshFileLoader.h */; }; + 34EF91D80F65FCF6000B5651 /* CPLYMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91D60F65FCF6000B5651 /* CPLYMeshFileLoader.cpp */; }; + 34EF91DC0F65FD14000B5651 /* CPLYMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 34EF91DA0F65FD14000B5651 /* CPLYMeshWriter.h */; }; + 34EF91DD0F65FD14000B5651 /* CPLYMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91DB0F65FD14000B5651 /* CPLYMeshWriter.cpp */; }; + 4C364EA40A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C364EA20A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp */; }; + 4C43EEC00A74A5C800F942FC /* CPakReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43EEBE0A74A5C800F942FC /* CPakReader.cpp */; }; + 4C53E2500A48504D0014E966 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054770A48470500C844C2 /* main.cpp */; }; + 4C53E2510A4850550014E966 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4C53E26F0A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2700A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2710A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2720A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2730A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2740A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2750A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2760A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2770A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2780A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2790A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E27A0A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E27B0A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E27C0A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E27D0A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E27E0A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E27F0A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2800A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2810A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2820A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2830A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2840A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2850A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2860A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E2870A4850D60014E966 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26D0A4850D60014E966 /* Cocoa.framework */; }; + 4C53E2880A4850D60014E966 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E26E0A4850D60014E966 /* OpenGL.framework */; }; + 4C53E3890A48559C0014E966 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4C53E3D80A4856B30014E966 /* inffast.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1800A484C2C0014E966 /* inffast.c */; }; + 4C53E3DC0A4856B30014E966 /* inftrees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1850A484C2C0014E966 /* inftrees.c */; }; + 4C53E3E40A4856B30014E966 /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18D0A484C2C0014E966 /* uncompr.c */; }; + 4C53E3F30A4856B30014E966 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1750A484C2C0014E966 /* compress.c */; }; + 4C53E3F60A4856B30014E966 /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1770A484C2C0014E966 /* crc32.c */; }; + 4C53E3FE0A4856B30014E966 /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1920A484C2C0014E966 /* zutil.c */; }; + 4C53E4010A4856B30014E966 /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18B0A484C2C0014E966 /* trees.c */; }; + 4C53E40A0A4856B30014E966 /* deflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1790A484C2C0014E966 /* deflate.c */; }; + 4C53E4150A4856B30014E966 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1720A484C2C0014E966 /* adler32.c */; }; + 4C53E4280A4856B30014E966 /* CImageLoaderPNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF600A484C230014E966 /* CImageLoaderPNG.cpp */; }; + 4C53E4290A4856B30014E966 /* CColorConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFC0A484C220014E966 /* CColorConverter.cpp */; }; + 4C53E42A0A4856B30014E966 /* CSceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAB0A484C240014E966 /* CSceneManager.cpp */; }; + 4C53E42B0A4856B30014E966 /* CTRTextureGouraudAdd2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE30A484C250014E966 /* CTRTextureGouraudAdd2.cpp */; }; + 4C53E42C0A4856B30014E966 /* CNullDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF820A484C240014E966 /* CNullDriver.cpp */; }; + 4C53E42D0A4856B30014E966 /* CCSMLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFE0A484C220014E966 /* CCSMLoader.cpp */; }; + 4C53E42E0A4856B30014E966 /* irrXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E00E0A484C250014E966 /* irrXML.cpp */; }; + 4C53E42F0A4856B30014E966 /* CGUIListBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF420A484C230014E966 /* CGUIListBox.cpp */; }; + 4C53E4300A4856B30014E966 /* CTRGouraudWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD70A484C240014E966 /* CTRGouraudWire.cpp */; }; + 4C53E4310A4856B30014E966 /* CIrrDeviceStub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF680A484C230014E966 /* CIrrDeviceStub.cpp */; }; + 4C53E4320A4856B30014E966 /* CGUIMessageBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF480A484C230014E966 /* CGUIMessageBox.cpp */; }; + 4C53E4330A4856B30014E966 /* CMeshSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF7A0A484C230014E966 /* CMeshSceneNode.cpp */; }; + 4C53E4340A4856B30014E966 /* CGUIStaticText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF500A484C230014E966 /* CGUIStaticText.cpp */; }; + 4C53E4350A4856B30014E966 /* os.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E16A0A484C2C0014E966 /* os.cpp */; }; + 4C53E4360A4856B30014E966 /* COCTLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF840A484C240014E966 /* COCTLoader.cpp */; }; + 4C53E4370A4856B30014E966 /* CGUIContextMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF340A484C230014E966 /* CGUIContextMenu.cpp */; }; + 4C53E4390A4856B30014E966 /* CSceneNodeAnimatorFlyCircle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB10A484C240014E966 /* CSceneNodeAnimatorFlyCircle.cpp */; }; + 4C53E43A0A4856B30014E966 /* CDefaultSceneNodeFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF1E0A484C230014E966 /* CDefaultSceneNodeFactory.cpp */; }; + 4C53E43B0A4856B30014E966 /* CD3D9Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF0D0A484C230014E966 /* CD3D9Driver.cpp */; }; + 4C53E43C0A4856B30014E966 /* CTRGouraud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD30A484C240014E966 /* CTRGouraud.cpp */; }; + 4C53E43D0A4856B30014E966 /* C3DSMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEE70A484C220014E966 /* C3DSMeshFileLoader.cpp */; }; + 4C53E43E0A4856B30014E966 /* COgreMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF8A0A484C240014E966 /* COgreMeshFileLoader.cpp */; }; + 4C53E43F0A4856B30014E966 /* CMY3DMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF7F0A484C230014E966 /* CMY3DMeshFileLoader.cpp */; }; + 4C53E4400A4856B30014E966 /* CLMTSMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF700A484C230014E966 /* CLMTSMeshFileLoader.cpp */; }; + 4C53E4410A4856B30014E966 /* CGUIFileOpenDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF3A0A484C230014E966 /* CGUIFileOpenDialog.cpp */; }; + 4C53E4420A4856B30014E966 /* CSceneNodeAnimatorDelete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAF0A484C240014E966 /* CSceneNodeAnimatorDelete.cpp */; }; + 4C53E4430A4856B30014E966 /* CTRGouraudAlphaNoZ2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD60A484C240014E966 /* CTRGouraudAlphaNoZ2.cpp */; }; + 4C53E4440A4856B30014E966 /* CGeometryCreator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF2C0A484C230014E966 /* CGeometryCreator.cpp */; }; + 4C53E4450A4856B30014E966 /* CD3D8Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF0B0A484C230014E966 /* CD3D8Texture.cpp */; }; + 4C53E4460A4856B30014E966 /* CSkyBoxSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFBD0A484C240014E966 /* CSkyBoxSceneNode.cpp */; }; + 4C53E4470A4856B30014E966 /* CMeshManipulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF780A484C230014E966 /* CMeshManipulator.cpp */; }; + 4C53E4480A4856B30014E966 /* CTextSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFCE0A484C240014E966 /* CTextSceneNode.cpp */; }; + 4C53E4490A4856B30014E966 /* CTRTextureDetailMap2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDC0A484C250014E966 /* CTRTextureDetailMap2.cpp */; }; + 4C53E44A0A4856B30014E966 /* CTRTextureGouraudAddNoZ2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE40A484C250014E966 /* CTRTextureGouraudAddNoZ2.cpp */; }; + 4C53E44C0A4856B30014E966 /* CTRTextureGouraudNoZ.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE50A484C250014E966 /* CTRTextureGouraudNoZ.cpp */; }; + 4C53E44E0A4856B30014E966 /* CGUIScrollBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF4C0A484C230014E966 /* CGUIScrollBar.cpp */; }; + 4C53E44F0A4856B30014E966 /* CSceneCollisionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA90A484C240014E966 /* CSceneCollisionManager.cpp */; }; + 4C53E4500A4856B30014E966 /* CGUICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF300A484C230014E966 /* CGUICheckBox.cpp */; }; + 4C53E4510A4856B30014E966 /* CQ3LevelMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA50A484C240014E966 /* CQ3LevelMesh.cpp */; }; + 4C53E4520A4856B30014E966 /* CParticleGravityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF9F0A484C240014E966 /* CParticleGravityAffector.cpp */; }; + 4C53E4530A4856B30014E966 /* CSoftwareDriver2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC20A484C240014E966 /* CSoftwareDriver2.cpp */; }; + 4C53E4540A4856B30014E966 /* CD3D9ParallaxMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF140A484C230014E966 /* CD3D9ParallaxMapRenderer.cpp */; }; + 4C53E4550A4856B30014E966 /* CD3D8ParallaxMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF070A484C230014E966 /* CD3D8ParallaxMapRenderer.cpp */; }; + 4C53E4560A4856B30014E966 /* CAnimatedMeshMD2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEE90A484C220014E966 /* CAnimatedMeshMD2.cpp */; }; + 4C53E4570A4856B30014E966 /* CSceneNodeAnimatorFlyStraight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB30A484C240014E966 /* CSceneNodeAnimatorFlyStraight.cpp */; }; + 4C53E4580A4856B30014E966 /* CImageLoaderPCX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF5E0A484C230014E966 /* CImageLoaderPCX.cpp */; }; + 4C53E4590A4856B30014E966 /* CAnimatedMeshSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEED0A484C220014E966 /* CAnimatedMeshSceneNode.cpp */; }; + 4C53E45A0A4856B30014E966 /* CTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDA0A484C250014E966 /* CTriangleSelector.cpp */; }; + 4C53E45B0A4856B30014E966 /* CTRTextureGouraudVertexAlpha2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE70A484C250014E966 /* CTRTextureGouraudVertexAlpha2.cpp */; }; + 4C53E45C0A4856B30014E966 /* CTRTextureWire2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFED0A484C250014E966 /* CTRTextureWire2.cpp */; }; + 4C53E45D0A4856B30014E966 /* CTRTextureFlatWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDE0A484C250014E966 /* CTRTextureFlatWire.cpp */; }; + 4C53E45E0A4856B30014E966 /* CTRGouraud2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD40A484C240014E966 /* CTRGouraud2.cpp */; }; + 4C53E45F0A4856B30014E966 /* CEmptySceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF240A484C230014E966 /* CEmptySceneNode.cpp */; }; + 4C53E4600A4856B30014E966 /* CTRTextureLightMap2_Add.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE90A484C250014E966 /* CTRTextureLightMap2_Add.cpp */; }; + 4C53E4610A4856B30014E966 /* CReadFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA70A484C240014E966 /* CReadFile.cpp */; }; + 4C53E4620A4856B30014E966 /* COpenGLTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF970A484C240014E966 /* COpenGLTexture.cpp */; }; + 4C53E4640A4856B30014E966 /* COSOperator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF990A484C240014E966 /* COSOperator.cpp */; }; + 4C53E4660A4856B30014E966 /* CColladaFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFA0A484C220014E966 /* CColladaFileLoader.cpp */; }; + 4C53E4670A4856B30014E966 /* CCameraSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEF80A484C220014E966 /* CCameraSceneNode.cpp */; }; + 4C53E4680A4856B30014E966 /* CMetaTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF7C0A484C230014E966 /* CMetaTriangleSelector.cpp */; }; + 4C53E4690A4856B30014E966 /* CTRTextureFlat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDD0A484C250014E966 /* CTRTextureFlat.cpp */; }; + 4C53E46A0A4856B30014E966 /* CVideoModeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEE0A484C250014E966 /* CVideoModeList.cpp */; }; + 4C53E46B0A4856B30014E966 /* CXMLReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFFA0A484C250014E966 /* CXMLReader.cpp */; }; + 4C53E46C0A4856B30014E966 /* COpenGLParallaxMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF910A484C240014E966 /* COpenGLParallaxMapRenderer.cpp */; }; + 4C53E46E0A4856B30014E966 /* CTRTextureGouraudNoZ2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE60A484C250014E966 /* CTRTextureGouraudNoZ2.cpp */; }; + 4C53E46F0A4856B30014E966 /* CTRTextureGouraudWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE80A484C250014E966 /* CTRTextureGouraudWire.cpp */; }; + 4C53E4700A4856B30014E966 /* CParticlePointEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA10A484C240014E966 /* CParticlePointEmitter.cpp */; }; + 4C53E4710A4856B30014E966 /* CGUIWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF560A484C230014E966 /* CGUIWindow.cpp */; }; + 4C53E4720A4856B30014E966 /* CGUIModalScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF4A0A484C230014E966 /* CGUIModalScreen.cpp */; }; + 4C53E4730A4856B30014E966 /* CImageLoaderPSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF620A484C230014E966 /* CImageLoaderPSD.cpp */; }; + 4C53E4740A4856B30014E966 /* CWaterSurfaceSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFF00A484C250014E966 /* CWaterSurfaceSceneNode.cpp */; }; + 4C53E4750A4856B30014E966 /* CXMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFF80A484C250014E966 /* CXMeshFileLoader.cpp */; }; + 4C53E4760A4856B30014E966 /* CIrrDeviceLinux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF660A484C230014E966 /* CIrrDeviceLinux.cpp */; }; + 4C53E4770A4856B30014E966 /* CLightSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF6C0A484C230014E966 /* CLightSceneNode.cpp */; }; + 4C53E4780A4856B30014E966 /* CTRTextureGouraudAdd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE20A484C250014E966 /* CTRTextureGouraudAdd.cpp */; }; + 4C53E4790A4856B30014E966 /* CTRTextureGouraud2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE10A484C250014E966 /* CTRTextureGouraud2.cpp */; }; + 4C53E47A0A4856B30014E966 /* CSoftwareDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC00A484C240014E966 /* CSoftwareDriver.cpp */; }; + 4C53E47B0A4856B30014E966 /* CTRFlatWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD20A484C240014E966 /* CTRFlatWire.cpp */; }; + 4C53E47C0A4856B30014E966 /* CTRGouraudAlpha2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD50A484C240014E966 /* CTRGouraudAlpha2.cpp */; }; + 4C53E47D0A4856B30014E966 /* CSoftwareTexture2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC60A484C240014E966 /* CSoftwareTexture2.cpp */; }; + 4C53E47E0A4856B30014E966 /* CZipReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E0030A484C250014E966 /* CZipReader.cpp */; }; + 4C53E47F0A4856B30014E966 /* COpenGLNormalMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF8F0A484C240014E966 /* COpenGLNormalMapRenderer.cpp */; }; + 4C53E4800A4856B30014E966 /* CTRTextureLightMap2_M1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEA0A484C250014E966 /* CTRTextureLightMap2_M1.cpp */; }; + 4C53E4810A4856B30014E966 /* CTRTextureLightMap2_M4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEC0A484C250014E966 /* CTRTextureLightMap2_M4.cpp */; }; + 4C53E4820A4856B30014E966 /* CGUISkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF4E0A484C230014E966 /* CGUISkin.cpp */; }; + 4C53E4830A4856B30014E966 /* CD3D8Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF020A484C220014E966 /* CD3D8Driver.cpp */; }; + 4C53E4840A4856B30014E966 /* CIrrDeviceWin32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF6A0A484C230014E966 /* CIrrDeviceWin32.cpp */; }; + 4C53E4850A4856B30014E966 /* CFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF280A484C230014E966 /* CFileSystem.cpp */; }; + 4C53E4860A4856B30014E966 /* CGUIMeshViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF460A484C230014E966 /* CGUIMeshViewer.cpp */; }; + 4C53E4870A4856B30014E966 /* CGUIComboBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF320A484C230014E966 /* CGUIComboBox.cpp */; }; + 4C53E4880A4856B30014E966 /* CSceneNodeAnimatorRotation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB70A484C240014E966 /* CSceneNodeAnimatorRotation.cpp */; }; + 4C53E4890A4856B30014E966 /* CSceneNodeAnimatorTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB90A484C240014E966 /* CSceneNodeAnimatorTexture.cpp */; }; + 4C53E48B0A4856B30014E966 /* CParticleSystemSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA30A484C240014E966 /* CParticleSystemSceneNode.cpp */; }; + 4C53E48C0A4856B30014E966 /* CTerrainSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFCA0A484C240014E966 /* CTerrainSceneNode.cpp */; }; + 4C53E48E0A4856B30014E966 /* CGUIFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF3C0A484C230014E966 /* CGUIFont.cpp */; }; + 4C53E48F0A4856B30014E966 /* CParticleFadeOutAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF9D0A484C240014E966 /* CParticleFadeOutAffector.cpp */; }; + 4C53E4910A4856B30014E966 /* CDummyTransformationSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF220A484C230014E966 /* CDummyTransformationSceneNode.cpp */; }; + 4C53E4920A4856B30014E966 /* CFileList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF260A484C230014E966 /* CFileList.cpp */; }; + 4C53E4930A4856B30014E966 /* CImageLoaderTGA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF640A484C230014E966 /* CImageLoaderTGA.cpp */; }; + 4C53E4940A4856B30014E966 /* CXMLWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFFD0A484C250014E966 /* CXMLWriter.cpp */; }; + 4C53E4950A4856B30014E966 /* CSceneNodeAnimatorFollowSpline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB50A484C240014E966 /* CSceneNodeAnimatorFollowSpline.cpp */; }; + 4C53E4960A4856B30014E966 /* CZBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFFF0A484C250014E966 /* CZBuffer.cpp */; }; + 4C53E4970A4856B30014E966 /* CDMFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF200A484C230014E966 /* CDMFLoader.cpp */; }; + 4C53E4980A4856B30014E966 /* CD3D9Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF180A484C230014E966 /* CD3D9Texture.cpp */; }; + 4C53E4990A4856B30014E966 /* COpenGLShaderMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF930A484C240014E966 /* COpenGLShaderMaterialRenderer.cpp */; }; + 4C53E49A0A4856B30014E966 /* Irrlicht.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E00A0A484C250014E966 /* Irrlicht.cpp */; }; + 4C53E49B0A4856B30014E966 /* CGUIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF360A484C230014E966 /* CGUIEditBox.cpp */; }; + 4C53E49C0A4856B30014E966 /* COpenGLSLMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF950A484C240014E966 /* COpenGLSLMaterialRenderer.cpp */; }; + 4C53E49D0A4856B30014E966 /* CD3D9HLSLMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF0F0A484C230014E966 /* CD3D9HLSLMaterialRenderer.cpp */; }; + 4C53E49E0A4856B30014E966 /* CSoftwareTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC40A484C240014E966 /* CSoftwareTexture.cpp */; }; + 4C53E49F0A4856B30014E966 /* CCubeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF000A484C220014E966 /* CCubeSceneNode.cpp */; }; + 4C53E4A00A4856B30014E966 /* CTriangleBBSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD80A484C240014E966 /* CTriangleBBSelector.cpp */; }; + 4C53E4A10A4856B30014E966 /* CD3D9ShaderMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF160A484C230014E966 /* CD3D9ShaderMaterialRenderer.cpp */; }; + 4C53E4A20A4856B30014E966 /* CD3D8ShaderMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF090A484C230014E966 /* CD3D8ShaderMaterialRenderer.cpp */; }; + 4C53E4A30A4856B30014E966 /* CGUIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF2E0A484C230014E966 /* CGUIButton.cpp */; }; + 4C53E4A40A4856B30014E966 /* CGUIToolBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF540A484C230014E966 /* CGUIToolBar.cpp */; }; + 4C53E4A50A4856B30014E966 /* CDefaultSceneNodeAnimatorFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF1C0A484C230014E966 /* CDefaultSceneNodeAnimatorFactory.cpp */; }; + 4C53E4A60A4856B30014E966 /* CBillboardSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEF20A484C220014E966 /* CBillboardSceneNode.cpp */; }; + 4C53E4A70A4856B30014E966 /* CSceneNodeAnimatorCollisionResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAD0A484C240014E966 /* CSceneNodeAnimatorCollisionResponse.cpp */; }; + 4C53E4A80A4856B30014E966 /* CLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF720A484C230014E966 /* CLogger.cpp */; }; + 4C53E4A90A4856B30014E966 /* CGUIInOutFader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF400A484C230014E966 /* CGUIInOutFader.cpp */; }; + 4C53E4AA0A4856B30014E966 /* CWriteFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFF20A484C250014E966 /* CWriteFile.cpp */; }; + 4C53E4AD0A4856B30014E966 /* CTRTextureGouraud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDF0A484C250014E966 /* CTRTextureGouraud.cpp */; }; + 4C53E4AE0A4856B30014E966 /* CTRFlat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD10A484C240014E966 /* CTRFlat.cpp */; }; + 4C53E4AF0A4856B30014E966 /* CTerrainTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFCC0A484C240014E966 /* CTerrainTriangleSelector.cpp */; }; + 4C53E4B10A4856B30014E966 /* CGUITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF520A484C230014E966 /* CGUITabControl.cpp */; }; + 4C53E4B20A4856B30014E966 /* CParticleBoxEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF9B0A484C240014E966 /* CParticleBoxEmitter.cpp */; }; + 4C53E4B30A4856B30014E966 /* CGUIMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF440A484C230014E966 /* CGUIMenu.cpp */; }; + 4C53E4B40A4856B30014E966 /* CImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF580A484C230014E966 /* CImage.cpp */; }; + 4C53E4B50A4856B30014E966 /* CShadowVolumeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFBB0A484C240014E966 /* CShadowVolumeSceneNode.cpp */; }; + 4C53E4B70A4856B30014E966 /* CGUIEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF380A484C230014E966 /* CGUIEnvironment.cpp */; }; + 4C53E4B80A4856B30014E966 /* CLimitReadFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF6E0A484C230014E966 /* CLimitReadFile.cpp */; }; + 4C53E4B90A4856B30014E966 /* CAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEF00A484C220014E966 /* CAttributes.cpp */; }; + 4C53E4BA0A4856B30014E966 /* COpenGLDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF8C0A484C240014E966 /* COpenGLDriver.cpp */; }; + 4C53E4BB0A4856B30014E966 /* CTRTextureLightMap2_M2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEB0A484C250014E966 /* CTRTextureLightMap2_M2.cpp */; }; + 4C53E4BC0A4856B30014E966 /* CGUIImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF3E0A484C230014E966 /* CGUIImage.cpp */; }; + 4C53E4BD0A4856B30014E966 /* CD3D9NormalMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF120A484C230014E966 /* CD3D9NormalMapRenderer.cpp */; }; + 4C53E4BE0A4856B30014E966 /* CD3D8NormalMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF050A484C220014E966 /* CD3D8NormalMapRenderer.cpp */; }; + 4C53E4BF0A4856B30014E966 /* CMeshCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF760A484C230014E966 /* CMeshCache.cpp */; }; + 4C53E4C00A4856B30014E966 /* CImageLoaderJPG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF5C0A484C230014E966 /* CImageLoaderJPG.cpp */; }; + 4C53E4C10A4856B30014E966 /* CFPSCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF2A0A484C230014E966 /* CFPSCounter.cpp */; }; + 4C53E57E0A4856B30014E966 /* OSXClipboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1670A484C2C0014E966 /* OSXClipboard.mm */; }; + 4C53E57F0A4856B30014E966 /* CIrrDeviceMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E15F0A484C2C0014E966 /* CIrrDeviceMacOSX.mm */; }; + 4C53E5800A4856B30014E966 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E14D0A484C2C0014E966 /* AppDelegate.mm */; }; + 4C6DC9B70A48715A0017A6E5 /* inflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C6DC9B60A48715A0017A6E5 /* inflate.c */; }; + 4CA25BCE0A485EAD00B4E469 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F10A485CD80014E966 /* jcapimin.c */; }; + 4CA25BCF0A485EAD00B4E469 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F20A485CD80014E966 /* jcapistd.c */; }; + 4CA25BD00A485EAD00B4E469 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F30A485CD80014E966 /* jccoefct.c */; }; + 4CA25BD10A485EAD00B4E469 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F40A485CD80014E966 /* jccolor.c */; }; + 4CA25BD20A485EAD00B4E469 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F50A485CD80014E966 /* jcdctmgr.c */; }; + 4CA25BD30A485EAD00B4E469 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F60A485CD80014E966 /* jchuff.c */; }; + 4CA25BD50A485EAD00B4E469 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F80A485CD80014E966 /* jcinit.c */; }; + 4CA25BD60A485EAD00B4E469 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F90A485CD80014E966 /* jcmainct.c */; }; + 4CA25BD70A485EAD00B4E469 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FA0A485CD80014E966 /* jcmarker.c */; }; + 4CA25BD80A485EAD00B4E469 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FB0A485CD80014E966 /* jcmaster.c */; }; + 4CA25BD90A485EAD00B4E469 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FC0A485CD80014E966 /* jcomapi.c */; }; + 4CA25BDB0A485EAD00B4E469 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70A0A485CD80014E966 /* jcparam.c */; }; + 4CA25BDD0A485EAD00B4E469 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70C0A485CD80014E966 /* jcprepct.c */; }; + 4CA25BDE0A485EAD00B4E469 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70D0A485CD80014E966 /* jcsample.c */; }; + 4CA25BDF0A485EAD00B4E469 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70E0A485CD80014E966 /* jctrans.c */; }; + 4CA25BE00A485EAD00B4E469 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70F0A485CD80014E966 /* jdapimin.c */; }; + 4CA25BE10A485EAD00B4E469 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7100A485CD80014E966 /* jdapistd.c */; }; + 4CA25BE20A485EAD00B4E469 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7110A485CD80014E966 /* jdatadst.c */; }; + 4CA25BE30A485EAD00B4E469 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7120A485CD80014E966 /* jdatasrc.c */; }; + 4CA25BE40A485EAD00B4E469 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7130A485CD80014E966 /* jdcoefct.c */; }; + 4CA25BE50A485EAD00B4E469 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7140A485CD80014E966 /* jdcolor.c */; }; + 4CA25BE70A485EAD00B4E469 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7160A485CD80014E966 /* jddctmgr.c */; }; + 4CA25BE80A485EAD00B4E469 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7170A485CD80014E966 /* jdhuff.c */; }; + 4CA25BEA0A485EAD00B4E469 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7190A485CD80014E966 /* jdinput.c */; }; + 4CA25BEB0A485EAD00B4E469 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71A0A485CD80014E966 /* jdmainct.c */; }; + 4CA25BEC0A485EAD00B4E469 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71B0A485CD80014E966 /* jdmarker.c */; }; + 4CA25BED0A485EAD00B4E469 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71C0A485CD80014E966 /* jdmaster.c */; }; + 4CA25BEE0A485EAD00B4E469 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71D0A485CD80014E966 /* jdmerge.c */; }; + 4CA25BF00A485EAD00B4E469 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71F0A485CD80014E966 /* jdpostct.c */; }; + 4CA25BF10A485EAD00B4E469 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7200A485CD80014E966 /* jdsample.c */; }; + 4CA25BF20A485EAD00B4E469 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7210A485CD80014E966 /* jdtrans.c */; }; + 4CA25BF30A485EAD00B4E469 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7220A485CD80014E966 /* jerror.c */; }; + 4CA25BF50A485EAD00B4E469 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7240A485CD80014E966 /* jfdctflt.c */; }; + 4CA25BF60A485EAD00B4E469 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7250A485CD80014E966 /* jfdctfst.c */; }; + 4CA25BF70A485EAD00B4E469 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7260A485CD80014E966 /* jfdctint.c */; }; + 4CA25BF80A485EAD00B4E469 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7270A485CD80014E966 /* jidctflt.c */; }; + 4CA25BF90A485EAD00B4E469 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7280A485CD80014E966 /* jidctfst.c */; }; + 4CA25BFA0A485EAD00B4E469 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7290A485CD80014E966 /* jidctint.c */; }; + 4CA25C000A485EAD00B4E469 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7300A485CD80014E966 /* jmemmgr.c */; }; + 4CA25C020A485EAD00B4E469 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7320A485CD80014E966 /* jmemnobs.c */; }; + 4CA25C080A485EAD00B4E469 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7390A485CD80014E966 /* jquant1.c */; }; + 4CA25C090A485EAD00B4E469 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73A0A485CD80014E966 /* jquant2.c */; }; + 4CA25C0A0A485EAD00B4E469 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73B0A485CD80014E966 /* jutils.c */; }; + 4CA25C350A4860EE00B4E469 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00547D0A48470500C844C2 /* main.cpp */; }; + 4CA25C360A48610400B4E469 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA25C520A48618800B4E469 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA25C560A4861AE00B4E469 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA25C690A4861D100B4E469 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054830A48470500C844C2 /* main.cpp */; }; + 4CA25C6A0A4861D800B4E469 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA25C8B0A48626600B4E469 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA25C8C0A48627600B4E469 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054890A48470500C844C2 /* main.cpp */; }; + 4CA25C8D0A48628200B4E469 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA5CBA70A4869C600ADB3D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA5CBA90A4869DD00ADB3D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA5CBAE0A4869E600ADB3D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054A30A48470500C844C2 /* main.cpp */; }; + 4CA5CBAF0A4869F300ADB3D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA5CBB00A4869FD00ADB3D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054AA0A48470500C844C2 /* main.cpp */; }; + 4CA5CBB10A486A0200ADB3D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA5CBB20A486A0D00ADB3D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054B00A48470500C844C2 /* main.cpp */; }; + 4CA5CBB30A486A1300ADB3D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA5CBB40A486A1600ADB3D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA5CBB50A486A1F00ADB3D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054B60A48470500C844C2 /* main.cpp */; }; + 4CA5CBB60A486A2200ADB3D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA5CBB70A486A2500ADB3D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA5CBB80A486A2E00ADB3D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054BC0A48470500C844C2 /* main.cpp */; }; + 4CA5CBB90A486A3100ADB3D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA5CBBA0A486A3A00ADB3D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CA5CBBB0A486A4C00ADB3D7 /* CMainMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054C70A48470500C844C2 /* CMainMenu.cpp */; }; + 4CA5CBBC0A486A4C00ADB3D7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054CA0A48470500C844C2 /* main.cpp */; }; + 4CA5CBBD0A486A4C00ADB3D7 /* CDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054C50A48470500C844C2 /* CDemo.cpp */; }; + 4CA5CBBE0A486A4F00ADB3D7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CA5CBBF0A486A5700ADB3D7 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CC36B0F0A6B61DB0076C4B2 /* CSphereSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC36B0D0A6B61DB0076C4B2 /* CSphereSceneNode.cpp */; }; + 4CF146F50A486648006EBA03 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CF146F60A486651006EBA03 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CF146F70A486668006EBA03 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00548F0A48470500C844C2 /* main.cpp */; }; + 4CF1470A0A4866FA006EBA03 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CF1470B0A486704006EBA03 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CF147100A486709006EBA03 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0054950A48470500C844C2 /* main.cpp */; }; + 4CF147180A48676A006EBA03 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4C53E1650A484C2C0014E966 /* MainMenu.nib */; }; + 4CF147190A48676E006EBA03 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; }; + 4CF1471A0A486774006EBA03 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00549B0A48470500C844C2 /* main.cpp */; }; + 4CFA7BEE0A88735A00B03626 /* CImageLoaderBMP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BDC0A88735900B03626 /* CImageLoaderBMP.cpp */; }; + 4CFA7BF00A88735A00B03626 /* CImageWriterBMP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BDE0A88735900B03626 /* CImageWriterBMP.cpp */; }; + 4CFA7BF20A88735A00B03626 /* CImageWriterJPG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE00A88735900B03626 /* CImageWriterJPG.cpp */; }; + 4CFA7BF40A88735A00B03626 /* CImageWriterPCX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE20A88735900B03626 /* CImageWriterPCX.cpp */; }; + 4CFA7BF60A88735A00B03626 /* CImageWriterPNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE40A88735900B03626 /* CImageWriterPNG.cpp */; }; + 4CFA7BF80A88735A00B03626 /* CImageWriterPPM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE60A88735900B03626 /* CImageWriterPPM.cpp */; }; + 4CFA7BFA0A88735A00B03626 /* CImageWriterPSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE80A88735900B03626 /* CImageWriterPSD.cpp */; }; + 4CFA7BFC0A88735A00B03626 /* CImageWriterTGA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BEA0A88735900B03626 /* CImageWriterTGA.cpp */; }; + 4CFA7BFE0A88735A00B03626 /* CSkyDomeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BEC0A88735A00B03626 /* CSkyDomeSceneNode.cpp */; }; + 5DD4804E0C7D91DF00728AA9 /* CDepthBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4804C0C7D91DF00728AA9 /* CDepthBuffer.cpp */; }; + 5DD4804F0C7D91DF00728AA9 /* CDepthBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD4804D0C7D91DF00728AA9 /* CDepthBuffer.h */; }; + 5DD480520C7D936700728AA9 /* IBurningShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480500C7D936700728AA9 /* IBurningShader.cpp */; }; + 5DD480530C7D936700728AA9 /* IBurningShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480510C7D936700728AA9 /* IBurningShader.h */; }; + 5DD480550C7D93AB00728AA9 /* IDepthBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480540C7D93AB00728AA9 /* IDepthBuffer.h */; }; + 5DD4805A0C7D945800728AA9 /* CAnimatedMeshMD3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480560C7D945800728AA9 /* CAnimatedMeshMD3.cpp */; }; + 5DD4805B0C7D945800728AA9 /* CAnimatedMeshMD3.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480570C7D945800728AA9 /* CAnimatedMeshMD3.h */; }; + 5DD4805C0C7D945800728AA9 /* CDefaultGUIElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480580C7D945800728AA9 /* CDefaultGUIElementFactory.cpp */; }; + 5DD4805D0C7D945800728AA9 /* CDefaultGUIElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480590C7D945800728AA9 /* CDefaultGUIElementFactory.h */; }; + 5DD480640C7D947B00728AA9 /* CGUIColorSelectDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4805E0C7D947B00728AA9 /* CGUIColorSelectDialog.cpp */; }; + 5DD480650C7D947B00728AA9 /* CGUIColorSelectDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD4805F0C7D947B00728AA9 /* CGUIColorSelectDialog.h */; }; + 5DD480660C7D947B00728AA9 /* CGUISpinBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480600C7D947B00728AA9 /* CGUISpinBox.cpp */; }; + 5DD480670C7D947B00728AA9 /* CGUISpinBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480610C7D947B00728AA9 /* CGUISpinBox.h */; }; + 5DD480680C7D947B00728AA9 /* CGUISpriteBank.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480620C7D947B00728AA9 /* CGUISpriteBank.cpp */; }; + 5DD480690C7D947B00728AA9 /* CGUISpriteBank.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480630C7D947B00728AA9 /* CGUISpriteBank.h */; }; + 5DD480710C7D94AC00728AA9 /* CQuake3ShaderSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806A0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.cpp */; }; + 5DD480720C7D94AC00728AA9 /* CQuake3ShaderSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD4806B0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.h */; }; + 5DD480730C7D94AC00728AA9 /* CTRTextureBlend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806C0C7D94AC00728AA9 /* CTRTextureBlend.cpp */; }; + 5DD480740C7D94AC00728AA9 /* CTRTextureGouraudAlpha.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806D0C7D94AC00728AA9 /* CTRTextureGouraudAlpha.cpp */; }; + 5DD480750C7D94AC00728AA9 /* CTRTextureGouraudAlphaNoZ.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806E0C7D94AC00728AA9 /* CTRTextureGouraudAlphaNoZ.cpp */; }; + 5DD480760C7D94AC00728AA9 /* CTRTextureLightMapGouraud2_M4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806F0C7D94AC00728AA9 /* CTRTextureLightMapGouraud2_M4.cpp */; }; + 5DD480770C7D94AC00728AA9 /* glxext.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480700C7D94AC00728AA9 /* glxext.h */; }; + 5DD480C70C7DA66800728AA9 /* COpenGLExtensionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480C10C7DA66800728AA9 /* COpenGLExtensionHandler.h */; }; + 5DD480C80C7DA66800728AA9 /* CMD3MeshFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480C20C7DA66800728AA9 /* CMD3MeshFileLoader.h */; }; + 5DD480C90C7DA66800728AA9 /* CIrrDeviceSDL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DD480C30C7DA66800728AA9 /* CIrrDeviceSDL.h */; }; + 5DD480CA0C7DA66800728AA9 /* CIrrDeviceSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C40C7DA66800728AA9 /* CIrrDeviceSDL.cpp */; }; + 5DD480CB0C7DA66800728AA9 /* COpenGLExtensionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C50C7DA66800728AA9 /* COpenGLExtensionHandler.cpp */; }; + 5DD480CC0C7DA66800728AA9 /* CMD3MeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C60C7DA66800728AA9 /* CMD3MeshFileLoader.cpp */; }; + 95154774133CD9DA008D792F /* aabbox3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0A0A88742800B03626 /* aabbox3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154775133CD9DA008D792F /* CMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FD0D1F64B300D46B04 /* CMeshBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154776133CD9DA008D792F /* coreutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FE0D1F64B300D46B04 /* coreutil.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154777133CD9DA008D792F /* dimension2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0B0A88742800B03626 /* dimension2d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154778133CD9DA008D792F /* ECullingTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910B9FF0D1F64B300D46B04 /* ECullingTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154779133CD9DA008D792F /* EDebugSceneTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA000D1F64B300D46B04 /* EDebugSceneTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515477A133CD9DA008D792F /* EDriverFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA010D1F64B300D46B04 /* EDriverFeatures.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515477B133CD9DA008D792F /* EDriverTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0C0A88742800B03626 /* EDriverTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515477C133CD9DA008D792F /* EGUIAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA020D1F64B300D46B04 /* EGUIAlignment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515477D133CD9DA008D792F /* EGUIElementTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0D0A88742800B03626 /* EGUIElementTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515477E133CD9DA008D792F /* EHardwareBufferFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA030D1F64B300D46B04 /* EHardwareBufferFlags.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515477F133CD9DA008D792F /* EMaterialFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA040D1F64B300D46B04 /* EMaterialFlags.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154780133CD9DA008D792F /* EMaterialTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA050D1F64B300D46B04 /* EMaterialTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154781133CD9DA008D792F /* EMeshWriterEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA060D1F64B300D46B04 /* EMeshWriterEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154782133CD9DA008D792F /* EMessageBoxFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA070D1F64B300D46B04 /* EMessageBoxFlags.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154783133CD9DA008D792F /* ESceneNodeAnimatorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0E0A88742800B03626 /* ESceneNodeAnimatorTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154784133CD9DA008D792F /* ESceneNodeTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C0F0A88742800B03626 /* ESceneNodeTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154785133CD9DA008D792F /* ETerrainElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA080D1F64B300D46B04 /* ETerrainElements.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154786133CD9DA008D792F /* heapsort.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C100A88742800B03626 /* heapsort.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154787133CD9DA008D792F /* IAnimatedMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C110A88742900B03626 /* IAnimatedMesh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154788133CD9DA008D792F /* IAnimatedMeshMD2.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C130A88742900B03626 /* IAnimatedMeshMD2.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154789133CD9DA008D792F /* IAnimatedMeshMD3.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA090D1F64B300D46B04 /* IAnimatedMeshMD3.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515478A133CD9DA008D792F /* IAnimatedMeshSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C150A88742900B03626 /* IAnimatedMeshSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515478B133CD9DA008D792F /* IAttributeExchangingObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C170A88742900B03626 /* IAttributeExchangingObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515478C133CD9DA008D792F /* IAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C180A88742900B03626 /* IAttributes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515478D133CD9DA008D792F /* IBillboardSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C190A88742900B03626 /* IBillboardSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515478E133CD9DA008D792F /* IBoneSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0A0D1F64B300D46B04 /* IBoneSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515478F133CD9DA008D792F /* ICameraSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C1A0A88742900B03626 /* ICameraSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154790133CD9DA008D792F /* ICursorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C1B0A88742900B03626 /* ICursorControl.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154791133CD9DA008D792F /* IDummyTransformationSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C1C0A88742900B03626 /* IDummyTransformationSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154792133CD9DA008D792F /* IEventReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C1D0A88742900B03626 /* IEventReceiver.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154793133CD9DA008D792F /* IFileList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C1E0A88742900B03626 /* IFileList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154794133CD9DA008D792F /* IFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C1F0A88742900B03626 /* IFileSystem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154795133CD9DA008D792F /* IGPUProgrammingServices.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C200A88742900B03626 /* IGPUProgrammingServices.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154796133CD9DA008D792F /* IGUIButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C210A88742900B03626 /* IGUIButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154797133CD9DA008D792F /* IGUICheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C220A88742900B03626 /* IGUICheckBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154798133CD9DA008D792F /* IGUIColorSelectDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0B0D1F64B300D46B04 /* IGUIColorSelectDialog.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154799133CD9DA008D792F /* IGUIComboBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C230A88742900B03626 /* IGUIComboBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515479A133CD9DA008D792F /* IGUIContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C240A88742900B03626 /* IGUIContextMenu.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515479B133CD9DA008D792F /* IGUIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C250A88742900B03626 /* IGUIEditBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515479C133CD9DA008D792F /* IGUIElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C260A88742900B03626 /* IGUIElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515479D133CD9DA008D792F /* IGUIElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0C0D1F64B300D46B04 /* IGUIElementFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515479E133CD9DA008D792F /* IGUIEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C270A88742900B03626 /* IGUIEnvironment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515479F133CD9DA008D792F /* IGUIFileOpenDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C280A88742900B03626 /* IGUIFileOpenDialog.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A0133CD9DA008D792F /* IGUIFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C290A88742900B03626 /* IGUIFont.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A1133CD9DA008D792F /* IGUIFontBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0D0D1F64B300D46B04 /* IGUIFontBitmap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A2133CD9DA008D792F /* IGUIImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C2A0A88742900B03626 /* IGUIImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A3133CD9DA008D792F /* IGUIInOutFader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C2B0A88742900B03626 /* IGUIInOutFader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A4133CD9DA008D792F /* IGUIListBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C2C0A88742900B03626 /* IGUIListBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A5133CD9DA008D792F /* IGUIMeshViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C2D0A88742900B03626 /* IGUIMeshViewer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A6133CD9DA008D792F /* IGUIScrollBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C2E0A88742900B03626 /* IGUIScrollBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A7133CD9DA008D792F /* IGUISkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C2F0A88742900B03626 /* IGUISkin.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A8133CD9DA008D792F /* IGUISpinBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0E0D1F64B300D46B04 /* IGUISpinBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547A9133CD9DA008D792F /* IGUISpriteBank.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA0F0D1F64B300D46B04 /* IGUISpriteBank.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547AA133CD9DA008D792F /* IGUIStaticText.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C300A88742900B03626 /* IGUIStaticText.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547AB133CD9DA008D792F /* IGUITabControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C310A88742900B03626 /* IGUITabControl.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547AC133CD9DA008D792F /* IGUITable.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA100D1F64B300D46B04 /* IGUITable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547AD133CD9DA008D792F /* IGUIToolbar.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C320A88742900B03626 /* IGUIToolbar.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547AE133CD9DA008D792F /* IGUIWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C330A88742900B03626 /* IGUIWindow.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547AF133CD9DA008D792F /* IImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C340A88742900B03626 /* IImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B0133CD9DA008D792F /* IImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C350A88742900B03626 /* IImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B1133CD9DA008D792F /* IImageWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C360A88742900B03626 /* IImageWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B2133CD9DA008D792F /* ILightSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C370A88742900B03626 /* ILightSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B3133CD9DA008D792F /* ILogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C380A88742900B03626 /* ILogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B4133CD9DA008D792F /* IMaterialRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C390A88742900B03626 /* IMaterialRenderer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B5133CD9DA008D792F /* IMaterialRendererServices.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C3A0A88742900B03626 /* IMaterialRendererServices.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B6133CD9DA008D792F /* IMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C3B0A88742900B03626 /* IMesh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B7133CD9DA008D792F /* IMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C3C0A88742900B03626 /* IMeshBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B8133CD9DA008D792F /* IMeshCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C3D0A88742900B03626 /* IMeshCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547B9133CD9DA008D792F /* IMeshLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C3E0A88742900B03626 /* IMeshLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547BA133CD9DA008D792F /* IMeshManipulator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C3F0A88742900B03626 /* IMeshManipulator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547BB133CD9DA008D792F /* IMeshSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C400A88742900B03626 /* IMeshSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547BC133CD9DA008D792F /* IMeshWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA110D1F64B300D46B04 /* IMeshWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547BD133CD9DA008D792F /* IMetaTriangleSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C410A88742900B03626 /* IMetaTriangleSelector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547BE133CD9DA008D792F /* IOSOperator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C420A88742900B03626 /* IOSOperator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547BF133CD9DA008D792F /* IParticleAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C430A88742900B03626 /* IParticleAffector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C0133CD9DA008D792F /* IParticleAnimatedMeshSceneNodeEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA120D1F64B300D46B04 /* IParticleAnimatedMeshSceneNodeEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C1133CD9DA008D792F /* IParticleAttractionAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA130D1F64B300D46B04 /* IParticleAttractionAffector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C2133CD9DA008D792F /* IParticleBoxEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA140D1F64B300D46B04 /* IParticleBoxEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C3133CD9DA008D792F /* IParticleCylinderEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA150D1F64B300D46B04 /* IParticleCylinderEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C4133CD9DA008D792F /* IParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C440A88742900B03626 /* IParticleEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C5133CD9DA008D792F /* IParticleFadeOutAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA160D1F64B300D46B04 /* IParticleFadeOutAffector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C6133CD9DA008D792F /* IParticleGravityAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA170D1F64B300D46B04 /* IParticleGravityAffector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C7133CD9DA008D792F /* IParticleMeshEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA180D1F64B300D46B04 /* IParticleMeshEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C8133CD9DA008D792F /* IParticleRingEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA190D1F64B300D46B04 /* IParticleRingEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547C9133CD9DA008D792F /* IParticleRotationAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1A0D1F64B300D46B04 /* IParticleRotationAffector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547CA133CD9DA008D792F /* IParticleSphereEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1B0D1F64B300D46B04 /* IParticleSphereEmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547CB133CD9DA008D792F /* IParticleSystemSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C450A88742900B03626 /* IParticleSystemSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547CC133CD9DA008D792F /* IQ3LevelMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C460A88742900B03626 /* IQ3LevelMesh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547CD133CD9DA008D792F /* IQ3Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1C0D1F64B300D46B04 /* IQ3Shader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547CE133CD9DA008D792F /* IReadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C470A88742900B03626 /* IReadFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547CF133CD9DA008D792F /* IReferenceCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1D0D1F64B300D46B04 /* IReferenceCounted.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D0133CD9DA008D792F /* irrAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C480A88742900B03626 /* irrAllocator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D1133CD9DA008D792F /* irrArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C490A88742900B03626 /* irrArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D2133CD9DA008D792F /* IrrCompileConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C4A0A88742900B03626 /* IrrCompileConfig.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D3133CD9DA008D792F /* irrlicht.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C4B0A88742900B03626 /* irrlicht.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D4133CD9DA008D792F /* IrrlichtDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C4C0A88742900B03626 /* IrrlichtDevice.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D5133CD9DA008D792F /* irrList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C4D0A88742900B03626 /* irrList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D6133CD9DA008D792F /* irrMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1E0D1F64B300D46B04 /* irrMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D7133CD9DA008D792F /* irrMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C4E0A88742900B03626 /* irrMath.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D8133CD9DA008D792F /* irrString.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C4F0A88742900B03626 /* irrString.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547D9133CD9DA008D792F /* irrTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C500A88742900B03626 /* irrTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547DA133CD9DA008D792F /* irrXML.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C510A88742900B03626 /* irrXML.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547DB133CD9DA008D792F /* ISceneCollisionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C520A88742900B03626 /* ISceneCollisionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547DC133CD9DA008D792F /* ISceneManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C530A88742900B03626 /* ISceneManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547DD133CD9DA008D792F /* ISceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C540A88742900B03626 /* ISceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547DE133CD9DA008D792F /* ISceneNodeAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C550A88742900B03626 /* ISceneNodeAnimator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547DF133CD9DA008D792F /* ISceneNodeAnimatorCollisionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C560A88742900B03626 /* ISceneNodeAnimatorCollisionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E0133CD9DA008D792F /* ISceneNodeAnimatorFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C570A88742900B03626 /* ISceneNodeAnimatorFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E1133CD9DA008D792F /* ISceneNodeFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C580A88742900B03626 /* ISceneNodeFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E2133CD9DA008D792F /* ISceneUserDataSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C590A88742900B03626 /* ISceneUserDataSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E3133CD9DA008D792F /* IShaderConstantSetCallBack.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C5A0A88742900B03626 /* IShaderConstantSetCallBack.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E4133CD9DA008D792F /* IShadowVolumeSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C5B0A88742900B03626 /* IShadowVolumeSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E5133CD9DA008D792F /* ISkinnedMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA1F0D1F64B300D46B04 /* ISkinnedMesh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E6133CD9DA008D792F /* ITerrainSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C5C0A88742900B03626 /* ITerrainSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E7133CD9DA008D792F /* ITextSceneNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C5D0A88742900B03626 /* ITextSceneNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E8133CD9DA008D792F /* ITexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C5E0A88742900B03626 /* ITexture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547E9133CD9DA008D792F /* ITimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C5F0A88742900B03626 /* ITimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547EA133CD9DA008D792F /* ITriangleSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C600A88742900B03626 /* ITriangleSelector.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547EB133CD9DA008D792F /* IVideoDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C620A88742900B03626 /* IVideoDriver.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547EC133CD9DA008D792F /* IVideoModeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C630A88742900B03626 /* IVideoModeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547ED133CD9DA008D792F /* IWriteFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C640A88742900B03626 /* IWriteFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547EE133CD9DA008D792F /* IXMLReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C650A88742900B03626 /* IXMLReader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547EF133CD9DA008D792F /* IXMLWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C660A88742900B03626 /* IXMLWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F0133CD9DA008D792F /* Keycodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C670A88742900B03626 /* Keycodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F1133CD9DA008D792F /* line2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C680A88742900B03626 /* line2d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F2133CD9DA008D792F /* line3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C690A88742900B03626 /* line3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F3133CD9DA008D792F /* matrix4.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C6A0A88742900B03626 /* matrix4.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F4133CD9DA008D792F /* plane3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C6B0A88742900B03626 /* plane3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F5133CD9DA008D792F /* position2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C6C0A88742900B03626 /* position2d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F6133CD9DA008D792F /* quaternion.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C6D0A88742900B03626 /* quaternion.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F7133CD9DA008D792F /* rect.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C6E0A88742900B03626 /* rect.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F8133CD9DA008D792F /* S3DVertex.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C6F0A88742900B03626 /* S3DVertex.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547F9133CD9DA008D792F /* SAnimatedMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C700A88742900B03626 /* SAnimatedMesh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547FA133CD9DA008D792F /* SceneParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C710A88742900B03626 /* SceneParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547FB133CD9DA008D792F /* SColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C720A88742900B03626 /* SColor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547FC133CD9DA008D792F /* SExposedVideoData.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C730A88742900B03626 /* SExposedVideoData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547FD133CD9DA008D792F /* SIrrCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C740A88742900B03626 /* SIrrCreationParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547FE133CD9DA008D792F /* SKeyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C750A88742900B03626 /* SKeyMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 951547FF133CD9DA008D792F /* SLight.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C760A88742900B03626 /* SLight.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154800133CD9DA008D792F /* SMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C770A88742900B03626 /* SMaterial.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154801133CD9DA008D792F /* SMaterialLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA200D1F64B300D46B04 /* SMaterialLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154802133CD9DA008D792F /* SMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C780A88742900B03626 /* SMesh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154803133CD9DA008D792F /* SMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C790A88742900B03626 /* SMeshBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154804133CD9DA008D792F /* SMeshBufferLightMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7A0A88742900B03626 /* SMeshBufferLightMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154805133CD9DA008D792F /* SMeshBufferTangents.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7B0A88742900B03626 /* SMeshBufferTangents.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154806133CD9DA008D792F /* SParticle.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7C0A88742900B03626 /* SParticle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154807133CD9DA008D792F /* SSharedMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA210D1F64B300D46B04 /* SSharedMeshBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154808133CD9DA008D792F /* SSkinMeshBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA220D1F64B300D46B04 /* SSkinMeshBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95154809133CD9DA008D792F /* SViewFrustum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0910BA230D1F64B300D46B04 /* SViewFrustum.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515480A133CD9DA008D792F /* triangle3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7E0A88742900B03626 /* triangle3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515480B133CD9DA008D792F /* vector2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C7F0A88742900B03626 /* vector2d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9515480C133CD9DA008D792F /* vector3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CFA7C800A88742900B03626 /* vector3d.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 959729E912C192DA00BF73D3 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F10A485CD80014E966 /* jcapimin.c */; }; + 959729EA12C192DA00BF73D3 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F20A485CD80014E966 /* jcapistd.c */; }; + 959729EB12C192DA00BF73D3 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F30A485CD80014E966 /* jccoefct.c */; }; + 959729EC12C192DA00BF73D3 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F40A485CD80014E966 /* jccolor.c */; }; + 959729ED12C192DA00BF73D3 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F50A485CD80014E966 /* jcdctmgr.c */; }; + 959729EE12C192DA00BF73D3 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F60A485CD80014E966 /* jchuff.c */; }; + 959729EF12C192DA00BF73D3 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F80A485CD80014E966 /* jcinit.c */; }; + 959729F012C192DA00BF73D3 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6F90A485CD80014E966 /* jcmainct.c */; }; + 959729F112C192DA00BF73D3 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FA0A485CD80014E966 /* jcmarker.c */; }; + 959729F212C192DA00BF73D3 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FB0A485CD80014E966 /* jcmaster.c */; }; + 959729F312C192DA00BF73D3 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E6FC0A485CD80014E966 /* jcomapi.c */; }; + 959729F412C192DA00BF73D3 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70A0A485CD80014E966 /* jcparam.c */; }; + 959729F512C192DA00BF73D3 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70C0A485CD80014E966 /* jcprepct.c */; }; + 959729F612C192DA00BF73D3 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70D0A485CD80014E966 /* jcsample.c */; }; + 959729F712C192DA00BF73D3 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70E0A485CD80014E966 /* jctrans.c */; }; + 959729F812C192DA00BF73D3 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E70F0A485CD80014E966 /* jdapimin.c */; }; + 959729F912C192DA00BF73D3 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7100A485CD80014E966 /* jdapistd.c */; }; + 959729FA12C192DA00BF73D3 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7110A485CD80014E966 /* jdatadst.c */; }; + 959729FB12C192DA00BF73D3 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7120A485CD80014E966 /* jdatasrc.c */; }; + 959729FC12C192DA00BF73D3 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7130A485CD80014E966 /* jdcoefct.c */; }; + 959729FD12C192DA00BF73D3 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7140A485CD80014E966 /* jdcolor.c */; }; + 959729FE12C192DA00BF73D3 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7160A485CD80014E966 /* jddctmgr.c */; }; + 959729FF12C192DA00BF73D3 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7170A485CD80014E966 /* jdhuff.c */; }; + 95972A0012C192DA00BF73D3 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7190A485CD80014E966 /* jdinput.c */; }; + 95972A0112C192DA00BF73D3 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71A0A485CD80014E966 /* jdmainct.c */; }; + 95972A0212C192DA00BF73D3 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71B0A485CD80014E966 /* jdmarker.c */; }; + 95972A0312C192DA00BF73D3 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71C0A485CD80014E966 /* jdmaster.c */; }; + 95972A0412C192DA00BF73D3 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71D0A485CD80014E966 /* jdmerge.c */; }; + 95972A0512C192DA00BF73D3 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E71F0A485CD80014E966 /* jdpostct.c */; }; + 95972A0612C192DA00BF73D3 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7200A485CD80014E966 /* jdsample.c */; }; + 95972A0712C192DA00BF73D3 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7210A485CD80014E966 /* jdtrans.c */; }; + 95972A0812C192DA00BF73D3 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7220A485CD80014E966 /* jerror.c */; }; + 95972A0912C192DA00BF73D3 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7240A485CD80014E966 /* jfdctflt.c */; }; + 95972A0A12C192DA00BF73D3 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7250A485CD80014E966 /* jfdctfst.c */; }; + 95972A0B12C192DA00BF73D3 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7260A485CD80014E966 /* jfdctint.c */; }; + 95972A0C12C192DA00BF73D3 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7270A485CD80014E966 /* jidctflt.c */; }; + 95972A0D12C192DA00BF73D3 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7280A485CD80014E966 /* jidctfst.c */; }; + 95972A0E12C192DA00BF73D3 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7290A485CD80014E966 /* jidctint.c */; }; + 95972A0F12C192DA00BF73D3 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7300A485CD80014E966 /* jmemmgr.c */; }; + 95972A1012C192DA00BF73D3 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7320A485CD80014E966 /* jmemnobs.c */; }; + 95972A1112C192DA00BF73D3 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E7390A485CD80014E966 /* jquant1.c */; }; + 95972A1212C192DA00BF73D3 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73A0A485CD80014E966 /* jquant2.c */; }; + 95972A1312C192DA00BF73D3 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E73B0A485CD80014E966 /* jutils.c */; }; + 95972A2212C192DA00BF73D3 /* inffast.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1800A484C2C0014E966 /* inffast.c */; }; + 95972A2312C192DA00BF73D3 /* inftrees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1850A484C2C0014E966 /* inftrees.c */; }; + 95972A2412C192DA00BF73D3 /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18D0A484C2C0014E966 /* uncompr.c */; }; + 95972A2512C192DA00BF73D3 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1750A484C2C0014E966 /* compress.c */; }; + 95972A2612C192DA00BF73D3 /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1770A484C2C0014E966 /* crc32.c */; }; + 95972A2712C192DA00BF73D3 /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1920A484C2C0014E966 /* zutil.c */; }; + 95972A2812C192DA00BF73D3 /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E18B0A484C2C0014E966 /* trees.c */; }; + 95972A2912C192DA00BF73D3 /* deflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1790A484C2C0014E966 /* deflate.c */; }; + 95972A2A12C192DA00BF73D3 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1720A484C2C0014E966 /* adler32.c */; }; + 95972A2B12C192DA00BF73D3 /* CImageLoaderPNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF600A484C230014E966 /* CImageLoaderPNG.cpp */; }; + 95972A2C12C192DA00BF73D3 /* CColorConverter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFC0A484C220014E966 /* CColorConverter.cpp */; }; + 95972A2D12C192DA00BF73D3 /* CSceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAB0A484C240014E966 /* CSceneManager.cpp */; }; + 95972A2E12C192DA00BF73D3 /* CTRTextureGouraudAdd2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE30A484C250014E966 /* CTRTextureGouraudAdd2.cpp */; }; + 95972A2F12C192DA00BF73D3 /* CNullDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF820A484C240014E966 /* CNullDriver.cpp */; }; + 95972A3012C192DA00BF73D3 /* CCSMLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFE0A484C220014E966 /* CCSMLoader.cpp */; }; + 95972A3112C192DA00BF73D3 /* irrXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E00E0A484C250014E966 /* irrXML.cpp */; }; + 95972A3212C192DA00BF73D3 /* CGUIListBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF420A484C230014E966 /* CGUIListBox.cpp */; }; + 95972A3312C192DA00BF73D3 /* CTRGouraudWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD70A484C240014E966 /* CTRGouraudWire.cpp */; }; + 95972A3412C192DA00BF73D3 /* CIrrDeviceStub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF680A484C230014E966 /* CIrrDeviceStub.cpp */; }; + 95972A3512C192DA00BF73D3 /* CGUIMessageBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF480A484C230014E966 /* CGUIMessageBox.cpp */; }; + 95972A3612C192DA00BF73D3 /* CMeshSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF7A0A484C230014E966 /* CMeshSceneNode.cpp */; }; + 95972A3712C192DA00BF73D3 /* CGUIStaticText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF500A484C230014E966 /* CGUIStaticText.cpp */; }; + 95972A3812C192DA00BF73D3 /* os.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E16A0A484C2C0014E966 /* os.cpp */; }; + 95972A3912C192DA00BF73D3 /* COCTLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF840A484C240014E966 /* COCTLoader.cpp */; }; + 95972A3A12C192DA00BF73D3 /* CGUIContextMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF340A484C230014E966 /* CGUIContextMenu.cpp */; }; + 95972A3B12C192DA00BF73D3 /* CSceneNodeAnimatorFlyCircle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB10A484C240014E966 /* CSceneNodeAnimatorFlyCircle.cpp */; }; + 95972A3C12C192DA00BF73D3 /* CDefaultSceneNodeFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF1E0A484C230014E966 /* CDefaultSceneNodeFactory.cpp */; }; + 95972A3D12C192DA00BF73D3 /* CD3D9Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF0D0A484C230014E966 /* CD3D9Driver.cpp */; }; + 95972A3E12C192DA00BF73D3 /* CTRGouraud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD30A484C240014E966 /* CTRGouraud.cpp */; }; + 95972A3F12C192DA00BF73D3 /* C3DSMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEE70A484C220014E966 /* C3DSMeshFileLoader.cpp */; }; + 95972A4012C192DA00BF73D3 /* COgreMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF8A0A484C240014E966 /* COgreMeshFileLoader.cpp */; }; + 95972A4112C192DA00BF73D3 /* CMY3DMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF7F0A484C230014E966 /* CMY3DMeshFileLoader.cpp */; }; + 95972A4212C192DA00BF73D3 /* CLMTSMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF700A484C230014E966 /* CLMTSMeshFileLoader.cpp */; }; + 95972A4312C192DA00BF73D3 /* CGUIFileOpenDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF3A0A484C230014E966 /* CGUIFileOpenDialog.cpp */; }; + 95972A4412C192DA00BF73D3 /* CSceneNodeAnimatorDelete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAF0A484C240014E966 /* CSceneNodeAnimatorDelete.cpp */; }; + 95972A4512C192DA00BF73D3 /* CTRGouraudAlphaNoZ2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD60A484C240014E966 /* CTRGouraudAlphaNoZ2.cpp */; }; + 95972A4612C192DA00BF73D3 /* CGeometryCreator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF2C0A484C230014E966 /* CGeometryCreator.cpp */; }; + 95972A4712C192DA00BF73D3 /* CD3D8Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF0B0A484C230014E966 /* CD3D8Texture.cpp */; }; + 95972A4812C192DA00BF73D3 /* CSkyBoxSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFBD0A484C240014E966 /* CSkyBoxSceneNode.cpp */; }; + 95972A4912C192DA00BF73D3 /* CMeshManipulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF780A484C230014E966 /* CMeshManipulator.cpp */; }; + 95972A4A12C192DA00BF73D3 /* CTextSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFCE0A484C240014E966 /* CTextSceneNode.cpp */; }; + 95972A4B12C192DA00BF73D3 /* CTRTextureDetailMap2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDC0A484C250014E966 /* CTRTextureDetailMap2.cpp */; }; + 95972A4C12C192DA00BF73D3 /* CTRTextureGouraudAddNoZ2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE40A484C250014E966 /* CTRTextureGouraudAddNoZ2.cpp */; }; + 95972A4D12C192DA00BF73D3 /* CTRTextureGouraudNoZ.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE50A484C250014E966 /* CTRTextureGouraudNoZ.cpp */; }; + 95972A4E12C192DA00BF73D3 /* CGUIScrollBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF4C0A484C230014E966 /* CGUIScrollBar.cpp */; }; + 95972A4F12C192DA00BF73D3 /* CSceneCollisionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA90A484C240014E966 /* CSceneCollisionManager.cpp */; }; + 95972A5012C192DA00BF73D3 /* CGUICheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF300A484C230014E966 /* CGUICheckBox.cpp */; }; + 95972A5112C192DA00BF73D3 /* CQ3LevelMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA50A484C240014E966 /* CQ3LevelMesh.cpp */; }; + 95972A5212C192DA00BF73D3 /* CParticleGravityAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF9F0A484C240014E966 /* CParticleGravityAffector.cpp */; }; + 95972A5312C192DA00BF73D3 /* CSoftwareDriver2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC20A484C240014E966 /* CSoftwareDriver2.cpp */; }; + 95972A5412C192DA00BF73D3 /* CD3D9ParallaxMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF140A484C230014E966 /* CD3D9ParallaxMapRenderer.cpp */; }; + 95972A5512C192DA00BF73D3 /* CD3D8ParallaxMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF070A484C230014E966 /* CD3D8ParallaxMapRenderer.cpp */; }; + 95972A5612C192DA00BF73D3 /* CAnimatedMeshMD2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEE90A484C220014E966 /* CAnimatedMeshMD2.cpp */; }; + 95972A5712C192DA00BF73D3 /* CSceneNodeAnimatorFlyStraight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB30A484C240014E966 /* CSceneNodeAnimatorFlyStraight.cpp */; }; + 95972A5812C192DA00BF73D3 /* CImageLoaderPCX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF5E0A484C230014E966 /* CImageLoaderPCX.cpp */; }; + 95972A5912C192DA00BF73D3 /* CAnimatedMeshSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEED0A484C220014E966 /* CAnimatedMeshSceneNode.cpp */; }; + 95972A5A12C192DA00BF73D3 /* CTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDA0A484C250014E966 /* CTriangleSelector.cpp */; }; + 95972A5B12C192DA00BF73D3 /* CTRTextureGouraudVertexAlpha2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE70A484C250014E966 /* CTRTextureGouraudVertexAlpha2.cpp */; }; + 95972A5C12C192DA00BF73D3 /* CTRTextureWire2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFED0A484C250014E966 /* CTRTextureWire2.cpp */; }; + 95972A5D12C192DA00BF73D3 /* CTRTextureFlatWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDE0A484C250014E966 /* CTRTextureFlatWire.cpp */; }; + 95972A5E12C192DA00BF73D3 /* CTRGouraud2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD40A484C240014E966 /* CTRGouraud2.cpp */; }; + 95972A5F12C192DA00BF73D3 /* CEmptySceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF240A484C230014E966 /* CEmptySceneNode.cpp */; }; + 95972A6012C192DA00BF73D3 /* CTRTextureLightMap2_Add.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE90A484C250014E966 /* CTRTextureLightMap2_Add.cpp */; }; + 95972A6112C192DA00BF73D3 /* CReadFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA70A484C240014E966 /* CReadFile.cpp */; }; + 95972A6212C192DA00BF73D3 /* COpenGLTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF970A484C240014E966 /* COpenGLTexture.cpp */; }; + 95972A6312C192DA00BF73D3 /* COSOperator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF990A484C240014E966 /* COSOperator.cpp */; }; + 95972A6412C192DA00BF73D3 /* CColladaFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEFA0A484C220014E966 /* CColladaFileLoader.cpp */; }; + 95972A6512C192DA00BF73D3 /* CCameraSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEF80A484C220014E966 /* CCameraSceneNode.cpp */; }; + 95972A6612C192DA00BF73D3 /* CMetaTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF7C0A484C230014E966 /* CMetaTriangleSelector.cpp */; }; + 95972A6712C192DA00BF73D3 /* CTRTextureFlat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDD0A484C250014E966 /* CTRTextureFlat.cpp */; }; + 95972A6812C192DA00BF73D3 /* CVideoModeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEE0A484C250014E966 /* CVideoModeList.cpp */; }; + 95972A6912C192DA00BF73D3 /* CXMLReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFFA0A484C250014E966 /* CXMLReader.cpp */; }; + 95972A6A12C192DA00BF73D3 /* COpenGLParallaxMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF910A484C240014E966 /* COpenGLParallaxMapRenderer.cpp */; }; + 95972A6B12C192DA00BF73D3 /* CTRTextureGouraudNoZ2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE60A484C250014E966 /* CTRTextureGouraudNoZ2.cpp */; }; + 95972A6C12C192DA00BF73D3 /* CTRTextureGouraudWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE80A484C250014E966 /* CTRTextureGouraudWire.cpp */; }; + 95972A6D12C192DA00BF73D3 /* CParticlePointEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA10A484C240014E966 /* CParticlePointEmitter.cpp */; }; + 95972A6E12C192DA00BF73D3 /* CGUIWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF560A484C230014E966 /* CGUIWindow.cpp */; }; + 95972A6F12C192DA00BF73D3 /* CGUIModalScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF4A0A484C230014E966 /* CGUIModalScreen.cpp */; }; + 95972A7012C192DA00BF73D3 /* CImageLoaderPSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF620A484C230014E966 /* CImageLoaderPSD.cpp */; }; + 95972A7112C192DA00BF73D3 /* CWaterSurfaceSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFF00A484C250014E966 /* CWaterSurfaceSceneNode.cpp */; }; + 95972A7212C192DA00BF73D3 /* CXMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFF80A484C250014E966 /* CXMeshFileLoader.cpp */; }; + 95972A7312C192DA00BF73D3 /* CIrrDeviceLinux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF660A484C230014E966 /* CIrrDeviceLinux.cpp */; }; + 95972A7412C192DA00BF73D3 /* CLightSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF6C0A484C230014E966 /* CLightSceneNode.cpp */; }; + 95972A7512C192DA00BF73D3 /* CTRTextureGouraudAdd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE20A484C250014E966 /* CTRTextureGouraudAdd.cpp */; }; + 95972A7612C192DA00BF73D3 /* CTRTextureGouraud2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFE10A484C250014E966 /* CTRTextureGouraud2.cpp */; }; + 95972A7712C192DA00BF73D3 /* CSoftwareDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC00A484C240014E966 /* CSoftwareDriver.cpp */; }; + 95972A7812C192DA00BF73D3 /* CTRFlatWire.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD20A484C240014E966 /* CTRFlatWire.cpp */; }; + 95972A7912C192DA00BF73D3 /* CTRGouraudAlpha2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD50A484C240014E966 /* CTRGouraudAlpha2.cpp */; }; + 95972A7A12C192DA00BF73D3 /* CSoftwareTexture2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC60A484C240014E966 /* CSoftwareTexture2.cpp */; }; + 95972A7B12C192DA00BF73D3 /* CZipReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E0030A484C250014E966 /* CZipReader.cpp */; }; + 95972A7C12C192DA00BF73D3 /* COpenGLNormalMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF8F0A484C240014E966 /* COpenGLNormalMapRenderer.cpp */; }; + 95972A7D12C192DA00BF73D3 /* CTRTextureLightMap2_M1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEA0A484C250014E966 /* CTRTextureLightMap2_M1.cpp */; }; + 95972A7E12C192DA00BF73D3 /* CTRTextureLightMap2_M4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEC0A484C250014E966 /* CTRTextureLightMap2_M4.cpp */; }; + 95972A7F12C192DA00BF73D3 /* CGUISkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF4E0A484C230014E966 /* CGUISkin.cpp */; }; + 95972A8012C192DA00BF73D3 /* CD3D8Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF020A484C220014E966 /* CD3D8Driver.cpp */; }; + 95972A8112C192DA00BF73D3 /* CIrrDeviceWin32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF6A0A484C230014E966 /* CIrrDeviceWin32.cpp */; }; + 95972A8212C192DA00BF73D3 /* CFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF280A484C230014E966 /* CFileSystem.cpp */; }; + 95972A8312C192DA00BF73D3 /* CGUIMeshViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF460A484C230014E966 /* CGUIMeshViewer.cpp */; }; + 95972A8412C192DA00BF73D3 /* CGUIComboBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF320A484C230014E966 /* CGUIComboBox.cpp */; }; + 95972A8512C192DA00BF73D3 /* CSceneNodeAnimatorRotation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB70A484C240014E966 /* CSceneNodeAnimatorRotation.cpp */; }; + 95972A8612C192DA00BF73D3 /* CSceneNodeAnimatorTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB90A484C240014E966 /* CSceneNodeAnimatorTexture.cpp */; }; + 95972A8712C192DA00BF73D3 /* CParticleSystemSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFA30A484C240014E966 /* CParticleSystemSceneNode.cpp */; }; + 95972A8812C192DA00BF73D3 /* CTerrainSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFCA0A484C240014E966 /* CTerrainSceneNode.cpp */; }; + 95972A8912C192DA00BF73D3 /* CGUIFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF3C0A484C230014E966 /* CGUIFont.cpp */; }; + 95972A8A12C192DA00BF73D3 /* CParticleFadeOutAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF9D0A484C240014E966 /* CParticleFadeOutAffector.cpp */; }; + 95972A8B12C192DA00BF73D3 /* CDummyTransformationSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF220A484C230014E966 /* CDummyTransformationSceneNode.cpp */; }; + 95972A8C12C192DA00BF73D3 /* CFileList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF260A484C230014E966 /* CFileList.cpp */; }; + 95972A8D12C192DA00BF73D3 /* CImageLoaderTGA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF640A484C230014E966 /* CImageLoaderTGA.cpp */; }; + 95972A8E12C192DA00BF73D3 /* CXMLWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFFD0A484C250014E966 /* CXMLWriter.cpp */; }; + 95972A8F12C192DA00BF73D3 /* CSceneNodeAnimatorFollowSpline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFB50A484C240014E966 /* CSceneNodeAnimatorFollowSpline.cpp */; }; + 95972A9012C192DA00BF73D3 /* CZBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFFF0A484C250014E966 /* CZBuffer.cpp */; }; + 95972A9112C192DA00BF73D3 /* CDMFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF200A484C230014E966 /* CDMFLoader.cpp */; }; + 95972A9212C192DA00BF73D3 /* CD3D9Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF180A484C230014E966 /* CD3D9Texture.cpp */; }; + 95972A9312C192DA00BF73D3 /* COpenGLShaderMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF930A484C240014E966 /* COpenGLShaderMaterialRenderer.cpp */; }; + 95972A9412C192DA00BF73D3 /* Irrlicht.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E00A0A484C250014E966 /* Irrlicht.cpp */; }; + 95972A9512C192DA00BF73D3 /* CGUIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF360A484C230014E966 /* CGUIEditBox.cpp */; }; + 95972A9612C192DA00BF73D3 /* COpenGLSLMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF950A484C240014E966 /* COpenGLSLMaterialRenderer.cpp */; }; + 95972A9712C192DA00BF73D3 /* CD3D9HLSLMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF0F0A484C230014E966 /* CD3D9HLSLMaterialRenderer.cpp */; }; + 95972A9812C192DA00BF73D3 /* CSoftwareTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFC40A484C240014E966 /* CSoftwareTexture.cpp */; }; + 95972A9912C192DA00BF73D3 /* CCubeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF000A484C220014E966 /* CCubeSceneNode.cpp */; }; + 95972A9A12C192DA00BF73D3 /* CTriangleBBSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD80A484C240014E966 /* CTriangleBBSelector.cpp */; }; + 95972A9B12C192DA00BF73D3 /* CD3D9ShaderMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF160A484C230014E966 /* CD3D9ShaderMaterialRenderer.cpp */; }; + 95972A9C12C192DA00BF73D3 /* CD3D8ShaderMaterialRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF090A484C230014E966 /* CD3D8ShaderMaterialRenderer.cpp */; }; + 95972A9D12C192DA00BF73D3 /* CGUIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF2E0A484C230014E966 /* CGUIButton.cpp */; }; + 95972A9E12C192DA00BF73D3 /* CGUIToolBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF540A484C230014E966 /* CGUIToolBar.cpp */; }; + 95972A9F12C192DA00BF73D3 /* CDefaultSceneNodeAnimatorFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF1C0A484C230014E966 /* CDefaultSceneNodeAnimatorFactory.cpp */; }; + 95972AA012C192DA00BF73D3 /* CBillboardSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEF20A484C220014E966 /* CBillboardSceneNode.cpp */; }; + 95972AA112C192DA00BF73D3 /* CSceneNodeAnimatorCollisionResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFAD0A484C240014E966 /* CSceneNodeAnimatorCollisionResponse.cpp */; }; + 95972AA212C192DA00BF73D3 /* CLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF720A484C230014E966 /* CLogger.cpp */; }; + 95972AA312C192DA00BF73D3 /* CGUIInOutFader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF400A484C230014E966 /* CGUIInOutFader.cpp */; }; + 95972AA412C192DA00BF73D3 /* CWriteFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFF20A484C250014E966 /* CWriteFile.cpp */; }; + 95972AA512C192DA00BF73D3 /* CTRTextureGouraud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFDF0A484C250014E966 /* CTRTextureGouraud.cpp */; }; + 95972AA612C192DA00BF73D3 /* CTRFlat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFD10A484C240014E966 /* CTRFlat.cpp */; }; + 95972AA712C192DA00BF73D3 /* CTerrainTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFCC0A484C240014E966 /* CTerrainTriangleSelector.cpp */; }; + 95972AA812C192DA00BF73D3 /* CGUITabControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF520A484C230014E966 /* CGUITabControl.cpp */; }; + 95972AA912C192DA00BF73D3 /* CParticleBoxEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF9B0A484C240014E966 /* CParticleBoxEmitter.cpp */; }; + 95972AAA12C192DA00BF73D3 /* CGUIMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF440A484C230014E966 /* CGUIMenu.cpp */; }; + 95972AAB12C192DA00BF73D3 /* CImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF580A484C230014E966 /* CImage.cpp */; }; + 95972AAC12C192DA00BF73D3 /* CShadowVolumeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFBB0A484C240014E966 /* CShadowVolumeSceneNode.cpp */; }; + 95972AAD12C192DA00BF73D3 /* CGUIEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF380A484C230014E966 /* CGUIEnvironment.cpp */; }; + 95972AAE12C192DA00BF73D3 /* CLimitReadFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF6E0A484C230014E966 /* CLimitReadFile.cpp */; }; + 95972AAF12C192DA00BF73D3 /* CAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DEF00A484C220014E966 /* CAttributes.cpp */; }; + 95972AB012C192DA00BF73D3 /* COpenGLDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF8C0A484C240014E966 /* COpenGLDriver.cpp */; }; + 95972AB112C192DA00BF73D3 /* CTRTextureLightMap2_M2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DFEB0A484C250014E966 /* CTRTextureLightMap2_M2.cpp */; }; + 95972AB212C192DA00BF73D3 /* CGUIImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF3E0A484C230014E966 /* CGUIImage.cpp */; }; + 95972AB312C192DA00BF73D3 /* CD3D9NormalMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF120A484C230014E966 /* CD3D9NormalMapRenderer.cpp */; }; + 95972AB412C192DA00BF73D3 /* CD3D8NormalMapRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF050A484C220014E966 /* CD3D8NormalMapRenderer.cpp */; }; + 95972AB512C192DA00BF73D3 /* CMeshCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF760A484C230014E966 /* CMeshCache.cpp */; }; + 95972AB612C192DA00BF73D3 /* CImageLoaderJPG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF5C0A484C230014E966 /* CImageLoaderJPG.cpp */; }; + 95972AB712C192DA00BF73D3 /* CFPSCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C53DF2A0A484C230014E966 /* CFPSCounter.cpp */; }; + 95972AB812C192DA00BF73D3 /* OSXClipboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E1670A484C2C0014E966 /* OSXClipboard.mm */; }; + 95972AB912C192DA00BF73D3 /* CIrrDeviceMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E15F0A484C2C0014E966 /* CIrrDeviceMacOSX.mm */; }; + 95972ABA12C192DA00BF73D3 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C53E14D0A484C2C0014E966 /* AppDelegate.mm */; }; + 95972ABB12C192DA00BF73D3 /* inflate.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C6DC9B60A48715A0017A6E5 /* inflate.c */; }; + 95972ABC12C192DA00BF73D3 /* CSphereSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC36B0D0A6B61DB0076C4B2 /* CSphereSceneNode.cpp */; }; + 95972ABD12C192DA00BF73D3 /* COBJMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C364EA20A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp */; }; + 95972ABE12C192DA00BF73D3 /* CPakReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43EEBE0A74A5C800F942FC /* CPakReader.cpp */; }; + 95972ABF12C192DA00BF73D3 /* CImageLoaderBMP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BDC0A88735900B03626 /* CImageLoaderBMP.cpp */; }; + 95972AC012C192DA00BF73D3 /* CImageWriterBMP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BDE0A88735900B03626 /* CImageWriterBMP.cpp */; }; + 95972AC112C192DA00BF73D3 /* CImageWriterJPG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE00A88735900B03626 /* CImageWriterJPG.cpp */; }; + 95972AC212C192DA00BF73D3 /* CImageWriterPCX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE20A88735900B03626 /* CImageWriterPCX.cpp */; }; + 95972AC312C192DA00BF73D3 /* CImageWriterPNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE40A88735900B03626 /* CImageWriterPNG.cpp */; }; + 95972AC412C192DA00BF73D3 /* CImageWriterPPM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE60A88735900B03626 /* CImageWriterPPM.cpp */; }; + 95972AC512C192DA00BF73D3 /* CImageWriterPSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BE80A88735900B03626 /* CImageWriterPSD.cpp */; }; + 95972AC612C192DA00BF73D3 /* CImageWriterTGA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BEA0A88735900B03626 /* CImageWriterTGA.cpp */; }; + 95972AC712C192DA00BF73D3 /* CSkyDomeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CFA7BEC0A88735A00B03626 /* CSkyDomeSceneNode.cpp */; }; + 95972AC812C192DA00BF73D3 /* CDepthBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4804C0C7D91DF00728AA9 /* CDepthBuffer.cpp */; }; + 95972AC912C192DA00BF73D3 /* IBurningShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480500C7D936700728AA9 /* IBurningShader.cpp */; }; + 95972ACA12C192DA00BF73D3 /* CAnimatedMeshMD3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480560C7D945800728AA9 /* CAnimatedMeshMD3.cpp */; }; + 95972ACB12C192DA00BF73D3 /* CDefaultGUIElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480580C7D945800728AA9 /* CDefaultGUIElementFactory.cpp */; }; + 95972ACC12C192DA00BF73D3 /* CGUIColorSelectDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4805E0C7D947B00728AA9 /* CGUIColorSelectDialog.cpp */; }; + 95972ACD12C192DA00BF73D3 /* CGUISpinBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480600C7D947B00728AA9 /* CGUISpinBox.cpp */; }; + 95972ACE12C192DA00BF73D3 /* CGUISpriteBank.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480620C7D947B00728AA9 /* CGUISpriteBank.cpp */; }; + 95972ACF12C192DA00BF73D3 /* CQuake3ShaderSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806A0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.cpp */; }; + 95972AD012C192DA00BF73D3 /* CTRTextureBlend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806C0C7D94AC00728AA9 /* CTRTextureBlend.cpp */; }; + 95972AD112C192DA00BF73D3 /* CTRTextureGouraudAlpha.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806D0C7D94AC00728AA9 /* CTRTextureGouraudAlpha.cpp */; }; + 95972AD212C192DA00BF73D3 /* CTRTextureGouraudAlphaNoZ.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806E0C7D94AC00728AA9 /* CTRTextureGouraudAlphaNoZ.cpp */; }; + 95972AD312C192DA00BF73D3 /* CTRTextureLightMapGouraud2_M4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD4806F0C7D94AC00728AA9 /* CTRTextureLightMapGouraud2_M4.cpp */; }; + 95972AD412C192DA00BF73D3 /* CIrrDeviceSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C40C7DA66800728AA9 /* CIrrDeviceSDL.cpp */; }; + 95972AD512C192DA00BF73D3 /* COpenGLExtensionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C50C7DA66800728AA9 /* COpenGLExtensionHandler.cpp */; }; + 95972AD612C192DA00BF73D3 /* CMD3MeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DD480C60C7DA66800728AA9 /* CMD3MeshFileLoader.cpp */; }; + 95972AD712C192DA00BF73D3 /* CB3DMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968401E0D0F1A2300333EFD /* CB3DMeshFileLoader.cpp */; }; + 95972AD812C192DA00BF73D3 /* CBoneSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840200D0F1A2300333EFD /* CBoneSceneNode.cpp */; }; + 95972AD912C192DA00BF73D3 /* CBSPMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840220D0F1A2300333EFD /* CBSPMeshFileLoader.cpp */; }; + 95972ADA12C192DA00BF73D3 /* CColladaMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840250D0F1A2300333EFD /* CColladaMeshWriter.cpp */; }; + 95972ADB12C192DA00BF73D3 /* CImageLoaderPPM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840270D0F1A2300333EFD /* CImageLoaderPPM.cpp */; }; + 95972ADC12C192DA00BF73D3 /* CIrrMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968402B0D0F1A2300333EFD /* CIrrMeshFileLoader.cpp */; }; + 95972ADD12C192DA00BF73D3 /* CIrrMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968402D0D0F1A2300333EFD /* CIrrMeshWriter.cpp */; }; + 95972ADE12C192DA00BF73D3 /* CMD2MeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968402F0D0F1A2300333EFD /* CMD2MeshFileLoader.cpp */; }; + 95972ADF12C192DA00BF73D3 /* CMS3DMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840310D0F1A2300333EFD /* CMS3DMeshFileLoader.cpp */; }; + 95972AE012C192DA00BF73D3 /* CParticleAnimatedMeshSceneNodeEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840330D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.cpp */; }; + 95972AE112C192DA00BF73D3 /* CParticleAttractionAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840350D0F1A2300333EFD /* CParticleAttractionAffector.cpp */; }; + 95972AE212C192DA00BF73D3 /* CParticleCylinderEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840370D0F1A2300333EFD /* CParticleCylinderEmitter.cpp */; }; + 95972AE312C192DA00BF73D3 /* CParticleMeshEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840390D0F1A2300333EFD /* CParticleMeshEmitter.cpp */; }; + 95972AE412C192DA00BF73D3 /* CParticleRingEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968403B0D0F1A2300333EFD /* CParticleRingEmitter.cpp */; }; + 95972AE512C192DA00BF73D3 /* CParticleRotationAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968403D0D0F1A2300333EFD /* CParticleRotationAffector.cpp */; }; + 95972AE612C192DA00BF73D3 /* CParticleSphereEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0968403F0D0F1A2300333EFD /* CParticleSphereEmitter.cpp */; }; + 95972AE712C192DA00BF73D3 /* CSkinnedMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840410D0F1A2300333EFD /* CSkinnedMesh.cpp */; }; + 95972AE812C192DA00BF73D3 /* CSTLMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840430D0F1A2300333EFD /* CSTLMeshFileLoader.cpp */; }; + 95972AE912C192DA00BF73D3 /* CSTLMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096840450D0F1A2300333EFD /* CSTLMeshWriter.cpp */; }; + 95972AEA12C192DA00BF73D3 /* CBurningShader_Raster_Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0910B9D90D1F5D4100D46B04 /* CBurningShader_Raster_Reference.cpp */; }; + 95972AEB12C192DA00BF73D3 /* CGUITable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0910B9DA0D1F5D4100D46B04 /* CGUITable.cpp */; }; + 95972AEC12C192DA00BF73D3 /* CImageLoaderWAL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0910B9DC0D1F5D4100D46B04 /* CImageLoaderWAL.cpp */; }; + 95972AED12C192DA00BF73D3 /* CVolumeLightSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 090FBC800D31085E0076D847 /* CVolumeLightSceneNode.cpp */; }; + 95972AEE12C192DA00BF73D3 /* CLWOMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09C638700D4F1A69000B6A18 /* CLWOMeshFileLoader.cpp */; }; + 95972AEF12C192DA00BF73D3 /* CSceneNodeAnimatorCameraFPS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 093973BC0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp */; }; + 95972AF012C192DA00BF73D3 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 093973BE0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp */; }; + 95972AF112C192DA00BF73D3 /* COBJMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096F8E3B0EA2EFBA00907EC5 /* COBJMeshWriter.cpp */; }; + 95972AF212C192DA00BF73D3 /* CParticleScaleAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 096CC0DE0ECE65B500C81DC7 /* CParticleScaleAffector.cpp */; }; + 95972AF312C192DA00BF73D3 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2C0ED32029003B8C9C /* png.c */; }; + 95972AF412C192DA00BF73D3 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2D0ED32029003B8C9C /* pngerror.c */; }; + 95972AF612C192DA00BF73D3 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C2F0ED32029003B8C9C /* pngget.c */; }; + 95972AF712C192DA00BF73D3 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C300ED32029003B8C9C /* pngmem.c */; }; + 95972AF812C192DA00BF73D3 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C310ED32029003B8C9C /* pngpread.c */; }; + 95972AF912C192DA00BF73D3 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C320ED32029003B8C9C /* pngread.c */; }; + 95972AFA12C192DA00BF73D3 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C330ED32029003B8C9C /* pngrio.c */; }; + 95972AFB12C192DA00BF73D3 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C340ED32029003B8C9C /* pngrtran.c */; }; + 95972AFC12C192DA00BF73D3 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C350ED32029003B8C9C /* pngrutil.c */; }; + 95972AFD12C192DA00BF73D3 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C360ED32029003B8C9C /* pngset.c */; }; + 95972AFE12C192DA00BF73D3 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C380ED32029003B8C9C /* pngtrans.c */; }; + 95972AFF12C192DA00BF73D3 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3A0ED32029003B8C9C /* pngwio.c */; }; + 95972B0012C192DA00BF73D3 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3B0ED32029003B8C9C /* pngwrite.c */; }; + 95972B0112C192DA00BF73D3 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3C0ED32029003B8C9C /* pngwtran.c */; }; + 95972B0212C192DA00BF73D3 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 09293C3D0ED32029003B8C9C /* pngwutil.c */; }; + 95972B0312C192DA00BF73D3 /* CGUIImageList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4E00F48D1B000C81F60 /* CGUIImageList.cpp */; }; + 95972B0412C192DA00BF73D3 /* CGUITreeView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4ED0F48D3A100C81F60 /* CGUITreeView.cpp */; }; + 95972B0512C192DA00BF73D3 /* CMemoryFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3484C4FC0F48D4CB00C81F60 /* CMemoryFile.cpp */; }; + 95972B0612C192DA00BF73D3 /* CIrrDeviceConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EC243B0F59272E0037BC3A /* CIrrDeviceConsole.cpp */; }; + 95972B0712C192DA00BF73D3 /* CImageLoaderRGB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91D10F65FCA6000B5651 /* CImageLoaderRGB.cpp */; }; + 95972B0812C192DA00BF73D3 /* CPLYMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91D60F65FCF6000B5651 /* CPLYMeshFileLoader.cpp */; }; + 95972B0912C192DA00BF73D3 /* CPLYMeshWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34EF91DB0F65FD14000B5651 /* CPLYMeshWriter.cpp */; }; + 95972B0A12C192DA00BF73D3 /* CTarReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3430E4D51022C391006271FD /* CTarReader.cpp */; }; + 95972B0B12C192DA00BF73D3 /* CMountPointReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344FD4A41039E98C0045FD3F /* CMountPointReader.cpp */; }; + 95972B0C12C192DA00BF73D3 /* jaricom.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C431103B1B5002DE8D7 /* jaricom.c */; }; + 95972B0D12C192DA00BF73D3 /* jcarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C441103B1B5002DE8D7 /* jcarith.c */; }; + 95972B0E12C192DA00BF73D3 /* jdarith.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C451103B1B5002DE8D7 /* jdarith.c */; }; + 95972B0F12C192DA00BF73D3 /* COctreeSceneNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */; }; + 95972B1012C192DA00BF73D3 /* COctreeTriangleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C4F1103B261002DE8D7 /* COctreeTriangleSelector.cpp */; }; + 95972B1112C192DA00BF73D3 /* CNPKReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C531103B27D002DE8D7 /* CNPKReader.cpp */; }; + 95972B1212C192DA00BF73D3 /* CIrrDeviceFB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C571103B2AE002DE8D7 /* CIrrDeviceFB.cpp */; }; + 95972B1312C192DA00BF73D3 /* CIrrDeviceWinCE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */; }; + 95972B1412C192DA00BF73D3 /* LzmaDec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C631103B384002DE8D7 /* LzmaDec.c */; }; + 95972B1512C192DA00BF73D3 /* blocksort.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C661103B3B9002DE8D7 /* blocksort.c */; }; + 95972B1612C192DA00BF73D3 /* bzcompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */; }; + 95972B1712C192DA00BF73D3 /* crctable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */; }; + 95972B1812C192DA00BF73D3 /* decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */; }; + 95972B1912C192DA00BF73D3 /* huffman.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */; }; + 95972B1A12C192DA00BF73D3 /* randtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */; }; + 95972B1B12C192DA00BF73D3 /* bzlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */; }; + 95972B1C12C192DA00BF73D3 /* aescrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */; }; + 95972B1D12C192DA00BF73D3 /* aeskey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */; }; + 95972B1E12C192DA00BF73D3 /* aestab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C801103B53C002DE8D7 /* aestab.cpp */; }; + 95972B1F12C192DA00BF73D3 /* fileenc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C811103B53C002DE8D7 /* fileenc.cpp */; }; + 95972B2012C192DA00BF73D3 /* hmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C821103B53C002DE8D7 /* hmac.cpp */; }; + 95972B2112C192DA00BF73D3 /* prng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C831103B53C002DE8D7 /* prng.cpp */; }; + 95972B2212C192DA00BF73D3 /* pwd2key.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C841103B53C002DE8D7 /* pwd2key.cpp */; }; + 95972B2312C192DA00BF73D3 /* sha1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C851103B53C002DE8D7 /* sha1.cpp */; }; + 95972B2412C192DA00BF73D3 /* sha2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E2E3C861103B53C002DE8D7 /* sha2.cpp */; }; + 95972B8412C19A5C00BF73D3 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95972B8312C19A5C00BF73D3 /* OpenGL.framework */; }; + 95972B8A12C19A7600BF73D3 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95972B8912C19A7600BF73D3 /* IOKit.framework */; }; + 95972B8E12C19A7F00BF73D3 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95972B8D12C19A7F00BF73D3 /* Carbon.framework */; }; + 95E5857112FCE277004946C6 /* CWADReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5857012FCE277004946C6 /* CWADReader.cpp */; }; + 95E5857212FCE277004946C6 /* CWADReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5857012FCE277004946C6 /* CWADReader.cpp */; }; + 95E5857712FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5857512FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp */; }; + 95E5857812FCE2CB004946C6 /* CAnimatedMeshHalfLife.h in Headers */ = {isa = PBXBuildFile; fileRef = 95E5857612FCE2CB004946C6 /* CAnimatedMeshHalfLife.h */; }; + 95E5857912FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5857512FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp */; }; + 95E5857C12FCE2DE004946C6 /* CSceneLoaderIrr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5857B12FCE2DE004946C6 /* CSceneLoaderIrr.cpp */; }; + 95E5857D12FCE2DE004946C6 /* CSceneLoaderIrr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5857B12FCE2DE004946C6 /* CSceneLoaderIrr.cpp */; }; + 95E5858D12FCE388004946C6 /* CTRNormalMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5858C12FCE388004946C6 /* CTRNormalMap.cpp */; }; + 95E5858E12FCE388004946C6 /* CTRNormalMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5858C12FCE388004946C6 /* CTRNormalMap.cpp */; }; + 95E5859212FCE3A1004946C6 /* CTRStencilShadow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5859112FCE3A1004946C6 /* CTRStencilShadow.cpp */; }; + 95E5859312FCE3A1004946C6 /* CTRStencilShadow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5859112FCE3A1004946C6 /* CTRStencilShadow.cpp */; }; + 95E5859512FCE3F5004946C6 /* CSMFMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5859412FCE3F5004946C6 /* CSMFMeshFileLoader.cpp */; }; + 95E5859612FCE3F5004946C6 /* CSMFMeshFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95E5859412FCE3F5004946C6 /* CSMFMeshFileLoader.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 09022C540EA0E97F00CD54EE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 0946CCA50EC99BBE00D945A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 0946CCD80EC99D8C00D945A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09022C520EA0E97F00CD54EE; + remoteInfo = GUIEditor; + }; + 09F648F60D2CDED9001E0599 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 09F649200D2CDFF0001E0599 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09F648F40D2CDED9001E0599; + remoteInfo = HelloWorld; + }; + 09F649310D2CE03E001E0599 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 09F649580D2CE206001E0599 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 0E2E3CED1103E294002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 0E2E3D2E1103E3F4002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + 0E2E3D8B1103EB12002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0E2E3D2C1103E3F4002DE8D7; + remoteInfo = 20.ManagedLights; + }; + 0E2E3D8D1103EB1A002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0E2E3CEB1103E294002DE8D7; + remoteInfo = 18.SplitScreen; + }; + 0E2E3D8F1103EB32002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09F6492F0D2CE03E001E0599; + remoteInfo = 15.LoadIrrFile; + }; + 0E2E3D911103EB39002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09F649560D2CE206001E0599; + remoteInfo = 16.Quake3Shader; + }; + 0E2E3D931103EB41002DE8D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0946CCA30EC99BBE00D945A5; + remoteInfo = 19.MouseAndJoystick; + }; + 4CA5CB810A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B8DEF35C0950229200FDEA7E; + remoteInfo = Demo; + }; + 4CA5CB830A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFFAF097FE5F80057C06F; + remoteInfo = RenderToTexture; + }; + 4CA5CB850A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFEC2097FDF020057C06F; + remoteInfo = TerrainRendering; + }; + 4CA5CB870A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFEA4097FDE900057C06F; + remoteInfo = PerPixelLightning; + }; + 4CA5CB890A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFF4A097FE3050057C06F; + remoteInfo = Shaders; + }; + 4CA5CB8B0A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFF91097FE45E0057C06F; + remoteInfo = MeshViewer; + }; + 4CA5CB8D0A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFEE8097FE05F0057C06F; + remoteInfo = SpecialFx; + }; + 4CA5CB8F0A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFE82097FDDE20057C06F; + remoteInfo = Collision; + }; + 4CA5CB910A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFDFE097FD9F50057C06F; + remoteInfo = 2DGraphics; + }; + 4CA5CB930A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFF07097FE13E0057C06F; + remoteInfo = UserInterface; + }; + 4CA5CB950A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFF78097FE3DC0057C06F; + remoteInfo = Movement; + }; + 4CA5CB970A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFF1E097FE1E00057C06F; + remoteInfo = CustomSceneNode; + }; + 4CA5CB990A4868B500ADB3D7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B81CFF33097FE25F0057C06F; + remoteInfo = Quake3Map; + }; + B81CFE00097FD9F50057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFE84097FDDE20057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFEA6097FDE900057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFEC4097FDF020057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFEEA097FE05F0057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFF09097FE13E0057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFF20097FE1E00057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFF35097FE25F0057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFF4C097FE3050057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFF7A097FE3DC0057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFF93097FE45E0057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B81CFFB1097FE5F80057C06F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; + B8DEF374095024F600FDEA7E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = MacOSX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 09022C620EA0E97F00CD54EE /* GUIEditor_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GUIEditor_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09022C680EA0EA9D00CD54EE /* CGUIAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIAttribute.h; path = ../../../tools/GUIEditor/CGUIAttribute.h; sourceTree = SOURCE_ROOT; }; + 09022C690EA0EA9D00CD54EE /* CGUIAttributeEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGUIAttributeEditor.cpp; path = ../../../tools/GUIEditor/CGUIAttributeEditor.cpp; sourceTree = SOURCE_ROOT; }; + 09022C6A0EA0EA9D00CD54EE /* CGUIAttributeEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIAttributeEditor.h; path = ../../../tools/GUIEditor/CGUIAttributeEditor.h; sourceTree = SOURCE_ROOT; }; + 09022C6B0EA0EA9D00CD54EE /* CGUIBoolAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIBoolAttribute.h; path = ../../../tools/GUIEditor/CGUIBoolAttribute.h; sourceTree = SOURCE_ROOT; }; + 09022C6C0EA0EA9D00CD54EE /* CGUIColorAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIColorAttribute.h; path = ../../../tools/GUIEditor/CGUIColorAttribute.h; sourceTree = SOURCE_ROOT; }; + 09022C6D0EA0EA9D00CD54EE /* CGUIDummyEditorStub.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIDummyEditorStub.h; path = ../../../tools/GUIEditor/CGUIDummyEditorStub.h; sourceTree = SOURCE_ROOT; }; + 09022C6E0EA0EA9D00CD54EE /* CGUIEditFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGUIEditFactory.cpp; path = ../../../tools/GUIEditor/CGUIEditFactory.cpp; sourceTree = SOURCE_ROOT; }; + 09022C6F0EA0EA9D00CD54EE /* CGUIEditFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIEditFactory.h; path = ../../../tools/GUIEditor/CGUIEditFactory.h; sourceTree = SOURCE_ROOT; }; + 09022C700EA0EA9D00CD54EE /* CGUIEditWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGUIEditWindow.cpp; path = ../../../tools/GUIEditor/CGUIEditWindow.cpp; sourceTree = SOURCE_ROOT; }; + 09022C710EA0EA9D00CD54EE /* CGUIEditWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIEditWindow.h; path = ../../../tools/GUIEditor/CGUIEditWindow.h; sourceTree = SOURCE_ROOT; }; + 09022C720EA0EA9D00CD54EE /* CGUIEditWorkspace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGUIEditWorkspace.cpp; path = ../../../tools/GUIEditor/CGUIEditWorkspace.cpp; sourceTree = SOURCE_ROOT; }; + 09022C730EA0EA9D00CD54EE /* CGUIEditWorkspace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIEditWorkspace.h; path = ../../../tools/GUIEditor/CGUIEditWorkspace.h; sourceTree = SOURCE_ROOT; }; + 09022C740EA0EA9D00CD54EE /* CGUIEnumAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIEnumAttribute.h; path = ../../../tools/GUIEditor/CGUIEnumAttribute.h; sourceTree = SOURCE_ROOT; }; + 09022C750EA0EA9D00CD54EE /* CGUIPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGUIPanel.cpp; path = ../../../tools/GUIEditor/CGUIPanel.cpp; sourceTree = SOURCE_ROOT; }; + 09022C760EA0EA9D00CD54EE /* CGUIPanel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIPanel.h; path = ../../../tools/GUIEditor/CGUIPanel.h; sourceTree = SOURCE_ROOT; }; + 09022C770EA0EA9D00CD54EE /* CGUIStringAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUIStringAttribute.h; path = ../../../tools/GUIEditor/CGUIStringAttribute.h; sourceTree = SOURCE_ROOT; }; + 09022C780EA0EA9D00CD54EE /* CGUITextureAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUITextureAttribute.h; path = ../../../tools/GUIEditor/CGUITextureAttribute.h; sourceTree = SOURCE_ROOT; }; + 09022C790EA0EA9D00CD54EE /* CGUITextureCacheBrowser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGUITextureCacheBrowser.cpp; path = ../../../tools/GUIEditor/CGUITextureCacheBrowser.cpp; sourceTree = SOURCE_ROOT; }; + 09022C7A0EA0EA9D00CD54EE /* CGUITextureCacheBrowser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CGUITextureCacheBrowser.h; path = ../../../tools/GUIEditor/CGUITextureCacheBrowser.h; sourceTree = SOURCE_ROOT; }; + 09022C7B0EA0EA9D00CD54EE /* CMemoryReadWriteFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CMemoryReadWriteFile.cpp; path = ../../../tools/GUIEditor/CMemoryReadWriteFile.cpp; sourceTree = SOURCE_ROOT; }; + 09022C7C0EA0EA9D00CD54EE /* CMemoryReadWriteFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CMemoryReadWriteFile.h; path = ../../../tools/GUIEditor/CMemoryReadWriteFile.h; sourceTree = SOURCE_ROOT; }; + 09022C7D0EA0EA9D00CD54EE /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../../tools/GUIEditor/main.cpp; sourceTree = SOURCE_ROOT; }; + 090FBC800D31085E0076D847 /* CVolumeLightSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CVolumeLightSceneNode.cpp; sourceTree = "<group>"; }; + 090FBC810D31085E0076D847 /* CVolumeLightSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CVolumeLightSceneNode.h; sourceTree = "<group>"; }; + 0910B9D90D1F5D4100D46B04 /* CBurningShader_Raster_Reference.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CBurningShader_Raster_Reference.cpp; sourceTree = "<group>"; }; + 0910B9DA0D1F5D4100D46B04 /* CGUITable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUITable.cpp; sourceTree = "<group>"; }; + 0910B9DB0D1F5D4100D46B04 /* CGUITable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUITable.h; sourceTree = "<group>"; }; + 0910B9DC0D1F5D4100D46B04 /* CImageLoaderWAL.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageLoaderWAL.cpp; sourceTree = "<group>"; }; + 0910B9DD0D1F5D4100D46B04 /* CImageLoaderWAL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderWAL.h; sourceTree = "<group>"; }; + 0910B9FD0D1F64B300D46B04 /* CMeshBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMeshBuffer.h; sourceTree = "<group>"; }; + 0910B9FE0D1F64B300D46B04 /* coreutil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = coreutil.h; sourceTree = "<group>"; }; + 0910B9FF0D1F64B300D46B04 /* ECullingTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ECullingTypes.h; sourceTree = "<group>"; }; + 0910BA000D1F64B300D46B04 /* EDebugSceneTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EDebugSceneTypes.h; sourceTree = "<group>"; }; + 0910BA010D1F64B300D46B04 /* EDriverFeatures.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EDriverFeatures.h; sourceTree = "<group>"; }; + 0910BA020D1F64B300D46B04 /* EGUIAlignment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EGUIAlignment.h; sourceTree = "<group>"; }; + 0910BA030D1F64B300D46B04 /* EHardwareBufferFlags.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EHardwareBufferFlags.h; sourceTree = "<group>"; }; + 0910BA040D1F64B300D46B04 /* EMaterialFlags.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EMaterialFlags.h; sourceTree = "<group>"; }; + 0910BA050D1F64B300D46B04 /* EMaterialTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EMaterialTypes.h; sourceTree = "<group>"; }; + 0910BA060D1F64B300D46B04 /* EMeshWriterEnums.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EMeshWriterEnums.h; sourceTree = "<group>"; }; + 0910BA070D1F64B300D46B04 /* EMessageBoxFlags.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EMessageBoxFlags.h; sourceTree = "<group>"; }; + 0910BA080D1F64B300D46B04 /* ETerrainElements.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ETerrainElements.h; sourceTree = "<group>"; }; + 0910BA090D1F64B300D46B04 /* IAnimatedMeshMD3.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IAnimatedMeshMD3.h; sourceTree = "<group>"; }; + 0910BA0A0D1F64B300D46B04 /* IBoneSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IBoneSceneNode.h; sourceTree = "<group>"; }; + 0910BA0B0D1F64B300D46B04 /* IGUIColorSelectDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIColorSelectDialog.h; sourceTree = "<group>"; }; + 0910BA0C0D1F64B300D46B04 /* IGUIElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIElementFactory.h; sourceTree = "<group>"; }; + 0910BA0D0D1F64B300D46B04 /* IGUIFontBitmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIFontBitmap.h; sourceTree = "<group>"; }; + 0910BA0E0D1F64B300D46B04 /* IGUISpinBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUISpinBox.h; sourceTree = "<group>"; }; + 0910BA0F0D1F64B300D46B04 /* IGUISpriteBank.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUISpriteBank.h; sourceTree = "<group>"; }; + 0910BA100D1F64B300D46B04 /* IGUITable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUITable.h; sourceTree = "<group>"; }; + 0910BA110D1F64B300D46B04 /* IMeshWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMeshWriter.h; sourceTree = "<group>"; }; + 0910BA120D1F64B300D46B04 /* IParticleAnimatedMeshSceneNodeEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleAnimatedMeshSceneNodeEmitter.h; sourceTree = "<group>"; }; + 0910BA130D1F64B300D46B04 /* IParticleAttractionAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleAttractionAffector.h; sourceTree = "<group>"; }; + 0910BA140D1F64B300D46B04 /* IParticleBoxEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleBoxEmitter.h; sourceTree = "<group>"; }; + 0910BA150D1F64B300D46B04 /* IParticleCylinderEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleCylinderEmitter.h; sourceTree = "<group>"; }; + 0910BA160D1F64B300D46B04 /* IParticleFadeOutAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleFadeOutAffector.h; sourceTree = "<group>"; }; + 0910BA170D1F64B300D46B04 /* IParticleGravityAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleGravityAffector.h; sourceTree = "<group>"; }; + 0910BA180D1F64B300D46B04 /* IParticleMeshEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleMeshEmitter.h; sourceTree = "<group>"; }; + 0910BA190D1F64B300D46B04 /* IParticleRingEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleRingEmitter.h; sourceTree = "<group>"; }; + 0910BA1A0D1F64B300D46B04 /* IParticleRotationAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleRotationAffector.h; sourceTree = "<group>"; }; + 0910BA1B0D1F64B300D46B04 /* IParticleSphereEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleSphereEmitter.h; sourceTree = "<group>"; }; + 0910BA1C0D1F64B300D46B04 /* IQ3Shader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IQ3Shader.h; sourceTree = "<group>"; }; + 0910BA1D0D1F64B300D46B04 /* IReferenceCounted.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IReferenceCounted.h; sourceTree = "<group>"; }; + 0910BA1E0D1F64B300D46B04 /* irrMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrMap.h; sourceTree = "<group>"; }; + 0910BA1F0D1F64B300D46B04 /* ISkinnedMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISkinnedMesh.h; sourceTree = "<group>"; }; + 0910BA200D1F64B300D46B04 /* SMaterialLayer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SMaterialLayer.h; sourceTree = "<group>"; }; + 0910BA210D1F64B300D46B04 /* SSharedMeshBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSharedMeshBuffer.h; sourceTree = "<group>"; }; + 0910BA220D1F64B300D46B04 /* SSkinMeshBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSkinMeshBuffer.h; sourceTree = "<group>"; }; + 0910BA230D1F64B300D46B04 /* SViewFrustum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SViewFrustum.h; sourceTree = "<group>"; }; + 0925113D0D744ADE006784D9 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; + 09293C2C0ED32029003B8C9C /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = png.c; path = libpng/png.c; sourceTree = "<group>"; }; + 09293C2D0ED32029003B8C9C /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = libpng/pngerror.c; sourceTree = "<group>"; }; + 09293C2F0ED32029003B8C9C /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = libpng/pngget.c; sourceTree = "<group>"; }; + 09293C300ED32029003B8C9C /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = libpng/pngmem.c; sourceTree = "<group>"; }; + 09293C310ED32029003B8C9C /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = libpng/pngpread.c; sourceTree = "<group>"; }; + 09293C320ED32029003B8C9C /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = libpng/pngread.c; sourceTree = "<group>"; }; + 09293C330ED32029003B8C9C /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = libpng/pngrio.c; sourceTree = "<group>"; }; + 09293C340ED32029003B8C9C /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = libpng/pngrtran.c; sourceTree = "<group>"; }; + 09293C350ED32029003B8C9C /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = libpng/pngrutil.c; sourceTree = "<group>"; }; + 09293C360ED32029003B8C9C /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = libpng/pngset.c; sourceTree = "<group>"; }; + 09293C380ED32029003B8C9C /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = libpng/pngtrans.c; sourceTree = "<group>"; }; + 09293C3A0ED32029003B8C9C /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = libpng/pngwio.c; sourceTree = "<group>"; }; + 09293C3B0ED32029003B8C9C /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = libpng/pngwrite.c; sourceTree = "<group>"; }; + 09293C3C0ED32029003B8C9C /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = libpng/pngwtran.c; sourceTree = "<group>"; }; + 09293C3D0ED32029003B8C9C /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = libpng/pngwutil.c; sourceTree = "<group>"; }; + 0930CE550EC39F4500D63866 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; + 093973BC0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorCameraFPS.cpp; sourceTree = "<group>"; }; + 093973BD0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorCameraFPS.h; sourceTree = "<group>"; }; + 093973BE0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorCameraMaya.cpp; sourceTree = "<group>"; }; + 093973BF0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorCameraMaya.h; sourceTree = "<group>"; }; + 0946CCB40EC99BBE00D945A5 /* MouseAndJoystick_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MouseAndJoystick_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0946CCCA0EC99C6E00D945A5 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = 19.MouseAndJoystick/main.cpp; sourceTree = "<group>"; }; + 0968401E0D0F1A2300333EFD /* CB3DMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CB3DMeshFileLoader.cpp; sourceTree = "<group>"; }; + 0968401F0D0F1A2300333EFD /* CB3DMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CB3DMeshFileLoader.h; sourceTree = "<group>"; }; + 096840200D0F1A2300333EFD /* CBoneSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CBoneSceneNode.cpp; sourceTree = "<group>"; }; + 096840210D0F1A2300333EFD /* CBoneSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CBoneSceneNode.h; sourceTree = "<group>"; }; + 096840220D0F1A2300333EFD /* CBSPMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CBSPMeshFileLoader.cpp; sourceTree = "<group>"; }; + 096840230D0F1A2300333EFD /* CBSPMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CBSPMeshFileLoader.h; sourceTree = "<group>"; }; + 096840250D0F1A2300333EFD /* CColladaMeshWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CColladaMeshWriter.cpp; sourceTree = "<group>"; }; + 096840260D0F1A2300333EFD /* CColladaMeshWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CColladaMeshWriter.h; sourceTree = "<group>"; }; + 096840270D0F1A2300333EFD /* CImageLoaderPPM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageLoaderPPM.cpp; sourceTree = "<group>"; }; + 096840280D0F1A2300333EFD /* CImageLoaderPPM.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderPPM.h; sourceTree = "<group>"; }; + 0968402B0D0F1A2300333EFD /* CIrrMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrMeshFileLoader.cpp; sourceTree = "<group>"; }; + 0968402C0D0F1A2300333EFD /* CIrrMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CIrrMeshFileLoader.h; sourceTree = "<group>"; }; + 0968402D0D0F1A2300333EFD /* CIrrMeshWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrMeshWriter.cpp; sourceTree = "<group>"; }; + 0968402E0D0F1A2300333EFD /* CIrrMeshWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CIrrMeshWriter.h; sourceTree = "<group>"; }; + 0968402F0D0F1A2300333EFD /* CMD2MeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMD2MeshFileLoader.cpp; sourceTree = "<group>"; }; + 096840300D0F1A2300333EFD /* CMD2MeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMD2MeshFileLoader.h; sourceTree = "<group>"; }; + 096840310D0F1A2300333EFD /* CMS3DMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMS3DMeshFileLoader.cpp; sourceTree = "<group>"; }; + 096840320D0F1A2300333EFD /* CMS3DMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMS3DMeshFileLoader.h; sourceTree = "<group>"; }; + 096840330D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleAnimatedMeshSceneNodeEmitter.cpp; sourceTree = "<group>"; }; + 096840340D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleAnimatedMeshSceneNodeEmitter.h; sourceTree = "<group>"; }; + 096840350D0F1A2300333EFD /* CParticleAttractionAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleAttractionAffector.cpp; sourceTree = "<group>"; }; + 096840360D0F1A2300333EFD /* CParticleAttractionAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleAttractionAffector.h; sourceTree = "<group>"; }; + 096840370D0F1A2300333EFD /* CParticleCylinderEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleCylinderEmitter.cpp; sourceTree = "<group>"; }; + 096840380D0F1A2300333EFD /* CParticleCylinderEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleCylinderEmitter.h; sourceTree = "<group>"; }; + 096840390D0F1A2300333EFD /* CParticleMeshEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleMeshEmitter.cpp; sourceTree = "<group>"; }; + 0968403A0D0F1A2300333EFD /* CParticleMeshEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleMeshEmitter.h; sourceTree = "<group>"; }; + 0968403B0D0F1A2300333EFD /* CParticleRingEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleRingEmitter.cpp; sourceTree = "<group>"; }; + 0968403C0D0F1A2300333EFD /* CParticleRingEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleRingEmitter.h; sourceTree = "<group>"; }; + 0968403D0D0F1A2300333EFD /* CParticleRotationAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleRotationAffector.cpp; sourceTree = "<group>"; }; + 0968403E0D0F1A2300333EFD /* CParticleRotationAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleRotationAffector.h; sourceTree = "<group>"; }; + 0968403F0D0F1A2300333EFD /* CParticleSphereEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleSphereEmitter.cpp; sourceTree = "<group>"; }; + 096840400D0F1A2300333EFD /* CParticleSphereEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleSphereEmitter.h; sourceTree = "<group>"; }; + 096840410D0F1A2300333EFD /* CSkinnedMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSkinnedMesh.cpp; sourceTree = "<group>"; }; + 096840420D0F1A2300333EFD /* CSkinnedMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSkinnedMesh.h; sourceTree = "<group>"; }; + 096840430D0F1A2300333EFD /* CSTLMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSTLMeshFileLoader.cpp; sourceTree = "<group>"; }; + 096840440D0F1A2300333EFD /* CSTLMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSTLMeshFileLoader.h; sourceTree = "<group>"; }; + 096840450D0F1A2300333EFD /* CSTLMeshWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSTLMeshWriter.cpp; sourceTree = "<group>"; }; + 096840460D0F1A2300333EFD /* CSTLMeshWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSTLMeshWriter.h; sourceTree = "<group>"; }; + 096CC0DE0ECE65B500C81DC7 /* CParticleScaleAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleScaleAffector.cpp; sourceTree = "<group>"; }; + 096CC0DF0ECE65B500C81DC7 /* CParticleScaleAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleScaleAffector.h; sourceTree = "<group>"; }; + 096F8E3B0EA2EFBA00907EC5 /* COBJMeshWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COBJMeshWriter.cpp; sourceTree = "<group>"; }; + 096F8E3C0EA2EFBA00907EC5 /* COBJMeshWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COBJMeshWriter.h; sourceTree = "<group>"; }; + 09C638700D4F1A69000B6A18 /* CLWOMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLWOMeshFileLoader.cpp; sourceTree = "<group>"; }; + 09C638710D4F1A69000B6A18 /* CLWOMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLWOMeshFileLoader.h; sourceTree = "<group>"; }; + 09F649030D2CDED9001E0599 /* HelloWorld_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F6492E0D2CE038001E0599 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = 15.LoadIrrFile/main.cpp; sourceTree = "<group>"; }; + 09F6493E0D2CE03E001E0599 /* LoadIrrFile_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LoadIrrFile_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F649650D2CE206001E0599 /* Quake3Shader_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quake3Shader_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F649730D2CE2D0001E0599 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = 16.Quake3MapShader/main.cpp; sourceTree = "<group>"; }; + 0E2E3C431103B1B5002DE8D7 /* jaricom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jaricom.c; sourceTree = "<group>"; }; + 0E2E3C441103B1B5002DE8D7 /* jcarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcarith.c; sourceTree = "<group>"; }; + 0E2E3C451103B1B5002DE8D7 /* jdarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdarith.c; sourceTree = "<group>"; }; + 0E2E3C491103B224002DE8D7 /* Octree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Octree.h; sourceTree = "<group>"; }; + 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COctreeSceneNode.cpp; sourceTree = "<group>"; }; + 0E2E3C4C1103B247002DE8D7 /* COctreeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = COctreeSceneNode.h; sourceTree = "<group>"; }; + 0E2E3C4F1103B261002DE8D7 /* COctreeTriangleSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COctreeTriangleSelector.cpp; sourceTree = "<group>"; }; + 0E2E3C501103B261002DE8D7 /* COctreeTriangleSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = COctreeTriangleSelector.h; sourceTree = "<group>"; }; + 0E2E3C531103B27D002DE8D7 /* CNPKReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CNPKReader.cpp; sourceTree = "<group>"; }; + 0E2E3C541103B27D002DE8D7 /* CNPKReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNPKReader.h; sourceTree = "<group>"; }; + 0E2E3C571103B2AE002DE8D7 /* CIrrDeviceFB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceFB.cpp; sourceTree = "<group>"; }; + 0E2E3C581103B2AE002DE8D7 /* CIrrDeviceFB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceFB.h; sourceTree = "<group>"; }; + 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceWinCE.cpp; sourceTree = "<group>"; }; + 0E2E3C5A1103B2AE002DE8D7 /* CIrrDeviceWinCE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceWinCE.h; sourceTree = "<group>"; }; + 0E2E3C631103B384002DE8D7 /* LzmaDec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LzmaDec.c; path = lzma/LzmaDec.c; sourceTree = "<group>"; }; + 0E2E3C661103B3B9002DE8D7 /* blocksort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blocksort.c; path = bzip2/blocksort.c; sourceTree = "<group>"; }; + 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzcompress.c; path = bzip2/bzcompress.c; sourceTree = "<group>"; }; + 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crctable.c; path = bzip2/crctable.c; sourceTree = "<group>"; }; + 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decompress.c; path = bzip2/decompress.c; sourceTree = "<group>"; }; + 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = huffman.c; path = bzip2/huffman.c; sourceTree = "<group>"; }; + 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = randtable.c; path = bzip2/randtable.c; sourceTree = "<group>"; }; + 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzlib.c; path = bzip2/bzlib.c; sourceTree = "<group>"; }; + 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aescrypt.cpp; path = aesGladman/aescrypt.cpp; sourceTree = "<group>"; }; + 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aeskey.cpp; path = aesGladman/aeskey.cpp; sourceTree = "<group>"; }; + 0E2E3C801103B53C002DE8D7 /* aestab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aestab.cpp; path = aesGladman/aestab.cpp; sourceTree = "<group>"; }; + 0E2E3C811103B53C002DE8D7 /* fileenc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fileenc.cpp; path = aesGladman/fileenc.cpp; sourceTree = "<group>"; }; + 0E2E3C821103B53C002DE8D7 /* hmac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = hmac.cpp; path = aesGladman/hmac.cpp; sourceTree = "<group>"; }; + 0E2E3C831103B53C002DE8D7 /* prng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = prng.cpp; path = aesGladman/prng.cpp; sourceTree = "<group>"; }; + 0E2E3C841103B53C002DE8D7 /* pwd2key.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pwd2key.cpp; path = aesGladman/pwd2key.cpp; sourceTree = "<group>"; }; + 0E2E3C851103B53C002DE8D7 /* sha1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sha1.cpp; path = aesGladman/sha1.cpp; sourceTree = "<group>"; }; + 0E2E3C861103B53C002DE8D7 /* sha2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sha2.cpp; path = aesGladman/sha2.cpp; sourceTree = "<group>"; }; + 0E2E3CFC1103E294002DE8D7 /* SplitScreen_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SplitScreen_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E2E3D3C1103E3F4002DE8D7 /* ManagedLights_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ManagedLights_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E2E3D681103E6C6002DE8D7 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 0E2E3D791103E6E4002DE8D7 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 0E2E3E1B1103F773002DE8D7 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 0E2E3E1D1103F773002DE8D7 /* q3factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = q3factory.cpp; sourceTree = "<group>"; }; + 0E2E3E1E1103F773002DE8D7 /* q3factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = q3factory.h; sourceTree = "<group>"; }; + 0E2E3E261103F773002DE8D7 /* sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sound.cpp; sourceTree = "<group>"; }; + 0E2E3E271103F773002DE8D7 /* sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sound.h; sourceTree = "<group>"; }; + 0E2E3E291103F773002DE8D7 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 0E2E3E321103F773002DE8D7 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 3430E4D41022C391006271FD /* CTarReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTarReader.h; sourceTree = "<group>"; }; + 3430E4D51022C391006271FD /* CTarReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CTarReader.cpp; sourceTree = "<group>"; }; + 344FD4A41039E98C0045FD3F /* CMountPointReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMountPointReader.cpp; sourceTree = "<group>"; }; + 344FD4A51039E98C0045FD3F /* CMountPointReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMountPointReader.h; sourceTree = "<group>"; }; + 3484C4DF0F48D1B000C81F60 /* CGUIImageList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGUIImageList.h; sourceTree = "<group>"; }; + 3484C4E00F48D1B000C81F60 /* CGUIImageList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIImageList.cpp; sourceTree = "<group>"; }; + 3484C4EC0F48D3A100C81F60 /* CGUITreeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGUITreeView.h; sourceTree = "<group>"; }; + 3484C4ED0F48D3A100C81F60 /* CGUITreeView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGUITreeView.cpp; sourceTree = "<group>"; }; + 3484C4FB0F48D4CB00C81F60 /* CMemoryFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMemoryFile.h; sourceTree = "<group>"; }; + 3484C4FC0F48D4CB00C81F60 /* CMemoryFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMemoryFile.cpp; sourceTree = "<group>"; }; + 34EC243A0F59272E0037BC3A /* CIrrDeviceConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceConsole.h; sourceTree = "<group>"; }; + 34EC243B0F59272E0037BC3A /* CIrrDeviceConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceConsole.cpp; sourceTree = "<group>"; }; + 34EF91D00F65FCA6000B5651 /* CImageLoaderRGB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CImageLoaderRGB.h; sourceTree = "<group>"; }; + 34EF91D10F65FCA6000B5651 /* CImageLoaderRGB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CImageLoaderRGB.cpp; sourceTree = "<group>"; }; + 34EF91D50F65FCF6000B5651 /* CPLYMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPLYMeshFileLoader.h; sourceTree = "<group>"; }; + 34EF91D60F65FCF6000B5651 /* CPLYMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPLYMeshFileLoader.cpp; sourceTree = "<group>"; }; + 34EF91DA0F65FD14000B5651 /* CPLYMeshWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPLYMeshWriter.h; sourceTree = "<group>"; }; + 34EF91DB0F65FD14000B5651 /* CPLYMeshWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPLYMeshWriter.cpp; sourceTree = "<group>"; }; + 4C0054710A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054770A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C00547D0A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054830A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = main.cpp; sourceTree = "<group>"; }; + 4C0054890A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C00548F0A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054950A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C00549B0A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054A30A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054AA0A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054B00A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054B60A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054BC0A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C0054C50A48470500C844C2 /* CDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDemo.cpp; sourceTree = "<group>"; }; + 4C0054C60A48470500C844C2 /* CDemo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDemo.h; sourceTree = "<group>"; }; + 4C0054C70A48470500C844C2 /* CMainMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMainMenu.cpp; sourceTree = "<group>"; }; + 4C0054C80A48470500C844C2 /* CMainMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMainMenu.h; sourceTree = "<group>"; }; + 4C0054CA0A48470500C844C2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4C364EA20A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COBJMeshFileLoader.cpp; sourceTree = "<group>"; }; + 4C364EA30A6C6DC2004CFBB4 /* COBJMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COBJMeshFileLoader.h; sourceTree = "<group>"; }; + 4C43EEBE0A74A5C800F942FC /* CPakReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CPakReader.cpp; sourceTree = "<group>"; }; + 4C43EEBF0A74A5C800F942FC /* CPakReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CPakReader.h; sourceTree = "<group>"; }; + 4C53DEE60A484C220014E966 /* BuiltInFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = BuiltInFont.h; sourceTree = "<group>"; }; + 4C53DEE70A484C220014E966 /* C3DSMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = C3DSMeshFileLoader.cpp; sourceTree = "<group>"; }; + 4C53DEE80A484C220014E966 /* C3DSMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = C3DSMeshFileLoader.h; sourceTree = "<group>"; }; + 4C53DEE90A484C220014E966 /* CAnimatedMeshMD2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CAnimatedMeshMD2.cpp; sourceTree = "<group>"; }; + 4C53DEEA0A484C220014E966 /* CAnimatedMeshMD2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAnimatedMeshMD2.h; sourceTree = "<group>"; }; + 4C53DEED0A484C220014E966 /* CAnimatedMeshSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAnimatedMeshSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DEEE0A484C220014E966 /* CAnimatedMeshSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAnimatedMeshSceneNode.h; sourceTree = "<group>"; }; + 4C53DEEF0A484C220014E966 /* CAttributeImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAttributeImpl.h; sourceTree = "<group>"; }; + 4C53DEF00A484C220014E966 /* CAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAttributes.cpp; sourceTree = "<group>"; }; + 4C53DEF10A484C220014E966 /* CAttributes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAttributes.h; sourceTree = "<group>"; }; + 4C53DEF20A484C220014E966 /* CBillboardSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CBillboardSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DEF30A484C220014E966 /* CBillboardSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CBillboardSceneNode.h; sourceTree = "<group>"; }; + 4C53DEF80A484C220014E966 /* CCameraSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CCameraSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DEF90A484C220014E966 /* CCameraSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CCameraSceneNode.h; sourceTree = "<group>"; }; + 4C53DEFA0A484C220014E966 /* CColladaFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CColladaFileLoader.cpp; sourceTree = "<group>"; }; + 4C53DEFB0A484C220014E966 /* CColladaFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CColladaFileLoader.h; sourceTree = "<group>"; }; + 4C53DEFC0A484C220014E966 /* CColorConverter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CColorConverter.cpp; sourceTree = "<group>"; }; + 4C53DEFD0A484C220014E966 /* CColorConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CColorConverter.h; sourceTree = "<group>"; }; + 4C53DEFE0A484C220014E966 /* CCSMLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CCSMLoader.cpp; sourceTree = "<group>"; }; + 4C53DEFF0A484C220014E966 /* CCSMLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CCSMLoader.h; sourceTree = "<group>"; }; + 4C53DF000A484C220014E966 /* CCubeSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CCubeSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DF010A484C220014E966 /* CCubeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CCubeSceneNode.h; sourceTree = "<group>"; }; + 4C53DF020A484C220014E966 /* CD3D8Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D8Driver.cpp; sourceTree = "<group>"; }; + 4C53DF030A484C220014E966 /* CD3D8Driver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D8Driver.h; sourceTree = "<group>"; }; + 4C53DF040A484C220014E966 /* CD3D8MaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D8MaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF050A484C220014E966 /* CD3D8NormalMapRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D8NormalMapRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF060A484C220014E966 /* CD3D8NormalMapRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D8NormalMapRenderer.h; sourceTree = "<group>"; }; + 4C53DF070A484C230014E966 /* CD3D8ParallaxMapRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D8ParallaxMapRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF080A484C230014E966 /* CD3D8ParallaxMapRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D8ParallaxMapRenderer.h; sourceTree = "<group>"; }; + 4C53DF090A484C230014E966 /* CD3D8ShaderMaterialRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D8ShaderMaterialRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF0A0A484C230014E966 /* CD3D8ShaderMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D8ShaderMaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF0B0A484C230014E966 /* CD3D8Texture.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D8Texture.cpp; sourceTree = "<group>"; }; + 4C53DF0C0A484C230014E966 /* CD3D8Texture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D8Texture.h; sourceTree = "<group>"; }; + 4C53DF0D0A484C230014E966 /* CD3D9Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D9Driver.cpp; sourceTree = "<group>"; }; + 4C53DF0E0A484C230014E966 /* CD3D9Driver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9Driver.h; sourceTree = "<group>"; }; + 4C53DF0F0A484C230014E966 /* CD3D9HLSLMaterialRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D9HLSLMaterialRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF100A484C230014E966 /* CD3D9HLSLMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9HLSLMaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF110A484C230014E966 /* CD3D9MaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9MaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF120A484C230014E966 /* CD3D9NormalMapRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D9NormalMapRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF130A484C230014E966 /* CD3D9NormalMapRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9NormalMapRenderer.h; sourceTree = "<group>"; }; + 4C53DF140A484C230014E966 /* CD3D9ParallaxMapRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D9ParallaxMapRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF150A484C230014E966 /* CD3D9ParallaxMapRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9ParallaxMapRenderer.h; sourceTree = "<group>"; }; + 4C53DF160A484C230014E966 /* CD3D9ShaderMaterialRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D9ShaderMaterialRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF170A484C230014E966 /* CD3D9ShaderMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9ShaderMaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF180A484C230014E966 /* CD3D9Texture.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CD3D9Texture.cpp; sourceTree = "<group>"; }; + 4C53DF190A484C230014E966 /* CD3D9Texture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CD3D9Texture.h; sourceTree = "<group>"; }; + 4C53DF1C0A484C230014E966 /* CDefaultSceneNodeAnimatorFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDefaultSceneNodeAnimatorFactory.cpp; sourceTree = "<group>"; }; + 4C53DF1D0A484C230014E966 /* CDefaultSceneNodeAnimatorFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDefaultSceneNodeAnimatorFactory.h; sourceTree = "<group>"; }; + 4C53DF1E0A484C230014E966 /* CDefaultSceneNodeFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDefaultSceneNodeFactory.cpp; sourceTree = "<group>"; }; + 4C53DF1F0A484C230014E966 /* CDefaultSceneNodeFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDefaultSceneNodeFactory.h; sourceTree = "<group>"; }; + 4C53DF200A484C230014E966 /* CDMFLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDMFLoader.cpp; sourceTree = "<group>"; }; + 4C53DF210A484C230014E966 /* CDMFLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDMFLoader.h; sourceTree = "<group>"; }; + 4C53DF220A484C230014E966 /* CDummyTransformationSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDummyTransformationSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DF230A484C230014E966 /* CDummyTransformationSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDummyTransformationSceneNode.h; sourceTree = "<group>"; }; + 4C53DF240A484C230014E966 /* CEmptySceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CEmptySceneNode.cpp; sourceTree = "<group>"; }; + 4C53DF250A484C230014E966 /* CEmptySceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CEmptySceneNode.h; sourceTree = "<group>"; }; + 4C53DF260A484C230014E966 /* CFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CFileList.cpp; sourceTree = "<group>"; }; + 4C53DF270A484C230014E966 /* CFileList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFileList.h; sourceTree = "<group>"; }; + 4C53DF280A484C230014E966 /* CFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CFileSystem.cpp; sourceTree = "<group>"; }; + 4C53DF290A484C230014E966 /* CFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFileSystem.h; sourceTree = "<group>"; }; + 4C53DF2A0A484C230014E966 /* CFPSCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CFPSCounter.cpp; sourceTree = "<group>"; }; + 4C53DF2B0A484C230014E966 /* CFPSCounter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFPSCounter.h; sourceTree = "<group>"; }; + 4C53DF2C0A484C230014E966 /* CGeometryCreator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGeometryCreator.cpp; sourceTree = "<group>"; }; + 4C53DF2D0A484C230014E966 /* CGeometryCreator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGeometryCreator.h; sourceTree = "<group>"; }; + 4C53DF2E0A484C230014E966 /* CGUIButton.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIButton.cpp; sourceTree = "<group>"; }; + 4C53DF2F0A484C230014E966 /* CGUIButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIButton.h; sourceTree = "<group>"; }; + 4C53DF300A484C230014E966 /* CGUICheckBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUICheckBox.cpp; sourceTree = "<group>"; }; + 4C53DF310A484C230014E966 /* CGUICheckBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUICheckBox.h; sourceTree = "<group>"; }; + 4C53DF320A484C230014E966 /* CGUIComboBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIComboBox.cpp; sourceTree = "<group>"; }; + 4C53DF330A484C230014E966 /* CGUIComboBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIComboBox.h; sourceTree = "<group>"; }; + 4C53DF340A484C230014E966 /* CGUIContextMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIContextMenu.cpp; sourceTree = "<group>"; }; + 4C53DF350A484C230014E966 /* CGUIContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIContextMenu.h; sourceTree = "<group>"; }; + 4C53DF360A484C230014E966 /* CGUIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIEditBox.cpp; sourceTree = "<group>"; }; + 4C53DF370A484C230014E966 /* CGUIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIEditBox.h; sourceTree = "<group>"; }; + 4C53DF380A484C230014E966 /* CGUIEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CGUIEnvironment.cpp; sourceTree = "<group>"; }; + 4C53DF390A484C230014E966 /* CGUIEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIEnvironment.h; sourceTree = "<group>"; }; + 4C53DF3A0A484C230014E966 /* CGUIFileOpenDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIFileOpenDialog.cpp; sourceTree = "<group>"; }; + 4C53DF3B0A484C230014E966 /* CGUIFileOpenDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIFileOpenDialog.h; sourceTree = "<group>"; }; + 4C53DF3C0A484C230014E966 /* CGUIFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CGUIFont.cpp; sourceTree = "<group>"; }; + 4C53DF3D0A484C230014E966 /* CGUIFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIFont.h; sourceTree = "<group>"; }; + 4C53DF3E0A484C230014E966 /* CGUIImage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIImage.cpp; sourceTree = "<group>"; }; + 4C53DF3F0A484C230014E966 /* CGUIImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIImage.h; sourceTree = "<group>"; }; + 4C53DF400A484C230014E966 /* CGUIInOutFader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIInOutFader.cpp; sourceTree = "<group>"; }; + 4C53DF410A484C230014E966 /* CGUIInOutFader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIInOutFader.h; sourceTree = "<group>"; }; + 4C53DF420A484C230014E966 /* CGUIListBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIListBox.cpp; sourceTree = "<group>"; }; + 4C53DF430A484C230014E966 /* CGUIListBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIListBox.h; sourceTree = "<group>"; }; + 4C53DF440A484C230014E966 /* CGUIMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIMenu.cpp; sourceTree = "<group>"; }; + 4C53DF450A484C230014E966 /* CGUIMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIMenu.h; sourceTree = "<group>"; }; + 4C53DF460A484C230014E966 /* CGUIMeshViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIMeshViewer.cpp; sourceTree = "<group>"; }; + 4C53DF470A484C230014E966 /* CGUIMeshViewer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIMeshViewer.h; sourceTree = "<group>"; }; + 4C53DF480A484C230014E966 /* CGUIMessageBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIMessageBox.cpp; sourceTree = "<group>"; }; + 4C53DF490A484C230014E966 /* CGUIMessageBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIMessageBox.h; sourceTree = "<group>"; }; + 4C53DF4A0A484C230014E966 /* CGUIModalScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIModalScreen.cpp; sourceTree = "<group>"; }; + 4C53DF4B0A484C230014E966 /* CGUIModalScreen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIModalScreen.h; sourceTree = "<group>"; }; + 4C53DF4C0A484C230014E966 /* CGUIScrollBar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIScrollBar.cpp; sourceTree = "<group>"; }; + 4C53DF4D0A484C230014E966 /* CGUIScrollBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIScrollBar.h; sourceTree = "<group>"; }; + 4C53DF4E0A484C230014E966 /* CGUISkin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUISkin.cpp; sourceTree = "<group>"; }; + 4C53DF4F0A484C230014E966 /* CGUISkin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUISkin.h; sourceTree = "<group>"; }; + 4C53DF500A484C230014E966 /* CGUIStaticText.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIStaticText.cpp; sourceTree = "<group>"; }; + 4C53DF510A484C230014E966 /* CGUIStaticText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIStaticText.h; sourceTree = "<group>"; }; + 4C53DF520A484C230014E966 /* CGUITabControl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUITabControl.cpp; sourceTree = "<group>"; }; + 4C53DF530A484C230014E966 /* CGUITabControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUITabControl.h; sourceTree = "<group>"; }; + 4C53DF540A484C230014E966 /* CGUIToolBar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIToolBar.cpp; sourceTree = "<group>"; }; + 4C53DF550A484C230014E966 /* CGUIToolBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIToolBar.h; sourceTree = "<group>"; }; + 4C53DF560A484C230014E966 /* CGUIWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIWindow.cpp; sourceTree = "<group>"; }; + 4C53DF570A484C230014E966 /* CGUIWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CGUIWindow.h; sourceTree = "<group>"; }; + 4C53DF580A484C230014E966 /* CImage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImage.cpp; sourceTree = "<group>"; }; + 4C53DF590A484C230014E966 /* CImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImage.h; sourceTree = "<group>"; }; + 4C53DF5C0A484C230014E966 /* CImageLoaderJPG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageLoaderJPG.cpp; sourceTree = "<group>"; }; + 4C53DF5D0A484C230014E966 /* CImageLoaderJPG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderJPG.h; sourceTree = "<group>"; }; + 4C53DF5E0A484C230014E966 /* CImageLoaderPCX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CImageLoaderPCX.cpp; sourceTree = "<group>"; }; + 4C53DF5F0A484C230014E966 /* CImageLoaderPCX.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderPCX.h; sourceTree = "<group>"; }; + 4C53DF600A484C230014E966 /* CImageLoaderPNG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageLoaderPNG.cpp; sourceTree = "<group>"; }; + 4C53DF610A484C230014E966 /* CImageLoaderPNG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderPNG.h; sourceTree = "<group>"; }; + 4C53DF620A484C230014E966 /* CImageLoaderPSD.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CImageLoaderPSD.cpp; sourceTree = "<group>"; }; + 4C53DF630A484C230014E966 /* CImageLoaderPSD.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderPSD.h; sourceTree = "<group>"; }; + 4C53DF640A484C230014E966 /* CImageLoaderTGA.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CImageLoaderTGA.cpp; sourceTree = "<group>"; }; + 4C53DF650A484C230014E966 /* CImageLoaderTGA.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderTGA.h; sourceTree = "<group>"; }; + 4C53DF660A484C230014E966 /* CIrrDeviceLinux.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceLinux.cpp; sourceTree = "<group>"; }; + 4C53DF670A484C230014E966 /* CIrrDeviceLinux.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceLinux.h; sourceTree = "<group>"; }; + 4C53DF680A484C230014E966 /* CIrrDeviceStub.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceStub.cpp; sourceTree = "<group>"; }; + 4C53DF690A484C230014E966 /* CIrrDeviceStub.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceStub.h; sourceTree = "<group>"; }; + 4C53DF6A0A484C230014E966 /* CIrrDeviceWin32.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceWin32.cpp; sourceTree = "<group>"; }; + 4C53DF6B0A484C230014E966 /* CIrrDeviceWin32.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceWin32.h; sourceTree = "<group>"; }; + 4C53DF6C0A484C230014E966 /* CLightSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLightSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DF6D0A484C230014E966 /* CLightSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLightSceneNode.h; sourceTree = "<group>"; }; + 4C53DF6E0A484C230014E966 /* CLimitReadFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CLimitReadFile.cpp; sourceTree = "<group>"; }; + 4C53DF6F0A484C230014E966 /* CLimitReadFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = CLimitReadFile.h; sourceTree = "<group>"; }; + 4C53DF700A484C230014E966 /* CLMTSMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLMTSMeshFileLoader.cpp; sourceTree = "<group>"; }; + 4C53DF710A484C230014E966 /* CLMTSMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLMTSMeshFileLoader.h; sourceTree = "<group>"; }; + 4C53DF720A484C230014E966 /* CLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLogger.cpp; sourceTree = "<group>"; }; + 4C53DF730A484C230014E966 /* CLogger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLogger.h; sourceTree = "<group>"; }; + 4C53DF760A484C230014E966 /* CMeshCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMeshCache.cpp; sourceTree = "<group>"; }; + 4C53DF770A484C230014E966 /* CMeshCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMeshCache.h; sourceTree = "<group>"; }; + 4C53DF780A484C230014E966 /* CMeshManipulator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMeshManipulator.cpp; sourceTree = "<group>"; }; + 4C53DF790A484C230014E966 /* CMeshManipulator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMeshManipulator.h; sourceTree = "<group>"; }; + 4C53DF7A0A484C230014E966 /* CMeshSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMeshSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DF7B0A484C230014E966 /* CMeshSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMeshSceneNode.h; sourceTree = "<group>"; }; + 4C53DF7C0A484C230014E966 /* CMetaTriangleSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMetaTriangleSelector.cpp; sourceTree = "<group>"; }; + 4C53DF7D0A484C230014E966 /* CMetaTriangleSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMetaTriangleSelector.h; sourceTree = "<group>"; }; + 4C53DF7E0A484C230014E966 /* CMY3DHelper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMY3DHelper.h; sourceTree = "<group>"; }; + 4C53DF7F0A484C230014E966 /* CMY3DMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CMY3DMeshFileLoader.cpp; sourceTree = "<group>"; }; + 4C53DF800A484C230014E966 /* CMY3DMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMY3DMeshFileLoader.h; sourceTree = "<group>"; }; + 4C53DF820A484C240014E966 /* CNullDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CNullDriver.cpp; sourceTree = "<group>"; }; + 4C53DF830A484C240014E966 /* CNullDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CNullDriver.h; sourceTree = "<group>"; }; + 4C53DF840A484C240014E966 /* COCTLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COCTLoader.cpp; sourceTree = "<group>"; }; + 4C53DF850A484C240014E966 /* COCTLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COCTLoader.h; sourceTree = "<group>"; }; + 4C53DF8A0A484C240014E966 /* COgreMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = COgreMeshFileLoader.cpp; sourceTree = "<group>"; }; + 4C53DF8B0A484C240014E966 /* COgreMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = COgreMeshFileLoader.h; sourceTree = "<group>"; }; + 4C53DF8C0A484C240014E966 /* COpenGLDriver.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; lineEnding = 2; path = COpenGLDriver.cpp; sourceTree = "<group>"; }; + 4C53DF8D0A484C240014E966 /* COpenGLDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = COpenGLDriver.h; sourceTree = "<group>"; }; + 4C53DF8E0A484C240014E966 /* COpenGLMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COpenGLMaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF8F0A484C240014E966 /* COpenGLNormalMapRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COpenGLNormalMapRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF900A484C240014E966 /* COpenGLNormalMapRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COpenGLNormalMapRenderer.h; sourceTree = "<group>"; }; + 4C53DF910A484C240014E966 /* COpenGLParallaxMapRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COpenGLParallaxMapRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF920A484C240014E966 /* COpenGLParallaxMapRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COpenGLParallaxMapRenderer.h; sourceTree = "<group>"; }; + 4C53DF930A484C240014E966 /* COpenGLShaderMaterialRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COpenGLShaderMaterialRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF940A484C240014E966 /* COpenGLShaderMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COpenGLShaderMaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF950A484C240014E966 /* COpenGLSLMaterialRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = COpenGLSLMaterialRenderer.cpp; sourceTree = "<group>"; }; + 4C53DF960A484C240014E966 /* COpenGLSLMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COpenGLSLMaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DF970A484C240014E966 /* COpenGLTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COpenGLTexture.cpp; sourceTree = "<group>"; }; + 4C53DF980A484C240014E966 /* COpenGLTexture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COpenGLTexture.h; sourceTree = "<group>"; }; + 4C53DF990A484C240014E966 /* COSOperator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = COSOperator.cpp; sourceTree = "<group>"; }; + 4C53DF9A0A484C240014E966 /* COSOperator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = COSOperator.h; sourceTree = "<group>"; }; + 4C53DF9B0A484C240014E966 /* CParticleBoxEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleBoxEmitter.cpp; sourceTree = "<group>"; }; + 4C53DF9C0A484C240014E966 /* CParticleBoxEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleBoxEmitter.h; sourceTree = "<group>"; }; + 4C53DF9D0A484C240014E966 /* CParticleFadeOutAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleFadeOutAffector.cpp; sourceTree = "<group>"; }; + 4C53DF9E0A484C240014E966 /* CParticleFadeOutAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleFadeOutAffector.h; sourceTree = "<group>"; }; + 4C53DF9F0A484C240014E966 /* CParticleGravityAffector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleGravityAffector.cpp; sourceTree = "<group>"; }; + 4C53DFA00A484C240014E966 /* CParticleGravityAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleGravityAffector.h; sourceTree = "<group>"; }; + 4C53DFA10A484C240014E966 /* CParticlePointEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticlePointEmitter.cpp; sourceTree = "<group>"; }; + 4C53DFA20A484C240014E966 /* CParticlePointEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticlePointEmitter.h; sourceTree = "<group>"; }; + 4C53DFA30A484C240014E966 /* CParticleSystemSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CParticleSystemSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DFA40A484C240014E966 /* CParticleSystemSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CParticleSystemSceneNode.h; sourceTree = "<group>"; }; + 4C53DFA50A484C240014E966 /* CQ3LevelMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CQ3LevelMesh.cpp; sourceTree = "<group>"; }; + 4C53DFA60A484C240014E966 /* CQ3LevelMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CQ3LevelMesh.h; sourceTree = "<group>"; }; + 4C53DFA70A484C240014E966 /* CReadFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CReadFile.cpp; sourceTree = "<group>"; }; + 4C53DFA80A484C240014E966 /* CReadFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = CReadFile.h; sourceTree = "<group>"; }; + 4C53DFA90A484C240014E966 /* CSceneCollisionManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneCollisionManager.cpp; sourceTree = "<group>"; }; + 4C53DFAA0A484C240014E966 /* CSceneCollisionManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneCollisionManager.h; sourceTree = "<group>"; }; + 4C53DFAB0A484C240014E966 /* CSceneManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneManager.cpp; sourceTree = "<group>"; }; + 4C53DFAC0A484C240014E966 /* CSceneManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneManager.h; sourceTree = "<group>"; }; + 4C53DFAD0A484C240014E966 /* CSceneNodeAnimatorCollisionResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorCollisionResponse.cpp; sourceTree = "<group>"; }; + 4C53DFAE0A484C240014E966 /* CSceneNodeAnimatorCollisionResponse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorCollisionResponse.h; sourceTree = "<group>"; }; + 4C53DFAF0A484C240014E966 /* CSceneNodeAnimatorDelete.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorDelete.cpp; sourceTree = "<group>"; }; + 4C53DFB00A484C240014E966 /* CSceneNodeAnimatorDelete.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorDelete.h; sourceTree = "<group>"; }; + 4C53DFB10A484C240014E966 /* CSceneNodeAnimatorFlyCircle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorFlyCircle.cpp; sourceTree = "<group>"; }; + 4C53DFB20A484C240014E966 /* CSceneNodeAnimatorFlyCircle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorFlyCircle.h; sourceTree = "<group>"; }; + 4C53DFB30A484C240014E966 /* CSceneNodeAnimatorFlyStraight.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorFlyStraight.cpp; sourceTree = "<group>"; }; + 4C53DFB40A484C240014E966 /* CSceneNodeAnimatorFlyStraight.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorFlyStraight.h; sourceTree = "<group>"; }; + 4C53DFB50A484C240014E966 /* CSceneNodeAnimatorFollowSpline.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorFollowSpline.cpp; sourceTree = "<group>"; }; + 4C53DFB60A484C240014E966 /* CSceneNodeAnimatorFollowSpline.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorFollowSpline.h; sourceTree = "<group>"; }; + 4C53DFB70A484C240014E966 /* CSceneNodeAnimatorRotation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorRotation.cpp; sourceTree = "<group>"; }; + 4C53DFB80A484C240014E966 /* CSceneNodeAnimatorRotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorRotation.h; sourceTree = "<group>"; }; + 4C53DFB90A484C240014E966 /* CSceneNodeAnimatorTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSceneNodeAnimatorTexture.cpp; sourceTree = "<group>"; }; + 4C53DFBA0A484C240014E966 /* CSceneNodeAnimatorTexture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSceneNodeAnimatorTexture.h; sourceTree = "<group>"; }; + 4C53DFBB0A484C240014E966 /* CShadowVolumeSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CShadowVolumeSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DFBC0A484C240014E966 /* CShadowVolumeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CShadowVolumeSceneNode.h; sourceTree = "<group>"; }; + 4C53DFBD0A484C240014E966 /* CSkyBoxSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSkyBoxSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DFBE0A484C240014E966 /* CSkyBoxSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSkyBoxSceneNode.h; sourceTree = "<group>"; }; + 4C53DFBF0A484C240014E966 /* CSoftware2MaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSoftware2MaterialRenderer.h; sourceTree = "<group>"; }; + 4C53DFC00A484C240014E966 /* CSoftwareDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSoftwareDriver.cpp; sourceTree = "<group>"; }; + 4C53DFC10A484C240014E966 /* CSoftwareDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSoftwareDriver.h; sourceTree = "<group>"; }; + 4C53DFC20A484C240014E966 /* CSoftwareDriver2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSoftwareDriver2.cpp; sourceTree = "<group>"; }; + 4C53DFC30A484C240014E966 /* CSoftwareDriver2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSoftwareDriver2.h; sourceTree = "<group>"; }; + 4C53DFC40A484C240014E966 /* CSoftwareTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSoftwareTexture.cpp; sourceTree = "<group>"; }; + 4C53DFC50A484C240014E966 /* CSoftwareTexture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSoftwareTexture.h; sourceTree = "<group>"; }; + 4C53DFC60A484C240014E966 /* CSoftwareTexture2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSoftwareTexture2.cpp; sourceTree = "<group>"; }; + 4C53DFC70A484C240014E966 /* CSoftwareTexture2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSoftwareTexture2.h; sourceTree = "<group>"; }; + 4C53DFCA0A484C240014E966 /* CTerrainSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTerrainSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DFCB0A484C240014E966 /* CTerrainSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTerrainSceneNode.h; sourceTree = "<group>"; }; + 4C53DFCC0A484C240014E966 /* CTerrainTriangleSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTerrainTriangleSelector.cpp; sourceTree = "<group>"; }; + 4C53DFCD0A484C240014E966 /* CTerrainTriangleSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTerrainTriangleSelector.h; sourceTree = "<group>"; }; + 4C53DFCE0A484C240014E966 /* CTextSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTextSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DFCF0A484C240014E966 /* CTextSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTextSceneNode.h; sourceTree = "<group>"; }; + 4C53DFD00A484C240014E966 /* CTimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTimer.h; sourceTree = "<group>"; }; + 4C53DFD10A484C240014E966 /* CTRFlat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRFlat.cpp; sourceTree = "<group>"; }; + 4C53DFD20A484C240014E966 /* CTRFlatWire.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRFlatWire.cpp; sourceTree = "<group>"; }; + 4C53DFD30A484C240014E966 /* CTRGouraud.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRGouraud.cpp; sourceTree = "<group>"; }; + 4C53DFD40A484C240014E966 /* CTRGouraud2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRGouraud2.cpp; sourceTree = "<group>"; }; + 4C53DFD50A484C240014E966 /* CTRGouraudAlpha2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRGouraudAlpha2.cpp; sourceTree = "<group>"; }; + 4C53DFD60A484C240014E966 /* CTRGouraudAlphaNoZ2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRGouraudAlphaNoZ2.cpp; sourceTree = "<group>"; }; + 4C53DFD70A484C240014E966 /* CTRGouraudWire.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRGouraudWire.cpp; sourceTree = "<group>"; }; + 4C53DFD80A484C240014E966 /* CTriangleBBSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTriangleBBSelector.cpp; sourceTree = "<group>"; }; + 4C53DFD90A484C250014E966 /* CTriangleBBSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTriangleBBSelector.h; sourceTree = "<group>"; }; + 4C53DFDA0A484C250014E966 /* CTriangleSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTriangleSelector.cpp; sourceTree = "<group>"; }; + 4C53DFDB0A484C250014E966 /* CTriangleSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTriangleSelector.h; sourceTree = "<group>"; }; + 4C53DFDC0A484C250014E966 /* CTRTextureDetailMap2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureDetailMap2.cpp; sourceTree = "<group>"; }; + 4C53DFDD0A484C250014E966 /* CTRTextureFlat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureFlat.cpp; sourceTree = "<group>"; }; + 4C53DFDE0A484C250014E966 /* CTRTextureFlatWire.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureFlatWire.cpp; sourceTree = "<group>"; }; + 4C53DFDF0A484C250014E966 /* CTRTextureGouraud.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraud.cpp; sourceTree = "<group>"; }; + 4C53DFE00A484C250014E966 /* CTRTextureGouraud.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTRTextureGouraud.h; sourceTree = "<group>"; }; + 4C53DFE10A484C250014E966 /* CTRTextureGouraud2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraud2.cpp; sourceTree = "<group>"; }; + 4C53DFE20A484C250014E966 /* CTRTextureGouraudAdd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudAdd.cpp; sourceTree = "<group>"; }; + 4C53DFE30A484C250014E966 /* CTRTextureGouraudAdd2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudAdd2.cpp; sourceTree = "<group>"; }; + 4C53DFE40A484C250014E966 /* CTRTextureGouraudAddNoZ2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudAddNoZ2.cpp; sourceTree = "<group>"; }; + 4C53DFE50A484C250014E966 /* CTRTextureGouraudNoZ.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudNoZ.cpp; sourceTree = "<group>"; }; + 4C53DFE60A484C250014E966 /* CTRTextureGouraudNoZ2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudNoZ2.cpp; sourceTree = "<group>"; }; + 4C53DFE70A484C250014E966 /* CTRTextureGouraudVertexAlpha2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudVertexAlpha2.cpp; sourceTree = "<group>"; }; + 4C53DFE80A484C250014E966 /* CTRTextureGouraudWire.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudWire.cpp; sourceTree = "<group>"; }; + 4C53DFE90A484C250014E966 /* CTRTextureLightMap2_Add.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureLightMap2_Add.cpp; sourceTree = "<group>"; }; + 4C53DFEA0A484C250014E966 /* CTRTextureLightMap2_M1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureLightMap2_M1.cpp; sourceTree = "<group>"; }; + 4C53DFEB0A484C250014E966 /* CTRTextureLightMap2_M2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureLightMap2_M2.cpp; sourceTree = "<group>"; }; + 4C53DFEC0A484C250014E966 /* CTRTextureLightMap2_M4.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureLightMap2_M4.cpp; sourceTree = "<group>"; }; + 4C53DFED0A484C250014E966 /* CTRTextureWire2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureWire2.cpp; sourceTree = "<group>"; }; + 4C53DFEE0A484C250014E966 /* CVideoModeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CVideoModeList.cpp; sourceTree = "<group>"; }; + 4C53DFEF0A484C250014E966 /* CVideoModeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CVideoModeList.h; sourceTree = "<group>"; }; + 4C53DFF00A484C250014E966 /* CWaterSurfaceSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CWaterSurfaceSceneNode.cpp; sourceTree = "<group>"; }; + 4C53DFF10A484C250014E966 /* CWaterSurfaceSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CWaterSurfaceSceneNode.h; sourceTree = "<group>"; }; + 4C53DFF20A484C250014E966 /* CWriteFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CWriteFile.cpp; sourceTree = "<group>"; }; + 4C53DFF30A484C250014E966 /* CWriteFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CWriteFile.h; sourceTree = "<group>"; }; + 4C53DFF80A484C250014E966 /* CXMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CXMeshFileLoader.cpp; sourceTree = "<group>"; }; + 4C53DFF90A484C250014E966 /* CXMeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CXMeshFileLoader.h; sourceTree = "<group>"; }; + 4C53DFFA0A484C250014E966 /* CXMLReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CXMLReader.cpp; sourceTree = "<group>"; }; + 4C53DFFB0A484C250014E966 /* CXMLReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CXMLReader.h; sourceTree = "<group>"; }; + 4C53DFFC0A484C250014E966 /* CXMLReaderImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CXMLReaderImpl.h; sourceTree = "<group>"; }; + 4C53DFFD0A484C250014E966 /* CXMLWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CXMLWriter.cpp; sourceTree = "<group>"; }; + 4C53DFFE0A484C250014E966 /* CXMLWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CXMLWriter.h; sourceTree = "<group>"; }; + 4C53DFFF0A484C250014E966 /* CZBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CZBuffer.cpp; sourceTree = "<group>"; }; + 4C53E0000A484C250014E966 /* CZBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CZBuffer.h; sourceTree = "<group>"; }; + 4C53E0030A484C250014E966 /* CZipReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CZipReader.cpp; sourceTree = "<group>"; }; + 4C53E0040A484C250014E966 /* CZipReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CZipReader.h; sourceTree = "<group>"; }; + 4C53E0050A484C250014E966 /* dmfsupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dmfsupport.h; sourceTree = "<group>"; }; + 4C53E0070A484C250014E966 /* glext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glext.h; sourceTree = "<group>"; }; + 4C53E0090A484C250014E966 /* IImagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IImagePresenter.h; sourceTree = "<group>"; }; + 4C53E00A0A484C250014E966 /* Irrlicht.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = Irrlicht.cpp; sourceTree = "<group>"; }; + 4C53E00E0A484C250014E966 /* irrXML.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = irrXML.cpp; sourceTree = "<group>"; }; + 4C53E00F0A484C250014E966 /* ITriangleRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ITriangleRenderer.h; sourceTree = "<group>"; }; + 4C53E0110A484C250014E966 /* IZBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IZBuffer.h; sourceTree = "<group>"; }; + 4C53E14C0A484C2C0014E966 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; + 4C53E14D0A484C2C0014E966 /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = "<group>"; }; + 4C53E15E0A484C2C0014E966 /* CIrrDeviceMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceMacOSX.h; sourceTree = "<group>"; }; + 4C53E15F0A484C2C0014E966 /* CIrrDeviceMacOSX.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = CIrrDeviceMacOSX.mm; sourceTree = "<group>"; }; + 4C53E1640A484C2C0014E966 /* MacOSX_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MacOSX_Prefix.pch; sourceTree = "<group>"; }; + 4C53E1650A484C2C0014E966 /* MainMenu.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = MainMenu.nib; sourceTree = "<group>"; }; + 4C53E1660A484C2C0014E966 /* OSXClipboard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OSXClipboard.h; sourceTree = "<group>"; }; + 4C53E1670A484C2C0014E966 /* OSXClipboard.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = OSXClipboard.mm; sourceTree = "<group>"; }; + 4C53E16A0A484C2C0014E966 /* os.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = os.cpp; sourceTree = "<group>"; }; + 4C53E16B0A484C2C0014E966 /* os.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = os.h; sourceTree = "<group>"; }; + 4C53E16C0A484C2C0014E966 /* S2DVertex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = S2DVertex.h; sourceTree = "<group>"; }; + 4C53E16D0A484C2C0014E966 /* S4DVertex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = S4DVertex.h; sourceTree = "<group>"; }; + 4C53E16E0A484C2C0014E966 /* SoftwareDriver2_compile_config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SoftwareDriver2_compile_config.h; sourceTree = "<group>"; }; + 4C53E16F0A484C2C0014E966 /* SoftwareDriver2_helper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SoftwareDriver2_helper.h; sourceTree = "<group>"; }; + 4C53E1720A484C2C0014E966 /* adler32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = adler32.c; sourceTree = "<group>"; }; + 4C53E1750A484C2C0014E966 /* compress.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = "<group>"; }; + 4C53E1770A484C2C0014E966 /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = crc32.c; sourceTree = "<group>"; }; + 4C53E1790A484C2C0014E966 /* deflate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = deflate.c; sourceTree = "<group>"; }; + 4C53E1800A484C2C0014E966 /* inffast.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inffast.c; sourceTree = "<group>"; }; + 4C53E1850A484C2C0014E966 /* inftrees.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inftrees.c; sourceTree = "<group>"; }; + 4C53E18B0A484C2C0014E966 /* trees.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = trees.c; sourceTree = "<group>"; }; + 4C53E18D0A484C2C0014E966 /* uncompr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = uncompr.c; sourceTree = "<group>"; }; + 4C53E1920A484C2C0014E966 /* zutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = zutil.c; sourceTree = "<group>"; }; + 4C53E24D0A4850120014E966 /* libIrrlicht.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIrrlicht.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4C53E2520A4850550014E966 /* Quake3Map_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quake3Map_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4C53E26D0A4850D60014E966 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + 4C53E26E0A4850D60014E966 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; + 4C53E6F10A485CD80014E966 /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapimin.c; sourceTree = "<group>"; }; + 4C53E6F20A485CD80014E966 /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapistd.c; sourceTree = "<group>"; }; + 4C53E6F30A485CD80014E966 /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccoefct.c; sourceTree = "<group>"; }; + 4C53E6F40A485CD80014E966 /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccolor.c; sourceTree = "<group>"; }; + 4C53E6F50A485CD80014E966 /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcdctmgr.c; sourceTree = "<group>"; }; + 4C53E6F60A485CD80014E966 /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jchuff.c; sourceTree = "<group>"; }; + 4C53E6F80A485CD80014E966 /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcinit.c; sourceTree = "<group>"; }; + 4C53E6F90A485CD80014E966 /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmainct.c; sourceTree = "<group>"; }; + 4C53E6FA0A485CD80014E966 /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmarker.c; sourceTree = "<group>"; }; + 4C53E6FB0A485CD80014E966 /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmaster.c; sourceTree = "<group>"; }; + 4C53E6FC0A485CD80014E966 /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcomapi.c; sourceTree = "<group>"; }; + 4C53E70A0A485CD80014E966 /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcparam.c; sourceTree = "<group>"; }; + 4C53E70C0A485CD80014E966 /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcprepct.c; sourceTree = "<group>"; }; + 4C53E70D0A485CD80014E966 /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcsample.c; sourceTree = "<group>"; }; + 4C53E70E0A485CD80014E966 /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jctrans.c; sourceTree = "<group>"; }; + 4C53E70F0A485CD80014E966 /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapimin.c; sourceTree = "<group>"; }; + 4C53E7100A485CD80014E966 /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapistd.c; sourceTree = "<group>"; }; + 4C53E7110A485CD80014E966 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatadst.c; sourceTree = "<group>"; }; + 4C53E7120A485CD80014E966 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatasrc.c; sourceTree = "<group>"; }; + 4C53E7130A485CD80014E966 /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcoefct.c; sourceTree = "<group>"; }; + 4C53E7140A485CD80014E966 /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcolor.c; sourceTree = "<group>"; }; + 4C53E7160A485CD80014E966 /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jddctmgr.c; sourceTree = "<group>"; }; + 4C53E7170A485CD80014E966 /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdhuff.c; sourceTree = "<group>"; }; + 4C53E7190A485CD80014E966 /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdinput.c; sourceTree = "<group>"; }; + 4C53E71A0A485CD80014E966 /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmainct.c; sourceTree = "<group>"; }; + 4C53E71B0A485CD80014E966 /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmarker.c; sourceTree = "<group>"; }; + 4C53E71C0A485CD80014E966 /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmaster.c; sourceTree = "<group>"; }; + 4C53E71D0A485CD80014E966 /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmerge.c; sourceTree = "<group>"; }; + 4C53E71F0A485CD80014E966 /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdpostct.c; sourceTree = "<group>"; }; + 4C53E7200A485CD80014E966 /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdsample.c; sourceTree = "<group>"; }; + 4C53E7210A485CD80014E966 /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdtrans.c; sourceTree = "<group>"; }; + 4C53E7220A485CD80014E966 /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jerror.c; sourceTree = "<group>"; }; + 4C53E7240A485CD80014E966 /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctflt.c; sourceTree = "<group>"; }; + 4C53E7250A485CD80014E966 /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctfst.c; sourceTree = "<group>"; }; + 4C53E7260A485CD80014E966 /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctint.c; sourceTree = "<group>"; }; + 4C53E7270A485CD80014E966 /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctflt.c; sourceTree = "<group>"; }; + 4C53E7280A485CD80014E966 /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctfst.c; sourceTree = "<group>"; }; + 4C53E7290A485CD80014E966 /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctint.c; sourceTree = "<group>"; }; + 4C53E7300A485CD80014E966 /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemmgr.c; sourceTree = "<group>"; }; + 4C53E7320A485CD80014E966 /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemnobs.c; sourceTree = "<group>"; }; + 4C53E7390A485CD80014E966 /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant1.c; sourceTree = "<group>"; }; + 4C53E73A0A485CD80014E966 /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant2.c; sourceTree = "<group>"; }; + 4C53E73B0A485CD80014E966 /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jutils.c; sourceTree = "<group>"; }; + 4C6DC9B60A48715A0017A6E5 /* inflate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inflate.c; sourceTree = "<group>"; }; + 4CA25B980A485D9800B4E469 /* CustomSceneNode_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CustomSceneNode_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25B9A0A485D9800B4E469 /* MeshViewer_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeshViewer_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25B9C0A485D9800B4E469 /* RenderToTexture_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RenderToTexture_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25B9E0A485D9800B4E469 /* UserInterface_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UserInterface_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BA00A485D9800B4E469 /* PerPixelLighting_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PerPixelLighting_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BA20A485D9800B4E469 /* Demo_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BA40A485D9800B4E469 /* Movement_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Movement_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BA60A485D9800B4E469 /* Shaders_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Shaders_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BA80A485D9800B4E469 /* SpecialFx_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpecialFx_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BAA0A485D9800B4E469 /* TerrainRendering_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TerrainRendering_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BAC0A485D9800B4E469 /* 2DGraphics_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 2DGraphics_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CA25BAE0A485D9800B4E469 /* Collision_dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Collision_dbg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CC36B0D0A6B61DB0076C4B2 /* CSphereSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSphereSceneNode.cpp; sourceTree = "<group>"; }; + 4CC36B0E0A6B61DB0076C4B2 /* CSphereSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSphereSceneNode.h; sourceTree = "<group>"; }; + 4CFA7BDC0A88735900B03626 /* CImageLoaderBMP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = CImageLoaderBMP.cpp; sourceTree = "<group>"; }; + 4CFA7BDD0A88735900B03626 /* CImageLoaderBMP.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageLoaderBMP.h; sourceTree = "<group>"; }; + 4CFA7BDE0A88735900B03626 /* CImageWriterBMP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterBMP.cpp; sourceTree = "<group>"; }; + 4CFA7BDF0A88735900B03626 /* CImageWriterBMP.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterBMP.h; sourceTree = "<group>"; }; + 4CFA7BE00A88735900B03626 /* CImageWriterJPG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterJPG.cpp; sourceTree = "<group>"; }; + 4CFA7BE10A88735900B03626 /* CImageWriterJPG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterJPG.h; sourceTree = "<group>"; }; + 4CFA7BE20A88735900B03626 /* CImageWriterPCX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterPCX.cpp; sourceTree = "<group>"; }; + 4CFA7BE30A88735900B03626 /* CImageWriterPCX.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterPCX.h; sourceTree = "<group>"; }; + 4CFA7BE40A88735900B03626 /* CImageWriterPNG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterPNG.cpp; sourceTree = "<group>"; }; + 4CFA7BE50A88735900B03626 /* CImageWriterPNG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterPNG.h; sourceTree = "<group>"; }; + 4CFA7BE60A88735900B03626 /* CImageWriterPPM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterPPM.cpp; sourceTree = "<group>"; }; + 4CFA7BE70A88735900B03626 /* CImageWriterPPM.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterPPM.h; sourceTree = "<group>"; }; + 4CFA7BE80A88735900B03626 /* CImageWriterPSD.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterPSD.cpp; sourceTree = "<group>"; }; + 4CFA7BE90A88735900B03626 /* CImageWriterPSD.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterPSD.h; sourceTree = "<group>"; }; + 4CFA7BEA0A88735900B03626 /* CImageWriterTGA.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CImageWriterTGA.cpp; sourceTree = "<group>"; }; + 4CFA7BEB0A88735900B03626 /* CImageWriterTGA.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CImageWriterTGA.h; sourceTree = "<group>"; }; + 4CFA7BEC0A88735A00B03626 /* CSkyDomeSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSkyDomeSceneNode.cpp; sourceTree = "<group>"; }; + 4CFA7BED0A88735A00B03626 /* CSkyDomeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSkyDomeSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C0A0A88742800B03626 /* aabbox3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = aabbox3d.h; sourceTree = "<group>"; }; + 4CFA7C0B0A88742800B03626 /* dimension2d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dimension2d.h; sourceTree = "<group>"; }; + 4CFA7C0C0A88742800B03626 /* EDriverTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EDriverTypes.h; sourceTree = "<group>"; }; + 4CFA7C0D0A88742800B03626 /* EGUIElementTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EGUIElementTypes.h; sourceTree = "<group>"; }; + 4CFA7C0E0A88742800B03626 /* ESceneNodeAnimatorTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ESceneNodeAnimatorTypes.h; sourceTree = "<group>"; }; + 4CFA7C0F0A88742800B03626 /* ESceneNodeTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ESceneNodeTypes.h; sourceTree = "<group>"; }; + 4CFA7C100A88742800B03626 /* heapsort.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = heapsort.h; sourceTree = "<group>"; }; + 4CFA7C110A88742900B03626 /* IAnimatedMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IAnimatedMesh.h; sourceTree = "<group>"; }; + 4CFA7C130A88742900B03626 /* IAnimatedMeshMD2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IAnimatedMeshMD2.h; sourceTree = "<group>"; }; + 4CFA7C150A88742900B03626 /* IAnimatedMeshSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IAnimatedMeshSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C170A88742900B03626 /* IAttributeExchangingObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IAttributeExchangingObject.h; sourceTree = "<group>"; }; + 4CFA7C180A88742900B03626 /* IAttributes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IAttributes.h; sourceTree = "<group>"; }; + 4CFA7C190A88742900B03626 /* IBillboardSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IBillboardSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C1A0A88742900B03626 /* ICameraSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ICameraSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C1B0A88742900B03626 /* ICursorControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ICursorControl.h; sourceTree = "<group>"; }; + 4CFA7C1C0A88742900B03626 /* IDummyTransformationSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IDummyTransformationSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C1D0A88742900B03626 /* IEventReceiver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IEventReceiver.h; sourceTree = "<group>"; }; + 4CFA7C1E0A88742900B03626 /* IFileList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IFileList.h; sourceTree = "<group>"; }; + 4CFA7C1F0A88742900B03626 /* IFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IFileSystem.h; sourceTree = "<group>"; }; + 4CFA7C200A88742900B03626 /* IGPUProgrammingServices.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGPUProgrammingServices.h; sourceTree = "<group>"; }; + 4CFA7C210A88742900B03626 /* IGUIButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIButton.h; sourceTree = "<group>"; }; + 4CFA7C220A88742900B03626 /* IGUICheckBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUICheckBox.h; sourceTree = "<group>"; }; + 4CFA7C230A88742900B03626 /* IGUIComboBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIComboBox.h; sourceTree = "<group>"; }; + 4CFA7C240A88742900B03626 /* IGUIContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIContextMenu.h; sourceTree = "<group>"; }; + 4CFA7C250A88742900B03626 /* IGUIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIEditBox.h; sourceTree = "<group>"; }; + 4CFA7C260A88742900B03626 /* IGUIElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIElement.h; sourceTree = "<group>"; }; + 4CFA7C270A88742900B03626 /* IGUIEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIEnvironment.h; sourceTree = "<group>"; }; + 4CFA7C280A88742900B03626 /* IGUIFileOpenDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIFileOpenDialog.h; sourceTree = "<group>"; }; + 4CFA7C290A88742900B03626 /* IGUIFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIFont.h; sourceTree = "<group>"; }; + 4CFA7C2A0A88742900B03626 /* IGUIImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIImage.h; sourceTree = "<group>"; }; + 4CFA7C2B0A88742900B03626 /* IGUIInOutFader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIInOutFader.h; sourceTree = "<group>"; }; + 4CFA7C2C0A88742900B03626 /* IGUIListBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIListBox.h; sourceTree = "<group>"; }; + 4CFA7C2D0A88742900B03626 /* IGUIMeshViewer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIMeshViewer.h; sourceTree = "<group>"; }; + 4CFA7C2E0A88742900B03626 /* IGUIScrollBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIScrollBar.h; sourceTree = "<group>"; }; + 4CFA7C2F0A88742900B03626 /* IGUISkin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUISkin.h; sourceTree = "<group>"; }; + 4CFA7C300A88742900B03626 /* IGUIStaticText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIStaticText.h; sourceTree = "<group>"; }; + 4CFA7C310A88742900B03626 /* IGUITabControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUITabControl.h; sourceTree = "<group>"; }; + 4CFA7C320A88742900B03626 /* IGUIToolbar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIToolbar.h; sourceTree = "<group>"; }; + 4CFA7C330A88742900B03626 /* IGUIWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGUIWindow.h; sourceTree = "<group>"; }; + 4CFA7C340A88742900B03626 /* IImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IImage.h; sourceTree = "<group>"; }; + 4CFA7C350A88742900B03626 /* IImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IImageLoader.h; sourceTree = "<group>"; }; + 4CFA7C360A88742900B03626 /* IImageWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IImageWriter.h; sourceTree = "<group>"; }; + 4CFA7C370A88742900B03626 /* ILightSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ILightSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C380A88742900B03626 /* ILogger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ILogger.h; sourceTree = "<group>"; }; + 4CFA7C390A88742900B03626 /* IMaterialRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMaterialRenderer.h; sourceTree = "<group>"; }; + 4CFA7C3A0A88742900B03626 /* IMaterialRendererServices.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMaterialRendererServices.h; sourceTree = "<group>"; }; + 4CFA7C3B0A88742900B03626 /* IMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMesh.h; sourceTree = "<group>"; }; + 4CFA7C3C0A88742900B03626 /* IMeshBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMeshBuffer.h; sourceTree = "<group>"; }; + 4CFA7C3D0A88742900B03626 /* IMeshCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMeshCache.h; sourceTree = "<group>"; }; + 4CFA7C3E0A88742900B03626 /* IMeshLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMeshLoader.h; sourceTree = "<group>"; }; + 4CFA7C3F0A88742900B03626 /* IMeshManipulator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMeshManipulator.h; sourceTree = "<group>"; }; + 4CFA7C400A88742900B03626 /* IMeshSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMeshSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C410A88742900B03626 /* IMetaTriangleSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IMetaTriangleSelector.h; sourceTree = "<group>"; }; + 4CFA7C420A88742900B03626 /* IOSOperator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IOSOperator.h; sourceTree = "<group>"; }; + 4CFA7C430A88742900B03626 /* IParticleAffector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleAffector.h; sourceTree = "<group>"; }; + 4CFA7C440A88742900B03626 /* IParticleEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleEmitter.h; sourceTree = "<group>"; }; + 4CFA7C450A88742900B03626 /* IParticleSystemSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IParticleSystemSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C460A88742900B03626 /* IQ3LevelMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IQ3LevelMesh.h; sourceTree = "<group>"; }; + 4CFA7C470A88742900B03626 /* IReadFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = IReadFile.h; sourceTree = "<group>"; }; + 4CFA7C480A88742900B03626 /* irrAllocator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrAllocator.h; sourceTree = "<group>"; }; + 4CFA7C490A88742900B03626 /* irrArray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrArray.h; sourceTree = "<group>"; }; + 4CFA7C4A0A88742900B03626 /* IrrCompileConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IrrCompileConfig.h; sourceTree = "<group>"; }; + 4CFA7C4B0A88742900B03626 /* irrlicht.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrlicht.h; sourceTree = "<group>"; }; + 4CFA7C4C0A88742900B03626 /* IrrlichtDevice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IrrlichtDevice.h; sourceTree = "<group>"; }; + 4CFA7C4D0A88742900B03626 /* irrList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrList.h; sourceTree = "<group>"; }; + 4CFA7C4E0A88742900B03626 /* irrMath.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrMath.h; sourceTree = "<group>"; }; + 4CFA7C4F0A88742900B03626 /* irrString.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrString.h; sourceTree = "<group>"; }; + 4CFA7C500A88742900B03626 /* irrTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 2; path = irrTypes.h; sourceTree = "<group>"; }; + 4CFA7C510A88742900B03626 /* irrXML.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = irrXML.h; sourceTree = "<group>"; }; + 4CFA7C520A88742900B03626 /* ISceneCollisionManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneCollisionManager.h; sourceTree = "<group>"; }; + 4CFA7C530A88742900B03626 /* ISceneManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneManager.h; sourceTree = "<group>"; }; + 4CFA7C540A88742900B03626 /* ISceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneNode.h; sourceTree = "<group>"; }; + 4CFA7C550A88742900B03626 /* ISceneNodeAnimator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneNodeAnimator.h; sourceTree = "<group>"; }; + 4CFA7C560A88742900B03626 /* ISceneNodeAnimatorCollisionResponse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneNodeAnimatorCollisionResponse.h; sourceTree = "<group>"; }; + 4CFA7C570A88742900B03626 /* ISceneNodeAnimatorFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneNodeAnimatorFactory.h; sourceTree = "<group>"; }; + 4CFA7C580A88742900B03626 /* ISceneNodeFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneNodeFactory.h; sourceTree = "<group>"; }; + 4CFA7C590A88742900B03626 /* ISceneUserDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ISceneUserDataSerializer.h; sourceTree = "<group>"; }; + 4CFA7C5A0A88742900B03626 /* IShaderConstantSetCallBack.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IShaderConstantSetCallBack.h; sourceTree = "<group>"; }; + 4CFA7C5B0A88742900B03626 /* IShadowVolumeSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IShadowVolumeSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C5C0A88742900B03626 /* ITerrainSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ITerrainSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C5D0A88742900B03626 /* ITextSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ITextSceneNode.h; sourceTree = "<group>"; }; + 4CFA7C5E0A88742900B03626 /* ITexture.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ITexture.h; sourceTree = "<group>"; }; + 4CFA7C5F0A88742900B03626 /* ITimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ITimer.h; sourceTree = "<group>"; }; + 4CFA7C600A88742900B03626 /* ITriangleSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ITriangleSelector.h; sourceTree = "<group>"; }; + 4CFA7C620A88742900B03626 /* IVideoDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IVideoDriver.h; sourceTree = "<group>"; }; + 4CFA7C630A88742900B03626 /* IVideoModeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IVideoModeList.h; sourceTree = "<group>"; }; + 4CFA7C640A88742900B03626 /* IWriteFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IWriteFile.h; sourceTree = "<group>"; }; + 4CFA7C650A88742900B03626 /* IXMLReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IXMLReader.h; sourceTree = "<group>"; }; + 4CFA7C660A88742900B03626 /* IXMLWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IXMLWriter.h; sourceTree = "<group>"; }; + 4CFA7C670A88742900B03626 /* Keycodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Keycodes.h; sourceTree = "<group>"; }; + 4CFA7C680A88742900B03626 /* line2d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = line2d.h; sourceTree = "<group>"; }; + 4CFA7C690A88742900B03626 /* line3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = line3d.h; sourceTree = "<group>"; }; + 4CFA7C6A0A88742900B03626 /* matrix4.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = matrix4.h; sourceTree = "<group>"; }; + 4CFA7C6B0A88742900B03626 /* plane3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = plane3d.h; sourceTree = "<group>"; }; + 4CFA7C6C0A88742900B03626 /* position2d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = position2d.h; sourceTree = "<group>"; }; + 4CFA7C6D0A88742900B03626 /* quaternion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = quaternion.h; sourceTree = "<group>"; }; + 4CFA7C6E0A88742900B03626 /* rect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = rect.h; sourceTree = "<group>"; }; + 4CFA7C6F0A88742900B03626 /* S3DVertex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = S3DVertex.h; sourceTree = "<group>"; }; + 4CFA7C700A88742900B03626 /* SAnimatedMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SAnimatedMesh.h; sourceTree = "<group>"; }; + 4CFA7C710A88742900B03626 /* SceneParameters.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SceneParameters.h; sourceTree = "<group>"; }; + 4CFA7C720A88742900B03626 /* SColor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SColor.h; sourceTree = "<group>"; }; + 4CFA7C730A88742900B03626 /* SExposedVideoData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SExposedVideoData.h; sourceTree = "<group>"; }; + 4CFA7C740A88742900B03626 /* SIrrCreationParameters.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SIrrCreationParameters.h; sourceTree = "<group>"; }; + 4CFA7C750A88742900B03626 /* SKeyMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SKeyMap.h; sourceTree = "<group>"; }; + 4CFA7C760A88742900B03626 /* SLight.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SLight.h; sourceTree = "<group>"; }; + 4CFA7C770A88742900B03626 /* SMaterial.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SMaterial.h; sourceTree = "<group>"; }; + 4CFA7C780A88742900B03626 /* SMesh.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SMesh.h; sourceTree = "<group>"; }; + 4CFA7C790A88742900B03626 /* SMeshBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SMeshBuffer.h; sourceTree = "<group>"; }; + 4CFA7C7A0A88742900B03626 /* SMeshBufferLightMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SMeshBufferLightMap.h; sourceTree = "<group>"; }; + 4CFA7C7B0A88742900B03626 /* SMeshBufferTangents.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SMeshBufferTangents.h; sourceTree = "<group>"; }; + 4CFA7C7C0A88742900B03626 /* SParticle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SParticle.h; sourceTree = "<group>"; }; + 4CFA7C7E0A88742900B03626 /* triangle3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = triangle3d.h; sourceTree = "<group>"; }; + 4CFA7C7F0A88742900B03626 /* vector2d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vector2d.h; sourceTree = "<group>"; }; + 4CFA7C800A88742900B03626 /* vector3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vector3d.h; sourceTree = "<group>"; }; + 5DD4804C0C7D91DF00728AA9 /* CDepthBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDepthBuffer.cpp; sourceTree = "<group>"; }; + 5DD4804D0C7D91DF00728AA9 /* CDepthBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDepthBuffer.h; sourceTree = "<group>"; }; + 5DD480500C7D936700728AA9 /* IBurningShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IBurningShader.cpp; sourceTree = "<group>"; }; + 5DD480510C7D936700728AA9 /* IBurningShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBurningShader.h; sourceTree = "<group>"; }; + 5DD480540C7D93AB00728AA9 /* IDepthBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDepthBuffer.h; sourceTree = "<group>"; }; + 5DD480560C7D945800728AA9 /* CAnimatedMeshMD3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAnimatedMeshMD3.cpp; sourceTree = "<group>"; }; + 5DD480570C7D945800728AA9 /* CAnimatedMeshMD3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAnimatedMeshMD3.h; sourceTree = "<group>"; }; + 5DD480580C7D945800728AA9 /* CDefaultGUIElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDefaultGUIElementFactory.cpp; sourceTree = "<group>"; }; + 5DD480590C7D945800728AA9 /* CDefaultGUIElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDefaultGUIElementFactory.h; sourceTree = "<group>"; }; + 5DD4805E0C7D947B00728AA9 /* CGUIColorSelectDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGUIColorSelectDialog.cpp; sourceTree = "<group>"; }; + 5DD4805F0C7D947B00728AA9 /* CGUIColorSelectDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGUIColorSelectDialog.h; sourceTree = "<group>"; }; + 5DD480600C7D947B00728AA9 /* CGUISpinBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGUISpinBox.cpp; sourceTree = "<group>"; }; + 5DD480610C7D947B00728AA9 /* CGUISpinBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGUISpinBox.h; sourceTree = "<group>"; }; + 5DD480620C7D947B00728AA9 /* CGUISpriteBank.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGUISpriteBank.cpp; sourceTree = "<group>"; }; + 5DD480630C7D947B00728AA9 /* CGUISpriteBank.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGUISpriteBank.h; sourceTree = "<group>"; }; + 5DD4806A0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CQuake3ShaderSceneNode.cpp; sourceTree = "<group>"; }; + 5DD4806B0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CQuake3ShaderSceneNode.h; sourceTree = "<group>"; }; + 5DD4806C0C7D94AC00728AA9 /* CTRTextureBlend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureBlend.cpp; sourceTree = "<group>"; }; + 5DD4806D0C7D94AC00728AA9 /* CTRTextureGouraudAlpha.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudAlpha.cpp; sourceTree = "<group>"; }; + 5DD4806E0C7D94AC00728AA9 /* CTRTextureGouraudAlphaNoZ.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureGouraudAlphaNoZ.cpp; sourceTree = "<group>"; }; + 5DD4806F0C7D94AC00728AA9 /* CTRTextureLightMapGouraud2_M4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CTRTextureLightMapGouraud2_M4.cpp; sourceTree = "<group>"; }; + 5DD480700C7D94AC00728AA9 /* glxext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glxext.h; sourceTree = "<group>"; }; + 5DD480C10C7DA66800728AA9 /* COpenGLExtensionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = COpenGLExtensionHandler.h; sourceTree = "<group>"; }; + 5DD480C20C7DA66800728AA9 /* CMD3MeshFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMD3MeshFileLoader.h; sourceTree = "<group>"; }; + 5DD480C30C7DA66800728AA9 /* CIrrDeviceSDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CIrrDeviceSDL.h; sourceTree = "<group>"; }; + 5DD480C40C7DA66800728AA9 /* CIrrDeviceSDL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CIrrDeviceSDL.cpp; sourceTree = "<group>"; }; + 5DD480C50C7DA66800728AA9 /* COpenGLExtensionHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = COpenGLExtensionHandler.cpp; sourceTree = "<group>"; }; + 5DD480C60C7DA66800728AA9 /* CMD3MeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CMD3MeshFileLoader.cpp; sourceTree = "<group>"; }; + 959726FD12C18FFC00BF73D3 /* IrrFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IrrFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 959726FE12C18FFC00BF73D3 /* irrFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "irrFramework-Info.plist"; sourceTree = "<group>"; }; + 95972B8312C19A5C00BF73D3 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 95972B8912C19A7600BF73D3 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 95972B8D12C19A7F00BF73D3 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; + 95E5857012FCE277004946C6 /* CWADReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CWADReader.cpp; path = ../CWADReader.cpp; sourceTree = SOURCE_ROOT; }; + 95E5857512FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CAnimatedMeshHalfLife.cpp; path = ../CAnimatedMeshHalfLife.cpp; sourceTree = SOURCE_ROOT; }; + 95E5857612FCE2CB004946C6 /* CAnimatedMeshHalfLife.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CAnimatedMeshHalfLife.h; path = ../CAnimatedMeshHalfLife.h; sourceTree = SOURCE_ROOT; }; + 95E5857B12FCE2DE004946C6 /* CSceneLoaderIrr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSceneLoaderIrr.cpp; path = ../CSceneLoaderIrr.cpp; sourceTree = SOURCE_ROOT; }; + 95E5858C12FCE388004946C6 /* CTRNormalMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CTRNormalMap.cpp; path = ../CTRNormalMap.cpp; sourceTree = SOURCE_ROOT; }; + 95E5859112FCE3A1004946C6 /* CTRStencilShadow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CTRStencilShadow.cpp; path = ../CTRStencilShadow.cpp; sourceTree = SOURCE_ROOT; }; + 95E5859412FCE3F5004946C6 /* CSMFMeshFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSMFMeshFileLoader.cpp; path = ../CSMFMeshFileLoader.cpp; sourceTree = SOURCE_ROOT; }; + 95E9D50210F42F9A008546FE /* jcarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcarith.c; path = ../jpeglib/jcarith.c; sourceTree = SOURCE_ROOT; }; + 95E9D50610F42FDF008546FE /* jdarith.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdarith.c; path = ../jpeglib/jdarith.c; sourceTree = SOURCE_ROOT; }; + 95E9D50A10F43011008546FE /* jaricom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jaricom.c; path = ../jpeglib/jaricom.c; sourceTree = SOURCE_ROOT; }; + 95E9D50E10F43194008546FE /* CNPKReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CNPKReader.cpp; path = ../CNPKReader.cpp; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 09022C5A0EA0E97F00CD54EE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 09022C5B0EA0E97F00CD54EE /* libIrrlicht.a in Frameworks */, + 09022C5C0EA0E97F00CD54EE /* Cocoa.framework in Frameworks */, + 09022C5D0EA0E97F00CD54EE /* OpenGL.framework in Frameworks */, + 09022C5E0EA0E97F00CD54EE /* Carbon.framework in Frameworks */, + 0930CE590EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0946CCAB0EC99BBE00D945A5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0946CCAC0EC99BBE00D945A5 /* libIrrlicht.a in Frameworks */, + 0946CCAD0EC99BBE00D945A5 /* Cocoa.framework in Frameworks */, + 0946CCAE0EC99BBE00D945A5 /* OpenGL.framework in Frameworks */, + 0946CCAF0EC99BBE00D945A5 /* Carbon.framework in Frameworks */, + 0946CCB00EC99BBE00D945A5 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F648FC0D2CDED9001E0599 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F648FD0D2CDED9001E0599 /* libIrrlicht.a in Frameworks */, + 09F648FE0D2CDED9001E0599 /* Cocoa.framework in Frameworks */, + 09F648FF0D2CDED9001E0599 /* OpenGL.framework in Frameworks */, + 092511400D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE5C0EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F649370D2CE03E001E0599 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F649380D2CE03E001E0599 /* libIrrlicht.a in Frameworks */, + 09F649390D2CE03E001E0599 /* Cocoa.framework in Frameworks */, + 09F6493A0D2CE03E001E0599 /* OpenGL.framework in Frameworks */, + 0925113F0D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE5B0EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F6495E0D2CE206001E0599 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F6495F0D2CE206001E0599 /* libIrrlicht.a in Frameworks */, + 09F649600D2CE206001E0599 /* Cocoa.framework in Frameworks */, + 09F649610D2CE206001E0599 /* OpenGL.framework in Frameworks */, + 0925113E0D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE5A0EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E2E3CF31103E294002DE8D7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E2E3CF41103E294002DE8D7 /* libIrrlicht.a in Frameworks */, + 0E2E3CF51103E294002DE8D7 /* Cocoa.framework in Frameworks */, + 0E2E3CF61103E294002DE8D7 /* OpenGL.framework in Frameworks */, + 0E2E3CF71103E294002DE8D7 /* Carbon.framework in Frameworks */, + 0E2E3CF81103E294002DE8D7 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E2E3D331103E3F4002DE8D7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E2E3D341103E3F4002DE8D7 /* libIrrlicht.a in Frameworks */, + 0E2E3D351103E3F4002DE8D7 /* Cocoa.framework in Frameworks */, + 0E2E3D361103E3F4002DE8D7 /* OpenGL.framework in Frameworks */, + 0E2E3D371103E3F4002DE8D7 /* Carbon.framework in Frameworks */, + 0E2E3D381103E3F4002DE8D7 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 959726FB12C18FFB00BF73D3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 95972B8412C19A5C00BF73D3 /* OpenGL.framework in Frameworks */, + 95972B8A12C19A7600BF73D3 /* IOKit.framework in Frameworks */, + 95972B8E12C19A7F00BF73D3 /* Carbon.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFE08097FD9F50057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF146F50A486648006EBA03 /* libIrrlicht.a in Frameworks */, + 4C53E2750A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2760A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511490D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE650EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFE89097FDDE20057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF1470A0A4866FA006EBA03 /* libIrrlicht.a in Frameworks */, + 4C53E2770A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2780A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511480D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE640EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEAB097FDE900057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB40A486A1600ADB3D7 /* libIrrlicht.a in Frameworks */, + 4C53E27F0A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2800A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511440D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE600EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEC9097FDF020057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB70A486A2500ADB3D7 /* libIrrlicht.a in Frameworks */, + 4C53E2810A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2820A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511430D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE5F0EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEEF097FE05F0057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF147190A48676E006EBA03 /* libIrrlicht.a in Frameworks */, + 4C53E2790A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E27A0A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511470D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE630EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF0E097FE13E0057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C8D0A48628200B4E469 /* libIrrlicht.a in Frameworks */, + 4C53E2730A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2740A4850D60014E966 /* OpenGL.framework in Frameworks */, + 0925114A0D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE660EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF25097FE1E00057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C520A48618800B4E469 /* libIrrlicht.a in Frameworks */, + 4C53E26F0A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2700A4850D60014E966 /* OpenGL.framework in Frameworks */, + 0925114C0D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE580EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF3A097FE25F0057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4C53E2510A4850550014E966 /* libIrrlicht.a in Frameworks */, + 4C53E2870A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2880A4850D60014E966 /* OpenGL.framework in Frameworks */, + 0925114D0D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE570EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF51097FE3050057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB10A486A0200ADB3D7 /* libIrrlicht.a in Frameworks */, + 4C53E27D0A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E27E0A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511450D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE610EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF7F097FE3DC0057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C560A4861AE00B4E469 /* libIrrlicht.a in Frameworks */, + 4C53E2710A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2720A4850D60014E966 /* OpenGL.framework in Frameworks */, + 0925114B0D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE560EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF98097FE45E0057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBAF0A4869F300ADB3D7 /* libIrrlicht.a in Frameworks */, + 4C53E27B0A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E27C0A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511460D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE620EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFFB6097FE5F80057C06F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBBA0A486A3A00ADB3D7 /* libIrrlicht.a in Frameworks */, + 4C53E2830A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2840A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511420D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE5E0EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B8DEF35B0950229200FDEA7E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBBF0A486A5700ADB3D7 /* libIrrlicht.a in Frameworks */, + 4C53E2850A4850D60014E966 /* Cocoa.framework in Frameworks */, + 4C53E2860A4850D60014E966 /* OpenGL.framework in Frameworks */, + 092511410D744ADE006784D9 /* Carbon.framework in Frameworks */, + 0930CE5D0EC39F4500D63866 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0867D691FE84028FC02AAC07 /* MacOSX */ = { + isa = PBXGroup; + children = ( + 09022C660EA0EA6500CD54EE /* Tools */, + 4CFA7C090A88742800B03626 /* include */, + 4C53DEE50A484C220014E966 /* Irrlicht */, + 4C00546D0A48470500C844C2 /* examples */, + 4C53E2540A48505D0014E966 /* Libraries */, + 4C53E24C0A484FED0014E966 /* Products */, + 959726FD12C18FFC00BF73D3 /* IrrFramework.framework */, + 959726FE12C18FFC00BF73D3 /* irrFramework-Info.plist */, + 95972B8312C19A5C00BF73D3 /* OpenGL.framework */, + 95972B8912C19A7600BF73D3 /* IOKit.framework */, + 95972B8D12C19A7F00BF73D3 /* Carbon.framework */, + ); + name = MacOSX; + sourceTree = "<group>"; + }; + 09022C660EA0EA6500CD54EE /* Tools */ = { + isa = PBXGroup; + children = ( + 09022C670EA0EA7100CD54EE /* GUIEditor */, + ); + name = Tools; + sourceTree = "<group>"; + }; + 09022C670EA0EA7100CD54EE /* GUIEditor */ = { + isa = PBXGroup; + children = ( + 09022CA40EA0EC1900CD54EE /* source */, + 09022CA30EA0EC0E00CD54EE /* include */, + ); + name = GUIEditor; + sourceTree = "<group>"; + }; + 09022CA30EA0EC0E00CD54EE /* include */ = { + isa = PBXGroup; + children = ( + 09022C680EA0EA9D00CD54EE /* CGUIAttribute.h */, + 09022C6A0EA0EA9D00CD54EE /* CGUIAttributeEditor.h */, + 09022C6B0EA0EA9D00CD54EE /* CGUIBoolAttribute.h */, + 09022C6C0EA0EA9D00CD54EE /* CGUIColorAttribute.h */, + 09022C6D0EA0EA9D00CD54EE /* CGUIDummyEditorStub.h */, + 09022C6F0EA0EA9D00CD54EE /* CGUIEditFactory.h */, + 09022C710EA0EA9D00CD54EE /* CGUIEditWindow.h */, + 09022C730EA0EA9D00CD54EE /* CGUIEditWorkspace.h */, + 09022C740EA0EA9D00CD54EE /* CGUIEnumAttribute.h */, + 09022C760EA0EA9D00CD54EE /* CGUIPanel.h */, + 09022C770EA0EA9D00CD54EE /* CGUIStringAttribute.h */, + 09022C780EA0EA9D00CD54EE /* CGUITextureAttribute.h */, + 09022C7A0EA0EA9D00CD54EE /* CGUITextureCacheBrowser.h */, + 09022C7C0EA0EA9D00CD54EE /* CMemoryReadWriteFile.h */, + ); + name = include; + sourceTree = "<group>"; + }; + 09022CA40EA0EC1900CD54EE /* source */ = { + isa = PBXGroup; + children = ( + 09022C690EA0EA9D00CD54EE /* CGUIAttributeEditor.cpp */, + 09022C6E0EA0EA9D00CD54EE /* CGUIEditFactory.cpp */, + 09022C700EA0EA9D00CD54EE /* CGUIEditWindow.cpp */, + 09022C720EA0EA9D00CD54EE /* CGUIEditWorkspace.cpp */, + 09022C750EA0EA9D00CD54EE /* CGUIPanel.cpp */, + 09022C790EA0EA9D00CD54EE /* CGUITextureCacheBrowser.cpp */, + 09022C7B0EA0EA9D00CD54EE /* CMemoryReadWriteFile.cpp */, + 09022C7D0EA0EA9D00CD54EE /* main.cpp */, + ); + name = source; + sourceTree = "<group>"; + }; + 0910BA4D0D1F64D000D46B04 /* gui */ = { + isa = PBXGroup; + children = ( + 0910BA070D1F64B300D46B04 /* EMessageBoxFlags.h */, + 4CFA7C0D0A88742800B03626 /* EGUIElementTypes.h */, + 0910BA020D1F64B300D46B04 /* EGUIAlignment.h */, + 4CFA7C1B0A88742900B03626 /* ICursorControl.h */, + 4CFA7C210A88742900B03626 /* IGUIButton.h */, + 4CFA7C220A88742900B03626 /* IGUICheckBox.h */, + 0910BA0B0D1F64B300D46B04 /* IGUIColorSelectDialog.h */, + 4CFA7C230A88742900B03626 /* IGUIComboBox.h */, + 4CFA7C240A88742900B03626 /* IGUIContextMenu.h */, + 4CFA7C250A88742900B03626 /* IGUIEditBox.h */, + 4CFA7C260A88742900B03626 /* IGUIElement.h */, + 0910BA0C0D1F64B300D46B04 /* IGUIElementFactory.h */, + 4CFA7C270A88742900B03626 /* IGUIEnvironment.h */, + 4CFA7C280A88742900B03626 /* IGUIFileOpenDialog.h */, + 4CFA7C290A88742900B03626 /* IGUIFont.h */, + 0910BA0D0D1F64B300D46B04 /* IGUIFontBitmap.h */, + 4CFA7C2A0A88742900B03626 /* IGUIImage.h */, + 4CFA7C2B0A88742900B03626 /* IGUIInOutFader.h */, + 4CFA7C2C0A88742900B03626 /* IGUIListBox.h */, + 4CFA7C2D0A88742900B03626 /* IGUIMeshViewer.h */, + 4CFA7C2E0A88742900B03626 /* IGUIScrollBar.h */, + 4CFA7C2F0A88742900B03626 /* IGUISkin.h */, + 0910BA0E0D1F64B300D46B04 /* IGUISpinBox.h */, + 0910BA0F0D1F64B300D46B04 /* IGUISpriteBank.h */, + 4CFA7C300A88742900B03626 /* IGUIStaticText.h */, + 4CFA7C310A88742900B03626 /* IGUITabControl.h */, + 0910BA100D1F64B300D46B04 /* IGUITable.h */, + 4CFA7C320A88742900B03626 /* IGUIToolbar.h */, + 4CFA7C330A88742900B03626 /* IGUIWindow.h */, + ); + name = gui; + sourceTree = "<group>"; + }; + 0910BA4E0D1F652100D46B04 /* core */ = { + isa = PBXGroup; + children = ( + 4CFA7C500A88742900B03626 /* irrTypes.h */, + 0910B9FE0D1F64B300D46B04 /* coreutil.h */, + 4CFA7C5F0A88742900B03626 /* ITimer.h */, + 4CFA7C670A88742900B03626 /* Keycodes.h */, + 4CFA7C750A88742900B03626 /* SKeyMap.h */, + 4CFA7C0A0A88742800B03626 /* aabbox3d.h */, + 4CFA7C0B0A88742800B03626 /* dimension2d.h */, + 4CFA7C100A88742800B03626 /* heapsort.h */, + 4CFA7C480A88742900B03626 /* irrAllocator.h */, + 4CFA7C490A88742900B03626 /* irrArray.h */, + 4CFA7C4D0A88742900B03626 /* irrList.h */, + 0910BA1E0D1F64B300D46B04 /* irrMap.h */, + 4CFA7C4E0A88742900B03626 /* irrMath.h */, + 4CFA7C4F0A88742900B03626 /* irrString.h */, + 4CFA7C680A88742900B03626 /* line2d.h */, + 4CFA7C690A88742900B03626 /* line3d.h */, + 4CFA7C6A0A88742900B03626 /* matrix4.h */, + 4CFA7C6B0A88742900B03626 /* plane3d.h */, + 4CFA7C6C0A88742900B03626 /* position2d.h */, + 4CFA7C6D0A88742900B03626 /* quaternion.h */, + 4CFA7C6E0A88742900B03626 /* rect.h */, + 4CFA7C7E0A88742900B03626 /* triangle3d.h */, + 4CFA7C7F0A88742900B03626 /* vector2d.h */, + 4CFA7C800A88742900B03626 /* vector3d.h */, + ); + name = core; + sourceTree = "<group>"; + }; + 0910BA4F0D1F65A300D46B04 /* io */ = { + isa = PBXGroup; + children = ( + 4CFA7C360A88742900B03626 /* IImageWriter.h */, + 0910BA110D1F64B300D46B04 /* IMeshWriter.h */, + 4CFA7C170A88742900B03626 /* IAttributeExchangingObject.h */, + 4CFA7C180A88742900B03626 /* IAttributes.h */, + 4CFA7C1E0A88742900B03626 /* IFileList.h */, + 4CFA7C1F0A88742900B03626 /* IFileSystem.h */, + 4CFA7C470A88742900B03626 /* IReadFile.h */, + 4CFA7C510A88742900B03626 /* irrXML.h */, + 4CFA7C640A88742900B03626 /* IWriteFile.h */, + 4CFA7C650A88742900B03626 /* IXMLReader.h */, + 4CFA7C660A88742900B03626 /* IXMLWriter.h */, + ); + name = io; + sourceTree = "<group>"; + }; + 0910BA500D1F660300D46B04 /* scene */ = { + isa = PBXGroup; + children = ( + 0910BA220D1F64B300D46B04 /* SSkinMeshBuffer.h */, + 0910BA210D1F64B300D46B04 /* SSharedMeshBuffer.h */, + 0910BA0A0D1F64B300D46B04 /* IBoneSceneNode.h */, + 0910BA080D1F64B300D46B04 /* ETerrainElements.h */, + 0910BA030D1F64B300D46B04 /* EHardwareBufferFlags.h */, + 4CFA7C590A88742900B03626 /* ISceneUserDataSerializer.h */, + 0910B9FF0D1F64B300D46B04 /* ECullingTypes.h */, + 0910BA000D1F64B300D46B04 /* EDebugSceneTypes.h */, + 0910BA060D1F64B300D46B04 /* EMeshWriterEnums.h */, + 4CFA7C0E0A88742800B03626 /* ESceneNodeAnimatorTypes.h */, + 4CFA7C0F0A88742800B03626 /* ESceneNodeTypes.h */, + 4CFA7C110A88742900B03626 /* IAnimatedMesh.h */, + 4CFA7C130A88742900B03626 /* IAnimatedMeshMD2.h */, + 0910BA090D1F64B300D46B04 /* IAnimatedMeshMD3.h */, + 4CFA7C150A88742900B03626 /* IAnimatedMeshSceneNode.h */, + 4CFA7C190A88742900B03626 /* IBillboardSceneNode.h */, + 4CFA7C1A0A88742900B03626 /* ICameraSceneNode.h */, + 4CFA7C1C0A88742900B03626 /* IDummyTransformationSceneNode.h */, + 4CFA7C370A88742900B03626 /* ILightSceneNode.h */, + 4CFA7C3B0A88742900B03626 /* IMesh.h */, + 4CFA7C3C0A88742900B03626 /* IMeshBuffer.h */, + 4CFA7C3D0A88742900B03626 /* IMeshCache.h */, + 4CFA7C3E0A88742900B03626 /* IMeshLoader.h */, + 4CFA7C3F0A88742900B03626 /* IMeshManipulator.h */, + 4CFA7C400A88742900B03626 /* IMeshSceneNode.h */, + 4CFA7C410A88742900B03626 /* IMetaTriangleSelector.h */, + 4CFA7C430A88742900B03626 /* IParticleAffector.h */, + 0910BA120D1F64B300D46B04 /* IParticleAnimatedMeshSceneNodeEmitter.h */, + 0910BA130D1F64B300D46B04 /* IParticleAttractionAffector.h */, + 0910BA140D1F64B300D46B04 /* IParticleBoxEmitter.h */, + 0910BA150D1F64B300D46B04 /* IParticleCylinderEmitter.h */, + 4CFA7C440A88742900B03626 /* IParticleEmitter.h */, + 0910BA160D1F64B300D46B04 /* IParticleFadeOutAffector.h */, + 0910BA170D1F64B300D46B04 /* IParticleGravityAffector.h */, + 0910BA180D1F64B300D46B04 /* IParticleMeshEmitter.h */, + 0910BA190D1F64B300D46B04 /* IParticleRingEmitter.h */, + 0910BA1A0D1F64B300D46B04 /* IParticleRotationAffector.h */, + 0910BA1B0D1F64B300D46B04 /* IParticleSphereEmitter.h */, + 4CFA7C450A88742900B03626 /* IParticleSystemSceneNode.h */, + 4CFA7C460A88742900B03626 /* IQ3LevelMesh.h */, + 0910BA1C0D1F64B300D46B04 /* IQ3Shader.h */, + 4CFA7C520A88742900B03626 /* ISceneCollisionManager.h */, + 4CFA7C530A88742900B03626 /* ISceneManager.h */, + 4CFA7C540A88742900B03626 /* ISceneNode.h */, + 4CFA7C550A88742900B03626 /* ISceneNodeAnimator.h */, + 4CFA7C560A88742900B03626 /* ISceneNodeAnimatorCollisionResponse.h */, + 4CFA7C570A88742900B03626 /* ISceneNodeAnimatorFactory.h */, + 4CFA7C580A88742900B03626 /* ISceneNodeFactory.h */, + 4CFA7C5B0A88742900B03626 /* IShadowVolumeSceneNode.h */, + 0910BA1F0D1F64B300D46B04 /* ISkinnedMesh.h */, + 4CFA7C5C0A88742900B03626 /* ITerrainSceneNode.h */, + 4CFA7C5D0A88742900B03626 /* ITextSceneNode.h */, + 4CFA7C600A88742900B03626 /* ITriangleSelector.h */, + 4CFA7C700A88742900B03626 /* SAnimatedMesh.h */, + 4CFA7C710A88742900B03626 /* SceneParameters.h */, + 4CFA7C780A88742900B03626 /* SMesh.h */, + 4CFA7C790A88742900B03626 /* SMeshBuffer.h */, + 4CFA7C7A0A88742900B03626 /* SMeshBufferLightMap.h */, + 4CFA7C7B0A88742900B03626 /* SMeshBufferTangents.h */, + 4CFA7C7C0A88742900B03626 /* SParticle.h */, + 0910B9FD0D1F64B300D46B04 /* CMeshBuffer.h */, + 0910BA230D1F64B300D46B04 /* SViewFrustum.h */, + ); + name = scene; + sourceTree = "<group>"; + }; + 0910BA800D1F6ADA00D46B04 /* video */ = { + isa = PBXGroup; + children = ( + 0910BA200D1F64B300D46B04 /* SMaterialLayer.h */, + 0910BA050D1F64B300D46B04 /* EMaterialTypes.h */, + 0910BA040D1F64B300D46B04 /* EMaterialFlags.h */, + 0910BA010D1F64B300D46B04 /* EDriverFeatures.h */, + 4CFA7C200A88742900B03626 /* IGPUProgrammingServices.h */, + 4CFA7C340A88742900B03626 /* IImage.h */, + 4CFA7C350A88742900B03626 /* IImageLoader.h */, + 4CFA7C390A88742900B03626 /* IMaterialRenderer.h */, + 4CFA7C3A0A88742900B03626 /* IMaterialRendererServices.h */, + 4CFA7C5A0A88742900B03626 /* IShaderConstantSetCallBack.h */, + 4CFA7C5E0A88742900B03626 /* ITexture.h */, + 4CFA7C620A88742900B03626 /* IVideoDriver.h */, + 4CFA7C630A88742900B03626 /* IVideoModeList.h */, + 4CFA7C6F0A88742900B03626 /* S3DVertex.h */, + 4CFA7C720A88742900B03626 /* SColor.h */, + 4CFA7C730A88742900B03626 /* SExposedVideoData.h */, + 4CFA7C760A88742900B03626 /* SLight.h */, + 4CFA7C770A88742900B03626 /* SMaterial.h */, + ); + name = video; + sourceTree = "<group>"; + }; + 0910BA810D1F6BB800D46B04 /* gui */ = { + isa = PBXGroup; + children = ( + 34FFD9CB0F6601AC00420884 /* element */, + 4C53DEE60A484C220014E966 /* BuiltInFont.h */, + 5DD480580C7D945800728AA9 /* CDefaultGUIElementFactory.cpp */, + 5DD480590C7D945800728AA9 /* CDefaultGUIElementFactory.h */, + 4C53DF3C0A484C230014E966 /* CGUIFont.cpp */, + 4C53DF3D0A484C230014E966 /* CGUIFont.h */, + 4C53DF4E0A484C230014E966 /* CGUISkin.cpp */, + 4C53DF4F0A484C230014E966 /* CGUISkin.h */, + 5DD480620C7D947B00728AA9 /* CGUISpriteBank.cpp */, + 5DD480630C7D947B00728AA9 /* CGUISpriteBank.h */, + ); + name = gui; + sourceTree = "<group>"; + }; + 0910BA820D1F6C3900D46B04 /* io */ = { + isa = PBXGroup; + children = ( + 34FFD9CA0F66018500420884 /* xml */, + 34FFD9C90F66014200420884 /* file */, + 34FFD9C80F66012D00420884 /* attributes */, + 34FFD9C70F66011C00420884 /* archive */, + 4C53DF260A484C230014E966 /* CFileList.cpp */, + 4C53DF270A484C230014E966 /* CFileList.h */, + 4C53DF280A484C230014E966 /* CFileSystem.cpp */, + 4C53DF290A484C230014E966 /* CFileSystem.h */, + ); + name = io; + sourceTree = "<group>"; + }; + 0910BA830D1F6CA600D46B04 /* irr */ = { + isa = PBXGroup; + children = ( + 34FFD9C60F6600DA00420884 /* device */, + 4C53DF720A484C230014E966 /* CLogger.cpp */, + 4C53DF730A484C230014E966 /* CLogger.h */, + 4C53DF990A484C240014E966 /* COSOperator.cpp */, + 4C53DF9A0A484C240014E966 /* COSOperator.h */, + 4C53DFD00A484C240014E966 /* CTimer.h */, + 4C53E00A0A484C250014E966 /* Irrlicht.cpp */, + 4C53E16A0A484C2C0014E966 /* os.cpp */, + 4C53E16B0A484C2C0014E966 /* os.h */, + ); + name = irr; + sourceTree = "<group>"; + }; + 0910BA840D1F6D0200D46B04 /* scene */ = { + isa = PBXGroup; + children = ( + 0E2E3C491103B224002DE8D7 /* Octree.h */, + 0910BA850D1F6D0A00D46B04 /* animators */, + 0910BA860D1F6D2600D46B04 /* collision */, + 0910BA870D1F6D7500D46B04 /* loaders */, + 0910BA880D1F6F1600D46B04 /* particleSystem */, + 0910BA890D1F6F6600D46B04 /* sceneNodes */, + 0910BA8A0D1F70B800D46B04 /* writers */, + 4C53DF1D0A484C230014E966 /* CDefaultSceneNodeAnimatorFactory.h */, + 4C53DF1C0A484C230014E966 /* CDefaultSceneNodeAnimatorFactory.cpp */, + 4C53DF1E0A484C230014E966 /* CDefaultSceneNodeFactory.cpp */, + 4C53DF1F0A484C230014E966 /* CDefaultSceneNodeFactory.h */, + 4C53DF2C0A484C230014E966 /* CGeometryCreator.cpp */, + 4C53DF2D0A484C230014E966 /* CGeometryCreator.h */, + 4C53DF760A484C230014E966 /* CMeshCache.cpp */, + 4C53DF770A484C230014E966 /* CMeshCache.h */, + 4C53DF780A484C230014E966 /* CMeshManipulator.cpp */, + 4C53DF790A484C230014E966 /* CMeshManipulator.h */, + 95E9D50E10F43194008546FE /* CNPKReader.cpp */, + 4C53DFAB0A484C240014E966 /* CSceneManager.cpp */, + 4C53DFAC0A484C240014E966 /* CSceneManager.h */, + ); + name = scene; + sourceTree = "<group>"; + }; + 0910BA850D1F6D0A00D46B04 /* animators */ = { + isa = PBXGroup; + children = ( + 4C53DFAD0A484C240014E966 /* CSceneNodeAnimatorCollisionResponse.cpp */, + 4C53DFAE0A484C240014E966 /* CSceneNodeAnimatorCollisionResponse.h */, + 4C53DFAF0A484C240014E966 /* CSceneNodeAnimatorDelete.cpp */, + 4C53DFB00A484C240014E966 /* CSceneNodeAnimatorDelete.h */, + 4C53DFB10A484C240014E966 /* CSceneNodeAnimatorFlyCircle.cpp */, + 4C53DFB20A484C240014E966 /* CSceneNodeAnimatorFlyCircle.h */, + 4C53DFB30A484C240014E966 /* CSceneNodeAnimatorFlyStraight.cpp */, + 4C53DFB40A484C240014E966 /* CSceneNodeAnimatorFlyStraight.h */, + 4C53DFB50A484C240014E966 /* CSceneNodeAnimatorFollowSpline.cpp */, + 4C53DFB60A484C240014E966 /* CSceneNodeAnimatorFollowSpline.h */, + 4C53DFB70A484C240014E966 /* CSceneNodeAnimatorRotation.cpp */, + 4C53DFB80A484C240014E966 /* CSceneNodeAnimatorRotation.h */, + 4C53DFB90A484C240014E966 /* CSceneNodeAnimatorTexture.cpp */, + 4C53DFBA0A484C240014E966 /* CSceneNodeAnimatorTexture.h */, + ); + name = animators; + sourceTree = "<group>"; + }; + 0910BA860D1F6D2600D46B04 /* collision */ = { + isa = PBXGroup; + children = ( + 0E2E3C4F1103B261002DE8D7 /* COctreeTriangleSelector.cpp */, + 0E2E3C501103B261002DE8D7 /* COctreeTriangleSelector.h */, + 4C53DF7C0A484C230014E966 /* CMetaTriangleSelector.cpp */, + 4C53DF7D0A484C230014E966 /* CMetaTriangleSelector.h */, + 4C53DFA90A484C240014E966 /* CSceneCollisionManager.cpp */, + 4C53DFAA0A484C240014E966 /* CSceneCollisionManager.h */, + 4C53DFCC0A484C240014E966 /* CTerrainTriangleSelector.cpp */, + 4C53DFCD0A484C240014E966 /* CTerrainTriangleSelector.h */, + 4C53DFD80A484C240014E966 /* CTriangleBBSelector.cpp */, + 4C53DFD90A484C250014E966 /* CTriangleBBSelector.h */, + 4C53DFDA0A484C250014E966 /* CTriangleSelector.cpp */, + 4C53DFDB0A484C250014E966 /* CTriangleSelector.h */, + ); + name = collision; + sourceTree = "<group>"; + }; + 0910BA870D1F6D7500D46B04 /* loaders */ = { + isa = PBXGroup; + children = ( + 096840220D0F1A2300333EFD /* CBSPMeshFileLoader.cpp */, + 096840230D0F1A2300333EFD /* CBSPMeshFileLoader.h */, + 09C638700D4F1A69000B6A18 /* CLWOMeshFileLoader.cpp */, + 09C638710D4F1A69000B6A18 /* CLWOMeshFileLoader.h */, + 4C53DEE70A484C220014E966 /* C3DSMeshFileLoader.cpp */, + 4C53DEE80A484C220014E966 /* C3DSMeshFileLoader.h */, + 4C53DEE90A484C220014E966 /* CAnimatedMeshMD2.cpp */, + 4C53DEEA0A484C220014E966 /* CAnimatedMeshMD2.h */, + 5DD480560C7D945800728AA9 /* CAnimatedMeshMD3.cpp */, + 5DD480570C7D945800728AA9 /* CAnimatedMeshMD3.h */, + 0968401E0D0F1A2300333EFD /* CB3DMeshFileLoader.cpp */, + 0968401F0D0F1A2300333EFD /* CB3DMeshFileLoader.h */, + 4C53DEFA0A484C220014E966 /* CColladaFileLoader.cpp */, + 4C53DEFB0A484C220014E966 /* CColladaFileLoader.h */, + 4C53DEFE0A484C220014E966 /* CCSMLoader.cpp */, + 4C53DEFF0A484C220014E966 /* CCSMLoader.h */, + 4C53DF200A484C230014E966 /* CDMFLoader.cpp */, + 4C53DF210A484C230014E966 /* CDMFLoader.h */, + 0968402B0D0F1A2300333EFD /* CIrrMeshFileLoader.cpp */, + 0968402C0D0F1A2300333EFD /* CIrrMeshFileLoader.h */, + 4C53DF700A484C230014E966 /* CLMTSMeshFileLoader.cpp */, + 4C53DF710A484C230014E966 /* CLMTSMeshFileLoader.h */, + 0968402F0D0F1A2300333EFD /* CMD2MeshFileLoader.cpp */, + 096840300D0F1A2300333EFD /* CMD2MeshFileLoader.h */, + 5DD480C60C7DA66800728AA9 /* CMD3MeshFileLoader.cpp */, + 5DD480C20C7DA66800728AA9 /* CMD3MeshFileLoader.h */, + 096840310D0F1A2300333EFD /* CMS3DMeshFileLoader.cpp */, + 096840320D0F1A2300333EFD /* CMS3DMeshFileLoader.h */, + 4C53DF7E0A484C230014E966 /* CMY3DHelper.h */, + 4C53DF7F0A484C230014E966 /* CMY3DMeshFileLoader.cpp */, + 4C53DF800A484C230014E966 /* CMY3DMeshFileLoader.h */, + 4C364EA20A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp */, + 4C364EA30A6C6DC2004CFBB4 /* COBJMeshFileLoader.h */, + 4C53DF840A484C240014E966 /* COCTLoader.cpp */, + 4C53DF850A484C240014E966 /* COCTLoader.h */, + 4C53DF8A0A484C240014E966 /* COgreMeshFileLoader.cpp */, + 4C53DF8B0A484C240014E966 /* COgreMeshFileLoader.h */, + 34EF91D50F65FCF6000B5651 /* CPLYMeshFileLoader.h */, + 34EF91D60F65FCF6000B5651 /* CPLYMeshFileLoader.cpp */, + 4C53DFA50A484C240014E966 /* CQ3LevelMesh.cpp */, + 4C53DFA60A484C240014E966 /* CQ3LevelMesh.h */, + 096840410D0F1A2300333EFD /* CSkinnedMesh.cpp */, + 096840420D0F1A2300333EFD /* CSkinnedMesh.h */, + 096840430D0F1A2300333EFD /* CSTLMeshFileLoader.cpp */, + 096840440D0F1A2300333EFD /* CSTLMeshFileLoader.h */, + 4C53DFF80A484C250014E966 /* CXMeshFileLoader.cpp */, + 4C53DFF90A484C250014E966 /* CXMeshFileLoader.h */, + 4C53E0050A484C250014E966 /* dmfsupport.h */, + ); + name = loaders; + sourceTree = "<group>"; + }; + 0910BA880D1F6F1600D46B04 /* particleSystem */ = { + isa = PBXGroup; + children = ( + 096CC0DE0ECE65B500C81DC7 /* CParticleScaleAffector.cpp */, + 096CC0DF0ECE65B500C81DC7 /* CParticleScaleAffector.h */, + 096840330D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.cpp */, + 096840340D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.h */, + 096840350D0F1A2300333EFD /* CParticleAttractionAffector.cpp */, + 096840360D0F1A2300333EFD /* CParticleAttractionAffector.h */, + 4C53DF9B0A484C240014E966 /* CParticleBoxEmitter.cpp */, + 4C53DF9C0A484C240014E966 /* CParticleBoxEmitter.h */, + 096840370D0F1A2300333EFD /* CParticleCylinderEmitter.cpp */, + 096840380D0F1A2300333EFD /* CParticleCylinderEmitter.h */, + 4C53DF9D0A484C240014E966 /* CParticleFadeOutAffector.cpp */, + 4C53DF9E0A484C240014E966 /* CParticleFadeOutAffector.h */, + 4C53DF9F0A484C240014E966 /* CParticleGravityAffector.cpp */, + 4C53DFA00A484C240014E966 /* CParticleGravityAffector.h */, + 096840390D0F1A2300333EFD /* CParticleMeshEmitter.cpp */, + 0968403A0D0F1A2300333EFD /* CParticleMeshEmitter.h */, + 4C53DFA10A484C240014E966 /* CParticlePointEmitter.cpp */, + 4C53DFA20A484C240014E966 /* CParticlePointEmitter.h */, + 0968403B0D0F1A2300333EFD /* CParticleRingEmitter.cpp */, + 0968403C0D0F1A2300333EFD /* CParticleRingEmitter.h */, + 0968403D0D0F1A2300333EFD /* CParticleRotationAffector.cpp */, + 0968403E0D0F1A2300333EFD /* CParticleRotationAffector.h */, + 0968403F0D0F1A2300333EFD /* CParticleSphereEmitter.cpp */, + 096840400D0F1A2300333EFD /* CParticleSphereEmitter.h */, + 4C53DFA30A484C240014E966 /* CParticleSystemSceneNode.cpp */, + 4C53DFA40A484C240014E966 /* CParticleSystemSceneNode.h */, + ); + name = particleSystem; + sourceTree = "<group>"; + }; + 0910BA890D1F6F6600D46B04 /* sceneNodes */ = { + isa = PBXGroup; + children = ( + 0E2E3C4B1103B247002DE8D7 /* COctreeSceneNode.cpp */, + 0E2E3C4C1103B247002DE8D7 /* COctreeSceneNode.h */, + 093973BC0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp */, + 093973BD0E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.h */, + 093973BE0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp */, + 093973BF0E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.h */, + 4C53DEED0A484C220014E966 /* CAnimatedMeshSceneNode.cpp */, + 4C53DEEE0A484C220014E966 /* CAnimatedMeshSceneNode.h */, + 4C53DEF20A484C220014E966 /* CBillboardSceneNode.cpp */, + 4C53DEF30A484C220014E966 /* CBillboardSceneNode.h */, + 096840200D0F1A2300333EFD /* CBoneSceneNode.cpp */, + 096840210D0F1A2300333EFD /* CBoneSceneNode.h */, + 4C53DEF80A484C220014E966 /* CCameraSceneNode.cpp */, + 4C53DEF90A484C220014E966 /* CCameraSceneNode.h */, + 4C53DF000A484C220014E966 /* CCubeSceneNode.cpp */, + 4C53DF010A484C220014E966 /* CCubeSceneNode.h */, + 4C53DF220A484C230014E966 /* CDummyTransformationSceneNode.cpp */, + 4C53DF230A484C230014E966 /* CDummyTransformationSceneNode.h */, + 4C53DF240A484C230014E966 /* CEmptySceneNode.cpp */, + 4C53DF250A484C230014E966 /* CEmptySceneNode.h */, + 4C53DF6C0A484C230014E966 /* CLightSceneNode.cpp */, + 4C53DF6D0A484C230014E966 /* CLightSceneNode.h */, + 4C53DF7A0A484C230014E966 /* CMeshSceneNode.cpp */, + 4C53DF7B0A484C230014E966 /* CMeshSceneNode.h */, + 5DD4806A0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.cpp */, + 5DD4806B0C7D94AC00728AA9 /* CQuake3ShaderSceneNode.h */, + 4C53DFBB0A484C240014E966 /* CShadowVolumeSceneNode.cpp */, + 4C53DFBC0A484C240014E966 /* CShadowVolumeSceneNode.h */, + 4C53DFBD0A484C240014E966 /* CSkyBoxSceneNode.cpp */, + 4C53DFBE0A484C240014E966 /* CSkyBoxSceneNode.h */, + 4CFA7BEC0A88735A00B03626 /* CSkyDomeSceneNode.cpp */, + 4CFA7BED0A88735A00B03626 /* CSkyDomeSceneNode.h */, + 4CC36B0D0A6B61DB0076C4B2 /* CSphereSceneNode.cpp */, + 4CC36B0E0A6B61DB0076C4B2 /* CSphereSceneNode.h */, + 4C53DFCA0A484C240014E966 /* CTerrainSceneNode.cpp */, + 4C53DFCB0A484C240014E966 /* CTerrainSceneNode.h */, + 4C53DFCE0A484C240014E966 /* CTextSceneNode.cpp */, + 4C53DFCF0A484C240014E966 /* CTextSceneNode.h */, + 090FBC800D31085E0076D847 /* CVolumeLightSceneNode.cpp */, + 090FBC810D31085E0076D847 /* CVolumeLightSceneNode.h */, + 4C53DFF00A484C250014E966 /* CWaterSurfaceSceneNode.cpp */, + 4C53DFF10A484C250014E966 /* CWaterSurfaceSceneNode.h */, + ); + name = sceneNodes; + sourceTree = "<group>"; + }; + 0910BA8A0D1F70B800D46B04 /* writers */ = { + isa = PBXGroup; + children = ( + 096840250D0F1A2300333EFD /* CColladaMeshWriter.cpp */, + 096840260D0F1A2300333EFD /* CColladaMeshWriter.h */, + 0968402D0D0F1A2300333EFD /* CIrrMeshWriter.cpp */, + 0968402E0D0F1A2300333EFD /* CIrrMeshWriter.h */, + 096F8E3B0EA2EFBA00907EC5 /* COBJMeshWriter.cpp */, + 096F8E3C0EA2EFBA00907EC5 /* COBJMeshWriter.h */, + 34EF91DA0F65FD14000B5651 /* CPLYMeshWriter.h */, + 34EF91DB0F65FD14000B5651 /* CPLYMeshWriter.cpp */, + 096840450D0F1A2300333EFD /* CSTLMeshWriter.cpp */, + 096840460D0F1A2300333EFD /* CSTLMeshWriter.h */, + ); + name = writers; + sourceTree = "<group>"; + }; + 0910BA8B0D1F71D600D46B04 /* video */ = { + isa = PBXGroup; + children = ( + 0910BA8C0D1F729400D46B04 /* Burning Video */, + 0910BA8D0D1F72DB00D46B04 /* Direct3D8 */, + 0910BA8E0D1F72FB00D46B04 /* Direct3D9 */, + 0910BA8F0D1F731900D46B04 /* Null */, + 0910BA910D1F738100D46B04 /* OpenGL */, + 0910BA920D1F73CC00D46B04 /* Software */, + 4C53DFEE0A484C250014E966 /* CVideoModeList.cpp */, + 4C53DFEF0A484C250014E966 /* CVideoModeList.h */, + ); + name = video; + sourceTree = "<group>"; + }; + 0910BA8C0D1F729400D46B04 /* Burning Video */ = { + isa = PBXGroup; + children = ( + 4C53E16D0A484C2C0014E966 /* S4DVertex.h */, + 4C53E16E0A484C2C0014E966 /* SoftwareDriver2_compile_config.h */, + 4C53E16F0A484C2C0014E966 /* SoftwareDriver2_helper.h */, + 5DD4804C0C7D91DF00728AA9 /* CDepthBuffer.cpp */, + 0910B9D90D1F5D4100D46B04 /* CBurningShader_Raster_Reference.cpp */, + 5DD480500C7D936700728AA9 /* IBurningShader.cpp */, + 5DD480510C7D936700728AA9 /* IBurningShader.h */, + 5DD4804D0C7D91DF00728AA9 /* CDepthBuffer.h */, + 4C53DFC20A484C240014E966 /* CSoftwareDriver2.cpp */, + 4C53DFC30A484C240014E966 /* CSoftwareDriver2.h */, + 4C53DFC60A484C240014E966 /* CSoftwareTexture2.cpp */, + 4C53DFC70A484C240014E966 /* CSoftwareTexture2.h */, + ); + name = "Burning Video"; + sourceTree = "<group>"; + }; + 0910BA8D0D1F72DB00D46B04 /* Direct3D8 */ = { + isa = PBXGroup; + children = ( + 4C53DF020A484C220014E966 /* CD3D8Driver.cpp */, + 4C53DF030A484C220014E966 /* CD3D8Driver.h */, + 4C53DF040A484C220014E966 /* CD3D8MaterialRenderer.h */, + 4C53DF050A484C220014E966 /* CD3D8NormalMapRenderer.cpp */, + 4C53DF060A484C220014E966 /* CD3D8NormalMapRenderer.h */, + 4C53DF070A484C230014E966 /* CD3D8ParallaxMapRenderer.cpp */, + 4C53DF080A484C230014E966 /* CD3D8ParallaxMapRenderer.h */, + 4C53DF090A484C230014E966 /* CD3D8ShaderMaterialRenderer.cpp */, + 4C53DF0A0A484C230014E966 /* CD3D8ShaderMaterialRenderer.h */, + 4C53DF0B0A484C230014E966 /* CD3D8Texture.cpp */, + 4C53DF0C0A484C230014E966 /* CD3D8Texture.h */, + ); + name = Direct3D8; + sourceTree = "<group>"; + }; + 0910BA8E0D1F72FB00D46B04 /* Direct3D9 */ = { + isa = PBXGroup; + children = ( + 4C53DF0D0A484C230014E966 /* CD3D9Driver.cpp */, + 4C53DF0E0A484C230014E966 /* CD3D9Driver.h */, + 4C53DF0F0A484C230014E966 /* CD3D9HLSLMaterialRenderer.cpp */, + 4C53DF100A484C230014E966 /* CD3D9HLSLMaterialRenderer.h */, + 4C53DF110A484C230014E966 /* CD3D9MaterialRenderer.h */, + 4C53DF120A484C230014E966 /* CD3D9NormalMapRenderer.cpp */, + 4C53DF130A484C230014E966 /* CD3D9NormalMapRenderer.h */, + 4C53DF140A484C230014E966 /* CD3D9ParallaxMapRenderer.cpp */, + 4C53DF150A484C230014E966 /* CD3D9ParallaxMapRenderer.h */, + 4C53DF160A484C230014E966 /* CD3D9ShaderMaterialRenderer.cpp */, + 4C53DF170A484C230014E966 /* CD3D9ShaderMaterialRenderer.h */, + 4C53DF180A484C230014E966 /* CD3D9Texture.cpp */, + 4C53DF190A484C230014E966 /* CD3D9Texture.h */, + ); + name = Direct3D9; + sourceTree = "<group>"; + }; + 0910BA8F0D1F731900D46B04 /* Null */ = { + isa = PBXGroup; + children = ( + 34EF91900F65F9AD000B5651 /* loader */, + 0910BA900D1F733100D46B04 /* writer */, + 4C53DEFC0A484C220014E966 /* CColorConverter.cpp */, + 4C53DEFD0A484C220014E966 /* CColorConverter.h */, + 4C53DF2A0A484C230014E966 /* CFPSCounter.cpp */, + 4C53DF2B0A484C230014E966 /* CFPSCounter.h */, + 4C53DF580A484C230014E966 /* CImage.cpp */, + 4C53DF590A484C230014E966 /* CImage.h */, + 4C53DF820A484C240014E966 /* CNullDriver.cpp */, + 4C53DF830A484C240014E966 /* CNullDriver.h */, + 4C53E0090A484C250014E966 /* IImagePresenter.h */, + ); + name = Null; + sourceTree = "<group>"; + }; + 0910BA900D1F733100D46B04 /* writer */ = { + isa = PBXGroup; + children = ( + 4CFA7BDE0A88735900B03626 /* CImageWriterBMP.cpp */, + 4CFA7BDF0A88735900B03626 /* CImageWriterBMP.h */, + 4CFA7BE00A88735900B03626 /* CImageWriterJPG.cpp */, + 4CFA7BE10A88735900B03626 /* CImageWriterJPG.h */, + 4CFA7BE20A88735900B03626 /* CImageWriterPCX.cpp */, + 4CFA7BE30A88735900B03626 /* CImageWriterPCX.h */, + 4CFA7BE40A88735900B03626 /* CImageWriterPNG.cpp */, + 4CFA7BE50A88735900B03626 /* CImageWriterPNG.h */, + 4CFA7BE60A88735900B03626 /* CImageWriterPPM.cpp */, + 4CFA7BE70A88735900B03626 /* CImageWriterPPM.h */, + 4CFA7BE80A88735900B03626 /* CImageWriterPSD.cpp */, + 4CFA7BE90A88735900B03626 /* CImageWriterPSD.h */, + 4CFA7BEA0A88735900B03626 /* CImageWriterTGA.cpp */, + 4CFA7BEB0A88735900B03626 /* CImageWriterTGA.h */, + ); + name = writer; + sourceTree = "<group>"; + }; + 0910BA910D1F738100D46B04 /* OpenGL */ = { + isa = PBXGroup; + children = ( + 5DD480700C7D94AC00728AA9 /* glxext.h */, + 4C53E0070A484C250014E966 /* glext.h */, + 5DD480C10C7DA66800728AA9 /* COpenGLExtensionHandler.h */, + 5DD480C50C7DA66800728AA9 /* COpenGLExtensionHandler.cpp */, + 4C53DF8C0A484C240014E966 /* COpenGLDriver.cpp */, + 4C53DF8D0A484C240014E966 /* COpenGLDriver.h */, + 4C53DF8E0A484C240014E966 /* COpenGLMaterialRenderer.h */, + 4C53DF8F0A484C240014E966 /* COpenGLNormalMapRenderer.cpp */, + 4C53DF900A484C240014E966 /* COpenGLNormalMapRenderer.h */, + 4C53DF910A484C240014E966 /* COpenGLParallaxMapRenderer.cpp */, + 4C53DF920A484C240014E966 /* COpenGLParallaxMapRenderer.h */, + 4C53DF930A484C240014E966 /* COpenGLShaderMaterialRenderer.cpp */, + 4C53DF940A484C240014E966 /* COpenGLShaderMaterialRenderer.h */, + 4C53DF950A484C240014E966 /* COpenGLSLMaterialRenderer.cpp */, + 4C53DF960A484C240014E966 /* COpenGLSLMaterialRenderer.h */, + 4C53DF970A484C240014E966 /* COpenGLTexture.cpp */, + 4C53DF980A484C240014E966 /* COpenGLTexture.h */, + ); + name = OpenGL; + sourceTree = "<group>"; + }; + 0910BA920D1F73CC00D46B04 /* Software */ = { + isa = PBXGroup; + children = ( + 4C53DFBF0A484C240014E966 /* CSoftware2MaterialRenderer.h */, + 4C53DFC00A484C240014E966 /* CSoftwareDriver.cpp */, + 4C53DFC10A484C240014E966 /* CSoftwareDriver.h */, + 4C53DFC40A484C240014E966 /* CSoftwareTexture.cpp */, + 4C53DFC50A484C240014E966 /* CSoftwareTexture.h */, + 4C53DFFF0A484C250014E966 /* CZBuffer.cpp */, + 4C53E0000A484C250014E966 /* CZBuffer.h */, + 5DD480540C7D93AB00728AA9 /* IDepthBuffer.h */, + 4C53E00F0A484C250014E966 /* ITriangleRenderer.h */, + 5DD4806C0C7D94AC00728AA9 /* CTRTextureBlend.cpp */, + 5DD4806D0C7D94AC00728AA9 /* CTRTextureGouraudAlpha.cpp */, + 5DD4806E0C7D94AC00728AA9 /* CTRTextureGouraudAlphaNoZ.cpp */, + 5DD4806F0C7D94AC00728AA9 /* CTRTextureLightMapGouraud2_M4.cpp */, + 4C53E0110A484C250014E966 /* IZBuffer.h */, + 4C53E16C0A484C2C0014E966 /* S2DVertex.h */, + 4C53DFD10A484C240014E966 /* CTRFlat.cpp */, + 4C53DFD20A484C240014E966 /* CTRFlatWire.cpp */, + 4C53DFD30A484C240014E966 /* CTRGouraud.cpp */, + 4C53DFD40A484C240014E966 /* CTRGouraud2.cpp */, + 4C53DFD50A484C240014E966 /* CTRGouraudAlpha2.cpp */, + 4C53DFD60A484C240014E966 /* CTRGouraudAlphaNoZ2.cpp */, + 4C53DFD70A484C240014E966 /* CTRGouraudWire.cpp */, + 4C53DFDC0A484C250014E966 /* CTRTextureDetailMap2.cpp */, + 4C53DFDD0A484C250014E966 /* CTRTextureFlat.cpp */, + 4C53DFDE0A484C250014E966 /* CTRTextureFlatWire.cpp */, + 4C53DFDF0A484C250014E966 /* CTRTextureGouraud.cpp */, + 4C53DFE00A484C250014E966 /* CTRTextureGouraud.h */, + 4C53DFE10A484C250014E966 /* CTRTextureGouraud2.cpp */, + 4C53DFE20A484C250014E966 /* CTRTextureGouraudAdd.cpp */, + 4C53DFE30A484C250014E966 /* CTRTextureGouraudAdd2.cpp */, + 4C53DFE40A484C250014E966 /* CTRTextureGouraudAddNoZ2.cpp */, + 4C53DFE50A484C250014E966 /* CTRTextureGouraudNoZ.cpp */, + 4C53DFE60A484C250014E966 /* CTRTextureGouraudNoZ2.cpp */, + 4C53DFE70A484C250014E966 /* CTRTextureGouraudVertexAlpha2.cpp */, + 4C53DFE80A484C250014E966 /* CTRTextureGouraudWire.cpp */, + 4C53DFE90A484C250014E966 /* CTRTextureLightMap2_Add.cpp */, + 4C53DFEA0A484C250014E966 /* CTRTextureLightMap2_M1.cpp */, + 4C53DFEB0A484C250014E966 /* CTRTextureLightMap2_M2.cpp */, + 4C53DFEC0A484C250014E966 /* CTRTextureLightMap2_M4.cpp */, + 4C53DFED0A484C250014E966 /* CTRTextureWire2.cpp */, + ); + name = Software; + sourceTree = "<group>"; + }; + 09293C2B0ED31FF8003B8C9C /* libpng */ = { + isa = PBXGroup; + children = ( + 09293C2C0ED32029003B8C9C /* png.c */, + 09293C2D0ED32029003B8C9C /* pngerror.c */, + 09293C2F0ED32029003B8C9C /* pngget.c */, + 09293C300ED32029003B8C9C /* pngmem.c */, + 09293C310ED32029003B8C9C /* pngpread.c */, + 09293C320ED32029003B8C9C /* pngread.c */, + 09293C330ED32029003B8C9C /* pngrio.c */, + 09293C340ED32029003B8C9C /* pngrtran.c */, + 09293C350ED32029003B8C9C /* pngrutil.c */, + 09293C360ED32029003B8C9C /* pngset.c */, + 09293C380ED32029003B8C9C /* pngtrans.c */, + 09293C3A0ED32029003B8C9C /* pngwio.c */, + 09293C3B0ED32029003B8C9C /* pngwrite.c */, + 09293C3C0ED32029003B8C9C /* pngwtran.c */, + 09293C3D0ED32029003B8C9C /* pngwutil.c */, + ); + name = libpng; + sourceTree = "<group>"; + }; + 0946CC980EC99B8B00D945A5 /* 19.MouseAndJoystick */ = { + isa = PBXGroup; + children = ( + 0946CCCA0EC99C6E00D945A5 /* main.cpp */, + ); + name = 19.MouseAndJoystick; + sourceTree = "<group>"; + }; + 09F6492D0D2CE017001E0599 /* 15.LoadIrrFile */ = { + isa = PBXGroup; + children = ( + 09F6492E0D2CE038001E0599 /* main.cpp */, + ); + name = 15.LoadIrrFile; + sourceTree = "<group>"; + }; + 09F649530D2CE1EB001E0599 /* 16.Quake3Shader */ = { + isa = PBXGroup; + children = ( + 09F649730D2CE2D0001E0599 /* main.cpp */, + ); + name = 16.Quake3Shader; + sourceTree = "<group>"; + }; + 0E2E3C621103B350002DE8D7 /* lzma */ = { + isa = PBXGroup; + children = ( + 0E2E3C631103B384002DE8D7 /* LzmaDec.c */, + ); + name = lzma; + sourceTree = "<group>"; + }; + 0E2E3C651103B388002DE8D7 /* bzip2 */ = { + isa = PBXGroup; + children = ( + 0E2E3C7B1103B4E1002DE8D7 /* bzlib.c */, + 0E2E3C661103B3B9002DE8D7 /* blocksort.c */, + 0E2E3C671103B3B9002DE8D7 /* bzcompress.c */, + 0E2E3C6A1103B3B9002DE8D7 /* crctable.c */, + 0E2E3C6B1103B3B9002DE8D7 /* decompress.c */, + 0E2E3C6C1103B3B9002DE8D7 /* huffman.c */, + 0E2E3C6E1103B3B9002DE8D7 /* randtable.c */, + ); + name = bzip2; + sourceTree = "<group>"; + }; + 0E2E3C7D1103B4E6002DE8D7 /* aesGladman */ = { + isa = PBXGroup; + children = ( + 0E2E3C7E1103B53C002DE8D7 /* aescrypt.cpp */, + 0E2E3C7F1103B53C002DE8D7 /* aeskey.cpp */, + 0E2E3C801103B53C002DE8D7 /* aestab.cpp */, + 0E2E3C811103B53C002DE8D7 /* fileenc.cpp */, + 0E2E3C821103B53C002DE8D7 /* hmac.cpp */, + 0E2E3C831103B53C002DE8D7 /* prng.cpp */, + 0E2E3C841103B53C002DE8D7 /* pwd2key.cpp */, + 0E2E3C851103B53C002DE8D7 /* sha1.cpp */, + 0E2E3C861103B53C002DE8D7 /* sha2.cpp */, + ); + name = aesGladman; + sourceTree = "<group>"; + }; + 0E2E3D671103E6C6002DE8D7 /* 18.SplitScreen */ = { + isa = PBXGroup; + children = ( + 0E2E3D681103E6C6002DE8D7 /* main.cpp */, + ); + path = 18.SplitScreen; + sourceTree = "<group>"; + }; + 0E2E3D781103E6E4002DE8D7 /* 20.ManagedLights */ = { + isa = PBXGroup; + children = ( + 0E2E3D791103E6E4002DE8D7 /* main.cpp */, + ); + path = 20.ManagedLights; + sourceTree = "<group>"; + }; + 0E2E3E1A1103F773002DE8D7 /* 21.Quake3Explorer */ = { + isa = PBXGroup; + children = ( + 0E2E3E1B1103F773002DE8D7 /* main.cpp */, + 0E2E3E1D1103F773002DE8D7 /* q3factory.cpp */, + 0E2E3E1E1103F773002DE8D7 /* q3factory.h */, + 0E2E3E261103F773002DE8D7 /* sound.cpp */, + 0E2E3E271103F773002DE8D7 /* sound.h */, + ); + path = 21.Quake3Explorer; + sourceTree = "<group>"; + }; + 0E2E3E281103F773002DE8D7 /* 22.MaterialViewer */ = { + isa = PBXGroup; + children = ( + 0E2E3E291103F773002DE8D7 /* main.cpp */, + ); + path = 22.MaterialViewer; + sourceTree = "<group>"; + }; + 0E2E3E311103F773002DE8D7 /* 23.SMeshHandling */ = { + isa = PBXGroup; + children = ( + 0E2E3E321103F773002DE8D7 /* main.cpp */, + ); + path = 23.SMeshHandling; + sourceTree = "<group>"; + }; + 34EF91900F65F9AD000B5651 /* loader */ = { + isa = PBXGroup; + children = ( + 4CFA7BDC0A88735900B03626 /* CImageLoaderBMP.cpp */, + 4CFA7BDD0A88735900B03626 /* CImageLoaderBMP.h */, + 4C53DF5C0A484C230014E966 /* CImageLoaderJPG.cpp */, + 4C53DF5D0A484C230014E966 /* CImageLoaderJPG.h */, + 4C53DF5E0A484C230014E966 /* CImageLoaderPCX.cpp */, + 4C53DF5F0A484C230014E966 /* CImageLoaderPCX.h */, + 4C53DF600A484C230014E966 /* CImageLoaderPNG.cpp */, + 4C53DF610A484C230014E966 /* CImageLoaderPNG.h */, + 096840270D0F1A2300333EFD /* CImageLoaderPPM.cpp */, + 096840280D0F1A2300333EFD /* CImageLoaderPPM.h */, + 4C53DF620A484C230014E966 /* CImageLoaderPSD.cpp */, + 4C53DF630A484C230014E966 /* CImageLoaderPSD.h */, + 34EF91D00F65FCA6000B5651 /* CImageLoaderRGB.h */, + 34EF91D10F65FCA6000B5651 /* CImageLoaderRGB.cpp */, + 4C53DF640A484C230014E966 /* CImageLoaderTGA.cpp */, + 4C53DF650A484C230014E966 /* CImageLoaderTGA.h */, + 0910B9DC0D1F5D4100D46B04 /* CImageLoaderWAL.cpp */, + 0910B9DD0D1F5D4100D46B04 /* CImageLoaderWAL.h */, + ); + name = loader; + sourceTree = "<group>"; + }; + 34FFD9C50F6600A900420884 /* libraries */ = { + isa = PBXGroup; + children = ( + 0E2E3C7D1103B4E6002DE8D7 /* aesGladman */, + 0E2E3C651103B388002DE8D7 /* bzip2 */, + 0E2E3C621103B350002DE8D7 /* lzma */, + 4C53E1710A484C2C0014E966 /* zlib */, + 4C53E0130A484C250014E966 /* jpeglib */, + 09293C2B0ED31FF8003B8C9C /* libpng */, + ); + name = libraries; + sourceTree = "<group>"; + }; + 34FFD9C60F6600DA00420884 /* device */ = { + isa = PBXGroup; + children = ( + 4C53E14A0A484C2C0014E966 /* MacOSX */, + 0E2E3C571103B2AE002DE8D7 /* CIrrDeviceFB.cpp */, + 0E2E3C581103B2AE002DE8D7 /* CIrrDeviceFB.h */, + 0E2E3C591103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp */, + 0E2E3C5A1103B2AE002DE8D7 /* CIrrDeviceWinCE.h */, + 34EC243A0F59272E0037BC3A /* CIrrDeviceConsole.h */, + 34EC243B0F59272E0037BC3A /* CIrrDeviceConsole.cpp */, + 4C53DF660A484C230014E966 /* CIrrDeviceLinux.cpp */, + 4C53DF670A484C230014E966 /* CIrrDeviceLinux.h */, + 5DD480C40C7DA66800728AA9 /* CIrrDeviceSDL.cpp */, + 5DD480C30C7DA66800728AA9 /* CIrrDeviceSDL.h */, + 4C53DF680A484C230014E966 /* CIrrDeviceStub.cpp */, + 4C53DF690A484C230014E966 /* CIrrDeviceStub.h */, + 4C53DF6A0A484C230014E966 /* CIrrDeviceWin32.cpp */, + 4C53DF6B0A484C230014E966 /* CIrrDeviceWin32.h */, + ); + name = device; + sourceTree = "<group>"; + }; + 34FFD9C70F66011C00420884 /* archive */ = { + isa = PBXGroup; + children = ( + 0E2E3C531103B27D002DE8D7 /* CNPKReader.cpp */, + 0E2E3C541103B27D002DE8D7 /* CNPKReader.h */, + 344FD4A41039E98C0045FD3F /* CMountPointReader.cpp */, + 344FD4A51039E98C0045FD3F /* CMountPointReader.h */, + 3430E4D41022C391006271FD /* CTarReader.h */, + 3430E4D51022C391006271FD /* CTarReader.cpp */, + 4C53E0030A484C250014E966 /* CZipReader.cpp */, + 4C53E0040A484C250014E966 /* CZipReader.h */, + 4C43EEBE0A74A5C800F942FC /* CPakReader.cpp */, + 4C43EEBF0A74A5C800F942FC /* CPakReader.h */, + ); + name = archive; + sourceTree = "<group>"; + }; + 34FFD9C80F66012D00420884 /* attributes */ = { + isa = PBXGroup; + children = ( + 4C53DEEF0A484C220014E966 /* CAttributeImpl.h */, + 4C53DEF00A484C220014E966 /* CAttributes.cpp */, + 4C53DEF10A484C220014E966 /* CAttributes.h */, + ); + name = attributes; + sourceTree = "<group>"; + }; + 34FFD9C90F66014200420884 /* file */ = { + isa = PBXGroup; + children = ( + 4C53DFA70A484C240014E966 /* CReadFile.cpp */, + 4C53DFA80A484C240014E966 /* CReadFile.h */, + 4C53DFF20A484C250014E966 /* CWriteFile.cpp */, + 4C53DFF30A484C250014E966 /* CWriteFile.h */, + 4C53DF6E0A484C230014E966 /* CLimitReadFile.cpp */, + 4C53DF6F0A484C230014E966 /* CLimitReadFile.h */, + 3484C4FB0F48D4CB00C81F60 /* CMemoryFile.h */, + 3484C4FC0F48D4CB00C81F60 /* CMemoryFile.cpp */, + ); + name = file; + sourceTree = "<group>"; + }; + 34FFD9CA0F66018500420884 /* xml */ = { + isa = PBXGroup; + children = ( + 4C53DFFA0A484C250014E966 /* CXMLReader.cpp */, + 4C53DFFB0A484C250014E966 /* CXMLReader.h */, + 4C53DFFC0A484C250014E966 /* CXMLReaderImpl.h */, + 4C53DFFD0A484C250014E966 /* CXMLWriter.cpp */, + 4C53DFFE0A484C250014E966 /* CXMLWriter.h */, + 4C53E00E0A484C250014E966 /* irrXML.cpp */, + ); + name = xml; + sourceTree = "<group>"; + }; + 34FFD9CB0F6601AC00420884 /* element */ = { + isa = PBXGroup; + children = ( + 4C53DF2E0A484C230014E966 /* CGUIButton.cpp */, + 4C53DF2F0A484C230014E966 /* CGUIButton.h */, + 4C53DF300A484C230014E966 /* CGUICheckBox.cpp */, + 4C53DF310A484C230014E966 /* CGUICheckBox.h */, + 5DD4805E0C7D947B00728AA9 /* CGUIColorSelectDialog.cpp */, + 5DD4805F0C7D947B00728AA9 /* CGUIColorSelectDialog.h */, + 4C53DF320A484C230014E966 /* CGUIComboBox.cpp */, + 4C53DF330A484C230014E966 /* CGUIComboBox.h */, + 4C53DF340A484C230014E966 /* CGUIContextMenu.cpp */, + 4C53DF350A484C230014E966 /* CGUIContextMenu.h */, + 4C53DF360A484C230014E966 /* CGUIEditBox.cpp */, + 4C53DF370A484C230014E966 /* CGUIEditBox.h */, + 4C53DF380A484C230014E966 /* CGUIEnvironment.cpp */, + 4C53DF390A484C230014E966 /* CGUIEnvironment.h */, + 4C53DF3A0A484C230014E966 /* CGUIFileOpenDialog.cpp */, + 4C53DF3B0A484C230014E966 /* CGUIFileOpenDialog.h */, + 4C53DF3E0A484C230014E966 /* CGUIImage.cpp */, + 4C53DF3F0A484C230014E966 /* CGUIImage.h */, + 3484C4DF0F48D1B000C81F60 /* CGUIImageList.h */, + 3484C4E00F48D1B000C81F60 /* CGUIImageList.cpp */, + 4C53DF400A484C230014E966 /* CGUIInOutFader.cpp */, + 4C53DF410A484C230014E966 /* CGUIInOutFader.h */, + 4C53DF420A484C230014E966 /* CGUIListBox.cpp */, + 4C53DF430A484C230014E966 /* CGUIListBox.h */, + 4C53DF440A484C230014E966 /* CGUIMenu.cpp */, + 4C53DF450A484C230014E966 /* CGUIMenu.h */, + 4C53DF460A484C230014E966 /* CGUIMeshViewer.cpp */, + 4C53DF470A484C230014E966 /* CGUIMeshViewer.h */, + 4C53DF480A484C230014E966 /* CGUIMessageBox.cpp */, + 4C53DF490A484C230014E966 /* CGUIMessageBox.h */, + 4C53DF4A0A484C230014E966 /* CGUIModalScreen.cpp */, + 4C53DF4B0A484C230014E966 /* CGUIModalScreen.h */, + 4C53DF4C0A484C230014E966 /* CGUIScrollBar.cpp */, + 4C53DF4D0A484C230014E966 /* CGUIScrollBar.h */, + 5DD480600C7D947B00728AA9 /* CGUISpinBox.cpp */, + 5DD480610C7D947B00728AA9 /* CGUISpinBox.h */, + 4C53DF500A484C230014E966 /* CGUIStaticText.cpp */, + 4C53DF510A484C230014E966 /* CGUIStaticText.h */, + 4C53DF520A484C230014E966 /* CGUITabControl.cpp */, + 4C53DF530A484C230014E966 /* CGUITabControl.h */, + 0910B9DA0D1F5D4100D46B04 /* CGUITable.cpp */, + 0910B9DB0D1F5D4100D46B04 /* CGUITable.h */, + 4C53DF540A484C230014E966 /* CGUIToolBar.cpp */, + 4C53DF550A484C230014E966 /* CGUIToolBar.h */, + 3484C4EC0F48D3A100C81F60 /* CGUITreeView.h */, + 3484C4ED0F48D3A100C81F60 /* CGUITreeView.cpp */, + 4C53DF560A484C230014E966 /* CGUIWindow.cpp */, + 4C53DF570A484C230014E966 /* CGUIWindow.h */, + ); + name = element; + sourceTree = "<group>"; + }; + 4C00546D0A48470500C844C2 /* examples */ = { + isa = PBXGroup; + children = ( + 4C00546E0A48470500C844C2 /* 01.HelloWorld */, + 4C0054740A48470500C844C2 /* 02.Quake3Map */, + 4C00547A0A48470500C844C2 /* 03.CustomSceneNode */, + 4C0054800A48470500C844C2 /* 04.Movement */, + 4C0054860A48470500C844C2 /* 05.UserInterface */, + 4C00548C0A48470500C844C2 /* 06.2DGraphics */, + 4C0054920A48470500C844C2 /* 07.Collision */, + 4C0054980A48470500C844C2 /* 08.SpecialFX */, + 4C00549E0A48470500C844C2 /* 09.Meshviewer */, + 4C0054A70A48470500C844C2 /* 10.Shaders */, + 4C0054AD0A48470500C844C2 /* 11.PerPixelLighting */, + 4C0054B30A48470500C844C2 /* 12.TerrainRendering */, + 4C0054B90A48470500C844C2 /* 13.RenderToTexture */, + 09F6492D0D2CE017001E0599 /* 15.LoadIrrFile */, + 09F649530D2CE1EB001E0599 /* 16.Quake3Shader */, + 0E2E3D671103E6C6002DE8D7 /* 18.SplitScreen */, + 0946CC980EC99B8B00D945A5 /* 19.MouseAndJoystick */, + 0E2E3D781103E6E4002DE8D7 /* 20.ManagedLights */, + 0E2E3E1A1103F773002DE8D7 /* 21.Quake3Explorer */, + 0E2E3E281103F773002DE8D7 /* 22.MaterialViewer */, + 0E2E3E311103F773002DE8D7 /* 23.SMeshHandling */, + 4C0054C40A48470500C844C2 /* Demo */, + ); + name = examples; + path = ../../../examples; + sourceTree = SOURCE_ROOT; + }; + 4C00546E0A48470500C844C2 /* 01.HelloWorld */ = { + isa = PBXGroup; + children = ( + 4C0054710A48470500C844C2 /* main.cpp */, + ); + path = 01.HelloWorld; + sourceTree = "<group>"; + }; + 4C0054740A48470500C844C2 /* 02.Quake3Map */ = { + isa = PBXGroup; + children = ( + 4C0054770A48470500C844C2 /* main.cpp */, + ); + path = 02.Quake3Map; + sourceTree = "<group>"; + }; + 4C00547A0A48470500C844C2 /* 03.CustomSceneNode */ = { + isa = PBXGroup; + children = ( + 4C00547D0A48470500C844C2 /* main.cpp */, + ); + path = 03.CustomSceneNode; + sourceTree = "<group>"; + }; + 4C0054800A48470500C844C2 /* 04.Movement */ = { + isa = PBXGroup; + children = ( + 4C0054830A48470500C844C2 /* main.cpp */, + ); + path = 04.Movement; + sourceTree = "<group>"; + }; + 4C0054860A48470500C844C2 /* 05.UserInterface */ = { + isa = PBXGroup; + children = ( + 4C0054890A48470500C844C2 /* main.cpp */, + ); + path = 05.UserInterface; + sourceTree = "<group>"; + }; + 4C00548C0A48470500C844C2 /* 06.2DGraphics */ = { + isa = PBXGroup; + children = ( + 4C00548F0A48470500C844C2 /* main.cpp */, + ); + path = 06.2DGraphics; + sourceTree = "<group>"; + }; + 4C0054920A48470500C844C2 /* 07.Collision */ = { + isa = PBXGroup; + children = ( + 4C0054950A48470500C844C2 /* main.cpp */, + ); + path = 07.Collision; + sourceTree = "<group>"; + }; + 4C0054980A48470500C844C2 /* 08.SpecialFX */ = { + isa = PBXGroup; + children = ( + 4C00549B0A48470500C844C2 /* main.cpp */, + ); + path = 08.SpecialFX; + sourceTree = "<group>"; + }; + 4C00549E0A48470500C844C2 /* 09.Meshviewer */ = { + isa = PBXGroup; + children = ( + 4C0054A30A48470500C844C2 /* main.cpp */, + ); + path = 09.Meshviewer; + sourceTree = "<group>"; + }; + 4C0054A70A48470500C844C2 /* 10.Shaders */ = { + isa = PBXGroup; + children = ( + 4C0054AA0A48470500C844C2 /* main.cpp */, + ); + path = 10.Shaders; + sourceTree = "<group>"; + }; + 4C0054AD0A48470500C844C2 /* 11.PerPixelLighting */ = { + isa = PBXGroup; + children = ( + 4C0054B00A48470500C844C2 /* main.cpp */, + ); + path = 11.PerPixelLighting; + sourceTree = "<group>"; + }; + 4C0054B30A48470500C844C2 /* 12.TerrainRendering */ = { + isa = PBXGroup; + children = ( + 4C0054B60A48470500C844C2 /* main.cpp */, + ); + path = 12.TerrainRendering; + sourceTree = "<group>"; + }; + 4C0054B90A48470500C844C2 /* 13.RenderToTexture */ = { + isa = PBXGroup; + children = ( + 4C0054BC0A48470500C844C2 /* main.cpp */, + ); + path = 13.RenderToTexture; + sourceTree = "<group>"; + }; + 4C0054C40A48470500C844C2 /* Demo */ = { + isa = PBXGroup; + children = ( + 4C0054C50A48470500C844C2 /* CDemo.cpp */, + 4C0054C60A48470500C844C2 /* CDemo.h */, + 4C0054C70A48470500C844C2 /* CMainMenu.cpp */, + 4C0054C80A48470500C844C2 /* CMainMenu.h */, + 4C0054CA0A48470500C844C2 /* main.cpp */, + ); + path = Demo; + sourceTree = "<group>"; + }; + 4C53DEE50A484C220014E966 /* Irrlicht */ = { + isa = PBXGroup; + children = ( + 34FFD9C50F6600A900420884 /* libraries */, + 4C6DC9960A486B110017A6E5 /* Engine */, + ); + name = Irrlicht; + path = ..; + sourceTree = SOURCE_ROOT; + }; + 4C53E0130A484C250014E966 /* jpeglib */ = { + isa = PBXGroup; + children = ( + 0E2E3C431103B1B5002DE8D7 /* jaricom.c */, + 0E2E3C441103B1B5002DE8D7 /* jcarith.c */, + 0E2E3C451103B1B5002DE8D7 /* jdarith.c */, + 4C53E6F10A485CD80014E966 /* jcapimin.c */, + 4C53E6F20A485CD80014E966 /* jcapistd.c */, + 95E9D50210F42F9A008546FE /* jcarith.c */, + 4C53E6F30A485CD80014E966 /* jccoefct.c */, + 4C53E6F40A485CD80014E966 /* jccolor.c */, + 4C53E6F50A485CD80014E966 /* jcdctmgr.c */, + 4C53E6F60A485CD80014E966 /* jchuff.c */, + 4C53E6F80A485CD80014E966 /* jcinit.c */, + 4C53E6F90A485CD80014E966 /* jcmainct.c */, + 4C53E6FA0A485CD80014E966 /* jcmarker.c */, + 4C53E6FB0A485CD80014E966 /* jcmaster.c */, + 4C53E6FC0A485CD80014E966 /* jcomapi.c */, + 4C53E70A0A485CD80014E966 /* jcparam.c */, + 4C53E70C0A485CD80014E966 /* jcprepct.c */, + 4C53E70D0A485CD80014E966 /* jcsample.c */, + 4C53E70E0A485CD80014E966 /* jctrans.c */, + 4C53E70F0A485CD80014E966 /* jdapimin.c */, + 95E9D50A10F43011008546FE /* jaricom.c */, + 4C53E7100A485CD80014E966 /* jdapistd.c */, + 95E9D50610F42FDF008546FE /* jdarith.c */, + 4C53E7110A485CD80014E966 /* jdatadst.c */, + 4C53E7120A485CD80014E966 /* jdatasrc.c */, + 4C53E7130A485CD80014E966 /* jdcoefct.c */, + 4C53E7140A485CD80014E966 /* jdcolor.c */, + 4C53E7160A485CD80014E966 /* jddctmgr.c */, + 4C53E7170A485CD80014E966 /* jdhuff.c */, + 4C53E7190A485CD80014E966 /* jdinput.c */, + 4C53E71A0A485CD80014E966 /* jdmainct.c */, + 4C53E71B0A485CD80014E966 /* jdmarker.c */, + 4C53E71C0A485CD80014E966 /* jdmaster.c */, + 4C53E71D0A485CD80014E966 /* jdmerge.c */, + 4C53E71F0A485CD80014E966 /* jdpostct.c */, + 4C53E7200A485CD80014E966 /* jdsample.c */, + 4C53E7210A485CD80014E966 /* jdtrans.c */, + 4C53E7220A485CD80014E966 /* jerror.c */, + 4C53E7240A485CD80014E966 /* jfdctflt.c */, + 4C53E7250A485CD80014E966 /* jfdctfst.c */, + 4C53E7260A485CD80014E966 /* jfdctint.c */, + 4C53E7270A485CD80014E966 /* jidctflt.c */, + 4C53E7280A485CD80014E966 /* jidctfst.c */, + 4C53E7290A485CD80014E966 /* jidctint.c */, + 4C53E7300A485CD80014E966 /* jmemmgr.c */, + 4C53E7320A485CD80014E966 /* jmemnobs.c */, + 4C53E7390A485CD80014E966 /* jquant1.c */, + 4C53E73A0A485CD80014E966 /* jquant2.c */, + 4C53E73B0A485CD80014E966 /* jutils.c */, + ); + path = jpeglib; + sourceTree = "<group>"; + }; + 4C53E14A0A484C2C0014E966 /* MacOSX */ = { + isa = PBXGroup; + children = ( + 4C53E14C0A484C2C0014E966 /* AppDelegate.h */, + 4C53E14D0A484C2C0014E966 /* AppDelegate.mm */, + 4C53E14E0A484C2C0014E966 /* build */, + 4C53E15E0A484C2C0014E966 /* CIrrDeviceMacOSX.h */, + 4C53E15F0A484C2C0014E966 /* CIrrDeviceMacOSX.mm */, + 4C53E1640A484C2C0014E966 /* MacOSX_Prefix.pch */, + 4C53E1650A484C2C0014E966 /* MainMenu.nib */, + 4C53E1660A484C2C0014E966 /* OSXClipboard.h */, + 4C53E1670A484C2C0014E966 /* OSXClipboard.mm */, + ); + path = MacOSX; + sourceTree = "<group>"; + }; + 4C53E14E0A484C2C0014E966 /* build */ = { + isa = PBXGroup; + children = ( + 4C53E14F0A484C2C0014E966 /* MacOSX.build */, + ); + path = build; + sourceTree = "<group>"; + }; + 4C53E14F0A484C2C0014E966 /* MacOSX.build */ = { + isa = PBXGroup; + children = ( + 4C53E1500A484C2C0014E966 /* MacOSX.pbxindex */, + ); + path = MacOSX.build; + sourceTree = "<group>"; + }; + 4C53E1500A484C2C0014E966 /* MacOSX.pbxindex */ = { + isa = PBXGroup; + children = ( + 4C53E1590A484C2C0014E966 /* strings.pbxstrings */, + ); + path = MacOSX.pbxindex; + sourceTree = "<group>"; + }; + 4C53E1590A484C2C0014E966 /* strings.pbxstrings */ = { + isa = PBXGroup; + children = ( + ); + path = strings.pbxstrings; + sourceTree = "<group>"; + }; + 4C53E1710A484C2C0014E966 /* zlib */ = { + isa = PBXGroup; + children = ( + 4C6DC9B60A48715A0017A6E5 /* inflate.c */, + 4C53E1720A484C2C0014E966 /* adler32.c */, + 4C53E1750A484C2C0014E966 /* compress.c */, + 4C53E1770A484C2C0014E966 /* crc32.c */, + 4C53E1790A484C2C0014E966 /* deflate.c */, + 4C53E1800A484C2C0014E966 /* inffast.c */, + 4C53E1850A484C2C0014E966 /* inftrees.c */, + 4C53E18B0A484C2C0014E966 /* trees.c */, + 4C53E18D0A484C2C0014E966 /* uncompr.c */, + 4C53E1920A484C2C0014E966 /* zutil.c */, + ); + path = zlib; + sourceTree = "<group>"; + }; + 4C53E24C0A484FED0014E966 /* Products */ = { + isa = PBXGroup; + children = ( + 4C53E24D0A4850120014E966 /* libIrrlicht.a */, + 0946CCB40EC99BBE00D945A5 /* MouseAndJoystick_dbg.app */, + 09022C620EA0E97F00CD54EE /* GUIEditor_dbg.app */, + 4C53E2520A4850550014E966 /* Quake3Map_dbg.app */, + 4CA25B980A485D9800B4E469 /* CustomSceneNode_dbg.app */, + 4CA25BA40A485D9800B4E469 /* Movement_dbg.app */, + 4CA25B9E0A485D9800B4E469 /* UserInterface_dbg.app */, + 4CA25BAC0A485D9800B4E469 /* 2DGraphics_dbg.app */, + 4CA25BAE0A485D9800B4E469 /* Collision_dbg.app */, + 4CA25BA80A485D9800B4E469 /* SpecialFx_dbg.app */, + 4CA25B9A0A485D9800B4E469 /* MeshViewer_dbg.app */, + 4CA25BA60A485D9800B4E469 /* Shaders_dbg.app */, + 4CA25BA00A485D9800B4E469 /* PerPixelLighting_dbg.app */, + 4CA25B9C0A485D9800B4E469 /* RenderToTexture_dbg.app */, + 4CA25BAA0A485D9800B4E469 /* TerrainRendering_dbg.app */, + 4CA25BA20A485D9800B4E469 /* Demo_dbg.app */, + 09F6493E0D2CE03E001E0599 /* LoadIrrFile_dbg.app */, + 09F649650D2CE206001E0599 /* Quake3Shader_dbg.app */, + 09F649030D2CDED9001E0599 /* HelloWorld_dbg.app */, + 0E2E3CFC1103E294002DE8D7 /* SplitScreen_dbg.app */, + 0E2E3D3C1103E3F4002DE8D7 /* ManagedLights_dbg.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 4C53E2540A48505D0014E966 /* Libraries */ = { + isa = PBXGroup; + children = ( + 0930CE550EC39F4500D63866 /* IOKit.framework */, + 0925113D0D744ADE006784D9 /* Carbon.framework */, + 4C53E26D0A4850D60014E966 /* Cocoa.framework */, + 4C53E26E0A4850D60014E966 /* OpenGL.framework */, + ); + name = Libraries; + sourceTree = "<group>"; + }; + 4C6DC9960A486B110017A6E5 /* Engine */ = { + isa = PBXGroup; + children = ( + 95E5858C12FCE388004946C6 /* CTRNormalMap.cpp */, + 95E5857512FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp */, + 95E5859112FCE3A1004946C6 /* CTRStencilShadow.cpp */, + 95E5857612FCE2CB004946C6 /* CAnimatedMeshHalfLife.h */, + 95E5857B12FCE2DE004946C6 /* CSceneLoaderIrr.cpp */, + 95E5859412FCE3F5004946C6 /* CSMFMeshFileLoader.cpp */, + 95E5857012FCE277004946C6 /* CWADReader.cpp */, + 0910BA810D1F6BB800D46B04 /* gui */, + 0910BA820D1F6C3900D46B04 /* io */, + 0910BA830D1F6CA600D46B04 /* irr */, + 0910BA840D1F6D0200D46B04 /* scene */, + 0910BA8B0D1F71D600D46B04 /* video */, + ); + name = Engine; + sourceTree = "<group>"; + }; + 4CFA7C090A88742800B03626 /* include */ = { + isa = PBXGroup; + children = ( + 0910BA4E0D1F652100D46B04 /* core */, + 0910BA4D0D1F64D000D46B04 /* gui */, + 0910BA4F0D1F65A300D46B04 /* io */, + 0910BA500D1F660300D46B04 /* scene */, + 0910BA800D1F6ADA00D46B04 /* video */, + 0910BA1D0D1F64B300D46B04 /* IReferenceCounted.h */, + 4CFA7C0C0A88742800B03626 /* EDriverTypes.h */, + 4CFA7C1D0A88742900B03626 /* IEventReceiver.h */, + 4CFA7C420A88742900B03626 /* IOSOperator.h */, + 4CFA7C380A88742900B03626 /* ILogger.h */, + 4CFA7C4A0A88742900B03626 /* IrrCompileConfig.h */, + 4CFA7C4B0A88742900B03626 /* irrlicht.h */, + 4CFA7C4C0A88742900B03626 /* IrrlichtDevice.h */, + 4CFA7C740A88742900B03626 /* SIrrCreationParameters.h */, + ); + name = include; + path = ../../../include; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 959726F812C18FFB00BF73D3 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 95154774133CD9DA008D792F /* aabbox3d.h in Headers */, + 95154775133CD9DA008D792F /* CMeshBuffer.h in Headers */, + 95154776133CD9DA008D792F /* coreutil.h in Headers */, + 95154777133CD9DA008D792F /* dimension2d.h in Headers */, + 95154778133CD9DA008D792F /* ECullingTypes.h in Headers */, + 95154779133CD9DA008D792F /* EDebugSceneTypes.h in Headers */, + 9515477A133CD9DA008D792F /* EDriverFeatures.h in Headers */, + 9515477B133CD9DA008D792F /* EDriverTypes.h in Headers */, + 9515477C133CD9DA008D792F /* EGUIAlignment.h in Headers */, + 9515477D133CD9DA008D792F /* EGUIElementTypes.h in Headers */, + 9515477E133CD9DA008D792F /* EHardwareBufferFlags.h in Headers */, + 9515477F133CD9DA008D792F /* EMaterialFlags.h in Headers */, + 95154780133CD9DA008D792F /* EMaterialTypes.h in Headers */, + 95154781133CD9DA008D792F /* EMeshWriterEnums.h in Headers */, + 95154782133CD9DA008D792F /* EMessageBoxFlags.h in Headers */, + 95154783133CD9DA008D792F /* ESceneNodeAnimatorTypes.h in Headers */, + 95154784133CD9DA008D792F /* ESceneNodeTypes.h in Headers */, + 95154785133CD9DA008D792F /* ETerrainElements.h in Headers */, + 95154786133CD9DA008D792F /* heapsort.h in Headers */, + 95154787133CD9DA008D792F /* IAnimatedMesh.h in Headers */, + 95154788133CD9DA008D792F /* IAnimatedMeshMD2.h in Headers */, + 95154789133CD9DA008D792F /* IAnimatedMeshMD3.h in Headers */, + 9515478A133CD9DA008D792F /* IAnimatedMeshSceneNode.h in Headers */, + 9515478B133CD9DA008D792F /* IAttributeExchangingObject.h in Headers */, + 9515478C133CD9DA008D792F /* IAttributes.h in Headers */, + 9515478D133CD9DA008D792F /* IBillboardSceneNode.h in Headers */, + 9515478E133CD9DA008D792F /* IBoneSceneNode.h in Headers */, + 9515478F133CD9DA008D792F /* ICameraSceneNode.h in Headers */, + 95154790133CD9DA008D792F /* ICursorControl.h in Headers */, + 95154791133CD9DA008D792F /* IDummyTransformationSceneNode.h in Headers */, + 95154792133CD9DA008D792F /* IEventReceiver.h in Headers */, + 95154793133CD9DA008D792F /* IFileList.h in Headers */, + 95154794133CD9DA008D792F /* IFileSystem.h in Headers */, + 95154795133CD9DA008D792F /* IGPUProgrammingServices.h in Headers */, + 95154796133CD9DA008D792F /* IGUIButton.h in Headers */, + 95154797133CD9DA008D792F /* IGUICheckBox.h in Headers */, + 95154798133CD9DA008D792F /* IGUIColorSelectDialog.h in Headers */, + 95154799133CD9DA008D792F /* IGUIComboBox.h in Headers */, + 9515479A133CD9DA008D792F /* IGUIContextMenu.h in Headers */, + 9515479B133CD9DA008D792F /* IGUIEditBox.h in Headers */, + 9515479C133CD9DA008D792F /* IGUIElement.h in Headers */, + 9515479D133CD9DA008D792F /* IGUIElementFactory.h in Headers */, + 9515479E133CD9DA008D792F /* IGUIEnvironment.h in Headers */, + 9515479F133CD9DA008D792F /* IGUIFileOpenDialog.h in Headers */, + 951547A0133CD9DA008D792F /* IGUIFont.h in Headers */, + 951547A1133CD9DA008D792F /* IGUIFontBitmap.h in Headers */, + 951547A2133CD9DA008D792F /* IGUIImage.h in Headers */, + 951547A3133CD9DA008D792F /* IGUIInOutFader.h in Headers */, + 951547A4133CD9DA008D792F /* IGUIListBox.h in Headers */, + 951547A5133CD9DA008D792F /* IGUIMeshViewer.h in Headers */, + 951547A6133CD9DA008D792F /* IGUIScrollBar.h in Headers */, + 951547A7133CD9DA008D792F /* IGUISkin.h in Headers */, + 951547A8133CD9DA008D792F /* IGUISpinBox.h in Headers */, + 951547A9133CD9DA008D792F /* IGUISpriteBank.h in Headers */, + 951547AA133CD9DA008D792F /* IGUIStaticText.h in Headers */, + 951547AB133CD9DA008D792F /* IGUITabControl.h in Headers */, + 951547AC133CD9DA008D792F /* IGUITable.h in Headers */, + 951547AD133CD9DA008D792F /* IGUIToolbar.h in Headers */, + 951547AE133CD9DA008D792F /* IGUIWindow.h in Headers */, + 951547AF133CD9DA008D792F /* IImage.h in Headers */, + 951547B0133CD9DA008D792F /* IImageLoader.h in Headers */, + 951547B1133CD9DA008D792F /* IImageWriter.h in Headers */, + 951547B2133CD9DA008D792F /* ILightSceneNode.h in Headers */, + 951547B3133CD9DA008D792F /* ILogger.h in Headers */, + 951547B4133CD9DA008D792F /* IMaterialRenderer.h in Headers */, + 951547B5133CD9DA008D792F /* IMaterialRendererServices.h in Headers */, + 951547B6133CD9DA008D792F /* IMesh.h in Headers */, + 951547B7133CD9DA008D792F /* IMeshBuffer.h in Headers */, + 951547B8133CD9DA008D792F /* IMeshCache.h in Headers */, + 951547B9133CD9DA008D792F /* IMeshLoader.h in Headers */, + 951547BA133CD9DA008D792F /* IMeshManipulator.h in Headers */, + 951547BB133CD9DA008D792F /* IMeshSceneNode.h in Headers */, + 951547BC133CD9DA008D792F /* IMeshWriter.h in Headers */, + 951547BD133CD9DA008D792F /* IMetaTriangleSelector.h in Headers */, + 951547BE133CD9DA008D792F /* IOSOperator.h in Headers */, + 951547BF133CD9DA008D792F /* IParticleAffector.h in Headers */, + 951547C0133CD9DA008D792F /* IParticleAnimatedMeshSceneNodeEmitter.h in Headers */, + 951547C1133CD9DA008D792F /* IParticleAttractionAffector.h in Headers */, + 951547C2133CD9DA008D792F /* IParticleBoxEmitter.h in Headers */, + 951547C3133CD9DA008D792F /* IParticleCylinderEmitter.h in Headers */, + 951547C4133CD9DA008D792F /* IParticleEmitter.h in Headers */, + 951547C5133CD9DA008D792F /* IParticleFadeOutAffector.h in Headers */, + 951547C6133CD9DA008D792F /* IParticleGravityAffector.h in Headers */, + 951547C7133CD9DA008D792F /* IParticleMeshEmitter.h in Headers */, + 951547C8133CD9DA008D792F /* IParticleRingEmitter.h in Headers */, + 951547C9133CD9DA008D792F /* IParticleRotationAffector.h in Headers */, + 951547CA133CD9DA008D792F /* IParticleSphereEmitter.h in Headers */, + 951547CB133CD9DA008D792F /* IParticleSystemSceneNode.h in Headers */, + 951547CC133CD9DA008D792F /* IQ3LevelMesh.h in Headers */, + 951547CD133CD9DA008D792F /* IQ3Shader.h in Headers */, + 951547CE133CD9DA008D792F /* IReadFile.h in Headers */, + 951547CF133CD9DA008D792F /* IReferenceCounted.h in Headers */, + 951547D0133CD9DA008D792F /* irrAllocator.h in Headers */, + 951547D1133CD9DA008D792F /* irrArray.h in Headers */, + 951547D2133CD9DA008D792F /* IrrCompileConfig.h in Headers */, + 951547D3133CD9DA008D792F /* irrlicht.h in Headers */, + 951547D4133CD9DA008D792F /* IrrlichtDevice.h in Headers */, + 951547D5133CD9DA008D792F /* irrList.h in Headers */, + 951547D6133CD9DA008D792F /* irrMap.h in Headers */, + 951547D7133CD9DA008D792F /* irrMath.h in Headers */, + 951547D8133CD9DA008D792F /* irrString.h in Headers */, + 951547D9133CD9DA008D792F /* irrTypes.h in Headers */, + 951547DA133CD9DA008D792F /* irrXML.h in Headers */, + 951547DB133CD9DA008D792F /* ISceneCollisionManager.h in Headers */, + 951547DC133CD9DA008D792F /* ISceneManager.h in Headers */, + 951547DD133CD9DA008D792F /* ISceneNode.h in Headers */, + 951547DE133CD9DA008D792F /* ISceneNodeAnimator.h in Headers */, + 951547DF133CD9DA008D792F /* ISceneNodeAnimatorCollisionResponse.h in Headers */, + 951547E0133CD9DA008D792F /* ISceneNodeAnimatorFactory.h in Headers */, + 951547E1133CD9DA008D792F /* ISceneNodeFactory.h in Headers */, + 951547E2133CD9DA008D792F /* ISceneUserDataSerializer.h in Headers */, + 951547E3133CD9DA008D792F /* IShaderConstantSetCallBack.h in Headers */, + 951547E4133CD9DA008D792F /* IShadowVolumeSceneNode.h in Headers */, + 951547E5133CD9DA008D792F /* ISkinnedMesh.h in Headers */, + 951547E6133CD9DA008D792F /* ITerrainSceneNode.h in Headers */, + 951547E7133CD9DA008D792F /* ITextSceneNode.h in Headers */, + 951547E8133CD9DA008D792F /* ITexture.h in Headers */, + 951547E9133CD9DA008D792F /* ITimer.h in Headers */, + 951547EA133CD9DA008D792F /* ITriangleSelector.h in Headers */, + 951547EB133CD9DA008D792F /* IVideoDriver.h in Headers */, + 951547EC133CD9DA008D792F /* IVideoModeList.h in Headers */, + 951547ED133CD9DA008D792F /* IWriteFile.h in Headers */, + 951547EE133CD9DA008D792F /* IXMLReader.h in Headers */, + 951547EF133CD9DA008D792F /* IXMLWriter.h in Headers */, + 951547F0133CD9DA008D792F /* Keycodes.h in Headers */, + 951547F1133CD9DA008D792F /* line2d.h in Headers */, + 951547F2133CD9DA008D792F /* line3d.h in Headers */, + 951547F3133CD9DA008D792F /* matrix4.h in Headers */, + 951547F4133CD9DA008D792F /* plane3d.h in Headers */, + 951547F5133CD9DA008D792F /* position2d.h in Headers */, + 951547F6133CD9DA008D792F /* quaternion.h in Headers */, + 951547F7133CD9DA008D792F /* rect.h in Headers */, + 951547F8133CD9DA008D792F /* S3DVertex.h in Headers */, + 951547F9133CD9DA008D792F /* SAnimatedMesh.h in Headers */, + 951547FA133CD9DA008D792F /* SceneParameters.h in Headers */, + 951547FB133CD9DA008D792F /* SColor.h in Headers */, + 951547FC133CD9DA008D792F /* SExposedVideoData.h in Headers */, + 951547FD133CD9DA008D792F /* SIrrCreationParameters.h in Headers */, + 951547FE133CD9DA008D792F /* SKeyMap.h in Headers */, + 951547FF133CD9DA008D792F /* SLight.h in Headers */, + 95154800133CD9DA008D792F /* SMaterial.h in Headers */, + 95154801133CD9DA008D792F /* SMaterialLayer.h in Headers */, + 95154802133CD9DA008D792F /* SMesh.h in Headers */, + 95154803133CD9DA008D792F /* SMeshBuffer.h in Headers */, + 95154804133CD9DA008D792F /* SMeshBufferLightMap.h in Headers */, + 95154805133CD9DA008D792F /* SMeshBufferTangents.h in Headers */, + 95154806133CD9DA008D792F /* SParticle.h in Headers */, + 95154807133CD9DA008D792F /* SSharedMeshBuffer.h in Headers */, + 95154808133CD9DA008D792F /* SSkinMeshBuffer.h in Headers */, + 95154809133CD9DA008D792F /* SViewFrustum.h in Headers */, + 9515480A133CD9DA008D792F /* triangle3d.h in Headers */, + 9515480B133CD9DA008D792F /* vector2d.h in Headers */, + 9515480C133CD9DA008D792F /* vector3d.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07A0554694100DB518D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 5DD4804F0C7D91DF00728AA9 /* CDepthBuffer.h in Headers */, + 5DD480530C7D936700728AA9 /* IBurningShader.h in Headers */, + 5DD480550C7D93AB00728AA9 /* IDepthBuffer.h in Headers */, + 5DD4805B0C7D945800728AA9 /* CAnimatedMeshMD3.h in Headers */, + 5DD4805D0C7D945800728AA9 /* CDefaultGUIElementFactory.h in Headers */, + 5DD480650C7D947B00728AA9 /* CGUIColorSelectDialog.h in Headers */, + 5DD480670C7D947B00728AA9 /* CGUISpinBox.h in Headers */, + 5DD480690C7D947B00728AA9 /* CGUISpriteBank.h in Headers */, + 5DD480720C7D94AC00728AA9 /* CQuake3ShaderSceneNode.h in Headers */, + 5DD480770C7D94AC00728AA9 /* glxext.h in Headers */, + 5DD480C70C7DA66800728AA9 /* COpenGLExtensionHandler.h in Headers */, + 5DD480C80C7DA66800728AA9 /* CMD3MeshFileLoader.h in Headers */, + 5DD480C90C7DA66800728AA9 /* CIrrDeviceSDL.h in Headers */, + 096840480D0F1A2300333EFD /* CB3DMeshFileLoader.h in Headers */, + 0968404A0D0F1A2300333EFD /* CBoneSceneNode.h in Headers */, + 0968404C0D0F1A2300333EFD /* CBSPMeshFileLoader.h in Headers */, + 0968404F0D0F1A2300333EFD /* CColladaMeshWriter.h in Headers */, + 096840510D0F1A2300333EFD /* CImageLoaderPPM.h in Headers */, + 096840550D0F1A2300333EFD /* CIrrMeshFileLoader.h in Headers */, + 096840570D0F1A2300333EFD /* CIrrMeshWriter.h in Headers */, + 096840590D0F1A2300333EFD /* CMD2MeshFileLoader.h in Headers */, + 0968405B0D0F1A2300333EFD /* CMS3DMeshFileLoader.h in Headers */, + 0968405D0D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.h in Headers */, + 0968405F0D0F1A2300333EFD /* CParticleAttractionAffector.h in Headers */, + 096840610D0F1A2300333EFD /* CParticleCylinderEmitter.h in Headers */, + 096840630D0F1A2300333EFD /* CParticleMeshEmitter.h in Headers */, + 096840650D0F1A2300333EFD /* CParticleRingEmitter.h in Headers */, + 096840670D0F1A2300333EFD /* CParticleRotationAffector.h in Headers */, + 096840690D0F1A2300333EFD /* CParticleSphereEmitter.h in Headers */, + 0968406B0D0F1A2300333EFD /* CSkinnedMesh.h in Headers */, + 0968406D0D0F1A2300333EFD /* CSTLMeshFileLoader.h in Headers */, + 0968406F0D0F1A2300333EFD /* CSTLMeshWriter.h in Headers */, + 0910B9E00D1F5D4100D46B04 /* CGUITable.h in Headers */, + 0910B9E20D1F5D4100D46B04 /* CImageLoaderWAL.h in Headers */, + 0910BA240D1F64B300D46B04 /* CMeshBuffer.h in Headers */, + 0910BA250D1F64B300D46B04 /* coreutil.h in Headers */, + 0910BA260D1F64B300D46B04 /* ECullingTypes.h in Headers */, + 0910BA270D1F64B300D46B04 /* EDebugSceneTypes.h in Headers */, + 0910BA280D1F64B300D46B04 /* EDriverFeatures.h in Headers */, + 0910BA290D1F64B300D46B04 /* EGUIAlignment.h in Headers */, + 0910BA2A0D1F64B300D46B04 /* EHardwareBufferFlags.h in Headers */, + 0910BA2B0D1F64B300D46B04 /* EMaterialFlags.h in Headers */, + 0910BA2C0D1F64B300D46B04 /* EMaterialTypes.h in Headers */, + 0910BA2D0D1F64B300D46B04 /* EMeshWriterEnums.h in Headers */, + 0910BA2E0D1F64B300D46B04 /* EMessageBoxFlags.h in Headers */, + 0910BA2F0D1F64B300D46B04 /* ETerrainElements.h in Headers */, + 0910BA300D1F64B300D46B04 /* IAnimatedMeshMD3.h in Headers */, + 0910BA310D1F64B300D46B04 /* IBoneSceneNode.h in Headers */, + 0910BA320D1F64B300D46B04 /* IGUIColorSelectDialog.h in Headers */, + 0910BA330D1F64B300D46B04 /* IGUIElementFactory.h in Headers */, + 0910BA340D1F64B300D46B04 /* IGUIFontBitmap.h in Headers */, + 0910BA350D1F64B300D46B04 /* IGUISpinBox.h in Headers */, + 0910BA360D1F64B300D46B04 /* IGUISpriteBank.h in Headers */, + 0910BA370D1F64B300D46B04 /* IGUITable.h in Headers */, + 0910BA380D1F64B300D46B04 /* IMeshWriter.h in Headers */, + 0910BA390D1F64B300D46B04 /* IParticleAnimatedMeshSceneNodeEmitter.h in Headers */, + 0910BA3A0D1F64B300D46B04 /* IParticleAttractionAffector.h in Headers */, + 0910BA3B0D1F64B300D46B04 /* IParticleBoxEmitter.h in Headers */, + 0910BA3C0D1F64B300D46B04 /* IParticleCylinderEmitter.h in Headers */, + 0910BA3D0D1F64B300D46B04 /* IParticleFadeOutAffector.h in Headers */, + 0910BA3E0D1F64B300D46B04 /* IParticleGravityAffector.h in Headers */, + 0910BA3F0D1F64B300D46B04 /* IParticleMeshEmitter.h in Headers */, + 0910BA400D1F64B300D46B04 /* IParticleRingEmitter.h in Headers */, + 0910BA410D1F64B300D46B04 /* IParticleRotationAffector.h in Headers */, + 0910BA420D1F64B300D46B04 /* IParticleSphereEmitter.h in Headers */, + 0910BA430D1F64B300D46B04 /* IQ3Shader.h in Headers */, + 0910BA440D1F64B300D46B04 /* IReferenceCounted.h in Headers */, + 0910BA450D1F64B300D46B04 /* irrMap.h in Headers */, + 0910BA460D1F64B300D46B04 /* ISkinnedMesh.h in Headers */, + 0910BA470D1F64B300D46B04 /* SMaterialLayer.h in Headers */, + 0910BA480D1F64B300D46B04 /* SSharedMeshBuffer.h in Headers */, + 0910BA490D1F64B300D46B04 /* SSkinMeshBuffer.h in Headers */, + 0910BA4A0D1F64B300D46B04 /* SViewFrustum.h in Headers */, + 090FBC830D31085E0076D847 /* CVolumeLightSceneNode.h in Headers */, + 09C638730D4F1A69000B6A18 /* CLWOMeshFileLoader.h in Headers */, + 093973C10E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.h in Headers */, + 093973C30E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.h in Headers */, + 096F8E3E0EA2EFBA00907EC5 /* COBJMeshWriter.h in Headers */, + 096CC0E10ECE65B500C81DC7 /* CParticleScaleAffector.h in Headers */, + 3484C4E10F48D1B000C81F60 /* CGUIImageList.h in Headers */, + 3484C4EE0F48D3A100C81F60 /* CGUITreeView.h in Headers */, + 3484C4FD0F48D4CB00C81F60 /* CMemoryFile.h in Headers */, + 34EC243C0F59272E0037BC3A /* CIrrDeviceConsole.h in Headers */, + 34EF91D20F65FCA6000B5651 /* CImageLoaderRGB.h in Headers */, + 34EF91D70F65FCF6000B5651 /* CPLYMeshFileLoader.h in Headers */, + 34EF91DC0F65FD14000B5651 /* CPLYMeshWriter.h in Headers */, + 3430E4D61022C391006271FD /* CTarReader.h in Headers */, + 344FD4A71039E98C0045FD3F /* CMountPointReader.h in Headers */, + 0E2E3C4A1103B224002DE8D7 /* Octree.h in Headers */, + 0E2E3C4E1103B247002DE8D7 /* COctreeSceneNode.h in Headers */, + 0E2E3C521103B261002DE8D7 /* COctreeTriangleSelector.h in Headers */, + 0E2E3C561103B27D002DE8D7 /* CNPKReader.h in Headers */, + 0E2E3C5C1103B2AE002DE8D7 /* CIrrDeviceFB.h in Headers */, + 0E2E3C5E1103B2AE002DE8D7 /* CIrrDeviceWinCE.h in Headers */, + 95E5857812FCE2CB004946C6 /* CAnimatedMeshHalfLife.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 09022C520EA0E97F00CD54EE /* GUIEditor */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09022C5F0EA0E97F00CD54EE /* Build configuration list for PBXNativeTarget "GUIEditor" */; + buildPhases = ( + 09022C550EA0E97F00CD54EE /* Resources */, + 09022C580EA0E97F00CD54EE /* Sources */, + 09022C5A0EA0E97F00CD54EE /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 09022C530EA0E97F00CD54EE /* PBXTargetDependency */, + ); + name = GUIEditor; + productName = DemoApp; + productReference = 09022C620EA0E97F00CD54EE /* GUIEditor_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 0946CCA30EC99BBE00D945A5 /* 19.MouseAndJoystick */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0946CCB10EC99BBE00D945A5 /* Build configuration list for PBXNativeTarget "19.MouseAndJoystick" */; + buildPhases = ( + 0946CCA60EC99BBE00D945A5 /* Resources */, + 0946CCA90EC99BBE00D945A5 /* Sources */, + 0946CCAB0EC99BBE00D945A5 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 0946CCA40EC99BBE00D945A5 /* PBXTargetDependency */, + ); + name = 19.MouseAndJoystick; + productName = DemoApp; + productReference = 0946CCB40EC99BBE00D945A5 /* MouseAndJoystick_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 09F648F40D2CDED9001E0599 /* 01.HelloWorld */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09F649000D2CDED9001E0599 /* Build configuration list for PBXNativeTarget "01.HelloWorld" */; + buildPhases = ( + 09F648F70D2CDED9001E0599 /* Resources */, + 09F648FA0D2CDED9001E0599 /* Sources */, + 09F648FC0D2CDED9001E0599 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 09F648F50D2CDED9001E0599 /* PBXTargetDependency */, + ); + name = 01.HelloWorld; + productName = DemoApp; + productReference = 09F649030D2CDED9001E0599 /* HelloWorld_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 09F6492F0D2CE03E001E0599 /* 15.LoadIrrFile */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09F6493B0D2CE03E001E0599 /* Build configuration list for PBXNativeTarget "15.LoadIrrFile" */; + buildPhases = ( + 09F649320D2CE03E001E0599 /* Resources */, + 09F649350D2CE03E001E0599 /* Sources */, + 09F649370D2CE03E001E0599 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 09F649300D2CE03E001E0599 /* PBXTargetDependency */, + ); + name = 15.LoadIrrFile; + productName = DemoApp; + productReference = 09F6493E0D2CE03E001E0599 /* LoadIrrFile_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 09F649560D2CE206001E0599 /* 16.Quake3Shader */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09F649620D2CE206001E0599 /* Build configuration list for PBXNativeTarget "16.Quake3Shader" */; + buildPhases = ( + 09F649590D2CE206001E0599 /* Resources */, + 09F6495C0D2CE206001E0599 /* Sources */, + 09F6495E0D2CE206001E0599 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 09F649570D2CE206001E0599 /* PBXTargetDependency */, + ); + name = 16.Quake3Shader; + productName = DemoApp; + productReference = 09F649650D2CE206001E0599 /* Quake3Shader_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 0E2E3CEB1103E294002DE8D7 /* 18.SplitScreen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0E2E3CF91103E294002DE8D7 /* Build configuration list for PBXNativeTarget "18.SplitScreen" */; + buildPhases = ( + 0E2E3CEE1103E294002DE8D7 /* Resources */, + 0E2E3CF11103E294002DE8D7 /* Sources */, + 0E2E3CF31103E294002DE8D7 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 0E2E3CEC1103E294002DE8D7 /* PBXTargetDependency */, + ); + name = 18.SplitScreen; + productName = DemoApp; + productReference = 0E2E3CFC1103E294002DE8D7 /* SplitScreen_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 0E2E3D2C1103E3F4002DE8D7 /* 20.ManagedLights */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0E2E3D391103E3F4002DE8D7 /* Build configuration list for PBXNativeTarget "20.ManagedLights" */; + buildPhases = ( + 0E2E3D2F1103E3F4002DE8D7 /* Resources */, + 0E2E3D321103E3F4002DE8D7 /* Sources */, + 0E2E3D331103E3F4002DE8D7 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 0E2E3D2D1103E3F4002DE8D7 /* PBXTargetDependency */, + ); + name = 20.ManagedLights; + productName = DemoApp; + productReference = 0E2E3D3C1103E3F4002DE8D7 /* ManagedLights_dbg.app */; + productType = "com.apple.product-type.application"; + }; + 959726FC12C18FFB00BF73D3 /* IrrFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9597270112C18FFD00BF73D3 /* Build configuration list for PBXNativeTarget "IrrFramework" */; + buildPhases = ( + 959726F812C18FFB00BF73D3 /* Headers */, + 959726F912C18FFB00BF73D3 /* Resources */, + 959726FA12C18FFB00BF73D3 /* Sources */, + 959726FB12C18FFB00BF73D3 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = IrrFramework; + productName = IrrFramework; + productReference = 959726FD12C18FFC00BF73D3 /* IrrFramework.framework */; + productType = "com.apple.product-type.framework"; + }; + B81CFDFE097FD9F50057C06F /* 06.2DGraphics */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFE0C097FD9F50057C06F /* Build configuration list for PBXNativeTarget "06.2DGraphics" */; + buildPhases = ( + B81CFE01097FD9F50057C06F /* Resources */, + B81CFE03097FD9F50057C06F /* Sources */, + B81CFE08097FD9F50057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFDFF097FD9F50057C06F /* PBXTargetDependency */, + ); + name = 06.2DGraphics; + productName = DemoApp; + productReference = 4CA25BAC0A485D9800B4E469 /* 2DGraphics_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFE82097FDDE20057C06F /* 07.Collision */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFE8D097FDDE20057C06F /* Build configuration list for PBXNativeTarget "07.Collision" */; + buildPhases = ( + B81CFE85097FDDE20057C06F /* Resources */, + B81CFE87097FDDE20057C06F /* Sources */, + B81CFE89097FDDE20057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFE83097FDDE20057C06F /* PBXTargetDependency */, + ); + name = 07.Collision; + productName = DemoApp; + productReference = 4CA25BAE0A485D9800B4E469 /* Collision_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFEA4097FDE900057C06F /* 11.PerPixelLightning */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFEAF097FDE900057C06F /* Build configuration list for PBXNativeTarget "11.PerPixelLightning" */; + buildPhases = ( + B81CFEA7097FDE900057C06F /* Resources */, + B81CFEA9097FDE900057C06F /* Sources */, + B81CFEAB097FDE900057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFEA5097FDE900057C06F /* PBXTargetDependency */, + ); + name = 11.PerPixelLightning; + productName = DemoApp; + productReference = 4CA25BA00A485D9800B4E469 /* PerPixelLighting_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFEC2097FDF020057C06F /* 12.TerrainRendering */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFECD097FDF020057C06F /* Build configuration list for PBXNativeTarget "12.TerrainRendering" */; + buildPhases = ( + B81CFEC5097FDF020057C06F /* Resources */, + B81CFEC7097FDF020057C06F /* Sources */, + B81CFEC9097FDF020057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFEC3097FDF020057C06F /* PBXTargetDependency */, + ); + name = 12.TerrainRendering; + productName = DemoApp; + productReference = 4CA25BAA0A485D9800B4E469 /* TerrainRendering_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFEE8097FE05F0057C06F /* 08.SpecialFx */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFEF3097FE05F0057C06F /* Build configuration list for PBXNativeTarget "08.SpecialFx" */; + buildPhases = ( + B81CFEEB097FE05F0057C06F /* Resources */, + B81CFEED097FE05F0057C06F /* Sources */, + B81CFEEF097FE05F0057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFEE9097FE05F0057C06F /* PBXTargetDependency */, + ); + name = 08.SpecialFx; + productName = DemoApp; + productReference = 4CA25BA80A485D9800B4E469 /* SpecialFx_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFF07097FE13E0057C06F /* 05.UserInterface */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFF12097FE13E0057C06F /* Build configuration list for PBXNativeTarget "05.UserInterface" */; + buildPhases = ( + B81CFF0A097FE13E0057C06F /* Resources */, + B81CFF0C097FE13E0057C06F /* Sources */, + B81CFF0E097FE13E0057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFF08097FE13E0057C06F /* PBXTargetDependency */, + ); + name = 05.UserInterface; + productName = DemoApp; + productReference = 4CA25B9E0A485D9800B4E469 /* UserInterface_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFF1E097FE1E00057C06F /* 03.CustomSceneNode */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFF29097FE1E00057C06F /* Build configuration list for PBXNativeTarget "03.CustomSceneNode" */; + buildPhases = ( + B81CFF21097FE1E00057C06F /* Resources */, + B81CFF23097FE1E00057C06F /* Sources */, + B81CFF25097FE1E00057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFF1F097FE1E00057C06F /* PBXTargetDependency */, + ); + name = 03.CustomSceneNode; + productName = DemoApp; + productReference = 4CA25B980A485D9800B4E469 /* CustomSceneNode_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFF33097FE25F0057C06F /* 02.Quake3Map */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFF3E097FE25F0057C06F /* Build configuration list for PBXNativeTarget "02.Quake3Map" */; + buildPhases = ( + B81CFF36097FE25F0057C06F /* Resources */, + B81CFF38097FE25F0057C06F /* Sources */, + B81CFF3A097FE25F0057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFF34097FE25F0057C06F /* PBXTargetDependency */, + ); + name = 02.Quake3Map; + productName = DemoApp; + productReference = 4C53E2520A4850550014E966 /* Quake3Map_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFF4A097FE3050057C06F /* 10.Shaders */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFF55097FE3050057C06F /* Build configuration list for PBXNativeTarget "10.Shaders" */; + buildPhases = ( + B81CFF4D097FE3050057C06F /* Resources */, + B81CFF4F097FE3050057C06F /* Sources */, + B81CFF51097FE3050057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFF4B097FE3050057C06F /* PBXTargetDependency */, + ); + name = 10.Shaders; + productName = DemoApp; + productReference = 4CA25BA60A485D9800B4E469 /* Shaders_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFF78097FE3DC0057C06F /* 04.Movement */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFF83097FE3DC0057C06F /* Build configuration list for PBXNativeTarget "04.Movement" */; + buildPhases = ( + B81CFF7B097FE3DC0057C06F /* Resources */, + B81CFF7D097FE3DC0057C06F /* Sources */, + B81CFF7F097FE3DC0057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFF79097FE3DC0057C06F /* PBXTargetDependency */, + ); + name = 04.Movement; + productName = DemoApp; + productReference = 4CA25BA40A485D9800B4E469 /* Movement_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFF91097FE45E0057C06F /* 09.MeshViewer */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFF9C097FE45E0057C06F /* Build configuration list for PBXNativeTarget "09.MeshViewer" */; + buildPhases = ( + B81CFF94097FE45E0057C06F /* Resources */, + B81CFF96097FE45E0057C06F /* Sources */, + B81CFF98097FE45E0057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFF92097FE45E0057C06F /* PBXTargetDependency */, + ); + name = 09.MeshViewer; + productName = DemoApp; + productReference = 4CA25B9A0A485D9800B4E469 /* MeshViewer_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B81CFFAF097FE5F80057C06F /* 13.RenderToTexture */ = { + isa = PBXNativeTarget; + buildConfigurationList = B81CFFBA097FE5F80057C06F /* Build configuration list for PBXNativeTarget "13.RenderToTexture" */; + buildPhases = ( + B81CFFB2097FE5F80057C06F /* Resources */, + B81CFFB4097FE5F80057C06F /* Sources */, + B81CFFB6097FE5F80057C06F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B81CFFB0097FE5F80057C06F /* PBXTargetDependency */, + ); + name = 13.RenderToTexture; + productName = DemoApp; + productReference = 4CA25B9C0A485D9800B4E469 /* RenderToTexture_dbg.app */; + productType = "com.apple.product-type.application"; + }; + B8DEF35C0950229200FDEA7E /* Demo */ = { + isa = PBXNativeTarget; + buildConfigurationList = B8DEF3600950229300FDEA7E /* Build configuration list for PBXNativeTarget "Demo" */; + buildPhases = ( + B8DEF3590950229200FDEA7E /* Resources */, + B8DEF35A0950229200FDEA7E /* Sources */, + B8DEF35B0950229200FDEA7E /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B8DEF375095024F600FDEA7E /* PBXTargetDependency */, + ); + name = Demo; + productName = DemoApp; + productReference = 4CA25BA20A485D9800B4E469 /* Demo_dbg.app */; + productType = "com.apple.product-type.application"; + }; + D2AAC07D0554694100DB518D /* libIrrlicht.a */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "libIrrlicht.a" */; + buildPhases = ( + D2AAC07A0554694100DB518D /* Headers */, + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = libIrrlicht.a; + productName = MacOSX; + productReference = 4C53E24D0A4850120014E966 /* libIrrlicht.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "MacOSX" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* MacOSX */; + productRefGroup = 0867D691FE84028FC02AAC07 /* MacOSX */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* libIrrlicht.a */, + 09F648F40D2CDED9001E0599 /* 01.HelloWorld */, + B81CFF33097FE25F0057C06F /* 02.Quake3Map */, + B81CFF1E097FE1E00057C06F /* 03.CustomSceneNode */, + B81CFF78097FE3DC0057C06F /* 04.Movement */, + B81CFF07097FE13E0057C06F /* 05.UserInterface */, + B81CFDFE097FD9F50057C06F /* 06.2DGraphics */, + B81CFE82097FDDE20057C06F /* 07.Collision */, + B81CFEE8097FE05F0057C06F /* 08.SpecialFx */, + B81CFF91097FE45E0057C06F /* 09.MeshViewer */, + B81CFF4A097FE3050057C06F /* 10.Shaders */, + B81CFEA4097FDE900057C06F /* 11.PerPixelLightning */, + B81CFEC2097FDF020057C06F /* 12.TerrainRendering */, + B81CFFAF097FE5F80057C06F /* 13.RenderToTexture */, + 09F6492F0D2CE03E001E0599 /* 15.LoadIrrFile */, + 09F649560D2CE206001E0599 /* 16.Quake3Shader */, + 0E2E3CEB1103E294002DE8D7 /* 18.SplitScreen */, + 0946CCA30EC99BBE00D945A5 /* 19.MouseAndJoystick */, + 0E2E3D2C1103E3F4002DE8D7 /* 20.ManagedLights */, + B8DEF35C0950229200FDEA7E /* Demo */, + 09022C520EA0E97F00CD54EE /* GUIEditor */, + B81CFFC6097FE9980057C06F /* All */, + 959726FC12C18FFB00BF73D3 /* IrrFramework */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 09022C550EA0E97F00CD54EE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09022C560EA0E97F00CD54EE /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0946CCA60EC99BBE00D945A5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0946CCA70EC99BBE00D945A5 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F648F70D2CDED9001E0599 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F648F80D2CDED9001E0599 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F649320D2CE03E001E0599 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F649330D2CE03E001E0599 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F649590D2CE206001E0599 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F6495A0D2CE206001E0599 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E2E3CEE1103E294002DE8D7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E2E3CEF1103E294002DE8D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E2E3D2F1103E3F4002DE8D7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E2E3D301103E3F4002DE8D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 959726F912C18FFB00BF73D3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFE01097FD9F50057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF146F60A486651006EBA03 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFE85097FDDE20057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF1470B0A486704006EBA03 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEA7097FDE900057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB30A486A1300ADB3D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEC5097FDF020057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB60A486A2200ADB3D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEEB097FE05F0057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF147180A48676A006EBA03 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF0A097FE13E0057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C8B0A48626600B4E469 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF21097FE1E00057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C360A48610400B4E469 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF36097FE25F0057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4C53E3890A48559C0014E966 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF4D097FE3050057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBA70A4869C600ADB3D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF7B097FE3DC0057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C6A0A4861D800B4E469 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF94097FE45E0057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBA90A4869DD00ADB3D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFFB2097FE5F80057C06F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB90A486A3100ADB3D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B8DEF3590950229200FDEA7E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBBE0A486A4F00ADB3D7 /* MainMenu.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 09022C580EA0E97F00CD54EE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09022C7E0EA0EA9D00CD54EE /* CGUIAttributeEditor.cpp in Sources */, + 09022C7F0EA0EA9D00CD54EE /* CGUIEditFactory.cpp in Sources */, + 09022C800EA0EA9D00CD54EE /* CGUIEditWindow.cpp in Sources */, + 09022C810EA0EA9D00CD54EE /* CGUIEditWorkspace.cpp in Sources */, + 09022C820EA0EA9D00CD54EE /* CGUIPanel.cpp in Sources */, + 09022C830EA0EA9D00CD54EE /* CGUITextureCacheBrowser.cpp in Sources */, + 09022C840EA0EA9D00CD54EE /* CMemoryReadWriteFile.cpp in Sources */, + 09022C850EA0EA9D00CD54EE /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0946CCA90EC99BBE00D945A5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0946CCCB0EC99C6E00D945A5 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F648FA0D2CDED9001E0599 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F6491A0D2CDF9A001E0599 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F649350D2CE03E001E0599 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F460EB0D3223ED00D0A9B0 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F6495C0D2CE206001E0599 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F649740D2CE2D0001E0599 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E2E3CF11103E294002DE8D7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E2E3D701103E6C6002DE8D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E2E3D321103E3F4002DE8D7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E2E3D811103E6E4002DE8D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 959726FA12C18FFB00BF73D3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 959729E912C192DA00BF73D3 /* jcapimin.c in Sources */, + 959729EA12C192DA00BF73D3 /* jcapistd.c in Sources */, + 959729EB12C192DA00BF73D3 /* jccoefct.c in Sources */, + 959729EC12C192DA00BF73D3 /* jccolor.c in Sources */, + 959729ED12C192DA00BF73D3 /* jcdctmgr.c in Sources */, + 959729EE12C192DA00BF73D3 /* jchuff.c in Sources */, + 959729EF12C192DA00BF73D3 /* jcinit.c in Sources */, + 959729F012C192DA00BF73D3 /* jcmainct.c in Sources */, + 959729F112C192DA00BF73D3 /* jcmarker.c in Sources */, + 959729F212C192DA00BF73D3 /* jcmaster.c in Sources */, + 959729F312C192DA00BF73D3 /* jcomapi.c in Sources */, + 959729F412C192DA00BF73D3 /* jcparam.c in Sources */, + 959729F512C192DA00BF73D3 /* jcprepct.c in Sources */, + 959729F612C192DA00BF73D3 /* jcsample.c in Sources */, + 959729F712C192DA00BF73D3 /* jctrans.c in Sources */, + 959729F812C192DA00BF73D3 /* jdapimin.c in Sources */, + 959729F912C192DA00BF73D3 /* jdapistd.c in Sources */, + 959729FA12C192DA00BF73D3 /* jdatadst.c in Sources */, + 959729FB12C192DA00BF73D3 /* jdatasrc.c in Sources */, + 959729FC12C192DA00BF73D3 /* jdcoefct.c in Sources */, + 959729FD12C192DA00BF73D3 /* jdcolor.c in Sources */, + 959729FE12C192DA00BF73D3 /* jddctmgr.c in Sources */, + 959729FF12C192DA00BF73D3 /* jdhuff.c in Sources */, + 95972A0012C192DA00BF73D3 /* jdinput.c in Sources */, + 95972A0112C192DA00BF73D3 /* jdmainct.c in Sources */, + 95972A0212C192DA00BF73D3 /* jdmarker.c in Sources */, + 95972A0312C192DA00BF73D3 /* jdmaster.c in Sources */, + 95972A0412C192DA00BF73D3 /* jdmerge.c in Sources */, + 95972A0512C192DA00BF73D3 /* jdpostct.c in Sources */, + 95972A0612C192DA00BF73D3 /* jdsample.c in Sources */, + 95972A0712C192DA00BF73D3 /* jdtrans.c in Sources */, + 95972A0812C192DA00BF73D3 /* jerror.c in Sources */, + 95972A0912C192DA00BF73D3 /* jfdctflt.c in Sources */, + 95972A0A12C192DA00BF73D3 /* jfdctfst.c in Sources */, + 95972A0B12C192DA00BF73D3 /* jfdctint.c in Sources */, + 95972A0C12C192DA00BF73D3 /* jidctflt.c in Sources */, + 95972A0D12C192DA00BF73D3 /* jidctfst.c in Sources */, + 95972A0E12C192DA00BF73D3 /* jidctint.c in Sources */, + 95972A0F12C192DA00BF73D3 /* jmemmgr.c in Sources */, + 95972A1012C192DA00BF73D3 /* jmemnobs.c in Sources */, + 95972A1112C192DA00BF73D3 /* jquant1.c in Sources */, + 95972A1212C192DA00BF73D3 /* jquant2.c in Sources */, + 95972A1312C192DA00BF73D3 /* jutils.c in Sources */, + 95972A2212C192DA00BF73D3 /* inffast.c in Sources */, + 95972A2312C192DA00BF73D3 /* inftrees.c in Sources */, + 95972A2412C192DA00BF73D3 /* uncompr.c in Sources */, + 95972A2512C192DA00BF73D3 /* compress.c in Sources */, + 95972A2612C192DA00BF73D3 /* crc32.c in Sources */, + 95972A2712C192DA00BF73D3 /* zutil.c in Sources */, + 95972A2812C192DA00BF73D3 /* trees.c in Sources */, + 95972A2912C192DA00BF73D3 /* deflate.c in Sources */, + 95972A2A12C192DA00BF73D3 /* adler32.c in Sources */, + 95972A2B12C192DA00BF73D3 /* CImageLoaderPNG.cpp in Sources */, + 95972A2C12C192DA00BF73D3 /* CColorConverter.cpp in Sources */, + 95972A2D12C192DA00BF73D3 /* CSceneManager.cpp in Sources */, + 95972A2E12C192DA00BF73D3 /* CTRTextureGouraudAdd2.cpp in Sources */, + 95972A2F12C192DA00BF73D3 /* CNullDriver.cpp in Sources */, + 95972A3012C192DA00BF73D3 /* CCSMLoader.cpp in Sources */, + 95972A3112C192DA00BF73D3 /* irrXML.cpp in Sources */, + 95972A3212C192DA00BF73D3 /* CGUIListBox.cpp in Sources */, + 95972A3312C192DA00BF73D3 /* CTRGouraudWire.cpp in Sources */, + 95972A3412C192DA00BF73D3 /* CIrrDeviceStub.cpp in Sources */, + 95972A3512C192DA00BF73D3 /* CGUIMessageBox.cpp in Sources */, + 95972A3612C192DA00BF73D3 /* CMeshSceneNode.cpp in Sources */, + 95972A3712C192DA00BF73D3 /* CGUIStaticText.cpp in Sources */, + 95972A3812C192DA00BF73D3 /* os.cpp in Sources */, + 95972A3912C192DA00BF73D3 /* COCTLoader.cpp in Sources */, + 95972A3A12C192DA00BF73D3 /* CGUIContextMenu.cpp in Sources */, + 95972A3B12C192DA00BF73D3 /* CSceneNodeAnimatorFlyCircle.cpp in Sources */, + 95972A3C12C192DA00BF73D3 /* CDefaultSceneNodeFactory.cpp in Sources */, + 95972A3D12C192DA00BF73D3 /* CD3D9Driver.cpp in Sources */, + 95972A3E12C192DA00BF73D3 /* CTRGouraud.cpp in Sources */, + 95972A3F12C192DA00BF73D3 /* C3DSMeshFileLoader.cpp in Sources */, + 95972A4012C192DA00BF73D3 /* COgreMeshFileLoader.cpp in Sources */, + 95972A4112C192DA00BF73D3 /* CMY3DMeshFileLoader.cpp in Sources */, + 95972A4212C192DA00BF73D3 /* CLMTSMeshFileLoader.cpp in Sources */, + 95972A4312C192DA00BF73D3 /* CGUIFileOpenDialog.cpp in Sources */, + 95972A4412C192DA00BF73D3 /* CSceneNodeAnimatorDelete.cpp in Sources */, + 95972A4512C192DA00BF73D3 /* CTRGouraudAlphaNoZ2.cpp in Sources */, + 95972A4612C192DA00BF73D3 /* CGeometryCreator.cpp in Sources */, + 95972A4712C192DA00BF73D3 /* CD3D8Texture.cpp in Sources */, + 95972A4812C192DA00BF73D3 /* CSkyBoxSceneNode.cpp in Sources */, + 95972A4912C192DA00BF73D3 /* CMeshManipulator.cpp in Sources */, + 95972A4A12C192DA00BF73D3 /* CTextSceneNode.cpp in Sources */, + 95972A4B12C192DA00BF73D3 /* CTRTextureDetailMap2.cpp in Sources */, + 95972A4C12C192DA00BF73D3 /* CTRTextureGouraudAddNoZ2.cpp in Sources */, + 95972A4D12C192DA00BF73D3 /* CTRTextureGouraudNoZ.cpp in Sources */, + 95972A4E12C192DA00BF73D3 /* CGUIScrollBar.cpp in Sources */, + 95972A4F12C192DA00BF73D3 /* CSceneCollisionManager.cpp in Sources */, + 95972A5012C192DA00BF73D3 /* CGUICheckBox.cpp in Sources */, + 95972A5112C192DA00BF73D3 /* CQ3LevelMesh.cpp in Sources */, + 95972A5212C192DA00BF73D3 /* CParticleGravityAffector.cpp in Sources */, + 95972A5312C192DA00BF73D3 /* CSoftwareDriver2.cpp in Sources */, + 95972A5412C192DA00BF73D3 /* CD3D9ParallaxMapRenderer.cpp in Sources */, + 95972A5512C192DA00BF73D3 /* CD3D8ParallaxMapRenderer.cpp in Sources */, + 95972A5612C192DA00BF73D3 /* CAnimatedMeshMD2.cpp in Sources */, + 95972A5712C192DA00BF73D3 /* CSceneNodeAnimatorFlyStraight.cpp in Sources */, + 95972A5812C192DA00BF73D3 /* CImageLoaderPCX.cpp in Sources */, + 95972A5912C192DA00BF73D3 /* CAnimatedMeshSceneNode.cpp in Sources */, + 95972A5A12C192DA00BF73D3 /* CTriangleSelector.cpp in Sources */, + 95972A5B12C192DA00BF73D3 /* CTRTextureGouraudVertexAlpha2.cpp in Sources */, + 95972A5C12C192DA00BF73D3 /* CTRTextureWire2.cpp in Sources */, + 95972A5D12C192DA00BF73D3 /* CTRTextureFlatWire.cpp in Sources */, + 95972A5E12C192DA00BF73D3 /* CTRGouraud2.cpp in Sources */, + 95972A5F12C192DA00BF73D3 /* CEmptySceneNode.cpp in Sources */, + 95972A6012C192DA00BF73D3 /* CTRTextureLightMap2_Add.cpp in Sources */, + 95972A6112C192DA00BF73D3 /* CReadFile.cpp in Sources */, + 95972A6212C192DA00BF73D3 /* COpenGLTexture.cpp in Sources */, + 95972A6312C192DA00BF73D3 /* COSOperator.cpp in Sources */, + 95972A6412C192DA00BF73D3 /* CColladaFileLoader.cpp in Sources */, + 95972A6512C192DA00BF73D3 /* CCameraSceneNode.cpp in Sources */, + 95972A6612C192DA00BF73D3 /* CMetaTriangleSelector.cpp in Sources */, + 95972A6712C192DA00BF73D3 /* CTRTextureFlat.cpp in Sources */, + 95972A6812C192DA00BF73D3 /* CVideoModeList.cpp in Sources */, + 95972A6912C192DA00BF73D3 /* CXMLReader.cpp in Sources */, + 95972A6A12C192DA00BF73D3 /* COpenGLParallaxMapRenderer.cpp in Sources */, + 95972A6B12C192DA00BF73D3 /* CTRTextureGouraudNoZ2.cpp in Sources */, + 95972A6C12C192DA00BF73D3 /* CTRTextureGouraudWire.cpp in Sources */, + 95972A6D12C192DA00BF73D3 /* CParticlePointEmitter.cpp in Sources */, + 95972A6E12C192DA00BF73D3 /* CGUIWindow.cpp in Sources */, + 95972A6F12C192DA00BF73D3 /* CGUIModalScreen.cpp in Sources */, + 95972A7012C192DA00BF73D3 /* CImageLoaderPSD.cpp in Sources */, + 95972A7112C192DA00BF73D3 /* CWaterSurfaceSceneNode.cpp in Sources */, + 95972A7212C192DA00BF73D3 /* CXMeshFileLoader.cpp in Sources */, + 95972A7312C192DA00BF73D3 /* CIrrDeviceLinux.cpp in Sources */, + 95972A7412C192DA00BF73D3 /* CLightSceneNode.cpp in Sources */, + 95972A7512C192DA00BF73D3 /* CTRTextureGouraudAdd.cpp in Sources */, + 95972A7612C192DA00BF73D3 /* CTRTextureGouraud2.cpp in Sources */, + 95972A7712C192DA00BF73D3 /* CSoftwareDriver.cpp in Sources */, + 95972A7812C192DA00BF73D3 /* CTRFlatWire.cpp in Sources */, + 95972A7912C192DA00BF73D3 /* CTRGouraudAlpha2.cpp in Sources */, + 95972A7A12C192DA00BF73D3 /* CSoftwareTexture2.cpp in Sources */, + 95972A7B12C192DA00BF73D3 /* CZipReader.cpp in Sources */, + 95972A7C12C192DA00BF73D3 /* COpenGLNormalMapRenderer.cpp in Sources */, + 95972A7D12C192DA00BF73D3 /* CTRTextureLightMap2_M1.cpp in Sources */, + 95972A7E12C192DA00BF73D3 /* CTRTextureLightMap2_M4.cpp in Sources */, + 95972A7F12C192DA00BF73D3 /* CGUISkin.cpp in Sources */, + 95972A8012C192DA00BF73D3 /* CD3D8Driver.cpp in Sources */, + 95972A8112C192DA00BF73D3 /* CIrrDeviceWin32.cpp in Sources */, + 95972A8212C192DA00BF73D3 /* CFileSystem.cpp in Sources */, + 95972A8312C192DA00BF73D3 /* CGUIMeshViewer.cpp in Sources */, + 95972A8412C192DA00BF73D3 /* CGUIComboBox.cpp in Sources */, + 95972A8512C192DA00BF73D3 /* CSceneNodeAnimatorRotation.cpp in Sources */, + 95972A8612C192DA00BF73D3 /* CSceneNodeAnimatorTexture.cpp in Sources */, + 95972A8712C192DA00BF73D3 /* CParticleSystemSceneNode.cpp in Sources */, + 95972A8812C192DA00BF73D3 /* CTerrainSceneNode.cpp in Sources */, + 95972A8912C192DA00BF73D3 /* CGUIFont.cpp in Sources */, + 95972A8A12C192DA00BF73D3 /* CParticleFadeOutAffector.cpp in Sources */, + 95972A8B12C192DA00BF73D3 /* CDummyTransformationSceneNode.cpp in Sources */, + 95972A8C12C192DA00BF73D3 /* CFileList.cpp in Sources */, + 95972A8D12C192DA00BF73D3 /* CImageLoaderTGA.cpp in Sources */, + 95972A8E12C192DA00BF73D3 /* CXMLWriter.cpp in Sources */, + 95972A8F12C192DA00BF73D3 /* CSceneNodeAnimatorFollowSpline.cpp in Sources */, + 95972A9012C192DA00BF73D3 /* CZBuffer.cpp in Sources */, + 95972A9112C192DA00BF73D3 /* CDMFLoader.cpp in Sources */, + 95972A9212C192DA00BF73D3 /* CD3D9Texture.cpp in Sources */, + 95972A9312C192DA00BF73D3 /* COpenGLShaderMaterialRenderer.cpp in Sources */, + 95972A9412C192DA00BF73D3 /* Irrlicht.cpp in Sources */, + 95972A9512C192DA00BF73D3 /* CGUIEditBox.cpp in Sources */, + 95972A9612C192DA00BF73D3 /* COpenGLSLMaterialRenderer.cpp in Sources */, + 95972A9712C192DA00BF73D3 /* CD3D9HLSLMaterialRenderer.cpp in Sources */, + 95972A9812C192DA00BF73D3 /* CSoftwareTexture.cpp in Sources */, + 95972A9912C192DA00BF73D3 /* CCubeSceneNode.cpp in Sources */, + 95972A9A12C192DA00BF73D3 /* CTriangleBBSelector.cpp in Sources */, + 95972A9B12C192DA00BF73D3 /* CD3D9ShaderMaterialRenderer.cpp in Sources */, + 95972A9C12C192DA00BF73D3 /* CD3D8ShaderMaterialRenderer.cpp in Sources */, + 95972A9D12C192DA00BF73D3 /* CGUIButton.cpp in Sources */, + 95972A9E12C192DA00BF73D3 /* CGUIToolBar.cpp in Sources */, + 95972A9F12C192DA00BF73D3 /* CDefaultSceneNodeAnimatorFactory.cpp in Sources */, + 95972AA012C192DA00BF73D3 /* CBillboardSceneNode.cpp in Sources */, + 95972AA112C192DA00BF73D3 /* CSceneNodeAnimatorCollisionResponse.cpp in Sources */, + 95972AA212C192DA00BF73D3 /* CLogger.cpp in Sources */, + 95972AA312C192DA00BF73D3 /* CGUIInOutFader.cpp in Sources */, + 95972AA412C192DA00BF73D3 /* CWriteFile.cpp in Sources */, + 95972AA512C192DA00BF73D3 /* CTRTextureGouraud.cpp in Sources */, + 95972AA612C192DA00BF73D3 /* CTRFlat.cpp in Sources */, + 95972AA712C192DA00BF73D3 /* CTerrainTriangleSelector.cpp in Sources */, + 95972AA812C192DA00BF73D3 /* CGUITabControl.cpp in Sources */, + 95972AA912C192DA00BF73D3 /* CParticleBoxEmitter.cpp in Sources */, + 95972AAA12C192DA00BF73D3 /* CGUIMenu.cpp in Sources */, + 95972AAB12C192DA00BF73D3 /* CImage.cpp in Sources */, + 95972AAC12C192DA00BF73D3 /* CShadowVolumeSceneNode.cpp in Sources */, + 95972AAD12C192DA00BF73D3 /* CGUIEnvironment.cpp in Sources */, + 95972AAE12C192DA00BF73D3 /* CLimitReadFile.cpp in Sources */, + 95972AAF12C192DA00BF73D3 /* CAttributes.cpp in Sources */, + 95972AB012C192DA00BF73D3 /* COpenGLDriver.cpp in Sources */, + 95972AB112C192DA00BF73D3 /* CTRTextureLightMap2_M2.cpp in Sources */, + 95972AB212C192DA00BF73D3 /* CGUIImage.cpp in Sources */, + 95972AB312C192DA00BF73D3 /* CD3D9NormalMapRenderer.cpp in Sources */, + 95972AB412C192DA00BF73D3 /* CD3D8NormalMapRenderer.cpp in Sources */, + 95972AB512C192DA00BF73D3 /* CMeshCache.cpp in Sources */, + 95972AB612C192DA00BF73D3 /* CImageLoaderJPG.cpp in Sources */, + 95972AB712C192DA00BF73D3 /* CFPSCounter.cpp in Sources */, + 95972AB812C192DA00BF73D3 /* OSXClipboard.mm in Sources */, + 95972AB912C192DA00BF73D3 /* CIrrDeviceMacOSX.mm in Sources */, + 95972ABA12C192DA00BF73D3 /* AppDelegate.mm in Sources */, + 95972ABB12C192DA00BF73D3 /* inflate.c in Sources */, + 95972ABC12C192DA00BF73D3 /* CSphereSceneNode.cpp in Sources */, + 95972ABD12C192DA00BF73D3 /* COBJMeshFileLoader.cpp in Sources */, + 95972ABE12C192DA00BF73D3 /* CPakReader.cpp in Sources */, + 95972ABF12C192DA00BF73D3 /* CImageLoaderBMP.cpp in Sources */, + 95972AC012C192DA00BF73D3 /* CImageWriterBMP.cpp in Sources */, + 95972AC112C192DA00BF73D3 /* CImageWriterJPG.cpp in Sources */, + 95972AC212C192DA00BF73D3 /* CImageWriterPCX.cpp in Sources */, + 95972AC312C192DA00BF73D3 /* CImageWriterPNG.cpp in Sources */, + 95972AC412C192DA00BF73D3 /* CImageWriterPPM.cpp in Sources */, + 95972AC512C192DA00BF73D3 /* CImageWriterPSD.cpp in Sources */, + 95972AC612C192DA00BF73D3 /* CImageWriterTGA.cpp in Sources */, + 95972AC712C192DA00BF73D3 /* CSkyDomeSceneNode.cpp in Sources */, + 95972AC812C192DA00BF73D3 /* CDepthBuffer.cpp in Sources */, + 95972AC912C192DA00BF73D3 /* IBurningShader.cpp in Sources */, + 95972ACA12C192DA00BF73D3 /* CAnimatedMeshMD3.cpp in Sources */, + 95972ACB12C192DA00BF73D3 /* CDefaultGUIElementFactory.cpp in Sources */, + 95972ACC12C192DA00BF73D3 /* CGUIColorSelectDialog.cpp in Sources */, + 95972ACD12C192DA00BF73D3 /* CGUISpinBox.cpp in Sources */, + 95972ACE12C192DA00BF73D3 /* CGUISpriteBank.cpp in Sources */, + 95972ACF12C192DA00BF73D3 /* CQuake3ShaderSceneNode.cpp in Sources */, + 95972AD012C192DA00BF73D3 /* CTRTextureBlend.cpp in Sources */, + 95972AD112C192DA00BF73D3 /* CTRTextureGouraudAlpha.cpp in Sources */, + 95972AD212C192DA00BF73D3 /* CTRTextureGouraudAlphaNoZ.cpp in Sources */, + 95972AD312C192DA00BF73D3 /* CTRTextureLightMapGouraud2_M4.cpp in Sources */, + 95972AD412C192DA00BF73D3 /* CIrrDeviceSDL.cpp in Sources */, + 95972AD512C192DA00BF73D3 /* COpenGLExtensionHandler.cpp in Sources */, + 95972AD612C192DA00BF73D3 /* CMD3MeshFileLoader.cpp in Sources */, + 95972AD712C192DA00BF73D3 /* CB3DMeshFileLoader.cpp in Sources */, + 95972AD812C192DA00BF73D3 /* CBoneSceneNode.cpp in Sources */, + 95972AD912C192DA00BF73D3 /* CBSPMeshFileLoader.cpp in Sources */, + 95972ADA12C192DA00BF73D3 /* CColladaMeshWriter.cpp in Sources */, + 95972ADB12C192DA00BF73D3 /* CImageLoaderPPM.cpp in Sources */, + 95972ADC12C192DA00BF73D3 /* CIrrMeshFileLoader.cpp in Sources */, + 95972ADD12C192DA00BF73D3 /* CIrrMeshWriter.cpp in Sources */, + 95972ADE12C192DA00BF73D3 /* CMD2MeshFileLoader.cpp in Sources */, + 95972ADF12C192DA00BF73D3 /* CMS3DMeshFileLoader.cpp in Sources */, + 95972AE012C192DA00BF73D3 /* CParticleAnimatedMeshSceneNodeEmitter.cpp in Sources */, + 95972AE112C192DA00BF73D3 /* CParticleAttractionAffector.cpp in Sources */, + 95972AE212C192DA00BF73D3 /* CParticleCylinderEmitter.cpp in Sources */, + 95972AE312C192DA00BF73D3 /* CParticleMeshEmitter.cpp in Sources */, + 95972AE412C192DA00BF73D3 /* CParticleRingEmitter.cpp in Sources */, + 95972AE512C192DA00BF73D3 /* CParticleRotationAffector.cpp in Sources */, + 95972AE612C192DA00BF73D3 /* CParticleSphereEmitter.cpp in Sources */, + 95972AE712C192DA00BF73D3 /* CSkinnedMesh.cpp in Sources */, + 95972AE812C192DA00BF73D3 /* CSTLMeshFileLoader.cpp in Sources */, + 95972AE912C192DA00BF73D3 /* CSTLMeshWriter.cpp in Sources */, + 95972AEA12C192DA00BF73D3 /* CBurningShader_Raster_Reference.cpp in Sources */, + 95972AEB12C192DA00BF73D3 /* CGUITable.cpp in Sources */, + 95972AEC12C192DA00BF73D3 /* CImageLoaderWAL.cpp in Sources */, + 95972AED12C192DA00BF73D3 /* CVolumeLightSceneNode.cpp in Sources */, + 95972AEE12C192DA00BF73D3 /* CLWOMeshFileLoader.cpp in Sources */, + 95972AEF12C192DA00BF73D3 /* CSceneNodeAnimatorCameraFPS.cpp in Sources */, + 95972AF012C192DA00BF73D3 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */, + 95972AF112C192DA00BF73D3 /* COBJMeshWriter.cpp in Sources */, + 95972AF212C192DA00BF73D3 /* CParticleScaleAffector.cpp in Sources */, + 95972AF312C192DA00BF73D3 /* png.c in Sources */, + 95972AF412C192DA00BF73D3 /* pngerror.c in Sources */, + 95972AF612C192DA00BF73D3 /* pngget.c in Sources */, + 95972AF712C192DA00BF73D3 /* pngmem.c in Sources */, + 95972AF812C192DA00BF73D3 /* pngpread.c in Sources */, + 95972AF912C192DA00BF73D3 /* pngread.c in Sources */, + 95972AFA12C192DA00BF73D3 /* pngrio.c in Sources */, + 95972AFB12C192DA00BF73D3 /* pngrtran.c in Sources */, + 95972AFC12C192DA00BF73D3 /* pngrutil.c in Sources */, + 95972AFD12C192DA00BF73D3 /* pngset.c in Sources */, + 95972AFE12C192DA00BF73D3 /* pngtrans.c in Sources */, + 95972AFF12C192DA00BF73D3 /* pngwio.c in Sources */, + 95972B0012C192DA00BF73D3 /* pngwrite.c in Sources */, + 95972B0112C192DA00BF73D3 /* pngwtran.c in Sources */, + 95972B0212C192DA00BF73D3 /* pngwutil.c in Sources */, + 95972B0312C192DA00BF73D3 /* CGUIImageList.cpp in Sources */, + 95972B0412C192DA00BF73D3 /* CGUITreeView.cpp in Sources */, + 95972B0512C192DA00BF73D3 /* CMemoryFile.cpp in Sources */, + 95972B0612C192DA00BF73D3 /* CIrrDeviceConsole.cpp in Sources */, + 95972B0712C192DA00BF73D3 /* CImageLoaderRGB.cpp in Sources */, + 95972B0812C192DA00BF73D3 /* CPLYMeshFileLoader.cpp in Sources */, + 95972B0912C192DA00BF73D3 /* CPLYMeshWriter.cpp in Sources */, + 95972B0A12C192DA00BF73D3 /* CTarReader.cpp in Sources */, + 95972B0B12C192DA00BF73D3 /* CMountPointReader.cpp in Sources */, + 95972B0C12C192DA00BF73D3 /* jaricom.c in Sources */, + 95972B0D12C192DA00BF73D3 /* jcarith.c in Sources */, + 95972B0E12C192DA00BF73D3 /* jdarith.c in Sources */, + 95972B0F12C192DA00BF73D3 /* COctreeSceneNode.cpp in Sources */, + 95972B1012C192DA00BF73D3 /* COctreeTriangleSelector.cpp in Sources */, + 95972B1112C192DA00BF73D3 /* CNPKReader.cpp in Sources */, + 95972B1212C192DA00BF73D3 /* CIrrDeviceFB.cpp in Sources */, + 95972B1312C192DA00BF73D3 /* CIrrDeviceWinCE.cpp in Sources */, + 95972B1412C192DA00BF73D3 /* LzmaDec.c in Sources */, + 95972B1512C192DA00BF73D3 /* blocksort.c in Sources */, + 95972B1612C192DA00BF73D3 /* bzcompress.c in Sources */, + 95972B1712C192DA00BF73D3 /* crctable.c in Sources */, + 95972B1812C192DA00BF73D3 /* decompress.c in Sources */, + 95972B1912C192DA00BF73D3 /* huffman.c in Sources */, + 95972B1A12C192DA00BF73D3 /* randtable.c in Sources */, + 95972B1B12C192DA00BF73D3 /* bzlib.c in Sources */, + 95972B1C12C192DA00BF73D3 /* aescrypt.cpp in Sources */, + 95972B1D12C192DA00BF73D3 /* aeskey.cpp in Sources */, + 95972B1E12C192DA00BF73D3 /* aestab.cpp in Sources */, + 95972B1F12C192DA00BF73D3 /* fileenc.cpp in Sources */, + 95972B2012C192DA00BF73D3 /* hmac.cpp in Sources */, + 95972B2112C192DA00BF73D3 /* prng.cpp in Sources */, + 95972B2212C192DA00BF73D3 /* pwd2key.cpp in Sources */, + 95972B2312C192DA00BF73D3 /* sha1.cpp in Sources */, + 95972B2412C192DA00BF73D3 /* sha2.cpp in Sources */, + 95E5857212FCE277004946C6 /* CWADReader.cpp in Sources */, + 95E5857912FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp in Sources */, + 95E5857D12FCE2DE004946C6 /* CSceneLoaderIrr.cpp in Sources */, + 95E5858E12FCE388004946C6 /* CTRNormalMap.cpp in Sources */, + 95E5859312FCE3A1004946C6 /* CTRStencilShadow.cpp in Sources */, + 95E5859612FCE3F5004946C6 /* CSMFMeshFileLoader.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFE03097FD9F50057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF146F70A486668006EBA03 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFE87097FDDE20057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF147100A486709006EBA03 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEA9097FDE900057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB20A486A0D00ADB3D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEC7097FDF020057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB50A486A1F00ADB3D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFEED097FE05F0057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CF1471A0A486774006EBA03 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF0C097FE13E0057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C8C0A48627600B4E469 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF23097FE1E00057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C350A4860EE00B4E469 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF38097FE25F0057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4C53E2500A48504D0014E966 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF4F097FE3050057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB00A4869FD00ADB3D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF7D097FE3DC0057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25C690A4861D100B4E469 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFF96097FE45E0057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBAE0A4869E600ADB3D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B81CFFB4097FE5F80057C06F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBB80A486A2E00ADB3D7 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B8DEF35A0950229200FDEA7E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA5CBBB0A486A4C00ADB3D7 /* CMainMenu.cpp in Sources */, + 4CA5CBBC0A486A4C00ADB3D7 /* main.cpp in Sources */, + 4CA5CBBD0A486A4C00ADB3D7 /* CDemo.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CA25BCE0A485EAD00B4E469 /* jcapimin.c in Sources */, + 4CA25BCF0A485EAD00B4E469 /* jcapistd.c in Sources */, + 4CA25BD00A485EAD00B4E469 /* jccoefct.c in Sources */, + 4CA25BD10A485EAD00B4E469 /* jccolor.c in Sources */, + 4CA25BD20A485EAD00B4E469 /* jcdctmgr.c in Sources */, + 4CA25BD30A485EAD00B4E469 /* jchuff.c in Sources */, + 4CA25BD50A485EAD00B4E469 /* jcinit.c in Sources */, + 4CA25BD60A485EAD00B4E469 /* jcmainct.c in Sources */, + 4CA25BD70A485EAD00B4E469 /* jcmarker.c in Sources */, + 4CA25BD80A485EAD00B4E469 /* jcmaster.c in Sources */, + 4CA25BD90A485EAD00B4E469 /* jcomapi.c in Sources */, + 4CA25BDB0A485EAD00B4E469 /* jcparam.c in Sources */, + 4CA25BDD0A485EAD00B4E469 /* jcprepct.c in Sources */, + 4CA25BDE0A485EAD00B4E469 /* jcsample.c in Sources */, + 4CA25BDF0A485EAD00B4E469 /* jctrans.c in Sources */, + 4CA25BE00A485EAD00B4E469 /* jdapimin.c in Sources */, + 4CA25BE10A485EAD00B4E469 /* jdapistd.c in Sources */, + 4CA25BE20A485EAD00B4E469 /* jdatadst.c in Sources */, + 4CA25BE30A485EAD00B4E469 /* jdatasrc.c in Sources */, + 4CA25BE40A485EAD00B4E469 /* jdcoefct.c in Sources */, + 4CA25BE50A485EAD00B4E469 /* jdcolor.c in Sources */, + 4CA25BE70A485EAD00B4E469 /* jddctmgr.c in Sources */, + 4CA25BE80A485EAD00B4E469 /* jdhuff.c in Sources */, + 4CA25BEA0A485EAD00B4E469 /* jdinput.c in Sources */, + 4CA25BEB0A485EAD00B4E469 /* jdmainct.c in Sources */, + 4CA25BEC0A485EAD00B4E469 /* jdmarker.c in Sources */, + 4CA25BED0A485EAD00B4E469 /* jdmaster.c in Sources */, + 4CA25BEE0A485EAD00B4E469 /* jdmerge.c in Sources */, + 4CA25BF00A485EAD00B4E469 /* jdpostct.c in Sources */, + 4CA25BF10A485EAD00B4E469 /* jdsample.c in Sources */, + 4CA25BF20A485EAD00B4E469 /* jdtrans.c in Sources */, + 4CA25BF30A485EAD00B4E469 /* jerror.c in Sources */, + 4CA25BF50A485EAD00B4E469 /* jfdctflt.c in Sources */, + 4CA25BF60A485EAD00B4E469 /* jfdctfst.c in Sources */, + 4CA25BF70A485EAD00B4E469 /* jfdctint.c in Sources */, + 4CA25BF80A485EAD00B4E469 /* jidctflt.c in Sources */, + 4CA25BF90A485EAD00B4E469 /* jidctfst.c in Sources */, + 4CA25BFA0A485EAD00B4E469 /* jidctint.c in Sources */, + 4CA25C000A485EAD00B4E469 /* jmemmgr.c in Sources */, + 4CA25C020A485EAD00B4E469 /* jmemnobs.c in Sources */, + 4CA25C080A485EAD00B4E469 /* jquant1.c in Sources */, + 4CA25C090A485EAD00B4E469 /* jquant2.c in Sources */, + 4CA25C0A0A485EAD00B4E469 /* jutils.c in Sources */, + 4C53E3D80A4856B30014E966 /* inffast.c in Sources */, + 4C53E3DC0A4856B30014E966 /* inftrees.c in Sources */, + 4C53E3E40A4856B30014E966 /* uncompr.c in Sources */, + 4C53E3F30A4856B30014E966 /* compress.c in Sources */, + 4C53E3F60A4856B30014E966 /* crc32.c in Sources */, + 4C53E3FE0A4856B30014E966 /* zutil.c in Sources */, + 4C53E4010A4856B30014E966 /* trees.c in Sources */, + 4C53E40A0A4856B30014E966 /* deflate.c in Sources */, + 4C53E4150A4856B30014E966 /* adler32.c in Sources */, + 4C53E4280A4856B30014E966 /* CImageLoaderPNG.cpp in Sources */, + 4C53E4290A4856B30014E966 /* CColorConverter.cpp in Sources */, + 4C53E42A0A4856B30014E966 /* CSceneManager.cpp in Sources */, + 4C53E42B0A4856B30014E966 /* CTRTextureGouraudAdd2.cpp in Sources */, + 4C53E42C0A4856B30014E966 /* CNullDriver.cpp in Sources */, + 4C53E42D0A4856B30014E966 /* CCSMLoader.cpp in Sources */, + 4C53E42E0A4856B30014E966 /* irrXML.cpp in Sources */, + 4C53E42F0A4856B30014E966 /* CGUIListBox.cpp in Sources */, + 4C53E4300A4856B30014E966 /* CTRGouraudWire.cpp in Sources */, + 4C53E4310A4856B30014E966 /* CIrrDeviceStub.cpp in Sources */, + 4C53E4320A4856B30014E966 /* CGUIMessageBox.cpp in Sources */, + 4C53E4330A4856B30014E966 /* CMeshSceneNode.cpp in Sources */, + 4C53E4340A4856B30014E966 /* CGUIStaticText.cpp in Sources */, + 4C53E4350A4856B30014E966 /* os.cpp in Sources */, + 4C53E4360A4856B30014E966 /* COCTLoader.cpp in Sources */, + 4C53E4370A4856B30014E966 /* CGUIContextMenu.cpp in Sources */, + 4C53E4390A4856B30014E966 /* CSceneNodeAnimatorFlyCircle.cpp in Sources */, + 4C53E43A0A4856B30014E966 /* CDefaultSceneNodeFactory.cpp in Sources */, + 4C53E43B0A4856B30014E966 /* CD3D9Driver.cpp in Sources */, + 4C53E43C0A4856B30014E966 /* CTRGouraud.cpp in Sources */, + 4C53E43D0A4856B30014E966 /* C3DSMeshFileLoader.cpp in Sources */, + 4C53E43E0A4856B30014E966 /* COgreMeshFileLoader.cpp in Sources */, + 4C53E43F0A4856B30014E966 /* CMY3DMeshFileLoader.cpp in Sources */, + 4C53E4400A4856B30014E966 /* CLMTSMeshFileLoader.cpp in Sources */, + 4C53E4410A4856B30014E966 /* CGUIFileOpenDialog.cpp in Sources */, + 4C53E4420A4856B30014E966 /* CSceneNodeAnimatorDelete.cpp in Sources */, + 4C53E4430A4856B30014E966 /* CTRGouraudAlphaNoZ2.cpp in Sources */, + 4C53E4440A4856B30014E966 /* CGeometryCreator.cpp in Sources */, + 4C53E4450A4856B30014E966 /* CD3D8Texture.cpp in Sources */, + 4C53E4460A4856B30014E966 /* CSkyBoxSceneNode.cpp in Sources */, + 4C53E4470A4856B30014E966 /* CMeshManipulator.cpp in Sources */, + 4C53E4480A4856B30014E966 /* CTextSceneNode.cpp in Sources */, + 4C53E4490A4856B30014E966 /* CTRTextureDetailMap2.cpp in Sources */, + 4C53E44A0A4856B30014E966 /* CTRTextureGouraudAddNoZ2.cpp in Sources */, + 4C53E44C0A4856B30014E966 /* CTRTextureGouraudNoZ.cpp in Sources */, + 4C53E44E0A4856B30014E966 /* CGUIScrollBar.cpp in Sources */, + 4C53E44F0A4856B30014E966 /* CSceneCollisionManager.cpp in Sources */, + 4C53E4500A4856B30014E966 /* CGUICheckBox.cpp in Sources */, + 4C53E4510A4856B30014E966 /* CQ3LevelMesh.cpp in Sources */, + 4C53E4520A4856B30014E966 /* CParticleGravityAffector.cpp in Sources */, + 4C53E4530A4856B30014E966 /* CSoftwareDriver2.cpp in Sources */, + 4C53E4540A4856B30014E966 /* CD3D9ParallaxMapRenderer.cpp in Sources */, + 4C53E4550A4856B30014E966 /* CD3D8ParallaxMapRenderer.cpp in Sources */, + 4C53E4560A4856B30014E966 /* CAnimatedMeshMD2.cpp in Sources */, + 4C53E4570A4856B30014E966 /* CSceneNodeAnimatorFlyStraight.cpp in Sources */, + 4C53E4580A4856B30014E966 /* CImageLoaderPCX.cpp in Sources */, + 4C53E4590A4856B30014E966 /* CAnimatedMeshSceneNode.cpp in Sources */, + 4C53E45A0A4856B30014E966 /* CTriangleSelector.cpp in Sources */, + 4C53E45B0A4856B30014E966 /* CTRTextureGouraudVertexAlpha2.cpp in Sources */, + 4C53E45C0A4856B30014E966 /* CTRTextureWire2.cpp in Sources */, + 4C53E45D0A4856B30014E966 /* CTRTextureFlatWire.cpp in Sources */, + 4C53E45E0A4856B30014E966 /* CTRGouraud2.cpp in Sources */, + 4C53E45F0A4856B30014E966 /* CEmptySceneNode.cpp in Sources */, + 4C53E4600A4856B30014E966 /* CTRTextureLightMap2_Add.cpp in Sources */, + 4C53E4610A4856B30014E966 /* CReadFile.cpp in Sources */, + 4C53E4620A4856B30014E966 /* COpenGLTexture.cpp in Sources */, + 4C53E4640A4856B30014E966 /* COSOperator.cpp in Sources */, + 4C53E4660A4856B30014E966 /* CColladaFileLoader.cpp in Sources */, + 4C53E4670A4856B30014E966 /* CCameraSceneNode.cpp in Sources */, + 4C53E4680A4856B30014E966 /* CMetaTriangleSelector.cpp in Sources */, + 4C53E4690A4856B30014E966 /* CTRTextureFlat.cpp in Sources */, + 4C53E46A0A4856B30014E966 /* CVideoModeList.cpp in Sources */, + 4C53E46B0A4856B30014E966 /* CXMLReader.cpp in Sources */, + 4C53E46C0A4856B30014E966 /* COpenGLParallaxMapRenderer.cpp in Sources */, + 4C53E46E0A4856B30014E966 /* CTRTextureGouraudNoZ2.cpp in Sources */, + 4C53E46F0A4856B30014E966 /* CTRTextureGouraudWire.cpp in Sources */, + 4C53E4700A4856B30014E966 /* CParticlePointEmitter.cpp in Sources */, + 4C53E4710A4856B30014E966 /* CGUIWindow.cpp in Sources */, + 4C53E4720A4856B30014E966 /* CGUIModalScreen.cpp in Sources */, + 4C53E4730A4856B30014E966 /* CImageLoaderPSD.cpp in Sources */, + 4C53E4740A4856B30014E966 /* CWaterSurfaceSceneNode.cpp in Sources */, + 4C53E4750A4856B30014E966 /* CXMeshFileLoader.cpp in Sources */, + 4C53E4760A4856B30014E966 /* CIrrDeviceLinux.cpp in Sources */, + 4C53E4770A4856B30014E966 /* CLightSceneNode.cpp in Sources */, + 4C53E4780A4856B30014E966 /* CTRTextureGouraudAdd.cpp in Sources */, + 4C53E4790A4856B30014E966 /* CTRTextureGouraud2.cpp in Sources */, + 4C53E47A0A4856B30014E966 /* CSoftwareDriver.cpp in Sources */, + 4C53E47B0A4856B30014E966 /* CTRFlatWire.cpp in Sources */, + 4C53E47C0A4856B30014E966 /* CTRGouraudAlpha2.cpp in Sources */, + 4C53E47D0A4856B30014E966 /* CSoftwareTexture2.cpp in Sources */, + 4C53E47E0A4856B30014E966 /* CZipReader.cpp in Sources */, + 4C53E47F0A4856B30014E966 /* COpenGLNormalMapRenderer.cpp in Sources */, + 4C53E4800A4856B30014E966 /* CTRTextureLightMap2_M1.cpp in Sources */, + 4C53E4810A4856B30014E966 /* CTRTextureLightMap2_M4.cpp in Sources */, + 4C53E4820A4856B30014E966 /* CGUISkin.cpp in Sources */, + 4C53E4830A4856B30014E966 /* CD3D8Driver.cpp in Sources */, + 4C53E4840A4856B30014E966 /* CIrrDeviceWin32.cpp in Sources */, + 4C53E4850A4856B30014E966 /* CFileSystem.cpp in Sources */, + 4C53E4860A4856B30014E966 /* CGUIMeshViewer.cpp in Sources */, + 4C53E4870A4856B30014E966 /* CGUIComboBox.cpp in Sources */, + 4C53E4880A4856B30014E966 /* CSceneNodeAnimatorRotation.cpp in Sources */, + 4C53E4890A4856B30014E966 /* CSceneNodeAnimatorTexture.cpp in Sources */, + 4C53E48B0A4856B30014E966 /* CParticleSystemSceneNode.cpp in Sources */, + 4C53E48C0A4856B30014E966 /* CTerrainSceneNode.cpp in Sources */, + 4C53E48E0A4856B30014E966 /* CGUIFont.cpp in Sources */, + 4C53E48F0A4856B30014E966 /* CParticleFadeOutAffector.cpp in Sources */, + 4C53E4910A4856B30014E966 /* CDummyTransformationSceneNode.cpp in Sources */, + 4C53E4920A4856B30014E966 /* CFileList.cpp in Sources */, + 4C53E4930A4856B30014E966 /* CImageLoaderTGA.cpp in Sources */, + 4C53E4940A4856B30014E966 /* CXMLWriter.cpp in Sources */, + 4C53E4950A4856B30014E966 /* CSceneNodeAnimatorFollowSpline.cpp in Sources */, + 4C53E4960A4856B30014E966 /* CZBuffer.cpp in Sources */, + 4C53E4970A4856B30014E966 /* CDMFLoader.cpp in Sources */, + 4C53E4980A4856B30014E966 /* CD3D9Texture.cpp in Sources */, + 4C53E4990A4856B30014E966 /* COpenGLShaderMaterialRenderer.cpp in Sources */, + 4C53E49A0A4856B30014E966 /* Irrlicht.cpp in Sources */, + 4C53E49B0A4856B30014E966 /* CGUIEditBox.cpp in Sources */, + 4C53E49C0A4856B30014E966 /* COpenGLSLMaterialRenderer.cpp in Sources */, + 4C53E49D0A4856B30014E966 /* CD3D9HLSLMaterialRenderer.cpp in Sources */, + 4C53E49E0A4856B30014E966 /* CSoftwareTexture.cpp in Sources */, + 4C53E49F0A4856B30014E966 /* CCubeSceneNode.cpp in Sources */, + 4C53E4A00A4856B30014E966 /* CTriangleBBSelector.cpp in Sources */, + 4C53E4A10A4856B30014E966 /* CD3D9ShaderMaterialRenderer.cpp in Sources */, + 4C53E4A20A4856B30014E966 /* CD3D8ShaderMaterialRenderer.cpp in Sources */, + 4C53E4A30A4856B30014E966 /* CGUIButton.cpp in Sources */, + 4C53E4A40A4856B30014E966 /* CGUIToolBar.cpp in Sources */, + 4C53E4A50A4856B30014E966 /* CDefaultSceneNodeAnimatorFactory.cpp in Sources */, + 4C53E4A60A4856B30014E966 /* CBillboardSceneNode.cpp in Sources */, + 4C53E4A70A4856B30014E966 /* CSceneNodeAnimatorCollisionResponse.cpp in Sources */, + 4C53E4A80A4856B30014E966 /* CLogger.cpp in Sources */, + 4C53E4A90A4856B30014E966 /* CGUIInOutFader.cpp in Sources */, + 4C53E4AA0A4856B30014E966 /* CWriteFile.cpp in Sources */, + 4C53E4AD0A4856B30014E966 /* CTRTextureGouraud.cpp in Sources */, + 4C53E4AE0A4856B30014E966 /* CTRFlat.cpp in Sources */, + 4C53E4AF0A4856B30014E966 /* CTerrainTriangleSelector.cpp in Sources */, + 4C53E4B10A4856B30014E966 /* CGUITabControl.cpp in Sources */, + 4C53E4B20A4856B30014E966 /* CParticleBoxEmitter.cpp in Sources */, + 4C53E4B30A4856B30014E966 /* CGUIMenu.cpp in Sources */, + 4C53E4B40A4856B30014E966 /* CImage.cpp in Sources */, + 4C53E4B50A4856B30014E966 /* CShadowVolumeSceneNode.cpp in Sources */, + 4C53E4B70A4856B30014E966 /* CGUIEnvironment.cpp in Sources */, + 4C53E4B80A4856B30014E966 /* CLimitReadFile.cpp in Sources */, + 4C53E4B90A4856B30014E966 /* CAttributes.cpp in Sources */, + 4C53E4BA0A4856B30014E966 /* COpenGLDriver.cpp in Sources */, + 4C53E4BB0A4856B30014E966 /* CTRTextureLightMap2_M2.cpp in Sources */, + 4C53E4BC0A4856B30014E966 /* CGUIImage.cpp in Sources */, + 4C53E4BD0A4856B30014E966 /* CD3D9NormalMapRenderer.cpp in Sources */, + 4C53E4BE0A4856B30014E966 /* CD3D8NormalMapRenderer.cpp in Sources */, + 4C53E4BF0A4856B30014E966 /* CMeshCache.cpp in Sources */, + 4C53E4C00A4856B30014E966 /* CImageLoaderJPG.cpp in Sources */, + 4C53E4C10A4856B30014E966 /* CFPSCounter.cpp in Sources */, + 4C53E57E0A4856B30014E966 /* OSXClipboard.mm in Sources */, + 4C53E57F0A4856B30014E966 /* CIrrDeviceMacOSX.mm in Sources */, + 4C53E5800A4856B30014E966 /* AppDelegate.mm in Sources */, + 4C6DC9B70A48715A0017A6E5 /* inflate.c in Sources */, + 4CC36B0F0A6B61DB0076C4B2 /* CSphereSceneNode.cpp in Sources */, + 4C364EA40A6C6DC2004CFBB4 /* COBJMeshFileLoader.cpp in Sources */, + 4C43EEC00A74A5C800F942FC /* CPakReader.cpp in Sources */, + 4CFA7BEE0A88735A00B03626 /* CImageLoaderBMP.cpp in Sources */, + 4CFA7BF00A88735A00B03626 /* CImageWriterBMP.cpp in Sources */, + 4CFA7BF20A88735A00B03626 /* CImageWriterJPG.cpp in Sources */, + 4CFA7BF40A88735A00B03626 /* CImageWriterPCX.cpp in Sources */, + 4CFA7BF60A88735A00B03626 /* CImageWriterPNG.cpp in Sources */, + 4CFA7BF80A88735A00B03626 /* CImageWriterPPM.cpp in Sources */, + 4CFA7BFA0A88735A00B03626 /* CImageWriterPSD.cpp in Sources */, + 4CFA7BFC0A88735A00B03626 /* CImageWriterTGA.cpp in Sources */, + 4CFA7BFE0A88735A00B03626 /* CSkyDomeSceneNode.cpp in Sources */, + 5DD4804E0C7D91DF00728AA9 /* CDepthBuffer.cpp in Sources */, + 5DD480520C7D936700728AA9 /* IBurningShader.cpp in Sources */, + 5DD4805A0C7D945800728AA9 /* CAnimatedMeshMD3.cpp in Sources */, + 5DD4805C0C7D945800728AA9 /* CDefaultGUIElementFactory.cpp in Sources */, + 5DD480640C7D947B00728AA9 /* CGUIColorSelectDialog.cpp in Sources */, + 5DD480660C7D947B00728AA9 /* CGUISpinBox.cpp in Sources */, + 5DD480680C7D947B00728AA9 /* CGUISpriteBank.cpp in Sources */, + 5DD480710C7D94AC00728AA9 /* CQuake3ShaderSceneNode.cpp in Sources */, + 5DD480730C7D94AC00728AA9 /* CTRTextureBlend.cpp in Sources */, + 5DD480740C7D94AC00728AA9 /* CTRTextureGouraudAlpha.cpp in Sources */, + 5DD480750C7D94AC00728AA9 /* CTRTextureGouraudAlphaNoZ.cpp in Sources */, + 5DD480760C7D94AC00728AA9 /* CTRTextureLightMapGouraud2_M4.cpp in Sources */, + 5DD480CA0C7DA66800728AA9 /* CIrrDeviceSDL.cpp in Sources */, + 5DD480CB0C7DA66800728AA9 /* COpenGLExtensionHandler.cpp in Sources */, + 5DD480CC0C7DA66800728AA9 /* CMD3MeshFileLoader.cpp in Sources */, + 096840470D0F1A2300333EFD /* CB3DMeshFileLoader.cpp in Sources */, + 096840490D0F1A2300333EFD /* CBoneSceneNode.cpp in Sources */, + 0968404B0D0F1A2300333EFD /* CBSPMeshFileLoader.cpp in Sources */, + 0968404E0D0F1A2300333EFD /* CColladaMeshWriter.cpp in Sources */, + 096840500D0F1A2300333EFD /* CImageLoaderPPM.cpp in Sources */, + 096840540D0F1A2300333EFD /* CIrrMeshFileLoader.cpp in Sources */, + 096840560D0F1A2300333EFD /* CIrrMeshWriter.cpp in Sources */, + 096840580D0F1A2300333EFD /* CMD2MeshFileLoader.cpp in Sources */, + 0968405A0D0F1A2300333EFD /* CMS3DMeshFileLoader.cpp in Sources */, + 0968405C0D0F1A2300333EFD /* CParticleAnimatedMeshSceneNodeEmitter.cpp in Sources */, + 0968405E0D0F1A2300333EFD /* CParticleAttractionAffector.cpp in Sources */, + 096840600D0F1A2300333EFD /* CParticleCylinderEmitter.cpp in Sources */, + 096840620D0F1A2300333EFD /* CParticleMeshEmitter.cpp in Sources */, + 096840640D0F1A2300333EFD /* CParticleRingEmitter.cpp in Sources */, + 096840660D0F1A2300333EFD /* CParticleRotationAffector.cpp in Sources */, + 096840680D0F1A2300333EFD /* CParticleSphereEmitter.cpp in Sources */, + 0968406A0D0F1A2300333EFD /* CSkinnedMesh.cpp in Sources */, + 0968406C0D0F1A2300333EFD /* CSTLMeshFileLoader.cpp in Sources */, + 0968406E0D0F1A2300333EFD /* CSTLMeshWriter.cpp in Sources */, + 0910B9DE0D1F5D4100D46B04 /* CBurningShader_Raster_Reference.cpp in Sources */, + 0910B9DF0D1F5D4100D46B04 /* CGUITable.cpp in Sources */, + 0910B9E10D1F5D4100D46B04 /* CImageLoaderWAL.cpp in Sources */, + 090FBC820D31085E0076D847 /* CVolumeLightSceneNode.cpp in Sources */, + 09C638720D4F1A69000B6A18 /* CLWOMeshFileLoader.cpp in Sources */, + 093973C00E0458B200E0C987 /* CSceneNodeAnimatorCameraFPS.cpp in Sources */, + 093973C20E0458B200E0C987 /* CSceneNodeAnimatorCameraMaya.cpp in Sources */, + 096F8E3D0EA2EFBA00907EC5 /* COBJMeshWriter.cpp in Sources */, + 096CC0E00ECE65B500C81DC7 /* CParticleScaleAffector.cpp in Sources */, + 09293C3E0ED32029003B8C9C /* png.c in Sources */, + 09293C3F0ED32029003B8C9C /* pngerror.c in Sources */, + 09293C410ED32029003B8C9C /* pngget.c in Sources */, + 09293C420ED32029003B8C9C /* pngmem.c in Sources */, + 09293C430ED32029003B8C9C /* pngpread.c in Sources */, + 09293C440ED32029003B8C9C /* pngread.c in Sources */, + 09293C450ED32029003B8C9C /* pngrio.c in Sources */, + 09293C460ED32029003B8C9C /* pngrtran.c in Sources */, + 09293C470ED32029003B8C9C /* pngrutil.c in Sources */, + 09293C480ED32029003B8C9C /* pngset.c in Sources */, + 09293C4A0ED32029003B8C9C /* pngtrans.c in Sources */, + 09293C4C0ED32029003B8C9C /* pngwio.c in Sources */, + 09293C4D0ED32029003B8C9C /* pngwrite.c in Sources */, + 09293C4E0ED32029003B8C9C /* pngwtran.c in Sources */, + 09293C4F0ED32029003B8C9C /* pngwutil.c in Sources */, + 3484C4E20F48D1B000C81F60 /* CGUIImageList.cpp in Sources */, + 3484C4EF0F48D3A100C81F60 /* CGUITreeView.cpp in Sources */, + 3484C4FE0F48D4CB00C81F60 /* CMemoryFile.cpp in Sources */, + 34EC243D0F59272E0037BC3A /* CIrrDeviceConsole.cpp in Sources */, + 34EF91D30F65FCA6000B5651 /* CImageLoaderRGB.cpp in Sources */, + 34EF91D80F65FCF6000B5651 /* CPLYMeshFileLoader.cpp in Sources */, + 34EF91DD0F65FD14000B5651 /* CPLYMeshWriter.cpp in Sources */, + 3430E4D71022C391006271FD /* CTarReader.cpp in Sources */, + 344FD4A61039E98C0045FD3F /* CMountPointReader.cpp in Sources */, + 0E2E3C461103B1B5002DE8D7 /* jaricom.c in Sources */, + 0E2E3C471103B1B5002DE8D7 /* jcarith.c in Sources */, + 0E2E3C481103B1B5002DE8D7 /* jdarith.c in Sources */, + 0E2E3C4D1103B247002DE8D7 /* COctreeSceneNode.cpp in Sources */, + 0E2E3C511103B261002DE8D7 /* COctreeTriangleSelector.cpp in Sources */, + 0E2E3C551103B27D002DE8D7 /* CNPKReader.cpp in Sources */, + 0E2E3C5B1103B2AE002DE8D7 /* CIrrDeviceFB.cpp in Sources */, + 0E2E3C5D1103B2AE002DE8D7 /* CIrrDeviceWinCE.cpp in Sources */, + 0E2E3C641103B384002DE8D7 /* LzmaDec.c in Sources */, + 0E2E3C6F1103B3B9002DE8D7 /* blocksort.c in Sources */, + 0E2E3C701103B3B9002DE8D7 /* bzcompress.c in Sources */, + 0E2E3C731103B3B9002DE8D7 /* crctable.c in Sources */, + 0E2E3C741103B3B9002DE8D7 /* decompress.c in Sources */, + 0E2E3C751103B3B9002DE8D7 /* huffman.c in Sources */, + 0E2E3C771103B3B9002DE8D7 /* randtable.c in Sources */, + 0E2E3C7C1103B4E1002DE8D7 /* bzlib.c in Sources */, + 0E2E3C871103B53C002DE8D7 /* aescrypt.cpp in Sources */, + 0E2E3C881103B53C002DE8D7 /* aeskey.cpp in Sources */, + 0E2E3C891103B53C002DE8D7 /* aestab.cpp in Sources */, + 0E2E3C8A1103B53C002DE8D7 /* fileenc.cpp in Sources */, + 0E2E3C8B1103B53C002DE8D7 /* hmac.cpp in Sources */, + 0E2E3C8C1103B53C002DE8D7 /* prng.cpp in Sources */, + 0E2E3C8D1103B53C002DE8D7 /* pwd2key.cpp in Sources */, + 0E2E3C8E1103B53C002DE8D7 /* sha1.cpp in Sources */, + 0E2E3C8F1103B53C002DE8D7 /* sha2.cpp in Sources */, + 95E5857112FCE277004946C6 /* CWADReader.cpp in Sources */, + 95E5857712FCE2CB004946C6 /* CAnimatedMeshHalfLife.cpp in Sources */, + 95E5857C12FCE2DE004946C6 /* CSceneLoaderIrr.cpp in Sources */, + 95E5858D12FCE388004946C6 /* CTRNormalMap.cpp in Sources */, + 95E5859212FCE3A1004946C6 /* CTRStencilShadow.cpp in Sources */, + 95E5859512FCE3F5004946C6 /* CSMFMeshFileLoader.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 09022C530EA0E97F00CD54EE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 09022C540EA0E97F00CD54EE /* PBXContainerItemProxy */; + }; + 0946CCA40EC99BBE00D945A5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 0946CCA50EC99BBE00D945A5 /* PBXContainerItemProxy */; + }; + 0946CCD90EC99D8C00D945A5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09022C520EA0E97F00CD54EE /* GUIEditor */; + targetProxy = 0946CCD80EC99D8C00D945A5 /* PBXContainerItemProxy */; + }; + 09F648F50D2CDED9001E0599 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 09F648F60D2CDED9001E0599 /* PBXContainerItemProxy */; + }; + 09F649210D2CDFF0001E0599 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09F648F40D2CDED9001E0599 /* 01.HelloWorld */; + targetProxy = 09F649200D2CDFF0001E0599 /* PBXContainerItemProxy */; + }; + 09F649300D2CE03E001E0599 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 09F649310D2CE03E001E0599 /* PBXContainerItemProxy */; + }; + 09F649570D2CE206001E0599 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 09F649580D2CE206001E0599 /* PBXContainerItemProxy */; + }; + 0E2E3CEC1103E294002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 0E2E3CED1103E294002DE8D7 /* PBXContainerItemProxy */; + }; + 0E2E3D2D1103E3F4002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = 0E2E3D2E1103E3F4002DE8D7 /* PBXContainerItemProxy */; + }; + 0E2E3D8C1103EB12002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0E2E3D2C1103E3F4002DE8D7 /* 20.ManagedLights */; + targetProxy = 0E2E3D8B1103EB12002DE8D7 /* PBXContainerItemProxy */; + }; + 0E2E3D8E1103EB1A002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0E2E3CEB1103E294002DE8D7 /* 18.SplitScreen */; + targetProxy = 0E2E3D8D1103EB1A002DE8D7 /* PBXContainerItemProxy */; + }; + 0E2E3D901103EB32002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09F6492F0D2CE03E001E0599 /* 15.LoadIrrFile */; + targetProxy = 0E2E3D8F1103EB32002DE8D7 /* PBXContainerItemProxy */; + }; + 0E2E3D921103EB39002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09F649560D2CE206001E0599 /* 16.Quake3Shader */; + targetProxy = 0E2E3D911103EB39002DE8D7 /* PBXContainerItemProxy */; + }; + 0E2E3D941103EB41002DE8D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0946CCA30EC99BBE00D945A5 /* 19.MouseAndJoystick */; + targetProxy = 0E2E3D931103EB41002DE8D7 /* PBXContainerItemProxy */; + }; + 4CA5CB820A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B8DEF35C0950229200FDEA7E /* Demo */; + targetProxy = 4CA5CB810A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB840A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFFAF097FE5F80057C06F /* 13.RenderToTexture */; + targetProxy = 4CA5CB830A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB860A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFEC2097FDF020057C06F /* 12.TerrainRendering */; + targetProxy = 4CA5CB850A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB880A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFEA4097FDE900057C06F /* 11.PerPixelLightning */; + targetProxy = 4CA5CB870A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB8A0A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFF4A097FE3050057C06F /* 10.Shaders */; + targetProxy = 4CA5CB890A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB8C0A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFF91097FE45E0057C06F /* 09.MeshViewer */; + targetProxy = 4CA5CB8B0A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB8E0A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFEE8097FE05F0057C06F /* 08.SpecialFx */; + targetProxy = 4CA5CB8D0A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB900A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFE82097FDDE20057C06F /* 07.Collision */; + targetProxy = 4CA5CB8F0A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB920A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFDFE097FD9F50057C06F /* 06.2DGraphics */; + targetProxy = 4CA5CB910A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB940A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFF07097FE13E0057C06F /* 05.UserInterface */; + targetProxy = 4CA5CB930A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB960A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFF78097FE3DC0057C06F /* 04.Movement */; + targetProxy = 4CA5CB950A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB980A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFF1E097FE1E00057C06F /* 03.CustomSceneNode */; + targetProxy = 4CA5CB970A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + 4CA5CB9A0A4868B500ADB3D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B81CFF33097FE25F0057C06F /* 02.Quake3Map */; + targetProxy = 4CA5CB990A4868B500ADB3D7 /* PBXContainerItemProxy */; + }; + B81CFDFF097FD9F50057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFE00097FD9F50057C06F /* PBXContainerItemProxy */; + }; + B81CFE83097FDDE20057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFE84097FDDE20057C06F /* PBXContainerItemProxy */; + }; + B81CFEA5097FDE900057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFEA6097FDE900057C06F /* PBXContainerItemProxy */; + }; + B81CFEC3097FDF020057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFEC4097FDF020057C06F /* PBXContainerItemProxy */; + }; + B81CFEE9097FE05F0057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFEEA097FE05F0057C06F /* PBXContainerItemProxy */; + }; + B81CFF08097FE13E0057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFF09097FE13E0057C06F /* PBXContainerItemProxy */; + }; + B81CFF1F097FE1E00057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFF20097FE1E00057C06F /* PBXContainerItemProxy */; + }; + B81CFF34097FE25F0057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFF35097FE25F0057C06F /* PBXContainerItemProxy */; + }; + B81CFF4B097FE3050057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFF4C097FE3050057C06F /* PBXContainerItemProxy */; + }; + B81CFF79097FE3DC0057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFF7A097FE3DC0057C06F /* PBXContainerItemProxy */; + }; + B81CFF92097FE45E0057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFF93097FE45E0057C06F /* PBXContainerItemProxy */; + }; + B81CFFB0097FE5F80057C06F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B81CFFB1097FE5F80057C06F /* PBXContainerItemProxy */; + }; + B8DEF375095024F600FDEA7E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D2AAC07D0554694100DB518D /* libIrrlicht.a */; + targetProxy = B8DEF374095024F600FDEA7E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 09022C600EA0E97F00CD54EE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = GUIEditor_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 09022C610EA0E97F00CD54EE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = GUIEditor; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 0946CCB20EC99BBE00D945A5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = MouseAndJoystick_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 0946CCB30EC99BBE00D945A5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = MouseAndJoystick; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 09F649010D2CDED9001E0599 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = HelloWorld_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 09F649020D2CDED9001E0599 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = HelloWorld; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 09F6493C0D2CE03E001E0599 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = LoadIrrFile_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 09F6493D0D2CE03E001E0599 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = LoadIrrFile; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 09F649630D2CE206001E0599 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Quake3Shader_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 09F649640D2CE206001E0599 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Quake3Shader; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 0E2E3CFA1103E294002DE8D7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = SplitScreen_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 0E2E3CFB1103E294002DE8D7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = SplitScreen; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 0E2E3D3A1103E3F4002DE8D7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = ManagedLights_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + 0E2E3D3B1103E3F4002DE8D7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = ManagedLights; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MacOSX_Prefix.pch; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = Irrlicht; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = MacOSX_Prefix.pch; + INSTALL_PATH = /usr/local/lib; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_NAME = Irrlicht; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = NO; + HEADER_SEARCH_PATHS = ../../../include; + OTHER_CFLAGS = ( + "-DMACOSX", + "-D_DEBUG", + ); + PREBINDING = NO; + SDKROOT = ""; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = NO; + HEADER_SEARCH_PATHS = ../../../include; + INSTALL_MODE_FLAG = "a+rwx"; + OTHER_CFLAGS = "-DMACOSX"; + PREBINDING = NO; + SDKROOT = ""; + }; + name = Release; + }; + 959726FF12C18FFD00BF73D3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = "IrrFramework-Info.plist"; + INSTALL_PATH = "@executable_path/../Frameworks"; + OTHER_CFLAGS = ( + "-read_only_relocs", + suppress, + ); + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + "-read_only_relocs", + suppress, + ); + PREBINDING = NO; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_NAME = IrrFramework; + SHARED_PRECOMPS_DIR = ""; + }; + name = Debug; + }; + 9597270012C18FFD00BF73D3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = "IrrFramework-Info.plist"; + INSTALL_PATH = "@executable_path/../Frameworks"; + OTHER_CFLAGS = ( + "-read_only_relocs", + suppress, + ); + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + "-read_only_relocs", + suppress, + ); + PREBINDING = NO; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_NAME = IrrFramework; + SHARED_PRECOMPS_DIR = ""; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFE0D097FD9F50057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = 2DGraphics_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFE0E097FD9F50057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = 2DGraphics; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFE8E097FDDE20057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Collision_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFE8F097FDDE20057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Collision; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFEB0097FDE900057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = PerPixelLighting_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFEB1097FDE900057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_MODE_FLAG = "a+rwx"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = PerPixelLighting; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFECE097FDF020057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = TerrainRendering_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFECF097FDF020057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = TerrainRendering; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFEF4097FE05F0057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = SpecialFx_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFEF5097FE05F0057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = SpecialFx; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFF13097FE13E0057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = UserInterface_dbg; + SDKROOT = ""; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFF14097FE13E0057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = UserInterface; + SDKROOT = ""; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFF2A097FE1E00057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = CustomSceneNode_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFF2B097FE1E00057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = CustomSceneNode; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFF3F097FE25F0057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Quake3Map_dbg; + SDKROOT = ""; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFF40097FE25F0057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Debug\""; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Quake3Map; + SDKROOT = ""; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFF56097FE3050057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Shaders_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFF57097FE3050057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Shaders; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFF84097FE3DC0057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Movement_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFF85097FE3DC0057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Movement; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFF9D097FE45E0057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = MeshViewer_dbg; + SDKROOT = ""; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFF9E097FE45E0057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = MeshViewer; + SDKROOT = ""; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFFBB097FE5F80057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = RenderToTexture_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B81CFFBC097FE5F80057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = RenderToTexture; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; + B81CFFE9097FE9C30057C06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + PRODUCT_NAME = ALL; + }; + name = Debug; + }; + B81CFFEA097FE9C30057C06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + PRODUCT_NAME = ALL; + ZERO_LINK = NO; + }; + name = Release; + }; + B8DEF3610950229300FDEA7E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Demo_dbg; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + B8DEF3620950229300FDEA7E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_LOCATION = YES; + DEPLOYMENT_POSTPROCESSING = YES; + DSTROOT = ../../../bin/MacOSX; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "DemoApp-Info.plist"; + INSTALL_PATH = /; + ONLY_LINK_ESSENTIAL_SYMBOLS = YES; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Demo; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 09022C5F0EA0E97F00CD54EE /* Build configuration list for PBXNativeTarget "GUIEditor" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09022C600EA0E97F00CD54EE /* Debug */, + 09022C610EA0E97F00CD54EE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0946CCB10EC99BBE00D945A5 /* Build configuration list for PBXNativeTarget "19.MouseAndJoystick" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0946CCB20EC99BBE00D945A5 /* Debug */, + 0946CCB30EC99BBE00D945A5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09F649000D2CDED9001E0599 /* Build configuration list for PBXNativeTarget "01.HelloWorld" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F649010D2CDED9001E0599 /* Debug */, + 09F649020D2CDED9001E0599 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09F6493B0D2CE03E001E0599 /* Build configuration list for PBXNativeTarget "15.LoadIrrFile" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F6493C0D2CE03E001E0599 /* Debug */, + 09F6493D0D2CE03E001E0599 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09F649620D2CE206001E0599 /* Build configuration list for PBXNativeTarget "16.Quake3Shader" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F649630D2CE206001E0599 /* Debug */, + 09F649640D2CE206001E0599 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0E2E3CF91103E294002DE8D7 /* Build configuration list for PBXNativeTarget "18.SplitScreen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E2E3CFA1103E294002DE8D7 /* Debug */, + 0E2E3CFB1103E294002DE8D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0E2E3D391103E3F4002DE8D7 /* Build configuration list for PBXNativeTarget "20.ManagedLights" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E2E3D3A1103E3F4002DE8D7 /* Debug */, + 0E2E3D3B1103E3F4002DE8D7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "libIrrlicht.a" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "MacOSX" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9597270112C18FFD00BF73D3 /* Build configuration list for PBXNativeTarget "IrrFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 959726FF12C18FFD00BF73D3 /* Debug */, + 9597270012C18FFD00BF73D3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFE0C097FD9F50057C06F /* Build configuration list for PBXNativeTarget "06.2DGraphics" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFE0D097FD9F50057C06F /* Debug */, + B81CFE0E097FD9F50057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFE8D097FDDE20057C06F /* Build configuration list for PBXNativeTarget "07.Collision" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFE8E097FDDE20057C06F /* Debug */, + B81CFE8F097FDDE20057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFEAF097FDE900057C06F /* Build configuration list for PBXNativeTarget "11.PerPixelLightning" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFEB0097FDE900057C06F /* Debug */, + B81CFEB1097FDE900057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFECD097FDF020057C06F /* Build configuration list for PBXNativeTarget "12.TerrainRendering" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFECE097FDF020057C06F /* Debug */, + B81CFECF097FDF020057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFEF3097FE05F0057C06F /* Build configuration list for PBXNativeTarget "08.SpecialFx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFEF4097FE05F0057C06F /* Debug */, + B81CFEF5097FE05F0057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFF12097FE13E0057C06F /* Build configuration list for PBXNativeTarget "05.UserInterface" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFF13097FE13E0057C06F /* Debug */, + B81CFF14097FE13E0057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFF29097FE1E00057C06F /* Build configuration list for PBXNativeTarget "03.CustomSceneNode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFF2A097FE1E00057C06F /* Debug */, + B81CFF2B097FE1E00057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFF3E097FE25F0057C06F /* Build configuration list for PBXNativeTarget "02.Quake3Map" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFF3F097FE25F0057C06F /* Debug */, + B81CFF40097FE25F0057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFF55097FE3050057C06F /* Build configuration list for PBXNativeTarget "10.Shaders" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFF56097FE3050057C06F /* Debug */, + B81CFF57097FE3050057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFF83097FE3DC0057C06F /* Build configuration list for PBXNativeTarget "04.Movement" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFF84097FE3DC0057C06F /* Debug */, + B81CFF85097FE3DC0057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFF9C097FE45E0057C06F /* Build configuration list for PBXNativeTarget "09.MeshViewer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFF9D097FE45E0057C06F /* Debug */, + B81CFF9E097FE45E0057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFFBA097FE5F80057C06F /* Build configuration list for PBXNativeTarget "13.RenderToTexture" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFFBB097FE5F80057C06F /* Debug */, + B81CFFBC097FE5F80057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B81CFFE8097FE9C30057C06F /* Build configuration list for PBXAggregateTarget "All" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B81CFFE9097FE9C30057C06F /* Debug */, + B81CFFEA097FE9C30057C06F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B8DEF3600950229300FDEA7E /* Build configuration list for PBXNativeTarget "Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B8DEF3610950229300FDEA7E /* Debug */, + B8DEF3620950229300FDEA7E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX_Prefix.pch b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX_Prefix.pch new file mode 100644 index 0000000..b3ea109 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MacOSX_Prefix.pch @@ -0,0 +1,5 @@ +// +// Prefix header for all source files of the 'MacOSX' target in the 'MacOSX' project. +// + +#include <architecture/byte_order.h> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/classes.nib b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/classes.nib new file mode 100644 index 0000000..b9b4b09 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/classes.nib @@ -0,0 +1,4 @@ +{ + IBClasses = ({CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }); + IBVersion = 1; +} \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/info.nib b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/info.nib new file mode 100644 index 0000000..d4de41f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/info.nib @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IBDocumentLocation</key> + <string>195 413 356 240 0 0 1680 1028 </string> + <key>IBEditorPositions</key> + <dict> + <key>29</key> + <string>62 343 338 44 0 0 1680 1028 </string> + </dict> + <key>IBFramework Version</key> + <string>443.0</string> + <key>IBSystem Version</key> + <string>8F46</string> +</dict> +</plist> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/keyedobjects.nib b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/keyedobjects.nib new file mode 100644 index 0000000..1a56102 Binary files /dev/null and b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/MainMenu.nib/keyedobjects.nib differ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.h b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.h new file mode 100644 index 0000000..68f598d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.h @@ -0,0 +1,15 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#ifdef __cplusplus +extern "C" { +#endif + + void OSXCopyToClipboard(const char *text); + char* OSXCopyFromClipboard(); + +#ifdef __cplusplus +} +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.mm b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.mm new file mode 100644 index 0000000..d549911 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/OSXClipboard.mm @@ -0,0 +1,36 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#include "OSXClipboard.h" +#import <Cocoa/Cocoa.h> + +void OSXCopyToClipboard(const char *text) +{ + NSString *str; + NSPasteboard *board; + + if ((text != NULL) && (strlen(text) > 0)) + { + str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding]; + board = [NSPasteboard generalPasteboard]; + [board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp]; + [board setString:str forType:NSStringPboardType]; + } +} + +char* OSXCopyFromClipboard() +{ + NSString* str; + NSPasteboard* board; + char* result; + + result = NULL; + board = [NSPasteboard generalPasteboard]; + str = [board stringForType:NSStringPboardType]; + if (str != nil) + result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; + return (result); +} + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/irrFramework-Info.plist b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/irrFramework-Info.plist new file mode 100644 index 0000000..fd4ba51 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/MacOSX/irrFramework-Info.plist @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>org.irrlichtengine.${PRODUCT_NAME:identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.6</string> +</dict> +</plist> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Makefile b/src/others/irrlicht-1.8.1/source/Irrlicht/Makefile new file mode 100644 index 0000000..5ba4ced --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Makefile @@ -0,0 +1,203 @@ +VERSION_MAJOR = 1 +VERSION_MINOR = 8 +VERSION_RELEASE = 1 +# Irrlicht Engine 1.8.1 +# Makefile for Linux +# +# To use, just run: +# +# make +# +# This will compile Irrlicht, create a static lib (libIrrlicht.a), and copy it +# into the subdirectory lib/Linux. That's all. +# +# If you want Irrlicht to be compiled as shared lib (libIrrlicht.so.versionnumber), then run: +# +# make sharedlib +# make install +# +# If you want to compile in release mode run: +# +# make NDEBUG=1 +# +# For cross-compilation for Win32 under Linux, just use the win32 targets. You have to set +# at least CXX, CC, and AR to the proper binaries. +# +# For compiling on MinGW you can run it with: +# +# make win32 +# + +#List of object files, separated based on engine architecture +IRRMESHLOADER = CBSPMeshFileLoader.o CMD2MeshFileLoader.o CMD3MeshFileLoader.o CMS3DMeshFileLoader.o CB3DMeshFileLoader.o C3DSMeshFileLoader.o COgreMeshFileLoader.o COBJMeshFileLoader.o CColladaFileLoader.o CCSMLoader.o CDMFLoader.o CLMTSMeshFileLoader.o CMY3DMeshFileLoader.o COCTLoader.o CXMeshFileLoader.o CIrrMeshFileLoader.o CSTLMeshFileLoader.o CLWOMeshFileLoader.o CPLYMeshFileLoader.o CSMFMeshFileLoader.o +IRRMESHWRITER = CColladaMeshWriter.o CIrrMeshWriter.o CSTLMeshWriter.o COBJMeshWriter.o CPLYMeshWriter.o +IRRMESHOBJ = $(IRRMESHLOADER) $(IRRMESHWRITER) \ + CSkinnedMesh.o CBoneSceneNode.o CMeshSceneNode.o \ + CAnimatedMeshSceneNode.o CAnimatedMeshMD2.o CAnimatedMeshMD3.o \ + CQ3LevelMesh.o CQuake3ShaderSceneNode.o CAnimatedMeshHalfLife.o +IRROBJ = CBillboardSceneNode.o CCameraSceneNode.o CDummyTransformationSceneNode.o CEmptySceneNode.o CGeometryCreator.o CLightSceneNode.o CMeshManipulator.o CMetaTriangleSelector.o COctreeSceneNode.o COctreeTriangleSelector.o CSceneCollisionManager.o CSceneManager.o CShadowVolumeSceneNode.o CSkyBoxSceneNode.o CSkyDomeSceneNode.o CTerrainSceneNode.o CTerrainTriangleSelector.o CVolumeLightSceneNode.o CCubeSceneNode.o CSphereSceneNode.o CTextSceneNode.o CTriangleBBSelector.o CTriangleSelector.o CWaterSurfaceSceneNode.o CMeshCache.o CDefaultSceneNodeAnimatorFactory.o CDefaultSceneNodeFactory.o CSceneLoaderIrr.o +IRRPARTICLEOBJ = CParticleAnimatedMeshSceneNodeEmitter.o CParticleBoxEmitter.o CParticleCylinderEmitter.o CParticleMeshEmitter.o CParticlePointEmitter.o CParticleRingEmitter.o CParticleSphereEmitter.o CParticleAttractionAffector.o CParticleFadeOutAffector.o CParticleGravityAffector.o CParticleRotationAffector.o CParticleSystemSceneNode.o CParticleScaleAffector.o +IRRANIMOBJ = CSceneNodeAnimatorCameraFPS.o CSceneNodeAnimatorCameraMaya.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorFollowSpline.o CSceneNodeAnimatorRotation.o CSceneNodeAnimatorTexture.o +IRRDRVROBJ = CNullDriver.o COpenGLDriver.o COpenGLNormalMapRenderer.o COpenGLParallaxMapRenderer.o COpenGLShaderMaterialRenderer.o COpenGLTexture.o COpenGLSLMaterialRenderer.o COpenGLExtensionHandler.o CD3D8Driver.o CD3D8NormalMapRenderer.o CD3D8ParallaxMapRenderer.o CD3D8ShaderMaterialRenderer.o CD3D8Texture.o CD3D9Driver.o CD3D9HLSLMaterialRenderer.o CD3D9NormalMapRenderer.o CD3D9ParallaxMapRenderer.o CD3D9ShaderMaterialRenderer.o CD3D9Texture.o +IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderDDS.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPNG.o CImageLoaderPSD.o CImageLoaderTGA.o CImageLoaderPPM.o CImageLoaderWAL.o CImageLoaderRGB.o \ + CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o +IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ) +IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o +IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o +IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o +IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o +ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o +JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o jpeglib/jcarith.o jpeglib/jdarith.o jpeglib/jaricom.o +LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o +LIBAESGM = aesGladman/aescrypt.o aesGladman/aeskey.o aesGladman/aestab.o aesGladman/fileenc.o aesGladman/hmac.o aesGladman/prng.o aesGladman/pwd2key.o aesGladman/sha1.o aesGladman/sha2.o +BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/bzcompress.o bzip2/decompress.o bzip2/bzlib.o + +# Next variable is for additional scene nodes etc. of customized Irrlicht versions +EXTRAOBJ = +# onefang changes start +#LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \ +# $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \ +# $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \ +# $(BZIP2OBJ) $(EXTRAOBJ) +LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) $(LIBAESGM) $(EXTRAOBJ) +# onefang changes end + +############### +#Compiler flags +# onefang changes start +#CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng +#CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 +CXXINCS = -I../../include +CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 -DNO_IRR_COMPILE_WITH_GUI_=1 -DNO_IRR_USE_NON_SYSTEM_JPEG_LIB_=1 -DNO_IRR_USE_NON_SYSTEM_LIB_PNG_=1 -DNO_IRR_USE_NON_SYSTEM_BZIP2_=1 -DNO_IRR_USE_NON_SYSTEM_ZLIB_=1 +# onefang changes end +CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing +ifndef NDEBUG +CXXFLAGS += -g -D_DEBUG +else +CXXFLAGS += -fexpensive-optimizations -O3 +endif +ifdef PROFILE +CXXFLAGS += -pg +endif +CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES + +sharedlib sharedlib_osx: CXXFLAGS += -fPIC +sharedlib sharedlib_osx: CFLAGS += -fPIC + +#multilib handling +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +#Linux specific options +staticlib sharedlib install: SYSTEM = Linux +STATIC_LIB = libIrrlicht.a +LIB_PATH = ../../lib/$(SYSTEM) +INSTALL_DIR = /usr/local/lib +sharedlib install: SHARED_LIB = libIrrlicht.so +sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm +staticlib sharedlib: CXXINCS += -I/usr/X11R6/include + +#OSX specific options +staticlib_osx sharedlib_osx install_osx: SYSTEM = MacOSX +staticlib_osx sharedlib_osx: IRROTHEROBJ += MacOSX/CIrrDeviceMacOSX.o MacOSX/OSXClipboard.o MacOSX/AppDelegate.o +staticlib_osx sharedlib_osx: CXXINCS += -IMacOSX -I/usr/X11R6/include +sharedlib_osx install_osx: SHARED_LIB = libIrrlicht.dylib +staticlib_osx sharedlib_osx: LDFLAGS += --no-export-all-symbols --add-stdcall-alias +sharedlib_osx: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm +# for non-X11 app +#sharedlib_osx: LDFLAGS += -framework cocoa -framework carbon -framework opengl -framework IOKit + +#Windows specific options +IRRLICHT_DLL := ../../bin/Win32-gcc/Irrlicht.dll +sharedlib_win32 staticlib_win32: SYSTEM = Win32-gcc +sharedlib_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -Wl,--add-stdcall-alias +#choose either -DIRR_COMPILE_WITH_DX9_DEV_PACK or -DNO_IRR_COMPILE_WITH_DIRECT3D_9_ depending if you need dx9 +#sharedlib_win32 staticlib_win32: CPPFLAGS += -DIRR_COMPILE_WITH_DX9_DEV_PACK +sharedlib_win32 staticlib_win32: CPPFLAGS += -DNO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ -DNO_IRR_COMPILE_WITH_DIRECT3D_9_ +sharedlib_win32 staticlib_win32: CPPFLAGS += -DIRR_COMPILE_WITH_DX9_DEV_PACK -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL +staticlib_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ + +VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE) +SHARED_FULLNAME = $(SHARED_LIB).$(VERSION) +SONAME = $(SHARED_LIB).$(VERSION_MAJOR).$(VERSION_MINOR) + +#################### +# All target, builds Irrlicht as static lib (libIrrlicht.a) and copies it into lib/Linux +all linux: staticlib + +# Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into lib/Linux +sharedlib: $(LINKOBJ) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SONAME) -o $(SHARED_FULLNAME) $^ $(LDFLAGS) + mkdir -p $(LIB_PATH) + cp $(SHARED_FULLNAME) $(LIB_PATH) + +# Builds Irrlicht as static lib (libIrrlicht.a) +$(STATIC_LIB): $(LINKOBJ) + $(AR) rs $@ $^ + +# Copies static lib into lib/Linux +staticlib staticlib_osx: $(STATIC_LIB) + mkdir -p $(LIB_PATH) + cp $^ $(LIB_PATH) + +# Builds Irrlicht as dll (Irrlicht.dll) into ../../bin/Win32-gcc +all_win32 win32: sharedlib_win32 +sharedlib_win32: $(IRRLICHT_DLL) +../../bin/Win32-gcc/Irrlicht.dll: $(LINKOBJ) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -o $@ $^ $(LDFLAGS) -Wl,--out-implib,../../lib/Win32-gcc/$(STATIC_LIB) +# Copies static lib into /lib/Win32-gcc +staticlib_win32: $(STATIC_LIB) + cp $^ $(LIB_PATH) + +# Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into /lib/MacOSX +sharedlib_osx: $(LINKOBJ) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $(SHARED_FULLNAME) $^ $(LDFLAGS) + cp $(SHARED_FULLNAME) $(LIB_PATH) + +# Installs Irrlicht if it was created as shared lib +install install_osx: + $(RM) -r $(INSTALL_DIR)/../include/irrlicht + mkdir -p $(INSTALL_DIR)/../include/irrlicht + cp ../../include/*.h $(INSTALL_DIR)/../include/irrlicht/ + cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR) + cd $(INSTALL_DIR) && ln -s -f $(SHARED_FULLNAME) $(SONAME) + cd $(INSTALL_DIR) && ln -s -f $(SONAME) $(SHARED_LIB) +# ldconfig -n $(INSTALL_DIR) + +TAGS: + ctags *.cpp ../../include/*.h *.h + +# Create dependency files for automatic recompilation +%.d:%.cpp + $(CXX) $(CPPFLAGS) -MM -MF $@ $< + +# Create dependency files for automatic recompilation +%.d:%.c + $(CC) $(CPPFLAGS) -MM -MF $@ $< + +# Create object files from objective-c code +%.o:%.mm + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + +ifneq ($(MAKECMDGOALS),clean) +-include $(LINKOBJ:.o=.d) +endif + +help: + @echo "Available targets for Irrlicht" + @echo " sharedlib: Build shared library Irrlicht.so for Linux" + @echo " staticlib: Build static library Irrlicht.a for Linux" + @echo " install: Copy shared library to /usr/local/lib" + @echo "" + @echo " sharedlib_win32: Build shared library Irrlicht.dll for Windows" + @echo " staticlib_win32: Build static library Irrlicht.a for Windows" + @echo "" + @echo " clean: Clean up directory" + +# Cleans all temporary files and compilation results. +clean: + $(RM) $(LINKOBJ) $(SHARED_FULLNAME) $(STATIC_LIB) $(LINKOBJ:.o=.d) + +.PHONY: all sharedlib staticlib sharedlib_win32 staticlib_win32 help install clean + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/Octree.h b/src/others/irrlicht-1.8.1/source/Irrlicht/Octree.h new file mode 100644 index 0000000..2bb879d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/Octree.h @@ -0,0 +1,388 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_OCTREE_H_INCLUDED__ +#define __C_OCTREE_H_INCLUDED__ + +#include "SViewFrustum.h" +#include "S3DVertex.h" +#include "aabbox3d.h" +#include "irrArray.h" +#include "CMeshBuffer.h" + +/** + Flags for Octree +*/ +//! use meshbuffer for drawing, enables VBO usage +#define OCTREE_USE_HARDWARE false +//! use visibility information together with VBOs +#define OCTREE_USE_VISIBILITY true +//! use bounding box or frustum for calculate polys +#define OCTREE_BOX_BASED true +//! bypass full invisible/visible test +#define OCTREE_PARENTTEST + +namespace irr +{ + +//! template octree. +/** T must be a vertex type which has a member +called .Pos, which is a core::vertex3df position. */ +template <class T> +class Octree +{ +public: + + struct SMeshChunk : public scene::CMeshBuffer<T> + { + SMeshChunk () + : scene::CMeshBuffer<T>(), MaterialId(0) + { + scene::CMeshBuffer<T>::grab(); + } + + virtual ~SMeshChunk () + { + //removeAllHardwareBuffers + } + + s32 MaterialId; + }; + + struct SIndexChunk + { + core::array<u16> Indices; + s32 MaterialId; + }; + + struct SIndexData + { + u16* Indices; + s32 CurrentSize; + s32 MaxSize; + }; + + + //! Constructor + Octree(const core::array<SMeshChunk>& meshes, s32 minimalPolysPerNode=128) : + IndexData(0), IndexDataCount(meshes.size()), NodeCount(0) + { + IndexData = new SIndexData[IndexDataCount]; + + // construct array of all indices + + core::array<SIndexChunk>* indexChunks = new core::array<SIndexChunk>; + indexChunks->reallocate(meshes.size()); + for (u32 i=0; i!=meshes.size(); ++i) + { + IndexData[i].CurrentSize = 0; + IndexData[i].MaxSize = meshes[i].Indices.size(); + IndexData[i].Indices = new u16[IndexData[i].MaxSize]; + + indexChunks->push_back(SIndexChunk()); + SIndexChunk& tic = indexChunks->getLast(); + + tic.MaterialId = meshes[i].MaterialId; + tic.Indices = meshes[i].Indices; + } + + // create tree + Root = new OctreeNode(NodeCount, 0, meshes, indexChunks, minimalPolysPerNode); + } + + //! returns all ids of polygons partially or fully enclosed + //! by this bounding box. + void calculatePolys(const core::aabbox3d<f32>& box) + { + for (u32 i=0; i!=IndexDataCount; ++i) + IndexData[i].CurrentSize = 0; + + Root->getPolys(box, IndexData, 0); + } + + //! returns all ids of polygons partially or fully enclosed + //! by a view frustum. + void calculatePolys(const scene::SViewFrustum& frustum) + { + for (u32 i=0; i!=IndexDataCount; ++i) + IndexData[i].CurrentSize = 0; + + Root->getPolys(frustum, IndexData, 0); + } + + const SIndexData* getIndexData() const + { + return IndexData; + } + + u32 getIndexDataCount() const + { + return IndexDataCount; + } + + u32 getNodeCount() const + { + return NodeCount; + } + + //! for debug purposes only, collects the bounding boxes of the tree + void getBoundingBoxes(const core::aabbox3d<f32>& box, + core::array< const core::aabbox3d<f32>* >&outBoxes) const + { + Root->getBoundingBoxes(box, outBoxes); + } + + //! destructor + ~Octree() + { + for (u32 i=0; i<IndexDataCount; ++i) + delete [] IndexData[i].Indices; + + delete [] IndexData; + delete Root; + } + +private: + // private inner class + class OctreeNode + { + public: + + // constructor + OctreeNode(u32& nodeCount, u32 currentdepth, + const core::array<SMeshChunk>& allmeshdata, + core::array<SIndexChunk>* indices, + s32 minimalPolysPerNode) : IndexData(0), + Depth(currentdepth+1) + { + ++nodeCount; + + u32 i; // new ISO for scoping problem with different compilers + + for (i=0; i!=8; ++i) + Children[i] = 0; + + if (indices->empty()) + { + delete indices; + return; + } + + bool found = false; + + // find first point for bounding box + + for (i=0; i<indices->size(); ++i) + { + if (!(*indices)[i].Indices.empty()) + { + Box.reset(allmeshdata[i].Vertices[(*indices)[i].Indices[0]].Pos); + found = true; + break; + } + } + + if (!found) + { + delete indices; + return; + } + + s32 totalPrimitives = 0; + + // now lets calculate our bounding box + for (i=0; i<indices->size(); ++i) + { + totalPrimitives += (*indices)[i].Indices.size(); + for (u32 j=0; j<(*indices)[i].Indices.size(); ++j) + Box.addInternalPoint(allmeshdata[i].Vertices[(*indices)[i].Indices[j]].Pos); + } + + core::vector3df middle = Box.getCenter(); + core::vector3df edges[8]; + Box.getEdges(edges); + + // calculate all children + core::aabbox3d<f32> box; + core::array<u16> keepIndices; + + if (totalPrimitives > minimalPolysPerNode && !Box.isEmpty()) + for (u32 ch=0; ch!=8; ++ch) + { + box.reset(middle); + box.addInternalPoint(edges[ch]); + + // create indices for child + bool added = false; + core::array<SIndexChunk>* cindexChunks = new core::array<SIndexChunk>; + cindexChunks->reallocate(allmeshdata.size()); + for (i=0; i<allmeshdata.size(); ++i) + { + cindexChunks->push_back(SIndexChunk()); + SIndexChunk& tic = cindexChunks->getLast(); + tic.MaterialId = allmeshdata[i].MaterialId; + + for (u32 t=0; t<(*indices)[i].Indices.size(); t+=3) + { + if (box.isPointInside(allmeshdata[i].Vertices[(*indices)[i].Indices[t]].Pos) && + box.isPointInside(allmeshdata[i].Vertices[(*indices)[i].Indices[t+1]].Pos) && + box.isPointInside(allmeshdata[i].Vertices[(*indices)[i].Indices[t+2]].Pos)) + { + tic.Indices.push_back((*indices)[i].Indices[t]); + tic.Indices.push_back((*indices)[i].Indices[t+1]); + tic.Indices.push_back((*indices)[i].Indices[t+2]); + + added = true; + } + else + { + keepIndices.push_back((*indices)[i].Indices[t]); + keepIndices.push_back((*indices)[i].Indices[t+1]); + keepIndices.push_back((*indices)[i].Indices[t+2]); + } + } + + (*indices)[i].Indices.set_used(keepIndices.size()); + memcpy( (*indices)[i].Indices.pointer(), keepIndices.pointer(), keepIndices.size()*sizeof(u16)); + keepIndices.set_used(0); + } + + if (added) + Children[ch] = new OctreeNode(nodeCount, Depth, + allmeshdata, cindexChunks, minimalPolysPerNode); + else + delete cindexChunks; + + } // end for all possible children + + IndexData = indices; + } + + // destructor + ~OctreeNode() + { + delete IndexData; + + for (u32 i=0; i<8; ++i) + delete Children[i]; + } + + // returns all ids of polygons partially or full enclosed + // by this bounding box. + void getPolys(const core::aabbox3d<f32>& box, SIndexData* idxdata, u32 parentTest ) const + { +#if defined (OCTREE_PARENTTEST ) + // if not full inside + if ( parentTest != 2 ) + { + // partially inside ? + if (!Box.intersectsWithBox(box)) + return; + + // fully inside ? + parentTest = Box.isFullInside(box)?2:1; + } +#else + if (Box.intersectsWithBox(box)) +#endif + { + const u32 cnt = IndexData->size(); + u32 i; // new ISO for scoping problem in some compilers + + for (i=0; i<cnt; ++i) + { + const s32 idxcnt = (*IndexData)[i].Indices.size(); + + if (idxcnt) + { + memcpy(&idxdata[i].Indices[idxdata[i].CurrentSize], + &(*IndexData)[i].Indices[0], idxcnt * sizeof(s16)); + idxdata[i].CurrentSize += idxcnt; + } + } + + for (i=0; i!=8; ++i) + if (Children[i]) + Children[i]->getPolys(box, idxdata,parentTest); + } + } + + // returns all ids of polygons partially or full enclosed + // by the view frustum. + void getPolys(const scene::SViewFrustum& frustum, SIndexData* idxdata,u32 parentTest) const + { + u32 i; // new ISO for scoping problem in some compilers + + // if parent is fully inside, no further check for the children is needed +#if defined (OCTREE_PARENTTEST ) + if ( parentTest != 2 ) +#endif + { +#if defined (OCTREE_PARENTTEST ) + parentTest = 2; +#endif + for (i=0; i!=scene::SViewFrustum::VF_PLANE_COUNT; ++i) + { + core::EIntersectionRelation3D r = Box.classifyPlaneRelation(frustum.planes[i]); + if ( r == core::ISREL3D_FRONT ) + return; +#if defined (OCTREE_PARENTTEST ) + if ( r == core::ISREL3D_CLIPPED ) + parentTest = 1; // must still check children +#endif + } + } + + + const u32 cnt = IndexData->size(); + + for (i=0; i!=cnt; ++i) + { + s32 idxcnt = (*IndexData)[i].Indices.size(); + + if (idxcnt) + { + memcpy(&idxdata[i].Indices[idxdata[i].CurrentSize], + &(*IndexData)[i].Indices[0], idxcnt * sizeof(s16)); + idxdata[i].CurrentSize += idxcnt; + } + } + + for (i=0; i!=8; ++i) + if (Children[i]) + Children[i]->getPolys(frustum, idxdata,parentTest); + } + + //! for debug purposes only, collects the bounding boxes of the node + void getBoundingBoxes(const core::aabbox3d<f32>& box, + core::array< const core::aabbox3d<f32>* >&outBoxes) const + { + if (Box.intersectsWithBox(box)) + { + outBoxes.push_back(&Box); + + for (u32 i=0; i!=8; ++i) + if (Children[i]) + Children[i]->getBoundingBoxes(box, outBoxes); + } + } + + private: + + core::aabbox3df Box; + core::array<SIndexChunk>* IndexData; + OctreeNode* Children[8]; + u32 Depth; + }; + + OctreeNode* Root; + SIndexData* IndexData; + u32 IndexDataCount; + u32 NodeCount; +}; + +} // end namespace + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/S2DVertex.h b/src/others/irrlicht-1.8.1/source/Irrlicht/S2DVertex.h new file mode 100644 index 0000000..f6f6a88 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/S2DVertex.h @@ -0,0 +1,30 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_K_2D_VERTEX_H_INCLUDED__ +#define __S_K_2D_VERTEX_H_INCLUDED__ + +#include "vector2d.h" + +typedef signed short TZBufferType; + +namespace irr +{ +namespace video +{ + + struct S2DVertex + { + core::vector2d<s32> Pos; // position + core::vector2d<s32> TCoords; // texture coordinates + TZBufferType ZValue; // zvalue + u16 Color; + }; + + +} // end namespace video +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/S4DVertex.h b/src/others/irrlicht-1.8.1/source/Irrlicht/S4DVertex.h new file mode 100644 index 0000000..3b80919 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/S4DVertex.h @@ -0,0 +1,693 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + + +#ifndef __S_4D_VERTEX_H_INCLUDED__ +#define __S_4D_VERTEX_H_INCLUDED__ + +#include "SoftwareDriver2_compile_config.h" +#include "SoftwareDriver2_helper.h" +#include "irrAllocator.h" + +namespace irr +{ + +namespace video +{ + +struct sVec2 +{ + f32 x; + f32 y; + + sVec2 () {} + + sVec2 ( f32 s) : x ( s ), y ( s ) {} + sVec2 ( f32 _x, f32 _y ) + : x ( _x ), y ( _y ) {} + + void set ( f32 _x, f32 _y ) + { + x = _x; + y = _y; + } + + // f = a * t + b * ( 1 - t ) + void interpolate(const sVec2& a, const sVec2& b, const f32 t) + { + x = b.x + ( ( a.x - b.x ) * t ); + y = b.y + ( ( a.y - b.y ) * t ); + } + + sVec2 operator-(const sVec2& other) const + { + return sVec2(x - other.x, y - other.y); + } + + sVec2 operator+(const sVec2& other) const + { + return sVec2(x + other.x, y + other.y); + } + + void operator+=(const sVec2& other) + { + x += other.x; + y += other.y; + } + + sVec2 operator*(const f32 s) const + { + return sVec2(x * s , y * s); + } + + void operator*=( const f32 s) + { + x *= s; + y *= s; + } + + void operator=(const sVec2& other) + { + x = other.x; + y = other.y; + } + +}; + +// A8R8G8B8 +struct sVec4; +struct sCompressedVec4 +{ + u32 argb; + + void setA8R8G8B8 ( u32 value ) + { + argb = value; + } + + void setColorf ( const video::SColorf & color ) + { + argb = core::floor32 ( color.a * 255.f ) << 24 | + core::floor32 ( color.r * 255.f ) << 16 | + core::floor32 ( color.g * 255.f ) << 8 | + core::floor32 ( color.b * 255.f ); + } + + void setVec4 ( const sVec4 & v ); + + // f = a * t + b * ( 1 - t ) + void interpolate(const sCompressedVec4& a, const sCompressedVec4& b, const f32 t) + { + argb = PixelBlend32 ( b.argb, a.argb, core::floor32 ( t * 256.f ) ); + } + + +}; + + +struct sVec4 +{ + union + { + struct { f32 x, y, z, w; }; + struct { f32 a, r, g, b; }; +// struct { sVec2 xy, zw; }; // sorry, this does not compile with gcc + }; + + + + sVec4 () {} + + sVec4 ( f32 s) : x ( s ), y ( s ), z ( s ), w ( s ) {} + + sVec4 ( f32 _x, f32 _y, f32 _z, f32 _w ) + : x ( _x ), y ( _y ), z( _z ), w ( _w ){} + + void set ( f32 _x, f32 _y, f32 _z, f32 _w ) + { + x = _x; + y = _y; + z = _z; + w = _w; + } + + void setA8R8G8B8 ( u32 argb ) + { + x = ( ( argb & 0xFF000000 ) >> 24 ) * ( 1.f / 255.f ); + y = ( ( argb & 0x00FF0000 ) >> 16 ) * ( 1.f / 255.f ); + z = ( ( argb & 0x0000FF00 ) >> 8 ) * ( 1.f / 255.f ); + w = ( ( argb & 0x000000FF ) ) * ( 1.f / 255.f ); + } + + + void setColorf ( const video::SColorf & color ) + { + x = color.a; + y = color.r; + z = color.g; + w = color.b; + } + + + // f = a * t + b * ( 1 - t ) + void interpolate(const sVec4& a, const sVec4& b, const f32 t) + { + x = b.x + ( ( a.x - b.x ) * t ); + y = b.y + ( ( a.y - b.y ) * t ); + z = b.z + ( ( a.z - b.z ) * t ); + w = b.w + ( ( a.w - b.w ) * t ); + } + + + f32 dotProduct(const sVec4& other) const + { + return x*other.x + y*other.y + z*other.z + w*other.w; + } + + f32 dot_xyz( const sVec4& other) const + { + return x*other.x + y*other.y + z*other.z; + } + + f32 get_length_xyz_square () const + { + return x * x + y * y + z * z; + } + + f32 get_length_xyz () const + { + return core::squareroot ( x * x + y * y + z * z ); + } + + void normalize_xyz () + { + const f32 l = core::reciprocal_squareroot ( x * x + y * y + z * z ); + + x *= l; + y *= l; + z *= l; + } + + void project_xyz () + { + w = core::reciprocal ( w ); + x *= w; + y *= w; + z *= w; + } + + sVec4 operator-(const sVec4& other) const + { + return sVec4(x - other.x, y - other.y, z - other.z,w - other.w); + } + + sVec4 operator+(const sVec4& other) const + { + return sVec4(x + other.x, y + other.y, z + other.z,w + other.w); + } + + void operator+=(const sVec4& other) + { + x += other.x; + y += other.y; + z += other.z; + w += other.w; + } + + sVec4 operator*(const f32 s) const + { + return sVec4(x * s , y * s, z * s,w * s); + } + + sVec4 operator*(const sVec4 &other) const + { + return sVec4(x * other.x , y * other.y, z * other.z,w * other.w); + } + + void mulReciprocal ( f32 s ) + { + const f32 i = core::reciprocal ( s ); + x = (f32) ( x * i ); + y = (f32) ( y * i ); + z = (f32) ( z * i ); + w = (f32) ( w * i ); + } + + void mul ( const f32 s ) + { + x *= s; + y *= s; + z *= s; + w *= s; + } + +/* + void operator*=(f32 s) + { + x *= s; + y *= s; + z *= s; + w *= s; + } +*/ + void operator*=(const sVec4 &other) + { + x *= other.x; + y *= other.y; + z *= other.z; + w *= other.w; + } + + void operator=(const sVec4& other) + { + x = other.x; + y = other.y; + z = other.z; + w = other.w; + } +}; + +struct sVec3 +{ + union + { + struct { f32 r, g, b; }; + struct { f32 x, y, z; }; + }; + + + sVec3 () {} + sVec3 ( f32 _x, f32 _y, f32 _z ) + : r ( _x ), g ( _y ), b( _z ) {} + + sVec3 ( const sVec4 &v ) + : r ( v.x ), g ( v.y ), b( v.z ) {} + + void set ( f32 _r, f32 _g, f32 _b ) + { + r = _r; + g = _g; + b = _b; + } + + void setR8G8B8 ( u32 argb ) + { + r = ( ( argb & 0x00FF0000 ) >> 16 ) * ( 1.f / 255.f ); + g = ( ( argb & 0x0000FF00 ) >> 8 ) * ( 1.f / 255.f ); + b = ( ( argb & 0x000000FF ) ) * ( 1.f / 255.f ); + } + + void setColorf ( const video::SColorf & color ) + { + r = color.r; + g = color.g; + b = color.b; + } + + void add (const sVec3& other) + { + r += other.r; + g += other.g; + b += other.b; + } + + void mulAdd(const sVec3& other, const f32 v) + { + r += other.r * v; + g += other.g * v; + b += other.b * v; + } + + void mulAdd(const sVec3& v0, const sVec3& v1) + { + r += v0.r * v1.r; + g += v0.g * v1.g; + b += v0.b * v1.b; + } + + void saturate ( sVec4 &dest, u32 argb ) + { + dest.x = ( ( argb & 0xFF000000 ) >> 24 ) * ( 1.f / 255.f ); + dest.y = core::min_ ( r, 1.f ); + dest.z = core::min_ ( g, 1.f ); + dest.w = core::min_ ( b, 1.f ); + } + + // f = a * t + b * ( 1 - t ) + void interpolate(const sVec3& v0, const sVec3& v1, const f32 t) + { + r = v1.r + ( ( v0.r - v1.r ) * t ); + g = v1.g + ( ( v0.g - v1.g ) * t ); + b = v1.b + ( ( v0.b - v1.b ) * t ); + } + + sVec3 operator-(const sVec3& other) const + { + return sVec3(r - other.r, b - other.b, g - other.g); + } + + sVec3 operator+(const sVec3& other) const + { + return sVec3(r + other.r, g + other.g, b + other.b); + } + + sVec3 operator*(const f32 s) const + { + return sVec3(r * s , g * s, b * s); + } + + sVec3 operator/(const f32 s) const + { + f32 inv = 1.f / s; + return sVec3(r * inv , g * inv, b * inv); + } + + sVec3 operator*(const sVec3 &other) const + { + return sVec3(r * other.r , b * other.b, g * other.g); + } + + void operator+=(const sVec3& other) + { + r += other.r; + g += other.g; + b += other.b; + } + + void setLength ( f32 len ) + { + const f32 l = len * core::reciprocal_squareroot ( r * r + g * g + b * b ); + + r *= l; + g *= l; + b *= l; + } + +}; + + + +inline void sCompressedVec4::setVec4 ( const sVec4 & v ) +{ + argb = core::floor32 ( v.x * 255.f ) << 24 | + core::floor32 ( v.y * 255.f ) << 16 | + core::floor32 ( v.z * 255.f ) << 8 | + core::floor32 ( v.w * 255.f ); +} + + +enum e4DVertexFlag +{ + VERTEX4D_INSIDE = 0x0000003F, + VERTEX4D_CLIPMASK = 0x0000003F, + VERTEX4D_PROJECTED = 0x00000100, + + VERTEX4D_FORMAT_MASK = 0xFFFF0000, + + VERTEX4D_FORMAT_MASK_TEXTURE = 0x000F0000, + VERTEX4D_FORMAT_TEXTURE_1 = 0x00010000, + VERTEX4D_FORMAT_TEXTURE_2 = 0x00020000, + VERTEX4D_FORMAT_TEXTURE_3 = 0x00030000, + VERTEX4D_FORMAT_TEXTURE_4 = 0x00040000, + + VERTEX4D_FORMAT_MASK_COLOR = 0x00F00000, + VERTEX4D_FORMAT_COLOR_1 = 0x00100000, + VERTEX4D_FORMAT_COLOR_2 = 0x00200000, + + VERTEX4D_FORMAT_MASK_BUMP = 0x0F000000, + VERTEX4D_FORMAT_BUMP_DOT3 = 0x01000000, + +}; + +const u32 MATERIAL_MAX_COLORS = 1; +const u32 BURNING_MATERIAL_MAX_TEXTURES = 2; +const u32 BURNING_MATERIAL_MAX_TANGENT = 1; + +// dummy Vertex. used for calculation vertex memory size +struct s4DVertex_proxy +{ + u32 flag; + sVec4 Pos; + sVec2 Tex[BURNING_MATERIAL_MAX_TEXTURES]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + sVec4 Color[MATERIAL_MAX_COLORS]; +#endif + + sVec3 LightTangent[BURNING_MATERIAL_MAX_TANGENT]; + +}; + +#define SIZEOF_SVERTEX 64 +#define SIZEOF_SVERTEX_LOG2 6 + +/*! + Internal BurningVideo Vertex +*/ +struct s4DVertex +{ + u32 flag; + + sVec4 Pos; + sVec2 Tex[ BURNING_MATERIAL_MAX_TEXTURES ]; + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + sVec4 Color[ MATERIAL_MAX_COLORS ]; +#endif + + sVec3 LightTangent[BURNING_MATERIAL_MAX_TANGENT]; + + //u8 fill [ SIZEOF_SVERTEX - sizeof (s4DVertex_proxy) ]; + + // f = a * t + b * ( 1 - t ) + void interpolate(const s4DVertex& b, const s4DVertex& a, const f32 t) + { + u32 i; + u32 size; + + Pos.interpolate ( a.Pos, b.Pos, t ); + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + size = (flag & VERTEX4D_FORMAT_MASK_COLOR) >> 20; + for ( i = 0; i!= size; ++i ) + { + Color[i].interpolate ( a.Color[i], b.Color[i], t ); + } +#endif + + size = (flag & VERTEX4D_FORMAT_MASK_TEXTURE) >> 16; + for ( i = 0; i!= size; ++i ) + { + Tex[i].interpolate ( a.Tex[i], b.Tex[i], t ); + } + + size = (flag & VERTEX4D_FORMAT_MASK_BUMP) >> 24; + for ( i = 0; i!= size; ++i ) + { + LightTangent[i].interpolate ( a.LightTangent[i], b.LightTangent[i], t ); + } + + } +}; + +// ----------------- Vertex Cache --------------------------- + +struct SAlignedVertex +{ + SAlignedVertex ( u32 element, u32 aligned ) + : ElementSize ( element ) + { + u32 byteSize = (ElementSize << SIZEOF_SVERTEX_LOG2 ) + aligned; + mem = new u8 [ byteSize ]; + data = (s4DVertex*) mem; + } + + virtual ~SAlignedVertex () + { + delete [] mem; + } + + s4DVertex *data; + u8 *mem; + u32 ElementSize; +}; + + +// hold info for different Vertex Types +struct SVSize +{ + u32 Format; + u32 Pitch; + u32 TexSize; +}; + + +// a cache info +struct SCacheInfo +{ + u32 index; + u32 hit; +}; + +#define VERTEXCACHE_ELEMENT 16 +#define VERTEXCACHE_MISS 0xFFFFFFFF +struct SVertexCache +{ + SVertexCache (): mem ( VERTEXCACHE_ELEMENT * 2, 128 ) {} + + SCacheInfo info[VERTEXCACHE_ELEMENT]; + + + // Transformed and lite, clipping state + // + Clipped, Projected + SAlignedVertex mem; + + // source + const void* vertices; + u32 vertexCount; + + const void* indices; + u32 indexCount; + u32 indicesIndex; + + u32 indicesRun; + + // primitives consist of x vertices + u32 primitivePitch; + + u32 vType; //E_VERTEX_TYPE + u32 pType; //scene::E_PRIMITIVE_TYPE + u32 iType; //E_INDEX_TYPE iType + +}; + + +// swap 2 pointer +REALINLINE void swapVertexPointer(const s4DVertex** v1, const s4DVertex** v2) +{ + const s4DVertex* b = *v1; + *v1 = *v2; + *v2 = b; +} + + +// ------------------------ Internal Scanline Rasterizer ----------------------------- + + + +// internal scan convert +struct sScanConvertData +{ + u8 left; // major edge left/right + u8 right; // !left + + f32 invDeltaY[3]; // inverse edge delta y + + f32 x[2]; // x coordinate + f32 slopeX[2]; // x slope along edges + +#if defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) || defined ( SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT ) + f32 w[2]; // w coordinate + fp24 slopeW[2]; // w slope along edges +#else + f32 z[2]; // z coordinate + f32 slopeZ[2]; // z slope along edges +#endif + + sVec4 c[MATERIAL_MAX_COLORS][2]; // color + sVec4 slopeC[MATERIAL_MAX_COLORS][2]; // color slope along edges + + sVec2 t[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture + sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture slope along edges + + sVec3 l[BURNING_MATERIAL_MAX_TANGENT][2]; // Light Tangent + sVec3 slopeL[BURNING_MATERIAL_MAX_TEXTURES][2]; // tanget slope along edges +}; + +// passed to scan Line +struct sScanLineData +{ + s32 y; // y position of scanline + f32 x[2]; // x start, x end of scanline + +#if defined ( SOFTWARE_DRIVER_2_USE_WBUFFER ) || defined ( SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT ) + f32 w[2]; // w start, w end of scanline +#else + f32 z[2]; // z start, z end of scanline +#endif + +#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + sVec4 c[MATERIAL_MAX_COLORS][2]; // color start, color end of scanline +#endif + + sVec2 t[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture start, texture end of scanline + sVec3 l[BURNING_MATERIAL_MAX_TANGENT][2]; // Light Tangent start, end +}; + +// passed to pixel Shader +struct sPixelShaderData +{ + tVideoSample *dst; + fp24 *z; + + s32 xStart; + s32 xEnd; + s32 dx; + s32 i; +}; + +/* + load a color value +*/ +inline void getTexel_plain2 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sVec4 &v + ) +{ + r = tofix ( v.y ); + g = tofix ( v.z ); + b = tofix ( v.w ); +} + +/* + load a color value +*/ +inline void getSample_color ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sVec4 &v + ) +{ + a = tofix ( v.x ); + r = tofix ( v.y, COLOR_MAX * FIX_POINT_F32_MUL); + g = tofix ( v.z, COLOR_MAX * FIX_POINT_F32_MUL); + b = tofix ( v.w, COLOR_MAX * FIX_POINT_F32_MUL); +} + +/* + load a color value +*/ +inline void getSample_color ( tFixPoint &r, tFixPoint &g, tFixPoint &b,const sVec4 &v ) +{ + r = tofix ( v.y, COLOR_MAX * FIX_POINT_F32_MUL); + g = tofix ( v.z, COLOR_MAX * FIX_POINT_F32_MUL); + b = tofix ( v.w, COLOR_MAX * FIX_POINT_F32_MUL); +} + +/* + load a color value +*/ +inline void getSample_color ( tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sVec4 &v, const f32 mulby ) +{ + r = tofix ( v.y, mulby); + g = tofix ( v.z, mulby); + b = tofix ( v.w, mulby); +} + + + +} + +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/SConstruct b/src/others/irrlicht-1.8.1/source/Irrlicht/SConstruct new file mode 100644 index 0000000..1117fef --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/SConstruct @@ -0,0 +1,102 @@ +import os +import sys + +USE_GCC = 1; +NDEBUG = 1; +PROFILE = 0; + +APPLICATION_NAME = 'Irrlicht'; +LIBRARIES = ['gdi32', 'opengl32', 'd3dx9d', 'winmm']; +if USE_GCC==1 and PROFILE==1: + LIBRARIES += ['gmon']; + +CXXINCS = ['../../include/', 'zlib/', 'jpeglib/', 'libpng/']; + +if USE_GCC==0: + env = Environment(ENV = { + 'PATH': os.environ['PATH'] + }, CPPPATH=CXXINCS); +else: + env = Environment(ENV = { + 'PATH': os.environ['PATH'] + }, tools = ['mingw'], CPPPATH=CXXINCS); + +IRRMESHLOADER = ['CBSPMeshFileLoader.cpp', 'CMD2MeshFileLoader.cpp', 'CMD3MeshFileLoader.cpp', 'CMS3DMeshFileLoader.cpp', 'CB3DMeshFileLoader.cpp', 'C3DSMeshFileLoader.cpp', 'COgreMeshFileLoader.cpp', 'COBJMeshFileLoader.cpp', 'CColladaFileLoader.cpp', 'CCSMLoader.cpp', 'CDMFLoader.cpp', 'CLMTSMeshFileLoader.cpp', 'CMY3DMeshFileLoader.cpp', 'COCTLoader.cpp', 'CXMeshFileLoader.cpp', 'CIrrMeshFileLoader.cpp', 'CSTLMeshFileLoader.cpp', 'CLWOMeshFileLoader.cpp']; + +IRRMESHWRITER = ['CColladaMeshWriter.cpp', 'CIrrMeshWriter.cpp', 'COBJMeshWriter.cpp', 'CSTLMeshWriter.cpp']; + +IRRMESHOBJ = IRRMESHLOADER + IRRMESHWRITER + ['CSkinnedMesh.cpp', 'CBoneSceneNode.cpp', 'CMeshSceneNode.cpp', 'CAnimatedMeshSceneNode.cpp', 'CAnimatedMeshMD2.cpp', 'CAnimatedMeshMD3.cpp', 'CQ3LevelMesh.cpp', 'CQuake3ShaderSceneNode.cpp']; + +IRROBJ = ['CBillboardSceneNode.cpp', 'CCameraSceneNode.cpp', 'CDummyTransformationSceneNode.cpp', 'CEmptySceneNode.cpp', 'CGeometryCreator.cpp', 'CLightSceneNode.cpp', 'CMeshManipulator.cpp', 'CMetaTriangleSelector.cpp', 'COctreeSceneNode.cpp', 'COctreeTriangleSelector.cpp', 'CSceneCollisionManager.cpp', 'CSceneManager.cpp', 'CShadowVolumeSceneNode.cpp', 'CSkyBoxSceneNode.cpp', 'CSkyDomeSceneNode.cpp', 'CTerrainSceneNode.cpp', 'CTerrainTriangleSelector.cpp', 'CVolumeLightSceneNode.cpp', 'CCubeSceneNode.cpp', 'CSphereSceneNode.cpp', 'CTextSceneNode.cpp', 'CTriangleBBSelector.cpp', 'CTriangleSelector.cpp', 'CWaterSurfaceSceneNode.cpp', 'CMeshCache.cpp', 'CDefaultSceneNodeAnimatorFactory.cpp', 'CDefaultSceneNodeFactory.cpp']; + +IRRPARTICLEOBJ = ['CParticleAnimatedMeshSceneNodeEmitter.cpp', 'CParticleBoxEmitter.cpp', 'CParticleCylinderEmitter.cpp', 'CParticleMeshEmitter.cpp', 'CParticlePointEmitter.cpp', 'CParticleRingEmitter.cpp', 'CParticleSphereEmitter.cpp', 'CParticleAttractionAffector.cpp', 'CParticleFadeOutAffector.cpp', 'CParticleGravityAffector.cpp', 'CParticleRotationAffector.cpp', 'CParticleSystemSceneNode.cpp', 'CParticleScaleAffector.cpp']; + +IRRANIMOBJ = ['CSceneNodeAnimatorCameraFPS.cpp', 'CSceneNodeAnimatorCameraMaya.cpp', 'CSceneNodeAnimatorCollisionResponse.cpp', 'CSceneNodeAnimatorDelete.cpp', 'CSceneNodeAnimatorFlyCircle.cpp', 'CSceneNodeAnimatorFlyStraight.cpp', 'CSceneNodeAnimatorFollowSpline.cpp', 'CSceneNodeAnimatorRotation.cpp', 'CSceneNodeAnimatorTexture.cpp']; + +IRRDRVROBJ = ['CNullDriver.cpp', 'COpenGLDriver.cpp', 'COpenGLNormalMapRenderer.cpp', 'COpenGLParallaxMapRenderer.cpp', 'COpenGLShaderMaterialRenderer.cpp', 'COpenGLTexture.cpp', 'COpenGLSLMaterialRenderer.cpp', 'COpenGLExtensionHandler.cpp', 'CD3D8Driver.cpp', 'CD3D8NormalMapRenderer.cpp', 'CD3D8ParallaxMapRenderer.cpp', 'CD3D8ShaderMaterialRenderer.cpp', 'CD3D8Texture.cpp', 'CD3D9Driver.cpp', 'CD3D9HLSLMaterialRenderer.cpp', 'CD3D9NormalMapRenderer.cpp', 'CD3D9ParallaxMapRenderer.cpp', 'CD3D9ShaderMaterialRenderer.cpp', 'CD3D9Texture.cpp']; + +IRRIMAGEOBJ = ['CColorConverter.cpp', 'CImage.cpp', 'CImageLoaderBMP.cpp', 'CImageLoaderJPG.cpp', 'CImageLoaderPCX.cpp', 'CImageLoaderPNG.cpp', 'CImageLoaderPSD.cpp', 'CImageLoaderTGA.cpp', 'CImageLoaderPPM.cpp', 'CImageLoaderWAL.cpp', 'CImageWriterBMP.cpp', 'CImageWriterJPG.cpp', 'CImageWriterPCX.cpp', 'CImageWriterPNG.cpp', 'CImageWriterPPM.cpp', 'CImageWriterPSD.cpp', 'CImageWriterTGA.cpp']; + +IRRVIDEOOBJ = ['CVideoModeList.cpp', 'CFPSCounter.cpp'] + IRRDRVROBJ + IRRIMAGEOBJ; + +IRRSWRENDEROBJ = ['CSoftwareDriver.cpp', 'CSoftwareTexture.cpp', 'CTRFlat.cpp', 'CTRFlatWire.cpp', 'CTRGouraud.cpp', 'CTRGouraudWire.cpp', 'CTRTextureFlat.cpp', 'CTRTextureFlatWire.cpp', 'CTRTextureGouraud.cpp', 'CTRTextureGouraudAdd.cpp', 'CTRTextureGouraudNoZ.cpp', 'CTRTextureGouraudWire.cpp', 'CZBuffer.cpp', 'CTRTextureGouraudVertexAlpha2.cpp', 'CTRTextureGouraudNoZ2.cpp', 'CTRTextureLightMap2_M2.cpp', 'CTRTextureLightMap2_M4.cpp', 'CTRTextureLightMap2_M1.cpp', 'CSoftwareDriver2.cpp', 'CSoftwareTexture2.cpp', 'CTRTextureGouraud2.cpp', 'CTRGouraud2.cpp', 'CTRGouraudAlpha2.cpp', 'CTRGouraudAlphaNoZ2.cpp', 'CTRTextureDetailMap2.cpp', 'CTRTextureGouraudAdd2.cpp', 'CTRTextureGouraudAddNoZ2.cpp', 'CTRTextureWire2.cpp', 'CTRTextureLightMap2_Add.cpp', 'CTRTextureLightMapGouraud2_M4.cpp', 'IBurningShader.cpp', 'CTRTextureBlend.cpp', 'CTRTextureGouraudAlpha.cpp', 'CTRTextureGouraudAlphaNoZ.cpp', 'CDepthBuffer.cpp', 'CBurningShader_Raster_Reference.cpp']; + +IRRIOOBJ = ['CFileList.cpp', 'CFileSystem.cpp', 'CLimitReadFile.cpp', 'CMemoryReadFile.cpp', 'CReadFile.cpp', 'CWriteFile.cpp', 'CXMLReader.cpp', 'CXMLWriter.cpp', 'CZipReader.cpp', 'CPakReader.cpp', 'CNPKReader.cpp', 'irrXML.cpp', 'CAttributes.cpp', 'lzma/LzmaDec.c']; + +IRROTHEROBJ = ['CIrrDeviceSDL.cpp', 'CIrrDeviceLinux.cpp', 'CIrrDeviceStub.cpp', 'CIrrDeviceWin32.cpp', 'CLogger.cpp', 'COSOperator.cpp', 'Irrlicht.cpp', 'os.cpp']; + +IRRGUIOBJ = ['CGUIButton.cpp', 'CGUICheckBox.cpp', 'CGUIComboBox.cpp', 'CGUIContextMenu.cpp', 'CGUIEditBox.cpp', 'CGUIEnvironment.cpp', 'CGUIFileOpenDialog.cpp', 'CGUIFont.cpp', 'CGUIImage.cpp', 'CGUIInOutFader.cpp', 'CGUIListBox.cpp', 'CGUIMenu.cpp', 'CGUIMeshViewer.cpp', 'CGUIMessageBox.cpp', 'CGUIModalScreen.cpp', 'CGUIScrollBar.cpp', 'CGUISpinBox.cpp', 'CGUISkin.cpp', 'CGUIStaticText.cpp', 'CGUITabControl.cpp', 'CGUITable.cpp', 'CGUIToolBar.cpp', 'CGUIWindow.cpp', 'CGUIColorSelectDialog.cpp', 'CDefaultGUIElementFactory.cpp', 'CGUISpriteBank.cpp']; + +ZLIB_PREFIX = 'zlib/'; +ZLIBNAMES = ['adler32.c', 'compress.c', 'crc32.c', 'deflate.c', 'inffast.c', 'inflate.c', 'inftrees.c', 'trees.c', 'uncompr.c', 'zutil.c']; +ZLIBOBJ = []; +for fileName in ZLIBNAMES: + ZLIBOBJ += [ZLIB_PREFIX + fileName]; + +JPEGLIB_PREFIX = 'jpeglib/'; +JPEGLIBNAMES = ['jaricom.c', 'jcapimin.c', 'jcapistd.c', 'jcarith.c', 'jccoefct.c', 'jccolor.c', 'jcdctmgr.c', 'jchuff.c', 'jcinit.c', 'jcmainct.c', 'jcmarker.c', 'jcmaster.c', 'jcomapi.c', 'jcparam.c', 'jcprepct.c', 'jcsample.c', 'jctrans.c', 'jdapimin.c', 'jdapistd.c', 'jdarith.c', 'jdatadst.c', 'jdatasrc.c', 'jdcoefct.c', 'jdcolor.c', 'jddctmgr.c', 'jdhuff.c', 'jdinput.c', 'jdmainct.c', 'jdmarker.c', 'jdmaster.c', 'jdmerge.c', 'jdpostct.c', 'jdsample.c', 'jdtrans.c', 'jerror.c', 'jfdctflt.c', 'jfdctfst.c', 'jfdctint.c', 'jidctflt.c', 'jidctfst.c', 'jidctint.c', 'jmemmgr.c', 'jmemnobs.c', 'jquant1.c', 'jquant2.c', 'jutils.c']; +JPEGLIBOBJ = []; +for fileName in JPEGLIBNAMES: + JPEGLIBOBJ += [JPEGLIB_PREFIX + fileName]; + +LIBPNG_PREFIX = 'libpng/'; +LIBPNGNAMES = ['png.c', 'pngerror.c', 'pngget.c', 'pngmem.c', 'pngpread.c', 'pngread.c', 'pngrio.c', 'pngrtran.c', 'pngrutil.c', 'pngset.c', 'pngtrans.c', 'pngwio.c', 'pngwrite.c', 'pngwtran.c', 'pngwutil.c']; +LIBPNGOBJ = []; +for fileName in LIBPNGNAMES: + LIBPNGOBJ += [LIBPNG_PREFIX + fileName]; + +AESGLADMAN_PREFIX = 'aesGladman/'; +AESGLADMANNAMES = ['aescrypt.cpp', 'aeskey.cpp', 'aestab.cpp', 'fileenc.cpp', 'hmac.cpp', 'prng.cpp', 'pwd2key.cpp', 'sha1.cpp', 'sha2.cpp']; +AESGLADMANOBJ = []; +for fileName in AESGLADMANNAMES: + AESGLADMANOBJ += [AESGLADMAN_PREFIX + fileName]; + +BZIP2_PREFIX = 'bzip2/'; +BZIP2NAMES = ['blocksort.c', 'bzcompress.c', 'bzlib.c', 'crctable.c', 'decompress.c', 'huffman.c', 'randtable.c']; +BZIP2OBJ = []; +for fileName in BZIP2NAMES: + BZIP2OBJ += [BZIP2_PREFIX + fileName]; + +# Next variable is for additional scene nodes etc. of customized Irrlicht versions +EXTRAOBJ = []; + +LINKOBJ = IRRMESHOBJ + IRROBJ + IRRPARTICLEOBJ + IRRANIMOBJ + IRRVIDEOOBJ + IRRSWRENDEROBJ + IRRIOOBJ + IRROTHEROBJ + IRRGUIOBJ + ZLIBOBJ + JPEGLIBOBJ + LIBPNGOBJ + AESGLADMANOBJ + EXTRAOBJ; + +env.Append(LIBS = LIBRARIES, LIBPATH = CXXINCS); + +CXXFLAGS = ['-Wall']; +if NDEBUG: + CXXFLAGS += ['-fexpensive-optimizations', '-O3']; +else: + CXXFLAGS += ['-g', '-D_DEBUG']; + +if PROFILE: + CXXFLAGS += ['-pg']; + +CXXFLAGS += ['-DPNG_NO_MMX_CODE', '-DPNG_NO_MNG_FEATURES', '-DIRRLICHT_EXPORTS=1', '-D_IRR_STATIC_LIB_']; +if USE_GCC: + CXXFLAGS += ['-D__GNUWIN32__=1']; + +env.Append(CCFLAGS = CXXFLAGS); + +IrrlichtLibrary = env.SharedLibrary("Irrlicht.dll", LINKOBJ); diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_compile_config.h b/src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_compile_config.h new file mode 100644 index 0000000..60d5f62 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_compile_config.h @@ -0,0 +1,104 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_VIDEO_2_SOFTWARE_COMPILE_CONFIG_H_INCLUDED__ +#define __S_VIDEO_2_SOFTWARE_COMPILE_CONFIG_H_INCLUDED__ + +#include "IrrCompileConfig.h" + + +// Generic Render Flags for burning's video rasterizer +// defined now in irrlicht compile config + + +#ifdef BURNINGVIDEO_RENDERER_BEAUTIFUL + #define SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #define SOFTWARE_DRIVER_2_SUBTEXEL + #define SOFTWARE_DRIVER_2_BILINEAR + #define SOFTWARE_DRIVER_2_LIGHTING + #define SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #define SOFTWARE_DRIVER_2_32BIT + #define SOFTWARE_DRIVER_2_MIPMAPPING + #define SOFTWARE_DRIVER_2_USE_WBUFFER + #define SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM + #define SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE 0 +#endif + +//! Set Flags for Windows Mobile +#ifdef BURNINGVIDEO_RENDERER_CE + #define SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #define SOFTWARE_DRIVER_2_SUBTEXEL + //#define SOFTWARE_DRIVER_2_BILINEAR + //#define SOFTWARE_DRIVER_2_LIGHTING + #define SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #define SOFTWARE_DRIVER_2_16BIT + #define SOFTWARE_DRIVER_2_MIPMAPPING + #define SOFTWARE_DRIVER_2_USE_WBUFFER + //#define SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM + #define SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE 128 +#endif + +#ifdef BURNINGVIDEO_RENDERER_FAST + #define SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #define SOFTWARE_DRIVER_2_SUBTEXEL + //#define SOFTWARE_DRIVER_2_BILINEAR + //#define SOFTWARE_DRIVER_2_LIGHTING + //#define SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + #define SOFTWARE_DRIVER_2_32BIT + #define SOFTWARE_DRIVER_2_MIPMAPPING + #define SOFTWARE_DRIVER_2_USE_WBUFFER + #define SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE 0 +#endif + +#ifdef BURNINGVIDEO_RENDERER_ULTRA_FAST + #define BURNINGVIDEO_RENDERER_FAST + + //#define SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT + #define SOFTWARE_DRIVER_2_SUBTEXEL + //#define SOFTWARE_DRIVER_2_BILINEAR + //#define SOFTWARE_DRIVER_2_LIGHTING + //#define SOFTWARE_DRIVER_2_USE_VERTEX_COLOR + //#define SOFTWARE_DRIVER_2_32BIT + #define SOFTWARE_DRIVER_2_MIPMAPPING + #define SOFTWARE_DRIVER_2_USE_WBUFFER + #define SOFTWARE_DRIVER_2_TEXTURE_MAXSIZE 0 +#endif + +// Derivate flags + +// texture format +#ifdef SOFTWARE_DRIVER_2_32BIT + #define BURNINGSHADER_COLOR_FORMAT ECF_A8R8G8B8 +#else + #define BURNINGSHADER_COLOR_FORMAT ECF_A1R5G5B5 +#endif + +// mip mapping +#if defined ( SOFTWARE_DRIVER_2_MIPMAPPING ) + #if defined( BURNINGVIDEO_RENDERER_BEAUTIFUL ) + #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 8 + #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 + #elif defined ( BURNINGVIDEO_RENDERER_CE ) + #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 4 + #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 + #else + #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 8 + #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 + #endif +#else + #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 1 + #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 +#endif + +#define SOFTWARE_DRIVER_2_MIPMAPPING_SCALE (8/SOFTWARE_DRIVER_2_MIPMAPPING_MAX) + +#ifndef REALINLINE + #ifdef _MSC_VER + #define REALINLINE __forceinline + #else + #define REALINLINE inline + #endif +#endif + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_helper.h b/src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_helper.h new file mode 100644 index 0000000..263548b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/SoftwareDriver2_helper.h @@ -0,0 +1,1042 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +/* + History: + - changed behavior for log2 textures ( replaced multiplies by shift ) +*/ + +#ifndef __S_VIDEO_2_SOFTWARE_HELPER_H_INCLUDED__ +#define __S_VIDEO_2_SOFTWARE_HELPER_H_INCLUDED__ + +#include "SoftwareDriver2_compile_config.h" +#include "irrMath.h" +#include "CSoftwareTexture2.h" +#include "SMaterial.h" + + + +namespace irr +{ + +// supporting different packed pixel needs many defines... + +#ifdef SOFTWARE_DRIVER_2_32BIT + typedef u32 tVideoSample; + + #define MASK_A 0xFF000000 + #define MASK_R 0x00FF0000 + #define MASK_G 0x0000FF00 + #define MASK_B 0x000000FF + + #define SHIFT_A 24 + #define SHIFT_R 16 + #define SHIFT_G 8 + #define SHIFT_B 0 + + #define COLOR_MAX 0xFF + #define COLOR_MAX_LOG2 8 + #define COLOR_BRIGHT_WHITE 0xFFFFFFFF + + #define VIDEO_SAMPLE_GRANULARITY 2 + +#else + typedef u16 tVideoSample; + + #define MASK_A 0x8000 + #define MASK_R 0x7C00 + #define MASK_G 0x03E0 + #define MASK_B 0x001F + + #define SHIFT_A 15 + #define SHIFT_R 10 + #define SHIFT_G 5 + #define SHIFT_B 0 + + #define COLOR_MAX 0x1F + #define COLOR_MAX_LOG2 5 + #define COLOR_BRIGHT_WHITE 0xFFFF + #define VIDEO_SAMPLE_GRANULARITY 1 + +#endif + + + + +// ----------------------- Generic ---------------------------------- + +//! a more useful memset for pixel +// (standard memset only works with 8-bit values) +inline void memset32(void * dest, const u32 value, u32 bytesize) +{ + u32 * d = (u32*) dest; + + u32 i; + + // loops unrolled to reduce the number of increments by factor ~8. + i = bytesize >> (2 + 3); + while (i) + { + d[0] = value; + d[1] = value; + d[2] = value; + d[3] = value; + + d[4] = value; + d[5] = value; + d[6] = value; + d[7] = value; + + d += 8; + i -= 1; + } + + i = (bytesize >> 2 ) & 7; + while (i) + { + d[0] = value; + d += 1; + i -= 1; + } +} + +//! a more useful memset for pixel +// (standard memset only works with 8-bit values) +inline void memset16(void * dest, const u16 value, u32 bytesize) +{ + u16 * d = (u16*) dest; + + u32 i; + + // loops unrolled to reduce the number of increments by factor ~8. + i = bytesize >> (1 + 3); + while (i) + { + d[0] = value; + d[1] = value; + d[2] = value; + d[3] = value; + + d[4] = value; + d[5] = value; + d[6] = value; + d[7] = value; + + d += 8; + --i; + } + + i = (bytesize >> 1 ) & 7; + while (i) + { + d[0] = value; + ++d; + --i; + } +} + +/* + use biased loop counter + --> 0 byte copy is forbidden +*/ +REALINLINE void memcpy32_small ( void * dest, const void *source, u32 bytesize ) +{ + u32 c = bytesize >> 2; + + do + { + ((u32*) dest ) [ c-1 ] = ((u32*) source) [ c-1 ]; + } while ( --c ); + +} + + + +// integer log2 of a float ieee 754. TODO: non ieee floating point +static inline s32 s32_log2_f32( f32 f) +{ + u32 x = IR ( f ); + return ((x & 0x7F800000) >> 23) - 127; +} + +static inline s32 s32_log2_s32(u32 x) +{ + return s32_log2_f32( (f32) x); +} + +static inline s32 s32_abs(s32 x) +{ + s32 b = x >> 31; + return (x ^ b ) - b; +} + + +//! conditional set based on mask and arithmetic shift +REALINLINE u32 if_mask_a_else_b ( const u32 mask, const u32 a, const u32 b ) +{ + return ( mask & ( a ^ b ) ) ^ b; +} + +// ------------------ Video--------------------------------------- +/*! + Pixel = dest * ( 1 - alpha ) + source * alpha + alpha [0;256] +*/ +REALINLINE u32 PixelBlend32 ( const u32 c2, const u32 c1, u32 alpha ) +{ + u32 srcRB = c1 & 0x00FF00FF; + u32 srcXG = c1 & 0x0000FF00; + + u32 dstRB = c2 & 0x00FF00FF; + u32 dstXG = c2 & 0x0000FF00; + + + u32 rb = srcRB - dstRB; + u32 xg = srcXG - dstXG; + + rb *= alpha; + xg *= alpha; + rb >>= 8; + xg >>= 8; + + rb += dstRB; + xg += dstXG; + + rb &= 0x00FF00FF; + xg &= 0x0000FF00; + + return rb | xg; +} + +/*! + Pixel = dest * ( 1 - alpha ) + source * alpha + alpha [0;32] +*/ +inline u16 PixelBlend16 ( const u16 c2, const u32 c1, const u16 alpha ) +{ + const u16 srcRB = c1 & 0x7C1F; + const u16 srcXG = c1 & 0x03E0; + + const u16 dstRB = c2 & 0x7C1F; + const u16 dstXG = c2 & 0x03E0; + + u32 rb = srcRB - dstRB; + u32 xg = srcXG - dstXG; + + rb *= alpha; + xg *= alpha; + rb >>= 5; + xg >>= 5; + + rb += dstRB; + xg += dstXG; + + rb &= 0x7C1F; + xg &= 0x03E0; + + return (u16)(rb | xg); +} + +/* + Pixel = c0 * (c1/31). c0 Alpha retain +*/ +inline u16 PixelMul16 ( const u16 c0, const u16 c1) +{ + return (u16)((( ( (c0 & 0x7C00) * (c1 & 0x7C00) ) & 0x3E000000 ) >> 15 ) | + (( ( (c0 & 0x03E0) * (c1 & 0x03E0) ) & 0x000F8000 ) >> 10 ) | + (( ( (c0 & 0x001F) * (c1 & 0x001F) ) & 0x000003E0 ) >> 5 ) | + (c0 & 0x8000)); +} + +/* + Pixel = c0 * (c1/31). +*/ +inline u16 PixelMul16_2 ( u16 c0, u16 c1) +{ + return (u16)(( ( (c0 & 0x7C00) * (c1 & 0x7C00) ) & 0x3E000000 ) >> 15 | + ( ( (c0 & 0x03E0) * (c1 & 0x03E0) ) & 0x000F8000 ) >> 10 | + ( ( (c0 & 0x001F) * (c1 & 0x001F) ) & 0x000003E0 ) >> 5 | + ( c0 & c1 & 0x8000)); +} + +/* + Pixel = c0 * (c1/255). c0 Alpha Retain +*/ +REALINLINE u32 PixelMul32 ( const u32 c0, const u32 c1) +{ + return (c0 & 0xFF000000) | + (( ( (c0 & 0x00FF0000) >> 12 ) * ( (c1 & 0x00FF0000) >> 12 ) ) & 0x00FF0000 ) | + (( ( (c0 & 0x0000FF00) * (c1 & 0x0000FF00) ) >> 16 ) & 0x0000FF00 ) | + (( ( (c0 & 0x000000FF) * (c1 & 0x000000FF) ) >> 8 ) & 0x000000FF); +} + +/* + Pixel = c0 * (c1/255). +*/ +REALINLINE u32 PixelMul32_2 ( const u32 c0, const u32 c1) +{ + return (( ( (c0 & 0xFF000000) >> 16 ) * ( (c1 & 0xFF000000) >> 16 ) ) & 0xFF000000 ) | + (( ( (c0 & 0x00FF0000) >> 12 ) * ( (c1 & 0x00FF0000) >> 12 ) ) & 0x00FF0000 ) | + (( ( (c0 & 0x0000FF00) * (c1 & 0x0000FF00) ) >> 16 ) & 0x0000FF00 ) | + (( ( (c0 & 0x000000FF) * (c1 & 0x000000FF) ) >> 8 ) & 0x000000FF); +} + +/* + Pixel = clamp ( c0 + c1, 0, 255 ) +*/ +REALINLINE u32 PixelAdd32 ( const u32 c2, const u32 c1) +{ + u32 sum = ( c2 & 0x00FFFFFF ) + ( c1 & 0x00FFFFFF ); + u32 low_bits = ( c2 ^ c1 ) & 0x00010101; + s32 carries = ( sum - low_bits ) & 0x01010100; + u32 modulo = sum - carries; + u32 clamp = carries - ( carries >> 8 ); + return modulo | clamp; +} + +#if 0 + +// 1 - Bit Alpha Blending +inline u16 PixelBlend16 ( const u16 destination, const u16 source ) +{ + if((source & 0x8000) == 0x8000) + return source; // The source is visible, so use it. + else + return destination; // The source is transparent, so use the destination. +} + +// 1 - Bit Alpha Blending 16Bit SIMD +inline u32 PixelBlend16_simd ( const u32 destination, const u32 source ) +{ + switch(source & 0x80008000) + { + case 0x80008000: // Both source pixels are visible + return source; + + case 0x80000000: // Only the first source pixel is visible + return (source & 0xFFFF0000) | (destination & 0x0000FFFF); + + case 0x00008000: // Only the second source pixel is visible. + return (destination & 0xFFFF0000) | (source & 0x0000FFFF); + + default: // Neither source pixel is visible. + return destination; + } +} +#else + +// 1 - Bit Alpha Blending +inline u16 PixelBlend16 ( const u16 c2, const u16 c1 ) +{ + u16 mask = ((c1 & 0x8000) >> 15 ) + 0x7fff; + return (c2 & mask ) | ( c1 & ~mask ); +} + +// 1 - Bit Alpha Blending 16Bit SIMD +inline u32 PixelBlend16_simd ( const u32 c2, const u32 c1 ) +{ + u32 mask = ((c1 & 0x80008000) >> 15 ) + 0x7fff7fff; + return (c2 & mask ) | ( c1 & ~mask ); +} + +#endif + +/*! + Pixel = dest * ( 1 - SourceAlpha ) + source * SourceAlpha +*/ +inline u32 PixelBlend32 ( const u32 c2, const u32 c1 ) +{ + // alpha test + u32 alpha = c1 & 0xFF000000; + + if ( 0 == alpha ) + return c2; + + if ( 0xFF000000 == alpha ) + { + return c1; + } + + alpha >>= 24; + + // add highbit alpha, if ( alpha > 127 ) alpha += 1; + alpha += ( alpha >> 7); + + u32 srcRB = c1 & 0x00FF00FF; + u32 srcXG = c1 & 0x0000FF00; + + u32 dstRB = c2 & 0x00FF00FF; + u32 dstXG = c2 & 0x0000FF00; + + + u32 rb = srcRB - dstRB; + u32 xg = srcXG - dstXG; + + rb *= alpha; + xg *= alpha; + rb >>= 8; + xg >>= 8; + + rb += dstRB; + xg += dstXG; + + rb &= 0x00FF00FF; + xg &= 0x0000FF00; + + return (c1 & 0xFF000000) | rb | xg; +} + + + +// ------------------ Fix Point ---------------------------------- + +typedef s32 tFixPoint; +typedef u32 tFixPointu; + +// Fix Point 12 +#if 0 + #define FIX_POINT_PRE 12 + #define FIX_POINT_FRACT_MASK 0xFFF + #define FIX_POINT_SIGNED_MASK 0xFFFFF000 + #define FIX_POINT_UNSIGNED_MASK 0x7FFFF000 + #define FIX_POINT_ONE 0x1000 + #define FIX_POINT_ZERO_DOT_FIVE 0x0800 + #define FIX_POINT_F32_MUL 4096.f +#endif + +// Fix Point 10 +#if 1 + #define FIX_POINT_PRE 10 + #define FIX_POINT_FRACT_MASK 0x3FF + #define FIX_POINT_SIGNED_MASK 0xFFFFFC00 + #define FIX_POINT_UNSIGNED_MASK 0x7FFFFE00 + #define FIX_POINT_ONE 0x400 + #define FIX_POINT_ZERO_DOT_FIVE 0x200 + #define FIX_POINT_F32_MUL 1024.f +#endif + +// Fix Point 9 +#if 0 + #define FIX_POINT_PRE 9 + #define FIX_POINT_FRACT_MASK 0x1FF + #define FIX_POINT_SIGNED_MASK 0xFFFFFE00 + #define FIX_POINT_UNSIGNED_MASK 0x7FFFFE00 + #define FIX_POINT_ONE 0x200 + #define FIX_POINT_ZERO_DOT_FIVE 0x100 + #define FIX_POINT_F32_MUL 512.f +#endif + +// Fix Point 7 +#if 0 + #define FIX_POINT_PRE 7 + #define FIX_POINT_FRACT_MASK 0x7F + #define FIX_POINT_SIGNED_MASK 0xFFFFFF80 + #define FIX_POINT_UNSIGNED_MASK 0x7FFFFF80 + #define FIX_POINT_ONE 0x80 + #define FIX_POINT_ZERO_DOT_FIVE 0x40 + #define FIX_POINT_F32_MUL 128.f +#endif + +#define FIXPOINT_COLOR_MAX ( COLOR_MAX << FIX_POINT_PRE ) +#define FIX_POINT_HALF_COLOR ( (tFixPoint) ( ((f32) COLOR_MAX / 2.f * FIX_POINT_F32_MUL ) ) ) + + +/* + convert signed integer to fixpoint +*/ +inline tFixPoint s32_to_fixPoint (const s32 x) +{ + return x << FIX_POINT_PRE; +} + +inline tFixPointu u32_to_fixPoint (const u32 x) +{ + return x << FIX_POINT_PRE; +} + +inline u32 fixPointu_to_u32 (const tFixPointu x) +{ + return x >> FIX_POINT_PRE; +} + + +// 1/x * FIX_POINT +REALINLINE f32 fix_inverse32 ( const f32 x ) +{ + return FIX_POINT_F32_MUL / x; +} + + +/* + convert float to fixpoint + fast convert (fistp on x86) HAS to be used.. + hints: compileflag /QIfist for msvc7. msvc 8.0 has smth different + others should use their favourite assembler.. +*/ +static inline int f_round2(f32 f) +{ + f += (3<<22); + return IR(f) - 0x4b400000; +} + +/* + convert f32 to Fix Point. + multiply is needed anyway, so scale mulby +*/ +REALINLINE tFixPoint tofix (const f32 x, const f32 mulby = FIX_POINT_F32_MUL ) +{ + return (tFixPoint) (x * mulby); +} + + +/* + Fix Point , Fix Point Multiply +*/ +REALINLINE tFixPointu imulFixu(const tFixPointu x, const tFixPointu y) +{ + return (x * y) >> (tFixPointu) FIX_POINT_PRE; +} + +/* + Fix Point , Fix Point Multiply +*/ +REALINLINE tFixPoint imulFix(const tFixPoint x, const tFixPoint y) +{ + return ( x * y) >> ( FIX_POINT_PRE ); +} + +/* + Fix Point , Fix Point Multiply x * y * 2 +*/ +REALINLINE tFixPoint imulFix2(const tFixPoint x, const tFixPoint y) +{ + return ( x * y) >> ( FIX_POINT_PRE -1 ); +} + + +/* + Multiply x * y * 1 +*/ +REALINLINE tFixPoint imulFix_tex1(const tFixPoint x, const tFixPoint y) +{ + return ( ( (tFixPointu) x >> 2 ) * ( (tFixPointu) y >> 2 ) ) >> (tFixPointu) ( FIX_POINT_PRE + 4 ); +} + +/* + Multiply x * y * 2 +*/ +REALINLINE tFixPoint imulFix_tex2(const tFixPoint x, const tFixPoint y) +{ + return ( ( (tFixPointu) x >> 2 ) * ( (tFixPointu) y >> 2 ) ) >> (tFixPointu) ( FIX_POINT_PRE + 3 ); +} + +/* + Multiply x * y * 4 +*/ +REALINLINE tFixPoint imulFix_tex4(const tFixPoint x, const tFixPoint y) +{ +#ifdef SOFTWARE_DRIVER_2_32BIT + return ( ( (tFixPointu) x >> 2 ) * ( (tFixPointu) y >> 2 ) ) >> (tFixPointu) ( FIX_POINT_PRE + 2 ); +#else + return ( x * y) >> ( FIX_POINT_PRE + ( VIDEO_SAMPLE_GRANULARITY * 3 ) ); +#endif +} + +/*! + clamp FixPoint to maxcolor in FixPoint, min(a,31) +*/ +REALINLINE tFixPoint clampfix_maxcolor ( const tFixPoint a) +{ + tFixPoint c = (a - FIXPOINT_COLOR_MAX) >> 31; + return (a & c) | ( FIXPOINT_COLOR_MAX & ~c); +} + +/*! + clamp FixPoint to 0 in FixPoint, max(a,0) +*/ +REALINLINE tFixPoint clampfix_mincolor ( const tFixPoint a) +{ + return a - ( a & ( a >> 31 ) ); +} + +REALINLINE tFixPoint saturateFix ( const tFixPoint a) +{ + return clampfix_mincolor ( clampfix_maxcolor ( a ) ); +} + + +// rount fixpoint to int +inline s32 roundFix ( const tFixPoint x ) +{ + return ( x + FIX_POINT_ZERO_DOT_FIVE ) >> FIX_POINT_PRE; +} + + + +// x in [0;1[ +inline s32 f32_to_23Bits(const f32 x) +{ + f32 y = x + 1.f; + return IR(y) & 0x7FFFFF; // last 23 bits +} + +/*! + return VideoSample from fixpoint +*/ +REALINLINE tVideoSample fix_to_color ( const tFixPoint r, const tFixPoint g, const tFixPoint b ) +{ +#ifdef __BIG_ENDIAN__ + return FIXPOINT_COLOR_MAX | + ( r & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - 8) | + ( g & FIXPOINT_COLOR_MAX) << ( 16 - FIX_POINT_PRE ) | + ( b & FIXPOINT_COLOR_MAX) << ( 24 - FIX_POINT_PRE ); +#else + return ( FIXPOINT_COLOR_MAX & FIXPOINT_COLOR_MAX) << ( SHIFT_A - FIX_POINT_PRE ) | + ( r & FIXPOINT_COLOR_MAX) << ( SHIFT_R - FIX_POINT_PRE ) | + ( g & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_G ) | + ( b & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_B ); +#endif +} + + +/*! + return VideoSample from fixpoint +*/ +REALINLINE tVideoSample fix4_to_color ( const tFixPoint a, const tFixPoint r, const tFixPoint g, const tFixPoint b ) +{ +#ifdef __BIG_ENDIAN__ + return ( a & (FIX_POINT_FRACT_MASK - 1 )) >> ( FIX_POINT_PRE ) | + ( r & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - 8) | + ( g & FIXPOINT_COLOR_MAX) << ( 16 - FIX_POINT_PRE ) | + ( b & FIXPOINT_COLOR_MAX) << ( 24 - FIX_POINT_PRE ); +#else + return ( a & (FIX_POINT_FRACT_MASK - 1 )) << ( SHIFT_A - 1 ) | + ( r & FIXPOINT_COLOR_MAX) << ( SHIFT_R - FIX_POINT_PRE ) | + ( g & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_G ) | + ( b & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_B ); +#endif + +} + +/*! + return fixpoint from VideoSample granularity COLOR_MAX +*/ +inline void color_to_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) +{ + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); +} + +/*! + return fixpoint from VideoSample granularity COLOR_MAX +*/ +inline void color_to_fix ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) +{ + (tFixPointu&) a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE ); + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); +} + +/*! + return fixpoint from VideoSample granularity 0..FIX_POINT_ONE +*/ +inline void color_to_fix1 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) +{ + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) >> ( SHIFT_G + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - COLOR_MAX_LOG2 ); +} + +/*! + return fixpoint from VideoSample granularity 0..FIX_POINT_ONE +*/ +inline void color_to_fix1 ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) +{ + (tFixPointu&) a = (t00 & MASK_A) >> ( SHIFT_A + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) >> ( SHIFT_G + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - COLOR_MAX_LOG2 ); +} + + + +// ----- FP24 ---- floating point z-buffer + +#if 1 +typedef f32 fp24; +#else +struct fp24 +{ + u32 v; + + fp24() {} + + fp24 ( const f32 f ) + { + f32 y = f + 1.f; + v = ((u32&)y) & 0x7FFFFF; // last 23 bits + } + + void operator=(const f32 f ) + { + f32 y = f + 1.f; + v = ((u32&)y) & 0x7FFFFF; // last 23 bits + } + + void operator+=(const fp24 &other ) + { + v += other.v; + } + + operator f32 () const + { + f32 r = FR ( v ); + return r + 1.f; + } + +}; +#endif + + +// ------------------------ Internal Texture ----------------------------- + +struct sInternalTexture +{ + u32 textureXMask; + u32 textureYMask; + + u32 pitchlog2; + void *data; + + video::CSoftwareTexture2 *Texture; + s32 lodLevel; +}; + + + +// get video sample plain +inline tVideoSample getTexel_plain ( const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + return *((tVideoSample*)( (u8*) t->data + ofs )); +} + +// get video sample to fix +inline void getTexel_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + tVideoSample t00; + t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + +} + +// get video sample to fixpoint +REALINLINE void getTexel_fix ( tFixPoint &a, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + tVideoSample t00; + t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); +} + + +inline void getSample_texture_dither ( tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty, + const u32 x, const u32 y + ) +{ + static const tFixPointu dithermask[] = + { + 0x00,0x80,0x20,0xa0, + 0xc0,0x40,0xe0,0x60, + 0x30,0xb0,0x10,0x90, + 0xf0,0x70,0xd0,0x50 + }; + + const u32 index = (y & 3 ) << 2 | (x & 3); + + const tFixPointu _ntx = (tx + dithermask [ index ] ) & t->textureXMask; + const tFixPointu _nty = (ty + dithermask [ index ] ) & t->textureYMask; + + u32 ofs; + ofs = ( ( _nty ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( _ntx ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + (tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + (tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + +} + +/* + load a sample from internal texture at position tx,ty to fixpoint +*/ +#ifndef SOFTWARE_DRIVER_2_BILINEAR + +// get Sample linear == getSample_fixpoint + +inline void getSample_texture ( tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + (tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + (tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); +} + +inline void getSample_texture ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFixPointu &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + (tFixPointu &)a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); + (tFixPointu &)r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + (tFixPointu &)g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu &)b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); +} + + +#else + + +// get sample linear +REALINLINE void getSample_linear ( tFixPointu &r, tFixPointu &g, tFixPointu &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + tVideoSample t00; + t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + r = (t00 & MASK_R) >> SHIFT_R; + g = (t00 & MASK_G) >> SHIFT_G; + b = (t00 & MASK_B); +} + +// get Sample bilinear +REALINLINE void getSample_texture ( tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + + tFixPointu r00,g00,b00; + tFixPointu r01,g01,b01; + tFixPointu r10,g10,b10; + tFixPointu r11,g11,b11; + +#if 0 + getSample_linear ( r00, g00, b00, t, tx,ty ); + getSample_linear ( r10, g10, b10, t, tx + FIX_POINT_ONE,ty ); + getSample_linear ( r01, g01, b01, t, tx,ty + FIX_POINT_ONE ); + getSample_linear ( r11, g11, b11, t, tx + FIX_POINT_ONE,ty + FIX_POINT_ONE ); +#else + u32 o0, o1,o2,o3; + tVideoSample t00; + + o0 = ( ( (ty) & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + o1 = ( ( (ty+FIX_POINT_ONE) & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + o2 = ( (tx) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + o3 = ( (tx+FIX_POINT_ONE) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + t00 = *((tVideoSample*)( (u8*) t->data + (o0 | o2 ) )); + r00 = (t00 & MASK_R) >> SHIFT_R; g00 = (t00 & MASK_G) >> SHIFT_G; b00 = (t00 & MASK_B); + + t00 = *((tVideoSample*)( (u8*) t->data + (o0 | o3 ) )); + r10 = (t00 & MASK_R) >> SHIFT_R; g10 = (t00 & MASK_G) >> SHIFT_G; b10 = (t00 & MASK_B); + + t00 = *((tVideoSample*)( (u8*) t->data + (o1 | o2 ) )); + r01 = (t00 & MASK_R) >> SHIFT_R; g01 = (t00 & MASK_G) >> SHIFT_G; b01 = (t00 & MASK_B); + + t00 = *((tVideoSample*)( (u8*) t->data + (o1 | o3 ) )); + r11 = (t00 & MASK_R) >> SHIFT_R; g11 = (t00 & MASK_G) >> SHIFT_G; b11 = (t00 & MASK_B); + +#endif + + const tFixPointu txFract = tx & FIX_POINT_FRACT_MASK; + const tFixPointu txFractInv = FIX_POINT_ONE - txFract; + + const tFixPointu tyFract = ty & FIX_POINT_FRACT_MASK; + const tFixPointu tyFractInv = FIX_POINT_ONE - tyFract; + + const tFixPointu w00 = imulFixu ( txFractInv, tyFractInv ); + const tFixPointu w10 = imulFixu ( txFract , tyFractInv ); + const tFixPointu w01 = imulFixu ( txFractInv, tyFract ); + const tFixPointu w11 = imulFixu ( txFract , tyFract ); + + r = (r00 * w00 ) + + (r01 * w01 ) + + (r10 * w10 ) + + (r11 * w11 ); + + g = (g00 * w00 ) + + (g01 * w01 ) + + (g10 * w10 ) + + (g11 * w11 ); + + b = (b00 * w00 ) + + (b01 * w01 ) + + (b10 * w10 ) + + (b11 * w11 ); + +} + + +// get sample linear +REALINLINE void getSample_linear ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFixPointu &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + u32 ofs; + + ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2; + ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); + + // texel + tVideoSample t00; + t00 = *((tVideoSample*)( (u8*) t->data + ofs )); + + a = (t00 & MASK_A) >> SHIFT_A; + r = (t00 & MASK_R) >> SHIFT_R; + g = (t00 & MASK_G) >> SHIFT_G; + b = (t00 & MASK_B); +} + +// get Sample bilinear +REALINLINE void getSample_texture ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty + ) +{ + + tFixPointu a00, r00,g00,b00; + tFixPointu a01, r01,g01,b01; + tFixPointu a10, r10,g10,b10; + tFixPointu a11, r11,g11,b11; + + getSample_linear ( a00, r00, g00, b00, t, tx,ty ); + getSample_linear ( a10, r10, g10, b10, t, tx + FIX_POINT_ONE,ty ); + getSample_linear ( a01, r01, g01, b01, t, tx,ty + FIX_POINT_ONE ); + getSample_linear ( a11, r11, g11, b11, t, tx + FIX_POINT_ONE,ty + FIX_POINT_ONE ); + + const tFixPointu txFract = tx & FIX_POINT_FRACT_MASK; + const tFixPointu txFractInv = FIX_POINT_ONE - txFract; + + const tFixPointu tyFract = ty & FIX_POINT_FRACT_MASK; + const tFixPointu tyFractInv = FIX_POINT_ONE - tyFract; + + const tFixPointu w00 = imulFixu ( txFractInv, tyFractInv ); + const tFixPointu w10 = imulFixu ( txFract , tyFractInv ); + const tFixPointu w01 = imulFixu ( txFractInv, tyFract ); + const tFixPointu w11 = imulFixu ( txFract , tyFract ); + + a = (a00 * w00 ) + + (a01 * w01 ) + + (a10 * w10 ) + + (a11 * w11 ); + + r = (r00 * w00 ) + + (r01 * w01 ) + + (r10 * w10 ) + + (r11 * w11 ); + + g = (g00 * w00 ) + + (g01 * w01 ) + + (g10 * w10 ) + + (g11 * w11 ); + + b = (b00 * w00 ) + + (b01 * w01 ) + + (b10 * w10 ) + + (b11 * w11 ); + +} + + +#endif + +// some 2D Defines +struct AbsRectangle +{ + s32 x0; + s32 y0; + s32 x1; + s32 y1; +}; + +//! 2D Intersection test +inline bool intersect ( AbsRectangle &dest, const AbsRectangle& a, const AbsRectangle& b) +{ + dest.x0 = core::s32_max( a.x0, b.x0 ); + dest.y0 = core::s32_max( a.y0, b.y0 ); + dest.x1 = core::s32_min( a.x1, b.x1 ); + dest.y1 = core::s32_min( a.y1, b.y1 ); + return dest.x0 < dest.x1 && dest.y0 < dest.y1; +} + +// some 1D defines +struct sIntervall +{ + s32 start; + s32 end; +}; + +// returning intersection width +inline s32 intervall_intersect_test( const sIntervall& a, const sIntervall& b) +{ + return core::s32_min( a.end, b.end ) - core::s32_max( a.start, b.start ); +} + + +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/Readme.txt b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/Readme.txt new file mode 100644 index 0000000..86842c2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/Readme.txt @@ -0,0 +1,25 @@ +A File Encryption Utility - VC++ 7.1 project Instructions + +1. Unzip the enclosed files into a suitable VC++ project directory. +2. Obtain the bzip2 source code from http://sources.redhat.com/bzip2/ + and unzip the files into the bzip2 sub-directory. +3. Compile the bzip2 project to give a static library +4. Compile the encfile project. +5. The executable encfile.exe is now ready for use: + + enfile password filename + + If the filename does not have the extension 'enc', it is assumed to + be a normal file that will then be encrypted to a file with the same + name but with an added extension 'enc'. + + If the filename has the extension 'enc' its is assumed to be an + encrypted file that will be decrypted to a file with the same name + but without the 'enc' extension. + +The default HASH function is SHA1, which is set up by defining USE_SHA1 in +compiling the project. If USE_SHA256 is defined instead then SHA256 is used. + +Brian Gladman + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aes.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aes.h new file mode 100644 index 0000000..127c886 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aes.h @@ -0,0 +1,137 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2003, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This file contains the definitions required to use AES in C. See aesopt.h + for optimisation details. +*/ + +#ifndef _AES_H +#define _AES_H + +#include "irrMath.h" + +#define AES_128 /* define if AES with 128 bit keys is needed */ +#define AES_192 /* define if AES with 192 bit keys is needed */ +#define AES_256 /* define if AES with 256 bit keys is needed */ +#define AES_VAR /* define if a variable key size is needed */ + +/* The following must also be set in assembler files if being used */ + +#define AES_ENCRYPT /* if support for encryption is needed */ +#define AES_DECRYPT /* if support for decryption is needed */ +#define AES_ERR_CHK /* for parameter checks & error return codes */ + +typedef irr::u8 aes_08t; +typedef irr::u32 aes_32t; + +#define AES_BLOCK_SIZE 16 /* the AES block size in bytes */ +#define N_COLS 4 /* the number of columns in the state */ + +/* a maximum of 60 32-bit words are needed for the key schedule */ +#define KS_LENGTH 64 + +#ifdef AES_ERR_CHK +#define aes_ret int +#define aes_good 0 +#define aes_error -1 +#else +#define aes_ret void +#endif + +#ifndef AES_DLL /* implement normal/DLL functions */ +#define aes_rval aes_ret +#else +#define aes_rval aes_ret __declspec(dllexport) _stdcall +#endif + +/* This routine must be called before first use if non-static */ +/* tables are being used */ + +void gen_tabs(void); + +/* The key length (klen) is input in bytes when it is in the range */ +/* 16 <= klen <= 32 or in bits when in the range 128 <= klen <= 256 */ + +#ifdef AES_ENCRYPT + +typedef struct +{ + aes_32t ks[KS_LENGTH]; +} aes_encrypt_ctx; + +#if defined(AES_128) || defined(AES_VAR) +aes_rval aes_encrypt_key128(const void *in_key, aes_encrypt_ctx cx[1]); +#endif + +#if defined(AES_192) || defined(AES_VAR) +aes_rval aes_encrypt_key192(const void *in_key, aes_encrypt_ctx cx[1]); +#endif + +#if defined(AES_256) || defined(AES_VAR) +aes_rval aes_encrypt_key256(const void *in_key, aes_encrypt_ctx cx[1]); +#endif + +#if defined(AES_VAR) +aes_rval aes_encrypt_key(const void *in_key, int key_len, aes_encrypt_ctx cx[1]); +#endif + +aes_rval aes_encrypt(const void *in_blk, void *out_blk, const aes_encrypt_ctx cx[1]); +#endif + +#ifdef AES_DECRYPT + +typedef struct +{ + aes_32t ks[KS_LENGTH]; +} aes_decrypt_ctx; + +#if defined(AES_128) || defined(AES_VAR) +aes_rval aes_decrypt_key128(const void *in_key, aes_decrypt_ctx cx[1]); +#endif + +#if defined(AES_192) || defined(AES_VAR) +aes_rval aes_decrypt_key192(const void *in_key, aes_decrypt_ctx cx[1]); +#endif + +#if defined(AES_256) || defined(AES_VAR) +aes_rval aes_decrypt_key256(const void *in_key, aes_decrypt_ctx cx[1]); +#endif + +#if defined(AES_VAR) +aes_rval aes_decrypt_key(const void *in_key, int key_len, aes_decrypt_ctx cx[1]); +#endif + +aes_rval aes_decrypt(const void *in_blk, void *out_blk, const aes_decrypt_ctx cx[1]); +#endif + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aescrypt.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aescrypt.cpp new file mode 100644 index 0000000..8d1feee --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aescrypt.cpp @@ -0,0 +1,303 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2003, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This file contains the code for implementing encryption and decryption + for AES (Rijndael) for block and key sizes of 16, 24 and 32 bytes. It + can optionally be replaced by code written in assembler using NASM. For + further details see the file aesopt.h +*/ + +#include "aesopt.h" + +#define si(y,x,k,c) (s(y,c) = word_in(x, c) ^ (k)[c]) +#define so(y,x,c) word_out(y, c, s(x,c)) + +#if defined(ARRAYS) +#define locals(y,x) x[4],y[4] +#else +#define locals(y,x) x##0,x##1,x##2,x##3,y##0,y##1,y##2,y##3 +#endif + +#define l_copy(y, x) s(y,0) = s(x,0); s(y,1) = s(x,1); \ + s(y,2) = s(x,2); s(y,3) = s(x,3); +#define state_in(y,x,k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3) +#define state_out(y,x) so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3) +#define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3) + +#if defined(ENCRYPTION) && !defined(AES_ASM) + +/* Visual C++ .Net v7.1 provides the fastest encryption code when using + Pentium optimization with small code but this is poor for decryption + so we need to control this with the following VC++ pragmas +*/ + +#if defined(_MSC_VER) +#pragma optimize( "s", on ) +#endif + +/* Given the column (c) of the output state variable, the following + macros give the input state variables which are needed in its + computation for each row (r) of the state. All the alternative + macros give the same end values but expand into different ways + of calculating these values. In particular the complex macro + used for dynamically variable block sizes is designed to expand + to a compile time constant whenever possible but will expand to + conditional clauses on some branches (I am grateful to Frank + Yellin for this construction) +*/ + +#define fwd_var(x,r,c)\ + ( r == 0 ? ( c == 0 ? s(x,0) : c == 1 ? s(x,1) : c == 2 ? s(x,2) : s(x,3))\ + : r == 1 ? ( c == 0 ? s(x,1) : c == 1 ? s(x,2) : c == 2 ? s(x,3) : s(x,0))\ + : r == 2 ? ( c == 0 ? s(x,2) : c == 1 ? s(x,3) : c == 2 ? s(x,0) : s(x,1))\ + : ( c == 0 ? s(x,3) : c == 1 ? s(x,0) : c == 2 ? s(x,1) : s(x,2))) + +#if defined(FT4_SET) +#undef dec_fmvars +#define fwd_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ four_tables(x,t_use(f,n),fwd_var,rf1,c)) +#elif defined(FT1_SET) +#undef dec_fmvars +#define fwd_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ one_table(x,upr,t_use(f,n),fwd_var,rf1,c)) +#else +#define fwd_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ fwd_mcol(no_table(x,t_use(s,box),fwd_var,rf1,c))) +#endif + +#if defined(FL4_SET) +#define fwd_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ four_tables(x,t_use(f,l),fwd_var,rf1,c)) +#elif defined(FL1_SET) +#define fwd_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ one_table(x,ups,t_use(f,l),fwd_var,rf1,c)) +#else +#define fwd_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ no_table(x,t_use(s,box),fwd_var,rf1,c)) +#endif + +aes_rval aes_encrypt(const void *in_blk, void *out_blk, const aes_encrypt_ctx cx[1]) +{ aes_32t locals(b0, b1); + const aes_32t *kp = cx->ks; +#ifdef dec_fmvars + dec_fmvars; /* declare variables for fwd_mcol() if needed */ +#endif + + aes_32t nr = (kp[45] ^ kp[52] ^ kp[53] ? kp[52] : 14); + +#ifdef AES_ERR_CHK + if( (nr != 10 || !(kp[0] | kp[3] | kp[4])) + && (nr != 12 || !(kp[0] | kp[5] | kp[6])) + && (nr != 14 || !(kp[0] | kp[7] | kp[8])) ) + return aes_error; +#endif + + state_in(b0, in_blk, kp); + +#if (ENC_UNROLL == FULL) + + switch(nr) + { + case 14: + round(fwd_rnd, b1, b0, kp + 1 * N_COLS); + round(fwd_rnd, b0, b1, kp + 2 * N_COLS); + kp += 2 * N_COLS; + case 12: + round(fwd_rnd, b1, b0, kp + 1 * N_COLS); + round(fwd_rnd, b0, b1, kp + 2 * N_COLS); + kp += 2 * N_COLS; + case 10: + round(fwd_rnd, b1, b0, kp + 1 * N_COLS); + round(fwd_rnd, b0, b1, kp + 2 * N_COLS); + round(fwd_rnd, b1, b0, kp + 3 * N_COLS); + round(fwd_rnd, b0, b1, kp + 4 * N_COLS); + round(fwd_rnd, b1, b0, kp + 5 * N_COLS); + round(fwd_rnd, b0, b1, kp + 6 * N_COLS); + round(fwd_rnd, b1, b0, kp + 7 * N_COLS); + round(fwd_rnd, b0, b1, kp + 8 * N_COLS); + round(fwd_rnd, b1, b0, kp + 9 * N_COLS); + round(fwd_lrnd, b0, b1, kp +10 * N_COLS); + } + +#else + +#if (ENC_UNROLL == PARTIAL) + { aes_32t rnd; + for(rnd = 0; rnd < (nr >> 1) - 1; ++rnd) + { + kp += N_COLS; + round(fwd_rnd, b1, b0, kp); + kp += N_COLS; + round(fwd_rnd, b0, b1, kp); + } + kp += N_COLS; + round(fwd_rnd, b1, b0, kp); +#else + { aes_32t rnd; + for(rnd = 0; rnd < nr - 1; ++rnd) + { + kp += N_COLS; + round(fwd_rnd, b1, b0, kp); + l_copy(b0, b1); + } +#endif + kp += N_COLS; + round(fwd_lrnd, b0, b1, kp); + } +#endif + + state_out(out_blk, b0); +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(DECRYPTION) && !defined(AES_ASM) + +/* Visual C++ .Net v7.1 provides the fastest encryption code when using + Pentium optimization with small code but this is poor for decryption + so we need to control this with the following VC++ pragmas +*/ + +#if defined(_MSC_VER) +#pragma optimize( "t", on ) +#endif + +/* Given the column (c) of the output state variable, the following + macros give the input state variables which are needed in its + computation for each row (r) of the state. All the alternative + macros give the same end values but expand into different ways + of calculating these values. In particular the complex macro + used for dynamically variable block sizes is designed to expand + to a compile time constant whenever possible but will expand to + conditional clauses on some branches (I am grateful to Frank + Yellin for this construction) +*/ + +#define inv_var(x,r,c)\ + ( r == 0 ? ( c == 0 ? s(x,0) : c == 1 ? s(x,1) : c == 2 ? s(x,2) : s(x,3))\ + : r == 1 ? ( c == 0 ? s(x,3) : c == 1 ? s(x,0) : c == 2 ? s(x,1) : s(x,2))\ + : r == 2 ? ( c == 0 ? s(x,2) : c == 1 ? s(x,3) : c == 2 ? s(x,0) : s(x,1))\ + : ( c == 0 ? s(x,1) : c == 1 ? s(x,2) : c == 2 ? s(x,3) : s(x,0))) + +#if defined(IT4_SET) +#undef dec_imvars +#define inv_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ four_tables(x,t_use(i,n),inv_var,rf1,c)) +#elif defined(IT1_SET) +#undef dec_imvars +#define inv_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ one_table(x,upr,t_use(i,n),inv_var,rf1,c)) +#else +#define inv_rnd(y,x,k,c) (s(y,c) = inv_mcol((k)[c] ^ no_table(x,t_use(i,box),inv_var,rf1,c))) +#endif + +#if defined(IL4_SET) +#define inv_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ four_tables(x,t_use(i,l),inv_var,rf1,c)) +#elif defined(IL1_SET) +#define inv_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ one_table(x,ups,t_use(i,l),inv_var,rf1,c)) +#else +#define inv_lrnd(y,x,k,c) (s(y,c) = (k)[c] ^ no_table(x,t_use(i,box),inv_var,rf1,c)) +#endif + +aes_rval aes_decrypt(const void *in_blk, void *out_blk, const aes_decrypt_ctx cx[1]) +{ aes_32t locals(b0, b1); +#ifdef dec_imvars + dec_imvars; /* declare variables for inv_mcol() if needed */ +#endif + + aes_32t nr = (cx->ks[45] ^ cx->ks[52] ^ cx->ks[53] ? cx->ks[52] : 14); + const aes_32t *kp = cx->ks + nr * N_COLS; + +#ifdef AES_ERR_CHK + if( (nr != 10 || !(cx->ks[0] | cx->ks[3] | cx->ks[4])) + && (nr != 12 || !(cx->ks[0] | cx->ks[5] | cx->ks[6])) + && (nr != 14 || !(cx->ks[0] | cx->ks[7] | cx->ks[8])) ) + return aes_error; +#endif + + state_in(b0, in_blk, kp); + +#if (DEC_UNROLL == FULL) + + switch(nr) + { + case 14: + round(inv_rnd, b1, b0, kp - 1 * N_COLS); + round(inv_rnd, b0, b1, kp - 2 * N_COLS); + kp -= 2 * N_COLS; + case 12: + round(inv_rnd, b1, b0, kp - 1 * N_COLS); + round(inv_rnd, b0, b1, kp - 2 * N_COLS); + kp -= 2 * N_COLS; + case 10: + round(inv_rnd, b1, b0, kp - 1 * N_COLS); + round(inv_rnd, b0, b1, kp - 2 * N_COLS); + round(inv_rnd, b1, b0, kp - 3 * N_COLS); + round(inv_rnd, b0, b1, kp - 4 * N_COLS); + round(inv_rnd, b1, b0, kp - 5 * N_COLS); + round(inv_rnd, b0, b1, kp - 6 * N_COLS); + round(inv_rnd, b1, b0, kp - 7 * N_COLS); + round(inv_rnd, b0, b1, kp - 8 * N_COLS); + round(inv_rnd, b1, b0, kp - 9 * N_COLS); + round(inv_lrnd, b0, b1, kp - 10 * N_COLS); + } + +#else + +#if (DEC_UNROLL == PARTIAL) + { aes_32t rnd; + for(rnd = 0; rnd < (nr >> 1) - 1; ++rnd) + { + kp -= N_COLS; + round(inv_rnd, b1, b0, kp); + kp -= N_COLS; + round(inv_rnd, b0, b1, kp); + } + kp -= N_COLS; + round(inv_rnd, b1, b0, kp); +#else + { aes_32t rnd; + for(rnd = 0; rnd < nr - 1; ++rnd) + { + kp -= N_COLS; + round(inv_rnd, b1, b0, kp); + l_copy(b0, b1); + } +#endif + kp -= N_COLS; + round(inv_lrnd, b0, b1, kp); + } +#endif + + state_out(out_blk, b0); +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aeskey.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aeskey.cpp new file mode 100644 index 0000000..12d4cbb --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aeskey.cpp @@ -0,0 +1,455 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2003, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This file contains the code for implementing the key schedule for AES + (Rijndael) for block and key sizes of 16, 24, and 32 bytes. See aesopt.h + for further details including optimisation. +*/ + +#include "aesopt.h" + +/* Initialise the key schedule from the user supplied key. The key + length can be specified in bytes, with legal values of 16, 24 + and 32, or in bits, with legal values of 128, 192 and 256. These + values correspond with Nk values of 4, 6 and 8 respectively. + + The following macros implement a single cycle in the key + schedule generation process. The number of cycles needed + for each cx->n_col and nk value is: + + nk = 4 5 6 7 8 + ------------------------------ + cx->n_col = 4 10 9 8 7 7 + cx->n_col = 5 14 11 10 9 9 + cx->n_col = 6 19 15 12 11 11 + cx->n_col = 7 21 19 16 13 14 + cx->n_col = 8 29 23 19 17 14 +*/ + +#define ke4(k,i) \ +{ k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; k[4*(i)+5] = ss[1] ^= ss[0]; \ + k[4*(i)+6] = ss[2] ^= ss[1]; k[4*(i)+7] = ss[3] ^= ss[2]; \ +} +#define kel4(k,i) \ +{ k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; k[4*(i)+5] = ss[1] ^= ss[0]; \ + k[4*(i)+6] = ss[2] ^= ss[1]; k[4*(i)+7] = ss[3] ^= ss[2]; \ +} + +#define ke6(k,i) \ +{ k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; k[6*(i)+ 7] = ss[1] ^= ss[0]; \ + k[6*(i)+ 8] = ss[2] ^= ss[1]; k[6*(i)+ 9] = ss[3] ^= ss[2]; \ + k[6*(i)+10] = ss[4] ^= ss[3]; k[6*(i)+11] = ss[5] ^= ss[4]; \ +} +#define kel6(k,i) \ +{ k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; k[6*(i)+ 7] = ss[1] ^= ss[0]; \ + k[6*(i)+ 8] = ss[2] ^= ss[1]; k[6*(i)+ 9] = ss[3] ^= ss[2]; \ +} + +#define ke8(k,i) \ +{ k[8*(i)+ 8] = ss[0] ^= ls_box(ss[7],3) ^ t_use(r,c)[i]; k[8*(i)+ 9] = ss[1] ^= ss[0]; \ + k[8*(i)+10] = ss[2] ^= ss[1]; k[8*(i)+11] = ss[3] ^= ss[2]; \ + k[8*(i)+12] = ss[4] ^= ls_box(ss[3],0); k[8*(i)+13] = ss[5] ^= ss[4]; \ + k[8*(i)+14] = ss[6] ^= ss[5]; k[8*(i)+15] = ss[7] ^= ss[6]; \ +} +#define kel8(k,i) \ +{ k[8*(i)+ 8] = ss[0] ^= ls_box(ss[7],3) ^ t_use(r,c)[i]; k[8*(i)+ 9] = ss[1] ^= ss[0]; \ + k[8*(i)+10] = ss[2] ^= ss[1]; k[8*(i)+11] = ss[3] ^= ss[2]; \ +} + +#if defined(ENCRYPTION_KEY_SCHEDULE) + +#if defined(AES_128) || defined(AES_VAR) + +aes_rval aes_encrypt_key128(const void *in_key, aes_encrypt_ctx cx[1]) +{ aes_32t ss[4]; + + cx->ks[0] = ss[0] = word_in(in_key, 0); + cx->ks[1] = ss[1] = word_in(in_key, 1); + cx->ks[2] = ss[2] = word_in(in_key, 2); + cx->ks[3] = ss[3] = word_in(in_key, 3); + +#if ENC_UNROLL == NONE + { aes_32t i; + + for(i = 0; i < ((11 * N_COLS - 1) / 4); ++i) + ke4(cx->ks, i); + } +#else + ke4(cx->ks, 0); ke4(cx->ks, 1); + ke4(cx->ks, 2); ke4(cx->ks, 3); + ke4(cx->ks, 4); ke4(cx->ks, 5); + ke4(cx->ks, 6); ke4(cx->ks, 7); + ke4(cx->ks, 8); kel4(cx->ks, 9); +#endif + + /* cx->ks[45] ^ cx->ks[52] ^ cx->ks[53] is zero for a 256 bit */ + /* key and must be non-zero for 128 and 192 bits keys */ + cx->ks[53] = cx->ks[45] = 0; + cx->ks[52] = 10; +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(AES_192) || defined(AES_VAR) + +aes_rval aes_encrypt_key192(const void *in_key, aes_encrypt_ctx cx[1]) +{ aes_32t ss[6]; + + cx->ks[0] = ss[0] = word_in(in_key, 0); + cx->ks[1] = ss[1] = word_in(in_key, 1); + cx->ks[2] = ss[2] = word_in(in_key, 2); + cx->ks[3] = ss[3] = word_in(in_key, 3); + cx->ks[4] = ss[4] = word_in(in_key, 4); + cx->ks[5] = ss[5] = word_in(in_key, 5); + +#if ENC_UNROLL == NONE + { aes_32t i; + + for(i = 0; i < (13 * N_COLS - 1) / 6; ++i) + ke6(cx->ks, i); + } +#else + ke6(cx->ks, 0); ke6(cx->ks, 1); + ke6(cx->ks, 2); ke6(cx->ks, 3); + ke6(cx->ks, 4); ke6(cx->ks, 5); + ke6(cx->ks, 6); kel6(cx->ks, 7); +#endif + + /* cx->ks[45] ^ cx->ks[52] ^ cx->ks[53] is zero for a 256 bit */ + /* key and must be non-zero for 128 and 192 bits keys */ + cx->ks[53] = cx->ks[45]; + cx->ks[52] = 12; +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(AES_256) || defined(AES_VAR) + +aes_rval aes_encrypt_key256(const void *in_key, aes_encrypt_ctx cx[1]) +{ aes_32t ss[8]; + + cx->ks[0] = ss[0] = word_in(in_key, 0); + cx->ks[1] = ss[1] = word_in(in_key, 1); + cx->ks[2] = ss[2] = word_in(in_key, 2); + cx->ks[3] = ss[3] = word_in(in_key, 3); + cx->ks[4] = ss[4] = word_in(in_key, 4); + cx->ks[5] = ss[5] = word_in(in_key, 5); + cx->ks[6] = ss[6] = word_in(in_key, 6); + cx->ks[7] = ss[7] = word_in(in_key, 7); + +#if ENC_UNROLL == NONE + { aes_32t i; + + for(i = 0; i < (15 * N_COLS - 1) / 8; ++i) + ke8(cx->ks, i); + } +#else + ke8(cx->ks, 0); ke8(cx->ks, 1); + ke8(cx->ks, 2); ke8(cx->ks, 3); + ke8(cx->ks, 4); ke8(cx->ks, 5); + kel8(cx->ks, 6); +#endif +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(AES_VAR) + +aes_rval aes_encrypt_key(const void *in_key, int key_len, aes_encrypt_ctx cx[1]) +{ + switch(key_len) + { +#ifdef AES_ERR_CHK + case 16: case 128: return aes_encrypt_key128(in_key, cx); + case 24: case 192: return aes_encrypt_key192(in_key, cx); + case 32: case 256: return aes_encrypt_key256(in_key, cx); + default: return aes_error; +#else + case 16: case 128: aes_encrypt_key128(in_key, cx); return; + case 24: case 192: aes_encrypt_key192(in_key, cx); return; + case 32: case 256: aes_encrypt_key256(in_key, cx); return; +#endif + } +} + +#endif + +#endif + +#if defined(DECRYPTION_KEY_SCHEDULE) + +#if DEC_ROUND == NO_TABLES +#define ff(x) (x) +#else +#define ff(x) inv_mcol(x) +#ifdef dec_imvars +#define d_vars dec_imvars +#endif +#endif + +#if 1 +#define kdf4(k,i) \ +{ ss[0] = ss[0] ^ ss[2] ^ ss[1] ^ ss[3]; ss[1] = ss[1] ^ ss[3]; ss[2] = ss[2] ^ ss[3]; ss[3] = ss[3]; \ + ss[4] = ls_box(ss[(i+3) % 4], 3) ^ t_use(r,c)[i]; ss[i % 4] ^= ss[4]; \ + ss[4] ^= k[4*(i)]; k[4*(i)+4] = ff(ss[4]); ss[4] ^= k[4*(i)+1]; k[4*(i)+5] = ff(ss[4]); \ + ss[4] ^= k[4*(i)+2]; k[4*(i)+6] = ff(ss[4]); ss[4] ^= k[4*(i)+3]; k[4*(i)+7] = ff(ss[4]); \ +} +#define kd4(k,i) \ +{ ss[4] = ls_box(ss[(i+3) % 4], 3) ^ t_use(r,c)[i]; ss[i % 4] ^= ss[4]; ss[4] = ff(ss[4]); \ + k[4*(i)+4] = ss[4] ^= k[4*(i)]; k[4*(i)+5] = ss[4] ^= k[4*(i)+1]; \ + k[4*(i)+6] = ss[4] ^= k[4*(i)+2]; k[4*(i)+7] = ss[4] ^= k[4*(i)+3]; \ +} +#define kdl4(k,i) \ +{ ss[4] = ls_box(ss[(i+3) % 4], 3) ^ t_use(r,c)[i]; ss[i % 4] ^= ss[4]; \ + k[4*(i)+4] = (ss[0] ^= ss[1]) ^ ss[2] ^ ss[3]; k[4*(i)+5] = ss[1] ^ ss[3]; \ + k[4*(i)+6] = ss[0]; k[4*(i)+7] = ss[1]; \ +} +#else +#define kdf4(k,i) \ +{ ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; k[4*(i)+ 4] = ff(ss[0]); ss[1] ^= ss[0]; k[4*(i)+ 5] = ff(ss[1]); \ + ss[2] ^= ss[1]; k[4*(i)+ 6] = ff(ss[2]); ss[3] ^= ss[2]; k[4*(i)+ 7] = ff(ss[3]); \ +} +#define kd4(k,i) \ +{ ss[4] = ls_box(ss[3],3) ^ t_use(r,c)[i]; \ + ss[0] ^= ss[4]; ss[4] = ff(ss[4]); k[4*(i)+ 4] = ss[4] ^= k[4*(i)]; \ + ss[1] ^= ss[0]; k[4*(i)+ 5] = ss[4] ^= k[4*(i)+ 1]; \ + ss[2] ^= ss[1]; k[4*(i)+ 6] = ss[4] ^= k[4*(i)+ 2]; \ + ss[3] ^= ss[2]; k[4*(i)+ 7] = ss[4] ^= k[4*(i)+ 3]; \ +} +#define kdl4(k,i) \ +{ ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; k[4*(i)+ 4] = ss[0]; ss[1] ^= ss[0]; k[4*(i)+ 5] = ss[1]; \ + ss[2] ^= ss[1]; k[4*(i)+ 6] = ss[2]; ss[3] ^= ss[2]; k[4*(i)+ 7] = ss[3]; \ +} +#endif + +#define kdf6(k,i) \ +{ ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; k[6*(i)+ 6] = ff(ss[0]); ss[1] ^= ss[0]; k[6*(i)+ 7] = ff(ss[1]); \ + ss[2] ^= ss[1]; k[6*(i)+ 8] = ff(ss[2]); ss[3] ^= ss[2]; k[6*(i)+ 9] = ff(ss[3]); \ + ss[4] ^= ss[3]; k[6*(i)+10] = ff(ss[4]); ss[5] ^= ss[4]; k[6*(i)+11] = ff(ss[5]); \ +} +#define kd6(k,i) \ +{ ss[6] = ls_box(ss[5],3) ^ t_use(r,c)[i]; \ + ss[0] ^= ss[6]; ss[6] = ff(ss[6]); k[6*(i)+ 6] = ss[6] ^= k[6*(i)]; \ + ss[1] ^= ss[0]; k[6*(i)+ 7] = ss[6] ^= k[6*(i)+ 1]; \ + ss[2] ^= ss[1]; k[6*(i)+ 8] = ss[6] ^= k[6*(i)+ 2]; \ + ss[3] ^= ss[2]; k[6*(i)+ 9] = ss[6] ^= k[6*(i)+ 3]; \ + ss[4] ^= ss[3]; k[6*(i)+10] = ss[6] ^= k[6*(i)+ 4]; \ + ss[5] ^= ss[4]; k[6*(i)+11] = ss[6] ^= k[6*(i)+ 5]; \ +} +#define kdl6(k,i) \ +{ ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; k[6*(i)+ 6] = ss[0]; ss[1] ^= ss[0]; k[6*(i)+ 7] = ss[1]; \ + ss[2] ^= ss[1]; k[6*(i)+ 8] = ss[2]; ss[3] ^= ss[2]; k[6*(i)+ 9] = ss[3]; \ +} + +#define kdf8(k,i) \ +{ ss[0] ^= ls_box(ss[7],3) ^ t_use(r,c)[i]; k[8*(i)+ 8] = ff(ss[0]); ss[1] ^= ss[0]; k[8*(i)+ 9] = ff(ss[1]); \ + ss[2] ^= ss[1]; k[8*(i)+10] = ff(ss[2]); ss[3] ^= ss[2]; k[8*(i)+11] = ff(ss[3]); \ + ss[4] ^= ls_box(ss[3],0); k[8*(i)+12] = ff(ss[4]); ss[5] ^= ss[4]; k[8*(i)+13] = ff(ss[5]); \ + ss[6] ^= ss[5]; k[8*(i)+14] = ff(ss[6]); ss[7] ^= ss[6]; k[8*(i)+15] = ff(ss[7]); \ +} +#define kd8(k,i) \ +{ aes_32t g = ls_box(ss[7],3) ^ t_use(r,c)[i]; \ + ss[0] ^= g; g = ff(g); k[8*(i)+ 8] = g ^= k[8*(i)]; \ + ss[1] ^= ss[0]; k[8*(i)+ 9] = g ^= k[8*(i)+ 1]; \ + ss[2] ^= ss[1]; k[8*(i)+10] = g ^= k[8*(i)+ 2]; \ + ss[3] ^= ss[2]; k[8*(i)+11] = g ^= k[8*(i)+ 3]; \ + g = ls_box(ss[3],0); \ + ss[4] ^= g; g = ff(g); k[8*(i)+12] = g ^= k[8*(i)+ 4]; \ + ss[5] ^= ss[4]; k[8*(i)+13] = g ^= k[8*(i)+ 5]; \ + ss[6] ^= ss[5]; k[8*(i)+14] = g ^= k[8*(i)+ 6]; \ + ss[7] ^= ss[6]; k[8*(i)+15] = g ^= k[8*(i)+ 7]; \ +} +#define kdl8(k,i) \ +{ ss[0] ^= ls_box(ss[7],3) ^ t_use(r,c)[i]; k[8*(i)+ 8] = ss[0]; ss[1] ^= ss[0]; k[8*(i)+ 9] = ss[1]; \ + ss[2] ^= ss[1]; k[8*(i)+10] = ss[2]; ss[3] ^= ss[2]; k[8*(i)+11] = ss[3]; \ +} + +#if defined(AES_128) || defined(AES_VAR) + +aes_rval aes_decrypt_key128(const void *in_key, aes_decrypt_ctx cx[1]) +{ aes_32t ss[5]; +#ifdef d_vars + d_vars; +#endif + cx->ks[0] = ss[0] = word_in(in_key, 0); + cx->ks[1] = ss[1] = word_in(in_key, 1); + cx->ks[2] = ss[2] = word_in(in_key, 2); + cx->ks[3] = ss[3] = word_in(in_key, 3); + +#if DEC_UNROLL == NONE + { aes_32t i; + + for(i = 0; i < (11 * N_COLS - 1) / 4; ++i) + ke4(cx->ks, i); +#if !(DEC_ROUND == NO_TABLES) + for(i = N_COLS; i < 10 * N_COLS; ++i) + cx->ks[i] = inv_mcol(cx->ks[i]); +#endif + } +#else + kdf4(cx->ks, 0); kd4(cx->ks, 1); + kd4(cx->ks, 2); kd4(cx->ks, 3); + kd4(cx->ks, 4); kd4(cx->ks, 5); + kd4(cx->ks, 6); kd4(cx->ks, 7); + kd4(cx->ks, 8); kdl4(cx->ks, 9); +#endif + + /* cx->ks[45] ^ cx->ks[52] ^ cx->ks[53] is zero for a 256 bit */ + /* key and must be non-zero for 128 and 192 bits keys */ + cx->ks[53] = cx->ks[45] = 0; + cx->ks[52] = 10; +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(AES_192) || defined(AES_VAR) + +aes_rval aes_decrypt_key192(const void *in_key, aes_decrypt_ctx cx[1]) +{ aes_32t ss[7]; +#ifdef d_vars + d_vars; +#endif + cx->ks[0] = ss[0] = word_in(in_key, 0); + cx->ks[1] = ss[1] = word_in(in_key, 1); + cx->ks[2] = ss[2] = word_in(in_key, 2); + cx->ks[3] = ss[3] = word_in(in_key, 3); + +#if DEC_UNROLL == NONE + cx->ks[4] = ss[4] = word_in(in_key, 4); + cx->ks[5] = ss[5] = word_in(in_key, 5); + { aes_32t i; + + for(i = 0; i < (13 * N_COLS - 1) / 6; ++i) + ke6(cx->ks, i); +#if !(DEC_ROUND == NO_TABLES) + for(i = N_COLS; i < 12 * N_COLS; ++i) + cx->ks[i] = inv_mcol(cx->ks[i]); +#endif + } +#else + cx->ks[4] = ff(ss[4] = word_in(in_key, 4)); + cx->ks[5] = ff(ss[5] = word_in(in_key, 5)); + kdf6(cx->ks, 0); kd6(cx->ks, 1); + kd6(cx->ks, 2); kd6(cx->ks, 3); + kd6(cx->ks, 4); kd6(cx->ks, 5); + kd6(cx->ks, 6); kdl6(cx->ks, 7); +#endif + + /* cx->ks[45] ^ cx->ks[52] ^ cx->ks[53] is zero for a 256 bit */ + /* key and must be non-zero for 128 and 192 bits keys */ + cx->ks[53] = cx->ks[45]; + cx->ks[52] = 12; +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(AES_256) || defined(AES_VAR) + +aes_rval aes_decrypt_key256(const void *in_key, aes_decrypt_ctx cx[1]) +{ aes_32t ss[8]; +#ifdef d_vars + d_vars; +#endif + cx->ks[0] = ss[0] = word_in(in_key, 0); + cx->ks[1] = ss[1] = word_in(in_key, 1); + cx->ks[2] = ss[2] = word_in(in_key, 2); + cx->ks[3] = ss[3] = word_in(in_key, 3); + +#if DEC_UNROLL == NONE + cx->ks[4] = ss[4] = word_in(in_key, 4); + cx->ks[5] = ss[5] = word_in(in_key, 5); + cx->ks[6] = ss[6] = word_in(in_key, 6); + cx->ks[7] = ss[7] = word_in(in_key, 7); + { aes_32t i; + + for(i = 0; i < (15 * N_COLS - 1) / 8; ++i) + ke8(cx->ks, i); +#if !(DEC_ROUND == NO_TABLES) + for(i = N_COLS; i < 14 * N_COLS; ++i) + cx->ks[i] = inv_mcol(cx->ks[i]); +#endif + } +#else + cx->ks[4] = ff(ss[4] = word_in(in_key, 4)); + cx->ks[5] = ff(ss[5] = word_in(in_key, 5)); + cx->ks[6] = ff(ss[6] = word_in(in_key, 6)); + cx->ks[7] = ff(ss[7] = word_in(in_key, 7)); + kdf8(cx->ks, 0); kd8(cx->ks, 1); + kd8(cx->ks, 2); kd8(cx->ks, 3); + kd8(cx->ks, 4); kd8(cx->ks, 5); + kdl8(cx->ks, 6); +#endif +#ifdef AES_ERR_CHK + return aes_good; +#endif +} + +#endif + +#if defined(AES_VAR) + +aes_rval aes_decrypt_key(const void *in_key, int key_len, aes_decrypt_ctx cx[1]) +{ + switch(key_len) + { +#ifdef AES_ERR_CHK + case 16: case 128: return aes_decrypt_key128(in_key, cx); + case 24: case 192: return aes_decrypt_key192(in_key, cx); + case 32: case 256: return aes_decrypt_key256(in_key, cx); + default: return aes_error; +#else + case 16: case 128: aes_decrypt_key128(in_key, cx); return; + case 24: case 192: aes_decrypt_key192(in_key, cx); return; + case 32: case 256: aes_decrypt_key256(in_key, cx); return; +#endif + } +} + +#endif + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aesopt.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aesopt.h new file mode 100644 index 0000000..9c0d842 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aesopt.h @@ -0,0 +1,955 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2003, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + My thanks go to Dag Arne Osvik for devising the schemes used here for key + length derivation from the form of the key schedule + + This file contains the compilation options for AES (Rijndael) and code + that is common across encryption, key scheduling and table generation. + + OPERATION + + These source code files implement the AES algorithm Rijndael designed by + Joan Daemen and Vincent Rijmen. This version is designed for the standard + block size of 16 bytes and for key sizes of 128, 192 and 256 bits (16, 24 + and 32 bytes). + + This version is designed for flexibility and speed using operations on + 32-bit words rather than operations on bytes. It can be compiled with + either big or little endian internal byte order but is faster when the + native byte order for the processor is used. + + THE CIPHER INTERFACE + + The cipher interface is implemented as an array of bytes in which lower + AES bit sequence indexes map to higher numeric significance within bytes. + + aes_08t (an unsigned 8-bit type) + aes_32t (an unsigned 32-bit type) + struct aes_encrypt_ctx (structure for the cipher encryption context) + struct aes_decrypt_ctx (structure for the cipher decryption context) + aes_rval the function return type + + C subroutine calls: + + aes_rval aes_encrypt_key128(const void *in_key, aes_encrypt_ctx cx[1]); + aes_rval aes_encrypt_key192(const void *in_key, aes_encrypt_ctx cx[1]); + aes_rval aes_encrypt_key256(const void *in_key, aes_encrypt_ctx cx[1]); + aes_rval aes_encrypt(const void *in_blk, + void *out_blk, const aes_encrypt_ctx cx[1]); + + aes_rval aes_decrypt_key128(const void *in_key, aes_decrypt_ctx cx[1]); + aes_rval aes_decrypt_key192(const void *in_key, aes_decrypt_ctx cx[1]); + aes_rval aes_decrypt_key256(const void *in_key, aes_decrypt_ctx cx[1]); + aes_rval aes_decrypt(const void *in_blk, + void *out_blk, const aes_decrypt_ctx cx[1]); + + IMPORTANT NOTE: If you are using this C interface with dynamic tables make sure that + you call genTabs() before AES is used so that the tables are initialised. + + C++ aes class subroutines: + + Class AESencrypt for encryption + + Construtors: + AESencrypt(void) + AESencrypt(const void *in_key) - 128 bit key + Members: + void key128(const void *in_key) + void key192(const void *in_key) + void key256(const void *in_key) + void encrypt(const void *in_blk, void *out_blk) const + + Class AESdecrypt for encryption + Construtors: + AESdecrypt(void) + AESdecrypt(const void *in_key) - 128 bit key + Members: + void key128(const void *in_key) + void key192(const void *in_key) + void key256(const void *in_key) + void decrypt(const void *in_blk, void *out_blk) const + + COMPILATION + + The files used to provide AES (Rijndael) are + + a. aes.h for the definitions needed for use in C. + b. aescpp.h for the definitions needed for use in C++. + c. aesopt.h for setting compilation options (also includes common code). + d. aescrypt.c for encryption and decrytpion, or + e. aeskey.c for key scheduling. + f. aestab.c for table loading or generation. + g. aescrypt.asm for encryption and decryption using assembler code. + h. aescrypt.mmx.asm for encryption and decryption using MMX assembler. + + To compile AES (Rijndael) for use in C code use aes.h and set the + defines here for the facilities you need (key lengths, encryption + and/or decryption). Do not define AES_DLL or AES_CPP. Set the options + for optimisations and table sizes here. + + To compile AES (Rijndael) for use in in C++ code use aescpp.h but do + not define AES_DLL + + To compile AES (Rijndael) in C as a Dynamic Link Library DLL) use + aes.h and include the AES_DLL define. + + CONFIGURATION OPTIONS (here and in aes.h) + + a. set AES_DLL in aes.h if AES (Rijndael) is to be compiled as a DLL + b. You may need to set PLATFORM_BYTE_ORDER to define the byte order. + c. If you want the code to run in a specific internal byte order, then + ALGORITHM_BYTE_ORDER must be set accordingly. + d. set other configuration options decribed below. +*/ + +#ifndef _AESOPT_H +#define _AESOPT_H + +#include "aes.h" + +/* CONFIGURATION - USE OF DEFINES + + Later in this section there are a number of defines that control the + operation of the code. In each section, the purpose of each define is + explained so that the relevant form can be included or excluded by + setting either 1's or 0's respectively on the branches of the related + #if clauses. +*/ + +/* BYTE ORDER IN 32-BIT WORDS + + To obtain the highest speed on processors with 32-bit words, this code + needs to determine the byte order of the target machine. The following + block of code is an attempt to capture the most obvious ways in which + various environemnts define byte order. It may well fail, in which case + the definitions will need to be set by editing at the points marked + **** EDIT HERE IF NECESSARY **** below. My thanks to Peter Gutmann for + some of these defines (from cryptlib). +*/ + +#define BRG_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ +#define BRG_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ + +#ifdef __BIG_ENDIAN__ +#define PLATFORM_BYTE_ORDER BRG_BIG_ENDIAN +#else +#define PLATFORM_BYTE_ORDER BRG_LITTLE_ENDIAN +#endif + +/* SOME LOCAL DEFINITIONS */ + +#define NO_TABLES 0 +#define ONE_TABLE 1 +#define FOUR_TABLES 4 +#define NONE 0 +#define PARTIAL 1 +#define FULL 2 + +#define aes_sw32 Byteswap::byteswap + +/* 1. FUNCTIONS REQUIRED + + This implementation provides subroutines for encryption, decryption + and for setting the three key lengths (separately) for encryption + and decryption. When the assembler code is not being used the following + definition blocks allow the selection of the routines that are to be + included in the compilation. +*/ +#ifdef AES_ENCRYPT +#define ENCRYPTION +#define ENCRYPTION_KEY_SCHEDULE +#endif + +#ifdef AES_DECRYPT +#define DECRYPTION +#define DECRYPTION_KEY_SCHEDULE +#endif + +/* 2. ASSEMBLER SUPPORT + + This define (which can be on the command line) enables the use of the + assembler code routines for encryption and decryption with the C code + only providing key scheduling +*/ +#if 0 +#define AES_ASM +#endif + +/* 3. BYTE ORDER WITHIN 32 BIT WORDS + + The fundamental data processing units in Rijndael are 8-bit bytes. The + input, output and key input are all enumerated arrays of bytes in which + bytes are numbered starting at zero and increasing to one less than the + number of bytes in the array in question. This enumeration is only used + for naming bytes and does not imply any adjacency or order relationship + from one byte to another. When these inputs and outputs are considered + as bit sequences, bits 8*n to 8*n+7 of the bit sequence are mapped to + byte[n] with bit 8n+i in the sequence mapped to bit 7-i within the byte. + In this implementation bits are numbered from 0 to 7 starting at the + numerically least significant end of each byte (bit n represents 2^n). + + However, Rijndael can be implemented more efficiently using 32-bit + words by packing bytes into words so that bytes 4*n to 4*n+3 are placed + into word[n]. While in principle these bytes can be assembled into words + in any positions, this implementation only supports the two formats in + which bytes in adjacent positions within words also have adjacent byte + numbers. This order is called big-endian if the lowest numbered bytes + in words have the highest numeric significance and little-endian if the + opposite applies. + + This code can work in either order irrespective of the order used by the + machine on which it runs. Normally the internal byte order will be set + to the order of the processor on which the code is to be run but this + define can be used to reverse this in special situations + + NOTE: Assembler code versions rely on PLATFORM_BYTE_ORDER being set +*/ +#if 1 || defined(AES_ASM) +#define ALGORITHM_BYTE_ORDER PLATFORM_BYTE_ORDER +#elif 0 +#define ALGORITHM_BYTE_ORDER BRG_LITTLE_ENDIAN +#elif 0 +#define ALGORITHM_BYTE_ORDER BRG_BIG_ENDIAN +#else +#error The algorithm byte order is not defined +#endif + +/* 4. FAST INPUT/OUTPUT OPERATIONS. + + On some machines it is possible to improve speed by transferring the + bytes in the input and output arrays to and from the internal 32-bit + variables by addressing these arrays as if they are arrays of 32-bit + words. On some machines this will always be possible but there may + be a large performance penalty if the byte arrays are not aligned on + the normal word boundaries. On other machines this technique will + lead to memory access errors when such 32-bit word accesses are not + properly aligned. The option SAFE_IO avoids such problems but will + often be slower on those machines that support misaligned access + (especially so if care is taken to align the input and output byte + arrays on 32-bit word boundaries). If SAFE_IO is not defined it is + assumed that access to byte arrays as if they are arrays of 32-bit + words will not cause problems when such accesses are misaligned. +*/ +#if 1 && !defined(_MSC_VER) +#define SAFE_IO +#endif + +/* 5. LOOP UNROLLING + + The code for encryption and decrytpion cycles through a number of rounds + that can be implemented either in a loop or by expanding the code into a + long sequence of instructions, the latter producing a larger program but + one that will often be much faster. The latter is called loop unrolling. + There are also potential speed advantages in expanding two iterations in + a loop with half the number of iterations, which is called partial loop + unrolling. The following options allow partial or full loop unrolling + to be set independently for encryption and decryption +*/ +#if 1 +#define ENC_UNROLL FULL +#elif 0 +#define ENC_UNROLL PARTIAL +#else +#define ENC_UNROLL NONE +#endif + +#if 1 +#define DEC_UNROLL FULL +#elif 0 +#define DEC_UNROLL PARTIAL +#else +#define DEC_UNROLL NONE +#endif + +/* 6. FAST FINITE FIELD OPERATIONS + + If this section is included, tables are used to provide faster finite + field arithmetic (this has no effect if FIXED_TABLES is defined). +*/ +#if 0 +#define FF_TABLES +#endif + +/* 7. INTERNAL STATE VARIABLE FORMAT + + The internal state of Rijndael is stored in a number of local 32-bit + word varaibles which can be defined either as an array or as individual + names variables. Include this section if you want to store these local + varaibles in arrays. Otherwise individual local variables will be used. +*/ +#if 1 +#define ARRAYS +#endif + +/* In this implementation the columns of the state array are each held in + 32-bit words. The state array can be held in various ways: in an array + of words, in a number of individual word variables or in a number of + processor registers. The following define maps a variable name x and + a column number c to the way the state array variable is to be held. + The first define below maps the state into an array x[c] whereas the + second form maps the state into a number of individual variables x0, + x1, etc. Another form could map individual state colums to machine + register names. +*/ + +#if defined(ARRAYS) +#define s(x,c) x[c] +#else +#define s(x,c) x##c +#endif + +/* 8. FIXED OR DYNAMIC TABLES + + When this section is included the tables used by the code are compiled + statically into the binary file. Otherwise the subroutine gen_tabs() + must be called to compute them before the code is first used. +*/ +#if 1 +#define FIXED_TABLES +#define DO_TABLES +#endif + +/* 9. TABLE ALIGNMENT + + On some systems speed will be improved by aligning the AES large lookup + tables on particular boundaries. This define should be set to a power of + two giving the desired alignment. It can be left undefined if alignment + is not needed. This option is specific to the Microsft VC++ compiler - + it seems to sometimes cause trouble for the VC++ version 6 compiler. +*/ + +#if 0 && defined(_MSC_VER) && (_MSC_VER >= 1300) +#define TABLE_ALIGN 64 +#endif + +/* 10. INTERNAL TABLE CONFIGURATION + + This cipher proceeds by repeating in a number of cycles known as 'rounds' + which are implemented by a round function which can optionally be speeded + up using tables. The basic tables are each 256 32-bit words, with either + one or four tables being required for each round function depending on + how much speed is required. The encryption and decryption round functions + are different and the last encryption and decrytpion round functions are + different again making four different round functions in all. + + This means that: + 1. Normal encryption and decryption rounds can each use either 0, 1 + or 4 tables and table spaces of 0, 1024 or 4096 bytes each. + 2. The last encryption and decryption rounds can also use either 0, 1 + or 4 tables and table spaces of 0, 1024 or 4096 bytes each. + + Include or exclude the appropriate definitions below to set the number + of tables used by this implementation. +*/ + +#if 1 /* set tables for the normal encryption round */ +#define ENC_ROUND FOUR_TABLES +#elif 0 +#define ENC_ROUND ONE_TABLE +#else +#define ENC_ROUND NO_TABLES +#endif + +#if 1 /* set tables for the last encryption round */ +#define LAST_ENC_ROUND FOUR_TABLES +#elif 0 +#define LAST_ENC_ROUND ONE_TABLE +#else +#define LAST_ENC_ROUND NO_TABLES +#endif + +#if 1 /* set tables for the normal decryption round */ +#define DEC_ROUND FOUR_TABLES +#elif 0 +#define DEC_ROUND ONE_TABLE +#else +#define DEC_ROUND NO_TABLES +#endif + +#if 1 /* set tables for the last decryption round */ +#define LAST_DEC_ROUND FOUR_TABLES +#elif 0 +#define LAST_DEC_ROUND ONE_TABLE +#else +#define LAST_DEC_ROUND NO_TABLES +#endif + +/* The decryption key schedule can be speeded up with tables in the same + way that the round functions can. Include or exclude the following + defines to set this requirement. +*/ +#if 1 +#define KEY_SCHED FOUR_TABLES +#elif 0 +#define KEY_SCHED ONE_TABLE +#else +#define KEY_SCHED NO_TABLES +#endif + +/* END OF CONFIGURATION OPTIONS */ + +#define RC_LENGTH (5 * (AES_BLOCK_SIZE / 4 - 2)) + +/* Disable or report errors on some combinations of options */ + +#if ENC_ROUND == NO_TABLES && LAST_ENC_ROUND != NO_TABLES +#undef LAST_ENC_ROUND +#define LAST_ENC_ROUND NO_TABLES +#elif ENC_ROUND == ONE_TABLE && LAST_ENC_ROUND == FOUR_TABLES +#undef LAST_ENC_ROUND +#define LAST_ENC_ROUND ONE_TABLE +#endif + +#if ENC_ROUND == NO_TABLES && ENC_UNROLL != NONE +#undef ENC_UNROLL +#define ENC_UNROLL NONE +#endif + +#if DEC_ROUND == NO_TABLES && LAST_DEC_ROUND != NO_TABLES +#undef LAST_DEC_ROUND +#define LAST_DEC_ROUND NO_TABLES +#elif DEC_ROUND == ONE_TABLE && LAST_DEC_ROUND == FOUR_TABLES +#undef LAST_DEC_ROUND +#define LAST_DEC_ROUND ONE_TABLE +#endif + +#if DEC_ROUND == NO_TABLES && DEC_UNROLL != NONE +#undef DEC_UNROLL +#define DEC_UNROLL NONE +#endif + +/* upr(x,n): rotates bytes within words by n positions, moving bytes to + higher index positions with wrap around into low positions + ups(x,n): moves bytes by n positions to higher index positions in + words but without wrap around + bval(x,n): extracts a byte from a word + + NOTE: The definitions given here are intended only for use with + unsigned variables and with shift counts that are compile + time constants +*/ + +#if (ALGORITHM_BYTE_ORDER == BRG_LITTLE_ENDIAN) +#define upr(x,n) (((aes_32t)(x) << (8 * (n))) | ((aes_32t)(x) >> (32 - 8 * (n)))) +#define ups(x,n) ((aes_32t) (x) << (8 * (n))) +#define bval(x,n) ((aes_08t)((x) >> (8 * (n)))) +#define bytes2word(b0, b1, b2, b3) \ + (((aes_32t)(b3) << 24) | ((aes_32t)(b2) << 16) | ((aes_32t)(b1) << 8) | (b0)) +#endif + +#if (ALGORITHM_BYTE_ORDER == BRG_BIG_ENDIAN) +#define upr(x,n) (((aes_32t)(x) >> (8 * (n))) | ((aes_32t)(x) << (32 - 8 * (n)))) +#define ups(x,n) ((aes_32t) (x) >> (8 * (n)))) +#define bval(x,n) ((aes_08t)((x) >> (24 - 8 * (n)))) +#define bytes2word(b0, b1, b2, b3) \ + (((aes_32t)(b0) << 24) | ((aes_32t)(b1) << 16) | ((aes_32t)(b2) << 8) | (b3)) +#endif + +#if defined(SAFE_IO) + +#define word_in(x,c) bytes2word(((aes_08t*)(x)+4*c)[0], ((aes_08t*)(x)+4*c)[1], \ + ((aes_08t*)(x)+4*c)[2], ((aes_08t*)(x)+4*c)[3]) +#define word_out(x,c,v) { ((aes_08t*)(x)+4*c)[0] = bval(v,0); ((aes_08t*)(x)+4*c)[1] = bval(v,1); \ + ((aes_08t*)(x)+4*c)[2] = bval(v,2); ((aes_08t*)(x)+4*c)[3] = bval(v,3); } + +#elif (ALGORITHM_BYTE_ORDER == PLATFORM_BYTE_ORDER) + +#define word_in(x,c) (*((aes_32t*)(x)+(c))) +#define word_out(x,c,v) (*((aes_32t*)(x)+(c)) = (v)) + +#else + +#define word_in(x,c) aes_sw32(*((aes_32t*)(x)+(c))) +#define word_out(x,c,v) (*((aes_32t*)(x)+(c)) = aes_sw32(v)) + +#endif + +/* the finite field modular polynomial and elements */ + +#define WPOLY 0x011b +#define BPOLY 0x1b + +/* multiply four bytes in GF(2^8) by 'x' {02} in parallel */ + +#define m1 0x80808080 +#define m2 0x7f7f7f7f +#define gf_mulx(x) ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * BPOLY)) + +/* The following defines provide alternative definitions of gf_mulx that might + give improved performance if a fast 32-bit multiply is not available. Note + that a temporary variable u needs to be defined where gf_mulx is used. + +#define gf_mulx(x) (u = (x) & m1, u |= (u >> 1), ((x) & m2) << 1) ^ ((u >> 3) | (u >> 6)) +#define m4 (0x01010101 * BPOLY) +#define gf_mulx(x) (u = (x) & m1, ((x) & m2) << 1) ^ ((u - (u >> 7)) & m4) +*/ + +/* Work out which tables are needed for the different options */ + +#ifdef AES_ASM +#ifdef ENC_ROUND +#undef ENC_ROUND +#endif +#define ENC_ROUND FOUR_TABLES +#ifdef LAST_ENC_ROUND +#undef LAST_ENC_ROUND +#endif +#define LAST_ENC_ROUND FOUR_TABLES +#ifdef DEC_ROUND +#undef DEC_ROUND +#endif +#define DEC_ROUND FOUR_TABLES +#ifdef LAST_DEC_ROUND +#undef LAST_DEC_ROUND +#endif +#define LAST_DEC_ROUND FOUR_TABLES +#ifdef KEY_SCHED +#undef KEY_SCHED +#define KEY_SCHED FOUR_TABLES +#endif +#endif + +#if defined(ENCRYPTION) || defined(AES_ASM) +#if ENC_ROUND == ONE_TABLE +#define FT1_SET +#elif ENC_ROUND == FOUR_TABLES +#define FT4_SET +#else +#define SBX_SET +#endif +#if LAST_ENC_ROUND == ONE_TABLE +#define FL1_SET +#elif LAST_ENC_ROUND == FOUR_TABLES +#define FL4_SET +#elif !defined(SBX_SET) +#define SBX_SET +#endif +#endif + +#if defined(DECRYPTION) || defined(AES_ASM) +#if DEC_ROUND == ONE_TABLE +#define IT1_SET +#elif DEC_ROUND == FOUR_TABLES +#define IT4_SET +#else +#define ISB_SET +#endif +#if LAST_DEC_ROUND == ONE_TABLE +#define IL1_SET +#elif LAST_DEC_ROUND == FOUR_TABLES +#define IL4_SET +#elif !defined(ISB_SET) +#define ISB_SET +#endif +#endif + +#if defined(ENCRYPTION_KEY_SCHEDULE) || defined(DECRYPTION_KEY_SCHEDULE) +#if KEY_SCHED == ONE_TABLE +#define LS1_SET +#define IM1_SET +#elif KEY_SCHED == FOUR_TABLES +#define LS4_SET +#define IM4_SET +#elif !defined(SBX_SET) +#define SBX_SET +#endif +#endif + +/* generic definitions of Rijndael macros that use tables */ + +#define no_table(x,box,vf,rf,c) bytes2word( \ + box[bval(vf(x,0,c),rf(0,c))], \ + box[bval(vf(x,1,c),rf(1,c))], \ + box[bval(vf(x,2,c),rf(2,c))], \ + box[bval(vf(x,3,c),rf(3,c))]) + +#define one_table(x,op,tab,vf,rf,c) \ + ( tab[bval(vf(x,0,c),rf(0,c))] \ + ^ op(tab[bval(vf(x,1,c),rf(1,c))],1) \ + ^ op(tab[bval(vf(x,2,c),rf(2,c))],2) \ + ^ op(tab[bval(vf(x,3,c),rf(3,c))],3)) + +#define four_tables(x,tab,vf,rf,c) \ + ( tab[0][bval(vf(x,0,c),rf(0,c))] \ + ^ tab[1][bval(vf(x,1,c),rf(1,c))] \ + ^ tab[2][bval(vf(x,2,c),rf(2,c))] \ + ^ tab[3][bval(vf(x,3,c),rf(3,c))]) + +#define vf1(x,r,c) (x) +#define rf1(r,c) (r) +#define rf2(r,c) ((8+r-c)&3) + +/* perform forward and inverse column mix operation on four bytes in long word x in */ +/* parallel. NOTE: x must be a simple variable, NOT an expression in these macros. */ + +#if defined(FM4_SET) /* not currently used */ +#define fwd_mcol(x) four_tables(x,t_use(f,m),vf1,rf1,0) +#elif defined(FM1_SET) /* not currently used */ +#define fwd_mcol(x) one_table(x,upr,t_use(f,m),vf1,rf1,0) +#else +#define dec_fmvars aes_32t g2 +#define fwd_mcol(x) (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1)) +#endif + +#if defined(IM4_SET) +#define inv_mcol(x) four_tables(x,t_use(i,m),vf1,rf1,0) +#elif defined(IM1_SET) +#define inv_mcol(x) one_table(x,upr,t_use(i,m),vf1,rf1,0) +#else +#define dec_imvars aes_32t g2, g4, g9 +#define inv_mcol(x) (g2 = gf_mulx(x), g4 = gf_mulx(g2), g9 = (x) ^ gf_mulx(g4), g4 ^= g9, \ + (x) ^ g2 ^ g4 ^ upr(g2 ^ g9, 3) ^ upr(g4, 2) ^ upr(g9, 1)) +#endif + +#if defined(FL4_SET) +#define ls_box(x,c) four_tables(x,t_use(f,l),vf1,rf2,c) +#elif defined(LS4_SET) +#define ls_box(x,c) four_tables(x,t_use(l,s),vf1,rf2,c) +#elif defined(FL1_SET) +#define ls_box(x,c) one_table(x,upr,t_use(f,l),vf1,rf2,c) +#elif defined(LS1_SET) +#define ls_box(x,c) one_table(x,upr,t_use(l,s),vf1,rf2,c) +#else +#define ls_box(x,c) no_table(x,t_use(s,box),vf1,rf2,c) +#endif + +/* If there are no global variables, the definitions here can be + used to put the AES tables in a structure so that a pointer + can then be added to the AES context to pass them to the AES + routines that need them. If this facility is used, the calling + program has to ensure that this pointer is managed appropriately. + In particular, the value of the t_dec(in,it) item in the table + structure must be set to zero in order to ensure that the tables + are initialised. In practice the three code sequences in aeskey.c + that control the calls to gen_tabs() and the gen_tabs() routine + itself will have to be changed for a specific implementation. If + global variables are available it will generally be preferable to + use them with the precomputed FIXED_TABLES option that uses static + global tables. + + The following defines can be used to control the way the tables + are defined, initialised and used in embedded environments that + require special features for these purposes + + the 't_dec' construction is used to declare fixed table arrays + the 't_set' construction is used to set fixed table values + the 't_use' construction is used to access fixed table values + + 256 byte tables: + + t_xxx(s,box) => forward S box + t_xxx(i,box) => inverse S box + + 256 32-bit word OR 4 x 256 32-bit word tables: + + t_xxx(f,n) => forward normal round + t_xxx(f,l) => forward last round + t_xxx(i,n) => inverse normal round + t_xxx(i,l) => inverse last round + t_xxx(l,s) => key schedule table + t_xxx(i,m) => key schedule table + + Other variables and tables: + + t_xxx(r,c) => the rcon table +*/ + +#define t_dec(m,n) t_##m##n +#define t_set(m,n) t_##m##n +#define t_use(m,n) t_##m##n + +#if defined(DO_TABLES) /* declare and instantiate tables */ + +/* finite field arithmetic operations for table generation */ + +#if defined(FIXED_TABLES) || !defined(FF_TABLES) + +#define f2(x) ((x<<1) ^ (((x>>7) & 1) * WPOLY)) +#define f4(x) ((x<<2) ^ (((x>>6) & 1) * WPOLY) ^ (((x>>6) & 2) * WPOLY)) +#define f8(x) ((x<<3) ^ (((x>>5) & 1) * WPOLY) ^ (((x>>5) & 2) * WPOLY) \ + ^ (((x>>5) & 4) * WPOLY)) +#define f3(x) (f2(x) ^ x) +#define f9(x) (f8(x) ^ x) +#define fb(x) (f8(x) ^ f2(x) ^ x) +#define fd(x) (f8(x) ^ f4(x) ^ x) +#define fe(x) (f8(x) ^ f4(x) ^ f2(x)) + +#else + +#define f2(x) ((x) ? pow[log[x] + 0x19] : 0) +#define f3(x) ((x) ? pow[log[x] + 0x01] : 0) +#define f9(x) ((x) ? pow[log[x] + 0xc7] : 0) +#define fb(x) ((x) ? pow[log[x] + 0x68] : 0) +#define fd(x) ((x) ? pow[log[x] + 0xee] : 0) +#define fe(x) ((x) ? pow[log[x] + 0xdf] : 0) +#define fi(x) ((x) ? pow[ 255 - log[x]] : 0) + +#endif + +#if defined(FIXED_TABLES) /* declare and set values for static tables */ + +#define sb_data(w) \ + w(0x63), w(0x7c), w(0x77), w(0x7b), w(0xf2), w(0x6b), w(0x6f), w(0xc5),\ + w(0x30), w(0x01), w(0x67), w(0x2b), w(0xfe), w(0xd7), w(0xab), w(0x76),\ + w(0xca), w(0x82), w(0xc9), w(0x7d), w(0xfa), w(0x59), w(0x47), w(0xf0),\ + w(0xad), w(0xd4), w(0xa2), w(0xaf), w(0x9c), w(0xa4), w(0x72), w(0xc0),\ + w(0xb7), w(0xfd), w(0x93), w(0x26), w(0x36), w(0x3f), w(0xf7), w(0xcc),\ + w(0x34), w(0xa5), w(0xe5), w(0xf1), w(0x71), w(0xd8), w(0x31), w(0x15),\ + w(0x04), w(0xc7), w(0x23), w(0xc3), w(0x18), w(0x96), w(0x05), w(0x9a),\ + w(0x07), w(0x12), w(0x80), w(0xe2), w(0xeb), w(0x27), w(0xb2), w(0x75),\ + w(0x09), w(0x83), w(0x2c), w(0x1a), w(0x1b), w(0x6e), w(0x5a), w(0xa0),\ + w(0x52), w(0x3b), w(0xd6), w(0xb3), w(0x29), w(0xe3), w(0x2f), w(0x84),\ + w(0x53), w(0xd1), w(0x00), w(0xed), w(0x20), w(0xfc), w(0xb1), w(0x5b),\ + w(0x6a), w(0xcb), w(0xbe), w(0x39), w(0x4a), w(0x4c), w(0x58), w(0xcf),\ + w(0xd0), w(0xef), w(0xaa), w(0xfb), w(0x43), w(0x4d), w(0x33), w(0x85),\ + w(0x45), w(0xf9), w(0x02), w(0x7f), w(0x50), w(0x3c), w(0x9f), w(0xa8),\ + w(0x51), w(0xa3), w(0x40), w(0x8f), w(0x92), w(0x9d), w(0x38), w(0xf5),\ + w(0xbc), w(0xb6), w(0xda), w(0x21), w(0x10), w(0xff), w(0xf3), w(0xd2),\ + w(0xcd), w(0x0c), w(0x13), w(0xec), w(0x5f), w(0x97), w(0x44), w(0x17),\ + w(0xc4), w(0xa7), w(0x7e), w(0x3d), w(0x64), w(0x5d), w(0x19), w(0x73),\ + w(0x60), w(0x81), w(0x4f), w(0xdc), w(0x22), w(0x2a), w(0x90), w(0x88),\ + w(0x46), w(0xee), w(0xb8), w(0x14), w(0xde), w(0x5e), w(0x0b), w(0xdb),\ + w(0xe0), w(0x32), w(0x3a), w(0x0a), w(0x49), w(0x06), w(0x24), w(0x5c),\ + w(0xc2), w(0xd3), w(0xac), w(0x62), w(0x91), w(0x95), w(0xe4), w(0x79),\ + w(0xe7), w(0xc8), w(0x37), w(0x6d), w(0x8d), w(0xd5), w(0x4e), w(0xa9),\ + w(0x6c), w(0x56), w(0xf4), w(0xea), w(0x65), w(0x7a), w(0xae), w(0x08),\ + w(0xba), w(0x78), w(0x25), w(0x2e), w(0x1c), w(0xa6), w(0xb4), w(0xc6),\ + w(0xe8), w(0xdd), w(0x74), w(0x1f), w(0x4b), w(0xbd), w(0x8b), w(0x8a),\ + w(0x70), w(0x3e), w(0xb5), w(0x66), w(0x48), w(0x03), w(0xf6), w(0x0e),\ + w(0x61), w(0x35), w(0x57), w(0xb9), w(0x86), w(0xc1), w(0x1d), w(0x9e),\ + w(0xe1), w(0xf8), w(0x98), w(0x11), w(0x69), w(0xd9), w(0x8e), w(0x94),\ + w(0x9b), w(0x1e), w(0x87), w(0xe9), w(0xce), w(0x55), w(0x28), w(0xdf),\ + w(0x8c), w(0xa1), w(0x89), w(0x0d), w(0xbf), w(0xe6), w(0x42), w(0x68),\ + w(0x41), w(0x99), w(0x2d), w(0x0f), w(0xb0), w(0x54), w(0xbb), w(0x16) + +#define isb_data(w) \ + w(0x52), w(0x09), w(0x6a), w(0xd5), w(0x30), w(0x36), w(0xa5), w(0x38),\ + w(0xbf), w(0x40), w(0xa3), w(0x9e), w(0x81), w(0xf3), w(0xd7), w(0xfb),\ + w(0x7c), w(0xe3), w(0x39), w(0x82), w(0x9b), w(0x2f), w(0xff), w(0x87),\ + w(0x34), w(0x8e), w(0x43), w(0x44), w(0xc4), w(0xde), w(0xe9), w(0xcb),\ + w(0x54), w(0x7b), w(0x94), w(0x32), w(0xa6), w(0xc2), w(0x23), w(0x3d),\ + w(0xee), w(0x4c), w(0x95), w(0x0b), w(0x42), w(0xfa), w(0xc3), w(0x4e),\ + w(0x08), w(0x2e), w(0xa1), w(0x66), w(0x28), w(0xd9), w(0x24), w(0xb2),\ + w(0x76), w(0x5b), w(0xa2), w(0x49), w(0x6d), w(0x8b), w(0xd1), w(0x25),\ + w(0x72), w(0xf8), w(0xf6), w(0x64), w(0x86), w(0x68), w(0x98), w(0x16),\ + w(0xd4), w(0xa4), w(0x5c), w(0xcc), w(0x5d), w(0x65), w(0xb6), w(0x92),\ + w(0x6c), w(0x70), w(0x48), w(0x50), w(0xfd), w(0xed), w(0xb9), w(0xda),\ + w(0x5e), w(0x15), w(0x46), w(0x57), w(0xa7), w(0x8d), w(0x9d), w(0x84),\ + w(0x90), w(0xd8), w(0xab), w(0x00), w(0x8c), w(0xbc), w(0xd3), w(0x0a),\ + w(0xf7), w(0xe4), w(0x58), w(0x05), w(0xb8), w(0xb3), w(0x45), w(0x06),\ + w(0xd0), w(0x2c), w(0x1e), w(0x8f), w(0xca), w(0x3f), w(0x0f), w(0x02),\ + w(0xc1), w(0xaf), w(0xbd), w(0x03), w(0x01), w(0x13), w(0x8a), w(0x6b),\ + w(0x3a), w(0x91), w(0x11), w(0x41), w(0x4f), w(0x67), w(0xdc), w(0xea),\ + w(0x97), w(0xf2), w(0xcf), w(0xce), w(0xf0), w(0xb4), w(0xe6), w(0x73),\ + w(0x96), w(0xac), w(0x74), w(0x22), w(0xe7), w(0xad), w(0x35), w(0x85),\ + w(0xe2), w(0xf9), w(0x37), w(0xe8), w(0x1c), w(0x75), w(0xdf), w(0x6e),\ + w(0x47), w(0xf1), w(0x1a), w(0x71), w(0x1d), w(0x29), w(0xc5), w(0x89),\ + w(0x6f), w(0xb7), w(0x62), w(0x0e), w(0xaa), w(0x18), w(0xbe), w(0x1b),\ + w(0xfc), w(0x56), w(0x3e), w(0x4b), w(0xc6), w(0xd2), w(0x79), w(0x20),\ + w(0x9a), w(0xdb), w(0xc0), w(0xfe), w(0x78), w(0xcd), w(0x5a), w(0xf4),\ + w(0x1f), w(0xdd), w(0xa8), w(0x33), w(0x88), w(0x07), w(0xc7), w(0x31),\ + w(0xb1), w(0x12), w(0x10), w(0x59), w(0x27), w(0x80), w(0xec), w(0x5f),\ + w(0x60), w(0x51), w(0x7f), w(0xa9), w(0x19), w(0xb5), w(0x4a), w(0x0d),\ + w(0x2d), w(0xe5), w(0x7a), w(0x9f), w(0x93), w(0xc9), w(0x9c), w(0xef),\ + w(0xa0), w(0xe0), w(0x3b), w(0x4d), w(0xae), w(0x2a), w(0xf5), w(0xb0),\ + w(0xc8), w(0xeb), w(0xbb), w(0x3c), w(0x83), w(0x53), w(0x99), w(0x61),\ + w(0x17), w(0x2b), w(0x04), w(0x7e), w(0xba), w(0x77), w(0xd6), w(0x26),\ + w(0xe1), w(0x69), w(0x14), w(0x63), w(0x55), w(0x21), w(0x0c), w(0x7d), + +#define mm_data(w) \ + w(0x00), w(0x01), w(0x02), w(0x03), w(0x04), w(0x05), w(0x06), w(0x07),\ + w(0x08), w(0x09), w(0x0a), w(0x0b), w(0x0c), w(0x0d), w(0x0e), w(0x0f),\ + w(0x10), w(0x11), w(0x12), w(0x13), w(0x14), w(0x15), w(0x16), w(0x17),\ + w(0x18), w(0x19), w(0x1a), w(0x1b), w(0x1c), w(0x1d), w(0x1e), w(0x1f),\ + w(0x20), w(0x21), w(0x22), w(0x23), w(0x24), w(0x25), w(0x26), w(0x27),\ + w(0x28), w(0x29), w(0x2a), w(0x2b), w(0x2c), w(0x2d), w(0x2e), w(0x2f),\ + w(0x30), w(0x31), w(0x32), w(0x33), w(0x34), w(0x35), w(0x36), w(0x37),\ + w(0x38), w(0x39), w(0x3a), w(0x3b), w(0x3c), w(0x3d), w(0x3e), w(0x3f),\ + w(0x40), w(0x41), w(0x42), w(0x43), w(0x44), w(0x45), w(0x46), w(0x47),\ + w(0x48), w(0x49), w(0x4a), w(0x4b), w(0x4c), w(0x4d), w(0x4e), w(0x4f),\ + w(0x50), w(0x51), w(0x52), w(0x53), w(0x54), w(0x55), w(0x56), w(0x57),\ + w(0x58), w(0x59), w(0x5a), w(0x5b), w(0x5c), w(0x5d), w(0x5e), w(0x5f),\ + w(0x60), w(0x61), w(0x62), w(0x63), w(0x64), w(0x65), w(0x66), w(0x67),\ + w(0x68), w(0x69), w(0x6a), w(0x6b), w(0x6c), w(0x6d), w(0x6e), w(0x6f),\ + w(0x70), w(0x71), w(0x72), w(0x73), w(0x74), w(0x75), w(0x76), w(0x77),\ + w(0x78), w(0x79), w(0x7a), w(0x7b), w(0x7c), w(0x7d), w(0x7e), w(0x7f),\ + w(0x80), w(0x81), w(0x82), w(0x83), w(0x84), w(0x85), w(0x86), w(0x87),\ + w(0x88), w(0x89), w(0x8a), w(0x8b), w(0x8c), w(0x8d), w(0x8e), w(0x8f),\ + w(0x90), w(0x91), w(0x92), w(0x93), w(0x94), w(0x95), w(0x96), w(0x97),\ + w(0x98), w(0x99), w(0x9a), w(0x9b), w(0x9c), w(0x9d), w(0x9e), w(0x9f),\ + w(0xa0), w(0xa1), w(0xa2), w(0xa3), w(0xa4), w(0xa5), w(0xa6), w(0xa7),\ + w(0xa8), w(0xa9), w(0xaa), w(0xab), w(0xac), w(0xad), w(0xae), w(0xaf),\ + w(0xb0), w(0xb1), w(0xb2), w(0xb3), w(0xb4), w(0xb5), w(0xb6), w(0xb7),\ + w(0xb8), w(0xb9), w(0xba), w(0xbb), w(0xbc), w(0xbd), w(0xbe), w(0xbf),\ + w(0xc0), w(0xc1), w(0xc2), w(0xc3), w(0xc4), w(0xc5), w(0xc6), w(0xc7),\ + w(0xc8), w(0xc9), w(0xca), w(0xcb), w(0xcc), w(0xcd), w(0xce), w(0xcf),\ + w(0xd0), w(0xd1), w(0xd2), w(0xd3), w(0xd4), w(0xd5), w(0xd6), w(0xd7),\ + w(0xd8), w(0xd9), w(0xda), w(0xdb), w(0xdc), w(0xdd), w(0xde), w(0xdf),\ + w(0xe0), w(0xe1), w(0xe2), w(0xe3), w(0xe4), w(0xe5), w(0xe6), w(0xe7),\ + w(0xe8), w(0xe9), w(0xea), w(0xeb), w(0xec), w(0xed), w(0xee), w(0xef),\ + w(0xf0), w(0xf1), w(0xf2), w(0xf3), w(0xf4), w(0xf5), w(0xf6), w(0xf7),\ + w(0xf8), w(0xf9), w(0xfa), w(0xfb), w(0xfc), w(0xfd), w(0xfe), w(0xff) + +#define h0(x) (x) + +/* These defines are used to ensure tables are generated in the + right format depending on the internal byte order required +*/ + +#define w0(p) bytes2word(p, 0, 0, 0) +#define w1(p) bytes2word(0, p, 0, 0) +#define w2(p) bytes2word(0, 0, p, 0) +#define w3(p) bytes2word(0, 0, 0, p) + +#define u0(p) bytes2word(f2(p), p, p, f3(p)) +#define u1(p) bytes2word(f3(p), f2(p), p, p) +#define u2(p) bytes2word(p, f3(p), f2(p), p) +#define u3(p) bytes2word(p, p, f3(p), f2(p)) + +#define v0(p) bytes2word(fe(p), f9(p), fd(p), fb(p)) +#define v1(p) bytes2word(fb(p), fe(p), f9(p), fd(p)) +#define v2(p) bytes2word(fd(p), fb(p), fe(p), f9(p)) +#define v3(p) bytes2word(f9(p), fd(p), fb(p), fe(p)) + +const aes_32t t_dec(r,c)[RC_LENGTH] = +{ + w0(0x01), w0(0x02), w0(0x04), w0(0x08), w0(0x10), + w0(0x20), w0(0x40), w0(0x80), w0(0x1b), w0(0x36) +}; + +#if defined(__BORLANDC__) + #define concat(s1, s2) s1##s2 + #define d_1(t,n,b,v) const t n[256] = { b(concat(v,0)) } + #define d_4(t,n,b,v) const t n[4][256] = { { b(concat(v,0)) }, { b(concat(v,1)) }, { b(concat(v,2)) }, { b(concat(v,3)) } } +#else + #define d_1(t,n,b,v) const t n[256] = { b(v##0) } + #define d_4(t,n,b,v) const t n[4][256] = { { b(v##0) }, { b(v##1) }, { b(v##2) }, { b(v##3) } } +#endif + +#else /* declare and instantiate tables for dynamic value generation in in tab.c */ + +aes_32t t_dec(r,c)[RC_LENGTH]; + +#define d_1(t,n,b,v) t n[256] +#define d_4(t,n,b,v) t n[4][256] + +#endif + +#else /* declare tables without instantiation */ + +#if defined(FIXED_TABLES) + +extern const aes_32t t_dec(r,c)[RC_LENGTH]; + +#if defined(_MSC_VER) && defined(TABLE_ALIGN) +#define d_1(t,n,b,v) extern __declspec(align(TABLE_ALIGN)) const t n[256] +#define d_4(t,n,b,v) extern __declspec(align(TABLE_ALIGN)) const t n[4][256] +#else +#define d_1(t,n,b,v) extern const t n[256] +#define d_4(t,n,b,v) extern const t n[4][256] +#endif +#else + +extern aes_32t t_dec(r,c)[RC_LENGTH]; + +#if defined(_MSC_VER) && defined(TABLE_ALIGN) +#define d_1(t,n,b,v) extern __declspec(align(TABLE_ALIGN)) t n[256] +#define d_4(t,n,b,v) extern __declspec(align(TABLE_ALIGN)) t n[4][256] +#else +#define d_1(t,n,b,v) extern t n[256] +#define d_4(t,n,b,v) extern t n[4][256] +#endif +#endif + +#endif + +#ifdef SBX_SET + d_1(aes_08t, t_dec(s,box), sb_data, h); +#endif +#ifdef ISB_SET + d_1(aes_08t, t_dec(i,box), isb_data, h); +#endif + +#ifdef FT1_SET + d_1(aes_32t, t_dec(f,n), sb_data, u); +#endif +#ifdef FT4_SET + d_4(aes_32t, t_dec(f,n), sb_data, u); +#endif + +#ifdef FL1_SET + d_1(aes_32t, t_dec(f,l), sb_data, w); +#endif +#ifdef FL4_SET + d_4(aes_32t, t_dec(f,l), sb_data, w); +#endif + +#ifdef IT1_SET + d_1(aes_32t, t_dec(i,n), isb_data, v); +#endif +#ifdef IT4_SET + d_4(aes_32t, t_dec(i,n), isb_data, v); +#endif + +#ifdef IL1_SET + d_1(aes_32t, t_dec(i,l), isb_data, w); +#endif +#ifdef IL4_SET + d_4(aes_32t, t_dec(i,l), isb_data, w); +#endif + +#ifdef LS1_SET +#ifdef FL1_SET +#undef LS1_SET +#else + d_1(aes_32t, t_dec(l,s), sb_data, w); +#endif +#endif + +#ifdef LS4_SET +#ifdef FL4_SET +#undef LS4_SET +#else + d_4(aes_32t, t_dec(l,s), sb_data, w); +#endif +#endif + +#ifdef IM1_SET + d_1(aes_32t, t_dec(i,m), mm_data, v); +#endif +#ifdef IM4_SET + d_4(aes_32t, t_dec(i,m), mm_data, v); +#endif + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aestab.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aestab.cpp new file mode 100644 index 0000000..e94aa76 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/aestab.cpp @@ -0,0 +1,223 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2003, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + +*/ + +#define DO_TABLES + +#include "aesopt.h" + +#if defined(FIXED_TABLES) + +/* implemented in case of wrong call for fixed tables */ + +void gen_tabs(void) +{ +} + +#else /* dynamic table generation */ + +#if !defined(FF_TABLES) + +/* Generate the tables for the dynamic table option + + It will generally be sensible to use tables to compute finite + field multiplies and inverses but where memory is scarse this + code might sometimes be better. But it only has effect during + initialisation so its pretty unimportant in overall terms. +*/ + +/* return 2 ^ (n - 1) where n is the bit number of the highest bit + set in x with x in the range 1 < x < 0x00000200. This form is + used so that locals within fi can be bytes rather than words +*/ + +static aes_08t hibit(const aes_32t x) +{ aes_08t r = (aes_08t)((x >> 1) | (x >> 2)); + + r |= (r >> 2); + r |= (r >> 4); + return (r + 1) >> 1; +} + +/* return the inverse of the finite field element x */ + +static aes_08t fi(const aes_08t x) +{ aes_08t p1 = x, p2 = BPOLY, n1 = hibit(x), n2 = 0x80, v1 = 1, v2 = 0; + + if(x < 2) return x; + + for(;;) + { + if(!n1) return v1; + + while(n2 >= n1) + { + n2 /= n1; p2 ^= p1 * n2; v2 ^= v1 * n2; n2 = hibit(p2); + } + + if(!n2) return v2; + + while(n1 >= n2) + { + n1 /= n2; p1 ^= p2 * n1; v1 ^= v2 * n1; n1 = hibit(p1); + } + } +} + +#endif + +/* The forward and inverse affine transformations used in the S-box */ + +#define fwd_affine(x) \ + (w = (aes_32t)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(aes_08t)(w^(w>>8))) + +#define inv_affine(x) \ + (w = (aes_32t)x, w = (w<<1)^(w<<3)^(w<<6), 0x05^(aes_08t)(w^(w>>8))) + +static int init = 0; + +void gen_tabs(void) +{ aes_32t i, w; + +#if defined(FF_TABLES) + + aes_08t pow[512], log[256]; + + if(init) return; + /* log and power tables for GF(2^8) finite field with + WPOLY as modular polynomial - the simplest primitive + root is 0x03, used here to generate the tables + */ + + i = 0; w = 1; + do + { + pow[i] = (aes_08t)w; + pow[i + 255] = (aes_08t)w; + log[w] = (aes_08t)i++; + w ^= (w << 1) ^ (w & 0x80 ? WPOLY : 0); + } + while (w != 1); + +#else + if(init) return; +#endif + + for(i = 0, w = 1; i < RC_LENGTH; ++i) + { + t_set(r,c)[i] = bytes2word(w, 0, 0, 0); + w = f2(w); + } + + for(i = 0; i < 256; ++i) + { aes_08t b; + + b = fwd_affine(fi((aes_08t)i)); + w = bytes2word(f2(b), b, b, f3(b)); + +#ifdef SBX_SET + t_set(s,box)[i] = b; +#endif + +#ifdef FT1_SET /* tables for a normal encryption round */ + t_set(f,n)[i] = w; +#endif +#ifdef FT4_SET + t_set(f,n)[0][i] = w; + t_set(f,n)[1][i] = upr(w,1); + t_set(f,n)[2][i] = upr(w,2); + t_set(f,n)[3][i] = upr(w,3); +#endif + w = bytes2word(b, 0, 0, 0); + +#ifdef FL1_SET /* tables for last encryption round (may also */ + t_set(f,l)[i] = w; /* be used in the key schedule) */ +#endif +#ifdef FL4_SET + t_set(f,l)[0][i] = w; + t_set(f,l)[1][i] = upr(w,1); + t_set(f,l)[2][i] = upr(w,2); + t_set(f,l)[3][i] = upr(w,3); +#endif + +#ifdef LS1_SET /* table for key schedule if t_set(f,l) above is */ + t_set(l,s)[i] = w; /* not of the required form */ +#endif +#ifdef LS4_SET + t_set(l,s)[0][i] = w; + t_set(l,s)[1][i] = upr(w,1); + t_set(l,s)[2][i] = upr(w,2); + t_set(l,s)[3][i] = upr(w,3); +#endif + + b = fi(inv_affine((aes_08t)i)); + w = bytes2word(fe(b), f9(b), fd(b), fb(b)); + +#ifdef IM1_SET /* tables for the inverse mix column operation */ + t_set(i,m)[b] = w; +#endif +#ifdef IM4_SET + t_set(i,m)[0][b] = w; + t_set(i,m)[1][b] = upr(w,1); + t_set(i,m)[2][b] = upr(w,2); + t_set(i,m)[3][b] = upr(w,3); +#endif + +#ifdef ISB_SET + t_set(i,box)[i] = b; +#endif +#ifdef IT1_SET /* tables for a normal decryption round */ + t_set(i,n)[i] = w; +#endif +#ifdef IT4_SET + t_set(i,n)[0][i] = w; + t_set(i,n)[1][i] = upr(w,1); + t_set(i,n)[2][i] = upr(w,2); + t_set(i,n)[3][i] = upr(w,3); +#endif + w = bytes2word(b, 0, 0, 0); +#ifdef IL1_SET /* tables for last decryption round */ + t_set(i,l)[i] = w; +#endif +#ifdef IL4_SET + t_set(i,l)[0][i] = w; + t_set(i,l)[1][i] = upr(w,1); + t_set(i,l)[2][i] = upr(w,2); + t_set(i,l)[3][i] = upr(w,3); +#endif + } + init = 1; +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.cpp new file mode 100644 index 0000000..4e76c77 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.cpp @@ -0,0 +1,140 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + ------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This file implements password based file encryption and authentication + using AES in CTR mode, HMAC-SHA1 authentication and RFC2898 password + based key derivation. + +*/ + +#include <memory.h> + +#include "fileenc.h" + +/* subroutine for data encryption/decryption */ +/* this could be speeded up a lot by aligning */ +/* buffers and using 32 bit operations */ + +static void encr_data(unsigned char data[], unsigned long d_len, fcrypt_ctx cx[1]) +{ + unsigned long i = 0, pos = cx->encr_pos; + + while(i < d_len) + { + if(pos == BLOCK_SIZE) + { unsigned int j = 0; + /* increment encryption nonce */ + while(j < 8 && !++cx->nonce[j]) + ++j; + /* encrypt the nonce to form next xor buffer */ + aes_encrypt(cx->nonce, cx->encr_bfr, cx->encr_ctx); + pos = 0; + } + + data[i++] ^= cx->encr_bfr[pos++]; + } + + cx->encr_pos = pos; +} + +int fcrypt_init( + int mode, /* the mode to be used (input) */ + const unsigned char pwd[], /* the user specified password (input) */ + unsigned int pwd_len, /* the length of the password (input) */ + const unsigned char salt[], /* the salt (input) */ +#ifdef PASSWORD_VERIFIER + unsigned char pwd_ver[PWD_VER_LENGTH], /* 2 byte password verifier (output) */ +#endif + fcrypt_ctx cx[1]) /* the file encryption context (output) */ +{ + unsigned char kbuf[2 * MAX_KEY_LENGTH + PWD_VER_LENGTH]; + + if(pwd_len > MAX_PWD_LENGTH) + return PASSWORD_TOO_LONG; + + if(mode < 1 || mode > 3) + return BAD_MODE; + + cx->mode = mode; + cx->pwd_len = pwd_len; + /* initialise the encryption nonce and buffer pos */ + cx->encr_pos = BLOCK_SIZE; + + /* if we need a random component in the encryption */ + /* nonce, this is where it would have to be set */ + memset(cx->nonce, 0, BLOCK_SIZE * sizeof(unsigned char)); + /* initialise for authentication */ + hmac_sha_begin(cx->auth_ctx); + + /* derive the encryption and authetication keys and the password verifier */ + derive_key(pwd, pwd_len, salt, SALT_LENGTH(mode), KEYING_ITERATIONS, + kbuf, 2 * KEY_LENGTH(mode) + PWD_VER_LENGTH); + /* set the encryption key */ + aes_encrypt_key(kbuf, KEY_LENGTH(mode), cx->encr_ctx); + /* set the authentication key */ + hmac_sha_key(kbuf + KEY_LENGTH(mode), KEY_LENGTH(mode), cx->auth_ctx); +#ifdef PASSWORD_VERIFIER + memcpy(pwd_ver, kbuf + 2 * KEY_LENGTH(mode), PWD_VER_LENGTH); +#endif + /* clear the buffer holding the derived key values */ + memset(kbuf, 0, 2 * KEY_LENGTH(mode) + PWD_VER_LENGTH); + + return GOOD_RETURN; +} + +/* perform 'in place' encryption and authentication */ + +void fcrypt_encrypt(unsigned char data[], unsigned int data_len, fcrypt_ctx cx[1]) +{ + encr_data(data, data_len, cx); + hmac_sha_data(data, data_len, cx->auth_ctx); +} + +/* perform 'in place' authentication and decryption */ + +void fcrypt_decrypt(unsigned char data[], unsigned int data_len, fcrypt_ctx cx[1]) +{ + hmac_sha_data(data, data_len, cx->auth_ctx); + encr_data(data, data_len, cx); +} + +/* close encryption/decryption and return the MAC value */ + +int fcrypt_end(unsigned char mac[], fcrypt_ctx cx[1]) +{ + unsigned int res = cx->mode; + + hmac_sha_end(mac, MAC_LENGTH(cx->mode), cx->auth_ctx); + memset(cx, 0, sizeof(fcrypt_ctx)); /* clear the encryption context */ + return MAC_LENGTH(res); /* return MAC length in bytes */ +} + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.h new file mode 100644 index 0000000..ba5cabc --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/fileenc.h @@ -0,0 +1,114 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 24/01/2003 + + This file contains the header file for fileenc.c, which implements password + based file encryption and authentication using AES in CTR mode, HMAC-SHA1 + authentication and RFC2898 password based key derivation. +*/ + +#ifndef _FENC_H +#define _FENC_H + +#include "aes.h" +#include "hmac.h" +#include "pwd2key.h" + +#define BLOCK_SIZE AES_BLOCK_SIZE +#define PASSWORD_VERIFIER + +#define MAX_KEY_LENGTH 32 +#define MAX_PWD_LENGTH 128 +#define MAX_SALT_LENGTH 16 +#define KEYING_ITERATIONS 1000 + +#ifdef PASSWORD_VERIFIER +#define PWD_VER_LENGTH 2 +#else +#define PWD_VER_LENGTH 0 +#endif + +#define GOOD_RETURN 0 +#define PASSWORD_TOO_LONG -100 +#define BAD_MODE -101 + +/* + Field lengths (in bytes) versus File Encryption Mode (0 < mode < 4) + + Mode Key Salt MAC Overhead + 1 16 8 10 18 + 2 24 12 10 22 + 3 32 16 10 26 + + The following macros assume that the mode value is correct. +*/ + +#define KEY_LENGTH(mode) (8 * (mode & 3) + 8) +#define SALT_LENGTH(mode) (4 * (mode & 3) + 4) +#define MAC_LENGTH(mode) (10) + +/* the context for file encryption */ + +typedef struct +{ unsigned char nonce[BLOCK_SIZE]; /* the CTR nonce */ + unsigned char encr_bfr[BLOCK_SIZE]; /* encrypt buffer */ + aes_encrypt_ctx encr_ctx[1]; /* encryption context */ + hmac_ctx auth_ctx[1]; /* authentication context */ + unsigned int encr_pos; /* block position (enc) */ + unsigned int pwd_len; /* password length */ + unsigned int mode; /* File encryption mode */ +} fcrypt_ctx; + +/* initialise file encryption or decryption */ + +int fcrypt_init( + int mode, /* the mode to be used (input) */ + const unsigned char pwd[], /* the user specified password (input) */ + unsigned int pwd_len, /* the length of the password (input) */ + const unsigned char salt[], /* the salt (input) */ +#ifdef PASSWORD_VERIFIER + unsigned char pwd_ver[PWD_VER_LENGTH], /* 2 byte password verifier (output) */ +#endif + fcrypt_ctx cx[1]); /* the file encryption context (output) */ + +/* perform 'in place' encryption or decryption and authentication */ + +void fcrypt_encrypt(unsigned char data[], unsigned int data_len, fcrypt_ctx cx[1]); +void fcrypt_decrypt(unsigned char data[], unsigned int data_len, fcrypt_ctx cx[1]); + +/* close encryption/decryption and return the MAC value */ +/* the return value is the length of the MAC */ + +int fcrypt_end(unsigned char mac[], /* the MAC value (output) */ + fcrypt_ctx cx[1]); /* the context (input) */ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.cpp new file mode 100644 index 0000000..b24294d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.cpp @@ -0,0 +1,142 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + Includes a bugfix from Dr Brian Gladman made on 16/04/2012 for compiling on 64-bit + + This is an implementation of HMAC, the FIPS standard keyed hash function +*/ + + +#include "hmac.h" + +#define HMAC_IPAD (0x36 * (((unsigned long)-1) / 0xff)) +#define HMAC_OPAD (0x5c * (((unsigned long)-1) / 0xff)) + +/* initialise the HMAC context to zero */ +void hmac_sha_begin(hmac_ctx cx[1]) +{ + memset(cx, 0, sizeof(hmac_ctx)); +} + +/* input the HMAC key (can be called multiple times) */ +int hmac_sha_key(const unsigned char key[], unsigned long key_len, hmac_ctx cx[1]) +{ + if(cx->klen == HMAC_IN_DATA) /* error if further key input */ + return HMAC_BAD_MODE; /* is attempted in data mode */ + + if(cx->klen + key_len > HMAC_HASH_INPUT_SIZE) /* if the key has to be hashed */ + { + if(cx->klen <= HMAC_HASH_INPUT_SIZE) /* if the hash has not yet been */ + { /* started, initialise it and */ + sha_begin(cx->ctx); /* hash stored key characters */ + sha_hash(cx->key, cx->klen, cx->ctx); + } + + sha_hash(key, key_len, cx->ctx); /* hash long key data into hash */ + } + else /* otherwise store key data */ + memcpy(cx->key + cx->klen, key, key_len); + + cx->klen += key_len; /* update the key length count */ + return HMAC_OK; +} + +/* input the HMAC data (can be called multiple times) - */ +/* note that this call terminates the key input phase */ +void hmac_sha_data(const unsigned char data[], unsigned long data_len, hmac_ctx cx[1]) +{ unsigned int i; + + if(cx->klen != HMAC_IN_DATA) /* if not yet in data phase */ + { + if(cx->klen > HMAC_HASH_INPUT_SIZE) /* if key is being hashed */ + { /* complete the hash and */ + sha_end(cx->key, cx->ctx); /* store the result as the */ + cx->klen = HMAC_HASH_OUTPUT_SIZE; /* key and set new length */ + } + + /* pad the key if necessary */ + memset(cx->key + cx->klen, 0, HMAC_HASH_INPUT_SIZE - cx->klen); + + /* xor ipad into key value */ + for(i = 0; i < HMAC_HASH_INPUT_SIZE / sizeof(unsigned long); ++i) + ((unsigned long*)cx->key)[i] ^= HMAC_IPAD; + + /* and start hash operation */ + sha_begin(cx->ctx); + sha_hash(cx->key, HMAC_HASH_INPUT_SIZE, cx->ctx); + + /* mark as now in data mode */ + cx->klen = HMAC_IN_DATA; + } + + /* hash the data (if any) */ + if(data_len) + sha_hash(data, data_len, cx->ctx); +} + +/* compute and output the MAC value */ +void hmac_sha_end(unsigned char mac[], unsigned long mac_len, hmac_ctx cx[1]) +{ unsigned char dig[HMAC_HASH_OUTPUT_SIZE]; + unsigned int i; + + /* if no data has been entered perform a null data phase */ + if(cx->klen != HMAC_IN_DATA) + hmac_sha_data((const unsigned char*)0, 0, cx); + + sha_end(dig, cx->ctx); /* complete the inner hash */ + + /* set outer key value using opad and removing ipad */ + for(i = 0; i < HMAC_HASH_INPUT_SIZE / sizeof(unsigned long); ++i) + ((unsigned long*)cx->key)[i] ^= HMAC_OPAD ^ HMAC_IPAD; + + /* perform the outer hash operation */ + sha_begin(cx->ctx); + sha_hash(cx->key, HMAC_HASH_INPUT_SIZE, cx->ctx); + sha_hash(dig, HMAC_HASH_OUTPUT_SIZE, cx->ctx); + sha_end(dig, cx->ctx); + + /* output the hash value */ + for(i = 0; i < mac_len; ++i) + mac[i] = dig[i]; +} + +/* 'do it all in one go' subroutine */ +void hmac_sha(const unsigned char key[], unsigned long key_len, + const unsigned char data[], unsigned long data_len, + unsigned char mac[], unsigned long mac_len) +{ hmac_ctx cx[1]; + + hmac_sha_begin(cx); + hmac_sha_key(key, key_len, cx); + hmac_sha_data(data, data_len, cx); + hmac_sha_end(mac, mac_len, cx); +} + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.h new file mode 100644 index 0000000..284c50f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/hmac.h @@ -0,0 +1,95 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + Includes a bugfix from Dr Brian Gladman made on 16/04/2012 for compiling on 64-bit + + This is an implementation of HMAC, the FIPS standard keyed hash function +*/ + +#ifndef _HMAC_H +#define _HMAC_H + +#include <memory.h> + +#define USE_SHA1 // Irrlicht only cares about SHA1 for now +#if !defined(USE_SHA1) && !defined(USE_SHA256) +#error define USE_SHA1 or USE_SHA256 to set the HMAC hash algorithm +#endif + +#ifdef USE_SHA1 + +#include "sha1.h" + +#define HMAC_HASH_INPUT_SIZE SHA1_BLOCK_SIZE +#define HMAC_HASH_OUTPUT_SIZE SHA1_DIGEST_SIZE +#define sha_ctx sha1_ctx +#define sha_begin sha1_begin +#define sha_hash sha1_hash +#define sha_end sha1_end + +#endif + +#ifdef USE_SHA256 + +#include "sha2.h" + +#define HMAC_HASH_INPUT_SIZE SHA256_BLOCK_SIZE +#define HMAC_HASH_OUTPUT_SIZE SHA256_DIGEST_SIZE +#define sha_ctx sha256_ctx +#define sha_begin sha256_begin +#define sha_hash sha256_hash +#define sha_end sha256_end + +#endif + +#define HMAC_OK 0 +#define HMAC_BAD_MODE -1 +#define HMAC_IN_DATA 0xffffffff + +typedef struct +{ unsigned char key[HMAC_HASH_INPUT_SIZE]; + sha_ctx ctx[1]; + unsigned long klen; +} hmac_ctx; + +void hmac_sha_begin(hmac_ctx cx[1]); + +int hmac_sha_key(const unsigned char key[], unsigned long key_len, hmac_ctx cx[1]); + +void hmac_sha_data(const unsigned char data[], unsigned long data_len, hmac_ctx cx[1]); + +void hmac_sha_end(unsigned char mac[], unsigned long mac_len, hmac_ctx cx[1]); + +void hmac_sha(const unsigned char key[], unsigned long key_len, + const unsigned char data[], unsigned long data_len, + unsigned char mac[], unsigned long mac_len); + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.cpp new file mode 100644 index 0000000..d5800b3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.cpp @@ -0,0 +1,146 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 24/01/2003 + + This file implements a random data pool based on the use of an external + entropy function. It is based on the ideas advocated by Peter Gutmann in + his work on pseudo random sequence generators. It is not a 'paranoid' + random sequence generator and no attempt is made to protect the pool + from prying eyes either by memory locking or by techniques to obscure + its location in memory. +*/ + +#include <memory.h> +#include "prng.h" + +/* mix a random data pool using the SHA1 compression function (as */ +/* suggested by Peter Gutmann in his paper on random pools) */ + +static void prng_mix(unsigned char buf[]) +{ unsigned int i, len; + sha1_ctx ctx[1]; + + /*lint -e{663} unusual array to pointer conversion */ + for(i = 0; i < PRNG_POOL_SIZE; i += SHA1_DIGEST_SIZE) + { + /* copy digest size pool block into SHA1 hash block */ + memcpy(ctx->hash, buf + (i ? i : PRNG_POOL_SIZE) + - SHA1_DIGEST_SIZE, SHA1_DIGEST_SIZE); + + /* copy data from pool into the SHA1 data buffer */ + len = PRNG_POOL_SIZE - i; + memcpy(ctx->wbuf, buf + i, (len > SHA1_BLOCK_SIZE ? SHA1_BLOCK_SIZE : len)); + + if(len < SHA1_BLOCK_SIZE) + memcpy(((char*)ctx->wbuf) + len, buf, SHA1_BLOCK_SIZE - len); + + /* compress using the SHA1 compression function */ + sha1_compile(ctx); + + /* put digest size block back into the random pool */ + memcpy(buf + i, ctx->hash, SHA1_DIGEST_SIZE); + } +} + +/* refresh the output buffer and update the random pool by adding */ +/* entropy and remixing */ + +static void update_pool(prng_ctx ctx[1]) +{ unsigned int i = 0; + + /* transfer random pool data to the output buffer */ + memcpy(ctx->obuf, ctx->rbuf, PRNG_POOL_SIZE); + + /* enter entropy data into the pool */ + while(i < PRNG_POOL_SIZE) + i += ctx->entropy(ctx->rbuf + i, PRNG_POOL_SIZE - i); + + /* invert and xor the original pool data into the pool */ + for(i = 0; i < PRNG_POOL_SIZE; ++i) + ctx->rbuf[i] ^= ~ctx->obuf[i]; + + /* mix the pool and the output buffer */ + prng_mix(ctx->rbuf); + prng_mix(ctx->obuf); +} + +void prng_init(prng_entropy_fn fun, prng_ctx ctx[1]) +{ int i; + + /* clear the buffers and the counter in the context */ + memset(ctx, 0, sizeof(prng_ctx)); + + /* set the pointer to the entropy collection function */ + ctx->entropy = fun; + + /* initialise the random data pool */ + update_pool(ctx); + + /* mix the pool a minimum number of times */ + for(i = 0; i < PRNG_MIN_MIX; ++i) + prng_mix(ctx->rbuf); + + /* update the pool to prime the pool output buffer */ + update_pool(ctx); +} + +/* provide random bytes from the random data pool */ + +void prng_rand(unsigned char data[], unsigned int data_len, prng_ctx ctx[1]) +{ unsigned char *rp = data; + unsigned int len, pos = ctx->pos; + + while(data_len) + { + /* transfer 'data_len' bytes (or the number of bytes remaining */ + /* the pool output buffer if less) into the output */ + len = (data_len < PRNG_POOL_SIZE - pos ? data_len : PRNG_POOL_SIZE - pos); + memcpy(rp, ctx->obuf + pos, len); + rp += len; /* update ouput buffer position pointer */ + pos += len; /* update pool output buffer pointer */ + data_len -= len; /* update the remaining data count */ + + /* refresh the random pool if necessary */ + if(pos == PRNG_POOL_SIZE) + { + update_pool(ctx); pos = 0; + } + } + + ctx->pos = pos; +} + +void prng_end(prng_ctx ctx[1]) +{ + /* ensure the data in the context is destroyed */ + memset(ctx, 0, sizeof(prng_ctx)); +} + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.h new file mode 100644 index 0000000..a81ed8e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/prng.h @@ -0,0 +1,74 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 24/01/2003 + + This is the header file for an implementation of a random data pool based on + the use of an external entropy function (inspired by Peter Gutmann's work). +*/ + +#ifndef _PRNG_H +#define _PRNG_H + +#include "sha1.h" + +#define PRNG_POOL_LEN 256 /* minimum random pool size */ +#define PRNG_MIN_MIX 20 /* min initial pool mixing iterations */ + +/* ensure that pool length is a multiple of the SHA1 digest size */ + +#define PRNG_POOL_SIZE (SHA1_DIGEST_SIZE * (1 + (PRNG_POOL_LEN - 1) / SHA1_DIGEST_SIZE)) + +/* A function for providing entropy is a parameter in the prng_init() */ +/* call. This function has the following form and returns a maximum */ +/* of 'len' bytes of pseudo random data in the buffer 'buf'. It can */ +/* return less than 'len' bytes but will be repeatedly called for more */ +/* data in this case. */ + +typedef int (*prng_entropy_fn)(unsigned char buf[], unsigned int len); + +typedef struct +{ unsigned char rbuf[PRNG_POOL_SIZE]; /* the random pool */ + unsigned char obuf[PRNG_POOL_SIZE]; /* pool output buffer */ + unsigned int pos; /* output buffer position */ + prng_entropy_fn entropy; /* entropy function pointer */ +} prng_ctx; + +/* initialise the random stream generator */ +void prng_init(prng_entropy_fn fun, prng_ctx ctx[1]); + +/* obtain random bytes from the generator */ +void prng_rand(unsigned char data[], unsigned int data_len, prng_ctx ctx[1]); + +/* close the random stream generator */ +void prng_end(prng_ctx ctx[1]); + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.cpp new file mode 100644 index 0000000..051e45b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.cpp @@ -0,0 +1,186 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This is an implementation of RFC2898, which specifies key derivation from + a password and a salt value. +*/ + +#include <memory.h> +#include "hmac.h" + +void derive_key(const unsigned char pwd[], /* the PASSWORD */ + unsigned int pwd_len, /* and its length */ + const unsigned char salt[], /* the SALT and its */ + unsigned int salt_len, /* length */ + unsigned int iter, /* the number of iterations */ + unsigned char key[], /* space for the output key */ + unsigned int key_len)/* and its required length */ +{ + unsigned int i, j, k, n_blk; + unsigned char uu[HMAC_HASH_OUTPUT_SIZE], ux[HMAC_HASH_OUTPUT_SIZE]; + hmac_ctx c1[1], c2[1], c3[1]; + + /* set HMAC context (c1) for password */ + hmac_sha_begin(c1); + hmac_sha_key(pwd, pwd_len, c1); + + /* set HMAC context (c2) for password and salt */ + memcpy(c2, c1, sizeof(hmac_ctx)); + hmac_sha_data(salt, salt_len, c2); + + /* find the number of SHA blocks in the key */ + n_blk = 1 + (key_len - 1) / HMAC_HASH_OUTPUT_SIZE; + + for(i = 0; i < n_blk; ++i) /* for each block in key */ + { + /* ux[] holds the running xor value */ + memset(ux, 0, HMAC_HASH_OUTPUT_SIZE); + + /* set HMAC context (c3) for password and salt */ + memcpy(c3, c2, sizeof(hmac_ctx)); + + /* enter additional data for 1st block into uu */ + uu[0] = (unsigned char)((i + 1) >> 24); + uu[1] = (unsigned char)((i + 1) >> 16); + uu[2] = (unsigned char)((i + 1) >> 8); + uu[3] = (unsigned char)(i + 1); + + /* this is the key mixing iteration */ + for(j = 0, k = 4; j < iter; ++j) + { + /* add previous round data to HMAC */ + hmac_sha_data(uu, k, c3); + + /* obtain HMAC for uu[] */ + hmac_sha_end(uu, HMAC_HASH_OUTPUT_SIZE, c3); + + /* xor into the running xor block */ + for(k = 0; k < HMAC_HASH_OUTPUT_SIZE; ++k) + ux[k] ^= uu[k]; + + /* set HMAC context (c3) for password */ + memcpy(c3, c1, sizeof(hmac_ctx)); + } + + /* compile key blocks into the key output */ + j = 0; k = i * HMAC_HASH_OUTPUT_SIZE; + while(j < HMAC_HASH_OUTPUT_SIZE && k < key_len) + key[k++] = ux[j++]; + } +} + +#ifdef TEST + +#include <stdio.h> + +struct +{ unsigned int pwd_len; + unsigned int salt_len; + unsigned int it_count; + unsigned char *pwd; + unsigned char salt[32]; + unsigned char key[32]; +} tests[] = +{ + { 8, 4, 5, (unsigned char*)"password", + { + 0x12, 0x34, 0x56, 0x78 + }, + { + 0x5c, 0x75, 0xce, 0xf0, 0x1a, 0x96, 0x0d, 0xf7, + 0x4c, 0xb6, 0xb4, 0x9b, 0x9e, 0x38, 0xe6, 0xb5 + } + }, + { 8, 8, 5, (unsigned char*)"password", + { + 0x12, 0x34, 0x56, 0x78, 0x78, 0x56, 0x34, 0x12 + }, + { + 0xd1, 0xda, 0xa7, 0x86, 0x15, 0xf2, 0x87, 0xe6, + 0xa1, 0xc8, 0xb1, 0x20, 0xd7, 0x06, 0x2a, 0x49 + } + }, + { 8, 21, 1, (unsigned char*)"password", + { + "ATHENA.MIT.EDUraeburn" + }, + { + 0xcd, 0xed, 0xb5, 0x28, 0x1b, 0xb2, 0xf8, 0x01, + 0x56, 0x5a, 0x11, 0x22, 0xb2, 0x56, 0x35, 0x15 + } + }, + { 8, 21, 2, (unsigned char*)"password", + { + "ATHENA.MIT.EDUraeburn" + }, + { + 0x01, 0xdb, 0xee, 0x7f, 0x4a, 0x9e, 0x24, 0x3e, + 0x98, 0x8b, 0x62, 0xc7, 0x3c, 0xda, 0x93, 0x5d + } + }, + { 8, 21, 1200, (unsigned char*)"password", + { + "ATHENA.MIT.EDUraeburn" + }, + { + 0x5c, 0x08, 0xeb, 0x61, 0xfd, 0xf7, 0x1e, 0x4e, + 0x4e, 0xc3, 0xcf, 0x6b, 0xa1, 0xf5, 0x51, 0x2b + } + } +}; + +int main() +{ unsigned int i, j, key_len = 256; + unsigned char key[256]; + + printf("\nTest of RFC2898 Password Based Key Derivation"); + for(i = 0; i < 5; ++i) + { + derive_key(tests[i].pwd, tests[i].pwd_len, tests[i].salt, + tests[i].salt_len, tests[i].it_count, key, key_len); + + printf("\ntest %i: ", i + 1); + printf("key %s", memcmp(tests[i].key, key, 16) ? "is bad" : "is good"); + for(j = 0; j < key_len && j < 64; j += 4) + { + if(j % 16 == 0) + printf("\n"); + printf("0x%02x%02x%02x%02x ", key[j], key[j + 1], key[j + 2], key[j + 3]); + } + printf(j < key_len ? " ... \n" : "\n"); + } + printf("\n"); + return 0; +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.h new file mode 100644 index 0000000..f5248ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/pwd2key.h @@ -0,0 +1,50 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This is an implementation of RFC2898, which specifies key derivation from + a password and a salt value. +*/ + +#ifndef PWD2KEY_H +#define PWD2KEY_H + +void derive_key( + const unsigned char pwd[], /* the PASSWORD, and */ + unsigned int pwd_len, /* its length */ + const unsigned char salt[], /* the SALT and its */ + unsigned int salt_len, /* length */ + unsigned int iter, /* the number of iterations */ + unsigned char key[], /* space for the output key */ + unsigned int key_len); /* and its required length */ + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.cpp new file mode 100644 index 0000000..8a91768 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.cpp @@ -0,0 +1,237 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This is a byte oriented version of SHA1 that operates on arrays of bytes + stored in memory. It runs at 22 cycles per byte on a Pentium P4 processor +*/ + +#include <string.h> /* for memcpy() etc. */ +#include <stdlib.h> /* for _lrotl with VC++ */ + +#include "sha1.h" +#include "../os.h" + +/* + To obtain the highest speed on processors with 32-bit words, this code + needs to determine the order in which bytes are packed into such words. + The following block of code is an attempt to capture the most obvious + ways in which various environemnts specify their endian definitions. + It may well fail, in which case the definitions will need to be set by + editing at the points marked **** EDIT HERE IF NECESSARY **** below. +*/ + +/* BYTE ORDER IN 32-BIT WORDS + + To obtain the highest speed on processors with 32-bit words, this code + needs to determine the byte order of the target machine. The following + block of code is an attempt to capture the most obvious ways in which + various environemnts define byte order. It may well fail, in which case + the definitions will need to be set by editing at the points marked + **** EDIT HERE IF NECESSARY **** below. My thanks to Peter Gutmann for + some of these defines (from cryptlib). +*/ + +#define BRG_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ +#define BRG_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ + +#ifdef __BIG_ENDIAN__ +#define PLATFORM_BYTE_ORDER BRG_BIG_ENDIAN +#else +#define PLATFORM_BYTE_ORDER BRG_LITTLE_ENDIAN +#endif + +#define rotl32(x,n) (((x) << n) | ((x) >> (32 - n))) + +#if (PLATFORM_BYTE_ORDER == BRG_BIG_ENDIAN) +#define swap_b32(x) (x) +#else +#define swap_b32(x) irr::os::Byteswap::byteswap(x) +#endif + +#define SHA1_MASK (SHA1_BLOCK_SIZE - 1) + +#if 1 + +#define ch(x,y,z) (((x) & (y)) ^ (~(x) & (z))) +#define parity(x,y,z) ((x) ^ (y) ^ (z)) +#define maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) + +#else /* Discovered Rich Schroeppel and Colin Plumb */ + +#define ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) +#define parity(x,y,z) ((x) ^ (y) ^ (z)) +#define maj(x,y,z) (((x) & (y)) | ((z) & ((x) ^ (y)))) + +#endif + +/* A normal version as set out in the FIPS */ + +#define rnd(f,k) \ + t = a; a = rotl32(a,5) + f(b,c,d) + e + k + w[i]; \ + e = d; d = c; c = rotl32(b, 30); b = t + +void sha1_compile(sha1_ctx ctx[1]) +{ sha1_32t w[80], i, a, b, c, d, e, t; + + /* note that words are compiled from the buffer into 32-bit */ + /* words in big-endian order so an order reversal is needed */ + /* here on little endian machines */ + for(i = 0; i < SHA1_BLOCK_SIZE / 4; ++i) + w[i] = swap_b32(ctx->wbuf[i]); + + for(i = SHA1_BLOCK_SIZE / 4; i < 80; ++i) + w[i] = rotl32(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1); + + a = ctx->hash[0]; + b = ctx->hash[1]; + c = ctx->hash[2]; + d = ctx->hash[3]; + e = ctx->hash[4]; + + for(i = 0; i < 20; ++i) + { + rnd(ch, 0x5a827999); + } + + for(i = 20; i < 40; ++i) + { + rnd(parity, 0x6ed9eba1); + } + + for(i = 40; i < 60; ++i) + { + rnd(maj, 0x8f1bbcdc); + } + + for(i = 60; i < 80; ++i) + { + rnd(parity, 0xca62c1d6); + } + + ctx->hash[0] += a; + ctx->hash[1] += b; + ctx->hash[2] += c; + ctx->hash[3] += d; + ctx->hash[4] += e; +} + +void sha1_begin(sha1_ctx ctx[1]) +{ + ctx->count[0] = ctx->count[1] = 0; + ctx->hash[0] = 0x67452301; + ctx->hash[1] = 0xefcdab89; + ctx->hash[2] = 0x98badcfe; + ctx->hash[3] = 0x10325476; + ctx->hash[4] = 0xc3d2e1f0; +} + +/* SHA1 hash data in an array of bytes into hash buffer and */ +/* call the hash_compile function as required. */ + +void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1]) +{ sha1_32t pos = (sha1_32t)(ctx->count[0] & SHA1_MASK), + space = SHA1_BLOCK_SIZE - pos; + const unsigned char *sp = data; + + if((ctx->count[0] += len) < len) + ++(ctx->count[1]); + + while(len >= space) /* tranfer whole blocks if possible */ + { + memcpy(((unsigned char*)ctx->wbuf) + pos, sp, space); + sp += space; len -= space; space = SHA1_BLOCK_SIZE; pos = 0; + sha1_compile(ctx); + } + + /*lint -e{803} conceivable data overrun */ + memcpy(((unsigned char*)ctx->wbuf) + pos, sp, len); +} + +/* SHA1 final padding and digest calculation */ + +#if (PLATFORM_BYTE_ORDER == BRG_LITTLE_ENDIAN) +static sha1_32t mask[4] = + { 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff }; +static sha1_32t bits[4] = + { 0x00000080, 0x00008000, 0x00800000, 0x80000000 }; +#else +static sha1_32t mask[4] = + { 0x00000000, 0xff000000, 0xffff0000, 0xffffff00 }; +static sha1_32t bits[4] = + { 0x80000000, 0x00800000, 0x00008000, 0x00000080 }; +#endif + +void sha1_end(unsigned char hval[], sha1_ctx ctx[1]) +{ sha1_32t i = (sha1_32t)(ctx->count[0] & SHA1_MASK); + + /* mask out the rest of any partial 32-bit word and then set */ + /* the next byte to 0x80. On big-endian machines any bytes in */ + /* the buffer will be at the top end of 32 bit words, on little */ + /* endian machines they will be at the bottom. Hence the AND */ + /* and OR masks above are reversed for little endian systems */ + /* Note that we can always add the first padding byte at this */ + /* point because the buffer always has at least one empty slot */ + ctx->wbuf[i >> 2] = (ctx->wbuf[i >> 2] & mask[i & 3]) | bits[i & 3]; + + /* we need 9 or more empty positions, one for the padding byte */ + /* (above) and eight for the length count. If there is not */ + /* enough space pad and empty the buffer */ + if(i > SHA1_BLOCK_SIZE - 9) + { + if(i < 60) ctx->wbuf[15] = 0; + sha1_compile(ctx); + i = 0; + } + else /* compute a word index for the empty buffer positions */ + i = (i >> 2) + 1; + + while(i < 14) /* and zero pad all but last two positions */ + ctx->wbuf[i++] = 0; + + /* assemble the eight byte counter in in big-endian format */ + ctx->wbuf[14] = swap_b32((ctx->count[1] << 3) | (ctx->count[0] >> 29)); + ctx->wbuf[15] = swap_b32(ctx->count[0] << 3); + + sha1_compile(ctx); + + /* extract the hash value as bytes in case the hash buffer is */ + /* misaligned for 32-bit words */ + for(i = 0; i < SHA1_DIGEST_SIZE; ++i) + hval[i] = (unsigned char)(ctx->hash[i >> 2] >> (8 * (~i & 3))); +} + +void sha1(unsigned char hval[], const unsigned char data[], unsigned long len) +{ sha1_ctx cx[1]; + + sha1_begin(cx); sha1_hash(data, len, cx); sha1_end(hval, cx); +} + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.h new file mode 100644 index 0000000..0b39f5c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha1.h @@ -0,0 +1,68 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 +*/ + +#ifndef _SHA1_H +#define _SHA1_H + +#include <limits.h> + +#define SHA1_BLOCK_SIZE 64 +#define SHA1_DIGEST_SIZE 20 + +/* define an unsigned 32-bit type */ + +#if UINT_MAX == 0xffffffff + typedef unsigned int sha1_32t; +#elif ULONG_MAX == 0xffffffff + typedef unsigned long sha1_32t; +#else +#error Please define sha1_32t as an unsigned 32 bit type in sha2.h +#endif + +/* type to hold the SHA256 context */ + +typedef struct +{ sha1_32t count[2]; + sha1_32t hash[5]; + sha1_32t wbuf[16]; +} sha1_ctx; + +void sha1_compile(sha1_ctx ctx[1]); + +void sha1_begin(sha1_ctx ctx[1]); +void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1]); +void sha1_end(unsigned char hval[], sha1_ctx ctx[1]); +void sha1(unsigned char hval[], const unsigned char data[], unsigned long len); + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.cpp new file mode 100644 index 0000000..5be1bbf --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.cpp @@ -0,0 +1,626 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 + + This is a byte oriented version of SHA2 that operates on arrays of bytes + stored in memory. This code implements sha256, sha384 and sha512 but the + latter two functions rely on efficient 64-bit integer operations that + may not be very efficient on 32-bit machines + + The sha256 functions use a type 'sha256_ctx' to hold details of the + current hash state and uses the following three calls: + + void sha256_begin(sha256_ctx ctx[1]) + void sha256_hash(const unsigned char data[], + unsigned long len, sha256_ctx ctx[1]) + void sha256_end(unsigned char hval[], sha256_ctx ctx[1]) + + The first subroutine initialises a hash computation by setting up the + context in the sha256_ctx context. The second subroutine hashes 8-bit + bytes from array data[] into the hash state withinh sha256_ctx context, + the number of bytes to be hashed being given by the the unsigned long + integer len. The third subroutine completes the hash calculation and + places the resulting digest value in the array of 8-bit bytes hval[]. + + The sha384 and sha512 functions are similar and use the interfaces: + + void sha384_begin(sha384_ctx ctx[1]); + void sha384_hash(const unsigned char data[], + unsigned long len, sha384_ctx ctx[1]); + void sha384_end(unsigned char hval[], sha384_ctx ctx[1]); + + void sha512_begin(sha512_ctx ctx[1]); + void sha512_hash(const unsigned char data[], + unsigned long len, sha512_ctx ctx[1]); + void sha512_end(unsigned char hval[], sha512_ctx ctx[1]); + + In addition there is a function sha2 that can be used to call all these + functions using a call with a hash length parameter as follows: + + int sha2_begin(unsigned long len, sha2_ctx ctx[1]); + void sha2_hash(const unsigned char data[], + unsigned long len, sha2_ctx ctx[1]); + void sha2_end(unsigned char hval[], sha2_ctx ctx[1]); + + My thanks to Erik Andersen <andersen@codepoet.org> for testing this code + on big-endian systems and for his assistance with corrections +*/ + +/* define the hash functions that you need */ + +#define SHA_2 /* for dynamic hash length */ +#define SHA_256 +#define SHA_384 +#define SHA_512 + +#include <string.h> /* for memcpy() etc. */ +#include <stdlib.h> /* for _lrotr with VC++ */ + +#include "sha2.h" +#include "../os.h" + +/* BYTE ORDER IN 32-BIT WORDS + + To obtain the highest speed on processors with 32-bit words, this code + needs to determine the byte order of the target machine. The following + block of code is an attempt to capture the most obvious ways in which + various environemnts define byte order. It may well fail, in which case + the definitions will need to be set by editing at the points marked + **** EDIT HERE IF NECESSARY **** below. My thanks to Peter Gutmann for + some of these defines (from cryptlib). +*/ + +#define BRG_LITTLE_ENDIAN 1234 /* byte 0 is least significant (i386) */ +#define BRG_BIG_ENDIAN 4321 /* byte 0 is most significant (mc68k) */ + +#ifdef __BIG_ENDIAN__ +#define PLATFORM_BYTE_ORDER BRG_BIG_ENDIAN +#else +#define PLATFORM_BYTE_ORDER BRG_LITTLE_ENDIAN +#endif + +#ifdef _MSC_VER +#pragma intrinsic(memcpy) +#endif + +#define rotr32(x,n) (((x) >> n) | ((x) << (32 - n))) + +#if !defined(bswap_32) +#define bswap_32(x) irr::os::Byteswap::byteswap(x) +#endif + +#if (PLATFORM_BYTE_ORDER == BRG_LITTLE_ENDIAN) +#define SWAP_BYTES +#else +#undef SWAP_BYTES +#endif + +#if defined(SHA_2) || defined(SHA_256) + +#define SHA256_MASK (SHA256_BLOCK_SIZE - 1) + +#if defined(SWAP_BYTES) +#define bsw_32(p,n) { int _i = (n); while(_i--) p[_i] = bswap_32(p[_i]); } +#else +#define bsw_32(p,n) +#endif + +/* SHA256 mixing function definitions */ + +#if 0 + +#define ch(x,y,z) (((x) & (y)) ^ (~(x) & (z))) +#define maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) + +#else /* Thanks to Rich Schroeppel and Colin Plumb for the following */ + +#define ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) +#define maj(x,y,z) (((x) & (y)) | ((z) & ((x) ^ (y)))) + +#endif + +#define s256_0(x) (rotr32((x), 2) ^ rotr32((x), 13) ^ rotr32((x), 22)) +#define s256_1(x) (rotr32((x), 6) ^ rotr32((x), 11) ^ rotr32((x), 25)) +#define g256_0(x) (rotr32((x), 7) ^ rotr32((x), 18) ^ ((x) >> 3)) +#define g256_1(x) (rotr32((x), 17) ^ rotr32((x), 19) ^ ((x) >> 10)) + +/* rotated SHA256 round definition. Rather than swapping variables as in */ +/* FIPS-180, different variables are 'rotated' on each round, returning */ +/* to their starting positions every eight rounds */ + +#define h2(i) p[i & 15] += \ + g256_1(p[(i + 14) & 15]) + p[(i + 9) & 15] + g256_0(p[(i + 1) & 15]) + +#define h2_cycle(i,j) \ + v[(7 - i) & 7] += (j ? h2(i) : p[i & 15]) + k256[i + j] \ + + s256_1(v[(4 - i) & 7]) + ch(v[(4 - i) & 7], v[(5 - i) & 7], v[(6 - i) & 7]); \ + v[(3 - i) & 7] += v[(7 - i) & 7]; \ + v[(7 - i) & 7] += s256_0(v[(0 - i) & 7]) + maj(v[(0 - i) & 7], v[(1 - i) & 7], v[(2 - i) & 7]) + +/* SHA256 mixing data */ + +const sha2_32t k256[64] = +{ n_u32(428a2f98), n_u32(71374491), n_u32(b5c0fbcf), n_u32(e9b5dba5), + n_u32(3956c25b), n_u32(59f111f1), n_u32(923f82a4), n_u32(ab1c5ed5), + n_u32(d807aa98), n_u32(12835b01), n_u32(243185be), n_u32(550c7dc3), + n_u32(72be5d74), n_u32(80deb1fe), n_u32(9bdc06a7), n_u32(c19bf174), + n_u32(e49b69c1), n_u32(efbe4786), n_u32(0fc19dc6), n_u32(240ca1cc), + n_u32(2de92c6f), n_u32(4a7484aa), n_u32(5cb0a9dc), n_u32(76f988da), + n_u32(983e5152), n_u32(a831c66d), n_u32(b00327c8), n_u32(bf597fc7), + n_u32(c6e00bf3), n_u32(d5a79147), n_u32(06ca6351), n_u32(14292967), + n_u32(27b70a85), n_u32(2e1b2138), n_u32(4d2c6dfc), n_u32(53380d13), + n_u32(650a7354), n_u32(766a0abb), n_u32(81c2c92e), n_u32(92722c85), + n_u32(a2bfe8a1), n_u32(a81a664b), n_u32(c24b8b70), n_u32(c76c51a3), + n_u32(d192e819), n_u32(d6990624), n_u32(f40e3585), n_u32(106aa070), + n_u32(19a4c116), n_u32(1e376c08), n_u32(2748774c), n_u32(34b0bcb5), + n_u32(391c0cb3), n_u32(4ed8aa4a), n_u32(5b9cca4f), n_u32(682e6ff3), + n_u32(748f82ee), n_u32(78a5636f), n_u32(84c87814), n_u32(8cc70208), + n_u32(90befffa), n_u32(a4506ceb), n_u32(bef9a3f7), n_u32(c67178f2), +}; + +/* SHA256 initialisation data */ + +const sha2_32t i256[8] = +{ + n_u32(6a09e667), n_u32(bb67ae85), n_u32(3c6ef372), n_u32(a54ff53a), + n_u32(510e527f), n_u32(9b05688c), n_u32(1f83d9ab), n_u32(5be0cd19) +}; + +sha2_void sha256_begin(sha256_ctx ctx[1]) +{ + ctx->count[0] = ctx->count[1] = 0; + memcpy(ctx->hash, i256, 8 * sizeof(sha2_32t)); +} + +/* Compile 64 bytes of hash data into SHA256 digest value */ +/* NOTE: this routine assumes that the byte order in the */ +/* ctx->wbuf[] at this point is in such an order that low */ +/* address bytes in the ORIGINAL byte stream placed in this */ +/* buffer will now go to the high end of words on BOTH big */ +/* and little endian systems */ + +sha2_void sha256_compile(sha256_ctx ctx[1]) +{ sha2_32t v[8], j, *p = ctx->wbuf; + + memcpy(v, ctx->hash, 8 * sizeof(sha2_32t)); + + for(j = 0; j < 64; j += 16) + { + h2_cycle( 0, j); h2_cycle( 1, j); h2_cycle( 2, j); h2_cycle( 3, j); + h2_cycle( 4, j); h2_cycle( 5, j); h2_cycle( 6, j); h2_cycle( 7, j); + h2_cycle( 8, j); h2_cycle( 9, j); h2_cycle(10, j); h2_cycle(11, j); + h2_cycle(12, j); h2_cycle(13, j); h2_cycle(14, j); h2_cycle(15, j); + } + + ctx->hash[0] += v[0]; ctx->hash[1] += v[1]; ctx->hash[2] += v[2]; ctx->hash[3] += v[3]; + ctx->hash[4] += v[4]; ctx->hash[5] += v[5]; ctx->hash[6] += v[6]; ctx->hash[7] += v[7]; +} + +/* SHA256 hash data in an array of bytes into hash buffer */ +/* and call the hash_compile function as required. */ + +sha2_void sha256_hash(const unsigned char data[], unsigned long len, sha256_ctx ctx[1]) +{ sha2_32t pos = (sha2_32t)(ctx->count[0] & SHA256_MASK), + space = SHA256_BLOCK_SIZE - pos; + const unsigned char *sp = data; + + if((ctx->count[0] += len) < len) + ++(ctx->count[1]); + + while(len >= space) /* tranfer whole blocks while possible */ + { + memcpy(((unsigned char*)ctx->wbuf) + pos, sp, space); + sp += space; len -= space; space = SHA256_BLOCK_SIZE; pos = 0; + bsw_32(ctx->wbuf, SHA256_BLOCK_SIZE >> 2) + sha256_compile(ctx); + } + + memcpy(((unsigned char*)ctx->wbuf) + pos, sp, len); +} + +/* SHA256 Final padding and digest calculation */ + +static sha2_32t m1[4] = +{ + n_u32(00000000), n_u32(ff000000), n_u32(ffff0000), n_u32(ffffff00) +}; + +static sha2_32t b1[4] = +{ + n_u32(80000000), n_u32(00800000), n_u32(00008000), n_u32(00000080) +}; + +sha2_void sha256_end(unsigned char hval[], sha256_ctx ctx[1]) +{ sha2_32t i = (sha2_32t)(ctx->count[0] & SHA256_MASK); + + bsw_32(ctx->wbuf, (i + 3) >> 2) + /* bytes in the buffer are now in an order in which references */ + /* to 32-bit words will put bytes with lower addresses into the */ + /* top of 32 bit words on BOTH big and little endian machines */ + + /* we now need to mask valid bytes and add the padding which is */ + /* a single 1 bit and as many zero bits as necessary. */ + ctx->wbuf[i >> 2] = (ctx->wbuf[i >> 2] & m1[i & 3]) | b1[i & 3]; + + /* we need 9 or more empty positions, one for the padding byte */ + /* (above) and eight for the length count. If there is not */ + /* enough space pad and empty the buffer */ + if(i > SHA256_BLOCK_SIZE - 9) + { + if(i < 60) ctx->wbuf[15] = 0; + sha256_compile(ctx); + i = 0; + } + else /* compute a word index for the empty buffer positions */ + i = (i >> 2) + 1; + + while(i < 14) /* and zero pad all but last two positions */ + ctx->wbuf[i++] = 0; + + /* the following 32-bit length fields are assembled in the */ + /* wrong byte order on little endian machines but this is */ + /* corrected later since they are only ever used as 32-bit */ + /* word values. */ + + ctx->wbuf[14] = (ctx->count[1] << 3) | (ctx->count[0] >> 29); + ctx->wbuf[15] = ctx->count[0] << 3; + + sha256_compile(ctx); + + /* extract the hash value as bytes in case the hash buffer is */ + /* mislaigned for 32-bit words */ + for(i = 0; i < SHA256_DIGEST_SIZE; ++i) + hval[i] = (unsigned char)(ctx->hash[i >> 2] >> (8 * (~i & 3))); +} + +sha2_void sha256(unsigned char hval[], const unsigned char data[], unsigned long len) +{ sha256_ctx cx[1]; + + sha256_begin(cx); sha256_hash(data, len, cx); sha256_end(hval, cx); +} + +#endif + +#if defined(SHA_2) || defined(SHA_384) || defined(SHA_512) + +#define SHA512_MASK (SHA512_BLOCK_SIZE - 1) + +#define rotr64(x,n) (((x) >> n) | ((x) << (64 - n))) + +#if !defined(bswap_64) +#define bswap_64(x) ((((sha2_64t)(bswap_32((sha2_32t)(x)))) << 32) | (bswap_32((sha2_32t)((x) >> 32)))) +#endif + +#if defined(SWAP_BYTES) +#define bsw_64(p,n) { int _i = (n); while(_i--) p[_i] = bswap_64(p[_i]); } +#else +#define bsw_64(p,n) +#endif + +/* SHA512 mixing function definitions */ + +#define s512_0(x) (rotr64((x), 28) ^ rotr64((x), 34) ^ rotr64((x), 39)) +#define s512_1(x) (rotr64((x), 14) ^ rotr64((x), 18) ^ rotr64((x), 41)) +#define g512_0(x) (rotr64((x), 1) ^ rotr64((x), 8) ^ ((x) >> 7)) +#define g512_1(x) (rotr64((x), 19) ^ rotr64((x), 61) ^ ((x) >> 6)) + +/* rotated SHA512 round definition. Rather than swapping variables as in */ +/* FIPS-180, different variables are 'rotated' on each round, returning */ +/* to their starting positions every eight rounds */ + +#define h5(i) ctx->wbuf[i & 15] += \ + g512_1(ctx->wbuf[(i + 14) & 15]) + ctx->wbuf[(i + 9) & 15] + g512_0(ctx->wbuf[(i + 1) & 15]) + +#define h5_cycle(i,j) \ + v[(7 - i) & 7] += (j ? h5(i) : ctx->wbuf[i & 15]) + k512[i + j] \ + + s512_1(v[(4 - i) & 7]) + ch(v[(4 - i) & 7], v[(5 - i) & 7], v[(6 - i) & 7]); \ + v[(3 - i) & 7] += v[(7 - i) & 7]; \ + v[(7 - i) & 7] += s512_0(v[(0 - i) & 7]) + maj(v[(0 - i) & 7], v[(1 - i) & 7], v[(2 - i) & 7]) + +/* SHA384/SHA512 mixing data */ + +const sha2_64t k512[80] = +{ + n_u64(428a2f98d728ae22), n_u64(7137449123ef65cd), + n_u64(b5c0fbcfec4d3b2f), n_u64(e9b5dba58189dbbc), + n_u64(3956c25bf348b538), n_u64(59f111f1b605d019), + n_u64(923f82a4af194f9b), n_u64(ab1c5ed5da6d8118), + n_u64(d807aa98a3030242), n_u64(12835b0145706fbe), + n_u64(243185be4ee4b28c), n_u64(550c7dc3d5ffb4e2), + n_u64(72be5d74f27b896f), n_u64(80deb1fe3b1696b1), + n_u64(9bdc06a725c71235), n_u64(c19bf174cf692694), + n_u64(e49b69c19ef14ad2), n_u64(efbe4786384f25e3), + n_u64(0fc19dc68b8cd5b5), n_u64(240ca1cc77ac9c65), + n_u64(2de92c6f592b0275), n_u64(4a7484aa6ea6e483), + n_u64(5cb0a9dcbd41fbd4), n_u64(76f988da831153b5), + n_u64(983e5152ee66dfab), n_u64(a831c66d2db43210), + n_u64(b00327c898fb213f), n_u64(bf597fc7beef0ee4), + n_u64(c6e00bf33da88fc2), n_u64(d5a79147930aa725), + n_u64(06ca6351e003826f), n_u64(142929670a0e6e70), + n_u64(27b70a8546d22ffc), n_u64(2e1b21385c26c926), + n_u64(4d2c6dfc5ac42aed), n_u64(53380d139d95b3df), + n_u64(650a73548baf63de), n_u64(766a0abb3c77b2a8), + n_u64(81c2c92e47edaee6), n_u64(92722c851482353b), + n_u64(a2bfe8a14cf10364), n_u64(a81a664bbc423001), + n_u64(c24b8b70d0f89791), n_u64(c76c51a30654be30), + n_u64(d192e819d6ef5218), n_u64(d69906245565a910), + n_u64(f40e35855771202a), n_u64(106aa07032bbd1b8), + n_u64(19a4c116b8d2d0c8), n_u64(1e376c085141ab53), + n_u64(2748774cdf8eeb99), n_u64(34b0bcb5e19b48a8), + n_u64(391c0cb3c5c95a63), n_u64(4ed8aa4ae3418acb), + n_u64(5b9cca4f7763e373), n_u64(682e6ff3d6b2b8a3), + n_u64(748f82ee5defb2fc), n_u64(78a5636f43172f60), + n_u64(84c87814a1f0ab72), n_u64(8cc702081a6439ec), + n_u64(90befffa23631e28), n_u64(a4506cebde82bde9), + n_u64(bef9a3f7b2c67915), n_u64(c67178f2e372532b), + n_u64(ca273eceea26619c), n_u64(d186b8c721c0c207), + n_u64(eada7dd6cde0eb1e), n_u64(f57d4f7fee6ed178), + n_u64(06f067aa72176fba), n_u64(0a637dc5a2c898a6), + n_u64(113f9804bef90dae), n_u64(1b710b35131c471b), + n_u64(28db77f523047d84), n_u64(32caab7b40c72493), + n_u64(3c9ebe0a15c9bebc), n_u64(431d67c49c100d4c), + n_u64(4cc5d4becb3e42b6), n_u64(597f299cfc657e2a), + n_u64(5fcb6fab3ad6faec), n_u64(6c44198c4a475817) +}; + +/* Compile 64 bytes of hash data into SHA384/SHA512 digest value */ + +sha2_void sha512_compile(sha512_ctx ctx[1]) +{ sha2_64t v[8]; + sha2_32t j; + + memcpy(v, ctx->hash, 8 * sizeof(sha2_64t)); + + for(j = 0; j < 80; j += 16) + { + h5_cycle( 0, j); h5_cycle( 1, j); h5_cycle( 2, j); h5_cycle( 3, j); + h5_cycle( 4, j); h5_cycle( 5, j); h5_cycle( 6, j); h5_cycle( 7, j); + h5_cycle( 8, j); h5_cycle( 9, j); h5_cycle(10, j); h5_cycle(11, j); + h5_cycle(12, j); h5_cycle(13, j); h5_cycle(14, j); h5_cycle(15, j); + } + + ctx->hash[0] += v[0]; ctx->hash[1] += v[1]; ctx->hash[2] += v[2]; ctx->hash[3] += v[3]; + ctx->hash[4] += v[4]; ctx->hash[5] += v[5]; ctx->hash[6] += v[6]; ctx->hash[7] += v[7]; +} + +/* Compile 128 bytes of hash data into SHA256 digest value */ +/* NOTE: this routine assumes that the byte order in the */ +/* ctx->wbuf[] at this point is in such an order that low */ +/* address bytes in the ORIGINAL byte stream placed in this */ +/* buffer will now go to the high end of words on BOTH big */ +/* and little endian systems */ + +sha2_void sha512_hash(const unsigned char data[], unsigned long len, sha512_ctx ctx[1]) +{ sha2_32t pos = (sha2_32t)(ctx->count[0] & SHA512_MASK), + space = SHA512_BLOCK_SIZE - pos; + const unsigned char *sp = data; + + if((ctx->count[0] += len) < len) + ++(ctx->count[1]); + + while(len >= space) /* tranfer whole blocks while possible */ + { + memcpy(((unsigned char*)ctx->wbuf) + pos, sp, space); + sp += space; len -= space; space = SHA512_BLOCK_SIZE; pos = 0; + bsw_64(ctx->wbuf, SHA512_BLOCK_SIZE >> 3); + sha512_compile(ctx); + } + + memcpy(((unsigned char*)ctx->wbuf) + pos, sp, len); +} + +/* SHA384/512 Final padding and digest calculation */ + +static sha2_64t m2[8] = +{ + n_u64(0000000000000000), n_u64(ff00000000000000), + n_u64(ffff000000000000), n_u64(ffffff0000000000), + n_u64(ffffffff00000000), n_u64(ffffffffff000000), + n_u64(ffffffffffff0000), n_u64(ffffffffffffff00) +}; + +static sha2_64t b2[8] = +{ + n_u64(8000000000000000), n_u64(0080000000000000), + n_u64(0000800000000000), n_u64(0000008000000000), + n_u64(0000000080000000), n_u64(0000000000800000), + n_u64(0000000000008000), n_u64(0000000000000080) +}; + +static void sha_end(unsigned char hval[], sha512_ctx ctx[1], const unsigned int hlen) +{ sha2_32t i = (sha2_32t)(ctx->count[0] & SHA512_MASK); + + bsw_64(ctx->wbuf, (i + 7) >> 3); + + /* bytes in the buffer are now in an order in which references */ + /* to 64-bit words will put bytes with lower addresses into the */ + /* top of 64 bit words on BOTH big and little endian machines */ + + /* we now need to mask valid bytes and add the padding which is */ + /* a single 1 bit and as many zero bits as necessary. */ + ctx->wbuf[i >> 3] = (ctx->wbuf[i >> 3] & m2[i & 7]) | b2[i & 7]; + + /* we need 17 or more empty byte positions, one for the padding */ + /* byte (above) and sixteen for the length count. If there is */ + /* not enough space pad and empty the buffer */ + if(i > SHA512_BLOCK_SIZE - 17) + { + if(i < 120) ctx->wbuf[15] = 0; + sha512_compile(ctx); + i = 0; + } + else + i = (i >> 3) + 1; + + while(i < 14) + ctx->wbuf[i++] = 0; + + /* the following 64-bit length fields are assembled in the */ + /* wrong byte order on little endian machines but this is */ + /* corrected later since they are only ever used as 64-bit */ + /* word values. */ + + ctx->wbuf[14] = (ctx->count[1] << 3) | (ctx->count[0] >> 61); + ctx->wbuf[15] = ctx->count[0] << 3; + + sha512_compile(ctx); + + /* extract the hash value as bytes in case the hash buffer is */ + /* misaligned for 32-bit words */ + for(i = 0; i < hlen; ++i) + hval[i] = (unsigned char)(ctx->hash[i >> 3] >> (8 * (~i & 7))); +} + +#endif + +#if defined(SHA_2) || defined(SHA_384) + +/* SHA384 initialisation data */ + +const sha2_64t i384[80] = +{ + n_u64(cbbb9d5dc1059ed8), n_u64(629a292a367cd507), + n_u64(9159015a3070dd17), n_u64(152fecd8f70e5939), + n_u64(67332667ffc00b31), n_u64(8eb44a8768581511), + n_u64(db0c2e0d64f98fa7), n_u64(47b5481dbefa4fa4) +}; + +sha2_void sha384_begin(sha384_ctx ctx[1]) +{ + ctx->count[0] = ctx->count[1] = 0; + memcpy(ctx->hash, i384, 8 * sizeof(sha2_64t)); +} + +sha2_void sha384_end(unsigned char hval[], sha384_ctx ctx[1]) +{ + sha_end(hval, ctx, SHA384_DIGEST_SIZE); +} + +sha2_void sha384(unsigned char hval[], const unsigned char data[], unsigned long len) +{ sha384_ctx cx[1]; + + sha384_begin(cx); sha384_hash(data, len, cx); sha384_end(hval, cx); +} + +#endif + +#if defined(SHA_2) || defined(SHA_512) + +/* SHA512 initialisation data */ + +const sha2_64t i512[80] = +{ + n_u64(6a09e667f3bcc908), n_u64(bb67ae8584caa73b), + n_u64(3c6ef372fe94f82b), n_u64(a54ff53a5f1d36f1), + n_u64(510e527fade682d1), n_u64(9b05688c2b3e6c1f), + n_u64(1f83d9abfb41bd6b), n_u64(5be0cd19137e2179) +}; + +sha2_void sha512_begin(sha512_ctx ctx[1]) +{ + ctx->count[0] = ctx->count[1] = 0; + memcpy(ctx->hash, i512, 8 * sizeof(sha2_64t)); +} + +sha2_void sha512_end(unsigned char hval[], sha512_ctx ctx[1]) +{ + sha_end(hval, ctx, SHA512_DIGEST_SIZE); +} + +sha2_void sha512(unsigned char hval[], const unsigned char data[], unsigned long len) +{ sha512_ctx cx[1]; + + sha512_begin(cx); sha512_hash(data, len, cx); sha512_end(hval, cx); +} + +#endif + +#if defined(SHA_2) + +#define CTX_256(x) ((x)->uu->ctx256) +#define CTX_384(x) ((x)->uu->ctx512) +#define CTX_512(x) ((x)->uu->ctx512) + +/* SHA2 initialisation */ + +sha2_int sha2_begin(unsigned long len, sha2_ctx ctx[1]) +{ unsigned long l = len; + switch(len) + { + case 256: l = len >> 3; + case 32: CTX_256(ctx)->count[0] = CTX_256(ctx)->count[1] = 0; + memcpy(CTX_256(ctx)->hash, i256, 32); break; + case 384: l = len >> 3; + case 48: CTX_384(ctx)->count[0] = CTX_384(ctx)->count[1] = 0; + memcpy(CTX_384(ctx)->hash, i384, 64); break; + case 512: l = len >> 3; + case 64: CTX_512(ctx)->count[0] = CTX_512(ctx)->count[1] = 0; + memcpy(CTX_512(ctx)->hash, i512, 64); break; + default: return SHA2_BAD; + } + + ctx->sha2_len = l; return SHA2_GOOD; +} + +sha2_void sha2_hash(const unsigned char data[], unsigned long len, sha2_ctx ctx[1]) +{ + switch(ctx->sha2_len) + { + case 32: sha256_hash(data, len, CTX_256(ctx)); return; + case 48: sha384_hash(data, len, CTX_384(ctx)); return; + case 64: sha512_hash(data, len, CTX_512(ctx)); return; + } +} + +sha2_void sha2_end(unsigned char hval[], sha2_ctx ctx[1]) +{ + switch(ctx->sha2_len) + { + case 32: sha256_end(hval, CTX_256(ctx)); return; + case 48: sha_end(hval, CTX_384(ctx), SHA384_DIGEST_SIZE); return; + case 64: sha_end(hval, CTX_512(ctx), SHA512_DIGEST_SIZE); return; + } +} + +sha2_int sha2(unsigned char hval[], unsigned long size, + const unsigned char data[], unsigned long len) +{ sha2_ctx cx[1]; + + if(sha2_begin(size, cx) == SHA2_GOOD) + { + sha2_hash(data, len, cx); sha2_end(hval, cx); return SHA2_GOOD; + } + else + return SHA2_BAD; +} + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.h b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.h new file mode 100644 index 0000000..d901b80 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/aesGladman/sha2.h @@ -0,0 +1,160 @@ +/* + --------------------------------------------------------------------------- + Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. + All rights reserved. + + LICENSE TERMS + + The free distribution and use of this software in both source and binary + form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + + ALTERNATIVELY, provided that this notice is retained in full, this product + may be distributed under the terms of the GNU General Public License (GPL), + in which case the provisions of the GPL apply INSTEAD OF those given above. + + DISCLAIMER + + This software is provided 'as is' with no explicit or implied warranties + in respect of its properties, including, but not limited to, correctness + and/or fitness for purpose. + --------------------------------------------------------------------------- + Issue Date: 26/08/2003 +*/ + +#ifndef _SHA2_H +#define _SHA2_H + +#include "irrMath.h" + +/* Defines for suffixes to 32 and 64 bit unsigned numeric values */ + +#define sfx_lo(x,y) x##y +#define sfx_hi(x,y) sfx_lo(x,y) +#define n_u32(p) sfx_hi(0x##p,s_u32) +#define n_u64(p) sfx_hi(0x##p,s_u64) + +/* define an unsigned 32-bit type */ + +#if UINT_MAX == 0xffffffff + typedef unsigned int sha2_32t; + #define s_u32 u +#elif ULONG_MAX == 0xffffffff + typedef unsigned long sha2_32t; + #define s_u32 ul +#else +#error Please define sha2_32t as an unsigned 32 bit type in sha2.h +#endif + +/* define an unsigned 64-bit type */ + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#if (_MSC_VER < 1300) || (__BORLANDC__ < 0x582) + typedef unsigned __int64 sha2_64t; + #define s_u64 ui64 +#elif ULONG_MAX == 0xffffffffffffffff + typedef unsigned long sha2_64t; + #define s_u64 ul +#elif ULONG_MAX == 0xffffffff + typedef unsigned long long sha2_64t; /* a somewhat dangerous guess */ + #define s_u64 ull +#else +#error Please define sha2_64t as an unsigned 64 bit type in sha2.h +#endif +#else +#ifdef _IRR_SOLARIS_PLATFORM_ +#include <sys/int_types.h> +#else +#include <stdint.h> +#endif + typedef int64_t sha2_64t; +#if __WORDSIZE==64 +#define s_u64 ul +#else +#define s_u64 ull +#endif +#endif + +#define SHA256_DIGEST_SIZE 32 +#define SHA384_DIGEST_SIZE 48 +#define SHA512_DIGEST_SIZE 64 + +#define SHA256_BLOCK_SIZE 64 +#define SHA384_BLOCK_SIZE 128 +#define SHA512_BLOCK_SIZE 128 + +#define SHA2_MAX_DIGEST_SIZE SHA512_DIGEST_SIZE + +#define SHA2_GOOD 0 +#define SHA2_BAD 1 + +/* type to hold the SHA256 context */ + +typedef struct +{ sha2_32t count[2]; + sha2_32t hash[8]; + sha2_32t wbuf[16]; +} sha256_ctx; + +/* type to hold the SHA384/512 context */ + +typedef struct +{ sha2_64t count[2]; + sha2_64t hash[8]; + sha2_64t wbuf[16]; +} sha512_ctx; + +typedef sha512_ctx sha384_ctx; + +/* type to hold a SHA2 context (256/384/512) */ + +typedef struct +{ union + { sha256_ctx ctx256[1]; + sha512_ctx ctx512[1]; + } uu[1]; + sha2_32t sha2_len; +} sha2_ctx; + +#ifndef SHA2_DLL /* implement normal or DLL functions */ +#define sha2_void void +#define sha2_int int +#else +#define sha2_void void __declspec(dllexport) _stdcall +#define sha2_int int __declspec(dllexport) _stdcall +#endif + +sha2_void sha256_compile(sha256_ctx ctx[1]); +sha2_void sha512_compile(sha512_ctx ctx[1]); + +sha2_void sha256_begin(sha256_ctx ctx[1]); +sha2_void sha256_hash(const unsigned char data[], unsigned long len, sha256_ctx ctx[1]); +sha2_void sha256_end(unsigned char hval[], sha256_ctx ctx[1]); +sha2_void sha256(unsigned char hval[], const unsigned char data[], unsigned long len); + +sha2_void sha384_begin(sha384_ctx ctx[1]); +#define sha384_hash sha512_hash +sha2_void sha384_end(unsigned char hval[], sha384_ctx ctx[1]); +sha2_void sha384(unsigned char hval[], const unsigned char data[], unsigned long len); + +sha2_void sha512_begin(sha512_ctx ctx[1]); +sha2_void sha512_hash(const unsigned char data[], unsigned long len, sha512_ctx ctx[1]); +sha2_void sha512_end(unsigned char hval[], sha512_ctx ctx[1]); +sha2_void sha512(unsigned char hval[], const unsigned char data[], unsigned long len); + +sha2_int sha2_begin(unsigned long size, sha2_ctx ctx[1]); +sha2_void sha2_hash(const unsigned char data[], unsigned long len, sha2_ctx ctx[1]); +sha2_void sha2_end(unsigned char hval[], sha2_ctx ctx[1]); +sha2_int sha2(unsigned char hval[], unsigned long size, const unsigned char data[], unsigned long len); + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/builtInFont.bmp b/src/others/irrlicht-1.8.1/source/Irrlicht/builtInFont.bmp new file mode 100644 index 0000000..7001c12 Binary files /dev/null and b/src/others/irrlicht-1.8.1/source/Irrlicht/builtInFont.bmp differ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/CHANGES b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/CHANGES new file mode 100644 index 0000000..81e97ca --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/CHANGES @@ -0,0 +1,327 @@ + ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ + + +0.9.0 +~~~~~ +First version. + + +0.9.0a +~~~~~~ +Removed 'ranlib' from Makefile, since most modern Unix-es +don't need it, or even know about it. + + +0.9.0b +~~~~~~ +Fixed a problem with error reporting in bzip2.c. This does not effect +the library in any way. Problem is: versions 0.9.0 and 0.9.0a (of the +program proper) compress and decompress correctly, but give misleading +error messages (internal panics) when an I/O error occurs, instead of +reporting the problem correctly. This shouldn't give any data loss +(as far as I can see), but is confusing. + +Made the inline declarations disappear for non-GCC compilers. + + +0.9.0c +~~~~~~ +Fixed some problems in the library pertaining to some boundary cases. +This makes the library behave more correctly in those situations. The +fixes apply only to features (calls and parameters) not used by +bzip2.c, so the non-fixedness of them in previous versions has no +effect on reliability of bzip2.c. + +In bzlib.c: + * made zero-length BZ_FLUSH work correctly in bzCompress(). + * fixed bzWrite/bzRead to ignore zero-length requests. + * fixed bzread to correctly handle read requests after EOF. + * wrong parameter order in call to bzDecompressInit in + bzBuffToBuffDecompress. Fixed. + +In compress.c: + * changed setting of nGroups in sendMTFValues() so as to + do a bit better on small files. This _does_ effect + bzip2.c. + + +0.9.5a +~~~~~~ +Major change: add a fallback sorting algorithm (blocksort.c) +to give reasonable behaviour even for very repetitive inputs. +Nuked --repetitive-best and --repetitive-fast since they are +no longer useful. + +Minor changes: mostly a whole bunch of small changes/ +bugfixes in the driver (bzip2.c). Changes pertaining to the +user interface are: + + allow decompression of symlink'd files to stdout + decompress/test files even without .bz2 extension + give more accurate error messages for I/O errors + when compressing/decompressing to stdout, don't catch control-C + read flags from BZIP2 and BZIP environment variables + decline to break hard links to a file unless forced with -f + allow -c flag even with no filenames + preserve file ownerships as far as possible + make -s -1 give the expected block size (100k) + add a flag -q --quiet to suppress nonessential warnings + stop decoding flags after --, so files beginning in - can be handled + resolved inconsistent naming: bzcat or bz2cat ? + bzip2 --help now returns 0 + +Programming-level changes are: + + fixed syntax error in GET_LL4 for Borland C++ 5.02 + let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC} + fix overshoot of mode-string end in bzopen_or_bzdopen + wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... } + close file handles under all error conditions + added minor mods so it compiles with DJGPP out of the box + fixed Makefile so it doesn't give problems with BSD make + fix uninitialised memory reads in dlltest.c + +0.9.5b +~~~~~~ +Open stdin/stdout in binary mode for DJGPP. + +0.9.5c +~~~~~~ +Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1. The + 1 +version could cause the sorted order to be wrong in some extremely +obscure cases. Also changed setting of quadrant in blocksort.c. + +0.9.5d +~~~~~~ +The only functional change is to make bzlibVersion() in the library +return the correct string. This has no effect whatsoever on the +functioning of the bzip2 program or library. Added a couple of casts +so the library compiles without warnings at level 3 in MS Visual +Studio 6.0. Included a Y2K statement in the file Y2K_INFO. All other +changes are minor documentation changes. + +1.0 +~~~ +Several minor bugfixes and enhancements: + +* Large file support. The library uses 64-bit counters to + count the volume of data passing through it. bzip2.c + is now compiled with -D_FILE_OFFSET_BITS=64 to get large + file support from the C library. -v correctly prints out + file sizes greater than 4 gigabytes. All these changes have + been made without assuming a 64-bit platform or a C compiler + which supports 64-bit ints, so, except for the C library + aspect, they are fully portable. + +* Decompression robustness. The library/program should be + robust to any corruption of compressed data, detecting and + handling _all_ corruption, instead of merely relying on + the CRCs. What this means is that the program should + never crash, given corrupted data, and the library should + always return BZ_DATA_ERROR. + +* Fixed an obscure race-condition bug only ever observed on + Solaris, in which, if you were very unlucky and issued + control-C at exactly the wrong time, both input and output + files would be deleted. + +* Don't run out of file handles on test/decompression when + large numbers of files have invalid magic numbers. + +* Avoid library namespace pollution. Prefix all exported + symbols with BZ2_. + +* Minor sorting enhancements from my DCC2000 paper. + +* Advance the version number to 1.0, so as to counteract the + (false-in-this-case) impression some people have that programs + with version numbers less than 1.0 are in some way, experimental, + pre-release versions. + +* Create an initial Makefile-libbz2_so to build a shared library. + Yes, I know I should really use libtool et al ... + +* Make the program exit with 2 instead of 0 when decompression + fails due to a bad magic number (ie, an invalid bzip2 header). + Also exit with 1 (as the manual claims :-) whenever a diagnostic + message would have been printed AND the corresponding operation + is aborted, for example + bzip2: Output file xx already exists. + When a diagnostic message is printed but the operation is not + aborted, for example + bzip2: Can't guess original name for wurble -- using wurble.out + then the exit value 0 is returned, unless some other problem is + also detected. + + I think it corresponds more closely to what the manual claims now. + + +1.0.1 +~~~~~ +* Modified dlltest.c so it uses the new BZ2_ naming scheme. +* Modified makefile-msc to fix minor build probs on Win2k. +* Updated README.COMPILATION.PROBLEMS. + +There are no functionality changes or bug fixes relative to version +1.0.0. This is just a documentation update + a fix for minor Win32 +build problems. For almost everyone, upgrading from 1.0.0 to 1.0.1 is +utterly pointless. Don't bother. + + +1.0.2 +~~~~~ +A bug fix release, addressing various minor issues which have appeared +in the 18 or so months since 1.0.1 was released. Most of the fixes +are to do with file-handling or documentation bugs. To the best of my +knowledge, there have been no data-loss-causing bugs reported in the +compression/decompression engine of 1.0.0 or 1.0.1. + +Note that this release does not improve the rather crude build system +for Unix platforms. The general plan here is to autoconfiscate/ +libtoolise 1.0.2 soon after release, and release the result as 1.1.0 +or perhaps 1.2.0. That, however, is still just a plan at this point. + +Here are the changes in 1.0.2. Bug-reporters and/or patch-senders in +parentheses. + +* Fix an infinite segfault loop in 1.0.1 when a directory is + encountered in -f (force) mode. + (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt) + +* Avoid double fclose() of output file on certain I/O error paths. + (Solar Designer) + +* Don't fail with internal error 1007 when fed a long stream (> 48MB) + of byte 251. Also print useful message suggesting that 1007s may be + caused by bad memory. + (noticed by Juan Pedro Vallejo, fixed by me) + +* Fix uninitialised variable silly bug in demo prog dlltest.c. + (Jorj Bauer) + +* Remove 512-MB limitation on recovered file size for bzip2recover + on selected platforms which support 64-bit ints. At the moment + all GCC supported platforms, and Win32. + (me, Alson van der Meulen) + +* Hard-code header byte values, to give correct operation on platforms + using EBCDIC as their native character set (IBM's OS/390). + (Leland Lucius) + +* Copy file access times correctly. + (Marty Leisner) + +* Add distclean and check targets to Makefile. + (Michael Carmack) + +* Parameterise use of ar and ranlib in Makefile. Also add $(LDFLAGS). + (Rich Ireland, Bo Thorsen) + +* Pass -p (create parent dirs as needed) to mkdir during make install. + (Jeremy Fusco) + +* Dereference symlinks when copying file permissions in -f mode. + (Volker Schmidt) + +* Majorly simplify implementation of uInt64_qrm10. + (Bo Lindbergh) + +* Check the input file still exists before deleting the output one, + when aborting in cleanUpAndFail(). + (Joerg Prante, Robert Linden, Matthias Krings) + +Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer +of bzip2: + +* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore. + +* Spelling changes and minor enhancements in bzip2.1. + +* Avoid race condition between creating the output file and setting its + interim permissions safely, by using fopen_output_safely(). + No changes to bzip2recover since there is no issue with file + permissions there. + +* do not print senseless report with -v when compressing an empty + file. + +* bzcat -f works on non-bzip2 files. + +* do not try to escape shell meta-characters on unix (the shell takes + care of these). + +* added --fast and --best aliases for -1 -9 for gzip compatibility. + + +1.0.3 (15 Feb 05) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.2. + +* Further robustification against corrupted compressed data. + There are currently no known bitstreams which can cause the + decompressor to crash, loop or access memory which does not + belong to it. If you are using bzip2 or the library to + decompress bitstreams from untrusted sources, an upgrade + to 1.0.3 is recommended. This fixes CAN-2005-1260. + +* The documentation has been converted to XML, from which html + and pdf can be derived. + +* Various minor bugs in the documentation have been fixed. + +* Fixes for various compilation warnings with newer versions of + gcc, and on 64-bit platforms. + +* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. + This has been fixed. + + +1.0.4 (20 Dec 06) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.3. + +* Fix file permissions race problem (CAN-2005-0953). + +* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD + scan. + +* 'const'/prototype cleanups in the C code. + +* Change default install location to /usr/local, and handle multiple + 'make install's without error. + +* Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 + to the extent that applies to bzgrep. + +* Use 'mktemp' rather than 'tempfile' in bzdiff. + +* Tighten up a couple of assertions in blocksort.c following automated + analysis. + +* Fix minor doc/comment bugs. + + +1.0.5 (10 Dec 07) +~~~~~~~~~~~~~~~~~ +Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/LICENSE b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/LICENSE new file mode 100644 index 0000000..cc61417 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/LICENSE @@ -0,0 +1,42 @@ + +-------------------------------------------------------------------------- + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2010 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, jseward@bzip.org +bzip2/libbzip2 version 1.0.6 of 6 September 2010 + +-------------------------------------------------------------------------- diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile new file mode 100644 index 0000000..9754ddf --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile @@ -0,0 +1,217 @@ +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ------------------------------------------------------------------ + +SHELL=/bin/sh + +# To assist in cross-compiling +CC=gcc +AR=ar +RANLIB=ranlib +LDFLAGS= + +BIGFILES=-D_FILE_OFFSET_BITS=64 +CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) + +# Where you want it installed when you do 'make install' +PREFIX=/usr/local + + +OBJS= blocksort.o \ + huffman.o \ + crctable.o \ + randtable.o \ + compress.o \ + decompress.o \ + bzlib.o + +all: libbz2.a bzip2 bzip2recover test + +bzip2: libbz2.a bzip2.o + $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 + +bzip2recover: bzip2recover.o + $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o + +libbz2.a: $(OBJS) + rm -f libbz2.a + $(AR) cq libbz2.a $(OBJS) + @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \ + -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \ + echo $(RANLIB) libbz2.a ; \ + $(RANLIB) libbz2.a ; \ + fi + +check: test +test: bzip2 + @cat words1 + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 + ./bzip2 -d < sample1.bz2 > sample1.tst + ./bzip2 -d < sample2.bz2 > sample2.tst + ./bzip2 -ds < sample3.bz2 > sample3.tst + cmp sample1.bz2 sample1.rb2 + cmp sample2.bz2 sample2.rb2 + cmp sample3.bz2 sample3.rb2 + cmp sample1.tst sample1.ref + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref + @cat words3 + +install: bzip2 bzip2recover + if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi + if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi + if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi + if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi + if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi + cp -f bzip2 $(PREFIX)/bin/bzip2 + cp -f bzip2 $(PREFIX)/bin/bunzip2 + cp -f bzip2 $(PREFIX)/bin/bzcat + cp -f bzip2recover $(PREFIX)/bin/bzip2recover + chmod a+x $(PREFIX)/bin/bzip2 + chmod a+x $(PREFIX)/bin/bunzip2 + chmod a+x $(PREFIX)/bin/bzcat + chmod a+x $(PREFIX)/bin/bzip2recover + cp -f bzip2.1 $(PREFIX)/man/man1 + chmod a+r $(PREFIX)/man/man1/bzip2.1 + cp -f bzlib.h $(PREFIX)/include + chmod a+r $(PREFIX)/include/bzlib.h + cp -f libbz2.a $(PREFIX)/lib + chmod a+r $(PREFIX)/lib/libbz2.a + cp -f bzgrep $(PREFIX)/bin/bzgrep + ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep + ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep + chmod a+x $(PREFIX)/bin/bzgrep + cp -f bzmore $(PREFIX)/bin/bzmore + ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless + chmod a+x $(PREFIX)/bin/bzmore + cp -f bzdiff $(PREFIX)/bin/bzdiff + ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp + chmod a+x $(PREFIX)/bin/bzdiff + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 + chmod a+r $(PREFIX)/man/man1/bzgrep.1 + chmod a+r $(PREFIX)/man/man1/bzmore.1 + chmod a+r $(PREFIX)/man/man1/bzdiff.1 + echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1 + echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1 + echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1 + echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 + +clean: + rm -f *.o libbz2.a bzip2 bzip2recover \ + sample1.rb2 sample2.rb2 sample3.rb2 \ + sample1.tst sample2.tst sample3.tst + +blocksort.o: blocksort.c + @cat words0 + $(CC) $(CFLAGS) -c blocksort.c +huffman.o: huffman.c + $(CC) $(CFLAGS) -c huffman.c +crctable.o: crctable.c + $(CC) $(CFLAGS) -c crctable.c +randtable.o: randtable.c + $(CC) $(CFLAGS) -c randtable.c +compress.o: compress.c + $(CC) $(CFLAGS) -c compress.c +decompress.o: decompress.c + $(CC) $(CFLAGS) -c decompress.c +bzlib.o: bzlib.c + $(CC) $(CFLAGS) -c bzlib.c +bzip2.o: bzip2.c + $(CC) $(CFLAGS) -c bzip2.c +bzip2recover.o: bzip2recover.c + $(CC) $(CFLAGS) -c bzip2recover.c + + +distclean: clean + rm -f manual.ps manual.html manual.pdf + +DISTNAME=bzip2-1.0.6 +dist: check manual + rm -f $(DISTNAME) + ln -s -f . $(DISTNAME) + tar cvf $(DISTNAME).tar \ + $(DISTNAME)/blocksort.c \ + $(DISTNAME)/huffman.c \ + $(DISTNAME)/crctable.c \ + $(DISTNAME)/randtable.c \ + $(DISTNAME)/compress.c \ + $(DISTNAME)/decompress.c \ + $(DISTNAME)/bzlib.c \ + $(DISTNAME)/bzip2.c \ + $(DISTNAME)/bzip2recover.c \ + $(DISTNAME)/bzlib.h \ + $(DISTNAME)/bzlib_private.h \ + $(DISTNAME)/Makefile \ + $(DISTNAME)/LICENSE \ + $(DISTNAME)/bzip2.1 \ + $(DISTNAME)/bzip2.1.preformatted \ + $(DISTNAME)/bzip2.txt \ + $(DISTNAME)/words0 \ + $(DISTNAME)/words1 \ + $(DISTNAME)/words2 \ + $(DISTNAME)/words3 \ + $(DISTNAME)/sample1.ref \ + $(DISTNAME)/sample2.ref \ + $(DISTNAME)/sample3.ref \ + $(DISTNAME)/sample1.bz2 \ + $(DISTNAME)/sample2.bz2 \ + $(DISTNAME)/sample3.bz2 \ + $(DISTNAME)/dlltest.c \ + $(DISTNAME)/manual.html \ + $(DISTNAME)/manual.pdf \ + $(DISTNAME)/manual.ps \ + $(DISTNAME)/README \ + $(DISTNAME)/README.COMPILATION.PROBLEMS \ + $(DISTNAME)/README.XML.STUFF \ + $(DISTNAME)/CHANGES \ + $(DISTNAME)/libbz2.def \ + $(DISTNAME)/libbz2.dsp \ + $(DISTNAME)/dlltest.dsp \ + $(DISTNAME)/makefile.msc \ + $(DISTNAME)/unzcrash.c \ + $(DISTNAME)/spewG.c \ + $(DISTNAME)/mk251.c \ + $(DISTNAME)/bzdiff \ + $(DISTNAME)/bzdiff.1 \ + $(DISTNAME)/bzmore \ + $(DISTNAME)/bzmore.1 \ + $(DISTNAME)/bzgrep \ + $(DISTNAME)/bzgrep.1 \ + $(DISTNAME)/Makefile-libbz2_so \ + $(DISTNAME)/bz-common.xsl \ + $(DISTNAME)/bz-fo.xsl \ + $(DISTNAME)/bz-html.xsl \ + $(DISTNAME)/bzip.css \ + $(DISTNAME)/entities.xml \ + $(DISTNAME)/manual.xml \ + $(DISTNAME)/format.pl \ + $(DISTNAME)/xmlproc.sh + gzip -v $(DISTNAME).tar + +# For rebuilding the manual from sources on my SuSE 9.1 box + +MANUAL_SRCS= bz-common.xsl bz-fo.xsl bz-html.xsl bzip.css \ + entities.xml manual.xml + +manual: manual.html manual.ps manual.pdf + +manual.ps: $(MANUAL_SRCS) + ./xmlproc.sh -ps manual.xml + +manual.pdf: $(MANUAL_SRCS) + ./xmlproc.sh -pdf manual.xml + +manual.html: $(MANUAL_SRCS) + ./xmlproc.sh -html manual.xml diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile-libbz2_so b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile-libbz2_so new file mode 100644 index 0000000..e58791b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/Makefile-libbz2_so @@ -0,0 +1,59 @@ + +# This Makefile builds a shared version of the library, +# libbz2.so.1.0.6, with soname libbz2.so.1.0, +# at least on x86-Linux (RedHat 7.2), +# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). +# Please see the README file for some important info +# about building the library like this. + +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ------------------------------------------------------------------ + + +SHELL=/bin/sh +CC=gcc +BIGFILES=-D_FILE_OFFSET_BITS=64 +CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) + +OBJS= blocksort.o \ + huffman.o \ + crctable.o \ + randtable.o \ + compress.o \ + decompress.o \ + bzlib.o + +all: $(OBJS) + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0 + +clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared + +blocksort.o: blocksort.c + $(CC) $(CFLAGS) -c blocksort.c +huffman.o: huffman.c + $(CC) $(CFLAGS) -c huffman.c +crctable.o: crctable.c + $(CC) $(CFLAGS) -c crctable.c +randtable.o: randtable.c + $(CC) $(CFLAGS) -c randtable.c +compress.o: compress.c + $(CC) $(CFLAGS) -c compress.c +decompress.o: decompress.c + $(CC) $(CFLAGS) -c decompress.c +bzlib.o: bzlib.c + $(CC) $(CFLAGS) -c bzlib.c diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README new file mode 100644 index 0000000..9fb0f63 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README @@ -0,0 +1,215 @@ + +This is the README for bzip2/libzip2. +This version is fully compatible with the previous public releases. + +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + +Please read the WARNING, DISCLAIMER and PATENTS sections in this file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +Complete documentation is available in Postscript form (manual.ps), +PDF (manual.pdf) or html (manual.html). A plain-text version of the +manual page is available as bzip2.txt. + + +HOW TO BUILD -- UNIX + +Type 'make'. This builds the library libbz2.a and then the programs +bzip2 and bzip2recover. Six self-tests are run. If the self-tests +complete ok, carry on to installation: + +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type + + make install + +To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type + + make install PREFIX=/xxx/yyy + +If you are (justifiably) paranoid and want to see what 'make install' +is going to do, you can first do + + make -n install or + make -n install PREFIX=/xxx/yyy respectively. + +The -n instructs make to show the commands it would execute, but not +actually execute them. + + +HOW TO BUILD -- UNIX, shared library libbz2.so. + +Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for +Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims +that it works for any other platform, though I suspect it probably +will work for most platforms employing both ELF and gcc. + +bzip2-shared, a client of the shared library, is also built, but not +self-tested. So I suggest you also build using the normal Makefile, +since that conducts a self-test. A second reason to prefer the +version statically linked to the library is that, on x86 platforms, +building shared objects makes a valuable register (%ebx) unavailable +to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. + +Important note for people upgrading .so's from 0.9.0/0.9.5 to version +1.0.X. All the functions in the library have been renamed, from (eg) +bzCompress to BZ2_bzCompress, to avoid namespace pollution. +Unfortunately this means that the libbz2.so created by +Makefile-libbz2_so will not work with any program which used an older +version of the library. I do encourage library clients to make the +effort to upgrade to use version 1.0, since it is both faster and more +robust than previous versions. + + +HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. + +It's difficult for me to support compilation on all these platforms. +My approach is to collect binaries for these platforms, and put them +on the master web site (http://www.bzip.org). Look there. However +(FWIW), bzip2-1.0.X is very standard ANSI C and should compile +unmodified with MS Visual C. If you have difficulties building, you +might want to read README.COMPILATION.PROBLEMS. + +At least using MS Visual C++ 6, you can build from the unmodified +sources by issuing, in a command shell: + + nmake -f makefile.msc + +(you may need to first run the MSVC-provided script VCVARS32.BAT + so as to set up paths to the MSVC tools correctly). + + +VALIDATION + +Correct operation, in the sense that a compressed file can always be +decompressed to reproduce the original, is obviously of paramount +importance. To validate bzip2, I used a modified version of Mark +Nelson's churn program. Churn is an automated test driver which +recursively traverses a directory structure, using bzip2 to compress +and then decompress each file it encounters, and checking that the +decompressed data is the same as the original. + + + +Please read and be aware of the following: + +WARNING: + + This program and library (attempts to) compress data by + performing several non-trivial transformations on it. + Unless you are 100% familiar with *all* the algorithms + contained herein, and with the consequences of modifying them, + you should NOT meddle with the compression or decompression + machinery. Incorrect changes can and very likely *will* + lead to disastrous loss of data. + + +DISCLAIMER: + + I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE + USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. + + Every compression of a file implies an assumption that the + compressed file can be decompressed to reproduce the original. + Great efforts in design, coding and testing have been made to + ensure that this program works correctly. However, the complexity + of the algorithms, and, in particular, the presence of various + special cases in the code which occur with very low but non-zero + probability make it impossible to rule out the possibility of bugs + remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS + PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER + SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. + + That is not to say this program is inherently unreliable. + Indeed, I very much hope the opposite is true. bzip2/libbzip2 + has been carefully constructed and extensively tested. + + +PATENTS: + + To the best of my knowledge, bzip2/libbzip2 does not use any + patented algorithms. However, I do not have the resources + to carry out a patent search. Therefore I cannot give any + guarantee of the above statement. + + + +WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? + + * Approx 10% faster compression, 30% faster decompression + * -t (test mode) is a lot quicker + * Can decompress concatenated compressed files + * Programming interface, so programs can directly read/write .bz2 files + * Less restrictive (BSD-style) licensing + * Flag handling more compatible with GNU gzip + * Much more documentation, i.e., a proper user manual + * Hopefully, improved portability (at least of the library) + +WHAT'S NEW IN 0.9.5 ? + + * Compression speed is much less sensitive to the input + data than in previous versions. Specifically, the very + slow performance caused by repetitive data is fixed. + * Many small improvements in file and flag handling. + * A Y2K statement. + +WHAT'S NEW IN 1.0.0 ? + + See the CHANGES file. + +WHAT'S NEW IN 1.0.2 ? + + See the CHANGES file. + +WHAT'S NEW IN 1.0.3 ? + + See the CHANGES file. + +WHAT'S NEW IN 1.0.4 ? + + See the CHANGES file. + +WHAT'S NEW IN 1.0.5 ? + + See the CHANGES file. + +WHAT'S NEW IN 1.0.6 ? + + See the CHANGES file. + + +I hope you find bzip2 useful. Feel free to contact me at + jseward@bzip.org +if you have any suggestions or queries. Many people mailed me with +comments, suggestions and patches after the releases of bzip-0.15, +bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, +1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this +feedback. I thank you for your comments. + +bzip2's "home" is http://www.bzip.org/ + +Julian Seward +jseward@bzip.org +Cambridge, UK. + +18 July 1996 (version 0.15) +25 August 1996 (version 0.21) + 7 August 1997 (bzip2, version 0.1) +29 August 1997 (bzip2, version 0.1pl2) +23 August 1998 (bzip2, version 0.9.0) + 8 June 1999 (bzip2, version 0.9.5) + 4 Sept 1999 (bzip2, version 0.9.5d) + 5 May 2000 (bzip2, version 1.0pre8) +30 December 2001 (bzip2, version 1.0.2pre1) +15 February 2005 (bzip2, version 1.0.3) +20 December 2006 (bzip2, version 1.0.4) +10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS new file mode 100644 index 0000000..667d0d6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS @@ -0,0 +1,58 @@ +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + +Please read the WARNING, DISCLAIMER and PATENTS sections in the +README file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +bzip2-1.0.6 should compile without problems on the vast majority of +platforms. Using the supplied Makefile, I've built and tested it +myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ +6.0 and nmake, you can build a native Win32 version too. Large file +support seems to work correctly on at least on amd64-linux. + +When I say "large file" I mean a file of size 2,147,483,648 (2^31) +bytes or above. Many older OSs can't handle files above this size, +but many newer ones can. Large files are pretty huge -- most files +you'll encounter are not Large Files. + +Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety +of platforms without difficulty, and I hope this version will continue +in that tradition. However, in order to support large files, I've had +to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. This +can cause problems. + +The technique of adding -D_FILE_OFFSET_BITS=64 to get large file +support is, as far as I know, the Recommended Way to get correct large +file support. For more details, see the Large File Support +Specification, published by the Large File Summit, at + + http://ftp.sas.com/standards/large.file + +As a general comment, if you get compilation errors which you think +are related to large file support, try removing the above define from +the Makefile, ie, delete the line + + BIGFILES=-D_FILE_OFFSET_BITS=64 + +from the Makefile, and do 'make clean ; make'. This will give you a +version of bzip2 without large file support, which, for most +applications, is probably not a problem. + +Alternatively, try some of the platform-specific hints listed below. + +You can use the spewG.c program to generate huge files to test bzip2's +large file support, if you are feeling paranoid. Be aware though that +any compilation problems which affect bzip2 will also affect spewG.c, +alas. + +AIX: I have reports that for large file support, you need to specify +-D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64. I have not tested +this myself. diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.XML.STUFF b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.XML.STUFF new file mode 100644 index 0000000..3a57f3f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/README.XML.STUFF @@ -0,0 +1,45 @@ + ---------------------------------------------------------------- + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ---------------------------------------------------------------- + +The script xmlproc.sh takes an xml file as input, +and processes it to create .pdf, .html or .ps output. +It uses format.pl, a perl script to format <pre> blocks nicely, + and add CDATA tags so writers do not have to use eg. < + +The file "entities.xml" must be edited to reflect current +version, year, etc. + + +Usage: + + ./xmlproc.sh -v manual.xml + Validates an xml file to ensure no dtd-compliance errors + + ./xmlproc.sh -html manual.xml + Output: manual.html + + ./xmlproc.sh -pdf manual.xml + Output: manual.pdf + + ./xmlproc.sh -ps manual.xml + Output: manual.ps + + +Notum bene: +- pdfxmltex barfs if given a filename with an underscore in it + +- xmltex won't work yet - there's a bug in passivetex + which we are all waiting for Sebastian to fix. + So we are going the xml -> pdf -> ps route for the time being, + using pdfxmltex. diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/blocksort.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/blocksort.c new file mode 100644 index 0000000..d0d662c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/blocksort.c @@ -0,0 +1,1094 @@ + +/*-------------------------------------------------------------*/ +/*--- Block sorting machinery ---*/ +/*--- blocksort.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include "bzlib_private.h" + +/*---------------------------------------------*/ +/*--- Fallback O(N log(N)^2) sorting ---*/ +/*--- algorithm, for repetitive blocks ---*/ +/*---------------------------------------------*/ + +/*---------------------------------------------*/ +static +__inline__ +void fallbackSimpleSort ( UInt32* fmap, + UInt32* eclass, + Int32 lo, + Int32 hi ) +{ + Int32 i, j, tmp; + UInt32 ec_tmp; + + if (lo == hi) return; + + if (hi - lo > 3) { + for ( i = hi-4; i >= lo; i-- ) { + tmp = fmap[i]; + ec_tmp = eclass[tmp]; + for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 ) + fmap[j-4] = fmap[j]; + fmap[j-4] = tmp; + } + } + + for ( i = hi-1; i >= lo; i-- ) { + tmp = fmap[i]; + ec_tmp = eclass[tmp]; + for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ ) + fmap[j-1] = fmap[j]; + fmap[j-1] = tmp; + } +} + + +/*---------------------------------------------*/ +#define fswap(zz1, zz2) \ + { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; } + +#define fvswap(zzp1, zzp2, zzn) \ +{ \ + Int32 yyp1 = (zzp1); \ + Int32 yyp2 = (zzp2); \ + Int32 yyn = (zzn); \ + while (yyn > 0) { \ + fswap(fmap[yyp1], fmap[yyp2]); \ + yyp1++; yyp2++; yyn--; \ + } \ +} + + +#define fmin(a,b) ((a) < (b)) ? (a) : (b) + +#define fpush(lz,hz) { stackLo[sp] = lz; \ + stackHi[sp] = hz; \ + sp++; } + +#define fpop(lz,hz) { sp--; \ + lz = stackLo[sp]; \ + hz = stackHi[sp]; } + +#define FALLBACK_QSORT_SMALL_THRESH 10 +#define FALLBACK_QSORT_STACK_SIZE 100 + + +static +void fallbackQSort3 ( UInt32* fmap, + UInt32* eclass, + Int32 loSt, + Int32 hiSt ) +{ + Int32 unLo, unHi, ltLo, gtHi, n, m; + Int32 sp, lo, hi; + UInt32 med, r, r3; + Int32 stackLo[FALLBACK_QSORT_STACK_SIZE]; + Int32 stackHi[FALLBACK_QSORT_STACK_SIZE]; + + r = 0; + + sp = 0; + fpush ( loSt, hiSt ); + + while (sp > 0) { + + AssertH ( sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004 ); + + fpop ( lo, hi ); + if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) { + fallbackSimpleSort ( fmap, eclass, lo, hi ); + continue; + } + + /* Random partitioning. Median of 3 sometimes fails to + avoid bad cases. Median of 9 seems to help but + looks rather expensive. This too seems to work but + is cheaper. Guidance for the magic constants + 7621 and 32768 is taken from Sedgewick's algorithms + book, chapter 35. + */ + r = ((r * 7621) + 1) % 32768; + r3 = r % 3; + if (r3 == 0) med = eclass[fmap[lo]]; else + if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else + med = eclass[fmap[hi]]; + + unLo = ltLo = lo; + unHi = gtHi = hi; + + while (1) { + while (1) { + if (unLo > unHi) break; + n = (Int32)eclass[fmap[unLo]] - (Int32)med; + if (n == 0) { + fswap(fmap[unLo], fmap[ltLo]); + ltLo++; unLo++; + continue; + }; + if (n > 0) break; + unLo++; + } + while (1) { + if (unLo > unHi) break; + n = (Int32)eclass[fmap[unHi]] - (Int32)med; + if (n == 0) { + fswap(fmap[unHi], fmap[gtHi]); + gtHi--; unHi--; + continue; + }; + if (n < 0) break; + unHi--; + } + if (unLo > unHi) break; + fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--; + } + + AssertD ( unHi == unLo-1, "fallbackQSort3(2)" ); + + if (gtHi < ltLo) continue; + + n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n); + m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m); + + n = lo + unLo - ltLo - 1; + m = hi - (gtHi - unHi) + 1; + + if (n - lo > hi - m) { + fpush ( lo, n ); + fpush ( m, hi ); + } else { + fpush ( m, hi ); + fpush ( lo, n ); + } + } +} + +#undef fmin +#undef fpush +#undef fpop +#undef fswap +#undef fvswap +#undef FALLBACK_QSORT_SMALL_THRESH +#undef FALLBACK_QSORT_STACK_SIZE + + +/*---------------------------------------------*/ +/* Pre: + nblock > 0 + eclass exists for [0 .. nblock-1] + ((UChar*)eclass) [0 .. nblock-1] holds block + ptr exists for [0 .. nblock-1] + + Post: + ((UChar*)eclass) [0 .. nblock-1] holds block + All other areas of eclass destroyed + fmap [0 .. nblock-1] holds sorted order + bhtab [ 0 .. 2+(nblock/32) ] destroyed +*/ + +#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) +#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) +#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) +#define WORD_BH(zz) bhtab[(zz) >> 5] +#define UNALIGNED_BH(zz) ((zz) & 0x01f) + +static +void fallbackSort ( UInt32* fmap, + UInt32* eclass, + UInt32* bhtab, + Int32 nblock, + Int32 verb ) +{ + Int32 ftab[257]; + Int32 ftabCopy[256]; + Int32 H, i, j, k, l, r, cc, cc1; + Int32 nNotDone; + Int32 nBhtab; + UChar* eclass8 = (UChar*)eclass; + + /*-- + Initial 1-char radix sort to generate + initial fmap and initial BH bits. + --*/ + if (verb >= 4) + VPrintf0 ( " bucket sorting ...\n" ); + for (i = 0; i < 257; i++) ftab[i] = 0; + for (i = 0; i < nblock; i++) ftab[eclass8[i]]++; + for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i]; + for (i = 1; i < 257; i++) ftab[i] += ftab[i-1]; + + for (i = 0; i < nblock; i++) { + j = eclass8[i]; + k = ftab[j] - 1; + ftab[j] = k; + fmap[k] = i; + } + + nBhtab = 2 + (nblock / 32); + for (i = 0; i < nBhtab; i++) bhtab[i] = 0; + for (i = 0; i < 256; i++) SET_BH(ftab[i]); + + /*-- + Inductively refine the buckets. Kind-of an + "exponential radix sort" (!), inspired by the + Manber-Myers suffix array construction algorithm. + --*/ + + /*-- set sentinel bits for block-end detection --*/ + for (i = 0; i < 32; i++) { + SET_BH(nblock + 2*i); + CLEAR_BH(nblock + 2*i + 1); + } + + /*-- the log(N) loop --*/ + H = 1; + while (1) { + + if (verb >= 4) + VPrintf1 ( " depth %6d has ", H ); + + j = 0; + for (i = 0; i < nblock; i++) { + if (ISSET_BH(i)) j = i; + k = fmap[i] - H; if (k < 0) k += nblock; + eclass[k] = j; + } + + nNotDone = 0; + r = -1; + while (1) { + + /*-- find the next non-singleton bucket --*/ + k = r + 1; + while (ISSET_BH(k) && UNALIGNED_BH(k)) k++; + if (ISSET_BH(k)) { + while (WORD_BH(k) == 0xffffffff) k += 32; + while (ISSET_BH(k)) k++; + } + l = k - 1; + if (l >= nblock) break; + while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++; + if (!ISSET_BH(k)) { + while (WORD_BH(k) == 0x00000000) k += 32; + while (!ISSET_BH(k)) k++; + } + r = k - 1; + if (r >= nblock) break; + + /*-- now [l, r] bracket current bucket --*/ + if (r > l) { + nNotDone += (r - l + 1); + fallbackQSort3 ( fmap, eclass, l, r ); + + /*-- scan bucket and generate header bits-- */ + cc = -1; + for (i = l; i <= r; i++) { + cc1 = eclass[fmap[i]]; + if (cc != cc1) { SET_BH(i); cc = cc1; }; + } + } + } + + if (verb >= 4) + VPrintf1 ( "%6d unresolved strings\n", nNotDone ); + + H *= 2; + if (H > nblock || nNotDone == 0) break; + } + + /*-- + Reconstruct the original block in + eclass8 [0 .. nblock-1], since the + previous phase destroyed it. + --*/ + if (verb >= 4) + VPrintf0 ( " reconstructing block ...\n" ); + j = 0; + for (i = 0; i < nblock; i++) { + while (ftabCopy[j] == 0) j++; + ftabCopy[j]--; + eclass8[fmap[i]] = (UChar)j; + } + AssertH ( j < 256, 1005 ); +} + +#undef SET_BH +#undef CLEAR_BH +#undef ISSET_BH +#undef WORD_BH +#undef UNALIGNED_BH + + +/*---------------------------------------------*/ +/*--- The main, O(N^2 log(N)) sorting ---*/ +/*--- algorithm. Faster for "normal" ---*/ +/*--- non-repetitive blocks. ---*/ +/*---------------------------------------------*/ + +/*---------------------------------------------*/ +static +__inline__ +Bool mainGtU ( UInt32 i1, + UInt32 i2, + UChar* block, + UInt16* quadrant, + UInt32 nblock, + Int32* budget ) +{ + Int32 k; + UChar c1, c2; + UInt16 s1, s2; + + AssertD ( i1 != i2, "mainGtU" ); + /* 1 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 2 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 3 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 4 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 5 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 6 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 7 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 8 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 9 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 10 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 11 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + /* 12 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + i1++; i2++; + + k = nblock + 8; + + do { + /* 1 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 2 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 3 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 4 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 5 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 6 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 7 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + /* 8 */ + c1 = block[i1]; c2 = block[i2]; + if (c1 != c2) return (c1 > c2); + s1 = quadrant[i1]; s2 = quadrant[i2]; + if (s1 != s2) return (s1 > s2); + i1++; i2++; + + if (i1 >= nblock) i1 -= nblock; + if (i2 >= nblock) i2 -= nblock; + + k -= 8; + (*budget)--; + } + while (k >= 0); + + return False; +} + + +/*---------------------------------------------*/ +/*-- + Knuth's increments seem to work better + than Incerpi-Sedgewick here. Possibly + because the number of elems to sort is + usually small, typically <= 20. +--*/ +static +Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280, + 9841, 29524, 88573, 265720, + 797161, 2391484 }; + +static +void mainSimpleSort ( UInt32* ptr, + UChar* block, + UInt16* quadrant, + Int32 nblock, + Int32 lo, + Int32 hi, + Int32 d, + Int32* budget ) +{ + Int32 i, j, h, bigN, hp; + UInt32 v; + + bigN = hi - lo + 1; + if (bigN < 2) return; + + hp = 0; + while (incs[hp] < bigN) hp++; + hp--; + + for (; hp >= 0; hp--) { + h = incs[hp]; + + i = lo + h; + while (True) { + + /*-- copy 1 --*/ + if (i > hi) break; + v = ptr[i]; + j = i; + while ( mainGtU ( + ptr[j-h]+d, v+d, block, quadrant, nblock, budget + ) ) { + ptr[j] = ptr[j-h]; + j = j - h; + if (j <= (lo + h - 1)) break; + } + ptr[j] = v; + i++; + + /*-- copy 2 --*/ + if (i > hi) break; + v = ptr[i]; + j = i; + while ( mainGtU ( + ptr[j-h]+d, v+d, block, quadrant, nblock, budget + ) ) { + ptr[j] = ptr[j-h]; + j = j - h; + if (j <= (lo + h - 1)) break; + } + ptr[j] = v; + i++; + + /*-- copy 3 --*/ + if (i > hi) break; + v = ptr[i]; + j = i; + while ( mainGtU ( + ptr[j-h]+d, v+d, block, quadrant, nblock, budget + ) ) { + ptr[j] = ptr[j-h]; + j = j - h; + if (j <= (lo + h - 1)) break; + } + ptr[j] = v; + i++; + + if (*budget < 0) return; + } + } +} + + +/*---------------------------------------------*/ +/*-- + The following is an implementation of + an elegant 3-way quicksort for strings, + described in a paper "Fast Algorithms for + Sorting and Searching Strings", by Robert + Sedgewick and Jon L. Bentley. +--*/ + +#define mswap(zz1, zz2) \ + { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; } + +#define mvswap(zzp1, zzp2, zzn) \ +{ \ + Int32 yyp1 = (zzp1); \ + Int32 yyp2 = (zzp2); \ + Int32 yyn = (zzn); \ + while (yyn > 0) { \ + mswap(ptr[yyp1], ptr[yyp2]); \ + yyp1++; yyp2++; yyn--; \ + } \ +} + +static +__inline__ +UChar mmed3 ( UChar a, UChar b, UChar c ) +{ + UChar t; + if (a > b) { t = a; a = b; b = t; }; + if (b > c) { + b = c; + if (a > b) b = a; + } + return b; +} + +#define mmin(a,b) ((a) < (b)) ? (a) : (b) + +#define mpush(lz,hz,dz) { stackLo[sp] = lz; \ + stackHi[sp] = hz; \ + stackD [sp] = dz; \ + sp++; } + +#define mpop(lz,hz,dz) { sp--; \ + lz = stackLo[sp]; \ + hz = stackHi[sp]; \ + dz = stackD [sp]; } + + +#define mnextsize(az) (nextHi[az]-nextLo[az]) + +#define mnextswap(az,bz) \ + { Int32 tz; \ + tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \ + tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \ + tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; } + + +#define MAIN_QSORT_SMALL_THRESH 20 +#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT) +#define MAIN_QSORT_STACK_SIZE 100 + +static +void mainQSort3 ( UInt32* ptr, + UChar* block, + UInt16* quadrant, + Int32 nblock, + Int32 loSt, + Int32 hiSt, + Int32 dSt, + Int32* budget ) +{ + Int32 unLo, unHi, ltLo, gtHi, n, m, med; + Int32 sp, lo, hi, d; + + Int32 stackLo[MAIN_QSORT_STACK_SIZE]; + Int32 stackHi[MAIN_QSORT_STACK_SIZE]; + Int32 stackD [MAIN_QSORT_STACK_SIZE]; + + Int32 nextLo[3]; + Int32 nextHi[3]; + Int32 nextD [3]; + + sp = 0; + mpush ( loSt, hiSt, dSt ); + + while (sp > 0) { + + AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 ); + + mpop ( lo, hi, d ); + if (hi - lo < MAIN_QSORT_SMALL_THRESH || + d > MAIN_QSORT_DEPTH_THRESH) { + mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget ); + if (*budget < 0) return; + continue; + } + + med = (Int32) + mmed3 ( block[ptr[ lo ]+d], + block[ptr[ hi ]+d], + block[ptr[ (lo+hi)>>1 ]+d] ); + + unLo = ltLo = lo; + unHi = gtHi = hi; + + while (True) { + while (True) { + if (unLo > unHi) break; + n = ((Int32)block[ptr[unLo]+d]) - med; + if (n == 0) { + mswap(ptr[unLo], ptr[ltLo]); + ltLo++; unLo++; continue; + }; + if (n > 0) break; + unLo++; + } + while (True) { + if (unLo > unHi) break; + n = ((Int32)block[ptr[unHi]+d]) - med; + if (n == 0) { + mswap(ptr[unHi], ptr[gtHi]); + gtHi--; unHi--; continue; + }; + if (n < 0) break; + unHi--; + } + if (unLo > unHi) break; + mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--; + } + + AssertD ( unHi == unLo-1, "mainQSort3(2)" ); + + if (gtHi < ltLo) { + mpush(lo, hi, d+1 ); + continue; + } + + n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n); + m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m); + + n = lo + unLo - ltLo - 1; + m = hi - (gtHi - unHi) + 1; + + nextLo[0] = lo; nextHi[0] = n; nextD[0] = d; + nextLo[1] = m; nextHi[1] = hi; nextD[1] = d; + nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1; + + if (mnextsize(0) < mnextsize(1)) mnextswap(0,1); + if (mnextsize(1) < mnextsize(2)) mnextswap(1,2); + if (mnextsize(0) < mnextsize(1)) mnextswap(0,1); + + AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" ); + AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" ); + + mpush (nextLo[0], nextHi[0], nextD[0]); + mpush (nextLo[1], nextHi[1], nextD[1]); + mpush (nextLo[2], nextHi[2], nextD[2]); + } +} + +#undef mswap +#undef mvswap +#undef mpush +#undef mpop +#undef mmin +#undef mnextsize +#undef mnextswap +#undef MAIN_QSORT_SMALL_THRESH +#undef MAIN_QSORT_DEPTH_THRESH +#undef MAIN_QSORT_STACK_SIZE + + +/*---------------------------------------------*/ +/* Pre: + nblock > N_OVERSHOOT + block32 exists for [0 .. nblock-1 +N_OVERSHOOT] + ((UChar*)block32) [0 .. nblock-1] holds block + ptr exists for [0 .. nblock-1] + + Post: + ((UChar*)block32) [0 .. nblock-1] holds block + All other areas of block32 destroyed + ftab [0 .. 65536 ] destroyed + ptr [0 .. nblock-1] holds sorted order + if (*budget < 0), sorting was abandoned +*/ + +#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8]) +#define SETMASK (1 << 21) +#define CLEARMASK (~(SETMASK)) + +static +void mainSort ( UInt32* ptr, + UChar* block, + UInt16* quadrant, + UInt32* ftab, + Int32 nblock, + Int32 verb, + Int32* budget ) +{ + Int32 i, j, k, ss, sb; + Int32 runningOrder[256]; + Bool bigDone[256]; + Int32 copyStart[256]; + Int32 copyEnd [256]; + UChar c1; + Int32 numQSorted; + UInt16 s; + if (verb >= 4) VPrintf0 ( " main sort initialise ...\n" ); + + /*-- set up the 2-byte frequency table --*/ + for (i = 65536; i >= 0; i--) ftab[i] = 0; + + j = block[0] << 8; + i = nblock-1; + for (; i >= 3; i -= 4) { + quadrant[i] = 0; + j = (j >> 8) | ( ((UInt16)block[i]) << 8); + ftab[j]++; + quadrant[i-1] = 0; + j = (j >> 8) | ( ((UInt16)block[i-1]) << 8); + ftab[j]++; + quadrant[i-2] = 0; + j = (j >> 8) | ( ((UInt16)block[i-2]) << 8); + ftab[j]++; + quadrant[i-3] = 0; + j = (j >> 8) | ( ((UInt16)block[i-3]) << 8); + ftab[j]++; + } + for (; i >= 0; i--) { + quadrant[i] = 0; + j = (j >> 8) | ( ((UInt16)block[i]) << 8); + ftab[j]++; + } + + /*-- (emphasises close relationship of block & quadrant) --*/ + for (i = 0; i < BZ_N_OVERSHOOT; i++) { + block [nblock+i] = block[i]; + quadrant[nblock+i] = 0; + } + + if (verb >= 4) VPrintf0 ( " bucket sorting ...\n" ); + + /*-- Complete the initial radix sort --*/ + for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1]; + + s = block[0] << 8; + i = nblock-1; + for (; i >= 3; i -= 4) { + s = (s >> 8) | (block[i] << 8); + j = ftab[s] -1; + ftab[s] = j; + ptr[j] = i; + s = (s >> 8) | (block[i-1] << 8); + j = ftab[s] -1; + ftab[s] = j; + ptr[j] = i-1; + s = (s >> 8) | (block[i-2] << 8); + j = ftab[s] -1; + ftab[s] = j; + ptr[j] = i-2; + s = (s >> 8) | (block[i-3] << 8); + j = ftab[s] -1; + ftab[s] = j; + ptr[j] = i-3; + } + for (; i >= 0; i--) { + s = (s >> 8) | (block[i] << 8); + j = ftab[s] -1; + ftab[s] = j; + ptr[j] = i; + } + + /*-- + Now ftab contains the first loc of every small bucket. + Calculate the running order, from smallest to largest + big bucket. + --*/ + for (i = 0; i <= 255; i++) { + bigDone [i] = False; + runningOrder[i] = i; + } + + { + Int32 vv; + Int32 h = 1; + do h = 3 * h + 1; while (h <= 256); + do { + h = h / 3; + for (i = h; i <= 255; i++) { + vv = runningOrder[i]; + j = i; + while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) { + runningOrder[j] = runningOrder[j-h]; + j = j - h; + if (j <= (h - 1)) goto zero; + } + zero: + runningOrder[j] = vv; + } + } while (h != 1); + } + + /*-- + The main sorting loop. + --*/ + + numQSorted = 0; + + for (i = 0; i <= 255; i++) { + + /*-- + Process big buckets, starting with the least full. + Basically this is a 3-step process in which we call + mainQSort3 to sort the small buckets [ss, j], but + also make a big effort to avoid the calls if we can. + --*/ + ss = runningOrder[i]; + + /*-- + Step 1: + Complete the big bucket [ss] by quicksorting + any unsorted small buckets [ss, j], for j != ss. + Hopefully previous pointer-scanning phases have already + completed many of the small buckets [ss, j], so + we don't have to sort them at all. + --*/ + for (j = 0; j <= 255; j++) { + if (j != ss) { + sb = (ss << 8) + j; + if ( ! (ftab[sb] & SETMASK) ) { + Int32 lo = ftab[sb] & CLEARMASK; + Int32 hi = (ftab[sb+1] & CLEARMASK) - 1; + if (hi > lo) { + if (verb >= 4) + VPrintf4 ( " qsort [0x%x, 0x%x] " + "done %d this %d\n", + ss, j, numQSorted, hi - lo + 1 ); + mainQSort3 ( + ptr, block, quadrant, nblock, + lo, hi, BZ_N_RADIX, budget + ); + numQSorted += (hi - lo + 1); + if (*budget < 0) return; + } + } + ftab[sb] |= SETMASK; + } + } + + AssertH ( !bigDone[ss], 1006 ); + + /*-- + Step 2: + Now scan this big bucket [ss] so as to synthesise the + sorted order for small buckets [t, ss] for all t, + including, magically, the bucket [ss,ss] too. + This will avoid doing Real Work in subsequent Step 1's. + --*/ + { + for (j = 0; j <= 255; j++) { + copyStart[j] = ftab[(j << 8) + ss] & CLEARMASK; + copyEnd [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1; + } + for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) { + k = ptr[j]-1; if (k < 0) k += nblock; + c1 = block[k]; + if (!bigDone[c1]) + ptr[ copyStart[c1]++ ] = k; + } + for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) { + k = ptr[j]-1; if (k < 0) k += nblock; + c1 = block[k]; + if (!bigDone[c1]) + ptr[ copyEnd[c1]-- ] = k; + } + } + + AssertH ( (copyStart[ss]-1 == copyEnd[ss]) + || + /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1. + Necessity for this case is demonstrated by compressing + a sequence of approximately 48.5 million of character + 251; 1.0.0/1.0.1 will then die here. */ + (copyStart[ss] == 0 && copyEnd[ss] == nblock-1), + 1007 ) + + for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK; + + /*-- + Step 3: + The [ss] big bucket is now done. Record this fact, + and update the quadrant descriptors. Remember to + update quadrants in the overshoot area too, if + necessary. The "if (i < 255)" test merely skips + this updating for the last bucket processed, since + updating for the last bucket is pointless. + + The quadrant array provides a way to incrementally + cache sort orderings, as they appear, so as to + make subsequent comparisons in fullGtU() complete + faster. For repetitive blocks this makes a big + difference (but not big enough to be able to avoid + the fallback sorting mechanism, exponential radix sort). + + The precise meaning is: at all times: + + for 0 <= i < nblock and 0 <= j <= nblock + + if block[i] != block[j], + + then the relative values of quadrant[i] and + quadrant[j] are meaningless. + + else { + if quadrant[i] < quadrant[j] + then the string starting at i lexicographically + precedes the string starting at j + + else if quadrant[i] > quadrant[j] + then the string starting at j lexicographically + precedes the string starting at i + + else + the relative ordering of the strings starting + at i and j has not yet been determined. + } + --*/ + bigDone[ss] = True; + + if (i < 255) { + Int32 bbStart = ftab[ss << 8] & CLEARMASK; + Int32 bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart; + Int32 shifts = 0; + + while ((bbSize >> shifts) > 65534) shifts++; + + for (j = bbSize-1; j >= 0; j--) { + Int32 a2update = ptr[bbStart + j]; + UInt16 qVal = (UInt16)(j >> shifts); + quadrant[a2update] = qVal; + if (a2update < BZ_N_OVERSHOOT) + quadrant[a2update + nblock] = qVal; + } + AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 ); + } + + } + + if (verb >= 4) + VPrintf3 ( " %d pointers, %d sorted, %d scanned\n", + nblock, numQSorted, nblock - numQSorted ); +} + +#undef BIGFREQ +#undef SETMASK +#undef CLEARMASK + + +/*---------------------------------------------*/ +/* Pre: + nblock > 0 + arr2 exists for [0 .. nblock-1 +N_OVERSHOOT] + ((UChar*)arr2) [0 .. nblock-1] holds block + arr1 exists for [0 .. nblock-1] + + Post: + ((UChar*)arr2) [0 .. nblock-1] holds block + All other areas of block destroyed + ftab [ 0 .. 65536 ] destroyed + arr1 [0 .. nblock-1] holds sorted order +*/ +void BZ2_blockSort ( EState* s ) +{ + UInt32* ptr = s->ptr; + UChar* block = s->block; + UInt32* ftab = s->ftab; + Int32 nblock = s->nblock; + Int32 verb = s->verbosity; + Int32 wfact = s->workFactor; + UInt16* quadrant; + Int32 budget; + Int32 budgetInit; + Int32 i; + + if (nblock < 10000) { + fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb ); + } else { + /* Calculate the location for quadrant, remembering to get + the alignment right. Assumes that &(block[0]) is at least + 2-byte aligned -- this should be ok since block is really + the first section of arr2. + */ + i = nblock+BZ_N_OVERSHOOT; + if (i & 1) i++; + quadrant = (UInt16*)(&(block[i])); + + /* (wfact-1) / 3 puts the default-factor-30 + transition point at very roughly the same place as + with v0.1 and v0.9.0. + Not that it particularly matters any more, since the + resulting compressed stream is now the same regardless + of whether or not we use the main sort or fallback sort. + */ + if (wfact < 1 ) wfact = 1; + if (wfact > 100) wfact = 100; + budgetInit = nblock * ((wfact-1) / 3); + budget = budgetInit; + + mainSort ( ptr, block, quadrant, ftab, nblock, verb, &budget ); + if (verb >= 3) + VPrintf3 ( " %d work, %d block, ratio %5.2f\n", + budgetInit - budget, + nblock, + (float)(budgetInit - budget) / + (float)(nblock==0 ? 1 : nblock) ); + if (budget < 0) { + if (verb >= 2) + VPrintf0 ( " too repetitive; using fallback" + " sorting algorithm\n" ); + fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb ); + } + } + + s->origPtr = -1; + for (i = 0; i < s->nblock; i++) + if (ptr[i] == 0) + { s->origPtr = i; break; }; + + AssertH( s->origPtr != -1, 1003 ); +} + + +/*-------------------------------------------------------------*/ +/*--- end blocksort.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-common.xsl b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-common.xsl new file mode 100644 index 0000000..66fcd6f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-common.xsl @@ -0,0 +1,39 @@ +<?xml version="1.0"?> <!-- -*- sgml -*- --> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<!-- we like '1.2 Title' --> +<xsl:param name="section.autolabel" select="'1'"/> +<xsl:param name="section.label.includes.component.label" select="'1'"/> + +<!-- Do not put 'Chapter' at the start of eg 'Chapter 1. Doing This' --> +<xsl:param name="local.l10n.xml" select="document('')"/> +<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> + <l:l10n language="en"> + <l:context name="title-numbered"> + <l:template name="chapter" text="%n. %t"/> + </l:context> + </l:l10n> +</l:i18n> + +<!-- don't generate sub-tocs for qanda sets --> +<xsl:param name="generate.toc"> +set toc,title +book toc,title,figure,table,example,equation +chapter toc,title +section toc +sect1 toc +sect2 toc +sect3 toc +sect4 nop +sect5 nop +qandaset toc +qandadiv nop +appendix toc,title +article/appendix nop +article toc,title +preface toc,title +reference toc,title +</xsl:param> + +</xsl:stylesheet> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-fo.xsl b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-fo.xsl new file mode 100644 index 0000000..ba3e301 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-fo.xsl @@ -0,0 +1,276 @@ +<?xml version="1.0" encoding="UTF-8"?> <!-- -*- sgml -*- --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> + +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> +<xsl:import href="bz-common.xsl"/> + +<!-- set indent = yes while debugging, then change to NO --> +<xsl:output method="xml" indent="yes"/> + +<!-- ensure only passivetex extensions are on --> +<xsl:param name="stylesheet.result.type" select="'fo'"/> +<!-- fo extensions: PDF bookmarks and index terms --> +<xsl:param name="use.extensions" select="'1'"/> +<xsl:param name="xep.extensions" select="0"/> +<xsl:param name="fop.extensions" select="0"/> +<xsl:param name="saxon.extensions" select="0"/> +<xsl:param name="passivetex.extensions" select="1"/> +<xsl:param name="tablecolumns.extension" select="'1'"/> + +<!-- ensure we are using single sided --> +<xsl:param name="double.sided" select="'0'"/> + +<!-- insert cross references to page numbers --> +<xsl:param name="insert.xref.page.number" select="1"/> + +<!-- <?custom-pagebreak?> inserts a page break at this point --> +<xsl:template match="processing-instruction('custom-pagebreak')"> + <fo:block break-before='page'/> +</xsl:template> + +<!-- show links in color --> +<xsl:attribute-set name="xref.properties"> + <xsl:attribute name="color">blue</xsl:attribute> +</xsl:attribute-set> + +<!-- make pre listings indented a bit + a bg colour --> +<xsl:template match="programlisting | screen"> + <fo:block start-indent="0.25in" wrap-option="no-wrap" + white-space-collapse="false" text-align="start" + font-family="monospace" background-color="#f2f2f9" + linefeed-treatment="preserve" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> +<!-- make verbatim output prettier --> +<xsl:template match="literallayout"> + <fo:block start-indent="0.25in" wrap-option="no-wrap" + white-space-collapse="false" text-align="start" + font-family="monospace" background-color="#edf7f4" + linefeed-treatment="preserve" + space-before="0em" space-after="0em"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- workaround bug in passivetex fo output for itemizedlist --> +<xsl:template match="itemizedlist/listitem"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="itemsymbol"> + <xsl:call-template name="list.itemsymbol"> + <xsl:with-param name="node" select="parent::itemizedlist"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="item.contents"> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <xsl:choose> + <xsl:when test="$itemsymbol='disc'">•</xsl:when> + <xsl:when test="$itemsymbol='bullet'">•</xsl:when> + <xsl:otherwise>•</xsl:otherwise> + </xsl:choose> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <xsl:apply-templates/> <!-- removed extra block wrapper --> + </fo:list-item-body> + </xsl:variable> + <xsl:choose> + <xsl:when test="parent::*/@spacing = 'compact'"> + <fo:list-item id="{$id}" + xsl:use-attribute-sets="compact.list.item.spacing"> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:when> + <xsl:otherwise> + <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- workaround bug in passivetex fo output for orderedlist --> +<xsl:template match="orderedlist/listitem"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="item.contents"> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <xsl:apply-templates select="." mode="item-number"/> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <xsl:apply-templates/> <!-- removed extra block wrapper --> + </fo:list-item-body> + </xsl:variable> + <xsl:choose> + <xsl:when test="parent::*/@spacing = 'compact'"> + <fo:list-item id="{$id}" + xsl:use-attribute-sets="compact.list.item.spacing"> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:when> + <xsl:otherwise> + <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <xsl:copy-of select="$item.contents"/> + </fo:list-item> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- workaround bug in passivetex fo output for variablelist --> +<xsl:param name="variablelist.as.blocks" select="1"/> +<xsl:template match="varlistentry" mode="vl.as.blocks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/></xsl:variable> + <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing" + keep-together.within-column="always" + keep-with-next.within-column="always"> + <xsl:apply-templates select="term"/> + </fo:block> + <fo:block start-indent="0.5in" end-indent="0in" + space-after.minimum="0.2em" + space-after.optimum="0.4em" + space-after.maximum="0.6em"> + <fo:block> + <xsl:apply-templates select="listitem"/> + </fo:block> + </fo:block> +</xsl:template> + + +<!-- workaround bug in footers: force right-align w/two 80|30 cols --> +<xsl:template name="footer.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + <xsl:choose> + <xsl:when test="$pageclass = 'index'"> + <xsl:attribute name="margin-left">0pt</xsl:attribute> + </xsl:when> + </xsl:choose> + <xsl:variable name="candidate"> + <fo:table table-layout="fixed" width="100%"> + <fo:table-column column-number="1" column-width="80%"/> + <fo:table-column column-number="2" column-width="20%"/> + <fo:table-body> + <fo:table-row height="14pt"> + <fo:table-cell text-align="left" display-align="after"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + <fo:block> + <fo:block> </fo:block><!-- empty cell --> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" display-align="after"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + <!-- Really output a footer? --> + <xsl:choose> + <xsl:when test="$pageclass='titlepage' and $gentext-key='book' + and $sequence='first'"> + <!-- no, book titlepages have no footers at all --> + </xsl:when> + <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0"> + <!-- no output --> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$candidate"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<!-- fix bug in headers: force right-align w/two 40|60 cols --> +<xsl:template name="header.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + <xsl:choose> + <xsl:when test="$pageclass = 'index'"> + <xsl:attribute name="margin-left">0pt</xsl:attribute> + </xsl:when> + </xsl:choose> + <xsl:variable name="candidate"> + <fo:table table-layout="fixed" width="100%"> + <xsl:call-template name="head.sep.rule"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + <fo:table-column column-number="1" column-width="40%"/> + <fo:table-column column-number="2" column-width="60%"/> + <fo:table-body> + <fo:table-row height="14pt"> + <fo:table-cell text-align="left" display-align="before"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + <fo:block> + <fo:block> </fo:block><!-- empty cell --> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" display-align="before"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + <!-- Really output a header? --> + <xsl:choose> + <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book' + and $sequence='first'"> + <!-- no, book titlepages have no headers at all --> + </xsl:when> + <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0"> + <!-- no output --> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$candidate"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<!-- Bug-fix for Suse 10 PassiveTex version --> +<!-- Precompute attribute values 'cos PassiveTex is too stupid: --> +<xsl:attribute-set name="component.title.properties"> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.optimum"> + <xsl:value-of select="concat($body.font.master, 'pt')"/> + </xsl:attribute> + <xsl:attribute name="space-before.minimum"> + <xsl:value-of select="$body.font.master * 0.8"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> + <xsl:attribute name="space-before.maximum"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> +</xsl:attribute-set> + + +</xsl:stylesheet> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-html.xsl b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-html.xsl new file mode 100644 index 0000000..1785fff --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bz-html.xsl @@ -0,0 +1,20 @@ +<?xml version="1.0"?> <!-- -*- sgml -*- --> +<!DOCTYPE xsl:stylesheet [ <!ENTITY bz-css SYSTEM "./bzip.css"> ]> + +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/> +<xsl:import href="bz-common.xsl"/> + +<!-- use 8859-1 encoding --> +<xsl:output method="html" encoding="ISO-8859-1" indent="yes"/> + +<!-- we include the css directly when generating one large file --> +<xsl:template name="user.head.content"> + <style type="text/css" media="screen"> + <xsl:text>&bz-css;</xsl:text> + </style> +</xsl:template> + +</xsl:stylesheet> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzcompress.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzcompress.c new file mode 100644 index 0000000..caf7696 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzcompress.c @@ -0,0 +1,672 @@ + +/*-------------------------------------------------------------*/ +/*--- Compression machinery (not incl block sorting) ---*/ +/*--- compress.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +/* CHANGES + 0.9.0 -- original version. + 0.9.0a/b -- no changes in this file. + 0.9.0c -- changed setting of nGroups in sendMTFValues() + so as to do a bit better on small files +*/ + +#include "bzlib_private.h" + + +/*---------------------------------------------------*/ +/*--- Bit stream I/O ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------------*/ +void BZ2_bsInitWrite ( EState* s ) +{ + s->bsLive = 0; + s->bsBuff = 0; +} + + +/*---------------------------------------------------*/ +static +void bsFinishWrite ( EState* s ) +{ + while (s->bsLive > 0) { + s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24); + s->numZ++; + s->bsBuff <<= 8; + s->bsLive -= 8; + } +} + + +/*---------------------------------------------------*/ +#define bsNEEDW(nz) \ +{ \ + while (s->bsLive >= 8) { \ + s->zbits[s->numZ] \ + = (UChar)(s->bsBuff >> 24); \ + s->numZ++; \ + s->bsBuff <<= 8; \ + s->bsLive -= 8; \ + } \ +} + + +/*---------------------------------------------------*/ +static +__inline__ +void bsW ( EState* s, Int32 n, UInt32 v ) +{ + bsNEEDW ( n ); + s->bsBuff |= (v << (32 - s->bsLive - n)); + s->bsLive += n; +} + + +/*---------------------------------------------------*/ +static +void bsPutUInt32 ( EState* s, UInt32 u ) +{ + bsW ( s, 8, (u >> 24) & 0xffL ); + bsW ( s, 8, (u >> 16) & 0xffL ); + bsW ( s, 8, (u >> 8) & 0xffL ); + bsW ( s, 8, u & 0xffL ); +} + + +/*---------------------------------------------------*/ +static +void bsPutUChar ( EState* s, UChar c ) +{ + bsW( s, 8, (UInt32)c ); +} + + +/*---------------------------------------------------*/ +/*--- The back end proper ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------------*/ +static +void makeMaps_e ( EState* s ) +{ + Int32 i; + s->nInUse = 0; + for (i = 0; i < 256; i++) + if (s->inUse[i]) { + s->unseqToSeq[i] = s->nInUse; + s->nInUse++; + } +} + + +/*---------------------------------------------------*/ +static +void generateMTFValues ( EState* s ) +{ + UChar yy[256]; + Int32 i, j; + Int32 zPend; + Int32 wr; + Int32 EOB; + + /* + After sorting (eg, here), + s->arr1 [ 0 .. s->nblock-1 ] holds sorted order, + and + ((UChar*)s->arr2) [ 0 .. s->nblock-1 ] + holds the original block data. + + The first thing to do is generate the MTF values, + and put them in + ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ]. + Because there are strictly fewer or equal MTF values + than block values, ptr values in this area are overwritten + with MTF values only when they are no longer needed. + + The final compressed bitstream is generated into the + area starting at + (UChar*) (&((UChar*)s->arr2)[s->nblock]) + + These storage aliases are set up in bzCompressInit(), + except for the last one, which is arranged in + compressBlock(). + */ + UInt32* ptr = s->ptr; + UChar* block = s->block; + UInt16* mtfv = s->mtfv; + + makeMaps_e ( s ); + EOB = s->nInUse+1; + + for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0; + + wr = 0; + zPend = 0; + for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i; + + for (i = 0; i < s->nblock; i++) { + UChar ll_i; + AssertD ( wr <= i, "generateMTFValues(1)" ); + j = ptr[i]-1; if (j < 0) j += s->nblock; + ll_i = s->unseqToSeq[block[j]]; + AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" ); + + if (yy[0] == ll_i) { + zPend++; + } else { + + if (zPend > 0) { + zPend--; + while (True) { + if (zPend & 1) { + mtfv[wr] = BZ_RUNB; wr++; + s->mtfFreq[BZ_RUNB]++; + } else { + mtfv[wr] = BZ_RUNA; wr++; + s->mtfFreq[BZ_RUNA]++; + } + if (zPend < 2) break; + zPend = (zPend - 2) / 2; + }; + zPend = 0; + } + { + register UChar rtmp; + register UChar* ryy_j; + register UChar rll_i; + rtmp = yy[1]; + yy[1] = yy[0]; + ryy_j = &(yy[1]); + rll_i = ll_i; + while ( rll_i != rtmp ) { + register UChar rtmp2; + ryy_j++; + rtmp2 = rtmp; + rtmp = *ryy_j; + *ryy_j = rtmp2; + }; + yy[0] = rtmp; + j = ryy_j - &(yy[0]); + mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++; + } + + } + } + + if (zPend > 0) { + zPend--; + while (True) { + if (zPend & 1) { + mtfv[wr] = BZ_RUNB; wr++; + s->mtfFreq[BZ_RUNB]++; + } else { + mtfv[wr] = BZ_RUNA; wr++; + s->mtfFreq[BZ_RUNA]++; + } + if (zPend < 2) break; + zPend = (zPend - 2) / 2; + }; + zPend = 0; + } + + mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++; + + s->nMTF = wr; +} + + +/*---------------------------------------------------*/ +#define BZ_LESSER_ICOST 0 +#define BZ_GREATER_ICOST 15 + +static +void sendMTFValues ( EState* s ) +{ + Int32 v, t, i, j, gs, ge, totc, bt, bc, iter; + Int32 nSelectors, alphaSize, minLen, maxLen, selCtr; + Int32 nGroups, nBytes; + + /*-- + UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + is a global since the decoder also needs it. + + Int32 code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + Int32 rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + are also globals only used in this proc. + Made global to keep stack frame size small. + --*/ + + + UInt16 cost[BZ_N_GROUPS]; + Int32 fave[BZ_N_GROUPS]; + + UInt16* mtfv = s->mtfv; + + if (s->verbosity >= 3) + VPrintf3( " %d in block, %d after MTF & 1-2 coding, " + "%d+2 syms in use\n", + s->nblock, s->nMTF, s->nInUse ); + + alphaSize = s->nInUse+2; + for (t = 0; t < BZ_N_GROUPS; t++) + for (v = 0; v < alphaSize; v++) + s->len[t][v] = BZ_GREATER_ICOST; + + /*--- Decide how many coding tables to use ---*/ + AssertH ( s->nMTF > 0, 3001 ); + if (s->nMTF < 200) nGroups = 2; else + if (s->nMTF < 600) nGroups = 3; else + if (s->nMTF < 1200) nGroups = 4; else + if (s->nMTF < 2400) nGroups = 5; else + nGroups = 6; + + /*--- Generate an initial set of coding tables ---*/ + { + Int32 nPart, remF, tFreq, aFreq; + + nPart = nGroups; + remF = s->nMTF; + gs = 0; + while (nPart > 0) { + tFreq = remF / nPart; + ge = gs-1; + aFreq = 0; + while (aFreq < tFreq && ge < alphaSize-1) { + ge++; + aFreq += s->mtfFreq[ge]; + } + + if (ge > gs + && nPart != nGroups && nPart != 1 + && ((nGroups-nPart) % 2 == 1)) { + aFreq -= s->mtfFreq[ge]; + ge--; + } + + if (s->verbosity >= 3) + VPrintf5( " initial group %d, [%d .. %d], " + "has %d syms (%4.1f%%)\n", + nPart, gs, ge, aFreq, + (100.0 * (float)aFreq) / (float)(s->nMTF) ); + + for (v = 0; v < alphaSize; v++) + if (v >= gs && v <= ge) + s->len[nPart-1][v] = BZ_LESSER_ICOST; else + s->len[nPart-1][v] = BZ_GREATER_ICOST; + + nPart--; + gs = ge+1; + remF -= aFreq; + } + } + + /*--- + Iterate up to BZ_N_ITERS times to improve the tables. + ---*/ + for (iter = 0; iter < BZ_N_ITERS; iter++) { + + for (t = 0; t < nGroups; t++) fave[t] = 0; + + for (t = 0; t < nGroups; t++) + for (v = 0; v < alphaSize; v++) + s->rfreq[t][v] = 0; + + /*--- + Set up an auxiliary length table which is used to fast-track + the common case (nGroups == 6). + ---*/ + if (nGroups == 6) { + for (v = 0; v < alphaSize; v++) { + s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v]; + s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v]; + s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v]; + } + } + + nSelectors = 0; + totc = 0; + gs = 0; + while (True) { + + /*--- Set group start & end marks. --*/ + if (gs >= s->nMTF) break; + ge = gs + BZ_G_SIZE - 1; + if (ge >= s->nMTF) ge = s->nMTF-1; + + /*-- + Calculate the cost of this group as coded + by each of the coding tables. + --*/ + for (t = 0; t < nGroups; t++) cost[t] = 0; + + if (nGroups == 6 && 50 == ge-gs+1) { + /*--- fast track the common case ---*/ + register UInt32 cost01, cost23, cost45; + register UInt16 icv; + cost01 = cost23 = cost45 = 0; + +# define BZ_ITER(nn) \ + icv = mtfv[gs+(nn)]; \ + cost01 += s->len_pack[icv][0]; \ + cost23 += s->len_pack[icv][1]; \ + cost45 += s->len_pack[icv][2]; \ + + BZ_ITER(0); BZ_ITER(1); BZ_ITER(2); BZ_ITER(3); BZ_ITER(4); + BZ_ITER(5); BZ_ITER(6); BZ_ITER(7); BZ_ITER(8); BZ_ITER(9); + BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14); + BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19); + BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24); + BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29); + BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34); + BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39); + BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44); + BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49); + +# undef BZ_ITER + + cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16; + cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16; + cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16; + + } else { + /*--- slow version which correctly handles all situations ---*/ + for (i = gs; i <= ge; i++) { + UInt16 icv = mtfv[i]; + for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv]; + } + } + + /*-- + Find the coding table which is best for this group, + and record its identity in the selector table. + --*/ + bc = 999999999; bt = -1; + for (t = 0; t < nGroups; t++) + if (cost[t] < bc) { bc = cost[t]; bt = t; }; + totc += bc; + fave[bt]++; + s->selector[nSelectors] = bt; + nSelectors++; + + /*-- + Increment the symbol frequencies for the selected table. + --*/ + if (nGroups == 6 && 50 == ge-gs+1) { + /*--- fast track the common case ---*/ + +# define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++ + + BZ_ITUR(0); BZ_ITUR(1); BZ_ITUR(2); BZ_ITUR(3); BZ_ITUR(4); + BZ_ITUR(5); BZ_ITUR(6); BZ_ITUR(7); BZ_ITUR(8); BZ_ITUR(9); + BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14); + BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19); + BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24); + BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29); + BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34); + BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39); + BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44); + BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49); + +# undef BZ_ITUR + + } else { + /*--- slow version which correctly handles all situations ---*/ + for (i = gs; i <= ge; i++) + s->rfreq[bt][ mtfv[i] ]++; + } + + gs = ge+1; + } + if (s->verbosity >= 3) { + VPrintf2 ( " pass %d: size is %d, grp uses are ", + iter+1, totc/8 ); + for (t = 0; t < nGroups; t++) + VPrintf1 ( "%d ", fave[t] ); + VPrintf0 ( "\n" ); + } + + /*-- + Recompute the tables based on the accumulated frequencies. + --*/ + /* maxLen was changed from 20 to 17 in bzip2-1.0.3. See + comment in huffman.c for details. */ + for (t = 0; t < nGroups; t++) + BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]), + alphaSize, 17 /*20*/ ); + } + + + AssertH( nGroups < 8, 3002 ); + AssertH( nSelectors < 32768 && + nSelectors <= (2 + (900000 / BZ_G_SIZE)), + 3003 ); + + + /*--- Compute MTF values for the selectors. ---*/ + { + UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp; + for (i = 0; i < nGroups; i++) pos[i] = i; + for (i = 0; i < nSelectors; i++) { + ll_i = s->selector[i]; + j = 0; + tmp = pos[j]; + while ( ll_i != tmp ) { + j++; + tmp2 = tmp; + tmp = pos[j]; + pos[j] = tmp2; + }; + pos[0] = tmp; + s->selectorMtf[i] = j; + } + }; + + /*--- Assign actual codes for the tables. --*/ + for (t = 0; t < nGroups; t++) { + minLen = 32; + maxLen = 0; + for (i = 0; i < alphaSize; i++) { + if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; + if (s->len[t][i] < minLen) minLen = s->len[t][i]; + } + AssertH ( !(maxLen > 17 /*20*/ ), 3004 ); + AssertH ( !(minLen < 1), 3005 ); + BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]), + minLen, maxLen, alphaSize ); + } + + /*--- Transmit the mapping table. ---*/ + { + Bool inUse16[16]; + for (i = 0; i < 16; i++) { + inUse16[i] = False; + for (j = 0; j < 16; j++) + if (s->inUse[i * 16 + j]) inUse16[i] = True; + } + + nBytes = s->numZ; + for (i = 0; i < 16; i++) + if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0); + + for (i = 0; i < 16; i++) + if (inUse16[i]) + for (j = 0; j < 16; j++) { + if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0); + } + + if (s->verbosity >= 3) + VPrintf1( " bytes: mapping %d, ", s->numZ-nBytes ); + } + + /*--- Now the selectors. ---*/ + nBytes = s->numZ; + bsW ( s, 3, nGroups ); + bsW ( s, 15, nSelectors ); + for (i = 0; i < nSelectors; i++) { + for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1); + bsW(s,1,0); + } + if (s->verbosity >= 3) + VPrintf1( "selectors %d, ", s->numZ-nBytes ); + + /*--- Now the coding tables. ---*/ + nBytes = s->numZ; + + for (t = 0; t < nGroups; t++) { + Int32 curr = s->len[t][0]; + bsW ( s, 5, curr ); + for (i = 0; i < alphaSize; i++) { + while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ }; + while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ }; + bsW ( s, 1, 0 ); + } + } + + if (s->verbosity >= 3) + VPrintf1 ( "code lengths %d, ", s->numZ-nBytes ); + + /*--- And finally, the block data proper ---*/ + nBytes = s->numZ; + selCtr = 0; + gs = 0; + while (True) { + if (gs >= s->nMTF) break; + ge = gs + BZ_G_SIZE - 1; + if (ge >= s->nMTF) ge = s->nMTF-1; + AssertH ( s->selector[selCtr] < nGroups, 3006 ); + + if (nGroups == 6 && 50 == ge-gs+1) { + /*--- fast track the common case ---*/ + UInt16 mtfv_i; + UChar* s_len_sel_selCtr + = &(s->len[s->selector[selCtr]][0]); + Int32* s_code_sel_selCtr + = &(s->code[s->selector[selCtr]][0]); + +# define BZ_ITAH(nn) \ + mtfv_i = mtfv[gs+(nn)]; \ + bsW ( s, \ + s_len_sel_selCtr[mtfv_i], \ + s_code_sel_selCtr[mtfv_i] ) + + BZ_ITAH(0); BZ_ITAH(1); BZ_ITAH(2); BZ_ITAH(3); BZ_ITAH(4); + BZ_ITAH(5); BZ_ITAH(6); BZ_ITAH(7); BZ_ITAH(8); BZ_ITAH(9); + BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14); + BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19); + BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24); + BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29); + BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34); + BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39); + BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44); + BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49); + +# undef BZ_ITAH + + } else { + /*--- slow version which correctly handles all situations ---*/ + for (i = gs; i <= ge; i++) { + bsW ( s, + s->len [s->selector[selCtr]] [mtfv[i]], + s->code [s->selector[selCtr]] [mtfv[i]] ); + } + } + + + gs = ge+1; + selCtr++; + } + AssertH( selCtr == nSelectors, 3007 ); + + if (s->verbosity >= 3) + VPrintf1( "codes %d\n", s->numZ-nBytes ); +} + + +/*---------------------------------------------------*/ +void BZ2_compressBlock ( EState* s, Bool is_last_block ) +{ + if (s->nblock > 0) { + + BZ_FINALISE_CRC ( s->blockCRC ); + s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31); + s->combinedCRC ^= s->blockCRC; + if (s->blockNo > 1) s->numZ = 0; + + if (s->verbosity >= 2) + VPrintf4( " block %d: crc = 0x%08x, " + "combined CRC = 0x%08x, size = %d\n", + s->blockNo, s->blockCRC, s->combinedCRC, s->nblock ); + + BZ2_blockSort ( s ); + } + + s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]); + + /*-- If this is the first block, create the stream header. --*/ + if (s->blockNo == 1) { + BZ2_bsInitWrite ( s ); + bsPutUChar ( s, BZ_HDR_B ); + bsPutUChar ( s, BZ_HDR_Z ); + bsPutUChar ( s, BZ_HDR_h ); + bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) ); + } + + if (s->nblock > 0) { + + bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 ); + bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 ); + bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 ); + + /*-- Now the block's CRC, so it is in a known place. --*/ + bsPutUInt32 ( s, s->blockCRC ); + + /*-- + Now a single bit indicating (non-)randomisation. + As of version 0.9.5, we use a better sorting algorithm + which makes randomisation unnecessary. So always set + the randomised bit to 'no'. Of course, the decoder + still needs to be able to handle randomised blocks + so as to maintain backwards compatibility with + older versions of bzip2. + --*/ + bsW(s,1,0); + + bsW ( s, 24, s->origPtr ); + generateMTFValues ( s ); + sendMTFValues ( s ); + } + + + /*-- If this is the last block, add the stream trailer. --*/ + if (is_last_block) { + + bsPutUChar ( s, 0x17 ); bsPutUChar ( s, 0x72 ); + bsPutUChar ( s, 0x45 ); bsPutUChar ( s, 0x38 ); + bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 ); + bsPutUInt32 ( s, s->combinedCRC ); + if (s->verbosity >= 2) + VPrintf1( " final combined CRC = 0x%08x\n ", s->combinedCRC ); + bsFinishWrite ( s ); + } +} + + +/*-------------------------------------------------------------*/ +/*--- end compress.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff new file mode 100644 index 0000000..6fc38f9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff @@ -0,0 +1,76 @@ +#!/bin/sh +# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh + +# Bzcmp/diff wrapped for bzip2, +# adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. + +# Bzcmp and bzdiff are used to invoke the cmp or the diff pro- +# gram on compressed files. All options specified are passed +# directly to cmp or diff. If only 1 file is specified, then +# the files compared are file1 and an uncompressed file1.gz. +# If two files are specified, then they are uncompressed (if +# necessary) and fed to cmp or diff. The exit status from cmp +# or diff is preserved. + +PATH="/usr/bin:/bin:$PATH"; export PATH +prog=`echo $0 | sed 's|.*/||'` +case "$prog" in + *cmp) comp=${CMP-cmp} ;; + *) comp=${DIFF-diff} ;; +esac + +OPTIONS= +FILES= +for ARG +do + case "$ARG" in + -*) OPTIONS="$OPTIONS $ARG";; + *) if test -f "$ARG"; then + FILES="$FILES $ARG" + else + echo "${prog}: $ARG not found or not a regular file" + exit 1 + fi ;; + esac +done +if test -z "$FILES"; then + echo "Usage: $prog [${comp}_options] file [file]" + exit 1 +fi +tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || { + echo 'cannot create a temporary file' >&2 + exit 1 +} +set $FILES +if test $# -eq 1; then + FILE=`echo "$1" | sed 's/.bz2$//'` + bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE" + STAT="$?" + +elif test $# -eq 2; then + case "$1" in + *.bz2) + case "$2" in + *.bz2) + F=`echo "$2" | sed 's|.*/||;s|.bz2$||'` + bzip2 -cdfq "$2" > $tmp + bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp + STAT="$?" + /bin/rm -f $tmp;; + + *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" + STAT="$?";; + esac;; + *) case "$2" in + *.bz2) + bzip2 -cdfq "$2" | $comp $OPTIONS "$1" - + STAT="$?";; + *) $comp $OPTIONS "$1" "$2" + STAT="$?";; + esac;; + esac + exit "$STAT" +else + echo "Usage: $prog [${comp}_options] file [file]" + exit 1 +fi diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff.1 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff.1 new file mode 100644 index 0000000..adb7a8e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzdiff.1 @@ -0,0 +1,47 @@ +\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org> +\"for Debian GNU/Linux +.TH BZDIFF 1 +.SH NAME +bzcmp, bzdiff \- compare bzip2 compressed files +.SH SYNOPSIS +.B bzcmp +[ cmp_options ] file1 +[ file2 ] +.br +.B bzdiff +[ diff_options ] file1 +[ file2 ] +.SH DESCRIPTION +.I Bzcmp +and +.I bzdiff +are used to invoke the +.I cmp +or the +.I diff +program on bzip2 compressed files. All options specified are passed +directly to +.I cmp +or +.IR diff "." +If only 1 file is specified, then the files compared are +.I file1 +and an uncompressed +.IR file1 ".bz2." +If two files are specified, then they are uncompressed if necessary and fed to +.I cmp +or +.IR diff "." +The exit status from +.I cmp +or +.I diff +is preserved. +.SH "SEE ALSO" +cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1) +.SH BUGS +Messages from the +.I cmp +or +.I diff +programs refer to temporary filenames instead of those specified. diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep new file mode 100644 index 0000000..9a04b83 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep @@ -0,0 +1,75 @@ +#!/bin/sh + +# Bzgrep wrapped for bzip2, +# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. +## zgrep notice: +## zgrep -- a wrapper around a grep program that decompresses files as needed +## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca> + +PATH="/usr/bin:$PATH"; export PATH + +prog=`echo $0 | sed 's|.*/||'` +case "$prog" in + *egrep) grep=${EGREP-egrep} ;; + *fgrep) grep=${FGREP-fgrep} ;; + *) grep=${GREP-grep} ;; +esac +pat="" +while test $# -ne 0; do + case "$1" in + -e | -f) opt="$opt $1"; shift; pat="$1" + if test "$grep" = grep; then # grep is buggy with -e on SVR4 + grep=egrep + fi;; + -A | -B) opt="$opt $1 $2"; shift;; + -*) opt="$opt $1";; + *) if test -z "$pat"; then + pat="$1" + else + break; + fi;; + esac + shift +done + +if test -z "$pat"; then + echo "grep through bzip2 files" + echo "usage: $prog [grep_options] pattern [files]" + exit 1 +fi + +list=0 +silent=0 +op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'` +case "$op" in + *l*) list=1 +esac +case "$op" in + *h*) silent=1 +esac + +if test $# -eq 0; then + bzip2 -cdfq | $grep $opt "$pat" + exit $? +fi + +res=0 +for i do + if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi + if test $list -eq 1; then + bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i + r=$? + elif test $# -eq 1 -o $silent -eq 1; then + bzip2 -cdfq "$i" | $grep $opt "$pat" + r=$? + else + j=${i//\\/\\\\} + j=${j//|/\\|} + j=${j//&/\\&} + j=`printf "%s" "$j" | tr '\n' ' '` + bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|" + r=$? + fi + test "$r" -ne 0 && res="$r" +done +exit $res diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep.1 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep.1 new file mode 100644 index 0000000..930af8c --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzgrep.1 @@ -0,0 +1,56 @@ +\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org> +\"for Debian GNU/Linux +.TH BZGREP 1 +.SH NAME +bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression +.SH SYNOPSIS +.B bzgrep +[ grep_options ] +.BI [\ -e\ ] " pattern" +.IR filename ".\|.\|." +.br +.B bzegrep +[ egrep_options ] +.BI [\ -e\ ] " pattern" +.IR filename ".\|.\|." +.br +.B bzfgrep +[ fgrep_options ] +.BI [\ -e\ ] " pattern" +.IR filename ".\|.\|." +.SH DESCRIPTION +.IR Bzgrep +is used to invoke the +.I grep +on bzip2-compressed files. All options specified are passed directly to +.I grep. +If no file is specified, then the standard input is decompressed +if necessary and fed to grep. +Otherwise the given files are uncompressed if necessary and fed to +.I grep. +.PP +If +.I bzgrep +is invoked as +.I bzegrep +or +.I bzfgrep +then +.I egrep +or +.I fgrep +is used instead of +.I grep. +If the GREP environment variable is set, +.I bzgrep +uses it as the +.I grep +program to be invoked. For example: + + for sh: GREP=fgrep bzgrep string files + for csh: (setenv GREP fgrep; bzgrep string files) +.SH AUTHOR +Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe +Troin <phil@fifi.org> for Debian GNU/Linux. +.SH "SEE ALSO" +grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1) diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip.css b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip.css new file mode 100644 index 0000000..43193d8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip.css @@ -0,0 +1,74 @@ +/* Colours: +#74240f dark brown h1, h2, h3, h4 +#336699 medium blue links +#339999 turquoise link hover colour +#202020 almost black general text +#761596 purple md5sum text +#626262 dark gray pre border +#eeeeee very light gray pre background +#f2f2f9 very light blue nav table background +#3366cc medium blue nav table border +*/ + +a, a:link, a:visited, a:active { color: #336699; } +a:hover { color: #339999; } + +body { font: 80%/126% sans-serif; } +h1, h2, h3, h4 { color: #74240f; } + +dt { color: #336699; font-weight: bold } +dd { + margin-left: 1.5em; + padding-bottom: 0.8em; +} + +/* -- ruler -- */ +div.hr_blue { + height: 3px; + background:#ffffff url("/images/hr_blue.png") repeat-x; } +div.hr_blue hr { display:none; } + +/* release styles */ +#release p { margin-top: 0.4em; } +#release .md5sum { color: #761596; } + + +/* ------ styles for docs|manuals|howto ------ */ +/* -- lists -- */ +ul { + margin: 0px 4px 16px 16px; + padding: 0px; + list-style: url("/images/li-blue.png"); +} +ul li { + margin-bottom: 10px; +} +ul ul { + list-style-type: none; + list-style-image: none; + margin-left: 0px; +} + +/* header / footer nav tables */ +table.nav { + border: solid 1px #3366cc; + background: #f2f2f9; + background-color: #f2f2f9; + margin-bottom: 0.5em; +} +/* don't have underlined links in chunked nav menus */ +table.nav a { text-decoration: none; } +table.nav a:hover { text-decoration: underline; } +table.nav td { font-size: 85%; } + +code, tt, pre { font-size: 120%; } +code, tt { color: #761596; } + +div.literallayout, pre.programlisting, pre.screen { + color: #000000; + padding: 0.5em; + background: #eeeeee; + border: 1px solid #626262; + background-color: #eeeeee; + margin: 4px 0px 4px 0px; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1 new file mode 100644 index 0000000..ce3a78e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1 @@ -0,0 +1,454 @@ +.PU +.TH bzip2 1 +.SH NAME +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 +.br +bzcat \- decompresses files to stdout +.br +bzip2recover \- recovers data from damaged bzip2 files + +.SH SYNOPSIS +.ll +8 +.B bzip2 +.RB [ " \-cdfkqstvzVL123456789 " ] +[ +.I "filenames \&..." +] +.ll -8 +.br +.B bunzip2 +.RB [ " \-fkvsVL " ] +[ +.I "filenames \&..." +] +.br +.B bzcat +.RB [ " \-s " ] +[ +.I "filenames \&..." +] +.br +.B bzip2recover +.I "filename" + +.SH DESCRIPTION +.I bzip2 +compresses files using the Burrows-Wheeler block sorting +text compression algorithm, and Huffman coding. Compression is +generally considerably better than that achieved by more conventional +LZ77/LZ78-based compressors, and approaches the performance of the PPM +family of statistical compressors. + +The command-line options are deliberately very similar to +those of +.I GNU gzip, +but they are not identical. + +.I bzip2 +expects a list of file names to accompany the +command-line flags. Each file is replaced by a compressed version of +itself, with the name "original_name.bz2". +Each compressed file +has the same modification date, permissions, and, when possible, +ownership as the corresponding original, so that these properties can +be correctly restored at decompression time. File name handling is +naive in the sense that there is no mechanism for preserving original +file names, permissions, ownerships or dates in filesystems which lack +these concepts, or have serious file name length restrictions, such as +MS-DOS. + +.I bzip2 +and +.I bunzip2 +will by default not overwrite existing +files. If you want this to happen, specify the \-f flag. + +If no file names are specified, +.I bzip2 +compresses from standard +input to standard output. In this case, +.I bzip2 +will decline to +write compressed output to a terminal, as this would be entirely +incomprehensible and therefore pointless. + +.I bunzip2 +(or +.I bzip2 \-d) +decompresses all +specified files. Files which were not created by +.I bzip2 +will be detected and ignored, and a warning issued. +.I bzip2 +attempts to guess the filename for the decompressed file +from that of the compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + +If the file does not end in one of the recognised endings, +.I .bz2, +.I .bz, +.I .tbz2 +or +.I .tbz, +.I bzip2 +complains that it cannot +guess the name of the original file, and uses the original name +with +.I .out +appended. + +As with compression, supplying no +filenames causes decompression from +standard input to standard output. + +.I bunzip2 +will correctly decompress a file which is the +concatenation of two or more compressed files. The result is the +concatenation of the corresponding uncompressed files. Integrity +testing (\-t) +of concatenated +compressed files is also supported. + +You can also compress or decompress files to the standard output by +giving the \-c flag. Multiple files may be compressed and +decompressed like this. The resulting outputs are fed sequentially to +stdout. Compression of multiple files +in this manner generates a stream +containing multiple compressed file representations. Such a stream +can be decompressed correctly only by +.I bzip2 +version 0.9.0 or +later. Earlier versions of +.I bzip2 +will stop after decompressing +the first file in the stream. + +.I bzcat +(or +.I bzip2 -dc) +decompresses all specified files to +the standard output. + +.I bzip2 +will read arguments from the environment variables +.I BZIP2 +and +.I BZIP, +in that order, and will process them +before any arguments read from the command line. This gives a +convenient way to supply default arguments. + +Compression is always performed, even if the compressed +file is slightly +larger than the original. Files of less than about one hundred bytes +tend to get larger, since the compression mechanism has a constant +overhead in the region of 50 bytes. Random data (including the output +of most file compressors) is coded at about 8.05 bits per byte, giving +an expansion of around 0.5%. + +As a self-check for your protection, +.I +bzip2 +uses 32-bit CRCs to +make sure that the decompressed version of a file is identical to the +original. This guards against corruption of the compressed data, and +against undetected bugs in +.I bzip2 +(hopefully very unlikely). The +chances of data corruption going undetected is microscopic, about one +chance in four billion for each file processed. Be aware, though, that +the check occurs upon decompression, so it can only tell you that +something is wrong. It can't help you +recover the original uncompressed +data. You can use +.I bzip2recover +to try to recover data from +damaged files. + +Return values: 0 for a normal exit, 1 for environmental problems (file +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt +compressed file, 3 for an internal consistency error (eg, bug) which +caused +.I bzip2 +to panic. + +.SH OPTIONS +.TP +.B \-c --stdout +Compress or decompress to standard output. +.TP +.B \-d --decompress +Force decompression. +.I bzip2, +.I bunzip2 +and +.I bzcat +are +really the same program, and the decision about what actions to take is +done on the basis of which name is used. This flag overrides that +mechanism, and forces +.I bzip2 +to decompress. +.TP +.B \-z --compress +The complement to \-d: forces compression, regardless of the +invocation name. +.TP +.B \-t --test +Check integrity of the specified file(s), but don't decompress them. +This really performs a trial decompression and throws away the result. +.TP +.B \-f --force +Force overwrite of output files. Normally, +.I bzip2 +will not overwrite +existing output files. Also forces +.I bzip2 +to break hard links +to files, which it otherwise wouldn't do. + +bzip2 normally declines to decompress files which don't have the +correct magic header bytes. If forced (-f), however, it will pass +such files through unmodified. This is how GNU gzip behaves. +.TP +.B \-k --keep +Keep (don't delete) input files during compression +or decompression. +.TP +.B \-s --small +Reduce memory usage, for compression, decompression and testing. Files +are decompressed and tested using a modified algorithm which only +requires 2.5 bytes per block byte. This means any file can be +decompressed in 2300k of memory, albeit at about half the normal speed. + +During compression, \-s selects a block size of 200k, which limits +memory use to around the same figure, at the expense of your compression +ratio. In short, if your machine is low on memory (8 megabytes or +less), use \-s for everything. See MEMORY MANAGEMENT below. +.TP +.B \-q --quiet +Suppress non-essential warning messages. Messages pertaining to +I/O errors and other critical events will not be suppressed. +.TP +.B \-v --verbose +Verbose mode -- show the compression ratio for each file processed. +Further \-v's increase the verbosity level, spewing out lots of +information which is primarily of interest for diagnostic purposes. +.TP +.B \-L --license -V --version +Display the software version, license terms and conditions. +.TP +.B \-1 (or \-\-fast) to \-9 (or \-\-best) +Set the block size to 100 k, 200 k .. 900 k when compressing. Has no +effect when decompressing. See MEMORY MANAGEMENT below. +The \-\-fast and \-\-best aliases are primarily for GNU gzip +compatibility. In particular, \-\-fast doesn't make things +significantly faster. +And \-\-best merely selects the default behaviour. +.TP +.B \-- +Treats all subsequent arguments as file names, even if they start +with a dash. This is so you can handle files with names beginning +with a dash, for example: bzip2 \-- \-myfilename. +.TP +.B \--repetitive-fast --repetitive-best +These flags are redundant in versions 0.9.5 and above. They provided +some coarse control over the behaviour of the sorting algorithm in +earlier versions, which was sometimes useful. 0.9.5 and above have an +improved algorithm which renders these flags irrelevant. + +.SH MEMORY MANAGEMENT +.I bzip2 +compresses large files in blocks. The block size affects +both the compression ratio achieved, and the amount of memory needed for +compression and decompression. The flags \-1 through \-9 +specify the block size to be 100,000 bytes through 900,000 bytes (the +default) respectively. At decompression time, the block size used for +compression is read from the header of the compressed file, and +.I bunzip2 +then allocates itself just enough memory to decompress +the file. Since block sizes are stored in compressed files, it follows +that the flags \-1 to \-9 are irrelevant to and so ignored +during decompression. + +Compression and decompression requirements, +in bytes, can be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + +Larger block sizes give rapidly diminishing marginal returns. Most of +the compression comes from the first two or three hundred k of block +size, a fact worth bearing in mind when using +.I bzip2 +on small machines. +It is also important to appreciate that the decompression memory +requirement is set at compression time by the choice of block size. + +For files compressed with the default 900k block size, +.I bunzip2 +will require about 3700 kbytes to decompress. To support decompression +of any file on a 4 megabyte machine, +.I bunzip2 +has an option to +decompress using approximately half this amount of memory, about 2300 +kbytes. Decompression speed is also halved, so you should use this +option only where necessary. The relevant flag is -s. + +In general, try and use the largest block size memory constraints allow, +since that maximises the compression achieved. Compression and +decompression speed are virtually unaffected by block size. + +Another significant point applies to files which fit in a single block +-- that means most files you'd encounter using a large block size. The +amount of real memory touched is proportional to the size of the file, +since the file is smaller than a block. For example, compressing a file +20,000 bytes long with the flag -9 will cause the compressor to +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 +kbytes of it. Similarly, the decompressor will allocate 3700k but only +touch 100k + 20000 * 4 = 180 kbytes. + +Here is a table which summarises the maximum memory usage for different +block sizes. Also recorded is the total compressed size for 14 files of +the Calgary Text Compression Corpus totalling 3,141,622 bytes. This +column gives some feel for how compression varies with block size. +These figures tend to understate the advantage of larger block sizes for +larger files, since the Corpus is dominated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + +.SH RECOVERING DATA FROM DAMAGED FILES +.I bzip2 +compresses files in blocks, usually 900kbytes long. Each +block is handled independently. If a media or transmission error causes +a multi-block .bz2 +file to become damaged, it may be possible to +recover data from the undamaged blocks in the file. + +The compressed representation of each block is delimited by a 48-bit +pattern, which makes it possible to find the block boundaries with +reasonable certainty. Each block also carries its own 32-bit CRC, so +damaged blocks can be distinguished from undamaged ones. + +.I bzip2recover +is a simple program whose purpose is to search for +blocks in .bz2 files, and write each block out into its own .bz2 +file. You can then use +.I bzip2 +\-t +to test the +integrity of the resulting files, and decompress those which are +undamaged. + +.I bzip2recover +takes a single argument, the name of the damaged file, +and writes a number of files "rec00001file.bz2", +"rec00002file.bz2", etc, containing the extracted blocks. +The output filenames are designed so that the use of +wildcards in subsequent processing -- for example, +"bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in +the correct order. + +.I bzip2recover +should be of most use dealing with large .bz2 +files, as these will contain many blocks. It is clearly +futile to use it on damaged single-block files, since a +damaged block cannot be recovered. If you wish to minimise +any potential data loss through media or transmission errors, +you might consider compressing with a smaller +block size. + +.SH PERFORMANCE NOTES +The sorting phase of compression gathers together similar strings in the +file. Because of this, files containing very long runs of repeated +symbols, like "aabaabaabaab ..." (repeated several hundred times) may +compress more slowly than normal. Versions 0.9.5 and above fare much +better than previous versions in this respect. The ratio between +worst-case and average-case compression time is in the region of 10:1. +For previous versions, this figure was more like 100:1. You can use the +\-vvvv option to monitor progress in great detail, if you want. + +Decompression speed is unaffected by these phenomena. + +.I bzip2 +usually allocates several megabytes of memory to operate +in, and then charges all over it in a fairly random fashion. This means +that performance, both for compressing and decompressing, is largely +determined by the speed at which your machine can service cache misses. +Because of this, small changes to the code to reduce the miss rate have +been observed to give disproportionately large performance improvements. +I imagine +.I bzip2 +will perform best on machines with very large caches. + +.SH CAVEATS +I/O error messages are not as helpful as they could be. +.I bzip2 +tries hard to detect I/O errors and exit cleanly, but the details of +what the problem is sometimes seem rather misleading. + +This manual page pertains to version 1.0.6 of +.I bzip2. +Compressed data created by this version is entirely forwards and +backwards compatible with the previous public releases, versions +0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following +exception: 0.9.0 and above can correctly decompress multiple +concatenated compressed files. 0.1pl2 cannot do this; it will stop +after decompressing just the first file in the stream. + +.I bzip2recover +versions prior to 1.0.2 used 32-bit integers to represent +bit positions in compressed files, so they could not handle compressed +files more than 512 megabytes long. Versions 1.0.2 and above use +64-bit ints on some platforms which support them (GNU supported +targets, and Windows). To establish whether or not bzip2recover was +built with such a limitation, run it without arguments. In any event +you can build yourself an unlimited version if you can recompile it +with MaybeUInt64 set to be an unsigned 64-bit integer. + + + +.SH AUTHOR +Julian Seward, jsewardbzip.org. + +http://www.bzip.org + +The ideas embodied in +.I bzip2 +are due to (at least) the following +people: Michael Burrows and David Wheeler (for the block sorting +transformation), David Wheeler (again, for the Huffman coder), Peter +Fenwick (for the structured coding model in the original +.I bzip, +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten +(for the arithmetic coder in the original +.I bzip). +I am much +indebted for their help, support and advice. See the manual in the +source distribution for pointers to sources of documentation. Christian +von Roques encouraged me to look for faster sorting algorithms, so as to +speed up compression. Bela Lubkin encouraged me to improve the +worst-case compression performance. +Donna Robinson XMLised the documentation. +The bz* scripts are derived from those of GNU gzip. +Many people sent patches, helped +with portability problems, lent machines, gave advice and were generally +helpful. diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1.preformatted b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1.preformatted new file mode 100644 index 0000000..63c33be --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.1.preformatted @@ -0,0 +1,399 @@ +bzip2(1) bzip2(1) + + + +NNAAMMEE + bzip2, bunzip2 − a block‐sorting file compressor, v1.0.6 + bzcat − decompresses files to stdout + bzip2recover − recovers data from damaged bzip2 files + + +SSYYNNOOPPSSIISS + bbzziipp22 [ −−ccddffkkqqssttvvzzVVLL112233445566778899 ] [ _f_i_l_e_n_a_m_e_s _._._. ] + bbuunnzziipp22 [ −−ffkkvvssVVLL ] [ _f_i_l_e_n_a_m_e_s _._._. ] + bbzzccaatt [ −−ss ] [ _f_i_l_e_n_a_m_e_s _._._. ] + bbzziipp22rreeccoovveerr _f_i_l_e_n_a_m_e + + +DDEESSCCRRIIPPTTIIOONN + _b_z_i_p_2 compresses files using the Burrows‐Wheeler block + sorting text compression algorithm, and Huffman coding. + Compression is generally considerably better than that + achieved by more conventional LZ77/LZ78‐based compressors, + and approaches the performance of the PPM family of sta­ + tistical compressors. + + The command‐line options are deliberately very similar to + those of _G_N_U _g_z_i_p_, but they are not identical. + + _b_z_i_p_2 expects a list of file names to accompany the com­ + mand‐line flags. Each file is replaced by a compressed + version of itself, with the name "original_name.bz2". + Each compressed file has the same modification date, per­ + missions, and, when possible, ownership as the correspond­ + ing original, so that these properties can be correctly + restored at decompression time. File name handling is + naive in the sense that there is no mechanism for preserv­ + ing original file names, permissions, ownerships or dates + in filesystems which lack these concepts, or have serious + file name length restrictions, such as MS‐DOS. + + _b_z_i_p_2 and _b_u_n_z_i_p_2 will by default not overwrite existing + files. If you want this to happen, specify the −f flag. + + If no file names are specified, _b_z_i_p_2 compresses from + standard input to standard output. In this case, _b_z_i_p_2 + will decline to write compressed output to a terminal, as + this would be entirely incomprehensible and therefore + pointless. + + _b_u_n_z_i_p_2 (or _b_z_i_p_2 _−_d_) decompresses all specified files. + Files which were not created by _b_z_i_p_2 will be detected and + ignored, and a warning issued. _b_z_i_p_2 attempts to guess + the filename for the decompressed file from that of the + compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + + If the file does not end in one of the recognised endings, + _._b_z_2_, _._b_z_, _._t_b_z_2 or _._t_b_z_, _b_z_i_p_2 complains that it cannot + guess the name of the original file, and uses the original + name with _._o_u_t appended. + + As with compression, supplying no filenames causes decom­ + pression from standard input to standard output. + + _b_u_n_z_i_p_2 will correctly decompress a file which is the con­ + catenation of two or more compressed files. The result is + the concatenation of the corresponding uncompressed files. + Integrity testing (−t) of concatenated compressed files is + also supported. + + You can also compress or decompress files to the standard + output by giving the −c flag. Multiple files may be com­ + pressed and decompressed like this. The resulting outputs + are fed sequentially to stdout. Compression of multiple + files in this manner generates a stream containing multi­ + ple compressed file representations. Such a stream can be + decompressed correctly only by _b_z_i_p_2 version 0.9.0 or + later. Earlier versions of _b_z_i_p_2 will stop after decom­ + pressing the first file in the stream. + + _b_z_c_a_t (or _b_z_i_p_2 _‐_d_c_) decompresses all specified files to + the standard output. + + _b_z_i_p_2 will read arguments from the environment variables + _B_Z_I_P_2 and _B_Z_I_P_, in that order, and will process them + before any arguments read from the command line. This + gives a convenient way to supply default arguments. + + Compression is always performed, even if the compressed + file is slightly larger than the original. Files of less + than about one hundred bytes tend to get larger, since the + compression mechanism has a constant overhead in the + region of 50 bytes. Random data (including the output of + most file compressors) is coded at about 8.05 bits per + byte, giving an expansion of around 0.5%. + + As a self‐check for your protection, _b_z_i_p_2 uses 32‐bit + CRCs to make sure that the decompressed version of a file + is identical to the original. This guards against corrup­ + tion of the compressed data, and against undetected bugs + in _b_z_i_p_2 (hopefully very unlikely). The chances of data + corruption going undetected is microscopic, about one + chance in four billion for each file processed. Be aware, + though, that the check occurs upon decompression, so it + can only tell you that something is wrong. It can’t help + you recover the original uncompressed data. You can use + _b_z_i_p_2_r_e_c_o_v_e_r to try to recover data from damaged files. + + Return values: 0 for a normal exit, 1 for environmental + problems (file not found, invalid flags, I/O errors, &c), + 2 to indicate a corrupt compressed file, 3 for an internal + consistency error (eg, bug) which caused _b_z_i_p_2 to panic. + + +OOPPTTIIOONNSS + −−cc ‐‐‐‐ssttddoouutt + Compress or decompress to standard output. + + −−dd ‐‐‐‐ddeeccoommpprreessss + Force decompression. _b_z_i_p_2_, _b_u_n_z_i_p_2 and _b_z_c_a_t are + really the same program, and the decision about + what actions to take is done on the basis of which + name is used. This flag overrides that mechanism, + and forces _b_z_i_p_2 to decompress. + + −−zz ‐‐‐‐ccoommpprreessss + The complement to −d: forces compression, + regardless of the invocation name. + + −−tt ‐‐‐‐tteesstt + Check integrity of the specified file(s), but don’t + decompress them. This really performs a trial + decompression and throws away the result. + + −−ff ‐‐‐‐ffoorrccee + Force overwrite of output files. Normally, _b_z_i_p_2 + will not overwrite existing output files. Also + forces _b_z_i_p_2 to break hard links to files, which it + otherwise wouldn’t do. + + bzip2 normally declines to decompress files which + don’t have the correct magic header bytes. If + forced (‐f), however, it will pass such files + through unmodified. This is how GNU gzip behaves. + + −−kk ‐‐‐‐kkeeeepp + Keep (don’t delete) input files during compression + or decompression. + + −−ss ‐‐‐‐ssmmaallll + Reduce memory usage, for compression, decompression + and testing. Files are decompressed and tested + using a modified algorithm which only requires 2.5 + bytes per block byte. This means any file can be + decompressed in 2300k of memory, albeit at about + half the normal speed. + + During compression, −s selects a block size of + 200k, which limits memory use to around the same + figure, at the expense of your compression ratio. + In short, if your machine is low on memory (8 + megabytes or less), use −s for everything. See + MEMORY MANAGEMENT below. + + −−qq ‐‐‐‐qquuiieett + Suppress non‐essential warning messages. Messages + pertaining to I/O errors and other critical events + will not be suppressed. + + −−vv ‐‐‐‐vveerrbboossee + Verbose mode ‐‐ show the compression ratio for each + file processed. Further −v’s increase the ver­ + bosity level, spewing out lots of information which + is primarily of interest for diagnostic purposes. + + −−LL ‐‐‐‐lliicceennssee ‐‐VV ‐‐‐‐vveerrssiioonn + Display the software version, license terms and + conditions. + + −−11 ((oorr −−−−ffaasstt)) ttoo −−99 ((oorr −−−−bbeesstt)) + Set the block size to 100 k, 200 k .. 900 k when + compressing. Has no effect when decompressing. + See MEMORY MANAGEMENT below. The −−fast and −−best + aliases are primarily for GNU gzip compatibility. + In particular, −−fast doesn’t make things signifi­ + cantly faster. And −−best merely selects the + default behaviour. + + −−‐‐ Treats all subsequent arguments as file names, even + if they start with a dash. This is so you can han­ + dle files with names beginning with a dash, for + example: bzip2 −‐ −myfilename. + + −−‐‐rreeppeettiittiivvee‐‐ffaasstt ‐‐‐‐rreeppeettiittiivvee‐‐bbeesstt + These flags are redundant in versions 0.9.5 and + above. They provided some coarse control over the + behaviour of the sorting algorithm in earlier ver­ + sions, which was sometimes useful. 0.9.5 and above + have an improved algorithm which renders these + flags irrelevant. + + +MMEEMMOORRYY MMAANNAAGGEEMMEENNTT + _b_z_i_p_2 compresses large files in blocks. The block size + affects both the compression ratio achieved, and the + amount of memory needed for compression and decompression. + The flags −1 through −9 specify the block size to be + 100,000 bytes through 900,000 bytes (the default) respec­ + tively. At decompression time, the block size used for + compression is read from the header of the compressed + file, and _b_u_n_z_i_p_2 then allocates itself just enough memory + to decompress the file. Since block sizes are stored in + compressed files, it follows that the flags −1 to −9 are + irrelevant to and so ignored during decompression. + + Compression and decompression requirements, in bytes, can + be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + + Larger block sizes give rapidly diminishing marginal + returns. Most of the compression comes from the first two + or three hundred k of block size, a fact worth bearing in + mind when using _b_z_i_p_2 on small machines. It is also + important to appreciate that the decompression memory + requirement is set at compression time by the choice of + block size. + + For files compressed with the default 900k block size, + _b_u_n_z_i_p_2 will require about 3700 kbytes to decompress. To + support decompression of any file on a 4 megabyte machine, + _b_u_n_z_i_p_2 has an option to decompress using approximately + half this amount of memory, about 2300 kbytes. Decompres­ + sion speed is also halved, so you should use this option + only where necessary. The relevant flag is ‐s. + + In general, try and use the largest block size memory con­ + straints allow, since that maximises the compression + achieved. Compression and decompression speed are virtu­ + ally unaffected by block size. + + Another significant point applies to files which fit in a + single block ‐‐ that means most files you’d encounter + using a large block size. The amount of real memory + touched is proportional to the size of the file, since the + file is smaller than a block. For example, compressing a + file 20,000 bytes long with the flag ‐9 will cause the + compressor to allocate around 7600k of memory, but only + touch 400k + 20000 * 8 = 560 kbytes of it. Similarly, the + decompressor will allocate 3700k but only touch 100k + + 20000 * 4 = 180 kbytes. + + Here is a table which summarises the maximum memory usage + for different block sizes. Also recorded is the total + compressed size for 14 files of the Calgary Text Compres­ + sion Corpus totalling 3,141,622 bytes. This column gives + some feel for how compression varies with block size. + These figures tend to understate the advantage of larger + block sizes for larger files, since the Corpus is domi­ + nated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage ‐s usage Size + + ‐1 1200k 500k 350k 914704 + ‐2 2000k 900k 600k 877703 + ‐3 2800k 1300k 850k 860338 + ‐4 3600k 1700k 1100k 846899 + ‐5 4400k 2100k 1350k 845160 + ‐6 5200k 2500k 1600k 838626 + ‐7 6100k 2900k 1850k 834096 + ‐8 6800k 3300k 2100k 828642 + ‐9 7600k 3700k 2350k 828642 + + +RREECCOOVVEERRIINNGG DDAATTAA FFRROOMM DDAAMMAAGGEEDD FFIILLEESS + _b_z_i_p_2 compresses files in blocks, usually 900kbytes long. + Each block is handled independently. If a media or trans­ + mission error causes a multi‐block .bz2 file to become + damaged, it may be possible to recover data from the + undamaged blocks in the file. + + The compressed representation of each block is delimited + by a 48‐bit pattern, which makes it possible to find the + block boundaries with reasonable certainty. Each block + also carries its own 32‐bit CRC, so damaged blocks can be + distinguished from undamaged ones. + + _b_z_i_p_2_r_e_c_o_v_e_r is a simple program whose purpose is to + search for blocks in .bz2 files, and write each block out + into its own .bz2 file. You can then use _b_z_i_p_2 −t to test + the integrity of the resulting files, and decompress those + which are undamaged. + + _b_z_i_p_2_r_e_c_o_v_e_r takes a single argument, the name of the dam­ + aged file, and writes a number of files + "rec00001file.bz2", "rec00002file.bz2", etc, containing + the extracted blocks. The output filenames are + designed so that the use of wildcards in subsequent pro­ + cessing ‐‐ for example, "bzip2 ‐dc rec*file.bz2 > recov­ + ered_data" ‐‐ processes the files in the correct order. + + _b_z_i_p_2_r_e_c_o_v_e_r should be of most use dealing with large .bz2 + files, as these will contain many blocks. It is clearly + futile to use it on damaged single‐block files, since a + damaged block cannot be recovered. If you wish to min­ + imise any potential data loss through media or transmis­ + sion errors, you might consider compressing with a smaller + block size. + + +PPEERRFFOORRMMAANNCCEE NNOOTTEESS + The sorting phase of compression gathers together similar + strings in the file. Because of this, files containing + very long runs of repeated symbols, like "aabaabaabaab + ..." (repeated several hundred times) may compress more + slowly than normal. Versions 0.9.5 and above fare much + better than previous versions in this respect. The ratio + between worst‐case and average‐case compression time is in + the region of 10:1. For previous versions, this figure + was more like 100:1. You can use the −vvvv option to mon­ + itor progress in great detail, if you want. + + Decompression speed is unaffected by these phenomena. + + _b_z_i_p_2 usually allocates several megabytes of memory to + operate in, and then charges all over it in a fairly ran­ + dom fashion. This means that performance, both for com­ + pressing and decompressing, is largely determined by the + speed at which your machine can service cache misses. + Because of this, small changes to the code to reduce the + miss rate have been observed to give disproportionately + large performance improvements. I imagine _b_z_i_p_2 will per­ + form best on machines with very large caches. + + +CCAAVVEEAATTSS + I/O error messages are not as helpful as they could be. + _b_z_i_p_2 tries hard to detect I/O errors and exit cleanly, + but the details of what the problem is sometimes seem + rather misleading. + + This manual page pertains to version 1.0.6 of _b_z_i_p_2_. Com­ + pressed data created by this version is entirely forwards + and backwards compatible with the previous public + releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, + 1.0.2 and above, but with the following exception: 0.9.0 + and above can correctly decompress multiple concatenated + compressed files. 0.1pl2 cannot do this; it will stop + after decompressing just the first file in the stream. + + _b_z_i_p_2_r_e_c_o_v_e_r versions prior to 1.0.2 used 32‐bit integers + to represent bit positions in compressed files, so they + could not handle compressed files more than 512 megabytes + long. Versions 1.0.2 and above use 64‐bit ints on some + platforms which support them (GNU supported targets, and + Windows). To establish whether or not bzip2recover was + built with such a limitation, run it without arguments. + In any event you can build yourself an unlimited version + if you can recompile it with MaybeUInt64 set to be an + unsigned 64‐bit integer. + + + + +AAUUTTHHOORR + Julian Seward, jsewardbzip.org. + + http://www.bzip.org + + The ideas embodied in _b_z_i_p_2 are due to (at least) the fol­ + lowing people: Michael Burrows and David Wheeler (for the + block sorting transformation), David Wheeler (again, for + the Huffman coder), Peter Fenwick (for the structured cod­ + ing model in the original _b_z_i_p_, and many refinements), and + Alistair Moffat, Radford Neal and Ian Witten (for the + arithmetic coder in the original _b_z_i_p_)_. I am much + indebted for their help, support and advice. See the man­ + ual in the source distribution for pointers to sources of + documentation. Christian von Roques encouraged me to look + for faster sorting algorithms, so as to speed up compres­ + sion. Bela Lubkin encouraged me to improve the worst‐case + compression performance. Donna Robinson XMLised the docu­ + mentation. The bz* scripts are derived from those of GNU + gzip. Many people sent patches, helped with portability + problems, lent machines, gave advice and were generally + helpful. + + + + bzip2(1) diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.c new file mode 100644 index 0000000..6de9d1d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.c @@ -0,0 +1,2034 @@ + +/*-----------------------------------------------------------*/ +/*--- A block-sorting, lossless compressor bzip2.c ---*/ +/*-----------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +/* Place a 1 beside your platform, and 0 elsewhere. + Generic 32-bit Unix. + Also works on 64-bit Unix boxes. + This is the default. +*/ +#define BZ_UNIX 1 + +/*-- + Win32, as seen by Jacob Navia's excellent + port of (Chris Fraser & David Hanson)'s excellent + lcc compiler. Or with MS Visual C. + This is selected automatically if compiled by a compiler which + defines _WIN32, not including the Cygwin GCC. +--*/ +#define BZ_LCCWIN32 0 + +#if defined(_WIN32) && !defined(__CYGWIN__) +#undef BZ_LCCWIN32 +#define BZ_LCCWIN32 1 +#undef BZ_UNIX +#define BZ_UNIX 0 +#endif + + +/*---------------------------------------------*/ +/*-- + Some stuff for all platforms. +--*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <signal.h> +#include <math.h> +#include <errno.h> +#include <ctype.h> +#include "bzlib.h" + +#define ERROR_IF_EOF(i) { if ((i) == EOF) ioError(); } +#define ERROR_IF_NOT_ZERO(i) { if ((i) != 0) ioError(); } +#define ERROR_IF_MINUS_ONE(i) { if ((i) == (-1)) ioError(); } + + +/*---------------------------------------------*/ +/*-- + Platform-specific stuff. +--*/ + +#if BZ_UNIX +# include <fcntl.h> +# include <sys/types.h> +# include <utime.h> +# include <unistd.h> +# include <sys/stat.h> +# include <sys/times.h> + +# define PATH_SEP '/' +# define MY_LSTAT lstat +# define MY_STAT stat +# define MY_S_ISREG S_ISREG +# define MY_S_ISDIR S_ISDIR + +# define APPEND_FILESPEC(root, name) \ + root=snocString((root), (name)) + +# define APPEND_FLAG(root, name) \ + root=snocString((root), (name)) + +# define SET_BINARY_MODE(fd) /**/ + +# ifdef __GNUC__ +# define NORETURN __attribute__ ((noreturn)) +# else +# define NORETURN /**/ +# endif + +# ifdef __DJGPP__ +# include <io.h> +# include <fcntl.h> +# undef MY_LSTAT +# undef MY_STAT +# define MY_LSTAT stat +# define MY_STAT stat +# undef SET_BINARY_MODE +# define SET_BINARY_MODE(fd) \ + do { \ + int retVal = setmode ( fileno ( fd ), \ + O_BINARY ); \ + ERROR_IF_MINUS_ONE ( retVal ); \ + } while ( 0 ) +# endif + +# ifdef __CYGWIN__ +# include <io.h> +# include <fcntl.h> +# undef SET_BINARY_MODE +# define SET_BINARY_MODE(fd) \ + do { \ + int retVal = setmode ( fileno ( fd ), \ + O_BINARY ); \ + ERROR_IF_MINUS_ONE ( retVal ); \ + } while ( 0 ) +# endif +#endif /* BZ_UNIX */ + + + +#if BZ_LCCWIN32 +# include <io.h> +# include <fcntl.h> +# include <sys\stat.h> + +# define NORETURN /**/ +# define PATH_SEP '\\' +# define MY_LSTAT _stat +# define MY_STAT _stat +# define MY_S_ISREG(x) ((x) & _S_IFREG) +# define MY_S_ISDIR(x) ((x) & _S_IFDIR) + +# define APPEND_FLAG(root, name) \ + root=snocString((root), (name)) + +# define APPEND_FILESPEC(root, name) \ + root = snocString ((root), (name)) + +# define SET_BINARY_MODE(fd) \ + do { \ + int retVal = setmode ( fileno ( fd ), \ + O_BINARY ); \ + ERROR_IF_MINUS_ONE ( retVal ); \ + } while ( 0 ) + +#endif /* BZ_LCCWIN32 */ + + +/*---------------------------------------------*/ +/*-- + Some more stuff for all platforms :-) +--*/ + +typedef char Char; +typedef unsigned char Bool; +typedef unsigned char UChar; +typedef int Int32; +typedef unsigned int UInt32; +typedef short Int16; +typedef unsigned short UInt16; + +#define True ((Bool)1) +#define False ((Bool)0) + +/*-- + IntNative is your platform's `native' int size. + Only here to avoid probs with 64-bit platforms. +--*/ +typedef int IntNative; + + +/*---------------------------------------------------*/ +/*--- Misc (file handling) data decls ---*/ +/*---------------------------------------------------*/ + +Int32 verbosity; +Bool keepInputFiles, smallMode, deleteOutputOnInterrupt; +Bool forceOverwrite, testFailsExist, unzFailsExist, noisy; +Int32 numFileNames, numFilesProcessed, blockSize100k; +Int32 exitValue; + +/*-- source modes; F==file, I==stdin, O==stdout --*/ +#define SM_I2O 1 +#define SM_F2O 2 +#define SM_F2F 3 + +/*-- operation modes --*/ +#define OM_Z 1 +#define OM_UNZ 2 +#define OM_TEST 3 + +Int32 opMode; +Int32 srcMode; + +#define FILE_NAME_LEN 1034 + +Int32 longestFileName; +Char inName [FILE_NAME_LEN]; +Char outName[FILE_NAME_LEN]; +Char tmpName[FILE_NAME_LEN]; +Char *progName; +Char progNameReally[FILE_NAME_LEN]; +FILE *outputHandleJustInCase; +Int32 workFactor; + +static void panic ( const Char* ) NORETURN; +static void ioError ( void ) NORETURN; +static void outOfMemory ( void ) NORETURN; +static void configError ( void ) NORETURN; +static void crcError ( void ) NORETURN; +static void cleanUpAndFail ( Int32 ) NORETURN; +static void compressedStreamEOF ( void ) NORETURN; + +static void copyFileName ( Char*, Char* ); +static void* myMalloc ( Int32 ); +static void applySavedFileAttrToOutputFile ( IntNative fd ); + + + +/*---------------------------------------------------*/ +/*--- An implementation of 64-bit ints. Sigh. ---*/ +/*--- Roll on widespread deployment of ANSI C9X ! ---*/ +/*---------------------------------------------------*/ + +typedef + struct { UChar b[8]; } + UInt64; + + +static +void uInt64_from_UInt32s ( UInt64* n, UInt32 lo32, UInt32 hi32 ) +{ + n->b[7] = (UChar)((hi32 >> 24) & 0xFF); + n->b[6] = (UChar)((hi32 >> 16) & 0xFF); + n->b[5] = (UChar)((hi32 >> 8) & 0xFF); + n->b[4] = (UChar) (hi32 & 0xFF); + n->b[3] = (UChar)((lo32 >> 24) & 0xFF); + n->b[2] = (UChar)((lo32 >> 16) & 0xFF); + n->b[1] = (UChar)((lo32 >> 8) & 0xFF); + n->b[0] = (UChar) (lo32 & 0xFF); +} + + +static +double uInt64_to_double ( UInt64* n ) +{ + Int32 i; + double base = 1.0; + double sum = 0.0; + for (i = 0; i < 8; i++) { + sum += base * (double)(n->b[i]); + base *= 256.0; + } + return sum; +} + + +static +Bool uInt64_isZero ( UInt64* n ) +{ + Int32 i; + for (i = 0; i < 8; i++) + if (n->b[i] != 0) return 0; + return 1; +} + + +/* Divide *n by 10, and return the remainder. */ +static +Int32 uInt64_qrm10 ( UInt64* n ) +{ + UInt32 rem, tmp; + Int32 i; + rem = 0; + for (i = 7; i >= 0; i--) { + tmp = rem * 256 + n->b[i]; + n->b[i] = tmp / 10; + rem = tmp % 10; + } + return rem; +} + + +/* ... and the Whole Entire Point of all this UInt64 stuff is + so that we can supply the following function. +*/ +static +void uInt64_toAscii ( char* outbuf, UInt64* n ) +{ + Int32 i, q; + UChar buf[32]; + Int32 nBuf = 0; + UInt64 n_copy = *n; + do { + q = uInt64_qrm10 ( &n_copy ); + buf[nBuf] = q + '0'; + nBuf++; + } while (!uInt64_isZero(&n_copy)); + outbuf[nBuf] = 0; + for (i = 0; i < nBuf; i++) + outbuf[i] = buf[nBuf-i-1]; +} + + +/*---------------------------------------------------*/ +/*--- Processing of complete files and streams ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------*/ +static +Bool myfeof ( FILE* f ) +{ + Int32 c = fgetc ( f ); + if (c == EOF) return True; + ungetc ( c, f ); + return False; +} + + +/*---------------------------------------------*/ +static +void compressStream ( FILE *stream, FILE *zStream ) +{ + BZFILE* bzf = NULL; + UChar ibuf[5000]; + Int32 nIbuf; + UInt32 nbytes_in_lo32, nbytes_in_hi32; + UInt32 nbytes_out_lo32, nbytes_out_hi32; + Int32 bzerr, bzerr_dummy, ret; + + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); + + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + + bzf = BZ2_bzWriteOpen ( &bzerr, zStream, + blockSize100k, verbosity, workFactor ); + if (bzerr != BZ_OK) goto errhandler; + + if (verbosity >= 2) fprintf ( stderr, "\n" ); + + while (True) { + + if (myfeof(stream)) break; + nIbuf = fread ( ibuf, sizeof(UChar), 5000, stream ); + if (ferror(stream)) goto errhandler_io; + if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf ); + if (bzerr != BZ_OK) goto errhandler; + + } + + BZ2_bzWriteClose64 ( &bzerr, bzf, 0, + &nbytes_in_lo32, &nbytes_in_hi32, + &nbytes_out_lo32, &nbytes_out_hi32 ); + if (bzerr != BZ_OK) goto errhandler; + + if (ferror(zStream)) goto errhandler_io; + ret = fflush ( zStream ); + if (ret == EOF) goto errhandler_io; + if (zStream != stdout) { + Int32 fd = fileno ( zStream ); + if (fd < 0) goto errhandler_io; + applySavedFileAttrToOutputFile ( fd ); + ret = fclose ( zStream ); + outputHandleJustInCase = NULL; + if (ret == EOF) goto errhandler_io; + } + outputHandleJustInCase = NULL; + if (ferror(stream)) goto errhandler_io; + ret = fclose ( stream ); + if (ret == EOF) goto errhandler_io; + + if (verbosity >= 1) { + if (nbytes_in_lo32 == 0 && nbytes_in_hi32 == 0) { + fprintf ( stderr, " no data compressed.\n"); + } else { + Char buf_nin[32], buf_nout[32]; + UInt64 nbytes_in, nbytes_out; + double nbytes_in_d, nbytes_out_d; + uInt64_from_UInt32s ( &nbytes_in, + nbytes_in_lo32, nbytes_in_hi32 ); + uInt64_from_UInt32s ( &nbytes_out, + nbytes_out_lo32, nbytes_out_hi32 ); + nbytes_in_d = uInt64_to_double ( &nbytes_in ); + nbytes_out_d = uInt64_to_double ( &nbytes_out ); + uInt64_toAscii ( buf_nin, &nbytes_in ); + uInt64_toAscii ( buf_nout, &nbytes_out ); + fprintf ( stderr, "%6.3f:1, %6.3f bits/byte, " + "%5.2f%% saved, %s in, %s out.\n", + nbytes_in_d / nbytes_out_d, + (8.0 * nbytes_out_d) / nbytes_in_d, + 100.0 * (1.0 - nbytes_out_d / nbytes_in_d), + buf_nin, + buf_nout + ); + } + } + + return; + + errhandler: + BZ2_bzWriteClose64 ( &bzerr_dummy, bzf, 1, + &nbytes_in_lo32, &nbytes_in_hi32, + &nbytes_out_lo32, &nbytes_out_hi32 ); + switch (bzerr) { + case BZ_CONFIG_ERROR: + configError(); break; + case BZ_MEM_ERROR: + outOfMemory (); break; + case BZ_IO_ERROR: + errhandler_io: + ioError(); break; + default: + panic ( "compress:unexpected error" ); + } + + panic ( "compress:end" ); + /*notreached*/ +} + + + +/*---------------------------------------------*/ +static +Bool uncompressStream ( FILE *zStream, FILE *stream ) +{ + BZFILE* bzf = NULL; + Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; + UChar obuf[5000]; + UChar unused[BZ_MAX_UNUSED]; + Int32 nUnused; + void* unusedTmpV; + UChar* unusedTmp; + + nUnused = 0; + streamNo = 0; + + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); + + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + + while (True) { + + bzf = BZ2_bzReadOpen ( + &bzerr, zStream, verbosity, + (int)smallMode, unused, nUnused + ); + if (bzf == NULL || bzerr != BZ_OK) goto errhandler; + streamNo++; + + while (bzerr == BZ_OK) { + nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); + if (bzerr == BZ_DATA_ERROR_MAGIC) goto trycat; + if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0) + fwrite ( obuf, sizeof(UChar), nread, stream ); + if (ferror(stream)) goto errhandler_io; + } + if (bzerr != BZ_STREAM_END) goto errhandler; + + BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused ); + if (bzerr != BZ_OK) panic ( "decompress:bzReadGetUnused" ); + + unusedTmp = (UChar*)unusedTmpV; + for (i = 0; i < nUnused; i++) unused[i] = unusedTmp[i]; + + BZ2_bzReadClose ( &bzerr, bzf ); + if (bzerr != BZ_OK) panic ( "decompress:bzReadGetUnused" ); + + if (nUnused == 0 && myfeof(zStream)) break; + } + + closeok: + if (ferror(zStream)) goto errhandler_io; + if (stream != stdout) { + Int32 fd = fileno ( stream ); + if (fd < 0) goto errhandler_io; + applySavedFileAttrToOutputFile ( fd ); + } + ret = fclose ( zStream ); + if (ret == EOF) goto errhandler_io; + + if (ferror(stream)) goto errhandler_io; + ret = fflush ( stream ); + if (ret != 0) goto errhandler_io; + if (stream != stdout) { + ret = fclose ( stream ); + outputHandleJustInCase = NULL; + if (ret == EOF) goto errhandler_io; + } + outputHandleJustInCase = NULL; + if (verbosity >= 2) fprintf ( stderr, "\n " ); + return True; + + trycat: + if (forceOverwrite) { + rewind(zStream); + while (True) { + if (myfeof(zStream)) break; + nread = fread ( obuf, sizeof(UChar), 5000, zStream ); + if (ferror(zStream)) goto errhandler_io; + if (nread > 0) fwrite ( obuf, sizeof(UChar), nread, stream ); + if (ferror(stream)) goto errhandler_io; + } + goto closeok; + } + + errhandler: + BZ2_bzReadClose ( &bzerr_dummy, bzf ); + switch (bzerr) { + case BZ_CONFIG_ERROR: + configError(); break; + case BZ_IO_ERROR: + errhandler_io: + ioError(); break; + case BZ_DATA_ERROR: + crcError(); + case BZ_MEM_ERROR: + outOfMemory(); + case BZ_UNEXPECTED_EOF: + compressedStreamEOF(); + case BZ_DATA_ERROR_MAGIC: + if (zStream != stdin) fclose(zStream); + if (stream != stdout) fclose(stream); + if (streamNo == 1) { + return False; + } else { + if (noisy) + fprintf ( stderr, + "\n%s: %s: trailing garbage after EOF ignored\n", + progName, inName ); + return True; + } + default: + panic ( "decompress:unexpected error" ); + } + + panic ( "decompress:end" ); + return True; /*notreached*/ +} + + +/*---------------------------------------------*/ +static +Bool testStream ( FILE *zStream ) +{ + BZFILE* bzf = NULL; + Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; + UChar obuf[5000]; + UChar unused[BZ_MAX_UNUSED]; + Int32 nUnused; + void* unusedTmpV; + UChar* unusedTmp; + + nUnused = 0; + streamNo = 0; + + SET_BINARY_MODE(zStream); + if (ferror(zStream)) goto errhandler_io; + + while (True) { + + bzf = BZ2_bzReadOpen ( + &bzerr, zStream, verbosity, + (int)smallMode, unused, nUnused + ); + if (bzf == NULL || bzerr != BZ_OK) goto errhandler; + streamNo++; + + while (bzerr == BZ_OK) { + nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); + if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler; + } + if (bzerr != BZ_STREAM_END) goto errhandler; + + BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused ); + if (bzerr != BZ_OK) panic ( "test:bzReadGetUnused" ); + + unusedTmp = (UChar*)unusedTmpV; + for (i = 0; i < nUnused; i++) unused[i] = unusedTmp[i]; + + BZ2_bzReadClose ( &bzerr, bzf ); + if (bzerr != BZ_OK) panic ( "test:bzReadGetUnused" ); + if (nUnused == 0 && myfeof(zStream)) break; + + } + + if (ferror(zStream)) goto errhandler_io; + ret = fclose ( zStream ); + if (ret == EOF) goto errhandler_io; + + if (verbosity >= 2) fprintf ( stderr, "\n " ); + return True; + + errhandler: + BZ2_bzReadClose ( &bzerr_dummy, bzf ); + if (verbosity == 0) + fprintf ( stderr, "%s: %s: ", progName, inName ); + switch (bzerr) { + case BZ_CONFIG_ERROR: + configError(); break; + case BZ_IO_ERROR: + errhandler_io: + ioError(); break; + case BZ_DATA_ERROR: + fprintf ( stderr, + "data integrity (CRC) error in data\n" ); + return False; + case BZ_MEM_ERROR: + outOfMemory(); + case BZ_UNEXPECTED_EOF: + fprintf ( stderr, + "file ends unexpectedly\n" ); + return False; + case BZ_DATA_ERROR_MAGIC: + if (zStream != stdin) fclose(zStream); + if (streamNo == 1) { + fprintf ( stderr, + "bad magic number (file not created by bzip2)\n" ); + return False; + } else { + if (noisy) + fprintf ( stderr, + "trailing garbage after EOF ignored\n" ); + return True; + } + default: + panic ( "test:unexpected error" ); + } + + panic ( "test:end" ); + return True; /*notreached*/ +} + + +/*---------------------------------------------------*/ +/*--- Error [non-] handling grunge ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------*/ +static +void setExit ( Int32 v ) +{ + if (v > exitValue) exitValue = v; +} + + +/*---------------------------------------------*/ +static +void cadvise ( void ) +{ + if (noisy) + fprintf ( + stderr, + "\nIt is possible that the compressed file(s) have become corrupted.\n" + "You can use the -tvv option to test integrity of such files.\n\n" + "You can use the `bzip2recover' program to attempt to recover\n" + "data from undamaged sections of corrupted files.\n\n" + ); +} + + +/*---------------------------------------------*/ +static +void showFileNames ( void ) +{ + if (noisy) + fprintf ( + stderr, + "\tInput file = %s, output file = %s\n", + inName, outName + ); +} + + +/*---------------------------------------------*/ +static +void cleanUpAndFail ( Int32 ec ) +{ + IntNative retVal; + struct MY_STAT statBuf; + + if ( srcMode == SM_F2F + && opMode != OM_TEST + && deleteOutputOnInterrupt ) { + + /* Check whether input file still exists. Delete output file + only if input exists to avoid loss of data. Joerg Prante, 5 + January 2002. (JRS 06-Jan-2002: other changes in 1.0.2 mean + this is less likely to happen. But to be ultra-paranoid, we + do the check anyway.) */ + retVal = MY_STAT ( inName, &statBuf ); + if (retVal == 0) { + if (noisy) + fprintf ( stderr, + "%s: Deleting output file %s, if it exists.\n", + progName, outName ); + if (outputHandleJustInCase != NULL) + fclose ( outputHandleJustInCase ); + retVal = remove ( outName ); + if (retVal != 0) + fprintf ( stderr, + "%s: WARNING: deletion of output file " + "(apparently) failed.\n", + progName ); + } else { + fprintf ( stderr, + "%s: WARNING: deletion of output file suppressed\n", + progName ); + fprintf ( stderr, + "%s: since input file no longer exists. Output file\n", + progName ); + fprintf ( stderr, + "%s: `%s' may be incomplete.\n", + progName, outName ); + fprintf ( stderr, + "%s: I suggest doing an integrity test (bzip2 -tv)" + " of it.\n", + progName ); + } + } + + if (noisy && numFileNames > 0 && numFilesProcessed < numFileNames) { + fprintf ( stderr, + "%s: WARNING: some files have not been processed:\n" + "%s: %d specified on command line, %d not processed yet.\n\n", + progName, progName, + numFileNames, numFileNames - numFilesProcessed ); + } + setExit(ec); + exit(exitValue); +} + + +/*---------------------------------------------*/ +static +void panic ( const Char* s ) +{ + fprintf ( stderr, + "\n%s: PANIC -- internal consistency error:\n" + "\t%s\n" + "\tThis is a BUG. Please report it to me at:\n" + "\tjseward@bzip.org\n", + progName, s ); + showFileNames(); + cleanUpAndFail( 3 ); +} + + +/*---------------------------------------------*/ +static +void crcError ( void ) +{ + fprintf ( stderr, + "\n%s: Data integrity error when decompressing.\n", + progName ); + showFileNames(); + cadvise(); + cleanUpAndFail( 2 ); +} + + +/*---------------------------------------------*/ +static +void compressedStreamEOF ( void ) +{ + if (noisy) { + fprintf ( stderr, + "\n%s: Compressed file ends unexpectedly;\n\t" + "perhaps it is corrupted? *Possible* reason follows.\n", + progName ); + perror ( progName ); + showFileNames(); + cadvise(); + } + cleanUpAndFail( 2 ); +} + + +/*---------------------------------------------*/ +static +void ioError ( void ) +{ + fprintf ( stderr, + "\n%s: I/O or other error, bailing out. " + "Possible reason follows.\n", + progName ); + perror ( progName ); + showFileNames(); + cleanUpAndFail( 1 ); +} + + +/*---------------------------------------------*/ +static +void mySignalCatcher ( IntNative n ) +{ + fprintf ( stderr, + "\n%s: Control-C or similar caught, quitting.\n", + progName ); + cleanUpAndFail(1); +} + + +/*---------------------------------------------*/ +static +void mySIGSEGVorSIGBUScatcher ( IntNative n ) +{ + if (opMode == OM_Z) + fprintf ( + stderr, + "\n%s: Caught a SIGSEGV or SIGBUS whilst compressing.\n" + "\n" + " Possible causes are (most likely first):\n" + " (1) This computer has unreliable memory or cache hardware\n" + " (a surprisingly common problem; try a different machine.)\n" + " (2) A bug in the compiler used to create this executable\n" + " (unlikely, if you didn't compile bzip2 yourself.)\n" + " (3) A real bug in bzip2 -- I hope this should never be the case.\n" + " The user's manual, Section 4.3, has more info on (1) and (2).\n" + " \n" + " If you suspect this is a bug in bzip2, or are unsure about (1)\n" + " or (2), feel free to report it to me at: jseward@bzip.org.\n" + " Section 4.3 of the user's manual describes the info a useful\n" + " bug report should have. If the manual is available on your\n" + " system, please try and read it before mailing me. If you don't\n" + " have the manual or can't be bothered to read it, mail me anyway.\n" + "\n", + progName ); + else + fprintf ( + stderr, + "\n%s: Caught a SIGSEGV or SIGBUS whilst decompressing.\n" + "\n" + " Possible causes are (most likely first):\n" + " (1) The compressed data is corrupted, and bzip2's usual checks\n" + " failed to detect this. Try bzip2 -tvv my_file.bz2.\n" + " (2) This computer has unreliable memory or cache hardware\n" + " (a surprisingly common problem; try a different machine.)\n" + " (3) A bug in the compiler used to create this executable\n" + " (unlikely, if you didn't compile bzip2 yourself.)\n" + " (4) A real bug in bzip2 -- I hope this should never be the case.\n" + " The user's manual, Section 4.3, has more info on (2) and (3).\n" + " \n" + " If you suspect this is a bug in bzip2, or are unsure about (2)\n" + " or (3), feel free to report it to me at: jseward@bzip.org.\n" + " Section 4.3 of the user's manual describes the info a useful\n" + " bug report should have. If the manual is available on your\n" + " system, please try and read it before mailing me. If you don't\n" + " have the manual or can't be bothered to read it, mail me anyway.\n" + "\n", + progName ); + + showFileNames(); + if (opMode == OM_Z) + cleanUpAndFail( 3 ); else + { cadvise(); cleanUpAndFail( 2 ); } +} + + +/*---------------------------------------------*/ +static +void outOfMemory ( void ) +{ + fprintf ( stderr, + "\n%s: couldn't allocate enough memory\n", + progName ); + showFileNames(); + cleanUpAndFail(1); +} + + +/*---------------------------------------------*/ +static +void configError ( void ) +{ + fprintf ( stderr, + "bzip2: I'm not configured correctly for this platform!\n" + "\tI require Int32, Int16 and Char to have sizes\n" + "\tof 4, 2 and 1 bytes to run properly, and they don't.\n" + "\tProbably you can fix this by defining them correctly,\n" + "\tand recompiling. Bye!\n" ); + setExit(3); + exit(exitValue); +} + + +/*---------------------------------------------------*/ +/*--- The main driver machinery ---*/ +/*---------------------------------------------------*/ + +/* All rather crufty. The main problem is that input files + are stat()d multiple times before use. This should be + cleaned up. +*/ + +/*---------------------------------------------*/ +static +void pad ( Char *s ) +{ + Int32 i; + if ( (Int32)strlen(s) >= longestFileName ) return; + for (i = 1; i <= longestFileName - (Int32)strlen(s); i++) + fprintf ( stderr, " " ); +} + + +/*---------------------------------------------*/ +static +void copyFileName ( Char* to, Char* from ) +{ + if ( strlen(from) > FILE_NAME_LEN-10 ) { + fprintf ( + stderr, + "bzip2: file name\n`%s'\n" + "is suspiciously (more than %d chars) long.\n" + "Try using a reasonable file name instead. Sorry! :-)\n", + from, FILE_NAME_LEN-10 + ); + setExit(1); + exit(exitValue); + } + + strncpy(to,from,FILE_NAME_LEN-10); + to[FILE_NAME_LEN-10]='\0'; +} + + +/*---------------------------------------------*/ +static +Bool fileExists ( Char* name ) +{ + FILE *tmp = fopen ( name, "rb" ); + Bool exists = (tmp != NULL); + if (tmp != NULL) fclose ( tmp ); + return exists; +} + + +/*---------------------------------------------*/ +/* Open an output file safely with O_EXCL and good permissions. + This avoids a race condition in versions < 1.0.2, in which + the file was first opened and then had its interim permissions + set safely. We instead use open() to create the file with + the interim permissions required. (--- --- rw-). + + For non-Unix platforms, if we are not worrying about + security issues, simple this simply behaves like fopen. +*/ +static +FILE* fopen_output_safely ( Char* name, const char* mode ) +{ +# if BZ_UNIX + FILE* fp; + IntNative fh; + fh = open(name, O_WRONLY|O_CREAT|O_EXCL, S_IWUSR|S_IRUSR); + if (fh == -1) return NULL; + fp = fdopen(fh, mode); + if (fp == NULL) close(fh); + return fp; +# else + return fopen(name, mode); +# endif +} + + +/*---------------------------------------------*/ +/*-- + if in doubt, return True +--*/ +static +Bool notAStandardFile ( Char* name ) +{ + IntNative i; + struct MY_STAT statBuf; + + i = MY_LSTAT ( name, &statBuf ); + if (i != 0) return True; + if (MY_S_ISREG(statBuf.st_mode)) return False; + return True; +} + + +/*---------------------------------------------*/ +/*-- + rac 11/21/98 see if file has hard links to it +--*/ +static +Int32 countHardLinks ( Char* name ) +{ + IntNative i; + struct MY_STAT statBuf; + + i = MY_LSTAT ( name, &statBuf ); + if (i != 0) return 0; + return (statBuf.st_nlink - 1); +} + + +/*---------------------------------------------*/ +/* Copy modification date, access date, permissions and owner from the + source to destination file. We have to copy this meta-info off + into fileMetaInfo before starting to compress / decompress it, + because doing it afterwards means we get the wrong access time. + + To complicate matters, in compress() and decompress() below, the + sequence of tests preceding the call to saveInputFileMetaInfo() + involves calling fileExists(), which in turn establishes its result + by attempting to fopen() the file, and if successful, immediately + fclose()ing it again. So we have to assume that the fopen() call + does not cause the access time field to be updated. + + Reading of the man page for stat() (man 2 stat) on RedHat 7.2 seems + to imply that merely doing open() will not affect the access time. + Therefore we merely need to hope that the C library only does + open() as a result of fopen(), and not any kind of read()-ahead + cleverness. + + It sounds pretty fragile to me. Whether this carries across + robustly to arbitrary Unix-like platforms (or even works robustly + on this one, RedHat 7.2) is unknown to me. Nevertheless ... +*/ +#if BZ_UNIX +static +struct MY_STAT fileMetaInfo; +#endif + +static +void saveInputFileMetaInfo ( Char *srcName ) +{ +# if BZ_UNIX + IntNative retVal; + /* Note use of stat here, not lstat. */ + retVal = MY_STAT( srcName, &fileMetaInfo ); + ERROR_IF_NOT_ZERO ( retVal ); +# endif +} + + +static +void applySavedTimeInfoToOutputFile ( Char *dstName ) +{ +# if BZ_UNIX + IntNative retVal; + struct utimbuf uTimBuf; + + uTimBuf.actime = fileMetaInfo.st_atime; + uTimBuf.modtime = fileMetaInfo.st_mtime; + + retVal = utime ( dstName, &uTimBuf ); + ERROR_IF_NOT_ZERO ( retVal ); +# endif +} + +static +void applySavedFileAttrToOutputFile ( IntNative fd ) +{ +# if BZ_UNIX + IntNative retVal; + + retVal = fchmod ( fd, fileMetaInfo.st_mode ); + ERROR_IF_NOT_ZERO ( retVal ); + + (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); + /* chown() will in many cases return with EPERM, which can + be safely ignored. + */ +# endif +} + + +/*---------------------------------------------*/ +static +Bool containsDubiousChars ( Char* name ) +{ +# if BZ_UNIX + /* On unix, files can contain any characters and the file expansion + * is performed by the shell. + */ + return False; +# else /* ! BZ_UNIX */ + /* On non-unix (Win* platforms), wildcard characters are not allowed in + * filenames. + */ + for (; *name != '\0'; name++) + if (*name == '?' || *name == '*') return True; + return False; +# endif /* BZ_UNIX */ +} + + +/*---------------------------------------------*/ +#define BZ_N_SUFFIX_PAIRS 4 + +const Char* zSuffix[BZ_N_SUFFIX_PAIRS] + = { ".bz2", ".bz", ".tbz2", ".tbz" }; +const Char* unzSuffix[BZ_N_SUFFIX_PAIRS] + = { "", "", ".tar", ".tar" }; + +static +Bool hasSuffix ( Char* s, const Char* suffix ) +{ + Int32 ns = strlen(s); + Int32 nx = strlen(suffix); + if (ns < nx) return False; + if (strcmp(s + ns - nx, suffix) == 0) return True; + return False; +} + +static +Bool mapSuffix ( Char* name, + const Char* oldSuffix, + const Char* newSuffix ) +{ + if (!hasSuffix(name,oldSuffix)) return False; + name[strlen(name)-strlen(oldSuffix)] = 0; + strcat ( name, newSuffix ); + return True; +} + + +/*---------------------------------------------*/ +static +void compress ( Char *name ) +{ + FILE *inStr; + FILE *outStr; + Int32 n, i; + struct MY_STAT statBuf; + + deleteOutputOnInterrupt = False; + + if (name == NULL && srcMode != SM_I2O) + panic ( "compress: bad modes\n" ); + + switch (srcMode) { + case SM_I2O: + copyFileName ( inName, (Char*)"(stdin)" ); + copyFileName ( outName, (Char*)"(stdout)" ); + break; + case SM_F2F: + copyFileName ( inName, name ); + copyFileName ( outName, name ); + strcat ( outName, ".bz2" ); + break; + case SM_F2O: + copyFileName ( inName, name ); + copyFileName ( outName, (Char*)"(stdout)" ); + break; + } + + if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) { + if (noisy) + fprintf ( stderr, "%s: There are no files matching `%s'.\n", + progName, inName ); + setExit(1); + return; + } + if ( srcMode != SM_I2O && !fileExists ( inName ) ) { + fprintf ( stderr, "%s: Can't open input file %s: %s.\n", + progName, inName, strerror(errno) ); + setExit(1); + return; + } + for (i = 0; i < BZ_N_SUFFIX_PAIRS; i++) { + if (hasSuffix(inName, zSuffix[i])) { + if (noisy) + fprintf ( stderr, + "%s: Input file %s already has %s suffix.\n", + progName, inName, zSuffix[i] ); + setExit(1); + return; + } + } + if ( srcMode == SM_F2F || srcMode == SM_F2O ) { + MY_STAT(inName, &statBuf); + if ( MY_S_ISDIR(statBuf.st_mode) ) { + fprintf( stderr, + "%s: Input file %s is a directory.\n", + progName,inName); + setExit(1); + return; + } + } + if ( srcMode == SM_F2F && !forceOverwrite && notAStandardFile ( inName )) { + if (noisy) + fprintf ( stderr, "%s: Input file %s is not a normal file.\n", + progName, inName ); + setExit(1); + return; + } + if ( srcMode == SM_F2F && fileExists ( outName ) ) { + if (forceOverwrite) { + remove(outName); + } else { + fprintf ( stderr, "%s: Output file %s already exists.\n", + progName, outName ); + setExit(1); + return; + } + } + if ( srcMode == SM_F2F && !forceOverwrite && + (n=countHardLinks ( inName )) > 0) { + fprintf ( stderr, "%s: Input file %s has %d other link%s.\n", + progName, inName, n, n > 1 ? "s" : "" ); + setExit(1); + return; + } + + if ( srcMode == SM_F2F ) { + /* Save the file's meta-info before we open it. Doing it later + means we mess up the access times. */ + saveInputFileMetaInfo ( inName ); + } + + switch ( srcMode ) { + + case SM_I2O: + inStr = stdin; + outStr = stdout; + if ( isatty ( fileno ( stdout ) ) ) { + fprintf ( stderr, + "%s: I won't write compressed data to a terminal.\n", + progName ); + fprintf ( stderr, "%s: For help, type: `%s --help'.\n", + progName, progName ); + setExit(1); + return; + }; + break; + + case SM_F2O: + inStr = fopen ( inName, "rb" ); + outStr = stdout; + if ( isatty ( fileno ( stdout ) ) ) { + fprintf ( stderr, + "%s: I won't write compressed data to a terminal.\n", + progName ); + fprintf ( stderr, "%s: For help, type: `%s --help'.\n", + progName, progName ); + if ( inStr != NULL ) fclose ( inStr ); + setExit(1); + return; + }; + if ( inStr == NULL ) { + fprintf ( stderr, "%s: Can't open input file %s: %s.\n", + progName, inName, strerror(errno) ); + setExit(1); + return; + }; + break; + + case SM_F2F: + inStr = fopen ( inName, "rb" ); + outStr = fopen_output_safely ( outName, "wb" ); + if ( outStr == NULL) { + fprintf ( stderr, "%s: Can't create output file %s: %s.\n", + progName, outName, strerror(errno) ); + if ( inStr != NULL ) fclose ( inStr ); + setExit(1); + return; + } + if ( inStr == NULL ) { + fprintf ( stderr, "%s: Can't open input file %s: %s.\n", + progName, inName, strerror(errno) ); + if ( outStr != NULL ) fclose ( outStr ); + setExit(1); + return; + }; + break; + + default: + panic ( "compress: bad srcMode" ); + break; + } + + if (verbosity >= 1) { + fprintf ( stderr, " %s: ", inName ); + pad ( inName ); + fflush ( stderr ); + } + + /*--- Now the input and output handles are sane. Do the Biz. ---*/ + outputHandleJustInCase = outStr; + deleteOutputOnInterrupt = True; + compressStream ( inStr, outStr ); + outputHandleJustInCase = NULL; + + /*--- If there was an I/O error, we won't get here. ---*/ + if ( srcMode == SM_F2F ) { + applySavedTimeInfoToOutputFile ( outName ); + deleteOutputOnInterrupt = False; + if ( !keepInputFiles ) { + IntNative retVal = remove ( inName ); + ERROR_IF_NOT_ZERO ( retVal ); + } + } + + deleteOutputOnInterrupt = False; +} + + +/*---------------------------------------------*/ +static +void uncompress ( Char *name ) +{ + FILE *inStr; + FILE *outStr; + Int32 n, i; + Bool magicNumberOK; + Bool cantGuess; + struct MY_STAT statBuf; + + deleteOutputOnInterrupt = False; + + if (name == NULL && srcMode != SM_I2O) + panic ( "uncompress: bad modes\n" ); + + cantGuess = False; + switch (srcMode) { + case SM_I2O: + copyFileName ( inName, (Char*)"(stdin)" ); + copyFileName ( outName, (Char*)"(stdout)" ); + break; + case SM_F2F: + copyFileName ( inName, name ); + copyFileName ( outName, name ); + for (i = 0; i < BZ_N_SUFFIX_PAIRS; i++) + if (mapSuffix(outName,zSuffix[i],unzSuffix[i])) + goto zzz; + cantGuess = True; + strcat ( outName, ".out" ); + break; + case SM_F2O: + copyFileName ( inName, name ); + copyFileName ( outName, (Char*)"(stdout)" ); + break; + } + + zzz: + if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) { + if (noisy) + fprintf ( stderr, "%s: There are no files matching `%s'.\n", + progName, inName ); + setExit(1); + return; + } + if ( srcMode != SM_I2O && !fileExists ( inName ) ) { + fprintf ( stderr, "%s: Can't open input file %s: %s.\n", + progName, inName, strerror(errno) ); + setExit(1); + return; + } + if ( srcMode == SM_F2F || srcMode == SM_F2O ) { + MY_STAT(inName, &statBuf); + if ( MY_S_ISDIR(statBuf.st_mode) ) { + fprintf( stderr, + "%s: Input file %s is a directory.\n", + progName,inName); + setExit(1); + return; + } + } + if ( srcMode == SM_F2F && !forceOverwrite && notAStandardFile ( inName )) { + if (noisy) + fprintf ( stderr, "%s: Input file %s is not a normal file.\n", + progName, inName ); + setExit(1); + return; + } + if ( /* srcMode == SM_F2F implied && */ cantGuess ) { + if (noisy) + fprintf ( stderr, + "%s: Can't guess original name for %s -- using %s\n", + progName, inName, outName ); + /* just a warning, no return */ + } + if ( srcMode == SM_F2F && fileExists ( outName ) ) { + if (forceOverwrite) { + remove(outName); + } else { + fprintf ( stderr, "%s: Output file %s already exists.\n", + progName, outName ); + setExit(1); + return; + } + } + if ( srcMode == SM_F2F && !forceOverwrite && + (n=countHardLinks ( inName ) ) > 0) { + fprintf ( stderr, "%s: Input file %s has %d other link%s.\n", + progName, inName, n, n > 1 ? "s" : "" ); + setExit(1); + return; + } + + if ( srcMode == SM_F2F ) { + /* Save the file's meta-info before we open it. Doing it later + means we mess up the access times. */ + saveInputFileMetaInfo ( inName ); + } + + switch ( srcMode ) { + + case SM_I2O: + inStr = stdin; + outStr = stdout; + if ( isatty ( fileno ( stdin ) ) ) { + fprintf ( stderr, + "%s: I won't read compressed data from a terminal.\n", + progName ); + fprintf ( stderr, "%s: For help, type: `%s --help'.\n", + progName, progName ); + setExit(1); + return; + }; + break; + + case SM_F2O: + inStr = fopen ( inName, "rb" ); + outStr = stdout; + if ( inStr == NULL ) { + fprintf ( stderr, "%s: Can't open input file %s:%s.\n", + progName, inName, strerror(errno) ); + if ( inStr != NULL ) fclose ( inStr ); + setExit(1); + return; + }; + break; + + case SM_F2F: + inStr = fopen ( inName, "rb" ); + outStr = fopen_output_safely ( outName, "wb" ); + if ( outStr == NULL) { + fprintf ( stderr, "%s: Can't create output file %s: %s.\n", + progName, outName, strerror(errno) ); + if ( inStr != NULL ) fclose ( inStr ); + setExit(1); + return; + } + if ( inStr == NULL ) { + fprintf ( stderr, "%s: Can't open input file %s: %s.\n", + progName, inName, strerror(errno) ); + if ( outStr != NULL ) fclose ( outStr ); + setExit(1); + return; + }; + break; + + default: + panic ( "uncompress: bad srcMode" ); + break; + } + + if (verbosity >= 1) { + fprintf ( stderr, " %s: ", inName ); + pad ( inName ); + fflush ( stderr ); + } + + /*--- Now the input and output handles are sane. Do the Biz. ---*/ + outputHandleJustInCase = outStr; + deleteOutputOnInterrupt = True; + magicNumberOK = uncompressStream ( inStr, outStr ); + outputHandleJustInCase = NULL; + + /*--- If there was an I/O error, we won't get here. ---*/ + if ( magicNumberOK ) { + if ( srcMode == SM_F2F ) { + applySavedTimeInfoToOutputFile ( outName ); + deleteOutputOnInterrupt = False; + if ( !keepInputFiles ) { + IntNative retVal = remove ( inName ); + ERROR_IF_NOT_ZERO ( retVal ); + } + } + } else { + unzFailsExist = True; + deleteOutputOnInterrupt = False; + if ( srcMode == SM_F2F ) { + IntNative retVal = remove ( outName ); + ERROR_IF_NOT_ZERO ( retVal ); + } + } + deleteOutputOnInterrupt = False; + + if ( magicNumberOK ) { + if (verbosity >= 1) + fprintf ( stderr, "done\n" ); + } else { + setExit(2); + if (verbosity >= 1) + fprintf ( stderr, "not a bzip2 file.\n" ); else + fprintf ( stderr, + "%s: %s is not a bzip2 file.\n", + progName, inName ); + } + +} + + +/*---------------------------------------------*/ +static +void testf ( Char *name ) +{ + FILE *inStr; + Bool allOK; + struct MY_STAT statBuf; + + deleteOutputOnInterrupt = False; + + if (name == NULL && srcMode != SM_I2O) + panic ( "testf: bad modes\n" ); + + copyFileName ( outName, (Char*)"(none)" ); + switch (srcMode) { + case SM_I2O: copyFileName ( inName, (Char*)"(stdin)" ); break; + case SM_F2F: copyFileName ( inName, name ); break; + case SM_F2O: copyFileName ( inName, name ); break; + } + + if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) { + if (noisy) + fprintf ( stderr, "%s: There are no files matching `%s'.\n", + progName, inName ); + setExit(1); + return; + } + if ( srcMode != SM_I2O && !fileExists ( inName ) ) { + fprintf ( stderr, "%s: Can't open input %s: %s.\n", + progName, inName, strerror(errno) ); + setExit(1); + return; + } + if ( srcMode != SM_I2O ) { + MY_STAT(inName, &statBuf); + if ( MY_S_ISDIR(statBuf.st_mode) ) { + fprintf( stderr, + "%s: Input file %s is a directory.\n", + progName,inName); + setExit(1); + return; + } + } + + switch ( srcMode ) { + + case SM_I2O: + if ( isatty ( fileno ( stdin ) ) ) { + fprintf ( stderr, + "%s: I won't read compressed data from a terminal.\n", + progName ); + fprintf ( stderr, "%s: For help, type: `%s --help'.\n", + progName, progName ); + setExit(1); + return; + }; + inStr = stdin; + break; + + case SM_F2O: case SM_F2F: + inStr = fopen ( inName, "rb" ); + if ( inStr == NULL ) { + fprintf ( stderr, "%s: Can't open input file %s:%s.\n", + progName, inName, strerror(errno) ); + setExit(1); + return; + }; + break; + + default: + panic ( "testf: bad srcMode" ); + break; + } + + if (verbosity >= 1) { + fprintf ( stderr, " %s: ", inName ); + pad ( inName ); + fflush ( stderr ); + } + + /*--- Now the input handle is sane. Do the Biz. ---*/ + outputHandleJustInCase = NULL; + allOK = testStream ( inStr ); + + if (allOK && verbosity >= 1) fprintf ( stderr, "ok\n" ); + if (!allOK) testFailsExist = True; +} + + +/*---------------------------------------------*/ +static +void license ( void ) +{ + fprintf ( stderr, + + "bzip2, a block-sorting file compressor. " + "Version %s.\n" + " \n" + " Copyright (C) 1996-2010 by Julian Seward.\n" + " \n" + " This program is free software; you can redistribute it and/or modify\n" + " it under the terms set out in the LICENSE file, which is included\n" + " in the bzip2-1.0.6 source distribution.\n" + " \n" + " This program is distributed in the hope that it will be useful,\n" + " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " LICENSE file for more details.\n" + " \n", + BZ2_bzlibVersion() + ); +} + + +/*---------------------------------------------*/ +static +void usage ( Char *fullProgName ) +{ + fprintf ( + stderr, + "bzip2, a block-sorting file compressor. " + "Version %s.\n" + "\n usage: %s [flags and input files in any order]\n" + "\n" + " -h --help print this message\n" + " -d --decompress force decompression\n" + " -z --compress force compression\n" + " -k --keep keep (don't delete) input files\n" + " -f --force overwrite existing output files\n" + " -t --test test compressed file integrity\n" + " -c --stdout output to standard out\n" + " -q --quiet suppress noncritical error messages\n" + " -v --verbose be verbose (a 2nd -v gives more)\n" + " -L --license display software version & license\n" + " -V --version display software version & license\n" + " -s --small use less memory (at most 2500k)\n" + " -1 .. -9 set block size to 100k .. 900k\n" + " --fast alias for -1\n" + " --best alias for -9\n" + "\n" + " If invoked as `bzip2', default action is to compress.\n" + " as `bunzip2', default action is to decompress.\n" + " as `bzcat', default action is to decompress to stdout.\n" + "\n" + " If no file names are given, bzip2 compresses or decompresses\n" + " from standard input to standard output. You can combine\n" + " short flags, so `-v -4' means the same as -v4 or -4v, &c.\n" +# if BZ_UNIX + "\n" +# endif + , + + BZ2_bzlibVersion(), + fullProgName + ); +} + + +/*---------------------------------------------*/ +static +void redundant ( Char* flag ) +{ + fprintf ( + stderr, + "%s: %s is redundant in versions 0.9.5 and above\n", + progName, flag ); +} + + +/*---------------------------------------------*/ +/*-- + All the garbage from here to main() is purely to + implement a linked list of command-line arguments, + into which main() copies argv[1 .. argc-1]. + + The purpose of this exercise is to facilitate + the expansion of wildcard characters * and ? in + filenames for OSs which don't know how to do it + themselves, like MSDOS, Windows 95 and NT. + + The actual Dirty Work is done by the platform- + specific macro APPEND_FILESPEC. +--*/ + +typedef + struct zzzz { + Char *name; + struct zzzz *link; + } + Cell; + + +/*---------------------------------------------*/ +static +void *myMalloc ( Int32 n ) +{ + void* p; + + p = malloc ( (size_t)n ); + if (p == NULL) outOfMemory (); + return p; +} + + +/*---------------------------------------------*/ +static +Cell *mkCell ( void ) +{ + Cell *c; + + c = (Cell*) myMalloc ( sizeof ( Cell ) ); + c->name = NULL; + c->link = NULL; + return c; +} + + +/*---------------------------------------------*/ +static +Cell *snocString ( Cell *root, Char *name ) +{ + if (root == NULL) { + Cell *tmp = mkCell(); + tmp->name = (Char*) myMalloc ( 5 + strlen(name) ); + strcpy ( tmp->name, name ); + return tmp; + } else { + Cell *tmp = root; + while (tmp->link != NULL) tmp = tmp->link; + tmp->link = snocString ( tmp->link, name ); + return root; + } +} + + +/*---------------------------------------------*/ +static +void addFlagsFromEnvVar ( Cell** argList, Char* varName ) +{ + Int32 i, j, k; + Char *envbase, *p; + + envbase = getenv(varName); + if (envbase != NULL) { + p = envbase; + i = 0; + while (True) { + if (p[i] == 0) break; + p += i; + i = 0; + while (isspace((Int32)(p[0]))) p++; + while (p[i] != 0 && !isspace((Int32)(p[i]))) i++; + if (i > 0) { + k = i; if (k > FILE_NAME_LEN-10) k = FILE_NAME_LEN-10; + for (j = 0; j < k; j++) tmpName[j] = p[j]; + tmpName[k] = 0; + APPEND_FLAG(*argList, tmpName); + } + } + } +} + + +/*---------------------------------------------*/ +#define ISFLAG(s) (strcmp(aa->name, (s))==0) + +IntNative main ( IntNative argc, Char *argv[] ) +{ + Int32 i, j; + Char *tmp; + Cell *argList; + Cell *aa; + Bool decode; + + /*-- Be really really really paranoid :-) --*/ + if (sizeof(Int32) != 4 || sizeof(UInt32) != 4 || + sizeof(Int16) != 2 || sizeof(UInt16) != 2 || + sizeof(Char) != 1 || sizeof(UChar) != 1) + configError(); + + /*-- Initialise --*/ + outputHandleJustInCase = NULL; + smallMode = False; + keepInputFiles = False; + forceOverwrite = False; + noisy = True; + verbosity = 0; + blockSize100k = 9; + testFailsExist = False; + unzFailsExist = False; + numFileNames = 0; + numFilesProcessed = 0; + workFactor = 30; + deleteOutputOnInterrupt = False; + exitValue = 0; + i = j = 0; /* avoid bogus warning from egcs-1.1.X */ + + /*-- Set up signal handlers for mem access errors --*/ + signal (SIGSEGV, mySIGSEGVorSIGBUScatcher); +# if BZ_UNIX +# ifndef __DJGPP__ + signal (SIGBUS, mySIGSEGVorSIGBUScatcher); +# endif +# endif + + copyFileName ( inName, (Char*)"(none)" ); + copyFileName ( outName, (Char*)"(none)" ); + + copyFileName ( progNameReally, argv[0] ); + progName = &progNameReally[0]; + for (tmp = &progNameReally[0]; *tmp != '\0'; tmp++) + if (*tmp == PATH_SEP) progName = tmp + 1; + + + /*-- Copy flags from env var BZIP2, and + expand filename wildcards in arg list. + --*/ + argList = NULL; + addFlagsFromEnvVar ( &argList, (Char*)"BZIP2" ); + addFlagsFromEnvVar ( &argList, (Char*)"BZIP" ); + for (i = 1; i <= argc-1; i++) + APPEND_FILESPEC(argList, argv[i]); + + + /*-- Find the length of the longest filename --*/ + longestFileName = 7; + numFileNames = 0; + decode = True; + for (aa = argList; aa != NULL; aa = aa->link) { + if (ISFLAG("--")) { decode = False; continue; } + if (aa->name[0] == '-' && decode) continue; + numFileNames++; + if (longestFileName < (Int32)strlen(aa->name) ) + longestFileName = (Int32)strlen(aa->name); + } + + + /*-- Determine source modes; flag handling may change this too. --*/ + if (numFileNames == 0) + srcMode = SM_I2O; else srcMode = SM_F2F; + + + /*-- Determine what to do (compress/uncompress/test/cat). --*/ + /*-- Note that subsequent flag handling may change this. --*/ + opMode = OM_Z; + + if ( (strstr ( progName, "unzip" ) != 0) || + (strstr ( progName, "UNZIP" ) != 0) ) + opMode = OM_UNZ; + + if ( (strstr ( progName, "z2cat" ) != 0) || + (strstr ( progName, "Z2CAT" ) != 0) || + (strstr ( progName, "zcat" ) != 0) || + (strstr ( progName, "ZCAT" ) != 0) ) { + opMode = OM_UNZ; + srcMode = (numFileNames == 0) ? SM_I2O : SM_F2O; + } + + + /*-- Look at the flags. --*/ + for (aa = argList; aa != NULL; aa = aa->link) { + if (ISFLAG("--")) break; + if (aa->name[0] == '-' && aa->name[1] != '-') { + for (j = 1; aa->name[j] != '\0'; j++) { + switch (aa->name[j]) { + case 'c': srcMode = SM_F2O; break; + case 'd': opMode = OM_UNZ; break; + case 'z': opMode = OM_Z; break; + case 'f': forceOverwrite = True; break; + case 't': opMode = OM_TEST; break; + case 'k': keepInputFiles = True; break; + case 's': smallMode = True; break; + case 'q': noisy = False; break; + case '1': blockSize100k = 1; break; + case '2': blockSize100k = 2; break; + case '3': blockSize100k = 3; break; + case '4': blockSize100k = 4; break; + case '5': blockSize100k = 5; break; + case '6': blockSize100k = 6; break; + case '7': blockSize100k = 7; break; + case '8': blockSize100k = 8; break; + case '9': blockSize100k = 9; break; + case 'V': + case 'L': license(); break; + case 'v': verbosity++; break; + case 'h': usage ( progName ); + exit ( 0 ); + break; + default: fprintf ( stderr, "%s: Bad flag `%s'\n", + progName, aa->name ); + usage ( progName ); + exit ( 1 ); + break; + } + } + } + } + + /*-- And again ... --*/ + for (aa = argList; aa != NULL; aa = aa->link) { + if (ISFLAG("--")) break; + if (ISFLAG("--stdout")) srcMode = SM_F2O; else + if (ISFLAG("--decompress")) opMode = OM_UNZ; else + if (ISFLAG("--compress")) opMode = OM_Z; else + if (ISFLAG("--force")) forceOverwrite = True; else + if (ISFLAG("--test")) opMode = OM_TEST; else + if (ISFLAG("--keep")) keepInputFiles = True; else + if (ISFLAG("--small")) smallMode = True; else + if (ISFLAG("--quiet")) noisy = False; else + if (ISFLAG("--version")) license(); else + if (ISFLAG("--license")) license(); else + if (ISFLAG("--exponential")) workFactor = 1; else + if (ISFLAG("--repetitive-best")) redundant(aa->name); else + if (ISFLAG("--repetitive-fast")) redundant(aa->name); else + if (ISFLAG("--fast")) blockSize100k = 1; else + if (ISFLAG("--best")) blockSize100k = 9; else + if (ISFLAG("--verbose")) verbosity++; else + if (ISFLAG("--help")) { usage ( progName ); exit ( 0 ); } + else + if (strncmp ( aa->name, "--", 2) == 0) { + fprintf ( stderr, "%s: Bad flag `%s'\n", progName, aa->name ); + usage ( progName ); + exit ( 1 ); + } + } + + if (verbosity > 4) verbosity = 4; + if (opMode == OM_Z && smallMode && blockSize100k > 2) + blockSize100k = 2; + + if (opMode == OM_TEST && srcMode == SM_F2O) { + fprintf ( stderr, "%s: -c and -t cannot be used together.\n", + progName ); + exit ( 1 ); + } + + if (srcMode == SM_F2O && numFileNames == 0) + srcMode = SM_I2O; + + if (opMode != OM_Z) blockSize100k = 0; + + if (srcMode == SM_F2F) { + signal (SIGINT, mySignalCatcher); + signal (SIGTERM, mySignalCatcher); +# if BZ_UNIX + signal (SIGHUP, mySignalCatcher); +# endif + } + + if (opMode == OM_Z) { + if (srcMode == SM_I2O) { + compress ( NULL ); + } else { + decode = True; + for (aa = argList; aa != NULL; aa = aa->link) { + if (ISFLAG("--")) { decode = False; continue; } + if (aa->name[0] == '-' && decode) continue; + numFilesProcessed++; + compress ( aa->name ); + } + } + } + else + + if (opMode == OM_UNZ) { + unzFailsExist = False; + if (srcMode == SM_I2O) { + uncompress ( NULL ); + } else { + decode = True; + for (aa = argList; aa != NULL; aa = aa->link) { + if (ISFLAG("--")) { decode = False; continue; } + if (aa->name[0] == '-' && decode) continue; + numFilesProcessed++; + uncompress ( aa->name ); + } + } + if (unzFailsExist) { + setExit(2); + exit(exitValue); + } + } + + else { + testFailsExist = False; + if (srcMode == SM_I2O) { + testf ( NULL ); + } else { + decode = True; + for (aa = argList; aa != NULL; aa = aa->link) { + if (ISFLAG("--")) { decode = False; continue; } + if (aa->name[0] == '-' && decode) continue; + numFilesProcessed++; + testf ( aa->name ); + } + } + if (testFailsExist && noisy) { + fprintf ( stderr, + "\n" + "You can use the `bzip2recover' program to attempt to recover\n" + "data from undamaged sections of corrupted files.\n\n" + ); + setExit(2); + exit(exitValue); + } + } + + /* Free the argument list memory to mollify leak detectors + (eg) Purify, Checker. Serves no other useful purpose. + */ + aa = argList; + while (aa != NULL) { + Cell* aa2 = aa->link; + if (aa->name != NULL) free(aa->name); + free(aa); + aa = aa2; + } + + return exitValue; +} + + +/*-----------------------------------------------------------*/ +/*--- end bzip2.c ---*/ +/*-----------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.txt b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.txt new file mode 100644 index 0000000..d2deb39 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2.txt @@ -0,0 +1,391 @@ + +NAME + bzip2, bunzip2 - a block-sorting file compressor, v1.0.6 + bzcat - decompresses files to stdout + bzip2recover - recovers data from damaged bzip2 files + + +SYNOPSIS + bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ] + bunzip2 [ -fkvsVL ] [ filenames ... ] + bzcat [ -s ] [ filenames ... ] + bzip2recover filename + + +DESCRIPTION + bzip2 compresses files using the Burrows-Wheeler block + sorting text compression algorithm, and Huffman coding. + Compression is generally considerably better than that + achieved by more conventional LZ77/LZ78-based compressors, + and approaches the performance of the PPM family of sta- + tistical compressors. + + The command-line options are deliberately very similar to + those of GNU gzip, but they are not identical. + + bzip2 expects a list of file names to accompany the com- + mand-line flags. Each file is replaced by a compressed + version of itself, with the name "original_name.bz2". + Each compressed file has the same modification date, per- + missions, and, when possible, ownership as the correspond- + ing original, so that these properties can be correctly + restored at decompression time. File name handling is + naive in the sense that there is no mechanism for preserv- + ing original file names, permissions, ownerships or dates + in filesystems which lack these concepts, or have serious + file name length restrictions, such as MS-DOS. + + bzip2 and bunzip2 will by default not overwrite existing + files. If you want this to happen, specify the -f flag. + + If no file names are specified, bzip2 compresses from + standard input to standard output. In this case, bzip2 + will decline to write compressed output to a terminal, as + this would be entirely incomprehensible and therefore + pointless. + + bunzip2 (or bzip2 -d) decompresses all specified files. + Files which were not created by bzip2 will be detected and + ignored, and a warning issued. bzip2 attempts to guess + the filename for the decompressed file from that of the + compressed file as follows: + + filename.bz2 becomes filename + filename.bz becomes filename + filename.tbz2 becomes filename.tar + filename.tbz becomes filename.tar + anyothername becomes anyothername.out + + If the file does not end in one of the recognised endings, + .bz2, .bz, .tbz2 or .tbz, bzip2 complains that it cannot + guess the name of the original file, and uses the original + name with .out appended. + + As with compression, supplying no filenames causes decom- + pression from standard input to standard output. + + bunzip2 will correctly decompress a file which is the con- + catenation of two or more compressed files. The result is + the concatenation of the corresponding uncompressed files. + Integrity testing (-t) of concatenated compressed files is + also supported. + + You can also compress or decompress files to the standard + output by giving the -c flag. Multiple files may be com- + pressed and decompressed like this. The resulting outputs + are fed sequentially to stdout. Compression of multiple + files in this manner generates a stream containing multi- + ple compressed file representations. Such a stream can be + decompressed correctly only by bzip2 version 0.9.0 or + later. Earlier versions of bzip2 will stop after decom- + pressing the first file in the stream. + + bzcat (or bzip2 -dc) decompresses all specified files to + the standard output. + + bzip2 will read arguments from the environment variables + BZIP2 and BZIP, in that order, and will process them + before any arguments read from the command line. This + gives a convenient way to supply default arguments. + + Compression is always performed, even if the compressed + file is slightly larger than the original. Files of less + than about one hundred bytes tend to get larger, since the + compression mechanism has a constant overhead in the + region of 50 bytes. Random data (including the output of + most file compressors) is coded at about 8.05 bits per + byte, giving an expansion of around 0.5%. + + As a self-check for your protection, bzip2 uses 32-bit + CRCs to make sure that the decompressed version of a file + is identical to the original. This guards against corrup- + tion of the compressed data, and against undetected bugs + in bzip2 (hopefully very unlikely). The chances of data + corruption going undetected is microscopic, about one + chance in four billion for each file processed. Be aware, + though, that the check occurs upon decompression, so it + can only tell you that something is wrong. It can't help + you recover the original uncompressed data. You can use + bzip2recover to try to recover data from damaged files. + + Return values: 0 for a normal exit, 1 for environmental + problems (file not found, invalid flags, I/O errors, &c), + 2 to indicate a corrupt compressed file, 3 for an internal + consistency error (eg, bug) which caused bzip2 to panic. + + +OPTIONS + -c --stdout + Compress or decompress to standard output. + + -d --decompress + Force decompression. bzip2, bunzip2 and bzcat are + really the same program, and the decision about + what actions to take is done on the basis of which + name is used. This flag overrides that mechanism, + and forces bzip2 to decompress. + + -z --compress + The complement to -d: forces compression, + regardless of the invocation name. + + -t --test + Check integrity of the specified file(s), but don't + decompress them. This really performs a trial + decompression and throws away the result. + + -f --force + Force overwrite of output files. Normally, bzip2 + will not overwrite existing output files. Also + forces bzip2 to break hard links to files, which it + otherwise wouldn't do. + + bzip2 normally declines to decompress files which + don't have the correct magic header bytes. If + forced (-f), however, it will pass such files + through unmodified. This is how GNU gzip behaves. + + -k --keep + Keep (don't delete) input files during compression + or decompression. + + -s --small + Reduce memory usage, for compression, decompression + and testing. Files are decompressed and tested + using a modified algorithm which only requires 2.5 + bytes per block byte. This means any file can be + decompressed in 2300k of memory, albeit at about + half the normal speed. + + During compression, -s selects a block size of + 200k, which limits memory use to around the same + figure, at the expense of your compression ratio. + In short, if your machine is low on memory (8 + megabytes or less), use -s for everything. See + MEMORY MANAGEMENT below. + + -q --quiet + Suppress non-essential warning messages. Messages + pertaining to I/O errors and other critical events + will not be suppressed. + + -v --verbose + Verbose mode -- show the compression ratio for each + file processed. Further -v's increase the ver- + bosity level, spewing out lots of information which + is primarily of interest for diagnostic purposes. + + -L --license -V --version + Display the software version, license terms and + conditions. + + -1 (or --fast) to -9 (or --best) + Set the block size to 100 k, 200 k .. 900 k when + compressing. Has no effect when decompressing. + See MEMORY MANAGEMENT below. The --fast and --best + aliases are primarily for GNU gzip compatibility. + In particular, --fast doesn't make things signifi- + cantly faster. And --best merely selects the + default behaviour. + + -- Treats all subsequent arguments as file names, even + if they start with a dash. This is so you can han- + dle files with names beginning with a dash, for + example: bzip2 -- -myfilename. + + --repetitive-fast --repetitive-best + These flags are redundant in versions 0.9.5 and + above. They provided some coarse control over the + behaviour of the sorting algorithm in earlier ver- + sions, which was sometimes useful. 0.9.5 and above + have an improved algorithm which renders these + flags irrelevant. + + +MEMORY MANAGEMENT + bzip2 compresses large files in blocks. The block size + affects both the compression ratio achieved, and the + amount of memory needed for compression and decompression. + The flags -1 through -9 specify the block size to be + 100,000 bytes through 900,000 bytes (the default) respec- + tively. At decompression time, the block size used for + compression is read from the header of the compressed + file, and bunzip2 then allocates itself just enough memory + to decompress the file. Since block sizes are stored in + compressed files, it follows that the flags -1 to -9 are + irrelevant to and so ignored during decompression. + + Compression and decompression requirements, in bytes, can + be estimated as: + + Compression: 400k + ( 8 x block size ) + + Decompression: 100k + ( 4 x block size ), or + 100k + ( 2.5 x block size ) + + Larger block sizes give rapidly diminishing marginal + returns. Most of the compression comes from the first two + or three hundred k of block size, a fact worth bearing in + mind when using bzip2 on small machines. It is also + important to appreciate that the decompression memory + requirement is set at compression time by the choice of + block size. + + For files compressed with the default 900k block size, + bunzip2 will require about 3700 kbytes to decompress. To + support decompression of any file on a 4 megabyte machine, + bunzip2 has an option to decompress using approximately + half this amount of memory, about 2300 kbytes. Decompres- + sion speed is also halved, so you should use this option + only where necessary. The relevant flag is -s. + + In general, try and use the largest block size memory con- + straints allow, since that maximises the compression + achieved. Compression and decompression speed are virtu- + ally unaffected by block size. + + Another significant point applies to files which fit in a + single block -- that means most files you'd encounter + using a large block size. The amount of real memory + touched is proportional to the size of the file, since the + file is smaller than a block. For example, compressing a + file 20,000 bytes long with the flag -9 will cause the + compressor to allocate around 7600k of memory, but only + touch 400k + 20000 * 8 = 560 kbytes of it. Similarly, the + decompressor will allocate 3700k but only touch 100k + + 20000 * 4 = 180 kbytes. + + Here is a table which summarises the maximum memory usage + for different block sizes. Also recorded is the total + compressed size for 14 files of the Calgary Text Compres- + sion Corpus totalling 3,141,622 bytes. This column gives + some feel for how compression varies with block size. + These figures tend to understate the advantage of larger + block sizes for larger files, since the Corpus is domi- + nated by smaller files. + + Compress Decompress Decompress Corpus + Flag usage usage -s usage Size + + -1 1200k 500k 350k 914704 + -2 2000k 900k 600k 877703 + -3 2800k 1300k 850k 860338 + -4 3600k 1700k 1100k 846899 + -5 4400k 2100k 1350k 845160 + -6 5200k 2500k 1600k 838626 + -7 6100k 2900k 1850k 834096 + -8 6800k 3300k 2100k 828642 + -9 7600k 3700k 2350k 828642 + + +RECOVERING DATA FROM DAMAGED FILES + bzip2 compresses files in blocks, usually 900kbytes long. + Each block is handled independently. If a media or trans- + mission error causes a multi-block .bz2 file to become + damaged, it may be possible to recover data from the + undamaged blocks in the file. + + The compressed representation of each block is delimited + by a 48-bit pattern, which makes it possible to find the + block boundaries with reasonable certainty. Each block + also carries its own 32-bit CRC, so damaged blocks can be + distinguished from undamaged ones. + + bzip2recover is a simple program whose purpose is to + search for blocks in .bz2 files, and write each block out + into its own .bz2 file. You can then use bzip2 -t to test + the integrity of the resulting files, and decompress those + which are undamaged. + + bzip2recover takes a single argument, the name of the dam- + aged file, and writes a number of files + "rec00001file.bz2", "rec00002file.bz2", etc, containing + the extracted blocks. The output filenames are + designed so that the use of wildcards in subsequent pro- + cessing -- for example, "bzip2 -dc rec*file.bz2 > recov- + ered_data" -- processes the files in the correct order. + + bzip2recover should be of most use dealing with large .bz2 + files, as these will contain many blocks. It is clearly + futile to use it on damaged single-block files, since a + damaged block cannot be recovered. If you wish to min- + imise any potential data loss through media or transmis- + sion errors, you might consider compressing with a smaller + block size. + + +PERFORMANCE NOTES + The sorting phase of compression gathers together similar + strings in the file. Because of this, files containing + very long runs of repeated symbols, like "aabaabaabaab + ..." (repeated several hundred times) may compress more + slowly than normal. Versions 0.9.5 and above fare much + better than previous versions in this respect. The ratio + between worst-case and average-case compression time is in + the region of 10:1. For previous versions, this figure + was more like 100:1. You can use the -vvvv option to mon- + itor progress in great detail, if you want. + + Decompression speed is unaffected by these phenomena. + + bzip2 usually allocates several megabytes of memory to + operate in, and then charges all over it in a fairly ran- + dom fashion. This means that performance, both for com- + pressing and decompressing, is largely determined by the + speed at which your machine can service cache misses. + Because of this, small changes to the code to reduce the + miss rate have been observed to give disproportionately + large performance improvements. I imagine bzip2 will per- + form best on machines with very large caches. + + +CAVEATS + I/O error messages are not as helpful as they could be. + bzip2 tries hard to detect I/O errors and exit cleanly, + but the details of what the problem is sometimes seem + rather misleading. + + This manual page pertains to version 1.0.6 of bzip2. Com- + pressed data created by this version is entirely forwards + and backwards compatible with the previous public + releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, + 1.0.2 and above, but with the following exception: 0.9.0 + and above can correctly decompress multiple concatenated + compressed files. 0.1pl2 cannot do this; it will stop + after decompressing just the first file in the stream. + + bzip2recover versions prior to 1.0.2 used 32-bit integers + to represent bit positions in compressed files, so they + could not handle compressed files more than 512 megabytes + long. Versions 1.0.2 and above use 64-bit ints on some + platforms which support them (GNU supported targets, and + Windows). To establish whether or not bzip2recover was + built with such a limitation, run it without arguments. + In any event you can build yourself an unlimited version + if you can recompile it with MaybeUInt64 set to be an + unsigned 64-bit integer. + + +AUTHOR + Julian Seward, jsewardbzip.org. + + http://www.bzip.org + + The ideas embodied in bzip2 are due to (at least) the fol- + lowing people: Michael Burrows and David Wheeler (for the + block sorting transformation), David Wheeler (again, for + the Huffman coder), Peter Fenwick (for the structured cod- + ing model in the original bzip, and many refinements), and + Alistair Moffat, Radford Neal and Ian Witten (for the + arithmetic coder in the original bzip). I am much + indebted for their help, support and advice. See the man- + ual in the source distribution for pointers to sources of + documentation. Christian von Roques encouraged me to look + for faster sorting algorithms, so as to speed up compres- + sion. Bela Lubkin encouraged me to improve the worst-case + compression performance. Donna Robinson XMLised the docu- + mentation. The bz* scripts are derived from those of GNU + gzip. Many people sent patches, helped with portability + problems, lent machines, gave advice and were generally + helpful. + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2recover.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2recover.c new file mode 100644 index 0000000..f9de049 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzip2recover.c @@ -0,0 +1,514 @@ +/*-----------------------------------------------------------*/ +/*--- Block recoverer program for bzip2 ---*/ +/*--- bzip2recover.c ---*/ +/*-----------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + +/* This program is a complete hack and should be rewritten properly. + It isn't very complicated. */ + +#include <stdio.h> +#include <errno.h> +#include <stdlib.h> +#include <string.h> + + +/* This program records bit locations in the file to be recovered. + That means that if 64-bit ints are not supported, we will not + be able to recover .bz2 files over 512MB (2^32 bits) long. + On GNU supported platforms, we take advantage of the 64-bit + int support to circumvent this problem. Ditto MSVC. + + This change occurred in version 1.0.2; all prior versions have + the 512MB limitation. +*/ +#ifdef __GNUC__ + typedef unsigned long long int MaybeUInt64; +# define MaybeUInt64_FMT "%Lu" +#else +#ifdef _MSC_VER + typedef unsigned __int64 MaybeUInt64; +# define MaybeUInt64_FMT "%I64u" +#else + typedef unsigned int MaybeUInt64; +# define MaybeUInt64_FMT "%u" +#endif +#endif + +typedef unsigned int UInt32; +typedef int Int32; +typedef unsigned char UChar; +typedef char Char; +typedef unsigned char Bool; +#define True ((Bool)1) +#define False ((Bool)0) + + +#define BZ_MAX_FILENAME 2000 + +Char inFileName[BZ_MAX_FILENAME]; +Char outFileName[BZ_MAX_FILENAME]; +Char progName[BZ_MAX_FILENAME]; + +MaybeUInt64 bytesOut = 0; +MaybeUInt64 bytesIn = 0; + + +/*---------------------------------------------------*/ +/*--- Header bytes ---*/ +/*---------------------------------------------------*/ + +#define BZ_HDR_B 0x42 /* 'B' */ +#define BZ_HDR_Z 0x5a /* 'Z' */ +#define BZ_HDR_h 0x68 /* 'h' */ +#define BZ_HDR_0 0x30 /* '0' */ + + +/*---------------------------------------------------*/ +/*--- I/O errors ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------*/ +static void readError ( void ) +{ + fprintf ( stderr, + "%s: I/O error reading `%s', possible reason follows.\n", + progName, inFileName ); + perror ( progName ); + fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n", + progName ); + exit ( 1 ); +} + + +/*---------------------------------------------*/ +static void writeError ( void ) +{ + fprintf ( stderr, + "%s: I/O error reading `%s', possible reason follows.\n", + progName, inFileName ); + perror ( progName ); + fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n", + progName ); + exit ( 1 ); +} + + +/*---------------------------------------------*/ +static void mallocFail ( Int32 n ) +{ + fprintf ( stderr, + "%s: malloc failed on request for %d bytes.\n", + progName, n ); + fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n", + progName ); + exit ( 1 ); +} + + +/*---------------------------------------------*/ +static void tooManyBlocks ( Int32 max_handled_blocks ) +{ + fprintf ( stderr, + "%s: `%s' appears to contain more than %d blocks\n", + progName, inFileName, max_handled_blocks ); + fprintf ( stderr, + "%s: and cannot be handled. To fix, increase\n", + progName ); + fprintf ( stderr, + "%s: BZ_MAX_HANDLED_BLOCKS in bzip2recover.c, and recompile.\n", + progName ); + exit ( 1 ); +} + + + +/*---------------------------------------------------*/ +/*--- Bit stream I/O ---*/ +/*---------------------------------------------------*/ + +typedef + struct { + FILE* handle; + Int32 buffer; + Int32 buffLive; + Char mode; + } + BitStream; + + +/*---------------------------------------------*/ +static BitStream* bsOpenReadStream ( FILE* stream ) +{ + BitStream *bs = malloc ( sizeof(BitStream) ); + if (bs == NULL) mallocFail ( sizeof(BitStream) ); + bs->handle = stream; + bs->buffer = 0; + bs->buffLive = 0; + bs->mode = 'r'; + return bs; +} + + +/*---------------------------------------------*/ +static BitStream* bsOpenWriteStream ( FILE* stream ) +{ + BitStream *bs = malloc ( sizeof(BitStream) ); + if (bs == NULL) mallocFail ( sizeof(BitStream) ); + bs->handle = stream; + bs->buffer = 0; + bs->buffLive = 0; + bs->mode = 'w'; + return bs; +} + + +/*---------------------------------------------*/ +static void bsPutBit ( BitStream* bs, Int32 bit ) +{ + if (bs->buffLive == 8) { + Int32 retVal = putc ( (UChar) bs->buffer, bs->handle ); + if (retVal == EOF) writeError(); + bytesOut++; + bs->buffLive = 1; + bs->buffer = bit & 0x1; + } else { + bs->buffer = ( (bs->buffer << 1) | (bit & 0x1) ); + bs->buffLive++; + }; +} + + +/*---------------------------------------------*/ +/*-- + Returns 0 or 1, or 2 to indicate EOF. +--*/ +static Int32 bsGetBit ( BitStream* bs ) +{ + if (bs->buffLive > 0) { + bs->buffLive --; + return ( ((bs->buffer) >> (bs->buffLive)) & 0x1 ); + } else { + Int32 retVal = getc ( bs->handle ); + if ( retVal == EOF ) { + if (errno != 0) readError(); + return 2; + } + bs->buffLive = 7; + bs->buffer = retVal; + return ( ((bs->buffer) >> 7) & 0x1 ); + } +} + + +/*---------------------------------------------*/ +static void bsClose ( BitStream* bs ) +{ + Int32 retVal; + + if ( bs->mode == 'w' ) { + while ( bs->buffLive < 8 ) { + bs->buffLive++; + bs->buffer <<= 1; + }; + retVal = putc ( (UChar) (bs->buffer), bs->handle ); + if (retVal == EOF) writeError(); + bytesOut++; + retVal = fflush ( bs->handle ); + if (retVal == EOF) writeError(); + } + retVal = fclose ( bs->handle ); + if (retVal == EOF) { + if (bs->mode == 'w') writeError(); else readError(); + } + free ( bs ); +} + + +/*---------------------------------------------*/ +static void bsPutUChar ( BitStream* bs, UChar c ) +{ + Int32 i; + for (i = 7; i >= 0; i--) + bsPutBit ( bs, (((UInt32) c) >> i) & 0x1 ); +} + + +/*---------------------------------------------*/ +static void bsPutUInt32 ( BitStream* bs, UInt32 c ) +{ + Int32 i; + + for (i = 31; i >= 0; i--) + bsPutBit ( bs, (c >> i) & 0x1 ); +} + + +/*---------------------------------------------*/ +static Bool endsInBz2 ( Char* name ) +{ + Int32 n = strlen ( name ); + if (n <= 4) return False; + return + (name[n-4] == '.' && + name[n-3] == 'b' && + name[n-2] == 'z' && + name[n-1] == '2'); +} + + +/*---------------------------------------------------*/ +/*--- ---*/ +/*---------------------------------------------------*/ + +/* This logic isn't really right when it comes to Cygwin. */ +#ifdef _WIN32 +# define BZ_SPLIT_SYM '\\' /* path splitter on Windows platform */ +#else +# define BZ_SPLIT_SYM '/' /* path splitter on Unix platform */ +#endif + +#define BLOCK_HEADER_HI 0x00003141UL +#define BLOCK_HEADER_LO 0x59265359UL + +#define BLOCK_ENDMARK_HI 0x00001772UL +#define BLOCK_ENDMARK_LO 0x45385090UL + +/* Increase if necessary. However, a .bz2 file with > 50000 blocks + would have an uncompressed size of at least 40GB, so the chances + are low you'll need to up this. +*/ +#define BZ_MAX_HANDLED_BLOCKS 50000 + +MaybeUInt64 bStart [BZ_MAX_HANDLED_BLOCKS]; +MaybeUInt64 bEnd [BZ_MAX_HANDLED_BLOCKS]; +MaybeUInt64 rbStart[BZ_MAX_HANDLED_BLOCKS]; +MaybeUInt64 rbEnd [BZ_MAX_HANDLED_BLOCKS]; + +Int32 main ( Int32 argc, Char** argv ) +{ + FILE* inFile; + FILE* outFile; + BitStream* bsIn, *bsWr; + Int32 b, wrBlock, currBlock, rbCtr; + MaybeUInt64 bitsRead; + + UInt32 buffHi, buffLo, blockCRC; + Char* p; + + strcpy ( progName, argv[0] ); + inFileName[0] = outFileName[0] = 0; + + fprintf ( stderr, + "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); + + if (argc != 2) { + fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", + progName, progName ); + switch (sizeof(MaybeUInt64)) { + case 8: + fprintf(stderr, + "\trestrictions on size of recovered file: None\n"); + break; + case 4: + fprintf(stderr, + "\trestrictions on size of recovered file: 512 MB\n"); + fprintf(stderr, + "\tto circumvent, recompile with MaybeUInt64 as an\n" + "\tunsigned 64-bit int.\n"); + break; + default: + fprintf(stderr, + "\tsizeof(MaybeUInt64) is not 4 or 8 -- " + "configuration error.\n"); + break; + } + exit(1); + } + + if (strlen(argv[1]) >= BZ_MAX_FILENAME-20) { + fprintf ( stderr, + "%s: supplied filename is suspiciously (>= %d chars) long. Bye!\n", + progName, (int)strlen(argv[1]) ); + exit(1); + } + + strcpy ( inFileName, argv[1] ); + + inFile = fopen ( inFileName, "rb" ); + if (inFile == NULL) { + fprintf ( stderr, "%s: can't read `%s'\n", progName, inFileName ); + exit(1); + } + + bsIn = bsOpenReadStream ( inFile ); + fprintf ( stderr, "%s: searching for block boundaries ...\n", progName ); + + bitsRead = 0; + buffHi = buffLo = 0; + currBlock = 0; + bStart[currBlock] = 0; + + rbCtr = 0; + + while (True) { + b = bsGetBit ( bsIn ); + bitsRead++; + if (b == 2) { + if (bitsRead >= bStart[currBlock] && + (bitsRead - bStart[currBlock]) >= 40) { + bEnd[currBlock] = bitsRead-1; + if (currBlock > 0) + fprintf ( stderr, " block %d runs from " MaybeUInt64_FMT + " to " MaybeUInt64_FMT " (incomplete)\n", + currBlock, bStart[currBlock], bEnd[currBlock] ); + } else + currBlock--; + break; + } + buffHi = (buffHi << 1) | (buffLo >> 31); + buffLo = (buffLo << 1) | (b & 1); + if ( ( (buffHi & 0x0000ffff) == BLOCK_HEADER_HI + && buffLo == BLOCK_HEADER_LO) + || + ( (buffHi & 0x0000ffff) == BLOCK_ENDMARK_HI + && buffLo == BLOCK_ENDMARK_LO) + ) { + if (bitsRead > 49) { + bEnd[currBlock] = bitsRead-49; + } else { + bEnd[currBlock] = 0; + } + if (currBlock > 0 && + (bEnd[currBlock] - bStart[currBlock]) >= 130) { + fprintf ( stderr, " block %d runs from " MaybeUInt64_FMT + " to " MaybeUInt64_FMT "\n", + rbCtr+1, bStart[currBlock], bEnd[currBlock] ); + rbStart[rbCtr] = bStart[currBlock]; + rbEnd[rbCtr] = bEnd[currBlock]; + rbCtr++; + } + if (currBlock >= BZ_MAX_HANDLED_BLOCKS) + tooManyBlocks(BZ_MAX_HANDLED_BLOCKS); + currBlock++; + + bStart[currBlock] = bitsRead; + } + } + + bsClose ( bsIn ); + + /*-- identified blocks run from 1 to rbCtr inclusive. --*/ + + if (rbCtr < 1) { + fprintf ( stderr, + "%s: sorry, I couldn't find any block boundaries.\n", + progName ); + exit(1); + }; + + fprintf ( stderr, "%s: splitting into blocks\n", progName ); + + inFile = fopen ( inFileName, "rb" ); + if (inFile == NULL) { + fprintf ( stderr, "%s: can't open `%s'\n", progName, inFileName ); + exit(1); + } + bsIn = bsOpenReadStream ( inFile ); + + /*-- placate gcc's dataflow analyser --*/ + blockCRC = 0; bsWr = 0; + + bitsRead = 0; + outFile = NULL; + wrBlock = 0; + while (True) { + b = bsGetBit(bsIn); + if (b == 2) break; + buffHi = (buffHi << 1) | (buffLo >> 31); + buffLo = (buffLo << 1) | (b & 1); + if (bitsRead == 47+rbStart[wrBlock]) + blockCRC = (buffHi << 16) | (buffLo >> 16); + + if (outFile != NULL && bitsRead >= rbStart[wrBlock] + && bitsRead <= rbEnd[wrBlock]) { + bsPutBit ( bsWr, b ); + } + + bitsRead++; + + if (bitsRead == rbEnd[wrBlock]+1) { + if (outFile != NULL) { + bsPutUChar ( bsWr, 0x17 ); bsPutUChar ( bsWr, 0x72 ); + bsPutUChar ( bsWr, 0x45 ); bsPutUChar ( bsWr, 0x38 ); + bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); + bsPutUInt32 ( bsWr, blockCRC ); + bsClose ( bsWr ); + } + if (wrBlock >= rbCtr) break; + wrBlock++; + } else + if (bitsRead == rbStart[wrBlock]) { + /* Create the output file name, correctly handling leading paths. + (31.10.2001 by Sergey E. Kusikov) */ + Char* split; + Int32 ofs, k; + for (k = 0; k < BZ_MAX_FILENAME; k++) + outFileName[k] = 0; + strcpy (outFileName, inFileName); + split = strrchr (outFileName, BZ_SPLIT_SYM); + if (split == NULL) { + split = outFileName; + } else { + ++split; + } + /* Now split points to the start of the basename. */ + ofs = split - outFileName; + sprintf (split, "rec%5d", wrBlock+1); + for (p = split; *p != 0; p++) if (*p == ' ') *p = '0'; + strcat (outFileName, inFileName + ofs); + + if ( !endsInBz2(outFileName)) strcat ( outFileName, ".bz2" ); + + fprintf ( stderr, " writing block %d to `%s' ...\n", + wrBlock+1, outFileName ); + + outFile = fopen ( outFileName, "wb" ); + if (outFile == NULL) { + fprintf ( stderr, "%s: can't write `%s'\n", + progName, outFileName ); + exit(1); + } + bsWr = bsOpenWriteStream ( outFile ); + bsPutUChar ( bsWr, BZ_HDR_B ); + bsPutUChar ( bsWr, BZ_HDR_Z ); + bsPutUChar ( bsWr, BZ_HDR_h ); + bsPutUChar ( bsWr, BZ_HDR_0 + 9 ); + bsPutUChar ( bsWr, 0x31 ); bsPutUChar ( bsWr, 0x41 ); + bsPutUChar ( bsWr, 0x59 ); bsPutUChar ( bsWr, 0x26 ); + bsPutUChar ( bsWr, 0x53 ); bsPutUChar ( bsWr, 0x59 ); + } + } + + fprintf ( stderr, "%s: finished\n", progName ); + return 0; +} + + + +/*-----------------------------------------------------------*/ +/*--- end bzip2recover.c ---*/ +/*-----------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.c new file mode 100644 index 0000000..d85e734 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.c @@ -0,0 +1,1580 @@ + +/*-------------------------------------------------------------*/ +/*--- Library top-level functions. ---*/ +/*--- bzlib.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + +/* CHANGES + 0.9.0 -- original version. + 0.9.0a/b -- no changes in this file. + 0.9.0c -- made zero-length BZ_FLUSH work correctly in bzCompress(). + fixed bzWrite/bzRead to ignore zero-length requests. + fixed bzread to correctly handle read requests after EOF. + wrong parameter order in call to bzDecompressInit in + bzBuffToBuffDecompress. Fixed. +*/ + +#include "bzlib_private.h" + + +/*---------------------------------------------------*/ +/*--- Compression stuff ---*/ +/*---------------------------------------------------*/ + + +/*---------------------------------------------------*/ +#ifndef BZ_NO_STDIO +void BZ2_bz__AssertH__fail ( int errcode ) +{ + fprintf(stderr, + "\n\nbzip2/libbzip2: internal error number %d.\n" + "This is a bug in bzip2/libbzip2, %s.\n" + "Please report it to me at: jseward@bzip.org. If this happened\n" + "when you were using some program which uses libbzip2 as a\n" + "component, you should also report this bug to the author(s)\n" + "of that program. Please make an effort to report this bug;\n" + "timely and accurate bug reports eventually lead to higher\n" + "quality software. Thanks. Julian Seward, 10 December 2007.\n\n", + errcode, + BZ2_bzlibVersion() + ); + + if (errcode == 1007) { + fprintf(stderr, + "\n*** A special note about internal error number 1007 ***\n" + "\n" + "Experience suggests that a common cause of i.e. 1007\n" + "is unreliable memory or other hardware. The 1007 assertion\n" + "just happens to cross-check the results of huge numbers of\n" + "memory reads/writes, and so acts (unintendedly) as a stress\n" + "test of your memory system.\n" + "\n" + "I suggest the following: try compressing the file again,\n" + "possibly monitoring progress in detail with the -vv flag.\n" + "\n" + "* If the error cannot be reproduced, and/or happens at different\n" + " points in compression, you may have a flaky memory system.\n" + " Try a memory-test program. I have used Memtest86\n" + " (www.memtest86.com). At the time of writing it is free (GPLd).\n" + " Memtest86 tests memory much more thorougly than your BIOSs\n" + " power-on test, and may find failures that the BIOS doesn't.\n" + "\n" + "* If the error can be repeatably reproduced, this is a bug in\n" + " bzip2, and I would very much like to hear about it. Please\n" + " let me know, and, ideally, save a copy of the file causing the\n" + " problem -- without which I will be unable to investigate it.\n" + "\n" + ); + } + + exit(3); +} +#endif + + +/*---------------------------------------------------*/ +static +int bz_config_ok ( void ) +{ + if (sizeof(int) != 4) return 0; + if (sizeof(short) != 2) return 0; + if (sizeof(char) != 1) return 0; + return 1; +} + + +/*---------------------------------------------------*/ +static +void* default_bzalloc ( void* opaque, Int32 items, Int32 size ) +{ + void* v = malloc ( items * size ); + return v; +} + +static +void default_bzfree ( void* opaque, void* addr ) +{ + if (addr != NULL) free ( addr ); +} + + +/*---------------------------------------------------*/ +static +void prepare_new_block ( EState* s ) +{ + Int32 i; + s->nblock = 0; + s->numZ = 0; + s->state_out_pos = 0; + BZ_INITIALISE_CRC ( s->blockCRC ); + for (i = 0; i < 256; i++) s->inUse[i] = False; + s->blockNo++; +} + + +/*---------------------------------------------------*/ +static +void init_RL ( EState* s ) +{ + s->state_in_ch = 256; + s->state_in_len = 0; +} + + +static +Bool isempty_RL ( EState* s ) +{ + if (s->state_in_ch < 256 && s->state_in_len > 0) + return False; else + return True; +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzCompressInit) + ( bz_stream* strm, + int blockSize100k, + int verbosity, + int workFactor ) +{ + Int32 n; + EState* s; + + if (!bz_config_ok()) return BZ_CONFIG_ERROR; + + if (strm == NULL || + blockSize100k < 1 || blockSize100k > 9 || + workFactor < 0 || workFactor > 250) + return BZ_PARAM_ERROR; + + if (workFactor == 0) workFactor = 30; + if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; + if (strm->bzfree == NULL) strm->bzfree = default_bzfree; + + s = BZALLOC( sizeof(EState) ); + if (s == NULL) return BZ_MEM_ERROR; + s->strm = strm; + + s->arr1 = NULL; + s->arr2 = NULL; + s->ftab = NULL; + + n = 100000 * blockSize100k; + s->arr1 = BZALLOC( n * sizeof(UInt32) ); + s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) ); + s->ftab = BZALLOC( 65537 * sizeof(UInt32) ); + + if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) { + if (s->arr1 != NULL) BZFREE(s->arr1); + if (s->arr2 != NULL) BZFREE(s->arr2); + if (s->ftab != NULL) BZFREE(s->ftab); + if (s != NULL) BZFREE(s); + return BZ_MEM_ERROR; + } + + s->blockNo = 0; + s->state = BZ_S_INPUT; + s->mode = BZ_M_RUNNING; + s->combinedCRC = 0; + s->blockSize100k = blockSize100k; + s->nblockMAX = 100000 * blockSize100k - 19; + s->verbosity = verbosity; + s->workFactor = workFactor; + + s->block = (UChar*)s->arr2; + s->mtfv = (UInt16*)s->arr1; + s->zbits = NULL; + s->ptr = (UInt32*)s->arr1; + + strm->state = s; + strm->total_in_lo32 = 0; + strm->total_in_hi32 = 0; + strm->total_out_lo32 = 0; + strm->total_out_hi32 = 0; + init_RL ( s ); + prepare_new_block ( s ); + return BZ_OK; +} + + +/*---------------------------------------------------*/ +static +void add_pair_to_block ( EState* s ) +{ + Int32 i; + UChar ch = (UChar)(s->state_in_ch); + for (i = 0; i < s->state_in_len; i++) { + BZ_UPDATE_CRC( s->blockCRC, ch ); + } + s->inUse[s->state_in_ch] = True; + switch (s->state_in_len) { + case 1: + s->block[s->nblock] = (UChar)ch; s->nblock++; + break; + case 2: + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = (UChar)ch; s->nblock++; + break; + case 3: + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = (UChar)ch; s->nblock++; + break; + default: + s->inUse[s->state_in_len-4] = True; + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = (UChar)ch; s->nblock++; + s->block[s->nblock] = ((UChar)(s->state_in_len-4)); + s->nblock++; + break; + } +} + + +/*---------------------------------------------------*/ +static +void flush_RL ( EState* s ) +{ + if (s->state_in_ch < 256) add_pair_to_block ( s ); + init_RL ( s ); +} + + +/*---------------------------------------------------*/ +#define ADD_CHAR_TO_BLOCK(zs,zchh0) \ +{ \ + UInt32 zchh = (UInt32)(zchh0); \ + /*-- fast track the common case --*/ \ + if (zchh != zs->state_in_ch && \ + zs->state_in_len == 1) { \ + UChar ch = (UChar)(zs->state_in_ch); \ + BZ_UPDATE_CRC( zs->blockCRC, ch ); \ + zs->inUse[zs->state_in_ch] = True; \ + zs->block[zs->nblock] = (UChar)ch; \ + zs->nblock++; \ + zs->state_in_ch = zchh; \ + } \ + else \ + /*-- general, uncommon cases --*/ \ + if (zchh != zs->state_in_ch || \ + zs->state_in_len == 255) { \ + if (zs->state_in_ch < 256) \ + add_pair_to_block ( zs ); \ + zs->state_in_ch = zchh; \ + zs->state_in_len = 1; \ + } else { \ + zs->state_in_len++; \ + } \ +} + + +/*---------------------------------------------------*/ +static +Bool copy_input_until_stop ( EState* s ) +{ + Bool progress_in = False; + + if (s->mode == BZ_M_RUNNING) { + + /*-- fast track the common case --*/ + while (True) { + /*-- block full? --*/ + if (s->nblock >= s->nblockMAX) break; + /*-- no input? --*/ + if (s->strm->avail_in == 0) break; + progress_in = True; + ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); + s->strm->next_in++; + s->strm->avail_in--; + s->strm->total_in_lo32++; + if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; + } + + } else { + + /*-- general, uncommon case --*/ + while (True) { + /*-- block full? --*/ + if (s->nblock >= s->nblockMAX) break; + /*-- no input? --*/ + if (s->strm->avail_in == 0) break; + /*-- flush/finish end? --*/ + if (s->avail_in_expect == 0) break; + progress_in = True; + ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); + s->strm->next_in++; + s->strm->avail_in--; + s->strm->total_in_lo32++; + if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++; + s->avail_in_expect--; + } + } + return progress_in; +} + + +/*---------------------------------------------------*/ +static +Bool copy_output_until_stop ( EState* s ) +{ + Bool progress_out = False; + + while (True) { + + /*-- no output space? --*/ + if (s->strm->avail_out == 0) break; + + /*-- block done? --*/ + if (s->state_out_pos >= s->numZ) break; + + progress_out = True; + *(s->strm->next_out) = s->zbits[s->state_out_pos]; + s->state_out_pos++; + s->strm->avail_out--; + s->strm->next_out++; + s->strm->total_out_lo32++; + if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; + } + + return progress_out; +} + + +/*---------------------------------------------------*/ +static +Bool handle_compress ( bz_stream* strm ) +{ + Bool progress_in = False; + Bool progress_out = False; + EState* s = strm->state; + + while (True) { + + if (s->state == BZ_S_OUTPUT) { + progress_out |= copy_output_until_stop ( s ); + if (s->state_out_pos < s->numZ) break; + if (s->mode == BZ_M_FINISHING && + s->avail_in_expect == 0 && + isempty_RL(s)) break; + prepare_new_block ( s ); + s->state = BZ_S_INPUT; + if (s->mode == BZ_M_FLUSHING && + s->avail_in_expect == 0 && + isempty_RL(s)) break; + } + + if (s->state == BZ_S_INPUT) { + progress_in |= copy_input_until_stop ( s ); + if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) { + flush_RL ( s ); + BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) ); + s->state = BZ_S_OUTPUT; + } + else + if (s->nblock >= s->nblockMAX) { + BZ2_compressBlock ( s, False ); + s->state = BZ_S_OUTPUT; + } + else + if (s->strm->avail_in == 0) { + break; + } + } + + } + + return progress_in || progress_out; +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) +{ + Bool progress; + EState* s; + if (strm == NULL) return BZ_PARAM_ERROR; + s = strm->state; + if (s == NULL) return BZ_PARAM_ERROR; + if (s->strm != strm) return BZ_PARAM_ERROR; + + preswitch: + switch (s->mode) { + + case BZ_M_IDLE: + return BZ_SEQUENCE_ERROR; + + case BZ_M_RUNNING: + if (action == BZ_RUN) { + progress = handle_compress ( strm ); + return progress ? BZ_RUN_OK : BZ_PARAM_ERROR; + } + else + if (action == BZ_FLUSH) { + s->avail_in_expect = strm->avail_in; + s->mode = BZ_M_FLUSHING; + goto preswitch; + } + else + if (action == BZ_FINISH) { + s->avail_in_expect = strm->avail_in; + s->mode = BZ_M_FINISHING; + goto preswitch; + } + else + return BZ_PARAM_ERROR; + + case BZ_M_FLUSHING: + if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR; + if (s->avail_in_expect != s->strm->avail_in) + return BZ_SEQUENCE_ERROR; + progress = handle_compress ( strm ); + if (s->avail_in_expect > 0 || !isempty_RL(s) || + s->state_out_pos < s->numZ) return BZ_FLUSH_OK; + s->mode = BZ_M_RUNNING; + return BZ_RUN_OK; + + case BZ_M_FINISHING: + if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR; + if (s->avail_in_expect != s->strm->avail_in) + return BZ_SEQUENCE_ERROR; + progress = handle_compress ( strm ); + if (!progress) return BZ_SEQUENCE_ERROR; + if (s->avail_in_expect > 0 || !isempty_RL(s) || + s->state_out_pos < s->numZ) return BZ_FINISH_OK; + s->mode = BZ_M_IDLE; + return BZ_STREAM_END; + } + return BZ_OK; /*--not reached--*/ +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm ) +{ + EState* s; + if (strm == NULL) return BZ_PARAM_ERROR; + s = strm->state; + if (s == NULL) return BZ_PARAM_ERROR; + if (s->strm != strm) return BZ_PARAM_ERROR; + + if (s->arr1 != NULL) BZFREE(s->arr1); + if (s->arr2 != NULL) BZFREE(s->arr2); + if (s->ftab != NULL) BZFREE(s->ftab); + BZFREE(strm->state); + + strm->state = NULL; + + return BZ_OK; +} + + +/*---------------------------------------------------*/ +/*--- Decompression stuff ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzDecompressInit) + ( bz_stream* strm, + int verbosity, + int small ) +{ + DState* s; + + if (!bz_config_ok()) return BZ_CONFIG_ERROR; + + if (strm == NULL) return BZ_PARAM_ERROR; + if (small != 0 && small != 1) return BZ_PARAM_ERROR; + if (verbosity < 0 || verbosity > 4) return BZ_PARAM_ERROR; + + if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; + if (strm->bzfree == NULL) strm->bzfree = default_bzfree; + + s = BZALLOC( sizeof(DState) ); + if (s == NULL) return BZ_MEM_ERROR; + s->strm = strm; + strm->state = s; + s->state = BZ_X_MAGIC_1; + s->bsLive = 0; + s->bsBuff = 0; + s->calculatedCombinedCRC = 0; + strm->total_in_lo32 = 0; + strm->total_in_hi32 = 0; + strm->total_out_lo32 = 0; + strm->total_out_hi32 = 0; + s->smallDecompress = (Bool)small; + s->ll4 = NULL; + s->ll16 = NULL; + s->tt = NULL; + s->currBlockNo = 0; + s->verbosity = verbosity; + + return BZ_OK; +} + + +/*---------------------------------------------------*/ +/* Return True iff data corruption is discovered. + Returns False if there is no problem. +*/ +static +Bool unRLE_obuf_to_output_FAST ( DState* s ) +{ + UChar k1; + + if (s->blockRandomised) { + + while (True) { + /* try to finish existing run */ + while (True) { + if (s->strm->avail_out == 0) return False; + if (s->state_out_len == 0) break; + *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; + BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); + s->state_out_len--; + s->strm->next_out++; + s->strm->avail_out--; + s->strm->total_out_lo32++; + if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; + } + + /* can a new run be started? */ + if (s->nblock_used == s->save_nblock+1) return False; + + /* Only caused by corrupt data stream? */ + if (s->nblock_used > s->save_nblock+1) + return True; + + s->state_out_len = 1; + s->state_out_ch = s->k0; + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + s->state_out_len = 2; + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + s->state_out_len = 3; + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + s->state_out_len = ((Int32)k1) + 4; + BZ_GET_FAST(s->k0); BZ_RAND_UPD_MASK; + s->k0 ^= BZ_RAND_MASK; s->nblock_used++; + } + + } else { + + /* restore */ + UInt32 c_calculatedBlockCRC = s->calculatedBlockCRC; + UChar c_state_out_ch = s->state_out_ch; + Int32 c_state_out_len = s->state_out_len; + Int32 c_nblock_used = s->nblock_used; + Int32 c_k0 = s->k0; + UInt32* c_tt = s->tt; + UInt32 c_tPos = s->tPos; + char* cs_next_out = s->strm->next_out; + unsigned int cs_avail_out = s->strm->avail_out; + Int32 ro_blockSize100k = s->blockSize100k; + /* end restore */ + + UInt32 avail_out_INIT = cs_avail_out; + Int32 s_save_nblockPP = s->save_nblock+1; + unsigned int total_out_lo32_old; + + while (True) { + + /* try to finish existing run */ + if (c_state_out_len > 0) { + while (True) { + if (cs_avail_out == 0) goto return_notr; + if (c_state_out_len == 1) break; + *( (UChar*)(cs_next_out) ) = c_state_out_ch; + BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch ); + c_state_out_len--; + cs_next_out++; + cs_avail_out--; + } + s_state_out_len_eq_one: + { + if (cs_avail_out == 0) { + c_state_out_len = 1; goto return_notr; + }; + *( (UChar*)(cs_next_out) ) = c_state_out_ch; + BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch ); + cs_next_out++; + cs_avail_out--; + } + } + /* Only caused by corrupt data stream? */ + if (c_nblock_used > s_save_nblockPP) + return True; + + /* can a new run be started? */ + if (c_nblock_used == s_save_nblockPP) { + c_state_out_len = 0; goto return_notr; + }; + c_state_out_ch = c_k0; + BZ_GET_FAST_C(k1); c_nblock_used++; + if (k1 != c_k0) { + c_k0 = k1; goto s_state_out_len_eq_one; + }; + if (c_nblock_used == s_save_nblockPP) + goto s_state_out_len_eq_one; + + c_state_out_len = 2; + BZ_GET_FAST_C(k1); c_nblock_used++; + if (c_nblock_used == s_save_nblockPP) continue; + if (k1 != c_k0) { c_k0 = k1; continue; }; + + c_state_out_len = 3; + BZ_GET_FAST_C(k1); c_nblock_used++; + if (c_nblock_used == s_save_nblockPP) continue; + if (k1 != c_k0) { c_k0 = k1; continue; }; + + BZ_GET_FAST_C(k1); c_nblock_used++; + c_state_out_len = ((Int32)k1) + 4; + BZ_GET_FAST_C(c_k0); c_nblock_used++; + } + + return_notr: + total_out_lo32_old = s->strm->total_out_lo32; + s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out); + if (s->strm->total_out_lo32 < total_out_lo32_old) + s->strm->total_out_hi32++; + + /* save */ + s->calculatedBlockCRC = c_calculatedBlockCRC; + s->state_out_ch = c_state_out_ch; + s->state_out_len = c_state_out_len; + s->nblock_used = c_nblock_used; + s->k0 = c_k0; + s->tt = c_tt; + s->tPos = c_tPos; + s->strm->next_out = cs_next_out; + s->strm->avail_out = cs_avail_out; + /* end save */ + } + return False; +} + + + +/*---------------------------------------------------*/ +__inline__ Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab ) +{ + Int32 nb, na, mid; + nb = 0; + na = 256; + do { + mid = (nb + na) >> 1; + if (indx >= cftab[mid]) nb = mid; else na = mid; + } + while (na - nb != 1); + return nb; +} + + +/*---------------------------------------------------*/ +/* Return True iff data corruption is discovered. + Returns False if there is no problem. +*/ +static +Bool unRLE_obuf_to_output_SMALL ( DState* s ) +{ + UChar k1; + + if (s->blockRandomised) { + + while (True) { + /* try to finish existing run */ + while (True) { + if (s->strm->avail_out == 0) return False; + if (s->state_out_len == 0) break; + *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; + BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); + s->state_out_len--; + s->strm->next_out++; + s->strm->avail_out--; + s->strm->total_out_lo32++; + if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; + } + + /* can a new run be started? */ + if (s->nblock_used == s->save_nblock+1) return False; + + /* Only caused by corrupt data stream? */ + if (s->nblock_used > s->save_nblock+1) + return True; + + s->state_out_len = 1; + s->state_out_ch = s->k0; + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + s->state_out_len = 2; + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + s->state_out_len = 3; + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; + k1 ^= BZ_RAND_MASK; s->nblock_used++; + s->state_out_len = ((Int32)k1) + 4; + BZ_GET_SMALL(s->k0); BZ_RAND_UPD_MASK; + s->k0 ^= BZ_RAND_MASK; s->nblock_used++; + } + + } else { + + while (True) { + /* try to finish existing run */ + while (True) { + if (s->strm->avail_out == 0) return False; + if (s->state_out_len == 0) break; + *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; + BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); + s->state_out_len--; + s->strm->next_out++; + s->strm->avail_out--; + s->strm->total_out_lo32++; + if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++; + } + + /* can a new run be started? */ + if (s->nblock_used == s->save_nblock+1) return False; + + /* Only caused by corrupt data stream? */ + if (s->nblock_used > s->save_nblock+1) + return True; + + s->state_out_len = 1; + s->state_out_ch = s->k0; + BZ_GET_SMALL(k1); s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + s->state_out_len = 2; + BZ_GET_SMALL(k1); s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + s->state_out_len = 3; + BZ_GET_SMALL(k1); s->nblock_used++; + if (s->nblock_used == s->save_nblock+1) continue; + if (k1 != s->k0) { s->k0 = k1; continue; }; + + BZ_GET_SMALL(k1); s->nblock_used++; + s->state_out_len = ((Int32)k1) + 4; + BZ_GET_SMALL(s->k0); s->nblock_used++; + } + + } +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) +{ + Bool corrupt; + DState* s; + if (strm == NULL) return BZ_PARAM_ERROR; + s = strm->state; + if (s == NULL) return BZ_PARAM_ERROR; + if (s->strm != strm) return BZ_PARAM_ERROR; + + while (True) { + if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR; + if (s->state == BZ_X_OUTPUT) { + if (s->smallDecompress) + corrupt = unRLE_obuf_to_output_SMALL ( s ); else + corrupt = unRLE_obuf_to_output_FAST ( s ); + if (corrupt) return BZ_DATA_ERROR; + if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) { + BZ_FINALISE_CRC ( s->calculatedBlockCRC ); + if (s->verbosity >= 3) + VPrintf2 ( " {0x%08x, 0x%08x}", s->storedBlockCRC, + s->calculatedBlockCRC ); + if (s->verbosity >= 2) VPrintf0 ( "]" ); + if (s->calculatedBlockCRC != s->storedBlockCRC) + return BZ_DATA_ERROR; + s->calculatedCombinedCRC + = (s->calculatedCombinedCRC << 1) | + (s->calculatedCombinedCRC >> 31); + s->calculatedCombinedCRC ^= s->calculatedBlockCRC; + s->state = BZ_X_BLKHDR_1; + } else { + return BZ_OK; + } + } + if (s->state >= BZ_X_MAGIC_1) { + Int32 r = BZ2_decompress ( s ); + if (r == BZ_STREAM_END) { + if (s->verbosity >= 3) + VPrintf2 ( "\n combined CRCs: stored = 0x%08x, computed = 0x%08x", + s->storedCombinedCRC, s->calculatedCombinedCRC ); + if (s->calculatedCombinedCRC != s->storedCombinedCRC) + return BZ_DATA_ERROR; + return r; + } + if (s->state != BZ_X_OUTPUT) return r; + } + } + + AssertH ( 0, 6001 ); + + return 0; /*NOTREACHED*/ +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ) +{ + DState* s; + if (strm == NULL) return BZ_PARAM_ERROR; + s = strm->state; + if (s == NULL) return BZ_PARAM_ERROR; + if (s->strm != strm) return BZ_PARAM_ERROR; + + if (s->tt != NULL) BZFREE(s->tt); + if (s->ll16 != NULL) BZFREE(s->ll16); + if (s->ll4 != NULL) BZFREE(s->ll4); + + BZFREE(strm->state); + strm->state = NULL; + + return BZ_OK; +} + + +#ifndef BZ_NO_STDIO +/*---------------------------------------------------*/ +/*--- File I/O stuff ---*/ +/*---------------------------------------------------*/ + +#define BZ_SETERR(eee) \ +{ \ + if (bzerror != NULL) *bzerror = eee; \ + if (bzf != NULL) bzf->lastErr = eee; \ +} + +typedef + struct { + FILE* handle; + Char buf[BZ_MAX_UNUSED]; + Int32 bufN; + Bool writing; + bz_stream strm; + Int32 lastErr; + Bool initialisedOk; + } + bzFile; + + +/*---------------------------------------------*/ +static Bool myfeof ( FILE* f ) +{ + Int32 c = fgetc ( f ); + if (c == EOF) return True; + ungetc ( c, f ); + return False; +} + + +/*---------------------------------------------------*/ +BZFILE* BZ_API(BZ2_bzWriteOpen) + ( int* bzerror, + FILE* f, + int blockSize100k, + int verbosity, + int workFactor ) +{ + Int32 ret; + bzFile* bzf = NULL; + + BZ_SETERR(BZ_OK); + + if (f == NULL || + (blockSize100k < 1 || blockSize100k > 9) || + (workFactor < 0 || workFactor > 250) || + (verbosity < 0 || verbosity > 4)) + { BZ_SETERR(BZ_PARAM_ERROR); return NULL; }; + + if (ferror(f)) + { BZ_SETERR(BZ_IO_ERROR); return NULL; }; + + bzf = malloc ( sizeof(bzFile) ); + if (bzf == NULL) + { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; + + BZ_SETERR(BZ_OK); + bzf->initialisedOk = False; + bzf->bufN = 0; + bzf->handle = f; + bzf->writing = True; + bzf->strm.bzalloc = NULL; + bzf->strm.bzfree = NULL; + bzf->strm.opaque = NULL; + + if (workFactor == 0) workFactor = 30; + ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, + verbosity, workFactor ); + if (ret != BZ_OK) + { BZ_SETERR(ret); free(bzf); return NULL; }; + + bzf->strm.avail_in = 0; + bzf->initialisedOk = True; + return bzf; +} + + + +/*---------------------------------------------------*/ +void BZ_API(BZ2_bzWrite) + ( int* bzerror, + BZFILE* b, + void* buf, + int len ) +{ + Int32 n, n2, ret; + bzFile* bzf = (bzFile*)b; + + BZ_SETERR(BZ_OK); + if (bzf == NULL || buf == NULL || len < 0) + { BZ_SETERR(BZ_PARAM_ERROR); return; }; + if (!(bzf->writing)) + { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; + if (ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return; }; + + if (len == 0) + { BZ_SETERR(BZ_OK); return; }; + + bzf->strm.avail_in = len; + bzf->strm.next_in = buf; + + while (True) { + bzf->strm.avail_out = BZ_MAX_UNUSED; + bzf->strm.next_out = bzf->buf; + ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN ); + if (ret != BZ_RUN_OK) + { BZ_SETERR(ret); return; }; + + if (bzf->strm.avail_out < BZ_MAX_UNUSED) { + n = BZ_MAX_UNUSED - bzf->strm.avail_out; + n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), + n, bzf->handle ); + if (n != n2 || ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return; }; + } + + if (bzf->strm.avail_in == 0) + { BZ_SETERR(BZ_OK); return; }; + } +} + + +/*---------------------------------------------------*/ +void BZ_API(BZ2_bzWriteClose) + ( int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in, + unsigned int* nbytes_out ) +{ + BZ2_bzWriteClose64 ( bzerror, b, abandon, + nbytes_in, NULL, nbytes_out, NULL ); +} + + +void BZ_API(BZ2_bzWriteClose64) + ( int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in_lo32, + unsigned int* nbytes_in_hi32, + unsigned int* nbytes_out_lo32, + unsigned int* nbytes_out_hi32 ) +{ + Int32 n, n2, ret; + bzFile* bzf = (bzFile*)b; + + if (bzf == NULL) + { BZ_SETERR(BZ_OK); return; }; + if (!(bzf->writing)) + { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; + if (ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return; }; + + if (nbytes_in_lo32 != NULL) *nbytes_in_lo32 = 0; + if (nbytes_in_hi32 != NULL) *nbytes_in_hi32 = 0; + if (nbytes_out_lo32 != NULL) *nbytes_out_lo32 = 0; + if (nbytes_out_hi32 != NULL) *nbytes_out_hi32 = 0; + + if ((!abandon) && bzf->lastErr == BZ_OK) { + while (True) { + bzf->strm.avail_out = BZ_MAX_UNUSED; + bzf->strm.next_out = bzf->buf; + ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH ); + if (ret != BZ_FINISH_OK && ret != BZ_STREAM_END) + { BZ_SETERR(ret); return; }; + + if (bzf->strm.avail_out < BZ_MAX_UNUSED) { + n = BZ_MAX_UNUSED - bzf->strm.avail_out; + n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), + n, bzf->handle ); + if (n != n2 || ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return; }; + } + + if (ret == BZ_STREAM_END) break; + } + } + + if ( !abandon && !ferror ( bzf->handle ) ) { + fflush ( bzf->handle ); + if (ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return; }; + } + + if (nbytes_in_lo32 != NULL) + *nbytes_in_lo32 = bzf->strm.total_in_lo32; + if (nbytes_in_hi32 != NULL) + *nbytes_in_hi32 = bzf->strm.total_in_hi32; + if (nbytes_out_lo32 != NULL) + *nbytes_out_lo32 = bzf->strm.total_out_lo32; + if (nbytes_out_hi32 != NULL) + *nbytes_out_hi32 = bzf->strm.total_out_hi32; + + BZ_SETERR(BZ_OK); + BZ2_bzCompressEnd ( &(bzf->strm) ); + free ( bzf ); +} + + +/*---------------------------------------------------*/ +BZFILE* BZ_API(BZ2_bzReadOpen) + ( int* bzerror, + FILE* f, + int verbosity, + int small, + void* unused, + int nUnused ) +{ + bzFile* bzf = NULL; + int ret; + + BZ_SETERR(BZ_OK); + + if (f == NULL || + (small != 0 && small != 1) || + (verbosity < 0 || verbosity > 4) || + (unused == NULL && nUnused != 0) || + (unused != NULL && (nUnused < 0 || nUnused > BZ_MAX_UNUSED))) + { BZ_SETERR(BZ_PARAM_ERROR); return NULL; }; + + if (ferror(f)) + { BZ_SETERR(BZ_IO_ERROR); return NULL; }; + + bzf = malloc ( sizeof(bzFile) ); + if (bzf == NULL) + { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; + + BZ_SETERR(BZ_OK); + + bzf->initialisedOk = False; + bzf->handle = f; + bzf->bufN = 0; + bzf->writing = False; + bzf->strm.bzalloc = NULL; + bzf->strm.bzfree = NULL; + bzf->strm.opaque = NULL; + + while (nUnused > 0) { + bzf->buf[bzf->bufN] = *((UChar*)(unused)); bzf->bufN++; + unused = ((void*)( 1 + ((UChar*)(unused)) )); + nUnused--; + } + + ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small ); + if (ret != BZ_OK) + { BZ_SETERR(ret); free(bzf); return NULL; }; + + bzf->strm.avail_in = bzf->bufN; + bzf->strm.next_in = bzf->buf; + + bzf->initialisedOk = True; + return bzf; +} + + +/*---------------------------------------------------*/ +void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b ) +{ + bzFile* bzf = (bzFile*)b; + + BZ_SETERR(BZ_OK); + if (bzf == NULL) + { BZ_SETERR(BZ_OK); return; }; + + if (bzf->writing) + { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; + + if (bzf->initialisedOk) + (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); + free ( bzf ); +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzRead) + ( int* bzerror, + BZFILE* b, + void* buf, + int len ) +{ + Int32 n, ret; + bzFile* bzf = (bzFile*)b; + + BZ_SETERR(BZ_OK); + + if (bzf == NULL || buf == NULL || len < 0) + { BZ_SETERR(BZ_PARAM_ERROR); return 0; }; + + if (bzf->writing) + { BZ_SETERR(BZ_SEQUENCE_ERROR); return 0; }; + + if (len == 0) + { BZ_SETERR(BZ_OK); return 0; }; + + bzf->strm.avail_out = len; + bzf->strm.next_out = buf; + + while (True) { + + if (ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return 0; }; + + if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) { + n = fread ( bzf->buf, sizeof(UChar), + BZ_MAX_UNUSED, bzf->handle ); + if (ferror(bzf->handle)) + { BZ_SETERR(BZ_IO_ERROR); return 0; }; + bzf->bufN = n; + bzf->strm.avail_in = bzf->bufN; + bzf->strm.next_in = bzf->buf; + } + + ret = BZ2_bzDecompress ( &(bzf->strm) ); + + if (ret != BZ_OK && ret != BZ_STREAM_END) + { BZ_SETERR(ret); return 0; }; + + if (ret == BZ_OK && myfeof(bzf->handle) && + bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0) + { BZ_SETERR(BZ_UNEXPECTED_EOF); return 0; }; + + if (ret == BZ_STREAM_END) + { BZ_SETERR(BZ_STREAM_END); + return len - bzf->strm.avail_out; }; + if (bzf->strm.avail_out == 0) + { BZ_SETERR(BZ_OK); return len; }; + + } + + return 0; /*not reached*/ +} + + +/*---------------------------------------------------*/ +void BZ_API(BZ2_bzReadGetUnused) + ( int* bzerror, + BZFILE* b, + void** unused, + int* nUnused ) +{ + bzFile* bzf = (bzFile*)b; + if (bzf == NULL) + { BZ_SETERR(BZ_PARAM_ERROR); return; }; + if (bzf->lastErr != BZ_STREAM_END) + { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; + if (unused == NULL || nUnused == NULL) + { BZ_SETERR(BZ_PARAM_ERROR); return; }; + + BZ_SETERR(BZ_OK); + *nUnused = bzf->strm.avail_in; + *unused = bzf->strm.next_in; +} +#endif + + +/*---------------------------------------------------*/ +/*--- Misc convenience stuff ---*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzBuffToBuffCompress) + ( char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int blockSize100k, + int verbosity, + int workFactor ) +{ + bz_stream strm; + int ret; + + if (dest == NULL || destLen == NULL || + source == NULL || + blockSize100k < 1 || blockSize100k > 9 || + verbosity < 0 || verbosity > 4 || + workFactor < 0 || workFactor > 250) + return BZ_PARAM_ERROR; + + if (workFactor == 0) workFactor = 30; + strm.bzalloc = NULL; + strm.bzfree = NULL; + strm.opaque = NULL; + ret = BZ2_bzCompressInit ( &strm, blockSize100k, + verbosity, workFactor ); + if (ret != BZ_OK) return ret; + + strm.next_in = source; + strm.next_out = dest; + strm.avail_in = sourceLen; + strm.avail_out = *destLen; + + ret = BZ2_bzCompress ( &strm, BZ_FINISH ); + if (ret == BZ_FINISH_OK) goto output_overflow; + if (ret != BZ_STREAM_END) goto errhandler; + + /* normal termination */ + *destLen -= strm.avail_out; + BZ2_bzCompressEnd ( &strm ); + return BZ_OK; + + output_overflow: + BZ2_bzCompressEnd ( &strm ); + return BZ_OUTBUFF_FULL; + + errhandler: + BZ2_bzCompressEnd ( &strm ); + return ret; +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzBuffToBuffDecompress) + ( char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int small, + int verbosity ) +{ + bz_stream strm; + int ret; + + if (dest == NULL || destLen == NULL || + source == NULL || + (small != 0 && small != 1) || + verbosity < 0 || verbosity > 4) + return BZ_PARAM_ERROR; + + strm.bzalloc = NULL; + strm.bzfree = NULL; + strm.opaque = NULL; + ret = BZ2_bzDecompressInit ( &strm, verbosity, small ); + if (ret != BZ_OK) return ret; + + strm.next_in = source; + strm.next_out = dest; + strm.avail_in = sourceLen; + strm.avail_out = *destLen; + + ret = BZ2_bzDecompress ( &strm ); + if (ret == BZ_OK) goto output_overflow_or_eof; + if (ret != BZ_STREAM_END) goto errhandler; + + /* normal termination */ + *destLen -= strm.avail_out; + BZ2_bzDecompressEnd ( &strm ); + return BZ_OK; + + output_overflow_or_eof: + if (strm.avail_out > 0) { + BZ2_bzDecompressEnd ( &strm ); + return BZ_UNEXPECTED_EOF; + } else { + BZ2_bzDecompressEnd ( &strm ); + return BZ_OUTBUFF_FULL; + }; + + errhandler: + BZ2_bzDecompressEnd ( &strm ); + return ret; +} + + +/*---------------------------------------------------*/ +/*-- + Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) + to support better zlib compatibility. + This code is not _officially_ part of libbzip2 (yet); + I haven't tested it, documented it, or considered the + threading-safeness of it. + If this code breaks, please contact both Yoshioka and me. +--*/ +/*---------------------------------------------------*/ + +/*---------------------------------------------------*/ +/*-- + return version like "0.9.5d, 4-Sept-1999". +--*/ +const char * BZ_API(BZ2_bzlibVersion)(void) +{ + return BZ_VERSION; +} + + +#ifndef BZ_NO_STDIO +/*---------------------------------------------------*/ + +#if defined(_WIN32) || defined(OS2) || defined(MSDOS) +# include <fcntl.h> +# include <io.h> +#if _MSC_VER > 1410 +# define SET_BINARY_MODE(file) _setmode(_fileno(file),O_BINARY) +#else +# define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY) +#endif +#else +# define SET_BINARY_MODE(file) +#endif +static +BZFILE * bzopen_or_bzdopen + ( const char *path, /* no use when bzdopen */ + int fd, /* no use when bzdopen */ + const char *mode, + int open_mode) /* bzopen: 0, bzdopen:1 */ +{ + int bzerr; + char unused[BZ_MAX_UNUSED]; + int blockSize100k = 9; + int writing = 0; + char mode2[10] = ""; + FILE *fp = NULL; + BZFILE *bzfp = NULL; + int verbosity = 0; + int workFactor = 30; + int smallMode = 0; + int nUnused = 0; + + if (mode == NULL) return NULL; + while (*mode) { + switch (*mode) { + case 'r': + writing = 0; break; + case 'w': + writing = 1; break; + case 's': + smallMode = 1; break; + default: + if (isdigit((int)(*mode))) { + blockSize100k = *mode-BZ_HDR_0; + } + } + mode++; + } + strcat(mode2, writing ? "w" : "r" ); + strcat(mode2,"b"); /* binary mode */ + + if (open_mode==0) { + if (path==NULL || strcmp(path,"")==0) { + fp = (writing ? stdout : stdin); + SET_BINARY_MODE(fp); + } else { + fp = fopen(path,mode2); + } + } else { +#ifdef BZ_STRICT_ANSI + fp = NULL; +#else +#if _MSC_VER > 1410 + fp = _fdopen(fd,mode2); +#else + fp = fdopen(fd,mode2); +#endif +#endif + } + if (fp == NULL) return NULL; + + if (writing) { + /* Guard against total chaos and anarchy -- JRS */ + if (blockSize100k < 1) blockSize100k = 1; + if (blockSize100k > 9) blockSize100k = 9; + bzfp = BZ2_bzWriteOpen(&bzerr,fp,blockSize100k, + verbosity,workFactor); + } else { + bzfp = BZ2_bzReadOpen(&bzerr,fp,verbosity,smallMode, + unused,nUnused); + } + if (bzfp == NULL) { + if (fp != stdin && fp != stdout) fclose(fp); + return NULL; + } + return bzfp; +} + + +/*---------------------------------------------------*/ +/*-- + open file for read or write. + ex) bzopen("file","w9") + case path="" or NULL => use stdin or stdout. +--*/ +BZFILE * BZ_API(BZ2_bzopen) + ( const char *path, + const char *mode ) +{ + return bzopen_or_bzdopen(path,-1,mode,/*bzopen*/0); +} + + +/*---------------------------------------------------*/ +BZFILE * BZ_API(BZ2_bzdopen) + ( int fd, + const char *mode ) +{ + return bzopen_or_bzdopen(NULL,fd,mode,/*bzdopen*/1); +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzread) (BZFILE* b, void* buf, int len ) +{ + int bzerr, nread; + if (((bzFile*)b)->lastErr == BZ_STREAM_END) return 0; + nread = BZ2_bzRead(&bzerr,b,buf,len); + if (bzerr == BZ_OK || bzerr == BZ_STREAM_END) { + return nread; + } else { + return -1; + } +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzwrite) (BZFILE* b, void* buf, int len ) +{ + int bzerr; + + BZ2_bzWrite(&bzerr,b,buf,len); + if(bzerr == BZ_OK){ + return len; + }else{ + return -1; + } +} + + +/*---------------------------------------------------*/ +int BZ_API(BZ2_bzflush) (BZFILE *b) +{ + /* do nothing now... */ + return 0; +} + + +/*---------------------------------------------------*/ +void BZ_API(BZ2_bzclose) (BZFILE* b) +{ + int bzerr; + FILE *fp; + + if (b==NULL) {return;} + fp = ((bzFile *)b)->handle; + if(((bzFile*)b)->writing){ + BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL); + if(bzerr != BZ_OK){ + BZ2_bzWriteClose(NULL,b,1,NULL,NULL); + } + }else{ + BZ2_bzReadClose(&bzerr,b); + } + if(fp!=stdin && fp!=stdout){ + fclose(fp); + } +} + + +/*---------------------------------------------------*/ +/*-- + return last error code +--*/ +static const char *bzerrorstrings[] = { + "OK" + ,"SEQUENCE_ERROR" + ,"PARAM_ERROR" + ,"MEM_ERROR" + ,"DATA_ERROR" + ,"DATA_ERROR_MAGIC" + ,"IO_ERROR" + ,"UNEXPECTED_EOF" + ,"OUTBUFF_FULL" + ,"CONFIG_ERROR" + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ +}; + + +const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum) +{ + int err = ((bzFile *)b)->lastErr; + + if(err>0) err = 0; + *errnum = err; + return bzerrorstrings[err*-1]; +} +#endif + + +/*-------------------------------------------------------------*/ +/*--- end bzlib.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h new file mode 100644 index 0000000..acb1935 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib.h @@ -0,0 +1,285 @@ + +/*-------------------------------------------------------------*/ +/*--- Public header file for the library. ---*/ +/*--- bzlib.h ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#ifndef _BZLIB_H +#define _BZLIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +// we don't need the FILE* interface +#define BZ_NO_STDIO + +#define BZ_RUN 0 +#define BZ_FLUSH 1 +#define BZ_FINISH 2 + +#define BZ_OK 0 +#define BZ_RUN_OK 1 +#define BZ_FLUSH_OK 2 +#define BZ_FINISH_OK 3 +#define BZ_STREAM_END 4 +#define BZ_SEQUENCE_ERROR (-1) +#define BZ_PARAM_ERROR (-2) +#define BZ_MEM_ERROR (-3) +#define BZ_DATA_ERROR (-4) +#define BZ_DATA_ERROR_MAGIC (-5) +#define BZ_IO_ERROR (-6) +#define BZ_UNEXPECTED_EOF (-7) +#define BZ_OUTBUFF_FULL (-8) +#define BZ_CONFIG_ERROR (-9) + +typedef + struct { + char *next_in; + unsigned int avail_in; + unsigned int total_in_lo32; + unsigned int total_in_hi32; + + char *next_out; + unsigned int avail_out; + unsigned int total_out_lo32; + unsigned int total_out_hi32; + + void *state; + + void *(*bzalloc)(void *,int,int); + void (*bzfree)(void *,void *); + void *opaque; + } + bz_stream; + + +#ifndef BZ_IMPORT +#define BZ_EXPORT +#endif + +#ifndef BZ_NO_STDIO +/* Need a definitition for FILE */ +#include <stdio.h> +#endif + +#ifdef _WIN32 +# include <windows.h> +# ifdef small + /* windows.h define small to char */ +# undef small +# endif +# ifdef BZ_EXPORT +# define BZ_API(func) WINAPI func +# define BZ_EXTERN extern +# else + /* import windows dll dynamically */ +# define BZ_API(func) (WINAPI * func) +# define BZ_EXTERN +# endif +#else +# define BZ_API(func) func +# define BZ_EXTERN extern +#endif + + +/*-- Core (low-level) library functions --*/ + +BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( + bz_stream* strm, + int blockSize100k, + int verbosity, + int workFactor + ); + +BZ_EXTERN int BZ_API(BZ2_bzCompress) ( + bz_stream* strm, + int action + ); + +BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( + bz_stream* strm + ); + +BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( + bz_stream *strm, + int verbosity, + int small + ); + +BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( + bz_stream* strm + ); + +BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( + bz_stream *strm + ); + + + +/*-- High(er) level library functions --*/ + +#ifndef BZ_NO_STDIO +#define BZ_MAX_UNUSED 5000 + +typedef void BZFILE; + +BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( + int* bzerror, + FILE* f, + int verbosity, + int small, + void* unused, + int nUnused + ); + +BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( + int* bzerror, + BZFILE* b + ); + +BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( + int* bzerror, + BZFILE* b, + void** unused, + int* nUnused + ); + +BZ_EXTERN int BZ_API(BZ2_bzRead) ( + int* bzerror, + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( + int* bzerror, + FILE* f, + int blockSize100k, + int verbosity, + int workFactor + ); + +BZ_EXTERN void BZ_API(BZ2_bzWrite) ( + int* bzerror, + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( + int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in, + unsigned int* nbytes_out + ); + +BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( + int* bzerror, + BZFILE* b, + int abandon, + unsigned int* nbytes_in_lo32, + unsigned int* nbytes_in_hi32, + unsigned int* nbytes_out_lo32, + unsigned int* nbytes_out_hi32 + ); +#endif + + +/*-- Utility functions --*/ + +BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( + char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int blockSize100k, + int verbosity, + int workFactor + ); + +BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( + char* dest, + unsigned int* destLen, + char* source, + unsigned int sourceLen, + int small, + int verbosity + ); + + +/*-- + Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) + to support better zlib compatibility. + This code is not _officially_ part of libbzip2 (yet); + I haven't tested it, documented it, or considered the + threading-safeness of it. + If this code breaks, please contact both Yoshioka and me. +--*/ + +BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) ( + void + ); + +#ifndef BZ_NO_STDIO +BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) ( + const char *path, + const char *mode + ); + +BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( + int fd, + const char *mode + ); + +BZ_EXTERN int BZ_API(BZ2_bzread) ( + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN int BZ_API(BZ2_bzwrite) ( + BZFILE* b, + void* buf, + int len + ); + +BZ_EXTERN int BZ_API(BZ2_bzflush) ( + BZFILE* b + ); + +BZ_EXTERN void BZ_API(BZ2_bzclose) ( + BZFILE* b + ); + +BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( + BZFILE *b, + int *errnum + ); +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/*-------------------------------------------------------------*/ +/*--- end bzlib.h ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib_private.h b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib_private.h new file mode 100644 index 0000000..5d0217f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzlib_private.h @@ -0,0 +1,509 @@ + +/*-------------------------------------------------------------*/ +/*--- Private header file for the library. ---*/ +/*--- bzlib_private.h ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#ifndef _BZLIB_PRIVATE_H +#define _BZLIB_PRIVATE_H + +#include <stdlib.h> + +#ifndef BZ_NO_STDIO +#include <stdio.h> +#include <ctype.h> +#include <string.h> +#endif + +#include "bzlib.h" + + + +/*-- General stuff. --*/ + +#define BZ_VERSION "1.0.6, 6-Sept-2010" + +typedef char Char; +typedef unsigned char Bool; +typedef unsigned char UChar; +typedef int Int32; +typedef unsigned int UInt32; +typedef short Int16; +typedef unsigned short UInt16; + +#define True ((Bool)1) +#define False ((Bool)0) + +#ifndef __GNUC__ +#define __inline__ /* */ +#endif + +#ifndef BZ_NO_STDIO + +extern void BZ2_bz__AssertH__fail ( int errcode ); +#define AssertH(cond,errcode) \ + { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); } + +#if BZ_DEBUG +#define AssertD(cond,msg) \ + { if (!(cond)) { \ + fprintf ( stderr, \ + "\n\nlibbzip2(debug build): internal error\n\t%s\n", msg );\ + exit(1); \ + }} +#else +#define AssertD(cond,msg) /* */ +#endif + +#define VPrintf0(zf) \ + fprintf(stderr,zf) +#define VPrintf1(zf,za1) \ + fprintf(stderr,zf,za1) +#define VPrintf2(zf,za1,za2) \ + fprintf(stderr,zf,za1,za2) +#define VPrintf3(zf,za1,za2,za3) \ + fprintf(stderr,zf,za1,za2,za3) +#define VPrintf4(zf,za1,za2,za3,za4) \ + fprintf(stderr,zf,za1,za2,za3,za4) +#define VPrintf5(zf,za1,za2,za3,za4,za5) \ + fprintf(stderr,zf,za1,za2,za3,za4,za5) + +#else + +extern void bz_internal_error ( int errcode ); +#define AssertH(cond,errcode) \ + { if (!(cond)) bz_internal_error ( errcode ); } +#define AssertD(cond,msg) do { } while (0) +#define VPrintf0(zf) do { } while (0) +#define VPrintf1(zf,za1) do { } while (0) +#define VPrintf2(zf,za1,za2) do { } while (0) +#define VPrintf3(zf,za1,za2,za3) do { } while (0) +#define VPrintf4(zf,za1,za2,za3,za4) do { } while (0) +#define VPrintf5(zf,za1,za2,za3,za4,za5) do { } while (0) + +#endif + + +#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1) +#define BZFREE(ppp) (strm->bzfree)(strm->opaque,(ppp)) + + +/*-- Header bytes. --*/ + +#define BZ_HDR_B 0x42 /* 'B' */ +#define BZ_HDR_Z 0x5a /* 'Z' */ +#define BZ_HDR_h 0x68 /* 'h' */ +#define BZ_HDR_0 0x30 /* '0' */ + +/*-- Constants for the back end. --*/ + +#define BZ_MAX_ALPHA_SIZE 258 +#define BZ_MAX_CODE_LEN 23 + +#define BZ_RUNA 0 +#define BZ_RUNB 1 + +#define BZ_N_GROUPS 6 +#define BZ_G_SIZE 50 +#define BZ_N_ITERS 4 + +#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE)) + + + +/*-- Stuff for randomising repetitive blocks. --*/ + +extern Int32 BZ2_rNums[512]; + +#define BZ_RAND_DECLS \ + Int32 rNToGo; \ + Int32 rTPos \ + +#define BZ_RAND_INIT_MASK \ + s->rNToGo = 0; \ + s->rTPos = 0 \ + +#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0) + +#define BZ_RAND_UPD_MASK \ + if (s->rNToGo == 0) { \ + s->rNToGo = BZ2_rNums[s->rTPos]; \ + s->rTPos++; \ + if (s->rTPos == 512) s->rTPos = 0; \ + } \ + s->rNToGo--; + + + +/*-- Stuff for doing CRCs. --*/ + +extern UInt32 BZ2_crc32Table[256]; + +#define BZ_INITIALISE_CRC(crcVar) \ +{ \ + crcVar = 0xffffffffL; \ +} + +#define BZ_FINALISE_CRC(crcVar) \ +{ \ + crcVar = ~(crcVar); \ +} + +#define BZ_UPDATE_CRC(crcVar,cha) \ +{ \ + crcVar = (crcVar << 8) ^ \ + BZ2_crc32Table[(crcVar >> 24) ^ \ + ((UChar)cha)]; \ +} + + + +/*-- States and modes for compression. --*/ + +#define BZ_M_IDLE 1 +#define BZ_M_RUNNING 2 +#define BZ_M_FLUSHING 3 +#define BZ_M_FINISHING 4 + +#define BZ_S_OUTPUT 1 +#define BZ_S_INPUT 2 + +#define BZ_N_RADIX 2 +#define BZ_N_QSORT 12 +#define BZ_N_SHELL 18 +#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2) + + + + +/*-- Structure holding all the compression-side stuff. --*/ + +typedef + struct { + /* pointer back to the struct bz_stream */ + bz_stream* strm; + + /* mode this stream is in, and whether inputting */ + /* or outputting data */ + Int32 mode; + Int32 state; + + /* remembers avail_in when flush/finish requested */ + UInt32 avail_in_expect; + + /* for doing the block sorting */ + UInt32* arr1; + UInt32* arr2; + UInt32* ftab; + Int32 origPtr; + + /* aliases for arr1 and arr2 */ + UInt32* ptr; + UChar* block; + UInt16* mtfv; + UChar* zbits; + + /* for deciding when to use the fallback sorting algorithm */ + Int32 workFactor; + + /* run-length-encoding of the input */ + UInt32 state_in_ch; + Int32 state_in_len; + BZ_RAND_DECLS; + + /* input and output limits and current posns */ + Int32 nblock; + Int32 nblockMAX; + Int32 numZ; + Int32 state_out_pos; + + /* map of bytes used in block */ + Int32 nInUse; + Bool inUse[256]; + UChar unseqToSeq[256]; + + /* the buffer for bit stream creation */ + UInt32 bsBuff; + Int32 bsLive; + + /* block and combined CRCs */ + UInt32 blockCRC; + UInt32 combinedCRC; + + /* misc administratium */ + Int32 verbosity; + Int32 blockNo; + Int32 blockSize100k; + + /* stuff for coding the MTF values */ + Int32 nMTF; + Int32 mtfFreq [BZ_MAX_ALPHA_SIZE]; + UChar selector [BZ_MAX_SELECTORS]; + UChar selectorMtf[BZ_MAX_SELECTORS]; + + UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + Int32 code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + Int32 rfreq [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + /* second dimension: only 3 needed; 4 makes index calculations faster */ + UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4]; + + } + EState; + + + +/*-- externs for compression. --*/ + +extern void +BZ2_blockSort ( EState* ); + +extern void +BZ2_compressBlock ( EState*, Bool ); + +extern void +BZ2_bsInitWrite ( EState* ); + +extern void +BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 ); + +extern void +BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 ); + + + +/*-- states for decompression. --*/ + +#define BZ_X_IDLE 1 +#define BZ_X_OUTPUT 2 + +#define BZ_X_MAGIC_1 10 +#define BZ_X_MAGIC_2 11 +#define BZ_X_MAGIC_3 12 +#define BZ_X_MAGIC_4 13 +#define BZ_X_BLKHDR_1 14 +#define BZ_X_BLKHDR_2 15 +#define BZ_X_BLKHDR_3 16 +#define BZ_X_BLKHDR_4 17 +#define BZ_X_BLKHDR_5 18 +#define BZ_X_BLKHDR_6 19 +#define BZ_X_BCRC_1 20 +#define BZ_X_BCRC_2 21 +#define BZ_X_BCRC_3 22 +#define BZ_X_BCRC_4 23 +#define BZ_X_RANDBIT 24 +#define BZ_X_ORIGPTR_1 25 +#define BZ_X_ORIGPTR_2 26 +#define BZ_X_ORIGPTR_3 27 +#define BZ_X_MAPPING_1 28 +#define BZ_X_MAPPING_2 29 +#define BZ_X_SELECTOR_1 30 +#define BZ_X_SELECTOR_2 31 +#define BZ_X_SELECTOR_3 32 +#define BZ_X_CODING_1 33 +#define BZ_X_CODING_2 34 +#define BZ_X_CODING_3 35 +#define BZ_X_MTF_1 36 +#define BZ_X_MTF_2 37 +#define BZ_X_MTF_3 38 +#define BZ_X_MTF_4 39 +#define BZ_X_MTF_5 40 +#define BZ_X_MTF_6 41 +#define BZ_X_ENDHDR_2 42 +#define BZ_X_ENDHDR_3 43 +#define BZ_X_ENDHDR_4 44 +#define BZ_X_ENDHDR_5 45 +#define BZ_X_ENDHDR_6 46 +#define BZ_X_CCRC_1 47 +#define BZ_X_CCRC_2 48 +#define BZ_X_CCRC_3 49 +#define BZ_X_CCRC_4 50 + + + +/*-- Constants for the fast MTF decoder. --*/ + +#define MTFA_SIZE 4096 +#define MTFL_SIZE 16 + + + +/*-- Structure holding all the decompression-side stuff. --*/ + +typedef + struct { + /* pointer back to the struct bz_stream */ + bz_stream* strm; + + /* state indicator for this stream */ + Int32 state; + + /* for doing the final run-length decoding */ + UChar state_out_ch; + Int32 state_out_len; + Bool blockRandomised; + BZ_RAND_DECLS; + + /* the buffer for bit stream reading */ + UInt32 bsBuff; + Int32 bsLive; + + /* misc administratium */ + Int32 blockSize100k; + Bool smallDecompress; + Int32 currBlockNo; + Int32 verbosity; + + /* for undoing the Burrows-Wheeler transform */ + Int32 origPtr; + UInt32 tPos; + Int32 k0; + Int32 unzftab[256]; + Int32 nblock_used; + Int32 cftab[257]; + Int32 cftabCopy[257]; + + /* for undoing the Burrows-Wheeler transform (FAST) */ + UInt32 *tt; + + /* for undoing the Burrows-Wheeler transform (SMALL) */ + UInt16 *ll16; + UChar *ll4; + + /* stored and calculated CRCs */ + UInt32 storedBlockCRC; + UInt32 storedCombinedCRC; + UInt32 calculatedBlockCRC; + UInt32 calculatedCombinedCRC; + + /* map of bytes used in block */ + Int32 nInUse; + Bool inUse[256]; + Bool inUse16[16]; + UChar seqToUnseq[256]; + + /* for decoding the MTF values */ + UChar mtfa [MTFA_SIZE]; + Int32 mtfbase[256 / MTFL_SIZE]; + UChar selector [BZ_MAX_SELECTORS]; + UChar selectorMtf[BZ_MAX_SELECTORS]; + UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + + Int32 limit [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; + Int32 minLens[BZ_N_GROUPS]; + + /* save area for scalars in the main decompress code */ + Int32 save_i; + Int32 save_j; + Int32 save_t; + Int32 save_alphaSize; + Int32 save_nGroups; + Int32 save_nSelectors; + Int32 save_EOB; + Int32 save_groupNo; + Int32 save_groupPos; + Int32 save_nextSym; + Int32 save_nblockMAX; + Int32 save_nblock; + Int32 save_es; + Int32 save_N; + Int32 save_curr; + Int32 save_zt; + Int32 save_zn; + Int32 save_zvec; + Int32 save_zj; + Int32 save_gSel; + Int32 save_gMinlen; + Int32* save_gLimit; + Int32* save_gBase; + Int32* save_gPerm; + + } + DState; + + + +/*-- Macros for decompression. --*/ + +#define BZ_GET_FAST(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \ + s->tPos = s->tt[s->tPos]; \ + cccc = (UChar)(s->tPos & 0xff); \ + s->tPos >>= 8; + +#define BZ_GET_FAST_C(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) return True; \ + c_tPos = c_tt[c_tPos]; \ + cccc = (UChar)(c_tPos & 0xff); \ + c_tPos >>= 8; + +#define SET_LL4(i,n) \ + { if (((i) & 0x1) == 0) \ + s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \ + s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \ + } + +#define GET_LL4(i) \ + ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF) + +#define SET_LL(i,n) \ + { s->ll16[i] = (UInt16)(n & 0x0000ffff); \ + SET_LL4(i, n >> 16); \ + } + +#define GET_LL(i) \ + (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16)) + +#define BZ_GET_SMALL(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \ + cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \ + s->tPos = GET_LL(s->tPos); + + +/*-- externs for decompression. --*/ + +extern Int32 +BZ2_indexIntoF ( Int32, Int32* ); + +extern Int32 +BZ2_decompress ( DState* ); + +extern void +BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*, + Int32, Int32, Int32 ); + + +#endif + + +/*-- BZ_NO_STDIO seems to make NULL disappear on some platforms. --*/ + +#ifdef BZ_NO_STDIO +#ifndef NULL +#define NULL 0 +#endif +#endif + + +/*-------------------------------------------------------------*/ +/*--- end bzlib_private.h ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore new file mode 100644 index 0000000..d314043 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore @@ -0,0 +1,61 @@ +#!/bin/sh + +# Bzmore wrapped for bzip2, +# adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. + +PATH="/usr/bin:$PATH"; export PATH + +prog=`echo $0 | sed 's|.*/||'` +case "$prog" in + *less) more=less ;; + *) more=more ;; +esac + +if test "`echo -n a`" = "-n a"; then + # looks like a SysV system: + n1=''; n2='\c' +else + n1='-n'; n2='' +fi +oldtty=`stty -g 2>/dev/null` +if stty -cbreak 2>/dev/null; then + cb='cbreak'; ncb='-cbreak' +else + # 'stty min 1' resets eof to ^a on both SunOS and SysV! + cb='min 1 -icanon'; ncb='icanon eof ^d' +fi +if test $? -eq 0 -a -n "$oldtty"; then + trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15 +else + trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15 +fi + +if test $# = 0; then + if test -t 0; then + echo usage: $prog files... + else + bzip2 -cdfq | eval $more + fi +else + FIRST=1 + for FILE + do + if test $FIRST -eq 0; then + echo $n1 "--More--(Next file: $FILE)$n2" + stty $cb -echo 2>/dev/null + ANS=`dd bs=1 count=1 2>/dev/null` + stty $ncb echo 2>/dev/null + echo " " + if test "$ANS" = 'e' -o "$ANS" = 'q'; then + exit + fi + fi + if test "$ANS" != 's'; then + echo "------> $FILE <------" + bzip2 -cdfq "$FILE" | eval $more + fi + if test -t; then + FIRST=0 + fi + done +fi diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore.1 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore.1 new file mode 100644 index 0000000..b437d3b --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/bzmore.1 @@ -0,0 +1,152 @@ +.\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org> +.\"for Debian GNU/Linux +.TH BZMORE 1 +.SH NAME +bzmore, bzless \- file perusal filter for crt viewing of bzip2 compressed text +.SH SYNOPSIS +.B bzmore +[ name ... ] +.br +.B bzless +[ name ... ] +.SH NOTE +In the following description, +.I bzless +and +.I less +can be used interchangeably with +.I bzmore +and +.I more. +.SH DESCRIPTION +.I Bzmore +is a filter which allows examination of compressed or plain text files +one screenful at a time on a soft-copy terminal. +.I bzmore +works on files compressed with +.I bzip2 +and also on uncompressed files. +If a file does not exist, +.I bzmore +looks for a file of the same name with the addition of a .bz2 suffix. +.PP +.I Bzmore +normally pauses after each screenful, printing --More-- +at the bottom of the screen. +If the user then types a carriage return, one more line is displayed. +If the user hits a space, +another screenful is displayed. Other possibilities are enumerated later. +.PP +.I Bzmore +looks in the file +.I /etc/termcap +to determine terminal characteristics, +and to determine the default window size. +On a terminal capable of displaying 24 lines, +the default window size is 22 lines. +Other sequences which may be typed when +.I bzmore +pauses, and their effects, are as follows (\fIi\fP is an optional integer +argument, defaulting to 1) : +.PP +.IP \fIi\|\fP<space> +display +.I i +more lines, (or another screenful if no argument is given) +.PP +.IP ^D +display 11 more lines (a ``scroll''). +If +.I i +is given, then the scroll size is set to \fIi\|\fP. +.PP +.IP d +same as ^D (control-D) +.PP +.IP \fIi\|\fPz +same as typing a space except that \fIi\|\fP, if present, becomes the new +window size. Note that the window size reverts back to the default at the +end of the current file. +.PP +.IP \fIi\|\fPs +skip \fIi\|\fP lines and print a screenful of lines +.PP +.IP \fIi\|\fPf +skip \fIi\fP screenfuls and print a screenful of lines +.PP +.IP "q or Q" +quit reading the current file; go on to the next (if any) +.PP +.IP "e or q" +When the prompt --More--(Next file: +.IR file ) +is printed, this command causes bzmore to exit. +.PP +.IP s +When the prompt --More--(Next file: +.IR file ) +is printed, this command causes bzmore to skip the next file and continue. +.PP +.IP = +Display the current line number. +.PP +.IP \fIi\|\fP/expr +search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP +If the pattern is not found, +.I bzmore +goes on to the next file (if any). +Otherwise, a screenful is displayed, starting two lines before the place +where the expression was found. +The user's erase and kill characters may be used to edit the regular +expression. +Erasing back past the first column cancels the search command. +.PP +.IP \fIi\|\fPn +search for the \fIi\|\fP-th occurrence of the last regular expression entered. +.PP +.IP !command +invoke a shell with \fIcommand\|\fP. +The character `!' in "command" are replaced with the +previous shell command. The sequence "\\!" is replaced by "!". +.PP +.IP ":q or :Q" +quit reading the current file; go on to the next (if any) +(same as q or Q). +.PP +.IP . +(dot) repeat the previous command. +.PP +The commands take effect immediately, i.e., it is not necessary to +type a carriage return. +Up to the time when the command character itself is given, +the user may hit the line kill character to cancel the numerical +argument being formed. +In addition, the user may hit the erase character to redisplay the +--More-- message. +.PP +At any time when output is being sent to the terminal, the user can +hit the quit key (normally control\-\\). +.I Bzmore +will stop sending output, and will display the usual --More-- +prompt. +The user may then enter one of the above commands in the normal manner. +Unfortunately, some output is lost when this is done, due to the +fact that any characters waiting in the terminal's output queue +are flushed when the quit signal occurs. +.PP +The terminal is set to +.I noecho +mode by this program so that the output can be continuous. +What you type will thus not show on your terminal, except for the / and ! +commands. +.PP +If the standard output is not a teletype, then +.I bzmore +acts just like +.I bzcat, +except that a header is printed before each file. +.SH FILES +.DT +/etc/termcap Terminal data base +.SH "SEE ALSO" +more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1) diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/crctable.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/crctable.c new file mode 100644 index 0000000..1fea7e9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/crctable.c @@ -0,0 +1,104 @@ + +/*-------------------------------------------------------------*/ +/*--- Table for doing CRCs ---*/ +/*--- crctable.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include "bzlib_private.h" + +/*-- + I think this is an implementation of the AUTODIN-II, + Ethernet & FDDI 32-bit CRC standard. Vaguely derived + from code by Rob Warnock, in Section 51 of the + comp.compression FAQ. +--*/ + +UInt32 BZ2_crc32Table[256] = { + + /*-- Ugly, innit? --*/ + + 0x00000000L, 0x04c11db7L, 0x09823b6eL, 0x0d4326d9L, + 0x130476dcL, 0x17c56b6bL, 0x1a864db2L, 0x1e475005L, + 0x2608edb8L, 0x22c9f00fL, 0x2f8ad6d6L, 0x2b4bcb61L, + 0x350c9b64L, 0x31cd86d3L, 0x3c8ea00aL, 0x384fbdbdL, + 0x4c11db70L, 0x48d0c6c7L, 0x4593e01eL, 0x4152fda9L, + 0x5f15adacL, 0x5bd4b01bL, 0x569796c2L, 0x52568b75L, + 0x6a1936c8L, 0x6ed82b7fL, 0x639b0da6L, 0x675a1011L, + 0x791d4014L, 0x7ddc5da3L, 0x709f7b7aL, 0x745e66cdL, + 0x9823b6e0L, 0x9ce2ab57L, 0x91a18d8eL, 0x95609039L, + 0x8b27c03cL, 0x8fe6dd8bL, 0x82a5fb52L, 0x8664e6e5L, + 0xbe2b5b58L, 0xbaea46efL, 0xb7a96036L, 0xb3687d81L, + 0xad2f2d84L, 0xa9ee3033L, 0xa4ad16eaL, 0xa06c0b5dL, + 0xd4326d90L, 0xd0f37027L, 0xddb056feL, 0xd9714b49L, + 0xc7361b4cL, 0xc3f706fbL, 0xceb42022L, 0xca753d95L, + 0xf23a8028L, 0xf6fb9d9fL, 0xfbb8bb46L, 0xff79a6f1L, + 0xe13ef6f4L, 0xe5ffeb43L, 0xe8bccd9aL, 0xec7dd02dL, + 0x34867077L, 0x30476dc0L, 0x3d044b19L, 0x39c556aeL, + 0x278206abL, 0x23431b1cL, 0x2e003dc5L, 0x2ac12072L, + 0x128e9dcfL, 0x164f8078L, 0x1b0ca6a1L, 0x1fcdbb16L, + 0x018aeb13L, 0x054bf6a4L, 0x0808d07dL, 0x0cc9cdcaL, + 0x7897ab07L, 0x7c56b6b0L, 0x71159069L, 0x75d48ddeL, + 0x6b93dddbL, 0x6f52c06cL, 0x6211e6b5L, 0x66d0fb02L, + 0x5e9f46bfL, 0x5a5e5b08L, 0x571d7dd1L, 0x53dc6066L, + 0x4d9b3063L, 0x495a2dd4L, 0x44190b0dL, 0x40d816baL, + 0xaca5c697L, 0xa864db20L, 0xa527fdf9L, 0xa1e6e04eL, + 0xbfa1b04bL, 0xbb60adfcL, 0xb6238b25L, 0xb2e29692L, + 0x8aad2b2fL, 0x8e6c3698L, 0x832f1041L, 0x87ee0df6L, + 0x99a95df3L, 0x9d684044L, 0x902b669dL, 0x94ea7b2aL, + 0xe0b41de7L, 0xe4750050L, 0xe9362689L, 0xedf73b3eL, + 0xf3b06b3bL, 0xf771768cL, 0xfa325055L, 0xfef34de2L, + 0xc6bcf05fL, 0xc27dede8L, 0xcf3ecb31L, 0xcbffd686L, + 0xd5b88683L, 0xd1799b34L, 0xdc3abdedL, 0xd8fba05aL, + 0x690ce0eeL, 0x6dcdfd59L, 0x608edb80L, 0x644fc637L, + 0x7a089632L, 0x7ec98b85L, 0x738aad5cL, 0x774bb0ebL, + 0x4f040d56L, 0x4bc510e1L, 0x46863638L, 0x42472b8fL, + 0x5c007b8aL, 0x58c1663dL, 0x558240e4L, 0x51435d53L, + 0x251d3b9eL, 0x21dc2629L, 0x2c9f00f0L, 0x285e1d47L, + 0x36194d42L, 0x32d850f5L, 0x3f9b762cL, 0x3b5a6b9bL, + 0x0315d626L, 0x07d4cb91L, 0x0a97ed48L, 0x0e56f0ffL, + 0x1011a0faL, 0x14d0bd4dL, 0x19939b94L, 0x1d528623L, + 0xf12f560eL, 0xf5ee4bb9L, 0xf8ad6d60L, 0xfc6c70d7L, + 0xe22b20d2L, 0xe6ea3d65L, 0xeba91bbcL, 0xef68060bL, + 0xd727bbb6L, 0xd3e6a601L, 0xdea580d8L, 0xda649d6fL, + 0xc423cd6aL, 0xc0e2d0ddL, 0xcda1f604L, 0xc960ebb3L, + 0xbd3e8d7eL, 0xb9ff90c9L, 0xb4bcb610L, 0xb07daba7L, + 0xae3afba2L, 0xaafbe615L, 0xa7b8c0ccL, 0xa379dd7bL, + 0x9b3660c6L, 0x9ff77d71L, 0x92b45ba8L, 0x9675461fL, + 0x8832161aL, 0x8cf30badL, 0x81b02d74L, 0x857130c3L, + 0x5d8a9099L, 0x594b8d2eL, 0x5408abf7L, 0x50c9b640L, + 0x4e8ee645L, 0x4a4ffbf2L, 0x470cdd2bL, 0x43cdc09cL, + 0x7b827d21L, 0x7f436096L, 0x7200464fL, 0x76c15bf8L, + 0x68860bfdL, 0x6c47164aL, 0x61043093L, 0x65c52d24L, + 0x119b4be9L, 0x155a565eL, 0x18197087L, 0x1cd86d30L, + 0x029f3d35L, 0x065e2082L, 0x0b1d065bL, 0x0fdc1becL, + 0x3793a651L, 0x3352bbe6L, 0x3e119d3fL, 0x3ad08088L, + 0x2497d08dL, 0x2056cd3aL, 0x2d15ebe3L, 0x29d4f654L, + 0xc5a92679L, 0xc1683bceL, 0xcc2b1d17L, 0xc8ea00a0L, + 0xd6ad50a5L, 0xd26c4d12L, 0xdf2f6bcbL, 0xdbee767cL, + 0xe3a1cbc1L, 0xe760d676L, 0xea23f0afL, 0xeee2ed18L, + 0xf0a5bd1dL, 0xf464a0aaL, 0xf9278673L, 0xfde69bc4L, + 0x89b8fd09L, 0x8d79e0beL, 0x803ac667L, 0x84fbdbd0L, + 0x9abc8bd5L, 0x9e7d9662L, 0x933eb0bbL, 0x97ffad0cL, + 0xafb010b1L, 0xab710d06L, 0xa6322bdfL, 0xa2f33668L, + 0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L +}; + + +/*-------------------------------------------------------------*/ +/*--- end crctable.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/decompress.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/decompress.c new file mode 100644 index 0000000..311f566 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/decompress.c @@ -0,0 +1,646 @@ + +/*-------------------------------------------------------------*/ +/*--- Decompression machinery ---*/ +/*--- decompress.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include "bzlib_private.h" + + +/*---------------------------------------------------*/ +static +void makeMaps_d ( DState* s ) +{ + Int32 i; + s->nInUse = 0; + for (i = 0; i < 256; i++) + if (s->inUse[i]) { + s->seqToUnseq[s->nInUse] = i; + s->nInUse++; + } +} + + +/*---------------------------------------------------*/ +#define RETURN(rrr) \ + { retVal = rrr; goto save_state_and_return; }; + +#define GET_BITS(lll,vvv,nnn) \ + case lll: s->state = lll; \ + while (True) { \ + if (s->bsLive >= nnn) { \ + UInt32 v; \ + v = (s->bsBuff >> \ + (s->bsLive-nnn)) & ((1 << nnn)-1); \ + s->bsLive -= nnn; \ + vvv = v; \ + break; \ + } \ + if (s->strm->avail_in == 0) RETURN(BZ_OK); \ + s->bsBuff \ + = (s->bsBuff << 8) | \ + ((UInt32) \ + (*((UChar*)(s->strm->next_in)))); \ + s->bsLive += 8; \ + s->strm->next_in++; \ + s->strm->avail_in--; \ + s->strm->total_in_lo32++; \ + if (s->strm->total_in_lo32 == 0) \ + s->strm->total_in_hi32++; \ + } + +#define GET_UCHAR(lll,uuu) \ + GET_BITS(lll,uuu,8) + +#define GET_BIT(lll,uuu) \ + GET_BITS(lll,uuu,1) + +/*---------------------------------------------------*/ +#define GET_MTF_VAL(label1,label2,lval) \ +{ \ + if (groupPos == 0) { \ + groupNo++; \ + if (groupNo >= nSelectors) \ + RETURN(BZ_DATA_ERROR); \ + groupPos = BZ_G_SIZE; \ + gSel = s->selector[groupNo]; \ + gMinlen = s->minLens[gSel]; \ + gLimit = &(s->limit[gSel][0]); \ + gPerm = &(s->perm[gSel][0]); \ + gBase = &(s->base[gSel][0]); \ + } \ + groupPos--; \ + zn = gMinlen; \ + GET_BITS(label1, zvec, zn); \ + while (1) { \ + if (zn > 20 /* the longest code */) \ + RETURN(BZ_DATA_ERROR); \ + if (zvec <= gLimit[zn]) break; \ + zn++; \ + GET_BIT(label2, zj); \ + zvec = (zvec << 1) | zj; \ + }; \ + if (zvec - gBase[zn] < 0 \ + || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \ + RETURN(BZ_DATA_ERROR); \ + lval = gPerm[zvec - gBase[zn]]; \ +} + + +/*---------------------------------------------------*/ +Int32 BZ2_decompress ( DState* s ) +{ + UChar uc; + Int32 retVal; + Int32 minLen, maxLen; + bz_stream* strm = s->strm; + + /* stuff that needs to be saved/restored */ + Int32 i; + Int32 j; + Int32 t; + Int32 alphaSize; + Int32 nGroups; + Int32 nSelectors; + Int32 EOB; + Int32 groupNo; + Int32 groupPos; + Int32 nextSym; + Int32 nblockMAX; + Int32 nblock; + Int32 es; + Int32 N; + Int32 curr; + Int32 zt; + Int32 zn; + Int32 zvec; + Int32 zj; + Int32 gSel; + Int32 gMinlen; + Int32* gLimit; + Int32* gBase; + Int32* gPerm; + + if (s->state == BZ_X_MAGIC_1) { + /*initialise the save area*/ + s->save_i = 0; + s->save_j = 0; + s->save_t = 0; + s->save_alphaSize = 0; + s->save_nGroups = 0; + s->save_nSelectors = 0; + s->save_EOB = 0; + s->save_groupNo = 0; + s->save_groupPos = 0; + s->save_nextSym = 0; + s->save_nblockMAX = 0; + s->save_nblock = 0; + s->save_es = 0; + s->save_N = 0; + s->save_curr = 0; + s->save_zt = 0; + s->save_zn = 0; + s->save_zvec = 0; + s->save_zj = 0; + s->save_gSel = 0; + s->save_gMinlen = 0; + s->save_gLimit = NULL; + s->save_gBase = NULL; + s->save_gPerm = NULL; + } + + /*restore from the save area*/ + i = s->save_i; + j = s->save_j; + t = s->save_t; + alphaSize = s->save_alphaSize; + nGroups = s->save_nGroups; + nSelectors = s->save_nSelectors; + EOB = s->save_EOB; + groupNo = s->save_groupNo; + groupPos = s->save_groupPos; + nextSym = s->save_nextSym; + nblockMAX = s->save_nblockMAX; + nblock = s->save_nblock; + es = s->save_es; + N = s->save_N; + curr = s->save_curr; + zt = s->save_zt; + zn = s->save_zn; + zvec = s->save_zvec; + zj = s->save_zj; + gSel = s->save_gSel; + gMinlen = s->save_gMinlen; + gLimit = s->save_gLimit; + gBase = s->save_gBase; + gPerm = s->save_gPerm; + + retVal = BZ_OK; + + switch (s->state) { + + GET_UCHAR(BZ_X_MAGIC_1, uc); + if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC); + + GET_UCHAR(BZ_X_MAGIC_2, uc); + if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC); + + GET_UCHAR(BZ_X_MAGIC_3, uc) + if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC); + + GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8) + if (s->blockSize100k < (BZ_HDR_0 + 1) || + s->blockSize100k > (BZ_HDR_0 + 9)) RETURN(BZ_DATA_ERROR_MAGIC); + s->blockSize100k -= BZ_HDR_0; + + if (s->smallDecompress) { + s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); + s->ll4 = BZALLOC( + ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) + ); + if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR); + } else { + s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); + if (s->tt == NULL) RETURN(BZ_MEM_ERROR); + } + + GET_UCHAR(BZ_X_BLKHDR_1, uc); + + if (uc == 0x17) goto endhdr_2; + if (uc != 0x31) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_BLKHDR_2, uc); + if (uc != 0x41) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_BLKHDR_3, uc); + if (uc != 0x59) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_BLKHDR_4, uc); + if (uc != 0x26) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_BLKHDR_5, uc); + if (uc != 0x53) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_BLKHDR_6, uc); + if (uc != 0x59) RETURN(BZ_DATA_ERROR); + + s->currBlockNo++; + if (s->verbosity >= 2) + VPrintf1 ( "\n [%d: huff+mtf ", s->currBlockNo ); + + s->storedBlockCRC = 0; + GET_UCHAR(BZ_X_BCRC_1, uc); + s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); + GET_UCHAR(BZ_X_BCRC_2, uc); + s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); + GET_UCHAR(BZ_X_BCRC_3, uc); + s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); + GET_UCHAR(BZ_X_BCRC_4, uc); + s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); + + GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1); + + s->origPtr = 0; + GET_UCHAR(BZ_X_ORIGPTR_1, uc); + s->origPtr = (s->origPtr << 8) | ((Int32)uc); + GET_UCHAR(BZ_X_ORIGPTR_2, uc); + s->origPtr = (s->origPtr << 8) | ((Int32)uc); + GET_UCHAR(BZ_X_ORIGPTR_3, uc); + s->origPtr = (s->origPtr << 8) | ((Int32)uc); + + if (s->origPtr < 0) + RETURN(BZ_DATA_ERROR); + if (s->origPtr > 10 + 100000*s->blockSize100k) + RETURN(BZ_DATA_ERROR); + + /*--- Receive the mapping table ---*/ + for (i = 0; i < 16; i++) { + GET_BIT(BZ_X_MAPPING_1, uc); + if (uc == 1) + s->inUse16[i] = True; else + s->inUse16[i] = False; + } + + for (i = 0; i < 256; i++) s->inUse[i] = False; + + for (i = 0; i < 16; i++) + if (s->inUse16[i]) + for (j = 0; j < 16; j++) { + GET_BIT(BZ_X_MAPPING_2, uc); + if (uc == 1) s->inUse[i * 16 + j] = True; + } + makeMaps_d ( s ); + if (s->nInUse == 0) RETURN(BZ_DATA_ERROR); + alphaSize = s->nInUse+2; + + /*--- Now the selectors ---*/ + GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); + if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); + GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); + if (nSelectors < 1) RETURN(BZ_DATA_ERROR); + for (i = 0; i < nSelectors; i++) { + j = 0; + while (True) { + GET_BIT(BZ_X_SELECTOR_3, uc); + if (uc == 0) break; + j++; + if (j >= nGroups) RETURN(BZ_DATA_ERROR); + } + s->selectorMtf[i] = j; + } + + /*--- Undo the MTF values for the selectors. ---*/ + { + UChar pos[BZ_N_GROUPS], tmp, v; + for (v = 0; v < nGroups; v++) pos[v] = v; + + for (i = 0; i < nSelectors; i++) { + v = s->selectorMtf[i]; + tmp = pos[v]; + while (v > 0) { pos[v] = pos[v-1]; v--; } + pos[0] = tmp; + s->selector[i] = tmp; + } + } + + /*--- Now the coding tables ---*/ + for (t = 0; t < nGroups; t++) { + GET_BITS(BZ_X_CODING_1, curr, 5); + for (i = 0; i < alphaSize; i++) { + while (True) { + if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR); + GET_BIT(BZ_X_CODING_2, uc); + if (uc == 0) break; + GET_BIT(BZ_X_CODING_3, uc); + if (uc == 0) curr++; else curr--; + } + s->len[t][i] = curr; + } + } + + /*--- Create the Huffman decoding tables ---*/ + for (t = 0; t < nGroups; t++) { + minLen = 32; + maxLen = 0; + for (i = 0; i < alphaSize; i++) { + if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; + if (s->len[t][i] < minLen) minLen = s->len[t][i]; + } + BZ2_hbCreateDecodeTables ( + &(s->limit[t][0]), + &(s->base[t][0]), + &(s->perm[t][0]), + &(s->len[t][0]), + minLen, maxLen, alphaSize + ); + s->minLens[t] = minLen; + } + + /*--- Now the MTF values ---*/ + + EOB = s->nInUse+1; + nblockMAX = 100000 * s->blockSize100k; + groupNo = -1; + groupPos = 0; + + for (i = 0; i <= 255; i++) s->unzftab[i] = 0; + + /*-- MTF init --*/ + { + Int32 ii, jj, kk; + kk = MTFA_SIZE-1; + for (ii = 256 / MTFL_SIZE - 1; ii >= 0; ii--) { + for (jj = MTFL_SIZE-1; jj >= 0; jj--) { + s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj); + kk--; + } + s->mtfbase[ii] = kk + 1; + } + } + /*-- end MTF init --*/ + + nblock = 0; + GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); + + while (True) { + + if (nextSym == EOB) break; + + if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) { + + es = -1; + N = 1; + do { + /* Check that N doesn't get too big, so that es doesn't + go negative. The maximum value that can be + RUNA/RUNB encoded is equal to the block size (post + the initial RLE), viz, 900k, so bounding N at 2 + million should guard against overflow without + rejecting any legitimate inputs. */ + if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR); + if (nextSym == BZ_RUNA) es = es + (0+1) * N; else + if (nextSym == BZ_RUNB) es = es + (1+1) * N; + N = N * 2; + GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym); + } + while (nextSym == BZ_RUNA || nextSym == BZ_RUNB); + + es++; + uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ]; + s->unzftab[uc] += es; + + if (s->smallDecompress) + while (es > 0) { + if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); + s->ll16[nblock] = (UInt16)uc; + nblock++; + es--; + } + else + while (es > 0) { + if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); + s->tt[nblock] = (UInt32)uc; + nblock++; + es--; + }; + + continue; + + } else { + + if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR); + + /*-- uc = MTF ( nextSym-1 ) --*/ + { + Int32 ii, jj, kk, pp, lno, off; + UInt32 nn; + nn = (UInt32)(nextSym - 1); + + if (nn < MTFL_SIZE) { + /* avoid general-case expense */ + pp = s->mtfbase[0]; + uc = s->mtfa[pp+nn]; + while (nn > 3) { + Int32 z = pp+nn; + s->mtfa[(z) ] = s->mtfa[(z)-1]; + s->mtfa[(z)-1] = s->mtfa[(z)-2]; + s->mtfa[(z)-2] = s->mtfa[(z)-3]; + s->mtfa[(z)-3] = s->mtfa[(z)-4]; + nn -= 4; + } + while (nn > 0) { + s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; + }; + s->mtfa[pp] = uc; + } else { + /* general case */ + lno = nn / MTFL_SIZE; + off = nn % MTFL_SIZE; + pp = s->mtfbase[lno] + off; + uc = s->mtfa[pp]; + while (pp > s->mtfbase[lno]) { + s->mtfa[pp] = s->mtfa[pp-1]; pp--; + }; + s->mtfbase[lno]++; + while (lno > 0) { + s->mtfbase[lno]--; + s->mtfa[s->mtfbase[lno]] + = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1]; + lno--; + } + s->mtfbase[0]--; + s->mtfa[s->mtfbase[0]] = uc; + if (s->mtfbase[0] == 0) { + kk = MTFA_SIZE-1; + for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) { + for (jj = MTFL_SIZE-1; jj >= 0; jj--) { + s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; + kk--; + } + s->mtfbase[ii] = kk + 1; + } + } + } + } + /*-- end uc = MTF ( nextSym-1 ) --*/ + + s->unzftab[s->seqToUnseq[uc]]++; + if (s->smallDecompress) + s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]); else + s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]); + nblock++; + + GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym); + continue; + } + } + + /* Now we know what nblock is, we can do a better sanity + check on s->origPtr. + */ + if (s->origPtr < 0 || s->origPtr >= nblock) + RETURN(BZ_DATA_ERROR); + + /*-- Set up cftab to facilitate generation of T^(-1) --*/ + /* Check: unzftab entries in range. */ + for (i = 0; i <= 255; i++) { + if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) + RETURN(BZ_DATA_ERROR); + } + /* Actually generate cftab. */ + s->cftab[0] = 0; + for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; + for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; + /* Check: cftab entries in range. */ + for (i = 0; i <= 256; i++) { + if (s->cftab[i] < 0 || s->cftab[i] > nblock) { + /* s->cftab[i] can legitimately be == nblock */ + RETURN(BZ_DATA_ERROR); + } + } + /* Check: cftab entries non-descending. */ + for (i = 1; i <= 256; i++) { + if (s->cftab[i-1] > s->cftab[i]) { + RETURN(BZ_DATA_ERROR); + } + } + + s->state_out_len = 0; + s->state_out_ch = 0; + BZ_INITIALISE_CRC ( s->calculatedBlockCRC ); + s->state = BZ_X_OUTPUT; + if (s->verbosity >= 2) VPrintf0 ( "rt+rld" ); + + if (s->smallDecompress) { + + /*-- Make a copy of cftab, used in generation of T --*/ + for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i]; + + /*-- compute the T vector --*/ + for (i = 0; i < nblock; i++) { + uc = (UChar)(s->ll16[i]); + SET_LL(i, s->cftabCopy[uc]); + s->cftabCopy[uc]++; + } + + /*-- Compute T^(-1) by pointer reversal on T --*/ + i = s->origPtr; + j = GET_LL(i); + do { + Int32 tmp = GET_LL(j); + SET_LL(j, i); + i = j; + j = tmp; + } + while (i != s->origPtr); + + s->tPos = s->origPtr; + s->nblock_used = 0; + if (s->blockRandomised) { + BZ_RAND_INIT_MASK; + BZ_GET_SMALL(s->k0); s->nblock_used++; + BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; + } else { + BZ_GET_SMALL(s->k0); s->nblock_used++; + } + + } else { + + /*-- compute the T^(-1) vector --*/ + for (i = 0; i < nblock; i++) { + uc = (UChar)(s->tt[i] & 0xff); + s->tt[s->cftab[uc]] |= (i << 8); + s->cftab[uc]++; + } + + s->tPos = s->tt[s->origPtr] >> 8; + s->nblock_used = 0; + if (s->blockRandomised) { + BZ_RAND_INIT_MASK; + BZ_GET_FAST(s->k0); s->nblock_used++; + BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; + } else { + BZ_GET_FAST(s->k0); s->nblock_used++; + } + + } + + RETURN(BZ_OK); + + + + endhdr_2: + + GET_UCHAR(BZ_X_ENDHDR_2, uc); + if (uc != 0x72) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_ENDHDR_3, uc); + if (uc != 0x45) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_ENDHDR_4, uc); + if (uc != 0x38) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_ENDHDR_5, uc); + if (uc != 0x50) RETURN(BZ_DATA_ERROR); + GET_UCHAR(BZ_X_ENDHDR_6, uc); + if (uc != 0x90) RETURN(BZ_DATA_ERROR); + + s->storedCombinedCRC = 0; + GET_UCHAR(BZ_X_CCRC_1, uc); + s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); + GET_UCHAR(BZ_X_CCRC_2, uc); + s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); + GET_UCHAR(BZ_X_CCRC_3, uc); + s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); + GET_UCHAR(BZ_X_CCRC_4, uc); + s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); + + s->state = BZ_X_IDLE; + RETURN(BZ_STREAM_END); + + default: AssertH ( False, 4001 ); + } + + AssertH ( False, 4002 ); + + save_state_and_return: + + s->save_i = i; + s->save_j = j; + s->save_t = t; + s->save_alphaSize = alphaSize; + s->save_nGroups = nGroups; + s->save_nSelectors = nSelectors; + s->save_EOB = EOB; + s->save_groupNo = groupNo; + s->save_groupPos = groupPos; + s->save_nextSym = nextSym; + s->save_nblockMAX = nblockMAX; + s->save_nblock = nblock; + s->save_es = es; + s->save_N = N; + s->save_curr = curr; + s->save_zt = zt; + s->save_zn = zn; + s->save_zvec = zvec; + s->save_zj = zj; + s->save_gSel = gSel; + s->save_gMinlen = gMinlen; + s->save_gLimit = gLimit; + s->save_gBase = gBase; + s->save_gPerm = gPerm; + + return retVal; +} + + +/*-------------------------------------------------------------*/ +/*--- end decompress.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.c new file mode 100644 index 0000000..03fa146 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.c @@ -0,0 +1,175 @@ +/* + minibz2 + libbz2.dll test program. + by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) + This file is Public Domain. Welcome any email to me. + + usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename] +*/ + +#define BZ_IMPORT +#include <stdio.h> +#include <stdlib.h> +#include "bzlib.h" +#ifdef _WIN32 +#include <io.h> +#endif + + +#ifdef _WIN32 + +#define BZ2_LIBNAME "libbz2-1.0.2.DLL" + +#include <windows.h> +static int BZ2DLLLoaded = 0; +static HINSTANCE BZ2DLLhLib; +int BZ2DLLLoadLibrary(void) +{ + HINSTANCE hLib; + + if(BZ2DLLLoaded==1){return 0;} + hLib=LoadLibrary(BZ2_LIBNAME); + if(hLib == NULL){ + fprintf(stderr,"Can't load %s\n",BZ2_LIBNAME); + return -1; + } + BZ2_bzlibVersion=GetProcAddress(hLib,"BZ2_bzlibVersion"); + BZ2_bzopen=GetProcAddress(hLib,"BZ2_bzopen"); + BZ2_bzdopen=GetProcAddress(hLib,"BZ2_bzdopen"); + BZ2_bzread=GetProcAddress(hLib,"BZ2_bzread"); + BZ2_bzwrite=GetProcAddress(hLib,"BZ2_bzwrite"); + BZ2_bzflush=GetProcAddress(hLib,"BZ2_bzflush"); + BZ2_bzclose=GetProcAddress(hLib,"BZ2_bzclose"); + BZ2_bzerror=GetProcAddress(hLib,"BZ2_bzerror"); + + if (!BZ2_bzlibVersion || !BZ2_bzopen || !BZ2_bzdopen + || !BZ2_bzread || !BZ2_bzwrite || !BZ2_bzflush + || !BZ2_bzclose || !BZ2_bzerror) { + fprintf(stderr,"GetProcAddress failed.\n"); + return -1; + } + BZ2DLLLoaded=1; + BZ2DLLhLib=hLib; + return 0; + +} +int BZ2DLLFreeLibrary(void) +{ + if(BZ2DLLLoaded==0){return 0;} + FreeLibrary(BZ2DLLhLib); + BZ2DLLLoaded=0; +} +#endif /* WIN32 */ + +void usage(void) +{ + puts("usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename]"); +} + +int main(int argc,char *argv[]) +{ + int decompress = 0; + int level = 9; + char *fn_r = NULL; + char *fn_w = NULL; + +#ifdef _WIN32 + if(BZ2DLLLoadLibrary()<0){ + fprintf(stderr,"Loading of %s failed. Giving up.\n", BZ2_LIBNAME); + exit(1); + } + printf("Loading of %s succeeded. Library version is %s.\n", + BZ2_LIBNAME, BZ2_bzlibVersion() ); +#endif + while(++argv,--argc){ + if(**argv =='-' || **argv=='/'){ + char *p; + + for(p=*argv+1;*p;p++){ + if(*p=='d'){ + decompress = 1; + }else if('1'<=*p && *p<='9'){ + level = *p - '0'; + }else{ + usage(); + exit(1); + } + } + }else{ + break; + } + } + if(argc>=1){ + fn_r = *argv; + argc--;argv++; + }else{ + fn_r = NULL; + } + if(argc>=1){ + fn_w = *argv; + argc--;argv++; + }else{ + fn_w = NULL; + } + { + int len; + char buff[0x1000]; + char mode[10]; + + if(decompress){ + BZFILE *BZ2fp_r = NULL; + FILE *fp_w = NULL; + + if(fn_w){ + if((fp_w = fopen(fn_w,"wb"))==NULL){ + printf("can't open [%s]\n",fn_w); + perror("reason:"); + exit(1); + } + }else{ + fp_w = stdout; + } + if((fn_r == NULL && (BZ2fp_r = BZ2_bzdopen(fileno(stdin),"rb"))==NULL) + || (fn_r != NULL && (BZ2fp_r = BZ2_bzopen(fn_r,"rb"))==NULL)){ + printf("can't bz2openstream\n"); + exit(1); + } + while((len=BZ2_bzread(BZ2fp_r,buff,0x1000))>0){ + fwrite(buff,1,len,fp_w); + } + BZ2_bzclose(BZ2fp_r); + if(fp_w != stdout) fclose(fp_w); + }else{ + BZFILE *BZ2fp_w = NULL; + FILE *fp_r = NULL; + + if(fn_r){ + if((fp_r = fopen(fn_r,"rb"))==NULL){ + printf("can't open [%s]\n",fn_r); + perror("reason:"); + exit(1); + } + }else{ + fp_r = stdin; + } + mode[0]='w'; + mode[1] = '0' + level; + mode[2] = '\0'; + + if((fn_w == NULL && (BZ2fp_w = BZ2_bzdopen(fileno(stdout),mode))==NULL) + || (fn_w !=NULL && (BZ2fp_w = BZ2_bzopen(fn_w,mode))==NULL)){ + printf("can't bz2openstream\n"); + exit(1); + } + while((len=fread(buff,1,0x1000,fp_r))>0){ + BZ2_bzwrite(BZ2fp_w,buff,len); + } + BZ2_bzclose(BZ2fp_w); + if(fp_r!=stdin)fclose(fp_r); + } + } +#ifdef _WIN32 + BZ2DLLFreeLibrary(); +#endif + return 0; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.dsp b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.dsp new file mode 100644 index 0000000..4b1615e --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/dlltest.dsp @@ -0,0 +1,93 @@ +# Microsoft Developer Studio Project File - Name="dlltest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** ҏWȂł ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=dlltest - Win32 Debug +!MESSAGE ͗LҲ̧قł͂܂B ۼުĂނ邽߂ɂ NMAKE gpĂB +!MESSAGE [Ҳ̧ق̴߰] ނgpĎsĂ +!MESSAGE +!MESSAGE NMAKE /f "dlltest.mak". +!MESSAGE +!MESSAGE NMAKE ̎sɍ\wł܂ +!MESSAGE ײݏϸۂ̐ݒ`܂B: +!MESSAGE +!MESSAGE NMAKE /f "dlltest.mak" CFG="dlltest - Win32 Debug" +!MESSAGE +!MESSAGE I”\ Ӱ: +!MESSAGE +!MESSAGE "dlltest - Win32 Release" ("Win32 (x86) Console Application" p) +!MESSAGE "dlltest - Win32 Debug" ("Win32 (x86) Console Application" p) +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "dlltest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x411 /d "NDEBUG" +# ADD RSC /l 0x411 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"minibz2.exe" + +!ELSEIF "$(CFG)" == "dlltest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "dlltest_" +# PROP BASE Intermediate_Dir "dlltest_" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "dlltest_" +# PROP Intermediate_Dir "dlltest_" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x411 /d "_DEBUG" +# ADD RSC /l 0x411 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"minibz2.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "dlltest - Win32 Release" +# Name "dlltest - Win32 Debug" +# Begin Source File + +SOURCE=.\bzlib.h +# End Source File +# Begin Source File + +SOURCE=.\dlltest.c +# End Source File +# End Target +# End Project diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/entities.xml b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/entities.xml new file mode 100644 index 0000000..4b28f34 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/entities.xml @@ -0,0 +1,9 @@ +<!-- misc. strings --> +<!ENTITY bz-url "http://www.bzip.org"> +<!ENTITY bz-email "jseward@bzip.org"> +<!ENTITY bz-lifespan "1996-2010"> + +<!ENTITY bz-version "1.0.6"> +<!ENTITY bz-date "6 September 2010"> + +<!ENTITY manual-title "bzip2 Manual"> diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl new file mode 100644 index 0000000..f169fd9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl @@ -0,0 +1,68 @@ +#!/usr/bin/perl -w +# +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ------------------------------------------------------------------ +# +use strict; + +# get command line values: +if ( $#ARGV !=1 ) { + die "Usage: $0 xml_infile xml_outfile\n"; +} + +my $infile = shift; +# check infile exists +die "Can't find file \"$infile\"" + unless -f $infile; +# check we can read infile +if (! -r $infile) { + die "Can't read input $infile\n"; +} +# check we can open infile +open( INFILE,"<$infile" ) or + die "Can't input $infile $!"; + +#my $outfile = 'fmt-manual.xml'; +my $outfile = shift; +#print "Infile: $infile, Outfile: $outfile\n"; +# check we can write to outfile +open( OUTFILE,">$outfile" ) or + die "Can't output $outfile $! for writing"; + +my ($prev, $curr, $str); +$prev = ''; $curr = ''; +while ( <INFILE> ) { + + print OUTFILE $prev; + $prev = $curr; + $curr = $_; + $str = ''; + + if ( $prev =~ /<programlisting>$|<screen>$/ ) { + chomp $prev; + $curr = join( '', $prev, "<![CDATA[", $curr ); + $prev = ''; + next; + } + elsif ( $curr =~ /<\/programlisting>|<\/screen>/ ) { + chomp $prev; + $curr = join( '', $prev, "]]>", $curr ); + $prev = ''; + next; + } +} +print OUTFILE $curr; +close INFILE; +close OUTFILE; +exit; diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/huffman.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/huffman.c new file mode 100644 index 0000000..2283fdb --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/huffman.c @@ -0,0 +1,205 @@ + +/*-------------------------------------------------------------*/ +/*--- Huffman coding low-level stuff ---*/ +/*--- huffman.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include "bzlib_private.h" + +/*---------------------------------------------------*/ +#define WEIGHTOF(zz0) ((zz0) & 0xffffff00) +#define DEPTHOF(zz1) ((zz1) & 0x000000ff) +#define MYMAX(zz2,zz3) ((zz2) > (zz3) ? (zz2) : (zz3)) + +#define ADDWEIGHTS(zw1,zw2) \ + (WEIGHTOF(zw1)+WEIGHTOF(zw2)) | \ + (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2))) + +#define UPHEAP(z) \ +{ \ + Int32 zz, tmp; \ + zz = z; tmp = heap[zz]; \ + while (weight[tmp] < weight[heap[zz >> 1]]) { \ + heap[zz] = heap[zz >> 1]; \ + zz >>= 1; \ + } \ + heap[zz] = tmp; \ +} + +#define DOWNHEAP(z) \ +{ \ + Int32 zz, yy, tmp; \ + zz = z; tmp = heap[zz]; \ + while (True) { \ + yy = zz << 1; \ + if (yy > nHeap) break; \ + if (yy < nHeap && \ + weight[heap[yy+1]] < weight[heap[yy]]) \ + yy++; \ + if (weight[tmp] < weight[heap[yy]]) break; \ + heap[zz] = heap[yy]; \ + zz = yy; \ + } \ + heap[zz] = tmp; \ +} + + +/*---------------------------------------------------*/ +void BZ2_hbMakeCodeLengths ( UChar *len, + Int32 *freq, + Int32 alphaSize, + Int32 maxLen ) +{ + /*-- + Nodes and heap entries run from 1. Entry 0 + for both the heap and nodes is a sentinel. + --*/ + Int32 nNodes, nHeap, n1, n2, i, j, k; + Bool tooLong; + + Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ]; + Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ]; + Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ]; + + for (i = 0; i < alphaSize; i++) + weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8; + + while (True) { + + nNodes = alphaSize; + nHeap = 0; + + heap[0] = 0; + weight[0] = 0; + parent[0] = -2; + + for (i = 1; i <= alphaSize; i++) { + parent[i] = -1; + nHeap++; + heap[nHeap] = i; + UPHEAP(nHeap); + } + + AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 ); + + while (nHeap > 1) { + n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1); + n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1); + nNodes++; + parent[n1] = parent[n2] = nNodes; + weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]); + parent[nNodes] = -1; + nHeap++; + heap[nHeap] = nNodes; + UPHEAP(nHeap); + } + + AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 ); + + tooLong = False; + for (i = 1; i <= alphaSize; i++) { + j = 0; + k = i; + while (parent[k] >= 0) { k = parent[k]; j++; } + len[i-1] = j; + if (j > maxLen) tooLong = True; + } + + if (! tooLong) break; + + /* 17 Oct 04: keep-going condition for the following loop used + to be 'i < alphaSize', which missed the last element, + theoretically leading to the possibility of the compressor + looping. However, this count-scaling step is only needed if + one of the generated Huffman code words is longer than + maxLen, which up to and including version 1.0.2 was 20 bits, + which is extremely unlikely. In version 1.0.3 maxLen was + changed to 17 bits, which has minimal effect on compression + ratio, but does mean this scaling step is used from time to + time, enough to verify that it works. + + This means that bzip2-1.0.3 and later will only produce + Huffman codes with a maximum length of 17 bits. However, in + order to preserve backwards compatibility with bitstreams + produced by versions pre-1.0.3, the decompressor must still + handle lengths of up to 20. */ + + for (i = 1; i <= alphaSize; i++) { + j = weight[i] >> 8; + j = 1 + (j / 2); + weight[i] = j << 8; + } + } +} + + +/*---------------------------------------------------*/ +void BZ2_hbAssignCodes ( Int32 *code, + UChar *length, + Int32 minLen, + Int32 maxLen, + Int32 alphaSize ) +{ + Int32 n, vec, i; + + vec = 0; + for (n = minLen; n <= maxLen; n++) { + for (i = 0; i < alphaSize; i++) + if (length[i] == n) { code[i] = vec; vec++; }; + vec <<= 1; + } +} + + +/*---------------------------------------------------*/ +void BZ2_hbCreateDecodeTables ( Int32 *limit, + Int32 *base, + Int32 *perm, + UChar *length, + Int32 minLen, + Int32 maxLen, + Int32 alphaSize ) +{ + Int32 pp, i, j, vec; + + pp = 0; + for (i = minLen; i <= maxLen; i++) + for (j = 0; j < alphaSize; j++) + if (length[j] == i) { perm[pp] = j; pp++; }; + + for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0; + for (i = 0; i < alphaSize; i++) base[length[i]+1]++; + + for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1]; + + for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0; + vec = 0; + + for (i = minLen; i <= maxLen; i++) { + vec += (base[i+1] - base[i]); + limit[i] = vec-1; + vec <<= 1; + } + for (i = minLen + 1; i <= maxLen; i++) + base[i] = ((limit[i-1] + 1) << 1) - base[i]; +} + + +/*-------------------------------------------------------------*/ +/*--- end huffman.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.def b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.def new file mode 100644 index 0000000..2dc0dd8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.def @@ -0,0 +1,27 @@ +LIBRARY LIBBZ2 +DESCRIPTION "libbzip2: library for data compression" +EXPORTS + BZ2_bzCompressInit + BZ2_bzCompress + BZ2_bzCompressEnd + BZ2_bzDecompressInit + BZ2_bzDecompress + BZ2_bzDecompressEnd + BZ2_bzReadOpen + BZ2_bzReadClose + BZ2_bzReadGetUnused + BZ2_bzRead + BZ2_bzWriteOpen + BZ2_bzWrite + BZ2_bzWriteClose + BZ2_bzWriteClose64 + BZ2_bzBuffToBuffCompress + BZ2_bzBuffToBuffDecompress + BZ2_bzlibVersion + BZ2_bzopen + BZ2_bzdopen + BZ2_bzread + BZ2_bzwrite + BZ2_bzflush + BZ2_bzclose + BZ2_bzerror diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.dsp b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.dsp new file mode 100644 index 0000000..a21a20f --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/libbz2.dsp @@ -0,0 +1,130 @@ +# Microsoft Developer Studio Project File - Name="libbz2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** ҏWȂł ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=libbz2 - Win32 Debug +!MESSAGE ͗LҲ̧قł͂܂B ۼުĂނ邽߂ɂ NMAKE gpĂB +!MESSAGE [Ҳ̧ق̴߰] ނgpĎsĂ +!MESSAGE +!MESSAGE NMAKE /f "libbz2.mak". +!MESSAGE +!MESSAGE NMAKE ̎sɍ\wł܂ +!MESSAGE ײݏϸۂ̐ݒ`܂B: +!MESSAGE +!MESSAGE NMAKE /f "libbz2.mak" CFG="libbz2 - Win32 Debug" +!MESSAGE +!MESSAGE I”\ Ӱ: +!MESSAGE +!MESSAGE "libbz2 - Win32 Release" ("Win32 (x86) Dynamic-Link Library" p) +!MESSAGE "libbz2 - Win32 Debug" ("Win32 (x86) Dynamic-Link Library" p) +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libbz2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x411 /d "NDEBUG" +# ADD RSC /l 0x411 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"libbz2.dll" + +!ELSEIF "$(CFG)" == "libbz2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x411 /d "_DEBUG" +# ADD RSC /l 0x411 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"libbz2.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "libbz2 - Win32 Release" +# Name "libbz2 - Win32 Debug" +# Begin Source File + +SOURCE=.\blocksort.c +# End Source File +# Begin Source File + +SOURCE=.\bzlib.c +# End Source File +# Begin Source File + +SOURCE=.\bzlib.h +# End Source File +# Begin Source File + +SOURCE=.\bzlib_private.h +# End Source File +# Begin Source File + +SOURCE=.\compress.c +# End Source File +# Begin Source File + +SOURCE=.\crctable.c +# End Source File +# Begin Source File + +SOURCE=.\decompress.c +# End Source File +# Begin Source File + +SOURCE=.\huffman.c +# End Source File +# Begin Source File + +SOURCE=.\libbz2.def +# End Source File +# Begin Source File + +SOURCE=.\randtable.c +# End Source File +# End Target +# End Project diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/makefile.msc b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/makefile.msc new file mode 100644 index 0000000..799a18a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/makefile.msc @@ -0,0 +1,63 @@ +# Makefile for Microsoft Visual C++ 6.0 +# usage: nmake -f makefile.msc +# K.M. Syring (syring@gsf.de) +# Fixed up by JRS for bzip2-0.9.5d release. + +CC=cl +CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo + +OBJS= blocksort.obj \ + huffman.obj \ + crctable.obj \ + randtable.obj \ + compress.obj \ + decompress.obj \ + bzlib.obj + +all: lib bzip2 test + +bzip2: lib + $(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj + $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c + +lib: $(OBJS) + lib /out:libbz2.lib $(OBJS) + +test: bzip2 + type words1 + .\\bzip2 -1 < sample1.ref > sample1.rb2 + .\\bzip2 -2 < sample2.ref > sample2.rb2 + .\\bzip2 -3 < sample3.ref > sample3.rb2 + .\\bzip2 -d < sample1.bz2 > sample1.tst + .\\bzip2 -d < sample2.bz2 > sample2.tst + .\\bzip2 -ds < sample3.bz2 > sample3.tst + @echo All six of the fc's should find no differences. + @echo If fc finds an error on sample3.bz2, this could be + @echo because WinZip's 'TAR file smart CR/LF conversion' + @echo is too clever for its own good. Disable this option. + @echo The correct size for sample3.ref is 120,244. If it + @echo is 150,251, WinZip has messed it up. + fc sample1.bz2 sample1.rb2 + fc sample2.bz2 sample2.rb2 + fc sample3.bz2 sample3.rb2 + fc sample1.tst sample1.ref + fc sample2.tst sample2.ref + fc sample3.tst sample3.ref + + + +clean: + del *.obj + del libbz2.lib + del bzip2.exe + del bzip2recover.exe + del sample1.rb2 + del sample2.rb2 + del sample3.rb2 + del sample1.tst + del sample2.tst + del sample3.tst + +.c.obj: + $(CC) $(CFLAGS) -c $*.c -o $*.obj + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/mk251.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/mk251.c new file mode 100644 index 0000000..c9c36f6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/mk251.c @@ -0,0 +1,31 @@ + +/* Spew out a long sequence of the byte 251. When fed to bzip2 + versions 1.0.0 or 1.0.1, causes it to die with internal error + 1007 in blocksort.c. This assertion misses an extremely rare + case, which is fixed in this version (1.0.2) and above. +*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include <stdio.h> + +int main () +{ + int i; + for (i = 0; i < 48500000 ; i++) + putchar(251); + return 0; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/randtable.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/randtable.c new file mode 100644 index 0000000..6d62459 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/randtable.c @@ -0,0 +1,84 @@ + +/*-------------------------------------------------------------*/ +/*--- Table for randomising repetitive blocks ---*/ +/*--- randtable.c ---*/ +/*-------------------------------------------------------------*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include "bzlib_private.h" + + +/*---------------------------------------------*/ +Int32 BZ2_rNums[512] = { + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, + 936, 638 +}; + + +/*-------------------------------------------------------------*/ +/*--- end randtable.c ---*/ +/*-------------------------------------------------------------*/ diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/spewG.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/spewG.c new file mode 100644 index 0000000..14a3649 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/spewG.c @@ -0,0 +1,54 @@ + +/* spew out a thoroughly gigantic file designed so that bzip2 + can compress it reasonably rapidly. This is to help test + support for large files (> 2GB) in a reasonable amount of time. + I suggest you use the undocumented --exponential option to + bzip2 when compressing the resulting file; this saves a bit of + time. Note: *don't* bother with --exponential when compressing + Real Files; it'll just waste a lot of CPU time :-) + (but is otherwise harmless). +*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#define _FILE_OFFSET_BITS 64 + +#include <stdio.h> +#include <stdlib.h> + +/* The number of megabytes of junk to spew out (roughly) */ +#define MEGABYTES 5000 + +#define N_BUF 1000000 +char buf[N_BUF]; + +int main ( int argc, char** argv ) +{ + int ii, kk, p; + srandom(1); + setbuffer ( stdout, buf, N_BUF ); + for (kk = 0; kk < MEGABYTES * 515; kk+=3) { + p = 25+random()%50; + for (ii = 0; ii < p; ii++) + printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ); + for (ii = 0; ii < p-1; ii++) + printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" ); + for (ii = 0; ii < p+1; ii++) + printf ( "ccccccccccccccccccccccccccccccccccccc" ); + } + fflush(stdout); + return 0; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/unzcrash.c b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/unzcrash.c new file mode 100644 index 0000000..7041da5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/unzcrash.c @@ -0,0 +1,141 @@ + +/* A test program written to test robustness to decompression of + corrupted data. Usage is + unzcrash filename + and the program will read the specified file, compress it (in memory), + and then repeatedly decompress it, each time with a different bit of + the compressed data inverted, so as to test all possible one-bit errors. + This should not cause any invalid memory accesses. If it does, + I want to know about it! + + PS. As you can see from the above description, the process is + incredibly slow. A file of size eg 5KB will cause it to run for + many hours. +*/ + +/* ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ */ + + +#include <stdio.h> +#include <assert.h> +#include "bzlib.h" + +#define M_BLOCK 1000000 + +typedef unsigned char uchar; + +#define M_BLOCK_OUT (M_BLOCK + 1000000) +uchar inbuf[M_BLOCK]; +uchar outbuf[M_BLOCK_OUT]; +uchar zbuf[M_BLOCK + 600 + (M_BLOCK / 100)]; + +int nIn, nOut, nZ; + +static char *bzerrorstrings[] = { + "OK" + ,"SEQUENCE_ERROR" + ,"PARAM_ERROR" + ,"MEM_ERROR" + ,"DATA_ERROR" + ,"DATA_ERROR_MAGIC" + ,"IO_ERROR" + ,"UNEXPECTED_EOF" + ,"OUTBUFF_FULL" + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ + ,"???" /* for future */ +}; + +void flip_bit ( int bit ) +{ + int byteno = bit / 8; + int bitno = bit % 8; + uchar mask = 1 << bitno; + //fprintf ( stderr, "(byte %d bit %d mask %d)", + // byteno, bitno, (int)mask ); + zbuf[byteno] ^= mask; +} + +int main ( int argc, char** argv ) +{ + FILE* f; + int r; + int bit; + int i; + + if (argc != 2) { + fprintf ( stderr, "usage: unzcrash filename\n" ); + return 1; + } + + f = fopen ( argv[1], "r" ); + if (!f) { + fprintf ( stderr, "unzcrash: can't open %s\n", argv[1] ); + return 1; + } + + nIn = fread ( inbuf, 1, M_BLOCK, f ); + fprintf ( stderr, "%d bytes read\n", nIn ); + + nZ = M_BLOCK; + r = BZ2_bzBuffToBuffCompress ( + zbuf, &nZ, inbuf, nIn, 9, 0, 30 ); + + assert (r == BZ_OK); + fprintf ( stderr, "%d after compression\n", nZ ); + + for (bit = 0; bit < nZ*8; bit++) { + fprintf ( stderr, "bit %d ", bit ); + flip_bit ( bit ); + nOut = M_BLOCK_OUT; + r = BZ2_bzBuffToBuffDecompress ( + outbuf, &nOut, zbuf, nZ, 0, 0 ); + fprintf ( stderr, " %d %s ", r, bzerrorstrings[-r] ); + + if (r != BZ_OK) { + fprintf ( stderr, "\n" ); + } else { + if (nOut != nIn) { + fprintf(stderr, "nIn/nOut mismatch %d %d\n", nIn, nOut ); + return 1; + } else { + for (i = 0; i < nOut; i++) + if (inbuf[i] != outbuf[i]) { + fprintf(stderr, "mismatch at %d\n", i ); + return 1; + } + if (i == nOut) fprintf(stderr, "really ok!\n" ); + } + } + + flip_bit ( bit ); + } + +#if 0 + assert (nOut == nIn); + for (i = 0; i < nOut; i++) { + if (inbuf[i] != outbuf[i]) { + fprintf ( stderr, "difference at %d !\n", i ); + return 1; + } + } +#endif + + fprintf ( stderr, "all ok\n" ); + return 0; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words0 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words0 new file mode 100644 index 0000000..fbf442a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words0 @@ -0,0 +1,9 @@ + +If compilation produces errors, or a large number of warnings, +please read README.COMPILATION.PROBLEMS -- you might be able to +adjust the flags in this Makefile to improve matters. + +Also in README.COMPILATION.PROBLEMS are some hints that may help +if your build produces an executable which is unable to correctly +handle so-called 'large files' -- files of size 2GB or more. + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words1 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words1 new file mode 100644 index 0000000..2e83de9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words1 @@ -0,0 +1,4 @@ + +Doing 6 tests (3 compress, 3 uncompress) ... +If there's a problem, things might stop at this point. + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words2 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words2 new file mode 100644 index 0000000..caddcf4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words2 @@ -0,0 +1,5 @@ + +Checking test results. If any of the four "cmp"s which follow +report any differences, something is wrong. If you can't easily +figure out what, please let me know (jseward@bzip.org). + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words3 b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words3 new file mode 100644 index 0000000..6972669 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/words3 @@ -0,0 +1,30 @@ + +If you got this far and the 'cmp's didn't complain, it looks +like you're in business. + +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type + + make install + +To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type + + make install PREFIX=/xxx/yyy + +If you are (justifiably) paranoid and want to see what 'make install' +is going to do, you can first do + + make -n install or + make -n install PREFIX=/xxx/yyy respectively. + +The -n instructs make to show the commands it would execute, but +not actually execute them. + +Instructions for use are in the preformatted manual page, in the file +bzip2.txt. For more detailed documentation, read the full manual. +It is available in Postscript form (manual.ps), PDF form (manual.pdf), +and HTML form (manual.html). + +You can also do "bzip2 --help" to see some helpful information. +"bzip2 -L" displays the software license. + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/xmlproc.sh b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/xmlproc.sh new file mode 100755 index 0000000..ca284ea --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/xmlproc.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# see the README file for usage etc. +# +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ---------------------------------------------------------------- + + +usage() { + echo ''; + echo 'Usage: xmlproc.sh -[option] <filename.xml>'; + echo 'Specify a target from:'; + echo '-v verify xml file conforms to dtd'; + echo '-html output in html format (single file)'; + echo '-ps output in postscript format'; + echo '-pdf output in pdf format'; + exit; +} + +if test $# -ne 2; then + usage +fi +# assign the variable for the output type +action=$1; shift +# assign the output filename +xmlfile=$1; shift +# and check user input it correct +if !(test -f $xmlfile); then + echo "No such file: $xmlfile"; + exit; +fi +# some other stuff we will use +OUT=output +xsl_fo=bz-fo.xsl +xsl_html=bz-html.xsl + +basename=$xmlfile +basename=${basename//'.xml'/''} + +fofile="${basename}.fo" +htmlfile="${basename}.html" +pdffile="${basename}.pdf" +psfile="${basename}.ps" +xmlfmtfile="${basename}.fmt" + +# first process the xmlfile with CDATA tags +./format.pl $xmlfile $xmlfmtfile +# so the shell knows where the catalogs live +export XML_CATALOG_FILES=/etc/xml/catalog + +# post-processing tidy up +cleanup() { + echo "Cleaning up: $@" + while [ $# != 0 ] + do + arg=$1; shift; + echo " deleting $arg"; + rm $arg + done +} + +case $action in + -v) + flags='--noout --xinclude --noblanks --postvalid' + dtd='--dtdvalid http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd' + xmllint $flags $dtd $xmlfmtfile 2> $OUT + egrep 'error' $OUT + rm $OUT + ;; + + -html) + echo "Creating $htmlfile ..." + xsltproc --nonet --xinclude -o $htmlfile $xsl_html $xmlfmtfile + cleanup $xmlfmtfile + ;; + + -pdf) + echo "Creating $pdffile ..." + xsltproc --nonet --xinclude -o $fofile $xsl_fo $xmlfmtfile + pdfxmltex $fofile >$OUT </dev/null + pdfxmltex $fofile >$OUT </dev/null + pdfxmltex $fofile >$OUT </dev/null + cleanup $OUT $xmlfmtfile *.aux *.fo *.log *.out + ;; + + -ps) + echo "Creating $psfile ..." + xsltproc --nonet --xinclude -o $fofile $xsl_fo $xmlfmtfile + pdfxmltex $fofile >$OUT </dev/null + pdfxmltex $fofile >$OUT </dev/null + pdfxmltex $fofile >$OUT </dev/null + pdftops $pdffile $psfile + cleanup $OUT $xmlfmtfile $pdffile *.aux *.fo *.log *.out +# passivetex is broken, so we can't go this route yet. +# xmltex $fofile >$OUT </dev/null +# xmltex $fofile >$OUT </dev/null +# xmltex $fofile >$OUT </dev/null +# dvips -R -q -o bzip-manual.ps *.dvi + ;; + + *) + usage + ;; +esac diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/dmfsupport.h b/src/others/irrlicht-1.8.1/source/Irrlicht/dmfsupport.h new file mode 100644 index 0000000..efa85b4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/dmfsupport.h @@ -0,0 +1,732 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h +// +// This file was originally written by Salvatore Russo. +// I (Nikolaus Gebhardt) did some minor modifications changes to it and integrated +// it into Irrlicht: +// - removed STL dependency +// - removed log file and replaced it with irrlicht logging +// - adapted code formatting a bit to Irrlicht style +// - removed memory leaks +// Thanks a lot to Salvatore for his work on this and that he gave me +// his permission to add it into Irrlicht. + +// This support library has been made by Salvatore Russo and is released under GNU public license for general uses. +// For uses in Irrlicht core and only for Irrlicht related uses I release this library under zlib license. + +#ifndef __DMF_SUPPORT_H_INCLUDED__ +#define __DMF_SUPPORT_H_INCLUDED__ + +#include "irrString.h" +#include "fast_atof.h" + +namespace irr +{ +namespace scene +{ +namespace +{ + +/** A structure representing some DeleD infos. +This structure contains data about DeleD level file like: version, ambient color, number of objects etc...*/ +struct dmfHeader +{ + //main file header + core::stringc dmfName; //!<Scene name + f32 dmfVersion; //!<File version + video::SColor dmfAmbient; //!<Ambient color + f32 dmfShadow; //!<Shadow intensity + u32 numObjects; //!<Number of objects in this scene + u32 numMaterials; //!<Number of materials in this scene + u32 numVertices; //!<Total number of vertices faces*(vertices for each face) + u32 numFaces; //!<Total number of faces + u32 numLights; //!<Number of dynamic lights in this scene + u32 numWatVertices; //!<Total number of vertices of water plains watfaces*(vertices for each face) + u32 numWatFaces; //!<Total number of faces for water plains.Note that each water plane is a rectangle with one face only. +}; + + +/** A structure representing a DeleD material. +This structure contains texture names, an ID and some flags.*/ +struct dmfMaterial +{ + u32 materialID;//!<This material unique ID. + u32 textureLayers;//!<First texture Flag (0=Normal, 1=Color). + u32 textureFlag;//!<First texture Flag (0=Normal, 1=Color). + u32 lightmapFlag;//!<Lightmap Flag (0=Normal, others not considered). + u32 textureBlend;//!<Texture Blend mode used to support alpha maps (4=Alpha map, others not implemented yet). + core::stringc pathName;//!<Name of path defined in path element. + core::stringc textureName;//!<Name of first texture (only file name, no path). + core::stringc lightmapName;//!<Name of lightmap (only file name, no path). + u32 lightmapBlend;//!<Blend mode used to support alpha maps (not implemented yet). +}; + + +/** A structure representing a single face. +This structure contains first vertice index, number of vertices and the material used.*/ +struct dmfFace +{ + u32 firstVert;//!<First vertex index. + u32 numVerts;//!<Number of vertices for this face. + u32 materialID;//!<Material used for this face. +}; + + +/** A structure representing a single vertice. +This structure contains vertice position coordinates and texture an lightmap UV.*/ +struct dmfVert +{ + core::vector3df pos;//!<Position of vertex + core::vector2df tc;//!<Texture UV coords + core::vector2df lc;//!<Lightmap UV coords +}; + + +/** A structure representing a single dynamic light. +This structure contains light position coordinates, diffuse color, specular color and maximum radius of light.*/ +struct dmfLight +{ + core::vector3df pos;//!<Position of this light. + video::SColorf diffuseColor;//!<Diffuse color. + video::SColorf specularColor;//!<Specular color. + f32 radius;//!<Maximum radius of light. +}; + +/** A structure representing a single water plane. +This structure contains light position coordinates, diffuse color, specular color and maximum radius of light.*/ +struct dmfWaterPlane +{ + u32 waterID;//!<ID of specified water plane. + u32 numFaces;//!<number of faces that make this plain.Owing to the fact that this is a rectangle you'll have 1 every time. + u32 firstFace;//!<first face of this plain. + core::dimension2d<u32> tileNum;//!<number of tiles of this water plain. + f32 waveHeight;//!<height of waves. + f32 waveSpeed;//!<waves speed. + f32 waveLength;//!<waves length. +}; + + +/** A function to convert a hexstring to a int. +This function converts an hex string (i.e. FF) to its int value (i.e. 255). +\return An int representing the hex input value.*/ +int axtoi(const char *hexStg) +{ + unsigned int intValue = 0; // integer value of hex string + sscanf(hexStg, "%x", &intValue); + return (intValue); +} + +typedef core::array<core::stringc> StringList; + +//Loads a stringlist from a file +//note that each String added to StringList +//is separated by a \\n character and it's present +//at the end of line. +/** Loads a StringList from a file. +This function loads a StringList from a file where each string is divided by a \\n char.*/ +void LoadFromFile(io::IReadFile* file, StringList& strlist) +{ + const long sz = file->getSize(); + char* buf = new char[sz+1]; + file->read(buf, sz); + buf[sz] = 0; + char* p = buf; + char* start = p; + + while(*p) + { + if (*p == '\n') + { + core::stringc str(start, (u32)(p - start - 1)); + str.trim(); + strlist.push_back(str); + start = p+1; + } + + ++p; + } + + if (p - start > 1) + { + core::stringc str(start, (u32)(p - start - 1)); + str.trim(); + strlist.push_back(str); + } + + delete [] buf; +}; + +//This function subdivides a string in a list of strings +/** This function subdivides strings divided by divider in a list of strings. +\return A StringList made of all strings divided by divider.*/ +StringList SubdivideString(const core::stringc& str, const core::stringc& divider) +{ + StringList strings; //returned StringList + strings.clear(); //clear returned stringlist + + int c=0; + int l=str.size(); + + //process entire string + while(c<l) + { + core::stringc resultstr; + resultstr = ""; + //read characters until divider is encountered + while((str[c]!=divider[0]) && c<l) + { + resultstr += str[c]; + ++c; + } + + //Remove spaces \t and \n from string in my implementation... + //pay attention or change it in dll.h if you don't want to remove + //a particular char. + resultstr.trim();//trims string resultstr + strings.push_back(resultstr);//add trimmed string + ++c; + } + + return strings; +} + + +//Get DeleD informations and convert in dmfHeader +/**This function extract a dmfHeader from a DMF file. +You must give in input a StringList representing a DMF file loaded with LoadFromFile. +\return true if function succeed or false on fail.*/ +bool GetDMFHeader(const StringList& RawFile, dmfHeader& header) +{ + StringList temp; + RawFile[0].split(temp, ";"); //file info +// StringList temp=SubdivideString(RawFile[0],";"); //file info + + if ( temp[0] != "DeleD Map File" ) + return false; //not a deled file + + temp.clear(); + temp = SubdivideString(RawFile[1]," ");//get version + StringList temp1=SubdivideString(temp[1],";"); + + header.dmfVersion = (float)atof(temp1[0].c_str());//save version + if (header.dmfVersion < 0.91) + return false;//not correct version + + temp.clear(); + temp = SubdivideString(RawFile[2],";");//get name,ambient color and shadow opacity + header.dmfName=temp[0];//save name + + //set ambient color + header.dmfAmbient.set(axtoi(temp[1].c_str())); + + //set Shadow intensity + header.dmfShadow = (float)atof(temp[2].c_str()); + + //set current position + int offs=3; + + //set Materials Number + header.numMaterials=atoi(RawFile[offs].c_str()); + offs+=header.numMaterials; + ++offs; + + //set Object Number + header.numObjects=atoi(RawFile[offs].c_str()); + + //retrieve face and vertices number + header.numVertices=0; + header.numFaces=0; + header.numWatFaces=0; + header.numWatVertices=0; + offs++; + + s32 fac; + int i; + + for(i=0; i < (int)header.numObjects; i++) + { + StringList wat=SubdivideString(RawFile[offs],";"); + StringList wat1=SubdivideString(wat[0],"_"); + + ++offs; + offs += atoi(RawFile[offs].c_str()); + ++offs; + + fac=atoi(RawFile[offs].c_str()); + + if(!(wat1[0]=="water" && wat[2]=="0")) + header.numFaces = header.numFaces + fac; + else + header.numWatFaces = header.numWatFaces + fac; + + offs++; + + for(int j=0; j<fac; j++) + { + if(!(wat1[0] == "water" && wat[2] == "0")) + header.numVertices=header.numVertices + atoi(RawFile[offs+j].c_str()); + else + header.numWatVertices=header.numWatVertices + atoi(RawFile[offs + j].c_str()); + } + + offs = offs + fac; + } + + //retrieve number of dynamic lights + header.numLights=0; + temp.clear(); + temp1.clear(); + s32 lit = atoi(RawFile[offs].c_str()); + + for (i=0; i<lit; i++) + { + offs++; + temp=SubdivideString(RawFile[offs],";"); + + if(atoi(temp[0].c_str())==1) + { + temp1=SubdivideString(temp[18],"_"); + + if(temp1[0]=="dynamic") + header.numLights++; + } + temp.clear(); + temp1.clear(); + } + + return true; //everything is OK so loading is correct +} + + +/**This function extract an array of dmfMaterial from a DMF file. +You must give in input a StringList representing a DMF file loaded with LoadFromFile. +\param RawFile StringList representing a DMF file. +\param materials Materials returned. +\param num_material Number of materials contained in DMF file. +\param use_material_dirs Here you can choose to use default DeleD structure for material dirs. +\return true if function succeed or false on fail.*/ +bool GetDMFMaterials(const StringList& RawFile, + core::array<dmfMaterial>& materials, + int num_material) +{ + // offset for already handled lines + const int offs=4; + + StringList temp; + StringList temp1; + + // The number of materials is predetermined + materials.reallocate(num_material); + for(int i=0; i<num_material; ++i) + { + materials.push_back(dmfMaterial()); + // get all tokens + temp=SubdivideString(RawFile[offs+i],";"); + // should be equal to first token + materials[i].materialID = i; + // The path used for the texture + materials[i].pathName = temp[2]; + materials[i].pathName.replace('\\','/'); + materials[i].pathName += "/"; + // temp[3] is reserved, temp[4] is the number of texture layers + materials[i].textureLayers = core::strtoul10(temp[4].c_str()); + // Three values are separated by commas + temp1=SubdivideString(temp[5],","); + + materials[i].textureFlag = atoi(temp1[0].c_str()); + materials[i].textureName=temp1[1]; + materials[i].textureName.replace('\\','/'); + materials[i].textureBlend = atoi(temp1[2].c_str()); + if(temp.size()>=9) + { + temp1=SubdivideString(temp[temp.size() - 1],","); + materials[i].lightmapFlag=atoi(temp1[0].c_str()); + materials[i].lightmapName=temp1[1]; + materials[i].lightmapName.replace('\\','/'); + materials[i].lightmapBlend = atoi(temp1[2].c_str()); + } + else + { + materials[i].lightmapFlag=1; + materials[i].lightmapName=""; + } + } + return true; +} + + +/**This function extract an array of dmfMaterial from a DMF file considering 1st an 2nd layer for water plains. +You must give in input a StringList representing a DMF file loaded with LoadFromFile. +\return true if function succeed or false on fail.*/ +bool GetDMFWaterMaterials(const StringList& RawFile /**<StringList representing a DMF file.*/, + core::array<dmfMaterial>& materials/**<Materials returned.*/, + int num_material/**<Number of materials contained in DMF file.*/ + ) +{ + int offs=4; + StringList temp; + StringList temp1; + StringList temp2; + //Checking if this is a DeleD map File of version >= 0.91 + temp=SubdivideString(RawFile[0],";");//file info + + if ( temp[0] != "DeleD Map File" ) + return false;//not a deled file + + temp.clear(); + temp=SubdivideString(RawFile[1]," ");//get version + temp1=SubdivideString(temp[1],";"); + + if (atof(temp1[0].c_str()) < 0.91) + return false;//not correct version + + //end checking + temp.clear(); + temp1.clear(); + + for(int i=0;i<num_material;i++) + { + temp = SubdivideString(RawFile[offs+i],";"); + materials[i].materialID=i; + + temp1 = SubdivideString(temp[5],","); + materials[i].textureFlag=atoi(temp1[0].c_str()); + temp2 = SubdivideString(temp1[1],"\\"); + + materials[i].textureName=temp2.getLast(); + temp1.clear(); + temp2.clear(); + int a=temp.size(); + if(a==7) + { + temp1=SubdivideString(temp[6],","); + materials[i].lightmapFlag=atoi(temp1[0].c_str()); + temp2=SubdivideString(temp1[1],"\\"); + materials[i].lightmapName=temp2.getLast(); + } + else + { + materials[i].lightmapFlag=1; + materials[i].lightmapName="FFFFFFFF"; + } + temp1.clear(); + temp2.clear(); + } + return true; +} + + +/**This function extract an array of dmfVert and dmfFace from a DMF file. +You must give in input a StringList representing a DMF file loaded with LoadFromFile and two arrays long enough. +Please use GetDMFHeader() before this function to know number of vertices and faces. +\return true if function succeed or false on fail.*/ +bool GetDMFVerticesFaces(const StringList& RawFile/**<StringList representing a DMF file.*/, + dmfVert vertices[]/**<Vertices returned*/, + dmfFace faces[]/**Faces returned*/ + ) +{ + StringList temp,temp1; + + // skip materials + s32 offs = 4 + atoi(RawFile[3].c_str()); + + const s32 objs = atoi(RawFile[offs].c_str()); + offs++; +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Reading objects", core::stringc(objs).c_str()); +#endif + + s32 vert_cnt=0, face_cnt=0; + for (int i=0; i<objs; ++i) + { + StringList wat=SubdivideString(RawFile[offs],";"); + StringList wat1=SubdivideString(wat[0],"_"); +#ifdef _IRR_DMF_DEBUG_ + os::Printer::log("Reading object", wat[0].c_str()); +#endif + + offs++; + // load vertices + core::array<core::vector3df> pos; + const u32 posCount = core::strtoul10(RawFile[offs].c_str()); + ++offs; + pos.reallocate(posCount); + for (u32 i=0; i<posCount; ++i) + { + temp1=SubdivideString(RawFile[offs].c_str(),";"); + pos.push_back(core::vector3df(core::fast_atof(temp1[0].c_str()), + core::fast_atof(temp1[1].c_str()), + -core::fast_atof(temp1[2].c_str()))); + ++offs; + } + + const u32 numFaces=core::strtoul10(RawFile[offs].c_str()); + offs++; + if(!(wat1[0]=="water" && wat[2]=="0")) + { + for(u32 j=0; j<numFaces; ++j) + { + temp=SubdivideString(RawFile[offs+j],";"); + + //first value is vertices number for this face + const u32 vert=core::strtoul10(temp[0].c_str()); + faces[face_cnt].numVerts=vert; + //second is material ID + faces[face_cnt].materialID=core::strtoul10(temp[1].c_str()); + //vertices are ordined + faces[face_cnt].firstVert=vert_cnt; + + //now we'll create vertices structure + for(u32 k=0; k<vert; ++k) + { + //copy position + vertices[vert_cnt].pos.set(pos[core::strtoul10(temp[2+k].c_str())]); + //get uv coords for tex and light if any + vertices[vert_cnt].tc.set(core::fast_atof(temp[2+vert+(2*k)].c_str()), + core::fast_atof(temp[2+vert+(2*k)+1].c_str())); + const u32 tmp_sz=temp.size(); + vertices[vert_cnt].lc.set(core::fast_atof(temp[tmp_sz-(2*vert)+(2*k)].c_str()), + core::fast_atof(temp[tmp_sz-(2*vert)+(2*k)+1].c_str())); + vert_cnt++; + } + + face_cnt++; + } + } + + offs+=numFaces; + } + + return true; +} + + +/**This function extract an array of dmfLights from a DMF file. +You must give in input a StringList representing a DMF file loaded with +LoadFromFile and one array long enough. Please use GetDMFHeader() before this +function to know number of dynamic lights. +\return true if function succeed or false on fail.*/ +bool GetDMFLights(const StringList& RawFile/**<StringList representing a DMF file.*/, + dmfLight lights[]/**<Lights returned.*/ + ) +{ + int offs=3; + StringList temp,temp1; + + //Checking if this is a DeleD map File of version >= 0.91 + temp=SubdivideString(RawFile[0],";");//file info + + if ( temp[0] != "DeleD Map File" ) + return false;//not a deled file + + temp.clear(); + temp=SubdivideString(RawFile[1]," ");//get version + temp1=SubdivideString(temp[1],";"); + + if (atof(temp1[0].c_str()) < 0.91) + return false;//not correct version + + //end checking + + temp.clear(); + temp1.clear(); + offs=offs + atoi(RawFile[offs].c_str()); + offs++; + s32 objs = atoi(RawFile[offs].c_str()); + s32 lit=0; + s32 d_lit=0; + offs++; + + //let's get position of lights in file + int i; + for(i=0;i<objs;i++) + { + offs++; + + offs = offs + atoi(RawFile[offs].c_str()); + offs++; + + offs = offs + atoi(RawFile[offs].c_str()); + offs++; + } + + //let's find dynamic lights + lit = atoi(RawFile[offs].c_str()); + + for(i=0;i<lit;i++) + { + offs++; + temp=SubdivideString(RawFile[offs],";"); + if(atoi(temp[0].c_str())==1) + { + temp1=SubdivideString(temp[18],"_"); + if(temp1[0]=="dynamic") + { + lights[d_lit].radius = (float)atof(temp[4].c_str()); + lights[d_lit].pos.set((float)atof(temp[5].c_str()), + (float)atof(temp[6].c_str()), + (float)-atof(temp[7].c_str())); + + lights[d_lit].diffuseColor = video::SColorf( + video::SColor(255, atoi(temp[10].c_str()), atoi(temp[11].c_str()), + atoi(temp[12].c_str()))); + + lights[d_lit].specularColor = video::SColorf( + video::SColor(255, atoi(temp[13].c_str()), atoi(temp[14].c_str()), + atoi(temp[15].c_str()))); + + d_lit++; + } + } + temp.clear(); + temp1.clear(); + } + + return true; +} + + +/**This function extracts an array of dmfWaterPlane,dmfVert and dmfFace from a DMF file. +You must give in input a StringList representing a DMF file loaded with LoadFromFile and three arrays long enough. +Please use GetDMFHeader() before this function to know number of water plains and water faces as well as water vertices. +\return true if function succeed or false on fail.*/ +bool GetDMFWaterPlanes(const StringList& RawFile/**<StringList representing a DMF file.*/, + dmfWaterPlane wat_planes[]/**<Water planes returned.*/, + dmfVert vertices[]/**<Vertices returned*/, + dmfFace faces[]/**Faces returned*/ + ) +{ + int offs=3; + int offs1=0; + StringList temp,temp1; + + //Checking if this is a DeleD map File of version >= 0.91 + temp=SubdivideString(RawFile[0],";");//file info + + if ( temp[0] != "DeleD Map File" ) + return false;//not a deled file + + temp.clear(); + temp=SubdivideString(RawFile[1]," ");//get version + temp1=SubdivideString(temp[1],";"); + + if (atof(temp1[0].c_str()) < 0.91) + return false;//not correct version + + //end checking + + temp.clear(); + temp1.clear(); + offs=offs+atoi(RawFile[offs].c_str()); + offs++; + s32 objs=atoi(RawFile[offs].c_str()); + s32 fac=0,vert=0,tmp_sz=0,vert_cnt=0,face_cnt=0,wat_id=0; + core::dimension2d<u32> tilenum(40,40); + f32 waveheight=3.0f; + f32 wavespeed=300.0f; + f32 wavelength=80.0f; + offs++; + + for(int i=0;i<objs;i++) + { + StringList wat=SubdivideString(RawFile[offs],";"); + StringList wat1=SubdivideString(wat[0],"_"); + offs++; + offs1=offs; + offs=offs+atoi(RawFile[offs].c_str()); + offs++; + offs1++; + fac=atoi(RawFile[offs].c_str()); + offs++; + + if(wat1[0]=="water" && wat[2]=="0") + { + StringList userinfo=SubdivideString(wat[7],","); + + int j; + + for (j=0; j<(int)userinfo.size(); j++) + { + switch(j) + { + case 0: + if(atoi(userinfo[0].c_str())) + tilenum.Width = atoi(userinfo[0].c_str()); + break; + case 1: + if(atoi(userinfo[1].c_str())) + tilenum.Height = atoi(userinfo[1].c_str()); + break; + case 2: + if(atof(userinfo[2].c_str())) + waveheight = (float)atof(userinfo[2].c_str()); + break; + case 3: + if(atof(userinfo[3].c_str())) + wavespeed = (float)atof(userinfo[3].c_str()); + break; + case 4: + if(atof(userinfo[4].c_str())) + wavelength = (float)atof(userinfo[4].c_str()); + break; + } + } + + wat_planes[wat_id].waterID=wat_id; + wat_planes[wat_id].numFaces=fac; + wat_planes[wat_id].firstFace=face_cnt; + wat_planes[wat_id].tileNum=tilenum; + wat_planes[wat_id].waveHeight=waveheight; + wat_planes[wat_id].waveSpeed=wavespeed; + wat_planes[wat_id].waveLength=wavelength; + + for(j=0;j<fac;j++) + { + temp=SubdivideString(RawFile[offs+j],";"); + + //first value is vertices number for this face + faces[face_cnt].numVerts=atoi(temp[0].c_str()); + vert=faces[face_cnt].numVerts; + //second is material ID + faces[face_cnt].materialID=atoi(temp[1].c_str()); + //vertices are ordined + faces[face_cnt].firstVert=vert_cnt; + + //now we'll create vertices structure + for(int k=0;k<vert;k++) + { + //get vertex position + temp1=SubdivideString(RawFile[offs1+atoi(temp[2+k].c_str())], ";"); + + //copy x,y,z values + vertices[vert_cnt].pos.set((float)atof(temp1[0].c_str()), + (float)atof(temp1[1].c_str()), + (float)-atof(temp1[2].c_str())); + + //get uv coords for tex and light if any + vertices[vert_cnt].tc.set((float)atof(temp[2+vert+(2*k)].c_str()), + (float)atof(temp[2+vert+(2*k)+1].c_str())); + tmp_sz=temp.size(); + + vertices[vert_cnt].lc.set((float)atof(temp[tmp_sz-(2*vert)+(2*k)].c_str()), + (float)atof(temp[tmp_sz-(2*vert)+(2*k)+1].c_str())); + ++vert_cnt; + temp1.clear(); + } + ++face_cnt; + temp.clear(); + } + } + offs=offs+fac; + } + + return true; +} + +} // end namespace +} // end namespace scene +} // end namespace irr + +#endif /* __DMF_SUPPORT_H__ */ + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/glext.h b/src/others/irrlicht-1.8.1/source/Irrlicht/glext.h new file mode 100644 index 0000000..b5dcd52 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/glext.h @@ -0,0 +1,11488 @@ +#ifndef __glext_h_ +#define __glext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2011 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glext.h last updated $Date: 2011-08-08 00:34:29 -0700 (Mon, 08 Aug 2011) $ */ +/* Current version at http://www.opengl.org/registry/ */ +#define GL_GLEXT_VERSION 72 +/* Function declaration macros - to move into glplatform.h */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +#ifndef GL_VERSION_1_2 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#endif + +#ifndef GL_VERSION_1_2_DEPRECATED +#define GL_RESCALE_NORMAL 0x803A +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#endif + +#ifndef GL_ARB_imaging +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#endif + +#ifndef GL_ARB_imaging_DEPRECATED +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#endif + +#ifndef GL_VERSION_1_3 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#endif + +#ifndef GL_VERSION_1_3_DEPRECATED +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#endif + +#ifndef GL_VERSION_1_4 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#endif + +#ifndef GL_VERSION_1_4_DEPRECATED +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#endif + +#ifndef GL_VERSION_1_5 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#endif + +#ifndef GL_VERSION_1_5_DEPRECATED +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_FOG_COORD_SRC 0x8450 +#define GL_FOG_COORD 0x8451 +#define GL_CURRENT_FOG_COORD 0x8453 +#define GL_FOG_COORD_ARRAY_TYPE 0x8454 +#define GL_FOG_COORD_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORD_ARRAY_POINTER 0x8456 +#define GL_FOG_COORD_ARRAY 0x8457 +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D +#define GL_SRC0_RGB 0x8580 +#define GL_SRC1_RGB 0x8581 +#define GL_SRC2_RGB 0x8582 +#define GL_SRC0_ALPHA 0x8588 +#define GL_SRC1_ALPHA 0x8589 +#define GL_SRC2_ALPHA 0x858A +#endif + +#ifndef GL_VERSION_2_0 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#endif + +#ifndef GL_VERSION_2_0_DEPRECATED +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_TEXTURE_COORDS 0x8871 +#endif + +#ifndef GL_VERSION_2_1 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#endif + +#ifndef GL_VERSION_2_1_DEPRECATED +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +#endif + +#ifndef GL_VERSION_3_0 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_DEPTH_BUFFER 0x8223 +#define GL_STENCIL_BUFFER 0x8224 +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +/* Reuse tokens from ARB_depth_buffer_float */ +/* reuse GL_DEPTH_COMPONENT32F */ +/* reuse GL_DEPTH32F_STENCIL8 */ +/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_DEFAULT */ +/* reuse GL_FRAMEBUFFER_UNDEFINED */ +/* reuse GL_DEPTH_STENCIL_ATTACHMENT */ +/* reuse GL_INDEX */ +/* reuse GL_MAX_RENDERBUFFER_SIZE */ +/* reuse GL_DEPTH_STENCIL */ +/* reuse GL_UNSIGNED_INT_24_8 */ +/* reuse GL_DEPTH24_STENCIL8 */ +/* reuse GL_TEXTURE_STENCIL_SIZE */ +/* reuse GL_TEXTURE_RED_TYPE */ +/* reuse GL_TEXTURE_GREEN_TYPE */ +/* reuse GL_TEXTURE_BLUE_TYPE */ +/* reuse GL_TEXTURE_ALPHA_TYPE */ +/* reuse GL_TEXTURE_DEPTH_TYPE */ +/* reuse GL_UNSIGNED_NORMALIZED */ +/* reuse GL_FRAMEBUFFER_BINDING */ +/* reuse GL_DRAW_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_BINDING */ +/* reuse GL_READ_FRAMEBUFFER */ +/* reuse GL_DRAW_FRAMEBUFFER */ +/* reuse GL_READ_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_SAMPLES */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +/* reuse GL_FRAMEBUFFER_COMPLETE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ +/* reuse GL_FRAMEBUFFER_UNSUPPORTED */ +/* reuse GL_MAX_COLOR_ATTACHMENTS */ +/* reuse GL_COLOR_ATTACHMENT0 */ +/* reuse GL_COLOR_ATTACHMENT1 */ +/* reuse GL_COLOR_ATTACHMENT2 */ +/* reuse GL_COLOR_ATTACHMENT3 */ +/* reuse GL_COLOR_ATTACHMENT4 */ +/* reuse GL_COLOR_ATTACHMENT5 */ +/* reuse GL_COLOR_ATTACHMENT6 */ +/* reuse GL_COLOR_ATTACHMENT7 */ +/* reuse GL_COLOR_ATTACHMENT8 */ +/* reuse GL_COLOR_ATTACHMENT9 */ +/* reuse GL_COLOR_ATTACHMENT10 */ +/* reuse GL_COLOR_ATTACHMENT11 */ +/* reuse GL_COLOR_ATTACHMENT12 */ +/* reuse GL_COLOR_ATTACHMENT13 */ +/* reuse GL_COLOR_ATTACHMENT14 */ +/* reuse GL_COLOR_ATTACHMENT15 */ +/* reuse GL_DEPTH_ATTACHMENT */ +/* reuse GL_STENCIL_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER */ +/* reuse GL_RENDERBUFFER */ +/* reuse GL_RENDERBUFFER_WIDTH */ +/* reuse GL_RENDERBUFFER_HEIGHT */ +/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ +/* reuse GL_STENCIL_INDEX1 */ +/* reuse GL_STENCIL_INDEX4 */ +/* reuse GL_STENCIL_INDEX8 */ +/* reuse GL_STENCIL_INDEX16 */ +/* reuse GL_RENDERBUFFER_RED_SIZE */ +/* reuse GL_RENDERBUFFER_GREEN_SIZE */ +/* reuse GL_RENDERBUFFER_BLUE_SIZE */ +/* reuse GL_RENDERBUFFER_ALPHA_SIZE */ +/* reuse GL_RENDERBUFFER_DEPTH_SIZE */ +/* reuse GL_RENDERBUFFER_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ +/* reuse GL_MAX_SAMPLES */ +/* Reuse tokens from ARB_framebuffer_sRGB */ +/* reuse GL_FRAMEBUFFER_SRGB */ +/* Reuse tokens from ARB_half_float_vertex */ +/* reuse GL_HALF_FLOAT */ +/* Reuse tokens from ARB_map_buffer_range */ +/* reuse GL_MAP_READ_BIT */ +/* reuse GL_MAP_WRITE_BIT */ +/* reuse GL_MAP_INVALIDATE_RANGE_BIT */ +/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ +/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ +/* reuse GL_MAP_UNSYNCHRONIZED_BIT */ +/* Reuse tokens from ARB_texture_compression_rgtc */ +/* reuse GL_COMPRESSED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_RG_RGTC2 */ +/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ +/* Reuse tokens from ARB_texture_rg */ +/* reuse GL_RG */ +/* reuse GL_RG_INTEGER */ +/* reuse GL_R8 */ +/* reuse GL_R16 */ +/* reuse GL_RG8 */ +/* reuse GL_RG16 */ +/* reuse GL_R16F */ +/* reuse GL_R32F */ +/* reuse GL_RG16F */ +/* reuse GL_RG32F */ +/* reuse GL_R8I */ +/* reuse GL_R8UI */ +/* reuse GL_R16I */ +/* reuse GL_R16UI */ +/* reuse GL_R32I */ +/* reuse GL_R32UI */ +/* reuse GL_RG8I */ +/* reuse GL_RG8UI */ +/* reuse GL_RG16I */ +/* reuse GL_RG16UI */ +/* reuse GL_RG32I */ +/* reuse GL_RG32UI */ +/* Reuse tokens from ARB_vertex_array_object */ +/* reuse GL_VERTEX_ARRAY_BINDING */ +#endif + +#ifndef GL_VERSION_3_0_DEPRECATED +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_ALPHA_INTEGER 0x8D97 +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_TEXTURE_LUMINANCE_TYPE */ +/* reuse GL_TEXTURE_INTENSITY_TYPE */ +#endif + +#ifndef GL_VERSION_3_1 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +/* Reuse tokens from ARB_copy_buffer */ +/* reuse GL_COPY_READ_BUFFER */ +/* reuse GL_COPY_WRITE_BUFFER */ +/* Reuse tokens from ARB_draw_instanced (none) */ +/* Reuse tokens from ARB_uniform_buffer_object */ +/* reuse GL_UNIFORM_BUFFER */ +/* reuse GL_UNIFORM_BUFFER_BINDING */ +/* reuse GL_UNIFORM_BUFFER_START */ +/* reuse GL_UNIFORM_BUFFER_SIZE */ +/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */ +/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */ +/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */ +/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */ +/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */ +/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */ +/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */ +/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */ +/* reuse GL_ACTIVE_UNIFORM_BLOCKS */ +/* reuse GL_UNIFORM_TYPE */ +/* reuse GL_UNIFORM_SIZE */ +/* reuse GL_UNIFORM_NAME_LENGTH */ +/* reuse GL_UNIFORM_BLOCK_INDEX */ +/* reuse GL_UNIFORM_OFFSET */ +/* reuse GL_UNIFORM_ARRAY_STRIDE */ +/* reuse GL_UNIFORM_MATRIX_STRIDE */ +/* reuse GL_UNIFORM_IS_ROW_MAJOR */ +/* reuse GL_UNIFORM_BLOCK_BINDING */ +/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */ +/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */ +/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */ +/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */ +/* reuse GL_INVALID_INDEX */ +#endif + +#ifndef GL_VERSION_3_2 +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +/* reuse GL_MAX_VARYING_COMPONENTS */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +/* Reuse tokens from ARB_depth_clamp */ +/* reuse GL_DEPTH_CLAMP */ +/* Reuse tokens from ARB_draw_elements_base_vertex (none) */ +/* Reuse tokens from ARB_fragment_coord_conventions (none) */ +/* Reuse tokens from ARB_provoking_vertex */ +/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ +/* reuse GL_FIRST_VERTEX_CONVENTION */ +/* reuse GL_LAST_VERTEX_CONVENTION */ +/* reuse GL_PROVOKING_VERTEX */ +/* Reuse tokens from ARB_seamless_cube_map */ +/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ +/* Reuse tokens from ARB_sync */ +/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */ +/* reuse GL_OBJECT_TYPE */ +/* reuse GL_SYNC_CONDITION */ +/* reuse GL_SYNC_STATUS */ +/* reuse GL_SYNC_FLAGS */ +/* reuse GL_SYNC_FENCE */ +/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */ +/* reuse GL_UNSIGNALED */ +/* reuse GL_SIGNALED */ +/* reuse GL_ALREADY_SIGNALED */ +/* reuse GL_TIMEOUT_EXPIRED */ +/* reuse GL_CONDITION_SATISFIED */ +/* reuse GL_WAIT_FAILED */ +/* reuse GL_TIMEOUT_IGNORED */ +/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */ +/* reuse GL_TIMEOUT_IGNORED */ +/* Reuse tokens from ARB_texture_multisample */ +/* reuse GL_SAMPLE_POSITION */ +/* reuse GL_SAMPLE_MASK */ +/* reuse GL_SAMPLE_MASK_VALUE */ +/* reuse GL_MAX_SAMPLE_MASK_WORDS */ +/* reuse GL_TEXTURE_2D_MULTISAMPLE */ +/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */ +/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */ +/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_TEXTURE_SAMPLES */ +/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */ +/* reuse GL_SAMPLER_2D_MULTISAMPLE */ +/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */ +/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */ +/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */ +/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */ +/* reuse GL_MAX_INTEGER_SAMPLES */ +/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ +#endif + +#ifndef GL_VERSION_3_3 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +/* Reuse tokens from ARB_blend_func_extended */ +/* reuse GL_SRC1_COLOR */ +/* reuse GL_ONE_MINUS_SRC1_COLOR */ +/* reuse GL_ONE_MINUS_SRC1_ALPHA */ +/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */ +/* Reuse tokens from ARB_explicit_attrib_location (none) */ +/* Reuse tokens from ARB_occlusion_query2 */ +/* reuse GL_ANY_SAMPLES_PASSED */ +/* Reuse tokens from ARB_sampler_objects */ +/* reuse GL_SAMPLER_BINDING */ +/* Reuse tokens from ARB_shader_bit_encoding (none) */ +/* Reuse tokens from ARB_texture_rgb10_a2ui */ +/* reuse GL_RGB10_A2UI */ +/* Reuse tokens from ARB_texture_swizzle */ +/* reuse GL_TEXTURE_SWIZZLE_R */ +/* reuse GL_TEXTURE_SWIZZLE_G */ +/* reuse GL_TEXTURE_SWIZZLE_B */ +/* reuse GL_TEXTURE_SWIZZLE_A */ +/* reuse GL_TEXTURE_SWIZZLE_RGBA */ +/* Reuse tokens from ARB_timer_query */ +/* reuse GL_TIME_ELAPSED */ +/* reuse GL_TIMESTAMP */ +/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */ +/* reuse GL_INT_2_10_10_10_REV */ +#endif + +#ifndef GL_VERSION_4_0 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +/* Reuse tokens from ARB_texture_query_lod (none) */ +/* Reuse tokens from ARB_draw_buffers_blend (none) */ +/* Reuse tokens from ARB_draw_indirect */ +/* reuse GL_DRAW_INDIRECT_BUFFER */ +/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */ +/* Reuse tokens from ARB_gpu_shader5 */ +/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */ +/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */ +/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */ +/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */ +/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */ +/* reuse GL_MAX_VERTEX_STREAMS */ +/* Reuse tokens from ARB_gpu_shader_fp64 */ +/* reuse GL_DOUBLE_VEC2 */ +/* reuse GL_DOUBLE_VEC3 */ +/* reuse GL_DOUBLE_VEC4 */ +/* reuse GL_DOUBLE_MAT2 */ +/* reuse GL_DOUBLE_MAT3 */ +/* reuse GL_DOUBLE_MAT4 */ +/* reuse GL_DOUBLE_MAT2x3 */ +/* reuse GL_DOUBLE_MAT2x4 */ +/* reuse GL_DOUBLE_MAT3x2 */ +/* reuse GL_DOUBLE_MAT3x4 */ +/* reuse GL_DOUBLE_MAT4x2 */ +/* reuse GL_DOUBLE_MAT4x3 */ +/* Reuse tokens from ARB_shader_subroutine */ +/* reuse GL_ACTIVE_SUBROUTINES */ +/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */ +/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */ +/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */ +/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */ +/* reuse GL_MAX_SUBROUTINES */ +/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */ +/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ +/* reuse GL_COMPATIBLE_SUBROUTINES */ +/* Reuse tokens from ARB_tessellation_shader */ +/* reuse GL_PATCHES */ +/* reuse GL_PATCH_VERTICES */ +/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */ +/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */ +/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */ +/* reuse GL_TESS_GEN_MODE */ +/* reuse GL_TESS_GEN_SPACING */ +/* reuse GL_TESS_GEN_VERTEX_ORDER */ +/* reuse GL_TESS_GEN_POINT_MODE */ +/* reuse GL_ISOLINES */ +/* reuse GL_FRACTIONAL_ODD */ +/* reuse GL_FRACTIONAL_EVEN */ +/* reuse GL_MAX_PATCH_VERTICES */ +/* reuse GL_MAX_TESS_GEN_LEVEL */ +/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */ +/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */ +/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_PATCH_COMPONENTS */ +/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */ +/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */ +/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */ +/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */ +/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */ +/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */ +/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */ +/* reuse GL_TESS_EVALUATION_SHADER */ +/* reuse GL_TESS_CONTROL_SHADER */ +/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */ +/* Reuse tokens from ARB_transform_feedback2 */ +/* reuse GL_TRANSFORM_FEEDBACK */ +/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ +/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ +/* reuse GL_TRANSFORM_FEEDBACK_BINDING */ +/* Reuse tokens from ARB_transform_feedback3 */ +/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */ +/* reuse GL_MAX_VERTEX_STREAMS */ +#endif + +#ifndef GL_VERSION_4_1 +/* Reuse tokens from ARB_ES2_compatibility */ +/* reuse GL_FIXED */ +/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */ +/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */ +/* reuse GL_LOW_FLOAT */ +/* reuse GL_MEDIUM_FLOAT */ +/* reuse GL_HIGH_FLOAT */ +/* reuse GL_LOW_INT */ +/* reuse GL_MEDIUM_INT */ +/* reuse GL_HIGH_INT */ +/* reuse GL_SHADER_COMPILER */ +/* reuse GL_NUM_SHADER_BINARY_FORMATS */ +/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */ +/* reuse GL_MAX_VARYING_VECTORS */ +/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */ +/* Reuse tokens from ARB_get_program_binary */ +/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */ +/* reuse GL_PROGRAM_BINARY_LENGTH */ +/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */ +/* reuse GL_PROGRAM_BINARY_FORMATS */ +/* Reuse tokens from ARB_separate_shader_objects */ +/* reuse GL_VERTEX_SHADER_BIT */ +/* reuse GL_FRAGMENT_SHADER_BIT */ +/* reuse GL_GEOMETRY_SHADER_BIT */ +/* reuse GL_TESS_CONTROL_SHADER_BIT */ +/* reuse GL_TESS_EVALUATION_SHADER_BIT */ +/* reuse GL_ALL_SHADER_BITS */ +/* reuse GL_PROGRAM_SEPARABLE */ +/* reuse GL_ACTIVE_PROGRAM */ +/* reuse GL_PROGRAM_PIPELINE_BINDING */ +/* Reuse tokens from ARB_shader_precision (none) */ +/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */ +/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */ +/* reuse GL_MAX_VIEWPORTS */ +/* reuse GL_VIEWPORT_SUBPIXEL_BITS */ +/* reuse GL_VIEWPORT_BOUNDS_RANGE */ +/* reuse GL_LAYER_PROVOKING_VERTEX */ +/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */ +/* reuse GL_UNDEFINED_VERTEX */ +#endif + +#ifndef GL_VERSION_4_2 +/* Reuse tokens from ARB_base_instance (none) */ +/* Reuse tokens from ARB_shading_language_420pack (none) */ +/* Reuse tokens from ARB_transform_feedback_instanced (none) */ +/* Reuse tokens from ARB_compressed_texture_pixel_storage */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */ +/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */ +/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */ +/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */ +/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */ +/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */ +/* Reuse tokens from ARB_conservative_depth (none) */ +/* Reuse tokens from ARB_internalformat_query */ +/* reuse GL_NUM_SAMPLE_COUNTS */ +/* Reuse tokens from ARB_map_buffer_alignment */ +/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */ +/* Reuse tokens from ARB_shader_atomic_counters */ +/* reuse GL_ATOMIC_COUNTER_BUFFER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_START */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */ +/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */ +/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */ +/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */ +/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */ +/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */ +/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */ +/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */ +/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */ +/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */ +/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */ +/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */ +/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */ +/* Reuse tokens from ARB_shader_image_load_store */ +/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */ +/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */ +/* reuse GL_UNIFORM_BARRIER_BIT */ +/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */ +/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */ +/* reuse GL_COMMAND_BARRIER_BIT */ +/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */ +/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */ +/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */ +/* reuse GL_FRAMEBUFFER_BARRIER_BIT */ +/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */ +/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */ +/* reuse GL_ALL_BARRIER_BITS */ +/* reuse GL_MAX_IMAGE_UNITS */ +/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ +/* reuse GL_IMAGE_BINDING_NAME */ +/* reuse GL_IMAGE_BINDING_LEVEL */ +/* reuse GL_IMAGE_BINDING_LAYERED */ +/* reuse GL_IMAGE_BINDING_LAYER */ +/* reuse GL_IMAGE_BINDING_ACCESS */ +/* reuse GL_IMAGE_1D */ +/* reuse GL_IMAGE_2D */ +/* reuse GL_IMAGE_3D */ +/* reuse GL_IMAGE_2D_RECT */ +/* reuse GL_IMAGE_CUBE */ +/* reuse GL_IMAGE_BUFFER */ +/* reuse GL_IMAGE_1D_ARRAY */ +/* reuse GL_IMAGE_2D_ARRAY */ +/* reuse GL_IMAGE_CUBE_MAP_ARRAY */ +/* reuse GL_IMAGE_2D_MULTISAMPLE */ +/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_INT_IMAGE_1D */ +/* reuse GL_INT_IMAGE_2D */ +/* reuse GL_INT_IMAGE_3D */ +/* reuse GL_INT_IMAGE_2D_RECT */ +/* reuse GL_INT_IMAGE_CUBE */ +/* reuse GL_INT_IMAGE_BUFFER */ +/* reuse GL_INT_IMAGE_1D_ARRAY */ +/* reuse GL_INT_IMAGE_2D_ARRAY */ +/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */ +/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */ +/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_1D */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D */ +/* reuse GL_UNSIGNED_INT_IMAGE_3D */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */ +/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */ +/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */ +/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */ +/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ +/* reuse GL_MAX_IMAGE_SAMPLES */ +/* reuse GL_IMAGE_BINDING_FORMAT */ +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */ +/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */ +/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */ +/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */ +/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */ +/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */ +/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */ +/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */ +/* Reuse tokens from ARB_shading_language_packing (none) */ +/* Reuse tokens from ARB_texture_storage */ +/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */ +#endif + +#ifndef GL_ARB_multitexture +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +#endif + +#ifndef GL_ARB_multisample +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +#endif + +#ifndef GL_ARB_texture_env_add +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif + +#ifndef GL_ARB_texture_compression +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif + +#ifndef GL_ARB_point_parameters +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +#ifndef GL_ARB_shadow +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +#ifndef GL_ARB_window_pos +#endif + +#ifndef GL_ARB_vertex_program +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +#endif + +#ifndef GL_ARB_fragment_program +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +#endif + +#ifndef GL_ARB_shader_objects +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#endif + +#ifndef GL_ARB_point_sprite +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +#endif + +#ifndef GL_ARB_half_float_pixel +#define GL_HALF_FLOAT_ARB 0x140B +#endif + +#ifndef GL_ARB_texture_float +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#endif + +#ifndef GL_ARB_draw_instanced +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#endif + +#ifndef GL_ARB_framebuffer_object_DEPRECATED +#define GL_INDEX 0x8222 +#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +/* reuse GL_MAX_VARYING_COMPONENTS */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_HALF_FLOAT 0x140B +#endif + +#ifndef GL_ARB_instanced_arrays +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#endif + +#ifndef GL_ARB_texture_rg +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#endif + +#ifndef GL_ARB_uniform_buffer_object +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#endif + +#ifndef GL_ARB_compatibility +/* ARB_compatibility just defines tokens from core 3.0 */ +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#endif + +#ifndef GL_ARB_shader_texture_lod +#endif + +#ifndef GL_ARB_depth_clamp +#define GL_DEPTH_CLAMP 0x864F +#endif + +#ifndef GL_ARB_draw_elements_base_vertex +#endif + +#ifndef GL_ARB_fragment_coord_conventions +#endif + +#ifndef GL_ARB_provoking_vertex +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_PROVOKING_VERTEX 0x8E4F +#endif + +#ifndef GL_ARB_seamless_cube_map +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#endif + +#ifndef GL_ARB_sync +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#endif + +#ifndef GL_ARB_texture_multisample +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#endif + +#ifndef GL_ARB_vertex_array_bgra +/* reuse GL_BGRA */ +#endif + +#ifndef GL_ARB_draw_buffers_blend +#endif + +#ifndef GL_ARB_sample_shading +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +#endif + +#ifndef GL_ARB_texture_cube_map_array +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +#endif + +#ifndef GL_ARB_texture_gather +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#endif + +#ifndef GL_ARB_texture_query_lod +#endif + +#ifndef GL_ARB_shading_language_include +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +#endif + +#ifndef GL_ARB_texture_compression_bptc +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#endif + +#ifndef GL_ARB_blend_func_extended +#define GL_SRC1_COLOR 0x88F9 +/* reuse GL_SRC1_ALPHA */ +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#endif + +#ifndef GL_ARB_explicit_attrib_location +#endif + +#ifndef GL_ARB_occlusion_query2 +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#endif + +#ifndef GL_ARB_sampler_objects +#define GL_SAMPLER_BINDING 0x8919 +#endif + +#ifndef GL_ARB_shader_bit_encoding +#endif + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_RGB10_A2UI 0x906F +#endif + +#ifndef GL_ARB_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#endif + +#ifndef GL_ARB_timer_query +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIMESTAMP 0x8E28 +#endif + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ +#define GL_INT_2_10_10_10_REV 0x8D9F +#endif + +#ifndef GL_ARB_draw_indirect +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#endif + +#ifndef GL_ARB_gpu_shader5 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +/* reuse GL_MAX_VERTEX_STREAMS */ +#endif + +#ifndef GL_ARB_gpu_shader_fp64 +/* reuse GL_DOUBLE */ +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#endif + +#ifndef GL_ARB_shader_subroutine +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +/* reuse GL_UNIFORM_SIZE */ +/* reuse GL_UNIFORM_NAME_LENGTH */ +#endif + +#ifndef GL_ARB_tessellation_shader +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +/* reuse GL_TRIANGLES */ +/* reuse GL_QUADS */ +#define GL_ISOLINES 0x8E7A +/* reuse GL_EQUAL */ +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +/* reuse GL_CCW */ +/* reuse GL_CW */ +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#endif + +#ifndef GL_ARB_texture_buffer_object_rgb32 +/* reuse GL_RGB32F */ +/* reuse GL_RGB32UI */ +/* reuse GL_RGB32I */ +#endif + +#ifndef GL_ARB_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#endif + +#ifndef GL_ARB_transform_feedback3 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#endif + +#ifndef GL_ARB_ES2_compatibility +#define GL_FIXED 0x140C +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#endif + +#ifndef GL_ARB_get_program_binary +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#endif + +#ifndef GL_ARB_separate_shader_objects +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#endif + +#ifndef GL_ARB_shader_precision +#endif + +#ifndef GL_ARB_vertex_attrib_64bit +/* reuse GL_RGB32I */ +/* reuse GL_DOUBLE_VEC2 */ +/* reuse GL_DOUBLE_VEC3 */ +/* reuse GL_DOUBLE_VEC4 */ +/* reuse GL_DOUBLE_MAT2 */ +/* reuse GL_DOUBLE_MAT3 */ +/* reuse GL_DOUBLE_MAT4 */ +/* reuse GL_DOUBLE_MAT2x3 */ +/* reuse GL_DOUBLE_MAT2x4 */ +/* reuse GL_DOUBLE_MAT3x2 */ +/* reuse GL_DOUBLE_MAT3x4 */ +/* reuse GL_DOUBLE_MAT4x2 */ +/* reuse GL_DOUBLE_MAT4x3 */ +#endif + +#ifndef GL_ARB_viewport_array +/* reuse GL_SCISSOR_BOX */ +/* reuse GL_VIEWPORT */ +/* reuse GL_DEPTH_RANGE */ +/* reuse GL_SCISSOR_TEST */ +#define GL_MAX_VIEWPORTS 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_UNDEFINED_VERTEX 0x8260 +/* reuse GL_FIRST_VERTEX_CONVENTION */ +/* reuse GL_LAST_VERTEX_CONVENTION */ +/* reuse GL_PROVOKING_VERTEX */ +#endif + +#ifndef GL_ARB_cl_event +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +#endif + +#ifndef GL_ARB_debug_output +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +#endif + +#ifndef GL_ARB_robustness +/* reuse GL_NO_ERROR */ +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef GL_ARB_shader_stencil_export +#endif + +#ifndef GL_ARB_base_instance +#endif + +#ifndef GL_ARB_shading_language_420pack +#endif + +#ifndef GL_ARB_transform_feedback_instanced +#endif + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#endif + +#ifndef GL_ARB_conservative_depth +#endif + +#ifndef GL_ARB_internalformat_query +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#endif + +#ifndef GL_ARB_map_buffer_alignment +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#endif + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#endif + +#ifndef GL_ARB_shader_image_load_store +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#endif + +#ifndef GL_ARB_shading_language_packing +#endif + +#ifndef GL_ARB_texture_storage +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#endif + +#ifndef GL_EXT_abgr +#define GL_ABGR_EXT 0x8000 +#endif + +#ifndef GL_EXT_blend_color +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +#endif + +#ifndef GL_EXT_texture +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif + +#ifndef GL_EXT_texture3D +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +#endif + +#ifndef GL_EXT_subtexture +#endif + +#ifndef GL_EXT_copy_texture +#endif + +#ifndef GL_EXT_histogram +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +#endif + +#ifndef GL_EXT_convolution +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +#endif + +#ifndef GL_SGI_color_matrix +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif + +#ifndef GL_SGI_color_table +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +#endif + +#ifndef GL_SGIS_texture4D +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif + +#ifndef GL_EXT_cmyka +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif + +#ifndef GL_EXT_texture_object +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif + +#ifndef GL_SGIS_multisample +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif + +#ifndef GL_EXT_vertex_array +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +#endif + +#ifndef GL_EXT_misc_attribute +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif + +#ifndef GL_SGIX_shadow +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif + +#ifndef GL_SGIS_texture_border_clamp +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif + +#ifndef GL_EXT_blend_logic_op +#endif + +#ifndef GL_SGIX_interlace +#define GL_INTERLACE_SGIX 0x8094 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif + +#ifndef GL_SGIS_texture_select +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif + +#ifndef GL_EXT_point_parameters +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +#endif + +#ifndef GL_SGIX_instruments +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif + +#ifndef GL_SGIX_framezoom +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#endif + +#ifndef GL_FfdMaskSGIX +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +#endif + +#ifndef GL_SGIX_flush_raster +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif + +#ifndef GL_SGIS_fog_function +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif + +#ifndef GL_HP_image_transform +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif + +#ifndef GL_INGR_palette_buffer +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif + +#ifndef GL_EXT_color_subtable +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_LIST_PRIORITY_SGIX 0x8182 +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif + +#ifndef GL_EXT_index_texture +#endif + +#ifndef GL_EXT_index_material +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +#endif + +#ifndef GL_EXT_index_func +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +#endif + +#ifndef GL_WIN_phong_shading +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif + +#ifndef GL_WIN_specular_fog +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif + +#ifndef GL_EXT_light_texture +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +/* reuse GL_FRAGMENT_DEPTH_EXT */ +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif + +#ifndef GL_SGIX_impact_pixel_texture +#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 +#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 +#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 +#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 +#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 +#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 +#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A +#endif + +#ifndef GL_EXT_bgra +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif + +#ifndef GL_SGIX_async +#define GL_ASYNC_MARKER_SGIX 0x8329 +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif + +#ifndef GL_INTEL_texture_scissor +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +#endif + +#ifndef GL_HP_occlusion_test +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +#endif + +#ifndef GL_EXT_pixel_transform_color_table +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif + +#ifndef GL_EXT_secondary_color +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +#endif + +#ifndef GL_EXT_multi_draw_arrays +#endif + +#ifndef GL_EXT_fog_coord +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_FOG_SCALE_SGIX 0x81FC +#define GL_FOG_SCALE_VALUE_SGIX 0x81FD +#endif + +#ifndef GL_SUNX_constant_data +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +#endif + +#ifndef GL_SUN_global_alpha +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +#endif + +#ifndef GL_SUN_triangle_list +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +#endif + +#ifndef GL_SUN_vertex +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +#endif + +#ifndef GL_INGR_color_clamp +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INTERLACE_READ_INGR 0x8568 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif + +#ifndef GL_EXT_texture_cube_map +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif + +#ifndef GL_EXT_texture_env_add +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT GL_MODELVIEW +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +#endif + +#ifndef GL_NV_register_combiners +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +/* reuse GL_TEXTURE0_ARB */ +/* reuse GL_TEXTURE1_ARB */ +/* reuse GL_ZERO */ +/* reuse GL_NONE */ +/* reuse GL_FOG */ +#endif + +#ifndef GL_NV_fog_distance +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +/* reuse GL_EYE_PLANE */ +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif + +#ifndef GL_NV_blend_square +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif + +#ifndef GL_MESA_resize_buffers +#endif + +#ifndef GL_MESA_window_pos +#endif + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_CULL_VERTEX_IBM 103050 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +#endif + +#ifndef GL_SGIX_subsample +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif + +#ifndef GL_SGIX_ycrcb_subsample +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif + +#ifndef GL_SGI_depth_pass_instrument +#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 +#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 +#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#endif + +#ifndef GL_3DFX_tbuffer +#endif + +#ifndef GL_EXT_multisample +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif + +#ifndef GL_SGIX_resample +#define GL_PACK_RESAMPLE_SGIX 0x842C +#define GL_UNPACK_RESAMPLE_SGIX 0x842D +#define GL_RESAMPLE_REPLICATE_SGIX 0x842E +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif + +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif + +#ifndef GL_NV_evaluators +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +#endif + +#ifndef GL_NV_texture_compression_vtc +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif + +#ifndef GL_NV_texture_shader +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif + +#ifndef GL_NV_vertex_program +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif + +#ifndef GL_OML_interlace +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif + +#ifndef GL_OML_subsample +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif + +#ifndef GL_OML_resample +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +#endif + +#ifndef GL_ATI_element_array +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#endif + +#ifndef GL_SUN_mesh_array +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_DEPTH_CLAMP_NV 0x864F +#endif + +#ifndef GL_NV_occlusion_query +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#endif + +#ifndef GL_NV_point_sprite +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif + +#ifndef GL_NV_vertex_program1_1 +#endif + +#ifndef GL_EXT_shadow_funcs +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif + +#ifndef GL_APPLE_element_array +#define GL_ELEMENT_ARRAY_APPLE 0x8A0C +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E +#endif + +#ifndef GL_APPLE_fence +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CLIENT_APPLE 0x85B4 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +#ifndef GL_S3_s3tc +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif + +#ifndef GL_ATI_texture_float +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif + +#ifndef GL_NV_float_buffer +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif + +#ifndef GL_NV_fragment_program +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +#endif + +#ifndef GL_NV_half_float +#define GL_HALF_FLOAT_NV 0x140B +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +#endif + +#ifndef GL_NV_primitive_restart +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif + +#ifndef GL_NV_vertex_program2 +#endif + +#ifndef GL_ATI_map_object_buffer +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#endif + +#ifndef GL_OES_read_format +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +#endif + +#ifndef GL_MESA_pack_invert +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif + +#ifndef GL_NV_fragment_program_option +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif + +#ifndef GL_NV_vertex_program2_option +/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ +/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ +#endif + +#ifndef GL_NV_vertex_program3 +/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +#endif + +#ifndef GL_GREMEDY_string_marker +#endif + +#ifndef GL_EXT_packed_depth_stencil +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif + +#ifndef GL_EXT_timer_query +#define GL_TIME_ELAPSED_EXT 0x88BF +#endif + +#ifndef GL_EXT_gpu_program_parameters +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ +/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ +/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ +/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +/* reuse GL_LINES_ADJACENCY_EXT */ +/* reuse GL_LINE_STRIP_ADJACENCY_EXT */ +/* reuse GL_TRIANGLES_ADJACENCY_EXT */ +/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ +/* reuse GL_PROGRAM_POINT_SIZE_EXT */ +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#endif + +#ifndef GL_EXT_draw_instanced +#endif + +#ifndef GL_EXT_packed_float +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif + +#ifndef GL_EXT_texture_array +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +#endif + +#ifndef GL_NV_fragment_program4 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif + +#ifndef GL_NV_geometry_shader4 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +#endif + +#ifndef GL_EXT_draw_buffers2 +#endif + +#ifndef GL_NV_transform_feedback +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_LAYER_NV 0x8DAA +#define GL_NEXT_BUFFER_NV -2 +#define GL_SKIP_COMPONENTS4_NV -3 +#define GL_SKIP_COMPONENTS3_NV -4 +#define GL_SKIP_COMPONENTS2_NV -5 +#define GL_SKIP_COMPONENTS1_NV -6 +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +#endif + +#ifndef GL_EXT_texture_integer +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +#endif + +#ifndef GL_GREMEDY_frame_terminator +#endif + +#ifndef GL_NV_conditional_render +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +#endif + +#ifndef GL_NV_present_video +#define GL_FRAME_NV 0x8E26 +#define GL_FIELDS_NV 0x8E27 +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESENT_DURATION_NV 0x8E2B +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +#endif + +#ifndef GL_EXT_vertex_array_bgra +/* reuse GL_BGRA */ +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +#endif + +#ifndef GL_ATI_meminfo +#define GL_VBO_FREE_MEMORY_ATI 0x87FB +#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +#endif + +#ifndef GL_AMD_performance_monitor +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#endif + +#ifndef GL_AMD_texture_texture4 +#endif + +#ifndef GL_AMD_vertex_shader_tesselator +#define GL_SAMPLER_BUFFER_AMD 0x9001 +#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +#define GL_TESSELLATION_MODE_AMD 0x9004 +#define GL_TESSELLATION_FACTOR_AMD 0x9005 +#define GL_DISCRETE_AMD 0x9006 +#define GL_CONTINUOUS_AMD 0x9007 +#endif + +#ifndef GL_EXT_provoking_vertex +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_PROVOKING_VERTEX_EXT 0x8E4F +#endif + +#ifndef GL_EXT_texture_snorm +#define GL_ALPHA_SNORM 0x9010 +#define GL_LUMINANCE_SNORM 0x9011 +#define GL_LUMINANCE_ALPHA_SNORM 0x9012 +#define GL_INTENSITY_SNORM 0x9013 +#define GL_ALPHA8_SNORM 0x9014 +#define GL_LUMINANCE8_SNORM 0x9015 +#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +#define GL_INTENSITY8_SNORM 0x9017 +#define GL_ALPHA16_SNORM 0x9018 +#define GL_LUMINANCE16_SNORM 0x9019 +#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +#define GL_INTENSITY16_SNORM 0x901B +/* reuse GL_RED_SNORM */ +/* reuse GL_RG_SNORM */ +/* reuse GL_RGB_SNORM */ +/* reuse GL_RGBA_SNORM */ +/* reuse GL_R8_SNORM */ +/* reuse GL_RG8_SNORM */ +/* reuse GL_RGB8_SNORM */ +/* reuse GL_RGBA8_SNORM */ +/* reuse GL_R16_SNORM */ +/* reuse GL_RG16_SNORM */ +/* reuse GL_RGB16_SNORM */ +/* reuse GL_RGBA16_SNORM */ +/* reuse GL_SIGNED_NORMALIZED */ +#endif + +#ifndef GL_AMD_draw_buffers_blend +#endif + +#ifndef GL_APPLE_texture_range +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +/* reuse GL_STORAGE_CACHED_APPLE */ +/* reuse GL_STORAGE_SHARED_APPLE */ +#endif + +#ifndef GL_APPLE_float_pixels +#define GL_HALF_APPLE 0x140B +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_COLOR_FLOAT_APPLE 0x8A0F +#endif + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +#endif + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +#endif + +#ifndef GL_APPLE_object_purgeable +#define GL_BUFFER_OBJECT_APPLE 0x85B3 +#define GL_RELEASED_APPLE 0x8A19 +#define GL_VOLATILE_APPLE 0x8A1A +#define GL_RETAINED_APPLE 0x8A1B +#define GL_UNDEFINED_APPLE 0x8A1C +#define GL_PURGEABLE_APPLE 0x8A1D +#endif + +#ifndef GL_APPLE_row_bytes +#define GL_PACK_ROW_BYTES_APPLE 0x8A15 +#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +#endif + +#ifndef GL_APPLE_rgb_422 +#define GL_RGB_422_APPLE 0x8A1F +/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */ +/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */ +#endif + +#ifndef GL_NV_video_capture +#define GL_VIDEO_BUFFER_NV 0x9020 +#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +#define GL_FIELD_UPPER_NV 0x9022 +#define GL_FIELD_LOWER_NV 0x9023 +#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +#define GL_PARTIAL_SUCCESS_NV 0x902E +#define GL_SUCCESS_NV 0x902F +#define GL_FAILURE_NV 0x9030 +#define GL_YCBYCR8_422_NV 0x9031 +#define GL_YCBAYCR8A_4224_NV 0x9032 +#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +#endif + +#ifndef GL_NV_copy_image +#endif + +#ifndef GL_EXT_separate_shader_objects +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +#endif + +#ifndef GL_NV_parameter_buffer_object2 +#endif + +#ifndef GL_NV_shader_buffer_load +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +#endif + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +#endif + +#ifndef GL_NV_texture_barrier +#endif + +#ifndef GL_AMD_shader_stencil_export +#endif + +#ifndef GL_AMD_seamless_cubemap_per_texture +/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ +#endif + +#ifndef GL_AMD_conservative_depth +#endif + +#ifndef GL_EXT_shader_image_load_store +#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +#define GL_IMAGE_1D_EXT 0x904C +#define GL_IMAGE_2D_EXT 0x904D +#define GL_IMAGE_3D_EXT 0x904E +#define GL_IMAGE_2D_RECT_EXT 0x904F +#define GL_IMAGE_CUBE_EXT 0x9050 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_IMAGE_1D_ARRAY_EXT 0x9052 +#define GL_IMAGE_2D_ARRAY_EXT 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +#define GL_INT_IMAGE_1D_EXT 0x9057 +#define GL_INT_IMAGE_2D_EXT 0x9058 +#define GL_INT_IMAGE_3D_EXT 0x9059 +#define GL_INT_IMAGE_2D_RECT_EXT 0x905A +#define GL_INT_IMAGE_CUBE_EXT 0x905B +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +#endif + +#ifndef GL_EXT_vertex_attrib_64bit +/* reuse GL_DOUBLE */ +#define GL_DOUBLE_VEC2_EXT 0x8FFC +#define GL_DOUBLE_VEC3_EXT 0x8FFD +#define GL_DOUBLE_VEC4_EXT 0x8FFE +#define GL_DOUBLE_MAT2_EXT 0x8F46 +#define GL_DOUBLE_MAT3_EXT 0x8F47 +#define GL_DOUBLE_MAT4_EXT 0x8F48 +#define GL_DOUBLE_MAT2x3_EXT 0x8F49 +#define GL_DOUBLE_MAT2x4_EXT 0x8F4A +#define GL_DOUBLE_MAT3x2_EXT 0x8F4B +#define GL_DOUBLE_MAT3x4_EXT 0x8F4C +#define GL_DOUBLE_MAT4x2_EXT 0x8F4D +#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +#endif + +#ifndef GL_NV_gpu_program5 +#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C +#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F +#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 +#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +#endif + +#ifndef GL_NV_gpu_shader5 +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +/* reuse GL_PATCHES */ +#endif + +#ifndef GL_NV_shader_buffer_store +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +/* reuse GL_READ_WRITE */ +/* reuse GL_WRITE_ONLY */ +#endif + +#ifndef GL_NV_tessellation_program5 +#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +#define GL_TESS_CONTROL_PROGRAM_NV 0x891E +#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#endif + +#ifndef GL_NV_vertex_attrib_integer_64bit +/* reuse GL_INT64_NV */ +/* reuse GL_UNSIGNED_INT64_NV */ +#endif + +#ifndef GL_NV_multisample_coverage +#define GL_COVERAGE_SAMPLES_NV 0x80A9 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#endif + +#ifndef GL_AMD_name_gen_delete +#define GL_DATA_BUFFER_AMD 0x9151 +#define GL_PERFORMANCE_MONITOR_AMD 0x9152 +#define GL_QUERY_OBJECT_AMD 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +#define GL_SAMPLER_OBJECT_AMD 0x9155 +#endif + +#ifndef GL_AMD_debug_output +#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +#endif + +#ifndef GL_NV_vdpau_interop +#define GL_SURFACE_STATE_NV 0x86EB +#define GL_SURFACE_REGISTERED_NV 0x86FD +#define GL_SURFACE_MAPPED_NV 0x8700 +#define GL_WRITE_DISCARD_NV 0x88BE +#endif + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#endif + +#ifndef GL_AMD_depth_clamp_separate +#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +#define GL_DEPTH_CLAMP_FAR_AMD 0x901F +#endif + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#endif + +#ifndef GL_NV_texture_multisample +#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 +#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 +#endif + +#ifndef GL_AMD_blend_minmax_factor +#define GL_FACTOR_MIN_AMD 0x901C +#define GL_FACTOR_MAX_AMD 0x901D +#endif + +#ifndef GL_AMD_sample_positions +#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +#endif + +#ifndef GL_EXT_x11_sync_object +#define GL_SYNC_X11_FENCE_EXT 0x90E1 +#endif + +#ifndef GL_AMD_multi_draw_indirect +#endif + +#ifndef GL_EXT_framebuffer_multisample_blit_scaled +#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA +#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB +#endif + + +/*************************************************************/ + +#include <stddef.h> +#ifndef GL_VERSION_2_0 +/* GL type for program/shader text */ +typedef char GLchar; +#endif + +#ifndef GL_VERSION_1_5 +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +#endif + +#ifndef GL_ARB_vertex_buffer_object +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +#endif + +#ifndef GL_ARB_shader_objects +/* GL types for program/shader text and shader object handles */ +typedef char GLcharARB; +typedef unsigned int GLhandleARB; +#endif + +/* GL type for "half" precision (s10e5) float data in host memory */ +#ifndef GL_ARB_half_float_pixel +typedef unsigned short GLhalfARB; +#endif + +#ifndef GL_NV_half_float +typedef unsigned short GLhalfNV; +#endif + +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glxext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GL_EXT_timer_query extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include <inttypes.h> +#elif defined(__sun__) || defined(__digital__) +#include <inttypes.h> +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include <inttypes.h> +#elif defined(__SCO__) || defined(__USLC__) +#include <stdint.h> +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include <stdint.h> +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +/* Fallback if nothing above works */ +#include <inttypes.h> +#endif +#endif + +#ifndef GL_EXT_timer_query +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +#endif + +#ifndef GL_ARB_sync +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; +#endif + +#ifndef GL_ARB_cl_event +/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ +struct _cl_context; +struct _cl_event; +#endif + +#ifndef GL_ARB_debug_output +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#endif + +#ifndef GL_AMD_debug_output +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#endif + +#ifndef GL_NV_vdpau_interop +typedef GLintptr GLvdpauSurfaceNV; +#endif + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GLAPI void APIENTRY glBlendEquation (GLenum mode); +GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif + +#ifndef GL_VERSION_1_2_DEPRECATED +#define GL_VERSION_1_2_DEPRECATED 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); +GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); +GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogram (GLenum target); +GLAPI void APIENTRY glResetMinmax (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +#endif + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture (GLenum texture); +GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); +#endif + +#ifndef GL_VERSION_1_3_DEPRECATED +#define GL_VERSION_1_3_DEPRECATED 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClientActiveTexture (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); +GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +#endif + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_VERSION_1_4_DEPRECATED +#define GL_VERSION_1_4_DEPRECATED 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordf (GLfloat coord); +GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); +GLAPI void APIENTRY glFogCoordd (GLdouble coord); +GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2iv (const GLint *v); +GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); +GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3iv (const GLint *v); +GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +#endif + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQuery (GLuint id); +GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQuery (GLenum target); +GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); +GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GLAPI void APIENTRY glCompileShader (GLuint shader); +GLAPI GLuint APIENTRY glCreateProgram (void); +GLAPI GLuint APIENTRY glCreateShader (GLenum type); +GLAPI void APIENTRY glDeleteProgram (GLuint program); +GLAPI void APIENTRY glDeleteShader (GLuint shader); +GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); +GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); +GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); +GLAPI GLboolean APIENTRY glIsProgram (GLuint program); +GLAPI GLboolean APIENTRY glIsShader (GLuint shader); +GLAPI void APIENTRY glLinkProgram (GLuint program); +GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +GLAPI void APIENTRY glUseProgram (GLuint program); +GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glValidateProgram (GLuint program); +GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif + +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +/* OpenGL 3.0 also reuses entry points from these extensions: */ +/* ARB_framebuffer_object */ +/* ARB_map_buffer_range */ +/* ARB_vertex_array_object */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); +GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); +GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedback (void); +GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); +GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRender (void); +GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); +GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +#endif + +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 1 +/* OpenGL 3.1 also reuses entry points from these extensions: */ +/* ARB_copy_buffer */ +/* ARB_uniform_buffer_object */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +#endif + +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 1 +/* OpenGL 3.2 also reuses entry points from these extensions: */ +/* ARB_draw_elements_base_vertex */ +/* ARB_provoking_vertex */ +/* ARB_sync */ +/* ARB_texture_multisample */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif + +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 1 +/* OpenGL 3.3 also reuses entry points from these extensions: */ +/* ARB_blend_func_extended */ +/* ARB_sampler_objects */ +/* ARB_explicit_attrib_location, but it has none */ +/* ARB_occlusion_query2 (no entry points) */ +/* ARB_shader_bit_encoding (no entry points) */ +/* ARB_texture_rgb10_a2ui (no entry points) */ +/* ARB_texture_swizzle (no entry points) */ +/* ARB_timer_query */ +/* ARB_vertex_type_2_10_10_10_rev */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +#endif + +#ifndef GL_VERSION_4_0 +#define GL_VERSION_4_0 1 +/* OpenGL 4.0 also reuses entry points from these extensions: */ +/* ARB_texture_query_lod (no entry points) */ +/* ARB_draw_indirect */ +/* ARB_gpu_shader5 (no entry points) */ +/* ARB_gpu_shader_fp64 */ +/* ARB_shader_subroutine */ +/* ARB_tessellation_shader */ +/* ARB_texture_buffer_object_rgb32 (no entry points) */ +/* ARB_texture_cube_map_array (no entry points) */ +/* ARB_texture_gather (no entry points) */ +/* ARB_transform_feedback2 */ +/* ARB_transform_feedback3 */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading (GLclampf value); +GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLclampf value); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 +/* OpenGL 4.1 reuses entry points from these extensions: */ +/* ARB_ES2_compatibility */ +/* ARB_get_program_binary */ +/* ARB_separate_shader_objects */ +/* ARB_shader_precision (no entry points) */ +/* ARB_vertex_attrib_64bit */ +/* ARB_viewport_array */ +#endif + +#ifndef GL_VERSION_4_2 +#define GL_VERSION_4_2 1 +/* OpenGL 4.2 reuses entry points from these extensions: */ +/* ARB_base_instance */ +/* ARB_shading_language_420pack (no entry points) */ +/* ARB_transform_feedback_instanced */ +/* ARB_compressed_texture_pixel_storage (no entry points) */ +/* ARB_conservative_depth (no entry points) */ +/* ARB_internalformat_query */ +/* ARB_map_buffer_alignment (no entry points) */ +/* ARB_shader_atomic_counters */ +/* ARB_shader_image_load_store */ +/* ARB_shading_language_packing (no entry points) */ +/* ARB_texture_storage */ +#endif + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); +GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); +GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); +GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); +GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); +GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); +GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); +GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); +GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); +GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); +GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); +GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); +GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); +GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); +GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); +GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); +GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); +GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); +GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); +GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); +GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +#endif + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleCoverageARB (GLclampf value, GLboolean invert); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +#endif + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 +#endif + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#endif + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); +GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); +GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); +GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); +GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); +GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); +GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); +GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); +GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glVertexBlendARB (GLint count); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); +GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); +GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); +GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); +GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#endif + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#endif + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); +GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +#endif + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); +GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); +GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); +GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); +GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +#endif + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); +GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); +GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); +GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access); +GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); +GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); +GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); +GLAPI void APIENTRY glEndQueryARB (GLenum target); +GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); +GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); +GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); +GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); +GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); +GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); +GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); +GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); +GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +#endif + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 +#endif + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float 1 +#endif + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmap (GLenum target); +GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex 1 +#endif + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc 1 +#endif + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg 1 +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArray (GLuint array); +GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +#endif + +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif + +#ifndef GL_ARB_compatibility +#define GL_ARB_compatibility 1 +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif + +#ifndef GL_ARB_shader_texture_lod +#define GL_ARB_shader_texture_lod 1 +#endif + +#ifndef GL_ARB_depth_clamp +#define GL_ARB_depth_clamp 1 +#endif + +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); +#endif + +#ifndef GL_ARB_fragment_coord_conventions +#define GL_ARB_fragment_coord_conventions 1 +#endif + +#ifndef GL_ARB_provoking_vertex +#define GL_ARB_provoking_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertex (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +#endif + +#ifndef GL_ARB_seamless_cube_map +#define GL_ARB_seamless_cube_map 1 +#endif + +#ifndef GL_ARB_sync +#define GL_ARB_sync 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GLAPI GLboolean APIENTRY glIsSync (GLsync sync); +GLAPI void APIENTRY glDeleteSync (GLsync sync); +GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); +typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +#endif + +#ifndef GL_ARB_texture_multisample +#define GL_ARB_texture_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +#endif + +#ifndef GL_ARB_vertex_array_bgra +#define GL_ARB_vertex_array_bgra 1 +#endif + +#ifndef GL_ARB_draw_buffers_blend +#define GL_ARB_draw_buffers_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +#ifndef GL_ARB_sample_shading +#define GL_ARB_sample_shading 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB (GLclampf value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value); +#endif + +#ifndef GL_ARB_texture_cube_map_array +#define GL_ARB_texture_cube_map_array 1 +#endif + +#ifndef GL_ARB_texture_gather +#define GL_ARB_texture_gather 1 +#endif + +#ifndef GL_ARB_texture_query_lod +#define GL_ARB_texture_query_lod 1 +#endif + +#ifndef GL_ARB_shading_language_include +#define GL_ARB_shading_language_include 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); +GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc 1 +#endif + +#ifndef GL_ARB_blend_func_extended +#define GL_ARB_blend_func_extended 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +#endif + +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location 1 +#endif + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 1 +#endif + +#ifndef GL_ARB_sampler_objects +#define GL_ARB_sampler_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); +GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); +GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_shader_bit_encoding +#define GL_ARB_shader_bit_encoding 1 +#endif + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui 1 +#endif + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle 1 +#endif + +#ifndef GL_ARB_timer_query +#define GL_ARB_timer_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); +GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +#endif + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +#define GL_ARB_vertex_type_2_10_10_10_rev 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); +GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); +GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); +GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); +GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); +GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); +GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); +GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +#endif + +#ifndef GL_ARB_draw_indirect +#define GL_ARB_draw_indirect 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); +GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); +#endif + +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 1 +#endif + +#ifndef GL_ARB_gpu_shader_fp64 +#define GL_ARB_gpu_shader_fp64 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); +GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +#endif + +#ifndef GL_ARB_shader_subroutine +#define GL_ARB_shader_subroutine 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +#endif + +#ifndef GL_ARB_tessellation_shader +#define GL_ARB_tessellation_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); +GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +#endif + +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 1 +#endif + +#ifndef GL_ARB_transform_feedback2 +#define GL_ARB_transform_feedback2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedback (void); +GLAPI void APIENTRY glResumeTransformFeedback (void); +GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +#endif + +#ifndef GL_ARB_transform_feedback3 +#define GL_ARB_transform_feedback3 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); +GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_ES2_compatibility +#define GL_ARB_ES2_compatibility 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler (void); +GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI void APIENTRY glDepthRangef (GLclampf n, GLclampf f); +GLAPI void APIENTRY glClearDepthf (GLclampf d); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f); +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLclampf d); +#endif + +#ifndef GL_ARB_get_program_binary +#define GL_ARB_get_program_binary 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +#endif + +#ifndef GL_ARB_separate_shader_objects +#define GL_ARB_separate_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings); +GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings); +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif + +#ifndef GL_ARB_vertex_attrib_64bit +#define GL_ARB_vertex_attrib_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +#endif + +#ifndef GL_ARB_viewport_array +#define GL_ARB_viewport_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); +GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v); +GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f); +GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f); +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +#endif + +#ifndef GL_ARB_cl_event +#define GL_ARB_cl_event 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +#endif + +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif + +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif + +#ifndef GL_ARB_shader_stencil_export +#define GL_ARB_shader_stencil_export 1 +#endif + +#ifndef GL_ARB_base_instance +#define GL_ARB_base_instance 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); +#endif + +#ifndef GL_ARB_shading_language_420pack +#define GL_ARB_shading_language_420pack 1 +#endif + +#ifndef GL_ARB_transform_feedback_instanced +#define GL_ARB_transform_feedback_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei primcount); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); +#endif + +#ifndef GL_ARB_compressed_texture_pixel_storage +#define GL_ARB_compressed_texture_pixel_storage 1 +#endif + +#ifndef GL_ARB_conservative_depth +#define GL_ARB_conservative_depth 1 +#endif + +#ifndef GL_ARB_internalformat_query +#define GL_ARB_internalformat_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +#endif + +#ifndef GL_ARB_map_buffer_alignment +#define GL_ARB_map_buffer_alignment 1 +#endif + +#ifndef GL_ARB_shader_atomic_counters +#define GL_ARB_shader_atomic_counters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +#endif + +#ifndef GL_ARB_shader_image_load_store +#define GL_ARB_shader_image_load_store 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +#endif + +#ifndef GL_ARB_shading_language_packing +#define GL_ARB_shading_language_packing 1 +#endif + +#ifndef GL_ARB_texture_storage +#define GL_ARB_texture_storage 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 +#endif + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +#endif + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 +#endif + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#endif + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +GLAPI void APIENTRY glResetHistogramEXT (GLenum target); +GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +#endif + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); +GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +#endif + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 +#endif + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); +GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); +GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +#endif + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 +#endif + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 +#endif + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); +GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); +GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); +GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 +#endif + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 +#endif + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glArrayElementEXT (GLint i); +GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +GLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params); +GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 +#endif + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 +#endif + +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#endif + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 +#endif + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles 1 +#endif + +#ifndef GL_SGIX_texture_select +#define GL_SGIX_texture_select 1 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 +#endif + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); +GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); +GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); +GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); +GLAPI void APIENTRY glStartInstrumentsSGIX (void); +GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 +#endif + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTagSampleBufferSGIX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); +GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +#endif + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushRasterSGIX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 +#endif + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); +GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 +#endif + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 +#endif + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_SGIX_calligraphic_fragment 1 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 +#endif + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 +#endif + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +#endif + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); +GLAPI void APIENTRY glUnlockArraysEXT (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); +GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_SGIX_fragment_lighting 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); +GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); +GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params); +GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); +GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); +GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); +GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +#endif + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 +#endif + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 +#endif + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); +GLAPI void APIENTRY glTextureLightEXT (GLenum pname); +GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 +#endif + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 +#endif + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); +GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); +GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); +GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); +GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +#endif + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 +#endif + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); +GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); +GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); +GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); +GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); +GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); +GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); +GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); +GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); +GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); +GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); +GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); +GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); +GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); +GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); +GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); +GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); +GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); +GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_SGIX_fog_scale 1 +#endif + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFinishTextureSUNX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); +#endif + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); +GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); +GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor); +GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor); +GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); +GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); +GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); +GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +#endif + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); +GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); +GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); +GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); +GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); +GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); +GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +#endif + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 +#endif + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); +GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); +GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); +GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); +#endif + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); +GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); +GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +#endif + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 +#endif + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 +#endif + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glResizeBuffersMESA (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); +#endif + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); +GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); +GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); +GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); +GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); +GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); +GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); +GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); +GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); +GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); +GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +#endif + +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample 1 +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba 1 +#endif + +#ifndef GL_SGIX_ycrcb_subsample +#define GL_SGIX_ycrcb_subsample 1 +#endif + +#ifndef GL_SGIX_depth_pass_instrument +#define GL_SGIX_depth_pass_instrument 1 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 +#endif + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +#endif + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); +GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy 1 +#endif + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen 1 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#endif + +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 +#endif + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); +GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); +GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GLAPI void APIENTRY glFinishFenceNV (GLuint fence); +GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#endif + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 +#endif + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 +#endif + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); +GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); +GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); +GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); +GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); +GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint 1 +#endif + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 +#endif + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 +#endif + +#ifndef GL_OML_resample +#define GL_OML_resample 1 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); +GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); +GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); +GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); +GLAPI void APIENTRY glBeginFragmentShaderATI (void); +GLAPI void APIENTRY glEndFragmentShaderATI (void); +GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); +GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); +GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVertexShaderEXT (void); +GLAPI void APIENTRY glEndVertexShaderEXT (void); +GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); +GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); +GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); +GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); +GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); +GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); +GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); +GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); +GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); +GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); +GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); +GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); +GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); +GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); +GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); +GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); +GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); +GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); +GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); +GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); +GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); +GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); +GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); +GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); +GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); +GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); +GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); +GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); +GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); +GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer); +GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 +#endif + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); +GLAPI void APIENTRY glEndOcclusionQueryNV (void); +GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); +GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#endif + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 +#endif + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#endif + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer); +GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); +GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); +GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); +GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); +GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#endif + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +/* This is really a WGL extension, but defines some associated GL enums. + * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. + */ +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#endif + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#endif + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 +#endif + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 +/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); +GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); +GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); +GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); +GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); +GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); +GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); +GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer); +GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +#endif + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV (void); +GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#endif + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#endif + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer); +GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +#endif + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +#endif + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#endif + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 +#endif + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#endif + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); +GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); +GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); +GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); +GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +#endif + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +#endif + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 +#endif + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); +#endif + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_APPLE_flush_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); +GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_NV_vertex_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); +GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); +GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); +GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); +GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); +GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); +GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +#endif + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float 1 +#endif + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array 1 +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc 1 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent 1 +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); +GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +#endif + +#ifndef GL_NV_fragment_program4 +#define GL_NV_fragment_program4 1 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB 1 +#endif + +#ifndef GL_NV_geometry_shader4 +#define GL_NV_geometry_shader4 1 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +#endif + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); +GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +#endif + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackNV (void); +GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); +GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); +GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); +GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); +GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +#endif + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif + +#ifndef GL_GREMEDY_frame_terminator +#define GL_GREMEDY_frame_terminator 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); +#endif + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GLAPI void APIENTRY glEndConditionalRenderNV (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#endif + +#ifndef GL_NV_present_video +#define GL_NV_present_video 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_EXT_transform_feedback 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); +GLAPI void APIENTRY glEndTransformFeedbackEXT (void); +GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); +GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); +GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); +GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); +GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); +GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); +GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); +GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); +GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +#endif + +#ifndef GL_EXT_vertex_array_bgra +#define GL_EXT_vertex_array_bgra 1 +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle 1 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); +GLAPI void APIENTRY glPauseTransformFeedbackNV (void); +GLAPI void APIENTRY glResumeTransformFeedbackNV (void); +GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +#endif + +#ifndef GL_ATI_meminfo +#define GL_ATI_meminfo 1 +#endif + +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif + +#ifndef GL_AMD_texture_texture4 +#define GL_AMD_texture_texture4 1 +#endif + +#ifndef GL_AMD_vertex_shader_tesselator +#define GL_AMD_vertex_shader_tesselator 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); +GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_provoking_vertex +#define GL_EXT_provoking_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_texture_snorm +#define GL_EXT_texture_snorm 1 +#endif + +#ifndef GL_AMD_draw_buffers_blend +#define GL_AMD_draw_buffers_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +#endif + +#ifndef GL_APPLE_texture_range +#define GL_APPLE_texture_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); +GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_APPLE_float_pixels +#define GL_APPLE_float_pixels 1 +#endif + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_APPLE_vertex_program_evaluators 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +#endif + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_APPLE_aux_depth_stencil 1 +#endif + +#ifndef GL_APPLE_object_purgeable +#define GL_APPLE_object_purgeable 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +#endif + +#ifndef GL_APPLE_row_bytes +#define GL_APPLE_row_bytes 1 +#endif + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#endif + +#ifndef GL_NV_video_capture +#define GL_NV_video_capture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); +GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +#endif + +#ifndef GL_NV_copy_image +#define GL_NV_copy_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); +GLAPI void APIENTRY glActiveProgramEXT (GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +#endif + +#ifndef GL_NV_parameter_buffer_object2 +#define GL_NV_parameter_buffer_object2 1 +#endif + +#ifndef GL_NV_shader_buffer_load +#define GL_NV_shader_buffer_load 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); +GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); +GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); +GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); +GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); +GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_NV_vertex_buffer_unified_memory 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); +GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); +GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +#endif + +#ifndef GL_NV_texture_barrier +#define GL_NV_texture_barrier 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); +#endif + +#ifndef GL_AMD_shader_stencil_export +#define GL_AMD_shader_stencil_export 1 +#endif + +#ifndef GL_AMD_seamless_cubemap_per_texture +#define GL_AMD_seamless_cubemap_per_texture 1 +#endif + +#ifndef GL_AMD_conservative_depth +#define GL_AMD_conservative_depth 1 +#endif + +#ifndef GL_EXT_shader_image_load_store +#define GL_EXT_shader_image_load_store 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +#endif + +#ifndef GL_EXT_vertex_attrib_64bit +#define GL_EXT_vertex_attrib_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +#endif + +#ifndef GL_NV_gpu_program5 +#define GL_NV_gpu_program5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +#endif + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif + +#ifndef GL_NV_shader_buffer_store +#define GL_NV_shader_buffer_store 1 +#endif + +#ifndef GL_NV_tessellation_program5 +#define GL_NV_tessellation_program5 1 +#endif + +#ifndef GL_NV_vertex_attrib_integer_64bit +#define GL_NV_vertex_attrib_integer_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif + +#ifndef GL_NV_multisample_coverage +#define GL_NV_multisample_coverage 1 +#endif + +#ifndef GL_AMD_name_gen_delete +#define GL_AMD_name_gen_delete 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +#endif + +#ifndef GL_AMD_debug_output +#define GL_AMD_debug_output 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif + +#ifndef GL_NV_vdpau_interop +#define GL_NV_vdpau_interop 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +GLAPI void APIENTRY glVDPAUFiniNV (void); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#define GL_AMD_transform_feedback3_lines_triangles 1 +#endif + +#ifndef GL_AMD_depth_clamp_separate +#define GL_AMD_depth_clamp_separate 1 +#endif + +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#endif + +#ifndef GL_NV_texture_multisample +#define GL_NV_texture_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +#endif + +#ifndef GL_AMD_blend_minmax_factor +#define GL_AMD_blend_minmax_factor 1 +#endif + +#ifndef GL_AMD_sample_positions +#define GL_AMD_sample_positions 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); +#endif + +#ifndef GL_EXT_x11_sync_object +#define GL_EXT_x11_sync_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +#endif + +#ifndef GL_AMD_multi_draw_indirect +#define GL_AMD_multi_draw_indirect 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +#endif + +#ifndef GL_EXT_framebuffer_multisample_blit_scaled +#define GL_EXT_framebuffer_multisample_blit_scaled 1 +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/glxext.h b/src/others/irrlicht-1.8.1/source/Irrlicht/glxext.h new file mode 100644 index 0000000..07b0219 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/glxext.h @@ -0,0 +1,993 @@ +#ifndef __glxext_h_ +#define __glxext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2011 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Function declaration macros - to move into glplatform.h */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glxext.h last updated 2010/08/06 */ +/* Current version at http://www.opengl.org/registry/ */ +#define GLX_GLXEXT_VERSION 32 + +#ifndef GLX_VERSION_1_3 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +#endif + +#ifndef GLX_VERSION_1_4 +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +#endif + +#ifndef GLX_ARB_get_proc_address +#endif + +#ifndef GLX_ARB_multisample +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 +#endif + +#ifndef GLX_ARB_vertex_buffer_object +#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif + +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +#endif + +#ifndef GLX_ARB_create_context_profile +#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 +#endif + +#ifndef GLX_ARB_create_context_robustness +#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef GLX_SGIS_multisample +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 +#endif + +#ifndef GLX_EXT_visual_info +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#endif + +#ifndef GLX_SGI_swap_control +#endif + +#ifndef GLX_SGI_video_sync +#endif + +#ifndef GLX_SGI_make_current_read +#endif + +#ifndef GLX_SGIX_video_source +#endif + +#ifndef GLX_EXT_visual_rating +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +/* reuse GLX_NONE_EXT */ +#endif + +#ifndef GLX_EXT_import_context +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C +#endif + +#ifndef GLX_SGIX_fbconfig +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +/* reuse GLX_SCREEN_EXT */ +#endif + +#ifndef GLX_SGIX_pbuffer +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +#endif + +#ifndef GLX_SGI_cushion +#endif + +#ifndef GLX_SGIX_video_resize +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 +#endif + +#ifndef GLX_SGIX_dmbuffer +#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 +#endif + +#ifndef GLX_SGIX_swap_group +#endif + +#ifndef GLX_SGIX_swap_barrier +#endif + +#ifndef GLX_SGIS_blended_overlay +#define GLX_BLENDED_RGBA_SGIS 0x8025 +#endif + +#ifndef GLX_SGIS_shared_multisample +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +#endif + +#ifndef GLX_SUN_get_transparent_index +#endif + +#ifndef GLX_3DFX_multisample +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#endif + +#ifndef GLX_MESA_pixmap_colormap +#endif + +#ifndef GLX_MESA_release_buffers +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +#endif + +#ifndef GLX_SGIX_visual_select_group +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +#endif + +#ifndef GLX_OML_swap_method +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 +#endif + +#ifndef GLX_OML_sync_control +#endif + +#ifndef GLX_NV_float_buffer +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +#endif + +#ifndef GLX_MESA_agp_offset +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB +#endif + +#ifndef GLX_NV_present_video +#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef GLX_NV_video_out +#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 +#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 +#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 +#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 +#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 +#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA +#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB +#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC +#endif + +#ifndef GLX_NV_swap_group +#endif + +#ifndef GLX_NV_video_capture +#define GLX_DEVICE_ID_NV 0x20CD +#define GLX_UNIQUE_ID_NV 0x20CE +#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#endif + +#ifndef GLX_EXT_swap_control +#define GLX_SWAP_INTERVAL_EXT 0x20F1 +#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +#endif + +#ifndef GLX_NV_copy_image +#endif + +#ifndef GLX_INTEL_swap_event +#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 +#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 +#define GLX_COPY_COMPLETE_INTEL 0x8181 +#define GLX_FLIP_COMPLETE_INTEL 0x8182 +#endif + +#ifndef GLX_NV_multisample_coverage +#define GLX_COVERAGE_SAMPLES_NV 100001 +#define GLX_COLOR_SAMPLES_NV 0x20B3 +#endif + +#ifndef GLX_AMD_gpu_association +#define GLX_GPU_VENDOR_AMD 0x1F00 +#define GLX_GPU_RENDERER_STRING_AMD 0x1F01 +#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define GLX_GPU_RAM_AMD 0x21A3 +#define GLX_GPU_CLOCK_AMD 0x21A4 +#define GLX_GPU_NUM_PIPES_AMD 0x21A5 +#define GLX_GPU_NUM_SIMD_AMD 0x21A6 +#define GLX_GPU_NUM_RB_AMD 0x21A7 +#define GLX_GPU_NUM_SPI_AMD 0x21A8 +#endif + +#ifndef GLX_EXT_create_context_es2_profile +#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif + + +/*************************************************************/ + +#ifndef GLX_ARB_get_proc_address +typedef void (*__GLXextFuncPtr)(void); +#endif + +#ifndef GLX_SGIX_video_source +typedef XID GLXVideoSourceSGIX; +#endif + +#ifndef GLX_SGIX_fbconfig +typedef XID GLXFBConfigIDSGIX; +typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; +#endif + +#ifndef GLX_SGIX_pbuffer +typedef XID GLXPbufferSGIX; +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* i.d. of Drawable */ + int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ + int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ + unsigned int mask; /* mask indicating which buffers are affected*/ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXBufferClobberEventSGIX; +#endif + +#ifndef GLX_NV_video_output +typedef unsigned int GLXVideoDeviceNV; +#endif + +#ifndef GLX_NV_video_capture +typedef XID GLXVideoCaptureDeviceNV; +#endif + +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GLX_OML_sync_control extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include <inttypes.h> +#elif defined(__sun__) || defined(__digital__) +#include <inttypes.h> +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include <inttypes.h> +#elif defined(__SCO__) || defined(__USLC__) +#include <stdint.h> +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include <stdint.h> +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +#include <inttypes.h> /* Fallback option */ +#endif +#endif + +#ifndef GLX_VERSION_1_3 +#define GLX_VERSION_1_3 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements); +extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); +extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); +extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); +extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +extern void glXDestroyWindow (Display *dpy, GLXWindow win); +extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); +extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); +extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); +extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +extern GLXDrawable glXGetCurrentReadDrawable (void); +extern Display * glXGetCurrentDisplay (void); +extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); +extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); +extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); +typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#endif + +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); +#endif + +#ifndef GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); +#endif + +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float 1 +#endif + +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_ARB_framebuffer_sRGB 1 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_ARB_create_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif + +#ifndef GLX_ARB_create_context_profile +#define GLX_ARB_create_context_profile 1 +#endif + +#ifndef GLX_ARB_create_context_robustness +#define GLX_ARB_create_context_robustness 1 +#endif + +#ifndef GLX_SGIS_multisample +#define GLX_SGIS_multisample 1 +#endif + +#ifndef GLX_EXT_visual_info +#define GLX_EXT_visual_info 1 +#endif + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXSwapIntervalSGI (int interval); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); +#endif + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoSyncSGI (unsigned int *count); +extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); +typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); +#endif + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +extern GLXDrawable glXGetCurrentReadDrawableSGI (void); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); +#endif + +#ifndef GLX_SGIX_video_source +#define GLX_SGIX_video_source 1 +#ifdef _VL_H +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif /* _VL_H */ +#endif + +#ifndef GLX_EXT_visual_rating +#define GLX_EXT_visual_rating 1 +#endif + +#ifndef GLX_EXT_import_context +#define GLX_EXT_import_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Display * glXGetCurrentDisplayEXT (void); +extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value); +extern GLXContextID glXGetContextIDEXT (const GLXContext context); +extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); +extern void glXFreeContextEXT (Display *dpy, GLXContext context); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); +typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); +typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); +typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); +typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); +#endif + +#ifndef GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements); +extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config); +extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); +typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); +#endif + +#ifndef GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf); +extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask); +extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); +typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); +typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#endif + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCushionSGI (Display *dpy, Window window, float cushion); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); +#endif + +#ifndef GLX_SGIX_video_resize +#define GLX_SGIX_video_resize 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window); +extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h); +extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); +typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); +typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); +#endif + +#ifndef GLX_SGIX_dmbuffer +#define GLX_SGIX_dmbuffer 1 +#ifdef _DM_BUFFER_H_ +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif /* _DM_BUFFER_H_ */ +#endif + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#endif + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier); +extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); +typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); +#endif + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#endif + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#endif + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXSet3DfxModeMESA (int mode); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); +#endif + +#ifndef GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group 1 +#endif + +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 +#endif + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#endif + +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_SGIX_hyperpipe 1 + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; +} GLXHyperpipeNetworkSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int + participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; +} GLXPipeRect; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin, YOrigin, maxHeight, maxWidth; +} GLXPipeRectLimits; + +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes); +extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes); +extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId); +extern int glXBindHyperpipeSGIX (Display *dpy, int hpId); +extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); +typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); +typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int glXGetAGPOffsetMESA (const void *pointer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_EXT_fbconfig_packed_float 1 +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_EXT_framebuffer_sRGB 1 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_EXT_texture_from_pixmap 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); +#endif + +#ifndef GLX_NV_present_video +#define GLX_NV_present_video 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements); +extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements); +typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +#endif + +#ifndef GLX_NV_video_output +#define GLX_NV_video_output 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); +extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); +extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); +extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf); +extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); +extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); +typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); +typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); +typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf); +typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); +typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif + +#ifndef GLX_NV_swap_group +#define GLX_NV_swap_group 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group); +extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier); +extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); +extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); +extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count); +extern Bool glXResetFrameCountNV (Display *dpy, int screen); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group); +typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier); +typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); +typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); +typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count); +typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen); +#endif + +#ifndef GLX_NV_video_capture +#define GLX_NV_video_capture 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements); +extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); +extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements); +typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +#endif + +#ifndef GLX_EXT_swap_control +#define GLX_EXT_swap_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval); +#endif + +#ifndef GLX_NV_copy_image +#define GLX_NV_copy_image 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef GLX_INTEL_swap_event +#define GLX_INTEL_swap_event 1 +#endif + +#ifndef GLX_NV_multisample_coverage +#define GLX_NV_multisample_coverage 1 +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/irrXML.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/irrXML.cpp new file mode 100644 index 0000000..9197348 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/irrXML.cpp @@ -0,0 +1,180 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine" and the "irrXML" project. +// For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h + +#include "irrXML.h" +#include "irrString.h" +#include "irrArray.h" +#include "fast_atof.h" +#include "CXMLReaderImpl.h" + +namespace irr +{ +namespace io +{ + +//! Implementation of the file read callback for ordinary files +class CFileReadCallBack : public IFileReadCallBack +{ +public: + + //! construct from filename + CFileReadCallBack(const char* filename) + : File(0), Size(-1), Close(true) + { + // open file + File = fopen(filename, "rb"); + + if (File) + getFileSize(); + } + + //! construct from FILE pointer + CFileReadCallBack(FILE* file) + : File(file), Size(-1), Close(false) + { + if (File) + getFileSize(); + } + + //! destructor + virtual ~CFileReadCallBack() + { + if (Close && File) + fclose(File); + } + + //! Reads an amount of bytes from the file. + virtual int read(void* buffer, int sizeToRead) + { + if (!File) + return 0; + + return (int)fread(buffer, 1, sizeToRead, File); + } + + //! Returns size of file in bytes + virtual long getSize() const + { + return Size; + } + +private: + + //! retrieves the file size of the open file + void getFileSize() + { + fseek(File, 0, SEEK_END); + Size = ftell(File); + fseek(File, 0, SEEK_SET); + } + + FILE* File; + long Size; + bool Close; + +}; // end class CFileReadCallBack + + + +// FACTORY FUNCTIONS: + + +//! Creates an instance of an UFT-8 or ASCII character xml parser. +IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(const char* filename) +{ + return createIrrXMLReader(new CFileReadCallBack(filename), true); +} + + +//! Creates an instance of an UFT-8 or ASCII character xml parser. +IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(FILE* file) +{ + return createIrrXMLReader(new CFileReadCallBack(file), true); +} + + +//! Creates an instance of an UFT-8 or ASCII character xml parser. +IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(IFileReadCallBack* callback, + bool deleteCallback) +{ + if (callback && (callback->getSize() >= 0)) + { + return new CXMLReaderImpl<char, IXMLBase>(callback, deleteCallback); + } + else + { + if(callback && deleteCallback) + delete callback; + + return 0; + } +} + + +//! Creates an instance of an UTF-16 xml parser. +IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(const char* filename) +{ + return createIrrXMLReaderUTF16(new CFileReadCallBack(filename), true); +} + + +//! Creates an instance of an UTF-16 xml parser. +IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(FILE* file) +{ + return createIrrXMLReaderUTF16(new CFileReadCallBack(file), true); +} + + +//! Creates an instance of an UTF-16 xml parser. +IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(IFileReadCallBack* callback, + bool deleteCallback) +{ + if (callback && (callback->getSize() >= 0)) + { + return new CXMLReaderImpl<char16, IXMLBase>(callback, deleteCallback); + } + else + { + if(callback && deleteCallback) + delete callback; + + return 0; + } +} + + +//! Creates an instance of an UTF-32 xml parser. +IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(const char* filename) +{ + return createIrrXMLReaderUTF32(new CFileReadCallBack(filename), true); +} + + +//! Creates an instance of an UTF-32 xml parser. +IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(FILE* file) +{ + return createIrrXMLReaderUTF32(new CFileReadCallBack(file), true); +} + + +//! Creates an instance of an UTF-32 xml parser. +IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32( + IFileReadCallBack* callback, bool deleteCallback) +{ + if (callback && (callback->getSize() >= 0)) + { + return new CXMLReaderImpl<char32, IXMLBase>(callback, deleteCallback); + } + else + { + if(callback && deleteCallback) + delete callback; + + return 0; + } +} + + +} // end namespace io +} // end namespace irr diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.c b/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.c new file mode 100644 index 0000000..4fdc11d --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.c @@ -0,0 +1,999 @@ +/* LzmaDec.c -- LZMA Decoder +2009-09-20 : Igor Pavlov : Public domain */ + +#include "LzmaDec.h" + +#include <string.h> + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_INIT_SIZE 5 + +#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); +#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ + { UPDATE_0(p); i = (i + i); A0; } else \ + { UPDATE_1(p); i = (i + i) + 1; A1; } +#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) + +#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } +#define TREE_DECODE(probs, limit, i) \ + { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } + +/* #define _LZMA_SIZE_OPT */ + +#ifdef _LZMA_SIZE_OPT +#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) +#else +#define TREE_6_DECODE(probs, i) \ + { i = 1; \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + i -= 0x40; } +#endif + +#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0_CHECK range = bound; +#define UPDATE_1_CHECK range -= bound; code -= bound; +#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ + { UPDATE_0_CHECK; i = (i + i); A0; } else \ + { UPDATE_1_CHECK; i = (i + i) + 1; A1; } +#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) +#define TREE_DECODE_CHECK(probs, limit, i) \ + { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } + + +#define kNumPosBitsMax 4 +#define kNumPosStatesMax (1 << kNumPosBitsMax) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumMidBits 3 +#define kLenNumMidSymbols (1 << kLenNumMidBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define LenChoice 0 +#define LenChoice2 (LenChoice + 1) +#define LenLow (LenChoice2 + 1) +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols) + + +#define kNumStates 12 +#define kNumLitStates 7 + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#define kNumPosSlotBits 6 +#define kNumLenToPosStates 4 + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) + +#define kMatchMinLen 2 +#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) + +#define IsMatch 0 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) +#define IsRepG0 (IsRep + kNumStates) +#define IsRepG1 (IsRepG0 + kNumStates) +#define IsRepG2 (IsRepG1 + kNumStates) +#define IsRep0Long (IsRepG2 + kNumStates) +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) +#define LenCoder (Align + kAlignTableSize) +#define RepLenCoder (LenCoder + kNumLenProbs) +#define Literal (RepLenCoder + kNumLenProbs) + +#define LZMA_BASE_SIZE 1846 +#define LZMA_LIT_SIZE 768 + +#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) + +#if Literal != LZMA_BASE_SIZE +StopCompilingDueBUG +#endif + +#define LZMA_DIC_MIN (1 << 12) + +/* First LZMA-symbol is always decoded. +And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization +Out: + Result: + SZ_OK - OK + SZ_ERROR_DATA - Error + p->remainLen: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished + = kMatchSpecLenStart + 1 : Flush marker + = kMatchSpecLenStart + 2 : State Init Marker +*/ + +static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + CLzmaProb *probs = p->probs; + + unsigned state = p->state; + UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; + unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; + unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; + unsigned lc = p->prop.lc; + + Byte *dic = p->dic; + SizeT dicBufSize = p->dicBufSize; + SizeT dicPos = p->dicPos; + + UInt32 processedPos = p->processedPos; + UInt32 checkDicSize = p->checkDicSize; + unsigned len = 0; + + const Byte *buf = p->buf; + UInt32 range = p->range; + UInt32 code = p->code; + + do + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = processedPos & pbMask; + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + unsigned symbol; + UPDATE_0(prob); + prob = probs + Literal; + if (checkDicSize != 0 || processedPos != 0) + prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); + + if (state < kNumLitStates) + { + state -= (state < 4) ? state : 3; + symbol = 1; + do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + unsigned offs = 0x100; + state -= (state < 10) ? 3 : 6; + symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + dic[dicPos++] = (Byte)symbol; + processedPos++; + continue; + } + else + { + UPDATE_1(prob); + prob = probs + IsRep + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + state += kNumStates; + prob = probs + LenCoder; + } + else + { + UPDATE_1(prob); + if (checkDicSize == 0 && processedPos == 0) + return SZ_ERROR_DATA; + prob = probs + IsRepG0 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + UPDATE_0(prob); + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + processedPos++; + state = state < kNumLitStates ? 9 : 11; + continue; + } + UPDATE_1(prob); + } + else + { + UInt32 distance; + UPDATE_1(prob); + prob = probs + IsRepG1 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep1; + } + else + { + UPDATE_1(prob); + prob = probs + IsRepG2 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep2; + } + else + { + UPDATE_1(prob); + distance = rep3; + rep3 = rep2; + } + rep2 = rep1; + } + rep1 = rep0; + rep0 = distance; + } + state = state < kNumLitStates ? 8 : 11; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = (1 << kLenNumMidBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = (1 << kLenNumHighBits); + } + } + TREE_DECODE(probLen, limit, len); + len += offset; + } + + if (state >= kNumStates) + { + UInt32 distance; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); + TREE_6_DECODE(prob, distance); + if (distance >= kStartPosModelIndex) + { + unsigned posSlot = (unsigned)distance; + int numDirectBits = (int)(((distance >> 1) - 1)); + distance = (2 | (distance & 1)); + if (posSlot < kEndPosModelIndex) + { + distance <<= numDirectBits; + prob = probs + SpecPos + distance - posSlot - 1; + { + UInt32 mask = 1; + unsigned i = 1; + do + { + GET_BIT2(prob + i, i, ; , distance |= mask); + mask <<= 1; + } + while (--numDirectBits != 0); + } + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE + range >>= 1; + + { + UInt32 t; + code -= range; + t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ + distance = (distance << 1) + (t + 1); + code += range & t; + } + /* + distance <<= 1; + if (code >= range) + { + code -= range; + distance |= 1; + } + */ + } + while (--numDirectBits != 0); + prob = probs + Align; + distance <<= kNumAlignBits; + { + unsigned i = 1; + GET_BIT2(prob + i, i, ; , distance |= 1); + GET_BIT2(prob + i, i, ; , distance |= 2); + GET_BIT2(prob + i, i, ; , distance |= 4); + GET_BIT2(prob + i, i, ; , distance |= 8); + } + if (distance == (UInt32)0xFFFFFFFF) + { + len += kMatchSpecLenStart; + state -= kNumStates; + break; + } + } + } + rep3 = rep2; + rep2 = rep1; + rep1 = rep0; + rep0 = distance + 1; + if (checkDicSize == 0) + { + if (distance >= processedPos) + return SZ_ERROR_DATA; + } + else if (distance >= checkDicSize) + return SZ_ERROR_DATA; + state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; + } + + len += kMatchMinLen; + + if (limit == dicPos) + return SZ_ERROR_DATA; + { + SizeT rem = limit - dicPos; + unsigned curLen = ((rem < len) ? (unsigned)rem : len); + SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); + + processedPos += curLen; + + len -= curLen; + if (pos + curLen <= dicBufSize) + { + Byte *dest = dic + dicPos; + ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; + const Byte *lim = dest + curLen; + dicPos += curLen; + do + *(dest) = (Byte)*(dest + src); + while (++dest != lim); + } + else + { + do + { + dic[dicPos++] = dic[pos]; + if (++pos == dicBufSize) + pos = 0; + } + while (--curLen != 0); + } + } + } + } + while (dicPos < limit && buf < bufLimit); + NORMALIZE; + p->buf = buf; + p->range = range; + p->code = code; + p->remainLen = len; + p->dicPos = dicPos; + p->processedPos = processedPos; + p->reps[0] = rep0; + p->reps[1] = rep1; + p->reps[2] = rep2; + p->reps[3] = rep3; + p->state = state; + + return SZ_OK; +} + +static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) +{ + if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) + { + Byte *dic = p->dic; + SizeT dicPos = p->dicPos; + SizeT dicBufSize = p->dicBufSize; + unsigned len = p->remainLen; + UInt32 rep0 = p->reps[0]; + if (limit - dicPos < len) + len = (unsigned)(limit - dicPos); + + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) + p->checkDicSize = p->prop.dicSize; + + p->processedPos += len; + p->remainLen -= len; + while (len-- != 0) + { + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + } + p->dicPos = dicPos; + } +} + +static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + do + { + SizeT limit2 = limit; + if (p->checkDicSize == 0) + { + UInt32 rem = p->prop.dicSize - p->processedPos; + if (limit - p->dicPos > rem) + limit2 = p->dicPos + rem; + } + RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); + if (p->processedPos >= p->prop.dicSize) + p->checkDicSize = p->prop.dicSize; + LzmaDec_WriteRem(p, limit); + } + while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + + if (p->remainLen > kMatchSpecLenStart) + { + p->remainLen = kMatchSpecLenStart; + } + return 0; +} + +typedef enum +{ + DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_LIT, + DUMMY_MATCH, + DUMMY_REP +} ELzmaDummy; + +static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) +{ + UInt32 range = p->range; + UInt32 code = p->code; + const Byte *bufLimit = buf + inSize; + CLzmaProb *probs = p->probs; + unsigned state = p->state; + ELzmaDummy res; + + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK + + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += (LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) + { + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[p->dicPos - p->reps[0] + + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; + + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG1 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG2 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + } + } + } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumMidBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = 1 << kLenNumHighBits; + } + } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } + + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) + { + int numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) + { + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE_CHECK + range >>= 1; + code -= range & (((code - range) >> 31) - 1); + /* if (code >= range) code -= range; */ + } + while (--numDirectBits != 0); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + do + { + GET_BIT_CHECK(prob + i, i); + } + while (--numDirectBits != 0); + } + } + } + } + } + NORMALIZE_CHECK; + return res; +} + + +static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) +{ + p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]); + p->range = 0xFFFFFFFF; + p->needFlush = 0; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState) +{ + p->needFlush = 1; + p->remainLen = 0; + p->tempBufSize = 0; + + if (initDic) + { + p->processedPos = 0; + p->checkDicSize = 0; + p->needInitState = 1; + } + if (initState) + p->needInitState = 1; +} + +void LzmaDec_Init(CLzmaDec *p) +{ + p->dicPos = 0; + LzmaDec_InitDicAndState(p, True, True); +} + +static void LzmaDec_InitStateReal(CLzmaDec *p) +{ + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); + UInt32 i; + CLzmaProb *probs = p->probs; + for (i = 0; i < numProbs; i++) + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + p->needInitState = 0; +} + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, + ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + (*srcLen) = 0; + LzmaDec_WriteRem(p, dicLimit); + + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->remainLen != kMatchSpecLenStart) + { + int checkEndMarkNow; + + if (p->needFlush != 0) + { + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + p->tempBuf[p->tempBufSize++] = *src++; + if (p->tempBufSize < RC_INIT_SIZE) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (p->tempBuf[0] != 0) + return SZ_ERROR_DATA; + + LzmaDec_InitRc(p, p->tempBuf); + p->tempBufSize = 0; + } + + checkEndMarkNow = 0; + if (p->dicPos >= dicLimit) + { + if (p->remainLen == 0 && p->code == 0) + { + *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; + return SZ_OK; + } + if (finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->remainLen != 0) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + checkEndMarkNow = 1; + } + + if (p->needInitState) + LzmaDec_InitStateReal(p); + + if (p->tempBufSize == 0) + { + SizeT processed; + const Byte *bufLimit; + if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, src, inSize); + if (dummyRes == DUMMY_ERROR) + { + memcpy(p->tempBuf, src, inSize); + p->tempBufSize = (unsigned)inSize; + (*srcLen) += inSize; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + bufLimit = src; + } + else + bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; + p->buf = src; + if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) + return SZ_ERROR_DATA; + processed = (SizeT)(p->buf - src); + (*srcLen) += processed; + src += processed; + inSize -= processed; + } + else + { + unsigned rem = p->tempBufSize, lookAhead = 0; + while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) + p->tempBuf[rem++] = src[lookAhead++]; + p->tempBufSize = rem; + if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); + if (dummyRes == DUMMY_ERROR) + { + (*srcLen) += lookAhead; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + } + p->buf = p->tempBuf; + if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) + return SZ_ERROR_DATA; + lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf)); + (*srcLen) += lookAhead; + src += lookAhead; + inSize -= lookAhead; + p->tempBufSize = 0; + } + } + if (p->code == 0) + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; +} + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen; + SizeT inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT inSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->dicPos == p->dicBufSize) + p->dicPos = 0; + dicPos = p->dicPos; + if (outSize > p->dicBufSize - dicPos) + { + outSizeCur = p->dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; + memcpy(dest, p->dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->probs); + p->probs = 0; +} + +static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->dic); + p->dic = 0; +} + +void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) +{ + LzmaDec_FreeProbs(p, alloc); + LzmaDec_FreeDict(p, alloc); +} + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) +{ + UInt32 dicSize; + Byte d; + + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else + dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; + p->dicSize = dicSize; + + d = data[0]; + if (d >= (9 * 5 * 5)) + return SZ_ERROR_UNSUPPORTED; + + p->lc = d % 9; + d /= 9; + p->pb = d / 5; + p->lp = d % 5; + + return SZ_OK; +} + +static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) +{ + UInt32 numProbs = LzmaProps_GetNumProbs(propNew); + if (p->probs == 0 || numProbs != p->numProbs) + { + LzmaDec_FreeProbs(p, alloc); + p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); + p->numProbs = numProbs; + if (p->probs == 0) + return SZ_ERROR_MEM; + } + return SZ_OK; +} + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + SizeT dicBufSize; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + dicBufSize = propNew.dicSize; + if (p->dic == 0 || dicBufSize != p->dicBufSize) + { + LzmaDec_FreeDict(p, alloc); + p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); + if (p->dic == 0) + { + LzmaDec_FreeProbs(p, alloc); + return SZ_ERROR_MEM; + } + } + p->dicBufSize = dicBufSize; + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc) +{ + CLzmaDec p; + SRes res; + SizeT inSize = *srcLen; + SizeT outSize = *destLen; + *srcLen = *destLen = 0; + if (inSize < RC_INIT_SIZE) + return SZ_ERROR_INPUT_EOF; + + LzmaDec_Construct(&p); + res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); + if (res != 0) + return res; + p.dic = dest; + p.dicBufSize = outSize; + + LzmaDec_Init(&p); + + *srcLen = inSize; + res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + + (*destLen) = p.dicPos; + LzmaDec_FreeProbs(&p, alloc); + return res; +} diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.h b/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.h new file mode 100644 index 0000000..6741a64 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/LzmaDec.h @@ -0,0 +1,231 @@ +/* LzmaDec.h -- LZMA Decoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_DEC_H +#define __LZMA_DEC_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* #define _LZMA_PROB32 */ +/* _LZMA_PROB32 can increase the speed on some CPUs, + but memory usage for CLzmaDec::probs will be doubled in that case */ + +#ifdef _LZMA_PROB32 +#define CLzmaProb UInt32 +#else +#define CLzmaProb UInt16 +#endif + + +/* ---------- LZMA Properties ---------- */ + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaProps +{ + unsigned lc, lp, pb; + UInt32 dicSize; +} CLzmaProps; + +/* LzmaProps_Decode - decodes properties +Returns: + SZ_OK + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); + + +/* ---------- LZMA Decoder state ---------- */ + +/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. + Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ + +#define LZMA_REQUIRED_INPUT_MAX 20 + +typedef struct +{ + CLzmaProps prop; + CLzmaProb *probs; + Byte *dic; + const Byte *buf; + UInt32 range, code; + SizeT dicPos; + SizeT dicBufSize; + UInt32 processedPos; + UInt32 checkDicSize; + unsigned state; + UInt32 reps[4]; + unsigned remainLen; + int needFlush; + int needInitState; + UInt32 numProbs; + unsigned tempBufSize; + Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; +} CLzmaDec; + +#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } + +void LzmaDec_Init(CLzmaDec *p); + +/* There are two types of LZMA streams: + 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. + 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ + +typedef enum +{ + LZMA_FINISH_ANY, /* finish at any point */ + LZMA_FINISH_END /* block must be finished at the end */ +} ELzmaFinishMode; + +/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! + + You must use LZMA_FINISH_END, when you know that current output buffer + covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. + + If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, + and output value of destLen will be less than output buffer size limit. + You can check status result also. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + +typedef enum +{ + LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ + LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ + LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ +} ELzmaStatus; + +/* ELzmaStatus is used only as output value for function call */ + + +/* ---------- Interfaces ---------- */ + +/* There are 3 levels of interfaces: + 1) Dictionary Interface + 2) Buffer Interface + 3) One Call Interface + You can select any of these interfaces, but don't mix functions from different + groups for same object. */ + + +/* There are two variants to allocate state for Dictionary Interface: + 1) LzmaDec_Allocate / LzmaDec_Free + 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs + You can use variant 2, if you set dictionary buffer manually. + For Buffer Interface you must always use variant 1. + +LzmaDec_Allocate* can return: + SZ_OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); + +SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc); + +/* ---------- Dictionary Interface ---------- */ + +/* You can use it, if you want to eliminate the overhead for data copying from + dictionary to some other external buffer. + You must work with CLzmaDec variables directly in this interface. + + STEPS: + LzmaDec_Constr() + LzmaDec_Allocate() + for (each new stream) + { + LzmaDec_Init() + while (it needs more decompression) + { + LzmaDec_DecodeToDic() + use data from CLzmaDec::dic and update CLzmaDec::dicPos + } + } + LzmaDec_Free() +*/ + +/* LzmaDec_DecodeToDic + + The decoding to internal dictionary buffer (CLzmaDec::dic). + You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! + +finishMode: + It has meaning only if the decoding reaches output limit (dicLimit). + LZMA_FINISH_ANY - Decode just dicLimit bytes. + LZMA_FINISH_END - Stream must be finished after dicLimit. + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error +*/ + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- Buffer Interface ---------- */ + +/* It's zlib-like interface. + See LzmaDec_DecodeToDic description for information about STEPS and return results, + but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need + to work with CLzmaDec variables manually. + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). +*/ + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* LzmaDecode + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/Types.h b/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/Types.h new file mode 100644 index 0000000..f193ce2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/lzma/Types.h @@ -0,0 +1,254 @@ +/* Types.h -- Basic types +2010-10-09 : Igor Pavlov : Public domain */ + +#ifndef __7Z_TYPES_H +#define __7Z_TYPES_H + +#include <stddef.h> + +#ifdef _WIN32 +#include <windows.h> +#endif + +#ifndef EXTERN_C_BEGIN +#ifdef __cplusplus +#define EXTERN_C_BEGIN extern "C" { +#define EXTERN_C_END } +#else +#define EXTERN_C_BEGIN +#define EXTERN_C_END +#endif +#endif + +EXTERN_C_BEGIN + +#define SZ_OK 0 + +#define SZ_ERROR_DATA 1 +#define SZ_ERROR_MEM 2 +#define SZ_ERROR_CRC 3 +#define SZ_ERROR_UNSUPPORTED 4 +#define SZ_ERROR_PARAM 5 +#define SZ_ERROR_INPUT_EOF 6 +#define SZ_ERROR_OUTPUT_EOF 7 +#define SZ_ERROR_READ 8 +#define SZ_ERROR_WRITE 9 +#define SZ_ERROR_PROGRESS 10 +#define SZ_ERROR_FAIL 11 +#define SZ_ERROR_THREAD 12 + +#define SZ_ERROR_ARCHIVE 16 +#define SZ_ERROR_NO_ARCHIVE 17 + +typedef int SRes; + +#ifdef _WIN32 +typedef DWORD WRes; +#else +typedef int WRes; +#endif + +#ifndef RINOK +#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } +#endif + +typedef unsigned char Byte; +typedef short Int16; +typedef unsigned short UInt16; + +#ifdef _LZMA_UINT32_IS_ULONG +typedef long Int32; +typedef unsigned long UInt32; +#else +typedef int Int32; +typedef unsigned int UInt32; +#endif + +#ifdef _SZ_NO_INT_64 + +/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. + NOTES: Some code will work incorrectly in that case! */ + +typedef long Int64; +typedef unsigned long UInt64; + +#else + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#define UINT64_CONST(n) n +#else +typedef long long int Int64; +typedef unsigned long long int UInt64; +#define UINT64_CONST(n) n ## ULL +#endif + +#endif + +#ifdef _LZMA_NO_SYSTEM_SIZE_T +typedef UInt32 SizeT; +#else +typedef size_t SizeT; +#endif + +typedef int Bool; +#define True 1 +#define False 0 + + +#ifdef _WIN32 +#define MY_STD_CALL __stdcall +#else +#define MY_STD_CALL +#endif + +#ifdef _MSC_VER + +#if _MSC_VER >= 1300 +#define MY_NO_INLINE __declspec(noinline) +#else +#define MY_NO_INLINE +#endif + +#define MY_CDECL __cdecl +#define MY_FAST_CALL __fastcall + +#else + +#define MY_CDECL +#define MY_FAST_CALL + +#endif + + +/* The following interfaces use first parameter as pointer to structure */ + +typedef struct +{ + Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */ +} IByteIn; + +typedef struct +{ + void (*Write)(void *p, Byte b); +} IByteOut; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) < input(*size)) is allowed */ +} ISeqInStream; + +/* it can return SZ_ERROR_INPUT_EOF */ +SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); +SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); +SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); + +typedef struct +{ + size_t (*Write)(void *p, const void *buf, size_t size); + /* Returns: result - the number of actually written bytes. + (result < size) means error */ +} ISeqOutStream; + +typedef enum +{ + SZ_SEEK_SET = 0, + SZ_SEEK_CUR = 1, + SZ_SEEK_END = 2 +} ESzSeek; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ISeekInStream; + +typedef struct +{ + SRes (*Look)(void *p, const void **buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) > input(*size)) is not allowed + (output(*size) < input(*size)) is allowed */ + SRes (*Skip)(void *p, size_t offset); + /* offset must be <= output(*size) of Look */ + + SRes (*Read)(void *p, void *buf, size_t *size); + /* reads directly (without buffer). It's same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ILookInStream; + +SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); +SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset); + +/* reads via ILookInStream::Read */ +SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); +SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); + +#define LookToRead_BUF_SIZE (1 << 14) + +typedef struct +{ + ILookInStream s; + ISeekInStream *realStream; + size_t pos; + size_t size; + Byte buf[LookToRead_BUF_SIZE]; +} CLookToRead; + +void LookToRead_CreateVTable(CLookToRead *p, int lookahead); +void LookToRead_Init(CLookToRead *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToLook; + +void SecToLook_CreateVTable(CSecToLook *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToRead; + +void SecToRead_CreateVTable(CSecToRead *p); + +typedef struct +{ + SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize); + /* Returns: result. (result != SZ_OK) means break. + Value (UInt64)(Int64)-1 for size means unknown value. */ +} ICompressProgress; + +typedef struct +{ + void *(*Alloc)(void *p, size_t size); + void (*Free)(void *p, void *address); /* address can be 0 */ +} ISzAlloc; + +#define IAlloc_Alloc(p, size) (p)->Alloc((p), size) +#define IAlloc_Free(p, a) (p)->Free((p), a) + +#ifdef _WIN32 + +#define CHAR_PATH_SEPARATOR '\\' +#define WCHAR_PATH_SEPARATOR L'\\' +#define STRING_PATH_SEPARATOR "\\" +#define WSTRING_PATH_SEPARATOR L"\\" + +#else + +#define CHAR_PATH_SEPARATOR '/' +#define WCHAR_PATH_SEPARATOR L'/' +#define STRING_PATH_SEPARATOR "/" +#define WSTRING_PATH_SEPARATOR L"/" + +#endif + +EXTERN_C_END + +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/os.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/os.cpp new file mode 100644 index 0000000..2371c08 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/os.cpp @@ -0,0 +1,347 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "os.h" +#include "irrString.h" +#include "IrrCompileConfig.h" +#include "irrMath.h" + +#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) + #include <SDL/SDL_endian.h> + #define bswap_16(X) SDL_Swap16(X) + #define bswap_32(X) SDL_Swap32(X) +#elif defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER > 1298) + #include <stdlib.h> + #define bswap_16(X) _byteswap_ushort(X) + #define bswap_32(X) _byteswap_ulong(X) +#if (_MSC_VER >= 1400) + #define localtime _localtime_s +#endif +#elif defined(_IRR_OSX_PLATFORM_) + #include <libkern/OSByteOrder.h> + #define bswap_16(X) OSReadSwapInt16(&X,0) + #define bswap_32(X) OSReadSwapInt32(&X,0) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) + #include <sys/endian.h> + #define bswap_16(X) bswap16(X) + #define bswap_32(X) bswap32(X) +#elif !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__PPC__) && !defined(_IRR_WINDOWS_API_) + #include <byteswap.h> +#else + #define bswap_16(X) ((((X)&0xFF) << 8) | (((X)&0xFF00) >> 8)) + #define bswap_32(X) ( (((X)&0x000000FF)<<24) | (((X)&0xFF000000) >> 24) | (((X)&0x0000FF00) << 8) | (((X) &0x00FF0000) >> 8)) +#endif + +namespace irr +{ +namespace os +{ + u16 Byteswap::byteswap(u16 num) {return bswap_16(num);} + s16 Byteswap::byteswap(s16 num) {return bswap_16(num);} + u32 Byteswap::byteswap(u32 num) {return bswap_32(num);} + s32 Byteswap::byteswap(s32 num) {return bswap_32(num);} + f32 Byteswap::byteswap(f32 num) {u32 tmp=IR(num); tmp=bswap_32(tmp); return (FR(tmp));} + // prevent accidental byte swapping of chars + u8 Byteswap::byteswap(u8 num) {return num;} + c8 Byteswap::byteswap(c8 num) {return num;} +} +} + +#if defined(_IRR_WINDOWS_API_) +// ---------------------------------------------------------------- +// Windows specific functions +// ---------------------------------------------------------------- + +#ifdef _IRR_XBOX_PLATFORM_ +#include <xtl.h> +#else +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <time.h> +#endif + +namespace irr +{ +namespace os +{ + //! prints a debuginfo string + void Printer::print(const c8* message) + { +#if defined (_WIN32_WCE ) + core::stringw tmp(message); + tmp += L"\n"; + OutputDebugStringW(tmp.c_str()); +#else + core::stringc tmp(message); + tmp += "\n"; + OutputDebugStringA(tmp.c_str()); + printf("%s", tmp.c_str()); +#endif + } + + static LARGE_INTEGER HighPerformanceFreq; + static BOOL HighPerformanceTimerSupport = FALSE; + static BOOL MultiCore = FALSE; + + void Timer::initTimer(bool usePerformanceTimer) + { +#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_) + // workaround for hires timer on multiple core systems, bios bugs result in bad hires timers. + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + MultiCore = (sysinfo.dwNumberOfProcessors > 1); +#endif + if (usePerformanceTimer) + HighPerformanceTimerSupport = QueryPerformanceFrequency(&HighPerformanceFreq); + else + HighPerformanceTimerSupport = FALSE; + initVirtualTimer(); + } + + u32 Timer::getRealTime() + { + if (HighPerformanceTimerSupport) + { +#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_) + // Avoid potential timing inaccuracies across multiple cores by + // temporarily setting the affinity of this process to one core. + DWORD_PTR affinityMask=0; + if(MultiCore) + affinityMask = SetThreadAffinityMask(GetCurrentThread(), 1); +#endif + LARGE_INTEGER nTime; + BOOL queriedOK = QueryPerformanceCounter(&nTime); + +#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_) + // Restore the true affinity. + if(MultiCore) + (void)SetThreadAffinityMask(GetCurrentThread(), affinityMask); +#endif + if(queriedOK) + return u32((nTime.QuadPart) * 1000 / HighPerformanceFreq.QuadPart); + + } + + return GetTickCount(); + } + +} // end namespace os + + +#else + +// ---------------------------------------------------------------- +// linux/ansi version +// ---------------------------------------------------------------- + +#include <stdio.h> +#include <time.h> +#include <sys/time.h> + +namespace irr +{ +namespace os +{ + + //! prints a debuginfo string + void Printer::print(const c8* message) + { + printf("%s\n", message); + } + + void Timer::initTimer(bool usePerformanceTimer) + { + initVirtualTimer(); + } + + u32 Timer::getRealTime() + { + timeval tv; + gettimeofday(&tv, 0); + return (u32)(tv.tv_sec * 1000) + (tv.tv_usec / 1000); + } +} // end namespace os + +#endif // end linux / windows + +namespace os +{ + // The platform independent implementation of the printer + ILogger* Printer::Logger = 0; + + void Printer::log(const c8* message, ELOG_LEVEL ll) + { + if (Logger) + Logger->log(message, ll); + } + + void Printer::log(const wchar_t* message, ELOG_LEVEL ll) + { + if (Logger) + Logger->log(message, ll); + } + + void Printer::log(const c8* message, const c8* hint, ELOG_LEVEL ll) + { + if (Logger) + Logger->log(message, hint, ll); + } + + void Printer::log(const c8* message, const io::path& hint, ELOG_LEVEL ll) + { + if (Logger) + Logger->log(message, hint.c_str(), ll); + } + + // our Randomizer is not really os specific, so we + // code one for all, which should work on every platform the same, + // which is desireable. + + s32 Randomizer::seed = 0x0f0f0f0f; + + //! generates a pseudo random number + s32 Randomizer::rand() + { + // (a*seed)%m with Schrage's method + seed = a * (seed%q) - r* (seed/q); + if (seed<0) + seed += m; + + return seed; + } + + //! generates a pseudo random number + f32 Randomizer::frand() + { + return rand()*(1.f/rMax); + } + + s32 Randomizer::randMax() + { + return rMax; + } + + //! resets the randomizer + void Randomizer::reset(s32 value) + { + seed = value; + } + + + // ------------------------------------------------------ + // virtual timer implementation + + f32 Timer::VirtualTimerSpeed = 1.0f; + s32 Timer::VirtualTimerStopCounter = 0; + u32 Timer::LastVirtualTime = 0; + u32 Timer::StartRealTime = 0; + u32 Timer::StaticTime = 0; + + //! Get real time and date in calendar form + ITimer::RealTimeDate Timer::getRealTimeAndDate() + { + time_t rawtime; + time(&rawtime); + + struct tm * timeinfo; + timeinfo = localtime(&rawtime); + + // init with all 0 to indicate error + ITimer::RealTimeDate date={0}; + // at least Windows returns NULL on some illegal dates + if (timeinfo) + { + // set useful values if succeeded + date.Hour=(u32)timeinfo->tm_hour; + date.Minute=(u32)timeinfo->tm_min; + date.Second=(u32)timeinfo->tm_sec; + date.Day=(u32)timeinfo->tm_mday; + date.Month=(u32)timeinfo->tm_mon+1; + date.Year=(u32)timeinfo->tm_year+1900; + date.Weekday=(ITimer::EWeekday)timeinfo->tm_wday; + date.Yearday=(u32)timeinfo->tm_yday+1; + date.IsDST=timeinfo->tm_isdst != 0; + } + return date; + } + + //! returns current virtual time + u32 Timer::getTime() + { + if (isStopped()) + return LastVirtualTime; + + return LastVirtualTime + (u32)((StaticTime - StartRealTime) * VirtualTimerSpeed); + } + + //! ticks, advances the virtual timer + void Timer::tick() + { + StaticTime = getRealTime(); + } + + //! sets the current virtual time + void Timer::setTime(u32 time) + { + StaticTime = getRealTime(); + LastVirtualTime = time; + StartRealTime = StaticTime; + } + + //! stops the virtual timer + void Timer::stopTimer() + { + if (!isStopped()) + { + // stop the virtual timer + LastVirtualTime = getTime(); + } + + --VirtualTimerStopCounter; + } + + //! starts the virtual timer + void Timer::startTimer() + { + ++VirtualTimerStopCounter; + + if (!isStopped()) + { + // restart virtual timer + setTime(LastVirtualTime); + } + } + + //! sets the speed of the virtual timer + void Timer::setSpeed(f32 speed) + { + setTime(getTime()); + + VirtualTimerSpeed = speed; + if (VirtualTimerSpeed < 0.0f) + VirtualTimerSpeed = 0.0f; + } + + //! gets the speed of the virtual timer + f32 Timer::getSpeed() + { + return VirtualTimerSpeed; + } + + //! returns if the timer currently is stopped + bool Timer::isStopped() + { + return VirtualTimerStopCounter < 0; + } + + void Timer::initVirtualTimer() + { + StaticTime = getRealTime(); + StartRealTime = StaticTime; + } + +} // end namespace os +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/os.h b/src/others/irrlicht-1.8.1/source/Irrlicht/os.h new file mode 100644 index 0000000..07059ca --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/os.h @@ -0,0 +1,131 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __IRR_OS_H_INCLUDED__ +#define __IRR_OS_H_INCLUDED__ + +#include "IrrCompileConfig.h" // for endian check +#include "irrTypes.h" +#include "irrString.h" +#include "path.h" +#include "ILogger.h" +#include "ITimer.h" + +namespace irr +{ + +namespace os +{ + class Byteswap + { + public: + static u16 byteswap(u16 num); + static s16 byteswap(s16 num); + static u32 byteswap(u32 num); + static s32 byteswap(s32 num); + static f32 byteswap(f32 num); + // prevent accidental swapping of chars + static u8 byteswap(u8 num); + static c8 byteswap(c8 num); + }; + + class Printer + { + public: + // prints out a string to the console out stdout or debug log or whatever + static void print(const c8* message); + static void log(const c8* message, ELOG_LEVEL ll = ELL_INFORMATION); + static void log(const wchar_t* message, ELOG_LEVEL ll = ELL_INFORMATION); + static void log(const c8* message, const c8* hint, ELOG_LEVEL ll = ELL_INFORMATION); + static void log(const c8* message, const io::path& hint, ELOG_LEVEL ll = ELL_INFORMATION); + static ILogger* Logger; + }; + + + // mixed linear congruential generator (MLCG) + // numbers chosen according to L'Ecuyer, Commun. ACM 31 (1988) 742 + // period is somewhere around m-1 + class Randomizer + { + public: + + //! resets the randomizer + static void reset(s32 value=0x0f0f0f0f); + + //! generates a pseudo random number in the range 0..randMax() + static s32 rand(); + + //! generates a pseudo random number in the range 0..1 + static f32 frand(); + + //! get maxmimum number generated by rand() + static s32 randMax(); + + private: + + static s32 seed; + static const s32 m = 2147483399; // a non-Mersenne prime + static const s32 a = 40692; // another spectral success story + static const s32 q = m/a; + static const s32 r = m%a; // again less than q + static const s32 rMax = m-1; + }; + + + + + class Timer + { + public: + + //! returns the current time in milliseconds + static u32 getTime(); + + //! get current time and date in calendar form + static ITimer::RealTimeDate getRealTimeAndDate(); + + //! initializes the real timer + static void initTimer(bool usePerformanceTimer=true); + + //! sets the current virtual (game) time + static void setTime(u32 time); + + //! stops the virtual (game) timer + static void stopTimer(); + + //! starts the game timer + static void startTimer(); + + //! sets the speed of the virtual timer + static void setSpeed(f32 speed); + + //! gets the speed of the virtual timer + static f32 getSpeed(); + + //! returns if the timer currently is stopped + static bool isStopped(); + + //! makes the virtual timer update the time value based on the real time + static void tick(); + + //! returns the current real time in milliseconds + static u32 getRealTime(); + + private: + + static void initVirtualTimer(); + + static f32 VirtualTimerSpeed; + static s32 VirtualTimerStopCounter; + static u32 StartRealTime; + static u32 LastVirtualTime; + static u32 StaticTime; + }; + +} // end namespace os +} // end namespace irr + + +#endif + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/resource.h b/src/others/irrlicht-1.8.1/source/Irrlicht/resource.h new file mode 100644 index 0000000..c734d2a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Irrlicht.rc + +// Nchste Standardwerte fr neue Objekte +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/source.txt b/src/others/irrlicht-1.8.1/source/Irrlicht/source.txt new file mode 100644 index 0000000..f90ea06 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/source.txt @@ -0,0 +1,40 @@ +Source code of the Irrlicht Engine + +The complete source of the Irrlicht Engine can be found when decompressing +the .zip file included in this directory. +Please note that YOU DO NOT NEED THIS SOURCE to develop 3d applications with +the Irrlicht Engine. Instead, please use the .dll in the \bin directory, the +.lib in the \lib directory and the header files in the \include directory. + +You will find a good tutorial how to set up your development environment and to +use the engine in the \examples directory. (Try 1.helloworld) + +The source of the engine is only included because of the following reasons: + + - To let developers be able to debug the engine. + - To let developers be able to make changes to the engine. + - To let developers be able to compile their own versions of the engine. + + + +HOW TO COMPILE THE ENGINE WITH LINUX + +If you wish to compile the engine in linux yourself, unzip the source source.zip +file in the \source directory. Run a 'make' in the now existing new subfolder 'Irrlicht'. +After this, you should be able to make all example applications in \examples. +Then just start an X Server and run them, from the directory where they are. + +If you get a compiling/linking problem like + + undefined reference to `glXGetProcAddress' + +Then there are several solutions: +A) This disables the use of OpenGL extensions: + Open the file IrrCompileConfig.h, comment out _IRR_OPENGL_USE_EXTPOINTER_, + and recompile Irrlicht using + make clean + make +B) Replace all occurrences of 'glXGetProcAddress' with 'glXGetProcAddressARB' and run a + make + This will solve the issue but keep the OpenGL extension enabled. + diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/wglext.h b/src/others/irrlicht-1.8.1/source/Irrlicht/wglext.h new file mode 100644 index 0000000..a9ddc52 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/wglext.h @@ -0,0 +1,929 @@ +#ifndef __wglext_h_ +#define __wglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2011 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Function declaration macros - to move into glplatform.h */ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number */ +/* wglext.h last updated 2011/04/13 */ +/* Current version at http://www.opengl.org/registry/ */ +#define WGL_WGLEXT_VERSION 23 + +#ifndef WGL_ARB_buffer_region +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +#endif + +#ifndef WGL_ARB_multisample +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + +#ifndef WGL_ARB_extensions_string +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +#endif + +#ifndef WGL_ARB_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +#endif + +#ifndef WGL_ARB_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +#endif + +#ifndef WGL_ARB_create_context_profile +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#endif + +#ifndef WGL_ARB_create_context_robustness +#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef WGL_EXT_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +#endif + +#ifndef WGL_I3D_gamma +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +#endif + +#ifndef WGL_I3D_genlock +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +#endif + +#ifndef WGL_I3D_swap_frame_lock +#endif + +#ifndef WGL_NV_render_depth_texture +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +#ifndef WGL_ATI_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif + +#ifndef WGL_3DL_stereo_control +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif + +#ifndef WGL_NV_present_video +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef WGL_NV_video_out +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +#endif + +#ifndef WGL_NV_swap_group +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +#endif + +#ifndef WGL_AMD_gpu_association +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +#endif + +#ifndef WGL_NV_video_capture +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#endif + +#ifndef WGL_NV_copy_image +#endif + +#ifndef WGL_NV_multisample_coverage +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 +#endif + +#ifndef WGL_EXT_create_context_es2_profile +#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif + +#ifndef WGL_NV_DX_interop +#define WGL_ACCESS_READ_ONLY_NV 0x00000000 +#define WGL_ACCESS_READ_WRITE_NV 0x00000001 +#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 +#endif + + +/*************************************************************/ + +#ifndef WGL_ARB_pbuffer +DECLARE_HANDLE(HPBUFFERARB); +#endif +#ifndef WGL_EXT_pbuffer +DECLARE_HANDLE(HPBUFFEREXT); +#endif +#ifndef WGL_NV_present_video +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#endif +#ifndef WGL_NV_video_output +DECLARE_HANDLE(HPVIDEODEV); +#endif +#ifndef WGL_NV_gpu_affinity +DECLARE_HANDLE(HPGPUNV); +DECLARE_HANDLE(HGPUNV); + +typedef struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +} GPU_DEVICE, *PGPU_DEVICE; +#endif +#ifndef WGL_NV_video_capture +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +#endif + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); +extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); +extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); +extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#endif + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +extern HDC WINAPI wglGetCurrentReadDCARB (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); +extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); +extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); +extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); +extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#endif + +#ifndef WGL_ARB_framebuffer_sRGB +#define WGL_ARB_framebuffer_sRGB 1 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif + +#ifndef WGL_ARB_create_context_profile +#define WGL_ARB_create_context_profile 1 +#endif + +#ifndef WGL_ARB_create_context_robustness +#define WGL_ARB_create_context_robustness 1 +#endif + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); +extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); +extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); +extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +#endif + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern const char * WINAPI wglGetExtensionsStringEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +#endif + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +extern HDC WINAPI wglGetCurrentReadDCEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); +extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); +extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); +extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSwapIntervalEXT (int interval); +extern int WINAPI wglGetSwapIntervalEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#endif + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +extern void WINAPI wglFreeMemoryNV (void *pointer); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#endif + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); +extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); +extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +#endif + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); +extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); +extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC); +extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC); +extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); +extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); +extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); +extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); +extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); +extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); +extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); +extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); +extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); +extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); +extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); +extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +#endif + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableFrameLockI3D (void); +extern BOOL WINAPI wglDisableFrameLockI3D (void); +extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); +extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +#endif + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); +extern BOOL WINAPI wglBeginFrameTrackingI3D (void); +extern BOOL WINAPI wglEndFrameTrackingI3D (void); +extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#endif + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float 1 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB 1 +#endif + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +#endif + +#ifndef WGL_NV_video_output +#define WGL_NV_video_output 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); +extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); +extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); +typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); +extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); +extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); +extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); +extern BOOL WINAPI wglResetFrameCountNV (HDC hDC); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); +typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); +typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); +typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); +extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); +extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +extern BOOL WINAPI wglDeleteDCNV (HDC hdc); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); +typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); +typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +#endif + +#ifndef WGL_AMD_gpu_association +#define WGL_AMD_gpu_association 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); +extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data); +extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); +extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); +extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); +extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); +extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); +extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); +extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); +typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data); +typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); +typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); +typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); +typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); +typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); +typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif + +#ifndef WGL_NV_video_capture +#define WGL_NV_video_capture 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +#endif + +#ifndef WGL_NV_copy_image +#define WGL_NV_copy_image 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#endif + +#ifndef WGL_NV_multisample_coverage +#define WGL_NV_multisample_coverage 1 +#endif + +#ifndef WGL_NV_DX_interop +#define WGL_NV_DX_interop 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle); +extern HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice); +extern BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice); +extern HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +extern BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject); +extern BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access); +extern BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +extern BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle); +typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice); +typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice); +typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject); +typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access); +typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/others/irrlicht-1.8.1/source/source.txt b/src/others/irrlicht-1.8.1/source/source.txt new file mode 100644 index 0000000..5581244 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/source.txt @@ -0,0 +1,53 @@ +Source code of the Irrlicht Engine + +The complete source of the Irrlicht Engine can be found in this directory. +Please note that YOU DO NOT NEED THIS SOURCE to develop 3d applications with +the Irrlicht Engine. Instead, please use the .dll in the \bin directory, the +.lib in the \lib directory and the header files in the \include directory. + +You will find a good tutorial how to set up your development environment and to +use the engine in the \examples directory. (Try 01.helloworld) + +The source of the engine is included because for the following reasons: + + - To let developers be able to debug the engine. + - To let developers be able to make changes to the engine. + - To let developers be able to compile their own versions of the engine. + + + +HOW TO COMPILE THE ENGINE WITH LINUX + +If you wish to compile the engine for Linux yourself, run a 'make' in the +folder 'source/Irrlicht'. After this, you should be able to make all example +applications in examples. Then just run them from the directory where they are +built. +For the necessary compiler and linker flags please check the provided Makefiles +in the examples directories. + +Only the Software Drivers and the Null Driver will work on all Linux machines, +while OpenGL support requires either GLX support of the X11 server (try glxinfo) +or a software OpenGL solution such as Mesa. + +If you get a compiling/linking problem like + + undefined reference to `glXGetProcAddress' + +This is a problem introduced by the NVidia drivers. There are several solutions: +A) Update your drivers. All versions with GLX 1.4 support (i.e. beginning with + 12/2005) will work. +B) Define the symbol _IRR_GETPROCADDRESS_WORKAROUND_ during compilation of + COpenGLDriver.cpp, either by adding it to the compiler command line or by + uncommenting the line defining this symbol inside the OpenGL driver source. + This will force the use of glXGetProcAddressARB which has better chances to + work on older systems. + +If you get compiling or runtime problems regarding XF86VidMode, Xxf86vm.so, or +the XFree86 VidMode extension you have also several solutions: +A) Install the extension for your X server or the developer package in case of + compiler/linker problems. +B) Disable the VidMode usage by disabling the define _IRR_LINUX_X11_VIDMODE_ in + include/IrrCompileConfig.h + In this case you might give the RandR extension a try (by enabling the + next define in that file) which also provides fullscreen support under Linux. + If both extensions fail you won't have fullscreen support for Irrlicht. diff --git a/src/others/irrlicht-1.8.1/tools/FileToHeader/FileToHeader.cbp b/src/others/irrlicht-1.8.1/tools/FileToHeader/FileToHeader.cbp new file mode 100644 index 0000000..e6c1a2d --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/FileToHeader/FileToHeader.cbp @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="FileToHeader" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="..\..\bin\Linux\FileToHeader" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add directory="..\..\lib\Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="..\..\bin\Win32-gcc\FileToHeader" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="..\..\lib\Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + </Compiler> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/src/others/irrlicht-1.8.1/tools/FileToHeader/Makefile b/src/others/irrlicht-1.8.1/tools/FileToHeader/Makefile new file mode 100644 index 0000000..e9cd818 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/FileToHeader/Makefile @@ -0,0 +1,35 @@ +# Makefile for FileToHeader +Target = FileToHeader +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include +CXXFLAGS = -O3 -ffast-math -Wall +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/tools/FileToHeader/main.cpp b/src/others/irrlicht-1.8.1/tools/FileToHeader/main.cpp new file mode 100644 index 0000000..b3cc7a7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/FileToHeader/main.cpp @@ -0,0 +1,175 @@ +// Copyright (C) 2012 Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +/*** + This tool creates a .h file from a given input file by encoding it into a C string, + allowing you to build your resources directly into your binaries, just like Irrlicht's + built-in font. + + To distribute your app as a single executable file of minimal size: + + 1. Put all your resources into a single directory and add it to Irrlicht's filesystem + as a folder through IFileSystem::addArchive. Develop and test your app as usual. + 2. Open IrrCompileConfig.h and comment out all the options that your app does not use. + This will reduce the size of the Irrlicht library considerably. + * You should remove the D3D video drivers, because they rely on external DLLs. + * You should keep either the TAR or ZIP archive loader, used in step 6. + * If you remove the JPEG loader, you don't have to say you use JPEG code in your + documentation. + 3. Recompile Irrlicht as a static library, editing the IRR_STATIC_LIB line in + IrrCompileConfig.h. + The next time you compile your application it will take a while longer, but + Irrlicht will be built into your binary. + 4. TAR or ZIP your resource directory using your favourite archiving tool (ie 7zip). + * If you chose ZIP but compiled without zlib, don't compress this archive or it + won't open. + 5. Run this tool to convert your resource file into a .h file, like so: + FileToHeader res.zip > EmbeddedResources.h + 6. Add the .h file to your project, create the embedded read file then mount as a + ZIP or TAR archive instead of the folder, like so: + io::IReadFile *f = io::createEmbeddedFile(device->getFileSystem(), "res.zip"); + device->getFileSystem()->addFileArchive(f); + archive->drop(); + 7. Recompile your app. + * If you use Microsoft's compiler, make sure your CRT (common run-time) is + the static library version, otherwise you'll have a dependency on the CRT DLLs. + Your binary should now be completely portable; you can distribute just the exe file. + 8. Optional: Use UPX (upx.sf.net) to compress your binary. +*/ + +#include <iostream> +#include <fstream> +#include <sstream> + +using namespace std; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + // print usage + cerr << "You must to specify at least one input file" << endl; + cerr << "usage: " << argv[0] << "<file1> [file2...]" << endl; + cerr << "outputs a header file to stdout, so for example use"; + return 1; + } + + int i = 1; + + // write file header + cout << "// File made by FileToHeader, part of the Irrlicht Engine" << endl + << endl + << "#ifndef _EMBEDDED_FILES_H_INCLUDED_" << endl + << "#define _EMBEDDED_FILES_H_INCLUDED_" << endl + << endl + << "#include \"irrTypes.h\"" << endl + << "#include \"IReadFile.h\"" << endl + << "#include \"IFileSystem.h\"" << endl + << endl + << "namespace irr" << endl + << "{" << endl + << "namespace io" << endl + << "{" << endl + << endl + << " const c8* EmbeddedFileData[] = " << endl + << " {" << endl; + + // store sizes and file names + stringstream sizes; + stringstream names; + sizes << "const u32 EmbeddedFileSizes[] = {"; + names << "const c8* EmbeddedFileNames[] = {"; + int fileCount = 0; + + // char to hex digit table, probably doesn't help for speed due to fstream. better than using sprintf though + char hextable[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; + + while (i < argc) + { + // open and seek to end of file + ifstream input; + input.open(argv[i], ios::in | ios::binary | ios::ate); + + if (input.is_open()) + { + int size = input.tellg(); + input.seekg(0, ios::beg); + // read the file into RAM + char *entireFile = new char[size]; + input.read(entireFile, size); + + if (fileCount) + { + sizes << ", "; + names << ", "; + cout << "," << endl; + } + + // save file size and name + sizes << size; + names << '"' << argv[i] << '"'; + + // write the file data + cout << " \""; + for (int count=0; count < size; ++count) + { + if (count && (count % 16) == 0) + cout << "\"" << endl << " \""; + + cout << "\\x" << hextable[(entireFile[count] >> 4) & 0xF] << hextable[entireFile[count] & 0x0F]; + } + cout << "\""; + + delete [] entireFile; + // + input.close(); + + fileCount++; + } + else + { + cerr << "Failed to open file: " << argv[i] << endl; + } + + ++i; + } + + // close binary file list and write file metadata + cout << endl + << " , 0};" << endl + << endl + << " const u32 EmbeddedFileCount = " << fileCount << ";" << endl + << " " << sizes.str() << "};" << endl + << " " << names.str() << "};" << endl + << endl; + + // write functions to create embedded IReadFiles + cout << " IReadFile* createEmbeddedFile(IFileSystem *fs, u32 index)" << endl + << " {" << endl + << " if (EmbeddedFileCount < index)" << endl + << " return 0;" << endl + << endl + << " return fs->createMemoryReadFile((void*)EmbeddedFileData[index], " << endl + << " EmbeddedFileSizes[index], EmbeddedFileNames[index]);" << endl + << " }" << endl + << endl + << " IReadFile* createEmbeddedFile(IFileSystem *fs, path filename)" << endl + << " {" << endl + << " for (u32 i=0; i < EmbeddedFileCount; ++i)" << endl + << " if (filename == EmbeddedFileNames[i])" << endl + << " return createEmbeddedFile(fs, i);" << endl + << endl + << " return 0;" << endl + << " }" << endl + << endl; + + // write footer + cout << "} // namespace io" << endl + << "} // namespace irr" << endl + << endl + << "#endif // _EMBEDDED_FILES_H_INCLUDED_" << endl; + + return 0; +} + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttribute.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttribute.h new file mode 100644 index 0000000..0585498 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttribute.h @@ -0,0 +1,169 @@ +/* + This base class is used by the Attribute editor for making your own attribute types. + + The attribute editor will try and create an attribute called "AttribType_attribute", + and if it fails, it will create a "string_attribute". + +*/ + +#ifndef __C_GUI_ATTRIBUTE_H_INCLUDED__ +#define __C_GUI_ATTRIBUTE_H_INCLUDED__ + +#include "IGUIElement.h" +#include "IGUIEnvironment.h" +#include "IGUIFont.h" +#include "IGUIStaticText.h" +#include "IAttributes.h" +#include "CGUIEditWorkspace.h" + +namespace irr +{ + +namespace gui +{ + + const u32 ATTRIBEDIT_ATTRIB_CHANGED=MAKE_IRR_ID('A','T','T','R'); + + class CGUIAttribute : public IGUIElement + { + public: + //! constructor + CGUIAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : + IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), + AttribName(0), Attribs(0), Index(0), MyParentID(myParentID) + { + + #ifdef _DEBUG + setDebugName("CGUIAttribute"); + #endif + + AttribName = environment->addStaticText(0, + core::rect<s32>(0, 0, + 100, Environment->getSkin()->getFont()->getDimension(L"A").Height), + false, false, this, -1, false); + AttribName->grab(); + AttribName->setSubElement(true); + AttribName->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + } + + virtual ~CGUIAttribute() + { + if (Attribs) + Attribs->drop(); + if (AttribName) + AttribName->drop(); + } + + virtual bool OnEvent(const SEvent &e) + { + if (IsEnabled) + { + switch (e.EventType) + { + case EET_GUI_EVENT: + switch (e.GUIEvent.EventType) + { + case EGET_ELEMENT_FOCUSED: + if (Parent && isMyChild(e.GUIEvent.Caller)) + Parent->bringToFront(this); + break; + case EGET_ELEMENT_HOVERED: + case EGET_ELEMENT_LEFT: + return IGUIElement::OnEvent(e); + case EGET_ELEMENT_FOCUS_LOST: + updateAttrib(); + return IGUIElement::OnEvent(e); + default: + return updateAttrib(); + } + break; + case EET_KEY_INPUT_EVENT: + return true; + default: + break; + } + } + + return IGUIElement::OnEvent(e); + } + + //! sets the attribute to use + virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) + { + if (Attribs) + Attribs->drop(); + Attribs = attribs; + if (Attribs) + Attribs->grab(); + Index = attribIndex; + + core::stringw name(attribs->getAttributeName(attribIndex)); + name += L" ("; + name += attribs->getAttributeTypeString(attribIndex); + name += L")"; + AttribName->setText(name.c_str()); + + core::rect<s32> r = Parent->getAbsolutePosition(); + core::rect<s32> r2(0, 5, + r.getWidth(), Environment->getSkin()->getFont()->getDimension(L"A").Height + 10 ); + + AttribName->setRelativePosition(r2); + + // get minimum height + s32 y=0; + core::list<IGUIElement*>::Iterator it = Children.begin(); + for (; it != Children.end(); ++it) + { + if (y < (*it)->getRelativePosition().LowerRightCorner.Y) + y = (*it)->getRelativePosition().LowerRightCorner.Y; + } + setMinSize( core::dimension2du(0, y+5)); + + updateAttrib(false); + } + + //! sets the parent ID, for identifying where events came from + void setParentID(s32 parentID) + { + MyParentID = parentID; + } + + //! save the attribute and possibly post the event to its parent + virtual bool updateAttrib(bool sendEvent=true) + { + if (Attribs && IsEnabled && sendEvent) + { + // build event and pass to parent + SEvent event; + event.EventType = (EEVENT_TYPE)ATTRIBEDIT_ATTRIB_CHANGED; + event.UserEvent.UserData1 = MyParentID; + event.UserEvent.UserData2 = Index; + return Parent->OnEvent(event); + } + + return true; + } + + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) + { + IGUIElement::serializeAttributes(out, options); + } + + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) + { + IGUIElement::deserializeAttributes(in, options); + if (AttribName) + AttribName->setText(Text.c_str()); + } + + protected: + IGUIStaticText* AttribName; + io::IAttributes* Attribs; + u32 Index; + s32 MyParentID; + }; + +} // namespace gui +} // namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.cpp new file mode 100644 index 0000000..45913b6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.cpp @@ -0,0 +1,120 @@ + +#include "CGUIAttributeEditor.h" +#include "IGUIEnvironment.h" +#include "IFileSystem.h" +#include "IVideoDriver.h" +#include "IAttributes.h" +#include "IGUIFont.h" +#include "IGUIScrollBar.h" +#include "CGUIEditWorkspace.h" +#include "CGUIAttribute.h" +#include "CGUIStringAttribute.h" + +namespace irr +{ +namespace gui +{ + +using namespace core; +using namespace io; + +CGUIAttributeEditor::CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent) : + CGUIPanel(environment, parent, id, rect<s32>(0, 0, 100, 100)), + Attribs(0), Panel(0) +{ + #ifdef _DEBUG + setDebugName("CGUIAttributeEditor"); + #endif + + // create attributes + Attribs = environment->getFileSystem()->createEmptyAttributes(Environment->getVideoDriver()); + + calculateClientArea(); + resizeInnerPane(); + + // refresh attrib list + refreshAttribs(); + + IGUIScrollBar* sb = getVScrollBar(); + core::rect<s32> r = sb->getRelativePosition(); + r.LowerRightCorner.Y -= 16; + sb->setRelativePosition(r); +} + +CGUIAttributeEditor::~CGUIAttributeEditor() +{ + for (u32 i=0; i<AttribList.size(); ++i) + { + AttribList[i]->remove(); + AttribList[i]->drop(); + } + AttribList.clear(); + + Attribs->drop(); +} + + +IAttributes* CGUIAttributeEditor::getAttribs() +{ + return Attribs; +} + +void CGUIAttributeEditor::refreshAttribs() +{ + // clear the attribute list + u32 i; + for (i=0; i<AttribList.size(); ++i) + { + AttribList[i]->remove(); + AttribList[i]->drop(); + } + AttribList.clear(); + + position2di top(10, 5); + rect<s32> r(top.X, top.Y, + getClientArea().getWidth() - 10, + 5 + Environment->getSkin()->getFont()->getDimension(L"A").Height); + + // add attribute elements + u32 c = Attribs->getAttributeCount(); + for (i=0; i<c; ++i) + { + + // try to create attribute + stringc str = Attribs->getAttributeTypeString(i); + str += "_attribute"; + CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), 0); + + // if this doesn't exist, use a string editor + if (!n) + n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", 0); + + if (n) + { + AttribList.push_back(n); + n->setParentID(getID()); + n->grab(); + } + + // We can't set "this" as parent above as we need functionality + // of the overloaded addChild which isn't called in the constructor. + // (that's a general Irrlicht messup with too fat constructors) + addChild(n); + + AttribList[i]->setSubElement(true); + AttribList[i]->setRelativePosition(r); + AttribList[i]->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + AttribList[i]->setAttrib(Attribs, i); + r += position2di(0, AttribList[i]->getRelativePosition().getHeight() + 5); + } +} + +void CGUIAttributeEditor::updateAttribs() +{ + for (u32 i=0; i<AttribList.size(); ++i) + AttribList[i]->updateAttrib(false); +} + +} // namespace gui +} // namespace irr + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.h new file mode 100644 index 0000000..0bcdab5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIAttributeEditor.h @@ -0,0 +1,54 @@ +#ifndef __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ +#define __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ + +#include "IGUIElement.h" +#include "CGUIPanel.h" +#include "irrArray.h" +#include "IAttributes.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + class CGUIAttribute; + + + class CGUIAttributeEditor : public CGUIPanel + { + public: + + //! constructor + CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent=0); + + //! destructor + ~CGUIAttributeEditor(); + + // gets the current attributes list + virtual io::IAttributes* getAttribs(); + + // update the attribute list after making a change + void refreshAttribs(); + + // save the attributes + void updateAttribs(); + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR]; + } + + private: + + core::array<CGUIAttribute*> AttribList; // attributes editing controls + io::IAttributes* Attribs; // current attributes + CGUIPanel* Panel; + }; + +} // end namespace gui +} // end namespace irr + +#endif // __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIBoolAttribute.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIBoolAttribute.h new file mode 100644 index 0000000..b0521db --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIBoolAttribute.h @@ -0,0 +1,68 @@ +#ifndef __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ +#define __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ + +#include "CGUIAttribute.h" +#include "IGUICheckBox.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + class CGUIBoolAttribute : public CGUIAttribute + { + public: + // + CGUIBoolAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : + CGUIAttribute(environment, parent, myParentID), AttribCheckBox(0) + { + + core::rect<s32> r = getAbsolutePosition(); + core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, + r.getWidth() - 5, + Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); + + AttribCheckBox = environment->addCheckBox(false, r2, this); + AttribCheckBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + AttribCheckBox->setSubElement(true); + AttribCheckBox->grab(); + } + + virtual ~CGUIBoolAttribute() + { + if (AttribCheckBox) + AttribCheckBox->drop(); + } + + virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) + { + AttribCheckBox->setChecked(attribs->getAttributeAsBool(attribIndex)); + CGUIAttribute::setAttrib(attribs, attribIndex); + } + + // save the attribute and possibly post the event to its parent + virtual bool updateAttrib(bool sendEvent=true) + { + if (!Attribs) + return true; + + Attribs->setAttribute(Index, AttribCheckBox->isChecked()); + + return CGUIAttribute::updateAttrib(sendEvent); + } + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE]; + } + + private: + IGUICheckBox* AttribCheckBox; + }; + +} // namespace gui +} // namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIColorAttribute.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIColorAttribute.h new file mode 100644 index 0000000..e0c5212 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIColorAttribute.h @@ -0,0 +1,179 @@ +#ifndef __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ +#define __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ + +#include "CGUIAttribute.h" +#include "IGUIStaticText.h" +#include "IGUIScrollBar.h" +#include "IGUITabControl.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + class CGUIColorAttribute : public CGUIAttribute + { + public: + // + CGUIColorAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : + CGUIAttribute(environment, parent, myParentID), + AttribSliderA(0), AttribSliderR(0), AttribSliderG(0), AttribSliderB(0), + AttribEditBox(0), AttribColor(0) + { + s32 fh = Environment->getSkin()->getFont()->getDimension(L"A").Height; + + core::rect<s32> r0(getAbsolutePosition()), + r2(0, fh + 5, r0.getWidth() - 5, fh*2 + 10 ), + r3(r2), + r4(r2.getWidth() - 20, 3, r2.getWidth() - 3, r2.getHeight()-3); + + AttribColor = Environment->addTab(r4, this, 0); + AttribColor->grab(); + AttribColor->setDrawBackground(true); + AttribColor->setSubElement(true); + AttribColor->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + + s32 h=2; + r2 += core::position2di(0, h*4 + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)*2); + r3.LowerRightCorner.Y = r3.UpperLeftCorner.Y + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)/2; + + AttribSliderA = environment->addScrollBar(true, r3, this, -1); + AttribSliderA->setMax(255); + AttribSliderA->grab(); + AttribSliderA->setSubElement(true); + AttribSliderA->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + r3 += core::position2di(0, r3.getHeight()+h); + AttribSliderR = environment->addScrollBar(true, r3, this, -1); + AttribSliderR->setMax(255); + AttribSliderR->grab(); + AttribSliderR->setSubElement(true); + AttribSliderR->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + r3 += core::position2di(0, r3.getHeight()+h); + AttribSliderG = environment->addScrollBar(true, r3, this, -1); + AttribSliderG->setMax(255); + AttribSliderG->grab(); + AttribSliderG->setSubElement(true); + AttribSliderG->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + r3 += core::position2di(0, r3.getHeight()+h); + AttribSliderB = environment->addScrollBar(true, r3, this, -1); + AttribSliderB->setMax(255); + AttribSliderB->grab(); + AttribSliderB->setSubElement(true); + AttribSliderB->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + + // add editbox + AttribEditBox = environment->addEditBox( + L"", + r2, + true, this, -1); + AttribEditBox->grab(); + AttribEditBox->setSubElement(true); + AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + } + + virtual ~CGUIColorAttribute() + { + if (AttribSliderA) + AttribSliderA->drop(); + if (AttribSliderR) + AttribSliderR->drop(); + if (AttribSliderG) + AttribSliderG->drop(); + if (AttribSliderB) + AttribSliderB->drop(); + if (AttribEditBox) + AttribEditBox->drop(); + if (AttribColor) + AttribColor->drop(); + } + + virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) + { + video::SColor col = attribs->getAttributeAsColor(attribIndex); + + AttribSliderA->setPos(col.getAlpha()); + AttribSliderR->setPos(col.getRed()); + AttribSliderG->setPos(col.getGreen()); + AttribSliderB->setPos(col.getBlue()); + AttribEditBox->setText( attribs->getAttributeAsStringW(attribIndex).c_str() ); + AttribColor->setBackgroundColor(col); + + CGUIAttribute::setAttrib(attribs, attribIndex); + } + + virtual bool OnEvent(const SEvent &e) + { + switch (e.EventType) + { + + case EET_GUI_EVENT: + switch (e.GUIEvent.EventType) + { + case EGET_EDITBOX_ENTER: + case EGET_ELEMENT_FOCUS_LOST: + if (e.GUIEvent.Caller == AttribEditBox) + { + // update scrollbars from textbox + Attribs->setAttribute(Index, AttribEditBox->getText()); + video::SColor col = Attribs->getAttributeAsColor(Index); + AttribSliderA->setPos(col.getAlpha()); + AttribSliderR->setPos(col.getRed()); + AttribSliderG->setPos(col.getGreen()); + AttribSliderB->setPos(col.getBlue()); + // update colour + AttribColor->setBackgroundColor(col); + } + break; + case EGET_SCROLL_BAR_CHANGED: + { + // update editbox from scrollbars + video::SColor col( AttribSliderA->getPos(), AttribSliderR->getPos(), + AttribSliderG->getPos(), AttribSliderB->getPos()); + + Attribs->setAttribute(Index, col); + AttribEditBox->setText( Attribs->getAttributeAsStringW(Index).c_str()); + // update colour + AttribColor->setBackgroundColor(col); + } + return updateAttrib(); + default: + break; + } + break; + default: + break; + } + return CGUIAttribute::OnEvent(e); + } + + // save the attribute and possibly post the event to its parent + virtual bool updateAttrib(bool sendEvent=true) + { + if (!Attribs) + return true; + + Attribs->setAttribute(Index, AttribEditBox->getText()); + AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); + return CGUIAttribute::updateAttrib(sendEvent); + } + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE]; + } + + private: + IGUIScrollBar* AttribSliderA; + IGUIScrollBar* AttribSliderR; + IGUIScrollBar* AttribSliderG; + IGUIScrollBar* AttribSliderB; + IGUIEditBox* AttribEditBox; + IGUITab* AttribColor; + }; + +} // namespace gui +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIDummyEditorStub.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIDummyEditorStub.h new file mode 100644 index 0000000..635501a --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIDummyEditorStub.h @@ -0,0 +1,59 @@ +/* + This is a custom editor for stubbing problematic elements out, + for example elements which include modal screens +*/ + +#ifndef __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ +#define __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ + +#include "IGUIElement.h" +#include "IGUIEnvironment.h" +#include "IGUIStaticText.h" + +namespace irr +{ + +namespace gui +{ + class CGUIDummyEditorStub : public IGUIElement + { + public: + //! constructor + CGUIDummyEditorStub(IGUIEnvironment* environment, IGUIElement *parent, const char *text) : + IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), + TextBox(0), TypeName(text) + { + + #ifdef _DEBUG + setDebugName("CGUIDummyEditorStub"); + #endif + + core::dimension2du d = Environment->getSkin()->getFont()->getDimension(L"A"); + s32 h = d.Height / 2; + s32 w = d.Width / 2; + + TextBox = environment->addStaticText(core::stringw(text).c_str(), + core::rect<s32>(50-w, 50-h, 50+w, 50+h), + false, false, this, -1, false); + TextBox->grab(); + TextBox->setSubElement(true); + TextBox->setAlignment(EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER); + } + + virtual ~CGUIDummyEditorStub() + { + if (TextBox) + TextBox->drop(); + } + virtual const c8* getTypeName() const { return TypeName.c_str(); } + + protected: + IGUIStaticText* TextBox; + core::stringc TypeName; + + }; + +} // namespace gui +} // namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.cpp new file mode 100644 index 0000000..9552745 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.cpp @@ -0,0 +1,120 @@ +#include "CGUIEditFactory.h" +#include "IGUIEnvironment.h" +#include "irrString.h" + +#include "EGUIEditTypes.h" + +#include "CGUIEditWorkspace.h" +#include "CGUIEditWindow.h" +#include "CGUIPanel.h" +#include "CGUITextureCacheBrowser.h" +#include "CGUIAttributeEditor.h" +#include "CGUIStringAttribute.h" +#include "CGUIBoolAttribute.h" +#include "CGUIEnumAttribute.h" +#include "CGUIColorAttribute.h" +#include "CGUITextureAttribute.h" +#include "CGUIDummyEditorStub.h" + +namespace irr +{ +namespace gui +{ + +CGUIEditFactory::CGUIEditFactory(IGUIEnvironment* env) +: Environment(env) +{ + #ifdef _DEBUG + setDebugName("CGUIEditFactory"); + #endif + + // don't grab the gui environment here to prevent cyclic references +} + + +CGUIEditFactory::~CGUIEditFactory() +{ +} + + +//! adds an element to the environment based on its type name +IGUIElement* CGUIEditFactory::addGUIElement(const c8* typeName, IGUIElement* parent) +{ + /* + here we create elements, add them to the manager, and then drop them + */ + + core::stringc elementType(typeName); + IGUIElement* ret=0; + if (!parent) + parent = Environment->getRootGUIElement(); + + // editor workspace + if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDIT])) + ret = new CGUIEditWorkspace(Environment, -1, 0); + // editor window + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW])) + ret = new CGUIEditWindow(Environment, core::rect<s32>(0,0,100,100), 0); + // Klasker's GUI Panel + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIPANEL])) + ret = new CGUIPanel(Environment, 0); + // texture cache browser + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREBROWSER])) + ret = new CGUITextureCacheBrowser(Environment, -1, 0); + // block of attribute editors + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR])) + ret = new CGUIAttributeEditor(Environment, -1, 0); + //! single attribute editors + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE])) + ret = new CGUIStringAttribute(Environment, 0, -1); + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE])) + ret = new CGUIBoolAttribute(Environment, 0, -1); + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE])) + ret = new CGUIEnumAttribute(Environment, 0, -1); + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE])) + ret = new CGUIColorAttribute(Environment, 0, -1); + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORFATTRIBUTE])) + ret = new CGUIColorAttribute(Environment, 0, -1); + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE])) + ret = new CGUITextureAttribute(Environment, 0, -1); + // stubs and custom editors + else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_CONTEXTMENUEDITOR]) || + elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MENUEDITOR]) || + elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_FILEDIALOGEDITOR]) || + elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORDIALOGEDITOR]) || + elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MODALSCREENEDITOR]) ) + ret = new CGUIDummyEditorStub(Environment, 0, typeName); + + // add the element to its parent + if (ret) + parent->addChild(ret); + + // the environment now has the reference, so we can drop the element + if (ret) + ret->drop(); + + return ret; +} + + +//! returns amount of element types this factory is able to create +s32 CGUIEditFactory::getCreatableGUIElementTypeCount() const +{ + return EGUIEDIT_COUNT; +} + + +//! returns type name of a createable element type +const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx) const +{ + if (idx>=0 && idx<EGUIEDIT_COUNT) + return GUIEditElementTypeNames[idx]; + + return 0; +} + + + +} // end namespace gui +} // end namespace irr + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.h new file mode 100644 index 0000000..e6f8815 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditFactory.h @@ -0,0 +1,53 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__ +#define __C_GUIEDIT_FACTORY_H_INCLUDED__ + +#include "IGUIElementFactory.h" + +namespace irr +{ +namespace gui +{ + class IGUIElement; + class IGUIEnvironment; + + //! Interface making it possible to dynamicly create gui elements + class CGUIEditFactory : public IGUIElementFactory + { + public: + + CGUIEditFactory(IGUIEnvironment* env); + ~CGUIEditFactory(); + + //! adds a GUI element to the GUI Environment based on its type name + /** \param typeName: Type name of the element to add. + \param parent: Parent scene node of the new element, can be null to add it to the root. + \return Returns pointer to the new element or null if not successful. */ + virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0); + + //! returns amount of GUI element types this factory is able to create + virtual s32 getCreatableGUIElementTypeCount() const; + + //! returns type name of a createable GUI element type by index + /** \param idx: Index of the type in this factory. Must be a value between 0 and + getCreatableGUIElementTypeCount() */ + virtual const c8* getCreateableGUIElementTypeName(s32 idx) const; + + // not used: + virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ; + virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;}; + virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;}; + private: + + IGUIEnvironment* Environment; + }; + + +} // end namespace scene +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.cpp new file mode 100644 index 0000000..2ff96ae --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.cpp @@ -0,0 +1,356 @@ + +#include "CGUIEditWindow.h" +#include "IGUISkin.h" +#include "IGUIEnvironment.h" +#include "IGUIElementFactory.h" +#include "IAttributes.h" +#include "IGUIFont.h" +#include "IGUITabControl.h" +#include "IGUITreeView.h" +#include "CGUIEditWorkspace.h" + +using namespace irr; +using namespace gui; + +//! constructor +CGUIEditWindow::CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent) + : IGUIWindow(environment, parent, -1, rectangle), + Dragging(false), IsDraggable(true), Resizing(false), SelectedElement(0), + AttribEditor(0), OptionEditor(0), EnvEditor(0) +{ + #ifdef _DEBUG + setDebugName("CGUIEditWindow"); + #endif + + // we can't tab out of this window + setTabGroup(true); + // we can ctrl+tab to it + setTabStop(true); + // the tab order number is auto-assigned + setTabOrder(-1); + + // set window text + setText(L"GUI Editor"); + + // return if we have no skin. + IGUISkin *skin = environment->getSkin(); + if (!skin) + return; + + s32 th = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + + setRelativePosition(core::rect<s32>(50,50,250,500)); + setMinSize(core::dimension2du(200,200)); + + IGUITabControl *TabControl = environment->addTabControl(core::rect<s32>(1,th+5,199,449), this, false, true); + TabControl->setSubElement(true); + TabControl->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + TabControl->addTab(L"Tools"); + //L"Texture Cache Browser" + //L"Font Browser" + //L"Font Generator" + //L"Sprite Editor" + //Environment->addGUIElement("textureCacheBrowser", this); + + IGUITab* EditorTab = TabControl->addTab(L"Editor"); + OptionEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EditorTab); + OptionEditor->grab(); + OptionEditor->setID(EGUIEDCE_OPTION_EDITOR); + OptionEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); + OptionEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + if (Parent && Parent->getParent() == Environment->getRootGUIElement()) + { + IGUITab* EnvTab = TabControl->addTab(L"Env"); + EnvEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EnvTab); + EnvEditor->grab(); + EnvEditor->setID(EGUIEDCE_ENV_EDITOR); + EnvEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); + EnvEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + } + IGUITab* ElementTab = TabControl->addTab(L"Element"); + + AttribEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", ElementTab); + AttribEditor->grab(); + AttribEditor->setID(EGUIEDCE_ATTRIB_EDITOR); + AttribEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); + AttribEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + IGUITab* TreeTab = TabControl->addTab(L"Tree"); + TreeView = environment->addTreeView(core::rect<s32>(0,0,0,0), TreeTab); + TreeView->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); + TreeView->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + IGUITreeViewNode* treenode = TreeView->getRoot(); + //treenode->addChildFront(L"Elements"); + ResizeButton = environment->addButton(core::rect<s32>(199-th,449-th,199,449), this); + ResizeButton->setDrawBorder(false); + ResizeButton->setEnabled(false); + ResizeButton->setSpriteBank(skin->getSpriteBank()); + ResizeButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); + ResizeButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); + ResizeButton->grab(); + ResizeButton->setSubElement(true); + ResizeButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); + updateTree(); +} + + +//! destructor +CGUIEditWindow::~CGUIEditWindow() +{ + // drop everything + if (AttribEditor) + AttribEditor->drop(); + if (EnvEditor) + EnvEditor->drop(); + if (OptionEditor) + OptionEditor->drop(); + if (ResizeButton) + ResizeButton->drop(); +} + +IGUITreeView* CGUIEditWindow::getTreeView() const +{ + return TreeView; +} +CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor() const +{ + return EnvEditor; +} + +CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor() const +{ + return AttribEditor; +} + +CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const +{ + return OptionEditor; +} + +IGUITreeViewNode* CGUIEditWindow::getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode) +{ + IGUITreeViewNode* child = searchnode->getFirstChild(); + while (child) + { + if (((IGUIElement*) child->getData()) == element) + return child; + + if (child->hasChildren()) + { + IGUITreeViewNode* foundnode = getTreeNode(element, child); + if (foundnode) + return foundnode; + } + child = child->getNextSibling(); + } + return 0; +} + +void CGUIEditWindow::addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode) +{ + core::stringw name = core::stringw(parentElement->getTypeName()); + if (parentElement->getID() != -1) + name += core::stringw(L" [") + core::stringw(parentElement->getID()) + core::stringw(L"]"); + + IGUITreeViewNode* newnode = treenode->addChildBack(name.c_str()); + newnode->setData((void*)parentElement); + core::list<IGUIElement*> children = parentElement->getChildren(); + + for (core::list<IGUIElement*>::Iterator i = children.begin(); i != children.end(); i++ ) + { + if(core::stringc((*i)->getTypeName()) != "GUIEditor" && !(*i)->isSubElement()) + addChildrenToTree(*i, newnode); + } +} + +void CGUIEditWindow::updateTree() +{ + TreeView->getRoot()->clearChildren(); + IGUIElement* root = Environment->getRootGUIElement(); + addChildrenToTree(root, TreeView->getRoot()); + TreeView->getRoot()->getFirstChild()->setExpanded(true); +} + +void CGUIEditWindow::setSelectedElement(IGUIElement *sel) +{ + // save changes + AttribEditor->updateAttribs(); + IGUITreeViewNode* elementTreeNode = getTreeNode(sel, TreeView->getRoot()); + + if (elementTreeNode) + { + elementTreeNode->setSelected(true); + while (elementTreeNode) + { + elementTreeNode->setExpanded(true); + elementTreeNode = elementTreeNode->getParent(); + } + } + + io::IAttributes* Attribs = AttribEditor->getAttribs(); + + if (SelectedElement && sel != SelectedElement) + { + // deserialize attributes + SelectedElement->deserializeAttributes(Attribs); + } + // clear the attributes list + Attribs->clear(); + SelectedElement = sel; + + // get the new attributes + if (SelectedElement) + SelectedElement->serializeAttributes(Attribs); + + AttribEditor->refreshAttribs(); +} + +//! draws the element and its children. +//! same code as for a window +void CGUIEditWindow::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + + core::rect<s32> rect = AbsoluteRect; + + // draw body fast + rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), + AbsoluteRect, &AbsoluteClippingRect); + + if (Text.size()) + { + rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); + rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); + rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; + + IGUIFont* font = skin->getFont(); + if (font) + font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, &AbsoluteClippingRect); + } + + IGUIElement::draw(); +} + + +//! called if an event happened. +bool CGUIEditWindow::OnEvent(const SEvent &event) +{ + switch(event.EventType) + { + case EET_GUI_EVENT: + switch(event.GUIEvent.EventType) + { + case EGET_ELEMENT_FOCUS_LOST: + if (event.GUIEvent.Caller == this || + event.GUIEvent.Caller == ResizeButton) + { + Dragging = false; + Resizing = false; + } + break; + default: + break; + } + + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + { + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + + IGUIElement* clickedElement = getElementFromPoint(DragStart); + + if (clickedElement == this) + { + Dragging = IsDraggable; + //Environment->setFocus(this); + if (Parent) + Parent->bringToFront(this); + return true; + } + else if (clickedElement == ResizeButton) + { + Resizing = true; + //Environment->setFocus(this); + if (Parent) + Parent->bringToFront(this); + return true; + } + break; + } + case EMIE_LMOUSE_LEFT_UP: + if (Dragging || Resizing) + { + Dragging = false; + Resizing = false; + return true; + } + break; + case EMIE_MOUSE_MOVED: + if (Dragging || Resizing) + { + // gui window should not be dragged outside of its parent + if (Parent) + if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || + event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || + event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || + event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) + + return true; + core::position2di diff(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y); + if (Dragging) + { + move(diff); + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + } + else if (Resizing) + { + core::position2di dp = RelativeRect.LowerRightCorner + diff; + setRelativePosition(core::rect<s32>(RelativeRect.UpperLeftCorner, dp)); + DragStart += dp - RelativeRect.LowerRightCorner + diff; + } + + return true; + } + break; + default: + break; + } + default: + break; + } + + return Parent ? Parent->OnEvent(event) : false; +} + +bool CGUIEditWindow::isDraggable() const +{ + return IsDraggable; +} + +void CGUIEditWindow::setDraggable(bool draggable) +{ + IsDraggable = draggable; + + if (Dragging && !IsDraggable) + Dragging = false; +} + + +// we're supposed to supply these if we're creating an IGUIWindow +// but we don't need them so we'll just return null + +//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) +core::rect<s32> CGUIEditWindow::getClientRect() const {return core::recti();} +IGUIButton* CGUIEditWindow::getCloseButton() const {return 0;} +IGUIButton* CGUIEditWindow::getMinimizeButton() const {return 0;} +IGUIButton* CGUIEditWindow::getMaximizeButton() const {return 0;} diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.h new file mode 100644 index 0000000..4b1d72f --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWindow.h @@ -0,0 +1,88 @@ +#ifndef __C_GUI_EDITOR_H_INCLUDED__ +#define __C_GUI_EDITOR_H_INCLUDED__ + + +#include "IGUIWindow.h" +#include "CGUIAttributeEditor.h" +//#include "IGUIStaticText.h" +#include "IGUIButton.h" +#include "IGUITreeView.h" +#include "irrArray.h" +#include "IAttributes.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + class CGUIEditWindow : public IGUIWindow + { + public: + + //! constructor + CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent); + + //! destructor + ~CGUIEditWindow(); + + //! this part draws the window + virtual void draw(); + //! handles events + virtual bool OnEvent(const SEvent &event); + + //! change selection + virtual void setSelectedElement(IGUIElement *sel); + + //! get draggable + virtual bool isDraggable() const; + + //! get draggable + virtual void setDraggable(bool draggable); + + // not used + virtual core::rect<s32> getClientRect() const; + virtual IGUIButton* getCloseButton() const; + virtual IGUIButton* getMinimizeButton() const; + virtual IGUIButton* getMaximizeButton() const; + virtual void setDrawBackground(bool draw) { } + virtual bool getDrawBackground() const { return true; } + virtual void setDrawTitlebar(bool draw) { } + virtual bool getDrawTitlebar() const { return true; } + + IGUITreeView* getTreeView() const; + CGUIAttributeEditor* getAttributeEditor() const; + CGUIAttributeEditor* getOptionEditor() const; + CGUIAttributeEditor* getEnvironmentEditor() const; + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW]; + } + + void updateTree(); + private: + + void addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode); + IGUITreeViewNode* getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode); + // for dragging the window + bool Dragging; + bool IsDraggable; + bool Resizing; + core::position2d<s32> DragStart; + + IGUIElement* SelectedElement; // current selected element + + CGUIAttributeEditor* AttribEditor; // edits the current attribute + CGUIAttributeEditor* OptionEditor; // edits the options for the window + CGUIAttributeEditor* EnvEditor; // edits attributes for the environment + IGUITreeView* TreeView; // tree view of all elements in scene + IGUIButton* ResizeButton; + + }; + +} // end namespace gui +} // end namespace irr + +#endif // __C_GUI_EDITOR_H_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.cpp new file mode 100644 index 0000000..a45e5d3 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.cpp @@ -0,0 +1,927 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +// Thanks to Midnight for all his testing, bug fixes and patches :) + +#include "CGUIEditWorkspace.h" +#include "IGUIEnvironment.h" +#include "IVideoDriver.h" +#include "IOSOperator.h" +#include "IReadFile.h" +#include "IFileSystem.h" +#include "IXMLWriter.h" +#include "IGUISkin.h" +#include "IGUIElementFactory.h" +#include "CGUIEditWindow.h" +#include "IGUIContextMenu.h" +#include "IGUIFileOpenDialog.h" +#include "IGUITreeView.h" +#include "CGUIAttribute.h" +#include "CMemoryReadWriteFile.h" + +namespace irr +{ +namespace gui +{ + +//! constructor +CGUIEditWorkspace::CGUIEditWorkspace(IGUIEnvironment* environment, s32 id, IGUIElement *parent) +: IGUIElement(EGUIET_ELEMENT, environment, parent ? parent : environment->getRootGUIElement(), id, environment->getRootGUIElement()->getAbsolutePosition()), + CurrentMode(EGUIEDM_SELECT), MouseOverMode(EGUIEDM_SELECT), + GridSize(10,10), MenuCommandStart(0x3D17), DrawGrid(false), UseGrid(true), + MouseOverElement(0), SelectedElement(0), EditorWindow(0) +{ + #ifdef _DEBUG + setDebugName("CGUIEditWorkspace"); + #endif + + // this element is never saved. + setSubElement(true); + + // it resizes to fit a resizing window + setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + + EditorWindow = (CGUIEditWindow*) Environment->addGUIElement("GUIEditWindow", this); + if (EditorWindow) + { + EditorWindow->grab(); + EditorWindow->setSubElement(true); + + Environment->setFocus(EditorWindow); + serializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); + EditorWindow->getOptionEditor()->refreshAttribs(); + + if (EditorWindow->getEnvironmentEditor()) + { + Environment->serializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); + EditorWindow->getEnvironmentEditor()->refreshAttribs(); + } + } +} + + +//! destructor +CGUIEditWorkspace::~CGUIEditWorkspace() +{ + if (EditorWindow) + EditorWindow->drop(); +} + + +void CGUIEditWorkspace::setMenuCommandIDStart(s32 id) +{ + MenuCommandStart = id; +} + +CGUIEditWorkspace::EGUIEDIT_MODE CGUIEditWorkspace::getModeFromPos(core::position2di p) +{ + if (SelectedElement) + { + core::rect<s32> r = SelectedElement->getAbsolutePosition(); + + if (TLRect.isPointInside(p)) + return EGUIEDM_RESIZE_TL; + + else if (TRRect.isPointInside(p)) + return EGUIEDM_RESIZE_TR; + + else if (BLRect.isPointInside(p) ) + return EGUIEDM_RESIZE_BL; + + else if (BRRect.isPointInside(p)) + return EGUIEDM_RESIZE_BR; + + else if (TopRect.isPointInside(p)) + return EGUIEDM_RESIZE_T; + + else if (BRect.isPointInside(p)) + return EGUIEDM_RESIZE_B; + + else if (LRect.isPointInside(p)) + return EGUIEDM_RESIZE_L; + + else if (RRect.isPointInside(p)) + return EGUIEDM_RESIZE_R; + + else if (getEditableElementFromPoint(SelectedElement, p) == SelectedElement) + return EGUIEDM_MOVE; + + else + return EGUIEDM_SELECT; + } + + return EGUIEDM_SELECT; + +} + +IGUIElement* CGUIEditWorkspace::getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index ) +{ + IGUIElement* target = 0; + + // we have to search from back to front. + + core::list<IGUIElement*>::ConstIterator it = start->getChildren().getLast(); + s32 count=0; + while(it != start->getChildren().end()) + { + target = getEditableElementFromPoint((*it),point); + if (target) + { + if (!target->isSubElement() && !isMyChild(target) && target != this) + { + if (index == count) + return target; + else + count++; + } + else + target = 0; + } + --it; + } + + if (start->getAbsolutePosition().isPointInside(point)) + target = start; + + return target; +} + +void CGUIEditWorkspace::setSelectedElement(IGUIElement *sel) +{ + IGUIElement* focus = Environment->getFocus(); + // we only give focus back to children + if (!isMyChild(focus)) + focus = 0; + + if (SelectedElement != Parent) + { + if (SelectedElement != sel && EditorWindow) + { + EditorWindow->setSelectedElement(sel); + SelectedElement = sel; + } + } + else + SelectedElement = 0; + + if (focus) + Environment->setFocus(focus); + else + Environment->setFocus(this); +} + +IGUIElement* CGUIEditWorkspace::getSelectedElement() +{ + return SelectedElement; +} +void CGUIEditWorkspace::selectNextSibling() +{ + IGUIElement* p=0; + + if (SelectedElement && SelectedElement->getParent()) + p = SelectedElement->getParent(); + else + p = Parent; + + core::list<IGUIElement*>::ConstIterator it = p->getChildren().begin(); + // find selected element + if (SelectedElement) + while (*it != SelectedElement) + ++it; + if (it !=p->getChildren().end()) + ++it; + // find next non sub-element + while (it != p->getChildren().end() && (*it)->isSubElement()) + ++it; + + if (it != p->getChildren().end()) + setSelectedElement(*it); +} +void CGUIEditWorkspace::selectPreviousSibling() +{ + IGUIElement* p=0; + + if (SelectedElement && SelectedElement->getParent()) + p = SelectedElement->getParent(); + else + p = Parent; + + core::list<IGUIElement*>::ConstIterator it = p->getChildren().getLast(); + // find selected element + if (SelectedElement) + while (*it != SelectedElement) + --it; + if (it != p->getChildren().end()) + --it; + // find next non sub-element + while (it != p->getChildren().end() && (*it)->isSubElement()) + --it; + + if (it != p->getChildren().end()) + setSelectedElement(*it); +} + +//! called if an event happened. +bool CGUIEditWorkspace::OnEvent(const SEvent &e) +{ + IGUIFileOpenDialog* dialog=0; + switch(e.EventType) + { + case ATTRIBEDIT_ATTRIB_CHANGED: + { + switch (e.UserEvent.UserData1) + { + case EGUIEDCE_ATTRIB_EDITOR: + { + // update selected items attributes + if (SelectedElement) + { + SelectedElement->deserializeAttributes(EditorWindow->getAttributeEditor()->getAttribs()); + EditorWindow->updateTree(); + } + return true; + } + case EGUIEDCE_OPTION_EDITOR: + { + // update editor options + deserializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); + return true; + } + case EGUIEDCE_ENV_EDITOR: + { + // update environment + Environment->deserializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); + return true; + } + } + } + break; + + case EET_KEY_INPUT_EVENT: + if (!e.KeyInput.PressedDown) + { + switch (e.KeyInput.Key) + { + case KEY_DELETE: + if (SelectedElement) + { + IGUIElement* el = SelectedElement; + setSelectedElement(0); + MouseOverElement = 0; + el->remove(); + EditorWindow->updateTree(); + } + break; + case KEY_KEY_X: + if (e.KeyInput.Control && SelectedElement) + { + // cut + CopySelectedElementXML(); + // delete element + IGUIElement *el = SelectedElement; + setSelectedElement(0); + MouseOverElement = 0; + el->remove(); + } + break; + case KEY_KEY_C: + // copy + if (e.KeyInput.Control && SelectedElement) + { + CopySelectedElementXML(); + } + break; + case KEY_KEY_V: + // paste + if (e.KeyInput.Control) + { + PasteXMLToSelectedElement(); + } + break; + default: + break; + } + + return true; + } + break; + + case EET_MOUSE_INPUT_EVENT: + + switch(e.MouseInput.Event) + { + case EMIE_MOUSE_WHEEL: + { + f32 wheel = e.MouseInput.Wheel; + + if (wheel > 0) + selectPreviousSibling(); + else + selectNextSibling(); + } + break; + case EMIE_LMOUSE_PRESSED_DOWN: + { + core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); + + IGUIElement* newSelection = getElementFromPoint(p); + + if (newSelection != this && isMyChild(newSelection) ) // redirect event + { + Environment->setFocus(newSelection); + return true; + } + + // hide the gui editor + if (EditorWindow) + EditorWindow->setVisible(false); + + if (CurrentMode == EGUIEDM_SELECT) + { + if (SelectedElement) + { + // start moving or dragging + CurrentMode = getModeFromPos(p); + + if (CurrentMode == EGUIEDM_MOVE) + StartMovePos = SelectedElement->getAbsolutePosition().UpperLeftCorner; + + DragStart = p; + SelectedArea = SelectedElement->getAbsolutePosition(); + } + + if (CurrentMode < EGUIEDM_MOVE) + { + // selecting an element... + MouseOverElement = getEditableElementFromPoint(Parent, p); + + if (MouseOverElement == Parent) + MouseOverElement = 0; + + setSelectedElement(MouseOverElement); + } + } + + break; + } + case EMIE_RMOUSE_PRESSED_DOWN: + if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT || CurrentMode >= EGUIEDM_MOVE) + { + // cancel dragging + CurrentMode = EGUIEDM_SELECT; + } + else + { + DragStart = core::position2di(e.MouseInput.X,e.MouseInput.Y); + // root menu + IGUIContextMenu* mnu = Environment->addContextMenu( + core::rect<s32>(e.MouseInput.X, e.MouseInput.Y, e.MouseInput.Y+100, e.MouseInput.Y+100),this); + mnu->addItem(L"File",-1,true,true); + mnu->addItem(L"Edit",-1,true,true); + mnu->addItem(L"View",-1,true,true); + mnu->addItem(SelectedElement ? L"Add child" : L"Add" ,-1,true,true); + + // file menu + IGUIContextMenu* sub = mnu->getSubMenu(0); + IGUIContextMenu* sub2 =0; + + sub->addItem(L"New", MenuCommandStart + EGUIEDMC_FILE_NEW ); + sub->addItem(L"Load...",MenuCommandStart + EGUIEDMC_FILE_LOAD); + sub->addItem(L"Save...",MenuCommandStart + EGUIEDMC_FILE_SAVE); + + // edit menu + sub = mnu->getSubMenu(1); + sub->addItem(L"Cut (ctrl+x)", MenuCommandStart + EGUIEDMC_CUT_ELEMENT, (SelectedElement != 0)); + sub->addItem(L"Copy (ctrl+c)", MenuCommandStart + EGUIEDMC_COPY_ELEMENT, (SelectedElement != 0)); + sub->addItem(L"Paste (ctrl+v)", MenuCommandStart + EGUIEDMC_PASTE_ELEMENT, + (core::stringc(Environment->getOSOperator()->getTextFromClipboard()) != "")); + sub->addItem(L"Delete (del)", MenuCommandStart + EGUIEDMC_DELETE_ELEMENT, (SelectedElement != 0)); + sub->addSeparator(); + sub->addItem(L"Set parent", MenuCommandStart + EGUIEDMC_SET_PARENT, (SelectedElement != 0)); + sub->addItem(L"Bring to front", MenuCommandStart + EGUIEDMC_BRING_TO_FRONT, (SelectedElement != 0)); + sub->addSeparator(); + sub->addItem(L"Save to XML...", MenuCommandStart + EGUIEDMC_SAVE_ELEMENT, (SelectedElement != 0)); + + sub = mnu->getSubMenu(2); + // view menu + if (EditorWindow) + sub->addItem(EditorWindow->isVisible() ? L"Hide window" : L"Show window", MenuCommandStart + EGUIEDMC_TOGGLE_EDITOR); + + sub = mnu->getSubMenu(3); + + s32 i,j,c=0; + sub->addItem(L"Default factory",-1,true, true); + + // add elements from each factory + for (i=0; u32(i) < Environment->getRegisteredGUIElementFactoryCount(); ++i) + { + sub2 = sub->getSubMenu(i); + + IGUIElementFactory *f = Environment->getGUIElementFactory(i); + + for (j=0; j< f->getCreatableGUIElementTypeCount(); ++j) + { + sub2->addItem(core::stringw(f->getCreateableGUIElementTypeName(j)).c_str(), MenuCommandStart + EGUIEDMC_COUNT + c); + c++; + } + + if (u32(i+1) < Environment->getRegisteredGUIElementFactoryCount()) + { + core::stringw strFact; + strFact = L"Factory "; + strFact += i+1; + sub->addItem(strFact.c_str(),-1, true, true); + } + } + sub->addSeparator(); + sub->addItem(L"From XML...", MenuCommandStart + EGUIEDMC_INSERT_XML); + + // set focus to menu + Environment->setFocus(mnu); + + } + break; + case EMIE_LMOUSE_LEFT_UP: + + // make window visible again + if (EditorWindow) + EditorWindow->setVisible(true); + if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT) + { + if (SelectedElement) + { + MouseOverElement = getEditableElementFromPoint(Parent, + core::position2di(e.MouseInput.X,e.MouseInput.Y)); + if (MouseOverElement) + { + MouseOverElement->addChild(SelectedElement); + setSelectedElement(0); + setSelectedElement(SelectedElement); + } + } + CurrentMode = EGUIEDM_SELECT; + } + else if (CurrentMode >= EGUIEDM_MOVE) + { + IGUIElement *sel = SelectedElement; + // unselect + setSelectedElement(0); + + // move + core::position2d<s32> p(0,0); + if (sel->getParent()) + p = sel->getParent()->getAbsolutePosition().UpperLeftCorner; + + sel->setRelativePosition(SelectedArea - p); + + // select + setSelectedElement(sel); + + // reset selection mode... + CurrentMode = EGUIEDM_SELECT; + } + break; + case EMIE_MOUSE_MOVED: + // always on top + Parent->bringToFront(this); + + // if selecting + if (CurrentMode == EGUIEDM_SELECT || CurrentMode == EGUIEDM_SELECT_NEW_PARENT) + { + + core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); + + // highlight the element that the mouse is over + MouseOverElement = getEditableElementFromPoint(Parent, p); + if (MouseOverElement == Parent) + { + MouseOverElement = 0; + } + + if (CurrentMode == EGUIEDM_SELECT) + { + MouseOverMode = getModeFromPos(p); + if (MouseOverMode > EGUIEDM_MOVE) + { + MouseOverElement = SelectedElement; + } + } + } + else if (CurrentMode == EGUIEDM_MOVE) + { + // get difference + core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); + p -= DragStart; + + // apply to top corner + p = StartMovePos + p; + if (UseGrid) + { + p.X = (p.X/GridSize.Width)*GridSize.Width; + p.Y = (p.Y/GridSize.Height)*GridSize.Height; + } + + SelectedArea += p - SelectedArea.UpperLeftCorner; + } + else if (CurrentMode > EGUIEDM_MOVE) + { + // get difference from start position + core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); + if (UseGrid) + { + p.X = (p.X/GridSize.Width)*GridSize.Width; + p.Y = (p.Y/GridSize.Height)*GridSize.Height; + } + + switch(CurrentMode) + { + case EGUIEDM_RESIZE_T: + SelectedArea.UpperLeftCorner.Y = p.Y; + break; + case EGUIEDM_RESIZE_B: + SelectedArea.LowerRightCorner.Y = p.Y; + break; + case EGUIEDM_RESIZE_L: + SelectedArea.UpperLeftCorner.X = p.X; + break; + case EGUIEDM_RESIZE_R: + SelectedArea.LowerRightCorner.X = p.X; + break; + case EGUIEDM_RESIZE_TL: + SelectedArea.UpperLeftCorner = p; + break; + case EGUIEDM_RESIZE_TR: + SelectedArea.UpperLeftCorner.Y = p.Y; + SelectedArea.LowerRightCorner.X = p.X; + break; + case EGUIEDM_RESIZE_BL: + SelectedArea.UpperLeftCorner.X = p.X; + SelectedArea.LowerRightCorner.Y = p.Y; + break; + case EGUIEDM_RESIZE_BR: + SelectedArea.LowerRightCorner = p; + break; + default: + break; + } + } + + break; + default: + break; + } + break; + + case EET_GUI_EVENT: + switch(e.GUIEvent.EventType) + { + case EGET_TREEVIEW_NODE_SELECT: + { + IGUITreeViewNode* eventnode = ((IGUITreeView*)e.GUIEvent.Caller)->getLastEventNode(); + if(!eventnode->isRoot()) + setSelectedElement((IGUIElement*)(eventnode->getData())); + break; + } + // load a gui file + case EGET_FILE_SELECTED: + dialog = (IGUIFileOpenDialog*)e.GUIEvent.Caller; + Environment->loadGUI(core::stringc(dialog->getFileName()).c_str()); + break; + + case EGET_MENU_ITEM_SELECTED: + { + IGUIContextMenu *menu = (IGUIContextMenu*)e.GUIEvent.Caller; + s32 cmdID = menu->getItemCommandId(menu->getSelectedItem()) - MenuCommandStart; + + IGUIElement* el; + + switch(cmdID) + { + + //! file commands + case EGUIEDMC_FILE_NEW: + // clear all elements belonging to our parent + setSelectedElement(0); + MouseOverElement = 0; + el = Parent; + grab(); + // remove all children + while(Children.end() != el->getChildren().begin()) + el->removeChild(*(el->getChildren().begin())); + // attach to parent again + el->addChild(this); + drop(); + + break; + case EGUIEDMC_FILE_LOAD: + Environment->addFileOpenDialog(L"Please select a GUI file to open", false, this); + break; + case EGUIEDMC_FILE_SAVE: + Environment->saveGUI("guiTest.xml"); + break; + + //! edit menu + case EGUIEDMC_CUT_ELEMENT: + { + CopySelectedElementXML(); + // delete element + el = SelectedElement; + setSelectedElement(0); + MouseOverElement = 0; + el->remove(); + break; + } + case EGUIEDMC_COPY_ELEMENT: + CopySelectedElementXML(); + break; + case EGUIEDMC_PASTE_ELEMENT: + PasteXMLToSelectedElement(); + break; + case EGUIEDMC_DELETE_ELEMENT: + el = SelectedElement; + setSelectedElement(0); + MouseOverElement = 0; + el->remove(); + break; + case EGUIEDMC_SET_PARENT: + CurrentMode = EGUIEDM_SELECT_NEW_PARENT; + break; + case EGUIEDMC_BRING_TO_FRONT: + if (SelectedElement->getParent()) + SelectedElement->getParent()->bringToFront(SelectedElement); + break; + + case EGUIEDMC_SAVE_ELEMENT: + //TODO: add 'save' dialog. + Environment->saveGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); + break; + + //! toggle edit window + case EGUIEDMC_TOGGLE_EDITOR: + break; + + case EGUIEDMC_INSERT_XML: + Environment->loadGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); + break; + + default: + // create element from factory? + if (cmdID >= EGUIEDMC_COUNT) + { + + s32 num = cmdID - EGUIEDMC_COUNT; // get index + // loop through all factories + s32 i, c=Environment->getRegisteredGUIElementFactoryCount(); + for (i=0; i<c && num > Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); ++i) + { + num -= Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); + } + if (num < Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount() ) + { + core::stringc name = Environment->getGUIElementFactory(i)->getCreateableGUIElementTypeName(num); + IGUIElement *parentElement = SelectedElement ? SelectedElement : Environment->getRootGUIElement(); + // add it + IGUIElement *newElement = Environment->getGUIElementFactory(i)->addGUIElement(name.c_str(),parentElement); + if (newElement) + { + core::position2di p = DragStart - parentElement->getAbsolutePosition().UpperLeftCorner; + newElement->setRelativePosition(core::rect<s32>(p,p+core::position2di(100,100))); + //Environment->removeFocus(newElement); + } + } + } + break; + } + EditorWindow->updateTree(); + } + return true; + default: + break; + } + break; + + default: + break; + } + + // even if we didn't absorb the event, + // we never pass events back to the GUI we're editing! + return false; +} + + +//! draws the element and its children +void CGUIEditWorkspace::draw() +{ + video::IVideoDriver *driver = Environment->getVideoDriver(); + + if (DrawGrid) + { + // draw the grid + + core::rect<s32> r = getAbsolutePosition(); + + s32 cy = r.UpperLeftCorner.Y; + while (cy < r.LowerRightCorner.Y) + { + s32 cx = r.UpperLeftCorner.X; + while (cx < r.LowerRightCorner.X) + { + driver->draw2DRectangle(video::SColor(40,0,0,90),core::rect<s32>(cx+1,cy+1,GridSize.Width+cx,GridSize.Height+cy)); + cx += GridSize.Width; + } + cy += GridSize.Height; + } + } + if (MouseOverElement && + MouseOverElement != SelectedElement && + MouseOverElement != Parent) + { + core::rect<s32> r = MouseOverElement->getAbsolutePosition(); + driver->draw2DRectangle(video::SColor(100,0,0,255), r); + } + if (SelectedElement && CurrentMode == EGUIEDM_SELECT) + { + driver->draw2DRectangle(video::SColor(100,0,255,0),SelectedElement->getAbsolutePosition()); + } + if (CurrentMode >= EGUIEDM_MOVE) + { + driver->draw2DRectangle(video::SColor(100,255,0,0),SelectedArea); + } + + if ( (SelectedElement && CurrentMode >= EGUIEDM_MOVE) || + (SelectedElement && MouseOverElement == SelectedElement && MouseOverMode >= EGUIEDM_MOVE) ) + { + // draw handles for moving + EGUIEDIT_MODE m = CurrentMode; + core::rect<s32> r = SelectedArea; + if (m < EGUIEDM_MOVE) + { + m = MouseOverMode; + r = SelectedElement->getAbsolutePosition(); + } + + core::position2di d = core::position2di(4,4); + + TLRect = core::rect<s32>(r.UpperLeftCorner, r.UpperLeftCorner + d ); + TRRect = core::rect<s32>(r.LowerRightCorner.X-4, r.UpperLeftCorner.Y, r.LowerRightCorner.X, r.UpperLeftCorner.Y+4); + TopRect = core::rect<s32>(r.getCenter().X-2, r.UpperLeftCorner.Y,r.getCenter().X+2, r.UpperLeftCorner.Y+4 ); + BLRect = core::rect<s32>(r.UpperLeftCorner.X, r.LowerRightCorner.Y-4, r.UpperLeftCorner.X+4, r.LowerRightCorner.Y); + LRect = core::rect<s32>(r.UpperLeftCorner.X,r.getCenter().Y-2, r.UpperLeftCorner.X+4, r.getCenter().Y+2 ); + RRect = core::rect<s32>(r.LowerRightCorner.X-4,r.getCenter().Y-2, r.LowerRightCorner.X, r.getCenter().Y+2 ); + BRRect = core::rect<s32>(r.LowerRightCorner-d, r.LowerRightCorner); + BRect = core::rect<s32>(r.getCenter().X-2, r.LowerRightCorner.Y-4,r.getCenter().X+2, r.LowerRightCorner.Y ); + + // top left + if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_TL || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), TLRect); + + if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_TR || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), TRRect); + + if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), TopRect); + + if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_BL || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), BLRect); + + if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), LRect); + + if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), RRect); + + if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_BR || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), BRRect ); + + if (m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) + driver->draw2DRectangle(video::SColor(100,255,255,255), BRect); + + + } + + IGUIElement::draw(); +} + + +void CGUIEditWorkspace::setDrawGrid(bool drawGrid) +{ + DrawGrid = drawGrid; +} + +void CGUIEditWorkspace::setGridSize(const core::dimension2di& gridSize) +{ + GridSize = gridSize; + if (GridSize.Width < 2) + GridSize.Width = 2; + if (GridSize.Height < 2) + GridSize.Height = 2; +} + +void CGUIEditWorkspace::setUseGrid(bool useGrid) +{ + UseGrid = useGrid; +} + + +//! Removes a child. +void CGUIEditWorkspace::removeChild(IGUIElement* child) +{ + IGUIElement::removeChild(child); + + if (Children.empty()) + remove(); +} + + +void CGUIEditWorkspace::updateAbsolutePosition() +{ + core::rect<s32> parentRect(0,0,0,0); + + if (Parent) + { + parentRect = Parent->getAbsolutePosition(); + RelativeRect.UpperLeftCorner.X = 0; + RelativeRect.UpperLeftCorner.Y = 0; + RelativeRect.LowerRightCorner.X = parentRect.getWidth(); + RelativeRect.LowerRightCorner.Y = parentRect.getHeight(); + } + + IGUIElement::updateAbsolutePosition(); +} + +void CGUIEditWorkspace::CopySelectedElementXML() +{ + core::stringc XMLText; + core::stringw wXMLText; + // create memory write file + io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); + // save gui to mem file + io::IXMLWriter* xml = Environment->getFileSystem()->createXMLWriter(memWrite); + Environment->writeGUIElement(xml, SelectedElement); + + // copy to clipboard- wide chars not supported yet :( + wXMLText = (wchar_t*)&memWrite->getData()[0]; + u32 i = memWrite->getData().size()/sizeof(wchar_t); + if (wXMLText.size() > i) + wXMLText[i] = L'\0'; + XMLText = wXMLText.c_str(); + memWrite->drop(); + xml->drop(); + Environment->getOSOperator()->copyToClipboard(XMLText.c_str()); +} + +void CGUIEditWorkspace::PasteXMLToSelectedElement() +{ + // get clipboard data + core::stringc XMLText = Environment->getOSOperator()->getTextFromClipboard(); + // convert to stringw + core::stringw wXMLText = XMLText.c_str(); + + io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); + + io::IXMLWriter* xmlw = Environment->getFileSystem()->createXMLWriter(memWrite); + xmlw->writeXMLHeader(); // it needs one of those + xmlw->drop(); + + // write clipboard data + memWrite->write((void*)&wXMLText[0], wXMLText.size() * sizeof(wchar_t)); + + // rewind file + memWrite->seek(0, false); + + // read xml + Environment->loadGUI(memWrite, SelectedElement); + + // reset focus + Environment->setFocus(this); + + // drop the read file + memWrite->drop(); +} + +void CGUIEditWorkspace::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) +{ + out->addBool("DrawGrid", DrawGrid); + out->addBool("UseGrid", UseGrid); + out->addPosition2d("GridSize", core::position2di(GridSize.Width, GridSize.Height)); + out->addInt("MenuCommandStart", MenuCommandStart); +} + +void CGUIEditWorkspace::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + setDrawGrid(in->getAttributeAsBool("DrawGrid")); + setUseGrid(in->getAttributeAsBool("UseGrid")); + + core::position2di tmpp = in->getAttributeAsPosition2d("GridSize"); + core::dimension2di tmpd(tmpp.X, tmpp.Y); + setGridSize(tmpd); + setMenuCommandIDStart(in->getAttributeAsInt("MenuCommandStart")); +} + + +} // end namespace gui +} // end namespace irr + + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.h new file mode 100644 index 0000000..3f21258 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEditWorkspace.h @@ -0,0 +1,168 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUIEDIT_WORKSPACE_H_INCLUDED__ +#define __C_GUIEDIT_WORKSPACE_H_INCLUDED__ + +#include "IGUIElement.h" +#include "CGUIEditWindow.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + //! Adding the GUI Editor Workspace to an element allows you + /** to create, edit, load and save any elements supported + by any loaded factories. + When you add it without a parent (to the root element) + it will also allow you to edit, load and save settings in + the current skin. + */ + + // custom events + enum EGUIEDIT_CUSTOM_EVENTS + { + EGUIEDCE_ATTRIB_EDITOR = MAKE_IRR_ID('g','A','t','t'), + EGUIEDCE_OPTION_EDITOR = MAKE_IRR_ID('g','O','p','t'), + EGUIEDCE_ENV_EDITOR = MAKE_IRR_ID('g','E','n','v') + }; + + class CGUIEditWorkspace : public IGUIElement + { + public: + + //! constructor + CGUIEditWorkspace(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); + + //! destructor + ~CGUIEditWorkspace(); + + //! called if an event happened. + virtual bool OnEvent(const SEvent &event); + + //! Removes a child. + virtual void removeChild(IGUIElement* child); + + //! draws the element and its children + virtual void draw(); + + //! Updates the absolute position. + virtual void updateAbsolutePosition(); + + //! Sets the menu command id's + /** The GUI editor defaults to command ID's from 0xED17 to 0xED17+EGUIEDMC_COUNT + In the rare case that these are already in use and you wish to use menus + while the editor is present you can set a new offset here. + */ + virtual void setMenuCommandIDStart(s32 id); + + //! grid drawing... + virtual void setDrawGrid(bool drawGrid); + virtual void setGridSize(const core::dimension2di& gridSize); + virtual void setUseGrid(bool useGrid); + + //! returns the first editable element under the mouse + virtual IGUIElement* getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index=0 ); + + //! selecting elements + virtual void setSelectedElement(IGUIElement *sel); + virtual void selectNextSibling(); + virtual void selectPreviousSibling(); + + //! returns the selected element + virtual IGUIElement* getSelectedElement(); + + //! copies the xml of the selected element and all children to the clipboard + virtual void CopySelectedElementXML(); + + //! copies the xml of the selected element and all children to the clipboard + virtual void PasteXMLToSelectedElement(); + + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_GUIEDIT]; + } + + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + + private: + + enum EGUIEDIT_MODE + { + // when we are currently selecting an element + EGUIEDM_SELECT=0, + // selecting a new parent for the selected element + EGUIEDM_SELECT_NEW_PARENT, + + // moving the selected element + EGUIEDM_MOVE, + // resizing the selected element + EGUIEDM_RESIZE_TL, + EGUIEDM_RESIZE_T, + EGUIEDM_RESIZE_TR, + EGUIEDM_RESIZE_R, + EGUIEDM_RESIZE_BR, + EGUIEDM_RESIZE_B, + EGUIEDM_RESIZE_BL, + EGUIEDM_RESIZE_L + }; + + enum EGUIEDIT_MENUCOMMANDS + { + //! file commands + EGUIEDMC_FILE_NEW, + EGUIEDMC_FILE_LOAD, + EGUIEDMC_FILE_SAVE, + //! edit menu + EGUIEDMC_CUT_ELEMENT, + EGUIEDMC_COPY_ELEMENT, + EGUIEDMC_PASTE_ELEMENT, + EGUIEDMC_DELETE_ELEMENT, + EGUIEDMC_SET_PARENT, + EGUIEDMC_BRING_TO_FRONT, + EGUIEDMC_SAVE_ELEMENT, + //! grid + EGUIEDMC_TOGGLE_EDITOR, + + EGUIEDMC_INSERT_XML, + + //! number of menu options + EGUIEDMC_COUNT + }; + + EGUIEDIT_MODE getModeFromPos(core::position2di p); + + EGUIEDIT_MODE CurrentMode; + EGUIEDIT_MODE MouseOverMode; + core::position2di DragStart; + core::position2di StartMovePos; + core::rect<s32> SelectedArea; + + core::dimension2di GridSize; + s32 MenuCommandStart; + bool DrawGrid, UseGrid; + + IGUIElement *MouseOverElement, + *SelectedElement; + CGUIEditWindow *EditorWindow; + + core::rect<s32> TLRect; + core::rect<s32> TRRect; + core::rect<s32> TopRect; + core::rect<s32> BLRect; + core::rect<s32> LRect; + core::rect<s32> RRect; + core::rect<s32> BRRect; + core::rect<s32> BRect; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEnumAttribute.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEnumAttribute.h new file mode 100644 index 0000000..9e3958d --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIEnumAttribute.h @@ -0,0 +1,114 @@ +#ifndef __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ +#define __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ + +#include "CGUIAttribute.h" +#include "IGUIComboBox.h" +#include "IGUIEditBox.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + class CGUIEnumAttribute : public CGUIAttribute + { + public: + // + CGUIEnumAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : + CGUIAttribute(environment, parent, myParentID), + AttribComboBox(0), AttribEditBox(0) + { + + } + + virtual ~CGUIEnumAttribute() + { + if (AttribComboBox) + AttribComboBox->drop(); + if (AttribEditBox) + AttribEditBox->drop(); + } + + // save the attribute and possibly post the event to its parent + virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) + { + + if (AttribComboBox) + { + AttribComboBox->remove(); + AttribComboBox->drop(); + AttribComboBox = 0; + } + + if (AttribEditBox) + { + AttribEditBox->remove(); + AttribEditBox->drop(); + AttribEditBox = 0; + } + + core::array<core::stringc> outLiterals; + attribs->getAttributeEnumerationLiteralsOfEnumeration(attribIndex, outLiterals); + + core::rect<s32> r = getAbsolutePosition(); + core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, + r.getWidth() - 5, + Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 20 ); + + if (outLiterals.size() > 0) + { + AttribComboBox = Environment->addComboBox(r2, this, -1); + for (u32 i=0; i<outLiterals.size(); ++i) + AttribComboBox->addItem( core::stringw(outLiterals[i].c_str()).c_str()); + + AttribComboBox->setSelected( attribs->getAttributeAsInt(attribIndex) ); + + AttribComboBox->grab(); + AttribComboBox->setSubElement(true); + AttribComboBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + } + else + { + + AttribEditBox = Environment->addEditBox( + attribs->getAttributeAsStringW(attribIndex).c_str(), + r2, true, this, -1); + AttribEditBox->grab(); + AttribEditBox->setSubElement(true); + AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + } + + CGUIAttribute::setAttrib(attribs, attribIndex); + } + + //! save the attribute and possibly post the event to its parent + virtual bool updateAttrib(bool sendEvent=true) + { + if (!Attribs) + return true; + + if (AttribComboBox) + Attribs->setAttribute(Index, AttribComboBox->getText()); + else if (AttribEditBox) + Attribs->setAttribute(Index, AttribEditBox->getText()); + + return CGUIAttribute::updateAttrib(sendEvent); + } + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE]; + } + + private: + IGUIComboBox* AttribComboBox; + IGUIEditBox* AttribEditBox; + }; + +} // namespace gui +} // namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.cpp new file mode 100644 index 0000000..4135b7a --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.cpp @@ -0,0 +1,340 @@ +// Copyright 2006-2012 Asger Feldthaus +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +/* + Originally Klasker's but I've messed around with it lots - Gaz +*/ + +#include "CGUIPanel.h" +#include "IGUIEnvironment.h" +#include "IGUIScrollBar.h" +#include "IGUITabControl.h" +#include "IVideoDriver.h" + +const int SCROLL_BAR_SIZE = 16; // Scroll bars are 16 pixels wide +const int BORDER_WIDTH = 2; + +namespace irr +{ +namespace gui +{ + +CGUIPanel::CGUIPanel(IGUIEnvironment* environment, IGUIElement* parent, s32 id, const core::rect<s32>& rectangle, + bool border, E_SCROLL_BAR_MODE vMode, E_SCROLL_BAR_MODE hMode) + : IGUIElement(EGUIET_ELEMENT, environment, parent, id, rectangle), + VScrollBar(0), HScrollBar(0), ClipPane(0), InnerPane(0), + VScrollBarMode(vMode), HScrollBarMode(hMode), NeedsUpdate(true), Border(border) +{ + #ifdef _DEBUG + setDebugName("CGUIPanel"); + #endif + + s32 width = rectangle.getWidth(); + s32 height = rectangle.getHeight(); + + core::rect<s32> rct = core::rect<s32>(width - SCROLL_BAR_SIZE,0, width, height); + + VScrollBar = environment->addScrollBar(false, rct, 0, id); + VScrollBar->setSubElement(true); + VScrollBar->setTabStop(false); + VScrollBar->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + VScrollBar->grab(); + IGUIElement::addChild(VScrollBar); + + rct = core::rect<s32>(0, height - SCROLL_BAR_SIZE, width - SCROLL_BAR_SIZE,height ); + + HScrollBar = environment->addScrollBar(true, rct, 0, id); + HScrollBar->setSubElement(true); + HScrollBar->setTabStop(false); + HScrollBar->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); + HScrollBar->grab(); + IGUIElement::addChild(HScrollBar); + + rct = core::rect<s32>(0,0, width - SCROLL_BAR_SIZE, height - SCROLL_BAR_SIZE); + + ClipPane = environment->addTab( rct, 0, -1); + ClipPane->setSubElement(true); + ClipPane->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + ClipPane->grab(); + IGUIElement::addChild(ClipPane); + + InnerPane = environment->addTab(rct, ClipPane, -1); + InnerPane->setSubElement(true); + InnerPane->grab(); + + calculateClientArea(); + resizeInnerPane(); +} + +CGUIPanel::~CGUIPanel() +{ + // because the inner pane has the list of children, we need to remove the outer ones manually + IGUIElement::removeChild(VScrollBar); + IGUIElement::removeChild(HScrollBar); + IGUIElement::removeChild(ClipPane); + + // now we can drop the others + VScrollBar->drop(); + HScrollBar->drop(); + ClipPane->drop(); + InnerPane->drop(); +} + + +void CGUIPanel::draw() +{ + if (NeedsUpdate) + { + calculateClientArea(); + resizeInnerPane(); + NeedsUpdate = false; + } + + IGUISkin* skin = Environment->getSkin(); + if (Border && skin) + { + skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect ); + } + + IGUIElement::draw(); +} + +void CGUIPanel::addChild(IGUIElement *child) +{ + // add the child to the inner pane + InnerPane->addChild(child); + + NeedsUpdate = true; +} + +void CGUIPanel::removeChild(IGUIElement *child) +{ + InnerPane->removeChild(child); + + NeedsUpdate = true; +} + +//! returns children of the inner pane +const core::list<IGUIElement*>& CGUIPanel::getChildren() +{ + return InnerPane->getChildren(); +} + +bool CGUIPanel::hasBorder() const +{ + return Border; +} + +void CGUIPanel::setBorder( bool enabled ) +{ + Border = enabled; +} + +IGUIScrollBar* CGUIPanel::getVScrollBar() const +{ + return VScrollBar; +} + +IGUIScrollBar* CGUIPanel::getHScrollBar() const +{ + return HScrollBar; +} + +E_SCROLL_BAR_MODE CGUIPanel::getVScrollBarMode() const +{ + return VScrollBarMode; +} + +void CGUIPanel::setVScrollBarMode( E_SCROLL_BAR_MODE mode ) +{ + VScrollBarMode = mode; + NeedsUpdate = true; +} + +E_SCROLL_BAR_MODE CGUIPanel::getHScrollBarMode() const +{ + return HScrollBarMode; +} + +void CGUIPanel::setHScrollBarMode(E_SCROLL_BAR_MODE mode) +{ + HScrollBarMode = mode; + NeedsUpdate = true; +} + +bool CGUIPanel::OnEvent(const SEvent &event) +{ + // Redirect mouse wheel to scrollbar + if (event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL) + { + if (VScrollBar->isVisible()) + { + Environment->setFocus(VScrollBar); + VScrollBar->OnEvent(event); + return true; + } + else if (VScrollBar->isVisible()) + { + Environment->setFocus(HScrollBar); + HScrollBar->OnEvent(event); + return true; + } + } + else + { + if (event.EventType == EET_GUI_EVENT && event.GUIEvent.EventType == EGET_SCROLL_BAR_CHANGED && + (event.GUIEvent.Caller == HScrollBar || event.GUIEvent.Caller == VScrollBar) ) + { + moveInnerPane(); + + return true; + } + } + + return IGUIElement::OnEvent(event); +} + +void CGUIPanel::moveInnerPane() +{ + core::dimension2d<s32> dim = InnerPane->getAbsolutePosition().getSize(); + core::position2d<s32> newpos(HScrollBar->isVisible() ? -HScrollBar->getPos() : 0 , VScrollBar->isVisible() ? -VScrollBar->getPos() : 0); + core::rect<s32> r(newpos, newpos + dim); + InnerPane->setRelativePosition(r); +} + + +void CGUIPanel::updateAbsolutePosition() +{ + IGUIElement::updateAbsolutePosition(); + calculateClientArea(); + resizeInnerPane(); +} + + +void CGUIPanel::resizeInnerPane() +{ + if (!HScrollBar || !VScrollBar || !InnerPane || !ClipPane) + return; + + // get outer pane size + core::rect<s32> outerRect = ClipPane->getRelativePosition(); + + // resize flexible children depending on outer pane + InnerPane->setRelativePosition(outerRect); + + // get desired size (total size of all children) + core::rect<s32> totalRect(0, 0, 0, 0); + + core::list<IGUIElement*>::ConstIterator it; + + for (it = InnerPane->getChildren().begin(); + it != InnerPane->getChildren().end(); ++it) + { + core::rect<s32> rct = (*it)->getRelativePosition(); + totalRect.addInternalPoint(rct.UpperLeftCorner); + totalRect.addInternalPoint(rct.LowerRightCorner); + } + + // move children if pane needs to grow + core::position2di adjustedMovement(0,0); + + if (totalRect.UpperLeftCorner.X < 0) + adjustedMovement.X = -totalRect.UpperLeftCorner.X; + if (totalRect.UpperLeftCorner.Y < 0) + adjustedMovement.Y = -totalRect.UpperLeftCorner.Y; + + if (adjustedMovement.X > 0 || adjustedMovement.Y > 0) + { + totalRect += adjustedMovement; + + for (it = InnerPane->getChildren().begin(); + it != InnerPane->getChildren().end(); ++it ) + { + (*it)->move(adjustedMovement); + } + } + + // make sure the inner pane is at least as big as the outer + if (totalRect.getWidth() < outerRect.getWidth()) + { + totalRect.UpperLeftCorner.X = 0; + totalRect.LowerRightCorner.X = outerRect.getWidth(); + } + if (totalRect.getHeight() < outerRect.getHeight()) + { + totalRect.UpperLeftCorner.Y = 0; + totalRect.LowerRightCorner.Y = outerRect.getHeight(); + } + + InnerPane->setRelativePosition(totalRect); + + // scrollbars + if ( HScrollBarMode != ESBM_ALWAYS_INVISIBLE && + (totalRect.getWidth() > outerRect.getWidth() || HScrollBarMode == ESBM_ALWAYS_VISIBLE) ) + { + HScrollBar->setVisible(true); + HScrollBar->setMax(totalRect.getWidth() - outerRect.getWidth()); + bringToFront(HScrollBar); + } + else + HScrollBar->setVisible(false); + + if ( VScrollBarMode != ESBM_ALWAYS_INVISIBLE && + (totalRect.getHeight() > outerRect.getHeight() || VScrollBarMode == ESBM_ALWAYS_VISIBLE) ) + { + VScrollBar->setVisible(true); + VScrollBar->setMax(totalRect.getHeight() - outerRect.getHeight()); + bringToFront(VScrollBar); + } + else + VScrollBar->setVisible(false); + + // move to adjust for scrollbar pos + moveInnerPane(); +} + +void CGUIPanel::calculateClientArea() +{ + core::rect<s32> ClientArea(0,0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight()); + + if (VScrollBar->isVisible()) + ClientArea.LowerRightCorner.X -= VScrollBar->getRelativePosition().getWidth(); + + if (HScrollBar->isVisible()) + ClientArea.LowerRightCorner.Y -= HScrollBar->getRelativePosition().getHeight(); + + if (Border) + { + ClientArea.UpperLeftCorner += core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); + ClientArea.LowerRightCorner -= core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); + } + + ClipPane->setRelativePosition(ClientArea); +} + +core::rect<s32> CGUIPanel::getClientArea() const +{ + return ClipPane->getRelativePosition(); +} + +void CGUIPanel::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) +{ + IGUIElement::serializeAttributes(out, options); + + out->addBool("border", Border); + out->addEnum("horizontalScrollBar", HScrollBarMode, GUIScrollBarModeNames ); + out->addEnum("verticalScrollBar", VScrollBarMode, GUIScrollBarModeNames ); +} + +void CGUIPanel::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) +{ + IGUIElement::deserializeAttributes(in, options); + + setBorder(in->getAttributeAsBool("border")); + setHScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("horizontalScrollBar", GUIScrollBarModeNames)); + setVScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("verticalScrollBar", GUIScrollBarModeNames)); +} + +} // namespace gui +} // namespace irr diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.h new file mode 100644 index 0000000..cb6f79a --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIPanel.h @@ -0,0 +1,128 @@ +// Copyright 2006-2012 Asger Feldthaus +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef _C_GUI_PANEL_H_ +#define _C_GUI_PANEL_H_ + +#include "IGUIElement.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + +class IGUIScrollBar; +class IGUITab; + +enum E_SCROLL_BAR_MODE +{ + //! The scrollbar will only show up when needed. + ESBM_AUTOMATIC = 0, + + //! The scrollbar will never be visible. + ESBM_ALWAYS_INVISIBLE, + + //! The scrollbar will always the visible. + ESBM_ALWAYS_VISIBLE, + + //! just a count of how many are in this enum + ESBM_COUNT +}; + +const c8* const GUIScrollBarModeNames[] = +{ + "automatic", + "alwaysInvisible", + "alwaysVisible", + 0 +}; + +class CGUIPanel : public IGUIElement +{ +public: + CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1, + const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100), + bool border=false, + E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC, + E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE ); + + virtual ~CGUIPanel(); + + //! draws the panel and its children + virtual void draw(); + + //! returns true if it has a border, false if not + bool hasBorder() const; + + //! sets whether the element draws a border + void setBorder(bool enabled); + + //! returns a pointer to the vertical scrollbar + IGUIScrollBar* getVScrollBar() const; + + //! returns a pointer to the horizontal scrollbar + IGUIScrollBar* getHScrollBar() const; + + //! returns the vertical scrollbar visibility rule + E_SCROLL_BAR_MODE getVScrollBarMode() const; + + //! sets the vertical scrollbar visibility rule + void setVScrollBarMode(E_SCROLL_BAR_MODE mode); + + //! returns the horizontal scrollbar visibility rule + E_SCROLL_BAR_MODE getHScrollBarMode() const; + + //! sets the horizontal scrollbar visibility rule + void setHScrollBarMode(E_SCROLL_BAR_MODE mode); + + //! returns the visible area inside the panel, excluding scrollbar and border + core::rect<s32> getClientArea() const; + + virtual bool OnEvent(const SEvent &event); + + //! adds a child to the panel + virtual void addChild(IGUIElement* child); + + //! removes a child from the panel + virtual void removeChild(IGUIElement* child); + + //! updates the absolute position + virtual void updateAbsolutePosition(); + + //! returns children of the inner pane + virtual const core::list<IGUIElement*>& getChildren(); + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL]; + } + + virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); + virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); + +protected: + void moveInnerPane(); + void resizeInnerPane(); + void calculateClientArea(); + +private: + + IGUIScrollBar* VScrollBar; + IGUIScrollBar* HScrollBar; + IGUITab* ClipPane; + IGUITab* InnerPane; + + E_SCROLL_BAR_MODE VScrollBarMode; + E_SCROLL_BAR_MODE HScrollBarMode; + + bool NeedsUpdate; + bool Border; +}; + +} // namespace gui +} // namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIStringAttribute.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIStringAttribute.h new file mode 100644 index 0000000..af9ac03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUIStringAttribute.h @@ -0,0 +1,70 @@ +#ifndef __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ +#define __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ + +#include "CGUIAttribute.h" +#include "IGUIEditBox.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + class CGUIStringAttribute : public CGUIAttribute + { + public: + // + CGUIStringAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : + CGUIAttribute(environment, parent, myParentID), + AttribEditBox(0) + { + core::rect<s32> r = getAbsolutePosition(); + core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, + r.getWidth() - 5, + Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); + + AttribEditBox = environment->addEditBox(0, r2, true, this, -1); + AttribEditBox->grab(); + AttribEditBox->setSubElement(true); + AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + + } + + virtual ~CGUIStringAttribute() + { + if (AttribEditBox) + AttribEditBox->drop(); + } + + virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) + { + AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); + CGUIAttribute::setAttrib(attribs, attribIndex); + } + + //! save the attribute and possibly post the event to its parent + virtual bool updateAttrib(bool sendEvent=true) + { + if (!Attribs) + return true; + + Attribs->setAttribute(Index, AttribEditBox->getText()); + AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); + + return CGUIAttribute::updateAttrib(sendEvent); + } + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE]; + } + + private: + IGUIEditBox* AttribEditBox; + }; + +} // namespace gui +} // namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureAttribute.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureAttribute.h new file mode 100644 index 0000000..6a4fef2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureAttribute.h @@ -0,0 +1,140 @@ +#ifndef __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ +#define __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ + +#include "CGUIAttribute.h" +#include "IGUIEditBox.h" +#include "IGUIImage.h" +#include "IGUIButton.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + class CGUITextureAttribute : public CGUIAttribute + { + public: + // + CGUITextureAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : + CGUIAttribute(environment, parent, myParentID), + AttribEditBox(0), AttribImage(0), AttribButton(0) + { + IGUISkin* skin = Environment->getSkin(); + + core::rect<s32> r = getAbsolutePosition(); + s32 topy = skin->getFont()->getDimension(L"A").Height + 10; + s32 h = skin->getFont()->getDimension(L"A").Height + 5; + + AttribImage = environment->addImage(0, core::position2di(0, topy), false, this); + AttribImage->setRelativePosition( core::rect<s32>(0,topy, r.getWidth() - 5, 100+topy)); + AttribImage->grab(); + AttribImage->setSubElement(true); + AttribImage->setScaleImage(true); + AttribImage->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + + topy += 105; + + core::rect<s32> r2(0, topy, r.getWidth() - 15 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy + h); + core::rect<s32> br(r.getWidth() - 10 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy, r.getWidth(), topy + h); + + AttribEditBox = environment->addEditBox(0, r2, true, this, -1); + AttribEditBox->grab(); + AttribEditBox->setSubElement(true); + AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + + AttribButton = environment->addButton(br, this, -1, L"..."); + AttribButton->grab(); + AttribButton->setSubElement(true); + AttribButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + //AttribButton->setSpriteBank(skin->getSpriteBank()); + //AttribButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL)); + //AttribButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL), true); + } + + virtual ~CGUITextureAttribute() + { + if (AttribEditBox) + AttribEditBox->drop(); + if (AttribImage) + AttribImage->drop(); + if (AttribButton) + AttribButton->drop(); + } + + virtual bool OnEvent(const SEvent &e) + { + + if (IsEnabled) + { + switch (e.EventType) + { + case EET_GUI_EVENT: + switch (e.GUIEvent.EventType) + { + case EGET_BUTTON_CLICKED: + // button click: open file dialog + if (e.GUIEvent.Caller == AttribButton) + { + //Environment->addGUIElement("textureBrowser", Environment->getRootGUIElement()); + return true; + } + break; + case EGET_FILE_SELECTED: + // file selected: change editbox value and set event + + return true; + case EGET_FILE_CHOOSE_DIALOG_CANCELLED: + + return true; + default: + break; + } + break; + case EET_KEY_INPUT_EVENT: + return true; + default: + break; + } + } + return CGUIAttribute::OnEvent(e); + } + + virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) + { + AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); + AttribImage->setImage(attribs->getAttributeAsTexture(Index)); + + CGUIAttribute::setAttrib(attribs, attribIndex); + } + + //! save the attribute and possibly post the event to its parent + virtual bool updateAttrib(bool sendEvent=true) + { + if (!Attribs) + return true; + + Attribs->setAttribute(Index, AttribEditBox->getText()); + core::stringw tmp = Attribs->getAttributeAsStringW(Index); + AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); + AttribImage->setImage(Attribs->getAttributeAsTexture(Index)); + + return CGUIAttribute::updateAttrib(sendEvent); + } + + //! Returns the type name of the gui element. + virtual const c8* getTypeName() const + { + return GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE]; + } + + private: + IGUIEditBox* AttribEditBox; + IGUIImage* AttribImage; + IGUIButton* AttribButton; + }; + +} // namespace gui +} // namespace irr + +#endif diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.cpp new file mode 100644 index 0000000..bac5233 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.cpp @@ -0,0 +1,336 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CGUITextureCacheBrowser.h" +#include "IGUIEnvironment.h" +#include "IGUIButton.h" +#include "IGUISkin.h" +#include "IGUIFont.h" +#include "IVideoDriver.h" + +namespace irr +{ +namespace gui +{ + +CGUITextureCacheBrowser::CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id, IGUIElement *parent) +: IGUIWindow(environment, parent, id, core::rect<s32>(0,0,300,200)), + CloseButton(0), Panel(0), SelectedTexture(-1), Dragging(false), IsDraggable(true) +{ + #ifdef _DEBUG + setDebugName("CGUITextureCacheBrowser"); + #endif + + IGUISkin* skin = 0; + IGUISpriteBank* sprites = 0; + video::SColor color(255,255,255,255); + + if (environment) + skin = environment->getSkin(); + + s32 buttonw = 15; + if (skin) + { + buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); + sprites = skin->getSpriteBank(); + color = skin->getColor(EGDC_WINDOW_SYMBOL); + } + s32 posx = RelativeRect.getWidth() - buttonw - 4; + + CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, + L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" ); + CloseButton->setSubElement(true); + CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); + if (sprites) + { + CloseButton->setSpriteBank(sprites); + CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); + CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color); + } + + CloseButton->grab(); + + // window title + Text = L"Texture Browser"; + + // panel element + Panel = new CGUIPanel(environment, this); + Panel->setRelativePosition( core::rect<s32>(1, buttonw + 5, 151, RelativeRect.getHeight() - 1)); + Panel->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); + Panel->setBorder(true); + Panel->setSubElement(true); + + // some buttons + + + // add images from texture cache + updateImageList(); + +} + +CGUITextureCacheBrowser::~CGUITextureCacheBrowser() +{ + if (CloseButton) + CloseButton->drop(); + if (Panel) + Panel->drop(); + + // drop images + u32 i; + for (i=0; i<Images.size(); ++i) + { + Images[i]->drop(); + Images[i]->remove(); + } + Images.clear(); +} +void CGUITextureCacheBrowser::updateImageList() +{ + if (!Panel) + return; + + video::IVideoDriver* Driver = Environment->getVideoDriver(); + + // clear images + u32 i; + for (i=0; i<Images.size(); ++i) + { + Images[i]->drop(); + Images[i]->remove(); + } + Images.clear(); + + u32 count = (u32)Driver->getTextureCount(); + + s32 h = Panel->getClientArea().getWidth()-10; + s32 hw = h/2; + core::rect<s32> pos(Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X - hw, 5, + Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X + hw, h+5); + + core::position2di moveDist(0, h+5); + + for (u32 i=0; i<count; ++i) + { + core::stringw details; + video::ITexture* tex = Driver->getTextureByIndex(i); + details = L"File name: "; + details += tex->getName(); + details += L"\nFormat: "; + video::ECOLOR_FORMAT cf = tex->getColorFormat(); + + bool alpha = false; + + switch (cf) + { + case video::ECF_A1R5G5B5: + details += L"A1R5G5B5 (16-bit with 1-bit alpha channel)\n"; + alpha = true; + break; + case video::ECF_R5G6B5: + details += L"R5G6B5 (16-bit, no alpha channel)\n"; + break; + case video::ECF_R8G8B8: + details += L"R8G8B8 (16-bit, no alpha channel)\n"; + break; + case video::ECF_A8R8G8B8: + details += L"R8G8B8 (32-bit with 8-bit alpha channel)\n"; + alpha = true; + break; + default: + details += L"Unknown\n"; + } + + core::dimension2du osize = tex->getOriginalSize(); + core::dimension2du size = tex->getOriginalSize(); + + details += "Size: "; + details += size.Width; + details += "x"; + details += size.Height; + + if (osize != size) + { + details += "\nOriginal Size: "; + details += osize.Width; + details += "x"; + details += osize.Height; + } + + details += L"\nMip-maps: "; + + if (tex->hasMipMaps()) + details += L"Yes\n"; + else + details += L"No\n"; + + IGUIImage* img = Environment->addImage(tex, core::position2di(1,1), alpha, Panel, i); + img->grab(); + Images.push_back(img); + img->setRelativePosition(pos); + img->setToolTipText(details.c_str()); + img->setScaleImage(true); + img->setColor( SelectedTexture == (s32)i ? video::SColor(255,255,255,255) : video::SColor(128,128,128,128) ); + + pos = pos + moveDist; + } +} + +void CGUITextureCacheBrowser::updateAbsolutePosition() +{ + IGUIWindow::updateAbsolutePosition(); + updateImageList(); +} + +//! called if an event happened. +bool CGUITextureCacheBrowser::OnEvent(const SEvent &event) +{ + switch(event.EventType) + { + case EET_GUI_EVENT: + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + if (event.GUIEvent.Caller == (IGUIElement*)this) + Dragging = false; + return true; + } + else + if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) + { + if (event.GUIEvent.Caller == CloseButton) + { + remove(); + return true; + } + } + break; + case EET_MOUSE_INPUT_EVENT: + switch(event.MouseInput.Event) + { + case EMIE_LMOUSE_PRESSED_DOWN: + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + + if (getElementFromPoint(DragStart) == this) + { + if (!Environment->hasFocus(this)) + { + Dragging = IsDraggable; + //Environment->setFocus(this); + if (Parent) + Parent->bringToFront(this); + } + return true; + } + else + { + if (Panel->getAbsolutePosition().isPointInside(DragStart)) + { + // select an image + IGUIElement* el = Panel->getElementFromPoint(DragStart); + if (el && el != Panel) + { + if (el->getType() == EGUIET_IMAGE) + { + setSelected(el->getID()); + } + } + else + { + setSelected(); + } + } + } + break; + case EMIE_LMOUSE_LEFT_UP: + Dragging = false; + //Environment->removeFocus(this); + return true; + case EMIE_MOUSE_MOVED: + if (Dragging) + { + // gui window should not be dragged outside its parent + if (Parent) + if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || + event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || + event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || + event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) + + return true; + + + move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); + DragStart.X = event.MouseInput.X; + DragStart.Y = event.MouseInput.Y; + return true; + } + break; + default: + break; + } + default: + break; + } + + return Parent ? Parent->OnEvent(event) : false; +} + +void CGUITextureCacheBrowser::setSelected(s32 index) +{ + SelectedTexture = index; + updateImageList(); + printf("Texture %d selected\n", index); +} + +void CGUITextureCacheBrowser::draw() +{ + if (!IsVisible) + return; + + IGUISkin* skin = Environment->getSkin(); + + core::rect<s32> rect = AbsoluteRect; + core::rect<s32> *cl = &AbsoluteClippingRect; + + // draw body fast + rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), + AbsoluteRect, &AbsoluteClippingRect); + + // draw window text + if (Text.size()) + { + rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); + rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); + rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; + + IGUIFont* font = skin->getFont(); + if (font) + font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, cl); + } + + IGUIElement::draw(); +} + + +bool CGUITextureCacheBrowser::isDraggable() const +{ + return IsDraggable; +} + +void CGUITextureCacheBrowser::setDraggable(bool draggable) +{ + IsDraggable = draggable; + + if (Dragging && !IsDraggable) + Dragging = false; +} + + +//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) +core::rect<s32> CGUITextureCacheBrowser::getClientRect() const +{ + return core::recti(); +} + +} // namespace gui +} // namespace irr diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.h new file mode 100644 index 0000000..108d4d6 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CGUITextureCacheBrowser.h @@ -0,0 +1,88 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ +#define __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ + +#include "IGUIWindow.h" +#include "CGUIPanel.h" +#include "IGUIImage.h" +#include "EGUIEditTypes.h" + +namespace irr +{ +namespace gui +{ + + //! Texture cache browser + + const u32 TEXTURE_BROWSER_TEXTURE_SELECTED = 0x5E1EC7ED; // custom event number for texture selected + + class CGUITextureCacheBrowser : public IGUIWindow + { + public: + + //! constructor + CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); + + //! destructor + ~CGUITextureCacheBrowser(); + + //! event handler + virtual bool OnEvent(const SEvent &event); + + //! draws the element + virtual void draw(); + + //! update absolute position + virtual void updateAbsolutePosition(); + + //! this shoudln't be serialized, but this is included as it's an example + virtual const c8* getTypeName() const { return "textureCacheBrowser"; } + + //! Returns pointer to the close button + virtual IGUIButton* getCloseButton() const { return CloseButton; } + + //! Returns pointer to the minimize button + virtual IGUIButton* getMinimizeButton() const { return 0;} + + //! Returns pointer to the maximize button + virtual IGUIButton* getMaximizeButton() const { return 0;} + + //! get draggable + virtual bool isDraggable() const; + + //! get draggable + virtual void setDraggable(bool draggable); + + //! not used + virtual core::rect<s32> getClientRect() const; + virtual void setDrawBackground(bool draw) { } + virtual bool getDrawBackground() const { return true; } + virtual void setDrawTitlebar(bool draw) { } + virtual bool getDrawTitlebar() const { return true; } + + + void setSelected(s32 index=-1); + + private: + + void updateImageList(); + + core::array<IGUIImage*> Images; + core::position2d<s32> DragStart; + + IGUIButton* CloseButton; + CGUIPanel* Panel; + s32 SelectedTexture; + bool Dragging; + bool IsDraggable; + }; + + +} // end namespace gui +} // end namespace irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.cpp new file mode 100644 index 0000000..0a69587 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.cpp @@ -0,0 +1,95 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#include "CMemoryReadWriteFile.h" + +using namespace irr; +using namespace io; + +CMemoryReadWriteFile::CMemoryReadWriteFile(const c8* filename) +: Data(), FileName(filename), Pos(0) +{ +} + + +s32 CMemoryReadWriteFile::write(const void* buffer, u32 sizeToWrite) +{ + // no point in writing 0 bytes + if (sizeToWrite < 1) + return 0; + + // expand size + if (Pos + sizeToWrite > Data.size()) + Data.set_used(Pos+sizeToWrite); + + // copy data + memcpy( (void*) &Data[Pos], buffer, (size_t) sizeToWrite); + + Pos += sizeToWrite; + + return sizeToWrite; + +} + +bool CMemoryReadWriteFile::seek(long finalPos, bool relativeMovement) +{ + if (relativeMovement) + { + if (finalPos + Pos < 0) + return 0; + else + Pos += finalPos; + } + else + { + Pos = finalPos; + } + + if (Pos > (s32)Data.size()) + Data.set_used(Pos+1); + + return true; + +} + +const io::path& CMemoryReadWriteFile::getFileName() const +{ + return FileName; +} + +long CMemoryReadWriteFile::getPos() const +{ + return Pos; +} + +core::array<c8>& CMemoryReadWriteFile::getData() +{ + return Data; +} + + +long CMemoryReadWriteFile::getSize() const +{ + return Data.size(); +} + + +s32 CMemoryReadWriteFile::read(void* buffer, u32 sizeToRead) +{ + // cant read past the end + if (Pos + sizeToRead >= Data.size()) + sizeToRead = Data.size() - Pos; + + // cant read 0 bytes + if (!sizeToRead) + return 0; + + // copy data + memcpy( buffer, (void*) &Data[Pos], (size_t) sizeToRead); + + Pos += sizeToRead; + + return sizeToRead; +} + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.h new file mode 100644 index 0000000..de20ae7 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/CMemoryReadWriteFile.h @@ -0,0 +1,73 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ +#define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ + +#include "IWriteFile.h" +#include "IReadFile.h" +#include "irrArray.h" +#include "irrString.h" +#include "memory.h" + +namespace irr +{ +namespace io +{ + + //! Provides write acess to an array as if it is a file. + class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile + { + public: + + CMemoryReadWriteFile(const c8* filename=0); + + //! Reads an amount of bytes from the file. + //! \param buffer: Pointer to buffer of bytes to write. + //! \param sizeToWrite: Amount of bytes to wrtie to the file. + //! \return Returns how much bytes were written. + virtual s32 write(const void* buffer, u32 sizeToWrite); + + //! Changes position in file, returns true if successful. + //! \param finalPos: Destination position in the file. + //! \param relativeMovement: If set to true, the position in the file is + //! changed relative to current position. Otherwise the position is changed + //! from begin of file. + //! \return Returns true if successful, otherwise false. + virtual bool seek(long finalPos, bool relativeMovement = false); + + //! Returns size of file. + //! \return Returns the size of the file in bytes. + virtual long getSize() const; + + //! Reads an amount of bytes from the file. + //! \param buffer: Pointer to buffer where to read bytes will be written to. + //! \param sizeToRead: Amount of bytes to read from the file. + //! \return Returns how much bytes were read. + virtual s32 read(void* buffer, u32 sizeToRead); + + //! Returns the current position in the file. + //! \return Returns the current position in the file in bytes. + virtual long getPos() const; + + //! Returns name of file. + //! \return Returns the file name as zero terminated character string. + virtual const io::path& getFileName() const; + + //! Returns file data as an array + core::array<c8>& getData(); + + private: + + core::array<c8> Data; + io::path FileName; + long Pos; + }; + + + +} // end namespace io +} // end namespace irr + +#endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/EGUIEditTypes.h b/src/others/irrlicht-1.8.1/tools/GUIEditor/EGUIEditTypes.h new file mode 100644 index 0000000..88d119e --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/EGUIEditTypes.h @@ -0,0 +1,61 @@ +#ifndef __C_GUIEDIT_TYPES_H_INCLUDED__ +#define __C_GUIEDIT_TYPES_H_INCLUDED__ + +#include "irrTypes.h" + +namespace irr { +namespace gui { + +enum EGUIEDIT_ELEMENT_TYPES +{ + // GUI Editor + EGUIEDIT_GUIEDIT=0, + EGUIEDIT_GUIEDITWINDOW, + // Generic + EGUIEDIT_GUIPANEL, + EGUIEDIT_TEXTUREBROWSER, + // Attribute editors + EGUIEDIT_ATTRIBUTEEDITOR, + EGUIEDIT_STRINGATTRIBUTE, + EGUIEDIT_BOOLATTRIBUTE, + EGUIEDIT_ENUMATTRIBUTE, + EGUIEDIT_COLORATTRIBUTE, + EGUIEDIT_COLORFATTRIBUTE, + EGUIEDIT_TEXTUREATTRIBUTE, + // Dummy editor stubs + EGUIEDIT_CONTEXTMENUEDITOR, + EGUIEDIT_MENUEDITOR, + EGUIEDIT_FILEDIALOGEDITOR, + EGUIEDIT_COLORDIALOGEDITOR, + EGUIEDIT_MODALSCREENEDITOR, + // Count + EGUIEDIT_COUNT +}; + +const c8* const GUIEditElementTypeNames[] = +{ + "GUIEditor", + "GUIEditWindow", + "panel", + "textureCacheBrowser", + "attributeEditor", + "string_attribute", + "bool_attribute", + "enum_attribute", + "color_attribute", + "colorf_attribute", + "texture_attribute", + // dummy editors + "contextMenu_editor", + "menu_editor", + "fileOpenDialog_editor", + "colorSelectDialog_editor", + "modalScreen_editor", + 0 +}; + +} // gui +} // irr + +#endif + diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.sln b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.sln new file mode 100644 index 0000000..6f76269 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "GUI Editor.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.vcproj b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.vcproj new file mode 100644 index 0000000..81c6fa9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v8.vcproj @@ -0,0 +1,295 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="GUI Editor" + ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" + RootNamespace="GUI Editor" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + FavorSizeOrSpeed="0" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " + OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" + LinkIncremental="2" + AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="gui" + > + <File + RelativePath=".\CGUIEditFactory.cpp" + > + </File> + <File + RelativePath=".\CGUIEditFactory.h" + > + </File> + <File + RelativePath=".\CGUIEditWindow.cpp" + > + </File> + <File + RelativePath=".\CGUIEditWindow.h" + > + </File> + <File + RelativePath=".\CGUIEditWorkspace.cpp" + > + </File> + <File + RelativePath=".\CGUIEditWorkspace.h" + > + </File> + <File + RelativePath=".\CGUITextureCacheBrowser.cpp" + > + </File> + <File + RelativePath=".\CGUITextureCacheBrowser.h" + > + </File> + <Filter + Name="GUIAttributes" + > + <File + RelativePath=".\CGUIAttribute.h" + > + </File> + <File + RelativePath=".\CGUIAttributeEditor.cpp" + > + </File> + <File + RelativePath=".\CGUIAttributeEditor.h" + > + </File> + <File + RelativePath=".\CGUIBoolAttribute.h" + > + </File> + <File + RelativePath=".\CGUIColorAttribute.h" + > + </File> + <File + RelativePath=".\CGUIEnumAttribute.h" + > + </File> + <File + RelativePath=".\CGUIStringAttribute.h" + > + </File> + <File + RelativePath=".\CGUITextureAttribute.h" + > + </File> + </Filter> + <Filter + Name="Useful GUI Elements" + > + <File + RelativePath=".\CGUIPanel.cpp" + > + </File> + <File + RelativePath=".\CGUIPanel.h" + > + </File> + </Filter> + <Filter + Name="Element Editors" + > + <File + RelativePath=".\CGUIDummyEditorStub.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="io" + > + <File + RelativePath=".\CMemoryReadWriteFile.cpp" + > + </File> + <File + RelativePath=".\CMemoryReadWriteFile.h" + > + </File> + </Filter> + <File + RelativePath=".\main.cpp" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.sln b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.sln new file mode 100644 index 0000000..0acf300 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.vcproj b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.vcproj new file mode 100644 index 0000000..6d73d03 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_v9.vcproj @@ -0,0 +1,293 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="GUI Editor_v9" + ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" + RootNamespace="GUI Editor" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + FavorSizeOrSpeed="0" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " + OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" + LinkIncremental="2" + AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../lib/Win32-Visualstudio" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="gui" + > + <File + RelativePath=".\CGUIEditFactory.cpp" + > + </File> + <File + RelativePath=".\CGUIEditFactory.h" + > + </File> + <File + RelativePath=".\CGUIEditWindow.cpp" + > + </File> + <File + RelativePath=".\CGUIEditWindow.h" + > + </File> + <File + RelativePath=".\CGUIEditWorkspace.cpp" + > + </File> + <File + RelativePath=".\CGUIEditWorkspace.h" + > + </File> + <File + RelativePath=".\CGUITextureCacheBrowser.cpp" + > + </File> + <File + RelativePath=".\CGUITextureCacheBrowser.h" + > + </File> + <Filter + Name="GUIAttributes" + > + <File + RelativePath=".\CGUIAttribute.h" + > + </File> + <File + RelativePath=".\CGUIAttributeEditor.cpp" + > + </File> + <File + RelativePath=".\CGUIAttributeEditor.h" + > + </File> + <File + RelativePath=".\CGUIBoolAttribute.h" + > + </File> + <File + RelativePath=".\CGUIColorAttribute.h" + > + </File> + <File + RelativePath=".\CGUIEnumAttribute.h" + > + </File> + <File + RelativePath=".\CGUIStringAttribute.h" + > + </File> + <File + RelativePath=".\CGUITextureAttribute.h" + > + </File> + </Filter> + <Filter + Name="Useful GUI Elements" + > + <File + RelativePath=".\CGUIPanel.cpp" + > + </File> + <File + RelativePath=".\CGUIPanel.h" + > + </File> + </Filter> + <Filter + Name="Element Editors" + > + <File + RelativePath=".\CGUIDummyEditorStub.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="io" + > + <File + RelativePath=".\CMemoryReadWriteFile.cpp" + > + </File> + <File + RelativePath=".\CMemoryReadWriteFile.h" + > + </File> + </Filter> + <File + RelativePath=".\main.cpp" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj new file mode 100644 index 0000000..7022876 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> + <RootNamespace>GUI Editor</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>GUIEditor</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>Full</Optimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="CGUIEditFactory.cpp" /> + <ClCompile Include="CGUIEditWindow.cpp" /> + <ClCompile Include="CGUIEditWorkspace.cpp" /> + <ClCompile Include="CGUITextureCacheBrowser.cpp" /> + <ClCompile Include="CGUIAttributeEditor.cpp" /> + <ClCompile Include="CGUIPanel.cpp" /> + <ClCompile Include="CMemoryReadWriteFile.cpp" /> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="CGUIEditFactory.h" /> + <ClInclude Include="CGUIEditWindow.h" /> + <ClInclude Include="CGUIEditWorkspace.h" /> + <ClInclude Include="CGUITextureCacheBrowser.h" /> + <ClInclude Include="CGUIAttribute.h" /> + <ClInclude Include="CGUIAttributeEditor.h" /> + <ClInclude Include="CGUIBoolAttribute.h" /> + <ClInclude Include="CGUIColorAttribute.h" /> + <ClInclude Include="CGUIEnumAttribute.h" /> + <ClInclude Include="CGUIStringAttribute.h" /> + <ClInclude Include="CGUITextureAttribute.h" /> + <ClInclude Include="CGUIPanel.h" /> + <ClInclude Include="CGUIDummyEditorStub.h" /> + <ClInclude Include="CMemoryReadWriteFile.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> + <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters new file mode 100644 index 0000000..1d06fa4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="gui"> + <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> + </Filter> + <Filter Include="gui\GUIAttributes"> + <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> + </Filter> + <Filter Include="gui\Useful GUI Elements"> + <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> + </Filter> + <Filter Include="gui\Element Editors"> + <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> + </Filter> + <Filter Include="io"> + <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="CGUIEditFactory.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEditWindow.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEditWorkspace.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUITextureCacheBrowser.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUIAttributeEditor.cpp"> + <Filter>gui\GUIAttributes</Filter> + </ClCompile> + <ClCompile Include="CGUIPanel.cpp"> + <Filter>gui\Useful GUI Elements</Filter> + </ClCompile> + <ClCompile Include="CMemoryReadWriteFile.cpp"> + <Filter>io</Filter> + </ClCompile> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="CGUIEditFactory.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEditWindow.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEditWorkspace.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUITextureCacheBrowser.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUIAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIAttributeEditor.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIBoolAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIColorAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIEnumAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIStringAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUITextureAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIPanel.h"> + <Filter>gui\Useful GUI Elements</Filter> + </ClInclude> + <ClInclude Include="CGUIDummyEditorStub.h"> + <Filter>gui\Element Editors</Filter> + </ClInclude> + <ClInclude Include="CMemoryReadWriteFile.h"> + <Filter>io</Filter> + </ClInclude> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj new file mode 100644 index 0000000..6c6f28b --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj @@ -0,0 +1,217 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> + <RootNamespace>GUI Editor</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>GUIEditor</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>Full</Optimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="CGUIEditFactory.cpp" /> + <ClCompile Include="CGUIEditWindow.cpp" /> + <ClCompile Include="CGUIEditWorkspace.cpp" /> + <ClCompile Include="CGUITextureCacheBrowser.cpp" /> + <ClCompile Include="CGUIAttributeEditor.cpp" /> + <ClCompile Include="CGUIPanel.cpp" /> + <ClCompile Include="CMemoryReadWriteFile.cpp" /> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="CGUIEditFactory.h" /> + <ClInclude Include="CGUIEditWindow.h" /> + <ClInclude Include="CGUIEditWorkspace.h" /> + <ClInclude Include="CGUITextureCacheBrowser.h" /> + <ClInclude Include="CGUIAttribute.h" /> + <ClInclude Include="CGUIAttributeEditor.h" /> + <ClInclude Include="CGUIBoolAttribute.h" /> + <ClInclude Include="CGUIColorAttribute.h" /> + <ClInclude Include="CGUIEnumAttribute.h" /> + <ClInclude Include="CGUIStringAttribute.h" /> + <ClInclude Include="CGUITextureAttribute.h" /> + <ClInclude Include="CGUIPanel.h" /> + <ClInclude Include="CGUIDummyEditorStub.h" /> + <ClInclude Include="CMemoryReadWriteFile.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> + <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters new file mode 100644 index 0000000..1d06fa4 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="gui"> + <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> + </Filter> + <Filter Include="gui\GUIAttributes"> + <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> + </Filter> + <Filter Include="gui\Useful GUI Elements"> + <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> + </Filter> + <Filter Include="gui\Element Editors"> + <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> + </Filter> + <Filter Include="io"> + <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="CGUIEditFactory.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEditWindow.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUIEditWorkspace.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUITextureCacheBrowser.cpp"> + <Filter>gui</Filter> + </ClCompile> + <ClCompile Include="CGUIAttributeEditor.cpp"> + <Filter>gui\GUIAttributes</Filter> + </ClCompile> + <ClCompile Include="CGUIPanel.cpp"> + <Filter>gui\Useful GUI Elements</Filter> + </ClCompile> + <ClCompile Include="CMemoryReadWriteFile.cpp"> + <Filter>io</Filter> + </ClCompile> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="CGUIEditFactory.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEditWindow.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUIEditWorkspace.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUITextureCacheBrowser.h"> + <Filter>gui</Filter> + </ClInclude> + <ClInclude Include="CGUIAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIAttributeEditor.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIBoolAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIColorAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIEnumAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIStringAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUITextureAttribute.h"> + <Filter>gui\GUIAttributes</Filter> + </ClInclude> + <ClInclude Include="CGUIPanel.h"> + <Filter>gui\Useful GUI Elements</Filter> + </ClInclude> + <ClInclude Include="CGUIDummyEditorStub.h"> + <Filter>gui\Element Editors</Filter> + </ClInclude> + <ClInclude Include="CMemoryReadWriteFile.h"> + <Filter>io</Filter> + </ClInclude> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/GUIEditor_gcc.cbp b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUIEditor_gcc.cbp new file mode 100644 index 0000000..2b57608 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/GUIEditor_gcc.cbp @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="GUI Editor" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="..\..\bin\win32-gcc\GUIEditor.exe" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="..\..\lib\Win32-gcc" /> + </Linker> + </Target> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="..\..\bin\Linux\GUIEditor" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add directory="..\..\lib\Linux" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add directory="..\..\include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="CGUIAttribute.h" /> + <Unit filename="CGUIAttributeEditor.cpp" /> + <Unit filename="CGUIAttributeEditor.h" /> + <Unit filename="CGUIBoolAttribute.h" /> + <Unit filename="CGUIColorAttribute.h" /> + <Unit filename="CGUIEditFactory.cpp" /> + <Unit filename="CGUIEditFactory.h" /> + <Unit filename="CGUIEditWindow.cpp" /> + <Unit filename="CGUIEditWindow.h" /> + <Unit filename="CGUIEditWorkspace.cpp" /> + <Unit filename="CGUIEditWorkspace.h" /> + <Unit filename="CGUIEnumAttribute.h" /> + <Unit filename="CGUIPanel.cpp" /> + <Unit filename="CGUIPanel.h" /> + <Unit filename="CGUIStringAttribute.h" /> + <Unit filename="CGUITextureAttribute.h" /> + <Unit filename="CGUITextureCacheBrowser.cpp" /> + <Unit filename="CGUITextureCacheBrowser.h" /> + <Unit filename="CMemoryReadWriteFile.cpp" /> + <Unit filename="CMemoryReadWriteFile.h" /> + <Unit filename="EGUIEditTypes.h" /> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/Makefile b/src/others/irrlicht-1.8.1/tools/GUIEditor/Makefile new file mode 100644 index 0000000..02f8189 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/Makefile @@ -0,0 +1,43 @@ +# Irrlicht Engine GUIEditor Makefile +Target = GUIEditor +Sources = CGUIAttributeEditor.cpp CGUIEditFactory.cpp CGUIEditWindow.cpp CGUIEditWorkspace.cpp CGUIPanel.cpp CGUITextureCacheBrowser.cpp CMemoryReadWriteFile.cpp main.cpp + +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -Wall -O3 -ffast-math + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +all: all_linux + +# target specific settings +all_linux: SYSTEM=Linux +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 + +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm + +# if you enable sound add the proper library for linking +#LDFLAGS += -lIrrKlang +#LDFLAGS += -laudiere +#LDFLAGS += -lSDL_mixer -lSDL + +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +OBJ = $(Sources:.cpp=.o) + +all_linux all_win32: $(OBJ) + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + @$(RM) $(OBJ) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/tools/GUIEditor/main.cpp b/src/others/irrlicht-1.8.1/tools/GUIEditor/main.cpp new file mode 100644 index 0000000..e8434b2 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/GUIEditor/main.cpp @@ -0,0 +1,76 @@ +#include <irrlicht.h> +#include "driverChoice.h" + +// include the gui creator element factory +#include "CGUIEditFactory.h" + +using namespace irr; +using namespace gui; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600)); + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment *env = device->getGUIEnvironment(); + + device->setResizable(true); + + /* + first we create the factory which can make new GUI elements + and register it with the gui environment. + */ + + IGUIElementFactory* factory = new CGUIEditFactory(env); + env->registerGUIElementFactory(factory); + // remember to drop since we created with a create call + factory->drop(); + + IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC); + env->setSkin(skin); + + IGUIFont *font = env->getFont("../../media/lucida.xml"); + if (font) + skin->setFont(font); + skin->drop(); + + // change transparency of skin + for (s32 i=0; i<gui::EGDC_COUNT ; ++i) + { + video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); + col.setAlpha(250); + env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); + } + + /* + now we add the GUI Editor Workspace + */ + + env->addGUIElement("GUIEditor"); + + while(device->run()) + { + device->sleep(10); + + if (device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(0,200,200,200)); + smgr->drawAll(); + env->drawAll(); + driver->endScene(); + } + } + + device->drop(); + + return 0; +} diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.cpp b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.cpp new file mode 100644 index 0000000..780e9b0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.cpp @@ -0,0 +1,801 @@ +#include "CFontTool.h" +#include "IXMLWriter.h" + +using namespace irr; + +const int fontsizes[] = {4,6,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,56,68,72,0}; + +inline u32 getTextureSizeFromSurfaceSize(u32 size) +{ + u32 ts = 0x01; + while(ts < size) + ts <<= 1; + + return ts; +} + +// windows specific +#ifdef _IRR_WINDOWS_ + + const DWORD charsets[] = { ANSI_CHARSET, DEFAULT_CHARSET, OEM_CHARSET, BALTIC_CHARSET, GB2312_CHARSET, CHINESEBIG5_CHARSET, + EASTEUROPE_CHARSET, GREEK_CHARSET, HANGUL_CHARSET, MAC_CHARSET, RUSSIAN_CHARSET, + SHIFTJIS_CHARSET, SYMBOL_CHARSET, TURKISH_CHARSET, VIETNAMESE_CHARSET, JOHAB_CHARSET, + ARABIC_CHARSET, HEBREW_CHARSET, THAI_CHARSET, 0}; + + const wchar_t *setnames[] = {L"ANSI", L"All Available", L"OEM", L"Baltic", L"Chinese Simplified", L"Chinese Traditional", + L"Eastern European", L"Greek", L"Hangul", L"Macintosh", L"Russian", + L"Japanese", L"Symbol", L"Turkish", L"Vietnamese", L"Johab", + L"Arabic", L"Hebrew", L"Thai", 0}; + + // callback for adding font names + int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, + DWORD FontType, LPARAM lParam) + { + CFontTool* t = (CFontTool*) lParam; + t->FontNames.push_back( core::stringw(lpelfe->elfFullName)); + return 1; + } + + // + // Constructor + // + + CFontTool::CFontTool(IrrlichtDevice* device) : FontSizes(fontsizes), + Device(device), UseAlphaChannel(false), + // win specific + dc(0) + { + // init display context + dc = CreateDC(L"DISPLAY", L"DISPLAY", 0 ,0 ); + + // populate list of available character set names + for (int i=0; setnames[i] != 0; ++i) + CharSets.push_back( core::stringw(setnames[i])); + + selectCharSet(0); + } + + void CFontTool::selectCharSet(u32 currentCharSet) + { + if ( currentCharSet >= CharSets.size() ) + return; + + LOGFONTW lf; + lf.lfFaceName[0] = L'\0'; + lf.lfCharSet = (BYTE) charsets[currentCharSet]; + // HRESULT hr; // no error checking(!) + + // clear font list + FontNames.clear(); + + // create list of available fonts + EnumFontFamiliesExW( dc, (LPLOGFONTW) &lf, (FONTENUMPROCW) EnumFontFamExProc, (LPARAM) this, 0); + } + + bool CFontTool::makeBitmapFont(u32 fontIndex, u32 charsetIndex, s32 fontSize, u32 textureWidth, u32 textureHeight, bool bold, bool italic, bool aa, bool alpha) + { + if (fontIndex >= FontNames.size() || charsetIndex >= CharSets.size() ) + return false; + + UseAlphaChannel = alpha; + u32 currentImage = 0; + + // create the font + HFONT font = CreateFontW( + -MulDiv(fontSize, GetDeviceCaps(dc, LOGPIXELSY), 72), 0, + 0,0, + bold ? FW_BOLD : 0, + italic, 0,0, charsets[charsetIndex], 0,0, + aa ? ANTIALIASED_QUALITY : 0, + 0, FontNames[fontIndex].c_str() ); + + if (!font) + return false; + + SelectObject(dc, font); + SetTextAlign (dc,TA_LEFT | TA_TOP | TA_NOUPDATECP); + + // get rid of the current textures/images + for (u32 i=0; i<currentTextures.size(); ++i) + currentTextures[i]->drop(); + currentTextures.clear(); + + for (u32 i=0; i<currentImages.size(); ++i) + currentImages[i]->drop(); + currentImages.clear(); + + // clear current image mappings + CharMap.clear(); + // clear array + Areas.clear(); + + // get information about this font's unicode ranges. + s32 size = GetFontUnicodeRanges( dc, 0); + c8 *buf = new c8[size]; + LPGLYPHSET glyphs = (LPGLYPHSET)buf; + + GetFontUnicodeRanges( dc, glyphs); + + // s32 TotalCharCount = glyphs->cGlyphsSupported; + + s32 currentx=0, currenty=0, maxy=0; + + for (u32 range=0; range < glyphs->cRanges; range++) + { + WCRANGE* current = &glyphs->ranges[range]; + + //maxy=0; + + // loop through each glyph and write its size and position + for (s32 ch=current->wcLow; ch< current->wcLow + current->cGlyphs; ch++) + { + wchar_t currentchar = ch; + + if ( IsDBCSLeadByte((BYTE) ch)) + continue; // surragate pairs unsupported + + // get the dimensions + SIZE size; + ABC abc; + GetTextExtentPoint32W(dc, ¤tchar, 1, &size); + SFontArea fa; + fa.underhang = 0; + fa.overhang = 0; + + if (GetCharABCWidthsW(dc, currentchar, currentchar, &abc)) // for unicode fonts, get overhang, underhang, width + { + size.cx = abc.abcB; + fa.underhang = abc.abcA; + fa.overhang = abc.abcC; + + if (abc.abcB-abc.abcA+abc.abcC<1) + continue; // nothing of width 0 + } + if (size.cy < 1) + continue; + + //GetGlyphOutline(dc, currentchar, GGO_METRICS, &gm, 0, 0, 0); + + //size.cx++; size.cy++; + + // wrap around? + if (currentx + size.cx > (s32) textureWidth) + { + currenty += maxy; + currentx = 0; + if ((u32)(currenty + maxy) > textureHeight) + { + currentImage++; // increase Image count + currenty=0; + } + maxy = 0; + } + // add this char dimension to the current map + + fa.rectangle = core::rect<s32>(currentx, currenty, currentx + size.cx, currenty + size.cy); + fa.sourceimage = currentImage; + + CharMap.insert(currentchar, Areas.size()); + Areas.push_back( fa ); + + currentx += size.cx +1; + + if (size.cy+1 > maxy) + maxy = size.cy+1; + } + } + currenty += maxy; + + u32 lastTextureHeight = getTextureSizeFromSurfaceSize(currenty); + + // delete the glyph set + delete [] buf; + + currentImages.set_used(currentImage+1); + currentTextures.set_used(currentImage+1); + + for (currentImage=0; currentImage < currentImages.size(); ++currentImage) + { + core::stringc logmsg = "Creating image "; + logmsg += (s32) (currentImage+1); + logmsg += " of "; + logmsg += (s32) currentImages.size(); + Device->getLogger()->log(logmsg.c_str()); + // no need for a huge final texture + u32 texHeight = textureHeight; + if (currentImage == currentImages.size()-1 ) + texHeight = lastTextureHeight; + + // make a new bitmap + HBITMAP bmp = CreateCompatibleBitmap(dc, textureWidth, texHeight); + HDC bmpdc = CreateCompatibleDC(dc); + + LOGBRUSH lbrush; + lbrush.lbColor = RGB(0,0,0); + lbrush.lbHatch = 0; + lbrush.lbStyle = BS_SOLID; + + HBRUSH brush = CreateBrushIndirect(&lbrush); + HPEN pen = CreatePen(PS_NULL, 0, 0); + + HGDIOBJ oldbmp = SelectObject(bmpdc, bmp); + HGDIOBJ oldbmppen = SelectObject(bmpdc, pen); + HGDIOBJ oldbmpbrush = SelectObject(bmpdc, brush); + HGDIOBJ oldbmpfont = SelectObject(bmpdc, font); + + SetTextColor(bmpdc, RGB(255,255,255)); + + Rectangle(bmpdc, 0,0,textureWidth,texHeight); + SetBkMode(bmpdc, TRANSPARENT); + + // draw the letters... + + // iterate through the tree + core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); + while (!it.atEnd()) + { + s32 currentArea = (*it).getValue(); + wchar_t wch = (*it).getKey(); + // sloppy but I couldnt be bothered rewriting it + if (Areas[currentArea].sourceimage == currentImage) + { + // draw letter + s32 sx = Areas[currentArea].rectangle.UpperLeftCorner.X - Areas[currentArea].underhang; + TextOutW(bmpdc, sx, Areas[currentArea].rectangle.UpperLeftCorner.Y, &wch, 1); + + // if ascii font... + //SetPixel(bmpdc, Areas[currentArea].rectangle.UpperLeftCorner.X, Areas[currentArea].rectangle.UpperLeftCorner.Y, RGB(255,255,0));// left upper corner mark + } + it++; + } + + // copy the font bitmap into a new irrlicht image + BITMAP b; + PBITMAPINFO pbmi; + WORD cClrBits; + u32 cformat; + + // Retrieve the bitmap color format, width, and height. + GetObject(bmp, sizeof(BITMAP), (LPSTR)&b); + + // Convert the color format to a count of bits. + cClrBits = (WORD)(b.bmPlanes * b.bmBitsPixel); + + if (cClrBits <= 8) // we're not supporting these + cformat = -1; + else if (cClrBits <= 16) + cformat = video::ECF_A1R5G5B5; + else if (cClrBits <= 24) + cformat = video::ECF_R8G8B8; + else + cformat = video::ECF_A8R8G8B8; + + pbmi = (PBITMAPINFO) LocalAlloc(LPTR, + sizeof(BITMAPINFOHEADER)); + + // Initialize the fields in the BITMAPINFO structure. + + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biWidth = b.bmWidth; + pbmi->bmiHeader.biHeight = b.bmHeight; + pbmi->bmiHeader.biPlanes = b.bmPlanes; + pbmi->bmiHeader.biBitCount = b.bmBitsPixel; + + // If the bitmap is not compressed, set the BI_RGB flag. + pbmi->bmiHeader.biCompression = BI_RGB; + + // Compute the number of bytes in the array of color + // indices and store the result in biSizeImage. + // For Windows NT, the width must be DWORD aligned unless + // the bitmap is RLE compressed. This example shows this. + // For Windows 95/98/Me, the width must be WORD aligned unless the + // bitmap is RLE compressed. + pbmi->bmiHeader.biSizeImage = ((pbmi->bmiHeader.biWidth * cClrBits +31) & ~31) /8 + * pbmi->bmiHeader.biHeight; + // Set biClrImportant to 0, indicating that all of the + // device colors are important. + pbmi->bmiHeader.biClrImportant = 0; + + LPBYTE lpBits; // memory pointer + + PBITMAPINFOHEADER pbih = (PBITMAPINFOHEADER) pbmi; + lpBits = (LPBYTE) GlobalAlloc(GMEM_FIXED, pbih->biSizeImage); + + GetDIBits(dc, bmp, 0, (WORD) pbih->biHeight, lpBits, pbmi, DIB_RGB_COLORS); + + // DEBUG- copy to clipboard + //OpenClipboard(hWnd); + //EmptyClipboard(); + //SetClipboardData(CF_BITMAP, bmp); + //CloseClipboard(); + + // flip bitmap + s32 rowsize = ((pbmi->bmiHeader.biWidth * cClrBits +31) & ~31) /8; + c8 *row = new c8[rowsize]; + for (s32 i=0; i < (pbih->biHeight/2); ++i) + { + // grab a row + memcpy(row, lpBits + (rowsize * i), rowsize); + // swap row + memcpy(lpBits + (rowsize * i), lpBits + ((pbih->biHeight-1 -i) * rowsize ) , rowsize); + memcpy(lpBits + ((pbih->biHeight-1 -i) * rowsize ), row , rowsize); + } + + bool ret = false; + + if (cformat == video::ECF_A8R8G8B8) + { + // in this case the font should have an alpha channel, but since windows doesn't draw one + // we have to set one manually by going through all the pixels.. *sigh* + + u8* m; + for (m = lpBits; m < lpBits + pbih->biSizeImage; m+=4) + { + if (UseAlphaChannel) + { + if (m[0] > 0) // pixel has colour + { + m[3]=m[0]; // set alpha + m[0]=m[1]=m[2] = 255; // everything else is full + } + } + else + m[3]=255; // all pixels are full alpha + } + + } + else if (cformat == video::ECF_A1R5G5B5) + { + u8* m; + for (m = lpBits; m < lpBits + pbih->biSizeImage; m+=2) + { + WORD *p = (WORD*)m; + if (m[0] > 0 || !UseAlphaChannel) // alpha should be set + *p |= 0x8000; // set alpha bit + } + } + else + { + cformat = -1; + } + + // make a texture from the image + if (cformat != -1) + { + // turn mip-mapping off + bool b = Device->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); + currentImages[currentImage] = Device->getVideoDriver()->createImageFromData((video::ECOLOR_FORMAT)cformat, core::dimension2d<u32>(textureWidth,texHeight), (void*)lpBits); + Device->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS,b); + } + else + { + Device->getLogger()->log("Couldn't create font, your pixel format is unsupported."); + } + + // free memory and windows resources + // sloppy I know, but I only intended to create one image at first. + delete [] row; + LocalFree(pbmi); + GlobalFree(lpBits); + DeleteDC(bmpdc); + DeleteObject(brush); + DeleteObject(pen); + DeleteObject(bmp); + + if (currentImages[currentImage]) + { + // add texture + currentTextures[currentImage] = Device->getVideoDriver()->addTexture("GUIFontImage",currentImages[currentImage]); + currentTextures[currentImage]->grab(); + } + else + { + Device->getLogger()->log("Something went wrong, aborting."); + // drop all images + DeleteObject(font); + return false; + } + } // looping through each texture + DeleteObject(font); + return true; + } + +#else + + CFontTool::CFontTool(IrrlichtDevice *device) : FontSizes(fontsizes), Device(device), UseAlphaChannel(false) + { + if (!XftInitFtLibrary()) + { + core::stringc logmsg = "XFT not found\n"; + Device->getLogger()->log(logmsg.c_str()); + exit(EXIT_FAILURE); + } + + /* Get a list of the font foundries, storing them in a set to sort */ + std::set<core::stringw> foundries; + Display* display = (Display*)Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display; + XftFontSet* fonts = XftListFonts(display, DefaultScreen(display), 0, XFT_FOUNDRY, 0); + for (int i = 0; i < fonts->nfont; i++) + { + char *foundry; + XftPatternGetString(fonts->fonts[i], XFT_FOUNDRY, 0, &foundry); + core::stringw tmp(foundry); + foundries.insert(tmp); + } + XftFontSetDestroy(fonts); + + /* Copy the sorted list into the array */ + CharSets.clear(); + for (std::set<core::stringw>::iterator i = foundries.begin(); i != foundries.end(); i++) + CharSets.push_back((*i).c_str()); + selectCharSet(0); + } + + /* Note: There must be some trick for using strings as pattern parameters to XftListFonts because + no matter how I specify a string, I end up with an intermittent segfault. Since XftFontList is + just calling FcFontList, that's what I'll do too since that works OK */ + void CFontTool::selectCharSet(u32 currentCharSet) + { + /* Get a list of the font families, storing them in a set to sort */ + char foundry[256]; + sprintf(&foundry[0],"%ls",CharSets[currentCharSet].c_str()); + std::set<core::stringw> families; + XftPattern *pattern = FcPatternCreate(); + XftPatternAddString(pattern, FC_FOUNDRY, &foundry[0]); + XftObjectSet *objectset = FcObjectSetCreate(); + XftObjectSetAdd(objectset, XFT_FOUNDRY); + XftObjectSetAdd(objectset, XFT_FAMILY); + FcFontSet *fonts = FcFontList(NULL, pattern, objectset); + + for (int i = 0; i < fonts->nfont; i++) + { + char* ptr; + XftPatternGetString(fonts->fonts[i], XFT_FAMILY, 0, &ptr); + core::stringw family(ptr); + families.insert(family); + } + XftPatternDestroy(pattern); + FcObjectSetDestroy(objectset); + + /* Copy the sorted list into the array */ + FontNames.clear(); + for (std::set<core::stringw>::iterator i = families.begin(); i != families.end(); i++) + FontNames.push_back((*i).c_str()); + } + + bool CFontTool::makeBitmapFont(u32 fontIndex, u32 charsetIndex, s32 fontSize, u32 textureWidth, u32 textureHeight, bool bold, bool italic, bool aa, bool alpha) + { + if (fontIndex >= FontNames.size() || charsetIndex >= CharSets.size() ) + return false; + + Display *display = (Display*) Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display; + u32 screen = DefaultScreen(display); + Window win = RootWindow(display, screen); + Visual *visual = DefaultVisual(display, screen); + UseAlphaChannel = alpha; + u32 currentImage = 0; + + XftResult result; + XftPattern *request = XftPatternCreate(); + char foundry[256], family[256]; + sprintf(&foundry[0],"%ls",CharSets[charsetIndex].c_str()); + sprintf(&family[0],"%ls",FontNames[fontIndex].c_str()); + XftPatternAddString(request, XFT_FOUNDRY, &foundry[0]); + XftPatternAddString(request, XFT_FAMILY, &family[0]); + XftPatternAddInteger(request, XFT_PIXEL_SIZE, fontSize); + XftPatternAddInteger(request, XFT_WEIGHT, bold ? XFT_WEIGHT_BLACK : XFT_WEIGHT_LIGHT); + XftPatternAddInteger(request, XFT_SLANT, italic ? XFT_SLANT_ITALIC : XFT_SLANT_ROMAN); + XftPatternAddBool(request, XFT_ANTIALIAS, aa); + + /* Find the closest font that matches the user choices and open it and check if the returned + font has anti aliasing enabled by default, even if it wasn't requested */ + FcBool aaEnabled; + XftPattern *found = XftFontMatch(display, DefaultScreen(display), request, &result); + XftPatternGetBool(found, XFT_ANTIALIAS, 0, &aaEnabled); + aa = aaEnabled; + XftFont *font = XftFontOpenPattern(display, found); + + // get rid of the current textures/images + for (u32 i=0; i<currentTextures.size(); ++i) + currentTextures[i]->drop(); + currentTextures.clear(); + for (u32 i=0; i<currentImages.size(); ++i) + currentImages[i]->drop(); + currentImages.clear(); + CharMap.clear(); + Areas.clear(); + + /* Calculate the max height of the font. Annoyingly, it seems that the height property of the font + is the maximum height of any single character, but a string of characters, aligned along their + baselines, can exceed this figure. Because I don't know any better way of doing it, I'm going to + have to use the brute force method. + + Note: There will be a certain number of charters in a font, however they may not be grouped + consecutively, and could in fact be spread out with many gaps */ + u32 maxY = 0; + u32 charsFound = 0; + for (FT_UInt charCode = 0; charsFound < FcCharSetCount(font->charset); charCode++) + { + if (!XftCharExists(display, font, charCode)) + continue; + + charsFound++; + + XGlyphInfo extents; + XftTextExtents32(display, font, &charCode, 1, &extents); + if ((extents.xOff <= 0) && (extents.height <= 0)) + continue; + + /* Calculate the width and height, adding 1 extra pixel if anti aliasing is enabled */ + u32 chWidth = extents.xOff + (aa ? 1 : 0); + u32 chHeight = (font->ascent - extents.y + extents.height) + (aa ? 1 : 0); + if (chHeight > maxY) + maxY = chHeight; + + /* Store the character details here */ + SFontArea fontArea; + fontArea.rectangle = core::rect<s32>(0, 0, chWidth, chHeight); + CharMap.insert(charCode, Areas.size()); + Areas.push_back(fontArea); + } + core::stringc logmsg = "Found "; + logmsg += (s32) (CharMap.size() + 1); + logmsg += " characters"; + Device->getLogger()->log(logmsg.c_str()); + + /* Get the size of the chars and allocate them a position on a texture. If the next character that + is added would be outside the width or height of the texture, then a new texture is added */ + u32 currentX = 0, currentY = 0, rowY = 0; + for (core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); !it.atEnd(); it++) + { + s32 currentArea = (*it).getValue(); + SFontArea *fontArea = &Areas[currentArea]; + u32 chWidth = fontArea->rectangle.LowerRightCorner.X; + u32 chHeight = fontArea->rectangle.LowerRightCorner.Y; + + /* If the width of this char will exceed the textureWidth then start a new row */ + if ((currentX + chWidth) > textureWidth) + { + currentY += rowY; + currentX = 0; + + /* If the new row added to the texture exceeds the textureHeight then start a new texture */ + if ((currentY + rowY) > textureHeight) + { + currentImage++; + currentY = 0; + } + rowY = 0; + } + + /* Update the area with the current x and y and texture */ + fontArea->rectangle = core::rect<s32>(currentX, currentY, currentX + chWidth, currentY + chHeight); + fontArea->sourceimage = currentImage; + currentX += chWidth + 1; + if (chHeight + 1 > rowY) + rowY = chHeight + 1; + } + + /* The last row of chars and the last texture weren't accounted for in the loop, so add them here */ + currentY += rowY; + u32 lastTextureHeight = getTextureSizeFromSurfaceSize(currentY); + currentImages.set_used(currentImage + 1); + currentTextures.set_used(currentImage + 1); + + /* Initialise colours */ + XftColor colFore, colBack; + XRenderColor xFore = {0xffff, 0xffff, 0xffff, 0xffff}; + XRenderColor xBack = {0x0000, 0x0000, 0x0000, 0xffff}; + XftColorAllocValue(display, DefaultVisual(display, screen), DefaultColormap(display, screen), &xFore, &colFore); + XftColorAllocValue(display, DefaultVisual(display, screen), DefaultColormap(display, screen), &xBack, &colBack); + + /* Create a pixmap that is large enough to hold any character in the font */ + Pixmap pixmap = XCreatePixmap(display, win, textureWidth, maxY, DefaultDepth(display, screen)); + XftDraw *draw = XftDrawCreate(display, pixmap, visual, DefaultColormap(display, screen)); + + /* Render the chars */ + for (currentImage = 0; currentImage < currentImages.size(); ++currentImage) + { + core::stringc logmsg = "Creating image "; + logmsg += (s32) (currentImage+1); + logmsg += " of "; + logmsg += (s32) currentImages.size(); + Device->getLogger()->log(logmsg.c_str()); + + /* The last texture that is saved is vertically shrunk to fit the characters drawn on it */ + u32 texHeight = textureHeight; + if (currentImage == currentImages.size() - 1) + texHeight = lastTextureHeight; + + /* The texture that holds this "page" of characters */ + currentImages[currentImage] = Device->getVideoDriver()->createImage(video::ECF_A8R8G8B8, core::dimension2du(textureWidth, texHeight)); + currentImages[currentImage]->fill(video::SColor(alpha ? 0 : 255,0,0,0)); + + for (core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); !it.atEnd(); it++) + { + FcChar32 wch = (*it).getKey(); + s32 currentArea = (*it).getValue(); + if (Areas[currentArea].sourceimage == currentImage) + { + SFontArea *fontArea = &Areas[currentArea]; + u32 chWidth = fontArea->rectangle.LowerRightCorner.X - fontArea->rectangle.UpperLeftCorner.X; + u32 chHeight = fontArea->rectangle.LowerRightCorner.Y - fontArea->rectangle.UpperLeftCorner.Y; + + /* Draw the glyph onto the pixmap */ + XGlyphInfo extents; + XftDrawRect(draw, &colBack, 0, 0, chWidth, chHeight); + XftTextExtents32(display, font, &wch, 1, &extents); + XftDrawString32(draw, &colFore, font, extents.x, extents.y, &wch, 1); + + /* Convert the pixmap into an image, then copy it onto the Irrlicht texture, pixel by pixel. + There's bound to be a faster way, but this is adequate */ + u32 xDest = fontArea->rectangle.UpperLeftCorner.X; + u32 yDest = fontArea->rectangle.UpperLeftCorner.Y + font->ascent - extents.y; + XImage *image = XGetImage(display, pixmap, 0, 0, chWidth, chHeight, 0xffffff, XYPixmap); + if (image) + { + for (u32 ySrc = 0; ySrc < chHeight; ySrc++) + for (u32 xSrc = 0; xSrc < chWidth; xSrc++) + { + /* Get the pixel colour and break it down into rgb components */ + u32 col = XGetPixel(image, xSrc, ySrc); + u32 a = 255; + u32 r = col & visual->red_mask; + u32 g = col & visual->green_mask; + u32 b = col & visual->blue_mask; + while (r > 0xff) r >>= 8; + while (g > 0xff) g >>= 8; + while (b > 0xff) b >>= 8; + + /* To make the background transparent, set the colour to 100% white and the alpha to + the average of the three rgb colour components to maintain the anti-aliasing */ + if (alpha) + { + a = (r + g + b) / 3; + r = 255; + g = 255; + b = 255; + } + currentImages[currentImage]->setPixel(xDest + xSrc,yDest + ySrc,video::SColor(a,r,g,b)); + } + image->f.destroy_image(image); + } + } + } + + /* Add the texture to the list */ + currentTextures[currentImage] = Device->getVideoDriver()->addTexture("GUIFontImage",currentImages[currentImage]); + currentTextures[currentImage]->grab(); + } + + XftColorFree (display, visual, DefaultColormap(display, screen), &colFore); + XftColorFree (display, visual, DefaultColormap(display, screen), &colBack); + XftFontClose(display,font); + XftPatternDestroy(request); + XftDrawDestroy(draw); + XFreePixmap(display, pixmap); + return true; + } +#endif + + CFontTool::~CFontTool() + { +#ifdef _IRR_WINDOWS_ + // destroy display context + if (dc) + DeleteDC(dc); +#endif + + // drop textures+images + for (u32 i=0; i<currentTextures.size(); ++i) + currentTextures[i]->drop(); + currentTextures.clear(); + + for (u32 i=0; i<currentImages.size(); ++i) + currentImages[i]->drop(); + currentImages.clear(); + } + +bool CFontTool::saveBitmapFont(const c8 *filename, const c8* format) +{ + if (currentImages.size() == 0) + { + Device->getLogger()->log("No image data to write, aborting."); + return false; + } + + core::stringc fn = filename; + core::stringc imagename = filename; + fn += ".xml"; + + io::IXMLWriter *writer = Device->getFileSystem()->createXMLWriter(fn.c_str()); + + // header and line breaks + writer->writeXMLHeader(); + writer->writeLineBreak(); + + // write information + writer->writeElement(L"font", false, L"type", L"bitmap"); + writer->writeLineBreak(); + writer->writeLineBreak(); + + // write images and link to them + for (u32 i=0; i<currentImages.size(); ++i) + { + imagename = filename; + imagename += (s32)i; + imagename += "."; + imagename += format; + Device->getVideoDriver()->writeImageToFile(currentImages[i],imagename.c_str()); + + writer->writeElement(L"Texture", true, + L"index", core::stringw(i).c_str(), + L"filename", core::stringw(imagename.c_str()).c_str(), + L"hasAlpha", UseAlphaChannel ? L"true" : L"false"); + writer->writeLineBreak(); + } + + writer->writeLineBreak(); + + // write each character + core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); + while (!it.atEnd()) + { + SFontArea &fa = Areas[(*it).getValue()]; + + wchar_t c[2]; + c[0] = (*it).getKey(); + c[1] = L'\0'; + core::stringw area, under, over, image; + area = core::stringw(fa.rectangle.UpperLeftCorner.X); + area += L", "; + area += fa.rectangle.UpperLeftCorner.Y; + area += L", "; + area += fa.rectangle.LowerRightCorner.X; + area += L", "; + area += fa.rectangle.LowerRightCorner.Y; + + core::array<core::stringw> names; + core::array<core::stringw> values; + names.clear(); + values.clear(); + // char + names.push_back(core::stringw(L"c")); + values.push_back(core::stringw(c)); + // image number + if (fa.sourceimage != 0) + { + image = core::stringw(fa.sourceimage); + names.push_back(core::stringw(L"i")); + values.push_back(image); + } + // rectangle + names.push_back(core::stringw(L"r")); + values.push_back(area); + + if (fa.underhang != 0) + { + under = core::stringw(fa.underhang); + names.push_back(core::stringw(L"u")); + values.push_back(under); + } + if (fa.overhang != 0) + { + over = core::stringw(fa.overhang); + names.push_back(core::stringw(L"o")); + values.push_back(over); + } + writer->writeElement(L"c", true, names, values); + + writer->writeLineBreak(); + it++; + } + + writer->writeClosingTag(L"font"); + + writer->drop(); + + Device->getLogger()->log("Bitmap font saved."); + + return true; +} diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.h b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.h new file mode 100644 index 0000000..5a35938 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CFontTool.h @@ -0,0 +1,78 @@ +#ifndef __IRR_FONT_TOOL_INCLUDED__ +#define __IRR_FONT_TOOL_INCLUDED__ + + +#include "irrlicht.h" + +#if defined(_IRR_WINDOWS_) + #ifdef _MBCS + #undef _MBCS + #endif + + #define UNICODE + #define _WIN32_WINNT 0x0500 + #include "windows.h" +#else + #ifdef _IRR_COMPILE_WITH_X11_ + #include <X11/Xlib.h> + #endif + #include <X11/Xft/Xft.h> + #include <set> +#endif + + +namespace irr { + class CFontTool : public irr::IReferenceCounted + { + public: + CFontTool(irr::IrrlichtDevice* device); + ~CFontTool(); + + virtual bool makeBitmapFont(u32 fontIndex, u32 charsetIndex, + s32 fontSize, u32 texturewidth, u32 textureHeight, + bool bold, bool italic, bool aa, bool alpha); + + virtual bool saveBitmapFont(const c8* filename, const c8* format); + + virtual void selectCharSet(u32 currentCharSet); + + struct SFontArea + { + SFontArea() : rectangle(), underhang(0), overhang(0), sourceimage(0) {} + core::rect<s32> rectangle; + s32 underhang; + s32 overhang; + u32 sourceimage; + }; + + /* struct SFontMap + { + SFontMap() : areas(), start(0), count(0) {} + core::array< SFontArea > areas; + s32 start; + s32 count; + };*/ + + + + core::array<core::stringw> FontNames; + core::array<core::stringw> CharSets; + //core::array<SFontMap> Mappings; + core::array<SFontArea> Areas; + core::map<wchar_t, u32> CharMap; + + core::array<video::ITexture*> currentTextures; + core::array<video::IImage*> currentImages; + const int *FontSizes; + IrrlichtDevice *Device; + + bool UseAlphaChannel; + + // windows + #ifdef _IRR_WINDOWS_ + HDC dc; + #endif + + }; +} +#endif // __IRR_FONT_TOOL_INCLUDED__ diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CVectorFontTool.h b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CVectorFontTool.h new file mode 100644 index 0000000..05a9c79 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/CVectorFontTool.h @@ -0,0 +1,1199 @@ +/* + Vector font tool - Gaz Davidson December 2006-2012 + + I noticed bitmap fonts were taking massive amounts of video memory at reasonable sizes, + so I decided to make a vector font. I always wanted to try converting pixels to triangles... + + And I failed! This is a collection of the ugliest, bloated, most inneficient algorithms + i've ever written, but its kinda working so I'm not changing it. +*/ + +#ifndef __VECTOR_FONT_TOOL_INCLUDED__ +#define __VECTOR_FONT_TOOL_INCLUDED__ + +#include "irrlicht.h" +#include "CFontTool.h" +#include <assert.h> + +using namespace irr; +using namespace video; + +struct STriangleList +{ + core::array<core::vector2df> positions; + core::array<u16> indexes; + + // for adding one triangle list to another, + // these triangles share positions, but dont share triangles + STriangleList& operator+=(STriangleList &other) + { + core::matrix4 m; + core::array<s32> map; + map.set_used(other.positions.size()); + + for (u32 i=0; i<map.size(); ++i) + map[i]=-1; + + for (u32 i=0; i<positions.size(); ++i) + for (u32 j=0; j<map.size(); ++j) + if ( positions[i] == other.positions[j] ) + map[j] = i; + + for (u32 i=0; i<map.size(); ++i) + if (map[i] == -1) + { + positions.push_back(other.positions[i]); + map[i] = positions.size()-1; + } + + // add triangles + for (u32 i=0; i<other.indexes.size(); ++i) + indexes.push_back((u32)map[other.indexes[i]]); + + return *this; + } + + // functions for building triangles for shapes, + // each shape can't have duplicate triangles + bool hasTriangle(core::vector2df a, core::vector2df b, core::vector2df c) + { + // make sure the triangle is wound correctly + if (core::line2df(a,b).getPointOrientation(c) < 0) + { core::vector2df tmp=a; a=b; b=tmp; } + + u32 ia=0xffffffff, ib=0xffffffff, ic=0xffffffff; + // Find each vertex + for (u32 i=0; i < positions.size() && (ia==(u32)-1||ib==(u32)-1||ic==(u32)-1) ; ++i) + { + if (positions[i] == a) + ia = i; + if (positions[i] == b) + ib = i; + if (positions[i] == c) + ic = i; + } + + if (ia==0xffffffff) + { + return false; + } + if (ib==0xffffffff) + { + return false; + } + if (ic==0xffffffff) + { + return false; + } + + for (u32 i=0; i<indexes.size(); i+=3) + if ( (indexes[i] == ia && indexes[i+1] == ib && indexes[i+2] == ic) || + (indexes[i] == ic && indexes[i+1] == ia && indexes[i+2] == ib) || + (indexes[i] == ib && indexes[i+1] == ic && indexes[i+2] == ia) ) + return true; + + return false; + } + + void add(core::vector2df a, core::vector2df b, core::vector2df c) + { + + // make sure the triangle is wound correctly + if (core::line2df(a,b).getPointOrientation(c) < 0) + { + core::vector2df tmp=a; a=b; b=tmp; + } + + u32 ia=0xffffffff, ib=0xffffffff, ic=0xffffffff; + // no duplicate vertex positions allowed... + for (u32 i=0; i < positions.size() && (ia==-1||ib==-1||ic==-1) ; ++i) + { + if (positions[i] == a) + ia = i; + if (positions[i] == b) + ib = i; + if (positions[i] == c) + ic = i; + } + bool found=true; + if (ia==0xffffffff) + { + ia = positions.size(); + positions.push_back(a); + found=false; + } + if (ib==0xffffffff) + { + ib = positions.size(); + positions.push_back(b); + found=false; + } + if (ic==0xffffffff) + { + ic = positions.size(); + positions.push_back(c); + found=false; + } + + // no duplicate triangles allowed + if (found) + { + found=false; + for (u32 i=0; i<indexes.size(); i+=3) + { + if ( (indexes[i] == ia && indexes[i+1] == ib && indexes[i+2] == ic) || + (indexes[i] == ic && indexes[i+1] == ia && indexes[i+2] == ib) || + (indexes[i] == ib && indexes[i+1] == ic && indexes[i+2] == ia) ) + { + found=true; + break; + } + } + } + + if (!found) + { + indexes.push_back(ia); + indexes.push_back(ib); + indexes.push_back(ic); + } + } +}; + +// finds groups of pixels and triangulates them +class CGroupFinder +{ +public: + CGroupFinder(bool *memory, s32 w, s32 h, IrrlichtDevice *dev): + width(w), height(h), mem(memory), Device(dev) + { + refbuffer.set_used(w*h); + for (u32 i=0; i<refbuffer.size(); ++i) + refbuffer[i]=0; + // find groups of pixels + findGroups(); + removeGroups(); + + // triangulate + for (u32 i=0; i<groups.size(); ++i) + { + groups[i].triangulate(); + } + } + + // contains a clockwise edge line + struct SEdge + { + SEdge() : positions() { } + + core::array<core::position2di> positions; + + bool isMember(s32 x, s32 y) + { + for (u32 i=0; i<positions.size(); ++i) + if (positions[i].X == x && positions[i].Y == y) + return true; + return false; + } + + // reduces the number of points in the edge + void reduce(s32 level=0) + { + // level 0- remove points on the same line + for (u32 i=1; i < positions.size()-1; ++i) + { + // same point as the last one?! shouldnt happen, dunno why it does :| + if (positions[i-1] == positions[i]) + { + positions.erase(i--); + continue; + } + + // get headings + core::vector2d<f32> h1((f32)(positions[i-1].X - positions[i].X),(f32)(positions[i-1].Y - positions[i].Y)), + h2((f32)(positions[i].X - positions[i+1].X),(f32)(positions[i].Y - positions[i+1].Y)); + h1.normalize(); + h2.normalize(); + + if (h1==h2) // erase the current point + positions.erase(i--); + } + + // level 1- if point1 points at point3, we can skip point2 + // level 2+ allow a deviation of level-1 + + } + + }; + + // contains an array of lines for triangulation + struct SLineList + { + core::array<core::line2df> lines; + SLineList() : lines() { } + void addEdge(const SEdge &edge) + { + // adds lines to the buffer + for (u32 i=1; i<edge.positions.size(); ++i) + addLine(core::line2df((f32)edge.positions[i-1].X, (f32)edge.positions[i-1].Y, + (f32)edge.positions[i].X, (f32)edge.positions[i].Y )); + } + void addLine( const core::line2df &line ) + { + // no dupes! + if (!hasLine(line)) + lines.push_back(line); + } + bool hasLine( const core::line2df &line ) + { + for (u32 i=0; i<lines.size(); ++i) + if (line == lines[i] || (line.start == lines[i].end && line.end == lines[i].start) ) + return true; + return false; + } + + bool crossesWith( core::line2df l, core::vector2df p) + { + // inside checks only work with clockwise triangles + if (l.getPointOrientation(p) < 0) + { core::vector2df tmp=l.start; l.start=l.end; l.end=tmp; } + + // make the 3 triangle edges + core::line2df &la=l, lb(l.end,p), lc(p,l.start); + + // test every line in the list + for (u32 i=0; i<lines.size(); ++i) + { + core::line2df &l2 = lines[i]; + + // the triangle isn't allowed to enclose any points + // triangles are clockwise, so if to the right of all 3 lines, it's enclosed + if (la.getPointOrientation(l2.start) > 0 && + lb.getPointOrientation(l2.start) > 0 && + lc.getPointOrientation(l2.start) > 0) + return true; + //if (la.getPointOrientation(l2.start) < 0 && + // lb.getPointOrientation(l2.start) < 0 && + // lc.getPointOrientation(l2.start) < 0) + // return true; + + core::vector2df out; + //if (la.intersectWith(l2,out)) + // if (out != la.start && out != la.end && + // out != l2.start && out != l2.end) + // return true; + if (lb.intersectWith(l2,out)) + if (!out.equals(lb.start) && !out.equals(lb.end) && + !out.equals(l2.start) && !out.equals(l2.end)) + return true; + if (lc.intersectWith(l2,out)) + if (!out.equals(lc.start) && !out.equals(lc.end) && + !out.equals(l2.start) && !out.equals(l2.end)) + return true; + + // my shit intersection code only works with lines in certain directions :( + if (l2.intersectWith(lb,out)) + if (!out.equals(lb.start) && !out.equals(lb.end) && + !out.equals(l2.start) && !out.equals(l2.end)) + return true; + if (l2.intersectWith(lc,out)) + if (!out.equals(lc.start) && !out.equals(lc.end) && + !out.equals(l2.start) && !out.equals(l2.end)) + return true; + + + if (lb.isPointOnLine(l2.start) && l2.start != lb.start && l2.start != lb.end) + return true; + if (lc.isPointOnLine(l2.start) && l2.start != lc.start && l2.start != lc.end) + return true; + + } + return false; + } + }; + + // an area of adjacent pixels + struct SPixelGroup + { + SPixelGroup(IrrlichtDevice *device) : triangles(), pixelWidth(0), pixelHeight(0), + Device(device) {} + + core::array<core::position2di> pixels; + core::array<SEdge> edges; + STriangleList triangles; + core::array<SLineList> ll; + core::array<bool> isMemberCache; + s32 pixelWidth; + s32 pixelHeight; + IrrlichtDevice *Device; + + void triangulate() + { + + // find edges in this group + makeEdges(); + + // triangulate the group + makeTriangles(); + + } + + void drawTriangle( core::line2df line, core::vector2df point) + { + //const u32 endt = Device->getTimer()->getTime() + t; + f32 scale = 5; + + + //while(Device->getTimer()->getTime() < endt ) + //{ + Device->run(); + Device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); + for (u32 v=0;v<ll.size(); ++v) + for (u32 h=0;h<ll[v].lines.size(); ++h) + { + core::line2df ¤tline = ll[v].lines[h]; + core::position2di st = core::position2di((s32)(currentline.start.X*scale)+50, (s32)(currentline.start.Y*scale)+50); + core::position2di en = core::position2di((s32)(currentline.end.X*scale)+50, (s32)(currentline.end.Y*scale)+50); + + Device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,255,255)); + } + // draw this triangle + const core::position2di st((s32)(line.start.X*scale)+50, (s32)(line.start.Y*scale)+50); + const core::position2di en((s32)(line.end.X*scale)+50, (s32)(line.end.Y*scale)+50); + const core::position2di p((s32)(point.X*scale)+50, (s32)(point.Y*scale)+50); + Device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); + Device->getVideoDriver()->draw2DLine(en,p, SColor(255,0,255,0)); + Device->getVideoDriver()->draw2DLine(p,st, SColor(255,0,0,255)); + + Device->getVideoDriver()->endScene(); + //} + } + + void makeTriangles() + { + // make lines from edges, because they're easier to deal with + ll.clear(); + for (u32 i=0; i < edges.size(); ++i) + { + SLineList l; + l.addEdge(edges[i]); + ll.push_back(l); + } + // add an extra one for inside edges + SLineList innerlines; + ll.push_back(innerlines); + + // loop through each edge and make triangles + for (u32 i=0; i<ll.size(); ++i) + { + // loop through each line in the edge + for (u32 cl=0; cl<ll[i].lines.size(); ++cl) + { + + core::line2df ¤tLine = ll[i].lines[cl]; + f32 bestScore = -10.0f; + s32 bestEdge = -1; + s32 bestPoint = -1; + // find the best scoring point to join to this line + for (u32 k=0; k<ll.size(); ++k) + for (u32 j=0; j< ll[k].lines.size(); ++j) + { + f32 score = 0.0f; + core::vector2df point(ll[k].lines[j].start.X, + ll[k].lines[j].start.Y); + core::line2df line1(point,currentLine.start); + core::line2df line2(currentLine.end,point); + + // can't be part of the current line + if (point == currentLine.start || point == currentLine.end) + continue; + + // must be to the right hand side (triangles are wound clockwise) + // unless its part of the inside... + f32 side1 = currentLine.getPointOrientation(point); + f32 side2 = core::line2df(point,currentLine.start).getPointOrientation(currentLine.end); + f32 side3 = core::line2df(currentLine.end,point).getPointOrientation(currentLine.start); + if (i<ll.size()-1) + if (side1 <= 0 || side2 <= 0 || side3 <=0) + continue; + + // can't already have this triangle + if (triangles.hasTriangle(currentLine.start,currentLine.end,point)) + continue; + + // must not cross any other lines or enclose any points + bool itCrossed = false; + for (u32 v=0; v<ll.size(); ++v) + if (ll[v].crossesWith(currentLine, point)) + { + itCrossed = true; + break; + } + if (itCrossed) + continue; + + + // so, we like this triangle, but how much? + // is it better than all the others? + + // we prefer points from other edges, unless its on the inside + if (k==i && i != ll.size()-1) + score = 1; + else + score = 2; + + // we prefer evenly shaped triangles + + // we prefer triangles with a large area + + // do we like this one more than the others? + if (score>bestScore) + { + bestScore = score; + bestEdge = k; + bestPoint = j; + } + } + // hopefully we found one + if (bestEdge >= 0 && bestPoint >= 0 && bestScore >= 0.0f) + { + //assert(bestEdge >= 0 && bestPoint >= 0); + //assert(bestScore >= 0.0f); + + core::vector2df point(ll[bestEdge].lines[bestPoint].start.X, ll[bestEdge].lines[bestPoint].start.Y); + + // add it to the triangles list + triangles.add(currentLine.start, currentLine.end, point); + + // add inner lines to the line buffer, but only if they arent in others + + core::line2df la(point,currentLine.start); + core::line2df lb(currentLine.end,point); + + bool found = false; + for (u32 lineno=0;lineno<ll.size()-1; ++lineno) + if (ll[lineno].hasLine(la)) + { found=true; break; } + if (!found) + ll[ll.size()-1].addLine(la); + + for (u32 lineno=0;lineno<ll.size()-1; ++lineno) + if (ll[lineno].hasLine(lb)) + { found=true; break; } + if (!found) + ll[ll.size()-1].addLine(lb); + + //drawTriangle(currentLine, point); + + } + + } + } + } + + // finds the edges + void makeEdges() + { + + // speed it up + refreshIsMemberCache(); + + // clear the edges + edges.clear(); + + // loop through each pixel + for (u32 i=0; i < pixels.size(); ++i) + { + core::position2di &p = pixels[i]; + s32 &x=p.X, &y=p.Y; + bool ul = isMember(p.X-1,p.Y-1); + bool u = isMember(p.X,p.Y-1); + bool ur = isMember(p.X+1,p.Y-1); + bool l = isMember(p.X-1,p.Y); + bool r = isMember(p.X+1,p.Y); + bool bl = isMember(p.X-1,p.Y+1); + bool b = isMember(p.X,p.Y+1); + bool br = isMember(p.X+1,p.Y+1); + + // walls already added? + bool top=u, bottom=b, left=l, right=r; + + if (!(ul | u | ur | l | r | bl | b | br)) + { + // lone square + SEdge a; + a.positions.push_back( core::position2di(x,y)); + a.positions.push_back( core::position2di(x+1,y)); + a.positions.push_back( core::position2di(x+1,y+1)); + a.positions.push_back( core::position2di(x,y+1)); + a.positions.push_back( core::position2di(x,y)); + edges.push_back(a); + top=bottom=left=right=true; + } + else + { + if (!(ul|u|l) && (b&r) ) + { + // upper outer diagonal "/" + addToEdges(x,y+1,x+1,y); + top=left=true; + } else if ( !(u|ur|r) && (b&l) ) + { + // upper outer diagonal "\" + addToEdges(x,y,x+1,y+1); + top=right=true; + } else if ( !(l|bl|b) && (r&u) ) + { + // lower outer diagonal "\" + addToEdges(x+1,y+1,x,y); + left=bottom=true; + } else if ( !(r|br|b) && (l&u) ) + { + // lower outer diagonal "/" + addToEdges(x+1,y,x,y+1); + right=bottom=true; + }/* else if (!(b) && (l&bl) ) + { + // upper inner diagonal "/" + addToEdges(x+1,y+1,x,y+2); + //bottom=true; + } else if ( !(b) && (r&br) ) + { + // upper inner diagonal "\" + addToEdges(x+1,y+2,x,y+1); + //bottom=true; + } else if ( !(r) && (b&br) ) + { + // lower inner diagonal "\" + addToEdges(x+1,y,x+2,y+1); + //right=true; + } else if ( !(l) && (b&bl) ) + { + // lower inner diagonal "/" + addToEdges(x-1,y+1,x,y); + //left=true; + }*/ + + // add flat edges + if (!left /*&& !( (u&ul) || (b&bl)) */) addToEdges(x,y+1,x,y); + if (!top /*&& !( (l&ul) || (r&ur)) */) addToEdges(x,y,x+1,y); + if (!right /*&& !( (u&ur) || (b&br)) */) addToEdges(x+1,y,x+1,y+1); + if (!bottom /*&& !( (l&bl) || (r&br)) */) addToEdges(x+1,y+1,x,y+1); + } // lone square + } // for + + // reduce the number of points in each edge + for (u32 i=0; i<edges.size(); ++i) + { + edges[i].reduce(1); + + // all edges should have at least 3 points + assert(edges[i].positions.size() >= 3); + + // all edges should be closed + assert(edges[i].positions[0] == edges[i].positions[edges[i].positions.size()-1] ); + } + } + + // adds a line to the edges arrays + void addToEdges(s32 x1, s32 y1, s32 x2, s32 y2) + { + bool found=false; + // loop through each edge + for (u32 i=0; i<edges.size(); ++i) + { + // if this line starts at the end of an edge + if ( edges[i].positions[edges[i].positions.size()-1] == core::position2di(x1,y1)) + { + // add it to the end + edges[i].positions.push_back(core::position2di(x2,y2)); + found=true; + break; + } + // if the line ends at the start of the edge + if ( edges[i].positions[0]== core::position2di(x2,y2)) + { + // add it to the front + edges[i].positions.push_front(core::position2di(x1,y1)); + found=true; + break; + } + } + if (!found) + { + // we make a new edge + SEdge n; + n.positions.push_back(core::position2di(x1,y1)); + n.positions.push_back(core::position2di(x2,y2)); + edges.push_back(n); + } + + joinEdges(); + } + + void joinEdges() + { + // touching edges are joined + + for (u32 i=0; i < edges.size(); ++i) + for (u32 j=0; j < edges.size(); ++j) + { + if (i != j && edges[j].positions.size() && edges[i].positions.size()) + { + if (edges[j].positions[0] == edges[i].positions[edges[i].positions.size()-1]) + { + for (u32 k=0; k < edges[j].positions.size(); ++k) + edges[i].positions.push_back(edges[j].positions[k]); + edges[j].positions.clear(); + } + } + } + + // remove empty edges + for (u32 i=0; i<edges.size(); ++i) + if (edges[i].positions.size() == 0) + edges.erase(i--); + } + + // tells if this x,y position is a member of this group + bool isMember(s32 x, s32 y) + { + //for (u32 i=0; i<pixels.size(); ++i) + // if (pixels[i].X == x && pixels[i].Y == y) + // return true; + if (x>pixelWidth || y>pixelHeight || x<0 || y<0) + return false; + else + return isMemberCache[pixelWidth*y + x]; + } + + void refreshIsMemberCache() + { + isMemberCache.clear(); + pixelWidth=0; pixelHeight=0; + for (u32 i=0; i<pixels.size(); ++i) + { + if (pixels[i].X>pixelWidth) pixelWidth=pixels[i].X; + if (pixels[i].Y>pixelHeight) pixelHeight=pixels[i].Y; + } + pixelWidth+=2; pixelHeight+=2; + isMemberCache.set_used(pixelWidth*pixelHeight+1); + for (u32 i=0; i<isMemberCache.size(); ++i) + isMemberCache[i] = false; + for (u32 i=0; i<pixels.size(); ++i) + isMemberCache[pixelWidth*pixels[i].Y + pixels[i].X] = true; + } + }; + + + void drawEdges(IrrlichtDevice *device, u32 t, s32 scale) + { + const u32 stt = device->getTimer()->getTime(); + const u32 endt = stt + t; + + while(device->getTimer()->getTime() < endt ) + { + const f32 phase = f32((device->getTimer()->getTime()-stt) % 500) / 500.0f; + + device->run(); + device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); + for (u32 g=0;g<groups.size(); ++g) + for (u32 v=0;v<groups[g].edges.size(); ++v) + for (u32 p=1;p<groups[g].edges[v].positions.size(); ++p) + { + core::position2di st = core::position2di(groups[g].edges[v].positions[p-1].X*scale+50, groups[g].edges[v].positions[p-1].Y*scale+50) ; + core::position2di en = core::position2di(groups[g].edges[v].positions[p].X*scale+50, groups[g].edges[v].positions[p].Y*scale+50) ; + core::position2di ep = en-st; + ep = st + core::position2di((s32)(ep.X*phase), (s32)(ep.Y*phase)); + device->getVideoDriver()->draw2DLine(st,en); + device->getVideoDriver()->draw2DLine(st,ep,video::SColor(255,255,0,0) ); + } + device->getVideoDriver()->endScene(); + } + } + + void drawTriangles(IrrlichtDevice *device, u32 t, s32 scale) + { + const u32 stt = device->getTimer()->getTime(); + const u32 endt = stt + t; + + while(device->getTimer()->getTime() < endt ) + { + const f32 phase = f32((device->getTimer()->getTime()-stt) % 500) / 500.0f; + + device->run(); + device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); + for (u32 g=0;g<groups.size(); ++g) + for (u32 v=0;v<groups[g].triangles.indexes.size()*phase; v+=3) + { + STriangleList &t = groups[g].triangles; + core::position2di st((s32)(t.positions[t.indexes[v+0]].X*scale)+50,(s32)(t.positions[t.indexes[v+0]].Y*scale)+50); + core::position2di en((s32)(t.positions[t.indexes[v+1]].X*scale)+50,(s32)(t.positions[t.indexes[v+1]].Y*scale)+50); + device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); + st = core::position2di((s32)(t.positions[t.indexes[v+1]].X*scale)+50,(s32)(t.positions[t.indexes[v+1]].Y*scale)+50); + en = core::position2di((s32)(t.positions[t.indexes[v+2]].X*scale)+50,(s32)(t.positions[t.indexes[v+2]].Y*scale)+50); + device->getVideoDriver()->draw2DLine(st,en, SColor(255,0,255,0)); + st = core::position2di((s32)(t.positions[t.indexes[v+2]].X*scale)+50,(s32)(t.positions[t.indexes[v+2]].Y*scale)+50); + en = core::position2di((s32)(t.positions[t.indexes[v+0]].X*scale)+50,(s32)(t.positions[t.indexes[v+0]].Y*scale)+50); + device->getVideoDriver()->draw2DLine(st,en, SColor(255,0,0,255)); + } + device->getVideoDriver()->endScene(); + } + } + + void drawTriLines(IrrlichtDevice *device, u32 t, s32 scale) + { + const u32 endt = device->getTimer()->getTime() + t; + + while(device->getTimer()->getTime() < endt ) + { + device->run(); + device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); + for (u32 g=0;g<groups.size(); ++g) + for (u32 v=0;v<groups[g].ll.size()-1; ++v) + for (u32 h=0;h<groups[g].ll[v].lines.size(); ++h) + { + core::line2df ¤tline = groups[g].ll[v].lines[h]; + const core::position2di st((s32)(currentline.start.X*scale)+50, (s32)(currentline.start.Y*scale)+50); + const core::position2di en((s32)(currentline.end.X*scale)+50, (s32)(currentline.end.Y*scale)+50); + device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); + } + + device->getVideoDriver()->endScene(); + } + } + void drawTri3D(IrrlichtDevice *device, u32 t) + { + for (u32 g=0;g<groups.size(); ++g) + { + STriangleList &t = groups[g].triangles; + core::array<S3DVertex> verts; + verts.clear(); + for(u32 v=0; v< t.positions.size(); ++v) + { + verts.push_back(S3DVertex( + -t.positions[v].X, -t.positions[v].Y, -100, + 0,0,1,SColor(255,255,255,255),0,0)); + } + + device->getVideoDriver()->drawIndexedTriangleList(verts.pointer(),verts.size(),t.indexes.pointer(), t.indexes.size()/3 ); + } + } + + + // process all pixels + void findGroups() + { + for (int y=0; y<height; ++y) + for (int x=0; x<width; ++x) + processPixel(x,y); + + } + + // remove groups with no pixels + void removeGroups() + { + for (u32 i=0; i<groups.size(); ++i) + if (groups[i].pixels.size() == 0) + groups.erase(i--); + + /*for (s32 y=0; y <height; ++y) + { + printf("\n"); + for (s32 x=0; x <width; ++x) + { + s32 i; + for (i=0; i<groups.size(); ++i) + { + bool k = groups[i].isMember(x,y); + if (k) + break; + } + printf("%d",i); + } + }*/ + + + } + + // adds a pixel to its area, merging touching areas + void processPixel(s32 x, s32 y) + { + // solid? + if (getPixel(x,y)) + { + s32 g=0, grp=0; + + bool found=false; + if (x>0) // look one behind + { + grp = getRef(x-1,y); + if (grp) found=true; + } + if (y>0) // look above + { + if (x>0) // top left + { + g = getRef(x-1,y-1); + + if (g) + { + if (found) + { + mergeGroups(grp, g); + } + else + { + grp = g; + found = true; + } + } + } + + if (x<width-1) // top right + { + g = getRef(x+1,y-1); + + if (g) + { + if (found) + { + mergeGroups(grp, g); + } + else + { + grp = g; + found = true; + } + } + } + + // top + + g = getRef(x,y-1); + + if (g) + { + if (found) + { + mergeGroups(grp, g); + } + else + { + grp = g; + found = true; + } + } + + } + + // didn't find a group for this pixel, so we add one + if (!found) + { + SPixelGroup p(Device); + p.pixels.push_back(core::position2di(x,y)); + groups.push_back(p); + groupRefs.push_back(groups.size()); + grp=groups.size(); + } + else + { + groups[groupRefs[grp-1]-1].pixels.push_back(core::position2di(x,y)); + } + setRef(x,y,groupRefs[grp-1]); + } + } + + bool& getPixel(s32 x, s32 y) { return mem[y*width +x]; } + s32& getRef(s32 x, s32 y) { return refbuffer[y*width +x]; } + void setRef(s32 x, s32 y, s32 g) { refbuffer[y*width +x] = g; } + + void mergeGroups(s32 g1, s32 g2) + { + if (g1==g2) + return; + // joins two groups together + for (u32 i=0; i<groups[g2-1].pixels.size(); ++i) + groups[g1-1].pixels.push_back(groups[g2-1].pixels[i]); + groups[g2-1].pixels.clear(); + groupRefs[g2-1] = g1; + } + + s32 width, height; + core::array<SPixelGroup> groups; + core::array<s32> groupRefs; + core::array<s32> refbuffer; + bool *mem; + IrrlichtDevice *Device; +}; + +// creates a simple vector font from a bitmap from the font tool +class CVectorFontTool +{ +public: + CVectorFontTool(CFontTool *fonttool) : + triangulator(0), FontTool(fonttool), + letterHeight(0), letterWidth(0), triangles() + { + core::map<wchar_t, u32>::Iterator it = FontTool->CharMap.getIterator(); + + while(!it.atEnd()) + { + CFontTool::SFontArea &fa = FontTool->Areas[(*it).getValue()]; + + if (fa.rectangle.getWidth() > letterWidth) + letterWidth = fa.rectangle.getWidth(); + if (fa.rectangle.getHeight() > letterHeight) + letterHeight = fa.rectangle.getHeight(); + + it++; + } + + // number of verts is one more than number of pixels because it's a grid of squares + letterWidth++; + letterHeight++; + + // create image memory + imagedata.set_used(letterWidth*letterHeight); + + // create vertex list, set position etc + verts.set_used(letterWidth*letterHeight); + for (s32 y=0; y<letterHeight; ++y) + { + for (s32 x=0; x<letterWidth; ++x) + { + S3DVertex &v = getVert(x,y); + v.Pos = core::vector3df((f32)x,(f32)y,0.0f); + v.TCoords.X = (f32)letterWidth / (f32)x; + v.TCoords.Y = (f32)letterHeight / (f32)y; + v.Normal = core::vector3df(0,0,-1); + v.Color = SColor(255,255,255,255); + } + } + // clear index list + inds.clear(); + + // create each char in the font... + it = FontTool->CharMap.getIterator(); + while(!it.atEnd()) + { + addChar((*it).getKey()); + it++; + } + } + + ~CVectorFontTool() + { + if (triangulator) + delete triangulator; + } + + void addChar(wchar_t thischar) + { + const s32 area = FontTool->CharMap[thischar]; + const CFontTool::SFontArea &fa = FontTool->Areas[area]; + + const s32 img = fa.sourceimage; + const core::rect<s32>& r = fa.rectangle; + + // init image memory + IImage *image = FontTool->currentImages[img]; + for (u32 i=0; i < imagedata.size(); ++i) + imagedata[i] = false; + for (s32 y=r.UpperLeftCorner.Y; y < r.LowerRightCorner.Y; ++y) + { + for (s32 x=r.UpperLeftCorner.X; x < r.LowerRightCorner.X ; ++x) + if (image->getPixel(x,y).getBlue() > 0) + { + imagedata[letterWidth*(y-r.UpperLeftCorner.Y) +(x-r.UpperLeftCorner.X)] = true; + } + } + + // get shape areas + triangulator = new CGroupFinder(imagedata.pointer(), letterWidth, letterHeight, FontTool->Device ); + + wprintf(L"Created character '%c' in texture %d\n", thischar, img ); + + //floodfill->drawEdges(FontTool->Device, 500, 3); + //floodfill->drawTriangles(FontTool->Device, 500,30); + //floodfill->drawTriLines(FontTool->Device, 200,3); + + /* + if (area==32 && map == 0) + { + scene::ISceneManager *smgr = FontTool->Device->getSceneManager(); + smgr->addCameraSceneNodeFPS(); + while(FontTool->Device->run()) + { + //floodfill->drawEdges(FontTool->Device, 100, 30); + FontTool->Device->getVideoDriver()->beginScene(true, true, video::SColor(0,200,200,200)); + smgr->drawAll(); + floodfill->drawTri3D(FontTool->Device, 100); + FontTool->Device->getVideoDriver()->endScene(); + } + }*/ + + u32 lastind = triangles.indexes.size(); + + // loop through each shape and add it to the current character... + for (u32 i=0; i < triangulator->groups.size(); ++i) + triangles += triangulator->groups[i].triangles; + + // add character details + charstarts.push_back(lastind); + charlengths.push_back(triangles.indexes.size() - lastind); + chars.push_back(thischar); + } + + bool saveVectorFont(const c8 *filename, const c8 *formatname) + { + IrrlichtDevice *Device = FontTool->Device; + + if (triangles.indexes.size() == 0) + { + Device->getLogger()->log("No vector data to write, aborting."); + return false; + } + + core::stringc fn = filename; + + if (core::stringc(formatname) == core::stringc("xml")) + { + fn += ".xml"; + io::IXMLWriter *writer = FontTool->Device->getFileSystem()->createXMLWriter(fn.c_str()); + + // header and line breaks + writer->writeXMLHeader(); + writer->writeLineBreak(); + + // write info header + writer->writeElement(L"font", false, L"type", L"vector"); + writer->writeLineBreak(); + writer->writeLineBreak(); + + // write each letter + + for (u32 n=0; n<chars.size(); ++n) + { + u32 i = FontTool->CharMap[chars[n]]; + CFontTool::SFontArea &fa = FontTool->Areas[i]; + wchar_t c[2]; + c[0] = chars[n]; + c[1] = L'\0'; + core::stringw area, under, over; + area = core::stringw(fa.rectangle.LowerRightCorner.X- + fa.rectangle.UpperLeftCorner.X); + area += L", "; + area += fa.rectangle.LowerRightCorner.Y- + fa.rectangle.UpperLeftCorner.Y; + + + core::array<core::stringw> names; + core::array<core::stringw> values; + names.clear(); + values.clear(); + // char + names.push_back(core::stringw(L"c")); + values.push_back(core::stringw(c)); + + // width+height + names.push_back(core::stringw(L"wh")); + values.push_back(area); + + // start + names.push_back(core::stringw(L"st")); + values.push_back(core::stringw(charstarts[n])); + // length + names.push_back(core::stringw(L"len")); + values.push_back(core::stringw(charlengths[n])); + + if (fa.underhang != 0) + { + under = core::stringw(fa.underhang); + names.push_back(core::stringw(L"u")); + values.push_back(under); + } + if (fa.overhang != 0) + { + over = core::stringw(fa.overhang); + names.push_back(core::stringw(L"o")); + values.push_back(over); + } + writer->writeElement(L"c", true, names, values); + + writer->writeLineBreak(); + } + + // write vertex data + core::stringw data, count; + data = L""; + count = core::stringw(triangles.positions.size()); + for (u32 i=0; i<triangles.positions.size(); ++i) + { + if (i!=0) + data += L", "; + data += (s32)triangles.positions[i].X; + data += L","; + data += (s32)triangles.positions[i].Y; + } + writer->writeElement(L"Vertices", true, L"count", count.c_str(), L"data", data.c_str()); + writer->writeLineBreak(); + + // write index list + data = L""; + count = core::stringw(triangles.indexes.size()); + for (u32 i=0; i<triangles.indexes.size(); i+=3) + { + if (i!=0) + data += L", "; + data += triangles.indexes[i+0]; + data += L","; + data += triangles.indexes[i+1], + data += L","; + data += triangles.indexes[i+2]; + } + + writer->writeElement(L"Indices", true, L"count", count.c_str(), L"data", data.c_str()); + writer->writeLineBreak(); + + writer->writeClosingTag(L"font"); + + writer->drop(); + + Device->getLogger()->log("Font saved."); + return true; + + } + else if (core::stringc(formatname) == core::stringc("bin")) + { + FontTool->Device->getLogger()->log("binary fonts not supported yet, sorry"); + return false; + } + else + { + FontTool->Device->getLogger()->log("unsupported file format, unable to save vector font"); + return false; + } + } + + S3DVertex& getVert(s32 x, s32 y) { return verts[letterWidth*y +x]; } + + core::array<S3DVertex> verts; + core::array<u16> inds; + core::array<bool> imagedata; + + core::array<s32> charstarts; // start position of each char + core::array<s32> charlengths; // index count + core::array<wchar_t> chars; // letters + + CGroupFinder* triangulator; + CFontTool* FontTool; + + s32 letterHeight; + s32 letterWidth; + + STriangleList triangles; +}; + +#endif // __VECTOR_FONT_TOOL_INCLUDED__ + diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/Makefile b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/Makefile new file mode 100644 index 0000000..7444e44 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = FontTool +Sources = CFontTool.cpp main.cpp + +# general compiler settings +CPPFLAGS = -I../../../include -I/usr/X11R6/include -I/usr/include/freetype2/ +CXXFLAGS = -O3 -ffast-math +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXft +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../../lib/Win32-gcc -lIrrlicht -lgdi32 -lopengl32 -lglu32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln new file mode 100644 index 0000000..1e24460 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_v8.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj new file mode 100644 index 0000000..fcb71a1 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="Font Tool" + ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" + OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" + LinkIncremental="2" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/TestProject.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../bin/Win32-visualstudio/FontTool.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + LinkTimeCodeGeneration="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath=".\CFontTool.cpp" + > + </File> + <File + RelativePath=".\CFontTool.h" + > + </File> + <File + RelativePath=".\CVectorFontTool.h" + > + </File> + <File + RelativePath=".\main.cpp" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> + diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln new file mode 100644 index 0000000..be110b8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj new file mode 100644 index 0000000..4fa1e4b --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="Font Tool" + ProjectGUID="{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" + OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../lib/Win32-visualstudio" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/TestProject.pdb" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="../../../include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + MinimalRebuild="true" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" + OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" + LinkIncremental="0" + AdditionalLibraryDirectories="../../../lib/Win32-visualstudio" + GenerateDebugInformation="false" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + LinkTimeCodeGeneration="0" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath=".\CFontTool.cpp" + > + </File> + <File + RelativePath=".\CFontTool.h" + > + </File> + <File + RelativePath=".\CVectorFontTool.h" + > + </File> + <File + RelativePath=".\main.cpp" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln new file mode 100644 index 0000000..48651a8 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_vc10.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj new file mode 100644 index 0000000..e1ee889 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>FontTool</ProjectName> + <ProjectGuid>{4D53E40F-37E3-42B1-8848-F4C6F8313A17}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <LinkTimeCodeGeneration> + </LinkTimeCodeGeneration> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <LinkTimeCodeGeneration> + </LinkTimeCodeGeneration> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="CFontTool.cpp" /> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="CFontTool.h" /> + <ClInclude Include="CVectorFontTool.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> + <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln new file mode 100644 index 0000000..05b60ad --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_vc11.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj new file mode 100644 index 0000000..4513cfa --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>FontTool</ProjectName> + <ProjectGuid>{4D53E40F-37E3-42B1-8848-F4C6F8313A17}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <LinkTimeCodeGeneration> + </LinkTimeCodeGeneration> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> + <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <LinkTimeCodeGeneration> + </LinkTimeCodeGeneration> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="CFontTool.cpp" /> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="CFontTool.h" /> + <ClInclude Include="CVectorFontTool.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> + <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/main.cpp b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/main.cpp new file mode 100644 index 0000000..9e9e87f --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/newFontTool/main.cpp @@ -0,0 +1,493 @@ +/* + Tool for creating Irrlicht bitmap+vector fonts, + started by Gaz Davidson in December 2006 + + Due to my laziness and Microsoft's unituitive API, surragate pairs and + nonspacing diacritical marks are not supported! + + Linux bitmap font support added by Neil Burlock Oct 2008 + Note: Xft/Freetype2 is used to render the fonts under X11. Anti-aliasing + is controlled by the system and cannot be overriden by an application, + so fonts that are rendered will be aliased or anti-aliased depending + on the system that they are created on. + +*/ + + +#include <irrlicht.h> +#include <iostream> + +#include "CFontTool.h" +#include "CVectorFontTool.h" +#include "ITexture.h" + +using namespace irr; +using namespace gui; + +#pragma comment(lib, "Irrlicht.lib") + +const s32 texturesizes[] = {128, 256, 512, 1024, 2048, 4096, 0}; + +const wchar_t *fileformats[] = { L"bmp", L"ppm", 0 }; // bitmap font formats +const wchar_t *alphafileformats[] = { L"png", L"tga", 0 }; // bitmap font formats which support alpha channels +const wchar_t *vectorfileformats[] = { L"xml", L"bin", 0 }; // file formats for vector fonts + +const wchar_t *warntext = L"Legal Notice\n" + L"------------\n\n" + L"When making bitmap and vector fonts, you should consider the potential legal " + L"issues with redistributing the fonts with your software; this tool basically " + L"copies font data and some authors might not like this!\n" + L"If you purchased fonts or they came with an application or your OS, you'll have" + L"to check the license to see what restrictions are placed on making derivative works.\n\n" + L"PD and the OFL\n" + L"--------------\n\n" + L"You'll find lots of fonts on the web listed as Public Domain, you can do what you like " + L"with these.\n" + L"Many fonts are released under the Open Font License, which is a 'viral' open source " + L"license like the GPL. It's worth reading the license here: http://scripts.sil.org/OFL\n" + L"The most important restrictions are- you must include the original font's license, you " + L"can't stop your users from using or distributing the font, the font must have a " + L"different name the original.\n\n" + L"Some free fonts can be found here- www.openfontlibrary.org\n" + L"http://savannah.nongnu.org/projects/freefont/"; + +const wchar_t *helptext = L"This tool creates bitmap fonts for the Irrlicht Engine\n\n" + + L"First select a character encoding from the list, then choose the font, " + L"size, and whether you'd like bold, italic, antialiasing and an alpha channel. " + L"In Windows, antialiasing will be ignored for small fonts\n\n" + + L"Then select a texture width and height. If the output exceeds this then more than " + L"one image will be created. You can use the scrollbar at the top of the screen to " + L"preview them. Most modern graphics cards will support up to 2048x2048, " + L"keep in mind that more images means worse performance when drawing text!\n\n" + + L"If you want a vector font rather than a bitmap font, check the vector box. " + L"Vector fonts are stored in system memory while bitmap fonts are in video ram\n\n" + + L"Click create to preview your font, this may take lots of time and memory " + L"when making a font with a lot of characters, please be patient!\n\n" + + L"Now you're ready to give your font a name, select a format and click save.\n\n" + L"To load your font in Irrlicht, simply use env->getFont(\"Myfont.xml\");\n\n" + + L"That's all, have fun :-)"; + +#ifdef _IRR_WINDOWS_ + const wchar_t *completeText = L"Font created"; +#else + const wchar_t *completeText = L"Font created\n\n" + L"Please note that anti-aliasing under X11 is controlled by the system " + L"configuration, so if your system is set to use anti-aliasing, then so " + L"will any fonts you create with FontTool"; +#endif + +enum MYGUI +{ + MYGUI_CHARSET = 100, + MYGUI_FONTNAME, + MYGUI_SIZE, + MYGUI_TEXWIDTH, + MYGUI_TEXHEIGHT, + MYGUI_BOLD, + MYGUI_ITALIC, + MYGUI_ANTIALIAS, + MYGUI_ALPHA, + MYGUI_VECTOR, + MYGUI_FILENAME, + MYGUI_FORMAT, + MYGUI_CREATE, + MYGUI_SAVE, + MYGUI_IMAGE, + MYGUI_CURRENTIMAGE, + MYGUI_HELPBUTTON +}; + + +// event reciever +class MyEventReceiver : public IEventReceiver +{ +public: + + MyEventReceiver(IrrlichtDevice* device, CFontTool*& fonttool, CVectorFontTool* &vectool) : + Device(device), FontTool(fonttool), VecTool(vectool) + { + device->setEventReceiver(this); + } + + virtual bool OnEvent(const SEvent &event) + { + if (event.EventType == EET_GUI_EVENT) + { + s32 id = event.GUIEvent.Caller->getID(); + IGUIEnvironment* env = Device->getGUIEnvironment(); + + switch(event.GUIEvent.EventType) + { + case EGET_SCROLL_BAR_CHANGED: + if (id == MYGUI_CURRENTIMAGE) + { + IGUIImage* img = (IGUIImage*)env->getRootGUIElement()->getElementFromId(MYGUI_IMAGE,true); + s32 i = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); + img->setImage(FontTool->currentTextures[i]); + + return true; + } + break; + case EGET_COMBO_BOX_CHANGED: + if (id == MYGUI_CHARSET) + { + IGUIComboBox* cbo = (IGUIComboBox*)event.GUIEvent.Caller; + FontTool->selectCharSet(cbo->getSelected()); + // rebuild font list + cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FONTNAME,true); + cbo->clear(); + for (u32 i=0; i < FontTool->FontNames.size(); ++i) + cbo->addItem(FontTool->FontNames[i].c_str()); + return true; + } + break; + case EGET_CHECKBOX_CHANGED: + if (id == MYGUI_VECTOR) + { + IGUICheckBox* chk = (IGUICheckBox*)event.GUIEvent.Caller; + + IGUIComboBox *cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); + cbo->clear(); + + if (chk->isChecked() && VecTool) + { + // vector formats + for (s32 i=0; fileformats[i] != 0; ++i) + cbo->addItem( core::stringw(vectorfileformats[i]).c_str()); + + } + else + { + + // bitmap formats + if (!FontTool->UseAlphaChannel) + { + // add non-alpha formats + for (s32 i=0; fileformats[i] != 0; ++i) + cbo->addItem( core::stringw(fileformats[i]).c_str()); + } + // add formats which support alpha + for (s32 i=0; alphafileformats[i] != 0; ++i) + cbo->addItem( core::stringw(alphafileformats[i]).c_str()); + } + + } + break; + + case EGET_BUTTON_CLICKED: + + if (id == MYGUI_CREATE) + { + // create the font with the params + IGUIComboBox* cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_CHARSET, true); + int charset = cbo->getSelected(); + + cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FONTNAME,true); + int fontname = cbo->getSelected(); + + cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_SIZE,true); + int fontsize = cbo->getSelected(); + + cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_TEXWIDTH,true); + int texwidth = cbo->getSelected(); + + cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_TEXHEIGHT,true); + int texheight = cbo->getSelected(); + + IGUICheckBox* chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_BOLD,true); + bool bold = chk->isChecked(); + chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ITALIC,true); + bool italic = chk->isChecked(); + + chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ALPHA,true); + bool alpha = chk->isChecked(); + + chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ANTIALIAS,true); + bool aa = chk->isChecked(); + + // vector fonts disabled + //chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_VECTOR,true); + bool vec = false;//chk->isChecked(); + + FontTool->makeBitmapFont(fontname, charset, FontTool->FontSizes[fontsize], texturesizes[texwidth], texturesizes[texheight], bold, italic, aa, alpha); + + IGUIScrollBar* scrl = (IGUIScrollBar*)env->getRootGUIElement()->getElementFromId(MYGUI_CURRENTIMAGE,true); + scrl->setMax(FontTool->currentTextures.size() == 0 ? 0 : FontTool->currentTextures.size()-1); + + if (FontTool->currentTextures.size() > 0) + { + IGUIImage* img = (IGUIImage*)env->getRootGUIElement()->getElementFromId(MYGUI_IMAGE,true); + img->setImage(FontTool->currentTextures[0]); + scrl->setPos(0); + } + + // make sure users pick a file format that supports alpha channel + cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); + cbo->clear(); + + if (vec) + { + // add vector formats + for (s32 i=0; fileformats[i] != 0; ++i) + cbo->addItem( core::stringw(vectorfileformats[i]).c_str()); + } + else + { + if (!alpha) + { + // add non-alpha formats + for (s32 i=0; fileformats[i] != 0; ++i) + cbo->addItem( core::stringw(fileformats[i]).c_str()); + } + // add formats which support alpha + for (s32 i=0; alphafileformats[i] != 0; ++i) + cbo->addItem( core::stringw(alphafileformats[i]).c_str()); + } + if (VecTool) + { + delete VecTool; + VecTool = 0; + } + if (vec) + { + VecTool = new CVectorFontTool(FontTool); + } + + /* Message box letting the user know the process is complete */ + env->addMessageBox(L"Create", completeText); + + return true; + } + + if (id == MYGUI_SAVE) + { + IGUIEditBox *edt = (IGUIEditBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FILENAME,true); + core::stringc name = edt->getText(); + + IGUIComboBox *fmt = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); + core::stringc format = fmt->getItem(fmt->getSelected()); + + // vector fonts disabled + IGUICheckBox *chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_VECTOR,true); + bool vec = false; // chk->isChecked(); + + if (vec && VecTool) + VecTool->saveVectorFont(name.c_str(), format.c_str()); + else + FontTool->saveBitmapFont(name.c_str(), format.c_str()); + + return true; + } + + if (id == MYGUI_HELPBUTTON) + { + env->addMessageBox(L"Irrlicht Unicode Font Tool", helptext); + return true; + } + + break; + } + } + + return false; + } + + IrrlichtDevice* Device; + CFontTool* FontTool; + CVectorFontTool* VecTool; + +}; + +void createGUI(IrrlichtDevice* device, CFontTool* fc) +{ + gui::IGUIEnvironment *env = device->getGUIEnvironment(); + + // change transparency of skin + for (s32 i=0; i<gui::EGDC_COUNT ; ++i) + { + video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); + col.setAlpha(255); + env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); + } + + IGUIWindow *win = env->addWindow( core::rect<s32>(10,10,200,500), false, L"Font Creator"); + win->getCloseButton()->setVisible(false); + + s32 xs=10,xp=xs, yp=30, h=20; + + env->addStaticText(L"Charset", core::rect<s32>(xp,yp,50,yp+h),false,false, win); + + xp+=60; + + // charset combo + gui::IGUIComboBox* cbo = env->addComboBox( core::rect<s32>(xp,yp,180,yp+h),win, MYGUI_CHARSET); + for (u32 i=0; i < fc->CharSets.size(); ++i) + cbo->addItem(fc->CharSets[i].c_str()); + + yp += (s32)(h*1.5f); + xp = xs; + + env->addStaticText(L"Font", core::rect<s32>(xp,yp,50,yp+h),false,false, win); + + xp+=60; + + // font name combo + cbo = env->addComboBox( core::rect<s32>(xp,yp,180,yp+h),win, MYGUI_FONTNAME); + for (u32 i=0; i < fc->FontNames.size(); ++i) + cbo->addItem(fc->FontNames[i].c_str()); + + yp += (s32)(h*1.5f); + xp = xs; + + env->addStaticText(L"Size", core::rect<s32>(xp,yp,50,yp+h),false,false, win); + + xp += 60; + + // font size combo + cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_SIZE); + for (s32 i=0; fc->FontSizes[i] != 0; ++i) + cbo->addItem( ((core::stringw(fc->FontSizes[i])) + L"px").c_str()); + + xp = xs; + yp += (s32)(h*1.5f); + + // bold checkbox + env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_BOLD, L"Bold"); + + xp += 45; + + // italic checkbox + env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ITALIC, L"Italic"); + + xp += 45; + + // AA checkbox + env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ANTIALIAS, L"AA"); + + xp +=40; + + // Alpha checkbox + env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ALPHA, L"Alpha"); + + xp = xs; + yp += (s32)(h*1.5f); + + /* + // vector fonts can't be loaded yet + env->addCheckBox(false, core::rect<s32>(xp,yp,xp+200,yp+h),win, MYGUI_VECTOR, L"Vector Font"); + */ + + yp += (s32)(h*1.5f); + + env->addStaticText(L"Max Width:", core::rect<s32>(xp,yp,50,yp+h),false,false, win); + + xp += 60; + + // texture widths + cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_TEXWIDTH); + for (s32 i=0; texturesizes[i] != 0; ++i) + cbo->addItem( ((core::stringw(texturesizes[i])) + L" wide").c_str()); + + xp=xs; + yp += (s32)(h*1.5f); + + env->addStaticText(L"Max Height:", core::rect<s32>(xp,yp,60,yp+h),false,false, win); + + xp += 60; + + // texture height + cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_TEXHEIGHT); + for (s32 i=0; texturesizes[i] != 0; ++i) + cbo->addItem( ((core::stringw(texturesizes[i])) + L" tall").c_str()); + + // file name + xp = xs; + yp += (s32)(h*1.5f); + env->addStaticText(L"Filename", core::rect<s32>(xp,yp,60,yp+h),false,false, win); + xp += 60; + env->addEditBox(L"myfont",core::rect<s32>(xp,yp,xp+70,yp+h), true, win, MYGUI_FILENAME); + + // file format + xp = xs; + yp += (s32)(h*1.5f); + env->addStaticText(L"File Format", core::rect<s32>(xp,yp,60,yp+h),false,false, win); + xp += 60; + + cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_FORMAT); + for (s32 i=0; fileformats[i] != 0; ++i) + cbo->addItem( core::stringw(fileformats[i]).c_str()); + for (s32 i=0; alphafileformats[i] != 0; ++i) + cbo->addItem( core::stringw(alphafileformats[i]).c_str()); + + xp = xs; + yp += h*2; + + // create button + env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_CREATE, L"Create"); + + xp += 60; + + // save button + env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_SAVE, L"Save"); + + xp += 60; + + // help button + env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_HELPBUTTON, L"Help"); + + // font image + gui::IGUIImage *img = env->addImage(0, core::position2d<s32>(0,0), true,0, MYGUI_IMAGE); + img->setRelativePosition(core::rect<s32>(0,20,800,600)); + + // font scrollbar + IGUIScrollBar *scrl= env->addScrollBar(true,core::rect<s32>(0,0,800,20),0, MYGUI_CURRENTIMAGE); + scrl->setMax(0); + scrl->setSmallStep(1); + + yp += h*3; + + env->getRootGUIElement()->bringToFront(win); + win->setRelativePosition( core::rect<s32>(10,10,200,yp)); +} + +int main() +{ + IrrlichtDevice* device =createDevice(video::EDT_OPENGL, core::dimension2du(800, 600)); + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment *env = device->getGUIEnvironment(); + + // create font tool + CFontTool *fc = new CFontTool(device); + CVectorFontTool *vc = 0; + + IEventReceiver *events = new MyEventReceiver(device,fc,vc); + + createGUI(device, fc); + + while(device->run()) + { + if (device->isWindowActive()) + { + + driver->beginScene(true, true, video::SColor(0,200,200,200)); + smgr->drawAll(); + env->drawAll(); + driver->endScene(); + } + } + + // drop the font tool and resources + fc->drop(); + + device->drop(); + + return 0; +} + diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/oldFontTool/source.zip b/src/others/irrlicht-1.8.1/tools/IrrFontTool/oldFontTool/source.zip new file mode 100644 index 0000000..9228ebb Binary files /dev/null and b/src/others/irrlicht-1.8.1/tools/IrrFontTool/oldFontTool/source.zip differ diff --git a/src/others/irrlicht-1.8.1/tools/IrrFontTool/readme.txt b/src/others/irrlicht-1.8.1/tools/IrrFontTool/readme.txt new file mode 100644 index 0000000..fda16d5 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/IrrFontTool/readme.txt @@ -0,0 +1,13 @@ +There are two tools available for creating fonts for irrlicht, both are supported. + +oldFontTool: + only works in Windows, creates a simple image file containing all data for displaying fonts. + Those file contain no alpha informations and are limited in their character set. + use the IrrFontTool.exe file in this directory. + +newFontTool: + a more sophisticated font tool supporting alpha channels, anti aliasing, + different character sets, vector fonts and other operating systems than + just windows. It will create multiple image files and an .xml file + containing meta information for the generated font. + You can find it as FontTool.exe in the /bin directory. \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/MeshConverter/Makefile b/src/others/irrlicht-1.8.1/tools/MeshConverter/Makefile new file mode 100644 index 0000000..5328223 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/MeshConverter/Makefile @@ -0,0 +1,38 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler +Target = MeshConverter +Sources = main.cpp + +# general compiler settings +CPPFLAGS = -I../../include -I/usr/X11R6/include +CXXFLAGS = -O3 -ffast-math -Wall +#CXXFLAGS = -g -Wall + +#default target is Linux +all: all_linux + +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif + +# target specific settings +all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 +all_linux clean_linux: SYSTEM=Linux +all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lglu32 -lm +all_win32 clean_win32: SYSTEM=Win32-gcc +all_win32 clean_win32: SUF=.exe +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) + +all_linux all_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 clean clean_linux clean_win32 diff --git a/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter.cbp b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter.cbp new file mode 100644 index 0000000..08ebbfb --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter.cbp @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="Mesh Converter" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> + <Build> + <Target title="Linux"> + <Option platforms="Unix;" /> + <Option output="..\..\bin\Linux\MeshConverter" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_IRR_STATIC_LIB_" /> + </Compiler> + <Linker> + <Add library="Xxf86vm" /> + <Add library="GL" /> + <Add directory="..\..\lib\Linux" /> + </Linker> + </Target> + <Target title="Windows"> + <Option platforms="Windows;" /> + <Option output="..\..\bin\Win32-gcc\MeshConverter" prefix_auto="0" extension_auto="1" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + <Linker> + <Add directory="..\..\lib\Win32-gcc" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Windows;Linux;" /> + </VirtualTargets> + <Compiler> + <Add option="-g" /> + <Add directory="..\..\include" /> + </Compiler> + <Linker> + <Add library="Irrlicht" /> + </Linker> + <Unit filename="main.cpp" /> + <Extensions> + <code_completion /> + <debugger /> + <envvars /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff --git a/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_v9.vcproj b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_v9.vcproj new file mode 100644 index 0000000..5747218 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_v9.vcproj @@ -0,0 +1,187 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="Mesh Converter" + ProjectGUID="{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" + RootNamespace="GUI Editor" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + FavorSizeOrSpeed="0" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " + OutputFile="../../bin/Win32-visualstudio/MeshConverter.exe" + LinkIncremental="2" + AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/TestProject.pdb" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath=".\main.cpp" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc10.vcxproj b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc10.vcxproj new file mode 100644 index 0000000..1f1ce49 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc10.vcxproj @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>MeshConverter</ProjectName> + <ProjectGuid>{E72B637E-4AA6-46F3-885F-AC67B4B470ED}</ProjectGuid> + <RootNamespace>GUI Editor</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>Full</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> + <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc11.vcxproj b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc11.vcxproj new file mode 100644 index 0000000..6493206 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/MeshConverter/MeshConverter_vc11.vcxproj @@ -0,0 +1,196 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>MeshConverter</ProjectName> + <ProjectGuid>{E72B637E-4AA6-46F3-885F-AC67B4B470ED}</ProjectGuid> + <RootNamespace>GUI Editor</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> + <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> + <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>Full</Optimization> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN64NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> + <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/src/others/irrlicht-1.8.1/tools/MeshConverter/main.cpp b/src/others/irrlicht-1.8.1/tools/MeshConverter/main.cpp new file mode 100644 index 0000000..d6b878f --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/MeshConverter/main.cpp @@ -0,0 +1,108 @@ +#include <irrlicht.h> +#include <iostream> + +using namespace irr; + +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#endif + +void usage(const char* name) +{ + std::cerr << "Usage: " << name << " [options] <srcFile> <destFile>" << std::endl; + std::cerr << " where options are" << std::endl; + std::cerr << " --createTangents: convert to tangents mesh is possible." << std::endl; + std::cerr << " --format=[irrmesh|collada|stl|obj|ply]: Choose target format" << std::endl; +} + +int main(int argc, char* argv[]) +{ + if ((argc < 3) || + ((argc==3) && (argv[1][0]=='-'))) + { + usage(argv[0]); + return 1; + } + + IrrlichtDevice *device = createDevice( video::EDT_NULL, + dimension2d<u32>(800, 600), 32, false, false, false, 0); + + device->setWindowCaption(L"Mesh Converter"); + + scene::EMESH_WRITER_TYPE type = EMWT_IRR_MESH; + u32 i=1; + bool createTangents=false; + while (argv[i][0]=='-') + { + core::stringc format = argv[i]; + if (format.size() > 3) + { + if (format.equalsn("--format=",9)) + { + format = format.subString(9,format.size()); + if (format=="collada") + type = EMWT_COLLADA; + else if (format=="stl") + type = EMWT_STL; + else if (format=="obj") + type = EMWT_OBJ; + else if (format=="ply") + type = EMWT_PLY; + else + type = EMWT_IRR_MESH; + } + else + if (format =="--createTangents") + createTangents=true; + } + else + if (format=="--") + { + ++i; + break; + } + ++i; + } + + const s32 srcmesh = i; + const s32 destmesh = i+1; + + --argc; + if ((argc<srcmesh) || (argc<destmesh)) + { + std::cerr << "Not enough files given." << std::endl; + usage(argv[0]); + return 1; + } + + createTangents = createTangents && (type==EMWT_IRR_MESH); + std::cout << "Converting " << argv[srcmesh] << " to " << argv[destmesh] << std::endl; + IMesh* mesh = device->getSceneManager()->getMesh(argv[srcmesh])->getMesh(0); + if (!mesh) + { + std::cerr << "Could not load " << argv[srcmesh] << std::endl; + return 1; + } + if (createTangents) + { + IMesh* tmp = device->getSceneManager()->getMeshManipulator()->createMeshWithTangents(mesh); + mesh->drop(); + mesh=tmp; + } + IMeshWriter* mw = device->getSceneManager()->createMeshWriter(type); + IWriteFile* file = device->getFileSystem()->createAndWriteFile(argv[destmesh]); + mw->writeMesh(file, mesh); + + file->drop(); + mw->drop(); + device->drop(); + + return 0; +} + diff --git a/src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.jpg b/src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.jpg new file mode 100644 index 0000000..deafb3f Binary files /dev/null and b/src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.jpg differ diff --git a/src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.txt b/src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.txt new file mode 100644 index 0000000..5e6fe60 --- /dev/null +++ b/src/others/irrlicht-1.8.1/tools/irrEdit/irrEdit.txt @@ -0,0 +1,7 @@ +irrEdit is a free scene graph editor for Irrlicht Engine .irr files and is capable as being used as world editor, +particle system designer, meshviewer and more. It is a visual front end for the Irrlicht Engine, and thus has a lot +of impressive features like importing meshes of every format Irrlicht supports, simple but powerful material +system and lots of special effects. + +For package size reasons, irrEdit is not included in this SDK, but you can download it from +http://www.ambiera.com/irredit \ No newline at end of file -- cgit v1.1